From 2feea155aa5703708640aac49e8e321de930ad48 Mon Sep 17 00:00:00 2001 From: Sehong Na Date: Sat, 31 May 2014 12:57:07 +0900 Subject: [PATCH] Initialize Tizen 2.3 --- AUTHORS | 8 + CMakeLists.txt | 53 + LICENSE.APLv2 | 202 + LICENSE.Flora | 206 + NOTICE | 8 + clipboard.service | 15 + inc/FGraphics.h | 144 + inc/FGraphicsOpengl.h | 42 + inc/FGraphicsOpengl2.h | 75 + inc/FGrpBitmap.h | 645 + inc/FGrpBufferInfo.h | 166 + inc/FGrpCanvas.h | 1650 +++ inc/FGrpCanvasCommon.h | 140 + inc/FGrpCanvasTexture.h | 132 + inc/FGrpColor.h | 492 + inc/FGrpCoordinateSystem.h | 194 + inc/FGrpDimension.h | 178 + inc/FGrpEnrichedText.h | 970 ++ inc/FGrpFloatDimension.h | 175 + inc/FGrpFloatMatrix4.h | 428 + inc/FGrpFloatPoint.h | 232 + inc/FGrpFloatPoint3.h | 277 + inc/FGrpFloatRectangle.h | 348 + inc/FGrpFloatVector4.h | 331 + inc/FGrpFont.h | 572 + inc/FGrpFontCommon.h | 51 + inc/FGrpGlPlayer.h | 291 + inc/FGrpIGlRenderer.h | 172 + inc/FGrpIVideoTextureUpdateListener.h | 97 + inc/FGrpPixelFormat.h | 53 + inc/FGrpPoint.h | 235 + inc/FGrpRectangle.h | 347 + inc/FGrpTextElement.h | 334 + inc/FGrpVideoTexture.h | 152 + inc/FUi.h | 149 + inc/FUiAccessibilityContainer.h | 317 + inc/FUiAccessibilityElement.h | 228 + inc/FUiAccessibilityTypes.h | 48 + inc/FUiAnimAnimationBase.h | 458 + inc/FUiAnimAnimationGroup.h | 143 + inc/FUiAnimAnimationTransaction.h | 528 + inc/FUiAnimBezierTimingFunction.h | 207 + inc/FUiAnimControlAnimator.h | 527 + inc/FUiAnimDimensionAnimation.h | 370 + inc/FUiAnimDiscreteTimingFunction.h | 142 + inc/FUiAnimDisplayContext.h | 141 + inc/FUiAnimEaseElasticInTimingFunction.h | 142 + inc/FUiAnimEaseElasticOutTimingFunction.h | 142 + inc/FUiAnimEaseInOutTimingFunction.h | 106 + inc/FUiAnimEaseInTimingFunction.h | 104 + inc/FUiAnimEaseOutInTimingFunction.h | 107 + inc/FUiAnimEaseOutTimingFunction.h | 104 + inc/FUiAnimExpInTimingFunction.h | 150 + inc/FUiAnimExpOutTimingFunction.h | 148 + inc/FUiAnimFloatAnimation.h | 336 + inc/FUiAnimFrameAnimator.h | 292 + inc/FUiAnimIAnimationTransactionEventListener.h | 134 + inc/FUiAnimIControlAnimatorDetailedEventListener.h | 195 + inc/FUiAnimIControlAnimatorEventListener.h | 146 + inc/FUiAnimIFrameAnimatorEventListener.h | 166 + inc/FUiAnimIVisualElementAnimationProvider.h | 148 + ...nimIVisualElementAnimationStatusEventListener.h | 151 + ...iAnimIVisualElementAnimationTickEventListener.h | 120 + inc/FUiAnimIVisualElementAnimationTimingFunction.h | 109 + ...iAnimIVisualElementAnimationValueInterpolator.h | 115 + inc/FUiAnimIVisualElementContentProvider.h | 179 + inc/FUiAnimIVisualElementEventListener.h | 282 + inc/FUiAnimIntegerAnimation.h | 338 + inc/FUiAnimLinearTimingFunction.h | 107 + inc/FUiAnimParallelAnimationGroup.h | 254 + inc/FUiAnimPointAnimation.h | 338 + inc/FUiAnimRectangleAnimation.h | 373 + inc/FUiAnimRotateAnimation.h | 233 + inc/FUiAnimSequentialAnimationGroup.h | 287 + inc/FUiAnimTypes.h | 188 + inc/FUiAnimVisualElement.h | 1495 +++ inc/FUiAnimVisualElementAnimation.h | 470 + inc/FUiAnimVisualElementAnimationGroup.h | 241 + inc/FUiAnimVisualElementAnimationProvider.h | 103 + inc/FUiAnimVisualElementContentProvider.h | 123 + inc/FUiAnimVisualElementPropertyAnimation.h | 191 + inc/FUiAnimVisualElementSurface.h | 249 + inc/FUiAnimVisualElementValueAnimation.h | 331 + inc/FUiAnimations.h | 373 + inc/FUiCardLayout.h | 186 + inc/FUiClipboard.h | 298 + inc/FUiClipboardItem.h | 123 + inc/FUiClipboardTypes.h | 50 + inc/FUiCompositeMode.h | 50 + inc/FUiContainer.h | 845 ++ inc/FUiControl.h | 2201 ++++ inc/FUiControls.h | 334 + inc/FUiCtrlAnimation.h | 365 + inc/FUiCtrlAnimationFrame.h | 132 + inc/FUiCtrlButton.h | 625 + inc/FUiCtrlButtonItem.h | 223 + inc/FUiCtrlCheckButton.h | 629 + inc/FUiCtrlColorPicker.h | 276 + inc/FUiCtrlContextMenu.h | 797 ++ inc/FUiCtrlControlsTypes.h | 116 + inc/FUiCtrlCustomItem.h | 396 + inc/FUiCtrlCustomList.h | 863 ++ inc/FUiCtrlCustomListItem.h | 315 + inc/FUiCtrlCustomListItemFormat.h | 318 + inc/FUiCtrlCustomListTypes.h | 57 + inc/FUiCtrlDatePicker.h | 385 + inc/FUiCtrlDateTimePicker.h | 448 + inc/FUiCtrlEditArea.h | 1465 +++ inc/FUiCtrlEditDate.h | 360 + inc/FUiCtrlEditField.h | 1517 +++ inc/FUiCtrlEditTime.h | 311 + inc/FUiCtrlEditTypes.h | 182 + inc/FUiCtrlExpandableEditArea.h | 1709 +++ inc/FUiCtrlExpandableList.h | 1237 ++ inc/FUiCtrlFooter.h | 853 ++ inc/FUiCtrlFooterItem.h | 195 + inc/FUiCtrlForm.h | 1148 ++ inc/FUiCtrlFrame.h | 407 + inc/FUiCtrlFrameTypes.h | 48 + inc/FUiCtrlGallery.h | 564 + inc/FUiCtrlGalleryItem.h | 126 + inc/FUiCtrlGalleryTypes.h | 80 + inc/FUiCtrlGroupContainer.h | 545 + inc/FUiCtrlGroupItem.h | 251 + inc/FUiCtrlGroupedList.h | 1127 ++ inc/FUiCtrlGroupedListView.h | 1390 ++ inc/FUiCtrlGroupedListViewTypes.h | 44 + inc/FUiCtrlGroupedTableView.h | 1106 ++ inc/FUiCtrlHeader.h | 1100 ++ inc/FUiCtrlHeaderItem.h | 202 + inc/FUiCtrlICustomElement.h | 88 + inc/FUiCtrlICustomElementF.h | 88 + inc/FUiCtrlICustomListElement.h | 107 + inc/FUiCtrlIEditTextFilter.h | 119 + inc/FUiCtrlIExpandableEditAreaEventListener.h | 124 + inc/FUiCtrlIFastScrollListener.h | 133 + inc/FUiCtrlIFormBackEventListener.h | 108 + inc/FUiCtrlIFormMenuEventListener.h | 104 + inc/FUiCtrlIFrameEventListener.h | 150 + inc/FUiCtrlIGalleryEventListener.h | 124 + inc/FUiCtrlIGalleryItemProvider.h | 119 + inc/FUiCtrlIGroupedListViewItemEventListener.h | 160 + inc/FUiCtrlIGroupedListViewItemProvider.h | 183 + inc/FUiCtrlIGroupedListViewItemProviderF.h | 183 + inc/FUiCtrlIGroupedTableViewItemEventListener.h | 142 + inc/FUiCtrlIGroupedTableViewItemProvider.h | 240 + inc/FUiCtrlIGroupedTableViewItemProviderF.h | 240 + inc/FUiCtrlIIconListViewItemEventListener.h | 106 + inc/FUiCtrlIIconListViewItemProvider.h | 114 + inc/FUiCtrlIListViewItemEventListener.h | 146 + inc/FUiCtrlIListViewItemProvider.h | 119 + inc/FUiCtrlIListViewItemProviderF.h | 119 + inc/FUiCtrlIProgressPopupEventListener.h | 90 + inc/FUiCtrlIScrollEventListener.h | 127 + inc/FUiCtrlIScrollEventListenerF.h | 128 + inc/FUiCtrlISearchBarEventListener.h | 144 + inc/FUiCtrlISectionTableViewItemEventListener.h | 123 + inc/FUiCtrlISectionTableViewItemProvider.h | 224 + inc/FUiCtrlISectionTableViewItemProviderF.h | 224 + inc/FUiCtrlISliderEventListener.h | 108 + inc/FUiCtrlISplitPanelEventListener.h | 116 + inc/FUiCtrlISplitPanelEventListenerF.h | 117 + inc/FUiCtrlITableViewItemEventListener.h | 134 + inc/FUiCtrlITableViewItemProvider.h | 161 + inc/FUiCtrlITableViewItemProviderF.h | 161 + inc/FUiCtrlITokenFilter.h | 106 + inc/FUiCtrlIconList.h | 919 ++ inc/FUiCtrlIconListTypes.h | 71 + inc/FUiCtrlIconListView.h | 1188 ++ inc/FUiCtrlIconListViewItem.h | 125 + inc/FUiCtrlIconListViewTypes.h | 150 + inc/FUiCtrlInputTypes.h | 45 + inc/FUiCtrlKeypad.h | 384 + inc/FUiCtrlLabel.h | 434 + inc/FUiCtrlLabelTypes.h | 58 + inc/FUiCtrlList.h | 971 ++ inc/FUiCtrlListContextItem.h | 255 + inc/FUiCtrlListItemBase.h | 230 + inc/FUiCtrlListTypes.h | 121 + inc/FUiCtrlListView.h | 1132 ++ inc/FUiCtrlListViewTypes.h | 163 + inc/FUiCtrlMessageBox.h | 354 + inc/FUiCtrlOptionMenu.h | 647 + inc/FUiCtrlOverlayPanel.h | 612 + inc/FUiCtrlOverlayRegion.h | 535 + inc/FUiCtrlPanel.h | 348 + inc/FUiCtrlPopup.h | 603 + inc/FUiCtrlProgress.h | 343 + inc/FUiCtrlProgressPopup.h | 298 + inc/FUiCtrlRadioGroup.h | 357 + inc/FUiCtrlScrollEventTypes.h | 50 + inc/FUiCtrlScrollPanel.h | 726 ++ inc/FUiCtrlScrollPanelTypes.h | 58 + inc/FUiCtrlSearchBar.h | 1558 +++ inc/FUiCtrlSectionTableView.h | 975 ++ inc/FUiCtrlSimpleItem.h | 126 + inc/FUiCtrlSlidableGroupedList.h | 1311 ++ inc/FUiCtrlSlidableList.h | 993 ++ inc/FUiCtrlSlider.h | 520 + inc/FUiCtrlSliderTypes.h | 63 + inc/FUiCtrlSplitPanel.h | 512 + inc/FUiCtrlSplitPanelTypes.h | 73 + inc/FUiCtrlTab.h | 751 ++ inc/FUiCtrlTabBar.h | 531 + inc/FUiCtrlTabBarItem.h | 167 + inc/FUiCtrlTableView.h | 874 ++ inc/FUiCtrlTableViewContextItem.h | 98 + inc/FUiCtrlTableViewGroupItem.h | 150 + inc/FUiCtrlTableViewItem.h | 194 + inc/FUiCtrlTableViewItemBase.h | 171 + inc/FUiCtrlTableViewSimpleGroupItem.h | 183 + inc/FUiCtrlTableViewSimpleItem.h | 186 + inc/FUiCtrlTableViewTypes.h | 139 + inc/FUiCtrlTextBox.h | 832 ++ inc/FUiCtrlTimePicker.h | 340 + inc/FUiCustomControlBase.h | 249 + inc/FUiDataBindingContext.h | 339 + inc/FUiDataBindingTypes.h | 95 + inc/FUiEffects.h | 60 + inc/FUiEffectsEffect.h | 393 + inc/FUiEffectsEffectManager.h | 154 + inc/FUiEffectsIEffectEventListener.h | 142 + inc/FUiEffectsIEffectResourceProvider.h | 125 + inc/FUiEffectsTypes.h | 63 + inc/FUiFocusManager.h | 102 + inc/FUiGridLayout.h | 522 + inc/FUiHorizontalBoxLayout.h | 420 + inc/FUiIAccessibilityListener.h | 143 + inc/FUiIActionEventListener.h | 110 + inc/FUiIAdjustmentEventListener.h | 111 + inc/FUiIAnimationEventListener.h | 112 + inc/FUiIClipboard.h | 152 + inc/FUiIClipboardPopupEventListener.h | 97 + inc/FUiIColorChangeEventListener.h | 115 + inc/FUiICustomItemEventListener.h | 117 + inc/FUiIDataBindingDataTransformer.h | 139 + inc/FUiIDataBindingDataValidator.h | 112 + inc/FUiIDataBindingListener.h | 123 + inc/FUiIDateChangeEventListener.h | 128 + inc/FUiIDateTimeChangeEventListener.h | 127 + inc/FUiIDragDropEventListener.h | 109 + inc/FUiIDragDropEventListenerF.h | 110 + inc/FUiIExpandableItemEventListener.h | 115 + inc/FUiIFastScrollEventListener.h | 108 + inc/FUiIFocusEventListener.h | 122 + inc/FUiIGroupedItemEventListener.h | 123 + inc/FUiIInputConnectionEventListener.h | 186 + inc/FUiIInputConnectionEventListenerF.h | 187 + inc/FUiIInputConnectionProvider.h | 111 + inc/FUiIItemEventListener.h | 105 + inc/FUiIKeyEventListener.h | 125 + inc/FUiIKeypadEventListener.h | 182 + inc/FUiILanguageEventListener.h | 111 + inc/FUiIOrientationEventListener.h | 137 + inc/FUiIPropagatedKeyEventListener.h | 153 + inc/FUiIPropagatedTouchEventListener.h | 174 + inc/FUiIScrollPanelEventListener.h | 146 + inc/FUiISlidableGroupedListEventListener.h | 131 + inc/FUiISlidableListEventListener.h | 131 + inc/FUiITextBlockEventListener.h | 126 + inc/FUiITextEventListener.h | 122 + inc/FUiITimeChangeEventListener.h | 126 + inc/FUiITouchCustomGestureEventListener.h | 123 + inc/FUiITouchEventListener.h | 194 + inc/FUiITouchFlickGestureEventListener.h | 106 + inc/FUiITouchGestureEventListener.h | 87 + inc/FUiITouchLongPressGestureEventListener.h | 107 + inc/FUiITouchModeChangedEventListener.h | 101 + inc/FUiITouchPanningGestureEventListener.h | 124 + inc/FUiITouchPinchGestureEventListener.h | 126 + inc/FUiITouchRotationGestureEventListener.h | 124 + inc/FUiITouchTapGestureEventListener.h | 107 + inc/FUiIUiLinkEventListener.h | 113 + inc/FUiIWindowEventListener.h | 114 + inc/FUiInputConnection.h | 474 + inc/FUiInputConnectionTypes.h | 96 + inc/FUiKeyEventInfo.h | 145 + inc/FUiKeyEventManager.h | 135 + inc/FUiKeyTypes.h | 258 + inc/FUiKeyboardMap.h | 310 + inc/FUiLayout.h | 101 + inc/FUiLayoutTypes.h | 163 + inc/FUiRelativeLayout.h | 459 + inc/FUiScenes.h | 66 + inc/FUiScenesBackwardSceneTransition.h | 123 + inc/FUiScenesForwardSceneTransition.h | 126 + inc/FUiScenesIFormFactory.h | 103 + inc/FUiScenesIPanelFactory.h | 103 + inc/FUiScenesISceneAnimationProvider.h | 110 + inc/FUiScenesISceneEventListener.h | 123 + inc/FUiScenesISceneManagerEventListener.h | 109 + inc/FUiScenesISceneTransitionPolicyProvider.h | 104 + inc/FUiScenesScene.h | 190 + inc/FUiScenesSceneManager.h | 524 + inc/FUiScenesSceneTransition.h | 267 + inc/FUiScenesTypes.h | 111 + inc/FUiSystemUtil.h | 181 + inc/FUiTouch.h | 386 + inc/FUiTouchEffect.h | 158 + inc/FUiTouchEffectTypes.h | 46 + inc/FUiTouchEventInfo.h | 193 + inc/FUiTouchEventManager.h | 103 + inc/FUiTouchFlickGestureDetector.h | 184 + inc/FUiTouchGestureDetector.h | 313 + inc/FUiTouchInfo.h | 110 + inc/FUiTouchLongPressGestureDetector.h | 231 + inc/FUiTouchPanningGestureDetector.h | 160 + inc/FUiTouchPinchGestureDetector.h | 173 + inc/FUiTouchRotationGestureDetector.h | 152 + inc/FUiTouchTapGestureDetector.h | 261 + inc/FUiUiConfiguration.h | 159 + inc/FUiUiConfigurationTypes.h | 3792 ++++++ inc/FUiVariant.h | 1005 ++ inc/FUiVerticalBoxLayout.h | 417 + inc/FUiWindow.h | 383 + inc/egl.h | 630 + inc/egl_macro.h | 57 + inc/eglext.h | 325 + inc/eglplatform.h | 180 + inc/gl.h | 1808 +++ inc/gl2.h | 1638 +++ inc/gl2ext.h | 656 + inc/gl2macro.h | 164 + inc/gl2platform.h | 28 + inc/glext.h | 899 ++ inc/glmacro.h | 190 + inc/glplatform.h | 27 + inc/khrplatform.h | 561 + osp-uifw.manifest | 9 + osp-uifw.pc.in | 13 + packaging/osp-uifw.spec | 160 + .../share/osp/bitmaps/480x800/00_arrow_left.png | Bin 0 -> 3040 bytes .../share/osp/bitmaps/480x800/00_arrow_right.png | Bin 0 -> 3025 bytes .../share/osp/bitmaps/480x800/00_badge_bg.#.png | Bin 0 -> 1435 bytes .../share/osp/bitmaps/480x800/00_button_01.#.png | Bin 0 -> 1170 bytes .../osp/bitmaps/480x800/00_button_01_bg.#.png | Bin 0 -> 1170 bytes .../osp/bitmaps/480x800/00_button_01_focus.#.png | Bin 0 -> 1236 bytes .../bitmaps/480x800/00_button_expand_closed.png | Bin 0 -> 1242 bytes .../bitmaps/480x800/00_button_expand_opened.png | Bin 0 -> 1215 bytes .../share/osp/bitmaps/480x800/00_button_left.png | Bin 0 -> 3040 bytes .../480x800/00_button_of_off_handler_focus.png | Bin 0 -> 1779 bytes .../480x800/00_button_on_off_handler_focus.png | Bin 0 -> 1779 bytes .../osp/bitmaps/480x800/00_button_radio_focus.png | Bin 0 -> 1783 bytes .../share/osp/bitmaps/480x800/00_button_reveal.png | Bin 0 -> 3004 bytes .../share/osp/bitmaps/480x800/00_button_right.png | Bin 0 -> 3088 bytes .../osp/bitmaps/480x800/00_category_button.#.png | Bin 0 -> 2939 bytes .../bitmaps/480x800/00_category_button_focus.#.png | Bin 0 -> 2971 bytes .../osp/bitmaps/480x800/00_category_panel_bg.#.png | Bin 0 -> 976 bytes .../bitmaps/480x800/00_category_panel_bg_ef.#.png | Bin 0 -> 1049 bytes .../share/osp/bitmaps/480x800/00_check_focus.png | Bin 0 -> 1244 bytes .../usr/share/osp/bitmaps/480x800/00_circle_bg.png | Bin 0 -> 1555 bytes .../osp/bitmaps/480x800/00_circle_button_focus.png | Bin 0 -> 1789 bytes .../bitmaps/480x800/00_color_picker_brightness.png | Bin 0 -> 3058 bytes .../480x800/00_color_picker_brightness_h.png | Bin 0 -> 1707 bytes .../osp/bitmaps/480x800/00_color_picker_color.png | Bin 0 -> 3153 bytes .../bitmaps/480x800/00_color_picker_color_h.png | Bin 0 -> 1340 bytes .../480x800/00_color_picker_custom_color.png | Bin 0 -> 2928 bytes .../480x800/00_color_picker_custom_color_h.png | Bin 0 -> 2959 bytes .../480x800/00_color_picker_handler_focus.png | Bin 0 -> 2850 bytes .../bitmaps/480x800/00_color_picker_saturation.png | Bin 0 -> 6180 bytes .../480x800/00_color_picker_saturation_h.png | Bin 0 -> 6095 bytes .../bitmaps/480x800/00_contacts_button_bg.#.png | Bin 0 -> 1125 bytes .../bitmaps/480x800/00_contacts_button_focus.#.png | Bin 0 -> 1114 bytes .../osp/bitmaps/480x800/00_date_picker_dot.png | Bin 0 -> 2839 bytes .../osp/bitmaps/480x800/00_edit_field_clear.png | Bin 0 -> 3156 bytes .../osp/bitmaps/480x800/00_edit_field_focus.#.png | Bin 0 -> 3029 bytes .../480x800/00_edit_field_line_round_bg_01.#.png | Bin 0 -> 3150 bytes .../480x800/00_edit_field_no_line_square_bg.#.png | Bin 0 -> 2855 bytes .../bitmaps/480x800/00_edit_field_round_bg.#.png | Bin 0 -> 3248 bytes .../osp/bitmaps/480x800/00_edit_group_bg.#.png | Bin 0 -> 1162 bytes .../bitmaps/480x800/00_edit_group_bg_bottom.#.png | Bin 0 -> 2909 bytes .../bitmaps/480x800/00_edit_group_bg_center.#.png | Bin 0 -> 2860 bytes .../osp/bitmaps/480x800/00_edit_group_bg_top.#.png | Bin 0 -> 2917 bytes .../480x800/00_effect_tab_text_dim_left.#.png | Bin 0 -> 2869 bytes .../480x800/00_effect_tab_text_dim_right.#.png | Bin 0 -> 2884 bytes .../480x800/00_effect_title_text_dim_left.#.png | Bin 0 -> 2894 bytes .../480x800/00_effect_title_text_dim_right.#.png | Bin 0 -> 2893 bytes .../bitmaps/480x800/00_fast_scroll_handler.#.png | Bin 0 -> 1618 bytes .../bitmaps/480x800/00_fast_scroll_handler_h.#.png | Bin 0 -> 1562 bytes .../bitmaps/480x800/00_fast_scroll_popup_bg.#.png | Bin 0 -> 2977 bytes .../480x800/00_fast_scroll_popup_bg_ef.#.png | Bin 0 -> 1535 bytes .../480x800/00_fast_scroll_rollover_bg.#.png | Bin 0 -> 2848 bytes .../480x800/00_fast_scroll_rollover_bg_focus.#.png | Bin 0 -> 2848 bytes .../usr/share/osp/bitmaps/480x800/00_focus.#.png | Bin 0 -> 2925 bytes .../osp/bitmaps/480x800/00_grid_select_check.png | Bin 0 -> 3421 bytes .../bitmaps/480x800/00_grid_select_check_bg.png | Bin 0 -> 3962 bytes .../480x800/00_grid_select_check_bg_press.png | Bin 0 -> 4244 bytes .../bitmaps/480x800/00_groupedlist_bg_focus.#.png | Bin 0 -> 3001 bytes .../bitmaps/480x800/00_groupedlist_bg_press.#.png | Bin 0 -> 3044 bytes .../480x800/00_groupedlist_bottom_bg_focus.#.png | Bin 0 -> 3135 bytes .../480x800/00_groupedlist_bottom_bg_press.#.png | Bin 0 -> 3023 bytes .../480x800/00_groupedlist_center_bg_focus.#.png | Bin 0 -> 3000 bytes .../480x800/00_groupedlist_center_bg_press.#.png | Bin 0 -> 2966 bytes .../480x800/00_groupedlist_top_bg_focus.#.png | Bin 0 -> 1091 bytes .../480x800/00_groupedlist_top_bg_press.#.png | Bin 0 -> 3010 bytes .../osp/bitmaps/480x800/00_icon_SIP_close.png | Bin 0 -> 3193 bytes .../usr/share/osp/bitmaps/480x800/00_icon_back.png | Bin 0 -> 3306 bytes .../share/osp/bitmaps/480x800/00_icon_focus.png | Bin 0 -> 1173 bytes .../usr/share/osp/bitmaps/480x800/00_icon_jump.png | Bin 0 -> 2991 bytes .../osp/bitmaps/480x800/00_icon_jump_left.png | Bin 0 -> 3004 bytes .../usr/share/osp/bitmaps/480x800/00_icon_more.png | Bin 0 -> 3025 bytes .../osp/bitmaps/480x800/00_indexlist_bg.#.png | Bin 0 -> 2846 bytes .../osp/bitmaps/480x800/00_indexlist_bg_ef.#.png | Bin 0 -> 2858 bytes .../osp/bitmaps/480x800/00_list_group_bg.#.png | Bin 0 -> 1162 bytes .../bitmaps/480x800/00_list_group_bg_bottom.#.png | Bin 0 -> 2909 bytes .../bitmaps/480x800/00_list_group_bg_center.#.png | Bin 0 -> 2860 bytes .../osp/bitmaps/480x800/00_list_group_bg_top.#.png | Bin 0 -> 2917 bytes ...0_list_group_bottom_cover_round_bg_normal.#.png | Bin 0 -> 2917 bytes ...0_list_group_center_cover_round_bg_normal.#.png | Bin 0 -> 2882 bytes .../bitmaps/480x800/00_list_group_press_bg.#.png | Bin 0 -> 1171 bytes .../480x800/00_list_group_press_bg_bottom.#.png | Bin 0 -> 2917 bytes .../480x800/00_list_group_press_bg_center.#.png | Bin 0 -> 2882 bytes .../480x800/00_list_group_press_bg_top.#.png | Bin 0 -> 2924 bytes ...0_list_group_single_cover_round_bg_normal.#.png | Bin 0 -> 1171 bytes .../00_list_group_top_cover_round_bg_normal.#.png | Bin 0 -> 2924 bytes .../osp/bitmaps/480x800/00_list_process_01.png | Bin 0 -> 1778 bytes .../osp/bitmaps/480x800/00_list_process_02.png | Bin 0 -> 1757 bytes .../osp/bitmaps/480x800/00_list_process_03.png | Bin 0 -> 1697 bytes .../osp/bitmaps/480x800/00_list_process_04.png | Bin 0 -> 1799 bytes .../osp/bitmaps/480x800/00_list_process_05.png | Bin 0 -> 1797 bytes .../osp/bitmaps/480x800/00_list_process_06.png | Bin 0 -> 1806 bytes .../osp/bitmaps/480x800/00_list_process_07.png | Bin 0 -> 1772 bytes .../osp/bitmaps/480x800/00_list_process_08.png | Bin 0 -> 1847 bytes .../osp/bitmaps/480x800/00_list_process_09.png | Bin 0 -> 1811 bytes .../osp/bitmaps/480x800/00_list_process_10.png | Bin 0 -> 1788 bytes .../osp/bitmaps/480x800/00_list_process_11.png | Bin 0 -> 1736 bytes .../osp/bitmaps/480x800/00_list_process_12.png | Bin 0 -> 1796 bytes .../osp/bitmaps/480x800/00_list_process_13.png | Bin 0 -> 1819 bytes .../osp/bitmaps/480x800/00_list_process_14.png | Bin 0 -> 1811 bytes .../osp/bitmaps/480x800/00_list_process_15.png | Bin 0 -> 1822 bytes .../osp/bitmaps/480x800/00_list_process_16.png | Bin 0 -> 1799 bytes .../osp/bitmaps/480x800/00_list_process_17.png | Bin 0 -> 1755 bytes .../osp/bitmaps/480x800/00_list_process_18.png | Bin 0 -> 1712 bytes .../osp/bitmaps/480x800/00_list_process_19.png | Bin 0 -> 1792 bytes .../osp/bitmaps/480x800/00_list_process_20.png | Bin 0 -> 1813 bytes .../osp/bitmaps/480x800/00_list_process_21.png | Bin 0 -> 1796 bytes .../osp/bitmaps/480x800/00_list_process_22.png | Bin 0 -> 1759 bytes .../osp/bitmaps/480x800/00_list_process_23.png | Bin 0 -> 1806 bytes .../osp/bitmaps/480x800/00_list_process_24.png | Bin 0 -> 1800 bytes .../osp/bitmaps/480x800/00_list_process_25.png | Bin 0 -> 1758 bytes .../osp/bitmaps/480x800/00_list_process_26.png | Bin 0 -> 1728 bytes .../osp/bitmaps/480x800/00_list_process_27.png | Bin 0 -> 1771 bytes .../osp/bitmaps/480x800/00_list_process_28.png | Bin 0 -> 1782 bytes .../osp/bitmaps/480x800/00_list_process_29.png | Bin 0 -> 1796 bytes .../osp/bitmaps/480x800/00_list_process_30.png | Bin 0 -> 1816 bytes .../00_option_panel_contextual_popup_arrow.png | Bin 0 -> 3022 bytes .../bitmaps/480x800/00_option_panel_handle_bg.png | Bin 0 -> 1224 bytes .../480x800/00_option_panel_handle_bg_press.png | Bin 0 -> 1210 bytes .../480x800/00_option_panel_handle_more.png | Bin 0 -> 3095 bytes .../480x800/00_option_panel_handle_more_press.png | Bin 0 -> 1232 bytes .../bitmaps/480x800/00_overscrolling_bottom.#.png | Bin 0 -> 2848 bytes .../480x800/00_overscrolling_bottom.#.png~HEAD | Bin 0 -> 2848 bytes ....#.png~f13742d6701484182d616a6f28f6c79fc2f86429 | Bin 0 -> 2848 bytes .../bitmaps/480x800/00_overscrolling_left.#.png | Bin 0 -> 2845 bytes .../480x800/00_overscrolling_left.#.png~HEAD | Bin 0 -> 2845 bytes ....#.png~f13742d6701484182d616a6f28f6c79fc2f86429 | 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 .../share/osp/bitmaps/480x800/00_panel_bg.#.png | Bin 0 -> 2848 bytes .../osp/bitmaps/480x800/00_panel_handle_arrow.png | Bin 0 -> 2970 bytes .../osp/bitmaps/480x800/00_panel_handle_bg.#.png | Bin 0 -> 1456 bytes .../bitmaps/480x800/00_panel_list_bg_press.#.png | Bin 0 -> 1029 bytes .../osp/bitmaps/480x800/00_picker_button.#.png | Bin 0 -> 1133 bytes .../bitmaps/480x800/00_picker_button_focus.#.png | Bin 0 -> 1142 bytes .../bitmaps/480x800/00_popup_bubble_02_bg.#.png | Bin 0 -> 1163 bytes .../osp/bitmaps/480x800/00_popup_bubble_bg.#.png | Bin 0 -> 1235 bytes .../480x800/00_popup_bubble_tail_bottom.png | Bin 0 -> 1182 bytes .../480x800/00_popup_bubble_tail_bottom_ef.png | Bin 0 -> 1631 bytes .../bitmaps/480x800/00_popup_bubble_tail_left.png | Bin 0 -> 1169 bytes .../480x800/00_popup_bubble_tail_left_ef.png | Bin 0 -> 1615 bytes .../bitmaps/480x800/00_popup_bubble_tail_right.png | Bin 0 -> 1207 bytes .../480x800/00_popup_bubble_tail_right_ef.png | Bin 0 -> 1611 bytes .../bitmaps/480x800/00_popup_bubble_tail_top.png | Bin 0 -> 1175 bytes .../480x800/00_popup_bubble_tail_top_ef.png | Bin 0 -> 1548 bytes .../bitmaps/480x800/00_popup_button_focus.#.png | Bin 0 -> 1183 bytes .../480x800/00_popup_button_normal_bg.#.png | Bin 0 -> 1183 bytes .../bitmaps/480x800/00_popup_dim_lighting_h.png | Bin 0 -> 23739 bytes .../bitmaps/480x800/00_popup_dim_lighting_v.png | Bin 0 -> 47119 bytes .../osp/bitmaps/480x800/00_progress_bar.#.png | Bin 0 -> 1151 bytes .../share/osp/bitmaps/480x800/00_progress_bg.#.png | Bin 0 -> 1194 bytes .../osp/bitmaps/480x800/00_quick_menu_bg.#.png | Bin 0 -> 2848 bytes .../osp/bitmaps/480x800/00_quick_menu_bg_ef.#.png | Bin 0 -> 2853 bytes .../osp/bitmaps/480x800/00_scroll_bar_h.#.png | Bin 0 -> 2940 bytes .../osp/bitmaps/480x800/00_scroll_bar_h_ef.#.png | Bin 0 -> 2974 bytes .../osp/bitmaps/480x800/00_scroll_bar_v.#.png | Bin 0 -> 2948 bytes .../osp/bitmaps/480x800/00_scroll_bar_v_ef.#.png | Bin 0 -> 2980 bytes .../share/osp/bitmaps/480x800/00_search_bg.#.png | Bin 0 -> 2846 bytes .../bitmaps/480x800/00_search_edit_field_bg.#.png | Bin 0 -> 1104 bytes .../480x800/00_search_edit_field_focus.#.png | Bin 0 -> 1274 bytes .../share/osp/bitmaps/480x800/00_search_icon.png | Bin 0 -> 1471 bytes .../share/osp/bitmaps/480x800/00_slider_handle.png | Bin 0 -> 3364 bytes .../osp/bitmaps/480x800/00_slider_handle_focus.png | Bin 0 -> 3546 bytes .../osp/bitmaps/480x800/00_slider_popup_bg.#.png | Bin 0 -> 3262 bytes .../osp/bitmaps/480x800/00_softkey_icon_add.png | Bin 0 -> 2970 bytes .../osp/bitmaps/480x800/00_softkey_icon_zoom.png | Bin 0 -> 3379 bytes .../osp/bitmaps/480x800/00_softkey_left_bg.png | Bin 0 -> 1155 bytes .../bitmaps/480x800/00_softkey_left_text_bg.png | Bin 0 -> 1174 bytes .../osp/bitmaps/480x800/00_softkey_right_bg.png | Bin 0 -> 1150 bytes .../bitmaps/480x800/00_softkey_right_text_bg.png | Bin 0 -> 1168 bytes .../osp/bitmaps/480x800/00_split_handler_bg.#.png | Bin 0 -> 2828 bytes .../osp/bitmaps/480x800/00_system_control_bg.#.png | Bin 0 -> 3141 bytes .../usr/share/osp/bitmaps/480x800/00_tab_bg.#.png | Bin 0 -> 976 bytes .../share/osp/bitmaps/480x800/00_tab_focus.#.png | Bin 0 -> 2855 bytes .../osp/bitmaps/480x800/00_tab_press_bg.#.png | Bin 0 -> 2879 bytes .../osp/bitmaps/480x800/00_tab_select_bar.#.png | Bin 0 -> 2814 bytes .../osp/bitmaps/480x800/00_thumbs_bg_focus.#.png | Bin 0 -> 2874 bytes .../osp/bitmaps/480x800/00_thumbs_line_bg.#.png | Bin 0 -> 2871 bytes .../bitmaps/480x800/00_time_picker_keypad_bg.#.png | Bin 0 -> 2882 bytes .../480x800/00_time_picker_keypad_button_bg.#.png | Bin 0 -> 1039 bytes .../00_time_picker_keypad_button_bg_ef.#.png | Bin 0 -> 3018 bytes .../bitmaps/480x800/00_time_picker_number_bg.#.png | Bin 0 -> 2848 bytes .../osp/bitmaps/480x800/00_time_picker_tail.png | Bin 0 -> 2927 bytes .../osp/bitmaps/480x800/00_time_picker_tail_01.png | Bin 0 -> 2937 bytes .../share/osp/bitmaps/480x800/00_title_bg.#.png | Bin 0 -> 2848 bytes .../share/osp/bitmaps/480x800/00_toolbar_bg.#.png | Bin 0 -> 2848 bytes .../osp/bitmaps/480x800/00_toolbar_button.#.png | Bin 0 -> 3632 bytes .../osp/bitmaps/480x800/00_toolbar_button_bg.#.png | Bin 0 -> 1801 bytes .../480x800/00_toolbar_button_ef_focus.#.png | Bin 0 -> 1903 bytes .../bitmaps/480x800/00_toolbar_button_focus.#.png | Bin 0 -> 2094 bytes .../bitmaps/480x800/00_toolbar_button_press.#.png | Bin 0 -> 3984 bytes .../osp/bitmaps/480x800/00_toolbar_press.#.png | Bin 0 -> 2920 bytes .../usr/share/osp/bitmaps/480x800/TTS_focus.#.png | Bin 0 -> 3160 bytes .../share/osp/bitmaps/480x800/TTS_popup_bg.#.png | Bin 0 -> 3659 bytes .../osp/bitmaps/480x800/black/00_badge_bg_ef.#.png | Bin 0 -> 1909 bytes .../480x800/black/00_button_01_dim_ef.#.png | Bin 0 -> 1309 bytes .../bitmaps/480x800/black/00_button_01_ef.#.png | Bin 0 -> 1337 bytes .../480x800/black/00_button_01_press_ef.#.png | Bin 0 -> 1159 bytes .../480x800/black/00_button_expand_closed_ef.png | Bin 0 -> 1452 bytes .../480x800/black/00_button_expand_opened_ef.png | Bin 0 -> 1431 bytes .../bitmaps/480x800/black/00_button_left_ef.png | Bin 0 -> 3161 bytes .../osp/bitmaps/480x800/black/00_button_off.png | Bin 0 -> 5501 bytes .../bitmaps/480x800/black/00_button_off_dim.png | Bin 0 -> 5439 bytes .../480x800/black/00_button_off_handler.png | Bin 0 -> 3674 bytes .../480x800/black/00_button_off_handler_dim.png | Bin 0 -> 3617 bytes .../osp/bitmaps/480x800/black/00_button_on.png | Bin 0 -> 5630 bytes .../osp/bitmaps/480x800/black/00_button_on_dim.png | Bin 0 -> 5626 bytes .../bitmaps/480x800/black/00_button_on_handler.png | Bin 0 -> 3265 bytes .../480x800/black/00_button_on_handler_dim.png | Bin 0 -> 3201 bytes .../bitmaps/480x800/black/00_button_on_off_bg.png | Bin 0 -> 3014 bytes .../480x800/black/00_button_on_off_bg_dim.png | Bin 0 -> 2942 bytes .../480x800/black/00_button_on_off_handler.png | Bin 0 -> 4731 bytes .../480x800/black/00_button_on_off_handler_dim.png | Bin 0 -> 4599 bytes .../480x800/black/00_button_radio_Activated.png | Bin 0 -> 3445 bytes .../black/00_button_radio_Activated_dim.png | Bin 0 -> 3416 bytes .../480x800/black/00_button_radio_activated.png | Bin 0 -> 3050 bytes .../black/00_button_radio_activated_dim.png | Bin 0 -> 1305 bytes .../black/00_button_radio_activated_press.png | Bin 0 -> 1331 bytes .../bitmaps/480x800/black/00_button_radio_bg.png | Bin 0 -> 3036 bytes .../480x800/black/00_button_radio_dim_bg.png | Bin 0 -> 2889 bytes .../480x800/black/00_button_radio_normal1.png | Bin 0 -> 3987 bytes .../480x800/black/00_button_radio_normal2.png | Bin 0 -> 3526 bytes .../480x800/black/00_button_radio_press.png | Bin 0 -> 3474 bytes .../480x800/black/00_button_radio_press_bg.png | Bin 0 -> 3012 bytes .../bitmaps/480x800/black/00_button_right_ef.png | Bin 0 -> 1225 bytes .../bitmaps/480x800/black/00_check_Activated.png | Bin 0 -> 3587 bytes .../480x800/black/00_check_Activated_dim.png | Bin 0 -> 3536 bytes .../bitmaps/480x800/black/00_check_activated.png | Bin 0 -> 1278 bytes .../480x800/black/00_check_activated_dim.png | Bin 0 -> 1282 bytes .../480x800/black/00_check_activated_press.png | Bin 0 -> 1288 bytes .../osp/bitmaps/480x800/black/00_check_bg.png | Bin 0 -> 1422 bytes .../osp/bitmaps/480x800/black/00_check_dim.png | Bin 0 -> 4542 bytes .../osp/bitmaps/480x800/black/00_check_dim_bg.png | Bin 0 -> 1419 bytes .../osp/bitmaps/480x800/black/00_check_press.png | Bin 0 -> 3474 bytes .../bitmaps/480x800/black/00_check_press_bg.png | Bin 0 -> 1465 bytes .../osp/bitmaps/480x800/black/00_circle_bg_ef.png | Bin 0 -> 2157 bytes .../bitmaps/480x800/black/00_circle_bg_ef_dim.png | Bin 0 -> 2043 bytes .../480x800/black/00_circle_bg_ef_press.png | Bin 0 -> 1298 bytes .../480x800/black/00_color_picker_handler.png | Bin 0 -> 3005 bytes .../480x800/black/00_contacts_button_bg.#.png | Bin 0 -> 1114 bytes .../black/00_contacts_button_bg_dim_ef.#.png | Bin 0 -> 1182 bytes .../480x800/black/00_contacts_button_bg_ef.#.png | Bin 0 -> 1225 bytes .../black/00_contacts_button_bg_press_ef.#.png | Bin 0 -> 1213 bytes .../480x800/black/00_contacts_button_focus.#.png | Bin 0 -> 1145 bytes .../black/00_contacts_button_focus_ef.#.png | Bin 0 -> 1115 bytes .../480x800/black/00_edit_group_bg_bottom_ef.#.png | Bin 0 -> 3052 bytes .../480x800/black/00_edit_group_bg_center_ef.#.png | Bin 0 -> 2954 bytes .../480x800/black/00_edit_group_bg_ef.#.png | Bin 0 -> 3104 bytes .../480x800/black/00_edit_group_bg_top_ef.#.png | Bin 0 -> 3076 bytes .../480x800/black/00_effect_footer_bounce_left.png | Bin 0 -> 4479 bytes .../black/00_effect_footer_bounce_left_h.png | Bin 0 -> 4256 bytes .../black/00_effect_footer_bounce_right.png | Bin 0 -> 4425 bytes .../black/00_effect_footer_bounce_right_h.png | Bin 0 -> 4244 bytes .../480x800/black/00_effect_tab_bounce_left.png | Bin 0 -> 4467 bytes .../480x800/black/00_effect_tab_bounce_left_02.png | Bin 0 -> 4975 bytes .../480x800/black/00_effect_tab_bounce_left_h.png | Bin 0 -> 4225 bytes .../480x800/black/00_effect_tab_bounce_right.png | Bin 0 -> 4418 bytes .../black/00_effect_tab_bounce_right_02.png | Bin 0 -> 4976 bytes .../480x800/black/00_effect_tab_bounce_right_h.png | Bin 0 -> 4174 bytes .../black/00_effect_title_tab_bounce_left.png | Bin 0 -> 3952 bytes .../black/00_effect_title_tab_bounce_right.png | Bin 0 -> 3946 bytes .../480x800/black/00_expandable_bg_bottom_ef.#.png | Bin 0 -> 3118 bytes .../480x800/black/00_expandable_bg_center_ef.#.png | Bin 0 -> 2908 bytes .../480x800/black/00_expandable_bg_top_ef.#.png | Bin 0 -> 3106 bytes .../480x800/black/00_fast_scroll_handler.#.png | Bin 0 -> 3452 bytes .../480x800/black/00_fast_scroll_handler_h.#.png | Bin 0 -> 3359 bytes .../480x800/black/00_fast_scroll_popup_bg.#.png | Bin 0 -> 2977 bytes .../480x800/black/00_fast_scroll_popup_bg_ef.#.png | Bin 0 -> 1535 bytes .../00_fast_scroll_rollover_bg_line_focus.#.png | Bin 0 -> 2855 bytes .../share/osp/bitmaps/480x800/black/00_focus.#.png | Bin 0 -> 2925 bytes .../bitmaps/480x800/black/00_header_process_01.png | Bin 0 -> 1442 bytes .../bitmaps/480x800/black/00_header_process_02.png | Bin 0 -> 1433 bytes .../bitmaps/480x800/black/00_header_process_03.png | Bin 0 -> 1402 bytes .../bitmaps/480x800/black/00_header_process_04.png | Bin 0 -> 1421 bytes .../bitmaps/480x800/black/00_header_process_05.png | Bin 0 -> 1441 bytes .../bitmaps/480x800/black/00_header_process_06.png | Bin 0 -> 1442 bytes .../bitmaps/480x800/black/00_header_process_07.png | Bin 0 -> 1427 bytes .../bitmaps/480x800/black/00_header_process_08.png | Bin 0 -> 1447 bytes .../bitmaps/480x800/black/00_header_process_09.png | Bin 0 -> 1447 bytes .../bitmaps/480x800/black/00_header_process_10.png | Bin 0 -> 1427 bytes .../bitmaps/480x800/black/00_header_process_11.png | Bin 0 -> 1421 bytes .../bitmaps/480x800/black/00_header_process_12.png | Bin 0 -> 1431 bytes .../bitmaps/480x800/black/00_header_process_13.png | Bin 0 -> 1443 bytes .../bitmaps/480x800/black/00_header_process_14.png | Bin 0 -> 1436 bytes .../bitmaps/480x800/black/00_header_process_15.png | Bin 0 -> 1445 bytes .../bitmaps/480x800/black/00_header_process_16.png | Bin 0 -> 1430 bytes .../bitmaps/480x800/black/00_header_process_17.png | Bin 0 -> 1419 bytes .../bitmaps/480x800/black/00_header_process_18.png | Bin 0 -> 1400 bytes .../bitmaps/480x800/black/00_header_process_19.png | Bin 0 -> 1419 bytes .../bitmaps/480x800/black/00_header_process_20.png | Bin 0 -> 1444 bytes .../bitmaps/480x800/black/00_header_process_21.png | Bin 0 -> 1425 bytes .../bitmaps/480x800/black/00_header_process_22.png | Bin 0 -> 1420 bytes .../bitmaps/480x800/black/00_header_process_23.png | Bin 0 -> 1435 bytes .../bitmaps/480x800/black/00_header_process_24.png | Bin 0 -> 1434 bytes .../bitmaps/480x800/black/00_header_process_25.png | Bin 0 -> 1416 bytes .../bitmaps/480x800/black/00_header_process_26.png | Bin 0 -> 1403 bytes .../bitmaps/480x800/black/00_header_process_27.png | Bin 0 -> 1419 bytes .../bitmaps/480x800/black/00_header_process_28.png | Bin 0 -> 1429 bytes .../bitmaps/480x800/black/00_header_process_29.png | Bin 0 -> 1440 bytes .../bitmaps/480x800/black/00_header_process_30.png | Bin 0 -> 1446 bytes .../osp/bitmaps/480x800/black/00_icon_Back_ef.png | Bin 0 -> 1984 bytes .../bitmaps/480x800/black/00_icon_Back_ef_02.png | Bin 0 -> 1945 bytes .../480x800/black/00_icon_Back_trans_ef.png | Bin 0 -> 1491 bytes .../bitmaps/480x800/black/00_icon_SIP_close_ef.png | Bin 0 -> 1466 bytes .../osp/bitmaps/480x800/black/00_icon_back_ef.png | Bin 0 -> 1502 bytes .../480x800/black/00_icon_back_trans_ef.png | Bin 0 -> 1491 bytes .../osp/bitmaps/480x800/black/00_icon_jump.png | Bin 0 -> 3132 bytes .../osp/bitmaps/480x800/black/00_icon_jump_ef.png | Bin 0 -> 1382 bytes .../bitmaps/480x800/black/00_icon_jump_left.png | Bin 0 -> 3146 bytes .../bitmaps/480x800/black/00_icon_jump_left_ef.png | Bin 0 -> 1366 bytes .../osp/bitmaps/480x800/black/00_icon_more_ef.png | Bin 0 -> 1145 bytes .../bitmaps/480x800/black/00_indexlist_bg_ef.#.png | Bin 0 -> 2878 bytes .../480x800/black/00_list_group_bg_bottom_ef.#.png | Bin 0 -> 3083 bytes .../480x800/black/00_list_group_bg_center_ef.#.png | Bin 0 -> 2882 bytes .../480x800/black/00_list_group_bg_ef.#.png | Bin 0 -> 1390 bytes .../480x800/black/00_list_group_bg_top_ef.#.png | Bin 0 -> 3096 bytes .../bitmaps/480x800/black/00_list_process_01.png | Bin 0 -> 1718 bytes .../bitmaps/480x800/black/00_list_process_02.png | Bin 0 -> 1706 bytes .../bitmaps/480x800/black/00_list_process_03.png | Bin 0 -> 1661 bytes .../bitmaps/480x800/black/00_list_process_04.png | Bin 0 -> 1740 bytes .../bitmaps/480x800/black/00_list_process_05.png | Bin 0 -> 1730 bytes .../bitmaps/480x800/black/00_list_process_06.png | Bin 0 -> 1733 bytes .../bitmaps/480x800/black/00_list_process_07.png | Bin 0 -> 1720 bytes .../bitmaps/480x800/black/00_list_process_08.png | Bin 0 -> 1789 bytes .../bitmaps/480x800/black/00_list_process_09.png | Bin 0 -> 1753 bytes .../bitmaps/480x800/black/00_list_process_10.png | Bin 0 -> 1737 bytes .../bitmaps/480x800/black/00_list_process_11.png | Bin 0 -> 1703 bytes .../bitmaps/480x800/black/00_list_process_12.png | Bin 0 -> 1746 bytes .../bitmaps/480x800/black/00_list_process_13.png | Bin 0 -> 1753 bytes .../bitmaps/480x800/black/00_list_process_14.png | Bin 0 -> 1756 bytes .../bitmaps/480x800/black/00_list_process_15.png | Bin 0 -> 1774 bytes .../bitmaps/480x800/black/00_list_process_16.png | Bin 0 -> 1724 bytes .../bitmaps/480x800/black/00_list_process_17.png | Bin 0 -> 1704 bytes .../bitmaps/480x800/black/00_list_process_18.png | Bin 0 -> 1675 bytes .../bitmaps/480x800/black/00_list_process_19.png | Bin 0 -> 1737 bytes .../bitmaps/480x800/black/00_list_process_20.png | Bin 0 -> 1736 bytes .../bitmaps/480x800/black/00_list_process_21.png | Bin 0 -> 1731 bytes .../bitmaps/480x800/black/00_list_process_22.png | Bin 0 -> 1720 bytes .../bitmaps/480x800/black/00_list_process_23.png | Bin 0 -> 1769 bytes .../bitmaps/480x800/black/00_list_process_24.png | Bin 0 -> 1749 bytes .../bitmaps/480x800/black/00_list_process_25.png | Bin 0 -> 1725 bytes .../bitmaps/480x800/black/00_list_process_26.png | Bin 0 -> 1714 bytes .../bitmaps/480x800/black/00_list_process_27.png | Bin 0 -> 1733 bytes .../bitmaps/480x800/black/00_list_process_28.png | Bin 0 -> 1751 bytes .../bitmaps/480x800/black/00_list_process_29.png | Bin 0 -> 1741 bytes .../bitmaps/480x800/black/00_list_process_30.png | Bin 0 -> 1762 bytes .../480x800/black/00_more_popup_press.#.png | Bin 0 -> 2934 bytes .../480x800/black/00_option_panel_handle_bg_ef.png | Bin 0 -> 3327 bytes .../black/00_option_panel_handle_bg_ef_press.png | Bin 0 -> 1427 bytes .../480x800/black/00_panel_handle_bg_ef.#.png | Bin 0 -> 4140 bytes .../black/00_panel_handle_bg_ef_press.#.png | Bin 0 -> 2188 bytes .../480x800/black/00_panel_list_bg_ef_press.#.png | Bin 0 -> 1197 bytes .../480x800/black/00_picker_button_dim_ef.#.png | Bin 0 -> 3286 bytes .../480x800/black/00_picker_button_ef.#.png | Bin 0 -> 3286 bytes .../480x800/black/00_picker_button_press_ef.#.png | Bin 0 -> 3107 bytes .../osp/bitmaps/480x800/black/00_popup_bg.#.png | Bin 0 -> 1263 bytes .../osp/bitmaps/480x800/black/00_popup_bg_ef.#.png | Bin 0 -> 2038 bytes .../bitmaps/480x800/black/00_popup_bottom_bg.#.png | Bin 0 -> 1132 bytes .../bitmaps/480x800/black/00_popup_bottom_ef.#.png | Bin 0 -> 2895 bytes .../480x800/black/00_popup_bubble_02_ef.#.png | Bin 0 -> 1546 bytes .../bitmaps/480x800/black/00_popup_bubble_bg.#.png | Bin 0 -> 1260 bytes .../480x800/black/00_popup_bubble_bg_ef.#.png | Bin 0 -> 1883 bytes .../480x800/black/00_popup_bubble_tail_bottom.png | Bin 0 -> 1182 bytes .../black/00_popup_bubble_tail_bottom_ef.png | Bin 0 -> 1612 bytes .../480x800/black/00_popup_bubble_tail_left.png | Bin 0 -> 1169 bytes .../480x800/black/00_popup_bubble_tail_left_ef.png | Bin 0 -> 1429 bytes .../480x800/black/00_popup_bubble_tail_right.png | Bin 0 -> 1207 bytes .../black/00_popup_bubble_tail_right_ef.png | Bin 0 -> 1462 bytes .../480x800/black/00_popup_bubble_tail_top.png | Bin 0 -> 1175 bytes .../480x800/black/00_popup_bubble_tail_top_ef.png | Bin 0 -> 1383 bytes .../480x800/black/00_popup_button_dim_ef.#.png | Bin 0 -> 1482 bytes .../480x800/black/00_popup_button_normal_ef.#.png | Bin 0 -> 1532 bytes .../480x800/black/00_popup_button_press_ef.#.png | Bin 0 -> 1175 bytes .../bitmaps/480x800/black/00_popup_scroll.#.png | Bin 0 -> 2921 bytes .../bitmaps/480x800/black/00_popup_title_bg.#.png | Bin 0 -> 1152 bytes .../bitmaps/480x800/black/00_popup_title_ef.#.png | Bin 0 -> 1101 bytes .../bitmaps/480x800/black/00_progress_bar_ef.#.png | Bin 0 -> 1251 bytes .../bitmaps/480x800/black/00_progress_ef_bg.#.png | Bin 0 -> 1286 bytes .../bitmaps/480x800/black/00_scroll_bar_h.#.png | Bin 0 -> 2940 bytes .../bitmaps/480x800/black/00_scroll_bar_h_ef.#.png | Bin 0 -> 2974 bytes .../480x800/black/00_scroll_bar_handler_h.png | Bin 0 -> 2834 bytes .../480x800/black/00_scroll_bar_handler_v.png | Bin 0 -> 2831 bytes .../bitmaps/480x800/black/00_scroll_bar_v.#.png | Bin 0 -> 2948 bytes .../bitmaps/480x800/black/00_scroll_bar_v_ef.#.png | Bin 0 -> 2980 bytes .../bitmaps/480x800/black/00_search_bg_ef.#.png | Bin 0 -> 2850 bytes .../480x800/black/00_search_edit_field_bg_ef.#.png | Bin 0 -> 3383 bytes .../bitmaps/480x800/black/00_search_icon_ef.png | Bin 0 -> 1467 bytes .../bitmaps/480x800/black/00_slider_handle_ef.png | Bin 0 -> 4746 bytes .../480x800/black/00_slider_handle_ef_dim.png | Bin 0 -> 4640 bytes .../480x800/black/00_slider_handle_ef_press.png | Bin 0 -> 3246 bytes .../480x800/black/00_softkey_left_bg_ef.png | Bin 0 -> 3139 bytes .../480x800/black/00_softkey_left_bg_ef_press.png | Bin 0 -> 1393 bytes .../480x800/black/00_softkey_left_text_bg_ef.png | Bin 0 -> 3152 bytes .../black/00_softkey_left_text_bg_ef_press.png | Bin 0 -> 1515 bytes .../480x800/black/00_softkey_right_bg_ef.png | Bin 0 -> 3235 bytes .../480x800/black/00_softkey_right_bg_ef_press.png | Bin 0 -> 1349 bytes .../480x800/black/00_softkey_right_text_bg_ef.png | Bin 0 -> 3301 bytes .../black/00_softkey_right_text_bg_ef_press.png | Bin 0 -> 1483 bytes .../480x800/black/00_split_handler_bg_ef_h.#.png | Bin 0 -> 2859 bytes .../480x800/black/00_split_handler_bg_ef_v.#.png | Bin 0 -> 2863 bytes .../bitmaps/480x800/black/00_split_handler_h.png | Bin 0 -> 2812 bytes .../bitmaps/480x800/black/00_split_handler_v.png | Bin 0 -> 2828 bytes .../bitmaps/480x800/black/00_sub_title_ef.#.png | Bin 0 -> 2863 bytes .../bitmaps/480x800/black/00_tab_press_ef.#.png | Bin 0 -> 2855 bytes .../osp/bitmaps/480x800/black/00_title_bg_ef.#.png | Bin 0 -> 2851 bytes .../bitmaps/480x800/black/00_title_press_ef.#.png | Bin 0 -> 2855 bytes .../bitmaps/480x800/black/00_toolbar_bg_ef.#.png | Bin 0 -> 2842 bytes .../480x800/black/00_toolbar_bg_shadow.#.png | Bin 0 -> 2843 bytes .../bitmaps/480x800/black/00_toolbar_button.#.png | Bin 0 -> 3632 bytes .../black/00_toolbar_button_bg_dim_ef.#.png | Bin 0 -> 2617 bytes .../480x800/black/00_toolbar_button_bg_ef.#.png | Bin 0 -> 2695 bytes .../480x800/black/00_toolbar_button_ef.#.png | Bin 0 -> 5946 bytes .../480x800/black/00_toolbar_button_ef_press.#.png | Bin 0 -> 5184 bytes .../480x800/black/00_toolbar_button_press.#.png | Bin 0 -> 3984 bytes .../480x800/black/00_toolbar_button_press_ef.#.png | Bin 0 -> 3025 bytes .../480x800/black/00_toolbar_ef_press.#.png | Bin 0 -> 3094 bytes .../480x800/black/00_toolbar_press_ef.#.png | Bin 0 -> 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 .../bitmaps/480x800/copy&paste_Handler_center.png | Bin 0 -> 4292 bytes .../480x800/copy&paste_Handler_center_reverse.png | Bin 0 -> 4335 bytes .../bitmaps/480x800/copy&paste_Handler_left.png | Bin 0 -> 3881 bytes .../bitmaps/480x800/copy&paste_Handler_left_01.png | Bin 0 -> 3820 bytes .../480x800/copy&paste_Handler_left_reverse.png | Bin 0 -> 3813 bytes .../bitmaps/480x800/copy&paste_Handler_right.png | Bin 0 -> 3907 bytes .../osp/bitmaps/480x800/copy&paste_Magnifier.#.png | Bin 0 -> 5786 bytes .../480x800/copy&paste_Magnifier_mask.#.png | Bin 0 -> 3281 bytes .../osp/bitmaps/480x800/copy&paste_icon_search.png | Bin 0 -> 3208 bytes .../bitmaps/480x800/default/00_badge_bg_ef.#.png | Bin 0 -> 1909 bytes .../480x800/default/00_button_01_dim_ef.#.png | Bin 0 -> 1309 bytes .../bitmaps/480x800/default/00_button_01_ef.#.png | Bin 0 -> 1337 bytes .../480x800/default/00_button_01_press_ef.#.png | Bin 0 -> 1159 bytes .../480x800/default/00_button_expand_closed_ef.png | Bin 0 -> 1452 bytes .../480x800/default/00_button_expand_opened_ef.png | Bin 0 -> 1431 bytes .../bitmaps/480x800/default/00_button_left_ef.png | Bin 0 -> 3161 bytes .../osp/bitmaps/480x800/default/00_button_off.png | Bin 0 -> 5501 bytes .../bitmaps/480x800/default/00_button_off_dim.png | Bin 0 -> 5439 bytes .../480x800/default/00_button_off_handler.png | Bin 0 -> 3674 bytes .../480x800/default/00_button_off_handler_dim.png | Bin 0 -> 3617 bytes .../osp/bitmaps/480x800/default/00_button_on.png | Bin 0 -> 5630 bytes .../bitmaps/480x800/default/00_button_on_dim.png | Bin 0 -> 5626 bytes .../480x800/default/00_button_on_handler.png | Bin 0 -> 3265 bytes .../480x800/default/00_button_on_handler_dim.png | Bin 0 -> 3201 bytes .../480x800/default/00_button_on_off_bg.png | Bin 0 -> 3014 bytes .../480x800/default/00_button_on_off_bg_dim.png | Bin 0 -> 2942 bytes .../480x800/default/00_button_on_off_handler.png | Bin 0 -> 4731 bytes .../default/00_button_on_off_handler_dim.png | Bin 0 -> 4599 bytes .../480x800/default/00_button_radio_Activated.png | Bin 0 -> 3445 bytes .../default/00_button_radio_Activated_dim.png | Bin 0 -> 3416 bytes .../480x800/default/00_button_radio_activated.png | Bin 0 -> 3050 bytes .../default/00_button_radio_activated_dim.png | Bin 0 -> 1305 bytes .../default/00_button_radio_activated_press.png | Bin 0 -> 1331 bytes .../bitmaps/480x800/default/00_button_radio_bg.png | Bin 0 -> 3036 bytes .../480x800/default/00_button_radio_dim_bg.png | Bin 0 -> 2889 bytes .../480x800/default/00_button_radio_normal1.png | Bin 0 -> 3987 bytes .../480x800/default/00_button_radio_normal2.png | Bin 0 -> 3526 bytes .../480x800/default/00_button_radio_press.png | Bin 0 -> 3474 bytes .../480x800/default/00_button_radio_press_bg.png | Bin 0 -> 3012 bytes .../bitmaps/480x800/default/00_button_right_ef.png | Bin 0 -> 1225 bytes .../bitmaps/480x800/default/00_check_Activated.png | Bin 0 -> 3587 bytes .../480x800/default/00_check_Activated_dim.png | Bin 0 -> 3536 bytes .../bitmaps/480x800/default/00_check_activated.png | Bin 0 -> 1278 bytes .../480x800/default/00_check_activated_dim.png | Bin 0 -> 1282 bytes .../480x800/default/00_check_activated_press.png | Bin 0 -> 1288 bytes .../osp/bitmaps/480x800/default/00_check_bg.png | Bin 0 -> 1422 bytes .../osp/bitmaps/480x800/default/00_check_dim.png | Bin 0 -> 4542 bytes .../bitmaps/480x800/default/00_check_dim_bg.png | Bin 0 -> 1419 bytes .../osp/bitmaps/480x800/default/00_check_press.png | Bin 0 -> 3474 bytes .../bitmaps/480x800/default/00_check_press_bg.png | Bin 0 -> 1465 bytes .../bitmaps/480x800/default/00_circle_bg_ef.png | Bin 0 -> 2157 bytes .../480x800/default/00_circle_bg_ef_dim.png | Bin 0 -> 2043 bytes .../480x800/default/00_circle_bg_ef_press.png | Bin 0 -> 1298 bytes .../480x800/default/00_color_picker_handler.png | Bin 0 -> 3005 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 0 -> 1225 bytes .../default/00_contacts_button_bg_press_ef.#.png | Bin 0 -> 1213 bytes .../480x800/default/00_contacts_button_focus.#.png | Bin 0 -> 1145 bytes .../default/00_contacts_button_focus_ef.#.png | Bin 0 -> 1115 bytes .../default/00_edit_group_bg_bottom_ef.#.png | Bin 0 -> 3052 bytes .../default/00_edit_group_bg_center_ef.#.png | Bin 0 -> 2954 bytes .../480x800/default/00_edit_group_bg_ef.#.png | Bin 0 -> 3104 bytes .../480x800/default/00_edit_group_bg_top_ef.#.png | Bin 0 -> 3076 bytes .../default/00_effect_footer_bounce_left.png | Bin 0 -> 4479 bytes .../default/00_effect_footer_bounce_left_h.png | Bin 0 -> 4256 bytes .../default/00_effect_footer_bounce_right.png | Bin 0 -> 4425 bytes .../default/00_effect_footer_bounce_right_h.png | Bin 0 -> 4244 bytes .../480x800/default/00_effect_tab_bounce_left.png | Bin 0 -> 4467 bytes .../default/00_effect_tab_bounce_left_02.png | Bin 0 -> 4975 bytes .../default/00_effect_tab_bounce_left_h.png | Bin 0 -> 4225 bytes .../480x800/default/00_effect_tab_bounce_right.png | Bin 0 -> 4418 bytes .../default/00_effect_tab_bounce_right_02.png | Bin 0 -> 4976 bytes .../default/00_effect_tab_bounce_right_h.png | Bin 0 -> 4174 bytes .../default/00_effect_title_tab_bounce_left.png | Bin 0 -> 3952 bytes .../default/00_effect_title_tab_bounce_right.png | Bin 0 -> 3946 bytes .../default/00_expandable_bg_bottom_ef.#.png | Bin 0 -> 3118 bytes .../default/00_expandable_bg_center_ef.#.png | Bin 0 -> 2908 bytes .../480x800/default/00_expandable_bg_top_ef.#.png | Bin 0 -> 3106 bytes .../480x800/default/00_fast_scroll_handler.#.png | Bin 0 -> 3452 bytes .../480x800/default/00_fast_scroll_handler_h.#.png | Bin 0 -> 3359 bytes .../480x800/default/00_fast_scroll_popup_bg.#.png | Bin 0 -> 2977 bytes .../default/00_fast_scroll_popup_bg_ef.#.png | Bin 0 -> 1535 bytes .../00_fast_scroll_rollover_bg_line_focus.#.png | Bin 0 -> 2855 bytes .../osp/bitmaps/480x800/default/00_focus.#.png | Bin 0 -> 2925 bytes .../480x800/default/00_header_process_01.png | Bin 0 -> 1442 bytes .../480x800/default/00_header_process_02.png | Bin 0 -> 1433 bytes .../480x800/default/00_header_process_03.png | Bin 0 -> 1402 bytes .../480x800/default/00_header_process_04.png | Bin 0 -> 1421 bytes .../480x800/default/00_header_process_05.png | Bin 0 -> 1441 bytes .../480x800/default/00_header_process_06.png | Bin 0 -> 1442 bytes .../480x800/default/00_header_process_07.png | Bin 0 -> 1427 bytes .../480x800/default/00_header_process_08.png | Bin 0 -> 1447 bytes .../480x800/default/00_header_process_09.png | Bin 0 -> 1447 bytes .../480x800/default/00_header_process_10.png | Bin 0 -> 1427 bytes .../480x800/default/00_header_process_11.png | Bin 0 -> 1421 bytes .../480x800/default/00_header_process_12.png | Bin 0 -> 1431 bytes .../480x800/default/00_header_process_13.png | Bin 0 -> 1443 bytes .../480x800/default/00_header_process_14.png | Bin 0 -> 1436 bytes .../480x800/default/00_header_process_15.png | Bin 0 -> 1445 bytes .../480x800/default/00_header_process_16.png | Bin 0 -> 1430 bytes .../480x800/default/00_header_process_17.png | Bin 0 -> 1419 bytes .../480x800/default/00_header_process_18.png | Bin 0 -> 1400 bytes .../480x800/default/00_header_process_19.png | Bin 0 -> 1419 bytes .../480x800/default/00_header_process_20.png | Bin 0 -> 1444 bytes .../480x800/default/00_header_process_21.png | Bin 0 -> 1425 bytes .../480x800/default/00_header_process_22.png | Bin 0 -> 1420 bytes .../480x800/default/00_header_process_23.png | Bin 0 -> 1435 bytes .../480x800/default/00_header_process_24.png | Bin 0 -> 1434 bytes .../480x800/default/00_header_process_25.png | Bin 0 -> 1416 bytes .../480x800/default/00_header_process_26.png | Bin 0 -> 1403 bytes .../480x800/default/00_header_process_27.png | Bin 0 -> 1419 bytes .../480x800/default/00_header_process_28.png | Bin 0 -> 1429 bytes .../480x800/default/00_header_process_29.png | Bin 0 -> 1440 bytes .../480x800/default/00_header_process_30.png | Bin 0 -> 1446 bytes .../bitmaps/480x800/default/00_icon_Back_ef.png | Bin 0 -> 1984 bytes .../bitmaps/480x800/default/00_icon_Back_ef_02.png | Bin 0 -> 1945 bytes .../480x800/default/00_icon_Back_trans_ef.png | Bin 0 -> 1491 bytes .../480x800/default/00_icon_SIP_close_ef.png | Bin 0 -> 1466 bytes .../bitmaps/480x800/default/00_icon_back_ef.png | Bin 0 -> 1502 bytes .../480x800/default/00_icon_back_trans_ef.png | Bin 0 -> 1491 bytes .../osp/bitmaps/480x800/default/00_icon_jump.png | Bin 0 -> 3132 bytes .../bitmaps/480x800/default/00_icon_jump_ef.png | Bin 0 -> 1382 bytes .../bitmaps/480x800/default/00_icon_jump_left.png | Bin 0 -> 3146 bytes .../480x800/default/00_icon_jump_left_ef.png | Bin 0 -> 1366 bytes .../bitmaps/480x800/default/00_icon_more_ef.png | Bin 0 -> 1145 bytes .../480x800/default/00_indexlist_bg_ef.#.png | Bin 0 -> 2878 bytes .../default/00_list_group_bg_bottom_ef.#.png | Bin 0 -> 3083 bytes .../default/00_list_group_bg_center_ef.#.png | Bin 0 -> 2882 bytes .../480x800/default/00_list_group_bg_ef.#.png | Bin 0 -> 1390 bytes .../480x800/default/00_list_group_bg_top_ef.#.png | Bin 0 -> 3096 bytes .../bitmaps/480x800/default/00_list_process_01.png | Bin 0 -> 1718 bytes .../bitmaps/480x800/default/00_list_process_02.png | Bin 0 -> 1706 bytes .../bitmaps/480x800/default/00_list_process_03.png | Bin 0 -> 1661 bytes .../bitmaps/480x800/default/00_list_process_04.png | Bin 0 -> 1740 bytes .../bitmaps/480x800/default/00_list_process_05.png | Bin 0 -> 1730 bytes .../bitmaps/480x800/default/00_list_process_06.png | Bin 0 -> 1733 bytes .../bitmaps/480x800/default/00_list_process_07.png | Bin 0 -> 1720 bytes .../bitmaps/480x800/default/00_list_process_08.png | Bin 0 -> 1789 bytes .../bitmaps/480x800/default/00_list_process_09.png | Bin 0 -> 1753 bytes .../bitmaps/480x800/default/00_list_process_10.png | Bin 0 -> 1737 bytes .../bitmaps/480x800/default/00_list_process_11.png | Bin 0 -> 1703 bytes .../bitmaps/480x800/default/00_list_process_12.png | Bin 0 -> 1746 bytes .../bitmaps/480x800/default/00_list_process_13.png | Bin 0 -> 1753 bytes .../bitmaps/480x800/default/00_list_process_14.png | Bin 0 -> 1756 bytes .../bitmaps/480x800/default/00_list_process_15.png | Bin 0 -> 1774 bytes .../bitmaps/480x800/default/00_list_process_16.png | Bin 0 -> 1724 bytes .../bitmaps/480x800/default/00_list_process_17.png | Bin 0 -> 1704 bytes .../bitmaps/480x800/default/00_list_process_18.png | Bin 0 -> 1675 bytes .../bitmaps/480x800/default/00_list_process_19.png | Bin 0 -> 1737 bytes .../bitmaps/480x800/default/00_list_process_20.png | Bin 0 -> 1736 bytes .../bitmaps/480x800/default/00_list_process_21.png | Bin 0 -> 1731 bytes .../bitmaps/480x800/default/00_list_process_22.png | Bin 0 -> 1720 bytes .../bitmaps/480x800/default/00_list_process_23.png | Bin 0 -> 1769 bytes .../bitmaps/480x800/default/00_list_process_24.png | Bin 0 -> 1749 bytes .../bitmaps/480x800/default/00_list_process_25.png | Bin 0 -> 1725 bytes .../bitmaps/480x800/default/00_list_process_26.png | Bin 0 -> 1714 bytes .../bitmaps/480x800/default/00_list_process_27.png | Bin 0 -> 1733 bytes .../bitmaps/480x800/default/00_list_process_28.png | Bin 0 -> 1751 bytes .../bitmaps/480x800/default/00_list_process_29.png | Bin 0 -> 1741 bytes .../bitmaps/480x800/default/00_list_process_30.png | Bin 0 -> 1762 bytes .../480x800/default/00_more_popup_press.#.png | Bin 0 -> 2934 bytes .../default/00_option_panel_handle_bg_ef.png | Bin 0 -> 3327 bytes .../default/00_option_panel_handle_bg_ef_press.png | Bin 0 -> 1427 bytes .../480x800/default/00_panel_handle_bg_ef.#.png | Bin 0 -> 4140 bytes .../default/00_panel_handle_bg_ef_press.#.png | Bin 0 -> 2188 bytes .../default/00_panel_list_bg_ef_press.#.png | Bin 0 -> 1197 bytes .../480x800/default/00_picker_button_dim_ef.#.png | Bin 0 -> 3286 bytes .../480x800/default/00_picker_button_ef.#.png | Bin 0 -> 3286 bytes .../default/00_picker_button_press_ef.#.png | Bin 0 -> 3107 bytes .../osp/bitmaps/480x800/default/00_popup_bg.#.png | Bin 0 -> 1263 bytes .../bitmaps/480x800/default/00_popup_bg_ef.#.png | Bin 0 -> 2038 bytes .../480x800/default/00_popup_bottom_bg.#.png | Bin 0 -> 1132 bytes .../480x800/default/00_popup_bottom_ef.#.png | Bin 0 -> 2895 bytes .../480x800/default/00_popup_bubble_02_ef.#.png | Bin 0 -> 1546 bytes .../480x800/default/00_popup_bubble_bg.#.png | Bin 0 -> 1260 bytes .../480x800/default/00_popup_bubble_bg_ef.#.png | Bin 0 -> 1883 bytes .../default/00_popup_bubble_tail_bottom.png | Bin 0 -> 1182 bytes .../default/00_popup_bubble_tail_bottom_ef.png | Bin 0 -> 1612 bytes .../480x800/default/00_popup_bubble_tail_left.png | Bin 0 -> 1169 bytes .../default/00_popup_bubble_tail_left_ef.png | Bin 0 -> 1429 bytes .../480x800/default/00_popup_bubble_tail_right.png | Bin 0 -> 1207 bytes .../default/00_popup_bubble_tail_right_ef.png | Bin 0 -> 1462 bytes .../480x800/default/00_popup_bubble_tail_top.png | Bin 0 -> 1175 bytes .../default/00_popup_bubble_tail_top_ef.png | Bin 0 -> 1383 bytes .../480x800/default/00_popup_button_dim_ef.#.png | Bin 0 -> 1482 bytes .../default/00_popup_button_normal_ef.#.png | Bin 0 -> 1532 bytes .../480x800/default/00_popup_button_press_ef.#.png | Bin 0 -> 1175 bytes .../bitmaps/480x800/default/00_popup_scroll.#.png | Bin 0 -> 2921 bytes .../480x800/default/00_popup_title_bg.#.png | Bin 0 -> 1152 bytes .../480x800/default/00_popup_title_ef.#.png | Bin 0 -> 1101 bytes .../480x800/default/00_progress_bar_ef.#.png | Bin 0 -> 1251 bytes .../480x800/default/00_progress_ef_bg.#.png | Bin 0 -> 1286 bytes .../bitmaps/480x800/default/00_scroll_bar_h.#.png | Bin 0 -> 2940 bytes .../480x800/default/00_scroll_bar_h_ef.#.png | Bin 0 -> 2974 bytes .../480x800/default/00_scroll_bar_handler_h.png | Bin 0 -> 2834 bytes .../480x800/default/00_scroll_bar_handler_v.png | Bin 0 -> 2831 bytes .../bitmaps/480x800/default/00_scroll_bar_v.#.png | Bin 0 -> 2948 bytes .../480x800/default/00_scroll_bar_v_ef.#.png | Bin 0 -> 2980 bytes .../bitmaps/480x800/default/00_search_bg_ef.#.png | Bin 0 -> 2850 bytes .../default/00_search_edit_field_bg_ef.#.png | Bin 0 -> 3383 bytes .../bitmaps/480x800/default/00_search_icon_ef.png | Bin 0 -> 1467 bytes .../480x800/default/00_slider_handle_ef.png | Bin 0 -> 4746 bytes .../480x800/default/00_slider_handle_ef_dim.png | Bin 0 -> 4640 bytes .../480x800/default/00_slider_handle_ef_press.png | Bin 0 -> 3246 bytes .../480x800/default/00_softkey_left_bg_ef.png | Bin 0 -> 3139 bytes .../default/00_softkey_left_bg_ef_press.png | Bin 0 -> 1393 bytes .../480x800/default/00_softkey_left_text_bg_ef.png | Bin 0 -> 3152 bytes .../default/00_softkey_left_text_bg_ef_press.png | Bin 0 -> 1515 bytes .../480x800/default/00_softkey_right_bg_ef.png | Bin 0 -> 3235 bytes .../default/00_softkey_right_bg_ef_press.png | Bin 0 -> 1349 bytes .../default/00_softkey_right_text_bg_ef.png | Bin 0 -> 3301 bytes .../default/00_softkey_right_text_bg_ef_press.png | Bin 0 -> 1483 bytes .../480x800/default/00_split_handler_bg_ef_h.#.png | Bin 0 -> 2859 bytes .../480x800/default/00_split_handler_bg_ef_v.#.png | Bin 0 -> 2863 bytes .../bitmaps/480x800/default/00_split_handler_h.png | Bin 0 -> 2812 bytes .../bitmaps/480x800/default/00_split_handler_v.png | Bin 0 -> 2828 bytes .../bitmaps/480x800/default/00_sub_title_ef.#.png | Bin 0 -> 2863 bytes .../bitmaps/480x800/default/00_tab_press_ef.#.png | Bin 0 -> 2855 bytes .../bitmaps/480x800/default/00_title_bg_ef.#.png | Bin 0 -> 2851 bytes .../480x800/default/00_title_press_ef.#.png | Bin 0 -> 2855 bytes .../bitmaps/480x800/default/00_toolbar_bg_ef.#.png | Bin 0 -> 2842 bytes .../480x800/default/00_toolbar_bg_shadow.#.png | Bin 0 -> 2843 bytes .../480x800/default/00_toolbar_button.#.png | Bin 0 -> 3632 bytes .../default/00_toolbar_button_bg_dim_ef.#.png | Bin 0 -> 2617 bytes .../480x800/default/00_toolbar_button_bg_ef.#.png | Bin 0 -> 2695 bytes .../480x800/default/00_toolbar_button_ef.#.png | Bin 0 -> 5946 bytes .../default/00_toolbar_button_ef_press.#.png | Bin 0 -> 5184 bytes .../480x800/default/00_toolbar_button_press.#.png | Bin 0 -> 3984 bytes .../default/00_toolbar_button_press_ef.#.png | Bin 0 -> 3025 bytes .../480x800/default/00_toolbar_ef_press.#.png | Bin 0 -> 3094 bytes .../480x800/default/00_toolbar_press_ef.#.png | Bin 0 -> 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_badge_bg_ef.#.png | Bin 0 -> 1909 bytes .../480x800/white/00_button_01_dim_ef.#.png | Bin 0 -> 1361 bytes .../bitmaps/480x800/white/00_button_01_ef.#.png | Bin 0 -> 1405 bytes .../480x800/white/00_button_01_press_ef.#.png | Bin 0 -> 1540 bytes .../480x800/white/00_button_expand_closed_ef.png | Bin 0 -> 1453 bytes .../480x800/white/00_button_expand_opened_ef.png | Bin 0 -> 1426 bytes .../bitmaps/480x800/white/00_button_left_ef.png | Bin 0 -> 3149 bytes .../osp/bitmaps/480x800/white/00_button_off.png | Bin 0 -> 5640 bytes .../bitmaps/480x800/white/00_button_off_dim.png | Bin 0 -> 5514 bytes .../480x800/white/00_button_off_handler.png | Bin 0 -> 3606 bytes .../480x800/white/00_button_off_handler_dim.png | Bin 0 -> 3549 bytes .../osp/bitmaps/480x800/white/00_button_on.png | Bin 0 -> 5585 bytes .../osp/bitmaps/480x800/white/00_button_on_dim.png | Bin 0 -> 5498 bytes .../bitmaps/480x800/white/00_button_on_handler.png | Bin 0 -> 5125 bytes .../480x800/white/00_button_on_handler_dim.png | Bin 0 -> 3191 bytes .../bitmaps/480x800/white/00_button_on_off_bg.png | Bin 0 -> 5872 bytes .../480x800/white/00_button_on_off_bg_dim.png | Bin 0 -> 3805 bytes .../480x800/white/00_button_on_off_handler.png | Bin 0 -> 4836 bytes .../480x800/white/00_button_on_off_handler_dim.png | Bin 0 -> 4775 bytes .../480x800/white/00_button_radio_Activated.png | Bin 0 -> 3432 bytes .../white/00_button_radio_Activated_dim.png | Bin 0 -> 3399 bytes .../480x800/white/00_button_radio_activated.png | Bin 0 -> 1574 bytes .../white/00_button_radio_activated_dim.png | Bin 0 -> 1556 bytes .../white/00_button_radio_activated_press.png | Bin 0 -> 1589 bytes .../bitmaps/480x800/white/00_button_radio_bg.png | Bin 0 -> 3206 bytes .../480x800/white/00_button_radio_dim_bg.png | Bin 0 -> 3024 bytes .../480x800/white/00_button_radio_normal1.png | Bin 0 -> 4271 bytes .../480x800/white/00_button_radio_normal2.png | Bin 0 -> 3812 bytes .../480x800/white/00_button_radio_press.png | Bin 0 -> 3441 bytes .../480x800/white/00_button_radio_press_bg.png | Bin 0 -> 3404 bytes .../bitmaps/480x800/white/00_button_right_ef.png | Bin 0 -> 1160 bytes .../bitmaps/480x800/white/00_check_Activated.png | Bin 0 -> 3575 bytes .../480x800/white/00_check_Activated_dim.png | Bin 0 -> 3529 bytes .../bitmaps/480x800/white/00_check_activated.png | Bin 0 -> 1588 bytes .../480x800/white/00_check_activated_dim.png | Bin 0 -> 1565 bytes .../480x800/white/00_check_activated_press.png | Bin 0 -> 1515 bytes .../osp/bitmaps/480x800/white/00_check_bg.png | Bin 0 -> 1631 bytes .../osp/bitmaps/480x800/white/00_check_dim.png | Bin 0 -> 4420 bytes .../osp/bitmaps/480x800/white/00_check_dim_bg.png | Bin 0 -> 1638 bytes .../osp/bitmaps/480x800/white/00_check_press.png | Bin 0 -> 3478 bytes .../bitmaps/480x800/white/00_check_press_bg.png | Bin 0 -> 1654 bytes .../osp/bitmaps/480x800/white/00_circle_bg_ef.png | Bin 0 -> 2486 bytes .../bitmaps/480x800/white/00_circle_bg_ef_dim.png | Bin 0 -> 2272 bytes .../480x800/white/00_circle_bg_ef_press.png | Bin 0 -> 2200 bytes .../480x800/white/00_color_picker_handler.png | Bin 0 -> 3005 bytes .../480x800/white/00_contacts_button_bg.#.png | Bin 0 -> 1114 bytes .../white/00_contacts_button_bg_dim_ef.#.png | Bin 0 -> 1257 bytes .../480x800/white/00_contacts_button_bg_ef.#.png | Bin 0 -> 1251 bytes .../white/00_contacts_button_bg_press_ef.#.png | Bin 0 -> 1276 bytes .../480x800/white/00_contacts_button_focus.#.png | Bin 0 -> 1145 bytes .../white/00_contacts_button_focus_ef.#.png | Bin 0 -> 1115 bytes .../480x800/white/00_edit_group_bg_bottom_ef.#.png | Bin 0 -> 3085 bytes .../480x800/white/00_edit_group_bg_center_ef.#.png | Bin 0 -> 2888 bytes .../480x800/white/00_edit_group_bg_ef.#.png | Bin 0 -> 1417 bytes .../480x800/white/00_edit_group_bg_top_ef.#.png | Bin 0 -> 3112 bytes .../480x800/white/00_effect_footer_bounce_left.png | Bin 0 -> 4479 bytes .../white/00_effect_footer_bounce_left_h.png | Bin 0 -> 4256 bytes .../white/00_effect_footer_bounce_right.png | Bin 0 -> 4425 bytes .../white/00_effect_footer_bounce_right_h.png | Bin 0 -> 4244 bytes .../480x800/white/00_effect_tab_bounce_left.png | Bin 0 -> 4467 bytes .../480x800/white/00_effect_tab_bounce_left_02.png | Bin 0 -> 4975 bytes .../480x800/white/00_effect_tab_bounce_left_h.png | Bin 0 -> 4225 bytes .../480x800/white/00_effect_tab_bounce_right.png | Bin 0 -> 4418 bytes .../white/00_effect_tab_bounce_right_02.png | Bin 0 -> 4976 bytes .../480x800/white/00_effect_tab_bounce_right_h.png | Bin 0 -> 4174 bytes .../white/00_effect_title_tab_bounce_left.png | Bin 0 -> 3952 bytes .../white/00_effect_title_tab_bounce_right.png | Bin 0 -> 3946 bytes .../480x800/white/00_expandable_bg_bottom_ef.#.png | Bin 0 -> 3082 bytes .../480x800/white/00_expandable_bg_center_ef.#.png | Bin 0 -> 2884 bytes .../480x800/white/00_expandable_bg_top_ef.#.png | Bin 0 -> 3112 bytes .../480x800/white/00_fast_scroll_handler.#.png | Bin 0 -> 1618 bytes .../480x800/white/00_fast_scroll_handler_h.#.png | Bin 0 -> 1562 bytes .../480x800/white/00_fast_scroll_popup_bg.#.png | Bin 0 -> 2977 bytes .../480x800/white/00_fast_scroll_popup_bg_ef.#.png | Bin 0 -> 1535 bytes .../00_fast_scroll_rollover_bg_line_focus.#.png | Bin 0 -> 2855 bytes .../share/osp/bitmaps/480x800/white/00_focus.#.png | Bin 0 -> 2925 bytes .../bitmaps/480x800/white/00_header_process_01.png | Bin 0 -> 1464 bytes .../bitmaps/480x800/white/00_header_process_02.png | Bin 0 -> 1465 bytes .../bitmaps/480x800/white/00_header_process_03.png | Bin 0 -> 1437 bytes .../bitmaps/480x800/white/00_header_process_04.png | Bin 0 -> 1465 bytes .../bitmaps/480x800/white/00_header_process_05.png | Bin 0 -> 1464 bytes .../bitmaps/480x800/white/00_header_process_06.png | Bin 0 -> 1471 bytes .../bitmaps/480x800/white/00_header_process_07.png | Bin 0 -> 1459 bytes .../bitmaps/480x800/white/00_header_process_08.png | Bin 0 -> 1480 bytes .../bitmaps/480x800/white/00_header_process_09.png | Bin 0 -> 1483 bytes .../bitmaps/480x800/white/00_header_process_10.png | Bin 0 -> 1457 bytes .../bitmaps/480x800/white/00_header_process_11.png | Bin 0 -> 1444 bytes .../bitmaps/480x800/white/00_header_process_12.png | Bin 0 -> 1467 bytes .../bitmaps/480x800/white/00_header_process_13.png | Bin 0 -> 1468 bytes .../bitmaps/480x800/white/00_header_process_14.png | Bin 0 -> 1474 bytes .../bitmaps/480x800/white/00_header_process_15.png | Bin 0 -> 1477 bytes .../bitmaps/480x800/white/00_header_process_16.png | Bin 0 -> 1467 bytes .../bitmaps/480x800/white/00_header_process_17.png | Bin 0 -> 1461 bytes .../bitmaps/480x800/white/00_header_process_18.png | Bin 0 -> 1415 bytes .../bitmaps/480x800/white/00_header_process_19.png | Bin 0 -> 1465 bytes .../bitmaps/480x800/white/00_header_process_20.png | Bin 0 -> 1477 bytes .../bitmaps/480x800/white/00_header_process_21.png | Bin 0 -> 1465 bytes .../bitmaps/480x800/white/00_header_process_22.png | Bin 0 -> 1447 bytes .../bitmaps/480x800/white/00_header_process_23.png | Bin 0 -> 1478 bytes .../bitmaps/480x800/white/00_header_process_24.png | Bin 0 -> 1450 bytes .../bitmaps/480x800/white/00_header_process_25.png | Bin 0 -> 1441 bytes .../bitmaps/480x800/white/00_header_process_26.png | Bin 0 -> 1431 bytes .../bitmaps/480x800/white/00_header_process_27.png | Bin 0 -> 1433 bytes .../bitmaps/480x800/white/00_header_process_28.png | Bin 0 -> 1462 bytes .../bitmaps/480x800/white/00_header_process_29.png | Bin 0 -> 1469 bytes .../bitmaps/480x800/white/00_header_process_30.png | Bin 0 -> 1476 bytes .../osp/bitmaps/480x800/white/00_icon_Back_ef.png | Bin 0 -> 1951 bytes .../bitmaps/480x800/white/00_icon_Back_ef_02.png | Bin 0 -> 1945 bytes .../480x800/white/00_icon_Back_trans_ef.png | Bin 0 -> 1491 bytes .../bitmaps/480x800/white/00_icon_SIP_close_ef.png | Bin 0 -> 1861 bytes .../osp/bitmaps/480x800/white/00_icon_back_ef.png | Bin 0 -> 1926 bytes .../480x800/white/00_icon_back_trans_ef.png | Bin 0 -> 1491 bytes .../osp/bitmaps/480x800/white/00_icon_jump.png | Bin 0 -> 2991 bytes .../osp/bitmaps/480x800/white/00_icon_jump_ef.png | Bin 0 -> 1376 bytes .../bitmaps/480x800/white/00_icon_jump_left.png | Bin 0 -> 3004 bytes .../bitmaps/480x800/white/00_icon_jump_left_ef.png | Bin 0 -> 1343 bytes .../osp/bitmaps/480x800/white/00_icon_more_ef.png | Bin 0 -> 1507 bytes .../bitmaps/480x800/white/00_indexlist_bg_ef.#.png | Bin 0 -> 2873 bytes .../480x800/white/00_list_group_bg_bottom_ef.#.png | Bin 0 -> 3082 bytes .../480x800/white/00_list_group_bg_center_ef.#.png | Bin 0 -> 2884 bytes .../480x800/white/00_list_group_bg_ef.#.png | Bin 0 -> 1417 bytes .../480x800/white/00_list_group_bg_top_ef.#.png | Bin 0 -> 3115 bytes .../bitmaps/480x800/white/00_list_process_01.png | Bin 0 -> 1778 bytes .../bitmaps/480x800/white/00_list_process_02.png | Bin 0 -> 1757 bytes .../bitmaps/480x800/white/00_list_process_03.png | Bin 0 -> 1697 bytes .../bitmaps/480x800/white/00_list_process_04.png | Bin 0 -> 1799 bytes .../bitmaps/480x800/white/00_list_process_05.png | Bin 0 -> 1797 bytes .../bitmaps/480x800/white/00_list_process_06.png | Bin 0 -> 1806 bytes .../bitmaps/480x800/white/00_list_process_07.png | Bin 0 -> 1772 bytes .../bitmaps/480x800/white/00_list_process_08.png | Bin 0 -> 1847 bytes .../bitmaps/480x800/white/00_list_process_09.png | Bin 0 -> 1811 bytes .../bitmaps/480x800/white/00_list_process_10.png | Bin 0 -> 1788 bytes .../bitmaps/480x800/white/00_list_process_11.png | Bin 0 -> 1736 bytes .../bitmaps/480x800/white/00_list_process_12.png | Bin 0 -> 1796 bytes .../bitmaps/480x800/white/00_list_process_13.png | Bin 0 -> 1819 bytes .../bitmaps/480x800/white/00_list_process_14.png | Bin 0 -> 1811 bytes .../bitmaps/480x800/white/00_list_process_15.png | Bin 0 -> 1822 bytes .../bitmaps/480x800/white/00_list_process_16.png | Bin 0 -> 1799 bytes .../bitmaps/480x800/white/00_list_process_17.png | Bin 0 -> 1755 bytes .../bitmaps/480x800/white/00_list_process_18.png | Bin 0 -> 1712 bytes .../bitmaps/480x800/white/00_list_process_19.png | Bin 0 -> 1792 bytes .../bitmaps/480x800/white/00_list_process_20.png | Bin 0 -> 1813 bytes .../bitmaps/480x800/white/00_list_process_21.png | Bin 0 -> 1796 bytes .../bitmaps/480x800/white/00_list_process_22.png | Bin 0 -> 1759 bytes .../bitmaps/480x800/white/00_list_process_23.png | Bin 0 -> 1806 bytes .../bitmaps/480x800/white/00_list_process_24.png | Bin 0 -> 1800 bytes .../bitmaps/480x800/white/00_list_process_25.png | Bin 0 -> 1758 bytes .../bitmaps/480x800/white/00_list_process_26.png | Bin 0 -> 1728 bytes .../bitmaps/480x800/white/00_list_process_27.png | Bin 0 -> 1771 bytes .../bitmaps/480x800/white/00_list_process_28.png | Bin 0 -> 1782 bytes .../bitmaps/480x800/white/00_list_process_29.png | Bin 0 -> 1796 bytes .../bitmaps/480x800/white/00_list_process_30.png | Bin 0 -> 1816 bytes .../480x800/white/00_more_popup_press.#.png | Bin 0 -> 2934 bytes .../480x800/white/00_option_panel_handle_bg_ef.png | Bin 0 -> 1554 bytes .../white/00_option_panel_handle_bg_ef_press.png | Bin 0 -> 1427 bytes .../480x800/white/00_panel_handle_bg_ef.#.png | Bin 0 -> 1960 bytes .../white/00_panel_handle_bg_ef_press.#.png | Bin 0 -> 2188 bytes .../480x800/white/00_panel_list_bg_ef_press.#.png | Bin 0 -> 1197 bytes .../480x800/white/00_picker_button_dim_ef.#.png | Bin 0 -> 1449 bytes .../480x800/white/00_picker_button_ef.#.png | Bin 0 -> 1451 bytes .../480x800/white/00_picker_button_press_ef.#.png | Bin 0 -> 1254 bytes .../osp/bitmaps/480x800/white/00_popup_bg.#.png | Bin 0 -> 516 bytes .../osp/bitmaps/480x800/white/00_popup_bg_ef.#.png | Bin 0 -> 4438 bytes .../bitmaps/480x800/white/00_popup_bottom_bg.#.png | Bin 0 -> 1132 bytes .../bitmaps/480x800/white/00_popup_bottom_ef.#.png | Bin 0 -> 1091 bytes .../480x800/white/00_popup_bubble_02_ef.#.png | Bin 0 -> 1359 bytes .../480x800/white/00_popup_bubble_bg_ef.#.png | Bin 0 -> 1638 bytes .../480x800/white/00_popup_bubble_tail_bottom.png | Bin 0 -> 1198 bytes .../white/00_popup_bubble_tail_bottom_ef.png | Bin 0 -> 1362 bytes .../480x800/white/00_popup_bubble_tail_left.png | Bin 0 -> 1172 bytes .../480x800/white/00_popup_bubble_tail_left_ef.png | Bin 0 -> 1318 bytes .../480x800/white/00_popup_bubble_tail_right.png | Bin 0 -> 1207 bytes .../white/00_popup_bubble_tail_right_ef.png | Bin 0 -> 1331 bytes .../480x800/white/00_popup_bubble_tail_top.png | Bin 0 -> 1175 bytes .../480x800/white/00_popup_bubble_tail_top_ef.png | Bin 0 -> 1263 bytes .../480x800/white/00_popup_button_dim_ef.#.png | Bin 0 -> 1664 bytes .../480x800/white/00_popup_button_normal_ef.#.png | Bin 0 -> 1676 bytes .../480x800/white/00_popup_button_press_ef.#.png | Bin 0 -> 1656 bytes .../bitmaps/480x800/white/00_popup_scroll.#.png | Bin 0 -> 2921 bytes .../bitmaps/480x800/white/00_popup_title_bg.#.png | Bin 0 -> 1152 bytes .../bitmaps/480x800/white/00_popup_title_ef.#.png | Bin 0 -> 1273 bytes .../bitmaps/480x800/white/00_progress_bar_ef.#.png | Bin 0 -> 1248 bytes .../bitmaps/480x800/white/00_progress_ef_bg.#.png | Bin 0 -> 1285 bytes .../bitmaps/480x800/white/00_scroll_bar_h.#.png | Bin 0 -> 2940 bytes .../bitmaps/480x800/white/00_scroll_bar_h_ef.#.png | Bin 0 -> 2974 bytes .../480x800/white/00_scroll_bar_handler_h.png | Bin 0 -> 2843 bytes .../480x800/white/00_scroll_bar_handler_v.png | Bin 0 -> 2826 bytes .../bitmaps/480x800/white/00_scroll_bar_v.#.png | Bin 0 -> 2948 bytes .../bitmaps/480x800/white/00_scroll_bar_v_ef.#.png | Bin 0 -> 2980 bytes .../bitmaps/480x800/white/00_search_bg_ef.#.png | Bin 0 -> 2850 bytes .../480x800/white/00_search_edit_field_bg_ef.#.png | Bin 0 -> 1400 bytes .../bitmaps/480x800/white/00_search_icon_ef.png | Bin 0 -> 1455 bytes .../bitmaps/480x800/white/00_slider_handle_ef.png | Bin 0 -> 4460 bytes .../480x800/white/00_slider_handle_ef_dim.png | Bin 0 -> 4355 bytes .../480x800/white/00_slider_handle_ef_press.png | Bin 0 -> 4747 bytes .../480x800/white/00_softkey_left_bg_ef.png | Bin 0 -> 1267 bytes .../480x800/white/00_softkey_left_bg_ef_press.png | Bin 0 -> 1393 bytes .../480x800/white/00_softkey_left_text_bg_ef.png | Bin 0 -> 1319 bytes .../white/00_softkey_left_text_bg_ef_press.png | Bin 0 -> 1515 bytes .../480x800/white/00_softkey_right_bg_ef.png | Bin 0 -> 1504 bytes .../480x800/white/00_softkey_right_bg_ef_press.png | Bin 0 -> 1349 bytes .../480x800/white/00_softkey_right_text_bg_ef.png | Bin 0 -> 1549 bytes .../white/00_softkey_right_text_bg_ef_press.png | Bin 0 -> 1483 bytes .../480x800/white/00_split_handler_bg_ef_h.#.png | Bin 0 -> 2847 bytes .../480x800/white/00_split_handler_bg_ef_v.#.png | Bin 0 -> 2836 bytes .../bitmaps/480x800/white/00_split_handler_h.png | Bin 0 -> 2845 bytes .../bitmaps/480x800/white/00_split_handler_v.png | Bin 0 -> 2854 bytes .../bitmaps/480x800/white/00_sub_title_ef.#.png | Bin 0 -> 2847 bytes .../bitmaps/480x800/white/00_tab_press_ef.#.png | Bin 0 -> 2962 bytes .../osp/bitmaps/480x800/white/00_title_bg_ef.#.png | Bin 0 -> 2854 bytes .../bitmaps/480x800/white/00_title_press_ef.#.png | Bin 0 -> 2853 bytes .../bitmaps/480x800/white/00_toolbar_bg_ef.#.png | Bin 0 -> 2857 bytes .../480x800/white/00_toolbar_bg_shadow.#.png | Bin 0 -> 2841 bytes .../bitmaps/480x800/white/00_toolbar_button.#.png | Bin 0 -> 3632 bytes .../white/00_toolbar_button_bg_dim_ef.#.png | Bin 0 -> 3045 bytes .../480x800/white/00_toolbar_button_bg_ef.#.png | Bin 0 -> 3144 bytes .../480x800/white/00_toolbar_button_ef.#.png | Bin 0 -> 6026 bytes .../480x800/white/00_toolbar_button_ef_press.#.png | Bin 0 -> 6173 bytes .../480x800/white/00_toolbar_button_press.#.png | Bin 0 -> 3984 bytes .../480x800/white/00_toolbar_button_press_ef.#.png | Bin 0 -> 3105 bytes .../480x800/white/00_toolbar_press_ef.#.png | Bin 0 -> 2839 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 .../share/osp/bitmaps/720x1280/00_arrow_left.png | Bin 0 -> 3183 bytes .../share/osp/bitmaps/720x1280/00_arrow_right.png | Bin 0 -> 3189 bytes .../share/osp/bitmaps/720x1280/00_badge_bg.#.png | Bin 0 -> 1612 bytes .../share/osp/bitmaps/720x1280/00_button_01.#.png | Bin 0 -> 1218 bytes .../osp/bitmaps/720x1280/00_button_01_bg.#.png | Bin 0 -> 1218 bytes .../osp/bitmaps/720x1280/00_button_01_focus.#.png | Bin 0 -> 1268 bytes .../bitmaps/720x1280/00_button_expand_closed.png | Bin 0 -> 1363 bytes .../bitmaps/720x1280/00_button_expand_opened.png | Bin 0 -> 1307 bytes .../share/osp/bitmaps/720x1280/00_button_left.png | Bin 0 -> 3056 bytes .../720x1280/00_button_of_off_handler_focus.png | Bin 0 -> 3943 bytes .../720x1280/00_button_on_off_handler_focus.png | Bin 0 -> 3943 bytes .../osp/bitmaps/720x1280/00_button_radio_focus.png | Bin 0 -> 3902 bytes .../osp/bitmaps/720x1280/00_button_reveal.png | Bin 0 -> 3092 bytes .../share/osp/bitmaps/720x1280/00_button_right.png | Bin 0 -> 1212 bytes .../osp/bitmaps/720x1280/00_category_button.#.png | Bin 0 -> 2974 bytes .../720x1280/00_category_button_focus.#.png | Bin 0 -> 3030 bytes .../bitmaps/720x1280/00_category_panel_bg.#.png | Bin 0 -> 2857 bytes .../bitmaps/720x1280/00_category_panel_bg_ef.#.png | Bin 0 -> 2895 bytes .../share/osp/bitmaps/720x1280/00_check_focus.png | Bin 0 -> 3123 bytes .../share/osp/bitmaps/720x1280/00_circle_bg.png | Bin 0 -> 2008 bytes .../bitmaps/720x1280/00_circle_button_focus.png | Bin 0 -> 2267 bytes .../720x1280/00_color_picker_brightness.png | Bin 0 -> 3168 bytes .../720x1280/00_color_picker_brightness_h.png | Bin 0 -> 3340 bytes .../osp/bitmaps/720x1280/00_color_picker_color.png | Bin 0 -> 3272 bytes .../bitmaps/720x1280/00_color_picker_color_h.png | Bin 0 -> 3370 bytes .../720x1280/00_color_picker_custom_color.png | Bin 0 -> 3022 bytes .../720x1280/00_color_picker_custom_color_h.png | Bin 0 -> 3085 bytes .../720x1280/00_color_picker_handler_focus.png | Bin 0 -> 2874 bytes .../720x1280/00_color_picker_saturation.png | Bin 0 -> 10101 bytes .../720x1280/00_color_picker_saturation_h.png | Bin 0 -> 10641 bytes .../bitmaps/720x1280/00_contacts_button_bg.#.png | Bin 0 -> 1199 bytes .../720x1280/00_contacts_button_focus.#.png | Bin 0 -> 3059 bytes .../osp/bitmaps/720x1280/00_date_picker_dot.png | Bin 0 -> 2839 bytes .../osp/bitmaps/720x1280/00_edit_field_clear.png | Bin 0 -> 3249 bytes .../osp/bitmaps/720x1280/00_edit_field_focus.#.png | Bin 0 -> 3029 bytes .../720x1280/00_edit_field_line_round_bg_01.#.png | Bin 0 -> 3150 bytes .../720x1280/00_edit_field_no_line_square_bg.#.png | Bin 0 -> 2855 bytes .../bitmaps/720x1280/00_edit_field_round_bg.#.png | Bin 0 -> 3248 bytes .../osp/bitmaps/720x1280/00_edit_group_bg.#.png | Bin 0 -> 2951 bytes .../bitmaps/720x1280/00_edit_group_bg_bottom.#.png | Bin 0 -> 2908 bytes .../bitmaps/720x1280/00_edit_group_bg_center.#.png | Bin 0 -> 2846 bytes .../bitmaps/720x1280/00_edit_group_bg_top.#.png | Bin 0 -> 2914 bytes .../720x1280/00_effect_tab_text_dim_left.#.png | Bin 0 -> 2888 bytes .../720x1280/00_effect_tab_text_dim_right.#.png | Bin 0 -> 2886 bytes .../720x1280/00_effect_title_text_dim_left.#.png | Bin 0 -> 2894 bytes .../720x1280/00_effect_title_text_dim_right.#.png | Bin 0 -> 2893 bytes .../bitmaps/720x1280/00_fast_scroll_handler.#.png | Bin 0 -> 3820 bytes .../720x1280/00_fast_scroll_handler_h.#.png | Bin 0 -> 3788 bytes .../bitmaps/720x1280/00_fast_scroll_popup_bg.#.png | Bin 0 -> 3031 bytes .../720x1280/00_fast_scroll_popup_bg_ef.#.png | Bin 0 -> 3646 bytes .../720x1280/00_fast_scroll_rollover_bg.#.png | Bin 0 -> 2848 bytes .../00_fast_scroll_rollover_bg_focus.#.png | Bin 0 -> 2848 bytes .../usr/share/osp/bitmaps/720x1280/00_focus.#.png | Bin 0 -> 3012 bytes .../osp/bitmaps/720x1280/00_grid_select_check.png | Bin 0 -> 1928 bytes .../bitmaps/720x1280/00_grid_select_check_bg.png | Bin 0 -> 4672 bytes .../720x1280/00_grid_select_check_bg_press.png | Bin 0 -> 5284 bytes .../bitmaps/720x1280/00_groupedlist_bg_focus.#.png | Bin 0 -> 3041 bytes .../bitmaps/720x1280/00_groupedlist_bg_press.#.png | Bin 0 -> 3143 bytes .../720x1280/00_groupedlist_bottom_bg_focus.#.png | Bin 0 -> 3228 bytes .../720x1280/00_groupedlist_bottom_bg_press.#.png | Bin 0 -> 3294 bytes .../720x1280/00_groupedlist_center_bg_focus.#.png | Bin 0 -> 3034 bytes .../720x1280/00_groupedlist_center_bg_press.#.png | Bin 0 -> 3191 bytes .../720x1280/00_groupedlist_top_bg_focus.#.png | Bin 0 -> 3207 bytes .../720x1280/00_groupedlist_top_bg_press.#.png | Bin 0 -> 3351 bytes .../osp/bitmaps/720x1280/00_icon_SIP_close.png | Bin 0 -> 1516 bytes .../share/osp/bitmaps/720x1280/00_icon_back.png | Bin 0 -> 1736 bytes .../share/osp/bitmaps/720x1280/00_icon_focus.png | Bin 0 -> 3088 bytes .../share/osp/bitmaps/720x1280/00_icon_jump.png | Bin 0 -> 3073 bytes .../osp/bitmaps/720x1280/00_icon_jump_left.png | Bin 0 -> 3113 bytes .../share/osp/bitmaps/720x1280/00_icon_more.png | Bin 0 -> 1288 bytes .../osp/bitmaps/720x1280/00_indexlist_bg.#.png | Bin 0 -> 2846 bytes .../osp/bitmaps/720x1280/00_indexlist_bg_ef.#.png | Bin 0 -> 2858 bytes .../osp/bitmaps/720x1280/00_list_group_bg.#.png | Bin 0 -> 2951 bytes .../bitmaps/720x1280/00_list_group_bg_bottom.#.png | Bin 0 -> 2908 bytes .../bitmaps/720x1280/00_list_group_bg_center.#.png | Bin 0 -> 2846 bytes .../bitmaps/720x1280/00_list_group_bg_top.#.png | Bin 0 -> 2914 bytes ...0_list_group_bottom_cover_round_bg_normal.#.png | Bin 0 -> 2908 bytes ...0_list_group_center_cover_round_bg_normal.#.png | Bin 0 -> 2843 bytes .../bitmaps/720x1280/00_list_group_press_bg.#.png | Bin 0 -> 2946 bytes .../720x1280/00_list_group_press_bg_bottom.#.png | Bin 0 -> 2906 bytes .../720x1280/00_list_group_press_bg_center.#.png | Bin 0 -> 2843 bytes .../720x1280/00_list_group_press_bg_top.#.png | Bin 0 -> 2917 bytes ...0_list_group_single_cover_round_bg_normal.#.png | Bin 0 -> 2948 bytes .../00_list_group_top_cover_round_bg_normal.#.png | Bin 0 -> 2916 bytes .../osp/bitmaps/720x1280/00_list_process_01.png | Bin 0 -> 3968 bytes .../osp/bitmaps/720x1280/00_list_process_02.png | Bin 0 -> 3924 bytes .../osp/bitmaps/720x1280/00_list_process_03.png | Bin 0 -> 3865 bytes .../osp/bitmaps/720x1280/00_list_process_04.png | Bin 0 -> 4026 bytes .../osp/bitmaps/720x1280/00_list_process_05.png | Bin 0 -> 4023 bytes .../osp/bitmaps/720x1280/00_list_process_06.png | Bin 0 -> 3976 bytes .../osp/bitmaps/720x1280/00_list_process_07.png | Bin 0 -> 3963 bytes .../osp/bitmaps/720x1280/00_list_process_08.png | Bin 0 -> 4059 bytes .../osp/bitmaps/720x1280/00_list_process_09.png | Bin 0 -> 4052 bytes .../osp/bitmaps/720x1280/00_list_process_10.png | Bin 0 -> 3970 bytes .../osp/bitmaps/720x1280/00_list_process_11.png | Bin 0 -> 3920 bytes .../osp/bitmaps/720x1280/00_list_process_12.png | Bin 0 -> 3968 bytes .../osp/bitmaps/720x1280/00_list_process_13.png | Bin 0 -> 4010 bytes .../osp/bitmaps/720x1280/00_list_process_14.png | Bin 0 -> 4032 bytes .../osp/bitmaps/720x1280/00_list_process_15.png | Bin 0 -> 4050 bytes .../osp/bitmaps/720x1280/00_list_process_16.png | Bin 0 -> 3966 bytes .../osp/bitmaps/720x1280/00_list_process_17.png | Bin 0 -> 3954 bytes .../osp/bitmaps/720x1280/00_list_process_18.png | Bin 0 -> 3912 bytes .../osp/bitmaps/720x1280/00_list_process_19.png | Bin 0 -> 4027 bytes .../osp/bitmaps/720x1280/00_list_process_20.png | Bin 0 -> 4015 bytes .../osp/bitmaps/720x1280/00_list_process_21.png | Bin 0 -> 3973 bytes .../osp/bitmaps/720x1280/00_list_process_22.png | Bin 0 -> 3908 bytes .../osp/bitmaps/720x1280/00_list_process_23.png | Bin 0 -> 4054 bytes .../osp/bitmaps/720x1280/00_list_process_24.png | Bin 0 -> 4009 bytes .../osp/bitmaps/720x1280/00_list_process_25.png | Bin 0 -> 3927 bytes .../osp/bitmaps/720x1280/00_list_process_26.png | Bin 0 -> 3903 bytes .../osp/bitmaps/720x1280/00_list_process_27.png | Bin 0 -> 3961 bytes .../osp/bitmaps/720x1280/00_list_process_28.png | Bin 0 -> 4008 bytes .../osp/bitmaps/720x1280/00_list_process_29.png | Bin 0 -> 4011 bytes .../osp/bitmaps/720x1280/00_list_process_30.png | Bin 0 -> 4006 bytes .../00_option_panel_contextual_popup_arrow.png | Bin 0 -> 3020 bytes .../bitmaps/720x1280/00_option_panel_handle_bg.png | Bin 0 -> 3230 bytes .../720x1280/00_option_panel_handle_bg_press.png | Bin 0 -> 3242 bytes .../720x1280/00_option_panel_handle_more.png | Bin 0 -> 1430 bytes .../720x1280/00_option_panel_handle_more_press.png | Bin 0 -> 1429 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 .../share/osp/bitmaps/720x1280/00_panel_bg.#.png | Bin 0 -> 2857 bytes .../osp/bitmaps/720x1280/00_panel_handle_arrow.png | Bin 0 -> 3164 bytes .../osp/bitmaps/720x1280/00_panel_handle_bg.#.png | Bin 0 -> 3553 bytes .../bitmaps/720x1280/00_panel_list_bg_press.#.png | Bin 0 -> 2930 bytes .../osp/bitmaps/720x1280/00_picker_button.#.png | Bin 0 -> 1203 bytes .../bitmaps/720x1280/00_picker_button_focus.#.png | Bin 0 -> 1191 bytes .../bitmaps/720x1280/00_popup_bubble_02_bg.#.png | Bin 0 -> 1229 bytes .../osp/bitmaps/720x1280/00_popup_bubble_bg.#.png | Bin 0 -> 1362 bytes .../720x1280/00_popup_bubble_tail_bottom.png | Bin 0 -> 3078 bytes .../720x1280/00_popup_bubble_tail_bottom_ef.png | Bin 0 -> 3564 bytes .../bitmaps/720x1280/00_popup_bubble_tail_left.png | Bin 0 -> 3086 bytes .../720x1280/00_popup_bubble_tail_left_ef.png | Bin 0 -> 3648 bytes .../720x1280/00_popup_bubble_tail_right.png | Bin 0 -> 3095 bytes .../720x1280/00_popup_bubble_tail_right_ef.png | Bin 0 -> 3513 bytes .../bitmaps/720x1280/00_popup_bubble_tail_top.png | Bin 0 -> 3062 bytes .../720x1280/00_popup_bubble_tail_top_ef.png | Bin 0 -> 3437 bytes .../bitmaps/720x1280/00_popup_button_focus.#.png | Bin 0 -> 1313 bytes .../720x1280/00_popup_button_normal_bg.#.png | Bin 0 -> 1262 bytes .../bitmaps/720x1280/00_popup_dim_lighting_h.png | Bin 0 -> 43017 bytes .../bitmaps/720x1280/00_popup_dim_lighting_v.png | Bin 0 -> 89129 bytes .../osp/bitmaps/720x1280/00_progress_bar.#.png | Bin 0 -> 1206 bytes .../osp/bitmaps/720x1280/00_progress_bg.#.png | Bin 0 -> 1249 bytes .../osp/bitmaps/720x1280/00_quick_menu_bg.#.png | Bin 0 -> 2848 bytes .../osp/bitmaps/720x1280/00_quick_menu_bg_ef.#.png | Bin 0 -> 992 bytes .../osp/bitmaps/720x1280/00_scroll_bar_h.#.png | Bin 0 -> 1131 bytes .../osp/bitmaps/720x1280/00_scroll_bar_h_ef.#.png | Bin 0 -> 1224 bytes .../osp/bitmaps/720x1280/00_scroll_bar_v.#.png | Bin 0 -> 1123 bytes .../osp/bitmaps/720x1280/00_scroll_bar_v_ef.#.png | Bin 0 -> 1240 bytes .../share/osp/bitmaps/720x1280/00_search_bg.#.png | Bin 0 -> 2848 bytes .../bitmaps/720x1280/00_search_edit_field_bg.#.png | Bin 0 -> 3053 bytes .../720x1280/00_search_edit_field_focus.#.png | Bin 0 -> 1268 bytes .../share/osp/bitmaps/720x1280/00_search_icon.png | Bin 0 -> 3603 bytes .../osp/bitmaps/720x1280/00_slider_handle.png | Bin 0 -> 3624 bytes .../bitmaps/720x1280/00_slider_handle_focus.png | Bin 0 -> 3900 bytes .../osp/bitmaps/720x1280/00_slider_popup_bg.#.png | Bin 0 -> 3412 bytes .../osp/bitmaps/720x1280/00_softkey_icon_add.png | Bin 0 -> 3037 bytes .../osp/bitmaps/720x1280/00_softkey_icon_zoom.png | Bin 0 -> 3702 bytes .../osp/bitmaps/720x1280/00_softkey_left_bg.png | Bin 0 -> 3165 bytes .../bitmaps/720x1280/00_softkey_left_text_bg.png | Bin 0 -> 3207 bytes .../osp/bitmaps/720x1280/00_softkey_right_bg.png | Bin 0 -> 3172 bytes .../bitmaps/720x1280/00_softkey_right_text_bg.png | Bin 0 -> 3208 bytes .../osp/bitmaps/720x1280/00_split_handler_bg.#.png | Bin 0 -> 2828 bytes .../bitmaps/720x1280/00_system_control_bg.#.png | Bin 0 -> 3141 bytes .../usr/share/osp/bitmaps/720x1280/00_tab_bg.#.png | Bin 0 -> 976 bytes .../share/osp/bitmaps/720x1280/00_tab_focus.#.png | Bin 0 -> 2863 bytes .../osp/bitmaps/720x1280/00_tab_press_bg.#.png | Bin 0 -> 1061 bytes .../osp/bitmaps/720x1280/00_tab_select_bar.#.png | Bin 0 -> 954 bytes .../osp/bitmaps/720x1280/00_thumbs_bg_focus.#.png | Bin 0 -> 2874 bytes .../osp/bitmaps/720x1280/00_thumbs_line_bg.#.png | Bin 0 -> 2871 bytes .../720x1280/00_time_picker_keypad_bg.#.png | Bin 0 -> 2885 bytes .../720x1280/00_time_picker_keypad_button_bg.#.png | Bin 0 -> 2963 bytes .../00_time_picker_keypad_button_bg_ef.#.png | Bin 0 -> 3164 bytes .../720x1280/00_time_picker_number_bg.#.png | Bin 0 -> 978 bytes .../osp/bitmaps/720x1280/00_time_picker_tail.png | Bin 0 -> 2990 bytes .../bitmaps/720x1280/00_time_picker_tail_01.png | Bin 0 -> 3013 bytes .../share/osp/bitmaps/720x1280/00_title_bg.#.png | Bin 0 -> 2848 bytes .../share/osp/bitmaps/720x1280/00_toolbar_bg.#.png | Bin 0 -> 2848 bytes .../osp/bitmaps/720x1280/00_toolbar_button.#.png | Bin 0 -> 5692 bytes .../bitmaps/720x1280/00_toolbar_button_bg.#.png | Bin 0 -> 2172 bytes .../720x1280/00_toolbar_button_ef_focus.#.png | Bin 0 -> 4203 bytes .../bitmaps/720x1280/00_toolbar_button_focus.#.png | Bin 0 -> 2568 bytes .../bitmaps/720x1280/00_toolbar_button_press.#.png | Bin 0 -> 6351 bytes .../osp/bitmaps/720x1280/00_toolbar_press.#.png | Bin 0 -> 2996 bytes .../usr/share/osp/bitmaps/720x1280/TTS_focus.#.png | Bin 0 -> 3160 bytes .../share/osp/bitmaps/720x1280/TTS_popup_bg.#.png | Bin 0 -> 3659 bytes .../bitmaps/720x1280/black/00_badge_bg_ef.#.png | Bin 0 -> 2328 bytes .../720x1280/black/00_button_01_dim_ef.#.png | Bin 0 -> 1374 bytes .../bitmaps/720x1280/black/00_button_01_ef.#.png | Bin 0 -> 1395 bytes .../720x1280/black/00_button_01_press_ef.#.png | Bin 0 -> 3009 bytes .../720x1280/black/00_button_expand_closed_ef.png | Bin 0 -> 1740 bytes .../720x1280/black/00_button_expand_opened_ef.png | Bin 0 -> 1697 bytes .../bitmaps/720x1280/black/00_button_left_ef.png | Bin 0 -> 1562 bytes .../osp/bitmaps/720x1280/black/00_button_off.png | Bin 0 -> 6416 bytes .../bitmaps/720x1280/black/00_button_off_dim.png | Bin 0 -> 6284 bytes .../720x1280/black/00_button_off_handler.png | Bin 0 -> 7080 bytes .../720x1280/black/00_button_off_handler_dim.png | Bin 0 -> 7002 bytes .../osp/bitmaps/720x1280/black/00_button_on.png | Bin 0 -> 6625 bytes .../bitmaps/720x1280/black/00_button_on_dim.png | Bin 0 -> 6525 bytes .../720x1280/black/00_button_on_handler.png | Bin 0 -> 6262 bytes .../720x1280/black/00_button_on_handler_dim.png | Bin 0 -> 6154 bytes .../bitmaps/720x1280/black/00_button_on_off_bg.png | Bin 0 -> 6313 bytes .../720x1280/black/00_button_on_off_bg_dim.png | Bin 0 -> 6252 bytes .../720x1280/black/00_button_on_off_handler.png | Bin 0 -> 5946 bytes .../black/00_button_on_off_handler_dim.png | Bin 0 -> 5526 bytes .../720x1280/black/00_button_radio_Activated.png | Bin 0 -> 1837 bytes .../black/00_button_radio_Activated_dim.png | Bin 0 -> 3662 bytes .../720x1280/black/00_button_radio_activated.png | Bin 0 -> 3215 bytes .../black/00_button_radio_activated_dim.png | Bin 0 -> 3183 bytes .../black/00_button_radio_activated_press.png | Bin 0 -> 1463 bytes .../bitmaps/720x1280/black/00_button_radio_bg.png | Bin 0 -> 6227 bytes .../720x1280/black/00_button_radio_dim_bg.png | Bin 0 -> 6067 bytes .../720x1280/black/00_button_radio_normal1.png | Bin 0 -> 4623 bytes .../720x1280/black/00_button_radio_normal2.png | Bin 0 -> 3929 bytes .../720x1280/black/00_button_radio_press.png | Bin 0 -> 3620 bytes .../720x1280/black/00_button_radio_press_bg.png | Bin 0 -> 4337 bytes .../bitmaps/720x1280/black/00_button_right_ef.png | Bin 0 -> 1236 bytes .../bitmaps/720x1280/black/00_check_Activated.png | Bin 0 -> 1784 bytes .../720x1280/black/00_check_Activated_dim.png | Bin 0 -> 3647 bytes .../bitmaps/720x1280/black/00_check_activated.png | Bin 0 -> 3190 bytes .../720x1280/black/00_check_activated_dim.png | Bin 0 -> 3189 bytes .../720x1280/black/00_check_activated_press.png | Bin 0 -> 3204 bytes .../osp/bitmaps/720x1280/black/00_check_bg.png | Bin 0 -> 1739 bytes .../osp/bitmaps/720x1280/black/00_check_dim.png | Bin 0 -> 5267 bytes .../osp/bitmaps/720x1280/black/00_check_dim_bg.png | Bin 0 -> 1728 bytes .../osp/bitmaps/720x1280/black/00_check_press.png | Bin 0 -> 3358 bytes .../bitmaps/720x1280/black/00_check_press_bg.png | Bin 0 -> 1760 bytes .../osp/bitmaps/720x1280/black/00_circle_bg_ef.png | Bin 0 -> 2791 bytes .../bitmaps/720x1280/black/00_circle_bg_ef_dim.png | Bin 0 -> 2560 bytes .../720x1280/black/00_circle_bg_ef_press.png | Bin 0 -> 1508 bytes .../720x1280/black/00_color_picker_handler.png | Bin 0 -> 2930 bytes .../720x1280/black/00_contacts_button_bg.#.png | Bin 0 -> 1188 bytes .../black/00_contacts_button_bg_dim_ef.#.png | Bin 0 -> 1429 bytes .../720x1280/black/00_contacts_button_bg_ef.#.png | Bin 0 -> 1429 bytes .../black/00_contacts_button_bg_press_ef.#.png | Bin 0 -> 3210 bytes .../720x1280/black/00_contacts_button_focus.#.png | Bin 0 -> 3014 bytes .../black/00_contacts_button_focus_ef.#.png | Bin 0 -> 1174 bytes .../black/00_edit_group_bg_bottom_ef.#.png | Bin 0 -> 3156 bytes .../black/00_edit_group_bg_center_ef.#.png | Bin 0 -> 2899 bytes .../720x1280/black/00_edit_group_bg_ef.#.png | Bin 0 -> 3152 bytes .../720x1280/black/00_edit_group_bg_top_ef.#.png | Bin 0 -> 3146 bytes .../black/00_effect_footer_bounce_left.png | Bin 0 -> 6039 bytes .../black/00_effect_footer_bounce_left_h.png | Bin 0 -> 5723 bytes .../black/00_effect_footer_bounce_right.png | Bin 0 -> 5986 bytes .../black/00_effect_footer_bounce_right_h.png | Bin 0 -> 5647 bytes .../720x1280/black/00_effect_tab_bounce_left.png | Bin 0 -> 5988 bytes .../black/00_effect_tab_bounce_left_02.png | Bin 0 -> 7078 bytes .../720x1280/black/00_effect_tab_bounce_left_h.png | Bin 0 -> 5871 bytes .../720x1280/black/00_effect_tab_bounce_right.png | Bin 0 -> 5974 bytes .../black/00_effect_tab_bounce_right_02.png | Bin 0 -> 7003 bytes .../black/00_effect_tab_bounce_right_h.png | Bin 0 -> 5791 bytes .../black/00_effect_title_tab_bounce_left.png | Bin 0 -> 5162 bytes .../black/00_effect_title_tab_bounce_right.png | Bin 0 -> 5071 bytes .../black/00_expandable_bg_bottom_ef.#.png | Bin 0 -> 3154 bytes .../black/00_expandable_bg_center_ef.#.png | Bin 0 -> 2862 bytes .../720x1280/black/00_expandable_bg_top_ef.#.png | Bin 0 -> 3173 bytes .../720x1280/black/00_fast_scroll_handler.#.png | Bin 0 -> 3808 bytes .../720x1280/black/00_fast_scroll_handler_h.#.png | Bin 0 -> 3761 bytes .../720x1280/black/00_fast_scroll_popup_bg.#.png | Bin 0 -> 3031 bytes .../black/00_fast_scroll_popup_bg_ef.#.png | Bin 0 -> 3646 bytes .../00_fast_scroll_rollover_bg_line_focus.#.png | Bin 0 -> 2859 bytes .../osp/bitmaps/720x1280/black/00_focus.#.png | Bin 0 -> 3012 bytes .../720x1280/black/00_header_process_01.png | Bin 0 -> 3452 bytes .../720x1280/black/00_header_process_02.png | Bin 0 -> 3425 bytes .../720x1280/black/00_header_process_03.png | Bin 0 -> 3386 bytes .../720x1280/black/00_header_process_04.png | Bin 0 -> 3455 bytes .../720x1280/black/00_header_process_05.png | Bin 0 -> 3479 bytes .../720x1280/black/00_header_process_06.png | Bin 0 -> 3485 bytes .../720x1280/black/00_header_process_07.png | Bin 0 -> 3469 bytes .../720x1280/black/00_header_process_08.png | Bin 0 -> 3485 bytes .../720x1280/black/00_header_process_09.png | Bin 0 -> 3466 bytes .../720x1280/black/00_header_process_10.png | Bin 0 -> 3448 bytes .../720x1280/black/00_header_process_11.png | Bin 0 -> 3450 bytes .../720x1280/black/00_header_process_12.png | Bin 0 -> 3467 bytes .../720x1280/black/00_header_process_13.png | Bin 0 -> 3481 bytes .../720x1280/black/00_header_process_14.png | Bin 0 -> 3460 bytes .../720x1280/black/00_header_process_15.png | Bin 0 -> 3465 bytes .../720x1280/black/00_header_process_16.png | Bin 0 -> 3451 bytes .../720x1280/black/00_header_process_17.png | Bin 0 -> 3423 bytes .../720x1280/black/00_header_process_18.png | Bin 0 -> 3386 bytes .../720x1280/black/00_header_process_19.png | Bin 0 -> 3460 bytes .../720x1280/black/00_header_process_20.png | Bin 0 -> 3479 bytes .../720x1280/black/00_header_process_21.png | Bin 0 -> 3468 bytes .../720x1280/black/00_header_process_22.png | Bin 0 -> 3463 bytes .../720x1280/black/00_header_process_23.png | Bin 0 -> 3461 bytes .../720x1280/black/00_header_process_24.png | Bin 0 -> 3457 bytes .../720x1280/black/00_header_process_25.png | Bin 0 -> 3433 bytes .../720x1280/black/00_header_process_26.png | Bin 0 -> 3433 bytes .../720x1280/black/00_header_process_27.png | Bin 0 -> 3460 bytes .../720x1280/black/00_header_process_28.png | Bin 0 -> 3465 bytes .../720x1280/black/00_header_process_29.png | Bin 0 -> 3457 bytes .../720x1280/black/00_header_process_30.png | Bin 0 -> 3468 bytes .../osp/bitmaps/720x1280/black/00_icon_Back_ef.png | Bin 0 -> 2355 bytes .../bitmaps/720x1280/black/00_icon_Back_ef_02.png | Bin 0 -> 2381 bytes .../720x1280/black/00_icon_Back_trans_ef.png | Bin 0 -> 1734 bytes .../720x1280/black/00_icon_SIP_close_ef.png | Bin 0 -> 1693 bytes .../osp/bitmaps/720x1280/black/00_icon_back_ef.png | Bin 0 -> 1760 bytes .../720x1280/black/00_icon_back_trans_ef.png | Bin 0 -> 1760 bytes .../osp/bitmaps/720x1280/black/00_icon_jump.png | Bin 0 -> 3073 bytes .../osp/bitmaps/720x1280/black/00_icon_jump_ef.png | Bin 0 -> 1232 bytes .../bitmaps/720x1280/black/00_icon_jump_left.png | Bin 0 -> 3113 bytes .../720x1280/black/00_icon_jump_left_ef.png | Bin 0 -> 1291 bytes .../osp/bitmaps/720x1280/black/00_icon_more_ef.png | Bin 0 -> 1201 bytes .../720x1280/black/00_indexlist_bg_ef.#.png | Bin 0 -> 2871 bytes .../black/00_list_group_bg_bottom_ef.#.png | Bin 0 -> 3163 bytes .../black/00_list_group_bg_center_ef.#.png | Bin 0 -> 2933 bytes .../720x1280/black/00_list_group_bg_ef.#.png | Bin 0 -> 3435 bytes .../720x1280/black/00_list_group_bg_top_ef.#.png | Bin 0 -> 3155 bytes .../bitmaps/720x1280/black/00_list_process_01.png | Bin 0 -> 3926 bytes .../bitmaps/720x1280/black/00_list_process_02.png | Bin 0 -> 3888 bytes .../bitmaps/720x1280/black/00_list_process_03.png | Bin 0 -> 3866 bytes .../bitmaps/720x1280/black/00_list_process_04.png | Bin 0 -> 3955 bytes .../bitmaps/720x1280/black/00_list_process_05.png | Bin 0 -> 3956 bytes .../bitmaps/720x1280/black/00_list_process_06.png | Bin 0 -> 3922 bytes .../bitmaps/720x1280/black/00_list_process_07.png | Bin 0 -> 3905 bytes .../bitmaps/720x1280/black/00_list_process_08.png | Bin 0 -> 4013 bytes .../bitmaps/720x1280/black/00_list_process_09.png | Bin 0 -> 4041 bytes .../bitmaps/720x1280/black/00_list_process_10.png | Bin 0 -> 3960 bytes .../bitmaps/720x1280/black/00_list_process_11.png | Bin 0 -> 3907 bytes .../bitmaps/720x1280/black/00_list_process_12.png | Bin 0 -> 3953 bytes .../bitmaps/720x1280/black/00_list_process_13.png | Bin 0 -> 3989 bytes .../bitmaps/720x1280/black/00_list_process_14.png | Bin 0 -> 3954 bytes .../bitmaps/720x1280/black/00_list_process_15.png | Bin 0 -> 4006 bytes .../bitmaps/720x1280/black/00_list_process_16.png | Bin 0 -> 3928 bytes .../bitmaps/720x1280/black/00_list_process_17.png | Bin 0 -> 3895 bytes .../bitmaps/720x1280/black/00_list_process_18.png | Bin 0 -> 3880 bytes .../bitmaps/720x1280/black/00_list_process_19.png | Bin 0 -> 3965 bytes .../bitmaps/720x1280/black/00_list_process_20.png | Bin 0 -> 3973 bytes .../bitmaps/720x1280/black/00_list_process_21.png | Bin 0 -> 3915 bytes .../bitmaps/720x1280/black/00_list_process_22.png | Bin 0 -> 3926 bytes .../bitmaps/720x1280/black/00_list_process_23.png | Bin 0 -> 3990 bytes .../bitmaps/720x1280/black/00_list_process_24.png | Bin 0 -> 3985 bytes .../bitmaps/720x1280/black/00_list_process_25.png | Bin 0 -> 3922 bytes .../bitmaps/720x1280/black/00_list_process_26.png | Bin 0 -> 3904 bytes .../bitmaps/720x1280/black/00_list_process_27.png | Bin 0 -> 3931 bytes .../bitmaps/720x1280/black/00_list_process_28.png | Bin 0 -> 3967 bytes .../bitmaps/720x1280/black/00_list_process_29.png | Bin 0 -> 3969 bytes .../bitmaps/720x1280/black/00_list_process_30.png | Bin 0 -> 3980 bytes .../720x1280/black/00_more_popup_press.#.png | Bin 0 -> 2978 bytes .../black/00_option_panel_handle_bg_ef.png | Bin 0 -> 3693 bytes .../black/00_option_panel_handle_bg_ef_press.png | Bin 0 -> 3555 bytes .../720x1280/black/00_panel_handle_bg_ef.#.png | Bin 0 -> 4746 bytes .../black/00_panel_handle_bg_ef_press.#.png | Bin 0 -> 4214 bytes .../720x1280/black/00_panel_list_bg_ef_press.#.png | Bin 0 -> 3102 bytes .../720x1280/black/00_picker_button_dim_ef.#.png | Bin 0 -> 3547 bytes .../720x1280/black/00_picker_button_ef.#.png | Bin 0 -> 3547 bytes .../720x1280/black/00_picker_button_press_ef.#.png | Bin 0 -> 3240 bytes .../osp/bitmaps/720x1280/black/00_popup_bg.#.png | Bin 0 -> 663 bytes .../bitmaps/720x1280/black/00_popup_bg_ef.#.png | Bin 0 -> 4790 bytes .../720x1280/black/00_popup_bottom_bg.#.png | Bin 0 -> 2991 bytes .../720x1280/black/00_popup_bottom_ef.#.png | Bin 0 -> 2914 bytes .../720x1280/black/00_popup_bubble_02_ef.#.png | Bin 0 -> 1839 bytes .../720x1280/black/00_popup_bubble_bg.#.png | Bin 0 -> 1362 bytes .../720x1280/black/00_popup_bubble_bg_ef.#.png | Bin 0 -> 2374 bytes .../720x1280/black/00_popup_bubble_tail_bottom.png | Bin 0 -> 1326 bytes .../black/00_popup_bubble_tail_bottom_ef.png | Bin 0 -> 1903 bytes .../720x1280/black/00_popup_bubble_tail_left.png | Bin 0 -> 1290 bytes .../black/00_popup_bubble_tail_left_ef.png | Bin 0 -> 1730 bytes .../720x1280/black/00_popup_bubble_tail_right.png | Bin 0 -> 1290 bytes .../black/00_popup_bubble_tail_right_ef.png | Bin 0 -> 1690 bytes .../720x1280/black/00_popup_bubble_tail_top.png | Bin 0 -> 1270 bytes .../720x1280/black/00_popup_bubble_tail_top_ef.png | Bin 0 -> 1645 bytes .../720x1280/black/00_popup_button_dim_ef.#.png | Bin 0 -> 1670 bytes .../720x1280/black/00_popup_button_normal_ef.#.png | Bin 0 -> 1711 bytes .../720x1280/black/00_popup_button_press_ef.#.png | Bin 0 -> 3057 bytes .../bitmaps/720x1280/black/00_popup_scroll.#.png | Bin 0 -> 2999 bytes .../bitmaps/720x1280/black/00_popup_title_bg.#.png | Bin 0 -> 1205 bytes .../bitmaps/720x1280/black/00_popup_title_ef.#.png | Bin 0 -> 1136 bytes .../720x1280/black/00_progress_bar_ef.#.png | Bin 0 -> 1359 bytes .../bitmaps/720x1280/black/00_progress_ef_bg.#.png | Bin 0 -> 1407 bytes .../bitmaps/720x1280/black/00_scroll_bar_h.#.png | Bin 0 -> 1131 bytes .../720x1280/black/00_scroll_bar_h_ef.#.png | Bin 0 -> 1224 bytes .../720x1280/black/00_scroll_bar_handler_h.png | Bin 0 -> 2847 bytes .../720x1280/black/00_scroll_bar_handler_v.png | Bin 0 -> 2857 bytes .../bitmaps/720x1280/black/00_scroll_bar_v.#.png | Bin 0 -> 1123 bytes .../720x1280/black/00_scroll_bar_v_ef.#.png | Bin 0 -> 3103 bytes .../bitmaps/720x1280/black/00_search_bg_ef.#.png | Bin 0 -> 2857 bytes .../black/00_search_edit_field_bg_ef.#.png | Bin 0 -> 1834 bytes .../bitmaps/720x1280/black/00_search_icon_ef.png | Bin 0 -> 1806 bytes .../bitmaps/720x1280/black/00_slider_handle_ef.png | Bin 0 -> 5773 bytes .../720x1280/black/00_slider_handle_ef_dim.png | Bin 0 -> 5649 bytes .../720x1280/black/00_slider_handle_ef_press.png | Bin 0 -> 3464 bytes .../720x1280/black/00_softkey_left_bg_ef.png | Bin 0 -> 3300 bytes .../720x1280/black/00_softkey_left_bg_ef_press.png | Bin 0 -> 3575 bytes .../720x1280/black/00_softkey_left_text_bg_ef.png | Bin 0 -> 3372 bytes .../black/00_softkey_left_text_bg_ef_press.png | Bin 0 -> 3623 bytes .../720x1280/black/00_softkey_right_bg_ef.png | Bin 0 -> 3560 bytes .../black/00_softkey_right_bg_ef_press.png | Bin 0 -> 3548 bytes .../720x1280/black/00_softkey_right_text_bg_ef.png | Bin 0 -> 3624 bytes .../black/00_softkey_right_text_bg_ef_press.png | Bin 0 -> 3579 bytes .../720x1280/black/00_split_handler_bg_ef_h.#.png | Bin 0 -> 2859 bytes .../720x1280/black/00_split_handler_bg_ef_v.#.png | Bin 0 -> 2863 bytes .../bitmaps/720x1280/black/00_split_handler_h.png | Bin 0 -> 2820 bytes .../bitmaps/720x1280/black/00_split_handler_v.png | Bin 0 -> 2820 bytes .../bitmaps/720x1280/black/00_sub_title_ef.#.png | Bin 0 -> 2878 bytes .../bitmaps/720x1280/black/00_tab_press_ef.#.png | Bin 0 -> 2889 bytes .../bitmaps/720x1280/black/00_title_bg_ef.#.png | Bin 0 -> 2868 bytes .../bitmaps/720x1280/black/00_title_press_ef.#.png | Bin 0 -> 2889 bytes .../bitmaps/720x1280/black/00_toolbar_bg_ef.#.png | Bin 0 -> 2866 bytes .../720x1280/black/00_toolbar_bg_shadow.#.png | Bin 0 -> 2841 bytes .../bitmaps/720x1280/black/00_toolbar_button.#.png | Bin 0 -> 5692 bytes .../black/00_toolbar_button_bg_dim_ef.#.png | Bin 0 -> 3559 bytes .../720x1280/black/00_toolbar_button_bg_ef.#.png | Bin 0 -> 3711 bytes .../720x1280/black/00_toolbar_button_ef.#.png | Bin 0 -> 7907 bytes .../black/00_toolbar_button_ef_press.#.png | Bin 0 -> 6965 bytes .../720x1280/black/00_toolbar_button_press.#.png | Bin 0 -> 6351 bytes .../black/00_toolbar_button_press_ef.#.png | Bin 0 -> 5018 bytes .../720x1280/black/00_toolbar_ef_press.#.png | Bin 0 -> 3295 bytes .../720x1280/black/00_toolbar_press_ef.#.png | Bin 0 -> 2889 bytes .../osp/bitmaps/720x1280/black/pd_btn_bg.#.png | Bin 0 -> 4550 bytes .../720x1280/black/pd_btn_bg_arrow_down.png | Bin 0 -> 1461 bytes .../bitmaps/720x1280/black/pd_btn_bg_arrow_up.png | Bin 0 -> 1481 bytes .../bitmaps/720x1280/copy&paste_Handler_center.png | Bin 0 -> 4631 bytes .../720x1280/copy&paste_Handler_center_reverse.png | Bin 0 -> 4626 bytes .../bitmaps/720x1280/copy&paste_Handler_left.png | Bin 0 -> 4067 bytes .../720x1280/copy&paste_Handler_left_01.png | Bin 0 -> 3943 bytes .../720x1280/copy&paste_Handler_left_reverse.png | Bin 0 -> 4039 bytes .../bitmaps/720x1280/copy&paste_Handler_right.png | Bin 0 -> 4133 bytes .../bitmaps/720x1280/copy&paste_Magnifier.#.png | Bin 0 -> 6626 bytes .../720x1280/copy&paste_Magnifier_mask.#.png | Bin 0 -> 3538 bytes .../bitmaps/720x1280/copy&paste_icon_search.png | Bin 0 -> 3393 bytes .../bitmaps/720x1280/default/00_badge_bg_ef.#.png | Bin 0 -> 2328 bytes .../720x1280/default/00_button_01_dim_ef.#.png | Bin 0 -> 1374 bytes .../bitmaps/720x1280/default/00_button_01_ef.#.png | Bin 0 -> 1395 bytes .../720x1280/default/00_button_01_press_ef.#.png | Bin 0 -> 3009 bytes .../default/00_button_expand_closed_ef.png | Bin 0 -> 1740 bytes .../default/00_button_expand_opened_ef.png | Bin 0 -> 1697 bytes .../bitmaps/720x1280/default/00_button_left_ef.png | Bin 0 -> 1562 bytes .../osp/bitmaps/720x1280/default/00_button_off.png | Bin 0 -> 6416 bytes .../bitmaps/720x1280/default/00_button_off_dim.png | Bin 0 -> 6284 bytes .../720x1280/default/00_button_off_handler.png | Bin 0 -> 7080 bytes .../720x1280/default/00_button_off_handler_dim.png | Bin 0 -> 7002 bytes .../osp/bitmaps/720x1280/default/00_button_on.png | Bin 0 -> 6625 bytes .../bitmaps/720x1280/default/00_button_on_dim.png | Bin 0 -> 6525 bytes .../720x1280/default/00_button_on_handler.png | Bin 0 -> 6262 bytes .../720x1280/default/00_button_on_handler_dim.png | Bin 0 -> 6154 bytes .../720x1280/default/00_button_on_off_bg.png | Bin 0 -> 6313 bytes .../720x1280/default/00_button_on_off_bg_dim.png | Bin 0 -> 6252 bytes .../720x1280/default/00_button_on_off_handler.png | Bin 0 -> 5946 bytes .../default/00_button_on_off_handler_dim.png | Bin 0 -> 5526 bytes .../720x1280/default/00_button_radio_Activated.png | Bin 0 -> 1837 bytes .../default/00_button_radio_Activated_dim.png | Bin 0 -> 3662 bytes .../720x1280/default/00_button_radio_activated.png | Bin 0 -> 3215 bytes .../default/00_button_radio_activated_dim.png | Bin 0 -> 3183 bytes .../default/00_button_radio_activated_press.png | Bin 0 -> 1463 bytes .../720x1280/default/00_button_radio_bg.png | Bin 0 -> 6227 bytes .../720x1280/default/00_button_radio_dim_bg.png | Bin 0 -> 6067 bytes .../720x1280/default/00_button_radio_normal1.png | Bin 0 -> 4623 bytes .../720x1280/default/00_button_radio_normal2.png | Bin 0 -> 3929 bytes .../720x1280/default/00_button_radio_press.png | Bin 0 -> 3620 bytes .../720x1280/default/00_button_radio_press_bg.png | Bin 0 -> 4337 bytes .../720x1280/default/00_button_right_ef.png | Bin 0 -> 1236 bytes .../720x1280/default/00_check_Activated.png | Bin 0 -> 1784 bytes .../720x1280/default/00_check_Activated_dim.png | Bin 0 -> 3647 bytes .../720x1280/default/00_check_activated.png | Bin 0 -> 3190 bytes .../720x1280/default/00_check_activated_dim.png | Bin 0 -> 3189 bytes .../720x1280/default/00_check_activated_press.png | Bin 0 -> 3204 bytes .../osp/bitmaps/720x1280/default/00_check_bg.png | Bin 0 -> 1739 bytes .../osp/bitmaps/720x1280/default/00_check_dim.png | Bin 0 -> 5267 bytes .../bitmaps/720x1280/default/00_check_dim_bg.png | Bin 0 -> 1728 bytes .../bitmaps/720x1280/default/00_check_press.png | Bin 0 -> 3358 bytes .../bitmaps/720x1280/default/00_check_press_bg.png | Bin 0 -> 1760 bytes .../bitmaps/720x1280/default/00_circle_bg_ef.png | Bin 0 -> 2791 bytes .../720x1280/default/00_circle_bg_ef_dim.png | Bin 0 -> 2560 bytes .../720x1280/default/00_circle_bg_ef_press.png | Bin 0 -> 1508 bytes .../720x1280/default/00_color_picker_handler.png | Bin 0 -> 2930 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 0 -> 1429 bytes .../default/00_contacts_button_bg_press_ef.#.png | Bin 0 -> 3210 bytes .../default/00_contacts_button_focus.#.png | Bin 0 -> 3014 bytes .../default/00_contacts_button_focus_ef.#.png | Bin 0 -> 1174 bytes .../default/00_edit_group_bg_bottom_ef.#.png | Bin 0 -> 3156 bytes .../default/00_edit_group_bg_center_ef.#.png | Bin 0 -> 2899 bytes .../720x1280/default/00_edit_group_bg_ef.#.png | Bin 0 -> 3152 bytes .../720x1280/default/00_edit_group_bg_top_ef.#.png | Bin 0 -> 3146 bytes .../default/00_effect_footer_bounce_left.png | Bin 0 -> 6039 bytes .../default/00_effect_footer_bounce_left_h.png | Bin 0 -> 5723 bytes .../default/00_effect_footer_bounce_right.png | Bin 0 -> 5986 bytes .../default/00_effect_footer_bounce_right_h.png | Bin 0 -> 5647 bytes .../720x1280/default/00_effect_tab_bounce_left.png | Bin 0 -> 5988 bytes .../default/00_effect_tab_bounce_left_02.png | Bin 0 -> 7078 bytes .../default/00_effect_tab_bounce_left_h.png | Bin 0 -> 5871 bytes .../default/00_effect_tab_bounce_right.png | Bin 0 -> 5974 bytes .../default/00_effect_tab_bounce_right_02.png | Bin 0 -> 7003 bytes .../default/00_effect_tab_bounce_right_h.png | Bin 0 -> 5791 bytes .../default/00_effect_title_tab_bounce_left.png | Bin 0 -> 5162 bytes .../default/00_effect_title_tab_bounce_right.png | Bin 0 -> 5071 bytes .../default/00_expandable_bg_bottom_ef.#.png | Bin 0 -> 3154 bytes .../default/00_expandable_bg_center_ef.#.png | Bin 0 -> 2862 bytes .../720x1280/default/00_expandable_bg_top_ef.#.png | Bin 0 -> 3173 bytes .../720x1280/default/00_fast_scroll_handler.#.png | Bin 0 -> 3808 bytes .../default/00_fast_scroll_handler_h.#.png | Bin 0 -> 3761 bytes .../720x1280/default/00_fast_scroll_popup_bg.#.png | Bin 0 -> 3031 bytes .../default/00_fast_scroll_popup_bg_ef.#.png | Bin 0 -> 3646 bytes .../00_fast_scroll_rollover_bg_line_focus.#.png | Bin 0 -> 2859 bytes .../osp/bitmaps/720x1280/default/00_focus.#.png | Bin 0 -> 3012 bytes .../720x1280/default/00_header_process_01.png | Bin 0 -> 3452 bytes .../720x1280/default/00_header_process_02.png | Bin 0 -> 3425 bytes .../720x1280/default/00_header_process_03.png | Bin 0 -> 3386 bytes .../720x1280/default/00_header_process_04.png | Bin 0 -> 3455 bytes .../720x1280/default/00_header_process_05.png | Bin 0 -> 3479 bytes .../720x1280/default/00_header_process_06.png | Bin 0 -> 3485 bytes .../720x1280/default/00_header_process_07.png | Bin 0 -> 3469 bytes .../720x1280/default/00_header_process_08.png | Bin 0 -> 3485 bytes .../720x1280/default/00_header_process_09.png | Bin 0 -> 3466 bytes .../720x1280/default/00_header_process_10.png | Bin 0 -> 3448 bytes .../720x1280/default/00_header_process_11.png | Bin 0 -> 3450 bytes .../720x1280/default/00_header_process_12.png | Bin 0 -> 3467 bytes .../720x1280/default/00_header_process_13.png | Bin 0 -> 3481 bytes .../720x1280/default/00_header_process_14.png | Bin 0 -> 3460 bytes .../720x1280/default/00_header_process_15.png | Bin 0 -> 3465 bytes .../720x1280/default/00_header_process_16.png | Bin 0 -> 3451 bytes .../720x1280/default/00_header_process_17.png | Bin 0 -> 3423 bytes .../720x1280/default/00_header_process_18.png | Bin 0 -> 3386 bytes .../720x1280/default/00_header_process_19.png | Bin 0 -> 3460 bytes .../720x1280/default/00_header_process_20.png | Bin 0 -> 3479 bytes .../720x1280/default/00_header_process_21.png | Bin 0 -> 3468 bytes .../720x1280/default/00_header_process_22.png | Bin 0 -> 3463 bytes .../720x1280/default/00_header_process_23.png | Bin 0 -> 3461 bytes .../720x1280/default/00_header_process_24.png | Bin 0 -> 3457 bytes .../720x1280/default/00_header_process_25.png | Bin 0 -> 3433 bytes .../720x1280/default/00_header_process_26.png | Bin 0 -> 3433 bytes .../720x1280/default/00_header_process_27.png | Bin 0 -> 3460 bytes .../720x1280/default/00_header_process_28.png | Bin 0 -> 3465 bytes .../720x1280/default/00_header_process_29.png | Bin 0 -> 3457 bytes .../720x1280/default/00_header_process_30.png | Bin 0 -> 3468 bytes .../bitmaps/720x1280/default/00_icon_Back_ef.png | Bin 0 -> 2355 bytes .../720x1280/default/00_icon_Back_ef_02.png | Bin 0 -> 2381 bytes .../720x1280/default/00_icon_Back_trans_ef.png | Bin 0 -> 1734 bytes .../720x1280/default/00_icon_SIP_close_ef.png | Bin 0 -> 1693 bytes .../bitmaps/720x1280/default/00_icon_back_ef.png | Bin 0 -> 1760 bytes .../720x1280/default/00_icon_back_trans_ef.png | Bin 0 -> 1760 bytes .../osp/bitmaps/720x1280/default/00_icon_jump.png | Bin 0 -> 3073 bytes .../bitmaps/720x1280/default/00_icon_jump_ef.png | Bin 0 -> 1232 bytes .../bitmaps/720x1280/default/00_icon_jump_left.png | Bin 0 -> 3113 bytes .../720x1280/default/00_icon_jump_left_ef.png | Bin 0 -> 1291 bytes .../bitmaps/720x1280/default/00_icon_more_ef.png | Bin 0 -> 1201 bytes .../720x1280/default/00_indexlist_bg_ef.#.png | Bin 0 -> 2871 bytes .../default/00_list_group_bg_bottom_ef.#.png | Bin 0 -> 3163 bytes .../default/00_list_group_bg_center_ef.#.png | Bin 0 -> 2933 bytes .../720x1280/default/00_list_group_bg_ef.#.png | Bin 0 -> 3435 bytes .../720x1280/default/00_list_group_bg_top_ef.#.png | Bin 0 -> 3155 bytes .../720x1280/default/00_list_process_01.png | Bin 0 -> 3926 bytes .../720x1280/default/00_list_process_02.png | Bin 0 -> 3888 bytes .../720x1280/default/00_list_process_03.png | Bin 0 -> 3866 bytes .../720x1280/default/00_list_process_04.png | Bin 0 -> 3955 bytes .../720x1280/default/00_list_process_05.png | Bin 0 -> 3956 bytes .../720x1280/default/00_list_process_06.png | Bin 0 -> 3922 bytes .../720x1280/default/00_list_process_07.png | Bin 0 -> 3905 bytes .../720x1280/default/00_list_process_08.png | Bin 0 -> 4013 bytes .../720x1280/default/00_list_process_09.png | Bin 0 -> 4041 bytes .../720x1280/default/00_list_process_10.png | Bin 0 -> 3960 bytes .../720x1280/default/00_list_process_11.png | Bin 0 -> 3907 bytes .../720x1280/default/00_list_process_12.png | Bin 0 -> 3953 bytes .../720x1280/default/00_list_process_13.png | Bin 0 -> 3989 bytes .../720x1280/default/00_list_process_14.png | Bin 0 -> 3954 bytes .../720x1280/default/00_list_process_15.png | Bin 0 -> 4006 bytes .../720x1280/default/00_list_process_16.png | Bin 0 -> 3928 bytes .../720x1280/default/00_list_process_17.png | Bin 0 -> 3895 bytes .../720x1280/default/00_list_process_18.png | Bin 0 -> 3880 bytes .../720x1280/default/00_list_process_19.png | Bin 0 -> 3965 bytes .../720x1280/default/00_list_process_20.png | Bin 0 -> 3973 bytes .../720x1280/default/00_list_process_21.png | Bin 0 -> 3915 bytes .../720x1280/default/00_list_process_22.png | Bin 0 -> 3926 bytes .../720x1280/default/00_list_process_23.png | Bin 0 -> 3990 bytes .../720x1280/default/00_list_process_24.png | Bin 0 -> 3985 bytes .../720x1280/default/00_list_process_25.png | Bin 0 -> 3922 bytes .../720x1280/default/00_list_process_26.png | Bin 0 -> 3904 bytes .../720x1280/default/00_list_process_27.png | Bin 0 -> 3931 bytes .../720x1280/default/00_list_process_28.png | Bin 0 -> 3967 bytes .../720x1280/default/00_list_process_29.png | Bin 0 -> 3969 bytes .../720x1280/default/00_list_process_30.png | Bin 0 -> 3980 bytes .../720x1280/default/00_more_popup_press.#.png | Bin 0 -> 2978 bytes .../default/00_option_panel_handle_bg_ef.png | Bin 0 -> 3693 bytes .../default/00_option_panel_handle_bg_ef_press.png | Bin 0 -> 3555 bytes .../720x1280/default/00_panel_handle_bg_ef.#.png | Bin 0 -> 4746 bytes .../default/00_panel_handle_bg_ef_press.#.png | Bin 0 -> 4214 bytes .../default/00_panel_list_bg_ef_press.#.png | Bin 0 -> 3102 bytes .../720x1280/default/00_picker_button_dim_ef.#.png | Bin 0 -> 3547 bytes .../720x1280/default/00_picker_button_ef.#.png | Bin 0 -> 3547 bytes .../default/00_picker_button_press_ef.#.png | Bin 0 -> 3240 bytes .../osp/bitmaps/720x1280/default/00_popup_bg.#.png | Bin 0 -> 663 bytes .../bitmaps/720x1280/default/00_popup_bg_ef.#.png | Bin 0 -> 4790 bytes .../720x1280/default/00_popup_bottom_bg.#.png | Bin 0 -> 2991 bytes .../720x1280/default/00_popup_bottom_ef.#.png | Bin 0 -> 2914 bytes .../720x1280/default/00_popup_bubble_02_ef.#.png | Bin 0 -> 1839 bytes .../720x1280/default/00_popup_bubble_bg.#.png | Bin 0 -> 1362 bytes .../720x1280/default/00_popup_bubble_bg_ef.#.png | Bin 0 -> 2374 bytes .../default/00_popup_bubble_tail_bottom.png | Bin 0 -> 1326 bytes .../default/00_popup_bubble_tail_bottom_ef.png | Bin 0 -> 1903 bytes .../720x1280/default/00_popup_bubble_tail_left.png | Bin 0 -> 1290 bytes .../default/00_popup_bubble_tail_left_ef.png | Bin 0 -> 1730 bytes .../default/00_popup_bubble_tail_right.png | Bin 0 -> 1290 bytes .../default/00_popup_bubble_tail_right_ef.png | Bin 0 -> 1690 bytes .../720x1280/default/00_popup_bubble_tail_top.png | Bin 0 -> 1270 bytes .../default/00_popup_bubble_tail_top_ef.png | Bin 0 -> 1645 bytes .../720x1280/default/00_popup_button_dim_ef.#.png | Bin 0 -> 1670 bytes .../default/00_popup_button_normal_ef.#.png | Bin 0 -> 1711 bytes .../default/00_popup_button_press_ef.#.png | Bin 0 -> 3057 bytes .../bitmaps/720x1280/default/00_popup_scroll.#.png | Bin 0 -> 2999 bytes .../720x1280/default/00_popup_title_bg.#.png | Bin 0 -> 1205 bytes .../720x1280/default/00_popup_title_ef.#.png | Bin 0 -> 1136 bytes .../720x1280/default/00_progress_bar_ef.#.png | Bin 0 -> 1359 bytes .../720x1280/default/00_progress_ef_bg.#.png | Bin 0 -> 1407 bytes .../bitmaps/720x1280/default/00_scroll_bar_h.#.png | Bin 0 -> 1131 bytes .../720x1280/default/00_scroll_bar_h_ef.#.png | Bin 0 -> 1224 bytes .../720x1280/default/00_scroll_bar_handler_h.png | Bin 0 -> 2847 bytes .../720x1280/default/00_scroll_bar_handler_v.png | Bin 0 -> 2857 bytes .../bitmaps/720x1280/default/00_scroll_bar_v.#.png | Bin 0 -> 1123 bytes .../720x1280/default/00_scroll_bar_v_ef.#.png | Bin 0 -> 3103 bytes .../bitmaps/720x1280/default/00_search_bg_ef.#.png | Bin 0 -> 2857 bytes .../default/00_search_edit_field_bg_ef.#.png | Bin 0 -> 1834 bytes .../bitmaps/720x1280/default/00_search_icon_ef.png | Bin 0 -> 1806 bytes .../720x1280/default/00_slider_handle_ef.png | Bin 0 -> 5773 bytes .../720x1280/default/00_slider_handle_ef_dim.png | Bin 0 -> 5649 bytes .../720x1280/default/00_slider_handle_ef_press.png | Bin 0 -> 3464 bytes .../720x1280/default/00_softkey_left_bg_ef.png | Bin 0 -> 3300 bytes .../default/00_softkey_left_bg_ef_press.png | Bin 0 -> 3575 bytes .../default/00_softkey_left_text_bg_ef.png | Bin 0 -> 3372 bytes .../default/00_softkey_left_text_bg_ef_press.png | Bin 0 -> 3623 bytes .../720x1280/default/00_softkey_right_bg_ef.png | Bin 0 -> 3560 bytes .../default/00_softkey_right_bg_ef_press.png | Bin 0 -> 3548 bytes .../default/00_softkey_right_text_bg_ef.png | Bin 0 -> 3624 bytes .../default/00_softkey_right_text_bg_ef_press.png | Bin 0 -> 3579 bytes .../default/00_split_handler_bg_ef_h.#.png | Bin 0 -> 2859 bytes .../default/00_split_handler_bg_ef_v.#.png | Bin 0 -> 2863 bytes .../720x1280/default/00_split_handler_h.png | Bin 0 -> 2820 bytes .../720x1280/default/00_split_handler_v.png | Bin 0 -> 2820 bytes .../bitmaps/720x1280/default/00_sub_title_ef.#.png | Bin 0 -> 2878 bytes .../bitmaps/720x1280/default/00_tab_press_ef.#.png | Bin 0 -> 2889 bytes .../bitmaps/720x1280/default/00_title_bg_ef.#.png | Bin 0 -> 2868 bytes .../720x1280/default/00_title_press_ef.#.png | Bin 0 -> 2889 bytes .../720x1280/default/00_toolbar_bg_ef.#.png | Bin 0 -> 2866 bytes .../720x1280/default/00_toolbar_bg_shadow.#.png | Bin 0 -> 2841 bytes .../720x1280/default/00_toolbar_button.#.png | Bin 0 -> 5692 bytes .../default/00_toolbar_button_bg_dim_ef.#.png | Bin 0 -> 3559 bytes .../720x1280/default/00_toolbar_button_bg_ef.#.png | Bin 0 -> 3711 bytes .../720x1280/default/00_toolbar_button_ef.#.png | Bin 0 -> 7907 bytes .../default/00_toolbar_button_ef_press.#.png | Bin 0 -> 6965 bytes .../720x1280/default/00_toolbar_button_press.#.png | Bin 0 -> 6351 bytes .../default/00_toolbar_button_press_ef.#.png | Bin 0 -> 5018 bytes .../720x1280/default/00_toolbar_ef_press.#.png | Bin 0 -> 3295 bytes .../720x1280/default/00_toolbar_press_ef.#.png | Bin 0 -> 2889 bytes .../osp/bitmaps/720x1280/default/pd_btn_bg.#.png | Bin 0 -> 4550 bytes .../720x1280/default/pd_btn_bg_arrow_down.png | Bin 0 -> 1461 bytes .../720x1280/default/pd_btn_bg_arrow_up.png | Bin 0 -> 1481 bytes .../bitmaps/720x1280/white/00_badge_bg_ef.#.png | Bin 0 -> 2328 bytes .../720x1280/white/00_button_01_dim_ef.#.png | Bin 0 -> 3369 bytes .../bitmaps/720x1280/white/00_button_01_ef.#.png | Bin 0 -> 3413 bytes .../720x1280/white/00_button_01_press_ef.#.png | Bin 0 -> 3670 bytes .../720x1280/white/00_button_expand_closed_ef.png | Bin 0 -> 1653 bytes .../720x1280/white/00_button_expand_opened_ef.png | Bin 0 -> 1612 bytes .../bitmaps/720x1280/white/00_button_left_ef.png | Bin 0 -> 3361 bytes .../osp/bitmaps/720x1280/white/00_button_off.png | Bin 0 -> 7001 bytes .../bitmaps/720x1280/white/00_button_off_dim.png | Bin 0 -> 6902 bytes .../720x1280/white/00_button_off_handler.png | Bin 0 -> 7080 bytes .../720x1280/white/00_button_off_handler_dim.png | Bin 0 -> 7002 bytes .../osp/bitmaps/720x1280/white/00_button_on.png | Bin 0 -> 6703 bytes .../bitmaps/720x1280/white/00_button_on_dim.png | Bin 0 -> 6612 bytes .../720x1280/white/00_button_on_handler.png | Bin 0 -> 6365 bytes .../720x1280/white/00_button_on_handler_dim.png | Bin 0 -> 6228 bytes .../bitmaps/720x1280/white/00_button_on_off_bg.png | Bin 0 -> 7965 bytes .../720x1280/white/00_button_on_off_bg_dim.png | Bin 0 -> 7791 bytes .../720x1280/white/00_button_on_off_handler.png | Bin 0 -> 6277 bytes .../white/00_button_on_off_handler_dim.png | Bin 0 -> 5962 bytes .../720x1280/white/00_button_radio_Activated.png | Bin 0 -> 1802 bytes .../white/00_button_radio_Activated_dim.png | Bin 0 -> 3648 bytes .../720x1280/white/00_button_radio_activated.png | Bin 0 -> 3602 bytes .../white/00_button_radio_activated_dim.png | Bin 0 -> 3589 bytes .../white/00_button_radio_activated_press.png | Bin 0 -> 1809 bytes .../bitmaps/720x1280/white/00_button_radio_bg.png | Bin 0 -> 6530 bytes .../720x1280/white/00_button_radio_dim_bg.png | Bin 0 -> 6373 bytes .../720x1280/white/00_button_radio_normal1.png | Bin 0 -> 5131 bytes .../720x1280/white/00_button_radio_normal2.png | Bin 0 -> 4378 bytes .../720x1280/white/00_button_radio_press.png | Bin 0 -> 3620 bytes .../720x1280/white/00_button_radio_press_bg.png | Bin 0 -> 5037 bytes .../bitmaps/720x1280/white/00_button_right_ef.png | Bin 0 -> 1167 bytes .../bitmaps/720x1280/white/00_check_Activated.png | Bin 0 -> 1758 bytes .../720x1280/white/00_check_Activated_dim.png | Bin 0 -> 3635 bytes .../bitmaps/720x1280/white/00_check_activated.png | Bin 0 -> 3560 bytes .../720x1280/white/00_check_activated_dim.png | Bin 0 -> 3558 bytes .../720x1280/white/00_check_activated_press.png | Bin 0 -> 1717 bytes .../osp/bitmaps/720x1280/white/00_check_bg.png | Bin 0 -> 3705 bytes .../osp/bitmaps/720x1280/white/00_check_dim.png | Bin 0 -> 1837 bytes .../osp/bitmaps/720x1280/white/00_check_dim_bg.png | Bin 0 -> 3670 bytes .../osp/bitmaps/720x1280/white/00_check_press.png | Bin 0 -> 3358 bytes .../bitmaps/720x1280/white/00_check_press_bg.png | Bin 0 -> 1925 bytes .../osp/bitmaps/720x1280/white/00_circle_bg_ef.png | Bin 0 -> 5258 bytes .../bitmaps/720x1280/white/00_circle_bg_ef_dim.png | Bin 0 -> 4954 bytes .../720x1280/white/00_circle_bg_ef_press.png | Bin 0 -> 4876 bytes .../720x1280/white/00_color_picker_handler.png | Bin 0 -> 2930 bytes .../720x1280/white/00_contacts_button_bg.#.png | Bin 0 -> 1201 bytes .../white/00_contacts_button_bg_dim_ef.#.png | Bin 0 -> 1456 bytes .../720x1280/white/00_contacts_button_bg_ef.#.png | Bin 0 -> 1449 bytes .../white/00_contacts_button_bg_press_ef.#.png | Bin 0 -> 1461 bytes .../720x1280/white/00_contacts_button_focus.#.png | Bin 0 -> 3014 bytes .../white/00_contacts_button_focus_ef.#.png | Bin 0 -> 1118 bytes .../white/00_edit_group_bg_bottom_ef.#.png | Bin 0 -> 3153 bytes .../white/00_edit_group_bg_center_ef.#.png | Bin 0 -> 2893 bytes .../720x1280/white/00_edit_group_bg_ef.#.png | Bin 0 -> 3310 bytes .../720x1280/white/00_edit_group_bg_top_ef.#.png | Bin 0 -> 3129 bytes .../white/00_effect_footer_bounce_left.png | Bin 0 -> 6039 bytes .../white/00_effect_footer_bounce_left_h.png | Bin 0 -> 5723 bytes .../white/00_effect_footer_bounce_right.png | Bin 0 -> 5986 bytes .../white/00_effect_footer_bounce_right_h.png | Bin 0 -> 5647 bytes .../720x1280/white/00_effect_tab_bounce_left.png | Bin 0 -> 5988 bytes .../white/00_effect_tab_bounce_left_02.png | Bin 0 -> 7078 bytes .../720x1280/white/00_effect_tab_bounce_left_h.png | Bin 0 -> 5871 bytes .../720x1280/white/00_effect_tab_bounce_right.png | Bin 0 -> 5974 bytes .../white/00_effect_tab_bounce_right_02.png | Bin 0 -> 7003 bytes .../white/00_effect_tab_bounce_right_h.png | Bin 0 -> 5791 bytes .../white/00_effect_title_tab_bounce_left.png | Bin 0 -> 5162 bytes .../white/00_effect_title_tab_bounce_right.png | Bin 0 -> 5071 bytes .../white/00_expandable_bg_bottom_ef.#.png | Bin 0 -> 3149 bytes .../white/00_expandable_bg_center_ef.#.png | Bin 0 -> 2881 bytes .../720x1280/white/00_expandable_bg_top_ef.#.png | Bin 0 -> 3129 bytes .../720x1280/white/00_fast_scroll_handler.#.png | Bin 0 -> 3820 bytes .../720x1280/white/00_fast_scroll_handler_h.#.png | Bin 0 -> 3788 bytes .../720x1280/white/00_fast_scroll_popup_bg.#.png | Bin 0 -> 3031 bytes .../white/00_fast_scroll_popup_bg_ef.#.png | Bin 0 -> 3646 bytes .../00_fast_scroll_rollover_bg_line_focus.#.png | Bin 0 -> 2859 bytes .../osp/bitmaps/720x1280/white/00_focus.#.png | Bin 0 -> 3012 bytes .../720x1280/white/00_header_process_01.png | Bin 0 -> 3428 bytes .../720x1280/white/00_header_process_02.png | Bin 0 -> 3398 bytes .../720x1280/white/00_header_process_03.png | Bin 0 -> 3367 bytes .../720x1280/white/00_header_process_04.png | Bin 0 -> 3453 bytes .../720x1280/white/00_header_process_05.png | Bin 0 -> 3448 bytes .../720x1280/white/00_header_process_06.png | Bin 0 -> 3421 bytes .../720x1280/white/00_header_process_07.png | Bin 0 -> 3413 bytes .../720x1280/white/00_header_process_08.png | Bin 0 -> 3475 bytes .../720x1280/white/00_header_process_09.png | Bin 0 -> 3449 bytes .../720x1280/white/00_header_process_10.png | Bin 0 -> 3432 bytes .../720x1280/white/00_header_process_11.png | Bin 0 -> 3409 bytes .../720x1280/white/00_header_process_12.png | Bin 0 -> 3433 bytes .../720x1280/white/00_header_process_13.png | Bin 0 -> 3437 bytes .../720x1280/white/00_header_process_14.png | Bin 0 -> 3460 bytes .../720x1280/white/00_header_process_15.png | Bin 0 -> 3456 bytes .../720x1280/white/00_header_process_16.png | Bin 0 -> 3419 bytes .../720x1280/white/00_header_process_17.png | Bin 0 -> 3407 bytes .../720x1280/white/00_header_process_18.png | Bin 0 -> 3383 bytes .../720x1280/white/00_header_process_19.png | Bin 0 -> 3425 bytes .../720x1280/white/00_header_process_20.png | Bin 0 -> 3466 bytes .../720x1280/white/00_header_process_21.png | Bin 0 -> 3441 bytes .../720x1280/white/00_header_process_22.png | Bin 0 -> 3384 bytes .../720x1280/white/00_header_process_23.png | Bin 0 -> 3454 bytes .../720x1280/white/00_header_process_24.png | Bin 0 -> 3419 bytes .../720x1280/white/00_header_process_25.png | Bin 0 -> 3389 bytes .../720x1280/white/00_header_process_26.png | Bin 0 -> 3362 bytes .../720x1280/white/00_header_process_27.png | Bin 0 -> 3404 bytes .../720x1280/white/00_header_process_28.png | Bin 0 -> 3437 bytes .../720x1280/white/00_header_process_29.png | Bin 0 -> 3428 bytes .../720x1280/white/00_header_process_30.png | Bin 0 -> 3452 bytes .../osp/bitmaps/720x1280/white/00_icon_Back_ef.png | Bin 0 -> 2366 bytes .../bitmaps/720x1280/white/00_icon_Back_ef_02.png | Bin 0 -> 2358 bytes .../720x1280/white/00_icon_Back_trans_ef.png | Bin 0 -> 1734 bytes .../720x1280/white/00_icon_SIP_close_ef.png | Bin 0 -> 2128 bytes .../osp/bitmaps/720x1280/white/00_icon_back_ef.png | Bin 0 -> 2298 bytes .../720x1280/white/00_icon_back_trans_ef.png | Bin 0 -> 1734 bytes .../osp/bitmaps/720x1280/white/00_icon_jump.png | Bin 0 -> 3073 bytes .../osp/bitmaps/720x1280/white/00_icon_jump_ef.png | Bin 0 -> 3415 bytes .../bitmaps/720x1280/white/00_icon_jump_left.png | Bin 0 -> 3113 bytes .../720x1280/white/00_icon_jump_left_ef.png | Bin 0 -> 3463 bytes .../osp/bitmaps/720x1280/white/00_icon_more_ef.png | Bin 0 -> 1588 bytes .../720x1280/white/00_indexlist_bg_ef.#.png | Bin 0 -> 2891 bytes .../white/00_list_group_bg_bottom_ef.#.png | Bin 0 -> 3145 bytes .../white/00_list_group_bg_center_ef.#.png | Bin 0 -> 2881 bytes .../720x1280/white/00_list_group_bg_ef.#.png | Bin 0 -> 3310 bytes .../720x1280/white/00_list_group_bg_top_ef.#.png | Bin 0 -> 3130 bytes .../bitmaps/720x1280/white/00_list_process_01.png | Bin 0 -> 3968 bytes .../bitmaps/720x1280/white/00_list_process_02.png | Bin 0 -> 3924 bytes .../bitmaps/720x1280/white/00_list_process_03.png | Bin 0 -> 3865 bytes .../bitmaps/720x1280/white/00_list_process_04.png | Bin 0 -> 4026 bytes .../bitmaps/720x1280/white/00_list_process_05.png | Bin 0 -> 4023 bytes .../bitmaps/720x1280/white/00_list_process_06.png | Bin 0 -> 3976 bytes .../bitmaps/720x1280/white/00_list_process_07.png | Bin 0 -> 3963 bytes .../bitmaps/720x1280/white/00_list_process_08.png | Bin 0 -> 4059 bytes .../bitmaps/720x1280/white/00_list_process_09.png | Bin 0 -> 4052 bytes .../bitmaps/720x1280/white/00_list_process_10.png | Bin 0 -> 3970 bytes .../bitmaps/720x1280/white/00_list_process_11.png | Bin 0 -> 3920 bytes .../bitmaps/720x1280/white/00_list_process_12.png | Bin 0 -> 3968 bytes .../bitmaps/720x1280/white/00_list_process_13.png | Bin 0 -> 4010 bytes .../bitmaps/720x1280/white/00_list_process_14.png | Bin 0 -> 4032 bytes .../bitmaps/720x1280/white/00_list_process_15.png | Bin 0 -> 4050 bytes .../bitmaps/720x1280/white/00_list_process_16.png | Bin 0 -> 3966 bytes .../bitmaps/720x1280/white/00_list_process_17.png | Bin 0 -> 3954 bytes .../bitmaps/720x1280/white/00_list_process_18.png | Bin 0 -> 3912 bytes .../bitmaps/720x1280/white/00_list_process_19.png | Bin 0 -> 4027 bytes .../bitmaps/720x1280/white/00_list_process_20.png | Bin 0 -> 4015 bytes .../bitmaps/720x1280/white/00_list_process_21.png | Bin 0 -> 3973 bytes .../bitmaps/720x1280/white/00_list_process_22.png | Bin 0 -> 3908 bytes .../bitmaps/720x1280/white/00_list_process_23.png | Bin 0 -> 4054 bytes .../bitmaps/720x1280/white/00_list_process_24.png | Bin 0 -> 4009 bytes .../bitmaps/720x1280/white/00_list_process_25.png | Bin 0 -> 3927 bytes .../bitmaps/720x1280/white/00_list_process_26.png | Bin 0 -> 3903 bytes .../bitmaps/720x1280/white/00_list_process_27.png | Bin 0 -> 3961 bytes .../bitmaps/720x1280/white/00_list_process_28.png | Bin 0 -> 4008 bytes .../bitmaps/720x1280/white/00_list_process_29.png | Bin 0 -> 4011 bytes .../bitmaps/720x1280/white/00_list_process_30.png | Bin 0 -> 4006 bytes .../720x1280/white/00_more_popup_press.#.png | Bin 0 -> 2978 bytes .../white/00_option_panel_handle_bg_ef.png | Bin 0 -> 3693 bytes .../white/00_option_panel_handle_bg_ef_press.png | Bin 0 -> 3555 bytes .../720x1280/white/00_panel_handle_bg_ef.#.png | Bin 0 -> 4772 bytes .../white/00_panel_handle_bg_ef_press.#.png | Bin 0 -> 4214 bytes .../720x1280/white/00_panel_list_bg_ef_press.#.png | Bin 0 -> 3102 bytes .../720x1280/white/00_picker_button_dim_ef.#.png | Bin 0 -> 1696 bytes .../720x1280/white/00_picker_button_ef.#.png | Bin 0 -> 1696 bytes .../720x1280/white/00_picker_button_press_ef.#.png | Bin 0 -> 1443 bytes .../osp/bitmaps/720x1280/white/00_popup_bg.#.png | Bin 0 -> 676 bytes .../bitmaps/720x1280/white/00_popup_bg_ef.#.png | Bin 0 -> 5097 bytes .../720x1280/white/00_popup_bottom_bg.#.png | Bin 0 -> 1194 bytes .../720x1280/white/00_popup_bottom_ef.#.png | Bin 0 -> 1095 bytes .../720x1280/white/00_popup_bubble_02_ef.#.png | Bin 0 -> 1650 bytes .../720x1280/white/00_popup_bubble_bg_ef.#.png | Bin 0 -> 2325 bytes .../720x1280/white/00_popup_bubble_tail_bottom.png | Bin 0 -> 1326 bytes .../white/00_popup_bubble_tail_bottom_ef.png | Bin 0 -> 1591 bytes .../720x1280/white/00_popup_bubble_tail_left.png | Bin 0 -> 1290 bytes .../white/00_popup_bubble_tail_left_ef.png | Bin 0 -> 1490 bytes .../720x1280/white/00_popup_bubble_tail_right.png | Bin 0 -> 1290 bytes .../white/00_popup_bubble_tail_right_ef.png | Bin 0 -> 1490 bytes .../720x1280/white/00_popup_bubble_tail_top.png | Bin 0 -> 1270 bytes .../720x1280/white/00_popup_bubble_tail_top_ef.png | Bin 0 -> 1386 bytes .../720x1280/white/00_popup_button_dim_ef.#.png | Bin 0 -> 1905 bytes .../720x1280/white/00_popup_button_normal_ef.#.png | Bin 0 -> 1918 bytes .../720x1280/white/00_popup_button_press_ef.#.png | Bin 0 -> 1927 bytes .../bitmaps/720x1280/white/00_popup_scroll.#.png | Bin 0 -> 2979 bytes .../bitmaps/720x1280/white/00_popup_title_bg.#.png | Bin 0 -> 1207 bytes .../bitmaps/720x1280/white/00_popup_title_ef.#.png | Bin 0 -> 1212 bytes .../720x1280/white/00_progress_bar_ef.#.png | Bin 0 -> 1360 bytes .../bitmaps/720x1280/white/00_progress_ef_bg.#.png | Bin 0 -> 1404 bytes .../bitmaps/720x1280/white/00_scroll_bar_h.#.png | Bin 0 -> 1131 bytes .../720x1280/white/00_scroll_bar_h_ef.#.png | Bin 0 -> 1224 bytes .../720x1280/white/00_scroll_bar_handler_h.png | Bin 0 -> 2886 bytes .../720x1280/white/00_scroll_bar_handler_v.png | Bin 0 -> 2868 bytes .../bitmaps/720x1280/white/00_scroll_bar_v.#.png | Bin 0 -> 1123 bytes .../720x1280/white/00_scroll_bar_v_ef.#.png | Bin 0 -> 3103 bytes .../bitmaps/720x1280/white/00_search_bg_ef.#.png | Bin 0 -> 2857 bytes .../white/00_search_edit_field_bg_ef.#.png | Bin 0 -> 3567 bytes .../bitmaps/720x1280/white/00_search_icon_ef.png | Bin 0 -> 1751 bytes .../bitmaps/720x1280/white/00_slider_handle_ef.png | Bin 0 -> 5407 bytes .../720x1280/white/00_slider_handle_ef_dim.png | Bin 0 -> 5257 bytes .../720x1280/white/00_slider_handle_ef_press.png | Bin 0 -> 5974 bytes .../720x1280/white/00_softkey_left_bg_ef.png | Bin 0 -> 3300 bytes .../720x1280/white/00_softkey_left_bg_ef_press.png | Bin 0 -> 3575 bytes .../720x1280/white/00_softkey_left_text_bg_ef.png | Bin 0 -> 3372 bytes .../white/00_softkey_left_text_bg_ef_press.png | Bin 0 -> 3623 bytes .../720x1280/white/00_softkey_right_bg_ef.png | Bin 0 -> 3560 bytes .../white/00_softkey_right_bg_ef_press.png | Bin 0 -> 3548 bytes .../720x1280/white/00_softkey_right_text_bg_ef.png | Bin 0 -> 3624 bytes .../white/00_softkey_right_text_bg_ef_press.png | Bin 0 -> 3579 bytes .../720x1280/white/00_split_handler_bg_ef_h.#.png | Bin 0 -> 2847 bytes .../720x1280/white/00_split_handler_bg_ef_v.#.png | Bin 0 -> 2836 bytes .../bitmaps/720x1280/white/00_split_handler_h.png | Bin 0 -> 2821 bytes .../bitmaps/720x1280/white/00_split_handler_v.png | Bin 0 -> 2820 bytes .../bitmaps/720x1280/white/00_sub_title_ef.#.png | Bin 0 -> 2847 bytes .../bitmaps/720x1280/white/00_tab_press_ef.#.png | Bin 0 -> 1092 bytes .../bitmaps/720x1280/white/00_title_bg_ef.#.png | Bin 0 -> 972 bytes .../bitmaps/720x1280/white/00_title_press_ef.#.png | Bin 0 -> 989 bytes .../bitmaps/720x1280/white/00_toolbar_bg_ef.#.png | Bin 0 -> 999 bytes .../720x1280/white/00_toolbar_bg_shadow.#.png | Bin 0 -> 978 bytes .../bitmaps/720x1280/white/00_toolbar_button.#.png | Bin 0 -> 5692 bytes .../white/00_toolbar_button_bg_dim_ef.#.png | Bin 0 -> 4193 bytes .../720x1280/white/00_toolbar_button_bg_ef.#.png | Bin 0 -> 3711 bytes .../720x1280/white/00_toolbar_button_ef.#.png | Bin 0 -> 8660 bytes .../white/00_toolbar_button_ef_press.#.png | Bin 0 -> 9214 bytes .../720x1280/white/00_toolbar_button_press.#.png | Bin 0 -> 6351 bytes .../white/00_toolbar_button_press_ef.#.png | Bin 0 -> 4371 bytes .../720x1280/white/00_toolbar_press_ef.#.png | Bin 0 -> 1006 bytes .../osp/bitmaps/720x1280/white/pd_btn_bg.#.png | Bin 0 -> 2082 bytes .../720x1280/white/pd_btn_bg_arrow_down.png | Bin 0 -> 4081 bytes .../bitmaps/720x1280/white/pd_btn_bg_arrow_up.png | Bin 0 -> 3799 bytes .../usr/share/osp/effects/gallery_page_curling.eff | Bin 0 -> 5465 bytes src/CMakeLists.txt | 47 + src/app/FAppUiApp.cpp | 176 + src/app/FApp_AppFrame.cpp | 162 + src/app/FApp_AppResourceBitmap.cpp | 134 + src/app/FApp_AppResourceBitmap.h | 100 + src/app/FApp_AppResourceBitmapUtil.cpp | 511 + src/app/FApp_AppResourceBitmapUtil.h | 132 + src/app/FApp_CoordinateInfo.cpp | 187 + src/app/FApp_ThemeInfo.cpp | 158 + src/app/FApp_UiAppImpl.cpp | 703 + src/app/inc/FApp_AppFrame.h | 123 + src/app/inc/FApp_CoordinateInfo.h | 85 + src/app/inc/FApp_ThemeInfo.h | 84 + src/app/inc/FApp_UiAppImpl.h | 333 + src/graphics/CMakeLists.txt | 112 + src/graphics/FGrpBitmap.cpp | 470 + src/graphics/FGrpBufferInfo.cpp | 136 + src/graphics/FGrpCanvas.cpp | 1277 ++ src/graphics/FGrpColor.cpp | 235 + src/graphics/FGrpCoordinateSystem.cpp | 226 + src/graphics/FGrpDimension.cpp | 119 + src/graphics/FGrpEnrichedText.cpp | 556 + src/graphics/FGrpFloatDimension.cpp | 134 + src/graphics/FGrpFloatMatrix4.cpp | 699 + src/graphics/FGrpFloatPoint.cpp | 183 + src/graphics/FGrpFloatPoint3.cpp | 177 + src/graphics/FGrpFloatRectangle.cpp | 334 + src/graphics/FGrpFloatVector4.cpp | 225 + src/graphics/FGrpFont.cpp | 464 + src/graphics/FGrpPoint.cpp | 168 + src/graphics/FGrpRectangle.cpp | 321 + src/graphics/FGrpTextElement.cpp | 237 + src/graphics/FGrp_Bitmap.cpp | 1175 ++ src/graphics/FGrp_Bitmap.h | 146 + src/graphics/FGrp_BitmapCoordHolder.h | 142 + src/graphics/FGrp_BitmapImpl.cpp | 2300 ++++ src/graphics/FGrp_BitmapScreenCapture.cpp | 209 + src/graphics/FGrp_BitmapTool.cpp | 53 + src/graphics/FGrp_BitmapUtil.cpp | 287 + src/graphics/FGrp_BitmapUtil.h | 222 + src/graphics/FGrp_BufferInfoImpl.cpp | 183 + src/graphics/FGrp_Callback.cpp | 48 + src/graphics/FGrp_Callback.h | 42 + src/graphics/FGrp_Canvas.cpp | 4433 +++++++ src/graphics/FGrp_Canvas.h | 281 + src/graphics/FGrp_CanvasCairo.cpp | 765 ++ src/graphics/FGrp_CanvasCairo.h | 120 + src/graphics/FGrp_CanvasCoordHolder.h | 299 + src/graphics/FGrp_CanvasGpArc.cpp | 1639 +++ src/graphics/FGrp_CanvasGpEllipse.cpp | 537 + src/graphics/FGrp_CanvasGpFillPolygon.cpp | 402 + src/graphics/FGrp_CanvasGpLine.cpp | 2393 ++++ src/graphics/FGrp_CanvasGpPrimitive.h | 492 + src/graphics/FGrp_CanvasGpRoundRect.cpp | 1097 ++ src/graphics/FGrp_CanvasGpTriangle.cpp | 242 + src/graphics/FGrp_CanvasImpl.cpp | 3260 +++++ src/graphics/FGrp_CanvasImplPrivate.h | 432 + src/graphics/FGrp_CanvasPixman.cpp | 496 + src/graphics/FGrp_CanvasPixman.h | 72 + src/graphics/FGrp_CanvasRasterOp.cpp | 225 + src/graphics/FGrp_CanvasRasterOp.h | 44 + src/graphics/FGrp_CanvasShow.cpp | 184 + src/graphics/FGrp_CanvasTool.cpp | 83 + src/graphics/FGrp_CoordinateSystem.cpp | 515 + src/graphics/FGrp_CoordinateSystemDeviceSpec.cpp | 1775 +++ src/graphics/FGrp_CoordinateSystemImpl.cpp | 727 ++ src/graphics/FGrp_CoordinateSystemImpl.h | 96 + src/graphics/FGrp_CoordinateSystemUtils.cpp | 26 + src/graphics/FGrp_EnrichedTextImpl.cpp | 1710 +++ src/graphics/FGrp_Farm.cpp | 542 + src/graphics/FGrp_Farm.h | 88 + src/graphics/FGrp_Font.cpp | 2828 +++++ src/graphics/FGrp_Font.h | 209 + src/graphics/FGrp_FontBidiUtil.cpp | 1010 ++ src/graphics/FGrp_FontBidiUtil.h | 123 + src/graphics/FGrp_FontCache.cpp | 421 + src/graphics/FGrp_FontCache.h | 70 + src/graphics/FGrp_FontFromImage.cpp | 303 + src/graphics/FGrp_FontFromImage.h | 111 + src/graphics/FGrp_FontFt2.cpp | 1234 ++ src/graphics/FGrp_FontFt2.h | 112 + src/graphics/FGrp_FontImpl.cpp | 1287 ++ src/graphics/FGrp_FontMemoryManager.cpp | 232 + src/graphics/FGrp_FontMemoryManager.h | 68 + src/graphics/FGrp_FontPrivate.cpp | 132 + src/graphics/FGrp_FontPrivate.h | 59 + src/graphics/FGrp_FontRsrcManager.cpp | 1469 +++ src/graphics/FGrp_FontRsrcManager.h | 134 + src/graphics/FGrp_FontUtil.h | 62 + src/graphics/FGrp_IFont.h | 201 + src/graphics/FGrp_NonScale.cpp | 184 + src/graphics/FGrp_ResUtil.h | 1510 +++ src/graphics/FGrp_Screen.cpp | 92 + src/graphics/FGrp_TextElementImpl.cpp | 1113 ++ src/graphics/effect/FGrp_Effect.h | 83 + src/graphics/effect/FGrp_EffectAlpha.cpp | 346 + src/graphics/effect/FGrp_EffectFlip.cpp | 117 + src/graphics/effect/FGrp_EffectFunc.h | 377 + src/graphics/effect/FGrp_EffectManip.cpp | 281 + src/graphics/effect/FGrp_EffectRotate.cpp | 909 ++ src/graphics/effect/FGrp_EffectScale.cpp | 533 + src/graphics/effect/FGrp_EffectScale2.cpp | 1268 ++ src/graphics/inc/FGrp_BitmapImpl.h | 287 + src/graphics/inc/FGrp_BitmapTool.h | 57 + src/graphics/inc/FGrp_BufferInfoImpl.h | 160 + src/graphics/inc/FGrp_CanvasImpl.h | 284 + src/graphics/inc/FGrp_CanvasTextureImpl.h | 67 + src/graphics/inc/FGrp_CanvasTool.h | 48 + src/graphics/inc/FGrp_CoordinateSystem.h | 282 + src/graphics/inc/FGrp_CoordinateSystemUtils.h | 336 + src/graphics/inc/FGrp_EnrichedTextImpl.h | 183 + src/graphics/inc/FGrp_FontImpl.h | 267 + src/graphics/inc/FGrp_GlPlayerImpl.h | 125 + src/graphics/inc/FGrp_NonScale.h | 70 + src/graphics/inc/FGrp_Screen.h | 41 + src/graphics/inc/FGrp_TextCommon.h | 235 + src/graphics/inc/FGrp_TextElementImpl.h | 135 + src/graphics/inc/FGrp_TextTextCutLink.h | 119 + src/graphics/inc/FGrp_TextTextElement.h | 131 + src/graphics/inc/FGrp_TextTextImage.h | 112 + src/graphics/inc/FGrp_TextTextObject.h | 486 + src/graphics/inc/FGrp_TextTextSimple.h | 212 + src/graphics/inc/FGrp_VideoTextureImpl.h | 67 + src/graphics/opengl/CMakeLists.txt | 40 + src/graphics/opengl/FGrpCanvasTexture.cpp | 68 + src/graphics/opengl/FGrpEgl.cpp | 2732 ++++ src/graphics/opengl/FGrpGlPlayer.cpp | 180 + src/graphics/opengl/FGrpGles1.cpp | 2645 ++++ src/graphics/opengl/FGrpGles2.cpp | 2336 ++++ src/graphics/opengl/FGrpVideoTexture.cpp | 76 + src/graphics/opengl/FGrp_CanvasTexture.cpp | 277 + src/graphics/opengl/FGrp_CanvasTexture.h | 74 + src/graphics/opengl/FGrp_CanvasTextureImpl.cpp | 76 + src/graphics/opengl/FGrp_GlPlayerImpl.cpp | 484 + src/graphics/opengl/FGrp_VideoTexture.cpp | 551 + src/graphics/opengl/FGrp_VideoTexture.h | 128 + src/graphics/opengl/FGrp_VideoTextureImpl.cpp | 108 + src/graphics/text/FGrp_TextTextColumn.cpp | 2370 ++++ src/graphics/text/FGrp_TextTextColumn.h | 284 + src/graphics/text/FGrp_TextTextComposite.cpp | 6828 ++++++++++ src/graphics/text/FGrp_TextTextComposite.h | 373 + src/graphics/text/FGrp_TextTextCutLink.cpp | 334 + src/graphics/text/FGrp_TextTextCutLinkListInfo.cpp | 579 + src/graphics/text/FGrp_TextTextCutLinkListInfo.h | 92 + src/graphics/text/FGrp_TextTextCutLinkParser.cpp | 817 ++ src/graphics/text/FGrp_TextTextCutLinkParser.h | 81 + src/graphics/text/FGrp_TextTextElement.cpp | 246 + src/graphics/text/FGrp_TextTextImage.cpp | 407 + src/graphics/text/FGrp_TextTextLine.cpp | 745 ++ src/graphics/text/FGrp_TextTextLine.h | 178 + src/graphics/text/FGrp_TextTextObject.cpp | 4851 +++++++ src/graphics/text/FGrp_TextTextSimple.cpp | 1801 +++ src/graphics/text/FGrp_TextTextSimpleList.cpp | 528 + src/graphics/text/FGrp_TextTextSimpleList.h | 92 + src/graphics/text/FGrp_TextTextUtility.cpp | 642 + src/graphics/text/FGrp_TextTextUtility.h | 102 + src/graphics/util/FGrp_Util.cpp | 659 + src/graphics/util/FGrp_Util.h | 445 + src/graphics/util/FGrp_UtilPixmap.cpp | 625 + src/graphics/util/FGrp_UtilPixmap.h | 205 + src/graphics/util/FGrp_UtilScratchpad.cpp | 228 + src/graphics/util/FGrp_UtilScratchpad.h | 261 + src/graphics/util/FGrp_UtilTemplate.h | 603 + src/graphics/util/FGrp_UtilType.h | 322 + src/ui/CMakeLists.txt | 748 ++ src/ui/FUiAccessibilityContainer.cpp | 134 + src/ui/FUiAccessibilityElement.cpp | 158 + src/ui/FUiCardLayout.cpp | 62 + src/ui/FUiClipboard.cpp | 151 + src/ui/FUiClipboardItem.cpp | 81 + src/ui/FUiContainer.cpp | 477 + src/ui/FUiControl.cpp | 1634 +++ src/ui/FUiCustomControlBase.cpp | 93 + src/ui/FUiDataBindingContext.cpp | 115 + src/ui/FUiFocusManager.cpp | 80 + src/ui/FUiGridLayout.cpp | 383 + src/ui/FUiHorizontalBoxLayout.cpp | 316 + src/ui/FUiInputConnection.cpp | 289 + src/ui/FUiKeyEventInfo.cpp | 81 + src/ui/FUiKeyEventManager.cpp | 100 + src/ui/FUiKeyboardMap.cpp | 2156 ++++ src/ui/FUiLayout.cpp | 60 + src/ui/FUiRelativeLayout.cpp | 294 + src/ui/FUiSystemUtil.cpp | 105 + src/ui/FUiTouch.cpp | 253 + src/ui/FUiTouchEffect.cpp | 82 + src/ui/FUiTouchEventInfo.cpp | 162 + src/ui/FUiTouchEventManager.cpp | 70 + src/ui/FUiTouchFlickGestureDetector.cpp | 112 + src/ui/FUiTouchGestureDetector.cpp | 182 + src/ui/FUiTouchLongPressGestureDetector.cpp | 159 + src/ui/FUiTouchPanningGestureDetector.cpp | 105 + src/ui/FUiTouchPinchGestureDetector.cpp | 114 + src/ui/FUiTouchRotationGestureDetector.cpp | 108 + src/ui/FUiTouchTapGestureDetector.cpp | 180 + src/ui/FUiUiConfiguration.cpp | 595 + src/ui/FUiVariant.cpp | 1543 +++ src/ui/FUiVerticalBoxLayout.cpp | 310 + src/ui/FUiWindow.cpp | 202 + src/ui/FUi_AccessibilityContainer.cpp | 636 + src/ui/FUi_AccessibilityContainerImpl.cpp | 442 + src/ui/FUi_AccessibilityElement.cpp | 490 + src/ui/FUi_AccessibilityElementImpl.cpp | 199 + src/ui/FUi_AccessibilityGesture.cpp | 159 + src/ui/FUi_AccessibilityManager.cpp | 2539 ++++ src/ui/FUi_AccessibilitySystemSettingLoader.cpp | 105 + src/ui/FUi_AccessibilityTtsPlayer.cpp | 613 + src/ui/FUi_BidiUtils.cpp | 708 ++ src/ui/FUi_CardLayoutImpl.cpp | 107 + src/ui/FUi_CardLayoutImpl.h | 135 + src/ui/FUi_Clipboard.cpp | 1050 ++ src/ui/FUi_Clipboard.h | 108 + src/ui/FUi_ClipboardImpl.cpp | 299 + src/ui/FUi_ClipboardImpl.h | 75 + src/ui/FUi_ClipboardItem.cpp | 129 + src/ui/FUi_ClipboardItem.h | 63 + src/ui/FUi_ClipboardItemImpl.cpp | 133 + src/ui/FUi_ClipboardItemImpl.h | 68 + src/ui/FUi_ClipboardPopupEvent.cpp | 156 + src/ui/FUi_ContainerImpl.cpp | 958 ++ src/ui/FUi_Control.cpp | 5916 +++++++++ src/ui/FUi_ControlImpl.cpp | 5048 ++++++++ src/ui/FUi_ControlImplManager.cpp | 404 + src/ui/FUi_ControlManager.cpp | 2082 +++ src/ui/FUi_CustomControlBaseImpl.cpp | 143 + src/ui/FUi_DataBinding.cpp | 1972 +++ src/ui/FUi_DataBinding.h | 88 + src/ui/FUi_DataBindingContext.cpp | 241 + src/ui/FUi_DataBindingContext.h | 77 + src/ui/FUi_DataBindingContextImpl.cpp | 167 + src/ui/FUi_DataBindingContextImpl.h | 84 + src/ui/FUi_DimmingLayer.cpp | 252 + src/ui/FUi_DimmingManager.cpp | 207 + src/ui/FUi_DragAndDropEvent.cpp | 183 + src/ui/FUi_DragAndDropItem.cpp | 82 + src/ui/FUi_DragDropEvent.cpp | 173 + src/ui/FUi_DragDropEventArg.cpp | 98 + src/ui/FUi_EcoreEvas.cpp | 4143 ++++++ src/ui/FUi_EcoreEvasMgr.cpp | 115 + src/ui/FUi_EflUiEventManager.cpp | 2098 +++ src/ui/FUi_EflUiEventManager.h | 75 + src/ui/FUi_EflWindow.cpp | 89 + src/ui/FUi_EflWindow.h | 65 + src/ui/FUi_ErrorMessages.cpp | 25 + src/ui/FUi_FingerInfo.cpp | 126 + src/ui/FUi_FocusManagerImpl.cpp | 559 + src/ui/FUi_GridLayoutImpl.cpp | 457 + src/ui/FUi_GridLayoutImpl.h | 364 + src/ui/FUi_HorizontalBoxLayoutImpl.cpp | 273 + src/ui/FUi_HorizontalBoxLayoutImpl.h | 278 + src/ui/FUi_ImeOrientationAgent.cpp | 220 + src/ui/FUi_ImeOrientationAgent.h | 65 + src/ui/FUi_InputConnectionImpl.cpp | 1638 +++ src/ui/FUi_InputConnectionImpl.h | 138 + src/ui/FUi_InputConnectionUtils.cpp | 55 + src/ui/FUi_InputConnectionUtils.h | 46 + src/ui/FUi_KeyEventInfoImpl.cpp | 88 + src/ui/FUi_KeyEventManager.cpp | 267 + src/ui/FUi_KeyEventManagerImpl.cpp | 209 + src/ui/FUi_LayoutImpl.cpp | 580 + src/ui/FUi_LayoutImpl.h | 333 + src/ui/FUi_Matrix3Df.cpp | 854 ++ src/ui/FUi_ModalLoopManager.cpp | 253 + src/ui/FUi_NativeObjectHandler.cpp | 156 + src/ui/FUi_NativeObjectHandler.h | 113 + src/ui/FUi_OrientationAgent.cpp | 573 + src/ui/FUi_OrientationAgent.h | 79 + src/ui/FUi_PropertyBase.cpp | 110 + src/ui/FUi_PropertyUtils.cpp | 172 + src/ui/FUi_PublicOrientationEvent.cpp | 153 + src/ui/FUi_RelativeLayoutImpl.cpp | 314 + src/ui/FUi_RelativeLayoutImpl.h | 256 + src/ui/FUi_ResourceManager.cpp | 2809 ++++ src/ui/FUi_SystemUtilImpl.cpp | 372 + src/ui/FUi_TouchEffectImpl.cpp | 101 + src/ui/FUi_TouchEventArg.cpp | 97 + src/ui/FUi_TouchEventInfoImpl.cpp | 115 + src/ui/FUi_TouchEventManagerImpl.cpp | 132 + src/ui/FUi_TouchFlickGestureDetector.cpp | 578 + src/ui/FUi_TouchFlickGestureDetectorImpl.cpp | 120 + src/ui/FUi_TouchGestureDetector.cpp | 1191 ++ src/ui/FUi_TouchGestureDetectorImpl.cpp | 358 + src/ui/FUi_TouchGestureTimerManager.cpp | 283 + src/ui/FUi_TouchGestureTimerManager.h | 67 + src/ui/FUi_TouchLongPressGestureDetector.cpp | 442 + src/ui/FUi_TouchLongPressGestureDetectorImpl.cpp | 142 + src/ui/FUi_TouchManager.cpp | 1139 ++ src/ui/FUi_TouchPanningGestureDetector.cpp | 391 + src/ui/FUi_TouchPanningGestureDetectorImpl.cpp | 195 + src/ui/FUi_TouchPinchGestureDetector.cpp | 294 + src/ui/FUi_TouchPinchGestureDetectorImpl.cpp | 120 + src/ui/FUi_TouchRotationGestureDetector.cpp | 415 + src/ui/FUi_TouchRotationGestureDetectorImpl.cpp | 111 + src/ui/FUi_TouchTapGestureDetector.cpp | 558 + src/ui/FUi_TouchTapGestureDetectorImpl.cpp | 150 + src/ui/FUi_UiBuilder.cpp | 466 + src/ui/FUi_UiBuilderControl.cpp | 425 + src/ui/FUi_UiBuilderControlElement.cpp | 66 + src/ui/FUi_UiBuilderControlItem.cpp | 95 + src/ui/FUi_UiBuilderControlLayout.cpp | 145 + src/ui/FUi_UiBuilderControlMaker.cpp | 427 + src/ui/FUi_UiBuilderControlTable.cpp | 201 + src/ui/FUi_UiBuilderXmlHandler.cpp | 410 + src/ui/FUi_UiEvent.cpp | 192 + src/ui/FUi_UiEventManager.cpp | 827 ++ src/ui/FUi_UiFocusEvent.cpp | 151 + src/ui/FUi_UiKeyEvent.cpp | 338 + src/ui/FUi_UiManagerIpcMessages.cpp | 46 + src/ui/FUi_UiManagerProxy.cpp | 72 + src/ui/FUi_UiManagerProxy.h | 62 + src/ui/FUi_UiNotificationEvent.cpp | 140 + src/ui/FUi_UiTouchEvent.cpp | 676 + src/ui/FUi_VariantImpl.cpp | 332 + src/ui/FUi_VerticalBoxLayoutImpl.cpp | 274 + src/ui/FUi_VerticalBoxLayoutImpl.h | 278 + src/ui/FUi_Window.cpp | 1091 ++ src/ui/FUi_WindowImpl.cpp | 475 + src/ui/animations/FUiAnimAnimationBase.cpp | 334 + src/ui/animations/FUiAnimAnimationGroup.cpp | 95 + src/ui/animations/FUiAnimAnimationTransaction.cpp | 447 + src/ui/animations/FUiAnimBezierTimingFunction.cpp | 219 + src/ui/animations/FUiAnimControlAnimator.cpp | 1255 ++ src/ui/animations/FUiAnimDimensionAnimation.cpp | 431 + .../animations/FUiAnimDiscreteTimingFunction.cpp | 75 + src/ui/animations/FUiAnimDisplayContext.cpp | 49 + .../FUiAnimEaseElasticInTimingFunction.cpp | 79 + .../FUiAnimEaseElasticOutTimingFunction.cpp | 78 + .../animations/FUiAnimEaseInOutTimingFunction.cpp | 58 + src/ui/animations/FUiAnimEaseInTimingFunction.cpp | 53 + .../animations/FUiAnimEaseOutInTimingFunction.cpp | 53 + src/ui/animations/FUiAnimEaseOutTimingFunction.cpp | 53 + src/ui/animations/FUiAnimExpInTimingFunction.cpp | 73 + src/ui/animations/FUiAnimExpOutTimingFunction.cpp | 73 + src/ui/animations/FUiAnimFloatAnimation.cpp | 396 + src/ui/animations/FUiAnimFrameAnimator.cpp | 207 + ...mIVisualElementAnimationStatusEventListener.cpp | 35 + ...nimIVisualElementAnimationTickEventListener.cpp | 36 + ...UiAnimIVisualElementAnimationTimingFunction.cpp | 42 + ...nimIVisualElementAnimationValueInterpolator.cpp | 42 + src/ui/animations/FUiAnimIntegerAnimation.cpp | 396 + src/ui/animations/FUiAnimLinearTimingFunction.cpp | 50 + .../animations/FUiAnimParallelAnimationGroup.cpp | 342 + src/ui/animations/FUiAnimPointAnimation.cpp | 396 + src/ui/animations/FUiAnimRectangleAnimation.cpp | 446 + src/ui/animations/FUiAnimRotateAnimation.cpp | 181 + .../animations/FUiAnimSequentialAnimationGroup.cpp | 367 + src/ui/animations/FUiAnimVisualElement.cpp | 955 ++ .../animations/FUiAnimVisualElementAnimation.cpp | 466 + .../FUiAnimVisualElementAnimationGroup.cpp | 162 + .../FUiAnimVisualElementAnimationProvider.cpp | 46 + .../FUiAnimVisualElementContentProvider.cpp | 58 + .../FUiAnimVisualElementPropertyAnimation.cpp | 137 + src/ui/animations/FUiAnimVisualElementSurface.cpp | 168 + .../FUiAnimVisualElementValueAnimation.cpp | 223 + src/ui/animations/FUiAnim_AnimationBaseImpl.cpp | 248 + src/ui/animations/FUiAnim_AnimationBaseImpl.h | 86 + src/ui/animations/FUiAnim_AnimationGroupImpl.cpp | 357 + src/ui/animations/FUiAnim_AnimationGroupImpl.h | 75 + src/ui/animations/FUiAnim_AnimationGroupNode.cpp | 286 + src/ui/animations/FUiAnim_AnimationGroupNode.h | 84 + src/ui/animations/FUiAnim_AnimationManager.cpp | 823 ++ src/ui/animations/FUiAnim_AnimationManager.h | 152 + src/ui/animations/FUiAnim_ControlAnimatorImpl.cpp | 3702 ++++++ src/ui/animations/FUiAnim_ControlAnimatorImpl.h | 280 + src/ui/animations/FUiAnim_ControlVisualElement.cpp | 343 + src/ui/animations/FUiAnim_ControlVisualElement.h | 122 + src/ui/animations/FUiAnim_Debug.cpp | 1861 +++ src/ui/animations/FUiAnim_Debug.h | 192 + .../animations/FUiAnim_DimensionAnimationImpl.cpp | 129 + src/ui/animations/FUiAnim_DimensionAnimationImpl.h | 58 + src/ui/animations/FUiAnim_DisplayContextImpl.cpp | 101 + src/ui/animations/FUiAnim_DisplayManager.cpp | 338 + src/ui/animations/FUiAnim_EflLayer.cpp | 831 ++ .../animations/FUiAnim_EflLayerConfiguration.cpp | 73 + src/ui/animations/FUiAnim_EflNode.cpp | 1589 +++ .../FUiAnim_EflVisualElementSurfaceImpl.cpp | 321 + .../FUiAnim_EflVisualElementSurfaceImpl.h | 78 + src/ui/animations/FUiAnim_FloatAnimationImpl.cpp | 127 + src/ui/animations/FUiAnim_FloatAnimationImpl.h | 57 + src/ui/animations/FUiAnim_FrameAnimatorImpl.cpp | 1169 ++ src/ui/animations/FUiAnim_FrameAnimatorImpl.h | 337 + src/ui/animations/FUiAnim_INativeNode.cpp | 72 + src/ui/animations/FUiAnim_IntegerAnimationImpl.cpp | 125 + src/ui/animations/FUiAnim_IntegerAnimationImpl.h | 56 + src/ui/animations/FUiAnim_MatrixUtil.cpp | 337 + src/ui/animations/FUiAnim_MatrixUtil.h | 144 + src/ui/animations/FUiAnim_NativeLayer.cpp | 128 + src/ui/animations/FUiAnim_PointAnimationImpl.cpp | 127 + src/ui/animations/FUiAnim_PointAnimationImpl.h | 57 + .../animations/FUiAnim_RectangleAnimationImpl.cpp | 132 + src/ui/animations/FUiAnim_RectangleAnimationImpl.h | 60 + src/ui/animations/FUiAnim_RootVisualElement.cpp | 97 + src/ui/animations/FUiAnim_RotateAnimationImpl.cpp | 46 + src/ui/animations/FUiAnim_RotateAnimationImpl.h | 53 + src/ui/animations/FUiAnim_TimingFunction.h | 40 + src/ui/animations/FUiAnim_TransactionNode.cpp | 1713 +++ src/ui/animations/FUiAnim_TransactionNode.h | 323 + src/ui/animations/FUiAnim_TransformMatrix3Df.cpp | 782 ++ src/ui/animations/FUiAnim_VariantEx.cpp | 79 + src/ui/animations/FUiAnim_VariantEx.h | 79 + src/ui/animations/FUiAnim_VisualElement.cpp | 224 + .../FUiAnim_VisualElementAnimationGroupImpl.cpp | 198 + .../FUiAnim_VisualElementAnimationGroupImpl.h | 77 + .../FUiAnim_VisualElementAnimationImpl.cpp | 213 + .../FUiAnim_VisualElementAnimationImpl.h | 91 + .../FUiAnim_VisualElementAnimationKeyFrame.cpp | 242 + .../FUiAnim_VisualElementAnimationKeyFrame.h | 104 + .../FUiAnim_VisualElementAnimationTiming.cpp | 133 + .../FUiAnim_VisualElementAnimationTiming.h | 85 + ...m_VisualElementAnimationVariantInterpolator.cpp | 338 + ...nim_VisualElementAnimationVariantInterpolator.h | 56 + src/ui/animations/FUiAnim_VisualElementCanvas.cpp | 113 + .../FUiAnim_VisualElementCoordinateSystem.cpp | 74 + .../FUiAnim_VisualElementEnvironment.cpp | 376 + .../animations/FUiAnim_VisualElementEnvironment.h | 48 + src/ui/animations/FUiAnim_VisualElementImpl.cpp | 8193 ++++++++++++ .../FUiAnim_VisualElementPropertyAnimationImpl.cpp | 134 + .../FUiAnim_VisualElementPropertyAnimationImpl.h | 73 + .../animations/FUiAnim_VisualElementSharedData.cpp | 186 + .../FUiAnim_VisualElementSurfaceImpl.cpp | 178 + .../FUiAnim_VisualElementValueAnimationImpl.cpp | 288 + .../FUiAnim_VisualElementValueAnimationImpl.h | 101 + src/ui/controls/FUiCtrlAnimation.cpp | 223 + src/ui/controls/FUiCtrlAnimationFrame.cpp | 100 + src/ui/controls/FUiCtrlButton.cpp | 499 + src/ui/controls/FUiCtrlButtonItem.cpp | 126 + src/ui/controls/FUiCtrlCheckButton.cpp | 483 + src/ui/controls/FUiCtrlColorPicker.cpp | 199 + src/ui/controls/FUiCtrlContextMenu.cpp | 602 + src/ui/controls/FUiCtrlCustomItem.cpp | 228 + src/ui/controls/FUiCtrlCustomList.cpp | 424 + src/ui/controls/FUiCtrlCustomListItem.cpp | 164 + src/ui/controls/FUiCtrlCustomListItemFormat.cpp | 175 + src/ui/controls/FUiCtrlDatePicker.cpp | 220 + src/ui/controls/FUiCtrlDateTimePicker.cpp | 288 + src/ui/controls/FUiCtrlEditArea.cpp | 963 ++ src/ui/controls/FUiCtrlEditDate.cpp | 216 + src/ui/controls/FUiCtrlEditField.cpp | 1058 ++ src/ui/controls/FUiCtrlEditTime.cpp | 188 + src/ui/controls/FUiCtrlExpandableEditArea.cpp | 993 ++ src/ui/controls/FUiCtrlExpandableList.cpp | 651 + src/ui/controls/FUiCtrlFooter.cpp | 574 + src/ui/controls/FUiCtrlFooterItem.cpp | 132 + src/ui/controls/FUiCtrlForm.cpp | 712 ++ src/ui/controls/FUiCtrlFrame.cpp | 260 + src/ui/controls/FUiCtrlGallery.cpp | 388 + src/ui/controls/FUiCtrlGalleryItem.cpp | 81 + src/ui/controls/FUiCtrlGroupContainer.cpp | 328 + src/ui/controls/FUiCtrlGroupItem.cpp | 147 + src/ui/controls/FUiCtrlGroupedList.cpp | 624 + src/ui/controls/FUiCtrlGroupedListView.cpp | 676 + src/ui/controls/FUiCtrlGroupedTableView.cpp | 605 + src/ui/controls/FUiCtrlHeader.cpp | 753 ++ src/ui/controls/FUiCtrlHeaderItem.cpp | 129 + .../FUiCtrlIGroupedListViewItemEventListener.cpp | 47 + .../FUiCtrlIGroupedListViewItemProvider.cpp | 36 + .../FUiCtrlIGroupedListViewItemProviderF.cpp | 36 + .../controls/FUiCtrlIListViewItemEventListener.cpp | 41 + src/ui/controls/FUiCtrlIconList.cpp | 474 + src/ui/controls/FUiCtrlIconListView.cpp | 797 ++ src/ui/controls/FUiCtrlIconListViewItem.cpp | 80 + src/ui/controls/FUiCtrlKeypad.cpp | 172 + src/ui/controls/FUiCtrlLabel.cpp | 341 + src/ui/controls/FUiCtrlList.cpp | 655 + src/ui/controls/FUiCtrlListContextItem.cpp | 146 + src/ui/controls/FUiCtrlListItemBase.cpp | 131 + src/ui/controls/FUiCtrlListView.cpp | 606 + src/ui/controls/FUiCtrlMessageBox.cpp | 182 + src/ui/controls/FUiCtrlOptionMenu.cpp | 504 + src/ui/controls/FUiCtrlOverlayPanel.cpp | 225 + src/ui/controls/FUiCtrlOverlayRegion.cpp | 194 + src/ui/controls/FUiCtrlPanel.cpp | 227 + src/ui/controls/FUiCtrlPopup.cpp | 338 + src/ui/controls/FUiCtrlProgress.cpp | 191 + src/ui/controls/FUiCtrlProgressPopup.cpp | 140 + src/ui/controls/FUiCtrlRadioGroup.cpp | 140 + src/ui/controls/FUiCtrlScrollPanel.cpp | 487 + src/ui/controls/FUiCtrlSearchBar.cpp | 830 ++ src/ui/controls/FUiCtrlSectionTableView.cpp | 548 + src/ui/controls/FUiCtrlSimpleItem.cpp | 76 + src/ui/controls/FUiCtrlSlidableGroupedList.cpp | 636 + src/ui/controls/FUiCtrlSlidableList.cpp | 489 + src/ui/controls/FUiCtrlSlider.cpp | 417 + src/ui/controls/FUiCtrlSplitPanel.cpp | 295 + src/ui/controls/FUiCtrlTab.cpp | 349 + src/ui/controls/FUiCtrlTabBar.cpp | 250 + src/ui/controls/FUiCtrlTabBarItem.cpp | 103 + src/ui/controls/FUiCtrlTableView.cpp | 517 + src/ui/controls/FUiCtrlTableViewContextItem.cpp | 63 + src/ui/controls/FUiCtrlTableViewGroupItem.cpp | 104 + src/ui/controls/FUiCtrlTableViewItem.cpp | 128 + src/ui/controls/FUiCtrlTableViewItemBase.cpp | 93 + .../controls/FUiCtrlTableViewSimpleGroupItem.cpp | 111 + src/ui/controls/FUiCtrlTableViewSimpleItem.cpp | 116 + src/ui/controls/FUiCtrlTextBox.cpp | 441 + src/ui/controls/FUiCtrlTimePicker.cpp | 187 + src/ui/controls/FUiCtrl_ActionEvent.cpp | 166 + src/ui/controls/FUiCtrl_AdjustmentEvent.cpp | 143 + src/ui/controls/FUiCtrl_Animation.cpp | 347 + src/ui/controls/FUiCtrl_AnimationEvent.cpp | 115 + src/ui/controls/FUiCtrl_AnimationFrameImpl.cpp | 101 + src/ui/controls/FUiCtrl_AnimationImpl.cpp | 242 + src/ui/controls/FUiCtrl_AnimationModel.cpp | 97 + src/ui/controls/FUiCtrl_AnimationPresenter.cpp | 460 + src/ui/controls/FUiCtrl_Button.cpp | 1677 +++ src/ui/controls/FUiCtrl_ButtonImpl.cpp | 949 ++ src/ui/controls/FUiCtrl_ButtonItemImpl.cpp | 173 + src/ui/controls/FUiCtrl_ButtonModel.cpp | 47 + src/ui/controls/FUiCtrl_ButtonPresenter.cpp | 1561 +++ src/ui/controls/FUiCtrl_CheckButton.cpp | 1906 +++ src/ui/controls/FUiCtrl_CheckButtonImpl.cpp | 1054 ++ src/ui/controls/FUiCtrl_CheckButtonModel.cpp | 48 + src/ui/controls/FUiCtrl_CheckButtonPresenter.cpp | 2942 +++++ src/ui/controls/FUiCtrl_ColorChangeEvent.cpp | 131 + src/ui/controls/FUiCtrl_ColorPicker.cpp | 715 ++ src/ui/controls/FUiCtrl_ColorPickerImpl.cpp | 365 + src/ui/controls/FUiCtrl_ColorPickerModel.cpp | 342 + src/ui/controls/FUiCtrl_ColorPickerPresenter.cpp | 1484 +++ src/ui/controls/FUiCtrl_ContextMenu.cpp | 1522 +++ .../controls/FUiCtrl_ContextMenuGridPresenter.cpp | 2001 +++ src/ui/controls/FUiCtrl_ContextMenuImpl.cpp | 488 + src/ui/controls/FUiCtrl_ContextMenuItem.cpp | 654 + .../controls/FUiCtrl_ContextMenuListPresenter.cpp | 1565 +++ src/ui/controls/FUiCtrl_ContextMenuModel.cpp | 162 + src/ui/controls/FUiCtrl_CustomElement.cpp | 123 + src/ui/controls/FUiCtrl_CustomItemImpl.cpp | 470 + src/ui/controls/FUiCtrl_CustomListElements.cpp | 771 ++ src/ui/controls/FUiCtrl_CustomListImpl.cpp | 988 ++ .../controls/FUiCtrl_CustomListItemFormatImpl.cpp | 356 + src/ui/controls/FUiCtrl_CustomListItemImpl.cpp | 1175 ++ src/ui/controls/FUiCtrl_DatePickerImpl.cpp | 391 + src/ui/controls/FUiCtrl_DateTimeBar.cpp | 1026 ++ src/ui/controls/FUiCtrl_DateTimeBarItem.cpp | 121 + src/ui/controls/FUiCtrl_DateTimeBarModel.cpp | 233 + src/ui/controls/FUiCtrl_DateTimeBarPresenter.cpp | 1921 +++ src/ui/controls/FUiCtrl_DateTimeChangeEvent.cpp | 176 + src/ui/controls/FUiCtrl_DateTimeDisplayBox.cpp | 286 + src/ui/controls/FUiCtrl_DateTimeModel.cpp | 211 + src/ui/controls/FUiCtrl_DateTimePicker.cpp | 1208 ++ src/ui/controls/FUiCtrl_DateTimePickerImpl.cpp | 448 + src/ui/controls/FUiCtrl_DateTimePresenter.cpp | 2593 ++++ src/ui/controls/FUiCtrl_DateTimeUtils.cpp | 356 + src/ui/controls/FUiCtrl_Edit.cpp | 3564 ++++++ src/ui/controls/FUiCtrl_EditAreaImpl.cpp | 1940 +++ src/ui/controls/FUiCtrl_EditCopyPasteEvent.cpp | 171 + src/ui/controls/FUiCtrl_EditCopyPasteManager.cpp | 2920 +++++ src/ui/controls/FUiCtrl_EditDate.cpp | 1312 ++ src/ui/controls/FUiCtrl_EditDateImpl.cpp | 571 + src/ui/controls/FUiCtrl_EditDatePresenter.cpp | 1681 +++ src/ui/controls/FUiCtrl_EditFieldImpl.cpp | 2354 ++++ src/ui/controls/FUiCtrl_EditModel.cpp | 300 + src/ui/controls/FUiCtrl_EditPresenter.cpp | 12681 +++++++++++++++++++ src/ui/controls/FUiCtrl_EditTime.cpp | 1195 ++ src/ui/controls/FUiCtrl_EditTimeImpl.cpp | 456 + src/ui/controls/FUiCtrl_EditTimePresenter.cpp | 2033 +++ .../controls/FUiCtrl_ExpandableEditAreaEvent.cpp | 204 + src/ui/controls/FUiCtrl_ExpandableEditAreaImpl.cpp | 2062 +++ src/ui/controls/FUiCtrl_ExpandableListImpl.cpp | 2206 ++++ src/ui/controls/FUiCtrl_FastScroll.cpp | 341 + src/ui/controls/FUiCtrl_FastScrollEvent.cpp | 93 + src/ui/controls/FUiCtrl_FastScrollEventArg.cpp | 62 + src/ui/controls/FUiCtrl_FastScrollIndex.cpp | 784 ++ src/ui/controls/FUiCtrl_FastScrollIndexNode.cpp | 110 + src/ui/controls/FUiCtrl_FastScrollModel.cpp | 78 + src/ui/controls/FUiCtrl_FastScrollPresenter.cpp | 3249 +++++ src/ui/controls/FUiCtrl_FlickAnimation.cpp | 666 + src/ui/controls/FUiCtrl_FooterImpl.cpp | 1907 +++ src/ui/controls/FUiCtrl_FooterItemImpl.cpp | 167 + src/ui/controls/FUiCtrl_Form.cpp | 3587 ++++++ src/ui/controls/FUiCtrl_FormImpl.cpp | 2254 ++++ src/ui/controls/FUiCtrl_FormModel.cpp | 35 + src/ui/controls/FUiCtrl_FormPresenter.cpp | 79 + src/ui/controls/FUiCtrl_Frame.cpp | 1361 ++ src/ui/controls/FUiCtrl_FrameEvent.cpp | 187 + src/ui/controls/FUiCtrl_FrameImpl.cpp | 733 ++ src/ui/controls/FUiCtrl_FrameModel.cpp | 37 + src/ui/controls/FUiCtrl_FramePresenter.cpp | 84 + src/ui/controls/FUiCtrl_Gallery.cpp | 867 ++ src/ui/controls/FUiCtrl_GalleryBitmap.cpp | 273 + src/ui/controls/FUiCtrl_GalleryCanvas.cpp | 842 ++ src/ui/controls/FUiCtrl_GalleryCanvasManager.cpp | 309 + src/ui/controls/FUiCtrl_GalleryCoreEvent.cpp | 67 + src/ui/controls/FUiCtrl_GalleryCoreEventArg.cpp | 60 + .../controls/FUiCtrl_GalleryCoreEventListener.cpp | 77 + src/ui/controls/FUiCtrl_GalleryImageReader.cpp | 180 + src/ui/controls/FUiCtrl_GalleryImpl.cpp | 554 + src/ui/controls/FUiCtrl_GalleryImplEvent.cpp | 74 + src/ui/controls/FUiCtrl_GalleryImplEventArg.cpp | 45 + src/ui/controls/FUiCtrl_GalleryItem.cpp | 91 + src/ui/controls/FUiCtrl_GalleryItemImpl.cpp | 118 + src/ui/controls/FUiCtrl_GalleryItemProvider.cpp | 71 + .../FUiCtrl_GalleryItemProviderAdaptor.cpp | 135 + .../FUiCtrl_GalleryItemProviderAdaptorImpl.cpp | 114 + src/ui/controls/FUiCtrl_GalleryModel.cpp | 217 + src/ui/controls/FUiCtrl_GalleryPresenter.cpp | 1361 ++ src/ui/controls/FUiCtrl_GalleryRenderer.cpp | 1310 ++ .../controls/FUiCtrl_GalleryRendererNotifier.cpp | 76 + src/ui/controls/FUiCtrl_GalleryViewEvent.cpp | 47 + .../controls/FUiCtrl_GalleryViewEventHandler.cpp | 1180 ++ src/ui/controls/FUiCtrl_GalleryViewEventInfo.cpp | 138 + src/ui/controls/FUiCtrl_GroupContainer.cpp | 1314 ++ src/ui/controls/FUiCtrl_GroupContainerImpl.cpp | 433 + .../controls/FUiCtrl_GroupContainerPresenter.cpp | 321 + src/ui/controls/FUiCtrl_GroupItemImpl.cpp | 255 + src/ui/controls/FUiCtrl_GroupedListImpl.cpp | 1504 +++ src/ui/controls/FUiCtrl_GroupedListViewImpl.cpp | 2325 ++++ .../FUiCtrl_GroupedListViewItemProviderAdaptor.cpp | 562 + src/ui/controls/FUiCtrl_HeaderImpl.cpp | 2263 ++++ src/ui/controls/FUiCtrl_HeaderItemImpl.cpp | 167 + src/ui/controls/FUiCtrl_IconListData.cpp | 122 + src/ui/controls/FUiCtrl_IconListImpl.cpp | 1024 ++ src/ui/controls/FUiCtrl_IconListItem.cpp | 1159 ++ .../FUiCtrl_IconListItemDrawingProperty.cpp | 765 ++ src/ui/controls/FUiCtrl_IconListItemProvider.cpp | 95 + .../FUiCtrl_IconListItemProviderAdaptor.cpp | 270 + src/ui/controls/FUiCtrl_IconListPresenter.cpp | 5507 ++++++++ src/ui/controls/FUiCtrl_IconListUtils.cpp | 201 + src/ui/controls/FUiCtrl_IconListView.cpp | 1320 ++ src/ui/controls/FUiCtrl_IconListViewImpl.cpp | 1048 ++ src/ui/controls/FUiCtrl_IconListViewItemEvent.cpp | 103 + .../controls/FUiCtrl_IconListViewItemEventArg.cpp | 97 + src/ui/controls/FUiCtrl_IconListViewItemImpl.cpp | 87 + src/ui/controls/FUiCtrl_Indicator.cpp | 1271 ++ src/ui/controls/FUiCtrl_IndicatorManager.cpp | 492 + src/ui/controls/FUiCtrl_InputPad.cpp | 312 + src/ui/controls/FUiCtrl_InputPadPresenter.cpp | 680 + src/ui/controls/FUiCtrl_Keypad.cpp | 905 ++ src/ui/controls/FUiCtrl_KeypadEvent.cpp | 211 + src/ui/controls/FUiCtrl_KeypadImpl.cpp | 288 + src/ui/controls/FUiCtrl_Label.cpp | 692 + src/ui/controls/FUiCtrl_LabelImpl.cpp | 597 + src/ui/controls/FUiCtrl_LabelModel.cpp | 47 + src/ui/controls/FUiCtrl_LabelPresenter.cpp | 510 + src/ui/controls/FUiCtrl_LanguageEvent.cpp | 187 + src/ui/controls/FUiCtrl_LinkEvent.cpp | 185 + src/ui/controls/FUiCtrl_ListBaseImpl.cpp | 1059 ++ src/ui/controls/FUiCtrl_ListContextItemImpl.cpp | 229 + src/ui/controls/FUiCtrl_ListImpl.cpp | 2149 ++++ src/ui/controls/FUiCtrl_ListItemBaseImpl.cpp | 385 + src/ui/controls/FUiCtrl_ListItemCommon.cpp | 138 + src/ui/controls/FUiCtrl_ListItemEvent.cpp | 284 + src/ui/controls/FUiCtrl_ListItemEventArg.cpp | 88 + src/ui/controls/FUiCtrl_ListViewContextItem.cpp | 398 + src/ui/controls/FUiCtrl_ListViewImpl.cpp | 2180 ++++ src/ui/controls/FUiCtrl_ListViewItem.cpp | 2266 ++++ .../FUiCtrl_ListViewItemProviderAdaptor.cpp | 425 + src/ui/controls/FUiCtrl_ListViewModel.cpp | 1782 +++ src/ui/controls/FUiCtrl_MessageBox.cpp | 552 + src/ui/controls/FUiCtrl_MessageBoxImpl.cpp | 295 + src/ui/controls/FUiCtrl_MessageBoxPresenter.cpp | 1612 +++ src/ui/controls/FUiCtrl_OptionMenu.cpp | 1811 +++ src/ui/controls/FUiCtrl_OptionMenuImpl.cpp | 462 + src/ui/controls/FUiCtrl_OptionMenuItem.cpp | 935 ++ src/ui/controls/FUiCtrl_OptionMenuModel.cpp | 321 + src/ui/controls/FUiCtrl_OptionMenuPresenter.cpp | 1189 ++ src/ui/controls/FUiCtrl_OverlayAgent.cpp | 1804 +++ src/ui/controls/FUiCtrl_OverlayPanel.cpp | 351 + src/ui/controls/FUiCtrl_OverlayPanelImpl.cpp | 499 + src/ui/controls/FUiCtrl_OverlayRegionImpl.cpp | 694 + src/ui/controls/FUiCtrl_Panel.cpp | 359 + src/ui/controls/FUiCtrl_PanelImpl.cpp | 422 + src/ui/controls/FUiCtrl_PanelPresenter.cpp | 259 + src/ui/controls/FUiCtrl_Popup.cpp | 642 + src/ui/controls/FUiCtrl_PopupImpl.cpp | 588 + src/ui/controls/FUiCtrl_PopupPresenter.cpp | 609 + src/ui/controls/FUiCtrl_Progress.cpp | 394 + src/ui/controls/FUiCtrl_ProgressImpl.cpp | 348 + src/ui/controls/FUiCtrl_ProgressModel.cpp | 78 + src/ui/controls/FUiCtrl_ProgressPopup.cpp | 913 ++ src/ui/controls/FUiCtrl_ProgressPopupEvent.cpp | 124 + src/ui/controls/FUiCtrl_ProgressPopupImpl.cpp | 453 + src/ui/controls/FUiCtrl_ProgressPopupPresenter.cpp | 817 ++ src/ui/controls/FUiCtrl_ProgressPresenter.cpp | 384 + src/ui/controls/FUiCtrl_PublicActionEvent.cpp | 166 + src/ui/controls/FUiCtrl_PublicAdjustmentEvent.cpp | 143 + src/ui/controls/FUiCtrl_PublicAnimationEvent.cpp | 117 + .../controls/FUiCtrl_PublicClipboardPopupEvent.cpp | 128 + src/ui/controls/FUiCtrl_PublicColorChangeEvent.cpp | 131 + .../controls/FUiCtrl_PublicDateTimeChangeEvent.cpp | 215 + .../FUiCtrl_PublicExpandableEditAreaEvent.cpp | 205 + src/ui/controls/FUiCtrl_PublicFrameEvent.cpp | 194 + src/ui/controls/FUiCtrl_PublicKeypadEvent.cpp | 221 + src/ui/controls/FUiCtrl_PublicLanguageEvent.cpp | 200 + src/ui/controls/FUiCtrl_PublicLinkEvent.cpp | 201 + .../controls/FUiCtrl_PublicProgressPopupEvent.cpp | 132 + src/ui/controls/FUiCtrl_PublicScrollPanelEvent.cpp | 184 + src/ui/controls/FUiCtrl_PublicSearchBarEvent.cpp | 190 + src/ui/controls/FUiCtrl_PublicSliderEvent.cpp | 143 + src/ui/controls/FUiCtrl_PublicSplitPanelEvent.cpp | 194 + src/ui/controls/FUiCtrl_PublicTextBlockEvent.cpp | 189 + src/ui/controls/FUiCtrl_PublicTextEvent.cpp | 185 + src/ui/controls/FUiCtrl_RadioGroup.cpp | 248 + src/ui/controls/FUiCtrl_RadioGroupImpl.cpp | 217 + src/ui/controls/FUiCtrl_RadioGroupModel.cpp | 47 + src/ui/controls/FUiCtrl_RadioGroupPresenter.cpp | 98 + src/ui/controls/FUiCtrl_Scroll.cpp | 322 + src/ui/controls/FUiCtrl_ScrollEvent.cpp | 128 + src/ui/controls/FUiCtrl_ScrollEventArg.cpp | 103 + src/ui/controls/FUiCtrl_ScrollPanel.cpp | 1135 ++ src/ui/controls/FUiCtrl_ScrollPanelEvent.cpp | 192 + src/ui/controls/FUiCtrl_ScrollPanelImpl.cpp | 622 + src/ui/controls/FUiCtrl_ScrollPanelModel.cpp | 102 + src/ui/controls/FUiCtrl_ScrollPanelPresenter.cpp | 2104 +++ src/ui/controls/FUiCtrl_ScrollPresenter.cpp | 2412 ++++ src/ui/controls/FUiCtrl_SearchBar.cpp | 2942 +++++ src/ui/controls/FUiCtrl_SearchBarEvent.cpp | 192 + src/ui/controls/FUiCtrl_SearchBarImpl.cpp | 1993 +++ src/ui/controls/FUiCtrl_SearchBarModel.cpp | 88 + src/ui/controls/FUiCtrl_SearchBarPresenter.cpp | 775 ++ src/ui/controls/FUiCtrl_SimpleItemImpl.cpp | 179 + .../controls/FUiCtrl_SlidableGroupedListImpl.cpp | 2421 ++++ src/ui/controls/FUiCtrl_SlidableListImpl.cpp | 1872 +++ src/ui/controls/FUiCtrl_Slider.cpp | 1106 ++ src/ui/controls/FUiCtrl_SliderEvent.cpp | 142 + src/ui/controls/FUiCtrl_SliderImpl.cpp | 772 ++ src/ui/controls/FUiCtrl_SliderModel.cpp | 78 + src/ui/controls/FUiCtrl_SliderOverlay.cpp | 246 + src/ui/controls/FUiCtrl_SliderPresenter.cpp | 1800 +++ src/ui/controls/FUiCtrl_SplitPanel.cpp | 848 ++ src/ui/controls/FUiCtrl_SplitPanelEvent.cpp | 175 + src/ui/controls/FUiCtrl_SplitPanelImpl.cpp | 562 + src/ui/controls/FUiCtrl_SplitPanelModel.cpp | 84 + src/ui/controls/FUiCtrl_SplitPanelPresenter.cpp | 1546 +++ src/ui/controls/FUiCtrl_Tab.cpp | 1709 +++ src/ui/controls/FUiCtrl_TabBar.cpp | 819 ++ src/ui/controls/FUiCtrl_TabBarImpl.cpp | 447 + src/ui/controls/FUiCtrl_TabBarItem.cpp | 141 + src/ui/controls/FUiCtrl_TabBarItemImpl.cpp | 67 + src/ui/controls/FUiCtrl_TabBarModel.cpp | 259 + src/ui/controls/FUiCtrl_TabBarPresenter.cpp | 1167 ++ src/ui/controls/FUiCtrl_TabImpl.cpp | 532 + src/ui/controls/FUiCtrl_TabItem.cpp | 186 + src/ui/controls/FUiCtrl_TabModel.cpp | 108 + src/ui/controls/FUiCtrl_TabPresenter.cpp | 2899 +++++ src/ui/controls/FUiCtrl_TableView.cpp | 1564 +++ src/ui/controls/FUiCtrl_TableViewImpl.cpp | 1568 +++ src/ui/controls/FUiCtrl_TableViewItem.cpp | 5525 ++++++++ src/ui/controls/FUiCtrl_TableViewItemEvent.cpp | 486 + src/ui/controls/FUiCtrl_TableViewItemEventArg.cpp | 87 + src/ui/controls/FUiCtrl_TableViewItemImpl.cpp | 336 + src/ui/controls/FUiCtrl_TableViewItemProvider.cpp | 716 ++ .../FUiCtrl_TableViewItemProviderAdaptor.cpp | 520 + src/ui/controls/FUiCtrl_TableViewPresenter.cpp | 6565 ++++++++++ src/ui/controls/FUiCtrl_TextBlockEvent.cpp | 186 + src/ui/controls/FUiCtrl_TextBoxImpl.cpp | 846 ++ src/ui/controls/FUiCtrl_TextEvent.cpp | 195 + src/ui/controls/FUiCtrl_TimePickerImpl.cpp | 371 + src/ui/controls/FUiCtrl_TokenEdit.cpp | 766 ++ src/ui/controls/FUiCtrl_TokenEditModel.cpp | 35 + src/ui/controls/FUiCtrl_TokenEditPresenter.cpp | 4857 +++++++ src/ui/controls/FUiCtrl_Toolbar.cpp | 10552 +++++++++++++++ src/ui/controls/FUiCtrl_ToolbarModel.cpp | 59 + src/ui/controls/FUiCtrl_ToolbarPresenter.cpp | 2592 ++++ src/ui/controls/FUiCtrl_UiFastScrollEvent.cpp | 90 + src/ui/controls/FUiCtrl_UiFastScrollEventArg.cpp | 57 + src/ui/controls/FUiCtrl_UiIconListItemEvent.cpp | 90 + src/ui/controls/FUiCtrl_UiListViewItemEvent.cpp | 88 + src/ui/controls/FUiCtrl_UiListViewItemEventArg.cpp | 72 + src/ui/controls/FUiCtrl_UiScrollEvent.cpp | 105 + src/ui/controls/FUiCtrl_UiScrollEventArg.cpp | 115 + src/ui/controls/FUiCtrl_UiTableViewItemEvent.cpp | 298 + src/ui/controls/font.png | 1166 ++ src/ui/effects/FUiEffectsEffect.cpp | 316 + src/ui/effects/FUiEffectsEffectManager.cpp | 90 + src/ui/effects/FUiEffectsEffectTouchInfo.cpp | 93 + src/ui/effects/FUiEffectsEffectTouchInfo.h | 150 + src/ui/effects/FUiEffects_EffectErrorMessages.cpp | 46 + src/ui/effects/FUiEffects_EffectErrorMessages.h | 64 + src/ui/effects/FUiEffects_EffectImpl.cpp | 653 + src/ui/effects/FUiEffects_EffectImpl.h | 454 + src/ui/effects/FUiEffects_EffectManagerImpl.cpp | 206 + src/ui/effects/FUiEffects_EffectManagerImpl.h | 123 + src/ui/effects/FUiEffects_EffectTimer.h | 206 + src/ui/effects/inc/FUiEffects_LoggingProfiler.h | 135 + src/ui/effects/inc/FUiEffects_Parser.h | 28 + src/ui/effects/inc/FUiEffects_ParserEffectParser.h | 290 + src/ui/effects/inc/FUiEffects_ParserXMLParser.h | 119 + src/ui/effects/inc/FUiEffects_Pe.h | 32 + src/ui/effects/inc/FUiEffects_PeElementSurface.h | 187 + src/ui/effects/inc/FUiEffects_PePointSurface.h | 264 + .../effects/inc/FUiEffects_PePointSurfaceNURBS.h | 234 + src/ui/effects/inc/FUiEffects_PeRodSurface.h | 191 + src/ui/effects/inc/FUiEffects_PeRodSurfaceNURBS.h | 179 + src/ui/effects/inc/FUiEffects_PeSpringSurface.h | 179 + src/ui/effects/inc/FUiEffects_Renderer.h | 34 + .../inc/FUiEffects_RendererDirectionalLight.h | 195 + .../inc/FUiEffects_RendererEffectRenderer.h | 380 + .../effects/inc/FUiEffects_RendererEffectShader.h | 124 + .../inc/FUiEffects_RendererLightingParameters.h | 157 + src/ui/effects/inc/FUiEffects_RendererLog.h | 67 + .../FUiEffects_RendererMemoryTexture2DProperty.h | 161 + src/ui/effects/inc/FUiEffects_RendererPointLight.h | 256 + .../inc/FUiEffects_RendererRendererGeometry.h | 294 + .../inc/FUiEffects_RendererRendererObject.h | 166 + src/ui/effects/inc/FUiEffects_RendererSpotLight.h | 359 + src/ui/effects/inc/FUiEffects_RendererViewport.h | 77 + src/ui/effects/inc/FUiEffects_Runtime.h | 40 + .../inc/FUiEffects_RuntimeDirectionalLight.h | 165 + src/ui/effects/inc/FUiEffects_RuntimeEffectModel.h | 531 + .../inc/FUiEffects_RuntimeEffectModelScript.h | 429 + .../inc/FUiEffects_RuntimeGraphicalSurface.h | 270 + .../inc/FUiEffects_RuntimeGraphicalSurfaceNurbs.h | 364 + .../inc/FUiEffects_RuntimeIEffectModelListener.h | 81 + .../inc/FUiEffects_RuntimeIEffectModelManager.h | 162 + .../inc/FUiEffects_RuntimeIEffectModelScript.h | 260 + .../inc/FUiEffects_RuntimeIScriptProcessing.h | 124 + .../effects/inc/FUiEffects_RuntimeLuaProcessing.h | 215 + src/ui/effects/inc/FUiEffects_RuntimeModel.h | 273 + .../effects/inc/FUiEffects_RuntimeModelSurface.h | 275 + src/ui/effects/inc/FUiEffects_RuntimePointLight.h | 164 + .../effects/inc/FUiEffects_RuntimePropertyCast.h | 91 + .../inc/FUiEffects_RuntimeRenderDataScene.h | 322 + .../inc/FUiEffects_RuntimeRenderDataSurface.h | 135 + .../inc/FUiEffects_RuntimeScriptProcessing.h | 37 + src/ui/effects/inc/FUiEffects_RuntimeSpotLight.h | 209 + src/ui/effects/inc/FUiEffects_RuntimeUnitLight.h | 194 + .../FUiEffects_RendererEngineModelAabb.h | 84 + ...Effects_RendererEngineModelAlphaBlendProperty.h | 90 + .../FUiEffects_RendererEngineModelAttribute.h | 37 + .../FUiEffects_RendererEngineModelBuffer.h | 235 + .../FUiEffects_RendererEngineModelBufferVisitor.h | 51 + .../FUiEffects_RendererEngineModelCache.h | 48 + .../FUiEffects_RendererEngineModelCamera.h | 75 + .../FUiEffects_RendererEngineModelDrawable.h | 71 + ...ts_RendererEngineModelExternalRenderInterface.h | 42 + ...Effects_RendererEngineModelFloatArrayProperty.h | 45 + .../FUiEffects_RendererEngineModelFloatProperty.h | 52 + ...ffects_RendererEngineModelFloatPropertyHolder.h | 52 + ...Effects_RendererEngineModelForwardDeclaration.h | 75 + .../FUiEffects_RendererEngineModelFrustum.h | 47 + .../FUiEffects_RendererEngineModelGeometry.h | 64 + .../FUiEffects_RendererEngineModelGroup.h | 79 + .../FUiEffects_RendererEngineModelIntProperty.h | 52 + ...iEffects_RendererEngineModelIntPropertyHolder.h | 69 + .../FUiEffects_RendererEngineModelMaterial.h | 60 + ...UiEffects_RendererEngineModelMatrix4fProperty.h | 57 + ...cts_RendererEngineModelMatrix4fPropertyHolder.h | 59 + .../FUiEffects_RendererEngineModelNode.h | 90 + ...FUiEffects_RendererEngineModelProgramProperty.h | 77 + .../FUiEffects_RendererEngineModelProperty.h | 49 + ...cts_RendererEngineModelPropertyHolderMaterial.h | 61 + ...FUiEffects_RendererEngineModelPropertyVisitor.h | 75 + .../FUiEffects_RendererEngineModelRenderTarget.h | 129 + ...RendererEngineModelRenderTargetExternalRender.h | 53 + ...ffects_RendererEngineModelRenderTargetVisitor.h | 46 + ...endererEngineModelShaderHolderProgramProperty.h | 52 + .../FUiEffects_RendererEngineModelShaderProperty.h | 105 + ...fects_RendererEngineModelStringShaderProperty.h | 56 + .../FUiEffects_RendererEngineModelStubAttachment.h | 58 + ...endererEngineModelTexture2DAttachmentProperty.h | 88 + ...iEffects_RendererEngineModelTexture2DProperty.h | 63 + ...iEffects_RendererEngineModelTextureAttachment.h | 57 + ...FUiEffects_RendererEngineModelTextureProperty.h | 139 + ...Effects_RendererEngineModelTypedArrayProperty.h | 49 + ...s_RendererEngineModelTypedArrayPropertyHolder.h | 79 + ...UiEffects_RendererEngineModelVector2fProperty.h | 57 + ...cts_RendererEngineModelVector2fPropertyHolder.h | 56 + ...UiEffects_RendererEngineModelVector3fProperty.h | 57 + ...cts_RendererEngineModelVector3fPropertyHolder.h | 56 + ...UiEffects_RendererEngineModelVector4fProperty.h | 57 + ...cts_RendererEngineModelVector4fPropertyHolder.h | 56 + .../FUiEffects_RendererEngineModelVisitor.h | 46 + ...ts_RendererGraphicsEngineOpenGLImplementation.h | 67 + .../FUiEffects_RendererGraphicsEngineRender.h | 146 + ...fects_RendererGraphicsEngineRenderBufferCache.h | 165 + .../FUiEffects_RendererGraphicsEngineRenderCache.h | 91 + ...UiEffects_RendererGraphicsEngineRenderCommand.h | 47 + ...cts_RendererGraphicsEngineRenderDrawableCache.h | 294 + ...RendererGraphicsEngineRenderRenderTargetCache.h | 117 + ...fects_RendererGraphicsEngineRenderShaderCache.h | 116 + ...ffects_RendererGraphicsEngineRenderStateCache.h | 74 + ...ects_RendererGraphicsEngineRenderTextureCache.h | 85 + .../math/FUiEffects_RendererMathAdapterFunctions.h | 290 + .../renderer/math/FUiEffects_RendererMathCommon.h | 61 + .../renderer/math/FUiEffects_RendererMathMatrix.h | 1088 ++ .../math/FUiEffects_RendererMathMatrix1Traits.h | 99 + .../math/FUiEffects_RendererMathMatrix2Traits.h | 251 + .../math/FUiEffects_RendererMathMatrix3Traits.h | 533 + .../math/FUiEffects_RendererMathMatrixTraits.h | 1413 +++ .../math/FUiEffects_RendererMathMatrixTraitsBase.h | 55 + .../renderer/math/FUiEffects_RendererMathVector.h | 686 + .../math/FUiEffects_RendererMathVector1Traits.h | 69 + .../math/FUiEffects_RendererMathVector2Traits.h | 87 + .../math/FUiEffects_RendererMathVector3Traits.h | 133 + .../math/FUiEffects_RendererMathVectorTraits.h | 119 + .../math/FUiEffects_RendererMathVectorTraitsBase.h | 51 + .../FUiEffects_RendererSystemConstnessPolicy.h | 44 + .../system/FUiEffects_RendererSystemData.h | 459 + .../system/FUiEffects_RendererSystemDataType.h | 46 + .../system/FUiEffects_RendererSystemException.h | 51 + .../system/FUiEffects_RendererSystemNonCopyable.h | 46 + .../FUiEffects_RendererSystemPlatformDefine.h | 48 + .../system/FUiEffects_RendererSystemSelectType.h | 49 + .../system/FUiEffects_RendererSystemSmartPtr.h | 654 + ...fects_RendererSystemSmartPtrAssertCheckPolicy.h | 100 + ...ts_RendererSystemSmartPtrDefaultStoragePolicy.h | 172 + ...UiEffects_RendererSystemSmartPtrNoCheckPolicy.h | 87 + ...ects_RendererSystemSmartPtrRefCountedMTPolicy.h | 178 + .../FUiEffects_RendererSystemSmartPtrRefCounter.h | 48 + ...RendererSystemSmartPtrRefCounterHandlerAtomic.h | 84 + .../system/FUiEffects_RendererSystemStaticAssert.h | 45 + .../system/FUiEffects_RendererSystemTypeNull.h | 36 + .../system/FUiEffects_RendererSystemTypeTraits.h | 184 + src/ui/effects/inc/utils/FUiEffects_Utils.h | 36 + .../inc/utils/FUiEffects_UtilsAdapterFunctions.h | 261 + src/ui/effects/inc/utils/FUiEffects_UtilsCommon.h | 58 + src/ui/effects/inc/utils/FUiEffects_UtilsLuaMat4.h | 603 + src/ui/effects/inc/utils/FUiEffects_UtilsMatrix2.h | 713 ++ src/ui/effects/inc/utils/FUiEffects_UtilsMatrix3.h | 1136 ++ src/ui/effects/inc/utils/FUiEffects_UtilsMatrix4.h | 1833 +++ src/ui/effects/inc/utils/FUiEffects_UtilsVector2.h | 435 + src/ui/effects/inc/utils/FUiEffects_UtilsVector3.h | 486 + src/ui/effects/inc/utils/FUiEffects_UtilsVector4.h | 487 + .../parser/FUiEffects_ParserEffectParser.cpp | 2286 ++++ .../effects/parser/FUiEffects_ParserXMLParser.cpp | 182 + .../physics-engine/FUiEffects_PeElementSurface.cpp | 84 + .../physics-engine/FUiEffects_PePointSurface.cpp | 326 + .../FUiEffects_PePointSurfaceNURBS.cpp | 152 + .../physics-engine/FUiEffects_PeRodSurface.cpp | 180 + .../FUiEffects_PeRodSurfaceNURBS.cpp | 113 + .../physics-engine/FUiEffects_PeSpringSurface.cpp | 151 + .../renderer/FUiEffects_RendererEffectRenderer.cpp | 1055 ++ .../renderer/FUiEffects_RendererEffectShader.cpp | 216 + src/ui/effects/renderer/FUiEffects_RendererLog.cpp | 121 + .../FUiEffects_RendererMemoryTexture2DProperty.cpp | 80 + .../FUiEffects_RendererRendererGeometry.cpp | 80 + ...fects_RendererEngineModelAlphaBlendProperty.cpp | 115 + .../FUiEffects_RendererEngineModelBuffer.cpp | 41 + .../FUiEffects_RendererEngineModelCache.cpp | 30 + .../FUiEffects_RendererEngineModelCamera.cpp | 169 + .../FUiEffects_RendererEngineModelDrawable.cpp | 149 + ...fects_RendererEngineModelFloatArrayProperty.cpp | 36 + ...ects_RendererEngineModelFloatPropertyHolder.cpp | 52 + .../FUiEffects_RendererEngineModelGeometry.cpp | 80 + .../FUiEffects_RendererEngineModelGroup.cpp | 236 + .../FUiEffects_RendererEngineModelMaterial.cpp | 68 + ...s_RendererEngineModelMatrix4fPropertyHolder.cpp | 62 + .../FUiEffects_RendererEngineModelNode.cpp | 221 + .../FUiEffects_RendererEngineModelProperty.cpp | 45 + ...s_RendererEngineModelPropertyHolderMaterial.cpp | 113 + .../FUiEffects_RendererEngineModelRenderTarget.cpp | 156 + ...ndererEngineModelRenderTargetExternalRender.cpp | 59 + ...dererEngineModelShaderHolderProgramProperty.cpp | 52 + ...cts_RendererEngineModelStringShaderProperty.cpp | 73 + ...UiEffects_RendererEngineModelStubAttachment.cpp | 75 + ...dererEngineModelTexture2DAttachmentProperty.cpp | 153 + ...ffects_RendererEngineModelTexture2DProperty.cpp | 75 + ...ffects_RendererEngineModelTextureAttachment.cpp | 77 + ...iEffects_RendererEngineModelTextureProperty.cpp | 44 + ...s_RendererEngineModelVector2fPropertyHolder.cpp | 58 + ...s_RendererEngineModelVector3fPropertyHolder.cpp | 59 + ...s_RendererEngineModelVector4fPropertyHolder.cpp | 59 + .../FUiEffects_RendererGraphicsEngineRender.cpp | 493 + ...cts_RendererGraphicsEngineRenderBufferCache.cpp | 473 + ...UiEffects_RendererGraphicsEngineRenderCache.cpp | 58 + ...s_RendererGraphicsEngineRenderDrawableCache.cpp | 732 ++ ...ndererGraphicsEngineRenderRenderTargetCache.cpp | 404 + ...cts_RendererGraphicsEngineRenderShaderCache.cpp | 385 + ...ects_RendererGraphicsEngineRenderStateCache.cpp | 136 + ...ts_RendererGraphicsEngineRenderTextureCache.cpp | 278 + .../system/FUiEffects_RendererSystemData.cpp | 36 + .../system/FUiEffects_RendererSystemException.cpp | 33 + .../FUiEffects_RendererSystemPlatformDefine.cpp | 51 + .../runtime/FUiEffects_RuntimeDirectionalLight.cpp | 124 + .../runtime/FUiEffects_RuntimeEffectModel.cpp | 708 ++ .../FUiEffects_RuntimeEffectModelScript.cpp | 235 + .../runtime/FUiEffects_RuntimeGraphicalSurface.cpp | 373 + .../FUiEffects_RuntimeGraphicalSurfaceNurbs.cpp | 596 + .../runtime/FUiEffects_RuntimeLuaProcessing.cpp | 246 + .../runtime/FUiEffects_RuntimeModelSurface.cpp | 335 + .../runtime/FUiEffects_RuntimePointLight.cpp | 124 + .../runtime/FUiEffects_RuntimeRenderDataScene.cpp | 377 + .../runtime/FUiEffects_RuntimeSpotLight.cpp | 187 + .../runtime/FUiEffects_RuntimeUnitLight.cpp | 201 + src/ui/effects/runtime/lua-cpp-binding/tolua.cpp | 6872 ++++++++++ src/ui/effects/runtime/lua-cpp-binding/tolua.h | 20 + src/ui/inc/FUiAnim_DisplayContextImpl.h | 61 + src/ui/inc/FUiAnim_DisplayManager.h | 92 + src/ui/inc/FUiAnim_EflLayer.h | 162 + src/ui/inc/FUiAnim_EflLayerConfiguration.h | 46 + src/ui/inc/FUiAnim_EflNode.h | 118 + src/ui/inc/FUiAnim_INativeNode.h | 63 + src/ui/inc/FUiAnim_IVisualElementCaptureProvider.h | 45 + src/ui/inc/FUiAnim_NativeLayer.h | 210 + src/ui/inc/FUiAnim_RootVisualElement.h | 81 + src/ui/inc/FUiAnim_TransformMatrix3Df.h | 202 + src/ui/inc/FUiAnim_VisualElement.h | 156 + src/ui/inc/FUiAnim_VisualElementCanvas.h | 58 + src/ui/inc/FUiAnim_VisualElementCoordinateSystem.h | 226 + src/ui/inc/FUiAnim_VisualElementImpl.h | 1382 ++ src/ui/inc/FUiAnim_VisualElementSharedData.h | 107 + src/ui/inc/FUiAnim_VisualElementSurfaceImpl.h | 107 + src/ui/inc/FUiCtrl_ActionEvent.h | 99 + src/ui/inc/FUiCtrl_AdjustmentEvent.h | 64 + src/ui/inc/FUiCtrl_Animation.h | 106 + src/ui/inc/FUiCtrl_AnimationEvent.h | 64 + src/ui/inc/FUiCtrl_AnimationFrameImpl.h | 59 + src/ui/inc/FUiCtrl_AnimationImpl.h | 81 + src/ui/inc/FUiCtrl_AnimationModel.h | 64 + src/ui/inc/FUiCtrl_AnimationPresenter.h | 85 + src/ui/inc/FUiCtrl_Button.h | 339 + src/ui/inc/FUiCtrl_ButtonImpl.h | 143 + src/ui/inc/FUiCtrl_ButtonItemImpl.h | 90 + src/ui/inc/FUiCtrl_ButtonModel.h | 57 + src/ui/inc/FUiCtrl_ButtonPresenter.h | 142 + src/ui/inc/FUiCtrl_CheckButton.h | 370 + src/ui/inc/FUiCtrl_CheckButtonImpl.h | 131 + src/ui/inc/FUiCtrl_CheckButtonModel.h | 57 + src/ui/inc/FUiCtrl_CheckButtonPresenter.h | 151 + src/ui/inc/FUiCtrl_ColorChangeEvent.h | 103 + src/ui/inc/FUiCtrl_ColorPicker.h | 184 + src/ui/inc/FUiCtrl_ColorPickerImpl.h | 104 + src/ui/inc/FUiCtrl_ColorPickerModel.h | 87 + src/ui/inc/FUiCtrl_ColorPickerPresenter.h | 219 + src/ui/inc/FUiCtrl_ContextMenu.h | 301 + src/ui/inc/FUiCtrl_ContextMenuGridPresenter.h | 168 + src/ui/inc/FUiCtrl_ContextMenuImpl.h | 118 + src/ui/inc/FUiCtrl_ContextMenuItem.h | 182 + src/ui/inc/FUiCtrl_ContextMenuListPresenter.h | 162 + src/ui/inc/FUiCtrl_ContextMenuModel.h | 76 + src/ui/inc/FUiCtrl_CustomElement.h | 60 + src/ui/inc/FUiCtrl_CustomItemImpl.h | 88 + src/ui/inc/FUiCtrl_CustomListElements.h | 292 + src/ui/inc/FUiCtrl_CustomListImpl.h | 153 + src/ui/inc/FUiCtrl_CustomListItemFormatImpl.h | 93 + src/ui/inc/FUiCtrl_CustomListItemImpl.h | 215 + src/ui/inc/FUiCtrl_DatePickerImpl.h | 99 + src/ui/inc/FUiCtrl_DateTimeBar.h | 170 + src/ui/inc/FUiCtrl_DateTimeBarItem.h | 68 + src/ui/inc/FUiCtrl_DateTimeBarModel.h | 85 + src/ui/inc/FUiCtrl_DateTimeBarPresenter.h | 186 + src/ui/inc/FUiCtrl_DateTimeChangeEvent.h | 130 + src/ui/inc/FUiCtrl_DateTimeDefine.h | 174 + src/ui/inc/FUiCtrl_DateTimeDisplayBox.h | 88 + src/ui/inc/FUiCtrl_DateTimeModel.h | 90 + src/ui/inc/FUiCtrl_DateTimePicker.h | 211 + src/ui/inc/FUiCtrl_DateTimePickerImpl.h | 106 + src/ui/inc/FUiCtrl_DateTimePresenter.h | 248 + src/ui/inc/FUiCtrl_DateTimeUtils.h | 67 + src/ui/inc/FUiCtrl_Edit.h | 595 + src/ui/inc/FUiCtrl_EditAreaImpl.h | 221 + src/ui/inc/FUiCtrl_EditCopyPasteEvent.h | 103 + src/ui/inc/FUiCtrl_EditCopyPasteManager.h | 144 + src/ui/inc/FUiCtrl_EditDate.h | 200 + src/ui/inc/FUiCtrl_EditDateImpl.h | 93 + src/ui/inc/FUiCtrl_EditDatePresenter.h | 152 + src/ui/inc/FUiCtrl_EditFieldImpl.h | 241 + src/ui/inc/FUiCtrl_EditModel.h | 362 + src/ui/inc/FUiCtrl_EditPresenter.h | 611 + src/ui/inc/FUiCtrl_EditTime.h | 195 + src/ui/inc/FUiCtrl_EditTimeImpl.h | 89 + src/ui/inc/FUiCtrl_EditTimePresenter.h | 171 + src/ui/inc/FUiCtrl_ExpandableEditAreaEvent.h | 109 + src/ui/inc/FUiCtrl_ExpandableEditAreaImpl.h | 228 + src/ui/inc/FUiCtrl_ExpandableListImpl.h | 264 + src/ui/inc/FUiCtrl_FastScroll.h | 99 + src/ui/inc/FUiCtrl_FastScrollEvent.h | 111 + src/ui/inc/FUiCtrl_FastScrollEventArg.h | 65 + src/ui/inc/FUiCtrl_FastScrollIndex.h | 140 + src/ui/inc/FUiCtrl_FastScrollIndexNode.h | 80 + src/ui/inc/FUiCtrl_FastScrollModel.h | 57 + src/ui/inc/FUiCtrl_FastScrollPresenter.h | 391 + src/ui/inc/FUiCtrl_FlickAnimation.h | 147 + src/ui/inc/FUiCtrl_FooterImpl.h | 202 + src/ui/inc/FUiCtrl_FooterItemImpl.h | 89 + src/ui/inc/FUiCtrl_Form.h | 334 + src/ui/inc/FUiCtrl_FormImpl.h | 197 + src/ui/inc/FUiCtrl_FormModel.h | 54 + src/ui/inc/FUiCtrl_FormPresenter.h | 69 + src/ui/inc/FUiCtrl_Frame.h | 145 + src/ui/inc/FUiCtrl_FrameEvent.h | 112 + src/ui/inc/FUiCtrl_FrameImpl.h | 121 + src/ui/inc/FUiCtrl_FrameModel.h | 54 + src/ui/inc/FUiCtrl_FramePresenter.h | 72 + src/ui/inc/FUiCtrl_Gallery.h | 200 + src/ui/inc/FUiCtrl_GalleryBitmap.h | 70 + src/ui/inc/FUiCtrl_GalleryCanvas.h | 181 + src/ui/inc/FUiCtrl_GalleryCanvasManager.h | 76 + src/ui/inc/FUiCtrl_GalleryCoreEvent.h | 41 + src/ui/inc/FUiCtrl_GalleryCoreEventArg.h | 64 + src/ui/inc/FUiCtrl_GalleryCoreEventListener.h | 55 + src/ui/inc/FUiCtrl_GalleryImageReader.h | 63 + src/ui/inc/FUiCtrl_GalleryImpl.h | 105 + src/ui/inc/FUiCtrl_GalleryImplEvent.h | 49 + src/ui/inc/FUiCtrl_GalleryImplEventArg.h | 56 + src/ui/inc/FUiCtrl_GalleryItem.h | 67 + src/ui/inc/FUiCtrl_GalleryItemImpl.h | 71 + src/ui/inc/FUiCtrl_GalleryItemProvider.h | 50 + src/ui/inc/FUiCtrl_GalleryItemProviderAdaptor.h | 59 + .../inc/FUiCtrl_GalleryItemProviderAdaptorImpl.h | 48 + src/ui/inc/FUiCtrl_GalleryModel.h | 70 + src/ui/inc/FUiCtrl_GalleryPresenter.h | 215 + src/ui/inc/FUiCtrl_GalleryRenderer.h | 175 + src/ui/inc/FUiCtrl_GalleryRendererNotification.h | 62 + src/ui/inc/FUiCtrl_GalleryRendererNotifier.h | 53 + src/ui/inc/FUiCtrl_GalleryTypes.h | 83 + src/ui/inc/FUiCtrl_GalleryViewEvent.h | 60 + src/ui/inc/FUiCtrl_GalleryViewEventHandler.h | 127 + src/ui/inc/FUiCtrl_GalleryViewEventInfo.h | 69 + src/ui/inc/FUiCtrl_GroupContainer.h | 173 + src/ui/inc/FUiCtrl_GroupContainerImpl.h | 100 + src/ui/inc/FUiCtrl_GroupContainerPresenter.h | 69 + src/ui/inc/FUiCtrl_GroupItemImpl.h | 89 + src/ui/inc/FUiCtrl_GroupedListImpl.h | 204 + src/ui/inc/FUiCtrl_GroupedListViewImpl.h | 296 + .../FUiCtrl_GroupedListViewItemProviderAdaptor.h | 129 + src/ui/inc/FUiCtrl_HeaderImpl.h | 230 + src/ui/inc/FUiCtrl_HeaderItemImpl.h | 88 + src/ui/inc/FUiCtrl_IActionEventListener.h | 72 + src/ui/inc/FUiCtrl_IAdjustmentEventListener.h | 75 + src/ui/inc/FUiCtrl_IAnimationEventListener.h | 72 + src/ui/inc/FUiCtrl_IColorChangeEventListener.h | 78 + src/ui/inc/FUiCtrl_IContextMenuPresenter.h | 116 + src/ui/inc/FUiCtrl_ICustomElement.h | 44 + src/ui/inc/FUiCtrl_IDateTimeChangeEventListener.h | 85 + src/ui/inc/FUiCtrl_IEditCopyPasteEventListener.h | 78 + src/ui/inc/FUiCtrl_IEditTextFilter.h | 120 + .../inc/FUiCtrl_IExpandableEditAreaEventListener.h | 84 + src/ui/inc/FUiCtrl_IFastScrollListener.h | 89 + .../FUiCtrl_IFormActivationChangeEventListener.h | 65 + src/ui/inc/FUiCtrl_IFormBackEventListener.h | 105 + src/ui/inc/FUiCtrl_IFormMenuEventListener.h | 102 + src/ui/inc/FUiCtrl_IFrameEventListener.h | 64 + src/ui/inc/FUiCtrl_IGalleryCoreEventListener.h | 40 + src/ui/inc/FUiCtrl_IGalleryItemProvider.h | 36 + src/ui/inc/FUiCtrl_IGalleryRenderer.h | 78 + src/ui/inc/FUiCtrl_IGalleryRendererNotiListener.h | 39 + src/ui/inc/FUiCtrl_IIconListItemEventListener.h | 66 + src/ui/inc/FUiCtrl_IInputPadEventListener.h | 76 + src/ui/inc/FUiCtrl_IKeypadEventListener.h | 135 + src/ui/inc/FUiCtrl_ILanguageEventListener.h | 89 + src/ui/inc/FUiCtrl_IListItemCommon.h | 83 + src/ui/inc/FUiCtrl_IListItemProviderAdaptor.h | 55 + src/ui/inc/FUiCtrl_IProgressPopupEventListener.h | 75 + src/ui/inc/FUiCtrl_IScrollEventListener.h | 107 + src/ui/inc/FUiCtrl_IScrollPanelEventListener.h | 98 + src/ui/inc/FUiCtrl_IScrollableContainer.h | 62 + src/ui/inc/FUiCtrl_ISearchBarEventListener.h | 73 + src/ui/inc/FUiCtrl_ISliderEventListener.h | 74 + src/ui/inc/FUiCtrl_ISplitPanelEventListener.h | 84 + src/ui/inc/FUiCtrl_ITableViewItemEventListener.h | 218 + src/ui/inc/FUiCtrl_ITextBlockEventListener.h | 75 + src/ui/inc/FUiCtrl_ITextEventListener.h | 108 + src/ui/inc/FUiCtrl_ITokenFilter.h | 53 + src/ui/inc/FUiCtrl_IUiLinkEventListener.h | 79 + src/ui/inc/FUiCtrl_IUiListViewItemEventListener.h | 78 + src/ui/inc/FUiCtrl_IconListData.h | 74 + src/ui/inc/FUiCtrl_IconListImpl.h | 130 + src/ui/inc/FUiCtrl_IconListItem.h | 153 + src/ui/inc/FUiCtrl_IconListItemDrawingProperty.h | 222 + src/ui/inc/FUiCtrl_IconListItemProvider.h | 57 + src/ui/inc/FUiCtrl_IconListItemProviderAdaptor.h | 90 + src/ui/inc/FUiCtrl_IconListPresenter.h | 490 + src/ui/inc/FUiCtrl_IconListUtils.h | 114 + src/ui/inc/FUiCtrl_IconListView.h | 418 + src/ui/inc/FUiCtrl_IconListViewImpl.h | 211 + src/ui/inc/FUiCtrl_IconListViewItemEvent.h | 74 + src/ui/inc/FUiCtrl_IconListViewItemEventArg.h | 102 + src/ui/inc/FUiCtrl_IconListViewItemImpl.h | 62 + src/ui/inc/FUiCtrl_Indicator.h | 130 + src/ui/inc/FUiCtrl_IndicatorManager.h | 98 + src/ui/inc/FUiCtrl_InputPad.h | 84 + src/ui/inc/FUiCtrl_InputPadPresenter.h | 119 + src/ui/inc/FUiCtrl_Keypad.h | 143 + src/ui/inc/FUiCtrl_KeypadEvent.h | 114 + src/ui/inc/FUiCtrl_KeypadImpl.h | 101 + src/ui/inc/FUiCtrl_Label.h | 170 + src/ui/inc/FUiCtrl_LabelImpl.h | 108 + src/ui/inc/FUiCtrl_LabelModel.h | 60 + src/ui/inc/FUiCtrl_LabelPresenter.h | 113 + src/ui/inc/FUiCtrl_LanguageEvent.h | 96 + src/ui/inc/FUiCtrl_LinkEvent.h | 103 + src/ui/inc/FUiCtrl_LinkedList.h | 650 + src/ui/inc/FUiCtrl_ListBaseImpl.h | 157 + src/ui/inc/FUiCtrl_ListContextItemImpl.h | 96 + src/ui/inc/FUiCtrl_ListImpl.h | 247 + src/ui/inc/FUiCtrl_ListItemBaseImpl.h | 117 + src/ui/inc/FUiCtrl_ListItemCommon.h | 82 + src/ui/inc/FUiCtrl_ListItemEvent.h | 74 + src/ui/inc/FUiCtrl_ListItemEventArg.h | 93 + src/ui/inc/FUiCtrl_ListListener.h | 53 + src/ui/inc/FUiCtrl_ListViewContextItem.h | 107 + src/ui/inc/FUiCtrl_ListViewImpl.h | 275 + src/ui/inc/FUiCtrl_ListViewItem.h | 350 + src/ui/inc/FUiCtrl_ListViewItemProviderAdaptor.h | 112 + src/ui/inc/FUiCtrl_ListViewModel.h | 203 + src/ui/inc/FUiCtrl_ListViewTypes.h | 54 + src/ui/inc/FUiCtrl_MessageBox.h | 148 + src/ui/inc/FUiCtrl_MessageBoxImpl.h | 91 + src/ui/inc/FUiCtrl_MessageBoxPresenter.h | 208 + src/ui/inc/FUiCtrl_OptionMenu.h | 282 + src/ui/inc/FUiCtrl_OptionMenuImpl.h | 131 + src/ui/inc/FUiCtrl_OptionMenuItem.h | 209 + src/ui/inc/FUiCtrl_OptionMenuModel.h | 79 + src/ui/inc/FUiCtrl_OptionMenuPresenter.h | 182 + src/ui/inc/FUiCtrl_OverlayAgent.h | 275 + src/ui/inc/FUiCtrl_OverlayPanel.h | 76 + src/ui/inc/FUiCtrl_OverlayPanelImpl.h | 104 + src/ui/inc/FUiCtrl_OverlayRegionImpl.h | 145 + src/ui/inc/FUiCtrl_Panel.h | 130 + src/ui/inc/FUiCtrl_PanelImpl.h | 89 + src/ui/inc/FUiCtrl_PanelPresenter.h | 66 + src/ui/inc/FUiCtrl_Popup.h | 175 + src/ui/inc/FUiCtrl_PopupImpl.h | 121 + src/ui/inc/FUiCtrl_PopupPresenter.h | 116 + src/ui/inc/FUiCtrl_Progress.h | 100 + src/ui/inc/FUiCtrl_ProgressImpl.h | 77 + src/ui/inc/FUiCtrl_ProgressModel.h | 60 + src/ui/inc/FUiCtrl_ProgressPopup.h | 158 + src/ui/inc/FUiCtrl_ProgressPopupEvent.h | 74 + src/ui/inc/FUiCtrl_ProgressPopupImpl.h | 95 + src/ui/inc/FUiCtrl_ProgressPopupPresenter.h | 127 + src/ui/inc/FUiCtrl_ProgressPresenter.h | 75 + src/ui/inc/FUiCtrl_PublicActionEvent.h | 99 + src/ui/inc/FUiCtrl_PublicAdjustmentEvent.h | 60 + src/ui/inc/FUiCtrl_PublicAnimationEvent.h | 64 + src/ui/inc/FUiCtrl_PublicClipboardPopupEvent.h | 57 + src/ui/inc/FUiCtrl_PublicColorChangeEvent.h | 104 + src/ui/inc/FUiCtrl_PublicDateTimeChangeEvent.h | 157 + src/ui/inc/FUiCtrl_PublicExpandableEditAreaEvent.h | 117 + src/ui/inc/FUiCtrl_PublicFrameEvent.h | 112 + src/ui/inc/FUiCtrl_PublicKeypadEvent.h | 111 + src/ui/inc/FUiCtrl_PublicLanguageEvent.h | 96 + src/ui/inc/FUiCtrl_PublicLinkEvent.h | 103 + src/ui/inc/FUiCtrl_PublicProgressPopupEvent.h | 82 + src/ui/inc/FUiCtrl_PublicScrollPanelEvent.h | 116 + src/ui/inc/FUiCtrl_PublicSearchBarEvent.h | 114 + src/ui/inc/FUiCtrl_PublicSliderEvent.h | 57 + src/ui/inc/FUiCtrl_PublicSplitPanelEvent.h | 112 + src/ui/inc/FUiCtrl_PublicTextBlockEvent.h | 104 + src/ui/inc/FUiCtrl_PublicTextEvent.h | 114 + src/ui/inc/FUiCtrl_RadioGroup.h | 84 + src/ui/inc/FUiCtrl_RadioGroupImpl.h | 85 + src/ui/inc/FUiCtrl_RadioGroupModel.h | 57 + src/ui/inc/FUiCtrl_RadioGroupPresenter.h | 75 + src/ui/inc/FUiCtrl_Scroll.h | 127 + src/ui/inc/FUiCtrl_ScrollEvent.h | 73 + src/ui/inc/FUiCtrl_ScrollEventArg.h | 137 + src/ui/inc/FUiCtrl_ScrollEventTypes.h | 43 + src/ui/inc/FUiCtrl_ScrollPanel.h | 291 + src/ui/inc/FUiCtrl_ScrollPanelEvent.h | 121 + src/ui/inc/FUiCtrl_ScrollPanelImpl.h | 124 + src/ui/inc/FUiCtrl_ScrollPanelModel.h | 87 + src/ui/inc/FUiCtrl_ScrollPanelPresenter.h | 271 + src/ui/inc/FUiCtrl_ScrollPresenter.h | 261 + src/ui/inc/FUiCtrl_SearchBar.h | 345 + src/ui/inc/FUiCtrl_SearchBarEvent.h | 113 + src/ui/inc/FUiCtrl_SearchBarImpl.h | 225 + src/ui/inc/FUiCtrl_SearchBarModel.h | 147 + src/ui/inc/FUiCtrl_SearchBarPresenter.h | 126 + src/ui/inc/FUiCtrl_SimpleItemImpl.h | 66 + src/ui/inc/FUiCtrl_SlidableGroupedListImpl.h | 298 + src/ui/inc/FUiCtrl_SlidableListImpl.h | 233 + src/ui/inc/FUiCtrl_Slider.h | 197 + src/ui/inc/FUiCtrl_SliderEvent.h | 56 + src/ui/inc/FUiCtrl_SliderImpl.h | 100 + src/ui/inc/FUiCtrl_SliderModel.h | 60 + src/ui/inc/FUiCtrl_SliderOverlay.h | 78 + src/ui/inc/FUiCtrl_SliderPresenter.h | 174 + src/ui/inc/FUiCtrl_SplitPanel.h | 167 + src/ui/inc/FUiCtrl_SplitPanelEvent.h | 115 + src/ui/inc/FUiCtrl_SplitPanelImpl.h | 119 + src/ui/inc/FUiCtrl_SplitPanelModel.h | 69 + src/ui/inc/FUiCtrl_SplitPanelPresenter.h | 154 + src/ui/inc/FUiCtrl_Tab.h | 266 + src/ui/inc/FUiCtrl_TabBar.h | 196 + src/ui/inc/FUiCtrl_TabBarImpl.h | 98 + src/ui/inc/FUiCtrl_TabBarItem.h | 103 + src/ui/inc/FUiCtrl_TabBarItemImpl.h | 52 + src/ui/inc/FUiCtrl_TabBarModel.h | 88 + src/ui/inc/FUiCtrl_TabBarPresenter.h | 157 + src/ui/inc/FUiCtrl_TabImpl.h | 138 + src/ui/inc/FUiCtrl_TabItem.h | 122 + src/ui/inc/FUiCtrl_TabModel.h | 76 + src/ui/inc/FUiCtrl_TabPresenter.h | 276 + src/ui/inc/FUiCtrl_TableView.h | 324 + src/ui/inc/FUiCtrl_TableViewImpl.h | 246 + src/ui/inc/FUiCtrl_TableViewItem.h | 518 + src/ui/inc/FUiCtrl_TableViewItemEvent.h | 63 + src/ui/inc/FUiCtrl_TableViewItemEventArg.h | 96 + src/ui/inc/FUiCtrl_TableViewItemImpl.h | 100 + src/ui/inc/FUiCtrl_TableViewItemProvider.h | 105 + src/ui/inc/FUiCtrl_TableViewItemProviderAdaptor.h | 96 + src/ui/inc/FUiCtrl_TableViewPresenter.h | 506 + src/ui/inc/FUiCtrl_TextBlockEvent.h | 105 + src/ui/inc/FUiCtrl_TextBoxImpl.h | 666 + src/ui/inc/FUiCtrl_TextEvent.h | 114 + src/ui/inc/FUiCtrl_TimePickerImpl.h | 98 + src/ui/inc/FUiCtrl_TokenEdit.h | 175 + src/ui/inc/FUiCtrl_TokenEditModel.h | 42 + src/ui/inc/FUiCtrl_TokenEditPresenter.h | 322 + src/ui/inc/FUiCtrl_Toolbar.h | 557 + src/ui/inc/FUiCtrl_ToolbarModel.h | 66 + src/ui/inc/FUiCtrl_ToolbarPresenter.h | 251 + src/ui/inc/FUiCtrl_UiFastScrollEvent.h | 111 + src/ui/inc/FUiCtrl_UiFastScrollEventArg.h | 67 + src/ui/inc/FUiCtrl_UiIconListItemEvent.h | 65 + src/ui/inc/FUiCtrl_UiListViewItemEvent.h | 55 + src/ui/inc/FUiCtrl_UiListViewItemEventArg.h | 72 + src/ui/inc/FUiCtrl_UiScrollEvent.h | 73 + src/ui/inc/FUiCtrl_UiScrollEventArg.h | 138 + src/ui/inc/FUiCtrl_UiTableViewItemEvent.h | 66 + src/ui/inc/FUi_AccessibilityContainer.h | 193 + src/ui/inc/FUi_AccessibilityContainerImpl.h | 111 + src/ui/inc/FUi_AccessibilityElement.h | 119 + src/ui/inc/FUi_AccessibilityElementImpl.h | 87 + src/ui/inc/FUi_AccessibilityGesture.h | 83 + src/ui/inc/FUi_AccessibilityManager.h | 173 + src/ui/inc/FUi_AccessibilitySystemSettingLoader.h | 71 + src/ui/inc/FUi_AccessibilityTtsPlayer.h | 102 + src/ui/inc/FUi_BidiUtils.h | 54 + src/ui/inc/FUi_ClipboardPopupEvent.h | 63 + src/ui/inc/FUi_Colorf.h | 107 + src/ui/inc/FUi_ContainerImpl.h | 124 + src/ui/inc/FUi_Control.h | 817 ++ src/ui/inc/FUi_ControlImpl.h | 505 + src/ui/inc/FUi_ControlImplManager.h | 74 + src/ui/inc/FUi_ControlManager.h | 228 + src/ui/inc/FUi_CoordinateSystemUtils.h | 338 + src/ui/inc/FUi_CustomControlBaseImpl.h | 63 + src/ui/inc/FUi_Dimensionf.h | 84 + src/ui/inc/FUi_DimmingLayer.h | 65 + src/ui/inc/FUi_DimmingManager.h | 67 + src/ui/inc/FUi_DragAndDropEvent.h | 74 + src/ui/inc/FUi_DragAndDropItem.h | 60 + src/ui/inc/FUi_DragDropEvent.h | 157 + src/ui/inc/FUi_DragDropEventArg.h | 141 + src/ui/inc/FUi_EcoreEvas.h | 221 + src/ui/inc/FUi_EcoreEvasMgr.h | 63 + src/ui/inc/FUi_ErrorMessages.h | 32 + src/ui/inc/FUi_FingerInfo.h | 161 + src/ui/inc/FUi_FocusManagerImpl.h | 147 + src/ui/inc/FUi_IAccessibilityFocusHandler.h | 43 + src/ui/inc/FUi_IAccessibilityListener.h | 51 + src/ui/inc/FUi_IClipboardPopupEventListener.h | 79 + src/ui/inc/FUi_IControlManagerEventListener.h | 42 + src/ui/inc/FUi_IDragAndDropEventListener.h | 96 + src/ui/inc/FUi_IFocusEventListener.h | 79 + src/ui/inc/FUi_IKeyEventListener.h | 88 + src/ui/inc/FUi_IKeyEventPreviewer.h | 90 + src/ui/inc/FUi_INotificationEventListener.h | 58 + src/ui/inc/FUi_INotificationEventPreviewer.h | 58 + src/ui/inc/FUi_IPropertyChangeEventListener.h | 76 + src/ui/inc/FUi_ITouchCustomGestureEventListener.h | 87 + src/ui/inc/FUi_ITouchEventListener.h | 103 + src/ui/inc/FUi_ITouchEventPreviewer.h | 104 + src/ui/inc/FUi_ITouchFlickGestureEventListener.h | 70 + src/ui/inc/FUi_ITouchGestureDelegate.h | 50 + src/ui/inc/FUi_ITouchGestureEventListener.h | 51 + src/ui/inc/FUi_ITouchGestureStateChangedListener.h | 55 + .../inc/FUi_ITouchLongPressGestureEventListener.h | 72 + src/ui/inc/FUi_ITouchPanningGestureEventListener.h | 83 + src/ui/inc/FUi_ITouchPinchGestureEventListener.h | 88 + .../inc/FUi_ITouchRotationGestureEventListener.h | 88 + src/ui/inc/FUi_ITouchTapGestureEventListener.h | 72 + src/ui/inc/FUi_IUiEventListener.h | 48 + src/ui/inc/FUi_IUiEventManager.h | 57 + src/ui/inc/FUi_IUiEventPreviewer.h | 48 + src/ui/inc/FUi_IWindow.h | 42 + src/ui/inc/FUi_KeyEventInfoImpl.h | 92 + src/ui/inc/FUi_KeyEventManager.h | 138 + src/ui/inc/FUi_KeyEventManagerImpl.h | 129 + src/ui/inc/FUi_LayoutAbsoluteLayout.h | 63 + src/ui/inc/FUi_LayoutILayoutItemHandler.h | 56 + src/ui/inc/FUi_LayoutLayout.h | 450 + src/ui/inc/FUi_LayoutLayoutContainer.h | 246 + src/ui/inc/FUi_LayoutLayoutItem.h | 247 + src/ui/inc/FUi_LayoutLayoutMaker.h | 182 + src/ui/inc/FUi_LayoutLayoutTypes.h | 132 + src/ui/inc/FUi_LayoutLinearLayout.h | 381 + src/ui/inc/FUi_LayoutRelativeLayout.h | 319 + src/ui/inc/FUi_LayoutTableLayout.h | 671 + src/ui/inc/FUi_Math.h | 111 + src/ui/inc/FUi_Matrix3Df.h | 244 + src/ui/inc/FUi_ModalLoopManager.h | 92 + src/ui/inc/FUi_Pointf.h | 106 + src/ui/inc/FUi_PropertyBase.h | 338 + src/ui/inc/FUi_PropertyUtils.h | 76 + src/ui/inc/FUi_PublicOrientationEvent.h | 71 + src/ui/inc/FUi_Rectanglef.h | 273 + src/ui/inc/FUi_ResourceAccessibilityConfig.h | 54 + src/ui/inc/FUi_ResourceAppWidgetConfig.h | 36 + src/ui/inc/FUi_ResourceButtonConfig.h | 55 + src/ui/inc/FUi_ResourceCheckButtonConfig.h | 187 + src/ui/inc/FUi_ResourceColorPickerConfig.h | 79 + src/ui/inc/FUi_ResourceConfigLoader.h | 58 + src/ui/inc/FUi_ResourceConfigMacro.h | 351 + src/ui/inc/FUi_ResourceConfigTypes.h | 68 + src/ui/inc/FUi_ResourceContextMenuConfig.h | 97 + src/ui/inc/FUi_ResourceDateTimeBarConfig.h | 52 + src/ui/inc/FUi_ResourceDateTimePickerConfig.h | 102 + src/ui/inc/FUi_ResourceDimmingLayerConfig.h | 31 + src/ui/inc/FUi_ResourceEditConfig.h | 132 + src/ui/inc/FUi_ResourceEditDateConfig.h | 65 + src/ui/inc/FUi_ResourceEditTimeConfig.h | 83 + src/ui/inc/FUi_ResourceFastScrollConfig.h | 54 + src/ui/inc/FUi_ResourceFocusUiConfig.h | 31 + src/ui/inc/FUi_ResourceFooterConfig.h | 329 + src/ui/inc/FUi_ResourceFormConfig.h | 36 + src/ui/inc/FUi_ResourceGalleryConfig.h | 33 + src/ui/inc/FUi_ResourceGroupContainerConfig.h | 37 + src/ui/inc/FUi_ResourceHeaderConfig.h | 307 + src/ui/inc/FUi_ResourceIconListConfig.h | 83 + src/ui/inc/FUi_ResourceInputPadConfig.h | 61 + src/ui/inc/FUi_ResourceLabelConfig.h | 36 + src/ui/inc/FUi_ResourceListConfig.h | 64 + src/ui/inc/FUi_ResourceListViewConfig.h | 51 + src/ui/inc/FUi_ResourceManager.h | 264 + src/ui/inc/FUi_ResourceMap.h | 784 ++ src/ui/inc/FUi_ResourceMapContainer.h | 106 + src/ui/inc/FUi_ResourceMessageBoxConfig.h | 86 + src/ui/inc/FUi_ResourceOptionMenuConfig.h | 79 + src/ui/inc/FUi_ResourceOverlayPanelConfig.h | 26 + src/ui/inc/FUi_ResourcePanelConfig.h | 59 + src/ui/inc/FUi_ResourcePopupConfig.h | 64 + src/ui/inc/FUi_ResourceProgressConfig.h | 41 + src/ui/inc/FUi_ResourceRadioGroupConfig.h | 30 + src/ui/inc/FUi_ResourceScrollConfig.h | 73 + src/ui/inc/FUi_ResourceSearchBarConfig.h | 81 + src/ui/inc/FUi_ResourceSizeInfo.h | 78 + src/ui/inc/FUi_ResourceSliderConfig.h | 93 + src/ui/inc/FUi_ResourceSplitPanelConfig.h | 41 + src/ui/inc/FUi_ResourceStringLoader.h | 52 + src/ui/inc/FUi_ResourceTabBarConfig.h | 58 + src/ui/inc/FUi_ResourceTabConfig.h | 90 + src/ui/inc/FUi_ResourceTableViewConfig.h | 165 + src/ui/inc/FUi_ResourceTokenEditConfig.h | 74 + src/ui/inc/FUi_SharedPtr.h | 177 + src/ui/inc/FUi_SystemUtilImpl.h | 164 + src/ui/inc/FUi_TouchEffectImpl.h | 105 + src/ui/inc/FUi_TouchEventArg.h | 144 + src/ui/inc/FUi_TouchEventInfoImpl.h | 102 + src/ui/inc/FUi_TouchEventManagerImpl.h | 63 + src/ui/inc/FUi_TouchFlickGestureDetector.h | 101 + src/ui/inc/FUi_TouchFlickGestureDetectorImpl.h | 70 + src/ui/inc/FUi_TouchGestureDetector.h | 168 + src/ui/inc/FUi_TouchGestureDetectorImpl.h | 95 + src/ui/inc/FUi_TouchLongPressGestureDetector.h | 97 + src/ui/inc/FUi_TouchLongPressGestureDetectorImpl.h | 76 + src/ui/inc/FUi_TouchManager.h | 441 + src/ui/inc/FUi_TouchPanningGestureDetector.h | 73 + src/ui/inc/FUi_TouchPanningGestureDetectorImpl.h | 67 + src/ui/inc/FUi_TouchPinchGestureDetector.h | 71 + src/ui/inc/FUi_TouchPinchGestureDetectorImpl.h | 62 + src/ui/inc/FUi_TouchRotationGestureDetector.h | 82 + src/ui/inc/FUi_TouchRotationGestureDetectorImpl.h | 66 + src/ui/inc/FUi_TouchTapGestureDetector.h | 97 + src/ui/inc/FUi_TouchTapGestureDetectorImpl.h | 76 + src/ui/inc/FUi_Types.h | 100 + src/ui/inc/FUi_UiBuilder.h | 86 + src/ui/inc/FUi_UiBuilderConfig.h | 63 + src/ui/inc/FUi_UiBuilderControl.h | 85 + src/ui/inc/FUi_UiBuilderControlElement.h | 63 + src/ui/inc/FUi_UiBuilderControlItem.h | 62 + src/ui/inc/FUi_UiBuilderControlLayout.h | 81 + src/ui/inc/FUi_UiBuilderControlMaker.h | 91 + src/ui/inc/FUi_UiBuilderControlTable.h | 90 + src/ui/inc/FUi_UiBuilderRegister.h | 764 ++ src/ui/inc/FUi_UiBuilderXmlHandler.h | 84 + src/ui/inc/FUi_UiEvent.h | 110 + src/ui/inc/FUi_UiEventManager.h | 129 + src/ui/inc/FUi_UiEventTypes.h | 64 + src/ui/inc/FUi_UiFocusEvent.h | 83 + src/ui/inc/FUi_UiKeyEvent.h | 1049 ++ src/ui/inc/FUi_UiManagerIpcMessages.h | 29 + src/ui/inc/FUi_UiNotificationEvent.h | 86 + src/ui/inc/FUi_UiTouchEvent.h | 174 + src/ui/inc/FUi_VariantImpl.h | 121 + src/ui/inc/FUi_Window.h | 191 + src/ui/inc/FUi_WindowImpl.h | 103 + src/ui/layout/FUi_LayoutAbsoluteLayout.cpp | 143 + src/ui/layout/FUi_LayoutLayout.cpp | 942 ++ src/ui/layout/FUi_LayoutLayoutContainer.cpp | 404 + src/ui/layout/FUi_LayoutLayoutItem.cpp | 336 + src/ui/layout/FUi_LayoutLayoutItemInfo.cpp | 90 + src/ui/layout/FUi_LayoutLayoutItemInfo.h | 152 + src/ui/layout/FUi_LayoutLayoutItemProxy.cpp | 255 + src/ui/layout/FUi_LayoutLayoutItemProxy.h | 110 + src/ui/layout/FUi_LayoutLayoutList.cpp | 126 + src/ui/layout/FUi_LayoutLayoutList.h | 65 + src/ui/layout/FUi_LayoutLayoutListNode.cpp | 50 + src/ui/layout/FUi_LayoutLayoutListNode.h | 61 + src/ui/layout/FUi_LayoutLayoutMaker.cpp | 1524 +++ src/ui/layout/FUi_LayoutLinearLayout.cpp | 1487 +++ src/ui/layout/FUi_LayoutLinkedList.cpp | 241 + src/ui/layout/FUi_LayoutLinkedList.h | 69 + src/ui/layout/FUi_LayoutLinkedListNode.cpp | 46 + src/ui/layout/FUi_LayoutLinkedListNode.h | 61 + src/ui/layout/FUi_LayoutProxyList.cpp | 493 + src/ui/layout/FUi_LayoutProxyList.h | 165 + src/ui/layout/FUi_LayoutProxyListNode.cpp | 64 + src/ui/layout/FUi_LayoutProxyListNode.h | 70 + src/ui/layout/FUi_LayoutRelativeLayout.cpp | 931 ++ src/ui/layout/FUi_LayoutTableLayout.cpp | 2418 ++++ .../resource/FUi_ResourceAccessibilityConfig.cpp | 51 + src/ui/resource/FUi_ResourceAppWidgetConfig.cpp | 44 + src/ui/resource/FUi_ResourceButtonConfig.cpp | 72 + src/ui/resource/FUi_ResourceCheckButtonConfig.cpp | 213 + src/ui/resource/FUi_ResourceColorPickerConfig.cpp | 88 + src/ui/resource/FUi_ResourceConfigLoader.cpp | 73 + src/ui/resource/FUi_ResourceConfigParser.cpp | 4385 +++++++ src/ui/resource/FUi_ResourceConfigParser.h | 98 + src/ui/resource/FUi_ResourceContextMenuConfig.cpp | 125 + src/ui/resource/FUi_ResourceDateTimeBarConfig.cpp | 73 + .../resource/FUi_ResourceDateTimePickerConfig.cpp | 144 + src/ui/resource/FUi_ResourceDimmingLayerConfig.cpp | 26 + src/ui/resource/FUi_ResourceEditConfig.cpp | 153 + src/ui/resource/FUi_ResourceEditDateConfig.cpp | 79 + src/ui/resource/FUi_ResourceEditTimeConfig.cpp | 96 + src/ui/resource/FUi_ResourceFastScrollConfig.cpp | 61 + src/ui/resource/FUi_ResourceFocusUiConfig.cpp | 26 + src/ui/resource/FUi_ResourceFooterConfig.cpp | 438 + src/ui/resource/FUi_ResourceFormConfig.cpp | 62 + src/ui/resource/FUi_ResourceGalleryConfig.cpp | 34 + .../resource/FUi_ResourceGroupContainerConfig.cpp | 38 + src/ui/resource/FUi_ResourceHeaderConfig.cpp | 490 + src/ui/resource/FUi_ResourceIconListConfig.cpp | 86 + src/ui/resource/FUi_ResourceInputPadConfig.cpp | 86 + src/ui/resource/FUi_ResourceLabelConfig.cpp | 50 + src/ui/resource/FUi_ResourceListConfig.cpp | 66 + src/ui/resource/FUi_ResourceListViewConfig.cpp | 52 + src/ui/resource/FUi_ResourceMapContainer.cpp | 338 + src/ui/resource/FUi_ResourceMessageBoxConfig.cpp | 112 + src/ui/resource/FUi_ResourceOptionMenuConfig.cpp | 99 + src/ui/resource/FUi_ResourceOverlayPanelConfig.cpp | 25 + src/ui/resource/FUi_ResourcePanelConfig.cpp | 66 + src/ui/resource/FUi_ResourcePopupConfig.cpp | 121 + src/ui/resource/FUi_ResourceProgressConfig.cpp | 46 + src/ui/resource/FUi_ResourceRadioGroupConfig.cpp | 39 + src/ui/resource/FUi_ResourceScrollConfig.cpp | 87 + src/ui/resource/FUi_ResourceSearchBarConfig.cpp | 87 + src/ui/resource/FUi_ResourceSizeInfo.cpp | 280 + src/ui/resource/FUi_ResourceSliderConfig.cpp | 116 + src/ui/resource/FUi_ResourceSplitPanelConfig.cpp | 45 + src/ui/resource/FUi_ResourceStringLoader.cpp | 45 + src/ui/resource/FUi_ResourceTabBarConfig.cpp | 64 + src/ui/resource/FUi_ResourceTabConfig.cpp | 116 + src/ui/resource/FUi_ResourceTableViewConfig.cpp | 159 + src/ui/resource/FUi_ResourceTokenEditConfig.cpp | 78 + src/ui/scenes/FUiScenesBackwardSceneTransition.cpp | 56 + src/ui/scenes/FUiScenesForwardSceneTransition.cpp | 57 + src/ui/scenes/FUiScenesScene.cpp | 98 + src/ui/scenes/FUiScenesSceneManager.cpp | 285 + src/ui/scenes/FUiScenesSceneTransition.cpp | 162 + .../scenes/FUiScenes_ISceneControlEventListener.h | 46 + src/ui/scenes/FUiScenes_SceneControlEvent.cpp | 47 + src/ui/scenes/FUiScenes_SceneControlEvent.h | 45 + src/ui/scenes/FUiScenes_SceneControlEventArg.cpp | 48 + src/ui/scenes/FUiScenes_SceneControlEventArg.h | 63 + src/ui/scenes/FUiScenes_SceneImpl.cpp | 261 + src/ui/scenes/FUiScenes_SceneImpl.h | 115 + src/ui/scenes/FUiScenes_SceneManagerImpl.cpp | 2110 +++ src/ui/scenes/FUiScenes_SceneManagerImpl.h | 219 + src/ui/scenes/FUiScenes_SceneTransitionImpl.cpp | 201 + src/ui/scenes/FUiScenes_SceneTransitionImpl.h | 88 + src/uifw/CMakeLists.txt | 127 + sysinfo-screen.xml | 7 + sysinfo-touch.xml | 6 + 3640 files changed, 696019 insertions(+) create mode 100644 AUTHORS create mode 100644 CMakeLists.txt create mode 100644 LICENSE.APLv2 create mode 100644 LICENSE.Flora create mode 100644 NOTICE create mode 100644 clipboard.service create mode 100644 inc/FGraphics.h create mode 100644 inc/FGraphicsOpengl.h create mode 100644 inc/FGraphicsOpengl2.h create mode 100644 inc/FGrpBitmap.h create mode 100644 inc/FGrpBufferInfo.h create mode 100644 inc/FGrpCanvas.h create mode 100644 inc/FGrpCanvasCommon.h create mode 100644 inc/FGrpCanvasTexture.h create mode 100644 inc/FGrpColor.h create mode 100644 inc/FGrpCoordinateSystem.h create mode 100644 inc/FGrpDimension.h create mode 100644 inc/FGrpEnrichedText.h create mode 100644 inc/FGrpFloatDimension.h create mode 100644 inc/FGrpFloatMatrix4.h create mode 100644 inc/FGrpFloatPoint.h create mode 100644 inc/FGrpFloatPoint3.h create mode 100644 inc/FGrpFloatRectangle.h create mode 100644 inc/FGrpFloatVector4.h create mode 100644 inc/FGrpFont.h create mode 100644 inc/FGrpFontCommon.h create mode 100644 inc/FGrpGlPlayer.h create mode 100644 inc/FGrpIGlRenderer.h create mode 100644 inc/FGrpIVideoTextureUpdateListener.h create mode 100644 inc/FGrpPixelFormat.h create mode 100644 inc/FGrpPoint.h create mode 100644 inc/FGrpRectangle.h create mode 100644 inc/FGrpTextElement.h create mode 100644 inc/FGrpVideoTexture.h create mode 100644 inc/FUi.h create mode 100644 inc/FUiAccessibilityContainer.h create mode 100644 inc/FUiAccessibilityElement.h create mode 100644 inc/FUiAccessibilityTypes.h create mode 100644 inc/FUiAnimAnimationBase.h create mode 100644 inc/FUiAnimAnimationGroup.h create mode 100644 inc/FUiAnimAnimationTransaction.h create mode 100644 inc/FUiAnimBezierTimingFunction.h create mode 100644 inc/FUiAnimControlAnimator.h create mode 100644 inc/FUiAnimDimensionAnimation.h create mode 100644 inc/FUiAnimDiscreteTimingFunction.h create mode 100644 inc/FUiAnimDisplayContext.h create mode 100644 inc/FUiAnimEaseElasticInTimingFunction.h create mode 100644 inc/FUiAnimEaseElasticOutTimingFunction.h create mode 100644 inc/FUiAnimEaseInOutTimingFunction.h create mode 100644 inc/FUiAnimEaseInTimingFunction.h create mode 100644 inc/FUiAnimEaseOutInTimingFunction.h create mode 100644 inc/FUiAnimEaseOutTimingFunction.h create mode 100644 inc/FUiAnimExpInTimingFunction.h create mode 100644 inc/FUiAnimExpOutTimingFunction.h create mode 100644 inc/FUiAnimFloatAnimation.h create mode 100644 inc/FUiAnimFrameAnimator.h create mode 100644 inc/FUiAnimIAnimationTransactionEventListener.h create mode 100644 inc/FUiAnimIControlAnimatorDetailedEventListener.h create mode 100644 inc/FUiAnimIControlAnimatorEventListener.h create mode 100644 inc/FUiAnimIFrameAnimatorEventListener.h create mode 100644 inc/FUiAnimIVisualElementAnimationProvider.h create mode 100644 inc/FUiAnimIVisualElementAnimationStatusEventListener.h create mode 100644 inc/FUiAnimIVisualElementAnimationTickEventListener.h create mode 100644 inc/FUiAnimIVisualElementAnimationTimingFunction.h create mode 100644 inc/FUiAnimIVisualElementAnimationValueInterpolator.h create mode 100644 inc/FUiAnimIVisualElementContentProvider.h create mode 100644 inc/FUiAnimIVisualElementEventListener.h create mode 100644 inc/FUiAnimIntegerAnimation.h create mode 100644 inc/FUiAnimLinearTimingFunction.h create mode 100644 inc/FUiAnimParallelAnimationGroup.h create mode 100644 inc/FUiAnimPointAnimation.h create mode 100644 inc/FUiAnimRectangleAnimation.h create mode 100644 inc/FUiAnimRotateAnimation.h create mode 100644 inc/FUiAnimSequentialAnimationGroup.h create mode 100644 inc/FUiAnimTypes.h create mode 100644 inc/FUiAnimVisualElement.h create mode 100644 inc/FUiAnimVisualElementAnimation.h create mode 100644 inc/FUiAnimVisualElementAnimationGroup.h create mode 100644 inc/FUiAnimVisualElementAnimationProvider.h create mode 100644 inc/FUiAnimVisualElementContentProvider.h create mode 100644 inc/FUiAnimVisualElementPropertyAnimation.h create mode 100644 inc/FUiAnimVisualElementSurface.h create mode 100644 inc/FUiAnimVisualElementValueAnimation.h create mode 100644 inc/FUiAnimations.h create mode 100644 inc/FUiCardLayout.h create mode 100644 inc/FUiClipboard.h create mode 100644 inc/FUiClipboardItem.h create mode 100644 inc/FUiClipboardTypes.h create mode 100644 inc/FUiCompositeMode.h create mode 100644 inc/FUiContainer.h create mode 100644 inc/FUiControl.h create mode 100644 inc/FUiControls.h create mode 100644 inc/FUiCtrlAnimation.h create mode 100644 inc/FUiCtrlAnimationFrame.h create mode 100644 inc/FUiCtrlButton.h create mode 100644 inc/FUiCtrlButtonItem.h create mode 100644 inc/FUiCtrlCheckButton.h create mode 100644 inc/FUiCtrlColorPicker.h create mode 100644 inc/FUiCtrlContextMenu.h create mode 100644 inc/FUiCtrlControlsTypes.h create mode 100644 inc/FUiCtrlCustomItem.h create mode 100644 inc/FUiCtrlCustomList.h create mode 100644 inc/FUiCtrlCustomListItem.h create mode 100644 inc/FUiCtrlCustomListItemFormat.h create mode 100644 inc/FUiCtrlCustomListTypes.h create mode 100644 inc/FUiCtrlDatePicker.h create mode 100644 inc/FUiCtrlDateTimePicker.h create mode 100644 inc/FUiCtrlEditArea.h create mode 100644 inc/FUiCtrlEditDate.h create mode 100644 inc/FUiCtrlEditField.h create mode 100644 inc/FUiCtrlEditTime.h create mode 100644 inc/FUiCtrlEditTypes.h create mode 100644 inc/FUiCtrlExpandableEditArea.h create mode 100644 inc/FUiCtrlExpandableList.h create mode 100644 inc/FUiCtrlFooter.h create mode 100644 inc/FUiCtrlFooterItem.h create mode 100644 inc/FUiCtrlForm.h create mode 100644 inc/FUiCtrlFrame.h create mode 100644 inc/FUiCtrlFrameTypes.h create mode 100644 inc/FUiCtrlGallery.h create mode 100644 inc/FUiCtrlGalleryItem.h create mode 100644 inc/FUiCtrlGalleryTypes.h create mode 100644 inc/FUiCtrlGroupContainer.h create mode 100644 inc/FUiCtrlGroupItem.h create mode 100644 inc/FUiCtrlGroupedList.h create mode 100644 inc/FUiCtrlGroupedListView.h create mode 100644 inc/FUiCtrlGroupedListViewTypes.h create mode 100644 inc/FUiCtrlGroupedTableView.h create mode 100644 inc/FUiCtrlHeader.h create mode 100644 inc/FUiCtrlHeaderItem.h create mode 100644 inc/FUiCtrlICustomElement.h create mode 100644 inc/FUiCtrlICustomElementF.h create mode 100644 inc/FUiCtrlICustomListElement.h create mode 100644 inc/FUiCtrlIEditTextFilter.h create mode 100644 inc/FUiCtrlIExpandableEditAreaEventListener.h create mode 100644 inc/FUiCtrlIFastScrollListener.h create mode 100644 inc/FUiCtrlIFormBackEventListener.h create mode 100644 inc/FUiCtrlIFormMenuEventListener.h create mode 100644 inc/FUiCtrlIFrameEventListener.h create mode 100644 inc/FUiCtrlIGalleryEventListener.h create mode 100644 inc/FUiCtrlIGalleryItemProvider.h create mode 100644 inc/FUiCtrlIGroupedListViewItemEventListener.h create mode 100644 inc/FUiCtrlIGroupedListViewItemProvider.h create mode 100644 inc/FUiCtrlIGroupedListViewItemProviderF.h create mode 100644 inc/FUiCtrlIGroupedTableViewItemEventListener.h create mode 100644 inc/FUiCtrlIGroupedTableViewItemProvider.h create mode 100644 inc/FUiCtrlIGroupedTableViewItemProviderF.h create mode 100644 inc/FUiCtrlIIconListViewItemEventListener.h create mode 100644 inc/FUiCtrlIIconListViewItemProvider.h create mode 100644 inc/FUiCtrlIListViewItemEventListener.h create mode 100644 inc/FUiCtrlIListViewItemProvider.h create mode 100644 inc/FUiCtrlIListViewItemProviderF.h create mode 100644 inc/FUiCtrlIProgressPopupEventListener.h create mode 100644 inc/FUiCtrlIScrollEventListener.h create mode 100644 inc/FUiCtrlIScrollEventListenerF.h create mode 100644 inc/FUiCtrlISearchBarEventListener.h create mode 100644 inc/FUiCtrlISectionTableViewItemEventListener.h create mode 100644 inc/FUiCtrlISectionTableViewItemProvider.h create mode 100644 inc/FUiCtrlISectionTableViewItemProviderF.h create mode 100644 inc/FUiCtrlISliderEventListener.h create mode 100644 inc/FUiCtrlISplitPanelEventListener.h create mode 100644 inc/FUiCtrlISplitPanelEventListenerF.h create mode 100644 inc/FUiCtrlITableViewItemEventListener.h create mode 100644 inc/FUiCtrlITableViewItemProvider.h create mode 100644 inc/FUiCtrlITableViewItemProviderF.h create mode 100644 inc/FUiCtrlITokenFilter.h create mode 100644 inc/FUiCtrlIconList.h create mode 100644 inc/FUiCtrlIconListTypes.h create mode 100644 inc/FUiCtrlIconListView.h create mode 100644 inc/FUiCtrlIconListViewItem.h create mode 100644 inc/FUiCtrlIconListViewTypes.h create mode 100644 inc/FUiCtrlInputTypes.h create mode 100644 inc/FUiCtrlKeypad.h create mode 100644 inc/FUiCtrlLabel.h create mode 100644 inc/FUiCtrlLabelTypes.h create mode 100644 inc/FUiCtrlList.h create mode 100644 inc/FUiCtrlListContextItem.h create mode 100644 inc/FUiCtrlListItemBase.h create mode 100644 inc/FUiCtrlListTypes.h create mode 100644 inc/FUiCtrlListView.h create mode 100644 inc/FUiCtrlListViewTypes.h create mode 100644 inc/FUiCtrlMessageBox.h create mode 100644 inc/FUiCtrlOptionMenu.h create mode 100644 inc/FUiCtrlOverlayPanel.h create mode 100644 inc/FUiCtrlOverlayRegion.h create mode 100644 inc/FUiCtrlPanel.h create mode 100644 inc/FUiCtrlPopup.h create mode 100644 inc/FUiCtrlProgress.h create mode 100644 inc/FUiCtrlProgressPopup.h create mode 100644 inc/FUiCtrlRadioGroup.h create mode 100644 inc/FUiCtrlScrollEventTypes.h create mode 100644 inc/FUiCtrlScrollPanel.h create mode 100644 inc/FUiCtrlScrollPanelTypes.h create mode 100644 inc/FUiCtrlSearchBar.h create mode 100644 inc/FUiCtrlSectionTableView.h create mode 100644 inc/FUiCtrlSimpleItem.h create mode 100644 inc/FUiCtrlSlidableGroupedList.h create mode 100644 inc/FUiCtrlSlidableList.h create mode 100644 inc/FUiCtrlSlider.h create mode 100644 inc/FUiCtrlSliderTypes.h create mode 100644 inc/FUiCtrlSplitPanel.h create mode 100644 inc/FUiCtrlSplitPanelTypes.h create mode 100644 inc/FUiCtrlTab.h create mode 100644 inc/FUiCtrlTabBar.h create mode 100644 inc/FUiCtrlTabBarItem.h create mode 100644 inc/FUiCtrlTableView.h create mode 100644 inc/FUiCtrlTableViewContextItem.h create mode 100644 inc/FUiCtrlTableViewGroupItem.h create mode 100644 inc/FUiCtrlTableViewItem.h create mode 100644 inc/FUiCtrlTableViewItemBase.h create mode 100644 inc/FUiCtrlTableViewSimpleGroupItem.h create mode 100644 inc/FUiCtrlTableViewSimpleItem.h create mode 100644 inc/FUiCtrlTableViewTypes.h create mode 100644 inc/FUiCtrlTextBox.h create mode 100644 inc/FUiCtrlTimePicker.h create mode 100644 inc/FUiCustomControlBase.h create mode 100644 inc/FUiDataBindingContext.h create mode 100644 inc/FUiDataBindingTypes.h create mode 100644 inc/FUiEffects.h create mode 100644 inc/FUiEffectsEffect.h create mode 100644 inc/FUiEffectsEffectManager.h create mode 100644 inc/FUiEffectsIEffectEventListener.h create mode 100644 inc/FUiEffectsIEffectResourceProvider.h create mode 100644 inc/FUiEffectsTypes.h create mode 100644 inc/FUiFocusManager.h create mode 100644 inc/FUiGridLayout.h create mode 100644 inc/FUiHorizontalBoxLayout.h create mode 100644 inc/FUiIAccessibilityListener.h create mode 100644 inc/FUiIActionEventListener.h create mode 100644 inc/FUiIAdjustmentEventListener.h create mode 100644 inc/FUiIAnimationEventListener.h create mode 100644 inc/FUiIClipboard.h create mode 100644 inc/FUiIClipboardPopupEventListener.h create mode 100644 inc/FUiIColorChangeEventListener.h create mode 100644 inc/FUiICustomItemEventListener.h create mode 100644 inc/FUiIDataBindingDataTransformer.h create mode 100644 inc/FUiIDataBindingDataValidator.h create mode 100644 inc/FUiIDataBindingListener.h create mode 100644 inc/FUiIDateChangeEventListener.h create mode 100644 inc/FUiIDateTimeChangeEventListener.h create mode 100644 inc/FUiIDragDropEventListener.h create mode 100644 inc/FUiIDragDropEventListenerF.h create mode 100644 inc/FUiIExpandableItemEventListener.h create mode 100644 inc/FUiIFastScrollEventListener.h create mode 100644 inc/FUiIFocusEventListener.h create mode 100644 inc/FUiIGroupedItemEventListener.h create mode 100644 inc/FUiIInputConnectionEventListener.h create mode 100644 inc/FUiIInputConnectionEventListenerF.h create mode 100644 inc/FUiIInputConnectionProvider.h create mode 100644 inc/FUiIItemEventListener.h create mode 100644 inc/FUiIKeyEventListener.h create mode 100644 inc/FUiIKeypadEventListener.h create mode 100644 inc/FUiILanguageEventListener.h create mode 100644 inc/FUiIOrientationEventListener.h create mode 100644 inc/FUiIPropagatedKeyEventListener.h create mode 100644 inc/FUiIPropagatedTouchEventListener.h create mode 100644 inc/FUiIScrollPanelEventListener.h create mode 100644 inc/FUiISlidableGroupedListEventListener.h create mode 100644 inc/FUiISlidableListEventListener.h create mode 100644 inc/FUiITextBlockEventListener.h create mode 100644 inc/FUiITextEventListener.h create mode 100644 inc/FUiITimeChangeEventListener.h create mode 100644 inc/FUiITouchCustomGestureEventListener.h create mode 100644 inc/FUiITouchEventListener.h create mode 100644 inc/FUiITouchFlickGestureEventListener.h create mode 100644 inc/FUiITouchGestureEventListener.h create mode 100644 inc/FUiITouchLongPressGestureEventListener.h create mode 100644 inc/FUiITouchModeChangedEventListener.h create mode 100644 inc/FUiITouchPanningGestureEventListener.h create mode 100644 inc/FUiITouchPinchGestureEventListener.h create mode 100644 inc/FUiITouchRotationGestureEventListener.h create mode 100644 inc/FUiITouchTapGestureEventListener.h create mode 100644 inc/FUiIUiLinkEventListener.h create mode 100644 inc/FUiIWindowEventListener.h create mode 100644 inc/FUiInputConnection.h create mode 100644 inc/FUiInputConnectionTypes.h create mode 100644 inc/FUiKeyEventInfo.h create mode 100644 inc/FUiKeyEventManager.h create mode 100644 inc/FUiKeyTypes.h create mode 100644 inc/FUiKeyboardMap.h create mode 100644 inc/FUiLayout.h create mode 100644 inc/FUiLayoutTypes.h create mode 100644 inc/FUiRelativeLayout.h create mode 100644 inc/FUiScenes.h create mode 100644 inc/FUiScenesBackwardSceneTransition.h create mode 100644 inc/FUiScenesForwardSceneTransition.h create mode 100644 inc/FUiScenesIFormFactory.h create mode 100644 inc/FUiScenesIPanelFactory.h create mode 100644 inc/FUiScenesISceneAnimationProvider.h create mode 100644 inc/FUiScenesISceneEventListener.h create mode 100644 inc/FUiScenesISceneManagerEventListener.h create mode 100644 inc/FUiScenesISceneTransitionPolicyProvider.h create mode 100644 inc/FUiScenesScene.h create mode 100644 inc/FUiScenesSceneManager.h create mode 100644 inc/FUiScenesSceneTransition.h create mode 100644 inc/FUiScenesTypes.h create mode 100644 inc/FUiSystemUtil.h create mode 100644 inc/FUiTouch.h create mode 100644 inc/FUiTouchEffect.h create mode 100644 inc/FUiTouchEffectTypes.h create mode 100644 inc/FUiTouchEventInfo.h create mode 100644 inc/FUiTouchEventManager.h create mode 100644 inc/FUiTouchFlickGestureDetector.h create mode 100644 inc/FUiTouchGestureDetector.h create mode 100644 inc/FUiTouchInfo.h create mode 100644 inc/FUiTouchLongPressGestureDetector.h create mode 100644 inc/FUiTouchPanningGestureDetector.h create mode 100644 inc/FUiTouchPinchGestureDetector.h create mode 100644 inc/FUiTouchRotationGestureDetector.h create mode 100644 inc/FUiTouchTapGestureDetector.h create mode 100644 inc/FUiUiConfiguration.h create mode 100644 inc/FUiUiConfigurationTypes.h create mode 100644 inc/FUiVariant.h create mode 100644 inc/FUiVerticalBoxLayout.h create mode 100644 inc/FUiWindow.h create mode 100644 inc/egl.h create mode 100644 inc/egl_macro.h create mode 100644 inc/eglext.h create mode 100644 inc/eglplatform.h create mode 100644 inc/gl.h create mode 100644 inc/gl2.h create mode 100644 inc/gl2ext.h create mode 100644 inc/gl2macro.h create mode 100644 inc/gl2platform.h create mode 100644 inc/glext.h create mode 100644 inc/glmacro.h create mode 100644 inc/glplatform.h create mode 100644 inc/khrplatform.h create mode 100644 osp-uifw.manifest create mode 100644 osp-uifw.pc.in create mode 100644 packaging/osp-uifw.spec create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_arrow_left.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_arrow_right.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_badge_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_button_01.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_button_01_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_button_01_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_button_expand_closed.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_button_expand_opened.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_button_left.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_button_of_off_handler_focus.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_button_on_off_handler_focus.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_button_radio_focus.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_button_reveal.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_button_right.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_category_button.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_category_button_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_category_panel_bg.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/00_category_panel_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_check_focus.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_circle_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_circle_button_focus.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_color_picker_brightness.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_color_picker_brightness_h.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_color_picker_color.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_color_picker_color_h.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_color_picker_custom_color.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_color_picker_custom_color_h.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_color_picker_handler_focus.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_color_picker_saturation.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_color_picker_saturation_h.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_contacts_button_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_contacts_button_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_date_picker_dot.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_edit_field_clear.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_edit_field_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_edit_field_line_round_bg_01.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/00_edit_field_no_line_square_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_edit_field_round_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_edit_group_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_edit_group_bg_bottom.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_edit_group_bg_center.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_edit_group_bg_top.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_effect_tab_text_dim_left.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_effect_tab_text_dim_right.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_effect_title_text_dim_left.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_effect_title_text_dim_right.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_fast_scroll_handler.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_fast_scroll_handler_h.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_fast_scroll_popup_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_fast_scroll_popup_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_fast_scroll_rollover_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_fast_scroll_rollover_bg_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_grid_select_check.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_grid_select_check_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_grid_select_check_bg_press.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_groupedlist_bg_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_groupedlist_bg_press.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_groupedlist_bottom_bg_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_groupedlist_bottom_bg_press.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_groupedlist_center_bg_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_groupedlist_center_bg_press.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_groupedlist_top_bg_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_groupedlist_top_bg_press.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_icon_SIP_close.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_icon_back.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_icon_focus.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_icon_jump.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_icon_jump_left.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_icon_more.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_indexlist_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_indexlist_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_list_group_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_list_group_bg_bottom.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_list_group_bg_center.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_list_group_bg_top.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_list_group_bottom_cover_round_bg_normal.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_list_group_center_cover_round_bg_normal.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_list_group_press_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_list_group_press_bg_bottom.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_list_group_press_bg_center.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_list_group_press_bg_top.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_list_group_single_cover_round_bg_normal.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_list_group_top_cover_round_bg_normal.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_list_process_01.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_list_process_02.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_list_process_03.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_list_process_04.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_list_process_05.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_list_process_06.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_list_process_07.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_list_process_08.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_list_process_09.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_list_process_10.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_list_process_11.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_list_process_12.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_list_process_13.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_list_process_14.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_list_process_15.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_list_process_16.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_list_process_17.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_list_process_18.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_list_process_19.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_list_process_20.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_list_process_21.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_list_process_22.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_list_process_23.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_list_process_24.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_list_process_25.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_list_process_26.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_list_process_27.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_list_process_28.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_list_process_29.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_list_process_30.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_option_panel_contextual_popup_arrow.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_option_panel_handle_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_option_panel_handle_bg_press.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_option_panel_handle_more.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_option_panel_handle_more_press.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_overscrolling_bottom.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/00_overscrolling_bottom.#.png~HEAD create mode 100755 res/common/usr/share/osp/bitmaps/480x800/00_overscrolling_bottom.#.png~f13742d6701484182d616a6f28f6c79fc2f86429 create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_overscrolling_left.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/00_overscrolling_left.#.png~HEAD create mode 100755 res/common/usr/share/osp/bitmaps/480x800/00_overscrolling_left.#.png~f13742d6701484182d616a6f28f6c79fc2f86429 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 create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_panel_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_panel_handle_arrow.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_panel_handle_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_panel_list_bg_press.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_picker_button.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_picker_button_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_popup_bubble_02_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_popup_bubble_bg.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/00_popup_bubble_tail_bottom.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_popup_bubble_tail_bottom_ef.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/00_popup_bubble_tail_left.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_popup_bubble_tail_left_ef.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/00_popup_bubble_tail_right.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_popup_bubble_tail_right_ef.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/00_popup_bubble_tail_top.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_popup_bubble_tail_top_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_popup_button_focus.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/00_popup_button_normal_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_popup_dim_lighting_h.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_popup_dim_lighting_v.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_progress_bar.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_progress_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_quick_menu_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_quick_menu_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_scroll_bar_h.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_scroll_bar_h_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_scroll_bar_v.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_scroll_bar_v_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_search_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_search_edit_field_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_search_edit_field_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_search_icon.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_slider_handle.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_slider_handle_focus.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_slider_popup_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_softkey_icon_add.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_softkey_icon_zoom.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_softkey_left_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_softkey_left_text_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_softkey_right_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_softkey_right_text_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_split_handler_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_system_control_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_tab_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_tab_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_tab_press_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_tab_select_bar.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_thumbs_bg_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_thumbs_line_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_time_picker_keypad_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_time_picker_keypad_button_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_time_picker_keypad_button_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_time_picker_number_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_time_picker_tail.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_time_picker_tail_01.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_title_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_toolbar_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_toolbar_button.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_toolbar_button_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_toolbar_button_ef_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_toolbar_button_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_toolbar_button_press.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/00_toolbar_press.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/TTS_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/TTS_popup_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_badge_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_button_01_dim_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_button_01_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/black/00_button_01_press_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_button_expand_closed_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_button_expand_opened_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_button_left_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_button_off.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_button_off_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_button_off_handler.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_button_off_handler_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_button_on.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_button_on_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_button_on_handler.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_button_on_handler_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_button_on_off_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_button_on_off_bg_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_button_on_off_handler.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_button_on_off_handler_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_button_radio_Activated.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_button_radio_Activated_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_button_radio_activated.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_button_radio_activated_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_button_radio_activated_press.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_button_radio_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_button_radio_dim_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_button_radio_normal1.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_button_radio_normal2.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_button_radio_press.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_button_radio_press_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_button_right_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_check_Activated.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_check_Activated_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_check_activated.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_check_activated_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_check_activated_press.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_check_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_check_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_check_dim_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_check_press.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_check_press_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_circle_bg_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_circle_bg_ef_dim.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/black/00_circle_bg_ef_press.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_color_picker_handler.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_contacts_button_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_contacts_button_bg_dim_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_contacts_button_bg_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/black/00_contacts_button_bg_press_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_contacts_button_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_contacts_button_focus_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_edit_group_bg_bottom_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_edit_group_bg_center_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_edit_group_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_edit_group_bg_top_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_effect_footer_bounce_left.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_effect_footer_bounce_left_h.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_effect_footer_bounce_right.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_effect_footer_bounce_right_h.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_effect_tab_bounce_left.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_effect_tab_bounce_left_02.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_effect_tab_bounce_left_h.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_effect_tab_bounce_right.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_effect_tab_bounce_right_02.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_effect_tab_bounce_right_h.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_effect_title_tab_bounce_left.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_effect_title_tab_bounce_right.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_expandable_bg_bottom_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_expandable_bg_center_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_expandable_bg_top_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/black/00_fast_scroll_handler.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/black/00_fast_scroll_handler_h.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/black/00_fast_scroll_popup_bg.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/black/00_fast_scroll_popup_bg_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/black/00_fast_scroll_rollover_bg_line_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_01.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_02.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_03.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_04.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_05.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_06.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_07.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_08.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_09.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_10.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_11.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_12.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_13.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_14.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_15.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_16.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_17.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_18.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_19.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_20.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_21.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_22.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_23.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_24.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_25.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_26.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_27.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_28.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_29.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_30.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_icon_Back_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_icon_Back_ef_02.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_icon_Back_trans_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_icon_SIP_close_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_icon_back_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_icon_back_trans_ef.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/black/00_icon_jump.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_icon_jump_ef.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/black/00_icon_jump_left.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_icon_jump_left_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_icon_more_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_indexlist_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_list_group_bg_bottom_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_list_group_bg_center_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_list_group_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_list_group_bg_top_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_01.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_02.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_03.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_04.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_05.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_06.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_07.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_08.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_09.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_10.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_11.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_12.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_13.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_14.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_15.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_16.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_17.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_18.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_19.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_20.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_21.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_22.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_23.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_24.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_25.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_26.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_27.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_28.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_29.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_30.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_more_popup_press.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_option_panel_handle_bg_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_option_panel_handle_bg_ef_press.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_panel_handle_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_panel_handle_bg_ef_press.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_panel_list_bg_ef_press.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_picker_button_dim_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_picker_button_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_picker_button_press_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/black/00_popup_bg.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/black/00_popup_bg_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/black/00_popup_bottom_bg.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/black/00_popup_bottom_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_popup_bubble_02_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_popup_bubble_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_popup_bubble_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_popup_bubble_tail_bottom.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_popup_bubble_tail_bottom_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_popup_bubble_tail_left.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_popup_bubble_tail_left_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_popup_bubble_tail_right.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_popup_bubble_tail_right_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_popup_bubble_tail_top.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_popup_bubble_tail_top_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_popup_button_dim_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_popup_button_normal_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/black/00_popup_button_press_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/black/00_popup_scroll.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/black/00_popup_title_bg.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/black/00_popup_title_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_progress_bar_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_progress_ef_bg.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/black/00_scroll_bar_h.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/black/00_scroll_bar_h_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_scroll_bar_handler_h.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_scroll_bar_handler_v.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/black/00_scroll_bar_v.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/black/00_scroll_bar_v_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_search_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_search_edit_field_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_search_icon_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_slider_handle_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_slider_handle_ef_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_slider_handle_ef_press.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_softkey_left_bg_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_softkey_left_bg_ef_press.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_softkey_left_text_bg_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_softkey_left_text_bg_ef_press.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_softkey_right_bg_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_softkey_right_bg_ef_press.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_softkey_right_text_bg_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_softkey_right_text_bg_ef_press.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_split_handler_bg_ef_h.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_split_handler_bg_ef_v.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_split_handler_h.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_split_handler_v.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_sub_title_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/black/00_tab_press_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_title_bg_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/black/00_title_press_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_toolbar_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_toolbar_bg_shadow.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_toolbar_button.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_toolbar_button_bg_dim_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_toolbar_button_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_toolbar_button_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_toolbar_button_ef_press.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_toolbar_button_press.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_toolbar_button_press_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/black/00_toolbar_ef_press.#.png create mode 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 create mode 100644 res/common/usr/share/osp/bitmaps/480x800/copy&paste_Handler_center.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/copy&paste_Handler_center_reverse.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/copy&paste_Handler_left.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/copy&paste_Handler_left_01.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/copy&paste_Handler_left_reverse.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/copy&paste_Handler_right.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/copy&paste_Magnifier.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/copy&paste_Magnifier_mask.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/copy&paste_icon_search.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_badge_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_button_01_dim_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_button_01_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/default/00_button_01_press_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_button_expand_closed_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_button_expand_opened_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_button_left_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_button_off.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_button_off_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_button_off_handler.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_button_off_handler_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_button_on.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_button_on_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_button_on_handler.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_button_on_handler_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_button_on_off_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_button_on_off_bg_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_button_on_off_handler.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_button_on_off_handler_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_button_radio_Activated.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_button_radio_Activated_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_button_radio_activated.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_button_radio_activated_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_button_radio_activated_press.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_button_radio_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_button_radio_dim_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_button_radio_normal1.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_button_radio_normal2.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_button_radio_press.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_button_radio_press_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_button_right_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_check_Activated.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_check_Activated_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_check_activated.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_check_activated_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_check_activated_press.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_check_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_check_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_check_dim_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_check_press.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_check_press_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_circle_bg_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_circle_bg_ef_dim.png create mode 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_color_picker_handler.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 create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_contacts_button_bg_ef.#.png create mode 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 create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_contacts_button_focus_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_edit_group_bg_bottom_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_edit_group_bg_center_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_edit_group_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_edit_group_bg_top_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_effect_footer_bounce_left.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_effect_footer_bounce_left_h.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_effect_footer_bounce_right.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_effect_footer_bounce_right_h.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_effect_tab_bounce_left.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_effect_tab_bounce_left_02.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_effect_tab_bounce_left_h.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_effect_tab_bounce_right.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_effect_tab_bounce_right_02.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_effect_tab_bounce_right_h.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_effect_title_tab_bounce_left.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_effect_title_tab_bounce_right.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_expandable_bg_bottom_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_expandable_bg_center_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_expandable_bg_top_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/default/00_fast_scroll_handler.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/default/00_fast_scroll_handler_h.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/default/00_fast_scroll_popup_bg.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/default/00_fast_scroll_popup_bg_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/default/00_fast_scroll_rollover_bg_line_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_01.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_02.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_03.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_04.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_05.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_06.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_07.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_08.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_09.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_10.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_11.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_12.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_13.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_14.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_15.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_16.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_17.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_18.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_19.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_20.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_21.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_22.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_23.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_24.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_25.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_26.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_27.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_28.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_29.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_30.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_icon_Back_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_icon_Back_ef_02.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_icon_Back_trans_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_icon_SIP_close_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_icon_back_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_icon_back_trans_ef.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/default/00_icon_jump.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_icon_jump_ef.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/default/00_icon_jump_left.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_icon_jump_left_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_icon_more_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_indexlist_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_list_group_bg_bottom_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_list_group_bg_center_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_list_group_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_list_group_bg_top_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_01.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_02.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_03.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_04.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_05.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_06.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_07.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_08.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_09.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_10.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_11.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_12.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_13.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_14.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_15.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_16.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_17.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_18.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_19.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_20.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_21.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_22.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_23.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_24.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_25.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_26.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_27.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_28.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_29.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_30.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_more_popup_press.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_option_panel_handle_bg_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_option_panel_handle_bg_ef_press.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_panel_handle_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_panel_handle_bg_ef_press.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_panel_list_bg_ef_press.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_picker_button_dim_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_picker_button_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_picker_button_press_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/default/00_popup_bg.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/default/00_popup_bg_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/default/00_popup_bottom_bg.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/default/00_popup_bottom_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_popup_bubble_02_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_popup_bubble_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_popup_bubble_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_popup_bubble_tail_bottom.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_popup_bubble_tail_bottom_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_popup_bubble_tail_left.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_popup_bubble_tail_left_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_popup_bubble_tail_right.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_popup_bubble_tail_right_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_popup_bubble_tail_top.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_popup_bubble_tail_top_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_popup_button_dim_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_popup_button_normal_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/default/00_popup_button_press_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/default/00_popup_scroll.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/default/00_popup_title_bg.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/default/00_popup_title_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_progress_bar_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_progress_ef_bg.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/default/00_scroll_bar_h.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/default/00_scroll_bar_h_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_scroll_bar_handler_h.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_scroll_bar_handler_v.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/default/00_scroll_bar_v.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/default/00_scroll_bar_v_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_search_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_search_edit_field_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_search_icon_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_slider_handle_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_slider_handle_ef_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_slider_handle_ef_press.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_softkey_left_bg_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_softkey_left_bg_ef_press.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_softkey_left_text_bg_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_softkey_left_text_bg_ef_press.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_softkey_right_bg_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_softkey_right_bg_ef_press.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_softkey_right_text_bg_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_softkey_right_text_bg_ef_press.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_split_handler_bg_ef_h.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_split_handler_bg_ef_v.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_split_handler_h.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_split_handler_v.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_sub_title_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/default/00_tab_press_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_title_bg_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/default/00_title_press_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_toolbar_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_toolbar_bg_shadow.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_toolbar_button.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_toolbar_button_bg_dim_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_toolbar_button_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_toolbar_button_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_toolbar_button_ef_press.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_toolbar_button_press.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_toolbar_button_press_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/default/00_toolbar_ef_press.#.png create mode 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/00_badge_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_button_01_dim_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_button_01_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_button_01_press_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_button_expand_closed_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_button_expand_opened_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_button_left_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_button_off.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_button_off_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_button_off_handler.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_button_off_handler_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_button_on.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_button_on_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_button_on_handler.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_button_on_handler_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_button_on_off_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_button_on_off_bg_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_button_on_off_handler.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_button_on_off_handler_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_button_radio_Activated.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_button_radio_Activated_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_button_radio_activated.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_button_radio_activated_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_button_radio_activated_press.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_button_radio_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_button_radio_dim_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_button_radio_normal1.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_button_radio_normal2.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_button_radio_press.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_button_radio_press_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_button_right_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_check_Activated.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_check_Activated_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_check_activated.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_check_activated_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_check_activated_press.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_check_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_check_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_check_dim_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_check_press.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_check_press_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_circle_bg_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_circle_bg_ef_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_circle_bg_ef_press.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_color_picker_handler.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_contacts_button_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_contacts_button_bg_dim_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_contacts_button_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_contacts_button_bg_press_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_contacts_button_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_contacts_button_focus_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_edit_group_bg_bottom_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_edit_group_bg_center_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_edit_group_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_edit_group_bg_top_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_effect_footer_bounce_left.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_effect_footer_bounce_left_h.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_effect_footer_bounce_right.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_effect_footer_bounce_right_h.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_effect_tab_bounce_left.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_effect_tab_bounce_left_02.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_effect_tab_bounce_left_h.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_effect_tab_bounce_right.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_effect_tab_bounce_right_02.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_effect_tab_bounce_right_h.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_effect_title_tab_bounce_left.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_effect_title_tab_bounce_right.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_expandable_bg_bottom_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_expandable_bg_center_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_expandable_bg_top_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/white/00_fast_scroll_handler.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/white/00_fast_scroll_handler_h.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/white/00_fast_scroll_popup_bg.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/white/00_fast_scroll_popup_bg_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/white/00_fast_scroll_rollover_bg_line_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_01.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_02.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_03.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_04.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_05.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_06.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_07.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_08.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_09.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_10.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_11.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_12.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_13.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_14.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_15.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_16.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_17.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_18.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_19.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_20.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_21.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_22.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_23.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_24.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_25.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_26.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_27.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_28.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_29.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_30.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_icon_Back_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_icon_Back_ef_02.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_icon_Back_trans_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_icon_SIP_close_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_icon_back_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_icon_back_trans_ef.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/white/00_icon_jump.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_icon_jump_ef.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/white/00_icon_jump_left.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_icon_jump_left_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_icon_more_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_indexlist_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_list_group_bg_bottom_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_list_group_bg_center_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_list_group_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_list_group_bg_top_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_01.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_02.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_03.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_04.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_05.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_06.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_07.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_08.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_09.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_10.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_11.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_12.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_13.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_14.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_15.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_16.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_17.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_18.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_19.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_20.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_21.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_22.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_23.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_24.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_25.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_26.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_27.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_28.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_29.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_30.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_more_popup_press.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_option_panel_handle_bg_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_option_panel_handle_bg_ef_press.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_panel_handle_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_panel_handle_bg_ef_press.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_panel_list_bg_ef_press.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_picker_button_dim_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_picker_button_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_picker_button_press_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bg.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bg_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bottom_bg.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bottom_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bubble_02_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bubble_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bubble_tail_bottom.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bubble_tail_bottom_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bubble_tail_left.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bubble_tail_left_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bubble_tail_right.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bubble_tail_right_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bubble_tail_top.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bubble_tail_top_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_popup_button_dim_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/white/00_popup_button_normal_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_popup_button_press_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/white/00_popup_scroll.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/white/00_popup_title_bg.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/white/00_popup_title_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_progress_bar_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_progress_ef_bg.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/white/00_scroll_bar_h.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/white/00_scroll_bar_h_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_scroll_bar_handler_h.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_scroll_bar_handler_v.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/white/00_scroll_bar_v.#.png create mode 100755 res/common/usr/share/osp/bitmaps/480x800/white/00_scroll_bar_v_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_search_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_search_edit_field_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_search_icon_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_slider_handle_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_slider_handle_ef_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_slider_handle_ef_press.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_softkey_left_bg_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_softkey_left_bg_ef_press.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_softkey_left_text_bg_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_softkey_left_text_bg_ef_press.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_softkey_right_bg_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_softkey_right_bg_ef_press.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_softkey_right_text_bg_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_softkey_right_text_bg_ef_press.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_split_handler_bg_ef_h.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_split_handler_bg_ef_v.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_split_handler_h.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_split_handler_v.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_sub_title_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_tab_press_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_title_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_title_press_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_toolbar_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_toolbar_bg_shadow.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_toolbar_button.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_toolbar_button_bg_dim_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_toolbar_button_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_toolbar_button_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_toolbar_button_ef_press.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_toolbar_button_press.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_toolbar_button_press_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/480x800/white/00_toolbar_press_ef.#.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_arrow_left.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_arrow_right.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_badge_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_button_01.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_button_01_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_button_01_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_button_expand_closed.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_button_expand_opened.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_button_left.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_button_of_off_handler_focus.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_button_on_off_handler_focus.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_button_radio_focus.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_button_reveal.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_button_right.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_category_button.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_category_button_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_category_panel_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_category_panel_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_check_focus.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_circle_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_circle_button_focus.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_color_picker_brightness.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_color_picker_brightness_h.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_color_picker_color.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_color_picker_color_h.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_color_picker_custom_color.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_color_picker_custom_color_h.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_color_picker_handler_focus.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_color_picker_saturation.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_color_picker_saturation_h.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_contacts_button_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_contacts_button_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_date_picker_dot.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_edit_field_clear.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_edit_field_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_edit_field_line_round_bg_01.#.png create mode 100755 res/common/usr/share/osp/bitmaps/720x1280/00_edit_field_no_line_square_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_edit_field_round_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_edit_group_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_edit_group_bg_bottom.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_edit_group_bg_center.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_edit_group_bg_top.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_effect_tab_text_dim_left.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_effect_tab_text_dim_right.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_effect_title_text_dim_left.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_effect_title_text_dim_right.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_fast_scroll_handler.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_fast_scroll_handler_h.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_fast_scroll_popup_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_fast_scroll_popup_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_fast_scroll_rollover_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_fast_scroll_rollover_bg_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_grid_select_check.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_grid_select_check_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_grid_select_check_bg_press.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_groupedlist_bg_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_groupedlist_bg_press.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_groupedlist_bottom_bg_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_groupedlist_bottom_bg_press.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_groupedlist_center_bg_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_groupedlist_center_bg_press.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_groupedlist_top_bg_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_groupedlist_top_bg_press.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_icon_SIP_close.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_icon_back.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_icon_focus.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_icon_jump.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_icon_jump_left.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_icon_more.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_indexlist_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_indexlist_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_list_group_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_list_group_bg_bottom.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_list_group_bg_center.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_list_group_bg_top.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_list_group_bottom_cover_round_bg_normal.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_list_group_center_cover_round_bg_normal.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_list_group_press_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_list_group_press_bg_bottom.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_list_group_press_bg_center.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_list_group_press_bg_top.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_list_group_single_cover_round_bg_normal.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_list_group_top_cover_round_bg_normal.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_list_process_01.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_list_process_02.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_list_process_03.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_list_process_04.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_list_process_05.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_list_process_06.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_list_process_07.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_list_process_08.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_list_process_09.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_list_process_10.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_list_process_11.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_list_process_12.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_list_process_13.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_list_process_14.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_list_process_15.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_list_process_16.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_list_process_17.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_list_process_18.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_list_process_19.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_list_process_20.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_list_process_21.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_list_process_22.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_list_process_23.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_list_process_24.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_list_process_25.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_list_process_26.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_list_process_27.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_list_process_28.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_list_process_29.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_list_process_30.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_option_panel_contextual_popup_arrow.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_option_panel_handle_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_option_panel_handle_bg_press.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_option_panel_handle_more.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_option_panel_handle_more_press.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 create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_panel_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_panel_handle_arrow.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_panel_handle_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_panel_list_bg_press.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_picker_button.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_picker_button_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_popup_bubble_02_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_popup_bubble_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_popup_bubble_tail_bottom.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_popup_bubble_tail_bottom_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_popup_bubble_tail_left.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_popup_bubble_tail_left_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_popup_bubble_tail_right.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_popup_bubble_tail_right_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_popup_bubble_tail_top.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_popup_bubble_tail_top_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_popup_button_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_popup_button_normal_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_popup_dim_lighting_h.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_popup_dim_lighting_v.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_progress_bar.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_progress_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_quick_menu_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_quick_menu_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_scroll_bar_h.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_scroll_bar_h_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_scroll_bar_v.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_scroll_bar_v_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_search_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_search_edit_field_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_search_edit_field_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_search_icon.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_slider_handle.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_slider_handle_focus.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_slider_popup_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_softkey_icon_add.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_softkey_icon_zoom.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_softkey_left_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_softkey_left_text_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_softkey_right_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_softkey_right_text_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_split_handler_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_system_control_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_tab_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_tab_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_tab_press_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_tab_select_bar.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_thumbs_bg_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_thumbs_line_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_time_picker_keypad_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_time_picker_keypad_button_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_time_picker_keypad_button_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_time_picker_number_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_time_picker_tail.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_time_picker_tail_01.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_title_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_toolbar_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_toolbar_button.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_toolbar_button_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_toolbar_button_ef_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_toolbar_button_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_toolbar_button_press.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/00_toolbar_press.#.png create mode 100755 res/common/usr/share/osp/bitmaps/720x1280/TTS_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/TTS_popup_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_badge_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_button_01_dim_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_button_01_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/720x1280/black/00_button_01_press_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_button_expand_closed_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_button_expand_opened_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_button_left_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_button_off.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_button_off_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_button_off_handler.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_button_off_handler_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_button_on.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_button_on_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_button_on_handler.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_button_on_handler_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_button_on_off_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_button_on_off_bg_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_button_on_off_handler.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_button_on_off_handler_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_button_radio_Activated.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_button_radio_Activated_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_button_radio_activated.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_button_radio_activated_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_button_radio_activated_press.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_button_radio_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_button_radio_dim_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_button_radio_normal1.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_button_radio_normal2.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_button_radio_press.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_button_radio_press_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_button_right_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_check_Activated.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_check_Activated_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_check_activated.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_check_activated_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_check_activated_press.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_check_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_check_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_check_dim_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_check_press.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_check_press_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_circle_bg_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_circle_bg_ef_dim.png create mode 100755 res/common/usr/share/osp/bitmaps/720x1280/black/00_circle_bg_ef_press.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_color_picker_handler.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_contacts_button_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_contacts_button_bg_dim_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_contacts_button_bg_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/720x1280/black/00_contacts_button_bg_press_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_contacts_button_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_contacts_button_focus_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_edit_group_bg_bottom_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_edit_group_bg_center_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_edit_group_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_edit_group_bg_top_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_effect_footer_bounce_left.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_effect_footer_bounce_left_h.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_effect_footer_bounce_right.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_effect_footer_bounce_right_h.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_effect_tab_bounce_left.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_effect_tab_bounce_left_02.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_effect_tab_bounce_left_h.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_effect_tab_bounce_right.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_effect_tab_bounce_right_02.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_effect_tab_bounce_right_h.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_effect_title_tab_bounce_left.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_effect_title_tab_bounce_right.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_expandable_bg_bottom_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_expandable_bg_center_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_expandable_bg_top_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_fast_scroll_handler.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_fast_scroll_handler_h.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_fast_scroll_popup_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_fast_scroll_popup_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_fast_scroll_rollover_bg_line_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_01.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_02.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_03.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_04.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_05.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_06.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_07.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_08.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_09.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_10.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_11.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_12.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_13.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_14.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_15.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_16.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_17.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_18.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_19.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_20.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_21.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_22.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_23.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_24.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_25.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_26.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_27.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_28.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_29.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_30.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_icon_Back_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_icon_Back_ef_02.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_icon_Back_trans_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_icon_SIP_close_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_icon_back_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_icon_back_trans_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_icon_jump.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_icon_jump_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_icon_jump_left.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_icon_jump_left_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_icon_more_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_indexlist_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_list_group_bg_bottom_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_list_group_bg_center_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_list_group_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_list_group_bg_top_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_01.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_02.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_03.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_04.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_05.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_06.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_07.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_08.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_09.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_10.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_11.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_12.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_13.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_14.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_15.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_16.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_17.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_18.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_19.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_20.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_21.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_22.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_23.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_24.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_25.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_26.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_27.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_28.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_29.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_30.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_more_popup_press.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_option_panel_handle_bg_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_option_panel_handle_bg_ef_press.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_panel_handle_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_panel_handle_bg_ef_press.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_panel_list_bg_ef_press.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_picker_button_dim_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_picker_button_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_picker_button_press_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bg.#.png create mode 100755 res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bg_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bottom_bg.#.png create mode 100755 res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bottom_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bubble_02_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bubble_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bubble_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bubble_tail_bottom.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bubble_tail_bottom_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bubble_tail_left.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bubble_tail_left_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bubble_tail_right.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bubble_tail_right_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bubble_tail_top.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bubble_tail_top_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_button_dim_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_button_normal_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_button_press_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_scroll.#.png create mode 100755 res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_title_bg.#.png create mode 100755 res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_title_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_progress_bar_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_progress_ef_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_scroll_bar_h.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_scroll_bar_h_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_scroll_bar_handler_h.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_scroll_bar_handler_v.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_scroll_bar_v.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_scroll_bar_v_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_search_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_search_edit_field_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_search_icon_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_slider_handle_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_slider_handle_ef_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_slider_handle_ef_press.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_softkey_left_bg_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_softkey_left_bg_ef_press.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_softkey_left_text_bg_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_softkey_left_text_bg_ef_press.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_softkey_right_bg_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_softkey_right_bg_ef_press.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_softkey_right_text_bg_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_softkey_right_text_bg_ef_press.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_split_handler_bg_ef_h.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_split_handler_bg_ef_v.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_split_handler_h.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_split_handler_v.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_sub_title_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/720x1280/black/00_tab_press_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_title_bg_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/720x1280/black/00_title_press_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_toolbar_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_toolbar_bg_shadow.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_toolbar_button.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_toolbar_button_bg_dim_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_toolbar_button_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_toolbar_button_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_toolbar_button_ef_press.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_toolbar_button_press.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_toolbar_button_press_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/black/00_toolbar_ef_press.#.png create mode 100755 res/common/usr/share/osp/bitmaps/720x1280/black/00_toolbar_press_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/720x1280/black/pd_btn_bg.#.png create mode 100755 res/common/usr/share/osp/bitmaps/720x1280/black/pd_btn_bg_arrow_down.png create mode 100755 res/common/usr/share/osp/bitmaps/720x1280/black/pd_btn_bg_arrow_up.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/copy&paste_Handler_center.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/copy&paste_Handler_center_reverse.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/copy&paste_Handler_left.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/copy&paste_Handler_left_01.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/copy&paste_Handler_left_reverse.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/copy&paste_Handler_right.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/copy&paste_Magnifier.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/copy&paste_Magnifier_mask.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/copy&paste_icon_search.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_badge_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_button_01_dim_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_button_01_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/720x1280/default/00_button_01_press_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_button_expand_closed_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_button_expand_opened_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_button_left_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_button_off.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_button_off_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_button_off_handler.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_button_off_handler_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_button_on.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_button_on_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_button_on_handler.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_button_on_handler_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_button_on_off_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_button_on_off_bg_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_button_on_off_handler.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_button_on_off_handler_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_button_radio_Activated.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_button_radio_Activated_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_button_radio_activated.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_button_radio_activated_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_button_radio_activated_press.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_button_radio_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_button_radio_dim_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_button_radio_normal1.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_button_radio_normal2.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_button_radio_press.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_button_radio_press_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_button_right_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_check_Activated.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_check_Activated_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_check_activated.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_check_activated_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_check_activated_press.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_check_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_check_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_check_dim_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_check_press.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_check_press_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_circle_bg_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_circle_bg_ef_dim.png create mode 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_color_picker_handler.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 create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_contacts_button_bg_ef.#.png create mode 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 create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_contacts_button_focus_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_edit_group_bg_bottom_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_edit_group_bg_center_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_edit_group_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_edit_group_bg_top_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_effect_footer_bounce_left.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_effect_footer_bounce_left_h.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_effect_footer_bounce_right.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_effect_footer_bounce_right_h.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_effect_tab_bounce_left.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_effect_tab_bounce_left_02.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_effect_tab_bounce_left_h.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_effect_tab_bounce_right.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_effect_tab_bounce_right_02.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_effect_tab_bounce_right_h.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_effect_title_tab_bounce_left.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_effect_title_tab_bounce_right.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_expandable_bg_bottom_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_expandable_bg_center_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_expandable_bg_top_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_fast_scroll_handler.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_fast_scroll_handler_h.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_fast_scroll_popup_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_fast_scroll_popup_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_fast_scroll_rollover_bg_line_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_01.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_02.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_03.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_04.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_05.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_06.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_07.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_08.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_09.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_10.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_11.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_12.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_13.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_14.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_15.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_16.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_17.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_18.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_19.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_20.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_21.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_22.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_23.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_24.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_25.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_26.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_27.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_28.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_29.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_30.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_icon_Back_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_icon_Back_ef_02.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_icon_Back_trans_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_icon_SIP_close_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_icon_back_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_icon_back_trans_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_icon_jump.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_icon_jump_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_icon_jump_left.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_icon_jump_left_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_icon_more_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_indexlist_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_list_group_bg_bottom_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_list_group_bg_center_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_list_group_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_list_group_bg_top_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_01.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_02.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_03.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_04.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_05.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_06.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_07.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_08.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_09.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_10.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_11.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_12.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_13.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_14.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_15.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_16.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_17.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_18.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_19.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_20.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_21.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_22.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_23.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_24.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_25.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_26.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_27.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_28.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_29.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_30.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_more_popup_press.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_option_panel_handle_bg_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_option_panel_handle_bg_ef_press.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_panel_handle_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_panel_handle_bg_ef_press.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_panel_list_bg_ef_press.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_picker_button_dim_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_picker_button_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_picker_button_press_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bg.#.png create mode 100755 res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bg_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bottom_bg.#.png create mode 100755 res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bottom_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bubble_02_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bubble_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bubble_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bubble_tail_bottom.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bubble_tail_bottom_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bubble_tail_left.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bubble_tail_left_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bubble_tail_right.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bubble_tail_right_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bubble_tail_top.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bubble_tail_top_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_button_dim_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_button_normal_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_button_press_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_scroll.#.png create mode 100755 res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_title_bg.#.png create mode 100755 res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_title_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_progress_bar_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_progress_ef_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_scroll_bar_h.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_scroll_bar_h_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_scroll_bar_handler_h.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_scroll_bar_handler_v.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_scroll_bar_v.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_scroll_bar_v_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_search_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_search_edit_field_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_search_icon_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_slider_handle_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_slider_handle_ef_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_slider_handle_ef_press.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_softkey_left_bg_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_softkey_left_bg_ef_press.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_softkey_left_text_bg_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_softkey_left_text_bg_ef_press.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_softkey_right_bg_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_softkey_right_bg_ef_press.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_softkey_right_text_bg_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_softkey_right_text_bg_ef_press.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_split_handler_bg_ef_h.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_split_handler_bg_ef_v.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_split_handler_h.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_split_handler_v.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_sub_title_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/720x1280/default/00_tab_press_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_title_bg_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/720x1280/default/00_title_press_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_toolbar_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_toolbar_bg_shadow.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_toolbar_button.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_toolbar_button_bg_dim_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_toolbar_button_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_toolbar_button_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_toolbar_button_ef_press.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_toolbar_button_press.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_toolbar_button_press_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/default/00_toolbar_ef_press.#.png create mode 100755 res/common/usr/share/osp/bitmaps/720x1280/default/00_toolbar_press_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/720x1280/default/pd_btn_bg.#.png create mode 100755 res/common/usr/share/osp/bitmaps/720x1280/default/pd_btn_bg_arrow_down.png create mode 100755 res/common/usr/share/osp/bitmaps/720x1280/default/pd_btn_bg_arrow_up.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_badge_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_button_01_dim_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_button_01_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_button_01_press_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_button_expand_closed_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_button_expand_opened_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_button_left_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_button_off.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_button_off_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_button_off_handler.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_button_off_handler_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_button_on.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_button_on_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_button_on_handler.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_button_on_handler_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_button_on_off_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_button_on_off_bg_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_button_on_off_handler.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_button_on_off_handler_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_button_radio_Activated.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_button_radio_Activated_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_button_radio_activated.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_button_radio_activated_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_button_radio_activated_press.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_button_radio_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_button_radio_dim_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_button_radio_normal1.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_button_radio_normal2.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_button_radio_press.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_button_radio_press_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_button_right_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_check_Activated.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_check_Activated_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_check_activated.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_check_activated_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_check_activated_press.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_check_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_check_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_check_dim_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_check_press.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_check_press_bg.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_circle_bg_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_circle_bg_ef_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_circle_bg_ef_press.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_color_picker_handler.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_contacts_button_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_contacts_button_bg_dim_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_contacts_button_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_contacts_button_bg_press_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_contacts_button_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_contacts_button_focus_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_edit_group_bg_bottom_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_edit_group_bg_center_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_edit_group_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_edit_group_bg_top_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_effect_footer_bounce_left.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_effect_footer_bounce_left_h.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_effect_footer_bounce_right.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_effect_footer_bounce_right_h.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_effect_tab_bounce_left.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_effect_tab_bounce_left_02.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_effect_tab_bounce_left_h.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_effect_tab_bounce_right.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_effect_tab_bounce_right_02.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_effect_tab_bounce_right_h.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_effect_title_tab_bounce_left.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_effect_title_tab_bounce_right.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_expandable_bg_bottom_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_expandable_bg_center_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_expandable_bg_top_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_fast_scroll_handler.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_fast_scroll_handler_h.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_fast_scroll_popup_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_fast_scroll_popup_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_fast_scroll_rollover_bg_line_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_focus.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_01.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_02.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_03.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_04.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_05.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_06.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_07.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_08.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_09.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_10.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_11.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_12.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_13.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_14.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_15.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_16.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_17.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_18.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_19.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_20.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_21.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_22.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_23.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_24.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_25.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_26.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_27.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_28.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_29.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_30.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_icon_Back_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_icon_Back_ef_02.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_icon_Back_trans_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_icon_SIP_close_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_icon_back_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_icon_back_trans_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_icon_jump.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_icon_jump_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_icon_jump_left.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_icon_jump_left_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_icon_more_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_indexlist_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_list_group_bg_bottom_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_list_group_bg_center_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_list_group_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_list_group_bg_top_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_list_process_01.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_list_process_02.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_list_process_03.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_list_process_04.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_list_process_05.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_list_process_06.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_list_process_07.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_list_process_08.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_list_process_09.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_list_process_10.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_list_process_11.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_list_process_12.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_list_process_13.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_list_process_14.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_list_process_15.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_list_process_16.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_list_process_17.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_list_process_18.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_list_process_19.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_list_process_20.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_list_process_21.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_list_process_22.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_list_process_23.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_list_process_24.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_list_process_25.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_list_process_26.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_list_process_27.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_list_process_28.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_list_process_29.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_list_process_30.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_more_popup_press.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_option_panel_handle_bg_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_option_panel_handle_bg_ef_press.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_panel_handle_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_panel_handle_bg_ef_press.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_panel_list_bg_ef_press.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_picker_button_dim_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_picker_button_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_picker_button_press_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_bg.#.png create mode 100755 res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_bg_ef.#.png create mode 100755 res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_bottom_bg.#.png create mode 100755 res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_bottom_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_bubble_02_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_bubble_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_bubble_tail_bottom.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_bubble_tail_bottom_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_bubble_tail_left.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_bubble_tail_left_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_bubble_tail_right.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_bubble_tail_right_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_bubble_tail_top.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_bubble_tail_top_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_button_dim_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_button_normal_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_button_press_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_scroll.#.png create mode 100755 res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_title_bg.#.png create mode 100755 res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_title_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_progress_bar_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_progress_ef_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_scroll_bar_h.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_scroll_bar_h_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_scroll_bar_handler_h.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_scroll_bar_handler_v.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_scroll_bar_v.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_scroll_bar_v_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_search_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_search_edit_field_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_search_icon_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_slider_handle_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_slider_handle_ef_dim.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_slider_handle_ef_press.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_softkey_left_bg_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_softkey_left_bg_ef_press.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_softkey_left_text_bg_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_softkey_left_text_bg_ef_press.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_softkey_right_bg_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_softkey_right_bg_ef_press.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_softkey_right_text_bg_ef.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_softkey_right_text_bg_ef_press.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_split_handler_bg_ef_h.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_split_handler_bg_ef_v.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_split_handler_h.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_split_handler_v.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_sub_title_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_tab_press_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_title_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_title_press_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_toolbar_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_toolbar_bg_shadow.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_toolbar_button.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_toolbar_button_bg_dim_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_toolbar_button_bg_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_toolbar_button_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_toolbar_button_ef_press.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_toolbar_button_press.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_toolbar_button_press_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/00_toolbar_press_ef.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/pd_btn_bg.#.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/pd_btn_bg_arrow_down.png create mode 100644 res/common/usr/share/osp/bitmaps/720x1280/white/pd_btn_bg_arrow_up.png create mode 100644 res/common/usr/share/osp/effects/gallery_page_curling.eff create mode 100644 src/CMakeLists.txt create mode 100644 src/app/FAppUiApp.cpp create mode 100644 src/app/FApp_AppFrame.cpp create mode 100644 src/app/FApp_AppResourceBitmap.cpp create mode 100644 src/app/FApp_AppResourceBitmap.h create mode 100644 src/app/FApp_AppResourceBitmapUtil.cpp create mode 100644 src/app/FApp_AppResourceBitmapUtil.h create mode 100644 src/app/FApp_CoordinateInfo.cpp create mode 100644 src/app/FApp_ThemeInfo.cpp create mode 100644 src/app/FApp_UiAppImpl.cpp create mode 100644 src/app/inc/FApp_AppFrame.h create mode 100644 src/app/inc/FApp_CoordinateInfo.h create mode 100644 src/app/inc/FApp_ThemeInfo.h create mode 100644 src/app/inc/FApp_UiAppImpl.h create mode 100644 src/graphics/CMakeLists.txt create mode 100644 src/graphics/FGrpBitmap.cpp create mode 100644 src/graphics/FGrpBufferInfo.cpp create mode 100644 src/graphics/FGrpCanvas.cpp create mode 100644 src/graphics/FGrpColor.cpp create mode 100644 src/graphics/FGrpCoordinateSystem.cpp create mode 100644 src/graphics/FGrpDimension.cpp create mode 100644 src/graphics/FGrpEnrichedText.cpp create mode 100644 src/graphics/FGrpFloatDimension.cpp create mode 100644 src/graphics/FGrpFloatMatrix4.cpp create mode 100644 src/graphics/FGrpFloatPoint.cpp create mode 100644 src/graphics/FGrpFloatPoint3.cpp create mode 100644 src/graphics/FGrpFloatRectangle.cpp create mode 100644 src/graphics/FGrpFloatVector4.cpp create mode 100644 src/graphics/FGrpFont.cpp create mode 100644 src/graphics/FGrpPoint.cpp create mode 100644 src/graphics/FGrpRectangle.cpp create mode 100644 src/graphics/FGrpTextElement.cpp create mode 100644 src/graphics/FGrp_Bitmap.cpp create mode 100644 src/graphics/FGrp_Bitmap.h create mode 100644 src/graphics/FGrp_BitmapCoordHolder.h create mode 100644 src/graphics/FGrp_BitmapImpl.cpp create mode 100644 src/graphics/FGrp_BitmapScreenCapture.cpp create mode 100644 src/graphics/FGrp_BitmapTool.cpp create mode 100644 src/graphics/FGrp_BitmapUtil.cpp create mode 100644 src/graphics/FGrp_BitmapUtil.h create mode 100644 src/graphics/FGrp_BufferInfoImpl.cpp create mode 100644 src/graphics/FGrp_Callback.cpp create mode 100644 src/graphics/FGrp_Callback.h create mode 100644 src/graphics/FGrp_Canvas.cpp create mode 100644 src/graphics/FGrp_Canvas.h create mode 100644 src/graphics/FGrp_CanvasCairo.cpp create mode 100644 src/graphics/FGrp_CanvasCairo.h create mode 100644 src/graphics/FGrp_CanvasCoordHolder.h create mode 100644 src/graphics/FGrp_CanvasGpArc.cpp create mode 100644 src/graphics/FGrp_CanvasGpEllipse.cpp create mode 100644 src/graphics/FGrp_CanvasGpFillPolygon.cpp create mode 100644 src/graphics/FGrp_CanvasGpLine.cpp create mode 100644 src/graphics/FGrp_CanvasGpPrimitive.h create mode 100644 src/graphics/FGrp_CanvasGpRoundRect.cpp create mode 100644 src/graphics/FGrp_CanvasGpTriangle.cpp create mode 100644 src/graphics/FGrp_CanvasImpl.cpp create mode 100644 src/graphics/FGrp_CanvasImplPrivate.h create mode 100644 src/graphics/FGrp_CanvasPixman.cpp create mode 100644 src/graphics/FGrp_CanvasPixman.h create mode 100644 src/graphics/FGrp_CanvasRasterOp.cpp create mode 100644 src/graphics/FGrp_CanvasRasterOp.h create mode 100644 src/graphics/FGrp_CanvasShow.cpp create mode 100644 src/graphics/FGrp_CanvasTool.cpp create mode 100644 src/graphics/FGrp_CoordinateSystem.cpp create mode 100644 src/graphics/FGrp_CoordinateSystemDeviceSpec.cpp create mode 100644 src/graphics/FGrp_CoordinateSystemImpl.cpp create mode 100644 src/graphics/FGrp_CoordinateSystemImpl.h create mode 100644 src/graphics/FGrp_CoordinateSystemUtils.cpp create mode 100644 src/graphics/FGrp_EnrichedTextImpl.cpp create mode 100644 src/graphics/FGrp_Farm.cpp create mode 100644 src/graphics/FGrp_Farm.h create mode 100644 src/graphics/FGrp_Font.cpp create mode 100644 src/graphics/FGrp_Font.h create mode 100644 src/graphics/FGrp_FontBidiUtil.cpp create mode 100644 src/graphics/FGrp_FontBidiUtil.h create mode 100644 src/graphics/FGrp_FontCache.cpp create mode 100644 src/graphics/FGrp_FontCache.h create mode 100644 src/graphics/FGrp_FontFromImage.cpp create mode 100644 src/graphics/FGrp_FontFromImage.h create mode 100644 src/graphics/FGrp_FontFt2.cpp create mode 100644 src/graphics/FGrp_FontFt2.h create mode 100644 src/graphics/FGrp_FontImpl.cpp create mode 100644 src/graphics/FGrp_FontMemoryManager.cpp create mode 100644 src/graphics/FGrp_FontMemoryManager.h create mode 100644 src/graphics/FGrp_FontPrivate.cpp create mode 100644 src/graphics/FGrp_FontPrivate.h create mode 100644 src/graphics/FGrp_FontRsrcManager.cpp create mode 100644 src/graphics/FGrp_FontRsrcManager.h create mode 100644 src/graphics/FGrp_FontUtil.h create mode 100644 src/graphics/FGrp_IFont.h create mode 100644 src/graphics/FGrp_NonScale.cpp create mode 100644 src/graphics/FGrp_ResUtil.h create mode 100644 src/graphics/FGrp_Screen.cpp create mode 100644 src/graphics/FGrp_TextElementImpl.cpp create mode 100644 src/graphics/effect/FGrp_Effect.h create mode 100644 src/graphics/effect/FGrp_EffectAlpha.cpp create mode 100644 src/graphics/effect/FGrp_EffectFlip.cpp create mode 100644 src/graphics/effect/FGrp_EffectFunc.h create mode 100644 src/graphics/effect/FGrp_EffectManip.cpp create mode 100644 src/graphics/effect/FGrp_EffectRotate.cpp create mode 100644 src/graphics/effect/FGrp_EffectScale.cpp create mode 100644 src/graphics/effect/FGrp_EffectScale2.cpp create mode 100644 src/graphics/inc/FGrp_BitmapImpl.h create mode 100644 src/graphics/inc/FGrp_BitmapTool.h create mode 100644 src/graphics/inc/FGrp_BufferInfoImpl.h create mode 100644 src/graphics/inc/FGrp_CanvasImpl.h create mode 100644 src/graphics/inc/FGrp_CanvasTextureImpl.h create mode 100644 src/graphics/inc/FGrp_CanvasTool.h create mode 100644 src/graphics/inc/FGrp_CoordinateSystem.h create mode 100644 src/graphics/inc/FGrp_CoordinateSystemUtils.h create mode 100644 src/graphics/inc/FGrp_EnrichedTextImpl.h create mode 100644 src/graphics/inc/FGrp_FontImpl.h create mode 100644 src/graphics/inc/FGrp_GlPlayerImpl.h create mode 100644 src/graphics/inc/FGrp_NonScale.h create mode 100644 src/graphics/inc/FGrp_Screen.h create mode 100644 src/graphics/inc/FGrp_TextCommon.h create mode 100644 src/graphics/inc/FGrp_TextElementImpl.h create mode 100644 src/graphics/inc/FGrp_TextTextCutLink.h create mode 100644 src/graphics/inc/FGrp_TextTextElement.h create mode 100644 src/graphics/inc/FGrp_TextTextImage.h create mode 100644 src/graphics/inc/FGrp_TextTextObject.h create mode 100644 src/graphics/inc/FGrp_TextTextSimple.h create mode 100644 src/graphics/inc/FGrp_VideoTextureImpl.h create mode 100644 src/graphics/opengl/CMakeLists.txt create mode 100644 src/graphics/opengl/FGrpCanvasTexture.cpp create mode 100644 src/graphics/opengl/FGrpEgl.cpp create mode 100644 src/graphics/opengl/FGrpGlPlayer.cpp create mode 100644 src/graphics/opengl/FGrpGles1.cpp create mode 100644 src/graphics/opengl/FGrpGles2.cpp create mode 100644 src/graphics/opengl/FGrpVideoTexture.cpp create mode 100644 src/graphics/opengl/FGrp_CanvasTexture.cpp create mode 100644 src/graphics/opengl/FGrp_CanvasTexture.h create mode 100644 src/graphics/opengl/FGrp_CanvasTextureImpl.cpp create mode 100644 src/graphics/opengl/FGrp_GlPlayerImpl.cpp create mode 100644 src/graphics/opengl/FGrp_VideoTexture.cpp create mode 100644 src/graphics/opengl/FGrp_VideoTexture.h create mode 100644 src/graphics/opengl/FGrp_VideoTextureImpl.cpp create mode 100644 src/graphics/text/FGrp_TextTextColumn.cpp create mode 100644 src/graphics/text/FGrp_TextTextColumn.h create mode 100644 src/graphics/text/FGrp_TextTextComposite.cpp create mode 100644 src/graphics/text/FGrp_TextTextComposite.h create mode 100644 src/graphics/text/FGrp_TextTextCutLink.cpp create mode 100644 src/graphics/text/FGrp_TextTextCutLinkListInfo.cpp create mode 100644 src/graphics/text/FGrp_TextTextCutLinkListInfo.h create mode 100644 src/graphics/text/FGrp_TextTextCutLinkParser.cpp create mode 100644 src/graphics/text/FGrp_TextTextCutLinkParser.h create mode 100644 src/graphics/text/FGrp_TextTextElement.cpp create mode 100644 src/graphics/text/FGrp_TextTextImage.cpp create mode 100644 src/graphics/text/FGrp_TextTextLine.cpp create mode 100644 src/graphics/text/FGrp_TextTextLine.h create mode 100644 src/graphics/text/FGrp_TextTextObject.cpp create mode 100644 src/graphics/text/FGrp_TextTextSimple.cpp create mode 100644 src/graphics/text/FGrp_TextTextSimpleList.cpp create mode 100644 src/graphics/text/FGrp_TextTextSimpleList.h create mode 100644 src/graphics/text/FGrp_TextTextUtility.cpp create mode 100644 src/graphics/text/FGrp_TextTextUtility.h create mode 100644 src/graphics/util/FGrp_Util.cpp create mode 100644 src/graphics/util/FGrp_Util.h create mode 100644 src/graphics/util/FGrp_UtilPixmap.cpp create mode 100644 src/graphics/util/FGrp_UtilPixmap.h create mode 100644 src/graphics/util/FGrp_UtilScratchpad.cpp create mode 100644 src/graphics/util/FGrp_UtilScratchpad.h create mode 100644 src/graphics/util/FGrp_UtilTemplate.h create mode 100644 src/graphics/util/FGrp_UtilType.h create mode 100644 src/ui/CMakeLists.txt create mode 100644 src/ui/FUiAccessibilityContainer.cpp create mode 100644 src/ui/FUiAccessibilityElement.cpp create mode 100644 src/ui/FUiCardLayout.cpp create mode 100644 src/ui/FUiClipboard.cpp create mode 100644 src/ui/FUiClipboardItem.cpp create mode 100644 src/ui/FUiContainer.cpp create mode 100644 src/ui/FUiControl.cpp create mode 100644 src/ui/FUiCustomControlBase.cpp create mode 100644 src/ui/FUiDataBindingContext.cpp create mode 100644 src/ui/FUiFocusManager.cpp create mode 100644 src/ui/FUiGridLayout.cpp create mode 100644 src/ui/FUiHorizontalBoxLayout.cpp create mode 100644 src/ui/FUiInputConnection.cpp create mode 100644 src/ui/FUiKeyEventInfo.cpp create mode 100644 src/ui/FUiKeyEventManager.cpp create mode 100644 src/ui/FUiKeyboardMap.cpp create mode 100644 src/ui/FUiLayout.cpp create mode 100644 src/ui/FUiRelativeLayout.cpp create mode 100644 src/ui/FUiSystemUtil.cpp create mode 100644 src/ui/FUiTouch.cpp create mode 100644 src/ui/FUiTouchEffect.cpp create mode 100644 src/ui/FUiTouchEventInfo.cpp create mode 100644 src/ui/FUiTouchEventManager.cpp create mode 100644 src/ui/FUiTouchFlickGestureDetector.cpp create mode 100644 src/ui/FUiTouchGestureDetector.cpp create mode 100644 src/ui/FUiTouchLongPressGestureDetector.cpp create mode 100644 src/ui/FUiTouchPanningGestureDetector.cpp create mode 100644 src/ui/FUiTouchPinchGestureDetector.cpp create mode 100644 src/ui/FUiTouchRotationGestureDetector.cpp create mode 100644 src/ui/FUiTouchTapGestureDetector.cpp create mode 100644 src/ui/FUiUiConfiguration.cpp create mode 100644 src/ui/FUiVariant.cpp create mode 100644 src/ui/FUiVerticalBoxLayout.cpp create mode 100644 src/ui/FUiWindow.cpp create mode 100644 src/ui/FUi_AccessibilityContainer.cpp create mode 100644 src/ui/FUi_AccessibilityContainerImpl.cpp create mode 100644 src/ui/FUi_AccessibilityElement.cpp create mode 100644 src/ui/FUi_AccessibilityElementImpl.cpp create mode 100644 src/ui/FUi_AccessibilityGesture.cpp create mode 100644 src/ui/FUi_AccessibilityManager.cpp create mode 100644 src/ui/FUi_AccessibilitySystemSettingLoader.cpp create mode 100644 src/ui/FUi_AccessibilityTtsPlayer.cpp create mode 100644 src/ui/FUi_BidiUtils.cpp create mode 100644 src/ui/FUi_CardLayoutImpl.cpp create mode 100644 src/ui/FUi_CardLayoutImpl.h create mode 100644 src/ui/FUi_Clipboard.cpp create mode 100644 src/ui/FUi_Clipboard.h create mode 100644 src/ui/FUi_ClipboardImpl.cpp create mode 100644 src/ui/FUi_ClipboardImpl.h create mode 100644 src/ui/FUi_ClipboardItem.cpp create mode 100644 src/ui/FUi_ClipboardItem.h create mode 100644 src/ui/FUi_ClipboardItemImpl.cpp create mode 100644 src/ui/FUi_ClipboardItemImpl.h create mode 100644 src/ui/FUi_ClipboardPopupEvent.cpp create mode 100644 src/ui/FUi_ContainerImpl.cpp create mode 100644 src/ui/FUi_Control.cpp create mode 100644 src/ui/FUi_ControlImpl.cpp create mode 100644 src/ui/FUi_ControlImplManager.cpp create mode 100644 src/ui/FUi_ControlManager.cpp create mode 100644 src/ui/FUi_CustomControlBaseImpl.cpp create mode 100644 src/ui/FUi_DataBinding.cpp create mode 100644 src/ui/FUi_DataBinding.h create mode 100644 src/ui/FUi_DataBindingContext.cpp create mode 100644 src/ui/FUi_DataBindingContext.h create mode 100644 src/ui/FUi_DataBindingContextImpl.cpp create mode 100644 src/ui/FUi_DataBindingContextImpl.h create mode 100644 src/ui/FUi_DimmingLayer.cpp create mode 100644 src/ui/FUi_DimmingManager.cpp create mode 100644 src/ui/FUi_DragAndDropEvent.cpp create mode 100644 src/ui/FUi_DragAndDropItem.cpp create mode 100644 src/ui/FUi_DragDropEvent.cpp create mode 100644 src/ui/FUi_DragDropEventArg.cpp create mode 100644 src/ui/FUi_EcoreEvas.cpp create mode 100644 src/ui/FUi_EcoreEvasMgr.cpp create mode 100644 src/ui/FUi_EflUiEventManager.cpp create mode 100644 src/ui/FUi_EflUiEventManager.h create mode 100644 src/ui/FUi_EflWindow.cpp create mode 100644 src/ui/FUi_EflWindow.h create mode 100644 src/ui/FUi_ErrorMessages.cpp create mode 100644 src/ui/FUi_FingerInfo.cpp create mode 100644 src/ui/FUi_FocusManagerImpl.cpp create mode 100644 src/ui/FUi_GridLayoutImpl.cpp create mode 100644 src/ui/FUi_GridLayoutImpl.h create mode 100644 src/ui/FUi_HorizontalBoxLayoutImpl.cpp create mode 100644 src/ui/FUi_HorizontalBoxLayoutImpl.h create mode 100644 src/ui/FUi_ImeOrientationAgent.cpp create mode 100644 src/ui/FUi_ImeOrientationAgent.h create mode 100644 src/ui/FUi_InputConnectionImpl.cpp create mode 100644 src/ui/FUi_InputConnectionImpl.h create mode 100644 src/ui/FUi_InputConnectionUtils.cpp create mode 100644 src/ui/FUi_InputConnectionUtils.h create mode 100644 src/ui/FUi_KeyEventInfoImpl.cpp create mode 100644 src/ui/FUi_KeyEventManager.cpp create mode 100644 src/ui/FUi_KeyEventManagerImpl.cpp create mode 100644 src/ui/FUi_LayoutImpl.cpp create mode 100644 src/ui/FUi_LayoutImpl.h create mode 100644 src/ui/FUi_Matrix3Df.cpp create mode 100644 src/ui/FUi_ModalLoopManager.cpp create mode 100644 src/ui/FUi_NativeObjectHandler.cpp create mode 100644 src/ui/FUi_NativeObjectHandler.h create mode 100644 src/ui/FUi_OrientationAgent.cpp create mode 100644 src/ui/FUi_OrientationAgent.h create mode 100644 src/ui/FUi_PropertyBase.cpp create mode 100644 src/ui/FUi_PropertyUtils.cpp create mode 100644 src/ui/FUi_PublicOrientationEvent.cpp create mode 100644 src/ui/FUi_RelativeLayoutImpl.cpp create mode 100644 src/ui/FUi_RelativeLayoutImpl.h create mode 100644 src/ui/FUi_ResourceManager.cpp create mode 100644 src/ui/FUi_SystemUtilImpl.cpp create mode 100644 src/ui/FUi_TouchEffectImpl.cpp create mode 100644 src/ui/FUi_TouchEventArg.cpp create mode 100644 src/ui/FUi_TouchEventInfoImpl.cpp create mode 100644 src/ui/FUi_TouchEventManagerImpl.cpp create mode 100644 src/ui/FUi_TouchFlickGestureDetector.cpp create mode 100644 src/ui/FUi_TouchFlickGestureDetectorImpl.cpp create mode 100644 src/ui/FUi_TouchGestureDetector.cpp create mode 100644 src/ui/FUi_TouchGestureDetectorImpl.cpp create mode 100644 src/ui/FUi_TouchGestureTimerManager.cpp create mode 100644 src/ui/FUi_TouchGestureTimerManager.h create mode 100644 src/ui/FUi_TouchLongPressGestureDetector.cpp create mode 100644 src/ui/FUi_TouchLongPressGestureDetectorImpl.cpp create mode 100644 src/ui/FUi_TouchManager.cpp create mode 100644 src/ui/FUi_TouchPanningGestureDetector.cpp create mode 100644 src/ui/FUi_TouchPanningGestureDetectorImpl.cpp create mode 100644 src/ui/FUi_TouchPinchGestureDetector.cpp create mode 100644 src/ui/FUi_TouchPinchGestureDetectorImpl.cpp create mode 100644 src/ui/FUi_TouchRotationGestureDetector.cpp create mode 100644 src/ui/FUi_TouchRotationGestureDetectorImpl.cpp create mode 100644 src/ui/FUi_TouchTapGestureDetector.cpp create mode 100644 src/ui/FUi_TouchTapGestureDetectorImpl.cpp create mode 100644 src/ui/FUi_UiBuilder.cpp create mode 100644 src/ui/FUi_UiBuilderControl.cpp create mode 100644 src/ui/FUi_UiBuilderControlElement.cpp create mode 100644 src/ui/FUi_UiBuilderControlItem.cpp create mode 100644 src/ui/FUi_UiBuilderControlLayout.cpp create mode 100644 src/ui/FUi_UiBuilderControlMaker.cpp create mode 100644 src/ui/FUi_UiBuilderControlTable.cpp create mode 100644 src/ui/FUi_UiBuilderXmlHandler.cpp create mode 100644 src/ui/FUi_UiEvent.cpp create mode 100644 src/ui/FUi_UiEventManager.cpp create mode 100644 src/ui/FUi_UiFocusEvent.cpp create mode 100644 src/ui/FUi_UiKeyEvent.cpp create mode 100644 src/ui/FUi_UiManagerIpcMessages.cpp create mode 100644 src/ui/FUi_UiManagerProxy.cpp create mode 100644 src/ui/FUi_UiManagerProxy.h create mode 100644 src/ui/FUi_UiNotificationEvent.cpp create mode 100644 src/ui/FUi_UiTouchEvent.cpp create mode 100644 src/ui/FUi_VariantImpl.cpp create mode 100644 src/ui/FUi_VerticalBoxLayoutImpl.cpp create mode 100644 src/ui/FUi_VerticalBoxLayoutImpl.h create mode 100644 src/ui/FUi_Window.cpp create mode 100644 src/ui/FUi_WindowImpl.cpp create mode 100644 src/ui/animations/FUiAnimAnimationBase.cpp create mode 100644 src/ui/animations/FUiAnimAnimationGroup.cpp create mode 100644 src/ui/animations/FUiAnimAnimationTransaction.cpp create mode 100644 src/ui/animations/FUiAnimBezierTimingFunction.cpp create mode 100644 src/ui/animations/FUiAnimControlAnimator.cpp create mode 100644 src/ui/animations/FUiAnimDimensionAnimation.cpp create mode 100644 src/ui/animations/FUiAnimDiscreteTimingFunction.cpp create mode 100644 src/ui/animations/FUiAnimDisplayContext.cpp create mode 100644 src/ui/animations/FUiAnimEaseElasticInTimingFunction.cpp create mode 100644 src/ui/animations/FUiAnimEaseElasticOutTimingFunction.cpp create mode 100644 src/ui/animations/FUiAnimEaseInOutTimingFunction.cpp create mode 100644 src/ui/animations/FUiAnimEaseInTimingFunction.cpp create mode 100644 src/ui/animations/FUiAnimEaseOutInTimingFunction.cpp create mode 100644 src/ui/animations/FUiAnimEaseOutTimingFunction.cpp create mode 100644 src/ui/animations/FUiAnimExpInTimingFunction.cpp create mode 100644 src/ui/animations/FUiAnimExpOutTimingFunction.cpp create mode 100644 src/ui/animations/FUiAnimFloatAnimation.cpp create mode 100644 src/ui/animations/FUiAnimFrameAnimator.cpp create mode 100644 src/ui/animations/FUiAnimIVisualElementAnimationStatusEventListener.cpp create mode 100644 src/ui/animations/FUiAnimIVisualElementAnimationTickEventListener.cpp create mode 100644 src/ui/animations/FUiAnimIVisualElementAnimationTimingFunction.cpp create mode 100644 src/ui/animations/FUiAnimIVisualElementAnimationValueInterpolator.cpp create mode 100644 src/ui/animations/FUiAnimIntegerAnimation.cpp create mode 100644 src/ui/animations/FUiAnimLinearTimingFunction.cpp create mode 100644 src/ui/animations/FUiAnimParallelAnimationGroup.cpp create mode 100644 src/ui/animations/FUiAnimPointAnimation.cpp create mode 100644 src/ui/animations/FUiAnimRectangleAnimation.cpp create mode 100644 src/ui/animations/FUiAnimRotateAnimation.cpp create mode 100644 src/ui/animations/FUiAnimSequentialAnimationGroup.cpp create mode 100644 src/ui/animations/FUiAnimVisualElement.cpp create mode 100644 src/ui/animations/FUiAnimVisualElementAnimation.cpp create mode 100644 src/ui/animations/FUiAnimVisualElementAnimationGroup.cpp create mode 100644 src/ui/animations/FUiAnimVisualElementAnimationProvider.cpp create mode 100644 src/ui/animations/FUiAnimVisualElementContentProvider.cpp create mode 100644 src/ui/animations/FUiAnimVisualElementPropertyAnimation.cpp create mode 100644 src/ui/animations/FUiAnimVisualElementSurface.cpp create mode 100644 src/ui/animations/FUiAnimVisualElementValueAnimation.cpp create mode 100644 src/ui/animations/FUiAnim_AnimationBaseImpl.cpp create mode 100644 src/ui/animations/FUiAnim_AnimationBaseImpl.h create mode 100644 src/ui/animations/FUiAnim_AnimationGroupImpl.cpp create mode 100644 src/ui/animations/FUiAnim_AnimationGroupImpl.h create mode 100644 src/ui/animations/FUiAnim_AnimationGroupNode.cpp create mode 100644 src/ui/animations/FUiAnim_AnimationGroupNode.h create mode 100644 src/ui/animations/FUiAnim_AnimationManager.cpp create mode 100644 src/ui/animations/FUiAnim_AnimationManager.h create mode 100644 src/ui/animations/FUiAnim_ControlAnimatorImpl.cpp create mode 100644 src/ui/animations/FUiAnim_ControlAnimatorImpl.h create mode 100644 src/ui/animations/FUiAnim_ControlVisualElement.cpp create mode 100644 src/ui/animations/FUiAnim_ControlVisualElement.h create mode 100644 src/ui/animations/FUiAnim_Debug.cpp create mode 100644 src/ui/animations/FUiAnim_Debug.h create mode 100644 src/ui/animations/FUiAnim_DimensionAnimationImpl.cpp create mode 100644 src/ui/animations/FUiAnim_DimensionAnimationImpl.h create mode 100644 src/ui/animations/FUiAnim_DisplayContextImpl.cpp create mode 100644 src/ui/animations/FUiAnim_DisplayManager.cpp create mode 100644 src/ui/animations/FUiAnim_EflLayer.cpp create mode 100644 src/ui/animations/FUiAnim_EflLayerConfiguration.cpp create mode 100644 src/ui/animations/FUiAnim_EflNode.cpp create mode 100644 src/ui/animations/FUiAnim_EflVisualElementSurfaceImpl.cpp create mode 100644 src/ui/animations/FUiAnim_EflVisualElementSurfaceImpl.h create mode 100644 src/ui/animations/FUiAnim_FloatAnimationImpl.cpp create mode 100644 src/ui/animations/FUiAnim_FloatAnimationImpl.h create mode 100644 src/ui/animations/FUiAnim_FrameAnimatorImpl.cpp create mode 100644 src/ui/animations/FUiAnim_FrameAnimatorImpl.h create mode 100644 src/ui/animations/FUiAnim_INativeNode.cpp create mode 100644 src/ui/animations/FUiAnim_IntegerAnimationImpl.cpp create mode 100644 src/ui/animations/FUiAnim_IntegerAnimationImpl.h create mode 100644 src/ui/animations/FUiAnim_MatrixUtil.cpp create mode 100644 src/ui/animations/FUiAnim_MatrixUtil.h create mode 100644 src/ui/animations/FUiAnim_NativeLayer.cpp create mode 100644 src/ui/animations/FUiAnim_PointAnimationImpl.cpp create mode 100644 src/ui/animations/FUiAnim_PointAnimationImpl.h create mode 100644 src/ui/animations/FUiAnim_RectangleAnimationImpl.cpp create mode 100644 src/ui/animations/FUiAnim_RectangleAnimationImpl.h create mode 100644 src/ui/animations/FUiAnim_RootVisualElement.cpp create mode 100644 src/ui/animations/FUiAnim_RotateAnimationImpl.cpp create mode 100644 src/ui/animations/FUiAnim_RotateAnimationImpl.h create mode 100644 src/ui/animations/FUiAnim_TimingFunction.h create mode 100644 src/ui/animations/FUiAnim_TransactionNode.cpp create mode 100644 src/ui/animations/FUiAnim_TransactionNode.h create mode 100644 src/ui/animations/FUiAnim_TransformMatrix3Df.cpp create mode 100644 src/ui/animations/FUiAnim_VariantEx.cpp create mode 100644 src/ui/animations/FUiAnim_VariantEx.h create mode 100644 src/ui/animations/FUiAnim_VisualElement.cpp create mode 100644 src/ui/animations/FUiAnim_VisualElementAnimationGroupImpl.cpp create mode 100644 src/ui/animations/FUiAnim_VisualElementAnimationGroupImpl.h create mode 100644 src/ui/animations/FUiAnim_VisualElementAnimationImpl.cpp create mode 100644 src/ui/animations/FUiAnim_VisualElementAnimationImpl.h create mode 100644 src/ui/animations/FUiAnim_VisualElementAnimationKeyFrame.cpp create mode 100644 src/ui/animations/FUiAnim_VisualElementAnimationKeyFrame.h create mode 100644 src/ui/animations/FUiAnim_VisualElementAnimationTiming.cpp create mode 100644 src/ui/animations/FUiAnim_VisualElementAnimationTiming.h create mode 100644 src/ui/animations/FUiAnim_VisualElementAnimationVariantInterpolator.cpp create mode 100644 src/ui/animations/FUiAnim_VisualElementAnimationVariantInterpolator.h create mode 100644 src/ui/animations/FUiAnim_VisualElementCanvas.cpp create mode 100644 src/ui/animations/FUiAnim_VisualElementCoordinateSystem.cpp create mode 100644 src/ui/animations/FUiAnim_VisualElementEnvironment.cpp create mode 100644 src/ui/animations/FUiAnim_VisualElementEnvironment.h create mode 100644 src/ui/animations/FUiAnim_VisualElementImpl.cpp create mode 100644 src/ui/animations/FUiAnim_VisualElementPropertyAnimationImpl.cpp create mode 100644 src/ui/animations/FUiAnim_VisualElementPropertyAnimationImpl.h create mode 100644 src/ui/animations/FUiAnim_VisualElementSharedData.cpp create mode 100644 src/ui/animations/FUiAnim_VisualElementSurfaceImpl.cpp create mode 100644 src/ui/animations/FUiAnim_VisualElementValueAnimationImpl.cpp create mode 100644 src/ui/animations/FUiAnim_VisualElementValueAnimationImpl.h create mode 100644 src/ui/controls/FUiCtrlAnimation.cpp create mode 100644 src/ui/controls/FUiCtrlAnimationFrame.cpp create mode 100644 src/ui/controls/FUiCtrlButton.cpp create mode 100644 src/ui/controls/FUiCtrlButtonItem.cpp create mode 100644 src/ui/controls/FUiCtrlCheckButton.cpp create mode 100644 src/ui/controls/FUiCtrlColorPicker.cpp create mode 100644 src/ui/controls/FUiCtrlContextMenu.cpp create mode 100644 src/ui/controls/FUiCtrlCustomItem.cpp create mode 100644 src/ui/controls/FUiCtrlCustomList.cpp create mode 100644 src/ui/controls/FUiCtrlCustomListItem.cpp create mode 100644 src/ui/controls/FUiCtrlCustomListItemFormat.cpp create mode 100644 src/ui/controls/FUiCtrlDatePicker.cpp create mode 100644 src/ui/controls/FUiCtrlDateTimePicker.cpp create mode 100644 src/ui/controls/FUiCtrlEditArea.cpp create mode 100644 src/ui/controls/FUiCtrlEditDate.cpp create mode 100644 src/ui/controls/FUiCtrlEditField.cpp create mode 100644 src/ui/controls/FUiCtrlEditTime.cpp create mode 100644 src/ui/controls/FUiCtrlExpandableEditArea.cpp create mode 100644 src/ui/controls/FUiCtrlExpandableList.cpp create mode 100644 src/ui/controls/FUiCtrlFooter.cpp create mode 100644 src/ui/controls/FUiCtrlFooterItem.cpp create mode 100644 src/ui/controls/FUiCtrlForm.cpp create mode 100644 src/ui/controls/FUiCtrlFrame.cpp create mode 100644 src/ui/controls/FUiCtrlGallery.cpp create mode 100644 src/ui/controls/FUiCtrlGalleryItem.cpp create mode 100644 src/ui/controls/FUiCtrlGroupContainer.cpp create mode 100644 src/ui/controls/FUiCtrlGroupItem.cpp create mode 100644 src/ui/controls/FUiCtrlGroupedList.cpp create mode 100644 src/ui/controls/FUiCtrlGroupedListView.cpp create mode 100644 src/ui/controls/FUiCtrlGroupedTableView.cpp create mode 100644 src/ui/controls/FUiCtrlHeader.cpp create mode 100644 src/ui/controls/FUiCtrlHeaderItem.cpp create mode 100644 src/ui/controls/FUiCtrlIGroupedListViewItemEventListener.cpp create mode 100644 src/ui/controls/FUiCtrlIGroupedListViewItemProvider.cpp create mode 100644 src/ui/controls/FUiCtrlIGroupedListViewItemProviderF.cpp create mode 100644 src/ui/controls/FUiCtrlIListViewItemEventListener.cpp create mode 100644 src/ui/controls/FUiCtrlIconList.cpp create mode 100644 src/ui/controls/FUiCtrlIconListView.cpp create mode 100644 src/ui/controls/FUiCtrlIconListViewItem.cpp create mode 100644 src/ui/controls/FUiCtrlKeypad.cpp create mode 100644 src/ui/controls/FUiCtrlLabel.cpp create mode 100644 src/ui/controls/FUiCtrlList.cpp create mode 100644 src/ui/controls/FUiCtrlListContextItem.cpp create mode 100644 src/ui/controls/FUiCtrlListItemBase.cpp create mode 100644 src/ui/controls/FUiCtrlListView.cpp create mode 100644 src/ui/controls/FUiCtrlMessageBox.cpp create mode 100644 src/ui/controls/FUiCtrlOptionMenu.cpp create mode 100644 src/ui/controls/FUiCtrlOverlayPanel.cpp create mode 100644 src/ui/controls/FUiCtrlOverlayRegion.cpp create mode 100644 src/ui/controls/FUiCtrlPanel.cpp create mode 100644 src/ui/controls/FUiCtrlPopup.cpp create mode 100644 src/ui/controls/FUiCtrlProgress.cpp create mode 100644 src/ui/controls/FUiCtrlProgressPopup.cpp create mode 100644 src/ui/controls/FUiCtrlRadioGroup.cpp create mode 100644 src/ui/controls/FUiCtrlScrollPanel.cpp create mode 100644 src/ui/controls/FUiCtrlSearchBar.cpp create mode 100644 src/ui/controls/FUiCtrlSectionTableView.cpp create mode 100644 src/ui/controls/FUiCtrlSimpleItem.cpp create mode 100644 src/ui/controls/FUiCtrlSlidableGroupedList.cpp create mode 100644 src/ui/controls/FUiCtrlSlidableList.cpp create mode 100644 src/ui/controls/FUiCtrlSlider.cpp create mode 100644 src/ui/controls/FUiCtrlSplitPanel.cpp create mode 100644 src/ui/controls/FUiCtrlTab.cpp create mode 100644 src/ui/controls/FUiCtrlTabBar.cpp create mode 100644 src/ui/controls/FUiCtrlTabBarItem.cpp create mode 100644 src/ui/controls/FUiCtrlTableView.cpp create mode 100644 src/ui/controls/FUiCtrlTableViewContextItem.cpp create mode 100644 src/ui/controls/FUiCtrlTableViewGroupItem.cpp create mode 100644 src/ui/controls/FUiCtrlTableViewItem.cpp create mode 100644 src/ui/controls/FUiCtrlTableViewItemBase.cpp create mode 100644 src/ui/controls/FUiCtrlTableViewSimpleGroupItem.cpp create mode 100644 src/ui/controls/FUiCtrlTableViewSimpleItem.cpp create mode 100644 src/ui/controls/FUiCtrlTextBox.cpp create mode 100644 src/ui/controls/FUiCtrlTimePicker.cpp create mode 100644 src/ui/controls/FUiCtrl_ActionEvent.cpp create mode 100644 src/ui/controls/FUiCtrl_AdjustmentEvent.cpp create mode 100644 src/ui/controls/FUiCtrl_Animation.cpp create mode 100644 src/ui/controls/FUiCtrl_AnimationEvent.cpp create mode 100644 src/ui/controls/FUiCtrl_AnimationFrameImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_AnimationImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_AnimationModel.cpp create mode 100644 src/ui/controls/FUiCtrl_AnimationPresenter.cpp create mode 100644 src/ui/controls/FUiCtrl_Button.cpp create mode 100644 src/ui/controls/FUiCtrl_ButtonImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_ButtonItemImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_ButtonModel.cpp create mode 100644 src/ui/controls/FUiCtrl_ButtonPresenter.cpp create mode 100644 src/ui/controls/FUiCtrl_CheckButton.cpp create mode 100644 src/ui/controls/FUiCtrl_CheckButtonImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_CheckButtonModel.cpp create mode 100644 src/ui/controls/FUiCtrl_CheckButtonPresenter.cpp create mode 100644 src/ui/controls/FUiCtrl_ColorChangeEvent.cpp create mode 100644 src/ui/controls/FUiCtrl_ColorPicker.cpp create mode 100644 src/ui/controls/FUiCtrl_ColorPickerImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_ColorPickerModel.cpp create mode 100644 src/ui/controls/FUiCtrl_ColorPickerPresenter.cpp create mode 100644 src/ui/controls/FUiCtrl_ContextMenu.cpp create mode 100644 src/ui/controls/FUiCtrl_ContextMenuGridPresenter.cpp create mode 100644 src/ui/controls/FUiCtrl_ContextMenuImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_ContextMenuItem.cpp create mode 100644 src/ui/controls/FUiCtrl_ContextMenuListPresenter.cpp create mode 100644 src/ui/controls/FUiCtrl_ContextMenuModel.cpp create mode 100644 src/ui/controls/FUiCtrl_CustomElement.cpp create mode 100644 src/ui/controls/FUiCtrl_CustomItemImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_CustomListElements.cpp create mode 100644 src/ui/controls/FUiCtrl_CustomListImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_CustomListItemFormatImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_CustomListItemImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_DatePickerImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_DateTimeBar.cpp create mode 100644 src/ui/controls/FUiCtrl_DateTimeBarItem.cpp create mode 100644 src/ui/controls/FUiCtrl_DateTimeBarModel.cpp create mode 100644 src/ui/controls/FUiCtrl_DateTimeBarPresenter.cpp create mode 100644 src/ui/controls/FUiCtrl_DateTimeChangeEvent.cpp create mode 100644 src/ui/controls/FUiCtrl_DateTimeDisplayBox.cpp create mode 100644 src/ui/controls/FUiCtrl_DateTimeModel.cpp create mode 100644 src/ui/controls/FUiCtrl_DateTimePicker.cpp create mode 100644 src/ui/controls/FUiCtrl_DateTimePickerImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_DateTimePresenter.cpp create mode 100644 src/ui/controls/FUiCtrl_DateTimeUtils.cpp create mode 100644 src/ui/controls/FUiCtrl_Edit.cpp create mode 100644 src/ui/controls/FUiCtrl_EditAreaImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_EditCopyPasteEvent.cpp create mode 100644 src/ui/controls/FUiCtrl_EditCopyPasteManager.cpp create mode 100644 src/ui/controls/FUiCtrl_EditDate.cpp create mode 100644 src/ui/controls/FUiCtrl_EditDateImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_EditDatePresenter.cpp create mode 100644 src/ui/controls/FUiCtrl_EditFieldImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_EditModel.cpp create mode 100644 src/ui/controls/FUiCtrl_EditPresenter.cpp create mode 100644 src/ui/controls/FUiCtrl_EditTime.cpp create mode 100644 src/ui/controls/FUiCtrl_EditTimeImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_EditTimePresenter.cpp create mode 100644 src/ui/controls/FUiCtrl_ExpandableEditAreaEvent.cpp create mode 100644 src/ui/controls/FUiCtrl_ExpandableEditAreaImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_ExpandableListImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_FastScroll.cpp create mode 100644 src/ui/controls/FUiCtrl_FastScrollEvent.cpp create mode 100644 src/ui/controls/FUiCtrl_FastScrollEventArg.cpp create mode 100644 src/ui/controls/FUiCtrl_FastScrollIndex.cpp create mode 100644 src/ui/controls/FUiCtrl_FastScrollIndexNode.cpp create mode 100644 src/ui/controls/FUiCtrl_FastScrollModel.cpp create mode 100644 src/ui/controls/FUiCtrl_FastScrollPresenter.cpp create mode 100644 src/ui/controls/FUiCtrl_FlickAnimation.cpp create mode 100644 src/ui/controls/FUiCtrl_FooterImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_FooterItemImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_Form.cpp create mode 100644 src/ui/controls/FUiCtrl_FormImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_FormModel.cpp create mode 100644 src/ui/controls/FUiCtrl_FormPresenter.cpp create mode 100644 src/ui/controls/FUiCtrl_Frame.cpp create mode 100644 src/ui/controls/FUiCtrl_FrameEvent.cpp create mode 100644 src/ui/controls/FUiCtrl_FrameImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_FrameModel.cpp create mode 100644 src/ui/controls/FUiCtrl_FramePresenter.cpp create mode 100644 src/ui/controls/FUiCtrl_Gallery.cpp create mode 100644 src/ui/controls/FUiCtrl_GalleryBitmap.cpp create mode 100644 src/ui/controls/FUiCtrl_GalleryCanvas.cpp create mode 100644 src/ui/controls/FUiCtrl_GalleryCanvasManager.cpp create mode 100644 src/ui/controls/FUiCtrl_GalleryCoreEvent.cpp create mode 100644 src/ui/controls/FUiCtrl_GalleryCoreEventArg.cpp create mode 100644 src/ui/controls/FUiCtrl_GalleryCoreEventListener.cpp create mode 100644 src/ui/controls/FUiCtrl_GalleryImageReader.cpp create mode 100644 src/ui/controls/FUiCtrl_GalleryImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_GalleryImplEvent.cpp create mode 100644 src/ui/controls/FUiCtrl_GalleryImplEventArg.cpp create mode 100644 src/ui/controls/FUiCtrl_GalleryItem.cpp create mode 100644 src/ui/controls/FUiCtrl_GalleryItemImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_GalleryItemProvider.cpp create mode 100644 src/ui/controls/FUiCtrl_GalleryItemProviderAdaptor.cpp create mode 100644 src/ui/controls/FUiCtrl_GalleryItemProviderAdaptorImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_GalleryModel.cpp create mode 100644 src/ui/controls/FUiCtrl_GalleryPresenter.cpp create mode 100644 src/ui/controls/FUiCtrl_GalleryRenderer.cpp create mode 100644 src/ui/controls/FUiCtrl_GalleryRendererNotifier.cpp create mode 100644 src/ui/controls/FUiCtrl_GalleryViewEvent.cpp create mode 100644 src/ui/controls/FUiCtrl_GalleryViewEventHandler.cpp create mode 100644 src/ui/controls/FUiCtrl_GalleryViewEventInfo.cpp create mode 100644 src/ui/controls/FUiCtrl_GroupContainer.cpp create mode 100644 src/ui/controls/FUiCtrl_GroupContainerImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_GroupContainerPresenter.cpp create mode 100644 src/ui/controls/FUiCtrl_GroupItemImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_GroupedListImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_GroupedListViewImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_GroupedListViewItemProviderAdaptor.cpp create mode 100644 src/ui/controls/FUiCtrl_HeaderImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_HeaderItemImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_IconListData.cpp create mode 100644 src/ui/controls/FUiCtrl_IconListImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_IconListItem.cpp create mode 100644 src/ui/controls/FUiCtrl_IconListItemDrawingProperty.cpp create mode 100644 src/ui/controls/FUiCtrl_IconListItemProvider.cpp create mode 100644 src/ui/controls/FUiCtrl_IconListItemProviderAdaptor.cpp create mode 100644 src/ui/controls/FUiCtrl_IconListPresenter.cpp create mode 100644 src/ui/controls/FUiCtrl_IconListUtils.cpp create mode 100644 src/ui/controls/FUiCtrl_IconListView.cpp create mode 100644 src/ui/controls/FUiCtrl_IconListViewImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_IconListViewItemEvent.cpp create mode 100644 src/ui/controls/FUiCtrl_IconListViewItemEventArg.cpp create mode 100644 src/ui/controls/FUiCtrl_IconListViewItemImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_Indicator.cpp create mode 100644 src/ui/controls/FUiCtrl_IndicatorManager.cpp create mode 100644 src/ui/controls/FUiCtrl_InputPad.cpp create mode 100644 src/ui/controls/FUiCtrl_InputPadPresenter.cpp create mode 100644 src/ui/controls/FUiCtrl_Keypad.cpp create mode 100644 src/ui/controls/FUiCtrl_KeypadEvent.cpp create mode 100644 src/ui/controls/FUiCtrl_KeypadImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_Label.cpp create mode 100644 src/ui/controls/FUiCtrl_LabelImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_LabelModel.cpp create mode 100644 src/ui/controls/FUiCtrl_LabelPresenter.cpp create mode 100644 src/ui/controls/FUiCtrl_LanguageEvent.cpp create mode 100644 src/ui/controls/FUiCtrl_LinkEvent.cpp create mode 100644 src/ui/controls/FUiCtrl_ListBaseImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_ListContextItemImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_ListImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_ListItemBaseImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_ListItemCommon.cpp create mode 100644 src/ui/controls/FUiCtrl_ListItemEvent.cpp create mode 100644 src/ui/controls/FUiCtrl_ListItemEventArg.cpp create mode 100644 src/ui/controls/FUiCtrl_ListViewContextItem.cpp create mode 100644 src/ui/controls/FUiCtrl_ListViewImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_ListViewItem.cpp create mode 100644 src/ui/controls/FUiCtrl_ListViewItemProviderAdaptor.cpp create mode 100644 src/ui/controls/FUiCtrl_ListViewModel.cpp create mode 100644 src/ui/controls/FUiCtrl_MessageBox.cpp create mode 100644 src/ui/controls/FUiCtrl_MessageBoxImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_MessageBoxPresenter.cpp create mode 100644 src/ui/controls/FUiCtrl_OptionMenu.cpp create mode 100644 src/ui/controls/FUiCtrl_OptionMenuImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_OptionMenuItem.cpp create mode 100644 src/ui/controls/FUiCtrl_OptionMenuModel.cpp create mode 100644 src/ui/controls/FUiCtrl_OptionMenuPresenter.cpp create mode 100644 src/ui/controls/FUiCtrl_OverlayAgent.cpp create mode 100644 src/ui/controls/FUiCtrl_OverlayPanel.cpp create mode 100644 src/ui/controls/FUiCtrl_OverlayPanelImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_OverlayRegionImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_Panel.cpp create mode 100644 src/ui/controls/FUiCtrl_PanelImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_PanelPresenter.cpp create mode 100644 src/ui/controls/FUiCtrl_Popup.cpp create mode 100644 src/ui/controls/FUiCtrl_PopupImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_PopupPresenter.cpp create mode 100644 src/ui/controls/FUiCtrl_Progress.cpp create mode 100644 src/ui/controls/FUiCtrl_ProgressImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_ProgressModel.cpp create mode 100644 src/ui/controls/FUiCtrl_ProgressPopup.cpp create mode 100644 src/ui/controls/FUiCtrl_ProgressPopupEvent.cpp create mode 100644 src/ui/controls/FUiCtrl_ProgressPopupImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_ProgressPopupPresenter.cpp create mode 100644 src/ui/controls/FUiCtrl_ProgressPresenter.cpp create mode 100644 src/ui/controls/FUiCtrl_PublicActionEvent.cpp create mode 100644 src/ui/controls/FUiCtrl_PublicAdjustmentEvent.cpp create mode 100644 src/ui/controls/FUiCtrl_PublicAnimationEvent.cpp create mode 100644 src/ui/controls/FUiCtrl_PublicClipboardPopupEvent.cpp create mode 100644 src/ui/controls/FUiCtrl_PublicColorChangeEvent.cpp create mode 100644 src/ui/controls/FUiCtrl_PublicDateTimeChangeEvent.cpp create mode 100644 src/ui/controls/FUiCtrl_PublicExpandableEditAreaEvent.cpp create mode 100644 src/ui/controls/FUiCtrl_PublicFrameEvent.cpp create mode 100644 src/ui/controls/FUiCtrl_PublicKeypadEvent.cpp create mode 100644 src/ui/controls/FUiCtrl_PublicLanguageEvent.cpp create mode 100644 src/ui/controls/FUiCtrl_PublicLinkEvent.cpp create mode 100644 src/ui/controls/FUiCtrl_PublicProgressPopupEvent.cpp create mode 100644 src/ui/controls/FUiCtrl_PublicScrollPanelEvent.cpp create mode 100644 src/ui/controls/FUiCtrl_PublicSearchBarEvent.cpp create mode 100644 src/ui/controls/FUiCtrl_PublicSliderEvent.cpp create mode 100644 src/ui/controls/FUiCtrl_PublicSplitPanelEvent.cpp create mode 100644 src/ui/controls/FUiCtrl_PublicTextBlockEvent.cpp create mode 100644 src/ui/controls/FUiCtrl_PublicTextEvent.cpp create mode 100644 src/ui/controls/FUiCtrl_RadioGroup.cpp create mode 100644 src/ui/controls/FUiCtrl_RadioGroupImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_RadioGroupModel.cpp create mode 100644 src/ui/controls/FUiCtrl_RadioGroupPresenter.cpp create mode 100644 src/ui/controls/FUiCtrl_Scroll.cpp create mode 100644 src/ui/controls/FUiCtrl_ScrollEvent.cpp create mode 100644 src/ui/controls/FUiCtrl_ScrollEventArg.cpp create mode 100644 src/ui/controls/FUiCtrl_ScrollPanel.cpp create mode 100644 src/ui/controls/FUiCtrl_ScrollPanelEvent.cpp create mode 100644 src/ui/controls/FUiCtrl_ScrollPanelImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_ScrollPanelModel.cpp create mode 100644 src/ui/controls/FUiCtrl_ScrollPanelPresenter.cpp create mode 100644 src/ui/controls/FUiCtrl_ScrollPresenter.cpp create mode 100644 src/ui/controls/FUiCtrl_SearchBar.cpp create mode 100644 src/ui/controls/FUiCtrl_SearchBarEvent.cpp create mode 100644 src/ui/controls/FUiCtrl_SearchBarImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_SearchBarModel.cpp create mode 100644 src/ui/controls/FUiCtrl_SearchBarPresenter.cpp create mode 100644 src/ui/controls/FUiCtrl_SimpleItemImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_SlidableGroupedListImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_SlidableListImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_Slider.cpp create mode 100644 src/ui/controls/FUiCtrl_SliderEvent.cpp create mode 100644 src/ui/controls/FUiCtrl_SliderImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_SliderModel.cpp create mode 100644 src/ui/controls/FUiCtrl_SliderOverlay.cpp create mode 100644 src/ui/controls/FUiCtrl_SliderPresenter.cpp create mode 100644 src/ui/controls/FUiCtrl_SplitPanel.cpp create mode 100644 src/ui/controls/FUiCtrl_SplitPanelEvent.cpp create mode 100644 src/ui/controls/FUiCtrl_SplitPanelImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_SplitPanelModel.cpp create mode 100644 src/ui/controls/FUiCtrl_SplitPanelPresenter.cpp create mode 100644 src/ui/controls/FUiCtrl_Tab.cpp create mode 100644 src/ui/controls/FUiCtrl_TabBar.cpp create mode 100644 src/ui/controls/FUiCtrl_TabBarImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_TabBarItem.cpp create mode 100644 src/ui/controls/FUiCtrl_TabBarItemImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_TabBarModel.cpp create mode 100644 src/ui/controls/FUiCtrl_TabBarPresenter.cpp create mode 100644 src/ui/controls/FUiCtrl_TabImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_TabItem.cpp create mode 100644 src/ui/controls/FUiCtrl_TabModel.cpp create mode 100644 src/ui/controls/FUiCtrl_TabPresenter.cpp create mode 100644 src/ui/controls/FUiCtrl_TableView.cpp create mode 100644 src/ui/controls/FUiCtrl_TableViewImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_TableViewItem.cpp create mode 100644 src/ui/controls/FUiCtrl_TableViewItemEvent.cpp create mode 100644 src/ui/controls/FUiCtrl_TableViewItemEventArg.cpp create mode 100644 src/ui/controls/FUiCtrl_TableViewItemImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_TableViewItemProvider.cpp create mode 100644 src/ui/controls/FUiCtrl_TableViewItemProviderAdaptor.cpp create mode 100644 src/ui/controls/FUiCtrl_TableViewPresenter.cpp create mode 100644 src/ui/controls/FUiCtrl_TextBlockEvent.cpp create mode 100644 src/ui/controls/FUiCtrl_TextBoxImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_TextEvent.cpp create mode 100644 src/ui/controls/FUiCtrl_TimePickerImpl.cpp create mode 100644 src/ui/controls/FUiCtrl_TokenEdit.cpp create mode 100644 src/ui/controls/FUiCtrl_TokenEditModel.cpp create mode 100644 src/ui/controls/FUiCtrl_TokenEditPresenter.cpp create mode 100644 src/ui/controls/FUiCtrl_Toolbar.cpp create mode 100644 src/ui/controls/FUiCtrl_ToolbarModel.cpp create mode 100644 src/ui/controls/FUiCtrl_ToolbarPresenter.cpp create mode 100644 src/ui/controls/FUiCtrl_UiFastScrollEvent.cpp create mode 100644 src/ui/controls/FUiCtrl_UiFastScrollEventArg.cpp create mode 100644 src/ui/controls/FUiCtrl_UiIconListItemEvent.cpp create mode 100644 src/ui/controls/FUiCtrl_UiListViewItemEvent.cpp create mode 100644 src/ui/controls/FUiCtrl_UiListViewItemEventArg.cpp create mode 100644 src/ui/controls/FUiCtrl_UiScrollEvent.cpp create mode 100644 src/ui/controls/FUiCtrl_UiScrollEventArg.cpp create mode 100644 src/ui/controls/FUiCtrl_UiTableViewItemEvent.cpp create mode 100644 src/ui/controls/font.png create mode 100644 src/ui/effects/FUiEffectsEffect.cpp create mode 100644 src/ui/effects/FUiEffectsEffectManager.cpp create mode 100644 src/ui/effects/FUiEffectsEffectTouchInfo.cpp create mode 100644 src/ui/effects/FUiEffectsEffectTouchInfo.h create mode 100644 src/ui/effects/FUiEffects_EffectErrorMessages.cpp create mode 100644 src/ui/effects/FUiEffects_EffectErrorMessages.h create mode 100644 src/ui/effects/FUiEffects_EffectImpl.cpp create mode 100644 src/ui/effects/FUiEffects_EffectImpl.h create mode 100644 src/ui/effects/FUiEffects_EffectManagerImpl.cpp create mode 100644 src/ui/effects/FUiEffects_EffectManagerImpl.h create mode 100644 src/ui/effects/FUiEffects_EffectTimer.h create mode 100644 src/ui/effects/inc/FUiEffects_LoggingProfiler.h create mode 100644 src/ui/effects/inc/FUiEffects_Parser.h create mode 100644 src/ui/effects/inc/FUiEffects_ParserEffectParser.h create mode 100644 src/ui/effects/inc/FUiEffects_ParserXMLParser.h create mode 100644 src/ui/effects/inc/FUiEffects_Pe.h create mode 100644 src/ui/effects/inc/FUiEffects_PeElementSurface.h create mode 100644 src/ui/effects/inc/FUiEffects_PePointSurface.h create mode 100644 src/ui/effects/inc/FUiEffects_PePointSurfaceNURBS.h create mode 100644 src/ui/effects/inc/FUiEffects_PeRodSurface.h create mode 100644 src/ui/effects/inc/FUiEffects_PeRodSurfaceNURBS.h create mode 100644 src/ui/effects/inc/FUiEffects_PeSpringSurface.h create mode 100644 src/ui/effects/inc/FUiEffects_Renderer.h create mode 100644 src/ui/effects/inc/FUiEffects_RendererDirectionalLight.h create mode 100644 src/ui/effects/inc/FUiEffects_RendererEffectRenderer.h create mode 100644 src/ui/effects/inc/FUiEffects_RendererEffectShader.h create mode 100644 src/ui/effects/inc/FUiEffects_RendererLightingParameters.h create mode 100644 src/ui/effects/inc/FUiEffects_RendererLog.h create mode 100644 src/ui/effects/inc/FUiEffects_RendererMemoryTexture2DProperty.h create mode 100644 src/ui/effects/inc/FUiEffects_RendererPointLight.h create mode 100644 src/ui/effects/inc/FUiEffects_RendererRendererGeometry.h create mode 100644 src/ui/effects/inc/FUiEffects_RendererRendererObject.h create mode 100644 src/ui/effects/inc/FUiEffects_RendererSpotLight.h create mode 100644 src/ui/effects/inc/FUiEffects_RendererViewport.h create mode 100644 src/ui/effects/inc/FUiEffects_Runtime.h create mode 100644 src/ui/effects/inc/FUiEffects_RuntimeDirectionalLight.h create mode 100644 src/ui/effects/inc/FUiEffects_RuntimeEffectModel.h create mode 100644 src/ui/effects/inc/FUiEffects_RuntimeEffectModelScript.h create mode 100644 src/ui/effects/inc/FUiEffects_RuntimeGraphicalSurface.h create mode 100644 src/ui/effects/inc/FUiEffects_RuntimeGraphicalSurfaceNurbs.h create mode 100644 src/ui/effects/inc/FUiEffects_RuntimeIEffectModelListener.h create mode 100644 src/ui/effects/inc/FUiEffects_RuntimeIEffectModelManager.h create mode 100644 src/ui/effects/inc/FUiEffects_RuntimeIEffectModelScript.h create mode 100644 src/ui/effects/inc/FUiEffects_RuntimeIScriptProcessing.h create mode 100644 src/ui/effects/inc/FUiEffects_RuntimeLuaProcessing.h create mode 100644 src/ui/effects/inc/FUiEffects_RuntimeModel.h create mode 100644 src/ui/effects/inc/FUiEffects_RuntimeModelSurface.h create mode 100644 src/ui/effects/inc/FUiEffects_RuntimePointLight.h create mode 100644 src/ui/effects/inc/FUiEffects_RuntimePropertyCast.h create mode 100644 src/ui/effects/inc/FUiEffects_RuntimeRenderDataScene.h create mode 100644 src/ui/effects/inc/FUiEffects_RuntimeRenderDataSurface.h create mode 100644 src/ui/effects/inc/FUiEffects_RuntimeScriptProcessing.h create mode 100644 src/ui/effects/inc/FUiEffects_RuntimeSpotLight.h create mode 100644 src/ui/effects/inc/FUiEffects_RuntimeUnitLight.h create mode 100644 src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelAabb.h create mode 100644 src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelAlphaBlendProperty.h create mode 100644 src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelAttribute.h create mode 100644 src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelBuffer.h create mode 100644 src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelBufferVisitor.h create mode 100644 src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelCache.h create mode 100644 src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelCamera.h create mode 100644 src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelDrawable.h create mode 100644 src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelExternalRenderInterface.h create mode 100644 src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelFloatArrayProperty.h create mode 100644 src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelFloatProperty.h create mode 100644 src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelFloatPropertyHolder.h create mode 100644 src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelForwardDeclaration.h create mode 100644 src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelFrustum.h create mode 100644 src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelGeometry.h create mode 100644 src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelGroup.h create mode 100644 src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelIntProperty.h create mode 100644 src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelIntPropertyHolder.h create mode 100644 src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelMaterial.h create mode 100644 src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelMatrix4fProperty.h create mode 100644 src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelMatrix4fPropertyHolder.h create mode 100644 src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelNode.h create mode 100644 src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelProgramProperty.h create mode 100644 src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelProperty.h create mode 100644 src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelPropertyHolderMaterial.h create mode 100644 src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelPropertyVisitor.h create mode 100644 src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelRenderTarget.h create mode 100644 src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelRenderTargetExternalRender.h create mode 100644 src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelRenderTargetVisitor.h create mode 100644 src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelShaderHolderProgramProperty.h create mode 100644 src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelShaderProperty.h create mode 100644 src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelStringShaderProperty.h create mode 100644 src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelStubAttachment.h create mode 100644 src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelTexture2DAttachmentProperty.h create mode 100644 src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelTexture2DProperty.h create mode 100644 src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelTextureAttachment.h create mode 100644 src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelTextureProperty.h create mode 100644 src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelTypedArrayProperty.h create mode 100644 src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelTypedArrayPropertyHolder.h create mode 100644 src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelVector2fProperty.h create mode 100644 src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelVector2fPropertyHolder.h create mode 100644 src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelVector3fProperty.h create mode 100644 src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelVector3fPropertyHolder.h create mode 100644 src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelVector4fProperty.h create mode 100644 src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelVector4fPropertyHolder.h create mode 100644 src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelVisitor.h create mode 100644 src/ui/effects/inc/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineOpenGLImplementation.h create mode 100644 src/ui/effects/inc/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRender.h create mode 100644 src/ui/effects/inc/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderBufferCache.h create mode 100644 src/ui/effects/inc/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderCache.h create mode 100644 src/ui/effects/inc/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderCommand.h create mode 100644 src/ui/effects/inc/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderDrawableCache.h create mode 100644 src/ui/effects/inc/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderRenderTargetCache.h create mode 100644 src/ui/effects/inc/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderShaderCache.h create mode 100644 src/ui/effects/inc/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderStateCache.h create mode 100644 src/ui/effects/inc/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderTextureCache.h create mode 100644 src/ui/effects/inc/renderer/math/FUiEffects_RendererMathAdapterFunctions.h create mode 100644 src/ui/effects/inc/renderer/math/FUiEffects_RendererMathCommon.h create mode 100644 src/ui/effects/inc/renderer/math/FUiEffects_RendererMathMatrix.h create mode 100644 src/ui/effects/inc/renderer/math/FUiEffects_RendererMathMatrix1Traits.h create mode 100644 src/ui/effects/inc/renderer/math/FUiEffects_RendererMathMatrix2Traits.h create mode 100644 src/ui/effects/inc/renderer/math/FUiEffects_RendererMathMatrix3Traits.h create mode 100644 src/ui/effects/inc/renderer/math/FUiEffects_RendererMathMatrixTraits.h create mode 100644 src/ui/effects/inc/renderer/math/FUiEffects_RendererMathMatrixTraitsBase.h create mode 100644 src/ui/effects/inc/renderer/math/FUiEffects_RendererMathVector.h create mode 100644 src/ui/effects/inc/renderer/math/FUiEffects_RendererMathVector1Traits.h create mode 100644 src/ui/effects/inc/renderer/math/FUiEffects_RendererMathVector2Traits.h create mode 100644 src/ui/effects/inc/renderer/math/FUiEffects_RendererMathVector3Traits.h create mode 100644 src/ui/effects/inc/renderer/math/FUiEffects_RendererMathVectorTraits.h create mode 100644 src/ui/effects/inc/renderer/math/FUiEffects_RendererMathVectorTraitsBase.h create mode 100644 src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemConstnessPolicy.h create mode 100644 src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemData.h create mode 100644 src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemDataType.h create mode 100644 src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemException.h create mode 100644 src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemNonCopyable.h create mode 100644 src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemPlatformDefine.h create mode 100644 src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemSelectType.h create mode 100644 src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemSmartPtr.h create mode 100644 src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemSmartPtrAssertCheckPolicy.h create mode 100644 src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemSmartPtrDefaultStoragePolicy.h create mode 100644 src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemSmartPtrNoCheckPolicy.h create mode 100644 src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemSmartPtrRefCountedMTPolicy.h create mode 100644 src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemSmartPtrRefCounter.h create mode 100644 src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemSmartPtrRefCounterHandlerAtomic.h create mode 100644 src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemStaticAssert.h create mode 100644 src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemTypeNull.h create mode 100644 src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemTypeTraits.h create mode 100644 src/ui/effects/inc/utils/FUiEffects_Utils.h create mode 100644 src/ui/effects/inc/utils/FUiEffects_UtilsAdapterFunctions.h create mode 100644 src/ui/effects/inc/utils/FUiEffects_UtilsCommon.h create mode 100644 src/ui/effects/inc/utils/FUiEffects_UtilsLuaMat4.h create mode 100644 src/ui/effects/inc/utils/FUiEffects_UtilsMatrix2.h create mode 100644 src/ui/effects/inc/utils/FUiEffects_UtilsMatrix3.h create mode 100644 src/ui/effects/inc/utils/FUiEffects_UtilsMatrix4.h create mode 100644 src/ui/effects/inc/utils/FUiEffects_UtilsVector2.h create mode 100644 src/ui/effects/inc/utils/FUiEffects_UtilsVector3.h create mode 100644 src/ui/effects/inc/utils/FUiEffects_UtilsVector4.h create mode 100644 src/ui/effects/parser/FUiEffects_ParserEffectParser.cpp create mode 100644 src/ui/effects/parser/FUiEffects_ParserXMLParser.cpp create mode 100644 src/ui/effects/physics-engine/FUiEffects_PeElementSurface.cpp create mode 100644 src/ui/effects/physics-engine/FUiEffects_PePointSurface.cpp create mode 100644 src/ui/effects/physics-engine/FUiEffects_PePointSurfaceNURBS.cpp create mode 100644 src/ui/effects/physics-engine/FUiEffects_PeRodSurface.cpp create mode 100644 src/ui/effects/physics-engine/FUiEffects_PeRodSurfaceNURBS.cpp create mode 100644 src/ui/effects/physics-engine/FUiEffects_PeSpringSurface.cpp create mode 100644 src/ui/effects/renderer/FUiEffects_RendererEffectRenderer.cpp create mode 100644 src/ui/effects/renderer/FUiEffects_RendererEffectShader.cpp create mode 100644 src/ui/effects/renderer/FUiEffects_RendererLog.cpp create mode 100644 src/ui/effects/renderer/FUiEffects_RendererMemoryTexture2DProperty.cpp create mode 100644 src/ui/effects/renderer/FUiEffects_RendererRendererGeometry.cpp create mode 100644 src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelAlphaBlendProperty.cpp create mode 100644 src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelBuffer.cpp create mode 100644 src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelCache.cpp create mode 100644 src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelCamera.cpp create mode 100644 src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelDrawable.cpp create mode 100644 src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelFloatArrayProperty.cpp create mode 100644 src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelFloatPropertyHolder.cpp create mode 100644 src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelGeometry.cpp create mode 100644 src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelGroup.cpp create mode 100644 src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelMaterial.cpp create mode 100644 src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelMatrix4fPropertyHolder.cpp create mode 100644 src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelNode.cpp create mode 100644 src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelProperty.cpp create mode 100644 src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelPropertyHolderMaterial.cpp create mode 100644 src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelRenderTarget.cpp create mode 100644 src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelRenderTargetExternalRender.cpp create mode 100644 src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelShaderHolderProgramProperty.cpp create mode 100644 src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelStringShaderProperty.cpp create mode 100644 src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelStubAttachment.cpp create mode 100644 src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelTexture2DAttachmentProperty.cpp create mode 100644 src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelTexture2DProperty.cpp create mode 100644 src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelTextureAttachment.cpp create mode 100644 src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelTextureProperty.cpp create mode 100644 src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelVector2fPropertyHolder.cpp create mode 100644 src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelVector3fPropertyHolder.cpp create mode 100644 src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelVector4fPropertyHolder.cpp create mode 100644 src/ui/effects/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRender.cpp create mode 100644 src/ui/effects/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderBufferCache.cpp create mode 100644 src/ui/effects/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderCache.cpp create mode 100644 src/ui/effects/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderDrawableCache.cpp create mode 100644 src/ui/effects/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderRenderTargetCache.cpp create mode 100644 src/ui/effects/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderShaderCache.cpp create mode 100644 src/ui/effects/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderStateCache.cpp create mode 100644 src/ui/effects/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderTextureCache.cpp create mode 100644 src/ui/effects/renderer/system/FUiEffects_RendererSystemData.cpp create mode 100644 src/ui/effects/renderer/system/FUiEffects_RendererSystemException.cpp create mode 100644 src/ui/effects/renderer/system/FUiEffects_RendererSystemPlatformDefine.cpp create mode 100644 src/ui/effects/runtime/FUiEffects_RuntimeDirectionalLight.cpp create mode 100644 src/ui/effects/runtime/FUiEffects_RuntimeEffectModel.cpp create mode 100644 src/ui/effects/runtime/FUiEffects_RuntimeEffectModelScript.cpp create mode 100644 src/ui/effects/runtime/FUiEffects_RuntimeGraphicalSurface.cpp create mode 100644 src/ui/effects/runtime/FUiEffects_RuntimeGraphicalSurfaceNurbs.cpp create mode 100644 src/ui/effects/runtime/FUiEffects_RuntimeLuaProcessing.cpp create mode 100644 src/ui/effects/runtime/FUiEffects_RuntimeModelSurface.cpp create mode 100644 src/ui/effects/runtime/FUiEffects_RuntimePointLight.cpp create mode 100644 src/ui/effects/runtime/FUiEffects_RuntimeRenderDataScene.cpp create mode 100644 src/ui/effects/runtime/FUiEffects_RuntimeSpotLight.cpp create mode 100644 src/ui/effects/runtime/FUiEffects_RuntimeUnitLight.cpp create mode 100644 src/ui/effects/runtime/lua-cpp-binding/tolua.cpp create mode 100644 src/ui/effects/runtime/lua-cpp-binding/tolua.h create mode 100644 src/ui/inc/FUiAnim_DisplayContextImpl.h create mode 100644 src/ui/inc/FUiAnim_DisplayManager.h create mode 100644 src/ui/inc/FUiAnim_EflLayer.h create mode 100644 src/ui/inc/FUiAnim_EflLayerConfiguration.h create mode 100644 src/ui/inc/FUiAnim_EflNode.h create mode 100644 src/ui/inc/FUiAnim_INativeNode.h create mode 100644 src/ui/inc/FUiAnim_IVisualElementCaptureProvider.h create mode 100644 src/ui/inc/FUiAnim_NativeLayer.h create mode 100644 src/ui/inc/FUiAnim_RootVisualElement.h create mode 100644 src/ui/inc/FUiAnim_TransformMatrix3Df.h create mode 100644 src/ui/inc/FUiAnim_VisualElement.h create mode 100644 src/ui/inc/FUiAnim_VisualElementCanvas.h create mode 100644 src/ui/inc/FUiAnim_VisualElementCoordinateSystem.h create mode 100644 src/ui/inc/FUiAnim_VisualElementImpl.h create mode 100644 src/ui/inc/FUiAnim_VisualElementSharedData.h create mode 100644 src/ui/inc/FUiAnim_VisualElementSurfaceImpl.h create mode 100644 src/ui/inc/FUiCtrl_ActionEvent.h create mode 100644 src/ui/inc/FUiCtrl_AdjustmentEvent.h create mode 100644 src/ui/inc/FUiCtrl_Animation.h create mode 100644 src/ui/inc/FUiCtrl_AnimationEvent.h create mode 100644 src/ui/inc/FUiCtrl_AnimationFrameImpl.h create mode 100644 src/ui/inc/FUiCtrl_AnimationImpl.h create mode 100644 src/ui/inc/FUiCtrl_AnimationModel.h create mode 100644 src/ui/inc/FUiCtrl_AnimationPresenter.h create mode 100644 src/ui/inc/FUiCtrl_Button.h create mode 100644 src/ui/inc/FUiCtrl_ButtonImpl.h create mode 100644 src/ui/inc/FUiCtrl_ButtonItemImpl.h create mode 100644 src/ui/inc/FUiCtrl_ButtonModel.h create mode 100644 src/ui/inc/FUiCtrl_ButtonPresenter.h create mode 100644 src/ui/inc/FUiCtrl_CheckButton.h create mode 100644 src/ui/inc/FUiCtrl_CheckButtonImpl.h create mode 100644 src/ui/inc/FUiCtrl_CheckButtonModel.h create mode 100644 src/ui/inc/FUiCtrl_CheckButtonPresenter.h create mode 100644 src/ui/inc/FUiCtrl_ColorChangeEvent.h create mode 100644 src/ui/inc/FUiCtrl_ColorPicker.h create mode 100644 src/ui/inc/FUiCtrl_ColorPickerImpl.h create mode 100644 src/ui/inc/FUiCtrl_ColorPickerModel.h create mode 100644 src/ui/inc/FUiCtrl_ColorPickerPresenter.h create mode 100644 src/ui/inc/FUiCtrl_ContextMenu.h create mode 100644 src/ui/inc/FUiCtrl_ContextMenuGridPresenter.h create mode 100644 src/ui/inc/FUiCtrl_ContextMenuImpl.h create mode 100644 src/ui/inc/FUiCtrl_ContextMenuItem.h create mode 100644 src/ui/inc/FUiCtrl_ContextMenuListPresenter.h create mode 100644 src/ui/inc/FUiCtrl_ContextMenuModel.h create mode 100644 src/ui/inc/FUiCtrl_CustomElement.h create mode 100644 src/ui/inc/FUiCtrl_CustomItemImpl.h create mode 100644 src/ui/inc/FUiCtrl_CustomListElements.h create mode 100644 src/ui/inc/FUiCtrl_CustomListImpl.h create mode 100644 src/ui/inc/FUiCtrl_CustomListItemFormatImpl.h create mode 100644 src/ui/inc/FUiCtrl_CustomListItemImpl.h create mode 100644 src/ui/inc/FUiCtrl_DatePickerImpl.h create mode 100644 src/ui/inc/FUiCtrl_DateTimeBar.h create mode 100644 src/ui/inc/FUiCtrl_DateTimeBarItem.h create mode 100644 src/ui/inc/FUiCtrl_DateTimeBarModel.h create mode 100644 src/ui/inc/FUiCtrl_DateTimeBarPresenter.h create mode 100644 src/ui/inc/FUiCtrl_DateTimeChangeEvent.h create mode 100644 src/ui/inc/FUiCtrl_DateTimeDefine.h create mode 100644 src/ui/inc/FUiCtrl_DateTimeDisplayBox.h create mode 100644 src/ui/inc/FUiCtrl_DateTimeModel.h create mode 100644 src/ui/inc/FUiCtrl_DateTimePicker.h create mode 100644 src/ui/inc/FUiCtrl_DateTimePickerImpl.h create mode 100644 src/ui/inc/FUiCtrl_DateTimePresenter.h create mode 100644 src/ui/inc/FUiCtrl_DateTimeUtils.h create mode 100644 src/ui/inc/FUiCtrl_Edit.h create mode 100644 src/ui/inc/FUiCtrl_EditAreaImpl.h create mode 100644 src/ui/inc/FUiCtrl_EditCopyPasteEvent.h create mode 100644 src/ui/inc/FUiCtrl_EditCopyPasteManager.h create mode 100644 src/ui/inc/FUiCtrl_EditDate.h create mode 100644 src/ui/inc/FUiCtrl_EditDateImpl.h create mode 100644 src/ui/inc/FUiCtrl_EditDatePresenter.h create mode 100644 src/ui/inc/FUiCtrl_EditFieldImpl.h create mode 100644 src/ui/inc/FUiCtrl_EditModel.h create mode 100644 src/ui/inc/FUiCtrl_EditPresenter.h create mode 100644 src/ui/inc/FUiCtrl_EditTime.h create mode 100644 src/ui/inc/FUiCtrl_EditTimeImpl.h create mode 100644 src/ui/inc/FUiCtrl_EditTimePresenter.h create mode 100644 src/ui/inc/FUiCtrl_ExpandableEditAreaEvent.h create mode 100644 src/ui/inc/FUiCtrl_ExpandableEditAreaImpl.h create mode 100644 src/ui/inc/FUiCtrl_ExpandableListImpl.h create mode 100644 src/ui/inc/FUiCtrl_FastScroll.h create mode 100644 src/ui/inc/FUiCtrl_FastScrollEvent.h create mode 100644 src/ui/inc/FUiCtrl_FastScrollEventArg.h create mode 100644 src/ui/inc/FUiCtrl_FastScrollIndex.h create mode 100644 src/ui/inc/FUiCtrl_FastScrollIndexNode.h create mode 100644 src/ui/inc/FUiCtrl_FastScrollModel.h create mode 100644 src/ui/inc/FUiCtrl_FastScrollPresenter.h create mode 100644 src/ui/inc/FUiCtrl_FlickAnimation.h create mode 100644 src/ui/inc/FUiCtrl_FooterImpl.h create mode 100644 src/ui/inc/FUiCtrl_FooterItemImpl.h create mode 100644 src/ui/inc/FUiCtrl_Form.h create mode 100644 src/ui/inc/FUiCtrl_FormImpl.h create mode 100644 src/ui/inc/FUiCtrl_FormModel.h create mode 100644 src/ui/inc/FUiCtrl_FormPresenter.h create mode 100644 src/ui/inc/FUiCtrl_Frame.h create mode 100644 src/ui/inc/FUiCtrl_FrameEvent.h create mode 100644 src/ui/inc/FUiCtrl_FrameImpl.h create mode 100644 src/ui/inc/FUiCtrl_FrameModel.h create mode 100644 src/ui/inc/FUiCtrl_FramePresenter.h create mode 100644 src/ui/inc/FUiCtrl_Gallery.h create mode 100644 src/ui/inc/FUiCtrl_GalleryBitmap.h create mode 100644 src/ui/inc/FUiCtrl_GalleryCanvas.h create mode 100644 src/ui/inc/FUiCtrl_GalleryCanvasManager.h create mode 100644 src/ui/inc/FUiCtrl_GalleryCoreEvent.h create mode 100644 src/ui/inc/FUiCtrl_GalleryCoreEventArg.h create mode 100644 src/ui/inc/FUiCtrl_GalleryCoreEventListener.h create mode 100644 src/ui/inc/FUiCtrl_GalleryImageReader.h create mode 100644 src/ui/inc/FUiCtrl_GalleryImpl.h create mode 100644 src/ui/inc/FUiCtrl_GalleryImplEvent.h create mode 100644 src/ui/inc/FUiCtrl_GalleryImplEventArg.h create mode 100644 src/ui/inc/FUiCtrl_GalleryItem.h create mode 100644 src/ui/inc/FUiCtrl_GalleryItemImpl.h create mode 100644 src/ui/inc/FUiCtrl_GalleryItemProvider.h create mode 100644 src/ui/inc/FUiCtrl_GalleryItemProviderAdaptor.h create mode 100644 src/ui/inc/FUiCtrl_GalleryItemProviderAdaptorImpl.h create mode 100644 src/ui/inc/FUiCtrl_GalleryModel.h create mode 100644 src/ui/inc/FUiCtrl_GalleryPresenter.h create mode 100644 src/ui/inc/FUiCtrl_GalleryRenderer.h create mode 100644 src/ui/inc/FUiCtrl_GalleryRendererNotification.h create mode 100644 src/ui/inc/FUiCtrl_GalleryRendererNotifier.h create mode 100644 src/ui/inc/FUiCtrl_GalleryTypes.h create mode 100644 src/ui/inc/FUiCtrl_GalleryViewEvent.h create mode 100644 src/ui/inc/FUiCtrl_GalleryViewEventHandler.h create mode 100644 src/ui/inc/FUiCtrl_GalleryViewEventInfo.h create mode 100644 src/ui/inc/FUiCtrl_GroupContainer.h create mode 100644 src/ui/inc/FUiCtrl_GroupContainerImpl.h create mode 100644 src/ui/inc/FUiCtrl_GroupContainerPresenter.h create mode 100644 src/ui/inc/FUiCtrl_GroupItemImpl.h create mode 100644 src/ui/inc/FUiCtrl_GroupedListImpl.h create mode 100644 src/ui/inc/FUiCtrl_GroupedListViewImpl.h create mode 100644 src/ui/inc/FUiCtrl_GroupedListViewItemProviderAdaptor.h create mode 100644 src/ui/inc/FUiCtrl_HeaderImpl.h create mode 100644 src/ui/inc/FUiCtrl_HeaderItemImpl.h create mode 100644 src/ui/inc/FUiCtrl_IActionEventListener.h create mode 100644 src/ui/inc/FUiCtrl_IAdjustmentEventListener.h create mode 100644 src/ui/inc/FUiCtrl_IAnimationEventListener.h create mode 100644 src/ui/inc/FUiCtrl_IColorChangeEventListener.h create mode 100644 src/ui/inc/FUiCtrl_IContextMenuPresenter.h create mode 100644 src/ui/inc/FUiCtrl_ICustomElement.h create mode 100644 src/ui/inc/FUiCtrl_IDateTimeChangeEventListener.h create mode 100644 src/ui/inc/FUiCtrl_IEditCopyPasteEventListener.h create mode 100644 src/ui/inc/FUiCtrl_IEditTextFilter.h create mode 100644 src/ui/inc/FUiCtrl_IExpandableEditAreaEventListener.h create mode 100644 src/ui/inc/FUiCtrl_IFastScrollListener.h create mode 100644 src/ui/inc/FUiCtrl_IFormActivationChangeEventListener.h create mode 100644 src/ui/inc/FUiCtrl_IFormBackEventListener.h create mode 100644 src/ui/inc/FUiCtrl_IFormMenuEventListener.h create mode 100644 src/ui/inc/FUiCtrl_IFrameEventListener.h create mode 100644 src/ui/inc/FUiCtrl_IGalleryCoreEventListener.h create mode 100644 src/ui/inc/FUiCtrl_IGalleryItemProvider.h create mode 100644 src/ui/inc/FUiCtrl_IGalleryRenderer.h create mode 100644 src/ui/inc/FUiCtrl_IGalleryRendererNotiListener.h create mode 100644 src/ui/inc/FUiCtrl_IIconListItemEventListener.h create mode 100644 src/ui/inc/FUiCtrl_IInputPadEventListener.h create mode 100644 src/ui/inc/FUiCtrl_IKeypadEventListener.h create mode 100644 src/ui/inc/FUiCtrl_ILanguageEventListener.h create mode 100644 src/ui/inc/FUiCtrl_IListItemCommon.h create mode 100644 src/ui/inc/FUiCtrl_IListItemProviderAdaptor.h create mode 100644 src/ui/inc/FUiCtrl_IProgressPopupEventListener.h create mode 100644 src/ui/inc/FUiCtrl_IScrollEventListener.h create mode 100644 src/ui/inc/FUiCtrl_IScrollPanelEventListener.h create mode 100644 src/ui/inc/FUiCtrl_IScrollableContainer.h create mode 100644 src/ui/inc/FUiCtrl_ISearchBarEventListener.h create mode 100644 src/ui/inc/FUiCtrl_ISliderEventListener.h create mode 100644 src/ui/inc/FUiCtrl_ISplitPanelEventListener.h create mode 100644 src/ui/inc/FUiCtrl_ITableViewItemEventListener.h create mode 100644 src/ui/inc/FUiCtrl_ITextBlockEventListener.h create mode 100644 src/ui/inc/FUiCtrl_ITextEventListener.h create mode 100644 src/ui/inc/FUiCtrl_ITokenFilter.h create mode 100644 src/ui/inc/FUiCtrl_IUiLinkEventListener.h create mode 100644 src/ui/inc/FUiCtrl_IUiListViewItemEventListener.h create mode 100644 src/ui/inc/FUiCtrl_IconListData.h create mode 100644 src/ui/inc/FUiCtrl_IconListImpl.h create mode 100644 src/ui/inc/FUiCtrl_IconListItem.h create mode 100644 src/ui/inc/FUiCtrl_IconListItemDrawingProperty.h create mode 100644 src/ui/inc/FUiCtrl_IconListItemProvider.h create mode 100644 src/ui/inc/FUiCtrl_IconListItemProviderAdaptor.h create mode 100644 src/ui/inc/FUiCtrl_IconListPresenter.h create mode 100644 src/ui/inc/FUiCtrl_IconListUtils.h create mode 100644 src/ui/inc/FUiCtrl_IconListView.h create mode 100644 src/ui/inc/FUiCtrl_IconListViewImpl.h create mode 100644 src/ui/inc/FUiCtrl_IconListViewItemEvent.h create mode 100644 src/ui/inc/FUiCtrl_IconListViewItemEventArg.h create mode 100644 src/ui/inc/FUiCtrl_IconListViewItemImpl.h create mode 100644 src/ui/inc/FUiCtrl_Indicator.h create mode 100644 src/ui/inc/FUiCtrl_IndicatorManager.h create mode 100644 src/ui/inc/FUiCtrl_InputPad.h create mode 100644 src/ui/inc/FUiCtrl_InputPadPresenter.h create mode 100644 src/ui/inc/FUiCtrl_Keypad.h create mode 100644 src/ui/inc/FUiCtrl_KeypadEvent.h create mode 100644 src/ui/inc/FUiCtrl_KeypadImpl.h create mode 100644 src/ui/inc/FUiCtrl_Label.h create mode 100644 src/ui/inc/FUiCtrl_LabelImpl.h create mode 100644 src/ui/inc/FUiCtrl_LabelModel.h create mode 100644 src/ui/inc/FUiCtrl_LabelPresenter.h create mode 100644 src/ui/inc/FUiCtrl_LanguageEvent.h create mode 100644 src/ui/inc/FUiCtrl_LinkEvent.h create mode 100644 src/ui/inc/FUiCtrl_LinkedList.h create mode 100644 src/ui/inc/FUiCtrl_ListBaseImpl.h create mode 100644 src/ui/inc/FUiCtrl_ListContextItemImpl.h create mode 100644 src/ui/inc/FUiCtrl_ListImpl.h create mode 100644 src/ui/inc/FUiCtrl_ListItemBaseImpl.h create mode 100644 src/ui/inc/FUiCtrl_ListItemCommon.h create mode 100644 src/ui/inc/FUiCtrl_ListItemEvent.h create mode 100644 src/ui/inc/FUiCtrl_ListItemEventArg.h create mode 100644 src/ui/inc/FUiCtrl_ListListener.h create mode 100644 src/ui/inc/FUiCtrl_ListViewContextItem.h create mode 100644 src/ui/inc/FUiCtrl_ListViewImpl.h create mode 100644 src/ui/inc/FUiCtrl_ListViewItem.h create mode 100644 src/ui/inc/FUiCtrl_ListViewItemProviderAdaptor.h create mode 100644 src/ui/inc/FUiCtrl_ListViewModel.h create mode 100644 src/ui/inc/FUiCtrl_ListViewTypes.h create mode 100644 src/ui/inc/FUiCtrl_MessageBox.h create mode 100644 src/ui/inc/FUiCtrl_MessageBoxImpl.h create mode 100644 src/ui/inc/FUiCtrl_MessageBoxPresenter.h create mode 100644 src/ui/inc/FUiCtrl_OptionMenu.h create mode 100644 src/ui/inc/FUiCtrl_OptionMenuImpl.h create mode 100644 src/ui/inc/FUiCtrl_OptionMenuItem.h create mode 100644 src/ui/inc/FUiCtrl_OptionMenuModel.h create mode 100644 src/ui/inc/FUiCtrl_OptionMenuPresenter.h create mode 100644 src/ui/inc/FUiCtrl_OverlayAgent.h create mode 100644 src/ui/inc/FUiCtrl_OverlayPanel.h create mode 100644 src/ui/inc/FUiCtrl_OverlayPanelImpl.h create mode 100644 src/ui/inc/FUiCtrl_OverlayRegionImpl.h create mode 100644 src/ui/inc/FUiCtrl_Panel.h create mode 100644 src/ui/inc/FUiCtrl_PanelImpl.h create mode 100644 src/ui/inc/FUiCtrl_PanelPresenter.h create mode 100644 src/ui/inc/FUiCtrl_Popup.h create mode 100644 src/ui/inc/FUiCtrl_PopupImpl.h create mode 100644 src/ui/inc/FUiCtrl_PopupPresenter.h create mode 100644 src/ui/inc/FUiCtrl_Progress.h create mode 100644 src/ui/inc/FUiCtrl_ProgressImpl.h create mode 100644 src/ui/inc/FUiCtrl_ProgressModel.h create mode 100644 src/ui/inc/FUiCtrl_ProgressPopup.h create mode 100644 src/ui/inc/FUiCtrl_ProgressPopupEvent.h create mode 100644 src/ui/inc/FUiCtrl_ProgressPopupImpl.h create mode 100644 src/ui/inc/FUiCtrl_ProgressPopupPresenter.h create mode 100644 src/ui/inc/FUiCtrl_ProgressPresenter.h create mode 100644 src/ui/inc/FUiCtrl_PublicActionEvent.h create mode 100644 src/ui/inc/FUiCtrl_PublicAdjustmentEvent.h create mode 100644 src/ui/inc/FUiCtrl_PublicAnimationEvent.h create mode 100644 src/ui/inc/FUiCtrl_PublicClipboardPopupEvent.h create mode 100644 src/ui/inc/FUiCtrl_PublicColorChangeEvent.h create mode 100644 src/ui/inc/FUiCtrl_PublicDateTimeChangeEvent.h create mode 100644 src/ui/inc/FUiCtrl_PublicExpandableEditAreaEvent.h create mode 100644 src/ui/inc/FUiCtrl_PublicFrameEvent.h create mode 100644 src/ui/inc/FUiCtrl_PublicKeypadEvent.h create mode 100644 src/ui/inc/FUiCtrl_PublicLanguageEvent.h create mode 100644 src/ui/inc/FUiCtrl_PublicLinkEvent.h create mode 100644 src/ui/inc/FUiCtrl_PublicProgressPopupEvent.h create mode 100644 src/ui/inc/FUiCtrl_PublicScrollPanelEvent.h create mode 100644 src/ui/inc/FUiCtrl_PublicSearchBarEvent.h create mode 100644 src/ui/inc/FUiCtrl_PublicSliderEvent.h create mode 100644 src/ui/inc/FUiCtrl_PublicSplitPanelEvent.h create mode 100644 src/ui/inc/FUiCtrl_PublicTextBlockEvent.h create mode 100644 src/ui/inc/FUiCtrl_PublicTextEvent.h create mode 100644 src/ui/inc/FUiCtrl_RadioGroup.h create mode 100644 src/ui/inc/FUiCtrl_RadioGroupImpl.h create mode 100644 src/ui/inc/FUiCtrl_RadioGroupModel.h create mode 100644 src/ui/inc/FUiCtrl_RadioGroupPresenter.h create mode 100644 src/ui/inc/FUiCtrl_Scroll.h create mode 100644 src/ui/inc/FUiCtrl_ScrollEvent.h create mode 100644 src/ui/inc/FUiCtrl_ScrollEventArg.h create mode 100644 src/ui/inc/FUiCtrl_ScrollEventTypes.h create mode 100644 src/ui/inc/FUiCtrl_ScrollPanel.h create mode 100644 src/ui/inc/FUiCtrl_ScrollPanelEvent.h create mode 100644 src/ui/inc/FUiCtrl_ScrollPanelImpl.h create mode 100644 src/ui/inc/FUiCtrl_ScrollPanelModel.h create mode 100644 src/ui/inc/FUiCtrl_ScrollPanelPresenter.h create mode 100644 src/ui/inc/FUiCtrl_ScrollPresenter.h create mode 100644 src/ui/inc/FUiCtrl_SearchBar.h create mode 100644 src/ui/inc/FUiCtrl_SearchBarEvent.h create mode 100644 src/ui/inc/FUiCtrl_SearchBarImpl.h create mode 100644 src/ui/inc/FUiCtrl_SearchBarModel.h create mode 100644 src/ui/inc/FUiCtrl_SearchBarPresenter.h create mode 100644 src/ui/inc/FUiCtrl_SimpleItemImpl.h create mode 100644 src/ui/inc/FUiCtrl_SlidableGroupedListImpl.h create mode 100644 src/ui/inc/FUiCtrl_SlidableListImpl.h create mode 100644 src/ui/inc/FUiCtrl_Slider.h create mode 100644 src/ui/inc/FUiCtrl_SliderEvent.h create mode 100644 src/ui/inc/FUiCtrl_SliderImpl.h create mode 100644 src/ui/inc/FUiCtrl_SliderModel.h create mode 100644 src/ui/inc/FUiCtrl_SliderOverlay.h create mode 100644 src/ui/inc/FUiCtrl_SliderPresenter.h create mode 100644 src/ui/inc/FUiCtrl_SplitPanel.h create mode 100644 src/ui/inc/FUiCtrl_SplitPanelEvent.h create mode 100644 src/ui/inc/FUiCtrl_SplitPanelImpl.h create mode 100644 src/ui/inc/FUiCtrl_SplitPanelModel.h create mode 100644 src/ui/inc/FUiCtrl_SplitPanelPresenter.h create mode 100644 src/ui/inc/FUiCtrl_Tab.h create mode 100644 src/ui/inc/FUiCtrl_TabBar.h create mode 100644 src/ui/inc/FUiCtrl_TabBarImpl.h create mode 100644 src/ui/inc/FUiCtrl_TabBarItem.h create mode 100644 src/ui/inc/FUiCtrl_TabBarItemImpl.h create mode 100644 src/ui/inc/FUiCtrl_TabBarModel.h create mode 100644 src/ui/inc/FUiCtrl_TabBarPresenter.h create mode 100644 src/ui/inc/FUiCtrl_TabImpl.h create mode 100644 src/ui/inc/FUiCtrl_TabItem.h create mode 100644 src/ui/inc/FUiCtrl_TabModel.h create mode 100644 src/ui/inc/FUiCtrl_TabPresenter.h create mode 100644 src/ui/inc/FUiCtrl_TableView.h create mode 100644 src/ui/inc/FUiCtrl_TableViewImpl.h create mode 100644 src/ui/inc/FUiCtrl_TableViewItem.h create mode 100644 src/ui/inc/FUiCtrl_TableViewItemEvent.h create mode 100644 src/ui/inc/FUiCtrl_TableViewItemEventArg.h create mode 100644 src/ui/inc/FUiCtrl_TableViewItemImpl.h create mode 100644 src/ui/inc/FUiCtrl_TableViewItemProvider.h create mode 100644 src/ui/inc/FUiCtrl_TableViewItemProviderAdaptor.h create mode 100644 src/ui/inc/FUiCtrl_TableViewPresenter.h create mode 100644 src/ui/inc/FUiCtrl_TextBlockEvent.h create mode 100644 src/ui/inc/FUiCtrl_TextBoxImpl.h create mode 100644 src/ui/inc/FUiCtrl_TextEvent.h create mode 100644 src/ui/inc/FUiCtrl_TimePickerImpl.h create mode 100644 src/ui/inc/FUiCtrl_TokenEdit.h create mode 100644 src/ui/inc/FUiCtrl_TokenEditModel.h create mode 100644 src/ui/inc/FUiCtrl_TokenEditPresenter.h create mode 100644 src/ui/inc/FUiCtrl_Toolbar.h create mode 100644 src/ui/inc/FUiCtrl_ToolbarModel.h create mode 100644 src/ui/inc/FUiCtrl_ToolbarPresenter.h create mode 100644 src/ui/inc/FUiCtrl_UiFastScrollEvent.h create mode 100644 src/ui/inc/FUiCtrl_UiFastScrollEventArg.h create mode 100644 src/ui/inc/FUiCtrl_UiIconListItemEvent.h create mode 100644 src/ui/inc/FUiCtrl_UiListViewItemEvent.h create mode 100644 src/ui/inc/FUiCtrl_UiListViewItemEventArg.h create mode 100644 src/ui/inc/FUiCtrl_UiScrollEvent.h create mode 100644 src/ui/inc/FUiCtrl_UiScrollEventArg.h create mode 100644 src/ui/inc/FUiCtrl_UiTableViewItemEvent.h create mode 100644 src/ui/inc/FUi_AccessibilityContainer.h create mode 100644 src/ui/inc/FUi_AccessibilityContainerImpl.h create mode 100644 src/ui/inc/FUi_AccessibilityElement.h create mode 100644 src/ui/inc/FUi_AccessibilityElementImpl.h create mode 100644 src/ui/inc/FUi_AccessibilityGesture.h create mode 100644 src/ui/inc/FUi_AccessibilityManager.h create mode 100644 src/ui/inc/FUi_AccessibilitySystemSettingLoader.h create mode 100644 src/ui/inc/FUi_AccessibilityTtsPlayer.h create mode 100644 src/ui/inc/FUi_BidiUtils.h create mode 100644 src/ui/inc/FUi_ClipboardPopupEvent.h create mode 100644 src/ui/inc/FUi_Colorf.h create mode 100644 src/ui/inc/FUi_ContainerImpl.h create mode 100644 src/ui/inc/FUi_Control.h create mode 100644 src/ui/inc/FUi_ControlImpl.h create mode 100644 src/ui/inc/FUi_ControlImplManager.h create mode 100644 src/ui/inc/FUi_ControlManager.h create mode 100644 src/ui/inc/FUi_CoordinateSystemUtils.h create mode 100644 src/ui/inc/FUi_CustomControlBaseImpl.h create mode 100644 src/ui/inc/FUi_Dimensionf.h create mode 100644 src/ui/inc/FUi_DimmingLayer.h create mode 100644 src/ui/inc/FUi_DimmingManager.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_DragDropEvent.h create mode 100644 src/ui/inc/FUi_DragDropEventArg.h create mode 100644 src/ui/inc/FUi_EcoreEvas.h create mode 100644 src/ui/inc/FUi_EcoreEvasMgr.h create mode 100644 src/ui/inc/FUi_ErrorMessages.h create mode 100644 src/ui/inc/FUi_FingerInfo.h create mode 100644 src/ui/inc/FUi_FocusManagerImpl.h create mode 100644 src/ui/inc/FUi_IAccessibilityFocusHandler.h create mode 100644 src/ui/inc/FUi_IAccessibilityListener.h create mode 100644 src/ui/inc/FUi_IClipboardPopupEventListener.h create mode 100644 src/ui/inc/FUi_IControlManagerEventListener.h create mode 100644 src/ui/inc/FUi_IDragAndDropEventListener.h create mode 100644 src/ui/inc/FUi_IFocusEventListener.h create mode 100644 src/ui/inc/FUi_IKeyEventListener.h create mode 100644 src/ui/inc/FUi_IKeyEventPreviewer.h create mode 100644 src/ui/inc/FUi_INotificationEventListener.h create mode 100644 src/ui/inc/FUi_INotificationEventPreviewer.h create mode 100644 src/ui/inc/FUi_IPropertyChangeEventListener.h create mode 100644 src/ui/inc/FUi_ITouchCustomGestureEventListener.h create mode 100644 src/ui/inc/FUi_ITouchEventListener.h create mode 100644 src/ui/inc/FUi_ITouchEventPreviewer.h create mode 100644 src/ui/inc/FUi_ITouchFlickGestureEventListener.h create mode 100644 src/ui/inc/FUi_ITouchGestureDelegate.h create mode 100644 src/ui/inc/FUi_ITouchGestureEventListener.h create mode 100644 src/ui/inc/FUi_ITouchGestureStateChangedListener.h create mode 100644 src/ui/inc/FUi_ITouchLongPressGestureEventListener.h create mode 100644 src/ui/inc/FUi_ITouchPanningGestureEventListener.h create mode 100644 src/ui/inc/FUi_ITouchPinchGestureEventListener.h create mode 100644 src/ui/inc/FUi_ITouchRotationGestureEventListener.h create mode 100644 src/ui/inc/FUi_ITouchTapGestureEventListener.h create mode 100644 src/ui/inc/FUi_IUiEventListener.h create mode 100644 src/ui/inc/FUi_IUiEventManager.h create mode 100644 src/ui/inc/FUi_IUiEventPreviewer.h create mode 100644 src/ui/inc/FUi_IWindow.h create mode 100644 src/ui/inc/FUi_KeyEventInfoImpl.h create mode 100644 src/ui/inc/FUi_KeyEventManager.h create mode 100644 src/ui/inc/FUi_KeyEventManagerImpl.h create mode 100644 src/ui/inc/FUi_LayoutAbsoluteLayout.h create mode 100644 src/ui/inc/FUi_LayoutILayoutItemHandler.h create mode 100644 src/ui/inc/FUi_LayoutLayout.h create mode 100644 src/ui/inc/FUi_LayoutLayoutContainer.h create mode 100644 src/ui/inc/FUi_LayoutLayoutItem.h create mode 100644 src/ui/inc/FUi_LayoutLayoutMaker.h create mode 100644 src/ui/inc/FUi_LayoutLayoutTypes.h create mode 100644 src/ui/inc/FUi_LayoutLinearLayout.h create mode 100644 src/ui/inc/FUi_LayoutRelativeLayout.h create mode 100644 src/ui/inc/FUi_LayoutTableLayout.h create mode 100644 src/ui/inc/FUi_Math.h create mode 100644 src/ui/inc/FUi_Matrix3Df.h create mode 100644 src/ui/inc/FUi_ModalLoopManager.h create mode 100644 src/ui/inc/FUi_Pointf.h create mode 100644 src/ui/inc/FUi_PropertyBase.h create mode 100644 src/ui/inc/FUi_PropertyUtils.h create mode 100644 src/ui/inc/FUi_PublicOrientationEvent.h create mode 100644 src/ui/inc/FUi_Rectanglef.h create mode 100644 src/ui/inc/FUi_ResourceAccessibilityConfig.h create mode 100644 src/ui/inc/FUi_ResourceAppWidgetConfig.h create mode 100644 src/ui/inc/FUi_ResourceButtonConfig.h create mode 100644 src/ui/inc/FUi_ResourceCheckButtonConfig.h create mode 100644 src/ui/inc/FUi_ResourceColorPickerConfig.h create mode 100644 src/ui/inc/FUi_ResourceConfigLoader.h create mode 100644 src/ui/inc/FUi_ResourceConfigMacro.h create mode 100644 src/ui/inc/FUi_ResourceConfigTypes.h create mode 100644 src/ui/inc/FUi_ResourceContextMenuConfig.h create mode 100644 src/ui/inc/FUi_ResourceDateTimeBarConfig.h create mode 100644 src/ui/inc/FUi_ResourceDateTimePickerConfig.h create mode 100644 src/ui/inc/FUi_ResourceDimmingLayerConfig.h create mode 100644 src/ui/inc/FUi_ResourceEditConfig.h create mode 100644 src/ui/inc/FUi_ResourceEditDateConfig.h create mode 100644 src/ui/inc/FUi_ResourceEditTimeConfig.h create mode 100644 src/ui/inc/FUi_ResourceFastScrollConfig.h create mode 100644 src/ui/inc/FUi_ResourceFocusUiConfig.h create mode 100644 src/ui/inc/FUi_ResourceFooterConfig.h create mode 100644 src/ui/inc/FUi_ResourceFormConfig.h create mode 100644 src/ui/inc/FUi_ResourceGalleryConfig.h create mode 100644 src/ui/inc/FUi_ResourceGroupContainerConfig.h create mode 100644 src/ui/inc/FUi_ResourceHeaderConfig.h create mode 100644 src/ui/inc/FUi_ResourceIconListConfig.h create mode 100644 src/ui/inc/FUi_ResourceInputPadConfig.h create mode 100644 src/ui/inc/FUi_ResourceLabelConfig.h create mode 100644 src/ui/inc/FUi_ResourceListConfig.h create mode 100644 src/ui/inc/FUi_ResourceListViewConfig.h create mode 100644 src/ui/inc/FUi_ResourceManager.h create mode 100644 src/ui/inc/FUi_ResourceMap.h create mode 100644 src/ui/inc/FUi_ResourceMapContainer.h create mode 100644 src/ui/inc/FUi_ResourceMessageBoxConfig.h create mode 100644 src/ui/inc/FUi_ResourceOptionMenuConfig.h create mode 100644 src/ui/inc/FUi_ResourceOverlayPanelConfig.h create mode 100644 src/ui/inc/FUi_ResourcePanelConfig.h create mode 100644 src/ui/inc/FUi_ResourcePopupConfig.h create mode 100644 src/ui/inc/FUi_ResourceProgressConfig.h create mode 100644 src/ui/inc/FUi_ResourceRadioGroupConfig.h create mode 100644 src/ui/inc/FUi_ResourceScrollConfig.h create mode 100644 src/ui/inc/FUi_ResourceSearchBarConfig.h create mode 100644 src/ui/inc/FUi_ResourceSizeInfo.h create mode 100644 src/ui/inc/FUi_ResourceSliderConfig.h create mode 100644 src/ui/inc/FUi_ResourceSplitPanelConfig.h create mode 100644 src/ui/inc/FUi_ResourceStringLoader.h create mode 100644 src/ui/inc/FUi_ResourceTabBarConfig.h create mode 100644 src/ui/inc/FUi_ResourceTabConfig.h create mode 100644 src/ui/inc/FUi_ResourceTableViewConfig.h create mode 100644 src/ui/inc/FUi_ResourceTokenEditConfig.h create mode 100644 src/ui/inc/FUi_SharedPtr.h create mode 100644 src/ui/inc/FUi_SystemUtilImpl.h create mode 100644 src/ui/inc/FUi_TouchEffectImpl.h create mode 100644 src/ui/inc/FUi_TouchEventArg.h create mode 100644 src/ui/inc/FUi_TouchEventInfoImpl.h create mode 100644 src/ui/inc/FUi_TouchEventManagerImpl.h create mode 100644 src/ui/inc/FUi_TouchFlickGestureDetector.h create mode 100644 src/ui/inc/FUi_TouchFlickGestureDetectorImpl.h create mode 100644 src/ui/inc/FUi_TouchGestureDetector.h create mode 100644 src/ui/inc/FUi_TouchGestureDetectorImpl.h create mode 100644 src/ui/inc/FUi_TouchLongPressGestureDetector.h create mode 100644 src/ui/inc/FUi_TouchLongPressGestureDetectorImpl.h create mode 100644 src/ui/inc/FUi_TouchManager.h create mode 100644 src/ui/inc/FUi_TouchPanningGestureDetector.h create mode 100644 src/ui/inc/FUi_TouchPanningGestureDetectorImpl.h create mode 100644 src/ui/inc/FUi_TouchPinchGestureDetector.h create mode 100644 src/ui/inc/FUi_TouchPinchGestureDetectorImpl.h create mode 100644 src/ui/inc/FUi_TouchRotationGestureDetector.h create mode 100644 src/ui/inc/FUi_TouchRotationGestureDetectorImpl.h create mode 100644 src/ui/inc/FUi_TouchTapGestureDetector.h create mode 100644 src/ui/inc/FUi_TouchTapGestureDetectorImpl.h create mode 100644 src/ui/inc/FUi_Types.h create mode 100644 src/ui/inc/FUi_UiBuilder.h create mode 100644 src/ui/inc/FUi_UiBuilderConfig.h create mode 100644 src/ui/inc/FUi_UiBuilderControl.h create mode 100644 src/ui/inc/FUi_UiBuilderControlElement.h create mode 100644 src/ui/inc/FUi_UiBuilderControlItem.h create mode 100644 src/ui/inc/FUi_UiBuilderControlLayout.h create mode 100644 src/ui/inc/FUi_UiBuilderControlMaker.h create mode 100644 src/ui/inc/FUi_UiBuilderControlTable.h create mode 100644 src/ui/inc/FUi_UiBuilderRegister.h create mode 100644 src/ui/inc/FUi_UiBuilderXmlHandler.h create mode 100644 src/ui/inc/FUi_UiEvent.h create mode 100644 src/ui/inc/FUi_UiEventManager.h create mode 100644 src/ui/inc/FUi_UiEventTypes.h create mode 100644 src/ui/inc/FUi_UiFocusEvent.h create mode 100644 src/ui/inc/FUi_UiKeyEvent.h create mode 100644 src/ui/inc/FUi_UiManagerIpcMessages.h create mode 100644 src/ui/inc/FUi_UiNotificationEvent.h create mode 100644 src/ui/inc/FUi_UiTouchEvent.h create mode 100644 src/ui/inc/FUi_VariantImpl.h create mode 100644 src/ui/inc/FUi_Window.h create mode 100644 src/ui/inc/FUi_WindowImpl.h create mode 100644 src/ui/layout/FUi_LayoutAbsoluteLayout.cpp create mode 100644 src/ui/layout/FUi_LayoutLayout.cpp create mode 100644 src/ui/layout/FUi_LayoutLayoutContainer.cpp create mode 100644 src/ui/layout/FUi_LayoutLayoutItem.cpp create mode 100644 src/ui/layout/FUi_LayoutLayoutItemInfo.cpp create mode 100644 src/ui/layout/FUi_LayoutLayoutItemInfo.h create mode 100644 src/ui/layout/FUi_LayoutLayoutItemProxy.cpp create mode 100644 src/ui/layout/FUi_LayoutLayoutItemProxy.h create mode 100644 src/ui/layout/FUi_LayoutLayoutList.cpp create mode 100644 src/ui/layout/FUi_LayoutLayoutList.h create mode 100644 src/ui/layout/FUi_LayoutLayoutListNode.cpp create mode 100644 src/ui/layout/FUi_LayoutLayoutListNode.h create mode 100644 src/ui/layout/FUi_LayoutLayoutMaker.cpp create mode 100644 src/ui/layout/FUi_LayoutLinearLayout.cpp create mode 100644 src/ui/layout/FUi_LayoutLinkedList.cpp create mode 100644 src/ui/layout/FUi_LayoutLinkedList.h create mode 100644 src/ui/layout/FUi_LayoutLinkedListNode.cpp create mode 100644 src/ui/layout/FUi_LayoutLinkedListNode.h create mode 100644 src/ui/layout/FUi_LayoutProxyList.cpp create mode 100644 src/ui/layout/FUi_LayoutProxyList.h create mode 100644 src/ui/layout/FUi_LayoutProxyListNode.cpp create mode 100644 src/ui/layout/FUi_LayoutProxyListNode.h create mode 100644 src/ui/layout/FUi_LayoutRelativeLayout.cpp create mode 100644 src/ui/layout/FUi_LayoutTableLayout.cpp create mode 100644 src/ui/resource/FUi_ResourceAccessibilityConfig.cpp create mode 100644 src/ui/resource/FUi_ResourceAppWidgetConfig.cpp create mode 100644 src/ui/resource/FUi_ResourceButtonConfig.cpp create mode 100644 src/ui/resource/FUi_ResourceCheckButtonConfig.cpp create mode 100644 src/ui/resource/FUi_ResourceColorPickerConfig.cpp create mode 100644 src/ui/resource/FUi_ResourceConfigLoader.cpp create mode 100644 src/ui/resource/FUi_ResourceConfigParser.cpp create mode 100644 src/ui/resource/FUi_ResourceConfigParser.h create mode 100644 src/ui/resource/FUi_ResourceContextMenuConfig.cpp create mode 100644 src/ui/resource/FUi_ResourceDateTimeBarConfig.cpp create mode 100644 src/ui/resource/FUi_ResourceDateTimePickerConfig.cpp create mode 100644 src/ui/resource/FUi_ResourceDimmingLayerConfig.cpp create mode 100644 src/ui/resource/FUi_ResourceEditConfig.cpp create mode 100644 src/ui/resource/FUi_ResourceEditDateConfig.cpp create mode 100644 src/ui/resource/FUi_ResourceEditTimeConfig.cpp create mode 100644 src/ui/resource/FUi_ResourceFastScrollConfig.cpp create mode 100644 src/ui/resource/FUi_ResourceFocusUiConfig.cpp create mode 100644 src/ui/resource/FUi_ResourceFooterConfig.cpp create mode 100644 src/ui/resource/FUi_ResourceFormConfig.cpp create mode 100644 src/ui/resource/FUi_ResourceGalleryConfig.cpp create mode 100644 src/ui/resource/FUi_ResourceGroupContainerConfig.cpp create mode 100644 src/ui/resource/FUi_ResourceHeaderConfig.cpp create mode 100644 src/ui/resource/FUi_ResourceIconListConfig.cpp create mode 100644 src/ui/resource/FUi_ResourceInputPadConfig.cpp create mode 100644 src/ui/resource/FUi_ResourceLabelConfig.cpp create mode 100644 src/ui/resource/FUi_ResourceListConfig.cpp create mode 100644 src/ui/resource/FUi_ResourceListViewConfig.cpp create mode 100644 src/ui/resource/FUi_ResourceMapContainer.cpp create mode 100644 src/ui/resource/FUi_ResourceMessageBoxConfig.cpp create mode 100644 src/ui/resource/FUi_ResourceOptionMenuConfig.cpp create mode 100644 src/ui/resource/FUi_ResourceOverlayPanelConfig.cpp create mode 100644 src/ui/resource/FUi_ResourcePanelConfig.cpp create mode 100644 src/ui/resource/FUi_ResourcePopupConfig.cpp create mode 100644 src/ui/resource/FUi_ResourceProgressConfig.cpp create mode 100644 src/ui/resource/FUi_ResourceRadioGroupConfig.cpp create mode 100644 src/ui/resource/FUi_ResourceScrollConfig.cpp create mode 100644 src/ui/resource/FUi_ResourceSearchBarConfig.cpp create mode 100644 src/ui/resource/FUi_ResourceSizeInfo.cpp create mode 100644 src/ui/resource/FUi_ResourceSliderConfig.cpp create mode 100644 src/ui/resource/FUi_ResourceSplitPanelConfig.cpp create mode 100644 src/ui/resource/FUi_ResourceStringLoader.cpp create mode 100644 src/ui/resource/FUi_ResourceTabBarConfig.cpp create mode 100644 src/ui/resource/FUi_ResourceTabConfig.cpp create mode 100644 src/ui/resource/FUi_ResourceTableViewConfig.cpp create mode 100644 src/ui/resource/FUi_ResourceTokenEditConfig.cpp create mode 100644 src/ui/scenes/FUiScenesBackwardSceneTransition.cpp create mode 100644 src/ui/scenes/FUiScenesForwardSceneTransition.cpp create mode 100644 src/ui/scenes/FUiScenesScene.cpp create mode 100644 src/ui/scenes/FUiScenesSceneManager.cpp create mode 100644 src/ui/scenes/FUiScenesSceneTransition.cpp create mode 100644 src/ui/scenes/FUiScenes_ISceneControlEventListener.h create mode 100644 src/ui/scenes/FUiScenes_SceneControlEvent.cpp create mode 100644 src/ui/scenes/FUiScenes_SceneControlEvent.h create mode 100644 src/ui/scenes/FUiScenes_SceneControlEventArg.cpp create mode 100644 src/ui/scenes/FUiScenes_SceneControlEventArg.h create mode 100644 src/ui/scenes/FUiScenes_SceneImpl.cpp create mode 100644 src/ui/scenes/FUiScenes_SceneImpl.h create mode 100644 src/ui/scenes/FUiScenes_SceneManagerImpl.cpp create mode 100644 src/ui/scenes/FUiScenes_SceneManagerImpl.h create mode 100644 src/ui/scenes/FUiScenes_SceneTransitionImpl.cpp create mode 100644 src/ui/scenes/FUiScenes_SceneTransitionImpl.h create mode 100644 src/uifw/CMakeLists.txt create mode 100644 sysinfo-screen.xml create mode 100644 sysinfo-touch.xml diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..e50afff --- /dev/null +++ b/AUTHORS @@ -0,0 +1,8 @@ +Danny Whang +bermJin Cho +DongKyun Jeong +JongHyun Yoon +SangHee Kim +SungYul Choe +YoungKi Ahn + diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..027ae11 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,53 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 2.6) + +SET(CMAKE_INSTALL_PREFIX /usr) +SET(PREFIX ${CMAKE_INSTALL_PREFIX}) + +## OUTPUT PATHS +SET(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/cmake_build_tmp/output/osp) + + +## Disable build rpath +SET(CMAKE_SKIP_BUILD_RPATH TRUE) + +IF(SBS OR OBS) +ADD_DEFINITIONS("-D_EXCEPT_DEPENDENCY_") +ENDIF(SBS OR OBS) + +IF(SBS) +ADD_DEFINITIONS("-D_SBS_") +ENDIF(SBS) + +ADD_DEFINITIONS("-D_FOCUS_UI_") + +## Set Assembly Compiler +#SET(CMAKE_ASM_COMPILER "${CMAKE_C_COMPILER}") + +SET(CMAKE_ASM_COMPILER_ARG1 "${CPPFLAGS} -c") +ENABLE_LANGUAGE(ASM) + +## LIBRARY PATH +LINK_DIRECTORIES (${LIBRARY_OUTPUT_PATH}) + +ADD_SUBDIRECTORY(src) + +INSTALL(FILES ${CMAKE_SOURCE_DIR}/osp-uifw.pc DESTINATION lib/pkgconfig) + +INSTALL(DIRECTORY ${LIBRARY_OUTPUT_PATH}/ DESTINATION lib/osp + FILES_MATCHING PATTERN "*.so*" + PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ + GROUP_EXECUTE GROUP_READ + WORLD_EXECUTE WORLD_READ) +INSTALL(DIRECTORY ${LIBRARY_OUTPUT_PATH}/debug/ DESTINATION lib/osp/debug + FILES_MATCHING PATTERN "*" + PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ + GROUP_EXECUTE GROUP_READ + WORLD_EXECUTE WORLD_READ) + +INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/res/common/usr/share/osp/bitmaps DESTINATION ../usr/share/osp) +INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/res/common/usr/share/osp/effects DESTINATION ../usr/share/osp) + +INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/inc/ DESTINATION include/osp FILES_MATCHING PATTERN "*.h") +INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/src/app/inc/ DESTINATION include/osp/app FILES_MATCHING PATTERN "*.h") +INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/src/graphics/inc/ DESTINATION include/osp/graphics FILES_MATCHING PATTERN "*.h") +INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/src/ui/inc/ DESTINATION include/osp/ui FILES_MATCHING PATTERN "*.h") diff --git a/LICENSE.APLv2 b/LICENSE.APLv2 new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/LICENSE.APLv2 @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/LICENSE.Flora b/LICENSE.Flora new file mode 100644 index 0000000..4a0af40 --- /dev/null +++ b/LICENSE.Flora @@ -0,0 +1,206 @@ +Flora License + +Version 1.1, April, 2013 + +http://floralicense.org/license/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, +and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by +the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and +all other entities that control, are controlled by, or are +under common control with that entity. For the purposes of +this definition, "control" means (i) the power, direct or indirect, +to cause the direction or management of such entity, +whether by contract or otherwise, or (ii) ownership of fifty percent (50%) +or more of the outstanding shares, or (iii) beneficial ownership of +such entity. + +"You" (or "Your") shall mean an individual or Legal Entity +exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, +including but not limited to software source code, documentation source, +and configuration files. + +"Object" form shall mean any form resulting from mechanical +transformation or translation of a Source form, including but +not limited to compiled object code, generated documentation, +and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, +made available under the License, as indicated by a copyright notice +that is included in or attached to the work (an example is provided +in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, +that is based on (or derived from) the Work and for which the editorial +revisions, annotations, elaborations, or other modifications represent, +as a whole, an original work of authorship. For the purposes of this License, +Derivative Works shall not include works that remain separable from, +or merely link (or bind by name) to the interfaces of, the Work and +Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original +version of the Work and any modifications or additions to that Work or +Derivative Works thereof, that is intentionally submitted to Licensor +for inclusion in the Work by the copyright owner or by an individual or +Legal Entity authorized to submit on behalf of the copyright owner. +For the purposes of this definition, "submitted" means any form of +electronic, verbal, or written communication sent to the Licensor or +its representatives, including but not limited to communication on +electronic mailing lists, source code control systems, and issue +tracking systems that are managed by, or on behalf of, the Licensor +for the purpose of discussing and improving the Work, but excluding +communication that is conspicuously marked or otherwise designated +in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity +on behalf of whom a Contribution has been received by Licensor and +subsequently incorporated within the Work. + +"Tizen Certified Platform" shall mean a software platform that complies +with the standards set forth in the Tizen Compliance Specification +and passes the Tizen Compliance Tests as defined from time to time +by the Tizen Technical Steering Group and certified by the Tizen +Association or its designated agent. + +2. Grant of Copyright License. Subject to the terms and conditions of +this License, each Contributor hereby grants to You a perpetual, +worldwide, non-exclusive, no-charge, royalty-free, irrevocable +copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the +Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of +this License, each Contributor hereby grants to You a perpetual, +worldwide, non-exclusive, no-charge, royalty-free, irrevocable +(except as stated in this section) patent license to make, have made, +use, offer to sell, sell, import, and otherwise transfer the Work +solely as incorporated into a Tizen Certified Platform, where such +license applies only to those patent claims licensable by such +Contributor that are necessarily infringed by their Contribution(s) +alone or by combination of their Contribution(s) with the Work solely +as incorporated into a Tizen Certified Platform to which such +Contribution(s) was submitted. If You institute patent litigation +against any entity (including a cross-claim or counterclaim +in a lawsuit) alleging that the Work or a Contribution incorporated +within the Work constitutes direct or contributory patent infringement, +then any patent licenses granted to You under this License for that +Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the +Work or Derivative Works thereof pursuant to the copyright license +above, in any medium, with or without modifications, and in Source or +Object form, provided that You meet the following conditions: + + 1. You must give any other recipients of the Work or Derivative Works + a copy of this License; and + 2. You must cause any modified files to carry prominent notices stating + that You changed the files; and + 3. You must retain, in the Source form of any Derivative Works that + You distribute, all copyright, patent, trademark, and attribution + notices from the Source form of the Work, excluding those notices + that do not pertain to any part of the Derivative Works; and + 4. If the Work includes a "NOTICE" text file as part of its distribution, + then any Derivative Works that You distribute must include a readable + copy of the attribution notices contained within such NOTICE file, + excluding those notices that do not pertain to any part of + the Derivative Works, in at least one of the following places: + within a NOTICE text file distributed as part of the Derivative Works; + within the Source form or documentation, if provided along with the + Derivative Works; or, within a display generated by the Derivative Works, + if and wherever such third-party notices normally appear. + The contents of the NOTICE file are for informational purposes only + and do not modify the License. You may add Your own attribution notices + within Derivative Works that You distribute, alongside or as an addendum + to the NOTICE text from the Work, provided that such additional attribution + notices cannot be construed as modifying the License. You may add Your own + copyright statement to Your modifications and may provide additional or + different license terms and conditions for use, reproduction, or + distribution of Your modifications, or for any such Derivative Works + as a whole, provided Your use, reproduction, and distribution of + the Work otherwise complies with the conditions stated in this License + and your own copyright statement or terms and conditions do not conflict + the conditions stated in the License including section 3. + +5. Submission of Contributions. Unless You explicitly state otherwise, +any Contribution intentionally submitted for inclusion in the Work +by You to the Licensor shall be under the terms and conditions of +this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify +the terms of any separate license agreement you may have executed +with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade +names, trademarks, service marks, or product names of the Licensor, +except as required for reasonable and customary use in describing the +origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or +agreed to in writing, Licensor provides the Work (and each +Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied, including, without limitation, any warranties or conditions +of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A +PARTICULAR PURPOSE. You are solely responsible for determining the +appropriateness of using or redistributing the Work and assume any +risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, +whether in tort (including negligence), contract, or otherwise, +unless required by applicable law (such as deliberate and grossly +negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, +incidental, or consequential damages of any character arising as a +result of this License or out of the use or inability to use the +Work (including but not limited to damages for loss of goodwill, +work stoppage, computer failure or malfunction, or any and all +other commercial damages or losses), even if such Contributor +has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing +the Work or Derivative Works thereof, You may choose to offer, +and charge a fee for, acceptance of support, warranty, indemnity, +or other liability obligations and/or rights consistent with this +License. However, in accepting such obligations, You may act only +on Your own behalf and on Your sole responsibility, not on behalf +of any other Contributor, and only if You agree to indemnify, +defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason +of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Flora License to your work + +To apply the Flora License to your work, attach the following +boilerplate notice, with the fields enclosed by brackets "[]" +replaced with your own identifying information. (Don't include +the brackets!) The text should be enclosed in the appropriate +comment syntax for the file format. We also recommend that a +file or class name and description of purpose be included on the +same "printed page" as the copyright notice for easier +identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Flora License, Version 1.1 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://floralicense.org/license/ + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + 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. + diff --git a/NOTICE b/NOTICE new file mode 100644 index 0000000..555a379 --- /dev/null +++ b/NOTICE @@ -0,0 +1,8 @@ +Copyright (c) Samsung Electronics Co., Ltd. All rights reserved. +Except as noted, this software is licensed under Apache License, Version 2. +Please, see the LICENSE.APLv2 file for Apache License, Version 2 terms and conditions. + +Several source codes may have its original copyright owner and/or +be licensed under other than Apache License, Version 2, say, Flora License, Version 1.1 +Please, see copyright and license comments section in the header of each file, +and the LICENSE.Flora for Flora License, Version 1.1 terms and conditions. diff --git a/clipboard.service b/clipboard.service new file mode 100644 index 0000000..6aa30b5 --- /dev/null +++ b/clipboard.service @@ -0,0 +1,15 @@ + [Unit] +Description=create folder +After=tizen-runtime.target +Requires=tizen-runtime.target + +[Service] +Type=oneshot +ExecStartPre=/bin/mkdir /tmp/clipboard +ExecStartPre=/bin/chown app:app /tmp/clipboard +ExecStartPre=/bin/chmod 755 /tmp/clipboard +ExecStartPre=/usr/bin/chsmack -a 'system::clipboard' /tmp/clipboard +ExecStart=/usr/bin/chsmack -t /tmp/clipboard + +[Install] +WantedBy=multi-user.target diff --git a/inc/FGraphics.h b/inc/FGraphics.h new file mode 100644 index 0000000..eea6899 --- /dev/null +++ b/inc/FGraphics.h @@ -0,0 +1,144 @@ +// +// 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 FGraphics.h + * @brief This is the header file for the %Graphics namespace. + * + * This header file contains the declarations of the %Graphics namespace. + * + */ + +#ifndef _FGRAPHICS_H_ +#define _FGRAPHICS_H_ + +#include "FGrpPoint.h" +#include "FGrpFloatPoint.h" + +#include "FGrpDimension.h" +#include "FGrpFloatDimension.h" + +#include "FGrpRectangle.h" +#include "FGrpFloatRectangle.h" + +#include "FGrpFloatMatrix4.h" +#include "FGrpFloatVector4.h" +#include "FGrpFloatPoint3.h" + +#include "FGrpColor.h" + +#include "FGrpPixelFormat.h" + +#include "FGrpBufferInfo.h" + +#include "FGrpBitmapCommon.h" +#include "FGrpBitmap.h" + +#include "FGrpCanvasCommon.h" +#include "FGrpCanvas.h" + +#include "FGrpFontCommon.h" +#include "FGrpFont.h" + +#include "FGrpTextElement.h" +#include "FGrpEnrichedText.h" + +#include "FGrpCoordinateSystem.h" + +/** + * @namespace Tizen::Graphics + * @brief This namespace contains classes for drawing-related functionalities. + * + * @since 2.0 + * + * @remarks @b Header @b %file: @b \#include @b @n + * @b Library : @b osp-uifw + * + * The %Graphics namespace provides enhanced two-dimensional graphics, + * text, and imaging capabilities. + * It supports comprehensive features for rendering geometric primitives, text, and images + * in a flexible framework for developing rich user + * interfaces, sophisticated drawing applications, and image editors. + * This namespace provides additional features such as Bitmap, Font, and Color to enhance the rendered graphics. + * The user can also use basic data types, Point, Rectangle, and Dimension to construct 2D graphic objects, such as + * polygons. + * @n + * For more information on the %Graphics namespace features, see Graphics Guide. + * + * The following diagram illustrates the relationships between the classes belonging to the %Graphics namespace. + * @image html graphics_namespace_class_relationship.png + * + * The following example demonstrates how to use the %Graphics namespace. + * + * @code +#include +#include + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +bool +MyClass::GraphicsSample(Canvas& canvas) +{ + result r = E_SUCCESS; + + // Sets the background color of the canvas and then clears it + canvas.SetBackgroundColor(Color(0xFF, 0xFF, 0xFF)); + canvas.Clear(); + + // Sets the foreground color of this canvas + canvas.SetForegroundColor(Color::GetColor(COLOR_ID_GREEN)); + + // Draws shapes + canvas.DrawEllipse(Rectangle(50, 50, 50, 80)); + canvas.DrawLine(Point(100, 100), Point(150, 150)); + canvas.DrawArc(Rectangle(10, 200, 50, 50), 30, 60, ARC_STYLE_PIE); + + { + // Creates an instance of Font + Font font; + r = font.Construct(FONT_STYLE_PLAIN, 32); + if (IsFailed(r)) + { + return false; + } + + // Sets the canvas font + canvas.SetFont(font); + } + + // Draws text at the specified location + canvas.DrawText(Point(50, 50), String(L"Hello World")); + + // Shows the drawing as a result on the device screen + canvas.Show(); + + return true; + +} + * @endcode + * + * + * + * + */ +namespace Tizen { namespace Graphics +{ + +} } // Tizen::Graphics + +#endif // _FGRAPHICS_H_ diff --git a/inc/FGraphicsOpengl.h b/inc/FGraphicsOpengl.h new file mode 100644 index 0000000..6994683 --- /dev/null +++ b/inc/FGraphicsOpengl.h @@ -0,0 +1,42 @@ +// +// 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 FGraphicsOpengl.h + * @brief This is the header file for the %Opengl namespace. + * + * This header file contains the declarations of the %Opengl namespace. + * + */ + +#ifndef _FGRAPHICS_OPENGL_H_ +#define _FGRAPHICS_OPENGL_H_ + +namespace Tizen { namespace Graphics +{ + +namespace Opengl +{ +#include +#include +#include +#include + +} // Tizen::Graphics::Opengl + +} } // Tizen::Graphics +#endif // _FGRAPHICS_OPENGL_H_ diff --git a/inc/FGraphicsOpengl2.h b/inc/FGraphicsOpengl2.h new file mode 100644 index 0000000..1c35dfa --- /dev/null +++ b/inc/FGraphicsOpengl2.h @@ -0,0 +1,75 @@ +// +// 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 FGraphicsOpengl2.h + * @brief This is the header file for the %Opengl namespace. + * + * This header file contains the declarations of the %Opengl namespace. + * + */ + +/** + * @defgroup opengles OpenGL® ES + * @brief The list of OpenGL®ES functions. + */ + +#ifndef _FGRAPHICS_OPENGL_H_ +#define _FGRAPHICS_OPENGL_H_ + +/** + * @namespace Tizen::Graphics::Opengl + * @brief This namespace contains interfaces for %OpenGL®. + * + * - OpenGL® ES + * + * @since 2.0 + * @remarks + * For OpenGL® ES 1.1: @n + * @b Header @b %file: @b \#include @b @n + * @b Library: @b osp-uifw @n + * For OpenGL® ES 2.0: @n + * @b Header @b %file: @b \#include @b @n + * @b Library: @b osp-uifw @n + * + * + * + * + * + * + * The %Opengl namespace provides support for rendering high performance 2D and 3D graphic objects using the + * OpenGL®(Open %Graphics Library) specification. This namespace further supports the EGL, OpenGL® ES 1.1, and + * OpenGL® ES 2.0 features. + * + * For more information on the %Opengl namespace features, see OpenGL® Guide. + * + * + */ +namespace Tizen { namespace Graphics +{ + +namespace Opengl +{ +#include +#include +#include +#include + +} // Tizen::Graphics::Opengl + +} } // Tizen::Graphics +#endif // _FGRAPHICS_OPENGL_H_ diff --git a/inc/FGrpBitmap.h b/inc/FGrpBitmap.h new file mode 100644 index 0000000..82aba55 --- /dev/null +++ b/inc/FGrpBitmap.h @@ -0,0 +1,645 @@ +// +// 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 FGrpBitmap.h + * @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. + * + */ + +#ifndef _FGRP_BITMAP_H_ +#define _FGRP_BITMAP_H_ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace Tizen { namespace Media +{ +class Image; +} } + +namespace Tizen { namespace Graphics +{ +class Canvas; + +/** + * @class Bitmap + * @brief This class encapsulates a bitmap. + * + * @since 2.0 + * + * @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. + * + * For more information on the class features, see Bitmaps. + * + * + */ +class _OSP_EXPORT_ Bitmap + : public Tizen::Base::Object +{ +public: + /** + * 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 + */ + Bitmap(void); + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~Bitmap(void); + + /** + * Initializes this instance of %Bitmap by copying a rectangular area of the Frame. + * + * @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. + * @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. + * + */ + result Construct(const Rectangle& rect); + + /** + * Initializes this instance of %Bitmap with the specified dimensions and pixel format. + * + * @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 + * @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. + * + */ + result Construct(const Dimension& dim, BitmapPixelFormat format); + + /** + * Initializes this instance of %Bitmap by copying the specified rectangular area of the specified canvas. + * + * @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. + * @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. + * + */ + result Construct(const Canvas& canvas, const Tizen::Graphics::Rectangle& rect); + + /** + * Initializes this instance of %Bitmap by copying a rectangular area of the specified bitmap. + * + * @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. + * @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. + * + */ + result Construct(const Bitmap& bitmap, const Tizen::Graphics::Rectangle& rect); + + /** + * Initializes this instance of %Bitmap by using a buffer that contains raw data. + * + * @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 + * @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. + * @remarks The position property of ByteBuffer can be changed. + * + */ + result Construct(const Tizen::Base::ByteBuffer& buffer, const Dimension& dim, BitmapPixelFormat pixelFormat); + + /** + * Initializes this instance of %Bitmap by using a buffer that contains raw data. + * + * @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. + * @exception E_UNSUPPORTED_FORMAT The specified format is not supported. + * @remarks The position property of %ByteBuffer can be changed. + * + */ + result Construct(const Tizen::Base::ByteBuffer& buffer, const Dimension& dim, BitmapPixelFormat pixelFormat, BufferScaling bufferScaling); + + /** + * Initializes this instance of %Bitmap by copying a rectangular area of the Frame. + * + * @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. + * @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. + * + */ + result Construct(const FloatRectangle& rect); + + /** + * Initializes this instance of %Bitmap with the specified dimensions and pixel format. + * + * @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 + * @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. + * + */ + result Construct(const FloatDimension& dim, BitmapPixelFormat format); + + /** + * Initializes this instance of %Bitmap by copying a specified rectangular area of a specified canvas. + * + * @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. + * @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. + * + */ + result Construct(const Canvas& canvas, const FloatRectangle& rect); + + /** + * Initializes this instance of %Bitmap by copying a rectangular area of a specified bitmap. + * + * @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. + * @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. + * + */ + result Construct(const Bitmap& bitmap, const FloatRectangle& rect); + +public: + /** + * Scales the bitmap to the specified width and height. + * + * @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. + * @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. + * + */ + result Scale(const Dimension& dim); + + /** + * Scales the bitmap to a specified width and height. + * + * @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. + * @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. + * + */ + result Scale(const FloatDimension& dim); + + /** + * Merges the specified area of the source bitmap into the calling bitmap at the given Point. + * + * @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. + * @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. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * + */ + result Merge(const Point& destPoint, const Bitmap& srcBitmap, const Rectangle& srcRect); + + /** + * Merges a specified area of the source bitmap into the calling bitmap at a given point. + * + * @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. + * @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 + * @exception E_INVALID_ARG A specified input parameter is invalid. + * + */ + result Merge(const FloatPoint& destPoint, const Bitmap& srcBitmap, const FloatRectangle& srcRect); + + /** + * Gets the height of the bitmap. + * + * @since 2.0 + * + * @return The height of the bitmap, @n + * else @c -1 if the method fails + * + */ + int GetHeight(void) const; + + /** + * Gets the height of the bitmap. + * + * @since 2.1 + * + * @return The height of the bitmap, @n + * else @c -1 if the method fails + * + */ + float GetHeightF(void) const; + + /** + * Gets the actual height of the bitmap. + * + * @since 2.1 + * + * @return The actual height of the bitmap, @n + * else @c -1.0f if the method fails + * + */ + float GetActualHeight(void) const; + + /** + * Gets the width of the bitmap. + * + * @since 2.0 + * + * @return The width of the bitmap, @n + * else @c -1 if the method fails + * + */ + int GetWidth(void) const; + + /** + * Gets the width of the bitmap. + * + * @since 2.1 + * + * @return The width of the bitmap, @n + * else @c -1 if the method fails + * + */ + float GetWidthF(void) const; + + /** + * Gets the actual width of the bitmap. + * + * @since 2.1 + * + * @return The actual width of the bitmap, @n + * else @c -1.0f if the method fails + * + */ + float GetActualWidth(void) const; + + /** + * Gets the number of bits per pixel of the bitmap. + * + * @since 2.0 + * + * @return The bits per pixel, @n + * else @c -1 if the method fails + * + */ + int GetBitsPerPixel(void) const; + + /** + * Gets the pixel color format of the bitmap. + * + * @since 2.0 + * + * @return The pixel color format + * + */ + BitmapPixelFormat GetPixelColorFormat(void) const; + + /** + * Sets the scaling quality to be used for bitmap scaling. + * + * @since 2.0 + * + * @return An error code + * @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. + * + */ + result SetScalingQuality(BitmapScalingQuality quality); + + /** + * Gets the current scaling quality. + * + * @since 2.0 + * + * @return The scaling quality @n + * The default value is @c BITMAP_SCALING_QUALITY_LOW. + * + */ + BitmapScalingQuality GetScalingQuality(void) const; + + /** + * Sets the specified color as masking color. @n + * All pixels with this color are treated as transparent. + * + * @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. + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * + */ + result SetMaskingColor(const Color* pColor); + + /** + * Gets a masking color. + * + * @since 2.0 + * + * @return An error code + * @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. + * + */ + result GetMaskingColor(Color& color) const; + + /** + * Sets the alpha constant. + * + * @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. + */ + void SetAlphaConstant(int opacity); + + /** + * Gets the alpha constant. + * + * @since 2.0 + * + * @return The alpha constant, @n + * else @c -1 if the method fails + */ + int GetAlphaConstant(void) const; + + /** + * Checks whether the instance is nine patched bitmap. + * + * @since 2.0 + * + * @return @c true if the instance is nine patched bitmap, @n + * else @c false + */ + bool IsNinePatchedBitmap(void) const; + + /** + * Locks a bitmap for direct pixel access. @n + * It sets up a bitmap for accessing the pixels directly. Between the calls to Bitmap::Lock() and Bitmap::Unlock(), + * you can write to and read from the bitmap's pixels. After you are done accessing the bitmap's pixels, + * you must call %Bitmap::Unlock() to release the lock. + * + * @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. + * @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. + * + */ + result Lock(BufferInfo& info, long timeout = INFINITE); + + /** + * Unlocks a bitmap. @n + * A bitmap that is locked using Bitmap::Lock() must be unlocked using Bitmap::Unlock(). + * The bitmap buffer can be modified when the bitmap is locked, but is applied only when the bitmap is unlocked. + * Therefore, all locked bitmap operations can only be used after the bitmap is unlocked using %Bitmap::Unlock(). + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM An unknown operating system error has occurred. + * + */ + result Unlock(void); + + /** + * Gets a non-scaled bitmap. + * + * @since 2.0 + * + * @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. + * + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + static Bitmap* GetNonScaledBitmapN(const Tizen::Base::ByteBuffer& buffer, const Dimension& dim, BitmapPixelFormat pixelFormat); + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + Bitmap(const Bitmap& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + Bitmap& operator =(const Bitmap& rhs); + + // + // This method is for internal use only. + // Using this method can cause behavioral, security-related, and consistency-related issues in the application. + // + // Initializes this instance of %Bitmap by using a buffer that contains raw data. + // + // @since 2.0 + // + // @return An error code + // @param[in] buffer The buffer containing raw bitmap 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 the raw bitmap buffer + // @param[in] autoScaling Set to @c true to automatically scale the bitmap, @n + // else @c false + // @exception E_SUCCESS The method is successful. + // @exception E_INVALID_ARG A specified input parameter is invalid. + // @exception E_UNSUPPORTED_FORMAT The specified format is not supported. + // + result Construct(const Tizen::Base::ByteBuffer& buffer, const Dimension& dim, BitmapPixelFormat pixelFormat, bool autoScaling); + + // + // This method is for internal use only. + // Using this method can cause behavioral, security-related, and consistency-related issues in the application. + // + // Initializes this instance of %Bitmap by using a buffer that contains raw data. + // + // @since 2.0 + // + // @return An error code + // @param[in] pBuffer A pointer to the raw bitmap buffer + // @param[in] bufferSize The size of the raw bitmap buffer + // @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 the raw bitmap buffer + // @param[in] autoScaling Set to @c true to automatically scale the bitmap, @n + // else @c false + // @exception E_SUCCESS The method is successful. + // @exception E_INVALID_ARG A specified input parameter is invalid. + // @exception E_UNSUPPORTED_FORMAT The specified format is not supported + // + result Construct(const byte* pBuffer, int bufferSize, const Dimension& dim, BitmapPixelFormat pixelFormat, bool autoScaling); + + friend class Canvas; + friend class Tizen::Media::Image; + +private: + friend class _BitmapImpl; + + // + // This variable is for internal use only. + // Using this variable can cause behavioral, security-related, and consistency-related issues in the application. + // + // @since 2.0 + // + class _BitmapImpl* __pImpl; + +}; // Bitmap + +}} // Tizen::Graphics + +#endif //_FGRP_BITMAP_H_ diff --git a/inc/FGrpBufferInfo.h b/inc/FGrpBufferInfo.h new file mode 100644 index 0000000..52f58df --- /dev/null +++ b/inc/FGrpBufferInfo.h @@ -0,0 +1,166 @@ +// +// 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 FGrpBufferInfo.h + * @brief This is the header file for the %BufferInfo class. + * + * This header file contains the declarations of the %BufferInfo class. + * + */ + +#ifndef _FGRP_BUFFER_INFO_H_ +#define _FGRP_BUFFER_INFO_H_ + +#include +#include + +#include +#include +#include + +namespace Tizen { namespace Graphics +{ +/** + * @class BufferInfo + * @brief This class encapsulates the extra information for canvases and bitmaps. + * + * @since 2.0 + * + * @final This class is not intended for extension. + * + * The %BufferInfo class provides Canvas and Bitmap related information, such as the dimension and pixel information. + * @n + * For more information on the class features, see Buffer Information. + * + * + */ +class _OSP_EXPORT_ BufferInfo + : public Tizen::Base::Object +{ +public: + /** + * This is the default constructor for this class. + * + * @since 2.0 + */ + BufferInfo(void); + + /** + * This is the copy constructor for the %BufferInfo class. + * + * @since 2.0 + * + * @param[in] rhs An instance of %BufferInfo + */ + BufferInfo(const BufferInfo& rhs); + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~BufferInfo(void); + + /** + * This is the default assignment operator for this class. + * + * @since 2.0 + * + * @param[in] rhs An instance of %BufferInfo + */ + BufferInfo& operator =(const BufferInfo& rhs); + + /** + * Checks whether the value of the specified instance equals the value of the current instance. + * + * @since 2.0 + * + * @return @c true if the value of the current instance equals the value of the specified instance, @n + * else @c false + * @param[in] rhs The object to compare with the current instance + */ + virtual bool Equals(const Tizen::Base::Object& rhs) const; + + /** + * Gets the hash value of the current instance. + * + * @since 2.0 + * + * @return An integer value indicating the hash value of the current instance + */ + virtual int GetHashCode(void) const; + +public: + /** + * The width of the buffer's logical dimensions in pixels. + * + * @since 2.0 + */ + int width; + + /** + * The height of the buffer's logical dimensions in pixels. + * + * @since 2.0 + */ + int height; + + /** + * The length of the buffer scan-line in bytes. + * + * @since 2.0 + */ + int pitch; + + /** + * The bits per pixel of the buffer. + * + * @since 2.0 + */ + int bitsPerPixel; + + /** + * The color format of the buffer. + * + * @since 2.0 + */ + PixelFormat pixelFormat; + + /** + * A pointer to the actual locked pixel bits. + * + * @since 2.0 + */ + void* pPixels; + +private: + friend class _BufferInfoImpl; + + // + // This variable is for internal use only. + // Using this variable can cause behavioral, security-related, and consistency-related issues in the application. + // + // @since 2.0 + // + class _BufferInfoImpl * __pImpl; + +}; // BufferInfo + +}} // Tizen::Graphics + +#endif //_FGRP_BUFFER_INFO_H_ diff --git a/inc/FGrpCanvas.h b/inc/FGrpCanvas.h new file mode 100644 index 0000000..090cba9 --- /dev/null +++ b/inc/FGrpCanvas.h @@ -0,0 +1,1650 @@ +// +// 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 FGrpCanvas.h + * @brief This is the header file for the %Canvas class. + * + * This header file contains the declarations of the %Canvas class. + * + */ + +#ifndef _FGRP_CANVAS_H_ +#define _FGRP_CANVAS_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace Tizen { namespace Graphics +{ +class Font; +class EnrichedText; + +/** + * @class Canvas + * @brief This class provides methods for drawing objects. + * + * @since 2.0 + * + * @final This class is not intended for extension. + * + * The %Canvas class provides a rectangular region to draw objects on the display device. The %Canvas instance is + * associated with a specific context. + * + * For more information on the class features, see Canvas. + * + */ +class _OSP_EXPORT_ Canvas + : public Tizen::Base::Object +{ +public: + /** + * 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 + */ + Canvas(void); + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~Canvas(void); + + /** + * Initializes this instance of %Canvas to create a canvas control of the same size as that of the + * device screen. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + */ + result Construct(void); + + /** + * Initializes this instance of %Canvas with the specified parameter. + * + * @since 2.0 + * + * @return An error code + * @param[in] rect The location and size of the canvas control on the device screen @n + * The width and height of the rectangle must be greater than @c 0. + * If this condition is not satisfied, the @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. + */ + result Construct(const Rectangle& rect); + + /** + * Initializes this instance of %Canvas with a specified parameter. + * + * @since 2.1 + * + * @return An error code + * @param[in] rect The location and size of the canvas control on the device screen @n + * The width and height of the rectangle must be greater than @c 0.0f. + * If this condition is not satisfied, the @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. + */ + result Construct(const FloatRectangle& rect); + + /** + * Initializes this instance of %Canvas with the buffer information. + * + * @since 2.0 + * + * @return An error code + * @param[in] bufferInfo The information of the buffer to use by the canvas + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The buffer information is invalid. + * @exception E_UNSUPPORTED_FORMAT The given buffer information is a format unsupported by the canvas. + * @exception E_SYSTEM An unknown operating system error has occurred + * @remarks Only ::PIXEL_FORMAT_ARGB8888 is supported. + */ + result Construct(const BufferInfo& bufferInfo); + +public: + /** + * Clears the current instance of %Canvas with the background color. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + */ + result Clear(void); + + /** + * Clears a rectangular region of the current instance of %Canvas with the background color. + * + * @since 2.0 + * + * @return An error code + * @param[in] rect The location and size of the rectangular region @n + * The width and height of the rectangle must be greater than or equal to @c 0. + * The rectangular region must not fall outside the edges of the + * current instance of %Canvas entirely.If these conditions are not + * satisfied, the @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. + */ + result Clear(const Rectangle& rect); + + /** + * Clears a rectangular region of the current instance of %Canvas with the background color. + * + * @since 2.1 + * + * @return An error code + * @param[in] rect The location and size of the rectangular region @n + * The width and height of the rectangle must be greater than or equal to @c 0.0f. + * The rectangular region must not fall outside the edges of the + * current instance of %Canvas entirely.If these conditions are not + * satisfied, the @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. + */ + result Clear(const FloatRectangle& rect); + + /** + * Copies the specified rectangular region from the specified instance of %Canvas to the current instance of + * %Canvas at the specified location. + * + * @since 2.0 + * + * @return An error code + * @param[in] destPoint The location to copy the rectangular region + * @param[in] srcCanvas The source %Canvas + * @param[in] srcRect The location and size of the rectangular region on the source %Canvas @n + * The rectangular region must not fall outside the edges of + * the current instance of %Canvas entirely. If this condition is + * not satisfied, the @c E_OUT_OF_RANGE exception is returned. + * @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. + */ + result Copy(const Point& destPoint, const Canvas& srcCanvas, const Rectangle& srcRect); + + /** + * Copies a specified rectangular region from a specified instance of %Canvas to the current instance of + * %Canvas at a specified location. + * + * @since 2.1 + * + * @return An error code + * @param[in] destPoint The location to copy the rectangular region + * @param[in] srcCanvas The source %Canvas + * @param[in] srcRect The location and size of the rectangular region on the source %Canvas @n + * The rectangular region must not fall outside the edges of + * the current instance of %Canvas entirely. If this condition is + * not satisfied, the @c E_OUT_OF_RANGE exception is returned. + * @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. + */ + result Copy(const FloatPoint& destPoint, const Canvas& srcCanvas, const FloatRectangle& srcRect); + + /** + * Copies the scaled image of the specified rectangular region from the specified instance of + * %Canvas to the current instance of %Canvas. + * + * @since 2.0 + * + * @return An error code + * @param[in] destRect The location and size of the destination image @n + * The value of @c destRect must not fall outside the edges of + * the current instance of %Canvas entirely. If this condition is + * not satisfied, the @c E_OUT_OF_RANGE exception is returned. + * @param[in] srcCanvas The source %Canvas + * @param[in] srcRect The location and size of the source image @n + * The value of @c srcRect must not fall outside the edges of + * the current instance of %Canvas entirely. If this condition is + * not satisfied, the @c E_OUT_OF_RANGE exception is returned. + * @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. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of this operation. + */ + result Copy(const Rectangle& destRect, const Canvas& srcCanvas, const Rectangle& srcRect); + + /** + * Copies the scaled image of a specified rectangular region from a specified instance of + * %Canvas to the current instance of %Canvas. + * + * @since 2.1 + * + * @return An error code + * @param[in] destRect The location and size of the destination image @n + * The value of @c destRect must not fall outside the edges of + * the current instance of %Canvas entirely. If this condition is + * not satisfied, the @c E_OUT_OF_RANGE exception is returned. + * @param[in] srcCanvas The source %Canvas + * @param[in] srcRect The location and size of the source image @n + * The value of @c srcRect must not fall outside the edges of + * the current instance of %Canvas entirely. If this condition is + * not satisfied, the @c E_OUT_OF_RANGE exception is returned. + * @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. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of this operation. + */ + result Copy(const FloatRectangle& destRect, const Canvas& srcCanvas, const FloatRectangle& srcRect); + + /** + * Gets the line style set for the current instance of %Canvas. + * + * @since 2.0 + * + * @return An instance of LineStyle @n + * The default value is @c LINE_STYLE_SOLID. + */ + LineStyle GetLineStyle(void) const; + + /** + * Gets the line width of the current instance of %Canvas. + * + * @since 2.0 + * + * @return The line width, @n + * else @c -1 if the method fails @n + * The default value is @c 1. + */ + int GetLineWidth(void) const; + + /** + * Gets the line width of the current instance of %Canvas. + * + * @since 2.1 + * + * @return The line width, @n + * else @c -1.0f if the method fails @n + * The default value is @c 1.0f. + */ + float GetLineWidthF(void) const; + + /** + * Sets the line style for the current instance of %Canvas. + * + * @since 2.0 + * + * @return An error code + * @param[in] style The new line style for the %Canvas control + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + */ + result SetLineStyle(LineStyle style); + + /** + * Sets the line width for the current instance of %Canvas. + * + * @since 2.0 + * + * @return An error code + * @param[in] width The new width for the %Canvas control @n + * The width for the %Canvas control 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. + */ + result SetLineWidth(int width); + + /** + * Sets the line width for the current instance of %Canvas. + * + * @since 2.1 + * + * @return An error code + * @param[in] width The new width for the %Canvas control @n + * The width for the %Canvas control 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. + */ + result SetLineWidth(float width); + + /** + * Gets the dash pattern of the current instance of %Canvas. + * + * @since 2.0 + * + * @return An error code + * @param[out] pattern The list containing the information of dash pattern. + * @param[out] 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. + */ + result GetDashPattern(Tizen::Base::Collection::IListT& pattern, int& offset) const; + + /** + * Gets the dash pattern of the current instance of %Canvas. + * + * @since 2.1 + * + * @return An error code + * @param[out] pattern The list containing the information of dash pattern + * @param[out] 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. + */ + result GetDashPattern(Tizen::Base::Collection::IListT& pattern, float& offset) const; + + /** + * Sets the dash pattern for the current instance of %Canvas. + * + * @since 2.0 + * + * @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. + * @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. + */ + result SetDashPattern(const Tizen::Base::Collection::IListT& pattern, int offset); + + /** + * Sets the dash pattern for the current instance of %Canvas. + * + * @since 2.1 + * + * @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. + * @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. + */ + result SetDashPattern(const Tizen::Base::Collection::IListT& pattern, float offset); + + /** + * Sets the line cap style. + * + * @since 2.1 + * + * @return An error code + * @param[in] lineCapStyle The new line cap style + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + */ + result SetLineCapStyle(LineCapStyle lineCapStyle); + + /** + * Gets the line cap style for the current instance. + * + * @since 2.1 + * + * @return The current line cap style @n + * The default style is @c LINE_CAP_STYLE_ROUND. + */ + LineCapStyle GetLineCapStyle(void) const; + + /** + * Sets the line join style. + * + * @since 2.1 + * + * @return An error code + * @param[in] lineJoinStyle The new line join style + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + */ + result SetLineJoinStyle(LineJoinStyle lineJoinStyle); + + /** + * Gets the line join style for the current instance. + * + * @since 2.1 + * + * @return The current line join style @n + * The default style is @c LINE_JOIN_STYLE_ROUND. + */ + LineJoinStyle GetLineJoinStyle(void) const; + + /** + * Gets the color information at the specified point. + * + * @since 2.0 + * + * @return An error code + * @param[in] point The location of the point relative to the upper-left corner of the current instance of %Canvas @n + * The point must not fall outside the edges of %Canvas. If this + * condition is not satisfied, the @c E_OUT_OF_RANGE exception is returned. + * @param[out] color An instance of Color + * @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. + */ + result GetPixel(const Point& point, Color& color) const; + + /** + * Gets the color information at a specified point. + * + * @since 2.1 + * + * @return An error code + * @param[in] point The location of the point relative to the upper-left corner of the current instance of %Canvas @n + * The point must not fall outside the edges of %Canvas. If this + * condition is not satisfied, the @c E_OUT_OF_RANGE exception is returned. + * @param[out] color An instance of Color + * @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. + */ + result GetPixel(const FloatPoint& point, Color& color) const; + + /** + * Sets a point at the specified coordinate. + * + * @since 2.0 + * + * @return An error code + * @param[in] point The location of the point relative to the upper-left corner of the current instance of %Canvas @n + * The point must not entirely fall outside the edges of %Canvas. + * If this condition is not satisfied, the @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. + */ + result SetPixel(const Point& point); + + /** + * Sets a point at a specified coordinate. + * + * @since 2.0 + * + * @return An error code + * @param[in] point The location of the point relative to the upper-left corner of the current instance of %Canvas @n + * The point must not entirely fall outside the edges of %Canvas. + * If this condition is not satisfied, the @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. + */ + result SetPixel(const FloatPoint& point); + + /** + * Draws a line between the two specified points. + * + * @since 2.0 + * + * @return An error code + * @param[in] point1 The starting point + * @param[in] point2 The end point + * @exception E_SUCCESS The method is successful. + */ + result DrawLine(const Point& point1, const Point& point2); + + /** + * Draws a line between the two specified points. + * + * @since 2.1 + * + * @return An error code + * @param[in] point1 The starting point + * @param[in] point2 The end point + * @exception E_SUCCESS The method is successful. + */ + result DrawLine(const FloatPoint& point1, const FloatPoint& point2); + + /** + * Draws a rectangle. + * + * @since 2.0 + * + * @return An error code + * @param[in] rect The rectangle to draw on the %Canvas control @n + * The width and height of the rectangle must be greater than or equal to @c 0. + * The rectangle must not entirely fall outside the edges of + * the %Canvas control. If these conditions are not satisfied, + * the @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. + */ + result DrawRectangle(const Rectangle& rect); + + /** + * Draws a rectangle. + * + * @since 2.1 + * + * @return An error code + * @param[in] rect The rectangle that is drawn on the %Canvas control @n + * The width and height of the rectangle must be greater than or equal to @c 0.0f. + * The rectangle must not entirely fall outside the edges of + * the %Canvas control. If these conditions are not satisfied, + * the @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. + */ + result DrawRectangle(const FloatRectangle& rect); + + /** + * Fills a rectangular region of the current instance of %Canvas with the specified color. + * + * @since 2.0 + * + * @return An error code + * @param[in] color The fill color + * @param[in] rect The rectangular region on the %Canvas control @n + * The width and height of the rectangle must be greater than or equal to @c 0. + * The rectangle must not entirely fall outside the edges of the + * %Canvas control. If these conditions are not satisfied, the + * @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. + */ + result FillRectangle(const Color& color, const Rectangle& rect); + + /** + * Fills a rectangular region of the current instance of %Canvas with a specified color. + * + * @since 2.1 + * + * @return An error code + * @param[in] color The fill color + * @param[in] rect The rectangular region on the %Canvas control @n + * The width and height of the rectangle must be greater than or equal to @c 0.0f. + * The rectangle must not entirely fall outside the edges of the + * %Canvas control. If these conditions are not satisfied, the + * @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. + */ + result FillRectangle(const Color& color, const FloatRectangle& rect); + + /** + * Draws a round-edged rectangle. + * + * @since 2.0 + * + * @return An error code + * @param[in] rect The location and size of the rectangle @n + * The width and height of the rectangle must be greater than or equal to @c 0. + * The rectangle must not entirely fall outside the edges of the + * %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. + * @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. + */ + result DrawRoundRectangle(const Rectangle& rect, const Dimension& arcDim); + + /** + * Draws a round-edged rectangle. + * + * @since 2.1 + * + * @return An error code + * @param[in] rect The location and size of the rectangle @n + * The width and height of the rectangle must be greater than or equal to @c 0.0f. + * The rectangle must not entirely fall outside the edges of the + * %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. + * @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. + */ + result DrawRoundRectangle(const FloatRectangle& rect, const FloatDimension& arcDim); + + /** + * Draws a filled rectangle. + * + * @since 2.0 + * + * @return An error code + * @param[in] color The fill color + * @param[in] rect The location and size of the rectangle @n + * The width and height of the rectangle must be greater than or equal to @c 0. + * The rectangle must not entirely fall outside the edges of the + * %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. + * @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. + */ + result FillRoundRectangle(const Color& color, const Rectangle& rect, const Dimension& arcDim); + + /** + * Draws a filled rectangle. + * + * @since 2.1 + * + * @return An error code + * @param[in] color The fill color + * @param[in] rect The location and size of the rectangle @n + * The width and height of the rectangle must be greater than or equal to @c 0.0f. + * The rectangle must not entirely fall outside the edges of the + * %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. + * @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. + */ + result FillRoundRectangle(const Color& color, const FloatRectangle& rect, const FloatDimension& arcDim); + + /** + * Draws an ellipse. + * + * @since 2.0 + * + * @return An error code + * @param[in] rect The location and size of the bounding rectangle @n + * The width and height of the rectangle must be greater than or equal to @c 0. + * The rectangle must not entirely fall outside the edges of the + * %Canvas control. If these conditions are not satisfied, the + * @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. + */ + result DrawEllipse(const Rectangle& rect); + + /** + * Draws an ellipse. + * + * @since 2.1 + * + * @return An error code + * @param[in] rect The location and size of the bounding rectangle @n + * The width and height of the rectangle must be greater than or equal to @c 0.0f. + * The rectangle must not entirely fall outside the edges of the + * %Canvas control. If these conditions are not satisfied, the + * @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. + */ + result DrawEllipse(const FloatRectangle& rect); + + /** + * Draws a filled ellipse with the specified color. + * + * @since 2.0 + * + * @return An error code + * @param[in] color The fill color + * @param[in] rect The location and size of the bounding rectangle @n + * The width and height of the rectangle must be greater than or equal to @c 0. @n + * The rectangle must not entirely fall outside the edges of the + * %Canvas control. If these conditions are not satisfied, the + * @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. + */ + result FillEllipse(const Color& color, const Rectangle& rect); + + /** + * Draws a filled ellipse with a specified color. + * + * @since 2.1 + * + * @return An error code + * @param[in] color The fill color + * @param[in] rect The location and size of the bounding rectangle @n + * The width and height of the rectangle must be greater than or equal to @c 0.0f. @n + * The rectangle must not entirely fall outside the edges of the + * %Canvas control. If these conditions are not satisfied, the + * @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. + */ + result FillEllipse(const Color& color, const FloatRectangle& rect); + + /** + * Draws a circular arc. + * + * @since 2.0 + * + * @return An error code + * @param[in] rect The location and size of the bounding rectangle @n + * The width and height of the rectangle must be greater than or equal to @c 0. + * The rectangle must not entirely fall outside the edges of the + * %Canvas control. If these conditions are not satisfied, the + * @c E_OUT_OF_RANGE exception is returned. + * @param[in] startAngle The starting angle + * @param[in] endAngle The ending angle + * @param[in] arcStyle The arc style + * @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. + */ + result DrawArc(const Rectangle& rect, int startAngle, int endAngle, ArcStyle arcStyle); + + /** + * Draws a circular arc. + * + * @since 2.1 + * + * @return An error code + * @param[in] rect The location and size of the bounding rectangle @n + * The width and height of the rectangle must be greater than or equal to @c 0.0f. + * The rectangle must not entirely fall outside the edges of the + * %Canvas control. If these conditions are not satisfied, the + * @c E_OUT_OF_RANGE exception is returned. + * @param[in] startAngle The starting angle + * @param[in] endAngle The ending angle + * @param[in] arcStyle The arc style + * @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. + */ + result DrawArc(const FloatRectangle& rect, float startAngle, float endAngle, ArcStyle arcStyle); + + /** + * Draws a triangle. + * + * @since 2.0 + * + * @return An error code + * @param[in] point1 The location of the first vertex + * @param[in] point2 The location of the second vertex + * @param[in] point3 The location of the third vertex + * @exception E_SUCCESS The method is successful. + */ + result DrawTriangle(const Point& point1, const Point& point2, const Point& point3); + + /** + * Draws a triangle. + * + * @since 2.1 + * + * @return An error code + * @param[in] point1 The location of the first vertex + * @param[in] point2 The location of the second vertex + * @param[in] point3 The location of the third vertex + * @exception E_SUCCESS The method is successful. + */ + result DrawTriangle(const FloatPoint& point1, const FloatPoint& point2, const FloatPoint& point3); + + /** + * Draw a filled triangle with the specified color. + * + * @since 2.0 + * + * @return An error code + * @param[in] color The fill color + * @param[in] point1 The location of the first vertex + * @param[in] point2 The location of the second vertex + * @param[in] point3 The location of the third vertex + * @exception E_SUCCESS The method is successful. + */ + result FillTriangle(const Color& color, const Point& point1, const Point& point2, const Point& point3); + + /** + * Draw a filled triangle with a specified color. + * + * @since 2.1 + * + * @return An error code + * @param[in] color The fill color + * @param[in] point1 The location of the first vertex + * @param[in] point2 The location of the second vertex + * @param[in] point3 The location of the third vertex + * @exception E_SUCCESS The method is successful. + */ + result FillTriangle(const Color& color, const FloatPoint& point1, const FloatPoint& point2, const FloatPoint& point3); + + /** + * Draws a poly-line. + * + * @since 2.0 + * + * @return An error code + * @param[in] points A list containing the location of points @n + * The number of points must be greater than or equal to @c 0. + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + */ + result DrawPolyline(const Tizen::Base::Collection::IList& points); + + /** + * Draws a polygon. + * + * @since 2.0 + * + * @return An error code + * @param[in] points A list containing the locations of the vertices of the polygon @n + * The number of points must be greater than or equal to @c 0. + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + */ + result DrawPolygon(const Tizen::Base::Collection::IList& points); + + /** + * Draws a filled polygon with the specified color. + * + * @since 2.0 + * + * @return An error code + * @param[in] color The fill color + * @param[in] points A list containing the locations of the vertices of the polygon @n + * The number of points must be greater than or equal to @c 0. + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + */ + result FillPolygon(const Color& color, const Tizen::Base::Collection::IList& points); + + /** + * Sets a font to the %Canvas control. + * + * @since 2.0 + * + * @return An error code + * @param[in] font The font @n + * It must be constructed before being passed to this method. + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + */ + result SetFont(const Font& font); + + /** + * Gets a font of the %Canvas control. + * + * @since 2.0 + * + * @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. + * @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. + */ + Font* GetFontN(void) const; + + /** + * Draws a text at the specified location. + * + * @since 2.0 + * + * @return An error code + * @param[in] point The location to draw the text + * @param[in] text The text to draw + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @exception E_OPERATION_FAILED The operation has failed. + * @remarks + * - The foreground color (RGB value only) of the %Canvas control is used as the text color. + * - The em square has a defined font size. As a result, if the font's glyph exceeds its em square, it will be scaled down when it is drawn. + */ + result DrawText(const Point& point, const Tizen::Base::String& text); + + /** + * Draws a text at a specified location. + * + * @since 2.1 + * + * @return An error code + * @param[in] point The location to draw the text + * @param[in] text The text to draw + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @exception E_OPERATION_FAILED The operation has failed. + * @remarks + * - The foreground color (RGB value only) of the %Canvas control is used as the text color. + * - The em square has a defined font size. As a result, if the font's glyph exceeds its em square, it will be scaled down when it is drawn. + */ + result DrawText(const FloatPoint& point, const Tizen::Base::String& text); + + /** + * Draws a text at the specified location and length. + * + * @since 2.0 + * + * @return An error code + * @param[in] point The location to draw the text + * @param[in] text The text to draw + * @param[in] length The number of characters in the string @n + * It must be greater than or equal to @c 0. + * @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. + * @exception E_OPERATION_FAILED The operation has failed. + * @remarks + * - The foreground color (RGB value only) of the %Canvas control is used as the text color. + * - The em square has a defined font size. As a result, if the font's glyph exceeds its em square, it will be scaled down when it is drawn. + */ + result DrawText(const Point& point, const Tizen::Base::String& text, int length); + + /** + * Draws a text at a specified location and length. + * + * @since 2.1 + * + * @return An error code + * @param[in] point The location to draw the text + * @param[in] text The text to draw + * @param[in] length The number of characters in the string @n + * It must be greater than or equal to @c 0. + * @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. + * @exception E_OPERATION_FAILED The operation has failed. + * @remarks + * - The foreground color (RGB value only) of the %Canvas control is used as the text color. + * - The em square has a defined font size. As a result, if the font's glyph exceeds its em square, it will be scaled down when it is drawn. + */ + result DrawText(const FloatPoint& point, const Tizen::Base::String& text, int length); + + /** + * Draws a text with an outline rendering at the specified location. + * + * @since 2.0 + * + * @return An error code + * @param[in] point The location to draw the text + * @param[in] text The text to draw @n + * @param[in] outlineColor The color that is set as outline color + * @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. + * @exception E_OPERATION_FAILED The operation has failed. + * @remarks + * - The foreground color (RGB value only) of the %Canvas control is used as the text color. + * - The em square has a defined font size. As a result, if the font's glyph exceeds its em square, it will be scaled down when it is drawn. + */ + result DrawText(const Point& point, const Tizen::Base::String& text, const Color& outlineColor); + + /** + * Draws a text with an outline rendering at a specified location. + * + * @since 2.1 + * + * @return An error code + * @param[in] point The location to draw the text + * @param[in] text The text to draw + * @param[in] outlineColor The color that is set as outline color + * @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. + * @exception E_OPERATION_FAILED The operation has failed. + * @remarks + * - The foreground color (RGB value only) of the %Canvas control is used as the text color. + * - The em square has a defined font size. As a result, if the font's glyph exceeds its em square, it will be scaled down when it is drawn. + */ + result DrawText(const FloatPoint& point, const Tizen::Base::String& text, const Color& outlineColor); + + /** + * Draws a text with an outline rendering at the specified location and length. + * + * @since 2.0 + * + * @return An error code + * @param[in] point The location to draw the text + * @param[in] text The text to draw + * @param[in] length The number of characters in the string @n + * It must be greater than or equal to @c 0. + * @param[in] outlineColor The color that is set as outline color + * @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. + * @exception E_OPERATION_FAILED The operation has failed. + * @remarks + * - The foreground color (RGB value only) of the %Canvas control is used as the text color. + * - The em square has a defined font size. As a result, if the font's glyph exceeds its em square, it will be scaled down when it is drawn. + */ + result DrawText(const Point& point, const Tizen::Base::String& text, int length, const Color& outlineColor); + + /** + * Draws a text with an outline rendering at a specified location and length. + * + * @since 2.1 + * + * @return An error code + * @param[in] point The location to draw the text + * @param[in] text The text to draw + * @param[in] length The number of characters in the string @n + * It must be greater than or equal to @c 0. + * @param[in] outlineColor The color that is set as outline color + * @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. + * @exception E_OPERATION_FAILED The operation has failed. + * @remarks + * - The foreground color (RGB value only) of the %Canvas control is used as the text color. + * - The em square has a defined font size. As a result, if the font's glyph exceeds its em square, it will be scaled down when it is drawn. + */ + result DrawText(const FloatPoint& point, const Tizen::Base::String& text, int length, const Color& outlineColor); + + /** + * Draws an enriched text at the specified area. + * + * @since 2.0 + * + * @return An error code + * @param[in] point The location to draw the text + * @param[in] enrichedText The TextElement to draw + * @exception E_SUCCESS The method is successful. + * @exception E_DEVICE_UNAVAILABLE A specified device is invalid. + * @remarks + * - The foreground color (RGB value only) of the %Canvas control is used as the text color. + * - The em square has a defined font size. As a result, if the font's glyph exceeds its em square, it will be scaled down when it is drawn. + */ + result DrawText(const Point& point, const EnrichedText& enrichedText); + + /** + * Draws an enriched text at a specified area. + * + * @since 2.1 + * + * @return An error code + * @param[in] point The location to draw the text + * @param[in] enrichedText The TextElement to draw + * @exception E_SUCCESS The method is successful. + * @exception E_DEVICE_UNAVAILABLE A specified device is invalid. + * @remarks + * - The foreground color (RGB value only) of the %Canvas control is used as the text color. + * - The em square has a defined font size. As a result, if the font's glyph exceeds its em square, it will be scaled down when it is drawn. + */ + result DrawText(const FloatPoint& point, const EnrichedText& enrichedText); + + /** + * Draws a bitmap image at the specified location. + * + * @since 2.0 + * + * @return An error code + * @param[in] point The location of the upper-left corner of the bitmap + * @param[in] bitmap The bitmap to draw @n + * It must be constructed before being passed into this + * method. ::BITMAP_PIXEL_FORMAT_R8G8B8A8 is + * not applicable for this method. The bitmap must not + * entirely fall outside the edges of the %Canvas control. If + * this condition is not satisfied, the @c E_OUT_OF_RANGE exception + * is returned. + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + */ + result DrawBitmap(const Point& point, const Bitmap& bitmap); + + /** + * Draws a bitmap image at a specified location. + * + * @since 2.1 + * + * @return An error code + * @param[in] point The location of the upper-left corner of the bitmap + * @param[in] bitmap The bitmap to draw @n + * It must be constructed before being passed into this + * method. ::BITMAP_PIXEL_FORMAT_R8G8B8A8 is + * not applicable for this method. The bitmap must not + * entirely fall outside the edges of the %Canvas control. If + * this condition is not satisfied, the @c E_OUT_OF_RANGE exception + * is returned. + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + */ + result DrawBitmap(const FloatPoint& point, const Bitmap& bitmap); + + /** + * Draws a bitmap image at the specified location. + * + * @since 2.0 + * + * @return An error code + * @param[in] rect The location and size of the scaled bitmap @n + * The rectangle must not entirely fall outside the edges of the + * %Canvas control. If this condition is not satisfied, the + * @c E_OUT_OF_RANGE exception is returned. + * @param[in] bitmap The bitmap to draw @n + * It must be constructed well before being passed into this + * method. + * @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 BitmapPixelFormat::BITMAP_PIXEL_FORMAT_R8G8B8A8 is not applicable for this method. + */ + result DrawBitmap(const Rectangle& rect, const Bitmap& bitmap); + + /** + * Draws a bitmap image at a specified location. + * + * @since 2.1 + * + * @return An error code + * @param[in] rect The location and size of the scaled bitmap @n + * The rectangle must not entirely fall outside the edges of the + * %Canvas control. If this condition is not satisfied, the + * @c E_OUT_OF_RANGE exception is returned. + * @param[in] bitmap The bitmap to draw @n + * It must be constructed well before being passed into this + * method. + * @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. + */ + result DrawBitmap(const FloatRectangle& rect, const Bitmap& bitmap); + + /** + * Draws a color data corresponding to a rectangle of pixels from the specified bitmap onto %Canvas. + * + * @since 2.0 + * + * @return An error code + * @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 + * outside the edges of the %Canvas control. The destination + * rectangle of a %Canvas control must not fall outside the edges + * of the %Canvas control entirely. If these conditions are not + * satisfied, the @c E_OUT_OF_RANGE exception is returned. + * @param[in] srcBitmap The bitmap to draw + * @param[in] srcRect The source rectangle of a bitmap @n + * The width and height of the rectangle must be greater than or equal to @c 0. + * The rectangle defined by @c srcRect will be clipped at the edges + * of the bitmap to prevent the rectangle from falling outside the + * edges of the bitmap. The source rectangle of a bitmap must not + * fall outside the edges of the bitmap entirely. If these + * conditions are not satisfied, the @c E_OUT_OF_RANGE exception is + * thrown. + * @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 If the source and destination rectangles are not of the same size, + * the source bitmap is stretched to match the destination rectangle. @n + * ::BITMAP_PIXEL_FORMAT_R8G8B8A8 is not applicable for this method. + */ + result DrawBitmap(const Rectangle& destRect, const Bitmap& srcBitmap, const Rectangle& srcRect); + + /** + * Draws a color data corresponding to a rectangle of pixels from a specified bitmap onto %Canvas. + * + * @since 2.1 + * + * @return An error code + * @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.0f. + * The rectangle defined by @c destRect will be clipped at the edges + * of the %Canvas control to prevent the rectangle from falling + * outside the edges of the %Canvas control. The destination + * rectangle of a %Canvas control must not fall outside the edges + * of the %Canvas control entirely. If these conditions are not + * satisfied, the @c E_OUT_OF_RANGE exception is returned. + * @param[in] srcBitmap The bitmap to draw + * @param[in] srcRect The source rectangle of a bitmap @n + * The width and height of the rectangle must be greater than or equal to @c 0.0f. + * The rectangle defined by @c srcRect will be clipped at the edges + * of the bitmap to prevent the rectangle from falling outside the + * edges of the bitmap. The source rectangle of a bitmap must not + * fall outside the edges of the bitmap entirely. If these + * conditions are not satisfied, the @c E_OUT_OF_RANGE exception is + * thrown. + * @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 If the source and destination rectangles are not of the same size, + * the source bitmap is stretched to match the destination rectangle. @n + * ::BITMAP_PIXEL_FORMAT_R8G8B8A8 is not applicable for this method. + */ + result DrawBitmap(const FloatRectangle& destRect, const Bitmap& srcBitmap, const FloatRectangle& srcRect); + + /** + * Draws a flipped bitmap image at the specified location. + * + * @since 2.0 + * + * @return An error code + * @param[in] point The location to draw the bitmap + * @param[in] bitmap The bitmap to draw @n + * It must be constructed before being passed to this method. + * @param[in] dir The flip direction + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @remarks ::BITMAP_PIXEL_FORMAT_R8G8B8A8 is not applicable for this method. + */ + result DrawBitmap(const Point& point, const Bitmap& bitmap, FlipDirection dir); + + /** + * Draws a flipped bitmap image at a specified location. + * + * @since 2.1 + * + * @return An error code + * @param[in] point The location to draw the bitmap + * @param[in] bitmap The bitmap to draw @n + * It must be constructed before being passed to this method. + * @param[in] dir The flip direction + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @remarks ::BITMAP_PIXEL_FORMAT_R8G8B8A8 is not applicable for this method. + */ + result DrawBitmap(const FloatPoint& point, const Bitmap& bitmap, FlipDirection dir); + + /** + * Draws a rotated bitmap image at the specified location. + * + * @since 2.0 + * + * @return An error code + * @param[in] point A location to draw a bitmap image @n + * This location is relatively defined from the origin (upper-left + * corner) of the %Canvas control. + * @param[in] bitmap The bitmap to draw @n + * It must be constructed before being passed to this method. + * @param[in] pivot The center of rotation of a bitmap image @n + * This center is relatively defined from the origin (upper-left + * corner) of the bitmap. + * @param[in] degree The amount of rotation in degrees + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @remarks ::BITMAP_PIXEL_FORMAT_R8G8B8A8 is not applicable for this method. + * This method faces a problem while working in an unbounded region and it affects the whole Canvas pixels in the case of ::COMPOSITE_MODE_SRC or ::COMPOSITE_MODE_CLEAR. + * @image html graphics_rotatebitmap.PNG + */ + result DrawBitmap(const Point& point, const Bitmap& bitmap, const Point& pivot, int degree); + + /** + * Draws a rotated bitmap image at a specified location. + * + * @since 2.1 + * + * @return An error code + * @param[in] point A location to draw a bitmap image @n + * This location is relatively defined from the origin (upper-left + * corner) of the %Canvas control. + * @param[in] bitmap The bitmap to draw @n + * It must be constructed before being passed to this method. + * @param[in] pivot The center of rotation of a bitmap image @n + * This center is relatively defined from the origin (upper-left + * corner) of the bitmap. + * @param[in] degree The amount of rotation in degrees + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @remarks ::BITMAP_PIXEL_FORMAT_R8G8B8A8 is not applicable for this method. + * This method faces a problem while working in an unbounded region and it affects the whole %Canvas pixels in the case of ::COMPOSITE_MODE_SRC or ::COMPOSITE_MODE_CLEAR. + * @image html graphics_rotatebitmap.PNG + */ + result DrawBitmap(const FloatPoint& point, const Bitmap& bitmap, const FloatPoint& pivot, float degree); + + /** + * Draws a nine-patched bitmap at the specified location. + * + * @since 2.0 + * + * @return An error code + * @param[in] rect The location and size of the nine-patched bitmap @n + * The rectangle must not entirely fall outside the edges of the + * %Canvas control. If this condition is not satisfied, the + * @c E_OUT_OF_RANGE exception is returned. + * @param[in] bitmap The bitmap to draw @n + * It must be constructed before being passed to this method. + * @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. + * - 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 + * + */ + result DrawNinePatchedBitmap(const Rectangle& rect, const Bitmap& bitmap); + + /** + * Draws a nine-patched bitmap at a specified location. + * + * @since 2.1 + * + * @return An error code + * @param[in] rect The location and size of the nine-patched bitmap @n + * The rectangle must not entirely fall outside the edges of the + * %Canvas control. If this condition is not satisfied, the + * @c E_OUT_OF_RANGE exception is returned. + * @param[in] bitmap The bitmap to draw @n + * It must be constructed before being passed to this method. + * @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. + * - 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 + * + */ + result DrawNinePatchedBitmap(const FloatRectangle& rect, const Bitmap& bitmap); + + /** + * Shows the current instance of %Canvas on the device screen. + * + * @if OSPCOMPAT + * @brief [Compatibility] + * @endif + * @since 2.0 + * @if OSPCOMPAT + * @compatibility This method has compatibility issues with OSP compatible applications @n + * For more information, see the issue description for @ref CompCanvasShowPage "here". + * @endif + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_UNSUPPORTED_OPERATION This operation is not supported. + * + */ + result Show(void); + + /** + * @if OSPCOMPAT + * @page CompCanvasShowPage Compatibility for Show(). + * @section CompCanvasShowPageIssueSection Issues + * In Tizen, memory canvas is not fully supported, and we cannot guarantee that Show() for memory canvas of Tizen does the same operation with that of OSP. + * + * -# In OSP, when Show() is called for a Memory Canvas, the canvas was copied to the screen and E_SUCCESS was returned, but the canvas is not guaranteed to be displayed properly. + * -# In Tizen, Show() does not function for a Memory Canvas, so E_UNSUPPORTED_OPERATION is returned. Memory Canvases cannot be used to directly show its content on screen. + * + * @endif + */ + + + /** + * @if OSPDEPREC + * Shows the specified rectangle of the current instance of %Canvas on the device screen. + * + * @brief [Deprecated] + * @deprecated This method is deprecated. Instead of this method, use the Show(). + * @since 2.0 + * + * @return An error code + * @param[in] rect The bounds of the %Canvas control to display @n + * The width and height of the rectangle must be greater than or equal to @c 0. + * The rectangle must not entirely fall outside the edges of the + * %Canvas control. If these conditions are not satisfied, the + * @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. + * + * @remark If you use Show(Rectangle&) in Tizen, this method works differently. @n + * This method shows the screen entirely not partially in Tizen. + * @endif + */ + result Show(const Rectangle& rect); + + /** + * Gets the location and size of the current %Canvas instance on the device screen. + * + * @since 2.0 + * + * @return The Rectangle instance containing the location and size of the current %Canvas instance + * @remarks If this %Canvas instance is a Window %Canvas, it returns Rectangle(0, 0, w, h). + */ + Rectangle GetBounds(void) const; + + /** + * Gets the location and size of the current %Canvas instance on the device screen. + * + * @since 2.1 + * + * @return The FloatRectangle instance containing the location and size of the current %Canvas instance + * @remarks If this %Canvas instance is a Window %Canvas, it returns FloatRectangle(0.0f, 0.0f, w, h). + */ + FloatRectangle GetBoundsF(void) const; + + /** + * Gets the actual location and size of the current %Canvas instance on the device screen. + * + * @since 2.1 + * + * @return The FloatRectangle instance containing the actual location and size of the current %Canvas instance + * @remarks If this %Canvas instance is a Window %Canvas, it returns FloatRectangle(0.0f, 0.0f, w, h). + */ + FloatRectangle GetActualBounds(void) const; + + /** + * Sets the clip rectangle for a %Canvas control. @n + * When a clip rectangle is set, any drawing is restricted within the specified rectangular area. The + * rectangular area defined is clipped at the edges of the %Canvas control so as to prevent the clipped rectangle + * from falling outside the %Canvas control. + * + * @since 2.0 + * + * @return An error code + * @param[in] rect The bounds of the clip rectangle @n + * The width and height of the rectangle must be greater than or equal to @c 0. + * The clip rectangle for a %Canvas control must not entirely fall + * outside the edges of the %Canvas control. If these conditions are + * not satisfied, the @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. + */ + result SetClipBounds(const Rectangle& rect); + + /** + * Sets the clip rectangle for a %Canvas control. @n + * When a clip rectangle is set, any drawing is restricted within a specified rectangular area. The + * rectangular area defined is clipped at the edges of the %Canvas control so as to prevent the clipped rectangle + * from falling outside the %Canvas control. + * + * @since 2.1 + * + * @return An error code + * @param[in] rect The bounds of the clip rectangle @n + * The width and height of the rectangle must be greater than or equal to @c 0.0f. + * The clip rectangle for a %Canvas control must not entirely fall + * outside the edges of the %Canvas control. If these conditions are + * not satisfied, the @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. + */ + result SetClipBounds(const FloatRectangle& rect); + + /** + * Gets the bounds of the clip rectangle of a %Canvas control. + * + * @since 2.0 + * + * @return An instance of Rectangle indicating the bounds of the clip rectangle + */ + Rectangle GetClipBounds(void) const; + + /** + * Gets the bounds of the clip rectangle of a %Canvas control. + * + * @since 2.1 + * + * @return An instance of FloatRectangle indicating the bounds of the clip rectangle + */ + FloatRectangle GetClipBoundsF(void) const; + + /** + * Locks the %Canvas control for direct pixel access. @n + * This sets up a %Canvas control for accessing the pixels directly. Between the calls to the + * %Canvas::Lock() and Canvas::Unlock() methods, the data can be written to and read from the + * %Canvas control's pixels. Once the operations on the %Canvas control's pixels are finished, the + * %Canvas::Unlock() method must be called to release the lock. + * + * @since 2.0 + * + * @return An error code + * @param[out] info The information of the %Canvas control + * @param[in] timeout The time, in milliseconds, that the caller waits to obtain the lock @n + * If the lock attempt fails, @c E_TIMEOUT is returned. The default value + * is @c INFINITE, which means that the method does not return until the lock + * is acquired. + * @exception E_SUCCESS The method is successful. + * @exception E_TIMEOUT The operation cannot be completed within the specified time period. + * @exception E_SYSTEM An unknown operating system error has occurred. + * @remarks BufferInfo contains a valid physical memory information, regardless of the + * logical position and size of the %Canvas control. + */ + result Lock(BufferInfo& info, long timeout = INFINITE); + + /** + * Unlocks the %Canvas control. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM An unknown operating system error has occurred. + * @remarks The %Canvas control must be unlocked as soon as possible. + */ + result Unlock(void); + + /** + * Sets the foreground color. + * + * @since 2.0 + * + * @param[in] color The color that is set as foreground color + */ + void SetForegroundColor(const Color& color); + + /** + * Gets the foreground color. + * + * @since 2.0 + * + * @return The foreground color + */ + Color GetForegroundColor(void) const; + + /** + * Sets the background color. + * + * @since 2.0 + * + * @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); + + /** + * Gets the background color. + * + * @since 2.0 + * + * @return The background color + */ + Color GetBackgroundColor(void) const; + + /** + * Sets the current instance of %Canvas to the specified point. + * + * @brief [Deprecated] + * @deprecated This method is deprecated. + * @since 2.0 + * + * @return An error code + * @param[in] point The new position + * @exception E_SUCCESS The method is successful. + * @exception E_UNSUPPORTED_OPERATION Window %Canvas does not support moving the position. + * @remarks This method has been influenced on only Memory canvas. However, Show() for Memory canvas is not supported anymore. + */ + result SetPosition(const Point& point); + + /** + * Sets the current instance of %Canvas to the specified point. + * + * @brief [Deprecated] + * @deprecated This method is deprecated. + * @since 2.0 + * + * @return An error code + * @param[in] x The new x-coordinate + * @param[in] y The new y-coordinate + * @exception E_SUCCESS The method is successful. + * @exception E_UNSUPPORTED_OPERATION Window %Canvas does not support moving the position. + * @remarks This method has been influenced on only Memory canvas. However, Show() for Memory canvas is not supported anymore. + */ + result SetPosition(int x, int y); + + /** + * Sets the composite mode. + * + * @since 2.1 + * + * @return An error code + * @param[in] compositeMode The new composite mode + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + */ + result SetCompositeMode(CompositeMode compositeMode); + + /** + * Gets the composite mode for the current instance. + * + * @since 2.1 + * + * @return The current composite mode @n + * The default value is @c COMPOSITE_MODE_SRC_OVER. + */ + CompositeMode GetCompositeMode(void) const; + + /** + * Enables or disables anti-aliasing to the current instance of %Canvas. + * + * @since 2.1 + * + * @param[in] enable Set to @c true to enable anti-aliasing for the current instance of %Canvas, @n + * else @c false + * @remarks By default, the anti-aliasing is enabled. + */ + void SetAntiAliasingEnabled(bool enable); + + /** + * Checks whether anti-aliasing is enabled to the current instance. + * + * @since 2.1 + * + * @return @c true if the anti-aliasing is enabled to the current instance. + * else @c false + */ + bool IsAntiAliasingEnabled(void) const; + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + Canvas(const Canvas& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + Canvas& operator =(const Canvas& rhs); + + friend class Bitmap; + friend class TextElement; + +private: + friend class _CanvasImpl; + + // + // This variable is for internal use only. + // Using this variable can cause behavioral, security-related, and consistency-related issues in the application. + // + // @since 2.0 + // + class _CanvasImpl* __pImpl; + +}; // Canvas + +}} // Tizen::Graphics + +#endif //_FGRP_CANVAS_H_ diff --git a/inc/FGrpCanvasCommon.h b/inc/FGrpCanvasCommon.h new file mode 100644 index 0000000..d18072e --- /dev/null +++ b/inc/FGrpCanvasCommon.h @@ -0,0 +1,140 @@ +// +// 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 FGrpCanvasCommon.h + * @brief This is the header file for the enumerations of the Canvas class. + * + * This header file contains the definitions of the enumerations of the Canvas class. + */ + +#ifndef _FGRP_CANVAS_COMMON_H_ +#define _FGRP_CANVAS_COMMON_H_ + +namespace Tizen { namespace Graphics +{ +/** + * @enum LineStyle + * + * Defines the line style. + * + * @since 2.0 + */ +enum LineStyle +{ + LINE_STYLE_SOLID = 1, /**< The solid line style */ + LINE_STYLE_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. + LINE_STYLE_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. +}; + +/** + * @enum ArcStyle + * + * Defines the arc style. + * + * @since 2.0 + */ +enum ArcStyle +{ + ARC_STYLE_ONLY = 1, /**< An arc line is drawn */ + ARC_STYLE_PIE, /**< A pie (arc and chords) is drawn */ + ARC_STYLE_CHORD, /**< A chord is drawn */ + ARC_STYLE_FILLED_PIE, /**< A filled pie is drawn */ + ARC_STYLE_FILLED_CHORD, /**< A filled chord is drawn */ + ARC_STYLE_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. + ARC_STYLE_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. +}; + +/** + * @enum FlipDirection + * + * Defines the flip direction. + * + * @since 2.0 + */ +enum FlipDirection +{ + FLIP_DIRECTION_HORIZONTAL = 1, /**< The horizontal type */ + FLIP_DIRECTION_VERTICAL, /**< The vertical type */ + FLIP_DIRECTION_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. + FLIP_DIRECTION_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. +}; + +/** + * @enum LineCapStyle + * + * Defines the line cap style. + * + * @since 2.1 + */ +enum LineCapStyle +{ + LINE_CAP_STYLE_ROUND, /**< A rounded end */ + LINE_CAP_STYLE_BUTT, /**< A flat end */ + LINE_CAP_STYLE_SQUARE /**< A square end */ +}; + +/** + * @enum LineJoinStyle + * + * Defines the line join style. + * + * @since 2.1 + */ +enum LineJoinStyle +{ + LINE_JOIN_STYLE_ROUND, /**< A rounded corner */ + LINE_JOIN_STYLE_MITER, /**< A sharp corner */ + LINE_JOIN_STYLE_BEVEL /**< A beveled corner */ +}; + +/** +* @enum CompositeMode +* +* Defines the composite mode. +* +* @since 2.1 +* +* @remarks The area affected by Canvas::CompositeMode can be either bounded or unbounded. +* In some cases, the area in which composition is performed can be bounded by the source region, or unbounded and the composition affects all of the Canvas pixels. +*/ +enum CompositeMode +{ + COMPOSITE_MODE_CLEAR, /**< Clearing destination that is bounded */ + COMPOSITE_MODE_SRC, /**< Replacing source that is bounded */ + COMPOSITE_MODE_DST, /**< Ignoring the destination */ + COMPOSITE_MODE_SRC_OVER, /**< Drawing source on top of a destination */ + COMPOSITE_MODE_DST_OVER, /**< Drawing destination on top of a source */ + COMPOSITE_MODE_SRC_IN, /**< Drawing source only on the area that is overlapped by source and destination and it is unbounded */ + COMPOSITE_MODE_DST_IN, /**< Drawing destination only on the area that is overlapped by source and destination and it is unbounded */ + COMPOSITE_MODE_SRC_OUT, /**< Drawing source only on the area that is not overlapped by source and destination and it is unbounded */ + COMPOSITE_MODE_DST_OUT, /**< Drawing destination only on the area that is not overlapped by source and destination */ + COMPOSITE_MODE_SRC_ATOP, /**< Replacing source only on the area that is overlapped by source and destination */ + COMPOSITE_MODE_DST_ATOP, /**< Replacing destination only on the area that is overlapped by source and destination and it is unbounded */ + COMPOSITE_MODE_DST_XOR, /**< Drawing source and destination on the area that is other than the area overlapped by source and destination */ + COMPOSITE_MODE_ADD, /**< Adding source and destination */ + COMPOSITE_MODE_SATURATE, /**< Compositing like @c COMPOSITE_MODE_SRC_OVER as long as source and destination are disjoint geometries */ + COMPOSITE_MODE_MULTIPLY, /**< Multiplying source and destination */ + COMPOSITE_MODE_SCREEN, /**< Complementing and multiplying source and destination */ + COMPOSITE_MODE_OVERLAY, /**< Multiplying and screening destination based on the area that is overlapped by source and destination and destination color */ + COMPOSITE_MODE_DARKEN, /**< Darkening the destination based on the area that is overlapped by source and destination and destination color */ + COMPOSITE_MODE_LIGHTEN /**< Lightening destination based on the area that is overlapped by source and destination and destination color */ +}; + +} } // Tizen::Graphics + +#endif // _FGRP_CANVAS_COMMON_H_ diff --git a/inc/FGrpCanvasTexture.h b/inc/FGrpCanvasTexture.h new file mode 100644 index 0000000..cc8b3a3 --- /dev/null +++ b/inc/FGrpCanvasTexture.h @@ -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 FGrpCanvasTexture.h + * @brief This is the header file for the %CanvasTexture class. + * + * This header file contains the declarations of the %CanvasTexture class. + * + */ + +#ifndef _FGRP_CANVAS_TEXTURE_H_ +#define _FGRP_CANVAS_TEXTURE_H_ + +#include + +namespace Tizen { namespace Graphics { +class Canvas; +}} + +namespace Tizen { namespace Graphics { namespace Opengl +{ + +/** + * @class CanvasTexture + * @brief This class provides a method to bind 2D %Canvas and OpenGL-ES Texture. + * + * @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. + * + */ +class _OSP_EXPORT_ CanvasTexture + : public Tizen::Base::Object +{ +public: + /** + * 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 + * + */ + CanvasTexture(void); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~CanvasTexture(void); + + /** + * Initializes this instance of %CanvasTexture with the specified parameters. + * + * @since 2.0 + * @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 @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. + * @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. + */ + result Construct(int textureId, int width, int height); + + /** + * Returns a 2D Canvas which is associated with the Texture of %CanvasTexture. + * + * @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. + * @exception E_OPERATION_FAILED The method fails to construct the canvas properly due to some system error. + */ + Tizen::Graphics::Canvas* GetCanvasN(void) const; + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + // @param[in] rhs The source from which this instance is copied + // + CanvasTexture(const CanvasTexture& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + // @param[in] rhs An instance of %CanvasTexture + // + CanvasTexture& operator =(const CanvasTexture& rhs); + +private: + friend class _CanvasTextureImpl; + + class _CanvasTextureImpl* __pImpl; +}; // CanvasTexture + +}}} // Tizen::Graphics::Opengl + +#endif //_FGRP_CANVAS_TEXTURE_H_ diff --git a/inc/FGrpColor.h b/inc/FGrpColor.h new file mode 100644 index 0000000..d261659 --- /dev/null +++ b/inc/FGrpColor.h @@ -0,0 +1,492 @@ +// +// 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 FGrpColor.h + * @brief This is the header file for the %Color class. + * + * This header file contains the declarations of the %Color class. + * + */ + +#ifndef _FGRP_COLOR_H_ +#define _FGRP_COLOR_H_ + +#include +#include + +namespace Tizen { namespace Graphics +{ + +/** + * @class Color32 + * @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. + * + * @code + * + * #include + * + * using namespace Tizen::Graphics; + * + * // 0xFFFF00FF: Opaque magenta + * const unsigned int MY_COLOR1 = Color32<255, 0, 255>::Value; + * + * // 0x80FF0000: Red with 50% opacity + * const unsigned int MY_COLOR2 = Color32<255, 0, 0, 128>::Value; + * + * @endcode + */ +template +struct Color32 +{ + enum + { + Value = static_cast(alpha) << 24 | + static_cast(red) << 16 | + static_cast(green) << 8 | + static_cast(blue) + }; +}; + +/** + * @enum ColorId + * + * Defines the color ID. + * + * @since 2.0 + */ +enum ColorId +{ + COLOR_ID_BLACK, /**< This attribute is pre-defined. Its value is black. */ + COLOR_ID_BLUE, /**< This attribute is pre-defined. Its value is blue. */ + COLOR_ID_CYAN, /**< This attribute is pre-defined. Its value is cyan. */ + COLOR_ID_GREEN, /**< This attribute is pre-defined. Its value is green. */ + COLOR_ID_GREY, /**< This attribute is pre-defined. Its value is grey. */ + COLOR_ID_MAGENTA, /**< This attribute is pre-defined. Its value is magenta. */ + COLOR_ID_RED, /**< This attribute is pre-defined. Its value is red. */ + COLOR_ID_VIOLET, /**< This attribute is pre-defined. Its value is violet. */ + COLOR_ID_YELLOW, /**< This attribute is pre-defined. Its value is yellow. */ + COLOR_ID_WHITE /**< This attribute is pre-defined. Its value is white. */ +}; + +/** + * @class Color + * @brief This class encapsulates a color. + * + * @since 2.0 + * + * @final This class is not intended for extension. + * + * The %Color class provides an ARGB (Alpha, Red, Green, Blue) color model. + * + * For more information on the class features, see Color. + */ +class _OSP_EXPORT_ Color + : public Tizen::Base::Object +{ + +public: + /** + * This is the default constructor for this class. + * + * @since 2.0 + */ + Color(void); + + /** + * This is the copy constructor for the %Color class. @n + * This constructor initializes the instance of %Color with the attributes of the specified instance of %Color. + * + * @since 2.0 + * + * @param[in] rhs An instance of %Color + */ + Color(const Color& rhs); + + /** + * Initializes the instance of %Color with the specified ARGB values. + * + * @since 2.0 + * + * @param[in] r The red component + * @param[in] g The green component + * @param[in] b The blue component + * @param[in] a The alpha component + */ + Color(byte r, byte g, byte b, byte a = 0xFF); + + /** + * Initializes the instance of %Color with the specified RGB value. + * + * @since 2.0 + * + * @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 + */ + Color(unsigned int rgb, bool hasAlpha = true); + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~Color(void); + + +public: + /** + * Checks whether the two instances of %Color are equal. + * + * @since 2.0 + * + * @return @c true if the values of the two instances of %Color are equal, @n + * else @c false + * @param[in] rhs An instance of %Color + */ + bool operator ==(const Color& rhs) const; + + /** + * Checks whether the two instances of %Color are not equal. + * + * @since 2.0 + * + * @return @c true if the values of the two instances of %Color are not equal, @n + * else @c false + * @param[in] rhs An instance of %Color + * + */ + bool operator !=(const Color& rhs) const; + + /** + * Assigns the values of the RGB components of the specified instance to the current instance of %Color. + * + * @since 2.0 + * + * @return The reference to the instance of %Color + * @param[in] rhs An instance of %Color + */ + Color& operator =(const Color& rhs); + + +public: + /** + * Checks whether the current instance of %Color equals the specified instance of %Color. + * + * @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] 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. + */ + virtual bool Equals(const Tizen::Base::Object& rhs) const; + + /** + * Gets the hash value of the current instance of %Color. + * + * @since 2.0 + * + * @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; + + +public: + /** + * Gets the value of the alpha component of the current instance of %Color. + * + * @since 2.0 + * + * @return A @c byte representation of the alpha component of the current instance of %Color + */ + byte GetAlpha(void) const; + + /** + * Gets the value of the red component of the current instance of %Color. + * + * @since 2.0 + * + * @return A @c byte representation of the red component of the current instance of %Color + */ + byte GetRed(void) const; + + /** + * Gets the value of the blue component of the current instance of %Color. + * + * @since 2.0 + * + * @return A @c byte representation of the blue component of the current instance of %Color + */ + byte GetBlue(void) const; + + /** + * Gets the value of the green component of the current instance of %Color. + * + * @since 2.0 + * + * @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 + * + * @param[out] r The red component + * @param[out] g The green component + * @param[out] b The blue component + * @param[out] a The alpha component + */ + void GetColorComponents(byte& r, byte& g, byte& b, byte& a) const; + + /** + * Gets the 32-bit integer value of the current instance of %Color. + * + * @since 2.0 + * + * @return An @c unsigned integer value representing the current instance of %Color + */ + unsigned int GetRGB32(void) const; + + /** + * Sets the value of the alpha component of the current instance of %Color. + * + * @since 2.0 + * + * @param[in] a The new value of the alpha component + */ + void SetAlpha(byte a); + + /** + * Sets the value of the red component of the current instance of %Color. + * + * @since 2.0 + * + * @param[in] r The new value of the red component + */ + void SetRed(byte r); + + /** + * Sets the value of the green component of the current instance of %Color. + * + * @since 2.0 + * + * @param[in] g The new value of the green component + */ + void SetGreen(byte g); + + /** + * Sets the value of the blue component of the current instance of %Color. + * + * @since 2.0 + * + * @param[in] b The new value of the blue component + */ + void SetBlue(byte b); + + /** + * Sets the values of the ARGB components of the current instance of %Color. + * + * @since 2.0 + * + * @param[in] r The red component + * @param[in] g The green component + * @param[in] b The blue component + * @param[in] a The alpha component + */ + void SetColorComponents(byte r, byte g, byte b, byte a = 0xFF); + + /** + * Sets the current instance of %Color to the specified 32-bit integer value. + * + * @since 2.0 + * + * @param[in] rgb The new RGB color value + * @param[in] hasAlpha @c true if @c rgb contains alpha value, @n + else @c false + */ + void SetRGB32(unsigned int rgb, bool hasAlpha = true); + + /** + * 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 + */ + static Color GetColor(ColorId colorId); + + +public: + /** + * @if OSPDEPREC + * This attribute is pre-defined. Its value is black. + * + * @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). + * @endif + */ + const static Color COLOR_BLACK; + + /** + * @if OSPDEPREC + * This attribute is pre-defined. Its value is blue. + * + * @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). + * @endif + */ + const static Color COLOR_BLUE; + + /** + * @if OSPDEPREC + * This attribute is pre-defined. Its value is cyan. + * + * @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). + * @endif + */ + const static Color COLOR_CYAN; + + /** + * @if OSPDEPREC + * This attribute is pre-defined. Its value is green. + * + * @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). + * @endif + */ + const static Color COLOR_GREEN; + + /** + * @if OSPDEPREC + * This attribute is pre-defined. Its value is grey. + * + * @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). + * @endif + */ + const static Color COLOR_GREY; + + /** + * @if OSPDEPREC + * This attribute is pre-defined. Its value is magenta. + * + * @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). + * @endif + */ + const static Color COLOR_MAGENTA; + + /** + * @if OSPDEPREC + * This attribute is pre-defined. Its value is red. + * + * @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_RED). + * @endif + */ + const static Color COLOR_RED; + + /** + * @if OSPDEPREC + * This attribute is pre-defined. Its value is violet. + * + * @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). + * @endif + */ + const static Color COLOR_VIOLET; + + /** + * @if OSPDEPREC + * This attribute is pre-defined. Its value is yellow. + * + * @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). + * @endif + */ + const static Color COLOR_YELLOW; + + /** + * @if OSPDEPREC + * 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). + * @endif + */ + const static Color COLOR_WHITE; + + +private: + unsigned int __color; + + friend class _ColorImpl; + + // + // This variable is for internal use only. + // Using this variable can cause behavioral, security-related, and consistency-related issues in the application. + // + // @since 2.0 + // + class _ColorImpl * __pImpl; + +}; // Color + +}} // Tizen::Graphics + +#endif //_FGRP_COLOR_H_ diff --git a/inc/FGrpCoordinateSystem.h b/inc/FGrpCoordinateSystem.h new file mode 100644 index 0000000..149643f --- /dev/null +++ b/inc/FGrpCoordinateSystem.h @@ -0,0 +1,194 @@ +// +// 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 FGrpCoordinateSystem.h + * @brief This is the header file for the %CoordinateSystem class. + * + * This header file contains the declarations of the %CoordinateSystem class. + */ + +#ifndef _FGRP_COORDINATE_SYSTEM_H_ +#define _FGRP_COORDINATE_SYSTEM_H_ + + +#include +#include +#include +#include + + +namespace Tizen { namespace Graphics +{ + +/** + * @class CoordinateSystem + * @brief This class provides various utility methods for coordinate handling. + * + * @since 2.0 + * + * The %CoordinateSystem class provides various utility methods for coordinate handling. + * + */ +class _OSP_EXPORT_ CoordinateSystem +{ +public: + /** + * Returns the screen resolution in logical coordinates. + * + * @since 2.0 + * + * @return The screen resolution in logical coordinates + */ + static Dimension GetLogicalResolution(void); + + /** + * Returns the screen resolution in physical coordinates. + * + * @since 2.0 + * + * @return The screen resolution in physical coordinates + */ + static Dimension GetPhysicalResolution(void); + + /** + * Converts the physical value along x-axis to the logical one. + * + * @since 2.0 + * + * @return The converted logical value for the physical one + * @param[in] physicalX An input physical value to convert + */ + static int ConvertToLogicalX(int physicalX); + + /** + * Converts the physical value along x-axis to the logical one. + * + * @since 2.1 + * + * @return The converted logical value for the physical one + * @param[in] physicalX An input physical value to convert + */ + static float ConvertToLogicalX(float physicalX); + + /** + * Converts the physical value along y-axis to the logical one. + * + * @since 2.0 + * + * @return The converted logical value for the physical one + * @param[in] physicalY An input physical value to convert + */ + static int ConvertToLogicalY(int physicalY); + + /** + * Converts the physical value along y-axis to the logical one. + * + * @since 2.1 + * + * @return The converted logical value for the physical one + * @param[in] physicalY An input physical value to convert + */ + static float ConvertToLogicalY(float physicalY); + + /** + * Converts the logical value along x-axis to the physical one. + * + * @since 2.0 + * + * @return The converted physical X value + * @param[in] logicalX An input logical value to convert + */ + static int ConvertToPhysicalX(int logicalX); + + /** + * Converts the logical value along x-axis to the physical one. + * + * @since 2.1 + * + * @return The converted physical X value + * @param[in] logicalX An input logical value to convert + */ + static float ConvertToPhysicalX(float logicalX); + + /** + * Converts the logical value along y-axis to the physical one. + * + * @since 2.0 + * + * @return The converted physical Y value + * @param[in] logicalY An input logical value to convert + */ + static int ConvertToPhysicalY(int logicalY); + + /** + * Converts the logical value along y-axis to the physical one. + * + * @since 2.1 + * + * @return The converted physical Y value + * @param[in] logicalY An input logical value to convert + */ + static float ConvertToPhysicalY(float logicalY); + + /** + * Returns the FloatPoint instance, which will be pixel-exact for the device coordinate system to display the best appearance. + * + * @since 2.1 + * + * @return Device aligned point + * @param[in] point The input point to align + */ + static FloatPoint AlignToDevice(const FloatPoint& point); + + /** + * Returns the FloatDimension instance, which will be pixel-exact for the device coordinate system to display the best appearance. + * + * @since 2.1 + * + * @return Device aligned dimension + * @param[in] dimension The input dimension to align + */ + static FloatDimension AlignToDevice(const FloatDimension& dimension); + + /** + * Returns the FloatRectangle instance, which will be pixel-exact for the device coordinate system to display the best appearance. + * + * @since 2.1 + * + * @return Device aligned rectangle + * @param[in] rectangle The input rectangle to align + */ + static FloatRectangle AlignToDevice(const FloatRectangle& rectangle); + +private: + // + // This default constructor is intentionally declared as private because this class cannot be constructed. + // + CoordinateSystem(void); + + // + // This destructor is intentionally declared as private because this class cannot be constructed. + // + ~CoordinateSystem(void); + +}; // CoordinateSystem + +}} // Tizen::Graphics + +#endif // _FGRP_COORDINATE_SYSTEM_H_ + diff --git a/inc/FGrpDimension.h b/inc/FGrpDimension.h new file mode 100644 index 0000000..06df193 --- /dev/null +++ b/inc/FGrpDimension.h @@ -0,0 +1,178 @@ +// +// 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 FGrpDimension.h + * @brief This is the header file for the %Dimension class. + * + * This header file contains the declarations of the %Dimension class. + */ + +#ifndef _FGRP_DIMENSION_H_ +#define _FGRP_DIMENSION_H_ + +#include + +namespace Tizen { namespace Graphics +{ +/** + * @class Dimension + * @brief This class represents the width and height of a two-dimensional region. + * + * @since 2.0 + * + * @final This class is not intended for extension. + * + * The %Dimension class provides methods to abstract and set the width and height of a two-dimensional region. + * + * For more information on the class features, see Shapes. + * + */ +class _OSP_EXPORT_ Dimension + : public Tizen::Base::Object +{ +public: + /** + * This is the default constructor for this class. @n + * This constructor initializes an instance of %Dimension with the width and the height set as @c 0. + * + * @since 2.0 + */ + Dimension(void); + + /** + * This is the copy constructor for the %Dimension class. + * + * @since 2.0 + * + * @param[in] rhs An instance of %Dimension + */ + Dimension(const Dimension& rhs); + + /** + * Initializes an instance of %Dimension with the specified values of width and height. + * + * @since 2.0 + * + * @param[in] width The width to set + * @param[in] height The height to set + */ + Dimension(int width, int height); + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~Dimension(void); + + /** + * Assigns the value of the specified instance to the current instance of %Dimension. + * + * @since 2.0 + * + * @param[in] rhs An instance of %Dimension + */ + Dimension& operator =(const Dimension& rhs); + + /** + * Checks whether the two instances of %Dimension have equal width and height values. + * + * @since 2.0 + * + * @return @c true if the values of the width and height of the two instances of %Dimension are equal, @n + * else @c false + * @param[in] rhs An instance of %Dimension + */ + bool operator ==(const Dimension& rhs) const; + + /** + * Checks whether the two instances of %Dimension have different width and height values. + * + * @since 2.0 + * + * @return @c true if the values of the width and the height of the two instances of %Dimension are not equal, @n + * else @c false + * @param[in] rhs An instance of %Dimension + */ + bool operator !=(const Dimension& rhs) const; + + /** + * Checks whether the value of the current instance of %Dimension equals the value of the specified instance. + * + * @since 2.0 + * + * @return @c true if the value of the current instance equals the value of the specified instance, @n + * else @c false + * @param[in] rhs An instance of %Dimension + * @remarks The %Dimension class has a semantic value, which means that the + * Equals() method checks whether the two instances have the same width and height. + */ + virtual bool Equals(const Tizen::Base::Object& rhs) const; + + /** + * Gets the hash value of the current instance. + * + * @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. + */ + virtual int GetHashCode(void) const; + + /** + * Sets the size of the current instance of %Dimension. + * + * @since 2.0 + * + * @param[in] width The new width + * @param[in] height The new height + */ + void SetSize(int width, int height); + +public: + /** + * The width of the current instance of %Dimension. + * + * @since 2.0 + */ + int width; + + /** + * The height of the current instance of %Dimension. + * + * @since 2.0 + */ + int height; + +private: + friend class _DimensionImpl; + + // + // This variable is for internal use only. + // Using this variable can cause behavioral, security-related, and consistency-related issues in the application. + // + // @since 2.0 + // + class _DimensionImpl * __pImpl; + +}; // Dimension + +}} // Tizen::Graphics + +#endif // _FGRP_DIMENSION_H_ diff --git a/inc/FGrpEnrichedText.h b/inc/FGrpEnrichedText.h new file mode 100644 index 0000000..c4b72f6 --- /dev/null +++ b/inc/FGrpEnrichedText.h @@ -0,0 +1,970 @@ +// +// +// 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 FGrpEnrichedText.h + * @brief This is the header file for the %EnrichedText class. + * + * This header file contains the definitions of the %EnrichedText class. + * + */ + +#ifndef _FGRP_ENRICHED_TEXT_H_ +#define _FGRP_ENRICHED_TEXT_H_ + +#include +#include +#include + +namespace Tizen { namespace Graphics +{ +/** + * @enum TextHorizontalAlignment + * + * Defines the horizontal alignment of the text. + * + * @since 2.0 + */ +enum TextHorizontalAlignment +{ + TEXT_ALIGNMENT_LEFT = 1, /**< The position of the text is towards the left of the object */ + TEXT_ALIGNMENT_CENTER, /**< The position of the text is towards the center of the object */ + TEXT_ALIGNMENT_RIGHT, /**< The position of the text is towards the right of the object */ + TEXT_ALIGNMENT_HORIZONTAL_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. + TEXT_ALIGNMENT_HORIZONTAL_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. +}; + +/** + * @enum TextVerticalAlignment + * + * Defines the vertical alignment of the text. + * + * @since 2.0 + */ +enum TextVerticalAlignment +{ + TEXT_ALIGNMENT_TOP = 1, /**< The position of the text is towards the top of the object */ + TEXT_ALIGNMENT_MIDDLE, /**< The position of the text is towards the middle of the object */ + TEXT_ALIGNMENT_BOTTOM, /**< The position of the text is towards the bottom of the object */ + TEXT_ALIGNMENT_BASELINE, /**< The position of the text is aligned along the baseline of the object */ + TEXT_ALIGNMENT_VERTICAL_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. + TEXT_ALIGNMENT_VERTICAL_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. +}; + +/** + * @enum TextWrap + * + * Defines the style of wrapping of the text in %EnrichedText. + * + * @since 2.0 + */ +enum TextWrap +{ + TEXT_WRAP_NONE = 1, /**< The wrapping of text is not applied */ + TEXT_WRAP_CHARACTER_WRAP, /**< The wrapping of text is applied at the character unit */ + TEXT_WRAP_WORD_WRAP, /**< The wrapping of text is applied at the word unit */ + TEXT_WRAP_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. + TEXT_WRAP_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. +}; + +/** + * @class EnrichedText + * @brief This class provides enriched text content. + * + * @since 2.0 + * + * @final This class is not intended for extension. + * + * The %EnrichedText class provides methods that enable your application to support texts with various styles, such + * as font, color, and layout. An %EnrichedText instance can be drawn to a Canvas. + * + * For more information on the class features, see EnrichedText. + * + * The following example demonstrates how to use the %EnrichedText class. + * + * @code +#include +#include +#include + +using namespace Tizen::App; +using namespace Tizen::Graphics; + +bool +MyClass::EnrichedTextSample(Canvas& canvas) +{ + result r = E_SUCCESS; + EnrichedText* pEnrichedText = null; + TextElement* pTextElement1 = null; + TextElement* pTextElement2 = null; + + // Creates an EnrichedText instance and sets the attributes + pEnrichedText = new EnrichedText(); + r = pEnrichedText->Construct(Dimension(200, 200)); + if (IsFailed(r)) + { + goto CATCH; + } + pEnrichedText->SetHorizontalAlignment(TEXT_ALIGNMENT_RIGHT); + pEnrichedText->SetVerticalAlignment(TEXT_ALIGNMENT_BOTTOM); + pEnrichedText->SetTextWrapStyle(TEXT_WRAP_CHARACTER_WRAP); + pEnrichedText->SetTextAbbreviationEnabled(true); + + // Creates a TextElement and sets attributes + pTextElement1 = new TextElement(); + r = pTextElement1->Construct(L"0123456789"); + if (IsFailed(r)) + { + goto CATCH; + } + pTextElement1->SetTextColor(Color::GetColor(COLOR_ID_BLUE)); + { + Font font; + font.Construct(FONT_STYLE_BOLD, 40); + pTextElement1->SetFont(font); + } + + // Creates another TextElement and sets the attributes + pTextElement2 = new TextElement(); + r = pTextElement2->Construct(L"abcdefghijklmn\nABCDEFGHIJKLMN"); + if (IsFailed(r)) + { + goto CATCH; + } + pTextElement2->SetTextColor(Color::GetColor(COLOR_ID_VIOLET)); + + // Adds the TextElement and the bitmap to the EnrichedText + pEnrichedText->Add(*pTextElement1); + pEnrichedText->Add(*pTextElement2); + + // Draws + { + canvas.SetBackgroundColor(Color::GetColor(COLOR_ID_BLACK)); + canvas.Clear(); + canvas.FillRectangle(Color::GetColor(COLOR_ID_WHITE), Rectangle(50, 50, 380, 380)); + + // Draws the covered area of the EnrichedText in the Canvas coordinate + int width, height; + pEnrichedText->GetSize(width, height); + canvas.FillRectangle(Color::GetColor(COLOR_ID_GREY), Rectangle(60, 60, width, height)); + + // Draws the EnrichedText at the specified Point + canvas.DrawText(Point(60, 60), *pEnrichedText); + canvas.Show(); + } + + // Cleans up + pEnrichedText->RemoveAll(true); + delete pEnrichedText; + + return true; + +CATCH: + if (pEnrichedText) + { + pEnrichedText->RemoveAll(true); + delete pEnrichedText; + } + + return false; +} + * @endcode + * + * + * + * + */ + +class _OSP_EXPORT_ EnrichedText + : public Tizen::Base::Object +{ +public: + /** + * 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 + */ + EnrichedText(void); + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~EnrichedText(void); + + /** + * Initializes this instance of %EnrichedText with the specified parameter. + * + * @since 2.0 + * + * @return An error code + * @param[in] dim The dimension to set for %EnrichedText @n + * The width and height must be greater than @c 0. + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + * @exception E_INVALID_ARG The specified input parameter is invalid. + */ + result Construct(const Tizen::Graphics::Dimension& dim); + + /** + * Initializes this instance of %EnrichedText with a specified parameter. + * + * @since 2.1 + * + * @return An error code + * @param[in] dim The FloatDimension to set for %EnrichedText @n + * The width and height must be greater than @c 0.0f. + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + * @exception E_INVALID_ARG The specified input parameter is invalid. + */ + result Construct(const Tizen::Graphics::FloatDimension& dim); + + /** + * Inserts a TextElement instance in an %EnrichedText instance at the specified index. + * + * @since 2.0 + * + * @return An error code + * @param[in] elementIndex The index at which the text element is to add + * @param[in] element The TextElement to add + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + */ + result InsertAt(int elementIndex, TextElement& element); + + /** + * Removes a TextElement instance at the specified index of an %EnrichedText instance. + * + * @since 2.0 + * + * @return An error code + * @param[in] elementIndex The index of TextElement + * @param[in] deallocate Set to @c true to deallocate the TextElement instance, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * + */ + result RemoveAt(int elementIndex, bool deallocate); + + /** + * Removes a TextElement instance from an %EnrichedText instance. + * + * @since 2.0 + * + * @return An error code + * @param[in] element The TextElement to remove + * @param[in] deallocate Set to @c true to deallocate the TextElement instance, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * + */ + result Remove(TextElement& element, bool deallocate); + + /** + * Adds the specified TextElement instance to an %EnrichedText instance. + * + * @since 2.0 + * + * @return An error code + * @param[in] element The TextElement to append + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * + */ + result Add(TextElement& element); + + /** + * @if OSPDEPREC + * Removes all the %TextElement instances from an %EnrichedText instance. + * + * @brief [Deprecated] + * @deprecated This method is deprecated. Instead of this method, use the RemoveAll(). + * @since 2.0 + * @endif + * + * @return An error code + * @param[in] deallocate Set to @c true to deallocate the %TextElement instance, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @see RemoveAll() + * + */ + result RemoveAllTextElements(bool deallocate); + + /** + * Removes all the text and image elements from an %EnrichedText instance. + * + * @since 2.0 + * + * @return An error code + * @param[in] deallocate Set to @c true to deallocate the elements to remove, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM An unknown operating system error has occurred. + * + */ + result RemoveAll(bool deallocate); + + /** + * Gets a TextElement instance at the specified index from an %EnrichedText instance. + * + * @since 2.0 + * + * @return The %TextElement instance at the specified index, @n + * else @c null if the method fails + * @param[in] elementIndex The index of the %TextElement + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + TextElement* GetTextElementAt(int elementIndex) const; + + /** + * Gets the count of the TextElement instances. + * + * @since 2.0 + * + * @return The count of the TextElement instances + */ + int GetTextElementCount(void) const; + + /** + * Sets the text size. + * + * @since 2.0 + * + * @return An error code + * @param[in] size The new size of the %EnrichedText instance @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 parameter is outside the valid range defined by the method. + */ + result SetSize(const Tizen::Graphics::Dimension& size); + + /** + * Sets the text size. + * + * @since 2.1 + * + * @return An error code + * @param[in] size The new size of the %EnrichedText instance @n + * The width and height must be greater than @c 0.0f. + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE The value of the parameter is outside the valid range defined by the method. + */ + result SetSize(const Tizen::Graphics::FloatDimension& size); + + /** + * Sets the text size. + * + * @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. + * @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. + */ + result SetSize(int width, int height); + + /** + * Sets the text size. + * + * @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. + * @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. + */ + result SetSize(float width, float height); + + /** + * Gets the size. + * + * @since 2.0 + * + * @return An instance of %Dimension containing the width and the height of the %EnrichedText instance + * + */ + Tizen::Graphics::Dimension GetSize(void) const; + + /** + * Gets the size. + * + * @since 2.1 + * + * @return An instance of FloatDimension containing the width and the height of the %EnrichedText instance + * + */ + Tizen::Graphics::FloatDimension GetSizeF(void) const; + + /** + * Gets the size of an %EnrichedText instance. + * + * @since 2.0 + * + * @param[out] width The width of the control + * @param[out] height The height of the control + */ + void GetSize(int& width, int& height) const; + + /** + * Gets the size of an %EnrichedText instance. + * + * @since 2.1 + * + * @param[out] width The width of the control + * @param[out] height The height of the control + */ + void GetSize(float& width, float& height) const; + + /** + * Gets the width of an %EnrichedText instance. + * + * @since 2.0 + * + * @return The width + */ + int GetWidth(void) const; + + /** + * Gets the width of an %EnrichedText instance. + * + * @since 2.1 + * + * @return The width + */ + float GetWidthF(void) const; + + /** + * Gets the height of an %EnrichedText instance. + * + * @since 2.0 + * + * @return The height + */ + int GetHeight(void) const; + + /** + * Gets the height of an %EnrichedText instance. + * + * @since 2.1 + * + * @return The height + */ + float GetHeightF(void) const; + + /** + * Sets the vertical alignment. + * + * @since 2.0 + * + * @return An error code + * @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. + */ + result SetVerticalAlignment(TextVerticalAlignment alignment); + + /** + * Sets the horizontal alignment. + * + * @since 2.0 + * + * @return An error code + * @param[in] alignment The horizontal alignment of the text + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + */ + result SetHorizontalAlignment(TextHorizontalAlignment alignment); + + /** + * Gets the vertical alignment. + * + * @since 2.0 + * + * @return alignment The vertical alignment of the text + */ + TextVerticalAlignment GetVerticalAlignment(void) const; + + /** + * Gets the horizontal alignment. + * + * @since 2.0 + * + * @return alignment The horizontal alignment of the text + */ + TextHorizontalAlignment GetHorizontalAlignment(void) const; + + /** + * Sets the text wrap style. + * + * @since 2.0 + * + * @return An error code + * @param[in] wrap The text wrapping style + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + */ + result SetTextWrapStyle(TextWrap wrap); + + /** + * Gets the text wrap style. + * + * @since 2.0 + * + * @return wrap The text wrapping style in the %EnrichedText bounds + */ + TextWrap GetTextWrapStyle(void) const; + + /** + * Sets the text abbreviation status. + * + * @since 2.0 + * + * @return An error code + * @param[in] enable Set to @c true to enable text abbreviation, @n + * else @c false + * @exception E_SUCCESS The method is successful. + */ + result SetTextAbbreviationEnabled(bool enable); + + /** + * Checks whether the text abbreviation is enabled. + * + * @since 2.0 + * + * @return @c true if the text abbreviation is enabled, @n + * else @c false + */ + bool IsTextAbbreviationEnabled(void) const; + + /** + * Sets the line spacing. + * + * @since 2.0 + * + * @return An error code + * @param[in] lineSpace The space between lines + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * + */ + result SetLineSpace(int lineSpace); + + /** + * Sets the line spacing. + * + * @since 2.1 + * + * @return An error code + * @param[in] lineSpace The space between lines + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * + */ + result SetLineSpace(float lineSpace); + + /** + * Gets the line spacing. + * + * @since 2.0 + * + * @return space The space between lines + */ + int GetLineSpace(void) const; + + /** + * Gets the line spacing. + * + * @since 2.1 + * + * @return space The space between lines + */ + float GetLineSpaceF(void) const; + + /** + * 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. + * + * @since 2.0 + */ + void Refresh(void); + + /** + * Gets the total line count of the text in an %EnrichedText instance. + * + * @since 2.0 + * + * @return The total line count + */ + int GetTotalLineCount(void) const; + + /** + * Gets the height of the text in an %EnrichedText instance. + * + * @since 2.0 + * + * @return The line height + */ + int GetTotalLineHeight(void) const; + + /** + * Gets the height of the text in an %EnrichedText instance. + * + * @since 2.1 + * + * @return The line height + */ + float GetTotalLineHeightF(void) const; + + /** + * Gets the displayed line count of the text in an %EnrichedText instance. + * + * @since 2.0 + * + * @return The displayed line count + */ + int GetDisplayLineCount(void) const; + + /** + * Gets the length of the specified line. + * + * @since 2.0 + * + * @return The line length, @n + * else @c -1 if the method fails + * @param[in] lineIndex The index of the specified line + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + int GetLineLength(int lineIndex) const; + + /** + * Gets the first character index of the specified line. + * + * @since 2.0 + * + * @return The first text offset, @n + * else @c -1 if the method fails + * @param[in] lineIndex The line index of the %EnrichedText object + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + int GetFirstTextIndex(int lineIndex) const; + + /** + * Gets the line index of the specified character. + * + * @since 2.0 + * + * @return The line index, @n + * else @c -1 if the method fails + * @param[in] textIndex The text index + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + int GetLineIndex(int textIndex) const; + + /** + * Gets the line height of the specified line. + * + * @since 2.0 + * + * @return The line height, @n + * else @c -1 if the method fails + * @param[in] lineIndex The line index + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + int GetLineHeight(int lineIndex) const; + + /** + * Gets the line height of a specified line. + * + * @since 2.1 + * + * @return The line height, @n + * else @c -1.0f if the method fails + * @param[in] lineIndex The line index + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + float GetLineHeightF(int lineIndex) const; + + /** + * Gets the text length of an %EnrichedText object. + * + * @since 2.0 + * + * @return The text length + */ + int GetTextLength(void) const; + + /** + * Gets the extent of an %EnrichedText instance on the assumption that all TextElements are + * expanded to one line. + * + * @since 2.0 + * + * @return An error code + * @param[in] startTextIndex The starting text index of the %EnrichedText instance + * @param[in] textLength The length of the specified text @n + * It must be greater than or equal to @c 0. + * @param[out] width The width of the specified text + * @param[out] height The height of the specified text + * @param[out] actualLength The actual text length measured + * @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. + */ + result GetTextExtent(int startTextIndex, int textLength, int& width, int& height, int& actualLength) const; + + /** + * Gets the extent of an %EnrichedText instance on the assumption that all TextElements are + * expanded to one line. + * + * @since 2.1 + * + * @return An error code + * @param[in] startTextIndex The starting text index of the %EnrichedText instance + * @param[in] textLength The length of the specified text @n + * It must be greater than or equal to @c 0. + * @param[out] width The width of the specified text + * @param[out] height The height of the specified text + * @param[out] actualLength The actual text length measured + * @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. + */ + result GetTextExtent(int startTextIndex, int textLength, float& width, float& height, int& actualLength) const; + + /** + * Gets the extent of an %EnrichedText instance on the assumption that all TextElements are + * expanded to one line. + * + * @since 2.0 + * + * @return An error code + * @param[in] startTextIndex The starting text index of the EnrichedText + * @param[in] textLength The length of the specified text @n + * It must be greater than or equal to @c 0. + * @param[out] size The extent of the specified text + * @param[out] actualLength The actual text length measured + * @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. + */ + result GetTextExtent(int startTextIndex, int textLength, Tizen::Graphics::Dimension& size, int& actualLength) const; + + /** + * Gets the extent of an %EnrichedText instance on the assumption that all TextElements are + * expanded to one line. + * + * @since 2.1 + * + * @return An error code + * @param[in] startTextIndex The starting text index of the %EnrichedText instance + * @param[in] textLength The length of the specified text @n + * It must be greater than or equal to @c 0. + * @param[out] size The extent of the specified text + * @param[out] actualLength The actual text length measured + * @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. + */ + result GetTextExtent(int startTextIndex, int textLength, Tizen::Graphics::FloatDimension& size, int& actualLength) const; + + /** + * 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 + * else (-1, -1) if the method fails + */ + Tizen::Graphics::Dimension GetTextExtent(void) const; + + /** + * 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 + * else (-1.0f, -1.0f) if the method fails + */ + Tizen::Graphics::FloatDimension GetTextExtentF(void) const; + + /** + * 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. + * @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. + * @exception E_INVALID_ARG The specified input parameter is invalid. + */ + result Add(const Tizen::Graphics::Bitmap& bitmap); + + /** + * 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. + * @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. + * @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + * @exception E_INVALID_ARG A specified input parameter is invalid. + */ + result InsertAt(int elementIndex, const Tizen::Graphics::Bitmap& bitmap); + + /** + * Gets the information about the link at the specified position. + * + * @since 2.0 + * + * @return An error code + * @param[in] point A point that is within the %EnrichedText object + * @param[out] linkInfo The LinkInfo object that represents the link at the specified position + * @exception E_SUCCESS The method is successful. + * @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. + */ + result GetLinkInfoFromPosition(const Point& point, Tizen::Base::Utility::LinkInfo& linkInfo) const; + + /* + * Gets the information about the link at the specified position. + * + * @since 2.1 + * + * @return An error code + * @param[in] point A point that is within the %EnrichedText object + * @param[out] linkInfo The LinkInfo object that represents the link at the specified position + * @exception E_SUCCESS The method is successful. + * @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. + */ + result GetLinkInfoFromPosition(const FloatPoint& point, Tizen::Base::Utility::LinkInfo& linkInfo) const; + + /** + * Gets the information about the link at the specified position. + * + * @since 2.0 + * + * @return An error code + * @param[in] x The x-coordinate of a point that is within the %EnrichedText object + * @param[in] y The y-coordinate of a point that is within the %EnrichedText object + * @param[out] linkInfo The LinkInfo object that represents the link at the specified position + * @exception E_SUCCESS The method is successful. + * @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. + */ + result GetLinkInfoFromPosition(int x, int y, Tizen::Base::Utility::LinkInfo& linkInfo) const; + + /** + * Gets the information about the link at a specified position. + * + * @since 2.1 + * + * @return An error code + * @param[in] x The x-coordinate of a point that is within the %EnrichedText object + * @param[in] y The y-coordinate of a point that is within the %EnrichedText object + * @param[out] linkInfo The LinkInfo object that represents the link at the specified position + * @exception E_SUCCESS The method is successful. + * @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. + */ + result GetLinkInfoFromPosition(float x, float y, Tizen::Base::Utility::LinkInfo& linkInfo) const; + + /** + * Gets the vertical alignment among text and bitmap element. + * + * @since 2.0 + * + * @return The vertical alignment among the text and the bitmap element + */ + TextVerticalAlignment GetElementVerticalAlignment(void) const; + + /** + * Sets the vertical alignment among text and bitmap element. + * + * @since 2.0 + * + * @return An error code + * @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. + * - The vertical alignment of text and bitmap elements are decided based on the maximum height among elements. + */ + result SetElementVerticalAlignment(TextVerticalAlignment alignment); + +private: + friend class _EnrichedTextImpl; + + // + // This value is for internal use only. Using this value can cause behavioral, security-related, + // and consistency-related issues in the application. + // + /** + * @since 2.0 + */ + class _EnrichedTextImpl * __pImpl; + + EnrichedText(const EnrichedText& font); + EnrichedText& operator =(const EnrichedText& rhs); + +}; // EnrichedText + +} } // Tizen::Graphics + +#endif // _FGRP_ENRICHED_TEXT_H_ diff --git a/inc/FGrpFloatDimension.h b/inc/FGrpFloatDimension.h new file mode 100644 index 0000000..956e3bd --- /dev/null +++ b/inc/FGrpFloatDimension.h @@ -0,0 +1,175 @@ +// +// 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 FGrpFloatDimension.h + * @brief This is the header file for the %FloatDimension class. + * + * This header file contains the declarations of the %FloatDimension class. + */ + +#ifndef _FGRP_FLOAT_DIMENSION_H_ +#define _FGRP_FLOAT_DIMENSION_H_ + +#include + +namespace Tizen { namespace Graphics { +/** + * @class FloatDimension + * @brief This class represents the width and height of a two-dimensional region. + * + * @since 2.0 + * + * The %FloatDimension class provides methods to abstract and set the width and height of a two-dimensional region. @n + * + * For more information on the class features, see Shapes. + * + */ +class _OSP_EXPORT_ FloatDimension : + public Tizen::Base::Object +{ +public: + /** + * This is the default constructor for this class. @n + * This constructor initializes an instance of %FloatDimension with the width and the height set as @c 0.f. + * + * @since 2.0 + */ + FloatDimension(void); + + /** + * This is the copy constructor for the %FloatDimension class. + * + * @since 2.0 + * + * @param[in] rhs An instance of %FloatDimension + */ + FloatDimension(const FloatDimension& rhs); + + /** + * Initializes an instance of %FloatDimension with the specified values of width and height. + * + * @since 2.0 + * + * @param[in] width The width to set + * @param[in] height The height to set + */ + FloatDimension(float width, float height); + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~FloatDimension(void); + + /** + * This is the default assignment operator for this class. + * + * @since 2.0 + * + * @param[in] rhs An instance of %FloatDimension + */ + FloatDimension& operator=(const FloatDimension& rhs); + + /** + * Checks whether the two instances of %FloatDimension have equal width and height values. + * + * @since 2.0 + * + * @return @c true if the values of the width and height of the two instances of %FloatDimension are equal, @n + * else @c false + * @param[in] rhs An instance of %FloatDimension + */ + bool operator==(const FloatDimension& rhs) const; + + /** + * Checks whether the two instances of %FloatDimension have different width and height values. + * + * @since 2.0 + * + * @return @c true if the values of the width and height of the two instances of %FloatDimension are not equal, @n + * else @c false + * @param[in] rhs An instance of %FloatDimension + */ + bool operator!=(const FloatDimension& rhs) const; + + /** + * Checks whether the value of the current instance of %FloatDimension equals the value of the specified instance. + * + * @since 2.0 + * + * @return @c true if the value of the current instance equals the value of the specified instance, @n + * else @c false + * @param[in] rhs An instance of %FloatDimension + * @remarks The %FloatDimension class has a semantic value, which means that the + * Equals() method checks whether the two instances have the same width and height. + */ + virtual bool Equals(const Tizen::Base::Object& rhs) const; + + /** + * Gets the hash value of the current instance. + * + * @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. + */ + virtual int GetHashCode(void) const; + + /** + * Sets the size of the current instance of %FloatDimension. + * + * @since 2.0 + * + * @param[in] width The new width + * @param[in] height The new height + */ + void SetSize(float width, float height); + +public: + /** + * The width of the current instance of %FloatDimension. + * + * @since 2.0 + */ + float width; + + /** + * The height of the current instance of %FloatDimension. + * + * @since 2.0 + */ + float height; + +private: + friend class _FloatDimensionImpl; + + // + // This variable is for internal use only. + // Using this variable can cause behavioral, security-related, and consistency-related issues in the application. + // + // @since 2.0 + // + class _FloatDimensionImpl* __pImpl; + +}; // FloatDimension + +}} // Tizen::Graphics + +#endif // _FGRP_FLOAT_DIMENSION_H_ diff --git a/inc/FGrpFloatMatrix4.h b/inc/FGrpFloatMatrix4.h new file mode 100644 index 0000000..c8af1f5 --- /dev/null +++ b/inc/FGrpFloatMatrix4.h @@ -0,0 +1,428 @@ +// +// 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 FGrpFloatMatrix4.h + * @brief This is the header file for the %FloatMatrix4 class. + * + * This header file contains the declarations of the %FloatMatrix4 class. + * + */ + +#ifndef _FGRP_FLOAT_MATRIX4_H_ +#define _FGRP_FLOAT_MATRIX4_H_ + +#include + +namespace Tizen { namespace Graphics +{ +class FloatVector4; +}} + +namespace Tizen { namespace Graphics +{ +/** + * @class FloatMatrix4 + * @brief This class encapsulates a 4 X 4 matrix. + * + * @since 2.0 + * + * The %FloatMatrix4 class provides a float precision, two-dimensional matrix class. + * + */ +class _OSP_EXPORT_ FloatMatrix4 + : public Tizen::Base::Object +{ +public: + /** + * This is the default constructor for this class. @n + * This constructor initializes a 4 X 4 identity matrix. + * + * @since 2.0 + */ + FloatMatrix4(void); + + /** + * This is the copy constructor for the %FloatMatrix4 class. @n + * This constructor initializes the instance of %FloatMatrix4 with the attributes of the specified instance of %FloatMatrix4. + * + * @since 2.0 + * + * @param[in] rhs An instance of %FloatMatrix4 + */ + FloatMatrix4(const FloatMatrix4& rhs); + + /** + * This constructor initializes the instance of %FloatMatrix4 with the attributes of the specified instance of the array. + * + * @since 2.0 + * + * @param[in] matrix The matrix with 16 float values + */ + FloatMatrix4(const float matrix[4][4]); + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~FloatMatrix4(void); + + /** + * Checks whether the current instance and the specified instance of %FloatMatrix4 are equal. + * + * @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 + */ + bool operator ==(const FloatMatrix4& rhs) const; + + /** + * Checks whether the current instance and the specified instance of %FloatMatrix4 are not equal. + * + * @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 + */ + bool operator !=(const FloatMatrix4& rhs) const; + + /** + * Assigns the values of the specified instance to the current instance of %FloatMatrix4. + * + * @since 2.0 + * + * @return A reference to this instance + * @param[in] rhs An instance of %FloatMatrix4 + */ + FloatMatrix4& operator =(const FloatMatrix4& rhs); + + /** + * Assigns the value to each matrix member of the current instance of %FloatMatrix4. + * + * @since 2.0 + * + * @return A reference to this instance + * @param[in] value A @c float value to assign + */ + FloatMatrix4& operator =(float value); + + /** + * Multiplies the value of the specified instance with the current instance of %FloatMatrix4. + * + * @since 2.0 + * + * @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; + + /** + * Multiplies the current instance of %FloatMatrix4 with %FloatVector4. + * + * @since 2.0 + * + * @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 member of the current instance of %FloatMatrix4. + * + * @since 2.0 + * + * @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; + + /** + * Adds the value of the specified instance and the current instance of %FloatMatrix4. + * + * @since 2.0 + * + * @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 member of the current instance of %FloatMatrix4. + * + * @since 2.0 + * + * @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; + + /** + * Subtracts the value of the specified instance and the current instance of %FloatMatrix4. + * + * @since 2.0 + * + * @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 member of the current instance of %FloatMatrix4. + * + * @since 2.0 + * + * @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; + + /** + * Multiplies the value of the specified instance and the current instance of %FloatMatrix4. + * + * @since 2.0 + * + * @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 with each matrix member of the current instance of %FloatMatrix4. + * + * @since 2.0 + * + * @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); + + /** + * Adds the value of the specified instance to the current instance of %FloatMatrix4. + * + * @since 2.0 + * + * @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 member of the current instance of %FloatMatrix4. + * + * @since 2.0 + * + * @return The reference to %FloatMatrix4 containing the resulting value of the operation + * @param[in] value A @c float value to add + */ + FloatMatrix4& operator +=(float value); + + /** + * Subtracts the value of the specified instance from the current instance of %FloatMatrix4. + * + * @since 2.0 + * + * @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 member of the current instance of %FloatMatrix4. + * + * @since 2.0 + * + * @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 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 + * @param[in] value A @c float value to add + * @param[in] rhs An instance of %FloatMatrix4 + */ + _OSP_EXPORT_ friend FloatMatrix4 operator +(const float& value, const FloatMatrix4& rhs); + + /** + * 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 + * @param[in] value A @c float value to multiply + * @param[in] rhs An instance of %FloatMatrix4 + */ + _OSP_EXPORT_ friend FloatMatrix4 operator *(const float& value, const FloatMatrix4& rhs); + + /** + * 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 + * @param[in] value A @c float value to subtract + * @param[in] rhs An instance of %FloatMatrix4 + */ + _OSP_EXPORT_ friend FloatMatrix4 operator -(const float& value, const FloatMatrix4& rhs); + + /** + * Checks whether the current instance of %FloatMatrix4 equals the specified instance of %FloatMatrix4. + * + * @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. + */ + virtual bool Equals(const Tizen::Base::Object& obj) const; + + /** + * Gets the hash value of the current instance of %FloatMatrix4. + * + * @since 2.0 + * + * @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; + + /** + * Gets the determinant of the current instance of %FloatMatrix4. + * + * @since 2.0 + * + * @return The determinant value of the current instance + */ + float GetDeterminant(void) const; + + /** + * 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. + */ + FloatMatrix4 GetInverse(void) const; + + /** + * Gets the trace of the current instance of %FloatMatrix4. + * + * @since 2.0 + * + * @return The trace of the current instance + */ + float GetTrace(void) const; + + /** + * Gets the current instance of %FloatMatrix4 as a transpose matrix. + * + * @since 2.0 + * + * @return A new instance of %FloatMatrix4 containing the resulting value of the operation + */ + FloatMatrix4 GetTranspose(void) const; + + /** + * Checks whether the current instance is an identity matrix. + * + * @since 2.0 + * + * @return @c true if the matrix is an identity matrix, @n + * else @c false + */ + bool IsIdentity(void) const; + + /** + * Checks whether the current matrix is invertible. + * + * @since 2.0 + * + * @return @c true if the matrix is invertible, @n + * else @c false + */ + bool IsInvertible(void) const; + + /** + * Negates the matrix members of current instance of %FloatMatrix4. + * + * @since 2.0 + */ + void Negate(void); + + /** + * Sets the current instance of %FloatMatrix4 as an identity matrix. + * + * @since 2.0 + */ + void SetAsIdentity(void); + + /** + * 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_INVALID_OPERATION The current instance is not invertible. + */ + result Invert(void); + + /** + * Sets the current instance of %FloatMatrix4 as a transpose matrix. + * + * @since 2.0 + */ + void Transpose(void); + + /** + * Sets the matrix members of the current instance of %FloatMatrix4 to zero. + * + * @since 2.0 + */ + void SetAsNull(void); + + /** + * The matrix of the current instance of %FloatMatrix4. + * + * @since 2.0 + * + * @remarks The column-major order matrix. + */ + float matrix[4][4]; + +private: + friend class _FloatMatrix4Impl; + class _FloatMatrix4Impl* __pImpl; + +}; // FloatMatrix4 + +}} // Tizen::Graphics + +#endif //_FGRP_FLOAT_MATRIX4_H_ diff --git a/inc/FGrpFloatPoint.h b/inc/FGrpFloatPoint.h new file mode 100644 index 0000000..4b3d0fb --- /dev/null +++ b/inc/FGrpFloatPoint.h @@ -0,0 +1,232 @@ +// +// 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 FGrpFloatPoint.h + * @brief This is the header file for the %FloatPoint class. + * + * This header file contains the declarations of the %FloatPoint class. + */ + +#ifndef _FGRP_FLOAT_POINT_H_ +#define _FGRP_FLOAT_POINT_H_ + +#include + +namespace Tizen { namespace Graphics { +/** + * @class FloatPoint + * @brief This class encapsulates a point in a two-dimensional coordinate system. + * + * @since 2.0 + * + * 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. + */ +class _OSP_EXPORT_ FloatPoint : + public Tizen::Base::Object +{ +public: + /** + * This is the default constructor for this class. @n + * This constructor initializes an instance of %FloatPoint with the values (0.f, 0.f). + * + * @since 2.0 + */ + FloatPoint(void); + + /** + * This is the copy constructor for the %FloatPoint class. + * + * @since 2.0 + * + * @param[in] rhs An instance of %FloatPoint + */ + FloatPoint(const FloatPoint& rhs); + + /** + * Initializes an instance of %FloatPoint with the specified location. + * + * @since 2.0 + * + * @param[in] x The x-coordinate + * @param[in] y The y-coordinate + */ + FloatPoint(float x, float y); + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~FloatPoint(void); + + /** + * This is the default assignment operator for this class. + * + * @since 2.0 + * + * @param[in] rhs An instance of %FloatPoint + */ + FloatPoint& operator=(const FloatPoint& rhs); + + /** + * Checks whether the current instance and the specified instance of %FloatPoint are equal. + * + * @since 2.0 + * + * @return @c true if the two instances of %FloatPoint are at the same location, @n + * else @c false + * @param[in] rhs An instance of %FloatPoint + */ + bool operator==(const FloatPoint& rhs) const; + + /** + * Checks whether the current instance and the specified instance of %FloatPoint are not equal. + * + * @since 2.0 + * + * @return @c true if the two instances of %FloatPoint are at different locations, @n + * else @c false + * @param[in] rhs An instance of %FloatPoint + */ + bool operator!=(const FloatPoint& rhs) const; + + /** + * Adds the value of the specified instance of %FloatPoint and the current instance. + * + * @since 2.0 + * + * @return A new instance of %FloatPoint containing the resulting value of the operation + * @param[in] rhs An instance of %FloatPoint + */ + FloatPoint operator+(const FloatPoint& rhs) const; + + /** + * Subtracts the value of the specified instance of %FloatPoint from the current instance. + * + * @since 2.0 + * + * @return A new instance of %FloatPoint containing the resulting value of the operation + * @param[in] rhs An instance of %FloatPoint + */ + FloatPoint operator-(const FloatPoint& rhs) const; + + /** + * Adds the value of the specified instance of %FloatPoint to the current instance. + * + * @since 2.0 + * + * @param[in] point An instance of %FloatPoint + */ + FloatPoint& operator+=(const FloatPoint& point); + + /** + * Subtracts the value of the specified instance of %FloatPoint from the current instance. + * + * @since 2.0 + * + * @param[in] point An instance of %FloatPoint + */ + FloatPoint& operator-=(const FloatPoint& point); + + /** + * Checks whether the value of the specified instance of %FloatPoint equals the value of the current instance. + * + * @since 2.0 + * + * @return @c true if the value of the specified instance equals the value of the current instance, @n + * else @c false + * @param[in] rhs An instance of %FloatPoint + * @remarks The %FloatPoint class has a semantic value, which means that the + * Equals() method checks whether the two instances have the same + * location. + */ + virtual bool Equals(const Tizen::Base::Object& rhs) const; + + /** + * Gets the hash value of the current instance. + * + * @since 2.0 + * + * @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; + + /** + * Sets the x and y coordinates for the current instance of %FloatPoint. + * + * @since 2.0 + * + * @param[in] x The new x-coordinate + * @param[in] y The new y-coordinate + */ + void SetPosition(float x, float y); + + /** + * Sets the current instance of %FloatPoint. + * + * @since 2.0 + * + * @param[in] point An instance of %FloatPoint + */ + void SetPosition(const FloatPoint& point); + + /** + * Translates this %FloatPoint to the indicated distance. + * + * @since 2.0 + * + * @param[in] deltaX The distance to move this point along the x-axis + * @param[in] deltaY The distance to move this point along the y-axis + */ + void Translate(float deltaX, float deltaY); + +public: + /** + * The x-coordinate of the point. + * + * @since 2.0 + */ + float x; + + /** + * The y-coordinate of the point. + * + * @since 2.0 + */ + float y; + +private: + friend class _FloatPointImpl; + + // + // This variable is for internal use only. + // Using this variable can cause behavioral, security-related, and consistency-related issues in the application. + // + // @since 2.0 + // + class _FloatPointImpl* __pImpl; + +}; // FloatPoint + +}} // Tizen::Graphics + +#endif // _FGRP_FLOAT_POINT_H_ diff --git a/inc/FGrpFloatPoint3.h b/inc/FGrpFloatPoint3.h new file mode 100644 index 0000000..9c3e533 --- /dev/null +++ b/inc/FGrpFloatPoint3.h @@ -0,0 +1,277 @@ +// +// 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 FGrpFloatPoint3.h + * @brief This is the header file for the %FloatPoint3 class. + * + * This header file contains the declarations of the %FloatPoint3 class. + * + */ + +#ifndef _FGRP_FLOAT_POINT3_H_ +#define _FGRP_FLOAT_POINT3_H_ + +#include + +namespace Tizen { namespace Graphics +{ +class FloatVector4; +}} + +namespace Tizen { namespace Graphics +{ +/** + * @class FloatPoint3 + * @brief This class encapsulates a 3-dimensional point. + * + * @since 2.0 + * + * The %FloatPoint3 class provides a float precision, three-dimensional point class. + * + */ +class _OSP_EXPORT_ FloatPoint3 + : public Tizen::Base::Object +{ +public: + /** + * This is the default constructor for this class. @n + * This constructor initializes the instance to a 3-dimensional zero point. + * + * @since 2.0 + */ + FloatPoint3(void); + + /** + * This is the copy constructor for the %FloatPoint3 class. @n + * This constructor initializes the instance of %FloatPoint3 with the attributes of the specified instance of %FloatPoint3. + * + * @since 2.0 + * + * @param[in] rhs An instance of %FloatPoint3 + */ + FloatPoint3(const FloatPoint3& rhs); + + /** + * This constructor initializes the instance of %FloatPoint3 with the attributes of the specified instance of %FloatVector4. + * + * @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. + */ + explicit FloatPoint3(const FloatVector4& vector); + + /** + * This constructor initializes the instance of %FloatPoint3 with the attributes of the specified instance of the array. + * + * @since 2.0 + * + * @param[in] point The point with 3 float values + */ + explicit FloatPoint3(const float point[3]); + + /** + * This constructor initializes the instance of %FloatPoint3 with floating point numbers for each coordinate. + * + * @since 2.0 + * + * @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); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~FloatPoint3(void); + + /** + * Checks whether the current instance and the specified instance of %FloatPoint3 are equal. + * + * @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 + */ + bool operator ==(const FloatPoint3& rhs) const; + + /** + * Checks whether the current instance and the specified instance of %FloatPoint3 are not equal. + * + * @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 + */ + inline bool operator !=(const FloatPoint3& rhs) const + { + return !(*this == rhs); + } + + /** + * Assigns the values of the specified instance to the current instance of %FloatPoint3. + * + * @since 2.0 + * + * @return The reference to this instance + * @param[in] rhs An instance of %FloatPoint3 + */ + FloatPoint3& operator =(const FloatPoint3& rhs); + + /** + * 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 + */ + FloatPoint3 operator *(float value) const; + + /** + * Divides each point members of current instance of %FloatPoint3 with the specified value. + * + * @since 2.0 + * + * @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; + + /** + * Adds the value of the specified instance and the current instance of %FloatPoint3. + * + * @since 2.0 + * + * @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; + + /** + * Subtracts the value of the specified instance from the current instance of %FloatPoint3. + * + * @since 2.0 + * + * @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; + + /** + * Adds the value of the specified instance to the current instance of %FloatPoint3. + * + * @since 2.0 + * + * @return The reference to %FloatPoint3 containing the resulting value of the operation + * @param[in] rhs An instance of %FloatPoint3 + */ + FloatPoint3& operator +=(const FloatPoint3& rhs); + + /** + * Subtracts the value of the specified instance from the current instance of %FloatPoint3. + * + * @since 2.0 + * + * @return The reference to %FloatPoint3 containing the resulting value of the operation + * @param[in] rhs An instance of %FloatPoint3 + */ + FloatPoint3& operator -=(const FloatPoint3& rhs); + + /** + * Checks whether the current instance of %FloatPoint3 equals the specified instance of %FloatPoint3. + * + * @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. + */ + virtual bool Equals(const Tizen::Base::Object& obj) const; + + /** + * Gets the hash value of the current instance of %FloatPoint3. + * + * @since 2.0 + * + * @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; + + /** + * The x component of the current instance of %FloatPoint3. + * + * @since 2.0 + */ + float x; + + /** + * The y component of the current instance of %FloatPoint3. + * + * @since 2.0 + */ + float y; + + /** + * The z component of the current instance of %FloatPoint3. + * + * @since 2.0 + */ + float z; + +private: + friend class _FloatPoint3Impl; + class _FloatPoint3Impl* __pImpl; + +}; // 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 + * @param[in] value A @c float value to multiply + * @param[in] rhs An instance of %FloatPoint3 + */ +_OSP_EXPORT_ FloatPoint3 operator *(const float& value, const FloatPoint3& rhs); + +/** + * 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 + * @param[in] value A @c float value to divide + * @param[in] rhs An instance of %FloatPoint3 + */ +_OSP_EXPORT_ FloatPoint3 operator /(const float& value, const FloatPoint3& rhs); + +}} // Tizen::Graphics + +#endif //_FGRP_FLOAT_POINT3_H_ diff --git a/inc/FGrpFloatRectangle.h b/inc/FGrpFloatRectangle.h new file mode 100644 index 0000000..b50eb01 --- /dev/null +++ b/inc/FGrpFloatRectangle.h @@ -0,0 +1,348 @@ +// +// 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 FGrpFloatRectangle.h + * @brief This is the header file for the %FloatRectangle class. + * + * This header file contains the declarations of the %FloatRectangle class. + */ + +#ifndef _FGRP_FLOAT_RECTANGLE_H_ +#define _FGRP_FLOAT_RECTANGLE_H_ + +#include + +namespace Tizen { namespace Graphics +{ +class FloatPoint; +class FloatDimension; + +/** + * @class FloatRectangle + * @brief This class abstracts a rectangular region. + * + * @since 2.0 + * + * The %FloatRectangle class represents a rectangular region in a coordinate space, which is specified by the rectangle + * object's top-left point (x, y) in the coordinate space, along with its width and height. + * + * For more information on the class features, see Shapes. + */ +class _OSP_EXPORT_ FloatRectangle + : public Tizen::Base::Object +{ +public: + /** + * This is the default constructor for this class. @n + * It initializes an instance of %FloatRectangle with all its attributes set to @c 0.f. + * + * @since 2.0 + * + * @remarks The attribute value is @c 0 when initialized. + */ + FloatRectangle(void); + + /** + * This is the copy constructor for the %FloatRectangle class. + * + * @since 2.0 + * + * @param[in] rhs An instance of %FloatRectangle + */ + FloatRectangle(const FloatRectangle& rhs); + + /** + * Initializes an instance of %FloatRectangle with the specified location and dimension. + * + * @since 2.0 + * + * @param[in] x The x-coordinate of the top-left corner of the rectangle + * @param[in] y The y-coordinate of the top-left corner of the rectangle + * @param[in] width The width of the rectangle + * @param[in] height The height of the rectangle + * + */ + FloatRectangle(float x, float y, float width, float height); + + /** + * Initializes an instance of %FloatRectangle at the location specified by @c point and + * with dimension specified by @c dim. + * + * @since 2.0 + * + * @param[in] point The location of the top-left corner of the rectangle + * @param[in] dim The width and height of the rectangle + */ + FloatRectangle(const FloatPoint& point, const FloatDimension& dim); + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~FloatRectangle(void); + + /** + * This is the default assignment operator for this class. + * + * @since 2.0 + * + * @param[in] rhs An instance of %FloatRectangle + */ + FloatRectangle& operator=(const FloatRectangle& rhs); + + /** + * Checks whether the location and dimension of the current instance of %FloatRectangle match those of the + * specified instance of %FloatRectangle. + * + * @since 2.0 + * + * @return @c true if the location and dimension of the current instance match those of the specified instance, @n + * else @c false + * @param[in] rhs An instance of %FloatRectangle + */ + bool operator==(const FloatRectangle& rhs) const; + + /** + * Checks whether the location and dimension of the current instance of %FloatRectangle do not match those of the + * specified instance of %FloatRectangle. + * + * @since 2.0 + * + * @return @c true if the location and dimension of the current instance do not match those of the specified instance, @n + * else @c false + * @param[in] rhs An instance of %FloatRectangle + */ + bool operator!=(const FloatRectangle& rhs) const; + + /** + * Checks whether the specified point lies inside the current instance of %FloatRectangle. + * + * @since 2.0 + * + * @return @c true if the location represented by @c point lies inside the current instance of %FloatRectangle, @n + * else @c false + * @param[in] point An instance of FloatPoint + */ + bool Contains(const FloatPoint& point) const; + + /** + * Checks whether the value of the current instance of %FloatRectangle equals the value of the specified instance of + * %FloatRectangle. + * + * @since 2.0 + * + * @return @c true if the value of the current instance of %FloatRectangle equals the value of the specified instance of %FloatRectangle, @n + * else @c false + * @param[in] rhs An instance of %FloatRectangle + * @remarks The %FloatRectangle class has a semantic value, which means that the Equals() method checks whether the + * two instances have the same location and size. + */ + virtual bool Equals(const Tizen::Base::Object& rhs) const; + + /** + * Gets the hash value of the current instance. + * + * @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. + */ + virtual int GetHashCode(void) const; + + /** + * Gets the intersection of the current instance and the specified instance of %FloatRectangle. @n + * If the two instances of %FloatRectangle do not intersect, empty instance is returned. + * + * @since 2.0 + * + * @param[in] rect An instance of %FloatRectangle + */ + FloatRectangle GetIntersection(const FloatRectangle& rect) const; + + /** + * Checks whether the current instance of %FloatRectangle intersects with the specified instance of %FloatRectangle. + * + * @since 2.0 + * + * @return @c true if the current instance of %FloatRectangle intersects with the specified instance of %FloatRectangle, @n + * else @c false + * @param[in] rect An instance of %FloatRectangle + * + */ + bool IsIntersected(const FloatRectangle& rect) const; + + /** + * Gets the union of the current instance and the specified instance of %FloatRectangle. + * + * @since 2.0 + * + * @return An instance of %FloatRectangle containing the union of the two rectangles + * @param[in] rect An instance of %FloatRectangle + */ + FloatRectangle GetUnion(const FloatRectangle& rect) const; + + /** + * Gets the coordinates of the point at the bottom-right corner of the rectangle. + * + * @since 2.0 + * + * @return The coordinates of the point at the bottom-right corner of the rectangle + */ + FloatPoint GetBottomRight(void) const; + + /** + * Gets the coordinates of the point at the top-left corner of the rectangle. + * + * @since 2.0 + * + * @return The coordinates of the point at the top-left corner of the rectangle + */ + FloatPoint GetTopLeft(void) const; + + /** + * Checks whether this %FloatRectangle is empty. @n + * A %FloatRectangle is empty if its width or its height is less than or equal to @c 0. + * + * @since 2.0 + * + * @return @c true if this rectangle is empty, @n + * else @c false + */ + bool IsEmpty(void) const; + + /** + * Sets the size of this %FloatRectangle to match the specified FloatDimension. + * + * @since 2.0 + * + * @param[in] dim The new size for FloatDimension + */ + void SetSize(const FloatDimension& dim); + + /** + * Sets the size of this %FloatRectangle to match the specified dimension. + * + * @since 2.0 + * + * @param[in] width The new width + * @param[in] height The new height + */ + void SetSize(float width, float height); + + /** + * Sets the position of this %FloatRectangle to the specified point. + * + * @since 2.0 + * + * @param[in] point The new position + */ + void SetPosition(const FloatPoint& point); + + /** + * Sets the location of the current instance of %FloatRectangle with the specified values of the + * x and y coordinates of the top-left corner point. + * + * @since 2.0 + * + * @param[in] x The new x-coordinate + * @param[in] y The new y-coordinate + */ + void SetPosition(float x, float y); + + /** + * Sets the location and the dimensions of the current instance of %FloatRectangle with the specified x and y + * coordinates of the top-left corner point and the specified dimensions. + * + * @since 2.0 + * + * @param[in] x The new x-coordinate + * @param[in] y The new y-coordinate + * @param[in] width The new width + * @param[in] height The new height + */ + void SetBounds(float x, float y, float width, float height); + + /** + * Sets the location and the dimensions of the current instance of %FloatRectangle with the specified location and + * dimension. + * + * @since 2.0 + * + * @param[in] point An instance of FloatPoint + * @param[in] dim An instance of FloatDimension + */ + void SetBounds(const FloatPoint& point, const FloatDimension& dim); + + /** + * Translates this %FloatRectangle to the new point by the specified distance along the x-axis and y-axis. + * + * @since 2.0 + * + * @param[in] deltaX The distance to move this %FloatRectangle along the x-axis + * @param[in] deltaY The distance to move this %FloatRectangle along the y-axis + */ + void Translate(float deltaX, float deltaY); + +public: + /** + * The x-coordinate of the top-left corner of the rectangle. + * + * @since 2.0 + */ + float x; + + /** + * The y-coordinate of the top-left corner of the rectangle. + * + * @since 2.0 + */ + float y; + + /** + * The width of this rectangle. + * + * @since 2.0 + */ + float width; + + /** + * The height of this rectangle. + * + * @since 2.0 + */ + float height; + +private: + friend class _FloatRectangleImpl; + + // + // This variable is for internal use only. + // Using this variable can cause behavioral, security-related, and consistency-related issues in the application. + // + // @since 2.0 + // + class _FloatRectangleImpl* __pImpl; + +}; // FloatRectangle + +}} // Tizen::Graphics + +#endif // _FGRP_FLOAT_RECTANGLE_H_ + diff --git a/inc/FGrpFloatVector4.h b/inc/FGrpFloatVector4.h new file mode 100644 index 0000000..9aef6b6 --- /dev/null +++ b/inc/FGrpFloatVector4.h @@ -0,0 +1,331 @@ +// +// 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 FGrpFloatVector4.h + * @brief This is the header file for the %FloatVector4 class. + * + * This header file contains the declarations of the %FloatVector4 class. + * + */ + +#ifndef _FGRP_FLOAT_VECTOR4_H_ +#define _FGRP_FLOAT_VECTOR4_H_ + +#include + +namespace Tizen { namespace Graphics +{ +class FloatPoint3; +class FloatMatrix4; +}} + +namespace Tizen { namespace Graphics +{ +/** + * @class FloatVector4 + * @brief This class encapsulates a 4-dimensional vector. + * + * @since 2.0 + * + * The %FloatVector4 class provides a float precision, four-dimensional vector class. + * + */ +class _OSP_EXPORT_ FloatVector4 + : public Tizen::Base::Object +{ +public: + /** + * This is the default constructor for this class. @n + * This constructor initializes the instance to a 4-dimensional zero vector. + * + * @since 2.0 + */ + FloatVector4(void); + + /** + * This is the copy constructor for the %FloatVector4 class. @n + * This constructor initializes the instance of %FloatVector4 with the attributes of the specified instance of %FloatVector4. + * + * @since 2.0 + * + * @param[in] rhs An instance of %FloatVector4 + */ + FloatVector4(const FloatVector4& rhs); + + /** + * This constructor initializes the instance of %FloatVector4 with the attributes of the specified instance of %FloatPoint3. + * + * @since 2.0 + * + * @param[in] point An instance of %FloatPoint3 + * @remarks The point is converted to normal vector. + */ + explicit FloatVector4(const FloatPoint3& point); + + /** + * This constructor initializes the instance of %FloatVector4 with the attributes of the specified instance of the array. + * + * @since 2.0 + * + * @param[in] vector The vector with 4 float values + */ + explicit FloatVector4(const float vector[4]); + + /** + * This constructor initializes the instance of %FloatVector4 with floating point numbers for each coordinate. + * + * @since 2.0 + * + * @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); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~FloatVector4(void); + + /** + * Checks whether the current instance and the specified instance of %FloatVector4 are equal. + * + * @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 + */ + bool operator ==(const FloatVector4& rhs) const; + + /** + * Checks whether the current instance and the specified instance of %FloatVector4 are not equal. + * + * @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 + */ + inline bool operator !=(const FloatVector4& rhs) const + { + return !(*this == rhs); + } + + /** + * Assigns the values of the specified instance to the current instance of %FloatVector4. + * + * @since 2.0 + * + * @return The reference to this instance + * @param[in] rhs An instance of %FloatVector4 + */ + FloatVector4& operator =(const FloatVector4& rhs); + + /** + * 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 + * @param[in] value A @c float value to multiply + */ + FloatVector4 operator *(float value) const; + + /** + * 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 + * @param[in] value A @c float value to divide + */ + FloatVector4 operator /(float value) const; + + /** + * Adds the value of the specified instance and the current instance of %FloatVector4. + * + * @since 2.0 + * + * @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; + + /** + * Subtracts the value of the specified instance from the current instance of %FloatVector4. + * + * @since 2.0 + * + * @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; + + /** + * Adds the value of the specified instance to the current instance of %FloatVector4. + * + * @since 2.0 + * + * @return The reference to %FloatVector4 containing the resulting value of the operation + * @param[in] rhs An instance of %FloatVector4 + */ + FloatVector4& operator +=(const FloatVector4& rhs); + + /** + * Subtracts the value of the specified instance from the current instance of %FloatVector4. + * + * @since 2.0 + * + * @return The reference to %FloatVector4 containing the resulting value of the operation + * @param[in] rhs An instance of %FloatVector4 + */ + FloatVector4& operator -=(const FloatVector4& rhs); + + /** + * Calculates the dot product with the specified instance and the current instance of %FloatVector4. + * + * @since 2.0 + * + * @return The value of the operation. + * @param[in] rhs An instance of %FloatVector4 + */ + float DotProduct(const FloatVector4& rhs) const; + + /** + * Calculates the dot product with the specified instance and the current instance of %FloatVector4. + * + * @since 2.0 + * + * @return The value of the operation. + * @param[in] rhs An instance of %FloatVector4 + */ + float operator *(const FloatVector4& rhs) const; + + /** + * Checks whether the current instance of %FloatVector4 equals the specified instance of %FloatVector4. + * + * @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. + */ + virtual bool Equals(const Tizen::Base::Object& obj) const; + + /** + * Gets the hash value of the current instance of %FloatVector4. + * + * @since 2.0 + * + * @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; + + /** + * Gets the length of the current instance of %FloatVector4. + * + * @since 2.0 + * + * @return The length of the current instance + */ + float GetLength(void) const; + + /** + * Gets the normal vector of the current instance of %FloatVector4. + * + * @since 2.0 + * + * @return A new instance of %FloatVector4 containing the resulting value of the operation + */ + FloatVector4 GetNormal(void) const; + + /** + * Normalizes the current instance of %FloatVector4. + * + * @since 2.0 + */ + void Normalize(void); + + /** + * The x component of the current instance of %FloatVector4. + * + * @since 2.0 + */ + float x; + + /** + * The y component of the current instance of %FloatVector4. + * + * @since 2.0 + */ + float y; + + /** + * The z component of the current instance of %FloatVector4. + * + * @since 2.0 + */ + float z; + + /** + * The w component of the current instance of %FloatVector4. + * + * @since 2.0 + */ + float w; + +private: + friend class _FloatVector4Impl; + class _FloatVector4Impl* __pImpl; + +}; // 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 + * @param[in] value A @c float value to multiply + * @param[in] rhs An instance of %FloatVector4 + */ +_OSP_EXPORT_ FloatVector4 operator *(const float& value, const FloatVector4& rhs); + +/** + * 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 + * @param[in] value A @c float value to divide + * @param[in] rhs An instance of %FloatVector4 + */ +_OSP_EXPORT_ FloatVector4 operator /(const float& value, const FloatVector4& rhs); + +}} // Tizen::Graphics + +#endif //_FGRP_FLOAT_VECTOR4_H_ diff --git a/inc/FGrpFont.h b/inc/FGrpFont.h new file mode 100644 index 0000000..f2161df --- /dev/null +++ b/inc/FGrpFont.h @@ -0,0 +1,572 @@ +// +// 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 FGrpFont.h + * @brief This is the header file for the %Font class. + * + * This header file contains the declarations of the %Font class. + */ + +#ifndef _FGRP_FONT_H_ +#define _FGRP_FONT_H_ + +#include +#include +#include +#include +#include + +namespace Tizen { namespace Graphics +{ +/** + * @class Font + * @brief This class provides methods to retrieve the font information. + * + * @since 2.0 + * + * @final This class is not intended for extension. + * + * The %Font class encapsulates the characteristics, such as the size and style of a specific vector font. + * Fonts are used to draw text on a Canvas. + * + * For more information on the class features, see Fonts. + * + * + */ +class _OSP_EXPORT_ Font + : public Tizen::Base::Object +{ +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 + */ + Font(void); + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~Font(void); + + /** + * Initializes this instance of %Font with the specified size and style. @n + * If the size and style are not specified, the default system font is set. + * + * @since 2.0 + * + * @return An error code + * @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. + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + */ + result Construct(int style, int size); + + /** + * Initializes this instance of %Font with the specified parameters. + * + * @if OSPCOMPAT + * @brief [Compatibility] + * @endif + * @since 2.0 + * @if OSPCOMPAT + * @compatibility This method has compatibility issues with OSP compatible applications. @n + * 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. + * @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 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); + + /** + * @if OSPCOMPAT + * @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 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 + */ + + /** + * Initializes this instance of %Font with the specified parameters. + * + * @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. + * @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. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. + */ + result Construct(const Tizen::Base::ByteBuffer& fontData, int style, int size); + + /** + * Initializes this instance of %Font with a specified size and style. @n + * If the size and style are not specified, the default system font is set. + * + * @since 2.1 + * + * @return An error code + * @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. + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + */ + result Construct(int style, float size); + + /** + * Initializes this instance of %Font with the specified parameters. + * + * @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. + * @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 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); + + /** + * Initializes this instance of %Font with the specified parameters. + * + * @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. + * @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. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. + */ + result Construct(const Tizen::Base::ByteBuffer& fontData, int style, float size); + + /** + * Gets the maximum height of the current instance of %Font. + * + * @since 2.0 + * + * @return The maximum height of the current instance of %Font, @n + * else @c -1 if the method fails + */ + int GetMaxHeight(void) const; + + /** + * Gets the maximum height of the current instance of %Font. + * + * @since 2.1 + * + * @return The maximum height of the current instance of %Font, @n + * else @c -1 if the method fails + */ + float GetMaxHeightF(void) const; + + /** + * Gets the maximum width of the current instance of %Font. + * + * @since 2.0 + * + * @return The maximum width of the current instance of %Font, @n + * else @c -1 if the method fails + */ + int GetMaxWidth(void) const; + + /** + * Gets the maximum width of the current instance of %Font. + * + * @since 2.1 + * + * @return The maximum width of the current instance of %Font, @n + * else @c -1 if the method fails + */ + float GetMaxWidthF(void) const; + + /** + * Gets the ascender of the current instance of %Font. + * + * @since 2.0 + * + * @return The ascender of the current instance of %Font, @n + * else @c -1 if the method fails + */ + int GetAscender(void) const; + + /** + * Gets the ascender of the current instance of %Font. + * + * @since 2.1 + * + * @return The ascender of the current instance of %Font, @n + * else @c -1 if the method fails + */ + float GetAscenderF(void) const; + + /** + * Gets the descender of the current instance of %Font. + * + * @since 2.0 + * + * @return The descender of the current instance of %Font, @n + * else @c -1 if the method fails + */ + int GetDescender(void) const; + + /** + * Gets the descender of the current instance of %Font. + * + * @since 2.1 + * + * @return The descender of the current instance of %Font, @n + * else @c -1 if the method fails + */ + float GetDescenderF(void) const; + + /** + * Gets the left bear of a character. + * + * @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. + */ + result GetLeftBear(wchar_t character, int& leftBear) const; + + /** + * Gets the left bear of a character. + * + * @since 2.1 + * + * @return An error code + * @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; + + /** + * Gets the right bear of a character. + * + * @since 2.0 + * + * @return An error code + * @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; + + /** + * Gets the right bear of a character. + * + * @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. + */ + result GetRightBear(wchar_t character, float& rightBear) const; + + /** + * Gets the width and height of the font used in the specified text. @n + * This method retrieves the font dimension of the text. + * + * @if OSPCOMPAT + * @brief [Compatibility] + * @endif + * @since 2.0 + * @if OSPCOMPAT + * @compatibility This method has compatibility issues with OSP compatible applications. @n + * For more information, see the issue description for @ref CompFontGetTextExtentPage "here". + * @endif + * + * @return An error code + * @param[in] text The string + * @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 specified @c length is greater than the actual length of @c text. + */ + result GetTextExtent(const Tizen::Base::String& text, int length, Dimension& dim) const; + + /** + * @if OSPCOMPAT + * @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 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 the exact height regardless of font design. @n + * + * @endif + */ + + /** + * Gets the width and height of the font used in a specified text. @n + * The %GetTextExtent() method retrieves the font dimension of the text. + * + * @since 2.1 + * + * @return An error code + * @param[in] text The string + * @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 specified @c length is greater than the actual length of @c text. + */ + result GetTextExtent(const Tizen::Base::String& text, int length, FloatDimension& dim) const; + + /** + * Checks whether the font style of the current instance is bold. + * + * @since 2.0 + * + * @return @c true if the font style of the current instance is bold, @n + * else @c false + */ + bool IsBold(void) const; + + /** + * Checks whether the font style for the current instance is italics. + * + * @since 2.0 + * + * @return @c true if the font style for the current instance is italics, @n + * else @c false + */ + bool IsItalic(void) const; + + /** + * Checks whether the current instance has any style defined. + * + * @since 2.0 + * + * @return @c true if an extra style is not defined for the current instance, @n + * else @c false + */ + bool IsPlain(void) const; + + /** + * Checks whether the current instance has the strikeout style set. + * + * @since 2.0 + * + * @return @c true if the current instance has the strikeout style set, @n + * else @c false + */ + bool IsStrikeOut(void) const; + + /** + * Checks whether the current instance has the underline style set. + * + * @since 2.0 + * + * @return @c true if the current instance has the underline style set, @n + * else @c false + */ + bool IsUnderlined(void) const; + + /** + * Gets the font size of the current instance of %Font. + * + * @since 2.0 + * + * @return The font size, @n + * else @c -1 if the method fails + */ + int GetSize(void) const; + + /** + * Gets the font size of the current instance of %Font. + * + * @since 2.1 + * + * @return The font size, @n + * else @c -1 if the method fails + */ + float GetSizeF(void) const; + + /** + * Sets the strikeout style for the current instance of %Font. + * + * @since 2.0 + * + * @param[in] strikeOut Set to @c true to use the strikeout style for the current instance of %Font, @n + * else @c false + */ + void SetStrikeOut(bool strikeOut); + + /** + * Sets the underline style for the current instance of %Font. + * + * @since 2.0 + * + * @param[in] underline Set to @c true to use the underline style for the current instance of %Font, @n + * else @c false + */ + void SetUnderline(bool underline); + + /** + * Gets the system font list. + * + * @since 2.0 + * + * @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. + */ + static Tizen::Base::Collection::IList* GetSystemFontListN(void); + + /** + * Gets the face name of the font file of the specific path. + * + * @since 2.0 + * + * @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); + + /** + * Sets the character space. + * + * @since 2.0 + * + * @param[in] space A character space + */ + void SetCharSpace(int space); + + /** + * Sets the character space. + * + * @since 2.1 + * + * @param[in] space A character space + */ + void SetCharSpace(float space); + + /** + * Gets the character space. + * + * @since 2.0 + * + * @return The character space of this font instance, @n + * else @c -1 if the method fails + */ + int GetCharSpace(void) const; + + /** + * Gets the character space. + * + * @since 2.1 + * + * @return The character space of this font instance, @n + * else @c -1 if the method fails + */ + float GetCharSpaceF(void) const; + + /** + * Gets the face name. + * + * @since 2.0 + * + * @return The face name of this font instance + */ + Tizen::Base::String GetFaceName(void) const; + +private: + friend class _FontImpl; + + // + // This variable is for internal use only. + // Using this variable can cause behavioral, security-related, and consistency-related issues in the application. + // + // @since 2.0 + // + class _FontImpl* __pImpl; + + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + Font(const Font& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + Font& operator =(const Font& rhs); + +}; // Font + +}} // Tizen::Graphics + +#endif //_FGRP_FONT_H_ diff --git a/inc/FGrpFontCommon.h b/inc/FGrpFontCommon.h new file mode 100644 index 0000000..6fdf2a3 --- /dev/null +++ b/inc/FGrpFontCommon.h @@ -0,0 +1,51 @@ +// +// 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 FGrpFontCommon.h + * @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. + */ + +#ifndef _FGRP_FONT_COMMON_H_ +#define _FGRP_FONT_COMMON_H_ + +namespace Tizen { namespace Graphics +{ +/** +* @enum FontStyle +* +* Defines the style of the Font class instance. +* +* @since 2.0 +* +* @remarks Several different font styles can be combined using the "OR" operator. @n +* (For example, int style = @c FONT_STYLE_BOLD | @c FONT_STYLE_ITALIC). +*/ +enum FontStyle +{ + FONT_STYLE_PLAIN = 0x0001, /**< The plain font style */ + FONT_STYLE_BOLD = 0x0002, /**< The bold font style */ + FONT_STYLE_ITALIC = 0x0004, /** + +#include + +namespace Tizen { namespace Ui +{ +class Control; +} } + +namespace Tizen { namespace Graphics { namespace Opengl +{ + +class IGlRenderer; + +/** + * @enum EglContextClientVersion + * + * Defines the Egl Context Client version of the player. + * + * @since 2.0 + * + */ +enum EglContextClientVersion +{ + EGL_CONTEXT_CLIENT_VERSION_1_X, /**< The version is 1.x */ + EGL_CONTEXT_CLIENT_VERSION_2_X /**< The version is 2.x */ +}; + +/** + * @enum EglAttributesPreset + * + * Defines the preset of EGL attributes and configurations. + * + * @since 2.0 + * + */ +enum EglAttributesPreset +{ + EGL_ATTRIBUTES_PRESET_DONT_CARE, /**< Preset Don't care */ + EGL_ATTRIBUTES_PRESET_RGB565, /**< Preset RGB565 */ + EGL_ATTRIBUTES_PRESET_ARGB8888 /**< Preset ARGB8888 */ +}; + +/** + * @class GlPlayer + * @brief This class provides a simple template for rendering 3D objects with OpenGL-ES APIs + * @since 2.0 + * @final This class is not intended for extension. + * + */ +class _OSP_EXPORT_ GlPlayer + : public Tizen::Base::Object +{ +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. + * + * @since 2.0 + * + */ + GlPlayer(void); + + /** + * This destructor overrides Tizen::Base::Object::~Object(void). + * + * @since 2.0 + * + */ + virtual ~GlPlayer(void); + + /** + * 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 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(). + * + */ + result Construct(EglContextClientVersion version, Tizen::Ui::Control* pControl); + + /** + * 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. @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 If this returns an @c E_OPENGL_ERROR exception, developers can use eglGetError() to query which EGL error is raised. + * + */ + result Start(void); + + /** + * 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 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); + + /** + * 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 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); + + /** + * 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 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. + * + */ + result Stop(void); + + /** + * Redraws the scene. + * + * @since 2.0 + * @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 If this returns @c E_OPENGL_ERROR exception, developers can use eglGetError() to query the EGL error that occurs. + * + */ + result Redraw(void); + + /** + * Sets the FPS(frames per second) of the player. + * + * @since 2.0 + * @param[in] fps frames per second + * + * @remarks When you assign a negative integer for fps, the %GlPlayer tries to draw frames as fast as possible. + * + */ + void SetFps(int fps); + + /** + * Sets the configuration list of EGL Attributes to initialize the EGL system. + * + * @since 2.0 + * @return An error code + * @param[in] pEglConfigList A list of EGL attributes and their values + * @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 + * 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); + + /** + * Sets the EGL configuration with the given preset. + * + * @since 2.0 + * @return An error code + * @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 + * guarantee to set the EGL configurations with the given attributes but prefers them. + * + */ + result SetEglAttributePreset(EglAttributesPreset preset); + + /** + * Sets the EGL configuration for the given attribute with the given value. + * + * @since 2.0 + * @return An error code + * @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 + * guarantee to set the EGL configurations with the given attributes but prefers them. + * + */ + result SetEglAttribute(EGLint key, EGLint value); + + /** + * 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 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); + +private: + /* + * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + * + * @since 2.0 + */ + GlPlayer(const GlPlayer& rhs); + + /* + * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + * + * @since 2.0 + */ + GlPlayer& operator =(const GlPlayer& rhs); + + friend class _GlPlayerImpl; + class _GlPlayerImpl* __pImpl; + +}; // GlPlayer + +}}} // Tizen::Graphics::Opengl + +#endif //_FGRP_GL_PLAYER_H_ diff --git a/inc/FGrpIGlRenderer.h b/inc/FGrpIGlRenderer.h new file mode 100644 index 0000000..b25488a --- /dev/null +++ b/inc/FGrpIGlRenderer.h @@ -0,0 +1,172 @@ +// +// 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 FGrpIGlRenderer.h + * @brief This is the header file for the %IGlRenderer class. + * + * This header file contains the declarations of the %IGlRenderer class. + * + */ + +#ifndef _FGRP_GL_RENDERER_H_ +#define _FGRP_GL_RENDERER_H_ + +#include + +namespace Tizen { namespace Graphics { namespace Opengl +{ + +/** + * @class IGlRenderer + * @brief This virtual class defines the interface for %GlPlayer to draw 3D scene. + * + * @since 2.0 + * + * The %IGlRenderer virtual class defines the interface for GlPlayer to draw 3D scene. + */ +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. + * + * @since 2.0 + * + */ + virtual ~IGlRenderer(void) {} + + /** + * Initializes GL status and allocates necessary resources for the current Renderer such as shader, texture and so on. + * + * @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 encounters any errors or exceptions + * + */ + virtual bool InitializeGl(void) = 0; + + /** + * 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 encounters any errors or exceptions + * + */ + virtual bool TerminateGl(void) = 0; + + /** + * Draws a scene. @n + * 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 encounters any errors or exceptions + * + */ + virtual bool Draw(void) = 0; + + /** + * 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 the intended operations for pause state, @n + * else @c false if this method encounters any errors or exceptions + * + */ + virtual bool Pause(void) = 0; + + /** + * 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 the intended operations for resume state, @n + * else @c false if this method encounters any errors or exceptions + * + */ + virtual bool Resume(void) = 0; + + /** + * Gets the target control width. + * + * @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. + * + */ + virtual int GetTargetControlWidth(void) = 0; + + /** + * Gets the target control height. + * + * @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. + * + */ + virtual int GetTargetControlHeight(void) = 0; + + /** + * Sets the target control width. + * + * @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. + * + */ + virtual void SetTargetControlWidth(int width) = 0; + + /** + * Gets the target control height. + * + * @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. + * + */ + virtual void SetTargetControlHeight(int height) = 0; + +protected: + // + // This method is for internal use only. Using this method can cause behavioral, + // security-related, and consistency-related issues in the application. + // + // @since 2.0 + // + virtual void IGlRenderer_Reserved1(void) {} + virtual void IGlRenderer_Reserved2(void) {} + virtual void IGlRenderer_Reserved3(void) {} + +}; // IGlRenderer + +}}} // Tizen::Graphics::Opengl + +#endif //_FGRP_GL_RENDERER_H_ diff --git a/inc/FGrpIVideoTextureUpdateListener.h b/inc/FGrpIVideoTextureUpdateListener.h new file mode 100644 index 0000000..5e16f13 --- /dev/null +++ b/inc/FGrpIVideoTextureUpdateListener.h @@ -0,0 +1,97 @@ +// +// 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 FGrpIVideoTextureUpdateListener.h + * @brief This is the header file for the %IVideoTextureUpdateListener interface. + * + * This header file contains the declarations of the %IVideoTextureUpdateListener interface. + * + */ + +#ifndef _FGRP_IVIDEO_TEXTURE_UPDATE_LISTENER_H_ +#define _FGRP_IVIDEO_TEXTURE_UPDATE_LISTENER_H_ + +namespace Tizen { namespace Graphics { namespace Opengl +{ + +class VideoTexture; + +/** + * @interface IVideoTextureUpdateListener + * @brief This interface is used to register a listener for the %VideoTexture class. + * + * @since 2.0 + * + * The %IVideoTextureUpdateListener interface is used to register a listener for the VideoTexture class. + */ +class _OSP_EXPORT_ IVideoTextureUpdateListener +{ +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. + * + * @since 2.0 + */ + virtual ~IVideoTextureUpdateListener(void) {} + + /** + * Called when a video frame on the texture is ready. + * + * @since 2.0 + * + * @param[in] pVideoTexture The VideoTexture class + */ + virtual void OnTextureUpdated(VideoTexture* pVideoTexture) = 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. + // + // @since 2.0 + // + virtual void IVideoTextureUpdateListener_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. + // + // @since 2.0 + // + virtual void IVideoTextureUpdateListener_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. + // + // @since 2.0 + // + virtual void IVideoTextureUpdateListener_Reserved3(void) {} +}; // IVideoTextureUpdateListener + +}}} // Tizen::Graphics + +#endif //_FGRP_IVIDEO_TEXTURE_UPDATE_LISTENER_H_ diff --git a/inc/FGrpPixelFormat.h b/inc/FGrpPixelFormat.h new file mode 100644 index 0000000..803e6b3 --- /dev/null +++ b/inc/FGrpPixelFormat.h @@ -0,0 +1,53 @@ +// +// 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 FGrpPixelFormat.h + * @brief This is the header file for the PixelFormat enumeration that defines the pixel information. + * + * This header file contains the definitions of the PixelFormat enumeration that defines the pixel information. + */ + +#ifndef _FGRP_PIXEL_FORMAT_H_ +#define _FGRP_PIXEL_FORMAT_H_ + +namespace Tizen { namespace Graphics +{ +/** + * @enum PixelFormat + * + * Defines the bits per pixel and the bits per component. + * + * @since 2.0 + */ +enum PixelFormat +{ + PIXEL_FORMAT_RGB565 = 1, /**< The RGB565 pixel format */ + PIXEL_FORMAT_ARGB8888, /**< The ARGB8888 pixel format */ + PIXEL_FORMAT_R8G8B8A8, /**< The R8G8B8A8 pixel format @n + The order of color component is guaranteed by the byte unit. */ + PIXEL_FORMAT_YCbCr420_PLANAR, /**< The 8-bit Y-plane followed by 8-bit 2x2 sub sampled U-plane and V-plane */ + PIXEL_FORMAT_JPEG, /**< The encoded format */ + PIXEL_FORMAT_NV12, /**< The NV12 pixel format */ + PIXEL_FORMAT_UYVY, /**< The UYVY pixel format */ + 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. + 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. +}; + +} } // Tizen::Graphics + +#endif diff --git a/inc/FGrpPoint.h b/inc/FGrpPoint.h new file mode 100644 index 0000000..d7bdb24 --- /dev/null +++ b/inc/FGrpPoint.h @@ -0,0 +1,235 @@ +// +// 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 FGrpPoint.h + * @brief This is the header file for the %Point class. + * + * This header file contains the declarations of the %Point class. + */ + +#ifndef _FGRP_POINT_H_ +#define _FGRP_POINT_H_ + +#include + +namespace Tizen { namespace Graphics +{ +/** + * @class Point + * @brief This class encapsulates a point in a two-dimensional coordinate system. + * + * @since 2.0 + * + * @final This class is not intended for extension. + * + * The %Point class represents a location in a two-dimensional coordinate space specified with an integer precision. + * + * For more information on the class features, see Shapes. + */ +class _OSP_EXPORT_ Point + : public Tizen::Base::Object +{ +public: + /** + * This is the default constructor for this class. @n + * This initializes an instance of %Point with the values (0, 0). + * + * @since 2.0 + */ + Point(void); + + /** + * This is the copy constructor for the %Point class. + * + * @since 2.0 + * + * @param[in] rhs An instance of %Point + */ + Point(const Point& rhs); + + /** + * Initializes an instance of %Point with the specified location. + * + * @since 2.0 + * + * @param[in] x The x-coordinate + * @param[in] y The y-coordinate + */ + Point(int x, int y); + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~Point(void); + + /** + * Assigns the value of the specified instance to the current instance of %Point. + * + * @since 2.0 + * + * @param[in] rhs An instance of %Point + */ + Point& operator =(const Point& rhs); + + /** + * Checks whether the current instance and the specified instance of %Point are equal. + * + * @since 2.0 + * + * @return @c true if the two instances of %Point are at the same location, @n + * else @c false + * @param[in] rhs An instance of %Point + */ + bool operator ==(const Point& rhs) const; + + /** + * Checks whether the current instance and the specified instance of %Point are not equal. + * + * @since 2.0 + * + * @return @c true if the two instances of %Point are at different locations, @n + * else @c false + * @param[in] rhs An instance of %Point + */ + bool operator !=(const Point& rhs) const; + + /** + * Adds the value of the specified instance of %Point and the current instance. + * + * @since 2.0 + * + * @return A new instance of %Point containing the resulting value of the operation + * @param[in] rhs An instance of %Point + */ + Point operator +(const Point& rhs) const; + + /** + * Subtracts the value of the specified instance of %Point from the current instance. + * + * @since 2.0 + * + * @return A new instance of %Point containing the resulting value of the operation + * @param[in] rhs An instance of %Point + */ + Point operator -(const Point& rhs) const; + + /** + * Adds the value of the specified instance of %Point to the current instance. + * + * @since 2.0 + * + * @param[in] point An instance of %Point + */ + Point& operator +=(const Point& point); + + /** + * Subtracts the value of the specified instance of %Point from the current instance. + * + * @since 2.0 + * + * @param[in] point An instance of %Point + */ + Point& operator -=(const Point& point); + + /** + * Checks whether the value of the specified instance of %Point equals the value of the current instance. + * + * @since 2.0 + * + * @return @c true if the value of the specified instance equals the value of the current instance, @n + * else @c false + * @param[in] rhs An instance of %Point + * @remarks The %Point class has a semantic value, which means that the + * Equals() method checks whether the two instances have the same + * location. + */ + virtual bool Equals(const Tizen::Base::Object& rhs) const; + + /** + * Gets the hash value of the current instance. + * + * @since 2.0 + * + * @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; + + /** + * Sets the x and y coordinates for the current instance of %Point. + * + * @since 2.0 + * + * @param[in] x The new x-coordinate + * @param[in] y The new y-coordinate + */ + void SetPosition(int x, int y); + + /** + * Sets the current instance of %Point. + * + * @since 2.0 + * + * @param[in] point An instance of %Point + */ + void SetPosition(const Point& point); + + /** + * Translates this %Point to the indicated distance. + * + * @since 2.0 + * + * @param[in] deltaX The distance to move this point along the x-axis + * @param[in] deltaY The distance to move this point along the y-axis + */ + void Translate(int deltaX, int deltaY); + +public: + /** + * The x-coordinate of the point. + * + * @since 2.0 + */ + int x; + + /** + * The y-coordinate of the point. + * + * @since 2.0 + */ + int y; + +private: + friend class _PointImpl; + + // + // This variable is for internal use only. + // Using this variable can cause behavioral, security-related, and consistency-related issues in the application. + // + // @since 2.0 + // + class _PointImpl * __pImpl; + +}; // Point + +}} // Tizen::Graphics + +#endif // _FGRP_POINT_H_ diff --git a/inc/FGrpRectangle.h b/inc/FGrpRectangle.h new file mode 100644 index 0000000..08c3d93 --- /dev/null +++ b/inc/FGrpRectangle.h @@ -0,0 +1,347 @@ +// +// 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 FGrpRectangle.h + * @brief This is the header file for the %Rectangle class. + * + * This header file contains the declarations of the %Rectangle class. + */ + +#ifndef _FGRP_RECTANGLE_H_ +#define _FGRP_RECTANGLE_H_ + +#include + +namespace Tizen { namespace Graphics +{ +class Point; +class Dimension; + +/** + * @class Rectangle + * @brief This class abstracts a rectangular region. + * + * @since 2.0 + * + * @final This class is not intended for extension. + * + * The %Rectangle class represents a rectangular region in a coordinate space, which is specified by the rectangle + * object's top-left point (x, y) in the coordinate space, along with its width and height. + * + * For more information on the class features, see Shapes. + */ +class _OSP_EXPORT_ Rectangle + : public Tizen::Base::Object +{ +public: + /** + * This is the default constructor for this class. @n + * It initializes an instance of %Rectangle with all its attributes set to @c 0. + * + * @since 2.0 + * + * @remarks The attribute value is @c 0 when initialized. + */ + Rectangle(void); + + /** + * This is the copy constructor for the %Rectangle class. + * + * @since 2.0 + * + * @param[in] rhs An instance of %Rectangle + */ + Rectangle(const Rectangle& rhs); + + /** + * Initializes an instance of %Rectangle with the specified location and dimension. + * + * @since 2.0 + * + * @param[in] x The x-coordinate of the top-left corner of the rectangle + * @param[in] y The y-coordinate of the top-left corner of the rectangle + * @param[in] width The width of the rectangle + * @param[in] height The height of the rectangle + * + */ + Rectangle(int x, int y, int width, int height); + + /** + * Initializes an instance of %Rectangle at the location specified by @c point and + * with dimension specified by @c dim. + * + * @since 2.0 + * + * @param[in] point The location of the top-left corner of the rectangle + * @param[in] dim The width and height of the rectangle + */ + Rectangle(const Point& point, const Dimension& dim); + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~Rectangle(void); + + /** + * Assigns the value of the specified instance to the current instance of %Rectangle. + * + * @since 2.0 + * + * @param[in] rhs An instance of %Rectangle + */ + Rectangle& operator =(const Rectangle& rhs); + + /** + * Checks whether the location and dimension of the current instance of %Rectangle match those of the + * specified instance of %Rectangle. + * + * @since 2.0 + * + * @return @c true if the location and dimension of the current instance match those of the specified instance, @n + * else @c false + * @param[in] rhs An instance of %Rectangle + */ + bool operator ==(const Rectangle& rhs) const; + + /** + * Checks whether the location and dimension of the current instance of %Rectangle do not match those of the + * specified instance of %Rectangle. + * + * @since 2.0 + * + * @return @c true if the location and dimension of the current instance do not match those of the specified instance, @n + * else @c false + * @param[in] rhs An instance of %Rectangle + */ + bool operator !=(const Rectangle& rhs) const; + + /** + * Checks whether the specified point lies inside the current instance of %Rectangle. + * + * @since 2.0 + * + * @return @c true if the location represented by the specified @c point lies inside the current instance of %Rectangle, @n + * else @c false + * @param[in] point An instance of %Point + */ + bool Contains(const Point& point) const; + + /** + * Checks whether the value of the current instance of %Rectangle equals the value of the specified instance of + * %Rectangle. + * + * @since 2.0 + * + * @return @c true if the value of the current instance of %Rectangle equals the value of the specified instance of %Rectangle, @n + * else @c false + * @param[in] rhs An instance of %Rectangle + * @remarks The %Rectangle class has a semantic value, which means that the Equals() method checks whether the + * two instances have the same location and size. + */ + virtual bool Equals(const Tizen::Base::Object& rhs) const; + + /** + * Gets the hash value of the current instance. + * + * @since 2.0 + * + * @return The hash value of the current instance + */ + virtual int GetHashCode(void) const; + + /** + * Gets the intersection of the current instance and the specified instance of %Rectangle. @n + * If the two instances of %Rectangle do not intersect, an empty instance is returned. + * + * @since 2.0 + * + * @param[in] rect An instance of %Rectangle + */ + Rectangle GetIntersection(const Rectangle& rect) const; + + /** + * Checks whether the current instance of %Rectangle intersects with the specified instance of %Rectangle. + * + * @since 2.0 + * + * @return @c true if the current instance of %Rectangle intersects with the specified instance of %Rectangle, @n + * else @c false + * @param[in] rect An instance of %Rectangle + * + */ + bool IsIntersected(const Rectangle& rect) const; + + /** + * Gets the union of the current instance and the specified instance of %Rectangle. + * + * @since 2.0 + * + * @return An instance of %Rectangle containing the union of the two rectangles + * @param[in] rect An instance of %Rectangle + */ + Rectangle GetUnion(const Rectangle& rect) const; + + /** + * Gets the coordinates of the point at the bottom-right corner of the rectangle. + * + * @since 2.0 + * + * @return The coordinates of the point at the bottom-right corner of the rectangle + */ + Point GetBottomRight(void) const; + + /** + * Gets the coordinates of the point at the top-left corner of the rectangle. + * + * @since 2.0 + * + * @return The coordinates of the point at the top-left corner of the rectangle + */ + Point GetTopLeft(void) const; + + /** + * Checks whether this %Rectangle is empty. @n + * A %Rectangle is empty if its width or its height is less than or equal to @c 0. + * + * @since 2.0 + * + * @return @c true if this rectangle is empty, @n + * else @c false + */ + bool IsEmpty(void) const; + + /** + * Sets the size of this %Rectangle to match the specified Dimension. + * + * @since 2.0 + * + * @param[in] dim The new size for the Dimension + */ + void SetSize(const Dimension& dim); + + /** + * Sets the size of this %Rectangle to match the specified dimension. + * + * @since 2.0 + * + * @param[in] width The new width + * @param[in] height The new height + */ + void SetSize(int width, int height); + + /** + * Sets the position of this %Rectangle to the specified point. + * + * @since 2.0 + * + * @param[in] point The new position + */ + void SetPosition(const Point& point); + + /** + * Sets the location of the current instance of %Rectangle with the specified values of the + * x and y coordinates of the top-left corner point. + * + * @since 2.0 + * + * @param[in] x The new x-coordinate + * @param[in] y The new y-coordinate + */ + void SetPosition(int x, int y); + + /** + * Sets the location and the dimensions of the current instance of %Rectangle with the specified x and y + * coordinates of the top-left corner point and the specified dimensions. + * + * @since 2.0 + * + * @param[in] x The new x coordinate + * @param[in] y The new y coordinate + * @param[in] width The new width + * @param[in] height The new height + */ + void SetBounds(int x, int y, int width, int height); + + /** + * Sets the location and the dimensions of the current instance of %Rectangle with the specified location and + * dimension. + * + * @since 2.0 + * + * @param[in] point An instance of Point + * @param[in] dim An instance of Dimension + */ + void SetBounds(const Point& point, const Dimension& dim); + + /** + * Translates this %Rectangle to the new point by the specified distance along the x-axis and y-axis. + * + * @since 2.0 + * + * @param[in] deltaX The distance to move this %Rectangle along the x-axis + * @param[in] deltaY The distance to move this %Rectangle along the y-axis + */ + void Translate(int deltaX, int deltaY); + +public: + /** + * The x-coordinate of the top-left corner of the rectangle. + * + * @since 2.0 + */ + int x; + + /** + * The y-coordinate of the top-left corner of the rectangle. + * + * @since 2.0 + */ + int y; + + /** + * The width of this rectangle. + * + * @since 2.0 + */ + int width; + + /** + * The height of this rectangle. + * + * @since 2.0 + */ + int height; + +private: + friend class _RectangleImpl; + + // + // This variable is for internal use only. + // Using this variable can cause behavioral, security-related, and consistency-related issues in the application. + // + // @since 2.0 + // + class _RectangleImpl * __pImpl; + +}; // Rectangle + +}} // Tizen::Graphics + +#endif // _FGRP_RECTANGLE_H_ diff --git a/inc/FGrpTextElement.h b/inc/FGrpTextElement.h new file mode 100644 index 0000000..9edc6f5 --- /dev/null +++ b/inc/FGrpTextElement.h @@ -0,0 +1,334 @@ +// +// +// 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 FGrpTextElement.h + * @brief This is the header file for the %TextElement class. + * + * This header file contains the declarations of the %TextElement class. + */ + +#ifndef _FGRP_TEXT_ELEMENT_H_ +#define _FGRP_TEXT_ELEMENT_H_ + +#include +#include +#include +#include +#include + +namespace Tizen { namespace Graphics +{ +/** +* @class TextElement +* @brief This class provides methods for the text elements. +* +* @since 2.0 +* +* @final This class is not intended for extension. +* +* The %TextElement class encapsulates the characteristics of a text, such as the constant string and font style. +* A text element draws the text on to a canvas. +* +* For more information on the attributes of %TextElement, see EnrichedText. +* +*/ +class _OSP_EXPORT_ TextElement + : public Tizen::Base::Object +{ +public: + /** + * This is the default constructor for this class. + * + * @since 2.0 + * + * @remarks After creating an instance of this class, one of the + * Construct() methods must be called explicitly to initialize this instance. + */ + TextElement(void); + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~TextElement(void); + + /** + * Initializes the current instance of %TextElement with the specified text. @n + * If the text is not specified, the default system font is set. + * + * @since 2.0 + * + * @return An error code + * @param[in] text The text string + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + * @exception E_INVALID_ARG The specified input parameter is invalid. + */ + result Construct(const Tizen::Base::String& text); + + /** + * Initializes the current instance of %TextElement with the specified text. @n + * The canvas is used for initializing the font color attributes, such as the foreground color and the background color. + * + * @since 2.0 + * + * @return An error code + * @param[in] text The text string + * @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_OUT_OF_MEMORY The memory is insufficient. + * @exception E_INVALID_ARG A specified input parameter is invalid. + */ + result Construct(const Tizen::Base::String& text, const Tizen::Graphics::Canvas& canvas); + + /** + * Initializes the current instance of %TextElement. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + * @exception E_SYSTEM An unknown operating system error has occurred. + * @remarks To set the text, use the SetText() method. + */ + result Construct(void); + + /** + * Initializes the current instance of %TextElement to represent a linked text with the specified link information. @n + * If the link information is not specified, the default system font is set. + * + * @since 2.0 + * + * @return An error code + * @param[in] text The linked text string + * @param[in] linkType The link type + * @param[in] link The string that contains the actual link + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - The specified @c text is an empty string. + * - The specified @c linkType is @c LINK_TYPE_NONE. + * @exception E_SYSTEM An unknown operating system error has occurred. + */ + result Construct(const Tizen::Base::String& text, Tizen::Base::Utility::LinkType linkType, const Tizen::Base::String& link); + + /** + * Initializes the current instance of %TextElement with the specified text and autolink mask. @n + * If the text and autolink mask are not specified, the default system font is set. + * + * @since 2.0 + * + * @return An error code + * @param[in] text The text string + * @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. + * @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. + * @remarks If @c text contains more than one detectable link, the first link is converted + * to a linked text and the rest of the links are ignored. + * @see Tizen::Base::Utility::LinkType + */ + result Construct(const Tizen::Base::String& text, unsigned long autoLink); + + /** + * Initializes the current instance of %TextElement to represent a linked text with the specified link information. @n + * If the link information is not specified, the default system font is set. + * + * @since 2.0. + * + * @return An error code + * @param[in] text The linked text string + * @param[in] linkType The link type + * @param[in] link The string that contains the actual link + * @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_OUT_OF_MEMORY The memory is insufficient. + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - The specified @c text is an empty string. + * - The specified @c linkType is @c LINK_TYPE_NONE. + * @exception E_SYSTEM An unknown operating system error has occurred. + */ + result Construct(const Tizen::Base::String& text, Tizen::Base::Utility::LinkType linkType, const Tizen::Base::String& link, const Tizen::Graphics::Canvas& canvas); + + /** + * Initializes the current instance of %TextElement with the specified text, autolink mask, and graphics canvas. @n + * If the parameters are not specified, the default system font is set. + * + * @since 2.0 + * + * @return An error code + * @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); + + /** + * Gets the string that contains the actual link. + * + * @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. + */ + Tizen::Base::String GetLink(void) const; + + /** + * Gets the link type of the text element. @n + * The link type is the first auto-detected link. + * + * @since 2.0 + * + * @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; + + /** + * Sets the text of %TextElement with the specified string. + * + * @since 2.0 + * + * @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); + + /** + * Sets the font of %TextElement. + * + * @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. + */ + result SetFont(const Tizen::Graphics::Font& font); + + /** + * Sets the text color of %TextElement. + * + * @since 2.0 + * + * @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); + + /** + * Sets the background color of %TextElement. + * + * @since 2.0 + * + * @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); + + /** + * Sets the outline color of %TextElement. + * + * @since 2.0 + * + * @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 + * + * @return A string containing the text + */ + Tizen::Base::String GetText(void) const; + + /** + * Gets the text color of %TextElement. + * + * @since 2.0 + * + * @return The foreground color + */ + Tizen::Graphics::Color GetTextColor(void) const; + + /** + * Gets the background color of %TextElement. + * + * @since 2.0 + * + * @return The background color + */ + Tizen::Graphics::Color GetBackgroundColor(void) const; + + /** + * Gets the outline color of %TextElement. + * + * @since 2.0 + * + * @return The outline color + */ + Tizen::Graphics::Color GetOutlineColor(void) const; + +private: + friend class _TextElementImpl; + + // + // This value is for internal use only. Using this value can cause behavioral, security-related, + // and consistency-related issues in the application. + // + /** + * @since 2.0 + */ + class _TextElementImpl * __pImpl; + + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + TextElement(const TextElement& font); + + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + TextElement& operator =(const TextElement& rhs); + +}; // TextElement + +} } // Tizen::Graphics + +#endif // _FGRP_TEXT_ELEMENT_H_ diff --git a/inc/FGrpVideoTexture.h b/inc/FGrpVideoTexture.h new file mode 100644 index 0000000..b70d895 --- /dev/null +++ b/inc/FGrpVideoTexture.h @@ -0,0 +1,152 @@ +// +// 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 FGrpVideoTexture.h + * @brief This is the header file for the %VideoTexture class. + * + * This header file contains the declarations of the %VideoTexture class. + * + */ + +#ifndef _FGRP_VIDEO_TEXTURE_H_ +#define _FGRP_VIDEO_TEXTURE_H_ + +#include + +namespace Tizen { namespace Graphics { namespace Opengl +{ + +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. + * + * @since 2.0 + * + * @final This class is not intended for extension. + * + * The %VideoTexture class provides a texture by which you can draw a video frame on OpenGL-ES texture. + * + */ +class _OSP_EXPORT_ VideoTexture + : public Tizen::Base::Object +{ +public: + /** + * 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 + * + */ + VideoTexture(void); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~VideoTexture(void); + + /** + * Initializes this instance of %VideoTexture with the specified parameters. + * + * @since 2.0 + * @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 @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 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. + */ + result Construct(int textureId, int width, int height); + + /** + * Binds the most recent frame to the texture. + * + * @since 2.0 + * + * @return An error code + * @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); + + /** + * Adds a listener invoked when a video frame is ready. + * + * @since 2.0 + * + * @param[in] listener The listener + * @see RemoveVideoTextureUpdateListener() + */ + void AddVideoTextureUpdateListener(IVideoTextureUpdateListener& listener); + + /** + * Removes the specified listener. + * + * @since 2.0 + * + * @param[in] listener The listener to remove + @see AddVideoTextureUpdateListener() + */ + void RemoveVideoTextureUpdateListener(IVideoTextureUpdateListener& listener); + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + // @param[in] rhs The source from which this instance is copied + // + VideoTexture(const VideoTexture& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + // @param[in] rhs An instance of %VideoTexture + // + VideoTexture& operator =(const VideoTexture& rhs); + +private: + friend class _VideoTextureImpl; + + class _VideoTextureImpl* __pImpl; +}; // VideoTexture + +}}} // Tizen::Graphics + +#endif //_FGRP_VIDEO_TEXTURE_H_ diff --git a/inc/FUi.h b/inc/FUi.h new file mode 100644 index 0000000..c8ac0e7 --- /dev/null +++ b/inc/FUi.h @@ -0,0 +1,149 @@ +// +// 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.h + * @brief This is the header file for the %Ui namespace. + * + * This header file contains the declarations and descriptions of the %Ui namespace. + */ + +#ifndef _FUI_H_ +#define _FUI_H_ + +// Includes +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace Tizen +{ +/** + * @namespace Tizen::Ui + * @brief This namespace contains the classes and interfaces that act as the %UI foundation for the applications. + * @since 2.0 + * + * @remarks @b Header @b %file: @b \#include @b @n + * @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, + * Tizen::Ui::Animations, whose classes handle animation-related functionalities, and Tizen::Ui::Effects, whose classes + * handle the effect-related functionalities. + * + * For more information on the %Ui namespace features, see UI Guide. + * + * The following diagram illustrates the relationships between the classes belonging to the %Ui namespace. + * + * @image html ui_namespace_classdiagram.png + * + */ +namespace Ui +{ + +}; // Tizen::Ui +}; // Tizen +#endif // _FUI_H_ diff --git a/inc/FUiAccessibilityContainer.h b/inc/FUiAccessibilityContainer.h new file mode 100644 index 0000000..e5e53d5 --- /dev/null +++ b/inc/FUiAccessibilityContainer.h @@ -0,0 +1,317 @@ +// +// 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 FUiAccessibilityContainer.h + * @brief This is the header file for the %AccessibilityContainer class. + * + * This header file contains the declarations of the %AccessibilityContainer class. + */ + +#ifndef _FUI_ACCESSIBILITY_CONTAINER_H_ +#define _FUI_ACCESSIBILITY_CONTAINER_H_ + +#include +#include +#include + +namespace Tizen { namespace Base +{ +class String; +}} // Tizen::Base + +namespace Tizen { namespace Base { namespace Collection +{ +class IList; +}}} //Tizen::Base::Collection + + +namespace Tizen { namespace Ui +{ + +class Control; +class AccessibilityElement; +class IAccessibilityListener; +class _AccessibilityContainerImpl; + +/** +* @class AccessibilityContainer +* @brief This class represents a container for an accessibility element. +* @since 2.0 +* +* +* @final This class is not intended for extension. +* +* This class represents a container for an accessibility element. @n +* The following example demonstrates how to use the %AccessibilityContainer class. +* +* @code +// Sample code for AccessibilitySample.h +#include +#include + +class AccessibilitySample + : public Tizen::Ui::Controls::Form +{ +public: + AccessibilitySample(void); + virtual ~AccessibilitySample(void); + + result Initialize(void); + + virtual result OnInitializing(void); + + +private: + static const int ID_FOOTER_ITEM1 = 101; + static const int ID_FOOTER_ITEM2 = 102; + + Tizen::Graphics::Bitmap *__pTizenBitmap; +}; + +// Sample code for AccessibilitySample.cpp +#include "FApp.h" +#include "FMedia.h" +#include "AccessibilitySample.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Media; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; + +AccessibilitySample::AccessibilitySample(void) + : __pTizenBitmap(null) +{ +} + +AccessibilitySample::~AccessibilitySample(void) +{ + delete __pTizenBitmap; + __pTizenBitmap = null; +} + +result +AccessibilitySample::Initialize(void) +{ + Image image; + result r = Form::Construct(FORM_STYLE_NORMAL| FORM_STYLE_PORTRAIT_INDICATOR| FORM_STYLE_HEADER| FORM_STYLE_FOOTER); + r = image.Construct(); + String filepath = App::GetInstance()->GetAppResourcePath() + L"screen-density-xhigh/tizen.png"; + + __pTizenBitmap = image.DecodeN(filepath, BITMAP_PIXEL_FORMAT_ARGB8888); + return r; +} + +result +AccessibilitySample::OnInitializing(void) +{ + result r = E_SUCCESS; + + Header * pHeader = GetHeader(); + if (pHeader != null) + { + pHeader->SetStyle(HEADER_STYLE_TITLE); + pHeader->SetTitleText(L"Accessibility Sample"); + } + + //Draws an image + Canvas* pCanvas = GetCanvasN(); + Rectangle rt = pCanvas->GetBounds(); + int width = rt.width; + int height = rt.width * __pTizenBitmap->GetHeight() / __pTizenBitmap->GetWidth(); + r = pCanvas->DrawBitmap(Rectangle(rt.x, (rt.y + ( (rt.height - height) / 2)), width, height), *__pTizenBitmap); + + //Makes an accessibility element for the drawn image + AccessibilityElement* pAccessibilityElement = new AccessibilityElement(); + r = pAccessibilityElement->Construct(GetBounds(), L"Tizen Image"); + pAccessibilityElement->SetLabel(L"Tizen Image"); + pAccessibilityElement->SetTrait(L"Image"); + pAccessibilityElement->SetHint(L"This image rotates automatically."); + GetAccessibilityContainer()->AddElement(*pAccessibilityElement); + pAccessibilityElement->SetBounds(Rectangle(rt.x, (rt.y + ( (rt.height - height) / 2)), width, height)); + + Footer* pFooter = GetFooter(); + if (pFooter != null) + { + pFooter->SetStyle(FOOTER_STYLE_TAB); + + FooterItem footerItem1; + footerItem1.Construct(ID_FOOTER_ITEM1); + footerItem1.SetText(L"Item1"); + pFooter->AddItem(footerItem1); + + FooterItem footerItem2; + footerItem2.Construct(ID_FOOTER_ITEM2); + footerItem2.SetText(L"Item2"); + pFooter->AddItem(footerItem2); + + //Sets an information to the system accessibility element + AccessibilityContainer* pContainer = pFooter->GetAccessibilityContainer(); + AccessibilityElement* pElement = pContainer->GetElement(L"Tab2Text"); + pElement->SetHint(L"Test accessibility"); + } + delete pCanvas; + Invalidate(true); + return r; +} + * @endcode + * + */ + +class _OSP_EXPORT_ AccessibilityContainer + : public Tizen::Base::Object +{ +public: + /** + * Gets the owner of the accessibility container. + * + * @since 2.0 + * @return A pointer to the control which owns this %AccessibilityContainer @n + * It cannot be @c null. + * @see Control::GetAccessibilityContainer() + */ + const Control* GetOwner(void) const; + + /** + * Gets the owner of the accessibility container. + * + * @since 2.0 + * @return A pointer to the control which owns this %AccessibilityContainer @n + * It cannot be @c null. + * @see Control::GetAccessibilityContainer() + */ + Control* GetOwner(void); + + /** + * 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 An instance of IAccessibilityListener is already registered. + * @see RemoveAccessibilityListener() + */ + result AddAccessibilityListener(IAccessibilityListener& listener); + + /** + * 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 An instance of the listener is not found. + * @see AddAccessibilityListener() + */ + result RemoveAccessibilityListener(IAccessibilityListener& listener); + + /** + * 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 An instance of AccessibilityElement is already registered. + * @see RemoveElement() + * @see RemoveAllElements() + * + */ + result AddElement(AccessibilityElement& element); + + /** + * Removes the accessibility element in 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_NOT_FOUND An instance of AccessibilityElement is not found. + * @see AddElement() + * + */ + result RemoveElement(AccessibilityElement& element); + + /** + * Removes all the accessibility elements in the %AccessibilityContainer. + * + * @since 2.0 + * + * @see AddElement() + * + */ + void RemoveAllElements(void); + + /** + * Gets an instance of the AccessibilityElement which is the child of the %AccessibilityContainer with the specified name. + * + * @since 2.0 + * + * @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 + * + */ + AccessibilityElement* GetElement(const Tizen::Base::String& name) const; + + /** + * Gets the list of accessibility elements that are children of %AccessibilityContainer. + * + * @since 2.0 + * + * @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; + +private: + // + // This default constructor is intentionally declared as private so that only the platform can create an instance + // + AccessibilityContainer(void); + + // + // This destructor is intentionally declared as private so that only the platform can delete an instance. + // + virtual ~AccessibilityContainer(void); + + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + AccessibilityContainer(const AccessibilityContainer& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + AccessibilityContainer& operator =(const AccessibilityContainer& rhs); + +private: + _AccessibilityContainerImpl* __pAccessibilityContainerImpl; + friend class _AccessibilityContainerImpl; +}; // AccessibilityContainer + +}} // Tizen::Ui +#endif //_FUI_ACCESSIBILITY_CONTAINER_H_ diff --git a/inc/FUiAccessibilityElement.h b/inc/FUiAccessibilityElement.h new file mode 100644 index 0000000..b2a8994 --- /dev/null +++ b/inc/FUiAccessibilityElement.h @@ -0,0 +1,228 @@ +// +// 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 FUiAccessibilityElement.h + * @brief This is the header file for the %AccessibilityElement class. + * + * This header file contains the declarations of the %AccessibilityElement class. + * + */ + +#ifndef _FUI_ACCESSIBILITY_ELEMENT_H_ +#define _FUI_ACCESSIBILITY_ELEMENT_H_ + +#include +#include +#include + +namespace Tizen { namespace Base +{ + class String; +}} //Tizen::Base + +namespace Tizen { namespace Graphics +{ + class Rectangle; + class FloatRectangle; +}} //Tizen::Graphics + +namespace Tizen { namespace Ui +{ +class _AccessibilityElementImpl; + +/** +* @class AccessibilityElement +* @brief This class represents an accessibility element. +* @since 2.0 +* +* @final This class is not intended for extension. +* +* This class represents an accessibility element. +*/ +class _OSP_EXPORT_ AccessibilityElement + : public Tizen::Base::Object +{ +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. + * + * @since 2.0 + */ + AccessibilityElement(void); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~AccessibilityElement(void); + + /** + * Initializes the instance of %AccessibilityElement with the specified parameters. + * + * @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 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); + + /** + * Initializes this instance of %AccessibilityElement with specified parameters. + * + * @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 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); + + /** + * Gets the name of the element. + * + * @since 2.0 + * @return The name of the element + */ + Tizen::Base::String GetName(void) const; + + /** + * Sets the bounds to the element. + * + * @since 2.0 + * @param[in] bounds The bounds of the accessibility element + */ + void SetBounds(const Tizen::Graphics::Rectangle& bounds); + + /** + * Sets the bounds of the element. + * + * @since 2.1 + * @param[in] bounds The bounds of the accessibility element + */ + void SetBounds(const Tizen::Graphics::FloatRectangle& bounds); + + /** + * Gets the bounds of the element. + * + * @since 2.0 + * @return The bounds of the element + */ + Tizen::Graphics::Rectangle GetBounds(void) const; + + /** + * Gets the bounds of the element. + * + * @since 2.1 + * @return The bounds of the element + */ + Tizen::Graphics::FloatRectangle GetBoundsF(void) const; + + /** + * Sets the label to the element. + * + * @since 2.0 + * @param[in] label The label of the accessibility element + */ + void SetLabel(const Tizen::Base::String& label); + + /** + * Gets the label of the element. + * + * @since 2.0 + * @return The label of the element + */ + Tizen::Base::String GetLabel(void) const; + + /** + * Sets the hint to the element. + * + * @since 2.0 + * @param[in] hint The hint of the accessibility element + */ + void SetHint(const Tizen::Base::String& hint); + + /** + * Gets the hint of the element. + * + * @since 2.0 + * @return The hint of the element + */ + Tizen::Base::String GetHint(void) const; + + /** + * Sets the trait to the element. + * + * @since 2.0 + * @param[in] trait The trait of the accessibility element + */ + void SetTrait(const Tizen::Base::String& trait); + + + /** + * Gets the trait of the element. + * + * @since 2.0 + * @return The trait of the element + */ + Tizen::Base::String GetTrait(void) const; + + /** + * Sets the value to the element. + * + * @since 2.0 + * @param[in] value The value of the accessibility element + */ + void SetValue(const Tizen::Base::String& value); + + /** + * Gets the value of the element. + * + * @since 2.0 + * @return The value of the element + */ + Tizen::Base::String GetValue(void) const; + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + AccessibilityElement(const AccessibilityElement& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + AccessibilityElement& operator =(const AccessibilityElement& rhs); + +private: + friend class _AccessibilityElementImpl; + _AccessibilityElementImpl* __pAccessibilityElementImpl; +}; // AccessibilityElement + +}} // Tizen::Ui +#endif //_FUI_ACCESSIBILITY_ELEMENT_H_ \ No newline at end of file diff --git a/inc/FUiAccessibilityTypes.h b/inc/FUiAccessibilityTypes.h new file mode 100644 index 0000000..344e602 --- /dev/null +++ b/inc/FUiAccessibilityTypes.h @@ -0,0 +1,48 @@ +// +// 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 FUiAccessibilityTypes.h + * @brief This is the header file for declarations of the accessibility enumeration . + * + * This header file contains the declarations of the accessibility enumeration . + * + */ + +#ifndef _FUI_ACCESSIBILITY_TYPES_H_ +#define _FUI_ACCESSIBILITY_TYPES_H_ + +namespace Tizen { namespace Ui +{ +/** + * @enum AccessibilityScreenReaderStatus + * + * Defines the status of the accessibility screen reader. + * + * @since 2.0 + */ +enum AccessibilityScreenReaderStatus +{ + 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, /**< 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 +#endif //_FUI_ACCESSIBILITY_TYPES_H_ diff --git a/inc/FUiAnimAnimationBase.h b/inc/FUiAnimAnimationBase.h new file mode 100644 index 0000000..9bf6b9b --- /dev/null +++ b/inc/FUiAnimAnimationBase.h @@ -0,0 +1,458 @@ +// +// 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 FUiAnimAnimationBase.h + * @brief This is the header file for the %AnimationBase class. + * + * This header file contains the declarations of the %AnimationBase class and the enumerators related to it. + */ + +#ifndef _FUI_ANIM_ANIMATION_BASE_H_ +#define _FUI_ANIM_ANIMATION_BASE_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Animations +{ + +/** + * @class AnimationBase + * @brief This class is the base class for all the Animation classes. @n + * It is an abstract base class. + * + * @since 2.0 + * + * The %AnimationBase class defines the basic animation properties, such as the interpolator to be used, the duration of the animation in milliseconds, the delay before the animation is started in milliseconds, and the repeat count. + * + */ +class _OSP_EXPORT_ AnimationBase + : public Tizen::Base::Object +{ +public: + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~AnimationBase(void); + + + /** + * Sets the duration of the animation. + * + * @since 2.0 + * + * @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. + */ + result SetDuration(long milliseconds); + + + /** + * Sets the offset value of the animation. @n + * Additionally, the %SetOffset() method 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 + * @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. + * - 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); + + + /** + * Sets the delay for the animation. @n + * The animation starts after the duration of delay has passed. + * + * @since 2.0 + * + * @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_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. + */ + result SetDelay(long milliseconds); + + + /** + * Sets the repeat count for the animation. @n + * Repeats an animation for the specified number of times. + * + * @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. + * @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. + */ + result SetRepeatCount(long count); + + + /** + * 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 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); + + + /** + * Sets the scale ratio of the animation. @n + * The %SetScaleRatio() method multiplies the duration, offset, and delay using the scale ratio. + * + * @since 2.0 + * + * @return An error code + * @param[in] scaleRatio The scale ratio property of the animation + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The value of the specified parameter is negative. + */ + result SetScaleRatio(float scaleRatio); + + + /** + * Sets the hold end value of the animation. @n + * The %SetHoldEndEnabled() method retains the end values of an animation or goes to the start value of an animation. + * + * @since 2.0 + * + * @param[in] holdEnd Set to @c true to hold the end values of the animation, @n + * else @c false + */ + void SetHoldEndEnabled(bool holdEnd); + + + /** + * Gets the duration of the animation in milliseconds. + * + * @since 2.0 + * + * @return The duration value of the animation + */ + long GetDuration(void) const; + + + /** + * Gets the offset value in milliseconds after the animation starts. + * + * @since 2.0 + * + * @return The offset value of the animation in milliseconds @n + * The default value of the offset is @c 0. + */ + long GetOffset(void) const; + + + /** + * Gets the delay value in milliseconds before the animation starts. + * + * @since 2.0 + * + * @return The delay value in milliseconds @n + * The default value of the delay is @c 0. + */ + long GetDelay(void) const; + + + /** + * Gets the repeat count value of the animation. + * + * @since 2.0 + * + * @return The repeat count value of the animation @n + * The default value of the repeat count is @c 1. + */ + long GetRepeatCount(void) const; + + + /** + * Checks whether the 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. + */ + bool IsAutoReverseEnabled(void) const; + + + /** + * Gets the scale ratio value of the animation. + * + * @since 2.0 + * + * @return The scale ratio value of the animation @n + * The default value of scale ratio is @c 1.0f. + */ + float GetScaleRatio(void) const; + + + /** + * Checks whether the hold end value of the animation is enabled. + * + * @since 2.0 + * + * @return @c true if the hold end value is enabled, @n + * else @c false @n + * The default hold end value is @c true. + */ + bool IsHoldEndEnabled(void) const; + + + /** + * Sets the interpolator type. + * + * @since 2.0 + * + * @param[in] interpolatorType The interpolator type used for the animation + */ + void SetInterpolatorType(AnimationInterpolatorType interpolatorType); + + + /** + * Gets the interpolator type. + * + * @since 2.0 + * + * @return The interpolator type of an animation @n + * The default interpolator type is @c ANIMATION_INTERPOLATOR_LINEAR. + */ + AnimationInterpolatorType GetInterpolatorType(void) const; + + + /** + * Sets the control points for Bezier interpolator. @n + * The %SetBezierControlPoints() method is supported only if the interpolator is ANIMATION_INTERPOLATOR_BEZIER. + * + * @since 2.0 + * + * @return An error code + * @param[in] time1 The control point 1 - Time @n + * The time must be in the range @c 0.0 to @c 1.0. The time value is scaled relative to the duration of the animation. + * @param[in] value1 The control point 1 - Value @n + * The value must be in the range @c 0.0 to @c 1.0. The value is scaled relative to the start and end value of the animation. + * @param[in] time2 The control point 2 - Time @n + * The time must be in the range @c 0.0 to @c 1.0. The time value is scaled relative to the duration of the animation. + * @param[in] value2 The control point 2 - Value @n + * The value must be in the range @c 0.0 to @c 1.0. The value is scaled relative to the start and end value of the animation. + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_OPERATION This method is not supported for the interpolator set of this instance. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @remarks @c time1 can be greater than @c time2 and vice versa. + */ + result SetBezierControlPoints(float time1, float value1, float time2, float value2); + + + /** + * 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. + * + * @since 2.0 + * + * @return An error code + * @param[out] time1 The control point 1 - Time @n + * The default value of control point 1 is @c 0.0. + * @param[out] value1 The control point 1 - Value @n + * The default value of control point 1 is @c 0.0. + * @param[out] time2 The control point 2 - Time @n + * The default value of control point 2 is @c 0.0. + * @param[out] value2 The control point 2 - Value @n + * The default value of control point 2 is @c 0.0. + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_OPERATION This method is not supported for the interpolator set of this instance. + * + */ + result GetBezierControlPoints(float& time1, float& value1, float& time2, float& value2) const; + + + /** + * Gets the count of key frames added to this animation. + * + * @since 2.0 + * + * @return The keyframe count + */ + int GetKeyFrameCount(void) const; + + + /** + * Sets the name of the animation. + * + * @since 2.0 + * + * @param[in] name The name of the animation + */ + void SetName(const Tizen::Base::String& name); + + + /** + * Gets the name of the animation. + * + * @since 2.0 + * + * @return The name of the animation @n + * The default value of the name is an empty string. + */ + Tizen::Base::String GetName(void) const; + + + /** + * Gets the type information of this instance. + * + * @since 2.0 + * + * @return The type information of this instance + */ + virtual AnimationType GetType(void) const = 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 is the default constructor for this class. + // + // @since 2.0 + // + AnimationBase(void); + + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // This is the copy constructor for the %AnimationBase class. + // + // @since 2.0 + // + // @param[in] animationBase An instance of AnimationBase + // @remarks The animation name of the copied %AnimationBase object will be same as the %AnimationBase object passed. + // User must change the name using the SetName() method of this class in order to make animation name unique. + // + AnimationBase(const AnimationBase& animationBase); + + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // This is the constructor for this class. + // + // @since 2.0 + // + // @param[in] duration The duration of animation in milliseconds + // @param[in] interpolator The type of Interpolation used for animation's intermediate value calculation + // + AnimationBase(long duration, AnimationInterpolatorType interpolator); + + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // Assigns the value of the specified instance to the current instance of %AnimationBase. + // + // @since 2.0 + // + // @param[in] value An instance of %AnimationBase + // @remarks The animation name of the returned %AnimationBase object will be same as the %AnimationBase object passed. + // User must change the name using SetName() method of this class in order to make animation name unique. + // + AnimationBase& operator =(const AnimationBase& value); + + + // + // 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. + // + // @since 2.0 + // + virtual void AnimationBase_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. + // + // @since 2.0 + // + virtual void AnimationBase_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. + // + // @since 2.0 + // + virtual void AnimationBase_Reserved3(void); + + + friend class _AnimationBaseImpl; + + + // + // This variable is for internal use only. Using this variable can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // This variable is for internal usage. + // + // @since 2.0 + // + class _AnimationBaseImpl* _pAnimationBaseImpl; +}; // AnimationBase + + +}}} // Tizen::Ui::Animations + +#endif // _FUI_ANIM_ANIMATION_BASE_H_ diff --git a/inc/FUiAnimAnimationGroup.h b/inc/FUiAnimAnimationGroup.h new file mode 100644 index 0000000..9e39c92 --- /dev/null +++ b/inc/FUiAnimAnimationGroup.h @@ -0,0 +1,143 @@ +// +// 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 FUiAnimAnimationGroup.h + * @brief This is the header file for the %AnimationGroup class. + * + * This header file contains the declarations of the %AnimationGroup class and its helper classes. + */ + +#ifndef _FUI_ANIM_ANIMATION_GROUP_H_ +#define _FUI_ANIM_ANIMATION_GROUP_H_ + +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Animations +{ + +/** + * @class AnimationGroup + * @brief This class is used to group a set of animations together. + * + * @since 2.0 + * + * The %AnimationGroup class is used to group a set of animations together. + * + * For more information on the class features, see Animating UI Controls. + */ +class _OSP_EXPORT_ AnimationGroup + : public Tizen::Base::Object +{ +public: + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~AnimationGroup(void); + + + /** + * Removes all the animations from the animation group. + * + * @since 2.0 + */ + virtual void RemoveAllAnimations(void) = 0; + + + /** + * Gets the animation count value. + * + * @since 2.0 + * + * @return The total number of animations added to the group + */ + virtual int GetAnimationCount(void) const = 0; + + + /** + * Gets the type information of this instance. + * + * @since 2.0 + * + * @return The type information of this instance + */ + virtual AnimationGroupType GetType(void) const = 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 is the default constructor for this class. + // + // @since 2.0 + // + AnimationGroup(void); + + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // Assigns the value of the specified instance to the current instance of %AnimationGroup. + // + // @since 2.0 + // + // @param[in] rhs An instance of %AnimationGroup + // + AnimationGroup& operator =(const AnimationGroup& rhs); + + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // This is the copy constructor for the %AnimationGroup class. + // + // @since 2.0 + // + // @param[in] animationGroup An instance of %AnimationGroup + // + AnimationGroup(const AnimationGroup& animationGroup); + + + friend class _AnimationGroupImpl; + + + // + // This variable is for internal use only. Using this variable can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // The variable for internal usage. + // + // @since 2.0 + // + class _AnimationGroupImpl* _pAnimationGroupImpl; +}; // AnimationGroup + + +}}} // Tizen::Ui::Animations + +#endif // _FUI_ANIM_ANIMATION_GROUP_H_ diff --git a/inc/FUiAnimAnimationTransaction.h b/inc/FUiAnimAnimationTransaction.h new file mode 100644 index 0000000..9b84fc6 --- /dev/null +++ b/inc/FUiAnimAnimationTransaction.h @@ -0,0 +1,528 @@ +// +// 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 FUiAnimAnimationTransaction.h + * @brief This is the header file for the %AnimationTransaction class. + * + * This header file contains the declarations of the %AnimationTransaction class. + */ + +#ifndef _FUI_ANIM_ANIMATION_TRANSACTION_H_ +#define _FUI_ANIM_ANIMATION_TRANSACTION_H_ + +#include +#include + +#include +#include +#include + + +namespace Tizen { namespace Ui { namespace Animations +{ + +class IVisualElementAnimationTimingFunction; +class IVisualElementAnimationValueInterpolator; + +/** + * @class AnimationTransaction + * @brief This class defines the transaction operations of the animation. + * + * @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. + * + * For more information on the class features, see Transactions. + * + */ +class _OSP_EXPORT_ AnimationTransaction +{ +public: + + /** + * Initializes a transaction set. @n + * 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 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + */ + static result Begin(void); + + + /** + * Initializes a transaction set. @n + * 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 + * + * @return An error code + * @param[out] transactionId The transaction ID @n + * Use this transaction ID for further operations related to this transaction. + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + */ + static result Begin(int& transactionId); + + + /** + * Commits a set of animation start commands that are added during the current transaction. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + */ + static result Commit(void); + + + /** + * Stops the transaction. @n + * All the nested transactions also will be stopped. + * + * @since 2.0 + * + * @return An error code + * @param[in] transactionId The transaction ID + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + */ + static result Stop(int transactionId); + + + /** + * Discards all inactive transactions. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_OPERATION An uncommitted transaction does not exist. + * @see Begin() + */ + static result Discard(void); + + + /** + * Gets the status of the specified transaction. + * + * @since 2.0 + * + * @return The state of the transaction + * @param[in] transactionId The transaction ID + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + static AnimationTransactionStatus GetStatus(int transactionId); + + + /** + * Sets a default event listener to listen to the events of transactions. @n + * The set listener can listen to the events on the specified event dispatcher's context when they are fired. + * + * @since 2.0 + * + * @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. + * - An application must deregister the registered listener if the listener object needs to be deleted. + * @see SetCurrentTransactionEventListener() + */ + static result SetTransactionEventListener(IAnimationTransactionEventListener* pListener); + + + /** + * Sets a listener instance to listen to the events of a current transaction. @n + * The set listener can listen to the events on the specified event dispatcher's context when they are fired. + * + * @since 2.0 + * + * @return An error code + * @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() + */ + static result SetCurrentTransactionEventListener(IAnimationTransactionEventListener* pListener); + + + /** + * Enables or disables the implicit animation on the current transaction. @n + * If enabled, implicit animations may be created whenever animatable properties of this instance change. + * + * @since 2.0 + * + * @return An error code + * @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. + * - 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); + + + /** + * Sets a default event listener to get the status of an animation. @n + * The IVisualElementAnimationStatusEventListener listener is called for status changes of animation. + * The added listener listens to events on the specified event dispatcher's context when they are fired. + * + * @since 2.0 + * + * @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 the IVisualElementAnimationStatusEventListener::OnVisualElementAnimationStarted() + * method and directly calls the IVisualElementAnimationStatusEventListener::OnVisualElementAnimationFinished() method. + */ + static result SetVisualElementAnimationStatusEventListener(IVisualElementAnimationStatusEventListener* pListener); + + + /** + * Sets the default timing function of an animation. + * + * @since 2.0 + * + * @return An error code + * @param[in] pTimingFunction The reference of interpolator 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. + */ + static result SetVisualElementAnimationTimingFunction(const IVisualElementAnimationTimingFunction* pTimingFunction); + + + /** + * Sets the default value interpolator of an animation. + * + * @since 2.0 + * + * @return An error code + * @param[in] pValueInterpolator The reference of InterpolatorFunction 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. + */ + static result SetVisualElementAnimationValueInterpolator(const IVisualElementAnimationValueInterpolator* pValueInterpolator); + + + /** + * Sets the default duration of an animation in the current transaction. + * + * @since 2.0 + * + * @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. + * @see GetVisualElementAnimationDuration() + */ + static result SetVisualElementAnimationDuration(long milliseconds); + + + /** + * Gets the default duration of an animation in milliseconds in the current transaction. + * + * @since 2.0 + * + * @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. + * - 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); + + + /** + * Sets the default offset value of an animation. @n + * Additionally, the %SetVisualElementAnimationOffset() method alters the start value and duration for which an animation is played. + * + * @since 2.0 + * + * @return An error code + * @param[in] milliseconds The offset value 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 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. + * - 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); + + + /** + * Gets the default offset value in milliseconds after an animation starts. + * + * @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. + * @exception E_INVALID_OPERATION An uncommitted transaction does not exist. + * @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); + + + /** + * Sets the default delay for an animation. @n + * The animation starts after the duration of delay has passed. + * + * @since 2.0 + * + * @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_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. + * - 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); + + + /** + * Gets the default delay value in milliseconds before an animation starts. + * + * @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. + * @exception E_INVALID_OPERATION An uncommitted transaction does not exist. + * @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); + + + /** + * Sets the default repeat count for an animation. @n + * Repeats an animation for the specified number of times. + * + * @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. + * @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. + * - 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); + + + /** + * Gets the default repeat count value of an animation. + * + * @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. + * @exception E_INVALID_OPERATION An uncommitted transaction does not exist. + * @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 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. + * @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. + * - 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 auto reverse is enabled. + * + * @since 2.0 + * + * @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. + * - 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); + + + /** + * Sets the default scale ratio of an animation. @n + * The %SetVisualElementAnimationScaleRatio() method multiplies the duration, offset and delay using the scale ratio. + * + * @since 2.0 + * + * @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. + * @see GetVisualElementAnimationScaleRatio() + */ + static result SetVisualElementAnimationScaleRatio(float scaleRatio); + + + /** + * Gets the default scale ratio value of an animation. + * + * @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. + * @exception E_INVALID_OPERATION An uncommitted transaction does not exist. + * @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); + + +private: + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // This is the default constructor for this class. + // + // @since 2.0 + // + AnimationTransaction(void); + + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // This is the destructor for this class. + // + // @since 2.0 + // + ~AnimationTransaction(void); + + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // This is the copy constructor for the %AnimationTransaction class. + // + // @since 2.0 + // @param[in] transaction An instance of %AnimationTransaction + // + AnimationTransaction(const AnimationTransaction& transaction); + + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // Assigns the value of the specified instance to the current instance of %AnimationTransaction. + // + // @since 2.0 + // + // @param[in] rhs An instance of %AnimationTransaction + // + AnimationTransaction& operator =(const AnimationTransaction& rhs); +}; // AnimationTransaction + + +}}} // Tizen::Ui::Animations + +#endif // _FUI_ANIM_ANIMATION_TRANSACTION_H_ diff --git a/inc/FUiAnimBezierTimingFunction.h b/inc/FUiAnimBezierTimingFunction.h new file mode 100644 index 0000000..dd5e931 --- /dev/null +++ b/inc/FUiAnimBezierTimingFunction.h @@ -0,0 +1,207 @@ +// +// 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 FUiAnimBezierTimingFunction.h + * @brief This is the header file for the %BezierTimingFunction class. + * + * This header file contains the declarations of the %BezierTimingFunction class. + */ + +#ifndef _FUI_ANIM_BEZIER_TIMING_FUNCTION_H_ +#define _FUI_ANIM_BEZIER_TIMING_FUNCTION_H_ + +#include + +namespace Tizen { namespace Ui { namespace Animations +{ + +/** + * @class BezierTimingFunction + * @brief This class stores the information of a bezier curve timing function. + * + * @since 2.0 + * + * @remarks This class needs 2 control points of cubic bezier curve. + * + * The %BezierTimingFunction class provides bezier curve timing function related information. + * + * For more information on the class features, see Timing Function. + * + */ +class _OSP_EXPORT_ BezierTimingFunction + : public Tizen::Base::Object + , public IVisualElementAnimationTimingFunction +{ +public: + + /** + * This is the constructor for this class. + * + * @since 2.0 + */ + BezierTimingFunction(void); + + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~BezierTimingFunction(void); + + + /** + * Calculates the progress(pace) of an animation regarding the time elapsed. + * + * @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. + * @param[in] timeProgress The time progress value @n + * This must be in the range @c 0.0 to @c 1.0. + */ + virtual float CalculateProgress(float timeProgress) const; + + + /** + * Sets the control points. + * + * @since 2.0 + * + * @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 + * This must be in the range @c 0.0 to @c 1.0. + * @param[in] timeProgress2 The time progress of control point 2 @n + * This must be in the range @c 0.0 to @c 1.0. + * @param[in] progress2 The progress of control point 2 @n + * This must be in the range @c 0.0 to @c 1.0. + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The value of the specified parameter is less than @c 0 or greater than @c 1. + * @see GetControlPoints() + */ + result SetControlPoints(float timeProgress1, float progress1, float timeProgress2, float progress2); + + + /** + * Gets the control points. + * + * @since 2.0 + * + * @return An error code + * @param[out] timeProgress1 The time progress of control point 1 @n + * The default value is @c 0.33f. + * @param[out] progress1 The progress of control point 1 @n + * The default value is @c 0.8f. + * @param[out] timeProgress2 The time progress of control point 2 @n + * The default value is @c 0.66f. + * @param[out] progress2 The progress of control point 2 @n + * The default value is @c 0.2f. + * @exception E_SUCCESS The method is successful. + * @see SetControlPoints() + */ + result GetControlPoints(float& timeProgress1, float& progress1, float& timeProgress2, float& progress2) const; + + +private: + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // This is the assignment operator for this class. + // + // @since 2.0 + // + BezierTimingFunction(const BezierTimingFunction& rhs); + + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // Assigns the value of the specified instance to the current instance of %BezierTimingFunction. + // + // @since 2.0 + // + BezierTimingFunction& operator =(const BezierTimingFunction& rhs); + + +private: + + /** + * The time progress of control point 1. + * + * @since 2.0 + */ + float __timeProgress1; + + + /** + * The progress of control point 1. + * + * @since 2.0 + */ + float __progress1; + + + /** + * The time progress of control point 2. + * + * @since 2.0 + */ + float __timeProgress2; + + + /** + * The progress of control point 2. + * + * @since 2.0 + */ + float __progress2; + + + /** + * The coefficient A for calculating bezier curve. + * + * @since 2.0 + */ + float __coefficientA; + + + /** + * The coefficient B for calculating bezier curve. + * + * @since 2.0 + */ + float __coefficientB; + + + /** + * The coefficient C for calculating bezier curve. + * + * @since 2.0 + */ + float __coefficientC; +}; // BezierTimingFunction + + +}}} // Tizen::Ui::Animations + +#endif //_FUI_ANIM_BEZIER_TIMING_FUNCTION_H_ diff --git a/inc/FUiAnimControlAnimator.h b/inc/FUiAnimControlAnimator.h new file mode 100644 index 0000000..3a62e87 --- /dev/null +++ b/inc/FUiAnimControlAnimator.h @@ -0,0 +1,527 @@ +// +// 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 FUiAnimControlAnimator.h + * @brief This is the header file for the %ControlAnimator class. + * + * This header file contains the declarations of the %ControlAnimator class. + */ + +#ifndef _FUI_ANIM_CONTROL_ANIMATOR_H_ +#define _FUI_ANIM_CONTROL_ANIMATOR_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Animations +{ + +/** + * @class ControlAnimator + * @brief This class defines the animation methods for %Tizen::Ui::Control. + * + * @since 2.0 + * + * @final This class is not intended for extension. + * + * @remarks This class does not support APIs for float type. + * + * The %ControlAnimator class is used to control the animations operated in Tizen::Ui::Controls. + * + * For more information on the class features, see Animating UI Controls. + * + */ +class _OSP_EXPORT_ ControlAnimator + : public Tizen::Base::Object +{ +public: + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~ControlAnimator(void); + + + /** + * Starts an animation explicitly. @n + * If multiple controls need to be animated simultaneously, the controls must be part of the AnimationTransaction class. @n + * The %StartUserAnimation() method must be called after AnimationTransaction::Begin() and before AnimationTransaction::Commit(). + * + * @since 2.0 + * + * @return An error code + * @param[in] animTarget The property to animate + * @param[in] animation An object of type AnimationBase + * @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. + * @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. @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); + + + /** + * Starts a group of animations explicitly. @n + * If multiple controls need to be animated simultaneously, the control must be part of the AnimationTransaction class. + * The %StartUserAnimation() method must be called after AnimationTransaction::Begin() and before AnimationTransaction::Commit(). + * + * @since 2.0 + * + * @return An error code + * @param[in] animGroup An animation group having a list of animations + * @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. + * @exception E_SYSTEM A system error has occurred. + * @remarks The animations are deleted at the end of the animation playback. @n + * RectangleAnimation is used to animate only one animation target at a time. + */ + result StartUserAnimation(const AnimationGroup& animGroup); + + + /** + * Stops all the animations that are currently playing and jumps to the final frame of the animation. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result StopAllAnimations(void); + + + /** + * Stops the animation with the specified trigger type. + * + * @since 2.0 + * + * @return An error code + * @param[in] animTrigger The animator trigger type + * @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 StopAnimation(ControlAnimatorTriggerType animTrigger); + + + /** + * Gets the status of an animation with respect to a control. + * + * @since 2.0 + * + * @return The animation state + */ + AnimatorStatus GetStatus(void) const; + + + /** + * Gets the status of an animation for the specified animation target type. + * + * @since 2.0 + * + * @return The state of an animation with type @c animTarget + * @param[in] animTarget The animation target type + */ + AnimatorStatus GetStatus(AnimationTargetType animTarget) const; + + + /** + * 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. + * + * @since 2.0 + * + * @return An error code + * @param[in] listener The listener to add + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_UNSUPPORTED_OPERATION The animation support is unavailable. + * @exception E_OBJ_ALREADY_EXIST The specified @c listener is already added. + * @exception E_SYSTEM A system error has occurred. + * @remarks For animations that are part of AnimationTransaction, the applications need to listen to IAnimationTransactionEventListener events. @n + * The IControlAnimatorEventListener events are not fired if the animation is part of a transaction. + */ + result AddControlAnimatorEventListener(IControlAnimatorEventListener& listener); + + + /** + * 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 + * + * @return An error code + * @param[in] listener The listener to remove + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_UNSUPPORTED_OPERATION The animation support is unavailable. + * @exception E_SYSTEM A system error has occurred. + */ + result RemoveControlAnimatorEventListener(IControlAnimatorEventListener& listener); + + + /** + * 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. + * + * @since 2.0 + * + * @return An error code + * @param[in] listener The listener to add + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_UNSUPPORTED_OPERATION The animation support is unavailable. + * @exception E_OBJ_ALREADY_EXIST The specified @c listener is already added. + * @exception E_SYSTEM A system error has occurred. + * @remarks For animations that are part of AnimationTransaction, the applications need to listen to the IAnimationTransactionEventListener events. @n + * The IControlAnimatorDetailedEventListener events are not fired if the animation is part of a transaction. + */ + result AddControlAnimatorDetailedEventListener(IControlAnimatorDetailedEventListener& listener); + + + /** + * Removes an IControlAnimatorDetailedEventListener instance from the current instance of the control. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @return An error code + * @param[in] listener The listener to remove + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_UNSUPPORTED_OPERATION The animation support is unavailable. + * @exception E_SYSTEM A system error has occurred. + */ + result RemoveControlAnimatorDetailedEventListener(IControlAnimatorDetailedEventListener& listener); + + + /** + * Sets an animation group for the specified trigger type. + * + * @since 2.0 + * + * @return An error code + * @param[in] animTrigger The animator trigger type to which the animation is applied + * @param[in] pAnimation An object of type AnimationBase @n + * If @c null is passed, the default animation values are used for animation with the specified trigger type. + * @exception E_SUCCESS The method is successful. + * @exception E_UNSUPPORTED_OPTION The specified option is not supported. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @exception E_SYSTEM A system error has occurred. + * @remarks @c ANIMATION_TRIGGER_USER is not supported. @n + * The @c holdEnd value and @c AutoReverse value are set to @c true and @c false respectively. @n + * An exception is returned if the animation group does not contain an animation with the target type that is being animated for the specified + * trigger type. The start value of an animation object of the associated target type for the specified trigger type is overwritten by the + * current property value of the Tizen::Ui::Control instance and the end value is overwritten by the value that is being set by the user. @n + * The associated target types for each trigger are as below: @n + * \verbatim + * Animation Trigger - Target Type + * ANIMATION_TRIGGER_POSITION_CHANGE - ANIMATION_TARGET_POSITION + * ANIMATION_TRIGGER_SIZE_CHANGE - ANIMATION_TARGET_SIZE + * ANIMATION_TRIGGER_SHOW_STATE_CHANGE - ANIMATION_TARGET_ALPHA + * \endverbatim + */ + result SetAnimation(ControlAnimatorTriggerType animTrigger, const AnimationGroup* pAnimation); + + + /** + * Gets a group of animations. + * + * @since 2.0 + * + * @return An animation group object at the specified animation trigger type, @n + * else @c null if the animation is empty or AnimationTriggerType is @c ANIMATION_TRIGGER_USER + * @param[in] animTrigger The animator trigger type to get an animation group object + */ + AnimationGroup* GetAnimationN(ControlAnimatorTriggerType animTrigger) const; + + + /** + * Sets the position of the control. @n + * An animation is played while changing the position of the control. + * + * @since 2.0 + * + * @return An error code + * @param[in] x The new X position of the object + * @param[in] y The new Y position of the object + * @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_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(). + * @see SetBounds() + * @see SetSize() + */ + result SetPosition(int x, int y); + + + /** + * Sets the position of the control. @n + * An animation is played while changing the position of the control. + * + * @since 2.0 + * + * @return An error code + * @param[in] Position The new position + * @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_UNSUPPORTED_OPERATION This operation is not supported. + * @exception E_SYSTEM A system error has occurred. + * @remarks The position of the object is relative to the top-left corner of its parent. @n + * Control::Invalidate() need not be called to display the control. @n + * The animation uses linear interpolator and is played for a default duration if the user does not overwrite the values using SetAnimation(). + * @see SetPosition() + * @see SetBounds() + * @see SetSize() + */ + result SetPosition(const Tizen::Graphics::Point& Position); + + + /** + * Sets the size of the control. @n + * An animation is played while changing the size of the control. @n + * The @c width and @c height parameters contain the width and height values of the object, respectively. + * + * @since 2.0 + * + * @return An error code + * @param[in] width The new width of the object + * @param[in] height The new height of the object + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. @n + * The value of @c width or @c height is @c 0 or a negative value. + * @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 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(). + * @see SetBounds() + * @see SetPosition() + */ + result SetSize(int width, int height); + + + /** + * Sets the size of the control. @n + * An animation is played while changing the size of the control. @n + * The @c width becomes @c size.width, and the @c height becomes @c size.height. + * + * @since 2.0 + * + * @return An error code + * @param[in] size The new width and height + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. @n + * The value @c size.width or @c size.height is @c 0 or a negative value. + * @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 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(). + * @see SetSize() + * @see SetBounds() + * @see SetPosition() + */ + result SetSize(const Tizen::Graphics::Dimension& size); + + + /** + * Sets the position and size of the control. @n + * An animation is played while changing the position and size of the control. @n + * The position is set to (x, y), and the @c width and @c height parameters contain the width and height values of the object, respectively. + * + * @since 2.0 + * + * @return An error code + * @param[in] x The new X position of the object + * @param[in] y The new Y position of the object + * @param[in] width The new width of the object + * @param[in] height The new height of the object + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. @n + * The value of @c width or @c height is @c 0 or a negative value. + * @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_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 + * 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(). + * @see SetPosition() + * @see SetSize() + */ + result SetBounds(int x, int y, int width, int height); + + + /** + * Sets the position and size of the control. @n + * An animation is played while changing the position and size of the control. + * + * @since 2.0 + * + * @return An error code + * @param[in] rect The new bounds of the object + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. @n + * The value of @c rect.width or @c rect.height is @c 0 or a negative value. + * @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_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(). + * @see SetBounds() + * @see SetPosition() + * @see SetSize() + */ + result SetBounds(const Tizen::Graphics::Rectangle& rect); + + + /** + * Sets the show state of the control with animation. + * + * @since 2.0 + * + * @return An error code + * @param[in] show The show state of the object + * @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_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(). + */ + result SetShowState(bool show); + + + /** + * Checks whether animation is supported for the control with the specified target type. + * + * @since 2.0 + * + * @return @c true if animation is supported, @n + * else @c false + * @param[in] animTarget The animation target + */ + bool IsAnimationSupported(AnimationTargetType animTarget) const; + +protected: + + friend class _ControlAnimatorImpl; + + + // + // This variable is for internal use only. Using this variable can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // The variable for internal usage. + // + // @since 2.0 + // + class _ControlAnimatorImpl* _pControlAnimatorImpl; + + +private: + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // This is the constructor for this class. + // + // @since 2.0 + // + ControlAnimator(void); + + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // Initializes this class. + // + // @since 2.0 + // @return An error code + // @param[in] source An instance of control class + // @exception E_SUCCESS The method is successful. + // @exception E_SYSTEM A system error has occurred. + // + result Construct(const Tizen::Ui::Control& source); + + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // This is the copy constructor for this class. + // + // @since 2.0 + // + ControlAnimator(const ControlAnimator& animator); + + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // Assigns the value of the specified instance to the current instance of %ControlAnimator. + + // + // @since 2.0 + // + ControlAnimator& operator =(const ControlAnimator& rhs); + + + friend class Tizen::Ui::_ControlImpl; + friend class FrameAnimator; +}; // ControlAnimator + + +}}} // Tizen::Ui::Animations + +#endif //_FUI_ANIM_CONTROL_ANIMATOR_H_ diff --git a/inc/FUiAnimDimensionAnimation.h b/inc/FUiAnimDimensionAnimation.h new file mode 100644 index 0000000..19aaf0a --- /dev/null +++ b/inc/FUiAnimDimensionAnimation.h @@ -0,0 +1,370 @@ +// +// 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 FUiAnimDimensionAnimation.h + * @brief This is the header file for the %DimensionAnimation class. + * + * This header file contains the declarations of the %DimensionAnimation class. + */ + +#ifndef _FUI_ANIM_DIMENSION_ANIMATION_H_ +#define _FUI_ANIM_DIMENSION_ANIMATION_H_ + +#include +#include + +#include + +namespace Tizen { namespace Ui { namespace Animations +{ + +/** + * @class DimensionAnimation + * @brief This class animates the %Tizen::Graphics::Dimension object. + * + * @since 2.0 + * + * @final This class is not intended for extension. + * + * The %DimensionAnimation class animates an object from a Tizen::Graphics::Dimension value to another %Tizen::Graphics::Dimension value + * based on the specified interpolator type. + * + * For more information on the class features, see Animating UI Controls. + */ +class _OSP_EXPORT_ DimensionAnimation + : public AnimationBase +{ +public: + /** + * Initializes this instance of %DimensionAnimation with the specified parameters. + * + * @since 2.0 + * + * @param[in] startValue The start value for the dimension animation + * @param[in] endValue The end value for the dimension animation + * @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 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); + + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~DimensionAnimation(void); + + /** + * This is the copy constructor for the %DimensionAnimation class. + * + * @since 2.0 + * + * @param[in] dimensionAnimation 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. + */ + DimensionAnimation(const DimensionAnimation& dimensionAnimation); + + + /** + * Assigns the value of the specified instance to the current instance of %DimensionAnimation. + * + * @since 2.0 + * + * @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. + */ + DimensionAnimation& operator =(const DimensionAnimation& rhs); + + + /** + * Checks whether the specified instance and current instance of %DimensionAnimation have equal animation values. + * + * @since 2.0 + * + * @return @c true if the animation of the two instances of %DimensionAnimation are equal, @n + * else @c false + * @param[in] rhs An instance of %DimensionAnimation + */ + bool operator ==(const DimensionAnimation& rhs) const; + + + /** + * Checks whether the specified instance and current instance of %DimensionAnimation have different animation values. + * + * @since 2.0 + * + * @return @c true if the values of the animations of the two instances of %DimensionAnimation are not equal, @n + * else @c false + * @param[in] rhs An instance of %DimensionAnimation + */ + bool operator !=(const DimensionAnimation& rhs) const; + + + /** + * Checks whether the value of the current instance of %DimensionAnimation equals the value of the specified instance. + * + * @since 2.0 + * + * @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. + */ + virtual bool Equals(const Tizen::Base::Object& obj) const; + + + /** + * Gets the hash value of the current instance. + * + * @since 2.0 + * + * @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; + + + /** + * Sets the anchor points for the animation. + * + * @since 2.0 + * + * @return An error code + * @param[in] anchorX The X value of the anchor at which the control's animation is performed + * @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 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. + * If the anchor point value is (1.0, 1.0), the object is scaled and the bottom-right corner of the object remains fixed. + */ + result SetAnchor(float anchorX, float anchorY); + + + /** + * Gets the anchor point associated with the animation. @n + * The default anchor point is (0.0, 0.0). + * + * @since 2.0 + * + * @param[out] anchorX The X value of the anchor at which the control's animation is performed + * @param[out] anchorY The Y value of the anchor at which the control's animation is performed + */ + void GetAnchor(float& anchorX, float& anchorY) const; + + + /** + * Gets the animated value for the current time. + * + * @since 2.0 + * + * @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 current time passed as the input parameter + * @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. + * + */ + result GetAnimatedValue(long currentTime, Tizen::Graphics::Dimension& animatedValue) const; + + + /** + * Adds a keyframe to the animation. + * + * @since 2.0 + * + * @return An error code + * @param[in] time The time stamp + * @param[in] value The value at the specified @c time + * @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 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 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. + */ + result AddKeyFrame(long time, const Tizen::Graphics::Dimension& value); + + + /** + * Gets the keyframe at a particular index in this animation. + * + * @since 2.0 + * + * @return An error code + * @param[in] index The index value in the keyframe list that 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 @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). + */ + result GetKeyFrameAt(int index, long& time, Tizen::Graphics::Dimension& value) const; + + + /** + * Removes the passed keyframe object from the keyframe list. + * + * @since 2.0 + * + * @return An error code + * @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. + * @exception E_SYSTEM A system error has occurred. + */ + result RemoveKeyFrame(long time); + + + /** + * Removes the keyframe present at the specified @c index from the keyframe list. + * + * @since 2.0 + * + * @return An error code + * @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. + * @exception E_SYSTEM A system error has occurred. + */ + result RemoveKeyFrameAt(int index); + + + /** + * Removes all the keyframes from the animation. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result RemoveAllKeyFrames(void); + + + /** + * Sets the start value of the animation. + * + * @since 2.0 + * + * @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 specified input parameter is invalid. + * @exception E_SYSTEM A system error has occurred. + */ + result SetStartValue(const Tizen::Graphics::Dimension& startValue); + + + /** + * Sets the end value of the animation. + * + * @since 2.0 + * + * @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 specified input parameter is invalid. + * @exception E_SYSTEM A system error has occurred. + */ + result SetEndValue(const Tizen::Graphics::Dimension& endValue); + + + /** + * Gets the start value of the animation. + * + * @since 2.0 + * + * @return The start value + */ + Tizen::Graphics::Dimension GetStartValue(void) const; + + + /** + * Gets the end value of the animation. + * + * @since 2.0 + * + * @return The end value + */ + Tizen::Graphics::Dimension GetEndValue(void) const; + + + /** + * Gets the animation type information of this instance. + * + * @since 2.0 + * + * @return The animation type information of this instance + */ + virtual AnimationType GetType(void) const; + + +protected: + friend class _DimensionAnimationImpl; + + + // + // This variable is for internal use only. Using this variable can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // The variable for internal usage. + // + // @since 2.0 + // + class _DimensionAnimationImpl* _pDimensionAnimationImpl; + + +private: + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // This is the default constructor for this class. + // + // @since 2.0 + // + DimensionAnimation(void); +}; // DimensionAnimation + + +}}} // Tizen::Ui::Animations + +#endif // _FUI_ANIM_DIMENSION_ANIMATION_H_ diff --git a/inc/FUiAnimDiscreteTimingFunction.h b/inc/FUiAnimDiscreteTimingFunction.h new file mode 100644 index 0000000..178fbf9 --- /dev/null +++ b/inc/FUiAnimDiscreteTimingFunction.h @@ -0,0 +1,142 @@ +// +// 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 FUiAnimDiscreteTimingFunction.h + * @brief This is the header file for the %DiscreteTimingFunction class. + * + * This header file contains the declarations of the %DiscreteTimingFunction class. + */ + +#ifndef _FUI_ANIM_DISCRETE_TIMING_FUNCTION_H_ +#define _FUI_ANIM_DISCRETE_TIMING_FUNCTION_H_ + +#include + +namespace Tizen { namespace Ui { namespace Animations +{ + +/** + * @class DiscreteTimingFunction + * @brief This class stores the information of a discrete timing function. + * + * @since 2.0 + * + * The %DiscreteTimingFunction class provides discrete timing function related information. + * + * For more information on the class features, see Timing Function. + * + */ +class _OSP_EXPORT_ DiscreteTimingFunction + : public Tizen::Base::Object + , public IVisualElementAnimationTimingFunction +{ +public: + + /** + * This is the constructor for this class. + * + * @since 2.0 + */ + DiscreteTimingFunction(void); + + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~DiscreteTimingFunction(void); + + + /** + * Calculates the progress(pace) of an animation regarding the time elapsed. + * + * @since 2.0 + * + * @return The progress(pace) value calculated with trigger time progress 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. + */ + virtual float CalculateProgress(float timeProgress) const; + + + /** + * Sets the time progress value of trigger point. + * + * @since 2.0 + * + * @return An error code + * @param[in] timeProgress The time progress value of trigger point @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_INVALID_ARG The value of the specified parameter is less than @c 0 or greater than @c 1. + * @see GetTriggerTimeProgress() + */ + result SetTriggerTimeProgress(float timeProgress); + + + /** + * Gets the time progress value of trigger point. + * + * @since 2.0 + * + * @return The time progress value of trigger point + * @see SetTriggerTimeProgress() + */ + float GetTriggerTimeProgress(void) const; + + +private: + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // This is the assignment operator for this class. + // + // @since 2.0 + // + DiscreteTimingFunction(const DiscreteTimingFunction& rhs); + + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // Assigns the value of the specified instance to the current instance of %DiscreteTimingFunction. + // + // @since 2.0 + // + DiscreteTimingFunction& operator =(const DiscreteTimingFunction& rhs); + + +private: + + /** + * The time progress value of trigger point. + * + * @since 2.0 + */ + float __triggerTimeProgress; +}; // DiscreteTimingFunction + + +}}} // Tizen::Ui::Animations + +#endif //_FUI_ANIM_DISCRETE_TIMING_FUNCTION_H_ diff --git a/inc/FUiAnimDisplayContext.h b/inc/FUiAnimDisplayContext.h new file mode 100644 index 0000000..ee3d173 --- /dev/null +++ b/inc/FUiAnimDisplayContext.h @@ -0,0 +1,141 @@ +// +// 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 FUiAnimDisplayContext.h + * @brief This is the header file for the %DisplayContext class. + * + * This header file contains the declarations of the %DisplayContext class. + */ + +#ifndef _FUI_ANIM_DISPLAY_CONTEXT_H_ +#define _FUI_ANIM_DISPLAY_CONTEXT_H_ + +#include + +namespace Tizen { namespace Ui { namespace Animations +{ +class _DisplayContextImpl; + +/** + * @class DisplayContext + * @brief This class represents the display resources for the displayable objects. + * + * @since 2.0 + * + * The %DisplayContext class represents the display context of the window. + * The display context is a set of display resources that includes VisualElements, VisualElementSurfaces, and frame buffer, + * and it is managed by Tizen::Ui::Window. + */ +class _OSP_EXPORT_ DisplayContext + : public Tizen::Base::Object +{ +protected: + /** + * This default constructor is intentionally declared as private to prohibit creation of an instance by a user. + * + * @since 2.0 + * + * @remarks The %DisplayContext instance cannot be created, + * it is offered by the Tizen::Ui::Window::GetDisplayContext() method. + * @see Window::GetDisplayContext() + */ + DisplayContext(void); + + + /** + * This destructor is intentionally declared as private to implement the Singleton semantic. + * + * @since 2.0 + * + * @remarks The display context is released when the Tizen::Ui::Window instance is destroyed. + * + */ + virtual ~DisplayContext(void); + + +private: + + /** + * The implementation of this copy constructor is intentionally blank to prohibit copying of objects. + * + * @since 2.0 + */ + DisplayContext(const DisplayContext& rhs); + + + /** + * The implementation of this assignment constructor is intentionally blank to prohibit assignment of objects. + * + * @since 2.0 + */ + DisplayContext& operator =(const DisplayContext& rhs); + + +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 DisplayContext_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 DisplayContext_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 DisplayContext_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 DisplayContext_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 DisplayContext_Reserved5(void) {} + +protected: + friend class _DisplayContextImpl; + _DisplayContextImpl* _pDisplayContextImpl; +}; // class DisplayContext + +}}} //namespace Tizen { namespace Ui { namespace Animations + +#endif //_FUI_ANIM_DISPLAY_CONTEXT_H_ diff --git a/inc/FUiAnimEaseElasticInTimingFunction.h b/inc/FUiAnimEaseElasticInTimingFunction.h new file mode 100644 index 0000000..412424c --- /dev/null +++ b/inc/FUiAnimEaseElasticInTimingFunction.h @@ -0,0 +1,142 @@ +// +// 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 FUiAnimEaseElasticInTimingFunction.h + * @brief This is the header file for the %EaseElasticInTimingFunction class. + * + * This header file contains the declarations of the %EaseElasticInTimingFunction class. + */ + +#ifndef _FUI_ANIM_EASE_ELASTIC_IN_TIMING_FUNCTION_H_ +#define _FUI_ANIM_EASE_ELASTIC_IN_TIMING_FUNCTION_H_ + +#include + +namespace Tizen { namespace Ui { namespace Animations +{ + +/** + * @class EaseElasticInTimingFunction + * @brief This class stores the information of an ease-elastic-in timing function. + * + * @since 2.0 + * + * The %EaseElasticInTimingFunction class provides ease-elastic-in timing function related information. + * + * For more information on the class features, see Timing Function. + * + */ +class _OSP_EXPORT_ EaseElasticInTimingFunction + : public Tizen::Base::Object + , public IVisualElementAnimationTimingFunction +{ +public: + + /** + * This is the constructor for this class. + * + * @since 2.0 + */ + EaseElasticInTimingFunction(void); + + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~EaseElasticInTimingFunction(void); + + + /** + * Calculates the progress(pace) of an animation regarding the time elapsed. + * + * @since 2.0 + * + * @return The progress(pace) value calculated by ease-elastic-in equation with period @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. + */ + virtual float CalculateProgress(float timeProgress) const; + + + /** + * Sets the period value as period of sine curve. + * + * @since 2.0 + * + * @return An error code + * @param[in] period The period 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. + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The value of the specified parameter is @c 0.0 or negative. + * @see GetPeriod() + */ + result SetPeriod(float period); + + + /** + * Gets the period value. + * + * @since 2.0 + * + * @return The period value + * @see SetPeriod() + */ + float GetPeriod(void) const; + + +private: + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // This is the assignment operator for this class. + // + // @since 2.0 + // + EaseElasticInTimingFunction(const EaseElasticInTimingFunction& rhs); + + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // This is the copy constructor for the EaseElasticInTimingFunction class. + // + // @since 2.0 + // + EaseElasticInTimingFunction& operator= (const EaseElasticInTimingFunction& rhs); + + +private: + + /** + * The period value. + * + * @since 2.0 + */ + float __period; +}; // EaseElasticInTimingFunction + + +}}} // Tizen::Ui::Animations + +#endif //_FUI_ANIM_EASE_ELASTIC_IN_TIMING_FUNCTION_H_ diff --git a/inc/FUiAnimEaseElasticOutTimingFunction.h b/inc/FUiAnimEaseElasticOutTimingFunction.h new file mode 100644 index 0000000..d4f0c4a --- /dev/null +++ b/inc/FUiAnimEaseElasticOutTimingFunction.h @@ -0,0 +1,142 @@ +// +// 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 FUiAnimEaseElasticOutTimingFunction.h + * @brief This is the header file for the %EaseElasticOutTimingFunction class. + * + * This header file contains the declarations of the %EaseElasticOutTimingFunction class. + */ + +#ifndef _FUI_ANIM_EASE_ELASTIC_OUT_TIMING_FUNCTION_H_ +#define _FUI_ANIM_EASE_ELASTIC_OUT_TIMING_FUNCTION_H_ + +#include + +namespace Tizen { namespace Ui { namespace Animations +{ + +/** + * @class EaseElasticOutTimingFunction + * @brief This class stores the information of an ease-elastic-out timing function. + * + * @since 2.0 + * + * The %EaseElasticOutTimingFunction class provides ease-elastic-out timing function related information. + * + * For more information on the class features, see Timing Function. + * + */ +class _OSP_EXPORT_ EaseElasticOutTimingFunction + : public Tizen::Base::Object + , public IVisualElementAnimationTimingFunction +{ +public: + + /** + * This is the constructor for this class. + * + * @since 2.0 + */ + EaseElasticOutTimingFunction(void); + + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~EaseElasticOutTimingFunction(void); + + + /** + * Calculates the progress(pace) of an animation regarding the time elapsed. + * + * @since 2.0 + * + * @return The progress(pace) value calculated by ease-elastic-out equation with period @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. + */ + virtual float CalculateProgress(float timeProgress) const; + + + /** + * Sets the period value as period of sine curve. + * + * @since 2.0 + * + * @return An error code + * @param[in] period The period 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. + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The value of the specified parameter is @c 0.0 or negative. + * @see GetPeriod() + */ + result SetPeriod(float period); + + + /** + * Gets the period value. + * + * @since 2.0 + * + * @return The period value + * @see SetPeriod() + */ + float GetPeriod(void) const; + + +private: + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // This is the assignment operator for this class. + // + // @since 2.0 + // + EaseElasticOutTimingFunction(const EaseElasticOutTimingFunction& rhs); + + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // This is the copy constructor for the %EaseElasticOutTimingFunction class. + // + // @since 2.0 + // + EaseElasticOutTimingFunction& operator= (const EaseElasticOutTimingFunction& rhs); + + +private: + + /** + * The period value + * + * @since 2.0 + */ + float __period; +}; // EaseElasticOutTimingFunction + + +}}} // Tizen::Ui::Animations + +#endif //_FUI_ANIM_EASE_ELASTIC_OUT_TIMING_FUNCTION_H_ diff --git a/inc/FUiAnimEaseInOutTimingFunction.h b/inc/FUiAnimEaseInOutTimingFunction.h new file mode 100644 index 0000000..08215f8 --- /dev/null +++ b/inc/FUiAnimEaseInOutTimingFunction.h @@ -0,0 +1,106 @@ +// +// 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 FUiAnimEaseInOutTimingFunction.h + * @brief This is the header file for the %EaseInOutTimingFunction class. + * + * This header file contains the declarations of the %EaseInOutTimingFunction class. + */ + +#ifndef _FUI_ANIM_EASE_IN_OUT_TIMING_FUNCTION_H_ +#define _FUI_ANIM_EASE_IN_OUT_TIMING_FUNCTION_H_ + +#include + +namespace Tizen { namespace Ui { namespace Animations +{ + +/** + * @class EaseInOutTimingFunction + * @brief This class stores the information of an ease-inout timing function. + * + * @since 2.0 + * + * The %EaseInOutTimingFunction class provides ease-inout timing function related information. + * + * For more information on the class features, see Timing Function. + * + */ +class _OSP_EXPORT_ EaseInOutTimingFunction + : public Tizen::Base::Object + , public IVisualElementAnimationTimingFunction +{ +public: + + /** + * This is the constructor for this class. + * + * @since 2.0 + */ + EaseInOutTimingFunction(void); + + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~EaseInOutTimingFunction(void); + + + /** + * Calculates the progress(pace) of an animation regarding the time elapsed. + * + * @since 2.0 + * + * @return The progress(pace) value calculated by ease-inout equation @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. + */ + virtual float CalculateProgress(float timeProgress) const; + + +private: + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // This is the assignment operator for this class. + // + // @since 2.0 + // + EaseInOutTimingFunction(const EaseInOutTimingFunction& rhs); + + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // Assigns the value of the specified instance to the current instance of %EaseInOutTimingFunction. + // + // @since 2.0 + // + EaseInOutTimingFunction& operator =(const EaseInOutTimingFunction& rhs); +}; // EaseInOutTimingFunction + + +}}} // Tizen::Ui::Animations + +#endif //_FUI_ANIM_EASE_IN_OUT_TIMING_FUNCTION_H_ diff --git a/inc/FUiAnimEaseInTimingFunction.h b/inc/FUiAnimEaseInTimingFunction.h new file mode 100644 index 0000000..93a80e2 --- /dev/null +++ b/inc/FUiAnimEaseInTimingFunction.h @@ -0,0 +1,104 @@ +// +// 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 FUiAnimEaseInTimingFunction.h + * @brief This is the header file for the %EaseInTimingFunction class. + * + * This header file contains the declarations of the %EaseInTimingFunction class. + */ + +#ifndef _FUI_ANIM_EASE_IN_TIMING_FUNCTION_H_ +#define _FUI_ANIM_EASE_IN_TIMING_FUNCTION_H_ + +#include + +namespace Tizen { namespace Ui { namespace Animations +{ + + +/** + * @class EaseInTimingFunction + * @brief This class stores the information of an ease-in timing function. + * + * @since 2.0 + * + * The %EaseInTimingFunction class provides ease-in timing function related information. + */ +class _OSP_EXPORT_ EaseInTimingFunction + : public Tizen::Base::Object + , public IVisualElementAnimationTimingFunction +{ +public: + + /** + * This is the constructor for this class. + * + * @since 2.0 + */ + EaseInTimingFunction(void); + + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~EaseInTimingFunction(void); + + + /** + * Calculates the progress(pace) of an animation regarding the time elapsed. + * + * @since 2.0 + * + * @return The progress(pace) value calculated by ease-in equation @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. + */ + virtual float CalculateProgress(float timeProgress) const; + + +private: + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // This is the assignment operator for this class. + // + // @since 2.0 + // + EaseInTimingFunction(const EaseInTimingFunction& rhs); + + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // Assigns the value of the specified instance to the current instance of %EaseInTimingFunction. + // + // @since 2.0 + // + EaseInTimingFunction& operator =(const EaseInTimingFunction& rhs); +}; // EaseInTimingFunction + + +}}} // Tizen::Ui::Animations + +#endif //_FUI_ANIM_EASE_IN_TIMING_FUNCTION_H_ diff --git a/inc/FUiAnimEaseOutInTimingFunction.h b/inc/FUiAnimEaseOutInTimingFunction.h new file mode 100644 index 0000000..00f8247 --- /dev/null +++ b/inc/FUiAnimEaseOutInTimingFunction.h @@ -0,0 +1,107 @@ +// +// 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 FUiAnimEaseOutInTimingFunction.h + * @brief This is the header file for the %EaseOutInTimingFunction class. + * + * This header file contains the declarations of the %EaseOutInTimingFunction class. + */ + +#ifndef _FUI_ANIM_EASE_OUT_IN_TIMING_FUNCTION_H_ +#define _FUI_ANIM_EASE_OUT_IN_TIMING_FUNCTION_H_ + +#include + +namespace Tizen { namespace Ui { namespace Animations +{ + + +/** + * @class EaseOutInTimingFunction + * @brief This class stores the information of an ease-outin timing function. + * + * @since 2.0 + * + * The %EaseOutInTimingFunction class provides ease-outin timing function related information. + * + * For more information on the class features, see Timing Function. + * + */ +class _OSP_EXPORT_ EaseOutInTimingFunction + : public Tizen::Base::Object + , public IVisualElementAnimationTimingFunction +{ +public: + + /** + * This is the constructor for this class. + * + * @since 2.0 + */ + EaseOutInTimingFunction(void); + + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~EaseOutInTimingFunction(void); + + + /** + * Calculates the progress(pace) of an animation regarding the time elapsed. + * + * @since 2.0 + * + * @return The progress(pace) value calculated by ease-outin equation @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. + */ + virtual float CalculateProgress(float timeProgress) const; + + +private: + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // This is the assignment operator for this class. + // + // @since 2.0 + // + EaseOutInTimingFunction(const EaseOutInTimingFunction& rhs); + + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // Assigns the value of the specified instance to the current instance of %EaseOutInTimingFunction. + // + // @since 2.0 + // + EaseOutInTimingFunction& operator =(const EaseOutInTimingFunction& rhs); +}; // EaseOutInTimingFunction + + +}}} // Tizen::Ui::Animations + +#endif //_FUI_ANIM_EASE_OUT_IN_TIMING_FUNCTION_H_ diff --git a/inc/FUiAnimEaseOutTimingFunction.h b/inc/FUiAnimEaseOutTimingFunction.h new file mode 100644 index 0000000..1b7910f --- /dev/null +++ b/inc/FUiAnimEaseOutTimingFunction.h @@ -0,0 +1,104 @@ +// +// 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 FUiAnimEaseOutTimingFunction.h + * @brief This is the header file for the %EaseOutTimingFunction class. + * + * This header file contains the declarations of the %EaseOutTimingFunction class. + */ + +#ifndef _FUI_ANIM_EASE_OUT_TIMING_FUNCTION_H_ +#define _FUI_ANIM_EASE_OUT_TIMING_FUNCTION_H_ + +#include + +namespace Tizen { namespace Ui { namespace Animations +{ + + +/** + * @class EaseOutTimingFunction + * @brief This class stores the information of an ease-out timing function. + * + * @since 2.0 + * + * The %EaseOutTimingFunction class provides ease-out timing function related information. + */ +class _OSP_EXPORT_ EaseOutTimingFunction + : public Tizen::Base::Object + , public IVisualElementAnimationTimingFunction +{ +public: + + /** + * This is the constructor for this class. + * + * @since 2.0 + */ + EaseOutTimingFunction(void); + + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~EaseOutTimingFunction(void); + + + /** + * Calculates the progress(pace) of an animation regarding the time elapsed. + * + * @since 2.0 + * + * @return The progress(pace) value calculated by ease-out equation @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. + */ + virtual float CalculateProgress(float timeProgress) const; + + +private: + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // This is the assignment operator for this class. + // + // @since 2.0 + // + EaseOutTimingFunction(const EaseOutTimingFunction& rhs); + + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // Assigns the value of the specified instance to the current instance of %EaseOutTimingFunction. + // + // @since 2.0 + // + EaseOutTimingFunction& operator =(const EaseOutTimingFunction& rhs); +}; // EaseOutTimingFunction + + +}}} // Tizen::Ui::Animations + +#endif //_FUI_ANIM_EASE_OUT_TIMING_FUNCTION_H_ diff --git a/inc/FUiAnimExpInTimingFunction.h b/inc/FUiAnimExpInTimingFunction.h new file mode 100644 index 0000000..5339a9f --- /dev/null +++ b/inc/FUiAnimExpInTimingFunction.h @@ -0,0 +1,150 @@ +// +// 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 FUiAnimExpInTimingFunction.h + * @brief This is the header file for the %ExpInTimingFunction class. + * + * This header file contains the declarations of the %ExpInTimingFunction class. + */ + +#ifndef _FUI_ANIM_EXP_IN_TIMING_FUNCTION_H_ +#define _FUI_ANIM_EXP_IN_TIMING_FUNCTION_H_ + +#include + +namespace Tizen { namespace Ui { namespace Animations +{ + + +/** + * @class ExpInTimingFunction + * @brief This class stores the information of an exp-in timing function. + * + * @since 2.0 + * + * The %ExpInTimingFunction class provides exp-in timing function related information. + * + * For more information on the class features, see Timing Function. + * + */ +class _OSP_EXPORT_ ExpInTimingFunction + : public Tizen::Base::Object + , public IVisualElementAnimationTimingFunction +{ +public: + + /** + * This is the constructor for this class. + * + * @since 2.0 + */ + ExpInTimingFunction(void); + + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~ExpInTimingFunction(void); + + + /** + * Calculates the progress(pace) of an animation regarding the time elapsed. + * + * @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. + * @param[in] timeProgress The time progress value @n + * This must be in the range @c 0.0 to @c 1.0. + */ + virtual float CalculateProgress(float timeProgress) const; + + + /** + * Sets the scale value. + * + * @since 2.0 + * + * @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. + * @see GetScaleValue() + */ + result SetScaleValue(float scale); + + + /** + * Gets the scale value. + * + * @since 2.0 + * + * @return The scale value + * @see SetScaleValue() + */ + float GetScaleValue(void) const; + + +private: + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // This is the assignment operator for this class. + // + // @since 2.0 + // + ExpInTimingFunction(const ExpInTimingFunction& rhs); + + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // Assigns the value of the specified instance to the current instance of %ExpInTimingFunction. + // + // @since 2.0 + // + ExpInTimingFunction& operator =(const ExpInTimingFunction& rhs); + + +private: + + /** + * The scale value. + * + * @since 2.0 + */ + float __scale; + + + /** + * The divisor for exponential timing function. + * + * @since 2.0 + */ + float __divisor; +}; // ExpInTimingFunction + + +}}} // Tizen::Ui::Animations + +#endif //_FUI_ANIM_EXP_IN_TIMING_FUNCTION_H_ diff --git a/inc/FUiAnimExpOutTimingFunction.h b/inc/FUiAnimExpOutTimingFunction.h new file mode 100644 index 0000000..a6caa15 --- /dev/null +++ b/inc/FUiAnimExpOutTimingFunction.h @@ -0,0 +1,148 @@ +// +// 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 FUiAnimExpOutTimingFunction.h + * @brief This is the header file for the %ExpOutTimingFunction class. + * + * This header file contains the declarations of the %ExpOutTimingFunction class. + */ + +#ifndef _FUI_ANIM_EXP_OUT_TIMING_FUNCTION_H_ +#define _FUI_ANIM_EXP_OUT_TIMING_FUNCTION_H_ + +#include + +namespace Tizen { namespace Ui { namespace Animations +{ + + +/** + * @class ExpOutTimingFunction + * @brief This class stores the information of an exp-out timing function. + * + * @since 2.0 + * + * The %ExpOutTimingFunction class provides exp-out timing function related information. + * + * For more information on the class features, see Timing Function. + * + */ +class _OSP_EXPORT_ ExpOutTimingFunction + : public Tizen::Base::Object + , public IVisualElementAnimationTimingFunction +{ +public: + + /** + * This is the constructor for this class. + * + * @since 2.0 + */ + ExpOutTimingFunction(void); + + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~ExpOutTimingFunction(void); + + + /** + * Calculates the progress(pace) of an animation regarding the time elapsed. + * + * @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. + * @param[in] timeProgress The time progress value @n + * This must be in the range @c 0.0 to @c 1.0. + */ + virtual float CalculateProgress(float timeProgress) const; + + + /** + * Sets the scale value. + * + * @since 2.0 + * + * @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. + * @see GetScaleValue() + */ + result SetScaleValue(float scale); + + + /** + * Gets the scale value. + * + * @since 2.0 + * + * @return The scale value + * @see SetScaleValue() + */ + float GetScaleValue(void) const; + +private: + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // This is the assignment operator for this class. + // + // @since 2.0 + // + ExpOutTimingFunction(const ExpOutTimingFunction& rhs); + + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // Assigns the value of the specified instance to the current instance of %ExpOutTimingFunction. + // + // @since 2.0 + // + ExpOutTimingFunction& operator =(const ExpOutTimingFunction& rhs); + + +private: + + /** + * The scale value. + * + * @since 2.0 + */ + float __scale; + + /** + * The divisor for exponential timing function. + * + * @since 2.0 + */ + float __divisor; +}; // ExpOutTimingFunction + + +}}} // Tizen::Ui::Animations + +#endif //_FUI_ANIM_EXP_OUT_TIMING_FUNCTION_H_ diff --git a/inc/FUiAnimFloatAnimation.h b/inc/FUiAnimFloatAnimation.h new file mode 100644 index 0000000..5d6bc48 --- /dev/null +++ b/inc/FUiAnimFloatAnimation.h @@ -0,0 +1,336 @@ +// +// 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 FUiAnimFloatAnimation.h + * @brief This is the header file for the %FloatAnimation class. + * + * This header file contains the declaration of the %FloatAnimation class. + */ + +#ifndef _FUI_ANIM_FLOAT_ANIMATION_H_ +#define _FUI_ANIM_FLOAT_ANIMATION_H_ + +#include +#include + +namespace Tizen { namespace Ui { namespace Animations +{ + +/** + * @class FloatAnimation + * @brief This class animates an object from a float value to another float value. + * + * @since 2.0 + * + * @final This class is not intended for extension. + * + * The %FloatAnimation class animates an object from a float value to another float value based on the specified interpolator type. + * + * For more information on the class features, see Animating UI Controls. + * + */ +class _OSP_EXPORT_ FloatAnimation + : public AnimationBase +{ +public: + /** + * Initializes this instance of %FloatAnimation with the specified parameters. + * + * @since 2.0 + * + * @param[in] startValue The start value for float animation + * @param[in] endValue The end value for float animation + * @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 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); + + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~FloatAnimation(void); + + + /** + * Assigns the value of the specified instance to the current instance of %FloatAnimation. + * + * @since 2.0 + * + * @param[in] floatAnimation 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. + */ + FloatAnimation(const FloatAnimation& floatAnimation); + + + /** + * Assigns the value of the specified instance to the current instance of %FloatAnimation. + * + * @since 2.0 + * + * @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. + */ + FloatAnimation& operator =(const FloatAnimation& rhs); + + + /** + * Checks whether the specified instance and current instance of %FloatAnimation have equal animation values. + * + * @since 2.0 + * + * @return @c true if the animation of the two instances of %FloatAnimation are equal, @n + * else @c false + * @param[in] rhs An instance of %FloatAnimation + */ + bool operator ==(const FloatAnimation& rhs) const; + + + /** + * Checks whether the specified instance and current instance of %FloatAnimation have different animation values. + * + * @since 2.0 + * + * @return @c true if the values of the animations of the two instances of %FloatAnimation are not equal, @n + * else @c false + * @param[in] rhs An instance of %FloatAnimation + */ + bool operator !=(const FloatAnimation& rhs) const; + + + /** + * Checks whether the value of the current instance of %FloatAnimation equals the value of the specified instance. + * + * @since 2.0 + * + * @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 %FloatAnimation + * @remarks The %FloatAnimation class has a semantic value. @n + * This means that this method checks whether the two instances have the same animation. + */ + virtual bool Equals(const Tizen::Base::Object& obj) const; + + + /** + * Gets the hash value of the current instance. + * + * @since 2.0 + * + * @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 animated value for the current time. + * + * @since 2.0 + * + * @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 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. + */ + result GetAnimatedValue(long currentTime, float& animatedValue) const; + + + /** + * Adds a keyframe to the animation. + * + * @since 2.0 + * + * @return An error code + * @param[in] time The time stamp + * @param[in] value The value at the specified @c time + * @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 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); + + + /** + * Gets the keyframe at a particular index in this animation. + * + * @since 2.0 + * + * @return An error code + * @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 @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 + * the GetKeyFrameAt (0,time,value) is called, the pair returned is (5,value3). + */ + result GetKeyFrameAt(int index, long& time, float& value) const; + + + /** + * Removes the keyframe object from the keyframe list. + * + * @since 2.0 + * + * @return An error code + * @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_SYSTEM A system error has occurred. + */ + result RemoveKeyFrame(long time); + + + /** + * Removes the keyframe present at the specified @c index from the keyframe list. + * + * @since 2.0 + * + * @return An error code + * @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. + * @exception E_SYSTEM A system error has occurred. + */ + result RemoveKeyFrameAt(int index); + + + /** + * Removes all the keyframes from the animation. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result RemoveAllKeyFrames(void); + + + /** + * Sets the start value of the animation. + * + * @since 2.0 + * + * @return An error code + * @param[in] startValue The start value of the animation to set + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetStartValue(float startValue); + + + /** + * Sets the end value of the animation. + * + * @since 2.0 + * + * @return An error code + * @param[in] endValue The end value of the animation to set + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetEndValue(float endValue); + + + /** + * Gets the start value of the animation. + * + * @since 2.0 + * + * @return The start value + */ + float GetStartValue(void) const; + + + /** + * Gets the end value of the animation. + * + * @since 2.0 + * + * @return The end value + */ + float GetEndValue(void) const; + + + /** + * Gets the type information of this instance. + * + * @since 2.0 + * + * @return The type information of this instance + */ + virtual AnimationType GetType(void) const; + + +protected: + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // This is the default constructor for this class. + // + // @since 2.0 + // + FloatAnimation(void); + + + friend class _FloatAnimationImpl; + + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // The variable for internal usage. + // + // @since 2.0 + // + class _FloatAnimationImpl* _pFloatAnimationImpl; +}; // FloatAnimation + + +}}} // Tizen::Ui::Animations + +#endif // _FUI_ANIM_FLOAT_ANIMATION_H_ diff --git a/inc/FUiAnimFrameAnimator.h b/inc/FUiAnimFrameAnimator.h new file mode 100644 index 0000000..0b93feb --- /dev/null +++ b/inc/FUiAnimFrameAnimator.h @@ -0,0 +1,292 @@ +// +// 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 FUiAnimFrameAnimator.h + * @brief This is the header file for the %FrameAnimator class. + * + * This header file contains the declarations of the %FrameAnimator class. + */ + +#ifndef _FUI_ANIM_FRAME_ANIMATOR_H_ +#define _FUI_ANIM_FRAME_ANIMATOR_H_ + +#include + + +namespace Tizen { namespace Ui { namespace Controls +{ +class Form; +class _FrameImpl; +} } } + +namespace Tizen { namespace Ui { namespace Animations +{ + + +/** + * @class FrameAnimator + * @brief This class defines the animation methods for Frame. + * + * @since 2.0 + * + * @final This class is not intended for extension. + * + * The %FrameAnimator class is used to control the animations operated on a Frame. + * + * For more information on the class features, see Animating a Form Transition. + * + */ +class _OSP_EXPORT_ FrameAnimator + : public Tizen::Base::Object +{ +public: + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~FrameAnimator(void); + + + /** + * Adds an IFrameAnimatorEventListener instance to the current instance of the frame. @n + * The added listener can listen to events on the given event dispatcher's context when they are fired. + * + * @since 2.0 + * + * @return An error code + * @param[in] listener The listener to add + * @exception E_SUCCESS The method is successful. + * @exception E_UNSUPPORTED_OPERATION The animation support is unavailable. + * @exception E_OBJ_ALREADY_EXIST The specified @c listener is already added. + * @exception E_SYSTEM A system error has occurred. + */ + result AddFrameAnimatorEventListener(IFrameAnimatorEventListener& listener); + + + /** + * Removes an IFrameAnimatorEventListener instance from the current instance of the frame. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @return An error code + * @param[in] listener The listener to remove + * @exception E_SUCCESS The method is successful. + * @exception E_UNSUPPORTED_OPERATION The animation support is unavailable. + * @exception E_OBJ_NOT_FOUND The specified @c listener is not found. + * @exception E_SYSTEM A system error has occurred. + */ + result RemoveFrameAnimatorEventListener(IFrameAnimatorEventListener& listener); + + + /** + * Gets the animation status of the frame animator. + * + * @since 2.0 + * + * @return The animation state of the frame animator + */ + AnimatorStatus GetStatus(void) const; + + + /** + * Sets the specified form as the current form of the frame with an animation. + * + * @brief [Deprecated] + * @deprecated This method is deprecated. + * @since 2.0 + * + * @return An error code + * @param[in] form The form object to set + * @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 Control::Invalidate() need not be called to display the form. @n + * To select the animation to be used during this method, use SetFormTransitionAnimation() before calling this method. + */ + result SetCurrentForm(const Tizen::Ui::Controls::Form& form); + + /** + * Sets a specified form as the current form of the frame with an animation. + * + * @since 2.1 + * + * @return An error code + * @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. + * @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. + */ + result SetCurrentForm(Tizen::Ui::Controls::Form* pForm); + + + /** + * Sets the type of the form transition animation. + * + * @since 2.0 + * + * @param[in] animation The type of form transition animation to set + * @param[in] duration The duration of animation in milliseconds @n + * The maximum duration is one second. + * @param[in] interpolator The type of interpolator used for the intermediate value calculation of the animation + */ + void SetFormTransitionAnimation(FrameAnimatorFormTransitionAnimation animation, long duration, AnimationInterpolatorType interpolator); + + + /** + * Gets the type of the form transition animation. + * + * @since 2.0 + * + * @param[out] animation The type of form transition animation used + * @param[out] duration The duration of animation in milliseconds + * @param[out] interpolator The type of interpolator used for the intermediate value calculation of the animation + */ + void GetFormTransitionAnimation(FrameAnimatorFormTransitionAnimation& animation, long& duration, AnimationInterpolatorType& interpolator) const; + + + /** + * Sets the control points for the Bezier interpolator. @n + * The %SetFormTransitionBezierControlPoints() method is supported only if the interpolator is @c ANIMATION_INTERPOLATOR_BEZIER. + * + * @since 2.0 + * + * @return An error code + * @param[in] time1 The control point 1 - Time @n + * The time must be within the range @c 0.0 to @c 1.0. + * @param[in] value1 The control point 1 - Value @n + * The value must be within the range @c 0.0 to @c 1.0. + * @param[in] time2 The control point 2 - Time @n + * The time must be within the range @c 0.0 to @c 1.0. + * @param[in] value2 The control point 2 - Value @n + * The value must be within the range @c 0.0 to @c 1.0. + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_OPERATION The interpolator of this instance is not ANIMATION_INTERPOLATOR_BEZIER. + * @exception E_INVALID_ARG A specified input parameter is invalid. + */ + result SetFormTransitionBezierControlPoints(float time1, float value1, float time2, float value2); + + + /** + * Gets the control points of the Bezier interpolator. @n + * The %GetFormTransitionBezierControlPoints() method is supported only if the interpolator is @c ANIMATION_INTERPOLATOR_BEZIER. @n + * Therefore, @c 0 will be returned for other interpolators. + * + * @since 2.0 + * + * @return An error code + * @param[out] time1 The control point 1 - Time + * @param[out] value1 The control point 1 - Value + * @param[out] time2 The control point 2 - Time + * @param[out] value2 The control point 2 - Value + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_OPERATION The interpolator of this instance is not ANIMATION_INTERPOLATOR_BEZIER. + */ + result GetFormTransitionBezierControlPoints(float& time1, float& value1, float& time2, float& value2) const; + + + /** + * Stops all the animations that are being played and jumps to the final frame of the animation. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result StopAllAnimations(void); + + +protected: + + friend class _FrameAnimatorImpl; + + + // + // This variable is for internal use only. Using this variable can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // The variable for internal usage. + // + // @since 2.0 + // + class _FrameAnimatorImpl* _pFrameAnimatorImpl; + + +private: + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // This is the constructor for this class. + // + // @since 2.0 + // + FrameAnimator(void); + + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // Initializes this class. + // + // @since 2.0 + // @return An error code + // @param[in] source An instance of the Frame class + // @exception E_SUCCESS The method is successful. + // @exception E_SYSTEM A system error has occurred. + // + result Construct(const Tizen::Ui::Controls::Frame& source); + + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // This is the copy constructor for the %FrameAnimator class. + // + // @since 2.0 + // + FrameAnimator(const FrameAnimator& rhs); + + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // Assigns the value of the specified instance to the current instance of %FrameAnimator. + // + // @since 2.0 + // + FrameAnimator& operator =(const FrameAnimator& rhs); + + + friend class Tizen::Ui::Controls::_FrameImpl; +}; // FrameAnimator + + +}}} // Tizen::Ui::Animations + +#endif //_FUI_ANIM_FRAME_ANIMATOR_H_ diff --git a/inc/FUiAnimIAnimationTransactionEventListener.h b/inc/FUiAnimIAnimationTransactionEventListener.h new file mode 100644 index 0000000..2d98baf --- /dev/null +++ b/inc/FUiAnimIAnimationTransactionEventListener.h @@ -0,0 +1,134 @@ +// +// 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 FUiAnimIAnimationTransactionEventListener.h + * @brief This is the header file for the %IAnimationTransactionEventListener interface. + * + * This header file contains the declarations of the %IAnimationTransactionEventListener interface. + */ + +#ifndef _FUI_ANIM_IANIMATION_TRANSACTION_EVENT_LISTENER_H_ +#define _FUI_ANIM_IANIMATION_TRANSACTION_EVENT_LISTENER_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Animations +{ + + +/** + * @interface IAnimationTransactionEventListener + * @brief This interface implements the listener for the animation transaction events defined in the %Tizen::Ui::Animations namespace. + * + * @since 2.0 + * + * The %IAnimationTransactionEventListener interface is the listener interface for receiving animation transaction events. + * The class that processes an animation transaction event implements this interface, and the instance created with that class is + * registered with AnimationTransaction, using the AnimationTransaction::SetTransactionEventListener() method. When the animation + * transaction event occurs, a method of that instance is invoked. + * + */ +class _OSP_EXPORT_ IAnimationTransactionEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +public: + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~IAnimationTransactionEventListener(void) {} + + + /** + * Called when the transaction starts. + * + * @since 2.0 + * + * @param[in] transactionId The ID of the transaction for which the event has occurred + */ + virtual void OnAnimationTransactionStarted(int transactionId) = 0; + + + /** + * Called when the transaction stops. + * + * @since 2.0 + * + * @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; + + + /** + * Called when the transaction is finished. + * + * @since 2.0 + * + * @param[in] transactionId The ID of the transaction for which the event has occurred + * @remarks This callback is called when all the animations in a transaction are finished. + */ + virtual void OnAnimationTransactionFinished(int transactionId) = 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. + // + // @since 2.0 + // + virtual void IAnimationTransactionEventListener_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. + // + // @since 2.0 + // + virtual void IAnimationTransactionEventListener_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. + // + // @since 2.0 + // + virtual void IAnimationTransactionEventListener_Reserved3(void) { } +}; // IAnimationTransactionEventListener + + +}}} // Tizen::Ui::Animations + +#endif // _FUI_ANIM_IANIMATION_TRANSACTION_EVENT_LISTENER_H_ diff --git a/inc/FUiAnimIControlAnimatorDetailedEventListener.h b/inc/FUiAnimIControlAnimatorDetailedEventListener.h new file mode 100644 index 0000000..4387d7d --- /dev/null +++ b/inc/FUiAnimIControlAnimatorDetailedEventListener.h @@ -0,0 +1,195 @@ +// +// 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 FUiAnimIControlAnimatorDetailedEventListener.h + * @brief This is the header file for the %IControlAnimatorDetailedEventListener interface. + * + * This header file contains the declarations of the %IControlAnimatorDetailedEventListener interface. + */ + +#ifndef _FUI_ANIM_ICONTROL_ANIMATOR_DETAILED_EVENT_LISTENER_H_ +#define _FUI_ANIM_ICONTROL_ANIMATOR_DETAILED_EVENT_LISTENER_H_ + +#include +#include +#include + +#include +#include + +namespace Tizen { namespace Ui +{ +class Control; +} } +namespace Tizen { namespace Ui { namespace Animations +{ +class ControlAnimator; +} } } +namespace Tizen { namespace Ui { namespace Animations +{ + + + +/** + * @interface IControlAnimatorDetailedEventListener + * @brief This interface implements a detailed listener for animation events. + * + * @since 2.0 + * + * The %IControlAnimatorDetailedEventListener interface is the listener interface for receiving detailed control animator events. + * The class that processes a detailed control animator event implements this interface, and the instance created with that class + * is registered with a UI control, using the ControlAnimator::AddControlAnimatorDetailedEventListener() method. When the detailed + * control animator event occurs, a method of that instance is invoked. + */ +class _OSP_EXPORT_ IControlAnimatorDetailedEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +public: + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~IControlAnimatorDetailedEventListener(void) {} + + + /** + * Called when an animation starts. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] control The control @n + * The animation starts on this control. + * @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. + * @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. + */ + virtual void OnControlAnimationStarted(Tizen::Ui::Animations::ControlAnimator& source, Tizen::Ui::Control& control, Tizen::Ui::Animations::ControlAnimatorTriggerType animTrigger, Tizen::Ui::Animations::AnimationTargetType animTarget, Tizen::Ui::Animations::AnimationBase* pAnimation) = 0; + + + /** + * Called when an animation is repeated. @n + * This event occurs only when a user calls StartUserAnimation(). + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] control The control @n + * The animation is repeated on this control. + * @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. + * @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. + * @param[in] repeatCount The current repeat count of the animation + */ + virtual void OnControlAnimationRepeated(Tizen::Ui::Animations::ControlAnimator& source, Tizen::Ui::Control& control, Tizen::Ui::Animations::ControlAnimatorTriggerType animTrigger, Tizen::Ui::Animations::AnimationTargetType animTarget, Tizen::Ui::Animations::AnimationBase* pAnimation, int repeatCount) = 0; + + + /** + * Called when an animation finishes. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] control The control @n + * The animation with the specified trigger type has finished for this control. + * @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. + * @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. + */ + virtual void OnControlAnimationFinished(Tizen::Ui::Animations::ControlAnimator& source, Tizen::Ui::Control& control, Tizen::Ui::Animations::ControlAnimatorTriggerType animTrigger, Tizen::Ui::Animations::AnimationTargetType animTarget, Tizen::Ui::Animations::AnimationBase* pAnimation) = 0; + + + /** + * Called when an animation stops. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] control The control @n + * The animation with the specified trigger type has stopped for this control. + * @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. + * @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. + */ + virtual void OnControlAnimationStopped(Tizen::Ui::Animations::ControlAnimator& source, Tizen::Ui::Control& control, Tizen::Ui::Animations::ControlAnimatorTriggerType animTrigger, Tizen::Ui::Animations::AnimationTargetType animTarget, Tizen::Ui::Animations::AnimationBase* pAnimation) = 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. + // + // @since 2.0 + // + virtual void IControlAnimatorDetailedEventListener_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. + // + // @since 2.0 + // + virtual void IControlAnimatorDetailedEventListener_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. + // + // @since 2.0 + // + virtual void IControlAnimatorDetailedEventListener_Reserved3(void) { } +}; // IControlAnimatorDetailedEventListener + + +}}} // Tizen::Ui::Animations + +#endif // _FUI_ANIM_ICONTROL_ANIMATOR_DETAILED_EVENT_LISTENER_H_ diff --git a/inc/FUiAnimIControlAnimatorEventListener.h b/inc/FUiAnimIControlAnimatorEventListener.h new file mode 100644 index 0000000..5baaa52 --- /dev/null +++ b/inc/FUiAnimIControlAnimatorEventListener.h @@ -0,0 +1,146 @@ +// +// 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 FUiAnimIControlAnimatorEventListener.h + * @brief This is the header file for the %IControlAnimatorEventListener interface. + * + * This header file contains the declarations of the %IControlAnimatorEventListener interface. + */ + +#ifndef _FUI_ANIM_ICONTROL_ANIMATOR_EVENT_LISTENER_H_ +#define _FUI_ANIM_ICONTROL_ANIMATOR_EVENT_LISTENER_H_ + +#include +#include +#include + +#include + + +namespace Tizen { namespace Ui +{ +class Control; +} } +namespace Tizen { namespace Ui { namespace Animations +{ +class ControlAnimator; +} } } + +namespace Tizen { namespace Ui { namespace Animations +{ + + +/** + * @interface IControlAnimatorEventListener + * @brief This interface implements the listener for animation events. + * + * @since 2.0 + * + * The %IControlAnimatorEventListener interface is the listener interface for receiving control animator events. + * The class that processes a control animator event implements this interface, and the instance created with that class is + * registered with a UI control, using the ControlAnimator::AddControlAnimatorEventListener() method. When the control animator event + * occurs, a method of that instance is invoked. + */ +class _OSP_EXPORT_ IControlAnimatorEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +public: + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~IControlAnimatorEventListener(void) {} + + + /** + * Called when an animation starts on the specified control. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] control The control on which an animation starts + */ + virtual void OnControlAnimationStarted(Tizen::Ui::Animations::ControlAnimator& source, Tizen::Ui::Control& control) = 0; + + + /** + * Called when all the animations currently associated with a control have finished. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] control The control on which all the animations have finished + */ + virtual void OnControlAnimationFinished(Tizen::Ui::Animations::ControlAnimator& source, Tizen::Ui::Control& control) = 0; + + + /** + * Called when all the animations currently associated with a control have stopped. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] control The control on which all the animations have stopped + */ + virtual void OnControlAnimationStopped(Tizen::Ui::Animations::ControlAnimator& source, Tizen::Ui::Control& control) = 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. + // + // @since 2.0 + // + virtual void IControlAnimatorEventListener_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. + // + // @since 2.0 + // + virtual void IControlAnimatorEventListener_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. + // + // @since 2.0 + // + virtual void IControlAnimatorEventListener_Reserved3(void) { } +}; // IControlAnimatorEventListener + + +}}} // Tizen::Ui::Animations + +#endif // _FUI_ANIM_ICONTROL_ANIMATOR_EVENT_LISTENER_H_ diff --git a/inc/FUiAnimIFrameAnimatorEventListener.h b/inc/FUiAnimIFrameAnimatorEventListener.h new file mode 100644 index 0000000..793e9d9 --- /dev/null +++ b/inc/FUiAnimIFrameAnimatorEventListener.h @@ -0,0 +1,166 @@ +// +// 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 FUiAnimIFrameAnimatorEventListener.h + * @brief This is the header file for the %IFrameAnimatorEventListener interface. + * + * This header file contains the declarations of the %IFrameAnimatorEventListener interface. + */ + +#ifndef _FUI_CTRL_IFRAME_ANIMATOR_EVENT_LISTENER_H_ +#define _FUI_CTRL_IFRAME_ANIMATOR_EVENT_LISTENER_H_ + +#include +#include +#include +#include +#include + + +namespace Tizen { namespace Ui { namespace Controls +{ +class Form; +} } } +namespace Tizen { namespace Ui { namespace Controls +{ +class Frame; +} } } +namespace Tizen { namespace Ui { namespace Animations +{ +class FrameAnimator; +} } } + +namespace Tizen { namespace Ui { namespace Animations +{ + + + +/** + * @interface IFrameAnimatorEventListener + * @brief This interface implements the listener for animation events. + * + * @since 2.0 + * + * The %IFrameAnimatorEventListener interface is the listener interface for receiving frame animator events. + * The class that processes a frame animator event implements this interface, and the instance created with that class is + * registered with a Frame, using the FrameAnimator::AddFrameAnimatorEventListener() method. When the frame animator event occurs, a + * method of that instance is invoked. + */ +class _OSP_EXPORT_ IFrameAnimatorEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +public: + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~IFrameAnimatorEventListener(void) {} + + + /** + * Called when the animation of a form transition starts. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] frame The frame @n + * The frame that starts the animation of a form transition. + * @param[in] form1 The form @n + * The animation starts on this form. + * @param[in] form2 The form @n + * The animation starts on this form. + */ + virtual void OnFormTransitionAnimationStarted(Tizen::Ui::Animations::FrameAnimator& source, Tizen::Ui::Controls::Frame& frame, Tizen::Ui::Controls::Form& form1, Tizen::Ui::Controls::Form& form2) = 0; + + + /** + * Called when the animation of a form transition stops. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] frame The frame @n + * The frame that stops the animation of a form transition. + * @param[in] form1 The form @n + * The animation stops on this form. + * @param[in] form2 The form @n + * The animation stops on this form. + */ + virtual void OnFormTransitionAnimationStopped(Tizen::Ui::Animations::FrameAnimator& source, Tizen::Ui::Controls::Frame& frame, Tizen::Ui::Controls::Form& form1, Tizen::Ui::Controls::Form& form2) = 0; + + + /** + * Called when the animation of a form transition finishes. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] frame The frame @n + * The frame that finishes the animation of a form transition. + * @param[in] form1 The form @n + * The animation finishes on this form. + * @param[in] form2 The form @n + * The animation finishes on this form. + */ + virtual void OnFormTransitionAnimationFinished(Tizen::Ui::Animations::FrameAnimator& source, Tizen::Ui::Controls::Frame& frame, Tizen::Ui::Controls::Form& form1, Tizen::Ui::Controls::Form& form2) = 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. + // + // @since 2.0 + // + virtual void IFrameAnimatorEventListener_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. + // + // @since 2.0 + // + virtual void IFrameAnimatorEventListener_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. + // + // @since 2.0 + // + virtual void IFrameAnimatorEventListener_Reserved3(void) { } +}; // IFrameAnimatorEventListener + + +}}} // Tizen::Ui::Animations + +#endif // _FUI_ANIM_IFRAME_ANIMATOR_EVENT_LISTENER_H_ diff --git a/inc/FUiAnimIVisualElementAnimationProvider.h b/inc/FUiAnimIVisualElementAnimationProvider.h new file mode 100644 index 0000000..bf9cfc8 --- /dev/null +++ b/inc/FUiAnimIVisualElementAnimationProvider.h @@ -0,0 +1,148 @@ +// +// 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 FUiAnimIVisualElementAnimationProvider.h + * @brief This is the header file for the %IVisualElementAnimationProvider interface. + * + * This header file contains the declarations of the %IVisualElementAnimationProvider interface. + */ + +#ifndef _FUI_ANIM_IVISUAL_ELEMENT_ANIMATION_PROVIDER_H_ +#define _FUI_ANIM_IVISUAL_ELEMENT_ANIMATION_PROVIDER_H_ + +#include + +namespace Tizen { namespace Base { +class String; +}} // Tizen::Base + +namespace Tizen { namespace Ui { namespace Animations +{ + +class VisualElement; +class VisualElementAnimation; + +/** +* @interface IVisualElementAnimationProvider +* @brief This interface implements the provider for the events generated by the %VisualElement. +* +* @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. +* 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. +* +*/ +class _OSP_EXPORT_ IVisualElementAnimationProvider +{ +public: + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~IVisualElementAnimationProvider(void) {} + +public: + /** + * Invoked for creating an animation when the property is changed. + * + * @since 2.0 + * + * @return A VisualElementAnimation instance for @c property + * @param[in] target The VisualElement instance that needs implicit animation + * @param[in] property The property of this instance for which animation is required + * @remarks If implicit animation for @c property is not required, return @c null. + */ + virtual Tizen::Ui::Animations::VisualElementAnimation* CreateAnimationForProperty(Tizen::Ui::Animations::VisualElement& target, const Tizen::Base::String& property) = 0; + + +protected: + // Reserved virtual methods for later extension. + // + // 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. + // + // @since 2.0 + // + virtual void IVisualElementAnimationProvider_Reserved1(void) {} + + + // Reserved virtual methods for later extension. + // + // 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. + // + // @since 2.0 + // + virtual void IVisualElementAnimationProvider_Reserved2(void) {} + + + // Reserved virtual methods for later extension. + // + // 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. + // + // @since 2.0 + // + virtual void IVisualElementAnimationProvider_Reserved3(void) {} + + + // Reserved virtual methods for later extension. + // + // 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. + // + // @since 2.0 + // + virtual void IVisualElementAnimationProvider_Reserved4(void) {} + + + // Reserved virtual methods for later extension. + // + // 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. + // + // @since 2.0 + // + virtual void IVisualElementAnimationProvider_Reserved5(void) {} +}; // IVisualElementAnimationProvider + + +}}} // Tizen::Ui::Animations + +#endif //_FUI_ANIM_IVISUAL_ELEMENT_ANIMATION_PROVIDER_H_ diff --git a/inc/FUiAnimIVisualElementAnimationStatusEventListener.h b/inc/FUiAnimIVisualElementAnimationStatusEventListener.h new file mode 100644 index 0000000..a646775 --- /dev/null +++ b/inc/FUiAnimIVisualElementAnimationStatusEventListener.h @@ -0,0 +1,151 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnimIVisualElementAnimationStatusEventListener.h + * @brief This is the header file for the %IVisualElementAnimationStatusEventListener interface. + * + * This header file contains the declarations of the %IVisualElementAnimationStatusEventListener interface. + */ + +#ifndef _FUI_ANIM_IVISUAL_ELEMENT_ANIMATION_STATUS_EVENT_LISTENER_H_ +#define _FUI_ANIM_IVISUAL_ELEMENT_ANIMATION_STATUS_EVENT_LISTENER_H_ + +#include + +namespace Tizen { namespace Base { +class String; +}} // Tizen::Base + +namespace Tizen { namespace Ui { namespace Animations +{ + +class VisualElement; +class VisualElementAnimation; + +/** + * @interface IVisualElementAnimationStatusEventListener + * @brief This interface implements the listener for the %VisualElementAnimation status events defined in the %Tizen::Ui::Animations namespace. + * + * @since 2.0 + * + * The %IVisualElementAnimationStatusEventListener interface is the listener interface for receiving animation status events. + * The class that processes an animation status event implements this interface, and the instance created with that class is + * registered with an animation, using the VisualElementAnimation::SetVisualElementAnimationStatusEventListener() method or + * the AnimationTransaction::SetVisualElementAnimationStatusEventListener() method. + * When the animation status is changing, a method of that instance is invoked. + * + * For more information on the class features, see Event Handling. + * + */ +class _OSP_EXPORT_ IVisualElementAnimationStatusEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +public: + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~IVisualElementAnimationStatusEventListener(void); + + + /** + * Called when the animation is started. + * + * @since 2.0 + * + * @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 an empty string. + */ + virtual void OnVisualElementAnimationStarted(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target) = 0; + + + /** + * Called when the animation is repeated. + * + * @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] currentRepeatCount The current repeat count + * @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; + + + /** + * Called when the animation is finished. + * + * @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] 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 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; + + +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. + // + // @since 2.0 + // + virtual void IVisualElementAnimationStatusEventListener_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. + // + // @since 2.0 + // + virtual void IVisualElementAnimationStatusEventListener_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. + // + // @since 2.0 + // + virtual void IVisualElementAnimationStatusEventListener_Reserved3(void) {} +}; // IVisualElementAnimationStatusEventListener + + +}}} // Tizen::Ui::Animations + +#endif //_FUI_ANIM_IVISUAL_ELEMENT_ANIMATION_STATUS_EVENT_LISTENER_H_ diff --git a/inc/FUiAnimIVisualElementAnimationTickEventListener.h b/inc/FUiAnimIVisualElementAnimationTickEventListener.h new file mode 100644 index 0000000..fb202f5 --- /dev/null +++ b/inc/FUiAnimIVisualElementAnimationTickEventListener.h @@ -0,0 +1,120 @@ +// +// 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 FUiAnimIVisualElementAnimationTickEventListener.h + * @brief This is the header file for the %IVisualElementAnimationTickEventListener interface. + * + * This header file contains the declarations of the %IVisualElementAnimationTickEventListener interface. + */ + +#ifndef _FUI_ANIM_IVISUAL_ELEMENT_ANIMATION_TICK_EVENT_LISTENER_H_ +#define _FUI_ANIM_IVISUAL_ELEMENT_ANIMATION_TICK_EVENT_LISTENER_H_ + +#include + +#include +#include + + +namespace Tizen { namespace Ui { namespace Animations +{ + + +/** + * @interface IVisualElementAnimationTickEventListener + * @brief This interface implements the listener for the %VisualElementAnimation tick events defined in the %Tizen::Ui::Animations namespace. + * + * @since 2.0 + * + * The %IVisualElementAnimationTickEventListener interface is the listener interface for receiving animation tick events. + * The class that processes an animation tick event implements this interface, and the instance created with that class is registered with an animation, + * using the VisualElementValueAnimation::SetVisualElementAnimationTickEventListener() method. + * When the animation tick event occurs, a method of that instance is invoked. + * + * For more information on the class features, see Event Handling. + * + */ +class _OSP_EXPORT_ IVisualElementAnimationTickEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +public: + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~IVisualElementAnimationTickEventListener(void); + + + /** + * Called when a tick event has occurred. @n + * The %OnTickOccurred() callback method will be called with every tick of the animation, using the current value by the UI framework. + * + * @since 2.0 + * + * @param[in] animation The animation that is running + * @param[in] keyName The key name of the animation + * @param[in] target The VisualElement object to which the animation is applied + * @param[in] currentValue The current value + */ + virtual void OnTickOccurred(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, const Tizen::Ui::Variant& currentValue) = 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. + // + // @since 2.0 + // + virtual void IVisualElementAnimationTickEventListener_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. + // + // @since 2.0 + // + virtual void IVisualElementAnimationTickEventListener_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. + // + // @since 2.0 + // + virtual void IVisualElementAnimationTickEventListener_Reserved3(void) {} +}; // IVisualElementAnimationTickEventListener + + +}}} // Tizen::Ui::Animations + +#endif //_FUI_ANIM_IVISUAL_ELEMENT_ANIMATION_TICK_EVENT_LISTENER_H_ diff --git a/inc/FUiAnimIVisualElementAnimationTimingFunction.h b/inc/FUiAnimIVisualElementAnimationTimingFunction.h new file mode 100644 index 0000000..cada31c --- /dev/null +++ b/inc/FUiAnimIVisualElementAnimationTimingFunction.h @@ -0,0 +1,109 @@ +// +// 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 FUiAnimIVisualElementAnimationTimingFunction.h + * @brief This is the header file for the %IVisualElementAnimationTimingFunction interface. + * + * This header file contains the declarations of the %IVisualElementAnimationTimingFunction interface. + */ + +#ifndef _FUI_ANIM_IVISUAL_ELEMENT_ANIMATION_TIMING_FUNCTION_H_ +#define _FUI_ANIM_IVISUAL_ELEMENT_ANIMATION_TIMING_FUNCTION_H_ + +#include + +namespace Tizen { namespace Ui { namespace Animations +{ + + +/** + * @interface IVisualElementAnimationTimingFunction + * @brief This interface implements the timing function for the %VisualElementAnimation defined in the %Tizen::Ui::Animations namespace. + * + * @since 2.0 + * + * The %IVisualElementAnimationTimingFunction interface is the timing function interface for the pacing of an animation. + * The class that defines the pacing of an animation as a timing curve implements this interface, + * and the instance created with that class is registered with an animation, + * using the VisualElementAnimation::SetTimingFunction() method or the AnimationTransaction::SetVisualElementAnimationTimingFunction() method. + * When tick of the animation occurs, a method of that instance is invoked. + * + * For more information on the class features, see Timing Function. + * + */ +class _OSP_EXPORT_ IVisualElementAnimationTimingFunction +{ +public: + + /** + * This is the default constructor for this class. + * + * @since 2.0 + */ + IVisualElementAnimationTimingFunction(void); + + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~IVisualElementAnimationTimingFunction(void); + + + /** + * Calculates the progress(pace) of an animation regarding the time elapsed. + * + * @since 2.0 + * + * @return The progress(pace) value calculated by the time progress value and the timing function type @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. + */ + virtual float CalculateProgress(float timeProgress) const = 0; + + +private: + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // This is the assignment operator for this class. + // + // @since 2.0 + // + IVisualElementAnimationTimingFunction(const IVisualElementAnimationTimingFunction& rhs); + + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // Assigns the value of the specified instance to the current instance of %IVisualElementAnimationTimingFunction. + // + // @since 2.0 + // + IVisualElementAnimationTimingFunction& operator =(const IVisualElementAnimationTimingFunction& rhs); +}; // IVisualElementAnimationTimingFunction + + +}}} // Tizen::Ui::Animations + +#endif //_FUI_ANIM_IVISUAL_ELEMENT_ANIMATION_TIMING_FUNCTION_H_ diff --git a/inc/FUiAnimIVisualElementAnimationValueInterpolator.h b/inc/FUiAnimIVisualElementAnimationValueInterpolator.h new file mode 100644 index 0000000..d470b07 --- /dev/null +++ b/inc/FUiAnimIVisualElementAnimationValueInterpolator.h @@ -0,0 +1,115 @@ +// +// 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 FUiAnimIVisualElementAnimationValueInterpolator.h + * @brief This is the header file for the %IVisualElementAnimationValueInterpolator interface. + * + * This header file contains the declarations of the %IVisualElementAnimationValueInterpolator interface. + */ + +#ifndef _FUI_ANIM_IVISUAL_ELEMENT_ANIMATION_VALUE_INTERPOLATOR_H_ +#define _FUI_ANIM_IVISUAL_ELEMENT_ANIMATION_VALUE_INTERPOLATOR_H_ + +#include +#include + +namespace Tizen { namespace Ui { namespace Animations +{ + + +/** + * @interface IVisualElementAnimationValueInterpolator + * @brief This interface implements the interpolator for the %VisualElementAnimation defined in the %Tizen::Ui::Animations namespace. + * + * @since 2.0 + * + * The %IVisualElementAnimationValueInterpolator interface is the interpolator interface for interpolating on animation progress. + * The class that interpolates start value and end value implements this interface, + * and the instance created with that class is registered with an animation, + * using the VisualElementAnimation::SetValueInterpolator() method or the AnimationTransaction::SetVisualElementAnimationValueInterpolator() method. + * When tick of the animation occurs, a method of that instance is invoked. + * + * For more information on the class features, see Interpolation. + * + */ +class _OSP_EXPORT_ IVisualElementAnimationValueInterpolator +{ +public: + + /** + * This is the default constructor for this class. + * + * @since 2.0 + */ + IVisualElementAnimationValueInterpolator(void); + + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~IVisualElementAnimationValueInterpolator(void); + + + /** + * Calculates the interpolated value based on the time. @n + * The %Interpolate() method will be called on every frame of an animation to calculate the current value of the specified @c progress. + * + * @since 2.0 + * + * @return An error code + * @param[in] progress The progress value from @c startValue to @c endValue @n + * The range of @c progress is decided by the IVisualElementAnimationTimingFunction interface. + * @param[in] startValue The start value + * @param[in] endValue The end value + * @param[out] value The interpolated value based on the time + * @exception E_SUCCESS The method is successful. + * @remarks If result is not E_SUCCESS, use @c startValue for the animation. + */ + virtual result Interpolate(float progress, const Tizen::Ui::Variant& startValue, const Tizen::Ui::Variant& endValue, Tizen::Ui::Variant& value) const = 0; + + +private: + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // This is the assignment operator for this class. + // + // @since 2.0 + // + IVisualElementAnimationValueInterpolator(const IVisualElementAnimationValueInterpolator& rhs); + + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // Assigns the value of the specified instance to the current instance of %IVisualElementAnimationValueInterpolator. + // + // @since 2.0 + // + IVisualElementAnimationValueInterpolator& operator =(const IVisualElementAnimationValueInterpolator& rhs); +}; // IVisualElementAnimationValueInterpolator + + +}}} // Tizen::Ui::Animations + +#endif //_FUI_ANIM_IVISUAL_ELEMENT_ANIMATION_VALUE_INTERPOLATOR_H_ diff --git a/inc/FUiAnimIVisualElementContentProvider.h b/inc/FUiAnimIVisualElementContentProvider.h new file mode 100644 index 0000000..dfce682 --- /dev/null +++ b/inc/FUiAnimIVisualElementContentProvider.h @@ -0,0 +1,179 @@ +// +// 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 FUiAnimIVisualElementContentProvider.h + * @brief This is the header file for the %IVisualElementContentProvider interface. + * + * This header file contains the declarations of the %IVisualElementContentProvider interface. + */ + +#ifndef _FUI_ANIM_IVISUAL_ELEMENT_CONTENT_PROVIDER_H_ +#define _FUI_ANIM_IVISUAL_ELEMENT_CONTENT_PROVIDER_H_ + +#include +#include + +namespace Tizen { namespace Graphics { +class Canvas; +class FloatPoint; +}} // Tizen::Graphics + +namespace Tizen { namespace Ui { namespace Animations +{ +class VisualElement; + + +/** + * @interface IVisualElementContentProvider + * @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. + * + * For more information on the class features, see Content Provider. + * + */ +class _OSP_EXPORT_ IVisualElementContentProvider +{ +public: + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~IVisualElementContentProvider(void) {} + +public: + /** + * %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 + * + * @return @c true if DrawContent() can be called, @n + * else @c false + * @param[in] target An instance of VisualElement to check + */ + virtual bool PrepareDraw(Tizen::Ui::Animations::VisualElement& target) = 0; + + + /** + * Fills content in the given canvas. + * + * @since 2.0 + * + * @param[in] target An instance of VisualElement to draw + * @param[in] canvas A graphic canvas for drawing + * @see VisualElement::OnDraw() + * @see VisualElement::InvalidateRectangle() + */ + virtual void DrawContent(Tizen::Ui::Animations::VisualElement& target, Tizen::Graphics::Canvas& canvas) = 0; + + + /** + * 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 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: + * - 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; + + +protected: + // Reserved virtual methods for later extension. + // + // 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. + // + // @since 2.0 + // + virtual void IVisualElementContentProvider_Reserved1(void) {} + + + // Reserved virtual methods for later extension. + // + // 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. + // + // @since 2.0 + // + virtual void IVisualElementContentProvider_Reserved2(void) {} + + + // Reserved virtual methods for later extension. + // + // 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. + // + // @since 2.0 + // + virtual void IVisualElementContentProvider_Reserved3(void) {} + + + // Reserved virtual methods for later extension. + // + // 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. + // + // @since 2.0 + // + virtual void IVisualElementContentProvider_Reserved4(void) {} + + + // Reserved virtual methods for later extension. + // + // 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. + // + // @since 2.0 + // + virtual void IVisualElementContentProvider_Reserved5(void) {} +}; // IVisualElementContentProvider + + +}}} // Tizen::Ui::Animations + +#endif //_FUI_ANIM_IVISUAL_ELEMENT_CONTENT_PROVIDER_H_ diff --git a/inc/FUiAnimIVisualElementEventListener.h b/inc/FUiAnimIVisualElementEventListener.h new file mode 100644 index 0000000..632c25b --- /dev/null +++ b/inc/FUiAnimIVisualElementEventListener.h @@ -0,0 +1,282 @@ +// +// 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 FUiAnimIVisualElementEventListener.h + * @brief This is the header file for the %IVisualElementEventListener interface. + * + * This header file contains the declarations of the %IVisualElementEventListener interface. + */ + +#ifndef _FUIANIM_IVISUAL_ELEMENT_EVENT_LISTENER_H_ +#define _FUIANIM_IVISUAL_ELEMENT_EVENT_LISTENER_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Animations +{ + +class VisualElement; + +/** +* @interface IVisualElementEventListener +* @brief This interface implements the event listener for the events generated by %VisualElement. +* +* @since 2.0 +* +* 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. +* +*/ +class _OSP_EXPORT_ IVisualElementEventListener + : public Tizen::Base::Runtime::IEventListener +{ +public: + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~IVisualElementEventListener(void) {} + +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 %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 + */ + virtual void OnChildAttached(Tizen::Ui::Animations::VisualElement& parent, Tizen::Ui::Animations::VisualElement& child) = 0; + + + /** + * 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 + */ + 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 %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 + */ + virtual void OnAttached(Tizen::Ui::Animations::VisualElement& child, Tizen::Ui::Animations::VisualElement& parent) = 0; + + + /** + * 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 + */ + virtual void OnDetached(Tizen::Ui::Animations::VisualElement& child, Tizen::Ui::Animations::VisualElement& parent) = 0; + + + /** + * 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 VisualElement::SetTransformMatrix(). + * + * @since 2.0 + * + * @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. + */ + virtual result OnTransformChanging(Tizen::Ui::Animations::VisualElement& source, Tizen::Graphics::FloatMatrix4& newTransform) = 0; + + + /** + * 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 VisualElement::SetTransformMatrix(). + * + * @since 2.0 + * + * @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; + + + /** + * 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 VisualElement::SetChildrenTransformMatrix(). + * + * @since 2.0 + * + * @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 the operation will be cancelled. + */ + virtual result OnChildrenTransformChanging(Tizen::Ui::Animations::VisualElement& source, Tizen::Graphics::FloatMatrix4& newTransform) = 0; + + + /** + * 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 VisualElement::SetChildrenTransformMatrix(). + * + * @since 2.0 + * + * @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; + + + /** + * 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 VisualElement::SetBounds(). + * + * @since 2.0 + * + * @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. + */ + virtual result OnBoundsChanging(Tizen::Ui::Animations::VisualElement& source, Tizen::Graphics::FloatRectangle& newBounds) = 0; + + + /** + * 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 VisualElement::SetBounds(). + * + * @since 2.0 + * + * @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; + + + /** + * 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 VisualElement::SetShowState(). + * + * @since 2.0 + * + * @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; + + +protected: + // Reserved virtual methods for later extension. + // + // 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. + // + // @since 2.0 + // + virtual void IVisualElementEventListener_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. + // + // @since 2.0 + // + virtual void IVisualElementEventListener_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. + // + // @since 2.0 + // + virtual void IVisualElementEventListener_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. + // + // @since 2.0 + // + virtual void IVisualElementEventListener_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. + // + // @since 2.0 + // + virtual void IVisualElementEventListener_Reserved5(void) {} +}; // IVisualElementEventListener + + +}}} // Tizen::Ui::Animations + +#endif //_FUI_ANIM_IVISUAL_ELEMENT_EVENT_LISTENER_H_ diff --git a/inc/FUiAnimIntegerAnimation.h b/inc/FUiAnimIntegerAnimation.h new file mode 100644 index 0000000..1f7e7e3 --- /dev/null +++ b/inc/FUiAnimIntegerAnimation.h @@ -0,0 +1,338 @@ +// +// 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 FUiAnimIntegerAnimation.h + * @brief This is the header file for the %IntegerAnimation class. + * + * This header file contains the declarations of the %IntegerAnimation class. + */ + +#ifndef _FUI_ANIM_INTEGER_ANIMATION_H_ +#define _FUI_ANIM_INTEGER_ANIMATION_H_ + +#include +#include + +namespace Tizen { namespace Ui { namespace Animations +{ + +/** + * @class IntegerAnimation + * @brief This class animates an object from an integer value to another integer value. + * + * @since 2.0 + * + * @final This class is not intended for extension. + * + * The %IntegerAnimation class animates an object from an integer value to another integer value based on the specified interpolator type. + * + * For more information on the class features, see Animating UI Controls. + */ +class _OSP_EXPORT_ IntegerAnimation + : public AnimationBase +{ +public: + /** + * Initializes this instance of %IntegerAnimation with the specified parameters. + * + * @since 2.0 + * + * @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 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); + + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~IntegerAnimation(void); + + + /** + * This is the copy constructor for the %IntegerAnimation class. + * + * @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. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + IntegerAnimation(const IntegerAnimation& integerAnimation); + + + /** + * Assigns the value of the specified instance to the current instance of %IntegerAnimation. + * + * @since 2.0 + * + * @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. + */ + IntegerAnimation& operator =(const IntegerAnimation& rhs); + + + /** + * Checks whether the specified instance and the current instance of %IntegerAnimation have equal animation values. + * + * @since 2.0 + * + * @return @c true if the animation of the two instances of %IntegerAnimation are equal, @n + * else @c false + * @param[in] rhs An instance of %IntegerAnimation + */ + bool operator ==(const IntegerAnimation& rhs) const; + + + /** + * Checks whether the specified instance and the current instance of %IntegerAnimation have different animation values. + * + * @since 2.0 + * + * @return @c true if the values of the animations of the two instances of %IntegerAnimation are not equal, @n + * else @c false + * @param[in] rhs An instance of %IntegerAnimation + */ + bool operator !=(const IntegerAnimation& rhs) const; + + + /** + * Checks whether the value of the current instance of %IntegerAnimation equals the value of the specified instance. + * + * @since 2.0 + * + * @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 %IntegerAnimation + * @remarks The %IntegerAnimation class has a semantic value. @n + * This means that this method checks whether the two instances have the same animation. + */ + virtual bool Equals(const Tizen::Base::Object& obj) const; + + + /** + * Gets the hash value of the current instance. + * + * @since 2.0 + * + * @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 animated value for the current time. + * + * @since 2.0 + * + * @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 current time @n + * The value is passed as the input parameter. + * @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. + * + */ + result GetAnimatedValue(long currentTime, int& animatedValue) const; + + + /** + * Adds a keyframe to the animation. + * + * @since 2.0 + * + * @return An error code + * @param[in] time The time stamp + * @param[in] value The value at the specified @c time + * @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 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); + + + /** + * Gets the keyframe at a particular index in this animation. + * + * @since 2.0 + * + * @return An error code + * @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 + * @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 @c time and @c value returned are 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 then + * GetKeyFrameAt(0,time,value) is called, the pair returned is (5,value3). + */ + result GetKeyFrameAt(int index, long& time, int& value) const; + + + /** + * Removes the specified keyframe object from the keyframe list. + * + * @since 2.0 + * + * @return An error code + * @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_SYSTEM A system error has occurred. + */ + result RemoveKeyFrame(long time); + + + /** + * Removes the keyframe present at the specified @c index from the keyframe list. + * + * @since 2.0 + * + * @return An error code + * @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. + * @exception E_SYSTEM A system error has occurred. + */ + result RemoveKeyFrameAt(int index); + + + /** + * Removes all the keyframes from an animation. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result RemoveAllKeyFrames(void); + + + /** + * Sets the start value of the animation. + * + * @since 2.0 + * + * @return An error code + * @param[in] startValue The start value of the animation to set + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetStartValue(int startValue); + + + /** + * Sets the end value of the animation. + * + * @since 2.0 + * + * @return An error code + * @param[in] endValue The end value of the animation to set + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetEndValue(int endValue); + + + /** + * Gets the start value of the animation. + * + * @since 2.0 + * + * @return The start value + */ + int GetStartValue(void) const; + + + /** + * Gets the end value of the animation. + * + * @since 2.0 + * + * @return The end value + */ + int GetEndValue(void) const; + + + /** + * Gets the type information of this instance. + * + * @since 2.0 + * + * @return The type information of this instance + */ + virtual AnimationType GetType(void) const; + + +protected: + friend class _IntegerAnimationImpl; + + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // This variable is for internal usage. + // + // @since 2.0 + // + class _IntegerAnimationImpl* _pIntegerAnimationImpl; + +private: + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // This is the default constructor for this class. + // + // @since 2.0 + // + IntegerAnimation(void); +}; // IntegerAnimation + + +}}} // Tizen::Ui::Animations + +#endif // _FUI_ANIM_INTEGER_ANIMATION_H_ diff --git a/inc/FUiAnimLinearTimingFunction.h b/inc/FUiAnimLinearTimingFunction.h new file mode 100644 index 0000000..8476e72 --- /dev/null +++ b/inc/FUiAnimLinearTimingFunction.h @@ -0,0 +1,107 @@ +// +// 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 FUiAnimLinearTimingFunction.h + * @brief This is the header file for the %LinearTimingFunction class. + * + * This header file contains the declarations of the %LinearTimingFunction class. + */ + +#ifndef _FUI_ANIM_LINEAR_TIMING_FUNCTION_H_ +#define _FUI_ANIM_LINEAR_TIMING_FUNCTION_H_ + +#include + +namespace Tizen { namespace Ui { namespace Animations +{ + + +/** + * @class LinearTimingFunction + * @brief This class stores the information of a linear timing function. + * + * @since 2.0 + * + * The %LinearTimingFunction class provides linear timing function related information. + * + * For more information on the class features, see Timing Function. + * + */ +class _OSP_EXPORT_ LinearTimingFunction + : public Tizen::Base::Object + , public IVisualElementAnimationTimingFunction +{ +public: + + /** + * This is the default constructor for this class. + * + * @since 2.0 + */ + LinearTimingFunction(void); + + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~LinearTimingFunction(void); + + + /** + * Calculates the progress(pace) of an animation regarding the time elapsed. + * + * @since 2.0 + * + * @return The progress(pace) value calculated by linear equation @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. + */ + virtual float CalculateProgress(float timeProgress) const; + + +private: + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // This is the assignment operator for this class. + // + // @since 2.0 + // + LinearTimingFunction(const LinearTimingFunction& rhs); + + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // Assigns the value of the specified instance to the current instance of %LinearTimingFunction. + // + // @since 2.0 + // + LinearTimingFunction& operator =(const LinearTimingFunction& rhs); +}; // LinearTimingFunction + + +}}} // Tizen::Ui::Animations + +#endif //_FUI_ANIM_LINEAR_TIMING_FUNCTION_H_ diff --git a/inc/FUiAnimParallelAnimationGroup.h b/inc/FUiAnimParallelAnimationGroup.h new file mode 100644 index 0000000..e148a0a --- /dev/null +++ b/inc/FUiAnimParallelAnimationGroup.h @@ -0,0 +1,254 @@ +// +// 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 FUiAnimParallelAnimationGroup.h + * @brief This is the header file for the %ParallelAnimationGroup class. + * + * This header file contains the declarations of the %ParallelAnimationGroup class. + */ + +#ifndef _FUI_ANIM_PARALLEL_ANIMATION_GROUP_H_ +#define _FUI_ANIM_PARALLEL_ANIMATION_GROUP_H_ + +#include +#include + +#include +#include + + +namespace Tizen { namespace Ui { namespace Animations +{ + + +/** + * @class ParallelAnimationGroup + * @brief This class is used to group a set of animations together. + * + * @since 2.0 + * + * @final This class is not intended for extension. + * + * The %ParallelAnimationGroup class is used to group a set of animations together in parallel. + */ +class _OSP_EXPORT_ ParallelAnimationGroup + : public AnimationGroup +{ +public: + + /** + * This is the default constructor for this class. + * + * @since 2.0 + * @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. + */ + ParallelAnimationGroup(void); + + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~ParallelAnimationGroup(void); + + + /** + * This is the copy constructor for the %ParallelAnimationGroup class. + * + * @since 2.0 + * + * @param[in] animationGroup 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. + */ + ParallelAnimationGroup(const ParallelAnimationGroup& animationGroup); + + + /** + * Assigns the value of the specified instance to the current instance of %ParallelAnimationGroup. + * + * @since 2.0 + * + * @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. + */ + ParallelAnimationGroup& operator =(const ParallelAnimationGroup& rhs); + + + /** + * Checks whether the specified instance and the current instance of %ParallelAnimationGroup have equal animation values. + * + * @since 2.0 + * + * @return @c true if the animation of the two instances of %ParallelAnimationGroup have equal values, @n + * else @c false + * @param[in] rhs An instance of %ParallelAnimationGroup + */ + bool operator ==(const ParallelAnimationGroup& rhs) const; + + + /** + * Checks whether the specified instance and the current instance of %ParallelAnimationGroup have different animation values. + * + * @since 2.0 + * + * @return @c true if the values of the animations of the two instances of %ParallelAnimationGroup are not equal, @n + * else @c false + * @param[in] rhs An instance of %ParallelAnimationGroup + */ + bool operator !=(const ParallelAnimationGroup& rhs) const; + + + /** + * Checks whether the value of the current instance of %ParallelAnimationGroup equals the value of the specified instance. + * + * @since 2.0 + * + * @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 %ParallelAnimationGroup + * @remarks The %ParallelAnimationGroup class has a semantic value. @n + * This means that this method checks whether the two instances have the same animation. + */ + virtual bool Equals(const Tizen::Base::Object& obj) const; + + + /** + * Gets the hash value of the current instance. + * + * @since 2.0 + * + * @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; + + + /** + * Removes all the animations from the animation group. + * + * @since 2.0 + */ + virtual void RemoveAllAnimations(void); + + + /** + * Gets the total number of animations currently stored in a group. + * + * @since 2.0 + * + * @return The total number of animations stored in a group + */ + virtual int GetAnimationCount(void) const; + + + /** + * Adds an animation to the animation group. @n + * Each animation target can have only one animation. + * + * @since 2.0 + * + * @return An error code + * @param[in] animTarget The animation target type @n + * The animation is applied to the specified animation target type. + * @param[in] animation An object of type AnimationBase + * @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. + */ + result AddAnimation(AnimationTargetType animTarget, const AnimationBase& animation); + + + /** + * Removes an animation from the animation group with the specified animation target. + * + * @since 2.0 + * + * @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_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. + */ + result RemoveAnimation(AnimationTargetType animTarget); + + + /** + * Gets the animation object for the specified animation target. + * + * @since 2.0 + * + * @return An animation for the specified animation target in the animation group, @n + * else @c null if the animation target is empty + * @param[in] animTarget The animation target type to get an animation object + */ + AnimationBase* GetAnimationN(AnimationTargetType animTarget) const; + + + /** + * Checks whether an animation is added for the specified target type. + * + * @since 2.0 + * + * @return @c true if an animation is associated with the specified target type, @n + * else @c false + * @param[in] animTarget The animation target type + */ + bool IsAnimationAdded(AnimationTargetType animTarget); + + + /** + * Gets the type information of this instance. + * + * @since 2.0 + * + * @return The type information of this instance + */ + virtual AnimationGroupType GetType(void) const; + + +protected: + + friend class _ParallelAnimationGroupImpl; + + + // + // This variable is for internal use only. Using this variable can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // This variable is for internal usage. + // + // @since 2.0 + // + class _ParallelAnimationGroupImpl* _pParallelAnimationGroupImpl; +}; // ParallelAnimationGroup + + +}}} // Tizen::Ui::Animations + +#endif // _FUI_ANIM_PARALLEL_ANIMATION_GROUP_H_ diff --git a/inc/FUiAnimPointAnimation.h b/inc/FUiAnimPointAnimation.h new file mode 100644 index 0000000..52ce163 --- /dev/null +++ b/inc/FUiAnimPointAnimation.h @@ -0,0 +1,338 @@ +// +// 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 FUiAnimPointAnimation.h + * @brief This is the header file for the %PointAnimation class. + * + * This header file contains the declarations of the %PointAnimation class. + */ + +#ifndef _FUI_ANIM_POINT_ANIMATION_H_ +#define _FUI_ANIM_POINT_ANIMATION_H_ + +#include +#include + +namespace Tizen { namespace Ui { namespace Animations +{ + +/** + * @class PointAnimation + * @brief This class animates the %Tizen::Graphics::Point object. + * + * @since 2.0 + * + * @final This class is not intended for extension. + * + * The %PointAnimation class animates an object from a Tizen::Graphics::Point value to another %Tizen::Graphics::Point value + * based on the specified interpolator type. + * + * For more information on the class features, see Animating UI Controls. + */ +class _OSP_EXPORT_ PointAnimation + : public AnimationBase +{ +public: + + /** + * Initializes this instance of %PointAnimation with the specified parameters. + * + * @since 2.0 + * + * @param[in] startValue The start value for %PointAnimation + * @param[in] endValue The end value for %PointAnimation + * @param[in] duration The duration of animation in milliseconds + * @param[in] interpolator 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 value of the specified parameter is negative or the interpolator is of an invalid type. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + PointAnimation(const Tizen::Graphics::Point& startValue, const Tizen::Graphics::Point& endValue, long duration, AnimationInterpolatorType interpolator); + + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~PointAnimation(void); + + + /** + * This is the copy constructor for the %PointAnimation class. + * + * @since 2.0 + * + * @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. + */ + PointAnimation(const PointAnimation& pointAnimation); + + + /** + * Assigns the value of the specified instance to the current instance of %PointAnimation. + * + * @since 2.0 + * + * @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. + */ + PointAnimation& operator =(const PointAnimation& pointAnimation); + + + /** + * Checks whether the specified instance and the current instance of %PointAnimation have equal animation values. + * + * @since 2.0 + * + * @return @c true if the animation of the two instances of %PointAnimation are equal, @n + * else @c false + * @param[in] rhs An instance of %PointAnimation + */ + bool operator ==(const PointAnimation& rhs) const; + + + /** + * Checks whether the specified instance and the current instance of %PointAnimation have different animation values. + * + * @since 2.0 + * + * @return @c true if the values of the animations of the two instances of %PointAnimation are not equal, @n + * else @c false + * @param[in] rhs An instance of %PointAnimation + */ + bool operator !=(const PointAnimation& rhs) const; + + + /** + * Checks whether the value of the current instance of %PointAnimation equals the value of the specified instance. + * + * @since 2.0 + * + * @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 %PointAnimation + * @remarks The %PointAnimation class has a semantic value. @n + * This means that this method checks whether the two instances have the same animation. + */ + virtual bool Equals(const Tizen::Base::Object& obj) const; + + + /** + * Gets the hash value of the current instance. + * + * @since 2.0 + * + * @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 animated value for the current time. + * + * @since 2.0 + * + * @return An error code + * @param[in] currentTime The current time value of the animation @n + * The value must be between @c 0 and the duration of the animation. + * @param[out] animatedValue The animated value for the current time passed as the input parameter + * @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. + * + */ + result GetAnimatedValue(long currentTime, Tizen::Graphics::Point& animatedValue) const; + + + /** + * Adds a keyframe to the animation. + * + * @since 2.0 + * + * @return An error code + * @param[in] time The time stamp + * @param[in] value The value at the specified @c time + * @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. + * 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); + + + /** + * Gets the keyframe at a particular index in this animation. + * + * @since 2.0 + * + * @return An error code + * @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 + * @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 @c time and @c value returned are present at the index of the sorted map list that is sorted with respect to the key. + * 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::Point& value) const; + + + /** + * Removes the passed keyframe object from the keyframe list. + * + * @since 2.0 + * + * @return An error code + * @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_SYSTEM A system error has occurred. + */ + result RemoveKeyFrame(long time); + + + /** + * Removes the keyframe present at the specified @c index from the keyframe list. + * + * @since 2.0 + * + * @return An error code + * @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. + * @exception E_SYSTEM A system error has occurred. + */ + result RemoveKeyFrameAt(int index); + + + /** + * Removes all the keyframes from the animation. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result RemoveAllKeyFrames(void); + + + /** + * Sets the start value of the animation. + * + * @since 2.0 + * + * @return An error code + * @param[in] startValue The start value of the animation to set + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetStartValue(const Tizen::Graphics::Point& startValue); + + + /** + * Sets the end value of the animation. + * + * @since 2.0 + * + * @return An error code + * @param[in] endValue The end value of the animation to set + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetEndValue(const Tizen::Graphics::Point& endValue); + + + /** + * Gets the start value of the animation. + * + * @since 2.0 + * + * @return The start value + */ + Tizen::Graphics::Point GetStartValue(void) const; + + + /** + * Gets the end value of the animation. + * + * @since 2.0 + * + * @return The end value + */ + Tizen::Graphics::Point GetEndValue(void) const; + + + /** + * Gets the type information of this instance. + * + * @since 2.0 + * + * @return The type information of this instance + */ + virtual AnimationType GetType(void) const; + + +protected: + + friend class _PointAnimationImpl; + + + // + // This variable is for internal use only. Using this variable can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // This variable is for internal usage. + // + // @since 2.0 + // + class _PointAnimationImpl* _pPointAnimationImpl; + +private: + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // This is the default constructor for this class. + // + // @since 2.0 + // + PointAnimation(void); +}; // PointAnimation + + +}}} // Tizen::Ui::Animations + +#endif // _FUI_ANIM_POINT_ANIMATION_H_ diff --git a/inc/FUiAnimRectangleAnimation.h b/inc/FUiAnimRectangleAnimation.h new file mode 100644 index 0000000..24bfefc --- /dev/null +++ b/inc/FUiAnimRectangleAnimation.h @@ -0,0 +1,373 @@ +// +// 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 FUiAnimRectangleAnimation.h + * @brief This is the header file for the %RectangleAnimation class. + * + * This header file contains the declarations of the %RectangleAnimation class. + */ + +#ifndef _FUI_ANIM_RECTANGLE_ANIMATION_H_ +#define _FUI_ANIM_RECTANGLE_ANIMATION_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Animations +{ + +/** + * @class RectangleAnimation + * @brief This class animates the %Tizen::Graphics::Rectangle object. + * + * @since 2.0 + * + * @final This class is not intended for extension. + * + * The %RectangleAnimation class animates an object from a Tizen::Graphics::Rectangle value to another %Rectangle value based on the specified interpolator type. + * + * For more information on the class features, see Animating UI Controls. + */ +class _OSP_EXPORT_ RectangleAnimation + : public AnimationBase +{ +public: + + /** + * Initializes this instance of %RectangleAnimation with the specified parameters. + * + * @since 2.0 + * + * @param[in] startValue The start value for rectangle animation + * @param[in] endValue The end value for rectangle animation + * @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. + * @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. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + RectangleAnimation(const Tizen::Graphics::Rectangle& startValue, const Tizen::Graphics::Rectangle& endValue, long duration, AnimationInterpolatorType interpolator); + + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~RectangleAnimation(void); + + + /** + * This is the copy constructor for the %RectangleAnimation class. + * + * @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. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + RectangleAnimation(const RectangleAnimation& rectangleAnimation); + + + /** + * Assigns the value of the specified instance to the current instance of %RectangleAnimation. + * + * @since 2.0 + * + * @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. + */ + RectangleAnimation& operator =(const RectangleAnimation& rhs); + + + /** + * Checks whether the specified instance and the current instance of %RectangleAnimation have equal animation values. + * + * @since 2.0 + * + * @return @c true if the animation of the two instances of %RectangleAnimation have equal values, @n + * else @c false + * @param[in] rhs An instance of %RectangleAnimation + */ + bool operator ==(const RectangleAnimation& rhs) const; + + + /** + * Checks whether the specified instance and the current instance of %RectangleAnimation have different animation values. + * + * @since 2.0 + * + * @return @c true if the values of the animations of the two instances of %RectangleAnimation are not equal, @n + * else @c false + * @param[in] rhs An instance of %RectangleAnimation + */ + bool operator !=(const RectangleAnimation& rhs) const; + + + /** + * Checks whether the value of the current instance of %RectangleAnimation is equal to the value of the specified instance. + * + * @since 2.0 + * + * @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 %RectangleAnimation + * @remarks The %RectangleAnimation 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; + + + /** + * Gets the hash value of the current instance. + * + * @since 2.0 + * + * @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; + + + /** + * Sets the anchor points for the animation. + * + * @since 2.0 + * + * @param[in] anchorX The X value of the anchor @n + * The control's animation is performed at this point. The range of the anchor point is @c 0.0 to @c 1.0. + * @param[in] anchorY The Y value of the anchor @n + * The control's animation is performed at this point. The range of the anchor point is @c 0.0 to @c 1.0. + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @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. @n + * If the anchor point value is (0.5, 0.5), the object is scaled with respect to the center. @n + * If the anchor point value is (1.0, 1.0), the object is scaled and the bottom-right corner of the object remains fixed. + */ + result SetAnchor(float anchorX, float anchorY); + + + /** + * Gets the anchor point associated with the animation. @n + * The default anchor point is (0.0, 0.0). + * + * @since 2.0 + * + * @param[out] anchorX The X value of the anchor @n + * The control's animation is performed at this point. + * @param[out] anchorY The Y value of the anchor @n + * The control's animation is performed at this point. + */ + void GetAnchor(float& anchorX, float& anchorY) const; + + + /** + * Gets the animated value for the current time. + * + * @since 2.0 + * + * @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 current time passed as the input parameter + * @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. + * + */ + result GetAnimatedValue(long currentTime, Tizen::Graphics::Rectangle& animatedValue) const; + + + /** + * Adds a keyframe to the animation. + * + * @since 2.0 + * + * @return An error code + * @param[in] time The time stamp + * @param[in] value The value at the specified @c time + * @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 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 equal to the duration of the animation. + */ + result AddKeyFrame(long time, const Tizen::Graphics::Rectangle& value); + + + /** + * Gets the keyframe at a specified @c index in this animation. + * + * @since 2.0 + * + * @return An error code + * @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 + * @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 @c time and @c value returned is the one present at the index of the sorted map list (sorted with respect to the key). + * For example, if the user adds keyframe 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::Rectangle& value) const; + + + /** + * Removes the passed keyframe object from the keyframe list. + * + * @since 2.0 + * + * @return An error code + * @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_SYSTEM A system error has occurred. + */ + result RemoveKeyFrame(long time); + + + /** + * Removes the keyframe present at the specified @c index from the keyframe list. + * + * @since 2.0 + * + * @return An error code + * @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. + * @exception E_SYSTEM A system error has occurred. + */ + result RemoveKeyFrameAt(int index); + + + /** + * Removes all the keyframes from an animation. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result RemoveAllKeyFrames(void); + + + /** + * Sets the start value of the animation. + * + * @since 2.0 + * + * @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 specified input parameter is invalid. + * @exception E_SYSTEM A system error has occurred. + */ + result SetStartValue(const Tizen::Graphics::Rectangle& startValue); + + + /** + * Sets the end value of the animation. + * + * @since 2.0 + * + * @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 specified input parameter is invalid. + * @exception E_SYSTEM A system error has occurred. + */ + result SetEndValue(const Tizen::Graphics::Rectangle& endValue); + + + /** + * Gets the start value of the animation. + * + * @since 2.0 + * + * @return The start value + */ + Tizen::Graphics::Rectangle GetStartValue(void) const; + + + /** + * Gets the end value of the animation. + * + * @since 2.0 + * + * @return The end value + */ + Tizen::Graphics::Rectangle GetEndValue(void) const; + + + /** + * Gets the type information of this instance. + * + * @since 2.0 + * + * @return The type information of this instance + */ + virtual AnimationType GetType(void) const; + + +protected: + friend class _RectangleAnimationImpl; + + + // + // This variable is for internal use only. Using this variable can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // This variable is for internal usage. + // + // @since 2.0 + // + class _RectangleAnimationImpl* _pRectangleAnimationImpl; + + +private: + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // This is the default constructor for this class. + // + // @since 2.0 + // + RectangleAnimation(void); +}; // RectangleAnimation + + +}}} // Tizen::Ui::Animations + +#endif // _FANIM_RECTANGLEANIMATION_H_ diff --git a/inc/FUiAnimRotateAnimation.h b/inc/FUiAnimRotateAnimation.h new file mode 100644 index 0000000..8e5ed87 --- /dev/null +++ b/inc/FUiAnimRotateAnimation.h @@ -0,0 +1,233 @@ +// +// 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 FUiAnimRotateAnimation.h + * @brief This is the header file for the %RotateAnimation class. + * + * This header file contains the declarations of the %RotateAnimation class. + */ + +#ifndef _FUI_ANIM_ROTATE_ANIMATION_H_ +#define _FUI_ANIM_ROTATE_ANIMATION_H_ + +#include + + +namespace Tizen { namespace Ui { namespace Animations +{ + + +/** + * @class RotateAnimation + * @brief This class animates between two angle values. + * + * @since 2.0 + * + * @final This class is not intended for extension. + * + * The %RotateAnimation class animates an object from an angle value (float) to another angle value (float) + * based on the specified interpolator type. When associated with a Control, the animation is applied on the z-axis of the %Control. + * + * For more information on the class features, see Animating UI Controls. + */ +class _OSP_EXPORT_ RotateAnimation + : public FloatAnimation +{ +public: + + /** + * Initializes this instance of %RotateAnimation with the specified parameters. + * + * @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. + * @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. + * @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. + * @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. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + RotateAnimation(float startValue, float endValue, long duration, AnimationInterpolatorType interpolator); + + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~RotateAnimation(void); + + + /** + * This is the copy constructor for the %RotateAnimation class. + * + * @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. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + RotateAnimation(const RotateAnimation& rotateAnimation); + + + /** + * Assigns the value of the specified instance to the current instance of %RotateAnimation. + * + * @since 2.0 + * + * @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. + */ + RotateAnimation& operator =(const RotateAnimation& rhs); + + + /** + * Checks whether the specified instance and the current instance of %RotateAnimation have equal animation values. + * + * @since 2.0 + * + * @return @c true if the animation of the two instances of %RotateAnimation have equal values, @n + * else @c false + * @param[in] rhs An instance of %RotateAnimation + */ + bool operator ==(const RotateAnimation& rhs) const; + + + /** + * Checks whether the specified instance and the current instance of %RotateAnimation have different animation values. + * + * @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 + * @param[in] rhs An instance of %RotateAnimation + */ + bool operator !=(const RotateAnimation& rhs) const; + + + /** + * Checks whether the value of the current instance of %RotateAnimation is equal to the value of the specified instance. + * + * @since 2.0 + * + * @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. + */ + virtual bool Equals(const Tizen::Base::Object& obj) const; + + + /** + * Gets the hash value of the current instance. + * + * @since 2.0 + * + * @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; + + + /** + * Sets the anchor points for the animation. + * + * @since 2.0 + * + * @param[in] anchorX The x value of the anchor @n + * The control's animation is performed at this point. The range of the anchor point is @c 0.0 to @c 1.0. + * @param[in] anchorY The y value of the anchor @n + * The control's animation is performed at this point. The range of the anchor point is @c 0.0 to @c 1.0. + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @remarks The default anchor point value is (0.5, 0.5). The range of an anchor point is @c 0.0 to @c 1.0. @n + * If the anchor point value is (0.5, 0.5), the object is rotated and the center of the object remains fixed. @n + * If the anchor point value is (0.0, 0.0), the object is rotated and the top-left corner of the object remains fixed. @n + * If the anchor point value is (1.0, 1.0), the object is rotated and the right-bottom corner of the object remains fixed. + */ + result SetAnchor(float anchorX, float anchorY); + + + /** + * Gets the anchor point associated with the animation. @n + * The default anchor point is (0.5, 0.5). + * + * @since 2.0 + * + * @param[out] anchorX The x value of the anchor @n + * The control's animation is performed at this point. + * @param[out] anchorY The y value of the anchor @n + * The control's animation is performed at this point. + */ + void GetAnchor(float& anchorX, float& anchorY) const; + + + /** + * Gets the type information of this instance. + * + * @since 2.0 + * + * @return The type information of this instance + */ + virtual AnimationType GetType(void) const; + + +protected: + + friend class _RotateAnimationImpl; + + + // + // This variable is for internal use only. Using this variable can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // This variable is for internal usage. + // + // @since 2.0 + // + class _RotateAnimationImpl* _pRotateAnimationImpl; + + +private: + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // This is the default constructor for this class. + // + // @since 2.0 + // + RotateAnimation(void); +}; // RotateAnimation + + +}}} // Tizen::Ui::Animations + +#endif // _FUI_ANIM_ROTATE_ANIMATION_H_ diff --git a/inc/FUiAnimSequentialAnimationGroup.h b/inc/FUiAnimSequentialAnimationGroup.h new file mode 100644 index 0000000..fa6f5d3 --- /dev/null +++ b/inc/FUiAnimSequentialAnimationGroup.h @@ -0,0 +1,287 @@ +// +// 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 FUiAnimSequentialAnimationGroup.h + * @brief This is the header file for the %SequentialAnimationGroup class. + * + * This header file contains the declarations of the %SequentialAnimationGroup class. + */ + +#ifndef _FUI_ANIM_SEQUENTIAL_ANIMATION_GROUP_H_ +#define _FUI_ANIM_SEQUENTIAL_ANIMATION_GROUP_H_ + +#include +#include + +#include +#include + + +namespace Tizen { namespace Ui { namespace Animations +{ + + +/** + * @class SequentialAnimationGroup + * @brief This class is used to group a set of animations together. + * + * @since 2.0 + * + * @final This class is not intended for extension. + * + * The %SequentialAnimationGroup class is used to group a set of animations together in sequence. + */ +class _OSP_EXPORT_ SequentialAnimationGroup + : public AnimationGroup +{ +public: + + /** + * This is the default constructor for this class. + * + * @since 2.0 + * + * @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(void); + + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~SequentialAnimationGroup(void); + + + /** + * This is the copy constructor for the %SequentialAnimationGroup class. + * + * @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. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + SequentialAnimationGroup(const SequentialAnimationGroup& animationGroup); + + + /** + * Assigns the value of the specified instance to the current instance of %SequentialAnimationGroup. + * + * @since 2.0 + * + * @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. + */ + SequentialAnimationGroup& operator =(const SequentialAnimationGroup& rhs); + + + /** + * Checks whether the specified instance and the current instance of %SequentialAnimationGroup have equal animation values. + * + * @since 2.0 + * + * @return @c true if the animation of the two instances of %SequentialAnimationGroup have equal values, @n + * else @c false + * @param[in] rhs An instance of %SequentialAnimationGroup + */ + bool operator ==(const SequentialAnimationGroup& rhs) const; + + + /** + * Checks whether the specified instance and the current instance of %SequentialAnimationGroup have different animation values. + * + * @since 2.0 + * + * @return @c true if the values of the animations of the two instances of %SequentialAnimationGroup are not equal, @n + * else @c false + * @param[in] rhs An instance of %SequentialAnimationGroup + */ + bool operator !=(const SequentialAnimationGroup& rhs) const; + + + /** + * Checks whether the value of the current instance of %SequentialAnimationGroup is equal to the value of the specified instance. + * + * @since 2.0 + * + * @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 %SequentialAnimationGroup + * @remarks The %SequentialAnimationGroup class has a semantic value. @n + * This means that this method checks whether the two instances have the same animation. + */ + virtual bool Equals(const Tizen::Base::Object& obj) const; + + + /** + * Gets the hash value of the current instance. + * + * @since 2.0 + * + * @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; + + + /** + * Removes all the animations from the animation group. + * + * @since 2.0 + */ + virtual void RemoveAllAnimations(void); + + + /** + * Gets the number of animations currently stored in a group. + * + * @since 2.0 + * + * @return The total number of animations stored in a group + */ + virtual int GetAnimationCount(void) const; + + + /** + * Adds the specified animation to the animation group. + * + * @since 2.0 + * + * @return An error code + * @param[in] animTarget The animation target type @n + * The animation is applied to the specified animation target type. + * @param[in] animation An instance of AnimationBase + * @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. + */ + result AddAnimation(AnimationTargetType animTarget, const AnimationBase& animation); + + + /** + * Sets the specified @c animation to the animation group. + * + * @since 2.0 + * + * @return An error code + * @param[in] index The index at which the animation is set + * @param[in] animTarget The AnimationTargetType to which the animation is applied + * @param[in] animation An instance of AnimationBase + * @exception E_SUCCESS The method is successful. + * @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. + */ + result SetAnimationAt(int index, AnimationTargetType animTarget, const AnimationBase& animation); + + + /** + * Inserts the specified @c animation to the animation group. + * + * @since 2.0 + * + * @return An error code + * @param[in] index The index at which the animation is inserted + * @param[in] animTarget The AnimationTargetType to which the animation is applied + * @param[in] animation An instance of AnimationBase + * @exception E_SUCCESS The method is successful. + * @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. + */ + result InsertAnimationAt(int index, AnimationTargetType animTarget, const AnimationBase& animation); + + + /** + * Removes the animation from the animation group at the specified @c index. + * + * @since 2.0 + * + * @return An error code + * @param[in] index An index value in the animation group list + * @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. + */ + result RemoveAnimationAt(int index); + + + /** + * Gets the animation object at the specified @c index. + * + * @since 2.0 + * + * @return The animation object at the specified @c index value in the animation group, @n + * else @c null if the @c index is invalid + * @param[in] index The index value in the animation group list + */ + AnimationBase* GetAnimationAtN(int index) const; + + + /** + * Gets the target type of the animation at the specified @c index. + * + * @since 2.0 + * + * @return The target type of the animation at the specified @c index value in the animation group, @n + * else @c ANIMATION_TARGET_NONE if the specified @c index is invalid + * @param[in] index The index value in the animation group list + */ + AnimationTargetType GetAnimationTargetTypeAt(int index) const; + + + /** + * Gets the type information of this instance. + * + * @since 2.0 + * + * @return The type information of this instance + */ + virtual AnimationGroupType GetType(void) const; + + +protected: + + friend class _SequentialAnimationGroupImpl; + + + // + // This variable is for internal use only. Using this variable can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // This variable is for internal usage. + // + // @since 2.0 + // + class _SequentialAnimationGroupImpl* _pSequentialAnimationGroupImpl; +}; // SequentialAnimationGroup + + +}}} // Tizen::Ui::Animations + +#endif // _FUI_ANIM_SEQUENTIAL_ANIMATION_GROUP_H_ diff --git a/inc/FUiAnimTypes.h b/inc/FUiAnimTypes.h new file mode 100644 index 0000000..ec23a60 --- /dev/null +++ b/inc/FUiAnimTypes.h @@ -0,0 +1,188 @@ +// +// 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 FUiAnimTypes.h + * @brief This is the header file for the common data types used by UI animations. + * + * This header file contains the declarations of the common data types and constants used by UI animations. + */ + +#ifndef _FUI_ANIM_TYPES_H_ +#define _FUI_ANIM_TYPES_H_ + + +namespace Tizen { namespace Ui { namespace Animations +{ + + +/** @enum HitTestResult + * + * Defines the hit test result. + * + * @since 2.0 + * @see IVisualElementContentProvider::HitTest() + * @see VisualElement::OnHitTest() + */ +enum HitTestResult { + HIT_TEST_NOWHERE = 0, /**< VisualElement does not contain the specified point */ + HIT_TEST_MATCH = 1 /**< VisualElement contains the specified point */ +}; + + + + +/** + * @enum AnimationType + * + * Defines the information of the animation type. + * + * @since 2.0 + */ +enum AnimationType +{ + ANIMATION_TYPE_FLOAT_ANIMATION = 0, /**< The float animation */ + ANIMATION_TYPE_INTEGER_ANIMATION, /**< The integer animation */ + ANIMATION_TYPE_DIMENSION_ANIMATION, /**< The dimension animation */ + ANIMATION_TYPE_RECTANGLE_ANIMATION, /**< The rectangle animation */ + ANIMATION_TYPE_POINT_ANIMATION, /**< The point animation */ + ANIMATION_TYPE_ROTATE_ANIMATION, /**< The rotate animation */ +}; + + +/** + * @enum AnimationInterpolatorType + * + * Defines the interpolator type used in animations. + * + * @since 2.0 + */ +enum AnimationInterpolatorType +{ + ANIMATION_INTERPOLATOR_LINEAR = 0, /**< The linear interpolator */ + ANIMATION_INTERPOLATOR_DISCRETE, /**< The discrete interpolator*/ + ANIMATION_INTERPOLATOR_EASE_IN, /**< The easeIn interpolator*/ + ANIMATION_INTERPOLATOR_EASE_OUT, /**< The easeOut interpolator*/ + ANIMATION_INTERPOLATOR_EASE_IN_OUT, /**< The easeInOut interpolator*/ + ANIMATION_INTERPOLATOR_BEZIER, /**< The bezier interpolator @n + Sets the control points for this interpolator using AnimationBase::SetBezierControlPoints(). */ +}; + + +/** + * @enum AnimationTargetType + * + * Defines the object property for which the animations are to be applied. + * + * @since 2.0 + */ +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_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. +}; + + +/** + * @enum AnimatorStatus + * + * Defines the status of the animations attached to a control. + * + * @since 2.0 + */ +enum AnimatorStatus +{ + ANIMATOR_STATUS_PLAYING, /**< The animation being played */ + ANIMATOR_STATUS_STOPPED, /**< The animation stopped */ +}; + + +/** +* @enum AnimationGroupType +* +* Defines the animation group type information. +* +* @since 2.0 +*/ +enum AnimationGroupType +{ + ANIMATION_GROUP_TYPE_SEQUENTIAL = 0, /** The sequential animation group */ + ANIMATION_GROUP_TYPE_PARALLEL, /** The parallel animation group */ +}; + + +/** + * @enum AnimationTransactionStatus + * + * Defines the transaction status of the animation. + * @since 2.0 + */ +enum AnimationTransactionStatus +{ + ANIMATION_TRANSACTION_STATUS_PLAYING, /**< A transaction being played */ + ANIMATION_TRANSACTION_STATUS_STOPPED, /**< A transaction stopped */ +}; + + +/** + * @enum ControlAnimatorTriggerType + * + * Defines the trigger for animations attached to a control. + * + * @since 2.0 + */ +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 show state of the control */ +}; + + + +/** + * @enum FrameAnimatorFormTransitionAnimation + * + * Defines the platform predefined animation set for the animation events. + * + * @since 2.0 + */ +enum FrameAnimatorFormTransitionAnimation +{ + FRAME_ANIMATOR_FORM_TRANSITION_ANIMATION_TRANSLATE_LEFT = 0, /**< The transition animation using translate left animation */ + FRAME_ANIMATOR_FORM_TRANSITION_ANIMATION_TRANSLATE_RIGHT, /**< The transition animation using translate right animation */ + FRAME_ANIMATOR_FORM_TRANSITION_ANIMATION_FADE_IN_OUT, /**< The transition animation using alpha animation */ + FRAME_ANIMATOR_FORM_TRANSITION_ANIMATION_ZOOM_IN, /**< The transition animation using scale animation */ + FRAME_ANIMATOR_FORM_TRANSITION_ANIMATION_ZOOM_OUT, /**< The transition animation using scale animation */ + FRAME_ANIMATOR_FORM_TRANSITION_ANIMATION_DEPTH_IN, /**< The transition animation using scale and alpha animation */ + FRAME_ANIMATOR_FORM_TRANSITION_ANIMATION_DEPTH_OUT, /**< The transition animation using scale and alpha animation */ + FRAME_ANIMATOR_FORM_TRANSITION_ANIMATION_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. +}; + + +}}} // Tizen::Ui::Animations + +#endif // _FUI_ANIMATIONS_TYPES_H_ diff --git a/inc/FUiAnimVisualElement.h b/inc/FUiAnimVisualElement.h new file mode 100644 index 0000000..fded062 --- /dev/null +++ b/inc/FUiAnimVisualElement.h @@ -0,0 +1,1495 @@ +// +// 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 FUiAnimVisualElement.h + * @brief This is the header file for the %VisualElement class. + * + * This header file contains the declarations of the %VisualElement class. + */ + +#ifndef _FUI_ANIM_VISUAL_ELEMENT_H_ +#define _FUI_ANIM_VISUAL_ELEMENT_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace Tizen { namespace Graphics { +class Canvas; +}} + +namespace Tizen { namespace Ui { namespace Animations +{ + +class VisualElementSurface; +class _VisualElementImpl; + + +/** + * @class VisualElement + * @brief This class is a base class for all displayable objects on screen with animations. + * + * @since 2.0 + * + * The %VisualElement class is a base class for all displayable objects on screen with animations. + * 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 + * 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 the default behavior without inheritances. + * + * For more information on the class features, see Visual Elements. + * + */ + +class _OSP_EXPORT_ VisualElement + : public Tizen::Base::Object +{ +public: + /** + * The lowest drawing group, such as, background element. + * + * @since 2.0 + */ + static const int Z_ORDER_GROUP_LOWEST = -1000; + + + /** + * The level of the default group. + * + * @since 2.0 + */ + static const int Z_ORDER_GROUP_NORMAL = 0; + + + /** + * The highest drawing group, such as, top-most element. + * + * @since 2.0 + */ + static const int Z_ORDER_GROUP_HIGHEST = 1000; + + + /** + * @enum RenderOperation + * Defines the render operation for %VisualElement. @n + * The contents of %VisualElement will be composited on screen using this operation. + */ + enum RenderOperation + { + RENDER_OPERATION_BLEND = 0, /**< The contents will be displayed blended with underlying %VisualElements */ + RENDER_OPERATION_COPY /**< The contents will be displayed obscuring other underlying %VisualElements */ + }; + + + /** + * 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 + */ + VisualElement(void); + + /** + * Initializes this instance of %VisualElement. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result Construct(void); + + /** + * Deallocates this instance and all descendants of %VisualElement. + * + * @since 2.0 + * + * @remarks This method must be used to destroy this instance. @n + * 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. Destroys children recursively. + * 2. Calls %OnDestructing() callback. + * 3. Detaches from parent. + * 4. Removes all animations associated with this instance. + * 5. Deallocates this instance. + * @see Construct() + */ + void Destroy(void); + + /** + * Sets the animation provider which creates implicit animations. + * + * @since 2.0 + * + * @return An error code + * @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. + * + * @see GetAnimationProvider() + */ + result SetAnimationProvider(IVisualElementAnimationProvider* pProvider); + + /** + * Gets the assigned animation provider. + * + * @since 2.0 + * + * @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. + * @remarks The specific error code can be accessed using the GetLastResult() method. + * @see SetAnimationProvider() + */ + IVisualElementAnimationProvider* GetAnimationProvider(void) const; + + /** + * Sets the content provider which customizes information on contents. + * + * @since 2.0 + * + * @return An error code + * @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 GetContentProvider() + */ + result SetContentProvider(IVisualElementContentProvider* pProvider); + + /** + * Gets the assigned content provider. + * + * @since 2.0 + * + * @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. + * @remarks The specific error code can be accessed using the GetLastResult() method. + * @see SetContentProvider() + */ + IVisualElementContentProvider* GetContentProvider(void) const; + + /** + * Sets the %VisualElement event listener. + * + * @since 2.0 + * + * @return An error code + * @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 GetVisualElementEventListener() + */ + result SetVisualElementEventListener(IVisualElementEventListener* pListener); + + /** + * Gets the assigned %VisualElement event listener. + * + * @since 2.0 + * + * @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. + * @remarks The specific error code can be accessed using the GetLastResult() method. + * @see SetVisualElementEventListener() + */ + IVisualElementEventListener* GetVisualElementEventListener(void) const; + + + /** + * Overrides the OnConstructed() method to provide user-specific initialization code. + * + * @since 2.0 + * + * @remarks This method is called after the instance is initialized by the Construct() method successfully. + * @see Construct() + * @see Destroy() + * @see OnDestructing() + */ + virtual void OnConstructed(void); + + /** + * Overrides the OnDestructing() method to provide user-specific termination code. + * + * @since 2.0 + * + * @remarks This method is called before deallocating the %VisualElement instance by the Destroy() method. + * @see Destroy() + * @see Construct() + * @see OnConstructed() + */ + virtual void OnDestructing(void); + + /** + * Called by the GetChildAt() method to check whether this instance contains the @c point specified. @n + * If the Tizen::Ui::Animations::IVisualElementAnimationProvider interface is set to this instance, + * the Tizen::Ui::Animations::IVisualElementContentProvider::HitTest() callback will be called instead. + * + * @since 2.0 + * + * @return The hit test result + * @param[in] point The hit position in the coordinate space of this instance + * @remarks Hit test results must be one of the following values: @n + * - Tizen::Ui::Animations::HitTestResult::HIT_TEST_NOWHERE + * - Tizen::Ui::Animations::HitTestResult::HIT_TEST_MATCH + * @see GetChildAt() + * @see IVisualElementContentProvider::HitTest() + */ + virtual HitTestResult OnHitTest(const Tizen::Graphics::FloatPoint& point); + + /** + * Before the system calls OnDraw() method to fill the contents, the %OnPrepareDraw() method is called to give an opportunity to hook or prepare drawing. @n + * If the [IVisualElementContentProvider](@ref Tizen::Ui::Animations::IVisualElementContentProvider) interface is set to this instance, + * the [PrepareDraw()](@ref Tizen::Ui::Animations::IVisualElementContentProvider::PrepareDraw) callback will be called instead. + * + * @since 2.0 + * + * @return @c true if OnDraw() can be called, @n + * else @c false + * @see IVisualElementContentProvider::PrepareDraw() + */ + virtual bool OnPrepareDraw(void); + + /** + * Called to fill contents on the canvas provided by the system. @n + * If the [IVisualElementContentProvider](@ref Tizen::Ui::Animations::IVisualElementContentProvider) is set to this instance, + * the [DrawContent()](@ref Tizen::Ui::Animations::IVisualElementContentProvider::DrawContent) callback will be called instead. + * + * @since 2.0 + * + * @param[in] canvas The canvas to fill the contents of %VisualElement + * @see IVisualElementContentProvider::DrawContent() + */ + virtual void OnDraw(Tizen::Graphics::Canvas& canvas); + + /** + * Overrides the %OnCreateAnimationForProperty() method to provide user-specific implicit animation. @n + * If the [IVisualElementAnimationProvider](@ref Tizen::Ui::Animations::IVisualElementAnimationProvider) interface is set to this instance, + * the [CreateAnimationForProperty()](@ref Tizen::Ui::Animations::IVisualElementAnimationProvider::CreateAnimationForProperty) callback will be called instead. + * + * @since 2.0 + * + * @return The VisualElementAnimation instance for the specified property, @n + else @c null to disable implicit animation for the property + * @param[in] property The property to animate implicitly + * @remarks The returned [Animation](@ref Tizen::Ui::Animations::VisualElementAnimation) instance must be allocated on the heap if needed. @n + * If you do not need an implicit animation for the @c property at the time this method is called, return @c null. + * @see IVisualElementAnimationProvider::CreateAnimationForProperty() + */ + virtual VisualElementAnimation* OnCreateAnimationForProperty(const Tizen::Base::String& property); + + /** + * 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 value + * @param[in] property The property name + * @see SetProperty() + * @see GetProperty() + * @see OnSetPropertyRequested() + */ + virtual Tizen::Ui::Variant OnGetPropertyRequested(const Tizen::Base::String& property) const; + + /** + * Overrides the %OnSetPropertyRequested() method to provide user-specific properties or to change default behaviors of %VisualElement class. @n + * This method is called whenever SetProperty() is called. + * + * @since 2.0 + * + * @return An error code + * @param[in] property The property name + * @param[in] value The value of the property to set + * @see SetProperty() + * @see GetProperty() + * @see OnGetPropertyRequested() + */ + virtual result OnSetPropertyRequested(const Tizen::Base::String& property, const Tizen::Ui::Variant& value); + + /** + * Gets the parent of this instance. + * + * @since 2.0 + * + * @return The parent of the this instance + */ + VisualElement* GetParent(void) const; + + /** + * Gets a list of children of this instance. + * + * @since 2.0 + * + * @return The list of children of this instance + * @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. + * @remarks If an exception occurs, this method returns @c null. + */ + Tizen::Base::Collection::IList* GetChildrenN(void) const; + + /** + * Gets the count of children. + * + * @since 2.0 + * + * @return The count of children + */ + int GetChildrenCount(void) const; + + /** + * Checks whether this instance is a child or descendant of the specified one. + * + * @brief [Deprecated] + * @deprecated This method is deprecated. + * @since 2.0 + * + * @return @c true if this instance is a child or descendant of the specified one, @n + * else @c false + * @param[in] other An instance of %VisualElement to test relationship + */ + bool IsChildOf(const VisualElement& other) const; + + /** + * Checks whether an instance is a child or descendant of a specified one. + * + * @since 2.1 + * + * @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. + */ + bool IsChildOf(const VisualElement* pOther) const; + + /** + * Attaches a child to this instance. @n + * The %AttachChild() method attaches the specified @c child at the highest position in the Z order group of the @c child. + * If you need to change Z-Order group, you can change it using the SetZOrderGroup() method. + * + * @brief [Deprecated] + * @deprecated This method is deprecated. + * @since 2.0 + * + * @return An error code + * @param[in] child The %VisualElement instance to attach to this instance + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The input parameter is incorrect. Either of the following conditions has occurred: @n + * - 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 InsertChild() + * @see DetachChild() + * @see ChangeZOrder() + */ + result AttachChild(const VisualElement& child); + + /** + * Attaches a child to an instance. @n + * The %AttachChild() method attaches the specified @c pChild at the highest position in the Z order group of the @c pChild. + * Z-Order group can be changed using the SetZOrderGroup() method. + * + * @since 2.1 + * + * @return An error code + * @param[in] pChild A pointer to %VisualElement instance to attach to this instance + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The input parameter is incorrect. Either of the following conditions has occurred: @n + * - The specified @c pChild is not instantiated successfully. @n + * - 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 InsertChild() + * @see DetachChild() + * @see ChangeZOrder() + */ + result AttachChild(VisualElement* pChild); + + /** + * Inserts a child to this instance. @n + * If @c pReference is not @c null, the Z order group of @c child will be changed into that of @c pReference and @c child will be + * placed right above or below the @c pReference instance according to the @c above parameter. + * + * @brief [Deprecated] + * @deprecated This method is deprecated. + * @since 2.0 + * + * @return An error code + * @param[in] child The %VisualElement instance to attach to this instance + * @param[in] pReference A pointer to the %VisualElement instance that is referenced + * @param[in] above Specifies the position of @c child relative to the @c pReference + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The input parameter is incorrect. Either of the following conditions has occurred: @n + * - The specified @c child is not instantiated successfully. @n + * - The specified @c child is this instance. @n + * - The specified @c child and @c pReference are same. @n + * - The specified @c child is already an ancestor of this instance. @n + * - The parent of @c pReference is not this instance if @c pReference is not @c null. @n + * @remarks If @c above is @c true, the @c child will be attached above @c pReference in Z order, + * else it will be attached below the @c pReference %VisualElement. @n + * If @c pReference is @c null, the @c child will be attached at the highest position in the @c child's Z order group, + * else the child will be attached at the lowest position in the @c child's Z order group. + * @see SetZOrderGroup() + * @see AttachChild() + * @see DetachChild() + * @see ChangeZOrder() + */ + result InsertChild(const VisualElement& child, const VisualElement* pReference, bool above); + + /** + * Inserts a child to an instance. @n + * If @c pReference is not @c null, the Z order group of @c pChild will be changed into that of @c pReference and @c child will be + * placed right above or below the @c pReference instance according to the @c above parameter. + * + * @since 2.1 + * + * @return An error code + * @param[in] pChild A pointer to %VisualElement instance to insert + * @param[in] pReference A pointer to the %VisualElement instance to refer + * @param[in] above The position of @c pChild relative to @c pReference + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The input parameter is incorrect. Either of the following conditions has occurred: @n + * - The specified @c pChild is not instantiated successfully. @n + * - The specified @c pChild is this instance. @n + * - The specified @c pChild and @c pReference are same. @n + * - The specified @c pChild is already an ancestor of this instance. @n + * - The parent of @c pReference is not this instance if @c pReference is not @c null. @n + * - The specified @c pChild is @c null. + * @remarks If @c above is @c true, the @c pChild is attached above @c pReference in Z order, + * else it is attached below the @c pReference %VisualElement. @n + * If @c pReference is @c null, the @c pChild is attached at the highest position in the @c pChild's Z order group, + * else the child is attached at the lowest position in the @c pChild's Z order group. + * @see SetZOrderGroup() + * @see AttachChild() + * @see DetachChild() + * @see ChangeZOrder() + */ + result InsertChild(VisualElement* pChild, const VisualElement* pReference, bool above); + + /** + * Detaches a child from this instance. + * + * @brief [Deprecated] + * @deprecated This method is deprecated. + * @since 2.0 + * + * @return An error code + * @param[in] child The %VisualElement instance to detach from this instance + * @exception E_SUCCESS The method is successful. + * @exception E_OBJ_NOT_FOUND The specified @c child is not a child of this instance. + * @remarks This method detaches @c child from this instance. If you need to deallocate %VisualElement, call Destroy() method, not C++ delete. + * @see InsertChild() + * @see AttachChild() + */ + result DetachChild(const VisualElement& child); + + /** + * Detaches a child from an instance. + * + * @since 2.1 + * + * @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. + * @remarks This method detaches @c pChild from this instance. To deallocate %VisualElement, call Destroy() method, and not C++ delete. + * @see InsertChild() + * @see AttachChild() + */ + result DetachChild(VisualElement* pChild); + + /** + * Changes Z order of this instance. + * + * @since 2.0 + * + * @return An error code + * @param[in] pReference A pointer to the %VisualElement instance that is referenced + * @param[in] above Specifies the position of this instance relative to the @c pReference + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The input parameter is incorrect. Either of the following conditions has occurred: @n + * - This instance does not have a parent (not attached). @n + * - This instance and @c pReference do not have same parent if @c pReference is not @c null. @n + * - The specified @c pReference is this instance. @n + * @remarks If @c above is @c true, this instance will be attached above @c pReference in Z order, + * else it will be attached below the @c pReference %VisualElement. @n + * If @c pReference is @c null, this instance will be attached at the highest position in the Z order group of this instance, + * else the child will be attached at the lowest position in the Z order group of this instance. + * @see InsertChild() + * @see AttachChild() + * @see DetachChild() + */ + result ChangeZOrder(const VisualElement* pReference, bool above); + + /** + * Gets the child of the specified @c name. @n + * If there are multiple matches of the name, it returns the first match. + * + * @since 2.0 + * + * @return The %VisualElement instance having the specified @c name @n + * else @c null if there is not %VisualElement with the specified @c name + * @param[in] name The name of the %VisualElement + * @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. + * - If an exception occurs, this method returns @c null. + * @see GetName() + * @see SetName() + */ + VisualElement* GetChild(const Tizen::Base::String& name, bool searchDescendants) const; + + /** + * Gets the farthest (highest Z order) %VisualElement descendant including this instance that contains a specified @c point. @n + * The OnHitTest() method or [HitTest](@ref Tizen::Ui::Animations::IVisualElementContentProvider::HitTest) callback may be called + * for descendants of this instance including itself. + * + * @since 2.0 + * + * @return The %VisualElement that contains @c point, @n + * else @c null if @c point is completely outside of this instance + * @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. + * - 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 IsClipChildrenEnabled() + * @see SetClipChildrenEnabled() + */ + VisualElement* GetChildAt(const Tizen::Graphics::FloatPoint& point) const; + + /** + * Adds an animation without key name. + * + * @since 2.0 + * + * @return An error code + * @param[in] animation The animation instance + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The input parameter is incorrect. + * @exception E_INVALID_OPERATION This instance is not a model object. @n + * An animation can be added to the model instance only. + * @see RemoveAnimation() + * @see GetAnimationN() + */ + result AddAnimation(const VisualElementAnimation& animation); + + /** + * Adds an animation with key name. + * + * @since 2.0 + * + * @return An error code + * @param[in] keyName The name of the animation that is used to identify animations @n + * Empty @c keyName is allowed. + * @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 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() + * @see GetAnimationN() + */ + result AddAnimation(const Tizen::Base::String& keyName, const VisualElementAnimation& animation); + + /** + * Removes the animation with the specified @c keyName. + * + * @since 2.0 + * + * @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 the specified @c keyName does not exist. + * @see AddAnimation() + * @see GetAnimationN() + */ + result RemoveAnimation(const Tizen::Base::String& keyName); + + /** + * Gets the animation playing for the specified property. + * + * @since 2.0 + * + * @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 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() + * @see RemoveAnimation() + */ + VisualElementAnimation* GetAnimationN(const Tizen::Base::String& keyName) const; + + /** + * Removes all animations. + * + * @since 2.0 + * + * @see AddAnimation() + * @see RemoveAnimation() + */ + void RemoveAllAnimations(void); + + /** + * Adds a rectangle to update region of this instance. @n + * The update region represents the portion of the %VisualElement's area that must be redrawn by the OnDraw() method. + * + * @since 2.0 + * + * @return An error code + * @param[in] pRectangle The pointer to the rectangular region that contains the coordinates of the rectangle to add to the update region @n + * If @c pRectangle is @c null, entire area is added to the update region. + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_OPERATION The contents of this instance is set by the SetSurface() method. + * @see SetSurface() + */ + result InvalidateRectangle(const Tizen::Graphics::FloatRectangle* pRectangle); + + /** + * Gets the smallest rectangle that completely encloses the update region of this instance. @n + * Applications can use the update region in the OnDraw() method to minimize the redrawing area to improve performance. + * The %GetUpdateRectangle() method returns an empty rectangle if it is not called inside OnDraw() method. + * + * @since 2.0 + * + * @return The rectangle to update + * @see InvalidateRectangle() + */ + Tizen::Graphics::FloatRectangle GetUpdateRectangle(void) const; + + /** + * Updates the content area of all the descendants including this instance. + * The %Draw() method will call OnDraw() or DrawContent() method only if there are regions invalidated by InvalidateRectangle(). + * The platform will call this method later automatically if applications do not call explicitly. + * + * @since 2.0 + * + * @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. + * @exception E_SYSTEM A system error has occurred. + * @see IVisualElementContentProvider + */ + result Draw(void); + + /** + * Marks the entire area of this instance to be flushed. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * + * @see Flush() + */ + result SetFlushNeeded(void); + + /** + * Creates and returns a graphics canvas whose bounds, position, and size are equal to those of this instance. + * + * @since 2.0 + * + * @return The graphic canvas of the %VisualElement, @n + * else @c null if an exception occurs + * @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 + * - 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) + */ + Tizen::Graphics::Canvas* GetCanvasN(void) const; + + /** + * Creates and returns a graphic canvas of the specified area. + * + * @since 2.0 + * + * @return The graphic canvas of the %VisualElement, @n + * else @c null if an exception occurs + * @param[in] bounds The position relative to the top-left corner of the %VisualElement and size + * @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. + * @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 + * - The specific error code can be accessed using the GetLastResult() method. + * @see GetCanvasN() + * @see GetCanvasN(const Tizen::Graphics::FloatRectangle& bounds) + */ + Tizen::Graphics::Canvas* GetCanvasN(const Tizen::Graphics::Rectangle& bounds) const; + + /** + * Creates and returns a graphic canvas of the specified area. + * + * @since 2.1 + * + * @return The graphic canvas of %VisualElement, @n + * else @c null if an exception occurs + * @param[in] bounds The position relative to the top-left corner of %VisualElement and size + * @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. + * @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. + * - The specific error code can be accessed using the GetLastResult() method. + * @see GetCanvasN() + * @see GetCanvasN(const Tizen::Graphics::Rectangle& bounds) + */ + Tizen::Graphics::Canvas* GetCanvasN(const Tizen::Graphics::FloatRectangle& bounds) const; + + /** + * Gets the name of this instance. + * + * @since 2.0 + * + * @return The name of this instance + */ + Tizen::Base::String GetName(void) const; + + /** + * Sets the name of this instance. + * + * @since 2.0 + * + * @param[in] name The name of the %VisualElement instance @n + * Empty or duplicated name with other instances are also allowed. + */ + void SetName(const Tizen::Base::String& name); + + /** + * Gets the value of the %VisualElement's property. + * + * @since 2.0 + * + * @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. + * - Additional exceptions can occur according to the behavior of subclasses. + * @see SetProperty() + * @see OnGetPropertyRequested() + */ + Variant GetProperty(const Tizen::Base::String& property) const; + + /** + * Sets the value of the %VisualElement's property. + * + * @since 2.0 + * + * @return An error code + * @param[in] property The %VisualElement's property + * @param[in] value The value of the %VisualElement's property to set + * @exception E_SUCCESS The method is successful. + * @exception E_KEY_NOT_FOUND The specified @c property is not found. + * @remarks Additional exceptions can occur according to the behavior of subclasses. + * @see GetProperty() + * @see OnSetPropertyRequested() + */ + result SetProperty(const Tizen::Base::String& property, const Variant& value); + + /** + * Sets the Z order group of this instance. + * + * @since 2.0 + * + * @return An error code + * @param[in] zOrderGroup The value of Z order which must be between @c Z_ORDER_GROUP_LOWEST and @c Z_ORDER_GROUP_HIGHEST @n + * The default value is @c Z_ORDER_GROUP_NORMAL. + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE The @c zOrderGroup is not between @c Z_ORDER_GROUP_LOWEST and @c Z_ORDER_GROUP_HIGHEST. + * @remarks You can choose the @c zOrderGroup value as follows: @n + * - Tizen::Ui::Animations::Z_ORDER_GROUP_LOWEST @n + * - Tizen::Ui::Animations::Z_ORDER_GROUP_NORMAL @n + * - Tizen::Ui::Animations::Z_ORDER_GROUP_HIGHEST @n + * Or you can specify an integer value between @c ZORDER_GROUP_LOWEST and @c ZORDER_GROUP_HIGHEST. + * @see GetZOrderGroup() + */ + result SetZOrderGroup(int zOrderGroup); + + /** + * Gets the Z order group of this instance. + * + * @since 2.0 + * + * @return The Z order group of this instance + * @see SetZOrderGroup() + */ + int GetZOrderGroup(void) const; + + /** + * Checks whether the redraw-on-resize feature is enabled. + * + * @since 2.0 + * + * @return @c true if the redraw-on-resize feature is enabled, @n + * else @c false + * @remarks The entire content area will be added to the update region when bounds are changed if redraw-on-resize is enabled. @n + * Otherwise, current contents will be scaled for the new bounds of this instance without redrawing. + * @see SetRedrawOnResizeEnabled() + */ + bool IsRedrawOnResizeEnabled(void) const; + + /** + * Enables or disables the redraw-on-resize feature. + * + * @since 2.0 + * + * @param[in] enable Set to @c true if invalidation is needed whenever resized, @n + * else @c false + * @see IsRedrawOnResizeEnabled() + */ + void SetRedrawOnResizeEnabled(bool enable); + + /** + * Gets the position and the size of this instance. + * + * @since 2.0 + * + * @return An instance of the Tizen::Graphics::FloatRectangle that represents the position of top-left corner, @n + * the width, and the height of this instance. @n It has relative coordinate space to the parent. + * @see SetBounds() + */ + Tizen::Graphics::FloatRectangle GetBounds(void) const; + + /** + * Sets the position and the size of this instance. + * + * @since 2.0 + * + * @return An error code + * @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. + * @see GetBounds() + * @see IsRedrawOnResizeEnabled() + * @see SetRedrawOnResizeEnabled() + */ + result SetBounds(const Tizen::Graphics::FloatRectangle& bounds); + + /** + * Gets the position on the Z-axis. + * + * @since 2.0 + * + * @return The position on the Z-axis + * @see SetZPosition() + */ + float GetZPosition(void) const; + + /** + * Sets the position on the Z-axis. + * + * @since 2.0 + * + * @param[in] zPosition The position on the Z-axis + * @see GetZPosition() + */ + void SetZPosition(float zPosition); + + /** + * Checks whether this instance is visible or not. @n + * Even if the show state is @c true, this instance can be invisible when show state of one of the ancestors is @c false. + * + * @since 2.0 + * + * @return @c true if this instance is visible, @n + * else @c false + * @see GetShowState() + * @see SetShowState() + */ + bool IsVisible(void) const; + + /** + * Gets the show state of this instance. + * + * @since 2.0 + * + * @return The show state of the %VisualElement instance, @n + * else @c false + * @remarks Even if the show state is @c true, the %VisualElement is invisible if it is not attached to a parent. + * @see SetShowState() + * @see IsVisible() + */ + bool GetShowState(void) const; + + /** + * Sets the show state of this instance. + * + * @since 2.0 + * + * @param[in] show Set to @c true if this instance needs to show, @n + * else @c false + * @see GetShowState() + * @see IsVisible() + */ + void SetShowState(bool show); + + /** + * Gets the opacity of this instance. + * + * @since 2.0 + * + * @return The opacity of this instance + * @see SetOpacity() + */ + float GetOpacity(void) const; + + /** + * Sets the opacity of this instance. + * + * @since 2.0 + * + * @param[in] opacity The new opacity which must be within the range [0.0, 1.0] + * @remarks The changing opacity affects all the descendants of this instance. + * @see GetOpacity() + */ + void SetOpacity(float opacity); + + /** + * Enables or disables the implicit animation. @n + * If enabled, implicit animations may be created whenever animatable properties of this instance change. + * + * @since 2.0 + * + * @param[in] enable Set to @c true to enable the implicit animation, @n + * else @c false + * @remarks The implicit animation is enabled by default. + * @see IsImplicitAnimationEnabled() + */ + void SetImplicitAnimationEnabled(bool enable); + + /** + * Checks whether the implicit animation is enabled. + * + * @since 2.0 + * + * @return @c true if the implicit animation is enabled, @n + * else @c false + * @see SetImplicitAnimationEnabled() + */ + bool IsImplicitAnimationEnabled(void) const; + + /** + * Gets the transform matrix of this instance. + * + * @since 2.0 + * + * @return The transform matrix of this instance + * @see SetTransformMatrix() + */ + Tizen::Graphics::FloatMatrix4 GetTransformMatrix(void) const; + + /** + * Sets the transform matrix of this instance. + * + * @since 2.0 + * + * @return An error code + * @param[in] transform The transform matrix + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The input parameter is incorrect. + * @see GetTransformMatrix() + */ + result SetTransformMatrix(const Tizen::Graphics::FloatMatrix4& transform); + + /** + * Gets the transform matrix applied to each child. + * + * @since 2.0 + * + * @return The transform matrix applied to each child + * @remarks The transform matrix for children is typically used for the projection matrix to layout children in 3D space. + * @see SetChildrenTransformMatrix() + */ + Tizen::Graphics::FloatMatrix4 GetChildrenTransformMatrix(void) const; + + /** + * Sets the transform matrix applied to each child. + * + * @since 2.0 + * + * @return An error code + * @param[in] transform The transform matrix + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The input parameter is incorrect. + * @see GetChildrenTransformMatrix() + */ + result SetChildrenTransformMatrix(const Tizen::Graphics::FloatMatrix4& transform); + + + /** + * Gets the anchor point for this instance's transform matrix in uniform coordinate space + * (0.0 and 1.0 mean left/top and right/bottom of the bounds, respectively). + * + * @since 2.0 + * + * @return The anchor point of this instance + * @see SetAnchor() + */ + Tizen::Graphics::FloatPoint GetAnchor(void) const; + + /** + * Sets the anchor point of this instance's transform matrix in uniform coordinate space + * (0.0 and 1.0 mean left/top and right/bottom of the bounds, respectively). + * + * @since 2.0 + * + * @param[in] anchor The anchor point in uniform coordinate space + * @see GetAnchor() + */ + void SetAnchor(const Tizen::Graphics::FloatPoint& anchor); + + /** + * Gets the Z component of this instance's anchor point for transform matrix. + * + * @since 2.0 + * + * @return The Z component of the anchor point + * @see SetAnchorZ() + */ + float GetAnchorZ(void) const; + + /** + * Sets the Z component of this instance's anchor point for transform matrix. + * + * @since 2.0 + * + * @param[in] anchorZ The Z component of anchor point + * @see GetAnchorZ() + */ + void SetAnchorZ(float anchorZ); + + /** + * Gets the custom data of this instance. + * + * @since 2.0 + * + * @return The user data associated with this instance + * @see SetUserData() + */ + void* GetUserData(void) const; + + /** + * Sets the custom data of this instance. + * + * @since 2.0 + * + * @param[in] pUserData The user data associated with this instance + * @see GetUserData() + */ + void SetUserData(void* pUserData); + + /** + * Sets the contents of this instance with the specified VisualElementSurface. @n + * The contents of the @c pSurface is not copied by the %SetSurface() method, but shared with this instance. + * + * @since 2.0 + * + * @return An error code + * @param[in] pSurface The pointer to VisualElementSurface @n + * If @c pSurface is @c null, surface will be created internally by system. + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_OPERATION This instance does not allow VisualElementSurface for contents. + * @remarks If applications modify the contents of @c pSurface, the modifications will be applied to all + * the %VisualElements which share same VisualElementSurface. But in this case, applications need to call + * the SetFlushNeeded() method for those %VisualElements because the modifications of the @c pSurface will not be applied on the screen automatically. + * @see GetSurfaceN() + */ + result SetSurface(VisualElementSurface* pSurface); + + /** + * Gets the VisualElementSurface this instance uses for its contents. + * + * @since 2.0 + * + * @return A pointer to VisualElementSurface + * @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. + * @remarks If an exception occurs, this method returns @c null. + * @see SetSurface() + */ + VisualElementSurface* GetSurfaceN(void) const; + + /** + * Sets the render operation of this instance. + * + * @since 2.0 + * + * @return An error code + * @param[in] renderOperation The new rendering operation + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified @c renderOperation is out of range. + * @see GetRenderOperation() + */ + result SetRenderOperation(RenderOperation renderOperation); + + /** + * Gets the render operation of this instance. + * + * @since 2.0 + * + * @return The render operation of this instance + * @see SetRenderOperation() + */ + RenderOperation GetRenderOperation(void) const; + + /** + * Checks whether all the descendants are clipped to the bounds of this instance. + * + * @since 2.0 + * + * @return @c true if this instance clips all the descendants, @n + * else @c false + * @see SetClipChildrenEnabled() + */ + bool IsClipChildrenEnabled(void) const; + + /** + * Enables or disables clipping of all the descendants. + * + * @since 2.0 + * + * @param[in] clipChildren Set to @c true if all the descendants are needed to clip to the bounds of this instance, @n + * else @c false + * @see IsClipChildrenEnabled() + */ + void SetClipChildrenEnabled(bool clipChildren); + + /** + * Converts the specified @c point in @c pFromVisualElement coordinate space to this instance's coordinate space. @n + * The coordinate is converted by projecting it on the root coordinate space. + * + * @since 2.0 + * + * @return An error code + * @param[in,out] point The point to convert + * @param[in] pFromVisualElement The %VisualElement instance with @c point 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 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() + */ + result ConvertCoordinates(Tizen::Graphics::FloatPoint& point, const VisualElement* pFromVisualElement) const; + + /** + * Converts the specified @c rectangle in @c pFromVisualElement coordinate space to this instance's coordinate space. @n + * The coordinate is converted by projecting it on the root coordinate space. + * + * @since 2.0 + * + * @return An error code + * @param[in,out] rectangle The rectangle to convert + * @param[in] pFromVisualElement The %VisualElement instance with @c rectangle 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 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() + */ + result ConvertCoordinates(Tizen::Graphics::FloatRectangle& rectangle, const VisualElement* pFromVisualElement) const; + + /** + * Transforms a point in @c pOriginVisualElement coordinate space into a specified vector in calling instance's coordinate space. + * + * @since 2.1 + * + * @return The transformed vector + * @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 + * - This instance and @c pOriginVisualElement must share a common ancestor. + * - The specific error code can be accessed using the GetLastResult() method. + */ + Tizen::Graphics::FloatPoint3 TransformVectorFromOrigin(const Tizen::Graphics::FloatPoint3& originPoint, const VisualElement* pOriginVisualElement) const; + + /** + * Sets the sub-rectangle of contents which this instance must display. + * + * @since 2.0 + * + * @return An error code + * @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 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() + */ + result SetContentBounds(const Tizen::Graphics::FloatRectangle& contentBounds); + + /** + * Gets the sub-rectangle of contents which this instance must display. + * + * @since 2.0 + * + * @return The sub-rectangle of contents to be displayed in uniform coordinate space + * @remarks Default @c contentBounds is FloatRectangle(0.0, 0.0, 1.0, 1.0). + * @see SetContentBounds() + */ + Tizen::Graphics::FloatRectangle GetContentBounds(void) const; + + /** + * Acquires a %VisualElement instance for display. + * + * @since 2.0 + * + * @return The %VisualElement instance for display(readonly) + * @remarks If this instance is a presentation object, this method returns itself. + * @see ReleasePresentationInstance() + */ + const VisualElement* AcquirePresentationInstance(void); + + /** + * Releases a %VisualElement instance for display. + * + * @since 2.0 + * + * @remarks This method should be called only after AcquirePresentationInstance() call. + * @see AcquirePresentationInstance() + */ + void ReleasePresentationInstance(void); + + /** + * Acquires a %VisualElement instance for model. + * + * @since 2.0 + * + * @return The %VisualElement instance for model(readonly) + * @remarks If this instance is a model object, this method returns itself. + * @see ReleaseModelInstance() + */ + + const VisualElement* AcquireModelInstance(void); + + /** + * Releases a %VisualElement instance for model. + * + * @since 2.0 + * + * @remarks This method should be called only after AcquireModelInstance() call. + */ + void ReleaseModelInstance(void); + + /** + * Flushes %VisualElements on screen. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @remarks Because this method may degrade the performance of system, applications must use this method only when really needed. + * @see SetFlushNeeded() + */ + static result Flush(void); + + +protected: + /** + * This is copy constructor for the %VisualElement class. + * + * @since 2.0 + * + * @param[in] rhs An instance of %VisualElement + * @see CloneN() + */ + VisualElement(const VisualElement& rhs); + + /** + * This is the destructor for this class. + * + * @since 2.0 + * + * @remarks The delete operator cannot be used to deallocate the %VisualElement instance. + * @see Destroy() + */ + virtual ~VisualElement(void); + + /** + * Creates and returns a polymorphic copy of this %VisualElement instance for the presentation. @n + * All descendants of %VisualElement must implement the %CloneN() method and the copy constructor appropriately. @n + * When the %VisualElement instance is created, the framework make a %VisualElement for the presentation with this method. + * + * @since 2.0 + * + * @return The clone of this instance + */ + virtual VisualElement* CloneN(void) const; + + + // + // 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. + // + // @since 2.0 + // + virtual void VisualElement_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. + // + // @since 2.0 + // + virtual void VisualElement_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. + // + // @since 2.0 + // + virtual void VisualElement_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. + // + // @since 2.0 + // + virtual void VisualElement_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. + // + // @since 2.0 + // + virtual void VisualElement_Reserved5(void) {} + + +private: + + // + // The implementation of this assignment constructor is intentionally blank to prohibit assignment of objects. + // + // @since 2.0 + // + VisualElement& operator =(const VisualElement& rhs); + + +protected: + _VisualElementImpl* _pVisualElementImpl; + + friend class _VisualElementImpl; +}; // VisualElement + + +}}} // Tizen::Ui::Animations + +#endif //_FUIANIMVISUALELEMENT_H_ diff --git a/inc/FUiAnimVisualElementAnimation.h b/inc/FUiAnimVisualElementAnimation.h new file mode 100644 index 0000000..51aec57 --- /dev/null +++ b/inc/FUiAnimVisualElementAnimation.h @@ -0,0 +1,470 @@ +// +// 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 FUiAnimVisualElementAnimation.h + * @brief This is the header file for the %VisualElementAnimation class. + * + * This header file contains the declarations of the %VisualElementAnimation class. + */ + +#ifndef _FUI_ANIM_VISUAL_ELEMENT_ANIMATION_H_ +#define _FUI_ANIM_VISUAL_ELEMENT_ANIMATION_H_ + +#include + +namespace Tizen { namespace Ui { namespace Animations +{ + + +class IVisualElementAnimationStatusEventListener; +class IVisualElementAnimationTimingFunction; +class IVisualElementAnimationValueInterpolator; +class _VisualElementAnimationImpl; + +/** + * @class VisualElementAnimation + * @brief This class is the base class for all the %VisualElementAnimation classes. + * + * @since 2.0 + * + * The %VisualElementAnimation class defines the basic animation properties, such as the interpolator to be used, + * the duration of the animation in milliseconds, the delay before the animation is started in milliseconds, and the repeat count. + * + * For more information on the class features, see Visual Element Animations. + * + */ +class _OSP_EXPORT_ VisualElementAnimation + : public Tizen::Base::Object +{ +public: + + /** + * This is the default constructor for this class. + * + * @since 2.0 + * + * @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. + */ + VisualElementAnimation(void); + + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~VisualElementAnimation(void); + + + /** + * This is the copy constructor for the %VisualElementAnimation class. + * + * @since 2.0 + * + * @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. + */ + VisualElementAnimation(const VisualElementAnimation& animation); + + + /** + * Assigns the value of the specified instance to the current instance of %VisualElementAnimation. + * + * @since 2.0 + * + * @param[in] rhs An instance of %VisualElementAnimation + */ + VisualElementAnimation& operator =(const VisualElementAnimation& rhs); + + + /** + * Checks whether the specified instance and current instance of %VisualElementAnimation have equal animation values. + * + * @since 2.0 + * + * @return @c true if the animation of the two instances of %VisualElementAnimation are equal, @n + * else @c false + * @param[in] rhs An instance of %VisualElementAnimation + */ + bool operator ==(const VisualElementAnimation& rhs) const; + + + /** + * Checks whether the specified instance and current instance of %VisualElementAnimation have different animation values. + * + * @since 2.0 + * + * @return @c true if the values of the animations of the two instances of %VisualElementAnimation are not equal, @n + * else @c false + * @param[in] rhs An instance of %VisualElementAnimation + */ + bool operator !=(const VisualElementAnimation& rhs) const; + + + /** + * Checks whether the value of the current instance of %VisualElementAnimation equals the value of the specified instance. + * + * @since 2.0 + * + * @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. + */ + virtual bool Equals(const Tizen::Base::Object& obj) const; + + + /** + * Gets the hash value of the current instance. + * + * @since 2.0 + * + * @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 a copied instance of the class. + * + * @since 2.0 + * + * @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. + */ + virtual VisualElementAnimation* CloneN(void) const; + + + /** + * Sets an IVisualElementAnimationStatusEventListener listener instance to listen to the events of a particular animation. @n + * The added listener, %IVisualElementAnimationStatusEventListener, can listen to events on the specified event dispatcher's context when they are fired. + * + * @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 the IVisualElementAnimationStatusEventListener::OnVisualElementAnimationStarted() method and + * directly calls the IVisualElementAnimationStatusEventListener::OnVisualElementAnimationFinished() method. + */ + void SetVisualElementAnimationStatusEventListener(IVisualElementAnimationStatusEventListener* pListener); + + + /** + * Gets the IVisualElementAnimationStatusEventListener listener. + * + * @since 2.0 + * + * @return A pointer to the IVisualElementAnimationStatusEventListener instance @n + * If listener has not been set, @c null is returned. + * @see SetVisualElementAnimationStatusEventListener() + */ + IVisualElementAnimationStatusEventListener* GetVisualElementAnimationStatusEventListener(void) const; + + + /** + * Sets the timing function to calculate the animation pace. + * + * @since 2.0 + * + * @param[in] pTimingFunction The timing function instance to set + * @remarks If @c pTimingFunction is @c null, the default timing function is used which is pre-defined by the UI framework. + * @see GetTimingFunction() + */ + void SetTimingFunction(const IVisualElementAnimationTimingFunction* pTimingFunction); + + + /** + * Gets the timing function. + * + * @since 2.0 + * + * @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; + + + /** + * Sets the interpolator to calculate the current value for the specific time during the animation. + * + * @since 2.0 + * + * @param[in] pInterpolator The interpolator instance to set + * @remarks If @c pInterpolator is @c null, the default interpolator is used which is pre-defined by the UI framework. + * @see GetValueInterpolator() + */ + void SetValueInterpolator(const IVisualElementAnimationValueInterpolator* pInterpolator); + + + /** + * Gets the value interpolator. + * + * @since 2.0 + * + * @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; + + + /** + * Sets the duration of the animation. + * + * @since 2.0 + * + * @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. + * @see GetDuration() + */ + result SetDuration(long milliseconds); + + + /** + * Gets the duration of the animation in milliseconds. + * + * @since 2.0 + * + * @return The duration value of the animation + * @see SetDuration() + */ + long GetDuration(void) const; + + + /** + * Sets the offset value of the animation. @n + * 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 + * @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 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); + + + /** + * Gets the offset value in milliseconds after the animation starts. + * + * @since 2.0 + * + * @return The offset value of the animation in milliseconds @n + * The default value of the offset is @c 0. + * @see SetOffset() + */ + long GetOffset(void) const; + + + /** + * Sets the delay for the animation. @n + * The animation starts after the duration of delay has passed. + * + * @since 2.0 + * + * @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_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() + */ + result SetDelay(long milliseconds); + + + /** + * Gets the delay value in milliseconds before the animation starts. + * + * @since 2.0 + * + * @return The delay value in milliseconds @n + * The default value of the delay is @c 0. + * @see SetDelay() + */ + long GetDelay(void) const; + + + /** + * Sets the repeat count for the animation. @n + * Repeats an animation for the specified number of times. + * + * @since 2.0 + * + * @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. + * @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() + */ + result SetRepeatCount(long count); + + + /** + * Gets the repeat count value of the animation. + * + * @since 2.0 + * + * @return The repeat count value of the animation @n + * The default value of the repeat count is @c 1. + * @see SetRepeatCount() + */ + long GetRepeatCount(void) const; + + + /** + * 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 @c autoReverse property of the animation, @n + * else @c false + * @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. @n + * Note that if @c autoReverse is set to @c true, one forward animation play and + * one backward animation play is one iteration. + * @see IsAutoReverseEnabled() + */ + void SetAutoReverseEnabled(bool autoReverse); + + + /** + * Checks whether auto reverse is enabled. + * + * @since 2.0 + * + * @return @c true if auto reverse is enabled, @n + * else @c false @n + * The default auto reverse value is @c false. + * @see SetAutoReverseEnabled() + */ + bool IsAutoReverseEnabled(void) const; + + + /** + * Sets the scale ratio of the animation. + * + * @since 2.0 + * + * @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. + * @remarks If @c scaleRatio is @c 0.5, then the animation speed is 2 times faster. + * @see GetScaleRatio() + */ + result SetScaleRatio(float scaleRatio); + + + /** + * Gets the scale ratio value of the animation. + * + * @since 2.0 + * + * @return The scale ratio value of the animation @n + * The default value of scale ratio is @c 1.0f. + * @see SetScaleRatio() + */ + float GetScaleRatio(void) const; + + + /** + * Sets the custom data of the animation. + * + * @since 2.0 + * + * @param[in] pUserData The user data associated with this instance + * @see GetUserData() + */ + void SetUserData(void* pUserData); + + + /** + * Gets the custom data of the animation. + * + * @since 2.0 + * + * @return The user data associated with this instance + * @see SetUserData() + */ + void* GetUserData(void) const; + + + /** + * Gets the predefined timing function by name. + * + * @since 2.0 + * + * @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 specific error code can be accessed using the GetLastResult() method. + */ + static const IVisualElementAnimationTimingFunction* GetTimingFunctionByName(const Tizen::Base::String& name); + + +protected: + + // + // This variable is for internal use only. Using this variable can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // This is the constructor for derived classes. + // + // @since 2.0 + // + VisualElementAnimation(_VisualElementAnimationImpl* pImpl); + + + // + // This variable is for internal use only. Using this variable can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // @since 2.0 + // + _VisualElementAnimationImpl* _pAnimationImpl; + + friend class _VisualElementAnimationImpl; +}; // VisualElementAnimation + + +}}} // Tizen::Ui::Animations + +#endif // _FUI_ANIM_VISUAL_ELEMENT_ANIMATION_H_ diff --git a/inc/FUiAnimVisualElementAnimationGroup.h b/inc/FUiAnimVisualElementAnimationGroup.h new file mode 100644 index 0000000..3d4d06f --- /dev/null +++ b/inc/FUiAnimVisualElementAnimationGroup.h @@ -0,0 +1,241 @@ +// +// 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 FUiAnimVisualElementAnimationGroup.h + * @brief This is the header file for the %VisualElementAnimationGroup class. + * + * This header file contains the declarations of the %VisualElementAnimationGroup class. + */ + +#ifndef _FUI_ANIM_VISUAL_ELEMENT_ANIMATION_GROUP_H_ +#define _FUI_ANIM_VISUAL_ELEMENT_ANIMATION_GROUP_H_ + +#include + + +namespace Tizen { namespace Ui { namespace Animations +{ + +class _VisualElementAnimationGroupImpl; + +/** + * @class VisualElementAnimationGroup + * @brief This class is used to group a set of animations together. + * + * @since 2.0 + * + * The %VisualElementAnimationGroup class is used to group a set of animations together. + * + * For more information on the class features, see Groups. + */ +class _OSP_EXPORT_ VisualElementAnimationGroup + : public VisualElementAnimation +{ +public: + + /** + * This is the default constructor for this class. + * + * @since 2.0 + * + * @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. + */ + VisualElementAnimationGroup(void); + + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~VisualElementAnimationGroup(void); + + + /** + * This is the copy constructor for the %VisualElementAnimationGroup class. + * + * @since 2.0 + * + * @param[in] animationGroup 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. + */ + VisualElementAnimationGroup(const VisualElementAnimationGroup& animationGroup); + + + /** + * Assigns the value of the specified instance to the current instance of %VisualElementAnimationGroup. + * + * @since 2.0 + * + * @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. + */ + VisualElementAnimationGroup& operator =(const VisualElementAnimationGroup& rhs); + + + /** + * Checks whether the specified instance and current instance of %VisualElementAnimationGroup have equal animation values. + * + * @since 2.0 + * + * @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; + + + /** + * Checks whether the specified instance and current instance of %VisualElementAnimationGroup have different animation values. + * + * @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 + * @param[in] rhs An instance of %VisualElementAnimationGroup + */ + bool operator !=(const VisualElementAnimationGroup& rhs) const; + + + /** + * Checks whether the value of the current instance of %VisualElementAnimationGroup equals the value of the specified instance. + * + * @since 2.0 + * + * @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. + */ + virtual bool Equals(const Tizen::Base::Object& obj) const; + + + /** + * Gets the hash value of the current instance. + * + * @since 2.0 + * + * @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 a copied instance of the class. + * + * @since 2.0 + * + * @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. + */ + virtual VisualElementAnimation* CloneN(void) const; + + + /** + * Gets the number of animations currently stored in a group. + * + * @since 2.0 + * + * @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; + + + /** + * Adds the specified @c animation to the animation group without key name. + * + * @since 2.0 + * + * @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() + */ + result AddAnimation(const VisualElementAnimation& animation); + + + /** + * Removes an animation from the group. + * + * @since 2.0 + * + * @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() + */ + result RemoveAnimationAt(int index); + + + /** + * Removes all the animations from the animation group. + * + * @since 2.0 + * + * @see AddAnimation() + * @see RemoveAnimationAt() + */ + void RemoveAllAnimations(void); + + + /** + * Gets an animation from the group. + * + * @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. + * @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. + * - 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() + */ + VisualElementAnimation* GetAnimationAtN(int index) const; + + +protected: + + friend class _VisualElementAnimationGroupImpl; +}; // VisualElementAnimationGroup + + +}}} // Tizen::Ui::Animations + +#endif // _FUI_ANIM_VISUAL_ELEMENT_ANIMATION_GROUP_H_ diff --git a/inc/FUiAnimVisualElementAnimationProvider.h b/inc/FUiAnimVisualElementAnimationProvider.h new file mode 100644 index 0000000..7e1ef27 --- /dev/null +++ b/inc/FUiAnimVisualElementAnimationProvider.h @@ -0,0 +1,103 @@ +// +// 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 FUiAnimVisualElementAnimationProvider.h + * @brief This is the header file for the %VisualElementAnimationProvider class. + * + * This header file contains the declarations of the %VisualElementAnimationProvider class. + */ + +#ifndef _FUI_ANIM_VISUAL_ELEMENT_ANIMATION_PROVIDER_H_ +#define _FUI_ANIM_VISUAL_ELEMENT_ANIMATION_PROVIDER_H_ + +#include +#include + +namespace Tizen { namespace Ui { namespace Animations +{ + + +/** +* @class VisualElementAnimationProvider +* @brief This class implements the provider for the events generated by %VisualElement. +* +* @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 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. +*/ + +class _OSP_EXPORT_ VisualElementAnimationProvider + : virtual public IVisualElementAnimationProvider +{ +public: + + /** + * This is the default constructor for this class. + * + * @since 2.0 + */ + VisualElementAnimationProvider(void); + + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~VisualElementAnimationProvider(void); + + +public: + /** + * Invoked for creating an animation when the property is changed. + * + * @since 2.0 + * + * @return A VisualElementAnimation instance for @c property + * @param[in] target The VisualElement instance that needs implicit animation + * @param[in] property The property of this instance for which animation is required + * @remarks If implicit animation for @c property is not required, return @c null. + */ + virtual VisualElementAnimation* CreateAnimationForProperty(VisualElement& target, const Tizen::Base::String& property); + + +private: + + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + // @since 2.0 + // + VisualElementAnimationProvider(const VisualElementAnimationProvider& value); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + // @since 2.0 + // + VisualElementAnimationProvider& operator =(const VisualElementAnimationProvider& value); +}; // VisualElementAnimationProvider + + +}}} // Tizen::Ui::Animations + +#endif //_FUI_ANIM_VISUAL_ELEMENT_ANIMATION_PROVIDER_H_ + diff --git a/inc/FUiAnimVisualElementContentProvider.h b/inc/FUiAnimVisualElementContentProvider.h new file mode 100644 index 0000000..f159a98 --- /dev/null +++ b/inc/FUiAnimVisualElementContentProvider.h @@ -0,0 +1,123 @@ +// +// 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 FUiAnimVisualElementContentProvider.h + * @brief This is the header file for the %VisualElementContentProvider class. + * + * This header file contains the declarations of the %VisualElementContentProvider class. + */ + +#ifndef _FUIANIM_VISUAL_ELEMENT_CONTENT_PROVIDER_H_ +#define _FUIANIM_VISUAL_ELEMENT_CONTENT_PROVIDER_H_ + +#include + +namespace Tizen { namespace Graphics { +class Canvas; +class FloatPoint; +}} // Tizen::Graphics + +namespace Tizen { namespace Ui { namespace Animations +{ + +class VisualElement; + +/** +* @class VisualElementContentProvider +* @brief This class customizes content of %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 with VisualElement. +* This class implements IVisualElementContentProvider for the default operation of the contents. +*/ +class _OSP_EXPORT_ VisualElementContentProvider + : public IVisualElementContentProvider +{ +public: + /** + * This is the default constructor for this class. + * + * @since 2.0 + */ + VisualElementContentProvider(void); + + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~VisualElementContentProvider(void); + +public: + /** + * 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 + * else @c false + * @param[in] target The VisualElement instance to check + */ + virtual bool PrepareDraw(VisualElement& target); + + + /** + * Fills the contents in the given canvas. + * + * @since 2.0 + * + * @param[in] target The VisualElement instance to draw + * @param[in] canvas The graphic canvas for drawing + * @see VisualElement::OnDraw() + * @see VisualElement::InvalidateRectangle() + */ + virtual void DrawContent(VisualElement& target, Tizen::Graphics::Canvas& canvas); + + + /** + * 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 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: + * - Tizen::Ui::Animations::HitTestResult::HIT_TEST_NOWHERE + * - Tizen::Ui::Animations::HitTestResult::HIT_TEST_MATCH + * @see VisualElement::GetChildAt() + */ + virtual HitTestResult HitTest(VisualElement& target, const Tizen::Graphics::FloatPoint& point); + +private: + VisualElementContentProvider(const VisualElementContentProvider& value); + VisualElementContentProvider& operator =(const VisualElementContentProvider& value); + +}; // VisualElementContentProvider + + +}}} // Tizen::Ui::Animations + +#endif //_FUIANIM_VISUAL_ELEMENT_CONTENT_PROVIDER_H_ diff --git a/inc/FUiAnimVisualElementPropertyAnimation.h b/inc/FUiAnimVisualElementPropertyAnimation.h new file mode 100644 index 0000000..47d12ba --- /dev/null +++ b/inc/FUiAnimVisualElementPropertyAnimation.h @@ -0,0 +1,191 @@ +// +// 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 FUiAnimVisualElementPropertyAnimation.h + * @brief This is the header file for the %VisualElementPropertyAnimation class. + * + * This header file contains the declarations of the %VisualElementPropertyAnimation class. + */ + +#ifndef _FUI_ANIM_VISUAL_ELEMENT_PROPERTY_ANIMATION_H_ +#define _FUI_ANIM_VISUAL_ELEMENT_PROPERTY_ANIMATION_H_ + +#include + +namespace Tizen { namespace Ui { namespace Animations +{ + + +class _VisualElementPropertyAnimationImpl; + +/** + * @class VisualElementPropertyAnimation + * @brief This class is for property animation. + * + * @since 2.0 + * + * The %VisualElementPropertyAnimation class defines the basic property animation. + */ +class _OSP_EXPORT_ VisualElementPropertyAnimation + : public VisualElementValueAnimation +{ +public: + + /** + * This is the default constructor for this class. + * + * @since 2.0 + * + * @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. + */ + VisualElementPropertyAnimation(void); + + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~VisualElementPropertyAnimation(void); + + + /** + * This is the copy constructor for the %VisualElementPropertyAnimation class. + * + * @since 2.0 + * + * @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. + */ + VisualElementPropertyAnimation(const VisualElementPropertyAnimation& animation); + + + /** + * Assigns the value of the specified instance to the current instance of %VisualElementPropertyAnimation. + * + * @since 2.0 + * + * @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. + */ + VisualElementPropertyAnimation& operator =(const VisualElementPropertyAnimation& rhs); + + + /** + * Checks whether the specified instance and current instance of %VisualElementPropertyAnimation have equal animation values. + * + * @since 2.0 + * + * @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; + + + /** + * Checks whether the specified instance and current instance of %VisualElementPropertyAnimation have different animation values. + * + * @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 + * @param[in] rhs An instance of %VisualElementPropertyAnimation + */ + bool operator !=(const VisualElementPropertyAnimation& rhs) const; + + + /** + * Checks whether the value of the current instance of %VisualElementPropertyAnimation equals the value of the specified instance. + * + * @since 2.0 + * + * @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. + */ + virtual bool Equals(const Tizen::Base::Object& obj) const; + + + /** + * Gets the hash value of the current instance. + * + * @since 2.0 + * + * @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 a copied instance of the class. + * + * @since 2.0 + * + * @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. + */ + virtual VisualElementAnimation* CloneN(void) const; + + + /** + * Sets the property for the animation. + * + * @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. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @see GetPropertyName() + */ + result SetPropertyName(const Tizen::Base::String& property); + + + /** + * Gets the string of property to which the animation is applied. + * + * @since 2.0 + * + * @return A string of property + * @see SetPropertyName() + */ + Tizen::Base::String GetPropertyName(void) const; + + +protected: + + friend class _VisualElementPropertyAnimationImpl; +}; // VisualElementPropertyAnimation + + +}}} // Tizen::Ui::Animations + +#endif // _FUI_ANIM_VISUAL_ELEMENT_PROPERTY_ANIMATION_H_ diff --git a/inc/FUiAnimVisualElementSurface.h b/inc/FUiAnimVisualElementSurface.h new file mode 100644 index 0000000..3d4ead3 --- /dev/null +++ b/inc/FUiAnimVisualElementSurface.h @@ -0,0 +1,249 @@ +// +// 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 FUiAnimVisualElementSurface.h + * @brief This is the header file for the %VisualElementSurface class. + * + * This header file contains the declarations of the %VisualElementSurface class. + */ + +#ifndef _FUI_ANIM_VISUAL_ELEMENT_SURFACE_H_ +#define _FUI_ANIM_VISUAL_ELEMENT_SURFACE_H_ + +#include +#include +#include +#include + +namespace Tizen { namespace Graphics +{ + class BufferInfo; +}} // Tizen::Graphics + +namespace Tizen { namespace Ui { namespace Animations +{ + +class DisplayContext; +class _VisualElementSurfaceImpl; + +/** +* @class VisualElementSurface +* @brief This class provides methods to control %VisualElementSurface. +* +* @since 2.0 +* +* The %VisualElementSurface class provides methods to control %VisualElementSurface. +*/ +class _OSP_EXPORT_ VisualElementSurface + : public Tizen::Base::Object +{ +public: + + /** + * This is the default constructor for this class. + * + * @since 2.0 + */ + VisualElementSurface(void); + + /** + * This is the copy constructor for the %VisualElementSurface class. + * + * @since 2.0 + * + * @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. + * - It does not perform a deep copy (shared with the source). + */ + VisualElementSurface(const VisualElementSurface& rhs); + + /** + * Assigns the value of the specified instance to the current instance of %VisualElementSurface. + * + * @since 2.0 + * + * @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. + * - It does not perform a deep copy (shared with the source). + */ + VisualElementSurface& operator =(const VisualElementSurface& rhs); + + /** + * This is the default destructor for this class. + * + * @since 2.0 + */ + virtual ~VisualElementSurface(void); + +public: + + /** + * Initializes this instance of %VisualElementSurface with the specified parameters. + * + * @since 2.0 + * + * @return An error code + * @param[in] displayContext The display context of the window + * @param[in] size The size of the %VisualElementSurface instance + * @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. @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); + + /** + * Initializes this instance of %VisualElementSurface with the specified parameters. + * + * @since 2.1 + * + * @return An error code + * @param[in] displayContext The display context of the window + * @param[in] size The size of the %VisualElementSurface instance + * @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. @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 a %VisualElementSurface instance. + * + * @since 2.0 + * + * @return An error code + * @param[out] bufferInfo The buffer-related information of the surface + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + */ + result GetBufferInfo(Tizen::Graphics::BufferInfo& bufferInfo) const; + + /** + * Gets the size of a %VisualElementSurface instance. + * + * @since 2.0 + * + * @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. + */ + Tizen::Graphics::Dimension GetSize(void) const; + + /** + * Gets the size of a %VisualElementSurface instance. + * + * @since 2.1 + * + * @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. + */ + + Tizen::Graphics::FloatDimension GetSizeF(void) const; + + /** + * Compares a Tizen::Base::Object instance with the calling %VisualElementSurface instance for equivalence. + * + * @since 2.0 + * + * @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() + */ + virtual bool Equals(const Tizen::Base::Object& obj) const; + + /** + * Gets the hash value of the current instance. + * + * @since 2.0 + * + * @return The hash value of the current instance + * @remarks The hash code of a buffer depends only upon its remaining elements. + */ + virtual int GetHashCode(void) const; + + +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. + // + // @since 2.0 + // + virtual void VisualElementSurface_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. + // + // @since 2.0 + // + virtual void VisualElementSurface_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. + // + // @since 2.0 + // + virtual void VisualElementSurface_Reserved3(void) {} + + +private: + + // + // This variable is for internal use only. Using this variable can cause behavioral, security-related, + // and consistency-related issues in the application. + // + /** + * @since 2.0 + */ + _VisualElementSurfaceImpl* __pVisualElementSurfaceImpl; + + friend class _VisualElementSurfaceImpl; + +}; // VisualElementSurface + + +}}} // Tizen::Ui::Animations + +#endif // _FUI_ANIM_VISUAL_ELEMENT_SURFACE_H_ + diff --git a/inc/FUiAnimVisualElementValueAnimation.h b/inc/FUiAnimVisualElementValueAnimation.h new file mode 100644 index 0000000..2bd519b --- /dev/null +++ b/inc/FUiAnimVisualElementValueAnimation.h @@ -0,0 +1,331 @@ +// +// 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 FUiAnimVisualElementValueAnimation.h + * @brief This is the header file for the %VisualElementValueAnimation class. + * + * This header file contains the declarations of the %VisualElementValueAnimation class. + */ + +#ifndef _FUI_ANIM_VISUAL_ELEMENT_VALUE_ANIMATION_H_ +#define _FUI_ANIM_VISUAL_ELEMENT_VALUE_ANIMATION_H_ + +#include +#include + +namespace Tizen { namespace Ui { namespace Animations +{ + + +class IVisualElementAnimationTickEventListener; +class _VisualElementValueAnimationImpl; + +/** + * @class VisualElementValueAnimation + * @brief This class is for value animation. + * + * @since 2.0 + * + * The %VisualElementValueAnimation class defines the basic value animation. + */ +class _OSP_EXPORT_ VisualElementValueAnimation + : public VisualElementAnimation +{ +public: + + /** + * This is the default constructor for this class. + * + * @since 2.0 + * + * @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. + */ + VisualElementValueAnimation(void); + + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~VisualElementValueAnimation(void); + + + /** + * This is the copy constructor for the %VisualElementValueAnimation class. + * + * @since 2.0 + * + * @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. + */ + VisualElementValueAnimation(const VisualElementValueAnimation& animation); + + + /** + * Assigns the value of the specified instance to the current instance of %VisualElementValueAnimation. + * + * @since 2.0 + * + * @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. + */ + VisualElementValueAnimation& operator =(const VisualElementValueAnimation& rhs); + + + /** + * Checks whether the specified instance and current instance of %VisualElementValueAnimation have equal animation values. + * + * @since 2.0 + * + * @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; + + + /** + * Checks whether the specified instance and current instance of %VisualElementValueAnimation have different animation values. + * + * @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 + * @param[in] rhs An instance of %VisualElementValueAnimation + */ + bool operator !=(const VisualElementValueAnimation& rhs) const; + + + /** + * Checks whether the value of the current instance of %VisualElementValueAnimation equals the value of the specified instance. + * + * @since 2.0 + * + * @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. + */ + virtual bool Equals(const Tizen::Base::Object& obj) const; + + + /** + * Gets the hash value of the current instance. + * + * @since 2.0 + * + * @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 a copied instance of the class. + * + * @since 2.0 + * + * @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. + */ + virtual VisualElementAnimation* CloneN(void) const; + + + /** + * Sets an IVisualElementAnimationTickEventListener listener instance to listen to the events of a particular animation. @n + * The set listener, %IVisualElementAnimationTickEventListener, can listen to events on the specified event dispatcher's context when they are fired. + * + * @since 2.0 + * + * @param[in] pListener The listener to set + */ + void SetVisualElementAnimationTickEventListener(IVisualElementAnimationTickEventListener* pListener); + + + /** + * Gets the IVisualElementAnimationTickEventListener listener. + * + * @since 2.0 + * + * @return A pointer to the IVisualElementAnimationTickEventListener instance @n + * else @c null if the listener has not been set + * @see SetVisualElementAnimationTickEventListener() + */ + IVisualElementAnimationTickEventListener* GetVisualElementAnimationTickEventListener(void) const; + + + /** + * Sets the start value of the animation. + * + * @since 2.0 + * + * @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. + * @see GetStartValue() + */ + result SetStartValue(const Tizen::Ui::Variant& startValue); + + + /** + * Gets the start value of the animation. + * + * @since 2.0 + * + * @return The start value of animation + * @see SetStartValue() + */ + Tizen::Ui::Variant GetStartValue(void) const; + + + /** + * Sets the end value of the animation. + * + * @since 2.0 + * + * @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 Tizen::Ui::Variant is empty. + * @see GetEndValue() + */ + result SetEndValue(const Tizen::Ui::Variant& endValue); + + + /** + * Gets the end value of the animation. + * + * @since 2.0 + * + * @return The end value of animation + * @see SetEndValue() + */ + Tizen::Ui::Variant GetEndValue(void) const; + + + /** + * Sets the flag to apply the end value of the animation when the animation is finished. + * + * @since 2.0 + * + * @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 based on this value. + * @see IsEndValueApplied() + */ + void SetEndValueApplied(bool apply); + + + /** + * Checks whether the end value of the animation is applied when the animation is finished. + * + * @since 2.0 + * + * @return @c true if the end value is applied, @n + * else @c false @n + * The default value is @c true. + * @see SetEndValueApplied() + */ + bool IsEndValueApplied(void) const; + + + /** + * Adds the keyframe information for the animation. + * + * @since 2.0 + * + * @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 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. + * @see RemoveKeyFrame() + * @see RemoveAllKeyFrames() + */ + result AddKeyFrame(float timeProgress, const Tizen::Ui::Variant& value, const IVisualElementAnimationTimingFunction* pTimingFunction = null); + + + /** + * Removes the keyframe information for the animation. + * + * @since 2.0 + * + * @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 keyframe with the specified @c timeProgress does not exist. + * @see AddKeyFrame() + * @see RemoveAllKeyFrames() + */ + result RemoveKeyFrame(float timeProgress); + + + /** + * Removes all the keyframe information for the animation. + * + * @since 2.0 + * + * @see AddKeyFrame() + * @see RemoveKeyFrame() + */ + void RemoveAllKeyFrames(void); + + +protected: + + // + // This variable is for internal use only. Using this variable can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // This is the constructor for derived classes. + // + // @since 2.0 + // + VisualElementValueAnimation(_VisualElementValueAnimationImpl* pImpl); + + + friend class _VisualElementValueAnimationImpl; +}; // VisualElementValueAnimation + + +}}} // Tizen::Ui::Animations + +#endif // _FUI_ANIM_VISUAL_ELEMENT_VALUE_ANIMATION_H_ + diff --git a/inc/FUiAnimations.h b/inc/FUiAnimations.h new file mode 100644 index 0000000..48036a5 --- /dev/null +++ b/inc/FUiAnimations.h @@ -0,0 +1,373 @@ +// +// 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 FUiAnimations.h + * @brief This is the header file for the %Animations namespace. + * + * This header file contains the declarations and descriptions of the %Animations namespace. + */ + +#ifndef _FUI_ANIMATIONS_H_ +#define _FUI_ANIMATIONS_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace Tizen +{ +namespace Ui +{ +/** + * @namespace Tizen::Ui::Animations + * @brief This namespace contains classes for the animation-related functionalities. + * @since 2.0 + * + * @remarks @b Header @b %file: @b \#include @b @n + * @b Library : @b osp-uifw + * + * + * + * The %Animations namespace provides animation capabilities for the UI controls. + * + * For more information on the %Animations namespace features, see Animations Guide. + * + * The following diagram illustrates the relationships between the classes belonging to the %Animations namespace. + * @image html ui_animations_classdiagram.png + * + * The following examples demonstrate how to use the %Animations namespace. + * + * @code +// Sample code for Control Animation using ControlAnimator +#include +#include + +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Ui::Animations; +using namespace Tizen::Graphics; + +class AnimationSample + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::IActionEventListener +{ +public: + virtual result OnInitializing(void); + virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId); + +protected: + static const int ID_BUTTON = 101; + Tizen::Ui::Controls::Button *__pButton; +}; + +result +AnimationSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + // Creates an instance of Button + __pButton = new Button(); + __pButton->Construct(Rectangle(10, 200, 460, 100)); + __pButton->SetText(L"Start animation"); + __pButton->SetActionId(ID_BUTTON); + __pButton->AddActionEventListener(*this); + AddControl(__pButton); + + return r; +} + +void +AnimationSample::OnActionPerformed(const Control& source, int actionId) +{ + switch(actionId) + { + case ID_BUTTON: + { + // Starts an animation + result r = E_SUCCESS; + + ControlAnimator* pButtonAnimator = __pButton->GetControlAnimator(); + Point startPos = __pButton->GetPosition(); + Point endPos(startPos.x, startPos.y + 200); + PointAnimation pointAnimation(startPos, + endPos, + 2000, + ANIMATION_INTERPOLATOR_LINEAR); + + pointAnimation.SetAutoReverseEnabled(true); + + r = pButtonAnimator->StartUserAnimation(ANIMATION_TARGET_POSITION, pointAnimation); + if (IsFailed(r)) + { + AppLog("Start Animation on Button Failed.\n"); + return; + } + } + break; + } +} + * @endcode + * + * @code +// Sample code for Form Transition Animation using FrameAnimator +#include +#include + +using namespace Tizen::App; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Ui::Animations; + +bool +FrameAnimatorSample::OnAppInitializing(AppRegistry& appRegistry) +{ + // Creates instances of Form + Form1 *pForm1 = new Form1(); + pForm1->Initialize(); + + Form2* pForm2 = new Form2(); + pForm2->Initialize(); + + // Adds forms to the frame + Frame *pFrame = GetAppFrame()->GetFrame(); + pFrame->AddControl(pForm1); + pFrame->AddControl(pForm2); + + // Sets the current form + pFrame->SetCurrentForm(pForm1); + + // Display the form + pForm1->Invalidate(); + + return true; +} + +// Transition from Form1 to Form2 +void +Form1::OnActionPerformed(const Control& source, int actionId) +{ + switch(actionId) + { + case ID_FOOTER_BUTTON_TRANSIT: + { + result r = E_SUCCESS; + + Frame *pFrame = UiApp::GetInstance()->GetAppFrame()->GetFrame(); + FrameAnimator *pFrameAnimator = pFrame->GetFrameAnimator(); + + Form *nextForm = static_cast(pFrame->GetControl(L"Form2")); + + if(pFrameAnimator->GetStatus() == ANIMATOR_STATUS_STOPPED) + { + pFrameAnimator->SetFormTransitionAnimation (FRAME_ANIMATOR_FORM_TRANSITION_ANIMATION_TRANSLATE_LEFT, + 1000, + ANIMATION_INTERPOLATOR_LINEAR ); + r = pFrameAnimator->SetCurrentForm (nextForm); + if (IsFailed(r)) + { + AppLog("SetCurrentForm on the Form2 Failed.\n"); + return; + } + } + } + break; + default: + break; + } +} + +// Transition from Form2 to Form1 +void +Form2::OnActionPerformed(const Control& source, int actionId) +{ + switch(actionId) + { + case ID_FOOTER_BUTTON_TRANSIT: + { + result r = E_SUCCESS; + + Frame *pFrame = UiApp::GetInstance()->GetAppFrame()->GetFrame(); + FrameAnimator *pFrameAnimator = pFrame->GetFrameAnimator(); + + Form *nextForm = static_cast(pFrame->GetControl(L"Form1")); + if(pFrameAnimator->GetStatus() == ANIMATOR_STATUS_STOPPED) + { + pFrameAnimator->SetFormTransitionAnimation(FRAME_ANIMATOR_FORM_TRANSITION_ANIMATION_TRANSLATE_RIGHT, + 1000, + ANIMATION_INTERPOLATOR_LINEAR ); + r = pFrameAnimator->SetCurrentForm (nextForm); + if (IsFailed(r)) + { + AppLog("SetCurrentForm on the Form1 Failed.\n"); + return; + } + } + } + break; + default: + break; + } +} + * @endcode + * + * @code + // Sample code for VisualElement and VisualElementAnimation +#include +#include +#include + +using namespace Tizen::Ui::Animations; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Graphics; + +class VisualElementSample + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::IActionEventListener + , public Tizen::Ui::Animations::VisualElementContentProvider +{ +public: + virtual result OnInitializing(void); + virtual result OnTerminating(void); + + virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId); + + virtual void DrawContent(Tizen::Ui::Animations::VisualElement& target, Tizen::Graphics::Canvas& canvas); + +private: + static const int ID_FOOTER_START_ANIMATION = 101; + + Tizen::Ui::Animations::VisualElement* __pRect; +}; + +result +VisualElementSample::OnInitializing(void) +{ + __pRect = new VisualElement(); + __pRect->Construct(); + __pRect->SetName(L"Rect"); + __pRect->SetBounds(FloatRectangle(50.0f, 50.0f, 200.0f, 200.0f)); + __pRect->SetShowState(true); + __pRect->SetContentProvider(this); + + GetVisualElement()->AttachChild(__pRect); + __pRect->InvalidateRectangle(null); + + return E_SUCCESS; +} + +result +VisualElementSample::OnTerminating(void) +{ + __pRect->Destroy(); + + return E_SUCCESS; +} + +void +VisualElementSample::OnActionPerformed(const Tizen::Ui::Control& source, int actionId) +{ + switch(actionId) + { + case ID_FOOTER_START_ANIMATION: + { + VisualElementPropertyAnimation* pAnimation = new VisualElementPropertyAnimation(); + pAnimation->SetPropertyName(L"opacity"); + pAnimation->SetStartValue(1.0f); + pAnimation->SetEndValue(0.0f); + pAnimation->SetDuration(500); + pAnimation->SetAutoReverseEnabled(true); + + __pRect->AddAnimation(*pAnimation); + delete pAnimation; + } + break; + + default: + break; + } +} + +void +VisualElementSample::DrawContent(Tizen::Ui::Animations::VisualElement& target, Tizen::Graphics::Canvas& canvas) +{ + if (target.GetName() == L"Rect") + { + canvas.FillRectangle(Color::GetColor(COLOR_ID_WHITE), Rectangle(0, 0, 200, 200)); + } +} + * @endcode + * + * + * + */ + +namespace Animations +{ +}; + +} } // Tizen::Ui + +#endif // _FUI_ANIMATIONS_H_ diff --git a/inc/FUiCardLayout.h b/inc/FUiCardLayout.h new file mode 100644 index 0000000..64a6897 --- /dev/null +++ b/inc/FUiCardLayout.h @@ -0,0 +1,186 @@ +// +// 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 FUiCardLayout.h + * @brief This is the header file for the %CardLayout class. + * + * This header file contains the declarations of the %CardLayout class. + */ + +#ifndef _FUI_CARD_LAYOUT_H_ +#define _FUI_CARD_LAYOUT_H_ + +#include + +namespace Tizen { namespace Ui +{ +class Control; + +/** + * @class CardLayout + * @brief The card layout fits a child control to the container by changing the position and the size of the child control. + * + * @since 2.0 + * + * 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 + * + * @code +// Sample code for CardLayoutSample.cpp +#include +#include + +#include "CardLayoutSample.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; + +bool +CardLayoutSample::Initialize(void) +{ + // Creates an instance of CardLayout + CardLayout formLayout; + formLayout.Construct(); + + // Applies the card layout to the form + Construct(formLayout, FORM_STYLE_NORMAL); + return true; +} + +result +CardLayoutSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + 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)); + + // 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); + + // Adds the panel to the form + AddControl(pPanels[i]); + + // 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 + * + */ +class _OSP_EXPORT_ CardLayout + : public Layout +{ +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. + * + * @since 2.0 + */ + CardLayout(void); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~CardLayout(void); + + /** + * Initializes this instance of %CardLayout. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + */ + result Construct(void); + + /** + * Gets the type of the layout. + * + * @since 2.0 + * + * @return The layout type + */ + virtual LayoutType GetLayoutType(void) const; + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + CardLayout(const CardLayout& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + CardLayout& operator =(const CardLayout& rhs); + +}; // CardLayout + +}} // Tizen::Ui + +#endif // _FUI_CARD_LAYOUT_H_ diff --git a/inc/FUiClipboard.h b/inc/FUiClipboard.h new file mode 100644 index 0000000..5c6d316 --- /dev/null +++ b/inc/FUiClipboard.h @@ -0,0 +1,298 @@ +// +// 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 FUiClipboard.h + * @brief This is the header file for the %Clipboard class. + * + * This header file contains the declarations of the %Clipboard class and its helper classes. + */ + +#ifndef _FUI_CLIPBOARD_H_ +#define _FUI_CLIPBOARD_H_ + +#include +#include +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui +{ +class _ClipboardImpl; + +/** + * @class Clipboard + * @brief This class defines the common behavior for %Clipboard. + * + * @since 2.0 + * + * @final This class is not intended for extension. + * + * The %Clipboard class manages the copy and paste operation between and within applications. + * + * For more information on the class features, see Clipboard. + * + * The following example demonstrates how to use the %Clipboard class. + * + * @code +// Sample code for ClipboardSample.h +#include + +class ClipboardSample + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::IActionEventListener +{ +public: + ClipboardSample(void) + : __pLabel(null){} + + bool Initialize(void); + virtual result OnInitializing(void); + + // IActionEventListener + virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId); + +private: + static const int ID_BUTTON_OK = 101; + + Tizen::Ui::Controls::Label* __pLabel; +}; + * @endcode + * + * @code +// Sample code for ClipboardSample.cpp +#include +#include +#include + +#include "ClipboardSample.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; + +bool +ClipboardSample::Initialize(void) +{ + Construct(FORM_STYLE_NORMAL); + return true; +} + +result +ClipboardSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + // Sets data to a clip board item + ClipboardItem item; + String resourcePath = App::GetInstance()->GetAppResourcePath(); + item.Construct(CLIPBOARD_DATA_TYPE_HTML, String(resourcePath + L"screen-size-normal/IDF_FORM.xml")); + + // Gets an instance of Clipboard and copies an item to it + Clipboard* pClipboard = Clipboard::GetInstance(); + pClipboard->CopyItem(item); + + // Creates controls to test clipboard + Button* pButton = new Button(); + pButton->Construct(Rectangle(50, 50, 200, 80), "COPY"); + pButton->SetActionId(ID_BUTTON_OK); + pButton->AddActionEventListener(*this); + AddControl(pButton); + + __pLabel = new Label(); + __pLabel->Construct(Rectangle(0, 200, GetClientAreaBounds().width, 80), L".."); + AddControl(__pLabel); + + return r; +} + +void +ClipboardSample::OnActionPerformed(const Tizen::Ui::Control& source, int actionId) +{ + switch(actionId) + { + case ID_BUTTON_OK: + { + // Gets an instance of Clipboard + Clipboard* pClipboard = Clipboard::GetInstance(); + + // Retrieves a latest item + ClipboardItem* pItem = pClipboard->RetrieveLatestItemN(CLIPBOARD_DATA_TYPE_TEXT + | CLIPBOARD_DATA_TYPE_HTML + | CLIPBOARD_DATA_TYPE_AUDIO + | CLIPBOARD_DATA_TYPE_VIDEO ); + + //Gets data from the clipboard item + String* pString = dynamic_cast(pItem->GetData()); + + __pLabel->SetText(*pString + L" is Copied"); + __pLabel->Invalidate(false); + + delete pItem; + } + break; + default: + break; + } +} + * @endcode + */ +class _OSP_EXPORT_ Clipboard + : public Tizen::Base::Object + , public Tizen::Ui::IClipboard +{ +public: + /** + * Gets a pointer to the %Clipboard instance. + * + * @since 2.0 + * + * @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. + */ + static Clipboard* GetInstance(void); + + /** + * Copies the specified @c item to the system clipboard. + * + * @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. + * @remarks For the text, image data, and html types, the data itself is copied by the method and kept by the system clipboard. @n + * For the other types, only the file path is copied and kept. + */ + result CopyItem(const ClipboardItem& item); + + /** + * 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. + * @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. + */ + Tizen::Base::Collection::IList* RetrieveItemsN(unsigned long dataTypes); + + /** + * Retrieves the latest item for the specified data types from the system clipboard. + * + * @since 2.0 + * + * @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. + * @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. + */ + Tizen::Ui::ClipboardItem* RetrieveLatestItemN(unsigned long dataTypes); + + /** + * 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 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); + + /** + * Hides the clipboard popup. + * + * @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. @n + * - No clipboard popup is currently being shown. + * @exception E_SYSTEM A system error has occurred. + */ + static result HidePopup(void); + + /** + * Checks whether the clipboard popup is currently being shown. + * + * @since 2.0 + * + * @return @c true if the clipboard popup is being shown, @n + * else @c false + */ + static bool IsPopupVisible(void); + +private: + // + // This default constructor is intentionally declared as private to implement the Singleton semantic. + // + Clipboard(void); + + // + // This destructor is intentionally declared as private to implement the Singleton semantic. + // + virtual ~Clipboard(void); + + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + Clipboard(const Clipboard& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + Clipboard& operator =(const Clipboard& rhs); + +private: + friend class _ClipboardImpl; + +private: + _ClipboardImpl* __pClipboardImpl; +}; // Clipboard + +}} //Tizen::Ui + +#endif //_FUI_CLIPBOARD_H_ diff --git a/inc/FUiClipboardItem.h b/inc/FUiClipboardItem.h new file mode 100644 index 0000000..7724415 --- /dev/null +++ b/inc/FUiClipboardItem.h @@ -0,0 +1,123 @@ +// +// 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 FUiClipboardItem.h + * @brief This is the header file for the %ClipboardItem class. + * + * This header file contains the declarations of the %ClipboardItem class and its helper classes. + */ + +#ifndef _FUI_CLIPBOARD_ITEM_H_ +#define _FUI_CLIPBOARD_ITEM_H_ + +#include +#include + +namespace Tizen { namespace Ui +{ +class _ClipboardItemImpl; + +/** + * @class ClipboardItem + * @brief This class defines a common behavior for %ClipboardItem. + * + * @since 2.0 + * + * @final This class is not intended for extension. + * + * The %ClipboardItem class represents the items in the system Clipboard. The %ClipboardItem is the unit of data handling between + * the system clipboard and applications, and it contains both data itself and the type of the data. + * + * For more information on the class features, see Clipboard. + * + */ +class _OSP_EXPORT_ ClipboardItem + : public Tizen::Base::Object +{ +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. + * + * @since 2.0 + */ + ClipboardItem(void); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~ClipboardItem(void); + + /** + * Initializes this instance of %ClipboardItem with the specified parameters. + * + * @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. + * @remarks For the image data type, the bitmap instance must be deleted + * by the application after the item is copied to the clipboard. + */ + result Construct(ClipboardDataType dataType, const Tizen::Base::Object& data); + + /** + * Gets the data type of %ClipboardItem. + * + * @since 2.0 + * + * @return The data type of the clipboard item + */ + ClipboardDataType GetDataType(void) const; + + /** + * Gets the data of %ClipboardItem. + * + * @since 2.0 + * + * @return The pointer to the data @n + * The application needs to type-cast the returned data object according to its data type. + */ + Tizen::Base::Object* GetData(void) const; + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + ClipboardItem(const ClipboardItem& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + ClipboardItem& operator =(const ClipboardItem& rhs); + +private: + friend class _ClipboardItemImpl; + +private: + _ClipboardItemImpl* __pImpl; +}; // ClipboardItem + +}} // Tizen::Ui + +#endif // _FUI_CLIPBOARD_ITEM_H_ diff --git a/inc/FUiClipboardTypes.h b/inc/FUiClipboardTypes.h new file mode 100644 index 0000000..bbfdf9f --- /dev/null +++ b/inc/FUiClipboardTypes.h @@ -0,0 +1,50 @@ +// +// 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 FUiClipboardTypes.h + * @brief This is the header file for the enumerations of the Clipboard class. + * + * The %ClipboardDataType enumeration defines the data types for the system clipboard. + */ + +#ifndef _FUI_CLIPBOARD_ENUM_H_ +#define _FUI_CLIPBOARD_ENUM_H_ + +namespace Tizen { namespace Ui +{ +/** + * @enum ClipboardDataType + * + * Defines the data types supported by %Clipboard. + * + * @since 2.0 + */ +enum ClipboardDataType +{ + CLIPBOARD_DATA_TYPE_TEXT = 0x0001, /**< The text data type */ + CLIPBOARD_DATA_TYPE_HTML = 0x0002, /**< The HTML data type */ + 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 max data type + CLIPBOARD_DATA_TYPE_NONE = 0x0000 // No data type +}; + +}} // Tizen::Ui + +#endif // _FUI_CLIPBOARD_ENUM_H_ diff --git a/inc/FUiCompositeMode.h b/inc/FUiCompositeMode.h new file mode 100644 index 0000000..0fac826 --- /dev/null +++ b/inc/FUiCompositeMode.h @@ -0,0 +1,50 @@ +// +// 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 FUiCompositeMode.h + * @brief This is the header file for the %Container class. + * + * This header file contains the declarations of the enumerations of the Container class. + */ + +#ifndef _FUI_COMPOSITE_MODE_H_ +#define _FUI_COMPOSITE_MODE_H_ + +#ifdef COMPOSITE_MODE_NONE +#undef COMPOSITE_MODE_NONE +#endif + +namespace Tizen {namespace Ui +{ + +/** +* Defines the mode for compositing controls. +* +* @since 2.0 +*/ +enum CompositeMode +{ + COMPOSITE_MODE_ALPHA_BLENDING, /**< Composites two UI controls using alpha-blending */ + COMPOSITE_MODE_CHROMA_KEY, /**< Composites two UI controls in a way that the given chroma key color from one control is made transparent */ + COMPOSITE_MODE_OVERWRITE, /**< Composites two UI controls in a way that one control overwrites another control */ + COMPOSITE_MODE_NONE, /**< Does not composite the given control */ +}; + +}} // Tizen::Ui + +#endif // _FUI_COMPOSITE_MODE_H_ diff --git a/inc/FUiContainer.h b/inc/FUiContainer.h new file mode 100644 index 0000000..958c0b1 --- /dev/null +++ b/inc/FUiContainer.h @@ -0,0 +1,845 @@ +// +// 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 FUiContainer.h + * @brief This is the header file for the %Container class. + * + * This header file contains the declarations of the %Container class. + */ + +#ifndef _FUI_CONTAINER_H_ +#define _FUI_CONTAINER_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui { + +class Layout; +class _ContainerImpl; + +/** + * @class Container + * @brief This class is an abstract base class of all the generic containers of %Controls. + * + * @since 2.0 + * + * @remarks As the %Container is an abstract class, use the Tizen::Ui::Controls::Panel class or another class derived from + * %Container to apply the container functionality. + * + * The %Container class is the abstract base class of all generic Control containers. A container is a UI element which can contain + * other UI elements. + * + * For more information on the class features, see Containers. + * + + * + */ +class _OSP_EXPORT_ Container + : public Control +{ + +public: + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~Container(void) = 0; + +public: + /** + * Adds the control at the end of the list maintained by the container. + * + * @brief [Deprecated] + * @deprecated This method is deprecated. + * @since 2.0 + * + * @return An error code + * @param[in] control The control to add to the container + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. @n + * 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 + * - 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. + * Panel* pPanel = new Panel(); + * pPanel->Construct(Rectangle(100, 250, 300, 300)); + * + * Form* pForm = new Form(); + * pForm->Construct(FORM_STYLE_NORMAL|FORM_STYLE_PORTRAIT_INDICATOR); + * pForm->AddControl(*pPanel); + * + * //... + * pForm->Invalidate(true); + * //... + * } + * @endcode + */ + result AddControl(const Control& control); + + /** + * Adds a control at the end of the list maintained by a container. + * + * @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 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. + * - 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 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. + * Panel* pPanel = new Panel(); + * pPanel->Construct(Rectangle(100, 250, 300, 300)); + * + * Form* pForm = new Form(); + * pForm->Construct(FORM_STYLE_NORMAL|FORM_STYLE_PORTRAIT_INDICATOR); + * pForm->AddControl(pPanel); + * + * //... + * pForm->Invalidate(true); + * //... + * } + * @endcode + */ + result AddControl(Control* pControl); + + /** + * 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 + * + * @see GetCanvasN() + */ + virtual void OnClearBackground(void); + + /** + * Called when the container needs to draw itself. @n + * Users can override this method to display user-specific drawings. @n + * This method is called after the container has drawn itself, but just before the container draws its child controls. + * + * @if OSPCOMPAT + * @brief [Compatibility] + * @endif + * @since 2.0 + * + * @if OSPCOMPAT + * @compatibility This method has compatibility issues with OSP compatible applications. @n + * For more information, see @ref CompOnDrawPage "here". + * @endif + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + virtual result OnDraw(void); + + /** + * @if OSPCOMPAT + * @page CompOnDrawPage Compatibility for OnDraw() + * @section CompOnDrawPageIssueSection Issues + * Implementing this method in OSP compatible applications has the following issues: @n + * -# The platform draws the control by calling the parent's OnDraw() callback before invoking the control's OnDraw() callback. So, the users can't control the control's drawing behavior by overriding the OnDraw() callback. + * + * @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 need to call the parent container's OnDraw() callback in the OnDraw() callback if you override this method. + * @endif + */ + + /** + * Called to notify that the control's show state is changing. + * + * @since 2.0 + * + * @param[in] showState The new show state of the control + * @see Control::SetShowState() + */ + virtual void OnShowStateChanging(bool showState); + + /** + * Called to notify that the control's show state is changed. + * + * @since 2.0 + * + * @param[in] showState The new show state of the control + * @see Control::SetShowState() + */ + virtual void OnShowStateChanged(bool showState); + + /** + * Called to notify that the bounds of the control is changing. + * + * @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 + * @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 Control::SetBounds() + * @see Control::SetSize() + */ + virtual result OnBoundsChanging(const Tizen::Graphics::Rectangle& oldRect, const Tizen::Graphics::Rectangle& newRect); + + /** + * Called to notify that the bounds of the control is changed. + * + * @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 Control::SetBounds() + * @see Control::SetSize() + */ + virtual void OnBoundsChanged(const Tizen::Graphics::Rectangle& oldRect, const Tizen::Graphics::Rectangle& newRect); + + /** + * Overrides this method to indicate that the specified @c width and @c height + * can be supported or a new @c width and @c height should be applied instead + * of the specified values. + * + * @since 2.0 + * + * @param[in, out] evaluatedSize The width and the height to evaluate + */ + virtual void OnEvaluateSize(Tizen::Graphics::Dimension& evaluatedSize); + + /** + * Removes the specified control from the container. + * + * @brief [Deprecated] + * @deprecated This method is deprecated. + * @since 2.0 + * + * @return An error code + * @param[in] control 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_SYSTEM A system error has occurred. + * @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); + + /** + * Removes a specified control from the container. + * + * @since 2.1 + * + * @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, 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); + + /** + * Removes the specified control from the container. + * + * @since 2.0 + * + * @return An error code + * @param[in] index The index of the control to remove + * @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, 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); + + /** + * Removes all the controls from the container. + * + * @since 2.0 + * + * @remarks The removed child controls are deleted from the memory. Before deletion, Control::OnTerminating() + * of the child control is called. + */ + void RemoveAllControls(void); + + /** + * Gets the control at the specified index of the list that is kept by the container. + * + * @since 2.0 + * + * @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 + */ + Control* GetControl(int index) const; + + /** + * Gets the control with the specified name. @n + * If there are multiple matches of the name, the first match is returned. + * + * @if OSPCOMPAT + * @brief [Compatibility] + * @endif + * @since 2.0 + * + * @if OSPCOMPAT + * @compatibility This method has compatibility issues with OSP compatible applications. @n + * For more information, see @ref CompGetControlPage "here". + * @endif + * + * @return The control having the specified name, @n + * else @c null if the name is not valid + * @param[in] name The name of the control + * @param[in] recursive Set to @c true to find a match recursively, @n + * else @c false + */ + Control* GetControl(const Tizen::Base::String& name, bool recursive = false) const; + + /** + * @if OSPCOMPAT + * @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 + * child controls are searched for from 2.1. + * + * @section CompGetControlPageSolutionSection Resolutions + * This issue has been resolved in Tizen. @n + * @endif + */ + + /** + * Gets the number of the controls in the container. + * + * @since 2.0 + * + * @return The number of controls in the container + */ + int GetControlCount(void) const; + + /** + * Gets a list of the controls of the container. + * + * @since 2.0 + * + * @return The list of the controls of the container + */ + Tizen::Base::Collection::IList* GetControls(void) const; + + /** + * Gets the portrait layout of the container. + * + * @since 2.0 + * + * @return The portrait layout of the container, @n + * 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. + */ + Layout* GetPortraitLayoutN(void) const; + + /** + * Gets the landscape layout of the container. + * + * @since 2.0 + * + * @return The landscape layout of the container, @n + * 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. + */ + Layout* GetLandscapeLayoutN(void) const; + + /** + * Gets the layout of the current orientation. + * + * @since 2.0 + * + * @return The layout of the current orientation, @n + * 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. + */ + Layout* GetLayoutN(void) const; + + /** + * Checks whether the specified control is a child or descendant of the container. + * + * @brief [Deprecated] + * @deprecated This method is deprecated. + * @since 2.0 + * + * @return @c true if the specified control is within the containment hierarchy of the container, @n + * else @c false + * @param[in] control The control + */ + bool IsAncestorOf(const Control& control) const; + + /** + * Checks whether a specified control is a child or descendant of the container. + * + * @since 2.1 + * + * @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 @c null. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + bool IsAncestorOf(const Control* pControl) const; + + /** + * Sets whether the specified child control must always be above other children. + * + * @since 2.0 + * + * @return An error code + * @param[in] control The child control + * @param[in] alwaysOnTop The Boolean value indicating that @c control + * must always be on the top + * @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 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); + + /** + * Sets whether the specified child control must always be below other children. + * + * @since 2.0 + * + * @return An error code + * @param[in] control The child 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. + * - 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); + + /** + * Checks whether the specified child control is always at the bottom of + * the drawing stack. + * + * @brief [Deprecated] + * @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 + * @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. + * @see SetControlAlwaysAtBottom() + */ + bool IsControlAlwaysAtBottom(const Tizen::Ui::Control& control) const; + + /** + * Checks whether a specified child control is always at the bottom of the drawing stack. + * + * @since 2.1 + * + * @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 . + * @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. + * + * @brief [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 + * 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. + * @see SetControlAlwaysOnTop() + */ + bool IsControlAlwaysOnTop(const Tizen::Ui::Control& control) const; + + /** + * Checks whether a specified child control is always at the top of the drawing stack. + * + * @since 2.1 + * + * @return @c true if a specified child control is set as always at the top, @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 + * @remarks The specific error code can be accessed using the GetLastResult() method. + * @see SetControlAlwaysOnTop() + */ + bool IsControlAlwaysOnTop(const Tizen::Ui::Control* pControl) const; + +protected: + /** + * 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 + */ + Container(void); + + /** + * Initializes this instance of %Container. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result Construct(void); + + /** + * Initializes this instance of %Container. + * + * @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 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); + + /** + * Initializes this instance of %Container. + * + * @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 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); + + /** + * Initializes this instance of %Container with the specified layout and rectangular region. + * + * @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 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); + + /** + * Initializes this instance of %Container 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 %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); + + /** + * Initializes this instance of %Container with the specified layouts and rectangular region. + * + * @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 + * 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 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); + + /** + * Initializes this instance of %Container with the specified layouts and rectangular region. + * + * @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 + * 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 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); + + /** + * Gets the index of the specified control. + * + * @brief [Deprecated] + * @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 + * @exception E_SUCCESS The method is successful. + * @exception E_OBJ_NOT_FOUND The specified instance of Control is not found. + * @see SetControlAt() + * + */ + result GetControlAt(const Control& control, int& index) const; + + /** + * 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() + * + */ + result GetControlAt(const Control* pControl, int& index) const; + + /** + * Sets the control at the specified index. + * + * @brief [Deprecated] + * @deprecated This method is deprecated. + * @since 2.0 + * + * @return An error code + * @param[in] control The control + * @param[in] index The index + * @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 @c control must be first added to this container. @n + * Call the Invalidate() method after this, to apply the change to be shown. + * @see GetControlAt() + * + */ + result SetControlAt(const Control& control, int index); + + /** + * Sets the control at a specified index. + * + * @since 2.1 + * + * @return An error code + * @param[in] pControl A pointer to the control + * @param[in] index The index + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE The specified @c index is out of range. + * @exception E_INVALID_ARG The specified @c pControl is @c null. + * @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 GetControlAt() + * + */ + result SetControlAt(Control* pControl, int index); + +protected: + /** + * Called to notify that the bounds of the control is changing. + * + * @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 + * @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 Control::SetBounds() + * @see Control::SetSize() + */ + virtual result OnBoundsChanging(const Tizen::Graphics::FloatRectangle& oldRect, const Tizen::Graphics::FloatRectangle& newRect); + + /** + * Called to notify that the bounds of the control is changed. + * + * @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 + * @see Control::SetBounds() + * @see Control::SetSize() + */ + virtual void OnBoundsChanged(const Tizen::Graphics::FloatRectangle& oldRect, const Tizen::Graphics::FloatRectangle& newRect); + + /** + * Overrides this method to indicate that the specified @c width and @c height + * can be supported or a new @c width and @c height should be applied instead + * of the specified values. + * + * @since 2.1 + * + * @return A Boolean flag that indicates whether the specified @c evaluatedSize + * is modified. + * @param[in, out] evaluatedSize The width and the height to evaluate + */ + virtual bool OnEvaluateSize(Tizen::Graphics::FloatDimension& evaluatedSize); + + // + // 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 Container_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 Container_Reserved5(void) {} + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + Container(const Container& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + Container& operator =(const Container& rhs); + +private: + friend class _ContainerImpl; +}; // Container + +}} //Tizen::Ui + +#endif //_FUI_CONTAINER_H_ diff --git a/inc/FUiControl.h b/inc/FUiControl.h new file mode 100644 index 0000000..09b973c --- /dev/null +++ b/inc/FUiControl.h @@ -0,0 +1,2201 @@ +// +// 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 FUiControl.h + * @brief This is the header file for the %Control class. + * + * This header file contains the declarations of the %Control class. + */ + +#ifndef _FUI_CONTROL_H_ +#define _FUI_CONTROL_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Animations { +class ControlAnimator; +class VisualElement; +}}} + +namespace Tizen { namespace Ui { + +class AccessibilityContainer; +class Container; +class _ControlImpl; +class TouchGestureDetector; + +/** + * @class Control + * @brief This class is the abstract base class of all the UI control classes. + * + * @since 2.0 + * + * @remarks In order for a control to be displayed, it must first be bound to a window of the underlying window system. The control's window is + * created when it (or its ancestor) is added to a valid control containment hierarchy. A containment hierarchy is valid if and + * only if the root of the hierarchy is an instance of the Window class. + * + * The %Control class is the abstract base class of all user interface elements. It encapsulates a + * "window" of the underlying window system, and provides the infrastructure necessary for the + * elements to respond to user inputs. The %Control class also determines how a key event is dispatched + * and processed. + * + * For more information on the class features, see UI Controls. + * + * + * The following examples demonstrate how to use the %Control class. + * + * Size and Position + * + * @code + * // Sets the size + * pControl->SetSize(100, 100); // 100 pixels wide and 100 pixels long + * + * // Sets the position + * pControl->SetPosition(5, 5); // Control is drawn 5 pixels down and 5 pixels left from the top-left corner of its parent + * @endcode + * + * Draw and Show + * + * @code + * // Gets a instance of Canvas + * Canvas* pCanvas = pControl->GetCanvasN(); + * + * // Fills the canvas with white color + * pCanvas->Clear(Tizen::Graphics::Color(255, 255, 255)); + * + * // Shows changes on screen + * pControl->Invalidate(true); + * + * delete pCanvas; + * @endcode + * + * Key and input focus + * + * @code + * // Implements MyKeyEventListener + * IKeyEventListener* pKeyListener = new MyKeyEventListener(); + * pControl->SetFocus(); + * + * // The added key listener should be deleted after use + * pControl->AddKeyEventListener(*pKeyListener); + * @endcode + * + */ +class _OSP_EXPORT_ Control + : public Tizen::Base::Object +{ + +public: + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~Control(void); + + /** + * 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 + * + * @param[in] listener The event listener to add + * @see RemoveFocusEventListener() + */ + void AddFocusEventListener(IFocusEventListener& listener); + + /** + * 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 + * + * @param[in] listener The event listener to add + * @see RemoveKeyEventListener() + */ + void AddKeyEventListener(IKeyEventListener& listener); + + /** + * 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 + * + * @param[in] listener The event listener to add + * @see RemoveTouchEventListener() + */ + void AddTouchEventListener(ITouchEventListener& listener); + + /** + * 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 + * + * @param[in] listener The event listener to add + * @see RemoveTouchModeChangedEventListener() + */ + void AddTouchModeChangedEventListener(Tizen::Ui::ITouchModeChangedEventListener& listener); + + /** + * 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 + * + * @param[in] listener The event listener to add + * @see RemoveDragDropEventListener() + */ + void AddDragDropEventListener(IDragDropEventListener& listener); + + /** + * 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 + * + * @param[in] listener The event listener to add + * @see RemoveDragDropEventListenerF() + */ + void AddDragDropEventListener(IDragDropEventListenerF& listener); + + /** + * Removes a focus listener instance. @n + * The removed listener is not notified when focus events are fired. + * + * @since 2.0 + * + * @param[in] listener The listener to remove + * @see AddFocusEventListener() + */ + void RemoveFocusEventListener(IFocusEventListener& listener); + + /** + * Removes a key event listener instance. @n + * The removed listener is not notified when key events are fired. + * + * @since 2.0 + * + * @param[in] listener The listener to remove + * @see AddKeyEventListener() + */ + void RemoveKeyEventListener(IKeyEventListener& listener); + + /** + * Removes a touch event listener instance. @n + * The removed listener is not notified when touch events are fired. + * + * @since 2.0 + * + * @param[in] listener The listener to remove + * @see AddTouchEventListener() + */ + void RemoveTouchEventListener(ITouchEventListener& listener); + + /** + * 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 + * + * @param[in] listener The listener to remove + * @see AddTouchModeChangedEventListener() + */ + void RemoveTouchModeChangedEventListener(Tizen::Ui::ITouchModeChangedEventListener& listener); + + /** + * 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 IDragDropEventListener::OnTouchDragged() + * @see IDragDropEventListener::OnTouchDropped() + * @see RemoveDragDropEventListener() + */ + void RemoveDragDropEventListener(IDragDropEventListener& listener); + + /** + * 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 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. @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. + * @see OnTerminating() + */ + virtual result OnInitializing(void); + + /** + * 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] + * @endif + * @since 2.0 + * + * @if OSPCOMPAT + * @compatibility This method has compatibility issues with OSP compatible applications. @n + * For more information, see @ref CompOnTerminatingPage "here". + * @endif + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_FAILURE The method has failed. + * @see OnInitializing() + */ + virtual result OnTerminating(void); + + /** + * @if OSPCOMPAT + * @page CompOnTerminatingPage Compatibility for OnTerminating() + * @section CompOnterminatingPageIssueSection Issues + * Implementation of this method in %Tizen API versions prior to 2.1 has the following issue: @n + * -# OnTerminating() callback is called from child to parent. + * + * @section CompOnTerminatingPageSolutionSection Resolutions + * The issue mentioned above is resolved in %Tizen API version 2.1 as follows: @n + * -# OnTerminating() callback is called from parent to child. + * @endif + */ + + /** + * 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 + * @see SendUserEvent() + */ + virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs); + + /** + * 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, 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); + + /** + * Checks whether the control is movable. + * + * @since 2.0 + * + * @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. + * - If the control is not movable, SetPosition() and SetBounds() return @c E_UNSUPPORTED_OPERATION. + */ + bool IsMovable(void) const; + + /** + * Checks whether the control is resizable. + * + * @since 2.0 + * + * @return @c true if the control is resizable, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @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; + + /** + * Gets the position and the size of the control. + * + * @since 2.0 + * + * @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 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; + + /** + * Gets the position and the size of the control. + * + * @since 2.1 + * + * @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 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; + + /** + * Gets the position and the size of the control. + * + * @since 2.0 + * + * @param[out] x The x position of top-left corner of the control + * @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 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; + + /** + * Gets the position and the size of the control. + * + * @since 2.1 + * + * @param[out] x The x position of top-left corner of the control + * @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 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; + + /** + * Gets the position of the control's top-left corner. + * + * @since 2.0 + * + * @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; + + /** + * Gets the position of the control's top-left corner. + * + * @since 2.1 + * + * @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; + + /** + * Gets the position of the control's top-left corner. + * + * @since 2.0 + * + * @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; + + /** + * Gets the position of the control's top-left corner. + * + * @since 2.1 + * + * @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; + + /** + * Gets the size of the control. + * + * @since 2.0 + * + * @return The size of the control + * @see GetBounds() + */ + Tizen::Graphics::Dimension GetSize(void) const; + + /** + * Gets the size of the control. + * + * @since 2.1 + * + * @return The size of the control + * @see GetBounds() + */ + Tizen::Graphics::FloatDimension GetSizeF(void) const; + + /** + * Gets the size of the control. + * + * @since 2.0 + * + * @param[out] width The width of the control + * @param[out] height The height of the control + * @see GetBounds() + */ + void GetSize(int& width, int& height) const; + + /** + * Gets the size of the control. + * + * @since 2.1 + * + * @param[out] width The width of the control + * @param[out] height The height of the control + * @see GetBounds() + */ + void GetSize(float& width, float& height) const; + + /** + * Gets the x position of the control. + * + * @since 2.0 + * + * @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() + */ + int GetX(void) const; + + /** + * Gets the x position of the control. + * + * @since 2.1 + * + * @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() + */ + float GetXF(void) const; + + /** + * Gets the y position of the control. + * + * @since 2.0 + * + * @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() + */ + int GetY(void) const; + + /** + * Gets the y position of the control. + * + * @since 2.1 + * + * @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() + */ + float GetYF(void) const; + + /** + * Gets the width of the control. + * + * @since 2.0 + * + * @return The width of the control + * @see GetBounds() + * @see GetSize() + * @see GetHeight() + */ + int GetWidth(void) const; + + /** + * Gets the width of the control. + * + * @since 2.1 + * + * @return The width of the control + * @see GetBounds() + * @see GetSizeF() + * @see GetHeightF() + */ + float GetWidthF(void) const; + + /** + * Gets the height of the control. + * + * @since 2.0 + * + * @return The height of the control + * @see GetBounds() + * @see GetSize() + * @see GetWidth() + */ + int GetHeight(void) const; + + /** + * Gets the height of the control. + * + * @since 2.1 + * + * @return The height of the control + * @see GetBounds() + * @see GetSizeF() + * @see GetWidthF() + */ + float GetHeightF(void) const; + + /** + * Gets the minimum size of the control. + * + * @since 2.0 + * + * @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 specific error code can be accessed using the GetLastResult() method. + */ + Tizen::Graphics::Dimension GetMinimumSize(void) const; + + /** + * Gets the minimum size of the control. + * + * @since 2.1 + * + * @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 specific error code can be accessed using the GetLastResult() method. + */ + Tizen::Graphics::FloatDimension GetMinimumSizeF(void) const; + + /** + * Gets the maximum size of the control. + * + * @since 2.0 + * + * @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 specific error code can be accessed using the GetLastResult() method. + */ + Tizen::Graphics::Dimension GetMaximumSize(void) const; + + /** + * Gets the maximum size of the control. + * + * @since 2.1 + * + * @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 specific error code can be accessed using the GetLastResult() method. + */ + Tizen::Graphics::FloatDimension GetMaximumSizeF(void) const; + + /** + * 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() + */ + Tizen::Base::String GetFont(void) const; + + /** + * Sets the position and size of the control. + * + * @since 2.0 + * + * @return An error code + * @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 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. + * @see IsMovable() + * @see IsResizable() + * @see GetMinimumSize() + * @see GetMaximumSize() + * @see SetPosition() + * @see SetSize() + */ + result SetBounds(const Tizen::Graphics::Rectangle& rect); + + /** + * Sets the position and size of the control. + * + * @since 2.1 + * + * @return An error code + * @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 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. + * @see IsMovable() + * @see IsResizable() + * @see GetMinimumSize() + * @see GetMaximumSize() + * @see SetPosition() + * @see SetSize() + */ + result SetBounds(const Tizen::Graphics::FloatRectangle& rect); + + /** + * Sets the position and size of the control. @n + * The position is set at (x, y), and the @c width and @c height parameters contain + * the width and height values of the object, respectively. + * + * @since 2.0 + * + * @return An error code + * @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 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. + * @see IsMovable() + * @see IsResizable() + * @see GetMinimumSize() + * @see GetMaximumSize() + * @see SetPosition() + * @see SetSize() + */ + result SetBounds(int x, int y, int width, int height); + + /** + * Sets the position and size of the control. @n + * The position is set at (x, y), and 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] 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 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. + * @see IsMovable() + * @see IsResizable() + * @see GetMinimumSize() + * @see GetMaximumSize() + * @see SetPosition() + * @see SetSize() + */ + result SetBounds(float x, float y, float width, float height); + + /** + * Sets the relative position of the control. + * + * @since 2.0 + * + * @return An error code + * @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 yet. + * @exception E_UNSUPPORTED_OPERATION This control is not movable. + * @exception E_SYSTEM A system error has occurred. + * @see IsMovable() + * @see SetBounds() + */ + result SetPosition(const Tizen::Graphics::Point& position); + + /** + * Sets the relative position of the control. + * + * @since 2.1 + * + * @return An error code + * @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 yet. + * @exception E_UNSUPPORTED_OPERATION This control is not movable. + * @exception E_SYSTEM A system error has occurred. + * @see IsMovable() + * @see SetBounds() + */ + result SetPosition(const Tizen::Graphics::FloatPoint& position); + + /** + * Sets the position of the control. + * + * @since 2.0 + * @return An error code + * @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 yet. + * @exception E_UNSUPPORTED_OPERATION This control is not movable. + * @exception E_SYSTEM A system error has occurred. + * @see IsMovable() + * @see SetBounds() + */ + result SetPosition(int x, int y); + + /** + * Sets the position of the control. + * + * @since 2.1 + * @return An error code + * @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 yet. + * @exception E_UNSUPPORTED_OPERATION This control is not movable. + * @exception E_SYSTEM A system error has occurred. + * @see IsMovable() + * @see SetBounds() + */ + result SetPosition(float x, float y); + + /** + * Sets the size of the control. + * + * @since 2.0 + * + * @return An error code + * @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 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. + * @see IsResizable() + * @see GetMinimumSize() + * @see GetMaximumSize() + * @see SetBounds() + */ + result SetSize(const Tizen::Graphics::Dimension& size); + + /** + * Sets the size of the control. + * + * @since 2.1 + * + * @return An error code + * @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 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. + * @see IsResizable() + * @see GetMinimumSize() + * @see GetMaximumSize() + * @see SetBounds() + */ + result SetSize(const Tizen::Graphics::FloatDimension& size); + + /** + * Sets the size of the control. + * + * @since 2.0 + * + * @return An error code + * @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 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. + * @see IsResizable() + * @see GetMinimumSize() + * @see GetMaximumSize() + * @see SetBounds() + */ + result SetSize(int width, int height); + + /** + * Sets the size of the control. + * + * @since 2.1 + * + * @return An error code + * @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 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. + * @see IsResizable() + * @see GetMinimumSize() + * @see GetMaximumSize() + * @see SetBounds() + */ + result SetSize(float width, float height); + + /** + * Sets the minimum size of the control. + * + * @since 2.0 + * + * @return An error code + * @param[in] newMinDim The new minimum 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 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); + + /** + * Sets the minimum size of the control. + * + * @since 2.1 + * + * @return An error code + * @param[in] newMinDim The new minimum 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 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); + + /** + * Sets the maximum size of the control. + * + * @since 2.0 + * + * @return An error code + * @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. + * - 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); + + /** + * Sets the maximum size of the control. + * + * @since 2.1 + * + * @return An error code + * @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. + * - 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); + + /** + * Converts the specified screen position to the position in control's coordinate system. + * + * @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() + */ + Tizen::Graphics::Point ConvertToControlPosition(const Tizen::Graphics::Point& screenPosition) const; + + /** + * Converts the specified screen position to the position in control's coordinate system. + * + * @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() + */ + Tizen::Graphics::FloatPoint ConvertToControlPosition(const Tizen::Graphics::FloatPoint& screenPosition) const; + + /** + * Converts the specified position in the control's coordinate system to the screen position. + * + * @since 2.0 + * + * @return The position relative to the top-left corner of the screen + * @param[in] controlPosition The position relative to the top-left corner of the control's client-area + * @see ConvertToControlPosition() + */ + Tizen::Graphics::Point ConvertToScreenPosition(const Tizen::Graphics::Point& controlPosition) const; + + /** + * Converts the specified position in the control's coordinate system to the screen position. + * + * @since 2.1 + * + * @return The position relative to the top-left corner of the screen + * @param[in] controlPosition The position relative to the top-left corner of the control's client-area + * @see ConvertToControlPosition() + */ + Tizen::Graphics::FloatPoint ConvertToScreenPosition(const Tizen::Graphics::FloatPoint& controlPosition) const; + + /** + * Sets the font of the control. + * + * @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(). + * 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(). + * - 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); + + /** + * Checks whether the specified @c point is inside the control. + * + * @since 2.0 + * + * @return @c true if the specified @c point is inside the control, @n + * else @c false + * @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; + + /** + * Checks whether the specified @c point is inside the control. + * + * @since 2.1 + * + * @return @c true if the specified @c point is inside the control, @n + * else @c false + * @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; + + /** + * Checks whether the specified point is inside the control. + * + * @since 2.0 + * + * @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 @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; + + /** + * Checks whether the specified point is inside the control. + * + * @since 2.1 + * + * @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 @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; + + /** + * Draws child controls recursively. + * + * @if OSPCOMPAT + * @brief [Compatibility] + * @endif + * @since 2.0 + * + * @if OSPCOMPAT + * @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() + */ + result Draw(void); + + /** + * @if OSPCOMPAT + * @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 + * -# The Draw() method draws child controls in a recursive way regardless of the visibility of the parent. + * + * @section CompDrawPageSolutionSection Resolutions + * The issue mentioned above is resolved in %Tizen API version 2.1 as follows: @n + * -# The Draw() method does not draw child controls if the control itself is not visible. + * @endif + */ + + /** + * Draws the control. + * + * @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. + * @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(bool recursive); + + /** + * 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. + * + * @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. + */ + virtual result Show(void); + + /** + * Invalidates the control. + * + * @since 2.0 + * + * @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. + * - OnDraw() is not called immediately, but called asynchronously just before the screen is updated. + * @see InvalidateBounds() + * @see Show() + */ + void Invalidate(bool recursive); + + /** + * Invalidates the control of the specified position and size. + * + * @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. + * @see Invalidate() + * @see Show() + */ + void InvalidateBounds(const Tizen::Graphics::Rectangle& bounds); + + /** + * Invalidates the control of the specified position and size. + * + * @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. + * @see Invalidate() + * @see Show() + */ + void InvalidateBounds(const Tizen::Graphics::FloatRectangle& bounds); + + /** + * 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 + * else @c false + */ + void RequestRedraw(bool show = true) const; + + /** + * Creates and returns a graphics canvas whose bounds (that is, position and size) are equal to those + * of the control. + * + * @since 2.0 + * + * @return The graphic canvas of the control, @n + * else @c null if an exception occurs + * @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 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) + * { + * result r = E_SUCCESS; + * Canvas* pCanvas = GetCanvasN(); + * if (pCanvas != null) + * { + * // adds your drawing code here + * + * delete pCanvas; + * } + * Form::OnDraw(); + * // Do not call Show(). It will be called automatically after OnDraw() callback. + * return r; + * } + * @endcode + */ + Tizen::Graphics::Canvas* GetCanvasN(void) const; + + /** + * Creates and returns a graphic canvas of the control of the specified position and size. + * + * @since 2.0 + * + * @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. + * @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 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; + + /** + * Creates and returns a graphic canvas of the control of the specified position and size. + * + * @since 2.1 + * + * @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. + * @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; + + /** + * Creates and returns a graphic canvas of the specified position and size in the control. + * + * @since 2.0 + * + * @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 + * @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 + * - 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; + + /** + * Creates and returns a graphic canvas of the specified position and size in the control. + * + * @since 2.1 + * + * @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 + * @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 + * - 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; + + /** + * Checks whether the control is currently visible on the screen. + * + * @since 2.0 + * + * @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() + */ + bool IsVisible(void) const; + + /** + * Gets the current show state of the control. + * + * @since 2.0 + * + * @return The show state of the control + * @remarks Even if the control's state is "show", the control may not be visible. + * @see SetShowState() + * @see IsVisible() + */ + bool GetShowState(void) const; + + /** + * Sets the show state of the control. + * + * @since 2.0 + * + * @return An error code + * @param[in] state The new show state + * @exception E_SUCCESS The method is successful. + * @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 + * - 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 a dedicated %VisualElement instance for this control. + * + * @since 2.0 + * + * @return An instance of the VisualElement + * @remarks If an application developer modifies the state of the returned VisualElement + * and the host control is not aware of this change, then the control may behave egregiously. + * It is highly recommended to restore the %VisualElement state to avoid such conflicts. + */ + Tizen::Ui::Animations::VisualElement* GetVisualElement(void) const; + + /** + * Gets the parent of the control. + * + * @since 2.0 + * + * @return The current parent of the control + */ + Container* GetParent(void) const; + + /** + * Gets the name of the control. + * + * @since 2.0 + * + * @return The name of the control + */ + Tizen::Base::String GetName(void) const; + + /** + * Sets the name of the control. + * + * @since 2.0 + * + * @param[in] name The name of the control + */ + void SetName(const Tizen::Base::String& name); + + /** + * Checks whether the control is focusable. + * + * @since 2.0 + * + * @return @c true if control is focusable, @n + * else @c false + * @remarks The focus ability of the container classes like Panel is @c false by default. + */ + bool IsFocusable(void) const; + + /** + * Sets the focus ability of the control. @n + * Non-Focusable controls cannot take the key focus. + * + * @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. + * 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. + * - The RadioGroup class does not render the UI. + * Therefore, RadioGroup::SetFocusable() returns @c E_SYSTEM. + */ + result SetFocusable(bool focusable); + + /** + * Checks whether the control currently has the input focus. + * + * @since 2.0 + * + * @return @c true if the control currently has the input focus, @n + * 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; + + /** + * Sets the focus to the control. @n + * This method is called if the control needs to listen to user input events such as key pressed. + * + * @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. + * 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. + */ + result SetFocus(void); + + /** + * Checks whether the control is enabled. + * + * @since 2.0 + * + * @return @c true if the control is enabled, @n + * 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; + + /** + * Enables or disables the control. @n + * Only an enabled control can respond to the user input. By default, the control is enabled. + * + * @since 2.0 + * + * @return An error code + * @param[in] enable The new state of the object + * @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. + */ + result SetEnabled(bool enable); + + /** + * Checks whether the device is in touch mode. @n + * When the user interacts with the device by touching it, the device is in touch mode. + * + * @since 2.0 + * + * @return @c true if the device is in touch mode, @n + * 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; + + /** + * Enables or disables the drag operation in the %Control. + * + * @since 2.0 + * + * @param[in] enable Set to @c true to enable the drag operation, @n + * else @c false + * @see SetDropEnabled() + */ + void SetDragEnabled(bool enable); + + /** + * Enables or disables the drop operations in the %Control. + * + * @since 2.0 + * + * @param[in] enable Set to @c true to enable drop operations, @n + * 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. @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 + * @see OnUserEventReceivedN() + */ + void SendUserEvent(RequestId requestId, const Tizen::Base::Collection::IList* pArgs) const; + + /** + * 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. + * @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. + * - 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); + + /** + * Gets the control animator of the current instance of %Control. + * + * @since 2.0 + * + * @return A pointer to ControlAnimator, @n + * else @c null if this instance is not constructed or not added to a parent or non-animatable + */ + Tizen::Ui::Animations::ControlAnimator* GetControlAnimator(void) const; + + /** + * Adds the gesture detector to the %Control. @n + * The added gesture detector receives touch events prior to %Control. + * + * @brief [Deprecated] + * @deprecated This method is deprecated. + * @since 2.0 + * + * @return An error code + * @param[in] gestureDetector The gesture detector + * @exception E_SUCCESS The method is successful. + * @see RemoveGestureDetector() + */ + result AddGestureDetector(const TouchGestureDetector& gestureDetector); + + /** + * Adds a gesture detector to the %Control. @n + * The added gesture detector receives touch events prior to %Control. + * + * @since 2.1 + * + * @return An error code + * @param[in] pGestureDetector A pointer to gesture detector + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified @c pGestureDetector is @c null. + * @see RemoveGestureDetector() + */ + result AddGestureDetector(TouchGestureDetector* pGestureDetector); + + /** + * Removes the gesture detector from the %Control. + * + * @brief [Deprecated] + * @deprecated This method is deprecated. + * @since 2.0 + * + * @return An error code + * @param[in] gestureDetector The gesture detector + * @exception E_SUCCESS The method is successful. + * @see AddGestureDetector() + */ + result RemoveGestureDetector(const TouchGestureDetector& gestureDetector); + + /** + * Removes a gesture detector from the %Control. + * + * @since 2.1 + * + * @return An error code + * @param[in] pGestureDetector A pointer to gesture detector + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified @c pGestureDetector is @c null. + * @see AddGestureDetector() + */ + result RemoveGestureDetector(TouchGestureDetector* pGestureDetector); + + /** + * @if OSPDEPREC + * Gets the composite mode for merging with other controls. + * + * @brief [Deprecated] + * @deprecated This method is deprecated because changing composition mode is not allowed any more. + * @since 2.0 + * + * @return The composite mode + * @exception E_SUCCESS The method is successful. + * @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; + + /** + * @if OSPDEPREC + * Sets the composite mode for merging with other controls. + * + * @brief [Deprecated] + * @deprecated This method is deprecated because changing composition mode is not allowed any more. + * @since 2.0 + * + * @return An error code + * @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. + * Otherwise, this method returns @c E_UNSUPPORTED_OPERATION. + * @endif + */ + result SetCompositeMode(Tizen::Ui::CompositeMode compositeMode); + + /** + * @if OSPDEPREC + * Gets the chroma key color value that is used for the control composition. + * + * @brief [Deprecated] + * @deprecated This method is deprecated because chromakey color is not supported any more. + * @since 2.0 + * + * @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). + * - The specific error code can be accessed using the GetLastResult() method. + * @endif + */ + Tizen::Graphics::Color GetChromaKeyColor(void) const; + + /** + * @if OSPDEPREC + * Sets the chroma key color value that is used for the control composition. + * + * @brief [Deprecated] + * @deprecated This method is deprecated because chromakey color is not supported any more. + * @since 2.0 + * + * @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. + * @endif + */ + result SetChromaKeyColor(Tizen::Graphics::Color chromaKeyColor); + + /** + * Sets the bounds of the content area. + * + * @since 2.1 + * + * @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); + + /** + * Sets the bounds of the content area. + * + * @since 2.1 + * + * @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); + + /** + * Gets the bounds of the content area. + * + * @since 2.1 + * + * @return The bounds of the content area + * @see SetContentAreaBounds() + */ + Tizen::Graphics::Rectangle GetContentAreaBounds(void) const; + + /** + * Gets the bounds of the content area. + * + * @since 2.1 + * + * @return The bounds of the content area + * @see SetContentAreaBounds() + */ + Tizen::Graphics::FloatRectangle GetContentAreaBoundsF(void) const; + + /** + * Captures the composited scene of the %Panel control. + * + * @since 2.0 + * + * @return A Tizen::Graphics::Bitmap instance that captures the current composited scene of the Panel control, @n + * else @c null if an error occurs + * @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. + * - This method is not supported in the following class that is derived from Panel class: + * @li OverlayPanel + * - 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; + + /** + * Gets the position and the size of the invalidated bounds. + * + * @since 2.0 + * + * @return An instance of Tizen::Graphics::Rectangle that represents the position of top-left corner, + * the width, and the height of the invalidated bounds + */ + Tizen::Graphics::Rectangle GetInvalidatedBounds(void) const; + + /** + * Gets the position and the size of the invalidated bounds. + * + * @since 2.1 + * + * @return An instance of Tizen::Graphics::Rectangle that represents the position of top-left corner, + * the width, and the height of the invalidated bounds + */ + Tizen::Graphics::FloatRectangle GetInvalidatedBoundsF(void) const; + + /** + * Enables or disables the multi-point touch of the %Control. + * + * @since 2.0 + * + * @param[in] enable A Boolean flag indicating whether to enable the multi-point touch + * + * @see IsMultipointTouchEnabled() + */ + void SetMultipointTouchEnabled(bool enable); + + /** + * Checks whether the multi-point touch is enabled. + * + * @since 2.0 + * + * @return @c true if the multi-point touch is enabled, @n + * else @c false + * @see SetMultipointTouchEnabled() + */ + bool IsMultipointTouchEnabled(void) const; + + /** + * Gets the accessibility container. + * + * @since 2.0 + * + * @return The accessibility container of the control, if the control supports accessibility feature, @n + * else @c null + * @see AccessibilityContainer::GetOwner() + */ + const AccessibilityContainer* GetAccessibilityContainer(void) const; + + /** + * Gets the accessibility container. + * + * @since 2.0 + * + * @return The accessibility container of the control, if the control supports accessibility feature, @n + * else @c null + * @see AccessibilityContainer::GetOwner() + */ + AccessibilityContainer* GetAccessibilityContainer(void); + + /** + * 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 @n + * Pass @c null to unregister the event listener. + * @remarks The specified event listener should be allocated in heap memory. + */ + void SetPropagatedTouchEventListener(IPropagatedTouchEventListener* pListener); + + /** + * 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 @n + * Pass @c null to unregister the event listener. + * @remarks The specified event listener should be allocated in heap memory. + */ + void SetPropagatedKeyEventListener(IPropagatedKeyEventListener* pListener); + + + /** + * Sets the previous focus of the control. + * + * @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. + * - The platform will not take the ownership of @c pPreviousFocus after this call. + * @see SetNextFocus() + * @see GetPreviousFocus() + */ + void SetPreviousFocus(Control* pPreviousFocus); + + /** + * Sets the next focus of the control. + * + * @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. + * - The platform will not take the ownership of @c pNextFocus after this call. + * @see SetPreviousFocus() + * @see GetNextFocus() + */ + void SetNextFocus(Control* pNextFocus); + + /** + * Gets the previous focus of the control. + * + * @since 2.1 + * + * @return The pointer to the previous focus of the control, @n + * else @c null if the previous focus of the control is not set + * @see GetNextFocus() + * @see SetNextFocus () + */ + Control* GetPreviousFocus(void) const; + + + /** + * Gets the next focus of the control. + * + * @since 2.1 + * + * @return The pointer to the next focus of the control, @n + * else @c null if the next focus of the control is not set + * @see GetPreviousFocus() + * @see SetPreviousFocus () + */ + Control* GetNextFocus(void) const; + + /** + * 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 This method is offered to control sensitivity of move events. + */ + void SetTouchPressThreshold(float distance); + + /** + * Gets the touch press threshold of the Control in inch. + * If the threshold has not been set, it returns the default value. + * + * @since 2.1 + * + * @return The threshold to fire touch move event + */ + float GetTouchPressThreshold(void) const; + + + /** + * Sets the font of the control with the specified file name. + * + * @since 2.1 + * + * @return An error code + * @param[in] fileName The file name of a font-resource located in @b ‘/res/font’, @n + * else 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. + * @see GetFontFile() + */ + result SetFontFromFile(const Tizen::Base::String& fileName); + + /** + * Gets a font file name of the control. + * + * @since 2.1 + * + * @return The font name set in the control, @n + * else an empty string if the font is not set + * @see SetFontFromFile() + */ + Tizen::Base::String GetFontFile(void) const; + + /** + * Enables or disables the effect sound for this control. + * + * @since 2.2 + * + * @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. + */ + void SetEffectSoundEnabled (bool enable); + + /** + * Checks whether the effect sound for this control is enabled. + * + * @since 2.2 + * + * @return @c true if the effect sound is enabled, @n + * else @c false + */ + bool IsEffectSoundEnabled (void) const ; + +protected: + /** + * Gets the default key event listener. + * + * @brief [Deprecated] + * @deprecated This method is deprecated. + * @since 2.0 + * + * @return The default key event listener @n + * If no listener has been set or a system error has occurred @c null is returned. + * @see SetDefaultKeyEventListener() + */ + IKeyEventListener* GetDefaultkeyEventListener(void) const; + + /** + * Gets the default touch event listener. + * + * @brief [Deprecated] + * @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. + * @see SetDefaultTouchEventListener() + */ + ITouchEventListener* GetDefaultTouchEventListener(void) const; + + /** + * 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. + * @see GetDefaultkeyEventListener() + */ + result SetDefaultKeyEventListener(IKeyEventListener* pDefaultListener); + + /** + * 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. + * @see GetDefaultTouchEventListener() + */ + result SetDefaultTouchEventListener(ITouchEventListener* pDefaultListener); + + /** + * 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 + */ + Control(void); + + /** + * This method is for internal use only. Using this method can cause behavioral, security-related, + * and consistency-related issues in the application. + * + * Initializes this instance of %Control. + * + * @since 2.0 + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result Construct(void); + + /** + * Frees the resources allocated by Construct(). + * + * @since 2.0 + */ + void Dispose(void); + +protected: + _ControlImpl* _pControlImpl; + + // + // 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 Control_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 Control_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 Control_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 Control_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 Control_Reserved5(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 Control_Reserved6(void) {} + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + Control(const Control& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + Control& operator =(const Control& rhs); + +private: + friend class _ControlImpl; +}; // Control + +}} // Tizen::Ui + +#endif // _FUI_CONTROL_H_ diff --git a/inc/FUiControls.h b/inc/FUiControls.h new file mode 100644 index 0000000..e600fd7 --- /dev/null +++ b/inc/FUiControls.h @@ -0,0 +1,334 @@ +// +// 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 FUiControls.h + * @brief This is the header file for the %Controls namespace. + * + * This header file contains the declarations and descriptions of the Controls namespace. + */ + +#ifndef _FUI_CONTROLS_H_ +#define _FUI_CONTROLS_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace Tizen +{ +/** + * @namespace Tizen::Ui::Controls + * @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 + * @b Library : @b osp-uifw + * + * The %Ui::Controls namespace contains classes that have graphical representations that can be displayed on the screen as UI elements and with + * which the user can interact. + * + * For more information on the %Ui::Controls namespace features, see UI Controls Guide. + * + */ + +namespace Ui +{ + +namespace Controls +{ + +/** + * @if OSPDEPREC + * 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 + * + * @remarks Different color values can be defined for different device models. + * @endif + */ +_OSP_EXPORT_ extern const Tizen::Graphics::Color SYSTEM_COLOR_TITLE_TEXT; + +/** + * @if OSPDEPREC + * 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 + * + * @remarks Different color values can be defined for different device models. + * @endif + */ +_OSP_EXPORT_ extern const Tizen::Graphics::Color SYSTEM_COLOR_BODY_TEXT; + +/** + * @if OSPDEPREC + * 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 + * + * @remarks Different color values can be defined for different device models. + * @endif + */ +_OSP_EXPORT_ extern const Tizen::Graphics::Color SYSTEM_COLOR_FOREGROUND; + +/** + * @if OSPDEPREC + * 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 + * + * @remarks Different color values can be defined for different device models. + * @endif + */ +_OSP_EXPORT_ extern const Tizen::Graphics::Color SYSTEM_COLOR_BACKGROUND; + +/** + * @if OSPDEPREC + * 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 + * + * @remarks Different color values can be defined for different device models. + * @endif + */ +_OSP_EXPORT_ extern const Tizen::Graphics::Color SYSTEM_COLOR_LIST_BACKGROUND; + +/** + * @if OSPDEPREC + * 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 + * + * @remarks Different color values can be defined for different device models. + * @endif + */ +_OSP_EXPORT_ extern const Tizen::Graphics::Color SYSTEM_COLOR_FORM_BACKGROUND; + +/** + * @if OSPDEPREC + * 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 + * + * @remarks Different color values can be defined for different device models. + * @endif + */ +_OSP_EXPORT_ extern const Tizen::Graphics::Color SYSTEM_COLOR_FORM_GROUP_BACKGROUND; + +/** + * @if OSPDEPREC + * 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 + * + * @remarks Different color values can be defined for different device models. + * @endif + */ +_OSP_EXPORT_ extern const Tizen::Graphics::Color SYSTEM_COLOR_POPUP_BACKGROUND; + +/** + * @if OSPDEPREC + * 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 + * + * @remarks Different color values can be defined for different device models. + * @endif + */ +_OSP_EXPORT_ extern const Tizen::Graphics::Color SYSTEM_COLOR_GROUP_ITEM_TEXT; + +/** + * @if OSPDEPREC + * 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 + * + * @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. + * + * @brief [Deprecated] + * @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. + * @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 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 + * + * @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; + +}; // Tizen::Ui::Controls +}; // Tizen::Ui +}; // Tizen +#endif // _FUI_CONTROLS_H_ diff --git a/inc/FUiCtrlAnimation.h b/inc/FUiCtrlAnimation.h new file mode 100644 index 0000000..321343c --- /dev/null +++ b/inc/FUiCtrlAnimation.h @@ -0,0 +1,365 @@ +// +// 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 FUiCtrlAnimation.h + * @brief This header file contains the declarations of the %Animation class. + * + * This header file contains the declarations of the %Animation class and its helper classes. + */ + +#ifndef _FUI_CTRL_ANIMATION_H_ +#define _FUI_CTRL_ANIMATION_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @enum AnimationStatus + * + * Defines the animation status. + * + * @since 2.0 + */ +enum AnimationStatus +{ + ANIMATION_STOPPED, /**< The %Animation is in 'stopped' state */ + ANIMATION_PAUSED, /**< The %Animation is in 'paused' state */ + ANIMATION_PLAYING /**< The %Animation is in 'playing' state */ +}; + + +/** + * @class Animation + * @brief This class defines the common behavior of an %Animation control. + * + * @since 2.0 + * + * The %Animation class displays a series of frames one by one that are represented by the AnimationFrame instances. + * + * For more information on the class features, see Animation. + * + * + * The following example demonstrates how to use the %Animation class. + * + * + * @code +// Sample code for AnimationSample.h +#include +#include + +class AnimationSample + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::IAnimationEventListener +{ +public: + AnimationSample(void) + : __animationFrameList(){} + + bool Initialize(void); + virtual result OnInitializing(void); + virtual result OnTerminating(void); + + // IAnimationEventListener + virtual void OnAnimationStopped(const Tizen::Ui::Control& source); + +private : + Tizen::Base::Collection::ArrayList __animationFrameList; +}; + + * @endcode + * + * @code + +// Sample code for AnimationSample.cpp +#include +#include + +#include "AnimationSample.h" + +using namespace Tizen::App; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; +using namespace Tizen::Ui::Controls; + +bool +AnimationSample::Initialize(void) +{ + Construct(FORM_STYLE_NORMAL); + return true; +} + +result +AnimationSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + // Gets instances of Bitmap + AppResource *pAppResource = Application::GetInstance()->GetAppResource(); + Bitmap* pBitmap1 = pAppResource->GetBitmapN(L"progressing00_big.png"); + Bitmap* pBitmap2 = pAppResource->GetBitmapN(L"progressing02_big.png"); + Bitmap* pBitmap3 = pAppResource->GetBitmapN(L"progressing04_big.png"); + Bitmap* pBitmap4 = pAppResource->GetBitmapN(L"progressing06_big.png"); + + // Creates instances of AnimationFrame + AnimationFrame* pAniFrame1 = new AnimationFrame(*pBitmap1, 1000) ; + AnimationFrame* pAniFrame2 = new AnimationFrame(*pBitmap2, 1000) ; + AnimationFrame* pAniFrame3 = new AnimationFrame(*pBitmap3, 1000) ; + AnimationFrame* pAniFrame4 = new AnimationFrame(*pBitmap4, 1000) ; + + __animationFrameList.Construct(); + __animationFrameList.Add(*pAniFrame1); + __animationFrameList.Add(*pAniFrame2); + __animationFrameList.Add(*pAniFrame3); + __animationFrameList.Add(*pAniFrame4); + + // Creates an instance of Animation + Animation* pAnimation = new Animation(); + pAnimation->Construct(Rectangle((GetClientAreaBounds().width - pBitmap1->GetWidth()) / 2, 100, + pBitmap1->GetWidth(), pBitmap1->GetHeight()), __animationFrameList); + pAnimation->SetRepeatCount(100); + pAnimation->AddAnimationEventListener(*this); + + // Adds the animation to the form + AddControl(pAnimation); + + // Plays the animation + pAnimation->Play(); + + delete pBitmap1; + delete pBitmap2; + delete pBitmap3; + delete pBitmap4; + + return r; +} + +result +AnimationSample::OnTerminating(void) +{ + result r = E_SUCCESS; + + // Deallocates added animation frames from the list + __animationFrameList.RemoveAll(true); + + return r; +} + +void +AnimationSample::OnAnimationStopped(const Control& source) +{ + // .... +} + * @endcode + * + */ +class _OSP_EXPORT_ Animation + : public Tizen::Ui::Control +{ + +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. + * + * @since 2.0 + */ + Animation(void); + + + /** + * 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 ~Animation(void); + + + /** + * Initializes this instance of %Animation with the specified parameters. @n + * The @c aniFrames list of the AnimationFrame instances should be deleted explicitly after use. + * + * @since 2.0 + * + * @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 + * 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 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. + */ + result Construct(const Tizen::Graphics::Rectangle& rect, const Tizen::Base::Collection::IList& aniFrames); + + /** + * Initializes this instance of %Animation with the specified parameters. @n + * The @c aniFrames list of the AnimationFrame instances should be deleted explicitly after use. + * + * @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 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 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. + */ + result Construct(const Tizen::Graphics::FloatRectangle& rect, const Tizen::Base::Collection::IList& aniFrames); + +public: + /** + * Adds a listener instance to the current instance of %Animation. @n + * The added listener can listen to the events on the given event dispatcher's context when they are fired. @n + * When an animation stops, a state change event with the state name "ANIMATION_NOTIFY_CLOSE" is fired. + * + * @since 2.0 + * + * @param[in] listener The listener to add + */ + void AddAnimationEventListener(Tizen::Ui::IAnimationEventListener& listener); + + + /** + * Removes a listener instance from the current instance of %Animation. @n + * The removed listener cannot listen to the events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The listener to remove + */ + void RemoveAnimationEventListener(Tizen::Ui::IAnimationEventListener& listener); + + + /** + * Sets the repeat count of the animation. + * + * @since 2.0 + * + * @param[in] count The repeat count @n + * If this value is not set, the default value is @c 1. + */ + void SetRepeatCount(int count); + + + /** + * Gets the total repeat count of the animation. + * + * @since 2.0 + * + * @return The total repeat count @n + * The default repeat count is @c 1. + */ + int GetRepeatCount(void) const; + + + /** + * Gets the current repeated count of the animation. + * + * @since 2.0 + * + * @return The current repeated count @n + * The default current repeated count is @c 0. + */ + int GetCurrentRepeatedCount(void) const; + + + /** + * Gets the total image count of the animation. + * + * @since 2.0 + * + * @return The total image count @n + * The default image count is @c 0. + */ + int GetImageCount(void) const; + + + /** + * Plays the animation. + * + * @since 2.0 + */ + void Play(void); + + + /** + * Stops the animation. + * + * @since 2.0 + */ + void Stop(void); + + + /** + * Pauses the animation. + * + * @since 2.0 + */ + void Pause(void); + + + /** + * Gets the status of the animation. + * + * @since 2.0 + * + * @return The status of animation @n + * The default animation status is @c ANIMATION_STOPPED. + */ + AnimationStatus GetStatus(void) const; + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + Animation(const Animation& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + Animation& operator =(const Animation& rhs); + + friend class _AnimationImpl; + +}; // Animation + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_ANIMATION_H_ diff --git a/inc/FUiCtrlAnimationFrame.h b/inc/FUiCtrlAnimationFrame.h new file mode 100644 index 0000000..2f8a4f9 --- /dev/null +++ b/inc/FUiCtrlAnimationFrame.h @@ -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 FUiCtrlAnimationFrame.h + * @brief This is the header file for the %AnimationFrame class. + * + * This header file contains the declarations of the %AnimationFrame class and its helper classes. + */ + +#ifndef _FUI_CTRL_ANIMATION_FRAME_H_ +#define _FUI_CTRL_ANIMATION_FRAME_H_ + +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _AnimationFrameImpl; + +/** + * @class AnimationFrame + * @brief This class defines the common behavior of an %AnimationFrame control. + * + * @since 2.0 + * + * The %AnimationFrame class defines the common behavior of an %AnimationFrame control. @n + * An animation frame includes an image to be displayed and its duration. + * The duration indicates how long the image is displayed when the animation is playing. + * + * For more information on the class features, see Animation. + * + */ +class _OSP_EXPORT_ AnimationFrame + : public Tizen::Base::Object +{ + +public: + /** + * This is the default constructor for this class. + * + * @since 2.0 + */ + AnimationFrame(void); + + /** + * Initializes this instance of %AnimationFrame with the specified image and duration. + * + * @since 2.0 + * + * @param[in] frame The bitmap to display + * @param[in] duration The duration in milliseconds for which the bitmap is displayed + */ + AnimationFrame(const Tizen::Graphics::Bitmap& frame, long duration); + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + ~AnimationFrame(void); + + /** + * Sets the bitmap to be displayed during animation play. + * + * @since 2.0 + * + * @param[in] frame The bitmap to display + */ + void SetFrame(const Tizen::Graphics::Bitmap& frame); + + /** + * Gets the bitmap to be displayed. + * + * @since 2.0 + * + * @return The bitmap + */ + const Tizen::Graphics::Bitmap* GetFrame(void) const; + + /** + * Sets the duration for which the bitmap is displayed. + * + * @since 2.0 + * + * @param[in] duration The duration in milliseconds for which the bitmap is displayed + */ + void SetDuration(long duration); + + /** + * Gets the duration for which the bitmap is displayed. + * + * @since 2.0 + * + * @return The duration value + */ + long GetDuration(void) const; + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + AnimationFrame(const AnimationFrame& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + AnimationFrame& operator =(const AnimationFrame& rhs); + +private: + _AnimationFrameImpl* __pAnimationFrameImpl; + +}; // AnimationFrame + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_ANIMATION_FRAME_H_ diff --git a/inc/FUiCtrlButton.h b/inc/FUiCtrlButton.h new file mode 100644 index 0000000..1961375 --- /dev/null +++ b/inc/FUiCtrlButton.h @@ -0,0 +1,625 @@ +// +// 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 FUiCtrlButton.h + * @brief This is the header file for the %Button class. + * + * This header file contains the declarations of the %Button class and its helper classes. + */ + +#ifndef _FUI_CTRL_BUTTON_H_ +#define _FUI_CTRL_BUTTON_H_ + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ +/** + * @enum ButtonStatus + * + * Defines the %Button control status. + * + * @since 2.0 + */ +enum ButtonStatus +{ + BUTTON_STATUS_NORMAL, /**< The normal status */ + BUTTON_STATUS_DISABLED, /**< The disabled status */ + BUTTON_STATUS_PRESSED, /**< The pressed status */ + BUTTON_STATUS_HIGHLIGHTED /**< The highlighted status */ +}; + +/** + * @class Button + * @brief This class defines the common behavior of a %Button control. + * + * @since 2.0 + * + * The %Button class displays a rectangular area that can be pressed. + * + * For more information on the class features, see Buttons. + * + * The following example demonstrates how to use the %Button class. + * + * + * @code +// Sample code for ButtonSample.h +#include + +class ButtonSample + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::IActionEventListener +{ +public: + ButtonSample(void) + : __pButton(null) + , __pBitmapButton(null){} + + bool Initialize(void); + virtual result OnInitializing(void); + + // IActionEventListener + virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId); + +private: + static const int ID_BUTTON = 101; + static const int ID_BITMAP_BUTTON = 102; + + Tizen::Ui::Controls::Button* __pButton; + Tizen::Ui::Controls::Button* __pBitmapButton; +}; + * @endcode + * + * @code +// Sample code for ButtonSample.cpp +#include +#include + +#include "ButtonSample.h" + +using namespace Tizen::App; +using namespace Tizen::Graphics; +using namespace Tizen::Ui::Controls; + +bool +ButtonSample::Initialize(void) +{ + Construct(FORM_STYLE_NORMAL); + return true; +} + +result +ButtonSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + // Creates an instance of Button + __pButton = new Button(); + __pButton->Construct(Rectangle(50, 50, 200, 200), L"Button"); + __pButton->SetActionId(ID_BUTTON); + __pButton->AddActionEventListener(*this); + + AddControl(__pButton); + + // Creates an instance of Button for bitmap button + __pBitmapButton = new Button(); + __pBitmapButton->Construct(Rectangle(260, 50, 200, 200)); + __pBitmapButton->SetActionId(ID_BITMAP_BUTTON); + __pBitmapButton->AddActionEventListener(*this); + + // Gets instances of Bitmap + AppResource *pAppResource = Application::GetInstance()->GetAppResource(); + Bitmap* pBitmapNormal = pAppResource->GetBitmapN(L"tizen.png"); + Bitmap* pBitmapPressed = pAppResource->GetBitmapN(L"tizen.png"); + + // Sets the bitmaps to the bitmap button + __pBitmapButton->SetNormalBackgroundBitmap(*pBitmapNormal); + __pBitmapButton->SetPressedBackgroundBitmap(*pBitmapPressed); + + // Deallocates bitmaps + delete pBitmapNormal; + delete pBitmapPressed; + + // Adds the bitmap button to the form + AddControl(__pBitmapButton); + + return r; +} + +// IActionEventListener implementation +void +ButtonSample::OnActionPerformed(const Control& source, int actionId) +{ + switch (actionId) + { + case ID_BUTTON: + { + // .... + } + break; + case ID_BITMAP_BUTTON: + { + // .... + } + break; + default: + break; + } +} + * @endcode + * + */ +class _OSP_EXPORT_ Button + : public Tizen::Ui::Control +{ +public: + /** + * This is the default constructor for this class. + * + * @since 2.0 + */ + Button(void); + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~Button(void); + + /** + * Initializes this instance of %Button with the specified parameters. @n + * 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. + * + * @since 2.0 + * + * @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 + * The optimal size of the control is defined in + * 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_INVALID_ARG A specified input parameter is invalid. + * @exception E_SYSTEM A system error has occurred. + */ + result Construct(const Tizen::Graphics::Rectangle& rect, const Tizen::Base::String& text = L""); + + /** + * Initializes this instance of %Button with the specified parameters. @n + * 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. + * + * @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 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 @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_INVALID_ARG A specified input parameter is invalid. + * @exception E_SYSTEM A system error has occurred. + */ + result Construct(const Tizen::Graphics::FloatRectangle& rect, const Tizen::Base::String& text = L""); + + /** + * Adds a listener instance. @n + * The added listener can listen to events on the given event dispatcher's context when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to add + */ + void AddActionEventListener(Tizen::Ui::IActionEventListener& listener); + + /** + * Removes a listener instance. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to remove + */ + void RemoveActionEventListener(Tizen::Ui::IActionEventListener& listener); + + /** + * Sets the action ID of the button. + * + * @since 2.0 + * + * @param[in] actionId The action ID + */ + void SetActionId(int actionId); + + /** + * Gets the action ID of the button. + * + * @since 2.0 + * + * @return An integer value representing the action ID + */ + int GetActionId(void) const; + +public: + /** + * Sets the text that the button displays. + * + * @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'. + */ + void SetText(const Tizen::Base::String& text); + + /** + * Sets the horizontal alignment of the text of the button. + * + * @since 2.0 + * + * @param[in] alignment The horizontal text alignment + */ + void SetTextHorizontalAlignment(HorizontalAlignment alignment); + + /** + * Sets the vertical alignment of the text of the button. + * + * @since 2.0 + * + * @param[in] alignment The vertical text alignment + */ + void SetTextVerticalAlignment(VerticalAlignment alignment); + +public: + /** + * Gets the text displayed by the button. + * + * @since 2.0 + * + * @return The text of the button + */ + Tizen::Base::String GetText(void) const; + + /** + * Gets the horizontal alignment of the text of the button. + * + * @since 2.0 + * + * @return The horizontal text alignment + */ + HorizontalAlignment GetTextHorizontalAlignment(void) const; + + /** + * Gets the vertical alignment of the text of the button. + * + * @since 2.0 + * + * @return The vertical text alignment + */ + VerticalAlignment GetTextVerticalAlignment(void) const; + + //Normal color + /** + * Sets the color of the text to be displayed on the button. + * + * @since 2.0 + * + * @param[in] color The text color to set + */ + virtual void SetTextColor(const Tizen::Graphics::Color& color); + + /** + * Gets the color of the text to be displayed on the button. + * + * @since 2.0 + * + * @return The text color + */ + virtual Tizen::Graphics::Color GetTextColor(void) const; + + //Pressed color + /** + * Sets the text color of the button for the pressed state. + * + * @since 2.0 + * + * @param[in] color The color to set + */ + void SetPressedTextColor(const Tizen::Graphics::Color& color); + + /** + * Gets the text color of the button for the pressed state. + * + * @since 2.0 + * + * @return The text color when the button is pressed + */ + Tizen::Graphics::Color GetPressedTextColor(void) const; + + //Disabled color + /** + * Sets the text color of the button for the disabled state. + * + * @since 2.0 + * + * @param[in] color The color to set + */ + void SetDisabledTextColor(const Tizen::Graphics::Color& color); + + /** + * Gets the text color of the button for the disabled state. + * + * @since 2.0 + * + * @return The disabled text color + */ + Tizen::Graphics::Color GetDisabledTextColor(void) const; + + /** + * Sets the text color of the button for the highlighted state. + * + * @since 2.0 + * + * @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); + + /** + * Gets the text color of the button for the highlighted state. + * + * @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. + */ + Tizen::Graphics::Color GetHighlightedTextColor(void) const; + + /** + * Sets a bitmap that is to be displayed when the button is not pressed. + * + * @since 2.0 + * + * @param[in] position The location of a bitmap where it is to display on the button + * @param[in] bitmap The bitmap to set + */ + void SetNormalBitmap(const Tizen::Graphics::Point& position, const Tizen::Graphics::Bitmap& bitmap); + + /** + * Sets a bitmap that is to be displayed when the button is not pressed. + * + * @since 2.1 + * + * @param[in] position The location of a bitmap where it is to display on the button + * @param[in] bitmap The bitmap to set + */ + void SetNormalBitmap(const Tizen::Graphics::FloatPoint& position, const Tizen::Graphics::Bitmap& bitmap); + + /** + * Sets the disabled bitmap of the button. + * + * @since 2.0 + * + * @param[in] position The location of disabled bitmap + * @param[in] bitmap The disabled bitmap of the button + */ + void SetDisabledBitmap(const Tizen::Graphics::Point& position, const Tizen::Graphics::Bitmap& bitmap); + + /** + * Sets the disabled bitmap of the button. + * + * @since 2.1 + * + * @param[in] position The location of disabled bitmap + * @param[in] bitmap The disabled bitmap of the button + */ + void SetDisabledBitmap(const Tizen::Graphics::FloatPoint& position, const Tizen::Graphics::Bitmap& bitmap); + + /** + * Sets the bitmap that is to be displayed on the button when it is pressed. + * + * @since 2.0 + * + * @param[in] position The location of a bitmap where it is to display on the Button control + * @param[in] bitmap The bitmap to set + */ + void SetPressedBitmap(const Tizen::Graphics::Point& position, const Tizen::Graphics::Bitmap& bitmap); + + /** + * Sets the bitmap that is to be displayed on the button when it is pressed. + * + * @since 2.1 + * + * @param[in] position The location of a bitmap where it is to display on the Button control + * @param[in] bitmap The bitmap to set + */ + void SetPressedBitmap(const Tizen::Graphics::FloatPoint& position, const Tizen::Graphics::Bitmap& bitmap); + + /** + * Sets the highlighted bitmap of the button. + * + * @since 2.1 + * + * @param[in] position The location of highlighted bitmap + * @param[in] bitmap The highlighted bitmap of the button + */ + void SetHighlightedBitmap(const Tizen::Graphics::Point& position, const Tizen::Graphics::Bitmap& bitmap); + + /** + * Sets the highlighted bitmap of the button. + * + * @since 2.1 + * + * @param[in] position The location of highlighted bitmap + * @param[in] bitmap The highlighted bitmap of the button + */ + void SetHighlightedBitmap(const Tizen::Graphics::FloatPoint& position, const Tizen::Graphics::Bitmap& bitmap); + + /** + * Sets the normal background bitmap of the button. + * + * @since 2.0 + * + * @param[in] bitmap The normal background image + */ + void SetNormalBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap); + + /** + * Sets the disabled background bitmap of the button. + * + * @since 2.1 + * + * @param[in] bitmap The disabled background image + */ + void SetDisabledBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap); + + /** + * Sets the pressed background bitmap of the button. + * + * @since 2.0 + * + * @param[in] bitmap The pressed background bitmap + */ + void SetPressedBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap); + + /** + * Sets the highlighted background bitmap of the button. + * + * @since 2.0 + * + * @param[in] bitmap The highlighted background bitmap + * @remarks When a user navigates the user interface using the directional keys, the focused UI control is highlighted. + */ + void SetHighlightedBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap); + + /** + * Gets the color of the button for the specified status. + * + * @since 2.0 + * + * @return The color, @n + * else RGBA(0, 0, 0, 0) if an error occurs + * @param[in] status The status + * @exception E_SUCCESS The method is successful. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + Tizen::Graphics::Color GetColor(ButtonStatus status) const; + + /** + * Sets the color of the button for the specified status. + * + * @since 2.0 + * + * @return An error code + * @param[in] status The status + * @param[in] color The button color + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetColor(ButtonStatus status, const Tizen::Graphics::Color& color); + + /** + * Gets the text size. + * + * @since 2.0 + * + * @return The size of the text, @n + * else @c -1 if an error occurs + * @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 SetTextSize() + */ + int GetTextSize(void) const; + + /** + * Gets the text size. + * + * @since 2.1 + * + * @return The size of the text, @n + * else @c -1.0f if an error occurs + * @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 SetTextSize() + */ + float GetTextSizeF(void) const; + + /** + * Sets the text size. + * + * @since 2.0 + * + * @return An error code + * @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); + + /** + * Sets the text size. + * + * @since 2.1 + * + * @return An error code + * @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); + +protected: + friend class _ButtonImpl; + +private: + // + // This is the copy constructor for this class. + // + Button(const Button& rhs); + + // + // Assigns the value of the specified instance to the current instance of %Button. + // + Button& operator =(const Button& rhs); + +}; // Button + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_BUTTON_H_ diff --git a/inc/FUiCtrlButtonItem.h b/inc/FUiCtrlButtonItem.h new file mode 100644 index 0000000..bc7227c --- /dev/null +++ b/inc/FUiCtrlButtonItem.h @@ -0,0 +1,223 @@ +// +// 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 FUiCtrlButtonItem.h + * @brief This is the header file for the %ButtonItem class. + * + * This header file contains the declarations of the %ButtonItem class. + */ +#ifndef _FUI_CTRL_BUTTON_ITEM_H_ +#define _FUI_CTRL_BUTTON_ITEM_H_ + +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ +/** + * @enum ButtonItemStatus + * + * Defines the possible states of the button item. + * + * @since 2.0 + */ +enum ButtonItemStatus +{ + BUTTON_ITEM_STATUS_NORMAL, /**< The normal status */ + BUTTON_ITEM_STATUS_PRESSED, /**< The selected status */ + BUTTON_ITEM_STATUS_HIGHLIGHTED, /**< The highlighted status */ + BUTTON_ITEM_STATUS_DISABLED /**< The disabled status */ +}; + +/** + * @enum ButtonPosition + * + * Defines the possible positions of the button item. + * + * @since 2.0 + */ +enum ButtonPosition +{ + BUTTON_POSITION_LEFT = 0, /**< The position of the button is towards the left of the object */ + BUTTON_POSITION_RIGHT /**< The position of the button is towards the right of the object */ +}; + +/** + * @enum ButtonItemStyle + * + * Defines the possible styles of the button item. + * + * @since 2.0 + */ +enum ButtonItemStyle +{ + BUTTON_ITEM_STYLE_TEXT = 0, /**< The text %ButtonItem style */ + BUTTON_ITEM_STYLE_ICON /**< The icon %ButtonItem style */ +}; + +/** + * @class ButtonItem + * @brief This class is an implementation of %ButtonItem. + * + * @since 2.0 + * + * The %ButtonItem class is a helper class that specifies the + * properties of button items in a Footer or Header. + */ +class _OSP_EXPORT_ ButtonItem + : public Tizen::Base::Object +{ + +public: + /** + * This is the default constructor for this class. + * + * @since 2.0 + */ + ButtonItem(void); + + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~ButtonItem(void); + + + /** + * Initializes this instance of %ButtonItem with the specified parameters. + * + * @since 2.0 + * + * @return An error code + * @param[in] style The style 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. + */ + result Construct(ButtonItemStyle style, int actionId); + + + /** + * Gets the action ID of the button item. + * + * @since 2.0 + * + * @return The action ID, @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. + */ + int GetActionId(void) const; + + + /** + * Gets the text of the button item. + * + * @since 2.0 + * + * @return The item text, @n + * else an empty string if an error occurs + * @exception E_SUCCESS The method is successful. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + Tizen::Base::String GetText(void) const; + + + /** + * Sets the action ID of the button item. + * + * @since 2.0 + * @return An error code + * @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); + + + /** + * Sets the background bitmap image of the button item. + * + * @since 2.0 + * + * @return An error code + * @param[in] status The item status + * @param[in] pBitmap The background bitmap image to set, @n + * 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 of the bitmap is greater than the default size, the bitmap image is scaled accordingly. + */ + result SetBackgroundBitmap(ButtonItemStatus status, const Tizen::Graphics::Bitmap* pBitmap); + + + /** + * Sets the icon of the button item for the specified state. + * + * @since 2.0 + * + * @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 @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. @n + * - The style of %ButtonItem is @c BUTTON_ITEM_STYLE_TEXT. + */ + result SetIcon(ButtonItemStatus status, const Tizen::Graphics::Bitmap* pIcon); + + + /** + * Sets the text of %ButtonItem. + * + * @since 2.0 + * + * @return An error code + * @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. + */ + result SetText(const Tizen::Base::String& text); + + +private: + ButtonItem(const ButtonItem& rhs); + ButtonItem& operator =(const ButtonItem& rhs); + +private: + friend class _FooterImpl; + friend class _HeaderImpl; + friend class _ButtonItemImpl; + + class _ButtonItemImpl* __pImpl; +}; + +}}} //Tizen::Ui::Controls + +#endif // _FUI_CTRL_BUTTON_ITEM_H_ diff --git a/inc/FUiCtrlCheckButton.h b/inc/FUiCtrlCheckButton.h new file mode 100644 index 0000000..e58d6fc --- /dev/null +++ b/inc/FUiCtrlCheckButton.h @@ -0,0 +1,629 @@ +// +// 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 FUiCtrlCheckButton.h + * @brief This is the header file for the %CheckButton class. + * + * This header file contains the declarations of the %CheckButton class and its helper classes. + */ + +#ifndef _FUI_CTRL_CHECK_BUTTON_H_ +#define _FUI_CTRL_CHECK_BUTTON_H_ + +#include +#include +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ +/** + * @enum CheckButtonStatus + * + * Defines the %CheckButton status. + * + * @since 2.0 + */ +enum CheckButtonStatus +{ + CHECK_BUTTON_STATUS_NORMAL, /**< The normal status */ + CHECK_BUTTON_STATUS_DISABLED, /**< The disabled status */ + CHECK_BUTTON_STATUS_PRESSED, /**< The pressed status */ + CHECK_BUTTON_STATUS_HIGHLIGHTED /**< The highlighted status */ +}; + +/** + * @enum CheckButtonStyle + * + * Defines the %CheckButton style. + * + * @since 2.0 + */ +enum CheckButtonStyle +{ + CHECK_BUTTON_STYLE_MARK, /**< The mark style for multiple selection */ + CHECK_BUTTON_STYLE_MARK_WITH_DIVIDER, /**< @if OSPDEPREC @deprecated This enum value is deprecated because the use of the divider style is no longer recommended @n + Instead of using the divider style, use the detailed button style. @endif */ + CHECK_BUTTON_STYLE_ONOFF, /**< @if OSPDEPREC @deprecated This enum value is deprecated because the use of the on-off style is no longer recommended @n + Instead of using the on-off style, use the on-off sliding style @endif*/ + CHECK_BUTTON_STYLE_ONOFF_WITH_DIVIDER, /**< @if OSPDEPREC @deprecated This enum value is deprecated because the use of the on-off style is no longer recommended @endif */ + CHECK_BUTTON_STYLE_RADIO, /**< The radio style for single selection */ + CHECK_BUTTON_STYLE_RADIO_WITH_DIVIDER, /**< @if OSPDEPREC @deprecated This enum value is deprecated because the use of the divider style is no longer recommended @n + Instead of using the divider style, use the detailed button style @endif*/ + CHECK_BUTTON_STYLE_ONOFF_SLIDING, /**< The slider style on/off */ + CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON, /**< The mark style with detail button */ + CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON, /**< The radio style with detail button */ + CHECK_BUTTON_STYLE_ONOFF_SLIDING_WITH_DIVIDER, /**< The slider style On/Off with divider @b Since: @b 2.1 */ +}; + +/** + * @class CheckButton + * @brief This class defines the common behavior of a %CheckButton control. + * + * @since 2.0 + * + * The %CheckButton class displays a rectangular area, which can be selected, and shows the current selection. + * + * For more information on the class features, see Buttons. + * + * The following example demonstrates how to use the %CheckButton class. + * + * + * @code +// Sample code for CheckButtonSample.h +#include + +class CheckButtonSample + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::IActionEventListener +{ +public: + CheckButtonSample(void) + : __pCheckButton(null){} + + bool Initialize(void); + virtual result OnInitializing(void); + + // IActionEventListener + virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId); + +private : + static const int ID_BUTTON_CHECKED = 101; + static const int ID_BUTTON_UNCHECKED = 102; + static const int ID_BUTTON_SELECTED = 103; + + Tizen::Ui::Controls::CheckButton* __pCheckButton; +}; + + * @endcode + * + * @code +// Sample Code for CheckButtonSample.cpp +#include + +#include "CheckButtonSample.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Ui::Controls; + +bool +CheckButtonSample::Initialize(void) +{ + Construct(FORM_STYLE_NORMAL); + return true; +} + +result +CheckButtonSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + // Creates a CheckButton + __pCheckButton = new CheckButton(); + __pCheckButton->Construct(Rectangle(50, 50, 400, 100), + CHECK_BUTTON_STYLE_RADIO_WITH_DIVIDER, BACKGROUND_STYLE_DEFAULT, false, L"CheckButton"); + __pCheckButton->SetActionId(ID_BUTTON_CHECKED, ID_BUTTON_UNCHECKED, ID_BUTTON_SELECTED); + __pCheckButton->AddActionEventListener(*this); + + // Add a CheckButton to the Form + AddControl(__pCheckButton); + + return r; +} + +// Implements an IActionEventListener +void +CheckButtonSample::OnActionPerformed(const Control& source, int actionId) +{ + switch (actionId) + { + case ID_BUTTON_CHECKED: + // Todo: + break; + case ID_BUTTON_UNCHECKED: + // Todo: + break; + case ID_BUTTON_SELECTED: + // Todo: + break; + default: + break; + } +} + + * @endcode + * + */ +class _OSP_EXPORT_ CheckButton + : public Tizen::Ui::Control +{ +public: + /** + * This is the default constructor for this class. + * + * @since 2.0 + */ + CheckButton(void); + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~CheckButton(void); + + /** + * Initializes this instance of %CheckButton with the specified parameters. + * + * @since 2.0 + * + * @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 the width and height of the window.@n + * The optimal size of the control is defined in + * 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] 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. + * - 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. + */ + 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); + + /** + * Initializes this instance of %CheckButton with the specified parameters. + * + * @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 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. + * @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] 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. + * - 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. + */ + 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); + + /** + * Sets the selected status of the %CheckButton control. + * + * @since 2.0 + * + * @param[in] select Set to @c true if the %CheckButton control is selected, @n + * else @c false + */ + void SetSelected(bool select); + + /** + * Checks whether the %CheckButton control has been selected. + * + * @since 2.0 + * + * @return @c true if the %CheckButton is selected, @n + * else @c false + */ + bool IsSelected(void) const; + +public: + /** + * Adds an IActionEventListener instance. @n + * The added listener can listen to events on the context of the given event dispatcher when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to add + */ + void AddActionEventListener(Tizen::Ui::IActionEventListener& listener); + + /** + * Removes an IActionEventListener instance. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to remove + */ + void RemoveActionEventListener(Tizen::Ui::IActionEventListener& listener); + + /** + * Sets the action IDs for the %CheckButton control. + * + * @since 2.0 + * + * @param[in] checkedActionId The action ID for the checked state + * @param[in] uncheckedActionId The action ID for the unchecked state + * @param[in] selectedActionId The action ID for the selected state + */ + void SetActionId(int checkedActionId, int uncheckedActionId, int selectedActionId = -1); + + /** + * Gets the action ID for the checked state. + * + * @since 2.0 + * + * @return An integer value representing the action ID + */ + int GetCheckedActionId(void) const; + + /** + * Gets the action ID for the unchecked state. + * + * @since 2.0 + * + * @return An integer value representing the action ID + */ + int GetUncheckedActionId(void) const; + + /** + * Gets the action ID for the selected state. + * + * @since 2.0 + * + * @return An integer value representing the action ID + */ + int GetSelectedActionId(void) const; + +public: + /** + * Sets the text that the %CheckButton control displays. + * + * @since 2.0 + * + * @param[in] text The text of the %CheckButton control + */ + void SetText(const Tizen::Base::String& text); + + /** + * Sets the horizontal alignment of the text of the %CheckButton control. + * + * @since 2.0 + * + * @param[in] alignment The horizontal text alignment + */ + void SetTextHorizontalAlignment(HorizontalAlignment alignment); + + /** + * Sets the vertical alignment of the text of the %CheckButton control. + * + * @since 2.0 + * + * @param[in] alignment The vertical text alignment + */ + void SetTextVerticalAlignment(VerticalAlignment alignment); + +public: + /** + * Gets the text of the %CheckButton control. + * + * @since 2.0 + * + * @return The text of the %CheckButton control + */ + Tizen::Base::String GetText(void) const; + + /** + * Gets the horizontal alignment of the text of the %CheckButton control. + * + * @since 2.0 + * @return The horizontal text alignment + */ + HorizontalAlignment GetTextHorizontalAlignment(void) const; + + /** + * Gets the vertical alignment of the text of the %CheckButton control. + * + * @since 2.0 + * @return The vertical text alignment + */ + VerticalAlignment GetTextVerticalAlignment(void) const; + + /** + * Sets the title text of the %CheckButton control. + * + * @since 2.0 + * @return An error code + * @param[in] title The title text to set + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetTitleText(const Tizen::Base::String& title); + + /** + * Gets the title text of the %CheckButton control. + * + * @since 2.0 + * @return The title text + */ + Tizen::Base::String GetTitleText(void) const; + + //Normal color + /** + * Sets the text color of the %CheckButton control. + * + * @since 2.0 + * + * @param[in] color The text color to set + */ + void SetTextColor(const Tizen::Graphics::Color& color); + + /** + * Gets the text color of the %CheckButton control. + * + * @since 2.0 + * + * @return The text color + */ + Tizen::Graphics::Color GetTextColor(void) const; + + //Normal color + /** + * Sets the title text color of the %CheckButton control. + * + * @since 2.0 + * + * @param[in] color The text color to set + */ + void SetTitleTextColor(const Tizen::Graphics::Color& color); + + /** + * Gets the title text color of the %CheckButton control. + * + * @since 2.0 + * + * @return The text color + */ + Tizen::Graphics::Color GetTitleTextColor(void) const; + + /** + * Sets the color of the %CheckButton control for the specified status. + * + * @since 2.0 + * @return An error code + * @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. + * - 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); + + /** + * Gets the color of the %CheckButton control for the specified status. + * + * @since 2.0 + * @return The color, @n + * else RGBA (0, 0, 0, 0) if an error occurs + * @param[in] status The status + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_OPERATION The background style is not proper. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + Tizen::Graphics::Color GetColor(CheckButtonStatus status) const; + + /** + * Sets the text color of the %CheckButton control for the pressed status. + * + * @since 2.0 + * + * @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. + */ + result SetPressedTextColor(const Tizen::Graphics::Color& color); + + /** + * 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 + * @exception E_SUCCESS The method is successful. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + Tizen::Graphics::Color GetPressedTextColor(void) const; + + /** + * Sets the title text color of the %CheckButton control for the pressed status. + * + * @since 2.0 + * + * @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. + */ + result SetPressedTitleTextColor(const Tizen::Graphics::Color& color); + + /** + * Gets the title text color of the %CheckButton for the pressed status. + * + * @since 2.0 + * + * @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. + */ + Tizen::Graphics::Color GetPressedTitleTextColor(void) const; + + /** + * Sets the text color of the %CheckButton control for the highlighted status. + * + * @since 2.0 + * + * @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. + */ + result SetHighlightedTextColor(const Tizen::Graphics::Color& color); + + /** + * Gets the text color of the %CheckButton control for the highlighted status. + * + * @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. + */ + Tizen::Graphics::Color GetHighlightedTextColor(void) const; + + /** + * Sets the title text color of the %CheckButton control for the highlighted status. + * + * @since 2.0 + * + * @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. + */ + result SetHighlightedTitleTextColor(const Tizen::Graphics::Color& color); + + /** + * Gets the title text color of the %CheckButton control for the highlighted status. + * + * @since 2.0 + * + * @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. + */ + Tizen::Graphics::Color GetHighlightedTitleTextColor(void) const; + + /** + * Sets the text color of the %CheckButton control for the disabled status. + * + * @since 2.0 + * + * @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. + */ + result SetDisabledTextColor(const Tizen::Graphics::Color& color); + + /** + * Gets the text color of the %CheckButton control for the disabled status. + * + * @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. + */ + Tizen::Graphics::Color GetDisabledTextColor(void) const; + + /** + * Sets the title text color of the %CheckButton control for the disabled status. + * + * @since 2.0 + * + * @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. + */ + result SetDisabledTitleTextColor(const Tizen::Graphics::Color& color); + + /** + * Gets the title text color of %CheckButton for the disabled status. + * + * @since 2.0 + * + * @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. + */ + Tizen::Graphics::Color GetDisabledTitleTextColor(void) const; + +protected: + friend class _CheckButtonImpl; + +private: + friend class RadioGroup; + + // + // This is the copy constructor for this class. + // + CheckButton(const CheckButton& rhs); + + // + // Assigns the value of the specified instance to the current instance of %CheckButton. + // + CheckButton& operator =(const CheckButton& rhs); + +}; // CheckButton + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_CHECK_BUTTON_H_ diff --git a/inc/FUiCtrlColorPicker.h b/inc/FUiCtrlColorPicker.h new file mode 100644 index 0000000..299f9e9 --- /dev/null +++ b/inc/FUiCtrlColorPicker.h @@ -0,0 +1,276 @@ +// +// 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 FUiCtrlColorPicker.h +* @brief This is the header file for the %ColorPicker class. +* +* This header file contains the declarations of the %ColorPicker class. +*/ +#ifndef _FUI_CTRL_COLOR_PICKER_H_ +#define _FUI_CTRL_COLOR_PICKER_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** +* @class ColorPicker +* @brief This class defines the common behavior of a %ColorPicker control. +* +* @since 2.0 +* +* The %ColorPicker class displays a set of 3 sliders (hue, saturation, and luminance) with which the user can define a color. +* +* For more information on the class features, see ColorPicker. +* +* The following example demonstrates how to use the %ColorPicker class. +* +* @code +// Sample code for ColorPickerSample.h +#include +#include + +class ColorPickerSample + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::IColorChangeEventListener +{ +public: + ColorPickerSample(void) + : __pColorPicker(null){} + + bool Initialize(void); + virtual result OnInitializing(void); + + // IColorChangeEventListener + virtual void OnColorChanged(const Tizen::Ui::Control& source, const Tizen::Graphics::Color& color); + +private: + Tizen::Ui::Controls::ColorPicker* __pColorPicker; +}; + + * @endcode + * + * @code + +// Sample code for ColorPickerSample.cpp +#include "ColorPickerSample.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Ui::Controls; + +bool +ColorPickerSample::Initialize(void) +{ + Construct(FORM_STYLE_NORMAL); + return true; +} + +result +ColorPickerSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + // Creates an instance of ColorPicker + __pColorPicker = new ColorPicker(); + __pColorPicker->Construct(Point(10,50)); + __pColorPicker->AddColorChangeEventListener(*this); + + // Adds the color picker to the form + AddControl(__pColorPicker); + + return r; +} + +// IColorChangeEventListener implementation +void +ColorPickerSample::OnColorChanged(const Control& source, const Color& color) +{ + // .... +} +* @endcode +*/ + +class _OSP_EXPORT_ ColorPicker + : public Tizen::Ui::Control +{ +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. + * + * @since 2.0 + */ + ColorPicker(void); + + /** + * 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 ~ColorPicker(void); + + /** + * Initializes this instance of %ColorPicker with the specified parameter. + * + * @since 2.0 + * + * @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. + * @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. + */ + result Construct(const Tizen::Graphics::Point& point); + + /** + * Initializes this instance of %ColorPicker with the specified parameter. + * + * @since 2.1 + * + * @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. + * @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. + */ + result Construct(const Tizen::Graphics::FloatPoint& point); + + /** + * Gets the current color value of %ColorPicker. + * + * @since 2.0 + * + * @return The current color value + */ + Tizen::Graphics::Color GetColor(void) const; + + /** + * Gets the current hue value of %ColorPicker. + * + * @since 2.0 + * + * @return The current hue value between @c 0 to @c 100 + */ + int GetHue(void) const; + + /** + * Gets the current saturation value of %ColorPicker. + * + * @since 2.0 + * + * @return The current saturation value between @c 0 to @c 100 + */ + int GetSaturation(void) const; + + /** + * Gets the current luminance value of %ColorPicker. + * + * @since 2.0 + * + * @return The current luminance value between @c 0 to @c 100 + */ + int GetLuminance(void) const; + + /** + * Sets the color value of %ColorPicker. + * + * @since 2.0 + * + * @param[in] color The color value + */ + void SetColor(const Tizen::Graphics::Color& color); + + /** + * Sets the hue value of %ColorPicker. + * + * @since 2.0 + * + * @param[in] hue The hue value of this object between @c 0 to @c 100 + * + */ + void SetHue(int hue); + + /** + * Sets the saturation value of %ColorPicker. + * + * @since 2.0 + * + * @param[in] saturation The saturation value between @c 0 to @c 100 + * + */ + void SetSaturation(int saturation); + + /** + * Sets the luminance value of %ColorPicker. + * + * @since 2.0 + * + * @param[in] luminance The luminance value between @c 0 to @c 100 + * + */ + void SetLuminance(int luminance); + + /** + * Adds a listener instance. @n + * The added listener can listen to events on the given event dispatcher's context when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to add + * @see RemoveColorChangeEventListener() + */ + void AddColorChangeEventListener(Tizen::Ui::IColorChangeEventListener& listener); + + /** + * Removes a listener instance. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to remove + * @see AddColorChangeEventListener() + */ + void RemoveColorChangeEventListener(Tizen::Ui::IColorChangeEventListener& listener); + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + ColorPicker(const ColorPicker& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + ColorPicker& operator =(const ColorPicker& rhs); + + friend class _ColorPickerImpl; +}; // ColorPicker + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_COLOR_PICKER_H_ diff --git a/inc/FUiCtrlContextMenu.h b/inc/FUiCtrlContextMenu.h new file mode 100644 index 0000000..d2df11b --- /dev/null +++ b/inc/FUiCtrlContextMenu.h @@ -0,0 +1,797 @@ +// +// 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 FUiCtrlContextMenu.h + * @brief This is the header file for the %ContextMenu class. + * + * This header file contains the declarations of the %ContextMenu class and its helper classes. + */ + +#ifndef _FUI_CTRL_CONTEXT_MENU_H_ +#define _FUI_CTRL_CONTEXT_MENU_H_ + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace Tizen { namespace Graphics +{ +class Bitmap; +}; +}; + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @enum ContextMenuStyle + * + * Defines the %ContextMenu style. + * + * @since 2.0 + */ +enum ContextMenuStyle +{ + CONTEXT_MENU_STYLE_LIST,/**< The style of the vertical list of image + text */ + CONTEXT_MENU_STYLE_GRID,/**< The style of the grid of buttons */ + CONTEXT_MENU_STYLE_ICON /**<@if OSPDEPREC @deprecated This enum value is deprecated because this style can be implemented using the CONTEXT_MENU_STYLE_GRID style @endif */ +} ; + +/** + * @enum ContextMenuItemStatus + * + * Defines the possible states of the %ContextMenu control item. + * + * @since 2.0 + */ +enum ContextMenuItemStatus +{ + CONTEXT_MENU_ITEM_STATUS_NORMAL, /**< The normal state */ + CONTEXT_MENU_ITEM_STATUS_PRESSED, /**< The pressed state */ + CONTEXT_MENU_ITEM_STATUS_HIGHLIGHTED /**< The highlighted state */ +}; + +/** + * @enum ContextMenuAnchorDirection + * + * Defines the direction of the %ContextMenu control. + * + * @since 2.0 + */ +enum ContextMenuAnchorDirection +{ + CONTEXT_MENU_ANCHOR_DIRECTION_LEFTWARD, /**< The anchor arrow direction is leftward */ + CONTEXT_MENU_ANCHOR_DIRECTION_RIGHTWARD,/**< The anchor arrow direction is rightward */ + CONTEXT_MENU_ANCHOR_DIRECTION_UPWARD, /**< The anchor arrow direction is upward */ + CONTEXT_MENU_ANCHOR_DIRECTION_DOWNWARD, /**< The anchor arrow direction is downward */ + CONTEXT_MENU_ANCHOR_DIRECTION_AUTO /**< The anchor arrow direction is auto */ +}; + +/** + * @class ContextMenu + * @brief This class defines the common behavior of a %ContextMenu control. + * + * @since 2.0 + * + * The %ContextMenu class displays a special purpose window that is used to present users with context-sensitive options. + * + * For more information on the class features, see ContextMenu. + * + * The following example demonstrates how to use the %ContextMenu class. + * + * @code +// Sample code for ContextMenuSample.h +#include +class ContextMenuSample + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::IActionEventListener +{ +public: + ContextMenuSample(void) + :__pContextMenu(null){} + + bool Initialize(void); + void ShowContextMenu(bool show); + virtual result OnInitializing(void); + virtual result OnTerminating(void); + + // IActionEventListener + virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId); + +private: + static const int ID_CONTEXTMENU_ITEM1 = 101; + static const int ID_CONTEXTMENU_ITEM2 = 102; + static const int ID_BTN_SHOW_CONTEXTMENU = 103; + + Tizen::Ui::Controls::ContextMenu *__pContextMenu; +}; + + * @endcode + * + * @code + +// Sample code for ContextMenuSample.cpp +#include + +#include "ContextMenuSample.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Ui::Controls; + +bool +ContextMenuSample::Initialize(void) +{ + Construct(FORM_STYLE_NORMAL); + return true; +} + +result +ContextMenuSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + // Creates an instance of ContextMenu + __pContextMenu = new ContextMenu(); + __pContextMenu->Construct(Point(400, 150), CONTEXT_MENU_STYLE_LIST); + __pContextMenu->SetFocusable(true); + __pContextMenu->AddItem(L"Item1", ID_CONTEXTMENU_ITEM1); + __pContextMenu->AddItem(L"Item2", ID_CONTEXTMENU_ITEM2); + __pContextMenu->AddActionEventListener(*this); + + // Creates an instance of Button to show the context menu + Button* pButton = new Button(); + pButton->Construct(Rectangle(50, 50, 400, 100), L"Show ContextMenu"); + pButton->SetActionId(ID_BTN_SHOW_CONTEXTMENU); + pButton->AddActionEventListener(*this); + + // Adds the button to the form + AddControl(pButton); + + return r; +} + +// Sets the anchor position of the context menu +void +ContextMenuSample::ShowContextMenu(bool show) +{ + __pContextMenu->SetAnchorPosition(Point(300, 200)); + + // Change to desired show state + __pContextMenu->SetShowState(show); + + //Calls Show() of the control + if (show) + { + __pContextMenu->Show(); + } + else + { + Invalidate(true); + } +} + +result +ContextMenuSample::OnTerminating(void) +{ + result r = E_SUCCESS; + + // Deallocates the __pContextMenu + __pContextMenu->Destroy(); + + return r; +} + +// IActionEventListener implementation +void +ContextMenuSample::OnActionPerformed(const Control& source, int actionId) +{ + switch (actionId) + { + case ID_CONTEXTMENU_ITEM1: + { + // .... + } + break; + case ID_CONTEXTMENU_ITEM2: + { + // .... + } + break; + case ID_BTN_SHOW_CONTEXTMENU: + { + ShowContextMenu(true); + } + break; + default: + break; + } +} + * @endcode + * + */ +class _OSP_EXPORT_ ContextMenu + : public Tizen::Ui::Window +{ +public: +// Lifecycle + /** + * 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 + */ + ContextMenu(void); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + * + */ + virtual ~ContextMenu(void); + + /** + * Initializes this instance of %ContextMenu with the specified parameters. + * + * @since 2.0 + * + * @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. + * @param[in] style The context menu style + * @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. 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); + + /** + * Initializes this instance of %ContextMenu with the specified parameters. + * + * @since 2.1 + * + * @return An error code + * @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_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. 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); + + /** + * Initializes this instance of %ContextMenu with the specified parameters. + * + * @since 2.0 + * + * @return An error code + * @param[in] point The x and y coordinates of the anchor of the %ContextMenu control @n + * The optimal size of the control is defined in + * Optimal Size of UI Controls. + * @param[in] style The context menu style + * @param[in] direction The anchor arrow direction + * @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. 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); + + /** + * Initializes this instance of %ContextMenu with the specified parameters. + * + * @since 2.1 + * + * @return An error code + * @param[in] point The x and y coordinates of the anchor of the %ContextMenu control @n + * The optimal size of the control is defined in + * Optimal Size of UI Controls. + * @param[in] style The context menu style + * @param[in] direction The anchor arrow direction + * @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. 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); + + /** + * Adds a listener instance. @n + * The added listener can listen to events on the given context of the event dispatcher when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to add + */ + void AddActionEventListener(Tizen::Ui::IActionEventListener& listener); + + /** + * Removes the specified listener instance. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to remove + */ + void RemoveActionEventListener(Tizen::Ui::IActionEventListener& listener); + + +// Operation + /** + * Appends the specified item at the end of the %ContextMenu control. @n + * The %AddItem() method can only be used when the style of the context menu is ::CONTEXT_MENU_STYLE_GRID. + * + * @since 2.0 + * + * @return An error code + * @param[in] normalBitmap The normal bitmap of the item + * @param[in] pPressedBitmap The pressed bitmap of the item + * @param[in] actionId The action ID for this item + * @exception E_SUCCESS The method is successful. + * @exception E_MAX_EXCEEDED The number of items has exceeded the maximum limit. + * @exception E_SYSTEM A system error has occurred. + */ + result AddItem(const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, int actionId); + + /** + * Appends the specified item at the end of the %ContextMenu control. @n + * The %AddItem() method can only be used when the style of the context menu is ::CONTEXT_MENU_STYLE_GRID. + * + * @since 2.0 + * + * @return An error code + * @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 + * @param[in] actionId The action ID for this item + * @exception E_SUCCESS The method is successful. + * @exception E_MAX_EXCEEDED The number of items has exceeded the maximum limit. + * @exception E_SYSTEM A system error has occurred. + * @remarks When a user navigates the user interface using the directional keys, the selected UI control is highlighted and + * the control takes the focus. + */ + result AddItem(const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap, int actionId); + + /** + * Appends the specified item at the end of the %ContextMenu control. + * + * @since 2.0 + * + * @return An error code + * @param[in] text The string of the item to append + * @param[in] actionId The specified action ID for this item + * @exception E_SUCCESS The method is successful. + * @exception E_MAX_EXCEEDED The number of items has exceeded the maximum limit. + * @exception E_SYSTEM A system error has occurred. + */ + result AddItem(const Tizen::Base::String& text, int actionId); + + /** + * Appends the specified item at the end of the %ContextMenu control. @n + * The %AddItem() method can only be used when the style of the context menu is ::CONTEXT_MENU_STYLE_LIST. + * + * @since 2.0 + * + * @return An error code + * @param[in] text The string of the item to append + * @param[in] actionId The specified action ID for this item + * @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_MAX_EXCEEDED The total number of items has exceeded the maximum limit. + * @exception E_SYSTEM A system error has occurred. + */ + result AddItem(const Tizen::Base::String& text, int actionId, const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap = null, const Tizen::Graphics::Bitmap* pHighlightedBitmap = null); + + /** + * Inserts the specified item at the given index of the %ContextMenu control. @n + * The %InsertItemAt() method can only be used when the style of the context menu is ::CONTEXT_MENU_STYLE_GRID. + * + * @since 2.0 + * + * @return An error code + * @param[in] index The location + * @param[in] normalBitmap The normal bitmap of the item + * @param[in] pPressedBitmap The pressed bitmap of the item + * @param[in] actionId The specified action ID for this item + * @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 @c index is less than @c 0 or greater than the number of items in %ContextMenu. + * @exception E_SYSTEM A system error has occurred. + * @remarks The %ContextMenu control can have a maximum of @c 3 icons. + */ + result InsertItemAt(int index, const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, int actionId); + + /** + * Inserts the specified item at the given index of the %ContextMenu control. @n + * The %InsertItemAt() method can only be used when the style of the context menu is ::CONTEXT_MENU_STYLE_GRID. + * + * @since 2.0 + * + * @return An error code + * @param[in] index The location + * @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 + * @param[in] actionId The specified action ID for this item + * @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 @c index is less than @c 0 or greater than the number of items in %ContextMenu. + * @exception E_SYSTEM A system error has occurred. + * @remarks When a user navigates the user interface using the directional keys, the selected UI control is highlighted and the control takes the focus. + */ + result InsertItemAt(int index, const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap, int actionId); + + /** + * Inserts the specified item at the given index of the %ContextMenu control. + * + * @since 2.0 + * + * @return An error code + * @param[in] index The location + * @param[in] text The string of the item to set + * @param[in] actionId The specified action ID for this item + * @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 @c index is less than @c 0 or greater than the number of items in %ContextMenu. + * @exception E_SYSTEM A system error has occurred. + */ + result InsertItemAt(int index, const Tizen::Base::String& text, int actionId); + + /** + * Inserts the specified item at the given index of the %ContextMenu control. @n + * The %InsertItemAt() method can only be used when the style of the context menu is ::CONTEXT_MENU_STYLE_LIST. + * + * @since 2.0 + * + * @return An error code + * @param[in] index The location + * @param[in] text The string of the item to set + * @param[in] actionId The specified action ID for this item + * @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_MAX_EXCEEDED The number of items has exceeded the maximum limit. + * @exception E_OUT_OF_RANGE The specified @c index is less than @c 0 or greater than the number of items in %ContextMenu. + * @exception E_SYSTEM A system error has occurred. + */ + result InsertItemAt(int index, const Tizen::Base::String& text, int actionId, const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap = null, const Tizen::Graphics::Bitmap* pHighlightedBitmap = null); + + /** + * Sets the specified item at the given index of the %ContextMenu control. @n + * The %SetItemAt() method can only be used when the style of the context menu is ::CONTEXT_MENU_STYLE_GRID. + * + * @since 2.0 + * + * @return An error code + * @param[in] index The location + * @param[in] normalBitmap The normal bitmap of the item + * @param[in] pPressedBitmap The pressed bitmap of the item + * @param[in] actionId The action 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 the number of items in %ContextMenu. + * @exception E_SYSTEM A system error has occurred. + */ + result SetItemAt(int index, const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, int actionId); + + /** + * Sets the specified item at the given index of the %ContextMenu control. @n + * The %SetItemAt() method can only be used when the style of the context menu is ::CONTEXT_MENU_STYLE_GRID. + * + * @since 2.0 + * + * @return An error code + * @param[in] index The location + * @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 + * @param[in] actionId The action 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 the number of items in %ContextMenu. + * @exception E_SYSTEM A system error has occurred. + * @remarks When a user navigates the user interface using the directional keys, the selected UI control is highlighted and the control takes the focus. + */ + result SetItemAt(int index, const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap, int actionId); + + /** + * Sets the specified item at the given index of the %ContextMenu control. + * + * @since 2.0 + * + * @return An error code + * @param[in] index The location + * @param[in] text The string of the item to set + * @param[in] actionId The action ID for this item + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE The specified @c index less than @c 0 or greater than the number of items in %ContextMenu. + * @exception E_SYSTEM A system error has occurred. + */ + result SetItemAt(int index, const Tizen::Base::String& text, int actionId); + + /** + * Sets the specified item at the given index of the %ContextMenu control. @n + * The %SetItemAt() method can only be used when the style of the context menu is ::CONTEXT_MENU_STYLE_LIST. + * + * @since 2.0 + * + * @return An error code + * @param[in] index The location + * @param[in] text The string of the item to set + * @param[in] actionId The action ID for this item + * @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_OUT_OF_RANGE The specified @c index less than @c 0 or greater than the number of items in %ContextMenu. + * @exception E_SYSTEM A system error has occurred. + */ + result SetItemAt(int index, const Tizen::Base::String& text, int actionId, const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap = null, const Tizen::Graphics::Bitmap* pHighlightedBitmap = null); + + /** + * Removes the item at the specified index from the %ContextMenu control. + * + * @since 2.0 + * + * @return An error code + * @param[in] index The location + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE The specified @c index less than @c 0 or greater than the number of items in %ContextMenu. + * @exception E_SYSTEM A system error has occurred. + */ + result RemoveItemAt(int index); + + /** + * Removes all items from the %ContextMenu control. + * + * @since 2.0 + * + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result RemoveAllItems(void); + + /** + * Gets the number of items of the %ContextMenu control. + * + * @since 2.0 + * + * @return The number of items registered for %ContextMenu, @n + * else @c -1 if an error occurs + */ + int GetItemCount(void) const; + + /** + * Gets the index of the item with the specified action ID. + * + * @since 2.0 + * + * @return The index of the item, @n + * else @c -1 if an error occurs + * @param[in] actionId The action ID + */ + int GetItemIndexFromActionId(int actionId) const; + + /** + * Gets the action ID of the item at the specified index. + * + * @since 2.0 + * + * @return The action ID of the item, @n + * else @c -1 if the specified index is invalid + * @param[in] index The index of the item + */ + int GetItemActionIdAt(int index) const; + + /** + * Gets the item text color of the %ContextMenu control for the specified status. + * + * @since 2.0 + * + * @return The item text color, @n + * else RGBA (0,0,0,0) if an error occurs + * @param[in] status The item status + */ + Tizen::Graphics::Color GetItemTextColor(ContextMenuItemStatus status) const; + + /** + * Sets the item text color of the %ContextMenu control for the specified status. + * + * @since 2.0 + * + * @return An error code + * @param[in] status The item status + * @param[in] color The item text color to set + * @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. + */ + result SetItemTextColor(ContextMenuItemStatus status, const Tizen::Graphics::Color& color); + + /** + * Sets the position of the anchor. + * + * @since 2.0 + * + * @return An error code + * @param[in] position The new position + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @remarks The x and y coordinates of the anchor are defined in the coordinate space of its parent, + * which means that x and y must be defined relative to the top-left corner (0,0) of its parent. + */ + result SetAnchorPosition(const Tizen::Graphics::Point& position); + + /** + * Sets the position of the anchor. + * + * @since 2.1 + * + * @return An error code + * @param[in] position The new position + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @remarks The x and y coordinates of the anchor are defined in the coordinate space of its parent, + * which means that x and y must be defined relative to the top-left corner (0,0) of its parent. + */ + result SetAnchorPosition(const Tizen::Graphics::FloatPoint& position); + + /** + * Gets the position of the anchor. + * + * @since 2.0 + * + * @return The position of the anchor @n + * The coordinate of the anchor position is defined from the top-left corner of its parent Container. + */ + Tizen::Graphics::Point GetAnchorPosition(void) const; + + /** + * Gets the position of the anchor. + * + * @since 2.1 + * + * @return The position of the anchor @n + * The coordinate of the anchor position is defined from the top-left corner of its parent Container. + */ + Tizen::Graphics::FloatPoint GetAnchorPositionF(void) const; + + /** + * Gets the color of the %ContextMenu control. + * + * @since 2.0 + * + * @return The color of %ContextMenu control, @n + * else RGBA(0, 0, 0, 0) if an error occurs + * @see SetColor() + */ + Tizen::Graphics::Color GetColor(void) const; + + /** + * Sets the color of the %ContextMenu control. + * + * @since 2.0 + * + * @return An error code + * @param[in] color The color to set + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @exception E_SYSTEM A system error has occurred. + * @see GetColor() + */ + result SetColor(const Tizen::Graphics::Color& color); + + /** + * Gets the item color for the specified status. + * + * @since 2.0 + * + * @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. + * @exception E_SUCCESS The method is successful. + * @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. + * @see SetItemColor() + */ + Tizen::Graphics::Color GetItemColor(ContextMenuItemStatus status) const; + + /** + * Sets the item color for the specified status. + * + * @since 2.0 + * + * @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 + * @exception E_SUCCESS The method is successful. + * @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() + */ + result SetItemColor(ContextMenuItemStatus status, const Tizen::Graphics::Color& color); + + /** + * Gets maximum number of visible items. + * + * @since 2.0 + * + * @return The maximum number of visible items, @n + * else @c -1 if an error occurs + * @see SetMaxVisibleItemsCount() + */ + int GetMaxVisibleItemsCount(void) const; + + /** + * Sets maximum number of visible items. + * + * @since 2.0 + * + * @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. + * @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. + * @exception E_SYSTEM A system error has occurred. + * @see GetMaxVisibleItemsCount() + */ + result SetMaxVisibleItemsCount(int maxItemsCount); + +protected: + friend class _ContextMenuImpl; +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + // @since 2.0 + // + // + ContextMenu(const ContextMenu& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + // @since 2.0 + // + // + ContextMenu& operator =(const ContextMenu& rhs); +}; // ContextMenu + +}}} // Tizen::Ui: Control + +#endif // _FUI_CTRL_CONTEXT_MENU_H_ diff --git a/inc/FUiCtrlControlsTypes.h b/inc/FUiCtrlControlsTypes.h new file mode 100644 index 0000000..f1179d8 --- /dev/null +++ b/inc/FUiCtrlControlsTypes.h @@ -0,0 +1,116 @@ +// +// 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 FUiCtrlControlsTypes.h + * @brief This is the header file for the enumerations. + * + * This header file contains the declarations of the enumerations. + */ +#ifndef _FUI_CTRL_CONTROLS_TYPES_H_ +#define _FUI_CTRL_CONTROLS_TYPES_H_ + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @enum MarginType + * + * Defines different margin types for a control. + * + * @since 2.0 + */ +enum MarginType +{ + MARGIN_TYPE_LEFT, /**< The left side of the margin */ + MARGIN_TYPE_RIGHT, /**< The right side of the margin */ + MARGIN_TYPE_TOP, /**< The top side of the margin */ + MARGIN_TYPE_BOTTOM /**< The bottom side of the margin */ +}; + +/** + * @enum BackgroundStyle + * + * Defines the background style. + * + * @since 2.0 + */ +enum BackgroundStyle +{ + BACKGROUND_STYLE_NONE = 0, /**< The image with no background */ + BACKGROUND_STYLE_DEFAULT, /**< The default background image */ +}; + +/** + * @enum IconPosition + * + * Defines position of the text. + * + * @since 2.0 + */ +enum IconPosition +{ + ICON_POSITION_LEFT, /**< The position of the icon is to the left of the object */ + ICON_POSITION_RIGHT /**< The position of the icon is to the right of the object */ +}; + +/** + * @enum HorizontalAlignment + * + * Defines horizontal alignment of the text. + * + * @since 2.0 + */ +enum HorizontalAlignment +{ + ALIGNMENT_LEFT, /**< The text is left-aligned */ + ALIGNMENT_CENTER, /**< The text is center-aligned horizontally */ + ALIGNMENT_RIGHT /**< The text is right-aligned */ +}; + +/** + * @enum VerticalAlignment + * + * Defines vertical alignment of the text. + * + * @since 2.0 + */ +enum VerticalAlignment +{ + ALIGNMENT_TOP, /**< The text is top-aligned */ + ALIGNMENT_MIDDLE, /**< The text is center-aligned vertically */ + ALIGNMENT_BOTTOM /**< The text is bottom-aligned */ +}; + +/** + * @enum GroupStyle + * + * Defines the table view style of a control's border. + * + * @since 2.0 + */ +enum GroupStyle +{ + GROUP_STYLE_NONE, /**< A rectangle with no outline */ + GROUP_STYLE_SINGLE, /**< A rectangle with all corners rounded */ + GROUP_STYLE_TOP, /**< A rectangle with the two top corners rounded */ + GROUP_STYLE_MIDDLE, /**< A rectangle positioned at the center of a group */ + GROUP_STYLE_BOTTOM /**< A rectangle with the two bottom corners rounded */ +}; + +}}}// Tizen::Ui::Controls + +#endif //_FUI_CTRL_CONTROLS_TYPES_H_ diff --git a/inc/FUiCtrlCustomItem.h b/inc/FUiCtrlCustomItem.h new file mode 100644 index 0000000..20b8c53 --- /dev/null +++ b/inc/FUiCtrlCustomItem.h @@ -0,0 +1,396 @@ +// +// 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 FUiCtrlCustomItem.h + * @brief This is the header file for the %CustomItem class. + * + * This header file contains the declarations of the %CustomItem class and its helper classes. + */ + +#ifndef _FUI_CTRL_CUSTOM_ITEM_H_ +#define _FUI_CTRL_CUSTOM_ITEM_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _CustomItemImpl; + +/** + * @class CustomItem + * @brief This class defines the common behavior for %CustomItem. + * + * @since 2.0 + * + * 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. + * + */ + +class _OSP_EXPORT_ CustomItem + : public ListItemBase +{ +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. + * + * @since 2.0 + */ + CustomItem(void); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~CustomItem(void); + + /** + * Initializes this instance of %CustomItem with the specified parameters. + * + * @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. + */ + result Construct(const Tizen::Graphics::Dimension& itemSize, ListAnnexStyle style); + + /** + * Initializes this instance of %CustomItem with the specified parameters. + * + * @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. + */ + result Construct(const Tizen::Graphics::FloatDimension& itemSize, ListAnnexStyle style); + + /** + * Adds an instance of Tizen::Graphics::EnrichedText as an element to the %CustomItem control. + * + * @since 2.0 + * + * @return An error code + * @param[in] rect The bounds of the element + * @param[in] elementId The element ID + * @param[in] text The instance of EnrichedText + * @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. + */ + result AddElement(const Tizen::Graphics::Rectangle& rect, int elementId, const Tizen::Graphics::EnrichedText& text); + + /** + * Adds an instance of Tizen::Graphics::EnrichedText as an element to the %CustomItem control. + * + * @since 2.1 + * + * @return An error code + * @param[in] rect The bounds of the element + * @param[in] elementId The element ID + * @param[in] text The instance of EnrichedText + * @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. + */ + result AddElement(const Tizen::Graphics::FloatRectangle& rect, int elementId, const Tizen::Graphics::EnrichedText& text); + + /** + * Adds the text as an element to the %CustomItem control. + * + * @since 2.0 + * + * @return An error code + * @param[in] rect The bounds of the element + * @param[in] elementId The element ID + * @param[in] text The text string to add + * @param[in] textSliding Set to @c true to allow a long text to slide, @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 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); + + /** + * Adds the text as an element to the %CustomItem control. + * + * @since 2.1 + * + * @return An error code + * @param[in] rect The bounds of the element + * @param[in] elementId The element ID + * @param[in] text The text string to add + * @param[in] textSliding Set to @c true to allow a long text to slide, @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 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::FloatRectangle& rect, int elementId, const Tizen::Base::String& text, bool textSliding = true); + + /** + * Adds the text as an element to the %CustomItem control. + * + * @since 2.0 + * + * @return An error code + * @param[in] rect The bounds of the element + * @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. + * @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 + * @param[in] textSliding Set to @c true to allow a long text to slide, @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. + */ + result AddElement(const Tizen::Graphics::Rectangle& rect, int elementId, const Tizen::Base::String& text, int textSize, const Tizen::Graphics::Color& normalTextColor, const Tizen::Graphics::Color& pressedTextColor, const Tizen::Graphics::Color& highlightedTextColor, bool textSliding = true); + + /** + * Adds the text as an element to the %CustomItem control. + * + * @since 2.1 + * + * @return An error code + * @param[in] rect The bounds of the element + * @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. + * @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 + * @param[in] textSliding Set to @c true to allow a long text to slide, @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. + */ + result AddElement(const Tizen::Graphics::FloatRectangle& rect, int elementId, const Tizen::Base::String& text, float textSize, const Tizen::Graphics::Color& normalTextColor, const Tizen::Graphics::Color& pressedTextColor, const Tizen::Graphics::Color& highlightedTextColor, bool textSliding = true); + + /** + * Adds the bitmap image as an element to the %CustomItem control. + * + * @since 2.0 + * + * @return An error code + * @param[in] rect The bounds of the element + * @param[in] elementId The element ID + * @param[in] normalBitmap The bitmap image displayed when the item is in normal status + * @param[in] pPressedBitmap The bitmap image displayed when the item is pressed + * @param[in] pHighlightedBitmap The bitmap image displayed when the item is highlighted + * @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. + */ + result AddElement(const Tizen::Graphics::Rectangle& rect, int elementId, const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap = NULL, const Tizen::Graphics::Bitmap* pHighlightedBitmap = NULL); + + /** + * Adds the bitmap image as an element to the %CustomItem control. + * + * @since 2.1 + * + * @return An error code + * @param[in] rect The bounds of the element + * @param[in] elementId The element ID + * @param[in] normalBitmap The bitmap image displayed when the item is in normal status + * @param[in] pPressedBitmap The bitmap image displayed when the item is pressed + * @param[in] pHighlightedBitmap The bitmap image displayed when the item is highlighted + * @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. + */ + result AddElement(const Tizen::Graphics::FloatRectangle& rect, int elementId, const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap = NULL, const Tizen::Graphics::Bitmap* pHighlightedBitmap = NULL); + + /** + * Adds the custom drawing element to the %CustomItem control. + * + * @brief [Deprecated] + * @deprecated This method is deprecated. + * @since 2.0 + * + * @return An error code + * @param[in] rect The bounds of the element + * @param[in] elementId The element ID + * @param[in] element The custom element + * @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. + */ + result AddElement(const Tizen::Graphics::Rectangle& rect, int elementId, const ICustomElement& element); + + /** + * Adds the custom drawing element to the %CustomItem control. + * + * @since 2.1 + * + * @return An error code + * @param[in] rect The bounds of the element + * @param[in] elementId The element ID + * @param[in] element The custom element + * @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. + */ + result AddElement(const Tizen::Graphics::Rectangle& rect, int elementId, ICustomElement& element); + + /** + * Adds a custom drawing element to the %CustomItem control. + * + * @since 2.1 + * + * @return An error code + * @param[in] rect The bounds of the element + * @param[in] elementId The element ID + * @param[in] element The custom element + * @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. + */ + result AddElement(const Tizen::Graphics::FloatRectangle& rect, int elementId, ICustomElementF& element); + + /** + * Removes all the elements from the %CustomItem control. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result RemoveAllElements(void); + + /** + * Removes the element with the specified element ID. + * + * @since 2.0 + * + * @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); + + /** + * Sets the selection type of an element. + * + * @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. + */ + result SetElementSelectionEnabled(int elementId, bool enable); + + /** + * Sets the horizontal alignment of text in the specified element. + * + * @since 2.0 + * + * @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 either does not handle text or does not contain text. + * @exception E_SYSTEM A system error has occurred. + */ + result SetElementTextHorizontalAlignment(int elementId, HorizontalAlignment alignment); + + /** + * Sets the vertical alignment of text in the specified element. + * + * @since 2.0 + * + * @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 either does not handle text or does not contain text. + * @exception E_SYSTEM A system error has occurred. + */ + result SetElementTextVerticalAlignment(int elementId, VerticalAlignment alignment); + + /** + * Sets the auto-link mask. + * + * @since 2.0 + * + * @return An error code + * @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. + */ + result SetElementAutoLinkMask(int elementId, unsigned long mask); + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + CustomItem(const CustomItem& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + CustomItem& operator =(const CustomItem& rhs); +}; // CustomItem + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_CUSTOM_ITEM_H_ + diff --git a/inc/FUiCtrlCustomList.h b/inc/FUiCtrlCustomList.h new file mode 100644 index 0000000..ad5d4ab --- /dev/null +++ b/inc/FUiCtrlCustomList.h @@ -0,0 +1,863 @@ +// +// 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. +// + +/** + * @if OSPDEPREC + * @file FUiCtrlCustomList.h + * @brief This is the header file for the %CustomList class. + * + * This header file contains the declarations of the %CustomList class and its helper classes. + * @endif + */ + +#ifndef _FUI_CTRL_CUSTOM_LIST_H_ +#define _FUI_CTRL_CUSTOM_LIST_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @if OSPDEPREC + * @class CustomList + * @brief [Deprecated] This class defines the common behavior of a %CustomList control. + * + * @deprecated This class is deprecated. Instead of using this class, use ListView class. + * @since 2.0 + * + * The %CustomList class represents a list which has user-configured items. An item in a custom list can have + * different layout and height than the other items. Each item is composed of elements, which can be texts and bitmaps + * and is configured using CustomListItem and CustomListItemFormat. + * + * When an item in a custom list is selected or deselected, an item event is generated. It is passed on to all item event listeners + * that have registered an interest in item events generated by the custom list. If an application wants to perform tasks when a custom + * 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 + * must be deleted by the application. + * + * For more information, see CustomListItem and CustomListItemFormat. + * + * The following example demonstrates how to use the %CustomList control. + * + * @image html ui_controls_customlist.png + * + * + * This is a simple UI application that uses a %CustomList control. + * + * + * @code +//Sample code for CustomListSample.h +#include + +// Forward Declaration +class CustomListElement; + +class CustomListSample + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::ICustomItemEventListener +{ +public: + CustomListSample(void) + : __pCustomList(null) + , __pCustomListItemFormat(null) + , __pListElement(null){} + + bool Initialize(void); + result AddListItem(Tizen::Ui::Controls::CustomList& customList, Tizen::Base::String itemText, + Tizen::Graphics::Bitmap* pBitmapNormal, Tizen::Graphics::Bitmap* pBitmapFocused); + + virtual result OnInitializing(void); + virtual result OnTerminating(void); + + // ICustomItemEventListener + virtual void OnItemStateChanged(const Tizen::Ui::Control& source, int index, int itemId, Tizen::Ui::ItemStatus status); + virtual void OnItemStateChanged(const Tizen::Ui::Control& source, int index, int itemId, int elementId, Tizen::Ui::ItemStatus status); + +private: + static const int ID_LIST_ITEM = 101; + static const int ID_LIST_TEXT = 102; + static const int ID_LIST_BITMAP = 103; + static const int ID_FORMAT_CUSTOM = 104; + + Tizen::Ui::Controls::CustomList* __pCustomList; + Tizen::Ui::Controls::CustomListItemFormat* __pCustomListItemFormat; + CustomListElement* __pListElement; +}; + * @endcode + * + * @code +// Sample code for CutomListSample.cpp +#include +#include + +#include "CustomListSample.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; + +class CustomListElement + : public ICustomListElement +{ +public: + result + DrawElement(const Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::Rectangle& rect, CustomListItemStatus itemStatus) + { + result r = E_SUCCESS; + + Canvas* pCanvas = const_cast(&canvas); + + pCanvas->SetLineWidth(5); + pCanvas->SetForegroundColor(Color::GetColor(COLOR_ID_GREEN)); + if (pCanvas->DrawRectangle(rect) != E_SUCCESS) + { + return r; + } + + if (pCanvas->DrawText(Point(rect.x+20, rect.y+20), L"Custom") != E_SUCCESS) + { + return r; + } + + return r; + } +}; + +bool +CustomListSample::Initialize() +{ + Construct(FORM_STYLE_NORMAL); + return true; +} + +result +CustomListSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + // Creates an instance of CustomListElement + __pListElement = new CustomListElement(); + + // Creates an instance of CustomList + __pCustomList = new CustomList(); + __pCustomList->Construct(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height), CUSTOM_LIST_STYLE_NORMAL); + __pCustomList->AddCustomItemEventListener(*this); + + // Creates an instance of CustomListItemFormat + __pCustomListItemFormat = new CustomListItemFormat(); + __pCustomListItemFormat->Construct(); + __pCustomListItemFormat->AddElement(ID_LIST_TEXT, Rectangle(10, 25, 150, 80)); + __pCustomListItemFormat->AddElement(ID_LIST_BITMAP, Rectangle(170, 10, 70, 80)); + __pCustomListItemFormat->AddElement(ID_FORMAT_CUSTOM, Rectangle(GetClientAreaBounds().width - 120, 20, 100, 60)); + __pCustomListItemFormat->SetElementEventEnabled(ID_LIST_TEXT, true); + __pCustomListItemFormat->SetElementEventEnabled(ID_LIST_BITMAP, true); + __pCustomListItemFormat->SetElementEventEnabled(ID_FORMAT_CUSTOM, true); + + // Gets instances of Bitmap + AppResource* pAppResource = Application::GetInstance()->GetAppResource(); + Bitmap *pBitmapNormal = pAppResource->GetBitmapN(L"tizen.png"); + Bitmap *pBitmapFocused = pAppResource->GetBitmapN(L"tizen.png"); + + // Adds the item to the custom list + for (int i = 0; i < 30; i++) + { + String str = L"Text"; + str.Append(i+1); + AddListItem(*__pCustomList, str, pBitmapNormal, pBitmapFocused); + } + + // Adds the custom list to the form + AddControl(__pCustomList); + + // Deallocates bitmaps + delete pBitmapNormal; + delete pBitmapFocused; + + return r; +} + +result +CustomListSample::OnTerminating(void) +{ + result r = E_SUCCESS; + + // Deallocates item format and the element + delete __pCustomListItemFormat; + delete __pListElement; + + return r; +} + +result +CustomListSample::AddListItem(CustomList& customList, String itemText, Bitmap* pBitmapNormal, Bitmap* pBitmapFocused) +{ + // Creates an instance of CustomListItem + CustomListItem* pItem = new CustomListItem(); + + pItem->Construct(100); + pItem->SetItemFormat(*__pCustomListItemFormat); + pItem->SetElement(ID_LIST_TEXT, itemText); + pItem->SetElement(ID_LIST_BITMAP, *pBitmapNormal, pBitmapFocused); + pItem->SetElement(ID_FORMAT_CUSTOM, *(static_cast(__pListElement))); + + customList.AddItem(*pItem, ID_LIST_ITEM); + + return E_SUCCESS; +} + +// ICustomItemEventListener implementation +void +CustomListSample::OnItemStateChanged(const Control& source, int index, int itemId, ItemStatus status) +{ + switch (itemId) + { + case ID_LIST_ITEM: + { + // .... + } + break; + default: + break; + } +} + +void +CustomListSample::OnItemStateChanged(const Control& source, int index, int itemId, int elementId, Tizen::Ui::ItemStatus status) +{ + switch (itemId) + { + case ID_LIST_ITEM: + { + switch (elementId) + { + case ID_LIST_TEXT: + { + // .... + } + break; + + case ID_LIST_BITMAP: + { + // .... + } + break; + default: + break; + } + } + break; + default: + break; + } +} + * @endcode + * @endif + */ +class _OSP_EXPORT_ CustomList + : public Tizen::Ui::Control +{ +public: + /** + * @if OSPDEPREC + * The object is not fully constructed after this constructor is called. @n + * For full construction, the CustomList::Construct() method must be called right after calling this constructor. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use ListView class. + * @since 2.0 + * @endif + */ + CustomList(void); + + /** + * @if OSPDEPREC + * 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. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use ListView class. + * @since 2.0 + * @endif + */ + virtual ~CustomList(void); + +public: + /** + * @if OSPDEPREC + * Initializes this instance of %CustomList with the specified parameters. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use ListView class. + * @since 2.0 + * + * @return An error code + * @param[in] rect The x and y position of the top-left corner of the %CustomList control along with the width and height of the control + * @param[in] style The style set of %CustomList + * @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_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. + * - The minimum size of this control is 92 x 72 on a WVGA screen, 60 x 48 on a HVGA screen and 46 x 36 on a WQVGA screen. + * @endif + */ + result Construct(const Tizen::Graphics::Rectangle& rect, CustomListStyle style, bool itemDivider = true); + + + /** + * @if OSPDEPREC + * Adds a custom item event listener instance. @n + * The added listener gets notified when the state of CustomListItem is changed. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use ListView class. + * @since 2.0 + * + * @param[in] listener The event listener to add + * @endif + */ + void AddCustomItemEventListener(Tizen::Ui::ICustomItemEventListener& listener); + + /** + * @if OSPDEPREC + * 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. + * @since 2.0 + * + * @param[in] listener The event listener to remove + * @endif + */ + void RemoveCustomItemEventListener(Tizen::Ui::ICustomItemEventListener& listener); + + /** + * @if OSPDEPREC + * Adds the specified item to the %CustomList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use ListView class. + * @since 2.0 + * + * @return An error code + * @param[in] item The custom list item to add + * @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. + * - 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 + */ + result AddItem(const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID); + + /** + * @if OSPDEPREC + * Inserts the specified item to %CustomList at the specified index. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use ListView class. + * @since 2.0 + * + * @return An error code + * @param[in] index The index at which to insert the item + * @param[in] item The custom list item to insert + * @param[in] itemId The item ID for the item + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. @n + * 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. + * @remarks + * - The inserted 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 + */ + result InsertItemAt(int index, const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID); + + /** + * @if OSPDEPREC + * Sets the contents of the item at the specified index in the %CustomList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use ListView class. + * @since 2.0 + * + * @return An error code + * @param[in] index The index at which to set the contents of the item + * @param[in] item The custom list item to set + * @param[in] itemId The item ID for the item + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. @n + * 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. + * @remarks Do not add, insert, or set an item that already belongs to the %CustomList control. + * @endif + */ + result SetItemAt(int index, const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID); + + /** + * @if OSPDEPREC + * Removes the item at the specified index in the %CustomList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use ListView class. + * @since 2.0 + * + * @return An error code + * @param[in] index The index of the item to delete + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. @n + * 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. + * @remarks The removed list item is deleted from the memory. + * @endif + */ + result RemoveItemAt(int index); + + /** + * @if OSPDEPREC + * Removes all the items from the %CustomList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use ListView class. + * @since 2.0 + * + * @return An error code + * @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. + * @endif + */ + result RemoveAllItems(void); + + /** + * @if OSPDEPREC + * Gets the item at the specified index in the %CustomList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use ListView class. + * @since 2.0 + * + * @return A custom list item, @n + * else @c null if the specified index is out of range + * @param[in] index The index of the item to get + * @endif + */ + const CustomListItem* GetItemAt(int index) const; + + /** + * @if OSPDEPREC + * Gets the number of items in the %CustomList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use ListView class. + * @since 2.0 + * + * @return The number of items in %CustomList, @n + * else @c -1 if an error occurs + * @endif + */ + int GetItemCount(void) const; + + /** + * @if OSPDEPREC + * Enables or disables the status of the item at the specified @c index in the %CustomList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use ListView class. + * @since 2.0 + * + * @return An error code + * @param[in] index The index of the item whose status is to set + * @param[in] enable Set to @c true to enable, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result SetItemEnabled(int index, bool enable); + + /** + * @if OSPDEPREC + * Checks whether the specified index in the %CustomList control is enabled. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use ListView class. + * @since 2.0 + * + * @return @c true if the item is enabled, @n + * else @c false + * @param[in] index The index of the item to check + * @endif + */ + bool IsItemEnabled(int index) const; + + /** + * @if OSPDEPREC + * Sets the check status of the item at the specified index in the %CustomList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use ListView class. + * @since 2.0 + * + * @return An error code + * @param[in] index The index of the item to set + * @param[in] check The check status + * @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. + * @endif + */ + result SetItemChecked(int index, bool check); + + /** + * @if OSPDEPREC + * Checks whether the item at the specified index is checked in the %CustomList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use ListView class. + * @since 2.0 + * + * @return @c true if the item is checked, @n + * else @c false + * @param[in] index The index of the item to check + * @remarks This method can only be used when the style of the list allows selection. + * @endif + */ + bool IsItemChecked(int index) const; + + /** + * @if OSPDEPREC + * Sets the check status for all items of the %CustomList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use ListView class. + * @since 2.0 + * + * @return An error code + * @param[in] check The check status + * @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. + * @endif + */ + result SetAllItemsChecked(bool check); + + + /** + * @if OSPDEPREC + * Removes the checked items of the %CustomList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use ListView class. + * @since 2.0 + * + * @return An error code + * @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. + * - The removed list items are deleted from the memory. + * @endif + */ + result RemoveAllCheckedItems(void); + + /** + * @if OSPDEPREC + * Gets the first item of all the checked items in the %CustomList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use ListView class. + * @since 2.0 + * + * @return The index of the first checked item, @n + * else @c -1 if no item is checked or an error occurs + * @endif + */ + int GetFirstCheckedItemIndex(void) const; + + /** + * @if OSPDEPREC + * Gets the last item of all the checked items in the %CustomList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use ListView class. + * @since 2.0 + * + * @return The index of the last checked item, @n + * else @c -1 if no item is checked or an error occurs + * @endif + */ + int GetLastCheckedItemIndex(void) const; + + /** + * @if OSPDEPREC + * Gets the next checked item from the specified index in the %CustomList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use ListView class. + * @since 2.0 + * + * @return The index of the next checked item @n + * else @c -1 if no more item after the specified index is checked, @n + * or 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 + */ + int GetNextCheckedItemIndexAfter(int index) const; + + /** + * @if OSPDEPREC + * Gets the index of the item at the specified position. + * + * @brief [Deprecated] + * @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 the specified position is not inside any of the items + * @param[in] x The x position of the point + * @param[in] y The y position of the point + * @endif + */ + int GetItemIndexFromPosition(int x, int y) const; + + /** + * @if OSPDEPREC + * Gets the index of the item at the specified position. + * + * @brief [Deprecated] + * @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 the specified position is not inside any of the items + * @param[in] position The position of the point + * @endif + */ + int GetItemIndexFromPosition(const Tizen::Graphics::Point& position) const; + + /** + * @if OSPDEPREC + * Gets the index of the first item from the visible items in the %CustomList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use ListView class. + * @since 2.0 + * + * @return The index of the first item, @n + * else @c -1 if no item is visible + * @endif + */ + int GetTopDrawnItemIndex(void) const; + + /** + * @if OSPDEPREC + * Gets the index of the last item from the visible items in the %CustomList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use ListView class. + * @since 2.0 + * + * @return The index of the last item, @n + * else @c -1 if no item is visible + * @endif + */ + int GetBottomDrawnItemIndex(void) const; + + /** + * @if OSPDEPREC + * Sets the background color of the %CustomList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use ListView class. + * @since 2.0 + * + * @param[in] color The background color + * @endif + */ + void SetBackgroundColor(const Tizen::Graphics::Color& color); + + /** + * @if OSPDEPREC + * Sets the text to be displayed when there is no item in the %CustomList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use ListView class. + * @since 2.0 + * + * @param[in] text The text message to display + * @endif + */ + void SetTextOfEmptyList(const Tizen::Base::String& text); + + /** + * @if OSPDEPREC + * Sets the color of the text to be displayed when there is no item in the %CustomList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use ListView class. + * @since 2.0 + * + * @param[in] color The color of the text to display + * @endif + */ + void SetTextColorOfEmptyList(const Tizen::Graphics::Color& color); + + /** + * @if OSPDEPREC + * 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. + * @since 2.0 + * + * @return The color of the text to be displayed + * @endif + */ + Tizen::Graphics::Color GetTextColorOfEmptyList(void) const; + + /** + * @if OSPDEPREC + * Gets the index of the item. + * + * @brief [Deprecated] + * @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 + * @param[in] itemId The item ID of the %CustomList control item + * @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 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 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 + */ + int GetItemIdAt(int index) const; + + /** + * @if OSPDEPREC + * Scrolls to the bottom of the %CustomList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use ListView class. + * @since 2.0 + * @endif + */ + void ScrollToBottom(void); + + /** + * @if OSPDEPREC + * Scrolls to the top of the %CustomList. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use ListView class. + * @since 2.0 + * @endif + */ + void ScrollToTop(void); + + /** + * @if OSPDEPREC + * Scrolls to the item at the specified index. @n + * The specified item is drawn at the top of the %CustomList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use ListView class. + * @since 2.0 + * + * @return An error code + * @param[in] index The index of the %CustomList control item + * @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. + * @endif + */ + result ScrollToTop(int index); + + /** + * @if OSPDEPREC + * Draws and shows the item at the specified index in the %CustomList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use ListView class. + * @since 2.0 + * + * @return An error code + * + * @param[in] index The index of the %CustomList control item + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @exception E_INVALID_OPERATION The item has never been drawn before calling this method. + * @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. + * @endif + */ + result RefreshItem(int index); + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + CustomList(const CustomList& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + CustomList& operator =(const CustomList& rhs); + + friend class _CustomListImpl; + +}; //CustomList + +}}} //Tizen::Ui::Controls + +#endif // _FUI_CTRL_CUSTOM_LIST_H_ diff --git a/inc/FUiCtrlCustomListItem.h b/inc/FUiCtrlCustomListItem.h new file mode 100644 index 0000000..f1b010b --- /dev/null +++ b/inc/FUiCtrlCustomListItem.h @@ -0,0 +1,315 @@ +// +// 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. +// + +/** + * @if OSPDEPREC + * @file FUiCtrlCustomListItem.h + * @brief This is the header file for the %CustomListItem class. + * + * This header file contains the declarations of the %CustomListItem class and its helper classes. + * @endif + */ + +#ifndef _FUI_CTRL_CUSTOM_LIST_ITEM_H_ +#define _FUI_CTRL_CUSTOM_LIST_ITEM_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ +class _CustomListItemImpl; +class CustomListItemFormat; +/** + * @if OSPDEPREC + * @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 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 + * 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 CustomList is destroyed. If you want to remove certain list items, you must use RemoveItemAt(). + * + * For more information, see CustomListItemFormat. + * + * @endif + */ +class _OSP_EXPORT_ CustomListItem + : public Tizen::Base::Object +{ +public: + /** + * @if OSPDEPREC + * The object is not fully constructed after this constructor is called. @n + * 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. + * + * @since 2.0 + * @endif + */ + CustomListItem(void); + + /** + * @if OSPDEPREC + * 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. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use CustomItem class. + * @since 2.0 + * @endif + */ + virtual ~CustomListItem(void); + +public: + /** + * @if OSPDEPREC + * Initializes this instance of %CustomListItem with the specified parameter. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the CustomItem class. + * @since 2.0 + * + * @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. + * @endif + */ + result Construct(int itemHeight); + + /** + * @if OSPDEPREC + * Sets the format of %CustomListItem. + * + * @brief [Deprecated] + * @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. + * @endif + */ + void SetItemFormat(const CustomListItemFormat& itemFormat); + + /** + * Gets the format of %CustomListItem. + * + * @since 2.0 + * + * @return A pointer to CustomListItemFormat, @n + * else @c null if a system error occurs + */ + const CustomListItemFormat* GetItemFormat(void) const; + + /** + * @if OSPDEPREC + * 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 + * + * @param[in] bitmap The background bitmap image + * @remarks The specified bitmap is automatically scaled to the size of an associated item. + * @see SetNormalItemBackgroundBitmap() + * @endif + */ + void SetFocusedItemBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap); + + /** + * @if OSPDEPREC + * 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 + * + * @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 + */ + void SetNormalItemBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap); + + /** + * @if OSPDEPREC + * 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 + * + * @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 + */ + + void SetHighlightedItemBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap); + + /** + * @if OSPDEPREC + * 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 + * + * @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'. + * @endif + */ + result SetElement(int elementId, const Tizen::Base::String& text); + + /** + * @if OSPDEPREC + * 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 + * + * @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. + * @endif + */ + result SetElement(int elementId, const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pFocusedBitmap); + + + /** + * @if OSPDEPREC + * 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 + * + * @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); + + /** + * @if OSPDEPREC + * Sets the custom element for %CustomListItem. + * + * @brief [Deprecated] + * @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 + * @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, + * 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); + + /** + * @if OSPDEPREC + * Sets the element ID of the checkbox of %CustomListItem. + * + * @brief [Deprecated] + * @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 + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result SetCheckBox(int elementId); + + /** + * @if OSPDEPREC + * Gets the percentage value of %CustomListItem. + * + * @brief [Deprecated] + * @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 + * @endif + */ + int GetValue(void) const; + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + CustomListItem(const CustomListItem& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + CustomListItem& operator =(const CustomListItem& rhs); + +private: + + CustomListItemFormat* __pCustomListItemFormat; + _CustomListItemImpl* __pCustomListItemImpl; + + friend class _CustomListImpl; + friend class _CustomListItemImpl; + friend class _ExpandableListImpl; + friend class _SlidableListImpl; + friend class _GroupedListImpl; + friend class _SlidableGroupedListImpl; + friend class _ListImpl; + + friend class _CustomListItemDataProvider; + friend class _SlidableListItemProvider; + friend class _ListBaseImpl; + friend class _GroupedListItemDataProvider; + friend class _ExpandableListItemDataProvider; + friend class _SlidableGroupedListItemProvider; + friend class _ListItemDataProvider; +}; //CustomListItem + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_CUSTOM_LIST_ITEM_H_ diff --git a/inc/FUiCtrlCustomListItemFormat.h b/inc/FUiCtrlCustomListItemFormat.h new file mode 100644 index 0000000..7deefdc --- /dev/null +++ b/inc/FUiCtrlCustomListItemFormat.h @@ -0,0 +1,318 @@ +// +// 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. +// + +/** + * @if OSPDEPREC + * @file FUiCtrlCustomListItemFormat.h + * @brief This is the header file for the %CustomListItemFormat class. + * + * This header file contains the declarations of the %CustomListItemFormat class and its helper classes. + * @endif + */ + +#ifndef _FUI_CTRL_CUSTOM_LIST_ITEM_FORMAT_H_ +#define _FUI_CTRL_CUSTOM_LIST_ITEM_FORMAT_H_ + +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ +/** + * @if OSPDEPREC + * @class CustomListItemFormat + * @brief [Deprecated] This class defines the common behavior of an item format of a CustomList control. + * + * @deprecated This class is deprecated. There is no need to use this class. + * @since 2.0 + * + * The %CustomListItemFormat class defines the common behavior of an item format of a CustomList control. + * A custom list item is composed of elements, which can be texts and bitmaps. + * A custom list item format determines the configuration of elements of a list item + * and the position and the size of a custom list item. + * + * Note that %CustomListItemFormat needs to be created on a heap and it must be + * deleted explicitly after use. However, CustomListItem must + * be manually deleted because items are removed from memory by the List when + * it is destroyed. + * + * @endif + */ +class _OSP_EXPORT_ CustomListItemFormat + : public Tizen::Base::Object +{ +public: + /** + * @if OSPDEPREC + * The object is not fully constructed after this constructor is called. @n + * For full construction, the CustomListItemFormat::Construct() method must be called right after calling this constructor. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. There is no need to use this class. + * @since 2.0 + * @endif + */ + CustomListItemFormat(void); + + /** + * @if OSPDEPREC + * 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. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. There is no need to use this class. + * @since 2.0 + * @endif + */ + virtual ~CustomListItemFormat(void); + +public: + /** + * @if OSPDEPREC + * Initializes this instance of %CustomListItemFormat. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. There is no need to use this class. + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + * @endif + */ + result Construct(void); + + /** + * @if OSPDEPREC + * Adds the %CustomListElement with bounds equal to @c rect. + * + * @brief [Deprecated] + * @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 + * @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); + + /** + * @if OSPDEPREC + * 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. + * @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 + * @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); + + /** + * @if OSPDEPREC + * Adds the %CustomListElement with bounds equal to @c rect, specifying the size of text and the color of text. + * + * @brief [Deprecated] + * @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. + * @endif + */ + result AddElement(int elementId, const Tizen::Graphics::Rectangle& rect, int textSize, const Tizen::Graphics::Color& normalTextColor, const Tizen::Graphics::Color& focusedTextColor); + + /** + * @if OSPDEPREC + * Adds the %CustomListElement with bounds equal to @c rect, specifying the size of text and the color of text. + * + * @brief [Deprecated] + * @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. + * @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); + + /** + * @if OSPDEPREC + * Gets the position and size of the element. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. There is no need to use this class. + * @since 2.0 + * + * @return The bounds of the element, @n + * else a rectangle of (0, 0, -1, -1) if there is no element matching the specified ID + * @param[in] elementId The ID of the element + * @endif + */ + Tizen::Graphics::Rectangle GetElement(int elementId) const; + + /** + * @if OSPDEPREC + * Gets the ID of the first element. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. There is no need to use this class. + * @since 2.0 + * + * @return The ID of the first element, @n + * else @c -1 if a system error occurs + * @endif + */ + int GetFirstElementId(void) const; + + /** + * @if OSPDEPREC + * Gets the ID of the next element of the specified element. + * + * @brief [Deprecated] + * @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 + * @endif + */ + int GetNextElementId(int elementId) const; + + /** + * @if OSPDEPREC + * Gets the ID of the first element of all enabled items. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. There is no need to use this class. + * @since 2.0 + * + * @return The ID of the first enabled element, @n + * else @c -1 if no element is enabled + * @endif + */ + int GetFirstEnabledElementId(void) const; + + /** + * @if OSPDEPREC + * Gets the ID of the next enabled element after the specified element. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. There is no need to use this class. + * @since 2.0 + * + * @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 + * @endif + */ + int GetNextEnabledElementId(int elementId) const; + + /** + * @if OSPDEPREC + * Gets the ID of the previous enabled element ID of the specified element. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. There is no need to use this class. + * @since 2.0 + * + * @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 + * @endif + */ + int GetPreviousEnabledElementId(int elementId) const; + + /** + * @if OSPDEPREC + * Sets the event status for the specified element. + * + * @brief [Deprecated] + * @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 + * @endif + */ + void SetElementEventEnabled(int elementId, bool enable); + + /** + * @if OSPDEPREC + * Checks whether the event status is enabled for the specified element. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. There is no need to use this class. + * @since 2.0 + * + * @return @c true if the event status is enabled, @n + * else @c false + * @param[in] elementId The ID of the element + * @endif + */ + bool IsElementEventEnabled(int elementId); + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + CustomListItemFormat(const CustomListItemFormat& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + CustomListItemFormat& operator =(const CustomListItemFormat& rhs); + +private: + + class _CustomListItemFormatImpl* __pCustomListItemFormatImpl; + + friend class _CustomListItemImpl; + friend class _CustomListImpl; + friend class _ExpandableListImpl; + friend class _SlidableListImpl; + friend class _GroupedListImpl; + friend class _SlidableGroupedListImpl; +}; //CustomListItemFormat + +}}} //Tizen::Ui::Controls + +#endif // _FUI_CTRL_CUSTOM_LIST_ITEM_FORMAT_H_ diff --git a/inc/FUiCtrlCustomListTypes.h b/inc/FUiCtrlCustomListTypes.h new file mode 100644 index 0000000..9fdd91c --- /dev/null +++ b/inc/FUiCtrlCustomListTypes.h @@ -0,0 +1,57 @@ +// +// 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. +// + +/** + * @if OSPDEPREC + * @file FUiCtrlCustomListTypes.h + * @brief This is the header file for the %CustomListStyle enumeration. + * + * This header file contains the declarations of the %CustomListStyle enumeration. + * This enum defines the styles for the CustomList control. + * @endif + */ +#ifndef _FUI_CTRL_CUSTOM_LIST_TYPES_H_ +#define _FUI_CTRL_CUSTOM_LIST_TYPES_H_ + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @if OSPDEPREC + * @enum CustomListStyle + * + * 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. + * @since 2.0 + * @endif + */ +enum CustomListStyle +{ + CUSTOM_LIST_STYLE_NORMAL = 0, /**< @if OSPDEPREC No mark, radio, or On/Off check @endif */ + CUSTOM_LIST_STYLE_RADIO, /**< @if OSPDEPREC The radio style for single selection @endif */ + CUSTOM_LIST_STYLE_RADIO_WITH_DIVIDER, /**< @if OSPDEPREC The radio style with divider for single selection @endif */ + CUSTOM_LIST_STYLE_MARK, /**< @if OSPDEPREC The mark style for multiple selection @endif */ + CUSTOM_LIST_STYLE_MARK_WITH_DIVIDER, /**< @if OSPDEPREC The mark style with divider for multiple selection @endif */ + CUSTOM_LIST_STYLE_ONOFF, /**< @if OSPDEPREC The On/Off style @endif */ + CUSTOM_LIST_STYLE_ONOFF_WITH_DIVIDER /**< @if OSPDEPREC The On/Off style with divider @endif */ +}; + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_CUSTOM_LIST_TYPES_H_ diff --git a/inc/FUiCtrlDatePicker.h b/inc/FUiCtrlDatePicker.h new file mode 100644 index 0000000..a974c5e --- /dev/null +++ b/inc/FUiCtrlDatePicker.h @@ -0,0 +1,385 @@ +// +// 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 FUiCtrlDatePicker.h +* @brief This is the header file for the %DatePicker class. +* +* This header file contains the declarations of the %DatePicker class. +*/ +#ifndef _FUI_CTRL_DATE_PICKER_H_ +#define _FUI_CTRL_DATE_PICKER_H_ + +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** +* @class DatePicker +* @brief This class displays a full screen %DatePicker on top of the screen. +* +* @since 2.0 +* +* @remarks One cannot change the size and the position of the %DatePicker. +* +* The %DatePicker class displays a full screen window-based selector that allows the user to select a certain date. +* +* For more information on the class features, +* see DatePicker, TimePicker, and DateTimePicker. +* +* The following example demonstrates how to use the %DatePicker class. +* +* @code +// Sample code for DatePickerSample.h +#include + +class DatePickerSample + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::IDateChangeEventListener + , public Tizen::Ui::IActionEventListener +{ +public: + DatePickerSample(void) + :__pDatePicker(null){} + + bool Initialize(void); + virtual result OnInitializing(void); + virtual result OnTerminating(void); + void ShowDatePicker(bool show); + + // IActionEventListener + virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId); + + // IDateChangeEventListener + virtual void OnDateChanged(const Tizen::Ui::Control& source, int year, int month, int day); + virtual void OnDateChangeCanceled(const Tizen::Ui::Control& source); + +private: + static const int ID_BUTTON = 101; + + Tizen::Ui::Controls::DatePicker* __pDatePicker; +}; + + * @endcode + * + * @code +// Sample code for DatePickerSample.cpp +#include "DatePickerSample.h" +#include + +using namespace Tizen::Graphics; +using namespace Tizen::Ui::Controls; + +bool +DatePickerSample::Initialize(void) +{ + Construct(FORM_STYLE_NORMAL); + return true; +} + +result +DatePickerSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + // Creates an instance of Button + Button* pButton = new Button(); + pButton->Construct(Rectangle(50, 50, 300, 200), L"Show DatePicker"); + pButton->SetActionId(ID_BUTTON); + pButton->AddActionEventListener(*this); + + // Adds the button to the form + AddControl(pButton); + + // Creates an instance of DatePicker + __pDatePicker = new DatePicker(); + __pDatePicker->Construct(); + + // Adds an instance of IDateChangeEventListener + __pDatePicker->AddDateChangeEventListener(*this); + + // Shows the date picker after it's owner form is shown. + + return r; +} + +void +DatePickerSample::ShowDatePicker(bool show) +{ + // Changes to desired show state + __pDatePicker->SetShowState(show); + + // Calls Show() of the control + if (show) + { + __pDatePicker->Show(); + } + // Calls Show() of the container + else + { + Invalidate(true); + } +} + +result +DatePickerSample::OnTerminating(void) +{ + result r = E_SUCCESS; + + // Deallocates the date picker + __pDatePicker->Destroy(); + + return r; +} + +// IActionEventListener implementation +void +DatePickerSample::OnActionPerformed(const Control& source, int actionId) +{ + switch (actionId) + { + case ID_BUTTON: + { + ShowDatePicker(true); + } + break; + default: + break; + } +} + +// IDateChangeEventListener implementation +void +DatePickerSample::OnDateChanged(const Control& source, int year, int month, int day) +{ + // .... +} + +void +DatePickerSample::OnDateChangeCanceled(const Control& source) +{ + // .... +} +* @endcode +**/ +class _OSP_EXPORT_ DatePicker + : public Tizen::Ui::Window +{ +public: + /** + * The object is not fully constructed after this constructor is called. @n + * For full construction, the DatePicker::Construct() method must be called right after calling this constructor. + * + * @since 2.0 + */ + DatePicker(void); + + /** + * 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 ~DatePicker(void); + + /** + * Adds a data change event listener instance. @n + * 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 + * @see IDateChangeEventListener::OnDateChanged() + * @see IDateChangeEventListener::OnDateChangeCanceled() + * @see RemoveDateChangeEventListener() + */ + void AddDateChangeEventListener(Tizen::Ui::IDateChangeEventListener& listener); + + /** + * Removes a date changed event listener instance. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The listener to remove + * @see IDateChangeEventListener::OnDateChanged() + * @see IDateChangeEventListener::OnDateChangeCanceled() + * @see AddDateChangeEventListener() + */ + void RemoveDateChangeEventListener(Tizen::Ui::IDateChangeEventListener& listener); + + /** + * Initializes this instance of %DatePicker with the specified parameter. + * + * @since 2.0 + * + * @return An error code + * @param[in] title The title + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @remarks The optimal size of the control is defined in + * Optimal Size of UI Controls. + */ + result Construct(const Tizen::Base::String& title = L""); + + /** + * Gets the current date value of the %DatePicker control. + * + * @since 2.0 + * + * @return A %DateTime instance + */ + Tizen::Base::DateTime GetDate(void) const; + + /** + * Gets the current day value of the %DatePicker control. @n + * The day value is between @c 1 to @c 31. + * + * @since 2.0 + * + * @return The current day value, @n + * else @c -1 if an error occurs + */ + int GetDay(void) const; + + /** + * Gets the current month value of the %DatePicker control. @n + * The month value is between @c 1 to @c 12. + * + * @since 2.0 + * + * @return The current month value, @n + * else @c -1 if an error occurs + */ + int GetMonth(void) const; + + /** + * Gets the current year value of the %DatePicker control. + * The year value is between @c 1 to @c 9999. + * + * @since 2.0 + * + * @return The current year value, @n + * else @c -1 if an error occurs + * + */ + int GetYear(void) const; + + /** + * Sets the date value of the %DatePicker control. + * + * @since 2.0 + * + * @param[in] date The date to set + */ + void SetDate(const Tizen::Base::DateTime& date); + + /** + * Sets the date value of the %DatePicker control with the current date. + * + * @since 2.0 + */ + void SetCurrentDate(void); + + /** + * Sets the year value. @n + * The year value should be between @c 1 and @c 9999. + * + * @since 2.0 + * + * @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. + */ + result SetYear(int year); + + /** + * Sets the month value. @n + * The month value should be between @c 1 and @c 12. + * + * @since 2.0 + * + * @return An error code + * @param[in] month The month value + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified month value is invalid. + */ + result SetMonth(int month); + + /** + * Sets the day value. @n + * The day value should be between @c 1 and @c 31. + * + * @since 2.0 + * + * @return An error code + * @param[in] day The day value + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified @c day is invalid. + */ + result SetDay(int day); + + /** + * Sets the valid year range. + * The range should be set in between @c 1 and @c 9999. + * + * @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. + */ + result SetYearRange(int minYear, int maxYear); + + /** + * Gets the valid year range. + * + * @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. + */ + result GetYearRange(int& minYear, int& maxYear) const; + +protected: + friend class _DatePickerImpl; + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + DatePicker(const DatePicker& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + DatePicker& operator =(const DatePicker& rhs); + +}; // DatePicker + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_DATE_PICKER_H_ diff --git a/inc/FUiCtrlDateTimePicker.h b/inc/FUiCtrlDateTimePicker.h new file mode 100644 index 0000000..17b6b44 --- /dev/null +++ b/inc/FUiCtrlDateTimePicker.h @@ -0,0 +1,448 @@ +// +// 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 FUiCtrlDateTimePicker.h +* @brief This is the header file for the %DateTimePicker class. +* +* This header file contains the declarations of the %DateTimePicker class. +*/ +#ifndef _FUI_CTRL_DATE_TIME_PICKER_H_ +#define _FUI_CTRL_DATE_TIME_PICKER_H_ + +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** +* @class DateTimePicker +* @brief This class displays a full screen %DateTimePicker on top of the screen. +* +* @since 2.0 +* +* The %DateTimePicker class displays a full screen window-based selector that allows the user to select a certain date and time. +* +* For more information on the class features, +* see DatePicker, TimePicker, and DateTimePicker. +* +* The following example demonstrates how to use the %DateTimePicker class. +* +* @code +// Sample code for DateTimePickerSample.h +#include + +class DateTimePickerSample + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::IDateTimeChangeEventListener + , public Tizen::Ui::IActionEventListener +{ +public: + DateTimePickerSample(void) + :__pDateTimePicker(null){} + + bool Initialize(void); + void ShowDateTimePicker(bool show); + virtual result OnInitializing(void); + virtual result OnTerminating(void); + + // IActionEventListener + virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId); + + // IDateTimeChangeEventListener + virtual void OnDateTimeChanged(const Tizen::Ui::Control& source, int year, int month, int day, int hour, int minute); + virtual void OnDateTimeChangeCanceled(const Tizen::Ui::Control& source); + +private: + static const int ID_BUTTON = 101; + + Tizen::Ui::Controls::DateTimePicker* __pDateTimePicker; +}; + + * @endcode + * + * @code +// Sample code for DateTimePickerSample.cpp +#include + +#include "DateTimePickerSample.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Ui::Controls; + +bool +DateTimePickerSample::Initialize(void) +{ + Construct(FORM_STYLE_NORMAL); + return true; +} + +result +DateTimePickerSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + // Creates an instance of Button + Button* pButton = new Button(); + pButton->Construct(Rectangle(50, 50, 300, 200), L"Show DateTimePicker"); + pButton->SetActionId(ID_BUTTON); + pButton->AddActionEventListener(*this); + + // Adds the button to the form + AddControl(pButton); + + // Creates an instance of DateTimePicker + __pDateTimePicker = new DateTimePicker(); + __pDateTimePicker->Construct(); + + // Adds an instance of IDateTimeChangeEventListener + __pDateTimePicker->AddDateTimeChangeEventListener(*this); + + // Shows the date time picker after it's owner form is shown. + + return r; +} + +void +DateTimePickerSample::ShowDateTimePicker(bool show) +{ + // Changes to desired show state + __pDateTimePicker->SetShowState(show); + + // Calls Show() of the control + if (show) + { + __pDateTimePicker->Show(); + } + // Calls Show() of the container + else + { + Invalidate(true); + } +} + +result +DateTimePickerSample::OnTerminating(void) +{ + result r = E_SUCCESS; + + // Deallocates the date time picker + __pDateTimePicker->Destroy(); + + return r; +} + +// IActionEventListener implementation +void +DateTimePickerSample::OnActionPerformed(const Control& source, int actionId) +{ + switch (actionId) + { + case ID_BUTTON: + { + ShowDateTimePicker(true); + } + break; + default: + break; + } +} + +// IDateTimeChangeEventListener implementation +void +DateTimePickerSample::OnDateTimeChanged(const Control& source, int year, int month, int day, int hour, int minute) +{ + // .... +} + +void +DateTimePickerSample::OnDateTimeChangeCanceled(const Control& source) +{ + // .... +} +* @endcode +**/ + +class _OSP_EXPORT_ DateTimePicker + : public Tizen::Ui::Window +{ +public: + /** + * The object is not fully constructed after this constructor is called. @n + * For full construction, the DateTimePicker::Construct() method must be called right after calling this constructor. + * + * @since 2.0 + */ + DateTimePicker(void); + + /** + * 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 ~DateTimePicker(void); + + /** + * 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 + * + * @param[in] listener The listener to add + * @see IDateTimeChangeEventListener::OnDateTimeChanged() + * @see IDateTimeChangeEventListener::OnDateTimeChangeCanceled() + * @see RemoveDateTimeChangeEventListener() + */ + void AddDateTimeChangeEventListener(Tizen::Ui::IDateTimeChangeEventListener& listener); + + /** + * Removes an IDateTimeChangeEventListener instance. @n + * The removed listener is not called when the date and time change events are fired. + * + * @since 2.0 + * + * @param[in] listener The listener to remove + * @see IDateTimeChangeEventListener::OnDateTimeChanged() + * @see IDateTimeChangeEventListener::OnDateTimeChangeCanceled() + * @see AddDateTimeChangeEventListener() + */ + void RemoveDateTimeChangeEventListener(Tizen::Ui::IDateTimeChangeEventListener& listener); + + /** + * Initializes this instance of %DateTimePicker to the current date and time in the wall time mode. + * + * @since 2.0 + * + * @return An error code + * @param[in] title The title + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @remarks The optimal size of the control is defined in + * Optimal Size of UI Controls. + */ + result Construct(const Tizen::Base::String& title = L""); + + /** + * Sets the date and time value of the %DateTimePicker control. + * + * @since 2.0 + * + * @param[in] dateTime The date and time to set + */ + void SetDateTime(const Tizen::Base::DateTime& dateTime); + + /** + * Sets the date and time value of the %DateTimePicker control with the current date and time in the wall time mode. + * + * @since 2.0 + */ + void SetCurrentDateTime(void); + + /** + * Sets the year value of the %DateTimePicker control. + * + * @since 2.0 + * + * @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. + * @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. + * @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by SetYearRange(). + * @see SetYearRange() + */ + result SetYear(int year); + + /** + * Sets the month value. + * + * @since 2.0 + * + * @return An error code + * @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. + */ + result SetMonth(int month); + + /** + * Sets the day value. + * + * @since 2.0 + * + * @return An error code + * @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. + */ + result SetDay(int day); + + /** + * Sets the hour value of the %DateTimePicker control. + * + * @since 2.0 + * + * @return An error code + * @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. + */ + result SetHour(int hour); + + /** + * Sets the minute value of the %DateTimePicker control. + * + * @since 2.0 + * + * @return An error code + * @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. + */ + result SetMinute(int minute); + + /** + * Gets the current date and time value of the %DateTimePicker control. + * + * @since 2.0 + * + * @return The current date and time + */ + Tizen::Base::DateTime GetDateTime(void) const; + + /** + * Gets the current year value of %DateTimePicker. + * + * @since 2.0 + * + * @return The current year value between @c 1 to @c 9999, @n + * else @c -1 if an error occurs + */ + int GetYear(void) const; + + /** + * Gets the current month value of %DateTimePicker. + * + * @since 2.0 + * + * @return The current month value between @c 1 to @c 12, @n + * else @c -1 if an error occurs + */ + int GetMonth(void) const; + + /** + * Gets the current day value of %DateTimePicker. + * + * @since 2.0 + * + * @return The current day value between @c 1 to @c 31, @n + * else @c -1 if an error occurs + */ + int GetDay(void) const; + + /** + * Gets the current hour value of the %DateTimePicker control. + * + * @since 2.0 + * + * @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 + */ + int GetHour(void) const; + + /** + * Gets the current minute value of the %DateTimePicker control. + * + * @since 2.0 + * + * @return The current minute value, @n + * else @c -1 if an error occurs + */ + int GetMinute(void) const; + + /** + * Sets the 12-hour or 24-hour display mode of the %DateTimePicker control. + * + * @since 2.0 + */ + void Set24HourNotationEnabled(bool enable); + + /** + * Checks whether the 24-hour notation is enabled for the %DateTimePicker control. @n + * This can be 12-hour or 24-hour mode. + * + * @since 2.0 + * + * @return @c true if the 24-hour notation is enabled, @n + * else @c false if the 12-hour notation is enabled + */ + bool Is24HourNotationEnabled(void) const; + + /** + * 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 + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified year range is invalid. + * @exception E_SYSTEM A system error has occurred. + */ + result SetYearRange(int minYear, int maxYear); + + /** + * Gets the valid year range. + * + * @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. + */ + result GetYearRange(int& minYear, int& maxYear) const; + +protected: + friend class _DateTimePickerImpl; + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + DateTimePicker(const DateTimePicker& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + DateTimePicker& operator =(const DateTimePicker& rhs); + +}; // DateTimePicker + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_DATE_TIME_PICKER_H_ diff --git a/inc/FUiCtrlEditArea.h b/inc/FUiCtrlEditArea.h new file mode 100644 index 0000000..015433c --- /dev/null +++ b/inc/FUiCtrlEditArea.h @@ -0,0 +1,1465 @@ +// +// 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 FUiCtrlEditArea.h + * @brief This is the header file for the %EditArea class. + * + * This header file contains the declarations of the %EditArea class and its helper classes. + */ + +#ifndef _FUI_CTRL_EDIT_AREA_H_ +#define _FUI_CTRL_EDIT_AREA_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace Tizen { namespace Locales +{ +class Locale; +}} // Tizen::Locales + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @class EditArea + * @brief This class defines the common behavior for the %EditArea control. + * + * @since 2.0 + * + * The %EditArea class displays a multi-line text editor. + * + * For more information on the class features, + * see EditArea and EditField. + * + * The following example demonstrates how to use the %EditArea class. + * + * @code +// Sample code for EditAreaSample.h +#include + +class EditAreaSample + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::ITextEventListener +{ +public: + EditAreaSample(void) + : __pEditArea(null){} + + bool Initialize(void); + virtual result OnInitializing(void); + + // ITextEventListener + virtual void OnTextValueChanged(const Tizen::Ui::Control& source); + virtual void OnTextValueChangeCanceled(const Tizen::Ui::Control& source); + +private: + Tizen::Ui::Controls::EditArea* __pEditArea; +}; + * @endcode + * + * @code +// Sample code for EditAreaSample.cpp +#include + +#include "EditAreaSample.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Ui::Controls; + +bool +EditAreaSample::Initialize(void) +{ + Construct(FORM_STYLE_NORMAL); + return true; +} + +result +EditAreaSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + // Creates an instance of EditArea + __pEditArea = new EditArea(); + __pEditArea->Construct(Rectangle(50, 100, 400, 150)); + __pEditArea->AddTextEventListener(*this); + + // Adds the edit area to the form + AddControl(__pEditArea); + + return r; +} + +// ITextEventListener implementation +void +EditAreaSample::OnTextValueChanged(const Tizen::Ui::Control& source) +{ + // .... +} + +void +EditAreaSample::OnTextValueChangeCanceled(const Tizen::Ui::Control& source) +{ + // .... +} + * @endcode + * + */ +class _OSP_EXPORT_ EditArea + : public Tizen::Ui::Control +{ +// Lifecycle +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. + * + * @since 2.0 + */ + EditArea(void); + + /** + * 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 ~EditArea(void); + + /** + * Initializes this instance of the %EditArea control with the specified parameters. + * + * @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 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. + * @param[in] inputStyle Determines whether the fullscreen keypad or overlay keypad is displayed + * @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 + * 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'. + * For more information, see Control::IsDisplayable(). + * - The orientation of the full-screen style keypad is determined by the current device orientation. + */ + result Construct(const Tizen::Graphics::Rectangle& rect, InputStyle inputStyle = INPUT_STYLE_FULLSCREEN, int limitLength = 1000); + + /** + * Initializes this instance of the %EditArea control with the specified parameters. + * + * @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 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. + * @param[in] inputStyle Determines whether the fullscreen keypad or overlay keypad is displayed + * @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 + * 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'. + * For more information, see Control::IsDisplayable(). + * - The orientation of the full-screen style keypad is determined by the current device orientation. + */ + result Construct(const Tizen::Graphics::FloatRectangle& rect, InputStyle inputStyle = INPUT_STYLE_FULLSCREEN, int limitLength = 1000); + +public: + /** + * Gets the horizontal text alignment. + * + * @since 2.0 + * + * @return The horizontal text alignment + * @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 SetTextAlignment() + */ + HorizontalAlignment GetTextAlignment(void) const; + + /** + * Sets the horizontal text alignment. + * + * @since 2.0 + * + * @return An error code + * @param[in] alignment The horizontal text alignment + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see GetTextAlignment() + */ + result SetTextAlignment(HorizontalAlignment alignment); + + /** + * Checks whether the view mode is enabled. + * + * @since 2.0 + * + * @return @c true if the view mode is enabled, @n + * else @c false + * @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 SetViewModeEnabled() + */ + bool IsViewModeEnabled(void) const; + + /** + * Enables or disables the view mode. + * + * @since 2.0 + * + * @return An error code + * @param[in] enable Set to @c true to enable the view mode, @n + * else @c false @n + * When it is set to @c true, the auto-detected links will be displayed as linked text. + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see IsViewModeEnabled() + */ + result SetViewModeEnabled(bool enable); + + /** + * Sets the auto-link mask. + * + * @since 2.0 + * + * @return An error code + * @param[in] autoLinks The auto-link mask @n + * Multiple link types can be combined using bitwise OR. @n 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 + * The operation is not supported if the input style is not ::INPUT_STYLE_OVERLAY. + * @exception E_SYSTEM A system error has occurred. + * @see Tizen::Base::Utility::LinkType + * @see GetAutoLinkMask() + * @see IsViewModeEnabled() + * @see SetViewModeEnabled() + */ + result SetAutoLinkMask(unsigned long autoLinks); + + /** + * Gets the auto-link mask. + * + * @since 2.0 + * + * @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 + * This operation is not supported if 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. + * @see SetAutoLinkMask() + */ + unsigned long GetAutoLinkMask(void) const; + + /** + * Adds the specified link event listener. @n + * The added listener will be notified when the links are selected by the user. @n + * The %AddUiLinkEventListener() method is supported when the input style is ::INPUT_STYLE_OVERLAY + * + * @since 2.0 + * + * @param[in] listener The event listener to add + * @see RemoveUiLinkEventListener() + */ + void AddUiLinkEventListener(Tizen::Ui::IUiLinkEventListener& listener); + + /** + * Removes the specified link event listener. @n + * The removed listener cannot listen to the events when they are fired. @n + * The %RemoveUiLinkEventListener() method is supported when the input style is ::INPUT_STYLE_OVERLAY. + * + * @since 2.0 + * + * @param[in] listener The event listener to remove + * @see AddUiLinkEventListener() + */ + void RemoveUiLinkEventListener(Tizen::Ui::IUiLinkEventListener& listener); + + /** + * Gets the line spacing. + * + * @since 2.0 + * + * @return The line spacing, @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. + * @see SetLineSpacing() + */ + int GetLineSpacing(void) const; + + /** + * Gets the line spacing. + * + * @since 2.1 + * + * @return The line spacing, @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. + * @see SetLineSpacing() + */ + float GetLineSpacingF(void) const; + + /** + * Sets the line spacing. @n + * The line spacing is determined by multiplying @c multiplier to the default line spacing and adding @c extra. + * + * @code + * The line spacing = (default line spacing) * multiplier + extra + * @endcode + * @since 2.0 + * + * @return An error code + * @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 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() + */ + result SetLineSpacing(int multiplier, int extra); + + /** + * Sets the line spacing. @n + * The line spacing is determined by multiplying @c multiplier to the default line spacing and adding @c extra. + * + * @code + * The line spacing = (default line spacing) * multiplier + extra + * @endcode + * @since 2.1 + * + * @return An error code + * @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 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() + */ + result SetLineSpacing(int multiplier, float extra); + + /** + * Gets the margin value of the specified margin type. + * + * @since 2.0 + * + * @return The margin value, @n + * else @c -1 if an error occurs + * @param[in] marginType The margin type + * @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 SetMargin() + */ + int GetMargin(EditMarginType marginType) const; + + /** + * Gets the margin value of the specified margin type. + * + * @since 2.1 + * + * @return The margin value, @n + * else @c -1 if an error occurs + * @param[in] marginType The margin type + * @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 SetMargin() + */ + float GetMarginF(EditMarginType marginType) const; + + /** + * Sets the margin value for the specified margin type. + * + * @since 2.0 + * + * @return An error code + * @param[in] marginType The margin type + * @param[in] margin The margin value to set + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. @n + * The specified @c margin cannot be a negative integer. + * @exception E_SYSTEM A system error has occurred. + * @see GetMargin() + */ + result SetMargin(EditMarginType marginType, int margin); + + /** + * Sets the margin value for the specified margin type. + * + * @since 2.1 + * + * @return An error code + * @param[in] marginType The margin type + * @param[in] margin The margin value to set + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. @n + * The specified @c margin cannot be a negative integer. + * @exception E_SYSTEM A system error has occurred. + * @see GetMarginF() + */ + result SetMargin(EditMarginType marginType, float margin); + + /** + * Enables or disables the keypad action. + * + * @since 2.0 + * @return An error code + * @param[in] enable Set to @c true to enable the keypad action, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @exception E_UNSUPPORTED_OPERATION The underlying input method does not support this operation. + * @remarks Depending on the value of input param, the enter key have a enable or disable look accordingly. + */ + result SetKeypadActionEnabled(bool enable); + + /** + * Checks whether the keypad action is enabled. + * + * @since 2.0 + * @return @c true if the keypad action is enabled, @n + * else @c false + */ + bool IsKeypadActionEnabled(void) const; + + /** + * Gets the keypad action type. + * + * @since 2.0 + * + * @return The keypad action + * @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 + * This operation is not supported if 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. + */ + Tizen::Ui::KeypadAction GetKeypadAction(void) const; + + /** + * Sets the keypad action type. + * + * @since 2.0 + * + * @return An error code + * @param[in] keypadAction The keypad action + * @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 + * This operation is not supported if the input style is not ::INPUT_STYLE_OVERLAY. + * @exception E_SYSTEM A system error has occurred. + * @remarks Depending on the value of input param, the enter key label of the keypad will change accordingly. + */ + result SetKeypadAction(Tizen::Ui::KeypadAction keypadAction); + + /** + * Gets the keypad style. + * + * @since 2.0 + * + * @return The keypad style + * @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 SetKeypadStyle() + */ + KeypadStyle GetKeypadStyle(void) const; + + /** + * Sets the keypad style. + * + * @since 2.0 + * + * @return An error code + * @param[in] keypadStyle The keypad style + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. @n + * The specified @c keypadStyle cannot be @c KEYPAD_STYLE_PASSWORD. + * @exception E_SYSTEM A system error has occurred. + * @remarks Depending on the value of input param, the keypad's layout will change accordingly. + * @see GetKeypadStyle() + */ + result SetKeypadStyle(KeypadStyle keypadStyle); + + /** + * 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() + */ + bool IsTextPredictionEnabled(void) const; + + /** + * 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() + */ + result SetTextPredictionEnabled(bool enable); + + /** + * Sets the visibility of the command buttons of the overlay style keypad. + * + * @since 2.0 + * + * @return An error code + * @param[in] visible Set to @c true to make the overlay keypad command buttons visible, @n + * else @c false + * @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 + * This operation is not supported if the input style is not ::INPUT_STYLE_OVERLAY. + * @exception E_SYSTEM A system error has occurred. + */ + result SetOverlayKeypadCommandButtonVisible(bool visible); + + /** + * Checks whether the command buttons of the overlay style keypad are visible. + * + * @since 2.0 + * + * @return @c true if the overlay command buttons are set to be visible, @n + * else @c false + * @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 + * This operation is not supported if 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. + */ + bool IsOverlayCommandButtonVisible(void) const; + + /** + * Hides the keypad. + * + * @since 2.0 + * + * @return An error code + * @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 + * This operation is not supported if the input style is not ::INPUT_STYLE_OVERLAY. + * @exception E_SYSTEM A system error has occurred. + * @see ShowKeypad() + */ + result HideKeypad(void); + + /** + * Gets the text size. + * + * @since 2.0 + * + * @return The size of the text, @n + * else @c -1 if an error occurs + * @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 SetTextSize() + */ + int GetTextSize(void) const; + + /** + * Gets the text size. + * + * @since 2.1 + * + * @return The size of the text, @n + * else @c -1 if an error occurs + * @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 SetTextSize() + */ + float GetTextSizeF(void) const; + + /** + * Sets the text size. + * + * @since 2.0 + * + * @return An error code + * @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. + * @see GetTextSize() + */ + result SetTextSize(int size); + + /** + * Sets the text size. + * + * @since 2.1 + * + * @return An error code + * @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. + * @see GetTextSizeF() + */ + result SetTextSize(float size); + + /** + * Gets the color of %EditArea for the specified status. + * + * @since 2.0 + * + * @return The color, @n + * else RGBA (0,0,0,0) if an error occurs + * @param[in] status The status + * @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. + */ + Tizen::Graphics::Color GetColor(EditStatus status) const; + + /** + * Gets the text color of the specified text color type. + * + * @since 2.0 + * + * @return The color, @n + * else RGBA (0,0,0,0) if an error occurs + * @param[in] type The text color type + * @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 SetTextColor() + */ + Tizen::Graphics::Color GetTextColor(EditTextColor type) const; + + /** + * Sets the background bitmap of the %EditArea control for the specified status. + * + * @since 2.0 + * + * @return An error code + * @param[in] status The status + * @param[in] bitmap The background bitmap + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetBackgroundBitmap(EditStatus status, const Tizen::Graphics::Bitmap& bitmap); + + /** + * Sets the color of the %EditArea control for the specified status. + * + * @since 2.0 + * + * @return An error code + * @param[in] status The status + * @param[in] color The color + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see GetColor() + */ + result SetColor(EditStatus status, const Tizen::Graphics::Color& color); + + /** + * Sets the text color of the %EditArea control for the specified text color type. + * + * @since 2.0 + * + * @return An error code + * @param[in] type The text color type + * @param[in] color The text color + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see GetTextColor() + */ + result SetTextColor(EditTextColor type, const Tizen::Graphics::Color& color); + + /** + * Gets a portion of text that is displayed by the %EditArea control. + * + * @since 2.0 + * + * @return The specified portion of the text, @n + * else an empty string if an error occurs + * @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. @n + * 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() + */ + Tizen::Base::String GetText(int start, int end) const; + + /** + * Adds the specified keypad event listener. @n + * The added listener is notified when the keypad associated with the %EditArea control is opened or closed. + * + * @since 2.0 + * + * @param[in] listener The event listener to add + * @see RemoveKeypadEventListener() + */ + void AddKeypadEventListener(Tizen::Ui::IKeypadEventListener& listener); + + /** + * Removes the specified keypad event listener. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to remove + * @see AddKeypadEventListener() + */ + void RemoveKeypadEventListener(Tizen::Ui::IKeypadEventListener& listener); + + /** + * Adds a text block event listener. + * The added listener is notified when the text block is selected. + * + * @since 2.0 + * + * @param[in] listener The event listener to add + * @remarks Programmatically modifying the text block does not cause the text block selection event to fire. + * @see RemoveTextBlockEventListener() + */ + void AddTextBlockEventListener(Tizen::Ui::ITextBlockEventListener& listener); + + /** + * Removes the specified text block event listener. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to remove + * @see AddTextBlockEventListener() + */ + void RemoveTextBlockEventListener(Tizen::Ui::ITextBlockEventListener& listener); + + /** + * Adds a listener instance. @n + * The added listener can listen to the text related events. + * + * @since 2.0 + * + * @param[in] listener The listener to add + * @see RemoveTextEventListener() + */ + void AddTextEventListener(Tizen::Ui::ITextEventListener& listener); + + /** + * Removes a listener instance. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The listener to remove + * @see AddTextEventListener() + */ + void RemoveTextEventListener(Tizen::Ui::ITextEventListener& listener); + + /** + * Adds a listener instance to listen to the scroll panel events. @n + * To listen to scroll panel events, the parent of the %EditArea control must be an instance of ScrollPanel. + * + * @since 2.0 + * + * @param[in] listener The listener to add + * @remarks When OnOverlayControlCreated() or OnOvelayControlClosed() is called, the application resets the bounds of the controls placed + * within the ScrollPanel. %ScrollPanel is automatically redrawn after this method is called. + * @see RemoveScrollPanelEventListener() + */ + void AddScrollPanelEventListener(Tizen::Ui::IScrollPanelEventListener& listener); + + /** + * Removes the scroll panel event listener. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The listener to remove + * @see AddScrollPanelEventListener() + */ + void RemoveScrollPanelEventListener(Tizen::Ui::IScrollPanelEventListener& listener); + + /** + * Adds a listener instance. @n + * The added listener is notified when the action event is fire by the command buttons of the keypad. + * + * @since 2.0 + * + * @param[in] listener The event listener to add + * @see RemoveActionEventListener() + */ + void AddActionEventListener(Tizen::Ui::IActionEventListener& listener); + + + /** + * Removes a listener instance. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to remove + * @see AddActionEventListener() + */ + void RemoveActionEventListener(Tizen::Ui::IActionEventListener& listener); + + /** + * Adds a listener instance for language events. @n + * The added listener is notified when the input language is changed. + * + * @since 2.0 + * + * @param[in] listener The listener to add + * @remarks The application can recognize when the language is changed from the keypad by adding Tizen::Ui::ILanguageEventListener. + * @see RemoveLanguageEventListener() + */ + void AddLanguageEventListener(Tizen::Ui::ILanguageEventListener& listener); + + /** + * Removes the specified listener instance. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The listener to remove + * @see AddLanguageEventListener() + */ + void RemoveLanguageEventListener(Tizen::Ui::ILanguageEventListener& listener); + + /** + * Gets the remaining length of the %EditArea control. + * + * @since 2.0 + * + * @return The remaining length of the %EditArea control, @n + * else @c -1 if an error occurs. + */ + int GetRemainingLength(void) const; + + /** + * Enables or disables the lowercase mode. + * + * @since 2.0 + * + * @param[in] enable Set to @c true to enable the lowercase mode, @n + * else @c false + */ + void SetLowerCaseModeEnabled(bool enable); + + /** + * Checks whether the lowercase mode is enabled. + * + * @since 2.0 + * + * @return @c true if the lowercase mode is enabled, @n + * else @c false + */ + bool IsLowerCaseModeEnabled(void) const; + + /** + * @if OSPDEPREC + * Sets the input mode category. + * + * @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 SetKeypadStyle() method instead. + * @since 2.0 + * + * @return An error code + * @param[in] categories The categories to set @n + * Multiple input categories can be combined using bitwise OR. + * @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 + * The specified @c categories cannot be supported with the current keypad style. + * @exception E_SYSTEM A system error has occurred. + * @see EditInputModeCategory + * @endif + */ + result SetInputModeCategory(unsigned long categories, bool enable); + + /** + * @if OSPDEPREC + * Sets the current input mode category. + * + * @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 SetKeypadStyle() method instead. + * @since 2.0 + * + * @return An error code + * @param[in] inputModeCategory An item of input category + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result SetCurrentInputModeCategory(EditInputModeCategory inputModeCategory); + + /** + * @if OSPDEPREC + * Gets the input mode category. + * + * @brief [Deprecated] + * @deprecated This method is deprecated because we no longer provide a method to specify the list of styles @n + * which the user can set the keypad to. It is recommended to use GetKeypadStyle() method instead. + * @since 2.0 + * + * @return A bitwise combination of Tizen::Ui::Controls::EditInputModeCategory, @n + * else @c EDIT_INPUTMODE_ALPHA if an error occurs + * @endif + */ + unsigned long GetInputModeCategory(void) const; + + /** + * @if OSPDEPREC + * Gets the current input mode category. + * + * @brief [Deprecated] + * @deprecated This method is deprecated because we no longer provide a method to specify the list of styles @n + * which the user can set the keypad to. It is recommended to use GetKeypadStyle() method instead. + * @since 2.0 + * + * @return The current input mode category + * @endif + */ + EditInputModeCategory GetCurrentInputModeCategory(void) const; + + /** + * Sets the cursor at the specified position. + * + * @since 2.0 + * + * @return An error code + * @param[in] position The cursor position to set + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE The specified @c position is less than @c 0 or greater than the maximum length. + * @exception E_SYSTEM A system error has occurred. + */ + result SetCursorPosition(int position); + + /** + * Gets the cursor position. + * + * @since 2.0 + * + * @return The current cursor position, @n + * else @c -1 if an error occurs + */ + int GetCursorPosition(void) const; + + /** + * Gets the text that is displayed by the %EditArea control. + * + * @since 2.0 + * + * @return The text of the %EditArea control, @n + * else an empty string if an error occurs + */ + Tizen::Base::String GetText(void) const; + + /** + * Gets the length of the text that is displayed by the %EditArea control. + * + * @since 2.0 + * + * @return The length of the text, @n + * else @c -1 if an error occurs + */ + int GetTextLength(void) const; + + /** + * Sets the text of the %EditArea control. + * + * @since 2.0 + * + * @param[in] text The text to display by the %EditArea control @n + * Use @htmlonly '\n' @endhtmlonly to denote the end of the line. + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. @n + * The length of the specified @c text exceeds the system limitation or the limit length. + * @exception E_SYSTEM A system error has occurred. + */ + result SetText(const Tizen::Base::String& text); + + /** + * Inserts the specified text at the current cursor position. + * + * @since 2.0 + * + * @return An error code + * @param[in] text The text to insert @n + * Use @htmlonly '\n' @endhtmlonly to denote the end of the line. + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result InsertTextAtCursorPosition(const Tizen::Base::String& text); + + /** + * Appends the specified text at the end of the existing text. + * + * @since 2.0 + * + * @return An error code + * @param[in] text The text to append @n + * Use @htmlonly '\n' @endhtmlonly to denote the end of the line. + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result AppendText(const Tizen::Base::String& text); + + /** + * Appends the specified character at the end of the existing text. + * + * @since 2.0 + * + * @return An error code + * @param[in] character The character to append + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @remarks The method modifies the text buffer that is managed by the %EditArea control. To display the + * changes, the control must be drawn again. + */ + result AppendCharacter(const Tizen::Base::Character& character); + + /** + * Inserts the text that will be displayed by bitmap at the specified text position. + * + * @since 2.0 + * + * @return An error code + * @param[in] position The position to insert the text + * @param[in] text The text to insert + * @param[in] textImage The alternate bitmap to draw + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE The specified @c position is outside the valid range. @n + * Either the specified @c position is greater than the number of existing text in the %EditArea 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 %EditArea. + * @remarks The method modifies the text buffer that is managed by the %EditArea 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); + + /** + * Appends the text that will be displayed by bitmap at the end of the existing text. + * + * @since 2.0 + * + * @return An error code + * @param[in] text The text to append + * @param[in] textImage The alternate bitmap to draw + * @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 %EditArea. + * @remarks The method modifies the text buffer that is managed by the %EditArea control. To display the changes, the control must be drawn again. + */ + result AppendText(const Tizen::Base::String& text, const Tizen::Graphics::Bitmap& textImage); + + /** + * Clears the text that is displayed by the %EditArea control. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @remarks The method modifies the text buffer that is managed by the %EditArea control. To display the + * changes, the control must be drawn again. + */ + result Clear(void); + + /** + * Deletes a character at the current cursor position. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @remarks The method modifies the text buffer that is managed by the %EditArea control. To display the + * changes, the control must be drawn again. + */ + result DeleteCharacterAtCursorPosition(void); + + /** + * Gets the range of the current text block. + * + * @since 2.0 + * + * @param[out] start The first index of the current text block + * @param[out] end The last index of the current text block + */ + void GetCurrentTextRange(int& start, int& end) const; + + /** + * Displays the guide text when there is no text in the %EditArea control. + * + * @since 2.0 + * + * @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); + + /** + * Gets the guide text. + * + * @since 2.0 + * + * @return The guide text, @n + * else an empty string if an error occurs + * @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 SetGuideText() + */ + Tizen::Base::String GetGuideText(void) const; + + /** + * Gets the text color of the guide text. + * + * @since 2.0 + * + * @return The guide text color + * @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 SetGuideTextColor() + */ + Tizen::Graphics::Color GetGuideTextColor(void) const; + + /** + * Sets the text color of the guide text. + * + * @since 2.0 + * + * @return An error code + * @param[in] color The guide text color + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see GetGuideTextColor() + */ + result SetGuideTextColor(const Tizen::Graphics::Color& color); + + /** + * Enables or disables the keypad. + * + * @since 2.0 + * + * @param[in] enable Set to @c true to enable the keypad, @n + * else @c false + */ + void SetKeypadEnabled(bool enable); + + /** + * Checks whether the keypad is enabled. + * + * @since 2.0 + * + * @return @c true if the keypad is enabled, @n + * else @c false + */ + bool IsKeypadEnabled(void) const; + + /** + * Shows the keypad. @n + * The %ShowKeypad() method is supported only when the input style is ::INPUT_STYLE_OVERLAY. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @exception E_SYSTEM A system error has occurred. + */ + result ShowKeypad(void); + + /** + * Gets the line count. + * + * @since 2.0 + * + * @return The line count + */ + int GetTextLineCount(void) const; + + /** + * Gets the range of the current text block. + * + * @since 2.0 + * + * @param[out] start The starting index of the current text block + * @param[out] end The end index of the current text block + */ + void GetBlockRange(int& start, int& end) const; + + /** + * Begins the text block from the current cursor position. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @remarks Move the cursor position to the end of the text block. + * @see SetCursorPosition() + * @see ReleaseBlock() + * @see IsBlocked() + */ + result BeginBlock(void); + + /** + * Releases the text block. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see BeginBlock() + * @see IsBlocked() + */ + result ReleaseBlock(void); + + /** + * Checks whether a portion of the text is blocked. + * + * @since 2.0 + * + * @return @c true if the text is blocked, @n + * else @c false + * @see BeginBlock() + * @see ReleaseBlock() + */ + bool IsBlocked(void) const; + + /** + * Copies the text block to the clipboard. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see Cut() + * @see Paste() + * @see Remove() + */ + result Copy(void); + + /** + * Cuts the text block and copies it to the clipboard. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see Copy() + * @see Remove() + * @see Paste() + */ + result Cut(void); + + /** + * Pastes the copied text at the cursor position. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see Copy() + * @see Cut() + * @see Remove() + */ + result Paste(void); + + /** + * Removes the text that is marked by the text block. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see Copy() + * @see Cut() + * @see Paste() + */ + result Remove(void); + + /** + * Checks whether the text in the %EditArea control has been clipped. + * + * @since 2.0 + * + * @return @c true if the text has been clipped, @n + * else @c false + * @remarks 'Clipped' means that the text has been copied to the clipboard. + * @see Copy() + * @see Cut() + * @see Paste() + * @see Remove() + */ + bool IsClipped(void) const; + + /** + * Sets the command button properties of the keypad. @n + * The %SetOverlayKeypadCommandButton() method is supported when the input style is ::INPUT_STYLE_OVERLAY. + * + * @since 2.0 + * + * @return An error code + * @param[in] position The position of the command button + * @param[in] text The label of the command button + * @param[in] actionId The action ID + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetOverlayKeypadCommandButton(CommandButtonPosition position, const Tizen::Base::String& text, int actionId); + + /** + * Gets the text of the specified command button. @n + * The %GetOverlayKeypadCommandButtonText() method is supported when the input style is ::INPUT_STYLE_OVERLAY. + * + * @since 2.0 + * + * @return The text of the specified command button + * @param[in] position The position of the command button + */ + Tizen::Base::String GetOverlayKeypadCommandButtonText(CommandButtonPosition position) const; + + /** + * Gets the action ID of the specified command button. @n + * The %GetOverlayKeypadCommandButtonActionId() method is supported when the input style is ::INPUT_STYLE_OVERLAY. + * + * @since 2.0 + * + * @return The action ID of the specified command button + * @param[in] position The position of the command button + */ + int GetOverlayKeypadCommandButtonActionId(CommandButtonPosition position) const; + + /** + * Sets the input language. + * + * @brief [Deprecated] + * @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. + * @since 2.0 + * + * @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. + * @remarks + * - The application can set the language of the current keypad that is associated with the current %EditArea. + * - This method only works if the language to set is supported by the current preloaded keypad. + */ + result SetCurrentLanguage(Tizen::Locales::LanguageCode languageCode); + + /** + * 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. + */ + result GetCurrentLanguage(Tizen::Locales::LanguageCode& language) const; + + /** + * 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 + */ + void SetEditTextFilter(IEditTextFilter* pFilter); + + /** + * Sends opaque command to the input method. + * + * @since 2.1 + * + * @param[in] command The opaque command to send + * @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); + +protected: + friend class _EditAreaImpl; + +private: + EditArea(const EditArea&); + EditArea& operator =(const EditArea&); +}; // EditArea + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_EDIT_AREA_H_ diff --git a/inc/FUiCtrlEditDate.h b/inc/FUiCtrlEditDate.h new file mode 100644 index 0000000..76f9f07 --- /dev/null +++ b/inc/FUiCtrlEditDate.h @@ -0,0 +1,360 @@ +// +// 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 FUiCtrlEditDate.h +* @brief This is the header file for the %EditDate class. +* +* This header file contains the declarations of the %EditDate class. +*/ +#ifndef _FUI_CTRL_EDITDATE_H_ +#define _FUI_CTRL_EDITDATE_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** +* @class EditDate +* @brief This class defines the common behavior of an %EditDate control. +* +* @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. +* +* For more information on the class features, +* see EditDate and EditTime. +* +* The following example demonstrates how to use the %EditDate class. +* +* @code +// Sample code for EditDateSample.h +#include + +class EditDateSample + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::IDateChangeEventListener +{ +public: + EditDateSample(void) + : __pEditDate(null){} + + bool Initialize(void); + virtual result OnInitializing(void); + + // IDateChangeEventListener + virtual void OnDateChanged(const Tizen::Ui::Control& source, int year, int month, int day); + virtual void OnDateChangeCanceled(const Tizen::Ui::Control& source); + +private: + Tizen::Ui::Controls::EditDate* __pEditDate; +}; + + * @endcode + * + * @code +// Sample code for EditDateSample.cpp +#include + +#include "EditDateSample.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Ui::Controls; + +bool +EditDateSample::Initialize(void) +{ + Construct(FORM_STYLE_NORMAL); + return true; +} + +result +EditDateSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + // Creates an instance of EditDate + __pEditDate = new EditDate(); + __pEditDate->Construct(Point(100, 100)); + __pEditDate->AddDateChangeEventListener(*this); + + // Adds an instance of IDateChangeEventListener + AddControl(__pEditDate); + + return r; +} + +// IDateChangeEventListener implementation +void +EditDateSample::OnDateChanged(const Tizen::Ui::Control& source, int year, int month, int day) +{ + // .... +} + +void +EditDateSample::OnDateChangeCanceled(const Tizen::Ui::Control& source) +{ + // .... +} +* @endcode +**/ +class _OSP_EXPORT_ EditDate + : public Tizen::Ui::Control +{ +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. + * + * @since 2.0 + */ + EditDate(void); + + /** + * 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 ~EditDate(void); + + /** + * Adds a data change event listener instance. @n + * 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 + * @see IDateChangeEventListener::OnDateChanged() + * @see IDateChangeEventListener::OnDateChangeCanceled() + * @see RemoveDateChangeEventListener() + */ + void AddDateChangeEventListener(Tizen::Ui::IDateChangeEventListener& listener); + + /** + * Removes a date changed event listener instance. @n + * Removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The listener to remove + * @see IDateChangeEventListener::OnDateChanged() + * @see IDateChangeEventListener::OnDateChangeCanceled() + * @see AddDateChangeEventListener() + */ + void RemoveDateChangeEventListener(Tizen::Ui::IDateChangeEventListener& listener); + + /** + * Initializes this instance of %EditDate with the specified parameter. + * + * @since 2.0 + * + * @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. + */ + result Construct(const Tizen::Graphics::Point& point, const Tizen::Base::String& title = L""); + + /** + * Initializes this instance of %EditDate with the specified parameter. + * + * @since 2.1 + * + * @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. + */ + result Construct(const Tizen::Graphics::FloatPoint& point, const Tizen::Base::String& title = L""); + + /** + * Gets the current date value of the %EditDate control. + * + * @since 2.0 + * + * @return The date value + */ + Tizen::Base::DateTime GetDate(void) const; + + /** + * Gets the current day value of the %EditDate control. + * + * @since 2.0 + * + * @return The current day value @n + * The default day value is the current system day. + */ + int GetDay(void) const; + + /** + * Gets the current month value of the %EditDate control. + * + * @since 2.0 + * + * @return The current month value as an integer @n + * The default month value is the current system month. + */ + int GetMonth(void) const; + + /** + * Gets the current year value of the %EditDate control. + * + * @since 2.0 + * + * @return The current year value @n + * The default year value is the current system year. + */ + int GetYear(void) const; + + /** + * Sets the designated time value of the %EditDate control. + * + * @since 2.0 + * + * @param[in] date The date to set + */ + void SetDate(const Tizen::Base::DateTime& date); + + /** + * Sets the value of the %EditDate control using the current system date. + * + * @since 2.0 + */ + void SetCurrentDate(void); + + /** + * Sets the year value. + * The year value should be between @c 1 and @c 9999. + * + * @since 2.0 + * + * @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. + * @exception E_SYSTEM A system error has occurred. + */ + result SetYear(int year); + + /** + * Sets the month value of the %EditDate control. + * The month value should be between @c 1 and @c 12. + * + * @since 2.0 + * + * @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. + * @exception E_SYSTEM A system error has occurred. + * + */ + result SetMonth(int month); + + /** + * Sets the day value of the %EditDate control. + * The day value should be between @c 1 and @c 31. + * + * @since 2.0 + * + * @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. + * @exception E_SYSTEM A system error has occurred. + */ + result SetDay(int day); + + /** + * Enables the DatePicker control. + * + * @since 2.0 + * + * @param[in] enable Set to @c true to enable the %DatePicker control, @n + * else @c false + */ + void SetDatePickerEnabled(bool enable); + + /** + * Checks whether the DatePicker control is enabled. + * + * @since 2.0 + * + * @return @c true if the %DatePicker control is enabled, @n + * else @c false + */ + bool IsDatePickerEnabled(void) const; + + /** + * Sets the valid year range. @n + * The range should be set in between @c 1 and @c 9999. + * + * @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. + */ + result SetYearRange(int minYear, int maxYear); + + /** + * Gets the valid year range. + * + * @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. + */ + result GetYearRange(int& minYear, int& maxYear) const; + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + EditDate(const EditDate& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + EditDate& operator =(const EditDate& rhs); + + friend class _EditDateImpl; +}; // EditDate + +}}} //Tizen::Ui::Controls + +#endif // _FUI_CTRL_EDITDATE_H_ diff --git a/inc/FUiCtrlEditField.h b/inc/FUiCtrlEditField.h new file mode 100644 index 0000000..a59cf8e --- /dev/null +++ b/inc/FUiCtrlEditField.h @@ -0,0 +1,1517 @@ +// +// 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 FUiCtrlEditField.h + * @brief This is the header file for the %EditField class. + * + * This header file contains the declarations of the %EditField class and its helper classes. + */ + +#ifndef _FUI_CTRL_EDIT_FIELD_H_ +#define _FUI_CTRL_EDIT_FIELD_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace Tizen { namespace Locales +{ +class Locale; +}} + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @class EditField + * @brief This class defines a common behavior for an %EditField control. + * + * @since 2.0 + * + * The %EditField class displays a single-line text editor. + * + * For more information on the class features, + * see EditArea and EditField. + * + * The following example demonstrates how to use the %EditField class. + * + * @code +// Sample code for EditFieldSample.h +#include + +class EditFieldSample + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::ITextEventListener +{ +public: + EditFieldSample(void) + : __pEditField(null){} + + bool Initialize(void); + virtual result OnInitializing(void); + + // ITextEventListener + virtual void OnTextValueChanged(const Tizen::Ui::Control& source); + virtual void OnTextValueChangeCanceled(const Tizen::Ui::Control& source); + +private: + Tizen::Ui::Controls::EditField* __pEditField; +}; + * @endcode + * + * @code +// Sample code for EditFieldSample.cpp +#include + +#include "EditFieldSample.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Ui::Controls; + +bool +EditFieldSample::Initialize(void) +{ + Construct(FORM_STYLE_NORMAL); + return true; +} + +result +EditFieldSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + // Creates an instance of EditField + __pEditField = new EditField(); + __pEditField->Construct(Rectangle(50, 100, 400, 150)); + __pEditField->AddTextEventListener(*this); + + //Adds the edit field to the Form + AddControl(__pEditField); + + return r; +} + +// ITextEventListener implementation +void +EditFieldSample::OnTextValueChanged(const Tizen::Ui::Control& source) +{ + // .... +} + +void +EditFieldSample::OnTextValueChangeCanceled(const Tizen::Ui::Control& source) +{ + // .... +} + * @endcode + * + */ + +class _OSP_EXPORT_ EditField + : public Tizen::Ui::Control +{ +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. + * + * @since 2.0 + */ + EditField(void); + + /** + * 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 ~EditField(void); + + /** + * Initializes this instance of the %EditField control with the specified parameters. + * + * @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 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 + * else @c false + * @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 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. + * - 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); + + /** + * Initializes this instance of the %EditField control with the specified parameters. + * + * @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 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 + * else @c false + * @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 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. + * - 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); + + /** + * Initializes this instance of the %EditField control. + * + * @since 2.0 + * + * @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 + * 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 + * @param[in] enableClear Set to @c true to enable the clear button, @n + * else @c false + * @param[in] limitLength The limit of the length of 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 A specified input parameter is invalid. @n + * 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. + * - 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); + + /** + * Initializes this instance of the %EditField control. + * + * @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 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 + * @param[in] enableClear Set to @c true to enable the clear button, @n + * else @c false + * @param[in] limitLength The limit of the length of 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 A specified input parameter is invalid. @n + * 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. + * - 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); + +public: + /** + * Gets the horizontal text alignment of the %EditField control. + * + * @since 2.0 + * + * @return The horizontal text alignment + * @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 SetTextAlignment() + */ + HorizontalAlignment GetTextAlignment(void) const; + + /** + * Sets the horizontal text alignment of the %EditField control. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see GetTextAlignment() + */ + result SetTextAlignment(HorizontalAlignment alignment); + + /** + * Checks whether the view mode is enabled. @n + * In the view mode, the auto-detected links are displayed as linked text. + * + * @since 2.0 + * + * @return @c true if the view mode is enabled, @n + * else @c false + * @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 SetViewModeEnabled() + */ + bool IsViewModeEnabled(void) const; + + /** + * Enables or disables the view mode. @n + * In the view mode, the auto-detected links are displayed as linked text. + * + * @since 2.0 + * + * @return An error code + * @param[in] enable Set to @c true to enable the view mode, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see IsViewModeEnabled() + */ + result SetViewModeEnabled(bool enable); + + /** + * Sets the auto-link mask. + * + * @since 2.0 + * + * @return An error code + * @param[in] autoLinks The auto-link mask @n + * Multiple link types can be combined using bitwise OR operator (see Tizen::Base::Utility::LinkType). @n + * 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 + * The input style is not ::INPUT_STYLE_OVERLAY. + * @exception E_SYSTEM A system error has occurred. + * @see Tizen::Base::Utility::LinkType + * @see GetAutoLinkMask() + * @see IsViewModeEnabled() + * @see SetViewModeEnabled() + */ + result SetAutoLinkMask(unsigned long autoLinks); + + /** + * Gets the auto-link mask. + * + * @since 2.0 + * + * @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 + * 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. + * @see SetAutoLinkMask() + */ + unsigned long GetAutoLinkMask(void) const; + + /** + * Adds a link event listener. @n + * The added listener is notified when the links are selected by the user. @n + * The %AddUiLinkEventListener() method is supported when the input style is ::INPUT_STYLE_OVERLAY. + * + * @since 2.0 + * + * @param[in] listener The event listener to add + * @see RemoveUiLinkEventListener() + */ + void AddUiLinkEventListener(Tizen::Ui::IUiLinkEventListener& listener); + + /** + * Removes the specified link event listener. @n + * The removed listener cannot listen to events when they are fired. @n + * The %RemoveUiLinkEventListener() method is supported when the input style is ::INPUT_STYLE_OVERLAY. + * + * @since 2.0 + * + * @param[in] listener The event listener to remove + * @see AddUiLinkEventListener() + */ + void RemoveUiLinkEventListener(Tizen::Ui::IUiLinkEventListener& listener); + + /** + * Gets the margin value of the specified margin type. + * + * @since 2.0 + * + * @return The margin value of the specified margin type, @n + * else @c -1 if an error occurs + * @param[in] marginType The margin type + * @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 SetMargin() + */ + int GetMargin(EditMarginType marginType) const; + + /** + * Gets the margin value of the specified margin type. + * + * @since 2.1 + * + * @return The margin value of the specified margin type, @n + * else @c -1 if an error occurs + * @param[in] marginType The margin type + * @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 SetMargin() + */ + float GetMarginF(EditMarginType marginType) const; + + /** + * Sets the margin for the specified margin type. + * + * @since 2.0 + * + * @return An error code + * @param[in] marginType The margin type + * @param[in] margin The margin to set + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. @n + * The specified @c margin cannot be a negative integer. + * @exception E_SYSTEM A system error has occurred. + * @see GetMargin() + */ + result SetMargin(EditMarginType marginType, int margin); + + /** + * Sets the margin for the specified margin type. + * + * @since 2.1 + * + * @return An error code + * @param[in] marginType The margin type + * @param[in] margin The margin to set + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. @n + * The specified @c margin cannot be a negative integer. + * @exception E_SYSTEM A system error has occurred. + * @see GetMarginF() + */ + result SetMargin(EditMarginType marginType, float margin); + + /** + * Enables or disables the keypad action. + * + * @since 2.0 + * @return An error code + * @param[in] enable Set to @c true to enable the keypad action, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @exception E_UNSUPPORTED_OPERATION The underlying input method does not support this operation. + * @remarks Depending on the value of input param, the enter key have a enable or disable look accordingly. + */ + result SetKeypadActionEnabled(bool enable); + + /** + * Checks whether the keypad action is enabled. + * + * @since 2.0 + * @return @c true if the keypad action is enabled, @n + * else @c false + */ + bool IsKeypadActionEnabled(void) const; + + /** + * Gets the keypad action type. + * + * @since 2.0 + * + * @return The keypad action + * @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 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. + * @see SetKeypadAction() + */ + Tizen::Ui::KeypadAction GetKeypadAction(void) const; + + /** + * Sets the keypad action type. + * + * @since 2.0 + * + * @return An error code + * @param[in] keypadAction The keypad action + * @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 input style is not ::INPUT_STYLE_OVERLAY. + * @exception E_SYSTEM A system error has occurred. + * @remarks Depending on the value of input param, the enter key label of the keypad changes accordingly. + * @see GetKeypadAction() + */ + result SetKeypadAction(Tizen::Ui::KeypadAction keypadAction); + + /** + * Sets the visibility of the command buttons of the overlay style keypad. + * + * @since 2.0 + * + * @return An error code + * @param[in] visible Set to @c true to set the visibility of the overlay keypad command buttons, @n + * else @c false + * @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 input style is not ::INPUT_STYLE_OVERLAY. + * @exception E_SYSTEM A system error has occurred. + */ + result SetOverlayKeypadCommandButtonVisible(bool visible); + + /** + * Checks whether the command buttons of the overlay style keypad are visible. + * + * @since 2.0 + * + * @return @c true if the overlay command buttons are visible, @n + * else @c false + * @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 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. + */ + bool IsOverlayCommandButtonVisible(void) const; + + /** + * Hides the keypad. + * + * @since 2.0 + * + * @return An error code + * @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 input style is not ::INPUT_STYLE_OVERLAY. + * @exception E_SYSTEM A system error has occurred. + * @see ShowKeypad() + */ + result HideKeypad(void); + + /** + * Gets the position of the ellipsis. + * + * @since 2.0 + * + * @return The ellipsis position + * @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 SetEllipsisPosition() + */ + EllipsisPosition GetEllipsisPosition(void) const; + + /** + * Sets the position of the ellipsis. + * + * @since 2.0 + * + * @return An error code + * @param[in] position The ellipsis position + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see GetEllipsisPosition() + */ + result SetEllipsisPosition(EllipsisPosition position); + + /** + * Gets the text size. + * + * @since 2.0 + * + * @return The size of the text, @n + * else @c -1 if an error occurs + * @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 SetTextSize() + */ + int GetTextSize(void) const; + + /** + * Gets the text size. + * + * @since 2.1 + * + * @return The size of the text, @n + * else @c -1 if an error occurs + * @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 SetTextSize() + */ + float GetTextSizeF(void) const; + + /** + * Sets the text size. + * + * @since 2.0 + * + * @return An error code + * @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. + * @see GetTextSize() + */ + result SetTextSize(int size); + + /** + * Sets the text size. + * + * @since 2.1 + * + * @return An error code + * @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. + * @see GetTextSizeF() + */ + result SetTextSize(float size); + + /** + * Gets the color of the %EditField control for the specified status. + * + * @since 2.0 + * + * @return The color, @n + * else RGBA(0,0,0,0) if an error occurs + * @param[in] status The status + * @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. + */ + Tizen::Graphics::Color GetColor(EditStatus status) const; + + /** + * Gets the text color of the specified text color type. + * + * @since 2.0 + * + * @return The color, @n + * else RGBA(0,0,0,0) if an error occurs + * @param[in] type The text color type + * @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 SetTextColor() + */ + Tizen::Graphics::Color GetTextColor(EditTextColor type) const; + + /** + * Sets the background bitmap of the %EditField control for the specified status. + * + * @since 2.0 + * + * @return An error code + * @param[in] status The status + * @param[in] bitmap The background bitmap + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetBackgroundBitmap(EditStatus status, const Tizen::Graphics::Bitmap& bitmap); + + /** + * Sets the color of the %EditField control for the specified status. + * + * @since 2.0 + * + * @return An error code + * @param[in] status The status + * @param[in] color The color + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see GetColor() + */ + result SetColor(EditStatus status, const Tizen::Graphics::Color& color); + + /** + * Sets the text color of the %EditField control for the specified text color type. + * + * @since 2.0 + * + * @return An error code + * @param[in] type The text color type + * @param[in] color The text color + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see GetTextColor() + */ + result SetTextColor(EditTextColor type, const Tizen::Graphics::Color& color); + + /** + * Gets a portion of text that is displayed by the %EditField control. + * + * @since 2.0 + * + * @return The specified portion of the text, @n + * else an empty string if an error occurs + * @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 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() + */ + Tizen::Base::String GetText(int start, int end) const; + + /** + * Adds a keypad event listener. @n + * The added listener is notified when the keypad associated with the %EditField control is opened or closed. + * + * @since 2.0 + * + * @param[in] listener The event listener to add + * @see RemoveKeypadEventListener() + */ + void AddKeypadEventListener(IKeypadEventListener& listener); + + /** + * Removes the specified keypad event listener. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to remove + * @see AddKeypadEventListener() + */ + void RemoveKeypadEventListener(IKeypadEventListener& listener); + + /** + * Adds a text block event listener. @n + * The added listener is notified when the text block is selected. + * + * @since 2.0 + * + * @param[in] listener The event listener to add + * @remarks Programmatically modifying the text block does not cause the text block selection event to fire. + * @see RemoveTextBlockEventListener() + */ + void AddTextBlockEventListener(Tizen::Ui::ITextBlockEventListener& listener); + + /** + * Removes the specified text block event listener. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to remove + * @see AddTextBlockEventListener() + */ + void RemoveTextBlockEventListener(Tizen::Ui::ITextBlockEventListener& listener); + + /** + * 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 + * + * @param[in] listener The listener to add + */ + void AddTextEventListener(Tizen::Ui::ITextEventListener& listener); + + /** + * Removes an ITextEventListener instance. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The listener to remove + */ + void RemoveTextEventListener(Tizen::Ui::ITextEventListener& listener); + + /** + * Adds the specified listener instance to listen to the scroll panel events. @n + * To listen to the scroll panel events, the parent of EditArea must be an instance of ScrollPanel. + * + * @since 2.0 + * + * @param[in] listener The listener to add + * @remarks When IScrollPanelEventListener::OnOverlayControlCreated() or IScrollPanelEventListener::OnOvelayControlClosed() is called, + * the application resets the bounds of the controls placed within the ScrollPanel control. %ScrollPanel is automatically + * drawn again after this method is called. + * @see RemoveScrollPanelEventListener() + */ + void AddScrollPanelEventListener(Tizen::Ui::IScrollPanelEventListener& listener); + + /** + * Removes the specified scroll panel event listener instance. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The listener to remove + */ + void RemoveScrollPanelEventListener(Tizen::Ui::IScrollPanelEventListener& listener); + + /** + * Adds the specified listener instance. @n + * The added listener can listen to events on the context of the given event dispatcher when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to add + */ + void AddActionEventListener(Tizen::Ui::IActionEventListener& listener); + + /** + * Removes a listener instance. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to remove + */ + void RemoveActionEventListener(Tizen::Ui::IActionEventListener& listener); + + /** + * Adds the specified listener instance for language events. @n + * The added listener is notified when the input language is changed. + * + * @since 2.0 + * + * @param[in] listener The listener to add + * @remarks The application can recognize when the language is changed from the keypad by adding Tizen::Ui::ILanguageEventListener. + * @see RemoveLanguageEventListener() + */ + void AddLanguageEventListener(Tizen::Ui::ILanguageEventListener& listener); + + /** + * Removes the specified listener instance. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The listener to remove + * @see AddLanguageEventListener() + */ + void RemoveLanguageEventListener(Tizen::Ui::ILanguageEventListener& listener); + + /** + * Gets the remaining length of the %EditField control. + * + * @since 2.0 + * + * @return The remaining length of the %EditField control, @n + * else @c -1 if an error occurs + */ + int GetRemainingLength(void) const; + + /** + * Enables or disables the lowercase mode. + * + * @since 2.0 + * + * @param[in] enable Set to @c true to enable the lowercase mode, @n + * else @c false + */ + void SetLowerCaseModeEnabled(bool enable); + + /** + * Checks whether the lowercase mode is enabled. + * + * @since 2.0 + * + * @return @c true if the lowercase mode is enabled, @n + * else @c false + */ + bool IsLowerCaseModeEnabled(void) const; + + /** + * @if OSPDEPREC + * Sets the input mode category. + * + * @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 EditFieldStyle in the Construct() method instead. + * @since 2.0 + * + * @return An error code + * @param[in] categories The categories to set @n + * Multiple input categories can be combined using bitwise OR operator (see Tizen::Ui::Controls::EditInputModeCategory). + * @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 + * The specified @c categories cannot be supported with the current keypad style. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result SetInputModeCategory(unsigned long categories, bool enable); + + /** + * @if OSPDEPREC + * Sets the current input mode category. + * + * @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 EditFieldStyle in the Construct() method instead. + * @since 2.0 + * + * @return An error code + * @param[in] inputModeCategory An item of input category + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result SetCurrentInputModeCategory(EditInputModeCategory inputModeCategory); + + /** + * @if OSPDEPREC + * Gets the input mode category. + * + * @brief [Deprecated] + * @deprecated This method is deprecated because we no longer provide a method to specify the list of styles which the user can set the keypad to. + * @since 2.0 + * + * @return A bitwise combination of Tizen::Ui::Controls::EditInputModeCategory, @n + * else EDIT_INPUTMODE_ALPHA if an error occurs + * @endif + */ + unsigned long GetInputModeCategory(void) const; + + /** + * @if OSPDEPREC + * Gets the current input mode category. + * + * @brief [Deprecated] + * @deprecated This method is deprecated because we no longer provide a method to specify the list of styles which the user can set the keypad to. + * @since 2.0 + * + * @return The current input mode category + * @endif + */ + EditInputModeCategory GetCurrentInputModeCategory(void) const; + + /** + * Sets the cursor in the %EditField control at the specified position. + * + * @since 2.0 + * + * @return An error code + * @param[in] position The cursor position to set + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE The specified @c position is less than @c 0 or greater than the maximum length. + * @exception E_SYSTEM A system error has occurred. + */ + result SetCursorPosition(int position); + + /** + * Gets the cursor position. + * + * @since 2.0 + * + * @return The current cursor position, @n + * else @c -1 if an error occurs + */ + int GetCursorPosition(void) const; + + /** + * Gets the text that is displayed by the %EditField control. + * + * @since 2.0 + * + * @return The text of the %EditField control, @n + * else an empty string if an error occurs + */ + Tizen::Base::String GetText(void) const; + + /** + * Gets the length of the text that is displayed by the %EditField control. + * + * @since 2.0 + * + * @return The length of the text, @n + * else @c -1 if an error occurs + */ + int GetTextLength(void) const; + + /** + * Sets the text of the %EditField control. + * + * @since 2.0 + * + * @param[in] text The text to display by the %EditField control @n + * Use @htmlonly '\n' @endhtmlonly to denote the end of the line. + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. @n + * The length of the specified @c text exceeds the system limitation or the limit length. + * @exception E_SYSTEM A system error has occurred. + */ + result SetText(const Tizen::Base::String& text); + + /** + * Inserts the specified text at the current cursor position. + * + * @since 2.0 + * + * @return An error code + * @param[in] text The text to insert @n + * Use @htmlonly '\n' @endhtmlonly to denote the end of the line. + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result InsertTextAtCursorPosition(const Tizen::Base::String& text); + + /** + * Appends the specified text at the end of the existing text. + * + * @since 2.0 + * + * @return An error code + * @param[in] text The text to append @n + * Use @htmlonly '\n' @endhtmlonly to denote the end of the line. + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result AppendText(const Tizen::Base::String& text); + + /** + * Appends the specified character at the end of the existing text. + * + * @since 2.0 + * + * @return An error code + * @param[in] character The character to append + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @remarks The method modifies the text buffer that is managed by the %EditField control. To display the + * changes, the control must be drawn again. + */ + result AppendCharacter(const Tizen::Base::Character& character); + + /** + * Clears the text that is displayed by the %EditField control. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @remarks The method modifies the text buffer that is managed by the %EditField control. To display the + * changes, the control must be drawn again. + */ + result Clear(void); + + /** + * Deletes a character at the current cursor position. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @remarks The method modifies the text buffer that is managed by the %EditField control. To display the + * changes, the control must be drawn again. + */ + result DeleteCharacterAtCursorPosition(void); + + /** + * Gets the range of the current text block. + * + * @since 2.0 + * + * @param[out] start The first index of the current text block + * @param[out] end The last index of the current text block + */ + void GetCurrentTextRange(int& start, int& end) const; + + /** + * Sets the guide text. + * + * @since 2.0 + * + * @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); + + /** + * Gets the guide text. + * + * @since 2.0 + * + * @return The guide text, @n + * else an empty string if an error occurs + * @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 SetGuideText() + */ + Tizen::Base::String GetGuideText(void) const; + + /** + * Gets the text color of the guide text. + * + * @since 2.0 + * + * @return The guide text color + * @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 SetGuideTextColor() + */ + Tizen::Graphics::Color GetGuideTextColor(void) const; + + /** + * Sets the text color of the guide text. + * + * @since 2.0 + * + * @return An error code + * @param[in] color The guide text color + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see GetGuideTextColor() + */ + result SetGuideTextColor(const Tizen::Graphics::Color& color); + + /** + * Gets the text color of the title for the specified status. + * + * @since 2.0 + * + * @return The title text color, @n + * else RGBA(0,0,0,0) if an error occurs + * @param[in] status The state of the %EditField control + * @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 SetTitleTextColor() + */ + Tizen::Graphics::Color GetTitleTextColor(EditStatus status) const; + + /** + * Sets the text color of the title for the specified status. + * + * @since 2.0 + * + * @return An error code + * @param[in] status The state of the %EditField control + * @param[in] color The title text color + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see GetTitleTextColor() + */ + result SetTitleTextColor(EditStatus status, const Tizen::Graphics::Color& color); + + /** + * Enables or disables the keypad. + * + * @since 2.0 + * + * @param[in] enable Set to @c true to enable the keypad, + * else @c false + */ + void SetKeypadEnabled(bool enable); + + /** + * Checks whether the keypad is enabled. + * + * @since 2.0 + * + * @return @c true if the keypad is enabled, @n + * else @c false + */ + bool IsKeypadEnabled(void) const; + + /** + * Checks whether the text prediction is enabled. + * + * @since 2.0 + * @return @c true if the text prediction is enabled, @n + * else @c false + * @see SetTextPredictionEnabled() + */ + bool IsTextPredictionEnabled(void) const; + + /** + * 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() + */ + result SetTextPredictionEnabled(bool enable); + + /** + * Displays the keypad. @n + * The %ShowKeypad() method is supported only when the input style is ::INPUT_STYLE_OVERLAY. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @exception E_SYSTEM A system error has occurred. + */ + result ShowKeypad(void); + + /** + * Gets the range of the current text block that is selected. + * + * @since 2.0 + * + * @param[out] start The starting index of the current block + * @param[out] end The end index of the current block + */ + void GetBlockRange(int& start, int& end) const; + + /** + * Begins the text block from the current cursor position. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @remarks Move the cursor position to the end of the text block. + * @see SetCursorPosition() + * @see ReleaseBlock() + * @see IsBlocked() + */ + result BeginBlock(void); + + /** + * Releases the selection of the current text block. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see BeginBlock() + * @see IsBlocked() + */ + result ReleaseBlock(void); + + /** + * Checks whether a portion of the text is blocked. + * + * @since 2.0 + * + * @return @c true if the text is blocked, @n + * else @c false + * @see BeginBlock() + * @see ReleaseBlock() + */ + bool IsBlocked(void) const; + + /** + * Copies the text block to the clipboard. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see Cut() + * @see Paste() + * @see Remove() + */ + result Copy(void); + + /** + * Cuts the text block and copies it to the clipboard. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see Copy() + * @see Remove() + * @see Paste() + */ + result Cut(void); + + /** + * Pastes the copied text at the cursor position. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see Copy() + * @see Cut() + * @see Remove() + */ + result Paste(void); + + /** + * Removes the text that is marked by the text block. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see Copy() + * @see Cut() + * @see Paste() + */ + result Remove(void); + + /** + * Checks whether the text in the %EditField control is clipped. + * + * @since 2.0 + * + * @return @c true if the text is clipped, @n + * else @c false + * @remarks 'clipped' means that the text is copied to the clipboard. + * @see Copy() + * @see Cut() + * @see Paste() + * @see Remove() + */ + bool IsClipped(void) const; + + /** + * Sets the title of the %EditField control. + * + * @since 2.0 + * + * @return An error code + * @param[in] title The title to set + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetTitleText(const Tizen::Base::String& title); + + /** + * Gets the title text of the %EditField control. + * + * @since 2.0 + * + * @return The title text, @n + * else an empty string if an error occurs + */ + Tizen::Base::String GetTitleText(void) const; + + /** + * Sets the command button properties of the keypad. @n + * The %SetOverlayKeypadCommandButton() method is supported only when the input style is ::INPUT_STYLE_OVERLAY. + * + * @since 2.0 + * + * @return An error code + * @param[in] position The position of the command button + * @param[in] text The label of the command button + * @param[in] actionId The action ID + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetOverlayKeypadCommandButton(CommandButtonPosition position, const Tizen::Base::String& text, int actionId); + + /** + * Gets the text of the specified command button. @n + * The %GetOverlayKeypadCommandButtonText() method is supported only when the input style is ::INPUT_STYLE_OVERLAY. + * + * @since 2.0 + * + * @return The text of the specified command button + * @param[in] position The position of the command button + */ + Tizen::Base::String GetOverlayKeypadCommandButtonText(CommandButtonPosition position) const; + + /** + * Gets the action ID of the specified command button. @n + * The %GetOverlayKeypadCommandButtonActionId() method is supported only when the input style is ::INPUT_STYLE_OVERLAY. + * + * @since 2.0 + * + * @return The action ID of the specified command button + * @param[in] position The position of the command button + */ + int GetOverlayKeypadCommandButtonActionId(CommandButtonPosition position) const; + + /** + * Sets the input language. + * + * @since 2.0 + * + * @brief [Deprecated] + * @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. + * @remarks + * - The application can set the language of the current keypad that is associated with the current %EditField. + * - This method only works if the language to set is supported by the current preloaded keypad. + */ + result SetCurrentLanguage(Tizen::Locales::LanguageCode languageCode); + + /** + * Gets the current input language. + * + * @since 2.0 + * + * @return An error code + * @param[out] language The current input language of the keypad that is associated with the current %EditField + * @exception E_SUCCESS The method is successful. + */ + result GetCurrentLanguage(Tizen::Locales::LanguageCode& language) const; + + /** + * Sets the text filter. + * + * @since 2.1 + * + * @param[in] pFilter The filter to set + * @remarks The %EditField control checks with the registered filter to decide whether the user-entered text should be replaced or not. + */ + void SetEditTextFilter(IEditTextFilter* pFilter); + + /** + * Sends opaque command to the input method. + * + * @since 2.1 + * + * @param[in] command The opaque command to send + * @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); + + /** + * Sets the password text as visible when %EditField is in password-related styles. + * + * @since 2.2 + * + * @return An error code + * @param[in] visible Set to @c true to show password is visible as plain text, @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 + * This operation is supported when the EditFieldStyle is ::EDIT_FIELD_STYLE_PASSWORD, @n ::EDIT_FIELD_STYLE_PASSWORD_SMALL, ::EDIT_FIELD_STYLE_PASSWORD_NUMBER, or ::EDIT_FIELD_STYLE_PASSWORD_NUMBER_SMALL. + */ + result SetPasswordVisible(bool visible); + + /** + * Checks whether the password text is visible when %EditField is in password-related styles + * + * @since 2.2 + * + * @return @c true if the password is visible as plain text, @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 + * This operation is supported when the EditFieldStyle is ::EDIT_FIELD_STYLE_PASSWORD, @n ::EDIT_FIELD_STYLE_PASSWORD_SMALL, ::EDIT_FIELD_STYLE_PASSWORD_NUMBER, or ::EDIT_FIELD_STYLE_PASSWORD_NUMBER_SMALL. + * @remarks The specific error code can be accessed using the GetLastResult() method. + * @see SetPasswordVisible() + */ + bool IsPasswordVisible(void) const; + +protected: + friend class _EditFieldImpl; + +private: + EditField(const EditField&); + EditField& operator =(const EditField&); + +}; // EditField + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_EDIT_FIELD_H_ diff --git a/inc/FUiCtrlEditTime.h b/inc/FUiCtrlEditTime.h new file mode 100644 index 0000000..838091f --- /dev/null +++ b/inc/FUiCtrlEditTime.h @@ -0,0 +1,311 @@ +// +// 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 FUiCtrlEditTime.h +* @brief This is the header file for the %EditTime class. +* +* This header file contains the declarations of the %EditTime class. +*/ +#ifndef _FUI_CTRL_EDIT_TIME_H_ +#define _FUI_CTRL_EDIT_TIME_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** +* @class EditTime +* @brief This class defines the common behavior of an %EditTime control. +* +* @since 2.0 +* +* The %EditTime class displays a small, fixed-size selector that allows the user to select a time. +* Unlike TimePicker, %EditTime can be placed in a container. +* +* For more information on the class features, see +* EditDate and EditTime. +* +* The following example demonstrates how to use the %EditTime class. +* +* @code +// Sample code for EditTimeSample.h +#include + +class EditTimeSample + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::ITimeChangeEventListener +{ +public: + EditTimeSample(void) + : __pEditTime(null){} + + bool Initialize(void); + virtual result OnInitializing(void); + + // ITimeChangeEventListener + virtual void OnTimeChanged(const Tizen::Ui::Control& source, int hour, int minute); + virtual void OnTimeChangeCanceled(const Tizen::Ui::Control& source); + +private: + Tizen::Ui::Controls::EditTime* __pEditTime; +}; + * @endcode + * + * @code +// Sample code for EditTimeSample.cpp +#include + +#include "EditTimeSample.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Ui::Controls; + +bool +EditTimeSample::Initialize(void) +{ + Construct(FORM_STYLE_NORMAL); + return true; +} + +result +EditTimeSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + // Creates an instance of EditTime + __pEditTime = new EditTime(); + __pEditTime->Construct(Point(100, 100)); + __pEditTime->AddTimeChangeEventListener(*this); + + //Adds the edit time to the form + AddControl(__pEditTime); + + return r; +} + +// ITimeChangeEventListener implementation +void +EditTimeSample::OnTimeChanged(const Control& source, int hour, int minute) +{ + // .... +} + +void +EditTimeSample::OnTimeChangeCanceled(const Control& source) +{ + // .... +} +* @endcode +**/ +class _OSP_EXPORT_ EditTime + : public Tizen::Ui::Control +{ +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. + * + * @since 2.0 + */ + EditTime(void); + + /** + * 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 ~EditTime(void); + + /** + * Adds a time changed event listener instance. + * + * @since 2.0 + * + * @param[in] listener The listener to add + * @see ITimeChangeEventListener::OnTimeChanged() + * @see ITimeChangeEventListener::OnTimeChangeCanceled() + * @see RemoveTimeChangeEventListener() + */ + void AddTimeChangeEventListener(Tizen::Ui::ITimeChangeEventListener& listener); + + /** + * Removes a listener instance. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The listener to remove + * @see AddTimeChangeEventListener() + */ + void RemoveTimeChangeEventListener(Tizen::Ui::ITimeChangeEventListener& listener); + + /** + * Initializes this instance of %EditTime to the current time in the wall time mode. + * + * @since 2.0 + * + * @return An error code + * @param[in] point The position of %EditTime in 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. + */ + result Construct(const Tizen::Graphics::Point& point, const Tizen::Base::String& title = L""); + + /** + * Initializes this instance of %EditTime to the current time in the wall time mode. + * + * @since 2.1 + * + * @return An error code + * @param[in] point The position of %EditTime in 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. + */ + result Construct(const Tizen::Graphics::FloatPoint& point, const Tizen::Base::String& title = L""); + + /** + * Gets the current hour value of the %EditTime control. + * + * @since 2.0 + * + * @return The current hour value between @c 0 to @c 23 @n + * The default hour value is the current system hour. + */ + int GetHour(void) const; + + /** + * Gets the current minute value of the %EditTime control. + * + * @since 2.0 + * + * @return The current minute value @n + * The default minute value is the current system minute. + */ + int GetMinute(void) const; + + /** + * Gets the current time value of the %EditTime control. + * + * @since 2.0 + * + * @return The time value + */ + Tizen::Base::DateTime GetTime(void) const; + + /** + * Sets the 12-hour or 24-hour display type of the %EditTime. @n + * This can be 12-hour or 24-hour type. + * + * @since 2.0 + * + * @param[in] enable Set to @c true to set the 24-hour notation, @n + * else @c false to set the 12-hour notation + */ + void Set24HourNotationEnabled(bool enable); + + /** + * Sets the hour value of the %EditTime control. @n + * The hour value should be between @c 0 and @c 23. + * + * @since 2.0 + * + * @param[in] hour The hour value to set + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified hour value is invalid. + * @exception E_SYSTEM A system error has occurred. + * + */ + result SetHour(int hour); + + /** + * Sets the minute value of the %EditTime control. @n + * The minute value should be between @c 0 and @c 59. + * + * @since 2.0 + * + * @param[in] minute The minute value to set + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified minute value is invalid. + * @exception E_SYSTEM A system error has occurred. + * + */ + result SetMinute(int minute); + + /** + * Sets the designated time value of the %EditTime control. + * + * @since 2.0 + * + * @param[in] time The time to set + */ + void SetTime(const Tizen::Base::DateTime& time); + + /** + * Sets the value of the %EditTime control with the current system time in the wall time mode. + * + * @since 2.0 + */ + void SetCurrentTime(void); + + /** + * Enables TimePicker. + * + * @since 2.0 + * + * @param[in] enable Set to @c true to enable %TimePicker, @n + * else @c false + */ + void SetTimePickerEnabled(bool enable); + + /** + * Checks whether TimePicker is enabled. + * + * @since 2.0 + * + * @return @c true if TimePicker is enabled, @n + * else @c false + */ + bool IsTimePickerEnabled(void) const; + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + EditTime(const EditTime& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + EditTime& operator =(const EditTime& rhs); + + friend class _EditTimeImpl; +}; // EditTime + +}}} //Tizen::Ui::Controls + +#endif // _FUI_CTRL_EDIT_TIME_H_ diff --git a/inc/FUiCtrlEditTypes.h b/inc/FUiCtrlEditTypes.h new file mode 100644 index 0000000..1302dd8 --- /dev/null +++ b/inc/FUiCtrlEditTypes.h @@ -0,0 +1,182 @@ +// +// 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 FUiCtrlEditTypes.h + * @brief This is the header file for the %Edit enumerations. + * + * This header file contains the declarations of the Edit enumerations. + */ +#ifndef _FUI_CTRL_EDIT_ENUM_H_ +#define _FUI_CTRL_EDIT_ENUM_H_ + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @if OSPDEPREC + * @enum EditInputModeCategory + * + * 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, from this list. It is recommended to use the styles offered in EditFieldStyle or + * KeypadStyle enumerations instead. + * + * @since 2.0 + * @endif + */ +enum EditInputModeCategory +{ + EDIT_INPUTMODE_ALPHA = 0x0001, /**< @if OSPDEPREC The alphabetic input mode @endif */ + EDIT_INPUTMODE_PREDICTIVE = 0x0002, /**< @if OSPDEPREC The predictive input mode @endif */ + EDIT_INPUTMODE_NUMERIC = 0x0004, /**< @if OSPDEPREC The numeric input mode @endif */ + EDIT_INPUTMODE_SYMBOL = 0x0008 /**< @if OSPDEPREC The symbolic input mode @endif */ +}; + +/** + * @enum EditFieldStyle + * + * Defines the EditField style. + * + * @since 2.0 + */ +enum EditFieldStyle +{ + EDIT_FIELD_STYLE_NORMAL, /**< The normal style */ + EDIT_FIELD_STYLE_PASSWORD, /**< The password style '****' */ + EDIT_FIELD_STYLE_NORMAL_SMALL, /**< The small normal style */ + EDIT_FIELD_STYLE_PASSWORD_SMALL, /**< The small password style '****' */ + EDIT_FIELD_STYLE_EMAIL, /**< The email style */ + EDIT_FIELD_STYLE_URL, /**< The URL style */ + EDIT_FIELD_STYLE_EMAIL_SMALL, /**< The small email style */ + EDIT_FIELD_STYLE_URL_SMALL, /**< The small URL style */ + EDIT_FIELD_STYLE_NUMBER, /**< The number style */ + EDIT_FIELD_STYLE_NUMBER_SMALL, /**< The small number style */ + EDIT_FIELD_STYLE_PHONE_NUMBER, /**< The phone number style */ + EDIT_FIELD_STYLE_PHONE_NUMBER_SMALL, /**< The small phone number style */ + EDIT_FIELD_STYLE_PASSWORD_NUMBER, /**< The number password style */ + EDIT_FIELD_STYLE_PASSWORD_NUMBER_SMALL, /**< The small number password style */ + EDIT_FIELD_STYLE_IP_V4, /**< The IP V4 style */ + EDIT_FIELD_STYLE_IP_V4_SMALL, /**< The small IP V4 style */ +}; + +/** + * @enum CommandButtonPosition + * + * Defines the command button position. + * + * @since 2.0 + */ +enum CommandButtonPosition +{ + COMMAND_BUTTON_POSITION_LEFT, /**< The position is to the left */ + COMMAND_BUTTON_POSITION_RIGHT /**< The position is to the right */ +}; + +/** + * @enum EditMarginType + * + * Defines the possible margin types of EditField and EditArea. + * + * @since 2.0 + */ +enum EditMarginType +{ + EDIT_MARGIN_TYPE_VERTICAL, /**< The margin for top and bottom */ + EDIT_MARGIN_TYPE_HORIZONTAL /**< The margin for left and right */ +}; + +/** + * @enum EditTextColor + * + * Defines the possible Edit text colors. + * + * @since 2.0 + */ +enum EditTextColor +{ + EDIT_TEXT_COLOR_NORMAL, /**< The normal text color */ + EDIT_TEXT_COLOR_DISABLED, /**< The disabled text color */ + EDIT_TEXT_COLOR_HIGHLIGHTED, /**< The selected text color */ + EDIT_TEXT_COLOR_LINK /**< The highlighted text color */ +}; + +/** + * @enum EditStatus + * + * Defines the possible Edit states. + * + * @since 2.0 + */ +enum EditStatus +{ + EDIT_STATUS_NORMAL, /**< The normal state */ + EDIT_STATUS_DISABLED, /**< The disabled state */ + EDIT_STATUS_HIGHLIGHTED, /**< The highlighted state */ + EDIT_STATUS_PRESSED /**< The pressed state */ +}; + +/** + * @enum EditFieldTitleStyle + * + * Defines the possible styles of title. + * + * @since 2.0 + */ +enum EditFieldTitleStyle +{ + EDIT_FIELD_TITLE_STYLE_NONE = 0, /**< No title */ + EDIT_FIELD_TITLE_STYLE_INNER, /**< The title appears inside of the EditField's input field */ + EDIT_FIELD_TITLE_STYLE_TOP /**< The title appears at the top input field */ +}; + +/** + * @enum EllipsisPosition + * + * Defines the possible positions of ellipsis. + * + * @since 2.0 + */ +enum EllipsisPosition +{ + ELLIPSIS_POSITION_START = 0, /**< The ellipsis appears at the start of text block */ + ELLIPSIS_POSITION_MIDDLE, /**< The ellipsis appears at the middle of text block */ + ELLIPSIS_POSITION_END, /**< The ellipsis appears at the end of text block */ +}; + +/** + * @enum KeypadStyle + * + * Defines the initial keypad style. + * + * @since 2.0 + */ +enum KeypadStyle +{ + KEYPAD_STYLE_NORMAL = 0, /**< The normal style */ + KEYPAD_STYLE_PASSWORD, /**< The password style '****' */ + KEYPAD_STYLE_EMAIL, /**< The email style */ + KEYPAD_STYLE_URL, /**< The URL style */ + KEYPAD_STYLE_NUMBER, /**< The number style */ + KEYPAD_STYLE_PHONE_NUMBER, /**< The phone number style */ + KEYPAD_STYLE_IP_V4, /**< The IP V4 style */ +}; + +}}} // Tizen::Ui::Controls +#endif // _FUI_CTRL_EDIT_ENUM_H_ diff --git a/inc/FUiCtrlExpandableEditArea.h b/inc/FUiCtrlExpandableEditArea.h new file mode 100644 index 0000000..780ec90 --- /dev/null +++ b/inc/FUiCtrlExpandableEditArea.h @@ -0,0 +1,1709 @@ +// +// 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 FUiCtrlExpandableEditArea.h + * @brief This is the header file for the %ExpandableEditArea class. + * + * This header file contains the declarations of the %ExpandableEditArea class. + */ + +#ifndef _FUI_CTRL_EXPANDABLE_EDIT_AREA_H_ +#define _FUI_CTRL_EXPANDABLE_EDIT_AREA_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// Forward declaration +namespace Tizen { namespace Graphics +{ +class Rectangle; +}} // Tizen::Graphics + +namespace Tizen { namespace Ui { namespace Controls +{ + +class IExpandableEditAreaEventListener; + +/** + * @enum ExpandableEditAreaStyle + * + * Defines the possible styles of the expandable edit area. + * + * @since 2.0 + */ +enum ExpandableEditAreaStyle +{ + EXPANDABLE_EDIT_AREA_STYLE_NORMAL, /**< The normal expandable edit area */ + EXPANDABLE_EDIT_AREA_STYLE_TOKEN /**< The token expandable edit area */ +}; + + +/** + * @enum ExpandableEditAreaTitleStyle + * + * Defines the possible styles of the expandable edit area title. + * + * @since 2.0 + */ +enum ExpandableEditAreaTitleStyle +{ + EXPANDABLE_EDIT_AREA_TITLE_STYLE_NONE = 0, /**< The style with no title */ + EXPANDABLE_EDIT_AREA_TITLE_STYLE_INNER, /**< The title appears as a right aligned text inside the edit text field */ + EXPANDABLE_EDIT_AREA_TITLE_STYLE_TOP /**< The title appears at the top of the edit text field */ +}; + + +/** + * @enum ExpandableEditAreaTokenStatus + * + * Defines the possible status of the expandable edit area tokens. + * + * @since 2.0 + */ +enum ExpandableEditAreaTokenStatus +{ + EXPANDABLE_EDIT_AREA_TOKEN_STATUS_NORMAL = 0, /**< The normal status */ + EXPANDABLE_EDIT_AREA_TOKEN_STATUS_SELECTED /**< The selected status */ +}; + + +/** + * @class ExpandableEditArea + * @brief This class is an implementation of %ExpandableEditArea. + * + * @since 2.0 + * + * 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. + * +* The following sample code demonstrates how to use the %ExpandableEditArea class. +* +* @code +// Sample code for ExpandableEditAreaSample.h +#include + +class ExpandableEditAreaSample + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::IKeypadEventListener + , public Tizen::Ui::Controls::IExpandableEditAreaEventListener +{ +public: + ExpandableEditAreaSample(void) + : __pExpandableEdit(null){} + + bool Initialize(void); + virtual result OnInitializing(void); + + //IKeypadEventListener + virtual void OnKeypadActionPerformed(Tizen::Ui::Control& source, Tizen::Ui::KeypadAction keypadAction); + virtual void OnKeypadClosed(Tizen::Ui::Control& source); + virtual void OnKeypadOpened(Tizen::Ui::Control& source); + virtual void OnKeypadWillOpen(Tizen::Ui::Control& source); + + //IExpandableEditAreaEventListener + virtual void OnExpandableEditAreaLineAdded(Tizen::Ui::Controls::ExpandableEditArea& source, int newLineCount); + virtual void OnExpandableEditAreaLineRemoved(Tizen::Ui::Controls::ExpandableEditArea& source, int newLineCount); + +private: + Tizen::Ui::Controls::ExpandableEditArea* __pExpandableEdit; +}; + +* @endcode +* +* @code +// Sample code for ExpandableEditAreaSample.cpp +#include + +#include "ExpandableEditAreaSample.h" + +using namespace Tizen::Graphics;; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; + +bool +ExpandableEditAreaSample::Initialize(void) +{ + Construct(FORM_STYLE_NORMAL); + return true; +} + +result +ExpandableEditAreaSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + __pExpandableEdit = new ExpandableEditArea(); + __pExpandableEdit->Construct(Rectangle(25, 100, GetClientAreaBounds().width - 50, 150), + EXPANDABLE_EDIT_AREA_STYLE_NORMAL, EXPANDABLE_EDIT_AREA_TITLE_STYLE_NONE, 5); + + // Adds an instance of IKeypadEventListenerevent and an instance of IExpandableEditAreaEventListener + __pExpandableEdit->AddKeypadEventListener(*this); + __pExpandableEdit->AddExpandableEditAreaEventListener(*this); + + AddControl(__pExpandableEdit); + + // Sets a focus to the expandable edit area + __pExpandableEdit->SetFocus(); + + return r; +} + +// IKeypadEventListener implementation +void +ExpandableEditAreaSample::OnKeypadActionPerformed(Tizen::Ui::Control& source, Tizen::Ui::KeypadAction keypadAction) +{ + // .... +} + +void +ExpandableEditAreaSample::OnKeypadClosed(Tizen::Ui::Control& source) +{ + // .... +} + +void +ExpandableEditAreaSample::OnKeypadOpened(Tizen::Ui::Control& source) +{ + // .... +} + +void +ExpandableEditAreaSample::OnKeypadWillOpen(Tizen::Ui::Control& source) +{ + // .... +} + +// IExpandableEditAreaEventListener implementation +void +ExpandableEditAreaSample::OnExpandableEditAreaLineAdded(Tizen::Ui::Controls::ExpandableEditArea& source, int newLineCount) +{ + // .... +} + +void +ExpandableEditAreaSample::OnExpandableEditAreaLineRemoved(Tizen::Ui::Controls::ExpandableEditArea& source, int newLineCount) +{ + // .... +} +* @endcode +*/ +class _OSP_EXPORT_ ExpandableEditArea + : public Tizen::Ui::Control +{ +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. + * + * @since 2.0 + */ + ExpandableEditArea(void); + + /** + * 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 ~ExpandableEditArea(void); + + /** + * Initializes this instance of %ExpandableEditArea with the specified parameters. + * + * @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 expandable edit area along with + * the width and height. @n + * The optimal size of the control is defined in + * Optimal Size of UI Controls. + * @param[in] style The style of the expandable edit area + * @param[in] titleStyle The title style + * @param[in] maxExpandableLines The maximum number of lines to which the control can be expanded @n + * By default, the line count is @c 1. + * @exception E_SUCCESS The method is successful. + * @exception E_UNSUPPORTED_OPTION The specified option is not supported. @n + * The token style %ExpandabledEditArea does not support @c EXPANDABLE_EDIT_AREA_TITLE_STYLE_TOP. + * @exception E_MAX_EXCEEDED The number of lines has exceeded the maximum limit. + * @exception E_INVALID_ARG A specified input parameter is invalid, or @n + * the specified @c maxLines is either negative or @c 0. + * @exception E_SYSTEM A system error has occurred. + */ + result Construct(const Tizen::Graphics::Rectangle& rect, ExpandableEditAreaStyle style, ExpandableEditAreaTitleStyle titleStyle, int maxExpandableLines = 10); + + /** + * Initializes this instance of %ExpandableEditArea with the specified parameters. + * + * @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 of the expandable edit area along with + * the width and height. @n + * The optimal size of the control is defined in + * Optimal Size of UI Controls. + * @param[in] style The style of the expandable edit area + * @param[in] titleStyle The title style + * @param[in] maxExpandableLines The maximum number of lines to which the control can be expanded @n + * By default, the line count is @c 1. + * @exception E_SUCCESS The method is successful. + * @exception E_UNSUPPORTED_OPTION The specified option is not supported. @n + * The token style %ExpandabledEditArea does not support @c EXPANDABLE_EDIT_AREA_TITLE_STYLE_TOP. + * @exception E_MAX_EXCEEDED The number of lines has exceeded the maximum limit. + * @exception E_INVALID_ARG A specified input parameter is invalid, or @n + * the specified @c maxLines is either negative or @c 0. + * @exception E_SYSTEM A system error has occurred. + */ + result Construct(const Tizen::Graphics::FloatRectangle& rect, ExpandableEditAreaStyle style, ExpandableEditAreaTitleStyle titleStyle, int maxExpandableLines = 10); + +// TEXT MANAGEMENT + /** + * Appends the specified character at the end of the existing text. + * + * @since 2.0 + * + * @return An error code + * @param[in] character The character to append + * @exception E_SUCCESS The method is successful. + * @exception E_MAX_EXCEEDED The number of items has exceeded the maximum limit. @n + * The number of characters has exceeded the maximum limit. + * @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. + */ + result AppendCharacter(const Tizen::Base::Character& character); + + /** + * Appends the specified text at the end of the existing text. + * + * @since 2.0 + * + * @return An error code + * @param[in] text The text to append + * @exception E_SUCCESS The method is successful. + * @exception E_MAX_EXCEEDED The number of items has exceeded the maximum limit @n + * The number of characters has exceeded the maximum limit. + * @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. + */ + result AppendText(const Tizen::Base::String& text); + + /** + * Appends the text that will be displayed by bitmap at the end of the existing text. + * + * @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. + * @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); + + /** + * Deletes the character present at the current cursor position. + * + * @since 2.0 + * + * @return An error code + * @param[in] index The index + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. @n + * The specified @c index is negative. + * @exception E_OUT_OF_RANGE The specified @c index is outside the bounds of the data structure. @n + * Either the specified @c index is greater than the number of elements or less than @c 0. + * @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. + */ + result DeleteCharacterAt(int index); + + /** + * Inserts a character at the specified index. + * + * @since 2.0 + * + * @return An error code + * @param[in] index The position to insert the character + * @param[in] character The character to insert + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE The specified @c index is outside the bounds of the data structure. @n + * Either the specified @c index is greater than the number of elements or less than @c 0. + * @exception E_MAX_EXCEEDED 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. + */ + result InsertCharacterAt(int index, const Tizen::Base::Character& character); + + /** + * Inserts the text at the specified index. + * + * @since 2.0 + * + * @return An error code + * @param[in] index The position to insert the text + * @param[in] text The text to insert + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE The specified @c index is outside the bounds of the data structure. @n + * Either the specified @c index is greater than the number of elements or less than @c 0. + * @exception E_MAX_EXCEEDED The length of the specified @c text exceeds system limitations. + * @exception E_SYSTEM A system error has occurred. + */ + result InsertTextAt(int index, const Tizen::Base::String& text); + + /** + * Inserts the text that will be displayed by bitmap at the specified text position. + * + * @since 2.0 + * + * @return An error code + * @param[in] position The position to insert the text + * @param[in] text The text to insert @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_OUT_OF_RANGE The specified @c position is outside the valid range. @n + * 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. + * @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); + + /** + * Gets the portion of the text that is displayed by the %ExpandableEditArea control. + * + * @since 2.0 + * + * @return The specified portion of the text, @n + * else an empty string if an error occurs + * @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. @n + * The specified @c start or @c end 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 GetText() + * @see SetText() + */ + Tizen::Base::String GetText(int start, int end) const; + + /** + * Gets the text of the %ExpandableEditArea control. + * + * @since 2.0 + * + * @return The text of the %ExpandableEditArea control, @n + * else an empty string if an error occurs + * @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. + */ + Tizen::Base::String GetText(void) const; + + /** + * Gets the text length. + * + * @since 2.0 + * + * @return The length of the text, @n + * else @c -1 if an error occurs + * @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. + */ + int GetTextLength(void) const; + + /** + * Sets the text to be displayed by the %ExpandableEditArea control. + * + * @since 2.0 + * + * @param[in] text The text to set @n + * To denote the end of a line use '\\n'. + * @exception E_SUCCESS The method is successful. + * @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. + */ + result SetText(const Tizen::Base::String& text); + + /** + * Clears the text that is displayed by the %ExpandableEditArea control. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @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. + */ + result Clear(void); + + /** + * Sets the title of the %ExpandableEditArea control. + * + * @since 2.0 + * + * @return An error code + * @param[in] title The title to set + * @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 + * This operation is not supported if the title is not set. + * @exception E_SYSTEM A system error has occurred. + */ + result SetTitleText(const Tizen::Base::String& title); + + /** + * Gets the title of the %ExpandableEditArea control. + * + * @since 2.0 + * + * @return The title text of the entered string, @n + * else empty string if an error occurs + * @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. + */ + Tizen::Base::String GetTitleText(void) const; + +// GUIDE TEXT + /** + * Gets the guide text. + * + * @since 2.0 + * + * @return The guide text, @n + * else an empty string if an error occurs + * @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 SetGuideText() + */ + Tizen::Base::String GetGuideText(void) const; + + /** + * Sets the guide text to be displayed, when there is no data in the search field. + * + * @since 2.0 + * + * @return An error code + * @param[in] guideText The guide text + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see GetGuideText() + */ + result SetGuideText(const Tizen::Base::String& guideText); + +// LINE MANAGEMENT + /** + * Gets the maximum line count supported by the flexible text edit. + * + * @since 2.0 + * + * @return The maximum line count, @n + * else @c -1 if an error occurs + * @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. + */ + int GetMaxLineCount(void) const; + + /** + * Gets the line spacing. + * + * @since 2.0 + * @return The line spacing, @n + * else @c -1 if an error occurs + * @see SetLineSpacing () + */ + int GetLineSpacing(void) const; + + /** + * Gets the line spacing. + * + * @since 2.1 + * @return The line spacing, @n + * else @c -1.0f if an error occurs + * @see SetLineSpacing () + */ + + float GetLineSpacingF(void) const; + + /** + * Sets the line spacing. @n + * The line spacing is determined by multiplying @c multiplier to the default line spacing and adding @c extra. + * + * @code + * The line spacing = (default line spacing) * multiplier + extra + * @endcode + * + * @since 2.0 + * @return An error code + * @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. + * @see GetLineSpacing () + */ + result SetLineSpacing(int multiplier, int extra); + + /** + * Sets the line spacing. @n + * The line spacing is determined by multiplying @c multiplier to the default line spacing and adding @c extra. + * + * @code + * The line spacing = (default line spacing) * multiplier + extra + * @endcode + * + * @since 2.1 + * @return An error code + * @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 the specified @c multiplier or @c extra is less than 0. + * @see GetLineSpacing () + */ + result SetLineSpacing(int multiplier, float extra); + + /** + * Gets the current line count. + * + * @since 2.0 + * + * @return The line count of the text + * @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. + */ + int GetTextLineCount(void) const; + +// TEXT SIZE + /** + * Gets the text size. + * + * @since 2.0 + * + * @return The size of the text, @n + * else @c -1 if an error occurs + * @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 SetTextSize() + */ + int GetTextSize(void) const; + + /** + * Gets the text size. + * + * @since 2.1 + * + * @return The size of the text, @n + * else @c -1 if an error occurs + * @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 SetTextSize() + */ + float GetTextSizeF(void) const; + + /** + * Sets the text size. + * + * @since 2.0 + * + * @return An error code + * @param[in] size The text size + * @exception E_SUCCESS The method is successful. + * @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() + */ + result SetTextSize(int size); + + /** + * Sets the text size. + * + * @since 2.1 + * + * @return An error code + * @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 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. + * @see GetTextSizeF() + */ + result SetTextSize(float size); + +// MARGINS + /** + * Gets the margin of the specified margin type. + * + * @since 2.0 + * + * @return The margin value of the specified margin type, @n + * else @c -1 if an error occurs + * @param[in] marginType The margin type + * @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 SetMargin() + */ + int GetMargin(EditMarginType marginType) const; + + /** + * Gets the margin of the specified margin type. + * + * @since 2.1 + * + * @return The margin value of the specified margin type, @n + * else @c -1.0f if an error occurs + * @param[in] marginType The margin type + * @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 SetMargin() + */ + float GetMarginF(EditMarginType marginType) const; + + /** + * Sets the margin for the specified margin type. + * + * @if OSPCOMPAT + * @brief [Compatibility] + * @endif + * @since 2.0 + * @if OSPCOMPAT + * @compatibility This method has compatibility issues with OSP compatible applications. @n + * For more information, see @ref CompSetMarginPage "here". + * @endif + * @return An error code + * @param[in] marginType The margin type + * @param[in] margin The margin to set + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. @n + * The specified @c margin cannot be negative integer. + * @exception E_SYSTEM A system error has occurred. + * @see GetMargin() + */ + result SetMargin(EditMarginType marginType, int margin); + /** + * @if OSPCOMPAT + * @page CompSetMarginPage Compatibility for SetMargin() + * @section CompSetMarginPageIssueSection Issues + * Implementing this method in OSP compatible applications has the following issues: @n + * -# The SetMargin() method sets the margin value for ExpandableEditArea with only @c EXPANDABLE_EDIT_AREA_STYLE_NORMAL + * in API version 2.0. @n + * + * @section CompSetMarginPageSolutionSection Resolutions + * This issue has been resolved in Tizen. @n + * @endif + */ + + /* + * Sets the margin for the specified margin type. + * + * @if OSPCOMPAT + * @brief [Compatibility] + * @endif + * @since 2.1 + * @if OSPCOMPAT + * @compatibility This method has compatibility issues with OSP compatible applications. @n + * For more information, see @ref CompSetMarginPage "here". + * @endif + * @return An error code + * @param[in] marginType The margin type + * @param[in] margin The margin to set + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. @n + * The specified @c margin cannot be negative integer. + * @exception E_SYSTEM A system error has occurred. + * @see GetMargin() + */ + result SetMargin(EditMarginType marginType, float margin); + /* + * @if OSPCOMPAT + * @page CompSetMarginPage Compatibility for SetMargin() + * @section CompSetMarginPageIssueSection Issues + * Implementing this method in OSP compatible applications has the following issues: @n + * -# The SetMargin() method sets the margin value for ExpandableEditArea with only @c EXPANDABLE_EDIT_AREA_STYLE_NORMAL + * in API version 2.0. @n + * + * @section CompSetMarginPageSolutionSection Resolutions + * This issue has been resolved in Tizen. @n + * @endif + */ + +// LOWER CASE + /** + * Enables or disables the lowercase mode. @n + * When the lowercase mode is enabled, the text input starts with a lowercase character. + * @since 2.0 + * + * @return An error code + * @param[in] enable Set to @c true to enable the lowercase mode, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see IsLowerCaseModeEnabled() + */ + result SetLowerCaseModeEnabled(bool enable); + + /** + * Checks whether the lowercase mode is enabled. + * + * @since 2.0 + * + * @return @c true if the lowercase mode is enabled, @n + * else @c false + * @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 SetLowerCaseModeEnabled() + */ + bool IsLowerCaseModeEnabled(void) const; + +// CURSOR MANAGEMENT + /** + * Gets the cursor position. + * + * @since 2.0 + * + * @return The current cursor position, @n + * else @c -1 if an error occurs + * @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. + */ + int GetCursorPosition(void) const; + + /** + * Sets the cursor at the specified position. + * + * @since 2.0 + * + * @return An error code + * @param[in] position The cursor position to set + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE The specified @c position is less than @c 0 or greater than the maximum length. + * @exception E_SYSTEM A system error has occurred. + */ + result SetCursorPosition(int position); + +// TEXT BLOCKING + /** + * Gets the start and end indexes of the currently selected text block. + * + * @since 2.0 + * + * @return An error code + * @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. + * @see ReleaseBlock() + * @see SetBlockRange() + */ + result GetBlockRange(int& start, int& end) const; + + /** + * Releases the selection of the current text block. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see GetBlockRange() + * @see SetBlockRange() + */ + result ReleaseBlock(void); + + /** + * Removes the text content of the current text block. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @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); + + /** + * Sets the block range for the text. + * + * @since 2.0 + * + * @return An error code + * @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. @n + * Either the index is greater than the number of elements or less than @c 0. + * @exception E_SYSTEM A system error has occurred. + * @see ReleaseBlock() + * @see GetBlockRange() + */ + result SetBlockRange(int start, int end); + +// KEYPAD MANAGEMENT + /** + * Gets the keypad action type. + * + * @since 2.0 + * + * @return The keypad action + * @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 SetKeypadAction() + */ + Tizen::Ui::KeypadAction GetKeypadAction(void) const; + + /** + * Gets the keypad style. + * + * @since 2.0 + * + * @return The keypad style + * @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 SetKeypadStyle() + */ + KeypadStyle GetKeypadStyle(void) const; + + /** + * Hides the keypad associated with the %ExpandableEditArea control. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see ShowKeypad() + */ + result HideKeypad(void); + + /** + * Checks whether the keypad is enabled. + * + * @since 2.0 + * + * @return @c true if the keypad is enabled, @n + * else @c false + * @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 SetKeypadEnabled() + */ + bool IsKeypadEnabled(void) const; + + /** + * Sets the keypad action type. + * + * @since 2.0 + * + * @return An error code + * @param[in] keypadAction The keypad action + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @remarks Depending on the value of input param, the enter key label of the keypad will change accordingly. + * @see GetKeypadAction() + */ + result SetKeypadAction(Tizen::Ui::KeypadAction keypadAction); + + /** + * Sets the keypad style. + * + * @since 2.0 + * + * @return An error code + * @param[in] keypadStyle The keypad style + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. @n + * The specified @c keypadStyle is @c KEYPAD_STYLE_PASSWORD. + * @exception E_SYSTEM A system error has occurred. + * @remarks Depending on the value of input param, the layout of the keypad will change accordingly. + * @see GetKeypadStyle() + */ + result SetKeypadStyle(KeypadStyle keypadStyle); + + /** + * Checks whether the text prediction is enabled. + * + * @since 2.0 + * @return @c true if the text prediction is enabled, @n + * else @c false + * @see SetTextPredictionEnabled() + */ + bool IsTextPredictionEnabled(void) const; + + /** + * 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() + */ + result SetTextPredictionEnabled(bool enable); + + /** + * Enables or disables the keypad. + * + * @since 2.0 + * + * @return An error code + * @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. + * @see IsKeypadEnabled() + */ + result SetKeypadEnabled(bool enable); + + /** + * Shows the keypad. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see HideKeypad() + */ + result ShowKeypad(void); + +// TOKEN FILTER + /** + * Sets the text token filter. + * + * @since 2.0 + * + * @return An error code + * @param[in] pFilter The filter + * @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_SYSTEM A system error has occurred. + * @remarks The %ExpandableEditArea control checks with the registered filter to decide whether the user-entered text should be replaced. + */ + result SetTokenFilter(const ITokenFilter* pFilter); + + /** + * Gets the text token filter. + * + * @since 2.0 + * + * @return The filter, @n + * 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 + * 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. + */ + ITokenFilter* GetTokenFilter(void) const; + + /** + * Appends the specified token. + * + * @since 2.0 + * + * @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_INVALID_ARG The specified input parameter is invalid. @n + * 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); + + /** + * Inserts the token at the specified index. + * + * @since 2.0 + * + * @return An error code + * @param[in] index The position to insert the token + * @param[in] token The token to add + * @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_INVALID_ARG A specified input parameter is invalid. @n + * The length of the specified @c token is @c 0. + * @exception E_SYSTEM A system error has occurred. + */ + result InsertTokenAt(int index, const Tizen::Base::String& token); + + /** + * Gets the token text at the specified index. + * + * @since 2.0 + * + * @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 + * @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_OUT_OF_RANGE The specified index parameter is outside the bounds of the data structure. @n + * Either 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. + */ + Tizen::Base::String GetTokenAt(int index) const; + + /** + * Gets the total token count. + * + * @since 2.0 + * + * @return The total token count, @n + * else @c -1 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 + * 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. + */ + int GetTokenCount(void) const; + + /** + * Gets the index of the token that is selected. + * + * @since 2.0 + * + * @return The index of the selected token, @n + * else @c -1 if no token is selected or 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 + * 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. + */ + int GetSelectedTokenIndex(void) const; + + /** + * Checks whether the token editing mode is enabled. + * + * @since 2.0 + * + * @return @c true if the editing mode is enabled, @n + * else @c false + * @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_SYSTEM A system error has occurred. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + bool IsTokenEditModeEnabled(void) const; + + /** + * Removes the token at the specified index. + * + * @since 2.0 + * + * @return An error code + * @param[in] index The index of the token to remove + * @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_OUT_OF_RANGE The specified index is outside the bounds of the data structure. @n + * Either the index is greater than the number of elements or less than @c 0. + * @exception E_SYSTEM A system error has occurred. + */ + result RemoveTokenAt(int index); + + /** + * Sets the selected state of the specified token. + * + * @since 2.0 + * + * @return An error code + * @param[in] index The index of the token to select + * @param[in] selected Set to @c true to select the specified token, @n + * else @c false to unselect + * @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_OUT_OF_RANGE The specified index is outside the bounds of the data structure. @n + * Either the index is greater than the number of elements or less than @c 0. + * @exception E_SYSTEM A system error has occurred. + * @remarks The currently selected token gets unselected automatically. + */ + result SetTokenSelected(int index, bool selected); + + /** + * Enables or disables the token edit mode. + * + * @since 2.0 + * + * @return An error code + * @param[in] enable Set to @c true to enable the token editing mode, @n + * else @c false + * @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_SYSTEM A system error has occurred. + */ + result SetTokenEditModeEnabled(bool enable); + +// LIMIT LENGTH + /** + * Gets the limit length. + * + * @since 2.0 + * + * @return The limit length, @n + * else @c -1 if an error occurs @n + * 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. + * @see SetLimitLength() + */ + int GetLimitLength(void) const; + + /** + * Sets the limit length. + * + * @since 2.0 + * + * @return An error code + * @param[in] limitLength The limit text length to set + * @exception E_SUCCESS The method is successful. + * @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() + */ + result SetLimitLength(int limitLength); + +// APPEARANCES + /** + * Gets the color of the %ExpandableEditArea control for the specified status. + * + * @since 2.0 + * + * @return The color, @n + * else RGBA (0,0,0,0) if an error occurs + * @param[in] status The status + * @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. + */ + Tizen::Graphics::Color GetColor(EditStatus status) const; + + /** + * Gets the text color of the specified text type. + * + * @since 2.0 + * + * @return The text color, @n + * 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 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() + */ + Tizen::Graphics::Color GetTextColor(EditTextColor type) const; + + /** + * Gets the text color of the guide text. + * + * @since 2.0 + * + * @return The guide text color, @n + * else RGBA (0,0,0,0) if an error occurs + * @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 SetGuideTextColor() + */ + Tizen::Graphics::Color GetGuideTextColor(void) const; + + /** + * Gets the text color of the title for the specified status. + * + * @since 2.0 + * + * @return The title text color, @n + * else RGBA (0,0,0,0) if an error occurs + * @param[in] status The state of the %ExpandableEditArea control + * @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 SetTitleTextColor() + */ + Tizen::Graphics::Color GetTitleTextColor(EditStatus status) const; + + /** + * Gets the color of the tokens for the specified status. + * + * @since 2.0 + * + * @return The token color, @n + * else RGBA (0,0,0,0) if an error occurs + * @param[in] status The status + * @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_SYSTEM A system error has occurred. + * @remarks The specific error code can be accessed using the GetLastResult() method. + * @see SetTokenColor + */ + Tizen::Graphics::Color GetTokenColor(ExpandableEditAreaTokenStatus status) const; + + /** + * Gets the text color of tokens. + * + * @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. + * @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. + * @see SetTokenTextColor() + */ + Tizen::Graphics::Color GetTokenTextColor(void) const; + + /** + * Gets the text color of tokens at the specified index. + * + * @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. + * @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. + * @see SetSelectedTokenTextColor() + */ + Tizen::Graphics::Color GetSelectedTokenTextColor(void) const; + + /** + * Sets the background bitmap of the %ExpandableEditArea control. + * + * @since 2.0 + * + * @return An error code + * @param[in] status The status + * @param[in] bitmap The background bitmap + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetBackgroundBitmap(EditStatus status, const Tizen::Graphics::Bitmap& bitmap); + + /** + * Sets the color of the %ExpandableEditArea control. + * + * @since 2.0 + * + * @return An error code + * @param[in] status The status of the %ExpandableEditArea control + * @param[in] color The color + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see GetColor() + */ + result SetColor(EditStatus status, const Tizen::Graphics::Color& color); + + /** + * Sets the text color of the guide text. + * + * @since 2.0 + * + * @return An error code + * @param[in] color The guide text color + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see GetGuideTextColor() + */ + result SetGuideTextColor(const Tizen::Graphics::Color& color); + + /** + * Sets the text color of the title for the specified status. + * + * @since 2.0 + * + * @return An error code + * @param[in] status The status of the %ExpandableEditArea control + * @param[in] color The title text color + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see GetTitleTextColor() + */ + result SetTitleTextColor(EditStatus status, const Tizen::Graphics::Color& color); + + /** + * Sets the text color of the %ExpandableEditArea control. + * + * @since 2.0 + * + * @return An error code + * @param[in] type The text type + * @param[in] color The text color + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see GetTextColor() + */ + result SetTextColor(EditTextColor type, const Tizen::Graphics::Color& color); + + /** + * Sets the text color of the tokens at the specified index. + * + * @since 2.0 + * + * @return An error code + * @param[in] color The token text color + * @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_SYSTEM A system error has occurred. + * @see GetSelectedTokenTextColor() + */ + result SetSelectedTokenTextColor(const Tizen::Graphics::Color& color); + + /** + * Sets the color of the tokens for the specified status. + * + * @since 2.0 + * + * @return An error code + * @param[in] status The status + * @param[in] color The token color + * @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_SYSTEM A system error has occurred. + * @see GetTokenColor() + */ + result SetTokenColor(ExpandableEditAreaTokenStatus status, const Tizen::Graphics::Color& color); + + /** + * Sets the text color of the tokens. + * + * @since 2.0 + * + * @return An error code + * @param[in] color The token text color + * @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_SYSTEM A system error has occurred. + * @see GetTokenTextColor() + */ + result SetTokenTextColor(const Tizen::Graphics::Color& color); + + /** + * @if OSPDEPREC + * Enables or disables the auto resizing if the candidate word list appears. + * + * @brief [Deprecated] + * @deprecated This method is deprecated because it is no longer necessary to handle the resizing of expandable edit area. + * @since 2.0 + * + * @return An error code + * @param[in] enable Set to @c true to enable the auto resizing, @n + * else @c false + * @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 current style of the %ExpandableEditArea does not support the operation. + * @remarks Note that when this option is enabled, the normal style %ExpandableEditArea is auto resized and the line added and removed events are + * 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 Controls::IExpandableEditAreaEventListener + * @endif + */ + result SetAutoResizingEnabled(bool enable); + + /** + * @if OSPDEPREC + * Checks whether the auto-resizing is enabled. + * + * @brief [Deprecated] + * @deprecated This method is deprecated because it is no longer necessary to handle the resizing of expandable edit area. + * @since 2.0 + * + * @return @c true if the auto-resizing is enabled, @n + * else @c false + * @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 current style of the %ExpandableEditArea control does not support the operation. + * @remarks The specific error code can be accessed using the GetLastResult() method. + * @see SetAutoResizingEnabled() + * @endif + */ + bool IsAutoResizingEnabled(void) const; + + /** + * Sets the input language. @n + * The %SetCurrentLanguage() method only works if the language to set is supported by the current preloaded keypad. + * + * @since 2.0 + * + * @brief [Deprecated] + * @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. + * @remarks The application can set the language of the current keypad that is associated with the current %ExpandableEditArea. + */ + result SetCurrentLanguage(Tizen::Locales::LanguageCode languageCode); + + /** + * Gets the current input language. + * + * @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 %ExpandableEditArea. + */ + result GetCurrentLanguage(Tizen::Locales::LanguageCode& language) const; + +// EVENT LISTENER MANAGEMENT + /** + * Adds the specified IExpandableEditAreaEventListener instance. @n + * The added listener can listen to events when a line is added or removed or when a button is pressed. + * + * @since 2.0 + * + * @param[in] listener The event listener to add + * @see RemoveExpandableEditAreaEventListener() + */ + void AddExpandableEditAreaEventListener(IExpandableEditAreaEventListener& listener); + + /** + * Adds the specified IKeypadEventListener instance. @n + * The added listener is notified if the keypad associated with the edit area is opened or closed. + * + * @since 2.0 + * + * @param[in] listener The event listener to add + * @see RemoveKeypadEventListener() + */ + void AddKeypadEventListener(Tizen::Ui::IKeypadEventListener& listener); + + /** + * Adds the specified ITextBlockEventListener instance. + * + * @since 2.0 + * + * @param[in] listener The event listener to add + * @remarks Programmatically modifying the text block does not cause the text block selection event to fire. + * @see RemoveTextBlockEventListener() + */ + void AddTextBlockEventListener(Tizen::Ui::ITextBlockEventListener& listener); + + /** + * Adds the specified ITextEventListener instance. @n + * The added listener can listen to the text-changed event. + * + * @since 2.0 + * + * @param[in] listener The listener to add + * @see RemoveTextEventListener() + */ + void AddTextEventListener(Tizen::Ui::ITextEventListener& listener); + + /** + * Removes the specified IExpandableEditAreaEventListener instance. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to remove + * @see AddExpandableEditAreaEventListener() + */ + void RemoveExpandableEditAreaEventListener(IExpandableEditAreaEventListener& listener); + + /** + * Removes the specified IKeypadEventListener listener. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to remove + * @see AddKeypadEventListener() + */ + void RemoveKeypadEventListener(Tizen::Ui::IKeypadEventListener& listener); + + /** + * Removes the specified ITextBlockEventListener listener. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to remove + * @see AddTextBlockEventListener() + */ + void RemoveTextBlockEventListener(Tizen::Ui::ITextBlockEventListener& listener); + + /** + * Removes the specified ITextEventListener instance. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The listener to remove + * @see AddTextEventListener() + */ + void RemoveTextEventListener(Tizen::Ui::ITextEventListener& listener); + + /** + * Adds a listener instance for language events. @n + * The added listener is notified when the input language is changed. + * + * @since 2.0 + * + * @param[in] listener The listener to add + * @remarks The application can recognize when the language is changed from the keypad by adding Tizen::Ui::ILanguageEventListener. + * @see RemoveLanguageEventListener() + */ + + void AddLanguageEventListener(Tizen::Ui::ILanguageEventListener& listener); + + /** + * Removes the specified listener instance. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The listener to remove + * @see AddLanguageEventListener() + */ + + void RemoveLanguageEventListener(Tizen::Ui::ILanguageEventListener& listener); + + /** + * Enables or disables the auto shrinking if the focus is lost. @n + * Note that when this option is enabled, the %ExpandableEditArea is auto shrinked if the %ExpandableEditArea lost its focus. + * + * @since 2.0 + * + * @param[in] enable Set to @c true to enable the auto shrinking, @n + * else @c false + * @see IsAutoShrinkModeEnabled() + */ + void SetAutoShrinkModeEnabled(bool enable); + + /** + * Checks whether the auto-shrinking is enabled. + * + * @since 2.0 + * + * @return @c true if the auto-shrinking is enabled, @n + * else @c false + * @see SetAutoShrinkModeEnabled() + */ + bool IsAutoShrinkModeEnabled(void) const; + + /** + * Sets the text filter. + * + * @since 2.1 + * + * @param[in] pFilter The filter to set + * @remarks The %ExpandableEditArea control checks with the registered filter to decide whether the user-entered text should be replaced or not. + */ + void SetEditTextFilter(IEditTextFilter* pFilter); + + /** + * Sends opaque command to the input method. + * + * @since 2.1 + * + * @param[in] command The opaque command to send + * @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); + +protected: + friend class _ExpandableEditAreaImpl; + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + ExpandableEditArea(const ExpandableEditArea& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + ExpandableEditArea& operator =(const ExpandableEditArea& rhs); +}; // ExpandableEditArea + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_EXPANDABLE_EDIT_AREA_H_ diff --git a/inc/FUiCtrlExpandableList.h b/inc/FUiCtrlExpandableList.h new file mode 100644 index 0000000..eff421c --- /dev/null +++ b/inc/FUiCtrlExpandableList.h @@ -0,0 +1,1237 @@ +// +// 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. +// + +/** + * @if OSPDEPREC + * @file FUiCtrlExpandableList.h + * @brief This is the header file for the %ExpandableList class. + * + * This header file contains the declarations of the %ExpandableList class and its helper classes. + * @endif + */ + +#ifndef _FUI_CTRL_EXPANDABLE_LIST_H_ +#define _FUI_CTRL_EXPANDABLE_LIST_H_ + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @if OSPDEPREC + * @class ExpandableList + * @brief [Deprecated] This class defines the common behavior of an %ExpandableList control. + * + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. @n + * @since 2.0 + * + * The %ExpandableList class defines the common behavior of an %ExpandableList control. + * An expandable list is a list with a hierarchy of depth 2. List items of %ExpandableList + * consist of main items and sub-items which are CustomListItem. Main items are inserted + * into the first level as items are inserted into List class. Sub-items are inserted under + * related main items. So, sub-items are uniquely identified with two indices: main item + * index and sub-item index. + * + * If an application wants to perform tasks when the state of a list item is changed, + * 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 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 + * must be deleted by the application. + * + * The following example demonstrates how to use the %ExpandableList class. + * + * Example: + * + * @image html ui_controls_expandablelist.png + * + * This is the simple UI application which uses an %ExpandableList control. + * + * @code +//Sample code for ExpandableListSample.h +#include + +class ExpandableListSample + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::IExpandableItemEventListener +{ +public: + ExpandableListSample(void) + : __pMainItemFormat(null) + , __pSubItemFormat(null){} + + bool Initialize(void); + result AddListMainItem(Tizen::Ui::Controls::ExpandableList& expandableList, Tizen::Base::String itemText, + Tizen::Graphics::Bitmap* pBitmapNormal, Tizen::Graphics::Bitmap* pBitmapFocused); + result AddListSubItem(Tizen::Ui::Controls::ExpandableList& expandableList, int itemId, Tizen::Base::String itemText); + + virtual result OnInitializing(void); + virtual result OnTerminating(void); + + // IExpandableItemEventListener + virtual void OnItemStateChanged(const Control& source, int mainIndex, int subIndex, int itemId, Tizen::Ui::ItemStatus status); + virtual void OnItemStateChanged(const Control& source, int mainIndex, int subIndex, int itemId, int elementId, Tizen::Ui::ItemStatus status); + + + +private: + static const int ID_LIST_MAINITEM = 101; + static const int ID_LIST_SUBITEM = 102; + static const int ID_LIST_TEXT = 103; + static const int ID_LIST_BITMAP = 104; + + Tizen::Ui::Controls::CustomListItemFormat* __pMainItemFormat; + Tizen::Ui::Controls::CustomListItemFormat* __pSubItemFormat; +}; + * @endcode + * + * @code +//Sample code for ExpandableListSample.cpp +#include +#include + +#include "ExpandableListSample.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Graphics; + +bool +ExpandableListSample::Initialize(void) +{ + Construct(FORM_STYLE_NORMAL); + return true; +} + +result +ExpandableListSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + // Creates an instance of ExpandableList + ExpandableList* pExpandableList = new ExpandableList(); + pExpandableList->Construct(Rectangle(0, 0, 480, 500), CUSTOM_LIST_STYLE_NORMAL); + pExpandableList->AddExpandableItemEventListener(*this); + + // Creates an instance of CustomListItemFormat of the main item + __pMainItemFormat = new CustomListItemFormat(); + __pMainItemFormat->Construct(); + __pMainItemFormat->AddElement(ID_LIST_TEXT, Rectangle(10, 25, 200, 80)); + __pMainItemFormat->AddElement(ID_LIST_BITMAP, Rectangle(220, 10, 70, 80)); + + // Creates an instance of CustomListItemFormat of the sub item + __pSubItemFormat = new CustomListItemFormat(); + __pSubItemFormat->Construct(); + __pSubItemFormat->AddElement(ID_LIST_TEXT, Rectangle(20, 25, 450, 50)); + + // Gets instances of Bitmap + AppResource *pAppResource = Application::GetInstance()->GetAppResource(); + Bitmap *pBitmapNormal = pAppResource->GetBitmapN(L"tizen.png"); + Bitmap *pBitmapFocused = pAppResource->GetBitmapN(L"tizen.png"); + + // Adds the main item + AddListMainItem(*pExpandableList, L"MainItem", pBitmapNormal, pBitmapFocused); + + // Adds the sub item + AddListSubItem(*pExpandableList, ID_LIST_MAINITEM, L"SubItem"); + + // Adds the expandable list to the form + AddControl(pExpandableList); + + // Deallocates bitmaps + delete pBitmapNormal; + delete pBitmapFocused; + + return r; +} + +result +ExpandableListSample::OnTerminating(void) +{ + result r = E_SUCCESS; + + // Deallocates item formats + delete __pMainItemFormat; + delete __pSubItemFormat; + + return r; +} + +result +ExpandableListSample::AddListMainItem(ExpandableList& expandableList, String itemText, Bitmap* pBitmapNormal, Bitmap* pBitmapFocused) +{ + result r = E_SUCCESS; + + // Creates a main instance of CustomListItem of the expandable list + CustomListItem* pMainItem = new CustomListItem(); + pMainItem->Construct(100); + pMainItem->SetItemFormat(*__pMainItemFormat); + pMainItem->SetElement(ID_LIST_TEXT, itemText); + pMainItem->SetElement(ID_LIST_BITMAP, *pBitmapNormal, pBitmapFocused); + + // Adds the item to the expandable list + expandableList.AddItem(*pMainItem, ID_LIST_MAINITEM); + + return r; +} + +result +ExpandableListSample::AddListSubItem(ExpandableList& expandableList, int itemId, String itemText) +{ + result r = E_SUCCESS; + + // Creates a sub instance of CustomListItem of the expandable list + CustomListItem* pSubItem = new CustomListItem(); + pSubItem->Construct(100); + pSubItem->SetItemFormat(*__pSubItemFormat); + pSubItem->SetElement(ID_LIST_TEXT, itemText); + + // Adds the item to the expandable list + expandableList.AddSubItem(expandableList.GetItemIndexFromItemId(ID_LIST_MAINITEM), *pSubItem, ID_LIST_SUBITEM); + + return r; +} + +// IExpandableItemEventListener implementation +void +ExpandableListSample::OnItemStateChanged(const Control& source, int mainIndex, int subIndex, int itemId, ItemStatus status) +{ + switch (itemId) + { + case ID_LIST_MAINITEM: + { + // .... + } + break; + case ID_LIST_SUBITEM: + { + // .... + } + break; + default: + break; + } +} + +void +ExpandableListSample::OnItemStateChanged(const Control& source, int mainIndex, int subIndex, int itemId, int elementId, ItemStatus status) +{ + switch (itemId) + { + case ID_LIST_MAINITEM: + { + switch (elementId) + { + case ID_LIST_TEXT: + { + // .... + } + break; + case ID_LIST_BITMAP: + { + // .... + } + break; + default: + break; + } + } + break; + case ID_LIST_SUBITEM: + { + switch (elementId) + { + case ID_LIST_TEXT: + { + // .... + } + break; + case ID_LIST_BITMAP: + { + // .... + } + break; + default: + break; + } + } + break; + default: + break; + } +} + * @endcode + * @endif + */ +class _OSP_EXPORT_ ExpandableList + : public Tizen::Ui::Control +{ +public: + /** + * @if OSPDEPREC + * The object is not fully constructed after this constructor is called. @n + * For full construction, the ExpandableList::Construct() method must be called right after calling this constructor. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * @endif + */ + ExpandableList(void); + + /** + * @if OSPDEPREC + * 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. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * @endif + */ + virtual ~ExpandableList(void); + + /** + * @if OSPDEPREC + * Initializes this instance of %ExpandableList with the specified parameters. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @return An error code + * @param[in] rect The x, y position of the top-left corner of the %ExpandableList along with the width and the height of the control + * @param[in] style The style set + * @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_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. @n + * The minimum size of this control is 92 x 72 on a WVGA screen, 60 x 48 on a HVGA screen and 46 x 36 on a WQVGA screen. + * @endif + */ + result Construct(const Tizen::Graphics::Rectangle& rect, CustomListStyle style, bool itemDivider = true); + + /** + * @if OSPDEPREC + * Adds an ExpandableItemEventListener instance. @n + * The added listener gets notified when the state of an item is changed. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @param[in] listener The event listener to add + * @endif + */ + void AddExpandableItemEventListener(Tizen::Ui::IExpandableItemEventListener& listener); + + /** + * @if OSPDEPREC + * Removes an ExpandableItemEventListener instance. @n + * The removed listener is not notified even when the expandable item events are fired. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @param[in] listener The event listener to remove + * @endif + */ + void RemoveExpandableItemEventListener(Tizen::Ui::IExpandableItemEventListener& listener); + + /** + * @if OSPDEPREC + * Adds the specified item to the %ExpandableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @return An error code + * @param[in] item The CustomListItem to add + * @param[in] itemId The item ID for the item + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @remarks + * - The item ID can be used to identify the specific %CustomListItem instance or to associate the user-allocated resources. + * - Note that %ExpandableList does not throw an exception, if the same item ID is given to multiple items. + * - The added item is deleted automatically when the list is destroyed. + * - Do not add, insert, or set an item which already belongs to the %ExpandableList. + * @endif + */ + result AddItem(const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID); + + /** + * @if OSPDEPREC + * Inserts the specified item to the %ExpandableList control at the specified index. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @return An error code + * @param[in] mainIndex The index at which to insert the item + * @param[in] item The CustomListItem instance to insert + * @param[in] itemId The item ID for the item + * @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. + * - Do not add, insert, or set an item that already belongs to the %ExpandableList control. + * @endif + */ + result InsertItemAt(int mainIndex, const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID); + + /** + * @if OSPDEPREC + * Changes the contents of the item at the specified index in the %ExpandableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @return An error code + * @param[in] mainIndex The index at which to set the contents of the item + * @param[in] item The CustomListItem instance to set + * @param[in] itemId The item ID for the item + * @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 Do not add, insert, or set an item that already belongs to the %ExpandableList control. + * @endif + */ + result SetItemAt(int mainIndex, const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID); + + /** + * @if OSPDEPREC + * Removes the item at the specified index in the %ExpandableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @return An error code + * @param[in] mainIndex The index of the item to delete + * @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 removed list item is deleted from the memory. + * @endif + */ + result RemoveItemAt(int mainIndex); + + /** + * @if OSPDEPREC + * Removes all the items from the %ExpandableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @return An error code + * @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. + * @endif + */ + result RemoveAllItems(void); + + /** + * @if OSPDEPREC + * Gets the item at the specified index in the %ExpandableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @return A CustomListItem instance, @n + * else @c null if the specified index is out of range + * @param[in] mainIndex The index of the item + * @endif + */ + const CustomListItem* GetItemAt(int mainIndex) const; + + /** + * @if OSPDEPREC + * Adds the specified sub-item to the main item in the %ExpandableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @return An error code + * @param[in] mainIndex The index of the main item to which the sub-item is added + * @param[in] item The CustomListItem instance to add + * @param[in] itemId The item ID for the sub-item + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified index is less than @c 0, or greater than the item count. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result AddSubItem(int mainIndex, const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID); + + /** + * @if OSPDEPREC + * Inserts the specified sub-item at the specified index to the main item in the %ExpandableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @return An error code + * @param[in] mainIndex The index of the main item to which the sub-item is added + * @param[in] subIndex The index of the sub-item at which to insert the item + * @param[in] item The CustomListItem instance to insert + * @param[in] itemId The item ID + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified index is less than @c 0, or greater than the item count. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result InsertSubItemAt(int mainIndex, int subIndex, const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID); + + /** + * @if OSPDEPREC + * Changes the contents of the sub-item at the specified index in the %ExpandableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @return An error code + * @param[in] mainIndex The main index of the sub-item at which to set the contents of the item + * @param[in] subIndex The sub-index of the sub-item at which to set the contents of the item + * @param[in] item The CustomListItem instance to set + * @param[in] itemId The item ID + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified index is less than @c 0, or greater than the item count. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result SetSubItemAt(int mainIndex, int subIndex, const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID); + + /** + * @if OSPDEPREC + * Removes the sub-item at the specified index in the %ExpandableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @return An error code + * @param[in] mainIndex The index of the main item which the sub-item belongs to + * @param[in] subIndex The index of the sub-item to delete in the main item + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified index is less than @c 0, or greater than the item count. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result RemoveSubItemAt(int mainIndex, int subIndex); + + /** + * @if OSPDEPREC + * Removes all sub-items of the specified main item in the %ExpandableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @return An error code + * @param[in] mainIndex The index of the main item of the %ExpandableList control + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified index is less than @c 0, or greater than or equal to the item count. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result RemoveAllSubItemsAt(int mainIndex); + + /** + * @if OSPDEPREC + * Gets the number of items in the %ExpandableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @return The number of items in %ExpandableList, @n + * else @c -1 if an error occurs + * @endif + */ + int GetItemCount(void) const; + + /** + * @if OSPDEPREC + * Gets the number of sub-items in the main item. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @return The number of sub-items in the main item, @n + * else @c -1 if an error occurs + * @param[in] mainIndex The index of the main item + * @endif + */ + int GetSubItemCount(int mainIndex) const; + + /** + * @if OSPDEPREC + * Gets the sub-item at the specified index. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @return A pointer to the CustomListItem instance at the specified index, @n + * else @c null if the specified index does not exist in the %ExpandableList control + * @param[in] mainIndex The index of the main item which the sub-item belongs to + * @param[in] subIndex The index of the sub-item to get in the main index + * @endif + */ + const CustomListItem* GetSubItemAt(int mainIndex, int subIndex) const; + + /** + * @if OSPDEPREC + * Gets the first item of all the checked main items in the %ExpandableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @return The index of the first checked item, @n + * else @c -1 if no main item is checked + * @endif + */ + int GetFirstCheckedItemIndex(void) const; + + /** + * @if OSPDEPREC + * Gets the item ID of the specified main item. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @return The item ID of the main item, @n + * else @c -1 if the specified @c mainIndex is less than @c 0 or greater than the main item count + * @param[in] mainIndex The index of the main item + * @endif + */ + int GetItemIdAt(int mainIndex) const; + + /** + * @if OSPDEPREC + * Gets the index of the specified main item. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @return The index of the main item, @n + * else @c -1 if no main item has the specified item ID + * @param[in] itemId The item ID + * @remarks A main item can have the same item ID and this method returns the first main item among such items. + * @endif + */ + int GetItemIndexFromItemId(int itemId) const; + + /** + * @if OSPDEPREC + * Gets the item ID of the specified sub-item. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @return The item ID of the specified sub-item, @n + * else @c -1 if the specified sub-item does not exist + * @param[in] mainIndex The index of the main item, which the sub-item belongs to + * @param[in] subIndex The index of the sub-item + * @endif + */ + int GetSubItemIdAt(int mainIndex, int subIndex) const; + + /** + * @if OSPDEPREC + * Expands or shrinks the specified main item. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @return An error code + * @param[in] mainIndex The index of the main item + * @param[in] expand Set to @c true to expand the specified main item, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified @c mainIndex is less than @c 0, or greater than the main item count. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result SetItemExpanded(int mainIndex, bool expand); + + /** + * @if OSPDEPREC + * Checks whether the main item is expanded. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @return @c true if the main item is expanded, @n + * else @c false + * @param[in] mainIndex The index of the main item + * @endif + */ + bool IsItemExpanded(int mainIndex) const; + + /** + * @if OSPDEPREC + * Enables or disables the status of the main item at the specified index of the %ExpandableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @return An error code + * @param[in] mainIndex The index of the main item, for which the status is set + * @param[in] enable Set to @c true to enable the main item, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified @c mainIndex is less than @c 0, or no less than the main item count. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result SetItemEnabled(int mainIndex, bool enable); + + /** + * @if OSPDEPREC + * Checks whether the main item at the specified index in the %ExpandableList control is enabled. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @return @c true if the main item is enabled, @n + * else @c false + * @param[in] mainIndex The index of the main item to check + * @endif + */ + bool IsItemEnabled(int mainIndex) const; + + /** + * @if OSPDEPREC + * Sets the enabled status of the specific sub-item. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @return An error code + * @param[in] mainIndex The index of the main item which the sub-item belongs to + * @param[in] subIndex The index of the sub-item in the main item + * @param[in] enable Set to @c true to enable the sub-item, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The sub-item at the specified index does not exist. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result SetSubItemEnabled(int mainIndex, int subIndex, bool enable); + + /** + * @if OSPDEPREC + * Checks whether the specified sub-item is enabled. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @return @c true if the specified sub-item is enabled, @n + * else @c false + * @param[in] mainIndex The index of the main item which the sub-item belongs to + * @param[in] subIndex The index of the sub-item in the main item + * @endif + */ + bool IsSubItemEnabled(int mainIndex, int subIndex) const; + + /** + * @if OSPDEPREC + * Sets the check status of the main item at the specified index. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @return An error code + * @param[in] mainIndex The index of the main item + * @param[in] check Set to @c true to check the main item, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified @c mainIndex is less than @c 0, or no less than the main item count. + * @exception E_SYSTEM A system error has occurred. + * @remarks This method can only be used when the style of the list allows selection. + * @endif + */ + result SetItemChecked(int mainIndex, bool check); + + /** + * @if OSPDEPREC + * Checks whether the status of the main item at the specified index is checked. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @return @c true if the main item is checked, @n + * else @c false + * @param[in] mainIndex The index of the main item + * @remarks This method can only be used when the style of the list allows selection. + * @endif + */ + bool IsItemChecked(int mainIndex) const; + + + /** + * @if OSPDEPREC + * Sets the check status of the specified sub-item of the %ExpandableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @return An error code + * @param[in] mainIndex The index of the main item which the sub-item belongs to + * @param[in] subIndex The index of the sub-item in the main index + * @param[in] check Set to @c true to check the sub-item, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The sub-item at the specified index does not exist. + * @exception E_SYSTEM A system error has occurred. + * @remarks This method can only be used when the style of the list allows selection. + * @endif + */ + result SetSubItemChecked(int mainIndex, int subIndex, bool check); + + /** + * @if OSPDEPREC + * Checks whether the specified sub-item is checked. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @return @c true if the sub-item is checked, @n + * else @c false + * @param[in] mainIndex The index of the main item which the sub-item belongs to + * @param[in] subIndex The index of the sub-item in the main item + * @remarks This method can only be used when the style of the list allows selection. + * @endif + */ + bool IsSubItemChecked(int mainIndex, int subIndex) const; + + /** + * @if OSPDEPREC + * Sets the check status of all sub-items of the specified main item. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @return An error code + * @param[in] mainIndex The index of the main item + * @param[in] check Set to @c true to check the items, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified @c mainIndex is less than @c 0, or greater than the main item count. + * @exception E_SYSTEM A system error has occurred. + * @remarks This method can only be used when the style of the list allows multiple selections. + * @endif + */ + result SetAllSubItemsChecked(int mainIndex, bool check); + + /** + * @if OSPDEPREC + * Removes all the checked sub-items of the specified main item. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @return An error code + * @param[in] mainIndex The index of the main item + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified @c mainIndex is less than @c 0, or not less than the main item count. + * @exception E_SYSTEM A system error has occurred. + * @remarks This method can only be used when the style of the list allows multiple selections. + * @endif + */ + result RemoveAllCheckedSubItemsAt(int mainIndex); + + /** + * @if OSPDEPREC + * Gets the first sub-item of all the checked sub-items in the main item. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @return The index of the first checked sub-item, @n + * else @c -1 if no sub-item is checked, or the specified main item does not exist + * @endif + */ + int GetFirstCheckedSubItemIndex(int mainIndex) const; + + /** + * @if OSPDEPREC + * Gets the last item of all the checked main items in the %ExpandableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @return The index of the last checked item, @n + * else @c -1 if no main item is checked + * @endif + */ + int GetLastCheckedItemIndex(void) const; + + /** + * @if OSPDEPREC + * Gets the last sub-item of all the checked sub-items in the main item. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @return The index of the last checked sub-item, @n + * else @c -1 if no sub-item is checked or the specified main item does not exist + * @endif + */ + int GetLastCheckedSubItemIndex(int mainIndex) const; + + /** + * @if OSPDEPREC + * Gets the next checked main item from the specified index in the %ExpandableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @return The index of the next checked main item, @n + * else @c -1 if no more main item after the specified index is checked, or the specified main item does not exist + * @param[in] mainIndex The index of the main item + * @endif + */ + int GetNextCheckedItemIndexAfter(int mainIndex) const; + + /** + * @if OSPDEPREC + * Gets the next checked sub-item from the specified index in the main item. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @return The index of the next checked sub-item, @n + * else @c -1 if no more sub-item after the specified index is checked, or the specified sub-item does not exist + * @param[in] mainIndex The index of the main item, that the sub-item belongs to + * @param[in] subIndex The index of the sub-item in the main item + * @endif + */ + int GetNextCheckedSubItemIndexAfter(int mainIndex, int subIndex) const; + + /** + * @if OSPDEPREC + * Gets the index of the sub-item with the specified @c itemId. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @return An error code + * @param[in] itemId The item ID + * @param[out] mainIndex The index of the main item which the sub-item belongs to + * @param[out] subIndex The index of the sub-item + * @exception E_SUCCESS The method is successful. + * @exception E_OBJ_NOT_FOUND The specified item is not found. + * @remarks Note that one or more sub-items can have the same item ID. This method returns the first sub-item among such sub-items. + * @endif + */ + result GetSubItemIndexFromItemId(int itemId, int& mainIndex, int& subIndex) const; + + /** + * @if OSPDEPREC + * Gets the index of the item at the specified position. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @return An error code + * @param[in] x The x position of the point + * @param[in] y The y position of the point + * @param[out] mainIndex The index of the main item which the sub-item belongs to + * @param[out] subIndex The index of the sub-item + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result GetItemIndexFromPosition(int x, int y, int& mainIndex, int& subIndex) const; + + /** + * @if OSPDEPREC + * Gets the index of the item at the specified position. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @return An error code + * @param[in] position The position of the point + * @param[out] mainIndex The index of the main item which the sub-item belongs to + * @param[out] subIndex The index of the sub-item + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result GetItemIndexFromPosition(const Tizen::Graphics::Point& position, int& mainIndex, int& subIndex) const; + + /** + * @if OSPDEPREC + * Gets the index of the first item of the visible items in the %ExpandableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @return An error code + * @param[out] mainIndex The main index of the top drawn item + * @param[out] subIndex The sub-index of the top drawn item + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @remarks + * - @c mainIndex is @c -1 if no item is visible. + * - @c subIndex is @c -1 if the top item drawn is a main item. + * @endif + */ + result GetTopDrawnItemIndex(int& mainIndex, int& subIndex) const; + + + /** + * @if OSPDEPREC + * Gets the index of the last of the visible items in the %ExpandableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @return An error code + * @param[out] mainIndex The main index of the bottom drawn item + * @param[out] subIndex The sub-index of the bottom drawn item + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @remarks + * - @c mainIndex is @c -1 if no item is visible. + * - @c subIndex is @c -1 if the bottom item drawn is a main item. + * @endif + */ + result GetBottomDrawnItemIndex(int& mainIndex, int& subIndex) const; + + + /** + * @if OSPDEPREC + * Sets the background color of this control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @param[in] color The background color + * @endif + */ + void SetBackgroundColor(const Tizen::Graphics::Color& color); + + /** + * @if OSPDEPREC + * Sets the text to display when there is no item in the %ExpandableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @param[in] text The text message to display + * @endif + */ + void SetTextOfEmptyList(const Tizen::Base::String& text); + + /** + * @if OSPDEPREC + * Sets the color of the text to be displayed when there is no item in the %ExpandableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @param[in] color The color of the text to display + * @endif + */ + void SetTextColorOfEmptyList(const Tizen::Graphics::Color& color); + + /** + * @if OSPDEPREC + * Gets the color of the text to be displayed when there is no item in the %ExpandableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @return The color of the text to be displayed + * @endif + */ + Tizen::Graphics::Color GetTextColorOfEmptyList(void) const; + + + /** + * @if OSPDEPREC + * Scrolls to the bottom of the %ExpandableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * @endif + */ + void ScrollToBottom(void); + + /** + * @if OSPDEPREC + * Scrolls to the top of the %ExpandableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * @endif + */ + void ScrollToTop(void); + + /** + * @if OSPDEPREC + * Scrolls to the item at the specified index. @n + * The specified item is drawn at the top of the %ExpandableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @return An error code + * @param[in] mainIndex The index of the main item + * @param[in] subIndex The index of the sub-item + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @exception E_INVALID_ARG The specified item does not exist. + * @endif + */ + result ScrollToTop(int mainIndex, int subIndex); + + /** + * @if OSPDEPREC + * Scrolls to the main item at the specified index. @n + * The specified main item is drawn at the top of the %ExpandableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @return An error code + * @param[in] mainIndex The index of the main item + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @exception E_INVALID_ARG The specified @c mainIndex is less than @c 0, or not less than the main item count. + * @endif + */ + result ScrollToTop(int mainIndex); + + /** + * @if OSPDEPREC + * Draws and shows the item at the specified index in the %ExpandableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @return An error code + * @param[in] mainIndex The index of the main item + * @param[in] subIndex The index of the sub-item + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @exception E_INVALID_OPERATION The item has never been drawn before calling this method. + * @exception E_INVALID_ARG The specified item does not exist. + * @endif + */ + result RefreshSubItem(int mainIndex, int subIndex); + + /** + * @if OSPDEPREC + * Draws and shows the main item at the specified index in the %ExpandableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedTableView class. + * @since 2.0 + * + * @return An error code + * @param[in] mainIndex The index of the main item + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @exception E_INVALID_OPERATION The item has never been drawn before calling this method. + * @exception E_INVALID_ARG The specified @c mainIndex is invalid. + * @endif + */ + result RefreshItem(int mainIndex); + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + ExpandableList(const ExpandableList& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + ExpandableList& operator =(const ExpandableList& rhs); + + friend class _ExpandableListImpl; +}; //ExpandableList + +}}} // Tizen::Ui::Controls +#endif // _FUI_CTRL_EXPANDABLE_LIST_H_ diff --git a/inc/FUiCtrlFooter.h b/inc/FUiCtrlFooter.h new file mode 100644 index 0000000..8f09c79 --- /dev/null +++ b/inc/FUiCtrlFooter.h @@ -0,0 +1,853 @@ +// +// 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 FUiCtrlFooter.h + * @brief This is the header file for the %Footer class. + * + * This header file contains the declarations of the %Footer class. + */ + +#ifndef _FUI_CTRL_FOOTER_H_ +#define _FUI_CTRL_FOOTER_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +namespace Tizen { namespace Ui { namespace Controls +{ +class _FooterImpl; +/** + * @enum FooterStyle + * + * Defines the possible styles of a %Footer control. + * + * @since 2.0 + */ +enum FooterStyle +{ + FOOTER_STYLE_BUTTON_TEXT, /**< The text button style */ + FOOTER_STYLE_BUTTON_ICON, /**< The icon button style */ + FOOTER_STYLE_BUTTON_ICON_TEXT, /**< The icon and text button style */ + FOOTER_STYLE_SEGMENTED_TEXT, /**< The text segmented style */ + FOOTER_STYLE_SEGMENTED_ICON, /**< The icon segmented style */ + FOOTER_STYLE_SEGMENTED_ICON_TEXT, /**< The icon and text segmented style */ + FOOTER_STYLE_TAB, /**< The tab style */ + FOOTER_STYLE_TAB_LARGE /**< The large tab style @b Since: @b 2.2 */ +}; + +/** + * @class Footer + * @brief This class is an implementation of a %Footer control. + * + * @since 2.0 + * + * 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. + * + * 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. + * + * @code + * // Initializes + * bool + * TestForm::Initialize(void) + * { + * Construct(FORM_STYLE_NORMAL | FORM_STYLE_PORTRAIT_INDICATOR | FORM_STYLE_FOOTER); + * } + * @endcode + * + * - Using the footer + * Gets the footer with the GetFooter() method, and sets the footer style + * + * @code + * bool + * TestForm::Initialize(void) + * { + * Footer* pFooter = GetFooter(); + * pFooter->SetStyle(FOOTER_STYLE_SEGMENTED_TEXT); + * } + * @endcode + * + * - Adding items to the footer: + * Adds FooterItems or ButtonItems according to the footer style. The action ID registered in the Construct() method is notified + * when items are touched. + * + * @code + * bool + * TestForm::Initialize(void) + * { + * FooterItem footerItem; + * footerItem.Construct(ID_FOOTER_ITEM); + * footerItem.SetText("FooterItem"); + * + * pFooter->AddItem(footerItem); + * + * ButtonItem buttonItem; + * buttonItem.Construct(BUTTON_ITEM_STYLE_ICON, ID_HEADER_BUTTON); + * buttonItem.SetIcon(BUTTON_ITEM_STATUS_NORMAL, __pBitmap); + * + * pFooter->SetButton(BUTTON_POSITION_LEFT, buttonItem); + * + * } + * @endcode + * + */ +class _OSP_EXPORT_ Footer + : public Tizen::Ui::Control +{ +public: + /** + * Adds the specified footer item. + * + * @since 2.0 + * + * @return An error code + * @param[in] item The footer item to add + * @exception E_SUCCESS The method is successful. + * @exception E_MAX_EXCEEDED The number of items has exceeded the maximum limit. + * @exception E_INVALID_ARG A specified input parameter is invalid. @n + * The specified item is not constructed. + * @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. + * - Depending on the style of the %Footer control, several types of items can be added or inserted. + */ + result AddItem(const FooterItem& item); + + + /** + * Inserts the footer item at the specified index. + * + * @since 2.0 + * + * @return An error code + * @param[in] itemIndex The index where the item must be inserted + * @param[in] item The footer item object to insert + * @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. @n + * The index is greater than or equal to the number of elements or less than @c 0. + * @exception E_INVALID_ARG A specified input parameter is invalid. @n + * The specified item is not constructed. + * @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. + * - Depending on the style of the %Footer control, several types of items can be added or inserted. + */ + result InsertItemAt(int itemIndex, const FooterItem& item); + + + /** + * Checks whether a button item is set at the specified position. + * + * @since 2.0 + * + * @return @c true if the button item is set at the specified position, @n + * else @c false + * @param[in] position The position of the button item + * @exception E_SUCCESS The method is successful. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + bool IsButtonSet(ButtonPosition position) const; + + + /** + * Checks whether the back button item is set. + * + * @brief [Deprecated] + * @deprecated This method is deprecated because hardware back key is mandatory for Tizen mobile devices. @n + * This method is not guaranteed to work properly. + * @since 2.0 + * + * @return @c true if the back button item is set, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + bool IsBackButtonSet(void) const; + + + /** + * Checks whether the tab edit mode is enabled. + * + * @since 2.0 + * + * @return @c true if the tab edit mode is set, @n + * else @c false + * @exception E_SUCCESS The method is successful. + */ + bool IsTabEditModeEnabled(void) const; + + + /** + * Gets the color of the button item for the specified state. + * + * @since 2.0 + * + * @return The color of the button item, @n + * else RGBA (0,0,0,0) if an error occurs + * @param[in] status The status of the button item + * @exception E_SUCCESS The method is successful. + * @remarks The specific error code can be accessed using the GetLastResult() method. + * @see SetButtonColor() + */ + Tizen::Graphics::Color GetButtonColor(ButtonItemStatus status) const; + + + /** + * Gets the text color of the button item for the specified state. + * + * @since 2.0 + * + * @return The text color of the button item, @n + * else RGBA (0,0,0,0) if an error occurs + * @param[in] status The status of the button item + * @exception E_SUCCESS The method is successful. + * @remarks The specific error code can be accessed using the GetLastResult() method. + * @see SetButtonTextColor() + */ + Tizen::Graphics::Color GetButtonTextColor(ButtonItemStatus status) const; + + + /** + * Gets the state of the specified button item. + * + * @since 2.0 + * + * @return The state of the button item at the specified position + * @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. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + ButtonItemStatus GetButtonStatus(ButtonPosition position) const; + + + /** + * Gets the state of the back button. + * + * @brief [Deprecated] + * @deprecated This method is deprecated because hardware back key is mandatory for Tizen mobile devices. @n + * This method is not guaranteed to work properly. + * @since 2.0 + * + * @return The state of the back button, @n + * else @c BUTTON_ITEM_STATUS_NORMAL if an error occurs. + * @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 back button is not set. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + ButtonItemStatus GetBackButtonStatus(void) const; + + + /** + * Gets the color of the footer item for the specified item state. + * + * @since 2.0 + * + * @return The color of the item, @n + * else RGBA (0,0,0,0) if an error occurs + * @param[in] status The item status + * @exception E_SUCCESS The method is successful. + * @remarks The specific error code can be accessed using the GetLastResult() method. + * @see SetItemColor() + */ + Tizen::Graphics::Color GetItemColor(FooterItemStatus status) const; + + + /** + * Gets the number of footer items. + * + * @since 2.0 + * + * @return The number of footer items, @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. + */ + int GetItemCount(void) const; + + + /** + * Gets the state of the specified footer item. + * + * @since 2.0 + * + * @return An error code + * @param[in] itemIndex The index of the item + * @param[out] status The state of the item at the specified index + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure. @n + * The index is greater than or equal to the number of elements or less than zero. + */ + result GetItemStatus(int itemIndex, FooterItemStatus& status) const; + + + /** + * Gets the text color of the footer item for the specified item state. + * + * @since 2.0 + * + * @return The text color of the item, @n + * else RGBA (0,0,0,0) if an error occurs + * @param[in] status The item status + * @exception E_SUCCESS The method is successful. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + Tizen::Graphics::Color GetItemTextColor(FooterItemStatus status) const; + + + /** + * Gets the style of the %Footer control. + * + * @since 2.0 + * + * @return The footer style, @n + * else @c FOOTER_STYLE_BUTTON_TEXT if an error occurs + * @exception E_SUCCESS The method is successful. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + FooterStyle GetStyle(void) const; + + + /** + * Gets the index of the currently selected item. + * + * @since 2.0 + * + * @return The selected item index,@n + * else @c -1 if an error occurs + * @exception E_SUCCESS The method is successful. + * @exception E_UNSUPPORTED_OPERATION The operation is not supported when the style of the %Footer control is + * ::FOOTER_STYLE_BUTTON_TEXT, ::FOOTER_STYLE_BUTTON_ICON + * or ::FOOTER_STYLE_BUTTON_ICON_TEXT. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + int GetSelectedItemIndex(void) const; + + + /** + * Gets the color of the footer. + * + * @since 2.0 + * + * @return The 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. + */ + Tizen::Graphics::Color GetColor(void) const; + + + /** + * Removes all the button items with the back button. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result RemoveAllButtons(void); + + + /** + * Removes the button item at the specified position. + * + * @since 2.0 + * + * @return An error code + * @param[in] position The position of the button item to remove + * @exception E_SUCCESS Either the method is successful or no button item is set at the specified position. + * @exception E_SYSTEM A system error has occurred. + */ + result RemoveButtonAt(ButtonPosition position); + + + /** + * Removes the back button item. + * + * @brief [Deprecated] + * @deprecated This method is deprecated because hardware back key is mandatory for Tizen mobile devices. @n + * This method is not guaranteed to work properly. + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM This exception exists only for historical reason. + * @remarks This method always returns E_SUCCESS. + */ + result RemoveBackButton(void); + + + /** + * Removes all the footer items except for the left, right, and back button items. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result RemoveAllItems(void); + + + /** + * Removes the item at the specified index. + * + * @since 2.0 + * + * @return An error code + * @param[in] itemIndex The index of the item to remove + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure. @n + * The index is greater than or equal to the number of elements or less than @c 0. + * @exception E_SYSTEM A system error has occurred. + */ + result RemoveItemAt(int itemIndex); + + + /** + * Sets the background bitmap image. + * + * @since 2.0 + * + * @return An error code + * @param[in] pBitmap The background image + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetBackgroundBitmap(const Tizen::Graphics::Bitmap* pBitmap); + + + /** + * Sets the button item at the specified position. + * + * @since 2.0 + * + * @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. + * @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_SYSTEM A system error has occurred. + */ + result SetButton(ButtonPosition position, const ButtonItem& button); + + + /** + * Sets the button item color for the specified state. + * + * @since 2.0 + * + * @return An error code + * @param[in] status The status of the button item + * @param[in] color The button item color to set + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see GetButtonColor() + */ + result SetButtonColor(ButtonItemStatus status, const Tizen::Graphics::Color& color); + + + /** + * Enables or disables the button item at the specified position. + * + * @since 2.0 + * + * @return An error code + * @param[in] position The button item position + * @param[in] enable Set to @c true to enable the specified button item, @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 + * There is no button set at the specified position. + * @exception E_SYSTEM A system error has occurred. + */ + result SetButtonEnabled(ButtonPosition position, bool enable); + + + /** + * Enables or disables the back button. + * + * @brief [Deprecated] + * @deprecated This method is deprecated because hardware back key is mandatory for Tizen mobile devices. @n + * This method is not guaranteed to work properly. + * @since 2.0 + * + * @return An error code + * @param[in] enable Set to @c true to enable the back button, @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 + * The back button item is not set. + */ + result SetBackButtonEnabled(bool enable); + + + /** + * Sets the button item text color for the specified state. + * + * @since 2.0 + * + * @return An error code + * @param[in] status The status of the button item + * @param[in] color The button item text color to set + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see GetButtonTextColor() + */ + result SetButtonTextColor(ButtonItemStatus status, const Tizen::Graphics::Color& color); + + /** + * Sets the badge icon of the specified ButtonItem. + * + * @since 2.0 + * + * @return An error code + * @param[in] position The button item position + * @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 %Footer control is ::FOOTER_STYLE_TAB or ::FOOTER_STYLE_TAB_LARGE. + */ + result SetButtonBadgeIcon(ButtonPosition position, const Tizen::Graphics::Bitmap* pBadgeIcon); + + + /** + * Sets the numbered badge icon of the specified ButtonItem. + * + * @since 2.0 + * + * @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. + * @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 %Footer control is ::FOOTER_STYLE_TAB or ::FOOTER_STYLE_TAB_LARGE. + */ + result SetButtonNumberedBadgeIcon(ButtonPosition position, int number); + + + /** + * Sets the back button. + * + * @brief [Deprecated] + * @deprecated This method is deprecated because hardware back key is mandatory for Tizen mobile devices. @n + * This method is not guaranteed to work properly. + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @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 Controls::IFormBackEventListener + */ + result SetBackButton(void); + + + /** + * Sets the content of the footer item at the specified index. + * + * @since 2.0 + * + * @return An error code + * @param[in] itemIndex The index at which to set the specified item + * @param[in] item The item + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure. @n + * The index is greater than or equal to the number of elements or less than @c 0. + * @exception E_INVALID_ARG A specified input parameter is invalid. @n + * The specified item is not constructed. + * @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. + */ + result SetItemAt(int itemIndex, const FooterItem& item); + + + /** + * Sets the item color for the specified state. + * + * @since 2.0 + * + * @return An error code + * @param[in] status The item status + * @param[in] color The item color to set + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see GetItemColor() + */ + result SetItemColor(FooterItemStatus status, const Tizen::Graphics::Color& color); + + + /** + * Sets the item state at the specified index in the footer. + * + * @since 2.0 + * + * @return An error code + * @param[in] itemIndex The index of the item + * @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 + * The index is greater than or equal to the number of elements or less than zero. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n + * The specified item is currently selected. + * @exception E_SYSTEM A system error has occurred. + */ + result SetItemEnabled(int itemIndex, bool enable); + + + /** + * Sets the badge icon of the specified tab style footer item. + * + * @since 2.0 + * + * @return An error code + * @param[in] itemIndex The index of the item to set the badge icon + * @param[in] pBadgeIcon The bitmap for the icon + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure. @n + * The index is greater than or equal to the number of elements or less than @c 0. + * @exception E_SYSTEM A system error has occurred. + */ + result SetItemBadgeIcon(int itemIndex, const Tizen::Graphics::Bitmap* pBadgeIcon); + + + /** + * Sets the numbered badge icon of the specified footer item. + * + * @since 2.0 + * + * @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. + * @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 + * The index is greater than or equal to the number of elements or less than @c 0. + * @exception E_SYSTEM A system error has occurred. + */ + result SetItemNumberedBadgeIcon(int itemIndex, int number); + + + /** + * Sets the item text color for the specified state. + * + * @since 2.0 + * + * @return An error code + * @param[in] status The item status + * @param[in] color The item text color to set + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetItemTextColor(FooterItemStatus status, const Tizen::Graphics::Color& color); + + + /** + * Selects the item at the specified index. + * + * @since 2.0 + * + * @return An error code + * @param[in] itemIndex The index of the item to select + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE The specified index is out of the range of the data structure. @n + * The specified index is either greater than or equal to the number of items or is less than zero. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n + * The item at the specified index is disabled. + * @exception E_UNSUPPORTED_OPERATION The operation is not supported if the %Footer control style is ::FOOTER_STYLE_BUTTON_TEXT, + * ::FOOTER_STYLE_BUTTON_ICON or ::FOOTER_STYLE_BUTTON_ICON_TEXT. + * @exception E_SYSTEM A system error has occurred. + */ + result SetItemSelected(int itemIndex); + + + /** + * Sets the color of the footer. + * + * @since 2.0 + * + * @return An error code + * @param[in] color The footer color to set + * @exception E_SUCCESS The method is successful. + */ + result SetColor(const Tizen::Graphics::Color& color); + + + /** + * Sets the style of the footer. @n + * All items and buttons will be removed if the style is changed. + * + * @since 2.0 + * + * @return An error code + * @param[in] style The footer style to set + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetStyle(FooterStyle style); + + + /** + * Enables or disables the tab edit mode. + * + * @since 2.0 + * + * @return An error code + * @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. + */ + result SetTabEditModeEnabled(bool enable); + + + /** + * Adds an action event listener instance. + * OnActionPerformed() of the added listener is called when the user selects an item. + * + * @since 2.0 + * + * @param[in] listener The event listener to add + * @remarks When the user collapses the tab style %Footer control which is in the expanded mode by pressing the more button, + * OnActionPerformed() is called for the currently selected tab item. + */ + void AddActionEventListener(Tizen::Ui::IActionEventListener& listener); + + + /** + * Removes an action event listener instance. + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to remove + */ + void RemoveActionEventListener(Tizen::Ui::IActionEventListener& listener); + + + /** + * Gets the position and size of the specified button item. + * + * @since 2.0 + * + * @return The position and size of the button item at the specified position. + * @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. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + Tizen::Graphics::Rectangle GetButtonBounds(ButtonPosition position) const; + + + /** + * Gets the position and size of the specified button item. + * + * @since 2.1 + * + * @return The position and size of the button item at the specified position. + * @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. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + Tizen::Graphics::FloatRectangle GetButtonBoundsF(ButtonPosition position) const; + +protected: + // + //This method is for internal use only. Using this method can cause behavioral, security-related, + //and consistency-related issues in the application. + // + // This is the default constructor for this class. + // @since 2.0 + // + Footer(void); + + + // + //This method is for internal use only. Using this method can cause behavioral, security-related, + //and consistency-related issues in the application. + // + // This is the destructor for this class. + // @since 2.0 + // + virtual ~Footer(void); + + +private: + // + //This method is for internal use only. Using this method can cause behavioral, security-related, + //and consistency-related issues in the application. + // + // Initializes this instance of Footer with the specified parameter. + // + // @since 2.0 + // @return An error code + // @exception E_SUCCESS The method is successful. + // @exception E_SYSTEM A system error has occurred. + // + result Construct(void); + + Footer(const Footer& rhs); + Footer& operator =(const Footer& rhs); + +private: + friend class _FormImpl; + friend class _FooterImpl; + +}; + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_FOOTER_H_ diff --git a/inc/FUiCtrlFooterItem.h b/inc/FUiCtrlFooterItem.h new file mode 100644 index 0000000..379ad66 --- /dev/null +++ b/inc/FUiCtrlFooterItem.h @@ -0,0 +1,195 @@ +// +// 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 FUiCtrlFooterItem.h + * @brief This is the header file for the %FooterItem class. + * + * This header file contains the declarations of the %FooterItem class. + */ +#ifndef _FUI_CTRL_FOOTER_ITEM_H_ +#define _FUI_CTRL_FOOTER_ITEM_H_ + +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ +/** + * @enum FooterItemStatus + * + * Defines the possible status of %FooterItem. + * + * @since 2.0 + */ +enum FooterItemStatus +{ + FOOTER_ITEM_STATUS_NORMAL, /**< The normal state */ + FOOTER_ITEM_STATUS_PRESSED, /**< The pressed state */ + FOOTER_ITEM_STATUS_SELECTED, /**< The selected state */ + FOOTER_ITEM_STATUS_HIGHLIGHTED, /**< The highlighted state */ + FOOTER_ITEM_STATUS_DISABLED /**< The disabled state */ +}; + +/** + * @class FooterItem + * @brief This class is an implementation of %FooterItem. + * + * @since 2.0 + * + * The %FooterItem class is a helper class that specifies the contents of the footer item. + * + *For more information on the class features, see Footer. + */ +class _OSP_EXPORT_ FooterItem + : public Tizen::Base::Object +{ +public: + /** + * This is the default constructor for this class. + * + * @since 2.0 + */ + FooterItem(void); + + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~FooterItem(void); + + + /** + * Initializes this instance of %FooterItem with the specified parameter. + * + * @since 2.0 + * + * @return An error code + * @param[in] actionId The action ID of this item + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. @n + * The specified @c actionId of the specified item must be a positive integer. + */ + result Construct(int actionId); + + + /** + * Gets the action ID of the item. + * + * @since 2.0 + * + * @return The action ID, @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. + */ + int GetActionId(void) const; + + + /** + * Gets the text of the footer item. + * + * @since 2.0 + * + * @return The item text, @n + * else an empty string if an error occurs + * @exception E_SUCCESS The method is successful. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + Tizen::Base::String GetText(void) const; + + + /** + * Sets the action ID of the footer item. + * + * @since 2.0 + * + * @return An error code + * @param[in] actionId The specified action ID of the footer item + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. @n + * The specified @c actionId of the specified item must be a positive integer. + */ + result SetActionId(int actionId); + + + /** + * Sets the background bitmap of the footer item. + * + * @since 2.0 + * + * @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. + * @exception E_SUCCESS The method is successful. + */ + result SetBackgroundBitmap(FooterItemStatus status, const Tizen::Graphics::Bitmap* pBitmap); + + + /** + * Sets the icon of the footer item. + * + * @since 2.0 + * + * @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. + * @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. + * @exception E_SUCCESS The method is successful. + */ + result SetIcon(FooterItemStatus status, const Tizen::Graphics::Bitmap* pIcon); + + + /** + * Sets the text of the footer item. + * + * @since 2.0 + * + * @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. + */ + result SetText(const Tizen::Base::String& text); + + +private: + FooterItem(const FooterItem& footerItem); + FooterItem& operator =(const FooterItem& footerItem); + +private: + friend class _FooterImpl; + friend class _FooterItemImpl; + + class _FooterItemImpl* __pImpl; +}; + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_FOOTER_ITEM_H_ diff --git a/inc/FUiCtrlForm.h b/inc/FUiCtrlForm.h new file mode 100644 index 0000000..ef5e049 --- /dev/null +++ b/inc/FUiCtrlForm.h @@ -0,0 +1,1148 @@ +// +// 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 FUiCtrlForm.h + * @brief This is the header file for the %Form class. + * + * This header file contains the declarations of the %Form class. + */ +#ifndef _FUI_CTRL_FORM_H_ +#define _FUI_CTRL_FORM_H_ + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui +{ +class DataBindingContext; +} } // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ +class Header; +class Footer; +class Tab; +class IFormBackEventListener; +class IFormMenuEventListener; + +/** + * @enum FormStyle + * + * Defines the %Form control style. + * + * @since 2.0 + */ +enum FormStyle +{ + FORM_STYLE_NORMAL = 0x00000000, /**< The basic form style */ + FORM_STYLE_TITLE = 0x00000001, /**<@if OSPDEPREC @deprecated This enum value is deprecated because the use of the Title control is no longer recommended.@endif */ + FORM_STYLE_INDICATOR = 0x00000002, /**<@if OSPDEPREC @deprecated This enum value is deprecated because the indicator styles for portrait and landscape mode are added.@endif */ + FORM_STYLE_PORTRAIT_INDICATOR = FORM_STYLE_INDICATOR, /**< The form with the indicator area when form is in portrait mode. @b Since: @b 2.2 */ + FORM_STYLE_SOFTKEY_0 = 0x00000010, /**<@if OSPDEPREC @deprecated This enum value is deprecated because the use of the Softkey control is no longer recommended.@endif */ + FORM_STYLE_SOFTKEY_1 = 0x00000020, /**<@if OSPDEPREC @deprecated This enum value is deprecated because the use of the Softkey control is no longer recommended.@endif */ + FORM_STYLE_OPTIONKEY = 0x00000040, /**<@if OSPDEPREC @deprecated This enum value is deprecated because the use of the Optionkey control is no longer recommended.@endif */ + FORM_STYLE_TEXT_TAB = 0x00000100, /**<@if OSPDEPREC @deprecated This enum value is deprecated because the use of the Tab control is no longer recommended. @endif */ + FORM_STYLE_ICON_TAB = 0x00000200, /**<@if OSPDEPREC @deprecated This enum value is deprecated because the use of the Tab control is no longer recommended. @endif */ + FORM_STYLE_HEADER = 0x00001000, /**< The form with a header */ + FORM_STYLE_FOOTER = 0x00002000, /**< The form with a footer */ + FORM_STYLE_INDICATOR_AUTO_HIDE = 0x00010000, /**<@if OSPDEPREC @deprecated This enum value is deprecated because the indicator styles for portrait and landscape mode are added.@endif */ + FORM_STYLE_PORTRAIT_INDICATOR_AUTO_HIDE = FORM_STYLE_INDICATOR_AUTO_HIDE, /**< The form with the indicator which is hidden when form is in portrait mode. @b Since: @b 2.2 */ + FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE = 0x00020000 /**< The form with the indicator which is hidden when form is in landscape mode. @b Since: @b 2.2 */ +}; + + +/** + * @if OSPDEPREC + * @enum Softkey + * + * Defines the softkey. + * + * @brief [Deprecated] + * @deprecated This enum type is deprecated because the use of the Softkey control is no longer recommended. + * @since 2.0 + * @endif + */ +enum Softkey +{ + SOFTKEY_0, /**< @if OSPDEPREC The left softkey @endif */ + SOFTKEY_1, /**< @if OSPDEPREC The right softkey @endif */ + SOFTKEY_COUNT // This enum value is for internal use only. Using this enum value can cause behavioral, security-related, and consistency-related issues in the application. +}; + + +/** + * @enum FormActionBar + * + * Defines the action bars that can be attached to the %Form control. + * + * @since 2.0 + */ +enum FormActionBar +{ + FORM_ACTION_BAR_INDICATOR = 0x0001, /**< The indicator */ + FORM_ACTION_BAR_HEADER = 0x0002, /**< The header */ + FORM_ACTION_BAR_FOOTER = 0x0004, /**< The footer */ + FORM_ACTION_BAR_TAB = 0x0008 /**< The tab */ // Ki-Dong,Hong.Temp +}; + + +/** + * @class Form + * @brief This class provides a container with general controls. + * + * @since 2.0 + * + * The %Form class displays a full screen container. It can contain user-created controls and system UI components, such + * as an indicator area, header, and footer. The application can have multiple forms that are all added to a single Frame. + * + * For more information on the class features, see Form. + * + * The following example demonstrates how to use the %Form class. + * + * @code + // Creates an instance of Form + Form* pForm = new Form(); + pForm->Construct(FORM_STYLE_NORMAL| FORM_STYLE_HEADER| FORM_STYLE_FOOTER); + + // Gets a pointer of the frame + Frame *pFrame = UiApp::GetInstance()->GetAppFrame()->GetFrame(); + pFrame->AddControl(pForm); + pFrame->SetCurrentForm(pForm); + + // Implements MyActionEventListener + IActionEventListener* pListener = new MyActionEventListener(); + + // Adds a header + Header * pHeader = GetHeader(); + pHeader->SetTitleText(L"FormSample"); + + // Adds a footer + Footer * pFooter = GetFooter(); + pFooter->SetStyle(FOOTER_STYLE_TAB); + pFooter->AddActionEventListener(*this); + + // Calls Invalidate() to display the form + pForm->Invalidate(true) + * @endcode + * + * This is a simple UI application that uses a %Form. + *@image html ui_controls_form.png + * + */ +class _OSP_EXPORT_ Form + : public Tizen::Ui::Container +{ +public: +// Lifecycle + /** + * This is the default constructor for this class. + * @since 2.0 + */ + Form(void); + + /** + * This is the destructor for this class. + * @since 2.0 + */ + virtual ~Form(void); + + /** + * Initializes this instance of %Form with the specified parameters. + * + * @since 2.0 + * + * @return An error code + * @param[in] formStyle The form style @n + * 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. + * - ::FORM_STYLE_FOOTER and ::FORM_STYLE_SOFTKEY_0 are specified at the same time. + * - @c FORM_STYLE_FOOTER and ::FORM_STYLE_SOFTKEY_1 are specified at the same time. + * - @c FORM_STYLE_FOOTER and ::FORM_STYLE_OPTIONKEY are specified at the same time. @endif + * @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. + */ + result Construct(unsigned long formStyle); + + + /** + * Initializes this instance of %Form 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 + * appropriate resource file, the method tries searching in other folders. When AutoScaling is enabled, the method first searches the folder that + * corresponds to the current screen size category and then searches the "res/screen-size-normal/" folder. + * + * @since 2.0 + * + * @return An error code + * @param[in] resourceId The resource ID describing the %Form 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. + */ + result Construct(const Tizen::Base::String& resourceId); + + /** + * Initializes this instance of %Form with the form style and layout. + * + * @since 2.0 + * + * @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 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. + * @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. + * - The children are arranged within the client area bounds of the form area by @c layout. + */ + result Construct(const Tizen::Ui::Layout& layout, unsigned long formStyle); + + /** + * Initializes this instance of %Form with the specified parameters. + * + * @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] formStyle The form style @n + * 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. + * @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. + * - The children are arranged within the bounds of the form area by @c layout. + */ + result Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, unsigned long formStyle); + +// Operation + + /** + * Adds an IOrientationEventListener instance. @n + * The added listener can listen to the orientation changed events that are fired when the orientation mode of the screen is changed. + * + * @since 2.0 + * + * @param[in] listener The listener to add + * @remarks The %Form control can only listen to those changes to the orientation mode that are enabled by calling SetOrientation(). + * @see RemoveOrientationEventListener() + */ + void AddOrientationEventListener(Tizen::Ui::IOrientationEventListener& listener); + + + /** + * @if OSPDEPREC + * Adds an IActionEventListener instance. @n + * The added listener can listen to the action events that are fired when an option key is selected. + * + * @brief [Deprecated] + * @deprecated This method is deprecated because the use of the Optionkey control is no longer recommended. + * @since 2.0 + * + * @param[in] listener The listener to add + * @see RemoveOptionkeyActionListener() + * @endif + */ + void AddOptionkeyActionListener(Tizen::Ui::IActionEventListener& listener); + + + /** + * @if OSPDEPREC + * Adds an IActionEventListener instance. @n + * The added listener can listen to the action events that are fired when a softkey is selected. + * + * @brief [Deprecated] + * @deprecated This method is deprecated because the use of the Softkey control is no longer recommended. + * @since 2.0 + * + * @param[in] softkey The style of the softkey + * @param[in] listener The listener to add + * @see RemoveSoftkeyActionListener() + * @endif + */ + void AddSoftkeyActionListener(Softkey softkey, Tizen::Ui::IActionEventListener& listener); + + + /** + * @if OSPDEPREC + * Removes an IActionEventListener instance. @n + * The removed listener cannot listen to the events when they are fired. + * + * @brief [Deprecated] + * @deprecated This method is deprecated because the use of the Optionkey control is no longer recommended. + * @since 2.0 + * + * @param[in] listener The listener to remove + * @see AddOptionkeyActionListener() + * @endif + */ + void RemoveOptionkeyActionListener(Tizen::Ui::IActionEventListener& listener); + + + /** + * Removes an IOrientationEventListener instance. @n + * The removed listener cannot listen to the events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The listener to remove + * + * @see AddOrientationEventListener() + */ + void RemoveOrientationEventListener(Tizen::Ui::IOrientationEventListener& listener); + + + /** + * @if OSPDEPREC + * Removes an IActionEventListener instance. @n + * The removed listener cannot listen to the events when they are fired. + * + * @brief [Deprecated] + * @deprecated This method is deprecated because the use of the Softkey control is no longer recommended. + * @since 2.0 + * + * @param[in] softkey The style of the softkey + * @param[in] listener The listener to remove + * @see AddSoftkeyActionListener() + * @endif + */ + void RemoveSoftkeyActionListener(Softkey softkey, Tizen::Ui::IActionEventListener& listener); + + +// Accessor + /** + * Gets the background color of the %Form control. + * + * @since 2.0 + * + * @return The background color of the %Form control + */ + Tizen::Graphics::Color GetBackgroundColor(void) const; + + + /** + * Gets the bounds of the client area. + * + * @since 2.0 + * + * @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; + + /** + * Gets the bounds of the client area. + * + * @since 2.1 + * + * @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; + + /** + * Gets the style of the %Form control. + * + * @since 2.0 + * + * @return An @c unsigned @c long value representing the style of the %Form control + */ + unsigned long GetFormStyle(void) const; + + + /** + * Gets the orientation mode of the %Form control. + * + * @since 2.0 + * + * @return The orientation of the %Form control + */ + Tizen::Ui::Orientation GetOrientation(void) const; + + + /** + * Gets the current orientation status of the %Form control. + * + * @since 2.0 + * + * @return The orientation status of the %Form control, @n + * else @c ORIENTATION_NONE if the %Form control is not the current form of the Frame control + */ + Tizen::Ui::OrientationStatus GetOrientationStatus(void) const; + + + /** + * @if OSPDEPREC + * Gets the action ID of the specified softkey. + * + * @brief [Deprecated] + * @deprecated This method is deprecated because the use of the Softkey control is no longer recommended. + * @since 2.0 + * + * @return An integer value representing the action ID + * @param[in] softkey The softkey + * @endif + */ + int GetSoftkeyActionId(Softkey softkey) const; + + + /** + * @if OSPDEPREC + * Gets the text of the specified softkey. + * + * @brief [Deprecated] + * @deprecated This method is deprecated because the use of the Softkey control is no longer recommended. + * @since 2.0 + * + * @return The text of the softkey + * @param[in] softkey The softkey + * @endif + */ + Tizen::Base::String GetSoftkeyText(Softkey softkey) const; + + + /** + * @if OSPDEPREC + * 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. + * @since 2.0 + * + * @return A pointer to the Tab control, @n + * else @c null if there is no tab + * @remarks The retrieved pointer may be temporary. Therefore, it should not be stored after immediate use. + * @endif + */ + Tab* GetTab(void) const; + + + /** + * @if OSPDEPREC + * Gets the title of the %Form control. + * + * @brief [Deprecated] + * @deprecated This method is deprecated because the use of the Title control is no longer recommended. Instead of the %Title control, + * use the Header control. + * @since 2.0 + * + * @return The title of the %Form control + * @endif + */ + Tizen::Base::String GetTitleText(void) const; + + + /** + * @if OSPDEPREC + * Gets the horizontal alignment of the title text. + * + * @brief [Deprecated] + * @deprecated This method is deprecated because the use of the Title control is no longer recommended. Instead of the %Title control, + * use the Header control. + * @since 2.0 + * + * @return The horizontal alignment of the title text + * @remarks By default, the horizontal alignment is center aligned. + * @endif + */ + HorizontalAlignment GetTitleTextHorizontalAlignment(void) const; + + /** + * Checks whether the %Form control has an Indicator. + * + * @since 2.0 + * + * @return @c true if the %Form control has a title, @n + * else @c false + */ + bool HasIndicator(void) const; + + + /** + * @if OSPDEPREC + * Checks whether the %Form control has an optionkey. + * + * @brief [Deprecated] + * @deprecated This method is deprecated because the use of the Optionkey control is no longer recommended. + * @since 2.0 + * + * @return @c true if the %Form control has an optionkey, @n + * else @c false + * @endif + */ + bool HasOptionkey(void) const; + + + /** + * @if OSPDEPREC + * Checks whether the %Form control has the specified softkey. + * + * @brief [Deprecated] + * @deprecated This method is deprecated because the use of the Softkey control is no longer recommended. + * @since 2.0 + * + * @return @c true if the %Form control has the specified softkey, @n + * else @c false + * @param[in] softkey The required softkey + * @endif + */ + bool HasSoftkey(Softkey softkey) const; + + + /** + * @if OSPDEPREC + * Checks whether the %Form control has a tab. + * + * @brief [Deprecated] + * @deprecated This method is deprecated because the use of the Tab control is no longer recommended. + * @since 2.0 + * + * @return @c true if the %Form control has a tab, @n + * else @c false + * @endif + */ + bool HasTab(void) const; + + + /** + * @if OSPDEPREC + * Checks whether the %Form control has a title. + * + * @brief [Deprecated] + * @deprecated This method is deprecated because the use of the Title control is no longer recommended. Instead of the %Title control, + * use the Header control. + * @since 2.0 + * + * @return @c true if the %Form control has a title, @n + * else @c false + * @endif + */ + bool HasTitle(void) const; + + + /** + * @if OSPDEPREC + * Checks whether the softkey is enabled. + * + * @brief [Deprecated] + * @deprecated This method is deprecated because the use of the Softkey control is no longer recommended. + * @since 2.0 + * + * @return @c true if the softkey is enabled, @n + * else @c false + * @param[in] softkey The softkey + * @endif + */ + bool IsSoftkeyEnabled(Softkey softkey) const; + + + /** + * Sets the background color of the %Form control. + * + * @since 2.0 + * + * @param[in] color The background color to set + */ + void SetBackgroundColor(const Tizen::Graphics::Color& color); + + + /** + * Sets the style of the %Form control. + * + * @since 2.0 + * + * @param[in] formStyle The form style to set @n + * This parameter can be a combination of Tizen::Ui::Controls::FormStyle. + * @exception E_SUCCESS The method is successful @if OSPCOMPAT @b Since: @b 2.0 @endif. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @if OSPDEPREC - ::FORM_STYLE_HEADER and ::FORM_STYLE_TITLE are specified at the same time. + * - ::FORM_STYLE_FOOTER and ::FORM_STYLE_SOFTKEY_0 are specified at the same time. + * - @c FORM_STYLE_FOOTER and ::FORM_STYLE_SOFTKEY_1 are specified at the same time. + * - @c FORM_STYLE_FOOTER and ::FORM_STYLE_OPTIONKEY are specified at the same time. @endif + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * @if OSPDEPREC - Note that you must not change the style of %Form control that is constructed with ::FORM_STYLE_TEXT_TAB + * or ::FORM_STYLE_ICON_TAB style. @endif + * - A Form which is added to a container except Frame cannot have the style of ::FORM_STYLE_PORTRAIT_INDICATOR. + */ + void SetFormStyle(unsigned long formStyle); + + + /** + * @if OSPDEPREC + * Sets an action ID of the optionkey. + * + * @brief [Deprecated] + * @deprecated This method is deprecated because the use of the Optionkey control is no longer recommended. + * @since 2.0 + * + * @param[in] actionId The action ID of this button instance + * @endif + */ + void SetOptionkeyActionId(int actionId); + + + /** + * Sets the orientation of the %Form 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 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&). + */ + void SetOrientation(Orientation orientation); + + + /** + * @if OSPDEPREC + * Sets an action ID of each softkey. + * + * @brief [Deprecated] + * @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] actionId The action ID to set + * @endif + */ + void SetSoftkeyActionId(Softkey softkey, int actionId); + + + /** + * @if OSPDEPREC + * Enables or disables the specified softkey. + * + * @brief [Deprecated] + * @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 + * else @c false + * @endif + */ + void SetSoftkeyEnabled(Softkey softkey, bool enable); + + + /** + * @if OSPDEPREC + * Sets the title icon of the %Form control. + * + * @brief [Deprecated] + * @deprecated This method is deprecated because the use of the Title control is no longer recommended. Instead of the %Title control, + * use the %Header control. + * @since 2.0 + * + * @return An error code + * @param[in] pTitleBitmap The title icon to set, @n + * else @c null if the title icon is removed + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of a specified operation + * (that is, this control cannot be displayed). + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result SetTitleIcon(const Tizen::Graphics::Bitmap* pTitleBitmap); + + + /** + * @if OSPDEPREC + * Sets the title of this %Form control. + * + * @brief [Deprecated] + * @deprecated This method is deprecated because the use of the Title control is no longer recommended. Instead of the %Title control, + * use the Header control. + * @since 2.0 + * + * @return An error code + * @param[in] title The title to set + * @param[in] alignment The horizontal alignment + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of a specified operation + * (that is, this control cannot be displayed). + * @exception E_SYSTEM A system error has occurred. + * @remarks + * - If the size of the text exceeds the displayable area, the text slides automatically. + * - Note that when the title icon is set along with the title text, the title retains the left alignment. + * @endif + */ + result SetTitleText(const Tizen::Base::String& title, HorizontalAlignment alignment = ALIGNMENT_CENTER); + + + /** + * @if OSPDEPREC + * Sets the icon of the softkey. + * + * @brief [Deprecated] + * @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] normalBitmap The Bitmap of the normal icon + * @param[in] pPressedBitmap The Bitmap of the pressed icon + * @remarks If both the icon and text are set for a softkey at the same time, the text takes precedence over the icon. + * @endif + */ + void SetSoftkeyIcon(Softkey softkey, const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap); + + /** + * @if OSPDEPREC + * Sets the text of the specified softkey. + * + * @brief [Deprecated] + * @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] text The text to set + * @remarks + * - If both the icon and text are set for a softkey at the same time, the text takes precedence over the icon. + * - To display text in multi-lines or to denote the end of line, use '\\n'. + * @endif + */ + void SetSoftkeyText(Softkey softkey, const Tizen::Base::String& text); + + /** + * 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. + * - The optimal size of the control is defined in + * Optimal Size of UI Controls. + */ + Footer* GetFooter(void) const; + + + /** + * 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. + * - The optimal size of the control is defined in + * Optimal Size of UI Controls. + */ + Header* GetHeader(void) const; + + + /** + * Checks whether the %Form control has a Footer. + * + * @since 2.0 + * + * @return @c true if the %Form control has a Footer, @n + * else @c false + */ + bool HasFooter(void) const; + + + /** + * Checks whether the %Form control has a Header. + * + * @since 2.0 + * + * @return @c true if the %Form control has a Header, @n + * else @c false + */ + bool HasHeader(void) const; + + + /** + * Checks whether the Indicator control is visible. + * + * @since 2.0 + * + * @return @c true if the Indicator control is visible, @n + * else @c false + */ + bool IsIndicatorVisible(void) const; + + + /** + * Checks whether the Header control is visible. + * + * @since 2.0 + * + * @return @c true if the Header control is visible, @n + * else @c false + */ + bool IsHeaderVisible(void) const; + + + /** + * Checks whether the Footer control is visible. + * + * @since 2.0 + * + * @return @c true if the Footer control is visible, @n + * else @c false + */ + bool IsFooterVisible(void) const; + + + /** + * Checks whether the Indicator control is translucent. + * + * @since 2.0 + * + * @return @c true if the Indicator control is translucent, @n + * else @c false + */ + bool IsIndicatorTranslucent(void) const; + + + /** + * Checks whether the Header control is translucent. + * + * @since 2.0 + * + * @return @c true if the Header control is translucent, @n + * else @c false + */ + bool IsHeaderTranslucent(void) const; + + + /** + * Checks whether the Footer control is translucent. + * + * @since 2.0 + * + * @return @c true if the Footer control is translucent, @n + * else @c false + */ + bool IsFooterTranslucent(void) const; + + + /** + * Sets the translucency of the action bars. + * + * @since 2.0 + * + * @return An error code + * @param[in] actionBars The action bars @n + * Multiple action bars can be combined using bitwise OR (see Tizen::Ui::Controls::FormActionBar). + * @param[in] translucent Set to @c to make the action bars translucent, @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, or + * the specified action bars do not exist. + * @exception E_UNSUPPORTED_OPERATION This operation is not supported. + * @exception E_SYSTEM A system error has occurred. + * @remarks + * - Modifying the translucency of the action bars causes the client area of the %Form to change. + * - The translucency of multiple action bars can be modified at the same time by using logical OR for several values of FormActionBar. + * - The method is not supported in 16-bit devices. + */ + result SetActionBarsTranslucent(unsigned long actionBars, bool translucent); + + + /** + * Sets the visibility state of the action bars. + * + * @since 2.0 + * + * @return An error code + * @param[in] actionBars The action bars @n + * Multiple action bars can be combined using bitwise OR. + * @param[in] visible Set to @c true to make the action bars visible, @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, or + * the specified action bars does not exist. + * @exception E_SYSTEM A system error has occurred. + * @remarks + * - Modifying the translucency of action bars causes the client area of the %Form to change. + * - The visibility of multiple action bars can be modified at the same time by using logical OR for several values of FormActionBar. + * @see FormActionBar + */ + result SetActionBarsVisible(unsigned long actionBars, bool visible); + + + /** + * Creates and returns an overlay region of the specified position and size. @n + * Due to the hardware accelerated rendering, there are limitations for an overlay region. @n + * The hardware capability for an overlay region is checked by using OverlayRegion::GetWidthUnit(), OverlayRegion::GetHeightUnit() and + * OverlayRegion::GetMaxCount(). + * If the specified condition is not satisfied, @c E_INVALID_ARG exception is returned. + * + * @since 2.0 + * + * @return An overlay region instance + * @param[in] rect The x and y coordinates relative to the top-left corner of the form along with the width and height + * @param[in] regionType The type of the overlay region + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @exception E_MAX_EXCEEDED The number of overlay regions has reached the maximum limit. + * @exception E_UNSUPPORTED_OPTION The specified option of the overlay region type is not supported. + * @exception E_SYSTEM A system error has occurred. + * @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. + * - Do not use OverlayRegion with OverlayPanel. If used, the @c E_SYSTEM exception is thrown. + */ + OverlayRegion* GetOverlayRegionN(const Tizen::Graphics::Rectangle& rect, OverlayRegionType regionType); + + /** + * Creates and returns an overlay region of the specified position and size. @n + * Due to the hardware accelerated rendering, there are limitations for an overlay region. @n + * The hardware capability for an overlay region is checked by using OverlayRegion::GetWidthUnit(), OverlayRegion::GetHeightUnit() and + * OverlayRegion::GetMaxCount(). + * If the specified condition is not satisfied, @c E_INVALID_ARG exception is returned. + * + * @since 2.1 + * + * @return An overlay region instance + * @param[in] rect The x and y coordinates relative to the top-left corner of the form along with the width and height + * @param[in] regionType The type of the overlay region + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @exception E_MAX_EXCEEDED The number of overlay regions has reached the maximum limit. + * @exception E_UNSUPPORTED_OPTION The specified option of the overlay region type is not supported. + * @exception E_SYSTEM A system error has occurred. + * @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. + * - Do not use OverlayRegion with OverlayPanel. If used, the @c E_SYSTEM exception is thrown. + */ + OverlayRegion* GetOverlayRegionN(const Tizen::Graphics::FloatRectangle& rect, OverlayRegionType regionType); + + + /** + * Creates and returns a graphics canvas whose bounds (position and size) are equal to the bounds of the client area of the %Form. + * + * @since 2.0 + * + * @return The graphic canvas of the %Form control, @n + * else @c null if an error occurs + * @exception E_SUCCESS The method is successful. + * @exception E_RESOURCE_UNAVAILABLE The required resource is currently unavailable. + * @remarks + * - 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. + * - 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. + */ + Tizen::Graphics::Canvas* GetClientAreaCanvasN(void) const; + + /** + * Translates the specified position to the client coordinate. + * + * @since 2.0 + * + * @return The position relative to the top-left corner of the client area, @n + * else @c (-1,-1) if the instance is invalid + * @param[in] position The position relative to the top-left corner of the %Form control + * @see TranslateFromClientAreaPosition() + */ + Tizen::Graphics::Point TranslateToClientAreaPosition(const Tizen::Graphics::Point& position) const; + + /** + * Translates the specified position to the client coordinate. + * + * @since 2.1 + * + * @return The position relative to the top-left corner of the client area, @n + * else @c (-1,-1) if the instance is invalid + * @param[in] position The position relative to the top-left corner of the %Form control + * @see TranslateFromClientAreaPosition() + */ + Tizen::Graphics::FloatPoint TranslateToClientAreaPosition(const Tizen::Graphics::FloatPoint& position) const; + + /** + * Translates the specified client position to the control coordinate. + * + * @since 2.0 + * + * @return The position relative to the top-left corner of the %Form control, @n + * else @c (-1,-1) if the instance is invalid + * @param[in] clientPosition The position relative to the top-left corner of the client area + * @see TranslateToClientAreaPosition() + */ + Tizen::Graphics::Point TranslateFromClientAreaPosition(const Tizen::Graphics::Point& clientPosition) const; + + /** + * Translates the specified client position to the control coordinate. + * + * @since 2.1 + * + * @return The position relative to the top-left corner of the %Form control, @n + * else @c (-1,-1) if the instance is invalid + * @param[in] clientPosition The position relative to the top-left corner of the client area + * @see TranslateToClientAreaPosition() + */ + Tizen::Graphics::FloatPoint TranslateFromClientAreaPosition(const Tizen::Graphics::FloatPoint& clientPosition) const; + + /** + * Sets the %Form back event listener. + * + * @since 2.0 + * + * @param[in] pFormBackEventListener The %Form back event listener to set + */ + void SetFormBackEventListener(IFormBackEventListener* pFormBackEventListener); + + + /** + * Sets the %Form menu event listener. + * + * @since 2.2 + * + * @param[in] pFormMenuEventListener The %Form menu event listener to set + */ + void SetFormMenuEventListener(IFormMenuEventListener* pFormMenuEventListener); + + + /** + * Gets the data binding context. + * + * @since 2.0 + * + * @return DataBindingContext the data binding context + * @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. + */ + DataBindingContext* GetDataBindingContextN(void) const; + + /** + * Enables or disables the notification tray to remain open. + * + * @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 + * @remarks If this method is not explicitly called, the notification tray is opened. + * @see IsNotificationTrayOpenEnabled() + */ + result SetNotificationTrayOpenEnabled(bool enable); + + + /** + * Checks whether the notification tray is open or not. + * + * @since 2.1 + * + * @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. + * @remarks The specific error code can be accessed using the GetLastResult() method. + * @see SetNotificationTrayOpenEnabled() + */ + bool IsNotificationTrayOpenEnabled(void) const; + +protected: + friend class _FormImpl; + + // + //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. + // + // @since 2.0 + // + virtual void Form_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. + // + // @since 2.0 + // + virtual void Form_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. + // + // @since 2.0 + // + virtual void Form_Reserved3(void) { } + +// Friend Class Declaration +private: + friend class UiBuilder; + friend class Frame; + +private: + Form(const Form&); + Form& operator =(const Form&); + +}; // Form + +} } } // Tizen::Ui::Controls + +#endif // _FUI_CTRL_FORM_H_ diff --git a/inc/FUiCtrlFrame.h b/inc/FUiCtrlFrame.h new file mode 100644 index 0000000..5040646 --- /dev/null +++ b/inc/FUiCtrlFrame.h @@ -0,0 +1,407 @@ +// +// 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 FUiCtrlFrame.h + * @brief This is the header file for the %Frame class. + * + * This header file contains the declarations of the %Frame class. + */ +#ifndef _FUI_CTRL_FRAME_H_ +#define _FUI_CTRL_FRAME_H_ + +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Animations { +class FrameAnimator; +} } } // Tizen::Ui::Animations + +namespace Tizen { namespace App { +class _AppFrame; +} } // Tizen::App + +namespace Tizen { namespace Ui { namespace Controls +{ + +class Form; +class IFrameEventListener; + +/** + * @class Frame + * @brief This class provides the main frame window for an application. + * + * @since 2.0 + * + * The %Frame class provides the main frame window for an application. + * A frame is the main top-level window of an application. It is the ultimate parent + * of all application controls. + * + * For more information on the class features, see Frame. + * + * The following example demonstrates how to use the %Frame class. + * + * @code + // Gets a pointer of the frame + Frame *pFrame = UiApp::GetInstance()->GetAppFrame()->GetFrame(); + + // Creates an instance of canvas + Canvas* pCanvas = new Canvas(); + pCanvas->Construct(); + pCanvas->DrawText(Point(30, 30), L"FrameSample"); + + // Calls Invalidate(); + pFrame->Invalidate(true); + * @endcode + * + */ +class _OSP_EXPORT_ Frame + : public Tizen::Ui::Window +{ +public: +// Lifecycle + /** + * This is the default constructor for this class. + * + * @since 2.0 + */ + Frame(void); + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~Frame(void); + + /** + * Initializes this instance of %Frame with the specified parameter. + * + * @since 2.0 + * + * @return An error code + * @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. + * @remarks The maximum number of Forms that an application can construct is limited by available memory. + */ + result Construct(void); + + /** + * Initializes this instance of %Frame with the specified position and size. + * + * @since 2.0 + * + * @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. + * @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. + * @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. + */ + result Construct(const Tizen::Graphics::Rectangle& rect); + + /** + * Initializes this instance of %Frame with the specified position and size. + * + * @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 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. + * @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. + */ + result Construct(const Tizen::Graphics::FloatRectangle& rect); + +// Operation +public: + /** + * Adds an IOrientationEventListener instance. @n + * The added listener can listen to events on the given event dispatcher's context when they are fired. + * + * @since 2.0 + * + * @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() + */ + void AddOrientationEventListener(Tizen::Ui::IOrientationEventListener& listener); + + /** + * Adds an IFrameEventListener instance. @n + * The added listener can listen to events on the given event dispatcher's context when they are fired. + * + * @since 2.0 + * + * @param[in] listener The listener to add + * @see RemoveFrameEventListener() + */ + void AddFrameEventListener(Tizen::Ui::Controls::IFrameEventListener& listener); + + /** + * Removes an IOrientationEventListener instance. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The listener to remove + * @see AddOrientationEventListener() + */ + void RemoveOrientationEventListener(Tizen::Ui::IOrientationEventListener& listener); + + /** + * Removes an IFrameEventListener instance. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The listener to remove + * @see AddFrameEventListener() + */ + void RemoveFrameEventListener(Tizen::Ui::Controls::IFrameEventListener& listener); + +// Accessor +public: + /** + * Gets the current Form control of the %Frame control. + * + * @since 2.0 + * + * @return The current Form, @n + * else @c null if there is no %Form + * @see SetCurrentForm() + */ + Form* GetCurrentForm(void) const; + + /** + * Sets the specified Form control as the current %Form of the %Frame control. + * + * @brief [Deprecated] + * @deprecated This method is deprecated. + * @since 2.0 + * + * @return An error code + * @param[in] form The form to set as the current form of the %Frame control + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * The specified @c form is not a child control of the %Frame control. + * @exception E_SYSTEM A system error has occurred. + * @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. + */ + result SetCurrentForm(const Form& form); + + /** + * Sets a specified Form control as the current %Form of the %Frame control. + * + * @since 2.1 + * + * @return An error code + * @param[in] pForm The form to set as the current form of the %Frame control + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * The specified @c form is not a child control of the %Frame control. + * @exception E_SYSTEM A system error has occurred. + * @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 ::FORM_STYLE_PORTRAIT_INDICATOR as the current form. + */ + result SetCurrentForm(Form* pForm); + + /** + * Gets the background color of the %Frame control. + * + * @since 2.0 + * + * @return The background color of the %Frame control + */ + Tizen::Graphics::Color GetBackgroundColor(void) const; + + /** + * Sets the background color of the %Frame control. + * + * @since 2.0 + * + * @param[in] color The background color + */ + void SetBackgroundColor(const Tizen::Graphics::Color& color); + + /** + * 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 + * For more information, see Application Filtering. + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * - To see the change in the orientation mode, the corresponding frame must be the topmost frame in the z-order hierarchy. + */ + void SetOrientation(Tizen::Ui::Orientation orientation); + + /** + * Gets the orientation mode of the %Frame control. + * + * @since 2.0 + * + * @return The orientation mode of the %Frame control + */ + Tizen::Ui::Orientation GetOrientation(void) const; + + /** + * Gets the current orientation status of the %Frame control. + * + * @since 2.0 + * + * @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. + */ + Tizen::Ui::OrientationStatus GetOrientationStatus(void) const; + + /** + * Gets the FrameAnimator of the %Frame control. + * + * @since 2.0 + * + * @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; + + /** + * Sets the mode to show the %Frame control. + * + * @since 2.0 + * + * @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); + + /** + * Gets the mode to show the %Frame control. + * + * @since 2.0 + * + * @return The mode to show the %Frame control @n + * The default mode is ::FRAME_SHOW_MODE_FULL_SCREEN. + */ + FrameShowMode GetShowMode(void) const; + +protected: + friend class _FrameImpl; + + // + //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. + // + // @since 2.0 + // + virtual void Frame_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. + // + // @since 2.0 + // + virtual void Frame_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. + // + // @since 2.0 + // + virtual void Frame_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. + // + // @since 2.0 + // + virtual void Frame_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. + // + // @since 2.0 + // + virtual void Frame_Reserved5(void) { } + +private: + Frame(const Frame&); + Frame& operator =(const Frame&); +}; // Frame + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_FRAME_H_ diff --git a/inc/FUiCtrlFrameTypes.h b/inc/FUiCtrlFrameTypes.h new file mode 100644 index 0000000..c4ae509 --- /dev/null +++ b/inc/FUiCtrlFrameTypes.h @@ -0,0 +1,48 @@ +// +// 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 FUiCtrlFrameTypes.h + * @brief This is the header file for the %Frame type. + * + * This header file contains the declarations of the Frame type. + * + */ +#ifndef _FUI_CTRL_FRAME_TYPES_H_ +#define _FUI_CTRL_FRAME_TYPES_H_ + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @enum FrameShowMode + * + * Defines the mode to show the Frame control. + * + * @since 2.0 + */ +enum FrameShowMode +{ + FRAME_SHOW_MODE_FULL_SCREEN, /**< The frame occupies the whole screen */ + FRAME_SHOW_MODE_PARTIAL_SCREEN, /**< The frame occupies the partial screen */ + FRAME_SHOW_MODE_PARTIAL_SCREEN_FLOATING, /**< The frame is always on top of other frames, occupying the partial screen */ + FRAME_SHOW_MODE_MINIMIZED, /**< The frame is minimized @b Since: @b 2.1 */ +}; + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_FRAME_TYPES_H_ \ No newline at end of file diff --git a/inc/FUiCtrlGallery.h b/inc/FUiCtrlGallery.h new file mode 100644 index 0000000..ce8f709 --- /dev/null +++ b/inc/FUiCtrlGallery.h @@ -0,0 +1,564 @@ +// +// 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 FUiCtrlGallery.h + * @brief This is the header file for the %Gallery class. + * + * This header file contains the declarations of the %Gallery class and its helper classes. + */ + +#ifndef _FUI_CTRL_GALLERY_H_ +#define _FUI_CTRL_GALLERY_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ +/** + * @class Gallery + * @brief This class defines the common behavior of a %Gallery control. + * + * @since 2.0 + * + * The %Gallery class displays an image viewer that contains a collection of images (1 + * image at a time) in a horizontally scrolling list. It also supports a slide + * show that automatically displays all the images consecutively. + * + * For more information on the class features, see Gallery. + * + * The following example demonstrates how to use the %Gallery class. + * + * @code +// Sample code for GallerySample.h +#include + +class GallerySample + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::Controls::IGalleryItemProvider + , public Tizen::Ui::Controls::IGalleryEventListener +{ +public: + GallerySample(void) + : __pGallery(null){} + + bool Initialize(void); + virtual result OnInitializing(void); + + //IGalleryItemProvider + virtual Tizen::Ui::Controls::GalleryItem* CreateItem (int index); + virtual bool DeleteItem (int index, Tizen::Ui::Controls::GalleryItem *pItem); + virtual int GetItemCount(void); + + // IGalleryEventListener + virtual void OnGalleryCurrentItemChanged(Tizen::Ui::Controls::Gallery &gallery, int index); + virtual void OnGalleryItemClicked(Tizen::Ui::Controls::Gallery &gallery, int index); + virtual void OnGallerySlideShowStarted(Tizen::Ui::Controls::Gallery& gallery); + virtual void OnGallerySlideShowStopped(Tizen::Ui::Controls::Gallery& gallery); + +private: + Tizen::Ui::Controls::Gallery* __pGallery; +}; + * @endcode + * + * @code +// Sample code for GallerySample.cpp +#include +#include + +#include "GallerySample.h" + +using namespace Tizen::App; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Graphics; + +bool +GallerySample::Initialize(void) +{ + Construct(FORM_STYLE_NORMAL); + return true; +} + +result +GallerySample::OnInitializing(void) +{ + result r = E_SUCCESS; + + // Creates an instance of Gallery + __pGallery = new Gallery(); + __pGallery->Construct(GetBounds()); + __pGallery->SetItemProvider(*this); + __pGallery->AddGalleryEventListener(*this); + + AddControl(__pGallery); + + return r; +} + +// IGalleryItemProvider implementation +GalleryItem* +GallerySample::CreateItem(int index) +{ + // Gets an instance of Bitmap + AppResource* pAppResource = Application::GetInstance()->GetAppResource(); + Bitmap* pImageTemp = pAppResource->GetBitmapN(L"Image.jpg"); + + // Creates an instance of GalleryItem and registers the bitmap to the gallery item + GalleryItem* pGallery = new GalleryItem(); + pGallery->Construct(*pImageTemp); + + // Deallocates the bitmap + delete pImageTemp; + + return pGallery; +} + +bool +GallerySample::DeleteItem(int index, GalleryItem *pItem) +{ + delete pItem; + return true; +} + +int +GallerySample::GetItemCount(void) +{ + return 1; +} + +// IGalleryEventListener implementation +void + GallerySample::OnGalleryCurrentItemChanged(Gallery &gallery, int index) +{ + // .... +} + +void +GallerySample::OnGalleryItemClicked(Gallery &gallery, int index) +{ + // .... +} + +void +GallerySample::OnGallerySlideShowStarted(Gallery& gallery) +{ + // .... +} + +void +GallerySample::OnGallerySlideShowStopped(Gallery& gallery) +{ + // .... +} + * @endcode + */ + +class _OSP_EXPORT_ Gallery + : public Tizen::Ui::Control +{ +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. + * + * @since 2.0 + */ + Gallery(void); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~Gallery(void); + +public: + /** + * Initializes this instance of %Gallery with the specified parameter. + * + * @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 + * Optimal Size of UI Controls. + * @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 Construct(const Tizen::Graphics::Rectangle& rect); + + /** + * Initializes this instance of %Gallery with the specified parameter. + * + * @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 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_INVALID_ARG The specified input parameter is invalid. + * @exception E_SYSTEM A system error has occurred. + */ + result Construct(const Tizen::Graphics::FloatRectangle& rect); + + /** + * Sets the item provider that creates and deletes the items from the %Gallery control. + * + * @since 2.0 + * + * @return An error code + * @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. + */ + result SetItemProvider(IGalleryItemProvider& provider); + + /** + * Adds an IGalleryEventListener instance. @n + * The added listener can listen to the item events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The listener to add + */ + void AddGalleryEventListener(IGalleryEventListener& listener); + + /** + * Removes an IGalleryEventListener instance. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The listener to remove + */ + void RemoveGalleryEventListener(IGalleryEventListener& listener); + + /** + * Gets the index of the current item. + * + * @since 2.0 + * + * @return The current item index of the %Gallery control + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + int GetCurrentItemIndex(void) const; + + /** + * Sets the index of the current item. + * + * @since 2.0 + * + * @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 range. + * @exception E_SYSTEM A system error has occurred. + * + */ + result SetCurrentItemIndex(int index); + + /** + * Gets the total number of items. + * + * @since 2.0 + * + * @return The total number of items, @n + * else @c -1 if an error occurs + */ + int GetItemCount(void) const; + + /** + * Refreshes the item at the specified index. + * + * @since 2.0 + * + * @return An error code + * @param[in] itemIndex The index of the item to refresh + * @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_SYSTEM A system error has occurred. + */ + result RefreshGallery(int itemIndex, GalleryRefreshType type); + + /** + * Updates all the items of a list. + * + * @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. + */ + result UpdateGallery(void); + + /** + * Sets the text of the empty %Gallery control. + * + * @since 2.0 + * + * @return An error code + * @param[in] text The text of the empty %Gallery control + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetTextOfEmptyGallery(const Tizen::Base::String& text); + + /** + * Gets the text of the empty %Gallery control. + * + * @since 2.0 + * + * @return The text of the empty %Gallery control + * @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. + */ + Tizen::Base::String GetTextOfEmptyGallery(void) const; + + /** + * Sets the background bitmap of the %Gallery control. + * + * @since 2.0 + * + * @param[in] pBitmap The bitmap of the empty %Gallery control + * @exception E_SUCCESS The method is successful. + * @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 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. + */ + result SetBitmapOfEmptyGallery(const Tizen::Graphics::Bitmap* pBitmap); + + /** + * Sets the slide show transition animation type. + * + * @since 2.0 + * + * @param[in] animation The animation type of the %Gallery control + * @exception E_SUCCESS The method is successful. + * @exception E_UNSUPPORTED_OPERATION This operation is not supported. + * @exception E_SYSTEM A system error has occurred. + * @remarks The method is not supported in 16-bit devices. + */ + result SetSlideShowAnimation(GalleryAnimation animation); + + /** + * Gets the transition animation type of the slide show. + * + * @since 2.0 + * + * @return The animation type of a %Gallery control + * @exception E_SUCCESS The method is successful. + * @exception E_UNSUPPORTED_OPERATION This operation is not supported. + * @exception E_SYSTEM A system error has occurred. + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * - The method is not supported in 16-bit devices. + */ + GalleryAnimation GetSlideShowAnimation(void) const; + + /** + * Sets the duration of the slide show transition animation. + * + * @since 2.0 + * + * @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. + * @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. + */ + result SetSlideShowAnimationDuration(int duration); + + /** + * Gets the transition animation duration of the %Gallery control. + * + * @since 2.0 + * + * @return The animation duration, @n + * else @c -1 if an error occurs + * @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. + */ + int GetSlideShowAnimationDuration(void) const; + + /** + * Sets the duration of the slide-show item view. + * + * @since 2.0 + * + * @param[in] duration The item view duration + * @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. + * @remarks + * - The unit of the duration is in milliseconds. + * - The default animation duration is different for each slide show animation type. + */ + result SetSlideShowViewDuration(int duration); + + /** + * Gets the duration of the slide-show item view. + * + * @since 2.0 + * + * @return The item view duration, @n + * else @c -1 if an error occurs + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @remarks The specific error code can be accessed using @c GetLastResult() method. + */ + int GetSlideShowViewDuration(void) const; + + /** + * Starts the slide show. + * + * @since 2.0 + * + * @return An error code + * @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. + */ + result StartSlideShow(bool repeat = false); + + /** + * Stops the slide show. + * + * @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. + */ + result StopSlideShow(void) const; + + /** + * Checks whether the slide show has started. + * + * @since 2.0 + * + * @return @c true if the slide show is running, @n + * else @c false + * @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. + */ + bool IsSlideShowStarted(void) const; + + /** + * Enables or disables the image zooming. + * + * @since 2.0 + * + * @return An error code + * @param[in] enable Set to @c true to enable zooming, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @remarks When enabled, the user can enter the zoom mode by double-clicking or pinching the current image. + */ + result SetZoomingEnabled(bool enable); + + /** + * Checks whether zooming is enabled. + * + * @since 2.0 + * + * @return @c true if zooming is enabled, @n + * else @c false + * @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. + */ + bool IsZoomingEnabled(void) const; + + /** + * Sets the background color of the %Gallery control. + * + * @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. + * @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); + + /** + * Gets the background color of the %Gallery control. + * + * @since 2.0 + * + * @return The background 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. + */ + Tizen::Graphics::Color GetBackgroundColor(void) const; + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + Gallery(const Gallery& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + Gallery& operator =(const Gallery& rhs); + +protected: + friend class _GalleryImpl; +}; // Gallery + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_GALLERY_H_ diff --git a/inc/FUiCtrlGalleryItem.h b/inc/FUiCtrlGalleryItem.h new file mode 100644 index 0000000..f385237 --- /dev/null +++ b/inc/FUiCtrlGalleryItem.h @@ -0,0 +1,126 @@ +// +// 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 FUiCtrlGalleryItem.h + * @brief This is the header file for the %GalleryItem class. + * + * This header file contains the declarations of the %GalleryItem class and its helper classes. + */ + +#ifndef _FUI_CTRL_GALLERY_ITEM_H_ +#define _FUI_CTRL_GALLERY_ITEM_H_ + +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _GalleryItemImpl; + +/** + * @class GalleryItem + * @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 + * + * For more information on the class features, see Gallery. + */ +class _OSP_EXPORT_ GalleryItem + : public Tizen::Base::Object +{ +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. + * + * @since 2.0 + */ + GalleryItem(void); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~GalleryItem(void); + +public: + /** + * Initializes this instance of %GalleryItem with the specified parameters. + * + * @since 2.0 + * + * @return An error code + * @param[in] bitmap The default bitmap image + * @param[in] rotation The rotation of the bitmap image + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result Construct(const Tizen::Graphics::Bitmap& bitmap, GalleryImageRotation rotation = GALLERY_IMAGE_ROTATION_0); + + /** + * Initializes this instance of %GalleryItem with the specified parameters. + * @if OSPCOMPAT + * @brief [Compatibility] + * @endif + * @since 2.0 + * @if OSPCOMPAT + * @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. + * @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); + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + GalleryItem(const GalleryItem& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + GalleryItem& operator =(const GalleryItem& rhs); + +private: + _GalleryItemImpl* __pImpl; + + friend class _GalleryItemImpl; +}; // GalleryItem + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_GALLERY_ITEM_H_ diff --git a/inc/FUiCtrlGalleryTypes.h b/inc/FUiCtrlGalleryTypes.h new file mode 100644 index 0000000..f744883 --- /dev/null +++ b/inc/FUiCtrlGalleryTypes.h @@ -0,0 +1,80 @@ +// +// 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 FUiCtrlGalleryTypes.h + * @brief This is the header file for the %Gallery enumerations. + * + * This header file contains the declarations of the Gallery enumerations. + * + * These enumerations define the various properties of a %Gallery control. + */ +#ifndef _FUI_CTRL_GALLERY_ENUM_H_ +#define _FUI_CTRL_GALLERY_ENUM_H_ + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @enum GalleryImageRotation + * + * Defines the rotation of an image of a Gallery control. + * + * @since 2.0 + * + */ +enum GalleryImageRotation +{ + 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 */ +}; + +/** + * @enum GalleryAnimation + * + * Defines the animation type of a Gallery control. + * + * @since 2.0 + * + */ +enum GalleryAnimation +{ + GALLERY_ANIMATION_PAGE, /**< The page turn animation */ + GALLERY_ANIMATION_DISSOLVE, /**< The dissolve animation */ + GALLERY_ANIMATION_ZOOM /**< The zoom animation */ +}; + +/** + * @enum GalleryRefreshType + * + * Defines the update type of a Gallery control. + * + * @since 2.0 + * + */ +enum GalleryRefreshType +{ + GALLERY_REFRESH_TYPE_ITEM_ADD = 0, /**< The refresh type is add */ + GALLERY_REFRESH_TYPE_ITEM_REMOVE, /**< The refresh type is remove */ + GALLERY_REFRESH_TYPE_ITEM_MODIFY /**< The refresh type is modify */ +}; + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_GALLERY_ENUM_H_ diff --git a/inc/FUiCtrlGroupContainer.h b/inc/FUiCtrlGroupContainer.h new file mode 100644 index 0000000..11156b3 --- /dev/null +++ b/inc/FUiCtrlGroupContainer.h @@ -0,0 +1,545 @@ +// +// 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 FUiCtrlGroupContainer.h +* @brief This is the header file for the %GroupContainer class. +* +* This header file contains the declarations of the %GroupContainer class. +*/ +#ifndef _FUI_CTRL_GROUP_CONTAINER_H_ +#define _FUI_CTRL_GROUP_CONTAINER_H_ + +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ +/** +* @class GroupContainer +* @brief This class defines common behavior for a %GroupContainer container. +* +* @since 2.1 +* +* The %GroupContainer class displays child controls in grouping look. It is a concrete implementation of the Container class. +*/ + +class _OSP_EXPORT_ GroupContainer + : public Tizen::Ui::Container +{ +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. + * + * @since 2.1 + */ + GroupContainer(void); + + /** + * 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 + */ + virtual ~GroupContainer(void); + + /** + * Initializes this instance of %GroupContainer with the specified parameters. + * + * @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 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. + */ + result Construct(const Tizen::Graphics::Rectangle& rect, int rowCount, int columnCount, int lineWidth = 1); + + /** + * Initializes this instance of %GroupContainer with the specified parameters. + * + * @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 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. + */ + result Construct(const Tizen::Graphics::FloatRectangle& rect, int rowCount, int columnCount, float lineWidth = 1.0f); + + /** + * Adds a control at a specified row and column index. + * + * @since 2.1 + * + * @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] 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. + * @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. + * - The control to add should be allocated in heap memory, and the ownership of the control is transferred to the platform. + */ + result AddControlAt(Control& control, int rowIndex, int columnIndex); + + /** + * 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 + * @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_SYSTEM The method cannot proceed due to a severe system error. + * @exception E_INVALID_OPERATION No control has been bound to the specified cell. + * @remarks When you get the control from the merged cell, the row index and column index of a representative cell should be given. + */ + const Tizen::Ui::Control* GetControlAt(int rowIndex, int columnIndex) const; + + /** + * 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 + * @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_SYSTEM The method cannot proceed due to a severe system error. + * @exception E_INVALID_OPERATION No control has been bound to the specified cell. + * @remarks When you get the control from the merged cells, the row index and column index of a representative cell should be given. + */ + Tizen::Ui::Control* GetControlAt(int rowIndex, int columnIndex); + + /** + * Removes a specified control from a specified row and column index. + * + * @since 2.1 + * + * @return An error code + * @param[in] rowIndex The row index of the control to remove + * @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. + * @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 Control::OnTerminating() + */ + result RemoveControlAt (int rowIndex, int columnIndex); + + /** + * Sets the width of a column. + * + * @since 2.1 + * + * @return An error code + * @param[in] columnIndex The column index + * @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. + * + */ + result SetColumnWidth(int columnIndex, int width); + + /** + * Sets the width of a column. + * + * @since 2.1 + * + * @return An error code + * @param[in] columnIndex The column index + * @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. + * + */ + result SetColumnWidth(int columnIndex, float width); + + /** + * Gets the width of a column. + * + * @since 2.1 + * + * @return The width of the column + * @param[in] columnIndex The column index + * @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. + */ + int GetColumnWidth(int columnIndex) const; + + /** + * Gets the width of a column. + * + * @since 2.1 + * + * @return The width of the column + * @param[in] columnIndex The column index + * @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. + */ + float GetColumnWidthF(int columnIndex) const; + + /** + * Sets the height of a row. + * + * @since 2.1 + * + * @return An error code + * @param[in] rowIndex The row index + * @param[in] height The new height of the row + * @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. + * @exception E_INVALID_ARG The specified @c height must be greater than or equal to @c 0. + * + */ + result SetRowHeight(int rowIndex, int height); + + /** + * Sets the height of a row. + * + * @since 2.1 + * + * @return An error code + * @param[in] rowIndex The row index + * @param[in] height The new height of the row + * @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. + * @exception E_INVALID_ARG The specified @c height must be greater than or equal to @c 0. + * + */ + result SetRowHeight(int rowIndex, float height); + + /** + * Gets the height of a row. + * + * @since 2.1 + * + * @return The height of the row + * @param[in] rowIndex The row index + * @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. + * + */ + int GetRowHeight(int rowIndex) const; + + /** + * Gets the height of a row. + * + * @since 2.1 + * + * @return The height of the row + * @param[in] rowIndex The row index + * @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. + * + */ + float GetRowHeightF(int rowIndex) const; + + /** + * Merges the cells for a given row and column index. + * + * @since 2.1 + * + * @return An error code + * @param[in] rowStartIndex The start index of the row from which the merge happens + * @param[in] columnStartIndex The start index of the column from which the merge happens + * @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_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 all the cells to merge. + */ + result Merge(int rowStartIndex, int columnStartIndex, int rowCount, int columnCount); + + /** + * Enables/disables resizing of the control in a cell. + * + * @since 2.1 + * + * @return An error code + * @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. + * + */ + result SetChildResizingEnabled(int rowIndex, int columnIndex, bool enable); + + /** + * Sets the margin of a cell. + * + * @since 2.1 + * + * @return An error code + * @param[in] rowIndex The row index of the cell + * @param[in] columnIndex The column index of the cell + * @param[in] leftMargin The left margin + * @param[in] rightMargin The right margin + * @param[in] topMargin The top margin + * @param[in] bottomMargin The bottom margin + * @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 The specified @c leftMargin or @c topMargin or @c rightMargin or @c bottomMargin must be greater than or equal to @c 0. + * @remarks The default margin value is @c 2.0f logical pixel. + */ + result SetMargin(int rowIndex, int columnIndex, int leftMargin, int rightMargin, int topMargin, int bottomMargin); + + /** + * Sets the margin of a cell. + * + * @since 2.1 + * + * @return An error code + * @param[in] rowIndex The row index of the cell + * @param[in] columnIndex The column index of the cell + * @param[in] leftMargin The left margin + * @param[in] rightMargin The right margin + * @param[in] topMargin The top margin + * @param[in] bottomMargin The bottom margin + * @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 The specified @c leftMargin or @c topMargin or @c rightMargin or @c bottomMargin must be greater than or equal to @c 0.0f. + * @remarks The default margin value is 2.0f logical pixel. + */ + result SetMargin(int rowIndex, int columnIndex, float leftMargin, float rightMargin, float topMargin, float bottomMargin); + + /** + * Splits the merged cells. + * + * @since 2.1 + * + * @return An error code + * @param[in] rowIndex The row index of the representative cell of the merged cells + * @param[in] columnIndex The column index of the representative cell of the merged cells + * @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 The specified row and column index are not those of the representative cell of the merged cells. + */ + result Split(int rowIndex, int columnIndex); + + /** + * Gets the bounds of a specified cell. + * + * @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 + * @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. + */ + Tizen::Graphics::Rectangle GetBoundsAt(int rowIndex, int columnIndex) const; + + /** + * Gets the bounds of a specified cell. + * + * @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 + * @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. + */ + Tizen::Graphics::FloatRectangle GetBoundsAtF(int rowIndex, int columnIndex) const; + + /** + * 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 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. + * + * @since 2.1 + * + * @return @c true if the column is stretchable or shrinkable + * 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. + */ + bool IsColumnStretchable(int columnIndex) const; + + /** + * 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 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. + * + * @since 2.1 + * + * @return @c true if the row is stretchable or shrinkable + * 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. + */ + bool IsRowStretchable(int rowIndex) const; + + /** + * Gets the background color of the %GroupContainer control. + * + * @since 2.1 + * + * @return The background color, @n + * else RGBA(0, 0, 0, 0) if an error occurs + */ + Tizen::Graphics::Color GetBackgroundColor(void) const; + + /** + * Sets the background color of the %GroupContainer control. + * + * @since 2.1 + * + * @param[in] color The background color + */ + void SetBackgroundColor(const Tizen::Graphics::Color& color); + + /** + * Gets the row and column divider line color of the %GroupContainer control. + * + * @since 2.1 + * + * @return The row and column divider line color, @n + * else RGBA(0, 0, 0, 255) if line color is not set. + */ + Tizen::Graphics::Color GetLineColor(void) const; + + /** + * Sets the row and column divider line color of the %GroupContainer control. + * + * @since 2.1 + * + * @param[in] color The line color + */ + void SetLineColor(const Tizen::Graphics::Color& color); + +protected: + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // Following method is reserved and may change its name at any time without + // prior notice. + // + // @since 2.1 + // + virtual void GroupContainer_Reserved1(void) {} + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // Following method is reserved and may change its name at any time without + // prior notice. + // + // @since 2.1 + // + virtual void GroupContainer_Reserved2(void) {} + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // Following method is reserved and may change its name at any time without + // prior notice. + // + // @since 2.1 + // + virtual void GroupContainer_Reserved3(void) {} + +private: + friend class _GroupContainerImpl; + + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + // @since 2.1 + // + GroupContainer(const GroupContainer& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + GroupContainer& operator =(const GroupContainer& rhs); + +}; // GroupContainer + +}}} //Tizen::Ui::Controls + +#endif // _FUI_CTRL_GROUP_CONTAINER_H_ diff --git a/inc/FUiCtrlGroupItem.h b/inc/FUiCtrlGroupItem.h new file mode 100644 index 0000000..0181b35 --- /dev/null +++ b/inc/FUiCtrlGroupItem.h @@ -0,0 +1,251 @@ +// +// 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 FUiCtrlGroupItem.h + * @brief This is the header file for the %GroupItem class. + * + * This header file contains the declarations of the %GroupItem class and its helper classes. + */ + +#ifndef _FUI_CTRL_GROUP_ITEM_H_ +#define _FUI_CTRL_GROUP_ITEM_H_ + +#include +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _GroupItemImpl; + +/** + * @class GroupItem + * @brief This class defines common behavior of %GroupItem. + * + * @since 2.0 + * + * The %GroupItem class displays a group item. The basic layout of the %GroupItem instance is text and a bitmap arranged horizontally in one line. + * The bitmap can be omitted while text must be given. + * + * For more information on the class features, see ListViews. + */ + +class _OSP_EXPORT_ GroupItem + : public Tizen::Base::Object +{ +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. + * + * @since 2.0 + */ + GroupItem(void); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~GroupItem(void); + + /** + * Initializes this instance of %GroupItem with the specified parameter. + * + * @since 2.0 + * + * @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. + */ + result Construct(const Tizen::Graphics::Dimension& itemSize); + + /** + * Initializes this instance of %GroupItem with the specified parameter. + * + * @since 2.1 + * + * @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. + */ + result Construct(const Tizen::Graphics::FloatDimension& itemSize); + + /** + * Sets the background image of the item. + * + * @since 2.0 + * + * @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. + */ + result SetBackgroundBitmap(const Tizen::Graphics::Bitmap* pBitmap); + + /** + * Sets the background color of the item. + * + * @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. + * @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. + * - 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); + + /** + * Gets the background color of the item. + * + * @since 2.0 + * + * @return The background color of the item, @n + * else RGBA(0, 0, 0, 0) if an error occurs + * @see SetBackgroundColor() + */ + Tizen::Graphics::Color GetBackgroundColor(void) const; + + /** + * Sets the color of the text. + * + * @since 2.0 + * + * @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. + * @see GetTextColor() + */ + result SetTextColor(const Tizen::Graphics::Color& color); + + /** + * Gets the color of the text. + * + * @since 2.0 + * + * @return The text color, @n + * else RGBA(0, 0, 0, 0) if an error occurs + * @see SetTextColor() + */ + Tizen::Graphics::Color GetTextColor(void) const; + + /** + * Sets the size of the text. + * + * @since 2.0 + * + * @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. + * @exception E_SYSTEM A system error has occurred. + * @see GetTextSize() + */ + result SetTextSize(int size); + + /** + * Sets the size of a text. + * + * @since 2.1 + * + * @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. + * @exception E_SYSTEM A system error has occurred. + * @see GetTextSize() + */ + result SetTextSize(float size); + + /** + * Gets the size of the text. + * + * @since 2.0 + * + * @return The size of the text, + * else @c -1 if an error occurs + * + * @see SetTextSize() + */ + int GetTextSize(void) const; + + /** + * Gets the size of a text. + * + * @since 2.1 + * + * @return The size of a text, + * else @c -1.0f if an error occurs + * + * @see SetTextSize() + */ + float GetTextSizeF(void) const; + + /** + * Sets the text and bitmap of the element for %GroupItem. + * + * @since 2.0 + * + * @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 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. 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); + +protected: + friend class _GroupItemImpl; + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + GroupItem(const GroupItem& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + GroupItem& operator =(const GroupItem& rhs); + +protected: + _GroupItemImpl* _pImpl; +}; // GroupItem + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_GROUP_ITEM_H_ diff --git a/inc/FUiCtrlGroupedList.h b/inc/FUiCtrlGroupedList.h new file mode 100644 index 0000000..8510ea0 --- /dev/null +++ b/inc/FUiCtrlGroupedList.h @@ -0,0 +1,1127 @@ +// +// 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. +// + +/** + * @if OSPDEPREC + * @file FUiCtrlGroupedList.h + * @brief This is the header file for the %GroupedList class. + * + * This header file contains the declarations of the %GroupedList class and its helper classes. + * @endif + */ + +#ifndef _FUI_CTRL_GROUPED_LIST_H_ +#define _FUI_CTRL_GROUPED_LIST_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls { + +/** + * @if OSPDEPREC + * @class GroupedList + * @brief [Deprecated] This class defines the common behavior of a %GroupedList control. + * + * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class. + * @since 2.0 + * + * The %GroupedList class represents grouped items in a list. List items of + * %GroupedList consist of groups and items. A group represents grouped items and is + * inserted into the first level as items are inserted into List. Items which are + * CustomListItem are inserted under related groups. So, items are uniquely identified + * with two indices: group index and item index. + * + * If an application wants to perform tasks when the state of a list item is changed, + * it must implement IGroupedItemEventListener and register it to the grouped list, + * It will then receive related events from %GroupedList. + * + * Unlike ExpandableList which is also a list with a hierarchy of depth 2, group + * item itself does not have many functions. + * + * 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 + * 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 + * + * This is the simple UI application that uses a %GroupedList control. + * + * @code +// Sample code for GroupedListSample.h +#include +#include + +class GroupedListSample + :public Tizen::Ui::Controls::Form + , public Tizen::Ui::ICustomItemEventListener +{ +public: + GroupedListSample(void) + : __pGroupedList(null) + , __pCustomListItemFormat(null){} + + bool Initialize(void); + result AddListItem(Tizen::Ui::Controls::GroupedList& groupedList, int groupId, Tizen::Base::String itemText, + Tizen::Graphics::Bitmap* pBitmapNormal, Tizen::Graphics::Bitmap* pBitmapFocused); + + virtual result OnInitializing(void); + virtual result OnTerminating(void); + + // ICustomItemEventListener + virtual void OnItemStateChanged(const Tizen::Ui::Control& source, int index, int itemId, Tizen::Ui::ItemStatus status); + virtual void OnItemStateChanged(const Tizen::Ui::Control& source, int index, int itemId, int elementId, Tizen::Ui::ItemStatus status); + +private: + static const int ID_LIST_ = 101; + static const int ID_LIST_TEXT = 102; + static const int ID_LIST_BITMAP = 103; + + Tizen::Ui::Controls::GroupedList* __pGroupedList; + Tizen::Ui::Controls::CustomListItemFormat* __pCustomListItemFormat; +}; + * @endcode + * + * @code +// Sample code for CutomListSample.cpp +#include +#include + +#include "GroupedListSample.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; + +bool +GroupedListSample::Initialize(void) +{ + Construct(FORM_STYLE_NORMAL); + return true; +} + +result +GroupedListSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + // Creates an instance of GroupedList + __pGroupedList = new GroupedList(); + __pGroupedList->Construct(Rectangle(0,0,GetClientAreaBounds().width,GetClientAreaBounds().height), CUSTOM_LIST_STYLE_NORMAL); + + // Creates an instance of CustomListItemFormat of the grouped list + __pCustomListItemFormat = new CustomListItemFormat(); + __pCustomListItemFormat->Construct(); + __pCustomListItemFormat->AddElement(ID_LIST_TEXT, Rectangle(10, 25, 200, 80)); + __pCustomListItemFormat->AddElement(ID_LIST_BITMAP, Rectangle(220, 10, 70, 80)); + + // Adds the groups to the grouped list + __pGroupedList->AddGroup(L"Group_1", null); + __pGroupedList->AddGroup(L"Group_2", null); + __pGroupedList->AddGroup(L"Group_3", null); + + // Gets instances of Bitmap + AppResource *pAppResource = Application::GetInstance()->GetAppResource(); + Bitmap *pBitmapNormal = pAppResource->GetBitmapN(L"tizen.png"); + Bitmap *pBitmapFocused = pAppResource->GetBitmapN(L"tizen.png"); + + // Adds the items to the grouped list + for (int i = 0; i < __pGroupedList->GetGroupCount(); i++ ) + { + AddListItem(*__pGroupedList, i, L"SubItem1", pBitmapNormal, pBitmapFocused); + AddListItem(*__pGroupedList, i, L"SubItem2", pBitmapNormal, pBitmapFocused); + AddListItem(*__pGroupedList, i, L"SubItem3", pBitmapNormal, pBitmapFocused); + AddListItem(*__pGroupedList, i, L"SubItem4", pBitmapNormal, pBitmapFocused); + } + + // Adds the grouped list to the form + AddControl(__pGroupedList); + + // Deallocates bitmaps + delete pBitmapNormal; + delete pBitmapFocused; + + return r; +} + +result +GroupedListSample::OnTerminating(void) +{ + result r = E_SUCCESS; + + // Deallocates the item format + delete __pCustomListItemFormat; + + return r; +} + +result +GroupedListSample::AddListItem(GroupedList& groupedList, int groupId, String itemText, Bitmap* pBitmapNormal, Bitmap* pBitmapFocused) +{ + result r = E_SUCCESS; + + // Creates an instance of CustomListItem of the grouped list + CustomListItem* pItem = new CustomListItem(); + pItem->Construct(100); + pItem->SetItemFormat(*__pCustomListItemFormat); + pItem->SetElement(ID_LIST_TEXT, itemText); + pItem->SetElement(ID_LIST_BITMAP, *pBitmapNormal, pBitmapFocused); + + // Adds the item to the grouped list + groupedList.AddItem(groupId, *pItem, ID_LIST_); + + return r; +} + +// ICustomItemEventListener implementation +void +GroupedListSample::OnItemStateChanged(const Control& source, int index, int itemId, ItemStatus status) +{ + switch (itemId) + { + case ID_LIST_: + { + // .... + } + break; + default: + break; + } +} + +void +GroupedListSample::OnItemStateChanged(const Control& source, int index, int itemId, int elementId, ItemStatus status) +{ + switch (itemId) + { + case ID_LIST_: + { + switch (elementId) + { + case ID_LIST_TEXT: + { + // .... + } + break; + case ID_LIST_BITMAP: + { + // .... + } + break; + default: + break; + } + } + break; + default: + break; + } +} + * @endcode + * @endif + */ +class _OSP_EXPORT_ GroupedList + : public Tizen::Ui::Control +{ +public: + /** + * @if OSPDEPREC + * The object is not fully constructed after this constructor is called. @n + * For full construction, the GroupedList::Construct() method must be called right after calling this constructor. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class. + * @since 2.0 + * @endif + */ + GroupedList(void); + + /** + * @if OSPDEPREC + * 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. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class. + * @since 2.0 + * @endif + */ + virtual ~GroupedList(void); + + /** + * @if OSPDEPREC + * Initializes this instance of %GroupedList with the specified parameters. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use 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, 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 + * @param[in] fastScroll Set to @c true if to use a 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_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. + * - The minimum size of this control is 274 x 148 on a WVGA screen, 180 x 96 on a HVGA screen and 137 x 74 on a WQVGA screen. + * @endif + */ + result Construct(const Tizen::Graphics::Rectangle& rect, CustomListStyle style, bool itemDivider = true, bool fastScroll = false); + + /** + * @if OSPDEPREC + * Adds the group to the %GroupedList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class. + * @since 2.0 + * + * @return An error code + * @param[in] text The string of the group to append + * @param[in] pBackgroundBitmap The background bitmap of the group + * @param[in] groupId The ID of the group + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result AddGroup(const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBackgroundBitmap, int groupId = LIST_ITEM_UNSPECIFIED_ID); + + /** + * @if OSPDEPREC + * Inserts the group of the %GroupedList control at the specified index. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class. + * @since 2.0 + * + * @return An error code + * @param[in] groupIndex The group index + * @param[in] text The name of the group item + * @param[in] pBackgroundBitmap The background bitmap of the group item + * @param[in] groupId The ID of the group item + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The @c groupIndex is out of bounds. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result InsertGroupAt(int groupIndex, const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBackgroundBitmap, int groupId = LIST_ITEM_UNSPECIFIED_ID); + + /** + * @if OSPDEPREC + * Sets the contents of the group of the %GroupedList control at the index. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class. + * @since 2.0 + * + * @return An error code + * @param[in] groupIndex The group index + * @param[in] text The string of the group to append + * @param[in] pBackgroundBitmap The bitmap of the group + * @param[in] groupId The ID of the group + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified @c groupIndex is invalid. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result SetGroupAt(int groupIndex, const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBackgroundBitmap, int groupId = LIST_ITEM_UNSPECIFIED_ID); + + /** + * @if OSPDEPREC + * Removes the group of the %GroupedList control at the index. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class. + * @since 2.0 + * + * @return An error code + * @param[in] groupIndex The group index + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified @c groupIndex is invalid. + * @exception E_SYSTEM A system error has occurred. + * @remarks + * - When the specified group is removed, all the items in the group are also removed. + * - The removed list items are deleted from the memory. + * @endif + */ + result RemoveGroupAt(int groupIndex); + + /** + * @if OSPDEPREC + * Removes all the groups of the %GroupedList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class. + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @remarks + * - When the specified group is removed, all the items in the group are also removed. + * - The removed list items are deleted from the memory. + * @endif + */ + result RemoveAllGroups(void); + + /** + * @if OSPDEPREC + * Counts all the groups of the %GroupedList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class. + * @since 2.0 + * + * @return The count of all the groups + * @endif + */ + int GetGroupCount(void) const; + + /** + * @if OSPDEPREC + * Adds the item to the specified group. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class. + * @since 2.0 + * + * @return An error code + * @param[in] groupIndex The group index + * @param[in] item The custom list item object to add + * @param[in] itemId The specified item ID for this item + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified @c groupIndex or @c itemId is invalid. + * @exception E_SYSTEM A system error has occurred. + * @remarks + * - The added item is deleted automatically when the list is destroyed. + * - Do not add, insert, or set an item that already belongs to a %GroupedList control. + * @endif + */ + result AddItem(int groupIndex, const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID); + + /** + * @if OSPDEPREC + * Inserts the item to the specified group. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class. + * @since 2.0 + * + * @return An error code + * @param[in] groupIndex The group index + * @param[in] itemIndex The item index in the specified group + * @param[in] item The custom list item to insert + * @param[in] itemId The item ID for this item + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified @c groupIndex or @c itemId is invalid. + * @exception E_SYSTEM A system error has occurred. + * @remarks + * - The inserted item is deleted automatically when the list is destroyed. + * - Do not add, insert, or set an item that already belongs to a %GroupedList control. + * @endif + */ + result InsertItemAt(int groupIndex, int itemIndex, const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID); + + /** + * @if OSPDEPREC + * Sets the contents of the item in the specified group. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class. + * @since 2.0 + * + * @return An error code + * @param[in] groupIndex The group index + * @param[in] itemIndex The item index in the specified group + * @param[in] item The custom list item to set + * @param[in] itemId The item ID for this item + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified @c groupIndex or @c itemId is invalid. + * @exception E_SYSTEM A system error has occurred. + * @remarks Do not add, insert, or set an item that already belongs to a %GroupedList control. + * @endif + */ + result SetItemAt(int groupIndex, int itemIndex, const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID); + + /** + * @if OSPDEPREC + * Sets the checked status for the specified item. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class. + * @since 2.0 + * + * @return An error code + * @param[in] groupIndex The group index of the item + * @param[in] itemIndex The item index + * @param[in] check Set to @c true to check the item, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified @c groupIndex or @c itemIndex is invalid. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result SetItemChecked(int groupIndex, int itemIndex, bool check); + + /** + * @if OSPDEPREC + * Enables or disables the item at the specified index of the %GroupedList. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class. + * @since 2.0 + * + * @return An error code + * @param[in] groupIndex The group index of the item + * @param[in] itemIndex The item index + * @param[in] enable Set to @c true to enable the item, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified @c groupIndex or @c itemIndex is invalid. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result SetItemEnabled(int groupIndex, int itemIndex, bool enable); + + /** + * @if OSPDEPREC + * Sets the background color of this control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class. + * @since 2.0 + * + * @param[in] color The background color + * @endif + */ + void SetBackgroundColor(const Tizen::Graphics::Color& color); + + /** + * @if OSPDEPREC + * Sets the text that is displayed when %GroupedList is empty. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class. + * @since 2.0 + * + * @param[in] text The empty list test + * @endif + */ + void SetTextOfEmptyList(const Tizen::Base::String& text); + + /** + * @if OSPDEPREC + * Sets the color of the text that is displayed when %GroupedList is empty. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class. + * @since 2.0 + * + * @param[in] color The color of the text to display + * @endif + */ + void SetTextColorOfEmptyList(const Tizen::Graphics::Color& color); + + /** + * @if OSPDEPREC + * Gets the color of the text that is displayed when %GroupedList is empty. + * + * @brief [Deprecated] + * @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 + * @endif + */ + Tizen::Graphics::Color GetTextColorOfEmptyList(void) const; + + /** + * @if OSPDEPREC + * Checks whether the item at the specified index of this grouped list is checked. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class. + * @since 2.0 + * + * @return @c true if the item is checked, @n + * else @c false + * @param[in] groupIndex The group index of the item + * @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_SYSTEM A system error has occurred. + * @remarks This method can only be used when the style of the list allows selection. + * @endif + */ + bool IsItemChecked(int groupIndex, int itemIndex) const; + + /** + * @if OSPDEPREC + * Checks whether the item at the specified index is enabled. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class. + * @since 2.0 + * + * @return @c true if the item is enabled, @n + * else @c false + * @param[in] groupIndex The group index of the item + * @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_SYSTEM A system error has occurred. + * @endif + */ + bool IsItemEnabled(int groupIndex, int itemIndex) const; + + /** + * @if OSPDEPREC + * Removes an item in the specified group. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use 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. + * @exception E_SYSTEM A system error has occurred. + * @remarks The removed list item is deleted from the memory. + * @endif + */ + result RemoveItemAt(int groupIndex, int itemIndex); + + /** + * @if OSPDEPREC + * Removes all the items in the specified group. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class. + * @since 2.0 + * + * @return An error code + * @param[in] groupIndex The group index + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified @c groupIndex is invalid. + * @exception E_SYSTEM A system error has occurred. + * @remarks The removed list items are deleted from the memory. + * @endif + */ + result RemoveAllItemsAt(int groupIndex); + + /** + * @if OSPDEPREC + * Removes all the checked items in the specified group. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class. + * @since 2.0 + * + * @return An error code + * @param[in] groupIndex The group index + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified @c groupIndex is invalid. + * @exception E_SYSTEM A system error has occurred. + * @remarks The removed list items are deleted from the memory. + * @endif + */ + result RemoveAllCheckedItemsAt(int groupIndex); + + /** + * @if OSPDEPREC + * Counts all items of the %GroupedList instance. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class. + * @since 2.0 + * + * @return The item count of the specified group + * @param[in] groupIndex The group index + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified @c groupIndex is invalid. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + int GetItemCountAt(int groupIndex) const; + + /** + * @if OSPDEPREC + * Gets the item ID of the item at the specified index. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class. + * @since 2.0 + * + * @return The item ID + * @param[in] groupIndex The group index + * @param[in] itemIndex The item index in the specified group + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified @c groupIndex or @c itemIndex is invalid. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + int GetItemIdAt(int groupIndex, int itemIndex) const; + + /** + * @if OSPDEPREC + * Gets the item index by the specified item ID. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class. + * @since 2.0 + * + * @return An error code + * @param[in] itemId The item ID + * @param[out] groupIndex The group index + * @param[out] itemIndex The item index in the specified group + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result GetItemIndexFromItemId(int itemId, int& groupIndex, int& itemIndex) const; + + /** + * @if OSPDEPREC + * Gets the group ID at the specified index. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class. + * @since 2.0 + * + * @return The group ID + * @param[in] groupIndex The group index + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified @c groupIndex is invalid. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + int GetGroupIdAt(int groupIndex) const; + + /** + * @if OSPDEPREC + * Gets the group index from the specified group ID. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class. + * @since 2.0 + * + * @return The group index + * @param[in] groupId The ID of the group + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + int GetGroupIndexFromGroupId(int groupId) const; + + /** + * @if OSPDEPREC + * Gets the index of the last item checked. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class. + * @since 2.0 + * + * @return An error code + * @param[out] groupIndex The group index + * @param[out] itemIndex The item index in the specified group + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result GetLastCheckedItemIndex(int& groupIndex, int& itemIndex) const; + + /** + * @if OSPDEPREC + * Gets the index of the next checked item. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class. + * @since 2.0 + * + * @return An error code + * @param[in,out] groupIndex The group index + * @param[in,out] itemIndex The item index in the specified group + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result GetNextCheckedItemIndexAfter(int& groupIndex, int& itemIndex) const; + + /** + * @if OSPDEPREC + * Gets the index of the item at the specified item position. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class. + * @since 2.0 + * + * @return An error code + * @param[in] x The x position of the point + * @param[in] y The y position of the point + * @param[out] groupIndex The index of the group which 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. @n + * There is no item at the specified position. + * @endif + */ + result GetItemIndexFromPosition(int x, int y, int& groupIndex, int& itemIndex) const; + + /** + * @if OSPDEPREC + * Gets the index of the item at the specified item position. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class. + * @since 2.0 + * + * @return An error code + * @param[in] position The position of the point + * @param[out] groupIndex The index of the group which 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. @n + * There is no item at the specified position. + * @endif + */ + result GetItemIndexFromPosition(const Tizen::Graphics::Point& position, int& groupIndex, int& itemIndex) const; + + /** + * @if OSPDEPREC + * Gets the index of the current top drawn list item. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class. + * @since 2.0 + * + * @return An error code + * @param[out] groupIndex The group index of the item + * @param[out] itemIndex The item index of the item + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result GetTopDrawnItemIndex(int& groupIndex, int& itemIndex) const; + + /** + * @if OSPDEPREC + * Removes all the items of the %GroupedList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class. + * @since 2.0 + * + * @return An error code + * @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. + * @endif + */ + result RemoveAllItems(void); + + /** + * @if OSPDEPREC + * Removes all the checked items of the %GroupedList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class. + * @since 2.0 + * + * @return An error code + * @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. + * @endif + */ + result RemoveAllCheckedItems(void); + + /** + * @if OSPDEPREC + * Gets the specified item of the %GroupedList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class. + * @since 2.0 + * + * @return A custom list item + * @param[in] groupIndex The index of the group which the item belongs to + * @param[in] itemIndex The index of the item + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified @c groupIndex or @c itemIndex is invalid. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + const CustomListItem* GetItemAt(int groupIndex, int itemIndex) const; + + /** + * @if OSPDEPREC + * Scrolls to the bottom of the %GroupedList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class. + * @since 2.0 + * @endif + */ + void ScrollToBottom(void); + + /** + * @if OSPDEPREC + * Scrolls to the top of the %GroupedList. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class. + * @since 2.0 + * @endif + */ + void ScrollToTop(void); + + /** + * @if OSPDEPREC + * Scrolls to the item at the specified index. @n + * The specified item is drawn at the top of the %GroupedList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use 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. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result ScrollToTop(int groupIndex, int itemIndex); + + /** + * @if OSPDEPREC + * Scrolls to the group at the specified index. @n + * The specified group is drawn at the top of the %GroupedList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class. + * @since 2.0 + * + * @return An error code + * @param[in] groupIndex The group index + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified @c groupIndex is invalid. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result ScrollToTop(int groupIndex); + + /** + * @if OSPDEPREC + * Sets the first index list of scroll by text. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class. + * @since 2.0 + * + * @return An error code + * @param[in] text The text of the first index + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result SetFastScrollMainIndex(const Tizen::Base::String& text); + + /** + * @if OSPDEPREC + * Adds the fast scroll event listener. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class. + * @since 2.0 + * + * @param[in] listener The listener to add + * @endif + */ + void AddFastScrollEventListener(Tizen::Ui::IFastScrollEventListener& listener); + + /** + * @if OSPDEPREC + * Removes the fast scroll event listener. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class. + * @since 2.0 + * + * @param[in] listener The listener to remove + * @endif + */ + void RemoveFastScrollEventListener(Tizen::Ui::IFastScrollEventListener& listener); + + /** + * @if OSPDEPREC + * Adds the grouped list item event listener. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class. + * @since 2.0 + * + * @param[in] listener The listener to add + * @endif + */ + void AddGroupedItemEventListener(Tizen::Ui::IGroupedItemEventListener& listener); + + /** + * @if OSPDEPREC + * Removes the grouped list item event listener. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class. + * @since 2.0 + * + * @param[in] listener The listener to remove + * @endif + */ + void RemoveGroupedItemEventListener(Tizen::Ui::IGroupedItemEventListener& listener); + + /** + * @if OSPDEPREC + * Gets the index of the first checked list item. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class. + * @since 2.0 + * + * @return An error code + * @param[out] groupIndex The group index of the item + * @param[out] itemIndex The item index of the item + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result GetFirstCheckedItemIndex(int& groupIndex, int& itemIndex) const; + + /** + * @if OSPDEPREC + * Sets the checked status of all the items of the specified group with the given value. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class. + * @since 2.0 + * + * @return An error code + * @param[in] groupIndex The group index of the item + * @param[in] check Set to @c true to check all the items, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified @c groupIndex is invalid. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result SetAllItemsChecked(int groupIndex, bool check); + + /** + * @if OSPDEPREC + * Gets the index of the current bottom drawn list item. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class. + * @since 2.0 + * + * @return An error code + * @param[out] groupIndex The group index of the item + * @param[out] itemIndex The item index of the item + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result GetBottomDrawnItemIndex(int& groupIndex, int& itemIndex) const; + + /** + * @if OSPDEPREC + * Draws and shows the item of %GroupedList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use 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. + * @exception E_INVALID_OPERATION The item has never been drawn before calling this method. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result RefreshItem(int groupIndex, int itemIndex); + + /** + * @if OSPDEPREC + * Draws and shows the group of %GroupedList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use GroupedListView class. + * @since 2.0 + * + * @return An error code + * @param[in] groupIndex The group index + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified @c groupIndex is invalid. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result RefreshGroup(int groupIndex); + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + GroupedList(const GroupedList& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + GroupedList& operator =(const GroupedList& rhs); + + friend class _GroupedListImpl; +}; //GroupedList +}}} // Tizen::Ui::Controls +#endif // _FUI_CTRL_GROUPED_LIST_H_ diff --git a/inc/FUiCtrlGroupedListView.h b/inc/FUiCtrlGroupedListView.h new file mode 100644 index 0000000..547fb6d --- /dev/null +++ b/inc/FUiCtrlGroupedListView.h @@ -0,0 +1,1390 @@ +// +// 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 FUiCtrlGroupedListView.h + * @brief This is the header file for the %GroupedListView class. + * + * This header file contains the declarations of the %GroupedListView class and its helper classes. + */ + +#ifndef _FUI_CTRL_GROUPED_LIST_VIEW_H_ +#define _FUI_CTRL_GROUPED_LIST_VIEW_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _GroupedListViewImpl; + +/** + * @class GroupedListView + * @brief This class defines the common behavior of a %GroupedListView control. + * + * @since 2.0 + * + * The %GroupedListView class displays a list of grouped items in a list. The items in a GroupedList control consist of groups and + * items. A group represents the grouped items and is placed at the first level. Each group consists of simple or custom items. + * Therefore, items are uniquely identified with two indexes: group index and item index. + * + * For more information on the class features, see ListViews. + * + * The following example demonstrates how to use the %GroupedListView class. + * + * + * @code +//Sample code for GroupedListViewSample.h + +#include + +class CustomGroupedListElement; + +class GroupedListViewSample + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::Controls::IGroupedListViewItemEventListener + , public Tizen::Ui::Controls::IGroupedListViewItemProvider +{ +public: + GroupedListViewSample(void) + : __pGroupedListView(null) + , __pCustomGroupedListElement(null){} + + bool Initialize(void); + virtual result OnInitializing(void); + virtual result OnTerminating(void); + + // IGroupedListViewItemEventListener + virtual void OnGroupedListViewContextItemStateChanged(Tizen::Ui::Controls::GroupedListView &listView, int groupIndex, int itemIndex, int elementId, Tizen::Ui::Controls::ListContextItemStatus state); + virtual void OnGroupedListViewItemStateChanged(Tizen::Ui::Controls::GroupedListView &listView, int groupIndex, int itemIndex, int elementId, Tizen::Ui::Controls::ListItemStatus state); + virtual void OnGroupedListViewItemSwept(Tizen::Ui::Controls::GroupedListView &listView, int groupIndex, int itemIndex, Tizen::Ui::Controls::SweepDirection direction); + + // IGroupedListViewItemProvider + virtual int GetGroupCount(void); + virtual int GetItemCount(int groupIndex); + virtual Tizen::Ui::Controls::ListItemBase* CreateItem(int groupIndex, int itemIndex, int itemWidth); + virtual Tizen::Ui::Controls::GroupItem* CreateGroupItem(int groupIndex, int itemWidth); + virtual bool DeleteItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth); + virtual bool DeleteGroupItem(int groupIndex, Tizen::Ui::Controls::GroupItem* pItem, int itemWidth); + +private: + static const int ID_FORMAT_STRING = 100; + static const int ID_FORMAT_BITMAP = 101; + static const int ID_FORMAT_CUSTOM = 102; + static const int ID_CONTEXT_ITEM_1 = 103; + static const int ID_CONTEXT_ITEM_2 = 104; + + Tizen::Graphics::Bitmap* __pHome; + Tizen::Graphics::Bitmap* __pMsg; + Tizen::Graphics::Bitmap* __pAlarm; + Tizen::Graphics::Bitmap* __pCall; + + Tizen::Ui::Controls::GroupedListView* __pGroupedListView; + Tizen::Ui::Controls::ListContextItem* __pItemContext; + CustomGroupedListElement* __pCustomGroupedListElement; +}; + * @endcode + * + * @code +//Sample code for GroupedListViewSample.cpp +#include +#include + +#include "GroupedListViewSample.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Ui::Controls; + +class CustomGroupedListElement + : public ICustomElement +{ +public: + bool + OnDraw(Canvas& canvas, const Rectangle& rect, ListItemDrawingStatus itemStatus) + { + Tizen::Graphics::Font font; + font.Construct(FONT_STYLE_PLAIN, 15); + canvas.SetFont(font); + canvas.SetLineWidth(3); + canvas.SetForegroundColor(Color::GetColor(COLOR_ID_GREEN)); + + if (canvas.DrawRectangle(rect) != E_SUCCESS) + { + return false; + } + + if (canvas.DrawText(Point(rect.x+10, rect.y+15), L"Custom") != E_SUCCESS) + { + return false; + } + + return true; + } +}; + +bool +GroupedListViewSample::Initialize(void) +{ + Construct(FORM_STYLE_NORMAL); + return true; +} + +result +GroupedListViewSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + // Creates an instance of IconListView + __pGroupedListView = new GroupedListView(); + __pGroupedListView->Construct(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height), GROUPED_LIST_VIEW_STYLE_INDEXED, true, true); + __pGroupedListView->SetItemProvider(*this); + __pGroupedListView->AddGroupedListViewItemEventListener(*this); + + // Adds the icon list view to the form + AddControl(__pGroupedListView); + + // Creates an instance of ListContextItem + __pItemContext = new ListContextItem(); + __pItemContext->Construct(); + __pItemContext->AddElement(ID_CONTEXT_ITEM_1, "Test1"); + __pItemContext->AddElement(ID_CONTEXT_ITEM_2, "Test2"); + + // Gets instances of Bitmap + AppResource* pAppResource = Application::GetInstance()->GetAppResource(); + __pHome = pAppResource->GetBitmapN(L"tizen.png"); + __pMsg = pAppResource->GetBitmapN(L"tizen.png"); + __pAlarm = pAppResource->GetBitmapN(L"tizen.png"); + __pCall = pAppResource->GetBitmapN(L"tizen.png"); + + // Creates an instance of CustomGroupedListElement + __pCustomGroupedListElement = new CustomGroupedListElement(); + + return r; +} + +result +GroupedListViewSample::OnTerminating(void) +{ + result r = E_SUCCESS; + + // Deallocates bitmaps + delete __pHome; + delete __pMsg; + delete __pAlarm; + delete __pCall; + + // Deallocates the item context + delete __pItemContext; + + return r; +} + +void +GroupedListViewSample::OnGroupedListViewItemStateChanged(GroupedListView &listView, int groupIndex, int itemIndex, int elementId, ListItemStatus state) +{ + switch (elementId) + { + case ID_FORMAT_STRING: + { + // .... + } + break; + case ID_FORMAT_BITMAP: + { + // .... + } + break; + default: + break; + } +} + +void +GroupedListViewSample::OnGroupedListViewContextItemStateChanged(GroupedListView &listView, int groupIndex, int itemIndex, int elementId, ListContextItemStatus state) +{ + switch (elementId) + { + case ID_CONTEXT_ITEM_1: + { + // .... + } + break; + case ID_CONTEXT_ITEM_2: + { + // .... + } + break; + default: + break; + } +} + +// IGroupedListViewItemEventListener +void +GroupedListViewSample::OnGroupedListViewItemSwept(GroupedListView &listView, int groupIndex, int itemIndex, SweepDirection direction) +{ + // .... +} + +int +GroupedListViewSample::GetGroupCount(void) +{ + return 3; +} + +int +GroupedListViewSample::GetItemCount(int groupIndex) +{ + int itemCount = 0; + switch (groupIndex) + { + case 0: + { + itemCount = 7; + } + break; + case 1: + { + itemCount = 5; + } + break; + case 2: + { + itemCount = 3; + } + break; + default: + break; + } + + return itemCount; +} + +// IGroupedListViewItemProvider +GroupItem* +GroupedListViewSample::CreateGroupItem(int groupIndex, int itemWidth) +{ + String text("Group "); + text.Append(groupIndex+1); + + GroupItem* pItem = new GroupItem(); + pItem->Construct(Dimension(itemWidth, 40)); + pItem->SetElement(text, null); + + return pItem; +} + +ListItemBase* +GroupedListViewSample::CreateItem(int groupIndex, int itemIndex, int itemWidth) +{ + // Creates an instance of CustomItem + CustomItem* pItem = new CustomItem(); + ListAnnexStyle style = LIST_ANNEX_STYLE_NORMAL; + pItem->Construct(Dimension(itemWidth, 100), style); + + switch (itemIndex % 4) + { + case 0: + { + style = LIST_ANNEX_STYLE_NORMAL; + pItem->AddElement(Rectangle(10, 20, 60, 60), ID_FORMAT_BITMAP, *__pHome, null, null); + pItem->AddElement(Rectangle(150, 25, 150, 50), ID_FORMAT_STRING, L"Home", true); + } + break; + case 1: + { + style = LIST_ANNEX_STYLE_MARK; + pItem->AddElement(Rectangle(10, 20, 60, 60), ID_FORMAT_BITMAP, *__pMsg, null, null); + pItem->AddElement(Rectangle(150, 25, 150, 50), ID_FORMAT_STRING, L"Msg", true); + } + break; + case 2: + { + style = LIST_ANNEX_STYLE_ONOFF_SLIDING; + pItem->AddElement(Rectangle(10, 20, 60, 60), ID_FORMAT_BITMAP, *__pAlarm, null, null); + pItem->AddElement(Rectangle(150, 25, 150, 50), ID_FORMAT_STRING, L"Alarm", true); + } + break; + case 3: + { + style = LIST_ANNEX_STYLE_DETAILED; + pItem->AddElement(Rectangle(10, 20, 60, 60), ID_FORMAT_BITMAP, *__pCall, null, null); + pItem->AddElement(Rectangle(150, 25, 150, 50), ID_FORMAT_STRING, L"Call", true); + } + break; + default: + break; + } + pItem->AddElement(Rectangle(360, 10, 180, 80), ID_FORMAT_CUSTOM, *(static_cast(__pCustomGroupedListElement))); + pItem->SetContextItem(__pItemContext); + + return pItem; +} + +bool +GroupedListViewSample::DeleteItem(int groupIndex, int itemIndex, ListItemBase* pItem, int itemWidth) +{ + delete pItem; + pItem = null; + return true; +} + +bool +GroupedListViewSample::DeleteGroupItem(int groupIndex, GroupItem* pItem, int itemWidth) +{ + delete pItem; + pItem = null; + return true; +} + * @endcode + * + */ + + +class _OSP_EXPORT_ GroupedListView + : public Tizen::Ui::Control +{ +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. + * + * @since 2.0 + */ + GroupedListView(void); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~GroupedListView(void); + + /** + * @if OSPDEPREC + * Initializes this instance of %GroupedListView with the specified parameters. + * + * @brief [Deprecated] + * @deprecated This method is deprecated. + * @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 + * %GroupedListView control along with the width and height.@n + * The optimal size of the control is defined in + * Optimal Size of UI Controls. + * @param[in] style The style of the %GroupedListView control + * @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 the fast scroll, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. @n + * Either the @c rect.width or @c rect.height parameter has a negative value. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result Construct(const Tizen::Graphics::Rectangle& rect, GroupedListViewStyle style, bool itemDivider = true, bool fastScroll = false); + + /** + * Initializes this instance of %GroupedListView with the specified parameters. + * + * @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 + * %GroupedListView control along with the width and height.@n + * The optimal size of the control is defined in + * Optimal Size of UI Controls. + * @param[in] style The style of the %GroupedListView control + * @param[in] itemDivider Set to @c true to display an item divider, @n + * else @c false + * @param[in] scrollStyle Set to scroll style + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. @n + * Either the @c rect.width or @c rect.height parameter has a negative value. + * @exception E_SYSTEM A system error has occurred. + */ + result Construct(const Tizen::Graphics::Rectangle& rect, GroupedListViewStyle style, bool itemDivider, ListScrollStyle scrollStyle); + + /** + * Initializes this instance of %GroupedListView with the specified parameters. + * + * @since 2.1 + * + * @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 + * %GroupedListView control along with the width and height.@n + * The optimal size of the control is defined in + * Optimal Size of UI Controls. + * @param[in] style The style of the %GroupedListView control + * @param[in] itemDivider Set to @c true to display an item divider, @n + * else @c false + * @param[in] scrollStyle Set to scroll style + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. @n + * Either the @c rect.width or @c rect.height parameter has a negative value. + * @exception E_SYSTEM A system error has occurred. + */ + result Construct(const Tizen::Graphics::FloatRectangle& rect, GroupedListViewStyle style, bool itemDivider, ListScrollStyle scrollStyle); + + /** + * Sets the item provider that creates and deletes items from the list. + * + * @since 2.0 + * + * @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 the list, the list does not work. + * - A provider should be allocated on a heap memory. + */ + result SetItemProvider(IGroupedListViewItemProvider& provider); + + /** + * Sets the item provider that creates and deletes items from the list. + * + * @since 2.1 + * + * @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 the list, the list does not work. @n + * A provider should be allocated on a heap memory. + */ + result SetItemProvider(IGroupedListViewItemProviderF& provider); + + /** + * Adds an IGroupedListViewItemEventListener instance that listens to the state changes of the list view items. @n + * The added listener can listen to events on the specified event dispatcher's context when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to add + */ + void AddGroupedListViewItemEventListener(IGroupedListViewItemEventListener& listener); + + /** + * Removes an IGroupedListViewItemEventListener instance that listens to the state changes of the list view items. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to remove + */ + void RemoveGroupedListViewItemEventListener(IGroupedListViewItemEventListener& listener); + + /** + * Adds an IFastScrollListener instance that listens to the state changes of a fast scroll. @n + * The added listener can listen to events on the specified event dispatcher's context when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to add + */ + void AddFastScrollListener(IFastScrollListener& listener); + + /** + * Removes an IFastScrollListener instance that listens to the state changes of a fast scroll. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to remove + */ + void RemoveFastScrollListener(IFastScrollListener& listener); + + /** + * Adds an IScrollEventListener instance that listens to the state changes of a scroll event. @n + * The added listener can listen to events on the specified event dispatcher's context when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to add + * @see IScrollEventListener::OnScrollEndReached() + * @see RemoveScrollEventListener() + */ + void AddScrollEventListener(IScrollEventListener& listener); + + /** + * Adds an IScrollEventListener instance that listens to the state changes of a scroll event. @n + * The added listener can listen to events on the specified event dispatcher's context when they are fired. + * + * @since 2.1 + * + * @param[in] listener The event listener to add + * @see IScrollEventListener::OnScrollEndReached() + * @see RemoveScrollEventListener() + */ + void AddScrollEventListener(IScrollEventListenerF& listener); + + /** + * Removes an IScrollEventListener instance that listens to the state changes of a scroll event. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to remove + * @see IScrollEventListener::OnScrollEndReached() + * @see AddScrollEventListener() + */ + void RemoveScrollEventListener(IScrollEventListener& listener); + + /** + * Removes an IScrollEventListener instance that listens to the state changes of a scroll event. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.1 + * + * @param[in] listener The event listener to remove + * @see IScrollEventListener::OnScrollEndReached() + * @see AddScrollEventListener() + */ + void RemoveScrollEventListener(IScrollEventListenerF& listener); + + /** + * Adds a link event listener. + * + * @since 2.0 + * + * @param[in] listener The event listener to add + * @remarks The added listener is notified when a link is selected by the user. + * + * @see RemoveUiLinkEventListener() + */ + void AddUiLinkEventListener(Tizen::Ui::IUiLinkEventListener& listener); + + /** + * Removes the specified link event listener. + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to remove + * @see AddUiLinkEventListener() + */ + void RemoveUiLinkEventListener(Tizen::Ui::IUiLinkEventListener& listener); + + /** + * Enables or disables the sweep event. + * + * @since 2.0 + * + * @return An error code + * @param[in] enable Set to @c true to enable the item sweep, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetSweepEnabled(bool enable); + + /** + * Sets the index list of the fast scroll. + * + * @since 2.0 + * + * @return An error code + * @param[in] text The text of the index + * @param[in] useSearchIcon Set to @c true to display 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_STATE This instance is in an invalid state. + * @exception E_SYSTEM A system error has occurred. + */ + result SetFastScrollIndex(const Tizen::Base::String& text, bool useSearchIcon); + + /** + * Gets the group and item indexes of the top item. + * + * @since 2.0 + * + * @return An error code + * @param[out] groupIndex The group index + * @param[out] itemIndex The item index + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result GetTopDrawnItemIndex(int& groupIndex, int& itemIndex) const; + + /** + * Gets the group and item indexes of the bottom item. + * + * @since 2.0 + * + * @return An error code + * @param[out] groupIndex The group index + * @param[out] itemIndex The item index + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result GetBottomDrawnItemIndex(int& groupIndex, int& itemIndex) const; + + + /** + * Scrolls to the item at the specified index. @n + * The specified item is drawn at the top of the %GroupedListView control. + * + * @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_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, + * then UpdateList() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + */ + result ScrollToItem(int groupIndex, int itemIndex); + + /** + * 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 + * + * @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_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 UpdateList() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + */ + result ScrollToItem(int groupIndex, int itemIndex, ListScrollItemAlignment itemAlignment); + + /** + * Checks or unchecks the item at the specified index. + * + * @since 2.0 + * + * @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 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. + * @exception E_SYSTEM A system error has occurred. + * @remarks + * - This method works only when the annex style of the item allows selection. + * - 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()). + */ + result SetItemChecked(int groupIndex, int itemIndex, bool check); + + /** + * Checks whether the item at the specified index is selected. + * + * @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 + * @remarks + * - This method returns @c false, if the annex style of the item does not allow selection. + * - 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()). + */ + bool IsItemChecked(int groupIndex, int itemIndex) const; + + /** + * Enables or disables the item at the specified index. + * + * @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_SYSTEM A system error has occurred. + * @remarks + * - This method can only be used when the annex style of the list allows selection. + * - 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()). + */ + result SetItemEnabled(int groupIndex, int itemIndex, bool enable); + + /** + * 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 + * @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()). + */ + bool IsItemEnabled(int groupIndex, int itemIndex) const; + + /** + * Counts the total number of groups. + * + * @since 2.0 + * + * @return The total number of groups + */ + int GetGroupCount(void) const; + + /** + * Counts all the items of the specified group. + * + * @since 2.0 + * + * @return The total number of items in the specified group + * @param[in] groupIndex The group 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 UpdateList() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + */ + int GetItemCountAt(int groupIndex) const; + + /** + * Shows the description text of the specified item. + * + * @since 2.0 + * + * @return An error code + * @param[in] groupIndex The group index of the item + * @param[in] itemIndex The index of the item + * @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 + * - If no description text is set for the item at the specified index, it is not displayed. + * - 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()). + * + */ + result ShowItemDescriptionText(int groupIndex, int itemIndex); + + /** + * Hides the description text of the specified item. + * + * @since 2.0 + * + * @return An error code + * @param[in] groupIndex The group index of the item + * @param[in] itemIndex The index of the item + * @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 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()). + */ + result HideItemDescriptionText(int groupIndex, int itemIndex); + + /** + * Updates the specified item. @n + * For instance, @c LIST_REFRESH_TYPE_ITEM_ADD is used when a new item needs to be added and @c LIST_REFRESH_TYPE_ITEM_REMOVE + * is used when an item is deleted from the list. Moreover, @c LIST_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 this method with @c LIST_REFRESH_TYPE_ITEM_MODIFY invokes item provider's + * DeleteItem() and CreateItem() for the given index in sequence. + * + * @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. + * @exception E_SYSTEM A system error has occurred. + * @remarks + * - If the specified itemIndex is @c -1, then the method is applied to the group item with the given index. + * - Note that if @c LIST_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 list. + * - This method internally calls Invalidate(), so you do not need to call them to update the screen. + */ + result RefreshList(int groupIndex, int itemIndex, ListRefreshType type); + + /** + * Refreshes the specified item's element. + * + * @since 2.0 + * + * @return An error code + * @param[in] groupIndex The group index + * @param[in] itemIndex 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. + * @remarks This method internally calls Invalidate(), so you do not need to call them to update the screen. + */ + result RefreshList(int groupIndex, int itemIndex, int elementId); + + /** + * Updates all the items of a list. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @remarks This method clears all the items in the list and invokes the methods of the item provider again to update the list. + */ + result UpdateList(void); + + /** + * Gets the index of the item at the specified position. + * + * @since 2.0 + * + * @return An error code + * @param[in] x The X position of the item + * @param[in] y The Y position of the item + * @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 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()). + */ + result GetItemIndexFromPosition(int x, int y, int& groupIndex, int& itemIndex) const; + + /** + * Gets the index of the item at the specified position. + * + * @since 2.1 + * + * @return An error code + * @param[in] x The X position of the item + * @param[in] y The Y position of the item + * @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 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()). + */ + result GetItemIndexFromPosition(float x, float y, int& groupIndex, int& itemIndex) const; + + /** + * Gets the index of the item at the specified position. + * + * @since 2.0 + * + * @return An error code + * @param[in] position The position of the item + * @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 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()). + */ + result GetItemIndexFromPosition(const Tizen::Graphics::Point& position, int& groupIndex, int& itemIndex) const; + + /** + * Gets the index of the item at the specified position. + * + * @since 2.1 + * + * @return An error code + * @param[in] position The position of the item + * @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 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()). + */ + result GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& position, int& groupIndex, int& itemIndex) const; + + /** + * Gets the index of the item and ID of the element at the specified position. + * + * @since 2.0 + * + * @return An error code + * @param[in] x The X position of the item + * @param[in] y The Y position of the item + * @param[out] groupIndex The index of the group that the item belongs to + * @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 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 + * - 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()). + + */ + result GetItemIndexFromPosition(int x, int y, int& groupIndex, int& itemIndex, int& elementId) const; + + /** + * Gets the index of the item and ID of the element at the specified position. + * + * @since 2.1 + * + * @return An error code + * @param[in] x The X position of the item + * @param[in] y The Y position of the item + * @param[out] groupIndex The index of the group that the item belongs to + * @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 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 + * - 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()). + */ + result GetItemIndexFromPosition(float x, float y, int& groupIndex, int& itemIndex, int& elementId) const; + + /** + * Gets the index of the item and ID of the element at the specified position. + * + * @since 2.0 + * + * @return An error code + * @param[in] position The position of the point + * @param[out] groupIndex The index of the group that the item belongs to + * @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 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 + * - 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()). + */ + result GetItemIndexFromPosition(const Tizen::Graphics::Point& position, int& groupIndex, int& itemIndex, int& elementId) const; + + /** + * Gets the index of the item and ID of the element at the specified position. + * + * @since 2.1 + * + * @return An error code + * @param[in] position The position of the point + * @param[out] groupIndex The index of the group that the item belongs to + * @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 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 + * - 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()). + */ + result GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& position, int& groupIndex, int& itemIndex, int& elementId) const; + + /** + * Sets the color of a section. + * + * @since 2.0 + * + * @return An error code + * @param[in] color The section color + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation + * (this control cannot be displayed). + * @exception E_SYSTEM A system error has occurred. + * @remarks + * - This method works only when the style of the %GroupedListView control is ::GROUPED_LIST_VIEW_STYLE_SECTION. + * - If the device does not support the 32-bit color space, the method sets the alpha value of the specified color to @c 255. + */ + result SetSectionColor(const Tizen::Graphics::Color& color); + + /** + * Gets the color of a section. + * + * @since 2.0 + * + * @return The section color, @n + * else RGBA(0, 0, 0, 0) if the instance is invalid + */ + Tizen::Graphics::Color GetSectionColor(void) const; + + /** + * Sets the color of a division line between items. + * + * @since 2.0 + * + * @return An error code + * @param[in] color The division line color + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetItemDividerColor(const Tizen::Graphics::Color& color); + + /** + * Gets the color of a division line between items. + * + * @since 2.0 + * + * @return The color of a division line, @n + * else RGBA(0, 0, 0, 0) if the instance is invalid + */ + Tizen::Graphics::Color GetItemDividerColor(void) const; + + /** + * Sets the background color of this control. + * + * @since 2.0 + * + * @return An error code + * @param[in] color The background color + * @exception E_SUCCESS The method is successful. + * @remarks + * - If the device does not support the 32-bit color space, the method sets the alpha value of the specified color to @c 255. + * - 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); + + /** + * Gets the background color of this control. + * + * @since 2.0 + * + * @return The background color, @n + * else RGBA(0, 0, 0, 0) if the instance is invalid + */ + Tizen::Graphics::Color GetBackgroundColor(void) const; + + /** + * Sets the bitmap of this control. + * + * @since 2.0 + * + * @return An error code + * @param[in] pBitmap The bitmap for the list + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetBackgroundBitmap(const Tizen::Graphics::Bitmap* pBitmap); + + /** + * Sets the bitmap of the empty list. + * + * @since 2.0 + * + * @return An error code + * @param[in] pBitmap The bitmap for the empty list + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetBitmapOfEmptyList(const Tizen::Graphics::Bitmap* pBitmap); + + /** + * Sets the text of the empty list. + * + * @since 2.0 + * + * @return An error code + * @param[in] text The text for the empty list + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetTextOfEmptyList(const Tizen::Base::String& text); + + /** + * Gets the text to display when there is no item in a list. + * + * @since 2.0 + * + * @return The text to be displayed, @n + * else an empty string when the instance is invalid + */ + Tizen::Base::String GetTextOfEmptyList(void) const; + + /** + * Sets the color of the text to be displayed when there is no item in a list. + * + * @since 2.0 + * + * @return An error code + * @param[in] color The color of the text to display + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetTextColorOfEmptyList(const Tizen::Graphics::Color& color); + + /** + * Gets the color of the text to be displayed when there is no item in a list. + * + * @since 2.0 + * + * @return The color of the text to be displayed, @n + * else RGBA(0, 0, 0, 0) if the instance is invalid + */ + Tizen::Graphics::Color GetTextColorOfEmptyList(void) const; + + /** + * Expands the group's items. + * + * @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_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 UpdateList() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + */ + result ExpandGroup(int groupIndex); + + /** + * Collapses the group's items. + * + * @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_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 UpdateList() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + */ + result CollapseGroup(int groupIndex); + + /** + * Checks whether the group is expanded. + * + * @since 2.0 + * + * @return @c true if the group is expanded, @n + * @c else false + * + * @param[in] groupIndex The index of the group + * @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()). + */ + bool IsGroupExpanded(int groupIndex) const; + + /** + * Expands all groups of list. + * + * @since 2.1 + * + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_OPERATION The feature of expanding all groups is only supported when %GroupedListView% is constructed with + * ::GROUPED_LIST_VIEW_STYLE_INDEXED style. + * @see GroupedListView::Construct() + */ + result ExpandAllGroups(void); + + /** + * Collapses all groups of list. + * + * @since 2.1 + * + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_OPERATION The feature of collapsing all groups is only supported when %GroupedListView% is constructed with + * ::GROUPED_LIST_VIEW_STYLE_INDEXED style. + * @see GroupedListView::Construct() + */ + result CollapseAllGroups(void); + + /** + * Begins the reordering mode. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_OPERATION The reordering mode is only supported when %GroupedListView% is constructed with + * ::GROUPED_LIST_VIEW_STYLE_INDEXED style. + * @see GroupedListView::Construct() + * @see IGroupedListViewItemEventListener::OnGroupedListViewItemReordered() + */ + result BeginReorderingMode(void); + + /** + * Ends the reordering mode. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_OPERATION The reordering mode is only supported when %GroupedListView% is constructed with + * ::GROUPED_LIST_VIEW_STYLE_INDEXED style. + * @see GroupedListView::Construct() + * @see IGroupedListViewItemEventListener::OnGroupedListViewItemReordered() + */ + result EndReorderingMode(void); + + /** + * Checks whether the %GroupedListView control is in reordering mode. + * + * @since 2.0 + * + * @return @c true if the %GroupedListView is in reordering mode, + * else @c false + */ + bool IsInReorderingMode(void) const; + + /** + * Sets the scroll input handling mode. + * + * @since 2.1 + * + * @param[in] mode The scroll input handling mode + * @see GetScrollInputMode() + */ + void SetScrollInputMode(ScrollInputMode mode); + + /** + * Gets the scroll input handling mode. + * + * @since 2.1 + * + * @return The scroll input handling mode + * @see SetScrollInputMode() + */ + ScrollInputMode GetScrollInputMode(void) const; + + /** + * Opens the context item at a specified index. + * + * @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. + */ + result OpenContextItem(int groupIndex, int itemIndex); + + /** + * Closes the context item at a specified index. + * + * @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. + */ + result CloseContextItem(int groupIndex, int itemIndex); + + /** + * Returns whether the context item at a specified index has been opened or not. + * + * @since 2.1 + * + * @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. + */ + bool IsContextItemOpened(int groupIndex, int itemIndex) const; + +protected: + friend class _GroupedListViewImpl; + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + GroupedListView(const GroupedListView& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + GroupedListView& operator =(const GroupedListView& rhs); + +}; // GroupedListView + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_GROUPED_LIST_VIEW_H_ diff --git a/inc/FUiCtrlGroupedListViewTypes.h b/inc/FUiCtrlGroupedListViewTypes.h new file mode 100644 index 0000000..b2cbd72 --- /dev/null +++ b/inc/FUiCtrlGroupedListViewTypes.h @@ -0,0 +1,44 @@ +// +// 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 FUiCtrlGroupedListViewTypes.h + * @brief This is the header file for the %GroupedListView enumerations. + * + * This header file contains the declarations of the GroupedListView enumerations. + */ +#ifndef _FUI_CTRL_GROUPED_LIST_VIEW_TYPES_H_ +#define _FUI_CTRL_GROUPED_LIST_VIEW_TYPES_H_ + +namespace Tizen { namespace Ui { namespace Controls +{ +/** + * @enum GroupedListViewStyle + * + * Defines the styles of GroupedListView. + * + * @since 2.0 + */ +enum GroupedListViewStyle +{ + GROUPED_LIST_VIEW_STYLE_INDEXED = 0, /**< The group and the item are displayed in a rectangular area */ + GROUPED_LIST_VIEW_STYLE_SECTION /**< All the items in the group are displayed in a rounded rectangle */ +}; // GroupedListViewStyle + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_GROUPED_LIST_VIEW_TYPES_H_ diff --git a/inc/FUiCtrlGroupedTableView.h b/inc/FUiCtrlGroupedTableView.h new file mode 100644 index 0000000..62594d4 --- /dev/null +++ b/inc/FUiCtrlGroupedTableView.h @@ -0,0 +1,1106 @@ +// +// 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 FUiCtrlGroupedTableView.h +* @brief This is the header file for the %GroupedTableView class. +* +* This header file contains the declarations of the %GroupedTableView class and its helper classes. +*/ + +#ifndef _FUI_CTRL_GROUPED_TABLE_VIEW_H_ +#define _FUI_CTRL_GROUPED_TABLE_VIEW_H_ + +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ +class IGroupedTableViewItemProvider; +class IGroupedTableViewItemProviderF; +class IGroupedTableViewItemEventListener; +class IFastScrollListener; +class IScrollEventListener; +class IScrollEventListenerF; + +/** + * @class GroupedTableView + * @brief This class defines common behavior for a %GroupedTableView control. + * + * @since 2.0 + * + * The %GroupedTableView class defines common behavior for a %GroupedTableView control. + * + * The following example demonstrates how to use the %GroupedTableView class. + * + * @code +//Sample code for GroupedTableViewSample.h +#include + +class GroupedTableViewSample + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::Controls::IGroupedTableViewItemProvider + , public Tizen::Ui::Controls::IGroupedTableViewItemEventListener + , public Tizen::Ui::Controls::IFastScrollListener +{ +public: + GroupedTableViewSample(void) + : __pGroupedTableView(null) + , __pContextItem(null){} + + bool Initialize(void); + virtual result OnInitializing(void); + virtual result OnTerminating(void); + + // IGroupedTableViewItemEventListener + virtual void OnGroupedTableViewGroupItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status); + virtual void OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status); + virtual void OnGroupedTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewContextItem* pContextItem, bool activated); + + // IGroupedTableViewItemProvider + virtual int GetGroupCount(void); + virtual int GetItemCount(int groupIndex); + virtual Tizen::Ui::Controls::TableViewGroupItem* CreateGroupItem(int groupIndex, int itemWidth); + virtual bool DeleteGroupItem(int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem); + virtual void UpdateGroupItem(int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem); + virtual Tizen::Ui::Controls::TableViewItem* CreateItem(int groupIndex, int itemIndex, int itemWidth); + virtual bool DeleteItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem); + virtual void UpdateItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem); + virtual int GetDefaultItemHeight(void); + virtual int GetDefaultGroupItemHeight(void); + + // IFastScrollListener + virtual void OnFastScrollIndexSelected(Tizen::Ui::Control& source, Tizen::Base::String& index); + +private: + Tizen::Ui::Controls::GroupedTableView* __pGroupedTableView; + Tizen::Ui::Controls::TableViewContextItem* __pContextItem; +}; + * @endcode + * + * @code + +//Sample code for GroupedTableViewSample.cpp +#include +#include + +#include "GroupedTableViewSample.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Media; +using namespace Tizen::Ui::Controls; + +bool +GroupedTableViewSample::Initialize(void) +{ + Construct(FORM_STYLE_NORMAL); + return true; +} + +result +GroupedTableViewSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + // Creates an instance of TableView + __pGroupedTableView = new GroupedTableView(); + __pGroupedTableView->Construct(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height), true, TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL); + __pGroupedTableView->SetItemProvider(this); + __pGroupedTableView->AddGroupedTableViewItemEventListener(*this); + + __pGroupedTableView->AddFastScrollListener(*this); + __pGroupedTableView->SetFastScrollIndex(L"ABCDEFGHIJKLMNOPQRSTUVWXYZ", true); + + // Adds the TableView to the form + AddControl(__pGroupedTableView); + + // Creates an instance of TableViewContextItem + __pContextItem = new TableViewContextItem(); + __pContextItem->Construct(Dimension(720, 100)); + + Button* pButton = new Button(); + pButton->Construct(Rectangle(10, 10, 200, 80), L"Context1"); + + Button* pButton2 = new Button(); + pButton2->Construct(Rectangle(250, 10, 200, 80), L"Context2"); + + __pContextItem->AddControl(pButton); + __pContextItem->AddControl(pButton2); + + return r; +} + +result +GroupedTableViewSample::OnTerminating(void) +{ + result r = E_SUCCESS; + + // Deallocates the item context + delete __pContextItem; + __pContextItem = null; + + return r; +} + +// IGroupedTableViewItemEventListener implementation +void +GroupedTableViewSample::OnGroupedTableViewGroupItemStateChanged(GroupedTableView& tableView, int groupIndex, TableViewGroupItem* pItem, TableViewItemStatus status) +{ + if (tableView.IsGroupExpanded(groupIndex)) + { + tableView.CollapseGroup(groupIndex); + } + else + { + tableView.ExpandGroup(groupIndex); + } +} + +void +GroupedTableViewSample::OnGroupedTableViewItemStateChanged(GroupedTableView& tableView, int groupIndex, int itemIndex, TableViewItem* pItem, TableViewItemStatus status) +{ + // .... +} + +void +GroupedTableViewSample::OnGroupedTableViewContextItemActivationStateChanged(GroupedTableView& tableView, int groupIndex, int itemIndex, TableViewContextItem* pContextItem, bool activated) +{ + // .... +} + +// IFastScrollListener implementation +void +GroupedTableViewSample::OnFastScrollIndexSelected(Tizen::Ui::Control& source, Tizen::Base::String& index) +{ + // .... +} + +// IGroupedTableViewItemProvider implementation +int +GroupedTableViewSample::GetGroupCount(void) +{ + return 26; +} + +int +GroupedTableViewSample::GetItemCount(int groupIndex) +{ + return 10; +} + +int +GroupedTableViewSample::GetDefaultItemHeight(void) +{ + return 100; +} + +int +GroupedTableViewSample::GetDefaultGroupItemHeight(void) +{ + return 80; +} + +TableViewGroupItem* +GroupedTableViewSample::CreateGroupItem(int groupIndex, int itemWidth) +{ + TableViewGroupItem* pItem = new TableViewGroupItem(); + pItem->Construct(Dimension(itemWidth, GetDefaultGroupItemHeight())); + + String text; + text.Format(30, L"Group title %d", groupIndex); + + Label* pLabel = new Label(); + pLabel->Construct(Rectangle(0, 0, itemWidth, GetDefaultGroupItemHeight()), text); + + pItem->AddControl(pLabel); + + return pItem; +} + +bool +GroupedTableViewSample::DeleteGroupItem(int groupIndex, TableViewGroupItem* pItem) +{ + pItem->Destroy(); + + return true; +} + +void +GroupedTableViewSample::UpdateGroupItem(int groupIndex, TableViewGroupItem* pItem) +{ + // .... +} + +TableViewItem* +GroupedTableViewSample::CreateItem(int groupIndex, int itemIndex, int itemWidth) +{ + TableViewAnnexStyle style = TABLE_VIEW_ANNEX_STYLE_NORMAL; + TableViewItem* pItem = new TableViewItem(); + + switch (itemIndex % 6) + { + case 0: + style = TABLE_VIEW_ANNEX_STYLE_NORMAL; + break; + case 1: + style = TABLE_VIEW_ANNEX_STYLE_MARK; + break; + case 2: + style = TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING; + break; + case 3: + style = TABLE_VIEW_ANNEX_STYLE_DETAILED; + break; + case 4: + style = TABLE_VIEW_ANNEX_STYLE_RADIO; + break; + case 5: + style = TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER; + break; + default: + break; + } + + pItem->Construct(Dimension(itemWidth, GetDefaultItemHeight()), style); + + String text; + text.Format(30, L"TableViewItem %d", itemIndex); + + Label* pLabel = new Label(); + pLabel->Construct(Rectangle(0, 0, itemWidth, GetDefaultItemHeight()), text); + + pItem->AddControl(pLabel); + pItem->SetContextItem(__pContextItem); + + return pItem; +} + +bool +GroupedTableViewSample::DeleteItem(int groupIndex, int itemIndex, TableViewItem* pItem) +{ + pItem->Destroy(); + + return true; +} + +void +GroupedTableViewSample::UpdateItem(int groupIndex, int itemIndex, TableViewItem* pItem) +{ + // .... +} + * @endcode + * + */ + +class _OSP_EXPORT_ GroupedTableView + : public Tizen::Ui::Container +{ +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. + * + * @since 2.0 + */ + GroupedTableView(void); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~GroupedTableView(void); + + /** + * Initializes this instance of %GroupedTableView with the specified parameters. + * + * @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 + * 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. + * + */ + result Construct(const Tizen::Graphics::Rectangle& rect, bool itemDivider, TableViewScrollBarStyle scrollStyle); + + /** + * Initializes this instance of %GroupedTableView with the specified parameters. + * + * @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 + * 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. + * + */ + result Construct(const Tizen::Graphics::FloatRectangle& rect, bool itemDivider, TableViewScrollBarStyle scrollStyle); + + /** + * Sets the item provider that creates and deletes items for the grouped style table view. + * + * @since 2.0 + * + * @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. + * - To reset the item provider, pass @c null to @c pProvider. + */ + void SetItemProvider(IGroupedTableViewItemProvider* pProvider); + + /** + * Sets the item provider that creates and deletes items for the grouped style table view. + * + * @since 2.1 + * + * @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. + * - To reset the item provider, pass @c null to @c pProvider. + */ + void SetItemProviderF(IGroupedTableViewItemProviderF* pProvider); + + /** + * Expands the group's items. + * + * @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. + * @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()). + */ + result ExpandGroup(int groupIndex); + + /** + * Collapses the group's items. + * + * @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. + * @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()). + */ + result CollapseGroup(int groupIndex); + + /** + * Expands all groups of table view. + * + * @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. + * @remarks This method does not work during the ITableViewItemProvider call-back procedure. + */ + result ExpandAllGroups(void); + + /** + * Collapses all groups of table view. + * + * @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. + * @remarks This method does not work during the ITableViewItemProvider call-back procedure. + */ + result CollapseAllGroups(void); + + /* + * Expands all groups of table view. + * + * @since 2.0 + * + */ + inline void ExpandAllGroup(void) + { + ExpandAllGroups(); + } + + /* + * Collapses all groups of table view. + * + * @since 2.0 + * + */ + inline void CollapseAllGroup(void) + { + CollapseAllGroups(); + } + + /** + * 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()). + */ + bool IsGroupExpanded(int groupIndex) const; + + /** + * Sets the grouped look is enabled. + * + * @since 2.0 + * + * @param[in] enable The enabled/disabled status + */ + void SetGroupedLookEnabled(bool enable); + + /** + * 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 + */ + bool IsGroupedLookEnabled(void) const; + + /** + * Adds a listener instance that listens to state changes of table view items. @n + * The added listener can listen to events on the specified event dispatcher's context when they are fired. + * + * @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. + */ + result AddGroupedTableViewItemEventListener(IGroupedTableViewItemEventListener& listener); + + /** + * Removes a listener instance that listens to state changes of table view items. @n + * The removed listener cannot listen to events when they are fired. + * + * @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. + */ + result RemoveGroupedTableViewItemEventListener(IGroupedTableViewItemEventListener& listener); + + /** + * Adds a listener instance that listens to state changes of a fast scroll. @n + * The added listener can listen to events on the specified event dispatcher's context when they are fired. + * + * @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. + */ + result AddFastScrollListener(IFastScrollListener& listener); + + /** + * Removes a listener instance that listens to state changes of a fast scroll. @n + * The removed listener cannot listen to events when they are fired. + * + * @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. + */ + result RemoveFastScrollListener(IFastScrollListener& listener); + + /** + * Adds a listener instance that listens to state changes of a scroll event. @n + * The added listener can listen to events on the specified event dispatcher's context when they are fired. + * + * @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. + * @see IScrollEventListener::OnScrollEndReached() + * @see RemoveScrollEventListener() + */ + result AddScrollEventListener(IScrollEventListener& listener); + + /** + * Removes a listener instance that listens to state changes of a scroll event. @n + * The removed listener cannot listen to events when they are fired. + * + * @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. + * @see IScrollEventListener::OnScrollEndReached() + * @see AddScrollEventListener() + */ + result RemoveScrollEventListener(IScrollEventListener& listener); + + /** + * Adds a listener instance that listens to state changes of a scroll event. @n + * The added listener can listen to events on the specified event dispatcher's context when they are fired. + * + * @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. + * @see IScrollEventListenerF::OnScrollEndReached() + * @see RemoveScrollEventListenerF() + */ + result AddScrollEventListener(IScrollEventListenerF& listener); + + /** + * Removes a listener instance that listens to state changes of a scroll event. @n + * The removed listener cannot listen to events when they are fired. + * + * @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. + * @see IScrollEventListenerF::OnScrollEndReached() + * @see AddScrollEventListenerF() + */ + result RemoveScrollEventListener(IScrollEventListenerF& listener); + + /** + * Enables or disables the collapse by pinch gesture. + * + * @since 2.0 + * + * @param[in] enable Set to @c true to enable the collapse by pinch gesture, @n + * else @c false + */ + void SetCollapseByPinchGestureEnabled(bool enable); + + /** + * 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 + */ + bool IsCollapseByPinchGestureEnabled(void) const; + + /** + * Sets the text index of the fast scroll. + * + * @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_OPERATION The current state of the instance prohibits the execution of the specified operation. + */ + result SetFastScrollIndex(const Tizen::Base::String& text, bool useSearchIcon); + + /** + * Gets the group and item indexes of the top item. + * + * @since 2.0 + * + * @return An error code + * @param[out] groupIndex The group 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& groupIndex, int& itemIndex) const; + + /** + * Gets the group and item indexes of the bottom item. + * + * @since 2.0 + * + * @return An error code + * @param[out] groupIndex The group index + * @param[out] itemIndex The item index + * @exception E_SUCCESS The method is successful. + * @exception E_OBJ_NOT_FOUND Bottom drawn item is not found. + */ + result GetBottomDrawnItemIndex(int& groupIndex, int& itemIndex) const; + + /** + * Scrolls to the item at the specified index. + * The specified item is drawn at the position specified by the item alignment. + * + * @since 2.0 + * + * @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. + * @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 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()). + */ + result ScrollToItem(int groupIndex, int itemIndex, TableViewScrollItemAlignment itemAlignment = TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_TOP); + + /** + * Checks or unchecks the item at the specified index. + * + * @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. + * @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()). + */ + result SetItemChecked(int groupIndex, int itemIndex, bool check); + + /** + * 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. + * @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()). + */ + bool IsItemChecked(int groupIndex, int itemIndex) const; + + /** + * Enables or disables the item at the specified index. + * + * @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. + * @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()). + */ + result SetItemEnabled(int groupIndex, int itemIndex, bool enable); + + /** + * 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. + * @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 IsItemEnabled(int groupIndex, int itemIndex) const; + + /** + * Counts the total number of groups. + * + * @since 2.0 + * + * @return The total number of groups + */ + int GetGroupCount(void) const; + + /** + * Counts all the items of the specified group. + * + * @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. + * @exception E_OUT_OF_RANGE A specified input parameter is invalid. + */ + int GetItemCountAt(int groupIndex) const; + + /** + * 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 invokes + * IGroupedTableViewItemProvider::UpdateItem() or IGroupedTableViewItemProviderF::UpdateItem() for the given index in sequence. + * + * @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. + * @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. + * - This method does not work during the ITableViewItemProvider call-back procedure. + */ + result RefreshItem(int groupIndex, int itemIndex, TableViewRefreshType type); + + /** + * Updates all items of the table view. @n + * Note that calling the %RefreshAllItems() method invokes IGroupedTableViewItemProvider::UpdateItem() or + * IGroupedTableViewItemProviderF::UpdateItem() for all loaded items. + * + * @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. + */ + result RefreshAllItems(void); + + /** + * Updates all the items of a table view. @n + * This method deletes all the items in the table view and invokes the methods of the item provider again to update the table view. + * + * @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. + * @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 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. + */ + void UpdateTableView(void); + + /** + * Gets the index of the item at the specified position. + * + * @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 + * @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()). + */ + void GetItemIndexFromPosition(const Tizen::Graphics::Point& position, int& groupIndex, int& itemIndex) const; + + /** + * Gets the index of the item at the specified position. + * + * @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 + * @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()). + */ + void GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& position, int& groupIndex, int& itemIndex) const; + + /** + * Sets the color of a division line between items. + * + * @since 2.0 + * + * @return An error code + * @param[in] color The division line color + */ + void SetItemDividerColor(const Tizen::Graphics::Color& color); + + /** + * Gets the color of a division line between items. + * + * @since 2.0 + * + * @return The color of a division line + */ + Tizen::Graphics::Color GetItemDividerColor(void) const; + + /** + * Sets the background color of this control. + * + * @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, + * only the bitmap image is displayed. + */ + void SetBackgroundColor(const Tizen::Graphics::Color& color); + + /** + * Sets the scroll input handling mode. + * + * @since 2.0 + * + * @param[in] mode The scroll input handling mode + * @see GetScrollInputMode() + */ + void SetScrollInputMode(ScrollInputMode mode); + + /** + * Gets the scroll input handling mode. + * + * @since 2.0 + * + * @return The scroll input handling mode + * @see SetScrollInputMode() + */ + ScrollInputMode GetScrollInputMode(void) const; + + /** + * Gets the background color of this control. + * + * @since 2.0 + * + * @return The background color + */ + Tizen::Graphics::Color GetBackgroundColor(void) const; + + /** + * Scrolls the list contents by a specified number of pixels. @n + * If the specified number is negative, it scrolls in the 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. + * @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. + * - This method does not work during the ITableViewItemProvider call-back procedure. + */ + result ScrollByPixel(int pixel); + + /** + * Scrolls the list contents by a specified number of pixels. @n + * If the specified number is negative, it scrolls in the 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. + * @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. + * - This method does not work during the ITableViewItemProvider call-back procedure. + */ + result ScrollByPixel(float pixel); + + /** + * Gets the current scroll position + * + * @since 2.1 + */ + int GetCurrentScrollPosition(void) const; + + /** + * Gets the current scroll position + * + * @since 2.1 + */ + float GetCurrentScrollPositionF(void) const; + + /* + * Enables or disables the scroll of GroupedTableView items. + * + * @since 2.0 + */ + void SetScrollEnabled(bool enable); + + /* + * Checks whether the scroll is enabled or disabled. + * + * @since 2.0 + */ + bool IsScrollEnabled(void) const; + + /** + * Begins the reordering mode. + * + * @since 2.1 + * + * @see IGroupedTableViewItemEventListener::OnGroupedTableViewItemReordered() + */ + void BeginReorderingMode(void); + + /** + * Ends the reordering mode. + * + * @since 2.1 + * + * @see IGroupedTableViewItemEventListener::OnGroupedTableViewItemReordered() + */ + void EndReorderingMode(void); + + /** + * Checks whether the %GroupedTableView control is in reordering mode. + * + * @since 2.1 + * + * @return @c true if the %GroupedTableView is in reordering mode, @n + * else @c false + */ + bool IsInReorderingMode(void) const; + + /** + * Opens the context item at a specified index. + * + * @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. + */ + result OpenContextItem(int groupIndex, int itemIndex); + + /** + * Closes the context item at a specified index. + * + * @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. + */ + result CloseContextItem(int groupIndex, int itemIndex); + + /** + * Checks whether the context item at a specified index has been opened or not. + * + * @since 2.1 + * + * @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. + */ + bool IsContextItemOpened(int groupIndex, int itemIndex) const; + +private: + friend class _TableViewImpl; + + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + GroupedTableView(const GroupedTableView& rhs); + + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + GroupedTableView& operator =(const GroupedTableView& rhs); +}; // GroupedTableView + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_GROUPED_TABLE_VIEW_H_ diff --git a/inc/FUiCtrlHeader.h b/inc/FUiCtrlHeader.h new file mode 100644 index 0000000..8d8389b --- /dev/null +++ b/inc/FUiCtrlHeader.h @@ -0,0 +1,1100 @@ +// +// 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 FUiCtrlHeader.h + * @brief This is the header file for the %Header class. + * + * This header file contains the declarations of the %Header class. + */ +#ifndef _FUI_CTRL_HEADER_H_ +#define _FUI_CTRL_HEADER_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ +class _HeaderImpl; + +/** + * @enum HeaderStyle + * + * Defines the possible styles of a %Header control. + * + * @since 2.0 + */ +enum HeaderStyle +{ + HEADER_STYLE_TITLE, /**< The title style */ + HEADER_STYLE_TITLE_BUTTON, /**< The title button style */ + HEADER_STYLE_SEGMENTED, /**< The segmented style */ + HEADER_STYLE_SEGMENTED_WITH_TITLE, /**< The segmented style with title */ + HEADER_STYLE_TAB, /**< The tab style */ + HEADER_STYLE_TAB_WITH_TITLE, /**< The tab with title style */ + HEADER_STYLE_BUTTON, /**< The button style */ + HEADER_STYLE_TAB_LARGE /**< The large tab style @b Since: @b 2.2 */ +}; + +/** + * @enum HeaderAnimationPosition + * + * Defines the possible positions of the waiting animation of a header. + * + * @since 2.0 + */ +enum HeaderAnimationPosition +{ + HEADER_ANIMATION_POSITION_TITLE, /**< The title animation */ + HEADER_ANIMATION_POSITION_BUTTON_LEFT, /**< The left button animation */ + HEADER_ANIMATION_POSITION_BUTTON_RIGHT /**< The right button animation */ +}; + +/** + * @class Header + * @brief This class is an implementation of a %Header control. + * + * @since 2.0 + * + * The %Header class displays a multi-purpose area at the top of the screen that usually acts as a placeholder for descriptive + * contents, such as a title of the current screen. It can also contain buttons for performing various user-defined tasks. + * + * For more information on the class features, see Header. + * + * The following examples demonstrate how to use the %Header class. + * + * - Constructing a header: @n + * When creating a Form, specify the FORM_STYLE_HEADER parameter in the Form::Construct() method. + * + * @code + * // Initializes + * bool + * TestForm::Initialize(void) + * { + * Construct(FORM_STYLE_NORMAL | FORM_STYLE_PORTRAIT_INDICATOR | FORM_STYLE_HEADER ); + * } + * @endcode + * + * - Using the header: @n + * Gets the header with the GetHeader() method, and sets the header style. + * + * @code + * bool + * TestForm::Initialize(void) + * { + * Header* pHeader = GetHeader(); + * pHeader->SetStyle(HEADER_STYLE_SEGMENTED); + * } + * @endcode + * + * - Adding items to the header: @n + * Adds HeaderItems or ButtonItems according to the header style. The action ID registered in the Construct() method is notified + * when items are touched. + * + * @code + * bool + * TestForm::Initialize(void) + * { + * HeaderItem headerItem; + * headerItem.Construct(ID_HEADER_ITEM); + * headerItem.SetText("HeaderItem"); + * + * pHeader->AddItem(headerItem); + * + * ButtonItem buttonItem; + * buttonItem.Construct(BUTTON_ITEM_STYLE_ICON, ID_HEADER_BUTTON); + * buttonItem.SetIcon(BUTTON_ITEM_STATUS_NORMAL, __pBitmap); + * + * pHeader->SetButton(BUTTON_POSITION_LEFT, buttonItem); + * + * } + * @endcode + * + * - Setting the header title and description: + * + * @code + * bool + * TestForm::Initialize(void) + * { + * pHeader->SetTitleText(L"Header Title"); + * pHeader->SetDescriptionText(L"Description Text"); + * } + * @endcode + */ +class _OSP_EXPORT_ Header + : public Tizen::Ui::Control +{ + +public: + /** + * Adds the specified header item. + * + * @since 2.0 + * + * @return An error code + * @param[in] item The HeaderItem object to add + * @exception E_SUCCESS The method is successful. + * @exception E_MAX_EXCEEDED The number of items has exceeded the maximum limit. + * @exception E_INVALID_ARG A specified input parameter is invalid. @n + * The specified item is not constructed. + * @exception E_SYSTEM A system error has occurred. + * @remarks The %Header 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 %Header control. + */ + result AddItem(const HeaderItem& item); + + + /** + * Inserts the header item at the specified index. + * + * @since 2.0 + * + * @return An error code + * @param[in] itemIndex The index where the item should be inserted + * @param[in] item The HeaderItem object to insert + * @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. + * @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. + * @remarks The %Header 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 %Header control. + */ + result InsertItemAt(int itemIndex, const HeaderItem& item); + + + /** + * Checks whether a button item is set at the specified position. + * + * @since 2.0 + * + * @return @c true if the button item is set at the specified position, @n + * else @c false + * @param[in] position The position of the button item + * @exception E_SUCCESS The method is successful. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + bool IsButtonSet(ButtonPosition position) const; + + + /** + * Gets the state of the specified button item. + * + * @since 2.0 + * + * @return The state of the button item at the specified position, @n + * else @c BUTTON_ITEM_STATUS_NORMAL if an error occurs + * @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. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + ButtonItemStatus GetButtonStatus(ButtonPosition position) const; + + + /** + * Gets the color of the button item for the specified state. + * + * @since 2.0 + * + * @return The color of the button item, @n + * else RGBA (0,0,0,0) if an error occurs + * @param[in] status The status of the button item + * @exception E_SUCCESS The method is successful. + * @remarks The specific error code can be accessed using the GetLastResult() method. + * @see SetButtonColor() + */ + Tizen::Graphics::Color GetButtonColor(ButtonItemStatus status) const; + + + /** + * Gets the text color of the button item for the specified state. + * + * @since 2.0 + * + * @return The text color of the button item, @n + * else RGBA (0,0,0,0) if an error occurs + * @param[in] status The status of the button item + * @exception E_SUCCESS The method is successful. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + Tizen::Graphics::Color GetButtonTextColor(ButtonItemStatus status) const; + + + /** + * Gets the description text of the %Header control that has the title style. + * + * @since 2.0 + * + * @return The description text, @n + * else an empty string if an error occurs + * @exception E_SUCCESS The method is successful. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + Tizen::Base::String GetDescriptionText(void) const; + + + /** + * Gets the description text color of the %Header control that has the title style. + * + * @since 2.0 + * + * @return The description 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. + */ + Tizen::Graphics::Color GetDescriptionTextColor(void) const; + + + /** + * Gets the color of the header item for the specified item state. + * + * @since 2.0 + * + * @return The color of the item, @n + * else RGBA (0,0,0,0) if an error occurs + * @param[in] status The item status + * @exception E_SUCCESS The method is successful. + * @remarks The specific error code can be accessed using the GetLastResult() method. + * @see SetItemColor() + */ + Tizen::Graphics::Color GetItemColor(HeaderItemStatus status) const; + + + /** + * Gets the total number of header items. + * + * @since 2.0 + * + * @return The total number of header items, @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. + */ + int GetItemCount(void) const; + + + /** + * Gets the state of the specified header item. + * + * @since 2.0 + * + * @return The item status + * @param[in] itemIndex The index of the item + * @param[out] status The item status + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure. @n + * The index is greater than or equal to the number of elements or less than @c 0. + */ + result GetItemStatus(int itemIndex, HeaderItemStatus& status) const; + + + /** + * Gets the text color of the header item for the specified item state. + * + * @since 2.0 + * + * @return The item's text color, @n + * else RGBA (0,0,0,0) if an error occurs + * @param[in] status The item status + * @exception E_SUCCESS The method is successful. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + Tizen::Graphics::Color GetItemTextColor(HeaderItemStatus status) const; + + + /** + * Gets the style of the %Header control. + * + * @since 2.0 + * + * @return The %Header control style, @n + * else @c HEADER_STYLE_TITLE if an error occurs + * @exception E_SUCCESS The method is successful. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + HeaderStyle GetStyle(void) const; + + + /** + * Gets the index of the currently selected item. + * + * @since 2.0 + * + * @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, ::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; + + + /** + * Gets the title text of the %Header control that has the title style. + * + * @since 2.0 + * + * @return The title text, @n + * else an empty string if an error occurs + * @exception E_SUCCESS The method is successful. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + Tizen::Base::String GetTitleText(void) const; + + + /** + * Gets the title text color of the %Header control that has the title style. + * + * @since 2.0 + * + * @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. + */ + Tizen::Graphics::Color GetTitleTextColor(void) const; + + + /** + * Gets the color of the %Header control. + * + * @since 2.0 + * + * @return The header 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. + */ + Tizen::Graphics::Color GetColor(void) const; + + + /** + * Gets the status of the waiting animation at the specified position. + * + * @since 2.0 + * + * @return The animation status + * @param[in] animationPos The waiting animation position + * @exception E_SUCCESS The method is successful. + * @remarks The specific error code can be accessed using the GetLastResult() method. @n + * This method returns @c ANIMATION_STOPPED, if no animation is in progress at the specified position. + * @see PauseWaitingAnimation() + * @see PlayWaitingAnimation() + * @see StopWaitingAnimation() + */ + AnimationStatus GetWaitingAnimationStatus(HeaderAnimationPosition animationPos) const; + + + /** + * Pauses the waiting animation at the specified position. + * + * @since 2.0 + * + * @return An error code + * @param[in] animationPos The waiting animation position + * @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 waiting animation is in progress at the specified position. + * @exception E_SYSTEM A system error has occurred. + * @see PlayWaitingAnimation() + * @see StopWaitingAnimation() + */ + result PauseWaitingAnimation(HeaderAnimationPosition animationPos); + + + /** + * Starts the waiting animation at the specified position. + * + * @since 2.0 + * + * @return An error code + * @param[in] animationPos The waiting animation position + * @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 (except for @c HEADER_ANIMATION_POSITION_TITLE). + * @exception E_SYSTEM A system error has occurred. + * @see SetButton() + * @see IsButtonSet() + * @see GetWaitingAnimationStatus() + * @see PauseWaitingAnimation() + * @see StopWaitingAnimation() + */ + result PlayWaitingAnimation(HeaderAnimationPosition animationPos); + + + /** + * Removes all the button items. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result RemoveAllButtons(void); + + + /** + * Removes all the %Header control items. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @remarks The left button, right button, and back button items are not removed. + */ + result RemoveAllItems(void); + + + /** + * Removes the item at the specified index. + * + * @since 2.0 + * + * @return An error code + * @param[in] itemIndex The index of the item to remove + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure. @n + * The index is greater than or equal to the number of elements or less than @c 0. + * @exception E_SYSTEM A system error has occurred. + */ + result RemoveItemAt(int itemIndex); + + + /** + * Removes the button item at the specified position. + * + * @since 2.0 + * + * @return An error code + * @param[in] position The position of the button item to remove + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @remarks If no button item is set at the specified position, the method returns @c E_SUCCESS. + */ + result RemoveButtonAt(ButtonPosition position); + + + /** + * Sets the background bitmap image. + * + * @since 2.0 + * + * @return An error code + * @param[in] pBitmap The background image + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetBackgroundBitmap(const Tizen::Graphics::Bitmap* pBitmap); + + + /** + * Sets the button item at the specified position. + * + * @since 2.0 + * + * @return An error code + * @param[in] position The position at which to set the specified button item + * @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_SYSTEM A system error has occurred. + * @remarks If there is an existing button item at the specified position, it is replaced with a new item. @n + * The contents of the specified item are copied. + */ + result SetButton(ButtonPosition position, const ButtonItem& button); + + + /** + * Sets the button item color for the specified state. + * + * @since 2.0 + * + * @return An error code + * @param[in] status The status of the button item + * @param[in] color The button item color to set + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see GetButtonColor() + */ + result SetButtonColor(ButtonItemStatus status, const Tizen::Graphics::Color& color); + + + /** + * Enables or disables the button item at the specified position. + * + * @since 2.0 + * + * @return An error code + * @param[in] position The button item position + * @param[in] enable Set to @c true to enable the specified button item, @n + * else @c false to disable + * @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. + * @exception E_SYSTEM A system error has occurred. + */ + result SetButtonEnabled(ButtonPosition position, bool enable); + + + /** + * Sets the text color of the button item for the specified state. + * + * @since 2.0 + * + * @return An error code + * @param[in] status The status of the button item + * @param[in] color The button item text color to set + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetButtonTextColor(ButtonItemStatus status, const Tizen::Graphics::Color& color); + + + /** + * Sets the badge icon of the specified ButtonItem. + * + * @since 2.0 + * + * @return An error code + * @param[in] position The button item position + * @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 + * or ::HEADER_STYLE_TAB_LARGE. + */ + result SetButtonBadgeIcon(ButtonPosition position, const Tizen::Graphics::Bitmap* pBadgeIcon); + + + /** + * Sets the numbered badge icon of the specified ButtonItem. + * + * @since 2.0 + * + * @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 + * @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 + * 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); + + + /** + * Sets the contents of the %Header control item at the specified index. + * + * @since 2.0 + * + * @return An error code + * @param[in] itemIndex The index at which to set the specified item + * @param[in] item The item to set + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure. @n + * The index is greater than or equal to the number of elements or less than @c 0. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @exception E_SYSTEM A system error has occurred. + * @remarks The contents of the specified item are copied. + */ + result SetItemAt(int itemIndex, const HeaderItem& item); + + + /** + * Sets the badge icon of the specified segmented style header item. + * + * @since 2.0 + * + * @return An error code + * @param[in] itemIndex The item index + * @param[in] pBadgeIcon The bitmap for the icon + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure. @n + * The index is greater than or equal to the number of elements or less than @c 0. + * @exception E_UNSUPPORTED_OPERATION The operation is not supported when the style of the %Header control is ::HEADER_STYLE_TITLE. + * @exception E_SYSTEM A system error has occurred. + */ + result SetItemBadgeIcon(int itemIndex, const Tizen::Graphics::Bitmap* pBadgeIcon); + + + /** + * Sets the numbered badge icon of the specified segmented style header item. + * + * @since 2.0 + * + * @return An error code + * @param[in] itemIndex The item index + * @param[in] number The number value that should be displayed as the badge icon + * @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 + * The index is greater than or equal to the number of elements or less than @c 0. + * @exception E_UNSUPPORTED_OPERATION The operation is not supported when the style of the %Header control is ::HEADER_STYLE_TITLE. + * @exception E_SYSTEM A system error has occurred. + * @remarks To remove the numbered badge icon from an item, pass @c 0 as the value of @c number. + */ + result SetItemNumberedBadgeIcon(int itemIndex, int number); + + + /** + * Sets the item color for the specified state. + * + * @since 2.0 + * + * @return An error code + * @param[in] status The item status + * @param[in] color The item color to set + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see GetItemColor() + */ + result SetItemColor(HeaderItemStatus status, const Tizen::Graphics::Color& color); + + + /** + * Sets the item state at the specified index in the %Header control. + * + * @since 2.0 + * + * @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 + * 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 + * The index is greater than or equal to the number of elements or less than @c 0. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n + * The specified item is currently selected. + * @exception E_SYSTEM A system error has occurred. + */ + result SetItemEnabled(int itemIndex, bool enable); + + + /** + * Sets the item text color for the specified state. + * + * @since 2.0 + * + * @return An error code + * @param[in] status The item status + * @param[in] color The item text color to set + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetItemTextColor(HeaderItemStatus status, const Tizen::Graphics::Color& color); + + + /** + * Sets the selected item at the specified index. + * + * @since 2.0 + * + * @return An error code + * @param[in] itemIndex The index of the item to select + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure. @n + * The index is greater than or equal to the number of elements or less than @c 0. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n + * The item at the specified index is disabled. + * @exception E_UNSUPPORTED_OPERATION The operation is not supported when the %Header control style is ::HEADER_STYLE_TITLE, @n + * ::HEADER_STYLE_TITLE_BUTTON or ::HEADER_STYLE_BUTTON. + * @exception E_SYSTEM A system error has occurred. + */ + result SetItemSelected(int itemIndex); + + + /** + * Sets the color of the %Header control. + * + * @since 2.0 + * + * @return An error code + * @param[in] color The header color + * @exception E_SUCCESS The method is successful. + */ + result SetColor(const Tizen::Graphics::Color& color); + + + /** + * Sets the style of the %Header control. + * + * @since 2.0 + * + * @return An error code + * @param[in] style The header style to set + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @remarks All items and buttons will be removed if the style is changed. + */ + result SetStyle(HeaderStyle style); + + + /** + * Sets the title icon of the %Header control that has the title style. + * + * @since 2.0 + * + * @return An error code + * @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, + * ::HEADER_STYLE_SEGMENTED_WITH_TITLE or ::HEADER_STYLE_TAB_WITH_TITLE. + * @exception E_SYSTEM A system error has occurred. + */ + result SetTitleIcon(const Tizen::Graphics::Bitmap* pIcon); + + + /** + * Sets the title text of the %Header control. + * + * @since 2.0 + * + * @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, + * ::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 + * When the title icon is set along with the title text, the title retains the left alignment. + */ + result SetTitleText(const Tizen::Base::String& text); + + + /** + * Sets the title text color. + * + * @since 2.0 + * + * @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, + * ::HEADER_STYLE_SEGMENTED_WITH_TITLE or ::HEADER_STYLE_TAB_WITH_TITLE. + * @exception E_SYSTEM A system error has occurred. + */ + result SetTitleTextColor(const Tizen::Graphics::Color& color); + + + /** + * Sets the description text. + * + * @since 2.0 + * + * @return An error code + * @param[in] text The text to set + * @exception E_SUCCESS The method is successful. + * @exception E_UNSUPPORTED_OPERATION The current state of the instance does not support the execution of the specified operation. @n + * The style of the %Header control is not ::HEADER_STYLE_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 + * When the title icon is set along with the title text, the title retains the left alignment. + */ + result SetDescriptionText(const Tizen::Base::String& text); + + + /** + * Sets the description text color. + * + * @since 2.0 + * + * @return An error code + * @param[in] color The description text color to set + * @exception E_SUCCESS The method is successful. + * @exception E_UNSUPPORTED_OPERATION The current state of the instance does not support the execution of the specified operation. @n + * The style of the %Header control is not ::HEADER_STYLE_TITLE. + * @exception E_SYSTEM A system error has occurred. + */ + result SetDescriptionTextColor(const Tizen::Graphics::Color& color); + + + /** + * Stops the waiting animation in progress at the specified position. + * + * @since 2.0 + * + * @return An error code + * @param[in] animationPos The waiting animation position + * @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 returns @c E_INVALID_OPERATION if no waiting animation is in progress at the specified position. + * @see GetWaitingAnimationStatus() + * @see PauseWaitingAnimation() + * @see PlayWaitingAnimation() + */ + result StopWaitingAnimation(HeaderAnimationPosition animationPos); + + + /** + * Adds an IActionEventListener instance. @n + * OnActionPerformed() of the added listener is called when the user selects an item. + * + * @since 2.0 + * + * @param[in] listener The event listener to add + */ + void AddActionEventListener(Tizen::Ui::IActionEventListener& listener); + + + /** + * Removes an IActionEventListener instance. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to remove + */ + void RemoveActionEventListener(Tizen::Ui::IActionEventListener& listener); + + + /** + * Checks whether the tab edit mode is enabled. + * + * @since 2.0 + * + * @return @c true if the tab edit mode is set, @n + * else @c false + */ + bool IsTabEditModeEnabled(void) const; + + + /** + * Enables or disables the tab edit mode. + * + * @since 2.0 + * + * @return An error code + * @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, + * ::HEADER_STYLE_TAB_WITH_TITLE or ::HEADER_STYLE_TAB_LARGE. + */ + result SetTabEditModeEnabled(bool enable); + + + /** + * Sets the back button. + * + * @brief [Deprecated] + * @deprecated This method is deprecated because hardware back key is mandatory for Tizen mobile devices. @n + * This method is not guaranteed to work properly. + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_UNSUPPORTED_OPERATION This device does not support the software back button. + * @remarks When the back button is pressed, OnFormBackRequested() of IFormBackEventListener is called. + */ + result SetBackButton(void); + + + /** + * Checks whether the back button item is set. + * + * @brief [Deprecated] + * @deprecated This method is deprecated because hardware back key is mandatory for Tizen mobile devices. @n + * This method is not guaranteed to work properly. + * @since 2.0 + * + * @return @c true if the back button item is set, @n + * else @c false + */ + bool IsBackButtonSet(void) const; + + + /** + * Removes the back button item. + * + * @brief [Deprecated] + * @deprecated This method is deprecated because hardware back key is mandatory for Tizen mobile devices. @n + * This method is not guaranteed to work properly. + * @since 2.0 + * + */ + void RemoveBackButton(void); + + + /** + * Enables or disables the back button. + * + * @brief [Deprecated] + * @deprecated This method is deprecated because hardware back key is mandatory for Tizen mobile devices. @n + * This method is not guaranteed to work properly. + * @since 2.0 + * + * @return An error code + * @param[in] enable Set to @c true to enable the back button, @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 + * The back button item is not set. + */ + result SetBackButtonEnabled(bool enable); + + + /** + * Gets the state of the back button. + * + * @brief [Deprecated] + * @deprecated This method is deprecated because hardware back key is mandatory for Tizen mobile devices. @n + * This method is not guaranteed to work properly. + * @since 2.0 + * + * @return The state of the back button, @n + * else @c BUTTON_ITEM_STATUS_NORMAL if an error occurs. + * @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 back button is not set. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + ButtonItemStatus GetBackButtonStatus(void) const; + + + /** + * Gets the position and size of the specified button item. + * + * @since 2.0 + * + * @return The position and size of the button item at the specified position. + * @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. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + Tizen::Graphics::Rectangle GetButtonBounds(ButtonPosition position) const; + + /** + * Gets the position and size of the specified button item. + * + * @since 2.1 + * + * @return The position and size of the button item at the specified position. + * @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. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + Tizen::Graphics::FloatRectangle GetButtonBoundsF(ButtonPosition position) const; + + /** + * Sets the badge icon. + * + * @since 2.1 + * + * @return An error code + * @param[in] pBadgeIcon The bitmap for the badge icon + * @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. + * @remarks For icon size details, see here. + */ + result SetTitleBadgeIcon(const Tizen::Graphics::Bitmap* pBadgeIcon); + + /** + * Sets the numbered badge icon. + * + * @since 2.1 + * + * @return An error code + * @param[in] number The number value that should be displayed as the badge icon + * @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_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. + * @remarks To remove the numbered badge icon from an item, pass @c 0 as the value of @c number. + */ + result SetTitleNumberedBadgeIcon(int number); + + +protected: + // + //This method is for internal use only. Using this method can cause behavioral, security-related, + //and consistency-related issues in the application. + // + // This is the default constructor for this class. + // + // @since 2.0 + // + Header(void); + + + // + //This method is for internal use only. Using this method can cause behavioral, security-related, + //and consistency-related issues in the application. + // + // This is the destructor for this class. + // + // @since 2.0 + // + virtual ~Header(void); + + +private: + // + //This method is for internal use only. Using this method can cause behavioral, security-related, + //and consistency-related issues in the application. + // + // Initializes this instance of %Header with the specified parameter. + // + // @since 2.0 + // @return An error code + // @exception E_SUCCESS The method is successful. + // @exception E_SYSTEM A system error has occurred. + // + result Construct(void); + + Header(const Header& rhs); + Header& operator =(const Header& rhs); + +private: + friend class _FormImpl; + friend class _HeaderImpl; + +}; + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_HEADER_H_ diff --git a/inc/FUiCtrlHeaderItem.h b/inc/FUiCtrlHeaderItem.h new file mode 100644 index 0000000..18ec02c --- /dev/null +++ b/inc/FUiCtrlHeaderItem.h @@ -0,0 +1,202 @@ +// +// 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 FUiCtrlHeaderItem.h + * @brief This is the header file for the %HeaderItem class. + * + * This header file contains the declarations of the %HeaderItem class. + */ +#ifndef _FUI_CTRL_HEADER_ITEM_H_ +#define _FUI_CTRL_HEADER_ITEM_H_ + +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ +/** + * @enum HeaderItemStatus + * + * Defines the possible statuses of a %HeaderItem control. + * + * @since 2.0 + */ +enum HeaderItemStatus +{ + HEADER_ITEM_STATUS_NORMAL, /**< The normal status */ + HEADER_ITEM_STATUS_PRESSED, /**< The pressed status */ + HEADER_ITEM_STATUS_SELECTED, /**< The selected status */ + HEADER_ITEM_STATUS_HIGHLIGHTED, /**< The highlighted status */ + HEADER_ITEM_STATUS_DISABLED /**< The disabled status */ +}; + +/** + * @class HeaderItem + * @brief This class is an implementation of a %HeaderItem control. + * + * @since 2.0 + * + * The %HeaderItem class is a helper class that specifies the properties of the Header item. + * + * For more information on the class features, see Header. + */ +class _OSP_EXPORT_ HeaderItem + : public Tizen::Base::Object +{ +public: + + /** + * This is the default constructor for this class. + * + * @since 2.0 + */ + HeaderItem(void); + + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~HeaderItem(void); + + + /** + * Initializes this instance of %HeaderItem with the specified parameters. + * + * @since 2.0 + * + * @return An error code + * @param[in] actionId The action ID of this item + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. @n + * The action ID of the specified item must be a positive integer. + */ + result Construct(int actionId); + + + /** + * Gets the action ID of the %HeaderItem control. + * + * @since 2.0 + * + * @return The action ID, @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. + */ + int GetActionId(void) const; + + + /** + * Gets the text of the %HeaderItem control. + * + * @since 2.0 + * + * @return The item text, @n + * else an empty string if an error occurs + * @exception E_SUCCESS The method is successful. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + Tizen::Base::String GetText(void) const; + + + /** + * Sets the action ID of the %HeaderItem control. + * + * @since 2.0 + * + * @return An error code + * @param[in] actionId The specified action ID for this item + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. @n + * The action ID of the specified item must be a positive integer. + */ + result SetActionId(int actionId); + + + /** + * Sets the background bitmap of the %HeaderItem control. + * + * @since 2.0 + * + * @return An error code + * @param[in] status The item status + * @param[in] pBitmap The background bitmap to set, @n + * else @c null if no bitmap is displayed + * @exception E_SUCCESS The method is successful. + * @remarks If the size of the bitmap is greater than the size of the item, the bitmap is scaled down. + */ + result SetBackgroundBitmap(HeaderItemStatus status, const Tizen::Graphics::Bitmap* pBitmap); + + + /** + * Sets the icon of the header item. + * + * @since 2.0 + * + * @return An error code + * @param[in] status The status of the header item + * @param[in] pIcon The icon to set, @n + * else @c null if no icon is set + * @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 @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. + */ + result SetIcon(HeaderItemStatus status, const Tizen::Graphics::Bitmap* pIcon); + + + /** + * Sets the text of the %HeaderItem control. + * + * @since 2.0 + * + * @return An error code + * @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. + * - Use @htmlonly '\n' @endhtmlonly to denote the end of the line. + */ + result SetText(const Tizen::Base::String& text); + + +private: + HeaderItem(const HeaderItem& headerItem); + HeaderItem& operator =(const HeaderItem& headerItem); + + +private: + friend class _HeaderImpl; + friend class _HeaderItemImpl; + + class _HeaderItemImpl * __pImpl; + +}; + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_HEADER_ITEM_H_ diff --git a/inc/FUiCtrlICustomElement.h b/inc/FUiCtrlICustomElement.h new file mode 100644 index 0000000..372f039 --- /dev/null +++ b/inc/FUiCtrlICustomElement.h @@ -0,0 +1,88 @@ +// +// 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 FUiCtrlICustomElement.h + * @brief This is the header file for the %ICustomElement interface. + * + * This header file contains the declarations of %ICustomElement and its helper classes. + */ + +#ifndef _FUI_CTRL_ICUSTOM_ELEMENT_H_ +#define _FUI_CTRL_ICUSTOM_ELEMENT_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @interface ICustomElement + * @brief This interface represents the common behaviors of a custom element. + * + * @since 2.0 + * + * The %ICustomElement interface is the listener interface for custom drawing in a list item. + * The class that processes a custom drawing event implements this interface. The list items are added by calling the + * AddElement(int elementId, const %ICustomElement &element) method. When the custom drawing event occurs and the list item must be + * redrawn, the OnDraw() method is invoked. + * + * For more information on the class features, see ListViews. + * + */ +class _OSP_EXPORT_ ICustomElement +{ +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. + * + * @since 2.0 + */ + virtual ~ICustomElement(void) {} + +// Operation +public: + /** + * Called when a custom element of the item is drawn. + * + * @since 2.0 + * + * @return @c true if the drawing is successful, @n + * 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 + */ + virtual bool OnDraw(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::Rectangle& rect, Tizen::Ui::Controls::ListItemDrawingStatus status) = 0; + +protected: + // + // The following methods are reserved and may change its name at any time without prior notice. + // + virtual void ICustomElement_Reserved1(void) {} + virtual void ICustomElement_Reserved2(void) {} + virtual void ICustomElement_Reserved3(void) {} +}; // ICustomElement + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_ICUSTOM_ELEMENT_H_ + diff --git a/inc/FUiCtrlICustomElementF.h b/inc/FUiCtrlICustomElementF.h new file mode 100644 index 0000000..8ba1030 --- /dev/null +++ b/inc/FUiCtrlICustomElementF.h @@ -0,0 +1,88 @@ +// +// 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 FUiCtrlICustomElementF.h + * @brief This is the header file for the %ICustomElementF class. + * + * This header file contains the declarations of the %ICustomElementF class and its helper classes. + */ + +#ifndef _FUI_CTRL_ICUSTOM_ELEMENT_F_H_ +#define _FUI_CTRL_ICUSTOM_ELEMENT_F_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @interface ICustomElementF + * @brief This interface represents the common behaviors of a custom element. + * + * @since 2.1 + * + * The %ICustomElementF interface is the listener interface for custom drawing in a list item. + * The class that processes a custom drawing event implements this interface. The list items are added by calling the + * AddElement(int elementId, const %ICustomElementF &element) method. When the custom drawing event occurs and the list item must be + * redrawn, the OnDraw() method is invoked. + * + * For more information on the class features, see ListViews. + * + */ +class _OSP_EXPORT_ ICustomElementF +{ +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. + * + * @since 2.1 + */ + virtual ~ICustomElementF(void) {} + +// Operation +public: + /** + * Called when a custom element of the item is drawn. + * + * @since 2.1 + * + * @return @c true if the drawing is successful, @n + * 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 + */ + virtual bool OnDraw(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& rect, Tizen::Ui::Controls::ListItemDrawingStatus status) = 0; + +protected: + // + // The following methods are reserved and may change its name at any time without prior notice. + // + virtual void ICustomElementF_Reserved1(void) {} + virtual void ICustomElementF_Reserved2(void) {} + virtual void ICustomElementF_Reserved3(void) {} +}; // ICustomElementF + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_ICUSTOM_ELEMENT_F_H_ + diff --git a/inc/FUiCtrlICustomListElement.h b/inc/FUiCtrlICustomListElement.h new file mode 100644 index 0000000..7403b91 --- /dev/null +++ b/inc/FUiCtrlICustomListElement.h @@ -0,0 +1,107 @@ +// +// 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. +// +/** + * @if OSPDEPREC + * @file FUiCtrlICustomListElement.h + * @brief This is the header file for the %ICustomListElement interface. + * + * This header files contains the declarations of %ICustomListElement interface. + * @endif + */ + +#ifndef _FUI_CTRL_ICUSTOM_LIST_ELEMENT_H_ +#define _FUI_CTRL_ICUSTOM_LIST_ELEMENT_H_ + +//includes +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @if OSPDEPREC + * @enum CustomListItemStatus + * + * Defines the value of status of the CustomList item. + * + * @brief [Deprecated] + * @deprecated This enum is deprecated. Instead of using this enum, use the ListItemStatus enumeration. + * @since 2.0 + * @endif + */ +enum CustomListItemStatus +{ + CUSTOM_LIST_ITEM_STATUS_NORMAL = 0, /**< @if OSPDEPREC The status of the item is normal @endif */ + CUSTOM_LIST_ITEM_STATUS_SELECTED, /**< @if OSPDEPREC The status of the item is selected @endif */ + CUSTOM_LIST_ITEM_STATUS_FOCUSED /**< @if OSPDEPREC The status of the item is focused @endif */ +}; + +/** + * @if OSPDEPREC + * @interface ICustomListElement + * @brief [Deprecated] This interface represents the common behaviors for a CustomList element. + * + * @deprecated This class is deprecated. Instead of using this class, use the ICustomElement class. + * @since 2.0 + * + * + * The %ICustomListElement interface provides interfaces used for custom drawing + * in a custom list item. + * + * If an application wants to draw its own contents in a custom list item, it must + * implement %ICustomListElement and add elements by calling SetElement(int elementId, + * const %ICustomListElement &element). When the custom list item needs to be redrawn, + * DrawElement() is called by the framework. + * @endif + */ +class _OSP_EXPORT_ ICustomListElement + : public Tizen::Base::Object +{ +public: + /** + * @if OSPDEPREC + * This is the destructor for this class. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ICustomElement class. + * @since 2.0 + * @endif + */ + virtual ~ICustomListElement(void) {} + +// Operation +public: + /** + * @if OSPDEPREC + * Draws a custom element of the item. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ICustomElement class. + * @since 2.0 + * + * @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] itemStatus The status of the item + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + virtual result DrawElement(const Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::Rectangle& rect, CustomListItemStatus itemStatus) = 0; +}; //ICustomListElement +}}} //Tizen::Ui::Controls +#endif // _FUI_CTRL_ICUSTOM_LIST_ELEMENT_H_ diff --git a/inc/FUiCtrlIEditTextFilter.h b/inc/FUiCtrlIEditTextFilter.h new file mode 100644 index 0000000..495f67a --- /dev/null +++ b/inc/FUiCtrlIEditTextFilter.h @@ -0,0 +1,119 @@ +// +// 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 FUiCtrlIEditTextFilter.h + * @brief This is the header file for the %IEditTextFilter interface. + * + * This header file contains the declarations of the %IEditTextFilter interface. + * + */ +#ifndef _FUI_CTRL_IEDIT_TEXT_FILTER_H_ +#define _FUI_CTRL_IEDIT_TEXT_FILTER_H_ + +#include + +namespace Tizen {namespace Ui { namespace Controls +{ + +/** + * @interface IEditTextFilter + * @brief This interface defines the text filter. + * + * @since 2.1 + * + * The %IEditTextFilter interface is the listener interface for handling texts, for example, from EditFields. + * The class that processes a text event implements this interface, and the instance created with that class is registered with a + * UI control, using the control(EditArea, EditField, ExpandableEditArea, Keypad, SearchBar)'s SetEditTextFilter() method. + * + */ + +class _OSP_EXPORT_ IEditTextFilter +{ +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. + * + * @since 2.1 + */ + virtual ~IEditTextFilter(void) {} + + /** + * Checks whether the text to be pasted from the %Clipboard needs to be replaced by other text. + * + * @since 2.1 + * + * @return @c true if the pasted text needs to be replaced, @n + * else @c false + * @param[in] pastedText The pasted text + * @param[out] replacedText The user-defined replacement text + */ + virtual bool ValidatePastedText(const Tizen::Base::String& pastedText, Tizen::Base::String& replacedText) = 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 IEditTextFilter_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 IEditTextFilter_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 IEditTextFilter_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 IEditTextFilter_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 IEditTextFilter_Reserved5(void) {} +}; // IEditTextFilter + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_IEDIT_TEXT_FILTER_H_ + diff --git a/inc/FUiCtrlIExpandableEditAreaEventListener.h b/inc/FUiCtrlIExpandableEditAreaEventListener.h new file mode 100644 index 0000000..e285084 --- /dev/null +++ b/inc/FUiCtrlIExpandableEditAreaEventListener.h @@ -0,0 +1,124 @@ +// +// 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 FUiCtrlIExpandableEditAreaEventListener.h + * @brief This is the header file for the %IExpandableEditAreaEventListener interface. + * + * This header file contains the declarations of the %IExpandableEditAreaEventListener interface. + */ +#ifndef _FUI_CTRL_IEXPANDABLE_EDIT_AREA_EVENT_LISTENER_H_ +#define _FUI_CTRL_IEXPANDABLE_EDIT_AREA_EVENT_LISTENER_H_ + +// includes +#include +#include + +namespace Tizen { namespace Ui +{ +class Control; +} } // Tizen::Ui + +// namespace declaration +namespace Tizen { namespace Ui { namespace Controls +{ + /** + * @interface IExpandableEditAreaEventListener + * @brief This interface defines a listener for the %ExpandableEditArea events. + * + * @since 2.0 + * + * The %IExpandableEditAreaEventListener interface is the listener interface for receiving %ExpandableEditArea events. + * + * For more information on the class features, + * see ExpandableEditArea. + * + */ +class _OSP_EXPORT_ IExpandableEditAreaEventListener + : public Tizen::Base::Runtime::IEventListener +{ + +// Lifecycle +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~IExpandableEditAreaEventListener(void) {} + + +// Operations +public: + /** + * Called when a new line is added to ExpandableEditArea. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] newLineCount The new line count + * @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; + + /** + * Called when a line is removed from ExpandableEditArea. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] newLineCount The new line count + * @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; + + +// Reserves +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. + // + // @since 2.0 + // + virtual void IExpandableEditAreaEventListener_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. + // + // @since 2.0 + // + virtual void IExpandableEditAreaEventListener_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. + // + // @since 2.0 + // + virtual void IExpandableEditAreaEventListener_Reserved3(void) { } +}; // IExpandableEditAreaEventListener + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_IEXPANDABLE_EDIT_AREA_EVENT_LISTENER_H_ diff --git a/inc/FUiCtrlIFastScrollListener.h b/inc/FUiCtrlIFastScrollListener.h new file mode 100644 index 0000000..63bc0b8 --- /dev/null +++ b/inc/FUiCtrlIFastScrollListener.h @@ -0,0 +1,133 @@ +// +// 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 FUiCtrlIFastScrollListener.h + * @brief This is the header file for the %IFastScrollListener interface. + * + * This header file contains the declarations of the %IFastScrollListener interface. @n + * If item event is generated, a method of this class will be called. @n + * Applications that perform tasks related to the item event call methods of this class. + * + */ +#ifndef _FUI_CTRL_IFAST_SCROLL_LISTENER_H_ +#define _FUI_CTRL_IFAST_SCROLL_LISTENER_H_ + +#include +#include + +namespace Tizen { namespace Ui +{ +class Control; +} } + +namespace Tizen { namespace Ui { namespace Controls +{ + +// constants +/** + * @if OSPDEPREC + * The string constant representing the index of the magnifying icon in a fast scroll. + * + * @brief [Deprecated] + * @deprecated This object is provided only for backward compatibility and will be deleted in a future release. + * Instead of using this object, it is recommended to use FAST_SCROLL_SEARCH_ICON_INDEX_STRING. + * @since 2.0 + * @endif + */ +_OSP_EXPORT_ extern const Tizen::Base::String FAST_SCROLL_SEARCH_ICON_INDEX; + +// constants +/** + * The string constant representing the index of the magnifying icon in a fast scroll. + * + * @since 2.0 + */ +_OSP_EXPORT_ extern const wchar_t* const FAST_SCROLL_SEARCH_ICON_INDEX_STRING; + +/** + * @interface IFastScrollListener + * @brief This interface implements the listener for the fast scroll event. + * + * @since 2.0 + * + * The %IFastScrollListener interface is the listener interface for receiving fast scroll events. + * The class that processes a fast scroll event implements this interface, and the instance created with that class is registered + * with a UI control, using the control's AddFastScrollListener() method. When the fast scroll event occurs, the + * OnFastScrollIndexChanged() method of that instance is invoked. + * + * For more information on the class features, see ListViews. + + */ +class _OSP_EXPORT_ IFastScrollListener + : public Tizen::Base::Runtime::IEventListener +{ +// Operation +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~IFastScrollListener(void) {} + + /** + * Called when an index is selected. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] index The index + * @if OSPDEPREC + * @remarks When the search icon index is enabled, you can check whether the search icon index is touched by comparing @c index with the string + * constant ::FAST_SCROLL_SEARCH_ICON_INDEX. + * @endif + * + */ + virtual void OnFastScrollIndexSelected(Tizen::Ui::Control& source, Tizen::Base::String& index) = 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 IFastScrollListener_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 IFastScrollListener_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 IFastScrollListener_Reserved3(void) {} +}; // IFastScrollListener + +}; +}; +}; + +#endif diff --git a/inc/FUiCtrlIFormBackEventListener.h b/inc/FUiCtrlIFormBackEventListener.h new file mode 100644 index 0000000..6d9b1ba --- /dev/null +++ b/inc/FUiCtrlIFormBackEventListener.h @@ -0,0 +1,108 @@ +// +// 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 FUiCtrlIFormBackEventListener.h + * @brief This is the header file for the %IFormBackEventListener interface. + * + * This header file contains the declarations of the %IFormBackEventListener interface. + */ +#ifndef _FUI_CTRL_IFORM_BACK_EVENT_LISTENER_H_ +#define _FUI_CTRL_IFORM_BACK_EVENT_LISTENER_H_ + +// includes +#include + +// namespace declaration +namespace Tizen { namespace Ui { namespace Controls +{ + +class Form; + +/** + * @interface IFormBackEventListener + * @brief This interface implements the listener for Form-related events. + * + * @since 2.0 + * + * The %IFormBackEventListener interface is the listener interface for receiving Form-related back button events. + * + * For more information on the class features, see Form. + */ +class IFormBackEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +// Lifecycle +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~IFormBackEventListener(void) {} + +// Operation +public: + /** + * Called when the current Form control needs to be closed to revert back to the previous %Form control. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @remarks This event is fired when the user clicks on the software 'back' button on the Footer control, or the hardware back button on the + * device. + */ + virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source) = 0; + +// Reserves +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. + // + // @since 2.0 + // + virtual void IFormBackEventListener_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. + // + // @since 2.0 + // + virtual void IFormBackEventListener_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. + // + // @since 2.0 + // + virtual void IFormBackEventListener_Reserved3(void) { } +}; // IFormBackEventListener + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_IFORM_BACK_EVENT_LISTENER_H_ diff --git a/inc/FUiCtrlIFormMenuEventListener.h b/inc/FUiCtrlIFormMenuEventListener.h new file mode 100644 index 0000000..dfc330e --- /dev/null +++ b/inc/FUiCtrlIFormMenuEventListener.h @@ -0,0 +1,104 @@ +// +// 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 FUiCtrlIFormMenuEventListener.h + * @brief This is the header file for the %IFormMenuEventListener 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_ + +// includes +#include + +// namespace declaration +namespace Tizen { namespace Ui { namespace Controls +{ + +class Form; + +/** + * @interface IFormMenuEventListener + * @brief This interface implements the listener for Form-related events. + * + * @since 2.2 + * + * The %IFormMenuEventListener interface is the listener interface for receiving Form-related events. + * + * For more information on the class features, see Form. + */ +class IFormMenuEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +public: + /** + * This is the destructor for this class. + * + * @since 2.2 + */ + virtual ~IFormMenuEventListener(void) {} + +public: + /** + * Called when the current Form control needs to control the Menu button. + * + * @since 2.2 + * + * @param[in] source The source of the event + * @remarks This event is fired when the user clicks on the software 'menu' button on the Footer control, or the hardware menu button on the device. + */ + virtual void OnFormMenuRequested(Tizen::Ui::Controls::Form& 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. + // + // @since 2.2 + // + virtual void IFormMenuEventListener_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. + // + // @since 2.2 + // + virtual void IFormMenuEventListener_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. + // + // @since 2.2 + // + virtual void IFormMenuEventListener_Reserved3(void) { } +}; // IFormMenuEventListener + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_IFORM_MENU_EVENT_LISTENER_H_ diff --git a/inc/FUiCtrlIFrameEventListener.h b/inc/FUiCtrlIFrameEventListener.h new file mode 100644 index 0000000..5256e8c --- /dev/null +++ b/inc/FUiCtrlIFrameEventListener.h @@ -0,0 +1,150 @@ +// +// 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 FUiCtrlIFrameEventListener.h + * @brief This is the header file for the %IFrameEventListener interface. + * + * This header file contains the declarations of the %IFrameEventListener interface. @n + * If a frame lifecycle event is generated, a method of this class is called. @n + * So, if an application needs to perform tasks related to the frame event, provide the implementation of the methods declared in this interface. + */ + +#ifndef _FUI_CTRL_IFRAME_EVENT_LISTENER_H_ +#define _FUI_CTRL_IFRAME_EVENT_LISTENER_H_ + +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +class Frame; + +/** + * @interface IFrameEventListener + * @brief This interface implements the listener for the frame lifecycle event. + * + * @since 2.0 + * + * The %IFrameEventListener interface is the listener interface for receiving %Frame lifecycle events. + * + * For more information on the class features, see Frame. + * + */ +class _OSP_EXPORT_ IFrameEventListener + : public Tizen::Base::Runtime::IEventListener +{ +// Lifecycle +public: + // + //This method is for internal use only. Using this method can cause behavioral, security-related, + //and consistency-related issues in the application. + // + virtual ~IFrameEventListener(void) {} + +// Operations +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. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @remarks This method releases any resources that need to be deallocated before the destruction of the Frame instance. + */ + virtual void OnFrameTerminating(const Tizen::Ui::Controls::Frame& source) = 0; + + /** + * Called when a Frame instance is about to be activated. @n + * The %OnFrameActivated() method is called just after the system activates the %Frame instance of an application. + * + * @since 2.0 + * + * @param[in] source The source of the event + */ + virtual void OnFrameActivated(const Tizen::Ui::Controls::Frame& source) {} + + /** + * Called when a Frame instance is about to be deactivated. @n + * The %OnFrameDeactivated() method is called just after the system deactivates the %Frame instance of an application. + * + * @since 2.0 + * + * @param[in] source The source of the event + */ + virtual void OnFrameDeactivated(const Tizen::Ui::Controls::Frame& source) {} + + /** + * Called after a Frame instance is minimized. @n + * The %OnFrameMinimized() method is called just after the system minimizes the %Frame instance of an application. + * + * @since 2.1 + * + * @param[in] source The source of the event + */ + virtual void OnFrameMinimized(const Tizen::Ui::Controls::Frame& source) {} + + /** + * Called after a Frame instance is restored. @n + * The %OnFrameRestored() method is called just after the system restores the %Frame instance of an application. + * + * @since 2.1 + * + * @param[in] source The source of the event + */ + virtual void OnFrameRestored(const Tizen::Ui::Controls::Frame& source) {} + + // Reserves +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. + // + // @since 2.0 + // + virtual void IFrameEventListener_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. + // + // @since 2.0 + // + virtual void IFrameEventListener_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. + // + // @since 2.0 + // + virtual void IFrameEventListener_Reserved5(void) {} +}; // IFrameEventListener + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_IFRAME_EVENT_LISTENER_H_ diff --git a/inc/FUiCtrlIGalleryEventListener.h b/inc/FUiCtrlIGalleryEventListener.h new file mode 100644 index 0000000..a5f5397 --- /dev/null +++ b/inc/FUiCtrlIGalleryEventListener.h @@ -0,0 +1,124 @@ +// +// 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 FUiCtrlIGalleryEventListener.h + * @brief This is the header file for the %IGalleryEventListener interface. + * + * This header file contains the declarations of the %IGalleryEventListener interface. @n + * If an event is generated, a method of this interface is called. @n + * Therefore, when an application performs jobs related to the event, the methods of this interface are executed. + * + */ +#ifndef _FUI_CTRL_IGALLERY_EVENT_LISTENER_H_ +#define _FUI_CTRL_IGALLERY_EVENT_LISTENER_H_ + +#include + +namespace Tizen { namespace Ui { namespace Controls +{ +class Gallery; +}}} + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @interface IGalleryEventListener + * @brief This interface defines the listener for the events generated by the %Gallery control. + * + * @since 2.0 + * + * The %IGalleryEventListener interface is the listener interface for receiving Gallery events. + * The class that processes a gallery event implements this interface, and the instance created using the Gallery's + * AddGalleryEventListener() method. When the gallery event occurs, a method of that instance is invoked. + * + * For more information on the class features, see Gallery. + */ +class _OSP_EXPORT_ IGalleryEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +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. + * + * @since 2.0 + */ + virtual ~IGalleryEventListener(void) {} + + /** + * Called when the current item changes. + * + * @since 2.0 + * + * @param[in] gallery The source of the event + * @param[in] currentItemIndex The current item index + */ + virtual void OnGalleryCurrentItemChanged(Tizen::Ui::Controls::Gallery& gallery, int currentItemIndex) = 0; + + /** + * Called when the item is clicked. + * + * @since 2.0 + * + * @param[in] gallery The source of the event + * @param[in] itemIndex The index of the item + */ + virtual void OnGalleryItemClicked(Tizen::Ui::Controls::Gallery& gallery, int itemIndex) = 0; + + /** + * Called when the slide-show starts. + * + * @since 2.0 + * + * @param[in] gallery The source of the event + */ + virtual void OnGallerySlideShowStarted(Tizen::Ui::Controls::Gallery& gallery) = 0; + + /** + * Called when the slide-show stops. + * + * @since 2.0 + * + * @param[in] gallery The source of the event + */ + virtual void OnGallerySlideShowStopped(Tizen::Ui::Controls::Gallery& gallery) = 0; + + +protected: + // + //This method is for internal use only. Using this method can cause behavioral, security-related, + //and consistency-related issues in the application. + // + virtual void GalleryEventListener_Reserved1(void) {} + + // + //This method is for internal use only. Using this method can cause behavioral, security-related, + //and consistency-related issues in the application. + // + virtual void GalleryEventListener_Reserved2(void) {} + + // + //This method is for internal use only. Using this method can cause behavioral, security-related, + //and consistency-related issues in the application. + // + virtual void GalleryEventListener_Reserved3(void) {} +}; // IGalleryEventListener + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_IGALLERY_EVENT_LISTENER_H_ diff --git a/inc/FUiCtrlIGalleryItemProvider.h b/inc/FUiCtrlIGalleryItemProvider.h new file mode 100644 index 0000000..f270876 --- /dev/null +++ b/inc/FUiCtrlIGalleryItemProvider.h @@ -0,0 +1,119 @@ +// +// 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 FUiCtrlIGalleryItemProvider.h + * @brief This is the header file for the %IGalleryItemProvider interface. + * + * This header file contains the declarations of the %IGalleryItemProvider interface. @n + * If an event is generated, a method of this interface is called. @n + * Therefore, if applications perform jobs related to the list events, use the methods of this interface. + * + */ +#ifndef _FUI_CTRL_IGALLERY_ITEM_PROVIDER_H_ +#define _FUI_CTRL_IGALLERY_ITEM_PROVIDER_H_ + +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @interface IGalleryItemProvider + * @brief This interface implements the provider for events on %Gallery. + * + * @since 2.0 + * + * The %IGalleryItemProvider interface is the interface for handling Gallery items. The class that handles gallery items implements this + * interface, and the instance created using the Gallery's SetItemProvider() method. + * + * For more information on the class features, see Gallery. + */ +class _OSP_EXPORT_ IGalleryItemProvider +{ +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. + * + * @since 2.0 + */ + virtual ~IGalleryItemProvider(void) {} + + /** + * Gets the total number of items. + * + * @since 2.0 + * + * @return The total number of the Gallery control items + * @remarks An application that uses the Gallery control must implement this method. + */ + virtual int GetItemCount(void) = 0; + + /** + * Gets the item at the specified index from the item provider. + * + * @since 2.0 + * + * @return An item of the Gallery control + * @param[in] index The index of the item + * @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 + * IGalleryItemProvider::DeleteItem() method. + * The returned item should not be a @c null pointer. + * @see DeleteItem() + */ + virtual Tizen::Ui::Controls::GalleryItem* CreateItem(int index) = 0; + + /** + * Deletes the specified item. + * + * @since 2.0 + * + * @return @c true if the item is deallocated by this method, @n + * else @c false + * @param[in] index The index of the item + * @param[in] pItem The pointer to GalleryItem to delete + * @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. + * @see CreateItem() + */ + virtual bool DeleteItem(int index, Tizen::Ui::Controls::GalleryItem* pItem) = 0; + +protected: + // + //This method is for internal use only. Using this method can cause behavioral, security-related, + //and consistency-related issues in the application. + // + virtual void GalleryItemProvider_Reserved1(void) {} + + // + //This method is for internal use only. Using this method can cause behavioral, security-related, + //and consistency-related issues in the application. + // + virtual void GalleryItemProvider_Reserved2(void) {} + + // + //This method is for internal use only. Using this method can cause behavioral, security-related, + //and consistency-related issues in the application. + // + virtual void GalleryItemProvider_Reserved3(void) {} +}; // IGalleryItemProvider + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_IGALLERY_ITEM_PROVIDER_H_ diff --git a/inc/FUiCtrlIGroupedListViewItemEventListener.h b/inc/FUiCtrlIGroupedListViewItemEventListener.h new file mode 100644 index 0000000..15b4fb1 --- /dev/null +++ b/inc/FUiCtrlIGroupedListViewItemEventListener.h @@ -0,0 +1,160 @@ +// +// 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 FUiCtrlIGroupedListViewItemEventListener.h + * @brief This is the header file for the %IGroupedListViewItemEventListener interface. + * + * This header file contains the declarations of the %IGroupedListViewItemEventListener interface. + */ + +#ifndef _FUI_CTRL_IGROUPED_LIST_VIEW_ITEM_EVENT_LISTENER_H_ +#define _FUI_CTRL_IGROUPED_LIST_VIEW_ITEM_EVENT_LISTENER_H_ + +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +class GroupedListView; + +/** + * @interface IGroupedListViewItemEventListener + * @brief This interface implements the listener for the events generated by the items of the %GroupedListView control. + * + * @since 2.0 + * + * 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. + * + * For more information on the class features, see ListViews. + */ +class _OSP_EXPORT_ IGroupedListViewItemEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +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. + * + * @since 2.0 + */ + virtual ~IGroupedListViewItemEventListener(void) {}; + + /** + * Called when the state of an element of a GroupedListView item is changed. + * + * @since 2.0 + * + * @param[in] listView The source of the event + * @param[in] groupIndex The index of the group item + * @param[in] itemIndex The index of the item in the group + * @param[in] elementId The element ID + * @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. + */ + virtual void OnGroupedListViewItemStateChanged(Tizen::Ui::Controls::GroupedListView& listView, int groupIndex, int itemIndex, int elementId, Tizen::Ui::Controls::ListItemStatus status) = 0; + + /** + * Called when ListItem is swept. + * + * @since 2.0 + * @param[in] listView The source of the event + * @param[in] groupIndex The index of the group item + * @param[in] itemIndex The index of the item in the group + * @param[in] direction The sweep direction + */ + virtual void OnGroupedListViewItemSwept(Tizen::Ui::Controls::GroupedListView& listView, int groupIndex, int itemIndex, Tizen::Ui::Controls::SweepDirection direction) = 0; + + /** + * Called when the state of an element in the ListContextItem control is changed. + * + * @since 2.0 + * + * @param[in] listView The source of the event + * @param[in] groupIndex The index of the group item + * @param[in] itemIndex The index of the item in the group + * @param[in] elementId The element ID + * @param[in] status The status of the element + */ + virtual void OnGroupedListViewContextItemStateChanged(Tizen::Ui::Controls::GroupedListView& listView, int groupIndex, int itemIndex, int elementId, Tizen::Ui::Controls::ListContextItemStatus status) = 0; + + /** + * Called when the item or the element is long pressed. + * + * @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 + * @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. + * - Set @c invokeListViewItemCallback to @c false to not invoke %GroupedListView item callbacks. The default value of + * @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. + */ + virtual void OnGroupedListViewItemLongPressed(Tizen::Ui::Controls::GroupedListView& listView, int groupIndex, int itemIndex, int elementId, bool& invokeListViewItemCallback); + + /** + * Called when GroupItem is selected. + * + * @since 2.0 + * + * @param[in] listView The source of the event + * @param[in] groupIndex The index of the group item + */ + virtual void OnGroupedListViewGroupItemSelected(Tizen::Ui::Controls::GroupedListView& listView, int groupIndex); + + /** + * Called when the item is reordered. + * + * @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 + */ + virtual void OnGroupedListViewItemReordered(Tizen::Ui::Controls::GroupedListView& listView, int groupIndexFrom, int itemIndexFrom, int groupIndexTo, int itemIndexTo); + +protected: + // + // The following methods are reserved and may change its name at any time without prior notice. + // + virtual void IGroupedListViewItemEventListener_Reserved1(void) {} + virtual void IGroupedListViewItemEventListener_Reserved2(void) {} + virtual void IGroupedListViewItemEventListener_Reserved3(void) {} +}; // IGroupedListViewItemEventListener + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_IGROUPED_LIST_VIEW_ITEM_EVENT_LISTENER_H_ diff --git a/inc/FUiCtrlIGroupedListViewItemProvider.h b/inc/FUiCtrlIGroupedListViewItemProvider.h new file mode 100644 index 0000000..db4b5db --- /dev/null +++ b/inc/FUiCtrlIGroupedListViewItemProvider.h @@ -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 FUiCtrlIGroupedListViewItemProvider.h + * @brief This is the header file for the %IGroupedListViewItemProvider interface. + * + * This header file contains the declarations of the %IGroupedListViewItemProvider interface. @n + * If an event is generated, a method of this class is called. @n + * Therefore, if an application performs jobs related to the item events, it uses the methods of this class. + * + */ +#ifndef _FUI_CTRL_IGROUPED_LIST_VIEW_ITEM_PROVIDER_H_ +#define _FUI_CTRL_IGROUPED_LIST_VIEW_ITEM_PROVIDER_H_ + +#include +#include + +namespace Tizen {namespace Ui { namespace Controls +{ + +/** + * @interface IGroupedListViewItemProvider + * @brief This interface implements the provider for the events generated by the %GroupedListView control. + * + * @since 2.0 + * + * The %IGroupedListViewItemProvider interface is the interface for handling GroupedListView items. + * The class that handles list items implements this interface, and the instance created using the GroupedListView's Construct() + * method. + * + * For more information on the class features, see ListViews. + */ +class _OSP_EXPORT_ IGroupedListViewItemProvider +{ +// Operation +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. + * + * @since 2.0 + */ + virtual ~IGroupedListViewItemProvider(void) {} + + /** + * Gets the total number of groups. + * + * @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. + */ + virtual int GetGroupCount(void) = 0; + + /** + * Gets the total number of items in the specified group. + * + * @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. + */ + virtual int GetItemCount(int groupIndex) = 0; + + /** + * Creates the group item for the specified index from the item provider. + * + * @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 + * @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 @c null pointer. + */ + virtual Tizen::Ui::Controls::GroupItem* CreateGroupItem(int groupIndex, int itemWidth) = 0; + + /** + * Deletes the specified group item. + * + * @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 + * @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 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; + + /** + * Creates the specified item. + * + * @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 + * @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. + * @see DeleteItem() + */ + virtual Tizen::Ui::Controls::ListItemBase* CreateItem(int groupIndex, int itemIndex, int itemWidth) = 0; + + /** + * Deletes the specified item. + * + * @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 + * @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. + * @see CreateItem() + */ + virtual bool DeleteItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth) = 0; + + /** + * Checks whether the item can be reordered. + * + * @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 + */ + virtual bool IsReorderable(int groupIndexFrom, int groupIndexTo); + +protected: + // + // The following methods are reserved and may change its name at any time without prior notice. + // + virtual void IGroupedListViewItemProvider_Reserved1(void) {} + virtual void IGroupedListViewItemProvider_Reserved2(void) {} + virtual void IGroupedListViewItemProvider_Reserved3(void) {} +}; // IGroupedListViewItemProvider + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_IGROUPED_LIST_VIEW_ITEM_PROVIDER_H_ diff --git a/inc/FUiCtrlIGroupedListViewItemProviderF.h b/inc/FUiCtrlIGroupedListViewItemProviderF.h new file mode 100644 index 0000000..44a7851 --- /dev/null +++ b/inc/FUiCtrlIGroupedListViewItemProviderF.h @@ -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 FUiCtrlIGroupedListViewItemProviderF.h + * @brief This is the header file for the %IGroupedListViewItemProviderF interface. + * + * This header file contains the declarations of the %IGroupedListViewItemProviderF interface. @n + * If an event is generated, a method of this interface is called. @n + * Therefore, if an application performs jobs related to the item events, it uses the methods of this interface. + * + */ +#ifndef _FUI_CTRL_IGROUPED_LIST_VIEW_ITEM_PROVIDERF_H_ +#define _FUI_CTRL_IGROUPED_LIST_VIEW_ITEM_PROVIDERF_H_ + +#include +#include + +namespace Tizen {namespace Ui { namespace Controls +{ + +/** + * @interface IGroupedListViewItemProviderF + * @brief This interface implements the provider for the events generated by the %GroupedListView control. + * + * @since 2.1 + * + * The %IGroupedListViewItemProviderF interface is the interface for handling GroupedListView items. + * The class that handles list items implements this interface, and the instance created using the GroupedListView::Construct() method. + * + * For more information on the class features, see ListViews. + */ +class _OSP_EXPORT_ IGroupedListViewItemProviderF +{ +// Operation +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. + * + * @since 2.1 + */ + virtual ~IGroupedListViewItemProviderF(void) {} + + /** + * Gets the total number of groups. + * + * @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. + */ + virtual int GetGroupCount(void) = 0; + + /** + * Gets the total number of items in a specified group. + * + * @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. + */ + virtual int GetItemCount(int groupIndex) = 0; + + /** + * Creates the group item for a specified index from the item provider. + * + * @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 + * @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 @c null pointer. + */ + virtual Tizen::Ui::Controls::GroupItem* CreateGroupItem(int groupIndex, float itemWidth) = 0; + + /** + * Deletes a specified group item. + * + * @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 + * @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. + * @see CreateItem() + */ + virtual bool DeleteGroupItem(int groupIndex, Tizen::Ui::Controls::GroupItem* pItem, float itemWidth) = 0; + + /** + * Creates a specified item. + * + * @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 + * @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. + * @see DeleteItem() + */ + virtual Tizen::Ui::Controls::ListItemBase* CreateItem(int groupIndex, int itemIndex, float itemWidth) = 0; + + /** + * Deletes a specified item. + * + * @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 + * @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. + * @see CreateItem() + */ + virtual bool DeleteItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::ListItemBase* pItem, float itemWidth) = 0; + + /** + * Checks whether the item can be reordered. + * + * @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 + */ + virtual bool IsReorderable(int groupIndexFrom, int groupIndexTo); + +protected: + // + // The following methods are reserved and may change its name at any time without prior notice. + // + virtual void IGroupedListViewItemProvider_Reserved1(void) {} + virtual void IGroupedListViewItemProvider_Reserved2(void) {} + virtual void IGroupedListViewItemProvider_Reserved3(void) {} +}; // IGroupedListViewItemProviderF + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_IGROUPED_LIST_VIEW_ITEM_PROVIDERF_H_ diff --git a/inc/FUiCtrlIGroupedTableViewItemEventListener.h b/inc/FUiCtrlIGroupedTableViewItemEventListener.h new file mode 100644 index 0000000..6e3ac21 --- /dev/null +++ b/inc/FUiCtrlIGroupedTableViewItemEventListener.h @@ -0,0 +1,142 @@ +// +// 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 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. +* So, if an application does some jobs related to the item event, use the methods of this interface. +* +*/ +#ifndef _FUI_CTRL_IGROUPED_TABLE_VIEW_ITEM_EVENT_LISTENER_H_ +#define _FUI_CTRL_IGROUPED_TABLE_VIEW_ITEM_EVENT_LISTENER_H_ + +#include + +namespace Tizen { namespace Ui { namespace Controls +{ +class GroupedTableView; +class TableViewItem; +class TableViewGroupItem; +class TableViewContextItem; + + +/** +* @interface IGroupedTableViewItemEventListener +* @brief This interface implements the listener for item event. +* +* @since 2.0 +* +* The %IGroupedTableViewItemEventListener interface implements a listener for receiving item change events. +* The class that is interested in processing an item event implements this interface, +* and the instance created with that class is registered with a UI control, using the control's +* AddGroupedTableViewItemEventListener() method. When the item event occurs, the OnItemStateChanged() method of that object is invoked. +*/ +class _OSP_EXPORT_ IGroupedTableViewItemEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +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. + * + * @since 2.0 + */ + + virtual ~IGroupedTableViewItemEventListener(void) {} + + /** + * Called when the state of a TableViewGroupItem is changed. + * + * @since 2.0 + * + * @param[in] tableView The source of the event + * @param[in] groupIndex The group index + * @param[in] pItem The target item + * @param[in] status The status of the item + * @remarks This method is called when the TableViewGroupItem in the GroupedTableView is checked, unchecked, or selected. + */ + virtual void OnGroupedTableViewGroupItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status) = 0; + + /** + * Called when the state of a TableViewItem in the GroupedTableView is changed. + * + * @since 2.0 + * + * @param[in] tableView The source of the event + * @param[in] groupIndex The group index + * @param[in] itemIndex The item index + * @param[in] pItem The target item + * @param[in] status The status of the item + * @remarks This method is called when the TableViewItem in the GroupedTableView is checked, unchecked, or selected. + */ + virtual void OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status) = 0; + + /** + * Called when the TableViewContextItem is opened or closed. + * + * @since 2.0 + * + * @param[in] tableView The source of the event + * @param[in] groupIndex The group index + * @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 + */ + virtual void OnGroupedTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewContextItem* pContextItem, bool activated) = 0; + + /** + * Called when the item is reordered. + * + * @since 2.1 + * + * @param[in] tableView 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 OnGroupedTableViewItemReordered(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndexFrom, int itemIndexFrom, int groupIndexTo, int itemIndexTo) {} + +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. + // + // @since 2.0 + // + virtual void IGroupedTableViewItemEventListener_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. + // + // @since 2.0 + // + virtual void IGroupedTableViewItemEventListener_Reserved2(void) {} + +}; // IGroupedTableViewItemEventListener + +}}} //Tizen::Ui::Controls + +#endif // _FUI_CTRL_IGROUPED_TABLE_VIEW_ITEM_EVENT_LISTENER_H_ diff --git a/inc/FUiCtrlIGroupedTableViewItemProvider.h b/inc/FUiCtrlIGroupedTableViewItemProvider.h new file mode 100644 index 0000000..dabf3b1 --- /dev/null +++ b/inc/FUiCtrlIGroupedTableViewItemProvider.h @@ -0,0 +1,240 @@ +// +// 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 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. +* So, if applications do jobs related to item events, use the methods of this interface. +* +*/ +#ifndef _FUI_CTRL_IGROUPED_TABLE_VIEW_ITEM_PROVIDER_H_ +#define _FUI_CTRL_IGROUPED_TABLE_VIEW_ITEM_PROVIDER_H_ + +namespace Tizen { namespace Ui { namespace Controls +{ +class TableViewItem; +class TableViewGroupItem; + +/** +* @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. +*/ +class _OSP_EXPORT_ IGroupedTableViewItemProvider +{ +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. + * + * @since 2.0 + */ + virtual ~IGroupedTableViewItemProvider(void) {} + + /** + * Gets the total number of groups. + * + * @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. + */ + virtual int GetGroupCount(void) = 0; + + /** + * Gets the total number of items in the specified group. + * + * @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. + */ + virtual int GetItemCount(int groupIndex) = 0; + + /** + * Gets the group item for the specified index from the item provider. + * + * @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 + * @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 @c null pointer. + */ + virtual TableViewGroupItem* CreateGroupItem(int groupIndex, int itemWidth) = 0; + + /** + * Deletes the specified group item. + * + * @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 + * @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. + * @see CreateGroupItem() + */ + virtual bool DeleteGroupItem(int groupIndex, TableViewGroupItem* pItem) = 0; + + /** + * Updates the specified group item. + * + * @since 2.0 + * + * @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. + * - The application can change @c pItem in this method, but should not keep @c pItem for later use. + */ + virtual void UpdateGroupItem(int groupIndex, TableViewGroupItem* pItem) = 0; + + /** + * Creates the specified item. + * + * @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 + * @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. + * @see DeleteItem() + */ + virtual TableViewItem* CreateItem(int groupIndex, int itemIndex, int itemWidth) = 0; + + /** + * Deletes the specified item. + * + * @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 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. + * @see CreateItem() + */ + virtual bool DeleteItem(int groupIndex, int itemIndex, TableViewItem* pItem) = 0; + + /** + * Updates the specified item. + * + * @since 2.0 + * + * @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. + * - The application can change @c pItem in this method, but should not keep @c pItem for later use. + */ + virtual void UpdateItem(int groupIndex, int itemIndex, TableViewItem* pItem) = 0; + + /** + * Gets the default height of a group item. + * + * @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. + */ + virtual int GetDefaultGroupItemHeight(void) = 0; + + + /** + * Gets the default height of an item. + * + * @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. + */ + virtual int GetDefaultItemHeight(void) = 0; + + /** + * Checks whether the item can be reordered. + * + * @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 + */ + virtual bool IsReorderable(int groupIndexFrom, int groupIndexTo) { return false; } + +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. + // + // @since 2.0 + // + virtual void IGroupedTableViewItemProvider_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. + // + // @since 2.0 + // + virtual void IGroupedTableViewItemProvider_Reserved2(void) {} + +}; // IGroupedTableViewItemProvider + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_IGROUPED_TABLE_VIEW_ITEM_PROVIDER_H_ diff --git a/inc/FUiCtrlIGroupedTableViewItemProviderF.h b/inc/FUiCtrlIGroupedTableViewItemProviderF.h new file mode 100644 index 0000000..7a3e3f7 --- /dev/null +++ b/inc/FUiCtrlIGroupedTableViewItemProviderF.h @@ -0,0 +1,240 @@ +// +// 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 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. +* So, if applications do jobs related to item events, use the methods of this interface. +* +*/ +#ifndef _FUI_CTRL_IGROUPED_TABLE_VIEW_ITEM_PROVIDER_F_H_ +#define _FUI_CTRL_IGROUPED_TABLE_VIEW_ITEM_PROVIDER_F_H_ + +namespace Tizen { namespace Ui { namespace Controls +{ +class TableViewItem; +class TableViewGroupItem; + +/** +* @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 %GroupedTableView, using the GroupedTableView::SetItemProviderF() method. +*/ +class _OSP_EXPORT_ IGroupedTableViewItemProviderF +{ +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. + * + * @since 2.1 + */ + virtual ~IGroupedTableViewItemProviderF(void) {} + + /** + * Gets the total number of groups. + * + * @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. + */ + virtual int GetGroupCount(void) = 0; + + /** + * Gets the total number of items in a specified group. + * + * @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. + */ + virtual int GetItemCount(int groupIndex) = 0; + + /** + * Gets the group item for a specified index from the item provider. + * + * @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 + * @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 @c null pointer. + */ + virtual TableViewGroupItem* CreateGroupItem(int groupIndex, float itemWidth) = 0; + + /** + * Deletes a specified group item. + * + * @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 + * @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. + * @see CreateGroupItem() + */ + virtual bool DeleteGroupItem(int groupIndex, TableViewGroupItem* pItem) = 0; + + /** + * Updates a specified group item. + * + * @since 2.1 + * + * @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. + * - The application can change @c pItem in this method, but should not keep @c pItem for later use. + */ + virtual void UpdateGroupItem(int groupIndex, TableViewGroupItem* pItem) = 0; + + /** + * Creates a specified item. + * + * @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 + * @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. + * @see DeleteItem() + */ + virtual TableViewItem* CreateItem(int groupIndex, int itemIndex, float itemWidth) = 0; + + /** + * Deletes a specified item. + * + * @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 + * @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. + * @see CreateItem() + */ + virtual bool DeleteItem(int groupIndex, int itemIndex, TableViewItem* pItem) = 0; + + /** + * Updates a specified item. + * + * @since 2.1 + * + * @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. + * - The application can change @c pItem in this method, but should not keep @c pItem for later use. + */ + virtual void UpdateItem(int groupIndex, int itemIndex, TableViewItem* pItem) = 0; + + /** + * Gets the default height of a group item. + * + * @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. + */ + virtual float GetDefaultGroupItemHeight(void) = 0; + + + /** + * Gets the default height of an item. + * + * @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. + */ + virtual float GetDefaultItemHeight(void) = 0; + + /** + * Checks whether the item can be reordered. + * + * @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 + */ + virtual bool IsReorderable(int groupIndexFrom, int groupIndexTo) { return false; } + +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. + // + // @since 2.1 + // + virtual void IGroupedTableViewItemProviderF_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. + // + // @since 2.1 + // + virtual void IGroupedTableViewItemProviderF_Reserved2(void) {} + +}; // IGroupedTableViewItemProviderF + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_IGROUPED_TABLE_VIEW_ITEM_PROVIDER_F_H_ diff --git a/inc/FUiCtrlIIconListViewItemEventListener.h b/inc/FUiCtrlIIconListViewItemEventListener.h new file mode 100644 index 0000000..c3131f6 --- /dev/null +++ b/inc/FUiCtrlIIconListViewItemEventListener.h @@ -0,0 +1,106 @@ +// +// 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 FUiCtrlIIconListViewItemEventListener.h + * @brief This is the header file for the %IIconListViewItemEventListener interface. + * + * This header file contains the declarations of the %IIconListViewItemEventListener interface. @n + * If an item event is generated, a method of this interface is called. @n + * Applications that perform some tasks related to the item event call methods of this interface. + */ + +#ifndef _FUI_CTRL_IICON_LIST_VIEW_ITEM_EVENT_LISTENER_H_ +#define _FUI_CTRL_IICON_LIST_VIEW_ITEM_EVENT_LISTENER_H_ + +// Includes +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +class IconListView; + +/** + * @interface IIconListViewItemEventListener + * @brief This interface implements the listener for the item event. + * + * @since 2.0 + * + * The %IIconListViewItemEventListener interface is the listener interface for receiving IconListView 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 IconListView::AddIconListViewItemEventListener() method. When the list item event occurs, the + * OnIconListViewItemStateChanged() method of that instance is invoked. + * + * For more information on the class features, see ListViews. + */ +class _OSP_EXPORT_ IIconListViewItemEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +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. + * + * @since 2.0 + */ + virtual ~IIconListViewItemEventListener(void) {} + + /** + * Called when an item event occurs. + * + * @since 2.0 + * + * @param[in] iconListView The source of the event + * @param[in] index The index of the item + * @param[in] status The item status + */ + virtual void OnIconListViewItemStateChanged(Tizen::Ui::Controls::IconListView& iconListView, int index, Tizen::Ui::Controls::IconListViewItemStatus status) = 0; + + /** + * Called when the overlay bitmap is selected. + * + * @since 2.0 + * + * @param[in] iconListView The source of the event + * @param[in] index The index of the item + * @param[in] overlayBitmapId The overlay bitmap ID + */ + virtual void OnIconListViewOverlayBitmapSelected(Tizen::Ui::Controls::IconListView& iconListView, int index, int overlayBitmapId) {} + + /** + * Called when the item is reordered. + * + * @since 2.0 + * + * @param[in] iconListView 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 OnIconListViewItemReordered(Tizen::Ui::Controls::IconListView& iconListView, int indexFrom, int indexTo) {} + +protected: + // The following methods are reserved and may change its name at any time without prior notice. + virtual void IconListViewItemEventListener_Reserved1(void) {} + virtual void IconListViewItemEventListener_Reserved2(void) {} + virtual void IconListViewItemEventListener_Reserved3(void) {} +}; // IIconListViewItemEventListener + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_IICON_LIST_VIEW_ITEM_EVENT_LISTENER_H_ diff --git a/inc/FUiCtrlIIconListViewItemProvider.h b/inc/FUiCtrlIIconListViewItemProvider.h new file mode 100644 index 0000000..68a9e08 --- /dev/null +++ b/inc/FUiCtrlIIconListViewItemProvider.h @@ -0,0 +1,114 @@ +// +// 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 FUiCtrlIIconListViewItemProvider.h + * @brief This is the header file for the %IIconListViewItemProvider interface. + * + * This header file contains the declarations of the %IIconListViewItemProvider interface. @n + * If an event is generated, a method of this interface is called. @n + * Applications that perform tasks related to the list events call methods of this interface. + */ + +#ifndef _FUI_CTRL_IICON_LIST_VIEW_ITEM_PROVIDER_H_ +#define _FUI_CTRL_IICON_LIST_VIEW_ITEM_PROVIDER_H_ + +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +class IconListView; + +/** + * @interface IIconListViewItemProvider + * @brief This interface implements the provider for events on %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. + * + * For more information on the class features, see ListViews. + */ +class _OSP_EXPORT_ IIconListViewItemProvider +{ +// 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. + * + * @since 2.0 + */ + virtual ~IIconListViewItemProvider(void) {} + + /** + * Called when the IconListView is about to be drawn and requests the listener to set the number of total items. + * + * @since 2.0 + * + * @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; + + /** + * Called when items need to be loaded. + * + * @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 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; + + /** + * Called when an item is no longer used by the IconListView. + * + * @since 2.0 + * + * @return @c true if the item is deallocated by this method, @n + * else @c false + * + * @param[in] index The index of the item + * @param[in] pItem The pointer to the item to delete + * + * @remarks Applications that use IconListView must implement this method. In this method, the applications have the chance of deallocating the + * item. If the application deallocates the item, this method must return @c true, notifying the %IconListView not to free the item. + * Otherwise, the item will be deallocated by the %IconListView. + * + * @see CreateItem() + */ + virtual bool DeleteItem(int index, Tizen::Ui::Controls::IconListViewItem* pItem) = 0; + +protected: + // The following methods are reserved and may change its name at any time without prior notice. + virtual void IconListViewItemProvider_Reserved1(void) {} + virtual void IconListViewItemProvider_Reserved2(void) {} + virtual void IconListViewItemProvider_Reserved3(void) {} +}; // IIconListViewItemProvider + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_IICON_LIST_VIEW_ITEM_PROVIDER_H_ diff --git a/inc/FUiCtrlIListViewItemEventListener.h b/inc/FUiCtrlIListViewItemEventListener.h new file mode 100644 index 0000000..6f519ce --- /dev/null +++ b/inc/FUiCtrlIListViewItemEventListener.h @@ -0,0 +1,146 @@ +// +// 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 FUiCtrlIListViewItemEventListener.h + * @brief This is the header file for the %IListViewItemEventListener interface. + * + * This header file contains the declarations of the %IListViewItemEventListener interface. @n + * If an item event is generated, a method of this interface is called. @n + * So, if an application does some jobs related to the item event, use the methods of this interface. + * + */ +#ifndef _FUI_CTRL_ILIST_VIEW_ITEM_EVENT_LISTENER_H_ +#define _FUI_CTRL_ILIST_VIEW_ITEM_EVENT_LISTENER_H_ + +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +class ListView; + +/** + * @interface IListViewItemEventListener + * @brief This interface implements the listener for item event. + * + * @since 2.0 + * + * The %IListViewItemEventListener interface is the listener interface for receiving ListView 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 AddListViewItemEventListener() method. When the list item event occurs, a method of that + * instance is invoked. + * + * For more information on the class features, see ListViews. + */ +class _OSP_EXPORT_ IListViewItemEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +// Operation +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. + * + * @since 2.0 + */ + virtual ~IListViewItemEventListener(void) {} + + /** + * Called when the state of an element in the ListViewItem in the ListView or GroupedListView is changed. + * + * @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] status The status of the element + * + * @remarks + * - This method is called when an element of the ListViewItem in the ListView is checked, unchecked, or selected. + * - When the event comes from the annex or the whole item, @c elementId is always @c -1. + */ + virtual void OnListViewItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListItemStatus status) = 0; + + /** + * Called when the ListItem is swept. + * + * @since 2.0 + * + * @param[in] listView The source of the event + * @param[in] index The index of the list + * @param[in] direction The sweep direction + */ + 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. + * + * @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] status The status of the element + */ + virtual void OnListViewContextItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListContextItemStatus status) = 0; + + /** + * Called when the item or the element is long pressed. + * + * @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 + * @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, + * 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); + + /** + * Called when the item is reordered. + * + * @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 + */ + virtual void OnListViewItemReordered(Tizen::Ui::Controls::ListView& listView, int indexFrom, int indexTo); + +protected: + // + // The following methods are reserved and may change its name at any time without prior notice. + // + virtual void IListViewItemEventListener_Reserved1(void) {} + virtual void IListViewItemEventListener_Reserved2(void) {} + virtual void IListViewItemEventListener_Reserved3(void) {} +}; // IListViewItemEventListener + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_ILIST_VIEW_ITEM_EVENT_LISTENER_H_ diff --git a/inc/FUiCtrlIListViewItemProvider.h b/inc/FUiCtrlIListViewItemProvider.h new file mode 100644 index 0000000..1e7fc54 --- /dev/null +++ b/inc/FUiCtrlIListViewItemProvider.h @@ -0,0 +1,119 @@ +// +// 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 FUiCtrlIListViewItemProvider.h + * @brief This is the header file for the %IListViewItemProvider interface. + * + * This header file contains the declarations of the %IListViewItemProvider interface. @n + * If the event is generated, a method of this interface is called. @n + * So, if applications do jobs related to item events, use the methods of this interface. + * + */ +#ifndef _FUI_CTRL_ILIST_VIEW_ITEM_PROVIDER_H_ +#define _FUI_CTRL_ILIST_VIEW_ITEM_PROVIDER_H_ + +#include + +namespace Tizen {namespace Ui { namespace Controls +{ + +/** + * @interface IListViewItemProvider + * @brief This interface implements the listener for events on %ListView. + * + * @since 2.0 + * + * The %IListViewItemProvider interface is the interface for handling ListView items. + * The class that handles list items implements this interface, and the instance created using the ListView's Construct() method. + * + * For more information on the class features, see ListViews. + */ +class _OSP_EXPORT_ IListViewItemProvider +{ +// Operation +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. + * + * @since 2.0 + */ + virtual ~IListViewItemProvider(void) {} + + /** + * Gets the total number of items in a specified group. + * + * @since 2.0 + * + * @return The count of all items of the list + * @remarks This method must be implemented so that it returns the number of total items in the list. + * + */ + virtual int GetItemCount(void) = 0; + + /** + * Creates a specified item. + * + * @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 + * @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 @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; + + /** + * Deletes a specified item. + * + * @since 2.0 + * + * @return @c true, if the item is deallocated by this method, @n + * else @c false + * @param[in] index The index of the item + * @param[in] pItem The pointer to the item to delete + * @param[in] itemWidth The width of the item + * @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. + * @see CreateItem() + */ + virtual bool DeleteItem(int index, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth) = 0; + +protected: + // + // The following methods are reserved and may change its name at any time without prior notice. + // + virtual void IListViewItemProvider_Reserved1(void) {} + virtual void IListViewItemProvider_Reserved2(void) {} + virtual void IListViewItemProvider_Reserved3(void) {} +}; // IListViewItemProvider + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_ILIST_VIEW_ITEM_PROVIDER_H_ diff --git a/inc/FUiCtrlIListViewItemProviderF.h b/inc/FUiCtrlIListViewItemProviderF.h new file mode 100644 index 0000000..d21f9da --- /dev/null +++ b/inc/FUiCtrlIListViewItemProviderF.h @@ -0,0 +1,119 @@ +// +// 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 FUiCtrlIListViewItemProviderF.h + * @brief This is the header file for the %IListViewItemProviderF interface. + * + * This header file contains the declarations of the %IListViewItemProviderF interface. @n + * If an event is generated, a method of this interface is called. @n + * So, if applications do jobs related to item events, use the methods of this interface. + * + */ +#ifndef _FUI_CTRL_ILIST_VIEW_ITEM_PROVIDERF_H_ +#define _FUI_CTRL_ILIST_VIEW_ITEM_PROVIDERF_H_ + +#include + +namespace Tizen {namespace Ui { namespace Controls +{ + +/** + * @interface IListViewItemProviderF + * @brief This interface implements the listener for events on %ListView. + * + * @since 2.1 + * + * The %IListViewItemProviderF interface is the interface for handling ListView items. + * The class that handles list items implements this interface, and the instance created using the ListView::Construct() method. + * + * For more information on the class features, see ListViews. + */ +class _OSP_EXPORT_ IListViewItemProviderF +{ +// Operation +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. + * + * @since 2.1 + */ + virtual ~IListViewItemProviderF(void) {} + + /** + * Gets the total number of items in a specified group. + * + * @since 2.1 + * + * @return The count of all items of the list + * @remarks This method must be implemented so that it returns the number of total items in the list. + * + */ + virtual int GetItemCount(void) = 0; + + /** + * Creates a specified item. + * + * @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 + * @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 @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; + + /** + * Deletes a specified item. + * + * @since 2.1 + * + * @return @c true if the item is deallocated by this method, @n + * else @c false + * @param[in] index The index of the item + * @param[in] pItem The pointer to the item to delete + * @param[in] itemWidth The width of the item + * @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. + * @see CreateItem() + */ + virtual bool DeleteItem(int index, Tizen::Ui::Controls::ListItemBase* pItem, float itemWidth) = 0; + +protected: + // + // The following methods are reserved and may change its name at any time without prior notice. + // + virtual void IListViewItemProvider_Reserved1(void) {} + virtual void IListViewItemProvider_Reserved2(void) {} + virtual void IListViewItemProvider_Reserved3(void) {} +}; // IListViewItemProviderF + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_ILIST_VIEW_ITEM_PROVIDERF_H_ diff --git a/inc/FUiCtrlIProgressPopupEventListener.h b/inc/FUiCtrlIProgressPopupEventListener.h new file mode 100644 index 0000000..a536522 --- /dev/null +++ b/inc/FUiCtrlIProgressPopupEventListener.h @@ -0,0 +1,90 @@ +// +// 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 FUiCtrlIProgressPopupEventListener.h + * @brief This is the header file for the %IProgressPopupEventListener interface. + * + * This header file contains the declarations of the %IProgressPopupEventListener interface. @n + * If a ProgressPopup event is generated, a method of this interface is called. @n + * So, for tasks related to the ProgressPopup event, use the methods of this interface. + * + */ +#ifndef _FUI_CTRL_IPROGRESS_POPUP_EVENT_LISTENER_H_ +#define _FUI_CTRL_IPROGRESS_POPUP_EVENT_LISTENER_H_ + +#include "FBaseRtIEventListener.h" + + +namespace Tizen { namespace Ui +{ +class Control; +}} // Tizen::Ui + + +namespace Tizen { namespace Ui +{ +/** + * @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 + * 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. + * + * For more information on the class features, + * see individual control topics under UI Controls. + */ +class _OSP_EXPORT_ IProgressPopupEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +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. + * + * @since 2.0 + */ + virtual ~IProgressPopupEventListener(void) {} + + /** + * Called when a ProgressPopup event occurs. + * + * @since 2.0 + */ + virtual void OnProgressPopupCanceled(void) = 0; + +protected: + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // The following methods are reserved and may change its name at any time without + // prior notice. + // + // @since 2.0 + // + virtual void IProgressPopupEventListener_Reserved1(void) {} + virtual void IProgressPopupEventListener_Reserved2(void) {} + virtual void IProgressPopupEventListener_Reserved3(void) {} +}; // IProgressPopupEventListener + +}} // Tizen::Ui + +#endif // _FUI_CTRL_IPROGRESS_POPUP_EVENT_LISTENER_H_ diff --git a/inc/FUiCtrlIScrollEventListener.h b/inc/FUiCtrlIScrollEventListener.h new file mode 100644 index 0000000..2a96cd7 --- /dev/null +++ b/inc/FUiCtrlIScrollEventListener.h @@ -0,0 +1,127 @@ +// +// 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 FUiCtrlIScrollEventListener.h + * @brief This is the header file for the %IScrollEventListener interface. + * + * This header file contains the declarations of the %IScrollEventListener interface. @n + * If a change event is generated, a method of this interface is called. @n + * The applications that perform tasks related to the change events, call the methods of this interface. + * + */ +#ifndef _FUI_CTRL_ISCROLL_EVENT_LISTENER_H_ +#define _FUI_CTRL_ISCROLL_EVENT_LISTENER_H_ + +#include +#include + +namespace Tizen { namespace Ui +{ +class Control; +}} // Tizen::Ui + +namespace Tizen {namespace Ui { namespace Controls +{ + +/** + * @interface IScrollEventListener + * @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. + * + * For more information on the class features, see Panels and + * ListViews. + */ +class _OSP_EXPORT_ IScrollEventListener + : public Tizen::Base::Runtime::IEventListener +{ +// Operation +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. + * + * @since 2.0 + * + */ + virtual ~IScrollEventListener(void) {} + + /** + * Called when the scroll reaches the top, bottom, left or right end. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] type The type of scroll end event + */ + virtual void OnScrollEndReached(Tizen::Ui::Control& source, Tizen::Ui::Controls::ScrollEndEvent type) = 0; + + /** + * Called continuously when the control is being scrolled. + * + * @since 2.0 + * + *@param[in] source The control being scrolled + *@param[in] scrollPosition The scrolled position + */ + virtual void OnScrollPositionChanged(Tizen::Ui::Control& source, int scrollPosition) {}; + + /** + * Called when the control's scroll movement has come to a stop. + * + * @since 2.0 + * + * @param[in] source The control being scrolled + */ + virtual void OnScrollStopped(Tizen::Ui::Control& source) {}; + +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 ScrollEventListener_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 ScrollEventListener_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 ScrollEventListener_Reserved3(void) {} + +}; // IScrollEventListener + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_ISCROLL_EVENT_LISTENER_H_ diff --git a/inc/FUiCtrlIScrollEventListenerF.h b/inc/FUiCtrlIScrollEventListenerF.h new file mode 100644 index 0000000..c0da2c5 --- /dev/null +++ b/inc/FUiCtrlIScrollEventListenerF.h @@ -0,0 +1,128 @@ +// +// 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 FUiCtrlIScrollEventListenerF.h + * @brief This is the header file for the %IScrollEventListenerF interface. + * + * This header file contains the declarations of the %IScrollEventListenerF interface. @n + * If a change event is generated, a method of this interface is called. @n + * The applications that perform tasks related to the change events, call the methods of this interface. + * + */ +#ifndef _FUI_CTRL_ISCROLL_EVENT_LISTENER_F_H_ +#define _FUI_CTRL_ISCROLL_EVENT_LISTENER_F_H_ + +#include +#include + +namespace Tizen { namespace Ui +{ +class Control; +}} // Tizen::Ui + +namespace Tizen {namespace Ui { namespace Controls +{ + +/** + * @interface IScrollEventListenerF + * @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. + * When the scroll event occurs, the OnScrollEndReached() method of that instance is invoked. + * + * For more information on the class features, see Panels + * and ListViews. + */ +class _OSP_EXPORT_ IScrollEventListenerF + : public Tizen::Base::Runtime::IEventListener +{ +// Operation +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. + * + * @since 2.1 + * + */ + virtual ~IScrollEventListenerF(void) {} + + /** + * Called when the scroll reaches the top, bottom, left, or right end. + * + * @since 2.1 + * + * @param[in] source The source of the event + * @param[in] type The type of scroll end event + */ + virtual void OnScrollEndReached(Tizen::Ui::Control& source, Tizen::Ui::Controls::ScrollEndEvent type) = 0; + + /** + * Called continuously when the control is being scrolled. + * + * @since 2.1 + * + *@param[in] source The control being scrolled + *@param[in] scrollPosition The scrolled position + */ + virtual void OnScrollPositionChanged(Tizen::Ui::Control& source, float scrollPosition) = 0; + + /** + * Called when the control's scroll movement has come to a stop. + * + * @since 2.1 + * + * @param[in] source The control being scrolled + */ + virtual void OnScrollStopped(Tizen::Ui::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 ScrollEventListener_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 ScrollEventListener_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 ScrollEventListener_Reserved3(void) {} + +}; // IScrollEventListenerF + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_ISCROLL_EVENT_LISTENER_F_H_ diff --git a/inc/FUiCtrlISearchBarEventListener.h b/inc/FUiCtrlISearchBarEventListener.h new file mode 100644 index 0000000..07c3f72 --- /dev/null +++ b/inc/FUiCtrlISearchBarEventListener.h @@ -0,0 +1,144 @@ +// +// 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 FUiCtrlISearchBarEventListener.h + * @brief This is the header file for the %ISearchBarEventListener interface. + * + * This header file contains the declarations of the %ISearchBarEventListener interface. + */ +#ifndef _FUI_CTRL_ISEARCH_BAR_EVENT_LISTENER_H_ +#define _FUI_CTRL_ISEARCH_BAR_EVENT_LISTENER_H_ + +// Includes +#include +#include + +// Namespace declaration +namespace Tizen { namespace Ui { namespace Controls +{ +/** + * @interface ISearchBarEventListener + * @brief This interface implements the listener for the %SearchBar events. + * + * @since 2.0 + * + * The %ISearchBarEventListener interface is the listener interface for receiving SearchBar events. + * The class that processes a search bar event implements this interface, and the instance created with that class is registered + * with a UI control, using the control's AddSearchBarEventListener() method. When the search bar event occurs, the + * OnSearchBarModeChanged() method of that instance is invoked. + * + * For more information on the class features, see SearchBar. + */ +class _OSP_EXPORT_ ISearchBarEventListener + : public Tizen::Base::Runtime::IEventListener +{ +// Lifecycle +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~ISearchBarEventListener(void) {} + + +// Operation +public: + /** + * Called when the mode of the SearchBar is changed. + * + * @if OSPCOMPAT + * @brief [Compatibility] + * @endif + * @since 2.0 + * @if OSPCOMPAT + * @compatibility This method has compatibility issues with OSP compatible applications. @n + * For more information, see @ref CompSearchModeChangedPage "here" + * @endif + * @param[in] source The source of the event + * @param[in] mode The current search bar mode. + */ + virtual void OnSearchBarModeChanged(Tizen::Ui::Controls::SearchBar& source, SearchBarMode mode) = 0; + /** + * @page CompSearchModeChangedPage Compatibility for OnSearchBarModeChanged() + * @section CompSearchModeChangedPage IssueSection Issues + * Implementing this method in OSP compatible applications has following issue: @n + * OnSearchBarModeChanged() method modifies the visibility of the current Form's Header in OSP, + * whereas current Form's header visibility is not modified in Tizen. + * + * @section CompSearchModeChangedPage SolutionSection Resolutions + * It is recommended to use %Tizen API. @n + */ + +// Reserves +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. + // + //@since 2.0 + // + virtual void ISearchBarEventListener_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. + // + //@since 2.0 + // + virtual void ISearchBarEventListener_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. + // + //@since 2.0 + // + virtual void ISearchBarEventListener_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. + // + //@since 2.0 + // + virtual void ISearchBarEventListener_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. + // + //@since 2.0 + // + virtual void ISearchBarEventListener_Reserved5(void) { } + +}; // ISearchBarEventListener + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_ISEARCH_BAR_EVENT_LISTENER_H_ diff --git a/inc/FUiCtrlISectionTableViewItemEventListener.h b/inc/FUiCtrlISectionTableViewItemEventListener.h new file mode 100644 index 0000000..a319847 --- /dev/null +++ b/inc/FUiCtrlISectionTableViewItemEventListener.h @@ -0,0 +1,123 @@ +// +// 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 FUiCtrlISectionTableViewItemEventListener.h +* @brief This is the header file for the %ISectionTableViewItemEventListener interface. +* +* This header file contains the declarations of the %ISectionTableViewItemEventListener interface. @n +* If an item event is generated, a method of this interface is called. +* So, if an application does some jobs related to the item event, use the methods of this interface. +* +*/ +#ifndef _FUI_CTRL_ISECTION_TABLE_VIEW_ITEM_EVENT_LISTENER_H_ +#define _FUI_CTRL_ISECTION_TABLE_VIEW_ITEM_EVENT_LISTENER_H_ + +#include + +namespace Tizen { namespace Ui { namespace Controls +{ +class SectionTableView; +class TableViewItem; +class TableViewContextItem; + + +/** +* @interface ISectionTableViewItemEventListener +* @brief This interface implements the listener for item event. +* +* @since 2.0 +* +* The %ISectionTableViewItemEventListener interface implements a listener for receiving item change events. +* The class that is interested in processing an item event implements this interface, +* and the instance created with that class is registered with a UI control, using the control's +* AddSectionTableViewItemEventListener() method. When the item event occurs, the OnItemStateChanged() method of that object is invoked. +*/ +class _OSP_EXPORT_ ISectionTableViewItemEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +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. + * + * @since 2.0 + */ + + virtual ~ISectionTableViewItemEventListener(void) {} + /** + * Called when the state of a TableViewItem in the SectionTableView is changed. + * + * @since 2.0 + * + * @param[in] tableView The source of the event + * @param[in] sectionIndex The section index + * @param[in] itemIndex The item index + * @param[in] pItem The target item + * @param[in] status The status of the item + * @remarks This method is called when the TableViewItem in the SectionTableView is checked, unchecked, or selected. + */ + virtual void OnSectionTableViewItemStateChanged(Tizen::Ui::Controls::SectionTableView& tableView, int sectionIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status) = 0; + + /** + * Called when the TableViewContextItem is opened or closed. + * + * @since 2.0 + * + * @param[in] tableView The source of the event + * @param[in] sectionIndex The section index + * @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 + */ + virtual void OnSectionTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::SectionTableView& tableView, int sectionIndex, int itemIndex, Tizen::Ui::Controls::TableViewContextItem* pContextItem, bool activated) = 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. + // + // @since 2.0 + // + virtual void ISectionTableViewItemEventListener_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. + // + // @since 2.0 + // + virtual void ISectionTableViewItemEventListener_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. + // + // @since 2.0 + // + virtual void ISectionTableViewItemEventListener_Reserved3(void) {} +}; // ISectionTableViewItemEventListener + +}}} //Tizen::Ui::Controls + +#endif // _FUI_CTRL_ISECTION_TABLE_VIEW_ITEM_EVENT_LISTENER_H_ diff --git a/inc/FUiCtrlISectionTableViewItemProvider.h b/inc/FUiCtrlISectionTableViewItemProvider.h new file mode 100644 index 0000000..ded8c6a --- /dev/null +++ b/inc/FUiCtrlISectionTableViewItemProvider.h @@ -0,0 +1,224 @@ +// +// 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 FUiCtrlISectionTableViewItemProvider.h +* @brief This is the header file for the %ISectionTableViewItemProvider interface. +* +* This header file contains the declarations of the %ISectionTableViewItemProvider interface. +* If the event is generated, a method of this interface is called. +* So, if applications do jobs related to item events, use the methods of this interface. +* +*/ +#ifndef _FUI_CTRL_ISECTION_TABLE_VIEW_ITEM_PROVIDER_H_ +#define _FUI_CTRL_ISECTION_TABLE_VIEW_ITEM_PROVIDER_H_ + +namespace Tizen { namespace Ui { namespace Controls +{ +class TableViewItem; + +/** +* @interface ISectionTableViewItemProvider +* @brief This interface implements the listener for events on %SectionTableView. +* +* @since 2.0 +* +* The %ISectionTableViewItemProvider interface implements an item provider which generates items for SectionTableView. %SectionTableView calls the item provider +* to request an item which is about to be displayed on a screen. Applications which use %SectionTableView must implement the item provider. +* The class is registered with a %SectionTableView, using the SectionTableView::SetItemProvider() method. +*/ +class _OSP_EXPORT_ ISectionTableViewItemProvider +{ +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. + * + * @since 2.0 + */ + virtual ~ISectionTableViewItemProvider(void) {} + + /** + * Gets the total number of sections. + * + * @since 2.0 + * + * @return The total number of sections + * @remarks This method must be implemented so that it returns the total number of groups in the SectionTableView control. + */ + virtual int GetSectionCount(void) = 0; + + /** + * Gets the total number of items in the specified section. + * + * @since 2.0 + * + * @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. + */ + virtual int GetItemCount(int sectionIndex) = 0; + + /** + * Creates the specified item. + * + * @since 2.0 + * + * @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 + * @remarks + * - 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 @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() + */ + virtual TableViewItem* CreateItem(int sectionIndex, int itemIndex, int itemWidth) = 0; + + /** + * Deletes the specified item. + * + * @since 2.0 + * + * @return @c true if the item is deallocated by this method, @n + * else @c false + * @param[in] sectionIndex The section index + * @param[in] itemIndex The item index + * @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. + * - If the application deallocates the item, this method must return true. This notifies the %SectionTableView control not to release the + * item. Otherwise, the item is deallocated by the %SectionTableView control. + * @see CreateItem() + */ + virtual bool DeleteItem(int sectionIndex, int itemIndex, TableViewItem* pItem) = 0; + + /** + * Updates the specified item. + * + * @since 2.0 + * + * @param[in] sectionIndex The section index + * @param[in] itemIndex The item index + * @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. + * - The application can change @c pItem in this method, but should not keep @c pItem for later use. + */ + virtual void UpdateItem(int sectionIndex, int itemIndex, TableViewItem* pItem) = 0; + + /** + * Gets the header text of the specified section. + * + * @since 2.0 + * + * @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. + */ + virtual Tizen::Base::String GetSectionHeader(int sectionIndex) = 0; + + /** + * Checks whether the section has a section header or not. + * + * @since 2.0 + * + * @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. + */ + virtual bool HasSectionHeader(int sectionIndex) = 0; + + /** + * Gets the footer text of the specified section. + * + * @since 2.0 + * + * @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. + * - The footer text will be aligned right. + */ + virtual Tizen::Base::String GetSectionFooter(int sectionIndex) = 0; + + /** + * Checks whether the section has a footer or not. + * + * @since 2.0 + * + * @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. + */ + virtual bool HasSectionFooter(int sectionIndex) = 0; + + /** + * Gets the default height of an item. + * + * @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 SectionTableView control. + */ + virtual int GetDefaultItemHeight(void) = 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. + // + // @since 2.0 + // + virtual void ISectionTableViewItemProvider_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. + // + // @since 2.0 + // + virtual void ISectionTableViewItemProvider_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. + // + // @since 2.0 + // + virtual void ISectionTableViewItemProvider_Reserved3(void) {} +}; // ISectionTableViewItemProvider + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_ISECTION_TABLE_VIEW_ITEM_PROVIDER_H_ diff --git a/inc/FUiCtrlISectionTableViewItemProviderF.h b/inc/FUiCtrlISectionTableViewItemProviderF.h new file mode 100644 index 0000000..44000a5 --- /dev/null +++ b/inc/FUiCtrlISectionTableViewItemProviderF.h @@ -0,0 +1,224 @@ +// +// 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 FUiCtrlISectionTableViewItemProviderF.h +* @brief This is the header file for the %ISectionTableViewItemProviderF interface. +* +* This header file contains the declarations of the %ISectionTableViewItemProviderF interface. +* If the event is generated, a method of this interface is called. +* So, when applications do jobs related to item events, use the methods of this interface. +* +*/ +#ifndef _FUI_CTRL_ISECTION_TABLE_VIEW_ITEM_PROVIDER_F_H_ +#define _FUI_CTRL_ISECTION_TABLE_VIEW_ITEM_PROVIDER_F_H_ + +namespace Tizen { namespace Ui { namespace Controls +{ +class TableViewItem; + +/** +* @interface ISectionTableViewItemProviderF +* @brief This interface implements the listener for events on %SectionTableView. +* +* @since 2.1 +* +* The %ISectionTableViewItemProviderF interface implements an item provider which generates items for SectionTableView. %SectionTableView calls the item provider +* to request an item which is about to be displayed on a screen. Applications which use %SectionTableView must implement the item provider. +* The class is registered with a %SectionTableView, using the SectionTableView::SetItemProviderF() method. +*/ +class _OSP_EXPORT_ ISectionTableViewItemProviderF +{ +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. + * + * @since 2.1 + */ + virtual ~ISectionTableViewItemProviderF(void) {} + + /** + * Gets the total number of groups in the SectionTableView control. + * + * @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 SectionTableView control. + */ + virtual int GetSectionCount(void) = 0; + + /** + * Gets the total number of items in the specified group. + * + * @since 2.1 + * + * @return The total number of items in the specified group + * @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. + */ + virtual int GetItemCount(int sectionIndex) = 0; + + /** + * Creates the specified item. + * + * @since 2.1 + * + * @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 + * @remarks + * - 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 @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() + */ + virtual TableViewItem* CreateItem(int sectionIndex, int itemIndex, float itemWidth) = 0; + + /** + * Deletes the specified item. + * + * @since 2.1 + * + * @return @c true if the item is deallocated by this method, @n + * else @c false + * @param[in] sectionIndex The section index + * @param[in] itemIndex The item index + * @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. + * - If the application deallocates the item, this method must return @c true. This notifies the %SectionTableView control not to release the + * item. Otherwise, the item is deallocated by the %SectionTableView control. + * @see CreateItem() + */ + virtual bool DeleteItem(int sectionIndex, int itemIndex, TableViewItem* pItem) = 0; + + /** + * Updates the specified item. + * + * @since 2.1 + * + * @param[in] sectionIndex The section index + * @param[in] itemIndex The item index + * @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. + * - The application can change @c pItem using this method, so the user should consider this when using @c pItem in future. + */ + virtual void UpdateItem(int sectionIndex, int itemIndex, TableViewItem* pItem) = 0; + + /** + * Gets the header text of the specified section. + * + * @since 2.1 + * + * @return The 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 left aligned. + */ + virtual Tizen::Base::String GetSectionHeader(int sectionIndex) = 0; + + /** + * Checks whether the group has a section header or not. + * + * @since 2.1 + * + * @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. + */ + virtual bool HasSectionHeader(int sectionIndex) = 0; + + /** + * Gets the footer text of the specified section. + * + * @since 2.1 + * + * @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. + * - The footer text will be right aligned. + */ + virtual Tizen::Base::String GetSectionFooter(int sectionIndex) = 0; + + /** + * Checks whether the section has a footer or not. + * + * @since 2.1 + * + * @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. + */ + virtual bool HasSectionFooter(int sectionIndex) = 0; + + /** + * Gets the default height of an item. + * + * @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 SectionTableView control. + */ + virtual float GetDefaultItemHeight(void) = 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. + // + // @since 2.1 + // + virtual void ISectionTableViewItemProviderF_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. + // + // @since 2.1 + // + virtual void ISectionTableViewItemProviderF_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. + // + // @since 2.1 + // + virtual void ISectionTableViewItemProviderF_Reserved3(void) {} +}; // ISectionTableViewItemProviderF + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_ISECTION_TABLE_VIEW_ITEM_PROVIDER_F_H_ diff --git a/inc/FUiCtrlISliderEventListener.h b/inc/FUiCtrlISliderEventListener.h new file mode 100644 index 0000000..871c865 --- /dev/null +++ b/inc/FUiCtrlISliderEventListener.h @@ -0,0 +1,108 @@ +// +// 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 FUiCtrlISliderEventListener.h + * @brief This is the header file for the %ISliderEventListener interface. + * + * This header file contains the declarations of the %ISliderEventListener interface. @n + * If a change event is generated, a method of this interface is called. @n + * So, if the applications perform tasks related to change events, use the methods of this interface. + * + */ +#ifndef _FUI_CTRL_ISLIDER_EVENT_LISTENER_H_ +#define _FUI_CTRL_ISLIDER_EVENT_LISTENER_H_ + +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ +class Slider; + +/** + * @interface ISliderEventListener + * @brief This interface implements the listener for all slider events. + * + * @since 2.0 + * + * The %ISliderEventListener interface is the listener interface for receiving Slider events, which are fired when the slider knob moves. + * The class that processes a slider event implements this interface, and the instance created with that class is registered with + * a UI control, using the control's AddSliderEventListener() method. When the slider event occurs, the OnSliderBarMoved() + * method of that instance is invoked. + * + * For more information on the class features, see Slider. + */ +class ISliderEventListener + : public Tizen::Base::Runtime::IEventListener +{ +// Operation +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~ISliderEventListener(void) {} + + /** + * Called when the Slider bar moves. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] value The current value indicated by the knob + * @remarks This event is fired when the knob is moved until the user releases the knob. + */ + virtual void OnSliderBarMoved(Tizen::Ui::Controls::Slider& source, int value) = 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. + // + // @since 2.0 + // + virtual void ISliderEventListener_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. + // + // @since 2.0 + // + virtual void ISliderEventListener_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. + // + // @since 2.0 + // + virtual void ISliderEventListener_Reserved3(void) {} + +}; // ISliderEventListener + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_ISLIDER_EVENT_LISTENER_H_ diff --git a/inc/FUiCtrlISplitPanelEventListener.h b/inc/FUiCtrlISplitPanelEventListener.h new file mode 100644 index 0000000..f1a785f --- /dev/null +++ b/inc/FUiCtrlISplitPanelEventListener.h @@ -0,0 +1,116 @@ +// +// 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 FUiCtrlISplitPanelEventListener.h + * @brief This is the header file for the %ISplitPanelEventListener interface. + * + * This header file contains the declarations of the %ISplitPanelEventListener interface. @n + * If a change event is generated, a method of this class is called. @n + * So, if the applications perform tasks related to change events, use the methods of this class. + * + */ +#ifndef _FUI_CTRL_ISPLIT_PANEL_EVENT_LISTENER_H_ +#define _FUI_CTRL_ISPLIT_PANEL_EVENT_LISTENER_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @interface ISplitPanelEventListener + * @brief This interface implements the listener for all splitpanel events. + * + * @since 2.0 + * + * The %ISplitPanelEventListener interface is the listener interface for receiving splitpanel events. + * The class that processes a splitpanel event implements this interface, and the instance created with that class is registered with + * a UI control, using the control's AddSplitPanelEventListener() method. When the splitpanel event occurs, a method of that instance is invoked. + * + * For more information on the class features, see SplitPanel. + */ +class _OSP_EXPORT_ ISplitPanelEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +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 + * + * @since 2.0 + */ + virtual ~ISplitPanelEventListener(void) {} + + /** + * Called when the divider moves. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] position The position of the divider + */ + virtual void OnDividerPositionChanged(Tizen::Ui::Controls::SplitPanel& source, int position) = 0; + + /** + * Called when the divider is double pressed. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @remarks This method is invoked when a divider is double pressed. + */ + virtual void OnDividerDoublePressed(Tizen::Ui::Controls::SplitPanel& 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. + // + // @since 2.0 + // + virtual void ISplitPanelEventListener_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. + // + // @since 2.0 + // + virtual void ISplitPanelEventListener_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. + // + // @since 2.0 + // + virtual void ISplitPanelEventListener_Reserved3(void) {} + +}; // ISplitPanelEventListener + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_ISPLIT_PANEL_EVENT_LISTENER_H_ diff --git a/inc/FUiCtrlISplitPanelEventListenerF.h b/inc/FUiCtrlISplitPanelEventListenerF.h new file mode 100644 index 0000000..2115b86 --- /dev/null +++ b/inc/FUiCtrlISplitPanelEventListenerF.h @@ -0,0 +1,117 @@ +// +// 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 FUiCtrlISplitPanelEventListenerF.h + * @brief This is the header file for the %ISplitPanelEventListenerF interface. + * + * This header file contains the declarations of the %ISplitPanelEventListenerF interface. @n + * If a change event is generated, a method of this interface is called. @n + * So, if the applications perform tasks related to change events, use the methods of this interface. + * + */ +#ifndef _FUI_CTRL_ISPLIT_PANEL_EVENT_LISTENER_F_H_ +#define _FUI_CTRL_ISPLIT_PANEL_EVENT_LISTENER_F_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @interface ISplitPanelEventListenerF + * @brief This interface implements the listener for all split panel events. + * + * @since 2.1 + * + * The %ISplitPanelEventListenerF interface is the listener interface for receiving split panel events. + * The class that processes a split panel event implements this interface, and the instance created with that class is registered with + * a UI control, using the SplitPanel::AddSplitPanelEventListener() method. When the split panel event occurs, a method of that instance is invoked. + * + * For more information on the class features, see SplitPanel. + */ +class _OSP_EXPORT_ ISplitPanelEventListenerF + : virtual public Tizen::Base::Runtime::IEventListener +{ +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 + * + * @since 2.1 + */ + virtual ~ISplitPanelEventListenerF(void) {} + + /** + * + * Called when a divider moves. + * + * @since 2.1 + * + * @param[in] source The source of the event + * @param[in] position The position of the divider + */ + virtual void OnDividerPositionChanged(Tizen::Ui::Controls::SplitPanel& source, float position) = 0; + + /** + * Called when a divider is double pressed. + * + * @since 2.1 + * + * @param[in] source The source of the event + * @remarks This method is invoked when a divider is double pressed. + */ + virtual void OnDividerDoublePressed(Tizen::Ui::Controls::SplitPanel& 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. + // + // @since 2.1 + // + virtual void ISplitPanelEventListenerF_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. + // + // @since 2.1 + // + virtual void ISplitPanelEventListenerF_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. + // + // @since 2.1 + // + virtual void ISplitPanelEventListenerF_Reserved3(void) {} + +}; // ISplitPanelEventListenerF + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_ISPLIT_PANEL_EVENT_LISTENER_F_H_ diff --git a/inc/FUiCtrlITableViewItemEventListener.h b/inc/FUiCtrlITableViewItemEventListener.h new file mode 100644 index 0000000..6d24949 --- /dev/null +++ b/inc/FUiCtrlITableViewItemEventListener.h @@ -0,0 +1,134 @@ +// +// 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 FUiCtrlITableViewItemEventListener.h +* @brief This is the header file for the %ITableViewItemEventListener interface. +* +* This header file contains the declarations of the %ITableViewItemEventListener interface. @n +* If an item event is generated, a method of this interface is called. +* So, if an application does some jobs related to the item event, use the methods of this interface. +* +*/ +#ifndef _FUI_CTRL_ITABLE_VIEW_ITEM_EVENT_LISTENER_H_ +#define _FUI_CTRL_ITABLE_VIEW_ITEM_EVENT_LISTENER_H_ + +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ +class TableView; +class TableViewItem; +class TableViewContextItem; + +/** +* @interface ITableViewItemEventListener +* @brief This interface implements the listener for item event. +* +* @since 2.0 +* +* The %ITableViewItemEventListener interface implements a listener for receiving item change events. +* The class that is interested in processing an item event implements this interface, +* and the instance created with that class is registered with a UI control, using the control's +* AddTableViewItemEventListener() method. When the item event occurs, the OnItemStateChanged() method of that object is invoked. +*/ +class _OSP_EXPORT_ ITableViewItemEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +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. + * + * @since 2.0 + */ + virtual ~ITableViewItemEventListener(void) {} + + /** + * Called when the state of a TableViewItem in the TableView is changed. + * + * @since 2.0 + * + * @param[in] tableView The source of the event + * @param[in] itemIndex The item index + * @param[in] pItem The target item + * @param[in] status The status of the item + * @remarks + * - This method is called when a TableViewItem in the TableView is checked, unchecked, or selected. + * - The application can change @c pItem in this method, but should not keep @c pItem for later use. + */ + virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status) = 0; + + /** + * Called when the TableViewContextItem is opened or closed. + * + * @since 2.0 + * + * @param[in] tableView The source of the event + * @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 + */ + virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView, int itemIndex, Tizen::Ui::Controls::TableViewContextItem* pContextItem, bool activated) = 0; + + /** + * Called when the item is reordered. + * + * @since 2.0 + * + * @param[in] tableView The source of the event + * @param[in] itemIndexFrom The start item index of the item + * @param[in] itemIndexTo The final item index of the item + */ + virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView, int itemIndexFrom, int itemIndexTo) = 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. + // + // @since 2.0 + // + virtual void ITableViewItemEventListener_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. + // + // @since 2.0 + // + virtual void ITableViewItemEventListener_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.. + // + // @since 2.0 + // + virtual void ITableViewItemEventListener_Reserved3(void) {} +}; // ITableViewItemEventListener + +}}} //Tizen::Ui::Controls + +#endif // _FUI_CTRL_ITABLE_VIEW_ITEM_EVENT_LISTENER_H_ diff --git a/inc/FUiCtrlITableViewItemProvider.h b/inc/FUiCtrlITableViewItemProvider.h new file mode 100644 index 0000000..43ca25e --- /dev/null +++ b/inc/FUiCtrlITableViewItemProvider.h @@ -0,0 +1,161 @@ +// +// 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 FUiCtrlITableViewItemProvider.h +* @brief This is the header file for the %ITableViewItemProvider interface. +* +* This header file contains the declarations of the %ITableViewItemProvider interface. +* If the event is generated, a method of this interface is called. +* So, if applications do jobs related to item events, use the methods of this interface. +* +*/ + +#ifndef _FUI_CTRL_ITABLE_VIEW_ITEM_PROVIDER_H_ +#define _FUI_CTRL_ITABLE_VIEW_ITEM_PROVIDER_H_ + +namespace Tizen { namespace Ui { namespace Controls +{ +class TableViewItem; + +/** +* @interface ITableViewItemProvider +* @brief This interface implements the listener for events on %TableView. +* +* @since 2.0 +* +* The %ITableViewItemProvider interface implements an item provider which generates items for TableView. %TableView calls the item provider +* to request an item which is about to be displayed on a screen. Applications which use %TableView must implement the item provider. +* The class is registered with a %TableView, using the TableView::SetItemProvider() method. +*/ +class _OSP_EXPORT_ ITableViewItemProvider +{ +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. + * + * @since 2.0 + */ + virtual ~ITableViewItemProvider(void) {} + + /** + * Gets the total number of items in the specified group. + * + * @since 2.0 + * + * @return The total number of items + * @remarks This method must be implemented so that it returns the total number of items for the specified group in the TableView control. + */ + virtual int GetItemCount(void) = 0; + + /** + * Creates the specified item. + * + * @since 2.0 + * + * @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 @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() + */ + virtual TableViewItem* CreateItem(int itemIndex, int itemWidth) = 0; + + /** + * Deletes the specified item. + * + * @since 2.0 + * + * @return @c true if the item is deallocated by this method, @n + * else @c false + * @param[in] itemIndex The item index + * @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. + * - If the application deallocates the item, this method must return @c true. This notifies the %TableView not to release the + * item. Otherwise, the item is deallocated by the %TableView. + * @see CreateItem() + */ + virtual bool DeleteItem(int itemIndex, TableViewItem* pItem) = 0; + + /** + * Updates the specified item. + * + * @since 2.0 + * + * @param[in] itemIndex The item index + * @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. + * - The application can change @c pItem in this method, but should not keep @c pItem for later use. + */ + virtual void UpdateItem(int itemIndex, TableViewItem* pItem) = 0; + + /** + * Gets the default height of an item. + * + * @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 TableView control. + */ + virtual int GetDefaultItemHeight(void) = 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. + // + // @since 2.0 + // + virtual void ITableViewItemProvider_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. + // + // @since 2.0 + // + virtual void ITableViewItemProvider_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. + // + // @since 2.0 + // + virtual void ITableViewItemProvider_Reserved3(void) {} +}; // ITableViewItemProvider + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_ITABLE_VIEW_ITEM_PROVIDER_H_ diff --git a/inc/FUiCtrlITableViewItemProviderF.h b/inc/FUiCtrlITableViewItemProviderF.h new file mode 100644 index 0000000..f9d3564 --- /dev/null +++ b/inc/FUiCtrlITableViewItemProviderF.h @@ -0,0 +1,161 @@ +// +// 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 FUiCtrlITableViewItemProviderF.h +* @brief This is the header file for the %ITableViewItemProviderF interface. +* +* This header file contains the declarations of the %ITableViewItemProviderF interface. +* If an event is generated, a method of this interface is called. +* So, if applications do jobs related to item events, use the methods of this interface. +* +*/ + +#ifndef _FUI_CTRL_ITABLE_VIEW_ITEM_PROVIDER_F_H_ +#define _FUI_CTRL_ITABLE_VIEW_ITEM_PROVIDER_F_H_ + +namespace Tizen { namespace Ui { namespace Controls +{ +class TableViewItem; + +/** +* @interface ITableViewItemProviderF +* @brief This interface implements the listener for events on %TableView. +* +* @since 2.1 +* +* The %ITableViewItemProviderF interface implements an item provider which generates items for TableView. %TableView calls the item provider +* to request an item which is about to be displayed on a screen. Applications which use %TableView must implement the item provider. +* The class is registered with a %TableView, using the TableView::SetItemProviderF() method. +*/ +class _OSP_EXPORT_ ITableViewItemProviderF +{ +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. + * + * @since 2.1 + */ + virtual ~ITableViewItemProviderF(void) {} + + /** + * Gets the total number of items in the specified group. + * + * @since 2.1 + * + * @return The total number of items + * @remarks This method must be implemented so that it returns the total number of items for the specified group in the TableView control. + */ + virtual int GetItemCount(void) = 0; + + /** + * Creates the specified item. + * + * @since 2.1 + * + * @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 @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() + */ + virtual TableViewItem* CreateItem(int itemIndex, float itemWidth) = 0; + + /** + * 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 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. + * - If the application deallocates the item, this method must return @c true. This notifies the %TableView not to release the + * item. Otherwise, the item is deallocated by the %TableView. + * @see CreateItem() + */ + virtual bool DeleteItem(int itemIndex, TableViewItem* pItem) = 0; + + /** + * Updates the specified item. + * + * @since 2.1 + * + * @param[in] itemIndex The item index + * @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. + * - The application can change @c pItem in this method, but should not keep @c pItem for later use. + */ + virtual void UpdateItem(int itemIndex, TableViewItem* pItem) = 0; + + /** + * Gets the default height of an item. + * + * @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 TableView control. + */ + virtual float GetDefaultItemHeight(void) = 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. + // + // @since 2.1 + // + virtual void ITableViewItemProviderF_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. + // + // @since 2.1 + // + virtual void ITableViewItemProviderF_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. + // + // @since 2.1 + // + virtual void ITableViewItemProviderF_Reserved3(void) {} +}; // ITableViewItemProviderF + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_ITABLE_VIEW_ITEM_PROVIDER_F_H_ diff --git a/inc/FUiCtrlITokenFilter.h b/inc/FUiCtrlITokenFilter.h new file mode 100644 index 0000000..d21008a --- /dev/null +++ b/inc/FUiCtrlITokenFilter.h @@ -0,0 +1,106 @@ +// +// 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 FUiCtrlITokenFilter.h + * @brief This is the header file for the %ITokenFilter interface. + * + * This header file contains the declarations of the %ITokenFilter interface. + */ +#ifndef _FUI_CTRL_ITOKEN_FILTER_H_ +#define _FUI_CTRL_ITOKEN_FILTER_H_ + +// includes +#include + +// namespace declaration +namespace Tizen { namespace Ui { namespace Controls +{ +/** + * @interface ITokenFilter + * @brief This interface defines the token filter. + * + * @since 2.0 + * + * The %ITokenFilter interface is the listener interface for replacing tokenized input in the ExpandableEditArea. + * + * For more information on the class features, see ExpandableEditArea. + * + */ +class _OSP_EXPORT_ ITokenFilter +{ +// Lifecycle +public: + /** + * This is the destructor for this class. + * @since 2.0 + */ + virtual ~ITokenFilter(void) {} + +// Operation +public: + /** + * Checks whether the text tokenized by the ExpandableEditArea instance must be replaced. + * + * @since 2.0 + * + * @return @c true if the text of the current token needs to be replaced, @n + * else @c false + * @param[in] token The text of the current token + * @param[out] replacement The user-defined replacement text + */ + virtual bool ReplaceToken(const Tizen::Base::String& token, Tizen::Base::String& replacement) = 0; + + +// Reserves +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. + // + // @since 2.0 + // + virtual void ITokenFilter_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. + // + // @since 2.0 + // + virtual void ITokenFilter_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. + // + // @since 2.0 + // + virtual void ITokenFilter_Reserved3(void) { } +}; // ITokenFilter + +}}} //Tizen::Ui::Controls +#endif //_FUI_CTRL_ITOKEN_FILTER_H_ diff --git a/inc/FUiCtrlIconList.h b/inc/FUiCtrlIconList.h new file mode 100644 index 0000000..be1d57d --- /dev/null +++ b/inc/FUiCtrlIconList.h @@ -0,0 +1,919 @@ +// +// 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. +// +/** + * @if OSPDEPREC + * @file FUiCtrlIconList.h + * @brief This is the header file for the %IconList class. + * + * This header file contains the declarations of the %IconList class and its helper classes. + * @endif + */ + +#ifndef _FUI_CTRL_ICON_LIST_H_ +#define _FUI_CTRL_ICON_LIST_H_ + +#include +#include +#include +#include +#include +#include +#include +#include + +// forward declarations +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @if OSPDEPREC + * @class IconList + * @brief [Deprecated] This class defines the common behavior of an %IconList control. + * + * @deprecated This class is deprecated. Instead of using this class, use the IconListView class. + * @since 2.0 + * + * @remarks %IconList can display a maximum of 64 items on the screen at once (for example, 8 x 8 grid). + * %IconList is not drawn properly when it is resized. + * + * The %IconList class can be used to display a list of bitmap images and icons. When + * a list item (or icon) is pressed by the user, an item event is generated and the + * item event listeners are called to notify the change in the + * item's state (ITEM_CHECKED, ITEM_UNCHECKED and ITEM_SELECTED). + * + * When %IconList's style is set as ICON_LIST_STYLE_RADIO, only one item + * can be "selected" at a time. Whereas, if ICON_LIST_STYLE_MARK is set as + * the %IconList's style, multiple items can be "checked" at the same time. + * However, no item can be selected or checked when %IconList's style is set as + * ICON_LIST_STYLE_NORMAL. + * + * When a list item is selected by the user, the "focused" bitmap image is displayed + * instead of item's "normal" bitmap image. + * + * Please note that any image resources (bitmaps) that are allocated by application + * 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 + * + *@n + * This is a simple UI application which uses a icon list control. + * + * + * @code +//Sample code for IconListSample.h +#include + +class IconListSample + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::IItemEventListener +{ +public: + IconListSample(void) + : __pIconList(null){} + + bool Initialize(void); + virtual result OnInitializing(void); + + // IItemEventListener + virtual void OnItemStateChanged(const Tizen::Ui::Control &source, int index, int itemId, Tizen::Ui::ItemStatus status); + +private: + static const int ID_LIST_FIRSTITEM = 101; + static const int ID_LIST_SECONDITEM = 102; + + Tizen::Ui::Controls::IconList *__pIconList; +}; + * @endcode + * + * @code +//Sample code for IconListSample.cpp +#include +#include + +#include "IconListSample.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Graphics; + +bool +IconListSample::Initialize(void) +{ + Construct(FORM_STYLE_NORMAL); + return true; +} + +result +IconListSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + // Creates an instance of IconList + __pIconList = new IconList(); + __pIconList->Construct(Rectangle(0, 100, GetClientAreaBounds().width, GetClientAreaBounds().height), ICON_LIST_STYLE_NORMAL, 96, 96); + __pIconList->AddItemEventListener(*this); + + // Creates instances of String + String itemText1(L"Item1"); + String itemText2(L"Item2"); + + // Gets instances of Bitmap + AppResource* pAppResource = Application::GetInstance()->GetAppResource(); + Bitmap *pBitmapNormal1 = pAppResource->GetBitmapN(L"call.png"); + Bitmap *pBitmapFocused1 = pAppResource->GetBitmapN(L"call_focused.png"); + Bitmap *pBitmapNormal2 = pAppResource->GetBitmapN(L"home.png"); + Bitmap *pBitmapFocused2 = pAppResource->GetBitmapN(L"home_focused.png"); + + // Adds the items to the icon list + __pIconList->AddItem(&itemText1, pBitmapNormal1, pBitmapFocused1, ID_LIST_FIRSTITEM); + __pIconList->AddItem(&itemText2, pBitmapNormal2, pBitmapFocused2, ID_LIST_SECONDITEM); + + // Adds the icon list to the form + AddControl(__pIconList); + + // Deallocates bitmaps + delete pBitmapNormal1; + delete pBitmapFocused1; + delete pBitmapNormal2; + delete pBitmapFocused2; + + return r; +} + +// IItemEventListener implementation +void +IconListSample::OnItemStateChanged (const Control &source, int index, int itemId, ItemStatus status) +{ + switch (itemId) + { + case ID_LIST_FIRSTITEM: + { + // .... + } + break; + case ID_LIST_SECONDITEM: + { + // .... + } + break; + default: + break; + } +} + * @endcode + * @endif + */ +class _OSP_EXPORT_ IconList + : public Tizen::Ui::Control +{ +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. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the IconListView class. + * @since 2.0 + * @endif + */ + IconList(void); + + /** + * @if OSPDEPREC + * 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. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the IconListView class. + * @since 2.0 + * @endif + */ + virtual ~IconList(void); + +public: + /** + * @if OSPDEPREC + * Initializes this instance of %IconList with the specified parameters. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the IconListView 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 %IconList along with + * 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 + * @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 + * - A control is fully usable only after it has been added to a container, therefore some methods may fail if used earlier. + * - The %IconList cannot display more than 64 items on screen at once. + * - The size of the control must be within the range defined by the minimum and maximum size. + * - The minimum size of this control is 0 x 0. + * @endif + */ + result Construct(const Tizen::Graphics::Rectangle& rect, IconListStyle style, int itemWidth, int itemHeight); + + +// Operation + /** + * @if OSPDEPREC + * Adds a listener instance. @n + * The added listener can listen to item events when they are fired. Only an item event with the ITEM_SELECTED state is fired. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the IconListView class. + * @since 2.0 + * + * @param[in] listener The listener to add + * @endif + */ + void AddItemEventListener(Tizen::Ui::IItemEventListener& listener); + + /** + * @if OSPDEPREC + * Removes a listener instance. @n + * 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 IconListView class. + * @since 2.0 + * + * @param[in] listener The listener to remove + * @endif + */ + void RemoveItemEventListener(Tizen::Ui::IItemEventListener& listener); + + /** + * @if OSPDEPREC + * Sets the background bitmap of the %IconList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the IconListView class. + * @since 2.0 + * + * @param[in] bitmap The background bitmap + * @endif + */ + void SetBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap); + + /** + * @if OSPDEPREC + * Sets the top and left margins of the items for %IconList. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the IconListView class. + * @since 2.0 + * + * @return An error code + * @param[in] topMargin The top margin of the background bitmap + * @param[in] leftMargin The left margin of the background bitmap + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @remarks The %IconList cannot display more than 64 items on screen at once. + * @endif + */ + result SetMargin(int topMargin, int leftMargin); + + + /** + * @if OSPDEPREC + * Gets the top margin of the items for the %IconList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the IconListView class. + * @since 2.0 + * + * @return The top margin of the background bitmap + * @endif + */ + int GetTopMargin(void) const; + + /** + * @if OSPDEPREC + * Gets the left margin of the items for the %IconList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the IconListView class. + * @since 2.0 + * + * @return The left margin of the background bitmap + * @endif + */ + int GetLeftMargin(void) const; + + /** + * @if OSPDEPREC + * Adds a list item with the specified text and bitmap images to the %IconList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the IconListView class. + * @since 2.0 + * + * @return An error code + * @param[in] pText The item text + * @param[in] pNormalBitmap The default bitmap image + * @param[in] pFocusedBitmap The displayed bitmap image when an item is selected + * @param[in] itemId The item ID + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @remarks + * - The contents of the specified texts and bitmaps are copied and kept by %List. + * - To display text in multi-lines or to denote the end of line, use '\\n'. + * @endif + */ + result AddItem(const Tizen::Base::String* pText, const Tizen::Graphics::Bitmap* pNormalBitmap, const Tizen::Graphics::Bitmap* pFocusedBitmap, int itemId = LIST_ITEM_UNSPECIFIED_ID); + + + /** + * @if OSPDEPREC + * Inserts the specified text and bitmap item in the specified index of the specified %IconList. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the IconListView class. + * @since 2.0 + * + * @return An error code + * @param[in] index The item text + * @param[in] pText The text item to add + * @param[in] pNormalBitmap The default bitmap image + * @param[in] pFocusedBitmap The displayed bitmap image when an item is selected + * @param[in] itemId The item ID + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @remarks + * - The contents of the specified texts and bitmaps are copied and kept by %IconList. + * - To display text in multi-lines or to denote the end of line, use '\\n'. + * @endif + */ + result InsertItemAt(int index, const Tizen::Base::String* pText, const Tizen::Graphics::Bitmap* pNormalBitmap, const Tizen::Graphics::Bitmap* pFocusedBitmap, int itemId = LIST_ITEM_UNSPECIFIED_ID); + + + /** + * @if OSPDEPREC + * Sets the specified text and bitmap item in the specified index of the specified %IconList. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the IconListView class. + * @since 2.0 + * + * @return An error code + * @param[in] index The index of the List item + * @param[in] pText The item text + * @param[in] pNormalBitmap The default bitmap image + * @param[in] pFocusedBitmap The displayed bitmap image when an item is selected + * @param[in] itemId The item ID + * @exception E_SUCCESS The method is successful. + * @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. + * - To display text in multi-lines or to denote the end of line, use '\\n'. + * @endif + */ + result SetItemAt(int index, const Tizen::Base::String* pText, const Tizen::Graphics::Bitmap* pNormalBitmap, const Tizen::Graphics::Bitmap* pFocusedBitmap, int itemId = LIST_ITEM_UNSPECIFIED_ID); + + + /** + * @if OSPDEPREC + * Removes the item at the specified index. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the IconListView class. + * @since 2.0 + * + * @return An error code + * @param[in] index The index of the %IconList item + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result RemoveItemAt(int index); + + /** + * @if OSPDEPREC + * Removes all items of the %IconList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the IconListView class. + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result RemoveAllItems(void); + + /** + * @if OSPDEPREC + * Gets the column count of the %IconList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the IconListView class. + * @since 2.0 + * + * @return The count of all the items of the %IconList control + * @endif + */ + int GetColumnCount(void) const; + + /** + * @if OSPDEPREC + * Gets the item count of the %IconList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the IconListView class. + * @since 2.0 + * + * @return The count of all the items of the %IconList control + * @endif + */ + int GetItemCount(void) const; + + /** + * @if OSPDEPREC + * Sets the checked status of the specified item of the %IconList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the IconListView class. + * @since 2.0 + * + * @return An error code + * @param[in] index The index of the %IconList item + * @param[in] check Set to @c true to check the specified item, @n + * 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 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); + + /** + * @if OSPDEPREC + * Checks whether the specified item of the %IconList control is checked. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the IconListView class. + * @since 2.0 + * + * @return @c true if the specified item is checked, @n + * else @c false + * @param[in] index The index of the list item + * @remarks This method can only be used when the style of the list allows selection. + * @endif + */ + bool IsItemChecked(int index) const; + + /** + * @if OSPDEPREC + * Sets the checked status of all the items of the %IconList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the IconListView class. + * @since 2.0 + * + * @return An error code + * @param[in] check Set to @c true to check all the items, @n + * 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). + * - 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); + + /** + * @if OSPDEPREC + * Removes all checked items of the %IconList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the IconListView class. + * @since 2.0 + * + * @return An error code + * @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. + * @endif + */ + result RemoveAllCheckedItems(void); + + /** + * @if OSPDEPREC + * Gets the first checked items of the %IconList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the IconListView class. + * @since 2.0 + * + * @return The index of the %IconList item + * @endif + */ + int GetFirstCheckedItemIndex(void) const; + + /** + * @if OSPDEPREC + * Gets the last checked items of the %IconList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the IconListView class. + * @since 2.0 + * + * @return The index of the %IconList item + * @endif + */ + int GetLastCheckedItemIndex(void) const; + + /** + * @if OSPDEPREC + * 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. + * @since 2.0 + * + * @return The index of the list item + * @param[in] index The index of the %IconList item + * @endif + */ + int GetNextCheckedItemIndexAfter(int index) const; + + /** + * @if OSPDEPREC + * 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 IconListView class. + * @since 2.0 + * + * @return The index of the item, @n + * else @c -1 if there is no list item at the specified position + * @param[in] x The x position of the point + * @param[in] y The y position of the point + * @endif + */ + int GetItemIndexFromPosition(int x, int y) const; + + /** + * @if OSPDEPREC + * 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 IconListView class. + * @since 2.0 + * + * @return The index of the item, @n + * else @c -1 if there is no list item at the specified position + * @param[in] position The position of the point + * @endif + */ + int GetItemIndexFromPosition(const Tizen::Graphics::Point& position) const; + + /** + * @if OSPDEPREC + * Sets a horizontal alignment of the text in the current %IconList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the IconListView class. + * @since 2.0 + * + * @param[in] alignment The horizontal alignment of the text + * @endif + */ + void SetTextHorizontalAlignment(HorizontalAlignment alignment); + + /** + * @if OSPDEPREC + * Sets a vertical alignment of the text of the current %IconList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the IconListView class. + * @since 2.0 + * + * @param[in] alignment The vertical alignment of the icon and text + * @endif + */ + void SetTextVerticalAlignment(VerticalAlignment alignment); + + /** + * @if OSPDEPREC + * Gets the horizontal alignment of the text of the current %IconList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the IconListView class. + * @since 2.0 + * + * @return The horizontal alignment of the %IconList control + * @endif + */ + HorizontalAlignment GetTextHorizontalAlignment(void) const; + + /** + * @if OSPDEPREC + * Gets the vertical alignment of the text of the current %IconList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the IconListView class. + * @since 2.0 + * + * @return The vertical alignment of the %IconList control + * @endif + */ + VerticalAlignment GetTextVerticalAlignment(void) const; + + /** + * @if OSPDEPREC + * Sets the background color of the %IconList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the IconListView class. + * @since 2.0 + * + * @param[in] color The background color + * @endif + */ + void SetBackgroundColor(const Tizen::Graphics::Color& color); + + /** + * @if OSPDEPREC + * Sets the text to display when the %IconList control contains no item. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the IconListView class. + * @since 2.0 + * + * @param[in] text The text + * @endif + */ + void SetTextOfEmptyList(const Tizen::Base::String& text); + + /** + * @if OSPDEPREC + * Sets the color of the text that is displayed when the %IconList control contains no item. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the IconListView class. + * @since 2.0 + * + * @param[in] color The color of the text + * @endif + */ + void SetTextColorOfEmptyList(const Tizen::Graphics::Color& color); + + + /** + * @if OSPDEPREC + * Gets the color of the text that is displayed when the %IconList control contains no item. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the IconListView class. + * @since 2.0 + * + * @return The color of the text, @n + * else RGBA(0, 0, 0, 0) if an error occurs + * @endif + */ + Tizen::Graphics::Color GetTextColorOfEmptyList(void) const; + + + /** + * @if OSPDEPREC + * Sets the text color of the item. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the IconListView class. + * @since 2.0 + * + * @param[in] textColor The color of the text + * @endif + */ + void SetItemTextColor(const Tizen::Graphics::Color& textColor); + + /** + * @if OSPDEPREC + * Gets the text color of the item. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the IconListView class. + * @since 2.0 + * + * @return The color of the text, @n + * else RGBA(0, 0, 0, 0) if an error occurs + * @endif + */ + Tizen::Graphics::Color GetItemTextColor(void) const; + + + /** + * @if OSPDEPREC + * Sets the size of the text of the current %IconList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the IconListView class. + * @since 2.0 + * + * @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. + * @exception E_SYSTEM A system error has occurred. + * @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); + + + /** + * @if OSPDEPREC + * Gets the size of the text of the current %IconList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the IconListView class. + * @since 2.0 + * + * @return The size of the text of the current %IconList control + * @endif + */ + int GetTextSize(void) const; + + /** + * @if OSPDEPREC + * Gets the index of the item with the specified item ID. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the IconListView class. + * @since 2.0 + * + * @return The index of the item, @n + * else @c -1 if there is no list item with the specified item ID + * @param[in] itemId The item ID of the list item + * @endif + */ + int GetItemIndexFromItemId(int itemId) const; + + /** + * @if OSPDEPREC + * Gets the item ID of the item at the specified index. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the IconListView class. + * @since 2.0 + * + * @return The item ID of the item, @n + * else @c -1 if there is no list item at the specified index + * @param[in] index The index of the list item + * @endif + */ + int GetItemIdAt(int index) const; + + /** + * @if OSPDEPREC + * Sets the position of the checkbox of the current %IconList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the IconListView class. + * @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 @c ICON_LIST_STYLE_RADIO or @c ICON_LIST_STYLE_MARK. + * @endif + */ + void SetCheckBoxPosition(IconListCheckBoxPosition position); + + /** + * @if OSPDEPREC + * Gets the position of the checkbox of the current %IconList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the IconListView class. + * @since 2.0 + * + * @return The position of the checkbox of the current %IconList control + * @endif + */ + IconListCheckBoxPosition GetCheckBoxPosition(void) const; + + /** + * @if OSPDEPREC + * Enables or disables focus animation. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the IconListView class. + * @since 2.0 + * + * @param[in] enable Set to @c true to enable focus animation, @n + * else @c false + * @remarks If a separate Focused Bitmap is to be used, the animation effect must be disabled. + * @endif + */ + void SetFocusAnimationEnabled(bool enable); + + /** + * @if OSPDEPREC + * Scrolls to the bottom of the %IconList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the IconListView class. + * @since 2.0 + * @endif + */ + void ScrollToBottom(void); + + /** + * @if OSPDEPREC + * Scrolls to the top of the %IconList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the IconListView class. + * @since 2.0 + * @endif + */ + void ScrollToTop(void); + + /** + * @if OSPDEPREC + * Scrolls the specified item to the top of %IconList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the IconListView class. + * @since 2.0 + * + * @return An error code + * @param[in] itemIndex The index of the item + * @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. + * @endif + */ + result ScrollToTop(int itemIndex); + + /** + * @if OSPDEPREC + * Draws and shows the item of %IconList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the IconListView class. + * @since 2.0 + * + * @return An error code + * @param[in] index The index of the %IconList item + * @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. + * @endif + */ + result RefreshItem(int index); + +public: + friend class _IconListImpl; + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + IconList(const IconList& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + IconList& operator =(const IconList& rhs); +}; //IconList + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_ICON_LIST_H_ diff --git a/inc/FUiCtrlIconListTypes.h b/inc/FUiCtrlIconListTypes.h new file mode 100644 index 0000000..977d1f1 --- /dev/null +++ b/inc/FUiCtrlIconListTypes.h @@ -0,0 +1,71 @@ +// +// 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 FUiCtrlIconListTypes.h + * @brief This is the header file for the %IconList enumerations. + * + * This header file contains the declarations of the enumerations of the IconList class. + * + * These enumerations define the various properties of the %IconList control. + */ + +#ifndef _FUI_CTRL_ICON_LIST_TYPES_H_ +#define _FUI_CTRL_ICON_LIST_TYPES_H_ + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @if OSPDEPREC + * @enum IconListStyle + * + * Defines the styles of IconList. + * + * @brief [Deprecated] + * @deprecated This enum is deprecated. Instead of using this enum, use the IconListViewStyle enumeration. + * @since 2.0 + * @endif + */ +enum IconListStyle +{ + 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 */ +}; + +/** + * @if OSPDEPREC + * @enum IconListCheckBoxPosition + * + * Defines the check-box position. + * + * @brief [Deprecated] + * @deprecated This enum is deprecated. Instead of using this enum, use the IconListViewCheckBoxPosition enumeration. + * @since 2.0 + * @endif + */ +enum IconListCheckBoxPosition +{ + ICON_LIST_CHECK_BOX_POSITION_TOP_LEFT, /**< @if OSPDEPREC The position of checkbox is top-left @endif */ + ICON_LIST_CHECK_BOX_POSITION_TOP_RIGHT, /**< @if OSPDEPREC The position of checkbox is top-right @endif */ + ICON_LIST_CHECK_BOX_POSITION_BOTTOM_LEFT, /**< @if OSPDEPREC The position of checkbox is bottom-left @endif */ + ICON_LIST_CHECK_BOX_POSITION_BOTTOM_RIGHT /**< @if OSPDEPREC The position of checkbox is bottom-right @endif */ +}; + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_ICON_LIST_TYPES_H_ diff --git a/inc/FUiCtrlIconListView.h b/inc/FUiCtrlIconListView.h new file mode 100644 index 0000000..d9ee6ee --- /dev/null +++ b/inc/FUiCtrlIconListView.h @@ -0,0 +1,1188 @@ +// +// 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 FUiCtrlIconListView.h + * @brief This is the header file for the %IconListView class. + * + * This header file contains the declarations of the %IconListView class and its helper classes. + */ + +#ifndef _FUI_CTRL_ICON_LIST_VIEW_H_ +#define _FUI_CTRL_ICON_LIST_VIEW_H_ + +//Includes +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @class IconListView + * @brief This class defines the common behavior for a %IconListView control. + * + * @since 2.0 + * + * The %IconListView class displays a 2-dimentional list of bitmap images and icons. + * + * For more information on the class features, see ListViews. + * + * The following example demonstrates how to use the %IconListView class. + * + * @code +//Sample code for IconListViewSample.h +#include + +class IconListViewSample + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::Controls::IIconListViewItemProvider + , public Tizen::Ui::Controls::IIconListViewItemEventListener +{ +public: + IconListViewSample(void) + : __pIconListView(null){} + + bool Initialize(void); + virtual result OnInitializing(void); + virtual result OnTerminating(void); + + // IIconListViewItemEventListener + virtual void OnIconListViewItemStateChanged(Tizen::Ui::Controls::IconListView &view, int index, Tizen::Ui::Controls::IconListViewItemStatus status); + + //IIconListViewItemProvider + virtual Tizen::Ui::Controls::IconListViewItem* CreateItem(int index); + virtual bool DeleteItem(int index, Tizen::Ui::Controls::IconListViewItem* pItem); + virtual int GetItemCount(void); + +private: + Tizen::Graphics::Bitmap* __pHome; + Tizen::Graphics::Bitmap* __pMsg; + Tizen::Graphics::Bitmap* __pAlarm; + + Tizen::Ui::Controls::IconListView* __pIconListView; +}; + * @endcode + * + * @code +//Sample code for IconListViewSample.cpp +#include +#include + +#include "IconListViewSample.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; + +bool +IconListViewSample::Initialize(void) +{ + Construct(FORM_STYLE_NORMAL); + return true; +} + +result +IconListViewSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + // Creates an instance of IconListView + __pIconListView = new IconListView(); + __pIconListView->Construct(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height), + Dimension(100, 100), ICON_LIST_VIEW_STYLE_NORMAL, ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL); + __pIconListView->SetItemProvider(*this); + __pIconListView->AddIconListViewItemEventListener(*this); + + // Adds the icon list view to the form + AddControl(__pIconListView); + + // Gets instances of Bitmap + AppResource* pAppResource = Application::GetInstance()->GetAppResource(); + __pHome = pAppResource->GetBitmapN(L"home.png"); + __pMsg = pAppResource->GetBitmapN(L"message.png"); + __pAlarm = pAppResource->GetBitmapN(L"alarm.png"); + + return r; +} + +result +IconListViewSample::OnTerminating(void) +{ + result r = E_SUCCESS; + + // Deallocates bitmaps + delete __pHome; + delete __pMsg; + delete __pAlarm; + + return r; +} + +int +IconListViewSample::GetItemCount(void) +{ + return 3; +} + +IconListViewItem* +IconListViewSample::CreateItem(int index) +{ + // Creates an instance of IconListViewItem + IconListViewItem* pIconListview = new IconListViewItem(); + + // Creates an instance of String + String* pStr = new String(); + + switch (index % 3) + { + case 0: + { + *pStr = L"Home"; + pIconListview->Construct(*__pHome, pStr); + } + break; + case 1: + { + *pStr = L"Msg"; + pIconListview->Construct(*__pMsg, pStr); + } + break; + case 2: + { + *pStr = L"Alarm"; + pIconListview->Construct(*__pAlarm, pStr); + } + break; + } + + // Deallocates the string + delete pStr; + + return pIconListview; +} + +bool +IconListViewSample::DeleteItem(int index, IconListViewItem* pItem) +{ + delete pItem; + return true; +} + +void +IconListViewSample::OnIconListViewItemStateChanged (IconListView &view, int index, IconListViewItemStatus status) +{ + switch (index) + { + case 0: + { + // .... + } + break; + case 1: + { + // .... + } + break; + default: + break; + } +} + * @endcode + * + */ +class _OSP_EXPORT_ IconListView + : public Tizen::Ui::Control +{ +public: + /** + * 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 + */ + IconListView(void); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~IconListView(void); + +public: + /** + * Initializes this instance of %IconListView with the specified parameters. + * + * @since 2.0 + * + * @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 %IconListView along with + * the width and height.@n + * The optimal size of the control is defined in + * Optimal Size of UI Controls. + * @param[in] itemBitmapSize The size of an icon in %IconListView + * @param[in] style The style set of %IconListView + * @param[in] direction The direction of scroll + * @param[in] scrollStyle The scroll style of %IconListView + * @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 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 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); + + /** + * Initializes this instance of %IconListView with the specified parameters. + * + * @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 of the created %IconListView along with + * the width and height.@n + * The optimal size of the control is defined in + * Optimal Size of UI Controls. + * @param[in] itemBitmapSize The size of an icon in %IconListView + * @param[in] style The style set of %IconListView + * @param[in] direction The direction of scroll + * @param[in] scrollStyle The scroll style of %IconListView + * @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 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 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); + + /** + * Sets the item provider that creates and deletes items for the %IconListView control. + * + * @since 2.0 + * + * @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. + */ + result SetItemProvider(IIconListViewItemProvider& provider); + + /** + * Adds a listener instance. @n + * The added listener can listen to item events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The listener to add + */ + void AddIconListViewItemEventListener(IIconListViewItemEventListener& listener); + + /** + * Removes a listener instance. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The listener to remove + */ + void RemoveIconListViewItemEventListener(IIconListViewItemEventListener& listener); + + /** + * Adds a listener instance that listens to state changes of a scroll event. @n + * The added listener can listen to events on the context of the given event dispatcher when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to add + * @see IScrollEventListener::OnScrollEndReached() + * @see RemoveScrollEventListener() + */ + void AddScrollEventListener(IScrollEventListener& listener); + + /** + * Adds a listener instance that listens to state changes of a scroll event. @n + * The added listener can listen to events on the context of the given event dispatcher when they are fired. + * + * @since 2.1 + * + * @param[in] listener The event listener to add + * @see IScrollEventListenerF::OnScrollEndReached() + * @see RemoveScrollEventListener() + */ + void AddScrollEventListener(IScrollEventListenerF& listener); + + /** + * Removes a listener instance that listens to state changes of a scroll event. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to remove + * @see IScrollEventListener::OnScrollEndReached() + * @see RemoveScrollEventListener() + */ + void RemoveScrollEventListener(IScrollEventListener& listener); + + /** + * Removes a listener instance that listens to state changes of a scroll event. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.1 + * + * @param[in] listener The event listener to remove + * @see IScrollEventListenerF::OnScrollEndReached() + * @see RemoveScrollEventListener() + */ + void RemoveScrollEventListener(IScrollEventListenerF& listener); + + /** + * Sets the background bitmap of %IconListView. + * + * @since 2.0 + * + * @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. + * - 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); + + /** + * Sets the background color of this control. + * + * @since 2.0 + * + * @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. + * - 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); + + /** + * Gets the background color of this control. + * + * @since 2.0 + * + * @return The background color, @n + * else RGBA(0, 0, 0, 0) if an error occurs + */ + Tizen::Graphics::Color GetBackgroundColor(void) const; + + /** + * Sets the margin of %IconListView. + * + * @since 2.0 + * + * @return An error code + * @param[in] type The type of margin + * @param[in] value The marginal value + * @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 number of items to be displayed on a screen is calculated based on %IconListView size, item size, item spacing, and + * margins. %IconListView cannot display more than @c 256 items on screen at once. + */ + result SetMargin(MarginType type, int value); + + /** + * Sets the margin of %IconListView. + * + * @since 2.1 + * + * @return An error code + * @param[in] type The type of margin + * @param[in] value The marginal value + * @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 number of items to be displayed on a screen is calculated based on %IconListView size, item size, item spacing, and + * margins. The %IconListView cannot display more than 256 items on screen at once. + */ + result SetMargin(MarginType type, float value); + + /** + * Gets the margin of %IconListView. + * + * @since 2.0 + * + * @return The marginal value of %IconListView, @n + * else @c -1 if an error occurs + * @param[in] type The type of margin + */ + int GetMargin(MarginType type) const; + + /** + * Gets the margin of %IconListView. + * + * @since 2.1 + * + * @return The marginal value of %IconListView, @n + * else @c -1 if an error occurs + * @param[in] type The type of margin + */ + float GetMarginF(MarginType type) const; + + /** + * Sets the horizontal and vertical spacing between the items. + * + * @since 2.0 + * + * @return An error code + * @param[in] horizontalSpacing The spacing between items in horizontal direction + * @param[in] verticalSpacing The spacing between items in vertical direction + * @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 number of items to be displayed on a screen is calculated based on %IconListView size, item size, item spacing, and + * margins. %IconListView cannot display more than @c 256 items on screen at once. + */ + result SetItemSpacing(int horizontalSpacing, int verticalSpacing); + + /** + * Sets the horizontal and vertical spacing between the items. + * + * @since 2.1 + * + * @return An error code + * @param[in] horizontalSpacing The spacing between items in horizontal direction + * @param[in] verticalSpacing The spacing between items in vertical direction + * @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 number of items to be displayed on a screen is calculated based on %IconListView size, item size, item spacing, and + * margins. The %IconListView cannot display more than 256 items on screen at once. + */ + result SetItemSpacing(float horizontalSpacing, float verticalSpacing); + + /** + * Gets the horizontal spacing between items of %IconListView. + * + * @since 2.0 + * + * @return The value of space between items in horizontal direction, @n + * else @c -1 if an error occurs + */ + int GetItemHorizontalSpacing(void) const; + + /** + * Gets the horizontal spacing between items of %IconListView. + * + * @since 2.1 + * + * @return The value of space between items in horizontal direction, @n + * else @c -1 if an error occurs + */ + float GetItemHorizontalSpacingF(void) const; + + /** + * Gets the vertical spacing between items of %IconListView. + * + * @since 2.0 + * + * @return The value of space between items in vertical direction, @n + * else @c -1 if an error occurs + */ + int GetItemVerticalSpacing(void) const; + + /** + * Gets the vertical spacing between items of %IconListView. + * + * @since 2.1 + * + * @return The value of space between items in vertical direction, @n + * else @c -1 if an error occurs + */ + float GetItemVerticalSpacingF(void) const; + + /** + * Sets the checked status of the specified item of %IconListView. + * + * @since 2.0 + * + * @return An error code + * @param[in] index The index of the %IconListView item + * @param[in] check The check status + * @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. + * - 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); + + /** + * Checks whether the specified @c item is checked. + * + * @since 2.0 + * + * @return @c true if the specified @c item is checked, @n + * else @c false + * @param[in] index The index of the item + * @remarks This method can only be used when the style of the list allows selection. + */ + bool IsItemChecked(int index) const; + + /** + * Gets the index of the item at the specified position. + * + * @since 2.0 + * + * @return The index of the item, @n + * else @c -1 if there is no list item at the specified position or if the %IconListView instance is invalid + * @param[in] x The x position of a point + * @param[in] y The y position of a point + */ + int GetItemIndexFromPosition(int x, int y) const; + + /** + * Gets the index of the item at the specified @c position. + * + * @since 2.1 + * + * @return The index of the item, @n + * else @c -1 if there is no list item at the specified position or if the %IconListView instance is invalid + * @param[in] x The x position of a point + * @param[in] y The y position of a point + */ + int GetItemIndexFromPosition(float x, float y) const; + + /** + * Gets the index of the item at the specified position. + * + * @since 2.0 + * + * @return The index of the item, @n + * else @c -1 if there is no list item at the specified @c position or if the %IconListView instance is invalid + * @param[in] position The position of a point + */ + int GetItemIndexFromPosition(const Tizen::Graphics::Point& position) const; + + /** + * Gets the index of the item at the specified position. + * + * @since 2.1 + * + * @return The index of the item, @n + * else @c -1 if there is no list item at the specified @c position or if the %IconListView instance is invalid + * @param[in] position The position of a point + */ + int GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& position) const; + + /** + * Sets the horizontal alignment of the text of an item. + * + * @since 2.0 + * + * @return An error code + * @param[in] alignment The horizontal alignment of the text + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetTextHorizontalAlignment(HorizontalAlignment alignment); + + /** + * Sets the vertical alignment of the text of an item. + * + * @since 2.0 + * + * @return An error code + * @param[in] alignment The vertical alignment of the text + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetTextVerticalAlignment(IconListViewItemTextVerticalAlignment alignment); + + /** + * Gets the horizontal alignment of the text of the %IconListView control. + * + * @since 2.0 + * + * @return The horizontal alignment of the text, @n + * else @c ALIGNMENT_LEFT when the %IconListView instance is invalid + */ + HorizontalAlignment GetTextHorizontalAlignment(void) const; + + /** + * Gets the vertical alignment of the text of the current %IconListView. + * + * @since 2.0 + * + * @return The vertical alignment of the text of an item, @n + * else @c ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_INSIDE_TOP when the %IconListView instance is invalid + */ + IconListViewItemTextVerticalAlignment GetTextVerticalAlignment(void) const; + + /** + * Sets the text of the empty list. + * + * @since 2.0 + * + * @return An error code + * @param[in] text The text of the empty list + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetTextOfEmptyList(const Tizen::Base::String& text); + + /** + * Gets the text to display when there is no item in the list. + * + * @since 2.0 + * + * @return The text to be displayed, @n + * else an empty string if the instance is invalid + */ + Tizen::Base::String GetTextOfEmptyList(void) const; + + /** + * Sets the color of the text that is displayed when %IconListView contains no item. + * + * @since 2.0 + * + * @return An error code + * @param[in] color The color of the text + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetTextColorOfEmptyList(const Tizen::Graphics::Color& color); + + /** + * Gets the color of the text to display when there is no item in the list. + * + * @since 2.0 + * + * @return The color of the text to be displayed, @n + * else RGBA(0, 0, 0, 0) if the instance is invalid + */ + Tizen::Graphics::Color GetTextColorOfEmptyList(void) const; + + /** + * Sets the text color of the item. + * + * @since 2.0 + * + * @return An error code + * @param[in] status The drawing status of items + * @param[in] color The color of the text + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetItemTextColor(IconListViewItemDrawingStatus status, const Tizen::Graphics::Color& color); + + /** + * Gets the text color of the item. + * + * @since 2.0 + * + * @return The color of the text, @n + * else RGBA(0, 0, 0, 0) if the instance is invalid + * @param[in] status The drawing status of items + */ + Tizen::Graphics::Color GetItemTextColor(IconListViewItemDrawingStatus status) const; + + /** + * Sets the size of the text of the %IconListView control. + * + * @since 2.0 + * + * @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. + * @exception E_SYSTEM A system error has occurred. + * @remarks If the specified @c size is less than the minimum size, this method fails. The minimum font size is @c 6 on devices of high screen density. + */ + result SetItemTextSize(int size); + + /** + * Sets the size of the text of the %IconListView control. + * + * @since 2.1 + * + * @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. + * @exception E_SYSTEM A system error has occurred. + * @remarks If the specified @c size is less than the minimum size, this method fails. The minimum font size is @c 6 on devices of high screen density. + */ + result SetItemTextSize(float size); + + /** + * Gets the size of the text of the %IconListView control. + * + * @since 2.0 + * + * @return The size of the text of the %IconListView control, @n + * else @c -1 if the instance is invalid + */ + int GetItemTextSize(void) const; + + /** + * Gets the size of the text of the %IconListView control. + * + * @since 2.1 + * + * @return The size of the text of the %IconListView control, @n + * else @c -1 if the instance is invalid + */ + float GetItemTextSizeF(void) const; + + /** + * Sets the position of the checkbox of the %IconListView control. + * + * @since 2.0 + * + * @return An error code + * @param[in] position The position of the checkbox of the %IconListView 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 + * That is, %IconListView cannot get the position of the checkbox when the style is @c ICON_LIST_VIEW_STYLE_NORMAL. + * @exception E_SYSTEM A system error has occurred. + * @remarks This method changes the position of the checkbox image displayed for the "selected" item(s), + * when the style of %IconListView is either @c ICON_LIST_VIEW_STYLE_RADIO or @c ICON_LIST_VIEW_STYLE_MARK. + */ + result SetCheckBoxPosition(IconListViewCheckBoxPosition position); + + /** + * Gets the position of the checkbox of the %IconListView control. + * + * @since 2.0 + * + * @return The position of the checkbox + * @remarks This method returns @c ICON_LIST_VIEW_CHECK_BOX_POSITION_TOP_LEFT when the style of %IconListView is @c ICON_LIST_VIEW_STYLE_NORMAL or + * @c ICON_LIST_VIEW_STYLE_DIVIDE_TEXT. + */ + IconListViewCheckBoxPosition GetCheckBoxPosition(void) const; + + /** + * Enables or disables touch animation. + * + * @since 2.0 + * + * @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. + * - 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); + + /** + * Checks whether touch animation is enabled. + * + * @since 2.0 + * + * @return @c true if touch animation is enabled, @n + * else @c false if touch animation is disabled or if the instance is invalid + */ + bool IsTouchAnimationEnabled(void) const; + + /** + * Scrolls the list contents to the specified @c index. + * + * @since 2.0 + * + * @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. + * @exception E_OUT_OF_RANGE The specified @c index is out of range. + */ + result ScrollToItem(int index); + + /* + * Scrolls the list contents with the amount of pixels. + * + * @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. + * @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); + + /* + * Scrolls the list contents with the amount of pixels. + * + * @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. + * @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); + + /** + * Refreshes the specified item of %IconListView. + * + * @since 2.0 + * + * @return An error code + * @param[in] index The index of the %IconListView item + * @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 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. + */ + result RefreshList(int index, ListRefreshType type); + + /** + * Updates the whole items of a list. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @remarks This method clears items in the list and re-invokes the methods of the item provider to fill the list. + */ + result UpdateList(void); + + /** + * Gets the size of bitmap of the item. + * + * @since 2.0 + * + * @return An error code + * @param[out] width The width of bitmap of the item + * @param[out] height The height of bitmap of the item + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + result GetItemBitmapSize(int& width, int& height) const; + + /** + * Gets the size of bitmap of the item. + * + * @since 2.1 + * + * @return An error code + * @param[out] width The width of bitmap of the item + * @param[out] height The height of bitmap of the item + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + result GetItemBitmapSize(float& width, float& height) const; + + /** + * Gets the size of bitmap of the item. + * + * @since 2.0 + * + * @return The size of bitmap of the item, @n + * else (-1, -1) if the instance is invalid + */ + Tizen::Graphics::Dimension GetItemBitmapSize(void) const; + + /** + * Gets the size of bitmap of the item. + * + * @since 2.1 + * + * @return The size of bitmap of the item, @n + * else (-1, -1) if the instance is invalid + */ + Tizen::Graphics::FloatDimension GetItemBitmapSizeF(void) const; + + /** + * Gets the size of the item. + * + * @since 2.0 + * + * @return An error code + * @param[out] width The width of the item + * @param[out] height The height of the item + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + result GetItemSize(int& width, int& height) const; + + /** + * Gets the size of the item. + * + * @since 2.1 + * + * @return An error code + * @param[out] width The width of the item + * @param[out] height The height of the item + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + result GetItemSize(float& width, float& height) const; + + /** + * Gets the size of the item. + * + * @since 2.0 + * + * @return The size of the item, @n + * else (-1, -1) if the instance is invalid + */ + Tizen::Graphics::Dimension GetItemSize(void) const; + + /** + * Gets the size of the item. + * + * @since 2.1 + * + * @return The size of the item, @n + * else (-1, -1) if the instance is invalid + */ + Tizen::Graphics::FloatDimension GetItemSizeF(void) const; + + /** + * Sets the number of item lines to be scrolled for the magnetic scroll of %IconListView. + * + * @since 2.0 + * + * @return An error code + * @param[in] scrollSize The number of item lines for the magnetic scroll of %IconListView + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified @c scrollSize is out of range. @n + * The specified @c scrollSize is less than @c 0 or greater than the item count shown along the scroll direction. + * @exception E_SYSTEM A system error has occurred. + * @remarks If the @c scrollSize is set to @c 0, %IconListView does not use the magnetic scroll. The initial value is @c 0. + */ + result SetMagneticScrollSize(int scrollSize); + + /** + * Gets the number of item lines for the magnetic scroll of %IconListView. + * + * @since 2.0 + * + * @return The number of item lines for the magnetic scroll of %IconListView, @n + * else @c -1 if the instance is invalid + */ + int GetMagneticScrollSize(void) const; + + /** + * Gets the number of items to be displayed per axis of %IconListView. + * + * @since 2.0 + * + * @return The number of items to be displayed per axis, @n + * else @c -1 if the instance is invalid + * @remarks The axis represents "row" when the scroll style is @c ICON_LIST_VIEW_SCROLLSDIRECTION_HORIZONTAL, while it represents "column" when the + * scroll style is @c ICON_LIST_VIEW_SCROLLDIRECTION_VERTICAL. + */ + int GetItemCountPerAxis(void) const; + + /** + * Sets the items horizontal alignment of %IconListView. + * + * @since 2.0 + * + * @return An error code + * @param[in] alignment The alignment of items + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_OPERATION The alignment of icon list view is not in the vertical scroll direction. + * @exception E_SYSTEM A system error has occurred. + */ + result SetItemLayoutHorizontalAlignment(HorizontalAlignment alignment); + + /** + * Sets the items vertical alignment of %IconListView. + * + * @since 2.0 + * + * @return An error code + * @param[in] alignment The alignment of items + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_OPERATION The alignment of icon list view is not in the horizontal scroll direction. + * @exception E_SYSTEM A system error has occurred. + */ + result SetItemLayoutVerticalAlignment(VerticalAlignment alignment); + + /** + * Gets the items horizontal alignment of %IconListView. + * + * @since 2.0 + * + * @return The alignment of items, @n + * else @c ALIGNMENT_LEFT if the instance is invalid + */ + HorizontalAlignment GetItemLayoutHorizontalAlignment(void) const; + + /** + * Gets the items vertical alignment of %IconListView. + * + * @since 2.0 + * + * @return The alignment of items, @n + * else @c ALIGNMENT_TOP if the instance is invalid + */ + VerticalAlignment GetItemLayoutVerticalAlignment(void) const; + + /** + * Sets the item border style. + * + * @since 2.0 + * + * @return An error code + * @param[in] borderStyle An item border style + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetItemBorderStyle(IconListViewItemBorderStyle borderStyle); + + /** + * Gets the item border style. + * + * @since 2.0 + * + * @return The item border style, @n + * else @c ICON_LIST_VIEW_ITEM_BORDER_STYLE_NONE if an error occurs + */ + IconListViewItemBorderStyle GetItemBorderStyle(void) const; + + /** + * Sets the bitmap of the empty list. + * + * @since 2.0 + * + * @return An error code + * @param[in] pBitmap The bitmap of the empty list + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetBitmapOfEmptyList(const Tizen::Graphics::Bitmap* pBitmap); + + /** + * Begins the reordering mode. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see IIconListViewItemEventListener::OnIconListViewItemReordered() + */ + result BeginReorderingMode(void); + + /** + * Ends the reordering mode. + * + * @since 2.0 + * + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see IIconListViewItemEventListener::OnIconListViewItemReordered() + */ + result EndReorderingMode(void); + + /** + * Checks whether %IconListView is in reordering mode. + * + * @since 2.0 + * + * @return @c true if %IconListView is in reordering mode, @n + * else @c false + */ + bool IsInReorderingMode(void) const; + + /** + * Sets the scroll input handling mode. + * + * @since 2.1 + * + * @param[in] mode The scroll input handling mode + * @see GetScrollInputMode() + */ + void SetScrollInputMode(ScrollInputMode mode); + + /** + * Gets the scroll input handling mode. + * + * @since 2.1 + * + * @return The scroll input handling mode + * @see SetScrollInputMode() + */ + ScrollInputMode GetScrollInputMode(void) const; + +public: + friend class _IconListViewImpl; + +private: + /** + * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + * + * @since 2.0 + */ + IconListView(const IconListView& rhs); + + /** + * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + * + * @since 2.0 + */ + IconListView& operator =(const IconListView& rhs); + +}; // IconListView + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_ICON_LIST_VIEW_H_ diff --git a/inc/FUiCtrlIconListViewItem.h b/inc/FUiCtrlIconListViewItem.h new file mode 100644 index 0000000..794cd2a --- /dev/null +++ b/inc/FUiCtrlIconListViewItem.h @@ -0,0 +1,125 @@ +// +// 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 FUiCtrlIconListViewItem.h + * @brief This is the header file for the %IconListViewItem class. + * + * This header file contains the declarations of the %IconListViewItem class and its helper classes. + */ + +#ifndef _FUI_CTRL_ICON_LIST_VIEW_ITEM_H_ +#define _FUI_CTRL_ICON_LIST_VIEW_ITEM_H_ + +//includes +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +class IconListView; +class _IconListItemProviderAdaptor; +class _IconListViewItemImpl; + +/** + * @class IconListViewItem + * @brief This class defines the common behavior of a %IconListViewItem control. + * + * @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. + * + * For more information on the class features, see ListViews. + */ +class _OSP_EXPORT_ IconListViewItem + : public Tizen::Base::Object +{ +public: + /** + * 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 + */ + IconListViewItem(void); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~IconListViewItem(void); + +public: + /** + * Initializes this instance of %IconListViewItem with the specified parameters. + * + * @since 2.0 + * + * @return An error code + * @param[in] bitmap The default bitmap image + * @param[in] pText The item text + * @param[in] pSelectedBitmap The displayed bitmap image when an item is selected + * @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 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); + + /** + * Sets the overlay bitmap image as an element to the item. + * + * @since 2.0 + * + * @return An error code + * @param[in] overlayBitmapId The overlay bitmap ID + * @param[in] pOverlayBitmap The pointer of the overlay bitmap image + * @param[in] horizontalAlignment The horizontal alignment of overlay bitmap + * @param[in] verticalAlignment The vertical alignment of overlay bitmap + * @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 When @c pOverlayBitmap is set as @c null, the overlay bitmap of the specified location will be erased. + */ + result SetOverlayBitmap(int overlayBitmapId, const Tizen::Graphics::Bitmap* pOverlayBitmap, HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment); + +private: + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + IconListViewItem(const IconListViewItem& rhs); + + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + IconListViewItem& operator =(const IconListViewItem& rhs); + +private: + friend class IconListView; + friend class _IconListItemProviderAdaptor; + friend class _IconListViewItemImpl; + + // This value is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + _IconListViewItemImpl* __pImpl; +}; //IconListViewItem + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_ICON_LIST_VIEW_ITEM_H_ diff --git a/inc/FUiCtrlIconListViewTypes.h b/inc/FUiCtrlIconListViewTypes.h new file mode 100644 index 0000000..66f2d20 --- /dev/null +++ b/inc/FUiCtrlIconListViewTypes.h @@ -0,0 +1,150 @@ +// +// 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 FUiCtrlIconListViewTypes.h + * @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. + */ + +#ifndef _FUI_CTRL_ICON_LIST_VIEW_TYPES_H_ +#define _FUI_CTRL_ICON_LIST_VIEW_TYPES_H_ + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @enum IconListViewStyle + * + * Defines the styles of the IconListView control. + * + * @since 2.0 + */ +enum IconListViewStyle +{ + ICON_LIST_VIEW_STYLE_NORMAL = 0, /**< The No mark or radio check */ + ICON_LIST_VIEW_STYLE_RADIO, /**< The radio style for a single selection */ + ICON_LIST_VIEW_STYLE_MARK /**< The mark style for multiple selections */ +}; + +/** + * @enum IconListViewItemBorderStyle + * + * Defines the constants used to identify the border style of the item. + * + * @since 2.0 + */ +enum IconListViewItemBorderStyle +{ + ICON_LIST_VIEW_ITEM_BORDER_STYLE_NONE = 0, /**< The item that has no border */ + ICON_LIST_VIEW_ITEM_BORDER_STYLE_OUTLINE, /**< The item that has a line border */ + ICON_LIST_VIEW_ITEM_BORDER_STYLE_SHADOW /**< The item that has a bitmap border with the drop shadow effect */ +}; + +/** + * @enum IconListViewScrollDirection + * + * Defines the scroll direction of the IconListView control. + * + * @since 2.0 + */ +enum IconListViewScrollDirection +{ + ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL, /**< The vertical direction */ + ICON_LIST_VIEW_SCROLL_DIRECTION_HORIZONTAL /**< The horizontal direction */ +}; + +/** + * @enum IconListViewItemTextVerticalAlignment + * + * Defines the vertical alignment of the item text. + * + * @since 2.0 + */ +enum IconListViewItemTextVerticalAlignment +{ + ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_INSIDE_TOP, /**< The text is top-aligned inside the item */ + ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_INSIDE_MIDDLE, /**< The text is middle-aligned inside the item */ + ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_INSIDE_BOTTOM, /**< The text is bottom-aligned inside the item */ + ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_OUTSIDE_TOP, /**< The text is top-aligned outside the item */ + ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_OUTSIDE_BOTTOM /**< The text is bottom-aligned outside the item */ +}; + +/** + * @enum IconListViewItemStatus + * + * Defines the constants used to identify the item state. + * + * @since 2.0 + */ +enum IconListViewItemStatus +{ + ICON_LIST_VIEW_ITEM_CHECKED = 0, /**< The item has been checked (toggle of the check area) */ + ICON_LIST_VIEW_ITEM_UNCHECKED, /**< The item has been unchecked (toggle of the check area) */ + ICON_LIST_VIEW_ITEM_SELECTED, /**< The item has been selected (non-check area of the item) */ + ICON_LIST_VIEW_ITEM_HIGHLIGHTED /**< The item has been highlighted (non-check area of the item) */ +}; + +/** + * @enum IconListViewItemDrawingStatus + * + * Defines the drawing state of the IconListView control items. + * + * @since 2.0 + */ +enum IconListViewItemDrawingStatus +{ + ICON_LIST_VIEW_ITEM_DRAWING_STATUS_NORMAL = 0, /**< The drawing status for normal items */ + ICON_LIST_VIEW_ITEM_DRAWING_STATUS_PRESSED, /**< The drawing status for pressed items */ + ICON_LIST_VIEW_ITEM_DRAWING_STATUS_HIGHLIGHTED /**< The drawing status for highlighted items */ +}; + +/** + * @enum IconListViewCheckBoxPosition + * + * Defines the checkbox position. + * + * @since 2.0 + */ +enum IconListViewCheckBoxPosition +{ + ICON_LIST_VIEW_CHECK_BOX_POSITION_TOP_LEFT, /**< The position of the checkbox is top-left */ + ICON_LIST_VIEW_CHECK_BOX_POSITION_TOP_RIGHT, /**< The position of the checkbox is top-right */ + ICON_LIST_VIEW_CHECK_BOX_POSITION_BOTTOM_LEFT, /**< The position of the checkbox is bottom-left */ + ICON_LIST_VIEW_CHECK_BOX_POSITION_BOTTOM_RIGHT /**< The position of the checkbox is bottom-right */ +}; + +/** + * @enum IconListViewScrollStyle + * + * Defines the scroll style of the IconListView control. + * + * @since 2.0 + */ +enum IconListViewScrollStyle +{ + ICON_LIST_SCROLL_STYLE_FADE_OUT = 0, /**< The fade-out scroll style */ + ICON_LIST_SCROLL_STYLE_FIXED, /**< The fixed scroll style */ + ICON_LIST_SCROLL_STYLE_JUMP_TO_TOP, /**< The jump to top scroll style */ + ICON_LIST_SCROLL_STYLE_THUMB /**< The thumb scroll style */ +}; + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_ICON_LIST_VIEW_TYPES_H_ diff --git a/inc/FUiCtrlInputTypes.h b/inc/FUiCtrlInputTypes.h new file mode 100644 index 0000000..9aa1069 --- /dev/null +++ b/inc/FUiCtrlInputTypes.h @@ -0,0 +1,45 @@ +// +// 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 FUiCtrlInputTypes.h + * @brief This is the header file for the input property. + * + * This header file contains the declarations of the input enumeration. + */ +#ifndef _FUI_CTRL_INPUT_ENUM_H_ +#define _FUI_CTRL_INPUT_ENUM_H_ + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @enum InputStyle + * + * Defines the input styles. + * + * @since 2.0 + */ +enum InputStyle +{ + INPUT_STYLE_FULLSCREEN = 0, /**< The full screen input mode */ + INPUT_STYLE_OVERLAY /**< The overlay input mode */ +}; + +}; +}; +}; // Tizen::Ui::Controls +#endif // _FUI_CTRL_INPUT_ENUM_H_ diff --git a/inc/FUiCtrlKeypad.h b/inc/FUiCtrlKeypad.h new file mode 100644 index 0000000..9979278 --- /dev/null +++ b/inc/FUiCtrlKeypad.h @@ -0,0 +1,384 @@ +// +// 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 FUiCtrlKeypad.h +* @brief This is the header file for the %Keypad class. +* +* This header file contains the declarations of the %Keypad class. +*/ + +#ifndef _FUI_CTRL_KEYPAD_H_ +#define _FUI_CTRL_KEYPAD_H_ + +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** +* @if OSPDEPREC +* @enum KeypadInputModeCategory +* +* Defines the keypad input mode. +* +* @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 by KeypadStyle enumeration instead. +* @since 2.0 +* @endif +*/ +enum KeypadInputModeCategory +{ + KEYPAD_MODE_ALPHA = 0x0001, /**< @if OSPDEPREC The alphabetic input mode @endif */ + KEYPAD_MODE_PREDICTIVE = 0x0002, /**< @if OSPDEPREC The predictive input mode @endif */ + KEYPAD_MODE_NUMERIC = 0x0004, /**< @if OSPDEPREC The numeric input mode @endif */ + KEYPAD_MODE_SYMBOL = 0x0008 /**< @if OSPDEPREC The symbolic input mode @endif */ +}; + +/** +* @class Keypad +* @brief This class displays a keypad on top of the screen. +* +* @since 2.0 +* +* The %Keypad class displays the full screen keypad without using an EditField or EditArea. +* +* For more information on the class features, see Keypad. +* +* The following example demonstrates how to use the %Keypad class. +* +* @code +// Sample code for KeypadSample.h +#include + +class KeypadSample + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::IActionEventListener + , public Tizen::Ui::ITextEventListener +{ +public: + KeypadSample(void) + : __pKeypad(null){} + + bool Initialize(void); + void ShowKeypad(bool show); + virtual result OnInitializing(void); + virtual result OnTerminating(void); + + // IActionEventListener + virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId); + + // ITextEventListener + virtual void OnTextValueChanged(const Tizen::Ui::Control& source); + virtual void OnTextValueChangeCanceled(const Tizen::Ui::Control& source); + + +private: + static const int ID_BUTTON = 101; + + Tizen::Ui::Controls::Keypad *__pKeypad; +}; + +// Sample code for KeypadSample.cpp +#include "KeypadSample.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Ui::Controls; + +bool +KeypadSample::Initialize(void) +{ + Construct(FORM_STYLE_NORMAL); + return true; +} + +result +KeypadSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + // Creates an instance of Button and adds it to the form + Button* pButton = new Button(); + pButton->Construct(Rectangle(50, 50, 150, 150), L"Show Keypad"); + pButton->SetActionId(ID_BUTTON); + pButton->AddActionEventListener(*this); + AddControl(pButton); + + // Creates an instance of Keypad + __pKeypad = new Keypad(); + __pKeypad->Construct(KEYPAD_STYLE_NORMAL, KEYPAD_MODE_ALPHA); + + // Adds an instance of ITextEventListener + __pKeypad->AddTextEventListener(*this); + + return r; +} + +void +KeypadSample::ShowKeypad(bool show) +{ + // Changes to desired show state + __pKeypad->SetShowState(show); + + //Calls Show() of the control + if (show) + { + __pKeypad->Show(); + } + // Calls Invalidate() of the container + else + { + Invalidate(true); + } +} + +result +KeypadSample::OnTerminating(void) +{ + result r = E_SUCCESS; + + // Deallocates the keypad + __pKeypad->Destroy(); + + return r; +} + +// IActionEventListener implementation +void +KeypadSample::OnActionPerformed(const Tizen::Ui::Control& source, int actionId) +{ + switch (actionId) + { + case ID_BUTTON: + { + ShowKeypad(true); + } + break; + + default: + break; + } +} + +// ITextEventListener implementation +void +KeypadSample::OnTextValueChanged(const Tizen::Ui::Control& source) +{ + // .... +} + +void +KeypadSample::OnTextValueChangeCanceled(const Tizen::Ui::Control& source) +{ + // .... +} +* @endcode +*/ + +class _OSP_EXPORT_ Keypad + : public Tizen::Ui::Window +{ +//Lifecycle +public: + /** + * This is the default constructor for this class. + * + * @since 2.0 + */ + Keypad(void); + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~Keypad(void); + + /** + * Initializes this instance of %Keypad with the specified parameters. + * + * @since 2.0 + * + * @return An error code + * @param[in] keypadStyle The style of %Keypad + * @param[in] limitLength The limit of the length of the text in EditField + * @exception E_SUCCESS The method is successful. + * @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. + */ + result Construct(KeypadStyle keypadStyle, int limitLength); + + /** + * @if OSPDEPREC + * Initializes this instance of %Keypad with input styles. + * + * @brief [Deprecated] + * @deprecated We no longer provide a method to specify the list of styles which the user can set the keypad to. @n + * It is recommended to use the other Construct() method and the KeypadStyle enumeration instead. + * @since 2.0 + * + * @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 the text in EditField + * @exception E_SUCCESS The method is successful. + * @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. + * @endif + */ + result Construct(KeypadStyle keypadStyle, KeypadInputModeCategory category, int limitLength = 100); + + /** + * Checks whether the text prediction is enabled. + * + * @since 2.0 + * @return @c true if the text prediction is enabled, @n + * else @c false + * @see SetTextPredictionEnabled() + */ + bool IsTextPredictionEnabled(void) const; + + /** + * 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() + */ + result SetTextPredictionEnabled(bool enable); + + /** + * Enables single-line editing. + * + * @since 2.0 + * + * @return An error code + * @param[in] enabled Set to @c true to enable single-line editing, @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 + * The %Keypad control is currently visible. + * @exception E_UNSUPPORTED_OPERATION The current state of the instance does not support the execution of the specified operation. @n + * The password style does not support multi-line editing. + * @exception E_SYSTEM A system error has occurred. + * @remarks By default, the single-line editing is disabled and the %Keypad control supports multi-lines (except the password style that only supports single-line editing). + */ + result SetSingleLineEnabled(bool enabled); + + /** + * Checks whether single-line editing is enabled. + * + * @since 2.0 + * + * @return @c true if single-line editing is enabled, @n + * else @c false + */ + bool IsSingleLineEnabled(void) const; + + /** + * Adds an ITextEventListener instance. @n + * The added listener can listen to text changed events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The listener to add + */ + void AddTextEventListener(Tizen::Ui::ITextEventListener& listener); + + /** + * Removes an ITextEventListener instance. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The listener to remove + */ + void RemoveTextEventListener(Tizen::Ui::ITextEventListener& listener); + + /** + * Gets the text of the %Keypad control. + * + * @since 2.0 + * + * @return The string value + */ + Tizen::Base::String GetText(void) const; + + /** + * Sets the text of the %Keypad control. + * + * @since 2.0 + * + * @param[in] text The text to set + */ + void SetText(Tizen::Base::String text); + + /** + * Sets the text filter. + * + * @since 2.1 + * + * @param[in] pFilter The filter + * @remarks The %Keypad control checks with the registered filter to decide whether the user-entered text should be replaced. + */ + void SetEditTextFilter(IEditTextFilter* pFilter); + + /** + * 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. + */ + void SendOpaqueCommand (const Tizen::Base::String& command); + +protected: + friend class _KeypadImpl; + +private: + Keypad(const Keypad&); + Keypad& operator =(const Keypad&); + +}; // Keypad + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_KEYPAD_H_ diff --git a/inc/FUiCtrlLabel.h b/inc/FUiCtrlLabel.h new file mode 100644 index 0000000..4fa53d1 --- /dev/null +++ b/inc/FUiCtrlLabel.h @@ -0,0 +1,434 @@ +// +// 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 FUiCtrlLabel.h + * @brief This is the header file for the %Label class. + * + * This header file contains the declarations of the %Label class and its helper classes. + */ + +#ifndef _FUI_CTRL_LABEL_H_ +#define _FUI_CTRL_LABEL_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ +/** + * @class Label + * @brief This class defines the common behavior of a %Label control. + * + * @since 2.0 + * + * The %Label class displays a non-editable text field and does not accept any input from the user. + * + * For more information on the class features, see Label. + * + * The following example demonstrates how to use the %Label class. + * + * @code +// Sample code for LabelSample.h +#include + +class LabelSample + : public Tizen::Ui::Controls::Form +{ +public: + LabelSample(void) + : __pLabel(null){} + + bool Initialize(void); + virtual result OnInitializing(void); + +private: + Tizen::Ui::Controls::Label *__pLabel; +}; +* @endcode +* +* @code +// Sample code for LabelSample.cpp +#include + +#include "LabelSample.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Ui::Controls; + +bool +LabelSample::Initialize(void) +{ + Construct(FORM_STYLE_NORMAL); + return true; +} + +result +LabelSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + // Creates an instance of Label + __pLabel = new Label(); + __pLabel->Construct(Rectangle(100, 100, 200, 50), L"Label Text"); + __pLabel->SetTextConfig(30, LABEL_TEXT_STYLE_BOLD); + __pLabel->SetBackgroundColor(Color::GetColor(COLOR_ID_BLUE)); + + // Adds the label to the form + AddControl(__pLabel); + + return r; +} + * @endcode + * + */ +class _OSP_EXPORT_ Label + : public Tizen::Ui::Control +{ +public: + /** + * This is the default constructor for this class. + * + * @since 2.0 + */ + Label(void); + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~Label(void); + + /** + * Initializes this instance of %Label with the specified parameters. + * + * @since 2.0 + * + * @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 + * the width and height of the window.@n + * The optimal size of the control is defined in + * Optimal Size of UI Controls. + * @param[in] text The text for this label 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. + * @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 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); + + /** + * Initializes this instance of %Label with the specified parameters. + * + * @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 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. + * @param[in] text The text for this label 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. + * @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 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); + +public: + /** + * Sets the specified text for the %Label control. + * + * @since 2.0 + * + * @param[in] text The string to set + * @remarks To display text in multi-lines or to denote the end of the line use '\\n'. + */ + void SetText(const Tizen::Base::String& text); + + /** + * Gets the text of the %Label control. + * + * @since 2.0 + * + * @return The text of the %Label control, @n + * else an empty string if an error occurs + */ + Tizen::Base::String GetText(void) const; + + /** + * Sets the background bitmap of the %Label control. + * + * @since 2.0 + * + * @param[in] bitmap The background bitmap + */ + void SetBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap); + + /** + * Sets the horizontal alignment of the text of the %Label control. + * + * @since 2.0 + * + * @param[in] alignment The horizontal text alignment + */ + void SetTextHorizontalAlignment(HorizontalAlignment alignment); + + /** + * Gets the horizontal alignment of the text of the %Label control. + * + * @since 2.0 + * + * @return The horizontal text alignment, @n + * else @c ALIGNMENT_LEFT if the instance is invalid + */ + HorizontalAlignment GetTextHorizontalAlignment(void) const; + + /** + * Sets the vertical alignment of the text of the %Label control. + * + * @since 2.0 + * + * @param[in] alignment The vertical text alignment + */ + void SetTextVerticalAlignment(VerticalAlignment alignment); + + /** + * Gets the vertical alignment of the text of the %Label control. + * + * @since 2.0 + * + * @return The vertical text alignment, @n + * else @c ALIGNMENT_TOP if the instance is invalid + */ + VerticalAlignment GetTextVerticalAlignment(void) const; + + /** + * Sets the background color of the %Label control. + * + * @since 2.0 + * + * @param[in] color The normal background color + */ + void SetBackgroundColor(const Tizen::Graphics::Color& color); + + /** + * Gets the background color of the %Label control. + * + * @since 2.0 + * + * @return The background color + */ + Tizen::Graphics::Color GetBackgroundColor(void) const; + + /** + * Sets the text color of the %Label control. + * + * @since 2.0 + * + * @param[in] color The color to set + */ + virtual void SetTextColor(const Tizen::Graphics::Color& color); + + /** + * Gets the text color of the %Label control. + * + * @since 2.0 + * + * @return The text color + */ + virtual Tizen::Graphics::Color GetTextColor(void) const; + + /** + * Sets the text attributes of the %Label control. + * + * @since 2.0 + * + * @param[in] size The size of the text + * @param[in] style The style of the text + * @exception E_SUCCESS The method is successful. + * @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 @c 6 on devices of high screen density. + */ + void SetTextConfig(int size, LabelTextStyle style); + + /** + * Sets the text attributes of the %Label control. + * + * @since 2.1 + * + * @param[in] size The size of the text + * @param[in] style The style of the text + * @exception E_SUCCESS The method is successful. + * @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 @c 6 on devices of high screen density. + */ + void SetTextConfig(float size, LabelTextStyle style); + + /** + * Gets the text size of the %Label control. + * + * @since 2.0 + * + * @return The size of the text, @n + * else @c -1 if an error occurs + */ + int GetTextSize(void) const; + + /** + * Gets the text size of the %Label control. + * + * @since 2.1 + * + * @return The size of the text, @n + * else @c -1.0f if an error occurs + */ + float GetTextSizeF(void) const; + + /** + * Gets the text style of the %Label control. + * + * @since 2.0 + * + * @return The style of the text, @n + * else @c LABEL_TEXT_STYLE_NORMAL if the instance is invalid + */ + LabelTextStyle GetTextStyle(void) const; + + /** + * Sets the top and left margins. + * + * @since 2.0 + * + * @return An error code + * @param[in] topMargin The top margin + * @param[in] leftMargin The left margin + * @exception E_SUCCESS The method is successful. + * @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() + */ + result SetMargin(int topMargin, int leftMargin); + + /** + * Sets the top and left margins. + * + * @since 2.1 + * + * @return An error code + * @param[in] topMargin The top margin + * @param[in] leftMargin The left margin + * @exception E_SUCCESS The method is successful. + * @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() + */ + result SetMargin(float topMargin, float leftMargin); + + /** + * Gets the top margin. + * + * @since 2.0 + * + * @return The size of the top margin, @n + * else @c -1 if an error occurs + * @see SetMargin() + */ + int GetTopMargin(void) const; + + /** + * Gets the top margin. + * + * @since 2.1 + * + * @return The size of the top margin, @n + * else @c -1.0f if an error occurs + * @see SetMargin() + */ + float GetTopMarginF(void) const; + + /** + * Gets the left margin. + * + * @since 2.0 + * + * @return The size of the left margin, @n + * else @c -1 if an error occurs + * @see SetMargin() + */ + int GetLeftMargin(void) const; + + /** + * Gets the left margin. + * + * @since 2.1 + * + * @return The size of the left margin, @n + * else @c -1.0f if an error occurs + * @see SetMargin() + */ + float GetLeftMarginF(void) const; + +protected: + friend class _LabelImpl; + +private: + // + // This is the copy constructor for this class. + // + Label(const Label& rhs); + + // + // Assigns the value of the specified instance to the current instance of %Label. + // + Label& operator =(const Label& rhs); + +}; // Label + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_LABEL_H_ diff --git a/inc/FUiCtrlLabelTypes.h b/inc/FUiCtrlLabelTypes.h new file mode 100644 index 0000000..e7b451a --- /dev/null +++ b/inc/FUiCtrlLabelTypes.h @@ -0,0 +1,58 @@ +// +// 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 FUiCtrlLabelTypes.h +* @brief This is the header file for the %LabelTextStyle enumeration. +* +* This header file contains the declarations of the LabelTextStyle enumeration. +*/ +#ifndef _FUI_CTRL_LABEL_ENUM_H_ +#define _FUI_CTRL_LABEL_ENUM_H_ + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @enum LabelTextStyle + * + * Defines the text styles of the label. + * + * @since 2.0 + */ +enum LabelTextStyle +{ + LABEL_TEXT_STYLE_NORMAL, /**< The plain text style */ + LABEL_TEXT_STYLE_BOLD, /**< The bold text style */ + LABEL_TEXT_STYLE_ITALIC, /**< The italic text style */ +}; + +/** + * @enum LabelContentHint + * + * Defines the content update type. + * + * @since 2.0 + */ +enum LabelContentHint +{ + LABEL_CONTENT_HINT_DYNAMIC, /**< The contents will change */ + LABEL_CONTENT_HINT_STATIC /**< The contents will not change */ +}; + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_LABEL_ENUM_H_ diff --git a/inc/FUiCtrlList.h b/inc/FUiCtrlList.h new file mode 100644 index 0000000..b21148d --- /dev/null +++ b/inc/FUiCtrlList.h @@ -0,0 +1,971 @@ +// +// 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. +// +/** + * @if OSPDEPREC + * @file FUiCtrlList.h + * @brief This is the header file for the %List class. + * + * This header file contains the declarations of the %List class and its helper classes. + * @endif + */ + +#ifndef _FUI_CTRL_LIST_H_ +#define _FUI_CTRL_LIST_H_ + +#include +#include +#include +#include +#include +#include +#include +#include + + +namespace Tizen { namespace Base { namespace Runtime +{ +class IEvent; +}}} // Tizen::Base::Runtime + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @if OSPDEPREC + * @class List + * @brief [Deprecated] This class defines the common behavior of the %List control. + * + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * The %List class defines the common behavior of the %List control. + * A list displays the user selection in the form of a list of items. When an item + * on the list is selected or deselected, an item event occurs. It is passed on to + * any item event listeners that have registered an interest in item events generated + * by this list. + * + * 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. + * + * There are several styles supported with differences in the number of columns, rows and + * types of data that can be set. The Construct has a parameter for the size of + * all 4 aspects of a list item. If the item has less than 2 rows or 2 columns, you + * only need to specify the width and height information relevant to the style selected. + * Also, the check style causes some space to be taken up on the right side of the list + * item. The framework will try to make room for the check from the right-most column, + * so the actual width of each column may be different from what you have set. + * + * @image html ui_controls_list_construct.png + * + * 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 + * + * + * This is a simple UI application which uses a list control. + * + * +* @code +//Sample code for ListSample.h +#include + +class ListSample + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::IItemEventListener +{ +public: + ListSample(void) + : __pList(null){} + + bool Initialize(void); + virtual result OnInitializing(void); + virtual void OnItemStateChanged(const Tizen::Ui::Control &source, int index, int itemId, Tizen::Ui::ItemStatus status); + +private: + static const int ID_LIST_FIRSTITEM = 101; + static const int ID_LIST_SECONDITEM = 102; + + Tizen::Ui::Controls::List* __pList; +}; + * @endcode + * + * @code +//Sample code for ListSample.cpp +#include + +#include "ListSample.h" + +using namespace Tizen::Base; +using namespace Tizen::Ui; +using namespace Tizen::Graphics; +using namespace Tizen::Ui::Controls; + +bool +ListSample::Initialize(void) +{ + Construct(FORM_STYLE_NORMAL); + return true; +} + +result +ListSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + // Creates an instance of List + __pList = new List(); + __pList->Construct(Rectangle(0, 0, GetClientAreaBounds().width, 500), + LIST_STYLE_NORMAL, LIST_ITEM_SINGLE_TEXT, 100, 0, GetClientAreaBounds().width, 0); + __pList->AddItemEventListener(*this); + + // Sets Strings + String itemText1(L"List Item 1"); + String itemText2(L"List Item 2"); + + // Adds the items to the list + __pList->AddItem(&itemText1, null, null, null, ID_LIST_FIRSTITEM); + __pList->AddItem(&itemText2, null, null, null, ID_LIST_SECONDITEM); + + // Adds the list to the form + AddControl(__pList); + + return r; +} + +// IItemEventListener implementation +void +ListSample::OnItemStateChanged (const Tizen::Ui::Control &source, int index, int itemId, Tizen::Ui::ItemStatus status) +{ + switch (itemId) + { + case ID_LIST_FIRSTITEM: + { + // .... + } + break; + case ID_LIST_SECONDITEM: + { + // .... + } + break; + default: + break; + } +} + * @endcode + * @endif + */ +class _OSP_EXPORT_ List + : public Tizen::Ui::Control +{ +public: + /** + * @if OSPDEPREC + * The object is not fully constructed after this constructor is called. @n + * For full construction, the List::Construct() method must be called right after calling this constructor. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * @endif + */ + List(void); + + /** + * @if OSPDEPREC + * 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. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * @endif + */ + virtual ~List(void); + + /** + * @if OSPDEPREC + * Initializes this instance of %List with the specified parameters. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView 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 list along with + * the width and height of the list. + * @param[in] style The style set of the list + * @param[in] itemFormat The layout of the list items + * @param[in] row1Height The height of the first row + * @param[in] row2Height The height of the second row + * @param[in] column1Width The width of the first column + * @param[in] column2Width The width of the second column + * @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 + * - 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 size, %List is constructed with the minimum size. + * - When, %List is constructed with ::LIST_STYLE_NUMBER style, the maximum number of items supported is @c 99. + * - The size of the control must be within the range defined by the minimum size and the maximum size. + * - The minimum size of this control is 92 x 72 on a WVGA screen, 60 x 48 on a HVGA screen and 46 x 36 on a WQVGA screen. + * @endif + */ + result Construct(const Tizen::Graphics::Rectangle& rect, ListStyle style, ListItemFormat itemFormat, int row1Height, int row2Height, int column1Width, int column2Width); + + /** + * @if OSPDEPREC + * Adds the specified listener instance. @n + * The added listener can listen to the item events when they are fired. Only an item event with the ITEM_SELECTED state is fired. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @param[in] listener The event listener to add + * @endif + */ + void AddItemEventListener(Tizen::Ui::IItemEventListener& listener); + + /** + * @if OSPDEPREC + * Removes the specified listener instance. @n + * 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 ListView class. + * @since 2.0 + * + * @param[in] listener The event listener to remove + * @endif + */ + void RemoveItemEventListener(Tizen::Ui::IItemEventListener& listener); + + /** + * @if OSPDEPREC + * Adds the item to the current %List instance. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return An error code + * @param[in] pText1 A pointer to the first string + * @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 itemId for this item + * @exception E_SUCCESS The method is successful. + * @exception E_MAX_EXCEEDED The number of items has exceeded the maximum limit. + * @exception E_SYSTEM A system error has occurred. + * @remarks + * - The contents of the specified texts and bitmaps are copied and kept by the list. + * - If the size of the text exceeds the displayable area, the text will slide automatically when the list item is selected. + * @endif + */ + result AddItem(const Tizen::Base::String* pText1, const Tizen::Base::String* pText2, const Tizen::Graphics::Bitmap* pBitmap1, const Tizen::Graphics::Bitmap* pBitmap2, int itemId = LIST_ITEM_UNSPECIFIED_ID); + + /** + * @if OSPDEPREC + * Inserts the specified item to list, at the specified index. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return An error code + * @param[in] index The index at which the item is inserted + * @param[in] pText1 A pointer to the first string + * @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. + * @exception E_OUT_OF_RANGE The specified @c index is less than @c 0 or greater than the item count. + * @exception E_MAX_EXCEEDED The number of items has exceeded the maximum limit. + * @exception E_SYSTEM A system error has occurred. + * @remarks + * - The contents of the specified texts and bitmaps are copied and kept by the list. + * - If the size of the text exceeds the displayable area, the text will slide automatically when a list item is selected. + * @endif + */ + result InsertItemAt(int index, const Tizen::Base::String* pText1, const Tizen::Base::String* pText2, const Tizen::Graphics::Bitmap* pBitmap1, const Tizen::Graphics::Bitmap* pBitmap2, int itemId = LIST_ITEM_UNSPECIFIED_ID); + + /** + * @if OSPDEPREC + * Sets the contents of the specified item to list at the specified index. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return An error code + * @param[in] index The index at which the contents of the item is set + * @param[in] pText1 A pointer to the first string + * @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. + * @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. + * @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. + * @endif + */ + result SetItemAt(int index, const Tizen::Base::String* pText1, const Tizen::Base::String* pText2, const Tizen::Graphics::Bitmap* pBitmap1, const Tizen::Graphics::Bitmap* pBitmap2, int itemId = LIST_ITEM_UNSPECIFIED_ID); + + /** + * @if OSPDEPREC + * Removes the item at the specified index of the list. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return An error code + * @param[in] index The index at which the item is deleted + * @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. + * @endif + */ + result RemoveItemAt(int index); + + /** + * @if OSPDEPREC + * Removes all the items of the list. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result RemoveAllItems(void); + + /** + * @if OSPDEPREC + * Gets the item count of the list. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return The number of items in the list + * @endif + */ + int GetItemCount(void) const; + + /** + * @if OSPDEPREC + * Sets the enabled status of the specified item of the list. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return An error code + * @param[in] index The index of the list item for which status is set + * @param[in] enable Set to @c true to enable the item, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result SetItemEnabled(int index, bool enable); + + /** + * @if OSPDEPREC + * Checks whether the specified item is enabled. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return @c true if the item is enabled, @n + * else @c false + * @param[in] index The index of the list item + * @endif + */ + bool IsItemEnabled(int index) const; + + /** + * @if OSPDEPREC + * Sets the background bitmap image of the focused item. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @param[in] bitmap The background bitmap of the focused item + * @endif + */ + void SetFocusedItemBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap); + + /** + * @if OSPDEPREC + * 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 the ListView class. + * @since 2.0 + * + * @param[in] bitmap The background image + * @remarks When a user navigates a user interface with directional keys, the selected UI control is highlighted and takes the focus. + * @endif + */ + void SetHighlightedItemBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap); + + /** + * @if OSPDEPREC + * Sets the background image on the rectangle of each list item. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @param[in] bitmap The background image + * @endif + */ + void SetNormalItemBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap); + + /** + * @if OSPDEPREC + * Gets the index of the top-drawn item of the list. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return The index of the top-drawn item + * @endif + */ + int GetTopDrawnItemIndex(void) const; + + /** + * @if OSPDEPREC + * Gets the index of the bottom-drawn item of the list. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return The index of the bottom-drawn item + * @endif + */ + int GetBottomDrawnItemIndex(void) const; + + /** + * @if OSPDEPREC + * Sets the text to be displayed when the list is empty. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @param[in] text The text message to display + * @endif + */ + void SetTextOfEmptyList(const Tizen::Base::String& text); + + /** + * @if OSPDEPREC + * Sets the color of the text that is displayed when the list is empty. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @param[in] color The color of the text for an empty List + * @endif + */ + void SetTextColorOfEmptyList(const Tizen::Graphics::Color& color); + + /** + * @if OSPDEPREC + * Gets the color of the empty text that is displayed when the list is empty. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return The empty text color, @n + * else RGBA(0, 0, 0, 0) if the instance is invalid + * @endif + */ + Tizen::Graphics::Color GetTextColorOfEmptyList(void) const; + + /** + * @if OSPDEPREC + * Sets the background color of this control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @param[in] color The background color + * @endif + */ + void SetBackgroundColor(const Tizen::Graphics::Color& color); + + /** + * @if OSPDEPREC + * Sets the item text color. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @param[in] textIndex The index of the text + * @param[in] textColor The color of the text + * @endif + */ + void SetItemTextColor(ListItemText textIndex, const Tizen::Graphics::Color& textColor); + + /** + * @if OSPDEPREC + * Gets the text color of item. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @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 + * @endif + */ + Tizen::Graphics::Color GetItemTextColor(ListItemText textIndex) const; + + /** + * @if OSPDEPREC + * Enables the text slide. + * + * @brief [Deprecated] + * @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 + * @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 + */ + void EnableTextSlide(ListItemText textIndex); + + /** + * @if OSPDEPREC + * Disables the text sliding. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * @endif + */ + void DisableTextSlide(void); + + /** + * @if OSPDEPREC + * Gets the height of the list item. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return The height of the item + * @endif + */ + int GetItemHeight(void) const; + + /** + * @if OSPDEPREC + * Gets the row1 height of the current list + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return The row1 height of the item + * @endif + */ + int GetRow1Height(void) const; + + /** + * @if OSPDEPREC + * Gets the row2 height of the current list + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return The row2 height of the item + * @endif + */ + int GetRow2Height(void) const; + + /** + * @if OSPDEPREC + * Gets the column1 width of the current list + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return The column1 width of the item + * @endif + */ + int GetColumn1Width(void) const; + + /** + * @if OSPDEPREC + * Gets the column2 width of the current list + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return The column2 width of the item + * @endif + */ + int GetColumn2Width(void) const; + + /** + * @if OSPDEPREC + * Sets the row1 height of the current List + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return An error code + * @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 @c 48. + * @endif + */ + result SetRow1Height(int row1Height); + + /** + * @if OSPDEPREC + * Sets the row2 height of the current list. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return An error code + * @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 @c 48. + * @endif + */ + result SetRow2Height(int row2Height); + + /** + * @if OSPDEPREC + * Sets the column1 width of the current %List + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return An error code + * @param[in] column1Width The column1 width of the list item + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result SetColumn1Width(int column1Width); + + /** + * @if OSPDEPREC + * Sets the column2 width of the current %List + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return An error code + * @param[in] column2Width The column2 width of the list item + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result SetColumn2Width(int column2Width); + + /** + * @if OSPDEPREC + * Sets the check status of the specified item of the list. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return An error code + * @param[in] index The index of the list + * @param[in] check The check status + * @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. + * @endif + */ + result SetItemChecked(int index, bool check); + + /** + * @if OSPDEPREC + * Checks whether the specified item of the list is checked. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return @c true if the item is checked, @n + * else @c false + * @param[in] index The index of the list item + * + * @remarks This method can only be used when the style of the list allows selection. + * @endif + */ + bool IsItemChecked(int index) const; + + /** + * @if OSPDEPREC + * Sets the checked status of all the items of the list. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return An error code + * @param[in] check Set to @c true to check all the items, @n + * 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. + * @endif + */ + result SetAllItemsChecked(bool check); + + /** + * @if OSPDEPREC + * Removes all the checked items of the list. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return An error code + * @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. + * @endif + */ + result RemoveAllCheckedItems(void); + + /** + * @if OSPDEPREC + * Gets the index of the first checked item from the list. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return The index of the first checked item + * @remarks This method can only be used when the style of the list allows multiple selections. + * @endif + */ + int GetFirstCheckedItemIndex(void) const; + + /** + * @if OSPDEPREC + * Gets the index of the last checked item from the list. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return The index of the last checked item + * @remarks This method can only be used when the style of the list allows multiple selections. + * @endif + */ + int GetLastCheckedItemIndex(void) const; + + /** + * @if OSPDEPREC + * Gets the index of the next checked item after the specified index from the list. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return The index of the next checked item + * @param[in] index The index of the item + * @remarks This method can only be used when the style of the list allows multiple selections. + * @endif + */ + int GetNextCheckedItemIndexAfter(int index) const; + + /** + * @if OSPDEPREC + * Gets the index of the item with the specified item ID. + * + * @brief [Deprecated] + * @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 of the list + * @remarks The method returns -1 when there is no list item with the specified item ID. + * @endif + */ + int GetItemIndexFromItemId(int itemId) const; + + /** + * @if OSPDEPREC + * 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 ListView class. + * @since 2.0 + * + * @return The index of the item, @n + * else @c -1 if there is no list item at the specified position + * @param[in] x The x position of the point + * @param[in] y The y position of the point + * @endif + */ + int GetItemIndexFromPosition(int x, int y) const; + + /** + * @if OSPDEPREC + * 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 ListView class. + * @since 2.0 + * + * @return The index of the item, @n + * else @c -1 if there is no list item at the specified position + * @param[in] position The position of the point + * @endif + */ + int GetItemIndexFromPosition(const Tizen::Graphics::Point& position) const; + + /** + * @if OSPDEPREC + * Gets the item ID of the item at the specified index. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return The ID of the item, @n + * else @c -1 if there is no list item at the specified index + * @param[in] index The index of the list item + * @endif + */ + int GetItemIdAt(int index) const; + + /** + * @if OSPDEPREC + * Scrolls to the bottom of the List. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * @endif + */ + void ScrollToBottom(void); + + /** + * @if OSPDEPREC + * Scrolls to the top of the List. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * @endif + */ + void ScrollToTop(void); + + /** + * @if OSPDEPREC + * Scrolls to the item at the specified index. @n + * The specified item is drawn at the top of the list. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return An error code + * @param[in] index The index of the list item + * @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. + * @endif + */ + result ScrollToTop(int index); + + /** + * @if OSPDEPREC + * Draws and shows the item of the list. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return An error code + * @param[in] index The index of the list item + * @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. + * @endif + */ + result RefreshItem(int index); + + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + List(const List& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + List& operator =(const List& rhs); + + friend class _ListImpl; +}; //List + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_LIST_H_ diff --git a/inc/FUiCtrlListContextItem.h b/inc/FUiCtrlListContextItem.h new file mode 100644 index 0000000..b1ecab4 --- /dev/null +++ b/inc/FUiCtrlListContextItem.h @@ -0,0 +1,255 @@ +// +// 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 FUiCtrlListContextItem.h + * @brief This is the header file for the %ListContextItem class. + * + * This header file contains the declarations of the %ListContextItem class and its helper classes. + */ + +#ifndef _FUI_CTRL_LIST_CONTEXT_ITEM_H_ +#define _FUI_CTRL_LIST_CONTEXT_ITEM_H_ + +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _ListContextItemImpl; + +/** + * @class ListContextItem + * @brief This class defines the common behavior for %ListContextItem. + * + * @since 2.0 + * + * The %ListContextItem class displays the context item for a ListView or GroupedListView. + * + * For more information on the class features, see ListViews. + */ + +class _OSP_EXPORT_ ListContextItem + : public Tizen::Base::Object +{ +public: + /** + * The object is not fully constructed after this constructor is + * called. @n For full construction, the ListContextItem::Construct() method must be + * called right after calling this constructor. + * + * @since 2.0 + */ + ListContextItem(void); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~ListContextItem(void); + + /** + * Initializes this instance of %ListContextItem with the specified parameter. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result Construct(void); + + /** + * Adds the text element to the context item. + * + * @since 2.0 + * + * @return An error code + * @param[in] elementId The ID of the element + * @param[in] text The text to display + * @param[in] enable Set to @c true, to enable this element @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. + */ + result AddElement(int elementId, const Tizen::Base::String& text, bool enable = true); + + /** + * Adds the bitmap element to the context item. + * + * @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 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 + * 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. + */ + result AddElement(int elementId, const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap& pressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap = null, bool enable = true); + + /** + * Adds the text and the bitmap element to the context item. + * + * @since 2.0 + * + * @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 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 + * 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. + */ + result AddElement(int elementId, const Tizen::Base::String& text, const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap& pressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap = null, bool enable = true); + + /** + * Sets the background image of a context item. + * + * @since 2.0 + * + * @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 the background color are specified, only + * 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); + + /** + * Sets the background color of a context item. + * + * @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. + * @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 SetBackgroundColor(const Tizen::Graphics::Color& color); + + /** + * Gets the background color of a context item. + * + * @since 2.0 + * + * @return The background color of a context item + */ + Tizen::Graphics::Color GetBackgroundColor(void) const; + + /** + * Sets the background color of the context item element. + * + * @since 2.1 + * + * @return An error code + * @param[in] elementId The ID of the element + * @param[in] status The status of the context item element + * @param[in] backgroundColor The background color of the context item element + * @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 specified @c backgroundColor is not set, the default color set by configuration is used. + * @see GetElementBackgroundColor() + */ + result SetElementBackgroundColor(int elementId, ListContextItemElementStatus status, const Tizen::Graphics::Color& backgroundColor); + + /** + * Gets the background color of the context item element. + * + * @since 2.1 + * + * @return The background color of the element + * @param[in] elementId The ID of the element + * @param[in] status The status of the context item element + * @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 The specific error code can be accessed using the GetLastResult() method. + * @see SetElementBackgroundColor() + */ + Tizen::Graphics::Color GetElementBackgroundColor(int elementId, ListContextItemElementStatus status) const; + + /** + * Sets the text color of the context item element. + * + * @since 2.1 + * + * @return An error code + * @param[in] elementId The ID of the element + * @param[in] status The status of the context item element + * @param[in] textColor The text color of the context item element + * @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 the theme. + * @see GetElementTextColor() + */ + result SetElementTextColor(int elementId, ListContextItemElementStatus status, const Tizen::Graphics::Color& textColor); + + /** + * Gets the text color of the context item element. + * + * @since 2.1 + * + * @return The text color of the element + * @param[in] elementId The ID of the element + * @param[in] status The status of the context item element + * @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 The specific error code can be accessed using the GetLastResult() method. + * @see SetElementTextColor() + */ + Tizen::Graphics::Color GetElementTextColor(int elementId, ListContextItemElementStatus status) const; + +protected: + friend class _ListContextItemImpl; + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + ListContextItem(const ListContextItem& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + ListContextItem& operator =(const ListContextItem& rhs); + +private: + _ListContextItemImpl* __pImpl; +}; // ListContextItem + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_LIST_CONTEXT_ITEM_H_ diff --git a/inc/FUiCtrlListItemBase.h b/inc/FUiCtrlListItemBase.h new file mode 100644 index 0000000..71e9c22 --- /dev/null +++ b/inc/FUiCtrlListItemBase.h @@ -0,0 +1,230 @@ +// +// 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 FUiCtrlListItemBase.h + * @brief This is the header file for the %ListItemBase class. + * + * This header file contains the declarations of the %ListItemBase class and its helper classes. + */ + +#ifndef _FUI_CTRL_LIST_ITEM_BASE_H_ +#define _FUI_CTRL_LIST_ITEM_BASE_H_ + +#include +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _ListItemBaseImpl; + +/** + * @class 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 the ListView or + * GroupedListView classes. + * + * For more information on the class features, see ListViews. + */ + +class _OSP_EXPORT_ ListItemBase + : public Tizen::Base::Object +{ +public: + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~ListItemBase(void); + + /** + * Sets the background image of the item which is displayed when the item is in specified state. + * + * @since 2.0 + * + * @return An error code + * @param[in] status The item drawing state + * @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 the background color are specified, + * only the bitmap is displayed. + */ + result SetBackgroundBitmap(ListItemDrawingStatus status, const Tizen::Graphics::Bitmap* pBitmap); + + /** + * Sets the background color of the item which is displayed when the item is in the specified state. + * + * @since 2.0 + * + * @return An error code + * @param[in] status The item drawing state + * @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. @n + * The background color of the item is not applied when the item is inserted into the GroupedListView of section style. + */ + result SetBackgroundColor(ListItemDrawingStatus status, const Tizen::Graphics::Color& color); + + /** + * Gets the background color of the item that is displayed when the item is in the specified state. + * + * @since 2.0 + * + * @return The background color of the item + * @param[in] status The item drawing state, @n + * else RGBA(0, 0, 0, 0) if an error has occurs + * @see SetBackgroundColor() + */ + Tizen::Graphics::Color GetBackgroundColor(ListItemDrawingStatus status) const; + + /** + * Sets ContextItem that is displayed when an item is swept. + * + * @since 2.0 + * + * @return An error code + * @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. + * @remarks + * - If the context item is not set, ListView() or GroupedListView() does not display the context item and an item sweep event is generated when an + * item is swept. + * - The specified @c pItem should be deleted by the applications when it is no longer used. + */ + result SetContextItem(const ListContextItem* pItem); + + /** + * Sets the description text. + * + * @since 2.0 + * + * @return An error code + * @param[in] text The description text + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetDescriptionText(const Tizen::Base::String& text); + + /** + * Sets the color of the description text. + * + * @since 2.0 + * + * @return An error code + * @param[in] color The color of the description text + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetDescriptionTextColor(const Tizen::Graphics::Color& color); + + /** + * Gets the width of the annex area. + * + * @since 2.0 + * + * @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. + */ + static int GetAnnexWidth(ListAnnexStyle style); + + /** + * 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. + */ + static float GetAnnexWidthF(ListAnnexStyle style); + +protected: + friend class _ListItemBaseImpl; + +protected: + // + // This default constructor is intentionally declared as private so that only the platform can create an instance. + // @since 2.0 + // + ListItemBase(void); + + // + // Initializes this instance of ListItem with the specified parameter. + // + // @since 2.0 + // + // @return An error code + // + // @param[in] itemSize The size of the item + // @param[in] style The style of 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); + + // + // Initializes this instance of ListItem with the specified parameter. + // + // @since 2.1 + // + // @return An error code + // + // @param[in] itemSize The size of the item + // @param[in] style The style of 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); + + // + // The following methods are reserved and may change its name at any time without prior notice. + // + virtual void ListItemBase_Reserved1(void) {} + virtual void ListItemBase_Reserved2(void) {} + virtual void ListItemBase_Reserved3(void) {} + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + ListItemBase(const ListItemBase& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + ListItemBase& operator =(const ListItemBase& rhs); + +protected: + _ListItemBaseImpl* _pImpl; +}; // ListItemBase + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_LIST_ITEM_BASE_H_ diff --git a/inc/FUiCtrlListTypes.h b/inc/FUiCtrlListTypes.h new file mode 100644 index 0000000..e1a634f --- /dev/null +++ b/inc/FUiCtrlListTypes.h @@ -0,0 +1,121 @@ +// +// 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 FUiCtrlListTypes.h + * @brief This is the header file for the %List enumerations. + * + * This header file contains the declarations of the List enumerations. + */ +#ifndef _FUI_CTRL_LIST_TYPES_H_ +#define _FUI_CTRL_LIST_TYPES_H_ + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * The integer value that represents the unspecified item ID + * + * @since 2.0 + */ +static const int LIST_ITEM_UNSPECIFIED_ID = -1; + +/** + * @if OSPDEPREC + * @enum ListStyle + * + * Defines the list style. + * + * @brief [Deprecated] + * @deprecated This enum is deprecated. Instead of using this enum, use ListAnnexStyle enumeration for CustomItem or SimpleItem class. @n + * @since 2.0 + * @endif + */ +enum ListStyle +{ + LIST_STYLE_NORMAL = 0, /**< @if OSPDEPREC The normal style @endif */ + LIST_STYLE_NUMBER, /**< @if OSPDEPREC The numbered style @endif */ + LIST_STYLE_RADIO, /**< @if OSPDEPREC The radio style for single selection @endif */ + LIST_STYLE_RADIO_WITH_DIVIDER, /**< @if OSPDEPREC The radio style with divider for single selection @endif */ + LIST_STYLE_MARK, /**< @if OSPDEPREC The mark style for multiple selection @endif */ + LIST_STYLE_MARK_WITH_DIVIDER, /**< @if OSPDEPREC The mark style with divider for multiple selection @endif */ + LIST_STYLE_ONOFF, /**< @if OSPDEPREC The On/Off style @endif */ + LIST_STYLE_ONOFF_WITH_DIVIDER /**< @if OSPDEPREC The On/Off style with divider @endif */ +}; + +/** + * @if OSPDEPREC + * @enum ListItemFormat + * + * Defines the list item format. + * + * @brief [Deprecated] + * @deprecated This enum is deprecated. There is no need to use this enum. + * @since 2.0 + * @endif + */ +enum ListItemFormat +{ + LIST_ITEM_SINGLE_IMAGE = 0, /**< @if OSPDEPREC The single line of image @endif */ + LIST_ITEM_SINGLE_TEXT, /**< @if OSPDEPREC The single line of text @endif */ + LIST_ITEM_SINGLE_IMAGE_TEXT, /**< @if OSPDEPREC The single line of image, and text @endif */ + LIST_ITEM_SINGLE_TEXT_IMAGE, /**< @if OSPDEPREC The single line of text, and image @endif */ + LIST_ITEM_SINGLE_IMAGE_TEXT_IMAGE, /**< @if OSPDEPREC The single line of image, text, and image @endif */ + LIST_ITEM_DOUBLE_IMAGE_TEXT_FULLTEXT, /**< @if OSPDEPREC The 1st line of image and text, 2nd line of text @endif */ + LIST_ITEM_DOUBLE_FULLTEXT_IMAGE_TEXT, /**< @if OSPDEPREC The 1st line of text, 2nd line of image, and text @endif */ + LIST_ITEM_DOUBLE_TEXT_IMAGE_FULLTEXT, /**< @if OSPDEPREC The 1st line of text and image, 2nd line of text @endif */ + LIST_ITEM_DOUBLE_FULLTEXT_TEXT_IMAGE, /**< @if OSPDEPREC The 1st line of text, 2nd line of text, and image @endif */ + LIST_ITEM_DOUBLE_IMAGE_TEXT_TEXT, /**< @if OSPDEPREC A big image followed by two lines of text @endif */ + LIST_ITEM_DOUBLE_TEXT_TEXT_IMAGE /**< @if OSPDEPREC The two lines of text followed by a big image @endif */ +}; + +/** + * @if OSPDEPREC + * @enum ListItemText + * + * Defines the option of text slide. + * + * @brief [Deprecated] + * @deprecated This enum is deprecated. There is no need to use this enum. + * @since 2.0 + * @endif + */ +enum ListItemText +{ + LIST_ITEM_TEXT1, /**< @if OSPDEPREC The sliding of 1st text is switched on @endif */ + LIST_ITEM_TEXT2 /**< @if OSPDEPREC The sliding of 2nd text is switched on @endif */ +}; + +/** + * @if OSPDEPREC + * @enum FastScrollIndexDigit + * + * Defines the number of digits or characters of the fast scroll index. + * + * @brief [Deprecated] + * @deprecated This enum is deprecated. There is no need to use this enum. + * @since 2.0 + * @endif + */ +enum FastScrollIndexDigit +{ + SCROLL_INDEX_DIGIT_NUM_1, /**< @if OSPDEPREC The number of digits or characters of the index is 1 @endif */ + SCROLL_INDEX_DIGIT_NUM_2 /**< @if OSPDEPREC The number of digits or characters of the index is 2 @endif */ +}; + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_LIST_TYPES_H_ diff --git a/inc/FUiCtrlListView.h b/inc/FUiCtrlListView.h new file mode 100644 index 0000000..a691466 --- /dev/null +++ b/inc/FUiCtrlListView.h @@ -0,0 +1,1132 @@ +// +// 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 FUiCtrlListView.h + * @brief This is the header file for the %ListView class. + * + * This header file contains the declarations of the %ListView class and its helper classes. + */ + +#ifndef _FUI_CTRL_LIST_VIEW_H_ +#define _FUI_CTRL_LIST_VIEW_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _ListViewImpl; + +/** + * @class ListView + * @brief This class defines common behavior for a %ListView control. + * + * @since 2.0 + * + * The %ListView class displays a list of simple and user-configured items. A simple item has a fixed layout consisting of a bitmap + * and a text string. A user-configured item in a %ListView instance can have a different layout and height than the other items. + * Each user-configured item is composed of elements that can be texts and bitmaps, and is configured using the CustomItem class. + * + * For more information on the class features, see ListViews. + * + * The following example demonstrates how to use the %ListView class. + * + * + * @code +//Sample code for ListViewSample.h +#include + +class ListViewSample + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::Controls::IListViewItemEventListener + , public Tizen::Ui::Controls::IListViewItemProvider +{ +public: + ListViewSample(void) + : __pListView(null) + , __pItemContext(null){} + + bool Initialize(void); + virtual result OnInitializing(void); + virtual result OnTerminating(void); + + // IListViewItemEventListener + virtual void OnListViewContextItemStateChanged(Tizen::Ui::Controls::ListView &listView, int index, int elementId, Tizen::Ui::Controls::ListContextItemStatus state); + virtual void OnListViewItemStateChanged(Tizen::Ui::Controls::ListView &listView, int index, int elementId, Tizen::Ui::Controls::ListItemStatus status); + virtual void OnListViewItemSwept(Tizen::Ui::Controls::ListView &listView, int index, Tizen::Ui::Controls::SweepDirection direction); + + // IListViewItemProvider + virtual Tizen::Ui::Controls::ListItemBase* CreateItem(int index, int itemWidth); + virtual bool DeleteItem(int index, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth); + virtual int GetItemCount(void); + +private: + static const int ID_FORMAT_STRING = 100; + static const int ID_FORMAT_BITMAP = 101; + static const int ID_CONTEXT_ITEM_1 = 103; + static const int ID_CONTEXT_ITEM_2 = 104; + + Tizen::Graphics::Bitmap* __pHome; + Tizen::Graphics::Bitmap* __pMsg; + Tizen::Graphics::Bitmap* __pAlarm; + Tizen::Graphics::Bitmap* __pCall; + + Tizen::Ui::Controls::ListView* __pListView; + Tizen::Ui::Controls::ListContextItem* __pItemContext; +}; + * @endcode + * + * @code +//Sample code for ListViewSample.cpp +#include +#include + +#include "ListViewSample.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Media; +using namespace Tizen::Ui::Controls; + +bool +ListViewSample::Initialize(void) +{ + Construct(FORM_STYLE_NORMAL); + return true; +} + +result +ListViewSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + // Creates an instance of ListView + __pListView = new ListView(); + __pListView->Construct(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height), true, false); + __pListView->SetItemProvider(*this); + __pListView->AddListViewItemEventListener(*this); + + // Adds the list view to the form + AddControl(__pListView); + + // Creates an instance of ListContextItem + __pItemContext = new ListContextItem(); + __pItemContext->Construct(); + __pItemContext->AddElement(ID_CONTEXT_ITEM_1, L"Test1"); + __pItemContext->AddElement(ID_CONTEXT_ITEM_2, L"Test2"); + + // Gets instances of Bitmap + AppResource* pAppResource = Application::GetInstance()->GetAppResource(); + __pHome = pAppResource->GetBitmapN(L"tizen.png"); + __pMsg = pAppResource->GetBitmapN(L"tizen.png"); + __pAlarm = pAppResource->GetBitmapN(L"tizen.png"); + __pCall = pAppResource->GetBitmapN(L"tizen.png"); + + return r; +} + +result +ListViewSample::OnTerminating(void) +{ + result r = E_SUCCESS; + + // Deallocates bitmaps + delete __pHome; + delete __pMsg; + delete __pAlarm; + delete __pCall; + + // Deallocates the item context + delete __pItemContext; + + return r; +} + +// IListViewItemEventListener implementation +void +ListViewSample::OnListViewItemStateChanged(ListView &listView, int index, int elementId, ListItemStatus status) +{ + switch (elementId) + { + case ID_FORMAT_BITMAP: + { + // .... + } + break; + case ID_FORMAT_STRING: + { + // .... + } + break; + default: + break; + } +} + +void +ListViewSample::OnListViewContextItemStateChanged(ListView &listView, int index, int elementId, ListContextItemStatus state) +{ + switch (elementId) + { + case ID_CONTEXT_ITEM_1: + { + // .... + } + break; + case ID_CONTEXT_ITEM_2: + { + // .... + } + break; + default: + break; + } +} + +void +ListViewSample::OnListViewItemSwept(ListView &listView, int index, SweepDirection direction) +{ + // .... +} + +// IListViewItemProvider implementation +ListItemBase* +ListViewSample::CreateItem(int index, int itemWidth) +{ + // Creates an instance of CustomItem + CustomItem* pItem = new CustomItem(); + ListAnnexStyle style = LIST_ANNEX_STYLE_NORMAL; + + switch (index % 4) + { + case 0: + { + style = LIST_ANNEX_STYLE_NORMAL; + pItem->Construct(Dimension(itemWidth,112), style); + pItem->AddElement(Rectangle(10, 20, 60, 60), ID_FORMAT_BITMAP, *__pHome, null, null); + pItem->AddElement(Rectangle(80, 25, 150, 50), ID_FORMAT_STRING, L"Home", true); + } + break; + case 1: + { + style = LIST_ANNEX_STYLE_DETAILED; + pItem->Construct(Dimension(itemWidth,112), style); + pItem->AddElement(Rectangle(10, 20, 60, 60), ID_FORMAT_BITMAP, *__pMsg, null, null); + pItem->AddElement(Rectangle(80, 25, 150, 50), ID_FORMAT_STRING, L"Msg", true); + } + break; + case 2: + { + style = LIST_ANNEX_STYLE_ONOFF_SLIDING; + pItem->Construct(Dimension(itemWidth,112), style); + pItem->AddElement(Rectangle(10, 20, 60, 60), ID_FORMAT_BITMAP, *__pAlarm, null, null); + pItem->AddElement(Rectangle(80, 25, 150, 50), ID_FORMAT_STRING, L"Alarm", true); + } + break; + case 3: + { + style = LIST_ANNEX_STYLE_MARK; + pItem->Construct(Dimension(itemWidth,112), style); + pItem->AddElement(Rectangle(10, 20, 60, 60), ID_FORMAT_BITMAP, *__pCall, null, null); + pItem->AddElement(Rectangle(80, 25, 150, 50), ID_FORMAT_STRING, L"Call", true); + } + break; + default: + break; + } + + pItem->SetContextItem(__pItemContext); + + return pItem; +} + +bool +ListViewSample::DeleteItem(int index, ListItemBase* pItem, int itemWidth) +{ + delete pItem; + pItem = null; + return true; +} + +int +ListViewSample::GetItemCount(void) +{ + return 15; +} + * @endcode + * + */ +class _OSP_EXPORT_ ListView + : public Tizen::Ui::Control +{ +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. + * + * @since 2.0 + */ + ListView(void); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~ListView(void); + + /** + * @if OSPDEPREC + * Initializes this instance of %ListView with the specified parameters. + * + * @brief [Deprecated] + * @deprecated This method is deprecated. + * @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 %ListView 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] 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. @n + * Either the @c rect.width or @c rect.height parameter has a negative value. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result Construct(const Tizen::Graphics::Rectangle& rect, bool itemDivider = true, bool fastScroll = false); + + /** + * Initializes this instance of %ListView with the specified parameters. + * + * @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 %ListView 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 Set to scroll style + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. @n + * Either the @c rect.width or @c rect.height parameter has a negative value. + * @exception E_SYSTEM A system error has occurred. + */ + result Construct(const Tizen::Graphics::Rectangle& rect, bool itemDivider, ListScrollStyle scrollStyle); + + /** + * Initializes this instance of %ListView with the specified parameters. + * + * @since 2.1 + * + * @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 %ListView 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 Set to scroll style + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. @n + * Either the @c rect.width or @c rect.height parameter has a negative value. + * @exception E_SYSTEM A system error has occurred. + */ + result Construct(const Tizen::Graphics::FloatRectangle& rect, bool itemDivider, ListScrollStyle scrollStyle); + + /** + * Sets the item provider that creates and deletes items for the list. + * + * @since 2.0 + * + * @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 the list, the list does not work. + * - The specified @c provider should be allocated in heap memory. + */ + result SetItemProvider(IListViewItemProvider& provider); + + /** + * Sets the item provider that creates and deletes items for the list. + * + * @since 2.1 + * + * @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 the list, the list does not work. + * - The specified @c provider should be allocated in heap memory. + */ + result SetItemProvider(IListViewItemProviderF& provider); + + /** + * Adds a listener instance that listens to state changes of list view items. @n + * The added listener can listen to events on the specified event dispatcher's context when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to add + */ + void AddListViewItemEventListener(IListViewItemEventListener& listener); + + /** + * Removes a listener instance that listens to state changes of list view items. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to remove + */ + void RemoveListViewItemEventListener(IListViewItemEventListener& listener); + + /** + * Adds a listener instance that listens to state changes of a fast scroll. @n + * The added listener can listen to events on the specified event dispatcher's context when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to add + */ + void AddFastScrollListener(IFastScrollListener& listener); + + /** + * Removes a listener instance that listens to state changes of a fast scroll. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to remove + */ + void RemoveFastScrollListener(IFastScrollListener& listener); + + /** + * Adds a listener instance that listens to state changes of a scroll event. @n + * The added listener can listen to events on the specified event dispatcher's context when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to add + * @see IScrollEventListener::OnScrollEndReached() + * @see RemoveScrollEventListener() + */ + void AddScrollEventListener(IScrollEventListener& listener); + + /** + * Adds a listener instance that listens to state changes of a scroll event. @n + * The added listener can listen to events on a specified event dispatcher's context when they are fired. + * + * @since 2.1 + * + * @param[in] listener The event listener to add + * @see IScrollEventListener::OnScrollEndReached() + * @see RemoveScrollEventListener() + */ + void AddScrollEventListener(IScrollEventListenerF& listener); + + /** + * Removes a listener instance that listens to state changes of a scroll event. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to remove + * @see IScrollEventListener::OnScrollEndReached() + * @see AddScrollEventListener() + */ + void RemoveScrollEventListener(IScrollEventListener& listener); + + /** + * Removes a listener instance that listens to state changes of a scroll event. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.1 + * + * @param[in] listener The event listener to remove + * @see IScrollEventListener::OnScrollEndReached() + * @see AddScrollEventListener() + */ + void RemoveScrollEventListener(IScrollEventListenerF& listener); + + /** + * Adds a link event listener. + * + * @since 2.0 + * + * @param[in] listener The event listener to add + * @remarks The added listener is notified when a link is selected by the user. + * @see RemoveUiLinkEventListener() + */ + void AddUiLinkEventListener(Tizen::Ui::IUiLinkEventListener& listener); + + /** + * Removes the specified link event listener. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to remove + * @see AddUiLinkEventListener() + */ + void RemoveUiLinkEventListener(Tizen::Ui::IUiLinkEventListener& listener); + + /** + * Sets the sweep event to enable. + * + * @since 2.0 + * + * @return An error code + * @param[in] enable Set to @c true to enable the sweep, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetSweepEnabled(bool enable); + + /** + * Sets the index list of the scroll by texts. + * + * @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_STATE This instance is in an invalid state. + * @exception E_SYSTEM A system error has occurred. + */ + result SetFastScrollIndex(const Tizen::Base::String& text, bool useSearchIcon); + + /** + * Gets the index of the top drawn item of the %ListView control. + * + * @since 2.0 + * + * @return The index of the top drawn item + */ + int GetTopDrawnItemIndex(void) const; + + /** + * Gets the index of the bottom drawn item of the %ListView control. + * + * @since 2.0 + * + * @return The index of the bottom drawn item + */ + int GetBottomDrawnItemIndex(void) const; + + /** + * Scrolls to the item at the specified index. @n + * The specified item is drawn at the top of the %ListView control. + * + * @since 2.0 + * + * @return An error code + * @param[in] index The item index + * @exception E_SUCCESS The method is successful. + * @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 %ListView, then the UpdateList() method + * should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + */ + result ScrollToItem(int 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 + * + * @return An error code + * @param[in] index 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_SYSTEM A system error has occurred. + */ + result ScrollToItem(int index, ListScrollItemAlignment itemAlignment); + + /** + * Sets the check status of the item at the specified index. + * + * @since 2.0 + * + * @return An error code + * @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 %ListView, then the UpdateList() method + * should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + */ + result SetItemChecked(int index, bool check); + + /** + * Checks whether the item at the specified index is checked. + * + * @since 2.0 + * + * @return @c true if the item is checked, @n + * 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 %ListView, then the UpdateList() method + * should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + */ + bool IsItemChecked(int index) const; + + /** + * Sets the enabled/disabled status of the item at the specified index. + * + * @since 2.0 + * + * @return An error code + * @param[in] index The item index + * @param[in] enable The enabled/disabled status + * @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 should be called only after list items are created. @n + * 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()). + * + */ + result SetItemEnabled(int index, bool enable); + + /** + * 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] 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 %ListView, then the UpdateList() method + * should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + */ + bool IsItemEnabled(int index) const; + + /** + * Counts the number of items. + * + * @since 2.0 + * + * @return The total number of items + */ + int GetItemCount(void) const; + + /** + * Shows the description text of the given item. + * + * @since 2.0 + * + * @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 input parameter is invalid. + * @exception E_SYSTEM A system error has occurred. + * @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 %ListView, then the UpdateList() method + * should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + */ + result ShowItemDescriptionText(int index); + + /** + * Hides the description text of the given item. + * + * @since 2.0 + * + * @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 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 %ListView, then the UpdateList() method + * should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + */ + result HideItemDescriptionText(int index); + + /** + * Refreshes the specified item. + * + * @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. + * @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 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 %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); + + /** + * Refreshes the specified item's element. + * + * @since 2.0 + * + * @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. + * @remarks This method internally calls Invalidate(), so you do not need to call them to update the screen. + */ + result RefreshList(int index, int elementId); + + /** + * Updates the whole items of a list. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @remarks This method clears the items in the list and re-invokes the methods of the item provider to fill the list. + */ + result UpdateList(void); + + /** + * Gets the index of the item at the specified position. + * + * @since 2.0 + * + * @return The index of the item, @n + * else @c -1 if there is no list item at the specified position + * @param[in] x The X position of the point + * @param[in] y The Y position of the point + * @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 %ListView, then the UpdateList() method + * should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + * + */ + int GetItemIndexFromPosition(int x, int y) const; + + /** + * Gets the index of the item at a specified position. + * + * @since 2.1 + * + * @return The index of the item, @n + * else @c -1 if there is no list item at the specified position + * @param[in] x The X position of the point + * @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 %ListView, then the UpdateList() method + * should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + */ + int GetItemIndexFromPosition(float x, float y) const; + + /** + * Gets the index of the item at the specified position. + * + * @since 2.0 + * + * @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 %ListView, then the UpdateList() method + * should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + */ + int GetItemIndexFromPosition(const Tizen::Graphics::Point& position) const; + + /** + * Gets the index of the item at a specified position. + * + * @since 2.1 + * + * @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 %ListView, then the UpdateList() method + * should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + */ + int GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& position) const; + + /** + * Gets the index of the item and ID of the element at the specified position. + * + * @since 2.0 + * + * @return An error code + * @param[in] x The X position of the item + * @param[in] y The Y position of the item + * @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 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 %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; + + /** + * Gets the index of the item and ID of the element at a specified position. + * + * @since 2.1 + * + * @return An error code + * @param[in] x The X position of the item + * @param[in] y The Y position of the item + * @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 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 %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; + + /** + * Gets the index of the item and ID of the element at the specified position. + * + * @since 2.0 + * + * @return An error code + * @param[in] position The position of the point + * @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 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 %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; + + /** + * Gets the index of the item and ID of the element at a specified position. + * + * @since 2.1 + * + * @return An error code + * @param[in] position The position of the point + * @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 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 %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; + + /** + * Sets the color of a division line between items. + * + * @since 2.0 + * + * @return An error code + * @param[in] color The division line color + * @exception E_SUCCESS The method is successful. + */ + result SetItemDividerColor(const Tizen::Graphics::Color& color); + + /** + * Gets the color of a division line between items. + * + * @since 2.0 + * + * @return The color of a section, @n + * else RGBA(0, 0, 0, 0) if the instance is invalid + */ + Tizen::Graphics::Color GetItemDividerColor(void) const; + + /** + * Sets the background color of this control. + * + * @since 2.0 + * + * @return An error code + * @param[in] color The background color + * @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. + */ + result SetBackgroundColor(const Tizen::Graphics::Color& color); + + /** + * Gets the background color of this control. + * + * @since 2.0 + * + * @return The background color, @n + * else RGBA(0, 0, 0, 0) if the instance is invalid + */ + Tizen::Graphics::Color GetBackgroundColor(void) const; + + /** + * Sets the bitmap of this control. + * + * @since 2.0 + * + * @return An error code + * @param[in] pBitmap The bitmap for the list + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetBackgroundBitmap(const Tizen::Graphics::Bitmap* pBitmap); + + /** + * Sets the bitmap of the empty list. + * + * @since 2.0 + * + * @return An error code + * @param[in] pBitmap The bitmap for the empty list + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetBitmapOfEmptyList(const Tizen::Graphics::Bitmap* pBitmap); + + /** + * Sets the text of the empty list. + * + * @since 2.0 + * + * @return An error code + * @param[in] text The text for the empty list + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetTextOfEmptyList(const Tizen::Base::String& text); + + /** + * Gets the text to display when there is no item in a list. + * + * @since 2.0 + * + * @return The text to display, @n + * else an empty string if the instance is invalid + */ + Tizen::Base::String GetTextOfEmptyList(void) const; + + /** + * Sets a color of the text to display when there is no item in a list. + * + * @since 2.0 + * + * @return An error code + * @param[in] color The color of the text to display + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetTextColorOfEmptyList(const Tizen::Graphics::Color& color); + + /** + * Gets a color of the text to display when there is no item in a list. + * + * @since 2.0 + * + * @return The color of the text to display + */ + Tizen::Graphics::Color GetTextColorOfEmptyList(void) const; + + /** + * Begins the reordering mode. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see IListViewItemEventListener::OnListViewItemReordered() + */ + result BeginReorderingMode(void); + + /** + * Ends the reordering mode. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see IListViewItemEventListener::OnListViewItemReordered() + */ + result EndReorderingMode(void); + + /** + * Checks whether the %ListView control is in reordering mode. + * + * @since 2.0 + * + * @return @c true if the %ListView is in reordering mode, @n + * else @c false + */ + bool IsInReorderingMode(void) const; + + /** + * Sets the scroll input handling mode. + * + * @since 2.1 + * + * @param[in] mode The scroll input handling mode + * @see GetScrollInputMode() + */ + void SetScrollInputMode(ScrollInputMode mode); + + + /** + * Gets the scroll input handling mode. + * + * @since 2.1 + * + * @return The scroll input handling mode + * @see SetScrollInputMode() + */ + ScrollInputMode GetScrollInputMode(void) const; + + /** + * Opens the context item at a specified index. + * + * @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. + */ + result OpenContextItem(int itemIndex); + + /** + * Closes the context item at a specified index. + * + * @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. + */ + result CloseContextItem(int itemIndex); + + /** + * Checks whether the context item at a specified index is opened. + * + * @since 2.1 + * + * @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. + */ + bool IsContextItemOpened(int itemIndex) const; + +protected: + friend class _ListViewImpl; + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + ListView(const ListView& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + ListView& operator =(const ListView& rhs); +}; // ListView + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_LIST_VIEW_H_ diff --git a/inc/FUiCtrlListViewTypes.h b/inc/FUiCtrlListViewTypes.h new file mode 100644 index 0000000..c13d58b --- /dev/null +++ b/inc/FUiCtrlListViewTypes.h @@ -0,0 +1,163 @@ +// +// 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 FUiCtrlListViewTypes.h + * @brief This is the header file for the %List enumerations. + * + * This header file contains the declarations of the List enumerations. + */ +#ifndef _FUI_CTRL_LIST_VIEW_TYPES_H_ +#define _FUI_CTRL_LIST_VIEW_TYPES_H_ + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @enum ListAnnexStyle + * + * Defines the style of annex in the items. + * + * @since 2.0 + */ +enum ListAnnexStyle +{ + 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 */ + LIST_ANNEX_STYLE_RADIO, /**< The radio style for simple look */ + LIST_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER /**< The slider style On/Off with divider @b Since: @b 2.1 */ +}; + +/** + * @enum ListItemDrawingStatus + * + * Defines the drawing state of the items. + * + * @since 2.0 + */ +enum ListItemDrawingStatus +{ + LIST_ITEM_DRAWING_STATUS_NORMAL = 0, /**< The normal drawing state */ + LIST_ITEM_DRAWING_STATUS_PRESSED, /**< The pressed drawing state */ + LIST_ITEM_DRAWING_STATUS_HIGHLIGHTED /**< The highlighted drawing state */ +}; + +/** + * @enum ListRefreshType + * + * Defines the update type of the list. + * + * @since 2.0 + */ +enum ListRefreshType +{ + LIST_REFRESH_TYPE_ITEM_ADD = 0, /**< The add type */ + LIST_REFRESH_TYPE_ITEM_REMOVE, /**< The remove type */ + LIST_REFRESH_TYPE_ITEM_MODIFY /**< The modify type */ +}; + +/** + * @enum ListItemStatus + * + * Defines the item state of the list. + * + * @since 2.0 + */ +enum ListItemStatus +{ + LIST_ITEM_STATUS_SELECTED = 0, /**< The selected item state */ + LIST_ITEM_STATUS_HIGHLIGHTED, /**< The highlighted item state */ + LIST_ITEM_STATUS_CHECKED, /**< The check item state */ + LIST_ITEM_STATUS_UNCHECKED, /**< The uncheck item state */ + LIST_ITEM_STATUS_MORE /**< The more item state */ +}; + +/** + * @enum ListContextItemStatus + * + * Defines the state of the context items. + * + * @since 2.0 + */ +enum ListContextItemStatus +{ + LIST_CONTEXT_ITEM_STATUS_SELECTED = 0, /**< The selected context item state */ + LIST_CONTEXT_ITEM_STATUS_HIGHLIGHTED /**< The highlighted context item state */ +}; + +/** + * @enum ListContextItemElementStatus + * + * Defines the element status of the context item. + * + * @since 2.1 + */ +enum ListContextItemElementStatus +{ + LIST_CONTEXT_ITEM_ELEMENT_STATUS_NORMAL = 0, /**< The normal element status */ + LIST_CONTEXT_ITEM_ELEMENT_STATUS_PRESSED, /**< The pressed element status */ + LIST_CONTEXT_ITEM_ELEMENT_STATUS_HIGHLIGHTED /**< The highlighted element status */ +}; + +/** + * @enum SweepDirection + * + * Defines the direction of the sweep interaction. + * + * @since 2.0 + */ +enum SweepDirection +{ + SWEEP_DIRECTION_LEFT = 0, /**< The left direction */ + SWEEP_DIRECTION_RIGHT /**< The right direction */ +}; + +/** + * @enum ListScrollItemAlignment + * + * Defines the alignment information for item scroll. + * + * @since 2.0 + */ +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_BOTTOM /**< The item is aligned at the bottom of the ListView at item scroll */ +}; + +/** + * @enum ListScrollStyle + * + * Defines the scroll style of the list. + * + * @since 2.0 + */ +enum ListScrollStyle +{ + SCROLL_STYLE_FADE_OUT = 0, /**< The fade-out scroll style */ + SCROLL_STYLE_FIXED, /**< The fixed scroll style */ + SCROLL_STYLE_FAST_SCROLL, /**< The fast scroll style */ + SCROLL_STYLE_JUMP_TO_TOP, /**< The jump to top scroll style */ + SCROLL_STYLE_THUMB, /**< The thumb scroll style */ + SCROLL_STYLE_FAST_SCROLL_FIXED /**< The fixed fast scroll style @b Since: @b 2.2 */ +}; + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_LIST_VIEW_TYPES_H_ diff --git a/inc/FUiCtrlMessageBox.h b/inc/FUiCtrlMessageBox.h new file mode 100644 index 0000000..e29d95d --- /dev/null +++ b/inc/FUiCtrlMessageBox.h @@ -0,0 +1,354 @@ +// +// 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 FUiCtrlMessageBox.h +* @brief This is the header file for the %MessageBox class. +* +* This header file contains the declarations of the %MessageBox class. +*/ + +#ifndef _FUI_CTRL_MESSAGE_BOX_H_ +#define _FUI_CTRL_MESSAGE_BOX_H_ + +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @enum MessageBoxStyle + * + * Defines the %MessageBox style. + * + * @since 2.0 + */ +enum MessageBoxStyle +{ + MSGBOX_STYLE_NONE, /**< The message box does not contain push buttons: NONE */ + MSGBOX_STYLE_OK, /**< The message box contains one push button: OK */ + MSGBOX_STYLE_CANCEL, /**< The message box contains one push button: CANCEL */ + MSGBOX_STYLE_OKCANCEL, /**< The message box contains two push buttons: OK and CANCEL */ + MSGBOX_STYLE_YESNO, /**< The message box contains two push buttons: YES and NO */ + MSGBOX_STYLE_YESNOCANCEL, /**< The message box contains three push buttons: YES, NO and CANCEL */ + MSGBOX_STYLE_ABORTRETRYIGNORE, /**< The message box contains three push buttons: ABORT, RETRY, and IGNORE */ + MSGBOX_STYLE_CANCELTRYCONTINUE, /**< The message box contains three push buttons: CANCEL, TRY, and CONTINUE */ + MSGBOX_STYLE_RETRYCANCEL /**< The message box contains two push buttons: RETRY and CANCEL */ +}; + + +/** + * @enum MessageBoxModalResult + * + * Defines the %MessageBox notifications. + * + * @since 2.0 + */ +enum MessageBoxModalResult +{ + + MSGBOX_RESULT_CLOSE, /**< The message box is closed */ + MSGBOX_RESULT_OK, /**< The OK button is selected */ + MSGBOX_RESULT_CANCEL, /**< The cancel button is selected */ + MSGBOX_RESULT_YES, /**< The Yes button is selected */ + MSGBOX_RESULT_NO, /**< The No button is selected */ + MSGBOX_RESULT_ABORT, /**< The Abort button is selected */ + MSGBOX_RESULT_TRY, /**< The Try button is selected */ + MSGBOX_RESULT_RETRY, /**< The Retry button is selected */ + MSGBOX_RESULT_IGNORE, /**< The Ignore button is selected */ + MSGBOX_RESULT_CONTINUE, /**< The Continue button is selected */ +}; + + +/** +* @class MessageBox +* @brief This class implements a message box. +* +* @since 2.0 +* +* The %MessageBox class displays a confirmation message when the user is asked to confirm an action, or a warning message when the +* user wants to continue a potentially dangerous action. It can also display information, question, alarm, and lock messages, or +* the user selections. +* +* For more information on the class features, +* see Popup and MessageBox. +* +* The following example demonstrates how to use the %MessageBox class. +* +* @code +// Sample code for MessageBoxSample.h +#include + +class MessageBoxSample + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::IActionEventListener +{ +public: + bool Initialize(void); + void OpenMessageBox(void); + virtual result OnInitializing(void); + virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId); + +protected: + static const int ID_BTN_DO_SOMETHING = 101; +}; + * @endcode + * + * @code +// Sample code for MessageBoxSample.cpp +#include + +#include "MessageBoxSample.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Ui::Controls; + +bool +MessageBoxSample::Initialize(void) +{ + Construct(FORM_STYLE_NORMAL); + return true; +} + +result +MessageBoxSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + // Creates an instance of Button + Button* pButton = new Button(); + pButton->Construct(Rectangle(10, 10, 350, 60), L"MessageBox Test"); + pButton->SetActionId(ID_BTN_DO_SOMETHING); + pButton->AddActionEventListener(*this); + + // Adds the button to the form + AddControl(pButton); + + return r; +} + +void +MessageBoxSample::OpenMessageBox(void) +{ + // Creates an instance of MessageBox + MessageBox messageBox; + messageBox.Construct(L"MessageBox Title", L"MessageBox Sample Code.", MSGBOX_STYLE_OK, 3000); + + int modalResult = 0; + + // Calls ShowAndWait() : Draws and Shows itself and processes events + messageBox.ShowAndWait(modalResult); + + switch (modalResult) + { + case MSGBOX_RESULT_OK: + { + // .... + } + break; + default: + break; + } +} + +void +MessageBoxSample::OnActionPerformed(const Control& source, int actionId) +{ + switch (actionId) + { + case ID_BTN_DO_SOMETHING: + { + OpenMessageBox(); + } + break; + default: + break; + } +} +* @endcode +*/ + +class _OSP_EXPORT_ MessageBox + : public Tizen::Ui::Window +{ +public: + /** + * 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 + */ + MessageBox(void); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~MessageBox(void); + + /** + * Initializes this instance of %MessageBox with the specified parameters. + * + * @since 2.0 + * + * @return An error code + * @param[in] title The title string to set + * @param[in] text The text string to set + * @param[in] style The style of the %MessageBox control + * @param[in] timeout The duration of the timeout in milliseconds + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @exception E_INVALID_ARG The specified @c text is too long. + * @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 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. + * @see ShowAndWait() + */ + result Construct(const Tizen::Base::String& title, const Tizen::Base::String& text, MessageBoxStyle style, unsigned long timeout = 0); + +public: + /** + * Runs the modal window. @n + * This method should be called only after calling the Construct() method. + * + * @since 2.0 + * + * @return An error code + * @param[out] modalResult The %MessageBox notification + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + virtual result ShowAndWait(int& modalResult); + + /** + * Gets the text of the %MessageBox control. + * + * @since 2.0 + * + * @return The text of this %MessageBox instance, @n + * else an empty string if the instance is invalid + */ + Tizen::Base::String GetText(void) const; + + /** + * Gets the title of the %MessageBox control. + * + * @since 2.0 + * + * @return The title of this %MessageBox instance, @n + * else an empty string if the instance is invalid + */ + Tizen::Base::String GetTitleText(void) const; + + /** + * Gets the style of the current %MessageBox. + * + * @since 2.0 + * + * @return The style of the current %MessageBox, @n + * else @c MSGBOX_STYLE_NONE if the instance is invalid + */ + MessageBoxStyle GetMessageBoxStyle(void) const; + + /** + * Gets the timeout value of %MessageBox. + * + * @since 2.0 + * + * @return The timeout value in milliseconds, @n + * else @c 0 if the instance is invalid + */ + virtual unsigned long GetTimeout(void) const; + + /** + * Sets the color of the %MessageBox control. + * + * @since 2.0 + * + * @param[in] color The color to set + */ + void SetColor(const Tizen::Graphics::Color& color); + + /** + * Gets the color of the %MessageBox control. + * + * @since 2.0 + * + * @return The color to set + */ + Tizen::Graphics::Color GetColor(void) const; + + /** + * Sets the title text color of the %MessageBox control. + * + * @since 2.0 + * + * @param[in] color The title text color to set + */ + void SetTitleTextColor(const Tizen::Graphics::Color& color); + + /** + * Gets the title text color of the %MessageBox control. + * + * @since 2.0 + * + * @return The title text color + */ + Tizen::Graphics::Color GetTitleTextColor(void) const; + + /** + * Sets the text color of the %MessageBox control. + * + * @since 2.0 + * + * @param[in] color The text color to set + */ + void SetTextColor(const Tizen::Graphics::Color& color); + + /** + * Gets the text color of the %MessageBox control. + * + * @since 2.0 + * + * @return The text color + */ + Tizen::Graphics::Color GetTextColor(void) const; + +protected: + friend class _MessageBoxImpl; + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + MessageBox(const MessageBox& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + MessageBox& operator =(const MessageBox& rhs); + +}; // MessageBox + + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_MESSAGE_BOX_H_ diff --git a/inc/FUiCtrlOptionMenu.h b/inc/FUiCtrlOptionMenu.h new file mode 100644 index 0000000..119450a --- /dev/null +++ b/inc/FUiCtrlOptionMenu.h @@ -0,0 +1,647 @@ +// +// 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 FUiCtrlOptionMenu.h + * @brief This is the header file for the %OptionMenu class. + * + * This header file contains the declarations of the %OptionMenu class and its helper classes. + */ + +#ifndef _FUI_CTRL_OPTION_MENU_H_ +#define _FUI_CTRL_OPTION_MENU_H_ + +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @enum OptionMenuItemStatus + * + * Defines the possible states of the %OptionMenu control item. + * + * @since 2.2 + */ +enum OptionMenuItemStatus +{ + OPTION_MENU_ITEM_STATUS_NORMAL, /**< The normal state */ + OPTION_MENU_ITEM_STATUS_PRESSED, /**< The pressed state */ + OPTION_MENU_ITEM_STATUS_HIGHLIGHTED /**< The highlighted state */ +}; + + +/** + * @class OptionMenu + * @brief This class defines a common behavior for an %OptionMenu control. + * + * @since 2.2 + * + * The %OptionMenu class defines a common behavior for an %OptionMenu control. + * An %OptionMenu is used to present users with multiple options. Hierarchical menu + * of depth 2 can be constructed. Option menu consists of main items and sub-items. + * Unlike ContextMenu, menus cannot display bitmaps. + * + * If an application wants to perform tasks when a menu item is selected, it must + * implement IActionEventListener and register the listener by calling the + * OptionMenu::AddActionEventListener() method. It will then receive action ID associated + * with the menu item. + * Note that %OptionMenu cannot be used in a Popup. + * + * For more information on the class features, see OptionMenu. + * + * The following examples demonstrate how to use an %OptionMenu control. + * + * @code + // Sample code for OptionMenuSample.h + #include + +class OptionMenuSample + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::IActionEventListener + , public Tizen::Ui::Controls::IFormMenuEventListener +{ +public: + bool Initialize(void) ; + void ShowOptionMenu(void); + + virtual result OnInitializing(void); + virtual result OnTerminating(void); + + // IActionEventListener + virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId); + + // IFormMenuEventListener + virtual void OnFormMenuRequested(Tizen::Ui::Controls::Form& source); + +private: + static const int ID_OPTIONMENU_ITEM1 = 101; + static const int ID_OPTIONMENU_ITEM2 = 102; + + Tizen::Ui::Controls::OptionMenu* __pOptionMenu; +}; + * @endcode + * + * @code +// Sample code for OptionMenuSample.cpp +#include "OptionMenuSample.h" + +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; + +bool +OptionMenuSample::Initialize() +{ + Construct(FORM_STYLE_NORMAL); + return true; +} + +result +OptionMenuSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + // Set the FormMenu event listener + SetFormMenuEventListener(this); + + // Creates an instance of OptionMenu + __pOptionMenu = new OptionMenu(); + __pOptionMenu->Construct(); + __pOptionMenu->AddItem("Item1",ID_OPTIONMENU_ITEM1); + __pOptionMenu->AddItem("Item2",ID_OPTIONMENU_ITEM2); + __pOptionMenu->AddActionEventListener(*this); + + return r; +} + +result +OptionMenuSample::OnTerminating(void) +{ + result r = E_SUCCESS; + delete __pOptionMenu; + return r; +} + +void +OptionMenuSample::ShowOptionMenu(void) +{ + __pOptionMenu->SetShowState(true); + __pOptionMenu->Show(); +} + +// IActionEventListener implementation +void +OptionMenuSample::OnActionPerformed(const Control& source, int actionId) +{ + switch (actionId) + { + case ID_OPTIONMENU_ITEM1: + { + // .... + } + break; + case ID_OPTIONMENU_ITEM2: + { + // .... + } + break; + default: + break; + } +} + +// IFormMenuEventListener implementation +void +OptionMenuSample::OnFormMenuRequested(Tizen::Ui::Controls::Form& source) +{ + ShowOptionMenu(); +} + * @endcode + */ +class _OSP_EXPORT_ OptionMenu + : public Tizen::Ui::Window +{ +public: + /** + * 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 + */ + OptionMenu(void); + + /** + * 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.2 + */ + virtual ~OptionMenu(void); + + /** + * Initializes this instance of %OptionMenu. + * + * @since 2.2 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM The method has failed. + */ + result Construct(void); + + /** + * Adds a listener instance to receive action events from this control. @n + * The added listener can listen to events on the given event dispatcher's context when they are fired. + * + * @since 2.2 + * + * @param[in] listener The event listener to add + */ + void AddActionEventListener(Tizen::Ui::IActionEventListener& listener); + + /** + * Removes the specified action event listener so that it no longer receives events from this control. + * + * @since 2.2 + * + * @param[in] listener The event listener to remove + */ + void RemoveActionEventListener(Tizen::Ui::IActionEventListener& listener); + + /** + * Appends a new item to the end of %OptionMenu. + * + * @since 2.2 + * + * @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. + * @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. + */ + result AddItem(const Tizen::Base::String& text, int actionId); + + /** + * Appends a new item to the end of %OptionMenu. + * + * @since 2.2 + * + * @return An error code + * @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 + * @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 When a user navigates the user interface using the directional keys, @n + * the selected UI control is highlighted and the control takes the focus. + */ + result AddItem (const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap, int actionId); + + /** + * Appends a new item to the end of %OptionMenu. + * + * @since 2.2 + * + * @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] 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_SYSTEM The method has failed. + */ + result AddItem(const Tizen::Base::String& text, int actionId, const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap = null, const Tizen::Graphics::Bitmap* pHighlightedBitmap = null); + + /** + * Inserts a specific item at the given index of %OptionMenu. + * + * @since 2.2 + * + * @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. + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified parameter is invalid. + * @exception E_SYSTEM The method has failed. + */ + result InsertItemAt(int mainIndex, const Tizen::Base::String& text, int actionId); + + /** + * Inserts a specific item at the given index of %OptionMenu. + * + * @since 2.2 + * + * @return An error code + * @param[in] mainIndex The main index + * @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 + * @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. + * @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. + */ + result InsertItemAt (int mainIndex, const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap, int actionId); + + /** + * Inserts a specific item at the given index of %OptionMenu. + * + * @since 2.2 + * + * @return An error code + * @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. + * @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_SYSTEM The method has failed. + */ + result InsertItemAt (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); + + /** + * Sets a specific item at the given index of %OptionMenu. + * + * @since 2.2 + * + * @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. + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified parameter is invalid. + * @exception E_SYSTEM The method has failed. + */ + result SetItemAt(int mainIndex, const Tizen::Base::String& text, int actionId); + + /** + * Sets a specific item at the given index of %OptionMenu. + * + * @since 2.2 + * + * @return An error code + * @param[in] mainIndex The main index + * @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 + * @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. + * @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. + */ + result SetItemAt (int mainIndex, const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap, int actionId); + + /** + * Sets a specific item at the given index of %OptionMenu. + * + * @since 2.2 + * + * @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] 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. + */ + 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); + + /** + * Removes the item of a specified index from %OptionMenu. + * + * @since 2.2 + * + * @return An error code + * @param[in] mainIndex The main index + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified parameter is invalid. + * @exception E_SYSTEM The method has failed. + */ + result RemoveItemAt(int mainIndex); + + /** + * Removes all items from %OptionMenu. + * + * @since 2.2 + */ + void RemoveAllItems (void); + + /** + * Gets the number of items registered for %OptionMenu. + * + * @since 2.2 + * + * @return The number of items registered for %OptionMenu + */ + int GetItemCount(void) const; + + /** + * Gets the index of the item with a specified action ID. + * + * @since 2.2 + * + * @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. + */ + int GetItemIndexFromActionId(int actionId) const; + + /** + * Gets the action ID of the item at a specified index. + * + * @since 2.2 + * + * @return The action ID of the item + * @param[in] mainIndex The index of the item + */ + int GetItemActionIdAt(int mainIndex) const; + + /** + * Appends new sub-item to the end of %OptionMenu. + * + * @since 2.2 + * + * @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. + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified parameter is invalid. + * @exception E_SYSTEM The method has failed. + */ + result AddSubItem(int mainIndex, const Tizen::Base::String& text, int actionId); + + /** + * Inserts a specific sub-item at the given index of %OptionMenu. + * + * @since 2.2 + * + * @return An error code + * @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. + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified parameter is invalid. + * @exception E_SYSTEM The method has failed. + */ + result InsertSubItemAt(int mainIndex, int subIndex, const Tizen::Base::String& text, int actionId); + + /** + * Sets a specific sub-item at the given index of %OptionMenu. + * + * @since 2.2 + * + * @return An error code + * @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. + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified parameter is invalid. + * @exception E_SYSTEM The method has failed. + */ + result SetSubItemAt(int mainIndex, int subIndex, const Tizen::Base::String& text, int actionId); + + /** + * Removes the sub-item of a specified index from %OptionMenu. + * + * @since 2.2 + * + * @return An error code + * @param[in] mainIndex The index of the main item + * @param[in] subIndex The index of the sub-item + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified parameter is invalid. + * @exception E_SYSTEM The method has failed. + */ + result RemoveSubItemAt(int mainIndex, int subIndex); + + /** + * Gets the number of sub-items registered for %OptionMenu. + * + * @since 2.2 + * + * @return The number of sub-items registered for %OptionMenu + * @param[in] mainIndex The index of the main item + */ + int GetSubItemCount(int mainIndex) const; + + /** + * Gets the index of the sub-item with a specified action ID. + * + * @since 2.2 + * + * @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. + */ + int GetSubItemIndexFromActionId(int actionId) const; + + /** + * Gets the action ID of the sub-item at a specified index. + * + * @since 2.2 + * + * @return The action ID of the item + * @param[in] mainIndex The index of the main item + * @param[in] subIndex The index of the sub-item + */ + int GetSubItemActionIdAt(int mainIndex, int subIndex) const; + + /** + * Sets the item text color of %OptionMenu for a specified status. + * + * @since 2.2 + * + * @return An error code + * @param[in] status The item status + * @param[in] color The item text color to set + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified parameter is invalid. + * @see GetItemTextColor() + */ + result SetItemTextColor(OptionMenuItemStatus status, const Tizen::Graphics::Color& color); + + /** + * Gets the item text color of %OptionMenu for a specified status. + * + * @since 2.2 + * + * @return The item text color, @n + * else RGBA (0,0,0,0) if an error occurs + * @param[in] status The item status + * @see SetItemTextColor() + */ + Tizen::Graphics::Color GetItemTextColor(OptionMenuItemStatus status) const; + + /** + * Sets the item color of %OptionMenu for a specified status. + * + * @since 2.2 + * + * @return An error code + * @param[in] status The item status + * @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. + * @see GetItemColor() + */ + result SetItemColor(OptionMenuItemStatus status, const Tizen::Graphics::Color& color); + + /** + * Gets the item color of %OptionMenu for a specified status. + * + * @since 2.2 + * + * @return The item color, @n + * else RGBA(0, 0, 0, 0) if an error occurs + * @param[in] status The item status + */ + Tizen::Graphics::Color GetItemColor(OptionMenuItemStatus status) const; + + /** + * Sets the color of %OptionMenu. + * + * @since 2.2 + * + * @return An error code + * @param[in] color The color to set + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM The method cannot proceed due to a severe system error. + * @see GetColor() + */ + result SetColor(const Tizen::Graphics::Color& color); + + /** + * Gets the color of %OptionMenu. + * + * @since 2.2 + * + * @return The color of %OptionMenu, @n + * else RGBA(0, 0, 0, 0) if an error occurs + * @see SetColor() + */ + Tizen::Graphics::Color GetColor(void) const; + + /** + * Sets the maximum number of visible items for %OptionMenu. + * + * @since 2.2 + * + * @return An error code + * @param[in] maxItemsCount The maximum number of visible items @n + * The value should be greater than @c 0. + * @exception E_SUCCESS The method is successful. + * @exception E_INALID_ARG A specified input parameter is invalid. + */ + result SetMaxVisibleItemsCount(int maxItemsCount); + + /** + * Gets the maximum number of visible items for %OptionMenu. + * + * @since 2.2 + * + * @return The maximum number of visible items, @n + * else @c -1 if an error occurs + */ + int GetMaxVisibleItemsCount(void) const; + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + OptionMenu(const OptionMenu&); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + OptionMenu& operator =(const OptionMenu&); + + friend class _OptionMenuImpl; +}; // OptionMenu + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_OPTION_MENU_H_ diff --git a/inc/FUiCtrlOverlayPanel.h b/inc/FUiCtrlOverlayPanel.h new file mode 100644 index 0000000..7136ab7 --- /dev/null +++ b/inc/FUiCtrlOverlayPanel.h @@ -0,0 +1,612 @@ +// +// 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 FUiCtrlOverlayPanel.h + * @brief This is the header file for the %OverlayPanel class. + * + * This header file contains the declarations of the %OverlayPanel class. + */ + +#ifndef _FUI_CTRL_OVERLAY_PANEL_H_ +#define _FUI_CTRL_OVERLAY_PANEL_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @enum OverlayPanelEvaluationOption + * + * Defines the option for evaluating the bounds of an overlay panel. + * + * @since 2.1 + */ +enum OverlayPanelEvaluationOption +{ + OVERLAY_PANEL_EVAL_OPT_GREATER_THAN, /**< The option evaluating the overlay panel bounds and finding the minimum + bounds greater than the input bounds */ + OVERLAY_PANEL_EVAL_OPT_LESS_THAN /**< The option evaluating the overlay panel bounds and finding the maximum + bounds smaller than input bounds */ +}; + +/** + * @class OverlayPanel + * @brief This class is an implementation of %OverlayPanel. + * + * @since 2.1 + * + * @remarks The %OverlayPanel control can only be attached to a %Form control by using Tizen::Ui::Container::AddControl method, because of its native + * characteristics. Since %OverlayPanel inherits a Panel control, it can be used as a container if needed. + * + * The %OverlayPanel class is an implementation of the %OverlayPanel control. + * The %OverlayPanel is a special type of panel which is used to specify area where the developer + * can playback video or camera preview. It is called an overlay because it is possible to overlay + * other graphics and controls on top of the panel. + * The %OverlayPanel consists of two layers, the foreground panel and background buffer which supports + * H/W accelerated rendering. Due to the hardware accelerated nature, there is a limitation with an + * %OverlayPanel. The Form that houses an %OverlayPanel can only have a black, opaque background. + * The overlay panel can manipulate the rotation and the size of input buffer. + * + * The following example demonstrates how to use the %OverlayPanel class. + * + * @code +//Sample code for OverlayPanelSampleForm.h +#include +#include +#include + +class OverlayPanelSampleForm + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::IActionEventListener + , public Tizen::Media::IPlayerEventListener +{ +public: + OverlayPanelSampleForm(void); + virtual ~OverlayPanelSampleForm(void); + + bool Initialize(void); + virtual result OnInitializing(void); + virtual result OnTerminating(void); + virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId); + + // IPlayerEventListener + virtual void OnPlayerOpened(result r); + virtual void OnPlayerEndOfClip(void); + virtual void OnPlayerSeekCompleted(result r); + virtual void OnPlayerBuffering(int percent); + virtual void OnPlayerErrorOccurred(const Tizen::Media::PlayerErrorReason r); + virtual void OnPlayerInterrupted(void); + virtual void OnPlayerReleased(void); + +private: + static const int ID_BUTTON_OK = 101; + + Tizen::Media::Player* __pPlayer; + Tizen::Ui::Controls::OverlayPanel* __pOverlayPanel; +}; + * @endcode + * + * @code +//Sample code for OverlayPanelSampleForm.cpp +#include +#include "OverlayPanelSampleForm.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Media; +using namespace Tizen::Ui::Controls; + +OverlayPanelSampleForm::OverlayPanelSampleForm(void) +{ +} + +OverlayPanelSampleForm::~OverlayPanelSampleForm(void) +{ +} + +bool +OverlayPanelSampleForm::Initialize(void) +{ + Construct(FORM_STYLE_NORMAL); + return true; +} + +result +OverlayPanelSampleForm::OnInitializing(void) +{ + // Set bounds of overlay panel + Rectangle overlayPanelBounds(10, 10, GetClientAreaBounds().width - 20, 500); + + // Evaluate bounds + bool isModifiedBounds = false; + result r = OverlayPanel::EvaluateBounds(OVERLAY_PANEL_EVAL_OPT_GREATER_THAN, overlayPanelBounds, isModifiedBounds); + + // Creates an instance of overlay panel + __pOverlayPanel = new OverlayPanel(); + __pOverlayPanel->Construct(overlayPanelBounds); + AddControl(__pOverlayPanel); + + // Gets a background buffer info + BufferInfo bufferinfo; + __pOverlayPanel->GetBackgroundBufferInfo(bufferinfo); + + // Gets a video file path (/res/video.mp4) + String videoFilePath = App::GetInstance()->GetAppResourcePath() + L"video.mp4"; + + // Creates an instance of Player + __pPlayer = new Player(); + __pPlayer->Construct(*this, &bufferinfo); + __pPlayer->OpenFile(videoFilePath); + __pPlayer->Play(); + + // Creates an instance of Button + Button *pButton = new Button(); + pButton->Construct(Rectangle(10, 10, 300, 100)); + pButton->SetText(L"Resize & Rotate"); + pButton->SetActionId(ID_BUTTON_OK); + pButton->AddActionEventListener(*this); + __pOverlayPanel->AddControl(pButton); + + return r; +} + +result +OverlayPanelSampleForm::OnTerminating(void) +{ + result r = E_SUCCESS; + + // Deallocates controls + if (__pPlayer) + { + __pPlayer->Close(); + delete __pPlayer; + } + + return r; +} + +void +OverlayPanelSampleForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId) +{ + switch(actionId) + { + case ID_BUTTON_OK: + { + //Modify renderer size & Rotate renderer + __pOverlayPanel->SetRenderSize(Dimension(400, 400)); + __pOverlayPanel->SetRendererRotation(OverlayPanel::ROTATION_270); + } + break; + default: + break; + } +} + +// IPlayerEventListener implementation +void +OverlayPanelSampleForm::OnPlayerOpened(result r) +{ + // .... +} + +void +OverlayPanelSampleForm::OnPlayerEndOfClip(void) +{ + // .... +} + +void +OverlayPanelSampleForm::OnPlayerSeekCompleted(result r) +{ + // .... +} + +void +OverlayPanelSampleForm::OnPlayerBuffering(int percent) +{ + // .... +} + +void +OverlayPanelSampleForm::OnPlayerErrorOccurred(const PlayerErrorReason r) +{ + // .... +} + +void +OverlayPanelSampleForm::OnPlayerInterrupted(void) +{ + // .... +} + +void +OverlayPanelSampleForm::OnPlayerReleased(void) +{ + // .... +} + * @endcode + */ + +class _OSP_EXPORT_ OverlayPanel + : public Tizen::Ui::Controls::Panel +{ +public: + /** + * @enum Rotation + * + * Defines the various rotation options. + * + * @since 2.1 + */ + enum Rotation + { + ROTATION_NONE, /**< No rotation*/ + ROTATION_90, /**< The 90 degree rotation */ + ROTATION_180, /**< The 180 degree rotation */ + ROTATION_270, /**< The 270 degree rotation */ + ROTATION_NONE_LR, /**< The horizontal mirroring */ + ROTATION_NONE_UD, /**< The vertical mirroring */ + ROTATION_90_LR, /**< The 90 degree rotation with horizontal mirroring */ + ROTATION_90_UD, /**< The 90 degree rotation with vertical mirroring */ + ROTATION_180_LR, /**< The 180 degree rotation with horizontal mirroring */ + ROTATION_180_UD, /**< The 180 degree rotation with vertical mirroring */ + ROTATION_270_LR, /**< The 270 degree rotation with horizontal mirroring */ + ROTATION_270_UD, /**< The 270 degree rotation with vertical mirroring */ + ROTATION_MAX + }; + + /** + * @enum BufferPixelFormat + * + * Defines the pixel formats. + * + * @since 2.1 + */ + enum BufferPixelFormat + { + BUFFER_PIXEL_FORMAT_ARGB8888, /**< The ARGB8888 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 */ + }; + + /** + * This is the default constructor for this class. @n + * 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.1 + */ + OverlayPanel(void); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.1 + */ + virtual ~OverlayPanel(void); + + /** + * Initializes this instance of %OverlayPanel at the specified rectangle. + * + * @since 2.1 + * + * @return An error code + * @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_INVALID_ARG A specified input parameter @c 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. + * - 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 Container + */ + result Construct(const Tizen::Graphics::Rectangle& rect); + + /** + * Initializes this instance of %OverlayPanel at the specified rectangle. + * + * @since 2.1 + * + * @return An error code + * @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_INVALID_ARG A specified input parameter @c 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. + * - 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 Container + */ + result Construct(const Tizen::Graphics::FloatRectangle& rect); + + /** + * Sets the rotation of the input buffer. @n + * + * @since 2.1 + * + * @param[in] rotation The rotation + */ + void SetRendererRotation(OverlayPanel::Rotation rotation); + + /** + * @if OSPDEPREC + * Changes the size of the displayed renderer. + * + * @brief [Deprecated] + * @deprecated This method is deprecated. Instead of using this class, use the %OverlayRegion class, that supports video playback and + * camera preview. + * @since 2.0 + * + * @param[in] dim The dimension of the window to draw + * + * @endif + */ + void SetRendererSize(Tizen::Graphics::Dimension& dim); + + /** + * Changes the size of the displayed renderer. + * + * @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. + * @remarks + * - A %OverlayPanel becomes displayable only after it has been added to a form. + * - 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)); + * AddControl(pOverlayPanel); + * + * //... + * result r = pOverlayPanel->SetRenderSize(Dimension(300, 200)); + * //... + * @endcode + */ + result SetRenderSize(const Tizen::Graphics::Dimension& dim); + + /** + * Changes the size of the displayed renderer. + * + * @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. + * @remarks + * - A %OverlayPanel becomes displayable only after it has been added to a form. + * - 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)); + * AddControl(pOverlayPanel); + * + * //... + * result r = pOverlayPanel->SetRenderSize(FloatDimension(300.0, 200.0)); + * //... + * @endcode + */ + result SetRenderSize(const Tizen::Graphics::FloatDimension& dim); + + /** + * Sets the input buffer. + * + * @since 2.1 + * + * @param[in] destDim The dimension of the window to draw + * @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. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @exception E_SYSTEM A system error has occurred. + * @exception E_UNSUPPORTED_FORMAT The specified pixel format is not supported. + * @remarks Control::Invalidate() methods must be called to properly display the input buffer. + */ + result SetInputBuffer(const Tizen::Graphics::Dimension& destDim, const Tizen::Base::ByteBuffer& srcBuffer, const Tizen::Graphics::Dimension& srcDim, BufferPixelFormat srcFormat); + + /** + * Sets the input buffer. + * + * @since 2.1 + * + * @param[in] destDim The dimension of the window to draw + * @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. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @exception E_SYSTEM A system error has occurred. + * @exception E_UNSUPPORTED_FORMAT The specified pixel format is not supported. + * @remarks Control::Invalidate() methods must be called to properly display the input buffer. + */ + result SetInputBuffer(const Tizen::Graphics::FloatDimension& destDim, const Tizen::Base::ByteBuffer& srcBuffer, const Tizen::Graphics::Dimension& srcDim, BufferPixelFormat srcFormat); + + /** + * Gets the information of the background buffer. + * + * @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. + * @remarks Currently, this method provides buffer information except the pointer of the RGB color buffer. @n + * Therefore, info.pPixels is always assigned @c null. + */ + result GetBackgroundBufferInfo(Tizen::Graphics::BufferInfo& info) const; + + /** + * @if OSPDEPREC + * Sets the aspect ratio of the renderer. + * + * @brief [Deprecated] + * @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 + * @remarks This method has no effects for hardware accelerated GL backend. + * @endif + */ + void SetRendererAspectRatio(bool fix); + + /** + * @if OSPDEPREC + * Gets the masking color of this control. + * + * @brief [Deprecated] + * @deprecated This method is deprecated because masking color does not exist on %OverlayPanel any more. + * @remarks Do not call this method. It is not supported. + * @since 2.0 + * + * @return Always returns Tizen::Graphics::Color(0x00000000) + * @endif + */ + Tizen::Graphics::Color GetMaskingColor(void) const; + + /** + * Evaluates and returns the valid position and size that are closest to the specified bounds. + * + * @since 2.1 + * + * @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. + * @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. + * @remarks + * - 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. + * - The specific error code can be accessed using the GetLastResult() method. + */ + static result EvaluateBounds(OverlayPanelEvaluationOption option, Tizen::Graphics::Rectangle& rect, bool& modified); + + /** + * Evaluates and returns the valid position and size that are closest to the specified bounds. + * + * @since 2.1 + * + * @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. + * @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. + * @remarks + * - 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. + * - The specific error code can be accessed using the GetLastResult() method. + */ + static result EvaluateBounds(OverlayPanelEvaluationOption option, Tizen::Graphics::FloatRectangle& rect, bool& modified); + + /** + * Gets the BufferPixelFormat list for the %OverlayPanel class. @n + * Each list item has a Tizen::UI::Controls::OverlayPanel::BufferPixelFormat value. + * + * @since 2.1 + * + * @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 + * @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 is better to use a proper pixel format. + */ + static Tizen::Base::Collection::IListT* GetSupportedBufferPixelFormatListN(void); + + /** + * Gets the width unit. @n + * Only a multiple of this value can be allowed as the width of an overlay panel. + * + * @since 2.1 + * + * @return The value of width + */ + static int GetWidthUnit(void); + + /** + * Gets the height unit. @n + * Only a multiple of this value can be allowed as the height of an overlay panel. + * + * @since 2.1 + * + * @return The value of the height + */ + static int GetHeightUnit(void); + + /** + * Gets the maximum count of overlay panel that can be used simultaneously per application. + * + * @since 2.1 + * + * @return The maximum count of overlay panel that can be used simultaneously per application + */ + static int GetMaxCount(void); + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + OverlayPanel(const OverlayPanel& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + OverlayPanel& operator =(const OverlayPanel& rhs); +}; // OverlayPanel + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_OVERLAY_PANEL_H_ + diff --git a/inc/FUiCtrlOverlayRegion.h b/inc/FUiCtrlOverlayRegion.h new file mode 100644 index 0000000..7c592fc --- /dev/null +++ b/inc/FUiCtrlOverlayRegion.h @@ -0,0 +1,535 @@ +// +// 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 FUiCtrlOverlayRegion.h + * @brief This is the header file for the %OverlayRegion class. + * + * This header file contains the declarations of the %OverlayRegion class. + */ + +#ifndef _FUI_CTRL_OVERLAY_REGION_H_ +#define _FUI_CTRL_OVERLAY_REGION_H_ + +#include +#include + +namespace Tizen { namespace Base +{ +class ByteBuffer; +}} // Tizen::Base + +namespace Tizen { namespace Graphics +{ +class Point; +class Dimension; +class Rectangle; +class FloatRectangle; +class BufferInfo; +}} // Tizen::Graphics + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @enum OverlayRegionBufferPixelFormat + * + * Defines the pixel formats. + * + * @since 2.0 + */ +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_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. +}; + +/** + * @enum OverlayRegionType + * + * Defines the type of an overlay region. + * + * @since 2.0 + */ +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 */ + 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. +}; + +/** + * @enum OverlayRegionEvaluationOption + * + * Defines the option for evaluating the bounds of an overlay region. + * + * @since 2.0 + */ +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 the input bounds */ +}; + + +/** + * @class OverlayRegion + * @brief This class is an implementation of an %OverlayRegion. + * + * @since 2.0 + * + * @final This class is not intended for extension. + * + * The %OverlayRegion class displays a region of an overlay surface, which is used to play back a video or show the camera preview. + * + * For more information on the class features, see OverlayRegion. + * + * The following example demonstrates how to use the %OverlayRegion class. + * @code +//Sample code for OverlayRegionSampleForm.h +#include +#include +#include + +class OverlayRegionSampleForm + : public Tizen::Ui::Controls::Form + , public Tizen::Media::IPlayerEventListener +{ +public: + OverlayRegionSampleForm(void); + virtual ~OverlayRegionSampleForm(void); + + bool Initialize(void); + virtual result OnInitializing(void); + virtual result OnTerminating(void); + + // IPlayerEventListener + virtual void OnPlayerOpened(result r); + virtual void OnPlayerEndOfClip(void); + virtual void OnPlayerSeekCompleted(result r); + virtual void OnPlayerBuffering(int percent); + virtual void OnPlayerErrorOccurred(const Tizen::Media::PlayerErrorReason r); + virtual void OnPlayerInterrupted(void); + virtual void OnPlayerReleased(void); + +private: + Tizen::Ui::Controls::Panel* __pOverlayRegionSamplePanel; + Tizen::Ui::Controls::OverlayRegion*__pOverlayRegion; + Tizen::Media::Player* __pPlayer; +}; + * @endcode + * + * @code +//Sample code for OverlayRegionSampleForm.cpp +#include +#include "OverlayRegionSampleForm.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Media; +using namespace Tizen::Ui::Controls; + +OverlayRegionSampleForm::OverlayRegionSampleForm(void) + : __pOverlayRegionSamplePanel(null) + , __pOverlayRegion(null) + , __pPlayer(null) +{ +} + +OverlayRegionSampleForm::~OverlayRegionSampleForm(void) +{ +} + +bool +OverlayRegionSampleForm::Initialize(void) +{ + Construct(FORM_STYLE_NORMAL); + return true; +} + +result +OverlayRegionSampleForm::OnInitializing(void) +{ + result r = E_SUCCESS; + + // Sets an overlay region area + int widthVideo = 480; + int HeightVideo = 320; + int positionX = (GetClientAreaBounds().width - 480) / 2; + int positionY = (GetClientAreaBounds().width - 480) / 2; + Rectangle overlayRectangle(positionX, positionY, widthVideo, HeightVideo); + + // Evaluates bounds of overlay region + bool modified = false; + OverlayRegion::EvaluateBounds(OVERLAY_REGION_EVALUATION_OPTION_GREATER_THAN, overlayRectangle, modified); + + // Gets an overlay region + __pOverlayRegion = GetOverlayRegionN(overlayRectangle, OVERLAY_REGION_TYPE_NORMAL); + + // Gets buffer information + BufferInfo bufferInfo; + __pOverlayRegion->GetBackgroundBufferInfo(bufferInfo); + + // Gets a video file path + String videoFilePath = App::GetInstance()->GetAppResourcePath() + L"tizen.mp4"; + + // Creates an instance of Player + __pPlayer = new Player(); + __pPlayer->Construct(*this, &bufferInfo); + __pPlayer->SetLooping(true); + __pPlayer->OpenFile(videoFilePath); + __pPlayer->Play(); + + // Creates instaces of Button and Label and adds controls to the panel + Label* pLabel = new Label(); + pLabel->Construct(Rectangle(positionX, positionY, 400, 80),L"OverlayRegion Sample"); + pLabel->SetTextColor(Color::GetColor(COLOR_ID_RED)); + AddControl(pLabel); + + Button* pButton = new Button(); + pButton->Construct(Rectangle(positionX + widthVideo - 200, positionX + HeightVideo - 100, 180, 80),L"BUTTON"); + AddControl(pButton); + + return r; +} + +result +OverlayRegionSampleForm::OnTerminating(void) +{ + result r = E_SUCCESS; + + // Deallocates controls + if (__pPlayer) + { + r = __pPlayer->Close(); + delete __pPlayer; + } + + return r; +} + +// IPlayerEventListener implementation +void +OverlayRegionSampleForm::OnPlayerOpened(result r) +{ + // .... +} + +void +OverlayRegionSampleForm::OnPlayerEndOfClip(void) +{ + // .... +} + +void +OverlayRegionSampleForm::OnPlayerSeekCompleted(result r) +{ + // .... +} + +void +OverlayRegionSampleForm::OnPlayerBuffering(int percent) +{ + // .... +} + +void +OverlayRegionSampleForm::OnPlayerErrorOccurred(const PlayerErrorReason r) +{ + // .... +} + +void +OverlayRegionSampleForm::OnPlayerInterrupted(void) +{ + // .... +} + +void +OverlayRegionSampleForm::OnPlayerReleased(void) +{ + // .... +} + * @endcode + */ +class _OSP_EXPORT_ OverlayRegion + : public Tizen::Base::Object +{ +public: + /** + * This is the destructor for this class. + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~OverlayRegion(void); + + /** + * Gets the position and size of the overlay region. + * + * @since 2.0 + * + * @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; + + /** + * Gets the position and size of the overlay region. + * + * @since 2.1 + * + * @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; + + /** + * Gets the position and size of the overlay region. + * + * @since 2.0 + * + * @param[out] x The x position of the top-left corner of the overlay region + * @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. + * + */ + void GetBounds(int& x, int& y, int& width, int& height) const; + + /** + * Gets the position and size of the overlay region. + * + * @since 2.1 + * + * @param[out] x The x position of the top-left corner of the overlay region + * @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. + * + */ + void GetBounds(float& x, float& y, float& width, float& height) const; + + /** + * Sets the input buffer. @n + * 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 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 + * + * @return An error code + * @param[in] srcBuffer The source buffer + * @param[in] srcDim The source dimension + * @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. + * @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 SetInputBuffer(const Tizen::Base::ByteBuffer& srcBuffer, const Tizen::Graphics::Dimension& srcDim, OverlayRegionBufferPixelFormat srcFormat); + + /** + * Gets the information related to the background buffer. + * + * @since 2.0 + * + * @return An error code + * @param[out] info The information of the input buffer + * @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 provides the buffer information, except the pointer of a color buffer. Therefore, info.pPixels is always assigned as @c null. + */ + result GetBackgroundBufferInfo(Tizen::Graphics::BufferInfo& info) const; + + /** + * Shows the overlay region on the screen. + * + * @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, that is, + * this control cannot be displayed. + * @exception E_SYSTEM A system error has occurred. + */ + result Show(void); + + /** + * Evaluates and returns the valid position and size that are closest to the specified bounds. + * + * @since 2.0 + * + * @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 + * The width and height of the input rectangle must be greater than @c 0. + * @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. + * @exception E_SYSTEM A system error has occurred. + * @remarks + * - 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 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); + + /** + * Evaluates and returns the valid position and size that are closest to the specified bounds. + * + * @since 2.1 + * + * @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 + * 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 A specified input parameter is invalid. + * @exception E_UNSUPPORTED_OPTION A specified input parameter is not supported. + * @exception E_SYSTEM A system error has occurred. + * @remarks + * - 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 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); + + /** + * Gets the value of the width. @n + * Only a multiple of this value can be allowed as the width of an overlay region. + * + * @since 2.0 + * + * @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. + */ + static int GetWidthUnit(void); + + /** + * Gets the value of the height. @n + * Only a multiple of this value can be allowed as the height of an overlay region. + * + * @since 2.0 + * + * @return The value of the height + * @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. + */ + static int GetHeightUnit(void); + + /** + * Gets the maximum count of overlay regions that can be used simultaneously per application. + * + * @since 2.0 + * + * @return The maximum count of overlay regions that can be used simultaneously per application + * @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. + */ + static int GetMaxCount(void); + + /** + * Gets the BufferPixelFormat list for the %OverlayRegion class. @n + * Each list item has a Tizen::UI::Controls::OverlayRegionBufferPixelFormat value. + * + * @since 2.0 + * + * @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. + * @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. + */ + static Tizen::Base::Collection::IListT< OverlayRegionBufferPixelFormat >* GetSupportedBufferPixelFormatListN(void); + +private: + // + // This default constructor is intentionally declared as private so that only the platform can create an instance. + // + // @since 2.0 + // + OverlayRegion(void); + + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + OverlayRegion(const OverlayRegion& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + OverlayRegion& operator =(const OverlayRegion& rhs); + +private: + class _OverlayRegionImpl * __pOverlayRegionImpl; + + friend class _OverlayRegionImpl; + +}; // OverlayRegion + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_OVERLAY_CONTROL_H_ diff --git a/inc/FUiCtrlPanel.h b/inc/FUiCtrlPanel.h new file mode 100644 index 0000000..45d1b39 --- /dev/null +++ b/inc/FUiCtrlPanel.h @@ -0,0 +1,348 @@ +// +// 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 FUiCtrlPanel.h + * @brief This is the header file for the %Panel class. + * + * This header file contains the declarations of the %Panel class. + */ + +#ifndef _FUI_CTRL_PANEL_H_ +#define _FUI_CTRL_PANEL_H_ + +#include +#include +#include +#include + +namespace Tizen {namespace Base +{ +class String; +}} //Tizen::Base + +namespace Tizen { namespace Ui +{ +class DataBindingContext; +}} //Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @class Panel + * @brief This class provides a %Panel, that is the simplest container. + * + * @since 2.0 + * + * The %Panel class displays a space where other UI elements can be placed. It is a concrete implementation of the Container class. + * + * For more information on the class features, see Panels. + * + * The following example demonstrates how to use the %Panel class. + * + * @code +// Sample code for PanelSample.h +#include + +class PanelSample + : public Tizen::Ui::Controls::Form +{ +public: + PanelSample(void) + : __pPanel(null){} + + bool Initialize(void); + virtual result OnInitializing(void); + +private: + Tizen::Ui::Controls::Panel* __pPanel; +}; + * @endcode + * + * @code +// Sample code for PanelSample.cpp +#include + +#include "PanelSample.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Ui::Controls; + +bool +PanelSample::Initialize(void) +{ + Construct(FORM_STYLE_NORMAL); + return true; +} + +result +PanelSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + // Creates an instance of Panel + __pPanel = new Panel(); + __pPanel->Construct(Rectangle(100, 200, 300, 300)); + __pPanel->SetBackgroundColor(Color(0x50, 0xFF, 0x38)); + + //Adds the panel to the form + AddControl(__pPanel); + + return r; +} + * @endcode + */ +class _OSP_EXPORT_ Panel + : public Tizen::Ui::Container +{ +// Lifecycle +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. + * + * @since 2.0 + * + */ + Panel(void); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + * + */ + virtual ~Panel(void); + + /** + * Initializes this instance of %Panel with the specified parameters. + * + * @since 2.0 + * + * @return An error code + * @param[in] rect The location and size of the %Panel control as an instance of Rectangle + * @param[in] groupStyle The group style of the %Panel control + * @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 specified group style determines the border look of the %Panel control. + * @see Container + */ + result Construct(const Tizen::Graphics::Rectangle& rect, GroupStyle groupStyle = GROUP_STYLE_NONE); + + /** + * Initializes this instance of %Panel with the specified parameters. + * + * @since 2.1 + * + * @return An error code + * @param[in] rect The location and size of the %Panel control as an instance of FloatRectangle + * @param[in] groupStyle The group style of the %Panel control + * @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 specified group style determines the border look of the %Panel control. + * @see Container + */ + result Construct(const Tizen::Graphics::FloatRectangle& rect, GroupStyle groupStyle = GROUP_STYLE_NONE); + + /** + * Initializes this instance of %Panel 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 @n + * the density folder that corresponds to the current screen size category "res/screen-size-normal/" folder. + * + * @since 2.0 + * + * @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 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); + + /** + * Initializes this instance of %Panel with the specified parameters. + * + * @since 2.0 + * + * @return An error code + * @param[in] layout The layout for both the portrait and landscape modes + * @param[in] rect The location and size of the %Panel control as an instance of Rectangle + * @param[in] groupStyle The table view style of the %Panel control + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. @n + * 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 Container + */ + result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::Rectangle& rect, GroupStyle groupStyle = GROUP_STYLE_NONE); + + /** + * Initializes this instance of %Panel with the specified parameters. + * + * @since 2.1 + * + * @return An error code + * @param[in] layout The layout for both the portrait and landscape modes + * @param[in] rect The location and size of the %Panel control as an instance of FloatRectangle + * @param[in] groupStyle The table view style of the %Panel control + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. @n + * 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 Container + */ + result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::FloatRectangle& rect, GroupStyle groupStyle = GROUP_STYLE_NONE); + + /** + * Initializes this instance of %Panel with the specified layouts, rectangular region, and group style. + * + * @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 %Panel control as an instance of Rectangle + * @param[in] groupStyle The table view style of the %Panel control + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. @n + * 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 Container + */ + result Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, const Tizen::Graphics::Rectangle& rect, GroupStyle groupStyle = GROUP_STYLE_NONE); + + /** + * Initializes this instance of %Panel with the specified layouts, rectangular region, and group style. + * + * @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 %Panel control as an instance of FloatRectangle + * @param[in] groupStyle The table view style of the %Panel control + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. @n + * 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 Container + */ + result Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, const Tizen::Graphics::FloatRectangle& rect, GroupStyle groupStyle = GROUP_STYLE_NONE); + + /** + * Gets the background color of the %Panel control. + * + * @since 2.0 + * + * @return The background color + */ + Tizen::Graphics::Color GetBackgroundColor(void) const; + + /** + * Sets the background color of this control. + * + * @since 2.0 + * + * @param[in] color The background color + */ + void SetBackgroundColor(const Tizen::Graphics::Color& color); + + /** + * @if OSPDEPREC + * Enables the %Panel control to be composited to the screen buffer. + * + * @brief [Deprecated] + * @deprecated This method is deprecated because the changing composition mode is not allowed any more. + * @since 2.0 + * + * @return An error code + * @param[in] composite Set to @c true to make the %Panel control composited to the screen buffer, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @remarks In case a %Panel is transparent and nothing is drawn on the canvas of the %Panel control, the graphic performance can be improved if the + * compositing of the %Panel control to the screen buffer is disabled. @n + * By default, compositing is enabled. For example, if a Form control has a %Panel that has a List, by disabling the compositing of the + * %Panel, the scroll performance of the %List will improve. + * @endif + */ + result SetCompositeEnabled(bool composite); + + /** + * @if OSPDEPREC + * Checks whether the %Panel control is composite to the screen buffer. + * + * @brief [Deprecated] + * @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 + * else @c false + * @endif + */ + bool IsCompositeEnabled(void) const; + + /** + * Gets the data binding context. + * + * @since 2.0 + * + * @return The data binding context + * @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. + */ + DataBindingContext* GetDataBindingContextN(void) const; + +protected: + + friend class _PanelImpl; + + // Reserved virtual methods for later extension + + // The following methods are reserved and may change its name at any time without prior notice. + virtual void Panel_Reserved1(void) {} + + virtual void Panel_Reserved2(void) {} + + virtual void Panel_Reserved3(void) {} + +private: + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + Panel(const Panel& rhs); + + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + Panel& operator =(const Panel& rhs); + +}; // Panel + +}}} //Tizen::Ui::Controls + +#endif // _FUI_CTRL_PANEL_H_ + diff --git a/inc/FUiCtrlPopup.h b/inc/FUiCtrlPopup.h new file mode 100644 index 0000000..aa894f7 --- /dev/null +++ b/inc/FUiCtrlPopup.h @@ -0,0 +1,603 @@ +// +// 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 FUiCtrlPopup.h + * @brief This is the header file for the %Popup class. + * + * This header file contains the declarations of the %Popup class. + */ + +#ifndef _FUI_CTRL_POPUP_H_ +#define _FUI_CTRL_POPUP_H_ + +#include + +namespace Tizen { namespace Ui +{ +class DataBindingContext; +}} // Tizen::Ui + + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @class Popup + * @brief This class displays a popup on the top of the screen. + * + * @since 2.0 + * + * The %Popup class displays messages to alert the user of important changes, to request confirmation for a significant task, or to + * serve as a warning. It is an implementation of the Window class. + * + * For more information on the class features, + * see Popup and MessageBox. + * + * @see Tizen::Ui::Window + * + * The following example demonstrates how to use the %Popup class. + * + * @code +// Sample code for PopupSample.h +#include + +class PopupEventListener + : public Tizen::Ui::IPropagatedKeyEventListener +{ + // key events for back-key + virtual bool OnKeyPressed(Tizen::Ui::Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo) { return false; }; + virtual bool OnKeyReleased(Tizen::Ui::Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo); + virtual bool OnPreviewKeyPressed(Tizen::Ui::Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo) { return false; }; + virtual bool OnPreviewKeyReleased(Tizen::Ui::Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo) { return false; }; + virtual bool TranslateKeyEventInfo(Tizen::Ui::Control& source, Tizen::Ui::KeyEventInfo& keyEventInfo) { return false; }; + +}; + +class PopupSample + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::IActionEventListener +{ +public: + PopupSample(void) + : __pPopup(null){} + + bool Initialize(void); + void ShowPopup(void); + void HidePopup(void); + virtual result OnInitializing(void); + virtual result OnTerminating(void); + virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId); + +private: + static const int ID_BUTTON_OPEN_POPUP = 501; + static const int ID_BUTTON_CLOSE_POPUP = 502; + + Tizen::Ui::Controls::Popup* __pPopup; + PopupEventListener* __pPopupListener; +}; + * @endcode + * + * @code +// Sample code for PopupSample.cpp +#include + +#include "PopupSample.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Ui; + +bool +PopupEventListener::OnKeyReleased(Control& source, const KeyEventInfo& keyEventInfo) +{ + KeyCode key = keyEventInfo.GetKeyCode(); + if (key == KEY_BACK || key == KEY_ESC) + { + Popup* pPopup = static_cast(&source); + pPopup->SetShowState(false); + pPopup->Invalidate(true); + } + + return false; +} + +bool +PopupSample::Initialize(void) +{ + Construct(FORM_STYLE_NORMAL); + return true; +} + +result +PopupSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + __pPopupListener = new PopupEventListener; + + // Creates an instance of Popup + __pPopup = new Popup; + __pPopup->Construct(true, Dimension(600,800)); + __pPopup->SetTitleText(L"Popup Sample"); + + // Creates an instance of Button to close the popup. + Button* pCloseButton = new Button(); + pCloseButton->Construct(Rectangle(10, 10, 250, 80), L"Close Popup"); + pCloseButton->SetActionId(ID_BUTTON_CLOSE_POPUP); + pCloseButton->AddActionEventListener(*this); + + // Adds the button to the popup + __pPopup->AddControl(pCloseButton); + __pPopup->SetPropagatedKeyEventListener(__pPopupListener); + + // Creates an instance of Button to open the popup. + Button* pOpenButton = new Button(); + pOpenButton->Construct(Rectangle(10, 10, 250, 60), L"Open Popup"); + pOpenButton->SetActionId(ID_BUTTON_OPEN_POPUP); + pOpenButton->AddActionEventListener(*this); + + // Adds the button to the form + AddControl(pOpenButton); + + return r; +} + +void +PopupSample::ShowPopup(void) +{ + __pPopup->SetShowState(true); + __pPopup->Show(); +} + +void +PopupSample::HidePopup(void) +{ + __pPopup->SetShowState(false); + Invalidate(true); +} + +result +PopupSample::OnTerminating(void) +{ + result r = E_SUCCESS; + + // Deallocates the __pPopup + __pPopup->Destroy(); + delete __pPopupListener; + + return r; +} + +void +PopupSample::OnActionPerformed(const Control& source, int actionId) +{ + switch (actionId) + { + case ID_BUTTON_OPEN_POPUP: + { + ShowPopup(); + } + break; + case ID_BUTTON_CLOSE_POPUP: + { + HidePopup(); + } + break; + default: + break; + } +} + +* @endcode +*/ + +class _OSP_EXPORT_ Popup + : public Tizen::Ui::Window +{ +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. + * + * @since 2.0 + */ + Popup(void); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~Popup(void); + + /** + * Initializes this instance of %Popup with the specified dimensions. + * + * @since 2.0 + * + * @return An error code + * @param[in] hasTitle Set to @c true if the %Popup control has a title, @n + * else @c false + * @param[in] dim The size of the %Popup control @n + * The optimal size of the control is defined in + * Optimal Size of UI Controls. + * @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 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. + */ + result Construct(bool hasTitle, const Tizen::Graphics::Dimension& dim); + + /** + * Initializes this instance of %Popup with the specified dimensions. + * + * @since 2.1 + * + * @return An error code + * @param[in] hasTitle Set to @c true if the %Popup control has a title, @n + * else @c false + * @param[in] dim The size of the %Popup control @n + * The optimal size of the control is defined in + * Optimal Size of UI Controls. + * @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 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. + */ + result Construct(bool hasTitle, const Tizen::Graphics::FloatDimension& dim); + + /** + * 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. + * + * @since 2.0 + * + * @return An error code + * @param[in] resourceId The resource ID describing the %Popup 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 + * - 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); + + /** + * Initializes this instance of %Popup with the specified layout and dimensions. + * + * @since 2.0 + * + * @return An error code + * @param[in] layout The layout for both the portrait and landscape mode + * @param[in] hasTitle Set to @c true if the %Popup control should have a title, @n + * else @c false + * @param[in] dim The size of the %Popup control @n + * The optimal size of the control is defined in + * Optimal Size of UI Controls. + * @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. + * @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. + */ + result Construct(const Tizen::Ui::Layout& layout, bool hasTitle, const Tizen::Graphics::Dimension& dim); + + /** + * Initializes this instance of %Popup with the specified layout and dimensions. + * + * @since 2.1 + * + * @return An error code + * @param[in] layout The layout for both the portrait and landscape mode + * @param[in] hasTitle Set to @c true if the %Popup control should have a title, @n + * else @c false + * @param[in] dim The size of the %Popup control @n + * The optimal size of the control is defined in + * Optimal Size of UI Controls. + * @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. + * @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. + */ + result Construct(const Tizen::Ui::Layout& layout, bool hasTitle, const Tizen::Graphics::FloatDimension& dim); + + /** + * Initializes this instance of %Popup with the specified layouts and dimensions. + * + * @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] hasTitle Set to @c true if this %Popup control should have a title, @n + * else @c false + * @param[in] dim The size of the %Popup control @n + * The optimal size of the control is defined in + * Optimal Size of UI Controls. + * @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. + * @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. + */ + result Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, bool hasTitle, const Tizen::Graphics::Dimension& dim); + + /** + * Initializes this instance of %Popup with the specified layouts and dimensions. + * + * @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] hasTitle Set to @c true if this %Popup control should have a title, @n + * else @c false + * @param[in] dim The size of the %Popup control @n + * The optimal size of the control is defined in + * Optimal Size of UI Controls. + * @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. + * @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. + */ + result Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, bool hasTitle, const Tizen::Graphics::FloatDimension& dim); + + /** + * 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. + * @remarks + * - Do not call this method from Tizen::App::App::OnAppInitializing(). + * - To show a %Popup properly from Tizen::Ui::Controls::Form::OnInitializing(), theForm must + * have been successfully drawn before the DoModal() method. + */ + result DoModal(int& modalResult); + + /** + * Closes the modal window. @n + * + * @since 2.0 + * @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. + */ + result EndModal(int modalResult); + + /** + * Sets the title of the %Popup control. + * + * @since 2.0 + * + * @return An error code + * @param[in] title The title to set + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + virtual result SetTitleText(const Tizen::Base::String& title); + + /** + * Gets the title of the %Popup control. + * + * @since 2.0 + * + * @return The title of the %Popup control + */ + Tizen::Base::String GetTitleText(void) const; + + /** + * Gets the bounds of the client area. + * + * @since 2.0 + * + * @return The bounds of the client area in a Tizen::Graphics::Rectangle instance + */ + Tizen::Graphics::Rectangle GetClientAreaBounds(void) const; + + /** + * Gets the bounds of the client area. + * + * @since 2.1 + * + * @return The bounds of the client area in a Tizen::Graphics::FloatRectangle instance + */ + Tizen::Graphics::FloatRectangle GetClientAreaBoundsF(void) const; + + /** + * Creates and returns a graphics canvas whose bounds (position and size) are equal to the bounds of the client area of the %Popup control. + * + * @since 2.0 + * + * @return The graphic canvas of the %Popup control, @n + * else @c null if an error occurs + * @exception E_SUCCESS The method is successful. + * @exception E_RESOURCE_UNAVAILABLE The required resource is currently unavailable. + * @remarks + * - 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. + * - The specific error code can be accessed using the GetLastResult() method. + */ + Tizen::Graphics::Canvas* GetClientAreaCanvasN(void) const; + + /** + * Translates the specified position to the client coordinates. + * + * @since 2.0 + * + * @return The position in relative to the top-left corner of the client-area, @n + * else @c (-1,-1) if the instance is invalid + * @param[in] position The position relative to the top-left corner of the %Popup control + * @see TranslateFromClientAreaPosition() + */ + Tizen::Graphics::Point TranslateToClientAreaPosition(const Tizen::Graphics::Point& position) const; + + /** + * Translates the specified position to the client coordinates. + * + * @since 2.1 + * + * @return The position in relative to the top-left corner of the client-area, @n + * else @c (-1.0f,-1.0f) if the instance is invalid + * @param[in] position The position relative to the top-left corner of the %Popup control + * @see TranslateFromClientAreaPositionF() + */ + Tizen::Graphics::FloatPoint TranslateToClientAreaPosition(const Tizen::Graphics::FloatPoint& position) const; + + /** + * Translates the specified client position to the control coordinate. + * + * @since 2.0 + * + * @return The position in relative to the top-left corner of the %Popup control, @n + * else @c (-1,-1) if the instance is invalid + * @param[in] clientPosition The position relative to the top-left corner of the client area + * @see TranslateToClientAreaPosition() + */ + Tizen::Graphics::Point TranslateFromClientAreaPosition(const Tizen::Graphics::Point& clientPosition) const; + + /** + * Translates the specified client position to the control coordinate. + * + * @since 2.1 + * + * @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 TranslateToClientAreaPosition() + */ + Tizen::Graphics::FloatPoint TranslateFromClientAreaPosition(const Tizen::Graphics::FloatPoint& clientPosition) const; + + /** + * Gets the color of the %Popup control. + * + * @since 2.0 + * + * @return The 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. + */ + Tizen::Graphics::Color GetColor(void) const; + + /** + * Sets the color of the %Popup control. + * + * @since 2.0 + * + * @return An error code + * @param[in] color The color to set + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetColor(const Tizen::Graphics::Color& color); + + /** + * Gets the title text color of the %Popup control. + * + * @since 2.0 + * + * @return The 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. + */ + Tizen::Graphics::Color GetTitleTextColor(void) const; + + /** + * Sets the title text color of the %Popup control. + * + * @since 2.0 + * + * @return An error code + * @param[in] color The title text color + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetTitleTextColor(const Tizen::Graphics::Color& color); + + /** + * Gets the data binding context. + * + * @since 2.0 + * + * @return The data binding context + * @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. + */ + DataBindingContext* GetDataBindingContextN(void) const; + +protected: + friend class _PopupImpl; + + /** + * The following methods are reserved and may change its name at any time without + * prior notice. + */ + virtual void Popup_Reserved1(void) { } + virtual void Popup_Reserved2(void) { } + virtual void Popup_Reserved3(void) { } + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + Popup(const Popup& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + Popup& operator =(const Popup& rhs); + +}; // Popup + + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_POPUP_H_ diff --git a/inc/FUiCtrlProgress.h b/inc/FUiCtrlProgress.h new file mode 100644 index 0000000..1261c6b --- /dev/null +++ b/inc/FUiCtrlProgress.h @@ -0,0 +1,343 @@ +// +// 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 FUiCtrlProgress.h + * @brief This is the header file for the %Progress class. + * + * This header file contains the declarations of the %Progress class and its helper classes. + */ + +#ifndef _FUI_CTRL_PROGRESS_H_ +#define _FUI_CTRL_PROGRESS_H_ + +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @class Progress + * @brief This class is an implementation of a %Progress control. + * + * @since 2.0 + * + * The %Progress class displays the progress of a lengthy operation in a progress bar. + * + * For more information on the class features, see Progress. + * + * The following example demonstrates how to use the %Progress class. + * + * @code +// Sample code for ProgressSample.h +#include + +class ProgressSample + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::IActionEventListener +{ +public: + ProgressSample(void) + : __pProgress(null) + , __pValue(0){} + + bool Initialize(void); + virtual result OnInitializing(void); + virtual void OnActionPerformed(const Tizen::Ui::Control&, int); + +private: + static const int ID_BUTTON_CHECKED = 100; + + Tizen::Ui::Controls::Progress* __pProgress; + int __pValue; +}; + * @endcode + * + * @code +// Sample code for ProgressSample.cpp +#include + +#include "ProgressSample.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Ui::Controls; + +bool +ProgressSample::Initialize(void) +{ + Construct(FORM_STYLE_NORMAL); + return true; +} + +result +ProgressSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + // Creates an instance of Progress + __pProgress = new Progress(); + __pProgress->Construct(Rectangle(50, 50, GetClientAreaBounds().width - 100, 100), 0, 100); + __pProgress->SetValue(__pValue); + + // Creates an instance of pButton to control progress value + Button* pButton = new Button(); + pButton->Construct(Rectangle(50, 200, 150, 100), L"Here"); + pButton->SetActionId(ID_BUTTON_CHECKED); + pButton->AddActionEventListener(*this); + + // Adds the __pProgress and the pButton to the form + AddControl(__pProgress); + AddControl(pButton); + + return r; +} + +void +ProgressSample::OnActionPerformed(const Control& source, int actionId) +{ + switch (actionId) + { + case ID_BUTTON_CHECKED : + { + if (__pValue >= 100) + { + __pValue = 0; + } + else + { + __pValue += 10; + } + __pProgress->SetValue(__pValue); + __pProgress->Invalidate(true); + } + break; + default: + break; + } +} + * @endcode + * + */ +class _OSP_EXPORT_ Progress + : public Tizen::Ui::Control +{ +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. + * + * @since 2.0 + */ + Progress(void); + + + /** + * 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 ~Progress(void); + + + /** + * Initializes this instance of %Progress with the specified parameters. + * + * @since 2.0 + * + * @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 + * The optimal size of the control is defined in + * Optimal Size of UI Controls. + * @param[in] minValue The minimum value of the current instance of %Progress + * @param[in] maxValue The maximum value of the current instance of %Progress + * @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 + * 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 maximum size. + */ + result Construct(const Tizen::Graphics::Rectangle& rect, int minValue, int maxValue); + + /** + * Initializes this instance of %Progress with the specified parameters. + * + * @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 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] minValue The minimum value of the current instance of %Progress + * @param[in] maxValue The maximum value of the current instance of %Progress + * @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 + * 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 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 @c maxValue. The same applies for @c minValue. + * + * @since 2.0 + * + * @param[in] value The current progress value + */ + void SetValue(int value); + + + /** + * Sets the minimum and maximum value of the %Progress control. + * + * @since 2.0 + * + * @return An error code + * @param[in] minValue The minimum value of the current instance of %Progress + * @param[in] maxValue The maximum value of the current instance of %Progress + * @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 are not positive. + * @exception E_SYSTEM A system error has occurred. + */ + result SetRange(int minValue, int maxValue); + + + /** + * Gets the current value of the %Progress control. + * + * @since 2.0 + * + * @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 maximum value of the %Progress control. + * + * @since 2.0 + * + * @param[out] minValue The minimum value + * @param[out] maxValue The maximum value + */ + void GetRange(int& minValue, int& maxValue) const; + + + /** + * Gets the percent value of the %Progress control. + * + * @since 2.0 + * + * @return The progress as a percentage, @n + * else @c -1 if an error occurs + */ + int GetPercentComplete(void) const; + + + /** + * Sets the color of the bar. + * + * @since 2.0 + * + * @return An error code + * @param[in] color The color to set + * @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 SetBarColor(const Tizen::Graphics::Color& color); + + + /** + * Gets the color of the bar. + * + * @since 2.0 + * + * @return The color of the bar, @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. + */ + Tizen::Graphics::Color GetBarColor(void) const; + + + /** + * Sets the background color of the bar. + * + * @since 2.1 + * + * @param[in] barBackgroundColor The color to set + * @remarks The method ignores the alpha value of the @c color parameter and sets the alpha value to @c 255. + * @see GetBarBackgroundColor() + */ + void SetBarBackgroundColor(const Tizen::Graphics::Color& barBackgroundColor); + + /** + * Gets the background color of the bar. + * + * @since 2.1 + * + * @return The background color of the bar, @n + * else RGBA(0, 0, 0, 0) if an error occurs + * @remarks The specific error code can be accessed using the GetLastResult() method. + * @see SetBarBackgroundColor() + */ + Tizen::Graphics::Color GetBarBackgroundColor(void) const; + + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + Progress(const Progress& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + Progress& operator =(const Progress& rhs); + + friend class _ProgressImpl; + +}; // Progress + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_PROGRESS_H_ diff --git a/inc/FUiCtrlProgressPopup.h b/inc/FUiCtrlProgressPopup.h new file mode 100644 index 0000000..0cc440a --- /dev/null +++ b/inc/FUiCtrlProgressPopup.h @@ -0,0 +1,298 @@ +// +// 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 FUiCtrlProgressPopup.h +* @brief This is the header file for the %ProgressPopup class. +* +* This header file contains the declarations of the %ProgressPopup class. +*/ + +#ifndef _FUI_CTRL_PROGRESS_POPUP_H_ +#define _FUI_CTRL_PROGRESS_POPUP_H_ + + +#include + + +namespace Tizen { namespace Ui +{ +class IProgressPopupEventListener; +}} // Tizen::Ui + + +namespace Tizen { namespace Ui { namespace Controls +{ +/** + * @class ProgressPopup + * @brief This class defines the common behavior of a %ProgressPopup control. + * + * @since 2.0 + * + * 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 Window + * + * The following example demonstrates how to use the %ProgressPopup class. + * + * @code +// Sample code for ProgressPopupSample.h +#include + +class ProgressPopupSample + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::IProgressPopupEventListener + , public Tizen::Ui::IActionEventListener +{ +public: + ProgressPopupSample(void); + virtual ~ProgressPopupSample(void); + + virtual bool Initialize(void); + void ShowProgressPopup(void); + virtual result OnInitializing(void); + virtual result OnTerminating(void); + virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId); + + //IProgressPopupEventListener + virtual void OnProgressPopupCanceled(void); + +private: + static const int ID_BUTTON_PROGRESSPOPUP = 501; + + Tizen::Ui::Controls::ProgressPopup* __pProgressPopup; +}; + * @endcode + * + * @code +// Sample code for ProgressPopupSample.cpp +#include "ProgressPopupSample.h" + +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Graphics; + +ProgressPopupSample::ProgressPopupSample(void) + : __pProgressPopup(null) +{ +} + +ProgressPopupSample::~ProgressPopupSample(void) +{ +} + +bool +ProgressPopupSample::Initialize(void) +{ + Construct(FORM_STYLE_NORMAL); + return true; +} + +result +ProgressPopupSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + // Creates an instance of ProgressPopup + __pProgressPopup = new (std::nothrow) ProgressPopup(); + __pProgressPopup->Construct(true,false); + __pProgressPopup->SetTitleText(L"ProgressPopup Test"); + __pProgressPopup->SetText(L"Hello World!!"); + __pProgressPopup->AddProgressPopupEventListener(*this); + + // Creates an instance of Button to open the ProgressPopup. + Button* pButtonProgressPopup = new Button(); + pButtonProgressPopup->Construct(Rectangle(50, 50, 350, 100), L"Open ProgressPopup"); + pButtonProgressPopup->SetActionId(ID_BUTTON_PROGRESSPOPUP); + pButtonProgressPopup->AddActionEventListener(*this); + AddControl(pButtonProgressPopup); + + return r; +} + +result +ProgressPopupSample::OnTerminating(void) +{ + result r = E_SUCCESS; + + // Deallocates the __pProgressPopup + delete __pProgressPopup; + + return r; +} + +void +ProgressPopupSample::ShowProgressPopup(void) +{ + __pProgressPopup->SetShowState(true); + __pProgressPopup->Show(); +} + +void +ProgressPopupSample::OnActionPerformed(const Control& source, int actionId) +{ + switch (actionId) + { + case ID_BUTTON_PROGRESSPOPUP: + ShowProgressPopup(); + break; + default: + break; + } +} + +void +ProgressPopupSample::OnProgressPopupCanceled(void) +{ + __pProgressPopup->SetShowState(false); + Invalidate(true); +} + + * @endcode + */ +class _OSP_EXPORT_ ProgressPopup + : public Popup +{ +public: + /** + * The object is not fully constructed after this constructor is called. @n + * For full construction, the ProgressPopup::Construct() method must be called right after calling this constructor. + * + * @since 2.0 + */ + ProgressPopup(void); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~ProgressPopup(void); + + /** + * Initializes this instance of %ProgressPopup with the specified parameters. + * + * @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 + * @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. + * @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 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 @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); + + /** + * Sets the text of the %ProgressPopup window. + * + * @since 2.0 + * @return An error code + * @param[in] text The text to set + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + * @remarks If the %ProgressPopup window is constructed as transparent, the text is not shown. + */ + result SetText(const Tizen::Base::String& text); + + /** + * Gets the text of the %ProgressPopup window. + * + * @since 2.0 + * + * @return The text of the %ProgressPopup window, @n + * else an empty string if an error occurs + */ + Tizen::Base::String GetText(void) const; + + /** + * Adds a listener instance @n + * The added listener can listen to events on the given event dispatcher's context when they are fired. + * + * @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 is successful. + * @exception E_OBJ_ALREADY_EXIST The listener already exists. + * @see RemoveProgressPopupEventListener() + */ + result AddProgressPopupEventListener(Tizen::Ui::IProgressPopupEventListener& listener); + + /** + * Removes a listener instance. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * @return An error code + * @param[in] listener The event listener to remove @n + * The listener should be referring to a previously allocated instance which is passed as an argument to + * AddProgressPopupEventListener(). + * @exception E_SUCCESS This method is successful. + * @exception E_OBJ_NOT_FOUND The listener is not found. + */ + result RemoveProgressPopupEventListener(Tizen::Ui::IProgressPopupEventListener& listener); + + /** + * Sets the text color of the %ProgressPopup window. + * + * @since 2.0 + * @param[in] color The text color + */ + void SetTextColor(const Tizen::Graphics::Color& color); + + /** + * Gets the text color of the %ProgressPopup window. + * + * @since 2.0 + * @return The color, @n + * else RGBA(0, 0, 0, 0) if an error occurs + */ + Tizen::Graphics::Color GetTextColor(void) const; + +protected: + friend class _ProgressPopupImpl; + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + ProgressPopup(const ProgressPopup& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + ProgressPopup& operator =(const ProgressPopup& rhs); + +}; // ProgressPopup + + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_PROGRESS_POPUP_H_ diff --git a/inc/FUiCtrlRadioGroup.h b/inc/FUiCtrlRadioGroup.h new file mode 100644 index 0000000..8c09cd3 --- /dev/null +++ b/inc/FUiCtrlRadioGroup.h @@ -0,0 +1,357 @@ +// +// 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 FUiCtrlRadioGroup.h + * @brief This is the header file for the %RadioGroup class. + * + * This header file contains the declarations of the %RadioGroup class and its helper classes. + */ + +#ifndef _FUI_CTRL_RADIO_GROUP_H_ +#define _FUI_CTRL_RADIO_GROUP_H_ + +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ +/** + * @class RadioGroup + * @brief This class is an implementation of a %RadioGroup control. + * + * @since 2.0 + * + * The %RadioGroup class displays a set of CheckButtons with radio style together in a group, allowing the user to select only + * one of the predefined set of buttons. + * + * For more information on the class features, see Buttons. + * + * The following example demonstrates how to use the %RadioGroup class. + * + * @code +// Sample code for RadioGroupSample.h +#include + +class RadioGroupSample + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::IActionEventListener +{ +public: + RadioGroupSample(void) + : __pRadioGroup(null){} + + bool Initialize(void); + virtual result OnInitializing(void); + virtual result OnTerminating(void); + virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId); + +private: + static const int ID_BUTTON1_CHECKED = 101; + static const int ID_BUTTON1_UNCHECKED = 102; + static const int ID_BUTTON2_CHECKED = 103; + static const int ID_BUTTON2_UNCHECKED = 104; + + Tizen::Ui::Controls::RadioGroup* __pRadioGroup; +}; + * @endcode + * + * @code +// Sample code for RadioGroupSample.cpp +#include + +#include "RadioGroupSample.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Ui::Controls; + +bool +RadioGroupSample::Initialize(void) +{ + Construct(FORM_STYLE_NORMAL); + return true; +} + +result +RadioGroupSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + // Creates instances of CheckButton + CheckButton *pCheckButton1 = new CheckButton(); + pCheckButton1->Construct(Rectangle(50, 50, GetClientAreaBounds().width - 100, 100), + CHECK_BUTTON_STYLE_RADIO, BACKGROUND_STYLE_DEFAULT, false, L"Radio1"); + pCheckButton1->SetActionId(ID_BUTTON1_CHECKED, ID_BUTTON1_UNCHECKED); + pCheckButton1->AddActionEventListener(*this); + + CheckButton *pCheckButton2 = new CheckButton(); + pCheckButton2->Construct(Rectangle(50, 160, GetClientAreaBounds().width - 100, 100), + CHECK_BUTTON_STYLE_RADIO,BACKGROUND_STYLE_DEFAULT, false, L"Radio2"); + pCheckButton2->SetActionId(ID_BUTTON2_CHECKED, ID_BUTTON2_UNCHECKED); + pCheckButton2->AddActionEventListener(*this); + + // Adds check buttons to the form + AddControl(pCheckButton1); + AddControl(pCheckButton2); + + // Creates an instance of RadioGroup + __pRadioGroup = new RadioGroup(); + __pRadioGroup->Construct(); + + // Adds the check buttons to the radio group + __pRadioGroup->Add(pCheckButton1); + __pRadioGroup->Add(pCheckButton2); + + return r; +} + +result +RadioGroupSample::OnTerminating(void) +{ + result r = E_SUCCESS; + + // Deallocates the __pRadioGroup + delete __pRadioGroup; + + return r; +} + +// IActionEventListener implementation +void +RadioGroupSample::OnActionPerformed(const Control& source, int actionId) +{ + switch (actionId) + { + case ID_BUTTON1_CHECKED: + { + // .... + } + break; + case ID_BUTTON1_UNCHECKED: + { + // .... + } + break; + case ID_BUTTON2_CHECKED: + { + // .... + } + break; + case ID_BUTTON2_UNCHECKED: + { + // .... + } + break; + default: + break; + } +} + * @endcode + * + */ +class _OSP_EXPORT_ RadioGroup + : public Tizen::Ui::Control +{ +public: + /** + * This is the default constructor for this class. + * + * @since 2.0 + */ + RadioGroup(void); + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~RadioGroup(void); + + + /** + * Initializes this instance of %RadioGroup. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result Construct(void); + +public: + /** + * Adds the check button to the radio group. + * + * @brief [Deprecated] + * @deprecated This method is deprecated. + * @since 2.0 + * + * @return An error code + * @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. + * @remarks Only CheckButtons whose style is @c CHECK_BUTTON_STYLE_RADIO or + * @c CHECK_BUTTON_STYLE_RADIO_WITH_DIVIDER can be added to %RadioGroup. + */ + result Add(const CheckButton& checkButton); + + /** + * Adds the check button to the radio group. + * + * @since 2.1 + * + * @return An error code + * @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. + * @exception E_SYSTEM A system error has occurred. + * @remarks Only CheckButtons whose style is @c CHECK_BUTTON_STYLE_RADIO or + * @c CHECK_BUTTON_STYLE_RADIO_WITH_DIVIDER can be added to %RadioGroup. + */ + result Add(CheckButton* pCheckButton); + + /** + * Removes the check button from the radio group. + * + * @brief [Deprecated] + * @deprecated This method is deprecated. + * @since 2.0 + * + * @return An error code + * @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. + */ + result Remove(const CheckButton& checkButton); + + /** + * Removes the check button from the radio group. + * + * @since 2.1 + * + * @return An error code + * @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. + */ + result Remove(CheckButton* pCheckButton); + +public: + /** + * Gets the number of check buttons in the radio group. + * + * @since 2.0 + * + * @return The number of check buttons in the radio group + */ + int GetItemCount(void) const; + + /** + * Selects the specified check button in the radio group. + * + * @brief [Deprecated] + * @deprecated This method is deprecated. + * @since 2.0 + * + * @param[in] checkButton The check button to select + */ + void SetSelectedItem(const CheckButton& checkButton); + + /** + * Selects the specified check button in the radio group. + * + * @since 2.1 + * + * @param[in] pCheckButton The check button to select + * @exception E_INVALID_ARG The specified @c pCheckButton is @c null. + */ + void SetSelectedItem(CheckButton* pCheckButton); + + /** + * Gets the selected check button in the radio group. + * + * @since 2.0 + * + * @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; + +private: + // + // 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. + // + // @since 2.1 + // + virtual void RadioGroup_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. + // + // @since 2.1 + // + virtual void RadioGroup_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. + // + // @since 2.1 + // + virtual void RadioGroup_Reserved3(void){} + +protected: + friend class _RadioGroupImpl; + +private: + // + // This is the copy constructor for the %RadioGroup class. + // + RadioGroup(const RadioGroup& rhs); + + // + // Assigns the value of the specified instance to the current instance of %RadioGroup. + // + RadioGroup& operator =(const RadioGroup& rhs); + +}; // RadioGroup + +}}} //Tizen::Ui::Controls + +#endif // _FUI_CTRL_RADIO_GROUP_H_ diff --git a/inc/FUiCtrlScrollEventTypes.h b/inc/FUiCtrlScrollEventTypes.h new file mode 100644 index 0000000..cccd2f0 --- /dev/null +++ b/inc/FUiCtrlScrollEventTypes.h @@ -0,0 +1,50 @@ +// +// 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 FUiCtrlScrollEventTypes.h + * @brief This is the header file for the %List enumerations. + * + * @since 2.0 + * + * This header file contains the declarations of the scroll event enumerations. + */ + +#ifndef _FUI_CTRL_SCROLL_EVENT_ENUM_H_ +#define _FUI_CTRL_SCROLL_EVENT_ENUM_H_ + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @enum ScrollEndEvent + * + * Defines constants that represent the type of scroll end event. + * + * @since 2.0 + */ +enum ScrollEndEvent +{ + 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 + +#endif diff --git a/inc/FUiCtrlScrollPanel.h b/inc/FUiCtrlScrollPanel.h new file mode 100644 index 0000000..bcec8b6 --- /dev/null +++ b/inc/FUiCtrlScrollPanel.h @@ -0,0 +1,726 @@ +// +// 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 FUiCtrlScrollPanel.h + * @brief This is the header file for the %ScrollPanel class. + * + * This header file contains the declarations of the %ScrollPanel class. + */ + +#ifndef _FUI_CTRL_SCROLL_PANEL_H_ +#define _FUI_CTRL_SCROLL_PANEL_H_ + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ +/** + * @class ScrollPanel + * @brief This class implements a scrollable container class. + * + * @since 2.0 + * + * The %ScrollPanel class is a Panel with automatic scroll bars. + * + * For more information on the class features, see Panels. + * + * The following example demonstrates how to use the %ScrollPanel class. + * + * @code +// Sample code for ScrollPanelSample.h +#include + +class ScrollPanelSample + : public Tizen::Ui::Controls::Form +{ +public: + ScrollPanelSample(void) + : __pScrollPanel(null){} + + bool Initialize(void); + virtual result OnInitializing(void); + +private: + Tizen::Ui::Controls::ScrollPanel* __pScrollPanel; +}; + * @endcode + * + * @code +// Sample code for ScrollPanelSample.cpp +#include + +#include "ScrollPanelSample.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Ui::Controls; + +bool +ScrollPanelSample::Initialize(void) +{ + Construct(FORM_STYLE_NORMAL); + return true; +} + +result +ScrollPanelSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + // Creates an instance of ScrollPanel + __pScrollPanel = new ScrollPanel(); + __pScrollPanel->Construct(Rectangle(100, 250, 400, 300)); + __pScrollPanel->SetBackgroundColor(Color::GetColor(COLOR_ID_YELLOW)); + + // Creates an instance of Button and an instance of EditField + Button* pButton = new Button(); + pButton->Construct(Rectangle(0, 80, 200, 150), L"Button"); + + EditField* pEdit = new EditField(); + pEdit->Construct(Rectangle(0, 250, 200, 150)); + pEdit->SetText(L"Edit"); + + // Adds the button and the edit field to the ScrollPanel + __pScrollPanel->AddControl(pButton); + __pScrollPanel->AddControl(pEdit); + + // Adds the ScrollPanel to the form + AddControl(__pScrollPanel); + + return r; +} + * @endcode + */ + +class _OSP_EXPORT_ ScrollPanel + : public Panel +{ + +// Lifecycle +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. + * + * @since 2.0 + * + */ + ScrollPanel(void); + + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + * + */ + virtual ~ScrollPanel(void); + + + /** + * Initializes this instance of %ScrollPanel with the specified rectangular region. + * + * @since 2.0 + * + * @return An error code + * @param[in] rect The location and size of the %ScrollPanel control + * @exception E_SUCCESS The method is successful. + * @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 Container + */ + result Construct(const Tizen::Graphics::Rectangle& rect); + + + /** + * Initializes this instance of %ScrollPanel with the specified rectangular region. + * + * @since 2.1 + * + * @return An error code + * @param[in] rect The location and size of the %ScrollPanel control + * @exception E_SUCCESS The method is successful. + * @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 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. + * 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 + * + * @return An error code + * @param[in] resourceId The resource ID describing the %ScrollPanel 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 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); + + + /** + * Initializes this instance of %ScrollPanel with the specified rectangular region. + * + * @since 2.0 + * + * @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 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 @c 0. + * @see Container + */ + result Construct(const Tizen::Graphics::Rectangle& rect, ScrollPanelScrollDirection scrollDirection, bool autoResizingEnable); + + + /** + * Initializes this instance of %ScrollPanel with the specified rectangular region. + * + * @since 2.1 + * + * @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 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 @c 0. + * @see Container + */ + result Construct(const Tizen::Graphics::FloatRectangle& rect, ScrollPanelScrollDirection scrollDirection, bool autoResizingEnable); + + + /** + * Initializes this instance of %ScrollPanel with the specified layout and rectangular region. + * + * @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 %ScrollPanel control + * @exception E_SUCCESS The method is successful. + * @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 Container + */ + result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::Rectangle& rect); + + + /** + * Initializes this instance of %ScrollPanel 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 %ScrollPanel control + * @exception E_SUCCESS The method is successful. + * @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 Container + */ + result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::FloatRectangle& rect); + + + /** + * Initializes this instance of %ScrollPanel with the specified layout and rectangular region. + * + * @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 %ScrollPanel control + * @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 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); + + + /** + * Initializes this instance of %ScrollPanel 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 %ScrollPanel control + * @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 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); + + + /** + * Initializes this instance of %ScrollPanel with the specified layouts and rectangular region. + * + * @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 %ScrollPanel control + * @exception E_SUCCESS The method is successful. + * @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 Container + */ + result Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, const Tizen::Graphics::Rectangle& rect); + + + /** + * Initializes this instance of %ScrollPanel with the specified layouts and rectangular region. + * + * @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 %ScrollPanel control + * @exception E_SUCCESS The method is successful. + * @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 Container + */ + result Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, const Tizen::Graphics::FloatRectangle& rect); + + + /** + * Initializes this instance of %ScrollPanel with the specified layouts and rectangular region. + * + * @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 %ScrollPanel control + * @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 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); + + + /** + * Initializes this instance of %ScrollPanel with the specified layouts and rectangular region. + * + * @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 %ScrollPanel control + * @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 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); + + + /** + * Adds a listener instance that listens to the state changes of a scroll event. @n + * The added listener can listen to the events on the given event dispatcher's context when they are fired. + * + * @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 Controls::IScrollEventListener + * @see RemoveScrollEventListener() + */ + void AddScrollEventListener(IScrollEventListener& listener); + + + /** + * Adds a listener instance that listens to the state changes of a scroll event. @n + * The added listener can listen to the events on the given event dispatcher's context when they are fired. + * + * @since 2.1 + * + * @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::IScrollEventListenerF + * @see RemoveScrollEventListener() + */ + void AddScrollEventListener(IScrollEventListenerF& listener); + + + /** + * Removes a listener instance that listens to the state changes of a scroll event. @n + * The removed listener cannot listen to the events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The listener to remove + * @see Controls::IScrollEventListener + * @see AddScrollEventListener() + */ + void RemoveScrollEventListener(IScrollEventListener& listener); + + + /** + * Removes a listener instance that listens to the state changes of a scroll event. @n + * The removed listener cannot listen to the events when they are fired. + * + * @since 2.1 + * + * @param[in] listener The listener to remove + * @see Controls::IScrollEventListenerF + * @see AddScrollEventListener() + */ + void RemoveScrollEventListener(IScrollEventListenerF& listener); + + + /** + * Gets the scroll position. + * + * @since 2.0 + * + * @return The scroll position + */ + int GetScrollPosition(void) const; + + + /** + * Gets the scroll position. + * + * @since 2.1 + * + * @return The scroll position + */ + float GetScrollPositionF(void) const; + + + /** + * @if OSPDEPREC + * 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. + * @since 2.0 + * + * @param[in] position The scroll position + * @endif + */ + void SetScrollPosition(int position); + + + /** + * Sets the scroll position. + * + * @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. + * + */ + void SetScrollPosition(int position, bool withAnimation); + + + /** + * Sets the scroll position. + * + * @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. + * + */ + void SetScrollPosition(float position, bool withAnimation); + + + /** + * Scrolls to the bottom of %ScrollPanel. + * + * @since 2.0 + */ + void ScrollToBottom(void) const; + + + /** + * Scrolls to the top of %ScrollPanel. + * + * @since 2.0 + */ + void ScrollToTop(void) const; + + + /** + * Closes the overlay Window for supporting the overlay keypad. + * + * @since 2.0 + * + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result CloseOverlayWindow(void); + + + /** + * Gets the bounds of the client area. + * + * @since 2.0 + * + * @return The bounds of the client area + * + */ + Tizen::Graphics::Rectangle GetClientAreaBounds(void) const; + + + /** + * Gets the bounds of the client area. + * + * @since 2.1 + * + * @return The bounds of the client area + * + */ + Tizen::Graphics::FloatRectangle GetClientAreaBoundsF(void) const; + + + /** + * Sets the width of the client area. + * + * @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 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); + + + /** + * Sets the width of the client area. + * + * @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 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); + + + /** + * Sets the height of the client area. + * + * @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 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); + + + /** + * Sets the height of the client area. + * + * @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 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); + + + /** + * Gets the scroll direction of the %ScrollPanel. + * + * @since 2.0 + * + * @return The direction of %ScrollPanel + * + */ + ScrollPanelScrollDirection GetScrollDirection(void) const; + + + /** + * Checks whether auto-resizing is enabled for the scroll area. + * + * @since 2.0 + * + * @return @c true if auto-resizing is enabled for the scroll area, @n + * else @c false + * + */ + bool IsScrollAreaAutoResizingEnabled(void) const; + + + /** + * Enables or disables scrolling by page, where page size is determined by the size of the %ScrollPanel. + * + * @since 2.0 + * + * @param[in] enable Set to @c true to enable page scroll, @n + * @c false to disable page scroll + * + */ + void SetPageScrollEnabled(bool enable); + + + /** + * Checks whether scrolling by page feature is enabled. + * + * @since 2.0 + * + * @return @c true if the page scroll is enabled. @n + * else @c false. + * + */ + bool IsPageScrollEnabled(void) const; + + + /** + * Sets the visibility of scroll bar. + * + * @since 2.0 + * + * @param[in] visible Set to @c true to show scroll bar. @n + * else @c false. + * + */ + void SetScrollBarVisible(bool visible); + + + /** + * Gets the visibility of scroll bar. + * + * @since 2.0 + * + */ + bool IsScrollBarVisible(void) const; + + + /** + * Sets the scroll input handling mode. + * + * @since 2.0 + * + * @param[in] mode The scroll input handling mode + * @see GetScrollInputMode() + */ + void SetScrollInputMode(ScrollInputMode mode); + + + /** + * Gets the scroll input handling mode. + * + * @since 2.0 + * + * @return The scroll input handling mode + * @see SetScrollInputMode() + */ + ScrollInputMode GetScrollInputMode(void) const; + + +protected: + + friend class _ScrollPanelImpl; + + // Reserved virtual methods for later extension + + // The following methods are reserved and may change its name at any time without prior notice. + virtual void ScrollPanel_Reserved1(void) {} + + virtual void ScrollPanel_Reserved2(void) {} + + virtual void ScrollPanel_Reserved3(void) {} + +private: + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + ScrollPanel(const ScrollPanel& rhs); + + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + ScrollPanel& operator =(const ScrollPanel& rhs); + +}; // ScrollPanel + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_SCROLL_PANEL_H_ diff --git a/inc/FUiCtrlScrollPanelTypes.h b/inc/FUiCtrlScrollPanelTypes.h new file mode 100644 index 0000000..d1029d8 --- /dev/null +++ b/inc/FUiCtrlScrollPanelTypes.h @@ -0,0 +1,58 @@ +// +// 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 FUiCtrlScrollPanelTypes.h + * @brief This is the header file for the enumerations of the %ScrollPanel class. + * + * This header file defines the data types for the ScrollPanel class. + */ +#ifndef _FUI_CTRL_SCROLL_PANEL_TYPES_H_ +#define _FUI_CTRL_SCROLL_PANEL_TYPES_H_ + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @enum ScrollPanelScrollDirection + * + * Defines the scroll direction type of the ScrollPanel control. + * + * @since 2.0 + */ +enum ScrollPanelScrollDirection +{ + SCROLL_PANEL_SCROLL_DIRECTION_VERTICAL = 0, /**< Vertical scroll mode */ + SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL /**< Horizontal scroll mode */ +}; + +/** +* @enum ScrollInputMode +* +* Defines the scroll interaction mode. +* +* @since 2.0 +*/ +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 */ +}; + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_SCROLL_PANEL_TYPES_H_ diff --git a/inc/FUiCtrlSearchBar.h b/inc/FUiCtrlSearchBar.h new file mode 100644 index 0000000..f277007 --- /dev/null +++ b/inc/FUiCtrlSearchBar.h @@ -0,0 +1,1558 @@ +// +// 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 FUiCtrlSearchBar.h + * @brief This is the header file for the %SearchBar class. + * + * This header file contains the declarations of the %SearchBar class. + */ + +#ifndef _FUI_CTRL_SEARCH_BAR_H_ +#define _FUI_CTRL_SEARCH_BAR_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace Tizen { namespace Graphics +{ +class Rectangle; +}} // Tizen::Graphics + +namespace Tizen { namespace Ui { namespace Controls +{ + +class ISearchBarEventListener; + +/** + * @enum SearchFieldStatus + * + * Defines the possible states of the search field of the search bar. + * + * @since 2.0 + */ +enum SearchFieldStatus +{ + SEARCH_FIELD_STATUS_NORMAL, /**< The normal state */ + SEARCH_FIELD_STATUS_HIGHLIGHTED, /**< The focus-highlighted state */ + SEARCH_FIELD_STATUS_DISABLED /**< The disabled state */ +}; + +/** + * @enum SearchBarButtonStatus + * + * Defines the possible states of the search bar button. + * + * @since 2.0 + */ +enum SearchBarButtonStatus +{ + SEARCH_BAR_BUTTON_STATUS_NORMAL = 0, /**< The normal status */ + SEARCH_BAR_BUTTON_STATUS_PRESSED, /**< The selected status */ + SEARCH_BAR_BUTTON_STATUS_HIGHLIGHTED, /**< The highlighted status */ + SEARCH_BAR_BUTTON_STATUS_DISABLED /**< The disabled status */ +}; + +/** + * @enum SearchBarMode + * + * Defines the possible modes of the search bar. + * + * @since 2.0 + */ +enum SearchBarMode +{ + SEARCH_BAR_MODE_NORMAL, /**< The normal mode */ + SEARCH_BAR_MODE_INPUT /**< The input mode */ +}; + +/** + * @class SearchBar + * @brief This class is an implementation of a search bar. + * + * @since 2.0 + * + * The %SearchBar class displays an editable search field for entering keywords and an optional button that is displayed in the + * input mode. + * + * For more information on the class features, see SearchBar. + * + * The following example demonstrates how to use the %SearchBar class. + * + * @code +// Sample code for SearchBarSample.h +#include + +class SearchBarSample + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::Controls::ISearchBarEventListener + , public Tizen::Ui::Controls::IListViewItemEventListener + , public Tizen::Ui::Controls::IListViewItemProvider + , public Tizen::Ui::ITextEventListener +{ +public: + SearchBarSample(void) + : __pSearchBar(null) + , __pSearchBarListView(null){} + + bool Initialize(void); + virtual result OnInitializing(void); + + // ISearchBarEventListener + virtual void OnSearchBarModeChanged(Tizen::Ui::Controls::SearchBar& source, Tizen::Ui::Controls::SearchBarMode mode); + virtual void OnSearchBarContentAreaResized(Tizen::Ui::Controls::SearchBar& source, Tizen::Graphics::Dimension& size) {}; + virtual void OnTextValueChanged(const Tizen::Ui::Control& source); + virtual void OnTextValueChangeCanceled(const Tizen::Ui::Control& source){}; + + // IListViewItemEventListener + virtual void OnListViewContextItemStateChanged(Tizen::Ui::Controls::ListView &listView, int index, int elementId, Tizen::Ui::Controls::ListContextItemStatus state); + virtual void OnListViewItemStateChanged(Tizen::Ui::Controls::ListView &listView, int index, int elementId, Tizen::Ui::Controls::ListItemStatus status); + virtual void OnListViewItemSwept(Tizen::Ui::Controls::ListView &listView, int index, Tizen::Ui::Controls::SweepDirection direction); + + //IListViewItemProvider + virtual Tizen::Ui::Controls::ListItemBase* CreateItem (int index, int itemWidth); + virtual bool DeleteItem (int index, Tizen::Ui::Controls::ListItemBase *pItem, int itemWidth); + virtual int GetItemCount(void); + +private: + static const int ID_FORMAT_STRING = 500; + + Tizen::Ui::Controls::SearchBar* __pSearchBar; + Tizen::Ui::Controls::ListView* __pSearchBarListView; +}; + * @endcode + * + * @code +// Sample code for SearchBarSample.cpp +#include +#include + +#include "SearchBarSample.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; + +bool +SearchBarSample::Initialize(void) +{ + Construct(FORM_STYLE_NORMAL); + return true; +} + +result +SearchBarSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + // Creates an instance of SearchBar + __pSearchBar = new SearchBar(); + __pSearchBar->Construct(Rectangle(0, 0, GetClientAreaBounds().width, 110)); + __pSearchBar->SetText(L"Click here! "); + __pSearchBar->AddSearchBarEventListener(*this); + __pSearchBar->AddTextEventListener(*this); + + // Creates an instance of ListView + __pSearchBarListView = new ListView(); + __pSearchBarListView->Construct(Rectangle(0, 110, GetClientAreaBounds().width, GetClientAreaBounds().height - 110), true, false); + __pSearchBarListView->SetItemProvider(*this); + __pSearchBarListView->AddListViewItemEventListener(*this); + __pSearchBarListView->SetTextOfEmptyList(L"No search result"); + __pSearchBarListView->SetShowState(false); + __pSearchBar->SetContent(__pSearchBarListView); + + // Adds controls to the form + AddControl(__pSearchBar); + + return r; +} + +// ISearchBarEventListener implementation +void +SearchBarSample::OnSearchBarModeChanged(Tizen::Ui::Controls::SearchBar& source, Tizen::Ui::Controls::SearchBarMode mode) +{ + Rectangle clientRect = GetClientAreaBounds(); + __pSearchBar->SetText(L""); + + if(mode == SEARCH_BAR_MODE_INPUT) + { + SetActionBarsVisible(FORM_ACTION_BAR_FOOTER, false); + __pSearchBar->SetContentAreaSize(Dimension(clientRect.width, clientRect.height)); + __pSearchBarListView->SetSize(Dimension(clientRect.width, clientRect.height)); + __pSearchBarListView->UpdateList(); + } + else + { + SetActionBarsVisible(FORM_ACTION_BAR_FOOTER, true); + __pSearchBarListView->UpdateList(); + __pSearchBarListView->SetShowState(false); + __pSearchBar->SetText(L"Click here!"); + } + Invalidate(true); +} + +void +SearchBarSample::OnTextValueChanged(const Tizen::Ui::Control& source) +{ + if(__pSearchBarListView) + { + __pSearchBarListView->UpdateList(); + __pSearchBarListView->ScrollToItem(0); + __pSearchBarListView->SetShowState(true); + } + Invalidate(true); +} + +// IListViewItemEventListener implementation + void + SearchBarSample::OnListViewContextItemStateChanged(Tizen::Ui::Controls::ListView &listView, int index, int elementId, Tizen::Ui::Controls::ListContextItemStatus state) + { + // .... + } + + void + SearchBarSample::OnListViewItemStateChanged(Tizen::Ui::Controls::ListView &listView, int index, int elementId, Tizen::Ui::Controls::ListItemStatus status) + { + // .... + } + + void + SearchBarSample::OnListViewItemSwept(Tizen::Ui::Controls::ListView &listView, int index, Tizen::Ui::Controls::SweepDirection direction) + { + // .... + } + +//IListViewItemProvider +ListItemBase* +SearchBarSample::CreateItem (int index, int itemWidth) +{ + // Creates an instance of CustomItem + CustomItem* pItem = new CustomItem(); + ListAnnexStyle style = LIST_ANNEX_STYLE_NORMAL; + + // Gets texts of the search bar + String inputText = null; + inputText = __pSearchBar->GetText(); + + if(inputText.CompareTo(L"a") == 0 || inputText.CompareTo(L"A") == 0 ) + { + switch (index % 3) + { + case 0: + { + pItem->Construct(Dimension(itemWidth,100), style); + pItem->AddElement(Rectangle(80, 25, 200, 50), ID_FORMAT_STRING, L"ajo", true); + } + break; + case 1: + { + pItem->Construct(Dimension(itemWidth,100), style); + pItem->AddElement(Rectangle(80, 25, 200, 50), ID_FORMAT_STRING, L"aeun", true); + } + break; + case 2: + { + pItem->Construct(Dimension(itemWidth,100), style); + pItem->AddElement(Rectangle(80, 25, 200, 50), ID_FORMAT_STRING, L"abee", true); + } + break; + default: + break; + } + } + else if (inputText.CompareTo(L"b") == 0 || inputText.CompareTo(L"B") == 0) + { + switch (index%3) + { + case 0: + { + pItem->Construct(Dimension(itemWidth,100), style); + pItem->AddElement(Rectangle(80, 25, 200, 50), ID_FORMAT_STRING, L"bonge", true); + } + break; + case 1: + { + pItem->Construct(Dimension(itemWidth,100), style); + pItem->AddElement(Rectangle(80, 25, 200, 50), ID_FORMAT_STRING, L"bnpyo", true); + } + break; + case 2: + { + pItem->Construct(Dimension(itemWidth,100), style); + pItem->AddElement(Rectangle(80, 25, 200, 50), ID_FORMAT_STRING, L"bkueon", true); + } + break; + default: + break; + } + } + else + { + pItem->Construct(Dimension(itemWidth,100), style); + pItem->AddElement(Rectangle(80, 25, 200, 50), ID_FORMAT_STRING, L"default", true); + } + + return pItem; +} + +bool +SearchBarSample::DeleteItem (int index, Tizen::Ui::Controls::ListItemBase *pItem, int itemWidth) +{ + delete pItem; + pItem = null; + return true; +} + +int +SearchBarSample::GetItemCount(void) +{ + return 3; +} + * @endcode + * + */ + +class _OSP_EXPORT_ SearchBar + : public Tizen::Ui::Control +{ +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. + * + * @since 2.0 + */ + SearchBar(void); + + /** + * 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 ~SearchBar(void); + + /** + * Initializes this instance of the %SearchBar control with the specified parameters. + * + * @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 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. + * @param[in] searchBarButton Set to @c true to display the search bar button, @n + * else @c false + * @param[in] keypadAction The keypad action + * @exception E_SUCCESS The method is successful. + * @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. + */ + result Construct(const Tizen::Graphics::Rectangle& rect, bool searchBarButton = true, KeypadAction keypadAction = KEYPAD_ACTION_SEARCH); + + /** + * Initializes this instance of the %SearchBar control with the specified parameters. + * + * @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 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. + * @param[in] searchBarButton Set to @c true to display the search bar button, @n + * else @c false + * @param[in] keypadAction The keypad action + * @exception E_SUCCESS The method is successful. + * @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. + */ + result Construct(const Tizen::Graphics::FloatRectangle& rect, bool searchBarButton = true, KeypadAction keypadAction = KEYPAD_ACTION_SEARCH); + + /** + * Gets the content of Control. + * + * @since 2.0 + * + * @return The control that is displayed in the content area of %SearchBar in the ::SEARCH_BAR_MODE_INPUT mode, @n + * else @c null if an error occurs + * @exception E_SUCCESS The method is successful. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + Tizen::Ui::Control* GetContent(void) const; + + /** + * Sets the content control. + * + * @if OSPCOMPAT + * @brief [Compatibility] + * @endif + * @since 2.0 + * @if OSPCOMPAT + * @compatibility This method has compatibility issues with OSP compatible applications. @n + * For more information, see @ref CompSetContentPage "here" + * @endif + * @return An error code + * @param[in] pContent The control to display in the content area of the search bar + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. @n + * The following controls cannot be set as the content: @n + * @li All classes derived from the Window class + * @li All picker classes (For example, DateTimePicker) + * @li Form + * @li Keypad + * @li OverlayPanel + * @exception E_SYSTEM A system error has occurred. + * @remarks The specified content control is displayed when the mode of the %SearchBar control is changed to SEARCH_BAR_MODE_INPUT. + * @see GetContentAreaSize() + * @see AddSearchBarEventListener() + * @see ISearchBarEventListener + */ + result SetContent(const Tizen::Ui::Control* pContent); + /** + * @page CompSetContentPage Compatibility for SetContent() + * @section CompSetContentPage IssueSection Issues + * Implementing this method in OSP compatible applications has the following issue: @n + * 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. + */ + + /** + * Updates the content area of the %SearchBar control. + * + * @since 2.0 + * + * @return An error code + * @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 + * The current mode of %SearchBar prohibits the execution of the method. + * @exception E_SYSTEM A system error has occurred. + * @remarks The method performs Invalidate() on the content area. + */ + result UpdateContentArea(bool invalidate = true); + + /** + * Sets the visibility state of the content area. + * + * @since 2.0 + * + * @return An error code + * @param[in] visible Set to @c true to make the content area visible, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see IsContentAreaVisible() + */ + result SetContentAreaVisible(bool visible); + + /** + * Checks whether the content area is visible. + * + * @since 2.0 + * + * @return @c true if the content area is visible, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @see SetContentAreaVisible() + */ + bool IsContentAreaVisible(void) const; + + /** + * Sets the size of the content area of the %SearchBar control. + * + * @since 2.0 + * + * @return An error code + * @param[in] size The size of the content area + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. @n + * The width and height of @c size must be greater than or equal to @c 0. + * @remarks The content area must be resized when the orientation of the form is changed once the size of the content area is changed. + * @see GetContentAreaSize() + */ + result SetContentAreaSize(const Tizen::Graphics::Dimension& size); + + /** + * Sets the size of the content area of the %SearchBar control. + * + * @since 2.1 + * + * @return An error code + * @param[in] size The size of the content area + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. @n + * The width and height of @c size must be greater than or equal to @c 0. + * @remarks The content area must be resized when the orientation of the form is changed once the size of the content area is changed. + * @see GetContentAreaSizeF() + */ + result SetContentAreaSize(const Tizen::Graphics::FloatDimension& size); + + /** + * Gets the size of the content area of the %SearchBar control. + * + * @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 area can + * be changed at runtime. + * @see AddSearchBarEventListener() + * @see ISearchBarEventListener + */ + Tizen::Graphics::Dimension GetContentAreaSize(void) const; + + /** + * Gets the size of the content area of the %SearchBar control. + * + * @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 area can + * be changed at runtime. + * @see AddSearchBarEventListener() + * @see ISearchBarEventListener + */ + Tizen::Graphics::FloatDimension GetContentAreaSizeF(void) const; + +// Modes + /** + * Gets the search bar mode. + * + * @since 2.0 + * + * @return The search bar mode + * @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 SetMode() + */ + SearchBarMode GetMode(void) const; + + /** + * Checks whether the search bar mode is locked. + * + * @since 2.0 + * + * @return @c true if the mode is locked, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @remarks The specific error code can be accessed using the GetLastResult() method. + * @see SetModeLocked() + */ + bool IsModeLocked(void) const; + + /** + * Sets the search bar mode. + * + * @since 2.0 + * + * @return An error code + * @param[in] mode The search bar mode + * @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. + * - The mode is locked. + * @exception E_SYSTEM A system error has occurred. + * @see GetMode() + * @see SetModeLocked() + */ + result SetMode(SearchBarMode mode); + + /** + * Sets the lock status of the search bar mode. + * + * @since 2.0 + * + * @return An error code + * @param[in] modeLocked Set to @c true to lock the search bar mode, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see GetMode() + */ + result SetModeLocked(bool modeLocked); + + /** + * Gets the action ID of the search bar button. + * + * @since 2.0 + * + * @return The action ID, @n + * else @c -1 if an error occurs + * @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. + * - By default, the method returns @c -1 if no user defined search bar button is set. + */ + int GetButtonActionId(void) const; + + /** + * Gets the color of the search bar button for the specified state. + * + * @since 2.0 + * + * @return The color of the search bar button, @n + * else RGBA(0,0,0,0) if an error occurs + * @param[in] status The status of the search bar button + * @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 SetButtonColor() + */ + Tizen::Graphics::Color GetButtonColor(SearchBarButtonStatus status) const; + + /** + * Gets the text color of the search bar button for the specified state. + * + * @since 2.0 + * + * @return The text color of the search bar button, @n + * else RGBA(0,0,0,0) if an error occurs + * @param[in] status The status of the search bar button + * @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. + */ + Tizen::Graphics::Color GetButtonTextColor(SearchBarButtonStatus status) const; + + /** + * Gets the state of the search bar button. + * + * @since 2.0 + * + * @return The state of the search bar button + * @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. + */ + SearchBarButtonStatus GetButtonStatus(void) const; + + /** + * Sets the user defined search bar button. + * + * @since 2.0 + * + * @return An error code + * @param[in] text The button text + * @param[in] actionId The button action ID + * @exception E_SUCCESS The method is successful. + * @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); + + /** + * Sets the enabled status of the search bar button. + * + * @since 2.0 + * + * @return An error code + * @param[in] enabled Set to @c true to enable the search bar button, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetButtonEnabled(bool enabled); + + /** + * Sets the color of the search bar button for the specified state. + * + * @since 2.0 + * + * @return An error code + * @param[in] status The button status + * @param[in] color The button color to set + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see GetButtonColor() + */ + result SetButtonColor(SearchBarButtonStatus status, const Tizen::Graphics::Color& color); + + /** + * Sets the text color of the button of the %SearchBar control for the specified state. + * + * @since 2.0 + * + * @return An error code + * @param[in] status The button status + * @param[in] color The button text color to set + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetButtonTextColor(SearchBarButtonStatus status, const Tizen::Graphics::Color& color); + + /** + * Appends the specified character at the end of the text. + * + * @since 2.0 + * + * @return An error code + * @param[in] character The character to add + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @remarks + * - The method modifies the text buffer that is managed by the %SearchBar control. + * - To display the changes, the control must be drawn again. + */ + result AppendCharacter(const Tizen::Base::Character& character); + + /** + * Appends the specified text at the end of the existing text. + * + * @since 2.0 + * + * @return An error code + * @param[in] text The text to append + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @remarks + * - To denote the end of a line use '\\n'. + * - The method modifies the text buffer that is managed by the %SearchBar control. + * - To display the changes, the control must be drawn again. + */ + result AppendText(const Tizen::Base::String& text); + + + /** + * Sets the text to be displayed. + * + * @since 2.0 + * + * @return An error code + * @param[in] text The text to display + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @remarks + * - To denote the end of a line use '\\n'. + * - The method modifies the text buffer that is managed by the %SearchBar control. + * - To display the changes, the control must be drawn again. + */ + result SetText(const Tizen::Base::String& text); + + /** + * Inserts the character at the specified index. + * + * @since 2.0 + * + * @return An error code + * @param[in] index The position to insert the character + * @param[in] character The character to insert + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE The specified @c index is outside the bounds of the data structure. @n + * The specified @c index is greater than the number of elements or less than @c 0. + * @exception E_MAX_EXCEEDED The length of the specified @c text exceeds the system limitation. + * @exception E_SYSTEM A system error has occurred. + * @remarks + * - The method modifies the text buffer that is managed by the %SearchBar control. + * - To display the changes, the control must be drawn again. + */ + result InsertCharacterAt(int index, const Tizen::Base::Character& character); + + /** + * Inserts the specified text at the specified index. + * + * @since 2.0 + * + * @return An error code + * @param[in] index The position at which to insert + * @param[in] text The text to insert + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE The specified @c index is outside the bounds of the data structure. @n + * The specified @c index is greater than the number of elements or less than @c 0. + * @exception E_MAX_EXCEEDED The length of the specified @c text exceeds the system limitation. + * @exception E_SYSTEM A system error has occurred. + * @remarks + * - The method modifies the text buffer that is managed by the %SearchBar control. + * - To display the changes, the control must be drawn again. + */ + result InsertTextAt(int index, const Tizen::Base::String& text); + + /** + * Deletes the character at the specified position. + * + * @since 2.0 + * + * @return An error code + * @param[in] index The index + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified @c index is negative. + * @exception E_OUT_OF_RANGE The specified @c index is outside the bounds of the data structure. @n + * The specified @c index is greater than the number of elements or less than @c 0. + * @exception E_SYSTEM A system error has occurred. + * @remarks + * - The method modifies the text buffer that is managed by the %SearchBar control. + * - To display the changes, the control must be drawn again. + */ + result DeleteCharacterAt(int index); + + /** + * Clears the text that is displayed by the %SearchBar control. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @remarks + * - The method modifies the text buffer that is managed by the %SearchBar control. + * - To display the changes, the control must be drawn again. + */ + result Clear(void); + + /** + * Gets the length of the text that is displayed by the %SearchBar control. + * + * @since 2.0 + * + * @return The length of the text, @n + * else @c -1 if an error occurs + * @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. + */ + int GetTextLength(void) const; + + /** + * Gets the text that is displayed by the %SearchBar control. + * + * @since 2.0 + * + * @return The text displayed by the %SearchBar control, @n + * else an empty string if an error occurs + * @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 SetText() + */ + Tizen::Base::String GetText(void) const; + + /** + * Gets a portion of text that is displayed by the %SearchBar control. + * + * @since 2.0 + * + * @return The specified portion of the text, @n + * else an empty string if an error occurs + * @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 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() + */ + Tizen::Base::String GetText(int start, int end) const; + + /** + * Gets the limit of the length of the text. + * + * @since 2.0 + * + * @return The limit of the text length, @n + * else @c -1 if an error occurs + * @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. + * - The default limit length is @c 500. + * @see SetLimitLength() + */ + int GetLimitLength(void) const; + + /** + * Sets the limit of the length of the text. + * + * @since 2.0 + * + * @return An error code + * @param[in] limitLength The limit text length to set + * @exception E_SUCCESS The method is successful. + * @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() + */ + result SetLimitLength(int limitLength); + + /** + * Shows the keypad associated with the %SearchBar control. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @exception E_SYSTEM A system error has occurred. + * @see HideKeypad() + */ + result ShowKeypad(void) const; + + /** + * Hides the keypad associated with the %SearchBar control. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see ShowKeypad() + */ + result HideKeypad(void) const; + + /** + * Gets the text size of the search field. + * + * @since 2.0 + * + * @return The size of the text, @n + * else @c -1 if an error occurs + * @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 SetSearchFieldTextSize() + */ + int GetSearchFieldTextSize(void) const; + + /** + * Gets the text size of the search field. + * + * @since 2.1 + * + * @return The size of the text, @n + * else @c -1 if an error occurs + * @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 SetSearchFieldTextSize() + */ + float GetSearchFieldTextSizeF(void) const; + + /** + * Sets the text size of the text field of the %SearchBar control. + * + * @since 2.0 + * + * @return An error code + * @param[in] size The text size + * @exception E_SUCCESS The method is successful. + * @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() + */ + result SetSearchFieldTextSize(int size); + + /** + * Sets the text size of the text field of the %SearchBar control. + * + * @since 2.1 + * + * @return An error code + * @param[in] size The text size + * @exception E_SUCCESS The method is successful. + * @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() + */ + result SetSearchFieldTextSize(float size); + + /** + * Gets the start and the end index of the currently selected text block. + * + * @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 + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @remarks The method returns @c start = 0 and @c end = 0 if no text block is selected. + * @see ReleaseBlock() + * @see SetBlockRange() + */ + result GetBlockRange(int& start, int& end) const; + + /** + * Releases the selection of the current text block. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see GetBlockRange() + * @see SetBlockRange() + */ + result ReleaseBlock(void); + + /** + * Sets the block range for the text. + * + * @since 2.0 + * + * @return An error code + * @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 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() + */ + result SetBlockRange(int start, int end); + + /** + * Removes the text of the selected text block. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result RemoveTextBlock(void); + + /** + * Gets the color of the %SearchBar control for the specified status. + * + * @since 2.0 + * + * @return The color of the %SearchBar control, @n + * else RGBA(0,0,0,0) if an error occurs + * @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 SetColor() + */ + Tizen::Graphics::Color GetColor(void) const; + + /** + * Gets the color of the search field for the specified status. + * + * @since 2.0 + * + * @return The color, @n + * else RGBA(0,0,0,0) if an error occurs + * @param[in] status The search field status + * @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 SetSearchFieldColor() + */ + Tizen::Graphics::Color GetSearchFieldColor(SearchFieldStatus status) const; + + /** + * Gets the text color of the search field for the specified status. + * + * @since 2.0 + * + * @return The text color, @n + * else RGBA(0,0,0,0) if an error occurs + * @param[in] status The search field status + * @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 SetSearchFieldTextColor() + */ + Tizen::Graphics::Color GetSearchFieldTextColor(SearchFieldStatus status) const; + + /** + * Sets the background bitmap of the %SearchBar control. + * + * @since 2.0 + * + * @return An error code + * @param[in] bitmap The background bitmap + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap); + + /** + * Sets the color of the search bar. + * + * @since 2.0 + * + * @return An error code + * @param[in] color The color + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see GetColor() + */ + result SetColor(const Tizen::Graphics::Color& color); + + /** + * Sets the color of the search field for the specified status. + * + * @since 2.0 + * + * @return An error code + * @param[in] status The state of the search field + * @param[in] color The text color + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see GetSearchFieldColor() + */ + result SetSearchFieldColor(SearchFieldStatus status, const Tizen::Graphics::Color& color); + + /** + * Sets the text color of the search field for the specified status. + * + * @since 2.0 + * + * @return An error code + * @param[in] status The state of the search field + * @param[in] color The text color + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see GetSearchFieldTextColor() + */ + result SetSearchFieldTextColor(SearchFieldStatus status, const Tizen::Graphics::Color& color); + + /** + * Gets the guide text. + * + * @since 2.0 + * + * @return The guide text, @n + * else an empty string if an error occurs + * @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 GetGuideText() + */ + Tizen::Base::String GetGuideText(void) const; + + /** + * Sets the guide text. @n + * This text is displayed when there is no text in the %SearchBar control. + * + * @since 2.0 + * + * @return An error code + * @param[in] guideText The guide text + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see GetGuideText() + */ + result SetGuideText(const Tizen::Base::String& guideText); + + /** + * Gets the text color of the guide text. + * + * @since 2.0 + * + * @return The text color of the guide text, @n + * else RGBA(0,0,0,0) if an error occurs + * @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 SetGuideTextColor() + */ + Tizen::Graphics::Color GetGuideTextColor(void) const; + + /** + * Sets the text color of the guide text. + * + * @since 2.0 + * + * @return An error code + * @param[in] color The guide text color + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see GetGuideTextColor() + */ + result SetGuideTextColor(const Tizen::Graphics::Color& color); + +// Cursor + /** + * Gets the current cursor position index. + * + * @since 2.0 + * + * @return The cursor position, @n + * else @c -1 if an error occurs + * @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 SetCursorPosition() + */ + int GetCursorPosition(void) const; + + /** + * Sets the cursor at the specified index. + * + * @since 2.0 + * + * @return An error code + * @param[in] index The cursor index + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE The specified @c index is outside the bounds of the data structure. @n + * The specified @c index is greater than the number of elements or less than @c 0. + * @exception E_SYSTEM A system error has occurred. + * @see GetCursorPosition() + */ + result SetCursorPosition(int index); + + /** + * Checks whether the lowercase mode is enabled. + * + * @since 2.0 + * + * @return @c true if the lowercase mode is enabled, @n + * else @c false + * @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 SetLowerCaseModeEnabled() + */ + bool IsLowerCaseModeEnabled(void) const; + + /** + * Enables or disables the lowercase mode. + * + * @since 2.0 + * + * @param[in] enable Set to @c true to enable the lowercase mode, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see IsLowerCaseModeEnabled() + */ + void SetLowerCaseModeEnabled(bool enable); + +// Ellipsis + /** + * Gets the ellipsis position. + * + * @since 2.0 + * + * @return The ellipsis position + * @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 SetEllipsisPosition() + */ + EllipsisPosition GetEllipsisPosition(void) const; + + /** + * Sets the ellipsis position. + * + * @since 2.0 + * + * @return An error code + * @param[in] position The ellipsis position + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see GetEllipsisPosition() + */ + result SetEllipsisPosition(EllipsisPosition position); + + /** + * Sets the input language. + * + * @since 2.0 + * + * @brief [Deprecated] + * @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. + * @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. + */ + + result SetCurrentLanguage(Tizen::Locales::LanguageCode languageCode); + + /** + * Gets the current input language. + * + * @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 %SearchBar. + */ + + result GetCurrentLanguage(Tizen::Locales::LanguageCode& language) const; + + /** + * Gets the keypad action type. + * + * @since 2.0 + * + * @return The keypad action + * @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. + */ + KeypadAction GetKeypadAction(void) const; + + /** + * 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() + */ + bool IsTextPredictionEnabled(void) const; + + /** + * 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() + */ + result SetTextPredictionEnabled(bool enable); + + /** + * Adds the specified action event listener. @n + * The added listener is notified when the user clicks the search bar button. + * + * @since 2.0 + * + * @param[in] listener The event listener to add + * @see RemoveActionEventListener() + */ + void AddActionEventListener(Tizen::Ui::IActionEventListener& listener); + + /** + * Removes the specified action event listener. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to remove + * @see AddActionEventListener() + */ + void RemoveActionEventListener(Tizen::Ui::IActionEventListener& listener); + + /** + * Adds the specified text event listener. @n + * The added listener can listen to events on the context of the specified event dispatcher when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to add + * @remarks The added listener is notified when: @n + * @li The user presses a key on the software keypad. + * @li The user selects a word in the candidate list. + * @li The user pastes a text. + * @see RemoveTextEventListener() + */ + void AddTextEventListener(Tizen::Ui::ITextEventListener& listener); + + /** + * Removes the specified text event listener. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to remove + * @see AddTextEventListener() + */ + void RemoveTextEventListener(Tizen::Ui::ITextEventListener& listener); + + /** + * Adds the specified search bar event listener. @n + * The added listener can listen to events on the context of the specified event dispatcher when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to add + * @remarks The added listener is notified when: @n + * @li The user presses a key on the software keypad. + * @li The user selects a word in the candidate list. + * @li The user pastes a text. + * @see AddSearchBarEventListener() + */ + void AddSearchBarEventListener(ISearchBarEventListener& listener); + + /** + * Removes the specified search bar event listener. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to remove + * @see RemoveTextEventListener() + */ + void RemoveSearchBarEventListener(ISearchBarEventListener& listener); + + /** + * Adds the specified text block event listener. + * + * @since 2.0 + * + * @param[in] listener The event listener to add + * @remarks Programmatically, modification of the text selection does not cause the text block selection event to fire. + * @see RemoveTextBlockEventListener() + */ + void AddTextBlockEventListener(Tizen::Ui::ITextBlockEventListener& listener); + + /** + * Removes the specified text block event listener. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to remove + * @see AddTextBlockEventListener() + */ + void RemoveTextBlockEventListener(Tizen::Ui::ITextBlockEventListener& listener); + + /** + * Adds the specified keypad event listener. @n + * The added listener is notified when the keypad associated with this text editor is opened or closed. + * + * @since 2.0 + * + * @param[in] listener The event listener to add + * @see RemoveKeypadEventListener() + */ + void AddKeypadEventListener(Tizen::Ui::IKeypadEventListener& listener); + + /** + * Removes the specified keypad event listener. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to remove + * @see AddKeypadEventListener() + */ + void RemoveKeypadEventListener(Tizen::Ui::IKeypadEventListener& listener); + + /** + * Adds a listener instance for language events. @n + * The added listener is notified when the input language is changed. + * + * @since 2.0 + * + * @param[in] listener The listener to add + * @remarks The application can recognize when the language is changed from the keypad by adding Tizen::Ui::ILanguageEventListener. + * @see RemoveLanguageEventListener() + */ + + void AddLanguageEventListener(Tizen::Ui::ILanguageEventListener& listener); + + /** + * Removes the specified listener instance. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The listener to remove + * @see AddLanguageEventListener() + */ + + void RemoveLanguageEventListener(Tizen::Ui::ILanguageEventListener& listener); + + /** + * Sets the text filter. + * + * @since 2.1 + * + * @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); + + /** + * Sends 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. + */ + void SendOpaqueCommand (const Tizen::Base::String& command); + +protected: + friend class _SearchBarImpl; + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + SearchBar(const SearchBar& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + SearchBar& operator =(const SearchBar& rhs); + +}; // SearchBar + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_SEARCH_BAR_H_ diff --git a/inc/FUiCtrlSectionTableView.h b/inc/FUiCtrlSectionTableView.h new file mode 100644 index 0000000..a10d0ba --- /dev/null +++ b/inc/FUiCtrlSectionTableView.h @@ -0,0 +1,975 @@ +// +// 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 FUiCtrlSectionTableView.h +* @brief This is the header file for the %SectionTableView class. +* +* This header file contains the declarations of the %SectionTableView class and its helper classes. +*/ + +#ifndef _FUI_CTRL_SECTION_TABLE_VIEW_H_ +#define _FUI_CTRL_SECTION_TABLE_VIEW_H_ + +#include +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ +class ISectionTableViewItemProvider; +class ISectionTableViewItemProviderF; +class ISectionTableViewItemEventListener; +class IFastScrollListener; +class IScrollEventListener; +class IScrollEventListenerF; + +/** + * @class SectionTableView + * @brief This class defines common behavior for a %SectionTableView control. + * + * @since 2.0 + * + * The %SectionTableView class defines common behavior for a %SectionTableView control. + * + * The following example demonstrates how to use the %SectionTableView class. + * + * @code +//Sample code for SectionTableViewSample.h +#include + +class SectionTableViewSample + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::Controls::ISectionTableViewItemProvider + , public Tizen::Ui::Controls::ISectionTableViewItemEventListener +{ +public: + SectionTableViewSample(void) + : __pSectionTableView(null){} + + bool Initialize(void); + virtual result OnInitializing(void); + virtual result OnTerminating(void); + + // ISectionTableViewItemEventListener + virtual void OnSectionTableViewItemStateChanged(Tizen::Ui::Controls::SectionTableView& tableView, int sectionIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status); + virtual void OnSectionTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::SectionTableView& tableView, int sectionIndex, int itemIndex, Tizen::Ui::Controls::TableViewContextItem* pContextItem, bool activated); + + // ISectionTableViewItemProvider + virtual int GetSectionCount(void); + virtual int GetItemCount(int sectionIndex); + virtual bool HasSectionHeader(int sectionIndex); + virtual bool HasSectionFooter(int sectionIndex); + virtual Tizen::Base::String GetSectionHeader(int sectionIndex); + virtual Tizen::Base::String GetSectionFooter(int sectionIndex); + virtual int GetDefaultItemHeight(void); + virtual Tizen::Ui::Controls::TableViewItem* CreateItem(int sectionIndex, int itemIndex, int itemWidth); + virtual bool DeleteItem(int sectionIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem); + virtual void UpdateItem(int sectionIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem); + +private: + Tizen::Ui::Controls::SectionTableView* __pSectionTableView; +}; + * @endcode + * + * @code + +//Sample code for SectionTableViewSample.cpp +#include +#include + +#include "SectionTableViewSample.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Media; +using namespace Tizen::Ui::Controls; + +bool +SectionTableViewSample::Initialize(void) +{ + Construct(FORM_STYLE_NORMAL); + return true; +} + +result +SectionTableViewSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + // Creates an instance of TableView + __pSectionTableView = new SectionTableView(); + __pSectionTableView->Construct(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height), true, TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT); + __pSectionTableView->SetItemProvider(this); + __pSectionTableView->AddSectionTableViewItemEventListener(*this); + + // Adds the Section TableView to the form + AddControl(__pSectionTableView); + return r; +} + +result +SectionTableViewSample::OnTerminating(void) +{ + return E_SUCCESS; +} + +// ISectionTableViewItemEventListener implementation +void +SectionTableViewSample::OnSectionTableViewItemStateChanged(SectionTableView& tableView, int sectionIndex, int itemIndex, TableViewItem* pItem, TableViewItemStatus status) +{ + // .... +} + +void +SectionTableViewSample::OnSectionTableViewContextItemActivationStateChanged(SectionTableView& tableView, int sectionIndex, int itemIndex, TableViewContextItem* pContextItem, bool activated) +{ + // .... +} + +// ISectionTableViewItemProvider implementation +int +SectionTableViewSample::GetSectionCount(void) +{ + return 10; +} + +int +SectionTableViewSample::GetItemCount(int sectionIndex) +{ + return 5; +} + +bool +SectionTableViewSample::HasSectionHeader(int sectionIndex) +{ + return true; +} + +bool +SectionTableViewSample::HasSectionFooter(int sectionIndex) +{ + return true; +} + +String +SectionTableViewSample::GetSectionHeader(int sectionIndex) +{ + String text; + text.Format(30, L"Section header %d", sectionIndex); + + return text; +} + +String +SectionTableViewSample::GetSectionFooter(int sectionIndex) +{ + String text; + text.Format(30, L"Section footer %d", sectionIndex); + + return text; +} + +int +SectionTableViewSample::GetDefaultItemHeight(void) +{ + return 100; +} + +TableViewItem* +SectionTableViewSample::CreateItem(int sectionIndex, int itemIndex, int itemWidth) +{ + TableViewAnnexStyle style = TABLE_VIEW_ANNEX_STYLE_NORMAL; + TableViewItem* pItem = new TableViewItem(); + + switch (itemIndex % 6) + { + case 0: + style = TABLE_VIEW_ANNEX_STYLE_NORMAL; + break; + case 1: + style = TABLE_VIEW_ANNEX_STYLE_MARK; + break; + case 2: + style = TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING; + break; + case 3: + style = TABLE_VIEW_ANNEX_STYLE_DETAILED; + break; + case 4: + style = TABLE_VIEW_ANNEX_STYLE_RADIO; + break; + case 5: + style = TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER; + break; + default: + break; + } + + pItem->Construct(Dimension(itemWidth, GetDefaultItemHeight()), style); + + String text; + text.Format(30, L"TableViewItem %d", itemIndex); + + Label* pLabel = new Label(); + pLabel->Construct(Rectangle(0, 0, itemWidth, GetDefaultItemHeight()), text); + + pItem->AddControl(pLabel); + + return pItem; + +} + +bool +SectionTableViewSample::DeleteItem(int sectionIndex, int itemIndex, TableViewItem* pItem) +{ + pItem->Destroy(); + + return true; +} + +void +SectionTableViewSample::UpdateItem(int sectionIndex, int itemIndex, TableViewItem* pItem) +{ + // .... +} +* @endcode +* +*/ +class _OSP_EXPORT_ SectionTableView + : public Tizen::Ui::Container +{ +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. + * + * @since 2.0 + */ + SectionTableView(void); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~SectionTableView(void); + + /** + * Initializes this instance of %SectionTableView with the specified parameters. + * + * @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. + * + */ + result Construct(const Tizen::Graphics::Rectangle& rect, bool itemDivider, TableViewScrollBarStyle scrollStyle); + + /** + * Initializes this instance of %SectionTableView with the specified parameters. + * + * @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. + * + */ + result Construct(const Tizen::Graphics::FloatRectangle& rect, bool itemDivider, TableViewScrollBarStyle scrollStyle); + + /** + * Sets the item provider that creates and deletes items for the section style table view. + * + * @since 2.0 + * + * @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. + */ + void SetItemProvider(ISectionTableViewItemProvider* pProvider); + + /** + * Sets the item provider that creates and deletes items for the section style table view. + * + * @since 2.1 + * + * @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. + */ + void SetItemProviderF(ISectionTableViewItemProviderF* pProvider); + + /** + * Sets the color of a section. + * + * @since 2.0 + * + * @param[in] color The section color + */ + void SetSectionColor(const Tizen::Graphics::Color& color); + + /** + * Gets the color of a section. + * + * @since 2.0 + * + * @return The section color + */ + Tizen::Graphics::Color GetSectionColor(void) const; + + /** + * Sets the grouped look is enabled. + * + * @since 2.0 + * + * @param[in] enable The enabled/disabled status + */ + void SetGroupedLookEnabled(bool enable); + + /** + * 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 + */ + bool IsGroupedLookEnabled(void) const; + + /** + * Adds a listener instance that listens to state changes of table view items. @n + * The added listener can listen to events on the specified event dispatcher's context when they are fired. + * + * @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. + */ + result AddSectionTableViewItemEventListener(ISectionTableViewItemEventListener& listener); + + /** + * Removes a listener instance that listens to state changes of table view items. @n + * The removed listener cannot listen to events when they are fired. + * + * @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. + */ + result RemoveSectionTableViewItemEventListener(ISectionTableViewItemEventListener& listener); + + /** + * Adds a listener instance that listens to state changes of a fast scroll. @n + * The added listener can listen to events on the specified event dispatcher's context when they are fired. + * + * @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. + */ + result AddFastScrollListener(IFastScrollListener& listener); + + /** + * Removes a listener instance that listens to state changes of a fast scroll. @n + * The removed listener cannot listen to events when they are fired. + * + * @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. + */ + result RemoveFastScrollListener(IFastScrollListener& listener); + + /** + * Adds a listener instance that listens to state changes of a scroll event. @n + * The added listener can listen to events on the specified event dispatcher's context when they are fired. + * + * @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. + * @see IScrollEventListener::OnScrollEndReached() + * @see RemoveScrollEventListener() + */ + result AddScrollEventListener(IScrollEventListener& listener); + + /** + * Removes a listener instance that listens to state changes of a scroll event. @n + * The removed listener cannot listen to events when they are fired. + * + * @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. + * @see IScrollEventListener::OnScrollEndReached() + * @see AddScrollEventListener() + */ + result RemoveScrollEventListener(IScrollEventListener& listener); + + /** + * Adds a listener instance that listens to state changes of a scroll event. @n + * The added listener can listen to events on the specified event dispatcher's context when they are fired. + * + * @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. + * @see IScrollEventListenerF::OnScrollEndReached() + * @see RemoveScrollEventListener() + */ + result AddScrollEventListener(IScrollEventListenerF& listener); + + /** + * Removes a listener instance that listens to state changes of a scroll event. @n + * The removed listener cannot listen to events when they are fired. + * + * @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. + * @see IScrollEventListenerF::OnScrollEndReached() + * @see AddScrollEventListener() + */ + result RemoveScrollEventListener(IScrollEventListenerF& listener); + + /** + * Sets the text index of the fast scroll. + * + * @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. + */ + result SetFastScrollIndex(const Tizen::Base::String& text, bool useSearchIcon); + + /** + * Gets the section and item indexes of the top item. + * + * @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. + */ + result GetTopDrawnItemIndex(int& sectionIndex, int& itemIndex) const; + + /** + * Gets the section and item indexes of the bottom item. + * + * @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 Bottom drawn item is not found. + */ + result GetBottomDrawnItemIndex(int& sectionIndex, int& itemIndex) const; + + /** + * 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 + * + * @return An error code + * @param[in] sectionIndex The section 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 + * @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()). + */ + result ScrollToItem(int sectionIndex, int itemIndex, TableViewScrollItemAlignment itemAlignment = TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_TOP); + + /** + * Checks or unchecks the item at the specified index. + * + * @since 2.0 + * + * @return An error code + * @param[in] sectionIndex The section 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 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()). + */ + result SetItemChecked(int sectionIndex, int itemIndex, bool check); + + /** + * 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. + * @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 + * %TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + */ + bool IsItemChecked(int sectionIndex, int itemIndex) const; + + /** + * Enables or disables the item at the specified index. + * + * @since 2.0 + * + * @return An error code + * @param[in] sectionIndex The section 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 + * %TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + */ + result SetItemEnabled(int sectionIndex, int itemIndex, bool enable); + + /** + * 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] 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; + + /** + * Counts the total number of sections. + * + * @since 2.0 + * + * @return The total number of sections + */ + int GetSectionCount(void) const; + + /** + * Counts all the items of the specified section. + * + * @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. + */ + int GetItemCountAt(int sectionIndex) const; + + /** + * 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 + * 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 + * @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. + * - This method does not work during the ITableViewItemProvider call-back procedure. + */ + result RefreshItem(int sectionIndex, int itemIndex, TableViewRefreshType type); + + /** + * Updates all items of the table view. @n + * Note that calling the %RefreshAllItems() method invokes ISectionTableViewItemProvider::UpdateItem() or ISectionTableViewItemProviderF::UpdateItem() for + * all loaded items. + * + * @since 2.1 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_OPERATION The %SectionTableView item provider is processing the other request. + */ + result RefreshAllItems(void); + + /** + * Updates all the items of a table view. @n + * This method deletes all the items in the table view and invokes the methods of the item provider again to update the table view. + * + * @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. + * @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 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. + */ + void UpdateTableView(void); + + /** + * Gets the index of the item at the specified position. + * + * @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 + * @remarks + * - 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 %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; + + /** + * Gets the index of the item at the specified position. + * + * @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 + * @remarks + * - 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 + * %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; + + /** + * Sets the color of a division line between items. + * + * @since 2.0 + * + * @return An error code + * @param[in] color The division line color + */ + void SetItemDividerColor(const Tizen::Graphics::Color& color); + + /** + * Gets the color of a division line between items. + * + * @since 2.0 + * + * @return The color of a division line + */ + Tizen::Graphics::Color GetItemDividerColor(void) const; + + /** + * Sets the background color of this control. + * + * @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, + * only the bitmap image is displayed. + */ + void SetBackgroundColor(const Tizen::Graphics::Color& color); + + /** + * Gets the background color of this control. + * + * @since 2.0 + * + * @return The background color + */ + Tizen::Graphics::Color GetBackgroundColor(void) const; + + /** + * Sets the scroll input handling mode. + * + * @since 2.0 + * + * @param[in] mode The scroll input handling mode + * @see GetScrollInputMode() + */ + void SetScrollInputMode(ScrollInputMode mode); + + /** + * Gets the scroll input handling mode. + * + * @since 2.0 + * + * @return The scroll input handling mode + * @see SetScrollInputMode() + */ + 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. + * + * @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. + * @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. + * - This method does not work during the ITableViewItemProvider call-back procedure. + */ + 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. + * + * @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 + * @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 + * 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); + + /** + * Gets the current scroll position + * + * @since 2.1 + */ + int GetCurrentScrollPosition(void) const; + + /** + * Gets the current scroll position + * + * @since 2.1 + */ + float GetCurrentScrollPositionF(void) const; + + /* + * Enables or disables the scroll of %SectionTableView items. + * + * @since 2.0 + */ + void SetScrollEnabled(bool enable); + + /* + * Checks whether the scroll is enabled or disabled. + * + * @since 2.0 + */ + bool IsScrollEnabled(void) const; + + /** + * Opens the context item at a specified index. + * + * @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. + */ + result OpenContextItem(int sectionIndex, int itemIndex); + + /** + * Closes the context item at a specified index. + * + * @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. + */ + result CloseContextItem(int sectionIndex, int itemIndex); + + /** + * Checks whether the context item at a specified index is opened. + * + * @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. + */ + bool IsContextItemOpened(int sectionIndex, int itemIndex) const; + + /** + * Sets the horizontal alignment of the text of the %SectionTableView header. + * + * @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. + * @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() + */ + result SetSectionHeaderTextHorizontalAlignment(int sectionIndex, HorizontalAlignment alignment); + + /** + * Gets the horizontal alignment of the text of the %SectionTableView header. + * + * @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. + * @remarks The specific error code can be accessed using the GetLastResult() method. + * @see SetSectionHeaderTextHorizontalAlignment() + */ + HorizontalAlignment GetSectionHeaderTextHorizontalAlignment(int sectionIndex) const; + + /** + * Sets the horizontal alignment of the text of the %SectionTableView footer. + * + * @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. + * @remarks By default, the text of the section footer is right aligned. + * @see GetSectionFooterTextHorizontalAlignment() + */ + result SetSectionFooterTextHorizontalAlignment(int sectionIndex, HorizontalAlignment alignment); + + /** + * Gets the horizontal alignment of the text of the %SectionTableView footer. + * + * @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. + * @remarks The specific error code can be accessed using the GetLastResult() method. + * @see SetSectionFooterTextHorizontalAlignment() + */ + HorizontalAlignment GetSectionFooterTextHorizontalAlignment(int sectionIndex) const; + +private: + friend class _TableViewImpl; + + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + SectionTableView(const SectionTableView& rhs); + + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + SectionTableView& operator =(const SectionTableView& rhs); +}; // SectionTableView + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_SECTION_TABLE_VIEW_H_ diff --git a/inc/FUiCtrlSimpleItem.h b/inc/FUiCtrlSimpleItem.h new file mode 100644 index 0000000..9e7d59b --- /dev/null +++ b/inc/FUiCtrlSimpleItem.h @@ -0,0 +1,126 @@ +// +// 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 FUiCtrlSimpleItem.h + * @brief This is the header file for the %SimpleItem class. + * + * This header file contains the declarations of the %SimpleItem class and its helper classes. + */ + +#ifndef _FUI_CTRL_SIMPLE_ITEM_H_ +#define _FUI_CTRL_SIMPLE_ITEM_H_ + +#include +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _SimpleItemImpl; + +/** + * @class SimpleItem + * @brief This class defines the common behavior of a %SimpleItem. + * + * @since 2.0 + * + * The %SimpleItem class displays a list item, which is the unit of handling a ListView or GroupedListView. It provides the default + * formatting of the list items. + * + * For more information on the class features, see ListViews. + * + */ + +class _OSP_EXPORT_ SimpleItem + : public ListItemBase +{ +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. + * + * @since 2.0 + */ + SimpleItem(void); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~SimpleItem(void); + + /** + * Initializes this instance of %SimpleItem with the specified parameters. + * + * @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. + */ + result Construct(const Tizen::Graphics::Dimension& itemSize, ListAnnexStyle style); + + /** + * Initializes this instance of %SimpleItem with the specified parameters. + * + * @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. + */ + result Construct(const Tizen::Graphics::FloatDimension& itemSize, ListAnnexStyle style); + + /** + * Sets the text string and bitmap image for %SimpleItem. + * + * @since 2.0 + * + * @return An error code + * @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_SYSTEM A system error has occurred. + */ + result SetElement(const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBitmap = null); + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + SimpleItem(const SimpleItem& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + SimpleItem& operator =(const SimpleItem& rhs); +}; // SimpleItem + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_SIMPLE_ITEM_H_ diff --git a/inc/FUiCtrlSlidableGroupedList.h b/inc/FUiCtrlSlidableGroupedList.h new file mode 100644 index 0000000..d4bd4fc --- /dev/null +++ b/inc/FUiCtrlSlidableGroupedList.h @@ -0,0 +1,1311 @@ +// +// 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. +// + +/** + * @if OSPDEPREC + * @file FUiCtrlSlidableGroupedList.h + * @brief This is the header file for the %SlidableGroupedList class. + * + * This header file contains the declarations of the %SlidableGroupedList class and its helper classes. + * @endif + */ +#ifndef _FUI_CTRL_SLIDABLE_GROUPED_LIST_H_ +#define _FUI_CTRL_SLIDABLE_GROUPED_LIST_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace Tizen { namespace Base { namespace Runtime +{ +class IEvent; +} } } + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @if OSPDEPREC + * @class SlidableGroupedList + * @brief [Deprecated] This class defines the common behavior of the %SlidableGroupedList control. + * + * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @since 2.0 + * + * 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 + * 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. + * + * The operation of %SlidableGroupedList is the same as that of a GroupedList, except + * that a %SlidableGroupedList does not hold all items in the memory. Most of the item manipulations + * are available when they are loaded, but the check state is maintained for all items + * whether they are loaded or not. + * ISlidableGroupedListEventListener must be implemented so that an application can + * be notified when the items need to be loaded as the user scrolls through a list. + * If an application wants to perform tasks when the state of a list item is changed, + * it must implement IGroupedItemEventListener and register it to the slidable + * 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 + * must be deleted by the application. + * + * For more information, see CustomListItem and CustomListItemFormat. + * + * The following example demonstrates how to use the %SlidableGroupedList class. + * + * Example: + * + * @image html ui_controls_slidablegroupedlist.png + * + * This is the simple UI application which uses a %SlidableGroupedList control. + * + * @code +// Sample code for SlidableGroupedListSample.h +#include + +class SlidableGroupedListSample + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::IGroupedItemEventListener + , public Tizen::Ui::ISlidableGroupedListEventListener +{ +public: + SlidableGroupedListSample(void) + : __pSlidableGroupedList(null) + , __pCustomListItemFormat(null){} + + bool Initialize(void); + virtual result OnInitializing(void); + virtual result OnTerminating(void); + + Tizen::Ui::Controls::CustomListItem* LoadListItem(int itemId); + virtual void OnItemStateChanged(const Tizen::Ui::Control &source, int groupIndex, int itemIndex, int itemId, int elementId, Tizen::Ui::ItemStatus status); + virtual void OnItemStateChanged(const Tizen::Ui::Control &source, int groupIndex, int itemIndex, int itemId, Tizen::Ui::ItemStatus status); + virtual void OnListPropertyRequested(const Tizen::Ui::Control &source); + virtual void OnLoadToTopRequested(const Tizen::Ui::Control &source, int groupIndex, int itemIndex, int numItems); + virtual void OnLoadToBottomRequested(const Tizen::Ui::Control &source, int groupIndex, int itemIndex, int numItems); + virtual void OnUnloadItemRequested(const Tizen::Ui::Control& source, int groupIndex, int itemIndex); + +private: + static const int ID_LIST_TEXT = 101; + static const int ID_LIST_BITMAP = 102; + static const int ITEM_HEIGHT = 103; + static const int ITEM_COUNT = 104; + static const int ITEM_COUNT_GROUP1 = 10; + static const int ITEM_COUNT_GROUP2 = 20; + static const int ITEM_COUNT_GROUP3 = 30; + static const int ITEM_ID_LIMITS = 30; + + Tizen::Ui::Controls::SlidableGroupedList* __pSlidableGroupedList; + Tizen::Ui::Controls::CustomListItemFormat* __pCustomListItemFormat; +}; + * @endcode + * + * @code +// Sample code for SlidableGroupedListSample.cpp +#include +#include + +#include "SlidableGroupedListSample.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; + + +bool +SlidableGroupedListSample::Initialize(void) +{ + Construct(FORM_STYLE_NORMAL); + return true; +} + +result +SlidableGroupedListSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + // Creates an instance of SlidableGroupedList + __pSlidableGroupedList = new SlidableGroupedList(); + __pSlidableGroupedList->Construct(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height), CUSTOM_LIST_STYLE_NORMAL); + __pSlidableGroupedList->AddGroupedItemEventListener(*this); + __pSlidableGroupedList->AddSlidableGroupedListEventListener(*this); + + // Creates an instance of CustomListItemFormat + __pCustomListItemFormat = new CustomListItemFormat(); + __pCustomListItemFormat->Construct(); + __pCustomListItemFormat->AddElement(ID_LIST_TEXT, Rectangle(10, 25, 240, 80)); + __pCustomListItemFormat->AddElement(ID_LIST_BITMAP, Rectangle(250, 10, 70, 80)); + + // Adds the groups to the slidable grouped list + __pSlidableGroupedList->AddGroup(L"Group1", null, ITEM_COUNT_GROUP1, ITEM_COUNT_GROUP1 * ITEM_HEIGHT); + __pSlidableGroupedList->AddGroup(L"Group2", null, ITEM_COUNT_GROUP2, ITEM_COUNT_GROUP2 * ITEM_HEIGHT); + __pSlidableGroupedList->AddGroup(L"Group3", null, ITEM_COUNT_GROUP3, ITEM_COUNT_GROUP3 * ITEM_HEIGHT); + + // Adds the slidable grouped list to the form + AddControl(__pSlidableGroupedList); + + return r; +} + +result +SlidableGroupedListSample::OnTerminating(void) +{ + result r = E_SUCCESS; + + // Deallocates the item format + delete __pCustomListItemFormat; + + return r; +} + +CustomListItem* +SlidableGroupedListSample::LoadListItem(int itemId) +{ + // Gets instances of Bitmap + AppResource* pAppResource = Application::App::GetInstance()->GetAppResource(); + Bitmap *pBitmapNormal = pAppResource->GetBitmapN(L"tizen.png"); + Bitmap *pBitmapFocused = pAppResource->GetBitmapN(L"tizen.png"); + + // Creates an instance of String to set an item element + String itemText; + int groupIndex = itemId / ITEM_ID_LIMITS; + int itemIndex = itemId % ITEM_ID_LIMITS; + itemText.Format(128, L"ITEM %d-%d", groupIndex+1, itemIndex+1); + + // Creates an instance of CustomListItem + CustomListItem* pItem = new CustomListItem(); + pItem->Construct(ITEM_HEIGHT); + pItem->SetItemFormat(*__pCustomListItemFormat); + pItem->SetElement(ID_LIST_TEXT, itemText); + pItem->SetElement(ID_LIST_BITMAP, *pBitmapNormal, pBitmapFocused); + + // Deallocates bitmaps + delete pBitmapNormal; + delete pBitmapFocused; + + return pItem; +} + +// IGroupedItemEventListener implementation +void +SlidableGroupedListSample::OnItemStateChanged(const Control &source, int groupIndex, int itemIndex, int itemId, ItemStatus status) +{ + switch (itemId) + { + case 1: + { + // .... + } + break; + default: + break; + } +} + +void +SlidableGroupedListSample::OnItemStateChanged(const Control &source, int groupIndex, int itemIndex, int itemId, int elementId, ItemStatus status) +{ + switch (itemId) + { + case 1: + switch (elementId) + { + case ID_LIST_TEXT: + { + // .... + } + break; + case ID_LIST_BITMAP: + { + // .... + } + break; + } + break; + default: + break; + } +} + +// IFastScrollEventListener implementation +void +SlidableGroupedListSample::OnListPropertyRequested(const Control &source) +{ + // .... +} + +void +SlidableGroupedListSample::OnLoadToTopRequested(const Control &source, int groupIndex, int itemIndex, int numItems) +{ + for(int i=0; i < numItems; ++i) + { + // Loads items upwards + int itemId = ITEM_ID_LIMITS * groupIndex + itemIndex; + + CustomListItem* pItem = LoadListItem(itemId); + __pSlidableGroupedList->LoadItemToTop(*pItem, itemId); + } +} + +void +SlidableGroupedListSample::OnLoadToBottomRequested (const Control &source, int groupIndex, int itemIndex, int numItems) +{ + for(int i=0; i< numItems; ++i) + { + // Loads items downwards + int itemId = ITEM_ID_LIMITS * groupIndex + itemIndex + i; + + CustomListItem* pItem = LoadListItem(itemId); + __pSlidableGroupedList->LoadItemToBottom(*pItem, itemId); + } +} + +void +SlidableGroupedListSample::OnUnloadItemRequested(const Control& source, int groupIndex, int itemIndex) +{ + // Releases resources of the specified item + // .... +} + * @endcode + * @endif + */ +class _OSP_EXPORT_ SlidableGroupedList + : public Tizen::Ui::Control +{ +public: + /** + * @if OSPDEPREC + * The object is not fully constructed after this constructor is called. @n + * 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. + * @since 2.0 + * @endif + */ + SlidableGroupedList(void); + + /** + * @if OSPDEPREC + * 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. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. + * @since 2.0 + * @endif + */ + virtual ~SlidableGroupedList(void); + +// Operation + /** + * @if OSPDEPREC + * 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. + * @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] 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_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. + * - The minimum size of this control is 274 x 148 on a WVGA screen, 180 x 96 on a HVGA screen and 137 x 74 on a WQVGA screen. + * + * @endif + */ + result Construct(const Tizen::Graphics::Rectangle& rect, CustomListStyle style, bool itemDivider = true, bool fastScroll = false); + + /** + * @if OSPDEPREC + * Adds the specified listener instance. + * 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. + * @since 2.0 + * + * @param[in] listener The event listener to add + * @endif + */ + void AddSlidableGroupedListEventListener(Tizen::Ui::ISlidableGroupedListEventListener& listener); + + /** + * @if OSPDEPREC + * Removes the specified listener instance. + * 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. + * @since 2.0 + * + * @param[in] listener The event listener to remove + * @endif + */ + void RemoveSlidableGroupedListEventListener(Tizen::Ui::ISlidableGroupedListEventListener& listener); + + /** + * @if OSPDEPREC + * 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. + * @since 2.0 + * + * @return An error code + * @param[in] item The %CustomListItem instance + * @param[in] itemId The item ID + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result LoadItemToTop(const Tizen::Ui::Controls::CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID); + + /** + * @if OSPDEPREC + * 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. + * @since 2.0 + * + * @return An error code + * @param[in] item The %CustomListItem object + * @param[in] itemId The item ID + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result LoadItemToBottom(const Tizen::Ui::Controls::CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID); + + /** + * @if OSPDEPREC + * 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. + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result UnloadAllItems(void); + + + /** + * @if OSPDEPREC + * Removes all the items in the specified group. @n + * The group is not removed. + * + * @brief [Deprecated] + * @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 + * @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. + * @endif + */ + result RemoveAllItemsAt(int groupIndex); + + /** + * @if OSPDEPREC + * Removes all the items in the list. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. + * @since 2.0 + * + * @return An error code + * @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. + * - After the items have been removed, the ISlidableGroupedListEventListener::OnListPropertyRequested() method is called. + * @see ISlidableGroupedListEventListener + * @endif + */ + result RemoveAllItems(void); + + /** + * @if OSPDEPREC + * Removes the specified listener instance. @n + * 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. + * @since 2.0 + * + * @param[in] listener The event listener to remove + * @endif + */ + void RemoveFastScrollEventListener(Tizen::Ui::IFastScrollEventListener& listener); + + /** + * @if OSPDEPREC + * Removes the specified listener instance. @n + * 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. + * @since 2.0 + * + * @param[in] listener The event listener to remove + * @endif + */ + void RemoveGroupedItemEventListener(Tizen::Ui::IGroupedItemEventListener& listener); + + /** + * @if OSPDEPREC + * Scrolls to the bottom of the %SlidableGroupedList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. + * @since 2.0 + * @endif + */ + void ScrollToBottom(void); + + /** + * @if OSPDEPREC + * Scrolls to 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 + * @endif + */ + void ScrollToTop(void); + + /** + * @if OSPDEPREC + * Scrolls to the item at the specified index. @n + * 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. + * @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 A specified input parameter is invalid. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result ScrollToTop(int groupIndex, int itemIndex); + + /** + * @if OSPDEPREC + * Scrolls to the group at the specified index. @n + * 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 + * + * @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. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result ScrollToTop(int groupIndex); + + + /** + * @if OSPDEPREC + * 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 + * + * @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. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result SetAllItemsChecked(int groupIndex, bool check); + + /** + * @if OSPDEPREC + * 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. + * @since 2.0 + * + * @return An error code + * @param[in] groupIndex The group index + * @param[in] text The string of the group to append + * @param[in] pBackgroundBitmap The bitmap of the group + * @param[in] groupId The group ID + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result SetGroupAt(int groupIndex, const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBackgroundBitmap, int groupId = LIST_ITEM_UNSPECIFIED_ID); + + /** + * @if OSPDEPREC + * Sets the specified item as checked or unchecked. + * + * @brief [Deprecated] + * @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 + * @param[in] itemIndex The index of the item to check + * @param[in] check Set to @c true to check the item, @n + * else @c false to uncheck it + * @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. + * @endif + */ + result SetItemChecked(int groupIndex, int itemIndex, bool check); + + /** + * @if OSPDEPREC + * 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 + * + * @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] enable Set to @c true to enable the item, @n + * else @c false to disable it + * @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. + * @endif + */ + result SetLoadedItemEnabled(int groupIndex, int itemIndex, bool enable); + + /** + * @if OSPDEPREC + * Removes all the checked items from the group. + * + * @brief [Deprecated] + * @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] height The estimated/real height of the items of the group + * @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. + * @endif + */ + result RemoveAllCheckedItemsAt(int groupIndex, int height); + + /** + * @if OSPDEPREC + * Removes the specified item from the group. + * + * @brief [Deprecated] + * @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] 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. + * @exception E_SYSTEM A system error has occurred. + * @remarks The removed list item is deleted from the memory. + * @endif + */ + result RemoveItemAt(int groupIndex, int itemIndex, int height); + + + /** + * @if OSPDEPREC + * 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. + * @since 2.0 + * + * @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. + * @exception E_SYSTEM A system error has occurred. + * @remarks When the specified group is removed, all the items in the group are also removed. + * @remarks The removed list items are deleted from the memory. + * @endif + */ + result RemoveGroupAt(int groupIndex); + + + /** + * @if OSPDEPREC + * 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. + * @since 2.0 + * + * @return A pointer to the loaded item, @n + * else @c null if the specified item is not currently loaded + * @param[in] groupIndex The group index + * @param[in] itemIndex The item index + * @endif + */ + const Tizen::Ui::Controls::CustomListItem* GetLoadedItemAt(int groupIndex, int itemIndex) const; + + + /** + * @if OSPDEPREC + * 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. + * @since 2.0 + * + * @return The item ID, @n + * else LIST_ITEM_UNSPECIFIED_ID if the specified item is not currently loaded + * @param[in] groupIndex The group index + * @param[in] itemIndex The item index + * @endif + */ + int GetLoadedItemIdAt(int groupIndex, int itemIndex) const; + + + /** + * @if OSPDEPREC + * 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. + * @since 2.0 + * + * @return An error code, @n + * else @c -1 if the specified item is not currently loaded + * @param[in] itemId The item ID + * @param[out] groupIndex The group index + * @param[out] itemIndex The item index + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result GetLoadedItemIndexFromItemId(int itemId, int& groupIndex, int& itemIndex) const; + + /** + * @if OSPDEPREC + * 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. + * @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 This method can only be used when the style of the list allows multiple selections. + * @endif + */ + result RemoveAllCheckedItems(int height); + + /** + * @if OSPDEPREC + * Gets the index of the first loaded item. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. + * @since 2.0 + * + * @return An error code + * @param[out] groupIndex The group index + * @param[out] itemIndex The item index + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result GetFirstLoadedItemIndex(int& groupIndex, int& itemIndex) const; + + /** + * @if OSPDEPREC + * Gets the index of the last loaded item. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. + * @since 2.0 + * + * @return An error code + * @param[out] groupIndex The group index + * @param[out] itemIndex The item index + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result GetLastLoadedItemIndex(int& groupIndex, int& itemIndex) const; + + /** + * @if OSPDEPREC + * 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. + * @since 2.0 + * + * @return An error code + * @param[in] text The text of the first index + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result SetFastScrollMainIndex(const Tizen::Base::String& text); + + /** + * @if OSPDEPREC + * Sets the background color of this control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. + * @since 2.0 + * + * @param[in] color The background color + * @endif + */ + void SetBackgroundColor(const Tizen::Graphics::Color& color); + + /** + * @if OSPDEPREC + * Sets the text of the empty list. + * + * @brief [Deprecated] + * @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 + * @endif + */ + void SetTextOfEmptyList(const Tizen::Base::String& text); + + /** + * @if OSPDEPREC + * 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. + * @since 2.0 + * + * @param[in] color The color of the text to display + * @endif + */ + void SetTextColorOfEmptyList(const Tizen::Graphics::Color& color); + + /** + * @if OSPDEPREC + * 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. + * @since 2.0 + * + * @return The color of the text to be displayed + * @endif + */ + Tizen::Graphics::Color GetTextColorOfEmptyList(void) const; + + /** + * @if OSPDEPREC + * Sets the contents of the item in the specified group. + * + * @brief [Deprecated] + * @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 CustomListItem object + * @param[in] item The item + * @param[in] itemId The item 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. + * @remarks Do not add, insert, or set an item, that already belongs to %SlidableGroupedList. + * @endif + */ + result SetItemAt(int groupIndex, int itemIndex, const Tizen::Ui::Controls::CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID); + + /** + * @if OSPDEPREC + * Adds the specified listener instance. + * 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. + * @since 2.0 + * + * @param[in] listener The event listener to add + * @endif + */ + void AddFastScrollEventListener(Tizen::Ui::IFastScrollEventListener& listener); + + /** + * @if OSPDEPREC + * Adds the specified group to the %SlidableGroupedList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the %GroupedListView class. + * @since 2.0 + * + * @return An error code + * @param[in] text The string of the group to append + * @param[in] pBackgroundBitmap The background bitmap of the group + * @param[in] itemCount The number of items of the group + * @param[in] groupHeight The total height of the items of the group + * @param[in] groupId The group ID + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result AddGroup(const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBackgroundBitmap, int itemCount, int groupHeight, int groupId = LIST_ITEM_UNSPECIFIED_ID); + + /** + * @if OSPDEPREC + * Adds the specified listener instance. + * 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. + * @since 2.0 + * + * @param[in] listener The event listener to add + * @endif + */ + void AddGroupedItemEventListener(Tizen::Ui::IGroupedItemEventListener& listener); + + + /** + * @if OSPDEPREC + * Adds the item to the specified group. + * + * @brief [Deprecated] + * @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] item The CustomListItem object + * @param[in] itemId The item 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. + * @remarks The added item is deleted automatically when the list is destroyed. + * Do not add, insert, or set an item that already belongs to %SlidableGroupedList. + * @endif + */ + result AddItem(int groupIndex, const Tizen::Ui::Controls::CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID); + + /** + * @if OSPDEPREC + * 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. + * @since 2.0 + * + * @return An error code + * @param[out] groupIndex The group index + * @param[out] itemIndex The item index + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result GetBottomDrawnItemIndex(int& groupIndex, int& itemIndex) const; + + + /** + * @if OSPDEPREC + * 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. + * @since 2.0 + * + * @return An error code + * @param[out] groupIndex The group index + * @param[out] itemIndex The item index + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result GetFirstCheckedItemIndex(int& groupIndex, int& itemIndex) const; + + + /** + * @if OSPDEPREC + * 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. + * @since 2.0 + * + * @return The group ID + * @param[in] groupIndex The group index + * @endif + */ + int GetGroupIdAt(int groupIndex) const; + + + /** + * @if OSPDEPREC + * 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. + * @since 2.0 + * + * @return The group index + * @param[in] groupId The group ID + * @endif + */ + int GetGroupIndexFromGroupId(int groupId) const; + + + /** + * @if OSPDEPREC + * Gets the index of the last checked item. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. + * @since 2.0 + * + * @return An error code + * @param[out] groupIndex The group index + * @param[out] itemIndex The item index + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result GetLastCheckedItemIndex(int& groupIndex, int& itemIndex) const; + + /** + * @if OSPDEPREC + * 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. + * @since 2.0 + * + * @return An error code + * @param[in,out] groupIndex The group index + * @param[in,out] itemIndex The item index + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result GetNextCheckedItemIndexAfter(int& groupIndex, int& itemIndex) const; + + /** + * @if OSPDEPREC + * 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. + * @since 2.0 + * + * @return An error code + * @param[out] groupIndex The group index + * @param[out] itemIndex The item index + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result GetTopDrawnItemIndex(int& groupIndex, int& itemIndex) const; + + /** + * @if OSPDEPREC + * 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. + * @since 2.0 + * + * @return An error code + * @param[in] x The x position of the point + * @param[in] y The y position of the point + * @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. @n + * There is no item at the specified position. + * @endif + */ + result GetItemIndexFromPosition(int x, int y, int& groupIndex, int& itemIndex) const; + + /** + * @if OSPDEPREC + * 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. + * @since 2.0 + * + * @return An error code + * @param[in] position The position of the point + * @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. @n + * There is no item at the specified position. + * @endif + */ + result GetItemIndexFromPosition(const Tizen::Graphics::Point& position, int& groupIndex, int& itemIndex) const; + + /** + * @if OSPDEPREC + * Inserts the group at the specified group index. + * + * @brief [Deprecated] + * @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] text The string of the group to append + * @param[in] pBackgroundBitmap The background bitmap of the group + * @param[in] itemCount The count of all the items in the group + * @param[in] groupHeight The total height of all the items in the group + * @param[in] groupId The group 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. + * @endif + */ + result InsertGroupAt(int groupIndex, const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBackgroundBitmap, int itemCount, int groupHeight, int groupId = LIST_ITEM_UNSPECIFIED_ID); + + /** + * @if OSPDEPREC + * 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. + * @since 2.0 + * + * @return @c true if the item is checked, @n + * else @c false + * @param[in] groupIndex The group index + * @param[in] itemIndex The item index + * + * @remarks This method can only be used when the style of the list allows selection. + * @endif + */ + bool IsItemChecked(int groupIndex, int itemIndex) const; + + /** + * @if OSPDEPREC + * 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. + * @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 + * @endif + */ + bool IsLoadedItemEnabled(int groupIndex, int itemIndex) const; + + + /** + * @if OSPDEPREC + * 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. + * @since 2.0 + * + * @return @c true if the item is loaded, @n + * else @c false + * @param[in] groupIndex The group index + * @param[in] itemIndex The item index + * @endif + */ + bool IsItemLoaded(int groupIndex, int itemIndex) const; + + + /** + * @if OSPDEPREC + * Removes all the groups of the %SlidableGroupedList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the GroupedListView class. + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @remarks When the specified group is removed, all the items in the group are also removed. + * @remarks The removed list items are deleted from the memory. + * @remarks After the items have been removed, the ISlidableGroupedListEventListener::OnListPropertyRequested() method is called. + * @endif + */ + result RemoveAllGroups(void); + + /** + * @if OSPDEPREC + * 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. + * @since 2.0 + * + * @return The count of all the groups + * @endif + */ + int GetGroupCount(void) const; + + /** + * @if OSPDEPREC + * 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. + * @since 2.0 + * + * @return An error code + * @param[in] groupIndex The group index + * @param[in] itemIndex The item index + * @param[in] item The CustomListItem object + * @param[in] itemId The item ID + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @remarks The inserted item is deleted automatically when the list is destroyed. + * Do not add, insert, or set an item, that already belongs to %SlidableGroupedList. + * @endif + */ + result InsertItemAt(int groupIndex, int itemIndex, const Tizen::Ui::Controls::CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID); + + + /** + * @if OSPDEPREC + * 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. + * @since 2.0 + * + * @return The count of all the items in the specified group + * @param[in] groupIndex The group index + * @endif + */ + int GetItemCountAt(int groupIndex) const; + + /** + * @if OSPDEPREC + * Draws and shows the specified item of %SlidableGroupedList. + * + * @brief [Deprecated] + * @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. + * @exception E_INVALID_OPERATION The item has never been drawn before calling this method. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result RefreshItem(int groupIndex, int itemIndex); + + /** + * @if OSPDEPREC + * Draws and shows the specified group of %SlidableGroupedList. + * + * @brief [Deprecated] + * @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 + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified @c groupIndex is invalid. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result RefreshGroup(int groupIndex); + +protected: + + friend class _SlidableGroupedListImpl; +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + SlidableGroupedList(const SlidableGroupedList& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + SlidableGroupedList& operator =(const SlidableGroupedList& rhs); + +}; //SlidableGroupedList + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_SLIDABLE_GROUPED_LIST_H_ diff --git a/inc/FUiCtrlSlidableList.h b/inc/FUiCtrlSlidableList.h new file mode 100644 index 0000000..e46310c --- /dev/null +++ b/inc/FUiCtrlSlidableList.h @@ -0,0 +1,993 @@ +// +// 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. +// + +/** + * @if OSPDEPREC + * @file FUiCtrlSlidableList.h + * @brief This is the header file for the %SlidableList class. + * + * This header file contains the declarations of the %SlidableList class and its helper classes. + * @endif + */ + +#ifndef _FUI_CTRL_SLIDABLE_LIST_H_ +#define _FUI_CTRL_SLIDABLE_LIST_H_ + +//Includes +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +namespace Tizen { namespace Base { namespace Runtime +{ +class IEvent; +}}} // Tizen::Base::Runtime + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @if OSPDEPREC + * @class SlidableList + * @brief [Deprecated] This class defines the common behavior of a %SlidableList control. + * + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * The %SlidableList class represents a list which loads items on demand and + * unloads unused items to save memory. The operation of %SlidableList is the same + * as that of a List, except that a %SlidableList does not hold all the items in the memory. + * Most of the item manipulations are available when they are loaded, but the check + * state is maintained for all items whether they are loaded or not. + * ISlidableListEventListener must be implemented so that an application can be + * notified when items need to be loaded as the user scrolls through a list. + * If an application wants to perform tasks when the state of a list item is changed, + * then it must implement ICustomItemEventListener and register it to the slidable list, + * 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 + * must be deleted by the application. + * + * For more information, see CustomListItem and CustomListItemFormat. + * + * The following example demonstrates how to use the %SlidableList class. + * + * Example: + * + * @image html ui_controls_slidablelist.png + * + * This is the simple UI application which uses a %SlidableList control. + * + * @code +// Sample code for SlidableListSample.h +#include + +class SlidableListSample + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::ICustomItemEventListener + , public Tizen::Ui::ISlidableListEventListener +{ +public: + SlidableListSample(void) + : __pSlidableList(null) + , __pCustomListItemFormat(null){} + + bool Initialize(void); + Tizen::Ui::Controls::CustomListItem* CreateListItem(Tizen::Base::String itemText, + Tizen::Graphics::Bitmap* pBitmapNormal, Tizen::Graphics::Bitmap* pBitmapFocused); + + virtual result OnInitializing(void); + virtual result OnTerminating(void); + + // ICustomItemEventListener + virtual void OnItemStateChanged(const Tizen::Ui::Control& source, int index, int itemId, Tizen::Ui::ItemStatus status); + virtual void OnItemStateChanged(const Tizen::Ui::Control& source, int index, int itemId, int elementId, Tizen::Ui::ItemStatus status); + + // ISlidableEventListener + virtual void OnListPropertyRequested (const Tizen::Ui::Control &source); + virtual void OnLoadToTopRequested(const Tizen::Ui::Control &source, int index, int numItems); + virtual void OnLoadToBottomRequested(const Tizen::Ui::Control &source, int index, int numItems); + virtual void OnUnloadItemRequested(const Tizen::Ui::Control& source, int itemIndex); + +private: + static const int ID_LIST_TEXT = 101; + static const int ID_LIST_BITMAP = 102; + static const int ITEM_COUNT = 100; + static const int ITEM_HEIGHT = 100; + + Tizen::Ui::Controls::SlidableList* __pSlidableList; + Tizen::Ui::Controls::CustomListItemFormat* __pCustomListItemFormat; +}; + * @endcode + * + * @code +// Sample code for SlidableListSample.cpp +#include +#include + +#include "SlidableListSample.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Ui; +using namespace Controls; +using namespace Tizen::Graphics; + +bool +SlidableListSample::Initialize(void) +{ + Construct(FORM_STYLE_NORMAL); + return true; +} + +result +SlidableListSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + // Creates an instance of SlidableList + __pSlidableList = new SlidableList(); + __pSlidableList->Construct(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height), CUSTOM_LIST_STYLE_NORMAL); + __pSlidableList->AddCustomItemEventListener(*this); + __pSlidableList->AddSlidableListEventListener(*this); + + // Creates an instance of CustomListItemFormat of the slidable list + __pCustomListItemFormat = new CustomListItemFormat(); + __pCustomListItemFormat->Construct(); + __pCustomListItemFormat->AddElement(ID_LIST_TEXT, Rectangle(10, 25, 200, 80)); + __pCustomListItemFormat->AddElement(ID_LIST_BITMAP, Rectangle(220, 10, 70, 80)); + + // Adds the slidable list to the form + AddControl(__pSlidableList); + + return r; +} + +result +SlidableListSample::OnTerminating(void) +{ + result r = E_SUCCESS; + + // Deallocates the item format + delete __pCustomListItemFormat; + + return r; +} + +CustomListItem* +SlidableListSample::CreateListItem(String itemText, Bitmap* pBitmapNormal, Bitmap* pBitmapFocused) +{ + CustomListItem* pItem = new CustomListItem(); + + pItem->Construct(ITEM_HEIGHT); + pItem->SetItemFormat(*__pCustomListItemFormat); + pItem->SetElement(ID_LIST_TEXT, itemText); + pItem->SetElement(ID_LIST_BITMAP, *pBitmapNormal, pBitmapFocused); + + return pItem; +} + +// ICustomItemEventListener implementation +void +SlidableListSample::OnItemStateChanged(const Control& source, int index, int itemId, ItemStatus status) +{ + switch (itemId) + { + case 1: + { + // .... + } + break; + default: + break; + } +} + +void +SlidableListSample::OnItemStateChanged(const Control& source, int index, int itemId, int elementId, ItemStatus status) +{ + switch (itemId) + { + case 1: + { + switch (elementId) + { + case ID_LIST_TEXT: + { + // .... + } + break; + case ID_LIST_BITMAP: + { + // .... + } + break; + default: + break; + } + } + break; + default: + break; + } +} + +// ISlidableEventListener implementation +void +SlidableListSample::OnListPropertyRequested (const Control &source) +{ + // Sets the total count and the height of items + __pSlidableList->SetItemCountAndHeight(ITEM_COUNT, ITEM_COUNT * ITEM_HEIGHT); +} + +void +SlidableListSample::OnLoadToTopRequested(const Control &source, int index, int numItems) +{ + // Gets instances of Bitmap + AppResource *pAppResource = Application::GetInstance()->GetAppResource(); + Bitmap *pBitmapNormal = pAppResource->GetBitmapN(L"tizen.png"); + Bitmap *pBitmapFocused = pAppResource->GetBitmapN(L"tizen.png"); + + // Creates items of the slidable list + for(int i = index; i > index - numItems; i--) + { + String itemText = "ITEM_"; + itemText.Append(i); + __pSlidableList->LoadItemToTop(*CreateListItem(itemText, pBitmapNormal, pBitmapFocused), i+1); + } + + // Deallocates bitmaps + delete pBitmapNormal; + delete pBitmapFocused; +} + +void +SlidableListSample::OnLoadToBottomRequested (const Control &source, int index, int numItems) +{ + // Gets instances of Bitmap + AppResource *pAppResource = Application::GetInstance()->GetAppResource(); + Bitmap *pBitmapNormal = pAppResource->GetBitmapN(L"tizen.png"); + Bitmap *pBitmapFocused = pAppResource->GetBitmapN(L"tizen.png"); + + // Creates items of the slidable list + for(int i = index; i < index + numItems; i++) + { + String itemText = L"ITEM_"; + itemText.Append(i); + __pSlidableList->LoadItemToBottom(*CreateListItem(itemText, pBitmapNormal, pBitmapFocused), i+1); + } + + // Deallocates bitmaps + delete pBitmapNormal; + delete pBitmapFocused; +} + +void +SlidableListSample::OnUnloadItemRequested(const Control& source, int itemIndex) +{ + // Releases resources of the specified item + // .... +} + * @endcode + * @endif + */ +class _OSP_EXPORT_ SlidableList + : public Tizen::Ui::Control +{ +public: + /** + * @if OSPDEPREC + * The object is not fully constructed after this constructor is called. @n + * For full construction, the SlidableList::Construct() method must be called right after calling this constructor. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * @endif + */ + SlidableList(void); + + /** + * @if OSPDEPREC + * 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. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * @endif + */ + virtual ~SlidableList(void); + +// Operation + + /** + * @if OSPDEPREC + * Initializes this instance of %SlidableList with the specified parameters. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @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] style The style set of %CustomList + * @param[in] itemDivider Set to @c true to display an item divider, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. @n + * Either the @c rect.width or the @c rect.height is @c 0 or negative. + * @exception E_SYSTEM The method has failed. + * @remarks The size of the control must be within the range defined by the minimum size and the maximum size. + * @remarks The minimum size of this control is 92 x 72 on a WVGA screen, 60 x 48 on a HVGA screen and 46 x 36 on a WQVGA screen. + * + * @endif + */ + result Construct(const Tizen::Graphics::Rectangle& rect, CustomListStyle style, bool itemDivider = true); + + /** + * @if OSPDEPREC + * Adds a listener instance. + * 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 ListView class. + * @since 2.0 + * + * @param[in] listener The event listener to add + * @endif + */ + void AddSlidableListEventListener(Tizen::Ui::ISlidableListEventListener& listener); + + /** + * @if OSPDEPREC + * Removes a listener instance. + * 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 ListView class. + * @since 2.0 + * + * @param[in] listener The event listener to remove + * @endif + */ + void RemoveSlidableListEventListener(Tizen::Ui::ISlidableListEventListener& listener); + + /** + * @if OSPDEPREC + * Adds a listener instance. @n + * 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 ListView class. + * @since 2.0 + * + * @param[in] listener The event listener to add + * @endif + */ + void AddCustomItemEventListener(Tizen::Ui::ICustomItemEventListener& listener); + + /** + * @if OSPDEPREC + * Adds the specified item to the %SlidableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return An error code + * @param[in] item The CustomListItem to add + * @param[in] itemId The item ID + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @remarks The added item is deleted automatically when the list is destroyed. @n + * Do not add, insert, or set an item which already belongs to %SlidableList. + * @endif + */ + result AddItem(const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID); + + /** + * @if OSPDEPREC + * Gets the index of the bottom drawn item from the %SlidableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return An integer value representing the index of the bottom drawn item + * @endif + */ + int GetBottomDrawnItemIndex(void) const; + + /** + * @if OSPDEPREC + * Gets the first item of all the checked items in the %SlidableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return The index of the first selected item + * @remarks This method can only be used when the style of the list allows multiple selections. + * @endif + */ + int GetFirstCheckedItemIndex(void) const; + + /** + * @if OSPDEPREC + * Gets the count of the number of items in the %SlidableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return The number of items in the %SlidableList control + * @endif + */ + int GetItemCount(void) const; + + /** + * @if OSPDEPREC + * Gets the last item of all the checked items in the %SlidableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return The index of the last selected item + * @remarks This method can only be used when the style of the list allows multiple selections. + * @endif + */ + int GetLastCheckedItemIndex(void) const; + + /** + * @if OSPDEPREC + * Gets the radio checked item of the %SlidableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @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 + */ + int GetNextCheckedItemIndexAfter(int index) const; + + /** + * @if OSPDEPREC + * Gets the index of the top drawn item of the %SlidableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return The index of the top drawn item + * @endif + */ + int GetTopDrawnItemIndex(void) const; + + /** + * @if OSPDEPREC + * Inserts the specified item in the %SlidableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return An error code + * @param[in] index The item index at which to insert the item + * @param[in] item The CustomListItem instance to insert + * @param[in] itemId The item ID for this item + * @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. + * Do not add, insert, or set an item that already belongs to %SlidableList. + * @endif + */ + result InsertItemAt(int index, const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID); + + /** + * @if OSPDEPREC + * Removes all the items of the %SlidableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return An error code + * @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 After items have been removed, the ISlidableListEventListener::OnListPropertyRequested() method is called. + * @see ISlidableListEventListener + * @endif + */ + result RemoveAllItems(void); + + /** + * @if OSPDEPREC + * Removes a listener instance. @n + * 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 ListView class. + * @since 2.0 + * + * @param[in] listener The event listener to remove + * @endif + */ + void RemoveCustomItemEventListener(Tizen::Ui::ICustomItemEventListener& listener); + + /** + * @if OSPDEPREC + * Scrolls to the bottom of the %SlidableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * @endif + */ + void ScrollToBottom(void); + + /** + * @if OSPDEPREC + * Scrolls to the top of the %SlidableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * @endif + */ + void ScrollToTop(void); + + /** + * @if OSPDEPREC + * Scrolls to the item at the specified index. @n + * The specified item is drawn at the top of the %SlidableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return An error code + * @param[in] index The item index + * @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. + * @endif + */ + result ScrollToTop(int index); + + /** + * @if OSPDEPREC + * Sets the check status for all items of the %SlidableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return An error code + * @param[in] check Set to @c true to check all the items, @n + * 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. + * @endif + */ + result SetAllItemsChecked(bool check); + + /** + * @if OSPDEPREC + * Sets the check status of the item at the specified index of the %SlidableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return An error code + * @param[in] index The item index + * @param[in] check The check status + * @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. + * @endif + */ + result SetItemChecked(int index, bool check); + + /** + * @if OSPDEPREC + * Enables or disables the status of the item at the specified index of the %SlidableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return An error code + * @param[in] index The item index + * @param[in] enable Set to @c true to enable, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * + * @endif + */ + result SetLoadedItemEnabled(int index, bool enable); + + /** + * @if OSPDEPREC + * Sets the background color of the %SlidableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @param[in] color The background color + * @endif + */ + void SetBackgroundColor(const Tizen::Graphics::Color& color); + + /** + * @if OSPDEPREC + * Sets the text to display in the absence of a %SlidableList item. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @param[in] text The text message + * @endif + */ + void SetTextOfEmptyList(const Tizen::Base::String& text); + + /** + * @if OSPDEPREC + * Sets a color of the text to display in the absence of a %SlidableList item. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @param[in] color The color of the text to display + * @endif + */ + void SetTextColorOfEmptyList(const Tizen::Graphics::Color& color); + + /** + * @if OSPDEPREC + * Gets a color of the text to display in the absence of a %SlidableList item. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return The color of the text to be displayed + * @endif + */ + Tizen::Graphics::Color GetTextColorOfEmptyList(void) const; + + /** + * @if OSPDEPREC + * Gets the loaded item at the specified index of the %SlidableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return A CustomListItem + * @param[in] index The item index + * @endif + */ + const CustomListItem* GetLoadedItemAt(int index) const; + + /** + * @if OSPDEPREC + * Gets the index of the loaded item at the specified item ID. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return The item ID + * @param[in] index The item index + * @endif + */ + int GetLoadedItemIdAt(int index) const; + + /** + * @if OSPDEPREC + * Checks whether the item at the specified index is enabled. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return @c true if the item is enabled, @n + * else @c false + * @param[in] index The item index + * @endif + */ + bool IsItemChecked(int index) const; + + /** + * @if OSPDEPREC + * Checks whether the loaded item at the specified index is enabled. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return @c true if the item is enabled, @n + * else @c false + * @param[in] index The item index + * @endif + */ + bool IsLoadedItemEnabled(int index) const; + + /** + * @if OSPDEPREC + * Gets the index of the loaded item at the specified item ID. + * + * @brief [Deprecated] + * @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 + * @endif + */ + int GetLoadedItemIndexFromItemId(int itemId) const; + + /** + * @if OSPDEPREC + * Loads the item to the top of the %SlidableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return An error code + * @param[in] item The CustomListItem instance to load + * @param[in] itemId The item ID for this item + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result LoadItemToTop(const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID); + + /** + * @if OSPDEPREC + * Loads the item to the end of the %SlidableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return An error code + * @param[in] item The CustomListItem instance to load + * @param[in] itemId The item ID for this item + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result LoadItemToBottom(const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID); + + /** + * @if OSPDEPREC + * Unloads all loaded items of the %SlidableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result UnloadAllItems(void); + + /** + * @if OSPDEPREC + * Sets the contents of the item at the specified index of the %SlidableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return An error code + * @param[in] index The item index + * @param[in] item The CustomListItem instance to set + * @param[in] itemId The item ID for this item + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG 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. + * @remarks Do not add, insert, or set an item which already belongs to %SlidableList. + * @endif + */ + result SetItemAt(int index, const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID); + + /** + * @if OSPDEPREC + * Removes the item at the specified index of the %SlidableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return An error code + * @param[in] index The item index to delete + * @param[in] itemHeight 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 item is deleted from the memory. + * @endif + */ + result RemoveItemAt(int index, int itemHeight); + + /** + * @if OSPDEPREC + * Removes all the checked items of the %SlidableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return An error code + * @param[in] itemHeight 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 This method can only be used when the style of the list allows multiple selections. + * @endif + */ + result RemoveAllCheckedItems(int itemHeight); + + /** + * @if OSPDEPREC + * Sets the number of items and the combined height of all the items of the %SlidableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @param[in] count The count of list items + * @param[in] listHeight The height of the list + * @endif + */ + void SetItemCountAndHeight(int count, int listHeight); + + /** + * @if OSPDEPREC + * Checks whether the specific item is loaded. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return @c true if the item is loaded, @n + * else @c false + * @param[in] index The item index + * @endif + */ + bool IsItemLoaded(int index) const; + + /** + * @if OSPDEPREC + * Gets the index of the first loaded item. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return The index of the first loaded item + * @endif + */ + int GetFirstLoadedItemIndex(void) const; + + /** + * @if OSPDEPREC + * Gets the index of the last loaded item. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return The index of the last loaded item + * @endif + */ + int GetLastLoadedItemIndex(void) const; + + /** + * @if OSPDEPREC + * 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 ListView class. + * @since 2.0 + * + * @return The index of the item, @n + * else @c -1 if there is no list item with the specified position + * @param[in] x The x position of the point + * @param[in] y The y position of the point + * @endif + */ + int GetItemIndexFromPosition(int x, int y) const; + + /** + * @if OSPDEPREC + * 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 ListView class. + * @since 2.0 + * + * @return The index of the item, @n + * else @c -1 if there is no list item with the specified position + * @param[in] position The position of the point + * @endif + */ + int GetItemIndexFromPosition(const Tizen::Graphics::Point& position) const; + + /** + * @if OSPDEPREC + * Draws and shows the item of the %SlidableList control. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the ListView class. + * @since 2.0 + * + * @return An error code + * @param[in] index The index of the %SlidableList item + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @exception E_INVALID_OPERATION The item has never been drawn before calling this method. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @endif + */ + result RefreshItem(int index); + +protected: + + friend class _SlidableListImpl; +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + SlidableList(const SlidableList& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + SlidableList& operator =(const SlidableList& rhs); +}; //SlidableList +}}} // Tizen::Ui::Controls +#endif // _FUI_CTRL_SLIDABLE_LIST_H_ diff --git a/inc/FUiCtrlSlider.h b/inc/FUiCtrlSlider.h new file mode 100644 index 0000000..f2e61a0 --- /dev/null +++ b/inc/FUiCtrlSlider.h @@ -0,0 +1,520 @@ +// +// 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 FUiCtrlSlider.h + * @brief This is the header file for the %Slider class. + * + * This header file contains the declarations of the %Slider class and its helper classes. + */ + +#ifndef _FUI_CTRL_SLIDER_H_ +#define _FUI_CTRL_SLIDER_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @class Slider + * @brief This class is an implementation of a %Slider control. + * + * @since 2.0 + * + * 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. + * + * The following example demonstrates how to use the %Slider class. + * + * @code +// Sample code for SliderSample.h +#include + +class SliderSample + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::IAdjustmentEventListener +{ +public: + SliderSample(void) + : __pSlider(null){} + + bool Initialize(void); + virtual result OnInitializing(void); + virtual void OnAdjustmentValueChanged(const Tizen::Ui::Control& source, int adjustment); + +private: + Tizen::Ui::Controls::Slider* __pSlider; +}; + * @endcode + * + * @code +// Sample code for SliderSample.cpp +#include + +#include "SliderSample.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Ui::Controls; + +bool +SliderSample::Initialize(void) +{ + Construct(FORM_STYLE_NORMAL); + return true; +} + +result +SliderSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + // Creates an instance of Slider + __pSlider = new Slider(); + __pSlider->Construct(Rectangle(0, 200, GetClientAreaBounds().width, 200), BACKGROUND_STYLE_DEFAULT, false, 0, 100); + __pSlider->SetValue(50); + __pSlider->AddAdjustmentEventListener(*this); + + // Adds the slider to the form + AddControl(__pSlider); + + return r; +} + +// IAdjustmentEventListener implementation +void +SliderSample::OnAdjustmentValueChanged(const Control& source, int adjustment) +{ + // .... +} + * @endcode + * + */ +class _OSP_EXPORT_ Slider + : public Tizen::Ui::Control +{ +// Lifecycle +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. + * + * @since 2.0 + */ + Slider(void); + + /** + * 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 ~Slider(void); + + /** + * Initializes this instance of %Slider with the specified parameters. + * + * @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 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. + * @param[in] backgroundStyle The background style set of the slider + * @param[in] showTitle Set to @c true to enable the show title, @n + * else @c false + * @param[in] minValue The minimum slider value + * @param[in] maxValue The maximum slider value + * @param[in] groupStyle The table view style of the slider + * @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. @n + * The background style of @c BACKGROUND_STYLE_NONE does not work with group styles except ::GROUP_STYLE_NONE. + * @exception E_OUT_OF_RANGE The specified values are less than @c -99 or greater than @c 999. + * @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. + * - 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 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); + + /** + * Initializes this instance of %Slider with the specified parameters. + * + * @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 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. + * @param[in] backgroundStyle The background style set of the slider + * @param[in] showTitle Set to @c true to enable the show title, @n + * else @c false + * @param[in] minValue The minimum slider value + * @param[in] maxValue The maximum slider value + * @param[in] groupStyle The table view style of the slider + * @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. @n + * The background style of @c BACKGROUND_STYLE_NONE does not work with group styles except ::GROUP_STYLE_NONE. + * @exception E_OUT_OF_RANGE The specified values are less than @c -99 or greater than @c 999. + * @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. + * - 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 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 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 + * + * @param[in] listener The event listener to add + */ + void AddAdjustmentEventListener(Tizen::Ui::IAdjustmentEventListener& listener); + + /** + * Removes an IAdjustmentEventListener instance. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to remove + */ + void RemoveAdjustmentEventListener(Tizen::Ui::IAdjustmentEventListener& listener); + +// Operation +public: + /** + * Sets the range of the %Slider control. + * + * @since 2.0 + * + * @return An error code + * @param[in] minValue The minimum value of the %Slider control + * @param[in] maxValue The maximum value of the %Slider control + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @exception E_OUT_OF_RANGE The specified values are greater than @c -99 or less than @c 999. + * @exception E_SYSTEM A system error has occurred. + */ + result SetRange(int minValue, int maxValue); + + /** + * Gets the minimum value and maximum value of the slider. + * + * @since 2.0 + * + * @param[out] minValue The minimum value of the slider + * @param[out] maxValue The maximum value of the slider + */ + void GetRange(int& minValue, int& maxValue) const; + + /** + * Sets the value of the current thumb position. @n + * If the specified @c value is greater than @c maxValue, the value is set to @c maxValue, and + * if the specified @c value is less than @c minValue, the value is set to @c minValue. + * + * @since 2.0 + * + * @param[in] value The value of the position + */ + void SetValue(int value); + + /** + * Gets the value of the current thumb position. + * + * @since 2.0 + * + * @return The current thumb position + */ + int GetValue(void) const; + + /** + * Sets the icon of the slider. + * + * @since 2.0 + * + * @param[in] position The position of the icon (@c ICON_POSITION_LEFT/@c ICON_POSITION_RIGHT) + * @param[in] icon The bitmap image of the icon + * @remarks If the size of the bitmap is greater than the default size, the bitmap image is scaled down. + */ + void SetIcon(IconPosition position, const Tizen::Graphics::Bitmap& icon); + + /** + * Sets the title of the slider. + * + * @since 2.0 + * + * @return An error code + * @param[in] title The title to set + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetTitleText(const Tizen::Base::String& title); + + /** + * Gets the title of the slider. + * + * @since 2.0 + * + * @return The title text of the entered string + * + * @remarks By default this method returns an empty string. + */ + Tizen::Base::String GetTitleText(void) const; + + /** + * Sets the title text color of the %Slider control. + * + * @since 2.0 + * + * @param[in] color The title text color to set + */ + void SetTitleTextColor(const Tizen::Graphics::Color& color); + + /** + * Gets the title text color of the %Slider control. + * + * @since 2.0 + * + * @return The title text color + */ + Tizen::Graphics::Color GetTitleTextColor(void) const; + + /** + * Initializes this instance of %Slider with the specified parameters. + * + * @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 window along with + * its width and height.@n + * 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 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 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. + * - If the specified size is less than the minimum size, the %Slider control is constructed with the minimum 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); + + /** + * Initializes this instance of %Slider with the specified parameters. + * + * @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 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] sliderStyle The style of the slider @n + * 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 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. + * - If the specified size is less than the minimum size, the %Slider control is constructed with the minimum 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 an ISliderEventListener instance. @n + * The added listener can listen to the slider-related events. + * + * @since 2.0 + * + * @param[in] listener The event listener to add + */ + void AddSliderEventListener(ISliderEventListener& listener); + + /** + * Removes an ISliderEventListener instance. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to remove + */ + void RemoveSliderEventListener(ISliderEventListener& listener); + + /** + * Sets the color of the bar. + * + * @since 2.0 + * + * @return An error code + * @param[in] color The color to set + * @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 SetBarColor(const Tizen::Graphics::Color& color); + + /** + * Gets the color of the bar. + * + * @since 2.0 + * + * @return The color of the bar, @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. + */ + Tizen::Graphics::Color GetBarColor(void) const; + + /** + * Sets the background color of the bar. + * + * @since 2.1 + * + * @param[in] barBackgroundColor The color to set + * @remarks This method ignores the alpha value of the @c color parameter and sets the alpha value to @c 255. + * @see GetBarBackgroundColor() + */ + void SetBarBackgroundColor(const Tizen::Graphics::Color& barBackgroundColor); + + /** + * Gets the background color of the bar. + * + * @since 2.1 + * + * @return The background color of the bar, @n + * else RGBA(0, 0, 0, 0) if an error occurs + * @remarks The specific error code can be accessed using the GetLastResult() method. + * @see SetBarBackgroundColor() + */ + Tizen::Graphics::Color GetBarBackgroundColor(void) const; + + /** + * Sets the color of the slider. + * + * @since 2.0 + * + * @return An error code + * @param[in] color The color to set + * @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 of the %Slider control is ::BACKGROUND_STYLE_NONE. + * @exception E_SYSTEM A system error has occurred. + * @remarks If a device supports only the 16-bit color space, this method considers the color as opaque by ignoring the alpha value of @c color. + */ + result SetColor(const Tizen::Graphics::Color& color); + + /** + * Gets the color of the slider. + * + * @since 2.0 + * + * @return The color , @n + * else RGBA(0, 0, 0, 0) if an instance is invalid or the background style is ::BACKGROUND_STYLE_NONE + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_OPERATION The background style is not proper. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + Tizen::Graphics::Color GetColor(void) const; + + /** + * Sets the bitmap image to the %Slider control Thumb. + * + * @since 2.0 + * + * @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. + */ + result SetThumbBitmap(SliderThumbStatus status, const Tizen::Graphics::Bitmap& bitmap); + + /** + * Sets the text color of the %Slider control Thumb. + * + * @since 2.0 + * + * @return An error code + * @param[in] status The state of the slider thumb + * @param[in] color The color to be set for the thumb text + */ + void SetThumbTextColor(SliderThumbStatus status, const Tizen::Graphics::Color& color); + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + Slider(const Slider&); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + Slider& operator =(const Slider&); + + friend class _SliderImpl; + +}; // Slider + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_SLIDER_H_ diff --git a/inc/FUiCtrlSliderTypes.h b/inc/FUiCtrlSliderTypes.h new file mode 100644 index 0000000..649180c --- /dev/null +++ b/inc/FUiCtrlSliderTypes.h @@ -0,0 +1,63 @@ +// +// 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 FUiCtrlSliderTypes.h + * @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. + * + */ +#ifndef _FUI_CTRL_SLIDER_TYPES_H_ +#define _FUI_CTRL_SLIDER_TYPES_H_ + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @enum SliderStyle + * + * Defines the slider styles. + * + * @since 2.0 + */ +enum SliderStyle +{ + SLIDER_STYLE_NONE = 0x0000, /**< The no bubble, no title slider */ + SLIDER_STYLE_BUBBLE = 0x0001, /**< The bubble style slider */ + SLIDER_STYLE_TITLE = 0x0002, /**< The title style slider */ +}; + +/** +* @enum SliderThumbStatus +* +* Defines the possible states of the slider thumb. +* +* @since 2.0 +*/ + +enum SliderThumbStatus +{ + SLIDER_THUMB_STATUS_NORMAL, /**< The normal state */ + SLIDER_THUMB_STATUS_PRESSED, /**< The pressed state */ + SLIDER_THUMB_STATUS_DISABLED, /**< The disabled state */ + SLIDER_THUMB_STATUS_HIGHLIGHTED, /**< The focus-highlighted state */ +}; + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_SLIDER_TYPES_H_ diff --git a/inc/FUiCtrlSplitPanel.h b/inc/FUiCtrlSplitPanel.h new file mode 100644 index 0000000..08602cd --- /dev/null +++ b/inc/FUiCtrlSplitPanel.h @@ -0,0 +1,512 @@ +// +// 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 FUiCtrlSplitPanel.h +* @brief This is the header file for the %SplitPanel class. +* +* This header file contains the declarations of the %SplitPanel class. +*/ +#ifndef _FUI_CTRL_SPLIT_PANEL_H_ +#define _FUI_CTRL_SPLIT_PANEL_H_ + +#include +#include +#include +#include + + +namespace Tizen { namespace Ui { namespace Controls +{ + +class ISplitPanelEventListener; +class ISplitPanelEventListenerF; + +/** + * @class SplitPanel + * @brief This class is an implementation of a %SplitPanel control. + * + * @since 2.0 + * @final This class is not intended for extension. + * + * The %SplitPanel class provides the functionality of a %SplitPanel which is a control that contains two panes. + * + * For more information on the class features, see SplitPanel. + * + * The following example demonstrates how to use the %SplitPanel class. + * + * @code +// Sample code for SplitPanel.h +#include + +class SplitPanelSample + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::Controls::ISplitPanelEventListener +{ +public: + SplitPanelSample(void) + : __pSplitPanel(null) + , __pFirstPanel(null) + , __pSecondPanel(null){} + + 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; + Tizen::Ui::Controls::Panel* __pFirstPanel; + Tizen::Ui::Controls::Panel* __pSecondPanel; +}; + * @endcode + * + * @code +// Sample code for SplitPanelSample.cpp +#include + +#include "SplitPanelSample.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; + +bool +SplitPanelSample::Initialize(void) +{ + Construct(FORM_STYLE_NORMAL); + return true; +} + +result +SplitPanelSample::OnInitializing(void) +{ + // Creates an instance of SplitPanel + __pSplitPanel = new (std::nothrow) SplitPanel(); + __pSplitPanel->Construct(Rectangle(0, 0, 800, 400), + SPLIT_PANEL_DIVIDER_STYLE_MOVABLE, SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL); + + // 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); + + //Sets panes to the split panel + __pSplitPanel->SetPane(__pFirstPanel, SPLIT_PANEL_PANE_ORDER_FIRST); + __pSplitPanel->SetPane(__pSecondPanel, SPLIT_PANEL_PANE_ORDER_SECOND); + + // Adds the split panel to the form + AddControl(__pSplitPanel); + + return E_SUCCESS; +} + + result + SplitPanelSample::OnTerminating(void) + { + // Sets null panes to the split panel + __pSplitPanel->SetPane(null, SPLIT_PANEL_PANE_ORDER_FIRST); + __pSplitPanel->SetPane(null, SPLIT_PANEL_PANE_ORDER_SECOND); + + //Deallocates the control + __pFirstPanel->Destroy(); + __pSecondPanel->Destroy(); + + return E_SUCCESS; + } + + * @endcode + * + */ + +class _OSP_EXPORT_ SplitPanel + : public Tizen::Ui::Control +{ +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. + * + * @since 2.0 + */ + SplitPanel(void); + + /** + * 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 ~SplitPanel(void); + + /** + * Initializes this instance of %SplitPanel with the specified parameters. + * + * @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] splitPanelDividerStyle The divider style of the %SplitPanel control + * @param[in] splitPanelDividerDirection The divider direction of the %SplitPanel control @n + * 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. + */ + result Construct(const Tizen::Graphics::Rectangle& rect, SplitPanelDividerStyle splitPanelDividerStyle, SplitPanelDividerDirection splitPanelDividerDirection); + + /** + * Initializes this instance of %SplitPanel with the specified parameters. + * + * @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] splitPanelDividerStyle The divider style of the %SplitPanel control + * @param[in] splitPanelDividerDirection The divider direction of the %SplitPanel control @n + * 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. + */ + result Construct(const Tizen::Graphics::FloatRectangle& rect, SplitPanelDividerStyle splitPanelDividerStyle, SplitPanelDividerDirection splitPanelDividerDirection); + + + /** + * 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 + * + * @param[in] listener The event listener to add + * @exception E_SUCCESS The method is successful. + * @exception E_OBJ_ALREADY_EXIST The event listener already exists. + */ + result AddSplitPanelEventListener(ISplitPanelEventListener& listener); + + /** + * 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 + * + * @param[in] listener The event listener to add + * @exception E_SUCCESS The method is successful. + * @exception E_OBJ_ALREADY_EXIST The event listener already exists. + */ + result AddSplitPanelEventListener(ISplitPanelEventListenerF& listener); + + /** + * Removes an ISplitPanelEventListener instance. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to remove + * @exception E_SUCCESS The method is successful. + * @exception E_OBJ_NOT_FOUND The event listener is not found. + */ + result RemoveSplitPanelEventListener(ISplitPanelEventListener& listener); + + /** + * Removes an ISplitPanelEventListenerF instance. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.1 + * + * @param[in] listener The event listener to remove + * @exception E_SUCCESS The method is successful. + * @exception E_OBJ_NOT_FOUND The event listener is not found. + */ + result RemoveSplitPanelEventListener(ISplitPanelEventListenerF& listener); + + /** + * Sets the pane to the %SplitPanel control. + * + * @since 2.0 + * + * @return An error code + * @param[in] pControl The control to set + * @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. + */ + result SetPane(Control* pControl, SplitPanelPaneOrder paneOrder); + + /** + * Gets the control at the specified pane order of the %SplitPanel. + * + * @since 2.0 + * + * @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 The specified input parameter is invalid. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + Control* GetPane(SplitPanelPaneOrder paneOrder) const; + + /** + * Sets the divider position of the control. + * + * @since 2.0 + * + * @return An error code + * @param[in] position The position of the divider + * @exception E_SUCCESS The method is successful. + * @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() + * @see SetMinimumDividerPosition() + * @see GetMinimumDividerPosition() + */ + result SetDividerPosition(int position); + + /** + * Sets the divider position of the control. + * + * @since 2.1 + * + * @return An error code + * @param[in] position The position of the divider + * @exception E_SUCCESS The method is successful. + * @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() + * @see SetMinimumDividerPosition() + * @see GetMinimumDividerPosition() + */ + result SetDividerPosition(float position); + + /** + * Gets the current divider position of the control. + * + * @since 2.0 + * + * @return The current divider position + * @remarks The specific error code can be accessed using the GetLastResult() method. + * @see SetDividerPosition() + * @see SetMaximumDividerPosition() + * @see GetMaximumDividerPosition() + * @see SetMinimumDividerPosition() + * @see GetMinimumDividerPosition() + */ + int GetDividerPosition(void) const; + + /** + * Gets the current divider position of the control. + * + * @since 2.1 + * + * @return The current divider position + * @remarks The specific error code can be accessed using the GetLastResult() method. + * @see SetDividerPosition() + * @see SetMaximumDividerPosition() + * @see GetMaximumDividerPosition() + * @see SetMinimumDividerPosition() + * @see GetMinimumDividerPosition() + */ + float GetDividerPositionF(void) const; + + /** + * Sets the maximum divider position of the control. + * + * @since 2.0 + * + * @return An error code + * @param[in] position The position of the divider + * @exception E_SUCCESS The method is successful. + * @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() + */ + result SetMaximumDividerPosition(int position); + + /** + * Sets the maximum divider position of the control. + * + * @since 2.1 + * + * @return An error code + * @param[in] position The position of the divider + * @exception E_SUCCESS The method is successful. + * @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() + */ + result SetMaximumDividerPosition(float position); + + /** + * Gets the maximum divider position. + * + * @since 2.0 + * + * @return The maximum divider position of the control + * @see SetMaximumDividerPosition() + * @see SetMinimumDividerPosition() + * @see GetMinimumDividerPosition() + */ + int GetMaximumDividerPosition(void) const; + + /** + * Gets the maximum divider position. + * + * @since 2.1 + * + * @return The maximum divider position of the control + * @see SetMaximumDividerPosition() + * @see SetMinimumDividerPosition() + * @see GetMinimumDividerPosition() + */ + float GetMaximumDividerPositionF(void) const; + + /** + * Sets the divider minimum position of the control. + * + * @since 2.0 + * + * @return An error code + * @param[in] position The position of divider + * @exception E_SUCCESS The method is successful. + * @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() + */ + result SetMinimumDividerPosition(int position); + + /** + * Sets the divider minimum position of the control. + * + * @since 2.1 + * + * @return An error code + * @param[in] position The position of the divider + * @exception E_SUCCESS The method is successful. + * @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() + */ + result SetMinimumDividerPosition(float position); + + /** + * Gets the minimum divider position. + * + * @since 2.0 + * + * @return The minimum divider position of the control + * @see SetMinimumDividerPosition() + * @see SetMaximumDividerPosition() + * @see GetMaximumDividerPosition() + */ + int GetMinimumDividerPosition(void) const; + + /** + * Gets the minimum divider position. + * + * @since 2.1 + * + * @return The minimum divider position of the control + * @see SetMinimumDividerPosition() + * @see SetMaximumDividerPosition() + * @see GetMaximumDividerPosition() + */ + float GetMinimumDividerPositionF(void) const; + + /** + * Maximizes the specified pane. + * + * @since 2.0 + * + * @return An error code + * @param[in] paneOrder The order of the pane + * @see IsPaneMaximized() + */ + result MaximizePane(SplitPanelPaneOrder paneOrder); + + /** + * Checks whether the specified pane is maximized. + * + * @since 2.0 + * @return @c true if the pane is maximized, @n + * else @c false + */ + bool IsPaneMaximized(SplitPanelPaneOrder paneOrder) const; + + /** + * Restores the previous pane size if the specified pane is maximized. + * + * @since 2.0 + * + * @return An error code + * @see MaximizePane() + */ + result RestorePane(void); + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + SplitPanel(const SplitPanel& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + SplitPanel& operator =(const SplitPanel& rhs); + + friend class _SplitPanelImpl; + +}; // SplitPanel + +}}} //Tizen::Ui::Controls + +#endif // _FUI_CTRL_SPLIT_PANEL_H_ diff --git a/inc/FUiCtrlSplitPanelTypes.h b/inc/FUiCtrlSplitPanelTypes.h new file mode 100644 index 0000000..3ece1e6 --- /dev/null +++ b/inc/FUiCtrlSplitPanelTypes.h @@ -0,0 +1,73 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiCtrlSplitPanelTypes.h + * @brief This is the header file for the %SplitPanel enumerations. + * + * This header file contains the declarations of the enumerations of the SplitPanel class. + * + */ +#ifndef _FUI_CTRL_SPLIT_PANEL_TYPES_H_ +#define _FUI_CTRL_SPLIT_PANEL_TYPES_H_ + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @enum SplitPanelDividerStyle + * + * Defines the divider style of the SplitPanel control. + * + * @since 2.0 + */ +enum SplitPanelDividerStyle +{ + SPLIT_PANEL_DIVIDER_STYLE_FIXED, /**< The fixed divider style */ + SPLIT_PANEL_DIVIDER_STYLE_MOVABLE /**< The movable divider style */ +}; + +/** + * @enum SplitPanelDividerDirection + * + * Defines the divider direction of the SplitPanel control. + * + * @since 2.0 + */ +enum SplitPanelDividerDirection +{ + SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL, /**< Set to vertical divider */ + SPLIT_PANEL_DIVIDER_DIRECTION_HORIZONTAL /**< Set to horizontal divider */ +}; + +/** + * @enum SplitPanelPaneOrder + * + * Defines the pane order of the SplitPanel control. + * + * @since 2.0 + */ +enum SplitPanelPaneOrder +{ + SPLIT_PANEL_PANE_ORDER_FIRST, /**< The panel located on the left side or upper side */ + SPLIT_PANEL_PANE_ORDER_SECOND /**< The panel located on the right side or down side */ +}; + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_SPLIT_PANEL_TYPES_H_ + diff --git a/inc/FUiCtrlTab.h b/inc/FUiCtrlTab.h new file mode 100644 index 0000000..10b4512 --- /dev/null +++ b/inc/FUiCtrlTab.h @@ -0,0 +1,751 @@ +// +// 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. +// + +/** + * @if OSPDEPREC + * @file FUiCtrlTab.h + * @brief This is the header file for the %Tab class. + * + * This header file contains the declarations of the %Tab class and its helper classes. + * @endif + */ + +#ifndef _FUI_CTRL_TAB_H_ +#define _FUI_CTRL_TAB_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui +{ +class IActionEventListener; +}} + +namespace Tizen { namespace Ui { namespace Controls +{ +class _PublicActionEvent; + + +/** + * @if OSPDEPREC + * @class Tab + * @brief [Deprecated] This class is an implementation of a %Tab control. + * + * @deprecated This class is deprecated because the use of the %Tab control is no longer recommended. + * @since 2.0 + * + * @remarks Note that tabs are part of a Form control, not a Frame control. This means that each tab item cannot be a form. You can associate a Panel + * control or a ScrollPanel control to each tab item. + * + * The %Tab class is an implementation of a %Tab control. + * %Tab control displays the user selection in the form of a horizontal list. Each + * 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(), 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 + * + * + * This is the simple UI application that uses a %Tab control. + * + * + * @code +//Sample code for TabSample.h + +#include + +class TabSample + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::IActionEventListener +{ +public: + TabSample(void) + : __pTab(null){} + + bool Initialize(void); + virtual result OnInitializing(void); + + // IActionEventListener + virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId); + +private: + Tizen::Ui::Controls::Tab* __pTab; +}; + * @endcode + * + * @code +// Sample code for TabSample.cpp +#include "TabSample.h" + +using namespace Tizen::Ui::Controls; + +bool +TabSample::Initialize() +{ + Construct(FORM_STYLE_NORMAL|FORM_STYLE_TEXT_TAB); + return true; +} + +result +TabSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + // Gets an instance of Tab + __pTab = GetTab(); + + // Adds items to the tab + __pTab->AddItem(L"First", 0); + __pTab->AddItem(L"Second", 1); + __pTab->AddActionEventListener(*this); + + return r; +} + +// IActionEventListener implementation +void +TabSample::OnActionPerformed(const Control& source, int actionId) +{ + switch (actionId) + { + case 0: + { + // .... + } + break; + case 1: + { + // .... + } + break; + default: + break; + } +} + * @endcode + * @endif + */ +class _OSP_EXPORT_ Tab + : public Tizen::Ui::Control +{ +public: + /** + * @if OSPDEPREC + * Adds a listener instance. + * 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 because the use of the %Tab control is no longer recommended. + * @since 2.0 + * + * @param[in] listener The event listener to add + * @endif + */ + void AddActionEventListener(Tizen::Ui::IActionEventListener& listener); + + /** + * @if OSPDEPREC + * Removes a listener instance. + * The removed listener cannot listen to events when they are fired. + * + * @brief [Deprecated] + * @deprecated This class is deprecated because the use of the %Tab control is no longer recommended. + * @since 2.0 + * + * @param[in] listener The event listener to remove + * @endif + */ + void RemoveActionEventListener(Tizen::Ui::IActionEventListener& listener); + +public: + /** + * @if OSPDEPREC + * Adds an item consisting of the specified text string. + * + * @brief [Deprecated] + * @deprecated This class is deprecated because the use of the %Tab control is no longer recommended. + * @since 2.0 + * + * @return An error code + * @param[in] text The text string of the item + * @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 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); + + /** + * @if OSPDEPREC + * Adds an item consisting of the title icon and the specified text string. + * + * @brief [Deprecated] + * @deprecated This class is deprecated because the use of the %Tab control is no longer recommended. + * @since 2.0 + * + * @return An error code + * @param[in] titleIcon The bitmap for the title icon + * @param[in] text The text string of the item + * @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 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); + + /** + * @if OSPDEPREC + * Adds the item that consists of the specified icon. + * + * @brief [Deprecated] + * @deprecated This class is deprecated because the use of the %Tab control is no longer recommended. + * @since 2.0 + * + * @return An error code + * @param[in] icon The bitmap for the icon + * @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 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); + + /** + * @if OSPDEPREC + * Inserts the item that consists of only a text string at the specified index. + * + * @brief [Deprecated] + * @deprecated This class is deprecated because the use of the %Tab control is no longer recommended. + * @since 2.0 + * + * @return An error code + * @param[in] index The index of the item + * @param[in] text The text string of the item + * @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 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); + + /** + * @if OSPDEPREC + * Inserts the item that consists of the title icon and specified text string at the specified index. + * + * @brief [Deprecated] + * @deprecated This class is deprecated because the use of the %Tab control is no longer recommended. + * @since 2.0 + * + * @return An error code + * @param[in] index The index of the item + * @param[in] titleIcon The bitmap for the title icon + * @param[in] text The text string of the item + * @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 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); + + /** + * @if OSPDEPREC + * Inserts the item which consists of the title icon and specified text string at the specified index. + * + * @brief [Deprecated] + * @deprecated This class is deprecated because the use of the %Tab control is no longer recommended. + * @since 2.0 + * + * @return An error code + * @param[in] index The index of the item + * @param[in] icon The Bitmap for the Icon + * @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 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); + + /** + * @if OSPDEPREC + * Sets the item that consists of only a text string at the specified index. + * + * @brief [Deprecated] + * @deprecated This class is deprecated because the use of the %Tab control is no longer recommended. + * @since 2.0 + * + * @return An error code + * @param[in] index The index of the item + * @param[in] text The text string of the item + * @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. + * @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); + + /** + * @if OSPDEPREC + * Sets the item that consists of the title icon and the specified text string at the given index. + * + * @brief [Deprecated] + * @deprecated This class is deprecated because the use of the %Tab control is no longer recommended. + * @since 2.0 + * + * @return An error code + * @param[in] index The index of the item + * @param[in] titleIcon The bitmap for the title icon + * @param[in] text The text string of the item + * @param[in] actionId The action ID for the 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. + * @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); + + /** + * @if OSPDEPREC + * Sets the item that consists of only a title icon at the specified index. + * + * @brief [Deprecated] + * @deprecated This class is deprecated because the use of the %Tab control is no longer recommended. + * @since 2.0 + * + * @return An error code + * @param[in] index The index of the item + * @param[in] icon The bitmap for the icon + * @param[in] actionId The action ID for the 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. + * @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); + + /** + * @if OSPDEPREC + * Removes item at the given index from the tab. + * + * @brief [Deprecated] + * @deprecated This class is deprecated because the use of the %Tab control is no longer recommended. + * @since 2.0 + * + * @return An error code + * @param[in] index The index of the item + * @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. + * @endif + */ + result RemoveItemAt(int index); + + /** + * @if OSPDEPREC + * Removes all the items from the tab. + * + * @brief [Deprecated] + * @deprecated This class is deprecated because the use of the %Tab control is no longer recommended. + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result RemoveAllItems(void); + + /** + * @if OSPDEPREC + * Sets the badge icon of the specified item. + * + * @brief [Deprecated] + * @deprecated This class is deprecated because the use of the %Tab control is no longer recommended. + * @since 2.0 + * + * @return An error code + * @param[in] actionId The specified @c actionId for this item + * @param[in] pBadgeIcon The bitmap for the icon + * @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. + * - 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); + + /** + * @if OSPDEPREC + * Gets the number of items in the specified tab. + * + * @brief [Deprecated] + * @deprecated This class is deprecated because the use of the %Tab control is no longer recommended. + * @since 2.0 + * + * @return The number of items in the tab + * @endif + */ + int GetItemCount(void) const; + + /** + * @if OSPDEPREC + * Gets the index of the item at the specified action ID. + * + * @brief [Deprecated] + * @deprecated This class is deprecated because the use of the %Tab control is no longer recommended. + * @since 2.0 + * + * @return The index of the item, @n + * else @c -1 if an error occurs + * @param[in] actionId The action ID of the item + * @remarks The @c actionId range is @c 0-999. + * @endif + */ + int GetItemIndexFromActionId(int actionId) const; + + /** + * @if OSPDEPREC + * Gets the action ID of the item at the specified index. + * + * @brief [Deprecated] + * @deprecated This class is deprecated because the use of the %Tab control is no longer recommended. + * @since 2.0 + * + * @return The action ID of the item, @n + * else @c -1 if @c index is less than @c 0 or greater than the item count of tab + * @param[in] index The index of the item + * @endif + */ + int GetItemActionIdAt(int index) const; + + /** + * @if OSPDEPREC + * Sets the selected item for the specified index. + * + * @brief [Deprecated] + * @deprecated This class is deprecated because the use of the %Tab control is no longer recommended. + * @since 2.0 + * + * @param[in] index The index of the item + * @endif + */ + void SetSelectedItem(int index); + + /** + * @if OSPDEPREC + * Gets the index of the selected item from the tab. + * + * @brief [Deprecated] + * @deprecated This class is deprecated because the use of the %Tab control is no longer recommended. + * @since 2.0 + * + * @return The index of the item, @n + * else @c -1 if an error occurs + * @endif + */ + int GetSelectedItemIndex(void) const; + + /** + * @if OSPDEPREC + * Sets the edit-enabled mode. + * + * @brief [Deprecated] + * @deprecated This class is deprecated because the use of the %Tab control is no longer recommended. + * @since 2.0 + * + * @param[in] enable Set to @c true to enable edit mode, @n + * else @c false + * @endif + */ + void SetEditModeEnabled(bool enable); + + /** + * @if OSPDEPREC + * Checks whether the edit mode is set. + * + * @brief [Deprecated] + * @deprecated This class is deprecated because the use of the %Tab control is no longer recommended. + * @since 2.0 + * + * @return @c true if the edit mode is set, @n + * else @c false + * @endif + */ + bool IsEditModeEnabled(void) const; + + /** + * @if OSPDEPREC + * Sets the background bitmap of the tab. + * + * @brief [Deprecated] + * @deprecated This class is deprecated because the use of the %Tab control is no longer recommended. + * @since 2.0 + * + * @return An error code + * @param[in] bitmap The background bitmap + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The background bitmap is invalid. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result SetBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap); + + /** + * @if OSPDEPREC + * Sets the background bitmap of the focused item. + * + * @brief [Deprecated] + * @deprecated This class is deprecated because the use of the %Tab control is no longer recommended. + * @since 2.0 + * + * @return An error code + * @param[in] bitmap The background bitmap of the focused item + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The background bitmap is invalid. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result SetFocusedItemBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap); + + /** + * @if OSPDEPREC + * Sets the text color of the tab. + * + * @brief [Deprecated] + * @deprecated This class is deprecated because the use of the %Tab control is no longer recommended. + * @since 2.0 + * + * @param[in] textColor The color to set + * @endif + */ + void SetTextColor(const Tizen::Graphics::Color& textColor); + + /** + * @if OSPDEPREC + * Gets the text color of the tab. + * + * @brief [Deprecated] + * @deprecated This class is deprecated because the use of the %Tab control is no longer recommended. + * @since 2.0 + * + * @return The text color + * @endif + */ + Tizen::Graphics::Color GetTextColor(void) const; + + /** + * @if OSPDEPREC + * Sets the text color for the selected item of the tab. + * + * @brief [Deprecated] + * @deprecated This class is deprecated because the use of the %Tab control is no longer recommended. + * @since 2.0 + * + * @param[in] textColor The color to set + * @endif + */ + void SetSelectedTextColor(const Tizen::Graphics::Color& textColor); + + /** + * @if OSPDEPREC + * Gets the text color for the selected item of the tab. + * + * @brief [Deprecated] + * @deprecated This class is deprecated because the use of the %Tab control is no longer recommended. + * @since 2.0 + * + * @return The text color + * @endif + */ + Tizen::Graphics::Color GetSelectedTextColor(void) const; + + /** + * @if OSPDEPREC + * Gets the color of the text when the %Tab item is highlighted. + * + * @brief [Deprecated] + * @deprecated This class is deprecated because the use of the %Tab control is no longer recommended. + * @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. + * @endif + */ + Tizen::Graphics::Color GetHighlightedTextColor(void) const; + + /** + * @if OSPDEPREC + * Sets the color of the text when the tab item is highlighted. + * + * @brief [Deprecated] + * @deprecated This class is deprecated because the use of the %Tab control is no longer recommended. + * @since 2.0 + * + * @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. + * @endif + */ + void SetHighlightedTextColor(const Tizen::Graphics::Color& color); + + /** + * @if OSPDEPREC + * Sets the background bitmap of the highlighted tab item. + * + * @brief [Deprecated] + * @deprecated This class is deprecated because the use of the %Tab control is no longer recommended. + * @since 2.0 + * + * @return An error code + * @param[in] bitmap The background bitmap of the focused item + * @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. + * @endif + */ + result SetHighlightedItemBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap); + + + //void SetStyle(int style); + +private: + // + // This method is for internal use only. + // Using this method can cause behavioral, security-related, and consistency-related issues in the application. + // + // 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. + // @since 2.0 + // + Tab(void); + + // + // This method is for internal use only. + // Using this method can cause behavioral, security-related, and consistency-related issues in the application. + // + // 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. + // @since 2.0 + // + virtual ~Tab(void); + + // + // This method is for internal use only. + // Using this method can cause behavioral, security-related, and consistency-related issues in the application. + // + // Initializes this instance of %Tab with the specified parameter. + // + // @since 2.0 + // @return An error code + // @param[in] tabHandle The handle of the tab + // @exception E_SUCCESS The method is successful. + // @exception E_SYSTEM A system error has occurred. + // + result Construct(void); + + // + // Stores __BitmapItem. + // + Tizen::Base::Collection::ArrayList __items; + +private: + friend class _TabImpl; + +}; + +}}} //Tizen::Ui::Controls + +#endif // _FUI_CTRL_TAB_H_ diff --git a/inc/FUiCtrlTabBar.h b/inc/FUiCtrlTabBar.h new file mode 100644 index 0000000..99fd6d9 --- /dev/null +++ b/inc/FUiCtrlTabBar.h @@ -0,0 +1,531 @@ +// +// 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 FUiCtrlTabBar.h + * @brief This is the header file for the %TabBar class. + * + * This header file contains the declarations of the %TabBar class. + */ +#ifndef _FUI_CTRL_TAB_BAR_H_ +#define _FUI_CTRL_TAB_BAR_H_ + +#include + +namespace Tizen { namespace Ui +{ +class IActionEventListener; +}} // Tizen::Ui +namespace Tizen { namespace Ui { namespace Controls +{ +class TabBarItem; +}}} // Tizen::Ui::Controls + +namespace Tizen { namespace Ui { namespace Controls +{ +/** + * @enum TabBarItemStatus + * + * Defines the possible states of TabBarItem. + * + * @since 2.0 + */ +enum TabBarItemStatus +{ + TAB_BAR_ITEM_STATUS_NORMAL, /**< The normal state */ + TAB_BAR_ITEM_STATUS_SELECTED /**< The selected state */ +}; + + +/** + * @class TabBar + * @brief This class is an implementation of %TabBar. + * + * @since 2.0 + * + * The %TabBar class displays a list of possible options for the user selection in a horizontal list. + * + * For more information on the class features, see TabBar. + * + * The following example demonstrates how to use the %TabBar class. + * + * @code +// Sample code for TabBarSample.h +#include + +class TabBarSample + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::IActionEventListener +{ +public: + TabBarSample(void) + : __pTabBar(null){} + + bool Initialize(void); + virtual result OnInitializing(void); + + // IActionEventListener + virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId); + +private: + static const int ID_TABBAR_ITEM1 = 100; + static const int ID_TABBAR_ITEM2 = 101; + static const int ID_TABBAR_ITEM3 = 102; + + Tizen::Ui::Controls::TabBar *__pTabBar; +}; + * @endcode + * + * @code +// Sample code for TabBarSample.cpp +#include "TabBarSample.h" + +using namespace Tizen::Ui::Controls; + +bool +TabBarSample::Initialize(void) +{ + Construct(FORM_STYLE_NORMAL); + return true; +} + +result +TabBarSample::OnInitializing() +{ + result r = E_SUCCESS; + + // Creates an instance of TabBar + __pTabBar = new TabBar(); + __pTabBar->Construct(0, 0, GetClientAreaBounds().width); + + // Creates instances of TabBarItem + TabBarItem tabBarItem1; + TabBarItem tabBarItem2; + TabBarItem tabBarItem3; + + tabBarItem1.Construct(L"1", ID_TABBAR_ITEM1); + tabBarItem2.Construct(L"2", ID_TABBAR_ITEM2); + tabBarItem3.Construct(L"3", ID_TABBAR_ITEM3); + + // Adds items to the tab bar + __pTabBar->AddItem(tabBarItem1); + __pTabBar->AddItem(tabBarItem2); + __pTabBar->AddItem(tabBarItem3); + __pTabBar->AddActionEventListener(*this); + + // Adds the tab bar to the form + AddControl(__pTabBar); + + return r; +} + +// IActionEventListener implementation +void +TabBarSample::OnActionPerformed(const Control& source, int actionId) +{ + switch (actionId) + { + case ID_TABBAR_ITEM1: + { + // .... + } + break; + case ID_TABBAR_ITEM2: + { + // .... + } + break; + default: + break; + } +} + * @endcode + * + */ +class _OSP_EXPORT_ TabBar + : public Tizen::Ui::Control +{ +// Lifecycle +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. + * + * @since 2.0 + * + */ + TabBar(void); + + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + * + */ + virtual ~TabBar(void); + + /** + * Initializes this instance of %TabBar with the specified parameters. + * + * @since 2.0 + * + * @return An error code + * @param[in] x The X position of the top left corner + * @param[in] y The Y position of the top left corner + * @param[in] width The width @n + * The optimal size of the control is defined in + * Optimal Size of UI Controls. + * @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. + */ + result Construct(int x, int y, int width); + + /** + * Initializes this instance of %TabBar with the specified parameters. + * + * @since 2.1 + * + * @return An error code + * @param[in] x The X position of the top left corner + * @param[in] y The Y position of the top left corner + * @param[in] width The width @n + * The optimal size of the control is defined in + * Optimal Size of UI Controls. + * @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. + */ + result Construct(float x, float y, float width); + + +// Operation +public: + /** + * Adds the specified item. + * + * @since 2.0 + * + * @return An error code + * @param[in] item The item to add + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The 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_INVALID_STATE This instance is in an invalid state. + * @exception E_SYSTEM A system error has occurred. + * @remarks + * - The maximum number of items for a %TabBar control is @c 100. + * - The content of the specified item is copied to the %TabBar control. + * - The item can be deallocated explicitly after this method call if it is created dynamically. + * - The %TabBar control does not throw any exception even though the same action ID is assigned to multiple items. + */ + result AddItem(const TabBarItem& item); + + + /** + * Inserts the %TabBar item at the specified index. + * + * @since 2.0 + * + * @return An error code + * @param[in] index The index of the item to insert + * @param[in] item The item to insert + * @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_MAX_EXCEEDED The number of items has exceeded the maximum limit. + * @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 + * - The maximum number of items for a %TabBar control is @c 100. + * - The content of the specified item is copied to the @c %TabBar control. @n + * - The item can be deallocated explicitly after this method call if it is created dynamically. @n + * - The %TabBar control does not throw any exception even though the same action ID is assigned to multiple items. + */ + result InsertItemAt(int index, const TabBarItem& item); + + + /** + * Gets the color of the %TabBar control. + * + * @since 2.0 + * + * @return The color, @n + * else RGBA(0,0,0,0) if an error occurs + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + Tizen::Graphics::Color GetColor(void) const; + + + /** + * Gets the item count. + * + * @since 2.0 + * + * @return The item count, @n + * else @c -1 if an error occurs + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + int GetItemCount(void) const; + + + /** + * Gets the item color that is displayed when an item is selected. + * + * @since 2.0 + * + * @return The selected item color, @n + * else RGBA(0,0,0,0) if an error occurs + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + Tizen::Graphics::Color GetSelectedItemColor(void) const; + + + /** + * Gets the item text color for the specified state. + * + * @since 2.0 + * + * @return The item text color, @n + * else RGBA (0,0,0,0) if an error occurs + * @param[in] status The item state + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + Tizen::Graphics::Color GetItemTextColor(TabBarItemStatus status) const; + + + /** + * Gets the index of the selected item. + * + * @since 2.0 + * + * @return The selected item index, @n + * else @c -1 if an error occurs + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + int GetSelectedItemIndex(void) const; + + + /** + * Removes the %TabBar item at the specified index. + * + * @since 2.0 + * + * @return An error code + * @param[in] index The index of the item + * @exception E_SUCCESS The method is successful. + * @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. + */ + result RemoveItemAt(int index); + + + /** + * Removes all the items from the %TabBar control. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @exception E_SYSTEM A system error has occurred. + */ + result RemoveAllItems(void); + + + /** + * Sets the color of the %TabBar control. + * + * @since 2.0 + * + * @return An error code + * @param[in] color The color + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + result SetColor(const Tizen::Graphics::Color& color); + + + /** + * Sets the content of the %TabBar item at the specified index. + * + * @since 2.0 + * + * @return An error code + * @param[in] index The index at which to set the specified item + * @param[in] item The item to set + * @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 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 + * - The contents of the specified item are copied. + * - The item can be deallocated explicitly after this method call if it is created dynamically. + */ + result SetItemAt(int index, const TabBarItem& item); + + + /** + * Selects the item at the specified index. + * + * @since 2.0 + * + * @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 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. + */ + result SetItemSelected(int index); + + + /** + * Sets the item text color for the specified state. + * + * @since 2.0 + * + * @return An error code + * @param[in] status The item state + * @param[in] color The item text color + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @exception E_SYSTEM A system error has occurred. + */ + result SetItemTextColor(TabBarItemStatus status, const Tizen::Graphics::Color& color); + + + /** + * Sets the selected item color. + * + * @since 2.0 + * + * @return An error code + * @param[in] color The item color + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @exception E_SYSTEM A system error has occurred. + */ + result SetSelectedItemColor(const Tizen::Graphics::Color& color); + + + /** + * Sets the width of the tab bar. + * + * @since 2.0 + * + * @return An error code + * @param[in] width The width + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The 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 SetWidth(int width); + + /** + * Sets the width of the tab bar. + * + * @since 2.1 + * + * @return An error code + * @param[in] width The width + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The 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 SetWidth(float width); + + +//Listeners +public: + /** + * Adds an action event listener instance. @n + * The added listener can listen to events on the specified event dispatcher's context when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to add + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + void AddActionEventListener(Tizen::Ui::IActionEventListener& listener); + + + /** + * Removes an action event listener instance. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to remove + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + void RemoveActionEventListener(Tizen::Ui::IActionEventListener& listener); + +protected: + friend class _TabBarImpl; + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + // @since 2.0 + // + // + TabBar(const TabBar& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + // @since 2.0 + // + // + TabBar& operator =(const TabBar& rhs); + +}; // TabBar + +}}} // Tizen::Ui: Control +#endif //_FUI_CTRL_TAB_BAR_H_ diff --git a/inc/FUiCtrlTabBarItem.h b/inc/FUiCtrlTabBarItem.h new file mode 100644 index 0000000..31e5471 --- /dev/null +++ b/inc/FUiCtrlTabBarItem.h @@ -0,0 +1,167 @@ +// +// 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 FUiCtrlTabBarItem.h + * @brief This is the header file for the %TabBarItem class. + * + * This header file contains the declarations of the %TabBarItem class. + */ +#ifndef _FUI_CTRL_TAB_BAR_ITEM_H_ +#define _FUI_CTRL_TAB_BAR_ITEM_H_ + +#include + +namespace Tizen { namespace Ui { namespace Controls +{ +class _TabBarItemImpl; +}; +}; +}; + + +namespace Tizen { namespace Ui { namespace Controls +{ +/** + * @class TabBarItem + * @brief This class is an implementation of %TabBarItem. + * + * @since 2.0 + * + * The %TabBarItem class is a helper class that specifies the contents of a tab bar item. + * + * For more information on the class features, see TabBar. + */ +class _OSP_EXPORT_ TabBarItem + : public Tizen::Base::Object +{ +// Lifecycle +public: + /** + * The object is not fully constructed after this constructor is called. @n + * For full construction, the TabBarItem::Construct() method must be called right after calling this constructor. + * + * @since 2.0 + */ + TabBarItem(void); + + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~TabBarItem(void); + + + /** + * Initializes this instance of %TabBarItem with the specified parameters. + * + * @since 2.0 + * + * @return An error code + * @param[in] text The item text + * @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 is not greater than or equal to @c 0. + */ + result Construct(const Tizen::Base::String& text, int actionId); + + +// Operation +public: + /** + * Sets the action ID of the item. + * + * @since 2.0 + * + * @return An error code + * @param[in] actionId The action ID for this item + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. @n + * The @c actionId of the specified item must be a positive integer. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + result SetActionId(int actionId); + + + /** + * Gets the action ID of the item. + * + * @since 2.0 + * + * @return The action ID, @n + * else @c -1 if an error occurs + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + int GetActionId(void) const; + + + /** + * Gets the text of the item. + * + * @since 2.0 + * + * @return The item text, @n + * else an empty string if an error occurs + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + Tizen::Base::String GetText(void) const; + + + /** + * Sets the text of the item. + * + * @since 2.0 + * + * @return An error code + * @param[in] text The text to set + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @remarks If the size of the text exceeds the displayable area, the font size of the text is decreased automatically. + */ + result SetText(const Tizen::Base::String& text); + + +private: + friend class TabBar; + + // + //This method is for internal use only. Using this method can cause behavioral, security-related, + //and consistency-related issues in the application. + // + _TabBarItemImpl* __pTabBarItemImpl; + + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + TabBarItem(const TabBarItem& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + TabBarItem& operator =(const TabBarItem& rhs); + +}; // TabBarItem + +}}} // Tizen::Ui: Control + +#endif //_FUI_CTRL_TAB_BAR_ITEM_H_ diff --git a/inc/FUiCtrlTableView.h b/inc/FUiCtrlTableView.h new file mode 100644 index 0000000..900cd9e --- /dev/null +++ b/inc/FUiCtrlTableView.h @@ -0,0 +1,874 @@ +// +// 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 FUiCtrlTableView.h +* @brief This is the header file for the %TableView class. +* +* This header file contains the declarations of the %TableView class and its helper classes. +*/ + +#ifndef _FUI_CTRL_TABLE_VIEW_H_ +#define _FUI_CTRL_TABLE_VIEW_H_ + +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ +class ITableViewItemProvider; +class ITableViewItemProviderF; +class ITableViewItemEventListener; +class IFastScrollListener; +class IScrollEventListener; +class IScrollEventListenerF; + +/** + * @class TableView + * @brief This class defines common behavior for a %TableView control. + * + * @since 2.0 + * + * The %TableView class defines common behavior for a %TableView control. + * + * The following example demonstrates how to use the %TableView class. + * + * @code +//Sample code for TableViewSample.h +#include + +class TableViewSample + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::Controls::ITableViewItemProvider + , public Tizen::Ui::Controls::ITableViewItemEventListener +{ +public: + TableViewSample(void) + : __pTableView(null) + , __pContextItem(null){} + + bool Initialize(void); + virtual result OnInitializing(void); + virtual result OnTerminating(void); + + // ITableViewItemEventListener + virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status); + virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView, int itemIndex, Tizen::Ui::Controls::TableViewContextItem* pContextItem, bool activated); + virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView, int itemIndexFrom, int itemIndexTo); + + // ITableViewItemProvider + virtual int GetItemCount(void); + virtual Tizen::Ui::Controls::TableViewItem* CreateItem(int itemIndex, int itemWidth); + virtual bool DeleteItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem); + virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem); + virtual int GetDefaultItemHeight(void); + +private: + Tizen::Ui::Controls::TableView* __pTableView; + Tizen::Ui::Controls::TableViewContextItem* __pContextItem; +}; + * @endcode + * + * @code +//Sample code for TableViewSample.cpp +#include +#include + +#include "TableViewSample.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Media; +using namespace Tizen::Ui::Controls; + +bool +TableViewSample::Initialize(void) +{ + Construct(FORM_STYLE_NORMAL); + return true; +} + +result +TableViewSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + // 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); + + // Adds the TableView to the form + AddControl(__pTableView); + + // Creates an instance of TableViewContextItem + __pContextItem = new TableViewContextItem(); + __pContextItem->Construct(Dimension(720, 100)); + + Button* pButton = new Button(); + pButton->Construct(Rectangle(10, 10, 200, 80), L"Context1"); + + Button* pButton2 = new Button(); + pButton2->Construct(Rectangle(250, 10, 200, 80), L"Context2"); + + __pContextItem->AddControl(pButton); + __pContextItem->AddControl(pButton2); + + return r; +} + +result +TableViewSample::OnTerminating(void) +{ + result r = E_SUCCESS; + + // Deallocates the item context + delete __pContextItem; + __pContextItem = null; + + return r; +} + +// ITableViewItemEventListener implementation +void +TableViewSample::OnTableViewItemStateChanged(TableView& tableView, int itemIndex, TableViewItem* pItem, TableViewItemStatus status) +{ + // .... +} + +void +TableViewSample::OnTableViewContextItemActivationStateChanged(TableView& tableView, int itemIndex, TableViewContextItem* pContextItem, bool activated) +{ + // .... +} + +void +TableViewSample::OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView, int itemIndexFrom, int itemIndexTo) +{ + // .... +} + +// ITableViewItemProvider implementation +int +TableViewSample::GetItemCount(void) +{ + return 50; +} + +int +TableViewSample::GetDefaultItemHeight(void) +{ + return 100; +} + +TableViewItem* +TableViewSample::CreateItem(int itemIndex, int itemWidth) +{ + TableViewAnnexStyle style = TABLE_VIEW_ANNEX_STYLE_NORMAL; + TableViewItem* pItem = new TableViewItem(); + + switch (itemIndex % 6) + { + case 0: + style = TABLE_VIEW_ANNEX_STYLE_NORMAL; + break; + case 1: + style = TABLE_VIEW_ANNEX_STYLE_MARK; + break; + case 2: + style = TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING; + break; + case 3: + style = TABLE_VIEW_ANNEX_STYLE_DETAILED; + break; + case 4: + style = TABLE_VIEW_ANNEX_STYLE_RADIO; + break; + case 5: + style = TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER; + break; + default: + break; + } + + pItem->Construct(Dimension(itemWidth, GetDefaultItemHeight()), style); + + String text; + text.Format(30, L"TableViewItem %d", itemIndex); + + Label* pLabel = new Label(); + pLabel->Construct(Rectangle(0, 0, itemWidth, GetDefaultItemHeight()), text); + + pItem->AddControl(pLabel); + pItem->SetContextItem(__pContextItem); + + return pItem; +} + +bool +TableViewSample::DeleteItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem) +{ + pItem->Destroy(); + + return true; +} + +void +TableViewSample::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem) +{ + // .... +} + * @endcode + * + */ + +class _OSP_EXPORT_ TableView + : public Tizen::Ui::Container +{ +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. + * + * @since 2.0 + */ + TableView(void); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~TableView(void); + + /** + * Initializes this instance of %TableView with the specified parameters. + * + * @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 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); + + /** + * Initializes this instance of %TableView with the specified parameters. + * + * @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 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); + + /** + * Sets the item provider that creates and deletes items for the simple style table view. + * + * @since 2.0 + * + * @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. + * - To reset the item provider, pass @c null to @c pProvider. + */ + void SetItemProvider(ITableViewItemProvider* pProvider); + + /** + * Sets the item provider that creates and deletes items for the simple style table view. + * + * @since 2.1 + * + * @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. + * - To reset the item provider, pass @c null to @c pProvider. + */ + void SetItemProviderF(ITableViewItemProviderF* pProvider); + + /** + * Begins the reordering mode. + * + * @since 2.0 + * + * @see ITableViewItemEventListener::OnTableViewItemReordered() + */ + void BeginReorderingMode(void); + + /** + * Ends the reordering mode. + * + * @since 2.0 + * + * @see ITableViewItemEventListener::OnTableViewItemReordered() + */ + void EndReorderingMode(void); + + /** + * Checks whether the %TableView control is in reordering mode. + * + * @since 2.0 + * + * @return @c true if the %TableView is in reordering mode, @n + * else @c false + */ + bool IsInReorderingMode(void) const; + + /** + * Adds a listener instance that listens to state changes of table view items. @n + * The added listener can listen to events on the specified event dispatcher's context when they are fired. + * + * @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. + */ + result AddTableViewItemEventListener(ITableViewItemEventListener& listener); + + /** + * Removes a listener instance that listens to state changes of table view items. @n + * The removed listener cannot listen to events when they are fired. + * + * @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. + */ + result RemoveTableViewItemEventListener(ITableViewItemEventListener& listener); + + /** + * Adds a listener instance that listens to state changes of a fast scroll. @n + * The added listener can listen to events on the specified event dispatcher's context when they are fired. + * + * @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. + */ + result AddFastScrollListener(IFastScrollListener& listener); + + /** + * Removes a listener instance that listens to state changes of a fast scroll. @n + * The removed listener cannot listen to events when they are fired. + * + * @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. + */ + result RemoveFastScrollListener(IFastScrollListener& listener); + + /** + * Adds a listener instance that listens to state changes of a scroll event. @n + * The added listener can listen to events on the specified event dispatcher's context when they are fired. + * + * @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. + * @see IScrollEventListener::OnScrollEndReached() + * @see RemoveScrollEventListener() + */ + result AddScrollEventListener(IScrollEventListener& listener); + + /** + * Removes a listener instance that listens to state changes of a scroll event. @n + * The removed listener cannot listen to events when they are fired. + * + * @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. + * @see IScrollEventListener::OnScrollEndReached() + * @see AddScrollEventListener() + */ + result RemoveScrollEventListener(IScrollEventListener& listener); + + /** + * Adds a listener instance that listens to state changes of a scroll event. @n + * The added listener can listen to events on the specified event dispatcher's context when they are fired. + * + * @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. + * @see IScrollEventListenerF::OnScrollEndReached() + * @see RemoveScrollEventListenerF() + */ + result AddScrollEventListener(IScrollEventListenerF& listener); + + /** + * Removes a listener instance that listens to state changes of a scroll event. @n + * The removed listener cannot listen to events when they are fired. + * + * @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. + * @see IScrollEventListenerF::OnScrollEndReached() + * @see AddScrollEventListenerF() + */ + result RemoveScrollEventListener(IScrollEventListenerF& listener); + + /** + * Sets the index table view of the scroll by texts. + * + * @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. + */ + result SetFastScrollIndex(const Tizen::Base::String& text, bool useSearchIcon); + + /** + * Gets the group and item indexes of the top item. + * + * @since 2.0 + * + * @return The item index + * @exception E_SUCCESS The method is successful. + * @exception E_OBJ_NOT_FOUND Top drawn item is not found. + */ + int GetTopDrawnItemIndex(void) const; + + /** + * Gets the group and item indexes of the bottom item. + * + * @since 2.0 + * + * @return The item index + * @exception E_SUCCESS The method is successful. + * @exception E_OBJ_NOT_FOUND Bottom drawn item is not found. + */ + int GetBottomDrawnItemIndex(void) const; + + /** + * Scrolls to the item at the specified index. + * The specified item is drawn at the position specified by the item alignment. + * + * @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 + * @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 + * %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); + + /** + * Checks or unchecks the item at the specified index. + * + * @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. + * @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 + * %TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + */ + result SetItemChecked(int itemIndex, bool check); + + /** + * Returns 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] 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 + * %TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + */ + bool IsItemChecked(int itemIndex) const; + + /** + * Enables or disables the item at the specified index. + * + * @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 + * @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 + * %TableView, then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + */ + result SetItemEnabled(int itemIndex, bool enable); + + /** + * 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. + * @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 itemIndex) const; + + /** + * Counts all the items of the specified group. + * + * @since 2.0 + * + * @return The total number of items + */ + int GetItemCount(void) const; + + /** + * 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 invokes + * ITableViewItemProvider::UpdateItem() or ITableViewItemProviderF::UpdateItem() for the given index in sequence. + * + * @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 + * @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. + * + * @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. + */ + result RefreshAllItems(void); + + /** + * Updates all the items of a table view. @n + * This method deletes all the items in the table view and invokes the methods of the item provider again to update the table view. + * + * @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 + * @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. + * - This method should not be called from ITableViewItemProvider implementation because of recursion. + * - The specific error code can be accessed using the GetLastResult() method. + */ + void UpdateTableView(void); + + /** + * Gets the index of the item at the specified position. + * + * @since 2.0 + * + * @return The item index of the item on specified position + * @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 %TableView, + * then UpdateTableView() method should be called explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + */ + int GetItemIndexFromPosition(const Tizen::Graphics::Point& position) const; + + /** + * Gets the index of the item at the specified position. + * + * @since 2.1 + * + * @return The item index of the item on specified position + * @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 %TableView, then UpdateTableView() method should be called + * explicitly (for example, during Tizen::Ui::Control::OnInitializing()). + */ + int GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& position) const; + + /** + * Sets the color of a division line between items. + * + * @since 2.0 + * + * @return An error code + * @param[in] color The division line color + */ + void SetItemDividerColor(const Tizen::Graphics::Color& color); + + /** + * Gets the color of a division line between items. + * + * @since 2.0 + * + * @return The color of a division line + */ + Tizen::Graphics::Color GetItemDividerColor(void) const; + + /** + * Sets the background color of this control. + * + * @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, + * only the bitmap image is displayed. + */ + void SetBackgroundColor(const Tizen::Graphics::Color& color); + + /** + * Gets the background color of this control. + * + * @since 2.0 + * + * @return The background color + */ + Tizen::Graphics::Color GetBackgroundColor(void) const; + + /** + * Sets the scroll input handling mode. + * + * @since 2.0 + * + * @param[in] mode The scroll input handling mode + * @see GetScrollInputMode() + */ + void SetScrollInputMode(ScrollInputMode mode); + + + /** + * Gets the scroll input handling mode. + * + * @since 2.0 + * + * @return The scroll input handling mode + * @see SetScrollInputMode() + */ + 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. + * + * @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. + * @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. + * - This method does not work during the ITableViewItemProvider call-back procedure. + */ + 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. + * + * @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. + * @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. + * - This method does not work during the ITableViewItemProvider call-back procedure. + */ + result ScrollByPixel(float pixel); + + /** + * Gets the current scroll position. + * + * @since 2.1 + */ + int GetCurrentScrollPosition(void) const; + + /** + * Gets the current scroll position. + * + * @since 2.1 + */ + float GetCurrentScrollPositionF(void) const; + + /* + * Enables or disables the scroll of %TableView items. + * + * @since 2.0 + */ + void SetScrollEnabled(bool enable); + + /* + * Checks whether the scroll is enabled or disabled. + * + * @since 2.0 + */ + bool IsScrollEnabled(void) const; + + /** + * Opens the context item at a specified index. + * + * @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. + */ + result OpenContextItem(int itemIndex); + + /** + * Closes the context item at a specified index. + * + * @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. + */ + result CloseContextItem(int itemIndex); + + /** + * Checks whether the context item at a specified index is opened. + * + * @since 2.1 + * + * @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. + */ + bool IsContextItemOpened(int itemIndex) const; + +private: + friend class _TableViewImpl; + + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + TableView(const TableView& rhs); + + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + TableView& operator =(const TableView& rhs); +}; // TableView + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_TABLE_VIEW_H_ diff --git a/inc/FUiCtrlTableViewContextItem.h b/inc/FUiCtrlTableViewContextItem.h new file mode 100644 index 0000000..b8d5f1d --- /dev/null +++ b/inc/FUiCtrlTableViewContextItem.h @@ -0,0 +1,98 @@ +// +// 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 FUiCtrlTableViewContextItem.h +* @brief This is the header file for the %TableViewContextItem class. +* +* This header file contains the declarations of the %TableViewContextItem class and its helper classes. +*/ + +#ifndef _FUI_CTRL_TABLE_VIEW_CONTEXT_ITEM_H_ +#define _FUI_CTRL_TABLE_VIEW_CONTEXT_ITEM_H_ + +#include + +namespace Tizen { namespace Ui { namespace Controls +{ +/** +* @class TableViewContextItem +* @brief This class defines the common behavior for a %TableViewContextItem. +* +* @since 2.0 +* +* The %TableViewContextItem class is a class which represents a context item for TableView. +* A context item is shown when a table view item is swept, if %TableViewContextItem is set to the table view item. +* +*/ + +class _OSP_EXPORT_ TableViewContextItem + : public TableViewItemBase +{ +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. + * + * @since 2.0 + */ + TableViewContextItem(void); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~TableViewContextItem(void); + + /** + * Initializes this instance of %TableViewContextItem with the specified parameter. + * + * @since 2.0 + * + * @return An error code + * @param[in] itemSize The size of the item + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + */ + result Construct(const Tizen::Graphics::Dimension& itemSize); + + /** + * Initializes this instance of %TableViewContextItem with the specified parameter. + * + * @since 2.1 + * + * @return An error code + * @param[in] itemSize The size of the item + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + */ + result Construct(const Tizen::Graphics::FloatDimension& itemSize); + +private: + friend class _TableViewItemImpl; + + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + TableViewContextItem(const TableViewContextItem& rhs); + + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + TableViewContextItem& operator =(const TableViewContextItem& rhs); +}; // TableViewContextItem + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_TABLE_VIEW_CONTEXT_ITEM_H_ diff --git a/inc/FUiCtrlTableViewGroupItem.h b/inc/FUiCtrlTableViewGroupItem.h new file mode 100644 index 0000000..7c3a6f9 --- /dev/null +++ b/inc/FUiCtrlTableViewGroupItem.h @@ -0,0 +1,150 @@ +// +// 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 FUiCtrlTableViewGroupItem.h + * @brief This is the header file for the %TableViewGroupItem class. + * + * This header file contains the declarations of the %TableViewGroupItem class and its helper classes. + */ + +#ifndef _FUI_CTRL_TABLE_VIEW_GROUP_ITEM_H_ +#define _FUI_CTRL_TABLE_VIEW_GROUP_ITEM_H_ + +#include + +namespace Tizen { namespace Ui { namespace Controls +{ +/** +* @class TableViewGroupItem +* @brief This class defines the common behavior of %TableViewGroupItem. +* +* @since 2.0 +* +* The %TableViewGroupItem class displays a table view group item. The %TableViewGroupItem can have any layout of Controls or Containers as children. +*/ + +class _OSP_EXPORT_ TableViewGroupItem + : public TableViewItemBase +{ +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. + * + * @since 2.0 + */ + TableViewGroupItem(void); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~TableViewGroupItem(void); + + /** + * Initializes this instance of %TableViewGroupItem with the specified parameter. + * + * @since 2.0 + * + * @return An error code + * @param[in] itemSize The size of the item + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + */ + result Construct(const Tizen::Graphics::Dimension& itemSize); + + /** + * Initializes this instance of %TableViewGroupItem with the specified parameter. + * + * @since 2.0 + * + * @return An error code + * @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. + */ + result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::Dimension& itemSize); + + /** + * Initializes this instance of %TableViewGroupItem with the specified parameter. + * + * @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] itemSize The size of the item + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + */ + result Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, const Tizen::Graphics::Dimension& itemSize); + + /** + * Initializes this instance of %TableViewGroupItem with the specified parameter. + * + * @since 2.1 + * + * @return An error code + * @param[in] itemSize The size of the item + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + */ + result Construct(const Tizen::Graphics::FloatDimension& itemSize); + + /** + * Initializes this instance of %TableViewGroupItem with the specified parameter. + * + * @since 2.1 + * + * @return An error code + * @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. + */ + result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::FloatDimension& itemSize); + + /** + * Initializes this instance of %TableViewGroupItem with the specified parameter. + * + * @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] itemSize The size of the item + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + */ + result Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, const Tizen::Graphics::FloatDimension& itemSize); + +private: + friend class _TableViewItemImpl; + + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + TableViewGroupItem(const TableViewGroupItem& rhs); + + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + TableViewGroupItem& operator =(const TableViewGroupItem& rhs); +}; // TableViewGroupItem + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_TABLE_VIEW_GROUP_ITEM_H_ diff --git a/inc/FUiCtrlTableViewItem.h b/inc/FUiCtrlTableViewItem.h new file mode 100644 index 0000000..4befb17 --- /dev/null +++ b/inc/FUiCtrlTableViewItem.h @@ -0,0 +1,194 @@ +// +// 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 FUiCtrlTableViewItem.h +* @brief This is the header file for the %TableViewItem class. +* +* This header file contains the declarations of the %TableViewItem class and its helper classes. +*/ + +#ifndef _FUI_CTRL_TABLE_VIEW_ITEM_H_ +#define _FUI_CTRL_TABLE_VIEW_ITEM_H_ + +#include + +namespace Tizen { namespace Ui { namespace Controls +{ +class TableViewContextItem; + +/** +* @class 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 TableView. +* +*/ + +class _OSP_EXPORT_ TableViewItem + : public TableViewItemBase +{ +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. + * + * @since 2.0 + */ + TableViewItem(void); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~TableViewItem(void); + + /** + * Initializes this instance of %TableViewItem with the specified parameter. + * + * @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_INVALID_ARG A specified input parameter is invalid. + */ + result Construct(const Tizen::Graphics::Dimension& itemSize, TableViewAnnexStyle style = TABLE_VIEW_ANNEX_STYLE_NORMAL); + + /** + * Initializes this instance of %TableViewItem with the specified parameter. + * + * @since 2.0 + * + * @return An error code + * @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 the annex + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + */ + result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::Dimension& itemSize, TableViewAnnexStyle style = TABLE_VIEW_ANNEX_STYLE_NORMAL); + + /** + * Initializes this instance of %TableViewItem with the specified parameter. + * + * @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] itemSize The size of the item + * @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. + */ + result Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, const Tizen::Graphics::Dimension& itemSize, TableViewAnnexStyle style = TABLE_VIEW_ANNEX_STYLE_NORMAL); + + /** + * Initializes this instance of %TableViewItem with the specified parameter. + * + * @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_INVALID_ARG A specified input parameter is invalid. + */ + result Construct(const Tizen::Graphics::FloatDimension& itemSize, TableViewAnnexStyle style = TABLE_VIEW_ANNEX_STYLE_NORMAL); + + /** + * Initializes this instance of %TableViewItem with the specified parameter. + * + * @since 2.1 + * + * @return An error code + * @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 the annex + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + */ + result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::FloatDimension& itemSize, TableViewAnnexStyle style = TABLE_VIEW_ANNEX_STYLE_NORMAL); + + /** + * Initializes this instance of %TableViewItem with the specified parameter. + * + * @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] itemSize The size of the item + * @param[in] style The style of Annex + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + */ + 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 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 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); + + /** + * Gets the width of the annex area. + * + * @since 2.0 + * + * @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. + */ + static int GetAnnexWidth(TableViewAnnexStyle style); + + /** + * 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 from the annex styles. + */ + static float GetAnnexWidthF(TableViewAnnexStyle style); + +private: + friend class _TableViewItemImpl; + + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + TableViewItem(const TableViewItem& rhs); + + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + TableViewItem& operator =(const TableViewItem& rhs); +}; //TableViewItem + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_TABLE_VIEW_ITEM_H_ diff --git a/inc/FUiCtrlTableViewItemBase.h b/inc/FUiCtrlTableViewItemBase.h new file mode 100644 index 0000000..9286c66 --- /dev/null +++ b/inc/FUiCtrlTableViewItemBase.h @@ -0,0 +1,171 @@ +// +// 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 FUiCtrlTableViewItemBase.h +* @brief This is the header file for the %TableViewItemBase class. +* +* This header file contains the declarations of the %TableViewItemBase class and its helper classes. +*/ + +#ifndef _FUI_CTRL_TABLE_VIEW_ITEM_BASE_H_ +#define _FUI_CTRL_TABLE_VIEW_ITEM_BASE_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** +* @class 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 TableView. +* +*/ + +class _OSP_EXPORT_ TableViewItemBase + : public Tizen::Ui::Container +{ +public: + /** + * Sets the background image of the item which is displayed when the item is in the specified state. + * + * @since 2.0 + * + * @return An error code + * @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. + * @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 the specified state. + * + * @since 2.0 + * + * @return An error code + * @param[in] color The background color + * @param[in] status The item drawing state + */ + void SetBackgroundColor(const Tizen::Graphics::Color& color, TableViewItemDrawingStatus status = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL); + + /** + * Gets the background color of the item which is displayed when the item is in the specified state. + * + * @since 2.0 + * + * @return The background color of the item + * @param[in] status The item drawing state + * + * @remarks If an error occurs, this method returns RGBA(0, 0, 0, 0). + * @see SetBackgroundColor() + */ + Tizen::Graphics::Color GetBackgroundColor(TableViewItemDrawingStatus status = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL) const; + + /** + * Enables or disables the individual selection of a control. + * + * @since 2.0 + * + * @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, @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); + + /** + * 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, @n + * else @c false + * @param[in] pControl The target control + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + */ + bool IsIndividualSelectionEnabled(const Tizen::Ui::Control* pControl); + +protected: + /** + * This class is constructible only as a subobject of a derived class. + * + * @since 2.0 + */ + TableViewItemBase(void); + + /** + * This class is destructible only as a subobject of a derived class. + * + * @since 2.0 + */ + virtual ~TableViewItemBase(void); + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // The following method is reserved, and its name can be changed at any time without prior notice. + // + // @since 2.0 + // + virtual void TableViewItemBase_Reserved1(void) {} + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // The following method is reserved, and its name can be changed at any time without prior notice. + // + // @since 2.0 + // + virtual void TableViewItemBase_Reserved2(void) {} + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // The following method is reserved, and its name can be changed at any time without prior notice. + // + // @since 2.0 + // + virtual void TableViewItemBase_Reserved3(void) {} + +private: + friend class _TableViewItemImpl; + + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + TableViewItemBase(const TableViewItemBase& rhs); + + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + TableViewItemBase& operator =(const TableViewItemBase& rhs); +}; // TableViewItemBase + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_TABLE_VIEW_ITEM_BASE_H_ diff --git a/inc/FUiCtrlTableViewSimpleGroupItem.h b/inc/FUiCtrlTableViewSimpleGroupItem.h new file mode 100644 index 0000000..79160f0 --- /dev/null +++ b/inc/FUiCtrlTableViewSimpleGroupItem.h @@ -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 FUiCtrlTableViewSimpleGroupItem.h +* @brief This is the header file for the %TableViewSimpleGroupItem class. +* +* This header file contains the declarations of the %TableViewSimpleGroupItem class and its helper classes. +*/ + +#ifndef _FUI_CTRL_TABLE_VIEW_SIMPLE_GROUP_ITEM_H_ +#define _FUI_CTRL_TABLE_VIEW_SIMPLE_GROUP_ITEM_H_ + +#include + +namespace Tizen { namespace Ui { namespace Controls +{ +/** +* @class TableViewSimpleGroupItem +* @brief This class defines the common behavior of %TableViewSimpleGroupItem. +* +* @since 2.0 +* +* The %TableViewSimpleGroupItem class displays a table view group item. +* The basic layout of the %TableViewSimpleGroupItem instance is text and a bitmap arranged horizontally in one line. The bitmap can be omitted while text must be given. +*/ + +class _OSP_EXPORT_ TableViewSimpleGroupItem + : public TableViewGroupItem +{ +public: + /** + * This is the default constructor for this class. + * + * @since 2.0 + */ + TableViewSimpleGroupItem(void); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~TableViewSimpleGroupItem(void); + + /** + * Initializes this instance of %TableViewSimpleGroupItem with the specified parameter. + * + * @since 2.0 + * + * @return An error code + * @param[in] itemSize The size of the item + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + */ + result Construct(const Tizen::Graphics::Dimension& itemSize); + + /** + * Initializes this instance of %TableViewSimpleGroupItem with the specified parameter. + * + * @since 2.0 + * + * @return An error code + * @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. + */ + result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::Dimension& itemSize); + + /** + * Initializes this instance of %TableViewSimpleGroupItem with the specified parameter. + * + * @since 2.1 + * + * @return An error code + * @param[in] itemSize The size of the item + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + */ + result Construct(const Tizen::Graphics::FloatDimension& itemSize); + + /** + * Initializes this instance of %TableViewSimpleGroupItem with the specified parameter. + * + * @since 2.1 + * + * @return An error code + * @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. + */ + result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::FloatDimension& itemSize); + + /** + * Sets the text string and bitmap image for %TableViewSimpleGroupItem. + * + * @since 2.0 + * + * @return An error code + * @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_INVALID_ARG A specified input parameter is invalid. + */ + result SetItemContents(const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBitmap = null); + + /** + * Sets the color of the text. + * + * @since 2.0 + * + * @return An error code + * @param[in] color The text color + * @param[in] status The item drawing state + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @see GetTextColor() + */ + result SetTextColor(const Tizen::Graphics::Color& color, TableViewItemDrawingStatus status = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL); + + /** + * Gets the color of the text. + * + * @since 2.0 + * + * @return The text color + * @param[in] status The item drawing state + * @see SetTextColor() + */ + Tizen::Graphics::Color GetTextColor(TableViewItemDrawingStatus status = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL) const; + + /** + * Sets the size of the text. + * + * @since 2.0 + * + * @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. + * @see GetTextSize() + */ + result SetTextSize(int size); + + /** + * Gets the size of the text. + * + * @since 2.0 + * + * @return The size of the text + * @see SetTextSize() + */ + int GetTextSize(void) const; + +private: + friend class _TableViewItemImpl; + + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + TableViewSimpleGroupItem(const TableViewSimpleGroupItem& rhs); + + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + TableViewSimpleGroupItem& operator =(const TableViewSimpleGroupItem& rhs); +}; // TableViewSimpleGroupItem + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_TABLE_VIEW_SIMPLE_GROUP_ITEM_H_ diff --git a/inc/FUiCtrlTableViewSimpleItem.h b/inc/FUiCtrlTableViewSimpleItem.h new file mode 100644 index 0000000..482eae6 --- /dev/null +++ b/inc/FUiCtrlTableViewSimpleItem.h @@ -0,0 +1,186 @@ +// +// 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 FUiCtrlTableViewSimpleItem.h +* @brief This is the header file for the %TableViewSimpleItem class. +* +* This header file contains the declarations of the %TableViewSimpleItem class and its helper classes. +*/ + +#ifndef _FUI_CTRL_TABLE_VIEW_SIMPLE_ITEM_H_ +#define _FUI_CTRL_TABLE_VIEW_SIMPLE_ITEM_H_ + +#include + +namespace Tizen { namespace Ui { namespace Controls +{ +/** + * @class TableViewSimpleItem + * @brief This class defines the common behavior for a %TableViewSimpleItem. + * + * @since 2.0 + * + * The %TableViewSimpleItem class is a class which represents a table view item which has one label and one bitmap. + * + */ + +class _OSP_EXPORT_ TableViewSimpleItem + : public 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. + * + * @since 2.0 + */ + TableViewSimpleItem(void); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~TableViewSimpleItem(void); + + /** + * Initializes this instance of %TableViewSimpleItem with the specified parameter. + * + * @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_INVALID_ARG A specified input parameter is invalid. + */ + result Construct(const Tizen::Graphics::Dimension& itemSize, TableViewAnnexStyle style = TABLE_VIEW_ANNEX_STYLE_NORMAL); + + /** + * Initializes this instance of TableViewItem with the specified parameter. + * + * @since 2.0 + * + * @return An error code + * @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 the annex + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + */ + result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::Dimension& itemSize, TableViewAnnexStyle style = TABLE_VIEW_ANNEX_STYLE_NORMAL); + + /** + * Initializes this instance of %TableViewSimpleItem with the specified parameter. + * + * @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_INVALID_ARG A specified input parameter is invalid. + */ + result Construct(const Tizen::Graphics::FloatDimension& itemSize, TableViewAnnexStyle style = TABLE_VIEW_ANNEX_STYLE_NORMAL); + + /** + * Initializes this instance of TableViewItem with the specified parameter. + * + * @since 2.1 + * + * @return An error code + * @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 the annex + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + */ + result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::FloatDimension& itemSize, TableViewAnnexStyle style = TABLE_VIEW_ANNEX_STYLE_NORMAL); + + /** + * Sets the text string and bitmap image for %TableViewSimpleItem. + * + * @since 2.0 + * + * @return An error code + * @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_OUT_OF_MEMORY The memory is insufficient. + */ + result SetItemContents(const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBitmap = null); + + /** + * Sets the color of the text. + * + * @since 2.0 + * + * @return An error code + * @param[in] color The text color + * @param[in] status The item drawing state + * @see GetTextColor() + */ + void SetTextColor(const Tizen::Graphics::Color& color, TableViewItemDrawingStatus status = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL); + + /** + * Gets the color of the text. + * + * @since 2.0 + * + * @return The text color, + * @param[in] status The item drawing state + * @see SetTextColor() + */ + Tizen::Graphics::Color GetTextColor(TableViewItemDrawingStatus status = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL) const; + + /** + * Sets the size of the text. + * + * @since 2.0 + * + * @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 @c 1. + * @see GetTextSize() + */ + result SetTextSize(int size); + + /** + * Gets the size of the text. + * + * @since 2.0 + * + * @return The size of the text + * @see SetTextSize() + */ + int GetTextSize(void) const; + +private: + friend class _TableViewItemImpl; + + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + TableViewSimpleItem(const TableViewSimpleItem& rhs); + + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + TableViewSimpleItem& operator =(const TableViewSimpleItem& rhs); +}; // TableViewSimpleItem + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_TABLE_VIEW_SIMPLE_ITEM_H_ diff --git a/inc/FUiCtrlTableViewTypes.h b/inc/FUiCtrlTableViewTypes.h new file mode 100644 index 0000000..628a96d --- /dev/null +++ b/inc/FUiCtrlTableViewTypes.h @@ -0,0 +1,139 @@ +// +// 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 FUiCtrlTableViewTypes.h +* @brief This is the header file for the %TableView enumerations. +* +* This header file contains the declarations of the TableView enumerations. +*/ +#ifndef _FUI_CTRL_TABLE_VIEW_TYPES_H_ +#define _FUI_CTRL_TABLE_VIEW_TYPES_H_ + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** +* @enum TableViewAnnexStyle +* +* Defines the style of annex in the items. +* +* @since 2.0 +*/ +enum TableViewAnnexStyle +{ + TABLE_VIEW_ANNEX_STYLE_NORMAL = 0, /**< No annex */ + TABLE_VIEW_ANNEX_STYLE_MARK, /**< Mark style check for multiple selection */ + TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING, /**< On/Off slider style */ + TABLE_VIEW_ANNEX_STYLE_DETAILED, /**< Detailed style for further interaction */ + TABLE_VIEW_ANNEX_STYLE_RADIO, /**< Radio style check for simple look */ + TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER /**< The slider style On/Off with divider @b Since: @b 2.1 */ +}; + +/** +* @enum TableViewItemDrawingStatus +* +* Defines the drawing state of the items. +* +* @since 2.0 +*/ +enum TableViewItemDrawingStatus +{ + TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL = 0, /**< The normal drawing state */ + TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED, /**< The pressed drawing state */ + TABLE_VIEW_ITEM_DRAWING_STATUS_HIGHLIGHTED /**< The highlighted drawing state */ +}; + +/** +* @enum TableViewRefreshType +* +* Defines the update type of the TableView item. +* +* @since 2.0 +*/ +enum TableViewRefreshType +{ + TABLE_VIEW_REFRESH_TYPE_ITEM_ADD = 0, /**< Refresh request of adding an item */ + TABLE_VIEW_REFRESH_TYPE_ITEM_REMOVE, /**< Refresh request of removing an item */ + TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY /**< Refresh request of modifying an item */ +}; + +/** +* @enum TableViewItemStatus +* +* Defines the item state of the TableView. +* +* @since 2.0 +*/ +enum TableViewItemStatus +{ + TABLE_VIEW_ITEM_STATUS_SELECTED = 0, /**< The selected item state */ + TABLE_VIEW_ITEM_STATUS_HIGHLIGHTED, /**< The highlighted item state */ + TABLE_VIEW_ITEM_STATUS_CHECKED, /**< The checked item state */ + TABLE_VIEW_ITEM_STATUS_UNCHECKED, /**< The unchecked item state */ + TABLE_VIEW_ITEM_STATUS_MORE /**< The more item state */ +}; + +/** +* @enum TableViewSweepDirection +* +* Defines the direction of the sweep interaction. +* +* @since 2.0 +*/ +enum TableViewSweepDirection +{ + TABLE_VIEW_SWEEP_DIRECTION_LEFT = 0, /**< The left direction */ + TABLE_VIEW_SWEEP_DIRECTION_RIGHT /**< The right direction */ +}; + +/** +* @enum TableViewScrollItemAlignment +* +* Defines the alignment information for item scroll. +* +* @since 2.0 +*/ +enum TableViewScrollItemAlignment +{ + TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_TOP = 0, /**< The item is aligned at the top of the TableView at item scroll*/ + TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_BOTTOM /**< The item is aligned at the bottom of the TableView at item scroll */ +}; + +/** +* @enum TableViewScrollBarStyle +* +* Defines the scroll bar style of the list. +* +* @since 2.0 +*/ +enum TableViewScrollBarStyle +{ + TABLE_VIEW_SCROLL_BAR_STYLE_NONE = 0, /**< No scroll bar */ + TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT, /**< The fade-out scroll bar style */ + TABLE_VIEW_SCROLL_BAR_STYLE_FIXED, /**< The fixed scroll bar style */ + TABLE_VIEW_SCROLL_BAR_STYLE_JUMP_TO_TOP, /**< The jump to top scroll bar style */ + TABLE_VIEW_SCROLL_BAR_STYLE_THUMB, /**< The thumb scroll bar style */ + TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL, /**< The fast scroll bar style */ + TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL_FIXED /**< The fixed fast scroll bar style @b Since: @b 2.2 */ + +}; + + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_TABLE_VIEW_TYPES_H_ diff --git a/inc/FUiCtrlTextBox.h b/inc/FUiCtrlTextBox.h new file mode 100644 index 0000000..af047ba --- /dev/null +++ b/inc/FUiCtrlTextBox.h @@ -0,0 +1,832 @@ +// +// 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 FUiCtrlTextBox.h + * @brief This is the header file for the %TextBox class. + * + * This header file contains the declarations of the %TextBox class and its helper classes. + */ + +#ifndef _FUI_CTRL_TEXT_BOX_H_ +#define _FUI_CTRL_TEXT_BOX_H_ + +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ +class _TextBoxImpl; +}; +}; +}; + +namespace Tizen { namespace Ui { namespace Controls +{ +/** + * @enum TextBoxBorder + * + * Defines the possible types of text box borders. + * + * @since 2.0 + */ +enum TextBoxBorder +{ + TEXT_BOX_BORDER_NONE, /**< No border */ + TEXT_BOX_BORDER_ROUNDED /**< The rounded border */ +}; + + +/** + * @enum TextBoxStatus + * + * Defines the possible states of the text box. + * + * @since 2.0 + */ +enum TextBoxStatus +{ + TEXT_BOX_STATUS_NORMAL, /**< The normal state */ + TEXT_BOX_STATUS_HIGHLIGHTED, /**< The focus-highlighted state */ + TEXT_BOX_STATUS_DISABLED /**< The disabled state */ +}; + + +/** + * @enum TextBoxTextColor + * + * Defines the possible text colors. + * + * @since 2.0 + */ +enum TextBoxTextColor +{ + TEXT_BOX_TEXT_COLOR_NORMAL, /**< The default text color */ + TEXT_BOX_TEXT_COLOR_HIGHLIGHTED, /**< The highlighted text color */ + TEXT_BOX_TEXT_COLOR_DISABLED, /**< The disabled text color */ + TEXT_BOX_TEXT_COLOR_BLOCKED, /**< The text block color */ + TEXT_BOX_TEXT_COLOR_LINK /**< The link text color */ +}; + + +/** + * @enum TextBoxTextStyle + * + * Defines the possible text styles. + * + * @since 2.0 + */ +enum TextBoxTextStyle +{ + TEXT_BOX_TEXT_STYLE_NORMAL = 0x0000, /**< The normal text style */ + TEXT_BOX_TEXT_STYLE_BOLD = 0x0001, /**< The bold text style */ + TEXT_BOX_TEXT_STYLE_ITALIC = 0x0002, /**< The italic text style */ + TEXT_BOX_TEXT_STYLE_UNDERLINE = 0x0004, /**< The underline text style */ + TEXT_BOX_TEXT_STYLE_STRIKEOUT = 0x0008, /**< The strikeout text style */ + TEXT_BOX_TEXT_STYLE_MAX = 0x7FFF /**< The placeholder */ +}; + +/** + * @class TextBox + * @brief This class is an implementation of a %TextBox control. + * + * @since 2.0 + * + * The %TextBox class displays a non-editable text field. + * + * For more information on the class features, see TextBox. + * + * The following example demonstrates how to use the %TextBox class. + * + * @code +// Sample code for TextBoxSample.h +#include + +class TextBoxSample + : public Tizen::Ui::Controls::Form +{ +public: + TextBoxSample(void) + : __pTextBox(null){} + + bool Initialize(void); + virtual result OnInitializing(void); + +private: + Tizen::Ui::Controls::TextBox* __pTextBox; +}; + * @endcode + * + * @code +// Sample code for TextBoxSample.cpp +#include + +#include "TextBoxSample.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Ui::Controls; + +bool +TextBoxSample::Initialize(void) +{ + Construct(FORM_STYLE_NORMAL); + return true; +} + +result +TextBoxSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + // Creates an instance of TextBox + __pTextBox = new TextBox(); + __pTextBox->Construct(Rectangle(50, 50, GetClientAreaBounds().width-80, 300), TEXT_BOX_BORDER_ROUNDED); + + // Sets properties on the text box + __pTextBox->SetTextSize(50); + __pTextBox->SetText(L"Tizen Developer"); + __pTextBox->SetTextColor(TEXT_BOX_TEXT_COLOR_HIGHLIGHTED, Color::GetColor(COLOR_ID_RED)); + __pTextBox->AppendText(L"\nTizen SDK"); + + // Adds the text box to the form + AddControl(__pTextBox); + + return r; +} +* @endcode +*/ +class _OSP_EXPORT_ TextBox + : public Tizen::Ui::Control +{ +// Lifecycle +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. + * + * @since 2.0 + * + */ + TextBox(void); + + /** + * 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 ~TextBox(void); + + /** + * Initializes this instance of %TextBox with the specified parameters. + * + * @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 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. + * @param[in] border The border style + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result Construct(const Tizen::Graphics::Rectangle& rect, TextBoxBorder border = TEXT_BOX_BORDER_ROUNDED); + + /** + * Initializes this instance of %TextBox with the specified parameters. + * + * @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 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. + * @param[in] border The border style + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result Construct(const Tizen::Graphics::FloatRectangle& rect, TextBoxBorder border = TEXT_BOX_BORDER_ROUNDED); + +// Operation +public: + /** + * Sets the auto-link mask. + * + * @since 2.0 + * + * @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, + * see AutoLink Detection. + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @remarks When @c autoLinks is set to @c 0, the auto-link detection is disabled. + * @see Tizen::Base::Utility::LinkType + * @see GetAutoLinkMask() + */ + result SetAutoLinkMask(unsigned long autoLinks); + + /** + * Gets the auto-link mask. + * + * @since 2.0 + * + * @return The auto-link mask + * @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 SetAutoLinkMask() + */ + unsigned long GetAutoLinkMask(void) const; + + /** + * Adds a link event listener. + * + * @since 2.0 + * + * @param[in] listener The event listener to add + * @see RemoveUiLinkEventListener() + */ + void AddUiLinkEventListener(Tizen::Ui::IUiLinkEventListener& listener); + + /** + * Removes the specified link event listener. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to remove + * @see AddUiLinkEventListener() + */ + void RemoveUiLinkEventListener(Tizen::Ui::IUiLinkEventListener& listener); + +// Text + /** + * Appends the specified character at the end of the text. + * + * @since 2.0 + * + * @return An error code + * @param[in] character The character to add + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @remarks + * - The method modifies the text buffer that is managed by the %TextBox control. + * -To display the changes, the control must be drawn again. + */ + result AppendCharacter(const Tizen::Base::Character& character); + + /** + * Appends the specified text at the end of the text. + * + * @since 2.0 + * + * @return An error code + * @param[in] text The text to append + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @remarks + * -To denote the end of a line use '\\n'. + * -The method modifies the text buffer that is managed by the %TextBox control. + * -To display the changes, the control must be drawn again. + */ + result AppendText(const Tizen::Base::String& text); + + /** + * Clears the text that is displayed by the %TextBox control. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @remarks + * -The method modifies the text buffer that is managed by the %TextBox control. + * -To display the changes, the control must be drawn again. + */ + result Clear(void); + + /** + * Gets the number of lines contained in the %TextBox control. + * + * @since 2.0 + * + * @return The line count of the text, @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. + */ + int GetLineCount(void) const; + + /** + * Gets the text that is displayed by the %TextBox control. + * + * @since 2.0 + * + * @return The text of the %TextBox control, @n + * else an empty string if an error occurs + * @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 SetText() + */ + Tizen::Base::String GetText(void) const; + + /** + * Gets a portion of the text that is displayed by the %TextBox control. + * + * @since 2.0 + * + * @return The specified portion of the text, @n + * else an empty string if an error occurs + * @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. @n + * 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() + */ + Tizen::Base::String GetText(int start, int end) const; + + /** + * Gets the length of the text that is displayed by the %TextBox control. + * + * @since 2.0 + * + * @return The length of the text, @n + * else @c -1 if an error occurs + * @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. + */ + int GetTextLength(void) const; + + /** + * Inserts the character at the specified index. + * + * @since 2.0 + * + * @return An error code + * @param[in] index The position at which to insert the character + * @param[in] character The character to insert + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE The specified @c index is outside the bounds of the data structure. @n + * The specified @c index is greater than the number of elements or less than @c 0. + * @exception E_SYSTEM A system error has occurred. + */ + result InsertCharacterAt(int index, const Tizen::Base::Character& character); + + /** + * Inserts the text at the specified index. + * + * @since 2.0 + * + * @return An error code + * @param[in] index The position at which to insert the text + * @param[in] text The text to insert + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_RANGE The specified @c index is outside the bounds of the data structure. @n + * The specified @c index is greater than the number of elements or less than @c 0. + * @exception E_SYSTEM A system error has occurred. + */ + result InsertTextAt(int index, const Tizen::Base::String& text); + + /** + * Sets the text to be displayed. + * + * @since 2.0 + * + * @return An error code + * @param[in] text The text to display + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @remarks + * -To denote the end of a line use '\\n'. + * -The method modifies the text buffer that is managed by the %TextBox control. + * -To display the changes, the control must be drawn again. + */ + result SetText(const Tizen::Base::String& text); + +// Line Spacing + /** + * Gets the line spacing. + * + * @since 2.0 + * + * @return The line spacing, @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. + * @see SetLineSpacing() + */ + int GetLineSpacing(void) const; + + /** + * Gets the line spacing. + * + * @since 2.1 + * + * @return The line spacing, @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. + * @see SetLineSpacing() + */ + float GetLineSpacingF(void) const; + + /** + * Sets the line spacing. @n + * The line spacing is determined by multiplying @c multiplier to the default line spacing and adding @c extra. @n + * + * @code + * The line spacing = (default line spacing) * multiplier + extra + * @endcode + * + * @since 2.0 + * + * @return An error code + * @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. @n + * The specified line spacing value cannot be supported. + * @exception E_SYSTEM A system error has occurred. + * @see GetLineSpacing() + */ + result SetLineSpacing(int multiplier, int extra); + + /** + * Sets the line spacing. @n + * The line spacing is determined by multiplying @c multiplier to the default line spacing and adding @c extra. @n + * + * @code + * The line spacing = (default line spacing) * multiplier + extra + * @endcode + * + * @since 2.1 + * + * @return An error code + * @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. @n + * The specified line spacing value cannot be supported. + * @exception E_SYSTEM A system error has occurred. + * @see GetLineSpacingF() + */ + result SetLineSpacing(int multiplier, float extra); + + // Text Alignment + /** + * Gets the horizontal text alignment. + * + * @since 2.0 + * + * @return The horizontal text alignment + * @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 SetTextAlignment() + */ + HorizontalAlignment GetTextAlignment(void) const; + + /** + * Sets the horizontal text alignment. + * + * @since 2.0 + * + * @return An error code + * @param[in] alignment The horizontal text alignment + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see GetTextAlignment() + */ + result SetTextAlignment(HorizontalAlignment alignment); + + // Text Size + /** + * Gets the text size of the %TextBox control. + * + * @since 2.0 + * + * @return The size of the text, @n + * else @c -1 if an error occurs + * @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 SetTextSize() + */ + int GetTextSize(void) const; + + /** + * Gets the text size of the %TextBox control. + * + * @since 2.1 + * + * @return The size of the text, @n + * else @c -1 if an error occurs + * @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 SetTextSize() + */ + float GetTextSizeF(void) const; + + /** + * Sets the text size. + * + * @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 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); + + /** + * Sets the text size. + * + * @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 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); + + // Text Font + /** + * @if OSPDEPREC + * Gets the font typeface name and the style mask of the %TextBox control. + * + * @brief [Deprecated] + * @deprecated This method is deprecated. Instead of using this method, use the GetTextStyle() method. + * @since 2.0 + * + * @return An error code + * @param[out] typefaceName The name of the font typeface + * @param[out] style The text style (see TextBoxTextStyle) + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @remarks Multiple styles can be combined using the bitwise OR operator. + * @see SetFontType() + * @see Tizen::Graphics::Font::GetSystemFontListN() + * @see TextBoxTextStyle + * @endif + */ + result GetFontType(Tizen::Base::String& typefaceName, unsigned long& style) const; + + /** + * Gets the text style mask of the %TextBox control. + * + * @since 2.0 + * + * @return A bitwise combination of Tizen::Ui::Controls::TextBoxTextStyle + * @see SetTextStyle() + * @see TextBoxTextStyle + */ + unsigned long GetTextStyle(void) const; + + /** + * @if OSPDEPREC + * Sets the font and the style mask of the %TextBox control. + * + * @brief [Deprecated] + * @deprecated This method is deprecated. Instead of using this method, use the SetTextStyle() method. + * @since 2.0 + * + * @return An error code + * @param[in] typefaceName The name of the font typeface + * @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 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 + * be applied. + * @see GetFontType() + * @see Tizen::Graphics::Font::GetSystemFontListN() + * @see TextBoxTextStyle + * @endif + */ + result SetFontType(const Tizen::Base::String& typefaceName, unsigned long style); + + /** + * Sets the text style mask of the %TextBox control. + * + * @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 + */ + result SetTextStyle(unsigned long style); + + using Control::SetFont; + /** + * @if OSPDEPREC + * Sets the font to render the text. + * + * @brief [Deprecated] + * @deprecated This method is deprecated. Instead of using this method, use the SetFont(const String& fontName) method of superclass. + * @since 2.0 + * + * @return An error code + * @param[in] font The text font + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @remarks All previously set text attributes (style, weight, decoration, and size) will be discarded. + * @endif + */ + result SetFont(const Tizen::Graphics::Font& font); + +// Text Block + /** + * Releases the selection of the current text block. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see GetBlockRange() + * @see SetBlockRange() + */ + result ReleaseBlock(void); + + /** + * Gets the start and the end index of the currently selected text block. + * + * @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 + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @remarks The method returns @c start = 0 and @c end = 0 if there is no selected text block. + * @see ReleaseBlock() + * @see SetBlockRange() + */ + result GetBlockRange(int& start, int& end) const; + + /** + * Sets the specified block of the text. + * + * @since 2.0 + * + * @return An error code + * @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. @n + * Either the @c start or @c end parameters are greater than the number of elements or less than @c 0. + * @exception E_SYSTEM A system error has occurred. + * @see ReleaseBlock() + * @see GetBlockRange() + */ + result SetBlockRange(int start, int end); + +// Appearances + /** + * Gets the color of the %TextBox control for the specified status. + * + * @since 2.0 + * + * @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 + * @exception E_SUCCESS The method is successful. + * @remarks The specific error code can be accessed using the GetLastResult() method. + * @see SetColor() + */ + Tizen::Graphics::Color GetColor(TextBoxStatus status) const; + + /** + * Gets the text color of the specified text color type. + * + * @since 2.0 + * + * @return The color, @n + * else RGBA (0,0,0,0) if an error occurs + * @param[in] type The text color type + * @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 SetTextColor() + */ + Tizen::Graphics::Color GetTextColor(TextBoxTextColor type) const; + + /** + * Sets the background bitmap of the %TextBox control. + * + * @since 2.0 + * + * @return An error code + * @param[in] status The state of the %TextBox control + * @param[in] bitmap The background bitmap + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetBackgroundBitmap(TextBoxStatus status, const Tizen::Graphics::Bitmap& bitmap); + + /** + * Sets the color of the %TextBox control for the specified status. + * + * @since 2.0 + * + * @return An error code + * @param[in] status The state of the %TextBox control + * @param[in] color The color to set + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see GetColor() + */ + result SetColor(TextBoxStatus status, const Tizen::Graphics::Color& color); + + /** + * Sets the text color of the %TextBox control for the specified text type. + * + * @since 2.0 + * + * @return An error code + * @param[in] type The text color type + * @param[in] color The text color to set + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @see GetTextColor() + */ + result SetTextColor(TextBoxTextColor type, const Tizen::Graphics::Color& color); + + /** + * Adds a text block event listener. + * + * @since 2.0 + * + * @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() + */ + void AddTextBlockEventListener(Tizen::Ui::ITextBlockEventListener& listener); + + /** + * Removes the specified text block event listener. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to remove + * @see AddTextBlockEventListener() + */ + void RemoveTextBlockEventListener(Tizen::Ui::ITextBlockEventListener& listener); + +protected: + friend class _TextBoxImpl; + +private: + TextBox(const TextBox& value); + TextBox& operator =(const TextBox& value); +}; //TextBox +}}} //Tizen::Ui::Controls + +#endif // _FUI_CTRL_TEXT_BOX_H_ diff --git a/inc/FUiCtrlTimePicker.h b/inc/FUiCtrlTimePicker.h new file mode 100644 index 0000000..f7a29d2 --- /dev/null +++ b/inc/FUiCtrlTimePicker.h @@ -0,0 +1,340 @@ +// +// 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 FUiCtrlTimePicker.h +* @brief This is the header file for the %TimePicker class. +* +* This header file contains the declarations of the %TimePicker class. +*/ +#ifndef _FUI_CTRL_TIME_PICKER_H_ +#define _FUI_CTRL_TIME_PICKER_H_ + +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** +* @class TimePicker +* @brief This class displays a %TimePicker control on top of the screen. +* +* @since 2.0 +* +* The %TimePicker class displays a full screen window-based selector that allows the user to select a certain time. +* +* For more information on the class features, see +* DatePicker, TimePicker, and DateTimeimePicker. +* +* The following example demonstrates how to use the %TimePicker class. +* +* @code +// Sample Code for TimePickerSample.h +#include + +class TimePickerSample + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::ITimeChangeEventListener + , public Tizen::Ui::IActionEventListener +{ +public: + TimePickerSample(void) + : __pTimePicker(null){} + + bool Initialize(void); + void ShowTimePicker(bool show); + virtual result OnInitializing(void); + virtual result OnTerminating(void); + + // IActionEventListener + virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId); + + // ITimeChangeEventListener + virtual void OnTimeChanged(const Tizen::Ui::Control& source, int hour, int minute); + virtual void OnTimeChangeCanceled(const Tizen::Ui::Control& source); + +private: + static const int ID_BUTTON = 101; + + Tizen::Ui::Controls::TimePicker* __pTimePicker; +}; + * @endcode + * + * @code +// Sample Code for TimePickerSample.cpp +#include + +#include "TimePickerSample.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Ui::Controls; + +bool +TimePickerSample::Initialize(void) +{ + Construct(FORM_STYLE_NORMAL); + return true; +} + +result +TimePickerSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + // Creates an instance of Button + Button* pButton = new Button(); + pButton->Construct(Rectangle(50, 50, 300, 200), L"Show TimePicker"); + pButton->SetActionId(ID_BUTTON); + pButton->AddActionEventListener(*this); + + // Adds a Button to the Form + AddControl(pButton); + + // Creates an instance of TimePicker + __pTimePicker = new TimePicker(); + __pTimePicker->Construct(); + + // Adds an instance of ITimeChangeEventListener + __pTimePicker->AddTimeChangeEventListener(*this); + + // Show TimePicker after it's owner Form is shown. + + return r; +} + +void +TimePickerSample::ShowTimePicker(bool show) +{ + // Change to desired show state + __pTimePicker->SetShowState(show); + + //Call Show() of the control + if (show) + { + __pTimePicker->Show(); + } + // Call Invalidate() of the container + else + { + Invalidate(true); + } +} + +result +TimePickerSample::OnTerminating(void) +{ + result r = E_SUCCESS; + + // Deallocates the time picker + __pTimePicker->Destroy(); + + return r; +} + +// IActionEventListener implementation +void +TimePickerSample::OnActionPerformed(const Control& source, int actionId) +{ + switch (actionId) + { + case ID_BUTTON: + ShowTimePicker(true); + break; + + default: + break; + } +} + + +// ITimeChangeEventListener implementation +void +TimePickerSample::OnTimeChanged(const Control& source, int hour, int minute) +{ + // Todo: +} + +void +TimePickerSample::OnTimeChangeCanceled(const Control& source) +{ + // Todo: +} +* @endcode +**/ +class _OSP_EXPORT_ TimePicker + : public Tizen::Ui::Window +{ +public: + /** + * The object is not fully constructed after this constructor is called. @n + * For full construction, the TimePicker::Construct() method must be called right after calling this constructor. + * + * @since 2.0 + */ + TimePicker(void); + + /** + * 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 ~TimePicker(void); + + /** + * Adds a time changed event listener instance. + * + * @since 2.0 + * + * @param[in] listener The listener to add + * @see ITimeChangeEventListener::OnTimeChanged() + * @see ITimeChangeEventListener::OnTimeChangeCanceled() + * @see RemoveTimeChangeEventListener() + */ + void AddTimeChangeEventListener(Tizen::Ui::ITimeChangeEventListener& listener); + + /** + * Removes a listener instance. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The listener to remove + * @see AddTimeChangeEventListener() + */ + void RemoveTimeChangeEventListener(Tizen::Ui::ITimeChangeEventListener& listener); + + /** + * Initializes this instance of %TimePicker to the current date and time in the wall time mode. + * + * @since 2.0 + * + * @return An error code + * @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. + */ + result Construct(const Tizen::Base::String& title = L""); + + /** + * Gets the current hour value of the %TimePicker control. @n + * The hour value is between @c 0 to @c 23. + * + * @since 2.0 + * + * @return The current hour value, @n + * else @c -1 if an error occurs + */ + int GetHour(void) const; + + /** + * Gets the current minute value of the %TimePicker control. @n + * The minute value is between @c 0 to @c 59. + * + * @since 2.0 + * + * @return The current minute value, @n + * else @c -1 if an error occurs + */ + int GetMinute(void) const; + + /** + * Gets the current time value of the %TimePicker control. + * + * @since 2.0 + * + * @return The time value + */ + Tizen::Base::DateTime GetTime(void) const; + + /** + * Sets the 12H or 24H hour display type of the %TimePicker control. + * + * @since 2.0 + * + * @param[in] enable Set to @c true to enable the 24 hour notation, @n + * else @c false + */ + void Set24HourNotationEnabled(bool enable); + + /** + * Sets the hour value. @n + * The hour value should be between @c 0 and @c 23. + * + * @since 2.0 + * + * @param[in] hour The hour value + * @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. + */ + result SetHour(int hour); + + /** + * Sets the minute value. @n + * The minute value should be between @c 0 and @c 59. + * + * @since 2.0 + * + * @param[in] minute The minute value + * @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. + */ + result SetMinute(int minute); + + /** + * Sets the current time value of the %TimePicker control. + * + * @since 2.0 + * + * @param[in] time The time to set + */ + void SetTime(const Tizen::Base::DateTime& time); + + /** + * Sets the time value of the %TimePicker control with the current system time in the wall time mode. + * + * @since 2.0 + */ + void SetCurrentTime(void); + +protected: + friend class _TimePickerImpl; + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + TimePicker(const TimePicker& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + TimePicker& operator =(const TimePicker& rhs); + +}; // TimePicker + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_TIME_PICKER_H_ diff --git a/inc/FUiCustomControlBase.h b/inc/FUiCustomControlBase.h new file mode 100644 index 0000000..73b85d7 --- /dev/null +++ b/inc/FUiCustomControlBase.h @@ -0,0 +1,249 @@ +// +// 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. +// + +/** + * @if OSPDEPREC + * @file FUiCustomControlBase.h + * @brief This is the header file for the %CustomControlBase class. + * + * This header file contains the declarations of the %CustomControlBase class and its helper classes. + * @endif + */ + +#ifndef _FUI_CUSTOM_CONTROL_BASE_H_ +#define _FUI_CUSTOM_CONTROL_BASE_H_ + +#include + +namespace Tizen { namespace Ui +{ + +class _CustomControlBaseImpl; + +/** + * @if OSPDEPREC + * @class CustomControlBase + * @brief [Deprecated] This is the base class for the user-defined UI control classes. + * + * @deprecated This class is deprecated. Instead of using this class, use the Container class. + * @since 2.0 + * + * The %CustomControlBase class is the base class for the user-defined UI control classes. + * @endif + */ +class _OSP_EXPORT_ CustomControlBase + : public Container +{ +// Lifecycle +public: + /** + * @if OSPDEPREC + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the Container class. + * @since 2.0 + * @endif + */ + virtual ~CustomControlBase(void); + + /** + * @if OSPDEPREC + * Notifies that the bounds of the control is about to change. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the Container class. + * @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 + * @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); + + /** + * @if OSPDEPREC + * Overrides this method to indicate that the specified @c width and @c height + * can be supported or a new @c width and @c height must be applied instead + * of the specified values. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the Container class. + * @since 2.0 + * + * @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); + +protected: + /** + * @if OSPDEPREC + * 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. + * @since 2.0 + * @endif + */ + CustomControlBase(void); + + /** + * @if OSPDEPREC + * Initializes this instance of %CustomControlBase. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the Container class. + * @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 control resizable, @n + * else @c false + * @param[in] movable Set to @c true to make the control movable, @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 + * - This method must be called from the derived classes' construct methods. + * - If @c resizable is @c false, IsResizable() returns @c false. + * @see IsResizable() + * @endif + */ + result Construct(const Tizen::Graphics::Rectangle& rect, bool resizable = true, bool movable = true); + + /** + * @if OSPDEPREC + * Initializes this instance of %CustomControlBase with the specified layout and rectangular region. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the Container class. + * @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 %CustomControlBase + * @param[in] resizable Set to @c true to make the control resizable, @n + * else @c false + * @param[in] movable Set to @c true to make the control movable, @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 + * - This method must be called from the derived classes' construct methods. + * - If @c resizable is @c false, IsResizable() returns @c false. + * @see IsResizable() + * @see Container::GetLayoutN() + * @endif + */ + result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::Rectangle& rect, bool resizable = true, bool movable = true); + + /** + * @if OSPDEPREC + * Initializes this instance of %CustomControlBase with the specified layouts and rectangular region. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the Container class. + * @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 %CustomControlBase + * @param[in] resizable Set to @c true to make the control resizable, @n + * else @c false + * @param[in] movable Set to @c true to make the control movable, @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 If @c resizable is @c false, IsResizable() returns @c false. + * @see IsResizable() + * @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); + +private: + /** + * @if OSPDEPREC + * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the Container class. + * @since 2.0 + * @endif + */ + CustomControlBase(const CustomControlBase& rhs); + + /** + * @if OSPDEPREC + * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + * + * @brief [Deprecated] + * @deprecated This class is deprecated. Instead of using this class, use the Container class. + * @since 2.0 + * @endif + */ + CustomControlBase& operator =(const CustomControlBase& rhs); + +protected: + friend class _CustomControlBaseImpl; + + // + // 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 CustomControlBase_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 CustomControlBase_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 CustomControlBase_Reserved3(void) {} +}; // CustomControlBase + +}} // Tizen::Ui + +#endif // _FUI_CUSTOM_CONTROL_BASE_H_ diff --git a/inc/FUiDataBindingContext.h b/inc/FUiDataBindingContext.h new file mode 100644 index 0000000..e6c28c1 --- /dev/null +++ b/inc/FUiDataBindingContext.h @@ -0,0 +1,339 @@ +// +// 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 FUiDataBindingContext.h + * @brief This is the header file for the %DataBindingContext class. + * + * This header file contains the declarations of the %DataBindingContext class. + */ + +#ifndef _FUI_DATA_BINDING_CONTEXT_H_ +#define _FUI_DATA_BINDING_CONTEXT_H_ + +#include +#include +#include +#include +#include +#include + +namespace Tizen { namespace Base +{ +class String; +}} + +namespace Tizen { namespace Ui +{ + +class Control; +class _DataBindingContextImpl; + +/** + * @class DataBindingContext + * @brief This class represents a data binding context and the application's data source. + * + * @since 2.0 + * + * The %DataBindingContext class represents the data binding context. + * + * The following example demonstrates how to use the %DataBindingContext class. + * + * @code +// Sample code for DataBindingSample.h +#include +#include + +class DataBindingSample + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::IActionEventListener +{ +public: + virtual bool Initialize(void); + virtual result OnInitializing(void); + virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId); + +private : + static const int ID_BUTTON_UNBIND = 402; + static const int ID_BUTTON_UPDATE_BINDING = 403; + static const int ID_BUTTON_BIND = 404; + + Tizen::Base::Integer __bindIntegerToButtonText; + Tizen::Ui::Controls::Button* __pUnbindButton; + Tizen::Ui::Controls::Button* __pUpdateBindingButton; + Tizen::Ui::Controls::Button* __pTargetButton; + Tizen::Ui::Controls::Button* __pBindButton; +}; + + * @endcode + * + * @code + +// Sample code for DataBindingSample.cpp +#include "DataBindingSample.h" + +using namespace Tizen::App; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; + +bool +DataBindingSample::Initialize(void) +{ + Construct(FORM_STYLE_NORMAL| FORM_STYLE_PORTRAIT_INDICATOR| FORM_STYLE_HEADER| FORM_STYLE_FOOTER); + return true; +} + +result +DataBindingSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + Header* pHeader = GetHeader(); + pHeader->SetTitleText(L"DataBinding"); + + Rectangle rect; + rect = GetClientAreaBounds(); + + __pUpdateBindingButton = new (std::nothrow) Button(); + __pUpdateBindingButton->Construct(Rectangle(10, rect.height / 6, rect.width - 20, rect.height / 6), L"BindingTarget"); + __pUpdateBindingButton->SetName("Target"); + AddControl(__pUpdateBindingButton); + + __pTargetButton = new (std::nothrow) Button(); + __pTargetButton->Construct(Rectangle(10, (rect.height / 3) + 10 , (rect.width - 20), rect.height / 6), L"Update Binding"); + __pTargetButton->SetActionId(ID_BUTTON_UPDATE_BINDING); + __pTargetButton->AddActionEventListener(*this); + AddControl(__pTargetButton); + + __pUnbindButton = new (std::nothrow) Button(); + __pUnbindButton->Construct(Rectangle(10, (rect.height * 2 / 3), (rect.width / 2) - 10, rect.height / 6), L"Unbind"); + __pUnbindButton->SetActionId(ID_BUTTON_UNBIND); + __pUnbindButton->AddActionEventListener(*this); + AddControl(__pUnbindButton); + + __pBindButton = new (std::nothrow) Button(); + __pBindButton->Construct(Rectangle((rect.width / 2) + 10 , (rect.height * 2 / 3), (rect.width / 2) - 20 , rect.height / 6), L"Bind"); + __pBindButton->SetActionId(ID_BUTTON_BIND); + __pBindButton->AddActionEventListener(*this); + AddControl(__pBindButton); + + DataBindingContext* pContext = GetDataBindingContextN(); + r = pContext->Bind(L"bindingcount", L"Target", L"text", __bindIntegerToButtonText, DATA_BINDING_DATA_TYPE_INTEGER, DATA_BINDING_FLOW_ONE_WAY, DATA_BINDING_TRIGGER_EXPLICIT, null, null, null); + delete pContext; + + return r; +} + +void +DataBindingSample::OnActionPerformed(const Control& source, int actionId) +{ + DataBindingContext* pContext = GetDataBindingContextN(); + result r = E_SUCCESS; + switch (actionId) + { + case ID_BUTTON_UNBIND: + { + pContext->Unbind(L"bindingcount"); + break; + } + case ID_BUTTON_BIND: + { + pContext->Bind(L"bindingcount", L"Target", L"text", __bindIntegerToButtonText, DATA_BINDING_DATA_TYPE_INTEGER, DATA_BINDING_FLOW_ONE_WAY, DATA_BINDING_TRIGGER_EXPLICIT, null, null, null); + break; + } + case ID_BUTTON_UPDATE_BINDING: + { + r = pContext->UpdateBinding(L"bindingcount", DATA_BINDING_DESTINATION_TYPE_TARGET); + if (r == E_SUCCESS) + { + __bindIntegerToButtonText = __bindIntegerToButtonText.ToInt() + 1; + } + break; + } + default: + break; + } + delete pContext; + Invalidate(true); +} + * @endcode + * + */ +class _OSP_EXPORT_ DataBindingContext + : public Tizen::Base::Object +{ +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~DataBindingContext(void); + +public: + /** + * Gets the owner of this data binding context. + * + * @since 2.0 + * + * @return The context owner + */ + Control* GetContextOwner(void) const; + + /** + * Binds the specified control's property and data source. + * + * @since 2.0 + * + * @return An error code + * @param[in] bindingId The binding ID + * @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 + * @param[in] flow The data flow type + * @param[in] trigger The data binding trigger type + * @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 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. + */ + 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); + + /** + * Sets the binding listener for the specified data binding. + * + * @since 2.0 + * + * @return An error code + * @param[in] bindingId The binding ID + * @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 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); + + /** + * Unbinds all bindings that exist in this context. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result UnbindAll(void); + + /** + * Unbinds a binding that exists in this context. + * + * @since 2.0 + * + * @return An error code + * @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 specified @c bindingId is not registered. + */ + result Unbind(const Tizen::Base::String& bindingId); + + /** + * Updates all 'explicit' data bindings. + * + * @since 2.0 + * + * @return An error code + * @param[in] destType The destination type + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @exception E_INVALID_ARG The specified @c destType is not of a supported type. + * @remarks + * - If you have set a data binding listener, @n + * this method is returned after that listener is called. + * - The behavior of this method is dependent on the system default locale setting. + * @see IDataBindingListener + */ + result UpdateAllBindings(DataBindingDestinationType destType); + + /** + * Updates the specified data binding. + + * @since 2.0 + * + * @param[in] bindingId The binding ID + * @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 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. + * - The behavior of this method is dependent on the system default locale setting. + * @see IDataBindingListener + */ + result UpdateBinding(const Tizen::Base::String& bindingId, DataBindingDestinationType destType); + +private: + // + // This default constructor is intentionally declared as private so that only the platform can create an instance. + // + DataBindingContext(void); + + // + // This destructor is intentionally declared as private so that only the platform can delete an instance. + // + DataBindingContext(const Control& contextOwner); + + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + DataBindingContext(const DataBindingContext& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + DataBindingContext& operator =(const DataBindingContext& rhs); + +private: + _DataBindingContextImpl* __pDataBindingContextImpl; + + friend class _DataBindingContextImpl; + +}; // DataBindingContext + +} } // Tizen::Ui +#endif // _FUI_DATA_BINDING_CONTEXT_H_ diff --git a/inc/FUiDataBindingTypes.h b/inc/FUiDataBindingTypes.h new file mode 100644 index 0000000..ebb3784 --- /dev/null +++ b/inc/FUiDataBindingTypes.h @@ -0,0 +1,95 @@ +// +// 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 FUiDataBindingTypes.h + * @brief This is the header file for the data binding enumerations. + * + * This header file contains the declarations of the data binding enumerations. + */ + +#ifndef _FUI_DATA_BINDING_TYPES_H_ +#define _FUI_DATA_BINDING_TYPES_H_ + +namespace Tizen { namespace Ui +{ +/** +* @enum DataBindingFlow +* +* Defines the possible data flow types. +* +* @since 2.0 +*/ +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 */ +}; + +/** +* @enum DataBindingTrigger +* +* Defines the possible data binding trigger types. +* +* @since 2.0 +*/ +enum DataBindingTrigger +{ + DATA_BINDING_TRIGGER_IMMEDIATE = 0, /**< Immediate trigger */ + DATA_BINDING_TRIGGER_EXPLICIT = 1, /**< Explicit trigger */ +}; + +/** +* @enum DataBindingDataType +* +* Defines the possible data types for data binding source. +* +* @since 2.0 +*/ +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_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, /** @n + * @b Library : @b osp-uifw + * + * The %Effects namespace provides effect capabilities. + * + * For more information on the %Effects namespace features, see Effects Guide. + * + * The following diagram illustrates the relationships between the classes belonging to the %Effects namespace. + * + * @image html effects_namespace_classdiagram.png + * + */ + +namespace Effects +{ +}}} // Tizen::Ui::Effects + +#endif //_FUI_EFFECTS_H_ + diff --git a/inc/FUiEffectsEffect.h b/inc/FUiEffectsEffect.h new file mode 100644 index 0000000..0af923a --- /dev/null +++ b/inc/FUiEffectsEffect.h @@ -0,0 +1,393 @@ +// +// 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 FUiEffectsEffect.h +* @brief This is the header file for the %Effect class. +* +* This header file contains the declarations of the %Effect class. +*/ + +#ifndef _FUI_EFFECTS_EFFECT_H_ +#define _FUI_EFFECTS_EFFECT_H_ + +#include +#include + + +namespace Tizen { namespace Base { +class String; +}} // Tizen::Base + +namespace Tizen { namespace Ui { +class TouchEventInfo; +class Control; +}} // Tizen::Ui + +namespace Tizen { namespace Graphics { +class Bitmap; +class Point; +}} // Tizen::Graphics + +namespace Tizen { namespace Base { namespace Collection { +class IList; +}}} // Tizen::Base::Collection + +namespace Tizen { namespace Ui { namespace Effects +{ +class IEffectEventListener; +class IEffectResourceProvider; +class _EffectImpl; + +/** +* @class Effect +* @brief This class contains methods for managing effects. +* +* @since 2.0 +* +* The %Effect class contains methods for managing effects. +*/ +class _OSP_EXPORT_ Effect + : public Tizen::Base::Object +{ +public: + /** + * Binds the effect to Tizen::UI::Control for rendering an effect. + * + * @since 2.0 + * + * @return An error code + * @param [in] pControl Tizen::UI::Control whose content is filled by the effect + * @exception E_SUCCESS The specified effect is bound with @c control successfully. + * @exception E_OPERATION_FAILED The system has failed to initialize the 3D system. + * @exception E_IN_PROGRESS The specified effect is in progress, so it is unable to run, set, change, or reset the render target. + */ + result SetRenderTarget(Tizen::Ui::Control* pControl); + + /** + * Starts the effect. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The specified effect is started successfully. + * @exception E_INVALID_STATE The specified effect has already started. + * @exception E_OPERATION_FAILED The specified effect has a runtime error in the script. + * @exception E_ALREADY_SET Other effects which use the same control as a render target are currently running. + */ + result Start(void); + + /** + * Starts the effect. + * + * @since 2.0 + * + * @return An error code + * @param [in] effectStartInfo The list of input arguments to pass to the OnEffectStarted() method of the scripts @n + * All arguments must be represented in @c float data type. + * @exception E_SUCCESS The specified effect is started successfully. + * @exception E_INVALID_STATE The specified effect has already started. + * @exception E_OPERATION_FAILED The specified effect has a runtime error in the script. + * @exception E_ALREADY_SET Other effects which use the same control as a render target are currently running. + */ + result Start(const Tizen::Base::Collection::IList& effectStartInfo); + + /** + * Stops the effect. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The specified effect is stopped successfully. + * @exception E_INVALID_STATE The specified effect has not started as yet. + */ + result Stop(void); + + /** + * Informs the effect of a TouchPress event. + * + * @since 2.0 + * + * @return An error code + * @param [in] touchEventInfo The touch event information + * @param [in] offset The effect regards the touch position in @c touchEventInfo translated by @c offset + * @exception E_SUCCESS The specified effect is successfully sent with a TouchPress event. + * @exception E_INVALID_STATE The specified effect has not started as yet. + * @exception E_OPERATION_FAILED Either of the following conditions has occurred: + * - There is a runtime error in the OnTouchPressed() script method. + * - The effect is time-based. + */ + result FeedTouchPressEvent(const Tizen::Ui::TouchEventInfo& touchEventInfo, const Tizen::Graphics::Point& offset); + + /** + * Informs the effect of a TouchPress event. + * + * @since 2.0 + * + * @return An error code + * @param [in] touchEventInfo The touch event information + * @exception E_SUCCESS The specified effect is successfully sent with a TouchPress event. + * @exception E_INVALID_STATE The specified effect has not started as yet. + * @exception E_OPERATION_FAILED Either of the following conditions has occurred: + * - There is a runtime error in the OnTouchPressed() script method. + * - The effect is time-based. + */ + result FeedTouchPressEvent(const Tizen::Ui::TouchEventInfo& touchEventInfo); + + /** + * Informs the effect of a TouchMove event. + * + * @since 2.0 + * + * @return An error code + * @param [in] touchEventInfo The touch event information + * @param [in] offset The effect regards the touch position in @c touchEventInfo translated by @c offset + * @exception E_SUCCESS The specified effect is successfully sent with a TouchMove event. + * @exception E_INVALID_STATE The specified effect has not started as yet. + * @exception E_OPERATION_FAILED Either of the following conditions has occurred: + * - There is a runtime error in the OnTouchMoved() script method. + * - The effect is time-based. + */ + result FeedTouchMoveEvent(const Tizen::Ui::TouchEventInfo& touchEventInfo, const Tizen::Graphics::Point& offset); + + /** + * Informs the effect of a TouchMove event. + * + * @since 2.0 + * + * @return An error code + * @param [in] touchEventInfo The touch event information + * @exception E_SUCCESS The specified effect is successfully sent with a TouchMove event. + * @exception E_INVALID_STATE The specified effect has not started as yet. + * @exception E_OPERATION_FAILED Either of the following conditions has occurred: + * - There is a runtime error in the OnTouchMoved() script method. + * - The effect is time-based. + */ + result FeedTouchMoveEvent(const Tizen::Ui::TouchEventInfo& touchEventInfo); + + /** + * Informs the effect of a TouchRelease event. + * + * @since 2.0 + * + * @return An error code + * @param [in] touchEventInfo The touch event information + * @param [in] offset The effect regards the touch position in @c touchEventInfo translated by @c offset + * @exception E_SUCCESS The specified effect is successfully sent with a TouchRelease event. + * @exception E_INVALID_STATE The specified effect has not started as yet. + * @exception E_OPERATION_FAILED Either of the following conditions has occurred: + * - There is a runtime error in the OnTouchReleased() script method. + * - The effect is time-based. + */ + result FeedTouchReleaseEvent(const Tizen::Ui::TouchEventInfo& touchEventInfo, const Tizen::Graphics::Point& offset); + + /** + * Informs the effect of a TouchRelease event. + * + * @since 2.0 + * + * @return An error code + * @param [in] touchEventInfo The touch event information + * @exception E_SUCCESS The specified effect is successfully sent with a TouchRelease event. + * @exception E_INVALID_STATE The specified effect has not started as yet. + * @exception E_OPERATION_FAILED Either of the following conditions has occurred: + * - There is a runtime error in the OnTouchReleased() script method. + * - The effect is time-based. + */ + result FeedTouchReleaseEvent(const Tizen::Ui::TouchEventInfo& touchEventInfo); + + /** + * Informs the effect of a TouchDoublePress event. + * + * @since 2.0 + * + * @return An error code + * @param [in] touchEventInfo The touch event information + * @param [in] offset The effect regards the touch position in @c touchEventInfo translated by @c offset + * @exception E_SUCCESS The specified effect is successfully sent with a TouchDoublePress event. + * @exception E_INVALID_STATE The specified effect has not started as yet. + * @exception E_OPERATION_FAILED Either of the following conditions has occurred: + * - There is a runtime error in the OnTouchDoublePressed() script method. + * - The effect is time-based. + */ + result FeedTouchDoublePressEvent(const Tizen::Ui::TouchEventInfo& touchEventInfo, const Tizen::Graphics::Point& offset); + + /** + * Informs the effect of a TouchDoublePress event. + * + * @since 2.0 + * + * @return An error code + * @param [in] touchEventInfo The touch event information + * @exception E_SUCCESS The specified effect is successfully sent with a TouchDoublePress event. + * @exception E_INVALID_STATE The specified effect has not started as yet. + * @exception E_OPERATION_FAILED Either of the following conditions has occurred: + * - There is a runtime error in the OnTouchDoublePressed() script method. + * - The effect is time-based. + */ + result FeedTouchDoublePressEvent(const Tizen::Ui::TouchEventInfo& touchEventInfo); + + /** + * Sets the effect's bitmap that is used as a graphical surface in scripts. + * + * @since 2.0 + * + * @return An error code + * @param [in] bitmapId The bitmap ID to update + * @param [in] bitmap The bitmap content + * @exception E_SUCCESS The bitmap is updated successfully. + * @exception E_OPERATION_FAILED Updating the bitmap content has failed. + */ + result SetBitmap(long bitmapId, const Tizen::Graphics::Bitmap& bitmap); + + /** + * Checks whether the effect is running. + * + * @since 2.0 + * + * @return @c true if the effect is running, @n + * else @c false + */ + bool IsRunning(void) const; + + /** + * Gets the effect type. + * + * @since 2.0 + * + * @return The type of effect + */ + EffectType GetType(void) const; + + /** + * Gets the name of the effect. + * + * @since 2.0 + * + * @return The name of the effect + */ + Tizen::Base::String GetName(void) const; + + /** + * Sets an IEffectsEventListener instance to get notified when the state of the effect is changed. + * + * @since 2.0 + * + * @param [in] pListener The event listener to set @n + * If @c pListener is @c null, the status changes of this instance are not notified anymore. + * @see GetEffectEventListener + */ + void SetEffectEventListener(IEffectEventListener* pListener); + + /** + * Gets an IEffectsEventListener instance that is registered to the instance. + * + * @since 2.0 + * + * @return The event listener + * + * @see SetEffectEventListener + */ + IEffectEventListener* GetEffectEventListener(void) const; + + /** + * Sets an IEffectsResourceProvider instance to get notified when resources are needed by the effect. + * + * @since 2.0 + * + * @param [in] pProvider The resource provider to provide the effect with bitmap resources @n + * If @c pProvider is @c null, this instance will not display effects correctly. + * + * @see GetResourceProvider + */ + void SetResourceProvider(IEffectResourceProvider* pProvider); + + /** + * Gets an IEffectsResourceProvider instance that is registered to the instance. + * + * @since 2.0 + * + * @return The resource provider + * + * @see SetResourceProvider + */ + IEffectResourceProvider* GetResourceProvider(void) const; + +protected: + /** + * This default constructor is intentionally declared as protected so that only the platform can create an instance. + * + * @since 2.0 + */ + Effect(void); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~Effect(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. + // + // @since 2.0 + // + virtual void Effect_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. + // + // @since 2.0 + // + virtual void Effect_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. + // + // @since 2.0 + // + virtual void Effect_Reserved3(void) {} + +private: + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + Effect(const Effect& rhs); + + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + Effect& operator=(const Effect& rhs); + +private: + friend class _EffectManagerImpl; + friend class _EffectImpl; + _EffectImpl* __pEffectImpl; +}; //Effect + +}}} // Tizen::Ui::Effects + +#endif // _FUI_EFFECTS_EFFECT_H_ + diff --git a/inc/FUiEffectsEffectManager.h b/inc/FUiEffectsEffectManager.h new file mode 100644 index 0000000..b2feef8 --- /dev/null +++ b/inc/FUiEffectsEffectManager.h @@ -0,0 +1,154 @@ +// +// 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 FUiEffectsEffectManager.h +* @brief This is the header file for the %EffectManager class. +* +* This header file contains the declarations of the %EffectManager class. +*/ + +#ifndef _FUI_EFFECTS_EFFECT_MANAGER_H_ +#define _FUI_EFFECTS_EFFECT_MANAGER_H_ + +#include +#include + + +namespace Tizen { namespace Base { +class String; +}} // Tizen::Base + + +namespace Tizen { namespace Ui { namespace Effects +{ + +class _EffectManagerImpl; +class Effect; + +/** + * @class EffectManager + * @brief This class contains an API for managing effects. + * + * @since 2.0 + * + * The %EffectManager class contains an API for managing effects. + */ +class _OSP_EXPORT_ EffectManager + : public Tizen::Base::Object +{ +public: + /** + * Gets a pointer to the %EffectManager instance. + * + * @since 2.0 + * + * @return A pointer to the %EffectManager instance + * @exception E_SUCCESS The %EffectManager instance is constructed successfully. + * @exception E_OPERATION_FAILED The system has failed to initialize the 3D system. + */ + static EffectManager* GetInstance(void); + + /** + * Destroys all previously created effects and their resources. @n + * Applications can use OpenGL APIs only after invoking this method. + * + * @since 2.0 + */ + static void DestroyInstance(void); + + /** + * Creates a new effect from the specified effect file. + * + * @since 2.0 + * + * @return A pointer to the Effect instance, @n + * else @c null if an error occurs + * @param [in] filePath The file path of the effect + * @exception E_SUCCESS The effect is created successfully. + * @exception E_FILE_NOT_FOUND The specified effect file does not exist. + * @exception E_PARSING_FAILED A syntax error exists in the effect file. + * @remarks The DestroyEffect() method must be used to destroy the Effect instance returned. + * @see DestroyEffect() + */ + Effect* CreateEffect(const Tizen::Base::String& filePath); + + /** + * Destroys an Effect instance. + * + * @since 2.0 + * + * @param [in] effect The Effect instance to destroy + * @see CreateEffect() + */ + void DestroyEffect(Effect& effect); + +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. + // + // @since 2.0 + // + virtual void EffectManager_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. + // + // @since 2.0 + // + virtual void EffectManager_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. + // + // @since 2.0 + // + virtual void EffectManager_Reserved3(void) {} + +private: + // This default constructor is intentionally declared as private to implement the Singleton semantic. + EffectManager(void); + + // This destructor is intentionally declared as private to implement the Singleton semantic. + virtual ~EffectManager(void); + + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + EffectManager(const EffectManager& rhs); + + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + EffectManager& operator=(const EffectManager& rhs); + +private: + friend class _EffectManagerImpl; + _EffectManagerImpl* __pEffectManagerImpl; +}; //EffectManager + +}}} // Tizen::Ui::Effects + +#endif // _FUI_EFFECTS_EFFECT_MANAGER_H_ + diff --git a/inc/FUiEffectsIEffectEventListener.h b/inc/FUiEffectsIEffectEventListener.h new file mode 100644 index 0000000..b62cbd6 --- /dev/null +++ b/inc/FUiEffectsIEffectEventListener.h @@ -0,0 +1,142 @@ +// +// 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 FUiEffectsIEffectEventListener.h + * @brief This is the header file for the %IEffectEventListener interface. + * + * This header file contains the declarations of the %IEffectEventListener interface. + */ + +#ifndef _FUI_EFFECTS_IEFFECT_LISTENER_H_ +#define _FUI_EFFECTS_IEFFECT_LISTENER_H_ + +#include +#include + +namespace Tizen { namespace Base { namespace Collection +{ +class IList; +}}} // Tizen::Base::Collection + +namespace Tizen { namespace Ui { namespace Effects +{ + +class Effect; + +/** + * @interface IEffectEventListener + * @brief This interface provides listeners for effects. + * + * @since 2.0 + * + * This interface provides methods for notifying applications about the state change of effects. + */ +class _OSP_EXPORT_ IEffectEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +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. + * + * @since 2.0 + */ + virtual ~IEffectEventListener(void) {} + + /** + * Called when the effect starts. + * + * @since 2.0 + * + * @param [in] effect The effect to start + */ + virtual void OnEffectStarted(Effect& effect) = 0; + + /** + * Called when the effect finishes. + * + * @since 2.0 + * + * @param [in] effect The effect that is finished + * @param [in] effectResult The result of the effect + * @param [in] lastShownBitmapIds The list of last shown bitmaps @n + The listener is notified with the bitmaps shown at the last frame. + * The item type of @c lastShownBitmapIds is Tizen::Base::Long. + */ + virtual void OnEffectFinished(Effect& effect, Tizen::Ui::Effects::EffectResult effectResult, const Tizen::Base::Collection::IList& lastShownBitmapIds) = 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. + // + // @since 2.0 + // + virtual void IEffectEventListener_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. + // + // @since 2.0 + // + virtual void IEffectEventListener_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. + // + // @since 2.0 + // + virtual void IEffectEventListener_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. + // + // @since 2.0 + // + virtual void IEffectEventListener_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. + // + // @since 2.0 + // + virtual void IEffectEventListener_Reserved5(void) {} +}; // IEffectEventListener + +}}} // Tizen::Ui::Effects + +#endif // _FUI_EFFECTS_IEFFECT_LISTENER_H_ + diff --git a/inc/FUiEffectsIEffectResourceProvider.h b/inc/FUiEffectsIEffectResourceProvider.h new file mode 100644 index 0000000..dc23ab0 --- /dev/null +++ b/inc/FUiEffectsIEffectResourceProvider.h @@ -0,0 +1,125 @@ +// +// 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 FUiEffectsIEffectResourceProvider.h + * @brief This is the header file for the %IEffectResourceProvider interface. + * + * This header file contains the declarations of the %IEffectResourceProvider interface. + */ + +#ifndef _FUI_EFFECTS_IEFFECT_RESOURCE_PROVIDER_H_ +#define _FUI_EFFECTS_IEFFECT_RESOURCE_PROVIDER_H_ + +namespace Tizen { namespace Ui { namespace Effects +{ + +class Effect; + +/** + * @interface IEffectResourceProvider + * @brief This interface implements the listener for events on %Effect to provide the effects with resources. + * + * @since 2.0 + * + * The %IEffectResourceProvider interface provides methods for notifying applications about the resources needed by the effects. + * Applications have to provide the effects with appropriate resources. + */ +class _OSP_EXPORT_ IEffectResourceProvider +{ +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. + * + * @since 2.0 + */ + virtual ~IEffectResourceProvider(void) { } + + /** + * Called when the effect requires an image that is specified by its ID. + * + * @since 2.0 + * + * @return An error code + * @param [in,out] effect The effect that needs a bitmap + * @param [in] bitmapId The bitmap ID that is needed + * @remarks In general, EffectManager::SetBitmap should be used to provide this instance with a bitmap in this callback. + * @see Effect::SetBitmap() + */ + virtual result SetBitmap(Effect& effect, long bitmapId) = 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. + // + // @since 2.0 + // + virtual void IEffectResourceProvider_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. + // + // @since 2.0 + // + virtual void IEffectResourceProvider_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. + // + // @since 2.0 + // + virtual void IEffectResourceProvider_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. + // + // @since 2.0 + // + virtual void IEffectResourceProvider_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. + // + // @since 2.0 + // + virtual void IEffectResourceProvider_Reserved5(void) {} +}; // IEffectResourceProvider + +}}} // Tizen::Ui::Effects + +#endif // _FUI_EFFECTS_IEFFECT_RESOURCE_PROVIDER_H_ + diff --git a/inc/FUiEffectsTypes.h b/inc/FUiEffectsTypes.h new file mode 100644 index 0000000..f325a9a --- /dev/null +++ b/inc/FUiEffectsTypes.h @@ -0,0 +1,63 @@ +// +// 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 FUiEffectsTypes.h + * @brief This is the header file for the effect-related types. + * + * This header file contains the declarations of the effect-related types. + */ +#ifndef _FUI_EFFECTS_TYPES_H_ +#define _FUI_EFFECTS_TYPES_H_ + +namespace Tizen { namespace Ui { namespace Effects +{ +/** + * @enum EffectType + * + * Defines the types of effects. + * + * @since 2.0 + */ +enum EffectType +{ + EFFECT_TYPE_TIME_BASED, /**< The effect model is not managed by the user, that is, at the start of the effect @n + the final results and duration are known @n + For example, pressing the button leads to new form appearance with animation */ + + EFFECT_TYPE_INTERACTIVE /**< The effect model is managed by the user, that is, at the start of the effect it is @n + unknown as to when and how it will be finished */ +}; + + +/** + * @enum EffectResult + * + * Defines the result of effects. + * + * @since 2.0 + */ +enum EffectResult +{ + EFFECT_RESULT_INTERRUPTED = 1, /**< The effect is interrupted (stopped) with EffectsManager::StopEffect() */ + EFFECT_RESULT_FINISHED, /**< The effect is finished normally */ + EFFECT_RESULT_ERROR /**< There is an error during the execution of the effect */ +}; + +}}} // Tizen::Ui::Effects + +#endif // _FUI_EFFECTS_TYPES_H_ + diff --git a/inc/FUiFocusManager.h b/inc/FUiFocusManager.h new file mode 100644 index 0000000..3459998 --- /dev/null +++ b/inc/FUiFocusManager.h @@ -0,0 +1,102 @@ +// +// 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 FUiFocusManager.h + * @brief This is the header file for the %FocusManager class. + * + * This header file contains the declarations of the %FocusManager class. + */ + +#ifndef _FUI_FOCUS_MANAGER_H_ +#define _FUI_FOCUS_MANAGER_H_ + +#include + +namespace Tizen { namespace Ui +{ + +class Control; +class Window; + + +/** + * @class FocusManager + * @brief This class manages the current focus of the application owned by the UI control and its ancestor %Window. + * + * @since 2.0 + * + * The %FocusManager class is used to query the application's current focus owner. + */ +class _OSP_EXPORT_ FocusManager + : public Tizen::Base::Object +{ +public: + /** + * Gets a pointer to the %FocusManager instance. + * + * @since 2.0 + * + * @return The current focus manager instance + */ + static FocusManager* GetInstance(void); + + /** + * Gets the current focus owner. + * + * @since 2.0 + * + * @return The current focus owner + * @remarks This method returns the current focus owner of this application. + */ + Control* GetCurrentFocusOwner(void) const; + + /** + * Gets the current focused Window. + * + * @since 2.0 + * + * @return The current focused Window + * @remarks This method returns the application's current focus owner's ancestor Window or the %Window that is currently focused. + */ + Window* GetCurrentFocusedWindow(void) const; + +private: + // + // This default constructor is intentionally declared as private so that only the platform can create an instance. + // + FocusManager(void); + + // + // This destructor is intentionally declared as private so that only the platform can delete an instance. + // + virtual ~FocusManager(void); + + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + FocusManager(const FocusManager& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + FocusManager& operator=(const FocusManager& rhs); +}; // FocusManager + +}} // Tizen::Ui + +#endif // _FUI_FOCUS_MANAGER_H_ diff --git a/inc/FUiGridLayout.h b/inc/FUiGridLayout.h new file mode 100644 index 0000000..ed077c2 --- /dev/null +++ b/inc/FUiGridLayout.h @@ -0,0 +1,522 @@ +// +// 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 FUiGridLayout.h + * @brief This is the header file for the %GridLayout class. + * + * This header file contains the declarations of the %GridLayout class. + */ + +#ifndef _FUI_GRID_LAYOUT_H_ +#define _FUI_GRID_LAYOUT_H_ + +#include + +namespace Tizen { namespace Ui +{ +class Control; + +/** + * @class GridLayout + * @brief The grid layout positions the children of a container in a rectangular grid. + * + * @since 2.0 + * + * The %GridLayout class defines the grid layout for a Container. The layout positions the children of the %Container in a rectangular grid. + * + * For more information on the class features, see Grid Layout. + * + * @code +// Sample code for GridLayoutSample.h +#include + +class GridLayoutSample + : public Tizen::Ui::Controls::Form +{ +public: + bool Initialize(void); + virtual result OnInitializing(void); +}; + * @endcode + * + * @code +// Sample code for GridLayoutSample.cpp +#include + +#include "GridLayoutSample.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; + +bool +GridLayoutSample::Initialize(void) +{ + Construct(FORM_STYLE_NORMAL); + return true; +} + +result +GridLayoutSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + // Creates an instance of GridLayout + GridLayout gridPanelLayout; + gridPanelLayout.Construct(2, 3); + + // Creates an instance of Panel and applies it to grid layout + Panel* pPanel = new Panel(); + pPanel->Construct(gridPanelLayout, Rectangle((GetClientAreaBounds().width - 440)/2, (GetClientAreaBounds().height - 700)/2, 440, 700)); + { + // Creates instances of Label and an instance of Button + Label* pLabel1 = new Label(); + pLabel1->Construct(Rectangle(0, 0, 100, 200), L"Label1\n(0, 0)"); + pLabel1->SetBackgroundColor(Color(0x00, 0x10, 0x80, 0xFF)); + pPanel->AddControl(pLabel1); + + Label* pLabel2 = new Label(); + pLabel2->Construct(Rectangle(0, 0, 100, 200), L"Label2\n(0, 1)"); + pLabel2->SetBackgroundColor(Color(0x00, 0x20, 0xA0, 0xFF)); + pPanel->AddControl(pLabel2); + + Label* pLabel3 = new Label(); + pLabel3->Construct(Rectangle(0, 0, 100, 200), L"Label3\n(0, 2)"); + pLabel3->SetBackgroundColor(Color(0x00, 0x30, 0xC0, 0xFF)); + pPanel->AddControl(pLabel3); + + Label* pLabel4 = new Label(); + pLabel4->Construct(Rectangle(0, 0, 100, 200), L"Label4\n(1, 0)"); + pLabel4->SetBackgroundColor(Color(0x00, 0x40, 0xE0, 0xFF)); + pPanel->AddControl(pLabel4); + + Button* pButton = new Button(); + pButton->Construct(Rectangle(0, 0, 100, 200), L"Button\n(1, 1)"); + pPanel->AddControl(pButton); + + // Sets position to each label and button in grid layout + gridPanelLayout.SetPosition(*pLabel1, 0, 0, 1, 1); + gridPanelLayout.SetPosition(*pLabel2, 0, 1, 1, 1); + gridPanelLayout.SetPosition(*pLabel3, 0, 2, 1, 1); + gridPanelLayout.SetPosition(*pLabel4, 1, 0, 1, 1); + gridPanelLayout.SetPosition(*pButton, 1, 1, 1, 2); + + // Sets stretchability each label and button in grid layout + gridPanelLayout.SetColumnStretchable(0, true); + gridPanelLayout.SetColumnStretchable(1, true); + gridPanelLayout.SetColumnStretchable(2, true); + gridPanelLayout.SetRowStretchable(1, true); + + // Sets spacing + gridPanelLayout.SetColumnSpacing(1, 10); + gridPanelLayout.SetRowSpacing(1, 10); + } + + // Adds the top panel to the form + AddControl(pPanel); + + return r; +} + * @endcode + * + */ + +class _OSP_EXPORT_ GridLayout + : public Layout +{ +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. + * + * @since 2.0 + * + * @remarks After creating an instance of this class, the Construct() method must be called explicitly to initialize this instance. + */ + GridLayout(void); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~GridLayout(void); + + /** + * Initializes this instance of %GridLayout with the specified parameters. + * + * @since 2.0 + * + * @return An error code + * @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 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); + + /** + * Gets the type of the layout. + * + * @since 2.0 + * + * @return The layout type + */ + virtual LayoutType GetLayoutType(void) const; + + /** + * Gets the number of rows in a grid layout. + * + * @since 2.0 + * + * @return The number of rows + * @exception E_SUCCESS The method is successful. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + int GetRowCount(void) const; + + /** + * Gets the number of columns in a grid layout. + * + * @since 2.0 + * + * @return The number of columns + * @exception E_SUCCESS The method is successful. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + int GetColumnCount(void) const; + + /** + * Sets the stretching ability of the specified column. + * + * @since 2.0 + * + * @return An error code + * @param[in] columnIndex The column index + * @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 the valid range. + * @exception E_SYSTEM A system error has occurred. + */ + result SetColumnStretchable(int columnIndex, bool stretchable); + + /** + * Sets the shrinking ability of the specified column. + * + * @since 2.0 + * + * @return An error code + * @param[in] columnIndex The column index + * @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 the valid range. + * @exception E_SYSTEM A system error has occurred. + */ + result SetColumnShrinkable(int columnIndex, bool shrinkable); + + /** + * Sets the collapsibility of a column. + * + * @since 2.0 + * + * @return An error code + * @param[in] columnIndex The column index + * @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 the valid range. + * @exception E_SYSTEM A system error has occurred. + */ + result SetColumnCollapsed(int columnIndex, bool collapsed); + + /** + * Sets the stretching ability of all the columns. + * + * @since 2.0 + * + * @return An error code + * @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. + */ + result SetAllColumnsStretchable(bool stretchable); + + /** + * Sets the shrinking ability of all the columns. + * + * @since 2.0 + * + * @return An error code + * @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. + */ + result SetAllColumnsShrinkable(bool shrinkable); + + /** + * Sets the space before the specified column index. + * + * @since 2.0 + * + * @return An error code + * @param[in] columnIndex The column index + * @param[in] space The @c int that represents the space + * @exception E_SUCCESS The method is successful. + * @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 @c 0. + * - The column spacing cannot be applied to the first column. + */ + result SetColumnSpacing(int columnIndex, int space); + + /** + * Sets the space before the specified column index. + * + * @since 2.1 + * + * @return An error code + * @param[in] columnIndex The column index + * @param[in] space The @c int that represents the space + * @exception E_SUCCESS The method is successful. + * @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 @c 0. + * - The column spacing cannot be applied to the first column. + */ + result SetColumnSpacing(int columnIndex, float space); + + /** + * Sets the stretching ability of the specified row. + * + * @since 2.0 + * + * @return An error code + * @param[in] rowIndex The row index + * @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 the valid range. + * @exception E_SYSTEM A system error has occurred. + */ + result SetRowStretchable(int rowIndex, bool stretchable); + + /** + * Sets the shrinking ability of the specified row. + * + * @since 2.0 + * + * @return An error code + * @param[in] rowIndex The row index + * @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 the valid range. + * @exception E_SYSTEM A system error has occurred. + */ + result SetRowShrinkable(int rowIndex, bool shrinkable); + + /** + * Sets the collapsibility of the specified row. + * + * @since 2.0 + * + * @return An error code + * @param[in] rowIndex The row index + * @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 the valid range. + * @exception E_SYSTEM A system error has occurred. + */ + result SetRowCollapsed(int rowIndex, bool collapsed); + + /** + * Sets the stretching ability of all the rows. + * + * @since 2.0 + * + * @return An error code + * @param[in] stretchable Set to @c true to set all the rows as stretchable, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetAllRowsStretchable(bool stretchable); + + /** + * Sets the shrinking ability of all the rows. + * + * @since 2.0 + * + * @return An error code + * @param[in] shrinkable Set to @c true to set all the rows as shrinkable, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result SetAllRowsShrinkable(bool shrinkable); + + /** + * Sets the space before the specified column index. + * + * @since 2.0 + * + * @return An error code + * @param[in] rowIndex The row index + * @param[in] space The @c int that represents the space + * @exception E_SUCCESS The method is successful. + * @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. + * - The row spacing cannot be applied to the first column. + */ + result SetRowSpacing(int rowIndex, int space); + + /** + * Sets the space before the specified column index. + * + * @since 2.1 + * + * @return An error code + * @param[in] rowIndex The row index + * @param[in] space The @c int that represents the space + * @exception E_SUCCESS The method is successful. + * @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. + * - The row spacing cannot be applied to the first column. + */ + result SetRowSpacing(int rowIndex, float space); + + /** + * Sets the position and span of the control. @n + * Adds the control at the specified position. + * + * @since 2.0 + * + * @return An error code + * @param[in] childControl The control for which the position is set + * @param[in] rowStartIndex The row index + * @param[in] columnStartIndex The column index + * @param[in] rowSpan The row span specifies the total number of cells in a row that are merged into a cell + * @param[in] columnSpan The column span specifies the total number of cells in a column that are merged into a cell + * @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. + * - 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 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 vertical alignment. + * + * @since 2.0 + * + * @return An error code + * @param[in] childControl The control for which the alignment is set + * @param[in] horizontalAlignment The horizontal alignment + * @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 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. + */ + result SetAlignment(Control& childControl, LayoutHorizontalAlignment horizontalAlignment, LayoutVerticalAlignment verticalAlignment); + + /** + * Sets the margins of the specified control. + * + * @since 2.0 + * + * @return An error code + * @param[in] childControl The control for which the margins are set + * @param[in] left The left margin + * @param[in] right The right margin + * @param[in] top The top margin + * @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 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 the specified control. + * + * @since 2.1 + * + * @return An error code + * @param[in] childControl The control for which the margins are set + * @param[in] left The left margin + * @param[in] right The right margin + * @param[in] top The top margin + * @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 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, float left, float right, float top, float bottom); +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + GridLayout(const GridLayout& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + GridLayout& operator =(const GridLayout& rhs); +}; // GridLayout + +}} // Tizen::Ui + +#endif // _FUI_GRID_LAYOUT_H_ diff --git a/inc/FUiHorizontalBoxLayout.h b/inc/FUiHorizontalBoxLayout.h new file mode 100644 index 0000000..af21648 --- /dev/null +++ b/inc/FUiHorizontalBoxLayout.h @@ -0,0 +1,420 @@ +// +// 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 FUiHorizontalBoxLayout.h + * @brief This is the header file for the %HorizontalBoxLayout class. + * + * This header file contains the declarations of the %HorizontalBoxLayout class. + */ + +#ifndef _FUI_HORIZONTAL_BOX_LAYOUT_H_ +#define _FUI_HORIZONTAL_BOX_LAYOUT_H_ + +#include + +namespace Tizen { namespace Ui +{ +class Control; + +/** + * @class HorizontalBoxLayout + * @brief The horizontal box layout positions the children of a container horizontally. + * + * @since 2.0 + * + * The %HorizontalBoxLayout class defines the horizontal box layout for a Container. The layout positions the children of the %Container horizontally. + * + * For more information on the class features, see Vertical and Horizontal Box Layouts. + * + * @code +// Sample code for HorizontalBoxLayoutSample.h +#include + +class HorizontalBoxLayoutSample + : public Tizen::Ui::Controls::Form +{ +public: + bool Initialize(void); + virtual result OnInitializing(void); +}; + * @endcode + * + * @code +// Sample code for HorizontalBoxLayoutSample.cpp +#include + +#include "HorizontalBoxLayoutSample.h" + +using namespace Tizen::Ui::Controls; +using namespace Tizen::Ui; +using namespace Tizen::Graphics; + +bool +HorizontalBoxLayoutSample::Initialize(void) +{ + //Creates an instance of VerticalBoxLayout + VerticalBoxLayout formLayout; + formLayout.Construct(VERTICAL_DIRECTION_DOWNWARD); + + // Applies the vertical box layout to the form + Construct(formLayout, FORM_STYLE_NORMAL); + return true; +} + +result +HorizontalBoxLayoutSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + // Creates an instance of HorizontalBoxLayout for the top panel + HorizontalBoxLayout topPanelLayout; + topPanelLayout.Construct(HORIZONTAL_DIRECTION_RIGHTWARD); + + // Creates an instance of Panel and applies it to the horizontal box layout + Panel* pTopPanel = new Panel(); + pTopPanel->Construct(topPanelLayout, Rectangle(0, 0, GetClientAreaBounds().width, 450)); + { + // Creates instances of Label and an instance of Button + Label* pLabel1 = new Label(); + pLabel1->Construct(Rectangle(0,0,GetClientAreaBounds().width/4,100), L"TOP"); + pLabel1->SetTextConfig(20, LABEL_TEXT_STYLE_NORMAL); + pLabel1->SetBackgroundColor(Color(0x00, 0x10, 0x80, 0xFF)); + pTopPanel->AddControl(pLabel1); + + Label* pLabel2 = new Label(); + pLabel2->Construct(Rectangle(0,0,GetClientAreaBounds().width/4,100), L"MIDDLE"); + pLabel2->SetTextConfig(20, LABEL_TEXT_STYLE_NORMAL); + pLabel2->SetBackgroundColor(Color(0x00, 0x20, 0xA0, 0xFF)); + pTopPanel->AddControl(pLabel2); + + Label* pLabel3 = new Label(); + pLabel3->Construct(Rectangle(0,0,GetClientAreaBounds().width/4,100), L"BOTTOM"); + pLabel3->SetTextConfig(20, LABEL_TEXT_STYLE_NORMAL); + pLabel3->SetBackgroundColor(Color(0x00, 0x30, 0xC0, 0xFF)); + pTopPanel->AddControl(pLabel3); + + Button* pButton = new Button(); + pButton->Construct(Rectangle(0,0,GetClientAreaBounds().width/4 - 10,100), L"FIT\nTO\nPARENT"); + pButton->SetTextSize(20); + pTopPanel->AddControl(pButton); + + // Sets relations each label and button + topPanelLayout.SetVerticalAlignment(*pLabel1, LAYOUT_VERTICAL_ALIGN_TOP); + topPanelLayout.SetVerticalAlignment(*pLabel2, LAYOUT_VERTICAL_ALIGN_MIDDLE); + topPanelLayout.SetVerticalAlignment(*pLabel3, LAYOUT_VERTICAL_ALIGN_BOTTOM); + topPanelLayout.SetSpacing(*pButton, 10); + topPanelLayout.SetVerticalFitPolicy(*pButton, FIT_POLICY_PARENT); + } + // Adds the top panel to the form + AddControl(pTopPanel); + + // Creates an instance of HorizontalBoxLayout for bottom panel + HorizontalBoxLayout bottomPanelLayout; + bottomPanelLayout.Construct(HORIZONTAL_DIRECTION_RIGHTWARD); + + // Creates an instance of Panel and applies it to the horizontal box layout + Panel* pBottomPanel = new Panel(); + pBottomPanel->Construct(bottomPanelLayout, Rectangle(0, 0, 400, 500)); + { + // Creates instances of Label + Label* pLabel1 = new Label(); + pLabel1->Construct(Rectangle(0,0,30,100), L"W\n1.0f"); + pLabel1->SetBackgroundColor(Color(0x00, 0x10, 0x80, 0xFF)); + pBottomPanel->AddControl(pLabel1); + + Label* pLabel2 = new Label(); + pLabel2->Construct(Rectangle(0,0,30,100), L"W\n2.0f"); + pLabel2->SetBackgroundColor(Color(0x00, 0x20, 0xA0, 0xFF)); + pBottomPanel->AddControl(pLabel2); + + Label* pLabel3 = new Label(); + pLabel3->Construct(Rectangle(0,0,30,100), L"W\n3.0f"); + pLabel3->SetBackgroundColor(Color(0x00, 0x30, 0xC0, 0xFF)); + pBottomPanel->AddControl(pLabel3); + + // Sets relations each label + bottomPanelLayout.SetVerticalFitPolicy(*pLabel1, FIT_POLICY_PARENT); + bottomPanelLayout.SetVerticalFitPolicy(*pLabel2, FIT_POLICY_PARENT); + bottomPanelLayout.SetVerticalFitPolicy(*pLabel3, FIT_POLICY_PARENT); + bottomPanelLayout.SetWeight(*pLabel1, 1.0f); + bottomPanelLayout.SetWeight(*pLabel2, 2.0f); + bottomPanelLayout.SetWeight(*pLabel3, 3.0f); + } + + // Adds the bottom panel to the form + AddControl(pBottomPanel); + + //Gets the layout of the form + VerticalBoxLayout* pFormLayout = dynamic_cast(this->GetLayoutN()); + + // Sets relations between panels + pFormLayout->SetHorizontalFitPolicy(*pTopPanel, FIT_POLICY_PARENT); + pFormLayout->SetSpacing(*pBottomPanel, 30); + pFormLayout->SetHorizontalFitPolicy(*pBottomPanel, FIT_POLICY_PARENT); + + return r; +} + * @endcode + * + */ + +class _OSP_EXPORT_ HorizontalBoxLayout + : public Layout +{ +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. + * + * @since 2.0 + * + * @remarks After creating an instance of this class, the Construct() method must be called explicitly to initialize this instance. + */ + HorizontalBoxLayout(void); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~HorizontalBoxLayout(void); + + /** + * Initializes this instance of %HorizontalBoxLayout with the specified parameter. + * + * @since 2.0 + * + * @return An error code + * @param[in] direction The direction in which the children are attached + * @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 Construct(HorizontalDirection direction); + + /** + * Gets the direction of %HorizontalBoxLayout. + * + * @since 2.0 + * + * @return An error code + * @param[out] direction The direction in which the children are attached + * @exception E_SUCCESS The method is successful. + */ + result GetDirection(HorizontalDirection& direction) const; + + /** + * Gets the type of the layout. + * + * @since 2.0 + * + * @return The layout type + */ + virtual LayoutType GetLayoutType(void) const; + + /** + * Sets the vertical alignment of the specified control. + * + * @since 2.0 + * + * @return An error code + * @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 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 @c VERTICAL_ALIGN_TOP. + */ + result SetVerticalAlignment(Control& childControl, LayoutVerticalAlignment alignment); + + /** + * Sets the space between the specified control and its predecessor. + * + * @since 2.0 + * + * @return An error code + * @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 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 the specified control and its predecessor. + * + * @since 2.1 + * + * @return An error code + * @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 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, float space); + + /** + * Sets the vertical margins of the specified control. + * + * @since 2.0 + * + * @return An error code + * @param[in] childControl The control for which the margins are set + * @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 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 SetVerticalMargin(Control& childControl, int top, int bottom); + + /** + * Sets the vertical margins of the specified control. + * + * @since 2.1 + * + * @return An error code + * @param[in] childControl The control for which the margins are set + * @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 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 SetVerticalMargin(Control& childControl, float top, float bottom); + + /** + * Sets the width of the specified control with the fixed length. + * + * @since 2.0 + * + * @return An error code + * @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 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 + * + * @return An error code + * @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 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); + + /** + * Sets the width of the specified control with the fitting policy. + * + * @since 2.0 + * + * @return An error code + * @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 is not a child of the container that owns the layout. + * @exception E_SYSTEM A system error has occurred. + * @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); + + /** + * Sets the height of the specified control with a fixed length. + * + * @since 2.0 + * + * @return An error code + * @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 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 the specified control with a fixed length. + * + * @since 2.1 + * + * @return An error code + * @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 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); + + /** + * Sets the height of the specified control with the fitting policy. + * + * @since 2.0 + * + * @return An error code + * @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 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); + + /** + * Sets the weight of the specified control. + * + * @since 2.0 + * + * @return An error code + * @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 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. + */ + result SetWeight(Control& childControl, float weight); + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + HorizontalBoxLayout(const HorizontalBoxLayout& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + HorizontalBoxLayout& operator =(const HorizontalBoxLayout& rhs); +}; // HorizontalBoxLayout + +}} // Tizen::Ui + +#endif // _FUI_HORIZONTAL_BOX_LAYOUT_H_ diff --git a/inc/FUiIAccessibilityListener.h b/inc/FUiIAccessibilityListener.h new file mode 100644 index 0000000..f0eb33c --- /dev/null +++ b/inc/FUiIAccessibilityListener.h @@ -0,0 +1,143 @@ +// +// 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 FUiIAccessibilityListener.h + * @brief This is the header file for the %IAccessibilityListener interface. + * + * This header file contains the declarations of the %IAccessibilityListener interface. + */ + +#ifndef _FUI_IACCESSIBILITY_LISTENER_H_ +#define _FUI_IACCESSIBILITY_LISTENER_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui +{ +class AccessibilityElement; +class Control; + +/** +* @interface IAccessibilityListener +* @brief This interface is the listener interface for accessibility screen reader. +* +* @since 2.0 +* +* This %IAccessibilityListener interface defines methods for accessibility screen reader. +* +*/ +class _OSP_EXPORT_ IAccessibilityListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +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. + * + * @since 2.0 + */ + virtual ~IAccessibilityListener(void) {} + + /** + * Called when the accessibility element gets a focus. + * + * @since 2.0 + * @param[in] control The control that has an accessibility element + * @param[in] element The element + */ + virtual void OnAccessibilityFocusIn(const Control& control, const AccessibilityElement& element) = 0; + + /** + * Called when the accessibility element loses a focus. + * + * @since 2.0 + * @param[in] control The control that has an accessibility element + * @param[in] element The element + */ + virtual void OnAccessibilityFocusOut(const Control& control, const AccessibilityElement& element) = 0; + + /** + * Called when the accessibility element is operated. + * + * @since 2.0 + * @param[in] control The control that has an accessibility element + * @param[in] element The element + */ + virtual void OnAccessibilityActionPerformed(const Control& control, const AccessibilityElement& element) = 0; + + /** + * Called when the accessibility screen status is changed. + * + * @since 2.0 + * @param[in] control The control that has an accessibility element + * @param[in] element The focused element + * @param[in] status The changed status + */ + virtual void OnAccessibilityScreenReaderStatusChanged(const Control& control, const AccessibilityElement& element, AccessibilityScreenReaderStatus status) = 0; + +protected: + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // Following method is reserved and may change its name at any time without + // prior notice. + // + virtual void IAccessibilityListener_Reserved1(void) {} + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // Following method is reserved and may change its name at any time without + // prior notice. + // + virtual void IAccessibilityListener_Reserved2(void) {} + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // Following method is reserved and may change its name at any time without + // prior notice. + // + virtual void IAccessibilityListener_Reserved3(void) {} + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // Following method is reserved and may change its name at any time without + // prior notice. + // + virtual void IAccessibilityListener_Reserved4(void) {} + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // Following method is reserved and may change its name at any time without + // prior notice. + // + virtual void IAccessibilityListener_Reserved5(void) {} +}; // IAccessibilityListener + +}} // Tizen::Ui +#endif // _FUI_IACCESSIBILITY_LISTENER_H_ \ No newline at end of file diff --git a/inc/FUiIActionEventListener.h b/inc/FUiIActionEventListener.h new file mode 100644 index 0000000..a932c20 --- /dev/null +++ b/inc/FUiIActionEventListener.h @@ -0,0 +1,110 @@ +// +// 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 FUiIActionEventListener.h + * @brief This is the header file for the %IActionEventListener interface. + * + * This header file contains the declarations of the IActionEventListener interface. @n + * If an action event is generated, a method of this interface is called. @n + * So, for tasks related to the action event, use the methods of this interface. + * + */ +#ifndef _FUI_IACTION_EVENT_LISTENER_H_ +#define _FUI_IACTION_EVENT_LISTENER_H_ + +#include "FBaseRtIEventListener.h" + +namespace Tizen { namespace Ui +{ +class Control; +}} // Tizen::Ui + +namespace Tizen {namespace Ui +{ +/** + * @interface IActionEventListener + * @brief This interface implements the listener for an action event. + * + * @since 2.0 + * + * The %IActionEventListener interface is the listener interface for receiving action events, for example, from Buttons. + * 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. + * + * For more information on the class features, see in individual control topics under UI Controls. + */ +class _OSP_EXPORT_ IActionEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +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. + * + * @since 2.0 + */ + virtual ~IActionEventListener(void) {} + + /** + * Called when an action event occurs. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] actionId The information about the action event + */ + virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId) = 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. + // + // @since 2.0 + // + virtual void IActionEventListener_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. + // + // @since 2.0 + // + virtual void IActionEventListener_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. + // + // @since 2.0 + // + virtual void IActionEventListener_Reserved3(void) {} +}; // IActionEventListener + +}} // Tizen::Ui + +#endif // _FUI_IACTION_EVENT_LISTENER_H_ diff --git a/inc/FUiIAdjustmentEventListener.h b/inc/FUiIAdjustmentEventListener.h new file mode 100644 index 0000000..e167094 --- /dev/null +++ b/inc/FUiIAdjustmentEventListener.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 FUiIAdjustmentEventListener.h + * @brief This is the header file for the %IAdjustmentEventListener interface. + * + * This header file contains the declarations of the %IAdjustmentEventListener interface. @n + * If a change event is generated, a method of this interface is called. @n + * So, for tasks related to change events, use the methods of this interface. + * + */ +#ifndef _FUI_IADJUSTMENT_EVENT_LISTENER_H_ +#define _FUI_IADJUSTMENT_EVENT_LISTENER_H_ + +#include +#include + +namespace Tizen {namespace Ui +{ +class Control; + +/** + * @interface IAdjustmentEventListener + * @brief This interface implements the listener for adjustment events. + * + * @since 2.0 + * + * The %IAdjustmentEventListener interface is the listener interface for receiving adjustment events, which + * 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. + * + * For more information on the class features, see Slider. + + */ +class IAdjustmentEventListener + : public Tizen::Base::Runtime::IEventListener +{ +// Operation +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~IAdjustmentEventListener(void) {} + + /** + * Called when a change event occurs. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] adjustment The adjustment value + */ + virtual void OnAdjustmentValueChanged(const Tizen::Ui::Control& source, int adjustment) = 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 + // without prior notice. + // + // @since 2.0 + // + virtual void IAdjustmentEventListener_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 + // without prior notice. + // + // @since 2.0 + // + virtual void IAdjustmentEventListener_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 + // without prior notice. + // + // @since 2.0 + // + virtual void IAdjustmentEventListener_Reserved3(void) {} + +}; // IAdjustmentEventListener + +}} // Tizen::Ui + +#endif // _FUI_IADJUSTMENT_EVENT_LISTENER_H_ diff --git a/inc/FUiIAnimationEventListener.h b/inc/FUiIAnimationEventListener.h new file mode 100644 index 0000000..bd2aeaa --- /dev/null +++ b/inc/FUiIAnimationEventListener.h @@ -0,0 +1,112 @@ +// +// 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 FUiIAnimationEventListener.h + * @brief This is the header file for the %IAnimationEventListener interface. + * + * This header file contains the declarations of the %IAnimationEventListener interface. + * If a change event is generated, a method of this interface is called. + * So, for tasks related to change events, use the methods of this interface. + * + */ +#ifndef _FUI_IANIMATION_EVENT_LISTENER_H_ +#define _FUI_IANIMATION_EVENT_LISTENER_H_ + +#include +#include + +namespace Tizen { namespace Ui +{ + +class Control; + +/** + * @interface IAnimationEventListener + * @brief This interface implements the listener for animation events. + * + * @since 2.0 + * + * 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 + * OnAnimationStopped() method of that instance is invoked. + * + * For more information on the class features, see Animation. + * + * + */ +class IAnimationEventListener + : public Tizen::Base::Runtime::IEventListener +{ + +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~IAnimationEventListener(void) {} + + /** + * Called when the animation is stopped. + * + * @since 2.0 + * + * @param[in] source The source of the event + */ + virtual void OnAnimationStopped(const Tizen::Ui::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 + // without prior notice. + // + // @since 2.0 + // + virtual void IAnimationEventListener_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 + // without prior notice. + // + // @since 2.0 + // + virtual void IAnimationEventListener_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 + // without prior notice. + // + // @since 2.0 + // + virtual void IAnimationEventListener_Reserved3(void) {} + +}; // IAnimationEventListener + +}} // Tizen::Ui + +#endif // _FUI_IANIMATION_EVENT_LISTENER_H_ diff --git a/inc/FUiIClipboard.h b/inc/FUiIClipboard.h new file mode 100644 index 0000000..05c019c --- /dev/null +++ b/inc/FUiIClipboard.h @@ -0,0 +1,152 @@ +// +// 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 FUiIClipboard.h + * @brief This is the header file for the %IClipboard interface. + * + * This header file contains the declarations of the %IClipboard interface and its helper classes. + */ + +#ifndef _FUI_ICLIPBOARD_H_ +#define _FUI_ICLIPBOARD_H_ + +#include + +namespace Tizen { namespace Ui +{ +// +// This class is for internal use only. Using this method can cause behavioral, security-related, +// and consistency-related issues in the application. +// +// @interface IClipboard +// @brief This interface defines the operations of %IClipboard. +// +// @since 2.0 +// +// The %IClipboard interface defines the operations of clipboard. +class _OSP_EXPORT_ IClipboard +{ +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. + // + // @since 2.0 + // + virtual ~IClipboard(void) {} + +public: + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // Copies the specified item to the system Clipboard. + // + // @since 2.0 + // + // @return An error code + // @param[in] item The item to be saved in the system clipboard + // @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 method returns E_INVALID_ARG if the specified item is + // not constructed.@n + // For the text and image data type, the data itself is copied + // by the method and kept by the system clipboard. + // + virtual result CopyItem(const ClipboardItem& item) = 0; + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // Gets a collection of items that matches the specified data types from the + // system clipboard. + // + // @since 2.0 + // + // @return The pointer to an IList which contains a collection of ClipboardItem, @n + // else @c null if an error occurs + // @param[in] dataTypes The types of items. Multiple data types can be + // combined using bitwise OR (Tizen::Ui::ClipboardDataType). + // @exception E_SUCCESS The method is successful. + // @exception E_OBJ_NOT_FOUND The items of the specified data are not found. + // @exception E_SYSTEM A system error has occurred. + // @remarks The specific error code can be accessed using the GetLastResult() method. @n + // This method returns the pointer to an IList which contains + // a collection of ClipboardItem. The returned pointer to IList + // and all elements in IList must be deleted by applications.@n + // The items in IList are sorted in the reverse order in which + // they are copied to the system clipboard. So, the first + // item in IList is the latest one among them. @n + // @c dataType can be a combination of ClipboardDataType. + // + virtual Tizen::Base::Collection::IList* RetrieveItemsN(unsigned long dataTypes) = 0; + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // Gets the latest item for the specified data types from the system clipboard. + // + // @since 2.0 + // + // @return The pointer to a ClipboardItem, @n + // else @c null if an error occurs + // @param[in] dataTypes The types of items. Multiple data types can be + // combined using bitwise OR (Tizen::Ui::ClipboardDataType). + // @exception E_SUCCESS The method is successful. + // @exception E_OBJ_NOT_FOUND The item of the specified data types is not found. + // @exception E_SYSTEM A system error has occurred. + // @remarks The specific error code can be accessed using the GetLastResult() method. @n + // This method returns the pointer to a ClipboardItem. The + // returned ClipboardItem must be deleted by applications.@n + // If there is no matched item in the system clipboard, this method + // returns @c null. @n + // @c dataType can be a combination of ClipboardDataType. + // + virtual Tizen::Ui::ClipboardItem* RetrieveLatestItemN(unsigned long dataTypes) = 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 IClipboard_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 IClipboard_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 IClipboard_Reserved3(void) {} +}; // IClipboard + +}} // Tizen::Ui + +#endif //_FUI_ICLIPBOARD_H_ diff --git a/inc/FUiIClipboardPopupEventListener.h b/inc/FUiIClipboardPopupEventListener.h new file mode 100644 index 0000000..532cf3c --- /dev/null +++ b/inc/FUiIClipboardPopupEventListener.h @@ -0,0 +1,97 @@ +// +// 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 FUiIClipboardPopupEventListener.h + * @brief This is the header file for the %IClipboardPopupEventListener interface. + * + * This header file contains the declarations of the %IClipboardPopupEventListener interface. @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. + */ + +#ifndef _FUI_ICLIPBOARD_POPUP_EVENT_LISTENER_H_ +#define _FUI_ICLIPBOARD_POPUP_EVENT_LISTENER_H_ + +#include + +namespace Tizen { namespace Ui +{ +class ClipboardItem; + +/** + * @interface IClipboardPopupEventListener + * @brief This interface defines the listener for clipboard pop-up events. + * + * @since 2.0 + * + * The %IClipboardPopupEventListener interface is the listener interface for receiving clipboard pop-up events. + * + * For more information on the class features, see Clipboard. + */ +class _OSP_EXPORT_ IClipboardPopupEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +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. + * + * @since 2.0 + */ + virtual ~IClipboardPopupEventListener(void) {} + + /** + * Called when the clipboard popup is closed by user interaction. + * + * @since 2.0 + * + * @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; + +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 IClipboardPopupEventListener_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 IClipboardPopupEventListener_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 IClipboardPopupEventListener_Reserved3(void) {} +}; // IClipboardPopupEventListener + +}} // Tizen::Ui + +#endif //_FUI_ICLIPBOARD_POPUP_EVENT_LISTENER_H_ diff --git a/inc/FUiIColorChangeEventListener.h b/inc/FUiIColorChangeEventListener.h new file mode 100644 index 0000000..dc02f04 --- /dev/null +++ b/inc/FUiIColorChangeEventListener.h @@ -0,0 +1,115 @@ +// +// 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 FUiIColorChangeEventListener.h + * @brief This is the header file for the %IColorChangeEventListener interface. + * + * This header file contains the declarations of the %IColorChangeEventListener interface. + * If a change event is generated, a method of this interface is called. + * So, for tasks related to change events, use the methods of this interface. + * + */ +#ifndef _FUI_ICOLOR_CHANGE_EVENT_LISTENER_H_ +#define _FUI_ICOLOR_CHANGE_EVENT_LISTENER_H_ + +#include +#include + +namespace Tizen { namespace Graphics +{ +class Color; +}} // Tizen::Graphics; + +namespace Tizen { namespace Ui +{ + +class Control; + +/** + * @interface IColorChangeEventListener + * @brief This interface implements the listener for the color change events. + * + * @since 2.0 + * + * The %IColorChangeEventListener interface is the listener interface for receiving color change events. + * 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. + * + * For more information on the class features, see ColorPicker. + */ +class IColorChangeEventListener + : public Tizen::Base::Runtime::IEventListener +{ +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~IColorChangeEventListener(void) {} + + /** + * Called when there is a change in Color. @n + * The %Color instance is passed as an input parameter. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] color The color + */ + virtual void OnColorChanged(const Tizen::Ui::Control& source, const Tizen::Graphics::Color& color) = 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. + // + // @since 2.0 + // + virtual void IColorChangeEventListener_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. + // + // @since 2.0 + // + virtual void IColorChangeEventListener_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. + // + // @since 2.0 + // + virtual void IColorChangeEventListener_Reserved3(void) {} +}; // IColorChangeEventListener + +}} // Tizen::Ui + +#endif // _FUI_ICOLOR_CHANGE_EVENT_LISTENER_H_ diff --git a/inc/FUiICustomItemEventListener.h b/inc/FUiICustomItemEventListener.h new file mode 100644 index 0000000..6570be8 --- /dev/null +++ b/inc/FUiICustomItemEventListener.h @@ -0,0 +1,117 @@ +// +// 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 FUiICustomItemEventListener.h + * @brief This is the header file for the %ICustomItemEventListener interface. + * + * 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 + * Applications doing tasks related to the item event use the methods of this interface. + * + */ +#ifndef _FUI_ICUSTOM_ITEM_EVENT_LISTENER_H_ +#define _FUI_ICUSTOM_ITEM_EVENT_LISTENER_H_ + +#include +#include + +namespace Tizen { namespace Ui +{ +class Control; +} } + +namespace Tizen {namespace Ui +{ + +/** + * @if OSPDEPREC + * @interface ICustomItemEventListener + * @brief [Deprecated] This interface implements the listener for the item event. + * + * @deprecated This interface is deprecated. Instead of using this interface, use the IListViewItemEventListener interface. + * @since 2.0 + * + * The %ICustomItemEventListener interface is the listener interface for receiving item events. The class that processes an item event + * implements this interface, and the instance created with that class is registered with a UI control, using the CustomList::AddCustomItemEventListener() + * method. When the item event occurs, the OnItemStateChanged() method of that object is invoked. + * @endif + */ +class _OSP_EXPORT_ ICustomItemEventListener + : public Tizen::Base::Runtime::IEventListener +{ +// Operation +public: + /** + * @if OSPDEPREC + * This is the destructor for this class. + * + * @brief [Deprecated] + * @deprecated This interface is deprecated. Instead of using this interface, use the IListViewItemEventListener interface. + * @since 2.0 + * @endif + */ + virtual ~ICustomItemEventListener(void) {} + + /** + * @if OSPDEPREC + * Called when the state of CustomListItem is changed. + * + * @brief [Deprecated] + * @deprecated This interface is deprecated. Instead of using this interface, use the IListViewItemEventListener interface. + * @since 2.0 + * + * @param[in] source The source control from which the event is fired + * @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. + * - 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; + + + /** + * @if OSPDEPREC + * Called when the state of an element in the CustomListItem is changed. + * + * @brief [Deprecated] + * @deprecated This interface is deprecated. Instead of using this interface, use the IListViewItemEventListener interface. + * @since 2.0 + * + * @param[in] source The source control from which the event is fired + * @param[in] index The index of the item + * @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. + * - 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; + + +}; //ICustomItemEventListener + +}} // Tizen::Ui + +#endif // _FUI_ICUSTOM_ITEM_EVENT_LISTENER_H_ diff --git a/inc/FUiIDataBindingDataTransformer.h b/inc/FUiIDataBindingDataTransformer.h new file mode 100644 index 0000000..1473183 --- /dev/null +++ b/inc/FUiIDataBindingDataTransformer.h @@ -0,0 +1,139 @@ +// +// 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 FUiIDataBindingDataTransformer.h + * @brief This is the header file for the %IDataBindingDataTransformer interface. + * + * This header file contains the declarations of the %IDataBindingDataTransformer interface. + */ + +#ifndef _FUI_IDATA_BINDING_DATA_TRANSFORMER_H_ +#define _FUI_IDATA_BINDING_DATA_TRANSFORMER_H_ + +#include + +namespace Tizen { namespace Base +{ +class String; +class Object; +}} + +namespace Tizen { namespace Ui +{ + +/** +* @interface IDataBindingDataTransformer +* @brief This interface defines methods for transforming the value of the data that will be updated to the binding target or source. +* +* @since 2.0 +* +* The %IDataBindingDataTransformer interface defines methods for transforming the value of source type to the value of destination type. +*/ +class _OSP_EXPORT_ IDataBindingDataTransformer +{ +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. + * + * @since 2.0 + */ + virtual ~IDataBindingDataTransformer(void) {}; + + /** + * 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 + * @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 + */ + virtual bool TransformSourceToTarget(const Tizen::Base::String& bindingId, DataBindingDataType sourceType, const Tizen::Base::Object& sourceData, DataBindingDataType targetType, Tizen::Base::Object& targetData) = 0; + + /** + * Transforms the value of the data of target type to value of source type. + * @since 2.0 + * @return @c true if it is successful to convert target to source @n + * else @c false + * @param[in] bindingId The specified binding ID + * @param[in] targetType The target data type + * @param[in] targetData The data target + * @param[in] sourceType The source data type + * @param[out] sourceData The data source + */ + virtual bool TransformTargetToSource(const Tizen::Base::String& bindingId, DataBindingDataType targetType, const Tizen::Base::Object& targetData, DataBindingDataType sourceType, Tizen::Base::Object& sourceData) = 0; + + /** + * 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 + * @param[in] bindingId The specified binding ID + * @param[in] sourceType The source data type + * @param[in] targetType The target data type + */ + virtual bool IsSourceToTargetTransformable(const Tizen::Base::String& bindingId, DataBindingDataType sourceType, DataBindingDataType targetType) = 0; + + /** + * 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 + * else @c false + * @param[in] bindingId The specified binding ID + * @param[in] targetType The target data type + * @param[in] sourceType The source data type + */ + virtual bool IsTargetToSourceTransformable(const Tizen::Base::String& bindingId, DataBindingDataType targetType, DataBindingDataType sourceType) = 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 IDataBingingDataTransformer_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 IDataBingingDataTransformer_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 IDataBingingDataTransformer_Reserved3(void) {} + +}; // IDataBindingDataTransformer + +}} // Tizen::Ui +#endif // _FUI_IDATA_BINDING_DATA_TRANSFORMER_H_ diff --git a/inc/FUiIDataBindingDataValidator.h b/inc/FUiIDataBindingDataValidator.h new file mode 100644 index 0000000..e586899 --- /dev/null +++ b/inc/FUiIDataBindingDataValidator.h @@ -0,0 +1,112 @@ +// +// 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 FUiIDataBindingDataValidator.h + * @brief This is the header file for the %IDataBindingDataValidator interface. + * + * This header file contains the declarations of the %IDataBindingDataValidator interface. + */ + +#ifndef _FUI_IDATA_BINDING_DATA_VALIDATOR_H_ +#define _FUI_IDATA_BINDING_DATA_VALIDATOR_H_ + +#include + +namespace Tizen { namespace Base +{ +class String; +class Object; +}} + +namespace Tizen { namespace Ui +{ + +/** +* @interface IDataBindingDataValidator +* @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 the transformed data that is updated to the binding. +*/ +class _OSP_EXPORT_ IDataBindingDataValidator +{ +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. + * + * @since 2.0 + */ + virtual ~IDataBindingDataValidator(void) {}; + + /** + * 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 + * @param[in] bindingId The binding ID 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 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 + */ + virtual bool ValidateDataToSource( const Tizen::Base::String& bindingId, const Tizen::Base::Object& data) = 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 IDataBindingDataValidator_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 IDataBindingDataValidator_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 IDataBindingDataValidator_Reserved3(void) {} + +}; // IDataBindingDataValidator + +}} // Tizen::Ui +#endif // _FUI_IDATA_BINDING_DATA_VALIDATOR_H_ diff --git a/inc/FUiIDataBindingListener.h b/inc/FUiIDataBindingListener.h new file mode 100644 index 0000000..92df3ef --- /dev/null +++ b/inc/FUiIDataBindingListener.h @@ -0,0 +1,123 @@ +// +// 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 FUiIDataBindingListener.h + * @brief This is the header file for the %IDataBindingListener interface. + * + * This header file contains the declarations of the %IDataBindingListener interface. + */ + +#ifndef _FUI_IDATA_BINDING_LISTENER_H_ +#define _FUI_IDATA_BINDING_LISTENER_H_ + +#include +#include + +namespace Tizen { namespace Ui +{ + +/** +* @interface IDataBindingListener +* @brief This interface is the listener interface for receiving data binding-related events. +* +* @since 2.0 +* +* The %IDataBindingListener interface defines methods for receiving data binding-related events. +*/ +class _OSP_EXPORT_ IDataBindingListener + : public Tizen::Base::Runtime::IEventListener +{ +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. + * + * @since 2.0 + */ + virtual ~IDataBindingListener(void) {}; + + /** + * Called when the data transfer for source is completed by the data binding. + * + * @since 2.0 + * + * @param[in] bindingId The binding ID + * @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; + + /** + * Called when the data transfer for target is completed by the data binding. + * + * @since 2.0 + * + * @param[in] bindingId The binding ID + * @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; + + + /** + * Called when a validation has failed during data transfer. + * + * @since 2.0 + * + * @param[in] bindingId The binding ID + * @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 + , const Tizen::Base::String& propertyName, DataBindingDestinationType destType) = 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 IDataBindingListener_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 IDataBindingListener_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 IDataBindingListener_Reserved3(void) {} + +}; // IDataBindingListener; + +}} // Tizen::Ui +#endif // _FUI_IDATA_BINDING_LISTENER_H_ diff --git a/inc/FUiIDateChangeEventListener.h b/inc/FUiIDateChangeEventListener.h new file mode 100644 index 0000000..80f966c --- /dev/null +++ b/inc/FUiIDateChangeEventListener.h @@ -0,0 +1,128 @@ +// +// 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 FUiIDateChangeEventListener.h + * @brief This is the header file for the %IDateChangeEventListener interface. + * + * This header file contains the declarations of the %IDateChangeEventListener interface. + * If a change event is generated, a method of this interface is called. + * So, for tasks related to the change events, use the methods of this interface. + * + */ +#ifndef _FUI_IDATE_CHANGE_EVENT_LISTENER_H_ +#define _FUI_IDATE_CHANGE_EVENT_LISTENER_H_ + +// Includes +#include +#include + +namespace Tizen { namespace Ui +{ +class Control; +} } + +namespace Tizen {namespace Ui +{ + +/** + * @interface IDateChangeEventListener + * @brief This interface implements the listener for Date change events. + * + * @since 2.0 + * + * The %IDateChangeEventListener interface is the listener interface for receiving date change events. + * 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. + * + * For more information on the class features, see EditDate and EditTime and DatePicker, TimePicker, and DateTimePicker. + */ +class _OSP_EXPORT_ IDateChangeEventListener + : public Tizen::Base::Runtime::IEventListener +{ +// Operation +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~IDateChangeEventListener(void) {} + + /** + * Called when there is a change in the date. @n + * The changed values of the year, month, and day are passed as input parameters. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] year The year + * @param[in] month The month + * @param[in] day The day + */ + virtual void OnDateChanged(const Tizen::Ui::Control& source, int year, int month, int day) = 0; + + + /** + * Called when the change in the date is cancelled. + * + * @since 2.0 + * + * @param[in] source The source of the event + */ + virtual void OnDateChangeCanceled(const Tizen::Ui::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. + // + // @since 2.0 + // + virtual void IDateChangeEventListener_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. + // + // @since 2.0 + // + virtual void IDateChangeEventListener_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. + // + // @since 2.0 + // + virtual void IDateChangeEventListener_Reserved3(void) {} + +}; // IDateChangeEventListener + +}} // Tizen::Ui + +#endif // _FUI_IDATE_CHANGE_EVENT_LISTENER_H_ diff --git a/inc/FUiIDateTimeChangeEventListener.h b/inc/FUiIDateTimeChangeEventListener.h new file mode 100644 index 0000000..720e164 --- /dev/null +++ b/inc/FUiIDateTimeChangeEventListener.h @@ -0,0 +1,127 @@ +// +// 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 FUiIDateTimeChangeEventListener.h + * @brief This is the header file for the %IDateTimeChangeEventListener interface. + * + * This header file contains the declarations of the %IDateTimeChangeEventListener interface. @n + * If a change event is generated, a method of this class is interface. @n + * So, if applications perform jobs related to change events, they use the methods of this interface. + * + */ +#ifndef _FUI_IDATETIME_CHANGE_EVENT_LISTENER_H_ +#define _FUI_IDATETIME_CHANGE_EVENT_LISTENER_H_ + +// Includes +#include +#include + +namespace Tizen { namespace Ui +{ +class Control; +} } + +namespace Tizen {namespace Ui +{ + +/** + * @interface IDateTimeChangeEventListener + * @brief This interface implements the listener for Date and Time change events. + * + * @since 2.0 + * + * The %IDateTimeChangeEventListener interface is the listener interface for receiving date and time change events. + * 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. + * + * For more information on the class features, see DatePicker, TimePicker, and DateTimePicker. + */ +class _OSP_EXPORT_ IDateTimeChangeEventListener + : public Tizen::Base::Runtime::IEventListener +{ +// Operation +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~IDateTimeChangeEventListener(void) {} + + /** + * Called when there is a change in DateTime. @n + * The changed values of day, month, year, hour and minute are passed as input parameters. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] year The year value + * @param[in] month The month value + * @param[in] day The day value + * @param[in] hour The hour value + * @param[in] minute The minute value + * + */ + virtual void OnDateTimeChanged(const Tizen::Ui::Control& source, int year, int month, int day, int hour, int minute) = 0; + + + /** + * Called when the date and time change is cancelled. + * + * @since 2.0 + * + * @param[in] source The source of the event + */ + virtual void OnDateTimeChangeCanceled(const Tizen::Ui::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. + // + // @since 2.0 + // + virtual void IDateTimeChangeEventListener_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. + // + // @since 2.0 + // + virtual void IDateTimeChangeEventListener_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. + // + // @since 2.0 + // + virtual void IDateTimeChangeEventListener_Reserved3(void) {} +}; // IDateTimeChangeEventListener + +}} // Tizen::Ui + +#endif // _FUI_IDATETIME_CHANGE_EVENT_LISTENER_H_ diff --git a/inc/FUiIDragDropEventListener.h b/inc/FUiIDragDropEventListener.h new file mode 100644 index 0000000..e35dbef --- /dev/null +++ b/inc/FUiIDragDropEventListener.h @@ -0,0 +1,109 @@ +// +// 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 FUiIDragDropEventListener.h +* @brief This is the header file for the %IDragDropEventListener interface. +* +* This header file contains the declarations of the %IDragDropEventListener interface. +*/ +#ifndef _FUI_IDRAG_DROP_EVENT_LISTENER_H_ +#define _FUI_IDRAG_DROP_EVENT_LISTENER_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui +{ + +class Control; + +/** + * @interface IDragDropEventListener + * @brief This interface implements the listener for a drag and drop event. + * + * @since 2.0 + * + * The %IDragDropEventListener interface is the listener interface for receiving drag and drop events. + * 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. + * + * For more information on the class features, see Event Listeners. + */ +class _OSP_EXPORT_ IDragDropEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +// Operation +public: + // + // This method is for internal use only. + // Using this method can cause behavioral, security-related, and consistency-related issues in the application. + // + // This is the destructor for this class. + // + // @since 2.0 + // + virtual ~IDragDropEventListener(void) {} + + /** + * Called when an entity is dragged. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] startPosition The start position + * @param[in] currentPosition The current position + */ + virtual void OnTouchDragged(const Tizen::Ui::Control& source, + const Tizen::Graphics::Point& startPosition, const Tizen::Graphics::Point& currentPosition) = 0; + + /** + * Called when an entity is dropped. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] startPosition The start position + * @param[in] currentPosition The current position + */ + virtual void OnTouchDropped(const Tizen::Ui::Control& source, + const Tizen::Graphics::Point& startPosition, const Tizen::Graphics::Point& currentPosition) = 0; + +protected: + // Reserved virtual methods for later extension + // + // The following methods are reserved and may change its name at any time without prior notice. + // + virtual void IDragDropEventListener_Reserved1(void) {} + + // Reserved virtual methods for later extension + // + // The following methods are reserved and may change its name at any time without prior notice. + // + virtual void IDragDropEventListener_Reserved2(void) {} + + // Reserved virtual methods for later extension + // + // The following methods are reserved and may change its name at any time without prior notice. + // + virtual void IDragDropEventListener_Reserved3(void) {} +}; // IDragDropEventListener + +} } // Tizen::Ui + +#endif // _FUI_IDRAG_DROP_EVENT_LISTENER_H_ diff --git a/inc/FUiIDragDropEventListenerF.h b/inc/FUiIDragDropEventListenerF.h new file mode 100644 index 0000000..45cdfe3 --- /dev/null +++ b/inc/FUiIDragDropEventListenerF.h @@ -0,0 +1,110 @@ + +// +// 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 FUiIDragDropEventListenerF.h +* @brief This is the header file for the %IDragDropEventListenerF interface. +* +* This header file contains the declarations of the %IDragDropEventListenerF interface. +*/ +#ifndef _FUI_IDRAG_DROP_EVENT_LISTENERF_H_ +#define _FUI_IDRAG_DROP_EVENT_LISTENERF_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui +{ + +class Control; + +/** + * @interface IDragDropEventListenerF + * @brief This interface implements the listener for a drag and drop event. + * + * @since 2.1 + * + * The %IDragDropEventListenerF interface is the listener interface for receiving drag and drop events. + * 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. + * + * For more information on the class features, see Event Listeners. + */ +class _OSP_EXPORT_ IDragDropEventListenerF + : virtual public Tizen::Base::Runtime::IEventListener +{ +// Operation +public: + // + // This method is for internal use only. + // Using this method can cause behavioral, security-related, and consistency-related issues in the application. + // + // This is the destructor for this class. + // + // @since 2.1 + // + virtual ~IDragDropEventListenerF(void) {} + + /** + * Called when an entity is dragged. + * + * @since 2.1 + * + * @param[in] source The source of the event + * @param[in] startPosition The start position + * @param[in] currentPosition The current position + */ + virtual void OnTouchDraggedF(const Tizen::Ui::Control& source, + const Tizen::Graphics::FloatPoint& startPosition, const Tizen::Graphics::FloatPoint& currentPosition) = 0; + + /** + * Called when an entity is dropped. + * + * @since 2.1 + * + * @param[in] source The source of the event + * @param[in] startPosition The start position + * @param[in] currentPosition The current position + */ + virtual void OnTouchDroppedF(const Tizen::Ui::Control& source, + const Tizen::Graphics::FloatPoint& startPosition, const Tizen::Graphics::FloatPoint& currentPosition) = 0; + +protected: + // Reserved virtual methods for later extension + // + // The following methods are reserved and may change its name at any time without prior notice. + // + virtual void IDragDropEventListenerF_Reserved1(void) {} + + // Reserved virtual methods for later extension + // + // The following methods are reserved and may change its name at any time without prior notice. + // + virtual void IDragDropEventListenerF_Reserved2(void) {} + + // Reserved virtual methods for later extension + // + // The following methods are reserved and may change its name at any time without prior notice. + // + virtual void IDragDropEventListenerF_Reserved3(void) {} +}; // IDragDropEventListenerF + +} } // Tizen::Ui + +#endif // _FUI_IDRAG_DROP_EVENT_LISTENERF_H_ diff --git a/inc/FUiIExpandableItemEventListener.h b/inc/FUiIExpandableItemEventListener.h new file mode 100644 index 0000000..5205882 --- /dev/null +++ b/inc/FUiIExpandableItemEventListener.h @@ -0,0 +1,115 @@ +// +// 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 FUiIExpandableItemEventListener.h + * @brief This is the header file for the %IExpandableItemEventListener interface. + * + * This header file contains the declarations of the %IExpandableItemEventListener interface. @n + * If an item event is generated, a method of this interface is called. + * + */ +#ifndef _FUI_IEXPANDABLE_ITEM_EVENT_LISTENER_H_ +#define _FUI_IEXPANDABLE_ITEM_EVENT_LISTENER_H_ + +#include +#include + +namespace Tizen { namespace Ui +{ +class Control; +} } + +namespace Tizen {namespace Ui +{ + +/** + * @if OSPDEPREC + * @interface IExpandableItemEventListener + * @brief [Deprecated] This interface implements a listener for the item events. + * + * @deprecated This interface is deprecated. Instead of using this interface, use the IGroupedTableViewItemEventListener interface. + * @since 2.0 + * + * The %IExpandableItemEventListener interface implements a listener for the item events. + * A class that needs to process an item event + * must implement this interface. The object created with that class is registered with a UI Control using the controls. + * ExpandableList::AddExpandableItemEventListener() method. When the item event occurs, that instance's OnItemStateChanged() method is invoked. + * @endif + */ +class _OSP_EXPORT_ IExpandableItemEventListener + : public Tizen::Base::Runtime::IEventListener +{ +// Operation +public: + /** + * @if OSPDEPREC + * This is the destructor for this class. + * + * @brief [Deprecated] + * @deprecated This interface is deprecated. Instead of using this interface, use the IGroupedTableViewEventListener interface. + * @since 2.0 + * @endif + */ + virtual ~IExpandableItemEventListener(void) {} + + /** + * @if OSPDEPREC + * Called when the state of 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. + * @since 2.0 + * + * @param[in] source The source control from which the event is fired + * @param[in] mainIndex The main index of the item + * @param[in] subIndex The sub 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 that derives %IExpandableItemEventListener to handle the user interaction at the CustomListItem of the + * ExpandableList. + * @endif + */ + virtual void OnItemStateChanged(const Tizen::Ui::Control& source, int mainIndex, int subIndex, int itemId, Tizen::Ui::ItemStatus status) = 0; + + + /** + * @if OSPDEPREC + * 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. + * @since 2.0 + * + * @param[in] source The source control from which the event is fired + * @param[in] mainIndex The main index of the item + * @param[in] subIndex The sub index of the item + * @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 that derives %IExpandableItemEventListener to handle the user interaction at the element in + * CustomListItem of ExpandableList. + * @endif + */ + virtual void OnItemStateChanged(const Tizen::Ui::Control& source, int mainIndex, int subIndex, int itemId, int elementId, Tizen::Ui::ItemStatus status) = 0; + +}; //IExpandableItemEventListener + +}} // Tizen::Ui + +#endif // _FUI_IEXPANDABLE_ITEM_EVENT_LISTENER_H_ diff --git a/inc/FUiIFastScrollEventListener.h b/inc/FUiIFastScrollEventListener.h new file mode 100644 index 0000000..8d4f0a6 --- /dev/null +++ b/inc/FUiIFastScrollEventListener.h @@ -0,0 +1,108 @@ +// +// 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 FUiIFastScrollEventListener.h + * @brief This is the header file for the %IFastScrollEventListener interface. + * + * This header file contains declarations of the %IFastScrollEventListener 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_ +#define _FUI_IFAST_SCROLL_EVENT_LISTENER_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui +{ +class Control; +} } + +namespace Tizen {namespace Ui +{ + +/** + * @if OSPDEPREC + * @interface IFastScrollEventListener + * @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 + * + * + * The %IFastScrollEventListener interface for receiving item events. The class that processes a fast scroll + * implements this interface, and the object created with that class is registered with a UI control, using the control's + * AddFastScrollEventListener method. When an item event occurs, the object's OnItemStateChanged() method is invoked. + * @endif + */ +class _OSP_EXPORT_ IFastScrollEventListener + : public Tizen::Base::Runtime::IEventListener +{ +// Operation +public: + /** + * @if OSPDEPREC + * This is the destructor for this class. + * + * @brief [Deprecated] + * @deprecated This interface is deprecated. Instead of using this interface, use the IFastScrollListener interface. + * @since 2.0 + * @endif + */ + virtual ~IFastScrollEventListener(void) {} + + /** + * @if OSPDEPREC + * Called when a main index is selected. + * + * @brief [Deprecated] + * @deprecated This interface is deprecated. Instead of using this interface, use the IFastScrollListener interface. + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] mainIndex The main index + * @endif + */ + virtual void OnMainIndexChanged(const Tizen::Ui::Control& source, Tizen::Base::Character& mainIndex) = 0; + + /** + * @if OSPDEPREC + * Called when a main index is expanded. + * + * @brief [Deprecated] + * @deprecated This interface is deprecated. Instead of using this interface, use the IFastScrollListener interface. + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] mainIndex The main index + * @endif + */ + virtual void OnMainIndexSelected(const Tizen::Ui::Control& source, Tizen::Base::Character& mainIndex) = 0; + +protected: + + virtual void IFastScrollEventListener_Reserved1(void) {} + virtual void IFastScrollEventListener_Reserved2(void) {} + virtual void IFastScrollEventListener_Reserved3(void) {} +}; // IFastScrollEventListener + +}} + +#endif // _FUI_IFAST_SCROLL_EVENT_LISTENER_H_ diff --git a/inc/FUiIFocusEventListener.h b/inc/FUiIFocusEventListener.h new file mode 100644 index 0000000..4d89c6c --- /dev/null +++ b/inc/FUiIFocusEventListener.h @@ -0,0 +1,122 @@ +// +// 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 FUiIFocusEventListener.h + * @brief This is the header file for the %IFocusEventListener interface. + * + * This header file contains the declarations of the %IFocusEventListener interface. + */ + +#ifndef _FUI_IFOCUS_EVENT_LISTENER_H_ +#define _FUI_IFOCUS_EVENT_LISTENER_H_ + +#include + +namespace Tizen { namespace Ui +{ + +class Control; + +// +//@enum FocusStatus +//Defines constants used to identify focus status. +//@since 2.0 +// + +enum FocusStatus +{ + FOCUS_GAINED = 0, // The Control has gained focus + FOCUS_LOST = 1 // The Control has lost focus +}; + +/** + * @interface IFocusEventListener + * @brief This interface is used as the argument to focus the event listener. + * + * @since 2.0 + * + * The %IFocusEventListener interface is the listener interface for receiving focus events. + * 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. + * + * For more information on the class features, see Event Listeners. + */ +class _OSP_EXPORT_ IFocusEventListener + : public Tizen::Base::Runtime::IEventListener +{ +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. + * + * @since 2.0 + * + */ + virtual ~IFocusEventListener(void) {} + + /** + * Called when Control gains the input focus. + * + * @since 2.0 + * + * @param[in] source The source of the event + */ + virtual void OnFocusGained(const Tizen::Ui::Control& source) = 0; + + /** + * Called when Control loses the input focus. + * + * @since 2.0 + * + * @param[in] source The source of the event + */ + virtual void OnFocusLost(const Tizen::Ui::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 IFocusEventListener_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 IIFocusEventListener_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 IIFocusEventListener_Reserved3(void) {} +}; // IFocusEventListener + +}} // Tizen::Ui + +#endif // _FUI_IFOCUS_EVENT_LISTENER_H_ diff --git a/inc/FUiIGroupedItemEventListener.h b/inc/FUiIGroupedItemEventListener.h new file mode 100644 index 0000000..5a694b0 --- /dev/null +++ b/inc/FUiIGroupedItemEventListener.h @@ -0,0 +1,123 @@ +// +// 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 FUiIGroupedItemEventListener.h + * @brief This is the header file for the %IGroupedItemEventListener interface. + * + * This header file contains the declarations of the %IGroupedItemEventListener interface. + */ + +#ifndef _FUI_IGROUPED_ITEM_EVENT_LISTENER_H_ +#define _FUI_IGROUPED_ITEM_EVENT_LISTENER_H_ + +#include +#include + +namespace Tizen { namespace Ui +{ +class Control; +} } + +namespace Tizen {namespace Ui +{ + +/** + * @if OSPDEPREC + * @interface IGroupedItemEventListener + * @brief [Deprecated] This interface implements the listener for the events on the items of GroupedList. + * + * @deprecated This interface is deprecated. Instead of using this interface, use the IGroupedListViewItemEventListener interface. + * @since 2.0 + * + * + * The %IGroupedItemEventListener interface implements a listener for detecting state changes on the item of the grouped list. + * The interface is registered with a GroupedList, using the control's AddGroupedItemEventListener() method. + * @endif + */ +class _OSP_EXPORT_ IGroupedItemEventListener + : public Tizen::Base::Runtime::IEventListener +{ +public: + /** + * @if OSPDEPREC + * This is the default constructor for this class. + * + * @brief [Deprecated] + * @deprecated This interface is deprecated. Instead of using this interface, use the IGroupedListViewItemEventListener interface. + * @since 2.0 + * @endif + */ + IGroupedItemEventListener(void) {}; + + /** + * @if OSPDEPREC + * This is the destructor for this class. + * + * @brief [Deprecated] + * @deprecated This interface is deprecated. Instead of using this interface, use the IGroupedListViewItemEventListener interface. + * @since 2.0 + * @endif + */ + virtual ~IGroupedItemEventListener(void) {}; + + /** + * @if OSPDEPREC + * Called when the state of an element in the CustomListItem instance in the GroupedList instance is changed. @n + * For example, the %OnItemStateChanged() method is called when an element of %CustomListItem in %GroupedList is checked, unchecked, or selected. + * + * @brief [Deprecated] + * @deprecated This interface is deprecated. Instead of using this interface, use the IGroupedListViewItemEventListener interface. + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] groupIndex The index of the list group + * @param[in] itemIndex The index of the list item in the specified group + * @param[in] itemId The item ID + * @param[in] elementId The element ID + * @param[in] status The state of the element + * @remarks If GroupedList or SlidableGroupedList 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 groupIndex, int itemIndex, int itemId, + * Tizen::Ui::ItemStatus status) is called. + * @endif + */ + virtual void OnItemStateChanged(const Tizen::Ui::Control& source, int groupIndex, int itemIndex, int itemId, int elementId, Tizen::Ui::ItemStatus status) = 0; + + /** + * @if OSPDEPREC + * Called when the state of an item in the grouped list is changed. @n + * For example, the %OnItemStateChanged() method is called when an item of the GroupedList control is checked, unchecked, or selected. + * + * @brief [Deprecated] + * @deprecated This interface is deprecated. Instead of using this interface, use the IGroupedListViewItemEventListener interface. + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] groupIndex The index of the list group + * @param[in] itemIndex The index of the list item in the specified group + * @param[in] itemId The item ID + * @param[in] status The state of the item + * @remarks If GroupedList or SlidableGroupedList is constructed with 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 groupIndex, int itemIndex, int itemId, Tizen::Ui::ItemStatus status) = 0; +}; //IGroupedItemEventListener + +}} // Tizen::Ui + +#endif //_FUI_IGROUPED_ITEM_EVENT_LISTENER_H_ diff --git a/inc/FUiIInputConnectionEventListener.h b/inc/FUiIInputConnectionEventListener.h new file mode 100644 index 0000000..f2405d1 --- /dev/null +++ b/inc/FUiIInputConnectionEventListener.h @@ -0,0 +1,186 @@ +// +// 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 FUiIInputConnectionEventListener.h + * @brief This is the header file for the %IInputConnectionEventListener interface. + * + * This header file contains the declarations of the %IInputConnectionEventListener interface. + * + * + */ + +#ifndef _FUI_IINPUT_CONNECTION_EVENT_LISTENER_H_ +#define _FUI_IINPUT_CONNECTION_EVENT_LISTENER_H_ + +#include +#include +#include + +namespace Tizen { namespace Base { + class String; +}} // Tizen::Base + +namespace Tizen { namespace Graphics { + class Rectangle; +}} // Tizen::Graphics + + +namespace Tizen { namespace Ui { + +class InputConnection; + +/** + * @interface IInputConnectionEventListener + * @brief This interface defines methods for processing between the %InputConnection and the input method. + * + * @since 2.0 + * + * 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. @n + * This way, the destructors of the derived classes are called when the destructor of this interface is called. + * + * @since 2.0 + */ + virtual ~IInputConnectionEventListener(void) {} + + /** + * Called when the show state of the InputPanel is changed. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] showState The state + */ + virtual void OnInputConnectionPanelShowStateChanged(Tizen::Ui::InputConnection& source, Tizen::Ui::InputPanelShowState showState) = 0; + + /** + * Called when the language of the InputPanel is changed. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] language The language code + */ + virtual void OnInputConnectionPanelLanguageChanged(Tizen::Ui::InputConnection& source, Tizen::Locales::LanguageCode language) = 0; + + /** + * Called when the size of the InputPanel is changed. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] bounds The size + */ + virtual void OnInputConnectionPanelBoundsChanged(Tizen::Ui::InputConnection& source, const Tizen::Graphics::Rectangle& bounds) = 0; + + /** + * Called when the show state of the Text-Prediction is changed. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] isShown The state + */ + virtual void OnInputConnectionTextPredictionShowStateChanged(Tizen::Ui::InputConnection& source, bool isShown) = 0; + + /** + * Called when the size of the Text-Prediction is changed. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] bounds The size + */ + virtual void OnInputConnectionTextPredictionBoundsChanged(Tizen::Ui::InputConnection& source, const Tizen::Graphics::Rectangle& bounds) = 0; + + /** + * Called when the key of the InputPanel is selected. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] committedText The committed text + */ + virtual void OnInputConnectionTextCommitted(Tizen::Ui::InputConnection& source, const Tizen::Base::String& committedText) = 0; + + /** + * Called when the key of the InputPanel is selected during the composing. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] composingText The composing text + * @param[in] cursorPosition The current cursor position + */ + virtual void OnInputConnectionComposingTextChanged(Tizen::Ui::InputConnection& source, const Tizen::Base::String& composingText, int cursorPosition) = 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 IInputConnectionEventListener_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 IInputConnectionEventListener_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 IInputConnectionEventListener_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 IInputConnectionEventListener_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 IInputConnectionEventListener_Reserved5(void) {} +}; // IInputConnectionEventListener + +}} // Tizen::Ui +#endif // _FUI_IINPUT_CONNECTION_EVENT_LISTENER_H_ diff --git a/inc/FUiIInputConnectionEventListenerF.h b/inc/FUiIInputConnectionEventListenerF.h new file mode 100644 index 0000000..9a67f6f --- /dev/null +++ b/inc/FUiIInputConnectionEventListenerF.h @@ -0,0 +1,187 @@ +// +// 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 FUiIInputConnectionEventListenerF.h + * @brief This is the header file for the %IInputConnectionEventListenerF interface. + * + * This header file contains the declarations of the %IInputConnectionEventListenerF interface. + * + * + */ + +#ifndef _FUI_IINPUT_CONNECTION_EVENT_LISTENER_F_H_ +#define _FUI_IINPUT_CONNECTION_EVENT_LISTENER_F_H_ + +#include +#include +#include + +namespace Tizen { namespace Base { + class String; +}} // Tizen::Base + +namespace Tizen { namespace Graphics { + class FloatRectangle; +}} // Tizen::Graphics + + +namespace Tizen { namespace Ui { + +class InputConnection; + +/** + * @interface IInputConnectionEventListenerF + * @brief This interface defines methods for processing between the %InputConnection and the input method. + * + * @since 2.1 + * + * 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. @n + * This way, the destructors of the derived classes are called when the destructor of this interface is called. + * + * @since 2.1 + */ + virtual ~IInputConnectionEventListenerF(void) {} + + /** + * Called when the show state of the InputPanel is changed. + * + * @since 2.1 + * + * @param[in] source The source of the event + * @param[in] showState The state + */ + virtual void OnInputConnectionPanelShowStateChanged(Tizen::Ui::InputConnection& source, Tizen::Ui::InputPanelShowState showState) = 0; + + /** + * Called when the language of the InputPanel is changed. + * + * @since 2.1 + * + * @param[in] source The source of the event + * @param[in] language The language code + */ + virtual void OnInputConnectionPanelLanguageChanged(Tizen::Ui::InputConnection& source, Tizen::Locales::LanguageCode language) = 0; + + /** + * Called when the size of the InputPanel is changed. + * + * @since 2.1 + * + * @param[in] source The source of the event + * @param[in] bounds The size + */ + virtual void OnInputConnectionPanelBoundsChanged(Tizen::Ui::InputConnection& source, const Tizen::Graphics::FloatRectangle& bounds) = 0; + + /** + * Called when the show state of the Text-Prediction is changed. + * + * @since 2.1 + * + * @param[in] source The source of the event + * @param[in] isShown The state + */ + virtual void OnInputConnectionTextPredictionShowStateChanged(Tizen::Ui::InputConnection& source, bool isShown) = 0; + + /** + * Called when the size of the Text-Prediction is changed. + * + * @since 2.1 + * + * @param[in] source The source of the event + * @param[in] bounds The size + */ + virtual void OnInputConnectionTextPredictionBoundsChanged(Tizen::Ui::InputConnection& source, const Tizen::Graphics::FloatRectangle& bounds) = 0; + + /** + * Called when the key of the InputPanel is selected. + * + * @since 2.1 + * + * @param[in] source The source of the event + * @param[in] committedText The committed text + */ + virtual void OnInputConnectionTextCommitted(Tizen::Ui::InputConnection& source, const Tizen::Base::String& committedText) = 0; + + /** + * Called when the key of the InputPanel is selected during the composing. + * + * @since 2.1 + * + * @param[in] source The source of the event + * @param[in] composingText The composing text + * @param[in] cursorPosition The current cursor position + */ + virtual void OnInputConnectionComposingTextChanged(Tizen::Ui::InputConnection& source, const Tizen::Base::String& composingText, int cursorPosition) = 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 IInputConnectionEventListenerF_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 IInputConnectionEventListenerF_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 IInputConnectionEventListenerF_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 IInputConnectionEventListenerF_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 IInputConnectionEventListenerF_Reserved5(void) {} +}; // IInputConnectionEventListenerF + +}} // Tizen::Ui +#endif // _FUI_IINPUT_CONNECTION_EVENT_LISTENER_F_H_ + diff --git a/inc/FUiIInputConnectionProvider.h b/inc/FUiIInputConnectionProvider.h new file mode 100644 index 0000000..679f44c --- /dev/null +++ b/inc/FUiIInputConnectionProvider.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 FUiIInputConnectionProvider.h + * @brief This is the header file for the %IInputConnectionProvider interface. + * + * This header file contains the declarations of the %IInputConnectionProvider interface. + * + * + */ + +#ifndef _FUI_IINPUT_CONNECTION_PROVIDER_H_ +#define _FUI_IINPUT_CONNECTION_PROVIDER_H_ + +#include + +namespace Tizen { namespace Base { + class String; +}} // Tizen::Base + +namespace Tizen { namespace Ui { + +class InputConnection; + +/** + * @interface IInputConnectionProvider + * @brief This interface defines methods for processing between the %InputConnection and the input method. + * + * @since 2.0 + * + * 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. @n + * This way, the destructors of the derived classes are called when the destructor of this interface is called. + * + * @since 2.0 + */ + virtual ~IInputConnectionProvider(void) {} + + /** + * Called when the text needs to be deleted. + * + * @since 2.0 + * @param[in] source The source of the event + * @param[in] offset The position to delete before the current cursor position + * @param[in] charCount The number of characters to delete + */ + virtual void DeleteSurroundingText(Tizen::Ui::InputConnection& source, int offset, int charCount) = 0; + + /** + * Called when the input method requests the previous text. + * + * @since 2.0 + * @param[in] source The source of the event + * @param[out] text The text to send to the Input Method + * @param[out] cursorPosition The current cursor position to send to the Input Method + * @remarks The text will be used for processing the auto-capitalization/auto-period. At least three letters in front of the cursor are required. + */ + virtual void GetPreviousText(Tizen::Ui::InputConnection& source, Tizen::Base::String& text, int& cursorPosition) = 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 IInputConnectionProvider_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 IInputConnectionProvider_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 IInputConnectionProvider_Reserved3(void) {} +}; // IInputConnectionProvider + +}} // Tizen::Ui +#endif // _FUI_IINPUT_CONNECTION_PROVIDER_H_ + diff --git a/inc/FUiIItemEventListener.h b/inc/FUiIItemEventListener.h new file mode 100644 index 0000000..01a8d96 --- /dev/null +++ b/inc/FUiIItemEventListener.h @@ -0,0 +1,105 @@ +// +// 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 FUiIItemEventListener.h + * @brief This is the header file for the %IItemEventListener interface. + * + * This header file contains the declarations of the %IItemEventListener interface. @n + * If an item event is generated, a method of this interface is called. @n + * So, if an application performs tasks related to the item event, use the methods of this interface. + * + */ +#ifndef _FUI_IITEM_EVENT_LISTENER_H_ +#define _FUI_IITEM_EVENT_LISTENER_H_ + +#include + +namespace Tizen { namespace Ui +{ +class Control; +} } + +namespace Tizen {namespace Ui +{ +/** + * @if OSPDEPREC + * @enum ItemStatus + * + * Defines the constants used to identify the item state. + * + * @brief [Deprecated] + * @deprecated This enum is deprecated. Instead of using this enum, use the ListItemStatus enumeration. + * @since 2.0 + * @endif + */ +enum ItemStatus +{ + ITEM_CHECKED = 0, /**< @if OSPDEPREC The item has been checked (toggle of the check area) @endif */ + ITEM_UNCHECKED, /**< @if OSPDEPREC The item has been unchecked (toggle of the check area) @endif */ + ITEM_SELECTED, /**< @if OSPDEPREC The item has been selected (non-check area of the item) @endif */ + ITEM_HIGHLIGHTED /**< @if OSPDEPREC The item has been highlighted (non-check area of the item) @b Since: @b 1.1 @endif */ +}; + +/** + * @if OSPDEPREC + * @interface IItemEventListener + * @brief [Deprecated] This interface implements the listener for the item event. + * @deprecated This interface is deprecated. Instead of using this interface, use the IListViewItemEventListener interface. + * @since 2.0 + * + * The %IItemEventListener interface is the listener interface for receiving item events. The class that processes an item event + * implements this interface, and the instance created with that class is registered with a UI control, using the control's + * AddItemEventListener() method. When the item event occurs, the OnItemStateChanged() method of that instance is invoked. + * @endif + */ +class _OSP_EXPORT_ IItemEventListener + : public Tizen::Base::Runtime::IEventListener +{ +// Operation +public: + /** + * @if OSPDEPREC + * This is the destructor for this class. + * + * @brief [Deprecated] + * @deprecated This interface is deprecated. Instead of using this interface, use the IListViewItemEventListener interface. + * @since 2.0 + * @endif + */ + virtual ~IItemEventListener(void) {} + + /** + * @if OSPDEPREC + * Called when an item event occurs. + * + * @brief [Deprecated] + * @deprecated This interface is deprecated. Instead of using this interface, use the IListViewItemEventListener interface. + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] index The index of the item + * @param[in] itemId The item ID + * @param[in] status The item status + * @endif + */ + virtual void OnItemStateChanged(const Tizen::Ui::Control& source, int index, int itemId, Tizen::Ui::ItemStatus status) = 0; +}; //IItemEventListener + +}} // Tizen::Ui + +#endif // _FUI_IITEM_EVENT_LISTENER_H_ diff --git a/inc/FUiIKeyEventListener.h b/inc/FUiIKeyEventListener.h new file mode 100644 index 0000000..642ece4 --- /dev/null +++ b/inc/FUiIKeyEventListener.h @@ -0,0 +1,125 @@ +// +// 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 FUiIKeyEventListener.h + * @brief This is the header file for the %IKeyEventListener interface. + * + * This header file contains the declarations of the %IKeyEventListener interface. @n + * If a key event is generated, a method of this interface is called. @n + * If an application performs tasks related to the key event, use the methods of this interface. + */ +#ifndef _FUI_IKEY_EVENT_LISTENER_H_ +#define _FUI_IKEY_EVENT_LISTENER_H_ + +#include +#include +#include + +namespace Tizen {namespace Ui +{ +class Control; + +/** + * @interface IKeyEventListener + * @brief This interface implements the listener for the key event. + * + * @since 2.0 + * + * @remarks Use the ITextEventListener interface to listen to key events related to the virtual keypad used with EditField and EditArea. + * + * The %IKeyEventListener interface is the listener interface for receiving key events, which are fired when hardware keyboard keys are pressed or + * released. The class that processes a key event implements this interface, and the instance created with that class is + * registered with a UI control, using the Control::AddKeyEventListener() method. When the key event occurs, a method of that + * instance is invoked. + * + * For more information on the class features, see Event Listeners. + * + * + */ +class _OSP_EXPORT_ IKeyEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +// Operation +public: + // + // This method is for internal use only. + // Using this method can cause behavioral, security-related, and consistency-related issues in the application. + // + // This is the destructor for this class. + // + // @since 2.0 + // + virtual ~IKeyEventListener(void) {} + + + /** + * Called when a key is pressed. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] keyCode The key code + */ + virtual void OnKeyPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode) = 0; + + + /** + * Called when a key is released. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] keyCode The key code + */ + virtual void OnKeyReleased(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode) = 0; + + + /** + * Called when a key is pressed and held down for some time. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] keyCode The key code + * @remarks The key long pressed event is fired after the key pressed event is initially generated. + */ + virtual void OnKeyLongPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode) = 0; + +protected: + // Reserved virtual methods for later extension + // + // The following methods are reserved and may change its name at any time without prior notice. + // + virtual void IKeyEventListener_Reserved1(void) {} + + // Reserved virtual methods for later extension + // + // The following methods are reserved and may change its name at any time without prior notice. + // + virtual void IKeyEventListener_Reserved2(void) {} + + // Reserved virtual methods for later extension + // + // The following methods are reserved and may change its name at any time without prior notice. + // + virtual void IKeyEventListener_Reserved3(void) {} + +}; // IKeyEventListener + +} } // Tizen::Ui + +#endif //_FUI_IKEY_EVENT_LISTENER_H_ diff --git a/inc/FUiIKeypadEventListener.h b/inc/FUiIKeypadEventListener.h new file mode 100644 index 0000000..bfbf05f --- /dev/null +++ b/inc/FUiIKeypadEventListener.h @@ -0,0 +1,182 @@ +// +// 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 FUiIKeypadEventListener.h + * @brief This is the header file for the %IKeypadEventListener interface. + * + * This header file contains the declarations of the %IKeypadEventListener interface. + */ +#ifndef _FUI_IKEYPAD_EVENT_LISTENER_H_ +#define _FUI_IKEYPAD_EVENT_LISTENER_H_ + +// Includes +#include +#include + +namespace Tizen { namespace Graphics +{ +class Dimension; +}} // Tizen::Graphics + +// Namespace declaration +namespace Tizen { namespace Ui +{ + +class Control; + +/** + * @enum KeypadAction + * + * Defines the possible keypad action types. + * + * @since 2.0 + */ +enum KeypadAction +{ + KEYPAD_ACTION_ENTER, /**< The Enter key */ + KEYPAD_ACTION_GO, /**< The Go key */ + KEYPAD_ACTION_NEXT, /**< The Next key */ + KEYPAD_ACTION_SEND, /**< The Send key */ + KEYPAD_ACTION_SEARCH, /**< The Search key */ + KEYPAD_ACTION_LOGIN, /**< The Login key */ + KEYPAD_ACTION_SIGN_IN, /**< The Sign-In key */ + KEYPAD_ACTION_JOIN, /**< The Join key */ + KEYPAD_ACTION_DONE /**< The Done key */ +}; + +/** + * @interface IKeypadEventListener + * @brief This interface implements the listener for the keypad events. + * + * @since 2.0 + * + * The %IKeypadEventListener interface is the listener interface for receiving software keypad events. + * 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. + * + * For more information on the class features, see EditArea and EditField, SearchBar and ExpandableEditArea. + + */ +class _OSP_EXPORT_ IKeypadEventListener + : public Tizen::Base::Runtime::IEventListener +{ +// Lifecycle +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. + * + * @since 2.0 + */ + virtual ~IKeypadEventListener(void) {} + + +// Operation +public: + /** + * Called when the keypad is about to be shown on the screen. + * + * @since 2.0 + * + * @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 Controls::Form::GetClientAreaBounds() + */ + virtual void OnKeypadWillOpen(Tizen::Ui::Control& source) = 0; + + /** + * Called when the keypad is shown on the screen. + * + * @since 2.0 + * + * @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 Controls::Form::GetClientAreaBounds() + */ + virtual void OnKeypadOpened(Tizen::Ui::Control& source) = 0; + + /** + * Called when the keypad is hidden from the screen. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @see Controls::Form::GetClientAreaBounds() + */ + virtual void OnKeypadClosed(Tizen::Ui::Control& source) = 0; + + /** + * Called when the keypad action button is pressed. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] keypadAction The keypad action + * @see KeypadAction + */ + virtual void OnKeypadActionPerformed(Tizen::Ui::Control& source, Tizen::Ui::KeypadAction keypadAction) = 0; + + /** + * Called when the keypad bounds are changed, for instance when the predictive text window which is located in the upper side of the keypad is shown. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @see Controls::Form::GetClientAreaBounds() + */ + virtual void OnKeypadBoundsChanged(Tizen::Ui::Control& source) {}; + +// Reserves +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 IKeypadEventListener_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 IKeypadEventListener_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 IKeypadEventListener_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 IKeypadEventListener_Reserved4(void) { } +}; // IKeypadEventListener +}} // Tizen::Ui + +#endif // _FUI_IKEYPAD_EVENT_LISTENER_H_ diff --git a/inc/FUiILanguageEventListener.h b/inc/FUiILanguageEventListener.h new file mode 100644 index 0000000..7f9c83d --- /dev/null +++ b/inc/FUiILanguageEventListener.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 FUiILanguageEventListener.h + * @brief This is the header file for the %ILanguageEventListener interface. + * + * This header file contains the declarations of the %ILanguageEventListener interface. + */ + +#ifndef _FUI_ILANGUAGE_EVENT_LISTENER_H_ +#define _FUI_ILANGUAGE_EVENT_LISTENER_H_ + +#include +#include + +namespace Tizen {namespace Ui +{ + +class Control; + +/** + * @interface ILanguageEventListener + * @brief This interface implements the listener for the language event. + * + * @since 2.0 + * + * The %ILanguageEventListener interface receives language events. The class that processes a language event + * implements this interface, and the instance created with that class is registered with a UI control, using the control's + * AddLanguageEventListener() method. + * + * When the current input language is changed (for example, when the user toggles the input language from the virtual + * keypad), the listener's OnLanguageChanged() method is invoked. + */ + +class _OSP_EXPORT_ ILanguageEventListener + : public Tizen::Base::Runtime::IEventListener +{ + +// Operation + +public: + /** + * This is the default constructor for this class. + * + * @since 2.0 + */ + ILanguageEventListener(void) {}; + + /** + * 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 ~ILanguageEventListener(void) {} + + /** + * Called when the input language is changed. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] oldLanguage The previous 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; + +// Reserves +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 ILanguageEventListener_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 ILanguageEventListener_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 ILanguageEventListener_Reserved3(void) { } +}; // ILanguageEventListener + +}} // Tizen::Ui + +#endif diff --git a/inc/FUiIOrientationEventListener.h b/inc/FUiIOrientationEventListener.h new file mode 100644 index 0000000..4a90572 --- /dev/null +++ b/inc/FUiIOrientationEventListener.h @@ -0,0 +1,137 @@ +// +// 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 FUiIOrientationEventListener.h + * @brief This is the header file for the %IOrientationEventListener interface. + * + * This header file contains the declarations of the %IOrientationEventListener interface. @n + * If an orientation event is generated, a method of this interface is called. @n + * So, if an application performs tasks related to the orientation event, use the methods of this interface. + * + */ + +#ifndef _FUI_IORIENTATION_EVENT_LISTENER_H_ +#define _FUI_IORIENTATION_EVENT_LISTENER_H_ + +#include + +namespace Tizen { namespace Ui +{ +class Control; + +/** + * @enum Orientation + * + * Defines the constants used to identify the orientations that a control supports. + * + * @since 2.0 + */ +enum Orientation +{ + ORIENTATION_NONE, /**< The control has no orientation style */ + ORIENTATION_PORTRAIT, /**< The control has vertical orientation style */ + ORIENTATION_LANDSCAPE, /**< The control has horizontal orientation style */ + ORIENTATION_PORTRAIT_REVERSE, /**< The control has vertical upside-down orientation style */ + ORIENTATION_LANDSCAPE_REVERSE, /**< The control has horizontal reverse orientation style */ + ORIENTATION_AUTOMATIC = 6, /**< The control has vertical, horizontal, and horizontal reverse orientation styles */ + ORIENTATION_AUTOMATIC_FOUR_DIRECTION = 8, /**< The control has four-directional orientation style */ +}; + +/** + * @enum OrientationStatus + * + * Defines the constants used to identify the current orientation of a control. + * + * @since 2.0 + */ +enum OrientationStatus +{ + ORIENTATION_STATUS_NONE = 0, /**< The control orientation status is not determined @if OSPCOMPAT @b Since: @b 2.0 @endif */ + ORIENTATION_STATUS_PORTRAIT = ORIENTATION_PORTRAIT, /**< The control is set to vertical orientation */ + ORIENTATION_STATUS_LANDSCAPE = ORIENTATION_LANDSCAPE, /**< The control is set to horizontal orientation */ + ORIENTATION_STATUS_PORTRAIT_REVERSE = ORIENTATION_PORTRAIT_REVERSE, /**< The control is set to vertical upside-down orientation */ + ORIENTATION_STATUS_LANDSCAPE_REVERSE = ORIENTATION_LANDSCAPE_REVERSE, /**< The control is set to horizontal reverse orientation */ +}; + +/** + * @interface IOrientationEventListener + * @brief This interface implements the listener for orientation events. + * + * @since 2.0 + * + * The %IOrientationEventListener interface is the listener interface for receiving orientation events. + * 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. + * + * For more information on the class features, see Form. + */ +class _OSP_EXPORT_ IOrientationEventListener + : public Tizen::Base::Runtime::IEventListener +{ +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. + * + * @since 2.0 + */ + virtual ~IOrientationEventListener(void) {} + + /** + * Called when an orientation event occurs. + * + * @since 2.0 + * + * @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 Controls::Frame + * @see Controls::Form + */ + virtual void OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus) = 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 IOrientationEventListener_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 IOrientationEventListener_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 IOrientationEventListener_Reserved3(void) {} +}; // IOrientationEventListener + +}} // Tizen::Ui + +#endif // _FUI_IORIENTATION_EVENT_LISTENER_H_ diff --git a/inc/FUiIPropagatedKeyEventListener.h b/inc/FUiIPropagatedKeyEventListener.h new file mode 100644 index 0000000..bb6e6f6 --- /dev/null +++ b/inc/FUiIPropagatedKeyEventListener.h @@ -0,0 +1,153 @@ +// +// 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 FUiIPropagatedKeyEventListener.h + * @brief This is the header file for the %IPropagatedKeyEventListener interface. + * + * This header file contains the declarations of the %IPropagatedKeyEventListener interface. + */ + +#ifndef _FUI_IPROPAGATED_KEY_EVENT_LISTENER_H_ +#define _FUI_IPROPAGATED_KEY_EVENT_LISTENER_H_ + +namespace Tizen { namespace Ui +{ + +class Control; +class KeyEventInfo; + +/** + * @interface IPropagatedKeyEventListener + * @brief This interface is used as an argument for the propagated key event listener. + * + * @since 2.1 + * + * The %IPropagatedKeyEventListener interface is the listener interface for receiving propagated key events. + * The class that processes a propagated key event implements this interface, and the instance created with that class is registered with a + * UI control, using the Control::SetPropagatedKeyEventListener() method. When the key event occurs, a method of that instance that is derived from %IPropagatedKeyEventListener is + * invoked. + * The propagated key event listeners work according to the event previewing and bubbling concept. @n + * When a key event occurs, as a previewing notification it is routed from the top-most Window, which is usually a Frame, + * to a control which is the parent of the control where the event occurs. Then, as a bubbling notification it is routed from + * the control to the top-most Window. + * 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. + * + * For more information on the class features, see Event Listeners. + */ +class _OSP_EXPORT_ IPropagatedKeyEventListener +{ +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. + * + * @since 2.1 + */ + virtual ~IPropagatedKeyEventListener(void){} + + /** + * Called during the bubbling step when a key is pressed. + * + * @since 2.1 + * + * @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; + + /** + * Called during the bubbling step when a key is released. + * + * @since 2.1 + * + * @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 OnKeyReleased(Control& source, const KeyEventInfo& keyEventInfo) = 0; + + /** + * Called during the previewing step when a key is pressed. + * + * @since 2.1 + * + * @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 OnPreviewKeyPressed(Control& source, const KeyEventInfo& keyEventInfo) = 0; + + /** + * Called during the previewing step when a key is released. + * + * @since 2.1 + * + * @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 OnPreviewKeyReleased(Control& source, const KeyEventInfo& keyEventInfo) = 0; + + /** + * Called before the OnPreviewKeyPressed() or OnPreviewKeyReleased() method is called, allowing the application to modify the KeyEventInfo instance. @n + * Before previewing and bubbling paths, the %TranslateKeyEventInfo() method is called once. + * + * @since 2.1 + * + * @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 + */ + virtual bool TranslateKeyEventInfo(Control& source, KeyEventInfo& keyEventInfo) { return false; } + +protected: + // Reserved virtual methods for later extension + // + // The following methods are reserved and may change its name at any time without prior notice. + // + virtual void IPropagatedKeyEventListener_Reserved1(void) {} + + // Reserved virtual methods for later extension + // + // The following methods are reserved and may change its name at any time without prior notice. + // + virtual void IPropagatedKeyEventListener_Reserved2(void) {} + + // Reserved virtual methods for later extension + // + // The following methods are reserved and may change its name at any time without prior notice. + // + virtual void IPropagatedKeyEventListener_Reserved3(void) {} + + // Reserved virtual methods for later extension + // + // The following methods are reserved and may change its name at any time without prior notice. + // + virtual void IPropagatedKeyEventListener_Reserved4(void) {} + + // Reserved virtual methods for later extension + // + // The following methods are reserved and may change its name at any time without prior notice. + // + virtual void IPropagatedKeyEventListener_Reserved5(void) {} +}; //IPropagatedKeyEventListener + +}} // Tizen::Ui +#endif // _FUI_IPROPAGATED_KEY_EVENT_LISTENER_H_ diff --git a/inc/FUiIPropagatedTouchEventListener.h b/inc/FUiIPropagatedTouchEventListener.h new file mode 100644 index 0000000..05488a0 --- /dev/null +++ b/inc/FUiIPropagatedTouchEventListener.h @@ -0,0 +1,174 @@ +// +// 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 FUiIPropagatedTouchEventListener.h + * @brief This is the header file for the %IPropagatedTouchEventListener interface. + * + * This header file contains the declarations of the %IPropagatedTouchEventListener interface. + */ + +#ifndef _FUI_IPROPAGATED_TOUCH_EVENT_LISTENER_H_ +#define _FUI_IPROPAGATED_TOUCH_EVENT_LISTENER_H_ + +namespace Tizen { namespace Ui { + +class Control; +class TouchEventInfo; + +/** + * @interface IPropagatedTouchEventListener + * @brief This interface is used as an argument for the propagated touch event listener. + * + * @since 2.1 + * + * The %IPropagatedTouchEventListener interface is the listener interface for receiving propagated touch events. @n + * The class that processes a propagated touch event implements this interface, and the instance created with that class is registered with a + * UI control, using the Control::SetPropagatedTouchEventListener() method. When the touch event occurs, a method of that instance which is derived from %IPropagatedTouchEventListener is + * invoked. + * The propagated touch event listeners work according to the event previewing and bubbling concept. @n + * When a touch event occurs, as a previewing notification it is routed from the top-most Window, which is usually a Frame, + * to a control which is the parent of the control where the event occurs. Then, as a bubbling notification it is routed from + * the control to the top-most Window. + * 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. + * + * For more information on the class features, see Event Listeners. + */ +class _OSP_EXPORT_ IPropagatedTouchEventListener +{ +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. + * + * @since 2.1 + */ + virtual ~IPropagatedTouchEventListener(void){} + + /** + * Called during the bubbling step when a touch is pressed. + * + * @since 2.1 + * + * @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 OnTouchPressed(Control& source, const TouchEventInfo& touchEventInfo) = 0; + + /** + * Called during the bubbling step when a touch is released. + * + * @since 2.1 + * + * @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 OnTouchReleased(Control& source, const TouchEventInfo& touchEventInfo) = 0; + + /** + * Called during the bubbling step when a touch is moved. + * + * @since 2.1 + * + * @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 cancelled. + * + * @since 2.1 + * + * @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 OnTouchCanceled(Control& source, const TouchEventInfo& touchEventInfo) = 0; + + /** + * Called during the previewing step when a touch is pressed. + * + * @since 2.1 + * + * @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 OnPreviewTouchPressed(Control& source, const TouchEventInfo& touchEventInfo) = 0; + + + /** + * Called during the previewing step when a touch is released. + * + * @since 2.1 + * + * @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 OnPreviewTouchReleased(Control& source, const TouchEventInfo& touchEventInfo) = 0; + + /** + * Called during the previewing step when a touch is moved. + * + * @since 2.1 + * + * @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 OnPreviewTouchMoved(Control& source, const TouchEventInfo& touchEventInfo) = 0; + +protected: + // Reserved virtual methods for later extension + // + // The following methods are reserved and may change its name at any time without prior notice. + // + virtual void IPropagatedTouchEventListener_Reserved1(void) {} + + // Reserved virtual methods for later extension + // + // The following methods are reserved and may change its name at any time without prior notice. + // + virtual void IPropagatedTouchEventListener_Reserved2(void) {} + + // Reserved virtual methods for later extension + // + // The following methods are reserved and may change its name at any time without prior notice. + // + virtual void IPropagatedTouchEventListener_Reserved3(void) {} + + // Reserved virtual methods for later extension + // + // The following methods are reserved and may change its name at any time without prior notice. + // + virtual void IPropagatedTouchEventListener_Reserved4(void) {} + + // Reserved virtual methods for later extension + // + // The following methods are reserved and may change its name at any time without prior notice. + // + virtual void IPropagatedTouchEventListener_Reserved5(void) {} +}; // IPropagatedTouchEventListener + +}} // Tizen::Ui +#endif // _FUI_IPROPAGATED_TOUCH_EVENT_LISTENER_H_ diff --git a/inc/FUiIScrollPanelEventListener.h b/inc/FUiIScrollPanelEventListener.h new file mode 100644 index 0000000..eb35595 --- /dev/null +++ b/inc/FUiIScrollPanelEventListener.h @@ -0,0 +1,146 @@ +// +// 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 FUiIScrollPanelEventListener.h + * @brief This is the header file for the %IScrollPanelEventListener interface. + * + * This header file contains the declarations of the %IScrollPanelEventListener interface. @n + * If a change event is generated, a method of this interface is called. @n + * Applications that do jobs related to change events call the methods of this interface. + * + */ +#ifndef _FUI_ISCROLL_PANEL_EVENT_LISTENER_H_ +#define _FUI_ISCROLL_PANEL_EVENT_LISTENER_H_ + +// Includes +#include +#include + +namespace Tizen { namespace Ui +{ +class Control; +}} // Tizen::Ui + +namespace Tizen {namespace Ui +{ + +/** + * @interface IScrollPanelEventListener + * @brief This interface implements a listener for ScrollPanel events. + * + * @since 2.0 + * + * The %IScrollPanelEventListener interface is the listener interface for receiving change events related to controls (especially an overlay keypad) within + * 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. + * + * For more information on the class features, see Panels and Using EditArea or EditField Overlay Keypad with ScrollPanel. + + */ +class _OSP_EXPORT_ IScrollPanelEventListener + : public Tizen::Base::Runtime::IEventListener +{ +// Operation +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. + * + * @since 2.0 + */ + virtual ~IScrollPanelEventListener(void) {} + + /** + * Called when an overlay keypad is created on the ScrollPanel control. + * + * @since 2.0 + * + * @param[in] source The source of the event + */ + virtual void OnOverlayControlCreated(const Tizen::Ui::Control& source) = 0; + + /** + * Called when an overlay keypad is opened on the ScrollPanel control. + * + * @since 2.0 + * + * @param[in] source The source of the event + */ + virtual void OnOverlayControlOpened(const Tizen::Ui::Control& source) = 0; + + /** + * Called when an overlay keypad is closed on the ScrollPanel control. + * + * @since 2.0 + * + * @param[in] source The source of the event + */ + virtual void OnOverlayControlClosed(const Tizen::Ui::Control& source) = 0; + + /** + * Called when a control is selected on the ScrollPanel control . + * + * @since 2.0 + * + * @param[in] source The source of the event + */ + virtual void OnOtherControlSelected(const Tizen::Ui::Control& source) = 0; + + // Reserves +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. + // + // @since 2.0 + // + virtual void IScrollPanelEventListener_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. + // + // @since 2.0 + // + virtual void IScrollPanelEventListener_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. + // + // @since 2.0 + // + virtual void IScrollPanelEventListener_Reserved3(void) { } + +}; // IScrollPanelEventListener + + +}} // Tizen::Ui + +#endif // _FUI_ISCROLL_PANEL_EVENT_LISTENER_H_ diff --git a/inc/FUiISlidableGroupedListEventListener.h b/inc/FUiISlidableGroupedListEventListener.h new file mode 100644 index 0000000..49b50e0 --- /dev/null +++ b/inc/FUiISlidableGroupedListEventListener.h @@ -0,0 +1,131 @@ +// +// 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 FUiISlidableGroupedListEventListener.h + * @brief This is the header file for the %ISlidableGroupedListEventListener interface. + * + * This header file contains the declarations of the %ISlidableGroupedListEventListener interface. @n + * If an event is generated, a method of this interface is called. @n + * So, if an application performs tasks related to item events, it uses the methods of this interface. + * + */ +#ifndef _FUI_ISLIDABLE_GROUPED_LIST_EVENT_LISTENER_H_ +#define _FUI_ISLIDABLE_GROUPED_LIST_EVENT_LISTENER_H_ + +#include + +namespace Tizen { namespace Ui +{ +class Control; +} } + +namespace Tizen {namespace Ui +{ + +/** +* @if OSPDEPREC + * @interface ISlidableGroupedListEventListener + * @brief [Deprecated] This interface implements the listener for events on SlidableGroupedList. + * @deprecated This interface is deprecated. Instead of using this interface, use the IGroupedListViewItemEventListener interface. + * @since 2.0 + * + * The %ISlidableGroupedListEventListener interface implements a listener for receiving scroll events on SlidableGroupedList. @n + * The role of this interface is similar to ISlidableListEventListener. + * This interface is registered with a %SlidableGroupedList, using the SlidableGroupedList::AddSlidableGroupedListEventListener() method. + * @endif + */ +class _OSP_EXPORT_ ISlidableGroupedListEventListener + : public Tizen::Base::Runtime::IEventListener +{ +// Operation +public: + /** + * @if OSPDEPREC + * This is the destructor for this class. + * + * @brief [Deprecated] This interface implements the listener for events on SlidableGroupedList. + * @deprecated This interface is deprecated. Instead of using this interface, use the IGroupedListViewItemEventListener interface. + * @since 2.0 + * @endif + */ + virtual ~ISlidableGroupedListEventListener(void) {} + + /** + * @if OSPDEPREC + * Called when the SlidableGroupedList is about to be drawn and requests the listener to set the properties of the list such as the total height and the + * number of items in each group. + * + * @brief [Deprecated] This interface implements the listener for events on SlidableGroupedList. + * @deprecated This interface is deprecated. Instead of using this interface, use the IGroupedListViewItemEventListener interface. + * @since 2.0 + * @param[in] source The source of the event + * @endif + */ + virtual void OnListPropertyRequested(const Tizen::Ui::Control& source) = 0; + + /** + * @if OSPDEPREC + * Called when the items need to be loaded to the top. + * + * @brief [Deprecated] This interface implements the listener for events on SlidableGroupedList. + * @deprecated This interface is deprecated. Instead of using this interface, use the IGroupedListViewItemEventListener interface. + * @since 2.0 + * @param[in] source The source of the event + * @param[in] groupIndex The index of the list group + * @param[in] itemIndex The index of the list item in the specified group + * @param[in] numItems The number of items + * @endif + */ + virtual void OnLoadToTopRequested(const Tizen::Ui::Control& source, int groupIndex, int itemIndex, int numItems) = 0; + + /** + * @if OSPDEPREC + * Called when the items need to be loaded to the bottom. + * + * @brief [Deprecated] This interface implements the listener for events on SlidableGroupedList. + * @deprecated This interface is deprecated. Instead of using this interface, use the IGroupedListViewItemEventListener interface. + * @since 2.0 + * @param[in] source The source of the event + * @param[in] groupIndex The index of the list group + * @param[in] itemIndex The index of the list item in the specified group + * @param[in] numItems The number of items + * @endif + */ + virtual void OnLoadToBottomRequested(const Tizen::Ui::Control& source, int groupIndex, int itemIndex, int numItems) = 0; + + /** + * @if OSPDEPREC + * 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. + * @deprecated This interface is deprecated. Instead of using this interface, use the IGroupedListViewItemEventListener interface. + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] groupIndex The index of the list group + * @param[in] itemIndex The index of the list item in the specified group + * @endif + */ + virtual void OnUnloadItemRequested(const Tizen::Ui::Control& source, int groupIndex, int itemIndex) = 0; + +}; //ISlidableGroupedListEventListener + +}} //Tizen::Ui + +#endif // _FUI_ISLIDABLE_GROUPED_LIST_EVENT_LISTENER_H_ diff --git a/inc/FUiISlidableListEventListener.h b/inc/FUiISlidableListEventListener.h new file mode 100644 index 0000000..295b248 --- /dev/null +++ b/inc/FUiISlidableListEventListener.h @@ -0,0 +1,131 @@ +// +// 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 FUiISlidableListEventListener.h + * @brief This is the header file for the %ISlidableListEventListener interface. + * + * This header file contains the declarations of the %ISlidableListEventListener interface. @n + * If the event is generated, a method of this interface is called. @n + * So, if applications do jobs related to item events, use the methods of this interface. + * + */ +#ifndef _FUI_ISLIDABLE_LIST_EVENT_LISTENER_H_ +#define _FUI_ISLIDABLE_LIST_EVENT_LISTENER_H_ + +#include + +namespace Tizen { namespace Ui +{ +class Control; +} } + +namespace Tizen {namespace Ui +{ + +/** + * @if OSPDEPREC + * @interface ISlidableListEventListener + * @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. + * @endif + */ +class _OSP_EXPORT_ ISlidableListEventListener + : public Tizen::Base::Runtime::IEventListener +{ +// Operation +public: + /** + * @if OSPDEPREC + * This is the destructor for this class. + * + * @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 + * @endif + */ + virtual ~ISlidableListEventListener(void) {} + + /** + * @if OSPDEPREC + * Called when the slidable list is about to be drawn and requests to set the properties of the list such as the total height. + * + * @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 + * + * @param[in] source The source of the event + * @endif + */ + virtual void OnListPropertyRequested(const Tizen::Ui::Control& source) = 0; + + /** + * @if OSPDEPREC + * Called when the items need to be loaded to the top. + * + * @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 + * + * @param[in] source The source of the event + * @param[in] index The index of the item + * @param[in] numItems The number of items + * @endif + */ + virtual void OnLoadToTopRequested(const Tizen::Ui::Control& source, int index, int numItems) = 0; + + /** + * @if OSPDEPREC + * Called when the items need to be loaded to the bottom. + * + * @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 + * + * @param[in] source The source of the event + * @param[in] index The index of the item + * @param[in] numItems The number of items + * @endif + */ + virtual void OnLoadToBottomRequested(const Tizen::Ui::Control& source, int index, int numItems) = 0; + + /** + * @if OSPDEPREC + * 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. + * @deprecated This interface is deprecated. Instead of using this interface, use the IListViewItemEventListener interface. + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] index The index of the item + * @endif + */ + virtual void OnUnloadItemRequested(const Tizen::Ui::Control& source, int index) = 0; + +}; //ISlidableListEventListener + +}} //Tizen::Ui + +#endif // _FUI_ISLIDABLE_LIST_EVENT_LISTENER_H_ diff --git a/inc/FUiITextBlockEventListener.h b/inc/FUiITextBlockEventListener.h new file mode 100644 index 0000000..967ffea --- /dev/null +++ b/inc/FUiITextBlockEventListener.h @@ -0,0 +1,126 @@ +// +// 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 FUiITextBlockEventListener.h + * @brief This is the header file for the %ITextBlockEventListener interface. + * + * This header file contains the declarations of the %ITextBlockEventListener interface. + */ +#ifndef _FUI_ITEXT_BLOCK_EVENT_LISTENER_H_ +#define _FUI_ITEXT_BLOCK_EVENT_LISTENER_H_ + +// Includes +#include + +// Forward declaration +namespace Tizen { namespace Ui +{ +class Control; +}} // Tizen::Ui + +// Namespace declaration +namespace Tizen { namespace Ui +{ +/** + * @interface ITextBlockEventListener + * @brief This interface implements the listener for the text block events. + * + * @since 2.0 + * + * The %ITextBlockEventListener interface is the listener interface for receiving text block selection events, for example, from EditFields. + * The class that processes a text block selection event implements this interface, and the instance created with that class is + * registered with a UI control, using the control's AddTextBlockEventListener() method. When the text block selection event + * occurs, the OnTextBlockSelected() method of that instance is invoked. + * + * For more information on the class features, see EditArea and EditField. + + */ +class _OSP_EXPORT_ ITextBlockEventListener + : public Tizen::Base::Runtime::IEventListener +{ +// Lifecycle +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. + * + * @since 2.0 + */ + virtual ~ITextBlockEventListener(void) {} + + +// Operation +public: + /** + * Called when a text block is selected. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] start The start index of the selected text block + * @param[in] end The end index of the selected text block + */ + virtual void OnTextBlockSelected(Tizen::Ui::Control& source, int start, int end) = 0; + + +// Reserves +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 ITextBlockEventListener_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 ITextBlockEventListener_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 ITextBlockEventListener_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 ITextBlockEventListener_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 ITextBlockEventListener_Reserved5(void) { } +}; // ITextBlockEventListener + +}} //Tizen::Ui + +#endif // _FUI_ITEXT_BLOCK_EVENT_LISTENER_H_ diff --git a/inc/FUiITextEventListener.h b/inc/FUiITextEventListener.h new file mode 100644 index 0000000..3168b77 --- /dev/null +++ b/inc/FUiITextEventListener.h @@ -0,0 +1,122 @@ +// +// 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 FUiITextEventListener.h + * @brief This is the header file for the %ITextEventListener interface. + * + * This header file contains the declarations of the %ITextEventListener interface. @n + * If a change event is generated, a method of this interface is called. @n + * So, if the applications perform tasks related to change events, use the methods of this interface. + * + */ +#ifndef _FUI_ITEXT_EVENT_LISTENER_H_ +#define _FUI_ITEXT_EVENT_LISTENER_H_ + +// Includes +#include +#include + +namespace Tizen { namespace Ui +{ +class Control; +}} // Tizen::Ui + +namespace Tizen {namespace Ui +{ + +/** + * @interface ITextEventListener + * @brief This interface implements the listener for text events. + * + * @since 2.0 + * + * The %ITextEventListener interface is the listener interface for receiving text events, for example, from EditFields. + * The class that processes a text event implements this interface, and the instance created with that class is registered with a + * UI control, using the control's AddTextEventListener() method. When the text event occurs, the OnTextValueChanged() method of + * that instance is invoked. + * + * For more information on the class features, see EditArea and EditField, ExpandableEditArea, TextBox, and SearchBar. + + */ +class ITextEventListener + : public Tizen::Base::Runtime::IEventListener +{ +// Operation +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~ITextEventListener(void) {} + + /** + * Called when a text is changed. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @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 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 Controls::INPUT_STYLE_FULLSCREEN input + * style. + */ + virtual void OnTextValueChangeCanceled(const Tizen::Ui::Control& source) = 0; + +// Reserves +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 ITextEventListener_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 ITextEventListener_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 ITextEventListener_Reserved3(void) {} +}; // ITextEventListener + +}} // Tizen::Ui + +#endif // _FUI_ITEXT_EVENT_LISTENER_H_ diff --git a/inc/FUiITimeChangeEventListener.h b/inc/FUiITimeChangeEventListener.h new file mode 100644 index 0000000..33a8f11 --- /dev/null +++ b/inc/FUiITimeChangeEventListener.h @@ -0,0 +1,126 @@ +// +// 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 FUiITimeChangeEventListener.h + * @brief This is the header file for the %ITimeChangeEventListener interface. + * + * This header file contains the declarations of the %ITimeChangeEventListener interface. @n + * If a change event is generated, a method of this class is called. @n + * So, for tasks related to change events, use the methods of this class. + * + */ +#ifndef _FUI_ITIME_CHANGE_EVENT_LISTENER_H_ +#define _FUI_ITIME_CHANGE_EVENT_LISTENER_H_ + +// Includes +#include +#include + +namespace Tizen { namespace Ui +{ +class Control; +} } + +namespace Tizen {namespace Ui +{ + +/** + * @interface ITimeChangeEventListener + * @brief This interface implements the listener for the time change events. + * + * @since 2.0 + * + * The %ITimeChangeEventListener interface is the listener interface for receiving time change events. + * The class that processes a time change event implements this interface, and the instance created with that class is registered + * with a UI control, using the control's AddTimeChangeEventListener() method. When the time change event occurs, the + * OnTimeChanged() method of that instance is invoked. + * + * For more information on the class features, see EditDate and EditTime and DatePicker, TimePicker, and DateTimePicker. + + */ +class _OSP_EXPORT_ ITimeChangeEventListener + : public Tizen::Base::Runtime::IEventListener +{ +// Operation +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~ITimeChangeEventListener(void) {} + + /** + * Called when there is a change in time. @n + * The changed hour and minute values are passed as input parameters. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] hour The hour + * @param[in] minute The minute + */ + virtual void OnTimeChanged(const Tizen::Ui::Control& source, int hour, int minute) = 0; + + /** + * Called when a time change is cancelled. + * + * @since 2.0 + * + * @param[in] source The source of the event + */ + virtual void OnTimeChangeCanceled(const Tizen::Ui::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. + // + // The following method is reserved, and their names can be changed + // at any time without prior notice. + // + // @since 2.0 + // + virtual void ITimeChangeEventListener_Reserved1(void) {} + + // + // This method is for internal use only. + // Using this method can cause behavioral, security-related, and consistency-related issues in the application. + // + // The following method is reserved, and their names can be changed + // at any time without prior notice. + // + // @since 2.0 + // + virtual void ITimeChangeEventListener_Reserved2(void) {} + + // + // This method is for internal use only. + // Using this method can cause behavioral, security-related, and consistency-related issues in the application. + // + // The following method is reserved, and their names can be changed + // at any time without prior notice. + // + // @since 2.0 + // + virtual void ITimeChangeEventListener_Reserved3(void) {} +}; // ITimeChangeEventListener + +}} // Tizen::Ui + +#endif // _FUI_ITIME_CHANGE_EVENT_LISTENER_H_ diff --git a/inc/FUiITouchCustomGestureEventListener.h b/inc/FUiITouchCustomGestureEventListener.h new file mode 100644 index 0000000..2783b48 --- /dev/null +++ b/inc/FUiITouchCustomGestureEventListener.h @@ -0,0 +1,123 @@ +// +// 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 FUiITouchCustomGestureEventListener.h +* @brief This is the header file for the %ITouchCustomGestureEventListener interface. +* +* This header file contains the declarations of the %ITouchCustomGestureEventListener interface. +*/ + +#ifndef _FUI_ITOUCH_CUSTOM_GESTURE_EVENT_LISTENER_H_ +#define _FUI_ITOUCH_CUSTOM_GESTURE_EVENT_LISTENER_H_ + +#include + +namespace Tizen { namespace Ui +{ + +/** + * @interface ITouchCustomGestureEventListener + * @brief This interface is used as the argument to the touch custom gesture event listener. + * @since 2.0 + * + * The %ITouchCustomGestureEventListener interface is the listener interface for receiving custom gesture events. + * The class that processes a custom gesture event implements this interface, and the instance created with that class is registered with a + * gesture detector, using the TouchGestureDetector::AddGestureEventListener() method. When the custom gesture event occurs, a method of that instance is + * invoked. + * + */ +class _OSP_EXPORT_ ITouchCustomGestureEventListener + : virtual public ITouchGestureEventListener +{ +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. + * + * @since 2.0 + */ + virtual ~ITouchCustomGestureEventListener(void) {} + + /** + * Called when a custom gesture detection is started. + * + * @since 2.0 + * + * @param[in] gestureDetector The custom gesture detector instance + */ + virtual void OnCustomGestureStarted(Tizen::Ui::TouchGestureDetector& gestureDetector) = 0; + + /** + * Called when a custom gesture is detected and is in progress. + * + * @since 2.0 + * + * @param[in] gestureDetector The custom gesture detector instance + */ + virtual void OnCustomGestureChanged(Tizen::Ui::TouchGestureDetector& gestureDetector) = 0; + + /** + * Called when a custom gesture detection is finished. + * + * @since 2.0 + * + * @param[in] gestureDetector The custom gesture detector instance + */ + virtual void OnCustomGestureFinished(Tizen::Ui::TouchGestureDetector& gestureDetector) = 0; + + /** + * Called when a custom gesture detection is cancelled. + * + * @since 2.0 + * + * @param[in] gestureDetector The custom gesture detector instance + */ + virtual void OnCustomGestureCanceled(Tizen::Ui::TouchGestureDetector& gestureDetector) = 0; + +protected: + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // Following method is reserved and may change its name at any time without + // prior notice. + // + virtual void ITouchCustomGestureEventListener_Reserved1(void) {} + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // Following method is reserved and may change its name at any time without + // prior notice. + // + virtual void ITouchCustomGestureEventListener_Reserved2(void) {} + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // Following method is reserved and may change its name at any time without + // prior notice. + // + virtual void ITouchCustomGestureEventListener_Reserved3(void) {} +}; // ITouchCustomGestureEventListener + +}} // Tizen::Ui + +#endif // _FUI_ITOUCH_CUSTOM_GESTURE_EVENT_LISTENER_H_ diff --git a/inc/FUiITouchEventListener.h b/inc/FUiITouchEventListener.h new file mode 100644 index 0000000..07866dd --- /dev/null +++ b/inc/FUiITouchEventListener.h @@ -0,0 +1,194 @@ +// +// 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 FUiITouchEventListener.h +* @brief This is the header file for the %ITouchEventListener interface. +* +* This header file contains the declarations of the %ITouchEventListener interface. +*/ + +#ifndef _FUI_ITOUCH_EVENT_LISTENER_H_ +#define _FUI_ITOUCH_EVENT_LISTENER_H_ + +#include +#include +#include +#include + +namespace Tizen { namespace Ui +{ + +class Control; + +/** + * @interface ITouchEventListener + * @brief This interface is used as an argument to the touch event listener. + * + * @since 2.0 + * + * The %ITouchEventListener interface is the listener interface for receiving touch events. + * 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. + * + * For more information on the class features, see Event Listeners. + */ +class _OSP_EXPORT_ ITouchEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +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. + * + * @since 2.0 + * + */ + virtual ~ITouchEventListener(void) {} + + /** + * Called when an entity is touch pressed. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] currentPosition The current position + * @param[in] touchInfo The touch event information + */ + virtual void OnTouchPressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo & touchInfo) = 0; + + /** + * @if OSPDEPREC + * Called when an entity is touched and held for a long time. + * + * @brief [Deprecated] + * @deprecated This callback is deprecated. + * 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 + * @param[in] currentPosition The current position + * @param[in] touchInfo The touch event information + * @endif + */ + virtual void OnTouchLongPressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo) {} + + /** + * Called when an entity is touch released. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] currentPosition The current position + * @param[in] touchInfo The touch event information + */ + virtual void OnTouchReleased(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo) = 0; + + /** + * Called when an entity is touch moved. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] currentPosition The current position + * @param[in] touchInfo The touch event information + */ + virtual void OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo) = 0; + + /** + * @if OSPDEPREC + * Called when an entity is touched and double-pressed. + * + * @brief [Deprecated] + * @deprecated This callback is deprecated. + * If you want to listen to "double press" touch event, it is recommended to use the TouchTapGestureDetector class. + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] currentPosition The current position + * @param[in] touchInfo The touch event information + * @endif + */ + virtual void OnTouchDoublePressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo) {} + + /** + * Called when the user has touched down on a control, drags finger out of control's bounds, and then drags finger back in to the control's bounds. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] currentPosition The current position + * @param[in] touchInfo The touch event information + */ + virtual void OnTouchFocusIn(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo) = 0; + + /** + * Called when the user touches down on a control and drags finger out of control's bounds. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] currentPosition The current position + * @param[in] touchInfo The touch event information + */ + virtual void OnTouchFocusOut(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo) = 0; + + /** + * Called when the touch is cancelled. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] currentPosition The current position + * @param[in] touchInfo The touch event information + */ + virtual void OnTouchCanceled(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo) {} + +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 ITouchEventListener_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 ITouchEventListener_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 ITouchEventListener_Reserved3(void) {} + +}; // ITouchEventListener + +}} // Tizen::Ui + +#endif // _FUI_ITOUCH_EVENT_LISTENER_H_ diff --git a/inc/FUiITouchFlickGestureEventListener.h b/inc/FUiITouchFlickGestureEventListener.h new file mode 100644 index 0000000..3036d20 --- /dev/null +++ b/inc/FUiITouchFlickGestureEventListener.h @@ -0,0 +1,106 @@ +// +// 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 FUiITouchFlickGestureEventListener.h + * @brief This is the header file for the %ITouchFlickGestureEventListener interface. + * + * This header file contains the declarations of the %ITouchFlickGestureEventListener interface. + */ + +#ifndef _FUI_ITOUCH_FLICK_GESTURE_EVENT_LISTENER_H_ +#define _FUI_ITOUCH_FLICK_GESTURE_EVENT_LISTENER_H_ + +#include +#include + +namespace Tizen { namespace Ui +{ + +/** + * @interface ITouchFlickGestureEventListener + * @brief This interface implements the listener for the touch flick gesture events. + * @since 2.0 + * + * The %ITouchFlickGestureEventListener interface is the listener interface for receiving flick gesture events. + * The class that processes a flick gesture event implements this interface, and the instance created with that class is registered with a + * flick gesture detector, using the TouchFlickGestureDetector::AddFlickGestureEventListener() method. When the flick gesture event occurs, a method of that instance is + * invoked. + * + */ +class _OSP_EXPORT_ ITouchFlickGestureEventListener + : virtual public ITouchGestureEventListener +{ +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. + * + * @since 2.0 + */ + virtual ~ITouchFlickGestureEventListener(void) {} + + /** + * Called when a flick gesture is detected. + * + * @since 2.0 + * + * @param[in] gestureDetector The flick gesture detector instance + */ + virtual void OnFlickGestureDetected(Tizen::Ui::TouchFlickGestureDetector& gestureDetector) = 0; + + /** + * Called when a flick gesture detection is cancelled. + * + * @since 2.0 + * + * @param[in] gestureDetector The flick gesture detector instance + */ + virtual void OnFlickGestureCanceled(Tizen::Ui::TouchFlickGestureDetector& gestureDetector) = 0; + +protected: + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // Following method is reserved and may change its name at any time without + // prior notice. + // + virtual void ITouchFlickGestureEventListener_Reserved1(void) {} + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // Following method is reserved and may change its name at any time without + // prior notice. + // + virtual void ITouchFlickGestureEventListener_Reserved2(void) {} + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, + // and consistency-related issues in the application. + // + // Following method is reserved and may change its name at any time without + // prior notice. + // + virtual void ITouchFlickGestureEventListener_Reserved3(void) {} +}; // ITouchFlickGestureEventListener + +}} // Tizen::Ui + +#endif // _FUI_ITOUCH_FLICK_GESTURE_EVENT_LISTENER_H_ diff --git a/inc/FUiITouchGestureEventListener.h b/inc/FUiITouchGestureEventListener.h new file mode 100644 index 0000000..8dc5972 --- /dev/null +++ b/inc/FUiITouchGestureEventListener.h @@ -0,0 +1,87 @@ +// +// 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 FUiITouchGestureEventListener.h + * @brief This is the header file for the %ITouchGestureEventListener interface. + * + * This header file contains the declarations of the %ITouchGestureEventListener interface. + */ + +#ifndef _FUI_ITOUCH_GESTURE_EVENT_LISTENER_H_ +#define _FUI_ITOUCH_GESTURE_EVENT_LISTENER_H_ + +#include + +namespace Tizen { namespace Ui +{ + +/** + * @interface ITouchGestureEventListener + * @brief This interface is a base interface that all gesture event listeners must implement. + * + * @since 2.0 + * + * The %ITouchGestureEventListener interface is a base interface that all gesture event listeners must implement. + * 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. + * + */ +class _OSP_EXPORT_ ITouchGestureEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +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. + * + * @since 2.0 + */ + virtual ~ITouchGestureEventListener(void) {} + +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 ITouchGestureEventListener_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 ITouchGestureEventListener_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 ITouchGestureEventListener_Reserved3(void) {} +}; // ITouchGestureEventListener + +}} // Tizen::Ui + +#endif // _FUI_ITOUCH_GESTURE_EVENT_LISTENER_H_ diff --git a/inc/FUiITouchLongPressGestureEventListener.h b/inc/FUiITouchLongPressGestureEventListener.h new file mode 100644 index 0000000..59da16f --- /dev/null +++ b/inc/FUiITouchLongPressGestureEventListener.h @@ -0,0 +1,107 @@ +// +// 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 FUiITouchLongPressGestureEventListener.h + * @brief This is the header file for the %ITouchLongPressGestureEventListener interface. + * + * This header file contains the declarations of the %ITouchLongPressGestureEventListener interface. + */ + +#ifndef _FUI_ITOUCH_LONG_PRESS_GESTURE_EVENT_LISTENER_H_ +#define _FUI_ITOUCH_LONG_PRESS_GESTURE_EVENT_LISTENER_H_ + +#include +#include + +namespace Tizen { namespace Ui +{ + +/** + * @interface ITouchLongPressGestureEventListener + * @brief This interface implements the listener for the touch long press gesture events. + * + * @since 2.0 + * + * The %ITouchLongPressGestureEventListener interface is the listener interface for receiving long press gesture events. + * The class that processes a long press gesture event implements this interface, and the instance created with that class is registered with a + * long press gesture detector, using the TouchLongPressGestureDetector::AddLongPressGestureEventListener() method. When the long press gesture event occurs, a method of that instance is + * invoked. + */ +class _OSP_EXPORT_ ITouchLongPressGestureEventListener + : virtual public ITouchGestureEventListener +{ +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 is the destructor for this class. + * + * @since 2.0 + */ + virtual ~ITouchLongPressGestureEventListener(void) {} + + /** + * Called when a long press gesture is detected. + * + * @since 2.0 + * + * @param[in] gestureDetector The long press gesture detector instance + */ + virtual void OnLongPressGestureDetected(Tizen::Ui::TouchLongPressGestureDetector& gestureDetector) = 0; + + /** + * Called when a long press detection is cancelled. + * + * @since 2.0 + * + * @param[in] gestureDetector The long press gesture detector instance + */ + virtual void OnLongPressGestureCanceled(Tizen::Ui::TouchLongPressGestureDetector& gestureDetector) = 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 ITouchLongPressGestureEventListener_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 ITouchLongPressGestureEventListener_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 ITouchLongPressGestureEventListener_Reserved3(void) {} +}; // ITouchLongPressGestureEventListener + +}} // Tizen::Ui + +#endif // _FUI_ITOUCH_LONG_PRESS_GESTURE_EVENT_LISTENER_H_ diff --git a/inc/FUiITouchModeChangedEventListener.h b/inc/FUiITouchModeChangedEventListener.h new file mode 100644 index 0000000..c9b44b0 --- /dev/null +++ b/inc/FUiITouchModeChangedEventListener.h @@ -0,0 +1,101 @@ +// +// 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 FUiITouchModeChangedEventListener.h + * @brief This is the header file for the %ITouchModeChangedEventListener interface. + * + * This header file contains the declarations of the %ITouchModeChangedEventListener interface. @n + * If the touch mode of a device is changed, a method of this interface is called. + * Therefore, if an application performs tasks related to the touch mode event, use the methods of this interface. + * + */ + +#ifndef _FUI_ITOUCH_MODE_CHANGED_EVENT_LISTENER_H_ +#define _FUI_ITOUCH_MODE_CHANGED_EVENT_LISTENER_H_ + +#include + +namespace Tizen {namespace Ui +{ +class Control; + +/** + * @interface ITouchModeChangedEventListener + * @brief This interface implements the listener for the touch mode changed event. + * + * @since 2.0 + * + * The %ITouchModeChangedEventListener interface is the listener interface for receiving touch mode change events. + * + * For more information on the class features, see Event Listeners. + */ +class _OSP_EXPORT_ ITouchModeChangedEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +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. + * + * @since 2.0 + */ + virtual ~ITouchModeChangedEventListener(void) {}; + + /** + * Called when an action event occurs. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] isInTouchMode The current mode + */ + virtual void OnTouchModeChanged(const Tizen::Ui::Control& source, bool isInTouchMode) = 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 ITouchModeChangedEventListener_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 ITouchModeChangedEventListener_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 ITouchModeChangedEventListener_Reserved3(void) {} + +}; // ITouchModeChangedEventListener + +} } // Tizen::Ui + +#endif // _FUI_ITOUCH_MODE_CHANGED_EVENT_LISTENER_H_ diff --git a/inc/FUiITouchPanningGestureEventListener.h b/inc/FUiITouchPanningGestureEventListener.h new file mode 100644 index 0000000..3b90d6f --- /dev/null +++ b/inc/FUiITouchPanningGestureEventListener.h @@ -0,0 +1,124 @@ +// +// 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 FUiITouchPanningGestureEventListener.h +* @brief This is the header file for the %ITouchPanningGestureEventListener interface. +* +* This header file contains the declarations of the %ITouchPanningGestureEventListener interface. +*/ +#ifndef _FUI_ITOUCH_PANNING_GESTURE_EVENT_LISTENER_H_ +#define _FUI_ITOUCH_PANNING_GESTURE_EVENT_LISTENER_H_ + +#include +#include + +namespace Tizen { namespace Ui +{ + +/** + * @interface ITouchPanningGestureEventListener + * @brief This interface implements the listener for the touch panning gesture events. + * + * @since 2.0 + * + * The %ITouchPanningGestureEventListener interface is the listener interface for receiving panning gesture events. + * The class that processes a panning gesture event implements this interface, and the instance created with that class is registered with a + * panning gesture detector, using the TouchPanningGestureDetector::AddPanningGestureEventListener() method. When the panning gesture event occurs, a method of that instance is + * invoked. + * + */ +class _OSP_EXPORT_ ITouchPanningGestureEventListener + : virtual public ITouchGestureEventListener +{ +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. + * + * @since 2.0 + */ + virtual ~ITouchPanningGestureEventListener(void) {} + + /** + * Called when a panning gesture detection is started. + * + * @since 2.0 + * + * @param[in] gestureDetector The panning gesture detector instance + */ + virtual void OnPanningGestureStarted(Tizen::Ui::TouchPanningGestureDetector& gestureDetector) = 0; + + /** + * Called when a panning gesture is detected and is in progress. + * + * @since 2.0 + * + * @param[in] gestureDetector The panning gesture detector instance + */ + virtual void OnPanningGestureChanged(Tizen::Ui::TouchPanningGestureDetector& gestureDetector) = 0; + + /** + * Called when a panning gesture detection is finished. + * + * @since 2.0 + * + * @param[in] gestureDetector The panning gesture detector instance + */ + virtual void OnPanningGestureFinished(Tizen::Ui::TouchPanningGestureDetector& gestureDetector) = 0; + + /** + * Called when a panning gesture detection is cancelled. + * + * @since 2.0 + * + * @param[in] gestureDetector The panning gesture detector instance + */ + virtual void OnPanningGestureCanceled(Tizen::Ui::TouchPanningGestureDetector& gestureDetector) = 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 ITouchPanningGestureEventListener_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 ITouchPanningGestureEventListener_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 ITouchPanningGestureEventListener_Reserved3(void) {} +}; //ITouchPanningGestureEventListener + +}} // Tizen::Ui + +#endif //_FUI_ITOUCH_PANNING_GESTURE_EVENT_LISTENER_H_ diff --git a/inc/FUiITouchPinchGestureEventListener.h b/inc/FUiITouchPinchGestureEventListener.h new file mode 100644 index 0000000..60f533c --- /dev/null +++ b/inc/FUiITouchPinchGestureEventListener.h @@ -0,0 +1,126 @@ +// +// 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 FUiITouchPinchGestureEventListener.h +* @brief This is the header file for the %ITouchPinchGestureEventListener interface. +* +* This header file contains the declarations of the %ITouchPinchGestureEventListener interface. +*/ + +#ifndef _FUI_ITOUCH_PINCH_GESTURE_EVENT_LISTENER_H_ +#define _FUI_ITOUCH_PINCH_GESTURE_EVENT_LISTENER_H_ + +#include +#include + +namespace Tizen { namespace Ui +{ + +/** + * @interface ITouchPinchGestureEventListener + * @brief This interface implements the listener for the touch pinch gesture events. + * + * @since 2.0 + * + * The %ITouchPinchGestureEventListener interface is the listener interface for receiving pinch gesture events. + * The class that processes a pinch gesture event implements this interface, and the instance created with that class is registered with a + * pinch gesture detector, using the TouchPinchGestureDetector::AddPinchGestureEventListener() method. When the pinch gesture event occurs, a method of that instance is + * invoked. + * + */ +class _OSP_EXPORT_ ITouchPinchGestureEventListener + : virtual public ITouchGestureEventListener +{ + +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. + * + * @since 2.0 + */ + virtual ~ITouchPinchGestureEventListener(void) {} + + /** + * Called when a pinch gesture detection is started. + * + * @since 2.0 + * + * @param[in] gestureDetector The pinch gesture detector instance + */ + virtual void OnPinchGestureStarted(Tizen::Ui::TouchPinchGestureDetector& gestureDetector) = 0; + + /** + * Called when a pinch gesture is detected and is in progress. + * + * @since 2.0 + * + * @param[in] gestureDetector The pinch gesture detector instance + */ + virtual void OnPinchGestureChanged(Tizen::Ui::TouchPinchGestureDetector& gestureDetector) = 0; + + /** + * Called when a pinch gesture detection is finished. + * + * @since 2.0 + * + * @param[in] gestureDetector The pinch gesture detector instance + */ + virtual void OnPinchGestureFinished(Tizen::Ui::TouchPinchGestureDetector& gestureDetector) = 0; + + /** + * Called when a pinch gesture detection is cancelled. + * + * @since 2.0 + * + * @param[in] gestureDetector The pinch gesture detector instance + */ + virtual void OnPinchGestureCanceled(Tizen::Ui::TouchPinchGestureDetector& gestureDetector) = 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 ITouchPinchGestureEventListener_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 ITouchPinchGestureEventListener_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 ITouchPinchGestureEventListener_Reserved3(void) {} +}; // ITouchPinchGestureEventListener + +}} // Tizen::Ui + +#endif // _FUI_ITOUCH_PINCH_GESTURE_EVENT_LISTENER_H_ diff --git a/inc/FUiITouchRotationGestureEventListener.h b/inc/FUiITouchRotationGestureEventListener.h new file mode 100644 index 0000000..114fa24 --- /dev/null +++ b/inc/FUiITouchRotationGestureEventListener.h @@ -0,0 +1,124 @@ +// +// 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 FUiITouchRotationGestureEventListener.h +* @brief This is the header file for the %ITouchRotationGestureEventListener interface. +* +* This header file contains the declarations of the %ITouchRotationGestureEventListener interface. +*/ +#ifndef _FUI_ITOUCH_ROTATION_GESTURE_EVENT_LISTENER_H_ +#define _FUI_ITOUCH_ROTATION_GESTURE_EVENT_LISTENER_H_ + +#include +#include + +namespace Tizen { namespace Ui +{ + +/** + * @interface ITouchRotationGestureEventListener + * @brief This interface implements the listener for the touch rotation gesture events. + * + * @since 2.0 + * + * The %ITouchRotationGestureEventListener interface is the listener interface for receiving pinch gesture events. + * The class that processes a rotation gesture event implements this interface, and the instance created with that class is registered with a + * rotation gesture detector, using the TouchRotationGestureDetector::AddRotationGestureEventListener() method. When the rotation gesture event occurs, a method of that instance is + * invoked. + * + */ +class _OSP_EXPORT_ ITouchRotationGestureEventListener + : virtual public ITouchGestureEventListener +{ +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. + * + * @since 2.0 + */ + virtual ~ITouchRotationGestureEventListener(void) {} + + /** + * Called when a rotation gesture detection is started. + * + * @since 2.0 + * + * @param[in] gestureDetector The rotation gesture detector instance + */ + virtual void OnRotationGestureStarted(Tizen::Ui::TouchRotationGestureDetector& gestureDetector) = 0; + + /** + * Called when a rotation gesture is detected and is in progress. + * + * @since 2.0 + * + * @param[in] gestureDetector The rotation gesture detector instance + */ + virtual void OnRotationGestureChanged(Tizen::Ui::TouchRotationGestureDetector& gestureDetector) = 0; + + /** + * Called when a rotation gesture detection is finished. + * + * @since 2.0 + * + * @param[in] gestureDetector The rotation gesture detector instance + */ + virtual void OnRotationGestureFinished(Tizen::Ui::TouchRotationGestureDetector& gestureDetector) = 0; + + /** + * Called when a rotation gesture detection is cancelled. + * + * @since 2.0 + * + * @param[in] gestureDetector The rotation gesture detector instance + */ + virtual void OnRotationGestureCanceled(Tizen::Ui::TouchRotationGestureDetector& gestureDetector) = 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 ITouchRotationGestureEventListener_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 ITouchRotationGestureEventListener_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 ITouchRotationGestureEventListener_Reserved3(void) {} +}; // ITouchRotationGestureEventListener + +}} // Tizen::Ui + +#endif //_FUI_ITOUCH_ROTATION_GESTURE_EVENT_LISTENER_H_ diff --git a/inc/FUiITouchTapGestureEventListener.h b/inc/FUiITouchTapGestureEventListener.h new file mode 100644 index 0000000..c510cf9 --- /dev/null +++ b/inc/FUiITouchTapGestureEventListener.h @@ -0,0 +1,107 @@ +// +// 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 FUiITouchTapGestureEventListener.h +* @brief This is the header file for the %ITouchTapGestureEventListener interface. +* +* This header file contains the declarations of the %ITouchTapGestureEventListener interface. +*/ + +#ifndef _FUI_ITOUCH_TAP_GESTURE_EVENT_LISTENER_H_ +#define _FUI_ITOUCH_TAP_GESTURE_EVENT_LISTENER_H_ + +#include +#include + +namespace Tizen { namespace Ui +{ + +/** + * @interface ITouchTapGestureEventListener + * @brief This interface implements the listener for the touch tap gesture events. + * + * @since 2.0 + * + * The %ITouchTapGestureEventListener interface is the listener interface for receiving tap gesture events. + * The class that processes a tap gesture event implements this interface, and the instance created with that class is registered with a + * tap gesture detector, using the TouchTapGestureDetector::AddTapGestureEventListener() method. When the tap gesture event occurs, a method of that instance is + * invoked. + * + */ +class _OSP_EXPORT_ ITouchTapGestureEventListener + : virtual public ITouchGestureEventListener +{ +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. + * + * @since 2.0 + */ + virtual ~ITouchTapGestureEventListener(void) {} + + /** + * Called when a tap gesture is detected. + * + * @since 2.0 + * + * @param[in] gestureDetector The tap gesture detector instance + */ + virtual void OnTapGestureDetected(Tizen::Ui::TouchTapGestureDetector& gestureDetector) = 0; + + /** + * Called when a tap gesture detection is cancelled. + * + * @since 2.0 + * + * @param[in] gestureDetector The tap gesture detector instance + */ + virtual void OnTapGestureCanceled(Tizen::Ui::TouchTapGestureDetector& gestureDetector) = 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 ITouchTapGestureEventListener_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 ITouchTapGestureEventListener_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 ITouchTapGestureEventListener_Reserved3(void) {} +}; // ITouchTapGestureEventListener + +}} // Tizen::Ui + +#endif //_FUI_ITOUCH_TAP_GESTURE_EVENT_LISTENER_H_ diff --git a/inc/FUiIUiLinkEventListener.h b/inc/FUiIUiLinkEventListener.h new file mode 100644 index 0000000..77f37bd --- /dev/null +++ b/inc/FUiIUiLinkEventListener.h @@ -0,0 +1,113 @@ +// +// 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 FUiIUiLinkEventListener.h + * @brief This is the header file for the %IUiLinkEventListener interface. + * + * This header file contains the declarations of the %IUiLinkEventListener interface. + */ +#ifndef _FUI_IUI_LINK_EVENT_LISTENER_H_ +#define _FUI_IUI_LINK_EVENT_LISTENER_H_ + +// Includes +#include +#include + +namespace Tizen { namespace Base +{ +class String; +}} // Tizen::Base + +// Namespace declaration +namespace Tizen { namespace Ui +{ + +class Control; + +/** + * @interface IUiLinkEventListener + * @brief This interface implements the listener for link events. + * + * @since 2.0 + * + * The %IUiLinkEventListener interface is the listener interface for receiving link click events, for example, from EditFields. + * 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. + * + * For more information on the class features, see EditArea and EditField, TextBox, and ListViews. + + */ +class _OSP_EXPORT_ IUiLinkEventListener + : public Tizen::Base::Runtime::IEventListener +{ +// Lifecycle +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. + * + * @since 2.0 + */ + virtual ~IUiLinkEventListener(void) {} + + // Operation +public: + /** + * Called when a link is clicked. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] text The text + * @param[in] linkType The link type + * @param[in] link The optional link text + * @remarks If the clicked link does not contain an optional link text, then the value of @c text and @c link will be the same. + */ + virtual void OnLinkClicked(Tizen::Ui::Control& source, const Tizen::Base::String& text, Tizen::Base::Utility::LinkType linkType, const Tizen::Base::String& link) = 0; + +// Reserves +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 IUiLinkEventListener_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 IUiLinkEventListener_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 IUiLinkEventListener_Reserved3(void) {} +}; // IUiLinkEventListener + +} } // Tizen::Ui + +#endif // _FUI_IUI_LINK_EVENT_LISTENER_H_ diff --git a/inc/FUiIWindowEventListener.h b/inc/FUiIWindowEventListener.h new file mode 100644 index 0000000..aa91717 --- /dev/null +++ b/inc/FUiIWindowEventListener.h @@ -0,0 +1,114 @@ +// +// 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 FUiIWindowEventListener.h + * @brief This is the header file for the %IWindowEventListener interface. + * + * This header file contains the declarations of the %IWindowEventListener interface. @n + * If a window event is generated, a method of this interface is called. @n + * So, if an application does some jobs related to the window event, use the methods of this interface. + * + */ + +#ifndef _FUI_IWINDOW_EVENT_LISTENER_H_ +#define _FUI_IWINDOW_EVENT_LISTENER_H_ + +#include +#include + +namespace Tizen {namespace Ui +{ + +class Window; + +/** + * @interface IWindowEventListener + * @brief This interface implements the listener for the window event. + * + * @since 2.0 + * + * The %IWindowEventListener interface is a listener interface for receiving window events. The class that processes a window event + * implements this interface, and the instance created with that class is registered with a Window using the Window::AddWindowEventListener() + * method. When the window event occurs, the OnWindowActivated(), or OnWindowDeactivated() method of that instance is invoked. + */ +class _OSP_EXPORT_ IWindowEventListener + : public Tizen::Base::Runtime::IEventListener +{ +// Operation +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. + * + * @since 2.0 + * + */ + virtual ~IWindowEventListener(void) {} + + /** + * Called when a window becomes the topmost window. + * + * @since 2.0 + * + * @param[in] source The source of the event + * + */ + virtual void OnWindowActivated(const Tizen::Ui::Window& source) = 0; + + /** + * Called when the window is no longer the topmost window. + * + * @since 2.0 + * + * @param[in] source The source of the event + * + */ + virtual void OnWindowDeactivated(const Tizen::Ui::Window& 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 IWindowEventListener_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 IWindowEventListener_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 IWindowEventListener_Reserved3(void) {} +}; + +} }; // Tizen::Ui + +#endif // _FUI_IWINDOW_EVENT_LISTENER_H_ diff --git a/inc/FUiInputConnection.h b/inc/FUiInputConnection.h new file mode 100644 index 0000000..9f843a0 --- /dev/null +++ b/inc/FUiInputConnection.h @@ -0,0 +1,474 @@ +// +// 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 FUiInputConnection.h + * @brief This is the header file for the %InputConnection class. + * + * This header file contains the declarations of the %InputConnection class. + */ + +#ifndef _FUI_INPUT_CONNECTION_H_ +#define _FUI_INPUT_CONNECTION_H_ + +#include +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui { + +class _InputConnectionImpl; +class Control; + + +/** + * @class InputConnection + * @brief This is the header file for the %InputConnection class. + * This header file contains the declarations of the %InputConnection class. + * @since 2.0 + * + * @final This class is not intended for extension. + * + * The following examples demonstrate how to use the %InputConnection class. + * + * This is a simple editor that uses an %InputConnection. + * + * + * @code +// Sample code for EditorSample.h +#include +#include +#include + +namespace Tizen { namespace Ui { + +class EditorSample : +public Tizen::Ui::Controls::Form, +public Tizen::Ui::ITouchEventListener, +public Tizen::Ui::IInputConnectionEventListener, +public Tizen::Ui::IInputConnectionProvider, +public Tizen::Ui::IFocusEventListener, +public Tizen::Ui::IPropagatedKeyEventListener +{ +protected: + +public: + + bool Initialize(void); + virtual result OnInitializing(); + + result ShowKeypad(); + result HideKeypad(); + virtual void OnInputConnectionPanelShowStateChanged(Tizen::Ui::InputConnection& source, Tizen::Ui::InputPanelShowState showState){}; + virtual void OnInputConnectionPanelLanguageChanged(Tizen::Ui::InputConnection& source, Tizen::Locales::LanguageCode language){}; + virtual void OnInputConnectionPanelBoundsChanged(Tizen::Ui::InputConnection& source, const Tizen::Graphics::Rectangle& bounds){}; + virtual void OnInputConnectionTextPredictionShowStateChanged(Tizen::Ui::InputConnection& source, bool isShown){}; + virtual void OnInputConnectionTextPredictionBoundsChanged(Tizen::Ui::InputConnection& source, const Tizen::Graphics::Rectangle& bounds){}; + virtual void OnInputConnectionTextCommitted(Tizen::Ui::InputConnection& source, const Tizen::Base::String& committedText); + virtual void OnInputConnectionComposingTextChanged(Tizen::Ui::InputConnection& source, const Tizen::Base::String& preEditText, int cursorPosition){}; + virtual void DeleteSurroundingText(Tizen::Ui::InputConnection& source, int offset, int chars){}; + virtual void GetPreviousText(Tizen::Ui::InputConnection& source, Tizen::Base::String& text, int& cursorPosition){}; + + virtual void OnTouchPressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo & touchInfo){}; + virtual void OnTouchReleased(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 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){}; + + virtual void OnFocusGained(const Tizen::Ui::Control& source); + virtual void OnFocusLost(const Tizen::Ui::Control& source); + + virtual bool OnKeyPressed(Control& source, const KeyEventInfo& keyEventInfo) {return false;}; + virtual bool OnKeyReleased(Control& source, const KeyEventInfo& keyEventInfo) {return false;}; + virtual bool OnPreviewKeyPressed(Control& source, const KeyEventInfo& keyEventInfo) {return false;}; + virtual bool OnPreviewKeyReleased(Control& source, const KeyEventInfo& keyEventInfo) {return false;}; +private: + InputConnection* __pImf; + bool __bindStatus; + Tizen::Ui::Controls::Button* __pButton; +}; + +}} + + * @endcode + * + * @code +// Sample code for EditorSample.cpp +#include "EditorSample.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; + +bool +EditorSample::Initialize(void) +{ + Construct(FORM_STYLE_NORMAL); + return true; +} + +void +EditorSample::OnInputConnectionTextCommitted(InputConnection& source, const Tizen::Base::String& committedText) +{ + __pButton->SetText(committedText); + __pButton->Invalidate(true); +} + +result +EditorSample::OnInitializing() +{ + result r = E_SUCCESS; + + //create Button + __pButton = new (std::nothrow) Button(); + __pButton->Construct(FloatRectangle(180.0f, 200.0f, 360.0f, 200.0f), L"Text Display"); + __pButton->SetFocusable(true); + __pButton->AddFocusEventListener(*this); + __pButton->AddTouchEventListener(*this); + __pButton->SetPropagatedKeyEventListener(this); + AddControl(__pButton); + + __bindStatus = false; + + // Creates an instance of InputConnection + __pImf = new (std::nothrow) InputConnection(); + __pImf->Construct(__pButton, *this, *this); + + return r; +} + +result +EditorSample::ShowKeypad() +{ + result r = E_SUCCESS; + + if(!__bindStatus) + { + __pImf->BindInputMethod(); + __bindStatus = true; + __pImf->ShowInputPanel(); + } + + return r; +} + +result +EditorSample::HideKeypad() +{ + result r = E_SUCCESS; + + if (__bindStatus != false) + { + __pImf->HideInputPanel(); + __pImf->UnbindInputMethod(); + __bindStatus = false; + } + + return r; +} + +void +EditorSample::OnTouchReleased(const Control& source, const Point& currentPosition, const TouchEventInfo& touchInfo) +{ + + if(!__bindStatus) + { + __pButton->SetFocus(); + } + else + { + SetFocus(); + } +} + +void +EditorSample::OnFocusGained(const Tizen::Ui::Control& source) +{ + ShowKeypad(); +} + +void +EditorSample::OnFocusLost(const Tizen::Ui::Control& source) +{ + HideKeypad(); +} + * @endcode + * + */ + +class _OSP_EXPORT_ InputConnection + : public Tizen::Base::Object +{ +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. + * + * @since 2.0 + */ + InputConnection(void); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~InputConnection(void); + + /** + * Initializes this instance of %InputConnection with the specified parameter. + * + * @since 2.0 + * @return An error code + * @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. + * @exception E_SYSTEM The method cannot proceed due to a severe system error. + */ + result Construct(const Control* pControl, IInputConnectionEventListener& listener, IInputConnectionProvider& provider); + + /** + * 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] listener An instance of %IInputConnectionEventListenerF 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. + * @exception E_SYSTEM The method cannot proceed due to a severe system error. + */ + result Construct(const Control* pControl, IInputConnectionEventListenerF& listener, IInputConnectionProvider& provider); + + /** + * Binds the %InputConnection to the current active Input Method + * + * @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. + * @remarks This method should be called when the Control object has the input focus. + * * @see UnbindInputMethod() + */ + result BindInputMethod(void); + + /** + * Unbinds the %InputConnection from the current active Input Method. It will no longer be valid for the Input Method. + * + * @since 2.0 + * @see BindInputMethod() + */ + void UnbindInputMethod(void); + + /** + * Asks the current active Input Method to show the Input Panel which contains the keyboard. + * + * @since 2.0 + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_STATE This exception is thrown when BindInputMethod() is not called before calling this method. + * @see HideInputPanel() + */ + result ShowInputPanel(void); + + /** + * Asks the current active Input Method to hide the active Input Panel which contains the keyboard. + * + * @since 2.0 + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_STATE This exception is thrown when BindInputMethod() is not called before calling this method. + * @see ShowInputPanel() + */ + result HideInputPanel(void); + + /** + * Sets the style of the current active Input Panel. + * + * @since 2.0 + * @param[in] style The style of the Input Panel. + * @remarks This method may not work, depending on the current active Input Method. + */ + void SetInputPanelStyle(InputPanelStyle style); + + /** + * Sets the auto-capitalization mode. + * + * @since 2.0 + * @param[in] autoCapitalizationMode The auto-capitalization mode + * @remarks This method may not work, depending on the current active Input Method. + */ + void SetAutoCapitalizationMode(AutoCapitalizationMode autoCapitalizationMode); + + /** + * Finishes text composition. + * This will typically cause the Input Method to exit the composing state. + * + * @since 2.0 + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_STATE This exception is thrown when BindInputMethod() is not called before calling this method. + */ + result FinishTextComposition(void); + + /** + * Sets the type of ActionKey. + * + * @since 2.0 + * @param[in] inputPanelAction The InputPanel action + * @remarks This method may not work, depending on the current active Input Method. + */ + void SetInputPanelAction(InputPanelAction inputPanelAction); + + /** + * Enables or disables the ActionKey. + * + * @since 2.0 + * @param[in] enable Set to @c true to enable the ActionKey, @n + * else @c false + * @remarks This method may not work, depending on the current active Input Method. + */ + void SetInputPanelActionEnabled(bool enable); + + /** + * Sets the language of the current active Input Panel. + * + * @since 2.0 + * @param[in] languageCode The language to set + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + * @remarks This method may not work, depending on the current active Input Method. + */ + result SetInputPanelLanguage(Tizen::Locales::LanguageCode languageCode); + + /** + * Sets the cursor at the specified position. + * + * @since 2.0 + * + * @return An error code + * @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. + */ + result SetCursorPosition(int position); + + /** + * Sets the bounds of the cursor. + * + * @since 2.0 + * + * @return An error code + * @param[in] rect The rectangle 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. + */ + result SetCursorBounds(const Tizen::Graphics::Rectangle& rect); + + /** + * Sets the bounds of the cursor. + * + * @since 2.1 + * + * @return An error code + * @param[in] rect The rectangle 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. + */ + result SetCursorBounds(const Tizen::Graphics::FloatRectangle& rect); + + /** + * Gets the bounds of the current active Input Panel. + * + * @since 2.0 + * @return An instance of the rectangle that represents the position of the top-left corner, + * 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. + */ + Tizen::Graphics::Rectangle GetInputPanelBounds(void) const; + + /** + * Gets the bounds of the current active Input Panel. + * + * @since 2.1 + * + * @return An instance of the rectangle that represents the position of the top-left corner, + * 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. + */ + Tizen::Graphics::FloatRectangle GetInputPanelBoundsF(void) const; + + /** + * Enables or disables text prediction. + * + * @since 2.0 + * @param[in] enable Set to @c true to enable text prediction, @n + * else @c false + * @remarks This method may not work, depending on the current active Input Method. + */ + void SetTextPredictionEnabled(bool enable); + + /** + * 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. + */ + void SendOpaqueCommand (const Tizen::Base::String& command); + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + // @since 2.0 + // + InputConnection(const InputConnection& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + // @since 2.0 + // + InputConnection& operator=(const InputConnection& rhs); + +private: + friend class _InputConnectionImpl; + _InputConnectionImpl* __pInputConnectionImpl; + +}; // InputConnection + +}} // Tizen::Ui + +#endif // _FUI_INPUT_CONNECTION_H_ diff --git a/inc/FUiInputConnectionTypes.h b/inc/FUiInputConnectionTypes.h new file mode 100644 index 0000000..a83b4bd --- /dev/null +++ b/inc/FUiInputConnectionTypes.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 FUiInputConnectionTypes.h + * @brief This is the header file for the data types. + * + * This header file contains the declarations of the commonly used data types. + * + */ + + +#ifndef _FUI_INPUT_CONNECTION_TYPES_H_ +#define _FUI_INPUT_CONNECTION_TYPES_H_ + +namespace Tizen { namespace Ui { + + +/** + * @enum InputPanelStyle + * Defines the style of the input panel. + * + * @since 2.0 + */ +enum InputPanelStyle +{ + INPUT_PANEL_STYLE_NORMAL, /**< Default style */ + INPUT_PANEL_STYLE_EMAIL, /**< Email 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_IP /**< IP style */ +}; + +/** + * @enum InputPanelShowState + * Defines the state of the input panel. + * + * @since 2.0 + */ +enum InputPanelShowState +{ + INPUT_PANEL_SHOW_STATE_SHOW, /**< Show State */ + INPUT_PANEL_SHOW_STATE_HIDE /**< Hide State */ +}; + +/** + * @enum AutoCapitalizationMode + * Defines the type of auto-capitalization mode. + * + * @since 2.0 + */ +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 */ +}; + +/** + * @enum InputPanelAction + * + * Defines the possible keypad action types. + * @since 2.0 + */ +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_SEARCH, /**< The Search key */ + INPUT_PANEL_ACTION_LOGIN, /**< The Login key */ + INPUT_PANEL_ACTION_SIGN_IN, /**< The Sign-In key */ + INPUT_PANEL_ACTION_JOIN, /**< The Join key */ + INPUT_PANEL_ACTION_DONE /**< The Done key */ +}; + +}} // Tizen::Ui + +#endif // _FUI_INPUT_CONNECTION_TYPES_H_ diff --git a/inc/FUiKeyEventInfo.h b/inc/FUiKeyEventInfo.h new file mode 100644 index 0000000..ee2a37c --- /dev/null +++ b/inc/FUiKeyEventInfo.h @@ -0,0 +1,145 @@ +// +// 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 FUiKeyEventInfo.h + * @brief This is the header file for the %KeyEventInfo class. + * + * This header file contains the declarations of the %KeyEventInfo class. + * + */ + +#ifndef _FUI_KEY_EVENT_INFO_H_ +#define _FUI_KEY_EVENT_INFO_H_ + +#include +#include + +namespace Tizen { namespace Ui +{ + +class Control; +class _KeyEventInfoImpl; + +/** + * @class KeyEventInfo + * @brief This class stores the information of each key event. + * + * @since 2.1 + * + * The %KeyEventInfo class provides the key event information: key code and key modifiers. + * @see IPropagatedKeyEventListener::OnKeyPressed() + * @see IPropagatedKeyEventListener::OnKeyReleased() + * @see IPropagatedKeyEventListener::TranslateKeyEventInfo() + * + */ +class _OSP_EXPORT_ KeyEventInfo + : public Tizen::Base::Object +{ +public: + /** + * Initializes this instance of %KeyEventInfo. + * + * @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 KeyModifier + */ + KeyEventInfo(KeyCode keyCode, int keyModifiers); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.1 + */ + virtual ~KeyEventInfo(void); + + /** + * Sets the key code. + * + * @since 2.1 + * + * @param[in] keyCode The key code + * @see GetKeyCode() + * + */ + void SetKeyCode(KeyCode keyCode); + + /** + * Gets the key code. + * + * @since 2.1 + * + * @return The key code + * @see SetKeyCode() + */ + KeyCode GetKeyCode(void) const; + + /** + * Sets the bitwise ORed key modifiers of the keyboard such as Control, Shift, Numeric lock, and so on. + * + * @since 2.1 + * + * @param[in] keyModifiers The key modifiers that can be combined using the bitwise OR operator + * @see GetKeyModifier() + * @see KeyModifier + * + */ + void SetKeyModifier(int keyModifiers); + + /** + * Gets the key modifiers of the keyboard such as Control, Shift, Numeric lock, and so on. + * + * @since 2.1 + * + * @return The bitwise ORing key modifiers + * @see SetKeyModifier() + * @see KeyModifier + */ + int GetKeyModifier(void) const; + +private: + /* + * This is the default constructor for this class. + * + * @since 2.1 + */ + KeyEventInfo(void); + + /* + * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + * + * @since 2.1 + */ + KeyEventInfo(const KeyEventInfo& rhs); + + /* + * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + * + * @since 2.1 + */ + KeyEventInfo& operator =(const KeyEventInfo& rhs); + +private: + _KeyEventInfoImpl* __pKeyEventInfoImpl; + +}; // KeyEventInfo + +} } // Tizen::Ui + +#endif // _FUI_KEY_EVENT_INFO_H_ diff --git a/inc/FUiKeyEventManager.h b/inc/FUiKeyEventManager.h new file mode 100644 index 0000000..ff05c1c --- /dev/null +++ b/inc/FUiKeyEventManager.h @@ -0,0 +1,135 @@ +// +// 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 FUiKeyEventManager.h + * @brief This is the header file for the %KeyEventManager class. + * + * This header file contains the declarations of the %KeyEventManager class. + */ + +#ifndef _FUI_KEY_EVENT_MANAGER_H_ +#define _FUI_KEY_EVENT_MANAGER_H_ + +#include +#include +#include + +namespace Tizen { namespace Base { namespace Runtime +{ +class _IEvent; +class IEventArg; +} } } + +namespace Tizen {namespace Ui +{ +class Control; + +/** + * @class KeyEventManager + * @brief This class manages the key events that are fired within the context of this application. + * + * @since 2.0 + * + * @final This class is not intended for extension. + * + * The %KeyEventManager class listens to all key events that are generated within the application's context. + * + * For more information on the class features, see Event Listeners. + */ +class _OSP_EXPORT_ KeyEventManager + : public Tizen::Base::Object +{ +public: + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~KeyEventManager(void); + + /** + * Gets a pointer to the current key event manager. + * + * @since 2.0 + * + * @return The current %KeyEventManager instance + */ + static KeyEventManager* GetInstance(void); + + /** + * Adds an application-wide %IKeyEventListener instance. @n + * The added listeners get notified when a key is pressed, released, or long pressed within the context of this application. + * + * @since 2.0 + * + * @param[in] listener The event listener to add + * @remarks The listener is called after the key event is delivered to the focused control's key event listeners, but before the + * key event is passed onto the focused control itself. @n + * Moreover, if the key needs to be consumed by the control itself, the added listeners will not be notified. + * @see RemoveKeyEventListener () + */ + void AddKeyEventListener(IKeyEventListener& listener); + + /** + * Removes an %IKeyEventListener instance. @n + * The removed listener is not notified even when the key events are fired. + * + * @since 2.0 + * + * @return listener The current application-wide key event listener to remove + * @see AddKeyEventListener() + */ + void RemoveKeyEventListener(IKeyEventListener& listener); + +protected: + /** + * This is the default constructor for this class. + * + * @since 2.0 + */ + KeyEventManager(void); + + /** + * Initializes this instance of %KeyEventManager. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result Construct(void); + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + KeyEventManager(const KeyEventManager& value); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + KeyEventManager& operator =(const KeyEventManager& value); + + static void InitializeInstance(void); + +}; // KeyEventManager + +} } // Tizen::Ui + +#endif // _FUI_KEY_EVENT_MANAGER_H_ diff --git a/inc/FUiKeyTypes.h b/inc/FUiKeyTypes.h new file mode 100644 index 0000000..75a61ac --- /dev/null +++ b/inc/FUiKeyTypes.h @@ -0,0 +1,258 @@ +// +// 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 FUiKeyTypes.h +* @brief This is the header file for the key enumeration. +* +* This header file contains the declarations of the key enumeration. +*/ +#include +#ifndef _FUI_KEY_TYPES_H_ +#define _FUI_KEY_TYPES_H_ + +namespace Tizen { namespace Ui +{ + +/** + * @enum KeyCode + * + * Defines the list of keys supported by the system. @n + * Note that certain keys may not be available on all devices. @n + * + * @since 2.0 + */ +enum KeyCode +{ + KEY_INVALID = 0x0000, /**< The invalid key */ + KEY_SIDE_UP, /**< The up side key */ + KEY_SIDE_DOWN, /**< The down side key */ + KEY_OK, /**< The OK key */ + KEY_CLEAR, /**< The clear key */ + KEY_CAMERA, /**< The camera key */ + KEY_SWITCH, /**< The task switcher key */ + KEY_0, /**< The 0 key */ + KEY_1, /**< The 1 key */ + KEY_2, /**< The 2 key */ + KEY_3, /**< The 3 key */ + KEY_4, /**< The 4 key */ + KEY_5, /**< The 5 key */ + KEY_6, /**< The 6 key */ + KEY_7, /**< The 7 key */ + KEY_8, /**< The 8 key */ + KEY_9, /**< The 9 key */ + KEY_ASTERISK, /**< The asterisk key */ + KEY_SHARP, /**< The sharp key */ + KEY_LEFT, /**< The left directional key */ + KEY_UP, /**< The up directional key */ + KEY_DOWN, /**< The down directional key */ + KEY_RIGHT, /**< The right directional key */ + KEY_MAX, /**< The Placeholder */ + KEY_A, /**< The A key */ + KEY_B, /**< The B key */ + KEY_C, /**< The C key */ + KEY_D, /**< The D key */ + KEY_E, /**< The E key */ + KEY_F, /**< The F key */ + KEY_G, /**< The G key */ + KEY_H, /**< The H key */ + KEY_I, /**< The I key */ + KEY_J, /**< The J key */ + KEY_K, /**< The K key */ + KEY_L, /**< The L key */ + KEY_M, /**< The M key */ + KEY_N, /**< The N key */ + KEY_O, /**< The O key */ + KEY_P, /**< The P key */ + KEY_Q, /**< The Q key */ + KEY_R, /**< The R key */ + KEY_S, /**< The S key */ + KEY_T, /**< The T key */ + KEY_U, /**< The U key */ + KEY_V, /**< The V key */ + KEY_W, /**< The W key */ + KEY_X, /**< The X key */ + KEY_Y, /**< The Y key */ + KEY_Z, /**< The Z key */ + KEY_BACKSPACE, /**< The backspace key */ + KEY_COMMA, /**< The comma key */ + KEY_ENTER, /**< The enter key */ + KEY_CAPSLOCK, /**< The Caps Lock key */ + KEY_QUESTION, /**< The Question key */ + KEY_ALT, /**< The Alt key */ + KEY_SYM, /**< The Language Symbolkey */ + KEY_SETTING, /**< The Language Setting key */ + KEY_SPACE, /**< The Space key */ + KEY_DOT, /**< The Dot key */ + KEY_FN, /**< The Function key */ + KEY_CAMERA_HALF_SHUTTER, /**< The camera half shutter key */ + KEY_CHAR_SYM_1, /**< The Character symbol 1 key */ + KEY_CHAR_SYM_2, /**< The Character symbol 2 key */ + KEY_CHAR_SYM_3, /**< The Character symbol 3 key */ + KEY_CHAR_SYM_4, /**< The Character symbol 4 key */ + KEY_CHAR_SYM_5, /**< The Character symbol 5 key */ + KEY_CHAR_SYM_6, /**< The Character symbol 6 key */ + KEY_CHAR_SYM_7, /**< The Character symbol 7 key */ + KEY_CHAR_SYM_8, /**< The Character symbol 8 key */ + KEY_CHAR_SYM_9, /**< The Character symbol 9 key */ + KEY_CHAR_SYM_A, /**< The Character symbol A key */ + KEY_CHAR_SYM_B, /**< The Character symbol B key */ + KEY_CHAR_SYM_C, /**< The Character symbol C key */ + KEY_CHAR_SYM_D, /**< The Character symbol D key */ + KEY_CHAR_SYM_E, /**< The Character symbol E key */ + KEY_CHAR_SYM_F, /**< The Character symbol F key */ + KEY_FN_1, /**< The function 1 key */ + KEY_FN_2, /**< The function 2 key */ + KEY_FN_3, /**< The function 3 key */ + KEY_FN_4, /**< The function 4 key */ + KEY_FN_5, /**< The function 5 key */ + KEY_POWER_HOLD, /**< The power key */ + KEY_DELETE, /**< The delete key */ + + KEY_APOSTROPHE, /**< The apostrophe key */ + KEY_BACKSLASH, /**< The backslash key */ + KEY_CONTEXT_MENU, /**< The menu key */ + KEY_EQUAL, /**< The equal key */ + KEY_ESC, /**< The esc key */ + KEY_FN_6, /**< The function 6 key */ + KEY_FN_7, /**< The function 7 key */ + KEY_FN_8, /**< The function 8 key */ + KEY_FN_9, /**< The function 9 key */ + KEY_FN_10, /**< The function 10 key */ + KEY_FN_11, /**< The function 11 key */ + KEY_FN_12, /**< The function 12 key */ + KEY_GRAVE, /**< The grave key */ + KEY_INSERT, /**< The insert key */ + KEY_LANGUAGE_SWITCH, /**< The language switch key */ + KEY_LEFT_ALT, /**< The left alt key */ + KEY_LEFT_BRACKET, /**< The left bracket key */ + KEY_LEFT_CTRL, /**< The left control key */ + KEY_LEFT_SHIFT, /**< The left shift key */ + KEY_LEFT_WIN, /**< The left window key */ + KEY_MINUS, /**< The minus key */ + KEY_MOVE_END, /**< The end key */ + KEY_MOVE_HOME, /**< The home key */ + KEY_NUM_LOCK, /**< The number lock key */ + KEY_NUMPAD_0, /**< The Numpad 0 key */ + KEY_NUMPAD_1, /**< The Numpad 1 key */ + KEY_NUMPAD_2, /**< The Numpad 2 key */ + KEY_NUMPAD_3, /**< The Numpad 3 key */ + KEY_NUMPAD_4, /**< The Numpad 4 key */ + KEY_NUMPAD_5, /**< The Numpad 5 key */ + KEY_NUMPAD_6, /**< The Numpad 6 key */ + KEY_NUMPAD_7, /**< The Numpad 7 key */ + KEY_NUMPAD_8, /**< The Numpad 8 key */ + KEY_NUMPAD_9, /**< The Numpad 9 key */ + KEY_NUMPAD_ADD, /**< The Numpad add key */ + KEY_NUMPAD_DIVIDE, /**< The Numpad divide key */ + KEY_NUMPAD_DOT, /**< The Numpad dot key */ + KEY_NUMPAD_ENTER, /**< The Numpad enter key */ + KEY_NUMPAD_MULTIPLY, /**< The Numpad multiply key */ + KEY_NUMPAD_SUBTRACT, /**< The Numpad subtract key */ + KEY_PAGE_DOWN, /**< The page down key */ + KEY_PAGE_UP, /**< The page up key */ + KEY_PAUSE_BREAK, /**< The pause key */ + KEY_PRINT, /**< The print key */ + KEY_RIGHT_ALT, /**< The right alt key */ + KEY_RIGHT_BRACKET, /**< The right bracket key */ + KEY_RIGHT_CTRL, /**< The right control key */ + KEY_RIGHT_SHIFT, /**< The right shift key */ + KEY_RIGHT_WIN, /**< The right window key */ + KEY_SCROLL_LOCK, /**< The scroll lock key */ + KEY_SEMICOLON, /**< The semicolon key */ + KEY_SLASH, /**< The slash key */ + KEY_TAB, /**< The tab key */ + KEY_OEM_1, /**< The OEM 1 key */ + KEY_OEM_2, /**< The OEM 2 key */ + KEY_OEM_3, /**< The OEM 3 key */ + KEY_OEM_4, /**< The OEM 4 key */ + KEY_OEM_5, /**< The OEM 5 key */ + KEY_OEM_6, /**< The OEM 6 key */ + KEY_OEM_7, /**< The OEM 7 key */ + KEY_OEM_8, /**< The OEM 8 key */ + KEY_OEM_9, /**< The OEM 9 key */ + KEY_OEM_10, /**< The OEM 10 key */ + KEY_OEM_11, /**< The OEM 11 key */ + KEY_OEM_12, /**< The OEM 12 key */ + KEY_OEM_13, /**< The OEM 13 key */ + KEY_OEM_14, /**< The OEM 14 key */ + KEY_OEM_15, /**< The OEM 15 key */ + KEY_OEM_16, /**< The OEM 16 key */ + KEY_OEM_17, /**< The OEM 17 key */ + KEY_OEM_18, /**< The OEM 18 key */ + KEY_OEM_19, /**< The OEM 19 key */ + KEY_OEM_20, /**< The OEM 20 key */ + + KEY_BACK, /**< The back key @b Since: @b 2.2 */ + KEY_HOME, /**< The home key @b Since: @b 2.2 */ + KEY_WEB_PAGE, /**< The web page key @b Since: @b 2.2 */ + KEY_MAIL, /**< The email key @b Since: @b 2.2 */ + KEY_SCREEN_SAVER, /**< The screen saver key @b Since: @b 2.2 */ + KEY_BRIGHTNESS_DOWN, /**< The brightness reduction key @b Since: @b 2.2 */ + KEY_BRIGHTNESS_UP, /**< The brightness increment key @b Since: @b 2.2 */ + KEY_MUTE, /**< The mute key @b Since: @b 2.2 */ + KEY_VOLUME_DOWN, /**< The volume decrease key @b Since: @b 2.2 */ + KEY_VOLUME_UP, /**< The volume increase key @b Since: @b 2.2 */ + KEY_PLAY_PAUSE, /**< The play/pause key @b Since: @b 2.2 */ + KEY_NEXT_SONG, /**< The next song key @b Since: @b 2.2 */ + KEY_PREVIOUS_SONG, /**< The previous song key @b Since: @b 2.2 */ + KEY_APPS, /**< The apps key @b Since: @b 2.2 */ + KEY_MENU, /**< The menu key @b Since: @b 2.2 */ + KEY_SOFT_KEYBOARD, /**< The soft keyboard key @b Since: @b 2.2 */ + KEY_SEARCH, /**< The search key @b Since: @b 2.2 */ + KEY_VOICE, /**< The voice key @b Since: @b 2.2 */ + KEY_QUICK_PANEL, /**< The quick panel key @b Since: @b 2.2 */ + KEY_CLIPBOARD, /**< The clipboard key @b Since: @b 2.2 */ + KEY_HARDWARE_MAX = INT_MAX +}; + +/** + * @enum KeyState + * + * Defines the state of a key. + * + * @since 2.0 + */ +enum KeyState +{ + KEY_PRESSED = 0x0001, /**< The key is pressed */ + KEY_RELEASED = 0x0002, /**< The key is released */ + KEY_LONGPRESSED = 0x0003 /**< The key pressed and held down over a predefined duration */ +}; + +/** + * @enum KeyModifier + * + * Defines constants used to identify key modifiers. + * + * @since 2.1 + */ +enum KeyModifier +{ + KEY_MODIFIER_NONE = 0, /**< No active modifiers */ + KEY_MODIFIER_SHIFT = 1 << 0, /**< "Shift" is being pressed */ + KEY_MODIFIER_CTRL = 1 << 1, /**< "Control" is being pressed */ + KEY_MODIFIER_ALT = 1 << 2, /**< "Alt" is being pressed */ + KEY_MODIFIER_WIN = 1 << 3, /**< "Win" (between "Ctrl" and "Alt") is being pressed */ + KEY_MODIFIER_SCROLL_LOCK = 1 << 4, /**< "Scroll" is locked */ + KEY_MODIFIER_NUM_LOCK = 1 << 5, /**< "Num Lock" on the keyboard is locked */ + KEY_MODIFIER_CAPS_LOCK = 1 << 6, /**< "Caps" is locked */ +}; + +}} // Tizen::Ui + +#endif // _FUI_KEY_TYPES_H_ + diff --git a/inc/FUiKeyboardMap.h b/inc/FUiKeyboardMap.h new file mode 100644 index 0000000..5537347 --- /dev/null +++ b/inc/FUiKeyboardMap.h @@ -0,0 +1,310 @@ +// +// 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. +// + +/** + * @if OSPDEPREC + * @file FUiKeyboardMap.h + * @brief This is the header file for the %KeyboardMap class. + * + * This header file contains the declarations of the %KeyboardMap class. + * @endif + */ + +#ifndef _FUI_KEYBOARD_MAP_H_ +#define _FUI_KEYBOARD_MAP_H_ + +#include +#include +#include +#include + +namespace Tizen {namespace Ui +{ +/** + * @if OSPDEPREC + * @enum KeyboardKeyLabelType + * + * Defines the key label types. @n + * It defines the types of labels that are printed on the corresponding key of the QWERTY keyboard. Only the printing + * keys have one or more text labels. + * + * @brief [Deprecated] + * @deprecated This enum is deprecated because it is not supported by the platform. + * @since 2.0 + * @endif + */ +enum KeyboardKeyLabelType +{ + /** + * @if OSPDEPREC + * The first label to be displayed + * @endif + */ + KEYBOARD_KEY_LABEL_1 = 0x0000, + + /** + * @if OSPDEPREC + * 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 @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 @c KEY_CAPSLOCK or @c KEY_FN) + * @endif + */ + KEYBOARD_KEY_LABEL_4, + + /* + * @if OSPDEPREC + * The max value + * @endif + */ + KEYBOARD_KEY_LABEL_MAX = 255 +}; + + +/** + * @if OSPDEPREC + * @class KeyboardMap + * @brief [Deprecated] This class manages the hardware keyboard key mapping. + * @deprecated This class is deprecated because it is not supported by the platform. + * @since 2.0 + * + * The %KeyboardMap class maintains a map of hardware keys. You can query the current + * hardware keyboard type of the device and check the availability of a + * specific key. Furthermore, you can query the labels that are printed on the + * hardware keyboard of a specific key. + * + * The following example demonstrates how to use the %KeyboardMap class to get the type of the keyboard and the property of each key. + * + * @code + * KeyboardMap* pKeyboardMap = KeyboardMap::GetInstance(); + * if (pKeyboardMap != null) + * { + * // Gets the keyboard type + * String type = pKeyboardMap->GetKeyboardType(); + * AppLog("The current hardware keyboard type = %ls", type.GetPointer()); + * + * // Checks properties of the hardware key + * bool available = pKeyboardMap->IsKeyAvailable(KEY_A); + * bool printing = pKeyboardMap->IsPrintingKey(KEY_A); + * String l1 = pKeyboardMap->GetDisplayableLabel(KEY_A); + * String l2 = pKeyboardMap->GetDisplayableLabel(KEY_A, KEYBOARD_KEY_LABEL_2); + * String l3 = pKeyboardMap->GetDisplayableLabel(KEY_A, KEYBOARD_KEY_LABEL_3); + * String l4 = pKeyboardMap->GetDisplayableLabel(KEY_A, KEYBOARD_KEY_LABEL_4); + * } + * @endcode + * @endif + */ +class _OSP_EXPORT_ KeyboardMap + : public Tizen::Base::Object +{ +public: + /** + * @if OSPDEPREC + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @brief [Deprecated] + * @deprecated This class is deprecated because it is not supported by the platform. + * @since 2.0 + * @endif + */ + virtual ~KeyboardMap(void); + + /** + * @if OSPDEPREC + * Gets a pointer to the %KeyboardMap instance. + * + * @brief [Deprecated] + * @deprecated This class is deprecated because it is not supported by the platform. + * @since 2.0 + * + * @return The current %KeyboardMap instance + * @endif + */ + static KeyboardMap* GetInstance(void); + +public: + /** + * @if OSPDEPREC + * Checks whether the specified key is a printing key (the key has one or more labels printed on the corresponding key). + * + * @brief [Deprecated] + * @deprecated This class is deprecated because it is not supported by the platform. + * @since 2.0 + * + * @return @c true if the specified key is a printing key, @n + * else @c false + * @param[in] keyCode The key + * @endif + */ + bool IsPrintingKey(KeyCode keyCode) const; + + /** + * @if OSPDEPREC + * Checks whether the specified key is available on the current keyboard. + * + * @brief [Deprecated] + * @deprecated This class is deprecated because it is not supported by the platform. + * @since 2.0 + * + * @return @c true if the specified key is available on the current keyboard, @n + * else @c false + * @param[in] keyCode The key + * @endif + */ + bool IsKeyAvailable(KeyCode keyCode) const; + + /** + * @if OSPDEPREC + * Gets the name of the keyboard type. + * + * @brief [Deprecated] + * @deprecated This class is deprecated because it is not supported by the platform. + * @since 2.0 + * + * @return The name of the keyboard type + * @remarks The name of the keyboard type follows the following naming convention: @n + * GENERAL-TYPE_KEY-LAYOUT_LANGUAGE/COUNTRY/REGION (for example, QWERTY_11x4_EUROPE, + * NUMERIC_3x4_EUROPE). @n If the device does not have a keyboard, the method returns "NONE". @n + * @remarks + * Supported keyboard types + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Keyboard Type Languages
QWERTY_11x4_GLOBAL English
QWERTY_11x4_EUROPE English
QWERTY_11x4_UK English
QWERTY_11x4_FRANCE French, English
QWERTY_11x4_GERMAN German, English
QWERTY_11x4_GREECE Greek, English
QWERTY_11x4_ITALY Italian, English
QWERTY_11x4_NORDIC North Germanic
QWERTY_11x4_RUSSIA Russian, English
QWERTY_11x4_SPAIN Spanish, English
QWERTY_11x4_TURKEY English
QWERTY_11x4_NORTH-AFRICA English, English
QWERTY_11x4_ARAB Arabic, English
QWERTY_11x4_IRAN Farsi, English
QWERTY_11x4_PARKISTAN Urdu, English
QWERTY_11x4_ISRAEL Hebrew, English
QWERTY_11x4_CHINA English
QWERTY_11x4_HONGKONG Chinese Traditional, English
QWERTY_11x4_SINGAPORE English
QWERTY_11x4_THAILAND Thai, English
QWERTY_11x4_TAIWAN Chinese Traditional, English
QWERTY_11x4_VIETNAM Vietnamese, English
QWERTY_11x4_JAPAN Japanese, English
QWERTY_11x4_KOREA Korean, English
QWERTY_11x4_NORTH-AMERICA English
+ * @endif + */ + Tizen::Base::String GetKeyboardType(void) const; + + /** + * @if OSPDEPREC + * Gets the label of the specified key. + * + * @brief [Deprecated] + * @deprecated This class is deprecated because it is not supported by the platform. + * @since 2.0 + * + * @return The text of the label, @n + * else an empty string if the specified key is not a printing key or the secondary/tertiary character label is not defined + * @param[in] keyCode The key + * @param[in] type The keyboard key label type + * @endif + */ + Tizen::Base::String GetDisplayableLabel(KeyCode keyCode, KeyboardKeyLabelType type = KEYBOARD_KEY_LABEL_1) const; + +protected: + /** + * @if OSPDEPREC + * This is the default constructor for this class. + * + * @brief [Deprecated] + * @deprecated This class is deprecated because it is not supported by the platform. + * @since 2.0 + * @endif + */ + KeyboardMap(void); + + /** + * @if OSPDEPREC + * Initializes this instance of %KeyboardMap. + * + * @brief [Deprecated] + * @deprecated This class is deprecated because it is not supported by the platform. + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_IO An IO error has occurred. + * @exception E_SYSTEM A system error has occurred. + * @endif + */ + result Construct(void); + +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. + // + // Gets KeyCode of the specified system key. + // + // @since 2.0 + // @return The key code + // @param[in] systemKeyCode The system key + // + KeyCode GetKeyCode(int systemKeyCode) const; + + // + // 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. + // + // Loads keyboard map table from file. + // + // @since 2.0 + // @return An error code + // @exception E_SUCCESS The method is successful. + // @exception E_IO An unexpected IO error has occurred. + // @exception E_SYSTEM A system error has occurred. + // + result LoadKeyboarMapFromFile(void); +private: + static void InitializeInstance(void); + +}; // KeyboardMap + +}} // Tizen::Ui + +#endif // _FUI_KEYBOARD_MAP_H_ diff --git a/inc/FUiLayout.h b/inc/FUiLayout.h new file mode 100644 index 0000000..58941d0 --- /dev/null +++ b/inc/FUiLayout.h @@ -0,0 +1,101 @@ +// +// 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 FUiLayout.h + * @brief This is the header file for the %Layout class. + * + * This header file contains the declarations of the %Layout class. + */ + +#ifndef _FUI_LAYOUT_H_ +#define _FUI_LAYOUT_H_ + +#include +#include + +namespace Tizen { namespace Ui +{ + +/** + * @class Layout + * @brief This class is the abstract base class of all the %Layout classes. + * + * @since 2.0 + * + * The %Layout class is the abstract base class of all the %Layout classes. + * + * For more information on the class features, see Layout. + */ +class _OSP_EXPORT_ Layout + : public Tizen::Base::Object +{ +public: + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~Layout(void); + + /** + * Gets the type of the layout. + * + * @since 2.0 + * + * @return The layout type + */ + virtual LayoutType GetLayoutType(void) const = 0; + + /** + * Updates the layout. + * + * @since 2.0 + * + * @return An error code + * + * @exception E_SUCCESS The method is successful. + */ + result Update(void); + +protected: + /** + * This is the default constructor for this class. + * + * @since 2.0 + */ + Layout(void); + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + Layout(const Layout& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + Layout& operator =(const Layout& rhs); + +protected: + void* _pImpl; + friend class _LayoutImpl; +}; // Layout + +}} // Tizen::Ui + +#endif // _FUI_LAYOUT_H_ diff --git a/inc/FUiLayoutTypes.h b/inc/FUiLayoutTypes.h new file mode 100644 index 0000000..305b900 --- /dev/null +++ b/inc/FUiLayoutTypes.h @@ -0,0 +1,163 @@ +// +// 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 FUiLayoutTypes.h + * @brief This is the header file for the layout enumerations. + * + * This header file contains the declarations of the layout enumerations. + */ +#ifndef _FUI_LAYOUT_ENUM_H_ +#define _FUI_LAYOUT_ENUM_H_ + +namespace Tizen { namespace Ui +{ + +/** + * @enum LayoutType + * + * Defines the layout types. + * + * @since 2.0 + */ +enum LayoutType +{ + LAYOUT_RELATIVE, /**< The relative layout */ + LAYOUT_VERTICAL_BOX, /**< The vertical box layout */ + LAYOUT_HORIZONTAL_BOX, /**< The horizontal box layout */ + LAYOUT_GRID, /**< The grid layout */ + LAYOUT_CARD /**< The card layout */ +}; + +/** + * @enum RectangleEdgeRelation + * + * Defines the relative relation between the source control and the target control. + * + * @since 2.0 + */ +enum RectangleEdgeRelation +{ + RECT_EDGE_RELATION_LEFT_TO_LEFT, /**< The left edge of the source control is aligned with the left edge of the target control */ + RECT_EDGE_RELATION_LEFT_TO_RIGHT, /**< The left edge of the source control is aligned with the right edge of the target control */ + RECT_EDGE_RELATION_RIGHT_TO_RIGHT, /**< The right edge of the source control is aligned with the right edge of the target control */ + RECT_EDGE_RELATION_RIGHT_TO_LEFT, /**< The right edge of the source control is aligned with the left edge of the target control */ + RECT_EDGE_RELATION_TOP_TO_TOP, /**< The top edge of the source control is aligned with the top edge of the target control */ + RECT_EDGE_RELATION_TOP_TO_BOTTOM, /**< The top edge of the source control is aligned with the bottom edge of the target control */ + RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM, /**< The bottom edge of the source control is aligned with the bottom edge of the target control */ + RECT_EDGE_RELATION_BOTTOM_TO_TOP /**< The bottom edge of the source control is aligned with the top edge of the target control */ +}; + +/** + * @enum RectangleEdgeType + * + * Defines the edges of a rectangle. + * + * @since 2.0 + */ +enum RectangleEdgeType +{ + RECT_EDGE_LEFT, /**< The left edge of a rectangle */ + RECT_EDGE_RIGHT, /**< The right edge of a rectangle */ + RECT_EDGE_TOP, /**< The top edge of a rectangle */ + RECT_EDGE_BOTTOM /**< The bottom edge of a rectangle */ +}; + +/** + * @enum CenterAlignmentType + * + * Defines the center alignment for a control. + * + * @since 2.0 + */ +enum CenterAlignmentType +{ + CENTER_ALIGN_HORIZONTAL, /**< Centers the child control horizontally with respect to the left and right side of its parent control */ + CENTER_ALIGN_VERTICAL /**< Centers the child control vertically with respect to the top and bottom side of its parent control */ +}; + +/** + * @enum FitPolicy + * + * Defines the fitting policy for a control. + * + * @since 2.0 + */ +enum FitPolicy +{ + FIT_POLICY_FIXED, /**< The fixed size of a control */ + FIT_POLICY_CONTENT, /**< The size of the control that is large enough to fit its internal content */ + FIT_POLICY_PARENT /**< The size of the control that is as large as its parent control */ +}; + +/** + * @enum VerticalDirection + * + * Defines the direction for the vertical box layout. + * + * @since 2.0 + */ +enum VerticalDirection +{ + VERTICAL_DIRECTION_DOWNWARD, /**< The direction that runs from top to bottom */ + VERTICAL_DIRECTION_UPWARD /**< The direction that runs from bottom to top */ +}; + +/** + * @enum HorizontalDirection + * + * Defines the direction for the horizontal box layout. + * + * @since 2.0 + */ +enum HorizontalDirection +{ + HORIZONTAL_DIRECTION_RIGHTWARD, /**< The direction that runs from left to right */ + HORIZONTAL_DIRECTION_LEFTWARD /**< The direction that runs from right to left */ +}; + +/** + * @enum LayoutHorizontalAlignment + * + * Defines the horizontal alignment for the grid layout. + * + * @since 2.0 + */ +enum LayoutHorizontalAlignment +{ + LAYOUT_HORIZONTAL_ALIGN_LEFT, /**< The horizontal left alignment of the control */ + LAYOUT_HORIZONTAL_ALIGN_CENTER, /**< The horizontal center alignment of the control */ + LAYOUT_HORIZONTAL_ALIGN_RIGHT /**< The horizontal right alignment of the control */ +}; + +/** + * @enum LayoutVerticalAlignment + * + * Defines the vertical alignment for the grid layout. + * + * @since 2.0 + */ +enum LayoutVerticalAlignment +{ + LAYOUT_VERTICAL_ALIGN_TOP, /**< The vertical top alignment of the control */ + LAYOUT_VERTICAL_ALIGN_MIDDLE, /**< The vertical middle alignment of the control */ + LAYOUT_VERTICAL_ALIGN_BOTTOM /**< The vertical bottom alignment of the control */ +}; + +}} // Tizen::Ui + +#endif // _FUI_LAYOUT_ENUM_H_ diff --git a/inc/FUiRelativeLayout.h b/inc/FUiRelativeLayout.h new file mode 100644 index 0000000..4e8a190 --- /dev/null +++ b/inc/FUiRelativeLayout.h @@ -0,0 +1,459 @@ +// +// 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 FUiRelativeLayout.h + * @brief This is the header file for the %RelativeLayout class. + * + * This header file contains the declarations of the %RelativeLayout class. + */ + +#ifndef _FUI_RELATIVE_LAYOUT_H_ +#define _FUI_RELATIVE_LAYOUT_H_ + +#include + +namespace Tizen { namespace Ui +{ +class Control; +}} + +namespace Tizen { namespace Ui +{ + +/** + * @class RelativeLayout + * @brief This class positions the children of a container in a manner that is relative to other children or its parent container. + * + * @since 2.0 + * + * The %RelativeLayout class defines the relative layout for a Container. The layout positions the children of the %Container relative to the + * %Container or its other children. @n + * + * For more information on the class features, see Relative Layout. + * + * The following examples demonstrate how to use the %RelativeLayout class. + * @code +// Sample code for RelativeLayoutSample.h +#include + +class RelativeLayoutSample + : public Tizen::Ui::Controls::Form +{ +public: + bool Initialize(void); + virtual result OnInitializing(void); +}; + * @endcode + * + * @code +// Sample code for RelativeLayoutSample.cpp +#include + +#include "RelativeLayoutSample.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; + +bool +RelativeLayoutSample::Initialize(void) +{ + // Creates an instance of RelativeLayout + RelativeLayout relativeFormLayout; + relativeFormLayout.Construct(); + + // Applies the relative layout to the form + Construct(relativeFormLayout, FORM_STYLE_NORMAL); + return true; +} + +result +RelativeLayoutSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + // Creates an instance of RelativeLayout for the top panel + RelativeLayout topPanelLayout; + topPanelLayout.Construct(); + + // Creates an instance of Panel and applies it to the relative layout + Panel* pTopRelativePanel = new Panel(); + pTopRelativePanel->Construct(topPanelLayout, Rectangle(0, 0, 300, 300)); + { + // Creates instances of Button + Button* pUpButton = new Button(); + pUpButton->Construct(Rectangle(0,0,200,100), "UP"); + pTopRelativePanel->AddControl(pUpButton); + + Button* pMiddleButton = new Button(); + pMiddleButton->Construct(Rectangle(0,0,200,100), "CENTER"); + pTopRelativePanel->AddControl(pMiddleButton); + + Button* pDownButton = new Button(); + pDownButton->Construct(Rectangle(0,0,200,100), "DOWN"); + pTopRelativePanel->AddControl(pDownButton); + + // Sets relations between the pUpButton and pMiddleButton + topPanelLayout.SetRelation(*pUpButton, pMiddleButton, RECT_EDGE_RELATION_LEFT_TO_LEFT); + topPanelLayout.SetRelation(*pUpButton, pMiddleButton, RECT_EDGE_RELATION_BOTTOM_TO_TOP); + topPanelLayout.SetMargin(*pUpButton, 0, 0, 0, 10); + + // Sets the middle button + topPanelLayout.SetCenterAligned(*pMiddleButton, CENTER_ALIGN_HORIZONTAL); + topPanelLayout.SetCenterAligned(*pMiddleButton, CENTER_ALIGN_VERTICAL); + topPanelLayout.SetMargin(*pMiddleButton, 10, 10, 10, 10); + + // Sets relations between the pDownButton and the pMiddleButton + topPanelLayout.SetRelation(*pDownButton, pMiddleButton, RECT_EDGE_RELATION_RIGHT_TO_RIGHT); + topPanelLayout.SetRelation(*pDownButton, pMiddleButton, RECT_EDGE_RELATION_TOP_TO_BOTTOM); + topPanelLayout.SetMargin(*pDownButton, 0, 0, 10, 0); + } + + // Adds the top panel to the form + AddControl(pTopRelativePanel); + + // Creates an instance of RelativeLayout for the bottom panel + RelativeLayout bottomPanelLayout; + bottomPanelLayout.Construct(); + + // Creates an instance of Panel and applies it to the relative layout + Panel* pBottomRelativePanel = new Panel(); + pBottomRelativePanel->Construct(bottomPanelLayout, Rectangle(0, 0, 300, 300)); + { + // Creates instances of Label + Label* pFixedLabel = new Label(); + pFixedLabel->Construct(Rectangle(0, 0, 150, 80), L"FIXED"); + pFixedLabel->SetBackgroundColor(Color::GetColor(COLOR_ID_YELLOW)); + pFixedLabel->SetTextColor(Color::GetColor(COLOR_ID_BLACK)); + pBottomRelativePanel->AddControl(pFixedLabel); + + Label* pScalableLabel = new Label(); + pScalableLabel->Construct(Rectangle(0, 0, 150, 80), L"SCALABLE <=>"); + pScalableLabel->SetBackgroundColor(Color::GetColor(COLOR_ID_BLUE)); + pScalableLabel->SetTextColor(Color::GetColor(COLOR_ID_BLACK)); + pBottomRelativePanel->AddControl(pScalableLabel); + + // Sets relations between the fixed label and the panel + bottomPanelLayout.SetCenterAligned(*pFixedLabel, CENTER_ALIGN_VERTICAL); + bottomPanelLayout.SetRelation(*pFixedLabel, pBottomRelativePanel, RECT_EDGE_RELATION_LEFT_TO_LEFT); + bottomPanelLayout.SetRelation(*pFixedLabel, pBottomRelativePanel, RECT_EDGE_RELATION_TOP_TO_TOP); + bottomPanelLayout.SetMargin(*pFixedLabel, 30, 30, 30, 30); + + // Sets relations between the scalable label and the panel + bottomPanelLayout.SetCenterAligned(*pScalableLabel, CENTER_ALIGN_VERTICAL); + bottomPanelLayout.SetRelation(*pScalableLabel, pFixedLabel, RECT_EDGE_RELATION_LEFT_TO_RIGHT); + bottomPanelLayout.SetRelation(*pScalableLabel, pFixedLabel, RECT_EDGE_RELATION_LEFT_TO_RIGHT); + bottomPanelLayout.SetRelation(*pScalableLabel, pBottomRelativePanel, RECT_EDGE_RELATION_RIGHT_TO_RIGHT); + bottomPanelLayout.SetRelation(*pScalableLabel, pBottomRelativePanel, RECT_EDGE_RELATION_TOP_TO_TOP); + bottomPanelLayout.SetMargin(*pScalableLabel, 30, 30, 30, 30); + } + + // Adds the bottom panel to the form + AddControl(pBottomRelativePanel); + + //Gets the layout of the form + RelativeLayout* pFormLayout = dynamic_cast(this->GetLayoutN()); + + // Sets relations of the top relative panel + pFormLayout->SetRelation(*pTopRelativePanel, this, RECT_EDGE_RELATION_LEFT_TO_LEFT); + pFormLayout->SetRelation(*pTopRelativePanel, this, RECT_EDGE_RELATION_RIGHT_TO_RIGHT); + pFormLayout->SetRelation(*pTopRelativePanel, this, RECT_EDGE_RELATION_TOP_TO_TOP); + + // Sets relations of the bottom relative panel + pFormLayout->SetRelation(*pBottomRelativePanel, this, RECT_EDGE_RELATION_LEFT_TO_LEFT); + pFormLayout->SetRelation(*pBottomRelativePanel, this, RECT_EDGE_RELATION_RIGHT_TO_RIGHT); + pFormLayout->SetRelation(*pBottomRelativePanel, this, RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM); + + // Sets relations between the top relative panel and the bottom relative panel + pFormLayout->SetHorizontalFitPolicy(*pTopRelativePanel, FIT_POLICY_PARENT); + pFormLayout->SetHorizontalFitPolicy(*pBottomRelativePanel, FIT_POLICY_PARENT); + pFormLayout->SetVerticalFitPolicy(*pBottomRelativePanel, FIT_POLICY_FIXED); + pFormLayout->SetRelation(*pTopRelativePanel, pBottomRelativePanel, RECT_EDGE_RELATION_BOTTOM_TO_TOP); + + return r; +} + * @endcode + * + */ +class _OSP_EXPORT_ RelativeLayout + : public Layout +{ +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. + * + * @since 2.0 + * + * @remarks After creating an instance of this class, the Construct() method must be called explicitly to initialize this instance. + */ + RelativeLayout(void); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~RelativeLayout(void); + + /** + * Initializes this instance of %RelativeLayout. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + */ + result Construct(void); + + /** + * Gets the type of the layout. + * + * @since 2.0 + * + * @return The layout type + */ + virtual LayoutType GetLayoutType(void) const; + + /** + * Sets the relation of the specified child control with the edge of another control. + * + * @brief [Deprecated] + * @deprecated This method is deprecated. + * @since 2.0 + * + * @return An error code + * @param[in] childControl The control for which the relation is set + * @param[in] targetControl The target control @n + * 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 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 the specified child control with the edge of another control. + * + * @since 2.1 + * + * @return An error code + * @param[in] childControl The control for which the relation is set + * @param[in] pTargetControl The target control @n + * 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 A specified input parameter is invalid. @n + * Either the specified @c childControl or the specified @c pTargetControl is not a child of the container that owns the layout. + * @exception E_SYSTEM A system error has occurred. + */ + result SetRelation(Control& childControl, Control *pTargetControl, RectangleEdgeRelation edgeRelation); + + /** + * Resets the relation of the specified control for the vertical edge. + * + * @since 2.0 + * + * @return An error code + * @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 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); + + /** + * Sets the specified control at the center of the parent control. + * + * @since 2.0 + * + * @return An error code + * @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 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. + */ + result SetCenterAligned(Control& childControl, CenterAlignmentType alignment); + + /** + * Resets the center position of the specified control. + * + * @since 2.0 + * + * @return An error code + * @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 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); + + /** + * Sets the margins of the specified control. + * + * @since 2.0 + * + * @return An error code + * @param[in] childControl The control for which the margins are set + * @param[in] left The left margin + * @param[in] right The right margin + * @param[in] top The top margin + * @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 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 the specified control. + * + * @since 2.1 + * + * @return An error code + * @param[in] childControl The control for which the margins are set + * @param[in] left The left margin + * @param[in] right The right margin + * @param[in] top The top margin + * @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 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, float left, float right, float top, float bottom); + + /** + * Sets the width of the specified control to the fixed size. + * + * @since 2.0 + * + * @return An error code + * @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 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 the specified control to the fixed size. + * + * @since 2.1 + * + * @return An error code + * @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 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, float width); + + /** + * Sets the width of the specified control as per the fitting policy. + * + * @since 2.0 + * + * @return An error code + * @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 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); + + /** + * Sets the height of the specified control to the fixed size. + * + * @since 2.0 + * + * @return An error code + * @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 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 the specified control to the fixed size. + * + * @since 2.1 + * + * @return An error code + * @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 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, float height); + + /** + * Sets the height of the specified control as per the fitting policy. + * + * @since 2.0 + * + * @return An error code + * @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 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); + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + RelativeLayout(const RelativeLayout& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + RelativeLayout& operator =(const RelativeLayout& rhs); + +}; // RelativeLayout + +}} // Tizen::Ui + +#endif // _FUI_RELATIVE_LAYOUT_H_ diff --git a/inc/FUiScenes.h b/inc/FUiScenes.h new file mode 100644 index 0000000..b2de87e --- /dev/null +++ b/inc/FUiScenes.h @@ -0,0 +1,66 @@ +// +// 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 FUiScenes.h + * @brief This is the header file for the %Scenes namespace. + * + * This header file contains the declarations and descriptions of the %Scenes namespace. + */ + +#ifndef _FUI_SCENES_H_ +#define _FUI_SCENES_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +namespace Tizen { namespace Ui +{ +/** + * @namespace Tizen::Ui::Scenes + * @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. + * + * For more information on the class features, see Scene Management. + * + * The following diagram illustrates the relationships between the classes belonging to the %Scenes namespace. + * + * @image html ui_scenes_namespace_classdiagram.png + */ + +namespace Scenes +{ +} +} } // Tizen::Ui + +#endif //_FUI_SCENES_H_ diff --git a/inc/FUiScenesBackwardSceneTransition.h b/inc/FUiScenesBackwardSceneTransition.h new file mode 100644 index 0000000..afbd9e3 --- /dev/null +++ b/inc/FUiScenesBackwardSceneTransition.h @@ -0,0 +1,123 @@ +// +// 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 FUiScenesBackwardSceneTransition.h + * @brief This is the header file for the %BackwardSceneTransition class. + * + * This header file contains the declarations of the %BackwardSceneTransition class. + */ + +#ifndef _FUI_SCENES_BACKWARD_SCENE_TRANSITION_H_ +#define _FUI_SCENES_BACKWARD_SCENE_TRANSITION_H_ + +#include + + +namespace Tizen { namespace Ui { namespace Scenes +{ + +/** + * @class BackwardSceneTransition + * @brief This class is the %BackwardSceneTransition class of a %Tizen native application. + * + * @since 2.0 + * + * @final This class is not intended for extension. + * + * The %BackwardSceneTransition class contains transition information, such as transition direction, transition destination, + * animation type, history option, and destroy option. By default, the transition direction is set as ::SCENE_TRANSITION_DIRECTION_BACKWARD + * and the history option is set as ::SCENE_HISTORY_OPTION_NO_HISTORY. @n + * + * For more information on the class features, see Scene Management. + */ +class _OSP_EXPORT_ BackwardSceneTransition + : public Tizen::Ui::Scenes::SceneTransition +{ +public: + /** + * This is the default constructor for this class. + * + * @since 2.0 + * + * @remarks Use this constructor for adjacent backward transition with default options + * (::SCENE_TRANSITION_ANIMATION_TYPE_NONE, ::SCENE_DESTROY_OPTION_DESTROY). + */ + BackwardSceneTransition(void); + + /** + * Initializes this instance of %BackwardSceneTransition with the specified parameters. + * + * @since 2.0 + * + * @param[in] animationType The transition animation type + * @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, + SceneDestroyOption destroyOption = SCENE_DESTROY_OPTION_DESTROY); + + /** + * Initializes this instance of %BackwardSceneTransition with the specified parameters. + * + * @since 2.0 + * + * @param[in] destinationSceneId The scene ID of transition destination + * @param[in] animationType The transition animation type + * @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, + SceneTransitionAnimationType animationType = SCENE_TRANSITION_ANIMATION_TYPE_NONE, + SceneDestroyOption destroyOption = SCENE_DESTROY_OPTION_DESTROY); + + /** + * This destructor overrides Tizen::Ui::Scenes::SceneTransition::~SceneTransition(). + * + * @since 2.0 + */ + virtual ~BackwardSceneTransition(void); + +protected: + // + // This method is for internal use only. Using this method can cause behavioral, + // security-related, and consistency-related issues in the application. + // + // @since 2.0 + // + virtual void BackwardSceneTransition_Reserved1(void) {} + + // + // This method is for internal use only. Using this method can cause behavioral, + // security-related, and consistency-related issues in the application. + // + // @since 2.0 + // + virtual void BackwardSceneTransition_Reserved2(void) {} + + // + // This method is for internal use only. Using this method can cause behavioral, + // security-related, and consistency-related issues in the application. + // + // @since 2.0 + // + virtual void BackwardSceneTransition_Reserved3(void) {} + +}; // BackwardSceneTransition +} } } // Tizen::Ui::Scenes + +#endif // _FUI_SCENES_BACKWARD_SCENE_TRANSITION_H_ diff --git a/inc/FUiScenesForwardSceneTransition.h b/inc/FUiScenesForwardSceneTransition.h new file mode 100644 index 0000000..9bd4a44 --- /dev/null +++ b/inc/FUiScenesForwardSceneTransition.h @@ -0,0 +1,126 @@ +// +// 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 FUiScenesForwardSceneTransition.h + * @brief This is the header file for the %ForwardSceneTransition class. + * + * This header file contains the declarations of the %ForwardSceneTransition class. + */ + +#ifndef _FUI_SCENES_FORWARD_SCENE_TRANSITION_H_ +#define _FUI_SCENES_FORWARD_SCENE_TRANSITION_H_ + +#include + + +namespace Tizen { namespace Ui { namespace Scenes +{ + +/** + * @class ForwardSceneTransition + * @brief This class is the %ForwardSceneTransition class of a %Tizen native application. + * + * @since 2.0 + * + * @final This class is not intended for extension. + * + * The %ForwardSceneTransition class contains transition information, such as transition direction, transition destination, + * animation type, history option, and destroy option. By default, the transition direction is set as ::SCENE_TRANSITION_DIRECTION_FORWARD. @n + * + * For more information on the class features, see Scene Management. + */ +class _OSP_EXPORT_ ForwardSceneTransition + : public Tizen::Ui::Scenes::SceneTransition +{ +public: + /** + * This is the default constructor for this class. + * + * @since 2.0 + * + * @remarks Use this constructor for transition through the policy provider with default options + * (::SCENE_TRANSITION_ANIMATION_TYPE_NONE, ::SCENE_HISTORY_OPTION_ADD_HISTORY, ::SCENE_DESTROY_OPTION_KEEP). + */ + ForwardSceneTransition(void); + + /** + * Initializes this instance of %ForwardSceneTransition with the specified parameters. + * + * @since 2.0 + * + * @param[in] destinationSceneId The scene ID of transition destination + * @param[in] animationType The transition animation type + * @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, + SceneTransitionAnimationType animationType = SCENE_TRANSITION_ANIMATION_TYPE_NONE, + SceneHistoryOption historyOption = SCENE_HISTORY_OPTION_ADD_HISTORY, + SceneDestroyOption destroyOption = SCENE_DESTROY_OPTION_KEEP); + + /** + * Initializes this instance of %ForwardSceneTransition with the specified parameters. + * + * @since 2.0 + * + * @param[in] animationType The transition animation type + * @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, + SceneHistoryOption historyOption = SCENE_HISTORY_OPTION_ADD_HISTORY, + SceneDestroyOption destroyOption = SCENE_DESTROY_OPTION_KEEP); + + /** + * This destructor overrides Tizen::Ui::Scenes::SceneTransition::~SceneTransition(). + * + * @since 2.0 + */ + virtual ~ForwardSceneTransition(void); + +protected: + // + // This method is for internal use only. Using this method can cause behavioral, + // security-related, and consistency-related issues in the application. + // + // @since 2.0 + // + virtual void ForwardSceneTransition_Reserved1(void) {} + + // + // This method is for internal use only. Using this method can cause behavioral, + // security-related, and consistency-related issues in the application. + // + // @since 2.0 + // + virtual void ForwardSceneTransition_Reserved2(void) {} + + // + // This method is for internal use only. Using this method can cause behavioral, + // security-related, and consistency-related issues in the application. + // + // @since 2.0 + // + virtual void ForwardSceneTransition_Reserved3(void) {} + +}; // ForwardSceneTransition +} } } // Tizen::Ui::Scenes + +#endif // _FUI_SCENES_FORWARD_SCENE_TRANSITION_H_ diff --git a/inc/FUiScenesIFormFactory.h b/inc/FUiScenesIFormFactory.h new file mode 100644 index 0000000..9c35efd --- /dev/null +++ b/inc/FUiScenesIFormFactory.h @@ -0,0 +1,103 @@ +// +// 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 FUiScenesIFormFactory.h + * @brief This is the header file for the %IFormFactory interface. + * + * This header file contains the declarations of the %IFormFactory interface. + */ + +#ifndef _FUI_SCENES_IFORM_FACTORY_H_ +#define _FUI_SCENES_IFORM_FACTORY_H_ + +#include +#include + + +namespace Tizen { namespace Ui { namespace Controls +{ +class Form; +}}} + + +namespace Tizen { namespace Ui { namespace Scenes +{ + +/** + * @interface IFormFactory + * @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 a form ID string when an instance of %Form control is required. + * + * For more information on the class features, see Scene Management. + */ +class _OSP_EXPORT_ IFormFactory +{ +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. + * + * @since 2.0 + */ + virtual ~IFormFactory(void) {} + + /** + * Creates a Form instance. + * + * @since 2.0 + * + * @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. + */ + virtual Tizen::Ui::Controls::Form* CreateFormN(const Tizen::Base::String& formId, const Tizen::Ui::Scenes::SceneId& sceneId) = 0; + +protected: + // + // This method is for internal use only. Using this method can cause behavioral, + // security-related, and consistency-related issues in the application. + // + // @since 2.0 + // + virtual void IFormFactory_Reserved1(void) {} + + // + // This method is for internal use only. Using this method can cause behavioral, + // security-related, and consistency-related issues in the application. + // + // @since 2.0 + // + virtual void IFormFactory_Reserved2(void) {} + + // + // This method is for internal use only. Using this method can cause behavioral, + // security-related, and consistency-related issues in the application. + // + // @since 2.0 + // + virtual void IFormFactory_Reserved3(void) {} + +}; // IFormFactory +} } } // Tizen::Ui::Scenes + +#endif //_FUI_SCENES_IFORM_FACTORY_H_ diff --git a/inc/FUiScenesIPanelFactory.h b/inc/FUiScenesIPanelFactory.h new file mode 100644 index 0000000..3bae583 --- /dev/null +++ b/inc/FUiScenesIPanelFactory.h @@ -0,0 +1,103 @@ +// +// 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 FUiScenesIPanelFactory.h + * @brief This is the header file for the %IPanelFactory interface. + * + * This header file contains the declarations of the %IPanelFactory interface. + */ + +#ifndef _FUI_SCENES_IPANEL_FACTORY_H_ +#define _FUI_SCENES_IPANEL_FACTORY_H_ + +#include +#include + + +namespace Tizen { namespace Ui { namespace Controls +{ +class Panel; +}}} + + +namespace Tizen { namespace Ui { namespace Scenes +{ + +/** + * @interface IPanelFactory + * @brief This interface is the factory interface for creating the Panel control instance. + * + * @since 2.0 + * + * The %IPanelFactory interface is the factory interface for creating the Panel control instance. + * The SceneManager class calls CreatePanelN() with panel ID string when an instance of %Panel control is required. + * + * For more information on the class features, see Scene Management. + */ +class _OSP_EXPORT_ IPanelFactory +{ +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. + * + * @since 2.0 + */ + virtual ~IPanelFactory(void) {} + + /** + * Creates a Panel instance. + * + * @since 2.0 + * + * @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. + */ + virtual Tizen::Ui::Controls::Panel* CreatePanelN(const Tizen::Base::String& panelId, const Tizen::Ui::Scenes::SceneId& sceneId) = 0; + +protected: + // + // This method is for internal use only. Using this method can cause behavioral, + // security-related, and consistency-related issues in the application. + // + // @since 2.0 + // + virtual void IPanelFactory_Reserved1(void) {} + + // + // This method is for internal use only. Using this method can cause behavioral, + // security-related, and consistency-related issues in the application. + // + // @since 2.0 + // + virtual void IPanelFactory_Reserved2(void) {} + + // + // This method is for internal use only. Using this method can cause behavioral, + // security-related, and consistency-related issues in the application. + // + // @since 2.0 + // + virtual void IPanelFactory_Reserved3(void) {} + +}; // IPanelFactory +} } } // Tizen::Ui::Scenes + +#endif //_FUI_SCENES_IPANEL_FACTORY_H_ diff --git a/inc/FUiScenesISceneAnimationProvider.h b/inc/FUiScenesISceneAnimationProvider.h new file mode 100644 index 0000000..057cb2f --- /dev/null +++ b/inc/FUiScenesISceneAnimationProvider.h @@ -0,0 +1,110 @@ +// +// 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 FUiScenesISceneAnimationProvider.h + * @brief This is the header file for the %ISceneAnimationProvider interface. + * + * This header file contains the declarations of the %ISceneAnimationProvider interface. + */ + +#ifndef _FUI_SCENES_ISCENE_ANIMATION_PROVIDER_H_ +#define _FUI_SCENES_ISCENE_ANIMATION_PROVIDER_H_ + +#include + + +namespace Tizen { namespace Base { namespace Collection +{ +class IList; +}}} + + +namespace Tizen { namespace Ui { namespace Scenes +{ + +/** + * @interface ISceneAnimationProvider + * @brief This interface is the interface for providing custom animation operation on scene transition. + * + * @since 2.0 + * + * The %ISceneAnimationProvider interface is the interface for providing custom animation operation on scene transition. + * + * For more information on the class features, see Transition Animations. + */ +class _OSP_EXPORT_ ISceneAnimationProvider +{ +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. + * + * @since 2.0 + */ + virtual ~ISceneAnimationProvider(void) {} + + /** + * 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 the argument list + * @param[in] type The animation type + * @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, + Tizen::Ui::Scenes::SceneTransitionAnimationType type, bool formTransition) = 0; + +protected: + // + // This method is for internal use only. Using this method can cause behavioral, + // security-related, and consistency-related issues in the application. + // + // @since 2.0 + // + virtual void ISceneAnimationProvider_Reserved1(void) {} + + // + // This method is for internal use only. Using this method can cause behavioral, + // security-related, and consistency-related issues in the application. + // + // @since 2.0 + // + virtual void ISceneAnimationProvider_Reserved2(void) {} + + // + // This method is for internal use only. Using this method can cause behavioral, + // security-related, and consistency-related issues in the application. + // + // @since 2.0 + // + virtual void ISceneAnimationProvider_Reserved3(void) {} + +}; // ISceneAnimationProvider +} } } // Tizen::Ui::Scenes + +#endif //_FUI_SCENES_ISCENE_ANIMATION_PROVIDER_H_ diff --git a/inc/FUiScenesISceneEventListener.h b/inc/FUiScenesISceneEventListener.h new file mode 100644 index 0000000..729c98d --- /dev/null +++ b/inc/FUiScenesISceneEventListener.h @@ -0,0 +1,123 @@ +// +// 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 FUiScenesISceneEventListener.h + * @brief This is the header file for the %ISceneEventListener interface. + * + * This header file contains the declarations of the %ISceneEventListener interface. + */ + +#ifndef _FUI_SCENES_ISCENE_EVENT_LISTENER_H_ +#define _FUI_SCENES_ISCENE_EVENT_LISTENER_H_ + +#include +#include +#include +#include + + +namespace Tizen { namespace Base { namespace Collection +{ +class IList; +}}} + + +namespace Tizen { namespace Ui { namespace Scenes +{ + +/** + * @interface ISceneEventListener + * @brief This interface is the listener interface for receiving the scene transition events. + * + * @since 2.0 + * + * The %ISceneEventListener interface is the listener interface for receiving the scene transition events. + * The class that processes a scene transition event implements this interface and registers using + * the SceneManager::AddSceneEventListener() method. + * + * For more information on the class features, see Scene Management. + */ +class _OSP_EXPORT_ ISceneEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +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. + * + * @since 2.0 + */ + virtual ~ISceneEventListener(void) {} + + /** + * 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. + * + * @since 2.0 + * + * @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 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; + + /** + * Called when the current scene is deactivated. + * + * @since 2.0 + * + * @param[in] currentSceneId The scene ID of the scene being deactivated + * @param[in] nextSceneId The scene ID of the next active scene + * + */ + virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, + const Tizen::Ui::Scenes::SceneId& nextSceneId) = 0; + + +protected: + // + // This method is for internal use only. Using this method can cause behavioral, + // security-related, and consistency-related issues in the application. + // + // @since 2.0 + // + virtual void ISceneEventListener_Reserved1(void) {} + + // + // This method is for internal use only. Using this method can cause behavioral, + // security-related, and consistency-related issues in the application. + // + // @since 2.0 + // + virtual void ISceneEventListener_Reserved2(void) {} + + // + // This method is for internal use only. Using this method can cause behavioral, + // security-related, and consistency-related issues in the application. + // + // @since 2.0 + // + virtual void ISceneEventListener_Reserved3(void) {} + +}; // ISceneEventListener +} } } // Tizen::Ui::Scenes + +#endif //_FUI_SCENES_ISCENE_EVENT_LISTENER_H_ diff --git a/inc/FUiScenesISceneManagerEventListener.h b/inc/FUiScenesISceneManagerEventListener.h new file mode 100644 index 0000000..e7c164e --- /dev/null +++ b/inc/FUiScenesISceneManagerEventListener.h @@ -0,0 +1,109 @@ +// +// 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 FUiScenesISceneManagerEventListener.h + * @brief This is the header file for the %ISceneManagerEventListener interface. + * + * This header file contains the declarations of the %ISceneManagerEventListener interface. + */ + +#ifndef _FUI_SCENES_ISCENE_MANAGER_EVENT_LISTENER_H_ +#define _FUI_SCENES_ISCENE_MANAGER_EVENT_LISTENER_H_ + +#include +#include + + +namespace Tizen { namespace Ui { namespace Scenes +{ + +/** + * @interface ISceneManagerEventListener + * @brief This interface provides listeners for managing scenes and scene states. + * + * @since 2.0 + * + * The %ISceneManagerEventListener interface provides listeners for managing scenes and scene states. + * + * For more information on the class features, see Scene Management. + */ +class _OSP_EXPORT_ ISceneManagerEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +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. + * + * @since 2.0 + */ + virtual ~ISceneManagerEventListener(void) {} + + /** + * Called when the scene transition is started. + * + * @since 2.0 + * + * @param[in] currentSceneId The scene ID of the scene being deactivated + * @param[in] nextSceneId The scene ID of the next active scene + * + */ + virtual void OnSceneTransitionStarted(const Tizen::Ui::Scenes::SceneId& currentSceneId, + const Tizen::Ui::Scenes::SceneId& nextSceneId) = 0; + + /** + * Called after the scene transition is completed. + * + * @since 2.0 + * + * @param[in] previousSceneId The scene ID of the deactivated scene + * @param[in] currentSceneId The scene ID of the newly activated scene + * @remarks This method is called after the scene is activated using the ISceneEventListener::OnSceneActivatedN() callback method. + */ + virtual void OnSceneTransitionCompleted(const Tizen::Ui::Scenes::SceneId& previousSceneId, + const Tizen::Ui::Scenes::SceneId& currentSceneId) = 0; + +protected: + // + // This method is for internal use only. Using this method can cause behavioral, + // security-related, and consistency-related issues in the application. + // + // @since 2.0 + // + virtual void ISceneManagerEventListener_Reserved1(void) {} + + // + // This method is for internal use only. Using this method can cause behavioral, + // security-related, and consistency-related issues in the application. + // + // @since 2.0 + // + virtual void ISceneManagerEventListener_Reserved2(void) {} + + // + // This method is for internal use only. Using this method can cause behavioral, + // security-related, and consistency-related issues in the application. + // + // @since 2.0 + // + virtual void ISceneManagerEventListener_Reserved3(void) {} + +}; // ISceneManagerEventListener +} } } // Tizen::Ui::Scenes + +#endif //_FUI_SCENES_ISCENE_MANAGER_EVENT_LISTENER_H_ diff --git a/inc/FUiScenesISceneTransitionPolicyProvider.h b/inc/FUiScenesISceneTransitionPolicyProvider.h new file mode 100644 index 0000000..e73182a --- /dev/null +++ b/inc/FUiScenesISceneTransitionPolicyProvider.h @@ -0,0 +1,104 @@ +// +// 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 FUiScenesISceneTransitionPolicyProvider.h + * @brief This is the header file for the %ISceneTransitionPolicyProvider interface. + * + * This header file contains the declarations of the %ISceneTransitionPolicyProvider interface. + */ + +#ifndef _FUI_SCENES_ISCENE_TRANSITION_POLICY_PROVIDER_H_ +#define _FUI_SCENES_ISCENE_TRANSITION_POLICY_PROVIDER_H_ + +#include + + +namespace Tizen { namespace Base { namespace Collection +{ +class IList; +}}} + + +namespace Tizen { namespace Ui { namespace Scenes +{ + +/** + * @interface ISceneTransitionPolicyProvider + * @brief This interface provides the scene transition policies. + * + * @since 2.0 + * + * The %ISceneTransitionPolicyProvider interface is used to provide the scenario logic for scene transitions. + * + * For more information on the class features, see Scene Management. + */ +class _OSP_EXPORT_ ISceneTransitionPolicyProvider +{ +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. + * + * @since 2.0 + */ + virtual ~ISceneTransitionPolicyProvider(void) {} + + /** + * Gets the next scene. @n + * Called on SceneManager::GoForward with ForwardSceneTransition#ForwardSceneTransition(SceneTransitionAnimationType,SceneHistoryOption,SceneDestroyOption) + * to determine the next scene. + * + * @since 2.0 + * + * @return A scene ID + * @param[in] currentSceneId The scene ID of the active Scene + * @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; + + +protected: + // + // This method is for internal use only. Using this method can cause behavioral, + // security-related, and consistency-related issues in the application. + // + // @since 2.0 + // + virtual void ISceneTransitionPolicyProvider_Reserved1(void) {} + + // + // This method is for internal use only. Using this method can cause behavioral, + // security-related, and consistency-related issues in the application. + // + // @since 2.0 + // + virtual void ISceneTransitionPolicyProvider_Reserved2(void) {} + + // + // This method is for internal use only. Using this method can cause behavioral, + // security-related, and consistency-related issues in the application. + // + // @since 2.0 + // + virtual void ISceneTransitionPolicyProvider_Reserved3(void) {} + +}; // ISceneTransitionPolicyProvider +} } } // Tizen::Ui::Scenes + +#endif //_FUI_SCENES_ISCENE_TRANSITION_POLICY_PROVIDER_H_ diff --git a/inc/FUiScenesScene.h b/inc/FUiScenesScene.h new file mode 100644 index 0000000..920797c --- /dev/null +++ b/inc/FUiScenesScene.h @@ -0,0 +1,190 @@ +// +// 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 FUiScenesScene.h + * @brief This is the header file for the %Scene class. + * + * This header file contains the declarations of the %Scene class. + */ + +#ifndef _FUI_SCENES_SCENE_H_ +#define _FUI_SCENES_SCENE_H_ + +#include +#include + + +namespace Tizen { namespace Ui { namespace Controls +{ +class Form; +class Panel; +}}} + + +namespace Tizen { namespace Ui { namespace Scenes +{ + +class ISceneEventListener; + +/** + * @class Scene + * @brief This class is the %Scene class of a %Tizen native applications. + * + * @since 2.0 + * + * 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 a combination of form and panel, panel can be omitted. + * + * For more information on the class features, see Scene Management. + */ +class _OSP_EXPORT_ Scene + : public Tizen::Base::Object +{ +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~Scene(void); + + /** + * Checks whether the specified instance of %Scene equals the current instance. + * + * @since 2.0 + * + * @return @c true if the specified instance equals the current instance, @n + * else @c false + * @param[in] rhs An instance of %Scene + * @remarks The method returns @c false if the specified object is not %Scene. + */ + virtual bool Equals(const Object& rhs) const; + + /** + * Gets the hash value of the current instance. + * + * @since 2.0 + * + * @return The hash value of the current instance + */ + virtual int GetHashCode(void) const; + + /** + * Gets the string ID of %Scene. + * + * @since 2.0 + * + * @return The name of %Scene + */ + SceneId GetSceneId(void) const; + + /** + * Gets the string ID of Form. + * + * @since 2.0 + * + * @return The name of Form + */ + Tizen::Base::String GetFormId(void) const; + + /** + * Gets the string ID of Panel. + * + * @since 2.0 + * + * @return The name of Panel, @n + * else an empty string if the %Panel is not specified + */ + Tizen::Base::String GetPanelId(void) const; + + /** + * Gets an associated Form instance pointer. + * + * @since 2.0 + * + * @return The Form instance pointer + */ + Tizen::Ui::Controls::Form* GetForm(void) const; + + /** + * 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 an optional component of %Scene so it may not always be valid. + */ + Tizen::Ui::Controls::Panel* GetPanel(void) const; + +protected: + // + // This method is for internal use only. Using this method can cause behavioral, + // security-related, and consistency-related issues in the application. + // + // @since 2.0 + // + virtual void Scene_Reserved1(void) {} + + // + // This method is for internal use only. Using this method can cause behavioral, + // security-related, and consistency-related issues in the application. + // + // @since 2.0 + // + virtual void Scene_Reserved2(void) {} + + // + // This method is for internal use only. Using this method can cause behavioral, + // security-related, and consistency-related issues in the application. + // + // @since 2.0 + // + virtual void Scene_Reserved3(void) {} + +private: + /** + * This default constructor is intentionally declared as private so that only the platform can create an instance. + * + * @since 2.0 + */ + Scene(void); + + /** + * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + * + * @since 2.0 + */ + Scene(const Scene& rhs); + + /** + * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + * + * @since 2.0 + */ + Scene& operator =(const Scene& rhs); + +private: + friend class _SceneImpl; + class _SceneImpl* __pSceneImpl; + +}; // Scene +} } } // Tizen::Ui::Scenes + +#endif //_FUI_SCENES_SCENE_H_ diff --git a/inc/FUiScenesSceneManager.h b/inc/FUiScenesSceneManager.h new file mode 100644 index 0000000..ddc0ef4 --- /dev/null +++ b/inc/FUiScenesSceneManager.h @@ -0,0 +1,524 @@ +// +// 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 FUiScenesSceneManager.h + * @brief This is the header file for the %SceneManager class. + * + * This header file contains the declarations of the %SceneManager class. + */ + +#ifndef _FUI_SCENES_SCENE_MANAGER_H_ +#define _FUI_SCENES_SCENE_MANAGER_H_ + +#include +#include +#include +#include + + +namespace Tizen { namespace Ui { namespace Controls +{ +class Form; +class Panel; +}}} +namespace Tizen { namespace Base { namespace Collection +{ +class IList; +template class IListT; +}}} + + +namespace Tizen { namespace Ui { namespace Scenes +{ + +class Scene; +class ForwardSceneTransition; +class BackwardSceneTransition; +class IFormFactory; +class IPanelFactory; +class ISceneEventListener; +class ISceneManagerEventListener; +class ISceneAnimationProvider; +class ISceneTransitionPolicyProvider; + +/** + * @class SceneManager + * @brief This class provides methods to manage scenes and scene states. + * + * @since 2.0 + * + * @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 + * + * For more information on the class features, see Scene Management and Transition Animations. + */ +class _OSP_EXPORT_ SceneManager + : public Tizen::Base::Object +{ +public: + /** + * Gets the pointer to the %SceneManager instance. + * + * @since 2.0 + * + * @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. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + static SceneManager* GetInstance(void); + + /** + * Registers a form factory. @n + * The IFormFactory::CreateFormN() method is called when a new form is required. + * + * @since 2.0 + * + * @return An error code + * @param[in] formFactory The user-defined form factory instance + * @exception E_SUCCESS The method is successful. + */ + result RegisterFormFactory(const IFormFactory& formFactory); + + /** + * Registers a panel factory. @n + * The IPanelFactory::CreatePanelN() method is called when a new panel is required. + * + * @since 2.0 + * + * @return An error code + * @param[in] panelFactory The user-defined panel factory instance + * @exception E_SUCCESS The method is successful. + */ + result RegisterPanelFactory(const IPanelFactory& panelFactory); + + /** + * Registers a scene. + * A scene is combination of a form and a panel. + * + * @since 2.0 + * + * @return An error code + * @param[in] sceneId The scene ID + * @param[in] formId The form ID string + * @param[in] panelId The panel ID string + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @exception E_OBJ_ALREADY_EXIST The specified @c sceneId already exists. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + * + */ + result RegisterScene(const SceneId& sceneId, const Tizen::Base::String& formId, const Tizen::Base::String& panelId); + + /** + * Registers scene(s) with the specified resource ID. + * The %RegisterScene() method does not remove a scene that is already registered. + * + * @since 2.0 + * + * @return An error code + * @param[in] resourceId The resource ID of the scene(s) @n + * 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. + * @exception E_OBJ_ALREADY_EXIST A scene ID already exists. + * @exception E_SYSTEM A system error has occurred. + * @see UnregisterScene() + * + */ + result RegisterScene(const Tizen::Base::String& resourceId); + + /** + * Unregisters the specified scene. + * + * @since 2.0 + * + * @return An error code + * @param[in] sceneId The scene ID + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_OBJ_NOT_FOUND The specified @c sceneId does not exist. + * @see RegisterScene() + */ + result UnregisterScene(const SceneId& sceneId); + + /** + * Adds a %SceneManager event listener. + * + * @since 2.0 + * + * @return An error code + * @param[in] sceneManagerEventListener An instance of ISceneManagerEventListener to add + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + * @exception E_OBJ_ALREADY_EXIST The listener with the specified type is already added. + * @see RemoveSceneManagerEventListener() + * @see ISceneManagerEventListener::OnSceneTransitionCompleted() + * @see ISceneManagerEventListener::OnSceneTransitionStarted() + */ + result AddSceneManagerEventListener(ISceneManagerEventListener& sceneManagerEventListener); + + /** + * Removes a %SceneManager event listener. + * + * @since 2.0 + * + * @return An error code + * @param[in] sceneManagerEventListener An instance of ISceneManagerEventListener to remove + * @exception E_SUCCESS The method is successful. + * @exception E_OBJ_NOT_FOUND The specified listener is not found. + * @see AddSceneManagerEventListener() + */ + result RemoveSceneManagerEventListener(ISceneManagerEventListener& sceneManagerEventListener); + + /** + * Adds a Scene event listener. + * + * @since 2.0 + * + * @return An error code + * @param[in] sceneId The target scene ID + * @param[in] sceneEventListener An instance of ISceneEventListener to add + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + * @exception E_INVALID_ARG The specified @c sceneId is invalid. + * @exception E_OBJ_ALREADY_EXIST The listener with the specified type is already added. + * @see RemoveSceneEventListener() + * @see ISceneEventListener::OnSceneActivatedN() + * @see ISceneEventListener::OnSceneDeactivated() + */ + result AddSceneEventListener(const SceneId& sceneId, ISceneEventListener& sceneEventListener); + + /** + * Removes a Scene event listener. + * + * @since 2.0 + * + * @return An error code + * @param[in] sceneId The target scene ID + * @param[in] sceneEventListener An instance of ISceneEventListener to remove + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified @c sceneId is invalid. + * @exception E_OBJ_NOT_FOUND The specified @c sceneId is not found. + * @see AddSceneEventListener() + */ + result RemoveSceneEventListener(const SceneId& sceneId, ISceneEventListener& sceneEventListener); + + /** + * Sets a Scene animation provider. + * + * @since 2.0 + * + * @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 + * @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. + */ + result SetSceneAnimationProvider(const SceneId& sceneId, ISceneAnimationProvider* pSceneAnimationProvider); + + /** + * Sets a Scene transition policy provider. + * + * @since 2.0 + * + * @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. + * @see ISceneTransitionPolicyProvider::GetNextScene() + * @see GoForward() + */ + result SetSceneTransitionPolicyProvider(ISceneTransitionPolicyProvider* pSceneTransitionPolicyProvider); + + /** + * Sets the default values for the individual animation types. + * + * @since 2.0 + * + * @return An error code + * @param[in] animationType The target animation type + * @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. + * @see GoForward() + * @see GoBackward() + */ + result SetFormTransitionAnimationDefaultValues(SceneTransitionAnimationType animationType, long duration, + Tizen::Ui::Animations::AnimationInterpolatorType interpolatorType); + + /** + * Requests forward scene transition with the specified scene transition. + * + * @since 2.0 + * + * @return An error code + * @param[in] sceneTransition The scene transition that describes the destination and options + * @param[in] pArgs A pointer to Tizen::Base::Collection::IList that contains the scene transition parameters + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @exception E_IN_PROGRESS A previous transition is in progress. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + * @exception E_OBJ_NOT_FOUND The destination scene ID is not found in the registered scenes. + * @exception E_INVALID_STATE The factory instance ( @ref IFormFactory, @ref IPanelFactory ) or + * ISceneTransitionPolicyProvider is not set. + * @exception E_SYSTEM A system error has occurred. @n + * (Internal logic or failed to create control from a factory). + * @remarks To use the policy provider operation, SceneTransition's destinationSceneId must be of length 0, + * also you must register the user-defined ISceneTransitionPolicyProvider and implement the + * ISceneTransitionPolicyProvider::GetNextScene() callback method. + **/ + result GoForward(const ForwardSceneTransition& sceneTransition, const Tizen::Base::Collection::IList* pArgs = null); + + /** + * Requests forward scene transition with the specified transition ID. + * + * @since 2.0 + * + * @return An error code + * @param[in] transitionId The transition ID that describes the destination and options + * @param[in] pArgs A pointer to Tizen::Base::Collection::IList that contains the scene transition parameters + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @exception E_IN_PROGRESS A previous transition is in progress. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + * @exception E_OBJ_NOT_FOUND The destination scene ID is not found in the registered scenes. + * @exception E_INVALID_STATE The factory instance ( @ref IFormFactory, @ref IPanelFactory ) or + * ISceneTransitionPolicyProvider is not set. + * @exception E_SYSTEM A system error has occurred. @n + * (Internal logic or failed to create control from a factory). + * @remarks To use the policy provider operation, SceneTransition's destinationSceneId must be of length 0, + * also you must register the user-defined ISceneTransitionPolicyProvider and implement the + * ISceneTransitionPolicyProvider::GetNextScene() callback method. + **/ + result GoForward(const SceneTransitionId& transitionId, const Tizen::Base::Collection::IList* pArgs = null); + + /** + * Requests backward scene transition with the specified scene transition. + * + * @since 2.0 + * + * @return An error code + * @param[in] sceneTransition The scene transition that describes the destination and options + * @param[in] pArgs A pointer to Tizen::Base::Collection::IList that contains the scene transition parameters + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @exception E_IN_PROGRESS A previous transition is in progress. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + * @exception E_OBJ_NOT_FOUND The scene ID of the previous scene in the internal history is not found in + * the current registered scenes. + * @exception E_INVALID_STATE The factory instance ( @ref IFormFactory, @ref IPanelFactory ) or + * ISceneTransitionPolicyProvider is not set. + * @exception E_UNDERFLOW The scene history is empty. + * @exception E_SYSTEM A system error has occurred. @n + * (Internal logic or failed to create control from a factory). + * @remarks An item removed from the internal history except the E_SYSTEM exception case. @n + * For non-adjacent backward transition, the current scene and the scenes between the current scene and + * the requested scene would be destroyed if SCENE_DESTROY_OPTION_KEEP is not specified as destroyOption. @n + * If the destroy option is selected then the sibling panel scenes (sharing same base form) are also destroyed. + */ + result GoBackward(const BackwardSceneTransition& sceneTransition, const Tizen::Base::Collection::IList* pArgs = null); + + /** + * Requests backward scene transition with the specified transition ID. + * + * @since 2.0 + * + * @return An error code + * @param[in] transitionId The transition ID that describes the destination and options + * @param[in] pArgs A pointer to Tizen::Base::Collection::IList that contains the scene transition parameters + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @exception E_IN_PROGRESS A previous transition is in progress. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + * @exception E_OBJ_NOT_FOUND The scene ID of the previous scene in the internal history is not found in + * the current registered scenes. + * @exception E_INVALID_STATE The factory instance ( @ref IFormFactory, @ref IPanelFactory ) or + * ISceneTransitionPolicyProvider is not set. + * @exception E_UNDERFLOW The scene history is empty. + * @exception E_SYSTEM A system error has occurred. @n + * (Internal logic or failed to create control from a factory). + * @remarks An item removed from the internal history except the E_SYSTEM exception case. @n + * For non-adjacent backward transition, the current scene and the scenes between the current scene and + * the requested scene would be destroyed if SCENE_DESTROY_OPTION_KEEP is not specified as destroyOption. @n + * If the destroy option is selected then the sibling panel scenes (sharing same base form) are also destroyed. + */ + result GoBackward(const SceneTransitionId& transitionId, const Tizen::Base::Collection::IList* pArgs = null); + + /** + * Gets a pointer to the current Scene instance. + * + * @since 2.0 + * + * @return A pointer to the current Scene instance + * @see GetCurrentSceneId() + */ + Scene* GetCurrentScene(void) const; + + /** + * Gets the current scene ID string. + * + * @since 2.0 + * + * @return The scene ID + * @see GetCurrentScene() + */ + SceneId GetCurrentSceneId(void) const; + + /** + * Checks whether the Scene instance with the specified @c sceneId has been destroyed or not. + * + * @since 2.0 + * + * @return @c true if the scene instance has not been destroyed, @n + * else @c false + * @param[in] sceneId The scene ID + * @remarks This method is useful to check state of the scene, because the scene lifetime is determined + * by scene transition option and user can destroy the scene in real time. + */ + bool IsSceneAlive(const SceneId& sceneId) const; + + /** + * Destroys the specified scene. + * + * @since 2.0 + * + * @return An error code + * @param[in] sceneId The scene ID + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The current scene cannot be destroyed. + * @exception E_OBJ_NOT_FOUND The specified @c sceneId does not exist. + * @exception E_SYSTEM A system error has occurred. + */ + result DestroyScene(const SceneId& sceneId); + + /** + * Brings the current scene to the topmost to get back the control of scene management. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_OPERATION_FAILED The current scene is invalid. + * @exception E_SYSTEM A system error has occurred. + * @remarks If a user sets a form as a current form on a frame by calling Tizen::Ui::Controls::Frame::SetCurrentForm(), + * they will no longer be under the control of %SceneManager. In this case, + * they can get back the control of scene management easily by calling this method. + */ + result BringCurrentSceneToTop(void); + + /** + * Clears the scene history. + * + * @since 2.0 + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @see AddToSceneHistory() + */ + result ClearSceneHistory(void); + + /** + * Adds the scene to the scene history. + * + * @since 2.0 + * + * @return An error code + * @param[in] sceneId The scene ID + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_OBJ_NOT_FOUND The specified @c sceneId is not found in the registered scenes. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + * @see ClearSceneHistory() + */ + result AddToSceneHistory(const SceneId& sceneId); + + /** + * Gets the scene history list. + * + * @since 2.0 + * + * @return A pointer to the list that contains the scene history + * @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. + */ + Tizen::Base::Collection::IListT* GetSceneHistoryN(void) const; + +private: + /** + * This default constructor is intentionally declared as private to implement the Singleton semantic. + * + * @since 2.0 + */ + SceneManager(void); + + /** + * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + * + * @since 2.0 + */ + SceneManager(const SceneManager& rhs); + + /** + * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + * + * @since 2.0 + */ + SceneManager& operator =(const SceneManager& rhs); + + /** + * This destructor is intentionally declared as private to implement the Singleton semantic. + * + * @since 2.0 + */ + virtual ~SceneManager(void); + + /** + * Initializes the instance of the this class. + * + * @since 2.0 + * + * @return An error code. + * @exception E_SUCCESS The method is successful. + * @exception E_SYSTEM A system error has occurred. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + * + */ + result Construct(void); + + static void InitSingleton(void); + static void DestroySingleton(void); + +private: + friend class _SceneManagerImpl; + class _SceneManagerImpl* __pSceneManagerImpl; + static SceneManager* __pSceneManagerInstance; + +}; // SceneManager +} } } // Tizen::Ui::Scenes + +#endif //_FUI_SCENES_SCENE_MANAGER_H_ diff --git a/inc/FUiScenesSceneTransition.h b/inc/FUiScenesSceneTransition.h new file mode 100644 index 0000000..9152873 --- /dev/null +++ b/inc/FUiScenesSceneTransition.h @@ -0,0 +1,267 @@ +// +// 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 FUiScenesSceneTransition.h + * @brief This is the header file for the %SceneTransition class. + * + * This header file contains the declarations of the %SceneTransition class. + */ + +#ifndef _FUI_SCENES_SCENE_TRANSITION_H_ +#define _FUI_SCENES_SCENE_TRANSITION_H_ + +#include +#include + + +namespace Tizen { namespace Ui { namespace Scenes +{ + +/** + * @class SceneTransition + * @brief This class is the %SceneTransition class of a %Tizen native application. + * + * @since 2.0 + * + * The %SceneTransition class contains transition information, such as transition direction, transition destination, + * animation type, history option, and destroy option. @n + * + * For more information on the class features, see Scene Management. + */ +class _OSP_EXPORT_ SceneTransition + : public Tizen::Base::Object +{ +public: + /** + * This is the default constructor for this class. + * + * @since 2.0 + */ + SceneTransition(void); + + /** + * Copying of objects using this copy constructor is allowed. + * + * @since 2.0 + * + * @param[in] rhs An instance of %SceneTransition to copy + */ + SceneTransition(const SceneTransition& rhs); + + /** + * Initializes this instance of %SceneTransition with the specified parameters. + * + * @since 2.0 + * + * @param[in] direction The transition direction + * @param[in] destinationSceneId The scene ID of the transition destination + * @param[in] animationType The transition animation type + * @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, + SceneHistoryOption historyOption, SceneDestroyOption destroyOption); + + /** + * Assigns the value of the specified instance to the current instance of %SceneTransition. + * + * @since 2.0 + * + * @param[in] rhs An instance of %SceneTransition + */ + SceneTransition& operator =(const SceneTransition& rhs); + + /** + * Checks whether the specified instance of %SceneTransition equals the current instance. + * + * @since 2.0 + * + * @return @c true if the specified instance equals the current instance, @n + * else @c false either the specified instance is not equal to the current instance or the specified object is not Scene + * @param[in] rhs An instance of %SceneTransition + */ + virtual bool Equals(const Object& rhs) const; + + /** + * Gets the hash value of the current instance. + * + * @since 2.0 + * + * @return The hash value of the current instance + */ + virtual int GetHashCode(void) const; + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~SceneTransition(void); + + +// result SetTransitionId(TransitionId& transitionId); + + /** + * Sets the scene transition direction. + * + * @since 2.0 + * + * @return An error code + * @param[in] direction The transition direction + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * + */ + result SetDirection(SceneTransitionDirection direction); + + /** + * Gets the scene transition direction. + * + * @since 2.0 + * + * @return The direction of the scene transition + * + */ + SceneTransitionDirection GetDirection(void) const; + + /** + * Sets the scene transition destination scene. + * + * @since 2.0 + * + * @return An error code + * @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. + * + */ + result SetDestinationSceneId(const SceneId& sceneId); + + /** + * Gets the scene transition destination scene. + * + * @since 2.0 + * + * @return The scene ID of the transition destination + * + */ + SceneId GetDestinationSceneId(void) const; + + /** + * Sets the scene transition animation type. + * + * @since 2.0 + * + * @return An error code + * @param[in] animationType The transition animation type + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * + */ + result SetAnimationType(SceneTransitionAnimationType animationType); + + /** + * Gets the scene transition animation type. + * + * @since 2.0 + * + * @return The transition animation type + * + */ + SceneTransitionAnimationType GetAnimationType(void) const; + + /** + * Sets the scene transition history option. + * + * @since 2.0 + * + * @return An error code + * @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. + * + */ + result SetHistoryOption(SceneHistoryOption historyOption); + + /** + * Gets the scene transition history option. + * + * @since 2.0 + * + * @return The history option + * + */ + SceneHistoryOption GetHistoryOption(void) const; + + /** + * Sets the scene transition destroy option. + * + * @since 2.0 + * + * @return An error code + * @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. + * + */ + result SetDestroyOption(SceneDestroyOption destroyOption); + + /** + * Gets the scene transition destroy option. + * + * @since 2.0 + * + * @return The destroy option + * + */ + SceneDestroyOption GetDestroyOption(void) const; + +protected: + // + // This method is for internal use only. Using this method can cause behavioral, + // security-related, and consistency-related issues in the application. + // + // @since 2.0 + // + virtual void SceneTransition_Reserved1(void) {} + + // + // This method is for internal use only. Using this method can cause behavioral, + // security-related, and consistency-related issues in the application. + // + // @since 2.0 + // + virtual void SceneTransition_Reserved2(void) {} + + // + // This method is for internal use only. Using this method can cause behavioral, + // security-related, and consistency-related issues in the application. + // + // @since 2.0 + // + virtual void SceneTransition_Reserved3(void) {} + +private: + friend class _SceneTransitionImpl; + class _SceneTransitionImpl* __pSceneTransitionImpl; + +}; // SceneTransition +} } } // Tizen::Ui::Scenes + +#endif // _FUI_SCENES_SCENE_TRANSITION_H_ diff --git a/inc/FUiScenesTypes.h b/inc/FUiScenesTypes.h new file mode 100644 index 0000000..8f9cee3 --- /dev/null +++ b/inc/FUiScenesTypes.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 FUiScenesTypes.h + * @brief This is the header file for the common data types used by the scene management. + * + * This header file contains the declarations of the common data types and constants used by the scene management. + */ + +#ifndef _FUI_SCENES_TYPES_H_ +#define _FUI_SCENES_TYPES_H_ + + +#include + + +namespace Tizen { namespace Ui { namespace Scenes +{ + +/** + * The scene ID. + * + * @since 2.0 + */ +typedef Tizen::Base::String SceneId; + +/** + * The transition ID. + * + * @since 2.0 + */ +typedef Tizen::Base::String SceneTransitionId; + +/** + * @enum SceneTransitionDirection + * + * Defines the scene transition directions, that is, whether forward or backward. + * + * @since 2.0 + */ +enum SceneTransitionDirection +{ + SCENE_TRANSITION_DIRECTION_FORWARD, /**< The transition is forward */ + SCENE_TRANSITION_DIRECTION_BACKWARD, /**< The transition is backward */ +}; + +/** + * @enum SceneHistoryOption + * + * Defines the scene history operation options that indicate whether to add to history or not. + * + * @since 2.0 + */ +enum SceneHistoryOption +{ + SCENE_HISTORY_OPTION_ADD_HISTORY, /**< The current scene would be added to history */ + SCENE_HISTORY_OPTION_NO_HISTORY, /**< The current scene would not be added to history */ +}; + +/** + * @enum SceneDestroyOption + * + * Defines the scene destroy options. + * + * @since 2.0 + */ +enum SceneDestroyOption +{ + SCENE_DESTROY_OPTION_KEEP, /**< The current scene will not be destroyed */ + SCENE_DESTROY_OPTION_DESTROY, /**< The current scene will be destroyed after the transition is completed */ +}; + +/** + * @enum SceneTransitionAnimationType + * + * Defines the scene transition animation types. + * + * @since 2.0 + * + * @see Animations::FrameAnimatorFormTransitionAnimation + */ +enum SceneTransitionAnimationType +{ + SCENE_TRANSITION_ANIMATION_TYPE_NONE, /**< No transition animation */ + SCENE_TRANSITION_ANIMATION_TYPE_CUSTOM, /**< The custom transition animation with ISceneAnimationProvider */ + SCENE_TRANSITION_ANIMATION_TYPE_LEFT, /**< The transition animation using translate left animation */ + SCENE_TRANSITION_ANIMATION_TYPE_RIGHT, /**< The transition animation using translate right animation */ + SCENE_TRANSITION_ANIMATION_TYPE_FADE_IN_OUT, /**< The transition animation using alpha animation */ + SCENE_TRANSITION_ANIMATION_TYPE_ZOOM_IN, /**< The transition animation using scale animation */ + SCENE_TRANSITION_ANIMATION_TYPE_ZOOM_OUT, /**< The transition animation using scale animation */ + SCENE_TRANSITION_ANIMATION_TYPE_DEPTH_IN, /**< The transition animation using scale and alpha animation */ + SCENE_TRANSITION_ANIMATION_TYPE_DEPTH_OUT, /**< The transition animation using scale and alpha animation */ +}; +} } } // Tizen::Ui::Scenes + +#endif //_FUI_SCENES_TYPES_H_ diff --git a/inc/FUiSystemUtil.h b/inc/FUiSystemUtil.h new file mode 100644 index 0000000..8f0bb5e --- /dev/null +++ b/inc/FUiSystemUtil.h @@ -0,0 +1,181 @@ +// +// 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 FUiSystemUtil.h +* @brief This is the header file for the %SystemUtil class. +* +* This header file contains the declarations of the %SystemUtil class. +* +*/ + +#ifndef _FUI_SYSTEM_UTIL_H_ +#define _FUI_SYSTEM_UTIL_H_ + +#include + +namespace Tizen { namespace Graphics +{ +class Bitmap; +class Point; +class FloatPoint; +}} + +namespace Tizen { namespace Ui +{ + +/** +* @enum KeyEventType +* +* Defines key event types. +* +* @since 2.0 +*/ +enum KeyEventType +{ + KEY_EVENT_TYPE_PRESSED, /**< Key pressed event type */ + KEY_EVENT_TYPE_RELEASED, /**< Key released event type */ +}; + +/** +* @enum TouchEventType +* +* Defines touch event types. +* +* @since 2.0 +*/ +enum TouchEventType +{ + TOUCH_EVENT_TYPE_PRESSED, /**< Touch pressed event type */ + TOUCH_EVENT_TYPE_RELEASED, /**< Touch released event type */ + TOUCH_EVENT_TYPE_MOVED /**< Touch moved event type */ +}; + +/** +* @class SystemUtil +* @brief This class is for system utililty such as touch, key, and capturing screen. It provides +* functionalities to simulate user inputs. +* @since 2.0 +* @final This class is not intended for extension. +* +* The %SystemUtil class provides methods to generate user's input events such as +* touch and key events for helping test application and to capture current screen. +*/ +class _OSP_EXPORT_ SystemUtil +{ +public: + /** + * Generates a key event. + * + * @since 2.0 + * + * @privlevel platform + * @privilege %http://tizen.org/privilege/inputmanager + * + * @return An error code + * @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_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. + */ + static result GenerateKeyEvent(KeyEventType keyEvent, KeyCode keyCode); + + /** + * Generates a touch event. + * + * @since 2.0 + * + * @privlevel platform + * @privilege %http://tizen.org/privilege/inputmanager + * + * @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_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. + */ + static result GenerateTouchEvent(TouchEventType touchEvent, const Tizen::Graphics::Point& point); + + /** + * Generates a touch event. + * + * @since 2.0 + * + * @privlevel platform + * @privilege %http://tizen.org/privilege/inputmanager + * + * @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_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. + */ + static result GenerateTouchEvent(TouchEventType touchEvent, const Tizen::Graphics::FloatPoint& point); + + /** + * Captures a screen. + * + * @since 2.0 + * + * @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 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. + * - 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); + +private: + // + // This default constructor is intentionally declared as private because this class cannot be constructed. + // + SystemUtil(void); + + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + SystemUtil(const SystemUtil& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + SystemUtil& operator =(const SystemUtil& rhs); + + // + // This is a destructor for this class. + // This destructor is intentionally declared as private because this class cannot be constructed. + // + ~SystemUtil(void); + +}; //SystemUtil + +}} //Tizen::Ui +#endif + diff --git a/inc/FUiTouch.h b/inc/FUiTouch.h new file mode 100644 index 0000000..4cc48af --- /dev/null +++ b/inc/FUiTouch.h @@ -0,0 +1,386 @@ +// +// 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. +// + +/** + * @if OSPDEPREC + * @file FUiTouch.h + * @brief This is the header file for the %Touch class. + * + * This header file contains the declarations of the %Touch class. + * @endif + */ + +#ifndef _FUI_TOUCH_H_ +#define _FUI_TOUCH_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui +{ + +class Control; +/** + * @if OSPDEPREC + * @class Touch + * @brief [Deprecated] This class supports multi-point touch for %Touch devices. + * + * @deprecated This class is deprecated because the use of %Touch is no longer recommended. Instead of using this class, use the Tizen::Ui::TouchEventManager class. + * @since 2.0 + * + * @final This class is not intended for extension. + * + * The %Touch class supports multi-point touch, and provides information about touch events. + * + * The following example demonstrates how to use the %Touch class. + * @code +// Sample code for TouchSample.h +#include + +class TouchSample + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::ITouchEventListener +{ +public: + bool Initialize(void); + virtual result OnInitializing(void); + void DisplayMultipointTouchInfo(const Tizen::Ui::Control &source); + + // ITouchEventListener + virtual void OnTouchDoublePressed(const Tizen::Ui::Control &source, const Tizen::Graphics::Point ¤tPosition, const Tizen::Ui::TouchEventInfo &touchInfo); + virtual void OnTouchFocusIn(const Tizen::Ui::Control &source, const Tizen::Graphics::Point ¤tPosition, const Tizen::Ui::TouchEventInfo &touchInfo); + virtual void OnTouchFocusOut(const Tizen::Ui::Control &source, const Tizen::Graphics::Point ¤tPosition, const Tizen::Ui::TouchEventInfo &touchInfo); + virtual void OnTouchLongPressed(const Tizen::Ui::Control &source, const Tizen::Graphics::Point ¤tPosition, const Tizen::Ui::TouchEventInfo &touchInfo); + virtual void OnTouchMoved(const Tizen::Ui::Control &source, const Tizen::Graphics::Point ¤tPosition, const Tizen::Ui::TouchEventInfo &touchInfo); + virtual void OnTouchPressed(const Tizen::Ui::Control &source, const Tizen::Graphics::Point ¤tPosition, const Tizen::Ui::TouchEventInfo &touchInfo); + virtual void OnTouchReleased(const Tizen::Ui::Control &source, const Tizen::Graphics::Point ¤tPosition, const Tizen::Ui::TouchEventInfo &touchInfo); +}; + * @endcode + * + * @code +// Sample code for TouchSample.cpp +#include +#include + +#include "TouchSample.h" + +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; + +bool +TouchSample::Initialize(void) +{ + Construct(FORM_STYLE_NORMAL); + return true; +} + +result +TouchSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + // Creates an instance of Touch + Touch touch; + touch.SetMultipointEnabled(*this, true); + AddTouchEventListener(*this); + + return r; +} + +void +TouchSample::DisplayMultipointTouchInfo(const Control &source) +{ + Touch touch; + IList *pList = touch.GetTouchInfoListN(source); + if (pList) + { + for(int i = 0; i < pList->GetCount(); i++ ) + { + TouchInfo *pTouchInfo = static_cast(pList->GetAt(i)); + AppLog("OnTouchMoved : [%d]%d,%d - %d", pTouchInfo->id, pTouchInfo->position.x, pTouchInfo->position.y, pTouchInfo->status); + } + pList->RemoveAll(true); + delete pList; + } +} + +// ITouchEventListeners implementation +void +TouchSample::OnTouchDoublePressed(const Control &source, const Point ¤tPosition, const TouchEventInfo &touchInfo) +{ + AppLog("OnTouchDoublePressed is called. [%d]%d,%d", touchInfo.GetPointId(), currentPosition.x, currentPosition.y); + DisplayMultipointTouchInfo(source); +} + +void +TouchSample::OnTouchFocusIn(const Control &source, const Point ¤tPosition, const TouchEventInfo &touchInfo) +{ + AppLog("OnTouchFocusIn is called. [%d]%d,%d", touchInfo.GetPointId(), currentPosition.x, currentPosition.y); + DisplayMultipointTouchInfo(source); +} + +void +TouchSample::OnTouchFocusOut(const Control &source, const Point ¤tPosition, const TouchEventInfo &touchInfo) +{ + AppLog("OnTouchFocusOut is called. [%d]%d,%d", touchInfo.GetPointId(), currentPosition.x, currentPosition.y); + DisplayMultipointTouchInfo(source); +} + +void +TouchSample::OnTouchLongPressed(const Control &source, const Point ¤tPosition, const TouchEventInfo &touchInfo) +{ + AppLog("OnTouchLongPressed is called. [%d]%d,%d", touchInfo.GetPointId(), currentPosition.x, currentPosition.y); + DisplayMultipointTouchInfo(source); +} + +void +TouchSample::OnTouchMoved(const Control &source, const Point ¤tPosition, const TouchEventInfo &touchInfo) +{ + AppLog("OnTouchMoved is called. [%d]%d,%d", touchInfo.GetPointId(), currentPosition.x, currentPosition.y); + DisplayMultipointTouchInfo(source); +} + +void +TouchSample::OnTouchPressed(const Control &source, const Point ¤tPosition, const TouchEventInfo &touchInfo) +{ + AppLog("OnTouchPressed is called. [%d]%d,%d", touchInfo.GetPointId(), currentPosition.x, currentPosition.y); + DisplayMultipointTouchInfo(source); +} + +void +TouchSample::OnTouchReleased(const Control &source, const Point ¤tPosition, const TouchEventInfo &touchInfo) +{ + AppLog("OnTouchReleased is called. [%d]%d,%d", touchInfo.GetPointId(), currentPosition.x, currentPosition.y); + DisplayMultipointTouchInfo(source); +} + * @endcode + * @endif + */ +class _OSP_EXPORT_ Touch + : public Tizen::Base::Object +{ +public: + /** + * @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 + */ + Touch(void); + + /** + * @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 + */ + virtual ~Touch(void); + +public: + /** + * @if OSPDEPREC + * Enables or disables the multi-point touch of the Control. + * + * @brief [Deprecated] + * @deprecated This method is deprecated because the %Touch class is not supported any more. Instead, use the Tizen::Ui::Control::SetMultipointTouchEnabled() method. + * @since 2.0 + * + * @return An error code + * @param[in] control The control + * @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 + */ + result SetMultipointEnabled(const Tizen::Ui::Control& control, bool enable); + + /** + * @if OSPDEPREC + * Checks whether the multi-point touch is enabled. + * + * @brief [Deprecated] + * @deprecated This method is deprecated because the %Touch class is not supported any more. Instead, use the Tizen::Ui::Control::IsMultipointTouchEnabled() method. + * @since 2.0 + * + * @return @c true if the multi-point touch is enabled, @n + * else @c false + * @see IsMultipointEnabled() + * @endif + */ + bool IsMultipointEnabled(const Tizen::Ui::Control& control) const; + + + /** + * @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. + * + * @brief [Deprecated] + * @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::GetCurrentPosition() method. + * @since 2.0 + * + * @return The coordinates of the touch + * @remarks If an error occurs, this method returns Point(-1, -1). + * @endif + */ + Tizen::Graphics::Point GetPosition(void) const; + + /** + * @if OSPDEPREC + * Gets the touch position by ID. + * + * @brief [Deprecated] + * @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::GetCurrentPosition() method. + * @since 2.0 + * + * @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 + */ + Tizen::Graphics::Point GetPosition(unsigned long id) const; + + /** + * @if OSPDEPREC + * Gets the touch position relative to the specified control. + * + * @brief [Deprecated] + * @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::GetCurrentPosition() method. + * @since 2.0 + * + * @return The coordinates of the touch + * @param[in] control The source control + * @remarks If an error occurs, this method returns Point(-1, -1). + * @endif + */ + Tizen::Graphics::Point GetPosition(const Tizen::Ui::Control& control) const; + + /** + * @if OSPDEPREC + * Gets the touch position relative to the specified control by ID. + * + * @brief [Deprecated] + * @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::GetCurrentPosition() method. + * @since 2.0 + * + * @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 + */ + Tizen::Graphics::Point GetPosition(const Tizen::Ui::Control& control, unsigned long id) const; + + /** + * @if OSPDEPREC + * Gets the status of the touch by ID. + * + * @brief [Deprecated] + * @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::GetTouchStatus() method. + * @since 2.0 + * + * @param[in] id The ID of the touch + * @return The touch status + * @endif + */ + TouchStatus GetTouchStatus(unsigned long id) const; + + /** + * @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 The list of TouchInfo instances + * @endif + */ + Tizen::Base::Collection::IList* GetTouchInfoListN(void) const; + + /** + * @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 The list of TouchInfo instances + * @param[in] control The source object for calculating the coordinates + * @endif + */ + Tizen::Base::Collection::IList* GetTouchInfoListN(const Tizen::Ui::Control& control) const; + + /** + * @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 multi-point touches + * @endif + */ + int GetPointCount(void) const; + + /** + * @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. + * 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 + */ + unsigned long GetPointId(int index) const; + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + Touch(const Touch&); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + Touch& operator =(const Touch&); +}; // Touch + +} } // Tizen::Ui + +#endif // _FUI_TOUCH_H_ diff --git a/inc/FUiTouchEffect.h b/inc/FUiTouchEffect.h new file mode 100644 index 0000000..82ea75d --- /dev/null +++ b/inc/FUiTouchEffect.h @@ -0,0 +1,158 @@ +// +// Open Service Platform +// Copyright (c) 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 FUiTouchEffect.h + * @brief This is the header file for the %TouchEffect class. + * + * This header file contains the declarations of the %TouchEffect class. + */ + +#ifndef _FUI_TOUCH_EFFECT_H_ +#define _FUI_TOUCH_EFFECT_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui +{ + +class _TouchEffectImpl; + +/** + * @class TouchEffect + * @brief This class is used for the %TouchEffect feature. + * @since 2.2 + * + * + * The %TouchEffect class is used for accessing device's %TouchEffect feature. + * This class also provides features to play effects for input events + * such as touch the screen or the keypad. + * + * The following example demonstrates how to use the %TouchEffect class. + * + * @code + * #include + * #include + * #include + * + * using namespace Tizen::Base; + * using namespace Tizen::Ui; + * + * void TouchEffectExample::TouchEffectPlay(void) + * { + * unique_ptr pTouchEffect(new (std::nothrow) TouchEffect()); + * + * result r = pTouchEffect->Construct(); + * if( IsFailed(r)) + * { + * return; + * } + * + * r = pTouchEffect->Play(TOUCH_EFFECT_TAP); + * if( IsFailed(r)) + * { + * return; + * } + * + * r = pTouchEffect->Play(TOUCH_EFFECT_SIP); + * if( IsFailed(r)) + * { + * return; + * } + * + * r = pTouchEffect->Play(TOUCH_EFFECT_NO_SOUND); + * if( IsFailed(r)) + * { + * return; + * } + * + * } + * @endcode + * + */ + +class _OSP_EXPORT_ TouchEffect + : public Tizen::Base::Object +{ + +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. + * + * @since 2.2 + */ + TouchEffect(void); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.2 + */ + virtual ~TouchEffect(void); + + /** + * Initializes this instance of %TouchEffect. @n + * Every application must call %Construct() before calling any other method of %TouchEffect. + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_OPERATION_FAILED The operation has failed. + */ + result Construct(void); + + /** + * Plays a predefined effect. + * + * @since 2.2 + * + * @return An error code + * @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. + */ + result Play(TouchEffectType type); + +private: + /** + * The implementation of this copy constructor is intentionally blank and declared as private @n + * to prohibit copying of objects. + * + * @since 2.2 + */ + TouchEffect(const TouchEffect& value); + + /** + * The implementation of this copy assignment operator is intentionally blank and declared as private @n + * to prohibit copying of objects. + * + * @since 2.2 + */ + TouchEffect& operator =(const TouchEffect& value); + +private: + _TouchEffectImpl* __pTouchEffectImpl; + friend class _TouchEffectImpl; + +}; // TouchEffect + +} }// Tizen::Ui + +#endif // _FUI_TOUCH_EFFECT_H_ diff --git a/inc/FUiTouchEffectTypes.h b/inc/FUiTouchEffectTypes.h new file mode 100644 index 0000000..3ba10ad --- /dev/null +++ b/inc/FUiTouchEffectTypes.h @@ -0,0 +1,46 @@ +// +// Open Service Platform +// Copyright (c) 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 FUiTouchEffectTypes.h +* @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. +*/ + +#ifndef _FUI_TOUCH_EFFECT_TYPES_H_ +#define _FUI_TOUCH_EFFECT_TYPES_H_ + +namespace Tizen { namespace Ui +{ + +/** +* @enum TouchEffectType +* +* Defines the enumeration for the device's effect types. +* +* @since 2.2 +*/ +enum TouchEffectType +{ + TOUCH_EFFECT_TAP = 0, /**< TAP is used for touching the screen */ + TOUCH_EFFECT_SIP = 1, /**< SIP is used for touching the keypad */ + TOUCH_EFFECT_NO_SOUND = 2 /**< NO_SOUND is used for an effect without a sound */ +}; +} } // Tizen::Ui + +#endif // _FUI_TOUCH_EFFECT_TYPES_H_ diff --git a/inc/FUiTouchEventInfo.h b/inc/FUiTouchEventInfo.h new file mode 100644 index 0000000..7d45eec --- /dev/null +++ b/inc/FUiTouchEventInfo.h @@ -0,0 +1,193 @@ +// +// 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 FUiTouchEventInfo.h + * @brief This is the header file for the %TouchEventInfo class. + * + * This header file contains the declarations of the %TouchEventInfo class. + * + */ + +#ifndef _FUI_TOUCH_EVENT_INFO_H_ +#define _FUI_TOUCH_EVENT_INFO_H_ + +#include +#include +#include + +namespace Tizen { namespace Base { namespace Runtime +{ +class IEventArg; +} } } + +namespace Tizen { namespace Ui +{ + +class _TouchEventInfoImpl; + +/** + * @enum TouchStatus + * + * Defines constants used to identify touch status. + * + * @since 2.0 + */ +enum TouchStatus +{ + TOUCH_PRESSED, /**< The touch pressed event type */ + TOUCH_LONG_PRESSED, /**< The touch long pressed event type */ + TOUCH_RELEASED, /**< The touch released event type */ + TOUCH_MOVED, /**< The touch moved event type */ + 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 cancelled event type */ +}; + +/** + * @class TouchEventInfo + * @brief This class stores the information of each touch events. + * + * @since 2.0 + * + * @final This class is not intended for extension. + * + * The %TouchEventInfo class provides the touch event information: touch position, status, ID, and so on. + * @see ITouchEventListener::OnTouchPressed() + * @see ITouchEventListener::OnTouchReleased() + * @see ITouchEventListener::OnTouchMoved() + * @see ITouchEventListener::OnTouchFocusIn() + * @see ITouchEventListener::OnTouchFocusOut() + * @if OSPDEPREC + * @see ITouchEventListener::OnTouchLongPressed() + * @see ITouchEventListener::OnTouchDoublePressed() + * @endif + * + */ +class _OSP_EXPORT_ TouchEventInfo + : public Tizen::Base::Object +{ +public: + /** + * This is the default constructor for this class. + * + * @since 2.0 + */ + TouchEventInfo(void); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~TouchEventInfo(void); + + // + // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application. + // + // + // Initializes this instance of %TouchEventInfo with the specified parameters. + // + // @since 2.0 + // @return An error code + // @param[in] eventArg The touch event argument + // + result Construct(const Tizen::Base::Runtime::IEventArg& eventArg); + + /** + * Gets the ID of the current touch event. + * + * @since 2.0 + * + * @return The ID of the current touch event + */ + unsigned long GetPointId(void) const; + + /** + * Gets the start position of the touch event. + * + * @since 2.0 + * + * @return The start position of the touch event + */ + Tizen::Graphics::Point GetStartPosition(void) const; + + /** + * Gets the start position of the touch event. + * + * @since 2.1 + * + * @return The start position of the touch event + */ + Tizen::Graphics::FloatPoint GetStartPositionF(void) const; + + /** + * Gets the current position of the touch event. + * + * @since 2.0 + * + * @return The current position of the touch event + */ + Tizen::Graphics::Point GetCurrentPosition(void) const; + + /** + * Gets the current position of the touch event. + * + * @since 2.1 + * + * @return The current position of the touch event + */ + Tizen::Graphics::FloatPoint GetCurrentPositionF(void) const; + + /** + * Gets the touch status. + * + * @since 2.0 + * + * @return The touch status + */ + TouchStatus GetTouchStatus(void) const; + + /** + * Checks whether the touch status is flick. + * + * @since 2.0 + * + * @return @c true if the touch status is flick, @n + * else @c false + */ + bool IsFlicked(void) const; + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + TouchEventInfo(const TouchEventInfo&); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + TouchEventInfo& operator =(const TouchEventInfo&); + +private: + _TouchEventInfoImpl* __pTouchEventInfoImpl; +}; // TouchEventInfo + +} } //Tizen::Ui + +#endif // _FUI_TOUCH_EVENT_INFO_H_ diff --git a/inc/FUiTouchEventManager.h b/inc/FUiTouchEventManager.h new file mode 100644 index 0000000..27c4ece --- /dev/null +++ b/inc/FUiTouchEventManager.h @@ -0,0 +1,103 @@ +// +// 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 FUiTouchEventManager.h + * @brief This is the header file for the %TouchEventManager class. + * + * This header file contains the declarations of the %TouchEventManager class. + * + */ + +#ifndef _FUI_TOUCH_EVENT_MANAGER_H_ +#define _FUI_TOUCH_EVENT_MANAGER_H_ + +#include +#include +#include +#include + +namespace Tizen { namespace Ui +{ + +class _TouchEventManagerImpl; +/** + * @class TouchEventManager + * @brief This class stores the information of each touch event. + * + * @since 2.0 + * + * @final This class is not intended for extension. + * + * The %TouchEventManager class provides the touch event information: touch position, status, ID, and so on. + * @see TouchEventInfo + * + */ +class _OSP_EXPORT_ TouchEventManager + : public Tizen::Base::Object +{ +public: + /** + * Gets a pointer to the %TouchEventManager instance. + * + * @since 2.0 + * @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 multi-point touches, each represented by TouchEventInfo. + * + * @since 2.0 + * @return The list of TouchEventInfo + * + */ + Tizen::Base::Collection::IListT* GetTouchInfoListN(void) const; + +private: + // + // This default constructor is intentionally declared as private to implement the Singleton semantic. + // + TouchEventManager(void); + + // + // This destructor is intentionally declared as private to implement the Singleton semantic. + // + virtual ~TouchEventManager(void); + + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + TouchEventManager(const TouchEventManager& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + TouchEventManager& operator =(const TouchEventManager& rhs); + +private: + _TouchEventManagerImpl* __pTouchEventManagerImpl; +}; // TouchEventManager + +} } //Tizen::Ui + +#endif // _FUI_TOUCH_EVENT_MANAGER_H_ diff --git a/inc/FUiTouchFlickGestureDetector.h b/inc/FUiTouchFlickGestureDetector.h new file mode 100644 index 0000000..ca03d9b --- /dev/null +++ b/inc/FUiTouchFlickGestureDetector.h @@ -0,0 +1,184 @@ +// +// 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 FUiTouchFlickGestureDetector.h + * @brief This is the header file for the %TouchFlickGestureDetector class. + * + * This header file contains the declarations of the %TouchFlickGestureDetector class. + * + */ +#ifndef _FUI_TOUCH_FLICK_GESTURE_DETECTOR_H_ +#define _FUI_TOUCH_FLICK_GESTURE_DETECTOR_H_ + +#include + +namespace Tizen { namespace Ui +{ + +class ITouchFlickGestureEventListener; + +/** + * @enum FlickDirection + * + * Defines the direction of a flick gesture. + * + * @since 2.0 + */ +enum FlickDirection +{ + FLICK_DIRECTION_NONE = -1, /**< Undefined flick direction */ + FLICK_DIRECTION_RIGHT, /**< Rightward flick */ + FLICK_DIRECTION_UP, /**< Upward flick */ + FLICK_DIRECTION_LEFT, /**< Leftward flick */ + FLICK_DIRECTION_DOWN /**< Downward flick */ +}; + +/** + * @class TouchFlickGestureDetector + * @brief This class stores the information of a flick gesture detector. + * + * @since 2.0 + * + * @final This class is not intended for extension. + * + * The %TouchFlickGestureDetector class supports flicking of touches, and provides information about flick gesture detector. + * + */ +class _OSP_EXPORT_ TouchFlickGestureDetector + : public Tizen::Ui::TouchGestureDetector +{ +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. + * + * @since 2.0 + */ + TouchFlickGestureDetector(void); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~TouchFlickGestureDetector(void); + +public: + /** + * Initializes this instance of %TouchFlickGestureDetector. + * + * @since 2.0 + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + */ + result Construct(void); + + /** + * Adds an ITouchFlickGestureEventListener instance to the flick gesture detector instance. @n + * The added listener gets notified when a gesture is recognized. + * + * @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. + * @see RemoveFlickGestureEventListener() + */ + result AddFlickGestureEventListener(Tizen::Ui::ITouchFlickGestureEventListener& listener); + + /** + * Removes an IFlickGestureEventListener instance from the flick gesture detector instance. + * + * @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 specified @c listener is not found. + * @see AddFlickGestureEventListener() + */ + result RemoveFlickGestureEventListener(Tizen::Ui::ITouchFlickGestureEventListener& listener); + + /** + * Gets the distance of the flick. + * + * @since 2.0 + * + * @return An error code + * @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. + */ + result GetDistance(int& xDistance, int& yDistance) const; + + /** + * Gets the distance of the flick. + * + * @since 2.1 + * + * @return An error code + * @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. + */ + result GetDistance(float& xDistance, float& yDistance) const; + + /** + * Gets the duration of the flick. + * + * @since 2.0 + * + * @return The duration of the flick, @n + * else @c -1 if an error occurs + * @exception E_SUCCESS The method is successful. + */ + int GetDuration(void) const; + + /** + * Gets the direction of the flick. + * + * @since 2.0 + * + * @return The direction of the flick, @n + * else @c FLICK_DIRECTION_NONE if an error occurs + * @exception E_SUCCESS The method is successful. + */ + Tizen::Ui::FlickDirection GetDirection(void) const; +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + TouchFlickGestureDetector(const TouchFlickGestureDetector& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + TouchFlickGestureDetector& operator =(const TouchFlickGestureDetector& rhs); + +private: + friend class _TouchFlickGestureDetectorImpl; +}; // TouchFlickGestureDetector + +}} // Tizen::Ui + +#endif //_FUI_TOUCH_FLICK_GESTURE_DETECTOR_H_ \ No newline at end of file diff --git a/inc/FUiTouchGestureDetector.h b/inc/FUiTouchGestureDetector.h new file mode 100644 index 0000000..fcf28e6 --- /dev/null +++ b/inc/FUiTouchGestureDetector.h @@ -0,0 +1,313 @@ +// +// 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 FUiTouchGestureDetector.h + * @brief This is the header file for the %TouchGestureDetector class. + * + * This header file contains the declarations of the %TouchGestureDetector class. + * + */ +#ifndef _FUI_TOUCH_GESTURE_DETECTOR_H_ +#define _FUI_TOUCH_GESTURE_DETECTOR_H_ + +#include +#include + +namespace Tizen { namespace Ui +{ + +/** + * @enum TouchGestureDetectorState + * + * Defines the state of a gesture detector. + * + * @since 2.0 + */ +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 */ +}; + +class Control; +class ITouchGestureEventListener; +class _TouchGestureDetectorImpl; + +/** + * @class TouchGestureDetector + * @brief This class stores the information of a gesture detector. + * + * @since 2.0 + * + * The %TouchGestureDetector class defines a common behavior for gesture detectors and provides information about gesture detector. + * + */ + class _OSP_EXPORT_ TouchGestureDetector + : public Tizen::Base::Object +{ +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. + * + * @since 2.0 + */ + TouchGestureDetector(void); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~TouchGestureDetector(void); + +public: + /** + * Initializes this instance of %TouchGestureDetector. + * + * @since 2.0 + * + * @exception E_SUCCESS The method is successful. + */ + result Construct(void); + + /** + * Gets the control to which the gesture detector is attached. + * + * @since 2.0 + * + * @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; + + /** + * Enables or disables delaying touch event on Control. @n + * The %TouchGestureDetector receives touch events prior to a UI control to which it is added. + * Depending on a gesture that it tries to recognize, it is decided whether touch events need to be delivered to the UI control. + * If touch events must not be delivered to the UI control while gesture recognition is in progress, call this method with @c false argument. + * When the recognition finishes as success, delivering delayed touch events is dependent on IsCancelTouchEventOnSuccessEnabled(). + * When the recognition finishes as fail, all delayed touch events are fired sequentially. + * The default value is @c false. + * + * @since 2.0 + * + * @return An error code + * @param[in] enable The boolean value that indicates whether to delay events + * @exception E_SUCCESS The method is successful. + * @see IsDelayTouchEventEnabled() + * @see SetCancelTouchEventOnSuccessEnabled() + */ + result SetDelayTouchEventEnabled(bool enable); + + /** + * Checks whether delaying touch event to Control is enabled. + * + * @since 2.0 + * + * @return @c true if delaying touch event is enabled, @n + * else @c false if delaying touch event is disabled + * @exception E_SUCCESS The method is successful. + * @see SetDelayTouchEventEnabled() + */ + bool IsDelayTouchEventEnabled(void) const; + + /** + * 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 The boolean value that indicates whether to cancel a touch event + * @exception E_SUCCESS The method is successful. + * @see IsCancelTouchEventOnSuccessEnabled() + * @see SetDelayTouchEventEnabled() + */ + result SetCancelTouchEventOnSuccessEnabled(bool enable); + + /** + * Checks whether touch events are cancelled after a gesture is recognized. + * + * @since 2.0 + * + * @return @c true if cancelling a touch event is enabled, @n + * else @c false + * @exception E_SUCCESS The method is successful. + * @see SetCancelTouchEventOnSuccessEnabled() + */ + bool IsCancelTouchEventOnSuccessEnabled(void) const; + + /** + * Sets priority between gesture detectors. + * + * @brief [Deprecated] + * @deprecated This method is deprecated. + * @since 2.0 + * + * @return An error code + * @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. + */ + result StartOnFailureOf(const TouchGestureDetector& gestureDetector); + + /** + * Sets priority between gesture detectors. + * + * @since 2.1 + * + * @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 @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); + + /** + * Called when touch is pressed in the Control to which the gesture detector is attached. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] touchInfo The touch event information + */ + virtual void OnTouchPressed(Tizen::Ui::Control& source, const Tizen::Ui::TouchEventInfo& touchInfo); + + /** + * Called when touch is moved in the Control to which the gesture detector is attached. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] touchInfo The touch event information + */ + virtual void OnTouchMoved(Tizen::Ui::Control& source, const Tizen::Ui::TouchEventInfo& touchInfo); + + /** + * Called when touch is released in the Control to which the gesture detector is attached. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] touchInfo The touch event information + */ + virtual void OnTouchReleased(Tizen::Ui::Control& source, const Tizen::Ui::TouchEventInfo& touchInfo); + + /** + * Called when touch is cancelled in the Control to which the gesture detector is attached. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] touchInfo The touch event information + */ + virtual void OnTouchCanceled(Tizen::Ui::Control& source, const Tizen::Ui::TouchEventInfo& touchInfo); + +protected: + /** + * 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 The gesture detector state + * @exception E_SUCCESS The method is successful. + * @see GetDetectorState() + */ + result SetDetectorState(Tizen::Ui::TouchGestureDetectorState state); + + /** + * Gets the current state of the gesture detector. + * + * @since 2.0 + * + * @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 an IGestureEventListener instance to the gesture detector instance. @n + * The added listener gets notified when a gesture is recognized. + * + * @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. + * @see RemoveGestureEventListener() + */ + result AddGestureEventListener(Tizen::Ui::ITouchGestureEventListener& listener); + + /** + * Removes a gesture listener instance. + * + * @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 @c listener is not found. + * @see AddGestureEventListener() + */ + result RemoveGestureEventListener(Tizen::Ui::ITouchGestureEventListener& listener); + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + TouchGestureDetector(const TouchGestureDetector& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + TouchGestureDetector& operator =(const TouchGestureDetector& rhs); + +protected: + friend class _TouchGestureDetectorImpl; + + // + // This variable is for internal use only. Using this variable can cause behavioral, + // security-related, and consistency-related issues in the application. + // + _TouchGestureDetectorImpl* __pTouchGestureDetectorImpl; +}; // TouchGestureDetector + +}} // Tizen::Ui + +#endif //_FUI_TOUCH_GESTURE_DETECTOR_H_ diff --git a/inc/FUiTouchInfo.h b/inc/FUiTouchInfo.h new file mode 100644 index 0000000..03c275b --- /dev/null +++ b/inc/FUiTouchInfo.h @@ -0,0 +1,110 @@ +// +// 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. +// + +/** + * @if OSPDEPREC + * @file FUiTouchInfo.h + * @brief This is the header file for the %TouchInfo class. + * + * This header file contains the declarations of the %TouchInfo class. + * @endif + */ + +#ifndef _FUI_TOUCH_INFO_H_ +#define _FUI_TOUCH_INFO_H_ + +#include +#include + +namespace Tizen { namespace Ui +{ + +class Control; + +/** + * @if OSPDEPREC + * @class TouchInfo + * @brief [Deprecated] This class stores the information of a touch event. + * + * @deprecated This class is deprecated because the use of %TouchInfo is no longer recommended. Instead of using this class, use the Tizen::Ui::TouchEventInfo class. + * @since 2.0 + * + * @final This class is not intended for extension. + * + * The %TouchInfo class provides touch-related information to support multi-point touch. + * @endif + */ +class _OSP_EXPORT_ TouchInfo + : public Tizen::Base::Object +{ +public: + /** + * @if OSPDEPREC + * This is the default constructor for this class. + * + * @brief [Deprecated] + * @deprecated This method is deprecated because the %TouchInfo class is not supported any more. Instead, use the Tizen::Ui::TouchEventInfo class. + * @since 2.0 + * @endif + */ + TouchInfo(void) + : id(0) + , position(0, 0) + , status(TOUCH_PRESSED) + { + } + + /** + * @if OSPDEPREC + * The ID of the Touch instance. + * + * @brief [Deprecated] + * @deprecated This method is deprecated because the %TouchInfo class is not supported any more. Instead, use the Tizen::Ui::TouchEventManager::GetTouchInfoListN() + * and use the Tizen::Ui::TouchEventInfo::GetPointId() method. + * @since 2.0 + * @endif + */ + unsigned long id; + + /** + * @if OSPDEPREC + * The position of the Touch instance. + * + * @brief [Deprecated] + * @deprecated This method is deprecated because the %TouchInfo class is not supported any more. Instead, use the Tizen::Ui::TouchEventManager::GetTouchInfoListN() + * and use the Tizen::Ui::TouchEventInfo::GetCurrentPosition() method. + * @since 2.0 + * @endif + */ + Tizen::Graphics::Point position; + + /** + * @if OSPDEPREC + * The status of the Touch instance, using only the @c TOUCH_PRESSED and @c TOUCH_RELEASED states. + * + * @brief [Deprecated] + * @deprecated This method is deprecated because the %TouchInfo class is not supported any more. Instead, use the Tizen::Ui::TouchEventManager::GetTouchInfoListN() + * and use the Tizen::Ui::TouchEventInfo::GetTouchStatus() method. + * @since 2.0 + * @endif + */ + TouchStatus status; +}; // TouchInfo + +} } // Tizen::Ui + +#endif // _FUI_TOUCH_INFO_H_ diff --git a/inc/FUiTouchLongPressGestureDetector.h b/inc/FUiTouchLongPressGestureDetector.h new file mode 100644 index 0000000..c6ec6ad --- /dev/null +++ b/inc/FUiTouchLongPressGestureDetector.h @@ -0,0 +1,231 @@ +// +// 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 FUiTouchLongPressGestureDetector.h + * @brief This is the header file for the %TouchLongPressGestureDetector class. + * + * This header file contains the declarations of the %TouchLongPressGestureDetector class. + * + */ + +#ifndef _FUI_TOUCH_LONG_PRESS_GESTURE_DETECTOR_H_ +#define _FUI_TOUCH_LONG_PRESS_GESTURE_DETECTOR_H_ + +#include + +namespace Tizen { namespace Ui +{ + +class ITouchLongPressGestureEventListener; + +/** + * @class TouchLongPressGestureDetector + * @brief This class stores the information of a long press gesture detector. + * + * @since 2.0 + * + * @final This class is not intended for extension. + * + * 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 + : public Tizen::Ui::TouchGestureDetector +{ +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. + * + * @since 2.0 + */ + TouchLongPressGestureDetector(void); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~TouchLongPressGestureDetector(void); + + /** + * Initializes this instance of %TouchLongPressGestureDetector. + * + * @since 2.0 + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + */ + result Construct(void); + + /** + * 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 + * + * @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. + * @see RemoveLongPressGestureEventListener() + */ + result AddLongPressGestureEventListener(Tizen::Ui::ITouchLongPressGestureEventListener& listener); + + /** + * Removes an ITouchLongPressGestureEventListener instance from the long press gesture detector instance. + * + * @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 specified @c listener is not found. + * @see AddLongPressGestureEventListener() + */ + result RemoveLongPressGestureEventListener(Tizen::Ui::ITouchLongPressGestureEventListener& listener); + + /** + * Sets the duration needed for the recognition of the long press gesture. + * + * @since 2.0 + * + * @param[in] duration The time duration + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified @c duration is less than @c 0. + * @remarks The default value is @c 500 milliseconds. + * @see GetDuration() + * + */ + result SetDuration(int duration); + + /** + * Gets the duration needed for the recognition of the long press gesture. + * + * @since 2.0 + * + * @return The time duration, @n + * else @c -1 if an error occurs + * @exception E_SUCCESS The method is successful. + * @see SetDuration() + */ + int GetDuration(void) const; + + /** + * 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 @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. + * @see GetMoveAllowance() + * + */ + result SetMoveAllowance(int allowance); + + /** + * Sets the allowed displacement of touch move for the recognition of long press gesture. + * + * @since 2.1 + * + * @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. + * @see GetMoveAllowance() + * + */ + result SetMoveAllowance(float allowance); + + /** + * Gets the allowed move bounds. + * + * @since 2.0 + * + * @return The allowed move bounds, @n + * else @c -1 if an error occurs + * @exception E_SUCCESS The method is successful. + * @see SetMoveAllowance() + * + */ + int GetMoveAllowance(void) const; + + /** + * Gets the allowed move bounds. + * + * @since 2.1 + * + * @return The allowed move bounds, @n + * else @c -1 if an error occurs + * @exception E_SUCCESS The method is successful. + * @see SetMoveAllowance() + * + */ + float GetMoveAllowanceF(void) const; + + /** + * 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 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. + * @see GetTouchCount() + * + */ + result SetTouchCount(int count); + + /** + * Gets the finger count for the recognition of the long press gesture at the same time. + * + * @since 2.0 + * + * @return The finger count for the long press gesture, @n + * else @c -1 if an error occurs + * @exception E_SUCCESS The method is successful. + * @see GetTouchCount() + * + */ + int GetTouchCount(void) const; + +private: + // + // This is the copy constructor for this class. + // + TouchLongPressGestureDetector(const TouchLongPressGestureDetector& rhs); + + // + // Assigns the value of the specified instance to the current instance of %TouchLongPressGestureDetector. + // + TouchLongPressGestureDetector& operator =(const TouchLongPressGestureDetector& rhs); + +protected: + friend class _TouchLongPressGestureDetectorImpl; +}; // TouchLongPressGestureDetector + +}} // Tizen::Ui + +#endif //_FUI_TOUCH_LONG_PRESS_GESTURE_DETECTOR_H_ diff --git a/inc/FUiTouchPanningGestureDetector.h b/inc/FUiTouchPanningGestureDetector.h new file mode 100644 index 0000000..e5250a9 --- /dev/null +++ b/inc/FUiTouchPanningGestureDetector.h @@ -0,0 +1,160 @@ +// +// 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 FUiTouchPanningGestureDetector.h + * @brief This is the header file for the %TouchPanningGestureDetector class. + * + * This header file contains the declarations of the %TouchPanningGestureDetector class. + * + */ + +#ifndef _FUI_TOUCH_PANNING_GESTURE_DETECTOR_H_ +#define _FUI_TOUCH_PANNING_GESTURE_DETECTOR_H_ + +#include + +namespace Tizen { namespace Ui +{ + +class ITouchPanningGestureEventListener; + +/** + * @class TouchPanningGestureDetector + * @brief This class stores the information of a panning gesture detector. + * + * @since 2.0 + * + * @final This class is not intended for extension. + * + * The %TouchPanningGestureDetector class supports the changing condition of the panning gesture, and provides information about the panning gesture detector. + * + */ +class _OSP_EXPORT_ TouchPanningGestureDetector + : public Tizen::Ui::TouchGestureDetector +{ +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. + * + * @since 2.0 + */ + TouchPanningGestureDetector(void); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~TouchPanningGestureDetector(void); + + /** + * Initializes this instance of %TouchPanningGestureDetector. + * + * @since 2.0 + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + */ + result Construct(void); + + /** + * Adds an ITouchPanningGestureEventListener instance to the panning gesture detector instance. @n + * The added listener gets notified when a gesture is recognized. + * + * @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. + * @see RemovePanningGestureEventListener() + */ + result AddPanningGestureEventListener(Tizen::Ui::ITouchPanningGestureEventListener& listener); + + /** + * Removes an ITouchPanningGestureEventListener instance from the panning gesture detector instance. + * + * @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 specified @c listener is not found. + * @see AddPanningGestureEventListener() + */ + result RemovePanningGestureEventListener(Tizen::Ui::ITouchPanningGestureEventListener& listener); + + /** + * Gets the list of the touched points represented by TouchInfo. + * + * @since 2.0 + * + * @return The list of the TouchInfo, @n + * else @c null if an error occurs + * @exception E_SUCCESS The method is successful. + */ + Tizen::Base::Collection::IList* GetTouchInfoListN(void) const; + + /** + * 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 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. + * @see GetTouchCount() + * + */ + result SetTouchCount(int count); + + /** + * Gets the finger count for the recognition of the panning gesture at the same time. + * + * @since 2.0 + * + * @return The finger count for the panning gesture, @n + * else @c -1 if an error occurs + * @exception E_SUCCESS The method is successful. + * @see SetTouchCount() + * + */ + int GetTouchCount(void) const; + +private: + // + // This is the copy constructor for this class. + // + TouchPanningGestureDetector(const TouchPanningGestureDetector& rhs); + + // + // Assigns the value of the specified instance to the current instance of %TouchPanningGestureDetector. + // + TouchPanningGestureDetector& operator =(const TouchPanningGestureDetector& rhs); + +protected: + friend class _TouchPanningGestureDetectorImpl; +}; // TouchPanningGestureDetector + +} } // Tizen::Ui + +#endif //_FUI_TOUCH_PANNING_GESTURE_DETECTOR_H_ diff --git a/inc/FUiTouchPinchGestureDetector.h b/inc/FUiTouchPinchGestureDetector.h new file mode 100644 index 0000000..5ad0969 --- /dev/null +++ b/inc/FUiTouchPinchGestureDetector.h @@ -0,0 +1,173 @@ +// +// 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 FUiTouchPinchGestureDetector.h + * @brief This is the header file for the %TouchPinchGestureDetector class. + * + * This header file contains the declarations of the %TouchPinchGestureDetector class. + * + */ + +#ifndef _FUI_TOUCH_PINCH_GESTURE_DETECTOR_H_ +#define _FUI_TOUCH_PINCH_GESTURE_DETECTOR_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui +{ + +class ITouchPinchGestureEventListener; + +/** + * @class TouchPinchGestureDetector + * @brief This class stores the information of a pinch gesture detector. + * + * @since 2.0 + * + * @final This class is not intended for extension. + * + * The %TouchPinchGestureDetector class provides information about a pinch gesture detector. + * + */ +class _OSP_EXPORT_ TouchPinchGestureDetector + : public Tizen::Ui::TouchGestureDetector +{ +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. + * + * @since 2.0 + */ + TouchPinchGestureDetector(void); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~TouchPinchGestureDetector(void); + + /** + * Initializes this instance of %TouchPinchGestureDetector. + * + * @since 2.0 + * @feature %http://tizen.org/feature/multi_point_touch.pinch_zoom + * + * @return An error code + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @b Since: @b 2.1 + * For more information, see + * + * Application Filtering. + * @remarks Before calling this method, check whether the feature is supported by + * Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ + result Construct(void); + + + /** + * Adds an ITouchPinchGestureEventListener instance to the pinch gesture detector instance. @n + * The added listener gets notified when a gesture is recognized. + * + * @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. + * @see RemovePinchGestureEventListener() + */ + result AddPinchGestureEventListener(Tizen::Ui::ITouchPinchGestureEventListener& listener); + + /** + * Removes an ITouchPinchGestureEventListener instance from the pinch gesture detector instance. + * + * @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 specified @c listener is not found. + * @see AddPinchGestureEventListener() + */ + result RemovePinchGestureEventListener(Tizen::Ui::ITouchPinchGestureEventListener& listener); + + /** + * Gets the center position of two touch points. + * + * @since 2.0 + * + * @return The center point, @n + * else Point(-1, -1) if an error occurs + * @exception E_SUCCESS The method is successful. + */ + Tizen::Graphics::Point GetCenterPoint(void) const; + + /** + * Gets the center position of two touch points. + * + * @since 2.1 + * + * @return The center point, @n + * else Point(-1, -1) if an error occurs + * @exception E_SUCCESS The method is successful. + */ + Tizen::Graphics::FloatPoint GetCenterPointF(void) const; + + /** + * Gets the scale factor among the touched points. + * + * @since 2.0 + * + * @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 the touched points. + * + * @since 2.1 + * + * @return The scale factor among the touched points + * @remarks Gets the scale factor for a pinch gesture in progress. + */ + float GetScaleF(void) const; + +private: + // + // This is the copy constructor for this class. + // + TouchPinchGestureDetector(const TouchPinchGestureDetector& rhs); + + // + // Assigns the value of the specified instance to the current instance of %TouchPinchGestureDetector. + // + TouchPinchGestureDetector& operator =(const TouchPinchGestureDetector& rhs); + +protected: + friend class _TouchPinchGestureDetectorImpl; +}; // TouchPinchGestureDetector + +}} // Tizen::Ui + +#endif //_FUI_TOUCH_PINCH_GESTURE_DETECTOR_H_ diff --git a/inc/FUiTouchRotationGestureDetector.h b/inc/FUiTouchRotationGestureDetector.h new file mode 100644 index 0000000..2329dd0 --- /dev/null +++ b/inc/FUiTouchRotationGestureDetector.h @@ -0,0 +1,152 @@ +// +// 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 FUiTouchRotationGestureDetector.h + * @brief This is the header file for the %TouchRotationGestureDetector class. + * + * This header file contains the declarations of the %TouchRotationGestureDetector class. + * + */ + +#ifndef _FUI_TOUCH_ROTATION_GESTURE_DETECTOR_H_ +#define _FUI_TOUCH_ROTATION_GESTURE_DETECTOR_H_ + +#include + +namespace Tizen { namespace Ui +{ + +class ITouchRotationGestureEventListener; + +/** + * @class TouchRotationGestureDetector + * @brief This class stores the information of a rotation gesture detector. + * + * @since 2.0 + * + * @final This class is not intended for extension. + * + * The %TouchRotationGestureDetector class provides information about a rotation gesture detector. + * + */ +class _OSP_EXPORT_ TouchRotationGestureDetector + : public Tizen::Ui::TouchGestureDetector +{ +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. + * + * @since 2.0 + */ + TouchRotationGestureDetector(void); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~TouchRotationGestureDetector(void); + + /** + * Initializes this instance of %TouchRotationGestureDetector. + * + * @since 2.0 + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + */ + result Construct(void); + + /** + * Adds an ITouchRotationGestureEventListener instance to the rotation gesture detector instance. @n + * The added listener gets notified when a gesture is recognized. + * + * @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. + * @see RemoveRotationGestureEventListener() + */ + result AddRotationGestureEventListener(Tizen::Ui::ITouchRotationGestureEventListener& listener); + + /** + * Removes an ITouchRotationGestureEventListener instance from the rotation gesture detector instance. + * + * @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 specified @c listener is not found. + * @see AddRotationGestureEventListener() + */ + result RemoveRotationGestureEventListener(Tizen::Ui::ITouchRotationGestureEventListener& listener); + + /** + * Gets the angle between the previous touch points and the current touch points. + * + * @since 2.0 + * + * @return The angle between two touch points, @n + * else @c -1 if an error occurs + * @exception E_SUCCESS The method is successful. + */ + float GetAngle(void) const; + + /** + * Gets the distance between two touch points. + * + * @since 2.0 + * + * @return The distance between two touch points, @n + * else @c -1 if an error occurs + * @exception E_SUCCESS The method is successful. + */ + int GetDistance(void) const; + + /** + * Gets the distance between two touch points. + * + * @since 2.1 + * + * @return The distance between two touch points, @n + * else @c -1 if an error occurs + * @exception E_SUCCESS The method is successful. + */ + float GetDistanceF(void) const; + +private: + // + // This is the copy constructor for this class. + // + TouchRotationGestureDetector(const TouchRotationGestureDetector& rhs); + + // + // Assigns the value of the specified instance to the current instance of %TouchRotationGestureDetector. + // + TouchRotationGestureDetector& operator =(const TouchRotationGestureDetector& rhs); + +protected: + friend class _TouchRotationGestureDetectorImpl; +}; // TouchRotationGestureDetector + +} } // Tizen::Ui + +#endif //_FUI_TOUCH_ROTATION_GESTURE_DETECTOR_H_ \ No newline at end of file diff --git a/inc/FUiTouchTapGestureDetector.h b/inc/FUiTouchTapGestureDetector.h new file mode 100644 index 0000000..03aed59 --- /dev/null +++ b/inc/FUiTouchTapGestureDetector.h @@ -0,0 +1,261 @@ +// +// 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 FUiTouchTapGestureDetector.h + * @brief This is the header file for the %TouchTapGestureDetector class. + * + * This header file contains the declarations of the %TouchTapGestureDetector class. + * + */ + +#ifndef _FUI_TOUCH_TAP_GESTURE_DETECTOR_H_ +#define _FUI_TOUCH_TAP_GESTURE_DETECTOR_H_ + +#include + +namespace Tizen { namespace Ui +{ + +class ITouchTapGestureEventListener; + +/** + * @class TouchTapGestureDetector + * @brief This class stores the information of a tap gesture detector. + * + * @since 2.0 + * + * @final This class is not intended for extension. + * + * The %TouchTapGestureDetector class supports the changing conditions of the tap gesture, and provides information about tap gesture detector. + * + */ +class _OSP_EXPORT_ TouchTapGestureDetector + : public Tizen::Ui::TouchGestureDetector +{ +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. + * + * @since 2.0 + */ + TouchTapGestureDetector(void); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~TouchTapGestureDetector(void); + + /** + * Initializes this instance of %TouchTapGestureDetector. + * + * @since 2.0 + * @exception E_SUCCESS The method is successful. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + */ + result Construct(void); + + /** + * Adds an ITouchTapGestureEventListener instance to the tap gesture detector instance. @n + * The added listener gets notified when a gesture is recognized. + * + * @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. + * @see RemoveTapGestureEventListener() + */ + result AddTapGestureEventListener(Tizen::Ui::ITouchTapGestureEventListener& listener); + + /** + * Removes an ITouchTapGestureEventListener instance from the tap gesture detector instance. + * + * @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 specified @c listener is not found. + * @see AddTapGestureEventListener() + */ + result RemoveTapGestureEventListener(Tizen::Ui::ITouchTapGestureEventListener& listener); + + /** + * Sets the tap count required for the recognition of the tap gesture. + * + * @since 2.0 + * + * @param[in] count The tap count + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified @c tap count is less than @c 0. + * @remarks The default value is @c 2. + * @see GetTapCount() + * + */ + result SetTapCount(int count); + + /** + * Gets the tap count required for the recognition of the tap gesture. + * + * @since 2.0 + * + * @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. + * @see SetTapCount() + */ + int GetTapCount(void) const; + + /** + * Sets the time interval between taps. + * + * @since 2.0 + * + * @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. + * @see GetTapInterval() + * + */ + result SetTapInterval(int interval); + + /** + * Gets the time interval between taps. + * + * @since 2.0 + * + * @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. + * @see SetTapInterval() + */ + int GetTapInterval(void) const; + + /** + * 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 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. + * @see GetTouchCount() + * + */ + result SetTouchCount(int count); + + /** + * Gets the finger count for the recognition of the tap gesture at the same time. + * + * @since 2.0 + * + * @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. + * @see GetTouchCount() + * + */ + int GetTouchCount(void) const; + + /** + * 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 @c 1, MoveAllowance is ignored. + * @see GetMoveAllowance() + * + */ + result SetMoveAllowance(int allowance); + + /** + * 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. + * @see GetMoveAllowance() + * + */ + result SetMoveAllowance(float allowance); + + /** + * Gets ths allowed displacement between touches for the recognition of tap gesture. + * + * @since 2.0 + * + * @return The allowed displacement between touches, @n + * else @c -1 if an error occurs + * @exception E_SUCCESS The method is successful. + * @see SetMoveAllowance() + */ + int GetMoveAllowance(void) const; + + /** + * Gets ths allowed displacement between touches for the recognition of tap gesture. + * + * @since 2.1 + * + * @return The allowed displacement between touches, @n + * else @c -1 if an error occurs + * @exception E_SUCCESS The method is successful. + * @see SetMoveAllowance() + */ + float GetMoveAllowanceF(void) const; +private: + // + // This is the copy constructor for this class. + // + TouchTapGestureDetector(const TouchTapGestureDetector& rhs); + + // + // Assigns the value of the specified instance to the current instance of %TouchTapGestureDetector. + // + TouchTapGestureDetector& operator =(const TouchTapGestureDetector& rhs); + +protected: + friend class _TouchTapGestureDetectorImpl; +}; // TouchTapGestureDetector + +}} // Tizen::Ui + +#endif //_FUI_TOUCH_TAP_GESTURE_DETECTOR_H_ \ No newline at end of file diff --git a/inc/FUiUiConfiguration.h b/inc/FUiUiConfiguration.h new file mode 100644 index 0000000..a255767 --- /dev/null +++ b/inc/FUiUiConfiguration.h @@ -0,0 +1,159 @@ +// +// 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 FUiUiConfiguration.h + * @brief This is the header file for the %UiConfiguration class. + * + * This header file contains the declarations of the %UiConfiguration class. + */ + +#ifndef _FUI_UI_CONFIGURATION_H_ +#define _FUI_UI_CONFIGURATION_H_ + +#include +#include + +namespace Tizen { namespace Base { +class String; +}} // Tizen::Base + +namespace Tizen { namespace Ui { + +/** + * @class UiConfiguration + * @brief This class provides various utility methods for UI configuration. + * + * @since 2.0 + * + * The %UiConfiguration class provides various utility methods for UI configuration. + * + */ +class _OSP_EXPORT_ UiConfiguration +{ +public: + /** + * Sets the default font to all the Controls. + * + * @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::GetFaceName(Tizen::Base::String& filepath). + * The system font name is retrieved using Tizen::Graphics::Font::GetSystemFontListN(). + * 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 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); + + /** + * Gets the default font for all the Controls. + * + * @since 2.0 + * + * @return The app font name or system font name @n + * else an empty string if the default font is not set + * @see SetDefaultFont() + */ + static Tizen::Base::String GetDefaultFont(void); + + /** + * Sets the font of the control with the specified file name. + * + * @since 2.1 + * + * @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. + * @exception E_FILE_NOT_FOUND The specified font cannot be found or accessed. + * @exception E_UNSUPPORTED_FORMAT The specified font format is not supported. + * @see GetDefaultFontFile() + */ + static result SetDefaultFontFromFile(const Tizen::Base::String& fileName); + + /** + * Gets the font file name of the control. + * + * @since 2.1 + * + * @return The font name set in the control @n + * else an empty string if the font is not set + * @see SetDefaultFontFromFile() + */ + static Tizen::Base::String GetDefaultFontFile(void); + + /** + * Gets the actual font size. + * + * @since 2.1 + * + * @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. + */ + static float GetFontSize(const Tizen::Base::String& sizeString); + + /** + * Gets the color of controls. + * + * @since 2.1 + * + * @return The color of the given color key + * @param[in] colorKey The color key + * @exception E_SUCCESS The method is successful. + * @exception E_KEY_NOT_FOUND The specified color cannot be found or accessed. + * @remarks + * - Color keys are defined in FUiUiConfigurationTypes.h. + * - The specific error code can be accessed using the GetLastResult() method. + * - Using the return value without checking the return value of GetLastResult() is prohibited. + */ + static Tizen::Graphics::Color GetColor(int colorKey); + +private: + // + // This default constructor is intentionally declared as private because this class cannot be constructed. + // + UiConfiguration(void); + + // + // This destructor is intentionally declared as private because this class cannot be constructed. + // + ~UiConfiguration(void); + + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + UiConfiguration(const UiConfiguration& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + UiConfiguration& operator =(const UiConfiguration& rhs); + +}; // UiConfiguration + +}} // Tizen::Ui + +#endif // _FUI_UI_CONFIGURATION_H_ diff --git a/inc/FUiUiConfigurationTypes.h b/inc/FUiUiConfigurationTypes.h new file mode 100644 index 0000000..a80d3c3 --- /dev/null +++ b/inc/FUiUiConfigurationTypes.h @@ -0,0 +1,3792 @@ +// +// 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 FUiUiConfigurationTypes.h + * @brief This is the header file for the common data types used by the UI configuration. + * + * This header file contains the descriptions of the common data types used by the UI configuration. + */ + +#ifndef _FUI_UI_CONFIGURATION_TYPES_H_ +#define _FUI_UI_CONFIGURATION_TYPES_H_ + +#include + +namespace Tizen { namespace Ui { + +/** + * @struct ColorKey + * @brief This struct provides the color keys of controls. + * + * @since 2.1 + * + * The %ColorKey struct provides the color keys of controls. + * + */ +struct _OSP_EXPORT_ ColorKey +{ + /** + * @struct Button + * @brief This struct provides the color keys of %Button. + * + * @since 2.1 + * + * The %Button struct provides the color keys of %Button. + * + */ + struct _OSP_EXPORT_ Button + { + /** + * The property key to get the normal background color of button. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BG_NORMAL; + + /** + * The property key to get the disabled background color of button. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BG_DISABLED; + + /** + * The property key to get the pressed background color of button. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BG_PRESSED; + + /** + * The property key to get the highlighted background color of button. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BG_HIGHLIGHTED; + + /** + * The property key to get the normal text color of button. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TEXT_NORMAL; + + /** + * The property key to get the disabled text color of button. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TEXT_DISABLED; + + /** + * The property key to get the pressed text color of button. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TEXT_PRESSED; + + /** + * The property key to get the highlighted text color of button. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TEXT_HIGHLIGHTED; + }; + + /** + * @struct CheckButton + * @brief This struct provides the color keys of %CheckButton. + * + * @since 2.1 + * + * The %CheckButton struct provides the color keys of %CheckButton. + * + */ + struct CheckButton + { + /** + * The property key to get the normal background color of check button. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BG_NORMAL; + + /** + * The property key to get the disabled background color of check button. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BG_DISABLED; + + /** + * The property key to get the pressed background color of check button. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BG_PRESSED; + + /** + * The property key to get the highlighted background color of check button. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BG_HIGHLIGHTED; + + /** + * The property key to get the selected background color of check button. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BG_SELECTED; + + /** + * The property key to get the normal text color of check button. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TEXT_NORMAL; + + /** + * The property key to get the disabled text color of check button. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TEXT_DISABLED; + + /** + * The property key to get the pressed text color of check button. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TEXT_PRESSED; + + /** + * The property key to get the highlighted text color of check button. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TEXT_HIGHLIGHTED; + + /** + * The property key to get the selected text color of check button. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TEXT_SELECTED; + + /** + * The property key to get the normal title text color of check button. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TITLE_TEXT_NORMAL; + + /** + * The property key to get the disabled title text color of check button. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TITLE_TEXT_DISABLED; + + /** + * The property key to get the pressed title text color of check button. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TITLE_TEXT_PRESSED; + + /** + * The property key to get the highlighted title text color of check button. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TITLE_TEXT_HIGHLIGHTED; + + /** + * The property key to get the selected title text color of check button. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TITLE_TEXT_SELECTED; + + /** + * The property key to get the normal background color of the detailed icon of check button. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int DETAILED_ICON_BG_NORMAL; + + /** + * The property key to get the disabled background color of the detailed icon of check button. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int DETAILED_ICON_BG_DISABLED; + + /** + * The property key to get the pressed background color of the detailed icon of check button. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int DETAILED_ICON_BG_PRESSED; + + /** + * The property key to get the highlighted background color of the detailed icon of check button. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int DETAILED_ICON_BG_HIGHLIGHTED; + + /** + * The property key to get the selected background color of the detailed icon of check button. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int DETAILED_ICON_BG_SELECTED; + + /** + * The property key to get the normal text color of the detailed icon of check button. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int DETAILED_ICON_TEXT_NORMAL; + + /** + * The property key to get the disabled text color of the detailed icon of check button. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int DETAILED_ICON_TEXT_DISABLED; + + /** + * The property key to get the pressed text color of the detailed icon of check button. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int DETAILED_ICON_TEXT_PRESSED; + + /** + * The property key to get the highlighted text color of the detailed icon of check button. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int DETAILED_ICON_TEXT_HIGHLIGHTED; + + /** + * The property key to get the selected text color of the detailed icon of check button. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int DETAILED_ICON_TEXT_SELECTED; + + /** + * The property key to get the color of the left divider line of check button. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int DIVIDER_LINE_LEFT_NORMAL; + + /** + * The property key to get the color of the right divider line of check button. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int DIVIDER_LINE_RIGHT_NORMAL; + }; + + /** + * @struct ColorPicker + * @brief This struct provides the color keys of %ColorPicker. + * + * @since 2.1 + * + * The %ColorPicker struct provides the color keys of %ColorPicker. + * + */ + struct _OSP_EXPORT_ ColorPicker + { + /** + * The property key to get the color of top half part of divider of color picker. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int DIVIDER_TOP_HALF; + + /** + * The property key to get the color of bottom half part of divider of color picker. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int DIVIDER_BOTTOM_HALF; + + /** + * The property key to get the normal background color of the arrow button of color picker. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ARROW_BUTTON_BG_NORMAL; + + /** + * The property key to get the pressed background color of the arrow button of color picker. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ARROW_BUTTON_BG_PRESSED; + + /** + * The property key to get the disabled background color of the arrow button of color picker. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ARROW_BUTTON_BG_DISABLED; + + /** + * The property key to get the normal color of the arrow button of color picker. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ARROW_BUTTON_NORMAL; + + /** + * The property key to get the pressed color of the arrow button of color picker. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ARROW_BUTTON_PRESSED; + + /** + * The property key to get the disabled color of the arrow button of color picker. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ARROW_BUTTON_DISABLED; + + /** + * The property key to get the highlighted color of the handler of color picker. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int HANDLER_HIGHLIGHTED; + }; + + /** + * @struct ContextMenu + * @brief This struct provides the color keys of %ContextMenu. + * + * @since 2.1 + * + * The %ContextMenu struct provides the color keys of %ContextMenu. + * + */ + struct _OSP_EXPORT_ ContextMenu + { + /** + * The property key to get the normal background color of context menu. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BG_NORMAL; + + /** + * The property key to get the color of list type divider 01 of context menu. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int LIST_ITEM_DIVIDER_01_NORMAL; + + /** + * The property key to get the color of list type divider 02 of context menu. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int LIST_ITEM_DIVIDER_02_NORMAL; + + /** + * The property key to get the normal background color of the item of context menu. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ITEM_BG_NORMAL; + + /** + * The property key to get the pressed background color of the item of context menu. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ITEM_BG_PRESSED; + + /** + * The property key to get the highlighted background color of the item of context menu. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ITEM_BG_HIGHLIGHTED; + + /** + * The property key to get the disabled background color of the item of context menu. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int ITEM_BG_DISABLED; + + /** + * The property key to get the color of grid type divider 01 of context menu. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int GRID_ITEM_DIVIDER_01_NORMAL; + + /** + * The property key to get the color of grid type divider 02 of context menu. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int GRID_ITEM_DIVIDER_02_NORMAL; + + /** + * The property key to get the normal text color of the item of context menu. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ITEM_TEXT_NORMAL; + + /** + * The property key to get the pressed text color of the item of context menu. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ITEM_TEXT_PRESSED; + + /** + * The property key to get the highlighted text color of the item of context menu. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ITEM_TEXT_HIGHLIGHTED; + + /** + * The property key to get the disabled text color of the item of context menu. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int ITEM_TEXT_DISABLED; + }; + + /** + * @struct DateTimeBar + * @brief This struct provides the color keys of %DateTimeBar. + * + * @since 2.1 + * + * The %DateTimeBar struct provides the color keys of %DateTimeBar. + * + */ + struct _OSP_EXPORT_ DateTimeBar + { + /** + * The property key to get the background color of date time bar. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BG_NORMAL; + + /** + * The property key to get the normal text color of date time bar. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TEXT_NORMAL; + + /** + * The property key to get the pressed text color of date time bar. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TEXT_PRESSED; + }; + + /** + * @struct DateTimePicker + * @brief This struct provides the color keys of %DateTimePicker. + * + * @since 2.1 + * + * The %DateTimePicker struct provides the color keys of %DateTimePicker. + * + */ + struct _OSP_EXPORT_ DateTimePicker + { + /** + * The property key to get the background color of date time picker. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BG_NORMAL; + + /** + * 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 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 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 the AM/PM button of date time picker. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int AM_PM_BG_DISABLED; + + /** + * The property key to get the normal text color of date time picker. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TEXT_NORMAL; + + /** + * The property key to get the pressed text color of date time picker. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TEXT_PRESSED; + + /** + * The property key to get the highlighted text color of date time picker. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TEXT_HIGHLIGHTED; + + /** + * The property key to get the disabled text color of date time picker. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TEXT_DISABLED; + + /** + * 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 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 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 the AM/PM button of date time picker. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int AM_PM_TEXT_DISABLED; + + /** + * The property key to get the color of the left half of the divider of date time picker. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int DIVIDER_LEFT_HALF; + + /** + * The property key to get the color of the right half of the divider of date time picker. + * + * @since 2.1 + */ + _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. + * + * @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. + * + * @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. + * + * @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. + * + * @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. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int DISPLAY_BG_NORMAL; + + /** + * 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. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TITLE_DISABLED; + }; + + /** + * @struct Edit + * @brief This struct provides the color keys of %Edit. + * + * @since 2.1 + * + * The %Edit struct provides the color keys of %Edit. + * + */ + struct _OSP_EXPORT_ Edit + { + /** + * The property key to get the normal background color of edit. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BG_NORMAL; + + /** + * The property key to get the pressed background color of edit. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BG_PRESSED; + + /** + * The property key to get the highlighted background color of edit. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BG_HIGHLIGHTED; + + /** + * The property key to get the disabled background color of edit. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BG_DISABLED; + + /** + * The property key to get the normal text color of the title text of edit. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TITLE_TEXT_NORMAL; + + /** + * The property key to get the pressed color of the title text of edit. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TITLE_TEXT_PRESSED; + + /** + * The property key to get the highlighted color of the title text of edit. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TITLE_TEXT_HIGHLIGHTED; + + /** + * The property key to get the disabled color of the title text of edit. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TITLE_TEXT_DISABLED; + + /** + * The property key to get the normal color of the text of edit. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TEXT_NORMAL; + + /** + * The property key to get the pressed color of the text of edit. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TEXT_PRESSED; + + /** + * The property key to get the highlighted color of the text of edit. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TEXT_HIGHLIGHTED; + + /** + * The property key to get the disabled color of the text of edit. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TEXT_DISABLED; + + /** + * The property key to get the color of the guide text of edit. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int GUIDE_TEXT_NORMAL; + + /** + * The property key to get the normal color of the clear icon of edit. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int CLEAR_ICON_NORMAL; + + /** + * The property key to get the pressed color of the clear icon of edit. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int CLEAR_ICON_PRESSED; + + /** + * The property key to get the color of the cut link text of edit. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int CUT_LINK_TEXT_NORMAL; + + /** + * The property key to get the background color of the cut link text of edit. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int CUT_LINK_BG_NORMAL; + + /** + * The property key to get the color of the cursor of edit. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int CURSOR_NORMAL; + }; + + /** + * @struct EditDate + * @brief This struct provides the color keys of %EditDate. + * + * @since 2.1 + * + * The %EditDate struct provides the color keys of %EditDate. + * + */ + struct _OSP_EXPORT_ EditDate + { + /** + * The property key to get the normal color of the text of edit date. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TEXT_NORMAL; + + /** + * The property key to get the pressed color of the text of edit date. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TEXT_PRESSED; + + /** + * The property key to get the disabled color of the text of edit date. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TEXT_DISABLED; + + /** + * The property key to get the highlighted color of the text of edit date. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int TEXT_HIGHLIGHTED; + + /** + * The property key to get the normal color of the title text of edit date. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TITLE_TEXT_NORMAL; + + /** + * The property key to get the disabled color of the title text of edit date. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TITLE_TEXT_DISABLED; + + /** + * 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. + * + * @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. + * + * @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. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int CONTENT_BG_HIGHLIGHTED; + }; + + /** + * @struct EditTime + * @brief This struct provides the color keys of %EditTime. + * + * @since 2.1 + * + * The %EditTime struct provides the color keys of %EditTime. + * + */ + struct _OSP_EXPORT_ EditTime + { + /** + * The property key to get the normal background color of the button of edit time. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_BG_NORMAL; + + /** + * The property key to get the pressed background color of the button of edit time. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_BG_PRESSED; + + /** + * The property key to get the disabled background color of the button of edit time. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_BG_DISABLED; + + /** + * The property key to get the normal text color of the button of edit time. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_TEXT_NORMAL; + + /** + * The property key to get the pressed text color of the button of edit time. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_TEXT_PRESSED; + + /** + * The property key to get the disabled text color of the button of edit time. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_TEXT_DISABLED; + + /** + * The property key to get the highlighted text color of the button of edit time. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int BUTTON_TEXT_HIGHLIGHTED; + + /** + * The property key to get the normal text color of edit time. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TEXT_NORMAL; + + /** + * The property key to get the pressed text color of edit time. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TEXT_PRESSED; + + /** + * The property key to get the disabled text color of edit time. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TEXT_DISABLED; + + /** + * The property key to get the highlighted text color of edit time. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int TEXT_HIGHLIGHTED; + + /** + * The property key to get the normal title text color of edit time. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TITLE_TEXT_NORMAL; + + /** + * The property key to get the disabled title text color of edit time. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TITLE_TEXT_DISABLED; + + /** + * 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. + * + * @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. + * + * @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. + * + * @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. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int CONTENT_BG_HIGHLIGHTED; + }; + + /** + * @struct FastScroll + * @brief This struct provides the color keys of %FastScroll. + * + * @since 2.1 + * + * The %FastScroll struct provides the color keys of %FastScroll. + * + */ + struct _OSP_EXPORT_ FastScroll + { + /** + * The property key to get the normal background color of fast scroll index. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int INDEX_BG_NORMAL; + + /** + * The property key to get the pressed background color of fast scroll index. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int INDEX_BG_PRESSED; + + /** + * The property key to get the color of the line of fast scroll index. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int INDEX_LINE_PRESSED; + + /** + * The property key to get the normal text color of fast scroll index. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int INDEX_TEXT_NORMAL; + + /** + * The property key to get the pressed text color of fast scroll index. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int INDEX_TEXT_PRESSED; + + /** + * The property key to get the color of the divider of fast scroll index. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int INDEX_DIVIDER_NORMAL; + + /** + * The property key to get the background color of the popup of fast scroll. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int POPUP_BG_NORMAL; + + /** + * The property key to get the text color of the popup of fast scroll. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int POPUP_TEXT_NORMAL; + }; + + /** + * @struct Footer + * @brief This struct provides the color keys of %Footer. + * + * @since 2.1 + * + * The %Footer struct provides the color keys of %Footer. + * + */ + struct _OSP_EXPORT_ Footer + { + /** + * The property key to get the background color of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BG_NORMAL; + + /** + * The property key to get the background color of the translucent style of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TRANSLUCENT_BG_NORMAL; + + /** + * The property key to get the normal background color of the button style of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_BG_NORMAL; + + /** + * The property key to get the disabled background color of the button style of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_BG_DISABLED; + + /** + * The property key to get the pressed background color of the button style of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_BG_PRESSED; + + /** + * The property key to get the highlighted background color of the button style of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_BG_HIGHLIGHTED; + + /** + * The property key to get the normal background color of the translucent style button of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_TRANSLUCENT_BG_NORMAL; + + /** + * The property key to get the disabled background color of the translucent style button of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_TRANSLUCENT_BG_DISABLED; + + /** + * The property key to get the pressed background color of the translucent style button of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_TRANSLUCENT_BG_PRESSED; + + /** + * The property key to get the highlighted background color of the translucent style button of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_TRANSLUCENT_BG_HIGHLIGHTED; + + /** + * The property key to get the normal text color of the button style of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_TEXT_NORMAL; + + /** + * The property key to get the disabled text color of the button style of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_TEXT_DISABLED; + + /** + * The property key to get the pressed text color of the button style of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_TEXT_PRESSED; + + /** + * The property key to get the highlighted text color of the button style of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_TEXT_HIGHLIGHTED; + + /** + * The property key to get the normal text color of the translucent style button of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_TRANSLUCENT_TEXT_NORMAL; + + /** + * The property key to get the disabled text color of the translucent style button of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_TRANSLUCENT_TEXT_DISABLED; + + /** + * The property key to get the pressed text color of the translucent style button of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_TRANSLUCENT_TEXT_PRESSED; + + /** + * The property key to get the highlighted text color of the translucent style button of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_TRANSLUCENT_TEXT_HIGHLIGHTED; + + /** + * The property key to get the normal background color of the segmented item of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int SEGMENTED_ITEM_BG_NORMAL; + + /** + * The property key to get the disabled background color of the segmented item of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int SEGMENTED_ITEM_BG_DISABLED; + + /** + * The property key to get the pressed background color of the segmented item of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int SEGMENTED_ITEM_BG_PRESSED; + + /** + * The property key to get the highlighted background color of the segmented item of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int SEGMENTED_ITEM_BG_HIGHLIGHTED; + + /** + * The property key to get the selected background color of the segmented item of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int SEGMENTED_ITEM_BG_SELECTED; + + /** + * The property key to get the normal background color of the segmented item of the translucent style of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int SEGMENTED_ITEM_TRANSLUCENT_BG_NORMAL; + + /** + * The property key to get the disabled background color of the segmented item of the translucent style of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int SEGMENTED_ITEM_TRANSLUCENT_BG_DISABLED; + + /** + * The property key to get the pressed background color of the segmented item of the translucent style of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int SEGMENTED_ITEM_TRANSLUCENT_BG_PRESSED; + + /** + * The property key to get the highlighted background color of the segmented item of the translucent style of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int SEGMENTED_ITEM_TRANSLUCENT_BG_HIGHLIGHTED; + + /** + * The property key to get the selected background color of the segmented item of the translucent style of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int SEGMENTED_ITEM_TRANSLUCENT_BG_SELECTED; + + /** + * The property key to get the normal text color of the segmented item of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int SEGMENTED_ITEM_TEXT_NORMAL; + + /** + * The property key to get the disabled text color of the segmented item of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int SEGMENTED_ITEM_TEXT_DISABLED; + + /** + * The property key to get the pressed text color of the segmented item of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int SEGMENTED_ITEM_TEXT_PRESSED; + + /** + * The property key to get the highlighted text color of the segmented item of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int SEGMENTED_ITEM_TEXT_HIGHLIGHTED; + + /** + * The property key to get the selected text color of the segmented item of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int SEGMENTED_ITEM_TEXT_SELECTED; + + /** + * The property key to get the normal text color of the segmented item of the translucent style of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int SEGMENTED_ITEM_TRANSLUCENT_TEXT_NORMAL; + + /** + * The property key to get the disabled text color of the segmented item of the translucent style of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int SEGMENTED_ITEM_TRANSLUCENT_TEXT_DISABLED; + + /** + * The property key to get the pressed text color of the segmented item of the translucent style of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int SEGMENTED_ITEM_TRANSLUCENT_TEXT_PRESSED; + + /** + * The property key to get the highlighted text color of the segmented item of the translucent style of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int SEGMENTED_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED; + + /** + * The property key to get the selected text color of the segmented item of the translucent style of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int SEGMENTED_ITEM_TRANSLUCENT_TEXT_SELECTED; + + /** + * The property key to get the normal background color of the tab item of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TAB_ITEM_BG_NORMAL; + + /** + * The property key to get the disabled background color of the tab item of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TAB_ITEM_BG_DISABLED; + + /** + * The property key to get the pressed background color of the tab item of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TAB_ITEM_BG_PRESSED; + + /** + * The property key to get the highlighted background color of the tab item of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TAB_ITEM_BG_HIGHLIGHTED; + + /** + * The property key to get the selected background color of the tab item of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TAB_ITEM_BG_SELECTED; + + /** + * The property key to get the normal background color of the tab item of the translucent style of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TAB_ITEM_TRANSLUCENT_BG_NORMAL; + + /** + * The property key to get the disabled background color of the tab item of the translucent style of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TAB_ITEM_TRANSLUCENT_BG_DISABLED; + + /** + * The property key to get the pressed background color of the tab item of the translucent style of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TAB_ITEM_TRANSLUCENT_BG_PRESSED; + + /** + * The property key to get the highlighted background color of the tab item of the translucent style of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TAB_ITEM_TRANSLUCENT_BG_HIGHLIGHTED; + + /** + * The property key to get the selected background color of the tab item of the translucent style of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TAB_ITEM_TRANSLUCENT_BG_SELECTED; + + /** + * The property key to get the normal text color of the tab item of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TAB_ITEM_TEXT_NORMAL; + + /** + * The property key to get the disabled text color of the tab item of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TAB_ITEM_TEXT_DISABLED; + + /** + * The property key to get the pressed text color of the tab item of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TAB_ITEM_TEXT_PRESSED; + + /** + * The property key to get the highlighted text color of the tab item of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TAB_ITEM_TEXT_HIGHLIGHTED; + + /** + * The property key to get the selected text color of the tab item of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TAB_ITEM_TEXT_SELECTED; + + /** + * The property key to get the normal text color of the tab item of the translucent style of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TAB_ITEM_TRANSLUCENT_TEXT_NORMAL; + + /** + * The property key to get the disabled text color of the tab item of the translucent style of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TAB_ITEM_TRANSLUCENT_TEXT_DISABLED; + + /** + * The property key to get the pressed text color of the tab item of the translucent style of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TAB_ITEM_TRANSLUCENT_TEXT_PRESSED; + + /** + * The property key to get the highlighted text color of the tab item of the translucent style of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TAB_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED; + + /** + * The property key to get the selected text color of the tab item of the translucent style of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TAB_ITEM_TRANSLUCENT_TEXT_SELECTED; + + /** + * The property key to get the normal background color of the button item of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_ITEM_BG_NORMAL; + + /** + * The property key to get the disabled background color of the button item of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_ITEM_BG_DISABLED; + + /** + * The property key to get the pressed background color of the button item of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_ITEM_BG_PRESSED; + + /** + * The property key to get the highlighted background color of the button item of footer. + * + * @since 2.1 + */ + _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 footer. + * + * @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 footer. + * + * @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 footer. + * + * @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 footer. + * + * @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 footer. + * + * @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 footer. + * + * @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 footer. + * + * @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 footer. + * + * @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 footer. + * + * @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 footer. + * + * @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 footer. + * + * @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 footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED; + + /** + * The property key to get the normal color of the back icon of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BACK_ICON_NORMAL; + + /** + * The property key to get the disabled color of the back icon of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BACK_ICON_DISABLED; + + /** + * The property key to get the pressed color of the back icon of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BACK_ICON_PRESSED; + + /** + * The property key to get the highlighted color of the back icon of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BACK_ICON_HIGHLIGHTED; + + /** + * The property key to get the color of the left divider line of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int DIVIDER_LINE_LEFT_NORMAL; + + /** + * The property key to get the color of the right divider line of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int DIVIDER_LINE_RIGHT_NORMAL; + + /** + * The property key to get the color of the left divider line of the translucent style of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int DIVIDER_LINE_LEFT_TRANSLUCENT_NORMAL; + + /** + * The property key to get the color of the right divider line of the translucent style of footer. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int DIVIDER_LINE_RIGHT_TRANSLUCENT_NORMAL; + }; + + /** + * @struct Form + * @brief This struct provides the color keys of %Form. + * + * @since 2.1 + * + * The %Form struct provides the color keys of %Form. + * + */ + struct _OSP_EXPORT_ Form + { + /** + * The property key to get the background color of form. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BG_NORMAL; + }; + + /** + * @struct Gallery + * @brief This struct provides the color keys of %Gallery. + * + * @since 2.1 + * + * The %Gallery struct provides the color keys of %Gallery. + * + */ + struct _OSP_EXPORT_ Gallery + { + /** + * The property key to get the empty text color of gallery. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int EMPTY_TEXT_NORMAL; + }; + + /** + * @struct Header + * @brief This struct provides the color keys of %Header. + * + * @since 2.1 + * + * The %Header struct provides the color keys of %Header. + * + */ + struct _OSP_EXPORT_ Header + { + /** + * The property key to get the background of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BG_NORMAL; + + /** + * The property key to get the background of the translucent style of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TRANSLUCENT_BG_NORMAL; + + /** + * The property key to get the color of the title text of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TITLE_TEXT_NORMAL; + + /** + * The property key to get the color of the title text of the translucent style of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TRANSLUCENT_TITLE_TEXT_NORMAL; + + /** + * The property key to get the color of the description text of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int DESCRIPTION_TEXT_NORMAL; + + /** + * The property key to get the color of the description text of the translucent style of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TRANSLUCENT_DESCRIPTION_TEXT_NORMAL; + + /** + * The property key to get the normal background color of the button of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_BG_NORMAL; + + /** + * The property key to get the disabled background color of the button of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_BG_DISABLED; + + /** + * The property key to get the pressed background color of the button of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_BG_PRESSED; + + /** + * The property key to get the highlighted background color of the button of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_BG_HIGHLIGHTED; + + /** + * The property key to get the normal background color of the button of the translucent style of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_TRANSLUCENT_BG_NORMAL; + + /** + * The property key to get the disabled background color of the button of the translucent style of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_TRANSLUCENT_BG_DISABLED; + + /** + * The property key to get the pressed background color of the button of the translucent style of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_TRANSLUCENT_BG_PRESSED; + + /** + * The property key to get the highlighted background color of the button of the translucent style of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_TRANSLUCENT_BG_HIGHLIGHTED; + + /** + * The property key to get the normal text color of the button of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_TEXT_NORMAL; + + /** + * The property key to get the disabled text color of the button of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_TEXT_DISABLED; + + /** + * The property key to get the pressed text color of the button of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_TEXT_PRESSED; + + /** + * The property key to get the highlighted text color of the button of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_TEXT_HIGHLIGHTED; + + /** + * The property key to get the normal text color of the button of the translucent style of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_TRANSLUCENT_TEXT_NORMAL; + + /** + * The property key to get the disabled text color of the button of the translucent style of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_TRANSLUCENT_TEXT_DISABLED; + + /** + * The property key to get the pressed text color of the button of the translucent style of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_TRANSLUCENT_TEXT_PRESSED; + + /** + * The property key to get the highlighted text color of the button of the translucent style of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_TRANSLUCENT_TEXT_HIGHLIGHTED; + + /** + * The property key to get the normal background color of the segmented item of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int SEGMENTED_ITEM_BG_NORMAL; + + /** + * The property key to get the disabled background color of the segmented item of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int SEGMENTED_ITEM_BG_DISABLED; + + /** + * The property key to get the pressed background color of the segmented item of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int SEGMENTED_ITEM_BG_PRESSED; + + /** + * The property key to get the highlighted background color of the segmented item of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int SEGMENTED_ITEM_BG_HIGHLIGHTED; + + /** + * The property key to get the selected background color of the segmented item of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int SEGMENTED_ITEM_BG_SELECTED; + + /** + * The property key to get the normal background color of the segmented item of the translucent style of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int SEGMENTED_ITEM_TRANSLUCENT_BG_NORMAL; + + /** + * The property key to get the disabled background color of the segmented item of the translucent style of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int SEGMENTED_ITEM_TRANSLUCENT_BG_DISABLED; + + /** + * The property key to get the pressed background color of the segmented item of the translucent style of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int SEGMENTED_ITEM_TRANSLUCENT_BG_PRESSED; + + /** + * The property key to get the highlighted background color of the segmented item of the translucent style of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int SEGMENTED_ITEM_TRANSLUCENT_BG_HIGHLIGHTED; + + /** + * The property key to get the selected background color of the segmented item of the translucent style of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int SEGMENTED_ITEM_TRANSLUCENT_BG_SELECTED; + + /** + * The property key to get the normal text color of the segmented item of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int SEGMENTED_ITEM_TEXT_NORMAL; + + /** + * The property key to get the disabled text color of the segmented item of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int SEGMENTED_ITEM_TEXT_DISABLED; + + /** + * The property key to get the pressed text color of the segmented item of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int SEGMENTED_ITEM_TEXT_PRESSED; + + /** + * The property key to get the highlighted text color of the segmented item of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int SEGMENTED_ITEM_TEXT_HIGHLIGHTED; + + /** + * The property key to get the selected text color of the segmented item of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int SEGMENTED_ITEM_TEXT_SELECTED; + + /** + * The property key to get the normal text color of the segmented item of the translucent style of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int SEGMENTED_ITEM_TRANSLUCENT_TEXT_NORMAL; + + /** + * The property key to get the disabled text color of the segmented item of the translucent style of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int SEGMENTED_ITEM_TRANSLUCENT_TEXT_DISABLED; + + /** + * The property key to get the pressed text color of the segmented item of the translucent style of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int SEGMENTED_ITEM_TRANSLUCENT_TEXT_PRESSED; + + /** + * The property key to get the highlighted text color of the segmented item of the translucent style of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int SEGMENTED_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED; + + /** + * The property key to get the selected text color of the segmented item of the translucent style of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int SEGMENTED_ITEM_TRANSLUCENT_TEXT_SELECTED; + + /** + * The property key to get the normal background color of the tab item of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TAB_ITEM_BG_NORMAL; + + /** + * The property key to get the disabled background color of the tab item of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TAB_ITEM_BG_DISABLED; + + /** + * The property key to get the pressed background color of the tab item of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TAB_ITEM_BG_PRESSED; + + /** + * The property key to get the highlighted background color of the tab item of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TAB_ITEM_BG_HIGHLIGHTED; + + /** + * The property key to get the selected background color of the tab item of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TAB_ITEM_BG_SELECTED; + + /** + * The property key to get the normal background color of the tab item of the translucent style of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TAB_ITEM_TRANSLUCENT_BG_NORMAL; + + /** + * The property key to get the disabled background color of the tab item of the translucent style of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TAB_ITEM_TRANSLUCENT_BG_DISABLED; + + /** + * The property key to get the pressed background color of the tab item of the translucent style of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TAB_ITEM_TRANSLUCENT_BG_PRESSED; + + /** + * The property key to get the highlighted background color of the tab item of the translucent style of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TAB_ITEM_TRANSLUCENT_BG_HIGHLIGHTED; + + /** + * The property key to get the selected background color of the tab item of the translucent style of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TAB_ITEM_TRANSLUCENT_BG_SELECTED; + + /** + * The property key to get the normal text color of the tab item of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TAB_ITEM_TEXT_NORMAL; + + /** + * The property key to get the disabled text color of the tab item of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TAB_ITEM_TEXT_DISABLED; + + /** + * The property key to get the pressed text color of the tab item of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TAB_ITEM_TEXT_PRESSED; + + /** + * The property key to get the highlighted text color of the tab item of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TAB_ITEM_TEXT_HIGHLIGHTED; + + /** + * The property key to get the selected text color of the tab item of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TAB_ITEM_TEXT_SELECTED; + + /** + * The property key to get the normal text color of the tab item of the translucent style of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TAB_ITEM_TRANSLUCENT_TEXT_NORMAL; + + /** + * The property key to get the disabled text color of the tab item of the translucent style of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TAB_ITEM_TRANSLUCENT_TEXT_DISABLED; + + /** + * The property key to get the pressed text color of the tab item of the translucent style of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TAB_ITEM_TRANSLUCENT_TEXT_PRESSED; + + /** + * The property key to get the highlighted text color of the tab item of the translucent style of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TAB_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED; + + /** + * The property key to get the selected text color of the tab item of the translucent style of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TAB_ITEM_TRANSLUCENT_TEXT_SELECTED; + + /** + * 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 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 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 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 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 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 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 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 + */ + _OSP_EXPORT_ static const int DIVIDER_LINE_LEFT_NORMAL; + + /** + * The property key to get the color of the right divider line of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int DIVIDER_LINE_RIGHT_NORMAL; + + /** + * The property key to get the color of the left divider line of the translucent style of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int DIVIDER_LINE_LEFT_TRANSLUCENT_NORMAL; + + /** + * The property key to get the color of the right divider line of the translucent style of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int DIVIDER_LINE_RIGHT_TRANSLUCENT_NORMAL; + + /** + * The property key to get the normal background color of the button item of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_ITEM_BG_NORMAL; + + /** + * The property key to get the disabled background color of the button item of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_ITEM_BG_DISABLED; + + /** + * The property key to get the pressed background color of the button item of header. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_ITEM_BG_PRESSED; + + /** + * The property key to get the highlighted background color of the button item of header. + * + * @since 2.1 + */ + _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. + * + * @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. + * + * @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. + * + * @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. + * + * @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. + * + * @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. + * + * @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. + * + * @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. + * + * @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. + * + * @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. + * + * @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. + * + * @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. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED; + }; + + /** + * @struct IconList + * @brief This struct provides the color keys of %IconList. + * + * @since 2.1 + * + * The %IconList struct provides the color keys of %IconList. + * + */ + struct _OSP_EXPORT_ IconList + { + /** + * The property key to get the empty text color of icon list. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int EMPTY_TEXT_NORMAL; + + /** + * The property key to get the normal text color of icon list. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TEXT_NORMAL; + + /** + * The property key to get the pressed text color of icon list. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TEXT_PRESSED; + + /** + * The property key to get the highlighted text color of icon list. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TEXT_HIGHLIGHTED; + + /** + * The property key to get the inner normal text color of icon list. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int INNER_TEXT_NORMAL; + + /** + * The property key to get the inner pressed text color of icon list. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int INNER_TEXT_PRESSED; + + /** + * The property key to get the inner highlighted text color of icon list. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int INNER_TEXT_HIGHLIGHTED; + + /** + * The property key to get the background color of the inner text area of icon list. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int INNER_TEXT_BG_NORMAL; + + /** + * The property key to get the pressed background color of the item of icon list. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ITEM_BG_PRESSED; + + /** + * The property key to get the normal border color of the item of icon list. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ITEM_BORDER_NORMAL; + + /** + * The property key to get the pressed border color of the item of icon list. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ITEM_BORDER_PRESSED; + + /** + * The property key to get the highlighted border color of the item of icon list. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ITEM_BORDER_HIGHLIGHTED; + }; + + /** + * @struct InputPad + * @brief This struct provides the color keys of %InputPad. + * + * @since 2.1 + * + * The %InputPad struct provides the color keys of %InputPad. + * + */ + struct _OSP_EXPORT_ InputPad + { + /** + * The property key to get the normal text color of input pad. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TEXT_NORMAL; + + /** + * The property key to get the pressed text color of input pad. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TEXT_PRESSED; + + /** + * The property key to get the highlighted text color of input pad. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TEXT_HIGHLIGHTED; + + /** + * The property key to get the disabled text color of input pad. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TEXT_DISABLED; + + /** + * The property key to get the normal guide text color of input pad. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int GUIDE_TEXT_NORMAL; + + /** + * The property key to get the pressed guide text color of input pad. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int GUIDE_TEXT_PRESSED; + + /** + * The property key to get the disabled guide text color of input pad. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int GUIDE_TEXT_DISABLED; + + /** + * The property key to get the normal background color of the button of input pad. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_BG_NORMAL; + + /** + * The property key to get the pressed background color of the button of input pad. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_BG_PRESSED; + + /** + * The property key to get the highlighted background color of the button of input pad. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_BG_HIGHLIGHTED; + + /** + * The property key to get the disabled background color of the button of input pad. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_BG_DISABLED; + }; + + /** + * @struct Label + * @brief This struct provides the color keys of %Label. + * + * @since 2.1 + * + * The %Label struct provides the color keys of %Label. + * + */ + struct _OSP_EXPORT_ Label + { + /** + * The property key to get the text color of label. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TEXT_NORMAL; + }; + + /** + * @struct MessageBox + * @brief This struct provides the color keys of %MessageBox. + * + * @since 2.1 + * + * The %MessageBox struct provides the color keys of %MessageBox. + * + */ + struct _OSP_EXPORT_ MessageBox + { + /** + * The property key to get the background color of messagebox. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BG_NORMAL; + + /** + * The property key to get the color of the title text of messagebox. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TITLE_TEXT_NORMAL; + + /** + * The property key to get the color of the text of messagebox. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TEXT_NORMAL; + + /** + * The property key to get the normal background color of the bottom button area of messagebox. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int BOTTOM_BG_NORMAL; + + /** + * The property key to get the normal background color of the title area of messagebox. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int TITLE_BG_NORMAL; + + /** + * The property key to get the normal background color of the buttons of messagebox. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int BOTTOM_BUTTON_BG_NORMAL; + + /** + * The property key to get the pressed background color of the buttons of messagebox. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int BOTTOM_BUTTON_BG_PRESSED; + + /** + * The property key to get the disabled background color of the buttons of messagebox. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int BOTTOM_BUTTON_BG_DISABLED; + + /** + * The property key to get the highlighted background color of the buttons of messagebox. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int BOTTOM_BUTTON_BG_HIGHLIGHTED; + + /** + * The property key to get the normal text color of the buttons of messagebox. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int BOTTOM_BUTTON_TEXT_NORMAL; + + /** + * The property key to get the pressed text color of the buttons of messagebox. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int BOTTOM_BUTTON_TEXT_PRESSED; + + /** + * The property key to get the disabled text color of the buttons of messagebox. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int BOTTOM_BUTTON_TEXT_DISABLED; + + /** + * The property key to get the highlighted text color of the buttons of messagebox. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int BOTTOM_BUTTON_TEXT_HIGHLIGHTED; + }; + + /** + * @struct OptionMenu + * @brief This struct provides the color keys of %OptionMenu. + * + * @since 2.1 + * + * The %OptionMenu struct provides the color keys of %OptionMenu. + * + */ + struct _OSP_EXPORT_ OptionMenu + { + /** + * The property key to get the normal background color of option menu. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int BG_NORMAL; + + /** + * The property key to get the normal text color of the item of option menu. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int ITEM_TEXT_NORMAL; + + /** + * The property key to get the pressed text color of the item of option menu. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int ITEM_TEXT_PRESSED; + + /** + * The property key to get the disabled text color of the item of option menu. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int ITEM_TEXT_DISABLED; + + /** + * The property key to get the highlighted text color of the item of option menu. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int ITEM_TEXT_HIGHLIGHTED; + + /** + * The property key to get the normal background color of the item of option menu. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int ITEM_BG_NORMAL; + + /** + * The property key to get the pressed background color of the item of option menu. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int ITEM_BG_PRESSED; + + /** + * The property key to get the disabled background color of the item of option menu. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int ITEM_BG_DISABLED; + + /** + * The property key to get the highlighted background color of the item of option menu. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int ITEM_BG_HIGHLIGHTED; + + /** + * The property key to get the normal color of the arrow of option menu. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int CONTEXTUAL_POPUP_ARROW_NORMAL; + + /** + * The property key to get the pressed color of the arrow of option menu. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int CONTEXTUAL_POPUP_ARROW_PRESSED; + + /** + * The property key to get the disabled color of the arrow of option menu. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int CONTEXTUAL_POPUP_ARROW_DISABLED; + + /** + * The property key to get the highlighted color of the arrow of option menu. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int CONTEXTUAL_POPUP_ARROW_HIGHLIGHTED; + + /** + * The property key to get the color of list type divider 01 of option menu. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int LIST_ITEM_DIVIDER_01_NORMAL; + + /** + * The property key to get the color of list type divider 02 of option menu. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int LIST_ITEM_DIVIDER_02_NORMAL; + }; + + /** + * @struct Panel + * @brief This struct provides the color keys of %Panel. + * + * @since 2.1 + * + * The %Panel struct provides the color keys of %Panel. + * + */ + struct _OSP_EXPORT_ Panel + { + /** + * The property key to get the background color of grouped style of panel. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int GROUPED_STYLE_BG_NORMAL; + }; + + /** + * @struct Popup + * @brief This struct provides the color keys of %Popup. + * + * @since 2.1 + * + * The %Popup struct provides the color keys of %Popup. + * + */ + struct _OSP_EXPORT_ Popup + { + /** + * The property key to get the background color of popup. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BG_NORMAL; + + /** + * The property key to get the color of the title text of popup. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TITLE_TEXT_NORMAL; + + /** + * The property key to get the background color of the title of popup. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int TITLE_BG_NORMAL; + }; + + /** + * @struct Progress + * @brief This struct provides the color keys of %Progress. + * + * @since 2.1 + * + * The %Progress struct provides the color keys of %Progress. + * + */ + struct _OSP_EXPORT_ Progress + { + /** + * The property key to get the background color of the bar of progress. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BAR_BG_NORMAL; + + /** + * The property key to get the background color of progress. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BAR_NORMAL; + }; + + /** + * @struct Scroll + * @brief This struct provides the color keys of %Scroll. + * + * @since 2.1 + * + * The %Scroll struct provides the color keys of %Scroll. + * + */ + struct _OSP_EXPORT_ Scroll + { + /** + * The property key to get the background color of thumb of scroll. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int THUMB_BG_NORMAL; + + /** + * The property key to get the normal color of the jump-to-top button of scroll. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int JUMP_TO_TOP_NORMAL; + + /** + * The property key to get the pressed color of the jump-to-top button of scroll. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int JUMP_TO_TOP_PRESSED; + + /** + * The property key to get the normal background color of the button of scroll. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_BG_NORMAL; + + /** + * The property key to get the pressed background color of the button of scroll. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_BG_PRESSED; + }; + + /** + * @struct SearchBar + * @brief This struct provides the color keys of %SearchBar. + * + * @since 2.1 + * + * The %SearchBar struct provides the color keys of %SearchBar. + * + */ + struct _OSP_EXPORT_ SearchBar + { + /** + * The property key to get the normal background color of the button of search bar. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_BG_NORMAL; + + /** + * The property key to get the pressed background color of the button of search bar. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_BG_PRESSED; + + /** + * The property key to get the disabled background color of the button of search bar. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_BG_DISABLED; + + /** + * The property key to get the highlighted background color of the button of search bar. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_BG_HIGHLIGHTED; + + /** + * The property key to get the normal text color of the button of search bar. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_TEXT_NORMAL; + + /** + * The property key to get the pressed text color of the button of search bar. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_TEXT_PRESSED; + + /** + * The property key to get the disabled text color of the button of search bar. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_TEXT_DISABLED; + + /** + * The property key to get the highlighted text color of the button of search bar. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BUTTON_TEXT_HIGHLIGHTED; + + /** + * The property key to get the normal background color of the edit of search bar. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int EDIT_BG_NORMAL; + + /** + * The property key to get the disabled background color of the edit of search bar. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int EDIT_BG_DISABLED; + + /** + * The property key to get the pressed background color of the edit of search bar. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int EDIT_BG_PRESSED; + + /** + * The property key to get the highlighted background color of the edit of search bar. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int EDIT_BG_HIGHLIGHTED; + + /** + * The property key to get the normal guide text color of the edit of search bar. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int GUIDE_TEXT_NORMAL; + + /** + * The property key to get the disabled guide text color of the edit of search bar. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int GUIDE_TEXT_DISABLED; + + /** + * The property key to get the normal text color of the edit of search bar. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int EDIT_TEXT_NORMAL; + + /** + * The property key to get the disabled text color of the edit of search bar. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int EDIT_TEXT_DISABLED; + + /** + * The property key to get the highlighted text color of the edit of search bar. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int EDIT_TEXT_HIGHLIGHTED; + + /** + * The property key to get the pressed text color of the edit of search bar. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int EDIT_TEXT_PRESSED; + + /** + * The property key to get the normal background color of the icon of search bar. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ICON_BG_NORMAL; + + /** + * The property key to get the disabled background color of the icon of search bar. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ICON_BG_DISABLED; + + /** + * The property key to get the background color of the content area of search bar. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int CONTENT_AREA_BG_NORMAL; + + /** + * The property key to get the default background color of search bar. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int BG_NORMAL; + }; + + /** + * @struct Slider + * @brief This struct provides the color keys of %Slider. + * + * @since 2.1 + * + * The %Slider struct provides the color keys of %Slider. + * + */ + struct _OSP_EXPORT_ Slider + { + /** + * The property key to get the background color of the others style of slider. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BG_OTHERS_NORMAL; + + /** + * The property key to get the background color of the default style of slider. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BG_DEFAULT_NORMAL; + + /** + * The property key to get the background color of the bar of slider. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BAR_BG_NORMAL; + + /** + * The property key to get the color of the bar of slider. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BAR_NORMAL; + + /** + * The property key to get the normal background color of the handle of slider. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int HANDLE_BG_NORMAL; + + /** + * The property key to get the pressed background color of the handle of slider. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int HANDLE_BG_PRESSED; + + /** + * The property key to get the disabled background color of the handle of slider. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int HANDLE_BG_DISABLED; + + /** + * The property key to get the highlighted background color of the handle of slider. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int HANDLE_BG_HIGHLIGHTED; + + /** + * The property key to get the normal text color of the handle of slider. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int HANDLE_NUMBER_TEXT_NORMAL; + + /** + * The property key to get the disabled text color of the handle of slider. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int HANDLE_NUMBER_TEXT_DISABLED; + + /** + * The property key to get the pressed text color of the handle of slider. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int HANDLE_NUMBER_TEXT_PRESSED; + + /** + * The property key to get the highlighted text color of the handle of slider. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int HANDLE_NUMBER_TEXT_HIGHLIGHTED; + + /** + * The property key to get the color of the title text of slider. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TITLE_TEXT_NORMAL; + + /** + * The property key to get the background color of the overlay of slider. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int OVERLAY_BG_NORMAL; + + /** + * The property key to get the text color of the overlay of slider. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int OVERLAY_TEXT_NORMAL; + }; + + /** + * @struct SplitPanel + * @brief This struct provides the color keys of %SplitPanel. + * + * @since 2.1 + * + * The %SplitPanel struct provides the color keys of %SplitPanel. + * + */ + struct _OSP_EXPORT_ SplitPanel + { + /** + * The property key to get the normal color of the divider of split panel. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int DIVIDER_BG_NORMAL; + + /** + * The property key to get the pressed color of the divider of split panel. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int DIVIDER_BG_PRESSED; + + /** + * The property key to get the disabled color of the divider of split panel. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int DIVIDER_BG_DISABLED; + }; + + /** + * @struct TabBar + * @brief This struct provides the color keys of %TabBar. + * + * @since 2.1 + * + * The %TabBar struct provides the color keys of %TabBar. + * + */ + struct _OSP_EXPORT_ TabBar + { + /** + * The property key to get the background color of tab bar. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BG_NORMAL; + + /** + * The property key to get the normal background color of the item of tab bar. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ITEM_BG_NORMAL; + + /** + * The property key to get the pressed background color of the item of tab bar. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ITEM_BG_PRESSED; + + /** + * The property key to get the selected background color of the item of tab bar. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ITEM_BG_SELECTED; + + /** + * The property key to get the disabled background color of the item of tab bar. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int ITEM_BG_DISABLED; + + /** + * The property key to get the normal text color of the item of tab bar. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ITEM_TEXT_NORMAL; + + /** + * The property key to get the pressed text color of the item of tab bar. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ITEM_TEXT_PRESSED; + + /** + * The property key to get the selected text color of the item of tab bar. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ITEM_TEXT_SELECTED; + + /** + * The property key to get the disabled text color of the item of tab bar. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int ITEM_TEXT_DISABLED; + + /** + * The property key to get the background color of the arrow of tab bar. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ARROW_BG_NORMAL; + }; + + /** + * @struct Tab + * @brief This struct provides the color keys of %Tab. + * + * @since 2.1 + * + * The %Tab struct provides the color keys of %Tab. + * + */ + struct _OSP_EXPORT_ Tab + { + /** + * The property key to get the normal background color of the item of tab. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ITEM_BG_NORMAL; + + /** + * The property key to get the pressed background color of the item of tab. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ITEM_BG_PRESSED; + + /** + * The property key to get the selected background color of the item of tab. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ITEM_BG_SELECTED; + + /** + * The property key to get the highlighted background color of the item of tab. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ITEM_BG_HIGHLIGHTED; + + /** + * The property key to get the disabled background color of the item of tab. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ITEM_BG_DISABLED; + + /** + * The property key to get the normal text color of the item of tab. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ITEM_TEXT_NORMAL; + + /** + * The property key to get the pressed text color of the item of tab. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ITEM_TEXT_PRESSED; + + /** + * The property key to get the selected text color of the item of tab. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ITEM_TEXT_SELECTED; + + /** + * The property key to get the highlighted text color of the item of tab. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ITEM_TEXT_HIGHLIGHTED; + + /** + * The property key to get the disabled text color of the item of tab. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ITEM_TEXT_DISABLED; + }; + + /** + * @struct TableView + * @brief This struct provides the color keys of %TableView. + * + * @since 2.1 + * + * The %TableView struct provides the color keys of %TableView. + * + */ + struct _OSP_EXPORT_ TableView + { + /** + * The property key to get the background color of table view. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BG_NORMAL; + + /** + * 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 the bottom divider of table view. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ITEM_DIVIDER_BOTTOM_BG_NORMAL; + + /** + * The property key to get the normal background color of the item of table view. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ITEM_BG_NORMAL; + + /** + * The property key to get the pressed background color of the item of table view. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ITEM_BG_PRESSED; + + /** + * The property key to get the highlighted background color of the item of table view. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ITEM_BG_HIGHLIGHTED; + + /** + * The property key to get the disabled background color of the item of table view. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ITEM_BG_DISABLED; + + /** + * The property key to get the normal text color of the item of table view. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ITEM_TEXT_NORMAL; + + /** + * The property key to get the pressed text color of the item of table view. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ITEM_TEXT_PRESSED; + + /** + * The property key to get the highlighted text color of the item of table view. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ITEM_TEXT_HIGHLIGHTED; + + /** + * The property key to get the disabled text color of the item of table view. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ITEM_TEXT_DISABLED; + + /** + * The property key to get the color of the description text of table view. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ITEM_DESCRIPTION_TEXT_NORMAL; + + /** + * The property key to get the normal color of the annex of table view. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ITEM_ANNEX_DETAIL_NORMAL; + + /** + * The property key to get the pressed color of the annex of table view. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ITEM_ANNEX_DETAIL_PRESSED; + + /** + * The property key to get the highlighted color of the annex of table view. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ITEM_ANNEX_DETAIL_HIGHLIGHTED; + + /** + * The property key to get the normal background color of the annex of table view. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ITEM_ANNEX_DETAIL_BG_NORMAL; + + /** + * The property key to get the pressed background color of the annex of table view. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ITEM_ANNEX_DETAIL_BG_PRESSED; + + /** + * The property key to get the highlighted background color of the annex of table view. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int ITEM_ANNEX_DETAIL_BG_HIGHLIGHTED; + + /** + * The property key to get the background color of the group item of table view. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int GROUP_ITEM_BG_NORMAL; + + /** + * The property key to get the pressed background color of the group item of table view. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int GROUP_ITEM_BG_PRESSED; + + /** + * The property key to get the highlighted background color of the group item of table view. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int GROUP_ITEM_BG_HIGHLIGHTED; + + /** + * The property key to get the disabled background color of the group item of table view. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int GROUP_ITEM_BG_DISABLED; + + /** + * The property key to get the normal text color of the group item of table view. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int GROUP_ITEM_TEXT_NORMAL; + + /** + * The property key to get the pressed text color of the group item of table view. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int GROUP_ITEM_TEXT_PRESSED; + + /** + * The property key to get the highlighted text color of the group item of table view. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int GROUP_ITEM_TEXT_HIGHLIGHTED; + + /** + * The property key to get the disabled text color of the group item of table view. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int GROUP_ITEM_TEXT_DISABLED; + + /** + * The property key to get the normal color of the index bar of the group item of table view. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int GROUP_ITEM_INDEX_BAR_NORMAL; + + /** + * The property key to get the pressed color of the index bar of the group item of table view. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int GROUP_ITEM_INDEX_BAR_PRESSED; + + /** + * The property key to get the disabled color of the index bar of the group item of table view. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int GROUP_ITEM_INDEX_BAR_DISABLED; + + /** + * The property key to get the highlighted color of the index bar of the group item of table view. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int GROUP_ITEM_INDEX_BAR_HIGHLIGHTED; + + /** + * The property key to get the normal color of the bar of the group item of table view. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int GROUP_ITEM_BAR_NORMAL; + + /** + * The property key to get the pressed color of the bar of the group item of table view. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int GROUP_ITEM_BAR_PRESSED; + + /** + * The property key to get the highlighted color of the bar of the group item of table view. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int GROUP_ITEM_BAR_HIGHLIGHTED; + + /** + * The property key to get the disabled color of the bar of the group item of table view. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int GROUP_ITEM_BAR_DISABLED; + + /** + * The property key to get the background color of the section item of table view. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int SECTION_ITEM_BG_NORMAL; + + /** + * The property key to get the background color of the context item of table view. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int CONTEXT_ITEM_BG_NORMAL; + + /** + * The property key to get the empty text color of table view. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int EMPTY_TEXT_NORMAL; + + /** + * 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 the Right Divider of table view. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int ITEM_ANNEX_DIVIDER_RIGHT_BG_NORMAL; + }; + + /** + * @struct TokenEdit + * @brief This struct provides the color keys of %TokenEdit. + * + * @since 2.1 + * + * The %TokenEdit struct provides the color keys of %TokenEdit. + * + */ + struct _OSP_EXPORT_ TokenEdit + { + /** + * The property key to get the normal background color of token edit. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BG_NORMAL; + + /** + * The property key to get the selected background color of token edit. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BG_SELECTED; + + /** + * The property key to get the highlighted background color of token edit. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BG_HIGHLIGHTED; + + /** + * The property key to get the disabled background color of token edit. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int BG_DISABLED; + + /** + * The property key to get the normal text color of token edit. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TEXT_NORMAL; + + /** + * The property key to get the selected text color of token edit. + * + * @since 2.1 + */ + _OSP_EXPORT_ static const int TEXT_SELECTED; + + /** + * The property key to get the highlighted text color of token edit. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int TEXT_HIGHLIGHTED; + + /** + * The property key to get the disabled text color of token edit. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int TEXT_DISABLED; + + /** + * The property key to get the normal title text color of token edit. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int TITLE_TEXT_NORMAL; + + /** + * The property key to get the pressed title text color of token edit. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int TITLE_TEXT_PRESSED; + + /** + * The property key to get the highlighted title text color of token edit. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int TITLE_TEXT_HIGHLIGHTED; + + /** + * The property key to get the disabled title text color of token edit. + * + * @since 2.2 + */ + _OSP_EXPORT_ static const int TITLE_TEXT_DISABLED; + }; +}; +}} //Tizen::Ui +#endif // _FUI_UI_CONFIGURATION_TYPES_H_ diff --git a/inc/FUiVariant.h b/inc/FUiVariant.h new file mode 100644 index 0000000..19e1ab8 --- /dev/null +++ b/inc/FUiVariant.h @@ -0,0 +1,1005 @@ +// +// 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 FUiVariant.h + * @brief This is the header file for the %Variant class. + * + * This header file contains the declarations of the %Variant class. + */ +#ifndef _FUI_VARIANT_H_ +#define _FUI_VARIANT_H_ + +#include +#include + +namespace Tizen { namespace Base +{ + class DateTime; +} } + +namespace Tizen { namespace Graphics +{ + class Rectangle; + class Dimension; + class Point; + class Color; + class FloatPoint; + class FloatRectangle; + class FloatDimension; + class FloatMatrix4; + class FloatPoint3; + class FloatVector4; +} } + +namespace Tizen { namespace Ui +{ + +class _VariantImpl; + +/** + * @enum VariantType + * + * Defines the types which %Variant can hold. + * + * @since 2.0 + */ +enum VariantType +{ + VARIANT_TYPE_NONE = 0, /**< The type for invalid variant */ + VARIANT_TYPE_INT, /**< The @c int type */ + VARIANT_TYPE_UINT, /**< The @c unsigned @c int type */ + VARIANT_TYPE_BOOL, /**< The @c bool type */ + VARIANT_TYPE_FLOAT, /**< The @c float type */ + VARIANT_TYPE_DOUBLE, /**< The @c double type */ + VARIANT_TYPE_LONG, /**< The @c long type */ + VARIANT_TYPE_ULONG, /**< The @c unsigned @c long type */ + VARIANT_TYPE_LONGLONG, /**< The @c long @c long type */ + VARIANT_TYPE_ULONGLONG, /**< The @c unsigned @c long @c long type */ + VARIANT_TYPE_STRING, /**< The String type */ + VARIANT_TYPE_DATETIME, /**< The DateTime type */ + VARIANT_TYPE_COLOR, /**< The Color type */ + VARIANT_TYPE_POINT, /**< The Point type */ + VARIANT_TYPE_FLOAT_POINT, /**< The FloatPoint type */ + VARIANT_TYPE_RECTANGLE, /**< The Rectangle type */ + VARIANT_TYPE_FLOAT_RECTANGLE, /**< The FloatRectangle type */ + VARIANT_TYPE_DIMENSION, /**< The Dimension type */ + VARIANT_TYPE_FLOAT_DIMENSION, /**< The FloatDimension type */ + VARIANT_TYPE_FLOAT_MATRIX4, /**< The FloatMatrix4 type */ + VARIANT_TYPE_FLOAT_POINT3, /**< The FloatPoint3 type @b Since: @b 2.1 */ + VARIANT_TYPE_FLOAT_VECTOR4 /**< The FloatPoint3 type @b Since: @b 2.1 */ +}; + +/** + * @class Variant + * @brief This class abstracts a %Variant value. + * + * @since 2.0 + * + * The %Variant class represents a %Variant type which can hold any of the basic type values. + * + */ +class _OSP_EXPORT_ Variant + : public Tizen::Base::Object +{ +public: + /** + * This is the default constructor for this class. + * + * @since 2.0 + */ + Variant(void); + + /** + * This is the copy constructor for the %Variant class. + * + * @since 2.0 + * + * @param[in] value A reference to the %Variant instance to copy + */ + Variant(const Variant& value); + + /** + * Initializes this instance of %Variant with the specified @c int value. + * + * @since 2.0 + * + * @param[in] value An @c int value + */ + Variant(int value); + + /** + * Initializes this instance of %Variant with the specified @c unsigned @c int value. + * + * @since 2.0 + * + * @param[in] value An @c unsigned @c int value + */ + Variant(unsigned int value); + + /** + * Initializes this instance of %Variant with the specified bool value. + * + * @since 2.0 + * + * @param[in] value A bool value + */ + Variant(bool value); + + /** + * Initializes this instance of %Variant with the specified @c float value. + * + * @since 2.0 + * + * @param[in] value A @c float value + */ + Variant(float value); + + /** + * Initializes this instance of %Variant with the specified @c double value. + * + * @since 2.0 + * + * @param[in] value A @c double value + */ + Variant(double value); + + /** + * Initializes this instance of %Variant with the specified @c long value. + * + * @since 2.0 + * + * @param[in] value A @c long value + */ + Variant(long value); + + /** + * Initializes this instance of %Variant with the specified @c unsigned @c long value. + * + * @since 2.0 + * + * @param[in] value An @c unsigned @c long value + */ + Variant(unsigned long value); + + /** + * Initializes this instance of %Variant with the specified @c long @c long value. + * + * @since 2.0 + * + * @param[in] value A @c long @c long value + */ + Variant(long long value); + + /** + * Initializes this instance of %Variant with the specified @c unsigned @c long @c long value. + * + * @since 2.0 + * + * @param[in] value An @c unsigned @c long @c long value + */ + Variant(unsigned long long value); + + /** + * Initializes this instance of %Variant with the specified array of characters. + * + * @since 2.0 + * + * @param[in] pValue An array of characters value + */ + Variant(const char* pValue); + + /** + * Initializes this instance of %Variant with the specified array of Unicode characters. + * + * @since 2.0 + * + * @param[in] pValue An array of Unicode characters value + */ + Variant(const wchar_t* pValue); + + /** + * Initializes this instance of %Variant with the specified Tizen::Base::String value. + * + * @since 2.0 + * + * @param[in] value A Tizen::Base::String value + */ + Variant(const Tizen::Base::String& value); + + /** + * Initializes this instance of %Variant with the specified Tizen::Base::DateTime value. + * + * @since 2.0 + * + * @param[in] value A Tizen::Base::DateTime value + */ + Variant(const Tizen::Base::DateTime& value); + + /** + * Initializes this instance of %Variant with the specified Tizen::Graphics::Color value. + * + * @since 2.0 + * + * @param[in] value A Tizen::Graphics::Color value + */ + Variant(const Tizen::Graphics::Color& value); + + /** + * Initializes this instance of %Variant with the specified Tizen::Graphics::Point value. + * + * @since 2.0 + * + * @param[in] value A Tizen::Graphics::Point value + */ + Variant(const Tizen::Graphics::Point& value); + + /** + * Initializes this instance of %Variant with the specified Tizen::Graphics::FloatPoint value. + * + * @since 2.0 + * + * @param[in] value A Tizen::Graphics::FloatPoint value + */ + Variant(const Tizen::Graphics::FloatPoint& value); + + /** + * Initializes this instance of %Variant with the specified Tizen::Graphics::Rectangle value. + * + * @since 2.0 + * + * @param[in] value A Tizen::Graphics::Rectangle value + */ + Variant(const Tizen::Graphics::Rectangle& value); + + /** + * Initializes this instance of %Variant with the specified Tizen::Graphics::FloatRectangle value. + * + * @since 2.0 + * + * @param[in] value A Tizen::Graphics::FloatRectangle value + */ + Variant(const Tizen::Graphics::FloatRectangle& value); + + /** + * Initializes this instance of %Variant with the specified Tizen::Graphics::Dimension value. + * + * @since 2.0 + * + * @param[in] value A Tizen::Graphics::Dimension value + */ + Variant(const Tizen::Graphics::Dimension& value); + + /** + * Initializes this instance of %Variant with the specified Tizen::Graphics::FloatDimension value. + * + * @since 2.0 + * + * @param[in] value A Tizen::Graphics::FloatDimension value + */ + Variant(const Tizen::Graphics::FloatDimension& value); + + /** + * Initializes this instance of %Variant with the specified Tizen::Graphics::FloatMatrix4 value. + * + * @since 2.0 + * + * @param[in] value A Tizen::Graphics::FloatMatrix4 value + */ + Variant(const Tizen::Graphics::FloatMatrix4& value); + + /** + * Initializes this instance of %Variant with a specified Tizen::Graphics::FloatPoint3 value. + * + * @since 2.1 + * + * @param[in] value A Tizen::Graphics::FloatPoint3 value + */ + Variant(const Tizen::Graphics::FloatPoint3& value); + + /** + * Initializes this instance of %Variant with a specified Tizen::Graphics::FloatVector4 value. + * + * @since 2.1 + * + * @param[in] value A Tizen::Graphics::FloatVector4 value + */ + Variant(const Tizen::Graphics::FloatVector4& value); + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~Variant(void); + + /** + * Assigns the value of the specified instance to the current instance of %Variant. + * + * @since 2.0 + * + * @return A reference to the %Variant instance + * @param[in] rhs An instance of %Variant to copy + */ + Variant& operator =(const Variant& rhs); + + /** + * Assigns the value to the current instance of %Variant. + * + * @since 2.0 + * + * @return A reference to the %Variant instance + * @param[in] rhs An @c int value + */ + Variant& operator =(int rhs); + + /** + * Assigns the value to the current instance of %Variant. + * + * @since 2.0 + * + * @return A reference to the %Variant instance + * @param[in] rhs An @c unsigned @c int value + * + */ + Variant& operator =(unsigned int rhs); + + /** + * Assigns the value to the current instance of %Variant. + * + * @since 2.0 + * @return A reference to the %Variant instance + * @param[in] rhs A @c bool value + * + */ + Variant& operator =(bool rhs); + + /** + * Assigns the value to the current instance of %Variant. + * + * @since 2.0 + * + * @return A reference to the %Variant instance + * @param[in] rhs A @c float value + * + */ + Variant& operator =(float rhs); + + /** + * Assigns the value to the current instance of %Variant. + * + * @since 2.0 + * + * @return A reference to the %Variant instance + * @param[in] rhs A @c double value + * + */ + Variant& operator =(double rhs); + + /** + * Assigns the value to the current instance of %Variant. + * + * @since 2.0 + * + * @return A reference to the %Variant instance + * @param[in] rhs A @c long value + * + */ + Variant& operator =(long rhs); + + /** + * Assigns the value to the current instance of %Variant. + * + * @since 2.0 + * + * @return A reference to the %Variant instance + * @param[in] rhs An @c unsigned @c long value + * + */ + Variant& operator =(unsigned long rhs); + + /** + * Assigns the value to the current instance of %Variant. + * + * @since 2.0 + * + * @return A reference to the %Variant instance + * @param[in] rhs A @c long @c long value + * + */ + Variant& operator =(long long rhs); + + /** + * Assigns the value to the current instance of %Variant. + * + * @since 2.0 + * @return A reference to the %Variant instance + * @param[in] rhs An @c unsigned @c long @c long value + * + */ + Variant& operator =(unsigned long long rhs); + + /** + * Assigns the value of the pointer to the current instance of %Variant. + * + * @since 2.0 + * + * @return A reference to the %Variant instance + * @param[in] pRhs A pointer to an array of characters + * + */ + Variant& operator =(const char* pRhs); + + /** + * Assigns the value of the pointer to the current instance of %Variant. + * + * @since 2.0 + * + * @return A reference to the %Variant instance + * @param[in] pRhs A pointer to an array of Unicode characters + * + */ + Variant& operator =(const wchar_t* pRhs); + + /** + * Assigns the value of the specified instance of Tizen::Base::String to the current instance of %Variant. + * + * @since 2.0 + * + * @return A reference to the %Variant instance + * @param[in] rhs An instance of Tizen::Base::String + */ + Variant& operator =(const Tizen::Base::String& rhs); + + /** + * Assigns the value of the specified instance of Tizen::Base::DateTime to the current instance of %Variant. + * + * @since 2.0 + * + * @return A reference to the %Variant instance + * @param[in] rhs An instance of Tizen::Base::DateTime + */ + Variant& operator =(const Tizen::Base::DateTime& rhs); + + /** + * Assigns the value of the specified instance of Tizen::Graphics::Color to the current instance of %Variant. + * + * @since 2.0 + * @return A reference to the %Variant instance + * @param[in] rhs An instance of Tizen::Graphics::Color + */ + Variant& operator =(const Tizen::Graphics::Color& rhs); + + /** + * Assigns the value of the specified instance of Tizen::Graphics::Point to the current instance of %Variant. + * + * @since 2.0 + * @return A reference to the %Variant instance + * @param[in] rhs An instance of Tizen::Graphics::Point + */ + Variant& operator =(const Tizen::Graphics::Point& rhs); + + /** + * Assigns the value of the specified instance of Tizen::Graphics::FloatPoint to the current instance of %Variant. + * + * @since 2.0 + * @return A reference to the %Variant instance + * @param[in] rhs An instance of Tizen::Graphics::FloatPoint + */ + Variant& operator =(const Tizen::Graphics::FloatPoint& rhs); + + /** + * Assigns the value of the specified instance of Tizen::Graphics::Rectangle to the current instance of %Variant. + * + * @since 2.0 + * @return A reference to the %Variant instance + * @param[in] rhs An instance of Tizen::Graphics::Rectangle + */ + Variant& operator =(const Tizen::Graphics::Rectangle& rhs); + + /** + * Assigns the value of the specified instance of Tizen::Graphics::FloatRectangle to the current instance of %Variant. + * + * @since 2.0 + * @return A reference to the %Variant instance + * @param[in] rhs An instance of Tizen::Graphics::FloatRectangle + */ + Variant& operator =(const Tizen::Graphics::FloatRectangle& rhs); + + /** + * Assigns the value of the specified instance of Tizen::Graphics::Dimension to the current instance of %Variant. + * + * @since 2.0 + * @return A reference to the %Variant instance + * @param[in] rhs An instance of Tizen::Graphics::Dimension + */ + Variant& operator =(const Tizen::Graphics::Dimension& rhs); + + /** + * Assigns the value of the specified instance of Tizen::Graphics::FloatDimension to the current instance of %Variant. + * + * @since 2.0 + * @return A reference to the %Variant instance + * @param[in] rhs An instance of Tizen::Graphics::FloatDimension + */ + Variant& operator =(const Tizen::Graphics::FloatDimension& rhs); + + /** + * Assigns the value of the specified instance of Tizen::Graphics::FloatMatrix4 to the current instance of %Variant. + * + * @since 2.0 + * @return A reference to the %Variant instance + * @param[in] rhs An instance of Tizen::Graphics::FloatMatrix4 + */ + Variant& operator =(const Tizen::Graphics::FloatMatrix4& rhs); + + /** + * Assigns the value of a specified instance of Tizen::Graphics::FloatPoint3 to the current instance of %Variant. + * + * @since 2.1 + * @return A reference to the %Variant instance + * @param[in] rhs An instance of Tizen::Graphics::FloatPoint3 + */ + Variant& operator =(const Tizen::Graphics::FloatPoint3& rhs); + + /** + * Assigns the value of a specified instance of Tizen::Graphics::FloatVecto4 to the current instance of %Variant. + * + * @since 2.1 + * @return A reference to the %Variant instance + * @param[in] rhs An instance of Tizen::Graphics::FloatVector4 + */ + Variant& operator =(const Tizen::Graphics::FloatVector4& rhs); + + /** + * Checks whether the specified instance and current instance of %Variant have equal values. + * + * @since 2.0 + * @return @c true if the two instances of %Variant are equal, @n + * else @c false + * @param[in] lhs An instance of %Variant + * @param[in] rhs An instance of %Variant + */ + _OSP_EXPORT_ friend bool operator ==(const Variant& lhs, const Variant& rhs); + + /** + * Checks whether the specified instance and current instance of %Variant have different values. + * @since 2.0 + * + * @return @c true if the values of the two instances of %Variant are not equal, @n + * else @c false + * @param[in] lhs An instance of %Variant + * @param[in] rhs An instance of %Variant + * + */ + _OSP_EXPORT_ friend bool operator !=(const Variant& lhs, const Variant& rhs); + + /** + * Gets the @c signed @c int equivalent of the current instance. + * + * @since 2.0 + * + * @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. + * + */ + int ToInt(void) const; + + /** + * Gets the @c unsigned @c int equivalent of the current instance. + * + * @since 2.0 + * + * @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. + * + */ + unsigned int ToUInt(void) const; + + /** + * Gets the @c bool equivalent of the current instance. + * + * @since 2.0 + * + * @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. + * + */ + bool ToBool(void) const; + + /** + * Gets the @c float equivalent of the current instance. + * + * @since 2.0 + * + * @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. + * + */ + float ToFloat(void) const; + + /** + * Gets the @c double equivalent of the current instance. + * + * @since 2.0 + * + * @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. + * + */ + double ToDouble(void) const; + + /** + * Gets the @c signed @c long equivalent of the current instance. + * + * @since 2.0 + * + * @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. + * + */ + long ToLong(void) const; + + /** + * Gets the @c unsigned @c int equivalent of the current instance. + * + * @since 2.0 + * + * @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. + * + */ + unsigned long ToULong(void) const; + + /** + * Gets the @c signed @c long @c long equivalent of the current instance. + * + * @since 2.0 + * + * @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. + * + */ + long long ToLongLong(void) const; + + /** + * Gets the @c unsigned @c long @c long equivalent of the current instance. + * + * @since 2.0 + * + * @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. + * + */ + unsigned long long ToULongLong(void) const; + + /** + * Gets the Tizen::Base::String representation of the value of the current instance. + * + * @since 2.0 + * + * @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. + * + */ + Tizen::Base::String ToString(void) const; + + /** + * Gets the Tizen::Base::DateTime representation of the value of the current instance. + * + * @since 2.0 + * + * @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. + * + */ + Tizen::Base::DateTime ToDateTime(void) const; + + /** + * Gets the Tizen::Graphics::Color representation of the value of the current instance. + * + * @since 2.0 + * + * @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. + * + */ + Tizen::Graphics::Color ToColor(void) const; + + /** + * Gets the Tizen::Graphics::Point representation of the value of the current instance. + * + * @since 2.0 + * + * @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. + * + */ + Tizen::Graphics::Point ToPoint(void) const; + + /** + * Gets the Tizen::Graphics::FloatPoint representation of the value of the current instance. + * + * @since 2.0 + * + * @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. + * + */ + Tizen::Graphics::FloatPoint ToFloatPoint(void) const; + + /** + * Gets the Tizen::Graphics::Rectangle representation of the value of the current instance. + * + * @since 2.0 + * + * @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. + * + */ + Tizen::Graphics::Rectangle ToRectangle(void) const; + + /** + * Gets the Tizen::Graphics::FloatRectangle representation of the value of the current instance. + * + * @since 2.0 + * + * @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. + * + */ + Tizen::Graphics::FloatRectangle ToFloatRectangle(void) const; + + /** + * Gets the Tizen::Graphics::Dimension representation of the value of the current instance. + * + * @since 2.0 + * + * @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. + * + */ + Tizen::Graphics::Dimension ToDimension(void) const; + + /** + * Gets the Tizen::Graphics::FloatDimension representation of the value of the current instance. + * + * @since 2.0 + * + * @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. + * + */ + Tizen::Graphics::FloatDimension ToFloatDimension(void) const; + + /** + * Gets the Tizen::Graphics::FloatMatrix4 representation of the value of the current instance. + * + * @since 2.0 + * + * @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. + * + */ + Tizen::Graphics::FloatMatrix4 ToFloatMatrix4(void) const; + + /** + * Gets the Tizen::Graphics::FloatPoint3 representation of the value of the current instance. + * + * @since 2.1 + * + * @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. + * + */ + Tizen::Graphics::FloatPoint3 ToFloatPoint3(void) const; + + /** + * Gets the Tizen::Graphics::FloatVector4 representation of the value of the current instance. + * + * @since 2.1 + * + * @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. + * + */ + Tizen::Graphics::FloatVector4 ToFloatVector4(void) const; + + /** + * Checks whether the variant is empty. + * + * @since 2.0 + * + * @return @c true if the current instance is NULL_VARIANT, @n + * else @c false + */ + bool IsEmpty(void) const; + + /** + * Gets the type of the variant. + * + * @since 2.0 + * + * @return The variant type + */ + VariantType GetType(void) const; + + /** + * Checks whether the current instance of %Variant equals the specified instance of %Variant. + * + * @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 %Variant + * @remarks This method overrides Tizen::Base::Object::Equals(). This method uses the values of the %Variant to compare the two instances. + */ + virtual bool Equals(const Object& obj) const; + + /** + * Gets the hash value of the current instance. + * + * @since 2.0 + * + * @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; + +public: + /** + * A constant represents a @c null value. + * + * @since 2.0 + */ + static const Variant NULL_VARIANT; + + // + // 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 prohibited. If this method is used in an application, the application can get rejected during + // the certification process. + // + // @since 2.0 + // + const _VariantImpl* GetVariantImpl(void) const; + + // + // 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 prohibited. If this method is used in an application, the application can get rejected during + // the certification process. + // + // @since 2.0 + // + _VariantImpl* GetVariantImpl(void); + +private: + _VariantImpl* __pVariantImpl; +}; // Variant + +} } // Tizen::Ui + +#endif // _FUI_VARIANT_H_ diff --git a/inc/FUiVerticalBoxLayout.h b/inc/FUiVerticalBoxLayout.h new file mode 100644 index 0000000..837e494 --- /dev/null +++ b/inc/FUiVerticalBoxLayout.h @@ -0,0 +1,417 @@ +// +// 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 FUiVerticalBoxLayout.h + * @brief This is the header file for the %VerticalBoxLayout class. + * + * This header file contains the declarations of the %VerticalBoxLayout class. + */ +#ifndef _FUI_VERTICAL_BOX_LAYOUT_H_ +#define _FUI_VERTICAL_BOX_LAYOUT_H_ + +#include + +namespace Tizen { namespace Ui +{ +class Control; + +/** + * @class VerticalBoxLayout + * @brief The vertical box layout positions the children of a container vertically. + * + * @since 2.0 + * + * The %VerticalBoxLayout class defines the vertical box layout for a Container. The layout positions the children of the %Container vertically. + * + * For more information on the class features, see Vertical and Horizontal Box Layouts. + * + * The following examples demonstrate how to use the %VerticalBoxLayout class. + * @code +// Sample code for VerticalBoxLayoutSample.h +#include + +class VerticalBoxLayoutSample + : public Tizen::Ui::Controls::Form +{ +public: + bool Initialize(void); + virtual result OnInitializing(void); +}; + * @endcode + * + * @code +// Sample code for VerticalBoxLayoutSample.cpp +#include + +#include "VerticalBoxLayoutSample.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; + +bool +VerticalBoxLayoutSample::Initialize(void) +{ + //Creates an instance of VerticalBoxLayout + VerticalBoxLayout formLayout; + formLayout.Construct(VERTICAL_DIRECTION_DOWNWARD); + + // Applies the vertical box layout to the form + Construct(formLayout, FORM_STYLE_NORMAL); + return true; +} + +result +VerticalBoxLayoutSample::OnInitializing(void) +{ + result r = E_SUCCESS; + + // Creates an instance of VerticalBoxLayout for the top panel + VerticalBoxLayout topPanelLayout; + topPanelLayout.Construct(VERTICAL_DIRECTION_DOWNWARD); + + // Creates an instance of Panel and applies it to the vertical box layout + Panel* pTopPanel = new Panel(); + pTopPanel->Construct(topPanelLayout, Rectangle(0, 0, GetClientAreaBounds().width, 350)); + { + // Creates instances of Label and a instance of Button + Label* pLabel1 = new Label(); + pLabel1->Construct(Rectangle(0,0,150,80), L"RIGHT"); + pLabel1->SetBackgroundColor(Color(0x00, 0x10, 0x80, 0xFF)); + pTopPanel->AddControl(pLabel1); + + Label* pLabel2 = new Label(); + pLabel2->Construct(Rectangle(0,0,200,80), L"CENTER"); + pLabel2->SetBackgroundColor(Color(0x00, 0x20, 0xA0, 0xFF)); + pTopPanel->AddControl(pLabel2); + + Label* pLabel3 = new Label(); + pLabel3->Construct(Rectangle(0,0,150,80), L"LEFT"); + pLabel3->SetBackgroundColor(Color(0x00, 0x30, 0xC0, 0xFF)); + pTopPanel->AddControl(pLabel3); + + Button* pButton = new Button(); + pButton->Construct(Rectangle(0,0,150,80), "FIT TO PARENT"); + pTopPanel->AddControl(pButton); + + // Sets relations each label and button + topPanelLayout.SetHorizontalAlignment(*pLabel1, LAYOUT_HORIZONTAL_ALIGN_RIGHT); + topPanelLayout.SetHorizontalAlignment(*pLabel2, LAYOUT_HORIZONTAL_ALIGN_CENTER); + topPanelLayout.SetHorizontalAlignment(*pLabel3, LAYOUT_HORIZONTAL_ALIGN_LEFT); + topPanelLayout.SetSpacing(*pButton, 10); + topPanelLayout.SetHorizontalFitPolicy(*pButton, FIT_POLICY_PARENT); + } + + // Adds the top panel to the form + AddControl(pTopPanel); + + // Creates an instance of VerticalBoxLayout for the bottom panel + VerticalBoxLayout bottomPanelLayout; + bottomPanelLayout.Construct(VERTICAL_DIRECTION_DOWNWARD); + + // Creates an instance of Panel and applies it to the vertical box layout + Panel* pBottomPanel = new Panel(); + pBottomPanel->Construct(bottomPanelLayout, Rectangle(0, 0, GetClientAreaBounds().width, 450)); + { + // Creates instances of Label + Label* pLabel1 = new Label(); + pLabel1->Construct(Rectangle(0,0,100,50), L"WEIGHT = 1.0f"); + pLabel1->SetBackgroundColor(Color(0x00, 0x10, 0x80, 0xFF)); + pBottomPanel->AddControl(pLabel1); + + Label* pLabel2 = new Label(); + pLabel2->Construct(Rectangle(0,0,100,50), L"WEIGHT = 2.0f"); + pLabel2->SetBackgroundColor(Color(0x00, 0x20, 0xA0, 0xFF)); + pBottomPanel->AddControl(pLabel2); + + Label* pLabel3 = new Label(); + pLabel3->Construct(Rectangle(0,0,100,50), L"WEIGHT = 3.0f"); + pLabel3->SetBackgroundColor(Color(0x00, 0x30, 0xC0, 0xFF)); + pBottomPanel->AddControl(pLabel3); + + // Sets relations each label + bottomPanelLayout.SetHorizontalFitPolicy(*pLabel1, FIT_POLICY_PARENT); + bottomPanelLayout.SetHorizontalFitPolicy(*pLabel2, FIT_POLICY_PARENT); + bottomPanelLayout.SetHorizontalFitPolicy(*pLabel3, FIT_POLICY_PARENT); + bottomPanelLayout.SetWeight(*pLabel1, 1.0f); + bottomPanelLayout.SetWeight(*pLabel2, 2.0f); + bottomPanelLayout.SetWeight(*pLabel3, 3.0f); + } + + // Adds the bottom panel to the form + AddControl(pBottomPanel); + + //Gets the layout of the form + VerticalBoxLayout* pFormLayout = dynamic_cast(this->GetLayoutN()); + + // Sets relations between panels + pFormLayout->SetHorizontalFitPolicy(*pTopPanel, FIT_POLICY_PARENT); + pFormLayout->SetSpacing(*pBottomPanel, 50); + pFormLayout->SetHorizontalFitPolicy(*pBottomPanel, FIT_POLICY_PARENT); + + return r; +} + * @endcode + * + */ +class _OSP_EXPORT_ VerticalBoxLayout + : public Layout +{ +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. + * + * @since 2.0 + * + * @remarks After creating an instance of this class, the Construct() method must be called explicitly to initialize this instance. + */ + VerticalBoxLayout(void); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~VerticalBoxLayout(void); + + /** + * Initializes this instance of %VerticalBoxLayout with the specified parameter. + * + * @since 2.0 + * + * @return An error code + * @param[in] direction The direction in which the children are attached + * @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 Construct(VerticalDirection direction); + + /** + * Gets the direction of %VerticalBoxLayout. + * + * @since 2.0 + * + * @return An error code + * @param[out] direction The direction in which the children are attached + * @exception E_SUCCESS The method is successful. + */ + result GetDirection(VerticalDirection& direction) const; + + /** + * Gets the type of the layout. + * + * @since 2.0 + * + * @return The layout type + */ + virtual LayoutType GetLayoutType(void) const; + + /** + * Sets the horizontal alignment of the specified control. + * + * @since 2.0 + * + * @return An error code + * @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 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 @c HORIZONTAL_ALIGNLEFT. + */ + result SetHorizontalAlignment(Control& childControl, LayoutHorizontalAlignment alignment); + + /** + * Sets the space between the specified control and its predecessor. + * + * @since 2.0 + * + * @return An error code + * @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 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 the specified control and its predecessor. + * + * @since 2.1 + * + * @return An error code + * @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 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, float space); + + /** + * Sets the horizontal margins of the specified control. + * + * @since 2.0 + * + * @return An error code + * @param[in] childControl The control for which the margins are set + * @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 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 the specified control. + * + * @since 2.1 + * + * @return An error code + * @param[in] childControl The control for which the margins are set + * @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 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, float left, float right); + + /** + * Sets the width of the specified control with the fixed length. + * + * @since 2.0 + * + * @return An error code + * @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 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 + * + * @return An error code + * @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 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); + + /** + * Sets the width of the specified control with the fitting policy. + * + * @since 2.0 + * + * @return An error code + * @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 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); + + /** + * Sets the height of the specified control with a fixed length. + * + * @since 2.0 + * + * @return An error code + * @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 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 the specified control with a fixed length. + * + * @since 2.1 + * + * @return An error code + * @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 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); + + /** + * Sets the height of the specified control with the fitting policy. + * + * @since 2.0 + * + * @return An error code + * @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 is not a child of the container that owns the layout. + * @exception E_SYSTEM A system error has occurred. + * @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); + + /** + * Sets the weight of the specified control. + * + * @since 2.0 + * + * @return An error code + * @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 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. + */ + result SetWeight(Control& childControl, float weight); + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + VerticalBoxLayout(const VerticalBoxLayout& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + VerticalBoxLayout& operator =(const VerticalBoxLayout& rhs); +}; // VerticalBoxLayout + +}} // Tizen::Ui + +#endif // _FUI_VERTICAL_BOX_LAYOUT_H_ diff --git a/inc/FUiWindow.h b/inc/FUiWindow.h new file mode 100644 index 0000000..d501585 --- /dev/null +++ b/inc/FUiWindow.h @@ -0,0 +1,383 @@ +// +// 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 FUiWindow.h + * @brief This is the header file for the %Window class. + * + * This header file contains the declarations of the %Window class. + */ + +#ifndef _FUI_WINDOW_H_ +#define _FUI_WINDOW_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Animations { +class DisplayContext; +}}} + +namespace Tizen { namespace Ui +{ + +class _WindowImpl; + +/** + * @enum WindowState + * + * Defines the state of %Window. + * + * @since 2.0 + */ +enum WindowState +{ + WINDOW_STATE_INITIALIZED = 0x0000, /**< The initial state of the window */ + WINDOW_STATE_ACTIVATED = 0x0001, /**< The state indicates that the window is the topmost window */ + WINDOW_STATE_DEACTIVATED = 0x0002, /**< The state indicates that the window is not the topmost window */ +}; + +/** + * @enum WindowZOrderGroup + * + * Defines the Z order group of %Window. + * + * @since 2.0 + */ +enum WindowZOrderGroup +{ + WINDOW_Z_ORDER_GROUP_HIGHEST, /**< The highest group for windows such as the call screen */ + WINDOW_Z_ORDER_GROUP_HIGH, /**< The high group for windows such as the lock screen */ + WINDOW_Z_ORDER_GROUP_NORMAL, /**< The default group of apps */ +}; + +/** + * @class Window + * @brief This class provides abstract top-level 'window' objects. + * + * @since 2.0 + * + * 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 their applications' bounds. + * + */ +class _OSP_EXPORT_ Window + : public Container +{ + +public: + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.0 + */ + virtual ~Window(void) = 0; + +public: + /** + * Adds a listener instance. @n + * The added listener can listen to events on when they are fired. + * + * @since 2.0 + * + * @param[in] listener The event listener to add + * @see RemoveWindowEventListener() + */ + void AddWindowEventListener(Tizen::Ui::IWindowEventListener& listener); + + /** + * Removes a listener instance. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * + * @param[in] listener The listener to remove + * @see AddWindowEventListener() + */ + void RemoveWindowEventListener(Tizen::Ui::IWindowEventListener& listener); + + /** + * Shows the %Window. + * + * @since 2.0 + * + * @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 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); + + /** + * Sets the owner of the window. + * The visibility of a window has dependency on the visibility of the owner window. + * + * @since 2.0 + * + * @param[in] pControl The control + * @remarks The ownership of @c pControl is not transferred to this instance. It is the developer's responsibility to deallocate @c pControl even after calling this method. + */ + void SetOwner(Tizen::Ui::Control *pControl); + + /** + * Gets the owner of the window. + * + * @since 2.1 + * + * @return The owner of the window + * @see SetOwner() + */ + Tizen::Ui::Control* GetOwner(void) const; + + /** + * Sets the Z order group of %Window. + * + * @since 2.0 + * + * @privlevel platform + * @privilege %http://tizen.org/privilege/uimanager + * + * @return An error code + * @param[in] windowZOrderGroup The Z order group of %Window + * @exception E_SUCCESS The method is successful. + * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. + * @remarks If this method is not explicitly called, the Z order group of %Window is set to #WINDOW_Z_ORDER_GROUP_NORMAL. + */ + result SetZOrderGroup(WindowZOrderGroup windowZOrderGroup); + + /** + * Gets the current state of the window. + * + * @since 2.0 + * + * @return The current state of the window + */ + WindowState GetWindowState(void) const; + + /** + * Gets the display context of the window. + * + * @since 2.0 + * + * @return A pointer to the DisplayContext instance + */ + Tizen::Ui::Animations::DisplayContext* GetDisplayContext(void) const; + +protected: + /** + * Initializes this instance of %Window with the specified parameters. + * + * @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 + * 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() + */ + result Construct(const Tizen::Graphics::Rectangle& rect, bool resizable = true, bool movable = true); + + /** + * Initializes this instance of %Window with the specified parameters. + * + * @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 + * 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() + */ + result Construct(const Tizen::Graphics::FloatRectangle& rect, bool resizable = true, bool movable = true); + + /** + * Initializes this instance of %Window with the specified layout and rectangular region. + * + * @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' construct methods. + * - If @c resizable is @c false, IsResizable() returns @c false. + * @see IsResizable() + * @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 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. + * @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 Container::GetLayoutN() + */ + result Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::FloatRectangle& rect, bool resizable = true, bool movable = true); + + /** + * Initializes this instance of %Window with the specified layouts and rectangular region. + * + * @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 %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 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); + + /** + * Initializes this instance of %Window with the specified layouts and rectangular region. + * + * @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 %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 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. @n + * For full construction, the Construct() method must be called right after calling this constructor. + * + * @since 2.0 + */ + Window(void); + +private: + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + Window(const Window& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + Window& operator =(const Window& rhs); + +protected: + friend class _WindowImpl; + + // + // 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 Window_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 Window_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 Window_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 Window_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 Window_Reserved5(void) {} +}; // Window + +}} // Tizen::Ui + +#endif //_FUI_WINDOW_H_ diff --git a/inc/egl.h b/inc/egl.h new file mode 100644 index 0000000..74d8c50 --- /dev/null +++ b/inc/egl.h @@ -0,0 +1,630 @@ +/* $Change: 1028567 $ */ +/* -*- mode: c; tab-width: 8; -*- */ +/* vi: set sw=4 ts=8: */ +/* Reference version of egl.h for EGL 1.4. + * $Revision: #1 $ on $Date: 2011/08/12 $ + */ + +/* +** Copyright (c) 2007-2009 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and/or associated documentation files (the +** "Materials"), to deal in the Materials without restriction, including +** without limitation the rights to use, copy, modify, merge, publish, +** distribute, sublicense, and/or sell copies of the Materials, and to +** permit persons to whom the Materials are furnished to do so, subject to +** the following conditions: +** +** The above copyright notice and this permission notice shall be included +** in all copies or substantial portions of the Materials. +** +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +*/ + +/** + * @file egl.h + * @brief This is the header file for the EGL. + * + * This header file contains the declarations of the EGL. + */ + +#ifndef __egl_h_ +#define __egl_h_ + +/* All platform-dependent types and macro boilerplate (such as EGLAPI + * and EGLAPIENTRY) should go in eglplatform.h. + */ +#include "eglplatform.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @addtogroup opengles + * + * @{ + */ + +/* EGL Types */ +/* EGLint is defined in eglplatform.h */ + +/*! \var typedef unsigned int EGLBoolean + \brief A type definition for EGLBoolean. +*/ +typedef unsigned int EGLBoolean; + +/*! \var typedef unsigned int EGLenum + \brief A type definition for EGLenum. +*/ +typedef unsigned int EGLenum; + +/*! \var typedef void *EGLConfig + \brief A type definition for EGLConfig. +*/ +typedef void* EGLConfig; + +/*! \var typedef void *EGLContext + \brief A type definition for EGLContext. +*/ +typedef void* EGLContext; + +/*! \var typedef void *EGLDisplay + \brief A type definition for EGLDisplay. +*/ +typedef void* EGLDisplay; + +/*! \var typedef void *EGLSurface + \brief A type definition for EGLSurface. +*/ +typedef void* EGLSurface; + +/*! \var typedef void *EGLClientBuffer + \brief A type definition for EGLClientBuffer. +*/ +typedef void* EGLClientBuffer; + +/* EGL Versioning */ +#define EGL_VERSION_1_0 1 +#define EGL_VERSION_1_1 1 +#define EGL_VERSION_1_2 1 +#define EGL_VERSION_1_3 1 +#define EGL_VERSION_1_4 1 + +/* EGL Enumerants. Bitmasks and other exceptional cases aside, most + * enums are assigned unique values starting at 0x3000. + */ + +/* EGL aliases */ +#define EGL_FALSE 0 +#define EGL_TRUE 1 + +/* Out-of-band handle values */ +#define EGL_DEFAULT_DISPLAY ((EGLNativeDisplayType) 0) +#define EGL_NO_CONTEXT ((EGLContext) 0) +#define EGL_NO_DISPLAY ((EGLDisplay) 0) +#define EGL_NO_SURFACE ((EGLSurface) 0) + +/* Out-of-band attribute value */ +#define EGL_DONT_CARE ((EGLint) - 1) + +/* Errors / GetError return values */ +#define EGL_SUCCESS 0x3000 +#define EGL_NOT_INITIALIZED 0x3001 +#define EGL_BAD_ACCESS 0x3002 +#define EGL_BAD_ALLOC 0x3003 +#define EGL_BAD_ATTRIBUTE 0x3004 +#define EGL_BAD_CONFIG 0x3005 +#define EGL_BAD_CONTEXT 0x3006 +#define EGL_BAD_CURRENT_SURFACE 0x3007 +#define EGL_BAD_DISPLAY 0x3008 +#define EGL_BAD_MATCH 0x3009 +#define EGL_BAD_NATIVE_PIXMAP 0x300A +#define EGL_BAD_NATIVE_WINDOW 0x300B +#define EGL_BAD_PARAMETER 0x300C +#define EGL_BAD_SURFACE 0x300D +#define EGL_CONTEXT_LOST 0x300E /* EGL 1.1 - IMG_power_management */ + +/* Reserved 0x300F-0x301F for additional errors */ + +/* Config attributes */ +#define EGL_BUFFER_SIZE 0x3020 +#define EGL_ALPHA_SIZE 0x3021 +#define EGL_BLUE_SIZE 0x3022 +#define EGL_GREEN_SIZE 0x3023 +#define EGL_RED_SIZE 0x3024 +#define EGL_DEPTH_SIZE 0x3025 +#define EGL_STENCIL_SIZE 0x3026 +#define EGL_CONFIG_CAVEAT 0x3027 +#define EGL_CONFIG_ID 0x3028 +#define EGL_LEVEL 0x3029 +#define EGL_MAX_PBUFFER_HEIGHT 0x302A +#define EGL_MAX_PBUFFER_PIXELS 0x302B +#define EGL_MAX_PBUFFER_WIDTH 0x302C +#define EGL_NATIVE_RENDERABLE 0x302D +#define EGL_NATIVE_VISUAL_ID 0x302E +#define EGL_NATIVE_VISUAL_TYPE 0x302F +#define EGL_PRESERVED_RESOURCES 0x3030 +#define EGL_SAMPLES 0x3031 +#define EGL_SAMPLE_BUFFERS 0x3032 +#define EGL_SURFACE_TYPE 0x3033 +#define EGL_TRANSPARENT_TYPE 0x3034 +#define EGL_TRANSPARENT_BLUE_VALUE 0x3035 +#define EGL_TRANSPARENT_GREEN_VALUE 0x3036 +#define EGL_TRANSPARENT_RED_VALUE 0x3037 +#define EGL_NONE 0x3038 /* Attrib list terminator */ +#define EGL_BIND_TO_TEXTURE_RGB 0x3039 +#define EGL_BIND_TO_TEXTURE_RGBA 0x303A +#define EGL_MIN_SWAP_INTERVAL 0x303B +#define EGL_MAX_SWAP_INTERVAL 0x303C +#define EGL_LUMINANCE_SIZE 0x303D +#define EGL_ALPHA_MASK_SIZE 0x303E +#define EGL_COLOR_BUFFER_TYPE 0x303F +#define EGL_RENDERABLE_TYPE 0x3040 +#define EGL_MATCH_NATIVE_PIXMAP 0x3041 /* Pseudo-attribute (not queryable) */ +#define EGL_CONFORMANT 0x3042 + +/* Reserved 0x3041-0x304F for additional config attributes */ + +/* Config attribute values */ +#define EGL_SLOW_CONFIG 0x3050 /* EGL_CONFIG_CAVEAT value */ +#define EGL_NON_CONFORMANT_CONFIG 0x3051 /* EGL_CONFIG_CAVEAT value */ +#define EGL_TRANSPARENT_RGB 0x3052 /* EGL_TRANSPARENT_TYPE value */ +#define EGL_RGB_BUFFER 0x308E /* EGL_COLOR_BUFFER_TYPE value */ +#define EGL_LUMINANCE_BUFFER 0x308F /* EGL_COLOR_BUFFER_TYPE value */ + +/* More config attribute values, for EGL_TEXTURE_FORMAT */ +#define EGL_NO_TEXTURE 0x305C +#define EGL_TEXTURE_RGB 0x305D +#define EGL_TEXTURE_RGBA 0x305E +#define EGL_TEXTURE_2D 0x305F + +/* Config attribute mask bits */ +#define EGL_PBUFFER_BIT 0x0001 /* EGL_SURFACE_TYPE mask bits */ +#define EGL_PIXMAP_BIT 0x0002 /* EGL_SURFACE_TYPE mask bits */ +#define EGL_WINDOW_BIT 0x0004 /* EGL_SURFACE_TYPE mask bits */ +#define EGL_VG_COLORSPACE_LINEAR_BIT 0x0020 /* EGL_SURFACE_TYPE mask bits */ +#define EGL_VG_ALPHA_FORMAT_PRE_BIT 0x0040 /* EGL_SURFACE_TYPE mask bits */ +#define EGL_MULTISAMPLE_RESOLVE_BOX_BIT 0x0200 /* EGL_SURFACE_TYPE mask bits */ +#define EGL_SWAP_BEHAVIOR_PRESERVED_BIT 0x0400 /* EGL_SURFACE_TYPE mask bits */ + +#define EGL_OPENGL_ES_BIT 0x0001 /* EGL_RENDERABLE_TYPE mask bits */ +#define EGL_OPENVG_BIT 0x0002 /* EGL_RENDERABLE_TYPE mask bits */ +#define EGL_OPENGL_ES2_BIT 0x0004 /* EGL_RENDERABLE_TYPE mask bits */ +#define EGL_OPENGL_BIT 0x0008 /* EGL_RENDERABLE_TYPE mask bits */ + +/* QueryString targets */ +#define EGL_VENDOR 0x3053 +#define EGL_VERSION 0x3054 +#define EGL_EXTENSIONS 0x3055 +#define EGL_CLIENT_APIS 0x308D + +/* QuerySurface / SurfaceAttrib / CreatePbufferSurface targets */ +#define EGL_HEIGHT 0x3056 +#define EGL_WIDTH 0x3057 +#define EGL_LARGEST_PBUFFER 0x3058 +#define EGL_TEXTURE_FORMAT 0x3080 +#define EGL_TEXTURE_TARGET 0x3081 +#define EGL_MIPMAP_TEXTURE 0x3082 +#define EGL_MIPMAP_LEVEL 0x3083 +#define EGL_RENDER_BUFFER 0x3086 +#define EGL_VG_COLORSPACE 0x3087 +#define EGL_VG_ALPHA_FORMAT 0x3088 +#define EGL_HORIZONTAL_RESOLUTION 0x3090 +#define EGL_VERTICAL_RESOLUTION 0x3091 +#define EGL_PIXEL_ASPECT_RATIO 0x3092 +#define EGL_SWAP_BEHAVIOR 0x3093 +#define EGL_MULTISAMPLE_RESOLVE 0x3099 + +/* EGL_RENDER_BUFFER values / BindTexImage / ReleaseTexImage buffer targets */ +#define EGL_BACK_BUFFER 0x3084 +#define EGL_SINGLE_BUFFER 0x3085 + +/* OpenVG color spaces */ +#define EGL_VG_COLORSPACE_sRGB 0x3089 /* EGL_VG_COLORSPACE value */ +#define EGL_VG_COLORSPACE_LINEAR 0x308A /* EGL_VG_COLORSPACE value */ + +/* OpenVG alpha formats */ +#define EGL_VG_ALPHA_FORMAT_NONPRE 0x308B /* EGL_ALPHA_FORMAT value */ +#define EGL_VG_ALPHA_FORMAT_PRE 0x308C /* EGL_ALPHA_FORMAT value */ + +/* Constant scale factor by which fractional display resolutions & + * aspect ratio are scaled when queried as integer values. + */ +#define EGL_DISPLAY_SCALING 10000 + +/* Unknown display resolution/aspect ratio */ +#define EGL_UNKNOWN ((EGLint) - 1) + +/* Back buffer swap behaviors */ +#define EGL_BUFFER_PRESERVED 0x3094 /* EGL_SWAP_BEHAVIOR value */ +#define EGL_BUFFER_DESTROYED 0x3095 /* EGL_SWAP_BEHAVIOR value */ + +/* CreatePbufferFromClientBuffer buffer types */ +#define EGL_OPENVG_IMAGE 0x3096 + +/* QueryContext targets */ +#define EGL_CONTEXT_CLIENT_TYPE 0x3097 + +/* CreateContext attributes */ +#define EGL_CONTEXT_CLIENT_VERSION 0x3098 + +/* Multisample resolution behaviors */ +#define EGL_MULTISAMPLE_RESOLVE_DEFAULT 0x309A /* EGL_MULTISAMPLE_RESOLVE value */ +#define EGL_MULTISAMPLE_RESOLVE_BOX 0x309B /* EGL_MULTISAMPLE_RESOLVE value */ + +/* BindAPI/QueryAPI targets */ +#define EGL_OPENGL_ES_API 0x30A0 +#define EGL_OPENVG_API 0x30A1 +#define EGL_OPENGL_API 0x30A2 + +/* GetCurrentSurface targets */ +#define EGL_DRAW 0x3059 +#define EGL_READ 0x305A + +/* WaitNative engines */ +#define EGL_CORE_NATIVE_ENGINE 0x305B + +/* EGL 1.2 tokens renamed for consistency in EGL 1.3 */ +#define EGL_COLORSPACE EGL_VG_COLORSPACE +#define EGL_ALPHA_FORMAT EGL_VG_ALPHA_FORMAT +#define EGL_COLORSPACE_sRGB EGL_VG_COLORSPACE_sRGB +#define EGL_COLORSPACE_LINEAR EGL_VG_COLORSPACE_LINEAR +#define EGL_ALPHA_FORMAT_NONPRE EGL_VG_ALPHA_FORMAT_NONPRE +#define EGL_ALPHA_FORMAT_PRE EGL_VG_ALPHA_FORMAT_PRE + +/* EGL extensions must request enum blocks from the Khronos + * API Registrar, who maintains the enumerant registry. Submit + * a bug in Khronos Bugzilla against task "Registry". + */ + +/* +** FIXME: The EGL_SEQUENCE_ITEM_SYMB token is temporary until an +** official name and value are assigned. +*/ +#define EGL_SEQUENCE_ITEM_SYMB 0x6000 + +/* EGL Functions */ + +/** + * You can find more details at the Khronos Group site: http://www.khronos.org/registry/egl + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles, %http://tizen.org/feature/opengles.version.1_1, or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +EGLint eglGetError(void); + +/** + * You can find more details at the Khronos Group site: http://www.khronos.org/registry/egl + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles, %http://tizen.org/feature/opengles.version.1_1, or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +EGLDisplay eglGetDisplay(EGLNativeDisplayType display_id); + +/** + * You can find more details at the Khronos Group site: http://www.khronos.org/registry/egl + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles, %http://tizen.org/feature/opengles.version.1_1, or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +EGLBoolean eglInitialize(EGLDisplay dpy, EGLint* major, EGLint* minor); + +/** + * You can find more details at the Khronos Group site: http://www.khronos.org/registry/egl + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles, %http://tizen.org/feature/opengles.version.1_1, or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +EGLBoolean eglTerminate(EGLDisplay dpy); + +/** + * You can find more details at the Khronos Group site: http://www.khronos.org/registry/egl + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles, %http://tizen.org/feature/opengles.version.1_1, or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +const char* eglQueryString(EGLDisplay dpy, EGLint name); + +/** + * You can find more details at the Khronos Group site: http://www.khronos.org/registry/egl + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles, %http://tizen.org/feature/opengles.version.1_1, or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +EGLBoolean eglGetConfigs(EGLDisplay dpy, EGLConfig* configs, EGLint config_size, EGLint* num_config); + +/** + * You can find more details at the Khronos Group site: http://www.khronos.org/registry/egl + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles, %http://tizen.org/feature/opengles.version.1_1, or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +EGLBoolean eglChooseConfig(EGLDisplay dpy, const EGLint* attrib_list, EGLConfig* configs, EGLint config_size, EGLint* num_config); + +/** + * You can find more details at the Khronos Group site: http://www.khronos.org/registry/egl + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles, %http://tizen.org/feature/opengles.version.1_1, or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +EGLBoolean eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint* value); + +/** + * You can find more details at the Khronos Group site: http://www.khronos.org/registry/egl + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles, %http://tizen.org/feature/opengles.version.1_1, or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +EGLSurface eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint* attrib_list); + +/** + * You can find more details at the Khronos Group site: http://www.khronos.org/registry/egl + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles, %http://tizen.org/feature/opengles.version.1_1, or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +EGLSurface eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config, const EGLint* attrib_list); + +/** + * You can find more details at the Khronos Group site: http://www.khronos.org/registry/egl + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles, %http://tizen.org/feature/opengles.version.1_1, or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +EGLSurface eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint* attrib_list); + +/** + * You can find more details at the Khronos Group site: http://www.khronos.org/registry/egl + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles, %http://tizen.org/feature/opengles.version.1_1, or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +EGLBoolean eglDestroySurface(EGLDisplay dpy, EGLSurface surface); + +/** + * You can find more details at the Khronos Group site: http://www.khronos.org/registry/egl + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles, %http://tizen.org/feature/opengles.version.1_1, or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +EGLBoolean eglQuerySurface(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint* value); + +/** + * You can find more details at the Khronos Group site: http://www.khronos.org/registry/egl + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles, %http://tizen.org/feature/opengles.version.1_1, or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +EGLBoolean eglBindAPI(EGLenum api); + +/** + * You can find more details at the Khronos Group site: http://www.khronos.org/registry/egl + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles, %http://tizen.org/feature/opengles.version.1_1, or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +EGLenum eglQueryAPI(void); + +/** + * You can find more details at the Khronos Group site: http://www.khronos.org/registry/egl + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles, %http://tizen.org/feature/opengles.version.1_1, or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +EGLBoolean eglWaitClient(void); + +/** + * You can find more details at the Khronos Group site: http://www.khronos.org/registry/egl + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles, %http://tizen.org/feature/opengles.version.1_1, or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +EGLBoolean eglReleaseThread(void); + +/** + * You can find more details at the Khronos Group site: http://www.khronos.org/registry/egl + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles, %http://tizen.org/feature/opengles.version.1_1, or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +EGLSurface eglCreatePbufferFromClientBuffer(EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint* attrib_list); + +/** + * You can find more details at the Khronos Group site: http://www.khronos.org/registry/egl + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles, %http://tizen.org/feature/opengles.version.1_1, or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +EGLBoolean eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value); + +/** + * You can find more details at the Khronos Group site: http://www.khronos.org/registry/egl + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles, %http://tizen.org/feature/opengles.version.1_1, or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +EGLBoolean eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer); + +/** + * You can find more details at the Khronos Group site: http://www.khronos.org/registry/egl + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles, %http://tizen.org/feature/opengles.version.1_1, or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +EGLBoolean eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer); + +/** + * You can find more details at the Khronos Group site: http://www.khronos.org/registry/egl + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles, %http://tizen.org/feature/opengles.version.1_1, or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +EGLBoolean eglSwapInterval(EGLDisplay dpy, EGLint interval); + +/** + * You can find more details at the Khronos Group site: http://www.khronos.org/registry/egl + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles, %http://tizen.org/feature/opengles.version.1_1, or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +EGLContext eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint* attrib_list); + +/** + * You can find more details at the Khronos Group site: http://www.khronos.org/registry/egl + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles, %http://tizen.org/feature/opengles.version.1_1, or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +EGLBoolean eglDestroyContext(EGLDisplay dpy, EGLContext ctx); + +/** + * You can find more details at the Khronos Group site: http://www.khronos.org/registry/egl + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles, %http://tizen.org/feature/opengles.version.1_1, or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +EGLBoolean eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx); + +/** + * You can find more details at the Khronos Group site: http://www.khronos.org/registry/egl + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles, %http://tizen.org/feature/opengles.version.1_1, or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +EGLContext eglGetCurrentContext(void); + +/** + * You can find more details at the Khronos Group site: http://www.khronos.org/registry/egl + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles, %http://tizen.org/feature/opengles.version.1_1, or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +EGLSurface eglGetCurrentSurface(EGLint readdraw); + +/** + * You can find more details at the Khronos Group site: http://www.khronos.org/registry/egl + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles, %http://tizen.org/feature/opengles.version.1_1, or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +EGLDisplay eglGetCurrentDisplay(void); + +/** + * You can find more details at the Khronos Group site: http://www.khronos.org/registry/egl + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles, %http://tizen.org/feature/opengles.version.1_1, or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +EGLBoolean eglQueryContext(EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint* value); + +/** + * You can find more details at the Khronos Group site: http://www.khronos.org/registry/egl + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles, %http://tizen.org/feature/opengles.version.1_1, or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +EGLBoolean eglWaitGL(void); + +/** + * You can find more details at the Khronos Group site: http://www.khronos.org/registry/egl + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles, %http://tizen.org/feature/opengles.version.1_1, or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +EGLBoolean eglWaitNative(EGLint engine); + +/** + * You can find more details at the Khronos Group site: http://www.khronos.org/registry/egl + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles, %http://tizen.org/feature/opengles.version.1_1, or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +EGLBoolean eglSwapBuffers(EGLDisplay dpy, EGLSurface surface); + +/** + * You can find more details at the Khronos Group site: http://www.khronos.org/registry/egl + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles, %http://tizen.org/feature/opengles.version.1_1, or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +EGLBoolean eglCopyBuffers(EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target); + +/* This is a generic function pointer type, whose name indicates it must + * be cast to the proper type *and calling convention* before use. + */ +/*! \var typedef void (*__eglMustCastToProperFunctionPointerType)(void) + \brief A type definition for __eglMustCastToProperFunctionPointerType. +*/ +typedef void (*__eglMustCastToProperFunctionPointerType)(void); + +/* Now, define eglGetProcAddress using the generic function ptr. type */ +/** + * Returns function pointer of a GL or an EGL extension function. + * You can find more details at the Khronos Group site: http://www.khronos.org/registry/egl + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles, %http://tizen.org/feature/opengles.version.1_1, or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + * +*/ +EGLAPI __eglMustCastToProperFunctionPointerType eglGetProcAddress(const char* procname); + +/** + * You can find more details at the Khronos Group site: http://www.khronos.org/registry/egl + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles, %http://tizen.org/feature/opengles.version.1_1, or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +EGLBoolean eglUpdateBufferOSP(EGLDisplay dpy, EGLSurface surface); + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* __egl_h_ */ diff --git a/inc/egl_macro.h b/inc/egl_macro.h new file mode 100644 index 0000000..d16b159 --- /dev/null +++ b/inc/egl_macro.h @@ -0,0 +1,57 @@ +// +// 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. +// + +#ifndef _EGL_MACRO_H_ +#define _EGL_MACRO_H_ + +#define eglGetError _SglGetError +#define eglGetDisplay _SglGetDisplay +#define eglInitialize _SglInitialize +#define eglTerminate _SglTerminate +#define eglQueryString _SglQueryString +#define eglGetConfigs _SglGetConfigs +#define eglChooseConfig _SglChooseConfig +#define eglGetConfigAttrib _SglGetConfigAttrib +#define eglCreateWindowSurface _SglCreateWindowSurface +#define eglCreatePbufferSurface _SglCreatePbufferSurface +#define eglCreatePixmapSurface _SglCreatePixmapSurface +#define eglDestroySurface _SglDestroySurface +#define eglQuerySurface _SglQuerySurface +#define eglBindAPI _SglBindAPI +#define eglQueryAPI _SglQueryAPI +#define eglWaitClient _SglWaitClient +#define eglReleaseThread _SglReleaseThread +#define eglCreatePbufferFromClientBuffer _SglCreatePbufferFromClientBuffer +#define eglSurfaceAttrib _SglSurfaceAttrib +#define eglBindTexImage _SglBindTexImage +#define eglReleaseTexImage _SglReleaseTexImage +#define eglSwapInterval _SglSwapInterval +#define eglCreateContext _SglCreateContext +#define eglDestroyContext _SglDestroyContext +#define eglMakeCurrent _SglMakeCurrent +#define eglGetCurrentContext _SglGetCurrentContext +#define eglGetCurrentSurface _SglGetCurrentSurface +#define eglGetCurrentDisplay _SglGetCurrentDisplay +#define eglQueryContext _SglQueryContext +#define eglWaitGL _SglWaitGL +#define eglWaitNative _SglWaitNative +#define eglSwapBuffers _SglSwapBuffers +#define eglCopyBuffers _SglCopyBuffers +#define eglGetProcAddress _SglGetProcAddress +#define eglUpdateBufferOSP _SglUpdateBufferOSP + +#endif // _EGL_MACRO_H_ diff --git a/inc/eglext.h b/inc/eglext.h new file mode 100644 index 0000000..a9dbc86 --- /dev/null +++ b/inc/eglext.h @@ -0,0 +1,325 @@ +#ifndef __eglext_h_ +#define __eglext_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** Copyright (c) 2007-2010 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and/or associated documentation files (the +** "Materials"), to deal in the Materials without restriction, including +** without limitation the rights to use, copy, modify, merge, publish, +** distribute, sublicense, and/or sell copies of the Materials, and to +** permit persons to whom the Materials are furnished to do so, subject to +** the following conditions: +** +** The above copyright notice and this permission notice shall be included +** in all copies or substantial portions of the Materials. +** +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +*/ + +#include + +/*************************************************************/ + +/* Header file version number */ +/* Current version at http://www.khronos.org/registry/egl/ */ +/* $Revision: 13164 $ on $Date: 2010-12-09 01:26:57 -0800 (Thu, 09 Dec 2010) $ */ +#define EGL_EGLEXT_VERSION 9 + +#ifndef EGL_KHR_config_attribs +#define EGL_KHR_config_attribs 1 +#define EGL_CONFORMANT_KHR 0x3042 /* EGLConfig attribute */ +#define EGL_VG_COLORSPACE_LINEAR_BIT_KHR 0x0020 /* EGL_SURFACE_TYPE bitfield */ +#define EGL_VG_ALPHA_FORMAT_PRE_BIT_KHR 0x0040 /* EGL_SURFACE_TYPE bitfield */ +#endif + +#ifndef EGL_KHR_lock_surface +#define EGL_KHR_lock_surface 1 +#define EGL_READ_SURFACE_BIT_KHR 0x0001 /* EGL_LOCK_USAGE_HINT_KHR bitfield */ +#define EGL_WRITE_SURFACE_BIT_KHR 0x0002 /* EGL_LOCK_USAGE_HINT_KHR bitfield */ +#define EGL_LOCK_SURFACE_BIT_KHR 0x0080 /* EGL_SURFACE_TYPE bitfield */ +#define EGL_OPTIMAL_FORMAT_BIT_KHR 0x0100 /* EGL_SURFACE_TYPE bitfield */ +#define EGL_MATCH_FORMAT_KHR 0x3043 /* EGLConfig attribute */ +#define EGL_FORMAT_RGB_565_EXACT_KHR 0x30C0 /* EGL_MATCH_FORMAT_KHR value */ +#define EGL_FORMAT_RGB_565_KHR 0x30C1 /* EGL_MATCH_FORMAT_KHR value */ +#define EGL_FORMAT_RGBA_8888_EXACT_KHR 0x30C2 /* EGL_MATCH_FORMAT_KHR value */ +#define EGL_FORMAT_RGBA_8888_KHR 0x30C3 /* EGL_MATCH_FORMAT_KHR value */ +#define EGL_MAP_PRESERVE_PIXELS_KHR 0x30C4 /* eglLockSurfaceKHR attribute */ +#define EGL_LOCK_USAGE_HINT_KHR 0x30C5 /* eglLockSurfaceKHR attribute */ +#define EGL_BITMAP_POINTER_KHR 0x30C6 /* eglQuerySurface attribute */ +#define EGL_BITMAP_PITCH_KHR 0x30C7 /* eglQuerySurface attribute */ +#define EGL_BITMAP_ORIGIN_KHR 0x30C8 /* eglQuerySurface attribute */ +#define EGL_BITMAP_PIXEL_RED_OFFSET_KHR 0x30C9 /* eglQuerySurface attribute */ +#define EGL_BITMAP_PIXEL_GREEN_OFFSET_KHR 0x30CA /* eglQuerySurface attribute */ +#define EGL_BITMAP_PIXEL_BLUE_OFFSET_KHR 0x30CB /* eglQuerySurface attribute */ +#define EGL_BITMAP_PIXEL_ALPHA_OFFSET_KHR 0x30CC /* eglQuerySurface attribute */ +#define EGL_BITMAP_PIXEL_LUMINANCE_OFFSET_KHR 0x30CD /* eglQuerySurface attribute */ +#define EGL_LOWER_LEFT_KHR 0x30CE /* EGL_BITMAP_ORIGIN_KHR value */ +#define EGL_UPPER_LEFT_KHR 0x30CF /* EGL_BITMAP_ORIGIN_KHR value */ +#ifdef EGL_EGLEXT_PROTOTYPES +EGLAPI EGLBoolean EGLAPIENTRY eglLockSurfaceKHR (EGLDisplay display, EGLSurface surface, const EGLint *attrib_list); +EGLAPI EGLBoolean EGLAPIENTRY eglUnlockSurfaceKHR (EGLDisplay display, EGLSurface surface); +#endif /* EGL_EGLEXT_PROTOTYPES */ +typedef EGLBoolean (EGLAPIENTRYP PFNEGLLOCKSURFACEKHRPROC) (EGLDisplay display, EGLSurface surface, const EGLint *attrib_list); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNLOCKSURFACEKHRPROC) (EGLDisplay display, EGLSurface surface); +#endif + +#ifndef EGL_KHR_image +#define EGL_KHR_image 1 +#define EGL_NATIVE_PIXMAP_KHR 0x30B0 /* eglCreateImageKHR target */ +typedef void *EGLImageKHR; +#define EGL_NO_IMAGE_KHR ((EGLImageKHR)0) +#ifdef EGL_EGLEXT_PROTOTYPES +EGLAPI EGLImageKHR EGLAPIENTRY eglCreateImageKHR (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list); +EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImageKHR (EGLDisplay dpy, EGLImageKHR image); +#endif /* EGL_EGLEXT_PROTOTYPES */ +typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGLImageKHR image); +#endif + +#ifndef EGL_KHR_vg_parent_image +#define EGL_KHR_vg_parent_image 1 +#define EGL_VG_PARENT_IMAGE_KHR 0x30BA /* eglCreateImageKHR target */ +#endif + +#ifndef EGL_KHR_gl_texture_2D_image +#define EGL_KHR_gl_texture_2D_image 1 +#define EGL_GL_TEXTURE_2D_KHR 0x30B1 /* eglCreateImageKHR target */ +#define EGL_GL_TEXTURE_LEVEL_KHR 0x30BC /* eglCreateImageKHR attribute */ +#endif + +#ifndef EGL_KHR_gl_texture_cubemap_image +#define EGL_KHR_gl_texture_cubemap_image 1 +#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR 0x30B3 /* eglCreateImageKHR target */ +#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_KHR 0x30B4 /* eglCreateImageKHR target */ +#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_KHR 0x30B5 /* eglCreateImageKHR target */ +#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_KHR 0x30B6 /* eglCreateImageKHR target */ +#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_KHR 0x30B7 /* eglCreateImageKHR target */ +#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_KHR 0x30B8 /* eglCreateImageKHR target */ +#endif + +#ifndef EGL_KHR_gl_texture_3D_image +#define EGL_KHR_gl_texture_3D_image 1 +#define EGL_GL_TEXTURE_3D_KHR 0x30B2 /* eglCreateImageKHR target */ +#define EGL_GL_TEXTURE_ZOFFSET_KHR 0x30BD /* eglCreateImageKHR attribute */ +#endif + +#ifndef EGL_KHR_gl_renderbuffer_image +#define EGL_KHR_gl_renderbuffer_image 1 +#define EGL_GL_RENDERBUFFER_KHR 0x30B9 /* eglCreateImageKHR target */ +#endif + +#if KHRONOS_SUPPORT_INT64 /* EGLTimeKHR requires 64-bit uint support */ +#ifndef EGL_KHR_reusable_sync +#define EGL_KHR_reusable_sync 1 + +typedef void* EGLSyncKHR; +typedef khronos_utime_nanoseconds_t EGLTimeKHR; + +#define EGL_SYNC_STATUS_KHR 0x30F1 +#define EGL_SIGNALED_KHR 0x30F2 +#define EGL_UNSIGNALED_KHR 0x30F3 +#define EGL_TIMEOUT_EXPIRED_KHR 0x30F5 +#define EGL_CONDITION_SATISFIED_KHR 0x30F6 +#define EGL_SYNC_TYPE_KHR 0x30F7 +#define EGL_SYNC_REUSABLE_KHR 0x30FA +#define EGL_SYNC_FLUSH_COMMANDS_BIT_KHR 0x0001 /* eglClientWaitSyncKHR bitfield */ +#define EGL_FOREVER_KHR 0xFFFFFFFFFFFFFFFFull +#define EGL_NO_SYNC_KHR ((EGLSyncKHR)0) +#ifdef EGL_EGLEXT_PROTOTYPES +EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list); +EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync); +EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout); +EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode); +EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value); +#endif /* EGL_EGLEXT_PROTOTYPES */ +typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESYNCKHRPROC) (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync); +typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value); +#endif +#endif + +#ifndef EGL_KHR_image_base +#define EGL_KHR_image_base 1 +/* Most interfaces defined by EGL_KHR_image_pixmap above */ +#define EGL_IMAGE_PRESERVED_KHR 0x30D2 /* eglCreateImageKHR attribute */ +#endif + +#ifndef EGL_KHR_image_pixmap +#define EGL_KHR_image_pixmap 1 +/* Interfaces defined by EGL_KHR_image above */ +#endif + +#ifndef EGL_IMG_context_priority +#define EGL_IMG_context_priority 1 +#define EGL_CONTEXT_PRIORITY_LEVEL_IMG 0x3100 +#define EGL_CONTEXT_PRIORITY_HIGH_IMG 0x3101 +#define EGL_CONTEXT_PRIORITY_MEDIUM_IMG 0x3102 +#define EGL_CONTEXT_PRIORITY_LOW_IMG 0x3103 +#endif + +#ifndef EGL_KHR_lock_surface2 +#define EGL_KHR_lock_surface2 1 +#define EGL_BITMAP_PIXEL_SIZE_KHR 0x3110 +#endif + +#ifndef EGL_NV_coverage_sample +#define EGL_NV_coverage_sample 1 +#define EGL_COVERAGE_BUFFERS_NV 0x30E0 +#define EGL_COVERAGE_SAMPLES_NV 0x30E1 +#endif + +#ifndef EGL_NV_depth_nonlinear +#define EGL_NV_depth_nonlinear 1 +#define EGL_DEPTH_ENCODING_NV 0x30E2 +#define EGL_DEPTH_ENCODING_NONE_NV 0 +#define EGL_DEPTH_ENCODING_NONLINEAR_NV 0x30E3 +#endif + +#if KHRONOS_SUPPORT_INT64 /* EGLTimeNV requires 64-bit uint support */ +#ifndef EGL_NV_sync +#define EGL_NV_sync 1 +#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_NV 0x30E6 +#define EGL_SYNC_STATUS_NV 0x30E7 +#define EGL_SIGNALED_NV 0x30E8 +#define EGL_UNSIGNALED_NV 0x30E9 +#define EGL_SYNC_FLUSH_COMMANDS_BIT_NV 0x0001 +#define EGL_FOREVER_NV 0xFFFFFFFFFFFFFFFFull +#define EGL_ALREADY_SIGNALED_NV 0x30EA +#define EGL_TIMEOUT_EXPIRED_NV 0x30EB +#define EGL_CONDITION_SATISFIED_NV 0x30EC +#define EGL_SYNC_TYPE_NV 0x30ED +#define EGL_SYNC_CONDITION_NV 0x30EE +#define EGL_SYNC_FENCE_NV 0x30EF +#define EGL_NO_SYNC_NV ((EGLSyncNV)0) +typedef void* EGLSyncNV; +typedef khronos_utime_nanoseconds_t EGLTimeNV; +#ifdef EGL_EGLEXT_PROTOTYPES +EGLSyncNV eglCreateFenceSyncNV (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list); +EGLBoolean eglDestroySyncNV (EGLSyncNV sync); +EGLBoolean eglFenceNV (EGLSyncNV sync); +EGLint eglClientWaitSyncNV (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout); +EGLBoolean eglSignalSyncNV (EGLSyncNV sync, EGLenum mode); +EGLBoolean eglGetSyncAttribNV (EGLSyncNV sync, EGLint attribute, EGLint *value); +#endif /* EGL_EGLEXT_PROTOTYPES */ +typedef EGLSyncNV (EGLAPIENTRYP PFNEGLCREATEFENCESYNCNVPROC) (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCNVPROC) (EGLSyncNV sync); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLFENCENVPROC) (EGLSyncNV sync); +typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCNVPROC) (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCNVPROC) (EGLSyncNV sync, EGLenum mode); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBNVPROC) (EGLSyncNV sync, EGLint attribute, EGLint *value); +#endif +#endif + +#if KHRONOS_SUPPORT_INT64 /* Dependent on EGL_KHR_reusable_sync which requires 64-bit uint support */ +#ifndef EGL_KHR_fence_sync +#define EGL_KHR_fence_sync 1 +/* Reuses most tokens and entry points from EGL_KHR_reusable_sync */ +#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR 0x30F0 +#define EGL_SYNC_CONDITION_KHR 0x30F8 +#define EGL_SYNC_FENCE_KHR 0x30F9 +#endif +#endif + +#ifndef EGL_HI_clientpixmap +#define EGL_HI_clientpixmap 1 + +/* Surface Attribute */ +#define EGL_CLIENT_PIXMAP_POINTER_HI 0x8F74 +/* + * Structure representing a client pixmap + * (pixmap's data is in client-space memory). + */ +struct EGLClientPixmapHI +{ + void* pData; + EGLint iWidth; + EGLint iHeight; + EGLint iStride; +}; + +#ifdef EGL_EGLEXT_PROTOTYPES +EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurfaceHI(EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI* pixmap); +#endif /* EGL_EGLEXT_PROTOTYPES */ +typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPIXMAPSURFACEHIPROC) (EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI* pixmap); +#endif /* EGL_HI_clientpixmap */ + +#ifndef EGL_HI_colorformats +#define EGL_HI_colorformats 1 +/* Config Attribute */ +#define EGL_COLOR_FORMAT_HI 0x8F70 +/* Color Formats */ +#define EGL_COLOR_RGB_HI 0x8F71 +#define EGL_COLOR_RGBA_HI 0x8F72 +#define EGL_COLOR_ARGB_HI 0x8F73 +#endif /* EGL_HI_colorformats */ + +#ifndef EGL_MESA_drm_image +#define EGL_MESA_drm_image 1 +#define EGL_DRM_BUFFER_FORMAT_MESA 0x31D0 /* CreateDRMImageMESA attribute */ +#define EGL_DRM_BUFFER_USE_MESA 0x31D1 /* CreateDRMImageMESA attribute */ +#define EGL_DRM_BUFFER_FORMAT_ARGB32_MESA 0x31D2 /* EGL_IMAGE_FORMAT_MESA attribute value */ +#define EGL_DRM_BUFFER_MESA 0x31D3 /* eglCreateImageKHR target */ +#define EGL_DRM_BUFFER_STRIDE_MESA 0x31D4 +#define EGL_DRM_BUFFER_USE_SCANOUT_MESA 0x00000001 /* EGL_DRM_BUFFER_USE_MESA bits */ +#define EGL_DRM_BUFFER_USE_SHARE_MESA 0x00000002 /* EGL_DRM_BUFFER_USE_MESA bits */ +#ifdef EGL_EGLEXT_PROTOTYPES +EGLAPI EGLImageKHR EGLAPIENTRY eglCreateDRMImageMESA (EGLDisplay dpy, const EGLint *attrib_list); +EGLAPI EGLBoolean EGLAPIENTRY eglExportDRMImageMESA (EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride); +#endif /* EGL_EGLEXT_PROTOTYPES */ +typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEDRMIMAGEMESAPROC) (EGLDisplay dpy, const EGLint *attrib_list); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDRMIMAGEMESAPROC) (EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride); +#endif + +#ifndef EGL_NV_post_sub_buffer +#define EGL_NV_post_sub_buffer 1 +#define EGL_POST_SUB_BUFFER_SUPPORTED_NV 0x30BE +#ifdef EGL_EGLEXT_PROTOTYPES +EGLAPI EGLBoolean EGLAPIENTRY eglPostSubBufferNV (EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height); +#endif /* EGL_EGLEXT_PROTOTYPES */ +typedef EGLBoolean (EGLAPIENTRYP PFNEGLPOSTSUBBUFFERNVPROC) (EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height); +#endif + +#ifndef EGL_SEC_image_map +#define EGL_SEC_image_map 1 +#define EGL_MAP_GL_TEXTURE_2D_SEC 0x3201 /* eglCreateImageKHR target */ +#define EGL_MAP_GL_TEXTURE_HEIGHT_SEC 0x3202 /* eglCreateImageKHR attribute */ +#define EGL_MAP_GL_TEXTURE_WIDTH_SEC 0x3203 /* eglCreateImageKHR attribute */ +#define EGL_MAP_GL_TEXTURE_FORMAT_SEC 0x3204 /* eglCreateImageKHR attribute, Specifies the number of color components in the mapped texture. */ +#define EGL_MAP_GL_TEXTURE_RGB_SEC 0x3205 /* More config attribute value, for EGL_MAP_GL_TEXTURE_FORMAT_SEC */ +#define EGL_MAP_GL_TEXTURE_RGBA_SEC 0x3206 /* More config attribute value, for EGL_MAP_GL_TEXTURE_FORMAT_SEC */ +#define EGL_MAP_GL_TEXTURE_BGRA_SEC 0x3207 /* More config attribute value, for EGL_MAP_GL_TEXTURE_FORMAT_SEC */ +#define EGL_MAP_GL_TEXTURE_LUMINANCE_SEC 0x3208 /* More config attribute value, for EGL_MAP_GL_TEXTURE_FORMAT_SEC */ +#define EGL_MAP_GL_TEXTURE_LUMINANCE_ALPHA_SEC 0x3209 /* More config attribute value, for EGL_MAP_GL_TEXTURE_FORMAT_SEC */ +#define EGL_MAP_GL_TEXTURE_PIXEL_TYPE_SEC 0x320a /* eglCreateImageKHR attribute, Specifies the data type of the pixel data. */ +#define EGL_MAP_GL_TEXTURE_UNSIGNED_BYTE_SEC 0x320b /* More config attribute value, for EGL_MAP_GL_TEXTURE_PIXEL_TYPE_SEC */ +#define EGL_MAP_GL_TEXTURE_STRIDE_IN_BYTES_SEC 0x320c /* GetImageAttribSEC target */ + +#ifdef EGL_EGLEXT_PROTOTYPES +EGLAPI void * EGLAPIENTRY eglMapImageSEC (EGLDisplay dpy, EGLImageKHR image); +EGLAPI EGLBoolean EGLAPIENTRY eglUnmapImageSEC (EGLDisplay dpy, EGLImageKHR image); +EGLAPI EGLBoolean EGLAPIENTRY eglGetImageAttribSEC (EGLDisplay dpy, EGLImageKHR image, EGLint attribute, EGLint *value); +#endif /* EGL_EGLEXT_PROTOTYPES */ +typedef void * (EGLAPIENTRYP PFNEGLMAPIMAGESECPROC) (EGLDisplay dpy, EGLImageKHR image); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNMAPIMAGESECPROC) (EGLDisplay dpy, EGLImageKHR image); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETIMAGEATTRIBSECPROC) (EGLDisplay dpy, EGLImageKHR image, EGLint attribute, EGLint *value); +#endif + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/inc/eglplatform.h b/inc/eglplatform.h new file mode 100644 index 0000000..56bd4df --- /dev/null +++ b/inc/eglplatform.h @@ -0,0 +1,180 @@ +/* $Change: 1028567 $ */ + +/** + * @file eglplatform.h + * @brief This is the header file for the eglplatform. + * + * This header file contains the declarations of the eglplatform. + */ + +#ifndef __eglplatform_h_ +#define __eglplatform_h_ + +/* +** Copyright (c) 2007-2009 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and/or associated documentation files (the +** "Materials"), to deal in the Materials without restriction, including +** without limitation the rights to use, copy, modify, merge, publish, +** distribute, sublicense, and/or sell copies of the Materials, and to +** permit persons to whom the Materials are furnished to do so, subject to +** the following conditions: +** +** The above copyright notice and this permission notice shall be included +** in all copies or substantial portions of the Materials. +** +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + */ + +/* Platform-specific types and definitions for egl.h + * $Revision: #1 $ on $Date: 2011/08/12 $ + * + * Adopters may modify khrplatform.h and this file to suit their platform. + * You are encouraged to submit all modifications to the Khronos group so that + * they can be included in future versions of this file. Please submit changes + * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla) + * by filing a bug against product "EGL" component "Registry". + */ + +#ifdef _FGRAPHICS_OPENGL_H_ +}}} +#endif + +namespace Tizen { namespace Ui +{ +class Control; +}; +}; +namespace Tizen { namespace Graphics +{ +class Bitmap; +}; +}; + +#ifdef _FGRAPHICS_OPENGL_H_ +namespace Tizen { namespace Graphics { namespace Opengl +{ +#endif + + +#include "khrplatform.h" + + +/* Macros used in EGL function prototype declarations. + * + * EGL functions should be prototyped as: + * + * EGLAPI return-type EGLAPIENTRY eglFunction(arguments); + * typedef return-type (EXPAPIENTRYP PFNEGLFUNCTIONPROC) (arguments); + * + * KHRONOS_APICALL and KHRONOS_APIENTRY are defined in KHR/khrplatform.h + */ + +/** + * @addtogroup opengles + * + * @{ + */ + +#ifndef _WIN32 +#define EGLAPI +#define EGLAPIENTRY +#else +#ifndef EGLAPIENTRY +#define EGLAPIENTRY __stdcall +#endif +#ifndef EGLAPI +#define EGLAPI +#endif +#endif + +#define EGLAPIENTRYP KHRONOS_APIENTRY* +/* +** Types and resources +*/ + +/*! \var typedef int EGLint + \brief A type definition for EGLConfig. +*/ +typedef int EGLint; + +#ifdef _WIN32 +typedef void* EGLNativeDisplayType; +class Tizen::Ui::Control; +typedef Tizen::Ui::Control* EGLNativeWindowType; +class Tizen::Graphics::Bitmap; +typedef Tizen::Graphics::Bitmap* EGLNativePixmapType; + +#elif FEATURE_SYSLSI_S5PC110 +typedef int EGLNativeDisplayType; +typedef void* EGLNativeWindowType; +typedef struct +{ + void* pBuffer; + long lWidth; + long lHeight; + enum + { + NUEGL_PIXELFORMAT_565 = 0, + NUEGL_PIXELFORMAT_4444 = 1, + NUEGL_PIXELFORMAT_8888 = 2, + NUEGL_PIXELFORMAT_1555 = 3, + NUEGL_PIXELFORMAT_force_to_32_bits = 0x12345678 + } ePixelFormat; + enum + { + NUEGL_ROTATE_0 = 0, + NUEGL_ROTATE_90 = 1, + NUEGL_ROTATE_180 = 2, + NUEGL_ROTATE_270 = 3, + NUEGL_ROTATE_force_to_32_bits = 0x12345678 + } eRotation; +} sEGLNativePixmapType; +typedef sEGLNativePixmapType* EGLNativePixmapType; +#else + +/*! \var typedef void *EGLNativeDisplayType + \brief A type definition for EGLNativeDisplayType. +*/ +typedef void* EGLNativeDisplayType; + +/*! \var typedef void *EGLNativeWindowType + \brief A type definition for EGLNativeWindowType. +*/ +typedef void* EGLNativeWindowType; + +/*! \var typedef void *EGLNativePixmapType + \brief A type definition for EGLNativePixmapType. +*/ +typedef void* EGLNativePixmapType; +#endif + +/*! \var typedef EGLNativeDisplayType NativeDisplayType + \brief A type definition for NativeDisplayType. +*/ +typedef EGLNativeDisplayType NativeDisplayType; + +/*! \var typedef EGLNativePixmapType NativePixmapType + \brief A type definition for NativePixmapType. +*/ +typedef EGLNativePixmapType NativePixmapType; + +/*! \var typedef EGLNativeWindowType NativeWindowType + \brief A type definition for NativeWindowType. +*/ +typedef EGLNativeWindowType NativeWindowType; + +#include "egl_macro.h" + +/** + * @} + */ + +#endif /* __eglplatform_h_ */ diff --git a/inc/gl.h b/inc/gl.h new file mode 100644 index 0000000..4dce847 --- /dev/null +++ b/inc/gl.h @@ -0,0 +1,1808 @@ +/* $Change: 1028567 $ */ +#ifndef __gl_h_ +#define __gl_h_ + +/* $Revision: #1 $ on $Date: 2011/08/12 $ */ + +/** + * @file gl.h + * @brief This is the header file for the OpenGL® ES 1.1. + * + * This header file contains the declarations of the OpenGL® ES 1.1. + */ + +#include "glplatform.h" +#include "glmacro.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * This document is licensed under the SGI Free Software B License Version + * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . + */ + +/** + * @defgroup opengles_1_1 OpenGL® ES 1.1 + * @brief The list of OpenGL®ES 1.1 functions. + * @{ + */ + +/*------------------------------------------------------------------------- + * Data type definitions + *-----------------------------------------------------------------------*/ + +#if 0 // move to "khrplatform.h" +typedef void GLvoid; +typedef unsigned int GLenum; +typedef unsigned char GLboolean; +typedef unsigned int GLbitfield; +typedef khronos_int8_t GLbyte; +typedef short GLshort; +typedef int GLint; +typedef int GLsizei; +typedef khronos_uint8_t GLubyte; +typedef unsigned short GLushort; +typedef unsigned int GLuint; +typedef khronos_float_t GLfloat; +typedef khronos_float_t GLclampf; +typedef khronos_int32_t GLfixed; +typedef khronos_int32_t GLclampx; + +typedef khronos_intptr_t GLintptr; +typedef khronos_ssize_t GLsizeiptr; +#endif + +/*************************************************************/ + +/* OpenGL ES core versions */ +#define GL_VERSION_ES_CM_1_0 1 +#define GL_VERSION_ES_CL_1_0 1 +#define GL_VERSION_ES_CM_1_1 1 +#define GL_VERSION_ES_CL_1_1 1 + +/* ClearBufferMask */ +#define GL_DEPTH_BUFFER_BIT 0x00000100 +#define GL_STENCIL_BUFFER_BIT 0x00000400 +#define GL_COLOR_BUFFER_BIT 0x00004000 + +/* Boolean */ +#define GL_FALSE 0 +#define GL_TRUE 1 + +/* BeginMode */ +#define GL_POINTS 0x0000 +#define GL_LINES 0x0001 +#define GL_LINE_LOOP 0x0002 +#define GL_LINE_STRIP 0x0003 +#define GL_TRIANGLES 0x0004 +#define GL_TRIANGLE_STRIP 0x0005 +#define GL_TRIANGLE_FAN 0x0006 + +/* AlphaFunction */ +#define GL_NEVER 0x0200 +#define GL_LESS 0x0201 +#define GL_EQUAL 0x0202 +#define GL_LEQUAL 0x0203 +#define GL_GREATER 0x0204 +#define GL_NOTEQUAL 0x0205 +#define GL_GEQUAL 0x0206 +#define GL_ALWAYS 0x0207 + +/* BlendingFactorDest */ +#define GL_ZERO 0 +#define GL_ONE 1 +#define GL_SRC_COLOR 0x0300 +#define GL_ONE_MINUS_SRC_COLOR 0x0301 +#define GL_SRC_ALPHA 0x0302 +#define GL_ONE_MINUS_SRC_ALPHA 0x0303 +#define GL_DST_ALPHA 0x0304 +#define GL_ONE_MINUS_DST_ALPHA 0x0305 + +/* BlendingFactorSrc */ +/* GL_ZERO */ +/* GL_ONE */ +#define GL_DST_COLOR 0x0306 +#define GL_ONE_MINUS_DST_COLOR 0x0307 +#define GL_SRC_ALPHA_SATURATE 0x0308 +/* GL_SRC_ALPHA */ +/* GL_ONE_MINUS_SRC_ALPHA */ +/* GL_DST_ALPHA */ +/* GL_ONE_MINUS_DST_ALPHA */ + +/* ClipPlaneName */ +#define GL_CLIP_PLANE0 0x3000 +#define GL_CLIP_PLANE1 0x3001 +#define GL_CLIP_PLANE2 0x3002 +#define GL_CLIP_PLANE3 0x3003 +#define GL_CLIP_PLANE4 0x3004 +#define GL_CLIP_PLANE5 0x3005 + +/* ColorMaterialFace */ +/* GL_FRONT_AND_BACK */ + +/* ColorMaterialParameter */ +/* GL_AMBIENT_AND_DIFFUSE */ + +/* ColorPointerType */ +/* GL_UNSIGNED_BYTE */ +/* GL_FLOAT */ +/* GL_FIXED */ + +/* CullFaceMode */ +#define GL_FRONT 0x0404 +#define GL_BACK 0x0405 +#define GL_FRONT_AND_BACK 0x0408 + +/* DepthFunction */ +/* GL_NEVER */ +/* GL_LESS */ +/* GL_EQUAL */ +/* GL_LEQUAL */ +/* GL_GREATER */ +/* GL_NOTEQUAL */ +/* GL_GEQUAL */ +/* GL_ALWAYS */ + +/* EnableCap */ +#define GL_FOG 0x0B60 +#define GL_LIGHTING 0x0B50 +#define GL_TEXTURE_2D 0x0DE1 +#define GL_CULL_FACE 0x0B44 +#define GL_ALPHA_TEST 0x0BC0 +#define GL_BLEND 0x0BE2 +#define GL_COLOR_LOGIC_OP 0x0BF2 +#define GL_DITHER 0x0BD0 +#define GL_STENCIL_TEST 0x0B90 +#define GL_DEPTH_TEST 0x0B71 +/* GL_LIGHT0 */ +/* GL_LIGHT1 */ +/* GL_LIGHT2 */ +/* GL_LIGHT3 */ +/* GL_LIGHT4 */ +/* GL_LIGHT5 */ +/* GL_LIGHT6 */ +/* GL_LIGHT7 */ +#define GL_POINT_SMOOTH 0x0B10 +#define GL_LINE_SMOOTH 0x0B20 +#define GL_SCISSOR_TEST 0x0C11 +#define GL_COLOR_MATERIAL 0x0B57 +#define GL_NORMALIZE 0x0BA1 +#define GL_RESCALE_NORMAL 0x803A +#define GL_POLYGON_OFFSET_FILL 0x8037 +#define GL_VERTEX_ARRAY 0x8074 +#define GL_NORMAL_ARRAY 0x8075 +#define GL_COLOR_ARRAY 0x8076 +#define GL_TEXTURE_COORD_ARRAY 0x8078 +#define GL_MULTISAMPLE 0x809D +#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E +#define GL_SAMPLE_ALPHA_TO_ONE 0x809F +#define GL_SAMPLE_COVERAGE 0x80A0 + +/* ErrorCode */ +#define GL_NO_ERROR 0 +#define GL_INVALID_ENUM 0x0500 +#define GL_INVALID_VALUE 0x0501 +#define GL_INVALID_OPERATION 0x0502 +#define GL_STACK_OVERFLOW 0x0503 +#define GL_STACK_UNDERFLOW 0x0504 +#define GL_OUT_OF_MEMORY 0x0505 + +/* FogMode */ +/* GL_LINEAR */ +#define GL_EXP 0x0800 +#define GL_EXP2 0x0801 + +/* FogParameter */ +#define GL_FOG_DENSITY 0x0B62 +#define GL_FOG_START 0x0B63 +#define GL_FOG_END 0x0B64 +#define GL_FOG_MODE 0x0B65 +#define GL_FOG_COLOR 0x0B66 + +/* FrontFaceDirection */ +#define GL_CW 0x0900 +#define GL_CCW 0x0901 + +/* GetPName */ +#define GL_CURRENT_COLOR 0x0B00 +#define GL_CURRENT_NORMAL 0x0B02 +#define GL_CURRENT_TEXTURE_COORDS 0x0B03 +#define GL_POINT_SIZE 0x0B11 +#define GL_POINT_SIZE_MIN 0x8126 +#define GL_POINT_SIZE_MAX 0x8127 +#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128 +#define GL_POINT_DISTANCE_ATTENUATION 0x8129 +#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12 +#define GL_LINE_WIDTH 0x0B21 +#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22 +#define GL_ALIASED_POINT_SIZE_RANGE 0x846D +#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E +#define GL_CULL_FACE_MODE 0x0B45 +#define GL_FRONT_FACE 0x0B46 +#define GL_SHADE_MODEL 0x0B54 +#define GL_DEPTH_RANGE 0x0B70 +#define GL_DEPTH_WRITEMASK 0x0B72 +#define GL_DEPTH_CLEAR_VALUE 0x0B73 +#define GL_DEPTH_FUNC 0x0B74 +#define GL_STENCIL_CLEAR_VALUE 0x0B91 +#define GL_STENCIL_FUNC 0x0B92 +#define GL_STENCIL_VALUE_MASK 0x0B93 +#define GL_STENCIL_FAIL 0x0B94 +#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 +#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 +#define GL_STENCIL_REF 0x0B97 +#define GL_STENCIL_WRITEMASK 0x0B98 +#define GL_MATRIX_MODE 0x0BA0 +#define GL_VIEWPORT 0x0BA2 +#define GL_MODELVIEW_STACK_DEPTH 0x0BA3 +#define GL_PROJECTION_STACK_DEPTH 0x0BA4 +#define GL_TEXTURE_STACK_DEPTH 0x0BA5 +#define GL_MODELVIEW_MATRIX 0x0BA6 +#define GL_PROJECTION_MATRIX 0x0BA7 +#define GL_TEXTURE_MATRIX 0x0BA8 +#define GL_ALPHA_TEST_FUNC 0x0BC1 +#define GL_ALPHA_TEST_REF 0x0BC2 +#define GL_BLEND_DST 0x0BE0 +#define GL_BLEND_SRC 0x0BE1 +#define GL_LOGIC_OP_MODE 0x0BF0 +#define GL_SCISSOR_BOX 0x0C10 +#define GL_SCISSOR_TEST 0x0C11 +#define GL_COLOR_CLEAR_VALUE 0x0C22 +#define GL_COLOR_WRITEMASK 0x0C23 +#define GL_UNPACK_ALIGNMENT 0x0CF5 +#define GL_PACK_ALIGNMENT 0x0D05 +#define GL_MAX_LIGHTS 0x0D31 +#define GL_MAX_CLIP_PLANES 0x0D32 +#define GL_MAX_TEXTURE_SIZE 0x0D33 +#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36 +#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38 +#define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39 +#define GL_MAX_VIEWPORT_DIMS 0x0D3A +#define GL_MAX_TEXTURE_UNITS 0x84E2 +#define GL_SUBPIXEL_BITS 0x0D50 +#define GL_RED_BITS 0x0D52 +#define GL_GREEN_BITS 0x0D53 +#define GL_BLUE_BITS 0x0D54 +#define GL_ALPHA_BITS 0x0D55 +#define GL_DEPTH_BITS 0x0D56 +#define GL_STENCIL_BITS 0x0D57 +#define GL_POLYGON_OFFSET_UNITS 0x2A00 +#define GL_POLYGON_OFFSET_FILL 0x8037 +#define GL_POLYGON_OFFSET_FACTOR 0x8038 +#define GL_TEXTURE_BINDING_2D 0x8069 +#define GL_VERTEX_ARRAY_SIZE 0x807A +#define GL_VERTEX_ARRAY_TYPE 0x807B +#define GL_VERTEX_ARRAY_STRIDE 0x807C +#define GL_NORMAL_ARRAY_TYPE 0x807E +#define GL_NORMAL_ARRAY_STRIDE 0x807F +#define GL_COLOR_ARRAY_SIZE 0x8081 +#define GL_COLOR_ARRAY_TYPE 0x8082 +#define GL_COLOR_ARRAY_STRIDE 0x8083 +#define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088 +#define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089 +#define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A +#define GL_VERTEX_ARRAY_POINTER 0x808E +#define GL_NORMAL_ARRAY_POINTER 0x808F +#define GL_COLOR_ARRAY_POINTER 0x8090 +#define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092 +#define GL_SAMPLE_BUFFERS 0x80A8 +#define GL_SAMPLES 0x80A9 +#define GL_SAMPLE_COVERAGE_VALUE 0x80AA +#define GL_SAMPLE_COVERAGE_INVERT 0x80AB + +/* GetTextureParameter */ +/* GL_TEXTURE_MAG_FILTER */ +/* GL_TEXTURE_MIN_FILTER */ +/* GL_TEXTURE_WRAP_S */ +/* GL_TEXTURE_WRAP_T */ + +#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 +#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 + +/* HintMode */ +#define GL_DONT_CARE 0x1100 +#define GL_FASTEST 0x1101 +#define GL_NICEST 0x1102 + +/* HintTarget */ +#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50 +#define GL_POINT_SMOOTH_HINT 0x0C51 +#define GL_LINE_SMOOTH_HINT 0x0C52 +#define GL_FOG_HINT 0x0C54 +#define GL_GENERATE_MIPMAP_HINT 0x8192 + +/* LightModelParameter */ +#define GL_LIGHT_MODEL_AMBIENT 0x0B53 +#define GL_LIGHT_MODEL_TWO_SIDE 0x0B52 + +/* LightParameter */ +#define GL_AMBIENT 0x1200 +#define GL_DIFFUSE 0x1201 +#define GL_SPECULAR 0x1202 +#define GL_POSITION 0x1203 +#define GL_SPOT_DIRECTION 0x1204 +#define GL_SPOT_EXPONENT 0x1205 +#define GL_SPOT_CUTOFF 0x1206 +#define GL_CONSTANT_ATTENUATION 0x1207 +#define GL_LINEAR_ATTENUATION 0x1208 +#define GL_QUADRATIC_ATTENUATION 0x1209 + +/* DataType */ +#define GL_BYTE 0x1400 +#define GL_UNSIGNED_BYTE 0x1401 +#define GL_SHORT 0x1402 +#define GL_UNSIGNED_SHORT 0x1403 +#define GL_FLOAT 0x1406 +#define GL_FIXED 0x140C + +/* LogicOp */ +#define GL_CLEAR 0x1500 +#define GL_AND 0x1501 +#define GL_AND_REVERSE 0x1502 +#define GL_COPY 0x1503 +#define GL_AND_INVERTED 0x1504 +#define GL_NOOP 0x1505 +#define GL_XOR 0x1506 +#define GL_OR 0x1507 +#define GL_NOR 0x1508 +#define GL_EQUIV 0x1509 +#define GL_INVERT 0x150A +#define GL_OR_REVERSE 0x150B +#define GL_COPY_INVERTED 0x150C +#define GL_OR_INVERTED 0x150D +#define GL_NAND 0x150E +#define GL_SET 0x150F + +/* MaterialFace */ +/* GL_FRONT_AND_BACK */ + +/* MaterialParameter */ +#define GL_EMISSION 0x1600 +#define GL_SHININESS 0x1601 +#define GL_AMBIENT_AND_DIFFUSE 0x1602 +/* GL_AMBIENT */ +/* GL_DIFFUSE */ +/* GL_SPECULAR */ + +/* MatrixMode */ +#define GL_MODELVIEW 0x1700 +#define GL_PROJECTION 0x1701 +#define GL_TEXTURE 0x1702 + +/* NormalPointerType */ +/* GL_BYTE */ +/* GL_SHORT */ +/* GL_FLOAT */ +/* GL_FIXED */ + +/* PixelFormat */ +#define GL_ALPHA 0x1906 +#define GL_RGB 0x1907 +#define GL_RGBA 0x1908 +#define GL_LUMINANCE 0x1909 +#define GL_LUMINANCE_ALPHA 0x190A + +/* PixelStoreParameter */ +#define GL_UNPACK_ALIGNMENT 0x0CF5 +#define GL_PACK_ALIGNMENT 0x0D05 + +/* PixelType */ +/* GL_UNSIGNED_BYTE */ +#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 +#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 +#define GL_UNSIGNED_SHORT_5_6_5 0x8363 + +/* ShadingModel */ +#define GL_FLAT 0x1D00 +#define GL_SMOOTH 0x1D01 + +/* StencilFunction */ +/* GL_NEVER */ +/* GL_LESS */ +/* GL_EQUAL */ +/* GL_LEQUAL */ +/* GL_GREATER */ +/* GL_NOTEQUAL */ +/* GL_GEQUAL */ +/* GL_ALWAYS */ + +/* StencilOp */ +/* GL_ZERO */ +#define GL_KEEP 0x1E00 +#define GL_REPLACE 0x1E01 +#define GL_INCR 0x1E02 +#define GL_DECR 0x1E03 +/* GL_INVERT */ + +/* StringName */ +#define GL_VENDOR 0x1F00 +#define GL_RENDERER 0x1F01 +#define GL_VERSION 0x1F02 +#define GL_EXTENSIONS 0x1F03 + +/* TexCoordPointerType */ +/* GL_SHORT */ +/* GL_FLOAT */ +/* GL_FIXED */ +/* GL_BYTE */ + +/* TextureEnvMode */ +#define GL_MODULATE 0x2100 +#define GL_DECAL 0x2101 +/* GL_BLEND */ +#define GL_ADD 0x0104 +/* GL_REPLACE */ + +/* TextureEnvParameter */ +#define GL_TEXTURE_ENV_MODE 0x2200 +#define GL_TEXTURE_ENV_COLOR 0x2201 + +/* TextureEnvTarget */ +#define GL_TEXTURE_ENV 0x2300 + +/* TextureMagFilter */ +#define GL_NEAREST 0x2600 +#define GL_LINEAR 0x2601 + +/* TextureMinFilter */ +/* GL_NEAREST */ +/* GL_LINEAR */ +#define GL_NEAREST_MIPMAP_NEAREST 0x2700 +#define GL_LINEAR_MIPMAP_NEAREST 0x2701 +#define GL_NEAREST_MIPMAP_LINEAR 0x2702 +#define GL_LINEAR_MIPMAP_LINEAR 0x2703 + +/* TextureParameterName */ +#define GL_TEXTURE_MAG_FILTER 0x2800 +#define GL_TEXTURE_MIN_FILTER 0x2801 +#define GL_TEXTURE_WRAP_S 0x2802 +#define GL_TEXTURE_WRAP_T 0x2803 +#define GL_GENERATE_MIPMAP 0x8191 + +/* TextureTarget */ +/* GL_TEXTURE_2D */ + +/* TextureUnit */ +#define GL_TEXTURE0 0x84C0 +#define GL_TEXTURE1 0x84C1 +#define GL_TEXTURE2 0x84C2 +#define GL_TEXTURE3 0x84C3 +#define GL_TEXTURE4 0x84C4 +#define GL_TEXTURE5 0x84C5 +#define GL_TEXTURE6 0x84C6 +#define GL_TEXTURE7 0x84C7 +#define GL_TEXTURE8 0x84C8 +#define GL_TEXTURE9 0x84C9 +#define GL_TEXTURE10 0x84CA +#define GL_TEXTURE11 0x84CB +#define GL_TEXTURE12 0x84CC +#define GL_TEXTURE13 0x84CD +#define GL_TEXTURE14 0x84CE +#define GL_TEXTURE15 0x84CF +#define GL_TEXTURE16 0x84D0 +#define GL_TEXTURE17 0x84D1 +#define GL_TEXTURE18 0x84D2 +#define GL_TEXTURE19 0x84D3 +#define GL_TEXTURE20 0x84D4 +#define GL_TEXTURE21 0x84D5 +#define GL_TEXTURE22 0x84D6 +#define GL_TEXTURE23 0x84D7 +#define GL_TEXTURE24 0x84D8 +#define GL_TEXTURE25 0x84D9 +#define GL_TEXTURE26 0x84DA +#define GL_TEXTURE27 0x84DB +#define GL_TEXTURE28 0x84DC +#define GL_TEXTURE29 0x84DD +#define GL_TEXTURE30 0x84DE +#define GL_TEXTURE31 0x84DF +#define GL_ACTIVE_TEXTURE 0x84E0 +#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1 + +/* TextureWrapMode */ +#define GL_REPEAT 0x2901 +#define GL_CLAMP_TO_EDGE 0x812F + +/* VertexPointerType */ +/* GL_SHORT */ +/* GL_FLOAT */ +/* GL_FIXED */ +/* GL_BYTE */ + +/* LightName */ +#define GL_LIGHT0 0x4000 +#define GL_LIGHT1 0x4001 +#define GL_LIGHT2 0x4002 +#define GL_LIGHT3 0x4003 +#define GL_LIGHT4 0x4004 +#define GL_LIGHT5 0x4005 +#define GL_LIGHT6 0x4006 +#define GL_LIGHT7 0x4007 + +/* Buffer Objects */ +#define GL_ARRAY_BUFFER 0x8892 +#define GL_ELEMENT_ARRAY_BUFFER 0x8893 + +#define GL_ARRAY_BUFFER_BINDING 0x8894 +#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 +#define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896 +#define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897 +#define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898 +#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A + +#define GL_STATIC_DRAW 0x88E4 +#define GL_DYNAMIC_DRAW 0x88E8 + +#define GL_BUFFER_SIZE 0x8764 +#define GL_BUFFER_USAGE 0x8765 + +/* Texture combine + dot3 */ +#define GL_SUBTRACT 0x84E7 +#define GL_COMBINE 0x8570 +#define GL_COMBINE_RGB 0x8571 +#define GL_COMBINE_ALPHA 0x8572 +#define GL_RGB_SCALE 0x8573 +#define GL_ADD_SIGNED 0x8574 +#define GL_INTERPOLATE 0x8575 +#define GL_CONSTANT 0x8576 +#define GL_PRIMARY_COLOR 0x8577 +#define GL_PREVIOUS 0x8578 +#define GL_OPERAND0_RGB 0x8590 +#define GL_OPERAND1_RGB 0x8591 +#define GL_OPERAND2_RGB 0x8592 +#define GL_OPERAND0_ALPHA 0x8598 +#define GL_OPERAND1_ALPHA 0x8599 +#define GL_OPERAND2_ALPHA 0x859A + +#define GL_ALPHA_SCALE 0x0D1C + +#define GL_SRC0_RGB 0x8580 +#define GL_SRC1_RGB 0x8581 +#define GL_SRC2_RGB 0x8582 +#define GL_SRC0_ALPHA 0x8588 +#define GL_SRC1_ALPHA 0x8589 +#define GL_SRC2_ALPHA 0x858A + +#define GL_DOT3_RGB 0x86AE +#define GL_DOT3_RGBA 0x86AF + +/*------------------------------------------------------------------------* + * required OES extension tokens + *------------------------------------------------------------------------*/ + +/* OES_read_format */ +#ifndef GL_OES_read_format +#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A +#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B +#endif + +/* GL_OES_compressed_paletted_texture */ +#ifndef GL_OES_compressed_paletted_texture +#define GL_PALETTE4_RGB8_OES 0x8B90 +#define GL_PALETTE4_RGBA8_OES 0x8B91 +#define GL_PALETTE4_R5_G6_B5_OES 0x8B92 +#define GL_PALETTE4_RGBA4_OES 0x8B93 +#define GL_PALETTE4_RGB5_A1_OES 0x8B94 +#define GL_PALETTE8_RGB8_OES 0x8B95 +#define GL_PALETTE8_RGBA8_OES 0x8B96 +#define GL_PALETTE8_R5_G6_B5_OES 0x8B97 +#define GL_PALETTE8_RGBA4_OES 0x8B98 +#define GL_PALETTE8_RGB5_A1_OES 0x8B99 +#endif + +/* OES_point_size_array */ +#ifndef GL_OES_point_size_array +#define GL_POINT_SIZE_ARRAY_OES 0x8B9C +#define GL_POINT_SIZE_ARRAY_TYPE_OES 0x898A +#define GL_POINT_SIZE_ARRAY_STRIDE_OES 0x898B +#define GL_POINT_SIZE_ARRAY_POINTER_OES 0x898C +#define GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES 0x8B9F +#endif + +/* GL_OES_point_sprite */ +#ifndef GL_OES_point_sprite +#define GL_POINT_SPRITE_OES 0x8861 +#define GL_COORD_REPLACE_OES 0x8862 +#endif + +/*************************************************************/ + +/* Available only in Common profile */ +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glAlphaFunc(GLenum func, GLclampf ref); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glClearDepthf(GLclampf depth); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glClipPlanef(GLenum plane, const GLfloat* equation); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glDepthRangef(GLclampf zNear, GLclampf zFar); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glFogf(GLenum pname, GLfloat param); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glFogfv(GLenum pname, const GLfloat* params); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glFrustumf(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glGetClipPlanef(GLenum pname, GLfloat eqn[4]); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glGetFloatv(GLenum pname, GLfloat* params); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glGetLightfv(GLenum light, GLenum pname, GLfloat* params); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glGetMaterialfv(GLenum face, GLenum pname, GLfloat* params); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glGetTexEnvfv(GLenum env, GLenum pname, GLfloat* params); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glLightModelf(GLenum pname, GLfloat param); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glLightModelfv(GLenum pname, const GLfloat* params); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glLightf(GLenum light, GLenum pname, GLfloat param); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glLightfv(GLenum light, GLenum pname, const GLfloat* params); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glLineWidth(GLfloat width); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glLoadMatrixf(const GLfloat* m); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glMaterialf(GLenum face, GLenum pname, GLfloat param); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glMaterialfv(GLenum face, GLenum pname, const GLfloat* params); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glMultMatrixf(const GLfloat* m); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glMultiTexCoord4f(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glOrthof(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glPointParameterf(GLenum pname, GLfloat param); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glPointParameterfv(GLenum pname, const GLfloat* params); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glPointSize(GLfloat size); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glPolygonOffset(GLfloat factor, GLfloat units); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glScalef(GLfloat x, GLfloat y, GLfloat z); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glTexEnvf(GLenum target, GLenum pname, GLfloat param); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glTexEnvfv(GLenum target, GLenum pname, const GLfloat* params); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glTexParameterf(GLenum target, GLenum pname, GLfloat param); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glTexParameterfv(GLenum target, GLenum pname, const GLfloat* params); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glTranslatef(GLfloat x, GLfloat y, GLfloat z); + +/* Available in both Common and Common-Lite profiles */ +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glActiveTexture(GLenum texture); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glAlphaFuncx(GLenum func, GLclampx ref); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glBindBuffer(GLenum target, GLuint buffer); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glBindTexture(GLenum target, GLuint texture); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glBlendFunc(GLenum sfactor, GLenum dfactor); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glBufferData(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glClear(GLbitfield mask); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glClearColorx(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glClearDepthx(GLclampx depth); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glClearStencil(GLint s); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glClientActiveTexture(GLenum texture); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glClipPlanex(GLenum plane, const GLfixed* equation); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glColor4x(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid* pointer); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glCullFace(GLenum mode); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glDeleteBuffers(GLsizei n, const GLuint* buffers); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glDeleteTextures(GLsizei n, const GLuint* textures); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glDepthFunc(GLenum func); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glDepthMask(GLboolean flag); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glDepthRangex(GLclampx zNear, GLclampx zFar); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glDisable(GLenum cap); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glDisableClientState(GLenum array); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glDrawArrays(GLenum mode, GLint first, GLsizei count); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glEnable(GLenum cap); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glEnableClientState(GLenum array); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glFinish(void); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glFlush(void); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glFogx(GLenum pname, GLfixed param); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glFogxv(GLenum pname, const GLfixed* params); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glFrontFace(GLenum mode); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glFrustumx(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glGetBooleanv(GLenum pname, GLboolean* params); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + */ +GL_API void GL_APIENTRY glGetClipPlanex(GLenum pname, GLfixed eqn[4]); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glGenBuffers(GLsizei n, GLuint* buffers); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glGenTextures(GLsizei n, GLuint* textures); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API GLenum GL_APIENTRY glGetError(void); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glGetFixedv(GLenum pname, GLfixed* params); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glGetIntegerv(GLenum pname, GLint* params); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glGetLightxv(GLenum light, GLenum pname, GLfixed* params); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glGetMaterialxv(GLenum face, GLenum pname, GLfixed* params); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glGetPointerv(GLenum pname, void** params); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API const GLubyte* GL_APIENTRY glGetString(GLenum name); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glGetTexEnviv(GLenum env, GLenum pname, GLint* params); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glGetTexEnvxv(GLenum env, GLenum pname, GLfixed* params); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glGetTexParameteriv(GLenum target, GLenum pname, GLint* params); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glGetTexParameterxv(GLenum target, GLenum pname, GLfixed* params); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glHint(GLenum target, GLenum mode); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API GLboolean GL_APIENTRY glIsBuffer(GLuint buffer); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API GLboolean GL_APIENTRY glIsEnabled(GLenum cap); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API GLboolean GL_APIENTRY glIsTexture(GLuint texture); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glLightModelx(GLenum pname, GLfixed param); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glLightModelxv(GLenum pname, const GLfixed* params); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glLightx(GLenum light, GLenum pname, GLfixed param); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glLightxv(GLenum light, GLenum pname, const GLfixed* params); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glLineWidthx(GLfixed width); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glLoadIdentity(void); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glLoadMatrixx(const GLfixed* m); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glLogicOp(GLenum opcode); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glMaterialx(GLenum face, GLenum pname, GLfixed param); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glMaterialxv(GLenum face, GLenum pname, const GLfixed* params); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glMatrixMode(GLenum mode); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glMultMatrixx(const GLfixed* m); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glMultiTexCoord4x(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glNormal3x(GLfixed nx, GLfixed ny, GLfixed nz); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glNormalPointer(GLenum type, GLsizei stride, const GLvoid* pointer); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glOrthox(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glPixelStorei(GLenum pname, GLint param); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glPointParameterx(GLenum pname, GLfixed param); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glPointParameterxv(GLenum pname, const GLfixed* params); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glPointSizex(GLfixed size); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glPolygonOffsetx(GLfixed factor, GLfixed units); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glPopMatrix(void); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glPushMatrix(void); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glRotatex(GLfixed angle, GLfixed x, GLfixed y, GLfixed z); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glSampleCoverage(GLclampf value, GLboolean invert); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glSampleCoveragex(GLclampx value, GLboolean invert); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glScalex(GLfixed x, GLfixed y, GLfixed z); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glScissor(GLint x, GLint y, GLsizei width, GLsizei height); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glShadeModel(GLenum mode); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glStencilFunc(GLenum func, GLint ref, GLuint mask); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glStencilMask(GLuint mask); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glStencilOp(GLenum fail, GLenum zfail, GLenum zpass); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glTexCoordPointer(GLint size, GLenum type, GLsizei stride, const GLvoid* pointer); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glTexEnvi(GLenum target, GLenum pname, GLint param); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glTexEnvx(GLenum target, GLenum pname, GLfixed param); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glTexEnviv(GLenum target, GLenum pname, const GLint* params); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glTexEnvxv(GLenum target, GLenum pname, const GLfixed* params); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glTexParameteri(GLenum target, GLenum pname, GLint param); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glTexParameterx(GLenum target, GLenum pname, GLfixed param); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glTexParameteriv(GLenum target, GLenum pname, const GLint* params); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glTexParameterxv(GLenum target, GLenum pname, const GLfixed* params); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glTranslatex(GLfixed x, GLfixed y, GLfixed z); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glVertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid* pointer); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 1.1. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.1_1 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_API void GL_APIENTRY glViewport(GLint x, GLint y, GLsizei width, GLsizei height); + +/*------------------------------------------------------------------------* + * Required OES extension functions + *------------------------------------------------------------------------*/ + +/* GL_OES_read_format */ +#ifndef GL_OES_read_format +#define GL_OES_read_format 1 +#endif + +/* GL_OES_compressed_paletted_texture */ +#ifndef GL_OES_compressed_paletted_texture +#define GL_OES_compressed_paletted_texture 1 +#endif + +/* GL_OES_point_size_array */ +#ifndef GL_OES_point_size_array +#define GL_OES_point_size_array 1 + +/** + * + * Defines an array of point sizes. + * You can find more details at the Khronos Group site: http://www.khronos.org/opengles/sdk/1.1/docs/man. + * + * @since 2.0 + * +*/ +GL_API void GL_APIENTRY glPointSizePointerOES(GLenum type, GLsizei stride, const GLvoid* pointer); +#endif + +/* GL_OES_point_sprite */ +#ifndef GL_OES_point_sprite +#define GL_OES_point_sprite 1 +#endif + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* __gl_h_ */ diff --git a/inc/gl2.h b/inc/gl2.h new file mode 100644 index 0000000..d25e9fe --- /dev/null +++ b/inc/gl2.h @@ -0,0 +1,1638 @@ +/* $Change: 1028567 $ */ +#ifndef __gl2_h_ +#define __gl2_h_ + +/* $Revision: #1 $ on $Date: 2011/08/12 $ */ + +/** + * @file gl2.h + * @brief This is the header file for the OpenGL® ES 2.0. + * + * This header file contains the declarations of the OpenGL® ES 2.0. + */ + +#include "gl2platform.h" +#include "gl2macro.h" + + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * This document is licensed under the SGI Free Software B License Version + * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . + */ + +/** + * @defgroup opengles_2_0 OpenGL® ES 2.0 + * @brief The list of OpenGL®ES 2.0 functions. + * @{ + */ + +/*------------------------------------------------------------------------- + * Data type definitions + *-----------------------------------------------------------------------*/ + +#if 0 // move to "khrplatform.h" +typedef void GLvoid; +typedef unsigned int GLenum; +typedef unsigned char GLboolean; +typedef unsigned int GLbitfield; +typedef khronos_int8_t GLbyte; +typedef short GLshort; +typedef int GLint; +typedef int GLsizei; +typedef khronos_uint8_t GLubyte; +typedef unsigned short GLushort; +typedef unsigned int GLuint; +typedef khronos_float_t GLfloat; +typedef khronos_float_t GLclampf; +typedef khronos_int32_t GLfixed; + +/* GL types for handling large vertex buffer objects */ +typedef khronos_intptr_t GLintptr; +typedef khronos_ssize_t GLsizeiptr; +#endif + +/* OpenGL ES core versions */ +#define GL_ES_VERSION_2_0 1 + +/* ClearBufferMask */ +#define GL_DEPTH_BUFFER_BIT 0x00000100 +#define GL_STENCIL_BUFFER_BIT 0x00000400 +#define GL_COLOR_BUFFER_BIT 0x00004000 + +/* Boolean */ +#define GL_FALSE 0 +#define GL_TRUE 1 + +/* BeginMode */ +#define GL_POINTS 0x0000 +#define GL_LINES 0x0001 +#define GL_LINE_LOOP 0x0002 +#define GL_LINE_STRIP 0x0003 +#define GL_TRIANGLES 0x0004 +#define GL_TRIANGLE_STRIP 0x0005 +#define GL_TRIANGLE_FAN 0x0006 + +/* AlphaFunction (not supported in ES20) */ +/* GL_NEVER */ +/* GL_LESS */ +/* GL_EQUAL */ +/* GL_LEQUAL */ +/* GL_GREATER */ +/* GL_NOTEQUAL */ +/* GL_GEQUAL */ +/* GL_ALWAYS */ + +/* BlendingFactorDest */ +#define GL_ZERO 0 +#define GL_ONE 1 +#define GL_SRC_COLOR 0x0300 +#define GL_ONE_MINUS_SRC_COLOR 0x0301 +#define GL_SRC_ALPHA 0x0302 +#define GL_ONE_MINUS_SRC_ALPHA 0x0303 +#define GL_DST_ALPHA 0x0304 +#define GL_ONE_MINUS_DST_ALPHA 0x0305 + +/* BlendingFactorSrc */ +/* GL_ZERO */ +/* GL_ONE */ +#define GL_DST_COLOR 0x0306 +#define GL_ONE_MINUS_DST_COLOR 0x0307 +#define GL_SRC_ALPHA_SATURATE 0x0308 +/* GL_SRC_ALPHA */ +/* GL_ONE_MINUS_SRC_ALPHA */ +/* GL_DST_ALPHA */ +/* GL_ONE_MINUS_DST_ALPHA */ + +/* BlendEquationSeparate */ +#define GL_FUNC_ADD 0x8006 +#define GL_BLEND_EQUATION 0x8009 +#define GL_BLEND_EQUATION_RGB 0x8009 /* same as BLEND_EQUATION */ +#define GL_BLEND_EQUATION_ALPHA 0x883D + +/* BlendSubtract */ +#define GL_FUNC_SUBTRACT 0x800A +#define GL_FUNC_REVERSE_SUBTRACT 0x800B + +/* Separate Blend Functions */ +#define GL_BLEND_DST_RGB 0x80C8 +#define GL_BLEND_SRC_RGB 0x80C9 +#define GL_BLEND_DST_ALPHA 0x80CA +#define GL_BLEND_SRC_ALPHA 0x80CB +#define GL_CONSTANT_COLOR 0x8001 +#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 +#define GL_CONSTANT_ALPHA 0x8003 +#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 +#define GL_BLEND_COLOR 0x8005 + +/* Buffer Objects */ +#define GL_ARRAY_BUFFER 0x8892 +#define GL_ELEMENT_ARRAY_BUFFER 0x8893 +#define GL_ARRAY_BUFFER_BINDING 0x8894 +#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 + +#define GL_STREAM_DRAW 0x88E0 +#define GL_STATIC_DRAW 0x88E4 +#define GL_DYNAMIC_DRAW 0x88E8 + +#define GL_BUFFER_SIZE 0x8764 +#define GL_BUFFER_USAGE 0x8765 + +#define GL_CURRENT_VERTEX_ATTRIB 0x8626 + +/* CullFaceMode */ +#define GL_FRONT 0x0404 +#define GL_BACK 0x0405 +#define GL_FRONT_AND_BACK 0x0408 + +/* DepthFunction */ +/* GL_NEVER */ +/* GL_LESS */ +/* GL_EQUAL */ +/* GL_LEQUAL */ +/* GL_GREATER */ +/* GL_NOTEQUAL */ +/* GL_GEQUAL */ +/* GL_ALWAYS */ + +/* EnableCap */ +#define GL_TEXTURE_2D 0x0DE1 +#define GL_CULL_FACE 0x0B44 +#define GL_BLEND 0x0BE2 +#define GL_DITHER 0x0BD0 +#define GL_STENCIL_TEST 0x0B90 +#define GL_DEPTH_TEST 0x0B71 +#define GL_SCISSOR_TEST 0x0C11 +#define GL_POLYGON_OFFSET_FILL 0x8037 +#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E +#define GL_SAMPLE_COVERAGE 0x80A0 + +/* ErrorCode */ +#define GL_NO_ERROR 0 +#define GL_INVALID_ENUM 0x0500 +#define GL_INVALID_VALUE 0x0501 +#define GL_INVALID_OPERATION 0x0502 +#define GL_OUT_OF_MEMORY 0x0505 + +/* FrontFaceDirection */ +#define GL_CW 0x0900 +#define GL_CCW 0x0901 + +/* GetPName */ +#define GL_LINE_WIDTH 0x0B21 +#define GL_ALIASED_POINT_SIZE_RANGE 0x846D +#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E +#define GL_CULL_FACE_MODE 0x0B45 +#define GL_FRONT_FACE 0x0B46 +#define GL_DEPTH_RANGE 0x0B70 +#define GL_DEPTH_WRITEMASK 0x0B72 +#define GL_DEPTH_CLEAR_VALUE 0x0B73 +#define GL_DEPTH_FUNC 0x0B74 +#define GL_STENCIL_CLEAR_VALUE 0x0B91 +#define GL_STENCIL_FUNC 0x0B92 +#define GL_STENCIL_FAIL 0x0B94 +#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 +#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 +#define GL_STENCIL_REF 0x0B97 +#define GL_STENCIL_VALUE_MASK 0x0B93 +#define GL_STENCIL_WRITEMASK 0x0B98 +#define GL_STENCIL_BACK_FUNC 0x8800 +#define GL_STENCIL_BACK_FAIL 0x8801 +#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 +#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 +#define GL_STENCIL_BACK_REF 0x8CA3 +#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 +#define GL_STENCIL_BACK_WRITEMASK 0x8CA5 +#define GL_VIEWPORT 0x0BA2 +#define GL_SCISSOR_BOX 0x0C10 +#define GL_SCISSOR_TEST 0x0C11 +#define GL_COLOR_CLEAR_VALUE 0x0C22 +#define GL_COLOR_WRITEMASK 0x0C23 +#define GL_UNPACK_ALIGNMENT 0x0CF5 +#define GL_PACK_ALIGNMENT 0x0D05 +#define GL_MAX_TEXTURE_SIZE 0x0D33 +#define GL_MAX_VIEWPORT_DIMS 0x0D3A +#define GL_SUBPIXEL_BITS 0x0D50 +#define GL_RED_BITS 0x0D52 +#define GL_GREEN_BITS 0x0D53 +#define GL_BLUE_BITS 0x0D54 +#define GL_ALPHA_BITS 0x0D55 +#define GL_DEPTH_BITS 0x0D56 +#define GL_STENCIL_BITS 0x0D57 +#define GL_POLYGON_OFFSET_UNITS 0x2A00 +#define GL_POLYGON_OFFSET_FILL 0x8037 +#define GL_POLYGON_OFFSET_FACTOR 0x8038 +#define GL_TEXTURE_BINDING_2D 0x8069 +#define GL_SAMPLE_BUFFERS 0x80A8 +#define GL_SAMPLES 0x80A9 +#define GL_SAMPLE_COVERAGE_VALUE 0x80AA +#define GL_SAMPLE_COVERAGE_INVERT 0x80AB + +/* GetTextureParameter */ +/* GL_TEXTURE_MAG_FILTER */ +/* GL_TEXTURE_MIN_FILTER */ +/* GL_TEXTURE_WRAP_S */ +/* GL_TEXTURE_WRAP_T */ + +#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 +#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 + +/* HintMode */ +#define GL_DONT_CARE 0x1100 +#define GL_FASTEST 0x1101 +#define GL_NICEST 0x1102 + +/* HintTarget */ +#define GL_GENERATE_MIPMAP_HINT 0x8192 + +/* DataType */ +#define GL_BYTE 0x1400 +#define GL_UNSIGNED_BYTE 0x1401 +#define GL_SHORT 0x1402 +#define GL_UNSIGNED_SHORT 0x1403 +#define GL_INT 0x1404 +#define GL_UNSIGNED_INT 0x1405 +#define GL_FLOAT 0x1406 +#define GL_FIXED 0x140C + +/* PixelFormat */ +#define GL_DEPTH_COMPONENT 0x1902 +#define GL_ALPHA 0x1906 +#define GL_RGB 0x1907 +#define GL_RGBA 0x1908 +#define GL_LUMINANCE 0x1909 +#define GL_LUMINANCE_ALPHA 0x190A + +/* PixelType */ +/* GL_UNSIGNED_BYTE */ +#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 +#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 +#define GL_UNSIGNED_SHORT_5_6_5 0x8363 + +/* Shaders */ +#define GL_FRAGMENT_SHADER 0x8B30 +#define GL_VERTEX_SHADER 0x8B31 +#define GL_MAX_VERTEX_ATTRIBS 0x8869 +#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB +#define GL_MAX_VARYING_VECTORS 0x8DFC +#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D +#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C +#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 +#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD +#define GL_SHADER_TYPE 0x8B4F +#define GL_DELETE_STATUS 0x8B80 +#define GL_LINK_STATUS 0x8B82 +#define GL_VALIDATE_STATUS 0x8B83 +#define GL_ATTACHED_SHADERS 0x8B85 +#define GL_ACTIVE_UNIFORMS 0x8B86 +#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 +#define GL_ACTIVE_ATTRIBUTES 0x8B89 +#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A +#define GL_SHADING_LANGUAGE_VERSION 0x8B8C +#define GL_CURRENT_PROGRAM 0x8B8D + +/* StencilFunction */ +#define GL_NEVER 0x0200 +#define GL_LESS 0x0201 +#define GL_EQUAL 0x0202 +#define GL_LEQUAL 0x0203 +#define GL_GREATER 0x0204 +#define GL_NOTEQUAL 0x0205 +#define GL_GEQUAL 0x0206 +#define GL_ALWAYS 0x0207 + +/* StencilOp */ +/* GL_ZERO */ +#define GL_KEEP 0x1E00 +#define GL_REPLACE 0x1E01 +#define GL_INCR 0x1E02 +#define GL_DECR 0x1E03 +#define GL_INVERT 0x150A +#define GL_INCR_WRAP 0x8507 +#define GL_DECR_WRAP 0x8508 + +/* StringName */ +#define GL_VENDOR 0x1F00 +#define GL_RENDERER 0x1F01 +#define GL_VERSION 0x1F02 +#define GL_EXTENSIONS 0x1F03 + +/* TextureMagFilter */ +#define GL_NEAREST 0x2600 +#define GL_LINEAR 0x2601 + +/* TextureMinFilter */ +/* GL_NEAREST */ +/* GL_LINEAR */ +#define GL_NEAREST_MIPMAP_NEAREST 0x2700 +#define GL_LINEAR_MIPMAP_NEAREST 0x2701 +#define GL_NEAREST_MIPMAP_LINEAR 0x2702 +#define GL_LINEAR_MIPMAP_LINEAR 0x2703 + +/* TextureParameterName */ +#define GL_TEXTURE_MAG_FILTER 0x2800 +#define GL_TEXTURE_MIN_FILTER 0x2801 +#define GL_TEXTURE_WRAP_S 0x2802 +#define GL_TEXTURE_WRAP_T 0x2803 + +/* TextureTarget */ +/* GL_TEXTURE_2D */ +#define GL_TEXTURE 0x1702 + +#define GL_TEXTURE_CUBE_MAP 0x8513 +#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A +#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C + +/* TextureUnit */ +#define GL_TEXTURE0 0x84C0 +#define GL_TEXTURE1 0x84C1 +#define GL_TEXTURE2 0x84C2 +#define GL_TEXTURE3 0x84C3 +#define GL_TEXTURE4 0x84C4 +#define GL_TEXTURE5 0x84C5 +#define GL_TEXTURE6 0x84C6 +#define GL_TEXTURE7 0x84C7 +#define GL_TEXTURE8 0x84C8 +#define GL_TEXTURE9 0x84C9 +#define GL_TEXTURE10 0x84CA +#define GL_TEXTURE11 0x84CB +#define GL_TEXTURE12 0x84CC +#define GL_TEXTURE13 0x84CD +#define GL_TEXTURE14 0x84CE +#define GL_TEXTURE15 0x84CF +#define GL_TEXTURE16 0x84D0 +#define GL_TEXTURE17 0x84D1 +#define GL_TEXTURE18 0x84D2 +#define GL_TEXTURE19 0x84D3 +#define GL_TEXTURE20 0x84D4 +#define GL_TEXTURE21 0x84D5 +#define GL_TEXTURE22 0x84D6 +#define GL_TEXTURE23 0x84D7 +#define GL_TEXTURE24 0x84D8 +#define GL_TEXTURE25 0x84D9 +#define GL_TEXTURE26 0x84DA +#define GL_TEXTURE27 0x84DB +#define GL_TEXTURE28 0x84DC +#define GL_TEXTURE29 0x84DD +#define GL_TEXTURE30 0x84DE +#define GL_TEXTURE31 0x84DF +#define GL_ACTIVE_TEXTURE 0x84E0 + +/* TextureWrapMode */ +#define GL_REPEAT 0x2901 +#define GL_CLAMP_TO_EDGE 0x812F +#define GL_MIRRORED_REPEAT 0x8370 + +/* Uniform Types */ +#define GL_FLOAT_VEC2 0x8B50 +#define GL_FLOAT_VEC3 0x8B51 +#define GL_FLOAT_VEC4 0x8B52 +#define GL_INT_VEC2 0x8B53 +#define GL_INT_VEC3 0x8B54 +#define GL_INT_VEC4 0x8B55 +#define GL_BOOL 0x8B56 +#define GL_BOOL_VEC2 0x8B57 +#define GL_BOOL_VEC3 0x8B58 +#define GL_BOOL_VEC4 0x8B59 +#define GL_FLOAT_MAT2 0x8B5A +#define GL_FLOAT_MAT3 0x8B5B +#define GL_FLOAT_MAT4 0x8B5C +#define GL_SAMPLER_2D 0x8B5E +#define GL_SAMPLER_CUBE 0x8B60 + +/* Vertex Arrays */ +#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 +#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 +#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 +#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 +#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A +#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 +#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F + +/* Read Format */ +#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A +#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B + +/* Shader Source */ +#define GL_COMPILE_STATUS 0x8B81 +#define GL_INFO_LOG_LENGTH 0x8B84 +#define GL_SHADER_SOURCE_LENGTH 0x8B88 +#define GL_SHADER_COMPILER 0x8DFA + +/* Shader Binary */ +#define GL_PLATFORM_BINARY 0x8D63 +#define GL_SHADER_BINARY_FORMATS 0x8DF8 +#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9 + +/* Shader Precision-Specified Types */ +#define GL_LOW_FLOAT 0x8DF0 +#define GL_MEDIUM_FLOAT 0x8DF1 +#define GL_HIGH_FLOAT 0x8DF2 +#define GL_LOW_INT 0x8DF3 +#define GL_MEDIUM_INT 0x8DF4 +#define GL_HIGH_INT 0x8DF5 + +/* Framebuffer Object. */ +#define GL_FRAMEBUFFER 0x8D40 +#define GL_RENDERBUFFER 0x8D41 + +#define GL_RGBA4 0x8056 +#define GL_RGB5_A1 0x8057 +#define GL_RGB565 0x8D62 +#define GL_DEPTH_COMPONENT16 0x81A5 +#define GL_STENCIL_INDEX 0x1901 +#define GL_STENCIL_INDEX8 0x8D48 + +#define GL_RENDERBUFFER_WIDTH 0x8D42 +#define GL_RENDERBUFFER_HEIGHT 0x8D43 +#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44 +#define GL_RENDERBUFFER_RED_SIZE 0x8D50 +#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51 +#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52 +#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53 +#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54 +#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55 + +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3 + +#define GL_COLOR_ATTACHMENT0 0x8CE0 +#define GL_DEPTH_ATTACHMENT 0x8D00 +#define GL_STENCIL_ATTACHMENT 0x8D20 + +#define GL_NONE 0 + +#define GL_FRAMEBUFFER_COMPLETE 0x8CD5 +#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 +#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 +#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9 +#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS 0x8CDA +#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD + +#define GL_FRAMEBUFFER_BINDING 0x8CA6 +#define GL_RENDERBUFFER_BINDING 0x8CA7 +#define GL_MAX_RENDERBUFFER_SIZE 0x84E8 + +#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 + +/*------------------------------------------------------------------------- + * GL core functions. + *-----------------------------------------------------------------------*/ + +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glActiveTexture(GLenum texture); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glAttachShader(GLuint program, GLuint shader); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glBindAttribLocation(GLuint program, GLuint index, const char* name); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glBindBuffer(GLenum target, GLuint buffer); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glBindFramebuffer(GLenum target, GLuint framebuffer); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glBindRenderbuffer(GLenum target, GLuint renderbuffer); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glBindTexture(GLenum target, GLuint texture); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glBlendEquation(GLenum mode); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glBlendFunc(GLenum sfactor, GLenum dfactor); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glBufferData(GLenum target, GLsizeiptr size, const void* data, GLenum usage); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const void* data); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus(GLenum target); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glClear(GLbitfield mask); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glClearDepthf(GLclampf depth); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glClearStencil(GLint s); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glCompileShader(GLuint shader); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL GLuint GL_APIENTRY glCreateProgram(void); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL GLuint GL_APIENTRY glCreateShader(GLenum type); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glCullFace(GLenum mode); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glDeleteBuffers(GLsizei n, const GLuint* buffers); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glDeleteProgram(GLuint program); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glDeleteShader(GLuint shader); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glDeleteTextures(GLsizei n, const GLuint* textures); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glDepthFunc(GLenum func); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glDepthMask(GLboolean flag); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glDepthRangef(GLclampf zNear, GLclampf zFar); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glDetachShader(GLuint program, GLuint shader); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glDisable(GLenum cap); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glDisableVertexAttribArray(GLuint index); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glDrawArrays(GLenum mode, GLint first, GLsizei count); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glDrawElements(GLenum mode, GLsizei count, GLenum type, const void* indices); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glEnable(GLenum cap); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glEnableVertexAttribArray(GLuint index); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glFinish(void); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glFlush(void); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glFrontFace(GLenum mode); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glGenBuffers(GLsizei n, GLuint* buffers); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glGenerateMipmap(GLenum target); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glGenFramebuffers(GLsizei n, GLuint* framebuffers); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glGenRenderbuffers(GLsizei n, GLuint* renderbuffers); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glGenTextures(GLsizei n, GLuint* textures); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL int GL_APIENTRY glGetAttribLocation(GLuint program, const char* name); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glGetBooleanv(GLenum pname, GLboolean* params); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL GLenum GL_APIENTRY glGetError(void); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glGetFloatv(GLenum pname, GLfloat* params); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glGetIntegerv(GLenum pname, GLint* params); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glGetProgramiv(GLuint program, GLenum pname, GLint* params); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, char* infolog); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glGetShaderiv(GLuint shader, GLenum pname, GLint* params); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, char* source); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL const GLubyte* GL_APIENTRY glGetString(GLenum name); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glGetTexParameteriv(GLenum target, GLenum pname, GLint* params); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glGetUniformfv(GLuint program, GLint location, GLfloat* params); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glGetUniformiv(GLuint program, GLint location, GLint* params); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL int GL_APIENTRY glGetUniformLocation(GLuint program, const char* name); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv(GLuint index, GLenum pname, void** pointer); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glHint(GLenum target, GLenum mode); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL GLboolean GL_APIENTRY glIsBuffer(GLuint buffer); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL GLboolean GL_APIENTRY glIsEnabled(GLenum cap); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer(GLuint framebuffer); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL GLboolean GL_APIENTRY glIsProgram(GLuint program); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer(GLuint renderbuffer); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL GLboolean GL_APIENTRY glIsShader(GLuint shader); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL GLboolean GL_APIENTRY glIsTexture(GLuint texture); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glLineWidth(GLfloat width); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glLinkProgram(GLuint program); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glPixelStorei(GLenum pname, GLint param); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glPolygonOffset(GLfloat factor, GLfloat units); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void* pixels); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glReleaseShaderCompiler(void); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glSampleCoverage(GLclampf value, GLboolean invert); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glScissor(GLint x, GLint y, GLsizei width, GLsizei height); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glShaderSource(GLuint shader, GLsizei count, const char** string, const GLint* length); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glStencilFunc(GLenum func, GLint ref, GLuint mask); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glStencilMask(GLuint mask); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glStencilMaskSeparate(GLenum face, GLuint mask); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glStencilOp(GLenum fail, GLenum zfail, GLenum zpass); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void* pixels); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glTexParameterf(GLenum target, GLenum pname, GLfloat param); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glTexParameterfv(GLenum target, GLenum pname, const GLfloat* params); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glTexParameteri(GLenum target, GLenum pname, GLint param); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glTexParameteriv(GLenum target, GLenum pname, const GLint* params); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glUniform1f(GLint location, GLfloat x); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glUniform1fv(GLint location, GLsizei count, const GLfloat* v); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glUniform1i(GLint location, GLint x); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glUniform1iv(GLint location, GLsizei count, const GLint* v); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glUniform2f(GLint location, GLfloat x, GLfloat y); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glUniform2fv(GLint location, GLsizei count, const GLfloat* v); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glUniform2i(GLint location, GLint x, GLint y); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glUniform2iv(GLint location, GLsizei count, const GLint* v); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glUniform3fv(GLint location, GLsizei count, const GLfloat* v); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glUniform3i(GLint location, GLint x, GLint y, GLint z); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glUniform3iv(GLint location, GLsizei count, const GLint* v); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glUniform4fv(GLint location, GLsizei count, const GLfloat* v); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glUniform4iv(GLint location, GLsizei count, const GLint* v); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glUseProgram(GLuint program); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glValidateProgram(GLuint program); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glVertexAttrib1f(GLuint indx, GLfloat x); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glVertexAttrib1fv(GLuint indx, const GLfloat* values); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glVertexAttrib2fv(GLuint indx, const GLfloat* values); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glVertexAttrib3fv(GLuint indx, const GLfloat* values); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glVertexAttrib4fv(GLuint indx, const GLfloat* values); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr); +/** + * You can find more details at the Khronos Group site: Khronos Group site - OpenGL® ES 2.0. + * + * @since 2.0 + * @feature %http://tizen.org/feature/opengles or %http://tizen.org/feature/opengles.version.2_0 + * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&). + */ +GL_APICALL void GL_APIENTRY glViewport(GLint x, GLint y, GLsizei width, GLsizei height); + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* __gl2_h_ */ diff --git a/inc/gl2ext.h b/inc/gl2ext.h new file mode 100644 index 0000000..bddf955 --- /dev/null +++ b/inc/gl2ext.h @@ -0,0 +1,656 @@ +#ifndef __gl2ext_h_ +#define __gl2ext_h_ + +#include "gl2platform.h" + +#if defined(FEATURE_SAMSUNG_LSI) && !defined(_WIN32) +#include "GLES2/GL2_OGL2.h" +#endif + + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * This document is licensed under the SGI Free Software B License Version + * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . + */ + +#ifndef GL_APIENTRYP +#define GL_APIENTRYP GL_APIENTRY * +#endif + +#define GL_GLEXT_PROTOTYPES + +/*------------------------------------------------------------------------* + * OES extension tokens + *------------------------------------------------------------------------*/ + +/* GL_OES_compressed_ETC1_RGB8_texture */ +#ifndef GL_OES_compressed_ETC1_RGB8_texture +#define GL_ETC1_RGB8_OES 0x8D64 +#endif + +/* GL_OES_compressed_paletted_texture */ +#ifndef GL_OES_compressed_paletted_texture +#define GL_PALETTE4_RGB8_OES 0x8B90 +#define GL_PALETTE4_RGBA8_OES 0x8B91 +#define GL_PALETTE4_R5_G6_B5_OES 0x8B92 +#define GL_PALETTE4_RGBA4_OES 0x8B93 +#define GL_PALETTE4_RGB5_A1_OES 0x8B94 +#define GL_PALETTE8_RGB8_OES 0x8B95 +#define GL_PALETTE8_RGBA8_OES 0x8B96 +#define GL_PALETTE8_R5_G6_B5_OES 0x8B97 +#define GL_PALETTE8_RGBA4_OES 0x8B98 +#define GL_PALETTE8_RGB5_A1_OES 0x8B99 +#endif + +/* GL_OES_depth24 */ +#ifndef GL_OES_depth24 +#define GL_DEPTH_COMPONENT24_OES 0x81A6 +#endif + +/* GL_OES_depth32 */ +#ifndef GL_OES_depth32 +#define GL_DEPTH_COMPONENT32_OES 0x81A7 +#endif + +/* GL_OES_depth_texture */ +/* No new tokens introduced by this extension. */ + +/* GL_OES_EGL_image */ +#ifndef GL_OES_EGL_image +typedef void* GLeglImageOES; +#endif + +/* GL_OES_get_program_binary */ +#ifndef GL_OES_get_program_binary +#define GL_PROGRAM_BINARY_LENGTH_OES 0x8741 +#define GL_NUM_PROGRAM_BINARY_FORMATS_OES 0x87FE +#define GL_PROGRAM_BINARY_FORMATS_OES 0x87FF +#endif + +/* GL_OES_mapbuffer */ +#ifndef GL_OES_mapbuffer +#define GL_WRITE_ONLY_OES 0x88B9 +#define GL_BUFFER_ACCESS_OES 0x88BB +#define GL_BUFFER_MAPPED_OES 0x88BC +#define GL_BUFFER_MAP_POINTER_OES 0x88BD +#endif + +/* GL_OES_packed_depth_stencil */ +#ifndef GL_OES_packed_depth_stencil +#define GL_DEPTH_STENCIL_OES 0x84F9 +#define GL_UNSIGNED_INT_24_8_OES 0x84FA +#define GL_DEPTH24_STENCIL8_OES 0x88F0 +#endif + +/* GL_OES_rgb8_rgba8 */ +#ifndef GL_OES_rgb8_rgba8 +#define GL_RGB8_OES 0x8051 +#define GL_RGBA8_OES 0x8058 +#endif + +/* GL_OES_standard_derivatives */ +#ifndef GL_OES_standard_derivatives +#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES 0x8B8B +#endif + +/* GL_OES_stencil1 */ +#ifndef GL_OES_stencil1 +#define GL_STENCIL_INDEX1_OES 0x8D46 +#endif + +/* GL_OES_stencil4 */ +#ifndef GL_OES_stencil4 +#define GL_STENCIL_INDEX4_OES 0x8D47 +#endif + +/* GL_OES_texture3D */ +#ifndef GL_OES_texture3D +#define GL_TEXTURE_WRAP_R_OES 0x8072 +#define GL_TEXTURE_3D_OES 0x806F +#define GL_TEXTURE_BINDING_3D_OES 0x806A +#define GL_MAX_3D_TEXTURE_SIZE_OES 0x8073 +#define GL_SAMPLER_3D_OES 0x8B5F +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES 0x8CD4 +#endif + +/* GL_OES_texture_half_float */ +#ifndef GL_OES_texture_half_float +#define GL_HALF_FLOAT_OES 0x8D61 +#endif + +/* GL_OES_vertex_half_float */ +/* GL_HALF_FLOAT_OES defined in GL_OES_texture_half_float already. */ + +/* GL_OES_vertex_type_10_10_10_2 */ +#ifndef GL_OES_vertex_type_10_10_10_2 +#define GL_UNSIGNED_INT_10_10_10_2_OES 0x8DF6 +#define GL_INT_10_10_10_2_OES 0x8DF7 +#endif + +/*------------------------------------------------------------------------* + * AMD extension tokens + *------------------------------------------------------------------------*/ + +/* GL_AMD_compressed_3DC_texture */ +#ifndef GL_AMD_compressed_3DC_texture +#define GL_3DC_X_AMD 0x87F9 +#define GL_3DC_XY_AMD 0x87FA +#endif + +/* GL_AMD_compressed_ATC_texture */ +#ifndef GL_AMD_compressed_ATC_texture +#define GL_ATC_RGB_AMD 0x8C92 +#define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93 +#define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE +#endif + +/* GL_AMD_program_binary_Z400 */ +#ifndef GL_AMD_program_binary_Z400 +#define GL_Z400_BINARY_AMD 0x8740 +#endif + +/* GL_AMD_performance_monitor */ +#ifndef GL_AMD_performance_monitor +#define GL_COUNTER_TYPE_AMD 0x8BC0 +#define GL_COUNTER_RANGE_AMD 0x8BC1 +#define GL_UNSIGNED_INT64_AMD 0x8BC2 +#define GL_PERCENTAGE_AMD 0x8BC3 +#define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4 +#define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5 +#define GL_PERFMON_RESULT_AMD 0x8BC6 +#endif + +/*------------------------------------------------------------------------* + * EXT extension tokens + *------------------------------------------------------------------------*/ + +/* GL_EXT_texture_filter_anisotropic */ +#ifndef GL_EXT_texture_filter_anisotropic +#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE +#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF +#endif + +/* GL_EXT_texture_type_2_10_10_10_REV */ +#ifndef GL_EXT_texture_type_2_10_10_10_REV +#define GL_UNSIGNED_INT_2_10_10_10_REV_EXT 0x8368 +#endif + +/* GL_EXT_texture_format_BGRA8888 */ +#ifndef GL_EXT_texture_format_BGRA8888 +#define GL_BGRA 0x80E1 +#endif + +/*------------------------------------------------------------------------* + * IMG extension tokens + *------------------------------------------------------------------------*/ + +/* GL_IMG_read_format */ +#ifndef GL_IMG_read_format +#define GL_BGRA 0x80E1 +#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365 +#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366 +#endif + +/* GL_IMG_texture_compression_pvrtc */ +#ifndef GL_IMG_texture_compression_pvrtc +#define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00 +#define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01 +#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02 +#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03 +#endif + +/*------------------------------------------------------------------------* + * NV extension tokens + *------------------------------------------------------------------------*/ + +/* GL_NV_fence */ +#ifndef GL_NV_fence +#define GL_ALL_COMPLETED_NV 0x84F2 +#define GL_FENCE_STATUS_NV 0x84F3 +#define GL_FENCE_CONDITION_NV 0x84F4 +#endif + +/*------------------------------------------------------------------------* + * QCOM extension tokens + *------------------------------------------------------------------------*/ + +/* GL_QCOM_driver_control */ +/* No new tokens introduced by this extension. */ + +/* GL_QCOM_perfmon_global_mode */ +#ifndef GL_QCOM_perfmon_global_mode +#define GL_PERFMON_GLOBAL_MODE_QCOM 0x8FA0 +#endif + +/*------------------------------------------------------------------------* + * End of extension tokens, start of corresponding extension functions + *------------------------------------------------------------------------*/ + +/*------------------------------------------------------------------------* + * OES extension functions + *------------------------------------------------------------------------*/ + +/* GL_OES_compressed_ETC1_RGB8_texture */ +#ifndef GL_OES_compressed_ETC1_RGB8_texture +#define GL_OES_compressed_ETC1_RGB8_texture 1 +#endif + +/* GL_OES_compressed_paletted_texture */ +#ifndef GL_OES_compressed_paletted_texture +#define GL_OES_compressed_paletted_texture 1 +#endif + +/* GL_OES_EGL_image */ +#ifndef GL_OES_EGL_image +#define GL_OES_EGL_image 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image); +GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image); +#endif +typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC)(GLenum target, GLeglImageOES image); +typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC)(GLenum target, GLeglImageOES image); +#endif + +/* GL_OES_depth24 */ +#ifndef GL_OES_depth24 +#define GL_OES_depth24 1 +#endif + +/* GL_OES_depth32 */ +#ifndef GL_OES_depth32 +#define GL_OES_depth32 1 +#endif + +/* GL_OES_depth_texture */ +#ifndef GL_OES_depth_texture +#define GL_OES_depth_texture 1 +#endif + +/* GL_OES_element_index_uint */ +#ifndef GL_OES_element_index_uint +#define GL_OES_element_index_uint 1 +#endif + +/* GL_OES_fbo_render_mipmap */ +#ifndef GL_OES_fbo_render_mipmap +#define GL_OES_fbo_render_mipmap 1 +#endif + +/* GL_OES_fragment_precision_high */ +#ifndef GL_OES_fragment_precision_high +#define GL_OES_fragment_precision_high 1 +#endif + +/* GL_OES_get_program_binary */ +#ifndef GL_OES_get_program_binary +#define GL_OES_get_program_binary 1 +#if 0 // not supported +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glGetProgramBinaryOES(GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, void* binary); +GL_APICALL void GL_APIENTRY glProgramBinaryOES(GLuint program, GLenum binaryFormat, const void* binary, GLint length); +#endif +#endif // not supported +typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYOESPROC)(GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, + void* binary); +typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYOESPROC)(GLuint program, GLenum binaryFormat, const void* binary, GLint length); +#endif + +/* GL_OES_mapbuffer */ +#ifndef GL_OES_mapbuffer +#define GL_OES_mapbuffer 1 +#if 0 // not supported +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void* GL_APIENTRY glMapBufferOES(GLenum target, GLenum access); +GL_APICALL GLboolean GL_APIENTRY glUnmapBufferOES(GLenum target); +GL_APICALL void GL_APIENTRY glGetBufferPointervOES(GLenum target, GLenum pname, void** params); +#endif +#endif // not supported +typedef void* (GL_APIENTRYP PFNGLMAPBUFFEROESPROC)(GLenum target, GLenum access); +typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC)(GLenum target); +typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC)(GLenum target, GLenum pname, void** params); +#endif + +/* GL_OES_packed_depth_stencil */ +#ifndef GL_OES_packed_depth_stencil +#define GL_OES_packed_depth_stencil 1 +#endif + +/* GL_OES_rgb8_rgba8 */ +#ifndef GL_OES_rgb8_rgba8 +#define GL_OES_rgb8_rgba8 1 +#endif + +/* GL_OES_standard_derivatives */ +#ifndef GL_OES_standard_derivatives +#define GL_OES_standard_derivatives 1 +#endif + +/* GL_OES_stencil1 */ +#ifndef GL_OES_stencil1 +#define GL_OES_stencil1 1 +#endif + +/* GL_OES_stencil4 */ +#ifndef GL_OES_stencil4 +#define GL_OES_stencil4 1 +#endif + +/* GL_OES_texture_3D */ +#ifndef GL_OES_texture_3D +#define GL_OES_texture_3D 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void* pixels); +GL_APICALL void GL_APIENTRY glTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void* pixels); +GL_APICALL void GL_APIENTRY glCopyTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glCompressedTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void* data); +GL_APICALL void GL_APIENTRY glCompressedTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void* data); +GL_APICALL void GL_APIENTRY glFramebufferTexture3DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +#endif +typedef void (GL_APIENTRYP PFNGLTEXIMAGE3DOESPROC)(GLenum target, GLint level, GLenum internalformat, GLsizei width, + GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, + const GLvoid* pixels); +typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE3DOESPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, + GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, + const void* pixels); +typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DOESPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, + GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DOESPROC)(GLenum target, GLint level, GLenum internalformat, GLsizei width, + GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, + const void* data); +typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DOESPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, + GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, + GLenum format, GLsizei imageSize, const void* data); +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DOES)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, + GLint level, GLint zoffset); +#endif + +/* GL_OES_texture_float_linear */ +#ifndef GL_OES_texture_float_linear +#define GL_OES_texture_float_linear 1 +#endif + +/* GL_OES_texture_half_float_linear */ +#ifndef GL_OES_texture_half_float_linear +#define GL_OES_texture_half_float_linear 1 +#endif + +/* GL_OES_texture_float */ +#ifndef GL_OES_texture_float +#define GL_OES_texture_float 1 +#endif + +/* GL_OES_texture_half_float */ +#ifndef GL_OES_texture_half_float +#define GL_OES_texture_half_float 1 +#endif + +/* GL_OES_texture_npot */ +#ifndef GL_OES_texture_npot +#define GL_OES_texture_npot 1 +#endif + +/* GL_OES_vertex_half_float */ +#ifndef GL_OES_vertex_half_float +#define GL_OES_vertex_half_float 1 +#endif + +/* GL_OES_vertex_type_10_10_10_2 */ +#ifndef GL_OES_vertex_type_10_10_10_2 +#define GL_OES_vertex_type_10_10_10_2 1 +#endif + +/*------------------------------------------------------------------------* + * AMD extension functions + *------------------------------------------------------------------------*/ + +/* GL_AMD_compressed_3DC_texture */ +#ifndef GL_AMD_compressed_3DC_texture +#define GL_AMD_compressed_3DC_texture 1 +#endif + +/* GL_AMD_compressed_ATC_texture */ +#ifndef GL_AMD_compressed_ATC_texture +#define GL_AMD_compressed_ATC_texture 1 +#endif + +/* GL_AMD_program_binary_Z400 */ +#ifndef GL_AMD_program_binary_Z400 +#define GL_AMD_program_binary_Z400 1 +#endif + +/* AMD_performance_monitor */ +#ifndef GL_AMD_performance_monitor +#define GL_AMD_performance_monitor 1 +#if 0 // not supported +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupsAMD(GLint* numGroups, GLsizei groupsSize, GLuint* groups); +GL_APICALL void GL_APIENTRY glGetPerfMonitorCountersAMD(GLuint group, GLint* numCounters, GLint* maxActiveCounters, GLsizei counterSize, GLuint* counters); +GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupStringAMD(GLuint group, GLsizei bufSize, GLsizei* length, char* groupString); +GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterStringAMD(GLuint group, GLuint counter, GLsizei bufSize, GLsizei* length, char* counterString); +GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterInfoAMD(GLuint group, GLuint counter, GLenum pname, void* data); +GL_APICALL void GL_APIENTRY glGenPerfMonitorsAMD(GLsizei n, GLuint* monitors); +GL_APICALL void GL_APIENTRY glDeletePerfMonitorsAMD(GLsizei n, GLuint* monitors); +GL_APICALL void GL_APIENTRY glSelectPerfMonitorCountersAMD(GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint* countersList); +GL_APICALL void GL_APIENTRY glBeginPerfMonitorAMD(GLuint monitor); +GL_APICALL void GL_APIENTRY glEndPerfMonitorAMD(GLuint monitor); +GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterDataAMD(GLuint monitor, GLenum pname, GLsizei dataSize, GLuint* data, GLint* bytesWritten); +#endif +#endif // not supported +typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC)(GLint* numGroups, GLsizei groupsSize, GLuint* groups); +typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC)(GLuint group, GLint* numCounters, GLint* maxActiveCounters, + GLsizei counterSize, GLuint* counters); +typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC)(GLuint group, GLsizei bufSize, GLsizei* length, + char* groupString); +typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC)(GLuint group, GLuint counter, GLsizei bufSize, + GLsizei* length, char* counterString); +typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC)(GLuint group, GLuint counter, GLenum pname, void* data); +typedef void (GL_APIENTRYP PFNGLGENPERFMONITORSAMDPROC)(GLsizei n, GLuint* monitors); +typedef void (GL_APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC)(GLsizei n, GLuint* monitors); +typedef void (GL_APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC)(GLuint monitor, GLboolean enable, GLuint group, + GLint numCounters, GLuint* countersList); +typedef void (GL_APIENTRYP PFNGLBEGINPERFMONITORAMDPROC)(GLuint monitor); +typedef void (GL_APIENTRYP PFNGLENDPERFMONITORAMDPROC)(GLuint monitor); +typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC)(GLuint monitor, GLenum pname, GLsizei dataSize, GLuint* data, + GLint* bytesWritten); +#endif + +/*------------------------------------------------------------------------* + * EXT extension functions + *------------------------------------------------------------------------*/ + +/* GL_EXT_texture_filter_anisotropic */ +#ifndef GL_EXT_texture_filter_anisotropic +#define GL_EXT_texture_filter_anisotropic 1 +#endif + +/* GL_EXT_texture_type_2_10_10_10_REV */ +#ifndef GL_EXT_texture_type_2_10_10_10_REV +#define GL_EXT_texture_type_2_10_10_10_REV 1 +#endif + +/* GL_EXT_texture_format_BGRA8888 */ +#ifndef GL_EXT_texture_format_BGRA8888 +#define GL_EXT_texture_format_BGRA8888 1 +#endif + +/*------------------------------------------------------------------------* + * IMG extension functions + *------------------------------------------------------------------------*/ + +/* GL_IMG_read_format */ +#ifndef GL_IMG_read_format +#define GL_IMG_read_format 1 +#endif + +/* GL_IMG_texture_compression_pvrtc */ +#ifndef GL_IMG_texture_compression_pvrtc +#define GL_IMG_texture_compression_pvrtc 1 +#endif + +/*------------------------------------------------------------------------* + * NV extension functions + *------------------------------------------------------------------------*/ + +/* GL_NV_fence */ +#ifndef GL_NV_fence +#define GL_NV_fence 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glDeleteFencesNV(GLsizei, const GLuint*); +GL_APICALL void GL_APIENTRY glGenFencesNV(GLsizei, GLuint*); +GL_APICALL GLboolean GL_APIENTRY glIsFenceNV(GLuint); +GL_APICALL GLboolean GL_APIENTRY glTestFenceNV(GLuint); +GL_APICALL void GL_APIENTRY glGetFenceivNV(GLuint, GLenum, GLint*); +GL_APICALL void GL_APIENTRY glFinishFenceNV(GLuint); +GL_APICALL void GL_APIENTRY glSetFenceNV(GLuint, GLenum); +#endif +typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC)(GLsizei n, const GLuint* fences); +typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC)(GLsizei n, GLuint* fences); +typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC)(GLuint fence); +typedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC)(GLuint fence); +typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC)(GLuint fence, GLenum pname, GLint* params); +typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC)(GLuint fence); +typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC)(GLuint fence, GLenum condition); +#endif + +/*------------------------------------------------------------------------* + * QCOM extension functions + *------------------------------------------------------------------------*/ + +/* GL_QCOM_driver_control */ +#ifndef GL_QCOM_driver_control +#define GL_QCOM_driver_control 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glGetDriverControlsQCOM(GLint* num, GLsizei size, GLuint* driverControls); +GL_APICALL void GL_APIENTRY glGetDriverControlStringQCOM(GLuint driverControl, GLsizei bufSize, GLsizei* length, char* driverControlString); +GL_APICALL void GL_APIENTRY glEnableDriverControlQCOM(GLuint driverControl); +GL_APICALL void GL_APIENTRY glDisableDriverControlQCOM(GLuint driverControl); +#endif +typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC)(GLint* num, GLsizei size, GLuint* driverControls); +typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC)(GLuint driverControl, GLsizei bufSize, GLsizei* length, + char* driverControlString); +typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC)(GLuint driverControl); +typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC)(GLuint driverControl); +#endif + +/* GL_QCOM_perfmon_global_mode */ +#ifndef GL_QCOM_perfmon_global_mode +#define GL_QCOM_perfmon_global_mode 1 +#endif + +/*------------------------------------------------------------------------* + * Samsung extension functions + *------------------------------------------------------------------------*/ + +#define GL_BGRA 0x80E1 + +/* Binary Shader(C110) */ +#define GL_S5PC110_BINARY_SHADER 0x8C0A + +/* ErrorCode */ +#define GL_STACK_OVERFLOW 0x0503 +#define GL_STACK_UNDERFLOW 0x0504 + +/* Get PName */ +#define GL_MAX_ELEMENTS_VERTICES 0x80E8 +#define GL_MAX_ELEMENTS_INDICES 0x80E9 +#define GL_MAX_TEXTURE_UNITS 0x84E2 + +//sanvd added this extension for supporting s3tc +//OES_texture_compression_S3TC +#define GL_RGB_S3TC_OES 0x83F0 +#define GL_RGBA_S3TC_OES 0x83F1 + +/* PointSize */ +#define GL_POINT_SIZE 0x0B11 +#define GL_POINT_SIZE_MIN 0x8126 +#define GL_POINT_SIZE_MAX 0x8127 + +GL_APICALL void GL_APIENTRY glPointSize(GLfloat size); + + +/* EN_EXT */ +#define EN_EXT_ALPHA_TEST_EXP +#define EN_EXT_VARYING_INTERPOLATION_EXP +#define EN_EXT_LOGIC_OP_EXP +#define EN_EXT_POINT_SPRITE_EXP + +#ifdef EN_EXT_ALPHA_TEST_EXP +#define GL_ALPHA_TEST_EXP 0x0BC0 +#define GL_ALPHA_TEST_FUNC_EXP 0x0BC1 +#define GL_ALPHA_TEST_REF_EXP 0x0BC2 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glAlphaFuncEXP(GLenum func, GLclampf ref); +#else +typedef void (GL_APIENTRYP PFNGLALPHAFUNCPROC)(GLenum func, GLclampf ref); +#endif +#endif //EN_EXT_ALPHA_TEST_EXP + +#ifdef EN_EXT_VARYING_INTERPOLATION_EXP +#define GL_FLAT_EXP 0x1D00 +#define GL_SMOOTH_EXP 0x1D01 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glVaryingInterpolationEXP(const char* name, GLenum mode); +GL_APICALL void GL_APIENTRY glGetVaryingInterpolationEXP(const char* name, GLint* params); +#else +typedef void (GL_APIENTRYP PFNGLVARYINGINTERPOLATIONPROC)(const char* name, GLenum mode); +typedef void (GL_APIENTRYP PFNGLGETVARYINGINTERPOLATIONPROC)(const char* name, GLint* params); +#endif +#endif //EN_EXT_VARYING_INTERPOLATION_EXP + +#ifdef EN_EXT_LOGIC_OP_EXP +#define GL_LOGIC_OP_MODE_EXP 0x0BF0 +#define GL_COLOR_LOGIC_OP_EXP 0x0BF2 +#define GL_CLEAR_EXP 0x1500 +#define GL_AND_EXP 0x1501 +#define GL_AND_REVERSE_EXP 0x1502 +#define GL_COPY_EXP 0x1503 +#define GL_AND_INVERTED_EXP 0x1504 +#define GL_NOOP_EXP 0x1505 +#define GL_XOR_EXP 0x1506 +#define GL_OR_EXP 0x1507 +#define GL_NOR_EXP 0x1508 +#define GL_EQUIV_EXP 0x1509 +#define GL_INVERT_EXP 0x150A +#define GL_OR_REVERSE_EXP 0x150B +#define GL_COPY_INVERTED_EXP 0x150C +#define GL_OR_INVERTED_EXP 0x150D +#define GL_NAND_EXP 0x150E +#define GL_SET_EXP 0x150F +#endif //EN_EXT_LOGIC_OP_EXP + +#ifdef EN_EXT_ALPHA_TEST_EXP +#define GL_ALPHA_TEST_EXP 0x0BC0 +#define GL_ALPHA_TEST_FUNC_EXP 0x0BC1 +#define GL_ALPHA_TEST_REF_EXP 0x0BC2 +#endif //EN_EXT_ALPHA_TEST_EXP + +#ifdef EN_EXT_POINT_SPRITE_EXP +#define GL_POINT_SPRITE_OES_EXP 0x8861 +#endif + +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glLogicOpEXP(GLenum op); +#else +typedef void (GL_APIENTRYP PFNGLLOGICOPPROC)(GLenum op); +#endif + +/* zepplin 2008.05.08 added */ +GL_APICALL void GL_APIENTRY glDrawArraysWrap(GLenum mode, GLint first, GLsizei count, GLint MatPos, const GLfloat* Matdt, /*GLsizei MatSize, GLboolean MatBool,*/ + GLint BoolPos, GLint Boolptr, GLuint shaderNum, void* shaderStr); +GL_APICALL void GL_APIENTRY glDrawElementsWrap(GLenum mode, GLsizei count, GLenum type, const void* indices, GLint MatPos, const GLfloat* Matdt, /*GLsizei MatSize, GLboolean MatBool,*/ + GLint BoolPos, GLint Boolptr, GLuint shaderNum, void* shaderStr); + + +#ifdef CHIP_VERIFY_ACTIVATE +GL_APICALL GLuint GL_APIENTRY glChipVerification(GLuint key); +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* __gl2ext_h_ */ diff --git a/inc/gl2macro.h b/inc/gl2macro.h new file mode 100644 index 0000000..1088fe0 --- /dev/null +++ b/inc/gl2macro.h @@ -0,0 +1,164 @@ +// +// 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. +// + +#ifndef _GL2_MACRO_H_ +#define _GL2_MACRO_H_ + +#define glActiveTexture _GlActiveTexture_2 +#define glAttachShader _GlAttachShader_2 +#define glBindAttribLocation _GlBindAttribLocation_2 +#define glBindBuffer _GlBindBuffer_2 +#define glBindFramebuffer _GlBindFramebuffer_2 +#define glBindRenderbuffer _GlBindRenderbuffer_2 +#define glBindTexture _GlBindTexture_2 +#define glBlendColor _GlBlendColor_2 +#define glBlendEquation _GlBlendEquation_2 +#define glBlendEquationSeparate _GlBlendEquationSeparate_2 +#define glBlendFunc _GlBlendFunc_2 +#define glBlendFuncSeparate _GlBlendFuncSeparate_2 +#define glBufferData _GlBufferData_2 +#define glBufferSubData _GlBufferSubData_2 +#define glCheckFramebufferStatus _GlCheckFramebufferStatus_2 +#define glClear _GlClear_2 +#define glClearColor _GlClearColor_2 +#define glClearDepthf _GlClearDepthf_2 +#define glClearStencil _GlClearStencil_2 +#define glColorMask _GlColorMask_2 +#define glCompileShader _GlCompileShader_2 +#define glCompressedTexImage2D _GlCompressedTexImage2D_2 +#define glCompressedTexSubImage2D _GlCompressedTexSubImage2D_2 +#define glCopyTexImage2D _GlCopyTexImage2D_2 +#define glCopyTexSubImage2D _GlCopyTexSubImage2D_2 +#define glCreateProgram _GlCreateProgram_2 +#define glCreateShader _GlCreateShader_2 +#define glCullFace _GlCullFace_2 +#define glDeleteBuffers _GlDeleteBuffers_2 +#define glDeleteFramebuffers _GlDeleteFramebuffers_2 +#define glDeleteProgram _GlDeleteProgram_2 +#define glDeleteRenderbuffers _GlDeleteRenderbuffers_2 +#define glDeleteShader _GlDeleteShader_2 +#define glDeleteTextures _GlDeleteTextures_2 +#define glDepthFunc _GlDepthFunc_2 +#define glDepthMask _GlDepthMask_2 +#define glDepthRangef _GlDepthRangef_2 +#define glDetachShader _GlDetachShader_2 +#define glDisable _GlDisable_2 +#define glDisableVertexAttribArray _GlDisableVertexAttribArray_2 +#define glDrawArrays _GlDrawArrays_2 +#define glDrawElements _GlDrawElements_2 +#define glEnable _GlEnable_2 +#define glEnableVertexAttribArray _GlEnableVertexAttribArray_2 +#define glFinish _GlFinish_2 +#define glFlush _GlFlush_2 +#define glFramebufferRenderbuffer _GlFramebufferRenderbuffer_2 +#define glFramebufferTexture2D _GlFramebufferTexture2D_2 +#define glFrontFace _GlFrontFace_2 +#define glGenBuffers _GlGenBuffers_2 +#define glGenerateMipmap _GlGenerateMipmap_2 +#define glGenFramebuffers _GlGenFramebuffers_2 +#define glGenRenderbuffers _GlGenRenderbuffers_2 +#define glGenTextures _GlGenTextures_2 +#define glGetActiveAttrib _GlGetActiveAttrib_2 +#define glGetActiveUniform _GlGetActiveUniform_2 +#define glGetAttachedShaders _GlGetAttachedShaders_2 +#define glGetAttribLocation _GlGetAttribLocation_2 +#define glGetBooleanv _GlGetBooleanv_2 +#define glGetBufferParameteriv _GlGetBufferParameteriv_2 +#define glGetError _GlGetError_2 +#define glGetFloatv _GlGetFloatv_2 +#define glGetFramebufferAttachmentParameteriv _GlGetFramebufferAttachmentParameteriv_2 +#define glGetIntegerv _GlGetIntegerv_2 +#define glGetProgramiv _GlGetProgramiv_2 +#define glGetProgramInfoLog _GlGetProgramInfoLog_2 +#define glGetRenderbufferParameteriv _GlGetRenderbufferParameteriv_2 +#define glGetShaderiv _GlGetShaderiv_2 +#define glGetShaderInfoLog _GlGetShaderInfoLog_2 +#define glGetShaderPrecisionFormat _GlGetShaderPrecisionFormat_2 +#define glGetShaderSource _GlGetShaderSource_2 +#define glGetString _GlGetString_2 +#define glGetTexParameterfv _GlGetTexParameterfv_2 +#define glGetTexParameteriv _GlGetTexParameteriv_2 +#define glGetUniformfv _GlGetUniformfv_2 +#define glGetUniformiv _GlGetUniformiv_2 +#define glGetUniformLocation _GlGetUniformLocation_2 +#define glGetVertexAttribfv _GlGetVertexAttribfv_2 +#define glGetVertexAttribiv _GlGetVertexAttribiv_2 +#define glGetVertexAttribPointerv _GlGetVertexAttribPointerv_2 +#define glHint _GlHint_2 +#define glIsBuffer _GlIsBuffer_2 +#define glIsEnabled _GlIsEnabled_2 +#define glIsFramebuffer _GlIsFramebuffer_2 +#define glIsProgram _GlIsProgram_2 +#define glIsRenderbuffer _GlIsRenderbuffer_2 +#define glIsShader _GlIsShader_2 +#define glIsTexture _GlIsTexture_2 +#define glLineWidth _GlLineWidth_2 +#define glLinkProgram _GlLinkProgram_2 +#define glPixelStorei _GlPixelStorei_2 +#define glPolygonOffset _GlPolygonOffset_2 +#define glReadPixels _GlReadPixels_2 +#define glReleaseShaderCompiler _GlReleaseShaderCompiler_2 +#define glRenderbufferStorage _GlRenderbufferStorage_2 +#define glSampleCoverage _GlSampleCoverage_2 +#define glScissor _GlScissor_2 +#define glShaderBinary _GlShaderBinary_2 +#define glShaderSource _GlShaderSource_2 +#define glStencilFunc _GlStencilFunc_2 +#define glStencilFuncSeparate _GlStencilFuncSeparate_2 +#define glStencilMask _GlStencilMask_2 +#define glStencilMaskSeparate _GlStencilMaskSeparate_2 +#define glStencilOp _GlStencilOp_2 +#define glStencilOpSeparate _GlStencilOpSeparate_2 +#define glTexImage2D _GlTexImage2D_2 +#define glTexParameterf _GlTexParameterf_2 +#define glTexParameterfv _GlTexParameterfv_2 +#define glTexParameteri _GlTexParameteri_2 +#define glTexParameteriv _GlTexParameteriv_2 +#define glTexSubImage2D _GlTexSubImage2D_2 +#define glUniform1i _GlUniform1i_2 +#define glUniform2i _GlUniform2i_2 +#define glUniform3i _GlUniform3i_2 +#define glUniform4i _GlUniform4i_2 +#define glUniform1f _GlUniform1f_2 +#define glUniform2f _GlUniform2f_2 +#define glUniform3f _GlUniform3f_2 +#define glUniform4f _GlUniform4f_2 +#define glUniform1iv _GlUniform1iv_2 +#define glUniform2iv _GlUniform2iv_2 +#define glUniform3iv _GlUniform3iv_2 +#define glUniform4iv _GlUniform4iv_2 +#define glUniform1fv _GlUniform1fv_2 +#define glUniform2fv _GlUniform2fv_2 +#define glUniform3fv _GlUniform3fv_2 +#define glUniform4fv _GlUniform4fv_2 +#define glUniformMatrix2fv _GlUniformMatrix2fv_2 +#define glUniformMatrix3fv _GlUniformMatrix3fv_2 +#define glUniformMatrix4fv _GlUniformMatrix4fv_2 +#define glUseProgram _GlUseProgram_2 +#define glValidateProgram _GlValidateProgram_2 +#define glVertexAttrib1f _GlVertexAttrib1f_2 +#define glVertexAttrib2f _GlVertexAttrib2f_2 +#define glVertexAttrib3f _GlVertexAttrib3f_2 +#define glVertexAttrib4f _GlVertexAttrib4f_2 +#define glVertexAttrib1fv _GlVertexAttrib1fv_2 +#define glVertexAttrib2fv _GlVertexAttrib2fv_2 +#define glVertexAttrib3fv _GlVertexAttrib3fv_2 +#define glVertexAttrib4fv _GlVertexAttrib4fv_2 +#define glVertexAttribPointer _GlVertexAttribPointer_2 +#define glViewport _GlViewport_2 + +#endif // _GL2_MACRO_H_ diff --git a/inc/gl2platform.h b/inc/gl2platform.h new file mode 100644 index 0000000..84ecbb6 --- /dev/null +++ b/inc/gl2platform.h @@ -0,0 +1,28 @@ +#ifndef __gl2platform_h_ +#define __gl2platform_h_ + + +/* + * This document is licensed under the SGI Free Software B License Version + * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . + */ + +/* Platform-specific types and definitions for OpenGL ES 2.X gl2.h + * Last modified on 2008/12/19 + * + * Adopters may modify khrplatform.h and this file to suit their platform. + * You are encouraged to submit all modifications to the Khronos group so that + * they can be included in future versions of this file. Please submit changes + * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla) + * by filing a bug against product "OpenGL-ES" component "Registry". + */ + +#include "khrplatform.h" + +#ifndef GL_APICALL +#define GL_APICALL KHRONOS_APICALL +#endif + +#define GL_APIENTRY //KHRONOS_APIENTRY + +#endif /* __gl2platform_h_ */ diff --git a/inc/glext.h b/inc/glext.h new file mode 100644 index 0000000..20fb4dd --- /dev/null +++ b/inc/glext.h @@ -0,0 +1,899 @@ +#ifndef __glext_h_ +#define __glext_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * This document is licensed under the SGI Free Software B License Version + * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . + */ + +#ifndef GL_APIENTRYP +#define GL_APIENTRYP GL_APIENTRY * +#endif + +#define GL_GLEXT_PROTOTYPES + +/*------------------------------------------------------------------------* + * OES extension tokens + *------------------------------------------------------------------------*/ + +/* GL_OES_blend_equation_separate */ +#ifndef GL_OES_blend_equation_separate +/* BLEND_EQUATION_RGB_OES same as BLEND_EQUATION_OES */ +#define GL_BLEND_EQUATION_RGB_OES 0x8009 +#define GL_BLEND_EQUATION_ALPHA_OES 0x883D +#endif + +/* GL_OES_blend_func_separate */ +#ifndef GL_OES_blend_func_separate +#define GL_BLEND_DST_RGB_OES 0x80C8 +#define GL_BLEND_SRC_RGB_OES 0x80C9 +#define GL_BLEND_DST_ALPHA_OES 0x80CA +#define GL_BLEND_SRC_ALPHA_OES 0x80CB +#endif + +/* GL_OES_blend_subtract */ +#ifndef GL_OES_blend_subtract +#define GL_BLEND_EQUATION_OES 0x8009 +#define GL_FUNC_ADD_OES 0x8006 +#define GL_FUNC_SUBTRACT_OES 0x800A +#define GL_FUNC_REVERSE_SUBTRACT_OES 0x800B +#endif + +/* GL_OES_compressed_ETC1_RGB8_texture */ +#ifndef GL_OES_compressed_ETC1_RGB8_texture +#define GL_ETC1_RGB8_OES 0x8D64 +#endif + +/* GL_OES_depth24 */ +#ifndef GL_OES_depth24 +#define GL_DEPTH_COMPONENT24_OES 0x81A6 +#endif + +/* GL_OES_depth32 */ +#ifndef GL_OES_depth32 +#define GL_DEPTH_COMPONENT32_OES 0x81A7 +#endif + +/* GL_OES_draw_texture */ +#ifndef GL_OES_draw_texture +#define GL_TEXTURE_CROP_RECT_OES 0x8B9D +#endif + +/* GL_OES_EGL_image */ +#ifndef GL_OES_EGL_image +typedef void* GLeglImageOES; +#endif + +/* GL_OES_fixed_point */ +#ifndef GL_OES_fixed_point +#define GL_FIXED_OES 0x140C +#endif + +/* GL_OES_framebuffer_object */ +#ifndef GL_OES_framebuffer_object +#define GL_NONE_OES 0 +#define GL_FRAMEBUFFER_OES 0x8D40 +#define GL_RENDERBUFFER_OES 0x8D41 +#define GL_RGBA4_OES 0x8056 +#define GL_RGB5_A1_OES 0x8057 +#define GL_RGB565_OES 0x8D62 +#define GL_DEPTH_COMPONENT16_OES 0x81A5 +#define GL_RENDERBUFFER_WIDTH_OES 0x8D42 +#define GL_RENDERBUFFER_HEIGHT_OES 0x8D43 +#define GL_RENDERBUFFER_INTERNAL_FORMAT_OES 0x8D44 +#define GL_RENDERBUFFER_RED_SIZE_OES 0x8D50 +#define GL_RENDERBUFFER_GREEN_SIZE_OES 0x8D51 +#define GL_RENDERBUFFER_BLUE_SIZE_OES 0x8D52 +#define GL_RENDERBUFFER_ALPHA_SIZE_OES 0x8D53 +#define GL_RENDERBUFFER_DEPTH_SIZE_OES 0x8D54 +#define GL_RENDERBUFFER_STENCIL_SIZE_OES 0x8D55 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES 0x8CD0 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES 0x8CD1 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES 0x8CD2 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES 0x8CD3 +#define GL_COLOR_ATTACHMENT0_OES 0x8CE0 +#define GL_DEPTH_ATTACHMENT_OES 0x8D00 +#define GL_STENCIL_ATTACHMENT_OES 0x8D20 +#define GL_FRAMEBUFFER_COMPLETE_OES 0x8CD5 +#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES 0x8CD6 +#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES 0x8CD7 +#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES 0x8CD9 +#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES 0x8CDA +#define GL_FRAMEBUFFER_UNSUPPORTED_OES 0x8CDD +#define GL_FRAMEBUFFER_BINDING_OES 0x8CA6 +#define GL_RENDERBUFFER_BINDING_OES 0x8CA7 +#define GL_MAX_RENDERBUFFER_SIZE_OES 0x84E8 +#define GL_INVALID_FRAMEBUFFER_OPERATION_OES 0x0506 +#endif + +/* GL_OES_mapbuffer */ +#ifndef GL_OES_mapbuffer +#define GL_WRITE_ONLY_OES 0x88B9 +#define GL_BUFFER_ACCESS_OES 0x88BB +#define GL_BUFFER_MAPPED_OES 0x88BC +#define GL_BUFFER_MAP_POINTER_OES 0x88BD +#endif + +/* GL_OES_matrix_get */ +#ifndef GL_OES_matrix_get +#define GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES 0x898D +#define GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES 0x898E +#define GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES 0x898F +#endif + +/* GL_OES_matrix_palette */ +#ifndef _WIN32 // _WIN32 +#ifndef GL_OES_matrix_palette +#define GL_MAX_VERTEX_UNITS_OES 0x86A4 +#define GL_MAX_PALETTE_MATRICES_OES 0x8842 +#define GL_MATRIX_PALETTE_OES 0x8840 +#define GL_MATRIX_INDEX_ARRAY_OES 0x8844 +#define GL_WEIGHT_ARRAY_OES 0x86AD +#define GL_CURRENT_PALETTE_MATRIX_OES 0x8843 +#define GL_MATRIX_INDEX_ARRAY_SIZE_OES 0x8846 +#define GL_MATRIX_INDEX_ARRAY_TYPE_OES 0x8847 +#define GL_MATRIX_INDEX_ARRAY_STRIDE_OES 0x8848 +#define GL_MATRIX_INDEX_ARRAY_POINTER_OES 0x8849 +#define GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES 0x8B9E +#define GL_WEIGHT_ARRAY_SIZE_OES 0x86AB +#define GL_WEIGHT_ARRAY_TYPE_OES 0x86A9 +#define GL_WEIGHT_ARRAY_STRIDE_OES 0x86AA +#define GL_WEIGHT_ARRAY_POINTER_OES 0x86AC +#define GL_WEIGHT_ARRAY_BUFFER_BINDING_OES 0x889E +#endif +#endif //_WIN32 + +/* GL_OES_packed_depth_stencil */ +#ifndef GL_OES_packed_depth_stencil +#define GL_DEPTH_STENCIL_OES 0x84F9 +#define GL_UNSIGNED_INT_24_8_OES 0x84FA +#define GL_DEPTH24_STENCIL8_OES 0x88F0 +#endif + +/* GL_OES_rgb8_rgba8 */ +#ifndef GL_OES_rgb8_rgba8 +#define GL_RGB8_OES 0x8051 +#define GL_RGBA8_OES 0x8058 +#endif + +/* GL_OES_stencil1 */ +#ifndef GL_OES_stencil1 +#define GL_STENCIL_INDEX1_OES 0x8D46 +#endif + +/* GL_OES_stencil4 */ +#ifndef GL_OES_stencil4 +#define GL_STENCIL_INDEX4_OES 0x8D47 +#endif + +/* GL_OES_stencil8 */ +#ifndef GL_OES_stencil8 +#define GL_STENCIL_INDEX8_OES 0x8D48 +#endif + +/* GL_OES_stencil_wrap */ +#ifndef GL_OES_stencil_wrap +#define GL_INCR_WRAP_OES 0x8507 +#define GL_DECR_WRAP_OES 0x8508 +#endif + +/* GL_OES_texture_cube_map */ +#ifndef GL_OES_texture_cube_map +#define GL_NORMAL_MAP_OES 0x8511 +#define GL_REFLECTION_MAP_OES 0x8512 +#define GL_TEXTURE_CUBE_MAP_OES 0x8513 +#define GL_TEXTURE_BINDING_CUBE_MAP_OES 0x8514 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES 0x8515 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES 0x8516 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES 0x8517 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES 0x8518 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES 0x8519 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES 0x851A +#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_OES 0x851C +#define GL_TEXTURE_GEN_MODE_OES 0x2500 +#define GL_TEXTURE_GEN_STR_OES 0x8D60 +#endif + +/* GL_OES_texture_mirrored_repeat */ +#ifndef GL_OES_texture_mirrored_repeat +#define GL_MIRRORED_REPEAT_OES 0x8370 +#endif + +/*------------------------------------------------------------------------* + * AMD extension tokens + *------------------------------------------------------------------------*/ + +/* GL_AMD_compressed_3DC_texture */ +#ifndef GL_AMD_compressed_3DC_texture +#define GL_3DC_X_AMD 0x87F9 +#define GL_3DC_XY_AMD 0x87FA +#endif + +/* GL_AMD_compressed_ATC_texture */ +#ifndef GL_AMD_compressed_ATC_texture +#define GL_ATC_RGB_AMD 0x8C92 +#define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93 +#define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE +#endif + +/*------------------------------------------------------------------------* + * EXT extension tokens + *------------------------------------------------------------------------*/ + +/* GL_EXT_texture_filter_anisotropic */ +#ifndef GL_EXT_texture_filter_anisotropic +#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE +#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF +#endif + +/* GL_EXT_texture_format_BGRA8888 */ +#ifndef GL_EXT_texture_format_BGRA8888 +#define GL_BGRA 0x80E1 +#endif + +/*------------------------------------------------------------------------* + * IMG extension tokens + *------------------------------------------------------------------------*/ + +/* GL_IMG_read_format */ +#ifndef GL_IMG_read_format +#define GL_BGRA 0x80E1 +#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365 +#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366 +#endif + +/* GL_IMG_texture_compression_pvrtc */ +#ifndef GL_IMG_texture_compression_pvrtc +#define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00 +#define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01 +#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02 +#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03 +#endif + +/* GL_IMG_user_clip_plane */ +#ifndef GL_IMG_user_clip_plane +#define GL_CLIP_PLANE0_IMG 0x3000 +#define GL_CLIP_PLANE1_IMG 0x3001 +#define GL_CLIP_PLANE2_IMG 0x3002 +#define GL_CLIP_PLANE3_IMG 0x3003 +#define GL_CLIP_PLANE4_IMG 0x3004 +#define GL_CLIP_PLANE5_IMG 0x3005 +#define GL_MAX_CLIP_PLANES_IMG 0x0D32 +#endif + +/* GL_IMG_texture_env_enhanced_fixed_function */ +#ifndef GL_IMG_texture_env_enhanced_fixed_function +#define GL_MODULATE_COLOR_IMG 0x8C04 +#define GL_RECIP_ADD_SIGNED_ALPHA_IMG 0x8C05 +#define GL_TEXTURE_ALPHA_MODULATE_IMG 0x8C06 +#define GL_FACTOR_ALPHA_MODULATE_IMG 0x8C07 +#define GL_FRAGMENT_ALPHA_MODULATE_IMG 0x8C08 +#define GL_ADD_BLEND_IMG 0x8C09 +#define GL_DOT3_RGBA_IMG 0x86AF +#endif + +/*------------------------------------------------------------------------* + * NV extension tokens + *------------------------------------------------------------------------*/ + +/* GL_NV_fence */ +#ifndef GL_NV_fence +#define GL_ALL_COMPLETED_NV 0x84F2 +#define GL_FENCE_STATUS_NV 0x84F3 +#define GL_FENCE_CONDITION_NV 0x84F4 +#endif + +/*------------------------------------------------------------------------* + * QCOM extension tokens + *------------------------------------------------------------------------*/ + +/* GL_QCOM_driver_control */ +/* No new tokens introduced by this extension. */ + +/* GL_QCOM_perfmon_global_mode */ +#ifndef GL_QCOM_perfmon_global_mode +#define GL_PERFMON_GLOBAL_MODE_QCOM 0x8FA0 +#endif + +/*------------------------------------------------------------------------* + * End of extension tokens, start of corresponding extension functions + *------------------------------------------------------------------------*/ + +/*------------------------------------------------------------------------* + * OES extension functions + *------------------------------------------------------------------------*/ + +/* GL_OES_blend_equation_separate */ +#ifndef GL_OES_blend_equation_separate +#define GL_OES_blend_equation_separate 1 +#if 0 // not supported +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glBlendEquationSeparateOES(GLenum modeRGB, GLenum modeAlpha); +#endif +#endif // not supported +typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATEOESPROC)(GLenum modeRGB, GLenum modeAlpha); +#endif + +/* GL_OES_blend_func_separate */ +#ifndef GL_OES_blend_func_separate +#define GL_OES_blend_func_separate 1 +#if 0 // not supported +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glBlendFuncSeparateOES(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +#endif +#endif // not supported +typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATEOESPROC)(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +#endif + +/* GL_OES_blend_subtract */ +#ifndef GL_OES_blend_subtract +#define GL_OES_blend_subtract 1 +#if 0 // not supported +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glBlendEquationOES(GLenum mode); +#endif +#endif // not supported +typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONOESPROC)(GLenum mode); +#endif + +/* GL_OES_byte_coordinates */ +#ifndef GL_OES_byte_coordinates +#define GL_OES_byte_coordinates 1 +#endif + +/* GL_OES_compressed_ETC1_RGB8_texture */ +#ifndef GL_OES_compressed_ETC1_RGB8_texture +#define GL_OES_compressed_ETC1_RGB8_texture 1 +#endif + +/* GL_OES_depth24 */ +#ifndef GL_OES_depth24 +#define GL_OES_depth24 1 +#endif + +/* GL_OES_depth32 */ +#ifndef GL_OES_depth32 +#define GL_OES_depth32 1 +#endif + +/* GL_OES_draw_texture */ +#ifndef GL_OES_draw_texture +#define GL_OES_draw_texture 1 +#if 0 // not supported +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glDrawTexsOES(GLshort x, GLshort y, GLshort z, GLshort width, GLshort height); +GL_API void GL_APIENTRY glDrawTexiOES(GLint x, GLint y, GLint z, GLint width, GLint height); +GL_API void GL_APIENTRY glDrawTexxOES(GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height); +GL_API void GL_APIENTRY glDrawTexsvOES(const GLshort* coords); +GL_API void GL_APIENTRY glDrawTexivOES(const GLint* coords); +GL_API void GL_APIENTRY glDrawTexxvOES(const GLfixed* coords); +GL_API void GL_APIENTRY glDrawTexfOES(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height); +GL_API void GL_APIENTRY glDrawTexfvOES(const GLfloat* coords); +#endif +#endif // not supported +typedef void (GL_APIENTRYP PFNGLDRAWTEXSOESPROC)(GLshort x, GLshort y, GLshort z, GLshort width, GLshort height); +typedef void (GL_APIENTRYP PFNGLDRAWTEXIOESPROC)(GLint x, GLint y, GLint z, GLint width, GLint height); +typedef void (GL_APIENTRYP PFNGLDRAWTEXXOESPROC)(GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height); +typedef void (GL_APIENTRYP PFNGLDRAWTEXSVOESPROC)(const GLshort* coords); +typedef void (GL_APIENTRYP PFNGLDRAWTEXIVOESPROC)(const GLint* coords); +typedef void (GL_APIENTRYP PFNGLDRAWTEXXVOESPROC)(const GLfixed* coords); +typedef void (GL_APIENTRYP PFNGLDRAWTEXFOESPROC)(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height); +typedef void (GL_APIENTRYP PFNGLDRAWTEXFVOESPROC)(const GLfloat* coords); +#endif + +/* GL_OES_EGL_image */ +#ifndef GL_OES_EGL_image +#define GL_OES_EGL_image 1 +#if 0 // not supported +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image); +GL_API void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image); +#endif +#endif // not supported +typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC)(GLenum target, GLeglImageOES image); +typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC)(GLenum target, GLeglImageOES image); +#endif + +/* GL_OES_element_index_uint */ +#ifndef GL_OES_element_index_uint +#define GL_OES_element_index_uint 1 +#endif + +/* GL_OES_extended_matrix_palette */ +#ifndef GL_OES_extended_matrix_palette +#define GL_OES_extended_matrix_palette 1 +#endif + +/* GL_OES_fbo_render_mipmap */ +#ifndef GL_OES_fbo_render_mipmap +#define GL_OES_fbo_render_mipmap 1 +#endif + +/* GL_OES_fixed_point */ +#ifndef GL_OES_fixed_point +#define GL_OES_fixed_point 1 +#if 0 // not supported +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glAlphaFuncxOES(GLenum func, GLclampx ref); +GL_API void GL_APIENTRY glClearColorxOES(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha); +GL_API void GL_APIENTRY glClearDepthxOES(GLclampx depth); +GL_API void GL_APIENTRY glClipPlanexOES(GLenum plane, const GLfixed* equation); +GL_API void GL_APIENTRY glColor4xOES(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); +GL_API void GL_APIENTRY glDepthRangexOES(GLclampx zNear, GLclampx zFar); +GL_API void GL_APIENTRY glFogxOES(GLenum pname, GLfixed param); +GL_API void GL_APIENTRY glFogxvOES(GLenum pname, const GLfixed* params); +GL_API void GL_APIENTRY glFrustumxOES(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); +GL_API void GL_APIENTRY glGetClipPlanexOES(GLenum pname, GLfixed eqn[4]); +GL_API void GL_APIENTRY glGetFixedvOES(GLenum pname, GLfixed* params); +GL_API void GL_APIENTRY glGetLightxvOES(GLenum light, GLenum pname, GLfixed* params); +GL_API void GL_APIENTRY glGetMaterialxvOES(GLenum face, GLenum pname, GLfixed* params); +GL_API void GL_APIENTRY glGetTexEnvxvOES(GLenum env, GLenum pname, GLfixed* params); +GL_API void GL_APIENTRY glGetTexParameterxvOES(GLenum target, GLenum pname, GLfixed* params); +GL_API void GL_APIENTRY glLightModelxOES(GLenum pname, GLfixed param); +GL_API void GL_APIENTRY glLightModelxvOES(GLenum pname, const GLfixed* params); +GL_API void GL_APIENTRY glLightxOES(GLenum light, GLenum pname, GLfixed param); +GL_API void GL_APIENTRY glLightxvOES(GLenum light, GLenum pname, const GLfixed* params); +GL_API void GL_APIENTRY glLineWidthxOES(GLfixed width); +GL_API void GL_APIENTRY glLoadMatrixxOES(const GLfixed* m); +GL_API void GL_APIENTRY glMaterialxOES(GLenum face, GLenum pname, GLfixed param); +GL_API void GL_APIENTRY glMaterialxvOES(GLenum face, GLenum pname, const GLfixed* params); +GL_API void GL_APIENTRY glMultMatrixxOES(const GLfixed* m); +GL_API void GL_APIENTRY glMultiTexCoord4xOES(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q); +GL_API void GL_APIENTRY glNormal3xOES(GLfixed nx, GLfixed ny, GLfixed nz); +GL_API void GL_APIENTRY glOrthoxOES(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); +GL_API void GL_APIENTRY glPointParameterxOES(GLenum pname, GLfixed param); +GL_API void GL_APIENTRY glPointParameterxvOES(GLenum pname, const GLfixed* params); +GL_API void GL_APIENTRY glPointSizexOES(GLfixed size); +GL_API void GL_APIENTRY glPolygonOffsetxOES(GLfixed factor, GLfixed units); +GL_API void GL_APIENTRY glRotatexOES(GLfixed angle, GLfixed x, GLfixed y, GLfixed z); +GL_API void GL_APIENTRY glSampleCoveragexOES(GLclampx value, GLboolean invert); +GL_API void GL_APIENTRY glScalexOES(GLfixed x, GLfixed y, GLfixed z); +GL_API void GL_APIENTRY glTexEnvxOES(GLenum target, GLenum pname, GLfixed param); +GL_API void GL_APIENTRY glTexEnvxvOES(GLenum target, GLenum pname, const GLfixed* params); +GL_API void GL_APIENTRY glTexParameterxOES(GLenum target, GLenum pname, GLfixed param); +GL_API void GL_APIENTRY glTexParameterxvOES(GLenum target, GLenum pname, const GLfixed* params); +GL_API void GL_APIENTRY glTranslatexOES(GLfixed x, GLfixed y, GLfixed z); +#endif +#endif // not supported +typedef void (GL_APIENTRYP PFNGLALPHAFUNCXOESPROC)(GLenum func, GLclampx ref); +typedef void (GL_APIENTRYP PFNGLCLEARCOLORXOESPROC)(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha); +typedef void (GL_APIENTRYP PFNGLCLEARDEPTHXOESPROC)(GLclampx depth); +typedef void (GL_APIENTRYP PFNGLCLIPPLANEXOESPROC)(GLenum plane, const GLfixed* equation); +typedef void (GL_APIENTRYP PFNGLCOLOR4XOESPROC)(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); +typedef void (GL_APIENTRYP PFNGLDEPTHRANGEXOESPROC)(GLclampx zNear, GLclampx zFar); +typedef void (GL_APIENTRYP PFNGLFOGXOESPROC)(GLenum pname, GLfixed param); +typedef void (GL_APIENTRYP PFNGLFOGXVOESPROC)(GLenum pname, const GLfixed* params); +typedef void (GL_APIENTRYP PFNGLFRUSTUMXOESPROC)(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, + GLfixed zFar); +typedef void (GL_APIENTRYP PFNGLGETCLIPPLANEXOESPROC)(GLenum pname, GLfixed eqn[4]); +typedef void (GL_APIENTRYP PFNGLGETFIXEDVOESPROC)(GLenum pname, GLfixed* params); +typedef void (GL_APIENTRYP PFNGLGETLIGHTXVOESPROC)(GLenum light, GLenum pname, GLfixed* params); +typedef void (GL_APIENTRYP PFNGLGETMATERIALXVOESPROC)(GLenum face, GLenum pname, GLfixed* params); +typedef void (GL_APIENTRYP PFNGLGETTEXENVXVOESPROC)(GLenum env, GLenum pname, GLfixed* params); +typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERXVOESPROC)(GLenum target, GLenum pname, GLfixed* params); +typedef void (GL_APIENTRYP PFNGLLIGHTMODELXOESPROC)(GLenum pname, GLfixed param); +typedef void (GL_APIENTRYP PFNGLLIGHTMODELXVOESPROC)(GLenum pname, const GLfixed* params); +typedef void (GL_APIENTRYP PFNGLLIGHTXOESPROC)(GLenum light, GLenum pname, GLfixed param); +typedef void (GL_APIENTRYP PFNGLLIGHTXVOESPROC)(GLenum light, GLenum pname, const GLfixed* params); +typedef void (GL_APIENTRYP PFNGLLINEWIDTHXOESPROC)(GLfixed width); +typedef void (GL_APIENTRYP PFNGLLOADMATRIXXOESPROC)(const GLfixed* m); +typedef void (GL_APIENTRYP PFNGLMATERIALXOESPROC)(GLenum face, GLenum pname, GLfixed param); +typedef void (GL_APIENTRYP PFNGLMATERIALXVOESPROC)(GLenum face, GLenum pname, const GLfixed* params); +typedef void (GL_APIENTRYP PFNGLMULTMATRIXXOESPROC)(const GLfixed* m); +typedef void (GL_APIENTRYP PFNGLMULTITEXCOORD4XOESPROC)(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q); +typedef void (GL_APIENTRYP PFNGLNORMAL3XOESPROC)(GLfixed nx, GLfixed ny, GLfixed nz); +typedef void (GL_APIENTRYP PFNGLORTHOXOESPROC)(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, + GLfixed zFar); +typedef void (GL_APIENTRYP PFNGLPOINTPARAMETERXOESPROC)(GLenum pname, GLfixed param); +typedef void (GL_APIENTRYP PFNGLPOINTPARAMETERXVOESPROC)(GLenum pname, const GLfixed* params); +typedef void (GL_APIENTRYP PFNGLPOINTSIZEXOESPROC)(GLfixed size); +typedef void (GL_APIENTRYP PFNGLPOLYGONOFFSETXOESPROC)(GLfixed factor, GLfixed units); +typedef void (GL_APIENTRYP PFNGLROTATEXOESPROC)(GLfixed angle, GLfixed x, GLfixed y, GLfixed z); +typedef void (GL_APIENTRYP PFNGLSAMPLECOVERAGEXOESPROC)(GLclampx value, GLboolean invert); +typedef void (GL_APIENTRYP PFNGLSCALEXOESPROC)(GLfixed x, GLfixed y, GLfixed z); +typedef void (GL_APIENTRYP PFNGLTEXENVXOESPROC)(GLenum target, GLenum pname, GLfixed param); +typedef void (GL_APIENTRYP PFNGLTEXENVXVOESPROC)(GLenum target, GLenum pname, const GLfixed* params); +typedef void (GL_APIENTRYP PFNGLTEXPARAMETERXOESPROC)(GLenum target, GLenum pname, GLfixed param); +typedef void (GL_APIENTRYP PFNGLTEXPARAMETERXVOESPROC)(GLenum target, GLenum pname, const GLfixed* params); +typedef void (GL_APIENTRYP PFNGLTRANSLATEXOESPROC)(GLfixed x, GLfixed y, GLfixed z); +#endif + +/* GL_OES_framebuffer_object */ +#ifndef GL_OES_framebuffer_object +#define GL_OES_framebuffer_object 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_API GLboolean GL_APIENTRY glIsRenderbufferOES(GLuint renderbuffer); +GL_API void GL_APIENTRY glBindRenderbufferOES(GLenum target, GLuint renderbuffer); +GL_API void GL_APIENTRY glDeleteRenderbuffersOES(GLsizei n, const GLuint* renderbuffers); +GL_API void GL_APIENTRY glGenRenderbuffersOES(GLsizei n, GLuint* renderbuffers); +GL_API void GL_APIENTRY glRenderbufferStorageOES(GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +GL_API void GL_APIENTRY glGetRenderbufferParameterivOES(GLenum target, GLenum pname, GLint* params); +GL_API GLboolean GL_APIENTRY glIsFramebufferOES(GLuint framebuffer); +GL_API void GL_APIENTRY glBindFramebufferOES(GLenum target, GLuint framebuffer); +GL_API void GL_APIENTRY glDeleteFramebuffersOES(GLsizei n, const GLuint* framebuffers); +GL_API void GL_APIENTRY glGenFramebuffersOES(GLsizei n, GLuint* framebuffers); +GL_API GLenum GL_APIENTRY glCheckFramebufferStatusOES(GLenum target); +GL_API void GL_APIENTRY glFramebufferRenderbufferOES(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +GL_API void GL_APIENTRY glFramebufferTexture2DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +GL_API void GL_APIENTRY glGetFramebufferAttachmentParameterivOES(GLenum target, GLenum attachment, GLenum pname, GLint* params); +GL_API void GL_APIENTRY glGenerateMipmapOES(GLenum target); +#endif +typedef GLboolean (GL_APIENTRYP PFNGLISRENDERBUFFEROESPROC)(GLuint renderbuffer); +typedef void (GL_APIENTRYP PFNGLBINDRENDERBUFFEROESPROC)(GLenum target, GLuint renderbuffer); +typedef void (GL_APIENTRYP PFNGLDELETERENDERBUFFERSOESPROC)(GLsizei n, const GLuint* renderbuffers); +typedef void (GL_APIENTRYP PFNGLGENRENDERBUFFERSOESPROC)(GLsizei n, GLuint* renderbuffers); +typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEOESPROC)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVOESPROC)(GLenum target, GLenum pname, GLint* params); +typedef GLboolean (GL_APIENTRYP PFNGLISFRAMEBUFFEROESPROC)(GLuint framebuffer); +typedef void (GL_APIENTRYP PFNGLBINDFRAMEBUFFEROESPROC)(GLenum target, GLuint framebuffer); +typedef void (GL_APIENTRYP PFNGLDELETEFRAMEBUFFERSOESPROC)(GLsizei n, const GLuint* framebuffers); +typedef void (GL_APIENTRYP PFNGLGENFRAMEBUFFERSOESPROC)(GLsizei n, GLuint* framebuffers); +typedef GLenum (GL_APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSOESPROC)(GLenum target); +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEROESPROC)(GLenum target, GLenum attachment, GLenum renderbuffertarget, + GLuint renderbuffer); +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DOESPROC)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, + GLint level); +typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVOESPROC)(GLenum target, GLenum attachment, GLenum pname, + GLint* params); +typedef void (GL_APIENTRYP PFNGLGENERATEMIPMAPOESPROC)(GLenum target); +#endif + +/* GL_OES_mapbuffer */ +#ifndef GL_OES_mapbuffer +#define GL_OES_mapbuffer 1 +#if 0 // not supported +#ifdef GL_GLEXT_PROTOTYPES +GL_API void* GL_APIENTRY glMapBufferOES(GLenum target, GLenum access); +GL_API GLboolean GL_APIENTRY glUnmapBufferOES(GLenum target); +GL_API void GL_APIENTRY glGetBufferPointervOES(GLenum target, GLenum pname, void** params); +#endif +#endif // not supported +typedef void* (GL_APIENTRYP PFNGLMAPBUFFEROESPROC)(GLenum target, GLenum access); +typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC)(GLenum target); +typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC)(GLenum target, GLenum pname, void** params); +#endif + +/* GL_OES_matrix_get */ +#ifndef GL_OES_matrix_get +#define GL_OES_matrix_get 1 +#endif + +/* GL_OES_matrix_palette */ +#ifndef _WIN32 // _WIN32 +#ifndef GL_OES_matrix_palette +#define GL_OES_matrix_palette 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glCurrentPaletteMatrixOES(GLuint matrixpaletteindex); +GL_API void GL_APIENTRY glLoadPaletteFromModelViewMatrixOES(void); +GL_API void GL_APIENTRY glMatrixIndexPointerOES(GLint size, GLenum type, GLsizei stride, const GLvoid* pointer); +GL_API void GL_APIENTRY glWeightPointerOES(GLint size, GLenum type, GLsizei stride, const GLvoid* pointer); +#endif +typedef void (GL_APIENTRYP PFNGLCURRENTPALETTEMATRIXOESPROC)(GLuint matrixpaletteindex); +typedef void (GL_APIENTRYP PFNGLLOADPALETTEFROMMODELVIEWMATRIXOESPROC)(void); +typedef void (GL_APIENTRYP PFNGLMATRIXINDEXPOINTEROESPROC)(GLint size, GLenum type, GLsizei stride, const GLvoid* pointer); +typedef void (GL_APIENTRYP PFNGLWEIGHTPOINTEROESPROC)(GLint size, GLenum type, GLsizei stride, const GLvoid* pointer); +#endif +#endif //_WIN32 + +/* GL_OES_packed_depth_stencil */ +#ifndef GL_OES_packed_depth_stencil +#define GL_OES_packed_depth_stencil 1 +#endif + +/* GL_OES_query_matrix */ +#ifndef GL_OES_query_matrix +#define GL_OES_query_matrix 1 +#if 0 // not supported +#ifdef GL_GLEXT_PROTOTYPES +GL_API GLbitfield GL_APIENTRY glQueryMatrixxOES(GLfixed mantissa[16], GLint exponent[16]); +#endif +#endif // not supported +typedef GLbitfield (GL_APIENTRYP PFNGLQUERYMATRIXXOESPROC)(GLfixed mantissa[16], GLint exponent[16]); +#endif + +/* GL_OES_rgb8_rgba8 */ +#ifndef GL_OES_rgb8_rgba8 +#define GL_OES_rgb8_rgba8 1 +#endif + +/* GL_OES_single_precision */ +#ifndef GL_OES_single_precision +#define GL_OES_single_precision 1 +#if 0 // not supported +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glDepthRangefOES(GLclampf zNear, GLclampf zFar); +GL_API void GL_APIENTRY glFrustumfOES(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); +GL_API void GL_APIENTRY glOrthofOES(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); +GL_API void GL_APIENTRY glClipPlanefOES(GLenum plane, const GLfloat* equation); +GL_API void GL_APIENTRY glGetClipPlanefOES(GLenum pname, GLfloat eqn[4]); +GL_API void GL_APIENTRY glClearDepthfOES(GLclampf depth); +#endif +#endif // not supported +typedef void (GL_APIENTRYP PFNGLDEPTHRANGEFOESPROC)(GLclampf zNear, GLclampf zFar); +typedef void (GL_APIENTRYP PFNGLFRUSTUMFOESPROC)(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, + GLfloat zFar); +typedef void (GL_APIENTRYP PFNGLORTHOFOESPROC)(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, + GLfloat zFar); +typedef void (GL_APIENTRYP PFNGLCLIPPLANEFOESPROC)(GLenum plane, const GLfloat* equation); +typedef void (GL_APIENTRYP PFNGLGETCLIPPLANEFOESPROC)(GLenum pname, GLfloat eqn[4]); +typedef void (GL_APIENTRYP PFNGLCLEARDEPTHFOESPROC)(GLclampf depth); +#endif + +/* GL_OES_stencil1 */ +#ifndef GL_OES_stencil1 +#define GL_OES_stencil1 1 +#endif + +/* GL_OES_stencil4 */ +#ifndef GL_OES_stencil4 +#define GL_OES_stencil4 1 +#endif + +/* GL_OES_stencil8 */ +#ifndef GL_OES_stencil8 +#define GL_OES_stencil8 1 +#endif + +/* GL_OES_stencil_wrap */ +#ifndef GL_OES_stencil_wrap +#define GL_OES_stencil_wrap 1 +#endif + +/* GL_OES_texture_cube_map */ +#ifndef GL_OES_texture_cube_map +#define GL_OES_texture_cube_map 1 +#if 0 // not supported +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glTexGenfOES(GLenum coord, GLenum pname, GLfloat param); +GL_API void GL_APIENTRY glTexGenfvOES(GLenum coord, GLenum pname, const GLfloat* params); +GL_API void GL_APIENTRY glTexGeniOES(GLenum coord, GLenum pname, GLint param); +GL_API void GL_APIENTRY glTexGenivOES(GLenum coord, GLenum pname, const GLint* params); +GL_API void GL_APIENTRY glTexGenxOES(GLenum coord, GLenum pname, GLfixed param); +GL_API void GL_APIENTRY glTexGenxvOES(GLenum coord, GLenum pname, const GLfixed* params); +GL_API void GL_APIENTRY glGetTexGenfvOES(GLenum coord, GLenum pname, GLfloat* params); +GL_API void GL_APIENTRY glGetTexGenivOES(GLenum coord, GLenum pname, GLint* params); +GL_API void GL_APIENTRY glGetTexGenxvOES(GLenum coord, GLenum pname, GLfixed* params); +#endif +#endif // not supported +typedef void (GL_APIENTRYP PFNGLTEXGENFOESPROC)(GLenum coord, GLenum pname, GLfloat param); +typedef void (GL_APIENTRYP PFNGLTEXGENFVOESPROC)(GLenum coord, GLenum pname, const GLfloat* params); +typedef void (GL_APIENTRYP PFNGLTEXGENIOESPROC)(GLenum coord, GLenum pname, GLint param); +typedef void (GL_APIENTRYP PFNGLTEXGENIVOESPROC)(GLenum coord, GLenum pname, const GLint* params); +typedef void (GL_APIENTRYP PFNGLTEXGENXOESPROC)(GLenum coord, GLenum pname, GLfixed param); +typedef void (GL_APIENTRYP PFNGLTEXGENXVOESPROC)(GLenum coord, GLenum pname, const GLfixed* params); +typedef void (GL_APIENTRYP PFNGLGETTEXGENFVOESPROC)(GLenum coord, GLenum pname, GLfloat* params); +typedef void (GL_APIENTRYP PFNGLGETTEXGENIVOESPROC)(GLenum coord, GLenum pname, GLint* params); +typedef void (GL_APIENTRYP PFNGLGETTEXGENXVOESPROC)(GLenum coord, GLenum pname, GLfixed* params); +#endif + +/* GL_OES_texture_env_crossbar */ +#ifndef GL_OES_texture_env_crossbar +#define GL_OES_texture_env_crossbar 1 +#endif + +/* GL_OES_texture_mirrored_repeat */ +#ifndef GL_OES_texture_mirrored_repeat +#define GL_OES_texture_mirrored_repeat 1 +#endif + +/*------------------------------------------------------------------------* + * AMD extension functions + *------------------------------------------------------------------------*/ + +/* GL_AMD_compressed_3DC_texture */ +#ifndef GL_AMD_compressed_3DC_texture +#define GL_AMD_compressed_3DC_texture 1 +#endif + +/* GL_AMD_compressed_ATC_texture */ +#ifndef GL_AMD_compressed_ATC_texture +#define GL_AMD_compressed_ATC_texture 1 +#endif + +/*------------------------------------------------------------------------* + * EXT extension functions + *------------------------------------------------------------------------*/ + +/* GL_EXT_texture_filter_anisotropic */ +#ifndef GL_EXT_texture_filter_anisotropic +#define GL_EXT_texture_filter_anisotropic 1 +#endif + +/* GL_EXT_texture_format_BGRA8888 */ +#ifndef GL_EXT_texture_format_BGRA8888 +#define GL_EXT_texture_format_BGRA8888 1 +#endif + +/*------------------------------------------------------------------------* + * IMG extension functions + *------------------------------------------------------------------------*/ + +/* GL_IMG_read_format */ +#ifndef GL_IMG_read_format +#define GL_IMG_read_format 1 +#endif + +/* GL_IMG_texture_compression_pvrtc */ +#ifndef GL_IMG_texture_compression_pvrtc +#define GL_IMG_texture_compression_pvrtc 1 +#endif + +/* GL_IMG_user_clip_plane */ +#ifndef GL_IMG_user_clip_plane +#define GL_IMG_user_clip_plane 1 +#if 0 // not supported +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glClipPlanefIMG(GLenum, const GLfloat*); +GL_API void GL_APIENTRY glClipPlanexIMG(GLenum, const GLfixed*); +#endif +#endif // not supported +typedef void (GL_APIENTRYP PFNGLCLIPPLANEFIMG)(GLenum p, const GLfloat* eqn); +typedef void (GL_APIENTRYP PFNGLCLIPPLANEXIMG)(GLenum p, const GLfixed* eqn); +#endif + +/* GL_IMG_texture_env_enhanced_fixed_function */ +#ifndef GL_IMG_texture_env_enhanced_fixed_function +#define GL_IMG_texture_env_enhanced_fixed_function 1 +#endif + +/*------------------------------------------------------------------------* + * NV extension functions + *------------------------------------------------------------------------*/ + +/* NV_fence */ +#ifndef GL_NV_fence +#define GL_NV_fence 1 +#if 0 // not supported +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glDeleteFencesNV(GLsizei, const GLuint*); +GL_API void GL_APIENTRY glGenFencesNV(GLsizei, GLuint*); +GL_API GLboolean GL_APIENTRY glIsFenceNV(GLuint); +GL_API GLboolean GL_APIENTRY glTestFenceNV(GLuint); +GL_API void GL_APIENTRY glGetFenceivNV(GLuint, GLenum, GLint*); +GL_API void GL_APIENTRY glFinishFenceNV(GLuint); +GL_API void GL_APIENTRY glSetFenceNV(GLuint, GLenum); +#endif +#endif // not supported +typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC)(GLsizei n, const GLuint* fences); +typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC)(GLsizei n, GLuint* fences); +typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC)(GLuint fence); +typedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC)(GLuint fence); +typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC)(GLuint fence, GLenum pname, GLint* params); +typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC)(GLuint fence); +typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC)(GLuint fence, GLenum condition); +#endif + +/*------------------------------------------------------------------------* + * QCOM extension functions + *------------------------------------------------------------------------*/ + +/* GL_QCOM_driver_control */ +#ifndef GL_QCOM_driver_control +#define GL_QCOM_driver_control 1 +#if 0 // not supported +#ifdef GL_GLEXT_PROTOTYPES +GL_API void GL_APIENTRY glGetDriverControlsQCOM(GLint* num, GLsizei size, GLuint* driverControls); +GL_API void GL_APIENTRY glGetDriverControlStringQCOM(GLuint driverControl, GLsizei bufSize, GLsizei* length, char* driverControlString); +GL_API void GL_APIENTRY glEnableDriverControlQCOM(GLuint driverControl); +GL_API void GL_APIENTRY glDisableDriverControlQCOM(GLuint driverControl); +#endif +#endif // not supported +typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC)(GLint* num, GLsizei size, GLuint* driverControls); +typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC)(GLuint driverControl, GLsizei bufSize, GLsizei* length, + char* driverControlString); +typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC)(GLuint driverControl); +typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC)(GLuint driverControl); +#endif + +/* GL_QCOM_perfmon_global_mode */ +#ifndef GL_QCOM_perfmon_global_mode +#define GL_QCOM_perfmon_global_mode 1 +#endif + +/*------------------------------------------------------------------------* + * Samsung extension functions + *------------------------------------------------------------------------*/ + +/* PName */ +#define GL_MAX_ELEMENTS_VERTICES 0x80E8 +#define GL_MAX_ELEMENTS_INDICES 0x80E9 + +/* PVRTC */ +#define GL_PVRTC2_OES 0x1911 +#define GL_PVRTC4_OES 0x1912 + +// +// For sync OpenGLES 2.0 */ +// +/* Separate Blend Functions */ +#define GL_BLEND_DST_RGB 0x80C8 +#define GL_BLEND_SRC_RGB 0x80C9 + +/* Vertex Arrays */ +#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 +#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 +#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 +#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 +#define GL_CURRENT_VERTEX_ATTRIB 0x8626 +#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 +#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A +#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F + +/* Shaders */ +#define GL_FRAGMENT_SHADER 0x8B30 +#define GL_VERTEX_SHADER 0x8B31 + +/* Framebuffer Object. */ +#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 + +/** Texture and Texture Environment as in ShaderInterface.doc **/ +// +// Texture environment modes +// +#define TEX_ENV_MODE_REPLACE 1 +#define TEX_ENV_MODE_MODULATE 2 +#define TEX_ENV_MODE_ADD 3 +#define TEX_ENV_MODE_DECAL 4 +#define TEX_ENV_MODE_BLEND 5 +#define TEX_ENV_MODE_COMBINE 6 +// +// Combine RGB +// +#define TEX_COMBINE_RGB_REPLACE 1 +#define TEX_COMBINE_RGB_MODULATE 2 +#define TEX_COMBINE_RGB_ADD 3 +#define TEX_COMBINE_RGB_ADD_SIGNED 4 +#define TEX_COMBINE_RGB_INTERPOLATE 5 +#define TEX_COMBINE_RGB_SUBTRACT 6 +#define TEX_COMBINE_RGB_DOT3_RGB 7 +#define TEX_COMBINE_RGB_DOT3_RGBA 8 + +// +// Combine Alpha +// +#define TEX_COMBINE_ALPHA_REPLACE 1 +#define TEX_COMBINE_ALPHA_MODULATE 2 +#define TEX_COMBINE_ALPHA_ADD 3 +#define TEX_COMBINE_ALPHA_ADD_SIGNED 4 +#define TEX_COMBINE_ALPHA_INTERPOLATE 5 +#define TEX_COMBINE_ALPHA_SUBTRACT 6 + + +// +// Combiner RGB and ALPHA source arguments +// +#define TEX_ENV_COMBINER_SRC_TEXTURE 1 +#define TEX_ENV_COMBINER_SRC_CONSTANT 2 +#define TEX_ENV_COMBINER_SRC_PRIMARY_COLOR 3 +#define TEX_ENV_COMBINER_SRC_PREVIOUS 4 + +// +// Combiner RGB operands +// +#define TEX_ENV_COMBINER_RGB_OP_SRC_COLOR 1 +#define TEX_ENV_COMBINER_RGB_OP_ONE_MINUS_SRC_COLOR 2 +#define TEX_ENV_COMBINER_RGB_OP_SRC_ALPHA 3 +#define TEX_ENV_COMBINER_RGB_OP_ONE_MINUS_SRC_ALPHA 4 + +// +// Combiner ALPHA operands +// +#define TEX_ENV_COMBINER_ALPHA_OP_SRC_ALPHA 1 +#define TEX_ENV_COMBINER_ALPHA_OP_ONE_MINUS_SRC_ALPHA 2 + +// +// Fog mode +// +#define FOGMODE_LINEAR 1 +#define FOGMODE_EXP 2 +#define FOGMODE_EXP2 3 + +#ifdef __cplusplus +} +#endif + +#endif /* __glext_h_ */ diff --git a/inc/glmacro.h b/inc/glmacro.h new file mode 100644 index 0000000..4ad41bc --- /dev/null +++ b/inc/glmacro.h @@ -0,0 +1,190 @@ +// +// 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. +// + +#ifndef _GL_MACRO_H_ +#define _GL_MACRO_H_ + +#define glAlphaFunc _GlAlphaFunc_1 +#define glClearColor _GlClearColor_1 +#define glClearDepthf _GlClearDepthf_1 +#define glClipPlanef _GlClipPlanef_1 +#define glColor4f _GlColor4f_1 +#define glDepthRangef _GlDepthRangef_1 +#define glFogf _GlFogf_1 +#define glFogfv _GlFogfv_1 +#define glFrustumf _GlFrustumf_1 +#define glGetClipPlanef _GlGetClipPlanef_1 +#define glGetFloatv _GlGetFloatv_1 +#define glGetLightfv _GlGetLightfv_1 +#define glGetMaterialfv _GlGetMaterialfv_1 +#define glGetTexEnvfv _GlGetTexEnvfv_1 +#define glGetTexParameterfv _GlGetTexParameterfv_1 +#define glLightModelf _GlLightModelf_1 +#define glLightModelfv _GlLightModelfv_1 +#define glLightf _GlLightf_1 +#define glLightfv _GlLightfv_1 +#define glLineWidth _GlLineWidth_1 +#define glLoadMatrixf _GlLoadMatrixf_1 +#define glMaterialf _GlMaterialf_1 +#define glMaterialfv _GlMaterialfv_1 +#define glMultMatrixf _GlMultMatrixf_1 +#define glMultiTexCoord4f _GlMultiTexCoord4f_1 +#define glNormal3f _GlNormal3f_1 +#define glOrthof _GlOrthof_1 +#define glPointParameterf _GlPointParameterf_1 +#define glPointParameterfv _GlPointParameterfv_1 +#define glPointSize _GlPointSize_1 +#define glPolygonOffset _GlPolygonOffset_1 +#define glRotatef _GlRotatef_1 +#define glScalef _GlScalef_1 +#define glTexEnvf _GlTexEnvf_1 +#define glTexEnvfv _GlTexEnvfv_1 +#define glTexParameterf _GlTexParameterf_1 +#define glTexParameterfv _GlTexParameterfv_1 +#define glTranslatef _GlTranslatef_1 +#define glActiveTexture _GlActiveTexture_1 +#define glAlphaFuncx _GlAlphaFuncx_1 +#define glBindBuffer _GlBindBuffer_1 +#define glBindTexture _GlBindTexture_1 +#define glBlendFunc _GlBlendFunc_1 +#define glBufferData _GlBufferData_1 +#define glBufferSubData _GlBufferSubData_1 +#define glClear _GlClear_1 +#define glClearColorx _GlClearColorx_1 +#define glClearDepthx _GlClearDepthx_1 +#define glClearStencil _GlClearStencil_1 +#define glClientActiveTexture _GlClientActiveTexture_1 +#define glClipPlanex _GlClipPlanex_1 +#define glColor4ub _GlColor4ub_1 +#define glColor4x _GlColor4x_1 +#define glColorMask _GlColorMask_1 +#define glColorPointer _GlColorPointer_1 +#define glCompressedTexImage2D _GlCompressedTexImage2D_1 +#define glCompressedTexSubImage2D _GlCompressedTexSubImage2D_1 +#define glCopyTexImage2D _GlCopyTexImage2D_1 +#define glCopyTexSubImage2D _GlCopyTexSubImage2D_1 +#define glCullFace _GlCullFace_1 +#define glDeleteBuffers _GlDeleteBuffers_1 +#define glDeleteTextures _GlDeleteTextures_1 +#define glDepthFunc _GlDepthFunc_1 +#define glDepthMask _GlDepthMask_1 +#define glDepthRangex _GlDepthRangex_1 +#define glDisable _GlDisable_1 +#define glDisableClientState _GlDisableClientState_1 +#define glDrawArrays _GlDrawArrays_1 +#define glDrawElements _GlDrawElements_1 +#define glEnable _GlEnable_1 +#define glEnableClientState _GlEnableClientState_1 +#define glFinish _GlFinish_1 +#define glFlush _GlFlush_1 +#define glFogx _GlFogx_1 +#define glFogxv _GlFogxv_1 +#define glFrontFace _GlFrontFace_1 +#define glFrustumx _GlFrustumx_1 +#define glGetBooleanv _GlGetBooleanv_1 +#define glGetBufferParameteriv _GlGetBufferParameteriv_1 +#define glGetClipPlanex _GlGetClipPlanex_1 +#define glGenBuffers _GlGenBuffers_1 +#define glGenTextures _GlGenTextures_1 +#define glGetError _GlGetError_1 +#define glGetFixedv _GlGetFixedv_1 +#define glGetIntegerv _GlGetIntegerv_1 +#define glGetLightxv _GlGetLightxv_1 +#define glGetMaterialxv _GlGetMaterialxv_1 +#define glGetPointerv _GlGetPointerv_1 +#define glGetString _GlGetString_1 +#define glGetTexEnviv _GlGetTexEnviv_1 +#define glGetTexEnvxv _GlGetTexEnvxv_1 +#define glGetTexParameteriv _GlGetTexParameteriv_1 +#define glGetTexParameterxv _GlGetTexParameterxv_1 +#define glHint _GlHint_1 +#define glIsBuffer _GlIsBuffer_1 +#define glIsEnabled _GlIsEnabled_1 +#define glIsTexture _GlIsTexture_1 +#define glLightModelx _GlLightModelx_1 +#define glLightModelxv _GlLightModelxv_1 +#define glLightx _GlLightx_1 +#define glLightxv _GlLightxv_1 +#define glLineWidthx _GlLineWidthx_1 +#define glLoadIdentity _GlLoadIdentity_1 +#define glLoadMatrixx _GlLoadMatrixx_1 +#define glLogicOp _GlLogicOp_1 +#define glMaterialx _GlMaterialx_1 +#define glMaterialxv _GlMaterialxv_1 +#define glMatrixMode _GlMatrixMode_1 +#define glMultMatrixx _GlMultMatrixx_1 +#define glMultiTexCoord4x _GlMultiTexCoord4x_1 +#define glNormal3x _GlNormal3x_1 +#define glNormalPointer _GlNormalPointer_1 +#define glOrthox _GlOrthox_1 +#define glPixelStorei _GlPixelStorei_1 +#define glPointParameterx _GlPointParameterx_1 +#define glPointParameterxv _GlPointParameterxv_1 +#define glPointSizex _GlPointSizex_1 +#define glPolygonOffsetx _GlPolygonOffsetx_1 +#define glPopMatrix _GlPopMatrix_1 +#define glPushMatrix _GlPushMatrix_1 +#define glReadPixels _GlReadPixels_1 +#define glRotatex _GlRotatex_1 +#define glSampleCoverage _GlSampleCoverage_1 +#define glSampleCoveragex _GlSampleCoveragex_1 +#define glScalex _GlScalex_1 +#define glScissor _GlScissor_1 +#define glShadeModel _GlShadeModel_1 +#define glStencilFunc _GlStencilFunc_1 +#define glStencilMask _GlStencilMask_1 +#define glStencilOp _GlStencilOp_1 +#define glTexCoordPointer _GlTexCoordPointer_1 +#define glTexEnvi _GlTexEnvi_1 +#define glTexEnvx _GlTexEnvx_1 +#define glTexEnviv _GlTexEnviv_1 +#define glTexEnvxv _GlTexEnvxv_1 +#define glTexImage2D _GlTexImage2D_1 +#define glTexParameteri _GlTexParameteri_1 +#define glTexParameterx _GlTexParameterx_1 +#define glTexParameteriv _GlTexParameteriv_1 +#define glTexParameterxv _GlTexParameterxv_1 +#define glTexSubImage2D _GlTexSubImage2D_1 +#define glTranslatex _GlTranslatex_1 +#define glVertexPointer _GlVertexPointer_1 +#define glViewport _GlViewport_1 +#define glPointSizePointerOES _GlPointSizePointerOES_1 +#define glCurrentPaletteMatrixOES _GlCurrentPaletteMatrixOES_1 +#define glLoadPaletteFromModelViewMatrixOES _GlLoadPaletteFromModelViewMatrixOES_1 +#define glMatrixIndexPointerOES _GlMatrixIndexPointerOES_1 +#define glWeightPointerOES _GlWeightPointerOES_1 + +//Start of FBO Functions +#define glIsRenderbufferOES _GlIsRenderbufferOES_1 +#define glBindRenderbufferOES _GlBindRenderbufferOES_1 +#define glDeleteRenderbuffersOES _GlDeleteRenderbuffersOES_1 +#define glGenRenderbuffersOES _GlGenRenderbuffersOES_1 +#define glRenderbufferStorageOES _GlRenderbufferStorageOES_1 +#define glGetRenderbufferParameterivOES _GlGetRenderbufferParameterivOES_1 +#define glIsFramebufferOES _GlIsFramebufferOES_1 +#define glBindFramebufferOES _GlBindFramebufferOES_1 +#define glDeleteFramebuffersOES _GlDeleteFramebuffersOES_1 +#define glGenFramebuffersOES _GlGenFramebuffersOES_1 +#define glCheckFramebufferStatusOES _GlCheckFramebufferStatusOES_1 +#define glFramebufferRenderbufferOES _GlFramebufferRenderbufferOES_1 +#define glFramebufferTexture2DOES _GlFramebufferTexture2DOES_1 +#define glGetFramebufferAttachmentParameterivOES _GlGetFramebufferAttachmentParameterivOES_1 +#define glGenerateMipmapOES _GlGenerateMipmapOES_1 +//End of FBO Functions + + +#endif // _GL_MACRO_H_ diff --git a/inc/glplatform.h b/inc/glplatform.h new file mode 100644 index 0000000..eef2e5b --- /dev/null +++ b/inc/glplatform.h @@ -0,0 +1,27 @@ +#ifndef __glplatform_h_ +#define __glplatform_h_ + +/* + * This document is licensed under the SGI Free Software B License Version + * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . + */ + +/* Platform-specific types and definitions for OpenGL ES 1.X gl.h + * Last modified on 2008/12/19 + * + * Adopters may modify khrplatform.h and this file to suit their platform. + * You are encouraged to submit all modifications to the Khronos group so that + * they can be included in future versions of this file. Please submit changes + * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla) + * by filing a bug against product "OpenGL-ES" component "Registry". + */ + +#include "khrplatform.h" + +#ifndef GL_API +#define GL_API KHRONOS_APICALL +#endif + +#define GL_APIENTRY //KHRONOS_APIENTRY + +#endif /* __glplatform_h_ */ diff --git a/inc/khrplatform.h b/inc/khrplatform.h new file mode 100644 index 0000000..5b7360e --- /dev/null +++ b/inc/khrplatform.h @@ -0,0 +1,561 @@ +/* $Change: 1028567 $ */ +#ifndef __khrplatform_h_ +#define __khrplatform_h_ + +/* +** Copyright (c) 2008-2009 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and/or associated documentation files (the +** "Materials"), to deal in the Materials without restriction, including +** without limitation the rights to use, copy, modify, merge, publish, +** distribute, sublicense, and/or sell copies of the Materials, and to +** permit persons to whom the Materials are furnished to do so, subject to +** the following conditions: +** +** The above copyright notice and this permission notice shall be included +** in all copies or substantial portions of the Materials. +** +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +*/ + +/* Khronos platform-specific types and definitions. + * + * $Revision: #1 $ on $Date: 2011/08/12 $ + * + * Adopters may modify this file to suit their platform. Adopters are + * encouraged to submit platform specific modifications to the Khronos + * group so that they can be included in future versions of this file. + * Please submit changes by sending them to the public Khronos Bugzilla + * (http://khronos.org/bugzilla) by filing a bug against product + * "Khronos (general)" component "Registry". + * + * A predefined template which fills in some of the bug fields can be + * reached using http://tinyurl.com/khrplatform-h-bugreport, but you + * must create a Bugzilla login first. + * + * + * See the Implementer's Guidelines for information about where this file + * must be located on your system and for more details of its use: + * http://www.khronos.org/registry/implementers_guide.pdf + * + * This file must be included as + * #include + * by Khronos client API header files that use its types and defines. + * + * The types in khrplatform.h must only be used to define API-specific types. + * + * Types defined in khrplatform.h: + * khronos_int8_t signed 8 bit + * khronos_uint8_t unsigned 8 bit + * khronos_int16_t signed 16 bit + * khronos_uint16_t unsigned 16 bit + * khronos_int32_t signed 32 bit + * khronos_uint32_t unsigned 32 bit + * khronos_int64_t signed 64 bit + * khronos_uint64_t unsigned 64 bit + * khronos_intptr_t signed same number of bits as a pointer + * khronos_uintptr_t unsigned same number of bits as a pointer + * khronos_ssize_t signed size + * khronos_usize_t unsigned size + * khronos_float_t signed 32 bit floating point + * khronos_time_ns_t unsigned 64 bit time in nanoseconds + * khronos_utime_nanoseconds_t unsigned time interval or absolute time in + * nanoseconds + * khronos_stime_nanoseconds_t signed time interval in nanoseconds + * khronos_boolean_enum_t enumerated boolean type. This must + * only be used as a base type when a client API's boolean type is + * an enum. Client APIs which use an integer or other type for + * booleans cannot use this as the base type for their boolean. + * + * Tokens defined in khrplatform.h: + * + * KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values. + * + * KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0. + * KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0. + * + * Calling convention macros defined in this file: + * KHRONOS_APICALL + * KHRONOS_APIENTRY + * KHRONOS_APIATTRIBUTES + * + * These may be used in function prototypes as: + * + * KHRONOS_APICALL void KHRONOS_APIENTRY funcname( + * int arg1, + * int arg2) KHRONOS_APIATTRIBUTES; + */ + +/** + * @addtogroup opengles + * + * @{ + */ + +/*------------------------------------------------------------------------- + * Definition of KHRONOS_APICALL + *------------------------------------------------------------------------- + * This precedes the return type of the function in the function prototype. + */ +#if defined(_WIN32) +#ifdef __KHRONOS_EXPORTS +#define KHRONOS_APICALL __declspec(dllexport) +#else +#define KHRONOS_APICALL __declspec(dllimport) +#endif +//#define KHRONOS_APICALL extern +#elif defined(__SYMBIAN32__) +#define KHRONOS_APICALL IMPORT_C +#else +#define KHRONOS_APICALL extern +#endif + +/*------------------------------------------------------------------------- + * Definition of KHRONOS_APIENTRY + *------------------------------------------------------------------------- + * This follows the return type of the function and precedes the function + * name in the function prototype. + */ +#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__) +/* Win32 but not WinCE */ +#define KHRONOS_APIENTRY __stdcall +#else +#define KHRONOS_APIENTRY +#endif + +/*------------------------------------------------------------------------- + * Definition of KHRONOS_APIATTRIBUTES + *------------------------------------------------------------------------- + * This follows the closing parenthesis of the function prototype arguments. + */ +#if defined(__ARMCC_2__) +#define KHRONOS_APIATTRIBUTES __softfp +#else +#define KHRONOS_APIATTRIBUTES +#endif + +/*------------------------------------------------------------------------- + * basic type definitions + *-----------------------------------------------------------------------*/ +#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__) + + +// +// This method is for internal use only. +// Using this method can cause behavioral, security-related, and consistency-related issues in the application. +// +// Using +// @since 2.0 +// +#include +typedef int32_t khronos_int32_t; +typedef uint32_t khronos_uint32_t; +typedef int64_t khronos_int64_t; +typedef uint64_t khronos_uint64_t; +#define KHRONOS_SUPPORT_INT64 1 +#define KHRONOS_SUPPORT_FLOAT 1 + +#elif defined(__VMS) || defined(__sgi) + +// +// This method is for internal use only. +// Using this method can cause behavioral, security-related, and consistency-related issues in the application. +// +// Using +// @since 2.0 +// +#include +typedef int32_t khronos_int32_t; +typedef uint32_t khronos_uint32_t; +typedef int64_t khronos_int64_t; +typedef uint64_t khronos_uint64_t; +#define KHRONOS_SUPPORT_INT64 1 +#define KHRONOS_SUPPORT_FLOAT 1 + +#elif defined(_WIN32) && !defined(__SCITECH_SNAP__) + +// +// This method is for internal use only. +// Using this method can cause behavioral, security-related, and consistency-related issues in the application. +// +// Win32 +// @since 2.0 +// +typedef __int32 khronos_int32_t; +typedef unsigned __int32 khronos_uint32_t; +typedef __int64 khronos_int64_t; +typedef unsigned __int64 khronos_uint64_t; +#define KHRONOS_SUPPORT_INT64 1 +#define KHRONOS_SUPPORT_FLOAT 1 + +#elif defined(__sun__) || defined(__digital__) + +// +// This method is for internal use only. +// Using this method can cause behavioral, security-related, and consistency-related issues in the application. +// +// Sun or Digital +// @since 2.0 +// +typedef int khronos_int32_t; +typedef unsigned int khronos_uint32_t; +#if defined(__arch64__) || defined(_LP64) +typedef long int khronos_int64_t; +typedef unsigned long int khronos_uint64_t; +#else +typedef long long int khronos_int64_t; +typedef unsigned long long int khronos_uint64_t; +#endif /* __arch64__ */ +#define KHRONOS_SUPPORT_INT64 1 +#define KHRONOS_SUPPORT_FLOAT 1 + +#elif 0 + +/* + * Hypothetical platform with no float or int64 support + */ +typedef int khronos_int32_t; +typedef unsigned int khronos_uint32_t; +#define KHRONOS_SUPPORT_INT64 0 +#define KHRONOS_SUPPORT_FLOAT 0 + +#else + +// +// This method is for internal use only. +// Using this method can cause behavioral, security-related, and consistency-related issues in the application. +// +// Generic fallback +// @since 2.0 +// +#include +typedef int32_t khronos_int32_t; +typedef uint32_t khronos_uint32_t; +typedef int64_t khronos_int64_t; +typedef uint64_t khronos_uint64_t; +#define KHRONOS_SUPPORT_INT64 1 +#define KHRONOS_SUPPORT_FLOAT 1 + +#endif + + +/* + * Types that are (so far) the same on all platforms + */ +// +// 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 khronos_int8_t +// \brief A type definition for khronos_int8_t. +// @since 2.0 +// +typedef signed char khronos_int8_t; + +// +// 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 khronos_uint8_t +// \brief A type definition for khronos_uint8_t. +// @since 2.0 +// +typedef unsigned char khronos_uint8_t; + +// +// 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 short int khronos_int16_t +// \brief A type definition for khronos_int16_t. +// @since 2.0 +// +typedef signed short int khronos_int16_t; + +// +// 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 int khronos_uint16_t +// \brief A type definition for khronos_uint16_t. +// @since 2.0 +// +typedef unsigned short int khronos_uint16_t; + +// +// 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 long int khronos_intptr_t +// \brief A type definition for khronos_intptr_t. +// @since 2.0 +// +typedef signed long int khronos_intptr_t; + +// +// 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 long int khronos_uintptr_t +// \brief A type definition for khronos_uintptr_t. +// @since 2.0 +// +typedef unsigned long int khronos_uintptr_t; + +// +// 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 long int khronos_ssize_t +// \brief A type definition for khronos_ssize_t. +// @since 2.0 +// +typedef signed long int khronos_ssize_t; + +// +// 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 long int khronos_usize_t +// \brief A type definition for khronos_usize_t. +// @since 2.0 +// +typedef unsigned long int khronos_usize_t; + +#if KHRONOS_SUPPORT_FLOAT +// +// This method is for internal use only. +// Using this method can cause behavioral, security-related, and consistency-related issues in the application. +// +// Float type +// @since 2.0 +// +typedef float khronos_float_t; +#endif + +#if KHRONOS_SUPPORT_INT64 +// +// This method is for internal use only. +// Using this method can cause behavioral, security-related, and consistency-related issues in the application. +// +// Time types +// +// These types can be used to represent a time interval in nanoseconds or +// an absolute Unadjusted System Time. The Unadjusted System Time is the number +// of nanoseconds since some arbitrary system event (for example, since the last +// time the system booted). It is an unsigned 64-bit value that wraps back to 0 after every 584 years. +// The time intervals can be either signed or unsigned. +// @since 2.0 +// +typedef khronos_uint64_t khronos_utime_nanoseconds_t; +typedef khronos_int64_t khronos_stime_nanoseconds_t; +#endif + +// +// This method is for internal use only. +// Using this method can cause behavioral, security-related, and consistency-related issues in the application. +// +// Dummy value used to pad enum types to 32 bits. +// @since 2.0 +// +#ifndef KHRONOS_MAX_ENUM +#define KHRONOS_MAX_ENUM 0x7FFFFFFF +#endif + +// +// This method is for internal use only. +// Using this method can cause behavioral, security-related, and consistency-related issues in the application. +// +// Enumerated boolean type +// +// Values other than zero must be considered to be true. Therefore +// comparisons must not be made against KHRONOS_TRUE. +// @since 2.0 +// +typedef enum +{ + KHRONOS_FALSE = 0, + KHRONOS_TRUE = 1, + KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM +} khronos_boolean_enum_t; + + + +/*------------------------------------------------------------------------- + * Data type definitions for GL APIs + *-----------------------------------------------------------------------*/ + +// +// Using this method can cause behavioral, security-related, and consistency-related issues in the application. +// +/** +* A type definition for GLvoid +* @since 2.0 +*/ +typedef void GLvoid; + +// +// Using this method can cause behavioral, security-related, and consistency-related issues in the application. +// +/** +* A type definition for GLchar +* @since 2.0 +*/ +typedef char GLchar; + +// +// Using this method can cause behavioral, security-related, and consistency-related issues in the application. +// +/** +* A type definition for GLenum +* @since 2.0 +*/ +typedef unsigned int GLenum; + +// +// Using this method can cause behavioral, security-related, and consistency-related issues in the application. +// +/** +* A type definition for GLboolean +* @since 2.0 +*/ +typedef unsigned char GLboolean; + +// +// Using this method can cause behavioral, security-related, and consistency-related issues in the application. +// +/** +* A type definition for GLbitfield +* @since 2.0 +*/ +typedef unsigned int GLbitfield; + +// +// Using this method can cause behavioral, security-related, and consistency-related issues in the application. +// +/** +* A type definition for GLbyte +* @since 2.0 +*/ +typedef khronos_int8_t GLbyte; + +// +// Using this method can cause behavioral, security-related, and consistency-related issues in the application. +// +/** +* A type definition for GLshort +* @since 2.0 +*/ +typedef short GLshort; + +// +// Using this method can cause behavioral, security-related, and consistency-related issues in the application. +// +/** +* A type definition for GLint +* @since 2.0 +*/ +typedef int GLint; + +// +// Using this method can cause behavioral, security-related, and consistency-related issues in the application. +// +/** +* A type definition for GLsizei +* @since 2.0 +*/ +typedef int GLsizei; + +// +// Using this method can cause behavioral, security-related, and consistency-related issues in the application. +// +/** +* A type definition for GLubyte +* @since 2.0 +*/ +typedef khronos_uint8_t GLubyte; + +// +// Using this method can cause behavioral, security-related, and consistency-related issues in the application. +// +/** +* A type definition for GLushort +* @since 2.0 +*/ +typedef unsigned short GLushort; + +// +// Using this method can cause behavioral, security-related, and consistency-related issues in the application. +// +/** +* A type definition for GLuint +* @since 2.0 +*/ +typedef unsigned int GLuint; + +// +// Using this method can cause behavioral, security-related, and consistency-related issues in the application. +// +/** +* A type definition for GLfloat +* @since 2.0 +*/ +typedef khronos_float_t GLfloat; + +// +// Using this method can cause behavioral, security-related, and consistency-related issues in the application. +// +/** +* A type definition for GLclampf +* @since 2.0 +*/ +typedef khronos_float_t GLclampf; + +// +// Using this method can cause behavioral, security-related, and consistency-related issues in the application. +// +/** +* A type definition for GLfixed +* @since 2.0 +*/ +typedef khronos_int32_t GLfixed; + +// +// Using this method can cause behavioral, security-related, and consistency-related issues in the application. +// +/** +* A type definition for GLclampx +* @since 2.0 +*/ +typedef khronos_int32_t GLclampx; + +// +// Using this method can cause behavioral, security-related, and consistency-related issues in the application. +// +/** +* A type definition for GLintptr +* @since 2.0 +*/ +typedef khronos_intptr_t GLintptr; + +// +// Using this method can cause behavioral, security-related, and consistency-related issues in the application. +// +/** +* A type definition for GLsizeiptr +* @since 2.0 +*/ +typedef khronos_ssize_t GLsizeiptr; + +/** + * @} + */ + +#endif /* __khrplatform_h_ */ diff --git a/osp-uifw.manifest b/osp-uifw.manifest new file mode 100644 index 0000000..b8caeaf --- /dev/null +++ b/osp-uifw.manifest @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/osp-uifw.pc.in b/osp-uifw.pc.in new file mode 100644 index 0000000..3d49fbc --- /dev/null +++ b/osp-uifw.pc.in @@ -0,0 +1,13 @@ +# Package Information for pkg-config + +prefix=@PREFIX@ +exec_prefix=/usr +libdir=/usr/lib/osp +includedir=/usr/include/osp + +Name: @PC_NAME@ +Description: @PACKAGE_DESCRIPTION@ +Version: @VERSION@ +Requires: @PC_REQUIRED@ +Libs: -L${libdir} @PC_LDFLAGS@ +Cflags: -I${includedir} \ No newline at end of file diff --git a/packaging/osp-uifw.spec b/packaging/osp-uifw.spec new file mode 100644 index 0000000..f67a64a --- /dev/null +++ b/packaging/osp-uifw.spec @@ -0,0 +1,160 @@ +%define debug_package %{nil} +%define __strip /bin/true + +Name: osp-uifw +Summary: The UI Framework library of OSP +Version: 1.2.2.1 +Release: 62 +Group: TO_BE/FILLED_IN +License: Apache-2.0, Flora-1.1 +Source0: %{name}-%{version}.tar.gz +BuildRequires: cmake +BuildRequires: pkgconfig(capi-appfw-application) +BuildRequires: pkgconfig(capi-system-info) +BuildRequires: pkgconfig(capi-system-device) +BuildRequires: pkgconfig(capi-system-runtime-info) +BuildRequires: pkgconfig(bundle) +BuildRequires: pkgconfig(appcore-common) +BuildRequires: pkgconfig(appcore-efl) +BuildRequires: pkgconfig(sensor) +BuildRequires: pkgconfig(appsvc) +BuildRequires: pkgconfig(cairo) +BuildRequires: pkgconfig(chromium) +BuildRequires: pkgconfig(dlog) +BuildRequires: pkgconfig(dbus-1) +BuildRequires: pkgconfig(edbus) +BuildRequires: pkgconfig(elementary) +BuildRequires: pkgconfig(evas) +BuildRequires: pkgconfig(ecore) +BuildRequires: pkgconfig(ethumb) +BuildRequires: pkgconfig(ewebkit2) +BuildRequires: pkgconfig(xdamage) +BuildRequires: pkgconfig(gles20) +BuildRequires: pkgconfig(fribidi) +BuildRequires: pkgconfig(freetype2) +BuildRequires: pkgconfig(glib-2.0) +BuildRequires: pkgconfig(harfbuzz) +BuildRequires: pkgconfig(icu-i18n) +BuildRequires: pkgconfig(libdri2) +BuildRequires: pkgconfig(libdrm) +BuildRequires: pkgconfig(libtbm) +BuildRequires: pkgconfig(libpng) +BuildRequires: pkgconfig(libwbxml2) +BuildRequires: pkgconfig(osp-appfw) +BuildRequires: osp-appfw-internal-devel +BuildRequires: pkgconfig(osp-image-core) +BuildRequires: osp-image-core-internal-devel +BuildRequires: pkgconfig(pango) +BuildRequires: pkgconfig(pixman-1) +BuildRequires: pkgconfig(pkgmgr) +BuildRequires: pkgconfig(tts) +BuildRequires: pkgconfig(utilX) +BuildRequires: pkgconfig(xfixes) +BuildRequires: pkgconfig(xv) +BuildRequires: pkgconfig(xtst) +BuildRequires: pkgconfig(vconf) +BuildRequires: libexif-devel +BuildRequires: liblua-devel +BuildRequires: libtiff-devel +BuildRequires: tolua++-devel +BuildRequires: pkgconfig(feedback) + +# runtime requires +Requires: capi-appfw-application +Requires: capi-system-info +Requires: osp-appfw +Requires: osp-image-core +Provides: libosp-uifw.so.1 + +Requires(post): /sbin/ldconfig +Requires(postun): /sbin/ldconfig + +%description +The UI Framework library of OSP + +%package devel +Summary: The UI Framework library of OSP (Development) +Group: TO_BE/FILLED_IN +Requires: %{name} = %{version}-%{release} + +%description devel +The UI Framework library of OSP (DEV) + +%package internal-devel +Summary: osp ui framework internel (Internal) +Group: TO_BE/FILLED_IN +Requires: %{name} = %{version}-%{release} + +%description internal-devel +The UI Framework library of OSP (Internal-DEV) + +%package debug +Summary: The UI Framework library of OSP (Development) +Group: TO_BE/FILLED_IN +Requires: %{name} = %{version}-%{release} + +%description debug +The UI Framework library of OSP (DEV) + +%prep +%setup -q + +%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} +%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 +%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 +make %{?jobs:-j%jobs} + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/usr/share/license +cp %{_builddir}/%{name}-%{version}/LICENSE.APLv2 %{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 +install -m 0644 clipboard.service %{buildroot}%{_prefix}/lib/systemd/system/clipboard.service +ln -s ../clipboard.service %{buildroot}%{_prefix}/lib/systemd/system/multi-user.target.wants/clipboard.service +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%files +/usr/lib/systemd/system/clipboard.service +/usr/lib/systemd/system/multi-user.target.wants/clipboard.service +%manifest osp-uifw.manifest +/etc/config/screen/sysinfo-screen.xml +/etc/config/touch/sysinfo-touch.xml +/usr/share/license/%{name} +/usr/share/osp/bitmaps/* +/usr/share/osp/effects/* +%{_libdir}/osp/libosp-uifw.so* + +%files devel +%{_includedir}/osp/*.h +%{_libdir}/pkgconfig/osp-uifw.pc + +%files internal-devel +%{_includedir}/osp/app/*.h +%{_includedir}/osp/graphics/*.h +%{_includedir}/osp/ui/*.h + +%files debug +%{_libdir}/osp/debug/*.so* + diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_arrow_left.png b/res/common/usr/share/osp/bitmaps/480x800/00_arrow_left.png new file mode 100644 index 0000000000000000000000000000000000000000..e9ab8d8aef2e89fb79558c23031510e3c7d7b04f GIT binary patch literal 3040 zcmV<63m^1}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>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W|m*f{` zOGXpnEW1!n1dQ->=Gku_A^g)RODY3wWfGH5fgeQF<2cCIS^ME;~ z2$(gLH~0lJFfg9>ba4!+xbdCT->Z3V*(2OFL}?v+ft z4!cZ06tOb2lIhCQ#Dxt%-&zEPyfX3AQ)5=Ijl4DIf6ScEcR4jx3ug!@6{=X&v>i!r zx+reCV%ae%5miJdi!%$q$W8w_EJ14JO%c&`{J$Tv)r2L%EV|8qXpjyDjH~4tZ>IIHIAY zcxj(;i>cARJq*|FZmd%9)tq0R#`~P5nzK*q%)<5ur=+HD?KC_WEW9DQu&JK)>{XlP zpJwPLsmr-&-ZspBS~oSe|9H}M*NEGTH}rLHsO>*AYnznUzh4|IwU4AKgubz|Cf+;y z|M|5IA@hp+rJm_k=R69$QL=W!m7i0#Ep$(Gp5DQ0!?nBIcG5C6#^_{oT-3x28KYpLOamNOi!_vD<_8fI{E1YL->Kb=EWcN0~gU%BL8z0EE8JxYf x;##WzTc5p0|95QUc^A|im;bx=tMVVg1cs|Y*2;a;Utb3mm!7VEF6*2UngFvi22}t6 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_button_01.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_button_01.#.png new file mode 100644 index 0000000000000000000000000000000000000000..92d9c1b2afb2cbec17c3922ed9c4e62ccc607924 GIT binary patch literal 1170 zcmbVMZ)n_P7|-Y*=ip#=b>i4qNWUoVE_st&nq+rvb4hB?dEIe6=!pnRllR)tCU2I! z-Ce7Nc8W0B27-PN${fhhVeyM@Q^pvZeyAdop&w+(P_)po%I0ui`eECf_OAM&?88Em z_fMYR@Ao{<`#d>T9DF&kZPzx6q7wN5qeR9|^6c8$PTm*Zertvd&ttQKhfo#QtPoO~ zgGL~o_pDJ^f|fIN_z+nuAgP@ zT)fQCu9Ibk(*>>&=y1#(m=594^kCVZ9=8>T>FuF2b(Ii!5Le^Bmw=j@(ibh-z9=`EI&#F+?qN zs%pvTZ)lNKmKno1P+7KCtEFl}3WcLAP!uKR;Q1u6NJdjWw(3bg>S{6=FtS58z%KIX zn9&+RlQ_!|PuD~6f)PB)FToa54(%;hAefpwlFXDo4sjf>-d#nRj&6&O!9N}nt?ng{x% zV?xpzE7v|PlD4{$6R5?8tHttjzv=Jb{ua~-GWJ3C*YN^KwXwcKt0^2o~K z<@vkWOV>|z-pZW+WO?V!H(%?R{q3DI56&&OUYD-z&+Wc_?B>s}FReZ|bLOdk?w#m< zy02%?%mMUJUif?Kskxc9eHYoeTFdWU)Elci_n#ehzW(<>-|@e`t0aD%O?=kIoZR#0 zj-Ev2{Xa^r^NCq~!E8PL?6;FYK2v=6m-p@u>|H)_uZ&hZ(DKrb>PzA`3nz<*epq4_ eKmVwAOFMO^w>>I<_0wYfm&lug#uvFmM;`$~{DY|g literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_button_01_bg.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_button_01_bg.#.png new file mode 100644 index 0000000000000000000000000000000000000000..92d9c1b2afb2cbec17c3922ed9c4e62ccc607924 GIT binary patch literal 1170 zcmbVMZ)n_P7|-Y*=ip#=b>i4qNWUoVE_st&nq+rvb4hB?dEIe6=!pnRllR)tCU2I! z-Ce7Nc8W0B27-PN${fhhVeyM@Q^pvZeyAdop&w+(P_)po%I0ui`eECf_OAM&?88Em z_fMYR@Ao{<`#d>T9DF&kZPzx6q7wN5qeR9|^6c8$PTm*Zertvd&ttQKhfo#QtPoO~ zgGL~o_pDJ^f|fIN_z+nuAgP@ zT)fQCu9Ibk(*>>&=y1#(m=594^kCVZ9=8>T>FuF2b(Ii!5Le^Bmw=j@(ibh-z9=`EI&#F+?qN zs%pvTZ)lNKmKno1P+7KCtEFl}3WcLAP!uKR;Q1u6NJdjWw(3bg>S{6=FtS58z%KIX zn9&+RlQ_!|PuD~6f)PB)FToa54(%;hAefpwlFXDo4sjf>-d#nRj&6&O!9N}nt?ng{x% zV?xpzE7v|PlD4{$6R5?8tHttjzv=Jb{ua~-GWJ3C*YN^KwXwcKt0^2o~K z<@vkWOV>|z-pZW+WO?V!H(%?R{q3DI56&&OUYD-z&+Wc_?B>s}FReZ|bLOdk?w#m< zy02%?%mMUJUif?Kskxc9eHYoeTFdWU)Elci_n#ehzW(<>-|@e`t0aD%O?=kIoZR#0 zj-Ev2{Xa^r^NCq~!E8PL?6;FYK2v=6m-p@u>|H)_uZ&hZ(DKrb>PzA`3nz<*epq4_ eKmVwAOFMO^w>>I<_0wYfm&lug#uvFmM;`$~{DY|g literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_button_01_focus.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_button_01_focus.#.png new file mode 100644 index 0000000000000000000000000000000000000000..8f7fdaa0c5ee800af5acb4257a7c1cf1e9bb14b6 GIT binary patch literal 1236 zcmbVMZD`zN98X=HUAJmCx~X;6n6hbQcX_!>nq)mo?vm>cdTn=i&{GkbCQo~zmlu<# zySvg8yOyaRMEo#8MrF`3!3`-`@ohu553;%!-#~f;8Pk54Fg=-HL_~bj-c>)8eJ~_> zUh@0>{x8q}pI3(l`dXUXn=uS)NgR?>Xlz4Id(&3*{&04>jE0Ayl7(q|3>H)uV3KZ+ z0z6@=;~)i8z4XE|=)tfpV@4(mv&nu@v(2FDV}eD~L2L}`=`A{{HUS_$3dRj9LR3Hf zjKB>&LJYG>D(S>P&NwvXg7nltMw^<@1fA%88t*BJNWcV8#fxU%^2B0Xd36ZART5ojy`}h6wQzny14)y7FkYYy7AgYAZxBZ zCZ^X3AhB2CkeYYpwe6!_PTP0?Pa^Rlf?n!thyIYOW>LEX?rnwG*0C53n++9hJz5#K#u1>$UE9Rh@+%sf z*cZB$kR*hKFfB8F+>#KDDKg7PDOTdCC`Z(|`v1upiJT$*;`mRo)VELt`qPclM~jW- z0T${Q7q!MRAk!Gu(3p^=O!4~d;|F&grCN^_W{zF#`>E^P%))C6eP5?@iRzojW_g>BBcy zmIkjMG(Lt8yk!+{-7{RhcQ?Dg+*;WGD}N_(>YZ%-_E&q~t+Zc=FYa90y}C;Ny|3~t zaqd!ii1=c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxSU1_g&``n5OwZ87 z)XdCKN5ROz&`93^h|F{iO{`4Ktc=VRpg;*|TTx1yRgjAt)Gi>;Rw<*Tq`*pFzr4I$ zuiRKKzbIYb(9+TpWQLKEE>MMTab;dfVufyAu`kBtHuNWFoz#!AFNG#Ad)HBe}%?0@jth%@)C>7xhtg4GcDhpEegHnt0 zON)|$@sXws(+mtd{1$-}0$pR}Uz7=ql*AmD{N&Qy)VvZ;7h5Huj9yA+ij{$dv74c> znX$2vrGcxFp`nGVrG=x3o1>wllaZmLnI+5&YHGxhOTUB)=#mKR*YS0s=DfOY(~| z@(UE4gUu8)!ZY(y^2>`gLD2*8txIZAW?5>ATTyO0Qv}Q!+#R20GcYi6dAc};RNQ(q z&6lg$K%jN9UetHiy-woaq+0*oIW|>W|B>Gd%R4usIcys}-maTc;=?r6qSMoHiNHg} znctt)zHnO7W4P(aRweFOxi<&pY>a12VmrcC)#w-2J4Gh7ZpZzeqQBF#RSpHE{9-to z@o%^I={c{KygCvRq;T0<Ns%+r7*U8v7gWbxc;?Y*#+-)fQ&%ilmu7IYHkN z7|*KCAtXEHMc~;ymSH7X)y~A3Yt$*I!_$VE5fPaDd{{I{N k|Hdz4ul{hq*`A4qL2SCZb<4Y`7ogI{)78&qol`;+0LQ+o_W%F@ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_button_expand_opened.png b/res/common/usr/share/osp/bitmaps/480x800/00_button_expand_opened.png new file mode 100644 index 0000000000000000000000000000000000000000..550d18c6bd2bd642376458fa364d5ac04b4d54d8 GIT binary patch literal 1215 zcmeAS@N?(olHy`uVBq!ia0vp^av;pX1|+Qw)-3{3k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxSU1_g&``n5OwZ87 z)XdCKN5ROz&`93^h|F{iO{`4Ktc=VRpg;*|TTx1yRgjAt)Gi>;Rw<*Tq`*pFzr4I$ zuiRKKzbIYb(9+TpWQLKEE>MMTab;dfVufyAu`kBtHuNWFoz#!AFNG#Ad)HBe}%?0@jth%@)C>7xhtg4GcDhpEegHnt0 zON)|$@sXws(+mtd{1$-}0$pR}Uz7=ql*AmD{N&Qy)VvZ;7h5Huj9yA+ij{$dv74c> znX$2vrGcxFp`nGVrG=x3o1>wllaZmLnI+5&YKL?fq0y6ST@{2R_ z3lyA#%@j1kGxJjN%ZoKZ(F5_VOKMSOS!#+~QGTuhIDD-#vDk0u=xXj_YHVO`jLY8; zy(#2`nLf}l`k=&tlvrRwz!V5#!jnFb1J69EdB7Y~1k4)mUab5D%vSF`T^vIyZoQf2 z$kl8h;Hn-Q!XNNPlIxp-UX_fwo{h)Bsb7@zs<;mdbA-KEcA|tQa*Dyq&aF3`nB-^v zudi9bBGSQ;y@q$q7MmN*^#VEyig%xuo|8JiaWez|5f)qNgTx^i#rtE1PEOv9sAsWK**=zNhe8zL~Lq$vn@Zsn30`ovz({u%SBW zu!{Jk0NI6UdoQ2(doJNXLrLnSi`-lDek_yT(d2zN*rly5rNVltt%O1H9cj&ZKTI~h zdg+zASc literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_button_left.png b/res/common/usr/share/osp/bitmaps/480x800/00_button_left.png new file mode 100644 index 0000000000000000000000000000000000000000..493870a43074102447526f968e43ccf5c5075ce6 GIT binary patch literal 3040 zcmV<63m^1}P)KLZ*U+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QN zyW(fIdXCb5xgMs@yLj*A$lfv3V%unyZ7|?%uyt`rg{kJN{@GhNGx7{wsPP5&3TO1i z9qvyrfBZp~Eam4$alUY9d=q2PjjW>eoE)j~_b!TYcpbbSoBs_x??&@G)5g4ID3Gx@ nA&>jd<17=~`D2Xk{De6a!t17x++cVtK>sTe@%^AuZfMfKUDC7W literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_button_reveal.png b/res/common/usr/share/osp/bitmaps/480x800/00_button_reveal.png new file mode 100644 index 0000000000000000000000000000000000000000..cbc85217a73eb322fde4a74fca6c87a23c7a95b0 GIT binary patch literal 3004 zcmV;t3q$mYP)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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!Tc0!`Pm-x}R|+euORMm>6ZDXD(mF(0XW-4y z+5!u}jdsTVhJb+scUW_@f9bF-&gQr~{F!0g;1j0|ZyOBn;};y$CRn~&9x761NSg4S lHhZ1TM9i-X8yi5+0RTQErK<}qUW@<$002ovPDHLkV1n`Ham4@t literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_category_button_focus.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_category_button_focus.#.png new file mode 100644 index 0000000000000000000000000000000000000000..ad44aab2df83396d6ecc4a70d7326dda15567585 GIT binary patch literal 2971 zcmV;M3uN?(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~|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_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} z0002SNklf=(gJ~dVoR?CkXZse-{&{LpMJA$Pgl! z|1)MLW0IIMGaHj^D!+(nfKg$bF**$8F4EH5yUsNg=0wHxM)7HjH-HM~9z9-xI@LVw zwQF7suW<0MgzWd`uHf1MP;9c1n$9{?6dMIQ+y21pjQwea8#dxg70#LEpZD-1z=y}M zf)R4Y2)ubb0p$W%=^B9h-q+Uw&03uol9?IL0RRYc0i?Z~ RHwFLz002ovPDHLkV1f@1fm#3n literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_category_panel_bg.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_category_panel_bg.#.png new file mode 100644 index 0000000000000000000000000000000000000000..27b873b9308ad6783b97ef851ff6abea61be02b0 GIT binary patch literal 976 zcmaJ=zi-n(7&QtiRYfI)7ytn}+zF}n-8pevTQ$Xv6A}qmX%f+}ARPPBSgn1=z7n@v z*^1PO5oQDn|3C*SrdF&B2U_SDjmZiA-`~4C&8J(e)M5?VVLc}%g6YvV0oA}+Cw1a@+b@sFq9Ei%zu96f`-$$- zKz1^WoCXnR3&P@38aeI;VW3Uc{m>A9AAAvk?-}BnY9l);lCEFbiAiH;rRnZ$xSA&} zJp_xX&IJO(9FPW^VWOvo*w@whIy;6U=tJ0sA)c9P*)>q4F#)QKBp1zLFjtUq0cizo z7AOcKh!u$DC5&`+UPl-VK9NU@y^dbD%7a*ZXNX0-5gf2)}@RlT^fO6LzOXD z^FxpJl0M$H^=gX4Lp3rhlY4Lf>Ye?Q)!dcc-B~oD3LoDHlSq)B)pEZcpo8pF|93GLZ6c0iKNx@?TNpR<%yRJL!rt8jbZaJH*3vP$PaptLm&b(>nZ97_I zsU$Hp{#=k=@3L{c#1l7QV2TO$uP)U9x8jYx@(8Ffj93D-}n9gyzfo-q|Vh= z*H=>%Rh#UR(qum7jU!d$KQn!*mP{vbJd1nLAkHf`q@o%cfFNloLof{$ZS3kh7^bL7 zTF+#0R_+#6WH5?{VO+x^Y>EoEyOyGkKnw=pkZwlk@2{6>plcDjFCcTW6@$Zi*SHOP z$5R<~d_)atbo*Hlc10p!K&$}Q7&RTyjnD;Mk*vLAmIeg~9*NLhI)Q6D={G zj|(Az=i(ffh_%IoiMEzRkt-oJXFwAdx!M7jFU$3;U|1xw1a18q)Dku_K%rz&FPlp= zURH0PtCh_qnkdUp6K6Gf63$aX$?- zH#I4o->=Qi&i1bydNen;JGuGh`VZmBd*ZbD?MpX*?!4XJT4y(wCw7;<2-f=I<@=z1 zp=x#Q^XvTN*Jl?W|4wyx->6)w)6N7db1QwvPfy-EUnP9}(9yWC-c)gSlhID*HWq58 y9@ZS5xbpPHZLs=szAkojXX@M1ZpH=;9k(i|3$Gd%!`<$h_gIthl(g8{f9DSw_gK;Z literal 0 HcmV?d00001 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 new file mode 100644 index 0000000000000000000000000000000000000000..e9dac9acd8a17cbee8f2497e1697138ca3e5dcda GIT binary patch literal 1244 zcmaJ>Z*0_L7_V}1Y;Y4Xd;t7VyAUVYUHkU#de?d<^x7Uf<+k&7h8VA!{SZ&< zatY?3tk$1A3*#8JY(UEw-C|}drrSJ&4C^93s%6E8{i2VmMqaLCo`VNcN6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$3QuZ$d?ID`8scHTpo)3#tsE{+;6TQ&UBXs+2frD>aOe7 z#$D4seg4NHB)u{1f>}JaVab)0n%Q$t>rO(2EJiXzwOE81mlnnokKsbtxr&9;hC;IipP$kYhL@}lon;ikZoq+m&5tlZ|$8z z3_t4XL;KNz&bBJJR$Oyuk7;UC)hDLDcXM(FZ$MuW-!@-piRx?pTLaJBed65quHzk< z6S$h#_~!@2k1v1sL&X&!wAqw)wEN=Q9SSfb^})oo^@UzE=;>K?c%ZDYx}I*mP_-v% z?>OC&-OE!4&(uG;J+L}0$y4}v)5PdY{c$@UV$*-`Id!nK^(rwu9A5-HbTlwa`r7V= Of74bf+tO?Ovg= literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_circle_button_focus.png b/res/common/usr/share/osp/bitmaps/480x800/00_circle_button_focus.png new file mode 100644 index 0000000000000000000000000000000000000000..8d64a402127e05846624c3e9b81e1981f5b5db37 GIT binary patch literal 1789 zcmbVNX;2eq7+y$4ML{cS6;jv+O2Hw==7K~bj#d$f!L}TtsAWK^hVpRXVY8!4t|l?C<=H~;HPY}kqlBhX+(hHAxX7~o2gSQzwEh~wZOSS(FF z&<1+~08S^s8b{;9=~-mnAIa_msVNdiQYtbmoMpMXQazL2DHDH~!k zSwb$KA@tyT2&oXnr85~kKA*v&GKCOC6E17Kjmx9*XmkOCD)8X(AxKE&aRmY%6QX<2 z=^h?TnqZmhr_`Wgr37BKE640EaiMo|*?cuDMiF%gf+Q_hKwvzABAR$a1@eQLpi8)1 zDMhpzSJUylj#dDxT9 zld!~<{-2zYF=xo8;`mRoEN@{IXqvt$eQfcjd0-{hF>0(e2wjg~VI4>G6L3Rxz5PWG zL^j-wH|o2#&%^60atsdnrQz#acDc?TEzvrS;bIojtR&G{=4V<9x7aitRrg)VECLeF zIcT5-slf{Tkcj?I~vcfaGQM=#~szU&**k zG7?q6UwsN!FyP$KTl&(v`@IQovwOw#@u$x%=dP{2nYn$Sc@v7cAGVI^ z#69royB=MXN*kRV)^E+gCFbv~>U=q3uLtvRGY0)*t1695d*}Dn4L{}|*N)oc-(QH$ zOZ&4FKxK|)=Bu9NJFZ(%Qfskr{6+`4eCp`9%s7>M#bG88cp;B`MYb?A3ur1}}r~U4f+J*o{ z)W=#I3ump3sPpM_{(7$or>64@=gijN1ByuyEYJq!W|ZSZgTuo5wuai9?j5b1CSW!m z7z{lX-MzD;L%8GOtws__krSD8w!ON2(5gxY>EW;^+E%;I3Py^;F6TZs)+9X)^EsS6 zJ0z;Jb>cR*hGje4>bo}=8R?zG(Er?>Fp0lB8dt@=YUZ1(wl8(It#2&s`rKmTVo!ND uKJ@gIEdL;etY59KDy#3qH}rHPW)?uprhwuhO;5k+hvX*|3C{Ck4*dh~8oJ&9 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_color_picker_brightness.png b/res/common/usr/share/osp/bitmaps/480x800/00_color_picker_brightness.png new file mode 100644 index 0000000000000000000000000000000000000000..9b12ba34e7f38abfa7581b49da13b716bb8a5362 GIT binary patch literal 3058 zcmai$cRUpSAICo;dnGd|n=X51bBD8qlS8uNl+2VBon(t7+ZmNTBd5zcBQvKX^Ng&7 z@XP3walgL5e|~>{|9C%N@4w!U$NTx$E8)5YoQ3fMBLINK*ht?R04nXjJA|J0e^h1o z8w~zN_V)o`I{(j5f!usv02nRrz+l&}d-(!1pNd3Jn!7|03c)rV}nB2 ztaEFT=l7we@#vSPe%4&{g4WO^G-sMPM2LaiBwna^n#-#5oPhxie}7RtbxI04nafIw zIgxRSZbj%-O7!da#KEJ*@YmiGt>kaRr%jXEYt?(0#t}L^J#(g!qLnh5xdM9W+}G&7 zp5Db38QmyGQGdWr-*{W-{)q?`IE>WPyef>RYX?*zV@&h_Z=Q#jyBJ4d+kocWq(VQX z!Uv^YGo?p!0^P6_XerP&q(Wn|#ceIg}A7S z(tzN3k9d9Hr2(o(ZX_B2q#WS%H0@CXQ_?`r*v``k)Hee>ft{%V&@%%$tN55JfF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KClNZjv7#s)-+l*2sd}%2kkbHR?pkLx67?lclOx`+R!{rAG7Rh$#2Q6 z#ohGAZHKirg?p0M`3qDDbNg+fKe;Ir;{|G3b8UNJe&mnjg9Yxn$Uun`!cfa}u*7yv zt7WV6zV4RZG;A(zT*vWrc4}w#@m+jy(H?OYPNt2C9yv`rNM(baP0dLiie-u2EV!nv zrnaOLc(Q(61{=9OB3{6A`s#G3mWNw5@^E}}l0eKR7H92drFZx|DmmG}Z}QcVdb@fr zwGV_S%HP_*akSMLJR2;q^Ll~Ja^;cWV@ZnF@3#jwpUaNY`O?!VG}PI9$L@;Kq`!Sr z(A~(|9Dpz}0MO9@{HFZPbpRg70kGi$fO<9nJbo{nKN|ims{+RQdWevjACttp(Yoxq z#GGt4?_$c_F*3jXM>qC8aY{EmjFoxGFupnv)=+uotC526{5@)aPTL1+@SZj2N5R2A zP`;acU12`R!WMhS%a|R^CZ^E&@}s%=BVO~l-@hl;>i6^EBM+|GW^Bc22rqpRXv{0z zG+p!V8|&R`Iv|>LwEE73&dnddhrM(rC$dsPmyb!|X*riqn5g}EyXfdIqyIzoZxDP0 zy6FB5|G$H0Qiu1n_!JGqXU}MopLw>AwiA3pGRb9?KhAuulfgg!brt{$g&H7}3tlF6 S2Uz@-3XBab^lPCmPyP!fr>_?P literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_color_picker_brightness_h.png b/res/common/usr/share/osp/bitmaps/480x800/00_color_picker_brightness_h.png new file mode 100644 index 0000000000000000000000000000000000000000..d1c90b0545954d00ab013ccfa19b52d060bdd8bd GIT binary patch literal 1707 zcmaJ?drT8|96x77Qzd3@8S^nYYg||-ZLd(;>)H}%sbVNF+9*aDmiCmU++BNjeSvL_ zL>KUxZDx-0O7@3tL7W<`jXbu*;ilNeN$5fq7m;?#OAS!9AiMI?KZf_m-S_vs&*$@f zUal%XcS}5D4Fdpx`0TCn0svUlMcb@parB+>$Iln&$7(98kW%4$DXWG+fD9d8f`Hkm zW*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/bitmaps/480x800/00_color_picker_color.png new file mode 100644 index 0000000000000000000000000000000000000000..43d8ec9ace997655cb7afd33d44e87372beec15a GIT binary patch literal 3153 zcmZ`*XEYq@7X4hJw}=`cM4w=E(V5X}FfxOPZir~%MwiiBF40>?NTQbrF^oF85F?1* zq6fi^5)$p@zF+UHx89F)_F3ngwbwfP{Mqq$jdkd#uTuj6==5|o%>W=#{ar&S$^V_@ zseS{Mx2~lx05sSB2@;U|f*k;A6E`^g?p;?eKQCWbFK-?_IGo4(v6qY6BWC~tX0YaH zg!v|`%JIS>%peYvZs29cLdjzWOT;jz2ts(N81>_L3#VC3JFaSJk#Y7H#E~W?VV<#= ziqa-fPf@J$zDkOG9hWe0x)l7{eWK-fedwZoQgx&909!XqL7=3~)Ri`s#n6_)xUYVR z?Cb7bS`}9hr{?ztjFfdwyuRmrB;X`WS^4%Y0!14j2^gcH1O%fzg2av3ONK32&V3S0 z6bZpE<&FU*h8d^_CBce;x;6<0n=NP#3dn%nprgYIxGM(igr2UC0SxveCzu3Sr}MIq z6r=#2YtC_+z*PxU4&O`A0w@W<>|)TZ0H(x%gdWmG7t}NW0+ErX7Esax3DdY}5kM9U z?E3lm0zgy_VAkG8Du2IS&A0*ityE5}GM-;SE8Ln=%!dMr6z3Ku>apEsmb3rEK3845 zGcbokDqM!)%fUwg3Q|~pUwd#KK%}oG66KO`^tNJK?c|rY92{0I)`ly*)d5)Y3mdr* zh1OliD3N14E?x=jlDR&hDfsg^(WRC_y&e>7&L9uG|ItRP@Hu{ZdTn)eO1~RsZ9jkv zy+C)`5|HPQeugQZ9UpyZTjmd!vI*BAJNeT2@zAj7#&9ZCl*8P5vd&op&E*-_*sX3o z2RsVGykg4alcbsZ>_DpMRy-_Kq(@-%(rI~7^psR}Q5MuZR3!;c5i7NEB>iC^#E9}E zEFS}~-|W@#S(uU(;~Kd%?0>nZcCJ$(05C3ksXhQa(Bv0K4AiOhQ39Y@5Dux);5_VL z7bTG2=(sZ1L33s&7X{<*?u0S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l+`F2$H?A4|B z11!UD{;FFWU&*dx8kfC&_0>Jbda~KqqaN?QyYX7Z&(Cp>cj@HcJ%5XVpFVdQ&MBb@0OxPg^#A|> literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_color_picker_custom_color.png b/res/common/usr/share/osp/bitmaps/480x800/00_color_picker_custom_color.png new file mode 100644 index 0000000000000000000000000000000000000000..f4ce8dec1a11397c29899ea500d2b3aa21e4c1fe GIT binary patch literal 2928 zcmai$Sv(Ye_s73}WZ#lq%1&e7vom8~!)OM{Zb(9uEgJh8$xb6G`%;n7WNGaC2wBIH zEg_U8$}*4N|L%YDJQwHvITz=g*Eyf7lX%12fPt2q768CtWTG>giGN^cE$Mr>3G)*eoUJ zlW3=?R`_40M!!l(>OWo#d*waReE4nXtYK1ft$GhrKTL(Erq4E%w^T&aS3s{^{2JZU z*}b?Tr5#Bt)rSRP6f%pQG~j>xB#B26_5pw(NP1uSpi<=ay*G?1Dbb>3>`y; z4@|#qLXBnx+M%h?QlPC*hQ{QISc4)8;56XsvJ7rW0w>YO-^KtMbCefG2JAEW*~p60 z0pBI}1YO{%2C9c|Cg}mB3}E#z=~Mwzl0e1?;b92gHUd0>nXV2{(*qgHgxG6suTC8&q@ovTPc7+Bg+NGM5hECJh_fm=|KpsmE!7^9 z$0Zl3!1Q%*5P+g|w)1QEPJ;=IwFH7vDwfeva^n*vNx;Qr`D}H#%1;}B#lVP>GYRQ> zZnPRD+UM-0@HU0#ZMvcdhshpwOxg{gXnh8;=l8ESdc{w1)6=UfD^tduPa-G z@^agS**3ZpC#4vuP-i=o8A|JhzI@;5T6GjuENkXX?T>vF1n`3Y}i+OV0c=31luwNWoNUj=b0-{x(AjmSiEmz64fF0h4q^Ls_dN zIG>Fn@23>XD>jiRACvnXNvYC-}mKtB^8(_F{W$qaLmvo=q0%h~l*oz82 z-+#}ok)l+*_PNTFX(mk*)+2-e&PgTTc~?fNy94^}x&%#z>%cpKYWk{f?zcCq$(s@n z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rm;IvfqIZ{f*DFyPQ2|k7 z({YZ$ZY$foe_z&)ewM(|e zHe2|ndoi}kHbrP_TZcNmDqNMwSYuUV$+;4OS-M$8{urkH?N59!zO0_-?eYW-sT%K% z4|B%2aAWE_tJ}BIo72M@!u~l{r)7?tWU1h@<+<({wAzG~LNs|e)$xNO~K3DETes5WIm1dc!r)f|8;N=3Q>3GaK zX2s)Sf2Dg&?Mdgoq}~AxPw_>u#wbZX^h$H(9pzdzzhDx>BIns_u{UWd)jlNRq28nB z6`QE6>hNaK5L2&+TdjSOt?waT8;sTr%Q0aa)8m^C=4hDB+?S>7ZraIG?^xIn&SHl~r^Q+y*^{J=RucCG+iAGRw18vRLjhPfopKp1b*ObN`nv z36?b=PHK$8BM7fPseNd2FX<%?sA?i#BlnPhkcwNwGw+?p5AF?Z@rE}2lK(MEvTGtA zYxI63SwpN%M?FT}4-F6N$ePs&6%C9q(3Xj-346B9LflD419ia48^liDB49J`T! zT|-%ULDTq{XPVxL*vv2jKZ$Q2YMKXZDpo4!n literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_color_picker_handler_focus.png b/res/common/usr/share/osp/bitmaps/480x800/00_color_picker_handler_focus.png new file mode 100644 index 0000000000000000000000000000000000000000..33319b433e1db65af9b5d6c673284a4ffd2ec67c GIT binary patch literal 2850 zcmV+-3*GdIP)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`kF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?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@Nkl^nA`OKSgXT6@bKmd2 z1_T5I1Ox;G1O#+ikNwkYZnyor7cBq)0RR6309J+vWD>mt<^TWy07*qoM6N<$f;4GH AE&u=k literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_color_picker_saturation.png b/res/common/usr/share/osp/bitmaps/480x800/00_color_picker_saturation.png new file mode 100644 index 0000000000000000000000000000000000000000..ee1067169ffff1670113d5a655646a29f74988f3 GIT binary patch literal 6180 zcmV+<7~AKGP)KLZ*U+IBf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^4T2fgb>y@;UVf`SO%^rfAt9*PG8$y@S$|M#!Q2KsxKcdYB6 zC~A43&nS_#lf3JeE+O9|EBxJL>B8m^E~6@L*b$^O7Y#$Y;M*gx1Z{VG?=#pbF+B`Nyg+5X-k)Y@&sCX0u?UKx4r^ZDLr5-S(Z59GjE9gb!5Gyeht#9Gu}vnq`?pX6B;F|7Baalt z9y5?r_hEnwhRTpXtn0aoV1m3U^4WAw)J%crb3g#5E?K6Q%Se`Cv~4WJ6;0ksYq~C( zvcdDFAj_5|TZYNYK*$Q|Oq*K>Vr&NvZ0mYNx5dr>ldI?vv@wb*2#vKnV4#LDifbsO z^|HwF^q?2Gs1YaSnTytdk+%=JR)lYnnTY{8J;?8TDW|)F5<@Ag! zi6+zHy8n|ijyS_5&GA>Ww6919CfoVeCx`jrfdQGAh>S*WdaOal>P*4VD$SRlPe1IK zq*oe^>szN^Jp0voZ{Mf#ROhX`cdnU-U!`j9j@RQyrxsPO+@PM~%<=uVdw0Ivu;%)T zJK&huc~<=**L$~Ky>aqm6oSc%lM`L%A3rah>t0$vrRJ}F{Qh?Bk3&5_Hw`>En+02X z_6n2t2UpK@t(v*~q3>Jy@Ujm7{Tp`u1^ndg=!SQfPV8E|mO8NM-V%85(M&S<1+(9{ Incp+@8>~rg9smFU literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_contacts_button_focus.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_contacts_button_focus.#.png new file mode 100644 index 0000000000000000000000000000000000000000..4563178937f407817fa272c7cdc3c1f393803195 GIT binary patch literal 1114 zcmaJ=Pe>F|93EG(#k9>rN{O6C2m^O!XV)Fw$<5rI*<5LDTNm^Y=H z?Z?VWs!9lgD2uiV2|Vt=UzM{M|HoX~DLhmnu?uy;UX+ncK(r_@1<0r-^??MCl)*C# zpot&~DK*)Jx?;z98EUj-W9Y1AU^YQCHD?V;?gxlWfj(6aQr};^q)1f>Ql0*oCuW2} zT5TONLB~*gQXcA;0}9oAglx+4SU>|vBD30Q-Qu%BYF(Gdb9}NCVOf&nXtv(Zacmvw^{`&XgI~_g*7JUj_coB54~3(dN-v)fBAc=BDoCXf zGI)l`WHNNdM?N{$F~V&P>PX7Eb*m<)AOK4?RRgI|Cv8P31qV=&!kKOy zK{K{wb!)RsxL{0HG8mTj*hk6%W3m53HEj!Rp#=Do?>~jD0A}#X^5beh6Wk#;K2+l!ys6 za{b7>nm?CNUcF7Ol0TPlUM_=^VeH2K)#%(7c8@*XvMpY086W7_?IyOh_G@_zUx_zS zp(UAJO0BM~H5YO-^YhM0;*~FTy)SfM`LXTurK79c$4BN`$nmm@!>-wLMtCiJqlj2; zu60!xKUm%tD7v@YRDQE(rS8dGck8a_d)r!4&JQOhB9TXHl@kuQ?ALA?($9kFeVxzRlAmTux>E(U2MI?hF?ajh TTlek?+P>{kv0Zo=>KXkFSfpvW literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_date_picker_dot.png b/res/common/usr/share/osp/bitmaps/480x800/00_date_picker_dot.png new file mode 100644 index 0000000000000000000000000000000000000000..7624a6c1ca6742291d68f6def1f3508071c94884 GIT binary patch literal 2839 zcmV+y3+VKTP)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#eyhGv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vT~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&NklBNBkQ_f6*Q3d7 pG?|Sm991}~5H|n-009600|2E~35~sq`S1V$002ovPDHLkV1g4cMF9W+ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_edit_field_clear.png b/res/common/usr/share/osp/bitmaps/480x800/00_edit_field_clear.png new file mode 100644 index 0000000000000000000000000000000000000000..3fc63544eec2c5f537ed1897eed3b56fab589c48 GIT binary patch literal 3156 zcmV-a46E~rP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)Q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_004mL004C`008P>0026e000+nl3&F} z00031NklA&X`+UGO3PC`}+j zHL`?_Jy`#HMz*p$D^+W2LZts~$r1DiS*-iGKMaCd9s2ZqBfF=wWjsDL&_ zC!wkbyzGJzb1d``e>IOrqE7WTu^~$6gkBY+~7l*~=%bAQd#vjJ*4Ujg~G{!}r9mHWlw&-^N XzbEJ>uCxrv00000NkvXXu0mjf=`W%M literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_edit_field_line_round_bg_01.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_edit_field_line_round_bg_01.#.png new file mode 100644 index 0000000000000000000000000000000000000000..2e75e09f5e8e1c6baee89f298271d331794ed6c6 GIT binary patch literal 3150 zcmV-U46*ZxP)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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r4#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} z0004bNklYPJ-@|Hq;@BP1`ufB`vW{)96|M!^gdsbAAy;5m^#KL;z6~i7d|!8ZqtPdm$>c&e%!d__)$i^DcB64zlw~>d9^>(tx3~8Y zIMNOCO9&BdCEnZBYGoq?K$c~y)yn*i03<<8MN!GC*xOuy<~afCg~DELQ0%RzO|&b7 z$PJ3Uy9-bvaIazbof{N;U(+V)`M#GM6nlGVppI=1!XOAXLV_T`wg(~5Spn&W=>o0c z(82TkwGhwq84exdbh}v<(Sch{(`u@!AW0Gcv)K&S_2w11)D6>GTal&GUL{Hk@Di8y odbzY~LI2Ut@(1=;&ExYk0Ad!OOz>% literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_edit_field_no_line_square_bg.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_edit_field_no_line_square_bg.#.png new file mode 100755 index 0000000000000000000000000000000000000000..c21d62e8425b26a9dcf8097889ec8de6a0a0e8dc GIT binary patch literal 2855 zcmV+?3)u9DP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T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z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z0005oNklbE-q@~gU zZ~-iqG+X+>329E5_2xs{YkE5MsWDP&8jHQ+t&n7YGIFtOLen<$ul-S4tz1GAxA*s|4_ zPhj40FauyAzFh0uq%lj{&ewS<7zLwX6pVsVFbYP&6c$X_&rzvkvVjrFN9Ru+qhJ(_ zf>AIk1*2dTjDq<$FayOgW)KC_Q!Zl$Q7|vcg(n-BTjj!C_{9?u7`3-89`W^r)c`}+>bN~SW0000uj^9HmhH0x>N69I9D;O%Dw=`^!di%#cm4C&Q)!g&MFC(b>SRJH8U6xkbAQorl{3$1Xz1 zSejdMs!|+abJ#;{j0X_|#337(cqjo`lDkYJ|9oAT$~cz7gfIH!46`mIWXRq8Oowh(GBNJ%~8|&Xxrg`G#k?#KI06TGU7I z1W9w$)1?q>w^&>;?D)%xqA3#s-4!4Y1ltbdT15M#g#LA7RkUB8bdgX(KA!LldLPxD zEi%pByM;m^^+wt2S@cr$x{8en8#$z)ra5}To0h3)(Rdb!YBnjyHBE$2mL#Z&(Ox;4 zjV7R+Y}r_iD@mdl15z@s$pBJT5<*qWgG5rx<}{!tTHJ!;6WuXTOV^^h%iP2}xk}DM zI>BBU<9e$C25OjKzlL2lHyGm~J8U^7ZusH#EJdp#&pM3EyoYUeF~5qnioPcOU))Pv z^L=tAP-ld&IQ~;Ctu0!C;dG_+>0+gMkV8Ahqpk7q+p{WdtNDW3TMmA^eF|=z+Py^` z{p#ZBn_W*mYttd^<-z3fnVJ0GuRedWz+Y{@fBpMZ?d&CA4G|I+W-In literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_edit_group_bg_bottom.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_edit_group_bg_bottom.#.png new file mode 100644 index 0000000000000000000000000000000000000000..7e6f6a17184c08f5b991f0f2b15f3506cbd17201 GIT binary patch literal 2909 zcmV-j3!?OiP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{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;_004mL004C`008P>0026e000+nl3&F} z0001pNklpns7JA2xL;Jv(TqQZhfO->HXC8WC&(vzsP zRuX_BNQ-vUaD1%rR^{s!N!$4V4-Be5=yOmKhux?|uq#L{lxqk7+uj>pI)Ki5!#Inp z=#P38=W1U;ia3cUarpwUY#!6o7v-pQ*C6yJ<_-V=|NjF3CnT1E(~bjf00000NkvXX Hu0mjf=+|YO literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_edit_group_bg_center.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_edit_group_bg_center.#.png new file mode 100644 index 0000000000000000000000000000000000000000..02ee1d1b0b18652b8c0274f29e607903e0584a21 GIT binary patch literal 2860 zcmV+{3)A$8P)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 z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-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} z0001xNkl?okoLo$-`6yWq*V3(OWY+z1H|0s20u zcmYrD)hyHi)@OSb!W58@)?JOxNpQmV1Gx)ap`Y5lo{Iqv}gpDw^hh)Asm P00000NkvXXu0mjfWRGh{ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_effect_tab_text_dim_left.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_effect_tab_text_dim_left.#.png new file mode 100644 index 0000000000000000000000000000000000000000..d9471628bce8f4094ac72664a3505479438a339c GIT binary patch literal 2869 zcmV-53(E9~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&#Q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001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_effect_tab_text_dim_right.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_effect_tab_text_dim_right.#.png new file mode 100644 index 0000000000000000000000000000000000000000..a6ee545d583326b3cf328e3b7df415917c2b71e3 GIT binary patch literal 2884 zcmV-K3%m4*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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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} z0001aNklKnZ{bNFEFAIT#fuj&Uc7km;>C*>FJ8QO@#4jc s7cXAC_`gV|U)@q^n=b$W0RR6306ZxzG2-JB82|tP07*qoM6N<$f@`W_zW@LL literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_effect_title_text_dim_right.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_effect_title_text_dim_right.#.png new file mode 100644 index 0000000000000000000000000000000000000000..e5c12c0bcc60143f4afc58a65b1663cc75f09905 GIT binary patch literal 2893 zcmV-T3$pZyP)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#fknUxHUxJ0uo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EY4fnLGNg2A-`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} z0001ZNkl5eC4y6{00000NkvXXu0mjfpK)Or literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_fast_scroll_handler.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_fast_scroll_handler.#.png new file mode 100644 index 0000000000000000000000000000000000000000..78022d502c67949df2645e19c20bffb1bcaa7210 GIT binary patch literal 1618 zcmeAS@N?(olHy`uVBq!ia0vp^Qb6p*!3HFk9&xb*Qj#UE5hcO-X(i=}MX3yqDfvmM z3ZA)%>8U}fi7AzZCsS=07?_nZLn2Bde0{8v^Kf6`()~Xj@TAnpKdC8`Lf!&sHg;q@=(~U%$M( zT(8_%FTW^V-_X+15@d#vkuFe$ZgFK^Nn(X=Ua>OF1ees}+T7#d8#0MoBXEYLU9GXQxBrqI_HztY@Xxa#7Ppj3o=u^L<)Qdy9y zACy|0Us{w5jJPyqkW~d%&PAz-CHX}m`T04pPz=b(FUc>?$S+WE4mMNJ2+zz*$uBR~ z1grP;werj>E=kNwPW5!LRRWrzmzkMjWo&3H{644~kf%h=vIPQxAv%`a&YBn1YUsv0Bh-5JrdJFXFN!CI%)Owvf^$}L(glVq;#t|(a~utBiYhQ{Tl}is z>e{Q8Z^lb6oiBdtuH-M%$Z)eUOXQaJh3$(nTf2{2_1QbsJF_g&`TZ|I!0G7nRay6& zf0suYb|_tPe0b3%!1c|V-HSH-dX}(3T7Emju@;B6#CfHUmN*=c&&$kI+kAzy(O~{z zKZmYGCN6z#w?Axj6gV<#&OP~#EdEt%!>U977H$rnaQ$`e6TwPXhraH0uT73E<7Kb( z;eY&i125}Lxyg}^|NLAQ@l93WEHdm+mw(rJ;`o2NI(N}tw^r*mC&k+fju!pu`O$3l z_hqxKK&s;jNtx1V-!Ix1-wpD5!*zY_^35jAF!=hc1Lu?3*U#TgWqYP|UGsJAW({Ev z&PfWKzv6+e&hleF@%;1VLkh9iFZ(&3d~(HnR`%CeSKok*5i*5LGw184&9{?2c_F6N zA^(2w*W{n4${dp)KVBaYxVTD|M*ntfXElo3dP}W~t5$o_v&hdiQ<-1ySXCYQ?2_;7my`SXv#g&-m90@P ek@(}?z{nu|LZ9>3?s8X9Devj(=d#Wzp$P!F-f%Vm literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_fast_scroll_handler_h.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_fast_scroll_handler_h.#.png new file mode 100644 index 0000000000000000000000000000000000000000..5b16a186b4944c55f23e2b65279f264b5930b890 GIT binary patch literal 1562 zcmeAS@N?(olHy`uVBq!ia0vp^UO+6x!3HD+;!d>zDajJoh?3y^w370~qErUQl>DSr z1<%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&PkO=+;;1#W&YDE`A|=*5QTmjT!6S zF>0?fbFyA|%|m6+;_Uk8`!Y;+o$YTZxHSFp%b)9$^^e;}&A4!8alwM`7nF90?0na_ zS^j7OYb4_?*{p=(S+gd|^IM+c`NgIi=nydNov#`DG1e~IB@Qp%S{_l-Ig-U?-?VB2 zul4y5hW<_0yR)|iMz(0yJbZe%V^PAXZ~4DY{$Fzc4f|wPCPuFYp#}evgX_cQF|{sk fexTJ_$6>%QBb;UNIo;QcpwimY)z4*}Q$iB}l0Q@& literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_fast_scroll_popup_bg.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_fast_scroll_popup_bg.#.png new file mode 100644 index 0000000000000000000000000000000000000000..264061485cde63cc8537f893c9e6ced312c58096 GIT binary patch literal 2977 zcmV;S3tsezP)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?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1R=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} z0002YNklG?Jok+CrK|+zi-P&+Xh1nTQDoq6aa8(2qJUHZI{=kP-@Y znHwqXzMTf(bX5~i0O!JAogiFd!zTx9>ot82nE<@McB&2>Qrj+Kk_t^-dw_6P#pMrL ze3OU4_hbRS8-Q=whEA}P6Lb|ctYD>Kv2o?>)NBzrw#>iYGPfd*SSoYtt+fE6uYU~y XWLn+gLjAeF00000NkvXXu0mjf#B_w{ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_fast_scroll_popup_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_fast_scroll_popup_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..40f2e8701ff7a8f0ec2ab179ea5ff10c3da38030 GIT binary patch literal 1535 zcmeAS@N?(olHy`uVBq!ia0vp^av;pX1|+Qw)-3{3k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlv>1qhnW#Q!N zX5nOEY2a$&=wxbS2Gi@AS6q^qmz)Z-Hxp~q&Aq%{;DFibEv*c5!g_JNpz`jJT%3gJ#? zr^G2GUE_Vg$7y-$O7LPS^mPrSl`YTXkHJ9y{1#3mW$G+}Mn z>s{Ah`#Ps=yZzSo#yW=C4N`5pT@;sYonvr@t^0l2=E$4xzb{|-v9|H(9R1wL`Rh5q zCi$vOzF`-rez#EbU{iD%;M7CB>~jSz)uzY0ZghzuvntajT0;Hrx-G zGy9XGr0yBbL?6rWcb?KfBbNKRhAm0n`&IPPDJ+74u(0dT~!P=ub#12u8>{acmI^r;91s86$<_Nxa^CWt z&%Zg?n#@%{%rWD9?GaU>=^d3G>%)4cY_qxbp|V!X>W$>ijmo7{oI77;Og5p*UGt5uTer+HUKV0-RIg~(!*|uDzmvuO{y&xa-@Ad4 Y;qYngcaioDTR}y#r>mdKI;Vst0FEU$ApigX literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_fast_scroll_rollover_bg.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_fast_scroll_rollover_bg.#.png new file mode 100644 index 0000000000000000000000000000000000000000..97ae24d5200d88f3f36e6e5f8d0a3aaa6106378d GIT binary patch literal 2848 zcmV+*3*YpKP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~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LtL(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} z0001(Nkl+rRfwXd|tgfK>TNVk>b{*=A&t&Vojm z)RAOFL2L+{_I%_DA~(D%WHMe|qkp~{PqrJeTp*oZB5@0al~3d-}nG?CsuMkI`0F*e$=KjBilSUi9Q1W X86652u_xYw00000NkvXXu0mjfiOy&7 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_grid_select_check.png b/res/common/usr/share/osp/bitmaps/480x800/00_grid_select_check.png new file mode 100644 index 0000000000000000000000000000000000000000..5115bbaaea5c3cc0915d52ea922e043167dfc424 GIT binary patch literal 3421 zcmV-j4WjaiP)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#2HOnI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e|rfefh5qJ+wTDYR#_isjR=@=00000NkvXXu0mjfl+$9i literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_grid_select_check_bg.png b/res/common/usr/share/osp/bitmaps/480x800/00_grid_select_check_bg.png new file mode 100644 index 0000000000000000000000000000000000000000..c04d36e8c6f74c3c3d49068c7866a0f4ea4f75a3 GIT binary patch literal 3962 zcmV-=4~6iFP)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;x5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Zxbny)%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} z000D~NklO7zY|5+%fYW1_dj zaKR1nhIpkWC4?&oi3!OP6GI?fhSQ`ATS8((mj&viDDqW0kczMUdUtbbY6kYp2ya9qji1=nNZx)E10+j%Ez~=Y+ z%kSU6Z-_)9c~etUdH_XHv?E83L@gFe;?ku{5lzzqz?2Z;ukHSU*k;Q10LKG?faBJ! zTcyLp!}?$_7?Y8R0tp}qYP@sj&JS&EZH20;K9|KB zl@Zygbh7@e)z#JI4<0;NsH&>+0KV-4xq5nfe!Oz!iXM0-Q(I$;rv}97QKRb+1N8M-_Qc zzXRIu^?DWHb(U*qBdz=W{sdr22Qp7gOcbW~gB&v9w%(irZ z<>t+sk#sAY8Hp!%@7`U}>-7iZbtaoKo;!DLe^XP_6JT;Ppr>leP96_ zD=I3g1_uXKr_<>L9&gqMHq&$9SGU{!b6;OyiOpvF7WhJ1O|b)zy*i!l>*nU>Z^p*P zB2K6C7a_#s-3}X$#pChDuC6XqPfriQU@#1<$%w_}qsb3UU7w5fdcCo+vC-Js*}3X) zIK}~=5Mpt+!-n)4I1bpy$H&Y2`}_C!d_I#T_TYvIC}J`?#!7p zYIAdQ#AGr}N|5KBgHrX0VfFe2RSdi=U@@$$BLd145uo9o!NblbP0G5-^ U{kN4j{r~^~07*qoM6N<$g0L}xF#rGn literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_grid_select_check_bg_press.png b/res/common/usr/share/osp/bitmaps/480x800/00_grid_select_check_bg_press.png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S# literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_groupedlist_bg_focus.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_groupedlist_bg_focus.#.png new file mode 100644 index 0000000000000000000000000000000000000000..1ff8a7c083604e10fb5483bd0b9d70db1a04c2fc GIT binary patch literal 3001 zcmV;q3r6&bP)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^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dcC!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} z0002wNklk`S5*-R+j= zccGDpMBXP6di*Ggeicdpm5j~|s9Jmh21d1E@y)QB<)(jbUDv+&IwOZ~-{S!ZJsnWa zDXcjB>8TdBlI>~d-a0vXT^H{F;*To_ENmck^9itY_{t9_`Lo05=eUj{0yqoxq5!gz vYXVbX2(*pb9@v=VPEm3}C>3-83$FnHd(ZezM|YRl00000NkvXXu0mjfz%Gsc literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_groupedlist_bg_press.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_groupedlist_bg_press.#.png new file mode 100644 index 0000000000000000000000000000000000000000..cb2bdade19a4ad606adfb65f7f6e7eb686f9f19d GIT binary patch literal 3044 zcmVKLZ*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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480x800/00_groupedlist_top_bg_focus.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_groupedlist_top_bg_focus.#.png new file mode 100644 index 0000000000000000000000000000000000000000..896788319d0feb26568e75d5343c9a747013749e GIT binary patch literal 1091 zcmaJ=TWkzb7@q91(NZB2LP(FPAZ6#)y_nI}%g&B2wrO@(T0(R>bGAEaXU>>8wbMqV z8Y12n4}`cp;i(A^Jb2)tgcm`GL_824$*L!kCUvH|<-wZd%(>+IzW@9G^PjUl-Mbs= z*VR)L)sXIzvt(ZGk0l}UZ|n-cB-2`)>ccryz$MjzRELfRAV{0)Ak0ElA3gdEwo+7( zHu8PAFSAe5kjbb%hVe|Buqmpw&9hZ)2x2e*2MsGhR~|g1fuSep-e`u)*hyG4y2c!s z8|%(%V?&y#(`~yzt0xfw6Jiy3=CI{TUV@&}mB`vZW@#`7!9xl9x2e8N4@e>hf+)j< zH7>@3ScKstoEQV6`Y$@qL6(c8) z&~UYiJw=3(TSPWU=AsM_dJRiQC3g;=$w+C-#j2&jw49)c0%I7u6pJe@aaoMTl$I3F zr-U6*UQF^rhuA4ATttjixiZp5OlaXMSO3F}*W~)GVA>?I3?1Vb)D;JrU@m3JsO=?E zQ*WND*Y*;v$z_Qd*1y=lF1mU|y2oEGv@O{zG(NOQw>zY*W9}YEp2YpM+>!U*4b05W zwgqF4o<3c2p?~UTXn*-!$Lg*^;7(%2w$4L_ieUAdTx#@E5^!V`!>PlnX oP~hjeL$}UXc3*n4DWHr~LF&xmi(4m)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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~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} z0002(Nkl(}|Nl><)y7UChk~3Zbf4Rux;C<>$>fkSB;^6ZP%{>0H@PZ+enxIvH$=807*qoM6N<$ Eg1=IfEC2ui literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_icon_SIP_close.png b/res/common/usr/share/osp/bitmaps/480x800/00_icon_SIP_close.png new file mode 100644 index 0000000000000000000000000000000000000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vm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z0004`Nkl!BBu7&X_MX+^FkmwUcz^I$;*53M1*#b7;PdB)PXus zL*nDn3*>;2h%j9MbHGE{S3$M~k%-kDp}fR^LQ)Im$$W{w;^lS~Cy?T&>;0cldvX)*-V#?e} zWqKbt1I9F+OJEduuNwo(cl=;01MO5n%A@M{16M$o+P}krZZZj{ObT)*$VAW)o_oW0 fpbqq(fqo7E199-+Y*NMD00000NkvXXu0mjf6kzK= literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_icon_back.png b/res/common/usr/share/osp/bitmaps/480x800/00_icon_back.png new file mode 100644 index 0000000000000000000000000000000000000000..7e744f3fcf820a5329dd4bbef2dec4e34d8379ce GIT binary patch literal 3306 zcmVEWKLZ*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@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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} z0006NNkln_BGi8q)>O{EZKIjxqeqot4Fkh=nE& zh8TX%F|iASV7P|c+@C+ZRcpx$kFTA z*y5nKm_l~}sLj}wDR1-g2?y}GXpW|Jdx(22a_#1VRn4_4#I_K_A!c*-8p+GiBB1ly zAL3~f&>L-lru9gOZ#nz*Wj*a&q2uVsWqirGv6dpwa52Y!W?{K19?`UJ4RJfQ;?5Ey zIpBpG&=&MjO`h o&6L#tIM<*xXboC}mXf~%0GEL_+~NS{1ONa407*qoM6N<$f;@^c0ssI2 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_icon_focus.png b/res/common/usr/share/osp/bitmaps/480x800/00_icon_focus.png new file mode 100644 index 0000000000000000000000000000000000000000..d1ed90a97278ba8d588b8d1ba4f1ae7f16b5ea5b GIT binary patch literal 1173 zcmbVMTWl0n7@kN#+t7%KF+u{IOcO$hyK~!_&Wv5!oy)?;ZfUlwG%+Tf&YbN|w=-v$ zId!M?PB4o4qKT*vlJY=8(u4-ReWbgOiza z{lD+O&%yq_U2UzKS}BTZE9^E(WZsc{Ppu>4-0b;R$+QuhgLnW{aNPN zm!+#12P(tV>-BV9NTYCs;S@zlICwrqBvR3YkF7Z6N9|1p14ee}2G~VDNEoeQG>)@0 zv2@u5FDMpQi2bM$C=xOzwgQGrvyA5@el1ByxCH+-V^!&>JP|;q1S2#a+9V&9_9mFb z?(vEeL1K-%Cv-_ttT6-G;~w;J!N}6&ChfS6DzY-GD;ZPDNSeuWoUG}xDa(qOHxx~0 z`6kC|SV7Bkot&&2vL66V$^FW_;Oh{Ve=;9Z3 z(pGZ?BUg@Z{PFAeEi*kE)?PV#XlnEJpN9@iy;l9Wb=&*ZHHXJ~o^H9f^I`i(Z(OyX zzc+v1`ru4gCH!&b?k~cvbD2-p7A}-8{xqzw2(>@=E39+nc}XJ-lxI^S4gDG=KA%x1E+9$ENnTt}-kNe;xX1nmuuVpZ;^P z_U7f;ZLxmm`h!acH$G`TdT{C5u6L~Gdgo5Q_wLvA&pL+Wg(uciJ-;s;Ul`p0k{?CE L>@$vQL;L>$D%FiK literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_icon_jump.png b/res/common/usr/share/osp/bitmaps/480x800/00_icon_jump.png new file mode 100644 index 0000000000000000000000000000000000000000..518aa05a70f0d6e797b932beb1324480cbbee5f2 GIT binary patch literal 2991 zcmV;g3sCflP)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!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$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} z0002mNkls@VU^Rc(`*3 zcc3z8Qd^YUwA<+urvQ8iJl_HjPu_X=72T_a&O2NAS=8G_!7vwsKb$PoJybp l%HCo;O~Mvli)(4{djM{8>bcazzd`^2002ovPDHLkV1f*LjYa?f literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_icon_jump_left.png b/res/common/usr/share/osp/bitmaps/480x800/00_icon_jump_left.png new file mode 100644 index 0000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s}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} z0002|Nkl$vR;O-9zk>7SC83kr8-8t)DOKW0V+~&~nZ%z=X830K z0af3WM1sy0+q`2;GM#{_O5-fd8aayON|A literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_indexlist_bg.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_indexlist_bg.#.png new file mode 100644 index 0000000000000000000000000000000000000000..aa4d47ca6e95747ffd50403073ceb04db157b29f GIT binary patch literal 2846 zcmV+(3*q#MP)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=f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-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@~ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_indexlist_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_indexlist_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..96342f6daaa2d9737123361a9eff455b219df581 GIT binary patch literal 2858 zcmV+_3)S?AP)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?>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>w^&>;?D)%xqA3#s-4!4Y1ltbdT15M#g#LA7RkUB8bdgX(KA!LldLPxD zEi%pByM;m^^+wt2S@cr$x{8en8#$z)ra5}To0h3)(Rdb!YBnjyHBE$2mL#Z&(Ox;4 zjV7R+Y}r_iD@mdl15z@s$pBJT5<*qWgG5rx<}{!tTHJ!;6WuXTOV^^h%iP2}xk}DM zI>BBU<9e$C25OjKzlL2lHyGm~J8U^7ZusH#EJdp#&pM3EyoYUeF~5qnioPcOU))Pv z^L=tAP-ld&IQ~;Ctu0!C;dG_+>0+gMkV8Ahqpk7q+p{WdtNDW3TMmA^eF|=z+Py^` z{p#ZBn_W*mYttd^<-z3fnVJ0GuRedWz+Y{@fBpMZ?d&CA4G|I+W-In literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_list_group_bg_bottom.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_list_group_bg_bottom.#.png new file mode 100644 index 0000000000000000000000000000000000000000..7e6f6a17184c08f5b991f0f2b15f3506cbd17201 GIT binary patch literal 2909 zcmV-j3!?OiP)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 znC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`%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} z0001pNklpns7JA2xL;Jv(TqQZhfO->HXC8WC&(vzsP zRuX_BNQ-vUaD1%rR^{s!N!$4V4-Be5=yOmKhux?|uq#L{lxqk7+uj>pI)Ki5!#Inp z=#P38=W1U;ia3cUarpwUY#!6o7v-pQ*C6yJ<_-V=|NjF3CnT1E(~bjf00000NkvXX Hu0mjf=+|YO literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_list_group_bg_center.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_list_group_bg_center.#.png new file mode 100644 index 0000000000000000000000000000000000000000..02ee1d1b0b18652b8c0274f29e607903e0584a21 GIT binary patch literal 2860 zcmV+{3)A$8P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf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7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z0001xNkl?okoLo$-`6yWq*V3(OWY+z1H|0s20u zcmYrD)hyHi)@OSb!W58@)?JOxNpQmV1Gx)ap`Y5lo{Iqv}gpDw^hh)Asm P00000NkvXXu0mjfWRGh{ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_list_group_bottom_cover_round_bg_normal.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_list_group_bottom_cover_round_bg_normal.#.png new file mode 100644 index 0000000000000000000000000000000000000000..039b1e4a15332a9b476358ce3e7b5d10efd39773 GIT binary patch literal 2917 zcmV-r3!3zaP)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;QQA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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} z0001xNklb{eGYCW!(bHWANFyi&g|ADT_?D0`sJ`W+~V|J9LNuk6$z|G3xD zxdZ6387lE6j`FoNmQ0t4Dj>yKyo%EYfT?86H5V|eZ=#z*mf7w7#B(12Vg!S})*Ad; P00000NkvXXu0mjf@CIp2 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_list_group_center_cover_round_bg_normal.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_list_group_center_cover_round_bg_normal.#.png new file mode 100644 index 0000000000000000000000000000000000000000..a0cdf4ff24f42ba1b487fb74315193702e93d54b GIT binary patch literal 2882 zcmV-I3%&G-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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!e(+aqtF1n})=+MKgTHkzw9k z-|NEG-sYU%+pP-*vt~8jR2GQ=3u28fTLs$_%MvqgS0rW9*0= zS1Og*QkX?<7Y77E;P?<13Iz!w==IoGD+g_FS;c|^J>4}OY$BWXEovR8h$V)2IuU~9 zWHM8RZErGBBxPJ#b2z~AoMriOjiWuBg}>dH7VYJF9LQy%hl;LF?xS;Ag-mkycOf50 zyb(9KCb<-?pdh_yK^vzPi6JMfVH%edDt)q;Y945lj&VtAjF#j9(pI<9N+MStzMLDZJ;2x82iH2zeWg~P zU9siM5B!2D8dmAW?vr!p%1?(_dG-nQA92g>G)4Rel3;-#Mv`(fYr z`r+m0Prti8*1NH4N#MYV;#RT#^P^S9QQ=3K@IHR0Jn@jee3@w(rUAEA-Qw^F9G$0;{X5v literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_list_group_press_bg_bottom.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_list_group_press_bg_bottom.#.png new file mode 100644 index 0000000000000000000000000000000000000000..039b1e4a15332a9b476358ce3e7b5d10efd39773 GIT binary patch literal 2917 zcmV-r3!3zaP)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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DBO7E8;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} z0001xNklb{eGYCW!(bHWANFyi&g|ADT_?D0`sJ`W+~V|J9LNuk6$z|G3xD zxdZ6387lE6j`FoNmQ0t4Dj>yKyo%EYfT?86H5V|eZ=#z*mf7w7#B(12Vg!S})*Ad; P00000NkvXXu0mjf@CIp2 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_list_group_press_bg_center.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_list_group_press_bg_center.#.png new file mode 100644 index 0000000000000000000000000000000000000000..a0cdf4ff24f42ba1b487fb74315193702e93d54b GIT binary patch literal 2882 zcmV-I3%&G-P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgW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qu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z0001&Nkl!DTR1Y1F}rY=g{TnL7bzWSd%( z1ds`;$&H+NEb7@Vm=M$HZUdgc0_fsd0%Q9@wv9`C8PBGf&w*)3iW1j`BJ)1K(fIA0000P(W+L8q4KU<wss8qxSai>4hsvv^shoBZ*UfNFeqbL|i-geGC_uhAJ`dXUT z1*+?+DT)fD*DF~v){(b%_AK%Rff|_%i?P~{TTv%2X)dG^2I_!x+S0mU7HUS%uDh^_ zqGooQxpv&1*(mDBVl^MbmMw>{DXM8r+0pcFi0Ka4W!e(+aqtF1n})=+MKgTHkzw9k z-|NEG-sYU%+pP-*vt~8jR2GQ=3u28fTLs$_%MvqgS0rW9*0= zS1Og*QkX?<7Y77E;P?<13Iz!w==IoGD+g_FS;c|^J>4}OY$BWXEovR8h$V)2IuU~9 zWHM8RZErGBBxPJ#b2z~AoMriOjiWuBg}>dH7VYJF9LQy%hl;LF?xS;Ag-mkycOf50 zyb(9KCb<-?pdh_yK^vzPi6JMfVH%edDt)q;Y945lj&VtAjF#j9(pI<9N+MStzMLDZJ;2x82iH2zeWg~P zU9siM5B!2D8dmAW?vr!p%1?(_dG-nQA92g>G)4Rel3;-#Mv`(fYr z`r+m0Prti8*1NH4N#MYV;#RT#^P^S9QQ=3K@IHR0Jn@jee3@w(rUAEA-Qw^F9G$0;{X5v literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_list_group_top_cover_round_bg_normal.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_list_group_top_cover_round_bg_normal.#.png new file mode 100644 index 0000000000000000000000000000000000000000..d3a14fac3be92acf33d3766c437d9d8a4fc1989e GIT binary patch literal 2924 zcmV-y3zPJTP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)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s@D;R9Ko2{ zbHk@R8#1Hm^NK@$dnOo-sG7Dx#982m4riu-CHWz?*I$ov&-t9+^u2tKwfAsAV~*K( z#8!7o4lSAUaaq~js`)(-MsF|T$Mr z7}%u@qW7o!v=?XGq12Y2G-pMmbUg@-TeeACzA{-Le3&6!X6)%GD{^ZK?HtPQdqd+r zneDqItx`5UIdQ-#(bt)OZ?{(?qdoM`yrLU*xopqxz|Mxn@>#i+cfEdTSX%w7>*cVE zFIT8G``A(rPrGy9^g9K0ut|f-Y_S&9|jt20ypPe#;!t{8>n00jVY5NaHCXIya#R)lo E13gNkpa1{> literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_list_process_03.png b/res/common/usr/share/osp/bitmaps/480x800/00_list_process_03.png new file mode 100644 index 0000000000000000000000000000000000000000..38d71c9922e5ea415081446fbe035fe7c730cf13 GIT binary patch literal 1697 zcmeAS@N?(olHy`uVBq!ia0vp^S|H591|*LjJ{b+9BuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFsEgPM3hAM`dB6B=jtVb)aX^@765fKFxc2v6eK2Rr0UTq__OB&@Hb09I0xZL0)vRD^GUf^&XRs)DJWfo`&anW2K2iJqZ} zfu)J1j)IYap@F`kk-mYsuAzaIskxPbp#l^r0c|TvNwW%aaf8|g1^l#~=$>Fbx5 zm+O@q>*W`v>l<2HTIw4Z=^Gj80#)c1SLT%@R_NvxE5l51Ni9w;$}A|!%+FH*nV6WA zUs__T1av9H3%LcpzHo!{ilG4o3^M(S!~%UoJp=vRT#&!Os*6j4QW4I;s=7F&vLIDI zD784hv?v)EA8E=k&A_n3ZxKi#&^1>6MVY`zNz8G{PcF?(%`5SAu~h=f=%r+)SeY2O zIyt$xI+-||n7A4l8ag>UnY%a{o4Go>7(1F6n!?P$rq|HL#mUUl)Y#P3#MIEx)yTra z#L>ml*wVh^$r7g5Gq1QLF)uk4W^X3YUZ`Fpyn3yii&7Iy@{2<9^K)P+ARr^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hJR?S&#-(0u%XVE8d~+8x-V22fgVG{(r?i$(8+|oY4qpXr|)$ zSFucQ5fx~fzAb%X@wRzT711#oqBU}D=UgT_ju`?6iuD~&4|^Iq1MIQ~lj}tRi{0y+ zbxqBpoWSGG=H!x7B4b0f`Q174bx3q%dwsPzd1o8ymVXK;Zgmw2rTdyh0qm{Lq0ds= z?`>L{AJ(@zE>ENHkV zU*=R)o@aSIxYx|k_54VMA)V~Hwd1gx>v++YoC0+Wn&}`M#$9H}T7+P~deukm7LsU3 z9Db!dv44z#1Q!%__79JyfB(jgf3x#?T<;QFiw7fDtpgm9w5aNU_2(If@_y{S@)%FQ zyKZ>wwRPN!0jE&UD?MPXT~f~Ds}Evb=ej2hk7Xv5)>@36{q*#v~bemlR<< zxWF~9H^cnbV_mA3K4*_)$YRZ&MuBziYnqPD>e-xU`RBU7Hdh|J*VQ%i%#+L6=V{5| zm$QG$_b6-3gv{#-cR;tJt6swC38LR&Vdm>6#a~;`@Sd^NB6UUi04yEV!RL-|=?SfP zwKzs;vwqy_LF~YDyMnY(H!QNOu%eaFUv4-7=btK}oADj)RC~4EavMBo+1h+~Pxo0~HT6`aWLEfuHg~5)DkEx8x+NT+f^L7VFDP@;d zlpDK0F&p1=b?!EJZOo~pxd1Z_L8t1ovzvsC6Fw?CjsH$ym=?wqMgzCCkwaqOEkhmzTH z`}P$ZG{t<~S10p~SxNf^-{v1FJ$=czzBJsqXXBcoiiAYJ#-@#qufl>F$mbtPY6gDk x>zS`J>>cEP=;{BtOmJ>T$N2b-))yl#^`y`A9;MM`&k9XHrVxG@e1;pd{cpLDy?+1z literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_list_process_06.png b/res/common/usr/share/osp/bitmaps/480x800/00_list_process_06.png new file mode 100644 index 0000000000000000000000000000000000000000..71084d4e06b1c914e633fc346d9ce6c95b910c4e GIT binary patch literal 1806 zcmeAS@N?(olHy`uVBq!ia0vp^S|H591|*LjJ{b+9BuiW)N`mv#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Y>xJ&L~&|aMY=FfNc zn$A8uA84X%jNN0k-QnSaI!jk+GHvaQ`N_|haMQ(Kqm*&l%GV(aTmDE2{NAt2^mOrC z$F0m8COX8j$39GU4Xss*^9V5JHeuBX`tIyn%Ix^n^;gEV-tJHwQr#`L}Xc&9Ygw^Vrox zc~7zja7>td=&jKW-G@v$m%_P>7^9zMGZ`IwzxHHdWS*o1FzhB2ES0?S%0-y6U|C{k| z;>a+%+56y(25+wCH4eG78BXmvM(jH$Ur`L7y6*DvolCf~Z!Z4Gq5PRIac$F4?}q3v zds3dpzv8jqTV1iT;i6##PfMr8{k17y|Nl=9%Bg3SV3^dVeTzG6g9NCC@^tlcS?83{ F1OTtmvyuP+ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_list_process_07.png b/res/common/usr/share/osp/bitmaps/480x800/00_list_process_07.png new file mode 100644 index 0000000000000000000000000000000000000000..2ce2f62d14cd80905da3635e66dff8883efd7509 GIT binary patch literal 1772 zcmbVNX;c$u6irkVL8^cvTGSYdl`YAH36Oz+Sp|=13_*ewN=POoKr$g2NP?|e5Qqo# zAXa5@q1f6IP^lCt2uQI=amChh1hrB(HWiQpTC{Y+V*A7TqjS#8x83{hd+&Si%x?aM zwKi5ut#CM;O>huLfQ@eE*K#)YZMx9%5jHGAxgs>Z{knTaCQUD4Wppq#*o&W`+`9KtaF!c~I zHH}mT2{^ndEo{Xg%28Aek;yupj->MpfLk=V=QZ zSS!&e)Tjbc5zH3FF-Q{1AYz_QhM-i3guF4V(oQ7`OBq=&R+9k|g{)MX1=3IHrN%ZJ1A^5(KRUQ7_6P1|@I7ogIp92(Dy#sz5rz@^f?IV?7v zL-FPC*i4X1pXLUuw5V7mfv0s9nC=vp`c5vy*1%#E(FhSFVY&kNas)-RazssFhtfy@ zAzY!7B08=4dM2agz#2s|EahnsC1E1Jkm4=+zC4}}mEuhWx&IaSBv<->az@6SA)AZi zU&S)Lg;k(=`lj@;#hd1VRanPpu+~`D`(yy?IHzC^Q>gEFl7GImgTJtuwy?#~2~1-h z?iJ1;?d^Ho+4 zv?8ztg$~RN1FbVMb5?cL&+GUhKD9g`wbb2Y*&Sy>?pKgzjHf1+Ed`H!Lge#lQo&c@ z->40(S7k#>NJz)iWO;-`-+2m>nj%+t?cbT4yZ#`-j|=~DUk!q-pkCqs~YWb zWjOMvj`QkQKC%7P(sq5D`|`$$gV$azatJHle^hpIb6?WPBNWQN{d6SKsd-0dpA)YL z*WNJJ^&<6VV`2Bh8;Pbhrl_jhuk$nS_K)iNhCAGBkGXa`59X5eZK3!&{kf>qi&5yv zifrp0hjx9cq2c@RWzN=rUa@$+ecXBL@>8??_TiH>bD;|GUeoa#^1b%qHkU7!*_djG ztpIT2y#Ji?{`j54iG`06x9;4M*Ds=x%T|fjg_T-SJREYS)Ss7!JVh8=~EhaZ&G=d+Al9;m2kdM9EGoz}x zpq$zAynnUZkX><5+qYFE1(pG)Yh#HEK^nW$xG47&oon@eYTJXj*@JRB>+D&3W+CBK z^xC8twL|N`r6P7jt5M%tQ+zw}w+snoJo=Y3oeQl!&h@hw^9*p*8c>>iHOB$po7KDN z*iR)DR%3=ss=Sx>OImlCY`Du}<`&v6A1XQ9o>TUHQO3SI_WrK64lcFHBM0Xu+cTT13fLf z^7>It&jVi0iQGH*i0sjVYWI!V>6U_CaQ=l(+ps@;6T4Qc>H=hrB}489((Wv(X^-z- z@mN-P$@GQVSZY;Ja;{-}V3uFLn|q@tB(%6`0qf=mRzk<>Aku#g8Baw%-z5_#fnb-8?|S&%>V!Z literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_list_process_08.png b/res/common/usr/share/osp/bitmaps/480x800/00_list_process_08.png new file mode 100644 index 0000000000000000000000000000000000000000..09c37418b590c4f251b3bfd2f196ade961391a61 GIT binary patch literal 1847 zcmbVNc~BE~6i%T;q*z4`MXfFYxr8K}gOCgna&p)}BoVP_N=P;kLb4%QB%o5Rse*!9 z1&fNH6+sFVMaLkw)@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D+}d?bL-f#*?$Azr_}WT literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_list_process_09.png b/res/common/usr/share/osp/bitmaps/480x800/00_list_process_09.png new file mode 100644 index 0000000000000000000000000000000000000000..3e26bc24c7abb9ba69970503815e1f73a63dd635 GIT binary patch literal 1811 zcmbVNc~BE~6b?ZxhHgOM|WoTcYWXc-h03IX0rqR zS6EJ6IF&}DS$cb6VrpD&e9fj%--}I`!l+>ZDGDWnh-flVs>Nx1Ik6rGyj9W|T#QTQ zNgFQVE;O2Hv{DjEhWh!UGD5|a8Zk`0N<*<}G#7WhMk;B1?{wImcNn+5S0Fobe>CLZ43)`c6Me#Y!;i%pb!jQlA4t28ET#Fgar)O z$+SuhsU*~Z(V}!ckwChFl&51Ms5E|l?+mMT94ENmY8@$6%kT+ZC8aygWq**13bnYDB(xHOh@Yr{Km|b(It8Htgh5;;41_4v zaw1V@yq>XWFg$Z#gV1DezL`nQ?p>FhGHMZ6Q9 zYZ1ojZfv}DIJYbLZGgH;T^{y*33h1F!(Ef@alsz2hGwzABj)LDf(5`uJ z`XYaERA1j<(V*{J61@?bhQzY4$Qt*b9-erVIwRAxDMQ+mz>Kq6kUOcm_?RfOscdOw z*)1sT;`(R3dY1~5jaF6EI?bwsz zi>VfULzTTVJ(HEz`1Z|LYz)X(t!H_+;~g8y(!#?DjrWc`ePcMfr>(k6J(w3!p&XhL z*<7;j!Emf?;kN$lg$+&p8OyU!pMc5dFaf*v@y0hPC)aN3>rUzHACzURrl-%(P-*D= zq9XXrH0_l8Wu1?Q8~+G*voAdF_zbwxW7>ZtH-EaBS8ZpuW`FhhW-`5X^Mya#km|||S@^H&{;c0EX zYj&2tmb=prcVr&j*N&F1UN?E+Obd}Hk$yNc%_rAV7mL+NY$_R7zsXBq*4qBjEd$O! zR6FhZY~8Y&Aj8wE{aas0%wGA!Uh|&Fuct}EQxB%t`o5^)`xo`DVFXq)`XLo!cf*E$E^*uS&uWcJ?35>S`mjF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bW&Lj2^eG z&hp(U00BZ#@q@u!8`TWadgDcru zzGf<8X@!c zwW9s%bk%NQ?L22)VOq&d7n5&MX_+a2`7F2n3`59h%x%22C0>=aHGhG}hdV9^%eHU2 k`HQai&6|Zg@0ZeSX~!;htzTB(*JS;-NJLR+Et0(cZ}EDS1ONa4 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_list_process_12.png b/res/common/usr/share/osp/bitmaps/480x800/00_list_process_12.png new file mode 100644 index 0000000000000000000000000000000000000000..30937231d324ca05d4f92d51708286e8dd8cd87c GIT binary patch literal 1796 zcmbVNc~BE~6pjWWhoC5GMWsuCDo3)rAt59sLXr)a1R>BN9x#Mt2@#Tw$&$oWE5z~a zC}I^09;HQ56e|`hVsyYkEGXUwDj>`#B2^Si#CoP$T97;U+F&K#k%uz@*OA=(#2yb=WSKnA^8ODliPe zb9mGdr=;RUK#1v3fJKLBawrrALYZ`!32~U5V1NO^5C}6sh)shbE{n~DVBq~jCDe3^ zEUpBJdap&Sc+_kh*K$G7Xf)D|A#_Zq1Yr(`140at!JrWcntquEmzii9z3-?61l7xR zDlM+UG=SZrEECJac~rvFkr32cvG{{wjsAV2h?IdQnHGfU5U5t$;~GZmaS8g58y`jM zQ%xDTm+NnsZk9ci}0w#30gO<=G5b^KrJLgSj=MXgqm>Lzo}ev&8Rqoq4yW));Xw<-pO|Y4<{n zy@g#Xx(2O}F1%bml)mcu$<)l+3xz$pKJMHsnu2EO@_l06@M|e+Y}<_6el@pS$6voX z_NFA?Hsx*UxPdu)oqg{6TEnB0Z2nG`&qv5 zv9$N$!g99`<)Y@Z?rVh|=@ZsAZuqX*Hz#(x_pTsP&Smd0Pmi9+_4Clwwp*|D*`mG6 zudH*rw@(}~)idQ)R?9g+ zPYUKhC7rd?;`eoBET%i3taHt_M2051wrqTN`Xl@r39Mw_XJL=0M=r|-MHk-)vk%+g_7x~4}c|6Uy-eG^M2`>w*79sVKug;STU4( z`B_W->?_Ki{quJm-Q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lioo#hp%u|Ov=C9l1pt#U~ zY;iN3*kJ$a3p+Qvjce!~K<&YsK{hX)61(j#E~33CGYP&W*JHa+&K$V*aAh`jWJolv zCG%$PBik_>PFT3ROWulYh2PY?b_c4y%WLciYK%ZqL4(AG_d`i_JhP#}c?Y zCd7GbgJUaNFbnbUBhJv#keusT>G#7m&$7VEPI}UbLDP)j%G-xP?`oD*tIYMp`@) z=wY^(c2)@AozJcNp?WLZS2>p8f_48~Z#Q?wFnxdNfq+-cOMz>O6L+ZjvuYL^oBPW4 zhTB-2pE%qUy607bKGoG#hTZlVJG&oEbFp=fn|mnC)oI^VF!_xd9{by(IRDNui6*$^ VGPeL3+HU=0$)%B!v!bLe{{TUl#8?0T literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_list_process_16.png b/res/common/usr/share/osp/bitmaps/480x800/00_list_process_16.png new file mode 100644 index 0000000000000000000000000000000000000000..e81933f9341f1299182e220497164a282e32f8d2 GIT binary patch literal 1799 zcmbVNc~BE~6pj$69CB!&h$Al1LFC9CLSiB%*+5bVM~DbiEg{*E0Lg}AAqiMiL=

{4TaezwND^-=M>Cgdc~*zzW15)j^nGIh+ImLbWs*5<^nC zDZLY7V=$Hql_U;{6NR&6u$mw>+YpRuEsDlq*g;0ERF(=MKoXR!(s1w-Em!e?O3uM= zqKil(Ee}$v1X(&LCM!ZB%Sx3o<@lft0Ncny3DgiG1&r!6jhwCX-I0)A=+Snaro4uwX8Q z&j1;ekU$=fw}2ID^oUd=gBJX%P`~q7+GnvWo(_^CuucNQX$ut)rGyb!uY|P#FNRJa z1DjMDIc(6IuV*e=5YnkKA$f=nRs*y7WvM>lKQJVOK_LZDXsGs2$32IY|DT)@Q87ew zar~!P7Pim|G*3U4KDzkWJdg(M7#-Rg_JTwK+Hnja7%VXkyeRSf-aQzXzjO1=#KdQ| zZMN9pJBflrUgP@!=9)?QmdJYz#Tm8LZRw{wZQ7dgO}W_SeFTT-bIpJ&c4~>KH_Z#q zG$;&0!f4oIf2L;blj&C@-P!uSSMN5PY+|dgIJFD~x$fUR`hJUc#o(gkxAFZBYzxPi z7wX;RY>#BiKAPPiUvT85!D8Tga^6{w+;QJ3n|_9*bg1P!$vbDZpZj6Q4PQq`bzJJ2 zxOTKs>sfXP>(Z{Xt~{_e%(>o`8!f$|oeZctrrdbq#L|F6wiJ-Q4SVad58=kGU)Kii z61kLkSLJRlA0Kdk#6QY->@AGn=&^EX;kHI9Phcv4Qc(Q7wd*pgEGZKwkLpnj3>hgk zc4sqVdz}AlDG~lb%{wk%l#yhU&>v${nBE`ez4Bma<0H+UW8Df?>F-ZYs=bc7-K;*W ztnTZA1CFhF^ZxILy`zXwx~Fx>j=i-S*MLhoVx`=}&1P0uB;HMF$Z2?}b~LeVC9%C%U4bu8-BC_IM_Aj(UT5K!9l$o+!iX%f zGu9s(?vIn%Gr|)q)`dKE9mWp(PB~9Uq+`Fue6cIodn|g?I~nKgt1X~f`usAp)@{dn zQUTzQvP{*9EvjfLwcfGD`;-#Ib$X4sTPW&64PdP@Xv}jmdu_dQ$Al|QaQelyAW!HBg==q!1KbG?@I^XL)*D_Hs>@g$~ zDs?gVfd}i?^)JtLkTtCm_8s|Q?9Al(9fQxBvzLy_ekwX$?v~~hb33BbZTffz?Pg7r z$#d)VOEzJ@C28YRv5wU6(_sO}_YXoZimFRx)Y^2v+OF`wQrK-PnkwQ3p=i>z)dTmf xXja9Mj*9u2TR2 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_list_process_17.png b/res/common/usr/share/osp/bitmaps/480x800/00_list_process_17.png new file mode 100644 index 0000000000000000000000000000000000000000..215eb4f39d0727dad6e25d63f04864a2ff6a678c GIT binary patch literal 1755 zcmbVNc~BE~6pkPa8Wb(4BX}$UMiIzvmJN`YaO8rB!88T|0ZB+U5FpvOSxBHB2%@NC zp`cZ;%%~L=TM-LVDONzN3XFA7s2AAQ6U7#)u@$Y*4TtR?jDK`zc7NCRz3;vEdvA7!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|toPzoV;0S_;x%U@%f8Edd}UW1 zl^68qt*l=;sUb_#PgK>btLHuI2`Q?FLH_j_>GMly2jddC{(jl<0+Y)ThY4MXV0#D z?|fKRI~=+22=#cv^V^WW?2yMbSN8(P2Z;LR{D;5qb&uH)4xu%l$DogwyMpd;(wrva zX~oPKOXobuMc%}fc_|#GQlmH2r=>0E8X4JqblamMiY?_LZ|GQt*^*-Y-H3%zf@+>3 F?;raToJarw literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_list_process_18.png b/res/common/usr/share/osp/bitmaps/480x800/00_list_process_18.png new file mode 100644 index 0000000000000000000000000000000000000000..ab0c642fc6180ad9d18fcf9556663f1bd89911e3 GIT binary patch literal 1712 zcmbVNX;2eq7!G&=9t|KUV0Ddxr8dcK*aQ+uFsB3z#6Xq9Itj@JB1twR8xnAIxCV;| zTEU7(3qqw}!M4(RTO3agD`7ewh>VV)QZB8Cwji_{4%;7$Ke{u!-}OB2^IqR3yQ0)a4J94e6EbX*T}7cBL^MAG|PO3>Jl|F^j^85V$Hd0RhB1MIs_Y6sok8 zMkJU(n4#80$6zs%^(-Z-qbTecidAR8*#tsxh}ED_CLN0Kz5=|&_fJtA6}o~&f5NFf{`*vi5U=nzZ+San*xiDhMz#_h83xqX{T0>&X& zGMhBvRE$Il@KGZI&?z8U2{Isn0aG9tWWvl(02&B^RES0e1IZA`q6e}-2$+0GxSCO= zX2}GiNiBTECM98*fkmZSEEb9-fPxwmsSuONq=GamjYh^1WK)_RQ&`D*(~2nz0>q>= zY7CeL)dO~miUib*u}Qe66Cvmf63IKmdeda0@RU)l3Ii3QfK;8%9@jY9gvpS9-Ix|_ zicT{iR2gDI%|<0&5A}*EGM>Bl3)z9VH>^mb1}}<2D?pWI9iqp?0yYUhp{O(}77Pk` zJb{o0^I=#>gCHKC7bxHbFob+T02hYnQ#PjK3Pl1aP{a(R3trQeR@8z=iMnr+3#%L7PPIZ7Z3B^!T5^4bWQFICfY|`je zsKsP2&qTBW#HdL{R3am)1IF{q(oCZtBoYPEKn4xQeV;z=39jn@c2g~SqCQD|;%t{Q@y3)kX&n;jO+| zdu}LSyQ(-Nz{&2AThHpA4>~8!^v-l?e{J&HE!CcF{i&&Cg>G3-of_f#P8+mk zO%9p(prgDnqx#z+FV5le{gGw;wzAR3@!7LJ`{wk^x!oRQZE;ykI)C>7ePh=^O)D#y zl6E22>Db&Nw^xoS_t`U!XK7o#J+j);eb-rIhZhC+$QLdB@_r zy&PmY`}zK}zpM1K9f_$bDOf$rRTgKHDt`6PIk~mUQSy0QY$VrtsLt>5>J6DqcWV3w zy29dZ-OIA?>>9}5y`dvpdA@%6x!U?uQikWH{?u@fk!=liK05|`MT^y3;#*ZL<-q)v z(YyZ`S>Wx8G|uTE96*1e-ab{|{@chXC%?Qqzi&7qF?G&g@I5fF)Kc8*bD7L}`PDu6 zYRyLTtB~P6x3>wGi!N_Xoysh)9o)0qqDD`gMe10L@PN487)Mxw%Mnv2f* zW$w%4y2smgS-~S&#E!3f7)#oQYL6cF4yT>nu=CFvOt(e+Q+#W~-sKK)hlX3Ts;WmI z3ngK+uqX4`RW0^&$nlIAfL^$! zWvDiR*Oe$boA}_hc<`XXvU8PhL5tXVS>gw73;DM7L8CTvylY(Krw0o5`bk|=Ba8iW zfAAXnQB-x~3xo9fyx!9Fdl_XUZDkvwV!Z literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_list_process_19.png b/res/common/usr/share/osp/bitmaps/480x800/00_list_process_19.png new file mode 100644 index 0000000000000000000000000000000000000000..de80cfbd6dbb974271a217d156bec296847a0d33 GIT binary patch literal 1792 zcmeAS@N?(olHy`uVBq!ia0vp^S|H591|*LjJ{b+9BuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFsEgPM3hAM`dB6B=jtVb)aX^@765fKFxc2v6eK2Rr0UTq__OB&@Hb09I0xZL0)vRD^GUf^&XRs)DJWfo`&anW2K2iJqZ} zfu)J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Av&p zrtPi0;Xm>X=`}fBbwyTKE|ap;qFk#+7r56u54mNjjyjB6-7kE2)niWXjGf_sU2^uD zk#O`_&oKF=+&l55@ac%{HTR1HkM~mKu8NpL)hfr@+k=63hen&$)FhGDmZ{YhYG$x} zUCqhv;o%Cew8ohFVd+nWo)`;}oLN+x(=l^FR$yj#b=;Vqg)>XK>}B+8>lZR8Wl>lAqsR$Fo(=xk)*B8mmV04m&VA+Sxs4;u9t>&?R|c#Q5aqO7qY$k~PVH$g{uCe-N?! Ns3an(u#O*V{s+=vzYPEY literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_list_process_21.png b/res/common/usr/share/osp/bitmaps/480x800/00_list_process_21.png new file mode 100644 index 0000000000000000000000000000000000000000..36957e5b59c01d417b6b564ba1d310d031ec836c GIT binary patch literal 1796 zcmbVNdo)ye9G_MQsjwb}x{WO<=4A#m8D(B;Fw+>LoI>VtF)?$;%w@)-w6ulgIL_)t zB%BQ`jxC9nNORFhYY3Mk7-oXcWqKn?@lN$Ad5+0%N6eDthwr6*M4~P|>?c z92`eM2jipxsY)<3l`9aZ#*4`k^fo`hS3^MvWFRaAG_nM_ilU*SXL%{e+^~&B1G6S@ zJQY1BDxAXu=#UZwNEn=l80UotyoeY)5l1GH-2nm)kHg{#Se&;99!DX0Q*d}-{y`(& zl#&<OXWmt_+fyHBRSeeWa*Q~V)=7ayp zSkzi2NKt@TKB$6{lw#yQVq6x$NbdgIk--pAL)oE}B9|geU_jy|87PO@3@REq!APVM z3K7So(HKk`kxnEs33xn>PV;8aJiVB7hNnLfPg>wu49g^W6G(U(nZzU#@pvY|hk)}Y zBVZpUkwz!ci3?b^Tm=i|VsOE)6!ANc_4!XMg{}mJFr*YfP{Kk5@ZumCQpG_EfF4T1 z;DKFIxdc+H4A(OkEdx|alR*hf3CV!j{8FTg`1fJ4ya_lj0uj-^c-(VX$^Xe277>Fr z6vw}cWnl}cK*RJ)=_89T%>&Ajj!`15A+~Y5i*y{3&F~j!hF_d)d_KJW>uwvXoJ&hv zCBe=5uJu}Nom-@n)3nU_a#Q@o?zm6u;Bmd9bH?vZPP%6&n47s6+Q!6H#htW{&i1V1 z%C`2)y3+nB)BSp4bxZo2HZ^v#?9~LUT$@QcWh&xK5lXqTzJd-T{VHA8!#m0MjWvh6 z#5qw!0}aoSRCS5=^{et9fSP+EBo?89-C>Ryf-I)eQR1MWOWcL@+v`UJn;B4LvLe&04{O^0L(@he0pEBBrzdzG3`MjQzn!LM_jH``t_C7j`T!q8x83T2|9;KG2=+TAN~7 zDR>8#TNQ3OAJ3!xbu(L^D=8Nx)Hg)*cqI8}U0GhtuEi2qVXjfBAJvSecc#@(ryZyE z40XHC{3IF9fBQt#814DSc3s=Lw6;;xAl}}idW(txuci~{R*o8d@YY|#)HqrjQ*VTo znB8Cg8)JxPXP%#1cjRKH;Jp9ogBjNCclh=X`d#cC%!*o^OAax|6C{bJhOA6p5^Es%R}pOmh$2_46_F?7pVj zn|rL?T&tHHt4Xss(p=P9()+|YIS&XvD#^EIYreK*&37wy$*P+%{Fm5FE~B0no%uI<%fQS4 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_list_process_22.png b/res/common/usr/share/osp/bitmaps/480x800/00_list_process_22.png new file mode 100644 index 0000000000000000000000000000000000000000..f8735b12df3c3c04a4d02ae167181984959ef369 GIT binary patch literal 1759 zcmbVNc~BE~6i%@L1Qjb&5g2U@8ZMLFO*Vw2M92wPAQYlf0ZWbzq>yY#76_4!ilC*I z!#WX>R-nd$7Rq5oG6Aw~{vK!ad1l2MbPHE@hv^0ZwJKDTcJ zWYRPQOXrejoJxp}B?(YHLSoWDssapxNI@_SflKar!ygFbkWhT3~LRuiNaF`7-c#DqJe-$V~=YZZNTD? zf8CfDZII^b5FidQpjmnaejh5IIWnHR*9+N!xHlY$UX5RhEJKJYvNVVmixhIn_z6v^ zR&roa#ODh|d{_X(B02=|1$>r}&j=C;gbW@GG3RW|#}$E0F%DxhMKBCOB03vp2-y&e z$rc2&AQ78C$Bon)Fqu|?%;~Ce-C1t%Yq=bO9+6?FUW%d_a}^MqhGM884b_nZ@k|;- z+N{(B6@W;q7>^<4QV>R9Q8cA52#+3Y^)h0z-zi>=Md58JqPyzT$FHLznBm%9lT61Q}M2I6dWUt6ntX@p--%vb@ z#j5H9V>`vp-EiOA{oK6Xr9oodw!K>%97_gLgM-3G*?x`Qa8+J{oHtz7P3;JCz2RW0 zZI=IZRoWl*$!52mb)c;6*-NY1Q^=4=4)t2{ZE3~K{0h@rzVUH|u5zp3mTD)Oq+4jmd z+xqaqnuTeSi2lMW0Kxx!PmOKY#$ELOvV(rwq)l?Ng}<_H&-0kpyUc=?EG-r+lsFHOAY9J>9hb!_)9J{h)4UXHwp3Vnnl~G+_{2bmyjzytM_MnyNacdQLq{NZ;?_-*axU+WyOl6vYU? I<)`HT1CZLNO#lD@ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_list_process_23.png b/res/common/usr/share/osp/bitmaps/480x800/00_list_process_23.png new file mode 100644 index 0000000000000000000000000000000000000000..26b9732cafab841074f6b9bf60b36572a041e16d GIT binary patch literal 1806 zcmbVNYfuws6bmoW&?quQU^t9 zMYMo`BSl0D@iA0Tpa?#B`k*MZh%#E#N{b-<0cxf~H#}^AF#hPy?0&Cv?z#7V_s(X9 zZVH^^u*88xBFzy6!C}O>*7Dlh5#Poetx?3V7#Bw3Vl);{l41ynCr4utK%|i>kT66l zPfln>{75A0Sd}Caj|>Us$WRSMYQa#98XdtVk^D9oby8V8f&(##LZ#)BU)5b911dR} z9Kj3$Lv#W}sR~NL5OK;Ti7X{v#+H*etOxvz9KwJG!KHvvqt@y=bhM>`fguFMb)lVggNEy{A)lne|NY!X8aZRB0co_1p z8#AKyl4Ko14MX&(0h1B;5$irpCUW;-Aq$Z3hO-${5tkxW!>G)lLA1CC=8}mMid-e< zFhC)n4-5GW0fQl=K@eZS_lEg&mQVoGc?^g-ZDS@b41=(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ugd85Uexq$+%?yUoQh}LHq*!$P1Wyj+elV< z2_dJNW?1tgc=_UsKhK{Pmn}ptCBg4h9T--=UDKZ4EopD{rUXr=7gisi5|pV-|1qP7aenDTYn>{Hqcb{pedwn_|m@h2M4ISHg@NY=DpL7yP{f?YWKUb@YU-K z$z7_uJ`r*0l2ugt@|lm$H}g6p1!%~=?fb(szOcSJ`S$O32X@WTmGbWy?nBSj>D$OW z+7X{if83I~x*uWQGLikFca&s$^UZKG^HWomz1zLB@ZhPpdQo^2ZJx7fan;$`1=3G~ zlXDDBq7xh8H;#bamEG%(9N2|z%6a`dGA@E&(UDQ8>l>IgX!Jm+mXw*euW!A?h3EcyKLiZBEhkE@ zzkF9Vt>>C)3s>Q8d`(vg_TVvrk7K9zogF^Y=X#9#l9tSJ-0Ig>Shq$jtj`tZPr+6(84r?b95 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_list_process_25.png b/res/common/usr/share/osp/bitmaps/480x800/00_list_process_25.png new file mode 100644 index 0000000000000000000000000000000000000000..802740bbdfe06f0bdac0a0bdaa33e72af478394c GIT binary patch literal 1758 zcmbVNc~BE~6prA5fD|3DBE>F290KOpkOZ?PK$1-qftW%VD2fu2g#?mpOcqF}MdWNn zLC}iYrhrAK1*u1C6%nZyB7z6B6=F=});n?T?M72xxVARA0tOlBl&4IWb# zV8kHTt8|zO)dCiavN$vu;}UUCCqmHZLPOsg)*2=gg{O>al1?hUk7ufi`yriM{@vIfy&K`@typHLJk z1;n5U`FvQ&X9yS!Asqzy0=^&2_hktMurH4RGN)`z$Awvbd_M*oW(pY$5ERl^Fhn3v zBoeSiAWI~Gc~jgVtpSs1<;aw-3fG17 zfk>5BfuL7bm?t%M_V24J=nQnsn6dT81v_$_ z_<6ynqYjkk2iw{m(CysBfW)XyC5=j zi=a=vuXI~d!r5S*9hP&&Dc~f7$EX^q=m_y{wDsmSwx06=&tDCz>$YM=Jd%IptjO&1 zcKu~h#Gl4+GZFzp?m*Sa7$d)lnzqVFw7T9vDSI{G)p+Jmi?ln9uC_mFz3v9-X?@Px z!QpIkXGShR^Zv6@tDVHdAFOeYV$!!ZT;xB>DSW!yhD27D9lg)YKAu=+DUO(IO z-u16+juhESe~M4(U89xTLC-Ij)f{+9luO6D4|Z*I{Pj0qNy^~+)wdoKMiye}4fM55 z{_T=-dkAPPuG&2N^~{&EV!wd`N%?!=qWD$#L-Z zsReuvJua)LtfpsR{j*p}7Sk>wt@UgB0$2CH)OFQ?zIS*@SGQlj3yUKQw1wE5g8rB0 z^8NZ_l~=Eo)ZSch$G7bZlk0&$78@JB(`=tJ^I?Ou@DMCEudMJXbs7~%*H!CkLl+$r zB*zlA?eA_TRh%vK8a=$s^NhK!DAVlz5Z;^aR2*S_&dy~+gsH2A8Z;^$VbxZ)U{n_s|Rbl2D5aIif?Ok z^PV?9xzy(2?2yy+faiIk=gIHs^>1d~8cN=gwg1hQgvyW8?P!FUz0Wu!TlW-O{y0HG KG5kG0HuE3HS*XSU literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_list_process_26.png b/res/common/usr/share/osp/bitmaps/480x800/00_list_process_26.png new file mode 100644 index 0000000000000000000000000000000000000000..e7d9afffca8e17e98ab1f673505a841f456f9a49 GIT binary patch literal 1728 zcmbVNX;2eq7>*z`N;BGyS_=Z(fFKCj-CRf{K$1-$LLlXmN<~7lApx=*lf?uCMUbjh zJP@_$h@jS{RY56KDHTvaz_tvvXaPs6MI96oLGkDz-5}WhVEUswv-@4o^StLbyGpf)2>bi{gAfyBGJQ#euQ3xN6lPz{=r*N*phl%Z zt0%NL23Qpp$#@3Ar<0z(4ne1v$=(QK#>qsHDFe+4JqR-(P^YuTHGwt~QRqKzOp7+g zWa?2c3N_*x1|?Y!wc8Y#%-w$*vI0qOc##GzSrkP&f-5t0C`L#TKAk*asI)2`8xjkJ zh*-!LvDsoK3=2gW6C>2l`TW3x@Z$MgLLt>#%Nkjv%L#($zE=;oWIp-8?9)ZcDAXYRf71(&X(fy|dn# z$Q`C#Qd2SPLs4Vf)!$wEoXYo^%4*U&*NwbaU?)3XGaA`B&-YaE2B)#vuB*dNb?Z`E zG)*rC=as9lqI{Re$U_Oi;@zB8$AY1otEF>G4?LT3j@j+$5O%_HqUe~1CHq!Q!*j*K z5T#93PVec(?&D=n$)3XQp5~cdt&QbCSjfeg+gSnWHfQP?0}dlS*FBzpbg3dE*w#Z} zGMu+{clf@pXii*VOxdin^6Pb#s?A|i!521ZfkN|1`=o1MQrYeX^d)sg+mXe$6U(W^ z=hP#&Rxp0C8yjb7ye##huKRA9hleV+rVhGx9y)one`MjNS2j6yijsyafmBQGTVu}g zPn`FTt#=r*DX!A^KADsMAoPx;<6zyYd#?7*ji+BZZ}kc29LU^()_&}mpBI#cf@}9=Mj`_#kgVb0Jr-CjndUzFhy}bmjbOT{15T9bRL}-?*TP33^8D z#21cmd+2dPS8^@18gDH2FAWfMp6Hfy9_J1eMhUi9mNwAp>pa%^D1R>U+4ZUSqndsK zsp+2|e8OXBbf8> zo|PRv{F#L%_qX^Y=Tw(20hfLdTjt|)_o>UJ%g25ixbZT(e#5duKYm+$4<4=>GkJ$P zcVcG?lhnlg+&}wP?`rK2{W|Lk)TE*HgxlA8vF^NkPezG79PVF%5_u&%FQ@JJ!M5Kt zBRywU9PN`P1*arDRnQ+-*1PCz94q_T)AOak_LgKL?{Lw}?8KzTE=%Fbwes=7jUKI| bA-OXseBof4-u02E^`9aYM<5l#q`bcYIrN>- literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_list_process_27.png b/res/common/usr/share/osp/bitmaps/480x800/00_list_process_27.png new file mode 100644 index 0000000000000000000000000000000000000000..0e7d812efd0c1ed60ee00386f1541c44c0f382d6 GIT binary patch literal 1771 zcmbVNc~BE~6po5=R7Wh<160;%EK!o(4GEZ)7;^yu0yG3g6vvR=K*nq~Zk7;3MaBE5 zVk;^jmRhLR6B$sHDtIDNL{t>T3Lf>Sw~~4gwHp=N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m}6`k;sj$fl*~hWct+sTSt`K{kivOF}aSBm%pmsb8Sz@ zmZ-^|fOzoqspk?doJij`I}|RwKkmq)Q)gDC)R$f=xV<^xQFthujmJc`jIX-&{h`CF zGY?%`dj4LqkJZ1~rx{}vdzE{32HxwxbfJ6Bo|ZdLZBAeRWz9E>dfXd(F;t@5ZM#Z`_3BFEx&FKfs=FE4x&TyUlkR;NvB$kBr>S4roQ| z%;T?4x+^~FC}>LSh_aaLn|9d~3WA)~ehfx6>38x(!;O*Ai?#TlffUe YV_)anJ*st=>s-Gdr6NYYTRJoQAGNHsQUCw| literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_list_process_28.png b/res/common/usr/share/osp/bitmaps/480x800/00_list_process_28.png new file mode 100644 index 0000000000000000000000000000000000000000..42b02bbdac45c122d6575cb89e8ac8ed00f11b87 GIT binary patch literal 1782 zcmbVNc~BE~6b_2Wp%qlLK-D!?1q<2ik_EC7Fv*5H7y?MZ01e3k0kRvDMFMznh=Mv; zp(u>hsN-Pmcp!=hGv(9~6|}XCf~BZ*REiv8rD{F85wZP)@sIAz?(h1(_r3Ri@68rU zLj7l3J6basjM;$!n3Nt@nO;i^`g^IheLX!mP$C%>P9{6BN>am8m@q7ZMoY693~yh9R-sJADIft)QWHGpNJAqNP^);% zC`8N_YlV2SIv`7jhi8RGD6>+PTou#T2k7X zLZ$MU6Hdv*5qy-Gu zD|Kour6vi$WKoeorc*p7?de1a8m(CT(J-O^kSIE3ph2MpAr>3dXiRavN9!pm{;wNT zqV*A(S{#((dNN(7r0*kf*(90H-KT|2K-wF0txio}iXsgomFXIspaL--lRjao)GCz2 z76}BHNWc+tI3gH=1VVu)CUEx<2{Cs*2SO%oOvM%Qy&x}`?}dms90(G@d?6nZ3Oo>) zD}oUWfhW0vgq~6mN_ zDl$WFx}J$>F%Mn|{CiJL-z?zk0!7(c?$^Q4?t+_T2Ez${Fbo6FqZaKJh! zm{ZDfk+iJ^Vy~8rO=qn<<|_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aACn>3T+@<)La>8Y&G{V+vq6zldxc{RN?+esqXQXOO;+ANL4X`hRjpBb}j{isL`U zGPXrlplSNG^vT87=0TNY$EeBHNS#vlC)sg~2wsRt+xDusYDZh}w9S{0i}vd29@Le3 zU4dO;()`jLW*$Y<&Xtbk3te0>-J6=SNDa>zywGx?pZjj1;mqS-%-r29>0aB*niJ9< zq&ORQ(QoUI`PXLdFU?L%JCTl*&Rl#+f7Q0i>$3zYEnFWsY2eaCm17?+c{)RzKj3u_ zC~K*3swhu?3Ug{oe($_BVUv;TnW##0^*ZtO-2 z=VMJvuxl;O0=u`}kuZ|J>iN)1R~=PQ7*L}-yv$x`-{DYJ#i=w_+ql)rKTU2#9v-#% zSzq?3&4wLXw5hSKuUavC_B7omMdMu8PRH}#CxCgy+ZDm@*9+BqgW3YC2L1D8iG{k;sb#q5E5KJyr(BS5Yd4Rq-nqer$t!?4D>-Z2lajUmtuEzp{Z_!y$aKS< zZDrGiNy0M^{jf@AP_ZAcU@IQ?C4Rt0D49hYv0Sz#X<;vQU?Z1yRns5gosgGVN%Z+=S#@9Hs_Ud?=Zl!)v@48eJ61iyBjpPHB?3quD^h68it`f&1JL5eHyQ_1q x9}NRLstVS=&eJ!)M68lOe+i0he!nPZ0;OjUP-UJjH=6!S5&S6Lan72J{{WT^zoP&E literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_list_process_30.png b/res/common/usr/share/osp/bitmaps/480x800/00_list_process_30.png new file mode 100644 index 0000000000000000000000000000000000000000..efedad3824c58c7550e1bf13977eb13e00218429 GIT binary patch literal 1816 zcmbVNc~BE~6b`2m1*K|HE4oHJ2qe3kgB%i$WD`J)(hvz%rW%tC36g9~RuT}4f`VeL zg(?mnfQq7)dLSx?ieME1QABAyNARcvh)6w(6|ox-+dmxt=+5l^uJ3!_d++z&?1qSW zA+9bHT}UL7Ygi~EBSxz2B|8(}3+L+=5yJ#r9F0d}8r-5Zp`>6nwiE@z^vYONhAP#G z%j-~o63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kACWv|ysawDPsJ>=%n9koZD#^`eHy60R!#hp>RU+T9*V(?{^r@B;^Rv#<2 zZ$8P+Tl)3sFZ!-9{mb<0^c8qpyw96wS!BD1OOBSUy&9GC$NTrp7T*-d@gzyRd)9^A Rygb{#Doi{NIV@a~`VSjE!bSi9 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_option_panel_contextual_popup_arrow.png b/res/common/usr/share/osp/bitmaps/480x800/00_option_panel_contextual_popup_arrow.png new file mode 100644 index 0000000000000000000000000000000000000000..60a32dd2d4e0194828b18fd36995a05120e8701c GIT binary patch literal 3022 zcmV;<3o-PGP)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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cLXcYC@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} z0002_NklCELGKxRp1Et24+CLo{_39e(X$*jT#xOi*Lp1{g4b=0K_fvvrz6b0f-yoN1@(k0uZ;wuflPY z2|(No%5|LyK->{u3+I)%oCQFf2JYP~z*(?$(=s>-Txsv%G;qwacF{qgo@bqd<3PE{ zI?4OL4*o~LOR;h}^tx^Vo_n)tHTVKRSN-UBtN@3=J1}qG{XvL-|5x!d02G@SybEi= Qr~m)}07*qoM6N<$f~SX~ng9R* literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_option_panel_handle_bg.png b/res/common/usr/share/osp/bitmaps/480x800/00_option_panel_handle_bg.png new file mode 100644 index 0000000000000000000000000000000000000000..b3302ac20497baafac21e31dfa1d8fad0b6c39b5 GIT binary patch literal 1224 zcmeAS@N?(olHy`uVBq!ia0vp^bAZ^7gAGVt^{dYWQj#UE5hcO-X(i=}MX3yqDfvmM z3ZA)%>8U}fi7AzZCsS=07?_nZLn2Bde0{8v^K*7iAWdWaj57fJ{tG z$}cUkRRX#c;)UD-xUqS~&|m@vn0`fKfxe-h0mw@*g}%P{mFDKcRTq~8r6Sym)!^cg z%7Rq=pw#00(xPNw#HA^NtSYc_E=o--$uA1Y&(DE{Vn9ZINq%ugeu08>u&JJ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olling_bottom.#.png new file mode 100644 index 0000000000000000000000000000000000000000..ee4c207978f3dc4c8e9e48bf173d642e96897ff3 GIT binary patch literal 2848 zcmV+*3*YpKP)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 zfo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w 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;Nkl@x~E`ZmtQz+C;=>uMzVZy7)jqI0-18ggpP)-Sh1Af vuGOw%FHRig3wM#o5E*|xdH?_b|NjF3i_RPa{e)lm00000NkvXXu0mjfcmPEM literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_overscrolling_left.#.png~HEAD b/res/common/usr/share/osp/bitmaps/480x800/00_overscrolling_left.#.png~HEAD new file mode 100755 index 0000000000000000000000000000000000000000..2c31a868eec83f7bf7c8d26943f4509887ff3c7f GIT binary patch literal 2845 zcmV+&3*z*NP)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#eyhGvpi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~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;Nkl@x~E`ZmtQz+C;=>uMzVZy7)jqI0-18ggpP)-Sh1Af vuGOw%FHRig3wM#o5E*|xdH?_b|NjF3i_RPa{e)lm00000NkvXXu0mjfcmPEM literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_overscrolling_left.#.png~f13742d6701484182d616a6f28f6c79fc2f86429 b/res/common/usr/share/osp/bitmaps/480x800/00_overscrolling_left.#.png~f13742d6701484182d616a6f28f6c79fc2f86429 new file mode 100755 index 0000000000000000000000000000000000000000..2c31a868eec83f7bf7c8d26943f4509887ff3c7f GIT binary patch literal 2845 zcmV+&3*z*NP)KLZ*U+IBfRsybQWXdwQbLP>6pAqf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004l4008;_004mL004C`008P>0026e000+nl3&F} z0000;Nkl@x~E`ZmtQz+C;=>uMzVZy7)jqI0-18ggpP)-Sh1Af vuGOw%FHRig3wM#o5E*|xdH?_b|NjF3i_RPa{e)lm00000NkvXXu0mjfcmPEM 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 zcmV+$3*_{PP)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 zsJ6IeNwVZx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;+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+Nkl5wOWilV&y}zL>pH1#B!}Iidg+IMY|O t=)fHhFw$%5xtl`PUmv{y009600{|o72aYuDY9#;w002ovPDHLkV1n!jL!$ry 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 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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v};>)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=NklEd|Wb3e4aPj-D(~&>YpV xM{JHYHu*q}AN+7coQ@uw%W+5Og9h;C834hFBO(d^&x!y5002ovPDHLkV1nQgNJ#(y literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_panel_bg.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_panel_bg.#.png new file mode 100644 index 0000000000000000000000000000000000000000..7781aa03527376a7068f21c624a9d206f9c09173 GIT binary patch literal 2848 zcmV+*3*YpKP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW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004C`008P>0026e000+nl3&F} z0002RNkl75KA*Wov zV@M&1HMGG>5>!w@1r=0KK?N1m(r#h51#lSbc>=gwp)UX@0JlNN3BY-FOR_ds=Jz0Z zTynHPv$0jA1)7CzLRz8G*k+^$8ih3>y-<+6j70W8y;v8r7iz`2krB{VY!@;LTEliD zBcXHH5M(s;7aNAmfPS%|NRlW?Z^!-T8ValEKPsr8f(k0=U-bq60RR630D$-&={rEP Qr~m)}07*qoM6N<$g1aq!w*UYD literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_panel_handle_bg.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_panel_handle_bg.#.png new file mode 100644 index 0000000000000000000000000000000000000000..61c9c934a595aee83e8965f1b9d7c7b3674452cc GIT binary patch literal 1456 zcmaJ>e@q)?7`_a{HnN(9OeULg*8`?R+Pf>iyn_R2uN?^GM`^Y)GTqUBK!NKWcZV&+ zNj8^lDh^^m*w*Y16qINYi5tNUnK~y3)6v4At(T`n=O*Xm_b@OR?YY@Y8T7PYzRtBcJYk06i9FZD6%^!Wcorc z0^4mAvM<(%8F?Kjwx?DJAh#;hY^^G_5;i0`2~Kp8vH%Mt26nM!4v}bP> zR}*Z7q=`1H){=J=QY=Y4iK0%YQ|*jab3ze{69j=`8dRfE$q1EL>5v$g${~iWDbPT) z3U*$ya}L<2$P{oD5{1Z4AGN^pep!dOdQ9?xp)Q6;aW&>^X$@#J{y&su{b*4#fq(rz zR#-Gw@&Gjfk*g4_^2HT~`AYGmP5_L=31*HfTRX+--e-5%IH$OR zHyX(_hbS=)D@da$L{?DS?KUzxC54EN#|?3Y7#hd*8X|>$(Lm_1cpQ(`)0l3JOLNu= z7C59euFcQYVC!;yqrmcVWf}G6gBv6VOe!3Pd`+68&6FD@Rx1VJ0Z)94hl>*^n)KfPmQp1w45KXgal=;=;V z3B9+z%oE#kg33$JTL>sy-i!bMidyPBO_~=@MSU1GJgkZ+X&xt@>r&s{a=+pu!ufjA zoIBx6{?OtZ3CV@!yHB@94!wP1K0Rmlzyr_dwfbE-ts^%+-qNxyI5l0JnxmeW`HH&Z;fTrT);-IL$S((eJ>%9d{!;p_ z`-9LSey>tB`1kgU%I5Blda1fH9ptZR0A$KM?DEN9F|P8M9b=bEi+P6(g| zN31=+ePi&Rs+pRaR_gP-;{)!)6=Ue9lkUEzq@@Q{H}jE#pg-?)a1WP;Lq>B)N=tR$ zMcn1mnC6_L~=* ulnO&pc*M-K@?3Rx=d;5<92>g;1weswmuGLaD&)T_1f}US>2~eGBmV%}=_1Sk literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_panel_list_bg_press.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_panel_list_bg_press.#.png new file mode 100644 index 0000000000000000000000000000000000000000..036e5b7e51413591bdaa6cd4fc1b98a59916431a GIT binary patch literal 1029 zcmaJ=PiWIn9F7jgsE!HK;RN9=LlCw3x3+7;>Rgk?7EB#&VFfQsleaZ&$&1OGO?PoB zs8hrpc2O@L1;K;Y9p-SzJb3UX0}%zi$WYG?>Py#l9;|_v_lNKMe&6r+es6g)cd<8g zB1BPCZ#E<6$$T^zJ>BI0VEJS(nFevXgbQc}S2Y(>69y_nkhQc~n1`BCyZRQ6QB)Ug z7E8FKUJ`X=FV8zTVy0EaA zE9#4LdcvT`&x0{vBmx%18t|=o+Y|jH-Ov@uIyh!&(175%B)w;gLHAK?;_#5o{vJje0^%Z-M4PK=I<91ofwO`^HRjF^{|W-PKx(iMyyk!7pZDpMU{ zkUPuri9~|s1Xd8j1QGUXHrD*G?G3jSWa#Ox>0lGtAW+oGXaOf_;&d+s%W2EnUb9T3 zV63k>EYEO3N-dzO{vT>tZM28;aNqAgg}q|UfovXnXu;LV#mx){p&U_ip@xxLL}nOsMq8g zoxQ|5a#>=A4KDVti*6l}?g^Idwk4Z(<3pQtyGz>ocnpGm}a7%Y(Ph9$7#5rT*dP_3rrYL+Ra>mBH!zb!qj}?U$!FE-&SN_x(D!HE@Pf zfKh%b9FMMqy6IEf8{grZjh$3Ebmu+Jtlp?Tn;zIaT&Yzg?UCPicjxohp<~{m;R{O# YsK?Krto2X5z85^qY&s{uNKN1T16CYLiU0rr literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_picker_button.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_picker_button.#.png new file mode 100644 index 0000000000000000000000000000000000000000..006fadc303e6167243db0886f8b16e2cf9e65d26 GIT binary patch literal 1133 zcmbVMO=#3W6b@=ds};mc6@)PbQE@k!Y@6K;yVmSxS692WY`1hN9?T}wZfKK9lW8}t ziqcyZ(UXGU&%t6nw4$ICdhpUids3u7;zdLe1b^_Lq6j)^yVXNcFeI6uyzl$od-Gm~ zTbd8mRPU%}7^Wt3Sjo|G3w^+b_4Lht$Xubrc9JTPR@_O-s)HC=$3+A(rrL#aNYw{= zXHbk`)^-~C0x4vhBn_KE)wc&4Fj&4=s^;jOQcg)PYtdDlEfHc% z99J%vgXK^VJ6#-%Mx#E5AOxsIz#XuN>IE#fuEL-oS91)T7}x?nqgup$B+gP#mqIY@ zY<7j%a+ecDQ^t9!&A}kgnWi7tqP0tM=(iiITD$oH8*w@0;yy>C=h0bL0n^<5UC1}2 z-blwBgC2_7qhPJiL>9>?ah84w>V_^wB4JSxd8njhJ|#eyfMO^jh%gjRq!V&dsBo-? zRrpXsObW6Ll{ADYL5@b#5nhfcFe#)$zp)w1C90*NimpL*m$A{mVx^>mRDzv6#yyn^ zXenWW-4eDzvQ-3o+6_y`Wp}TCJWJ6k$T9kno_4Sa7V|3^tLR6P|B8DFtN%~VIO+`N z7snsPQrV&v=ucNlpDtFK2U)aZ9NHSO+v|?gwz`&4_HaYTg=+Q9bj_2=OZ^jT_T@2CHGZ(q8#}XIdvfvQ(fX;m)BW~m{60Ip@OF69 z*2d`vyGBQPf557%H!sIKiaQOnPK-sa*M6TFY2Ns3v~Bmfd$s59)!qf?Ue1=besYI; zrG=sCxn1E)-^c+n#ut9hXV90YcU~VkTJ?2e6VIGJbzgg|&5!v%fJ~}c8Bd%T`URi` BbISk# literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_picker_button_focus.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_picker_button_focus.#.png new file mode 100644 index 0000000000000000000000000000000000000000..67fad4168e6ecfcb4ebe9b822dbdae3cdb5be060 GIT binary patch literal 1142 zcmbVMTWHfz7>>$hc!P;JEeOX5qF|ezw9VSkI&x{XxX#fPE$G9tan58l)7urM}TM;d=iTIX7(F~Jr^&L&`MFe!C9@EaSpGU8;z%(-K?nEJ4a1>NE zw-36gbFjUn5BBOQgKgak(!NLuEJQTmTYa`C`WbebSETb`n`6PW3F*zSGftHY9YDb@ z0*Od0tVbaPf)Ii6gdo5zfR93+i_%*N!?>6bM7{;gUMy8}jfz-QbF*4>m0_!dI3mZ@ zYPCo$7Qt>02UDq3z`^rjY7zDZY@+#L+uKlQP?4v*rbA3@gMd-%#{DG2Qcq_>u$)3+ zj@b5Q6Gc|}9#jqw35m&d!&8$|=*m-YRs3VFDiY}?3dGSmwbZUCp zEHt&)D$9>i8t8&huh*0HRFZ_F0@O4u=8&WWvq(hKK1Gd$A8l_jm^iXSH=r)@LClD% zWQt~a=IL4pUQjBn6Z=s!Q7mOb0|f$1ih}3GajjZMw2c3CV?*nxG96%{j3Y7?+Uz`P z+go6kyN3(KhRhp%Z|Jf^K@%pir#$S_qM7B{m!#u5dRm2fF#`*RYQnq(VMb9?W=0fK zFs+&?O=)p#gw5qM2Gnwrsr5j}&_<7$(PYz5w1O(CqSnF|{fHvp#w}f!={B+Op;$c^ zVnj(;A!MRe0Rv-%l4y(sAUC9d7x%foL+a7a_;}W$HF4-3!A>D09$3wJF};+u(p~nnntB@>*wL`I~T-`?x(-%I%jcn9dEqzytR3bJ9>Z6p5^~|45_Co zXRME3Te>^6eD>n5t{pt#QQ&`;dMO#hICE`KTKI9xpXWXqU+VvT&li3B zuYN8q9lJd8jWl^{( zJaZG%Q-e|yQz{EjrrIztFsEgPM3hAM`dB6B=jtVb)aX^@765fKFxc2v6eK2Rr0UTq__OB&@Hb09I0xZL0)vRD^GUf^&XRs)DJWv2L<~p`n7AnVzAE zshOFfj)IYap^?4;5Si&3npl~dSs9rtK!Fm_wxX0Ys~{IQs9ivwtx`rwNr9EVetCJh zUb(Seeo?xx^|#0uTKVr7^KE~&-IMVSR9nfZANAQKal@=Hr> zm4GgVcpk{1iHq`zbF$JDTz5Q`N^fZsd*)yF1AWQ8NHOu6f0A6LstU} zLpMir7eiMgLqiKQb7L0^0|R42Q*#$%OEZ`m*z}sa85ugenwYy9J6RY4bz2x)8aq2% zI9fUzxH>yp8o=~=<`tJD<|U`X?9Bw)3)O3eSFe?GQEFmIeo;t%ehw@J1Z3ow>wo;}&v;UP3Je4pA+-J&y3xt{G3i|gF8uHc&}_XY-TgXZ3C z7X)`X+bm$3yTImD{S~i0jdD5NkL=PG-_?x}TVZ;ox8avpQnc=jr&|0|=Q<^QeZytSagRi)K%%$Dw wFO!4T6#QcVI??#g>&Tw<*LttE{S!)H_-g*~bk*$xUZ7&e)78&qol`;+05)K!;Q#;t literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_popup_bubble_tail_bottom.png b/res/common/usr/share/osp/bitmaps/480x800/00_popup_bubble_tail_bottom.png new file mode 100755 index 0000000000000000000000000000000000000000..1e05607da4ec6761b3c8fde52855219f1d4e2729 GIT binary patch literal 1182 zcmbVMOKjXk7`F02(Wa{wT19On%G4F8McMTuv3G4{+t?m2b;X8sv!W|hM7{QG)+F{A z+hLttx@k$expClt;83J;=%K1a4+x0^t<;AQ6=@Ge6+)ui%88y(4pqZA*$o_`9^C=i1cbSjq6d<3=pN*xQ2k? znlq@3Onc#@AJI5P_12wAHL8~0mM!dN%>C}SdIgtnB~RrCUdE{ZeV0*b6&>A|Yd9(`UFW%eZcGu1$0pmC?U4c0`Aj1s^eG6yo{7BKfEv z?i!QWz1UF#Bx>Y$0*55UoP*e!caawvut1Y9S=+H?j?YPY9`a)Xr|Ue&DMbw`IjBpD zk}u{}uFJ8LZBc+M)N?$PRFVmuS97Ya!@MT4s=!HOeAm|S!pQV2)b;BSza3ldg|@O5 zATz>21>?DH1xz(?gu@2*fi^9IBc~nD#?A0(lAf*8LKHY3BfA)27i`8?c6RX33kol( zLSEG%QO*&$qY#o&6jec2B!%wS+W#kJ3=zX5#qpnF>28quc0Sb>dlHdtbpeyRWZ48EQT5OYOR} z>9`K9$Y53Ky&UprVEp%e`~H_rcYuJvg6OXIr{>gLH;MjCff>e%4tOY7{*D<4ob zF(5DhgxUpgM%jr{(R$3&z>_EZ$G^-aSvt&;aAeWdj80xeeDOv z)qe0~`Lmz)u0Fgy@a=NUzS@3$Dc`E5zkcsV`qr6=XJ5QK^y#ks$|3o~n^*cT58eNz br$zNr>E+*gZfWmdPW~8%J_)a>XV3ow5srOz literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_popup_bubble_tail_bottom_ef.png b/res/common/usr/share/osp/bitmaps/480x800/00_popup_bubble_tail_bottom_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..2abbadceb8f05e196a54e6c02d5b073de58ef702 GIT binary patch literal 1631 zcmeAS@N?(olHy`uVBq!ia0vp^GC(ZC!3HGf#l`*vQj#UE5hcO-X(i=}MX3yqDfvmM z3ZA)%>8U}fi7AzZCsS=07?_nZLn2Bde0{8v^K*7iAWdWaj57fJ{tG z$}cUkRRX#c;)UD-xUqS~&|m@vn0`fKfxe-h0mw@*g}%P{mFDKcRTq~8r6Sym)!^cg z%7Rq=pw#00(xPNw#HA^NtSYc_E=o--$uA1Y&(DE{Vn9ZINq%ugeu08>u&JJ*LU?9g zN`84USiP^Wm1kaYNn&1ds;7&s63_&_%*+%kH#0{!OG7tTGZPa-Lqk_XOJ`#PH%Bu! zQ$t5LCr3jwm|mCsATTymvTP>1LIhJ z72nj=wJ=!o>pPp@p^AOp58gWE{l5I_)9dhr*&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P_pw;RA(;y-mXFE4 zwla&|>kY*~=8g72;IO2avxr!8F7{{{<#~1@*p971DXSVeBxPi17!rhfsfhF}GE`m9 zm2w5x=GaZwP_vQ(WgV#nmI*^r<#eu;DHv%3>BU^eXzP}}keZ%_+jbphx23DTR#z(q z*rX(=6EfSbfa)}%B%CHbD2^)NowJT-lSX(dPS5sj5e}S7*e(Uc1zYjeoL%fok}jzQ zIaeqm<~f9FrXL|TN=iXCbXDhDy7vExnaG?G9fsF^I(s4Ou$;> z>E$~W)>glikzS7;Ol-V-IoPSMtPUyTC;sm3mKKwsx%QbbwDDzcug^W(3pTs%SKLI; zCokSz@-CcP>ACyn(8iJTSvgtVyZ-AfI(k9p4}E<1##bLD&|>r!yuJ3rN}~DAk(*zf zOx#+GwB$dBuU;Qsz4mY@Sq|>J-Pi0cC1w8Hp60=O_d5>R9qVs^P5r&Zc(tqf+wZZY zbNv$7EHcTx>KR?EG^l(duPm{-gbS=d{iLx<* JzAKD>`Y&q2dR_nk literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_popup_bubble_tail_left_ef.png b/res/common/usr/share/osp/bitmaps/480x800/00_popup_bubble_tail_left_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..e22a1b303e1023307b8dd3709f907b8208f2e166 GIT binary patch literal 1615 zcmaJ>dr;GM9IrZ1aX21M)I*8!ah!vuDQ%^Ns)7q}Dw_s3Z7lHcP#pU?O8x!4lo zqP@MQd2u)#@0i7inq4QcZ{Rpj_KUXvkjgGo8AURaNTxGpl*TwwdNK_IVhGfLsWDV< z%|4GsayVl^T$9Wst70WOlHj6l4A(+XEStlLTxg+CT^7awX_x^wO2KE2Qy_rrrJz=* z;;AS(mVqx`Lt}|+;xxK7Svs*ET(|&;v`AP10%K6XLaa8LBo-++peteb?rR7H1|Uq9 z6nvjlvMK?PlQaehxx7#vPXq%Z0T&kV!~$^$z~{j{2)qmj1M&!D!Ku~OC1f%g>Os}L#0vIS+f{&a__=tLgT>Z$oh)3i?Y%-90u>TtL z&=u<*_jcH}>|xmWn2~im&Dy#?zBGix8GR-OiPBiww{E|f<-cr_t24WEo4GZ&{aU4e zds?jvsJ3}5t6jeNbx{aXWxrB9LCf7Mn;C4s5Cn7~hZB6W6P=0xS@siUf^Svj^*zDC zNn7xASJ>SICJHNCBdBArD^sR5q`(oYNDM*#$yD%@;xeP3>d>d9$w;(Uy{OOoi zK07V}K=bkgkvXwJfP4cAB6KkDW*)aOpizZaH9q~33MlnLI}{$Z_upvu4Hm%qNTj-1$X^a&>l~5R`smBki(dvV3TQ0c zb9qkT3S|wkwEykh+v{=Bf@*%>&CVdHs(F{V=2|lm8|m+Bo?fKZ;LA%NRbS8ucivbf z%OCqYcdYnh2P*pIZPLZsB<-CO#TPoaOzpd|?(0%->P^vv{Rcb5hm@wN`(DMi8nnLQ z1xLdR_Wz`~7Z22X8*d)-G5AUCOQNB&4tSo*2N~}rI$-$bOxJUdD|sOO80ajE7CntV z>c~93q9x_c%l;#6Z+qt5{=VWQ^+Hq8i_J+b5Ps#c@0f-xw jTUzDpN!)v~-;2lT)*kGx`%_=y{>8^A;*dkK)S`a?TYq#a literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_popup_bubble_tail_right.png b/res/common/usr/share/osp/bitmaps/480x800/00_popup_bubble_tail_right.png new file mode 100755 index 0000000000000000000000000000000000000000..4732066899f86a378133ddab9ab9e276cb646af0 GIT binary patch literal 1207 zcmbVMUu@e%822`HLfyus?uAVS8Fz%VYV4dFyRm6#?VQ6hEu~GfHAoY}wJ)tn?Q?Ax zCzW8dAU0^XA%Voh-pT_43ATy8Au$OMTcvGGOuR58`UaEes_{Z4VB*{+g@#efRzG+e3rT?Q1>MN>S9l{1I3r^JCHb$Zqmo2{Y?tIv8l>U<6l!Q1=j}n0O4) zd0QVxMWmbcsb$nhQM)QusT`CG$7BQBtRCsGHQOaGsEhodQeQ|}M zEi=Q63Wa3B&7ukG$c%?ZW(G^fOx2J~rvF*GuO<@$8wEODvnL&2u4R}FUYV?;ZH}Qg zRDx=T*>tL07^1V-L$tv5B#a~gv?#J5C5R&Eruih`xg;540;FU?l=)t|@i4@iXIA7Q z%r$HgDZ@+zfh%)d7=~=v!(wlo1Ck^~96X;O8VSGd1bQvu_#I6Kh1cvU>>h3?QY7BU&wCb0iarUkF>NC!$ioanPFT}2Wx)4JS{m{x0caWzfRf8Xr59?F zqNH>pR?d1z z53pClc(PdmLlZc_{seaE?1)ImM=i(1q2C#$XY;lYdDbh)%z4+t}xMg_l$z zt!5$d8~`cR10fkXQ57^rQkVwT{68_{h%;PN9RDen<`${IXt`DTMA&K`NNbd* z&SXhj{gQ`DsrKX24_Ef=(A%%x_YV&rJs6)q-Wi+E#}1r&{jY0I@xiX#1%Ca&vF_Mz zH2l>k3-2sfZq@t0{`})-!ax2#d2#jLpLg%xtKVGOyZ;09UFyvbTid>GdAjt}9=>eM zoq@AQsaM;F-jCl}*3UmV*VfXdFI-YiEDn6M&>yJBw#8{Jgeuc1M@<)}2oWR%c`EYin=p|2AHK{6V#4bm`K2 z>E9~xb?M~Am2*#=XzOo3{_fS0-_OUypKc7_55L^Gms($aVdv%B^VR5AlGg^|XX;CH F{{T&8lF$GE literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_popup_bubble_tail_right_ef.png b/res/common/usr/share/osp/bitmaps/480x800/00_popup_bubble_tail_right_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..0e7053055a392ab08eb5a0e0259825db425509eb GIT binary patch literal 1611 zcmeAS@N?(olHy`uVBq!ia0vp^B0wy|!3HD~Z_Q5tQj#UE5hcO-X(i=}MX3yqDfvmM z3ZA)%>8U}fi7AzZCsS=07?_nZLn2Bde0{8v^K*7iAWdWaj57fJ{tG z$}cUkRRX#c;)UD-xUqS~&|m@vn0`fKfxe-h0mw@*g}%P{mFDKcRTq~8r6Sym)!^cg z%7Rq=pw#00(xPNw#HA^NtSYc_E=o--$uA1Y&(DE{Vn9ZINq%ugeu08>u&JJ*LU?9g zN`84USiP^Wm1kaYNn&1ds;7&s63_&_%*+%kOGjr{H&;hfGZPadLqk_XOGj4|OG_hX zBR3~k17|lQm|mCsATTyE#-gfnqGrv4}wyamY?%W;b&u8nO z&nsSkMq+YG$POFf6Q@sCJK8Q-&w0l6;!c$aPv#5$MSARu zCw(i9j(m0U+vej6GD=n*pBC~h5SgNLLGQz%rx$+w^bWUvu#vY!LPWqJly6mm!A`ai zk*AfvXBID(T^QXTGXFovk|qxR1cnnMJi9<<%i`(T$>27}TUu9o(r zd+Hwjp3bjd^y?Yh8E%c{23a{R7NHLfk8hMu(&n!1zW6eeNmud4v$^j$U0&pJ9KQMX z>%*Dn^VxGxpApiCt;=?3k!!!eyy3$7AKTyE_rB;l6aKbsjH}hYEB(*J ztVz#1<+-fuul)~0s{2?s=t*0-=3b24Xd|H_*nHhMx(y~-O!oK8O^U~J!&Z|#vjJy-N&-&Fl@2#9GHpkqUx%SG@oga=Q zteoLpn3{AcXrX+7i}lN0=dKjhm`VJz_$HO`dcwIv*WALl;o72A7IT_DEQvUAuj8E0 z-kbOSY;SAO(PF;z(X#z-Zb55ou5H8J)|0ER%rfJ%uM?7q`r*VkRdwTmtMPX)Y5%{l zZEfR`^9BE3o!Zm(P18U>Vv}Rn&UaNSEONNz-fBH5ZNH<*wr_^}$8|oR-p723+sel{ zO)Y$-Z`BoM(UTLO>Q0o(*zvWbsJYTQW5Uy!PgWFFhASnoHQt-9`)G>&+(=^yRxyvy j)=w<5PKwG}Gx0FkZr>xo6S{;MRJ?n-`njxgN@xNA`0sG% literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_popup_bubble_tail_top.png b/res/common/usr/share/osp/bitmaps/480x800/00_popup_bubble_tail_top.png new file mode 100755 index 0000000000000000000000000000000000000000..90177c85c3325ee465db5e9413f9a88023402ef4 GIT binary patch literal 1175 zcmbVMPi)gx7ZqSZyuo6I%JQu`(#g5(Bjje=W$MzC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OO`YG@~eB^>rcsRs1^LO-0J_auamwvzTKUFcI~o- zNng!gR-|&Jo-la1{Fm|3!;3#BggfpRXur7bk<`1ub30$HG2G(Bt$N+5bLY#sGpy=m zXV@_Q?pw$=&GPxpl5GVm_ifwca!dI_lxx%x=37jCm&)$-g)ckLm-gvLt?sjh_45k$ z%uLCTud2@e%bYp6VZ{=~r%`;jr*c|qKl`*)>IV0&Nc((NW>7ohUEhYkO`#$&e%#mrop2BCdkL$kun!P8xUjO`_bG!0y>F$jy z8Jyb~ug~B5?_kWU3l~1vG@LzDUfZ8=?eg*NQk(Ab2eG%}*_!m0ezkwv&%n$u@!P7j TgxQyyLFKcjtDnm{r-UW|`{Pjs 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 new file mode 100644 index 0000000000000000000000000000000000000000..85fe8d7ee9ce4d7cd7003407684faad0632eac85 GIT binary patch literal 1183 zcmeAS@N?(olHy`uVBq!ia0vp^B0y}!!3HE_YJRH$DajJoh?3y^w370~qErUQl>DSr z1<%~X^wgl##FWaylc_cg49sbnArU1JzCKpT`MG+DAT@dwxdlMo3=B5*6$OdO*{LN8 zNvY|XdA3ULckfqH$V{%1*XSQL?vFu&J;D8jzb> zlBiITo0C^;Rbi_HHrEQs1_|pcDS(xfWZNo192Makpx~Tel&WB=XRMoSU}&gdW~OIo zVrph)sH0$HU}&Uo07PcGh9*{~W>!Y#3Q(W~w5=#5%__*n4QdyVXRDM^Qc_^0uU}qX zu2*iXmtT~wZ)j<02{OaTNEfI=x41H|B(Xv_uUHvof=g;~a#3bMNoIbY0?5R~r2Ntn zTP2`NAzsKW@b!fooL3ADC}5E3S0onb8|oS8=jMX^1y)^L5|oN?23FO@A(aKG`a!A1 z`K3k4!1zd0hG_Xe(Z$Hs$k5Qy(#hG?#ni&dz|_&gz{w0|1~$D0W)_BSMwS+?#*W5@hOS0VMwTwl zrY>%7mKG)^&PL`iy`Fi+C5d^-sW5vpf%Zc6n&Z`L#L&Ra)WB5%YPxV75B%>EaktaqG?WgS^cKJg&J%)Oe#09669Bva8{BOWUjlk?G6Yy|#Vf z=e+MPcurBilcT7$<6?_tJ?}23rTkhNF`-3$ZKj*V#9Re0sBL_2%Y6E+#B9+Q$7ZE$ z4hnt|`(M{Hp`KCf>U_rcNmo+^?|qItE7;NaYCUtuZ--MWmEKhS`TFbQ6y6L6W~mDe zY$gjBc{2{wGo5?%_Kw!Q>vJP?+ut8eYGv4^5>+EqbH{M`nwyIgd)KrxJ+XCuQTeuI s&Z5rkw;s(2sykIGv|+#9li&tMhL_KB?ngx~j{y}Kp00i_>zopr00<$DOaK4? literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_popup_button_normal_bg.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_popup_button_normal_bg.#.png new file mode 100755 index 0000000000000000000000000000000000000000..bffa46b5e5e2e390d9bfbab243c75f22c8fdcfe0 GIT binary patch literal 1183 zcmeAS@N?(olHy`uVBq!ia0vp^B0y}!!3HE_YJRH$DajJoh?3y^w370~qErUQl>DSr z1<%~X^wgl##FWaylc_cg49sbnArU1JzCKpT`MG+DAT@dwxdlMo3=B5*6$OdO*{LN8 zNvY|XdA3ULckfqH$V{%1*XSQL?vFu&J;D8jzb> zlBiITo0C^;Rbi_HHrEQs1_|pcDS(xfWZNo192Makpx~Tel&WB=XRMoSU}&gdW~OIo zVrph)sH0$HU}&Uo07PcGh9*{~W>!Y#3Q(W~w5=#5%__*n4QdyVXRDM^Qc_^0uU}qX zu2*iXmtT~wZ)j<02{OaTNEfI=x41H|B(Xv_uUHvof=g;~a#3bMNoIbY0?5R~r2Ntn zTP2`NAzsKW@b!fooL3ADC}5E3S0onb8|oS8=jMX^1y)^L5|oN?23FO@A(aKG`a!A1 z`K3k4!1zd0hG_Xe(Z$Hs$k5Qy(#hG?#ni&dz|_&gz{w0|1~$DWE~W-XZZ3{4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X)n8Uh<%vilh`z!9Q+RoR%N)avu~pNoOi z-UN{q%22lNZej!8;@Lc7k6PmKjp^Q3G1O~v8Oa(k`G~!jtEAexN9RhgUkteN{`!Hr zK&M4GWd4iolenAL)U%3S{2p%{3A9y|eNVQZ@|(?1*Q__qFgxg~aCOX)mzwBuj4{wU zAlBO$7E(s2bkpcdG*5eO_1#?rnzCzAw z+;(2Ry4?MDDmroEEzuNpyjnKB=o*&XoB`jCJG{u8>@lPm-HYy#DmbXwdA8Kl8iTQj zH1_H9FL8flt{M(k@Z+`EUxgMvs9-N)#cw1L>tRmsOlcJv4LA>*#9{eIrh6FNP@F`< zKw6^ad#YmRoqmz0V9V$bKtmz>8-YJDuc_?&msq+VajCGv3-N=in>9wg{%?ujLxUCm z{eNO`b3>)$Mz!V8Rb08gMFhb4)sWBaXC@adu7JpFwb6yEfEz%|AY%nO-lVl(fjHbF zD>Gy8@LcR_SH;6{5zCyAg3*TKHV-OF;J&OR_8aB)9arEap5jykS2DG52V#gA#}%~^ znRSZ{br+93aHR~K21kN8YBi-LsCG>g$HS0e-<^#Cp;VK<;;$#KKHPo!BSQN(i|ZIW zVP?@cc8>Icdbq3$0Yb$*P})VKx41WVfiVMjJY0&Z>vv$C|6SVqO?8(TeY13Thxawf WENT3!m>C}Kqp7B=TBB?g_WuE!OG+>R literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_progress_bar.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_progress_bar.#.png new file mode 100644 index 0000000000000000000000000000000000000000..69eec17c45fc65dcc23a6aba915bd6492257b122 GIT binary patch literal 1151 zcmbVMOHb5L6fOZ22^tM1I-`r58jU8*^fA*8tqkML+!>g}0WwSi8W&UA3sa%JwY@ln z6(MSL;VW!>#6&mld_bV0ydV9*7@#HQ_i^nBlU&bjCG(m-F& z_SSGK!!X+my|6^b9rW4VvW32%H@9`rAw+V+WDt*%n&u)VZQv0E3YIp8N=P%N&b&ii z4AVGjmWRo3@wl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ub zgPYC63)H?>tY7T!?pw_E9D&c@BRBsxZtVTzhYzk?d1CeT+d8Ok;Ld@wy{DA;?@`nT KwRe=m&3^y_FOl5< literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_quick_menu_bg.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_quick_menu_bg.#.png new file mode 100644 index 0000000000000000000000000000000000000000..97ae24d5200d88f3f36e6e5f8d0a3aaa6106378d GIT binary patch literal 2848 zcmV+*3*YpKP)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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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`Nkle>a&aIZ#qjC=bj_eyA>;REA00000NkvXXu0mjf DaE3^t literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_scroll_bar_h.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_scroll_bar_h.#.png new file mode 100644 index 0000000000000000000000000000000000000000..de185753c9af59bc7e0708685a4ad47c014d6788 GIT binary patch literal 2940 zcmV-?3xo8DP)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#eyh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r/share/osp/bitmaps/480x800/00_scroll_bar_v.#.png new file mode 100644 index 0000000000000000000000000000000000000000..08f12eb6d2beb497ee6abda0ef45736fa045de6c GIT binary patch literal 2948 zcmV-~3w!j5P)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_>;8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|MqxG8D zjr0R%Uzt*DXA5d+>Z{F3Jo#+HX6HI@$8!()W8U|v8$A8?|NG?iOn!W8wzJyFHt4@j z`}k>6;%?P%n^LNUw5o4a+{%e`EYI*@;Ejr&skoP)U0j~~gPKj6`SuUt4U7y);)(Gp SA+w4>dEC?0&t;ucLK6U3+-mFq literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_search_edit_field_focus.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_search_edit_field_focus.#.png new file mode 100644 index 0000000000000000000000000000000000000000..29c6a80a93926f04e631fbb640356594d80e7904 GIT binary patch literal 1274 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE;=WQl7;NpOBzNqJ&XDuZK6ep0G} zXKrG8YEWuoN@d~6R2v2c=CsU^h>{3jAFJg2T)jk)8oi3#0-$aN1{?c|g2d$P)DnfH z)bz|eTc!8A_bVx6rr0WloBA5~7C5J7WO`H;r3P2|g(O#HCtIc{+1n}DR9FEG$W1Lt zRH(?!$t$+1uvG$^YXxM3g!Ppaz)DK8ZIvL7itr6kaLzAERWQ{v)=f4rG*mD%(=#+N zH8V5RQ7|$vG}1Q!A~Rh>6Dw0QDv55FG|-pw6wGYnPFt43sj+7T$xvrSfQI&tPC^3CAB!YD6^m>Ge1uOWMX1cerbuV z640d(FXR^Z`oay)D~1LXFv#>P5)1SV^$hfLb3y(Bt1d1HN<}yWtLoyA%7Rq=pw#00 z(xPNwe55JEGy}s9zeOO0K-XCL7i9t?B{9b(Ke;qFHLt|e#a0O@qnDDIV&!UXWNPB< zYHV!mV&rOMXy|C^S$r$WCk+>n_edaO9N*!GfNjoBWFWHS0g7gCnHNU zXCo(b7ZY=1V{@2Z&%EN2#JuEGn7x@md!c$Q@ana4E=o--$uA1Y&(DFSfPjqrlKkR~ z`~n5%U^4}c@XWlF{PJQ=Q1n22>ylcOS(cjOR+OKs01jWPOf2@BS(+L;n>o5#m_z+- z;^ydLU})y-=4N7I>}a3_)t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|n7n%0f4zbkj zRgNSV@JgP#D7bzLWqeq}qrS+!x*+Oxq;lmXKH)c-!ggIt&DB~&gjLB3 wHtK|^-;v%~`60CP2Ki5#qq=CHIY;_40L3CCFubpVLjV8(07*qoM6N<$f_W7VBme*a literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_softkey_icon_add.png b/res/common/usr/share/osp/bitmaps/480x800/00_softkey_icon_add.png new file mode 100644 index 0000000000000000000000000000000000000000..7a696eeea741f8987883b37b5203853a1b15cf76 GIT binary patch literal 2970 zcmV;L3uW|)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 zsJ6IeNwVZxr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+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} z0002RNklKeY4Pd^UIdrW30%hE9HAR{_2dM-30|HHv|zL?@ z5<%UdtukN=i}GjRNIp>8A_x3plvf+wFbPU+Hg1J~Grq_x6= z1q&7|Sg>HhwWj&QnkQh@(|@hwE$x;TELgB$!GZ+~7A#os6!QcC0RR630OTqj8i`lN Q@&Et;07*qoM6N<$f?lA5UjP6A literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_softkey_icon_zoom.png b/res/common/usr/share/osp/bitmaps/480x800/00_softkey_icon_zoom.png new file mode 100644 index 0000000000000000000000000000000000000000..529b6a7dacec2b767fe20afcfe027ce55ba132f5 GIT binary patch literal 3379 zcmV-34b1Y1P)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}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Z5_D8sx3G>(;3+CSXb>l9;&i43!>Y)d z&g?aj3u9fyVtI!1TJnLi{C}unRL~C2!#ThI6m|+j7G(3#L4&qR9$%jGTUCfmBz7;lVE5)KJMO<7HXMnhsV>6=tO*O%xbi*Mz8;$w-+YxEl>~pm_?uM#dZxjrRRFy1kd?%O`||U% zn@eiM<%iyFbW%5{`i@(dsU-{L8&Xq#U-khCsX6TzBx|&g+lAomo857N|W}YWaC`>*wIc@x?cbPbV9LlLP9#u`64e6I1H> z=TlwH$EH)o7r(|5$0rWMsnPaPXW+-(x5KNyJ#4ydeLtZxLHo(;9gn`c^zqj_KC~P? zwkjE1TCP%i2?P(!^XiqOk=*7=)DZA<#88cg8=0{-7uD7JIRf>KdqNF?^p|;ysMF8Z UE_=D|tV@xVO?OIT?Yl?*0Nt5=(*OVf literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_softkey_right_bg.png b/res/common/usr/share/osp/bitmaps/480x800/00_softkey_right_bg.png new file mode 100644 index 0000000000000000000000000000000000000000..d18d35a7c630bad8ae7d6861d7438793e1b3d27d GIT binary patch literal 1150 zcma)5T}TvB6uz3NC5F{Q*h|9*K2$q%XLMb6a^8>WMbe7HgDLY;cN;;ZlZ0*#OkkrYuG6MTF@@-MSfI7iaFXjIIUPR&NZ(tPtwa z>j!MqGSHMz2YOY%#?~HWYElvvFc49glyS;*q*Q=i)s^Vp4f8Cs3L(7#cFj~V>6B#@WaOx}ZV?@ujH{@0;(iifsnfL* z3~NKybk?tlUKpQJEMDNCTT%uXi~SpF7#nDZ#L+Lme-(BTX$$dj6?gMrT5Fdfe^C*wVws;3JbxyG_UX9>2r=v%W;- zU?TPEGnxBw z`8&t~3;=mx2!Ij*ax)44BM64J{K2`_H&6t@$+7LhPu55gtsX?fP4bPpj&nZ&9-UU1%Id9N*fQwlP7iDYPZjVG~J&-hSO(a=T_5@6#M~kK^tjhZJ+G3oSx?uoMMFM6tAml#)PS`Z0UCyY!*gh28nj z@cW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+wMxb=Iq?~*r` zcIGBOifE~%g%TFRO^xT-a4&P+=9A#Fx=QSKPsM*XS`mCz?oqcn*|E>GUDnH}UpWfT fTzfw=c!0+rRb|(N$1)T*00000NkvXXu0mjfvDVSy literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_tab_bg.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_tab_bg.#.png new file mode 100644 index 0000000000000000000000000000000000000000..27b873b9308ad6783b97ef851ff6abea61be02b0 GIT binary patch literal 976 zcmaJ=zi-n(7&QtiRYfI)7ytn}+zF}n-8pevTQ$Xv6A}qmX%f+}ARPPBSgn1=z7n@v z*^1PO5oQDn|3C*SrdF&B2U_SDjmZiA-`~4C&8J(e)M5?VVLc}%g6YvV0oA}+Cw1a@+b@sFq9Ei%zu96f`-$$- zKz1^WoCXnR3&P@38aeI;VW3Uc{m>A9AAAvk?-}BnY9l);lCEFbiAiH;rRnZ$xSA&} zJp_xX&IJO(9FPW^VWOvo*w@whIy;6U=tJ0sA)c9P*)>q4F#)QKBp1zLFjtUq0cizo z7AOcKh!u$DC5&`+UPl-VK9NU@y^dbD%7a*ZXNX0-5gf2)}@RlT^fO6LzOXD z^FxpJl0M$H^=gX4Lp3rhlY4Lf>Ye?Q)!dcc-B~oD3LoDHlSq)B)pEZcpo8pKLZ*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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F&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|Nkl5hWD1&HKOrG4wiN-G1EQVLL@_%7LQO^V zPi3)@TF%Ofb>b_%ON!Dakc^l;z%i>myVF@ke&%DFX8=!r6&-zHxDx;X002ovPDHLk FV1k)1M=t;X literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_tab_press_bg.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_tab_press_bg.#.png new file mode 100644 index 0000000000000000000000000000000000000000..622e3e5b48b671926c3755cd42f9c4241379d87d GIT binary patch literal 2879 zcmV-F3&8Y=P)KLZ*U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o;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} z0000fNklASZ;az3RJi~E0RR6302BZT{QM?k Q%K!iX07*qoM6N<$f+`0%^#A|> literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_thumbs_bg_focus.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_thumbs_bg_focus.#.png new file mode 100644 index 0000000000000000000000000000000000000000..c73b844c2f176ecc5788b2f168105d45d8eddda0 GIT binary patch literal 2874 zcmV-A3&r$_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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ee$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} z0001GNklt<8 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_thumbs_line_bg.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_thumbs_line_bg.#.png new file mode 100644 index 0000000000000000000000000000000000000000..fc705240556ee81ea9d50d188aa0d3b99782c408 GIT binary patch literal 2871 zcmV-73&`||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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S>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} z0001DNkl8v}fBAsn(z8c7C}tZ_{ext?qo zv7V99kZOQ~O(|TsaN!)jANnmP*1t;qr62cJ7cN}5@JQDChd&ByzBB3s009600{}=8 V5~G literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_time_picker_keypad_bg.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_time_picker_keypad_bg.#.png new file mode 100644 index 0000000000000000000000000000000000000000..5656badae38becfc168567fd0ea8da18ed0b990e GIT binary patch literal 2882 zcmV-I3%&G-P)00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j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&F} z0001ONkl0&JgV`0fQShg7<$pE$` ziD!*$lTz})XyKjYJP&q&oHH{hr8GjVm04^oVwtet(+ElbN($3)e6fev!&--RN&NwS g=Al2z*)F;U0C*EWr`1u>b%7 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_time_picker_keypad_button_bg.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_time_picker_keypad_button_bg.#.png new file mode 100644 index 0000000000000000000000000000000000000000..68da61745273b79c7edbc4750f87b4dfb4fd7508 GIT binary patch literal 1039 zcmaJ=O=#0#7!D{yr-SK4@jqtnX7khahs1VcZCY0`vv$Q6#IY>-x`r+JV)Cs`cM#ny zY{CxCsaHV{V~8gYa~`IM2f@ow5EVs-M?n}nIb?q6+RcMCA^CoIp67kP_kF&}WY3wV z#zTz+K{O@0#S|X*x!;Zk{GXaU+JuLLD3(RNFo%k=1&A&c4gfNt%Yz^VWVLkVH3$*J zHcCrpQC2!9C{U+m7ehO`iP;1Z>U2z583KqL0E3zlrhYzKq)1H-QyIU+N@f(~weC?1 z^p5tVmC+%ESE2&WScda5Y|z88f0&z#twDz4d7fdtjMwYI2#;MdknDI2yS1hu0$Z^(6KT*OT}62Sj-W7wGu=3XZf?pN zcC}2nV2mT13`eu>k!nCm`ae|HH_tSb^3wRfzf`tQhCL_>FK} zjEe;Q!3Z0VMdN(L8~5`yt_YP89T=#_Rkyh9b-At;bQ4Dwfu$9I8n>WMR*o!a^>bnC z>Q%XF{am=ZTm~n@xQ+d*(X}n?9(THFTfEpbJ}|J`Eo|#qeeM#z65|Q6EA4#zF|)Mu zIk{W3m-{|HTw54lUno!cFWwrvzyH^_a?6eHua2KDH_v7sIjg6iMlUSA2$bdvyNqG= zE^%^h=JuzF%Y740Tk=as>$T>0zu%NoPqK&SuP+iS?_Xw^)s`dc4WSPOA_oF(;+??T no7#hW+cPJouTB^CtnBS4zOIcgA3J*>>0Z%9tVett=^y(8kvvmx literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_time_picker_keypad_button_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_time_picker_keypad_button_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..d94c74ed48bb582f2d7c090f571d060ed56257c3 GIT binary patch literal 3018 zcmV;*3pMnKP)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^+zpz2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p57(R4^72U_w9S6qL7qbl2u023jI7k zAFU={n4VRJ^zbF3dSosc4-|X#DyDZ9vEmm8+C3Fdb&?f~W$;8Vg!pn$aPTB19XL{Z zX3i3Y`oqxggWr`bqVMcLUu88aspMg+g5a`ue)2tQ2#3?y^Po z(^K>}>Q3`b-&BWkMu&$z#JiP}k&e&HG74QUXlKZe&B|tVN`VkIG7WNHavtq<+}E(Z z#qPz-p54jFlr^)E>$mkxT+BbIH6+0E7SxhD+Fg=PuW$^0)&Vui?pe|Onvs4~OY*bt zm6+i@wsYD^%W6t*e5cQ*=tc_lMqX}j8uY8&zl)uwl6yf@@6z~TWl wFJRmG2fm&w2ek&W^~cA{owYB|u5QXBLFfVa{mn?|o~?g4yo(pE-ies@Kdz}D$N&HU literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_toolbar_button_bg.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_toolbar_button_bg.#.png new file mode 100644 index 0000000000000000000000000000000000000000..995b59564bdaaaedde0a550dbb5ea8038fe235ed GIT binary patch literal 1801 zcmbVNc~BE~6po?>7!_*+Vyn1ast`5DCS*w>hnwsoh#)2?h*k;7LLy{0Y&H_87pO&r zK@{r=7O@=>TM>l;57dk}2%cEAMawaQNKvdfv{(`C2Eq0Z$3MEWyT4=K_kHiZ-+QxL zBf{s6bN}3(=8rI1pmgB;YDs zqf1S$!~Iw+hj>F|G#wqbK&~Z?e2v|PZ#9}2G>hdIXfYGzwRzg-2@B616fN7#INfS>+6Y5vMhP)tE$>317_93Lyx9VLs#|fnjJiAQD0%fsnaj9^@mJz;cl8 z8l{VutI(h!EoS8p>S@{}7YI^PQurxiK1n4AAel^N=Maf_j0Mk}O3)fBk1%@AMh&rm(R0#DsY$QB2ANR*gvj@r44T(H_^JwV77o|GM!( zYjb3(2^XkvGijl;%z4Cn4uhH8eO$u23=eaB2S3rcGq)D@$GyzIA40uNw2pySX z=Gu?vU9>1p8CK)EAc`~sgZY&kKAW~S^nK|wi}%fg6HLcYOluSnyS6hOCksK5NbCLI_FqrrK<=3> zbfsIx5}QX?3EQ^)HW=gLfzB%8G&qA>qRV4PFS4!wf$f_1Jo0(mBEKXAsoqjsbXnk6 z9AQ9?a+2?^>Ly-K7i%hizD5+p$9qk--tN{UbTs;kQ}fPco5MqIluV%zLBLDrOB`I4<_U`z~z(X3Vt=T z9+cjY;86abaUe^%oBMHSVzwHd$n}cqERlkbnlkkflEe}g#ptJN4lpV{1wQ< zf!1YH+d1OGo9BR@AX9Zt98y!QyXH7?<%nlTg2N$j{Y%_w+sdsk_0EqteI=O6@m{@- z*wDuHxVkXiroS|*CzPABJon8B$1b%b=s`mO`xvjT-dVKqVK20|WV5AVnOogf?Ktk~t4L5zK%;=vKurWKPC-wdpww=L| z?qy3|Z9nDkiY4A&)2o_oi!Z_4PQj5xOqKu{N(NSEaY^Cr?VQXK#qg%dfueyTE z9_=-=*7of>jyUJaz+bhtqF=DnYsR$5IMsVhGe@f{62?0P+|hg|!q zC$sk)81eZn?6KPowrl|Tx;DMD$&JeL?8M3(x)V#3WgBcuYsNdC-y_d*E09)W2P&m$ zp7X<}A%bn)FC?LN^!xIyHS$@N=l-1aV0liaFE6{fkO&M+A{9DVTX<=IdV#+5ZPE8# zpUh5xAKL_>JG)LHvZlGyc5%*zu6?0S+g>zwQy(?9r?`6a+UXst9mUr+j!tV%uR&(#iFfeO zldH>dr;~vLwlo!=lWcAy{4%(6@=F_Ulti5I&TOuG<0NDaWc@vAXI<+w`_Cx^3rCMD HVl(~$5G%Aw literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_toolbar_button_ef_focus.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_toolbar_button_ef_focus.#.png new file mode 100644 index 0000000000000000000000000000000000000000..e8737a2dc725fd62f83bfab9a6b78bb19afa7053 GIT binary patch literal 1903 zcmbVNX;2eq7!FVlK{?dctJYd7k(9-gmZ8 zt(rd}aC#t(Mw_5WL{g}c?Rf(Hs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B6Z?>PEq_IxBT z=X=QIy;kjR8-JL$r~qn6$f9@cQs#Gtze>g}&m4_YquHr+Ec@C>1>y#?t z(i!9Arm}(MPuE&r8zyJycAl?lJRY?fzg3-^+WMx;`{Wd@`qMi~-uou&0-A~zeAuK) z&V4lN#up_K*LSX1^p2}I_)&J<7ESZF=}Z53ve4m0OTJMd|BEch^!x%9G8J+V&RG99 DI+x-6 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/00_toolbar_button_focus.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_toolbar_button_focus.#.png new file mode 100644 index 0000000000000000000000000000000000000000..5f98e6819fee902bfbeb9206707455d39c4b8415 GIT binary patch literal 2094 zcmbVNX;2es8V(=~px_Y>1(9qh2a%A2kW->0=|(aF1_*}>A|Yu=grs8sK6}Z0D=za$Z{ztqQKNHD(rv^BQowHxE%y%e^~QlySn>3`gxxB_};fV zkMFL55qog`F3D7F}mhA=#tFcu1g zgyQ5QKR})+lu?XS5T*|E^JR))8D6Nz;59M@!bYJy_h=MCQ5>YkL_@JsISV`U-EAyJ zDrR9rDSkvh1s9S?eY8p_Nb4^UY2!o;F?P>xjHiZ)2*@C{5TlXB%T-Jb3%jh#MCST! z0v59jQOB{cADs&G<72q662egMWH%9!M8Z(1c#;Q&N+sbi?nIJ1fr#8xHet zRq84gbBLS zxrhh=Fo+z$n*@O1Dwii$sfBV8v}#w1*j?e$ewWMSDj}g7RtjJ^ezgMl5?BqZB(MU* z4WeRpgi7UNI7#KAKc0`#0+3Rg2#LLwune=DU#9dk_K9p7gM|3+&IUY|`lk6aK-;m&IpJz1buP*PqD0SAr+{feky%r@u_(rInpsoq&2t+7XwhJHIY1k zEzk@{Ukara?(UrkR3IDEb)d0(6}|NfRD znuo_fu+y$l)rR9K=pAC}J0JMy#P{HEQ+By+Nw%%-H9GE?1Yu}1%BMd#^IKxSc}TuS zc+A{1#7#+Cmus^bzS&Te=z4U~WsYm&vQ2n9yZGyx=+mJ~aK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.#.png b/res/common/usr/share/osp/bitmaps/480x800/00_toolbar_press.#.png new file mode 100644 index 0000000000000000000000000000000000000000..b982efa4d82441650489b446afc72ded9d9589d4 GIT binary patch literal 2920 zcmV-u3zzhXP)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>?<<(8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XB{_@&-UWKb%hINLbAZYM|6vvGDb;ta*8!-=r+rD-PXz&u+J8Eei`f7`n1C zsrB@ZjX9$uBOjdhPa+%B-nzcp(b(ANmztVd7m}NWy8}(hkNWvBWWq{wUgC6ZDHZPq+^>PPDRSxrTyVSck;(2J9@Jm zouMOxgJqu}8}C!Kb)J3i5`|&)iZT86nK$&kr^~fktz)ROb7%+) zD*QV+@a(ru#ucBowc#1fJ&V?@TX)8xPvCI6uk>{~99~{tiN8+E2+B7Jx3^%G?F*!)#b2+S_&E!aGOi*jkPqKJ0&He1UW6s=1vW6>-j|=siSt z&%3{fY61)?DMzYxExKTzD|#7nWVi5C_WQR6{QUg3Z!f=Bnp4egIiC~c*fg|gzyMZn z%y?m5*{?-WA@^U3+ZXxXrE@V2qC8-Mo45Yp6#N zQxsNXN@HIX1q}OVE${I?sZRC(y1K(olVgiL7ii}vjK<8&yepYq%-<9L+j+l5K2i0l zEzrcSS8kb*I literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_button_01_dim_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_button_01_dim_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..14f2c9aa47f37c63f404b7256a5bb2c225432442 GIT binary patch literal 1309 zcmbVMZA{!`94|OgnIwBbCsSiBny@&o*WR^v?YQCHwHt>V;&Fsam_TVCxCZ({Te!kt zad2Yr1DlM~=!{4*-4_JnqT5{N7>gQT;s^bpvPDK_V#u;Mzc{0W_!Kzw1K9_gw$Dp{ zzu*7m`TsjyQ+==?e|J8DAO(>ME(XU!`0Tzv55CV1_VvS|$l?=Lt=4L#1Op&JNoxUU zL=oCR3{Ra-}>j&1l03hG85Hk}QRYQnN?31iMr1h zM^R|ex~u>OJzWby(WB7~Vbxqu6igXz3p!4?+_<7Rajl|FD+c~`V^g#l@6iDs1E$tx zi10jGi?d{yySp25fY2NEc|(SWB6M(?*rfo~if{o8esM{%#1cf%OS*#|KN;qEk|08U zj^aH&#^WbAkJlT{YHY^kydEFr_tKm{30Kw9XxTbYvE1)K+S(=&DbTnK`qb2pSDrqTmk8?b0(Q?3$yMc7T&=hnv zzpT88ea6Rof{d5(5*+Eo9b`gb$LWxp3i{n48e8W||0icSbOv{d<3Gic-GUY9OgBm& zE;gD6sIX%U*cv@W@$(3h6OC}exII6a`MP?rX4?>xD4dR7{Osyi7Y{eh9=!gMUG%yu zG1GZ#9t`F^BvM0_FRzp{-=Dkj-J8E`J;nTb^Bcshdhv(qhDSu{HMv1!^Xu>Qr;GJ_ z51np`H|IY*$)!(xxVL{LSXXDxG?U8kg{ghH4To;_H0B6Dj~xd;sc*f1qvX}HlS13M zR}L>FN8fcn7{*7$OVd>qqteNd%(lh*g0oN1L(O-{iTNKJZyh~#m9*S2`Jk7Uy0*xMzUm-9{zAI1#L~oLvE$^GeOHg|zx?UKmD=UJ{X$>)N?s`Nbcp#RC)Je PxAVh_@YUQ@sCnQYS@Fi> literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_button_01_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_button_01_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..98e2babf80355b82cd524226f71457ca12d6138c GIT binary patch literal 1337 zcmeAS@N?(olHy`uVBq!ia0vp^B0wy~!3HF^H`mkxDajJoh?3y^w370~qErUQl>DSr z1<%~X^wgl##FWaylc_cg49sbnArU1JzCKpT`MG+DAT@dwxdlMo3=B5*6$OdO*{LN8 zNvY|XdA3ULckfqH$V{%1*XSQL?vFu&J;D8jzb> zlBiITo0C^;Rbi_HHrEQs1_|pcDS(xfWZNo192Makpx~Tel&WB=XRMoSU}&gdW~OIo zVrph)sH0$HU}&Uo07PcGh9*{~W>!Y#3Q(W~w5=#5%__*n4QdyVXRDM^Qc_^0uU}qX zu2*iXmtT~wZ)j<02{OaTNEfI=x41H|B(Xv_uUHvof=g;~a#3bMNoIbY0?5R~r2Ntn zTP2`NAzsKW@b!fooL3ADC}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_3O&*^4ph&+u+5il^ZXtoE6XH-v9jPuaA8@ zI5NWC=m7oPu_I^Sto=C9dI?0 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_button_expand_closed_ef.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_button_expand_closed_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..471f828fdb97d47531218bcef12b0a238003f952 GIT binary patch literal 1452 zcmbVMZA=q)96l#9hN8F`Q4-*GxEE#Zy|g{Jqm`6iD-~Oyt-^;bQhHbD==I9=um#4t zh{nhV2{Ab4a0C|u&I~jLbz^D`V;OXj4cz9?O>r=%I5wHnWNcw~K-oSJKkRaM|Cf87 z=lAme{qA7Cd0Sj;Vk`gvamF0VB96(@6B8}IGm)<2;;>QB7YSC*DfsO?188ZkgaM7L zy_B&qcDkx!fKda$a;M8yBovu;kPeQO+a-)Vz1z1L~g8|m<@sR-yG^b07b7>of zz&VIeu7T#ADl+ARI*w;Rm0TfnASeprxExiga2$OF#1IsN5%I=lsFGCSB$f^?T##su zr=6sQGA!5q-ZbUDg_NBdO9Bh>ou7cg+0E7M2RVb19mTr$`P1lrMTwMKEcBL>&B93pRLNv zz!t{GRq_t;Je;W!vY5Lk8%XkDMrGdmRa@s|cNQT0IDsY7Y zBM?1?q8WN3L#s4sQEfJcYH=c>u_PBKC`6~E2vng$Q9VYebm;_^O{vl`EukQE5w6kW z6YL%b6S3=(?9Ov_Pvnw1p0NuYZ{s+3qyqBGIDzw(ab8eo#le>gT^^eA`!-9*GaoI* z@UA@!ZQwZ;oXaoiTEaf2#0*M=P+|ljdX7q=QU*PuGbm8pfU8u{0+;?jIfF%KV5vC% zQ!J4!u>z&(V(E*E#pYo=V#n}eYm`~m&jP@*8%9cN3yj|1smaYQ*zl;ckb9_IyH>fb z$!67+Yg6jt3zYRyjqyFS@~n!Y;xo>#SW&S0qjA_faH0RSHYxE_{l5HXYLct==e{YJ>(d8e;Nov`!6UB18iEqhKSxu2dLDsI1;I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&z>l}Sl2U#|F-s}f`<{`ZO&I8{l-_pRwF3SZdMX&e*5jW$oS<_ z-*>PYv&As?ABYaG;+Vn4b%47n?rZ7}gZ^>-q`=GL@YV*xI%S7iFw%dHF*XdFF zZ1KqV{`dTc*BJRdu4HX>zHB0%@zQ&bpWM$iuPaw=^qG0X#z04P*JBIo6X7l43-$f& z6!z@7GIQecS({rtZQFEDJ<+WQKB0As&hNOhRj4lTRjc*N!!uAI(J~M{DI`u|4DuSiFapnU}ozt@p8QeTkUs|K~`3dWC<*#po z`BdllE$4TL<9Vk${dBLHRIm4wP4{agHa(dre}?(@hWH!&CzuT`J>AbNRv`cAZ8Y<_ s#)Io-aO)heXGwY(VIlVJ^e=$~hL{G~D<@WaMS_Y-Pgg&ebxsLQ05^~W_W%F@ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_button_left_ef.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_button_left_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..f0af76f70e19514d85e9ddae3e00debc77a3290d GIT binary patch literal 3161 zcmV-f45ssmP)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=cNnjjO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NK5~def00000NkvXXu0mjfKbhbU literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_button_off.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_button_off.png new file mode 100644 index 0000000000000000000000000000000000000000..4c58db52094ab9e04d030a062a5fa342c65176a6 GIT binary patch literal 5501 zcmV-@6@u!CP)Z00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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=3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2;#v_;Bhvc+J3)(^!dGeUlDWR{prn}XZCf}RgHG1^L+FEef#wB zzaAEO8OL$lw1J5GTjnKwa1H-XUC&1{x-YQX0mX+2H^%cM?R5;DaiP+^nvx z9&Fyb_fJ-8TvgSXR`H!JVO3ROb!Bxc{_@M>$>YZl$H&JjQ5<`%wQH7ClPwYvq9|^@ zgy;e^gf&&8rYCyd7B(-g2~|a9f`oAG#`Ue+pWgjD5ta2jApa!jIqW1&_wPS?G}(Lp z{pW*&!A4OOQ540F6@{5sUtAQHTs-K_S453W2*|lw*Hz7FD?Q%0b?fQsrAs^Bd-t=O z9AC*u1!f-Kx%=5)FRfqR8yp2Av(FB)X?FQ&`0{c-%`WA6 z9#>VVMMOh{m${Q>1};G0wNX{O-KuRAkNPVsgKnqu(po!q-lHtbb4ld6AFZhC8bl;< zk{oWdJ~;%zG|+y7>KeEjVr=!-S}JpgbqOQ?X1AdCP2002ovPDHLkV1ic literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_button_off_handler.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_button_off_handler.png new file mode 100644 index 0000000000000000000000000000000000000000..11ad346f4ba882f283aebf1e45d87aecc06772a7 GIT binary patch literal 3674 zcmbVPc{o&iA0KNXTc~U`jU|cM7|diUhGAr1YEq3E3`WL`F@c%nf|FX})*iZdE?9$^MGqhrW! z6k~q|*~Z`8*2({h6Ve%U`V>&t7sVl0O|2*k(72kfH(rZHS0FeDPW%K?Y0b0pNg{XCf@Uv*D!g`W%t zWN#-1h0dhVJb}B6BuCm+CK|-C^iLP4bThNRi9Nml3KS<~5ML4<0s})KRO+r@e@J^X zt;zp3;~%BHZT;wEh&9=pc9r48$%l)=PcSET|6S3pAjcY%1%tv#3dzHO=5&=x_GID= z&>+qmurtLOWvFd{(Sai2hEM~jAshzNfoozhSZ$1^mOc`y0mJ^}_$Mp^qp688guxAT z^pP-_AzUA;k419O`Uor(hC%#|#d&%&NuEyRpL!`Ay?^W5R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J~8ZH+@f$R literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_button_off_handler_dim.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_button_off_handler_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..1562cfaff6366eaf245c5b606aa8a5526f2d7820 GIT binary patch literal 3617 zcmbVPc{r5&-yV#zMoK1Grm=*WmBD0W#*o1vOU9CYWWtPQ#@>lW(I6?=%3hX8DWQ=v zBC=%P%38EqJ2*7y$r6 z{!~XYi%hb{_|k)+-dh-GL~sb74FDJ&jtKGg4WzKZK9mzw8Wytjs1X9D`e7l?dL%e0 z#FP?1wTNO+9HML-eWL<>4gDa8jlo6{7`{L-h2;&72o9n#F%ekEpSl?Sd}|v90sjeM z1!5t8IYlPfflcWQ3Rn+{((#2O5MVSKiqO?VqY>I*BpiW+!TC2@2ce76Lt~Ko;J+^j z-x|ZuA7f82|JxRSg@pvLSRoh~EId3M8jga}87E)}Lqo$Y4J1;BkI-R8(pcURIy9!r zF9iaH>C2#ou&8tzcuUdShaSqpLinEk6+&o#N8^Tct^IsbO#?>=Jm?O>g zaRdXrAp&8B#2J|4%n^9JE&{2Cfa{w6;u2|0mN(6p^2;ujZ})Gm;eX{~Oc@k!7Mi_Q$7hk#8T&|nQ`D$S1`&eYsGp1-0cP#DxOik~@y9t{37zZmMj*f%ry zzvBLj>-Yc38I11?Y^yl_SF!xs;#c6-^q7;Tt`*lq>gsGJ9e)MY%e~ z?PmEd#fxD^%%$(|POs-I<%l-JB~Hso?J+J)po+J8Wi+Vzw=Xen6+jI$Z#Oo2I_(x# zB^G7$y#JW(uF}Ti@jfNJQk6{tjDG*N{s^mN8#`kF>%0$Du;tCUa|=QWg&(jA?Jl&= zeC~bQnJKqi-_SC+>wrxeaQCDsDT87V{l|O;;705YMa*m{*L^}g?N+Y-m=SwOw82X_ zr4G;u5e3x-ozO%^;h?cuJq2p}^NId_hjv}Im~9r9gIdp!AlJ^7C>#p2)`?o`%0^w1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{$>DKJLljy0^Q{)l7ka>!iB6!e=v6=9Qd8w+)ihYy-xXLX!-6MTUP&KtN=XMZvup}c>=QBXwaTv^>bvK>Btz5Y%~THovF z^+m}Ks|T-6hz>WY1*69_`jKExPis9;+_%Qn<8m;^cv=U2Ejqw6RrA%mCtsQ82ySQy2D$Ex~hba_@|?YnOvcJ*{$T+f1RSFKj{kO2GH4x?jL zImBK|>5}mex6&2GqBy|qmCPJGDf{{K+C6J^rY!D!QmnkZ{BCpl0~-=4_^TYL`~8a3 z4dlxd-@!tsBEz+KOKyHFk+AD>3iW{jn|o<(e1fbU=B!>A((e4i1YB@G=(3uGwT%r; zvns*(CDf1}pLDR%tfHP>pk{IWc&_V)#zWw4Lt`zk{2$>LY|jSweLgI(4WLxrTfTqH Rgt_(8Ml`b_+`)UX{{uo`JD>mn literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_button_on.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_button_on.png new file mode 100644 index 0000000000000000000000000000000000000000..834e64b344b7e7f53956671cc20baebcfec91cff GIT binary patch literal 5630 zcmVZ00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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#eyh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`Ic> z-s~9svnOF$4$}D&VihBobEoq8{Nc8sZ6|XomvjGRlu9!Wg0Nlar5Vf)zYYVQcq!AzyY`22u)DaB7_z1$lgUlAMB8V}tB||YMk#j`H?qr!QA__bVzxW86lZRou zl~&sw$1#MI=D9O zmw5w&gFo>aOHcWJP_Z2+?e7_K#a@JGj^f1rAELVRE>ySQfn2#CT1C*Y52ID*M|4CW z#*>LYmuSpSVCLw{m^t(;s5y&VsW%y6r5mv6dFZZIU+wMddoT>ci<;nz-p5KQIF9q` z=Ao?*ymj=*<3SK)9Vf{;3;@gRhK@Yc{_zCn-g*hS{#%jny$P90KV-Jp8t-&$Bceh? zULDQZ2`o;%g~sVai0k99GA@|go#Y&8bK*4`C>D$FZW$VSfEb%psbjk$(8;Y3!OiFY zuzBm&%E<8(5Btp^(>kSO44B9wTXYdO=dpP7IV=qy0AvQlB|sg1?AmA;6#-EbCR~EB zbI5k}Kx>WVW=<;&-*2K^DgS5l(9ri7=SRaZY z7B<JyX{*f?RPA->~ zmJ-Kc3?YsqL}7$%E<4#jFtD%O-TjzSYT*MPa>R;?${0JcVbhIY>8`GMsy03S)q1`D znK+6BOfo&^T%^Uc!&~gM4kd?ZG~zgh)(VU02$jW<5$HM~3L=4U_MY%L8KcXON6~QX#>uUXf Y0GSW-_(v~x#sB~S07*qoM6N<$f^34AdjJ3c literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_button_on_dim.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_button_on_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..6ad67f13cfa091aee246a0c8b7f2c7dd64f3b869 GIT binary patch literal 5626 zcmVvP)Z00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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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8aMt=1n00CVO) U#+27O`v3p{07*qoM6N<$f{6F1kN^Mx literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_button_on_handler.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_button_on_handler.png new file mode 100644 index 0000000000000000000000000000000000000000..d99cd6869bea249926c3183b00bcae30745deffa GIT binary patch literal 3265 zcmbVPc{r47AD)q{DP`ZsSVEW?%rJvA%~Gn7J!Q!>3uBp?W`@B@7$GEN%}yzwBjJc5 zODf4&Dp3b5Xj5cglK4i;`My8Sb-wHRp6h+zXS?tFw>-b+k2l`lZl9EdvIGDCkh0y6 zbrkdn!D}EUBKR&llvxWpB@WJw(!AIZ(D1nKg z_|o==u_#VqcFv?Qe-e@mw%HA`3PA}30x29KC?qg|&PIh;gTL#d1mlfm2pIGo!tu8T z|8UBUU=PADSQHT4*wlywg~31wgfYwvjzGW+K_*a`2?Q#55JoUF6dZvvF$eu@V1YFj znTm46;(yu_%&ft_91ar&fpEE8W3H(&gXIH(A(6-p4HFY10m6tKO6L$mjOc8wUkX?X zo5Z3qIWz_xw4q2m!3g45g9V=c2qBP3Ap9jvXa7u;AZ3scA`=2LhC%`ZH{$w^W^)`V z|8e7Q(QM~XCI#Y1VKahQB*A%5wSJKWx%+2B8$f|KsKYFp;82JGSOzI5kV5C!Vy(e~ z9b+<$jKY~?F&0py2@Z;d;!I#L3llRu25*irL+nLDO=0+78h^({pv@3)v^fH6u@?!0 z;Y`qYv?<;ckKSv7#bDs3Ccn70bT)@bCsBUcr3vi*V!CAbhWOhvWWeGVfcrb~M&&vBYLn@LyP^-esjuFYQhlF8%S*Ag*mTR;5-j?IAZAmq~k_yJltH3hd-nmvYf}VV0 zN;g%ruy<}MAkTAdZq5j(>-yQ@(bJKUk&X`^K2$R;Rx8TOMNevKI>_D)>ah)f)q9B| zrkNN^JjI$EyfMV*^L5u$kP&OQA$$`oc>5zWDWNF9LtEf*61XEqtR$&nlk%kBD z?WZHRtr+t{H3u2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Q!Q(Ba$~z+9WCirbk`vHPrg##RlRmI^OzP~3A5{M&8?Qp)F3`W_)v(D$xbWQ zJpSCXVEA4QmATyPtZUstRhISDriJ~|W$Q!vez+@J`E?Vrnx6}g?A|iVmgrIacKkX0 z9(G}dy&W;|;neVTrsvkmsSzV73Gpu)4>RtGHo|i%a6Rw;_`;PjUpS$uIZ_EQR}WX7 zhm@apPMwm>ZJ<)YH2Qoq0^`E9;4+A_|0hbZ5oF4 zMuuq#CH6s9EfF%)%|pAUq9%_qxeJ)(yAKrZ%p|S6pXFDMIb*_7JgvqC8QXhtw1`fthsozXHS5=V zm-uxzlyc#6nI}JJScQ&Qc5%EQGN1iGt$ua!iec|H_EM%w;^{-diVFdkCJs~aXWodS zD!TO}w9bFE#<|o4=-^*IH?O*;H-2K5ea*qeURH$L9pP1Xi@7ih+L-OMZc`0&l;}j>`2jk*Z&pJJ_)GH%u%%vp* z+pk+fp?_|7622PwWJq@VS>YH_mN@_R()LG<7yIW4@6^RQuZ!r67Lvh#LaQbLF2T(j zzLN94=x`y+DUujVSOXE+;@$1#oS% V`DMOBdG^Lng)PnwTe;Vp_iq|ghOGbq literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_button_on_handler_dim.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_button_on_handler_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..8e4c9b402b4c648aa7c82255eab804e70b7efd3d GIT binary patch literal 3201 zcmbVPc{r4N8y@@Cge*y7j5RSEh8aeN86~^M5|S|nL$fq97-UVylI0YVWKB^iNlH;e z9H}e`StGQ_nv+CX&S*K`_s6-;cU|9mz3=;5-uu3v<@Y>)yvdIC`+(w#;s5{uXuTij z%o~xsM@Lkc_g;1?$MA+7Y`i=BAl;uGMr4u!SUkS{raLc@UP>$qSL#Sa5^Gqi)*F)Yb} zl>HG*^1%pu0x2Sxgz^LLH3OM)&^!SunN0+7s7GlmGzSCzu8Zc)H@Bf+(02$s7z6&{ zl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RT|I$8dwqj|EFzK-$er2nFUDa}e+HcN~$u&s1lge~vhFA;T1THnJ zWGPq|-!mjDog|o@gRso~vW4%JUd6i)+C!sa2bv3yY7W6~Hk9QSKXfdVf0^O?9up4| zVN@9#URy30yzD;C+=}g4s7aXf#E*S_RFQki>JkkJ(72m*sXw8YBL~WS!UpP!mex+J zu(UF%8TOTw_19y?&<`84-h*ZZ?f#MCGkGzI%fjv%l^YT;063|sQDaK-%jQpkHQpX~ I!@?*2FMAkZ;Q#;t literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_button_on_off_bg.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_button_on_off_bg.png new file mode 100644 index 0000000000000000000000000000000000000000..7ecfce097704abaaf407ebd174343c59b5587f6f GIT binary patch literal 3014 zcmbVOc{o&iADxS6Q~Vju3<^Cg_#VR&1d?U4 zT-}B44tp>(E*nZ&!azlAo|Fv&Sz3#D6j~rd2&OXpSsW|KRDA;k%%WRC+)N$d4m>;~ zfMt7_&u}^H=t?^rNHeEHtapMfMHs07n<1otMeHDs03))3eAC59=S$l#2>2UB7-$9g z?v%U3UND}^XMjziNMjlt0Kg~|6fiMGp#UQ=0uCTxaOsUQ223!fC=3D({&7L1*7$TL z#+g9+VN1HQf&>VKJPZsL8X5`>MMAlJe;8nHZoZ^}Kp0CA#)2@8kRmeX2sZyzATR_p zK8q)0aXH{6MGBQ0BD8`?J^da6o9E#0OPC}0ktk`(U?K_+20-C3HhU?qZ)kzgneiVt z{uV884dXFj&I|!Jgin*62XpgJvNU)9Y-kB6^#F zS#%5$O~9MM%@IU60Zv2!fEmJsgeRf#CMcXa90`zqYWy7+X+|O<;RqtZ3}+4iLDcf_>*hL5eO+98sn#3melSKF5w@!7(Aar5pwyiTyD_M3fLRK6>dmks`wUkvMS>=VuYSKQyZ^#3PkFsU=J zrQ-OnV)?lxt-z(}uhN$;el-t+BkdTzv^4_y1T!Fz!mJ$u>niG-$Qp@Fdl7yBLH$Z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V7S`j*o2(7ABG5!+!eK)YUH+)%|x%292+9;NIQ0IVoJ4{x!i@+Sy7keazVw-0*8t=wLK50#Ad|I{o1;5>dRde0e zlSr;~PppyaeemFI39iU}tYzcHyyn;K5ygi3!A&8{tm7(K^{>*o7l@tsn)QluU2RJI z;cGtIM!e)?BQ*vW-Cm7cZk~cY%`KJe0H;v(!WSA^zg!~=uXpI`26DNVPqi%H-2Fb{ z+BLt&+5333tmID`?qoQ;^kBA2$ECIaluZ8>emK z_M-02&SbySD~3dJlYCFX{l+ljco$o*9q|16-5 zja|92b9+QM@Kv;3E3sUd-Ik6uaZrxM?f($(-d>?yM}<+V+%~iOTyJm6UnY4`TzNDJ ztvNOF*7y1|n;eJyHxMo~FZMz94_0W5zqBUKwU;B1AR^A!ck9TrfJHrgi z((Ahu9jQ#@MbdSPVy+HuIJXYyG+AFB(o$EW@WiGEBG9t&2@89$?W|st9_m3G7JVT8 ctK0_Ao!DTdxA_Y$OMljOL`On7&hNy(0ccMX0RR91 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_button_on_off_bg_dim.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_button_on_off_bg_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..cf0869202db498f18d2d67feb08fc43f43ee7f96 GIT binary patch literal 2942 zcmbVOXH*mE8V;g_x}x+Vgsci?A&n47s38dwq)A6{B_R`tkU|n62qHxRE3$}%BFYMA z5C{aRQluz|U68JT9Vuq-iUpAyEPL;dJ$ui&b7tl%^E}U6zV|(64tjfTR#Vnj27y3o z6jzduY}_V$V2TQ|x8))C4%wh5AO{J2ISfH8l?Q+bbPf%GP*~J(zz3kx2I}k{o z!So9f1bMjQ!#FHBbr}N}vbZuf2xR9dT0Re;tgfrRp(7C2oD1=G3hXz`CAU(K5 zAcE<-hX?rX@$?JZ6B&l1LmeF;c0#;NfCUJs5Fsmy&BqJvpubmNJBp%0-~yNCbWaq*7`3G5+yMH#c43v3;_u?^SheC}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~Kca6#q6&4`?>pHs|}I5HS3Mvz7h zwiq$H%+cK4ZEkF={e95yUjg0~k&l2IK7iaw2D##2ViY)SW{bd?APAqS)kdEgpP2Ye zwOWayxa85<%{I);vzs#~l24$MB%#ypv>T1>w>zEoKRt`rfF&P5ox2%37Do(>0Mo!D zX7&hhHVDEC!^6WDs@35~E0xMiMd-4K#dIcYM&e zJ8k$*`tyx=hD#n;#s4q+dtoto@p(D%jP*RQo)1<#>CZR+8vtB=vS>#*QK0|;002ov JPDHLkV1li=`Jn&+ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_button_on_off_handler_dim.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_button_on_off_handler_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..af3352fe958673f03021de31063d796d3dad4d8c GIT binary patch literal 4599 zcmVKLZ*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#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G;NwjZ8dnnv2PmF#tyc- z{4i;45$ZNjNB4*jEbD~I%bq|2F@#D1ZA?NL3Ig>7G&X5Nlc*3wAO_{SZ3++FEc^bP zd%o}d+;e;?*&lCqwmT67X%>396r7*3zTLav_{H*-=iqd}mU1B#W+)lEMl2(jL;!1ZalpL^mG{TGQn$ zlj35Vw%{&=svMU@Dr5 zT8v^wn>0fh^mHSHd?At8B36yfM8TBdC9!~$UINeOt+>{;4KoG)b7Na=BV8^4JOvDG zQkUR;WDhmKFn13&WGO;#m;qgZmm*GZnlzaQswr?G44!ypMP__Hj$+v;PjYOGr${my z@khEMBuCSo(Jm-&aBPRAd6td_IEo9hBuVmASCFP75sD|-E_gr@4XmIVrl?AwVON26 zH?iacu?(vN(bV*`rcE>|Aeqxl&B$p5lpUf`*NCFZTG4P@*Rv5V2Xy5akYl=*N7wVq zDBIZQc+MB=j1jc&esOPLytL z>=+%k#=XBU|BfIwLEs|k(n{vu+FH+Y66tGVcfQV;_3A=P$KCNNQ z^ZR=R8@adjgzb9qqg`t~LsyT-jy(Eg*l`+hJJ4ZAX7~yB8%qPzf4FK(-#O~laQrCZ z9znB*&+WTWyBl__oqxIgRpy&lcE@L?4!6!ebeFjHZ8f}yuO1YfNqgqm%IxBf`Gcog zCZ^t&7hYqlZST$Bj`X9$)sd5@7jCMl>84K}`-&BXR^ z+hT89d1tC_P#q8d`eSpYZ6JQRUOaH?+L_->*W!^&{Q1X|eRtj+pWfTFKe_Ls{rX?r zi+?&lzv@;JgDWmux$aE=gpiIof7yPrIJj~{y71-qkJOg#)Y{`MN57tlu6kO3*vYIe tpUa(@JI2R4n4fEdvvZ9!xdKRd%7(n}8nI_D@uKy!68L`ZV)TWXe*w23xNZOd literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_button_radio_activated_press.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_button_radio_activated_press.png new file mode 100644 index 0000000000000000000000000000000000000000..f2fa9e5fadc65020db739cdbff4950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xH0hrgXnHQYxnZM}mSU+!Vc-Pq|IiKTR?&Rq@sWtRajBd>HKhMF|XSJvf zNq47G-p_*Cyf=q3cUHF;p)qdheXc)Y=QIvPDmIREoRQFEh9)&)r5k$FU6V{3gNZ#B zzmZa1S`A^*!||v(UGa0#K~TikXF|d4fMwv~Oy6hO(j)7yS* S5IkM~x%DCW5-aiag#QB00mWSa literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_button_radio_normal1.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_button_radio_normal1.png new file mode 100644 index 0000000000000000000000000000000000000000..333c58042eebf309e17ef6213385fe28d233ff90 GIT binary patch literal 3987 zcmV;E4{Y#>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|}gUO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|WREri zc-imw*GvVV{`>`0*$EQ00;yKuv{LKf&0nG$9Jx| za5#+5=euNC){REj;`gG_sLRY~g?;`r>`SL%dFlRlE-ztUI!*bfPe7Gjr#5fi4Df!# zyBTLq{&Hes;*E4Vjg;%Eyw#+4g&aSHqDS-5(3LxPgYB(YfR3h-9bcGQ+-m4GA3WOAghuaAfQ z;MCXGMs*6P<-v>?88~~2i tDcsNe-)iwl0bAc@T7WIU7GVAM?*Mf{W@`V4*d71?002ovPDHLkV1oK1cvAoX literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_button_radio_normal2.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_button_radio_normal2.png new file mode 100644 index 0000000000000000000000000000000000000000..c1ad8c66a2b0d7c95085358fa122b91b3a4ac567 GIT binary patch literal 3526 zcmV;%4LS0OP)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#2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ztbb3jXLE>=p_fU~(=?&t<807*qoM6N<$g4pGY AnE(I) literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_button_radio_press.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_button_radio_press.png new file mode 100644 index 0000000000000000000000000000000000000000..85a77b2c6d40e5e09fec55f74ea52fbe7135266b GIT binary patch literal 3474 zcmV;D4Q=v?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*?vu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.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_button_radio_press_bg.png new file mode 100644 index 0000000000000000000000000000000000000000..36aca5e66194de7ab3b439571d7d4eecbe18a069 GIT binary patch literal 3012 zcmaJ@c|26>8=sPh79lER3~5v|W@jdYSuCSa##WY$nZXP*!_3$tyY!1JiEM=^A(b0S zi$dyNrNm8$>{;uI?A%egzuzDI?)jW^-uHdp=lgw@_j%6e#2vLT*&?-D3IG6Xp_r1b zMC1O|M{=X+U0?gcK{V_V8rch}JU5{~jn4!S7(7=dkiwz4Gp(33Mxf6NrXBzw=EkzN z7uuU2!O?jfC~Z{-8o==up#cCrg8*+D-IFN$DtL+Aj1ULcV*KEn-X zMK=CvOSHm+JcL4ToVK>VzdzI;3FYzKwc%JSc9jExfQU38fm#aFj7}4NKt)gfuRlxn`FovilRO`>$9WiO-}7d3hM4}2@o&Hn$qQyVW z!{mxOhA(Q3q2RgQ0D#04g-oyxXn%0r)5Ec0hdy$qD}>VCdZIenZ~D&IbBg+zk#=3y zh|G~ET3S^UG0u8QXw>VIkR==N(mPeo*ZgfnwcOXqss+)%y_V25ASzj9xiq&>*z$kG zjoK%drrMquXJ77m_s~D+Rp*E4PxB)*llJf)eLug!>Y*&`&>{DoolbNIz2eW&qf!of z-K`PTDt}ZAv&&P9r5ro8JRXK1m%g0DOE}_IG`<2F@IedsD!_ZQ$_xI);|?Ej)nfO> zOn02=dekN8E=m#;OL4CnJblI|#7c4x^PGf?*!t}|Wd6*Md5L{nviLRSeD|Wsz4W5H zHSNFKh->*-UvtQVB#z&_iwkc#Z?L$CjM*NzJ)LI^#HnSWqwdRlE?vS>VVY-wH+Va~ z>NwvQ{x!C5w%NQy-(moE8 zJd{HmF`3b31BHt_HTO1hXo{iBpZ!A@QWWf|>kd>1uvfyS_BOb=_QmcAIV?FY10gTf zgoEqoKK9NOf@VrmbBDRKdRxH37y#Pz+FL#}VP?Z_@?7i8tEItM-IAU=9k2Q`q&<|b zb}1#qCUmaMW_p~TX|LETaW3Ip1SX1#zWyA_X)Q_r8p z`v7#daFSb^WyhGst!yh~EvdFyL)osdAx4%uH=v~IXg((UNU&-S#E`5?iUl%^Gt!{f%%8zYXE zwHA!11fFeQTuOg*^#QJ z3uDEXmp#`ZBZ^T~2@?^I5}$qwEygFAx|pS;Wn6XdxbdjRZLZU%6$U9^RGbGV+zy3A zMyc)Tw#%xmtxYsZ)J$gO1!cvZaPyr&7uersy{n|!c=n9kJK0AMPj-~z^kZV=;zHKF zj|>i*{lpHk(F|@(8tg7>T5NhnMoylKiABL((pvE6@H z6wk`<*JKwiogszuvPjeOGO1mMuJ@ZW?`A3Cj6mVjzf)k zziCSTXXw&M`GFxWSUk?6>uR7mqeF9Q+NfzEQp~ciau&Qx9hsi43x2^7Pr1{SKS4%p zx`4W=_KvyRUrP32rWz_GPQqd8expgJa z57_%ZT|8FF7?tajyOrZ)vNdBgtiL1>n;o>0SwOs>XZrR~*)=oD;ImOq4PW%79hjT_ zSoh%Oj9$$A8^|9~j!=nprwyTCbwxyW;rl7gw$d}C96FnA7Bf&^Z?tRLzFI+iFtu@{ z9(h<=(bg$dwyo%@*v;N_{iXVSd$w$ldrX={x7|EMF;Ur?Up^7rmE(M=Sk5M8ugV4a zzoJ~gU@QbH;1f_Wm1DVk;kQGxxTAWXv*6!Jx6~YQWI+8;DtN zhU?b$o?uJ!Z${6YT{>qZ>B|dWoB)o|jzcd_nArKhK^<@}I~hDPeTrMu>=#)L>E%ib zV<)TF3X{uUlBg15xz9BQotCaoWZcS(?wr5-UO3X1cbI+gK*Hydk2I4j&|A*2TN`~} z*XUUocGh@JU&+1uEJvl=%l}+?>nUdwjKA-nb>F~3o=#JaHEdbC22f1V3&}f{8NT{o NO);_{-z2(3{0+S6E_(m~ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_button_right_ef.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_button_right_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..41704309f9ac6abf670a8011f09f6086dea1ef32 GIT binary patch literal 1225 zcmeAS@N?(olHy`uVBq!ia0vp^av;pX1|+Qw)-3{3k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+n3Xa^B1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxSU1_g&``n5OwZ87 z)XdCKN5ROz&`93^h|F{iO{`4Ktc=VRpg;*|TTx1yRgjAt)Gi>;Rw<*Tq`*pFzr4I$ zuiRKKzbIYb(9+TpWQLKEE>MMTab;dfVufyAu`f(~1RD^r68eAMwS&*t9 zlvv ztM~P_^2{qPNz6-5^>ndS0-B(gnVDi`?rLc4WNBjHV(IK;Xy|HWVQOya=wx7G>E!C- zV(x4V)9aF-T$-DjR|3XHtd6vw@e3rhS57mYw1{!mq|XfzyestCefuO| zalBfdr7?r$$n{3CGs{jqS7<$wWHN#2$n1t0qQ1Od8jno6nYtYhh<99XcH*1eRw=MF52o3~8talmT!BX>%92U9-Z(v=@GSs4BkF z)o7*I>V-c`lr=<7tmO9C8X@Y{F8E1PvD-5@^%(PNyS#v%JX`lz;T9; m`Cd^odltt^R53O%Ff*`kI1%Kx>f|0!;o|A)=d#Wzp$PyQSeUc` literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_check_Activated.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_check_Activated.png new file mode 100644 index 0000000000000000000000000000000000000000..979c6caeae23682af0fb6dc476689b78698dfc33 GIT binary patch literal 3587 zcmV+e4*cKLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QH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|FkEyyU$Bee4eI;(wIR}V?OEToWQ@ykpUL|>UFUgYtc|I!!@3y+53^R9&I8eh6 zq1<}RVijl#7y+}oFA|g*H#AhQkpztpNsxEPOKCB@LfUCs1gYn;V(@m}84293k^)-X zj@9-fwD=Ru4y|7EDe62lRL@%|KZFQCgSZ5Fcic;h;RfJd&z1)3d1qhA-EnbRu9Eyl z!~w^M&0BK4^9eLmuo#}qT=JFp^i&P&k$1+!wB38gr#beNgwzfXlNUf+n+Ncg^Jwi< zUbj$PBxW!q#Cs%p@jFNWBG5_srdHdREKUK{fAW|o5CLK+H?;iqrQK(<9J?QT;$UI& zkxqA>nw3xdWh(o-&ZG6b5jrhjF|9TaY^eyS;b#ry;}Ds}@d+F)WzR+6#=hA{2 zu49?j~y`FmU7jM$s<~5)VXam}SHlPjYe;V|+0RULdmvHZ_kD~wp002ov JPDHLkV1j6hs2KnN literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_check_Activated_dim.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_check_Activated_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..40818f0a53121639957468ecc8fcbd3d49ceacc9 GIT binary patch literal 3536 zcmV;>4KMPEP)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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d^O@?oMB+h#a z%~IRt5rF5NXZ_WtxRd46MK&%4vWlbt+Sb3QHc#YlHn~=fCZl3DoV=ZkCc844y_2W; zl;r(O zlP3Xkdyr2*9*#?gmAXY7sG$zk>AuCv>0Q3{xvPuFuSpPttTeup`rc(K;hC+2^z#D$j0*&z$dXfdpg*< z_g+?9MG_(a4Y93`NS=wT=Y;NdoC!442-VpEH8c>14%Q+_#1wt(uZJmv{RfEcP{t1i)7bdeOEcw5^_))+g6eDgtU~G*tT#>FN~gr~OX7UZk@r zZR>q%s4v@~2w-X!>Tduvn*vJ!lWwgZ`&M{}=#xQ=o|%o@r|U0000< KMNUMnLSTZ(u${O7 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_check_activated.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_check_activated.png new file mode 100644 index 0000000000000000000000000000000000000000..61b1380369955439317e957b5b0388ffbcf07947 GIT binary patch literal 1278 zcmaJ>duSVV9KYCEveIg|FqoT@^Xg-*Cih5kY0jo?a*s8-WHAji(ph`C`?WdSdw6$U z9!_P&3M&p)Cav2a+F?QIWX>Xp3>+#ICP+61wsZ_8IGEs^U=2<|{9W5r|LAty{hr^? z=li~+spP(fx?Ob$f;7atxHOzwoX=eg$N6tA_QL5Qo6p+a`hZ;!O@KsYJqOUZDh`4) z5arS<7eO0>)C?$@tes8lXCz(qiH?k~s2UKBAZ;B*LzISqjpo3hqD8RV=PzKWB1f>E zV1h^(EXXTeWfOFllNqTzB!y+HqaAH4GLS$8wulzhVa;NS5p0#0fota&$Iw*~dnkgf z8I?_>P*yhq8uaDGxAdPFU9k zcM&Xa+XjQ~s+BsPdOYdugfWOz|DaMDNMs_OW)Ds9H~y4Dt{a76Pqwkn~rvam}(tO#)TD3e>xfX4>udl12ot%CTtCL zY*E*^h%)Pbr*i&0ax4$#Jzb+Uc)JyFQ67ds^E5=$t%td+gTaGwhMW zxw165^G5wl%X=r(ZFfG-UpOXvmiURYmwud2WIc0djBS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x+P$*=itK>-#ph#W!{92Z_ofQ1njCG~$^gtexDQKI0Ru<)> zYkLulVs~pro*=SDNLm_7iqb2a**+Z_PD~CF=q8|Qst}f<6hp}(;H7AU20#om;o2~e zIj%;mmBdJqV?Atyl_;*32C~Gn07Pi9CIX_Y9F=4=xFA!+#thq0j4Ukb)sWs*EOkq) zAX!jxOe<}gy~PS>$(fF6=gd4VwQ~5*HqB7Yf?egMXT@6?T3SC;qn4@T%kdSob@a1g z8iXlEmVnHAe%A(Bo)^P>4FjksOCi5kuR=(77 zkoY5cEW1GNH9q|9=I`$Xe=hj1m$3VG4ZpVZ*}2LqM;4~+)@Pa~Q`4oJ?{B{}bNkcH zBVRmc2{X5SziXu2eRnbxp7r@uVmg_A>#42&xqBEhSM~L{@8uV|C$6S_}|{4rc393ZNKZ=<|q1h%=*b7sSyMm;o%jO5C4l(twU?=F;$F$j@kXW)+8s&PWiN}(Ejdh%vJa|5F wWAo(;4`1H6ZPA^)c1_>5;@zgPhKd`03OoB|rpzAxX~_FG#Ucs$l-P0LAGQLyKmY&$ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_check_bg.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_check_bg.png new file mode 100644 index 0000000000000000000000000000000000000000..7b2e5dbf4f2a69db03c28ed0e868299753d38153 GIT binary patch literal 1422 zcmaJ>eN5bB81H~FhMU_6e#}592Sb_MwY@K{&E4?&fjb=EB*4rVV^OW}V)9-QLn?4Z zMXI!@R-GzH&jJZvU_paMr?$fg0ve4PL~k$}kt9$HBU%WSZ=)K~V+JFpO$OI4m26F5 zO0gU=b$%R3X+wIo4bsAnMgAf!&6%MUdEo-R7T27)pYEFy`Fp#Wh7aT6h z!E>O(NSE+6l0_wZx*CGhm7cy%%!zA>l2ZnGXcvTNV94oI;#$!br5yHOH#XE3^J-lz zl*5XAjbNASQ5qKj%ei~BAw^O42Fny2a#83ilDF45Sx&N%7M1)(!#EhsN~FSin8Xp3 zNTs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dN5i$`lv!{_pJ1=n)4{MI|it=$+ zAxcvOC9Jx~Zksi&^5`Nx&%-+q;cI_+l(u=Bb$G@(LT|cuDqUTHAC0s0xNSS|>0p<~ znNYjj%UNe`d!PJ9W`8Oxqa^(62i&QVDkIr8*+ch@gYOj11DEYp`E>ukScF%l-K6C~#RA6Lpj A-2eap literal 0 HcmV?d00001 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 new file mode 100755 index 0000000000000000000000000000000000000000..0f5b65eeca0ef9596aa2171f05bb8fce757838b8 GIT binary patch literal 1298 zcmbVMZ)h837{7G7)v{oxqRvmp4a#Iq?%qps$(@a9bC=kZrpwaUv^uGm+?(c1?k>B# zH0d898$+E^w-2JV16M_*n{y7_bTZw>sEi>Fr9$ms1wY8N8x}=rouIzgCRL&AgU8*y z&->o<`#t~fK&3y+?Lr)_l=akaMDJwX@6V%Us~PGwyS0p25_O2RNm>fx z5k(w;aVSbddoIHk4BL>A6TN0{w3AC~ic_?7oMoke&=}SdC>O+Z4w`rh4#=vXSUh{4 zz-7r#Bt20oTHs+;ZXecR_i$GtJ)BFk5)pV5Zz*$#K!K)+mzBI~aAiNS!pkAqIwlEx zMa9hdiB+e1qcNP`;wuH3k71X4*zjuU2P*VRDfh08d_0L zqk3ev)xaosw>M-dB5$~zx{Qh<<^?TXRG?}`1V4ekI3-!)0K>4MHr^BR@xBlZK%1NK z1bN=W(o6^dSE$CZ9+m-K*2RYfDjakJ5OM{*UY|hIyxVstbb9nbuH5W{T2h|rcOU%fdo_VPu%aerUOjcb1dj=%BwPjk}5asSE34_t)p z?K8r{=!b#Hqf^InL*?0J9JAH8Vs(ub?2iA66Ppe_XMS;h!=a6~>AF+P51fAY#c#bm zAA7ws#X&n}el=0t{lxb9`zrgI6Pp_+cNtq^v0EKRfBx3nSkt|C9&IlEdFIG_dtd5{ zbuZMPQa<|fbt<)MN*Jv)T^kuc9JzGkW?=J{NwM>jMP@p*U!j&3?+>(&e!BGLNP7CW zN_I^14c6~Ia(ymaZn&`Z>;8)GgD3mG>tS1G<(=Przc*>m44ktIm$S_$?xwDvS(^K0 z`s_V6{7R*h^vxgU9#P)uysH9#of^AhzCV67-_tcR^VF-S0|y&O+sVN_KhDm#{;;s= sh4E*b&OP{93S(b0F1_+r|MHFtnD?(_jx>(#u>Mk!P?vBb`1HQN0o(Gt761SM literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_color_picker_handler.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_color_picker_handler.png new file mode 100644 index 0000000000000000000000000000000000000000..7d02fdfeb32569117dee2e091c32f2dd61ca2fde GIT binary patch literal 3005 zcmV;u3qtgXP)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_3Rg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2U 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/black/00_contacts_button_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_contacts_button_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..a7cecd3ac0e0c3565d7fa2b7266ae87a3380ddc7 GIT binary patch literal 1225 zcmbVMU2NM_6n0zaLPvjSJHb*REQi4=EwQhiII-2NtAEl(A|XqywGR{E*f*`!+Bewl zk`^I4Ktf1Ntu~D!#(01}Flhn_fhIAu4J5`Gn~?Uvq#`6Vp4iJC$^+%ET&GFlq1pqM z?fc{Necw6fp5xaG`O(gfa0fvUo!Ns*5szK?35VM8`?YTS2p)F(>V!Xr%6?UMAu(d2 z5+t*>J_(CZH|L)J1`ZKKTiMbk{E6ICqJiv~9@xZcb_JseVraNl(T!>7lO;H5Ice(d zg-aA^nQ3Y~kz;Zd8BSRT=Uq59pVy4}X+ton;r--LO~eE?^mVdk&p4h~OH*}T5zm8d znj-5a{&bq!bZR13AZ6r2G7;mV1_J=e^Dz)l@I2T@vJ7Bp2H$)X#Ki$4O-=cJMWpF!wHm8(G2~9tKoEq0gJq-GBI?aKzFvzuUZlyOK+kZkifftin)TBZ_H;7@yOPUo5j$QZQ8;CEO|Q@(#?ZDM#8tQU{386v+EI7_g~pVciCH zd`Rdiso5VG)bZYebkan(XC4TI!UAZ3-d9hu4 zVW%1?v<)n!mrtL*b@I$BYb{HE?aW1fxN!cXHx_>FCG#zJ*1u{!^}+IqLp}K$=T7YS z_)^JRJ&&HPEl1z^{LU{Y|Cl}CboOaO&twjt?OlGN=cn7Z*Y^$X8Nc7Wa_l$e_|13s zKQ#VGh=}wJEQNO$E`u+m?$F=8H}?)kyE`7wm;>4N_rs%!F7^2JSNn%w`n^Y6S@8P$ zK4IoRd-2!ZZQhuN(_D$J+CY=wCOswf0Jj4a60ZhZkIf zoJTd%1C!j{TPQFj-Y8GG7C98Xu3=-rMvkA?QVjXRnwF`g<1vj_r36fBv8({0oJ&fX zI23pxDT#ar_Bgh~3R+G}$6+Qb$tr|dA)}=evX&HNDU;x1yw=0!9naSt1NC$*qT9u$ z?}=4Z7wJBBOBmOC6)-i2eeBKQ22iI(@c2>7F>%w|9~{qSv>I})=aHFnu?;%;Rjh6F zb1I*NSyh#Z_no-;Y(|!#oKYnhQ{yqFi#7jG&N$)>7Zk^Tilw(jDlnLCl|ET)H4kz~ z$GD_5*3JE=NL&4p*V3idYGtF{9;e0YH*fZzow@N|DEr`YdC!Ek10Fc{>CcB=99X{n z@N2pAArZX5O43LB4(|Mo26qR~zL?{GG)!kNuGPb^ZNa2VcJRk~#SF?!hzdp$Yml)fb}HR`371dhB8? P_@U&pliG)wnG^p28>NX( literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_contacts_button_focus.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/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/black/00_contacts_button_focus_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_contacts_button_focus_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..bbf157f0a71f46156a70cf9cdb310ae7e6d8c9c2 GIT binary patch literal 1115 zcmbVLPfXKL7%vKlC<-@)OH-p_WNTm7wQIu!)^0N5kc=hF#6-IG4I0+I(mq__q$X;N z5f3I_yclDQ8pA>2$%7^mqlqzIxR97|!h;9B>A|S4V?z(bgH7A_@B96J-}k-myEZm@ zvZKAboua6Y?68(6<393rx3!Z0)&2HaG91L|A|6L&T-7~D4VkC}>8!0!!93K>`PsLy zpQ3h_twIqObEgyo*-<^Ti3YYy&=l1_5V*QA12J8KQjS7F&| zwHmF)qR5+Kfh@}*2hT@{MZ}+XupUGl|4@TLgTCQeF1Cw>Y5Csq(!~wQoNQhF z+EeZOV literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_edit_group_bg_bottom_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_edit_group_bg_bottom_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..c2d4df9debe4ad7fb312037b2e322394f59ebc73 GIT binary patch literal 3052 zcmVKLZ*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?u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L zUbb6(8a?QA8q8CdM(s|wC literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_effect_footer_bounce_left.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_effect_footer_bounce_left.png new file mode 100644 index 0000000000000000000000000000000000000000..506abb8f5626bb77b6b587c6b3a1a4a4cca206f7 GIT binary patch literal 4479 zcmV-_5rFQAP)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$;({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h_nVtXzF(NThg8IKzQ?x^&i03~F7>9D2%)Am&d=k5Tr zZNG05tmml20&$F~#v=KC8#5=n2(aEh6CgEsT{#*5CTPhRR+0>=9gs_ceMiK_1g#_0 zE3kusvJl{E0;F;Rkgo@A?Igd9RXxFxVbT?qjWadMk5!3106lP3?wf&C;SY~LYUCa; zU)vV*w*CZmhyM=4VR~&lVXMjAv{+QR!F+ zs0#rFffN9|xc4dpM#>cBHnuF{~)AooDLx)Sr!7*@&n2F6tvyY|PG_H#TleQ!k14AwlXx^r4!Oav`bwtj5n9B(W zz_x+me6!2HKvdvAFi?`?6>z&47un-T(X6%*U`OKP?F-8&IS>`>ZZ~aQxr7pHKP;?5SVrP_RN&|xnyvDmp zCDo29_ub=)dtY_|Y2YTcV?-Oc#qw_KTcv;Jly_&?z_LNDu|a<2jlIZyKM#@rw?R@6 zA?%szMdBtd(f^5A2$+xdm$!rIz~xLsh8dKjcBO~ObCdfCO=RDwJs;~4+}!)9+|Ri! z!ut#x#J;EzS)?|5&7ZH3{FkvaieZb~cVJrrLzJLwd{l&48*GD(0qM$M1 zld)0JxCAk(oQPd7afurM)`a)*6~YQUF2es8Sd+K|cf`nE3-nPBtB+m&9RQFZLb$=^ Ro#g-k002ovPDHLkV1iX)PdESo literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_effect_footer_bounce_left_h.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_effect_footer_bounce_left_h.png new file mode 100644 index 0000000000000000000000000000000000000000..c9d985837c374dc4a68048dc95267adfbc3e5a3c GIT binary patch literal 4256 zcmV;R5MS?!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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Y>U}&!YEOrc z9w*Qn0JFfd%K)U=$Uh*7*au!n z%<=|BcO<`8_7D6hhBd;LwxiMK@{N)x2~b;DG?$C>uvP%64fc_#bGevdN11iTGV`$n zur^@UXi(l24Lq5-kzrDh$wsb;oMrVhC&PBS#1;V3;anB)xm+ZPEn!X%fanDVj%2SD zw&zkb9ntX522L;=SYB=T3D6FPiDOg`VpJDC695CQ1yb84Sl7D5o`Bd3fJ}>jQsSJs zJKfF5VfsAouWy8De&AmRMrCnMWIW^N$0poSrK3aRc3_1$wyi)Yd7qKw+|P8XU~IB! z>sWvMiVVJ$R3cy<7^NiVLJ3^2zd>xek;Y~>g9p%mza=iycFN!%FO>^vSaprx9INmj zHODHvgAELe5*B%2m6Xd^=hX7uGF-Lo}!viu^vmZx3pb0!;L2gA#MYK3{;v zY_e#KgI1J91geq}*egq-1dQoq`{v%S01!@lgjEnDEM+~5g@Dq6_|}pe;D{k^di@>VW4n>GLqmLR7*T# z?(%!lSmE=Ht5H?-XP57{0CX<>pq77uRy&C%#$$L&IF%g~xKC$+*x8byWJ!tG`mYptqY+Cfo z6p@n@NE;$IIU25OJJW&FnT8BAC^fC@!Nl3y`W4hgY7>h^)6lM;yAZGqB$lyLh?&V` zFq6?Opj3ggD`Ob4K%lXrWVS=ONgew-NG(d02dhCDOM-k+!Nf%UDO(_Swqg5aOvfDn zdkFub01-YpvkIS?TO^)L%#s*}k|#3$L7lg(%(Lac0RSY5bNklvx{v?>002ovPDHLk FV1nC}Pi_DJ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_effect_tab_bounce_left_02.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_effect_tab_bounce_left_02.png new file mode 100644 index 0000000000000000000000000000000000000000..38642452b55050c72481b8a47d0cda8fed03830f GIT binary patch literal 4975 zcmV-#6OinQP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709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w zEfcVVU}d?Jc5<){j0(UOiJtX z?OmcCU{NN2*=ll8JSrWa*y?h(jA3VERc1g6miTi{}|}dp$rz@}g~#=VcxI31m{YwJ(7T zZfy&Zz3SRAk^XC9m>y``6RWb)P?3I-mPuok=YJ~TB~k#G5||Tu``hwC%!(d}>(%&r zt}X+wSFxxPSJ;`PEgdV53tATPcf|0IVwmm(Y9wb8lISv-EFIUERW5{7F0wLI;k2#k2D=R5Z82&h0*8ecc{pMBP(iB%w+&=33yG|WRm}8 z_O-=d_8NI^8T;c3qD|t57cdEr){0t#@8ZY)2wyx}L`41{0Ndv!MJwfC<^TWy07*qo IM6N<$g1!GNz5oCK literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_effect_tab_bounce_right_02.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_effect_tab_bounce_right_02.png new file mode 100644 index 0000000000000000000000000000000000000000..bbe9a34a590b0ce2f4faea0144b75d10107a6649 GIT binary patch literal 4976 zcmV-$6OZhPP)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>?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O9g1<4ydPNm@@_ir6I1ILlh@5@an303lEY zK@lUJg7G*!=4yI$oBzQ8G)yZbk zW*9$F5LZf&t?)X%02?JR9GPrh!mu-64dYG=-g*m(6UGU}4-q-&cnZ=@91M=xk;!c8 z^u=lGIoHQeG97#ZU=qZwLirTr*;t4hPA{9v+>=ZK@W`?L#Ytxo5wYAv4)@f}-cX9- zS1a+GF<2;n%uf{0`PhBE^R21#mMbT@rn_Z2zN4eb89I1Cv_3M=KH#eqKTYNi=Ih@9 Y0N;Vv47*(riU0rr07*qoM6N<$f?$8sOaK4? literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_effect_title_tab_bounce_left.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_effect_title_tab_bounce_left.png new file mode 100644 index 0000000000000000000000000000000000000000..189c69a10af46101701ef7ccd07223eccc473e30 GIT binary patch literal 3952 zcmV-$50CJPP)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@?wFpwUVxr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}7C zBXoZ!Koj=qMk#!Gxs39#;<&%MyxV(dV)o5Jp2h|&26i#|5AoUYME;G{OFGJyt!H43 zfNUzrBueADZ70&2nJiY}UGH9*d}-hiFdM(DDNz7PAg&4Yqibw24JTNG_{52XYDX&Y z5>H^FE%%b*;#}<#T=fz##d|E4ontWWd2vhwFkhZ^H^=5H-B;&t&P20`Uy`H<_9u$g zzcB-wFwY~nXvnFmM2musu>1PVfR*4MRU?@dlH>~YLjqak1(ag;+ll^0@0ZM>0g;hV z_emlej|x}0WnKkmXhEysEWK64H+uhwl2?nw<>FC{+w;pe8MF9V8QS9#Cuf3?S!#en ztB((~izBTJi8TjC1c4D?SH?2!h-FXDQjcMorMA-bo!C+TqbelW-Xpq& z@~1c%%#tVT*|xWQuQ(UR){4q$=H^DDo!0*RI{uvF=l8x?`#%6W;(5|tj2u`10000< KMNUMnLSTZbb6(#7 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_effect_title_tab_bounce_right.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_effect_title_tab_bounce_right.png new file mode 100644 index 0000000000000000000000000000000000000000..ebdad5b57269c9b97bf265df246ac869ed5e07f0 GIT binary patch literal 3946 zcmV-w50&tVP)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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uUD!Kgy*tOi%C4Lw4S~1ValoraG1afK45h{s!_U?ckH7FzI#9+Wt>I#?)CZP+k zI8DIzfo5dNh@}H;TC4`LS)JrnU>mY-GVFjvS}=Vjfn!vXo3Rw2C5aC#oBt2nKNFH* z5RDwCpu7?nSV>SHqOS~fD*h^7RmxDdG7a+#B1*D%mJ>3{`HWaldB>wmooSby*> z$fZ&sg(=08z^u&za_OhP>U4?E0pA+nGRX|5#U^0SNxToUeoEqb$2i*724ogzOCFX9 zSiHyyfMlRgd}uXd@TYYG_M96)8UQvypE2wj_O%!lvFH%HC&QitwnUQGYdje?CS7dK z@W_+I_yUEc&o5JSW87reH3mcm_t_(KEUtyDn+&@ayw;$z*OP>>QG@dnuoFy@9blzF z${Z)L_60#L6R2IWYUG`2#wKY<9RkPdza7Jl#3=S`{m6^#O5#&?GMGus%A_tb z?QH-%16EXqD~kAwm2|!5khl0)G6M!}ARJ2!KfrkV5h|jG5Eccghq7 z(YI-RZz=(!5&kR+>lQM?qwJz z2hR1LpU}Wu>;+7TvG8ASi;Tu5lR^^fr?^BpSkK5nvj6Umg0vSX=_J1jlBf;PGBB<< zsYJV90ypW|`tQPK*ME)Z=kE#F1%MR>*nC9b#g@MV08Vjru5Z6$82|tP07*qoM6N<$ Ef`ay6u>b%7 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_expandable_bg_bottom_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_expandable_bg_bottom_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..8247196f007b4494c9f51bc5fec64cbccd08a89b GIT binary patch literal 3118 zcmV+}4AJw6P)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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$#K-EuGu3aw@%9sx}} zm<9#MamxU10Du6%G|i$A;?BrsEyFO5SJzhV$1mgO)3fuBdE?S_E&cvB-F_Sn+oRFQ zR7w@4lzjq#TCE1#w%bC8&PFOV$!unBlk3R`5UIIPn1$ziIoEN^uaikiDb=wo>xhV$ z0H9v4gPCF5b`ihRzLh7Dcohj*G-=T07PVmNVtP+B>(^b07*qo IM6N<$f;jcapa1{> literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_expandable_bg_center_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_expandable_bg_center_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..b22f9c76f8dac7994e758d4ddd378da267419481 GIT binary patch literal 2908 zcmV-i3#0UjP)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{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-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} z0003^Nkl8+$&)rBVsZ4A1lO z0Ez(40GL=0AHWTOYu9xLaTp5#Nk~lyQQt9)scD&AUDJmkidKqX7PD}6=s);{$LaLk zah$sAx)+}lIgXPTLfqP!jBDF=V{1EgCnqv!wL5RC@IzYd&O%M8o@JTcc;8Tnhym8Q_VFM`G5K3~n|7W621tq=lU+26J06n{fxX2PWi2wiq07*qoM6N<$f;1PyBLDyZ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_fast_scroll_handler.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_fast_scroll_handler.#.png new file mode 100755 index 0000000000000000000000000000000000000000..f458c635bcc9313f2f25182f2c49d93c3760afd5 GIT binary patch literal 3452 zcmV-?4TJKDP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1r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PlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z0002YNklG?Jok+CrK|+zi-P&+Xh1nTQDoq6aa8(2qJUHZI{=kP-@Y znHwqXzMTf(bX5~i0O!JAogiFd!zTx9>ot82nE<@McB&2>Qrj+Kk_t^-dw_6P#pMrL ze3OU4_hbRS8-Q=whEA}P6Lb|ctYD>Kv2o?>)NBzrw#>iYGPfd*SSoYtt+fE6uYU~y XWLn+gLjAeF00000NkvXXu0mjf#B_w{ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_fast_scroll_popup_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_fast_scroll_popup_bg_ef.#.png new file mode 100755 index 0000000000000000000000000000000000000000..40f2e8701ff7a8f0ec2ab179ea5ff10c3da38030 GIT binary patch literal 1535 zcmeAS@N?(olHy`uVBq!ia0vp^av;pX1|+Qw)-3{3k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlv>1qhnW#Q!N zX5nOEY2a$&=wxbS2Gi@AS6q^qmz)Z-Hxp~q&Aq%{;DFibEv*c5!g_JNpz`jJT%3gJ#? zr^G2GUE_Vg$7y-$O7LPS^mPrSl`YTXkHJ9y{1#3mW$G+}Mn z>s{Ah`#Ps=yZzSo#yW=C4N`5pT@;sYonvr@t^0l2=E$4xzb{|-v9|H(9R1wL`Rh5q zCi$vOzF`-rez#EbU{iD%;M7CB>~jSz)uzY0ZghzuvntajT0;Hrx-G zGy9XGr0yBbL?6rWcb?KfBbNKRhAm0n`&IPPDJ+74u(0dT~!P=ub#12u8>{acmI^r;91s86$<_Nxa^CWt z&%Zg?n#@%{%rWD9?GaU>=^d3G>%)4cY_qxbp|V!X>W$>ijmo7{oI77;Og5p*UGt5uTer+HUKV0-RIg~(!*|uDzmvuO{y&xa-@Ad4 Y;qYngcaioDTR}y#r>mdKI;Vst0FEU$ApigX literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_fast_scroll_rollover_bg_line_focus.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_fast_scroll_rollover_bg_line_focus.#.png new file mode 100755 index 0000000000000000000000000000000000000000..95d97b7c663291ec3813f8ca6f3872afe2aaa1cf GIT binary patch literal 2855 zcmV+?3)u9DP)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}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J{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} z0001(Nkl+rRfwXd|tgfK>TNVk>b{*=A&t&Vojm z)RAOFL2L+{_I%_DA~(D%WHMe|qkp~{PqrJeTp*oZB5@0al~3d-}nG?CsuMkI`0F*e$=KjBilSUi9Q1W X86652u_xYw00000NkvXXu0mjfiOy&7 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_01.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_01.png new file mode 100644 index 0000000000000000000000000000000000000000..4be8d5b83c5ca241413161627c6525c8f4989ee6 GIT binary patch literal 1442 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?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w3tcoV(Q2#7DZOZ{As+)((aH znU-D3<`!-4QgZ0(D7B~0J~{bk;tSt-!oEn->?LDzM$MVtK|D7&akc1&{Ji&C%RB?i z`#|GZBY$*;=(~V_a=KS>TA_dC)qDAt1#si_ZO);OXZmd8pzoR6nUP;VaDVvjb>_st z)5p7>bX=}@$XrpRubgXa+CRdMbp5sSj=L!iYIC2wJReq^kNyqq))MLrS<(DArQ!1T literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_04.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_04.png new file mode 100644 index 0000000000000000000000000000000000000000..85f4c71c0e776bcc970a20239062cddb7d200b1c GIT binary patch literal 1421 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlv%P3L>2y9nDQ(dOh=sOA_;vQ(^XI0_}zBHN&gd%DE^tu_V7JBtJg~mI4AY@=NlI zGx7@*oP$mE3>CsN^HTE5i$T!?@vTd0QD#|cid#{Bt^zoGtunFLZ{g-?JgIrW98(0$8kMiEePdu?-0SJ$7*cU- zOXxwb!wv$uy($7cAxxs&OPe$*1X$`1G|N9&U-@!*h1h$zd&7Zz)ef^Z6b?+Gs6uww6?fdzbTcc5n$64JmKK+8j zg1Nm73*9GpKVVkzj&G8%U`>hW>N|6USz%+1s6u77@`ZEfXFAHt&i9R!GxRpz&*J$` z>B3~aqbah!4+9rXkUX9y>+!0zI_Xh_#d+Jgvp?8PhK6W{J zHs%QUG-L>Wa{io4fzJd&jVFZ!|n<&(ZTw^qccd7VW^-3s$F3N!O5ia>p*?*3aE1lI~or z)VZb+uCLY77rc6Pp0VuD)*tq_udQRY>T^wF^^P#TQ?hbvy5%DM+j?^vUM}mKEEPF@ z;>4dk=d|x@U-o#n!!@+)Z~D2uTd$oiY+fSWS#Ez|xn}h1rTe{qizYA_FJIAr_Qb^J PpaRm<)z4*}Q$iB}M9KM) literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_05.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_05.png new file mode 100644 index 0000000000000000000000000000000000000000..819e0db25ff05bcb8e1df2f64f4e83b366f71a10 GIT binary patch literal 1441 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlv}KX>Y-(ueYGi5V zYU*liW@v6|=IG+$YzWiqnO9trn3tRivo{lHFI2B9UcFY%MX8A;`9&f5`8lu@5Rj2y zl3$#WU!dR|Y^rCd5T2Qrl3!j7iXMn>T~doO%TiO^it=+6z~O6^iN$^kH#c)512ZEN zS6u#v=uIIf%=Ced(FY|Cq{IRf0;WI^6Q1;e9C+qQ%>(9`B4E}in&Vi{z`%IX)5S5Q z;?|Z>Z!cy?0be7d#)Ahu6p|DK1ex?$wl{IxHdQd}ZQN0^-2H=EU;gOz+y6P_ z-72rmbv%<6b~}j4UQFs#`{)t4qDy%*ze;zlXjFyMx%PSIe1H9#vQLePFPEwE1B(rF zxkL8cFqb3tQX=LjgdBOkY$=$2p!-qO{ht#&=Bho(U&$t0x{rAdQ@BI)^%KkVK5*=@ znlt^2&Cw|Sjr%5qt*Ab7uc10Yen-IZjar7Q&T*Y%5wD-PNFlv2+_UA4V{r}79g!=C zBCftun$GKa)v{psH=Rpj+_GLbsdLd zm8PqbcfA$U?R|0FRorhu(d)j+QCsztFF#|p@ULC(bGfLRH8xeGZ%yzU*MLn?+r7^3 m`+8~qrwzqIIhUR>@i6STx^#)|6)ksAq3P-B=d#Wzp$P!P3jGcM literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_06.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_06.png new file mode 100644 index 0000000000000000000000000000000000000000..5b5c5490487b45dab7674a9aad42429aee1db1ca GIT binary patch literal 1442 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EV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2PF=q!~zonra%xAp7ennc;-pX1Ll|_VAg2pvzf}kz<{b zgh`Oy`!CzRiPse;`%LAl$+eoh=l&l1&&zhl=vmK}iGJps{r0zg)2}I&ehc(77;Bwa zLo}D}X;}Ah0b4>3?*f~I$*N!2JS4d+TKpDP8!pd0p?9Y(==e3B3DeCQI1ieZFx_>W zo>p!W_xvf}-X4o^2BWFnRp+?bFYxlpIfu(VmVNe6w92URK}_4(XLbkV6wjO3wVzuM z=*?$xe`BHq!=jjmnJ0ea@Yp-JFBE7wT47wumBM;K{B`akIoT5%Sc8h*cG-#taE9wX znR8y8#kBWORinXDp$Q*;FMhT(no)AALyDsYXGc_-nb?FxZ@o7i_0g^mB#cvDe^)vd z%UW@XW5UzS^KSnC3Rb<;SN_WQOv&)2J;Sztrk@tZHuzqsb6D}}(B#{v61gKS*|`l@ z-Y~mnIIpAp%)9PgaVEm0b2ff#t(dg==xxKytn1qrs~y@b=^SzOPRY#4n^)f1`~Fbp zi@ax+D>rs*eX~MXV!hLPpXj39x}i&N*58{OEW`4`VySfZ&iuGvs?jc=m+n9LQTYG^ WpVgv?+!w{c#iXaJpUXO@geCx)_4ncc literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_08.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_08.png new file mode 100644 index 0000000000000000000000000000000000000000..6e311047e9802db57b2cf7b9d3bff5209fb1db9b GIT binary patch literal 1447 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$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N1<2d6y9?s<_KBd@QS3D(q^^3S?4GZ_g8BgR{mi-g` zv@nNh@`AjCOK(4Hap9kR^ZSAXVdJ=xvXD6O^eOAbmoDm?{brToyo}T5kNgk3*(@Ab z7+W#TsAcC@1=EaWL^^k1gAbFyye(i`<@*L3-m uRzxg~7QVml=Zo|l!KeNI?4G(eFfs_r%=c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlvFVO>4AbkGS6q^qmz)Z-Hxp}< z3HA13b`;>pB#>E>dj(Zw>B+LP-xN8z3i95 zk8~G$Kiz2Md@Vh7uSRg`oLR@hRa1WMoOOQHJ?57yHh$81EFh+;ADdNV*8X+%F81Ra zcV|9W_U&x4N~&G+r$sL(YpRxq1c%Q1eg4v&M{X>#!Mkd=eq*ljypbjUxAxR}24;rJ W%GsZ1l&C)i6_cK>elF{r5}E+-l><5e literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_11.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_11.png new file mode 100644 index 0000000000000000000000000000000000000000..6c5bfe482536066275d23fd044e150cee9be5cd1 GIT binary patch literal 1421 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlvvu zdQ->=Gku_A^g)RODY3wWfGH5fgeQF<2cCIS^ME;~2$(f?xh*$kU|`(q>EaktacfIh ztk+=&fqQ0?925gMLv%#AnjTD^{y{13IQ#hp<{vqJDJh9?v3fJNda3ds4BFoq`NJw@ zvhJnE^(Wt@J)gaQZf^em`@4fr&HQtvR5r@LVWHDK;|GF27~~pE1D0mq@)HQKVRK8f zV}I9B94nlY_&`YIc0?0n0qcgyM~gIOysAj|D4sAyA+kiU<5Tw611m2rwUZUBVO)Qp zwMy}Rzr&=4lyh9a)pXXxtof<(R44yctH54wxsrVhCpBCQ6rU!!-ds>|%OHHU;=Z6` z3ZA-+J|e&NU3^tAk%ceu=E}er1$GwaUv+|k_dc^tS}Rq);Ji@ClUIQ(TK7J)B%Ye7 zaQ%6C`=i@^rFtD#)GXcFa=T}7>qp-9-NChf5p$6lV{C5ePa4g zo>SVp7j`yyzuUBURn}X3?c%P*9CI}9_B^X=l$YPO&3k|OtNpt5Ogs#X1^stK%6c+D O1*E5|pUXO@geCxa3jLV? literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_12.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_12.png new file mode 100644 index 0000000000000000000000000000000000000000..b2d2884febb6449417366dff9ba2e62d3ded97b6 GIT binary patch literal 1431 zcmbVMZA=?=96nyQ6cQ#8CWDadyjeAb-W%7Jo)l<%t#qT%0F#c*)Y2aGR(eqJn-Z7tvKb-UhlydvD^TCKhuQqTj*OfX>C0)1cYw zsHBT%hpVpoTRIB>qAHjYn`pD-lTOYHJ3<&Z;Ppvt0LaP-_#93TErR8ACBtf=h5joL z$hfpnsnUX4dxS*VDFe^Yx2E4TB00Z7CRv-gfXvHom%|qJ= z1g=0tj}}^W%4V^G29BpeC5$SZs0ssB1dI`=hR~#gIEtYNh9jt2fuW>QO`;gM_CS&v z@2Vh+DASsjw9-OuQS^}r;`jSue+JC)l?bNMXb==fa9klF6ha*gyX8h9bk2HA}6>xA8066!WdY}urAIogvzrT zEk*N8E$uS#oEKclFUf46pJ_6waa4s9#{Y_YmFxOHIYT68kWh2{t69QZQU`{n>#Z*> z)-MmuN;ig=uEyzepD_RsF=(cAC4pOgyDhuE%1x~5Z_Rz)DoadH{JMEsw>WbtY4q10 z?f2|s{nn9%WbfAAEQ3;-|Z&GIGj1 zzYIi{MLtT6wBvr+KxCmVJ`i*N#e=Dlch5)lX&;Q-RxAShA`*_K4IW{eoH=- z_ul@!qc0b>ZyD;Din_aeI+wI0fy?v*0iYt>!p$|3Var1Z7i_Dv^ f)z2@CH%4y*2D?tQD=bZqL%&M1v4Fauf1~+tmuCZ| literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_13.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_13.png new file mode 100644 index 0000000000000000000000000000000000000000..c4bee90c9b4af170b0dcf60f44580824a4e05de2 GIT binary patch literal 1443 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|G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TL?A#Cu(2uZKR4R=f5|_~X6kYwKd&eOuF&+cpHu z-LAH5?&N)2?wJ=P?TY^HvwoG7+qyH=0dXyTKH){|+N(}&_`hd$w2X_u%1djz^6$(1 k65iJF)VY50C*=bSyE5l$PMqoM0xB;(UHx3vIVCg!0ObV<$^ZZW literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_15.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_15.png new file mode 100644 index 0000000000000000000000000000000000000000..6c5f2e3e2850023d4bb28e751a296357bcdf47b1 GIT binary patch literal 1445 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlvT2d@Y-(ueYUE_- zV(RSVXyW2xVrF7y;Re&|nO9trn3tRivo{lHFI2A!UcFY%MX8A;`9&f5`8lu@5Rj2y zl3$#WU!dR|Y^rCd5T2Qrl3!j7iXMn>T~doO%TiO^it=+6z~O6^iN$^kH#c)512ZEN zS6u#v=uIIf%=Ced(FY|Cq{IRf0;WI^6Q1;e9C+qQ%>(9`B4E~#%~f2)z`%Ib)5S5Q z;?|bXXs^Q#BEG#oiV^}$qO6VrEdRe;wvTPn4w(KxD5mkgQc(GV2W%|j3*zfIjy44t z1_W>kHZPplo&KuS7Y+{tS}tW?SHU{hszl*5@($zsVc&(Y|E>I98&M%gew_p-+_0@nM2CfM{U3p~$0lOQ5H zKQ&U%zcZnLL)ca87krJJ)l@-xrwQE#oiBx!r^m|HUTqaNy1V4jw=Apa6Q@?PpEJI%ec3CouxC|HoBp}|H@X!H smfQ|`Z&&$}-$Ln?{@=`7(;1iFVdQ&MBb@09M)tCjbBd literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_16.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_16.png new file mode 100644 index 0000000000000000000000000000000000000000..9770265a638766dd422ef3e9daff02d857ebe0a8 GIT binary patch literal 1430 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlv1yU?Y-(ueYGh$- z=;mT#Zfap+XyI&N=nB*8nO9trn3tRivo{lHFI2A!UcFY%MX8A;`9&f5`8lu@5Rj2y zl3$#WU!dR|Y^rCd5T2Qrl3!j7iXMn>T~doO%TiO^it=+6z~O6^iN$^kH#c)512ZEN zS6u#v=uIIf%=Ced(FY|Cq{IRf0;WI^6Q1;e9C+qQ%>(9`B4F0ISXVNafr0Uur;B4q z#jP!&(O%4s0zNS_47v?Urevy>sMr9ZtUPb=#g;r zsKDxl>6+@+HzQSfr=Cq-wrcnCOTqCvVp~g(E!&e4`RunX(=CVK`^OK68?f6oa!!y+ z-osS7a)E=xiCqrr3MVB$a7~O{(U7u}zaVO+(9PE9C{cH&iGed4Cdg;7R+jzJSydFh zddq8d0m)x1DHjEGr{zp)5R+VMvF*3Qr1!TMwAw1kvrW4F%{KV=E{_{KnB49v8HSd# zup5bm?`0N0AYAbC^s)}Iweq1`s<pp~f`xnr2sxBO?UU^ym`+f|y| zz2>PMQ|J2z@dq&{-#6Mm@Hw&aZ6)i%!o`ud1s+9jQ;Xd9QM@r(Eo}SL^Ga`bE6)D) zXv&;zZ^Ab%pO>C@dCLJ`SHrIptaSXpj&E__G+*TGqLyW8w`ZM?Gqk+7w5~K>6D#)mL-=hzY+y1DLq~NT-G@yGywpQBLT$# literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_17.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_17.png new file mode 100644 index 0000000000000000000000000000000000000000..3dfc39c941535139abfb5881d75c79e063121bd8 GIT binary patch literal 1419 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlvggWO(7@D^ns4i2PF=q!~zonra%xAp7ennc;-pX1Ll|_VAfcvbP$;17q(@XZo=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vaBB-JAYQYzQ*vR zps(70>3~!f$L{l|1%03Q&fCabr2M_ncVC*8nDXS~Ien5=-Co!J`pjAN`%qZj;kxI) z`(6tOANPsu^j=Y&x69|tnub@}*IR`b-N`v{Ke$kG;@M)4b+zk#Hr-izIF#-DeBOC0 v4oWmRM3kSp_m{yg^X8oC|1=+mH!w1sxjZX<@tlA2L1m$*tDnm{r-UW|ZENqS literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_19.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_19.png new file mode 100644 index 0000000000000000000000000000000000000000..04cca499294ce87b5640c0065d99c33c13d39b02 GIT binary patch literal 1419 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlv|$i;>||_d=>*g3nO9trn3tRivo{lHFGR1Y8(zIu&PAz-CHX}m`T04p6cCV+ zUy@&(kzb(T9Bis*s1Tl+my%yz42m9zZ(UN0GRsm^+=}vZ6~N(Zm5IfE3pY1&BLg!d z6IWdRhUiTpC(QJLj?o7t4y42a69T3{5EGvCfgE_|NzDW1m?B`-*zsXUGy?3in{hZD8@Kc4O8-N3|^?4#@GuCziyAXz!# z#lsZ7ng*5csvQm04!c7yO$gn?@~dwxk4m>1lc8N2OZEGTwOyaO0;B$ldR($%3Y?{p z`cdt($Hc@V6aVt5{C=-D(0Hz`>8)+ z!58u4U#xd$yuDS-$tC*AFiDwz;<9~e8(4qY6c!XO|4~1AP1kLe^Ly0JR6e@qw6(@x z_{Rz54>UHyxp}O3Wb-Mb}BEs z!<6i{@uJ|75H1Uo%F|-JJErEUdD&E7jaB)(J5;VU_cr^n_AE!eyOuXr9g_0YTX4`x@ueqOzhvD_{O&UL~ Rc_xF3M^9Hjmvv4FO#q+<{!9P> literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_20.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_20.png new file mode 100644 index 0000000000000000000000000000000000000000..0eecffd821ca7fab8e616697b35bc48ff232488c GIT binary patch literal 1444 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlvQ#zd*q`*i_F@Av`lLCBM8F6g?2%x}+9mmZhe+73JqDfWy}+6N~*8Zf@pA24+Sk zuDJXS(VId}nCSx@qYp|PNQng|1WbV-COqi_Iq=Mrng`4=MZm1_NYiry0|Vm~PZ!6K zid$Pk?|Lx>3WS-5O<+kp=)u9H_(JK$BJmfzZ#X~c?ppI&ZsF`W#}|v1cQ7sFc8vO< zB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q;ioNl=D;N0SCkwM36^}po>Ak6$k!Mj! YKxAHLRgdm+d*~-=G89u^kd+7i28K)p;Q#;t literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_22.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_22.png new file mode 100644 index 0000000000000000000000000000000000000000..019d01a9f3df0d66a531e30b880481a738a06bb0 GIT binary patch literal 1420 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlvIr5|udFowz; zk883EeW0))K{!EVLJH@e<|RC;3v~P$W=?zPaIH}OM93N@mD74mTy>{JO>Ta?9Qu?o zJo9h3LgWvQ6E9;dg3VkVx|7yfY`x#OE0XJ1+= zi?q?bf}kLUdXBb3^*ej-MY?9o`U{6Fx{`Y)Om3m?OqC7Hzy3TwrhD~+bd$z|$KDC2 z&Tos1@ZQq3>kZcq#B S(bqyy`RM8D=d#Wzp$Py?<@)FV literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_23.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_23.png new file mode 100644 index 0000000000000000000000000000000000000000..e881650642f46b9308b1cd7e5bd2c484422dd432 GIT binary patch literal 1435 zcmbVMdrTX3952Fvpe$n;f)e#S7?Xwe9`r#^3if(e+KsXfii5?B9la|(;2ygkv^=7~ zzztmj&fvr_0-6zmW@;RYQL@1@7cw{4Low(dFcYQ_GI56CVm7Zp(LZp1c*))G_4#~1 z-`DTjocX!2F;B;+RH|6JjVMsY#NZnpseEVrrWIv)N+yftLct^ZDTz^;X`ze(>>O3j z6fhKBdw875QmMi{tgBcqcI07hfzwbyj3&T|3R|Vh$_a>+yONQCGNzp6P2ioc&Vc|+ zo51}#2ka0njF+|5Nlal~zRO)#={C|}PBxGgz!U=*Ds2n-=81RK-{jOh#*i~#EosHjP_ z2P+_~>srdn1bSsz#30D;_iOwa8bKD(@Fa)GO70#l6a*^XV0$H2DGF6Z2<~c*;bl8v0+kaD&C-|_CUKk~ajiwG zB~b*yEx3WeGxVf|$S`XWUC72}T&vY=Aj}3>Z_Usl2#MmP-i*VDR*UOM(u~3(uATSE z6z^t2x~!tR#?@ON$;B)ZL&<{V5`?Ny2ROZgEcm>F2v`br8U)zS^0eUh1A>K0qxF@=#^qsn z<;FHm8F53ySD=>Yw$g%r^a~q#j+j^+iIdB$uGGdf8iwk4%f!7cA<%)~= z6h9wV7e3MoM7K8MfU}KgNSuG70XlAZwWo7y17}OUdu8HY>f#m8jp@^iOYK9S&)2^6 zOFa0>(H02LUr9-6`8Ki8J~MOP-CR4K&PJ69?zNuWmfwH;``KgANT&n8#|`wx%=7 z%x&P3Cy(fT9?c5>Got*~5iu$!wf_3(LUvcabRn{+q(gHvZ5i~Y{aSNzL}>V<@S|h* f+aG8aa~s1{^FYtg>GyXw1%H=zGM_kuA8P&^Qqltt literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_24.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_24.png new file mode 100644 index 0000000000000000000000000000000000000000..94f3b328ca3d8b74ce3fef18948898bbb5aee4e4 GIT binary patch literal 1434 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlvRr9Yk`aI|X<|xJ0>I8x(d3uoS+Re{pT{VMGxM+f;d!D>USFP^G4f=DIo6g<+iP!aK6^F$YmT&!h z`~6q+-D>N2&f~@Pgx@iGjr`ih<*PCl{mpEOS+c8d=NaZHn$uX;ImZ9D*%5s8Pm{um zjX#+x7$$YaS=_#+wQ5uH1D+jms!OL$hzeC>?hB9G%T>8)KC5HgBDGw9mqR(HbiN7t zxFkPPRoO0+Z}ZvjKigk}SqDrtB7;^nX6(@O509BJe;50;pSw>idavl=d1>0&w$C1K z4EOEU5Vm@^B0BVz?D670vro>3|98FF#rMKOXlAO;LXkt#$AcaA?bKW(KmFtuMH#-Q z6WPB>Jmfr?t0`w$ubJ|1(cIsBvvy0itMdDvk-Pi(JHPyrbc^%hm6N|V3+-O4FLOSI iVQT+BwYT97j0{^`XI{GcYtCy>Y3b?e=d#Wzp$Py8D*qM$ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_25.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_25.png new file mode 100644 index 0000000000000000000000000000000000000000..7845535fd65ba66bfafcd25eb9a61969d9455672 GIT binary patch literal 1416 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlv0)VOU~FXRYT;txYyi{inO9trn3tRivo{lHFGR128(zIu&PAz-CHX}m`T04p6cCV+ zUy@&(kzb(T9Bis*s1Tl+my%yz42m9zZ(UN0GRsm^+=}vZ6~N(Zm5IfE3pY1&BLg!d z6IWdRhUiTpC(QJLj?o7t4y42a69T3{5EGvCfgE_|NzDW1m?B`-IO9L9iGhJ}ho_5U zNX4x!p@Ck99R#-aE)n1n;hHMO+@$a$kfWke?xb`D3;%=6J&ylb77A!+@QN&I?BG^B zcOs`kc5=>|l82?2Q_Ak`nRzlLAoS`I|4k)1@pd?4(j{U~Hw26DywR5vM zbUc-cQ}<@_zW;7nQcSFv)T2QeoXmbw@H4-~PvU1DYb>v+t4CLRW<`5mQ8zQ^~2 O%0^FDKbLh*2~7Z`?)m5d literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_26.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_26.png new file mode 100644 index 0000000000000000000000000000000000000000..aae8a8b3bb4ded7579f2267333e12645f1e57723 GIT binary patch literal 1403 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlvEvu=Xzu82=myj4nO9trn3tRivo{lHFIcaon;TxeR?bDKi6!|(A^G_^uoMuG zkzbNuoRMFk;2dnKXQ&XKnU|7ZUJQyJh;Lm|i!#enQ{0O3a}~hhYn6$`ehW7@b0Y&Y zBNJC#{)XsHAt%iAfsWA!B@U#-0uutJKoAq2^no0B=1I*1=9nU2)^KH1xXZx6xZ2aj zF{I+wme5?U!wv#(+m{INurN&(>t~ZS0_-U!{CzQF!ACtKLOMpZ2iw)Dh%D3DR%&pHW{hI7j1DqYs zEjzHod4lB!o=JPO8~Nuj8|fVGdvh#VAz)w71fAO)Cw|T`Ua{!$`&~Nz7T&w-c_$rl zb(p>GNLrWL+W@70<8N;*Cxkp_OM2{M;csQN{b{wx)7eT1{=ygJ1?|(<^qp(#FqfGk zaze~esY)5qWZZNww z^}#G}$@h~kIe4s9Pq~%y-ES{fWs$vh(;_$DTZj0bGkT}cc3&-T|~)&Vn( zJdMz60rNIWOwhi|T=Y+6(+tZ$HWqV!Kk6wwyC~#^MNsfoPfL-XOMmSBQM`ENQA_`0 z4a>C!<1O-bd3@Dz{NgHnuuc7O5C7!FoCU{TulIR%)#plUS)6-vl=d#Wzp$P!} CfAkpu literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_27.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_27.png new file mode 100644 index 0000000000000000000000000000000000000000..7545b5a64fb3decc68265ea106f709bcca8384e8 GIT binary patch literal 1419 zcmbVMZA=?=96p8thHmL580QB(4we{a@1?!I+>H}@z3b>)D-;$m6ZL4X<%IUSyTcX? zb1VT1;&7rv6lWI*L5zEGFIkw|Br}Ul<6J)wK?x8Iz9b5pi!#PGuRzfcxDQ@(_kVky z-}8I>UrUj5+q(2e(g6TiXD?)2>iBT{O-oU~lObwO9X2U!xl$r}l@KTKfW;$L@}S+% z`FI!4dFpl#^LYS}>=jDOm2$@p(k=R7E{=i2{-DYRfV}*0kaJh_3Rubega8H2oV@^n zf`@|23=Y&0wDMI#VZFqc)H_Sv_0?{|1LZ#n=7mYsfS*@5Fzl}h$Yhv;7VVPiJid)U z;37n+rl2LK${j_ZRg`$p0HazrYQ#Vz4r4e<;KUQ44#iLe(;=uyi=m{!M4}kD{6MOj z9i_BE7t`SF02j6ISC64FS{in zs0d;Jj9cU?#ae}eR8N;e@CO}^6~h5}IZj=i2;MxPS z!Uf!XLRV0Am$+uzJ-MV+;yFc>N=30I(E&wOq9V#wVi2^J7+?%669OJFB*)9M6fMI` z!b`lzCW(G?j^40|Kto&ok8Nw@vmk{Y^fa>pRTmNx>&h9 zd_cW1l6o}`Ja9A{0Futy8B1w+?Bvdh?H3C)r(f^Yv@vTkTO0R*H!QO$Sr+ljMy&oRfk=GI3a5xJhukVdzJhi4G+WyL(GpC9d_JgzL1?IBM z|K8tpuw|5m>oOdZTKCl#tp~n8?EENu&FGdU0r!tUaR6aAWo?$!_MXTHdP z`MlZ*?)f{d#>I?4`jD zZ7wl=Ir9*;Ypf{w#Q4{9t?zFgefF{AcWz`)l+PP%pU=kf`xeqrfIa#4r=RpNN%7yK Mopmxt=oj|=4eHSVi2wiq literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_28.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_28.png new file mode 100644 index 0000000000000000000000000000000000000000..5730de13e8269d773437e148f49d83ee04af94a9 GIT binary patch literal 1429 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlv};;?!UX%RlnZC`%m-qrq|UD`+VgdTdMp&wq5^I z&mMzgB}`u|o5dLT%vAhsJf1yy&ob#ZlgpFePbP(RI+Q(9+ce2cb;3y{20l9{HeTzV z+{kwd-q!ZY6SiZ?c8vYfh{X> zwxjGlw;t^YlbB{Q-w^t&zWRl%)~uHmQVRrDu1hle+;B?7o8k5X|Kmw&g>N>hr+k)f zIM968_UC49mc1LqvP5^j5jkgC7r88rSPL=2<7klZ3MXtWHY)^m4V|=)S zJ3&oq@%b6iJ=f(#H~!LJDZi9$1Me;2rB=uPx4v0v(`lh_zl2}w`8vi^G5!pyv#>o!8y5imMQ(bX!b|waqo?eU(2LdKG58#|1WmtA+0$* z>L;FXezg~{HVv6Raq7{hWvX|O=Rox4uT3wPgg&ebxsLQ0Lb$Hm;e9( literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_29.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_29.png new file mode 100644 index 0000000000000000000000000000000000000000..93441db7b1cb6bd6a7f9a09e7a807c74db975b21 GIT binary patch literal 1440 zcmeAS@N?(olHy`uVBq!ia0vp^5+K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R`dFS&5=;$i^oID16gGKIghu9AL@0EwD_d_wSJ$`#WmCCpLiw|$f}W; z7JHT1^z9Kbk=ko!1vVCP*XCR~Amyg?dFR_bnJHaQ%Cyy{zn$^=Z{pk}^`<`6yAHO$ mk6!REbT#4s>w9ZH12cn(;{wmR&hxuLWu~XApUXO@geCxuZ2yn| literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_30.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_header_process_30.png new file mode 100644 index 0000000000000000000000000000000000000000..8e05398c67c7b81e9f64dd1be9dadce308cdfddf GIT binary patch literal 1446 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlvIT#6nO9trn3tRivo{lHFGR1g8(zIu&PAz-CHX}m`T04p6cCV+ zUy@&(kzb(T9Bis*s1Tl+my%yz42m9zZ(UN0GRsm^+=}vZ6~N(Zm5IfE3pY1&BLg!d z6IWdRhUiTpC(QJLj?o7t4y42a69T3{5EGvCfgE_|NzDW1m?B`-xDeB9$iTpO&C|s( zq~g|=P;W10M*&mGnFk&?Csd@1rtBAfz%9W%{{X{@ z#}?nXLR6YGnVhaM&0_THYcTKVabi7k+Sg%ssz(a{Is>iT+Kw-2oE$&Jlr{D|{=P*c zTym+ceS^m{;R(*SUu~$k% z+!f6EP~o$@r1_7~iq)U@R{okBYf|zvrZJ|~s{iH*}D)?65lV- zk+w(U2>*fDnH<@PYoC=(Jn!eBlevdg?*HV?tFlbZg%tNN>ixLG$QPpc|J&*;|7)8C zPRvc({_?9G=l6!w4DG@54+MxloA4xeSu*<${xcnK>zk`2!X3CuxMGYaX-`Ubynb`W zGN}pc^LUS)`7b#Ce8b}lPE9rsS8Tk;Uvv43OvS^TiSynC?Kv~6E9MO+(@uYdM?3sN zQfikOl)IJ2=2~aZ{C019fl}3#4|lH2+T4>fyL{{O&0))OcW%|3eOgtl|Nh))8I=X; sURmqy-p=-}KOz{o?~8b*JrfVZ+%;?7n_ZtK4k|f4UHx3vIVCg!0B@xTr~m)} literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_icon_Back_ef.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_icon_Back_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..ab1b844e4e8909dba083dcf9884ca3c2ade0eb8f GIT binary patch literal 1984 zcmbVNeOwcD93DcV6e`11$n-c7HDS9uwu4P3>%(1cqm=Y#~Be zEax zO6c^F*%T3%9TTs~&d>;OFmy2xViPh1MuNrwo6%sh2yG(pF|UxBJGQwX@K}V-5P_pc zB`B8xQj#J7J|{3h1HmwWq8ymVM^V@xKp+_5Ld=B*z&s%z6(T{vlLKV5QFxkAB@2I| zi&=?49Zj2sT&~q>(vk^M-@#aUmZHhNJ?X9Oa=B zIReAM5^1nJI9R|BmkA_N2pQve7FK{FvOt&*iGvU+49gL*ln=?o2*eLU5C{zvjA0cf z3yqmH#F$<^qjwa`3;$27P)ZRPO;YhBX&9@3Wjc~3EjrQ+NaIjo{&KwuC#{wRj`WOr zDT68hTOvm*pWa4;R=beP)$hg=U_j?~* z?VM@ZeoWwgIIXU>7(OK~8Ys`3m7cp{a_(w{Z*Ja?%dp}v!I&rxB?1}q#9zOWt_chn7Uyw`uimE!F2M=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al 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_icon_Back_ef_02.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_icon_Back_ef_02.png new file mode 100644 index 0000000000000000000000000000000000000000..700fa81c6cd51bfa1d6c53a95e520bae4bb5a0c7 GIT binary patch literal 1945 zcmbVNc~ld39#4y)3#eE{fzoyiim8xeCI`uo0Ldi5a1}y?JUmKBMiY|Bgk*q#i>MrO zY_JyATdG#tr#w_VfQTq7_`F!v1 zoAShj=((N&o)ijYu40u`NzN->&m0f(-PzH#hMfEfnVLw(HxRiRD@qaT@C+1CV497n z64mJPvbs0uT#?m@M+<(LoN(<-t%G@baRP z+N`<_uu>|2sf*l+sCt61z)WUtZZ0F2&A_c2nV>)*aLIrmI*Fj$^2~(BPB+_vW+X^a zo7QTu5C+@~xFl*a@N7avB`tm70%nPieABH+k)9G*l5fgoRk@MV0yfGd{@BnS(dk?}gNfX|kR5jIO41|c9Qg9Id=&jul$ zSdJhviFk&qFxv=?S&Po-HIRB=a3T5ca$&@ZY6#q_!g13~1tjWm0=MaL3xFi^09vZS ztiy9{@4M3T!doe7HRPZ=xfREN=kbLNuhGwz@;M+PmqCy?%;mR49>$gNr65}%MI=0l zfclcF`y(-9lEyGy#qoc|GIK;$plkW6^vTVu=0VM5$5_eMxJGXqCOfW6Ar-6a13&G# z6%ofn`BK9CAD^TzKt+p|8C=Ml9bHfn&fvK{uJeY%-edNpe;Hn?zX zx+gs&L%^Q()^80(zVoAi{)`adyT>2-&3SfAbxf5xJUra|Lj>M7-kv+=f5DxtE?llT z?BiUx``7dZ!r8wPzv!!nw!Cx5yNo~UBxO}p#8vm+!KFkfuBPp{(&`?PW(oI-xQ@;1 zZ2Wl3W$P*06URptbV};3(EV^;(RU2-~~tlgG<(Uh6_Bh(XU%xjBb z><$YKs%d|d-ZXT+-xMKTk)WpecXxMha>%u-Zx$^%raB(G(};79D=2$@h)!|Hleagp zA5TmqR7j5$Baz|Zo6;Ims%ICtm0jAL?Oa<~KB*V}^N@SrvXwPo_TIWx;L*IMW7}l< z>BWw~oTK}{?+Wg7I-Ndrzxq~>kY~N8JDSrPmOc9I$M#I4aryhBW68=|zt4)BD%U^# zYgGNW*KYJ2DMP+d+?5QzJ)NLjx2`8Po3%Vhx%K0iD)zav#U}#3(m|uq{;TWYJx3gw zKJ^Dm^;YKcx+T+Ju=9^DZIkYb3$FI__TWA(Z7m##R?M&eYz3vz`|uY_KI|RMN!qzA z(rbHZX~OE1lqwmvMd=(bDJe-+XvOrDw@OCO*2d~DPThC&l+8I%Uytm4%9>F=YEj;gAv#R+k7BZ2dxy#n5$DjRRZ zaTRy?-Qr$&`vo6Sp`blB|MN0n2qpQS>UAUz>T G-}YY%$^0(> literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_icon_Back_trans_ef.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_icon_Back_trans_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..19b3fd3744a61fffdff23261645d3828d742e17d GIT binary patch literal 1491 zcmeAS@N?(olHy`uVBq!ia0vp^S|H591|*LjJ{b+9BuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFsEgPM3hAM`dB6B=jtVb)aX^@765fKFxc2v6eK2Rr0UTq__OB&@Hb09I0xZL0)vRD^GUf^&XRs)DJWv2L<~p`n7AnVzAE zshOFfj)IYap^?4;5Si&3npl~dSs9rtK!Fm_wxX0Ys~{IQs9ivwtx`rwNr9EVetCJh zUb(Seeo?xx^|#0uTKVr7^KE~&-IMVSR9nfZANAQKal@=Hr> zm4GgVcpk{1iHq`zbF$JDTz5Q`N^fZsd*)yF1AWQ8NHOu6f08$3j=3M z6IU}6GbdLgLqiKEXA4&g3rkZs7fUB+10$Fj*z}rN8e5nr6~`kbKE6kf z9zA>WKuv_*vApmTzks^=MulBrGBPZ#7k({Pn0KFDbIKOq$-9^Ab&{*GIB{1sJ}&NF zb-4~llZ*9?=^4VsPICj)uS^N761updvVbit=k+J&bCVfwFW@jc=yIdxj07;#hG(cp zuyQM~7hbQ~=rbp&L`-I)-iAQ2n>xWCGq`dZ<2GsYWaU!XFtYU-B~ zhGW@xjXBrwubFIoV1-ZkUQV0aO08ep4k#|Q)Lr-|^;*ity9x3tr8cWnXFNJL;f9F4 zbm(`R$fF8OTPIECjhs3|VETF+X`XELKbsyz2}`ed&baK2K%4%7m=~u)UdA47`tR~_ zM~zF?XO)K^j{`5z;9xhM0si5by z(!FA0<&LLL4=q-?W$)=0k}g?%-zRXDK&6p;_|#8tqdy4Ma`t@CZ>-9_$8-OlZHETO z`|`v$?px)re#$snePxsH$1g%2QqQ9&h<`SeRhk#Ry6oB(_xl?T_#Jt2e~P?7__j}* zG8ei=A3eMx;LV-wYq^f!kxy5@!ddDx_kzba{R0dWbC*y1ns8JGRLpw1`njxgN@xNA Dd+!#* literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_icon_SIP_close_ef.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_icon_SIP_close_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..9ee98720df3052c7bdb1bb1a1450ada240fa21d1 GIT binary patch literal 1466 zcmbVMZA=?=9KO;D1IB`JV}PKSV>3Y3_O5SSPdeJ(wNOH_D>bWwAlLR0Eg61%)92!muP7VJh3qvX~j!$ci#e7M5V#$YLBpaZux1T>L=9D^TC=PT`9@?jYe);Sg z1kx@IbX;kM&3>F}q$@%!RTHYVIYUiOwF@dc3YG>jUcgInBpCEI`vO={18wSJ{5-xb zg}_Y+*Q9~AoU)rOAkMH9sFcXXP8dNzl}dsrlqwZ+1eC#uObYY2N{lElr3#akfZG?u zTVq{r%t{!yZSgA&)W~suOe$?{ZI!gjB@FA4B5Jidt|60&d4xF7=Htkq*cT{BC=gV@ z$<2!iTy)PSODrIAqUaafkn*o}*zDwRQJP!OnIjvxk^+6be#qC{^r;J5)* z!wIg*7vM;rlS%Uk>Qv?BjX408WmW0oc6hx)<9AG zc($S?D3(4&xr{911vm4H(Yx4}qli*&&?%Hg+_)9DL9Rz}ol&Wi>Gd!QZF61!CudUL z8EL#Y{!=W8ExrQd)1A`i7dy>E`S^}u`PMje;3xqAf>jftvjrC&>l+(oH!MKaUR?AB z#znCKDw2PFZmweV>desECG}Wp@eJCX*Q5M(sAEaLk#g+f>3d1+6IU|d$ve|lo>c30 z5NW48;PY~AZ<8ST$NIYW9}i8vl4^^g+MIIF0p&&E^j5g@N7dPYRMjXs9jCZe0Q7*U(4b{!?kd4d)j+fgeUX*PB_BBvdprX+V6!K(|X~TV`n-C4}|9xT~}8Mr$&0* zAD z2_BA>%u-^$;EUTY^d0Nk#{!uRKuP5x T)ouF<8~>Y{4AsPxzTxyg;P(IC literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_icon_back_ef.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_icon_back_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..3ab0ee5e1555321e941efa16e90e524402e41ae0 GIT binary patch literal 1502 zcmeAS@N?(olHy`uVBq!ia0vp^S|H591|*LjJ{b+9BuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFsEgPM3hAM`dB6B=jtVb)aX^@765fKFxc2v6eK2Rr0UTq__OB&@Hb09I0xZL0)vRD^GUf^&XRs)DJWv2L<~p`n7AnVzAE zshOFfj)IYap^?4;5Si&3npl~dSs9rtK!Fm_wxX0Ys~{IQs9ivwtx`rwNr9EVetCJh zUb(Seeo?xx^|#0uTKVr7^KE~&-IMVSR9nfZANAQKal@=Hr> zm4GgVcpk{1iHq`zbF$JDTz5Q`N^fZsd*)yF1AWQ8NHOu6f08$3j=3M z6IU}6GbdLgLqiKEXA4&g3rkZs7fUB+10$Fj*z}q>TNoI-nmW5!I2junx*9ndI$Bzo znH!oII~!UUm>9tHdgc|EB<3Zj!tBii+6&d|gjcVXb5UwyNq$jCetr%t1q5W|m*f{` z7g>=oo!a;y_9)Fd<+H1To=BAIO1cp42>Gjwu3W zjsF5)uQM<(@p-y9hE&{oGh@Fuv!Tdw-<4sqTtR~Mj@(TO|1{3&S!pQs$^KzJ;usU- znr<%0e$dfHys)@f=nl*Fu17CaI-2;noF*Q7-z+1ue&_BxU&Fh;KXA^d^4#}*()8(b zCIoHU+N63b>PXVUjTa(b)CntX5+vt5 z*qJTA&|5={r+GVjNt1VheGQ;TfH<~rv239I?A)%~InP0o^ zEnMgHa6-wI&l)|O?rlHSQ2L)?VyA-9YCiS&2R5Ic>Map9_@H_1-t76`uh>~KrX5^h zHB;32{>(!uYH21v_+EVOR@|Cz*B~uwVWjc6^T*{19TPDr?yZ;qu}CoRq%p|H9XmP? PRN{KN`njxgN@xNAZsaB# literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_icon_back_trans_ef.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_icon_back_trans_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..19b3fd3744a61fffdff23261645d3828d742e17d GIT binary patch literal 1491 zcmeAS@N?(olHy`uVBq!ia0vp^S|H591|*LjJ{b+9BuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFsEgPM3hAM`dB6B=jtVb)aX^@765fKFxc2v6eK2Rr0UTq__OB&@Hb09I0xZL0)vRD^GUf^&XRs)DJWv2L<~p`n7AnVzAE zshOFfj)IYap^?4;5Si&3npl~dSs9rtK!Fm_wxX0Ys~{IQs9ivwtx`rwNr9EVetCJh zUb(Seeo?xx^|#0uTKVr7^KE~&-IMVSR9nfZANAQKal@=Hr> zm4GgVcpk{1iHq`zbF$JDTz5Q`N^fZsd*)yF1AWQ8NHOu6f08$3j=3M z6IU}6GbdLgLqiKEXA4&g3rkZs7fUB+10$Fj*z}rN8e5nr6~`kbKE6kf z9zA>WKuv_*vApmTzks^=MulBrGBPZ#7k({Pn0KFDbIKOq$-9^Ab&{*GIB{1sJ}&NF zb-4~llZ*9?=^4VsPICj)uS^N761updvVbit=k+J&bCVfwFW@jc=yIdxj07;#hG(cp zuyQM~7hbQ~=rbp&L`-I)-iAQ2n>xWCGq`dZ<2GsYWaU!XFtYU-B~ zhGW@xjXBrwubFIoV1-ZkUQV0aO08ep4k#|Q)Lr-|^;*ity9x3tr8cWnXFNJL;f9F4 zbm(`R$fF8OTPIECjhs3|VETF+X`XELKbsyz2}`ed&baK2K%4%7m=~u)UdA47`tR~_ zM~zF?XO)K^j{`5z;9xhM0si5by z(!FA0<&LLL4=q-?W$)=0k}g?%-zRXDK&6p;_|#8tqdy4Ma`t@CZ>-9_$8-OlZHETO z`|`v$?px)re#$snePxsH$1g%2QqQ9&h<`SeRhk#Ry6oB(_xl?T_#Jt2e~P?7__j}* zG8ei=A3eMx;LV-wYq^f!kxy5@!ddDx_kzba{R0dWbC*y1ns8JGRLpw1`njxgN@xNA Dd+!#* literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_icon_jump.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_icon_jump.png new file mode 100755 index 0000000000000000000000000000000000000000..1c59c6f70911f58180d21c7d5e0a94b7c2696ac8 GIT binary patch literal 3132 zcmV-C48!w@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_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*97I<6qwz#ee!Qh}KNKZ(8v{|o?1 WB~WSRh$tKY0000}| literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_icon_jump_ef.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_icon_jump_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..a08b950c9f8429783cee9d0d3b256cd2b5faf887 GIT binary patch literal 1382 zcmeAS@N?(olHy`uVBq!ia0vp^av;pX1|+Qw)-3{3k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+n3Xa^B1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxSU1_g&``n5OwZ87 z)XdCKN5ROz&`93^h|F{iO{`4Ktc=VRpg;*|TTx1yRgjAt)Gi>;Rw<*Tq`*pFzr4I$ zuiRKKzbIYb(9+TpWQLKEE>MMTab;dfVufyAu`f(~1RD^r68eAMwS&*t9 zlvv ztM~P_^2{qPNz6-5^>ndS0-B(gnVDkc=xFNVYHna`;bLfPXy|HW>E>qQ=IrX^WNP4O zXl`Z<)9aF-T$-DjR|3v4~Pj*wm=R%;iu*SQ+p98S%2&Jz`($G%hSa%q~cc6 zpa1{u4?8fZwJ|a=rx|jaIl8$Wb5mIAt7>h>SZHhDCBOJaqi$cL*!;GvAMOj6_Bfnj zJ#xC?n~&m)wo9D7a;(=hzD083qUEiWHy7{IwxjF!}Gdx6-dOlKWSQ>BsE2z%hHr#EBQfCuLa$ zNi*%Q|8K{CCMY{HBEs&#k$rW4UmZSsHkLhQ-XhOh9zWMLYmPUB=xma>5On8eTa+Ce tlU=|;wxx*){M($GZi(@~4dE3?V5q$;%Kbf{%n(%adAjKLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(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`008P>0026e000+nl3&F} z0004XNklc7ISGl z16%?-9)}zmY8Q)vE2RNbHE;yn0Bh=d-zUGmz%g(y%GWjrY)GzaYX1)KS`>K5w4UQ{ z01tpwVGkr4N5Gk{xE6t@jPPo)g+e4u4I>fQ^HFtAo+l%ix?0xo=MGT9hvum1z*-0_)SIxJUi}jAdyST0KWt0(up2D k_DOt0ZT|lxem(H_0EM$bD6=vfWdHyG07*qoM6N<$g1Khdng9R* literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_icon_jump_left_ef.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_icon_jump_left_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..8f25e2b15067c20f27e28d5216c78088bd2d14c6 GIT binary patch literal 1366 zcmeAS@N?(olHy`uVBq!ia0vp^av;pX1|+Qw)-3{3k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+n3Xa^B1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxSU1_g&``n5OwZ87 z)XdCKN5ROz&`93^h|F{iO{`4Ktc=VRpg;*|TTx1yRgjAt)Gi>;Rw<*Tq`*pFzr4I$ zuiRKKzbIYb(9+TpWQLKEE>MMTab;dfVufyAu`f(~1RD^r68eAMwS&*t9 zlvv ztM~P_^2{qPNz6-5^>ndS0-B(gnVDkcWMFROY-#Fd;bLfPXy|I>XliQWY+&YQWa8%H zX5!)k)9aF-T$-DjR|3}Efcgw)19&1@2J^lFc z<06-cT>__SJ+eF&|A_GN>XP)h%krrI&Ye5ATq1t4c9=Ukchz(!Ui4ey?>H@w>5;O- z8n0DHeN<8zeZ2XZKWZ!dbLN$wob)nV;a~SO-irs_6SVeuO*`76)B0-%PsiDf8R@LA z;#s!rnW)m;xj}^G9^*$%jb6E_OgCg)dirm3L~t>kZ>-Q3C|#=Mm7pFe-< z*ZleM(OAyg@qxBTGV_8p$DE5+{rm8+`QgjU%UM4}cyavU;pb0RRbMfG){Ge60gKGHsc|IQ{8?kZR%ik58UGK2?FK|7lId zm!?(MG*iSCSahbdCY8>b62qeNe0k(VPp1u+&m@VQ-e3R!-0ce&KJcEfbt}7^e!Ne% z&(F^cklER7I9wY^Ew;g6Lgt9_5jbx1u;szE14egPT96|p3`J|`6+1%M)Uj4 gUa+q}%D~9R@RoO8=(B}W-9aUtr>mdKI;Vst0PvOSegFUf literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_icon_more_ef.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_icon_more_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..7f132ba77cbc726e3c51ef393bf2a7465ef0af30 GIT binary patch literal 1145 zcmbVMOK8+k6pglODOyzgP*DtVQ^m<|CNT*e>*UuCI(3|mSP;}q@}?8o3y2bKVt^{fF<0G2aycoK9H zL{r%<_M`sXF2#l(ZN)Zp%?mJ^AUeBhfn^T@M3%sS>!+y?ckWT7>!hiDLXOP^8mPEE zqao-U?Je4)gSPBYUE9gdnt};DfGo1+4f&B$OH(tv3ZBQ?3`NeEpusdX>r{U(Piim( zq(CPVHp_9ODAHU?5Jhe)$+H~Ku=o}eTuKo{h2KWjFAA%LPFX4FW?c)f(o_YZKw+3_ zwMti$GzF#*9`84x==MJ)I4~3v#(R zVn3=U3a5;zSpmb*EaQ1`Tr<`YDu6$3%xfJLM*_eUKm>;g2;oqp0`e7z zU{rwtsr89u$3EA0U^UttAJ1&GItbk(z%fJUku&*K+m*TX!qYpK?JRzWYuC)zd)zq_otZ}O&TzC4ariQn71ujaQjty!PB(KXf9^yHH< z*0yNuQD*t+Ma|P4te*WSUur+q5p_R%zT*AV^AMA0H_IzGHVe}`ORYavpSVB1VnUd% zl-FImU``xu`Ko?fa%=6=-9x9#ZRhRrFXfecPcD40hddzdIQO&V(cOvLN9%4ZUqCEa YOdLBX(3Q{aZ{wdq*67u*tB1yZ17GxUh5!Hn literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_indexlist_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_indexlist_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..eb3b854b1c75388c3a5f5c553788f6df76b87da9 GIT binary patch literal 2878 zcmV-E3&He>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#CDyyGyQdMSx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@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} z0003tNkl79+Gai$ed9trrkHgD$$zGZegl zhY*^8-FOR^lCA`cG?`>vg;rNqV*OxX;LUqKzL}2^Yb~2dM2ZIaNw0{k4tF{oYtr=o zX*PSHM4frwg>v1?D2h9ky6(e&{~SN zJJwnO-m*N~L!@37sL^QD)70z(@9U1H%Vlz!ne4C(SHnTSVsm?xB#8$+7H&0U6;kxd#QtHJK zNj3rH*6tW%4$?F|u2!pBDRmcy;f;vcbr8Tga0Ph4?k{id6_^2&Fbt=~|5$|muOlv> Z0{~SfY;~0VQ4atB002ovPDHLkV1h@KzP11W literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_list_group_bg_center_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_list_group_bg_center_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..317e9c4ba19bc5d2acd6596f0d44574c784f07d9 GIT binary patch literal 2882 zcmV-I3%&G-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%c004NIvOKvYIYo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R630H6ROG?Ju0wg3PC07*qoM6N<$f~Ra(*#H0l literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_list_group_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_list_group_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..18046b3e4ebdc126a4e7e2b6a97d4776f66305d7 GIT binary patch literal 1390 zcmeAS@N?(olHy`uVBq!ia0vp^Qb5ed!3HD^d3l_Hlw^r(L`iUdT1k0gQ7VIDN`6wR zf@f}GdTLN=VoGJ<$y6H#24v4 zq}24xJX@vryZ0+8WTx0Eg`4^s_!c;)W@LI)6{QAO`Gq7`WhYyvDB0U7*i={n4aiL` zNmQuF&B-gas<2f8n`;GRgM{^!6u?SKvTcwn`GuBNuFf>#!Gt)CP zF*P$Y)KM@pFf`IP03tJ8LlY}gGbUo-h6WQb!1OB;3-k^33_xCjDfIQluQWFouDZA+C>7yetOgf{R2HP_ z2c;J0mlh=hBQ8xDWL1Hcb5UwyNq$jCetr%t6azByOY(~|@(UE4gUu8)!ZY(y^2>`g z!Rmc|tvvIJOA_;vQ$1a5m4GJbWoD*WIT=_Q8@Rc+xmY-v8XCG9S(rJRSeTo*8JoLU zTACO+!SuT1Czs}?=9R$oroi>O8sO9mN(#9JK$~4si!#enQ{0O3a}~f|w#vlq78ji6 zLG`BKbc>5CPQCg-$LND17Ac}(Lcr7mV#1RxkONQnsd>QEUIa|m-yK(7V_;x>Fbn;?XRNR^<;O6I|d4TmH!f6($U4& zBz0x!3VQ{9PRAXd3!n1Gq?c8#Pg~s7WGZiS@7&#m8|Jrk@vvE$JZqnSMiIR3Ac zxcu_V{Li7Ge>*f%{QKM%8*-d}AaQ%@vp149to!)yOc4>D^;guTOfq@(RIjD0UjJ%! zdui*F;3v`|AoY09ag(zr#??1iY5p!$n(Y4PPKNf!H zl96WR$f^3amrYvJM(kSbE<3*NKIfhOZ+oU?Z@uNMAaG+*%MyP6{t9E$$=uov37amz zPybo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Naa#)|`$vam5Hi7t;kSb}EB`AcO?N!qj*Xg0KZ5 zn9iinaV16zt}?38IlFqo?kt!2RxVd)MpZawR$y4+TnET>7>-$Vmlam+tvigB;)=wzNn(Pa9rufAb;SYwlC_Yws%~<$InsA|)%m^7c1D>)lGgs&(1mBNgNrYR>~ik1 zq;u|iiq19_+x#wdm9NXC`K&L9>iBK=?)8$ztnjSZ@st3y)IM)&!Ha(1l6vyfTu-q$ zxn!r-@s8i}23~7K0%I%yYuWRvWM?Qv_KncsfdR>}Il+@&FL-TJnNybbA_X|W$(meO zyJAUixB;(EPdw<<`7GFR4Qh*WhJoY_JVo3JZRW+wg4%||i)?(pT6mw9=2dYL92@`O z=G7a_V>}P!)TZ!($CoSoefb_i(Yc|w?p)I!8OZ}{xyNYXyPnBKANHRqz+*Pf{SvaB&S zdt~Ft<4>h&remI;d;CbNE?;=3!O_}lzS(!{S?NQ^*iWx&mXbqANb-Aq{q>b`?mvk{ LoGJQRkn8vx*kgwx literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_02.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_02.png new file mode 100644 index 0000000000000000000000000000000000000000..43d27bcdd0f129a04e28c9e561fa5c0d5d6ee0c3 GIT binary patch literal 1706 zcmbVNX;2eq7!EL44bqtcmf{pyV?hy;-Ay*c1j3O6Nlh?76sBs+l5D~X$;RwL0u>9= z!q_U(B63uRU_B6Pff?)AsTHlFhzcq}5RY*zQd*%}N_CLKZa8dzSbw-PyWjOZ&wGBe z+tl$ZJ(&xc3v+2W5no)Gz?G}Q3IBU zp}L$+7qJKi!%dHCQm7P_Qluq}9Mp;7*oLNiAs7N-E(i(OFeKs&L=X(jJS^Ip zMW+`f%3^11(JL`4oubSl5VTsY94n7QSPUR66beCz3v#(^8o?%WOcZKko5&@z3Nnn; zT5vOk6DGi^h^7%)l$b?(Ivs-1tWv!YHjy)lqEiOiP%{W~Akb)Z#x;c|sYL8wH(rV+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common/usr/share/osp/bitmaps/480x800/black/00_list_process_03.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_03.png new file mode 100644 index 0000000000000000000000000000000000000000..a79570afd4a42edf19410d6264688d046a25d7e2 GIT binary patch literal 1661 zcmbVNX;2eq7+#{Fr2$7oQIT{Fhl4}1yE#dQKyJhVOJfu~DlExDA|x9&iwP)|OBhfQ z4`6@+GtzoP9j0gyPft?sq-U`@GjTTO7M0 z(!+hBI{*M4QOlGXYFz4kXSz|}3vHLzQNsdK6;H0jlSvy&V1P`ICt+Ze2~EK?7^=@q zzl?E+YlT*qm8uiznGxY&m|aX6FkvJL+D&O@tJp4Kj@uPebLTe11jiv{ zs)RY=RD4VoQE3nT%3OnA8bdZ`6xn{JD^?H~O5%hT$J3@dAl87BxYdALK*dTv8v)~tW<74R zI?FQ=tr8=Qn=rkaz)j$Ie#OT3=!dG+LJln8@Kpa5_XJn}e{u#<&OpxQ_*b(`ZBZTQ zoW5&)YVq#!U}oyZ5Y*LJb7Zs}0B8+SN}1N)(^d6gd7G4;b8N}nSu^r;IiKBy5)|1$ zU;9{V$*%kUf70^)@^Z^N5FO&}US6_|V=cQ$TzTC1thq_r|D^kA>Ygis1MS4=9o;fP zJ%2arrKSSA^ZKI0i}can-^_9~xV|bL=GN>EEqyEXEosWiDa#wJD`Y(Ab4TY)#{+zq zMoJ_{U6!~otMbE-CBDk)^3nd_Cknfz-cVko$o+9XG-T<2;#XTKPSDXMl|e^nZnutp zeAq*C?}YSH$IZ=iqWwCuhg=30h0NHPza{e0$peXp&cCEf_g8n{kkB-eXD$Bvf zcF)gm^Q_KUzCP4j&oIoMYv?Sfr5zt}l>{_iyVKQLapGdQqke5}V`bU(vW$3cd4N6R zA+6S{a8KQ-7X{0L=kbDCMg_5*FU;zBEer2RFDe_Z7C8!<_RSgOpUkc9z3TS-ktQK_ zw9~P_;(6*<*R~gX4(zzSHs$KB-ke?`eJlF3ERVLz=W8iM%N+0?X}OS%-9v%!b8p^y zd`F*oJJ8hnxnFCKpSdcwk0YIRzWLV;$w46=mF+3EF}Q7K8l#uo!N~vUQ9U>>J}S4r z^pI~)&9;WpFVbCY0J3%Xid*$;Vf(bg>~pI;xg&vyfWG*3a=qthRk~@z@^98P4cASN z{G?RpI@0!2`gVparSPr0DE@lM(6_}4mIi!zx@T|JnukM&8-A&K2^iT98t4<#{y2r{ zy6?tbpj_(k+qh_}(F!cS;Q;AD6voA3~IB Kg|bnenD;l>d2>hr literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_04.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_04.png new file mode 100644 index 0000000000000000000000000000000000000000..041bef09758046b98eb4ff30e89de8c85c57f0a8 GIT binary patch literal 1740 zcmbVNX;2eq7*0791VkN5K}41yQNU!gxge1Uxxi2^Llitl3CR*xNH$~_6Dd?k6@k%_ zu_986!gwLJ9(c5Xjwm9+AOeC=N(H>CprVYmWd^Yu4%;8rAKjVV?|Pp1d9QCaFFG>R zVa~!iBofI%x=Jh~Mql%5GmH2()HiJ)23K4XhsU6axIv+ZNdgs`00UBuLJiAcg=$-B z6C6k)StcU#I6N*QoTo%JG=&*MGir1Mn?wo>GU^n{WEck$U^SxUlSgW=k^w};C&#iQ z=n*;*oP?}O*TXUCk#c2vvXZMJ2dxAGjXc7D2F4YDQIn#@ct$>X(k_pfo3}wSFbTnv z`Q$05;v%8}5vqp)HjPeI(m4>oVbLHKoy+1b2N-mS4nho&?oWm2JhnfN4gu2-nNZWK z5_vLl$g~!*;**nbT*m`JgTX*EFlne>4MJQl7o;;l27^i_kEnv2&NI=tYKAG@zDg=!#BI1K#EjFDfB4waap#vcr9n@&daZREzTn7K+#z)bZ ze47piWiW=O>6Ju161`@~MD9K@3UHe1BzgfN*9Bw=s~h6oA}u$fGj zNW$gLaHU!dS7?>+j4ndxPIFnG<<(l}s;0Esoig%8% z+|gR(*mmd$n)%E<{b2A{-z@gz2YaH{qHC0fa*OO>fv3g8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<_B&Y5X80bsD0bPPs3Z585|PNWrekeTnkF+%?TO_u*T+b4wMb~2GoOI&u_Tc z+$NHqfP?8@#U;&KJ6xv>367_kwqJ0}=NF_qyO!A z+zFl{dq5n*$h;?wee32|j_s>_m8S0-(WdaM45yKkW2&_i-B+vg*5oe#I!n5LkZQ}?@#(>9O|ARxmj<|a?eUE%b57bm{^r=9Bu%$-?{N0= zzivne+B|eM1LBHrede|__in#{8Ubs{!;RR$k8VrLQ~j$eCj4pV>x-MONrzm1_H3ZN dO`lw4#T{AfjeGmYv9tESick>CujNWDe*?CkoEZQB literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_06.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_06.png new file mode 100644 index 0000000000000000000000000000000000000000..e9ab5fc1f8a1df4a915a56b0b1fa9515f44aff15 GIT binary patch literal 1733 zcmbVNX;2eq7*3H?gaK5Fij1uM|WoTyPoHL-s_wFHa2>R zv*T<>5{cv-9)^gCaiQ&X_>}mbYrU963?8^J5s$;t@EoZICGq4~Dhh-vrRk^`mCAEh zUqpjRq)BNCNg|#Y70HodN~+X`q3V@tf=wa?hw9Z*Stg1Dsc5=F#icxHIzs^zaxNu- z83jeD1!#sMEKh^Rx^dFa*Lh5Ml?w5QoX;Krk@=PzW`R zJdGnpMB`e-ic87BaWw}7b8>R1Idm$fNeAJ;z(5e9fizkGfe6s%s&J`3K&72OVF5w4 zGL1rwD=-ycvnWl)bU2qncsdq>QXLib-mpqLo+u(^pkAs5VJZYFmA1G>(OO)L{^Q06 z(OOBa8U@9u7Sm~DL_N~xPmqb+eO$-}B)s9oXcR1OgGlWQpi>7#7m_ixGiP$b%6Y zEQBDwaDp4I(&AE;44u$b5W3@B#z(mvfd-Z0m_~wOSrZ))n}Ok&HUm=wf;c7>1`-r1 zIhLcfm1itk1l1_AQMpKiDS^@aaugrXUn~-_X%LIX5dK%(V_fkg# z?v+v5Yor?@=j@BKklzeU$rf69^_v6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zoRyHr5$hkchaF?m+at1#WYgkpk@uI(@gI)b z#CYmFyvh`LTW4e%7CgE#-_@|lu=;AhER+B0Ko&7VY>{o8sUL3`eP(I$?Y+V<1(4rp6LrDaVefkF?Q&z}8o&9!-CT53Jle?|DmXjVHP@9b1Mam4W}v&E zvPk0Pg5)um=8N)#unsEmz&n;r`2Lqx4JQwu-cXoTyN3{(p7yJx?)XaP7YDC*ySy$Z zk-CW~;0*d&#^W5z;GeC+$4K_seUVn7>=%YTxfza!azs#4T++h45U1}pFgcdeTiph* zz=KkqC;TPUvD7o(Xu03(X^m6fo$}YiFM2uO|ZNcGel>3+MKno1GT>qbW7Dae1+zIecQ|etxQ-JRp^^Am-Vd%TvviGFqE74W@dYH+G-QvP>fWe zikmILf$Kd2b72Px$@WImP+BXs|G@H*v@9(Cbn>6p_ckkq=MRy=6gRGIgNLBXOH@HD zEopoG{qD0(cPT}0050d&?|uVN?)i7;-TIHhMiw(C``WqOB`Vb)X**N%_n!KTa;&i= z;oH6oPquNGe$BUgOIB6Z4V@~ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_10.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_10.png new file mode 100644 index 0000000000000000000000000000000000000000..de1e0578a8ae3579d93a1ebf4ab1a5760e1f17e0 GIT binary patch literal 1737 zcmbVNX;2eq7>*)BX;Baq4{(;XDyT_zb3s<3%?SY#CdQ3 zP+LSm+fX}5J5{M;t5y`SR#1yXL8(lvppyjil;O}6i2R$oUi+2^85R5XOqZf79ma~;_);hM`c7Qd<~w80#cnS9gRa( zn%vcA(J%_dB@I&~5{a^CM2+icDkp|!))`1Pg%Y;hY*48)Py$Fr(=j~{>_1)y0+@ye zD%mnfW)PxUEW%<$<1KQ9+LEE>YQW{ofG{&cD$t>X3NY(3^(Ms314r~Cr0hJVgTM%c z$l!saP9@4>0U>Tg0X7Yysv!;xa9A{$1#wy2B>)40Av(;ULm^ZcLf9b)1OsCaNLn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dPHXb?#M)C$1 z2l!>GYei2IlBS)wd+t0xVv3e|F>G6v;_=YU72QEChSiL1uwz$+*N1*>(XTGeof_}6 ztZ?8Ack*HBh25pcDi`Q=H>|?-6{xYd>Hebr&JDg5{KtnLbU(U6$1`b^7zg^^^|jL+^yO<<1`!MJkqy4hT}Le*+r2oQnVe literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_11.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_11.png new file mode 100644 index 0000000000000000000000000000000000000000..e707cd2f2e61675dc1df834764c28f3bc8b2da46 GIT binary patch literal 1703 zcmbVNX;2eq7!H>r!W3F{K!dDH#gpuA4niUkl59d!1yV>0o+Kn25+T``EaVV8;sMqJ z>d;yBdffy^7G@!=_C1BNO8_ZlQ4;;12CFkyK2n0qU zL>3Pmb1E%C1_*Hz2C!&wqzaBgfG8#nVZt0HXE8vB5g0<~5X_E5U@nWzg%M!<0ZBEJ zTEk67#p7D!iU(>5!pMani^W2-Fle|b6GAu~4g}L7Iz5s^M4D{|LTQaOn8PP5pqN=@ z(isUIZUEdCl^J*r!2?N8$3oB>6B1qu5b4)6-9-8n8GMT%#3%P-$H{2wXjx35Y8^u*QddxsbQ65O1(9}9LmkEmm z0#qbm3Ykn19YF*_0UH%CqC`TJ!Dk|@2^(+XiutgRg|JysVg>_2M09?1RJ4G_5Hr|x zHp)T86I`jmOehU1Y(iH@>W*`nZ{>1@CQM1-COM90PjrAxixaq6iyHx93X6sSsXBui zx0v1K8H*OhOuAf5EjHnLU^Ks6-5d0y#bP!cj-oR~{}uNbSN(r-29eG{?&kPcvrKG} z9q69EZhdm``to1~^2V6Rt06&xG!%;G9VyC}TV2fu(zDv&!1L`3tZ1{sH@h*L2?u`# zwJX9(Pi<(mw57JPTjN_h22U4U0A!M0$qC*0u6yuSX_7I+X&=sP+Cg2NL6yE7dP>}0 zFt6a^9L^-$KI+bEjqz>O`6G`?sn4gC-20}us5C4tcI!qDecYm-0G*Q?Mu4lsd>4u% z1NViv@=_~0yDbH$=Q<{Dxo)S>s88q@^LONL|G9M5y=%ao4TZrkj$U$p~_hn#I40q5#xd9HJ0-C472JPltL>8hw zvAU)r#Q!|M)EdMFnEndT#h^cMmvV+U#2Nv!ALJ{dxe)(bE{ZFF9Kga33C*e1` z4u`04&#w#j_HHwzx6Yup|85^zxm^9@qhWFA{WF#Nf!xO2tUl>y8NI4*tGE48UH9Jk zr>cn7IR(?J%5v|{_F0v_B53xamMV2q*|E^Ub>5PEPZp&nV8MPi>RZU~M6Y=J7v&!} zy>K;O&2?U0A1C%tvo{YO8*nthJ(t~%hoTxGA0~gvxh*d^ z9a=Ge;6djFnz^Lu4o#9SV+}#!i4h@7+k@v_|GuE60yLbgaHvA}G#yyfO&idrce~aE zH9bFGDyK54{!F>sU;RN}t>2Q^o2ufnp+mj=%^nmSe+(r?Tcz$_hg6h^RtOZ1zX5(T Bk30YX literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_12.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_12.png new file mode 100644 index 0000000000000000000000000000000000000000..0150e7602c05fe9b3e1282617206bfe2f303069f GIT binary patch literal 1746 zcmbVNc~BE~6pkSvV$%RABCU`mpmhY2P1tZO1SJVa3PB7hFoH-(7Ko5++$<)bjMakF zsR&iHV#O+8Eh-c*w4zY!2`Yr6NDWibqB06Xl}W{Vbi-l$hxL!{%*W|i3RR+M2q0F=GY}~v zSLUv6L4rvnt8|qt5l@sv!wOW*l3Oq=gIY_lNu=P#2CZC?h2TIMlA+S@nInzOOhBdN zGZT0cP@)wgnX1S<42jE&kty=B6oE?S;t(L%022n(2rdT<>THb;Ht?Afc41;}*=93= z2?(CWXHGhmD2WAxD24z$7U-h@{WyRh#Nt3;AQb2ga6t~p=5X1dzYhn5dHyiS0j3@% zp@u2bVW}v5N{d+WnVC4Qh1qPqUeD6|vQR98%?S()WP@Bbm+M0yd~~@QTyF5u=scz^ zh!C9uQ)zJ(ssSt(?X;OiGA6#0fi9Nx5zw{gRT5C;?pd4A!(z8p>%R}c_R za0n(hGyoEa1k+rxMu*Ea3S?SWMd(g(p?7j&A%@6t6qBK7_H+frW}-N%%S5$+FpkIK z00}CM64mQ0*E1Qd2*Ffq5M?-qs)338!m79E2ZV?Fb3s2Y6!u?nPjZ$2CueNJ8MdW3 z{#7i~TSNs~rf*80SiET-L_>58Mzlr|dE^|?ab&S5RA#up%PtD6QH z@gL{~(cTY`XRqeGnC-Tn@_KXs9S169o^{Ia^oB08%Q~x+&)H+CYigHK|KyUTrXVcY ze)Cx}L+{d2V;#HSylP9#;cJwlSJbXyTF7;GvL|jSblt7l5M>+DQL|4+y_lwOpM`bE+1{2W$v7bUrn!R_-hyC z2J`t1ZQJtFZEa)^=fOf_$0G8R-IA^4_xg4KHAktCQ|0)_$87d>>@oG^ZW9}1ar8{q zKr8H6_VDRpojRs#d1-=%e6QmO(_J^GqdcRr(;0eX+r4vVwmI|rCQ-5UQCe?)RZY>i zwERwe;mG!#(dO!*s+RSs#s{z?*V9LAZa-P@gdXD&>MSyy3L5N7ywCH?r|hy>TfD3y z;sj$ibKTwEJm{-sD+>I``~^Q#vZ`BTL67Uu<85@iGe_t5@#i-GcA2t#7PTwi{%-w) z2J0dk|K`B>-pbsz1@+|o_=bX&cK70Ye3gsJat<7Jd+86FZ%% zFM8;>t=;S-iE22Ra_DqK-Eg+2=WXoB49w-&iWFN%V@1;-K=S>J_4_^KL4E1*1^$W>+uYZj@4Ox}7^~LK$K8-KV($C+qHGktL xa140&VB)A>bYnwt1!K^?_xy|Yv6Y|AAi4IM4?U}X?P~eUh{Iw;b%NB5e*^BOroR9H literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_13.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_13.png new file mode 100644 index 0000000000000000000000000000000000000000..83361bef07defb30434867f126b0c773c4d09d29 GIT binary patch literal 1753 zcmb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m1S*Mm${~Dd%=stGQq988#ZaMho>HS?5UYI&1-!?Y})yW>H`N>SYP39^txi{ zT9e)0`lc-JfNFw69%Qj*&(P3x#zgkh4DbH)0h)@K9=H4VN}P>_-r!=-lz_Xt0%xd? z-3>=dQjOK~Pa$?m*Y?@oa*?kb&e^&{lDV?$Z7S1JKId6Eh{amQou+tmj5Ye;-#^IL zn*S87EqFkg?^5qd8Md~4kX2iL{KQ*}`&MlQe=&xf!bz!Z1F7|sZJwKcHWE=FTrLRD F_#610sGa}- literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_14.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_14.png new file mode 100644 index 0000000000000000000000000000000000000000..7d981bc536e3640b0a9819a7d0d1933b7a83a440 GIT binary patch literal 1756 zcmbVNc~BE~6i(}j90kPz5n+k-0GjNP0|=y$Q-VZjfB{=6gk%#^l59v855vcI=Q99-UC(3um;56`LH7<2n`y8jVJ(kw(SzN)Yz(@c|(OL=XyrpcqoLxYR_^8dlC);G+ha zUZulTm=-Wwl*VC6IGap(Ivs*WClOd*X9!vcis!$bHGOcT-( z4h%Dxvs{tZfJ?P9bXHeI=+1EIALO!ldQ^&I`fvQEeT6F_6;}HQHhE0ncTKQN88#? z|HIv5_qWD|u+toB(?$m`ce5W~^shf?Yb#l_)Zya{ihJ~?2WcZK92>m+lZ}fTx82cp z4i75NKkq*1b#vP_1+8Pja+~pb;bd|7)AB!eHql1Y{;(+DQ`WS6G+|SPdfQQz)BMgh zQ@cB`q@lIj@2h25W4Gt| z4v;1+b2Sh9uki}CG~9qE&HBa?3f3}peHH92#eg7V`F{ByV3bKO@) zSh_y0e_3l&W^hTfjvU`JXBzY zIs@OE=XUI@j^fShb5I1k313`?TYbEb3dO4fX&JZYrrc80)Y@_jFEj~zf^uV>RleWe zco?{*EiU*=o7%GZ`4`Bg>VH-#U$M0e{i(gZ{#4yWy}nHyV{B)Y*FyBd+`(1u1t z9VtdrOA95=YeEkh7i_gH6*pF|cEnxP*qfFYk?9|idN#lPqJmqWZT{bg1RMC}+}O;& E0fC6H(f|Me literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_15.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_15.png new file mode 100644 index 0000000000000000000000000000000000000000..5babd5896833c818ebcc01867e31005c6444fa64 GIT binary patch literal 1774 zcmbVNc~BE~6b`7|3KU8KuQjnKNRmym0TPLl3pqqE34$VENS0&`$%bT+kg3QuwzVRR z2N+O5##R(XhpHo1E2jnpK?iC@t%!_*)><7rz?OEyVf%;mkM7Lw@A|&?z4w0a&3+xT zX4Py5ZwCT_FgrXR5lK82AGMk-L)8?i1w%2YwK$tV2wrK>N@Xe-15#iGqTvvq|8R*2AaV{d zju{0;Y5A}c2{Ym>oa^lJrK(K+08&JcT6fmgMGA2 zojjE-5`<1^;VTYNiD6ncm71BENy%hTP@RHGW3gCNkWQu3$vA?n&(dI016iXdOe1;+{^1pw>o3y*I4UPbCUZ8Py=wQfU;Bs#aU#nn3F@5&VxE zA4KaVSz4GXg7s*IPKMt{DruUG=kDV|79j2oJ6ea}mm*CQpt1}#tii$s93p-~kt1?8 z1PXaPfshCBAxKE4(Rh4bpn%5+5b^~KE<|Ha+xQR{gqYl*Acz?d%7ADzA)PDWGgw?E zlgr`>gMwJ}X>Pbik4ZH$cv=_1b*H${N4adi4who5PJ*Io(-jb-L@`vaM7024%%sqO zI7A~yGxe71nT%Ed>yRz5JXD9OfrrU@@YY$qAr?%-Gz$gc!nK#hD4edaQ@=IXbl)rfIla>eUs7=d?TdfqBie&mep8A z$XbVP+fBEd+p5bu&U6Gm$&%G~PT4h_^myV@ zDHfXorQY?2W#;|9Pjv|#W7}ZQiCx@p4kvSKXHz`FX7jw;Wb-8_aXA$$++vv&}UlrKw+;64t8qW?f70h*uj)=HVnm_-z z=NG&U8_o`N6qlYTrc@0G6H1`iNLx9hFT0IvI@;Kz$i4$4a@C5^ABoLJwy+ket^IcE z@3h>tw^}FK=RQx8)Ij`A^yNFpzUl_`d2tM77pXpIi|w|h>r|y>KY3wZa%8+~BreB_ YKxmoOPl?)`X88k!3)cwhc$@P625O(AJOBUy literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_16.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_16.png new file mode 100644 index 0000000000000000000000000000000000000000..68837333fa132a22f6d016c137cd14b5f003d241 GIT binary patch literal 1724 zcmbVNX;2eq7!D$cV1RO1i|DLD#WEz>O*X+qqU4ld12n`ToR=I?0(ntJn#9<79=Mw zruv5YQYaLvJYJ$C$0+yf<4t}qwzRDvhffHpnn=Mj2#dyqP=q=>9RcJ9O(vp5G`e-! zZAdJI;+cV})P!2`8DEPV7#cT*VKo>@HiZ(q$ZFJR^#}o^Bbg{Bp!J<@q5-H*KuhH) zK!s6^WTElvO-Rc6M3r{EUdz+b7A*u~t$b3zfDjtMYFLYz`BnjKM3+y_-P=qWFaja; z0@|okYDF?2#!U#oVSsck$b|qd%z$8!2lJu<76^e%h{XhB=n%-~#PC4~7<*`>HIpub zuawBfY>_JgEsG$Gd?wRku`n!b25!n^LOdRi39^_h7M(=U&Fe5iW2Ix}h;ao8V%C~a zBZ1-=;8xV6<2i(YMtV9Lg2AXzyc5REV~HYD#2QnL zU7pcsC5Q>lMRYO~ZU9E|%SYd1f4)o>!veW1So&Xak8*YYCudC38K%2A{?#nwTVw~i zr|(*yT)ewH2u9u*6L~cvE(wDvlnK3ZiBM&|*;(dH2p0xkN?ox$D_pJqrf&AMpupJQ zsQuoyaB~4(g$MR~KYKds_{y{Qd$m4(_M#(2w#~N55$Lq8sG5?*6v3TqE{_$-{JI5# zrs32a%hJ=wRyRcMO}n*=`u&X8`;R4_-ROI`d9c}Q)$~Kn`ahe9RYTr|%2t~L4u7!| zkhTm?A!JQ@yL0lH-3HBeS=1Uzra*FZVpB_6YgCxuR%62iUk68JE$|%-ec4ToDmRu? zZ*N<&tD#8LexRUgPii$5Db3$m-Z{@Fx;3MiUy(Ot_e*vpdb|)W4Aj-m>a7^g^Qy8K zx;yf{gL-m1J~D|0d%(g{TiO;wT<8P;Ny`S{!lj|7kgiL_y(xF*>O9&|C%FR5|`ICXDDe&II||q2cBs4c)N{ez4vRj zxsxjXxMklHKSi}FYDAP&1`GIRqv&jj~1u*oo@)HYvkiYtK=v zf$53IG$IPu1@C-aR}MO^bE8C0N!Ft&j1Jp;k zr$XZxw;F#szH-45MBTlc(vsJUUcyuSfe`AvQV-XKw;L+`ffLZP>goi+)o16+&!^s3 zTrZ)$$a`!GWDUScS1+qsmHooZijlT zIh63njLxr5&h1ODtt)b5VS8tW6z>J?Aw37|sS8d%4oHdqeeR9c*Oiatn>;8NY1A|I Sv3tIA|4-!7M9E=Mn*DF8-;%-r literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_17.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_17.png new file mode 100644 index 0000000000000000000000000000000000000000..07f34cedbbe814583ae4b5bee9b87c19f3477d04 GIT binary patch literal 1704 zcmbVNX;2eq7!FsYffPDzbp*6KVSqtOHoI(yS&5JfK?z_uq}4%|WFbM4jhlr4nh`^l zk)ks|#iIpLDhPvGRA{NFR0}P(q6JhGkd`VP#DJ|Jix+o8`e`Fc|E}2$_-|m)TxtCjD){)VZD>7E|&hDvn5_Oc;qX#A+fH2O@P?Ihs=rZ+2G)Kglv5V4k+cwAn zW+2oi5ogw^Btc1_{K$2tPPH2!S9uERpbpatR!c zK(GK3N|1SOq~1tjdKEsetEF}4xX5d{sFcJpiXh_&B6Ge2Vl@Os7&U|ekjC-35U@_G zR}&_qtvs{Q%5YMfjjO{+LI=#`7uCK(e|dPg0Oke5i2T3ep5?0lPtHKv8PL`o|7w=` zExH43)0eGJFJ4|ATu?sO4}S%Z}flo zV$!O~PBVWosP}u8QdlNx^!~FOQH)Q;k@CNaH~c)%x3ksf#g0c!gu6fPr8zRXHiqGk zo=>lG@mk-O$cQ=Ru%x=A$fNC4;em!uVp83)%)_Prmt^KUQT*c%l>q}cdk>k8X=+aI zM18r6*40s>MZWfelU3u@8_u4r+VaSNyeTP;R&M-6>!U`r3IzkO5Kiq3&$?r z6OzL{%~KH>(UIqbONL6X+SOU#ezM@r_}z}E(=|^oP&Bl~8W#`0+qFMs{D`4_dr@V= zry*aA=%2cdb@^#D>y!Pmc%FcD054kZ$SB807Hq@N?VW=g${CR@gfv~EP zySIPu|BUUt!_FxvW$&$__q@vts{0kCit+M2ZZ}-dTTEGXtou*?Al+eR@AGRP0E(uC z4R^jWXXrlJ6?S&3r={45ZCz~b_617@{LGevcU#BO###Bh6MUxL%m{7q9Z#)q@K}R< z8Rf>h+}@Z!9P|B)s;632bHNeu^f!-3w$)s)cV&Fkynxw+x&3PUcSOpgWhW#lmcIe| C=Z}N{ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_18.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_18.png new file mode 100644 index 0000000000000000000000000000000000000000..9e8c63389e6097850b001092e1f39297c50bb77e GIT binary patch literal 1675 zcmbVNdrT8|9Iqe@c_=zWoidMNoSCKf;9A;Bfj)T&R$!xxRw(Ti4rs6T4k!;90^%S9 z6>SJA3kI-^D56t@;8fz=Kw|(`X9O4BMuahZ3<2L{R~~MEIRDrscfZ%?^Zk5Zzg(Fj zCd|Y2BUc84;Smuojitv=?XQb7{k?jnXB$1NqGU=cj?hurY7@o~X^CVEh|sH3uvkp3 z&Dq(51u+ z6FAXOv{8bk;^Da_EG{=DUXz=y;cJ;8!9b8%KpW6wlo~MWGYq7_EM(5u70`40Hpm2K zAXK`LIqQ@%S^-E169#bDkiQ1v!T=X#!zjc@`78i|U1+skV|4Ue!v=CLQFO{cv)Ty4YzWlr?QzYZNh%im$BlQQ z$@m;22F79}k!jM<_0ajvlj+>OU&s!my%B6N;dD{d8B#)%smBadgjC3+PuN;qD?lNc zSS*!^Q3;C55EvFq#DP+A09PiF28d9YGjHQvTu97Ec?iVe$^%dsmLYteTrA>p`Dh@Y z8^90X&T}ISB&9ZJuz6ja)}7;`@8t?4CQMBcrg(zLnC}2ZDnSusDq#d9aU3=bB;W=u zkxkmmGaIcGGvQg7R&FBnz)XGx_&fA@a(N&EaS>GZUvbZJwf`q)AngojZ;pR8%lsDI zf%fU!)~6S5FArv*Z;Xk)8u>$lVFtsYGeRngHxJlq`qKs>uhO5I+v8cDP(uU7O6X)y zI8Ch|Bp>Q}6(eqA3tac?@XEK`JaDG4>wXnd+*5f!)#YI|Ytxy?#YcZ=KmGE>(fazt z(SF1EBWsF$wk-ZW#qd*S&0{nOIxv z7(Ur{_3Ql~7ECYIGOdNGi3OIRot|1BoT<+VTAd|oMZ6}K-Q8F^adCHRwQpTqy(m5J z;{`WM&PCyoTW@rRu1Ko8(S7~7^Pxj4P{;n)mT>YyVUv#Cw`#Z)*(0*JvF?@A?Z+XCMFTfI zU&*Kaev2wNA9qi#n7(#VUUFh-pLf#>-z>@W)xSFPdKbP~Li7va5GnLvNZSk3nG zJibGNaCh6njz{0Bb{u=idNJ%$8~TKox@j66Vu;5J9o*Y@+Q{k~9S7@RH(;`8AGN(T z_es?+*0yzFy|=12`AU}btn1BBJd)<2Y_#=O6eInoRRyC(?oPKdGavB+22ze(c<>;& z%qfjKylV*=<(#p3(rdM?qP3;d)AHHV0hR9`y!9KJHC;~2w9A@MVwUhH}A2B{Qv*} literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_19.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_19.png new file mode 100644 index 0000000000000000000000000000000000000000..34cb50e7eded87ec70514ddd01e8d5aed4950ac2 GIT binary patch literal 1737 zcmbVNX;2eq7!Fs;fE-e-$WUhu5-*ZHvH=qfN3scE4MNBaI29peHxNj&Az2{MqQY2a zL@QR9RxGttQ0q~sRymZ4;(*4YXiIAaDLT;>kSf(!fqHbqVf(}SqdT+Twa@cD@Ab`Y zjgO1=@(A!?Fc@C3F_?m$mpNW{COvkXx4uhH^C@XEl}Ku+e3gk{MB!vQ0mSN68H9pR z;RQKXVikkoqR}dosbu*Yp_qKI)dHLq5e}@f2x$X)f>Hq%z0P13T12c#yFz;HI0jk3 zB!tQqv8J3#md67U(nJ7!F2qqop)e4Na$yt_pn?zpfnW%P5fBRFz>tt1CWK&M`eD&( zCR`&_V6tf~dM9FKQj}2$g8BLR+ZKf2&KW@Ad zZB`Z-2~a_p$y}3~u7@UQhD_(~^+FCH?Tv7)NlO<+rNc;duAVSZv6zTOf8pX*iW+*pH|QW@05jINf}o#vvi6^dV8w+vwGrvFZ>{51)lOv{&GYC19Mt^ zJvUf_C)~r!=7nztf$-w)n)0jJQ6YBm`XwWZ8|i>=3_aAF)0_|5s=MDG^j>2uZBV|k zx^~@;qjx-#;{Pa*YTyrV`zqnEQO1jjkQa3ocV2s;YWn4F)}w*zb)pmG8MjX)KPQcr zkB!eA+iH8(rrU=dcm@{`d)+qovO5yzbS=MYxiOq@YX#fqvGdAy&SQIJ$V4#1E*i`3 zesA@xGW)=-fw?I;-Zdw^?A1SQuO)V84Xv&0KJzCN7|1ECEG@Fy8@YM=BHPZ|x{S{< z7)71(FTz~W-{+r@KUi#f9_$=(VOF4R+~-tI3wG{k3A=dc$+1LTc}AUl!(hP1j>yZ= z!=FEK$6d6b9BD|q^RfTLehjhZJawC>NVw_4+-MfnUBkSCGS4qHXiA5_L)hwqzLk1j zMO;pXOQa&W&FSLF?&el}btHEp=9}VMYPbg?jw9dXeL-@<@pFll#$om1w35F8p;(q2 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_20.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_20.png new file mode 100644 index 0000000000000000000000000000000000000000..3de3dc9f759ae7da13833f345c21b0ad3b6ddfe5 GIT binary patch literal 1736 zcmbVNX;2eq7!E=>YY)Ne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#-{6mPG|2l9=9B8EJ_#>H=f?JPd$EM+b3(6b&4k@$m6y) m?9y{0mqw?bpa;wuk5p1alwV6hdEX)HzeOyJ7S!=l3;zbHkD6)# literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_21.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_21.png new file mode 100644 index 0000000000000000000000000000000000000000..6c086aa5da46533026f3f444cd372cd659804d47 GIT binary patch literal 1731 zcmbVNX;2eq7>)vRnV}Uaa=M0s1xd0Sa*&unb4r9D0xDWjLb5=F&8C|T1grwlDz+Y2 zL8U53#o=&NDn})ZMMOm`np8zCYEg$;#j4{~kviB7hwTsRkM7LwcRkPhyw^9oDK2&% z*~Qz1L?V&pQIdFK46(gVQ;6^B&hF2M!3∨R$FOo}Tpe$i2 zK!r{WXK14GFgPJEHc^$Asp6_Bkr4pj$Ri9OFs=lQNS0R5GYTl9c6r3ywoRu1qYyk( zKpAr?Nf8H#Q49uHG?1zS*$}{H(jX?tWpYCS1_*(4h(QNAR0!m;I6M#n#vclyhN;td z@e*5Y!BfI^(m)EYI92}(sG ziB!ZCGnrBb1c}5Vjzkp3mWm}|LMFtTu<i?57I^hi6)*Sz8mWeH* z18vi{txqi8ULIIW+!&0w8efNOyF(&PekPX)6ODbB%aT`37k&}w5!On0?3=(9sG1}fN|YWP^f*$S=!PWzIz)w3Y7^Cz1P^i6_?t~4yB7zep@{pGU)o1&dtwdgLepD{AEI6L`&@_ zHI0D=_40E@YQ`XW&2;Ydy@-aB}uC~yEoFqn>+eGRTS$@n_25`rXS{z z^1QyCH+$;GKR(0(wd`d+oR&J(ikrdgfCtf}X(51E|nHj$euzo_ZkM(*|1%X&}R^U^T5&3S%Q zG}V2D%DvWq&-o2=TKhZ`U#qM>;uojS)ULRl)sr&(qRzs#^8bqb4^%Y!A5X&u z_phIOwN-dC=T`bH%l%hZY1ZV98StumFayE@RaDmw1o?x#oHFTN~}v7YnXx})_#eBI+{( zJa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al 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_23.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_23.png new file mode 100644 index 0000000000000000000000000000000000000000..a6bc0142274a7d5b0256d67769acb13b80926745 GIT binary patch literal 1769 zcmeAS@N?(olHy`uVBq!ia0vp^S|H591|*LjJ{b+9BuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFsEgPM3hAM`dB6B=jtVb)aX^@765fKFxc2v6eK2Rr0UTq__OB&@Hb09I0xZL0)vRD^GUf^&XRs)DJWfo`&anW2K2iJqZ} zfu)J1j)IYap@F`kk-mYsuAzaIskxPbp#l^r0c|TvNwW%aaf8|g1^l#~=$>Fbx5 zm+O@q>*W`v>l<2HTIw4Z=^Gj80#)c1SLT%@R_NvxE5l51Ni9w;$}A|!%+FH*nV6WA zUs__T1av9H3%LcpzHo!{ilG4o3^M(S!~%UoJp=vRT#&!Os*6j4QW4I;s=7F&vLIDI zD784hv?v)EA8E=k&A_n3ZxKi#&^1>6MVY`zNz8G{PcF?(%`5SAu~h=f=%r+)SeY2O zIyt$xI+-||n7A4l8ag>UnY%a{o4Go>7(1F6n!?P$rq|HS%+1x*+|D#)yUDr z$;jEn+}X&{)y&Y@(g~*5Gq1QLF)uk4W^X3YUZ`FZyn3yii&7Iy@{2<9^K)P+ARr^Z zB)>Q#zd*q`*i_F@Av`lLCBM8F6g?2%x}+9mmZhe+73JqDfWy}+6N~*8Zf@pA24+Sk zuDJXS(VId}nCSx@qYp|PNQng|1WbV-COqi_Iq=Mrng`4=MZm1F;xOAxV2+dYba4!+ zxOHXb`E21pf#a9g2*xsH+`~mv|NxN%d&E^lhYhrHcO?qA_k+EduYB{BpXFsfYZ4cb%J#Ud8vWtHX)!_U8%9MU(ImKD!0T@iTlx1U4L&2xz?ZP+@hSSy1nF5vzQ{*zf9fg^^}}<6rZ_4 zRz8(i=rz+&+NWs2)bvutZ>L^di{IXnmaFZr9e$A4B(z%p#OKKzoHOok-_#g(hW)e4 z+Bj*U87xa`Usx6VIwn0yQab2OQ_V#K2d3}6ymuPxyu)X2Phc~e$YABX_mWigs~cOC zmwhe%ws^meY`NFYU5C6J%*B@fRyLk>;vq}!j=tG57dpLd4UE>GseJv+jXBb@e>cjO zPpoLWFCk>1zICef@$7~@y)$1=&66|M4Bz@zd-Kbh)aS~PFVsIg_qiJq_{XQa=0uFX zuJED*tVcqcFHJZg{J}U+X1n9BzJS{nvmXjn_`H+d>60LKZ}RoHNk_9z>^i$wUAI}8 zKft+fkLt{FmWlmdU#%y7GLMkl_glf)vG#jU(i_QlHCrR+H`O0_bnmrLi2L@pXYa61 zbMV}?6h_ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_24.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_24.png new file mode 100644 index 0000000000000000000000000000000000000000..08fde3c46fac82a2d09bb008747cef6ee608ed31 GIT binary patch literal 1749 zcmbVNc~BE~6b^FJqJTOI3a&wmO2{4wfkXo2#8jgh4nbO!kSq|wW<#z#Iz)vLJ0{oYUK(wN&rb{ib}(!4%c6%0xBh! z8XG8uq*?)*s#=$&L!+`bMk}(^3bv9O77BzIIivv$CFFn+OV{W*MlN;AE{B|3w?Qf} z1tHX2>ahXNE33kFzBI?ROFOg0TbAQ%E+1cZVDV2BeK#DQR7=An{m zI%P5^QYfC$B3E2$DnV#DAZRcc=mrKI*QJ0ko6QCx1VoSk5)q&`X$ZM7K%@7awID?G z3Y|(zsBjHnwJ1-*GYKx0^mIA|Oe>YXHmuRlB#KNKXq0O~m=1v$W{qnKttTSUf82N@ zS|4rFqF^Md$1`;b@;;J%XUSyl-Y#SXlHPDO=~U#U$kThLPWD%iAGPzH41cAS4Ha1aG7uAas)b5PT;y|98aIE09h(d;QCZt3kaeD=`awh z(kO9*-g-UL(F#$W>LXMs*5Md1m0ynP4f?@iaS#Hr5T@wA;-2Oz|4+_9(izZN9RD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Ss&yIBt}$;V@3srX=ghiIvv9?Q#xhe0&kGCVGUyxzOZs1NPjglOCubnx3}|bPe>KbO z7SVyW>ATh^7Vj<(swZxYk+>S6%k%6=q&XuIut;I)=}Jgm=PPn+wA`ocoNKjT2SW_ ze_&-Y)1@I$Hveh;t+RW2LfahboaE%1xYUQyW33?1K`nKO_PykgzlZId1)pmqA7NG( zJ^mQDU-x~rGoyJt4qh4wXe;blExkuWIYR$qo-dfqMI`Ma%2=KS^EsaTZOTXDJkRpb zNA8{6wf;YsMLL{Le3e(UYj4%t?R(?kNWN7~KFIa0;(L-$mbnfUceJS&tPqv@P#X$3 zM*>$in`O2pD~J;$K)oafQK-uXlj zCH>w+)}|wA88x?h28XXLJ7eV}APp0f$6eE9s|O3-Zr=9V>ixVkbKtw9Pj>xgMf#R_ z=OUgDiz{kRUQTkqzp?#glYkn|)aGvDy|H`sP34(=UPg9daV3K6u<{OtI>c;^6)KY5 z*#Xpz!!?7QF-aGMj}wknW}R~=t~-=9vHV7Reg%1jHR_nWcjuOtQ}wwGr}16#lD=(S zP0M1QbsTcPOB>yc)rWpQqTMa)FXIFmBTCwyUjJ&*ui2u4%ZIy^f@haXIviD4bK{mB zK`)B8j@S<)ioU;g4|&K+Z*)DTjdoV@zI1JONj`jWafw&b;o2*d(lb|soh!&S;rIO8 zuKGodbjZ;_mjK^$wOj6%&u6r!_a12ZEb?Z?=)V5sCa^hVLeSHH?IoxC&&i76eI$EQ X*Mp}P$or=|wjWA_bOT&1PRaipZ9bGs literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_26.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_26.png new file mode 100644 index 0000000000000000000000000000000000000000..c0388cc8da59f1df9e7cece6b8e45f3df98cc0ce GIT binary patch literal 1714 zcmeAS@N?(olHy`uVBq!ia0vp^S|H591|*LjJ{b+9BuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFsEgPM3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rzJsw+!TUl=giHUvk@h8@GG;-jri)0i8Q9#=Y*fI+C88{W;8Mx2n<|v0WD= ztS#m>{QLNJhpwqf$i2*`8d?%ah)#LnR z;&F@Wb*$BX&JSj6Dt@|RanqXgRj2(t#53f-^>F^0lMv{?MIdmdjtno~y!z)&Ul>E% z??#llX~dfZ%-M-D)Z-jcl`G3zt4Xb35MfAkL?#YWPxfY N22WQ%mvv4FO#qV$ezpJr literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_27.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_27.png new file mode 100644 index 0000000000000000000000000000000000000000..131679939102165783e8b28423e99a6472b4009e GIT binary patch literal 1733 zcmeAS@N?(olHy`uVBq!ia0vp^S|H591|*LjJ{b+9BuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFsEgPM3hAM`dB6B=jtVb)aX^@765fKFxc2v6eK2Rr0UTq__OB&@Hb09I0xZL0)vRD^GUf^&XRs)DJWfo`&anW2K2iJqZ} zfu)J1j)IYap@F`kk-mYsuAzaIskxPbp#l^r0c|TvNwW%aaf8|g1^l#~=$>Fbx5 zm+O@q>*W`v>l<2HTIw4Z=^Gj80#)c1SLT%@R_NvxE5l51Ni9w;$}A|!%+FH*nV6WA zUs__T1av9H3%LcpzHo!{ilG4o3^M(S!~%UoJp=vRT#&!Os*6j4QW4I;s=7F&vLIDI zD784hv?v)EA8E=k&A_n3ZxKi#&^1>6MVY`zNz8G{PcF?(%`5SAu~h=f=%r+)SeY2O zIyt$xI+-||n7A4l8ag>UnY%a{o4Go>7(1F6n!?P$rq{^O+04Y$#MI2q*u>D#)yT=& z)zHz^2`FOV=IUZ;3DfJDS6q^qmz)Z-HxpggWO(7@D^ns4i2PF=q!~zonra%xAp7ennc;-pX1Ll|_VAhyc-_XLq!1UGA#WAGf z)|HuoS+^Yo+GMp?C?p9;$m9eGY0L=H_`>#;)$8+==W+|pUkDaWeX^53H~+%+hJ_C% zOcDreb~vcWeQ0j0V9v75yEkj!Jjy)TV%wg7f6l+jNZY(UZhiIcgunOtZtVNFa7tHg zJ>R@W`3LuzA8!?{;QiOo?|oY-bJi&bX5aNzjwg;3#=1SoZqXI6Iq|Kek4rR{p*OFqQrhs zO>u$M_P8j8)qQ4{xUMhWklY~a;n+Xp`7^_<`a<74n5-1a#dFQ28%z>2wNe+ny1;Ig zCZ=UpBdtGUiquYrV7IgPqhDFRlL!r#&Nz4FRF?FVfN5H4dyAwsLO0(jQr|wMDeb@H zmxGsTH(GjG&si(kGQZ94W=Q*g&Og#WD!WbR-93Hw(f#dD(tYm!VX|ZX-?KmY&B=1^ zrQ&-y{xp=|IAZdxIQa0~qNnW#(pZejl=*VFzS}NtzhWoVufKRw@XD5(30=%MlZQXpzs!5NqhI#vt0_~Ky0W~`UZqxK;h4Sd zaa!7nWB0a)d~WHCNSvk`F8kE#og$~<@)xNrDzcVg43*MGdipa&E_D0#dKGw;tq8fu za{b}4kFPK6jEhuriJfx)fufVojjzipPm6q)^7mSE_QJk|Iddna_!n^42)Efff6Xbq z$^DYqG_l|FlK+LXd*(^a{nf}gv*OzRZ;oCLvyZMjG4o=NjNcvUhf}_Bu!c!oRE$2+ zxjF6&KU28wsY^oFxvcv6Een@fe`o%Y{b7C6Ywa~Ws_ZwOc5XgDE5@hLs={eOl+m>g j$MS<^&;I+=vq~@+34BapJ+1u`RIzxv`njxgN@xNAvs0OS literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_28.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_28.png new file mode 100644 index 0000000000000000000000000000000000000000..5773da905b3fc76fd1f5a20278d0c82755cd9239 GIT binary patch literal 1751 zcmbVNc~BE~6b_<*pj_SuB}7FlCfOvLKmrlSB|#Hnh=qbmLb8Mql8u|i1X`;g4ANm3 zt(_`R6i_Ue)`M~>2qL0XtOr#_XsuI$q7^M3K=9~>!}bsBAKjVV-}Qa(d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=zXkC<0Klf@+!?L~Pk@Z=>3?10FdWH{{wZ|hr p=E-cy*-w+rYf3Ahh5j_t#*ucu#3Axxk8_9h2O~uzkveg5(cff#oFV`K literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_30.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_list_process_30.png new file mode 100644 index 0000000000000000000000000000000000000000..bf5af132dc4189825d45d220314fb9e500024cb0 GIT binary patch literal 1762 zcmbVNX;2eq7>-G`ibX342(6YSFj|jfbCH-pl$;U~MTiCE&`q*|1(HoS8xk@_0f8bz zwe+GgR_e%zh#+!$w5T|WKoyF$0u@CVmD6Kti-^^3IBb7de{^Sdzw3G4Igg{c)duA8kmp+!?YPp1e-+iUt=>t+5{K}G;l0p6w@D`IZFo+otPf( z8_Wte$>2C7(2l`j_6=&SJwYqf(bud7{B0t_fC0uKz-CA^nngA-eZsDYm^-#XIxqpj z6U6k%pdx}p02zwGfG?B9(6ab!fX`#Hc`PAMxDw#7*esCE0a*eDnY)?f zFr8i$DpyYVB35F09FChrAZWE(nN}_n#bQCWP$&dh9FW6d5D11j*@#0nhSBUjZ9xv3 zwHRW;5!47cEJ7O8f{W=yq?0KaOu@mg3>(c;LJ^XIHpm3BnJmy?aO5?CHshi2KViHU zZB{3nU@#OmqZUj{+=t$KnoMZ-W=9Sn5shdgh7gwmCCX8)#Q+;|m0V0GPMA7GC*rXb zQmI@a<;i$F1&7U+%A^9hl*?DhB1|0AHALwFs z&-rW5W}Ue;Gle1^+3YC+WBiBT@9*68Y}V@Z1GMyp=5^_50YFQ};zb(Q=aB`q_QS=+ zRFz~zzx2zi=wNB7ee~BMOZD7J&yj5W>Do=S`of2KNvh*{muzJ|OBpKgksXTkQMm}( zvKmU~&F~1nS^Rz2bLI>`ip{&T&)rgeg!~iP_C;E2=e~oCW|JU(Wd~2!(N2w6HM{>v zLr(K|!_8m2$MF+=SKGmb%P>GZ$PNGd(F-QS>;e`?4wA!_zI<`TAY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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} z0001?Nkl!gFENA|joB_=}n3Wtb$P z@=Fo%3dFCR@(ck%L$D(_5e(ubJ>=akbDl+2#8$lK>7TD+3%tQ@2J~__1@u$|5ku@U!TFAiVsGuDUz ghB{s7SyJOM0A!Nm%(74kvH$=807*qoM6N<$f-8D&umAu6 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_option_panel_handle_bg_ef.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_option_panel_handle_bg_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..6cb36383c0fe95d44c58fef6ebe711879953955a GIT binary patch literal 3327 zcmYM0WmFW}8iqH5bW4|XcXth)0)uqN5F!JjlprCkAR^5mh;#}vID~Y|ARyi42pr%@ zI4E^Fcipq@kMDWEz4m^;wf4LAkDYYSM3;=1i5LJtrmv@Eexn69WkQI5!)cRe-Zw%7 z*Ry#90Lh(y3J2sBFaSVo>J5S1yXWN}OvRmIdCBbvqux(G?L^rXyWqDU(>*{IfH2m1!r zw?x&WiMio`lCa60oUmpDtpHN~!Gu02lFbDXZA zba_Lo$1ma16>)OB#85IMXSpa>5*kGi>Tf_oysneW;6DG-G?%MHf?c5gUnaf;Fb z`yG!&E#RdDYR2y;YXfU>K;voHrvTVQK$R)x=TRaa#|gO4gsc)Cc1gB$KILq1CDpso!p z07q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common/usr/share/osp/bitmaps/480x800/black/00_option_panel_handle_bg_ef_press.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_option_panel_handle_bg_ef_press.png new file mode 100644 index 0000000000000000000000000000000000000000..7497d12ce7fa104593605be813947f09edb8982e GIT binary patch literal 1427 zcmaJ>drTX396uOg(pY9(bV4(CxtUE9dXLfvy-^TakQ!RCKq!HX9qkXev3q!T(1J{G z0SO5Y<8)EOZ2U(P%^-$B5De5Y(ij$S5=1~2P^WPWaG3B&mf^Kf*dN17?tYK&=kxhK zb1gac*OZEQ1q4A#YnH_!ubuL1e=1u3PTA{ed5M!UoKh}VCV40UKxuBS6u?%7DhCcg zxoh6~0VG4vA%xCzN={og>Eala3Sv+%!^><4N>26il&ca*a49IKSrf84IE=uw+k_P8 zY`Bd#g9Z@rOW6>Qd8h$FDVN!K%!tTbAc5}uL%k1lJY)yjUjLdB2}7@ zouHhy9N5eW0M?ubLH4h7~M8bO|&s(Hsj0 z6{%9LN-`mGq&q1v{GKc;?v_a|80MvTj6m^VN@1YQ_Ww|Z*+Ywx1MJ89L}4+nh6k7f zh+LK6k{efcGU$pY%>tk#PRQf93*jo}RB#d}R&YFQ&efp=TtKsK&Lf8KHXCVWMTufv zz-loevI0ueZci^ue)c57gV`x(|*;cOVy&gTaE0eXP;pD|vc?+r6=s z4|{_TSb5q7d8}`Jkktf1k%z68v^?+Z{rQQ?S^fq8;;GEz@5QK^tR0_4tIn)!Z=3Z; zOwyO_<5Sg%`We-x;`>ST)ECJoye)xGlZPGzJ};cq7C1`o+TU$B%0J6T+9U1$n53Ab zh|>|L7hYP3>TJ0D1VdEkV+OxSE) z-D!WZ_{PuU9gWM}jrGW17Z%nU*?7@()qW&Df4=Sc;&X2wYo3UiyLij@@x|;}XUu^6*@IA&u;%XP}EhGvsyj)_0;+N_O&bV-B)UAH_tG=zb{MmYj>1=i?^o&0Z=$p z*gZX3)?;jCMr@@2tLsw(zU(wr-^y0^WbY?84>zAr@%fgEHpTh}MZP+uX<4(V3oP|G z6Yjk_-5OVXXvX``a~W^`wYBB^!!&fsKlo5R9o6?|=WykQ(ta$qdsJT?>d9V(Lmk;I ieW+Ez(*J$EKJsa3eWNjT1t@&M-=sCeZs|%tcj-R_{u4C- literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_panel_handle_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_panel_handle_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..6e809fec37de2b0c84cd1cd25f2a12dbd882057d GIT binary patch literal 4140 zcmV+{5Yz98P)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 zsJ6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j1ldjt77CmZKYLYv1W}pOLcNW8)zMj)|@Aa!!Kge%1i1!rM zF!|HvJ8HHh=q5+N9t)DkXw{)GyjLL-m9M?|20WAYN3ixa&S&++vtz{NQnT*QTj|WZ z2VPuzTxF1@E$}!O@QIfNH{6!UKF&niD(YxqrbBeMmoHA-85xPl6u>XX=Wyc$-|a%v zG)=(Yvg#^ng{I3Z?p?Wh%;blQnWDDgDg3GF+}{&AF>YDbcaiBtvAu zt+32UtE)E-TFn}roPh$4`k!TmX8sXwz-jXdF@LHV(w&IPyP|wnJQl6YOlgs~hz2Gy zybBLM4GP_%>+tZH0Mk;~cIx}TaIH`1kgKjN6~?zWdv|ru2Z79njUEhJ_xx z6X~KyF}(>OCn2VthQ0W+7mYUAu6%ZCp!voY?;Ta)<8SvG)J4e;n27O@UpVkgj(&X3 zv1jD?I+5Ft_E;=-ze%qJmSdTIi<|uzfo#3&TuH9?!>|U8hM8a3L?2eGz-h|C79$T? zh1KJJ;Fo}9eHpWnK(TqVR!ynWeEmf}cq*2+73(LrJ=xfym@U;7|J@jKk3H%fH#pZ< zwC?!IPJ8d}Jd?+&8&3mkqnba<_Geb~Rb{Cw-^?|u^9nx7xLTa^Xm~g(AF_$G(NtIW z_C0hd40d=pGm|VivTbtqLU=>6Bj%rJ6!_sgLu;UcyT!=-Ok|P%|A55|VbuD@9Q-#k CfO?Yv literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_panel_list_bg_ef_press.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_panel_list_bg_ef_press.#.png new file mode 100644 index 0000000000000000000000000000000000000000..fffa8793f1caae607e84d8e8fe714b700d31521b GIT binary patch literal 1197 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE;=WQl7;NpOBzNqJ&XDuZK6ep0G} zXKrG8YEWuoN@d~6R2v2cW~I!Kh>{3jAFJg2T)jk)8oi3#0-$aN1{?c|g2d$P)DnfH z)bz|eTc!8A_bVx6rr0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{+;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} z0003_Nkl4f26b0aKX4V8n#cmT2AvRX&w2;j|u(0tz+V~Ufl0t}$t%ZUy zm=xP6I_@U3o5C~Zv1XRELLOY+<=%7deRl@Vtx&~oVFS10fA!})#2H%5<1Z`JA>6}L zJi~V4u)sGQ;yr#~USSjW@d}S{fKRC|MIU1iU+@Os8{ENj?BX?!@Dsm7o@0uSnBW}8 z4Ibbn-es<~Af2JZGEbgmoDX$A#2B9go(wbovPH!>;C_X0RW0AWgCt^-_QU6002ovPDHLkV1jQq&5i&7 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_bg.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_bg.#.png new file mode 100755 index 0000000000000000000000000000000000000000..295a4e559fcd58b433a72e96fd4c703b29527b3b GIT binary patch literal 1263 zcmbVMZD<>19KTXpO4&Y$pxwajdc`_llFMC^OYUsiUGgMdHq(VPWf^6%%iWXa*4|6+ zo|v?tmKD)<6&+GsE5eEhBI~Sv5WA$^Eew1vX{sN}K6uLfc#0w&NPlE{)aq}xI%L{)eNympRhimZsB z!4Oq7Dw9Z(5yOI{-|cnD9)=+~&dvDz9LGFDvL1$|J^1BZj8E`$0vjOL9tvx-l$?+P zu{B+I7ozeAnF380i$!o%+bn&Elg;b2)8mT=i4I+98*-EONf0BFmWY9iIpNrzF& z8U+-hu%%TOG&7M{C)Vw?K;e+lCCQ{2w};j=$FGXCjZ*MmGd7gA(<3INQ_waFmW=a} zYpa2A?Cz|{5yaLAdo2|wMH&KzT+pD7;vhuf8@Hk=f+yw+1Vs>t1c4{YGK|OsKsXp- z!=m2@ST0=S*bwXSgP@-YM7<){E5cDB2G?>8W}Pprt+mm6&B{WF@|Wx`BQG z02gEeF)$PI3IFSZYVO0-fc0>Eq3M^FSSU zjD=fczHsYzf~eab2V%N(<;JYoe0Jxi=mS(}?1!_jFD;_w)>AL`mybU?JYVR4_#6@% z0$DaOcXj*9f%|8=w|+U3%>Huq?dS4MU>o!DhsII)#6pwzfWGDCLlfT)Y&uBPADeq# z2i=$YmL^w@Tv6<)PX2cH{F&+BE^u^D=k(X_ee}*wEt+UtI^Ou0uZ!ua9j{Oy zU+kM&?G0aRFMoA@_Jcitd^7vfWW(pb%I8n-ZN0B$wdD-a=ow2i-1A-6U2LwdZRyzc z_CKE-k1Z0_o7+rgdErO7dErR?<^5f|FTOCh`_kaKmN##H|9AP*(Rbf}TQiSN9D1hk>d>CgwhjL@K2BAs(cR_Y)s<;+Ijj9_)HM>9Tl>mSmpV^5zo2-u K2b>HaJp2!w>$8^t literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_bg_ef.#.png new file mode 100755 index 0000000000000000000000000000000000000000..1e5610b9f3bad4d04e656efec4da78309ad93274 GIT binary patch literal 2038 zcmbVNX;c&E8jgS*KxjdsMY+Hbt*lvQAZv{^VTeIl0t7{*N=OD6LNXy4B&gK@w_d~o zYNcALUXe`{wO*-;T-h#Iv7#0#B9i3W1<#GgY`$M^R}P&nm!( zR;EGKIEtwNlcF>MOUHR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sLQr(gAy|f{J+|)&?4+oc zs#EF5{iPkUh1`@G>!j+gPtX+A*;V&Vs|GO`ghP&(r$61Eq=94S>0Q|pTk=&n>}(qk zVBdIm#Tu_!l1+DQ2Ay@85V#PVpze-%p1n6>OFckE0R-7p zI%%;S2LvI-WwL_6bpW2_c!njfkmNFQR*-oS%se!)7T8s}tQj-5$SF?`W9-We6Gc%f zN~cgT#Bh=%#T-1JBpS(Z%)@3q>4oc?3>plr!11wzJP47q8DP*vtZM%L+s9Ag@0mYHGn2YK?R|aW(V{PBaFgf zo{gfgJuc65v>FVY{m?c7F=}L^?3u&bB@|%nlFq$ixI>G}f*)K9I4xP}G!4{q4u8 zr>zrUN#fn>u?MHuJkJg+*m`$+a_I@KclEu4_m{p`Ixe1CxwwP2oo8#7|6sZ{vTt5Z z9^1R_%D$F`%fOb2`5lwr?yNii^Nw0u^)PCPs1uiNByJ_nP9Cncu&b{h-y5|lUwTU) z+xo^wr-_PJMsWex}!Y@j3DM+(2|v`y8sjZt^dsYacGF6Z5DaU+>}Smfh{~ N{1^3Z?P_7qq2IA%Z4v+g literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_bottom_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_bottom_ef.#.png new file mode 100755 index 0000000000000000000000000000000000000000..62801ba0c3b863b69fb7137b9461dd76cce9a2ec GIT binary patch literal 2895 zcmV-V3$XNwP)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!jy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Bi;Ep#;TAk_>66R0@Dlh*g~A4k|b?F|0r{qDS!g zB_GehAw_o)Unv<7;OX-aSijBoLYNaL69rO+2Hk!XS7Ip3hT@t)i;|Q1*NrLBVqTS> zL7j}qR|+0*9>s}aGRWP_4TXTf8-2Fm1Bc=+r+H5$%W#sFHXz`O((Ci;wL094rQsGz zN8@G{j;9eiHJyfGYFw+M)g%$tn2KwnEEWx^rfAZLA+l51VocIBB(y^YQ^PIdnYFqoosq3Mg#2a6ZY!*HNu1kf7S?{VW0B-2}IDld5R=%?N2tCalg;|qTsPmGJJ zrE4un>!aD1K2DOyDQZ{AKW}x^8;{21*BckKj?W&>TsU_yW={>B_TXYrtV$WZ({)>H zuzl0ibn3RQ<>`Z6O;J~G_M=KDGvf5R@5;$&Sr5OsQ(>1slga3mr`f?7@>`16d$%7ZgZ#|fEuD9i3f2WW- zV{u!+IIX0n?C1URzJq;#q<2TgU5xN>TV!&)_b@sji|oki_-f-y|K))M)7|{WfjL^&Qh++xPny6--o1@W|N1wHuFjpCY?YbRA#SKP2<{?{8S? zY^WvE_w*KJJidJX&#dh1QB8x+5g4pnPi92r?8?sGaiHX#txJZ+ZmApAK|SZq0l7l@)>4x#1_ng)^R_r2m)L=4~wE z?J%AAF~j~WzVH3XLV4Z0(rGZYw%@C#G?8!GZXC*9FTGYQ@E- z??pw{C&ssr?I+%CitDXwyfU+@A(EU|KDYhqG}m^jwkY<n?j`Q`Xuo ztFoH5<)1s0nz}dszB6ZLsguygHov*^{EbaVnr}b&ZBY+2ICyViE-uXq{hh65JN>1x H@WX!qFhMi? literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_bubble_bg.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_bubble_bg.#.png new file mode 100644 index 0000000000000000000000000000000000000000..034893491c6cd75556f1c90c3d047fbbad77908f GIT binary patch literal 1260 zcmeAS@N?(olHy`uVBq!ia0vp^Y9P$P1|(P5zFY^SBuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFsEgPM3hAM`dB6B=jtVb)aX^@765fKFxc2v6eK2Rr0UTq__OB&@Hb09I0xZL0)vRD^GUf^&XRs)DJWv2L<~p`n7AnVzAE zshOFfj)IYap^?4;5Si&3npl~dSs9rtK!Fm_wxX0Ys~{IQs9ivwtx`rwNr9EVetCJh zUb(Seeo?xx^|#0uTKVr7^KE~&-IMVSR9nfZANAQKal@=Hr> zm4GgVcpk{1iHq`zbF$JDTz5Q`N^fZsd*)yF1AWQ8NHOu6f0A6LstU} zLpMir7eiMgLqiKQb7L0^0|R42Q*#$%OEZ`m*z~$Nx)~T4IvTlHIvE-Qbz7Rdn!1^o z7`d1l8kw4!JHzyP<`tJD<|U`X?9Bw)3)O3gSFe?GQEFmIeo;t%ehw@J1Z3owTvzci&k4{ulw4tHIb;Db)!rGeD zX8vZ{<3C3^yy7b(gV~ZF$9~-i6T2TCAuD%gx3>Ll(S)_9{%PEGJ!z%C!S=bPS?BH_ zrBbCPT}RKXNjK@5driZSU8pvY^)LI)v_{_URNp%Xc+MOM`lH0KBeu}7p4)(-CbG4m TY{4sQQ2FEO>gTe~DWM4fONFjq literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_bubble_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_bubble_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..ec3d42e149c9c08b5dc3de7775e01e942237f40b GIT binary patch literal 1883 zcmah~X;2eq7)}I1F>;9&bu4Q@~DWZIFa8UB@Y|PX*?lU5ph^5VN&A=MXJS85I~_*ry)v2t+iyGLBte_ zLn<1tB2-bcL>f%TRNG~kW}SgVQz+su%?7n510jGEBn{O|=+BO{&;e8{p(pa9z$imF zl8#0$!I8Kn(eauk85*IM{^c}4Y!;COI)qRIW?iP?c zQL3mIARNOHfXC!8G#~^4d_EK6^7wox1Ym;@n+1}C&w#ih9$&;30D}*m)P`$Q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bPiX#~%<1cuf<9Y3@zufC0kJw^DiZ`s8(p>fm%?(UYctsB| zhBqWNpYV)t^tQSOQD^C=i1cbSjq6d<3=pN*xQ2k? znlq@3Onc#@AJI5P_12wAHL8~0mM!dN%>C}SdIgtnB~RrCUdE{ZeV0*b6&>A|Yd9(`UFW%eZcGu1$0pmC?U4c0`Aj1s^eG6yo{7BKfEv z?i!QWz1UF#Bx>Y$0*55UoP*e!caawvut1Y9S=+H?j?YPY9`a)Xr|Ue&DMbw`IjBpD zk}u{}uFJ8LZBc+M)N?$PRFVmuS97Ya!@MT4s=!HOeAm|S!pQV2)b;BSza3ldg|@O5 zATz>21>?DH1xz(?gu@2*fi^9IBc~nD#?A0(lAf*8LKHY3BfA)27i`8?c6RX33kol( zLSEG%QO*&$qY#o&6jec2B!%wS+W#kJ3=zX5#qpnF>28quc0Sb>dlHdtbpeyRWZ48EQT5OYOR} z>9`K9$Y53Ky&UprVEp%e`~H_rcYuJvg6OXIr{>gLH;MjCff>e%4tOY7{*D<4ob zF(5DhgxUpgM%jr{(R$3&z>_EZ$G^-aSvt&;aAeWdj80xeeDOv z)qe0~`Lmz)u0Fgy@a=NUzS@3$Dc`E5zkcsV`qr6=XJ5QK^y#ks$|3o~n^*cT58eNz br$zNr>E+*gZfWmdPW~8%J_)a>XV3ow5srOz literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_bubble_tail_bottom_ef.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_bubble_tail_bottom_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..2e6c8430121aa9d4fbaba4801eef6ab32bebe322 GIT binary patch literal 1612 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3U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8iJTSvgtVyZ-AfI(k9p4}E<1##bLD&|>r!yuJ3rN}~DAk(*zf zOx#+GwB$dBuU;Qsz4mY@Sq|>J-Pi0cC1w8Hp60=O_d5>R9qVs^P5r&Zc(tqf+wZZY zbNv$7EHcTx>KR?EG^l(duPm{-gbS=d{iLx<* JzAKD>`Y&q2dR_nk literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_bubble_tail_left_ef.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_bubble_tail_left_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..e934d8cbc9261ef1718576d15eaf80b857166e8c GIT binary patch literal 1429 zcmbVMdrTX39KWux4H$x9FdSn!k2u+&z24E+UFhK2yF!KXC{?;m(QA8!0_`1lS6j%) zm=7LPv$7CZAWLSlxlQ8(W)qSnF3T_m6Bg7gn?{q3EiRdwsmzGk6n_PZ{z3MKm*3s* z_5FOl?;C2UtIAB@o(@4!rmdQGfH^<$Zr%vKH^QbxFg+nNF1d;K$zfLHAj-?TIoK9p zTR8{Edb_)3xN-+651NpB7cL^O z-)lmeb#{$iuyAeu>K>76>Zx;jdOAFW7pd3_mq$oI5a47Mjs!Y`5*aZe%e*95Cyr4B zUKWu%Ovs8+E_(xP;YAMCsmoLz4Tiyby&BW%^m?om#x)p@YQWH|FfFOmleht1eGs5c z^!i8#ZC%v`b|$1vmIV?;!{M+xT&Cv5Rum%$BEf;P!9?>tz zem)2%7+E(Tl1&J(bj5{$V7IRk2c^|OfsmmQRzNYe1`Pxfel1H&vV;5AjCG|YXScwi z4o>1jq6g%|SCj;U*gaZNLJ(L(){B0S6tlx?&L0XJ%|-%Db+fnba@uGL`- zgJT$Fwa}D-W(bNhT8(Bb$*~@mF_`RgOKgE(f z0u`88u9ZI6tThi81RW!S)^LPwv_O#JGaF4gBj36oE-h6kRf-(tTZ)XmHmlWoWJ~=s zCAp_Yv-owVIf+Is|p?%pTA*ej`}mP~PB@0{i^C(HDMno%L$UqI**3t?(7a z_VV$w)w{kD7&yLp5QQf8%>7bDpFxl<^(l^=zNyqU!7wwk_2?y}vOO>R5aix=^5&VD zFE(ATbhi%~qGQVG^M^NHYaID` zJm#5hzW!uxEwDz%WHV| zu5!P8bnNu*TOSl0Z&B?tp1b+``*+~K_z~ zWg+wFF@CDEuzc3(jK5Jl0r}F3j`35``Tl*B?Zm5&jJe*+M{XBnKS1N})kaH}Dmx}G hRz56v?usHMA5!c(L^8$qY7;+78&gMrXnyIHe*oR~=THCu literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_bubble_tail_right.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_bubble_tail_right.png new file mode 100644 index 0000000000000000000000000000000000000000..4732066899f86a378133ddab9ab9e276cb646af0 GIT binary patch literal 1207 zcmbVMUu@e%822`HLfyus?uAVS8Fz%VYV4dFyRm6#?VQ6hEu~GfHAoY}wJ)tn?Q?Ax zCzW8dAU0^XA%Voh-pT_43ATy8Au$OMTcvGGOuR58`UaEes_{Z4VB*{+g@#efRzG+e3rT?Q1>MN>S9l{1I3r^JCHb$Zqmo2{Y?tIv8l>U<6l!Q1=j}n0O4) zd0QVxMWmbcsb$nhQM)QusT`CG$7BQBtRCsGHQOaGsEhodQeQ|}M zEi=Q63Wa3B&7ukG$c%?ZW(G^fOx2J~rvF*GuO<@$8wEODvnL&2u4R}FUYV?;ZH}Qg zRDx=T*>tL07^1V-L$tv5B#a~gv?#J5C5R&Eruih`xg;540;FU?l=)t|@i4@iXIA7Q z%r$HgDZ@+zfh%)d7=~=v!(wlo1Ck^~96X;O8VSGd1bQvu_#I6Kh1cvU>>h3?QY7BU&wCb0iarUkF>NC!$ioanPFT}2Wx)4JS{m{x0caWzfRf8Xr59?F zqNH>pR?d1z z53pClc(PdmLlZc_{seaE?1)ImM=i(1q2C#$XY;lYdDbh)%z4+t}xMg_l$z zt!5$d8~`cR10fkXQ57^rQkVwT{68_{h%;PN9RDen<`${IXt`DTMA&K`NNbd* z&SXhj{gQ`DsrKX24_Ef=(A%%x_YV&rJs6)q-Wi+E#}1r&{jY0I@xiX#1%Ca&vF_Mz zH2l>k3-2sfZq@t0{`})-!ax2#d2#jLpLg%xtKVGOyZ;09UFyvbTid>GdAjt}9=>eM zoq@AQsaM;F-jCl}*3UmV*VfXdFI-YiEDn6M&>yJBw#8{Jgeuc1M@<)}2oWR%c`EYin=p|2AHK{6V#4bm`K2 z>E9~xb?M~Am2*#=XzOo3{_fS0-_OUypKc7_55L^Gms($aVdv%B^VR5AlGg^|XX;CH F{{T&8lF$GE literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_bubble_tail_right_ef.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_bubble_tail_right_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..1670715df73cacd96865c11b164655fbed00cd1a GIT binary patch literal 1462 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxSU1_g&``n5OwZ87 z)XdCKN5ROz&`93^h|F{iO{`4Ktc=VRpg;*|TTx1yRgjAt)Gi>;Rw<*Tq`*pFzr4I$ zuiRKKzbIYb(9+TpWQLKEE>MMTab;dfVufyAu`kBtHuNWFoz#!AFNG#Ad)HBe}%?0@jth%@)C>7xhtg4GcDhpEegHnt0 zON)|$@sXws(+mtd{1$-}0$pR}Uz7=ql*AmD{N&Qy)VvZ;7h5Huj9yA+ij|>}xuvUx zi;;<`p{uKrp`oLjvx}p-i>sxhqlKG=lOfCuYeIoq#dnYUE_;V(98( zYUE^W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u$mH-N&HlCad-R#lxQCf8DUL{w*cNFaJWq7qXMF!b4Wbb|7o~yPE5zzo+tw zC%0I*q6e?^pDNw{M7Lw!$q{L jY;Gnsy9*oL4ViKw>w&}v!?Buy^sg@*tYaqpM~?pkG>6wH literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_button_dim_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_button_dim_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..d4c017b43bd30454b4cf24e8818221a65229090a GIT binary patch literal 1482 zcmeAS@N?(olHy`uVBq!ia0vp^B0y}!!3HE_YJRH$DajJoh?3y^w370~qErUQl>DSr z1<%~X^wgl##FWaylc_cg49sbnArU1JzCKpT`MG+DAT@dwxdlMo3=B5*6$OdO*{LN8 zNvY|XdA3ULckfqH$V{%1*XSQL?vFu&J;D8jzb> zlBiITo0C^;Rbi_HHrEQs1_|pcDS(xfWZNo192Makpx~Tel&WB=XRMoSU}&gdW~OIo zVrph)sH0$HU}&Uo07PcGh9*{~W>!Y#3Q(W~w5=#5%__*n4QdyVXRDM^Qc_^0uU}qX zu2*iXmtT~wZ)j<02{OaTNEfI=x41H|B(Xv_uUHvof=g;~a#3bMNoIbY0?5R~r2Ntn zTP2`NAzsKW@b!fooL3ADC}5E3S0onb8|oS8=jMX^1y)^L5|oN?23FO@A(aKG`a!A1 z`K3k4!1zd0hG_Xe(Z$Hs$k5Qy(#hG?#ni&dz|_&gz{w0|1~$E>rluA~21br9mQFyOu0~F#hK4Q{ zhUP9t#+D{7ZjLa$o_WP3iFwJXFncqB_Cobq;?-;AT$Gwvl3x^(pPvIu0Rb8LCHch} z`2`Bj!Db2?;hA|U`Q^o$py+}4)+Mzlvn(~mttdZN0UW+onON+1GIKRIcQiFHH^${} zh~5-(!b~6N7=2LUKuRnyAz%swG2uxc$bn~`)I4C0DFSAVb9sr)3=E9FJY5_^DsH`* z?yJunDAM-4FLUd~gH94ETSRk?xVuc)u!7Z_v;NTWe1{LxN7g$W>eA)z?0503VR2Q` z@>sRD$1nX^RlfDy4Hx=0O}sOE&XVt6_V~ZI{jT#%$ZKUlhM-fC>ym)IDi+a466Y## z)$e(ued6iVl%k?tXWy3bcPxr%4e?}Ln>g#)=4F}Ir%!vUcUJV=3TN|~Gh@c9*Kac9 zU%h+hWn#+uUe(j+^Tm=_@%8JJKOOw{P-Bac#O{+vR!?MXb8=3V>sP;W{eHC|&ky~H zU7Lj!_Ej@B$?Ih1W=@OM3;+D`W+g|@^1gQg7Yaa--NI^W*04k-wiepKX*mfk6M|XLx14Z%eG`YBkW6$l~)j^l&kI zXz1&-=VGhtxss)pu_|X(Tg;D9?C6K3V7S3zieN7Hv*=Cb<37u8aO`zpuah=G?%@;GBN1 U?oauP$)M8J)78&qol`;+0N(2-2><{9 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_button_normal_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_button_normal_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..5ff79870f4c48492c6c8281811f6048041b3f6ac GIT binary patch literal 1532 zcmeAS@N?(olHy`uVBq!ia0vp^B0y}!!3HE_YJRH$DajJoh?3y^w370~qErUQl>DSr z1<%~X^wgl##FWaylc_cg49sbnArU1JzCKpT`MG+DAT@dwxdlMo3=B5*6$OdO*{LN8 zNvY|XdA3ULckfqH$V{%1*XSQL?vFu&J;D8jzb> zlBiITo0C^;Rbi_HHrEQs1_|pcDS(xfWZNo192Makpx~Tel&WB=XRMoSU}&gdW~OIo zVrph)sH0$HU}&Uo07PcGh9*{~W>!Y#3Q(W~w5=#5%__*n4QdyVXRDM^Qc_^0uU}qX zu2*iXmtT~wZ)j<02{OaTNEfI=x41H|B(Xv_uUHvof=g;~a#3bMNoIbY0?5R~r2Ntn zTP2`NAzsKW@b!fooL3ADC}5E3S0onb8|oS8=jMX^1y)^L5|oN?23FO@A(aKG`a!A1 z`K3k4!1zd0hG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++ov3Z7Q! zZKukGF_1<+1Y#^6HCc`Wk`&_vQIfbLfM+?LVaY8;IYAL6g&zd%ize25tEv?BY}*#u zsdNovPhpsPy&kK_W5}OkI9ZlM4xWz^jc73EVxtjtgMki%4g=G-J!~Tvgp5W7&0>`% zo^FTWc!k0au^Y4#MN-Bz43FVrEaNy~TrKSY7vU2(cGV6_a~@=hFhH}uN$OD@=zvM? zo^2>pB;F{;eVY`;n9-3r>p&Ohb(JPxVwPux^(ZxiH6}1GL zk~$o_VH1MJ^FkudW>W;2iKp~zIxQxo#Goc?8YgtHc{jj@Yr>9Qo7in*`DbF4v=0r8 z{1QSloemhQA&i0=@<4iA0`E-Nu7&EsyJ2~@qt&5re+sRvj~vj-uVU|FU&!jjLqXKy znRqL1N#4KM^_B`(NSfDG=F6dRxEzd3a%;zA}HNS)QCZ$Bop!>|Wkv4eOP)q&K+!)BAmI z^}qV<$+O~1mp?po`M@`~|LI%$@l3hr;$OnK&*vupzCWDU^ZcE@7b|hFpSm?&zE({x z&L`hHwDiU43oEB1tC4#r!KoLnK2WbHNB3OiUc0nV_~9$+xi0GX`TpX+t9K5DzlwZj KRR1nDIsX`_dU)9Y literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_scroll.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_scroll.#.png new file mode 100755 index 0000000000000000000000000000000000000000..91dee336da30c687e1a04574920b762003325d95 GIT binary patch literal 2921 zcmV-v3zqbWP){Q700009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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!B1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UDFaf7&8N TDQ*nP00000NkvXXu0mjf1?6g= literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_title_bg.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_title_bg.#.png new file mode 100755 index 0000000000000000000000000000000000000000..bbcece2fdca08cbf3e9ab0ae2ee5b21f3770645a GIT binary patch literal 1152 zcmbVMO=uKX93K)eZ8Q=}pc*`kBej)g=WBOocZRI#d?rh?al2VekfNE)ykv*$%o}H3 zvYRv&6fG$M;O2%;t1qZRPnhClwT9eDh7di5Zl_9A@{^}`WVF#|xzHXH_I)-^{# z0hspW$tBQ95RD^FaS#pWdL;|Gv>D0JRoBO8g6Qn3`ldAo5IGD+9WO(zT)s+?j-8XA~$Rr()SuDqqfBYup7M%4!)3-_W*WORSMdrDZLprZraQIZozMnvzy|MNTF( zUQp^BTVlmTQdP9HuB74|r}K)U$Z|>*;{vaVvZ~jySuaGUXMwt2C(^r)O>K*n)Bu+-}=Xt{rRYPUt zx*Yi}>T%sLIN4wmN=i%f)CSgmlbA8s7$z!?*NUZngex#wZk9gYY&H+@aK{9=HEy&Y z-G|%ix2z@?s}G)hpV@upqt7*h!=BtX4WE6DexcqC_LSQvw1HCxZ`**5iO=8v z|K_bOP-{9=`1|wI9YM?D)7tW}zKP#EX6IIZYCXTd?Z1B>?W*OKx8M7&KHQ_9%q^Ce u9{haveDE*4G~4|{>B`kV8m4<+yfZ}1EZteUs5Ul5|AegGr~Rr7op}jh$bCBi literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_title_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_popup_title_ef.#.png new file mode 100755 index 0000000000000000000000000000000000000000..1b82fef66dfcf123b8b3ac667957cd109ad2fa67 GIT binary patch literal 1101 zcmbVLU1-x#6po0Z^9NBGDg!T>(}}jpP202$i;}-;)y~lsR$&jzlDjo*$&JaK?WO}! z$MnqyK}3d#AcEk}vx4Z83WASrz6gR3Dkv%l8>ly1JAD{?FeJHu=li~M&OPT+SLdM( zO*@(xhS`umtQYCHm43pS)%4$cW^OkfwiBaFy72(1ngL=I8}}oScg;amM5aA@@&)Q( zn3V%gsZ7d+W0Hm4xEa~RYpzex4AXJ2=9|_KBA_1)I-bmadGv$@jxDo2sRCc{HB@m9 zj|HfEtg~c|4Ov;6J$L|g)FevaB4UD?JM4v0O=jnLB|49`ITp;DkRh2}aH?GB0vZkw zNW~K|i-!=1VjLz@q6qf`frkRe(^rhaq?8gRAr0yeOVt8)6z?SV;?zNpMiYc(_pkT@_4l zSiwHfx<%05<9If%hI^yyS%_9gfpZGkxd6LhKEIN)gua;6vPuq$>4c$1ajR-V$?!Qo zlS&#{8VOs++W(U?jyl6d#qm$EG`463M$^U8r;EkrK_2axfVReu+tV&>tMR<9lxj1d zuRd)$3pVLf{5k38@11W_ceK7+U}CcQ<@wj^AHV(DY?SpiPfx74eDuLAGIu4eT}*#y zvD?;7e|z`n!JhM{ugV+SCvI$+n7Z4tw(Uxny7u?JW7nH1bI&WY8^>Q6_a|dFFKj;2 nZoYc6^W&%QQ_p_ApOIH>WAKe#y<=z5!>GaYMyGyH?K}4eUNvLa literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_progress_bar_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_progress_bar_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..75f87579897dacd44f9816d861b3b6606a8e8975 GIT binary patch literal 1251 zcmbVMO>Em_7zY(jLZ!R8eUMkkF)_U?7I7Y6mFm8qm-Rmx%*H3_*pqFsTCdz=0ly%IBsj9I7E< z+5Ud~JkR^{y|1qhruq+(9+Du4gNXr{#^WLUw7Z|d@8y;Qop^Z8j%Dp3eZ($FCL$uT zoh^*NBqI+S%k8F|VsW$-(%_s)5-A(cN1%r2H7NK@JrZEktd6 zzCr;-4pHa0q(5my(Wo*oWul>}R3<+)mKS8Iw+D2WMJ%8qTLNWuT(iV-h}zZ_@!Z*_ zDXt|Tnk8j?~1VxS)+0$U>qOdhn z9udp1AS6H)l5`|MnmnDN{e12M0ow&BqmYqibxUnbN%1j!FP9sY% znt6O4BgY$LoV%wRa)8(y@vN!fLy^Xzo-e9MvlB2x;V(W}kwxh5^20a_VHEmfEW<>Y zAm4Y|FTel{uw4Sv(Abm924f5qVo->33=?A`JjeAhTqGWad^8@9HMj}QvL!8#8g>=O zZk-FC$`zv~l5E|~==yl00tQEQTen7a14M^-aN?Yz$$H5;=^RfzT8K>LRV2qvT?O0u z6_vg0|7YBFuKa&;Mq_7ar#SvqER8K(fzEWd^zmZ1d60%X#>A~rez@^5K{T}`U?fw1 zkbAPV)$8J`tE=v7!*}1m-1>IB>%AV&{-#B4v3hi7X68xwBl5~$l`NV3DFA+U-~D}K zZDq?%b}h_$Jf4f;FN)#YZC8%0eLC^5Wzjc(d*9q!Ex8gnv^4q0ul)=0Lg8`qeD(hF zYk#KhJ?@@gIs?ACqp#h$v@leA^yt=fMmY9H(|0%brLP0NZFQL>$yX|yZO3NAT*vh0 zsZQf)tya4>ean4#rTRhZja2)<`Q{(p#V;e^<>sa9t?#@z_x#{2b+{vbwSRa(X+C)Y zT-r~b2)_PX_yGCC+4c4H?|=EW$<@(wkx<%+93PxrscbG+D%B%d^MzBjxtkNi&kE=> g*N5+d2YnU7MSQbpUM{`#Chz=q60sEgq;GiUZy7qFdH?_b literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_progress_ef_bg.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_progress_ef_bg.#.png new file mode 100644 index 0000000000000000000000000000000000000000..b134170cec68e0b218e24a69cb52554029529007 GIT binary patch literal 1286 zcmaJ>U2NM_6m}ERwcRS*QHnaPlI04ONlpBd*om!XO=>$df@GZ=vBD<6iEmre#!hXg zaRZyuO-vgPs3p||4~PlMBwm0C4NV$b`_Mfgcz}s9fi#%-5ilWb2qsly)3|Pv!b6#5 z`~LWR-*?Wr=lJ+g`tjD59W4lgv?d2d8IC*P)85nw-_@A^0vtMRX~Z5jM(vVf0wk^) zS%4+;${3J=qRvcx3i=SlJE~juAbtH#LCH-38_R+*O^@O? z&Mo1Xrbh97Oo~hu1Td}*mQ65RPG@rEi5#cm{kyR~hld1tU@MrDpVTehiQ;R#Je<4R z1dgql*b`BF-Kmk(5GEKVz?eYLpCc&>W7z-|Vpx{y#b}bE2@>9{p9=8|%hO@3cHvOX zR7ZJPOw_dCDvFQWc7Z2|QmGUu1p|gTMo=8bxg0d@hZcToMzRf%FS~$gPx5?wLJ{biaDC6TLX*@f^lu*IVD~Xt;IWBWKTU_a+*D zdIbH%w`f;Zdy~7jqhI;tE63B{En}}Yt-LYS{M+X%&v@jmm%J<0)3=-UXRrPI<6B!6 zw^f|yrl0+$jNM(RL@&jnC!OenE7s`~`&Z5K)1cZl*YZH8xQx#UU)yJ{bY0wwR-f`z zx5hfYe7DInb5sXcZ+>*_eG|DaWa{ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_scroll_bar_h.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_scroll_bar_h.#.png new file mode 100755 index 0000000000000000000000000000000000000000..de185753c9af59bc7e0708685a4ad47c014d6788 GIT binary patch literal 2940 zcmV-?3xo8DP)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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0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_scroll_bar_handler_h.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_scroll_bar_handler_h.png new file mode 100644 index 0000000000000000000000000000000000000000..70755990b2cb416549770effc162d0d8e36b7c19 GIT binary patch literal 2834 zcmV+t3+?oYP)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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G?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} z0000wNklKC<`yuFS}Kq>$L literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_scroll_bar_v.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_scroll_bar_v.#.png new file mode 100755 index 0000000000000000000000000000000000000000..08f12eb6d2beb497ee6abda0ef45736fa045de6c GIT binary patch literal 2948 zcmV-~3w!j5P)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 zt5vFIcfW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z5;TaVjSx^HiB=XS#2a_lxR3kZvB=zYv$~1F9}IK3ob%1^%$ym~TJtXw z5v{eBUE{ie<n-zfgeBv2!O-@bvH0gQ`>Jf zmfLCag~8#+M<$Q109YnyF7TUg<0$+9tO6Sb+A=QF9-x@qfiMgo8LeaDY}61}~%7o%;>c+HJSn6`*R|dB9Ioa^|iVD1ZV;lK8XMdaMJ~ zTfx48RLxum;_N_1_Kj@=)+%0BdIQ)r-<^^*5SkKw<17Z+y`W6yzphoh)a>)tK8Q$` zkQhj8%Ipj4(YEc#b#=eaKzo4wp;8oK*p{`sA$smVY@n$r7X z&)v9LURZc_vejzs-{~}5*Yz%6y0|zqbIv!nEbKh6UAN`Gq_vh`0{{ul6i$zQkz@b> N002ovPDHLkV1lolP>uiq literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_search_icon_ef.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_search_icon_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..de7b8cad723adb33ddf29a799e09376095379885 GIT binary patch literal 1467 zcmeAS@N?(olHy`uVBq!ia0vp^av;pX1|+Qw)-3{3k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxSU1_g&``n5OwZ87 z)XdCKN5ROz&`93^h|F{iO{`4Ktc=VRpg;*|TTx1yRgjAt)Gi>;Rw<*Tq`*pFzr4I$ zuiRKKzbIYb(9+TpWQLKEE>MMTab;dfVufyAu`kBtHuNWFoz#!AFNG#Ad)HBe}%?0@jth%@)C>7xhtg4GcDhpEegHnt0 zON)|$@sXws(+mtd{1$-}0$pR}Uz7=ql*AmD{N&Qy)VvZ;7h5Huj9yA+ij{$dv74c> znX$2vrGcxFp`nGVrG=x3o1>wllaZmLnI+5&YKL?fq0y6ST@{2R_ z3lyA#%@j1kGxJjN%ZoKZ(F5_VOKMSOS!#+~QGTuhIDD-#vDt58ic zue!Lo8aTTd8=AS9nVKp=^`?*$X8J(K=z|gmQeuG#0aGA|2~YY!4m|Uu<^gj|5io1a zEdQ~dfr0V0r;B4q#jPjPyuFzX1&*JMTFbvBE41q?t81*_N2M;MZx4<(*QN6}&36!x zSFp=_^msv#!1ezpbb2y3d2Z8_llgJE#C&GFk@ZX$RnJRb#h3jvkI=k&?O=J*vW;rq ze^Z-2yBs!c^x44OQ78DTMrz*V{VLpYEXO_@)rBpnTydyB`hsmq*FXMWOL7XdZ!pX~ zd|s`DG1ggMVC^>fRi9fpY9_fgKDcvyp7E6lO;cTFFQ^W<`7twjMdpW8miqmdt+Xzx zMNFPo`7D$P5 zD*sUZ^bVKov=iHoez3e}P?P@DYn{^rdp$1JMpc_0aToNy85}Sb4q9e05-4{jsO4v literal 0 HcmV?d00001 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 new file mode 100644 index 0000000000000000000000000000000000000000..fb1d40d2ec6e470cbb3f9a24a17a0abcc2fbedad GIT binary patch literal 4746 zcmV;55_Ro~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}k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RgCeFVHiIchB0y$5S_3YF%07ejPVdcXe9`OpQ_cW zd*T+8Wm)m=?rw>5{?|B;modgerfFUo7#O(JS=gr%HjFW4U|`^qX_{9s#zS!&ziPMJ zf7{*N-TqYQ^xPk?EKB5axpxBt1AkFfwM{Agv##rtvMi_f_xFpfJaf}a?b0X=hfTo_CDv_7eWM`WQ<9Yq{y5^GjH;J5K^^j zwfZvv6f{j6QdRYPS(g9E7@Hu33?hV*2q6Xl5XUi(%K;{X5v literal 0 HcmV?d00001 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 new file mode 100644 index 0000000000000000000000000000000000000000..aa3b9d9af8a40922c6173c04f3a8b9af3ac7a428 GIT binary patch literal 4640 zcmV+*65s8KP)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%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n$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} z0004QNkljq`8x`~4V?$F0d^(w@y`55wUwuU4zKs;UkI6ks$OrRj9q?smKT#bU8t zuh+j4@M3hgO+~NQOPkH6&N*){?f@gZExX+=A|gk`Af=RZ&O297840I|cugrK0?P1n z4Lx0|pk!8eHNB|_DS)VWg1yMl+*a0f2;12i# d009600{~7bNfD1aD)j&W002ovPDHLkV1mFPwebJ| literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_softkey_left_bg_ef_press.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_softkey_left_bg_ef_press.png new file mode 100644 index 0000000000000000000000000000000000000000..2ddddaa2597b59be6f087628e1da9d4f6f257f30 GIT binary patch literal 1393 zcmeAS@N?(olHy`uVBq!ia0vp^2|(<}!3HGn+X>eJDajJoh?3y^w370~qErUQl>DSr z1<%~X^wgl##FWaylc_cg49rTIArU1JzCKpT`MG+DAT@dwxdlMo3=B5*6$OdO*{LN8 zNvY|XdA3ULckfqH$V{%1*XSQL?vFu&J;D8jzb> zlBiITo0C^;Rbi_HHrEQs1_|pcDS(xfWZNo192Makpx~Tel&WB=XP}#GU}mUbW};_k zVqj@vsiRh+i#(Mch>H3D2mX`VkM*2oZxQ#zd*q`*i_F@Av`lL zCBM8Ftlrnx$}_LHBrz{J)zigR321^|W@d_&o0E}~p_zfRnVX4=p`ojhqnV+pvw@|B zg_)U?i;1}tOs`9Ra%paAUI|QZ3PP_7PQ9R{kXrz>*(J3ovn(~mttdZN0qkX~Ox$j9 z#AzN>ZwhX=IN{W*4|I$^C}NQ!8YToxJs>7L*#bH6grAxROzlO$WIZK!$yx>m#;2Yx zjv*Dd-rPCub=X0q;i1~(DYKR>y`)t7l=(|z%&$9ncRC~{G_BpPVm!G*NmzsR@)BK_ z5C0z~u)cj%Gc(TYyi4innW|adc5CYCJtu5V+MHsIEn(fU z_FtfzH4C@H^1nZg7WzE-R;JJ4d0U<1&ei{_lP!Ij9n>479)_l=6hE$vQ{mu`WmxsJ ze%Jh~?^$=ht>K#D^Gfeop+wvDsMpWU7+QCKGXBmY)v(y#@x{0Fn*00b_$_~b`|Y>2 zybXnmW!qBMuNB*0&-Kdomd$x?#vPN6vopT(w{4Z?K5&ua+S?7cma8vUh|`4l-|W}CiQBPnk6?SDO#jo5>ly5-kn{3v-Jrf#S*2)z4*}Q$iB})z0Gt literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_softkey_left_text_bg_ef.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_softkey_left_text_bg_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..950cf232e9253d14a110cd751348931c21621a01 GIT binary patch literal 3152 zcmV-W46pNvP)r002%11^@s6|Nf4~00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>KLZ*U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oNIKT+`@eHzT8@tE6&Xd7+GPV204?$AQV4Z!)w_>sN71+Ir1l;mwtwq+73rX|jq$ zRisbLWD@yhZ}W%c%l2drjUz6K3t(X@h!n;Sijc5&fJnPQX-E_xq5>ogiW0cA65KS# z)@vdE8{a&fopAX1^}qfb%M+q}`)kdQX=J~Z)|kldvRl+z#q-GYE7w_;-Y<{6UfTbZ zcgpn3FQ=qMUVB?+J@xrcI~l%ZI;Ye2-`}1&E2{4Bhu!zzzbe~(G&EE->h;^FML!?E cw`Y}La8^04bvyrWH>mjaboFyt=akR{06cCc4*&oF literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_softkey_right_bg_ef.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_softkey_right_bg_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..b15d34f60d9b46c5168798d8dc47274b0f2f45ef GIT binary patch literal 3235 zcmV;U3|#YxP)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@?w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T*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} z0005bNklDX`Ch< zkzk8^)2Er2nb`wjL}Y;Ulwbh>0Du4h00aO4AOJ+Ck7xg2KA)S>Xq1Xb=Di;~=MwL| z!OH*1Jo6G>tyY&o=;DwQ@UI(Z)I6_zv;ogHvm{H7Fp9Y`5*JqJFcLjD2%oCbG=@FVZH)@ z;c%E=E*B}wl7-c%AZu;9-EP~uu7%E50MK>ac(>c#F<+^Iy!Xj|zjxTA1i)Hr&gV1V zS!z{K2w~8+EjPbb0z?GkH31;y3hFYG~Hvj;<10qcTJ3szCA zzn=ssCIIu<04fLoS{20a1N0L>1u?>G01&u>BCR0ICjp$Hh!F+=HtD?saOlPQ82}oF V5v~^`!U_NY002ovPDHLkV1g+!>$?B| literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_softkey_right_bg_ef_press.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_softkey_right_bg_ef_press.png new file mode 100644 index 0000000000000000000000000000000000000000..3f1bb502012ca4d8a40ce1745f5cadd056ae2794 GIT binary patch literal 1349 zcmb7DeM}o=9DX;5-AA^uu}py&FNbjnuJ=(2v^QD?y%riQVrc?@X^-AZIpIFIJGjzC zoK0k!sU*&*F=O*%i^?3BsWBTWngxh1W)s}hZOK?7#vlVswhZdne2-D^4{PEjckkEp zJip)Xd4Km}ZB6B-4Y?Zt0Gs?(Y!HoM^wzAq4}Gt?v%Aocqk9|lI=M+VI2D3&UT%b# zU*w`N2sys9?ORw1Kn5;^8uW(1V@yOA3C_e2F;PKm07}bZ3KwaCI@SoIg5<(y2ZwM> z;9YoqQGg049@s2Y#Z_1ruL(usEfFV=m$|Xh7=r{vsB>6MY?U-7=E9eB88kPyNgP{( z=q)b%UQ!K#TFfJ>5Gx`mYlJGMv0^(x+bO5rxeK#VG)2-jk}9#%6jM~fP&Bsu;3%5P zH!(rhw;T(tTzIptD-1~*hCvvGgsetM+UazXl#R66tO#M%IwhTpStTt$rNBZhq6&&G z$P#8Ma*cAk?!r-~_ev0z6t)jx=V4YsO$HCGmE-OdcMJVYhF2Bkx zPs=r1K~zv=7OFxA5VGJP5#=Q+~EQ6uUHig|0rc2Mo6j`17jw*M5-jWR?H^_JN68cMCQr zJamG6SqPjnl;`q(eE5Vtao5tbd3bV>xc~j!mg`${2=f=k0N4Y-J}@`C?beRMk;U&% zz4hVFr;kdDKQ(t8`oXyH$NKa0(tKW7{GG4*j#)kiH`cyza@X!x_P+G&@t*3NPdpQR zwEew{U^+8vr$0FQ;ONlB(dXj>?&Gsl$&Fylns1?cYbx9J|M~dMwqx%3gHI*LuL31$ zWIV7jJT|#rF}h|34u1|N2FJIsd#~)iQB{Bbkr^c!o$4Lx_--P(5WfB8$qU)x%ZK-U zGBMQq+a+OSAZO8-dH2YxedITD*FHNlZvk)4w?wlK#h*NF$)xT~3Ek1#85uu^V ISA-LP12Eyv4*&oF literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_softkey_right_text_bg_ef.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_softkey_right_text_bg_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..ca9c21ceab2e21aa94983892b44943b360ff6a79 GIT binary patch literal 3301 zcmVx!^P)r002%11^@s6|Nf4~00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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^N5RyO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)iy(zfeVuVw#KF~4xpom3^XqXT%^?;c0WDDfL6MkwQFtrx}lXX7hmS+qMO!l5G zjv*Dd-rV)~KV%@$P!Y*pDkqu$ zXczwdRQF9&(YfA^I`7Xy0s$NvEFw%?jI9k$EF!x!ice0S5|msSaXRL7%*iK4YkA6F zU-Ca`v-1ACGhCCRD|dX~zwhLmlzXYO7`m8!CpqwKj?pVFX7ec5u|0L?#GVs5sagC> zK1wfT_576YTQV*6-JOe{U-ZvXpBXMG?XZz?irEdVDfiq?ezNIz{&@VXmP1gbN@>dK z9rpxXICCfSc|}gUN>v#U?qE9c66Wzt7)%^USdYXZ~&s{{D>PIGaaQ-1(H( z>vEqjp162Vm%AINAre&e@L1CNLAegT)u zyWNh6bPlump>U5|oC8IFh~&BxOuog7Ap>SG-aGMA*cOd*^HZwOhY? zYuMc8Mb(pk{{NhtaM&`J@A}?VT5IS0-u2E)Q`vS+n0EBEr+HR$_xY<$&e|Ap<@3)w yr{4Ppia1C*{Qeu4yZv^~=9@iRuN`e?U}o4Fdtj^Ivy;m~#jB^QpUXO@geCy>2Oa|e literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_split_handler_bg_ef_h.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_split_handler_bg_ef_h.#.png new file mode 100644 index 0000000000000000000000000000000000000000..e2bf2d5a696b5af8f09e9ceb0d12505de5029cb9 GIT binary patch literal 2859 zcmV+`3)J+9P)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 ziz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71z9Z$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} z00011Nklp>i3rtr zyh_&(Z{uQ~MoNIHZd(2kGTK<002ov JPDHLkV1kSeO_u-w literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_split_handler_bg_ef_v.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_split_handler_bg_ef_v.#.png new file mode 100644 index 0000000000000000000000000000000000000000..d2223f0aaa1681c0d7014660927ba35cd90f22a6 GI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lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z00015Nklmo@^L#IeTM7H@X!;M!Nnx?Ka_U#=UZ+QyPJ^+F4CQsIp5}p76 N002ovPDHLkV1k42P9gvR literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_split_handler_h.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_split_handler_h.png new file mode 100644 index 0000000000000000000000000000000000000000..372164e93067dc4865b7e9fcbc2f1c185dca4fdf GIT binary patch literal 2812 zcmVKLZ*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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~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^NkljF+N$mC!XrnVH4B57m*f*{jOKtSsCNte#i zgjGcK!a22@_>E5)&1y002ovPDHLkV1h4; BNPz$V literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_title_press_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_title_press_ef.#.png new file mode 100755 index 0000000000000000000000000000000000000000..41a5bf5c8437e57ddc84420b5d3cb617b6fbfe62 GIT binary patch literal 2855 zcmV+?3)u9DP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ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;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z0000*Nkl^`{t-o_W%F@07*qoM6N<$f+(#=0RR91 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_toolbar_bg_shadow.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_toolbar_bg_shadow.#.png new file mode 100644 index 0000000000000000000000000000000000000000..ff630609acd01e52df521946f9a005ad33ce5764 GIT binary patch literal 2843 zcmV+$3*_{PP)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#CDyyGyQ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aPzi(gdnVJCp8*4v&rw7RWY=uUdb5@y#}Ao2Xw1$b3@hXted< zjmqRKJjL~^Eu6OlkS`zJ&&*^_1l+F%bvKQk-0MzJ40|Fx_!y#c zWzhdQmT0TcMPb}-5!1tFu~CHJ;IBWo29*SI>K2R6WWM9^cybYs;(k5ce7LoDIx?jz zPrPRBp4U`pd-IOi7TwJ23$wE^oe#QvOcf;jet!q;v?{9i_Vkp`NaJTI@AO)p2kS&; zbrq^j-7)t^Qse%U9~Bj)q+&vRmGI@$N>p~jX|<>6M=CGSfZKuPkf|w3--c1*@#EwC z1L-L}Z&ycN@f}1r$ii1a-`ZH}s9ye~o=(VIcxY&-gVD$M3C3?FeU6Bc;u!eA`80cS zuq$h{V7Iq)GvBUNTUVDZc14WHp`O^xTLlZgmZcaD5%O!HN7l37IqR2p57(R4^72U_w9S6qL7qbl2u023jI7k zAFU={n4VRJ^zbF3dSosc4-|X#DyDZ9vEmm8+C3Fdb&?f~W$;8Vg!pn$aPTB19XL{Z zX3i3Y`oqxggWr`bqVMcLUu88aspMg+g5a`ue)2tQ2#3?y^Po z(^K>}>Q3`b-&BWkMu&$z#JiP}k&e&HG74QUXlKZe&B|tVN`VkIG7WNHavtq<+}E(Z z#qPz-p54jFlr^)E>$mkxT+BbIH6+0E7SxhD+Fg=PuW$^0)&Vui?pe|Onvs4~OY*bt zm6+i@wsYD^%W6t*e5cQ*=tc_lMqX}j8uY8&zl)uwl6yf@@6z~TWl wFJRmG2fm&w2ek&W^~cA{owYB|u5QXBLFfVa{mn?|o~?g4yo(pE-ies@Kdz}D$N&HU literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_toolbar_button_bg_dim_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_toolbar_button_bg_dim_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..e7dcd4d8915f274014f66e470321a8ab977b3617 GIT binary patch literal 2617 zcmbVOc{o&iA0LH6ncHG1;usMwvzdjdA+s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*S0%PM;n>U=)E_kJiXgr@4Eo|p_-EA7O7XF2I&eo|HG{lZ{jn=Cv0~`CQE;qjfYGIckC0Kiv}rTrT?<;$dGqHTQ-8O~ zICExOJMmf3g-^mWGif5lxq9W$+xJZtYWc`SbL;n`JDlFquQ#S>=Hxz`m_99;vV({> z##x#HM*EIboi{;`(=XO6d;BQNh|+&BIKh1V^M?Ctl?_uH%HmBGE^Z?l8?p|t9k45`_B3+R_H0BGITV}@278(X4s{}#4Ttb!}O*QCwzGK7X zO3l4{3Q&NJmSuWqhFu2fU|VT8?%H+>zas`Q+$#$Ym7xrhRW&10rs<^=+ z`11KkZQ!H6k3He;KH+U>Iev53jSHJ1x<>!1gEVTy==Zrb)v3hB*F_1W zl{zz}K311vE1wK3)9$T4rsFztykzLr8}o-HIjhbo5|xUms2iO1HH$PSRvkUh4pNnM z_wr8|Ewa1CvVA&gRN_(=&Aiq=?B4bCgTLO=hNuNqv`Q=T$=W*Ga zo%!8AS?eGFH8dZ8xI-&-68Z4`ADgRN{vtc4@cyXWQg`-ocJ!gv@RXKc>zoJs;>aJf z^9qVuC0Yfi=I`unZ-0H$YHP)n-X+VOyTaD>gPp!bz0fnrt={W`^P2PxPZKAbpFZp? zEq%UroIyx12HI7*l$fr4L!sa24y3f^b7~)6#u)zXJv7aKqAxq)9-wjAR?XUs@+c%A z=a=qcUqO(MXUU-B#&wxiw*p>d-^n%K-vUH3lJrmF)VdY7Q8&iM0PCQ<{3kbMSDM?# z$H>apaL&S^Q<|cc$ S)^D5rnPW4(7-h7Or2ha6c~wvV literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_toolbar_button_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_toolbar_button_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..24c647e8eb26292dfe101d9cfa0748e6cda54f08 GIT binary patch literal 2695 zcmbVOX;c&E8cqNasem9Bk;NfYF#<^@kdOodWJ96^5vc|RBqS4(L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S$D3b}uEgz#3^h8*T4TkS&M&4We;$Nk-k zF3-zyKo-8OCfGJ#o?3P%6Yb3JUt4D&6yDzY41Ul^p&WHJaHoXFCqA26b#aKF!(2JE ztTdvc;3vT!&BT)3Zl&Sx=bIGYv2g6ALYnXr?QbKpp=HrqwoG`RX|6l@B8tpyDtGTI z;RuH}hgOeW8#(dZvn~vSZa;D)d-?fMj^E(3%<*vlIs@_}R!w)u8OrMsJvKFlAT(BEO+tI)7 zQP23MXES?_x<}g{?php`=Hy>)IKnn6&AKodW^dvZXi!|dHEq%Bt%eO=imGp(w=VFz z`eX4I2QFuKrP5ay+C6<%lQy2*rXYEHg|P#-xAI1U;ojciM+o&ko!}) z@?vOLfB(7E0mbA1e6_7je3z}!-u!-(#z8(g7~+Z!3pjhsR^?#qLTT5rB1D=tiXe#H z?zYA>93P2X;ktu{?V-CB-o@ z>uTJC%=-^AGsE9TVAhY5m$0AY5UcOPqc}fLXw{0lVo4{B(%*vpBpw{iQ z@Ef(T4%%f(LLv6QWF#EUXtt`|8;LG-SKji-KT7*F)3`^C3%9F$Pj@TvCzi q6!7~+e0)({^+2uPuyDf%QygOFV&CfCEy$?ZUqd!4m{~`U-t`|Ces?MW literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_toolbar_button_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_toolbar_button_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..10eb7cd421e3b222543aa1b2c8bd2f2c1acb78e7 GIT binary patch literal 5946 zcmV-A7scp_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!B1ZZ9hpm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800/black/00_toolbar_button_ef_press.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_toolbar_button_ef_press.#.png new file mode 100644 index 0000000000000000000000000000000000000000..7e814b24f1d23439fcd7bc0ce54f61013def3bb4 GIT binary patch literal 5184 zcmV-G6u;|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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?l^$d>cYrQ>Y1a=dP7S7LaM_ptnIN6+h*gKtS1VyebD|lWWxr9<%w;o5iq7 zP_&c1#z5JINKI3Q)(3H}PHg(XSSna1DWA}3epUE==%xt l?|5HIuk+BYg-uy^0q(`Jv`ww6pSS*zNkkh$HO~F){{h$D@}mF% literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_toolbar_button_press_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_toolbar_button_press_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..df5fb21ebf88a276e5ce8d30926b3c51272e4f46 GIT binary patch literal 3025 zcmbVOdpwi-A0LyXbSOn9)r_Qz+1)m_%(h(TGMA|+vkk*8wrA#6DMcMh7uPOA3guFA zOA6IFtCaYq9CJA?DVKwaP{?mOb$-7;&g=Kb?|D7X^SyoE@6Y{tJtth9ZM8Ii)&zk- zTK0BShH}I$J{s!EcR{@6M&+;$pm_uC!T>t1x8YBdSk|3c7 zLUG4JOqo0ZM<|nQT};nk-cq?@UO1PtODyC=zQvco`v?7SvIQPtgRnu8spxNhEa(4;nYq#!^Tp!$uVVSJrL4fk>EETVT>RZUT!FG<#LCuq6BlL# z0%@q&Q^_6?iq7*Pq3-Y2$zMFL>UZqJO`{JRH>>6xwGPtAW^AhzxLYcI$*nBkKgA7Z zO3xEUUy`QWH=_#~p1jM`If`q+LFW_#{vOlQd3ifVHPqzxkC)i}yv3w4`M_BBg8eD? zb0)mlo|!kt>sFE~``^jFzL>2|pD4?8iht79P!>8R|2<~Dr2fsc-^5(>3VG;z_H)KS z@y@xHlkWJ|phC@U@q>iAXKgF&;sund?BiDp-N$Q-i)iPn&8@8?!xZX7l?_<>ZJm#q z*BUYc)Q2)MXQ%t^8<7U`0Nkm-h^%Czn`ECkRRY)-9J;ME7PP##btO?N8%uYm)Rf$C zT~TT)rLS*T*aA?J1D)KL6y4{{_IRtf!mO95kqfj9PCd7hw|!9Er2AggHl@EB7Bjiu zRnIzbqiJ?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xgs zR2%M^bUby~c7LV#?Z)lI2iMA?LE}uarut1imqRmEH`r{W5kd;sAo|bGtLaA|<*Lt? zv*sq^MuV}2&8VvI&T{pb9fx_ZuHI@HNhi(CE>%R;UyAtP8R#i}zAulnJYdMw zRAQM+Nbg{jDfq^iH^!~h5d+s!Xk*uS-E@8ssdry=zl=MmuFwV&E6gS|0Tq!&`fSs6 z3)O+pE`=k75EBR*cDR~%e`no7$sDBN;QSXMabt4z>V~m|%AQq3=Q<9)s!u)dZr2c% zlHK)e&Z}g!-0RqQ{4$T1tzW0RiEH*d-u$EXvse8PFlL>x8{RE0UO(*nT<|Dbk+ifq z_~I05V*Syea!P8*(BnSpU()Yt~{su*z^gs5rGuZO^$&hgz~XnfESa*8{Ti{Q!gbs#WEUTpuqDg?h}@h97! L=1eWI@jLQwt=}@? literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/black/00_toolbar_ef_press.#.png b/res/common/usr/share/osp/bitmaps/480x800/black/00_toolbar_ef_press.#.png new file mode 100644 index 0000000000000000000000000000000000000000..bcd01e5f01bcdb953d0d21468e8a86e11e14c89d GIT binary patch literal 3094 zcmV+x4C(WUP)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-aon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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} z0003&NklZ#x^BnF!Z0*-UGH72G4uc7+*Gf=@6TM< zwYoX%ttg6)mdj-n1c5G9xHy|XB}sDWdEU7YVlX^}5SrsSX;oDZy|2s6(r{1(5wS)@ klg8KNdAM(xr{en^02_gLy~TP#x&QzG07*qoM6N<$f)MY)mH+?% literal 0 HcmV?d00001 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 new file mode 100755 index 0000000000000000000000000000000000000000..41a5bf5c8437e57ddc84420b5d3cb617b6fbfe62 GIT binary patch literal 2855 zcmV+?3)u9DP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfyl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+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 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/copy&paste_Handler_center.png b/res/common/usr/share/osp/bitmaps/480x800/copy&paste_Handler_center.png new file mode 100644 index 0000000000000000000000000000000000000000..2e3d9733afca8d6c02a4fbc1250663fb882965d7 GIT binary patch literal 4292 zcmV;#5IgUQP)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~6QE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/480x800/copy&paste_Handler_left.png new file mode 100644 index 0000000000000000000000000000000000000000..5651ae6b2a70662860b2acf8d39147d76234f0f0 GIT binary patch literal 3881 zcmV+^57zLBP)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*neeos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000NkvXXu0mjfZB8!9 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/copy&paste_Handler_right.png b/res/common/usr/share/osp/bitmaps/480x800/copy&paste_Handler_right.png new file mode 100644 index 0000000000000000000000000000000000000000..def2045e70a4e7e0e61d658d7176e69729ee07fc GIT binary patch literal 3907 zcmV-J54`Y+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)XSs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ZzsV@F^i;4DqiptC0iXufW_h&&(ixgcX;eG!I&S@Mu1y-ts?z=pN+5)Ho_KnM#aoV*ecZVvpT1ueE$akdOpBR@m`Wd P00000NkvXXu0mjfZ^IYh literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/copy&paste_icon_search.png b/res/common/usr/share/osp/bitmaps/480x800/copy&paste_icon_search.png new file mode 100644 index 0000000000000000000000000000000000000000..d5db3076b6594b5a7342c9e3087cfa7d485dba13 GIT binary patch literal 3208 zcmV;340rR1P)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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zEr?{dga-~WVLui6bB#4~p3W(1nXoAWlEPyfr29_tA%qWph zt#BXD!)R3)Y0AS;4N2g@gZxTOkFl>1sUsjE1Ven4$Q`$W4{PKq5iAnIJdGqm1Ws|$ z|C2K=;|$kb9RDen=`E%L-P1><&nzA_4`yaMhGbgfTys|k({c5&DtV&q`yPW<8}!or zOQ^GY>#m()!VhGZ4+fn$RJ*x6?u2zfEl=?VkNWq21T@b|9=u$+>Xc)+WuKxpayA|i z_gq?#vC_GuRkjP||5bIRwD(=~nT)cwJKN=84MPt!;b%1+`xO1e?Dul zsHg~fGoYf*wH6o4q9P-Avocz%dGg918X6jY-m-OTcJLgpHg)TK#1?8M$(9h# zXB{_@&-UWKb%hINLbAZYM|6vvGDb;ta*8!-=r+rD-PXz&u+J8Eei`f7`n1C zsrB@ZjX9$uBOjdhPa+%B-nzcp(b(ANmztVd7m}NWy8}(hkNWvBWWq{wUgC6ZDHZPq+^>PPDRSxrTyVSck;(2J9@Jm zouMOxgJqu}8}C!Kb)J3i5`|&)iZT86nK$&kr^~fktz)ROb7%+) zD*QV+@a(ru#ucBowc#1fJ&V?@TX)8xPvCI6uk>{~99~{tiN8+E2+B7Jx3^%G?F*!)#b2+S_&E!aGOi*jkPqKJ0&He1UW6s=1vW6>-j|=siSt z&%3{fY61)?DMzYxExKTzD|#7nWVi5C_WQR6{QUg3Z!f=Bnp4egIiC~c*fg|gzyMZn z%y?m5*{?-WA@^U3+ZXxXrE@V2qC8-Mo45Yp6#N zQxsNXN@HIX1q}OVE${I?sZRC(y1K(olVgiL7ii}vjK<8&yepYq%-<9L+j+l5K2i0l zEzrcSS8kb*I literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_button_01_dim_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_button_01_dim_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..14f2c9aa47f37c63f404b7256a5bb2c225432442 GIT binary patch literal 1309 zcmbVMZA{!`94|OgnIwBbCsSiBny@&o*WR^v?YQCHwHt>V;&Fsam_TVCxCZ({Te!kt zad2Yr1DlM~=!{4*-4_JnqT5{N7>gQT;s^bpvPDK_V#u;Mzc{0W_!Kzw1K9_gw$Dp{ zzu*7m`TsjyQ+==?e|J8DAO(>ME(XU!`0Tzv55CV1_VvS|$l?=Lt=4L#1Op&JNoxUU zL=oCR3{Ra-}>j&1l03hG85Hk}QRYQnN?31iMr1h zM^R|ex~u>OJzWby(WB7~Vbxqu6igXz3p!4?+_<7Rajl|FD+c~`V^g#l@6iDs1E$tx zi10jGi?d{yySp25fY2NEc|(SWB6M(?*rfo~if{o8esM{%#1cf%OS*#|KN;qEk|08U zj^aH&#^WbAkJlT{YHY^kydEFr_tKm{30Kw9XxTbYvE1)K+S(=&DbTnK`qb2pSDrqTmk8?b0(Q?3$yMc7T&=hnv zzpT88ea6Rof{d5(5*+Eo9b`gb$LWxp3i{n48e8W||0icSbOv{d<3Gic-GUY9OgBm& zE;gD6sIX%U*cv@W@$(3h6OC}exII6a`MP?rX4?>xD4dR7{Osyi7Y{eh9=!gMUG%yu zG1GZ#9t`F^BvM0_FRzp{-=Dkj-J8E`J;nTb^Bcshdhv(qhDSu{HMv1!^Xu>Qr;GJ_ z51np`H|IY*$)!(xxVL{LSXXDxG?U8kg{ghH4To;_H0B6Dj~xd;sc*f1qvX}HlS13M zR}L>FN8fcn7{*7$OVd>qqteNd%(lh*g0oN1L(O-{iTNKJZyh~#m9*S2`Jk7Uy0*xMzUm-9{zAI1#L~oLvE$^GeOHg|zx?UKmD=UJ{X$>)N?s`Nbcp#RC)Je PxAVh_@YUQ@sCnQYS@Fi> literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_button_01_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_button_01_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..98e2babf80355b82cd524226f71457ca12d6138c GIT binary patch literal 1337 zcmeAS@N?(olHy`uVBq!ia0vp^B0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>OfpbP}DV zo^Bt(59{?^;vn7$6b%{QvqK(o0`L3jxwfq1q=El+V^8b2xfEi)fn(B%9GZ{zSRYJd z_jsYykb0w?h&-AUdl3<*kfv@8Ynv9%yh?7+c&U61N+W39?#v6>lSJ0Ve% zki~ulOwW^q#PcKs=8OVfKIsK6>Bg_5>DfLl!jbnDb}JF_!B%`VZx4NhECDKVkvdzk zBnVX`NJdF1Dn$dCs%)`4Soit6gSo&ME0@LYk>C?q-^WcDXOhjAb-lb0r z+E!O;$Y}O{YdzfDoX9@^)5gZ&%zCw|@6Voo@1tsG`1o-13Gmf3cgn5R4-RvO*n!o| zvul$de=(UmR0yw*4&K~&`j0Qq|2>+y_3O&*^4ph&+u+5il^ZXtoE6XH-v9jPuaA8@ zI5NWC=m7oPu_I^Sto=C9dI?0 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_button_expand_closed_ef.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_button_expand_closed_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..471f828fdb97d47531218bcef12b0a238003f952 GIT binary patch literal 1452 zcmbVMZA=q)96l#9hN8F`Q4-*GxEE#Zy|g{Jqm`6iD-~Oyt-^;bQhHbD==I9=um#4t zh{nhV2{Ab4a0C|u&I~jLbz^D`V;OXj4cz9?O>r=%I5wHnWNcw~K-oSJKkRaM|Cf87 z=lAme{qA7Cd0Sj;Vk`gvamF0VB96(@6B8}IGm)<2;;>QB7YSC*DfsO?188ZkgaM7L zy_B&qcDkx!fKda$a;M8yBovu;kPeQO+a-)Vz1z1L~g8|m<@sR-yG^b07b7>of zz&VIeu7T#ADl+ARI*w;Rm0TfnASeprxExiga2$OF#1IsN5%I=lsFGCSB$f^?T##su zr=6sQGA!5q-ZbUDg_NBdO9Bh>ou7cg+0E7M2RVb19mTr$`P1lrMTwMKEcBL>&B93pRLNv zz!t{GRq_t;Je;W!vY5Lk8%XkDMrGdmRa@s|cNQT0IDsY7Y zBM?1?q8WN3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mD{N&Qy)VvZ;7h5Huj9yA+ij{$dv74c> znX$2vrGcxFp`nGVrG=x3o1>wllaZmLnI+5&ta>fY42;dqO)U+LO$`lQjVzrlot;cf z%#4l9jh)>LEMR&)^NLFn^O93x_GW_Yh3GZGtJli8C^fMpzbGU>KL?fq0y6ST@{2R_ z3lyA#%@j1kGxJjN%ZoKZ(F5_VOKMSOS!#+~QGTuhIDD-#vDj~9V&rCGU}<7xX$f?> zA;_yPZmtH-ZpMaYZf2&YN>IHi?JgIrW98(0$ z8XZrhD;O9Uk9)c}hE&{o6Sm*`aDc!!*U8hAt_l5NZ<;!0q{RL`YB>Kk4kP+9w9 zrbn$(*Q=8$pE#!Z&z>l}Sl2U#|F-s}f`<{`ZO&I8{l-_pRwF3SZdMX&e*5jW$oS<_ z-*>PYv&As?ABYaG;+Vn4b%47n?rZ7}gZ^>-q`=GL@YV*xI%S7iFw%dHF*XdFF zZ1KqV{`dTc*BJRdu4HX>zHB0%@zQ&bpWM$iuPaw=^qG0X#z04P*JBIo6X7l43-$f& z6!z@7GIQecS({rtZQFEDJ<+WQKB0As&hNOhRj4lTRjc*N!!uAI(J~M{DI`u|4DuSiFapnU}ozt@p8QeTkUs|K~`3dWC<*#po z`BdllE$4TL<9Vk${dBLHRIm4wP4{agHa(dre}?(@hWH!&CzuT`J>AbNRv`cAZ8Y<_ s#)Io-aO)heXGwY(VIlVJ^e=$~hL{G~D<@WaMS_Y-Pgg&ebxsLQ05^~W_W%F@ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_button_left_ef.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_button_left_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..f0af76f70e19514d85e9ddae3e00debc77a3290d GIT binary patch literal 3161 zcmV-f45ssmP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_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5gq(d{KJ7mL_#8R zDk7Ib+I6*v_8DV#t+n?+Z(HCR^Z~d7#+*;Jh(wGrJJ#Aq;1+lW-kicBGVXcay0tb} zMPGo9WHLD)s3TSNU4U_8%ptG<3<8~im&@hWRP`WGUq3+Sfqp=ModESu=R8<>qr*Js@1Uvw*fC2-VOy&kiw|rPP8db4ayo$%; zBh_pHhJX!VvDJ*5Rfv{KrHe!&G5j&rz$CB_EW3oA;eIRD!}owymvB9N0@wz&T*BYs z-9V(e;5J>tsA{xaE?;M}+3Al<0vHXN^-ovjP^D5iPp8wfHTXh1U{p2q1)pgb{E4Sh zskvAzwiKkT{K8Kn1e{e*wJF~(ng1_LyW)KS1&{NK5~def00000NkvXXu0mjfKbhbU literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_button_off.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_button_off.png new file mode 100644 index 0000000000000000000000000000000000000000..4c58db52094ab9e04d030a062a5fa342c65176a6 GIT binary patch literal 5501 zcmV-@6@u!CP)Z00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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=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`e zhkJAn6Gcc{?S&O)W>jUVSJ&1K+uiQqP2bLMUXa$NxO(IIjtE2~s8<_^LM!cnn3fXu ze=ZU7Af|=|sfCwz&S`B-b?y3%9Rl70#BXk;wX3nZw!XW*zP?}NxoHeJK_oycjc#`Z zHnQ;E;g{5jDkAXS!A2I{?h3Th5D9Z1&UIDs#?4zh?QZw5a_+5Oyf-sL00If#-@1MK z+jhG>uFBF<)5Hh?U`>Q>cLhn(f=HuP7a6#S%;pFrNvjDo6F~s*tX@&%xw*8yzIW~V z^~Y6JotgsavzA93$1gVT-T(VPzW(YrWm!gX991Gf5Dy|or`t!8Iu!X7RaKs7G`T3y zY0(&DZGt#y+6_Vo2;#v_;Bhvc+J3)(^!dGeUlDWR{prn}XZCf}RgHG1^L+FEef#wB zzaAEO8OL$lw1J5GTjnKwa1H-XUC&1{x-YQX0mX+2H^%cM?R5;DaiP+^nvx z9&Fyb_fJ-8TvgSXR`H!JVO3ROb!Bxc{_@M>$>YZl$H&JjQ5<`%wQH7ClPwYvq9|^@ zgy;e^gf&&8rYCyd7B(-g2~|a9f`oAG#`Ue+pWgjD5ta2jApa!jIqW1&_wPS?G}(Lp z{pW*&!A4OOQ540F6@{5sUtAQHTs-K_S453W2*|lw*Hz7FD?Q%0b?fQsrAs^Bd-t=O z9AC*u1!f-Kx%=5)FRfqR8yp2Av(FB)X?FQ&`0{c-%`WA6 z9#>VVMMOh{m${Q>1};G0wNX{O-KuRAkNPVsgKnqu(po!q-lHtbb4ld6AFZhC8bl;< zk{oWdJ~;%zG|+y7>KeEjVr=!-S}JpgbqOQ?X1AdCP2002ovPDHLkV1ic literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_button_off_handler.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_button_off_handler.png new file mode 100644 index 0000000000000000000000000000000000000000..11ad346f4ba882f283aebf1e45d87aecc06772a7 GIT binary patch literal 3674 zcmbVPc{o&iA0KNXTc~U`jU|cM7|diUhGAr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MuT61mlkS4&+V(EqG0(y*;? ztj^KZv&RIBQ$3c-?Kv!ave=0w$x`5ZwBDX;`SHDtjZH|?=@&Nrt6`UmINzYB66F); zkz*5LZ?vS;*$qEFRV2%(6ns9oXRl3!tNS5+F1GmXj;pMxtbqggn(YX2KQ>eDt8Noin7K9A<@$-T5+jOj$WN&rcOqN2w+@Nj5x}6EO6H!P7fC^SU~<`gTJU@nADdQl8hXn_wM#()D6qC5vx{d@gVv9Zmjs5kn*fg>sx`N9}C-xu?3e1gwo}}7$v!VqN0!! zWn0-EaUILTs0UT9A>qmoz$N%{eO!oS2475kg5Xg85BVt@Vh8iPMJN}bxUOI6n*U+n P-M>AYp}9e+J~8ZH+@f$R literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_button_off_handler_dim.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_button_off_handler_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..1562cfaff6366eaf245c5b606aa8a5526f2d7820 GIT binary patch literal 3617 zcmbVPc{r5&-yV#zMoK1Grm=*WmBD0W#*o1vOU9CYWWtPQ#@>lW(I6?=%3hX8DWQ=v zBC=%P%38EqJ2*7y$r6 z{!~XYi%hb{_|k)+-dh-GL~sb74FDJ&jtKGg4WzKZK9mzw8Wytjs1X9D`e7l?dL%e0 z#FP?1wTNO+9HML-eWL<>4gDa8jlo6{7`{L-h2;&72o9n#F%ekEpSl?Sd}|v90sjeM z1!5t8IYlPfflcWQ3Rn+{((#2O5MVSKiqO?VqY>I*BpiW+!TC2@2ce76Lt~Ko;J+^j z-x|ZuA7f82|JxRSg@pvLSRoh~EId3M8jga}87E)}Lqo$Y4J1;BkI-R8(pcURIy9!r zF9iaH>C2#ou&8tzcuUdShaSqpLinEk6+&o#N8^Tct^IsbO#?>=Jm?O>g zaRdXrAp&8B#2J|4%n^9JE&{2Cfa{w6;u2|0mN(6p^2;ujZ})Gm;eX{~Oc@k!7Mi_Q$7hk#8T&|nQ`D$S1`&eY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1oX{3sQ}A*$Bja zebOf4{u20tMqNMgbhf2{{HO0Bn;!<2SMtAuYW4K4zWeb)*`}#-4CT5ChkM@Z!Ivpr z&xaKE>D}&RW8iCrc}J|QI%x?N8|PrXIK6$;GC1YIfHqt7%yP#{)l&8G_{9Tavlr81 z&WHbG-nt!`SRU8Axj6c4v#YC1QyX(5N_o~h^irdoi}|E)tzo75q`TOA^N%>oM5f$b z95S1ot24$6+B57vKKey>^V8blrneP0C@%^%WG+6uX(o3(N4;ih`}5jUidXOZXO?rh zk+$bMV;V5MDM~6Q$Nb7{Tq8w3JYMWR-aAnv{weUgR}C2~Z_8_$Jr2UdXVR*#&z*g) zD#A%koJ#mQT{$>DKJLljy0^Q{)l7ka>!iB6!e=v6=9Qd8w+)ihYy-xXLX!-6MTUP&KtN=XMZvup}c>=QBXwaTv^>bvK>Btz5Y%~THovF z^+m}Ks|T-6hz>WY1*69_`jKExPis9;+_%Qn<8m;^cv=U2Ejqw6RrA%mCtsQ82ySQy2D$Ex~hba_@|?YnOvcJ*{$T+f1RSFKj{kO2GH4x?jL zImBK|>5}mex6&2GqBy|qmCPJGDf{{K+C6J^rY!D!QmnkZ{BCpl0~-=4_^TYL`~8a3 z4dlxd-@!tsBEz+KOKyHFk+AD>3iW{jn|o<(e1fbU=B!>A((e4i1YB@G=(3uGwT%r; zvns*(CDf1}pLDR%tfHP>pk{IWc&_V)#zWw4Lt`zk{2$>LY|jSweLgI(4WLxrTfTqH Rgt_(8Ml`b_+`)UX{{uo`JD>mn literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_button_on.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_button_on.png new file mode 100644 index 0000000000000000000000000000000000000000..834e64b344b7e7f53956671cc20baebcfec91cff GIT binary patch literal 5630 zcmVZ00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg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B~S07*qoM6N<$f^34AdjJ3c literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_button_on_dim.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_button_on_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..6ad67f13cfa091aee246a0c8b7f2c7dd64f3b869 GIT binary patch literal 5626 zcmVvP)Z00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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-Z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O3`i(*b9lN|M-bwwj&ArKR5qDR;9h8#{;h+{~0^8Jdme)!?0XqB}QlzPH!!xBVcn zN~xTg;jDx7Lnyye+?=z3HJ}ME*m-0P`2i4=!5}#2FmyF#mSmn|=Vp%2UR`+O^yfqr z=g$H88-X5yT`HIFojrfP_vOa=ce-2M#Ux2ez8_>llA~ge0Tv)J`6FR8axOh*djOr8f| zKo;Y>w(wMlX_7;_$V0?n!OjU|jBw6E2;qVtcz9xd{!X*qzNxkD=UFxy5BtW3$P0^F z=N!^BSyO8V#ZoJGc)#5m6vU3$?E&-4S z>Syw}!xE4Q5|PrnA6Bb7O6tg1!|W{5;RMpqseAFCJ?sJgg^Z{}2o8aMt=1n00CVO) U#+27O`v3p{07*qoM6N<$f{6F1kN^Mx literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_button_on_handler.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_button_on_handler.png new file mode 100644 index 0000000000000000000000000000000000000000..d99cd6869bea249926c3183b00bcae30745deffa GIT binary patch literal 3265 zcmbVPc{r47AD)q{DP`ZsSVEW?%rJvA%~Gn7J!Q!>3uBp?W`@B@7$GEN%}yzwBjJc5 zODf4&Dp3b5Xj5cglK4i;`My8Sb-wHRp6h+zXS?tFw>-b+k2l`lZl9EdvIGDCkh0y6 zbrkdn!D}EUBKR&llvxWpB@WJw(!AIZ(D1nKg z_|o==u_#VqcFv?Qe-e@mw%HA`3PA}30x29KC?qg|&PIh;gTL#d1mlfm2pIGo!tu8T z|8UBUU=PADSQHT4*wlywg~31wgfYwvjzGW+K_*a`2?Q#55JoUF6dZvvF$eu@V1YFj znTm46;(yu_%&ft_91ar&fpEE8W3H(&gXIH(A(6-p4HFY10m6tKO6L$mjOc8wUkX?X zo5Z3qIWz_xw4q2m!3g45g9V=c2qBP3Ap9jvXa7u;AZ3scA`=2LhC%`ZH{$w^W^)`V z|8e7Q(QM~XCI#Y1VKahQB*A%5wSJKWx%+2B8$f|KsKYFp;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/default/00_button_on_handler_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..8e4c9b402b4c648aa7c82255eab804e70b7efd3d GIT binary patch literal 3201 zcmbVPc{r4N8y@@Cge*y7j5RSEh8aeN86~^M5|S|nL$fq97-UVylI0YVWKB^iNlH;e z9H}e`StGQ_nv+CX&S*K`_s6-;cU|9mz3=;5-uu3v<@Y>)yvdIC`+(w#;s5{uXuTij z%o~xsM@Lkc_g;1?$MA+7Y`i=BAl;uGMr4u!SUkS{raLc@UP>$qSL#Sa5^Gqi)*F)Yb} zl>HG*^1%pu0x2Sxgz^LLH3OM)&^!SunN0+7s7GlmGzSCzu8Zc)H@Bf+(02$s7z6&{ zl)IfH$db+^gA5`1dL$Se4niU!a05dm60QqEz~BfdjCUjT;09!%b zCWXPK&}pDeMWQb~gpC37JpB;@m0@T1w=j+MGf}*hK{-SQ6b^wwsnpH5zN1-eXYzmC z_(wF05Y8Y&oyjbE2$RG+4}Y~^WM1z6-OwhG=MCC{N#Pv|@hFZ?3Zar|Y-=0_%=-fI zqxhlmMmS4j7z%-h;b3?K9Bzy-u(Gr=vNS+ipkVrNt6v)b#6?;f7~w38@Hk@&6daC6 zVBvTa*2)r(w8X+-2%P>et~HItCeldcUv?=xyFa?cO||AJO8-OiC!(&x%Q>g1+Y$P5B4=c;o*S_Ybb$|C2K) z&l%`uar{@Y{MzDG;O6x2(&sJyZXPm?*D*|9Yq-@Do&W%%Rn|BxfipPc;Yla-$$7tz z_HSV=kTr#eY||R8tzjC)c5kd8F4vJIX+36LBF!?{oYz$uYtm~1Q4|*)bwSBF%WP3X z4Ny<#n6`Qne+`_|GBGq9&_OP==^NB1q24Vca_VuYmoNGw{g=!}y+=K!J-@k23GzKm z&k;S+Z8JAsXAv6`u`)FKG<%QP5x~HkaAk$x_ulT{(g5(M8sD+ufT1Msp?jGaKvP+vOd-sL!15j zvz1V97tKO-o3w*Kxka6Z%2 zL)lqaSlFVvx_Z<`eOs9%*QM`ZWuGe2cf4+EZ2_=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teb321;t=Cs+9;cUjt8A}L8P9N^g*{rm z5btFNq2FyBrj>l1x+j_zfs{^D z8{zSwvWufZxAkNLOSEU0UfjE4%MToKHnzy?k1b5?T5by93J+D*?9CY!1^O2e|A<)W zgAv?HP43ywHDWvDJonL0_Z0V;DXrg#VlP(krED#la%e#^5kh9iqjEkejHMzzf3Ym_fp-L-bE^{?cMq!hQHZ&uIOt17v{LxCc zS)}m#9et@pXZ>UkE}v*x{q4{rCr{qH>DHMXQ|Xq5!jueI=re=rI5Qvz&*c-z{pPx9 z)^A0+)M!^XfIEFD==$b-)erbru|45fy4+F3psuelpRQi3Bd63n%EfEZYyRSDkXeqB z^-6nDLsoi-ZsxRT|I$8dwqj|EFzK-$er2nFUDa}e+HcN~$u&s1lge~vhFA;T1THnJ zWGPq|-!mjDog|o@gRso~vW4%JUd6i)+C!sa2bv3yY7W6~Hk9QSKXfdVf0^O?9up4| zVN@9#URy30yzD;C+=}g4s7aXf#E*S_RFQki>JkkJ(72m*sXw8YBL~WS!UpP!mex+J zu(UF%8TOTw_19y?&<`84-h*ZZ?f#MCGkGzI%fjv%l^YT;063|sQDaK-%jQpkHQpX~ I!@?*2FMAkZ;Q#;t literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_button_on_off_bg.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_button_on_off_bg.png new file mode 100644 index 0000000000000000000000000000000000000000..7ecfce097704abaaf407ebd174343c59b5587f6f GIT binary patch literal 3014 zcmbVOc{o&iADxS6Q~Vju3<^Cg_#VR&1d?U4 zT-}B44tp>(E*nZ&!azlAo|Fv&Sz3#D6j~rd2&OXpSsW|KRDA;k%%WRC+)N$d4m>;~ zfMt7_&u}^H=t?^rNHeEHtapMfMHs07n<1otMeHDs03))3eAC59=S$l#2>2UB7-$9g z?v%U3UND}^XMjziNMjlt0Kg~|6fiMGp#UQ=0uCTxaOsUQ223!fC=3D({&7L1*7$TL z#+g9+VN1HQf&>VKJPZsL8X5`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zCAq2=93<>B=S>Rj>gp*~+INP}-YqfIUvaax+K%ZJ5tSeV&3Kg?H1ri3A{25)EPa>v z6z+&TCOgG>ev5p5ccEzpRO1*zV`9u%fvZ8JgcVj&qI^NxmOEtVpWj^~75tvQ>hj2k z#>U27E1$2G7pJLf-D`+b^>cDkx7S42YqmeqL0q_SU<2yUL^Todm5gb+cl5ogMSi3F zf#cVmH;lxGcfy7ShKBrhb*o0#YHC}@o_zNtIdBFQZ04*|a<||@eF~X>>^2$zBBP0G z3X=S@aw;<&@U(jJZpsxo)nb0sthx&4MXc4!QcTgE7l!li zDkQ7v-S_6A9CX`U;-hnNXEL+1XQ%PA{ij-*z0dA0qWbOYV7S`j*o2(7ABG5!+!eK)YUH+)%|x%292+9;NIQ0IVoJ4{x!i@+Sy7keazVw-0*8t=wLK50#Ad|I{o1;5>dRde0e zlSr;~PppyaeemFI39iU}tYzcHyyn;K5ygi3!A&8{tm7(K^{>*o7l@tsn)QluU2RJI z;cGtIM!e)?BQ*vW-Cm7cZk~cY%`KJe0H;v(!WSA^zg!~=uXpI`26DNVPqi%H-2Fb{ z+BLt&+5333tmID`?qoQ;^kBA2$ECIaluZ8>emK z_M-02&SbySD~3dJlYCFX{l+ljco$o*9q|16-5 zja|92b9+QM@Kv;3E3sUd-Ik6uaZrxM?f($(-d>?yM}<+V+%~iOTyJm6UnY4`TzNDJ ztvNOF*7y1|n;eJyHxMo~FZMz94_0W5zqBUKwU;B1AR^A!ck9TrfJHrgi z((Ahu9jQ#@MbdSPVy+HuIJXYyG+AFB(o$EW@WiGEBG9t&2@89$?W|st9_m3G7JVT8 ctK0_Ao!DTdxA_Y$OMljOL`On7&hNy(0ccMX0RR91 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_button_on_off_bg_dim.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_button_on_off_bg_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..cf0869202db498f18d2d67feb08fc43f43ee7f96 GIT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2j~@?2mYiBwEF$tYg=1e|54|^tPfu5Y0*cS zktG?Mo9kB$-V>1yFgPll6A@_v%bOc(f7$EoVMeYIi_Y^tYtW*1Dw;hE8as_vyVd+F zumiM#>?lwNv_xblP19G`Zq)ygC0VX$oI{;Ew86cuLu~qIcUo;$S6BXIX77qf!&_O8 z0#%?7YytJ1o$cRmtgqEg5BE0rGhgQYm_r0yma%%H{#w7^`x~&~8BK20g=WC6h^zu{ zudddAxw)~~FlYOHxbwZe-lIPjlRh;iOC9x<`UlP3#&1MqNkrCtaO{fU_2%ZrZr=}XfyGiOVs2s6mc_6J}4bI#*xu9+9`c5^K0CsW-{hxN4^SDVe< z-vMul$P%#bT~Kca6#q6&4`?>pHs|}I5HS3Mvz7h zwiq$H%+cK4ZEkF={e95yUjg0~k&l2IK7iaw2D##2ViY)SW{bd?APAqS)kdEgpP2Ye zwOWayxa85<%{I);vzs#~l24$MB%#ypv>T1>w>zEoKRt`rfF&P5ox2%37Do(>0Mo!D zX7&hhHVDEC!^6WDs@35~E0xMiMd-4K#dIcYM&e zJ8k$*`tyx=hD#n;#s4q+dtoto@p(D%jP*RQo)1<#>CZR+8vtB=vS>#*QK0|;002ov JPDHLkV1li=`Jn&+ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_button_on_off_handler_dim.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_button_on_off_handler_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..af3352fe958673f03021de31063d796d3dad4d8c GIT binary patch literal 4599 zcmVKLZ*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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sd5@7jCMl>84K}`-&BXR^ z+hT89d1tC_P#q8d`eSpYZ6JQRUOaH?+L_->*W!^&{Q1X|eRtj+pWfTFKe_Ls{rX?r zi+?&lzv@;JgDWmux$aE=gpiIof7yPrIJj~{y71-qkJOg#)Y{`MN57tlu6kO3*vYIe tpUa(@JI2R4n4fEdvvZ9!xdKRd%7(n}8nI_D@uKy!68L`ZV)TWXe*w23xNZOd literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_button_radio_activated_press.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_button_radio_activated_press.png new file mode 100644 index 0000000000000000000000000000000000000000..f2fa9e5fadc65020db739cdbff4950b496ae9d19 GIT binary patch literal 1331 zcmaJ>Z%o`|7%y^j1~;|SF73sh)(v@c#k zqMXKgE{lO>;Otb> zXXgoAO$Uhs{x}`aNT5$`88Ja(q&1lu=}+-#qUkZb(H0Pa2B3o5+JJ5ec92-%70}!< zQv|-^0{er+YEqr?c3d({fcwdMZ;ECZoa0Ew=jS+P56;pIOVQ}&yo^uqa{}9duU!O+ zW~O_D4mr9O3$21gAA}i!qO#d6nXM-cvzKCco_9D{){8v6*02s0+pAkUiwrWbQl^@L zs-fc!qta~*!61P$T`fV&#N+G4y0s=0l8myI48@Q%rD;xGE8Z6D0RN`3p|_PB&H$1lfdUOPX&3{=4ruQ)pkehH8C*(mxaWYXr;V(&%h{gQYGq)m&w+H* zG&FogUqRg<`l%uqdmctDHKblb} z8Omvn|1?X{ggVffuD3o~tREhrqZ4DIqal8DY#zf(QZZRf+Sj_5mY16@v}1d>NUkFS zyzJHE4 zYC`Y2^S5)yD`SgI?Ki5%Z@2{e_E9j{a*bP}MhB zGJX=9eNXmmbN#R{6#N1% zUYQ{$k4R-_rrwku@$6A&7k(n;3tiVsrA^18(_{976J1Z|YP@H=62A9;%}u^= z=)UjY2rZSgoqV!<_E6~0pFO*FSI6p}|Kh59)7AawLYFG@+W58UPjYr;A-8Sj8#kz} rd-#Dh$r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Cb)O5d=(A37J1h_^MKzq-1^4|{icu^C6zm5?2?q zrPa0OtR4B?eiI~UM;t-Dg6$VAtqwl7r!%LyqEr5LGvG~ZodmzJNmT3U?pBpOUA4CJ zn@v^5`tG>WTh6Ov_Z>g8W<4$Oul>)S?NM*kdL7MpL`XlYq0 zCETp7Rk|!F)6%Ut#Wxz9*y4*-FV--y+`|cWyTwn0k!{Zbmomc$wO^TBj}H6HYVB9 zOtT;4d^53eIet%x?gq{D7jA@_Sd*8pOkqo#G~!d$rk2aDji9V#OrJ$IY++mOCCNDw zI4bm#T(ylQLCC~b9?yN#NhWpy>Tc}g6UmBiXTzqSHb>L4>R@!9}G037Z zuF=0F63=xH0hrgXnHQYxnZM}mSU+!Vc-Pq|IiKTR?&Rq@sWtRajBd>HKhMF|XSJvf zNq47G-p_*Cyf=q3cUHF;p)qdheXc)Y=QIvPDmIREoRQFEh9)&)r5k$FU6V{3gNZ#B zzmZa1S`A^*!||v(UGa0#K~TikXF|d4fMwv~Oy6hO(j)7yS* S5IkM~x%DCW5-aiag#QB00mWSa literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_button_radio_normal1.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_button_radio_normal1.png new file mode 100644 index 0000000000000000000000000000000000000000..333c58042eebf309e17ef6213385fe28d233ff90 GIT binary patch literal 3987 zcmV;E4{Y#>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_Ifq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ZSMffz2O$MguJ~A`3xsrhQV0YB**}P}=Vh1d>FH?} z78VYern##T4IW*aN<<(^+pa?hK&<{r;T{9kun~aVc?c0qxU^U(6aZdm1aM!mSafO6 zv*S6m^q`^QbJd^H?lDmHZVezLa^Rp#xC8iNBY*?dq+5IQ*wdgjS~~%uDgm+59aya^ z*Rc|WqIaiD*3!}vz(6Bure}G1*%i4w5k_f^(3NOKDYRqM)lsZ<^$0kbLij>1;pK7} zpu3?wxGn)#AFec@&_W<|#pkq>LaOJh|7$uF559S-cgLjH>vc`2;&jEVT46h8wO94( zSZP&*ti9Vm({Al}Jk(qA>H&_nx3{|$c=xZGhLqA37+Yc6&e8G1wQvABebY5|WREri zc-imw*GvVV{`>`0*$EQ00;yKuv{LKf&0nG$9Jx| za5#+5=euNC){REj;`gG_sLRY~g?;`r>`SL%dFlRlE-ztUI!*bfPe7Gjr#5fi4Df!# zyBTLq{&Hes;*E4Vjg;%Eyw#+4g&aSHqDS-5(3LxPgYB(YfR3h-9bcGQ+-m4GA3WOAghuaAfQ z;MCXGMs*6P<-v>?88~~2i tDcsNe-)iwl0bAc@T7WIU7GVAM?*Mf{W@`V4*d71?002ovPDHLkV1oK1cvAoX literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_button_radio_normal2.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_button_radio_normal2.png new file mode 100644 index 0000000000000000000000000000000000000000..c1ad8c66a2b0d7c95085358fa122b91b3a4ac567 GIT binary patch literal 3526 zcmV;%4LS0OP)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&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_vA({JVHgM@5JF&@CIIbr8-PZmL8Ve5lgTXDw*4-VNIV8^0$;TQN-5L8OV@Qv z<#HJz1eRs(!vXu(KtYw-+}xyAt1&Y(b8T{R@+fc-sA*dyQp&@?8^>`4nKgFh>{AH3%{4zBB#fH%NlovZla>gwuA$8oSMYai}cP`^_E>bfqT=bZ!|X#tc{ zp74GDYPnoK5ZJFkE0qeq?_U8HbU3)^dEO7x8CF6Fs?{pMVkkf<g$z&4X)qw$(QlDb6*wXm;xON9KnGDfr^u1E*bJ$vZ%eHOp z(>yUT0dPBXv!Imv7>~!F6pKY|fYZ~{#N+X2z_PA>@Mb=r|1dQ*6&kWoD3HtLJ^vREvV&*ztbb3jXLE>=p_fU~(=?&t<807*qoM6N<$g4pGY AnE(I) literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_button_radio_press.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_button_radio_press.png new file mode 100644 index 0000000000000000000000000000000000000000..85a77b2c6d40e5e09fec55f74ea52fbe7135266b GIT binary patch literal 3474 zcmV;D4Q=v?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{yriy6m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@2KB!C`FV4M5}E%(1{`(7_B_+-{e2a4BCzib`JGU9pAO-NfgFt z$Nbm+PmExponX&Ep>=e;aWOGsGJAy@5yYu192pPJIJUm~`0f0}x5WgC6l_a@mVv2Z zlw88Zm_K)7cjKJa`bC&@ZiAEE?s*4apC-@A8}*8lRy9z9ScE^ z6OZ?o?v6D5DHeJj#%9$r`RCIU5nx!*3e&H(vU}y!zUHlVlt$J<$8`JOe?Q*>S? zM&5)8FVCahkCc@E&C8)VG>7KU9GXM_Yv`{509~^nRzGX#6951J07*qoM6N<$f{1R1 Ar2qf` literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_button_radio_press_bg.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_button_radio_press_bg.png new file mode 100644 index 0000000000000000000000000000000000000000..36aca5e66194de7ab3b439571d7d4eecbe18a069 GIT binary patch literal 3012 zcmaJ@c|26>8=sPh79lER3~5v|W@jdYSuCSa##WY$nZXP*!_3$tyY!1JiEM=^A(b0S zi$dyNrNm8$>{;uI?A%egzuzDI?)jW^-uHdp=lgw@_j%6e#2vLT*&?-D3IG6Xp_r1b zMC1O|M{=X+U0?gcK{V_V8rch}JU5{~jn4!S7(7=dkiwz4Gp(33Mxf6NrXBzw=EkzN z7uuU2!O?jfC~Z{-8o==up#cCrg8*+D-IFN$DtL+Aj1ULcV*KEn-X zMK=CvOSHm+JcL4ToVK>VzdzI;3FYzKwc%JSc9jExfQU38fm#aFj7}4NKt)gfuRlxn`FovilRO`>$9WiO-}7d3hM4}2@o&Hn$qQyVW z!{mxOhA(Q3q2RgQ0D#04g-oyxXn%0r)5Ec0hdy$qD}>VCdZIenZ~D&IbBg+zk#=3y zh|G~ET3S^UG0u8QXw>VIkR==N(mPeo*ZgfnwcOXqss+)%y_V25ASzj9xiq&>*z$kG zjoK%drrMquXJ77m_s~D+Rp*E4PxB)*llJf)eLug!>Y*&`&>{DoolbNIz2eW&qf!of z-K`PTDt}ZAv&&P9r5ro8JR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QWI+8;DtN zhU?b$o?uJ!Z${6YT{>qZ>B|dWoB)o|jzcd_nArKhK^<@}I~hDPeTrMu>=#)L>E%ib zV<)TF3X{uUlBg15xz9BQotCaoWZcS(?wr5-UO3X1cbI+gK*Hydk2I4j&|A*2TN`~} z*XUUocGh@JU&+1uEJvl=%l}+?>nUdwjKA-nb>F~3o=#JaHEdbC22f1V3&}f{8NT{o NO);_{-z2(3{0+S6E_(m~ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_button_right_ef.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_button_right_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..41704309f9ac6abf670a8011f09f6086dea1ef32 GIT binary patch literal 1225 zcmeAS@N?(olHy`uVBq!ia0vp^av;pX1|+Qw)-3{3k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+n3Xa^B1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxSU1_g&``n5OwZ87 z)XdCKN5ROz&`93^h|F{iO{`4Ktc=VRpg;*|TTx1yRgjAt)Gi>;Rw<*Tq`*pFzr4I$ zuiRKKzbIYb(9+TpWQLKEE>MMTab;dfVufyAu`f(~1RD^r68eAMwS&*t9 zlvv ztM~P_^2{qPNz6-5^>ndS0-B(gnVDi`?rLc4WNBjHV(IK;Xy|HWVQOya=wx7G>E!C- zV(x4V)9aF-T$-DjR|3XHtd6vw@e3rhS57mYw1{!mq|XfzyestCefuO| zalBfdr7?r$$n{3CGs{jqS7<$wWHN#2$n1t0qQ1Od8jno6nYtYhh<99XcH*1eRw=MF52o3~8talmT!BX>%92U9-Z(v=@GSs4BkF z)o7*I>V-c`lr=<7tmO9C8X@Y{F8E1PvD-5@^%(PNyS#v%JX`lz;T9; m`Cd^odltt^R53O%Ff*`kI1%Kx>f|0!;o|A)=d#Wzp$PyQSeUc` literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_check_Activated.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_check_Activated.png new file mode 100644 index 0000000000000000000000000000000000000000..979c6caeae23682af0fb6dc476689b78698dfc33 GIT binary patch literal 3587 zcmV+e4*cKLZ*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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G?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} z0009nNklHlx7VG-ir1wEMpy}5l{>C3{e_*%)8J@=+X{|e1cgLXhk($3{egSEUfav~m} z0Rk|FkEyyU$Bee4eI;(wIR}V?OEToWQ@ykpUL|>UFUgYtc|I!!@3y+53^R9&I8eh6 zq1<}RVijl#7y+}oFA|g*H#AhQkpztpNsxEPOKCB@LfUCs1gYn;V(@m}84293k^)-X zj@9-fwD=Ru4y|7EDe62lRL@%|KZFQCgSZ5Fcic;h;RfJd&z1)3d1qhA-EnbRu9Eyl z!~w^M&0BK4^9eLmuo#}qT=JFp^i&P&k$1+!wB38gr#beNgwzfXlNUf+n+Ncg^Jwi< zUbj$PBxW!q#Cs%p@jFNWBG5_srdHdREKUK{fAW|o5CLK+H?;iqrQK(<9J?QT;$UI& zkxqA>nw3xdWh(o-&ZG6b5jrhjF|9TaY^eyS;b#ry;}Ds}@d+F)WzR+6#=hA{2 zu49?j~y`FmU7jM$s<~5)VXam}SHlPjYe;V|+0RULdmvHZ_kD~wp002ov JPDHLkV1j6hs2KnN literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_check_Activated_dim.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_check_Activated_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..40818f0a53121639957468ecc8fcbd3d49ceacc9 GIT binary patch literal 3536 zcmV;>4KMPEP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMV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0026e000+nl3&F} z0008}Nklt?zn`=8-aKe-hvn5EqD^HK*GkB z07Z)6iUeenNU^P*pYE!|#jI^1BW!t>kifJwH#0rzudC{uYPFEWn=l;SkkNzopgm|0 z+JpX2K$F`{`tY+a00AHlG=;bXB3IwVB_IIY(2hw0wEI5E9s&^4=J4>#&rdc6x{=XA zZm0QVkrkx_fadi00|2iNXctL+FvzEite89TDFDEyqvb|Zzkx{Z47O&AtSCjC2Wg;& zrN!p^*FsDrL28+9P4=>JDdPRAmQ^h_-vVg={fLqvZD){A7sFyMaK0-6GsI9G2<;`r zZC3TGMRN!TG(8pZ`X||6n{EJE4)V#~@FLwH07Bd4V-3}BA`ap<3@Sd^O@?oMB+h#a z%~IRt5rF5NXZ_WtxRd46MK&%4vWlbt+Sb3QHc#YlHn~=fCZl3DoV=ZkCc844y_2W; zl;r(O zlP3Xkdyr2*9*#?gmAXY7sG$zk>AuCv>0Q3{xvPuFuSpPttTeup`rc(K;hC+2^z#D$j0*&z$dXfdpg*< z_g+?9MG_(a4Y93`NS=wT=Y;NdoC!442-VpEH8c>14%Q+_#1wt(uZJmv{RfEcP{t1i)7bdeOEcw5^_))+g6eDgtU~G*tT#>FN~gr~OX7UZk@r zZR>q%s4v@~2w-X!>Tduvn*vJ!lWwgZ`&M{}=#xQ=o|%o@r|U0000< KMNUMnLSTZ(u${O7 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_check_activated.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_check_activated.png new file mode 100644 index 0000000000000000000000000000000000000000..61b1380369955439317e957b5b0388ffbcf07947 GIT binary patch literal 1278 zcmaJ>duSVV9KYCEveIg|FqoT@^Xg-*Cih5kY0jo?a*s8-WHAji(ph`C`?WdSdw6$U z9!_P&3M&p)Cav2a+F?QIWX>Xp3>+#ICP+61wsZ_8IGEs^U=2<|{9W5r|LAty{hr^? z=li~+spP(fx?Ob$f;7atxHOzwoX=eg$N6tA_QL5Qo6p+a`hZ;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=1Q;lzedIwKve4r`k5^2k8E)^NlmDSj(X!);N0Y<`=t5 zP2*)o9>Ld7H`S~dy;Ht&wKl#%D7`Ydv8B1M?#<&>O+O5@jwA@}pP?;}PK|lSF6{aB z%jk6a-5vF;_ki-_`LL`;!`!Nub{*e- zp|m%KaS94(*it!moj juYMxd_qX%+mUGAl&pkCd^Un9v)?XZA{!`950?B^8gLYrg1Y%?cy9N*FL?r(8>YV_6~0D?(n$C;dD~24_pIn&$e&{ zjM zn1YHr@a#OS!!Tc$md-et_--L<>H)=*3AlP5p)stk!Obh#9_Zkmuv;@i#MPOP2wYP` zL>n8Y;&}JDO?W9;4D} z_BkN}S-Rqao{z`Zhz)x+P$*=itK>-#ph#W!{92Z_ofQ1njCG~$^gtexDQKI0Ru<)> zYkLulVs~pro*=SDNLm_7iqb2a**+Z_PD~CF=q8|Qst}f<6hp}(;H7AU20#om;o2~e zIj%;mmBdJqV?Atyl_;*32C~Gn07Pi9CIX_Y9F=4=xFA!+#thq0j4Ukb)sWs*EOkq) zAX!jxOe<}gy~PS>$(fF6=gd4VwQ~5*HqB7Yf?egMXT@6?T3SC;qn4@T%kdSob@a1g z8iXlEmVnHAe%A(Bo)^P>4FjksOCi5kuR=(77 zkoY5cEW1GNH9q|9=I`$Xe=hj1m$3VG4ZpVZ*}2LqM;4~+)@Pa~Q`4oJ?{B{}bNkcH zBVRmc2{X5SziXu2eRnbxp7r@uVmg_A>#42&xqBEhSM~L{@8uV|C$6S_}|{4rc393ZNKZ=<|q1h%=*b7sSyMm;o%jO5C4l(twU?=F;$F$j@kXW)+8s&PWiN}(Ejdh%vJa|5F wWAo(;4`1H6ZPA^)c1_>5;@zgPhKd`03OoB|rpzAxX~_FG#Ucs$l-P0LAGQLyKmY&$ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_check_bg.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_check_bg.png new file mode 100644 index 0000000000000000000000000000000000000000..7b2e5dbf4f2a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k3F-9pNpNgDcj@Xssx6k# z!h;9NkiS0}H8ziuw@=@D@StvVa`I}(gWSq#b2Z2F``*0inWUg@htyMVEo=E6xoh$4 z*?YtO?6_TLf5?VM#^}(1mPf`Kw=uisLvt(6X`XR@0p^b$rnGOG&A0P{k`n%v`*v_Q zna@qu4Ste-VVk}Cko&XjE$)f)q}z8q8zvq8cVBjKd1Ls+AIh8RH_Xh(IVc2OaDzxAJwo@~_1CYFB~i(ZL5Us)iQU7pb24+w1S-Cp#! zot=Ky%2~N@inc||Mr)V{pIW_fUEom2ZZ@bq-`5br;h9ozln(v?7R6*U~ z?g>7=^YO@)wVuy{h5o3{e?{BBH>p<4C;Z1QlhJdN5i$`lv!{_pJ1=n)4{MI|it=$+ zAxcvOC9Jx~Zksi&^5`Nx&%-+q;cI_+l(u=Bb$G@(LT|cuDqUTHAC0s0xNSS|>0p<~ znNYjj%UNe`d!PJ9W`8Oxqa^(62i&QVDkIr8*+ch@gYOj11DEYp`E>ukScF%l-K6C~#RA6Lpj A-2eap literal 0 HcmV?d00001 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 new file mode 100755 index 0000000000000000000000000000000000000000..0f5b65eeca0ef9596aa2171f05bb8fce757838b8 GIT binary patch literal 1298 zcmbVMZ)h837{7G7)v{oxqRvmp4a#Iq?%qps$(@a9bC=kZrpwaUv^uGm+?(c1?k>B# zH0d898$+E^w-2JV16M_*n{y7_bTZw>sEi>Fr9$ms1wY8N8x}=rouIzgCRL&AgU8*y z&->o<`#t~fK&3y+?Lr)_l=akaMDJwX@6V%Us~PGwyS0p25_O2RNm>fx z5k(w;aVSbddoIHk4BL>A6TN0{w3AC~ic_?7oMoke&=}SdC>O+Z4w`rh4#=vXSUh{4 zz-7r#Bt20oTHs+;ZXecR_i$GtJ)BFk5)pV5Zz*$#K!K)+mzBI~aAiNS!pkAqIwlEx zMa9hdiB+e1qcNP`;wuH3k71X4*zjuU2P*VRDfh08d_0L zqk3ev)xaosw>M-dB5$~zx{Qh<<^?TXRG?}`1V4ekI3-!)0K>4MHr^BR@xBlZK%1NK z1bN=W(o6^dSE$CZ9+m-K*2RYfDjakJ5OM{*UY|hIyxVstbb9nbuH5W{T2h|rcOU%fdo_VPu%aerUOjcb1dj=%BwPjk}5asSE34_t)p z?K8r{=!b#Hqf^InL*?0J9JAH8Vs(ub?2iA66Ppe_XMS;h!=a6~>AF+P51fAY#c#bm zAA7ws#X&n}el=0t{lxb9`zrgI6Pp_+cNtq^v0EKRfBx3nSkt|C9&IlEdFIG_dtd5{ zbuZMPQa<|fbt<)MN*Jv)T^kuc9JzGkW?=J{NwM>jMP@p*U!j&3?+>(&e!BGLNP7CW zN_I^14c6~Ia(ymaZn&`Z>;8)GgD3mG>tS1G<(=Przc*>m44ktIm$S_$?xwDvS(^K0 z`s_V6{7R*h^vxgU9#P)uysH9#of^AhzCV67-_tcR^VF-S0|y&O+sVN_KhDm#{;;s= sh4E*b&OP{93S(b0F1_+r|MHFtnD?(_jx>(#u>Mk!P?vBb`1HQN0o(Gt761SM literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_color_picker_handler.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_color_picker_handler.png new file mode 100644 index 0000000000000000000000000000000000000000..7d02fdfeb32569117dee2e091c32f2dd61ca2fde GIT binary patch literal 3005 zcmV;u3qtgXP)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!AJ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+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 new file mode 100644 index 0000000000000000000000000000000000000000..a7cecd3ac0e0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b1I*NSyh#Z_no-;Y(|!#oKYnhQ{yqFi#7jG&N$)>7Zk^Tilw(jDlnLCl|ET)H4kz~ z$GD_5*3JE=NL&4p*V3idYGtF{9;e0YH*fZzow@N|DEr`YdC!Ek10Fc{>CcB=99X{n z@N2pAArZX5O43LB4(|Mo26qR~zL?{GG)!kNuGPb^ZNa2VcJRk~#SF?!hzdp$Yml)fb}HR`371dhB8? P_@U&pliG)wnG^p28>NX( literal 0 HcmV?d00001 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 new file mode 100644 index 0000000000000000000000000000000000000000..bbf157f0a71f46156a70cf9cdb310ae7e6d8c9c2 GIT binary patch literal 1115 zcmbVLPfXKL7%vKlC<-@)OH-p_WNTm7wQIu!)^0N5kc=hF#6-IG4I0+I(mq__q$X;N z5f3I_yclDQ8pA>2$%7^mqlqzIxR97|!h;9B>A|S4V?z(bgH7A_@B96J-}k-myEZm@ zvZKAboua6Y?68(6<393rx3!Z0)&2HaG91L|A|6L&T-7~D4VkC}>8!0!!93K>`PsLy zpQ3h_twIqObEgyo*-<^Ti3YYy&=l1_5V*QA12J8KQjS7F&| zwHmF)qR5+Kfh@}*2hT@{MZ}+XupUGl|4@TLgTCQeF1Cw>Y5Csq(!~wQoNQhF z+EeZOV literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_edit_group_bg_bottom_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_edit_group_bg_bottom_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..c2d4df9debe4ad7fb312037b2e322394f59ebc73 GIT binary patch literal 3052 zcmVKLZ*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 zt5vFIcf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_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} z0003mNklP5JaT-IEwWlw5II~ zXrz0ol90`KXi^J;v@!iJ1G_u(&Hl`;s4AOEL;&&x*(5j1Ssp$=JLTf?$_J{}&MO~b zNSdY;kuiq7MuS?d{snvjk%(yCl^@4(WAu2hlgaA>B>8E4TM3|Evw2WGJZg#W`=N+L zUbb6(8a?QA8q8CdM(s|wC literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_effect_footer_bounce_left.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_effect_footer_bounce_left.png new file mode 100644 index 0000000000000000000000000000000000000000..506abb8f5626bb77b6b587c6b3a1a4a4cca206f7 GIT binary patch literal 4479 zcmV-_5rFQAP)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 zn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/common/usr/share/osp/bitmaps/480x800/default/00_effect_footer_bounce_left_h.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_effect_footer_bounce_left_h.png new file mode 100644 index 0000000000000000000000000000000000000000..c9d985837c374dc4a68048dc95267adfbc3e5a3c GIT binary patch literal 4256 zcmV;R5MS?!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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-k+!Nf%UDO(_Swqg5aOvfDn zdkFub01-YpvkIS?TO^)L%#s*}k|#3$L7lg(%(Lac0RSY5bNklvx{v?>002ovPDHLk FV1nC}Pi_DJ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_effect_tab_bounce_left_02.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_effect_tab_bounce_left_02.png new file mode 100644 index 0000000000000000000000000000000000000000..38642452b55050c72481b8a47d0cda8fed03830f GIT binary patch literal 4975 zcmV-#6OinQP)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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FmNIuCkUUW`qG8Nh99Ffm>yUV=`<%(}d(|8PhzA8eyG8Op4~4fb9d#24j~c z=D`wq#5wTipecz5Bs02AF1v*ee~D&gDRhs*z?=-bmYoq3+m4iBy2KqP-U1oaPCjNG zuq=_#=w6SRhrJQ}k=WQe#$z(&QEoT^`~93Q z0#0TOd*4e3+jU@`r%K9X*#49LtH+-VyGGV}0Q8;;4aZJ~9b=fv*sbFXlxS`pVf6&; z{W6L-pccuW%btMkl&&H7HUJzx{Ej#bJy1UZd!6}+93Upaj5*f1K&I(937U4^MdBqU zgh(Mi^;rVICtw#@dG-iyNx&(iE^z|34=f$%uX1ipk8G`w3D^t3iXLRwfMKO0eMR`w zEfcVVU}d?Jc5<){j0(UOiJtX z?OmcCU{NN2*=ll8JSrWa*y?h(jA3VERc1g6miTi{}|}dp$rz@}g~#=VcxI31m{YwJ(7T zZfy&Zz3SRAk^XC9m>y``6RWb)P?3I-mPuok=YJ~TB~k#G5||Tu``hwC%!(d}>(%&r zt}X+wSFxxPSJ;`PEgdV53tATPcf|0IVwmm(Y9wb8lISv-EFIUERW5{7F0wLI;k2#k2D=R5Z82&h0*8ecc{pMBP(iB%w+&=33yG|WRm}8 z_O-=d_8NI^8T;c3qD|t57cdEr){0t#@8ZY)2wyx}L`41{0Ndv!MJwfC<^TWy07*qo IM6N<$g1!GNz5oCK literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_effect_tab_bounce_right_02.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_effect_tab_bounce_right_02.png new file mode 100644 index 0000000000000000000000000000000000000000..bbe9a34a590b0ce2f4faea0144b75d10107a6649 GIT binary patch literal 4976 zcmV-$6OZhPP)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^@S3L16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zLPoS$Rw0e0PP(j4N&KE0AOley*{qJ-V!CU-A}|n_2uws|K%%G26+o#0`>NCav+e}! zT=~?UtV3YK*9@lV=pQggnfYu$9i_aa!N`#DlVR5m0bX35v(*96rs=pa-t`XFEm*DL z1y4yle^A|%CGi-=i5%;c#Cw4K^3ld**fk3e9OsUqz*Zy>G91S&nR9Zchf^YbQ3*cHetSY+u9n9H0fJn0nDqLDJNbx@g9>EXH}#`4*CR1SswpS5adi967<_obzO`l}nVny2P^?)B_Su zoZ{JRNf>0~))L5IaX|Kl2<0v@j86cv1&$|st*m=C#)@ox&m@*n_JjU+3_D{=Sv~L@ zt!G!1$3ZX!MxsDDG#qH{i^IIj8O9g1<4ydPNm@@_ir6I1ILlh@5@an303lEY zK@lUJg7G*!=4yI$oBzQ8G)yZbk zW*9$F5LZf&t?)X%02?JR9GPrh!mu-64dYG=-g*m(6UGU}4-q-&cnZ=@91M=xk;!c8 z^u=lGIoHQeG97#ZU=qZwLirTr*;t4hPA{9v+>=ZK@W`?L#Ytxo5wYAv4)@f}-cX9- zS1a+GF<2;n%uf{0`PhBE^R21#mMbT@rn_Z2zN4eb89I1Cv_3M=KH#eqKTYNi=Ih@9 Y0N;Vv47*(riU0rr07*qoM6N<$f?$8sOaK4? literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_effect_title_tab_bounce_left.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_effect_title_tab_bounce_left.png new file mode 100644 index 0000000000000000000000000000000000000000..189c69a10af46101701ef7ccd07223eccc473e30 GIT binary patch literal 3952 zcmV-$50CJPP)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$oCc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sxz96k;6$E)b8T@s6NH!1Tr>eGmYBkPzAlnr>lOg##-9;2DsAiMgl_@ZaY&ML{>##T%QDlPmN&$l2{$< zKEp)Mfn-Lq=*2G$fRX^DUYky@4C>99ERO{!XAXHENOr;;?%|%hRl)RJxY+#U`Rvuh-54q?PN*(h&Dhyh+$|xnC{ml z^co8tfS$uJhS6A?BU??^E2J?30VF;E7?Bp=4K%!mfei@y1@k$Aen4H zY#9;mWZ__2z_1dy#);l4_3O5Eh+@E7o0#*}#QJLoFuJ4fvM#YW+nJS*#`m~L-Vxg_ zn*(|=Y%*+_467z!*yJ2*7w8bhw_pme1RW=lUvzFsq+Ss)Gz`{EOdxyfBneD>0f}7C zBXoZ!Koj=qMk#!Gxs39#;<&%MyxV(dV)o5Jp2h|&26i#|5AoUYME;G{OFGJyt!H43 zfNUzrBueADZ70&2nJiY}UGH9*d}-hiFdM(DDNz7PAg&4Yqibw24JTNG_{52XYDX&Y z5>H^FE%%b*;#}<#T=fz##d|E4ontWWd2vhwFkhZ^H^=5H-B;&t&P20`Uy`H<_9u$g zzcB-wFwY~nXvnFmM2musu>1PVfR*4MRU?@dlH>~YLjqak1(ag;+ll^0@0ZM>0g;hV z_emlej|x}0WnKkmXhEysEWK64H+uhwl2?nw<>FC{+w;pe8MF9V8QS9#Cuf3?S!#en ztB((~izBTJi8TjC1c4D?SH?2!h-FXDQjcMorMA-bo!C+TqbelW-Xpq& z@~1c%%#tVT*|xWQuQ(UR){4q$=H^DDo!0*RI{uvF=l8x?`#%6W;(5|tj2u`10000< KMNUMnLSTZbb6(#7 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_effect_title_tab_bounce_right.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_effect_title_tab_bounce_right.png new file mode 100644 index 0000000000000000000000000000000000000000..ebdad5b57269c9b97bf265df246ac869ed5e07f0 GIT binary patch literal 3946 zcmV-w50&tVP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{f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d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_expandable_bg_bottom_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_expandable_bg_bottom_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..8247196f007b4494c9f51bc5fec64cbccd08a89b GIT binary patch literal 3118 zcmV+}4AJw6P)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=T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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} z00045Nkl@DO0R(dO;ayN=(SJ@lK##QXZESzeRxsx;B$>b6IUJ2_MmZV=q*H@Q_I65qyC^mCNi!}-h zW=^!4jmQXF%|?uw6W>P6OaPvI&&z4LmX69u)3vnkdpQ8kEK$#K-EuGu3aw@%9sx}} zm<9#MamxU10Du6%G|i$A;?BrsEyFO5SJzhV$1mgO)3fuBdE?S_E&cvB-F_Sn+oRFQ zR7w@4lzjq#TCE1#w%bC8&PFOV$!unBlk3R`5UIIPn1$ziIoEN^uaikiDb=wo>xhV$ z0H9v4gPCF5b`ihRzLh7Dcohj*G-=T07PVmNVtP+B>(^b07*qo IM6N<$f;jcapa1{> literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_expandable_bg_center_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_expandable_bg_center_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..b22f9c76f8dac7994e758d4ddd378da267419481 GIT binary patch literal 2908 zcmV-i3#0UjP)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!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wL5RC@IzYd&O%M8o@JTcc;8Tnhym8Q_VFM`G5K3~n|7W621tq=lU+26J06n{fxX2PWi2wiq07*qoM6N<$f;1PyBLDyZ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_fast_scroll_handler.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_fast_scroll_handler.#.png new file mode 100755 index 0000000000000000000000000000000000000000..f458c635bcc9313f2f25182f2c49d93c3760afd5 GIT binary patch literal 3452 zcmV-?4TJKDP)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#CDyyGyQd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+_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} z0002YNklG?Jok+CrK|+zi-P&+Xh1nTQDoq6aa8(2qJUHZI{=kP-@Y znHwqXzMTf(bX5~i0O!JAogiFd!zTx9>ot82nE<@McB&2>Qrj+Kk_t^-dw_6P#pMrL ze3OU4_hbRS8-Q=whEA}P6Lb|ctYD>Kv2o?>)NBzrw#>iYGPfd*SSoYtt+fE6uYU~y XWLn+gLjAeF00000NkvXXu0mjf#B_w{ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_fast_scroll_popup_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_fast_scroll_popup_bg_ef.#.png new file mode 100755 index 0000000000000000000000000000000000000000..40f2e8701ff7a8f0ec2ab179ea5ff10c3da38030 GIT binary patch literal 1535 zcmeAS@N?(olHy`uVBq!ia0vp^av;pX1|+Qw)-3{3k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlv>1qhnW#Q!N zX5nOEY2a$&=wxbS2Gi@AS6q^qmz)Z-Hxp~q&Aq%{;DFibEv*c5!g_JNpz`jJT%3gJ#? zr^G2GUE_Vg$7y-$O7LPS^mPrSl`YTXkHJ9y{1#3mW$G+}Mn z>s{Ah`#Ps=yZzSo#yW=C4N`5pT@;sYonvr@t^0l2=E$4xzb{|-v9|H(9R1wL`Rh5q zCi$vOzF`-rez#EbU{iD%;M7CB>~jSz)uzY0ZghzuvntajT0;Hrx-G zGy9XGr0yBbL?6rWcb?KfBbNKRhAm0n`&IPPDJ+74u(0dT~!P=ub#12u8>{acmI^r;91s86$<_Nxa^CWt z&%Zg?n#@%{%rWD9?GaU>=^d3G>%)4cY_qxbp|V!X>W$>ijmo7{oI77;Og5p*UGt5uTer+HUKV0-RIg~(!*|uDzmvuO{y&xa-@Ad4 Y;qYngcaioDTR}y#r>mdKI;Vst0FEU$ApigX literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_fast_scroll_rollover_bg_line_focus.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_fast_scroll_rollover_bg_line_focus.#.png new file mode 100755 index 0000000000000000000000000000000000000000..95d97b7c663291ec3813f8ca6f3872afe2aaa1cf GIT binary patch literal 2855 zcmV+?3)u9DP)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|mQc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>TNVk>b{*=A&t&Vojm z)RAOFL2L+{_I%_DA~(D%WHMe|qkp~{PqrJeTp*oZB5@0al~3d-}nG?CsuMkI`0F*e$=KjBilSUi9Q1W X86652u_xYw00000NkvXXu0mjfiOy&7 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_01.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_01.png new file mode 100644 index 0000000000000000000000000000000000000000..4be8d5b83c5ca241413161627c6525c8f4989ee6 GIT binary patch literal 1442 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlv}u$2VQ%JTY-(ueYUE_> z=T~doO%TiO^it=+6z~O6^iN$^kH#c)512ZEN zS6u#v=uIIf%=Ced(FY|Cq{IRf0;WI^6Q1;e9C+qQ%>(9`B4E}KcycM9fr0Uor;B4q z#jP!22fYqE2;}xG3E&Z766J1E5UCQ_Q}N-N{l#Ya2l78SuPs*Jf1tbmq3;JZF>ThP zP78xNB&K}R-E*<<=6c zZPZlrUA0B&k8ikV<`T!clnWvM7N`E2``cve&o>O3!Ex7AJ`03)mNI1S3_qWi$9UXf z^8=q6)zth={Xdx2^B>UM5WPV>sdRlv!U?sL)Z=Ee;*Ls5I!{`a*p@`ndik@FaGU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LnWt!c?C6H+ZnegZ`Ufq*igR`P-m#SI1nim6bQN+BZ@Vm&9(K?Nt~#4J!i^azY! zVt5XYTBIxaI?05{p00+#`W=pS!<@L5C^=PT z2=Lkjo`qNPOE4Sg7uali6{b^Ztp64FD%bmea)!#zpwZ^|SF^;n}8|MD!BJq`k5`@`Kjhws+JZ{0mTpRw6bOtoHlvvX?xwUmj}+lHhs zLP?A9#l4wiL2A`Ne0nG?9G{ucaXsNFczW}$(u0TMjS73{+)Qd))?ixO?9okmi`oN| zVDF7^UYG0C0&4CUO6mMwA-*`hJt16F`qki}mu{8aE6E#}2~G({d2ue~q+)nsdi+Xy?$TS^jL`iH&)@w$Wq2X+{w3tcoV(Q2#7DZOZ{As+)((aH znU-D3<`!-4QgZ0(D7B~0J~{bk;tSt-!oEn->?LDzM$MVtK|D7&akc1&{Ji&C%RB?i z`#|GZBY$*;=(~V_a=KS>TA_dC)qDAt1#si_ZO);OXZmd8pzoR6nUP;VaDVvjb>_st z)5p7>bX=}@$XrpRubgXa+CRdMbp5sSj=L!iYIC2wJReq^kNyqq))MLrS<(DArQ!1T literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_04.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_04.png new file mode 100644 index 0000000000000000000000000000000000000000..85f4c71c0e776bcc970a20239062cddb7d200b1c GIT binary patch literal 1421 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlv%P3L>2y9nDQ(dOh=sOA_;vQ(^XI0_}zBHN&gd%DE^tu_V7JBtJg~mI4AY@=NlI zGx7@*oP$mE3>CsN^HTE5i$T!?@vTd0QD#|cid#{Bt^zoGtunFLZ{g-?JgIrW98(0$8kMiEePdu?-0SJ$7*cU- zOXxwb!wv$uy($7cAxxs&OPe$*1X$`1G|N9&U-@!*h1h$zd&7Zz)ef^Z6b?+Gs6uww6?fdzbTcc5n$64JmKK+8j zg1Nm73*9GpKVVkzj&G8%U`>hW>N|6USz%+1s6u77@`ZEfXFAHt&i9R!GxRpz&*J$` z>B3~aqbah!4+9rXkUX9y>+!0zI_Xh_#d+Jgvp?8PhK6W{J zHs%QUG-L>Wa{io4fzJd&jVFZ!|n<&(ZTw^qccd7VW^-3s$F3N!O5ia>p*?*3aE1lI~or z)VZb+uCLY77rc6Pp0VuD)*tq_udQRY>T^wF^^P#TQ?hbvy5%DM+j?^vUM}mKEEPF@ z;>4dk=d|x@U-o#n!!@+)Z~D2uTd$oiY+fSWS#Ez|xn}h1rTe{qizYA_FJIAr_Qb^J PpaRm<)z4*}Q$iB}M9KM) literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_05.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_05.png new file mode 100644 index 0000000000000000000000000000000000000000..819e0db25ff05bcb8e1df2f64f4e83b366f71a10 GIT binary patch literal 1441 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlv}KX>Y-(ueYGi5V zYU*liW@v6|=IG+$YzWiqnO9trn3tRivo{lHFI2B9UcFY%MX8A;`9&f5`8lu@5Rj2y zl3$#WU!dR|Y^rCd5T2Qrl3!j7iXMn>T~doO%TiO^it=+6z~O6^iN$^kH#c)512ZEN zS6u#v=uIIf%=Ced(FY|Cq{IRf0;WI^6Q1;e9C+qQ%>(9`B4E}in&Vi{z`%IX)5S5Q z;?|Z>Z!cy?0be7d#)Ahu6p|DK1ex?$wl{IxHdQd}ZQN0^-2H=EU;gOz+y6P_ z-72rmbv%<6b~}j4UQFs#`{)t4qDy%*ze;zlXjFyMx%PSIe1H9#vQLePFPEwE1B(rF zxkL8cFqb3tQX=LjgdBOkY$=$2p!-qO{ht#&=Bho(U&$t0x{rAdQ@BI)^%KkVK5*=@ znlt^2&Cw|Sjr%5qt*Ab7uc10Yen-IZjar7Q&T*Y%5wD-PNFlv2+_UA4V{r}79g!=C zBCftun$GKa)v{psH=Rpj+_GLbsdLd zm8PqbcfA$U?R|0FRorhu(d)j+QCsztFF#|p@ULC(bGfLRH8xeGZ%yzU*MLn?+r7^3 m`+8~qrwzqIIhUR>@i6STx^#)|6)ksAq3P-B=d#Wzp$P!P3jGcM literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_06.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_06.png new file mode 100644 index 0000000000000000000000000000000000000000..5b5c5490487b45dab7674a9aad42429aee1db1ca GIT binary patch literal 1442 zcmeAS@N?(olHy`uVBq!ia0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default/00_header_process_08.png new file mode 100644 index 0000000000000000000000000000000000000000..6e311047e9802db57b2cf7b9d3bff5209fb1db9b GIT binary patch literal 1447 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlvT~doO%TiO^it=+6z~O6^iOqgDH*+HcGb0mM zT>ggWO(7@D^ns4i2PF=q!~zonra%xAp7ennc;-pX1Ll|_VAgPZpkv6uz5YhX#IJwnLB>4?Q@Jj=>FkRtcwi?t78C< zh*o3A!Jz$(`KL=>s;$1%xc=<{zEH{VVAJL}a?^4Gv$?6`safU|p6p{0da74&`h^~Eig&ZvCuQqN1y z4^}j(Jl~~SZ|1l#h&RNIIj(>{79g;~7&v?ibUe&z3uteDxI zQY+6GP1~?REq{^UZddKsFJjsKx?e8qn|mv4>owt0p69LaCuT)ibEZ1HMA tmax~`u5Qkk`(^3w@^#^Uzu$rh48=Rc-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOi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 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_11.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_11.png new file mode 100644 index 0000000000000000000000000000000000000000..6c5bfe482536066275d23fd044e150cee9be5cd1 GIT binary patch literal 1421 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlvvu zdQ->=Gku_A^g)RODY3wWfGH5fgeQF<2cCIS^ME;~2$(f?xh*$kU|`(q>EaktacfIh ztk+=&fqQ0?925gMLv%#AnjTD^{y{13IQ#hp<{vqJDJh9?v3fJNda3ds4BFoq`NJw@ zvhJnE^(Wt@J)gaQZf^em`@4fr&HQtvR5r@LVWHDK;|GF27~~pE1D0mq@)HQKVRK8f zV}I9B94nlY_&`YIc0?0n0qcgyM~gIOysAj|D4sAyA+kiU<5Tw611m2rwUZUBVO)Qp zwMy}Rzr&=4lyh9a)pXXxtof<(R44yctH54wxsrVhCpBCQ6rU!!-ds>|%OHHU;=Z6` z3ZA-+J|e&NU3^tAk%ceu=E}er1$GwaUv+|k_dc^tS}Rq);Ji@ClUIQ(TK7J)B%Ye7 zaQ%6C`=i@^rFtD#)GXcFa=T}7>qp-9-NChf5p$6lV{C5ePa4g zo>SVp7j`yyzuUBURn}X3?c%P*9CI}9_B^X=l$YPO&3k|OtNpt5Ogs#X1^stK%6c+D O1*E5|pUXO@geCxa3jLV? literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_12.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_12.png new file mode 100644 index 0000000000000000000000000000000000000000..b2d2884febb6449417366dff9ba2e62d3ded97b6 GIT binary patch literal 1431 zcmbVMZA=?=96nyQ6cQ#8CWDadyjeAb-W%7Jo)l<%t#qT%0F#c*)Y2aGR(eqJn-Z7tvKb-UhlydvD^TCKhuQqTj*OfX>C0)1cYw zsHBT%hpVpoTRIB>qAHjYn`pD-lTOYHJ3<&Z;Ppvt0LaP-_#93TErR8ACBtf=h5joL z$hfpnsnUX4dxS*VDFe^Yx2E4TB00Z7CRv-gfXvHom%|qJ= z1g=0tj}}^W%4V^G29BpeC5$SZs0ssB1dI`=hR~#gIEtYNh9jt2fuW>QO`;gM_CS&v z@2Vh+DASsjw9-OuQS^}r;`jSue+JC)l?bNMXb==fa9klF6ha*gyX8h9bk2HA}6>xA8066!WdY}urAIogvzrT zEk*N8E$uS#oEKclFUf46pJ_6waa4s9#{Y_YmFxOHIYT68kWh2{t69QZQU`{n>#Z*> z)-MmuN;ig=uEyzepD_RsF=(cAC4pOgyDhuE%1x~5Z_Rz)DoadH{JMEsw>WbtY4q10 z?f2|s{nn9%WbfAAEQ3;-|Z&GIGj1 zzYIi{MLtT6wBvr+KxCmVJ`i*N#e=Dlch5)lX&;Q-RxAShA`*_K4IW{eoH=- z_ul@!qc0b>ZyD;Din_aeI+wI0fy?v*0iYt>!p$|3Var1Z7i_Dv^ f)z2@CH%4y*2D?tQD=bZqL%&M1v4Fauf1~+tmuCZ| literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_13.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_13.png new file mode 100644 index 0000000000000000000000000000000000000000..c4bee90c9b4af170b0d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~O6^iN$^kH#c)512ZEN zS6u#v=uIIf%=Ced(FY|Cq{IRf0;WI^6Q1;e9C+qQ%>(9`B4F0=vMgz1U|>As>Eakt zacfKHT`wj_k+|Ct$(aWQdRiPfn%-6Q=e=TWy0_q6HM{)6yxp(#_MCQqVI{zF&_lqi zrMKXgVibrF^;T94-_1JY8D*-D*EVNs_4_G`Dz+2OMe`B zSNr7iyn;tI{esJUgqGCQu|)jm+0w9X>%J#`E=q5Tn=C#&+b%gz{8+7{z_OJUYhP(` zO`S9Cx#H~YM|^od9=Y~M&i04uCYzb(Egb`ceCsEkai7qAB;~(C!Poo={EInbnxe8* zV%wH0N<9g9o}gu?mLvUI!~dvc_TL?A#Cu(2uZKR4R=f5|_~X6kYwKd&eOuF&+cpHu z-LAH5?&N)2?wJ=P?TY^HvwoG7+qyH=0dXyTKH){|+N(}&_`hd$w2X_u%1djz^6$(1 k65iJF)VY50C*=bSyE5l$PMqoM0xB;(UHx3vIVCg!0ObV<$^ZZW literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_15.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_15.png new file mode 100644 index 0000000000000000000000000000000000000000..6c5f2e3e2850023d4bb28e751a296357bcdf47b1 GIT binary patch literal 1445 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlvT2d@Y-(ueYUE_- zV(RSVXyW2xVrF7y;Re&|nO9trn3tRivo{lHFI2A!UcFY%MX8A;`9&f5`8lu@5Rj2y zl3$#WU!dR|Y^rCd5T2Qrl3!j7iXMn>T~doO%TiO^it=+6z~O6^iN$^kH#c)512ZEN zS6u#v=uIIf%=Ced(FY|Cq{IRf0;WI^6Q1;e9C+qQ%>(9`B4E~#%~f2)z`%Ib)5S5Q z;?|bXXs^Q#BEG#oiV^}$qO6VrEdRe;wvTPn4w(KxD5mkgQc(GV2W%|j3*zfIjy44t z1_W>kHZPplo&KuS7Y+{tS}tW?SHU{hszl*5@($zsVc&(Y|E>I98&M%gew_p-+_0@nM2CfM{U3p~$0lOQ5H zKQ&U%zcZnLL)ca87krJJ)l@-xrwQE#oiBx!r^m|HUTqaNy1V4jw=Apa6Q@?PpEJI%ec3CouxC|HoBp}|H@X!H smfQ|`Z&&$}-$Ln?{@=`7(;1iFVdQ&MBb@09M)tCjbBd literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_16.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_16.png new file mode 100644 index 0000000000000000000000000000000000000000..9770265a638766dd422ef3e9daff02d857ebe0a8 GIT binary patch literal 1430 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlv1yU?Y-(ueYGh$- z=;mT#Zfap+XyI&N=nB*8nO9trn3tRivo{lHFI2A!UcFY%MX8A;`9&f5`8lu@5Rj2y zl3$#WU!dR|Y^rCd5T2Qrl3!j7iXMn>T~doO%TiO^it=+6z~O6^iN$^kH#c)512ZEN zS6u#v=uIIf%=Ced(FY|Cq{IRf0;WI^6Q1;e9C+qQ%>(9`B4F0ISXVNafr0Uur;B4q z#jP!&(O%4s0zNS_47v?Urevy>sMr9ZtUPb=#g;r zsKDxl>6+@+HzQSfr=Cq-wrcnCOTqCvVp~g(E!&e4`RunX(=CVK`^OK68?f6oa!!y+ z-osS7a)E=xiCqrr3MVB$a7~O{(U7u}zaVO+(9PE9C{cH&iGed4Cdg;7R+jzJSydFh zddq8d0m)x1DHjEGr{zp)5R+VMvF*3Qr1!TMwAw1kvrW4F%{KV=E{_{KnB49v8HSd# zup5bm?`0N0AYAbC^s)}Iweq1`s<pp~f`xnr2sxBO?UU^ym`+f|y| zz2>PMQ|J2z@dq&{-#6Mm@Hw&aZ6)i%!o`ud1s+9jQ;Xd9QM@r(Eo}SL^Ga`bE6)D) zXv&;zZ^Ab%pO>C@dCLJ`SHrIptaSXpj&E__G+*TGqLyW8w`ZM?Gqk+7w5~K>6D#)mL-=hzY+y1DLq~NT-G@yGywpQBLT$# literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_17.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_17.png new file mode 100644 index 0000000000000000000000000000000000000000..3dfc39c941535139abfb5881d75c79e063121bd8 GIT binary patch literal 1419 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3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)512ZEN zS6u#v=uIIf%=Ced(FY|Cq{IRf0;WI^6Q1;e9C+qQ%>(9`B4E~#*nKsCfq`*_r;B4q z#jP!&fnJ9l1blsOI2j0Vgy@KHH9csTpLax_|BkI+)vTdhA+v@vXKFY@+_Zx(CLd%bbi}AmSQEoy_S01BMrix}S}pwm)!y|D zOC*#wH0Rw+i1vNC(S=L&xCy^U+2?aN4zPO1Rj4h0TAh5_yuE3v$_9O-nspat?=gyQ zj}S3GA>TBmH(vHpc}bw|XHTZHOXP%>*tDd2SumQuczmMwcE_{)a--~Z+H#EF|L@vU z`cTO6BSS@>Ti6eiFwY}vmf1|X!|A*yq1m(Z(B2f~=PXj3LG9gfvaBB-JAYQYzQ*vR zps(70>3~!f$L{l|1%03Q&fCabr2M_ncVC*8nDXS~Ien5=-Co!J`pjAN`%qZj;kxI) z`(6tOANPsu^j=Y&x69|tnub@}*IR`b-N`v{Ke$kG;@M)4b+zk#Hr-izIF#-DeBOC0 v4oWmRM3kSp_m{yg^X8oC|1=+mH!w1sxjZX<@tlA2L1m$*tDnm{r-UW|ZENqS literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_19.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_19.png new file mode 100644 index 0000000000000000000000000000000000000000..04cca499294ce87b5640c0065d99c33c13d39b02 GIT binary patch literal 1419 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlv|$i;>||_d=>*g3nO9trn3tRivo{lHFGR1Y8(zIu&PAz-CHX}m`T04p6cCV+ zUy@&(kzb(T9Bis*s1Tl+my%yz42m9zZ(UN0GRsm^+=}vZ6~N(Zm5IfE3pY1&BLg!d z6IWdRhUiTpC(QJLj?o7t4y42a69T3{5EGvCfgE_|NzDW1m?B`-*zsXUGy?3in{hZD8@Kc4O8-N3|^?4#@GuCziyAXz!# z#lsZ7ng*5csvQm04!c7yO$gn?@~dwxk4m>1lc8N2OZEGTwOyaO0;B$ldR($%3Y?{p z`cdt($Hc@V6aVt5{C=-D(0Hz`>8)+ z!58u4U#xd$yuDS-$tC*AFiDwz;<9~e8(4qY6c!XO|4~1AP1kLe^Ly0JR6e@qw6(@x z_{Rz54>UHyxp}O3Wb-Mb}BEs z!<6i{@uJ|75H1Uo%F|-JJErEUdD&E7jaB)(J5;VU_cr^n_AE!eyOuXr9g_0YTX4`x@ueqOzhvD_{O&UL~ Rc_xF3M^9Hjmvv4FO#q+<{!9P> literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_20.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_20.png new file mode 100644 index 0000000000000000000000000000000000000000..0eecffd821ca7fab8e616697b35bc48ff232488c GIT binary patch literal 1444 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI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zw9Pg3E0-uNdY%%ZZXx2K#6?j4Bb>Minjn%kD4XIM$6rwg}t5DQ{TN0|3hw53M(}z<mNS;AX#2Zp9AtuHTD zE)UDgH%64NhPEPe9{@xQnJAszcl$!AuJDp2-jy)lRC(HB$%%`Nf zsmSE#B~2|83&8pT?=AmJ1D%y|5tS=stS{5QmhV3{Hh8M^%+I#!cRGbN!9dil z6AfGH?mFh!?FY(U&8Sc7*mv<<-A>H9P|=avn(jDT)|~i$+sSPk9$y-*>`5h3Q_?c( z`1xnC{nW2VS|jtnRg8i6dv#Po*Nqz7+&-@9dcghA|DnIEyKwwto8#oJUu@mwXA1IX zwz;c{cTGI$%9uo2)a`@*z2Q;ioNl=D;N0SCkwM36^}po>Ak6$k!Mj! YKxAHLRgdm+d*~-=G89u^kd+7i28K)p;Q#;t literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_22.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_22.png new file mode 100644 index 0000000000000000000000000000000000000000..019d01a9f3df0d66a531e30b880481a738a06bb0 GIT binary patch literal 1420 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlvIr5|udFowz; zk883EeW0))K{!EVLJH@e<|RC;3v~P$W=?zPaIH}OM93N@mD74mTy>{JO>Ta?9Qu?o zJo9h3LgWvQ6E9;dg3VkVx|7yfY`x#OE0XJ1+= zi?q?bf}kLUdXBb3^*ej-MY?9o`U{6Fx{`Y)Om3m?OqC7Hzy3TwrhD~+bd$z|$KDC2 z&Tos1@ZQq3>kZcq#B S(bqyy`RM8D=d#Wzp$Py?<@)FV literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_23.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_23.png new file mode 100644 index 0000000000000000000000000000000000000000..e881650642f46b9308b1cd7e5bd2c484422dd432 GIT binary patch literal 1435 zcmbVMdrTX3952Fvpe$n;f)e#S7?Xwe9`r#^3if(e+KsXfii5?B9la|(;2ygkv^=7~ zzztmj&fvr_0-6zmW@;RYQL@1@7cw{4Low(dFcYQ_GI56CVm7Zp(LZp1c*))G_4#~1 z-`DTjocX!2F;B;+RH|6JjVMsY#NZnpseEVrrWIv)N+yftLct^ZDTz^;X`ze(>>O3j z6fhKBdw875QmMi{tgBcqcI07hfzwbyj3&T|3R|Vh$_a>+yONQCGNzp6P2ioc&Vc|+ zo51}#2ka0njF+|5Nlal~zRO)#={C|}PBxGgz!U=*Ds2n-=81RK-{jOh#*i~#EosHjP_ z2P+_~>srdn1bSsz#30D;_iOwa8bKD(@Fa)GO70#l6a*^XV0$H2DGF6Z2<~c*;bl8v0+kaD&C-|_CUKk~ajiwG zB~b*yEx3WeGxVf|$S`XWUC72}T&vY=Aj}3>Z_Usl2#MmP-i*VDR*UOM(u~3(uATSE z6z^t2x~!tR#?@ON$;B)ZL&<{V5`?Ny2ROZgEcm>F2v`br8U)zS^0eUh1A>K0qxF@=#^qsn z<;FHm8F53ySD=>Yw$g%r^a~q#j+j^+iIdB$uGGdf8iwk4%f!7cA<%)~= z6h9wV7e3MoM7K8MfU}KgNSuG70XlAZwWo7y17}OUdu8HY>f#m8jp@^iOYK9S&)2^6 zOFa0>(H02LUr9-6`8Ki8J~MOP-CR4K&PJ69?zNuWmfwH;``KgANT&n8#|`wx%=7 z%x&P3Cy(fT9?c5>Got*~5iu$!wf_3(LUvcabRn{+q(gHvZ5i~Y{aSNzL}>V<@S|h* f+aG8aa~s1{^FYtg>GyXw1%H=zGM_kuA8P&^Qqltt literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_24.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_24.png new file mode 100644 index 0000000000000000000000000000000000000000..94f3b328ca3d8b74ce3fef18948898bbb5aee4e4 GIT binary patch literal 1434 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlvRr9Yk`aI|X<|xJ0>I8x(d3uoS+Re{pT{VMGxM+f;d!D>USFP^G4f=DIo6g<+iP!aK6^F$YmT&!h z`~6q+-D>N2&f~@Pgx@iGjr`ih<*PCl{mpEOS+c8d=NaZHn$uX;ImZ9D*%5s8Pm{um zjX#+x7$$YaS=_#+wQ5uH1D+jms!OL$hzeC>?hB9G%T>8)KC5HgBDGw9mqR(HbiN7t zxFkPPRoO0+Z}ZvjKigk}SqDrtB7;^nX6(@O509BJe;50;pSw>idavl=d1>0&w$C1K z4EOEU5Vm@^B0BVz?D670vro>3|98FF#rMKOXlAO;LXkt#$AcaA?bKW(KmFtuMH#-Q z6WPB>Jmfr?t0`w$ubJ|1(cIsBvvy0itMdDvk-Pi(JHPyrbc^%hm6N|V3+-O4FLOSI iVQT+BwYT97j0{^`XI{GcYtCy>Y3b?e=d#Wzp$Py8D*qM$ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_25.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_25.png new file mode 100644 index 0000000000000000000000000000000000000000..7845535fd65ba66bfafcd25eb9a61969d9455672 GIT binary patch literal 1416 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlv0)VOU~FXRYT;txYyi{inO9trn3tRivo{lHFGR128(zIu&PAz-CHX}m`T04p6cCV+ zUy@&(kzb(T9Bis*s1Tl+my%yz42m9zZ(UN0GRsm^+=}vZ6~N(Zm5IfE3pY1&BLg!d z6IWdRhUiTpC(QJLj?o7t4y42a69T3{5EGvCfgE_|NzDW1m?B`-IO9L9iGhJ}ho_5U zNX4x!p@Ck99R#-aE)n1n;hHMO+@$a$kfWke?xb`D3;%=6J&ylb77A!+@QN&I?BG^B zcOs`kc5=>|l82?2Q_Ak`nRzlLAoS`I|4k)1@pd?4(j{U~Hw26DywR5vM zbUc-cQ}<@_zW;7nQcSFv)T2QeoXmbw@H4-~PvU1DYb>v+t4CLRW<`5mQ8zQ^~2 O%0^FDKbLh*2~7Z`?)m5d literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_26.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_26.png new file mode 100644 index 0000000000000000000000000000000000000000..aae8a8b3bb4ded7579f2267333e12645f1e57723 GIT binary patch literal 1403 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlvEvu=Xzu82=myj4nO9trn3tRivo{lHFIcaon;TxeR?bDKi6!|(A^G_^uoMuG zkzbNuoRMFk;2dnKXQ&XKnU|7ZUJQyJh;Lm|i!#enQ{0O3a}~hhYn6$`ehW7@b0Y&Y zBNJC#{)XsHAt%iAfsWA!B@U#-0uutJKoAq2^no0B=1I*1=9nU2)^KH1xXZx6xZ2aj zF{I+wme5?U!wv#(+m{INurN&(>t~ZS0_-U!{CzQF!ACtKLOMpZ2iw)Dh%D3DR%&pHW{hI7j1DqYs zEjzHod4lB!o=JPO8~Nuj8|fVGdvh#VAz)w71fAO)Cw|T`Ua{!$`&~Nz7T&w-c_$rl zb(p>GNLrWL+W@70<8N;*Cxkp_OM2{M;csQN{b{wx)7eT1{=ygJ1?|(<^qp(#FqfGk zaze~esY)5qWZZNww z^}#G}$@h~kIe4s9Pq~%y-ES{fWs$vh(;_$DTZj0bGkT}cc3&-T|~)&Vn( zJdMz60rNIWOwhi|T=Y+6(+tZ$HWqV!Kk6wwyC~#^MNsfoPfL-XOMmSBQM`ENQA_`0 z4a>C!<1O-bd3@Dz{NgHnuuc7O5C7!FoCU{TulIR%)#plUS)6-vl=d#Wzp$P!} CfAkpu literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_27.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_27.png new file mode 100644 index 0000000000000000000000000000000000000000..7545b5a64fb3decc68265ea106f709bcca8384e8 GIT binary patch literal 1419 zcmbVMZA=?=96p8thHmL580QB(4we{a@1?!I+>H}@z3b>)D-;$m6ZL4X<%IUSyTcX? zb1VT1;&7rv6lWI*L5zEGFIkw|Br}Ul<6J)wK?x8Iz9b5pi!#PGuRzfcxDQ@(_kVky z-}8I>UrUj5+q(2e(g6TiXD?)2>iBT{O-oU~lObwO9X2U!xl$r}l@KTKfW;$L@}S+% z`FI!4dFpl#^LYS}>=jDOm2$@p(k=R7E{=i2{-DYRfV}*0kaJh_3Rubega8H2oV@^n zf`@|23=Y&0wDMI#VZFqc)H_Sv_0?{|1LZ#n=7mYsfS*@5Fzl}h$Yhv;7VVPiJid)U z;37n+rl2LK${j_ZRg`$p0HazrYQ#Vz4r4e<;KUQ44#iLe(;=uyi=m{!M4}kD{6MOj z9i_BE7t`SF02j6ISC64FS{in zs0d;Jj9cU?#ae}eR8N;e@CO}^6~h5}IZj=i2;MxPS z!Uf!XLRV0Am$+uzJ-MV+;yFc>N=30I(E&wOq9V#wVi2^J7+?%669OJFB*)9M6fMI` z!b`lzCW(G?j^40|Kto&ok8Nw@vmk{Y^fa>pRTmNx>&h9 zd_cW1l6o}`Ja9A{0Futy8B1w+?Bvdh?H3C)r(f^Yv@vTkTO0R*H!QO$Sr+ljMy&oRfk=GI3a5xJhukVdzJhi4G+WyL(GpC9d_JgzL1?IBM z|K8tpuw|5m>oOdZTKCl#tp~n8?EENu&FGdU0r!tUaR6aAWo?$!_MXTHdP z`MlZ*?)f{d#>I?4`jD zZ7wl=Ir9*;Ypf{w#Q4{9t?zFgefF{AcWz`)l+PP%pU=kf`xeqrfIa#4r=RpNN%7yK Mopmxt=oj|=4eHSVi2wiq literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_28.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_28.png new file mode 100644 index 0000000000000000000000000000000000000000..5730de13e8269d773437e148f49d83ee04af94a9 GIT binary patch literal 1429 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlv};;?!UX%RlnZC`%m-qrq|UD`+VgdTdMp&wq5^I z&mMzgB}`u|o5dLT%vAhsJf1yy&ob#ZlgpFePbP(RI+Q(9+ce2cb;3y{20l9{HeTzV z+{kwd-q!ZY6SiZ?c8vYfh{X> zwxjGlw;t^YlbB{Q-w^t&zWRl%)~uHmQVRrDu1hle+;B?7o8k5X|Kmw&g>N>hr+k)f zIM968_UC49mc1LqvP5^j5jkgC7r88rSPL=2<7klZ3MXtWHY)^m4V|=)S zJ3&oq@%b6iJ=f(#H~!LJDZi9$1Me;2rB=uPx4v0v(`lh_zl2}w`8vi^G5!pyv#>o!8y5imMQ(bX!b|waqo?eU(2LdKG58#|1WmtA+0$* z>L;FXezg~{HVv6Raq7{hWvX|O=Rox4uT3wPgg&ebxsLQ0Lb$Hm;e9( literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_29.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_29.png new file mode 100644 index 0000000000000000000000000000000000000000..93441db7b1cb6bd6a7f9a09e7a807c74db975b21 GIT binary patch literal 1440 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlv}Kw0ZeZqSY-VWaYUE_; z>ga0d?C9iTVgl3anO9trn3tRivo{lHFGR1I8(zIu&PAz-CHX}m`T04p6cCV+ zUy@&(kzb(T9Bis*s1Tl+my%yz42m9zZ(UN0GRsm^+=}vZ6~N(Zm5IfE3pY1&BLg!d z6IWdRhUiTpC(QJLj?o7t4y42a69T3{5EGvCfgE_|NzDW1m?B`-@bi-kV_;ys;OXKR zQgLfbXs*{`2Z3B^PlX5#5iKzmM*)!*Imi45f`8uX>&iL!KM?%F6SpAz!+Zr1F4m(C z20|S>Bp&hX;e2c+@4b+Dz5K~{dwy2zzO37|XtU?-NBqe?cdPpiRK9$)R{0}PbjVy$ zEoI;P>p~@#&0I`nW@ zH1eH-cci@V$whq);&WFVmGONNpd>HZzNz2iRITmS0)NYR3#;j$_OANWtC?_L?ZZN` zZ7i<}%(^Vx1ELiEbFgLoEt1{q?ArPEyxNJ7Rj+5HybGN9YnFr5m#Z6QHd~Zh2=Dr- z+IW4_#JT4iJiYagFh#rieq%U(e$`CBYr#RQPd}Mg(8o4!rQ5n!p(lm^>Tqu2GTj&} zur6lK;a{aJomo9Pvlf`-T-WfQ-T9CA>)|QaO*x9DWXQiU-m_cTW}94kvfHbsn$6V{ zR=3wInjfH7R`dFS&5=;$i^oID16gGKIghu9AL@0EwD_d_wSJ$`#WmCCpLiw|$f}W; z7JHT1^z9Kbk=ko!1vVCP*XCR~Amyg?dFR_bnJHaQ%Cyy{zn$^=Z{pk}^`<`6yAHO$ mk6!REbT#4s>w9ZH12cn(;{wmR&hxuLWu~XApUXO@geCxuZ2yn| literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_30.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_header_process_30.png new file mode 100644 index 0000000000000000000000000000000000000000..8e05398c67c7b81e9f64dd1be9dadce308cdfddf GIT binary patch literal 1446 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlvIT#6nO9trn3tRivo{lHFGR1g8(zIu&PAz-CHX}m`T04p6cCV+ zUy@&(kzb(T9Bis*s1Tl+my%yz42m9zZ(UN0GRsm^+=}vZ6~N(Zm5IfE3pY1&BLg!d z6IWdRhUiTpC(QJLj?o7t4y42a69T3{5EGvCfgE_|NzDW1m?B`-xDeB9$iTpO&C|s( zq~g|=P;W10M*&mGnFk&?Csd@1rtBAfz%9W%{{X{@ z#}?nXLR6YGnVhaM&0_THYcTKVabi7k+Sg%ssz(a{Is>iT+Kw-2oE$&Jlr{D|{=P*c zTym+ceS^m{;R(*SUu~$k% z+!f6EP~o$@r1_7~iq)U@R{okBYf|zvrZJ|~s{iH*}D)?65lV- zk+w(U2>*fDnH<@PYoC=(Jn!eBlevdg?*HV?tFlbZg%tNN>ixLG$QPpc|J&*;|7)8C zPRvc({_?9G=l6!w4DG@54+MxloA4xeSu*<${xcnK>zk`2!X3CuxMGYaX-`Ubynb`W zGN}pc^LUS)`7b#Ce8b}lPE9rsS8Tk;Uvv43OvS^TiSynC?Kv~6E9MO+(@uYdM?3sN zQfikOl)IJ2=2~aZ{C019fl}3#4|lH2+T4>fyL{{O&0))OcW%|3eOgtl|Nh))8I=X; sURmqy-p=-}KOz{o?~8b*JrfVZ+%;?7n_ZtK4k|f4UHx3vIVCg!0B@xTr~m)} literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_icon_Back_ef.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_icon_Back_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..ab1b844e4e8909dba083dcf9884ca3c2ade0eb8f GIT binary patch literal 1984 zcmbVNeOwcD93DcV6e`11$n-c7HDS9uwu4P3>%(1cqm=Y#~Be zEax zO6c^F*%T3%9TTs~&d>;OFmy2xViPh1MuNrwo6%sh2yG(pF|UxBJGQwX@K}V-5P_p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&qR6 zCfBVvrD*By1`?(9FCIxtOY=9Z-LC3Q)>$WR4tZs8R&qkZG9rTg@uiaattvb-^UAxK zx1zyqc}HjFC%xz<&ui9#o2sg+oC*2VeHF1)@%7sVLMkJc{<**LdW|8XEI(tdM+`0> z*jd+Qw;xjhBT)?-mz@8sqWwK-^a@>)o^^}OzPe(*_E!(?@W|Rn>H|u4guD6B#+x^9 zrj$R>b@cd`E!vWM!Cl!_5n85sC^TGTK2ZIqZ`|E`lwF$ide!0Mti`Ei#J!NY@rsgC7oWH$=N%?zoEOPu*HM)%x7# z)*jGTvAwoEu6$F~w7P-9d9(i7_%mCQ?k7gweC}RQ)}5O!$NlNbDHoO){ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_icon_Back_ef_02.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_icon_Back_ef_02.png new file mode 100644 index 0000000000000000000000000000000000000000..700fa81c6cd51bfa1d6c53a95e520bae4bb5a0c7 GIT binary patch literal 1945 zcmbVNc~ld39#4y)3#eE{fzoyiim8xeCI`uo0Ldi5a1}y?JUmKBMiY|Bgk*q#i>MrO zY_JyATdG#tr#w_VfQTq7_`F!v1 zoAShj=((N&o)ijYu40u`NzN->&m0f(-PzH#hMfEfnVLw(HxRiRD@qaT@C+1CV497n z64mJPvbs0uT#?m@M+<(LoN(<-t%G@baRP z+N`<_uu>|2sf*l+sCt61z)WUtZZ0F2&A_c2nV>)*aLIrmI*Fj$^2~(BPB+_vW+X^a zo7QTu5C+@~xFl*a@N7avB`tm70%nPieABH+k)9G*l5fgoRk@MV0yfGd{@BnS(dk?}gNfX|kR5jIO41|c9Qg9Id=&jul$ zSdJhviFk&qFxv=?S&Po-HIRB=a3T5ca$&@ZY6#q_!g13~1tjWm0=MaL3xFi^09vZS ztiy9{@4M3T!doe7HRPZ=xfREN=kbLNuhGwz@;M+PmqCy?%;mR49>$gNr65}%MI=0l zfclcF`y(-9lEyGy#qoc|GIK;$plkW6^vTVu=0VM5$5_eMxJGXqCOfW6Ar-6a13&G# z6%ofn`BK9CAD^TzKt+p|8C=Ml9bHfn&fvK{uJeY%-edNpe;Hn?zX zx+gs&L%^Q()^80(zVoAi{)`adyT>2-&3SfAbxf5xJUra|Lj>M7-kv+=f5DxtE?llT z?BiUx``7dZ!r8wPzv!!nw!Cx5yNo~UBxO}p#8vm+!KFkfuBPp{(&`?PW(oI-xQ@;1 zZ2Wl3W$P*06URptbV};3(EV^;(RU2-~~tlgG<(Uh6_Bh(XU%xjBb z><$YKs%d|d-ZXT+-xMKTk)WpecXxMha>%u-Zx$^%raB(G(};79D=2$@h)!|Hleagp zA5TmqR7j5$Baz|Zo6;Ims%ICtm0jAL?Oa<~KB*V}^N@SrvXwPo_TIWx;L*IMW7}l< z>BWw~oTK}{?+Wg7I-Ndrzxq~>kY~N8JDSrPmOc9I$M#I4aryhBW68=|zt4)BD%U^# zYgGNW*KYJ2DMP+d+?5QzJ)NLjx2`8Po3%Vhx%K0iD)zav#U}#3(m|uq{;TWYJx3gw zKJ^Dm^;YKcx+T+Ju=9^DZIkYb3$FI__TWA(Z7m##R?M&eYz3vz`|uY_KI|RMN!qzA z(rbHZX~OE1lqwmvMd=(bDJe-+XvOrDw@OCO*2d~DPThC&l+8I%Uytm4%9>F=YEj;gAv#R+k7BZ2dxy#n5$DjRRZ zaTRy?-Qr$&`vo6Sp`blB|MN0n2qpQS>UAUz>T G-}YY%$^0(> literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_icon_Back_trans_ef.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_icon_Back_trans_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..19b3fd3744a61fffdff23261645d3828d742e17d GIT binary patch literal 1491 zcmeAS@N?(olHy`uVBq!ia0vp^S|H591|*LjJ{b+9BuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFsEgPM3hAM`dB6B=jtVb)aX^@765fKFxc2v6eK2Rr0UTq__OB&@Hb09I0xZL0)vRD^GUf^&XRs)DJWv2L<~p`n7AnVzAE zshOFfj)IYap^?4;5Si&3npl~dSs9rtK!Fm_wxX0Ys~{IQs9ivwtx`rwNr9EVetCJh zUb(Seeo?xx^|#0uTKVr7^KE~&-IMVSR9nfZANAQKal@=Hr> zm4GgVcpk{1iHq`zbF$JDTz5Q`N^fZsd*)yF1AWQ8NHOu6f08$3j=3M z6IU}6GbdLgLqiKEXA4&g3rkZs7fUB+10$Fj*z}rN8e5nr6~`kbKE6kf z9zA>WKuv_*vApmTzks^=MulBrGBPZ#7k({Pn0KFDbIKOq$-9^Ab&{*GIB{1sJ}&NF zb-4~llZ*9?=^4VsPICj)uS^N761updvVbit=k+J&bCVfwFW@jc=yIdxj07;#hG(cp zuyQM~7hbQ~=rbp&L`-I)-iAQ2n>xWCGq`dZ<2GsYWaU!XFtYU-B~ zhGW@xjXBrwubFIoV1-ZkUQV0aO08ep4k#|Q)Lr-|^;*ity9x3tr8cWnXFNJL;f9F4 zbm(`R$fF8OTPIECjhs3|VETF+X`XELKbsyz2}`ed&baK2K%4%7m=~u)UdA47`tR~_ zM~zF?XO)K^j{`5z;9xhM0si5by z(!FA0<&LLL4=q-?W$)=0k}g?%-zRXDK&6p;_|#8tqdy4Ma`t@CZ>-9_$8-OlZHETO z`|`v$?px)re#$snePxsH$1g%2QqQ9&h<`SeRhk#Ry6oB(_xl?T_#Jt2e~P?7__j}* zG8ei=A3eMx;LV-wYq^f!kxy5@!ddDx_kzba{R0dWbC*y1ns8JGRLpw1`njxgN@xNA Dd+!#* literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_icon_SIP_close_ef.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_icon_SIP_close_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..9ee98720df3052c7bdb1bb1a1450ada240fa21d1 GIT binary patch literal 1466 zcmbVMZA=?=9KO;D1IB`JV}PKSV>3Y3_O5SSPdeJ(wNOH_D>bWwAlLR0Eg61%)92!muP7VJh3qvX~j!$ci#e7M5V#$YLBpaZux1T>L=9D^TC=PT`9@?jYe);Sg z1kx@IbX;kM&3>F}q$@%!RTHYVIYUiOwF@dc3YG>jUcgInBpCEI`vO={18wSJ{5-xb zg}_Y+*Q9~AoU)rOAkMH9sFcXXP8dNzl}dsrlqwZ+1eC#uObYY2N{lElr3#akfZG?u zTVq{r%t{!yZSgA&)W~suOe$?{ZI!gjB@FA4B5Jidt|60&d4xF7=Htkq*cT{BC=gV@ z$<2!iTy)PSODrIAqUaafkn*o}*zDwRQJP!OnIjvxk^+6be#qC{^r;J5)* z!wIg*7vM;rlS%Uk>Qv?BjX408WmW0oc6hx)<9AG zc($S?D3(4&xr{911vm4H(Yx4}qli*&&?%Hg+_)9DL9Rz}ol&Wi>Gd!QZF61!CudUL z8EL#Y{!=W8ExrQd)1A`i7dy>E`S^}u`PMje;3xqAf>jftvjrC&>l+(oH!MKaUR?AB z#znCKDw2PFZmweV>desECG}Wp@eJCX*Q5M(sAEaLk#g+f>3d1+6IU|d$ve|lo>c30 z5NW48;PY~AZ<8ST$NIYW9}i8vl4^^g+MIIF0p&&E^j5g@N7dPYRMjXs9jCZe0Q7*U(4b{!?kd4d)j+fgeUX*PB_BBvdprX+V6!K(|X~TV`n-C4}|9xT~}8Mr$&0* zAD z2_BA>%u-^$;EUTY^d0Nk#{!uRKuP5x T)ouF<8~>Y{4AsPxzTxyg;P(IC literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_icon_back_ef.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_icon_back_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..3ab0ee5e1555321e941efa16e90e524402e41ae0 GIT binary patch literal 1502 zcmeAS@N?(olHy`uVBq!ia0vp^S|H591|*LjJ{b+9BuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFsEgPM3hAM`dB6B=jtVb)aX^@765fKFxc2v6eK2Rr0UTq__OB&@Hb09I0xZL0)vRD^GUf^&XRs)DJWv2L<~p`n7AnVzAE zshOFfj)IYap^?4;5Si&3npl~dSs9rtK!Fm_wxX0Ys~{IQs9ivwtx`rwNr9EVetCJh zUb(Seeo?xx^|#0uTKVr7^KE~&-IMVSR9nfZANAQKal@=Hr> zm4GgVcpk{1iHq`zbF$JDTz5Q`N^fZsd*)yF1AWQ8NHOu6f08$3j=3M z6IU}6GbdLgLqiKEXA4&g3rkZs7fUB+10$Fj*z}q>TNoI-nmW5!I2junx*9ndI$Bzo znH!oII~!UUm>9tHdgc|EB<3Zj!tBii+6&d|gjcVXb5UwyNq$jCetr%t1q5W|m*f{` z7g>=oo!a;y_9)Fd<+H1To=BAIO1cp42>Gjwu3W zjsF5)uQM<(@p-y9hE&{oGh@Fuv!Tdw-<4sqTtR~Mj@(TO|1{3&S!pQs$^KzJ;usU- znr<%0e$dfHys)@f=nl*Fu17CaI-2;noF*Q7-z+1ue&_BxU&Fh;KXA^d^4#}*()8(b zCIoHU+N63b>PXVUjTa(b)CntX5+vt5 z*qJTA&|5={r+GVjNt1VheGQ;TfH<~rv239I?A)%~InP0o^ zEnMgHa6-wI&l)|O?rlHSQ2L)?VyA-9YCiS&2R5Ic>Map9_@H_1-t76`uh>~KrX5^h zHB;32{>(!uYH21v_+EVOR@|Cz*B~uwVWjc6^T*{19TPDr?yZ;qu}CoRq%p|H9XmP? PRN{KN`njxgN@xNAZsaB# literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_icon_back_trans_ef.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_icon_back_trans_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..19b3fd3744a61fffdff23261645d3828d742e17d GIT binary patch literal 1491 zcmeAS@N?(olHy`uVBq!ia0vp^S|H591|*LjJ{b+9BuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFsEgPM3hAM`dB6B=jtVb)aX^@765fKFxc2v6eK2Rr0UTq__OB&@Hb09I0xZL0)vRD^GUf^&XRs)DJWv2L<~p`n7AnVzAE zshOFfj)IYap^?4;5Si&3npl~dSs9rtK!Fm_wxX0Ys~{IQs9ivwtx`rwNr9EVetCJh zUb(Seeo?xx^|#0uTKVr7^KE~&-IMVSR9nfZANAQKal@=Hr> zm4GgVcpk{1iHq`zbF$JDTz5Q`N^fZsd*)yF1AWQ8NHOu6f08$3j=3M z6IU}6GbdLgLqiKEXA4&g3rkZs7fUB+10$Fj*z}rN8e5nr6~`kbKE6kf z9zA>WKuv_*vApmTzks^=MulBrGBPZ#7k({Pn0KFDbIKOq$-9^Ab&{*GIB{1sJ}&NF zb-4~llZ*9?=^4VsPICj)uS^N761updvVbit=k+J&bCVfwFW@jc=yIdxj07;#hG(cp zuyQM~7hbQ~=rbp&L`-I)-iAQ2n>xWCGq`dZ<2GsYWaU!XFtYU-B~ zhGW@xjXBrwubFIoV1-ZkUQV0aO08ep4k#|Q)Lr-|^;*ity9x3tr8cWnXFNJL;f9F4 zbm(`R$fF8OTPIECjhs3|VETF+X`XELKbsyz2}`ed&baK2K%4%7m=~u)UdA47`tR~_ zM~zF?XO)K^j{`5z;9xhM0si5by z(!FA0<&LLL4=q-?W$)=0k}g?%-zRXDK&6p;_|#8tqdy4Ma`t@CZ>-9_$8-OlZHETO z`|`v$?px)re#$snePxsH$1g%2QqQ9&h<`SeRhk#Ry6oB(_xl?T_#Jt2e~P?7__j}* zG8ei=A3eMx;LV-wYq^f!kxy5@!ddDx_kzba{R0dWbC*y1ns8JGRLpw1`njxgN@xNA Dd+!#* literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_icon_jump.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_icon_jump.png new file mode 100755 index 0000000000000000000000000000000000000000..1c59c6f70911f58180d21c7d5e0a94b7c2696ac8 GIT binary patch literal 3132 zcmV-C48!w@P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb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004mL004C`008P>0026e000+nl3&F} z0004JNkl1v8>c4^r0}5V1(AAtk5bq!!Kyc8dckl>$30H31yAi~3 zp`xHG1rhuO!J^~qrVFRdOq;Y)7);6LOOvN>^7ZXkBZ(?nKt-)GaF~i1mVp&u33x2H z{t)mD>?5{1MkIB1v@P_c^hlB3N=8DZ8=s7WKGjmpg;|gvF z-FC^`=3jwrN|jr=C%Bi=e9Aq*bq8p7<&NMPp(9VXYWjlfLYD=ta>ECFP=ZH)2+i5R zVUJgQ7dQsqVn6$gzcy>Yti_jhfGc3+mruU{_hlGJAarO^775L}yvMGVX@Hs~UIRv} zsz6NN)?B6va0rY!oPBBF2spLGAAmcjZS$x=CV*97I<6qwz#ee!Qh}KNKZ(8v{|o?1 WB~WSRh$tKY0000}| literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_icon_jump_ef.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_icon_jump_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..a08b950c9f8429783cee9d0d3b256cd2b5faf887 GIT binary patch literal 1382 zcmeAS@N?(olHy`uVBq!ia0vp^av;pX1|+Qw)-3{3k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+n3Xa^B1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxSU1_g&``n5OwZ87 z)XdCKN5ROz&`93^h|F{iO{`4Ktc=VRpg;*|TTx1yRgjAt)Gi>;Rw<*Tq`*pFzr4I$ zuiRKKzbIYb(9+TpWQLKEE>MMTab;dfVufyAu`f(~1RD^r68eAMwS&*t9 zlvv ztM~P_^2{qPNz6-5^>ndS0-B(gnVDkc=xFNVYHna`;bLfPXy|HW>E>qQ=IrX^WNP4O zXl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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} z0004XNklc7ISGl z16%?-9)}zmY8Q)vE2RNbHE;yn0Bh=d-zUGmz%g(y%GWjrY)GzaYX1)KS`>K5w4UQ{ z01tpwVGkr4N5Gk{xE6t@jPPo)g+e4u4I>fQ^HFtAo+l%ix?0xo=MGT9hvum1z*-0_)SIxJUi}jAdyST0KWt0(up2D k_DOt0ZT|lxem(H_0EM$bD6=vfWdHyG07*qoM6N<$g1Khdng9R* literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_icon_jump_left_ef.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_icon_jump_left_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..8f25e2b15067c20f27e28d5216c78088bd2d14c6 GIT binary patch literal 1366 zcmeAS@N?(olHy`uVBq!ia0vp^av;pX1|+Qw)-3{3k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+n3Xa^B1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxSU1_g&``n5OwZ87 z)XdCKN5ROz&`93^h|F{iO{`4Ktc=VRpg;*|TTx1yRgjAt)Gi>;Rw<*Tq`*pFzr4I$ zuiRKKzbIYb(9+TpWQLKEE>MMTab;dfVufyAu`f(~1RD^r68eAMwS&*t9 zlvv ztM~P_^2{qPNz6-5^>ndS0-B(gnVDkcWMFROY-#Fd;bLfPXy|I>XliQWY+&YQWa8%H zX5!)k)9aF-T$-DjR|3}Efcgw)19&1@2J^lFc z<06-cT>__SJ+eF&|A_GN>XP)h%krrI&Ye5ATq1t4c9=Ukchz(!Ui4ey?>H@w>5;O- z8n0DHeN<8zeZ2XZKWZ!dbLN$wob)nV;a~SO-irs_6SVeuO*`76)B0-%PsiDf8R@LA z;#s!rnW)m;xj}^G9^*$%jb6E_OgCg)dirm3L~t>kZ>-Q3C|#=Mm7pFe-< z*ZleM(OAyg@qxBTGV_8p$DE5+{rm8+`QgjU%UM4}cyavU;pb0RRbMfG){Ge60gKGHsc|IQ{8?kZR%ik58UGK2?FK|7lId zm!?(MG*iSCSahbdCY8>b62qeNe0k(VPp1u+&m@VQ-e3R!-0ce&KJcEfbt}7^e!Ne% z&(F^cklER7I9wY^Ew;g6Lgt9_5jbx1u;szE14egPT96|p3`J|`6+1%M)Uj4 gUa+q}%D~9R@RoO8=(B}W-9aUtr>mdKI;Vst0PvOSegFUf literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_icon_more_ef.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_icon_more_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..7f132ba77cbc726e3c51ef393bf2a7465ef0af30 GIT binary patch literal 1145 zcmbVMOK8+k6pglODOyzgP*DtVQ^m<|CNT*e>*UuCI(3|mSP;}q@}?8o3y2bKVt^{fF<0G2aycoK9H zL{r%<_M`sXF2#l(ZN)Zp%?mJ^AUeBhfn^T@M3%sS>!+y?ckWT7>!hiDLXOP^8mPEE zqao-U?Je4)gSPBYUE9gdnt};DfGo1+4f&B$OH(tv3ZBQ?3`NeEpusdX>r{U(Piim( zq(CPVHp_9ODAHU?5Jhe)$+H~Ku=o}eTuKo{h2KWjFAA%LPFX4FW?c)f(o_YZKw+3_ zwMti$GzF#*9`84x==MJ)I4~3v#(R zVn3=U3a5;zSpmb*EaQ1`Tr<`YDu6$3%xfJLM*_eUKm>;g2;oqp0`e7z zU{rwtsr89u$3EA0U^UttAJ1&GItbk(z%fJUku&*K+m*TX!qYpK?JRzWYuC)zd)zq_otZ}O&TzC4ariQn71ujaQjty!PB(KXf9^yHH< z*0yNuQD*t+Ma|P4te*WSUur+q5p_R%zT*AV^AMA0H_IzGHVe}`ORYavpSVB1VnUd% zl-FImU``xu`Ko?fa%=6=-9x9#ZRhRrFXfecPcD40hddzdIQO&V(cOvLN9%4ZUqCEa YOdLBX(3Q{aZ{wdq*67u*tB1yZ17GxUh5!Hn literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_indexlist_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_indexlist_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..eb3b854b1c75388c3a5f5c553788f6df76b87da9 GIT binary patch literal 2878 zcmV-E3&He>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#eyh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@KzP11W literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_list_group_bg_center_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_list_group_bg_center_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..317e9c4ba19bc5d2acd6596f0d44574c784f07d9 GIT binary patch literal 2882 zcmV-I3%&G-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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@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} z0001ONkl)j0nY!j*kET{Qf=b@R1|S8K?+sZEPZ0 zSXt8!95}$hf+lx>fw~|P#$aNg6BvdTA*G^W;-mln|1%D|IAR!faYPr382|tO&p?MH g&IkYi0RR630H6ROG?Ju0wg3PC07*qoM6N<$f~Ra(*#H0l literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_list_group_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_list_group_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..18046b3e4ebdc126a4e7e2b6a97d4776f66305d7 GIT binary patch literal 1390 zcmeAS@N?(olHy`uVBq!ia0vp^Qb5ed!3HD^d3l_Hlw^r(L`iUdT1k0gQ7VIDN`6wR zf@f}GdTLN=VoGJ<$y6H#24v4 zq}24xJX@vryZ0+8WTx0Eg`4^s_!c;)W@LI)6{QAO`Gq7`WhYyvDB0U7*i={n4aiL` zNmQuF&B-gas<2f8n`;GRgM{^!6u?SKvTcwn`GuBNuFf>#!Gt)CP zF*P$Y)KM@pFf`IP03tJ8LlY}gGbUo-h6WQb!1OB;3-k^33_xCjDfIQluQWFouDZA+C>7yetOgf{R2HP_ z2c;J0mlh=hBQ8xDWL1Hcb5UwyNq$jCetr%t6azByOY(~|@(UE4gUu8)!ZY(y^2>`g z!Rmc|tvvIJOA_;vQ$1a5m4GJbWoD*WIT=_Q8@Rc+xmY-v8XCG9S(rJRSeTo*8JoLU zTACO+!SuT1Czs}?=9R$oroi>O8sO9mN(#9JK$~4si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1ArhR2H;2`2Vfp!RWOgGkOKhDY;_y13>qjTR=0lkJt z&1OkqsY!_H^ecHX zA$S3gI^&d5Dg%U=83kA%OjE;b1Yk2kgb8z)oH&3EBQS)}Avm6fz+6^57e;{Dhe}v8 zYqVUsD0S8rvExy7IBw!Xkj-WTZ43}I=R*jG!+~HrM5ogT1kJL|h^y>0qa|uig9x># z&3Y5A$Bckmqbd)x;yfzh=}ZU)lT`XzvC%S{C?aK$U1fq05QYo}cU;qG3ob|hapR3> zi(;Dzh2*FOvzpaJJ+x7CWFmKOH{=Eq-f&l$^+Zurg(6ICHK0aZBH~er8&IRyaG9`J zAP|WKOd*pgrXz?zD2Nvc7;Ldn#Naa#)|`$vam5Hi7t;kSb}EB`AcO?N!qj*Xg0KZ5 zn9iinaV16zt}?38IlFqo?kt!2RxVd)MpZawR$y4+TnET>7>-$Vmlam+tvigB;)=wzNn(Pa9rufAb;SYwlC_Yws%~<$InsA|)%m^7c1D>)lGgs&(1mBNgNrYR>~ik1 zq;u|iiq19_+x#wdm9NXC`K&L9>iBK=?)8$ztnjSZ@st3y)IM)&!Ha(1l6vyfTu-q$ zxn!r-@s8i}23~7K0%I%yYuWRvWM?Qv_KncsfdR>}Il+@&FL-TJnNybbA_X|W$(meO zyJAUixB;(EPdw<<`7GFR4Qh*WhJoY_JVo3JZRW+wg4%||i)?(pT6mw9=2dYL92@`O z=G7a_V>}P!)TZ!($CoSoefb_i(Yc|w?p)I!8OZ}{xyNYXyPnBKANHRqz+*Pf{SvaB&S zdt~Ft<4>h&remI;d;CbNE?;=3!O_}lzS(!{S?NQ^*iWx&mXbqANb-Aq{q>b`?mvk{ LoGJQRkn8vx*kgwx literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_02.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_02.png new file mode 100644 index 0000000000000000000000000000000000000000..43d27bcdd0f129a04e28c9e561fa5c0d5d6ee0c3 GIT binary patch literal 1706 zcmb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eAF zSJuaGQl35Ld))I^^_cw9G0&tPExW?%QxmeTDj9yTHY{7U^~QzsP42mu`W&6D6A|4q z=Fy=a{9T7CKmYn+ZJOlwBR>ru3S8Hrt3S~Zo9_r2EdnYchlT^Y+rNt94Ye!^Iy8E? z*1!2pVSX!QPn{F$Ha50I=VemnBwqh?(QlQhUH2B;zHvaWZh$VI2lji^J=@n=fOP$x z+TByq6;t(2dPPGqupy?neS0=uRuT7yLa8p_V-;UM%IJAgzkk3!QGVop`vKF@COLU) zq|UznU5{m3YR19(n)U}PTK%YiOk%QQWOcp^!)w4z<3M-!I{zLDdA#g9N$S>r03@@K AHUIzs literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_03.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_03.png new file mode 100644 index 0000000000000000000000000000000000000000..a79570afd4a42edf19410d6264688d046a25d7e2 GIT binary patch literal 1661 zcmbVNX;2eq7+#{Fr2$7oQIT{Fhl4}1yE#dQKyJhVOJfu~DlExDA|x9&iwP)|OBhfQ z4`6@+GtzoP9j0gyPft?sq-U`@GjTTO7M0 z(!+hBI{*M4QOlGXYFz4kXSz|}3vHLzQNsdK6;H0jlSvy&V1P`ICt+Ze2~EK?7^=@q zzl?E+YlT*qm8uiznGxY&m|aX6FkvJL+D&O@tJp4Kj@uPebLTe11jiv{ zs)RY=RD4VoQE3nT%3OnA8bdZ`6xn{JD^?H~O5%hT$J3@dAl87BxYdALK*dTv8v)~tW<74R zI?FQ=tr8=Qn=rkaz)j$Ie#OT3=!dG+LJln8@Kpa5_XJn}e{u#<&OpxQ_*b(`ZBZTQ zoW5&)YVq#!U}oyZ5Y*LJb7Zs}0B8+SN}1N)(^d6gd7G4;b8N}nSu^r;IiKBy5)|1$ zU;9{V$*%kUf70^)@^Z^N5FO&}US6_|V=cQ$TzTC1thq_r|D^kA>Ygis1MS4=9o;fP zJ%2arrKSSA^ZKI0i}can-^_9~xV|bL=GN>EEqyEXEosWiDa#wJD`Y(Ab4TY)#{+zq zMoJ_{U6!~otMbE-CBDk)^3nd_Cknfz-cVko$o+9XG-T<2;#XTKPSDXMl|e^nZnutp zeAq*C?}YSH$IZ=iqWwCuhg=30h0NHPza{e0$peXp&cCEf_g8n{kkB-eXD$Bvf zcF)gm^Q_KUzCP4j&oIoMYv?Sfr5zt}l>{_iyVKQLapGdQqke5}V`bU(vW$3cd4N6R zA+6S{a8KQ-7X{0L=kbDCMg_5*FU;zBEer2RFDe_Z7C8!<_RSgOpUkc9z3TS-ktQK_ zw9~P_;(6*<*R~gX4(zzSHs$KB-ke?`eJlF3ERVLz=W8iM%N+0?X}OS%-9v%!b8p^y zd`F*oJJ8hnxnFCKpSdcwk0YIRzWLV;$w46=mF+3EF}Q7K8l#uo!N~vUQ9U>>J}S4r z^pI~)&9;WpFVbCY0J3%Xid*$;Vf(bg>~pI;xg&vyfWG*3a=qthRk~@z@^98P4cASN z{G?RpI@0!2`gVparSPr0DE@lM(6_}4mIi!zx@T|JnukM&8-A&K2^iT98t4<#{y2r{ zy6?tbpj_(k+qh_}(F!cS;Q;AD6voA3~IB Kg|bnenD;l>d2>hr literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_04.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_04.png new file mode 100644 index 0000000000000000000000000000000000000000..041bef09758046b98eb4ff30e89de8c85c57f0a8 GIT binary patch literal 1740 zcmbVNX;2eq7*0791VkN5K}41yQNU!gxge1Uxxi2^Llitl3CR*xNH$~_6Dd?k6@k%_ zu_986!gwLJ9(c5Xjwm9+AOeC=N(H>CprVYmWd^Yu4%;8rAKjVV?|Pp1d9QCaFFG>R zVa~!iBofI%x=Jh~Mql%5GmH2()HiJ)23K4XhsU6axIv+ZNdgs`00UBuLJiAcg=$-B z6C6k)StcU#I6N*QoTo%JG=&*MGir1Mn?wo>GU^n{WEck$U^SxUlSgW=k^w};C&#iQ z=n*;*oP?}O*TXUCk#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}J*7!<>L#GsR7^-!*uBV)Pyu#g>ydBcj+sj#BRGWm$ypoTT5kk2MyCq#ux!JMLv6?9K5iTD3;zDDw5i(*yZ? zT`d!i{&|kOk-=cIZISJPuxC@QQ(;6w++asx9T4P1Z-T-g84q7n@4mTQ{r%~!IXU=- z@{;byv7?RoiTx6Tk$zNk){`!5_|^C{`t$x1{XJHniHJAs>zg(fG6os8rgNbsaM|*V z=+?vou4JD()$=Ecq)AS9I*d>>+ehs%?ppkV6@(67*fVJ%+-C2x1Q>U^Uv^|Kl4Q1S zC}ycQRe4YD<${&M?N;1?&7q!i&w0HiGyM9MU_;o;CmzJWWVb$iw&>uAqPksO<0}iM zhEt-4<_B&Y5X80bsD0bPPs3Z585|PNWrekeTnkF+%?TO_u*T+b4wMb~2GoOI&u_Tc z+$NHqfP?8@#U;&KJ6xv>367_kwqJ0}=NF_qyO!A z+zFl{dq5n*$h;?wee32|j_s>_m8S0-(WdaM45yKkW2&_i-B+vg*5oe#I!n5LkZQ}?@#(>9O|ARxmj<|a?eUE%b57bm{^r=9Bu%$-?{N0= zzivne+B|eM1LBHrede|__in#{8Ubs{!;RR$k8VrLQ~j$eCj4pV>x-MONrzm1_H3ZN dO`lw4#T{AfjeGmYv9tESick>CujNWDe*?CkoEZQB literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_06.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_06.png new file mode 100644 index 0000000000000000000000000000000000000000..e9ab5fc1f8a1df4a915a56b0b1fa9515f44aff15 GIT binary patch literal 1733 zcmbVNX;2eq7*3H?gaK5Fij1uM|WoTyPoHL-s_wFHa2>R zv*T<>5{cv-9)^gCaiQ&X_>}mbYrU963?8^J5s$;t@EoZICGq4~Dhh-vrRk^`mCAEh zUqpjRq)BNCNg|#Y70HodN~+X`q3V@tf=wa?hw9Z*Stg1Dsc5=F#icxHIzs^zaxNu- z83jeD1!#sMEKh^Rx^dFa*Lh5Ml?w5QoX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E)`W5Y*{(6djF%YNA1y$z*~M6{J$hID)KAQehH3S*3NKw!lNQ zQjJ25DNq$)wkU~0cVKK1?&)L*O0`Jz-mpqLl_)%ApkAT|VG0B)mFBo6&{`}Q`Nxe9 zqP5~AH39}BT6Bj-irgm>2y97hW)wzK0JS#H=oO+ap*8(+Qx^t0y@u!F7RP^3urVL=2JN<`82K% zQy_qt-Vl|_o8}5tT1=vnBGbAGTz85~|0tKm)gTfK)re6ve!2pJVo(g##-M6|8^WN# zz!rr{hU&ED>zRy}hiDXuh)keCmB2)PS&9$nuM`M;sE{|6&i}8tC%Ll!lQR%^1~eDP zzlvpg3$H-)^nK~$i}%fgsPK-_;H|+slUspzoRyHr5$hkchaF?m+at1#WYgkpk@uI(@gI)b z#CYmFyvh`LTW4e%7CgE#-_@|lu=;AhER+B0Ko&7VY>{o8sUL3`eP(I$?Y+V<1(4rp6LrDaVefkF?Q&z}8o&9!-CT53Jle?|DmXjVHP@9b1Mam4W}v&E zvPk0Pg5)um=8N)#unsEmz&n;r`2Lqx4JQwu-cXoTyN3{(p7yJx?)XaP7YDC*ySy$Z zk-CW~;0*d&#^W5z;GeC+$4K_seUVn7>=%YTxfza!azs#4T++h45U1}pFgcdeTiph* zz=KkqC;TPUvD7o(Xu03(X^m6fo$}YiFM2uO|ZNcGel>3+MKno1GT>qbW7Dae1+zIecQ|etxQ-JRp^^Am-Vd%TvviGFqE74W@dYH+G-QvP>fWe zikmILf$Kd2b72Px$@WImP+BXs|G@H*v@9(Cbn>6p_ckkq=MRy=6gRGIgNLBXOH@HD zEopoG{qD0(cPT}0050d&?|uVN?)i7;-TIHhMiw(C``WqOB`Vb)X**N%_n!KTa;&i= z;oH6oPquNGe$BUgOIB6Z4V@~ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_10.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_10.png new file mode 100644 index 0000000000000000000000000000000000000000..de1e0578a8ae3579d93a1ebf4ab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Wn-W{SXG@OFHdsYzSz|}?z33Fc_94sMkST+1NvwWdieEhZYs$- zt=a8+XHn!TuvS8|FM;6jodLC<82RW_Tf&^;Z?F4ct+V!4wNXE6_GK6U5Kz$Wb@|FV z8x~VwzM*>HbG$d-rKH2QBO)r9f32zCK7Cd9l$a#>VbSHEEEn@yMCO{PpxSvh3)q~_Pk`2%}=d>jp>hNr;bnyEB<;mn}HqkZb`0yTc3E3A3&cC%l0 z<&;M&pPj4S5p?8s{Whz%;(RRc`Ik-K56s1Bkr$Q>dvI%Qh1Ey%15({qdM#bC3p-mH zo;>|&DkWl=qN5lCF45NQ>s)D9@-$Z8zSzDYSw+bFX`WRZ8%|y79@bdPHXb?#M)C$1 z2l!>GYei2IlBS)wd+t0xVv3e|F>G6v;_=YU72QEChSiL1uwz$+*N1*>(XTGeof_}6 ztZ?8Ack*HBh25pcDi`Q=H>|?-6{xYd>Hebr&JDg5{KtnLbU(U6$1`b^7zg^^^|jL+^yO<<1`!MJkqy4hT}Le*+r2oQnVe literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_11.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_11.png new file mode 100644 index 0000000000000000000000000000000000000000..e707cd2f2e61675dc1df834764c28f3bc8b2da46 GIT binary patch literal 1703 zcmbVNX;2eq7!H>r!W3F{K!dDH#gpuA4niUkl59d!1yV>0o+Kn25+T``EaVV8;sMqJ z>d;yBdffy^7G@!=_C1BNO8_ZlQ4;;12CFkyK2n0qU zL>3Pmb1E%C1_*Hz2C!&wqzaBgfG8#nVZt0HXE8vB5g0<~5X_E5U@nWzg%M!<0ZBEJ zTEk67#p7D!iU(>5!pMani^W2-Fle|b6GAu~4g}L7Iz5s^M4D{|LTQaOn8PP5pqN=@ z(isUIZUEdCl^J*r!2?N8$3oB>6B1qu5b4)6-9-8n8GMT%#3%P-$H{2wXjx35Y8^u*QddxsbQ65O1(9}9LmkEmm z0#qbm3Ykn19YF*_0UH%CqC`TJ!Dk|@2^(+XiutgRg|JysVg>_2M09?1RJ4G_5Hr|x zHp)T86I`jmOehU1Y(iH@>W*`nZ{>1@CQM1-COM90PjrAxixaq6iyHx93X6sSsXBui zx0v1K8H*OhOuAf5EjHnLU^Ks6-5d0y#bP!cj-oR~{}uNbSN(r-29eG{?&kPcvrKG} z9q69EZhdm``to1~^2V6Rt06&xG!%;G9VyC}TV2fu(zDv&!1L`3tZ1{sH@h*L2?u`# zwJX9(Pi<(mw57JPTjN_h22U4U0A!M0$qC*0u6yuSX_7I+X&=sP+Cg2NL6yE7dP>}0 zFt6a^9L^-$KI+bEjqz>O`6G`?sn4gC-20}us5C4tcI!qDecYm-0G*Q?Mu4lsd>4u% z1NViv@=_~0yDbH$=Q<{Dxo)S>s88q@^LONL|G9M5y=%ao4TZrkj$U$p~_hn#I40q5#xd9HJ0-C472JPltL>8hw zvAU)r#Q!|M)EdMFnEndT#h^cMmvV+U#2Nv!ALJ{dxe)(bE{ZFF9Kga33C*e1` z4u`04&#w#j_HHwzx6Yup|85^zxm^9@qhWFA{WF#Nf!xO2tUl>y8NI4*tGE48UH9Jk zr>cn7IR(?J%5v|{_F0v_B53xamMV2q*|E^Ub>5PEPZp&nV8MPi>RZU~M6Y=J7v&!} zy>K;O&2?U0A1C%tvo{YO8*nthJ(t~%hoTxGA0~gvxh*d^ z9a=Ge;6djFnz^Lu4o#9SV+}#!i4h@7+k@v_|GuE60yLbgaHvA}G#yyfO&idrce~aE zH9bFGDyK54{!F>sU;RN}t>2Q^o2ufnp+mj=%^nmSe+(r?Tcz$_hg6h^RtOZ1zX5(T Bk30YX literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_12.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_12.png new file mode 100644 index 0000000000000000000000000000000000000000..0150e7602c05fe9b3e1282617206bfe2f303069f GIT binary patch literal 1746 zcmbVNc~BE~6pkSvV$%RABCU`mpmhY2P1tZO1SJVa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-pbsz1@+|o_=bX&cK70Ye3gsJat<7Jd+86FZ%% zFM8;>t=;S-iE22Ra_DqK-Eg+2=WXoB49w-&iWFN%V@1;-K=S>J_4_^KL4E1*1^$W>+uYZj@4Ox}7^~LK$K8-KV($C+qHGktL xa140&VB)A>bYnwt1!K^?_xy|Yv6Y|AAi4IM4?U}X?P~eUh{Iw;b%NB5e*^BOroR9H literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_13.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_13.png new file mode 100644 index 0000000000000000000000000000000000000000..83361bef07defb30434867f126b0c773c4d09d29 GIT binary patch literal 1753 zcmbVNX;2eq7!HR8IaL${6qkqxQL@<_#6*H5*+gRvN(_ROiFAJ!k;nceSuzwdqC=RIe)tqNRf zZ{ub|B9ZJR%U~I?QcSP)7sU7SrG_wKam7WU_-Zr~Hz@Q7iLXK<5I~|)L?JRnp-S4+ zfcTL}7LjUsC>|PQ5BvGeO#v(WnfkdgbJo4+GFOUJXiboD% zNoi7@5Q$bVOV%T+lLO_-Qtz76(B_Q2*9G!e3Ud_2=HZ6AtsH(8U5bdbjOfoNP7n@fX$v4>2s z=~aZ3r2!{LB5I!LGc5E?#Mk``Aa`e?D);}&29 zQ|i?^T#af0lSM@Y8jthHgr}n+XmnEPN5fidEKx+tz(j=(gs3!7qcO!bqK)A)k$@>=GDUO<5(ousSitZV31J4G39-g)d$DQ}kbPk78B-Cubnx3}|YOe>Kba z5z&FB?Z?(9gpb36Xo-o@6QeQLE4`VRxQP;&FHdZ}lYcFyEnrgp%&SHizI>-WB4_XS zHkl6w%)7sts&6=cW50h|*Jj5C_r810&uynBFPLuQ;O#xx+Rl9jdD5$ejTaO0hVHbs zr*C@#e>K$iu%*TIN%*OjzIVS4RP#=x58h--U-k=o%m=OgE-8`N9_K-a??R69d;R{f zuxD~Qr+PB3CfS^;ZE{vDuyj0W;aXg{o$^ai{n{<|!ZtbuN^>&jzo=w?(Z2PDwA`{G zUJxcp0Ns|;ZFjCKa_UX#E_i15&P=g6&+};`XPT2t=^lOE_@UIoEBNhRql7Ur_zW%G zA%C4WH|=`%L6`kUU|L7K%Dg0|oEuR1=yX@ixw^7^R|S8^)*=S|dS*S#kkz?kSI~Xf ziq&-b^{f;Rx1)ywQ!2Y{Hilr^yc?Q_%h>&oAF^wsD6D7c%}dT!-mnVW0=G5=u&O(6 z);Z5In_D_yzvd0JyF}8FUfiGkVxXqj%C%Nmx3D5BY{kVlcw6P(mYSB}uhB2hE~X`4 z*z9Bsr#2e+*|+^qY8IvRTDj%ip83OvT<6Y7hZclg{4w9R>NmRTdT#u_GLLG6@+!x2 z=zMI>m1S*Mm${~Dd%=stGQq988#ZaMho>HS?5UYI&1-!?Y})yW>H`N>SYP39^txi{ zT9e)0`lc-JfNFw69%Qj*&(P3x#zgkh4DbH)0h)@K9=H4VN}P>_-r!=-lz_Xt0%xd? z-3>=dQjOK~Pa$?m*Y?@oa*?kb&e^&{lDV?$Z7S1JKId6Eh{amQou+tmj5Ye;-#^IL zn*S87EqFkg?^5qd8Md~4kX2iL{KQ*}`&MlQe=&xf!bz!Z1F7|sZJwKcHWE=FTrLRD F_#610sGa}- literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_14.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_14.png new file mode 100644 index 0000000000000000000000000000000000000000..7d981bc536e3640b0a9819a7d0d1933b7a83a440 GIT binary patch literal 1756 zcmbVNc~BE~6i(}j90kPz5n+k-0GjNP0|=y$Q-VZjfB{=6gk%#^l59v855vcI=Q99-UC(3um;56`LH7<2n`y8jVJ(kw(SzN)Yz(@c|(OL=XyrpcqoLxYR_^8dlC);G+ha zUZulTm=-Wwl*VC6IGap(Ivs*WClOd*X9!vcis!$bHGOcT-( z4h%Dxvs{tZfJ?P9bXHeI=+1EIALO!ldQ^&I`fvQEeT6F_6;}HQHhE0ncTKQN88#? z|HIv5_qWD|u+toB(?$m`ce5W~^shf?Yb#l_)Zya{ihJ~?2WcZK92>m+lZ}fTx82cp z4i75NKkq*1b#vP_1+8Pja+~pb;bd|7)AB!eHql1Y{;(+DQ`WS6G+|SPdfQQz)BMgh zQ@cB`q@lIj@2h25W4Gt| z4v;1+b2Sh9uki}CG~9qE&HBa?3f3}peHH92#eg7V`F{ByV3bKO@) zSh_y0e_3l&W^hTfjvU`JXBzY zIs@OE=XUI@j^fShb5I1k313`?TYbEb3dO4fX&JZYrrc80)Y@_jFEj~zf^uV>RleWe zco?{*EiU*=o7%GZ`4`Bg>VH-#U$M0e{i(gZ{#4yWy}nHyV{B)Y*FyBd+`(1u1t z9VtdrOA95=YeEkh7i_gH6*pF|cEnxP*qfFYk?9|idN#lPqJmqWZT{bg1RMC}+}O;& E0fC6H(f|Me literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_15.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_15.png new file mode 100644 index 0000000000000000000000000000000000000000..5babd5896833c818ebcc01867e31005c6444fa64 GIT binary patch literal 1774 zcmbVNc~BE~6b`7|3KU8KuQjnKNRmym0TPLl3pqqE34$VENS0&`$%bT+kg3QuwzVRR z2N+O5##R(XhpHo1E2jnpK?iC@t%!_*)><7rz?OEyVf%;mkM7Lw@A|&?z4w0a&3+xT zX4Py5ZwCT_FgrXR5lK82AGMk-L)8?i1w%2YwK$tV2wrK>N@Xe-15#iGqTvvq|8R*2AaV{d zju{0;Y5A}c2{Ym>oa^lJrK(K+08&JcT6fmgMGA2 zojjE-5`<1^;VTYNiD6ncm71BENy%hTP@RHGW3gCNkWQu3$vA?n&(dI016iXdOe1;+{^1pw>o3y*I4UPbCUZ8Py=wQfU;Bs#aU#nn3F@5&VxE zA4KaVSz4GXg7s*IPKMt{DruUG=kDV|79j2oJ6ea}mm*CQpt1}#tii$s93p-~kt1?8 z1PXaPfshCBAxKE4(Rh4bpn%5+5b^~KE<|Ha+xQR{gqYl*Acz?d%7ADzA)PDWGgw?E zlgr`>gMwJ}X>Pbik4ZH$cv=_1b*H${N4adi4who5PJ*Io(-jb-L@`vaM7024%%sqO zI7A~yGxe71nT%Ed>yRz5JXD9OfrrU@@YY$qAr?%-Gz$gc!nK#hD4edaQ@=IXbl)rfIla>eUs7=d?TdfqBie&mep8A z$XbVP+fBEd+p5bu&U6Gm$&%G~PT4h_^myV@ zDHfXorQY?2W#;|9Pjv|#W7}ZQiCx@p4kvSKXHz`FX7jw;Wb-8_aXA$$++vv&}UlrKw+;64t8qW?f70h*uj)=HVnm_-z z=NG&U8_o`N6qlYTrc@0G6H1`iNLx9hFT0IvI@;Kz$i4$4a@C5^ABoLJwy+ket^IcE z@3h>tw^}FK=RQx8)Ij`A^yNFpzUl_`d2tM77pXpIi|w|h>r|y>KY3wZa%8+~BreB_ YKxmoOPl?)`X88k!3)cwhc$@P625O(AJOBUy literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_16.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_16.png new file mode 100644 index 0000000000000000000000000000000000000000..68837333fa132a22f6d016c137cd14b5f003d241 GIT binary patch literal 1724 zcmbVNX;2eq7!D$cV1RO1i|DLD#WEz>O*X+qqU4ld12n`ToR=I?0(ntJn#9<79=Mw zruv5YQYaLvJYJ$C$0+yf<4t}qwzRDvhffHpnn=Mj2#dyqP=q=>9RcJ9O(vp5G`e-! zZAdJI;+cV})P!2`8DEPV7#cT*VKo>@HiZ(q$ZFJR^#}o^Bbg{Bp!J<@q5-H*KuhH) zK!s6^WTElvO-Rc6M3r{EUdz+b7A*u~t$b3zfDjtMYFLYz`BnjKM3+y_-P=qWFaja; z0@|okYDF?2#!U#oVSsck$b|qd%z$8!2lJu<76^e%h{XhB=n%-~#PC4~7<*`>HIpub zuawBfY>_JgEsG$Gd?wRku`n!b25!n^LOdRi39^_h7M(=U&Fe5iW2Ix}h;ao8V%C~a zBZ1-=;8xV6<2i(YMtV9Lg2AXzyc5REV~HYD#2QnL zU7pcsC5Q>lMRYO~ZU9E|%SYd1f4)o>!veW1So&Xak8*YYCudC38K%2A{?#nwTVw~i zr|(*yT)ewH2u9u*6L~cvE(wDvlnK3ZiBM&|*;(dH2p0xkN?ox$D_pJqrf&AMpupJQ zsQuoyaB~4(g$MR~KYKds_{y{Qd$m4(_M#(2w#~N55$Lq8sG5?*6v3TqE{_$-{JI5# zrs32a%hJ=wRyRcMO}n*=`u&X8`;R4_-ROI`d9c}Q)$~Kn`ahe9RYTr|%2t~L4u7!| zkhTm?A!JQ@yL0lH-3HBeS=1Uzra*FZVpB_6YgCxuR%62iUk68JE$|%-ec4ToDmRu? zZ*N<&tD#8LexRUgPii$5Db3$m-Z{@Fx;3MiUy(Ot_e*vpdb|)W4Aj-m>a7^g^Qy8K zx;yf{gL-m1J~D|0d%(g{TiO;wT<8P;Ny`S{!lj|7kgiL_y(xF*>O9&|C%FR5|`ICXDDe&II||q2cBs4c)N{ez4vRj zxsxjXxMklHKSi}FYDAP&1`GIRqv&jj~1u*oo@)HYvkiYtK=v zf$53IG$IPu1@C-aR}MO^bE8C0N!Ft&j1Jp;k zr$XZxw;F#szH-45MBTlc(vsJUUcyuSfe`AvQV-XKw;L+`ffLZP>goi+)o16+&!^s3 zTrZ)$$a`!GWDUScS1+qsmHooZijlT zIh63njLxr5&h1ODtt)b5VS8tW6z>J?Aw37|sS8d%4oHdqeeR9c*Oiatn>;8NY1A|I Sv3tIA|4-!7M9E=Mn*DF8-;%-r literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_17.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_17.png new file mode 100644 index 0000000000000000000000000000000000000000..07f34cedbbe814583ae4b5bee9b87c19f3477d04 GIT binary patch literal 1704 zcmbVNX;2eq7!FsYffPDzbp*6KVSqtOHoI(yS&5JfK?z_uq}4%|WFbM4jhlr4nh`^l zk)ks|#iIpLDhPvGRA{NFR0}P(q6JhGkd`VP#DJ|Jix+o8`e`Fc|E}2$_-|m)TxtCjD){)VZD>7E|&hDvn5_Oc;qX#A+fH2O@P?Ihs=rZ+2G)Kglv5V4k+cwAn zW+2oi5ogw^Btc1_{K$2tPPH2!S9uERpbpatR!c zK(GK3N|1SOq~1tjdKEsetEF}4xX5d{sFcJpiXh_&B6Ge2Vl@Os7&U|ekjC-35U@_G zR}&_qtvs{Q%5YMfjjO{+LI=#`7uCK(e|dPg0Oke5i2T3ep5?0lPtHKv8PL`o|7w=` zExH43)0eGJFJ4|ATu?sO4}S%Z}flo zV$!O~PBVWosP}u8QdlNx^!~FOQH)Q;k@CNaH~c)%x3ksf#g0c!gu6fPr8zRXHiqGk zo=>lG@mk-O$cQ=Ru%x=A$fNC4;em!uVp83)%)_Prmt^KUQT*c%l>q}cdk>k8X=+aI zM18r6*40s>MZWfelU3u@8_u4r+VaSNyeTP;R&M-6>!U`r3IzkO5Kiq3&$?r z6OzL{%~KH>(UIqbONL6X+SOU#ezM@r_}z}E(=|^oP&Bl~8W#`0+qFMs{D`4_dr@V= zry*aA=%2cdb@^#D>y!Pmc%FcD054kZ$SB807Hq@N?VW=g${CR@gfv~EP zySIPu|BUUt!_FxvW$&$__q@vts{0kCit+M2ZZ}-dTTEGXtou*?Al+eR@AGRP0E(uC z4R^jWXXrlJ6?S&3r={45ZCz~b_617@{LGevcU#BO###Bh6MUxL%m{7q9Z#)q@K}R< z8Rf>h+}@Z!9P|B)s;632bHNeu^f!-3w$)s)cV&Fkynxw+x&3PUcSOpgWhW#lmcIe| C=Z}N{ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_18.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_18.png new file mode 100644 index 0000000000000000000000000000000000000000..9e8c63389e6097850b001092e1f39297c50bb77e GIT binary patch literal 1675 zcmbVNdrT8|9Iqe@c_=zWoidMNoSCKf;9A;Bfj)T&R$!xxRw(Ti4rs6T4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<2Y_#=O6eInoRRyC(?oPKdGavB+22ze(c<>;& z%qfjKylV*=<(#p3(rdM?qP3;d)AHHV0hR9`y!9KJHC;~2w9A@MVwUhH}A2B{Qv*} literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_19.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_19.png new file mode 100644 index 0000000000000000000000000000000000000000..34cb50e7eded87ec70514ddd01e8d5aed4950ac2 GIT binary patch literal 1737 zcmbVNX;2eq7!Fs;fE-e-$WUhu5-*ZHvH=qfN3scE4MNBaI29peHxNj&Az2{MqQY2a zL@QR9RxGttQ0q~sRymZ4;(*4YXiIAaDLT;>kSf(!fqHbqVf(}SqdT+Twa@cD@Ab`Y zjgO1=@(A!?Fc@C3F_?m$mpNW{COvkXx4uhH^C@XEl}Ku+e3gk{MB!vQ0mSN68H9pR z;RQKXVikkoqR}dosbu*Yp_qKI)dHLq5e}@f2x$X)f>Hq%z0P13T12c#yFz;HI0jk3 zB!tQqv8J3#md67U(nJ7!F2qqop)e4Na$yt_pn?zpfnW%P5fBRFz>tt1CWK&M`eD&( zCR`&_V6tf~dM9FKQj}2$g8BLR+ZKf2&KW@Ad zZB`Z-2~a_p$y}3~u7@UQhD_(~^+FCH?Tv7)NlO<+rNc;duAVSZv6zTOf8pX*iW+*pH|QW@05jINf}o#vvi6^dV8w+vwGrvFZ>{51)lOv{&GYC19Mt^ zJvUf_C)~r!=7nztf$-w)n)0jJQ6YBm`XwWZ8|i>=3_aAF)0_|5s=MDG^j>2uZBV|k zx^~@;qjx-#;{Pa*YTyrV`zqnEQO1jjkQa3ocV2s;YWn4F)}w*zb)pmG8MjX)KPQcr zkB!eA+iH8(rrU=dcm@{`d)+qovO5yzbS=MYxiOq@YX#fqvGdAy&SQIJ$V4#1E*i`3 zesA@xGW)=-fw?I;-Zdw^?A1SQuO)V84Xv&0KJzCN7|1ECEG@Fy8@YM=BHPZ|x{S{< z7)71(FTz~W-{+r@KUi#f9_$=(VOF4R+~-tI3wG{k3A=dc$+1LTc}AUl!(hP1j>yZ= z!=FEK$6d6b9BD|q^RfTLehjhZJawC>NVw_4+-MfnUBkSCGS4qHXiA5_L)hwqzLk1j zMO;pXOQa&W&FSLF?&el}btHEp=9}VMYPbg?jw9dXeL-@<@pFll#$om1w35F8p;(q2 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_20.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_20.png new file mode 100644 index 0000000000000000000000000000000000000000..3de3dc9f759ae7da13833f345c21b0ad3b6ddfe5 GIT binary patch literal 1736 zcmbVNX;2eq7!E=>YY)NeN zM%RVQ7m`RMSMer+lo;1pUq^f5+kUk>nHaorVIm%fs_<+%hLE^QGz|g7T6sDmMdZqy z9o5&$qj2&6*{Iv5lPfiOD=1|i_>Lm|{K zr3#h`L~pf-RTxE$<9e7*&(6-KWix3gmQII4LPF>ugU(EH zFWL~Fqetjc#DE$x1yK(bb)HP*?!!V>AmI%hgK3DO$hQkng;9&>aIqkaLY&Z)8YRpE zg*=`>$Yb$YEFlAeczj-vfXCzr`2r@F1+nLCypIckEQU}hWOGDJ76b_yJT50Fn8)Qq z0+7iL0fXncVx0k(>lDbmu7=Qk%Vm9#3-d8Vj-yySif*6pfLJw(qXspq2l#Pp8U$?7 z=#*%-!CIcVXaxwS$wHJO4Ala&`Gqy_(GM1hf*2r&!4m#g+;d#z|H&DhaE5Mej(;`F z{1(xH*6F*}Cl>E6527P(3`SfH)GuKLiL~IgSip@p4fa<}MEY>uTNTlDdN0S11(e8& z!V!n?^5%$@ZF$dva?9%X_r(-7M~vBePCN3#J>9Nt+FQ`d9a%lnR@K`YkWx8tzoAJo z=<=1*!IWJ=Z?aV9FK(snJOs=P7k6>~I{6I7XWUt~_iZGWrc$!n)*LhOv|e(HRZ&py zIb_@qEbe^jIhnuBr?A??bi9 zOBdeRyyMg;+xPCJE5`+?`P#<(L10JQ3NDBD?6D_&cfe3ecc>n!pIu(So)QHHdz4qetO=P-TloG_i~*q z5&k#LP9?6Vt{(iZydc4_(sE!xT|cV$qGNY|7x^IL&Yw*ujwpH(*%u4ks*+@9zFgEJ zZQp(OrhP_|q4`O4U3sDEjo0Mxt=w}^Mpkgh*@JuU>>#RW5CQ=*FDrUmH^&9s2EIb%%*O?KmyFVfw`rPE(yI?H*2q zGP8b<%fDQ9J!)%bb!Tvj-Pg`;w-R3X4F!Lyi(J28jc4UhaGnol^G#o|)A@%1`sS5= zWV@f!+b)<#{a5&$9=yETXiWB&q3V~#%cN#;@f%CS4^iyp0a?GT9~`{Kq&=7hzCX6E zE-Nrwl+vMeIlAV_%*o-+#-{6mPG|2l9=9B8EJ_#>H=f?JPd$EM+b3(6b&4k@$m6y) m?9y{0mqw?bpa;wuk5p1alwV6hdEX)HzeOyJ7S!=l3;zbHkD6)# literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_21.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_21.png new file mode 100644 index 0000000000000000000000000000000000000000..6c086aa5da46533026f3f444cd372cd659804d47 GIT binary patch literal 1731 zcmbVNX;2eq7>)vRnV}Uaa=M0s1xd0Sa*&unb4r9D0xDWjLb5=F&8C|T1grwlDz+Y2 zL8U53#o=&NDn})ZMMOm`np8zCYEg$;#j4{~kviB7hwTsRkM7LwcRkPhyw^9oDK2&% z*~Qz1L?V&pQIdFK46(gVQ;6^B&hF2M!3∨R$FOo}Tpe$i2 zK!r{WXK14GFgPJEHc^$Asp6_Bkr4pj$Ri9OFs=lQNS0R5GYTl9c6r3ywoRu1qYyk( zKpAr?Nf8H#Q49uHG?1zS*$}{H(jX?tWpYCS1_*(4h(QNAR0!m;I6M#n#vclyhN;td z@e*5Y!BfI^(m)EYI92}(sG ziB!ZCGnrBb1c}5Vjzkp3mWm}|LMFtTu<i?57I^hi6)*Sz8mWeH* z18vi{txqi8ULIIW+!&0w8efNOyF(&PekPX)6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xUq*P@>&A_}^^<4KXV>#05>15u2e|F2RIQE+p zOrNnldo@+?;OZuGi#CCbT8GjJ#!X*DTkfXbThCB($+VwO(qqrud*{PxF7S=(%hba%qAx3a#AGXW#Itv2*Iqn0={9%p!Op4tS7ttmJmBVf zBlzjD(haXlqdLy-TzPi&j52NRhQDtZW*gH?;h!u%Re6B7uME*XTzEP1|CQ zpFI;$dvIT}O;}NK@tYfk;vq`E+xD{9P74-t@Y~&US~zbGYpvh}PL?+_Ct06=DY?G< zZt1#w6Je!YFI8ogesJW?TE9SE^oFvPW@b%)iBXa7BFpks9=>Cg6;n;DoHwA%k{ UX-r*t5mc9Wy85}Sb4q9e0DB{m00000 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_23.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_23.png new file mode 100644 index 0000000000000000000000000000000000000000..a6bc0142274a7d5b0256d67769acb13b80926745 GIT binary patch literal 1769 zcmeAS@N?(olHy`uVBq!ia0vp^S|H591|*LjJ{b+9BuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFsEgPM3hAM`dB6B=jtVb)aX^@765fKFxc2v6eK2Rr0UTq__OB&@Hb09I0xZL0)vRD^GUf^&XRs)DJWfo`&anW2K2iJqZ} zfu)J1j)IYap@F`kk-mYsuAzaIskxPbp#l^r0c|TvNwW%aaf8|g1^l#~=$>Fbx5 zm+O@q>*W`v>l<2HTIw4Z=^Gj80#)c1SLT%@R_NvxE5l51Ni9w;$}A|!%+FH*nV6WA zUs__T1av9H3%LcpzHo!{ilG4o3^M(S!~%UoJp=vRT#&!Os*6j4QW4I;s=7F&vLIDI zD784hv?v)EA8E=k&A_n3ZxKi#&^1>6MVY`zNz8G{PcF?(%`5SAu~h=f=%r+)SeY2O zIyt$xI+-||n7A4l8ag>UnY%a{o4Go>7(1F6n!?P$rq|HS%+1x*+|D#)yUDr z$;jEn+}X&{)y&Y@(g~*5Gq1QLF)uk4W^X3YUZ`FZyn3yii&7Iy@{2<9^K)P+ARr^Z zB)>Q#zd*q`*i_F@Av`lLCBM8F6g?2%x}+9mmZhe+73JqDfWy}+6N~*8Zf@pA24+Sk zuDJXS(VId}nCSx@qYp|PNQng|1WbV-COqi_Iq=Mrng`4=MZm1F;xOAxV2+dYba4!+ zxOHXb`E21pf#a9g2*xsH+`~mv|NxN%d&E^lhYhrHcO?qA_k+EduYB{BpXFsfYZ4cb%J#Ud8vWtHX)!_U8%9MU(ImKD!0T@iTlx1U4L&2xz?ZP+@hSSy1nF5vzQ{*zf9fg^^}}<6rZ_4 zRz8(i=rz+&+NWs2)bvutZ>L^di{IXnmaFZr9e$A4B(z%p#OKKzoHOok-_#g(hW)e4 z+Bj*U87xa`Usx6VIwn0yQab2OQ_V#K2d3}6ymuPxyu)X2Phc~e$YABX_mWigs~cOC zmwhe%ws^meY`NFYU5C6J%*B@fRyLk>;vq}!j=tG57dpLd4UE>GseJv+jXBb@e>cjO zPpoLWFCk>1zICef@$7~@y)$1=&66|M4Bz@zd-Kbh)aS~PFVsIg_qiJq_{XQa=0uFX zuJED*tVcqcFHJZg{J}U+X1n9BzJS{nvmXjn_`H+d>60LKZ}RoHNk_9z>^i$wUAI}8 zKft+fkLt{FmWlmdU#%y7GLMkl_glf)vG#jU(i_QlHCrR+H`O0_bnmrLi2L@pXYa61 zbMV}?6h_ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_24.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_24.png new file mode 100644 index 0000000000000000000000000000000000000000..08fde3c46fac82a2d09bb008747cef6ee608ed31 GIT binary patch literal 1749 zcmbVNc~BE~6b^FJqJTOI3a&wmO2{4wfkXo2#8jgh4nbO!kSq|wW<#z#Iz)vLJ0{oYUK(wN&rb{ib}(!4%c6%0xBh! z8XG8uq*?)*s#=$&L!+`bMk}(^3bv9O77BzIIivv$CFFn+OV{W*MlN;AE{B|3w?Qf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S;rIO8 zuKGodbjZ;_mjK^$wOj6%&u6r!_a12ZEb?Z?=)V5sCa^hVLeSHH?IoxC&&i76eI$EQ X*Mp}P$or=|wjWA_bOT&1PRaipZ9bGs literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_26.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_26.png new file mode 100644 index 0000000000000000000000000000000000000000..c0388cc8da59f1df9e7cece6b8e45f3df98cc0ce GIT binary patch literal 1714 zcmeAS@N?(olHy`uVBq!ia0vp^S|H591|*LjJ{b+9BuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFsEgPM3hAM`dB6B=jtVb)aX^@765fKFxc2v6eK2Rr0UTq__OB&@Hb09I0xZL0)vRD^GUf^&XRs)DJWfo`&anW2K2iJqZ} zfu)J1j)IYap@F`kk-mYsuAzaIskxPbp#l^r0c|TvNwW%aaf8|g1^l#~=$>Fbx5 zm+O@q>*W`v>l<2HTIw4Z=^Gj80#)c1SLT%@R_NvxE5l51Ni9w;$}A|!%+FH*nV6WA zUs__T1av9H3%LcpzHo!{ilG4o3^M(S!~%UoJp=vRT#&!Os*6j4QW4I;s=7F&vLIDI zD784hv?v)EA8E=k&A_n3ZxKi#&^1>6MVY`zNz8G{PcF?(%`5SAu~h=f=%r+)SeY2O zIyt$xI+-||n7A4l8ag>UnY%a{o4Go>7(1F6n!?P$rq|HT(A?3$z|_pm*u>D#)yT=f z%*D;p!o(bCsHvfu8%(cfUU5lcUUDkT-b|pqP`xI2^;$U>r6!i-7lq{K=fF}xKt_H^ zesM;Afr4|esh*)icxGNoet9t{dLX`aNiE7OOHFYr%Fk5*hp$y87W*yS+{}#(%#2K2 zarqmfH-(%q(+4_6ACx$d5(`WSm;ymec+v-Q;F%{i513<$fLY_r>B+4O3`~zaT^vIy zZe5ufn|0ekpkb=Uij+==go471&V>RQ3r#M_EpR^(ST$KjHT^}hJXbBZ1QVa8nW!m; zNX{mOJCZY4OO1cO?rmaMGdmVnKX3osnKC)sZ|BHAF}N*kdB{HK)Q$7u3z)vJm@I$p zb!~y{3ufDVpLP+~hwM@s6|XcMpH2I&`C^isb<vX9+iK$ZuU)(to_&a(S?=GnwL>@iiJ$d zY>kQ6O6KudGe$h*{?%5QD;E4)De-)b!|Axju%iDw6KW%Dr?5nnK4F?`z<%|7P49Id zk4Q)EW3%?Nzp|XREB)ZAR?aO+S*g}6s#BIu<6M7=WmWWM$sLoUe>QcAv(*}u#OL(9 zl0BEe^zM4>{Ne?gyB2X@$i9$oJ?G>7SU%3sR|}LHP1ifJSWAe5i95d!mIipdKh8XT`J|ouZhqRbQ8cE# z#+PAL{rzJsw+!TUl=giHUvk@h8@GG;-jri)0i8Q9#=Y*fI+C88{W;8Mx2n<|v0WD= ztS#m>{QLNJhpwqf$i2*`8d?%ah)#LnR z;&F@Wb*$BX&JSj6Dt@|RanqXgRj2(t#53f-^>F^0lMv{?MIdmdjtno~y!z)&Ul>E% z??#llX~dfZ%-M-D)Z-jcl`G3zt4Xb35MfAkL?#YWPxfY N22WQ%mvv4FO#qV$ezpJr literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_27.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_27.png new file mode 100644 index 0000000000000000000000000000000000000000..131679939102165783e8b28423e99a6472b4009e GIT binary patch literal 1733 zcmeAS@N?(olHy`uVBq!ia0vp^S|H591|*LjJ{b+9BuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFsEgPM3hAM`dB6B=jtVb)aX^@765fKFxc2v6eK2Rr0UTq__OB&@Hb09I0xZL0)vRD^GUf^&XRs)DJWfo`&anW2K2iJqZ} zfu)J1j)IYap@F`kk-mYsuAzaIskxPbp#l^r0c|TvNwW%aaf8|g1^l#~=$>Fbx5 zm+O@q>*W`v>l<2HTIw4Z=^Gj80#)c1SLT%@R_NvxE5l51Ni9w;$}A|!%+FH*n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a~Ws_ZwOc5XgDE5@hLs={eOl+m>g j$MS<^&;I+=vq~@+34BapJ+1u`RIzxv`njxgN@xNAvs0OS literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_28.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_28.png new file mode 100644 index 0000000000000000000000000000000000000000..5773da905b3fc76fd1f5a20278d0c82755cd9239 GIT binary patch literal 1751 zcmbVNc~BE~6b_<*pj_SuB}7FlCfOvLKmrlSB|#Hnh=qbmLb8Mql8u|i1X`;g4ANm3 zt(_`R6i_Ue)`M~>2qL0XtOr#_XsuI$q7^M3K=9~>!}bsBAKjVV-}Qa(d++_;o6VAl z*UffZ?1;nRW(z}jQfyppeI4wuZ)?kyXlz)7@*~l3I1V)_5C|8nf@2}PP^VBsQb?gn z-gX5Fz~OA;G_puEQnZ1kgmol^6+<%X3>X`S3kWnD6iO|G;$tDTM$aZZIeVUf*QnTp z2)YOm8MsiqCL{%c!c)XDWr|kGR1pH#;seYq%zzF;6?n5QQEz0K*@SVsENpJwCKK@E z5LC-1OgI%OlHj>80^#W-fT#o*6g&eYQ9ytRGS}d#00kgZsARyGNC8-MUlu^YPd)@p z4N=9hq&&f-7Pev&;!)JVB9l!f6Ujs)!HAknVKSLyfJ&xPi5P-tOxB|cGf{6`Hf4ba z8I_2}fNEep-fB@13n!s$0_N#N2s(pE^vYaDGvrO-ca zyccbhB^w~J6f(j|h!VSxxMfphEO#FkvH~%0SYe0;yA(wt4^}4WAU!JNu?g4-Nu^P- zK!DHT@c0~%3xa$qg~H)-e0dxigU{vBf%EtS+RM3wZ%mL^O0S%;3_*5oC;K!$M z1->A|kH!TBQ(U3mh${3-Xi8Uu=}vON4{}*t1X7?dB7@cXI9S6^t_H{0*o9(AlZE43@n*-{uDS6tk$J15_q5Nj)1MBjP5w9hP;b!;eH z<{fdnqAhZ(F9HMD+Y#jU;2j&flI zLlGLNWm_`KYKL>tq@uE94;$94K6p=y<6XnNn%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6?R?7|2{$`5!JkO%ftIxu1x#cuSyxB6wm8?Ue)jF!9n9l+Y$QEBJ~OAVS8eo z&r8dV;g;-2{OXTPGILT(K&QpG?uqQL(%R}kr zmxMyw?##a%AFFj)4m!^XGGBT`R_)n_?wH|8<_@$?@g4fQrWdB?A9()4duUA&-@jq7 zX<@g_axgWhZIanX;?z1Y<#KV^^rYSFR#SmnXk=;U?VeA(_AZF4xC{@h#M5`=L1?{OX=D${`McQ+wWL?&V2;RD()|9TB zX-UYLz*qIrX{XE)MQ5b~vD!|sn=%WhAOvG`SP zuT^X%A0Rh{iIYaUot&jBzIaToni}7}a@XG z&Eat+-JM?M6KiSMzVDkLPvHf%b5z=zXkC<0Klf@+!?L~Pk@Z=>3?10FdWH{{wZ|hr p=E-cy*-w+rYf3Ahh5j_t#*ucu#3Axxk8_9h2O~uzkveg5(cff#oFV`K literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_30.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_list_process_30.png new file mode 100644 index 0000000000000000000000000000000000000000..bf5af132dc4189825d45d220314fb9e500024cb0 GIT binary patch literal 1762 zcmbVNX;2eq7>-G`ibX342(6YSFj|jfbCH-pl$;U~MTiCE&`q*|1(HoS8xk@_0f8bz zwe+GgR_e%zh#+!$w5T|WKoyF$0u@CVmD6Kti-^^3IBb7de{^Sdzw3G4Igg{c)duA8kmp+!?YPp1e-+iUt=>t+5{K}G;l0p6w@D`IZFo+otPf( z8_Wte$>2C7(2l`j_6=&SJwYqf(bud7{B0t_fC0uKz-CA^nngA-eZsDYm^-#XIxqpj z6U6k%pdx}p02zwGfG?B9(6ab!fX`#Hc`PAMxDw#7*esCE0a*eDnY)?f zFr8i$DpyYVB35F09FChrAZWE(nN}_n#bQCWP$&dh9FW6d5D11j*@#0nhSBUjZ9xv3 zwHRW;5!47cEJ7O8f{W=yq?0KaOu@mg3>(c;LJ^XIHpm3BnJmy?aO5?CHshi2KViHU zZB{3n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VEY4fnLGNg2A-`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} z0001?Nkl!gFENA|joB_=}n3Wtb$P z@=Fo%3dFCR@(ck%L$D(_5e(ubJ>=akbDl+2#8$lK>7TD+3%tQ@2J~__1@u$|5ku@U!TFAiVsGuDUz ghB{s7SyJOM0A!Nm%(74kvH$=807*qoM6N<$f-8D&umAu6 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_option_panel_handle_bg_ef.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_option_panel_handle_bg_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..6cb36383c0fe95d44c58fef6ebe711879953955a GIT binary patch literal 3327 zcmYM0WmFW}8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Qcc zN|wKmC+|@(k>WQ?8z0s-w_uJH9-{>?EcM-}SB=65i2)kzpGe!RaYo8AC<_Ax`YXih1*l-01d^u@?1= zWFAp=KTE-b7Q68$OqsSHyA?2RB;t4IvJGYpEm>Gbb>SL(_B~Gw;N3Aw2ooZD{1_5C zdz-9eB3(E~tXmHi%S~|VaJ4|gZPNc9-F5VbXgKrQ+f-IF> zCrl+u5F$f|*XO|T=)(*>dZ_Fhhz1!`*J9q@?5z=!&xU)i-3%&Nha*~`95*hyB}@XJ we2kl6zlZqx--u*c`77_P;JY_Z>iQZNgqE+L-xavEdb0%j+9q0cn$9u*0TWgnZ~y=R literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_option_panel_handle_bg_ef_press.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_option_panel_handle_bg_ef_press.png new file mode 100644 index 0000000000000000000000000000000000000000..7497d12ce7fa104593605be813947f09edb8982e GIT binary patch literal 1427 zcmaJ>drTX396uOg(pY9(bV4(CxtUE9dXLfvy-^TakQ!RCKq!HX9qkXev3q!T(1J{G z0SO5Y<8)EOZ2U(P%^-$B5De5Y(ij$S5=1~2P^WPWaG3B&mf^Kf*dN17?tYK&=kxhK zb1gac*OZEQ1q4A#YnH_!ubuL1e=1u3PTA{ed5M!UoKh}VCV40UKxuBS6u?%7DhCcg zxoh6~0VG4vA%xCzN={og>Eala3Sv+%!^><4N>26il&ca*a49IKSrf84IE=uw+k_P8 zY`Bd#g9Z@rOW6>Qd8h$FDVN!K%!tTbAc5}uL%k1lJY)yjUjLdB2}7@ zouHhy9N5eW0M?ubLH4h7~M8bO|&s(Hsj0 z6{%9LN-`mGq&q1v{GKc;?v_a|80MvTj6m^VN@1YQ_Ww|Z*+Ywx1MJ89L}4+nh6k7f zh+LK6k{efcGU$pY%>tk#PRQf93*jo}RB#d}R&YFQ&efp=TtKsK&Lf8KHXCVWMTufv zz-loevI0ueZci^ue)c57gV`x(|*;cOVy&gTaE0eXP;pD|vc?+r6=s z4|{_TSb5q7d8}`Jkktf1k%z68v^?+Z{rQQ?S^fq8;;GEz@5QK^tR0_4tIn)!Z=3Z; zOwyO_<5Sg%`We-x;`>ST)ECJoye)xGlZPGzJ};cq7C1`o+TU$B%0J6T+9U1$n53Ab zh|>|L7hYP3>TJ0D1VdEkV+OxSE) z-D!WZ_{PuU9gWM}jrGW17Z%nU*?7@()qW&Df4=Sc;&X2wYo3UiyLij@@x|;}XUu^6*@IA&u;%XP}EhGvsyj)_0;+N_O&bV-B)UAH_tG=zb{MmYj>1=i?^o&0Z=$p z*gZX3)?;jCMr@@2tLsw(zU(wr-^y0^WbY?84>zAr@%fgEHpTh}MZP+uX<4(V3oP|G z6Yjk_-5OVXXvX``a~W^`wYBB^!!&fsKlo5R9o6?|=WykQ(ta$qdsJT?>d9V(Lmk;I ieW+Ez(*J$EKJsa3eWNjT1t@&M-=sCeZs|%tcj-R_{u4C- literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_panel_handle_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_panel_handle_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..6e809fec37de2b0c84cd1cd25f2a12dbd882057d GIT binary patch literal 4140 zcmV+{5Yz98P)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=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T!=-Ok|P%|A55|VbuD@9Q-#k CfO?Yv literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_panel_list_bg_ef_press.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_panel_list_bg_ef_press.#.png new file mode 100644 index 0000000000000000000000000000000000000000..fffa8793f1caae607e84d8e8fe714b700d31521b GIT binary patch literal 1197 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE;=WQl7;NpOBzNqJ&XDuZK6ep0G} zXKrG8YEWuoN@d~6R2v2cW~I!Kh>{3jAFJg2T)jk)8oi3#0-$aN1{?c|g2d$P)DnfH z)bz|eTc!8A_bVx6rr0WloBA5~7C5J7WO`H;r3P2|g(O#HCtIc{+1n}DR9FEG$W1Lt zRH(?!$t$+1uvG$^YXxM3g!Ppaz)DK8ZIvL7itr6kaLzAERWQ{v&`mZlGgL4$(K9qL zur#sMQ7|$vG|)FR(l;>IH8ij?HMcS_RDc2{plwAdX;wilZcw{`JX@uVl9B=|ef{$C za=mh6z5JqdeM3u2OML?)eIp}XpbFjM%Dj@q3f;V7Wta&rsl~}fnFS@8`FRQ;6BCp2 zOG|8(fG&l2A-4c-Y+f-mn1BJMUy)d#Z>VPg@)As;uP=V3xw&xF#U(+h2=`(&xHzP; zAXPsowK%`DC>a=WY04n03ap%qQWHz^i$e1Ab6}wukda@KU!0L&px_*As%NMWo|%`D zUtSDW@9S&jnO9trn3tUD>0+w{G(j&jGsVil)xg=v(8G&eP`1g19yq1O?oUQklVEdbi=l3J8mmYU*Ll%J~r_OewbZnv1@ zG!Lpb1-Dx)aO%|uIz}H9u}BdO69T3l5EGtkfgE_kPt60S_99@i_WGXUz`($$=;`7Z zQgQ3dl(SjQ4g$x^!-S{G{BckT+4JQI_m?T(m+N0}f1${p{2?Io&xx|IV+I0U!5dVV z>#vmld3)~Hea7UTC@zK>lM^)Sy$Q^zaPj+JUiP?^XXYi;$WQ-vfk~99n$Lt~2j~BP3XyVFDXRp$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AWgCt^-_QU6002ovPDHLkV1jQq&5i&7 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_popup_bg.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_popup_bg.#.png new file mode 100755 index 0000000000000000000000000000000000000000..295a4e559fcd58b433a72e96fd4c703b29527b3b GIT binary patch literal 1263 zcmbVMZD<>19KTXpO4&Y$pxwajdc`_llFMC^OYUsiUGgMdHq(VPWf^6%%iWXa*4|6+ zo|v?tmKD)<6&+GsE5eEhBI~Sv5WA$^Eew1vX{sN}K6uLfc#0w&NPlE{)aq}xI%L{)eNympRhimZsB z!4Oq7Dw9Z(5yOI{-|cnD9)=+~&dvDz9LGFDvL1$|J^1BZj8E`$0vjOL9tvx-l$?+P zu{B+I7ozeAnF380i$!o%+bn&Elg;b2)8mT=i4I+98*-EONf0BFmWY9iIpNrzF& z8U+-hu%%TOG&7M{C)Vw?K;e+lCCQ{2w};j=$FGXCjZ*MmGd7gA(<3INQ_waFmW=a} zYpa2A?Cz|{5yaLAdo2|wMH&KzT+pD7;vhuf8@Hk=f+yw+1Vs>t1c4{YGK|OsKsXp- z!=m2@ST0=S*bwXSgP@-YM7<){E5cDB2G?>8W}Pprt+mm6&B{WF@|Wx`BQG z02gEeF)$PI3IFSZYVO0-fc0>Eq3M^FSSU zjD=fczHsYzf~eab2V%N(<;JYoe0Jxi=mS(}?1!_jFD;_w)>AL`mybU?JYVR4_#6@% z0$DaOcXj*9f%|8=w|+U3%>Huq?dS4MU>o!DhsII)#6pwzfWGDCLlfT)Y&uBPADeq# z2i=$YmL^w@Tv6<)PX2cH{F&+BE^u^D=k(X_ee}*wEt+UtI^Ou0uZ!ua9j{Oy zU+kM&?G0aRFMoA@_Jcitd^7vfWW(pb%I8n-ZN0B$wdD-a=ow2i-1A-6U2LwdZRyzc z_CKE-k1Z0_o7+rgdErO7dErR?<^5f|FTOCh`_kaKmN##H|9AP*(Rbf}TQiSN9D1hk>d>CgwhjL@K2BAs(cR_Y)s<;+Ijj9_)HM>9Tl>mSmpV^5zo2-u K2b>HaJp2!w>$8^t literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_popup_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_popup_bg_ef.#.png new file mode 100755 index 0000000000000000000000000000000000000000..1e5610b9f3bad4d04e656efec4da78309ad93274 GIT binary patch literal 2038 zcmbVNX;c&E8jgS*KxjdsMY+Hbt*lvQAZv{^VTeIl0t7{*N=OD6LNXy4B&gK@w_d~o zYNcALUXe`{wO*-;T-h#Iv7#0#B9i3W1<#GgY`$M^R}P&nm!( zR;EGKIEtwNlcF>MOUHR+!qe9wDAl2%Z-rIbH;E!rM$<{vG>}TCDV3(UX3$zZ68Y1O zccQhDOf^D_M6_7CMn=>laq%pf$lc!?G64y1xZxU#JTmcxDo5p9 zx-fvn=EJN&HcStKK#&izU;#T267U%TFvJwhYP^#Ru^_sT!wT}}b3iZ%;_wCjd z_Pqh;wB&mA#02NP9N9K>3TwXh>?x9{no#BJksHAC7p5Mb9lrEg-HU<^jzNC;eVKOXmA9XzfUD*n0=LZYPrAG$k z?}?AsW-qX{xqjY}z0&@wMst0>!S*)?`xC*(jvq`5-SO;#M^U}GWKC>=^V}AP&NeXI-0G0+R@6}vPJbj z<9WlRL-*;noj+bINJ-Yglik*v7IryLO)LAZ|1ePa@5bMtZkuj*)M??m@%U=KjQ;7q zi;j}*M%ei1OjN&maGgH0=vRit?n>#Q4~Oqvs^>&)TQ5|fm|vaO*md-ZT~*8YN5IF= z-5=GNiCKFEJ3UT0+_rIt%sIxpo;=X)=aIp_vWy2dpC?#9G%|m=*V(c1y*Y>|X9AB8 z=`{9lYRasz%9yT;_DMTAlGRg)CEpa%T@T*qaH*ejwRn|n(&M2gwu5V@yjv-!m-KXY zSoBx)qGLz z9KGPpYhvTM$dAsT&;7`J-;-J8dc8iVJ#y#pDr+}1n_=Zet@?>?edxpoJNi0qj$A2N zgBp5NBWJ2#MmV%u3KhO9E~3$o;^^IkcpzNJ>MVZW;8yjE57mJ6lY+rVxzt|d#rs$O=aR$ zEU`T1U$HyPS3=80^=++pem~hH8Vw8iZ`=6x)Ojg})PxQG`Mw%@MGlmW8u0mhD_^iG zs`ihaJM8MQ{?$LzV`|D@<=xB{?9&};Fta6%mu^VBc2}~+^d}Au3WHAx;*QIQHz2ev?>k})IxXj*xh6ky4GwSy6Dz+yI_$XOq1C*Zj*`0)NG4~ zsvw9j^q>fWdh?_Rq6fi>4^$LH6pNm`ih`n`hzL%$-RhxuFeI6ofBx_L-$#48x3(^7 zTSQS*YjK-aChH3F@e32=KXBmZ2C}TedOz+%RUDZCq!b$sLQr(gAy|f{J+|)&?4+oc zs#EF5{iPkUh1`@G>!j+gPtX+A*;V&Vs|GO`ghP&(r$61Eq=94S>0Q|pTk=&n>}(qk zVBdIm#Tu_!l1+DQ2Ay@85V#PVpze-%p1n6>OFckE0R-7p zI%%;S2LvI-WwL_6bpW2_c!njfkmNFQR*-oS%se!)7T8s}tQj-5$SF?`W9-We6Gc%f zN~cgT#Bh=%#T-1JBpS(Z%)@3q>4oc?3>plr!11wzJP47q8DP*vtZM%L+s9Ag@0mYHGn2YK?R|aW(V{PBaFgf zo{gfgJuc65v>FVY{m?c7F=}L^?3u&bB@|%nlFq$ixI>G}f*)K9I4xP}G!4{q4u8 zr>zrUN#fn>u?MHuJkJg+*m`$+a_I@KclEu4_m{p`Ixe1CxwwP2oo8#7|6sZ{vTt5Z z9^1R_%D$F`%fOb2`5lwr?yNii^Nw0u^)PCPs1uiNByJ_nP9Cncu&b{h-y5|lUwTU) z+xo^wr-_PJMsWex}!Y@j3DM+(2|v`y8sjZt^dsYacGF6Z5DaU+>}Smfh{~ N{1^3Z?P_7qq2IA%Z4v+g literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_popup_bottom_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_popup_bottom_ef.#.png new file mode 100755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XC*9FTGYQ@E- z??pw{C&ssr?I+%CitDXwyfU+@A(EU|KDYhqG}m^jwkY<n?j`Q`Xuo ztFoH5<)1s0nz}dszB6ZLsguygHov*^{EbaVnr}b&ZBY+2ICyViE-uXq{hh65JN>1x H@WX!qFhMi? literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_popup_bubble_bg.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_popup_bubble_bg.#.png new file mode 100644 index 0000000000000000000000000000000000000000..034893491c6cd75556f1c90c3d047fbbad77908f GIT binary patch literal 1260 zcmeAS@N?(olHy`uVBq!ia0vp^Y9P$P1|(P5zFY^SBuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFsEgPM3hAM`dB6B=jtVb)aX^@765fKFxc2v6eK2Rr0UTq__OB&@Hb09I0xZL0)vRD^GUf^&XRs)DJWv2L<~p`n7AnVzAE zshOFfj)IYap^?4;5Si&3npl~dSs9rtK!Fm_wxX0Ys~{IQs9ivwtx`rwNr9EVetCJh zUb(Seeo?xx^|#0uTKVr7^KE~&-IMVSR9nfZANAQKal@=Hr> zm4GgVcpk{1iHq`zbF$JDTz5Q`N^fZsd*)yF1AWQ8NHOu6f0A6LstU} zLpMir7eiMgLqiKQb7L0^0|R42Q*#$%OEZ`m*z~$Nx)~T4IvTlHIvE-Qbz7Rdn!1^o z7`d1l8kw4!JHzyP<`tJD<|U`X?9Bw)3)O3gSFe?GQEFmIeo;t%ehw@J1Z3owTvzci&k4{ulw4tHIb;Db)!rGeD zX8vZ{<3C3^yy7b(gV~ZF$9~-i6T2TCAuD%gx3>Ll(S)_9{%PEGJ!z%C!S=bPS?BH_ zrBbCPT}RKXNjK@5driZSU8pvY^)LI)v_{_URNp%Xc+MOM`lH0KBeu}7p4)(-CbG4m TY{4sQQ2FEO>gTe~DWM4fONFjq literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_popup_bubble_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_popup_bubble_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..ec3d42e149c9c08b5dc3de7775e01e942237f40b GIT binary patch literal 1883 zcmah~X;2eq7)}I1F>;9&bu4Q@~DWZIFa8UB@Y|PX*?lU5ph^5VN&A=MXJS85I~_*ry)v2t+iyGLBte_ zLn<1tB2-bcL>f%TRNG~kW}SgVQz+su%?7n510jGEBn{O|=+BO{&;e8{p(pa9z$imF zl8#0$!I8Kn(eauk85*IM{^c}4Y!;COI)qRIW?iP?c zQL3mIARNOHfXC!8G#~^4d_EK6^7wox1Ym;@n+1}C&w#ih9$&;30D}*m)P`$QMM^kg zP#3wA(9;RRAY!phCKJ=dVPbe13la*2b`Cb1K}s-;7CoUhGxSE^AqE&RYH-v*pqL)8 zGpbXtY(hdOEq(8T&JY##fmm-G3=|nMmRW6JK}?XP)7kxcCv7B@$iHTMRN5GCF(51@ zV#Km>4VjNr-ytv=yH6{!3zF7|X5%QC6m=$yX|i>Qo>0INI(fs?qFND80Lj5nC_*ZL zAvqg@Liqv?914OQh$nzKLjDlP$FLwMh+y+zDJ+zcNI6@^m%%a+WP@A*7|NA#hOi2~ zkx=V3$dF!?)H{e3eiADR#}PGw;qe%jIaC2L=@@|-(=h`O9>)g)5>dStGZ_Qz>3Q!h zjNs^EL>qx)I^bP=Md(NLb2$RiSePr5zxP|n<-jmGBKR_%Tq=~(2eI0Z#fJlG175KxT$TiV>yo)t8F=8nHAulKBfcDwK8oj66QYGY`b^5%vu&wyxx(Z4eRzml$iVJn!RMORd*aLJvS?$HCXz~P{f4QpBxt6pct&RaM zvhyB*(0f(UzPgA#XRP1h=N#|dmAI}rF!yqLnKD2(zaz1K+lg*G*)M4Z1uwGHUhEE` z?kv7K`8D&NtqonxUDP-^>FY3yP-tF;+xRP7zk8RZi=+ggRR z5dWA7{#r|5R0*x}3%?|^mK!-~S55Ebhn%VF&sT*$zV>MPWU6>Xb5+%i1h>4$u=;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ow5srOz literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_popup_bubble_tail_bottom_ef.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_popup_bubble_tail_bottom_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..2e6c8430121aa9d4fbaba4801eef6ab32bebe322 GIT binary patch literal 1612 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxSU1_g&``n5OwZ87 z)XdCKN5ROz&`93^h|F{iO{`4Ktc=VRpg;*|TTx1yRgjAt)Gi>;Rw<*Tq`*pFzr4I$ zuiRKKzbIYb(9+TpWQLKEE>MMTab;dfVufyAu`kBtHuNWFoz#!AFNG#Ad)HBe}%?0@jth%@)C>7xhtg4GcDhpEegHnt0 zON)|$@sXws(+mtd{1$-}0$pR}Uz7=ql*AmD{N&Qy)VvZ;7h5Huj9yA+ij|>}xuvUx zi;;<`p{uKrp`oLjvx}p-i>sxhqlKG=lOfCuY{W(j1&^m^tMmn7yTr^4*b1lkMLYl&B{m2**QVo82cNPd0}ECmE)xv~*O0>P;ah%=Ced(FY|Cq{IRf0;WI^6Q1;e9C+qQ%>(9`B4F0g zDz9J5z`#`F>EaktacfJ6ceZe##N5ouyF~7kK0GF`(9y+xJ#R_2`J+SOOJg-S)-HIo z=nA{02)B|;%~Z1m3PG0xE@ahQVsV_^v1Mb@?1cEXJsg>{X6`h;Ui>v~=S-EkD^0}t zK0kf7`+3d%nLpP(cS-Lr`hTvW>dlXxvT^y*F@aMy9|%7Bbl3Cmf4lwXy|g{EjmP=E z?W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*wS^984Zm_@S9DmP_pw;RA(;y-mXFE4 zwla&|>kY*~=8g72;IO2avxr!8F7{{{<#~1@*p971DXSVeBxPi17!rhfsfhF}GE`m9 zm2w5x=GaZwP_vQ(WgV#nmI*^r<#eu;DHv%3>BU^eXzP}}keZ%_+jbphx23DTR#z(q z*rX(=6EfSbfa)}%B%CHbD2^)NowJT-lSX(dPS5sj5e}S7*e(Uc1zYjeoL%fok}jzQ zIaeqm<~f9FrXL|TN=iXCbXDhDy7vExnaG?G9fsF^I(s4Ou$;> z>E$~W)>glikzS7;Ol-V-IoPSMtPUyTC;sm3mKKwsx%QbbwDDzcug^W(3pTs%SKLI; zCokSz@-CcP>ACyn(8iJTSvgtVyZ-AfI(k9p4}E<1##bLD&|>r!yuJ3rN}~DAk(*zf zOx#+GwB$dBuU;Qsz4mY@Sq|>J-Pi0cC1w8Hp60=O_d5>R9qVs^P5r&Zc(tqf+wZZY zbNv$7EHcTx>KR?EG^l(duPm{-gbS=d{iLx<* JzAKD>`Y&q2dR_nk literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_popup_bubble_tail_left_ef.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_popup_bubble_tail_left_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..e934d8cbc9261ef1718576d15eaf80b857166e8c GIT binary patch literal 1429 zcmbVMdrTX39KWux4H$x9FdSn!k2u+&z24E+UFhK2yF!KXC{?;m(QA8!0_`1lS6j%) zm=7LPv$7CZAWLSlxlQ8(W)qSnF3T_m6Bg7gn?{q3EiRdwsmzGk6n_PZ{z3MKm*3s* z_5FOl?;C2UtIAB@o(@4!rmdQGfH^<$Zr%vKH^QbxFg+nNF1d;K$zfLHAj-?TIoK9p zTR8{Edb_)3xN-+651NpB7cL^O z-)lmeb#{$iuyAeu>K>76>Zx;jdOAFW7pd3_mq$oI5a47Mjs!Y`5*aZe%e*95Cyr4B zUKWu%Ovs8+E_(xP;YAMCsmoLz4Tiyby&BW%^m?om#x)p@YQWH|FfFOmleht1eGs5c z^!i8#ZC%v`b|$1vmIV?;!{M+xT&Cv5Rum%$BEf;P!9?>tz zem)2%7+E(Tl1&J(bj5{$V7IRk2c^|OfsmmQRzNYe1`Pxfel1H&vV;5AjCG|YXScwi z4o>1jq6g%|SCj;U*gaZNLJ(L(){B0S6tlx?&L0XJ%|-%Db+fnba@uGL`- zgJT$Fwa}D-W(bNhT8(Bb$*~@mF_`RgOKgE(f z0u`88u9ZI6tThi81RW!S)^LPwv_O#JGaF4gBj36oE-h6kRf-(tTZ)XmHmlWoWJ~=s zCAp_Yv-owVIf+Is|p?%pTA*ej`}mP~PB@0{i^C(HDMno%L$UqI**3t?(7a z_VV$w)w{kD7&yLp5QQf8%>7bDpFxl<^(l^=zNyqU!7wwk_2?y}vOO>R5aix=^5&VD zFE(ATbhi%~qGQVG^M^NHYaID` zJm#5hzW!uxEwDz%WHV| zu5!P8bnNu*TOSl0Z&B?tp1b+``*+~K_z~ zWg+wFF@CDEuzc3(jK5Jl0r}F3j`35``Tl*B?Zm5&jJe*+M{XBnKS1N})kaH}Dmx}G hRz56v?usHMA5!c(L^8$qY7;+78&gMrXnyIHe*oR~=THCu literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_popup_bubble_tail_right.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_popup_bubble_tail_right.png new file mode 100644 index 0000000000000000000000000000000000000000..4732066899f86a378133ddab9ab9e276cb646af0 GIT binary patch literal 1207 zcmbVMUu@e%822`HLfyus?uAVS8Fz%VYV4dFyRm6#?VQ6hEu~GfHAoY}wJ)tn?Q?Ax zCzW8dAU0^XA%Voh-pT_43ATy8Au$OMTcvGGOuR58`UaEes_{Z4VB*{+g@#efRzG+e3rT?Q1>MN>S9l{1I3r^JCHb$Zqmo2{Y?tIv8l>U<6l!Q1=j}n0O4) zd0QVxMWmbcsb$nhQM)QusT`CG$7BQBtRCsGHQOaGsEhodQeQ|}M zEi=Q63Wa3B&7ukG$c%?ZW(G^fOx2J~rvF*GuO<@$8wEODvnL&2u4R}FUYV?;ZH}Qg zRDx=T*>tL07^1V-L$tv5B#a~gv?#J5C5R&Eruih`xg;540;FU?l=)t|@i4@iXIA7Q z%r$HgDZ@+zfh%)d7=~=v!(wlo1Ck^~96X;O8VSGd1bQvu_#I6Kh1cvU>>h3?QY7BU&wCb0iarUkF>NC!$ioanPFT}2Wx)4JS{m{x0caWzfRf8Xr59?F zqNH>pR?d1z z53pClc(PdmLlZc_{seaE?1)ImM=i(1q2C#$XY;lYdDbh)%z4+t}xMg_l$z zt!5$d8~`cR10fkXQ57^rQkVwT{68_{h%;PN9RDen<`${IXt`DTMA&K`NNbd* z&SXhj{gQ`DsrKX24_Ef=(A%%x_YV&rJs6)q-Wi+E#}1r&{jY0I@xiX#1%Ca&vF_Mz zH2l>k3-2sfZq@t0{`})-!ax2#d2#jLpLg%xtKVGOyZ;09UFyvbTid>GdAjt}9=>eM zoq@AQsaM;F-jCl}*3UmV*VfXdFI-YiEDn6M&>yJBw#8{Jgeuc1M@<)}2oWR%c`EYin=p|2AHK{6V#4bm`K2 z>E9~xb?M~Am2*#=XzOo3{_fS0-_OUypKc7_55L^Gms($aVdv%B^VR5AlGg^|XX;CH F{{T&8lF$GE literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_popup_bubble_tail_right_ef.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_popup_bubble_tail_right_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..1670715df73cacd96865c11b164655fbed00cd1a GIT binary patch literal 1462 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(A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9+9=DNnF^?HmvvcdmlZhBK*FWXqQuJy?S*uDR=s5eRqPh{ zkSfRFmH5))2KsTA52yStw?DuD%Q1{{5)1=Ii1fRHKFWuzVfp_PGZYwuri$MAvIdLIc4X~=EBpaai6&}_s-Ye`D@pockBr@ z4Gnj0PQ6K7-CcZz!10TDlO03j=lho?Kk4wAzIh^~_Dx%?BWGtWU%r)>Z!UlE_e^>D zJM8}Zy}J%U>V=Qqdvg1ZOSk*r&vKIc*!|txl5ZQv(!Em$-O8QG*EcoKw%q)D1RA(! zb-I<;L~ozBcJ9ox&Gqb}iR1T<6cR+O&G~&%R>Abvrme*%xxj4JiJ#&>d(Kf)=eA`{ zO?e+CPu$mH-N&HlCad-R#lxQCf8DUL{w*cNFaJWq7qXMF!b4Wbb|7o~yPE5zzo+tw zC%0I*q6e?^pDNw{M7Lw!$q{L jY;Gnsy9*oL4ViKw>w&}v!?Buy^sg@*tYaqpM~?pkG>6wH literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_popup_button_dim_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_popup_button_dim_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..d4c017b43bd30454b4cf24e8818221a65229090a GIT binary patch literal 1482 zcmeAS@N?(olHy`uVBq!ia0vp^B0y}!!3HE_YJRH$DajJoh?3y^w370~qErUQl>DSr z1<%~X^wgl##FWaylc_cg49sbnArU1JzCKpT`MG+DAT@dwxdlMo3=B5*6$OdO*{LN8 zNvY|XdA3ULckfqH$V{%1*XSQL?vFu&J;D8jzb> zlBiITo0C^;Rbi_HHrEQs1_|pcDS(xfWZNo192Makpx~Tel&WB=XRMoSU}&gdW~OIo zVrph)sH0$HU}&Uo07PcGh9*{~W>!Y#3Q(W~w5=#5%__*n4QdyVXRDM^Qc_^0uU}qX zu2*iXmtT~wZ)j<02{OaTNEfI=x41H|B(Xv_uUHvof=g;~a#3bMNoIbY0?5R~r2Ntn zTP2`NAzsKW@b!fooL3ADC}5E3S0onb8|oS8=jMX^1y)^L5|oN?23FO@A(aKG`a!A1 z`K3k4!1zd0hG_Xe(Z$Hs$k5Qy(#hG?#ni&dz|_&gz{w0|1~$E>rluA~21br9mQFyOu0~F#hK4Q{ zhUP9t#+D{7ZjLa$o_WP3iFwJXFncqB_Cobq;?-;AT$Gwvl3x^(pPvIu0Rb8LCHch} z`2`Bj!Db2?;hA|U`Q^o$py+}4)+Mzlvn(~mttdZN0UW+onON+1GIKRIcQiFHH^${} zh~5-(!b~6N7=2LUKuRnyAz%swG2uxc$bn~`)I4C0DFSAVb9sr)3=E9FJY5_^DsH`* z?yJunDAM-4FLUd~gH94ETSRk?xVuc)u!7Z_v;NTWe1{LxN7g$W>eA)z?0503VR2Q` z@>sRD$1nX^RlfDy4Hx=0O}sOE&XVt6_V~ZI{jT#%$ZKUlhM-fC>ym)IDi+a466Y## z)$e(ued6iVl%k?tXWy3bcPxr%4e?}Ln>g#)=4F}Ir%!vUcUJV=3TN|~Gh@c9*Kac9 zU%h+hWn#+uUe(j+^Tm=_@%8JJKOOw{P-Bac#O{+vR!?MXb8=3V>sP;W{eHC|&ky~H zU7Lj!_Ej@B$?Ih1W=@OM3;+D`W+g|@^1gQg7Yaa--NI^W*04k-wiepKX*mfk6M|XLx14Z%eG`YBkW6$l~)j^l&kI zXz1&-=VGhtxss)pu_|X(Tg;D9?C6K3V7S3zieN7Hv*=Cb<37u8aO`zpuah=G?%@;GBN1 U?oauP$)M8J)78&qol`;+0N(2-2><{9 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_popup_button_normal_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_popup_button_normal_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..5ff79870f4c48492c6c8281811f6048041b3f6ac GIT binary patch literal 1532 zcmeAS@N?(olHy`uVBq!ia0vp^B0y}!!3HE_YJRH$DajJoh?3y^w370~qErUQl>DSr z1<%~X^wgl##FWaylc_cg49s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p/bitmaps/480x800/default/00_popup_scroll.#.png new file mode 100755 index 0000000000000000000000000000000000000000..91dee336da30c687e1a04574920b762003325d95 GIT binary patch literal 2921 zcmV-v3zqbWP){Q700009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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(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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} z0001#Nkl;U`zPF9w0|=?DQ-*XA#kE=F5OOIT zSXh=}c4lOz%v8vl2O={?M28Jl=-~}JT>C{_V~!JUc*PdFBCPO^GcL6+TEY}x&FeEJ z&_#s5(0zCP6X9Qlcut{O{J^-mkMP+l9Pxr72AEZw`W5p~6)&5r_Zox0MUDFaf7&8N TDQ*nP00000NkvXXu0mjf1?6g= literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_popup_title_bg.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_popup_title_bg.#.png new file mode 100755 index 0000000000000000000000000000000000000000..bbcece2fdca08cbf3e9ab0ae2ee5b21f3770645a GIT binary patch literal 1152 zcmbVMO=uKX93K)eZ8Q=}pc*`kBej)g=WBOocZRI#d?rh?al2VekfNE)ykv*$%o}H3 zvYRv&6fG$M;O2%;t1qZRPnhClwT9eDh7di5Zl_9A@{^}`WVF#|xzHXH_I)-^{# z0hspW$tBQ95RD^FaS#pWdL;|Gv>D0JRoBO8g6Qn3`ldAo5IGD+9WO(zT)s+?j-8XA~$Rr()SuDqqfBYup7M%4!)3-_W*WORSMdrDZLprZraQIZozMnvzy|MNTF( zUQp^BTVlmTQdP9HuB74|r}K)U$Z|>*;{vaVvZ~jySuaGUXMwt2C(^r)O>K*n)Bu+-}=Xt{rRYPUt zx*Yi}>T%sLIN4wmN=i%f)CSgmlbA8s7$z!?*NUZngex#wZk9gYY&H+@aK{9=HEy&Y z-G|%ix2z@?s}G)hpV@upqt7*h!=BtX4WE6DexcqC_LSQvw1HCxZ`**5iO=8v z|K_bOP-{9=`1|wI9YM?D)7tW}zKP#EX6IIZYCXTd?Z1B>?W*OKx8M7&KHQ_9%q^Ce u9{haveDE*4G~4|{>B`kV8m4<+yfZ}1EZteUs5Ul5|AegGr~Rr7op}jh$bCBi literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_popup_title_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_popup_title_ef.#.png new file mode 100755 index 0000000000000000000000000000000000000000..1b82fef66dfcf123b8b3ac667957cd109ad2fa67 GIT binary patch literal 1101 zcmbVLU1-x#6po0Z^9NBGDg!T>(}}jpP202$i;}-;)y~lsR$&jzlDjo*$&JaK?WO}! z$MnqyK}3d#AcEk}vx4Z83WASrz6gR3Dkv%l8>ly1JAD{?FeJHu=li~M&OPT+SLdM( zO*@(xhS`umtQYCHm43pS)%4$cW^OkfwiBaFy72(1ngL=I8}}oScg;amM5aA@@&)Q( zn3V%gsZ7d+W0Hm4xEa~RYpzex4AXJ2=9|_KBA_1)I-bmadGv$@jxDo2sRCc{HB@m9 zj|HfEtg~c|4Ov;6J$L|g)FevaB4UD?JM4v0O=jnLB|49`ITp;DkRh2}aH?GB0vZkw zNW~K|i-!=1VjLz@q6qf`frkRe(^rhaq?8gRAr0yeOVt8)6z?SV;?zNpMiYc(_pkT@_4l zSiwHfx<%05<9If%hI^yyS%_9gfpZGkxd6LhKEIN)gua;6vPuq$>4c$1ajR-V$?!Qo zlS&#{8VOs++W(U?jyl6d#qm$EG`463M$^U8r;EkrK_2axfVReu+tV&>tMR<9lxj1d zuRd)$3pVLf{5k38@11W_ceK7+U}CcQ<@wj^AHV(DY?SpiPfx74eDuLAGIu4eT}*#y zvD?;7e|z`n!JhM{ugV+SCvI$+n7Z4tw(Uxny7u?JW7nH1bI&WY8^>Q6_a|dFFKj;2 nZoYc6^W&%QQ_p_ApOIH>WAKe#y<=z5!>GaYMyGyH?K}4eUNvLa literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_progress_bar_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_progress_bar_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..75f87579897dacd44f9816d861b3b6606a8e8975 GIT binary patch literal 1251 zcmbVMO>Em_7zY(jLZ!R8eUMkkF)_U?7I7Y6mFm8qm-Rmx%*H3_*pqFsTCdz=0ly%IBsj9I7E< z+5Ud~JkR^{y|1qhruq+(9+Du4gNXr{#^WLUw7Z|d@8y;Qop^Z8j%Dp3eZ($FCL$uT zoh^*NBqI+S%k8F|VsW$-(%_s)5-A(cN1%r2H7NK@JrZEktd6 zzCr;-4pHa0q(5my(Wo*oWul>}R3<+)mKS8Iw+D2WMJ%8qTLNWuT(iV-h}zZ_@!Z*_ zDXt|Tnk8j?~1VxS)+0$U>qOdhn z9udp1AS6H)l5`|MnmnDN{e12M0ow&BqmYqibxUnbN%1j!FP9sY% znt6O4BgY$LoV%wRa)8(y@vN!fLy^Xzo-e9MvlB2x;V(W}kwxh5^20a_VHEmfEW<>Y zAm4Y|FTel{uw4Sv(Abm924f5qVo->33=?A`JjeAhTqGWad^8@9HMj}QvL!8#8g>=O zZk-FC$`zv~l5E|~==yl00tQEQTen7a14M^-aN?Yz$$H5;=^RfzT8K>LRV2qvT?O0u z6_vg0|7YBFuKa&;Mq_7ar#SvqER8K(fzEWd^zmZ1d60%X#>A~rez@^5K{T}`U?fw1 zkbAPV)$8J`tE=v7!*}1m-1>IB>%AV&{-#B4v3hi7X68xwBl5~$l`NV3DFA+U-~D}K zZDq?%b}h_$Jf4f;FN)#YZC8%0eLC^5Wzjc(d*9q!Ex8gnv^4q0ul)=0Lg8`qeD(hF zYk#KhJ?@@gIs?ACqp#h$v@leA^yt=fMmY9H(|0%brLP0NZFQL>$yX|yZO3NAT*vh0 zsZQf)tya4>ean4#rTRhZja2)<`Q{(p#V;e^<>sa9t?#@z_x#{2b+{vbwSRa(X+C)Y zT-r~b2)_PX_yGCC+4c4H?|=EW$<@(wkx<%+93PxrscbG+D%B%d^MzBjxtkNi&kE=> g*N5+d2YnU7MSQbpUM{`#Chz=q60sEgq;GiUZy7qFdH?_b literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_progress_ef_bg.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_progress_ef_bg.#.png new file mode 100644 index 0000000000000000000000000000000000000000..b134170cec68e0b218e24a69cb52554029529007 GIT binary patch literal 1286 zcmaJ>U2NM_6m}ERwcRS*QHnaPlI04ONlpBd*om!XO=>$df@GZ=vBD<6iEmre#!hXg zaRZyuO-vgPs3p||4~PlMBwm0C4NV$b`_Mfgcz}s9fi#%-5ilWb2qsly)3|Pv!b6#5 z`~LWR-*?Wr=lJ+g`tjD59W4lgv?d2d8IC*P)85nw-_@A^0vtMRX~Z5jM(vVf0wk^) zS%4+;${3J=qRvcx3i=SlJE~juAbtH#LCH-38_R+*O^@O? z&Mo1Xrbh97Oo~hu1Td}*mQ65RPG@rEi5#cm{kyR~hld1tU@MrDpVTehiQ;R#Je<4R z1dgql*b`BF-Kmk(5GEKVz?eYLpCc&>W7z-|Vpx{y#b}bE2@>9{p9=8|%hO@3cHvOX zR7ZJPOw_dCDvFQWc7Z2|QmGUu1p|gTMo=8bxg0d@hZcToMzRf%FS~$gPx5?wLJ{biaDC6TLX*@f^lu*IVD~Xt;IWBWKTU_a+*D zdIbH%w`f;Zdy~7jqhI;tE63B{En}}Yt-LYS{M+X%&v@jmm%J<0)3=-UXRrPI<6B!6 zw^f|yrl0+$jNM(RL@&jnC!OenE7s`~`&Z5K)1cZl*YZH8xQx#UU)yJ{bY0wwR-f`z zx5hfYe7DInb5sXcZ+>*_eG|DaWa{ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_scroll_bar_h.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_scroll_bar_h.#.png new file mode 100755 index 0000000000000000000000000000000000000000..de185753c9af59bc7e0708685a4ad47c014d6788 GIT binary patch literal 2940 zcmV-?3x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RNZ{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} z0002VNklnVal7^c9{}LKRLqi|}mS!VzLIRn_mSsPW z$Gb8!nj{Ip0Dan5Q0t8?S%IDv_2E+yDz;(&R9bw3amcl3grm3+!@c-VpyCfYdM8OIiZMx&y8|a0X7mHTTnn zKvUr8po?cym#YCchaG^V@Pf>tkHIsEy+)gW4+kY?cCQ8g+j5mo$?CBqsN&=`0210l UDvv#|YybcN07*qoM6N<$f@<)DI{*Lx literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_scroll_bar_handler_h.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_scroll_bar_handler_h.png new file mode 100644 index 0000000000000000000000000000000000000000..70755990b2cb416549770effc162d0d8e36b7c19 GIT binary patch literal 2834 zcmV+t3+?oYP)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>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c25DBO7E8;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} z0000wNklKC<`yuFS}Kq>$L literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_scroll_bar_v.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_scroll_bar_v.#.png new file mode 100755 index 0000000000000000000000000000000000000000..08f12eb6d2beb497ee6abda0ef45736fa045de6c GIT binary patch literal 2948 zcmV-~3w!j5P)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&#Q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Y1-+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} z0007FNkl;yYsg_X7z5;TaVjSx^HiB=XS#2a_lxR3kZvB=zYv$~1F9}IK3ob%1^%$ym~TJtXw z5v{eBUE{ie<n-zfgeBv2!O-@bvH0gQ`>Jf zmfLCag~8#+M<$Q109YnyF7TUg<0$+9tO6Sb+A=QF9-x@qfiMgo8LeaDY}61}~%7o%;>c+HJSn6`*R|dB9Ioa^|iVD1ZV;lK8XMdaMJ~ zTfx48RLxum;_N_1_Kj@=)+%0BdIQ)r-<^^*5SkKw<17Z+y`W6yzphoh)a>)tK8Q$` zkQhj8%Ipj4(YEc#b#=eaKzo4wp;8oK*p{`sA$smVY@n$r7X z&)v9LURZc_vejzs-{~}5*Yz%6y0|zqbIv!nEbKh6UAN`Gq_vh`0{{ul6i$zQkz@b> N002ovPDHLkV1lolP>uiq literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_search_icon_ef.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_search_icon_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..de7b8cad723adb33ddf29a799e09376095379885 GIT binary patch literal 1467 zcmeAS@N?(olHy`uVBq!ia0vp^av;pX1|+Qw)-3{3k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxSU1_g&``n5OwZ87 z)XdCKN5ROz&`93^h|F{iO{`4Ktc=VRpg;*|TTx1yRgjAt)Gi>;Rw<*Tq`*pFzr4I$ zuiRKKzbIYb(9+TpWQLKEE>MMTab;dfVufyAu`kBtHuNWFoz#!AFNG#Ad)HBe}%?0@jth%@)C>7xhtg4GcDhpEegHnt0 zON)|$@sXws(+mtd{1$-}0$pR}Uz7=ql*AmD{N&Qy)VvZ;7h5Huj9yA+ij{$dv74c> znX$2vrGcxFp`nGVrG=x3o1>wllaZmLnI+5&YKL?fq0y6ST@{2R_ z3lyA#%@j1kGxJjN%ZoKZ(F5_VOKMSOS!#+~QGTuhIDD-#vDt58ic zue!Lo8aTTd8=AS9nVKp=^`?*$X8J(K=z|gmQeuG#0aGA|2~YY!4m|Uu<^gj|5io1a zEdQ~dfr0V0r;B4q#jPjPyuFzX1&*JMTFbvBE41q?t81*_N2M;MZx4<(*QN6}&36!x zSFp=_^msv#!1ezpbb2y3d2Z8_llgJE#C&GFk@ZX$RnJRb#h3jvkI=k&?O=J*vW;rq ze^Z-2yBs!c^x44OQ78DTMrz*V{VLpYEXO_@)rBpnTydyB`hsmq*FXMWOL7XdZ!pX~ zd|s`DG1ggMVC^>fRi9fpY9_fgKDcvyp7E6lO;cTFFQ^W<`7twjMdpW8miqmdt+Xzx zMNFPo`7D$P5 zD*sUZ^bVKov=iHoez3e}P?P@DYn{^rdp$1JMpc_0aToNy85}Sb4q9e05-4{jsO4v literal 0 HcmV?d00001 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 new file mode 100644 index 0000000000000000000000000000000000000000..fb1d40d2ec6e470cbb3f9a24a17a0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lD%_R&N=lwPs(PqsB1R5 zu&{tBrNnWZ=!1gfT*Yx5L@C8{b91;WfU2s=IF3=H(SVBr&}cM(5JD1(M6xRYV@wr7 z&`PBed``u7no_A$5FvyTLX@rm2qA_smRhYA2LN;t0DRxa$z)Q(7|UG&2q8F*V~tW8 zaL)Nf0HBmg2qBdaa?lk3V+;VGQA&Nzd2~Sl6oin5F^+oy5C|caQYv?@LM{S;j1Wp- zjH9jqlv2StXM_+H09qFTfDoc0geavn?8O5uLI}ihoM4QpK@bGzX}ly!5~WlFfDmKc z>HIYbs6UVW^7~67Pck4JMB^N@hQA!&abgFdOeQA)z(fcw zA08h5a`o!f;6xpoN~Pj(&VK@cRgCeFVHiIchB0y$5S_3YF%07ejPVdcXe9`OpQ_cW zd*T+8Wm)m=?rw>5{?|B;modgerfFUo7#O(JS=gr%HjFW4U|`^qX_{9s#zS!&ziPMJ zf7{*N-TqYQ^xPk?EKB5axpxBt1AkFfwM{Agv##rtvMi_f_xFpfJaf}a?b0X=hfTo_CDv_7eWM`WQ<9Yq{y5^GjH;J5K^^j zwfZvv6f{j6QdRYPS(g9E7@Hu33?hV*2q6Xl5XUi(%K;{X5v literal 0 HcmV?d00001 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 new file mode 100644 index 0000000000000000000000000000000000000000..aa3b9d9af8a40922c6173c04f3a8b9af3ac7a428 GIT binary patch literal 4640 zcmV+*65s8KP)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?>%_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bU8t zuh+j4@M3hgO+~NQOPkH6&N*){?f@gZExX+=A|gk`Af=RZ&O297840I|cugrK0?P1n z4Lx0|pk!8eHNB|_DS)VWg1yMl+*a0f2;12i# d009600{~7bNfD1aD)j&W002ovPDHLkV1mFPwebJ| literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_softkey_left_bg_ef_press.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_softkey_left_bg_ef_press.png new file mode 100644 index 0000000000000000000000000000000000000000..2ddddaa2597b59be6f087628e1da9d4f6f257f30 GIT binary patch literal 1393 zcmeAS@N?(olHy`uVBq!ia0vp^2|(<}!3HGn+X>eJDajJoh?3y^w370~qErUQl>DSr z1<%~X^wgl##FWaylc_cg49rTIArU1JzCKpT`MG+DAT@dwxdlMo3=B5*6$OdO*{LN8 zNvY|XdA3ULckfqH$V{%1*XSQL?vFu&J;D8jzb> zlBiITo0C^;Rbi_HHrEQs1_|pcDS(xfWZNo192Makpx~Tel&WB=XP}#GU}mUbW};_k zVqj@vsiRh+i#(Mch>H3D2mX`VkM*2oZxQ#zd*q`*i_F@Av`lL zCBM8Ftlrnx$}_LHBrz{J)zigR321^|W@d_&o0E}~p_zfRnVX4=p`ojhqnV+pvw@|B zg_)U?i;1}tOs`9Ra%paAUI|QZ3PP_7PQ9R{kXrz>*(J3ovn(~mttdZN0qkX~Ox$j9 z#AzN>ZwhX=IN{W*4|I$^C}NQ!8YToxJs>7L*#bH6grAxROzlO$WIZK!$yx>m#;2Yx zjv*Dd-rPCub=X0q;i1~(DYKR>y`)t7l=(|z%&$9ncRC~{G_BpPVm!G*NmzsR@)BK_ z5C0z~u)cj%Gc(TYyi4innW|adc5CYCJtu5V+MHsIEn(fU z_FtfzH4C@H^1nZg7WzE-R;JJ4d0U<1&ei{_lP!Ij9n>479)_l=6hE$vQ{mu`WmxsJ ze%Jh~?^$=ht>K#D^Gfeop+wvDsMpWU7+QCKGXBmY)v(y#@x{0Fn*00b_$_~b`|Y>2 zybXnmW!qBMuNB*0&-Kdomd$x?#vPN6vopT(w{4Z?K5&ua+S?7cma8vUh|`4l-|W}CiQBPnk6?SDO#jo5>ly5-kn{3v-Jrf#S*2)z4*}Q$iB})z0Gt literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_softkey_left_text_bg_ef.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_softkey_left_text_bg_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..950cf232e9253d14a110cd751348931c21621a01 GIT binary patch literal 3152 zcmV-W46pNvP)r002%11^@s6|Nf4~00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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`!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}lXY%D(;Nl{rg%>m z$B>F!Z|?ec&vuY#C`>o`=-+Yka2$80o#Vcs{bl;CVyEP8sd_N=_W8x%HuQ;IyY%?S z%7lO$(a(-s?-HN7)l4bM>$9*x0EY&P2oo1$Yl9Pu$gkx>ORuo++_uRo@>;BNx&Onf z?_cvr-cPNa`t@d1w%EcGt5Wx#Fyia%KgOiCV~Vxsuf6s6^(DpRSx-+_)v)b4=4dE4 z?Y*j<&IrsO$kag6<0$BoJwTiIJz z3aJUzFFKN!oBHODu&qL$h(Ji?jWlFcmHNwnwBFUs zXUc-h_vZb-_5AhMRei^k&AuB*R|dR!F|SkTopbK%cWdiqPTuynQti4neXfK+|MC7s z8oNIKT+`@eHzT8@tE6&Xd7+GPV204?$AQV4Z!)w_>sN71+Ir1l;mwtwq+73rX|jq$ zRisbLWD@yhZ}W%c%l2drjUz6K3t(X@h!n;Sijc5&fJnPQX-E_xq5>ogiW0cA65KS# z)@vdE8{a&fopAX1^}qfb%M+q}`)kdQX=J~Z)|kldvRl+z#q-GYE7w_;-Y<{6UfTbZ zcgpn3FQ=qMUVB?+J@xrcI~l%ZI;Ye2-`}1&E2{4Bhu!zzzbe~(G&EE->h;^FML!?E cw`Y}La8^04bvyrWH>mjaboFyt=akR{06cCc4*&oF literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_softkey_right_bg_ef.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_softkey_right_bg_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..b15d34f60d9b46c5168798d8dc47274b0f2f45ef GIT binary patch literal 3235 zcmV;U3|#YxP)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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qJFcLjD2%oCbG=@FVZH)@ z;c%E=E*B}wl7-c%AZu;9-EP~uu7%E50MK>ac(>c#F<+^Iy!Xj|zjxTA1i)Hr&gV1V zS!z{K2w~8+EjPbb0z?GkH31;y3hFYG~Hvj;<10qcTJ3szCA zzn=ssCIIu<04fLoS{20a1N0L>1u?>G01&u>BCR0ICjp$Hh!F+=HtD?saOlPQ82}oF V5v~^`!U_NY002ovPDHLkV1g+!>$?B| literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_softkey_right_bg_ef_press.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_softkey_right_bg_ef_press.png new file mode 100644 index 0000000000000000000000000000000000000000..3f1bb502012ca4d8a40ce1745f5cadd056ae2794 GIT binary patch literal 1349 zcmb7DeM}o=9DX;5-AA^uu}py&FNbjnuJ=(2v^QD?y%riQVrc?@X^-AZIpIFIJGjzC zoK0k!sU*&*F=O*%i^?3BsWBTWngxh1W)s}hZOK?7#vlVswhZdne2-D^4{PEjckkEp zJip)Xd4Km}ZB6B-4Y?Zt0Gs?(Y!HoM^wzAq4}Gt?v%Aocqk9|lI=M+VI2D3&UT%b# zU*w`N2sys9?ORw1Kn5;^8uW(1V@yOA3C_e2F;PKm07}bZ3KwaCI@SoIg5<(y2ZwM> z;9YoqQGg049@s2Y#Z_1ruL(usEfFV=m$|Xh7=r{vsB>6MY?U-7=E9eB88kPyNgP{( z=q)b%UQ!K#TFfJ>5Gx`mYlJGMv0^(x+bO5rxeK#VG)2-jk}9#%6jM~fP&Bsu;3%5P zH!(rhw;T(tTzIptD-1~*hCvvGgsetM+UazXl#R66tO#M%IwhTpStTt$rNBZhq6&&G z$P#8Ma*cAk?!r-~_ev0z6t)jx=V4YsO$HCGmE-OdcMJVYhF2Bkx zPs=r1K~zv=7OFxA5VGJP5#=Q+~EQ6uUHig|0rc2Mo6j`17jw*M5-jWR?H^_JN68cMCQr zJamG6SqPjnl;`q(eE5Vtao5tbd3bV>xc~j!mg`${2=f=k0N4Y-J}@`C?beRMk;U&% zz4hVFr;kdDKQ(t8`oXyH$NKa0(tKW7{GG4*j#)kiH`cyza@X!x_P+G&@t*3NPdpQR zwEew{U^+8vr$0FQ;ONlB(dXj>?&Gsl$&Fylns1?cYbx9J|M~dMwqx%3gHI*LuL31$ zWIV7jJT|#rF}h|34u1|N2FJIsd#~)iQB{Bbkr^c!o$4Lx_--P(5WfB8$qU)x%ZK-U zGBMQq+a+OSAZO8-dH2YxedITD*FHNlZvk)4w?wlK#h*NF$)xT~3Ek1#85uu^V ISA-LP12Eyv4*&oF literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_softkey_right_text_bg_ef.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_softkey_right_text_bg_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..ca9c21ceab2e21aa94983892b44943b360ff6a79 GIT binary patch literal 3301 zcmVx!^P)r002%11^@s6|Nf4~00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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^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g4F0$^BXQ!4Z zB&DWj=GiK}-@RW+Av48RDcsc8z_-9TH6zobswg$M$}c3jDm&RSMakYy!KT6rXh3di zNuokUZcbjYRfVk**jy_h8zii+qySb@l5ML5aa4qFfP!;=QL2Keo`G(%ftjI#nTejE ziGihwrH+D;fuVuEp^?6Uxvrssm8rRvfuRBvC;@FNN=dT{a&d#&1?1T(Wt5Z@Sn2DR zmzV368|&p4rRy77T3YHG80i}s=>k>g7FXt#Bv$C=6)VF`a7isrF3Kz@$;{7F0GXJW zlwVq6s|0i@#0$9vaAWg|p}_G8yuzFu#E6=>*lEl2^R8JRMC7=m(LT&-jW|!2W%(B!Jx1#)91+bT`GI6`b z5T|)iy(zfeVuVw#KF~4xpom3^XqXT%^?;c0WDDfL6MkwQFtrx}lXX7hmS+qMO!l5G zjv*Dd-rV)~KV%@$P!Y*pDkqu$ zXczwdRQF9&(YfA^I`7Xy0s$NvEFw%?jI9k$EF!x!ice0S5|msSaXRL7%*iK4YkA6F zU-Ca`v-1ACGhCCRD|dX~zwhLmlzXYO7`m8!CpqwKj?pVFX7ec5u|0L?#GVs5sagC> zK1wfT_576YTQV*6-JOe{U-ZvXpBXMG?XZz?irEdVDfiq?ezNIz{&@VXmP1gbN@>dK z9rpxXICCfSc|}gUN>v#U?qE9c66Wzt7)%^USdYXZ~&s{{D>PIGaaQ-1(H( z>vEqjp162Vm%AINAre&e@L1CNLAegT)u zyWNh6bPlump>U5|oC8IFh~&BxOuog7Ap>SG-aGMA*cOd*^HZwOhY? zYuMc8Mb(pk{{NhtaM&`J@A}?VT5IS0-u2E)Q`vS+n0EBEr+HR$_xY<$&e|Ap<@3)w yr{4Ppia1C*{Qeu4yZv^~=9@iRuN`e?U}o4Fdtj^Ivy;m~#jB^QpUXO@geCy>2Oa|e literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_split_handler_bg_ef_h.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_split_handler_bg_ef_h.#.png new file m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NZ{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} z00011Nklp>i3rtr zyh_&(Z{uQ~MoNIHZd(2kGTK<002ov JPDHLkV1kSeO_u-w literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_split_handler_bg_ef_v.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_split_handler_bg_ef_v.#.png new file mode 100644 index 0000000000000000000000000000000000000000..d2223f0aaa1681c0d7014660927ba35cd90f22a6 GIT binary patch literal 2863 zcmV+~3()k5P)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 zZ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4Ee$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} z00015Nklmo@^L#IeTM7H@X!;M!Nnx?Ka_U#=UZ+QyPJ^+F4CQsIp5}p76 N002ovPDHLkV1k42P9gvR literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_split_handler_h.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_split_handler_h.png new file mode 100644 index 0000000000000000000000000000000000000000..372164e93067dc4865b7e9fcbc2f1c185dca4fdf GIT binary patch literal 2812 zcmVKLZ*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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kljF+N$mC!XrnVH4B57m*f*{jOKtSsCNte#i zgjGcK!a22@_>E5)&1y002ovPDHLkV1h4; BNPz$V literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_title_press_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_title_press_ef.#.png new file mode 100755 index 0000000000000000000000000000000000000000..41a5bf5c8437e57ddc84420b5d3cb617b6fbfe62 GIT binary patch literal 2855 zcmV+?3)u9DP)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$+o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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*Nkl^`{t-o_W%F@07*qoM6N<$f+(#=0RR91 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_toolbar_bg_shadow.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_toolbar_bg_shadow.#.png new file mode 100644 index 0000000000000000000000000000000000000000..ff630609acd01e52df521946f9a005ad33ce5764 GIT binary patch literal 2843 zcmV+$3*_{PP)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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uW$^0)&Vui?pe|Onvs4~OY*bt zm6+i@wsYD^%W6t*e5cQ*=tc_lMqX}j8uY8&zl)uwl6yf@@6z~TWl wFJRmG2fm&w2ek&W^~cA{owYB|u5QXBLFfVa{mn?|o~?g4yo(pE-ies@Kdz}D$N&HU literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_toolbar_button_bg_dim_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_toolbar_button_bg_dim_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..e7dcd4d8915f274014f66e470321a8ab977b3617 GIT binary patch literal 2617 zcmbVOc{o&iA0LH6ncHG1;usMwvzdjdA+s=(HH=*8X3QK6W@+Zgphen88?L1*T2PiK z(alz<5n65{x@6C-dvi6(RkV4JO7Hu}eeNIcdCob%<$OM$@ACV8pXVI*@p43Wym9`H91zSgsUAxbVfHAix%K!$Dt=%a7aE3a&#S z=7$OV1ED}q4+>8#L~~~`Xt_`Vvk{1O&TSmfQBkVedK4hwQ&F3Uo>)%_ z9gGmL;-#Qpyq7;OK8okaM>#tI>*N$zKnOxyKrW0H$tZFv>a#8dp3iP$P{3yh6h%dS zaVpT$2cV0kAV5Uh+wrhC96%zWaRefXgtGRA_jzA%jD0njP^+Lhcr2H_7 zFT?e#EqFymML>{*g2BYb#-d~G(PC*h2IuJLIIDrj+rbDsS)2&s%I!ol^Em|uDC0>5 z5=bBx0kewSP;m@IMZuna2|+0F^!z3)l6_4SoHC4@E5YE&8E# zW&Uvz5aSEV#4%DHd>&!ub7VMo|88g&2zx{EmI~lQ;YKsWyci)Ug4hfy3jTuT3-}ZU zlZdrv(CADe-GPb6;T*|Cx}zhFL?^f~$@V1DoW?(K2}}YLM|QP?+x^02y8bJdLYIPENG$aii=*c%z$ZcsiDeOD2|)KF z0alv?BEC3QW<7g6U!rAzQo(kR?!u7)`jedqv2?<(}d4)JCGb)v5r_K zoz7s|yE>r0a{2#H&M>eunAzg^pJJKYf-7)#`mOZg#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Axq)9-wjAR?XUs@+c%A z=a=qcUqO(MXUU-B#&wxiw*p>d-^n%K-vUH3lJrmF)VdY7Q8&iM0PCQ<{3kbMSDM?# z$H>apaL&S^Q<|cc$ S)^D5rnPW4(7-h7Or2ha6c~wvV literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_toolbar_button_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_toolbar_button_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..24c647e8eb26292dfe101d9cfa0748e6cda54f08 GIT binary patch literal 2695 zcmbVOX;c&E8cqNasem9Bk;NfYF#<^@kdOodWJ96^5vc|RBqS4(LiPc|qEbOwDuSY* z!o^yYMG9&oiUNWQwWt)Xse%f~Rx8R<8pRd8!AkG_(bFGy&dhwvJkRqk-}|03IU&Jo z%uJV=A`l2Ob|5oUKayr26J!0mYLB<0ez1jETzI2Q2q*EB5P~L<#XtaC!i$AMA)X*v z(GK|_5Qai=7#HSpf+&2M1jC!fVAK-1o{d2G_^IVQejEe?F;J{nN<~dJwx9s9fQs5o z;NUoN1|$*(rYNC}DZydF&bfNUt zlma0olo{~JmVQM=iC|bx!D5q=k}ydg7@0B_3zEs?Sq(hiU5{{AB}-wR+Fh!0o>O2# zD!x)Ihs81}FssOmktM)Xl-|=nLy*WhoWF#ns!xg1rwps+$*~{?hm}ZXb;??SBmwA!i#6h_z4n73bUD1l>Q4w zAQn)VECSAhNoTMK3=#_uf@CiOgG{Cq8J;wjmj{tJr}1}OPZAvmk^&e^5?#+^;pr?g zgC5`o;z)E)CLPC`kR_?mv&Zviv`k1TPJ{#jN|^-sm|u$cZ|vh}USyCC((yE==f}87L{b2b zjAJnvOqNFg3H6C9_~TH)=9AJ=wk3*YI= z%BD+wTXap6I-ki@^ETWjHx~9fLJ7!<(*j&AjUA+!d7~O>bkZI5vE)Tk-SxQ%`GJcH_C$pS!v4z5@9;W=K<^ zogv70F*Y=(ZRj-bhn&`{B`+%%nl#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button_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_toolbar_button_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..10eb7cd421e3b222543aa1b2c8bd2f2c1acb78e7 GIT binary patch literal 5946 zcmV-A7scp_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?u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ei@7_@Wah7HEAHfEeWxoq{UDv@dm)~}j%Viq?-$M^Q6dD>DO3AXEG0jKD zk+n#(T^%hHI7}A?E&%w37RpuAQFIvq91e%HZrwWfz`(#HfEdFt*(<;VhGDLb2z_ww z3P(prN6n|7ek#w*%%n|MIE>>oX5Pgb^YsngbVr4&si~=GZEdv=3=GU&;b0i1e1&+v zzc6q$L`*L*F4agczx=ZA$dMzqNF-8@Mx)tGCX<(CS*68{xn{9gIETX_N|I#p`~9{+ zAi&&r-+kF}v%V6^^j@>M6 cLCpUf0OTHeHPu_GP5=M^07*qoM6N<$f=$9VdH?_b literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_toolbar_button_ef_press.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_toolbar_button_ef_press.#.png new file mode 100644 index 0000000000000000000000000000000000000000..7e814b24f1d23439fcd7bc0ce54f61013def3bb4 GIT binary patch literal 5184 zcmV-G6u;|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`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zcSLEEe6C7YSGS6n76cxC;T!Zaze#ttXhZmz(n|a5@ZTGjf37^J<<6ezkwl#?^QQd64rC!AdDC?8T4TM69}h-Qd6l@ov%$B9hGWK*xb;b37@`G@5Ycq zUCddSZXe+-&1$8lZge!;ti{@t;)!k+LiK)rer2)w71W=Bi6_Pg(!Y-Uy}OcEXjzw{S`YXVykCT(z_metfabptW4zgZodS_D0vAu>tMDn+O2l!Irl=vho$_U3TDqK)*8n>!Cr%>{JG2Q06wuaEq=H1-e%x+JfKN62h zF>tSR9a`jA_o!WoGosf~k-(HhL6}A66ymk zdo}0xjE;_uIaP$HdQT4*CMj0zGS_xOxB2DjBLU}<__nq- zHT#1;4?l^$d>cYrQ>Y1a=dP7S7LaM_ptnIN6+h*gKtS1VyebD|lWWxr9<%w;o5iq7 zP_&c1#z5JINKI3Q)(3H}PHg(XSSna1DWA}3epUE==%xt l?|5HIuk+BYg-uy^0q(`Jv`ww6pSS*zNkkh$HO~F){{h$D@}mF% literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_toolbar_button_press_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_toolbar_button_press_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..df5fb21ebf88a276e5ce8d30926b3c51272e4f46 GIT binary patch literal 3025 zcmbVOdpwi-A0LyXbSOn9)r_Qz+1)m_%(h(TGMA|+vkk*8wrA#6DMcMh7uPOA3guFA zOA6IFtCaYq9CJA?DVKwaP{?mOb$-7;&g=Kb?|D7X^SyoE@6Y{tJtth9ZM8Ii)&zk- zTK0BShH}I$J{s!EcR{@6M&+;$pm_uC!T>t1x8YBdSk|3c7 zLUG4JOqo0ZM<|nQT};nk-cq?@UO1PtODyC=zQvco`v?7SvIQPtgRnu8spxNhEa(4;nYq#!^Tp!$uVVSJrL4fk>EETVT>RZUT!FG<#LCuq6BlL# z0%@q&Q^_6?iq7*Pq3-Y2$zMFL>UZqJO`{JRH>>6xwGPtAW^AhzxL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M3xYz8r_Dp-n7yWh2l#%SJ`>aIpr`8C7ndsLxnfE&?U{^@zNBFvd zrX?3Y&4QuCVa2OXhJZPJe(#jW1M=+x+~AgLKGspk8PH$4liJ=bZ*RG0?WPkq6PGJ1 z8Pa+9Otq&_)_v_D1#HlMJuBuD^J+NQYN~VDQ>!(v>tW4xOUqhh@E^SeXwV&h7is z=XbioG5Gas{@WPRg2|&&^5$yvRGcS9`=yQh(*behY5Cj-J!cX}Z~EZWL|`!9X}u53 zVjvJXo%yxz>MXhbGo)+uL+F98GmiIdWaBd@(&u4ScXhJ#k6!>Kr1{n?#TUQs6yXeL zH_sQB6t;Jl$u=g}Ohy?3!M^7WnUr`0xgs zR2%M^bUby~c7LV#?Z)lI2iMA?LE}uarut1imqRmEH`r{W5kd;sAo|bGtLaA|<*Lt? zv*sq^MuV}2&8VvI&T{pb9fx_ZuHI@HNhi(CE>%R;UyAtP8R#i}zAulnJYdMw zRAQM+Nbg{jDfq^iH^!~h5d+s!Xk*uS-E@8ssdry=zl=MmuFwV&E6gS|0Tq!&`fSs6 z3)O+pE`=k75EBR*cDR~%e`no7$sDBN;QSXMabt4z>V~m|%AQq3=Q<9)s!u)dZr2c% zlHK)e&Z}g!-0RqQ{4$T1tzW0RiEH*d-u$EXvse8PFlL>x8{RE0UO(*nT<|Dbk+ifq z_~I05V*Syea!P8*(BnSpU()Yt~{su*z^gs5rGuZO^$&hgz~XnfESa*8{Ti{Q!gbs#WEUTpuqDg?h}@h97! L=1eWI@jLQwt=}@? literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/default/00_toolbar_ef_press.#.png b/res/common/usr/share/osp/bitmaps/480x800/default/00_toolbar_ef_press.#.png new file mode 100644 index 0000000000000000000000000000000000000000..bcd01e5f01bcdb953d0d21468e8a86e11e14c89d GIT binary patch literal 3094 zcmV+x4C(WUP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghT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nF!Z0*-UGH72G4uc7+*Gf=@6TM< zwYoX%ttg6)mdj-n1c5G9xHy|XB}sDWdEU7YVlX^}5SrsSX;oDZy|2s6(r{1(5wS)@ klg8KNdAM(xr{en^02_gLy~TP#x&QzG07*qoM6N<$f)MY)mH+?% literal 0 HcmV?d00001 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 new file mode 100755 index 0000000000000000000000000000000000000000..41a5bf5c8437e57ddc84420b5d3cb617b6fbfe62 GIT binary patch literal 2855 zcmV+?3)u9DP)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=b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wAdX;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 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_badge_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_badge_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..2a1d7d0abdea1c13623c24eb1ef44e1cea894de3 GIT binary patch literal 1909 zcmbVNYg80v7+$;phd?7eh=DYWikH~SEW5K8U~R7g+bS&(TY@$046wlL?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(ru#ucBowc#1fJ&V?@TX)8xPvCI6uk>{~99~{tiN8+E2+B7Jx3^%G?F*!)#b2+S_&E!aGOi*jkPqKJ0&He1UW6s=1vW6>-j|=siSt z&%3{fY61)?DMzYxExKTzD|#7nWVi5C_WQR6{QUg3Z!f=Bnp4egIiC~c*fg|gzyMZn z%y?m5*{?-WA@^U3+ZXxXrE@V2qC8-Mo45Yp6#N zQxsNXN@HIX1q}OVE${I?sZRC(y1K(olVgiL7ii}vjK<8&yepYq%-<9L+j+l5K2i0l zEzrcSS8kb*I literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_button_01_dim_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_button_01_dim_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..7a93bed987922f62451c36ae36dbe5e6a1b86d80 GIT binary patch literal 1361 zcmeAS@N?(olHy`uVBq!ia0vp^B0wy~!3HF^H`mkxDajJoh?3y^w370~qErUQl>DSr z1<%~X^wgl##FWaylc_cg49sbnArU1JzCKpT`MG+DAT@dwxdlMo3=B5*6$OdO*{LN8 zNvY|XdA3ULckfqH$V{%1*XSQL?vFu&J;D8jzb> zlBiITo0C^;Rbi_HHrEQs1_|pcDS(xfWZNo192Makpx~Tel&WB=XRMoSU}&gdW~OIo zVrph)sH0$HU}&Uo07PcGh9*{~W>!Y#3Q(W~w5=#5%__*n4QdyVXRDM^Qc_^0uU}qX zu2*iXmtT~wZ)j<02{OaTNEfI=x41H|B(Xv_uUHvof=g;~a#3bMNoIbY0?5R~r2Ntn zTP2`NAzsKW@b!fooL3ADC}5E3S0onb8|oS8=jMX^1y)^L5|oN?23FO@A(aKG`a!A1 z`K3k4!1zd0hG_R$*u0|G?7S66l zP6p=A=9aFG#^x}+o_WP3iFwJXFncqB_Coa<;?-;AT$Gwvl3x^(pPvIu0Rb8LCHch} z`2`Bj!Db2?;hA|U`Q^o$py+}4)+Mzlvn(~mttdZN0UW+onON*MF*G-Ga&F>x^m z``gIO&C$i&%-qz>z|9imc8J~-a>7g>=oo!a;y_9)Fd<+H1To=BAIO1cp42>Gjwu3W zjrK(Q^$ZM*jh-%!Ar-f-Og-pz*g>GpI=ejD>0+>M##V)2ETE;sAdq?B*|oW9B0+WFcow?Jj3?Hyg$f;|tW?w_Q< z^Zla*gRGobO*`-M2aHnvd7Ctya%!YpFJ3ILnDg!T-}mo(`X3b<7;l_xx7 znY!a#Wcl(#jAsu@?_hs#6BlMH__R0Ivu4`LD$5@aX0guwxyYoWz06s>bsviagY(6u Uw#nri-+>A_Pgg&ebxsLQ0Q`~U_y7O^ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_button_01_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_button_01_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..02cfb9dd13ea0809b7c966cb575b83870db7ef89 GIT binary patch literal 1405 zcmeAS@N?(olHy`uVBq!ia0vp^B0wy~!3HF^H`mkxDajJoh?3y^w370~qErUQl>DSr z1<%~X^wgl##FWaylc_cg49sbnArU1JzCKpT`MG+DAT@dwxdlMo3=B5*6$OdO*{LN8 zNvY|XdA3ULckfqH$V{%1*XSQL?vFu&J;D8jzb> zlBiITo0C^;Rbi_HHrEQs1_|pcDS(xfWZNo192Makpx~Tel&WB=XRMoSU}&gdW~OIo zVrph)sH0$HU}&Uo07PcGh9*{~W>!Y#3Q(W~w5=#5%__*n4QdyVXRDM^Qc_^0uU}qX zu2*iXmtT~wZ)j<02{OaTNEfI=x41H|B(Xv_uUHvof=g;~a#3bMNoIbY0?5R~r2Ntn zTP2`NAzsKW@b!fooL3ADC}5E3S0onb8|oS8=jMX^1y)^L5|oN?23FO@A(aKG`a!A1 z`K3k4!1zd0hG_g7@hOR~y7S6`b zt`;T+K*OAzElgp0J@bl767!N%VfJPM?S<+!z^m8FxhOTUB)=#mKR*YS0s=DfOY(~| z@(UE4gUu8)!ZY(y^2>`gLD2*8txIZAW?5>ATTy4|I$^C~+Vq7MKt)1%jCHqz~l4Gf!$BFvk=D zvqp#ZTVS?iT}EVqmBu269k7LuN6*mvwmhEGp-ceDS4JC5P; z&FuxrA2=msdK}Z6Hzx)taR)BSefVpBkyn@J!q%e6{bp}1?f>t!{T_2EDt#HR5?513 zRE?Q%e!!U>g^m_Ck3VIY(jfTIY{%Q?@(&!>{gazadUmY{TfJODep>2Q-^(&SMUQr^ z%i0=sv}$i%X9;)zy8{Z!*+qG`zxgh|Y*{Rm&VHWjK>T`+AF+%ZMbABqxyBH+F=}Uw z-6xy(VVYkjoqjs&$8ovY%U&FOU)53jROVbN@BLjCdzgMktxY?@-qHKy$wAZ8tW9Pb zOs2}N7cY2a=~Orx3q9eluUY+>|L=Z2O;1L5(K@pwcIzJ`$u3jdv7vv`FR52caV;)%`4@?{QY=> ztjW@?|NS)7%eJW~iEiMQN^Jk0z&oeG_JinRv&a(HWxsW#4krupMOHA&H0357o3oDl z-T~$xEcaf_Y1PorbDX2suBDLmLGc^&t_RXqwf{2&+B0)(?_ZzKz|3&GaQ-x{d5%j! O1)`^`pUXO@geCyc{_p_+ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_button_01_press_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_button_01_press_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..8e3be1db95334858ddac1102ae0d67eb553b20b5 GIT binary patch literal 1540 zcmeAS@N?(olHy`uVBq!ia0vp^B0wy~!3HF^H`mkxDajJoh?3y^w370~qErUQl>DSr z1<%~X^wgl##FWaylc_cg49sbnArU1JzCKpT`MG+DAT@dwxdlMo3=B5*6$OdO*{LN8 zNvY|XdA3ULckfqH$V{%1*XSQL?vFu&J;D8jzb> zlBiITo0C^;Rbi_HHrEQs1_|pcDS(xfWZNo192Makpx~Tel&WB=XRMoSU}&gdW~OIo zVrph)sH0$HU}&Uo07PcGh9*{~W>!Y#3Q(W~w5=#5%__*n4QdyVXRDM^Qc_^0uU}qX zu2*iXmtT~wZ)j<02{OaTNEfI=x41H|B(Xv_uUHvof=g;~a#3bMNoIbY0?5R~r2Ntn zTP2`NAzsKW@b!fooL3ADC}5E3S0onb8|oS8=jMX^1y)^L5|oN?23FO@A(aKG`a!A1 z`K3k4!1zd0hG_g7@hOS0V7Uphl z#%3-SMiv&12Ig?Ro_WP3iFwJXFncqB_CobKF>x^m z``gIO&C$i&%-qz>z|GRwTnVZ-g`6)0M1KY3uUbiG9F7w7pqFgxD4QHtsh$pFDTs z6Yd{w;z!vQcGa@THLE{~;F3%&XzmiFY6MbMo(b`^{90hb>h{Ecs+gQ1|i2-?q)4H*0lL$eN;zFNxWm zE{{^Rrp`(;n(4VPU`F&bRky_xx1apS`Yh{c(!~ZHtrm+i8FjhKW#f^g-!fzQjO=NrpMEaeUAz7D)+pV@x8EL{ zb@mzO^FOREfg8%6H(y~CK5S66H0Y(VSHax#&v)+b-Bh*ropk^4hbL2nj-6r+U}Ce3 zR&91!lqa-0+ja3p%WDa7Yr|x(M&Hf7a`Bt-jeJHn23uk4zgPF~lLeK_p00i_>zopr E04Fg+c>n+a literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_button_expand_closed_ef.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_button_expand_closed_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..b825c5d2065c66fc9e2df6ce1b5ab9bddf545dd9 GIT binary patch literal 1453 zcmeAS@N?(olHy`uVBq!ia0vp^av;pX1|+Qw)-3{3k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxSU1_g&``n5OwZ87 z)XdCKN5ROz&`93^h|F{iO{`4Ktc=VRpg;*|TTx1yRgjAt)Gi>;Rw<*Tq`*pFzr4I$ zuiRKKzbIYb(9+TpWQLKEE>MMTab;dfVufyAu`kBtHuNWFoz#!AFNG#Ad)HBe}%?0@jth%@)C>7xhtg4GcDhpEegHnt0 zON)|$@sXws(+mtd{1$-}0$pR}Uz7=ql*AmD{N&Qy)VvZ;7h5Huj9yA+ij{$dv74c> znX$2vrGcxFp`nGVrG=x3o1>wllaZmLnI+5&YiZIxhOTUB)=#mKR*YS0s=DfOY(~| z@(UE4gUu8)!ZY(y^2>`gLD2*8txIZAW?5>ATTyO0Qv}Q!mKu`-85kJvdb&7ld3I*A<|=$$7hs`QGy9k7E8DH6dScxVU6cx)r^m<43KdD6 z>{2RJA)g?ncrR@ARjq(u2UG1|#(tad@#K~RTbE@%UnV_UX$@=hLE|ptFxwTM|5<(R zWpC#DQuU*@r}k~x?~O5f?;p+hv11u$VQ8p-!IyfU)OE*arpxI6T9{n9_-_wqozw2oiJ)2p$$W6tYi zFB|&pzI?yD&6sW4tFKj>V%;m3HTDScaaPMLzFW!QfBkFv7v4*yNjyukw%%e^n{xJJ zm9Bu9#i_fTZ2dp1%VzoYHg;!itxBC$;&OCOvb>FYRbG$b%krsSsq^c-KTirczAsoe z{20qjwXd4<&#(WqK{B{kru5DK>4pMXX0!8e=9n=ByF6L3`=aDAiHId9Ydx1={@iim wZWd2APmZvi<*s+)_wGlZzhNwQ^_OS@!_K<=q8#r3OF;#wr>mdKI;Vst0C=1X0{{R3 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_button_expand_opened_ef.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_button_expand_opened_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..c4812ad291b9c4a43073ddb2b5648a601b8b1942 GIT binary patch literal 1426 zcmeAS@N?(olHy`uVBq!ia0vp^av;pX1|+Qw)-3{3k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV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800/white/00_button_left_ef.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_button_left_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..415eb77950cada7be5145bf443fba7f83e1f7fd5 GIT binary patch literal 3149 zcmV-T46^fyP)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;%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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} z0004aNklp0g}d;BOnVT{DH^o_4=Wzo`ve`7w9rD1qfi8&E`c|G%(x`Z8REJs=5;v z4Fuajhr+hdp|ImP$2L$^9lV{=>GTWm1iS$XOjoPbOW=Iu!+OxDTCLW7sZ^Ttvjvz1 zHi4B2x~JwOTFrc}W2Cz_x7|RZVug-D}r%S9|bm6fmlq_=abqg1_)erBcY}^Mx>NNfAs`wZHM56Z|4b}*900000NkvXXu0mjfA-2|i literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_button_off.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_button_off.png new file mode 100644 index 0000000000000000000000000000000000000000..f00f6e0c48bbbcadc8a66e6314aa5173ecc92f9e GIT binary patch literal 5640 zcmV+j7We6iP)Z00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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#ey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m;YeHsbWLbtNig5eZZT375Ns>Sa z0s~H1Dxcw{joX(q#jsYd9}AK$p~#?lo@05r3E%g*+wEeyUpPzdLn;NOihlXUzpo1! zAauK3_@2+p%T45YKFJG!Qc5-Ijbi}m>p;WzgQr1Q%CkJ7!rECVrEu@w1{-70@AoH@ z{{NlXo7&ud)Q2$!8yg#}wK`9@Niq_(dSk4#e)Oj99RRfF7j7I`V_jy;QVJN8qh7D$ z=FK%eJnWz!MF0s{YyU5R^YqvO3G|}~hX)<3t*vprUWYL`q?9mu#w4UyZ!A0m(EqpO z{HlrlAb3!%&oA`PPIReM%9$Iy*_2F0fuo5&-1Xpe%F@EWsJwqPZkV^0}+;L zVrjYcI{@t~fd(M6EcT)AQcOzEqJ*E><6)C1 zX11`_!Waub2zY5}iRb4QKm=r2HeJ0u91fK0g<-R`_6H)`y7czFL1W$Vc=Y4W{_eaK z7S(3oA1(5(- zi(x#JzF*c$&6RB;`tr3?evM?N^DO&8=U{I&PsfSpd6`m*tmVR_lPGF?QS2~)fLT}S z$)4;astv5M=YRo5nkLAy+%J{u+5EzdF9AG#?~{7gg_Kg3q&*#z`ubcAZ9Ju@{8l-vD&J)|^+gXSFm<*Q2xEQal;!>&>em#g)tT&_F;@Ce0|0r)mRPserH)a|B=rp!*+9`|k0#|IT>#_}e?sZ`b(O01gjTZna2rxc~qF M07*qoM6N<$f-ZzlW&i*H literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_button_off_handler.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_button_off_handler.png new file mode 100644 index 0000000000000000000000000000000000000000..3793857950d3a232cb03c0462e82c17b5dee731f GIT binary patch literal 3606 zcmaJ^c{r5o-ydrtqNr>&jYwi822IMC!C+(-Gt;pzA?uJz(y>H~tsxSX z$d)~Z?Ae!&B_U+#M89!%Oih#>&!IR9HqB004-ZnxJgB zvo`lt5fbEnH>`7!+)0{ggk@r=ZcHBnoe0o(r8*OVreuOU(S}HH_495f>Hz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}y(&R_gV-M8}F=4hg%U7gB#fOzyB~(Iwl#rxftBxjmb%l_) z@ue+Q$EjCO>Xm%1`I|DD{S&*Uwze%L`|>C#=OYm=qF>aHT_6PMgNa3tsKIk_rac!N zuCj0s67F(>&BrlF9S(sm6Io>-Z`}{2eFK4@B?ulfe8WcUCRp8FUjMd z_3Kv)_u{qk6ou}RR&86wq$^Q1`k&>ZtT2K@zFV%x_QAt4Pn!fOJju;X)Gg>lXlOiR zJ82E{y{oOQ6|_~_J0X|a>Dke;gt%^XE^@^>B>^O#(}9+F7gC(@X>BubcqXrjjn2J{ z!xb(C#wyC~*}E5VvS{h;f8R3&JXzs48E25 c{d_17fL+z2c+LN?@6Ml^sgWhB&;TFyAL>S2O8@`> literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_button_off_handler_dim.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_button_off_handler_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..64b5cda6c010880fc8d0e0f28a6a46672401c60c GIT binary patch literal 3549 zcmaJ^c{r5q9v&KHjTV_?nZ^=gRtA$1W5{5T$XK$EOw7{E*!!YUG)PLevQ{EeN@%2v zh%DK+vKFn@K75u`XME?YbN)D;=X&4wS+4uOf9v&J*UPoHJtQSAFAe|zqzIOH2f>UM zyjr501>cp!MOeYKn{7^FAEEoRL%o?~fTu)=9G69c;2o#_ciXX-TZ?22fHMGE+q7Vp#InvM!p^MkY z;Su@6nsW?Jh|aSU;Lr#>Rwv$u3EBZwf5FY zC$9)?$8p3{IVP4)<~QeKtfE(ra9qu0O1KM*tB<(T>J48|9>;wn$L6x-K8$9L3??a; zC%N4$-l2FQ#E3Qb?ft3cthp?)dbs4N?b5r9^W!KIjb3Rrs{YM$%-eZT!}L3~wVqBp zMN|pb(>gwU%5+z0;`8~R6JD#zCIAM%eO-QxRkDkoFo3l_fGXJWr`&mYjC_%Y?0oz4 zjT2uw-?gU8%~#hn^zPVaTLj!WYDP>W8$|v!od&o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1%kQ+HKeQzhsjG6t z_74kAH;}KAe0%eqt{X1JTJdtD3HTkCk|+-iIJ}EX!y_c^5NGv#Mzixv6L8*xpi63! zHnz4j&9XS-S5QNGY{LFp^O9;#o|@&cW7)228jpZG4UM(Da=(Y3w>v}a`f^ZcGeD`l Vvv}{232Wnri(qbxzl-zY{0ldfCcgjx literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_button_on.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_button_on.png new file mode 100644 index 0000000000000000000000000000000000000000..79c6a2cf7338b58e3d2fb02ece03a43de28e7f78 GIT binary patch literal 5585 zcmV;?6)x(DP)Z00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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~ta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}#LKBSov*Y(60v;O(UP=(yU=d%}=_}Ht9bn5js&9-8!bPW{-paHG7MFg6G zA)jSx*u#4sXvkyl8kL>XO_N4lv$PV508l;15=EioxB*X2O@D@n{&K_TcN;fuEJ@;L z=dN7ZqZozjdWAr+HWg=Pj5KPjTnBL&bC?v!3y>M`cAbe}X-LJ@@G71u(-f`t>bi=V z2*wzRx{>F3RZL87{~{6n_NEKv4s6enBG11(H$VHcMV7#I-B@c)#z=p_DqtqDZHu&4 zr0x;Vx-+T8k}`Whv!(;Z~{*jEs&y0pJU_%}96QFMqmqZQ(OvxC|y3 z*KsrILtPuq%ldn-_eP(+*0ilfk!PHwnXN4c&F0uyKM4L9z*q0+Zg*+qKbmFPr#ma{ zU+%^s5d_SXD5YfW)r2);WspPqD^-j^Q50gtIAtlUwTS!o-VWg(~xeaCg(r-|qv0JQFUeZ0xh z)OG;-jgkFnnjA1?F(zUH5vYDMGp;75_T`Gg76R!7V>~00000NkvXXu0mjf13j__ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_button_on_dim.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_button_on_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..9edef3f0c3965e3897e6837c07e96c215c88dadf GIT binary patch literal 5498 zcmV-=6@}`FP)Z00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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(Hlg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VrlDvhtfsb-=l}f5^RU7YKS+O%Kg51JNoj32gxT=3+>%4itB9ZmUzfZ;#0cT!6n|| zA}RLQf6FAMb#8v#Qc0QiGgH$79)r8WMhwdM;~INEwlyc;vh(Y_u@Jr|*uPN7n-t}y zFPkpmu=rH!xR*`w3<6-*X?MpXDJ9o4v}n1$_n#jT4>>pLFEaogkOg zmUTXxmtKmf!of zt%c|D@?(E4#4@yw&+Y%>-1`c=`(DIZe`c2@U zLMtY?T4|9{0nL99E5u)1J1AAT)RHr5G48Vbs+Dx=VRu`!sF2VLTQ;bMe+zh5#n^oI zAVr6NLe-n`XlkY3(rVF)%az=$%NE!P|4Zv||Bo$&uz&KHKet z*Mj1>Y3*(XMTxtsBp>~Pc zss4mSt#ctMXJX_N9y&CtWHngy8_P!058jNm?~cnK@+x6X@Z8H9Pd9B@d+Vkjq_4x3 zx#{IInTdiF`p$i71rKv{iq59>oGH5Mk^O6@2Y407+j=rQ<%z4N6YgS7F`_)@LUKN# z2O|@Zz6ITy>dAUjRTB5to|5#%YTJ~zV#0cFt5~k8PQ7(n7i0rN1Non=mnB>bJUt9} zt!|=cTC&tzU6Ax5WAx@G=h(}QP2Dx^?cS>FA-&`P?ws@3P5&yXuvwXlLpg@T&+wey zchhbQBao8X0t>FeQ_51YKIyMs@>Lk*x>M0Etnc1%tEp2KpXYR{zpQ>}UEk9ov3b5( aSQ=zKooZ8y3hUmu3OLv}TUS~IC;ta(%7MNB literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_button_on_off_bg.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_button_on_off_bg.png new file mode 100644 index 0000000000000000000000000000000000000000..0683ac0ebe1f88e9f331d1dcf20ec4eda567af12 GIT binary patch literal 5872 zcmVZ00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;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B$5dTLqKbW>o~~e^ZLI7sjJ=R zdoN$S`1#2bCr=%=EUObhCUoZ6u+gCI=KJoohfiUXBFW69VKXfmoHLZv*Hlkwh{a>o zhGCQm5+;L{lCt1>{$M6Ed^w-bUkshM3&0^FJG_?n+Q%R5sfY+Q9Dydna{C4wDt32K z1wlj}04v;w_Y8Pn$2ZsOte~7VLU=La+$uVzi83HH(l?G~{BHoQUC0e9*gxF>0000< KMNUMnLSTZKY!3wh literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_button_on_off_handler_dim.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_button_on_off_handler_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..7d113bd2c650322e9b524bd7c97bb91a74408804 GIT binary patch literal 4775 zcmV;Y5?JktP)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;QQA1t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8)8_UDtg&DrK`j0nEF`QkXl#{HU;p$ZiGwR7I%_XFZu3|;aS{h->)$`l1{}}e3S%Uk zqX4YcYDG1JXGW_>1T)XFdr$o+WshVTG=pZ)44OeRXa@Zs;@1FSn=X2-n;dNb0000< KMNUMnLSTZFB2>lz literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_button_radio_Activated_dim.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_button_radio_Activated_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..b9abe20ac085e7820d24bbb76ee6923d218c7285 GIT binary patch literal 3399 zcmV-N4Y=}&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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K1?!3qFc7rMDlojr za4g_wr1H7-q5+gV9Sy$l zRT;F4TQ69pdK5$lz*6pBY{;)Dd4r}2j8qiLL2%afPMQ_XgaMSkC~b@l)o2K{(TI~U zVKk9y7{)Oz7LUOMg2dtRl03jM9+tr4j3x|n7rZQvjjalbTqs7L{-G=eUJOD+)H}+QsL9$ z1ML%5cj3Nk+bZR=m;P9id7|jUipYv7--hlh-v6c53(JqSU)#~oMvyg=m38hV`2>VO z$#_`C3JH z&fV6C%zkr!ee?Hw+b+ZkAKxhZs5W`S%Ztw}u70bnrfXo}@YPifcN~V>XdF_re;eB1 z_++I$BCoMNQ5`q4BIwBHkJ61ruO+v%Za(ldcc@tY!CkN7)cd`{t8M(wHD^z@)HZrg zO>kFrqzFmDRAOfKkwzO*zx&?xBSMe zonF#2FY1lD&a%UGNSU&EadIiOrvGx=QDft&`nh=_X+u+o!SIviKP~M2bm5fK!!eJi z39Vo4^NG*yQKHroCqqZGIRU!X+XD+Z8z@%VxBCyBu`m+sJnI3 zuh!7N>y|0-O`YZ)@;7gFvS(YG3vb__?dx3@JCvh(W|+b6k;UZwpw{1StGazJ=0Zzk s!nxmL4#`*fz|gF+*s;P6yi+;_k{#>{-pq98H~9bDW-^ti#q+lQ0{~)FqW}N^ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_button_radio_activated_dim.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_button_radio_activated_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..486d538e0f1b02cc29b6e67ae3bc09d8b707a334 GIT binary patch literal 1556 zcmeAS@N?(olHy`uVBq!ia0vp^S|H591|*LjJ{b+9BuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFsEgPM3hAM`dB6B=jtVb)aX^@765fKFxc2v6eK2Rr0UTq__OB&@Hb09I0xZL0)vRD^GUf^&XRs)DJWv2L<~p`n7AnVzAE zshOFfj)IYap^?4;5Si&3npl~dSs9rtK!Fm_wxX0Ys~{IQs9ivwtx`rwNr9EVetCJh zUb(Seeo?xx^|#0uTKVr7^KE~&-IMVSR9nfZANAQKal@=Hr> zm4GgVcpk{1iHq`zbF$JDTz5Q`N^fZsd*)yF1AWQ8NHOu6f0w67b9n9 zCs#ukXE#?PLqjJ=6Gsb2Ll-kMb0-U+ILr)edR{RWN(j+Pc?M#fGqjv#+K znz?JgIrW98(0$8ehXNUSVKha`AL=45_&FX2w~++YSQ9|GzHfSSvhfk=e_};9sn| z?H()6Ul88Dk9qnkcD_9hdZGGLPbe?2W17Ct(R-@gf*Q^x1r101uCfTJm%aH~CZog` zy0W7~Y{Iwv-kg*3zMeO>e!X$#6rplQws##SE7-0skP2zex^P>yIEHy@{j^H0nWqen zsVP4Ez3{!>S-r}~QuAZCYij=0SXvak^LbO}@z{$`GZ-SJ}F zVaKYrUcGrJuDXBI-}i-|PTGiV;x?!`%vr~J|Jwa^-l<1J{>1oLo|$<&CqHTX-fGPh zo!i?tUcBXS{Kb>LMT?s*t+MCgi|5em`Frl))OGnkcxAr#KRi%rw%ICKi}9&y-nX8( zd+%=l?|pKARoQBe9)&>e?EWh*R~%;bSno5Q6fMBoVg9Lh0b7VtCx`e|+pawqtiOjd zNh!2QF!bvge(1l_@ax3_@81Pae2(l>xNoew;8F93Co^*vnmdKGPk5rvxn*5W9UU#QY8!WZ**@|T(HBVT*h<0!u~G*M_=4#3H|Fcj>?($z;50oRW@#Z_3qcZ{I5CN zsQYWIx}6jnv-)ZB;~(E$4yZ9c<0zFfwEDVOByjq(WxA&pRcrqW{HwXh(G(t+g)jOU Zm>KlynB|LN4!45JX-`)_mvv4FO#nS2O?LnQ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_button_radio_activated_press.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_button_radio_activated_press.png new file mode 100644 index 0000000000000000000000000000000000000000..de84ff0b0fe586da910fd42ce4a15d2c8455321e GIT binary patch literal 1589 zcmeAS@N?(olHy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<6;#UL5wU-7oycc_C-~?uCjG1;QmW++}N*nl;Q-XxqJU2V;gp!2D1v z`OE7vQy+d^Q5I{=SvIBUfQs3MPJ8ABdJ-(xdAm-kJ;_vB&hhDR{pxvj^=m)vJX8 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_button_radio_bg.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_button_radio_bg.png new file mode 100644 index 0000000000000000000000000000000000000000..7342176018e9e53e63dcec1a051cc3cfa556adc0 GIT binary patch literal 3206 zcmaJ^c|25Y8=gra%WL^8*=mfpl4TZShMADr2#sa%@=9vV3Sv>;`Ml95Q| zdug#`mk<&~MTI2VY^9NmHsu>F@Av)D_nzN5=XuU^?(4em`?~Mv{C+3Z)7@EBNnZ&7 z0I0fbC6HyK+47|*FS~cNb#0dodVHck-$f*})}e)y6-*@MIQd=3T*6$k_n0RqD2hC<9-qRZ(trA8$o&4m;{Fkf!E@;pKAY>qW=H<)0M9Ts zpUn$nb3k}+6v)(%!J@GRyiLpH`JOF-&SgZ?X--@=6ZB1A4C5F6VOSUzZHux($Rb$I z8;c^siA1C|4u>V6v9_|jzhh~?&>Xjbes2>FyK_R_u7( z&d}0?v^K3ywF$~J)r5K`t+ex8`4X6!Xam6&wU~IOsH=gr?kSw>JLrjJoPCr*jZ4@b z+Enu|$z^DSB!LybL?idLM@M#k_DmHzWL)8mZy8;DzeL~|9!gM$2ooG3Q;IacoNf}Z zP;OR^R*c*QT%+&=Fz4*#qn?t`v{JD8>B6e9ca8vm1=~WP(k?meLf7CVMb4@ZszgA!y}L!Tl7|hY4!6x;M`m7#O&QGj_*ENu!g~la13v zJ@sRW1#Nb_=MOQn;1dZ<~*YR5kE$ zM=%9?a^HB@XnGqybpbdEI2{lWWY%+g+mf4B%2f|N+G6`BtrYG_*w$upXlF++j_ma>c}DOHy;bE<_j^QM8r!DaXHu5q4gm@pf}7nTd&imbP<%RN$d^qK-f1@0?v- zRrU0x5~2{@H^$QK%K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zpePCo3JM@e5{L*y1OQ-WFf)V@&@>IPSPb{?-@km|z=76KD0JKHcKa3#kcg^QtXQ$- z%$YNvmX(#QGMP*;8jX-;ISux2k^+s#;}{qi@EkgH=nJpcd&BK^56&Bqh%8pCwekG< z^CzuVtKDoi!(cE#mgO12UIePDD*S$b-_D&oj|BpOYs?&+FW_pI%XMny%9ReY*$k7( zgo1*CG@O52#V-#dxaWV4!LSNuMrDzVHDyNZc*BBnvz!B|X&O8p&$Y(J#v{z!k#`gm zQTe`o`?lNdc8Aeugwbe(PB-<)&wqyT&Al;93I>6|09XJI#$xDwGKn9$$MEsm*YTcx z$@Dp))9FxKTf6=6;lqtYG|J3Fd0CK%HeI=L<*TZys?`>Y1$w<6Ltt8O53q*kmijXKzc?}?CF9PuWA5YOAjAkmAB<$Y3dmR94K7b`Qn{9c>I>#rv9`8$J%F-&0L?{3MU|-vk&^o(6F@QvvzYR^ zsZSD?Iq^G8`S_j3&vKL$7Z+CoFy|A+ilQjRsVb3@z_<#*3}S|027~}(Do9u)#+g%R z0LefcoltX>==J)dWTTN+n#rjYQzeW62rv6aYvB?3z|l zQqtYseHTC=A3)#b%a?D(OFVv+&yLv=eua?KYRA&Z!{Io3`t<2ze!ss*)3jNEK6&z_$LVw)Z)j*ZIyN?Ty`!VUmmPQuvM!$H zmo@;)o0^(d?cKY#-fp+o84LzfNl8gH5g`-`J&H!76McPs9WIyaW?NgE2SC5q>wP>q zISEx&(|>Hi*2OOYH3KN0Ve4bq8x3 RJ^ugz002ovPDHLkV1n>H073u& literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_button_radio_normal2.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_button_radio_normal2.png new file mode 100644 index 0000000000000000000000000000000000000000..0644a2e10f84b7570f184ed50728182d03025e62 GIT binary patch literal 3812 zcmVKLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;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`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} z0007Qv?m9elP@gLAgVQet*SK}T9)0RR~V zAH%iMjFiDNLB3+50sukD2y@SF>w#{ClmVELoJ>~Lk0$ojf}52fE;c}s-x+zUonG<# z_r1kyDP1KOa=9d<#0_gLrc>GiEk$M3f{rjReJLMnwnd5Hk26!L{N zbTnJIIn;F*z?*Uk(k@0i{PVY!>9Ged2VcBhf@yG6RT?k^+dOKC<<$V5AL8WU8r&J_ znQ}6z%K)TqC;-6ogULtF-;d7B=JDaHiytK)q=2+-B3EbOY*!<$^tDcyh8W*X9r{N@ zvhE-VhvxFd(@Sn}017H?8K2sks%8wqrvS|EwgAP`yciloV`vPGp)vHohW;D?T4neh Tb-(?X00000NkvXXu0mjfWnEyG literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_button_radio_press_bg.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_button_radio_press_bg.png new file mode 100644 index 0000000000000000000000000000000000000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CvjsO4v literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_check_Activated.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_check_Activated.png new file mode 100644 index 0000000000000000000000000000000000000000..f5611b21f61c068020f3fedcecc29a9474c86604 GIT binary patch literal 3575 zcmVKLZ*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^+zpz2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XQ}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} z0009bNkl(An9puB!L((32Tg2+Z!z>PEYuXK0wF zfBkg5^%f%}@hFT4kI1N@HMEA-&>H$bfyT4`@Wjg(ASMP#sCR%6fJ~n_X#fPqAJf6G z_ml+4HIp{4N|Y=IH@f!SmGiG0uS7|J`dpHCzG*)8shDY6O%$9h~n&*<1+c+Lj64Y=a$-7@=i-RSJ;xRlR zl)G<3{mp+LN`lmrNvn4w?F^PBu95_RQ0`s`#qd1_Ki}nvR8YejH9SS?jL7g}lJ{;=2lbDKKIEYjHR+GW#1IoB$-Brpk8hYXzf29&WT_zaRNCr(nzj3o2~q$C_+oe_ zl)HD;J5cp#pz6z4)t6NsWwx-AATp??hX5pk9c?lA zZIOf3@61<)V88Wt^bQ_$P6Bab0a%)wHUR!S59B^O6DJ3#@Wt?BXLml@3#pKyEVf8~ zEptNdGf_@btJdT4gfSKpigmkW)lDa002ovPDHLkV1ju_wdeo< literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_check_Activated_dim.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_check_Activated_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..820ab52bc2c74d8a386cae5f61a4427b73963d72 GIT binary patch literal 3529 zcmV;)4L0(LP)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`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DVCpfS2XgIk~AqH_{RixKkKVlT-CUr^(2Hkdxh$8$*1mKy>H zpuzn}jc1VC?}pbdy@-GsPBqk1ljVD8OPUrV6tl&B4fXx3m|&Y^<5XWg*WjPsaP7R~ zK1w3`^$!q~Cd-G=CbhH}VViV|GzRM3DpboOkj*^(SB`l^)AGEF(Jh}a25r8a&Ah#6 zl}-F$@O5q_0=K3br;ARK}lX-pdwVupS@fC zbQRJdV_hASJeQ7;H%ye5sgVk5fcom0hU(=dR)FX>XVIiB(}Z>0Y>uZQ-~9@;~DXb=5QLthU7g*B-*_E&<<00000NkvXXu0mjf DxQ3j+ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_check_activated.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_check_activated.png new file mode 100644 index 0000000000000000000000000000000000000000..36df7e30d34c873b7025fc93e927e3dd83e241d8 GIT binary patch literal 1588 zcmaJ>eNfY89PXG?L1CMU^J7X@6w%S9=||dT6iu3RR#rqP!o*YBCWRcd>5^be{Xnag zV^BP%o6}A7#5v`5;@nOqdK2aFn+fOcV7m>Ep&V|GRp$rliA#aH{lUz=$@}Kb?|FXD z@8eB*dfL0uQ8S`MB2lz)F`gmJ3qtq!vBI;Z`C_gxP3MUmK9jNYZVO9^P?E7yfYD*e zr!puDS@OX}Dp@3Y*-o2t_#D%Fh>dYbEg>7J$KevtB2n@}kIP~!q253h%ezyCobT57XpHAw_EB~NEtRCgtS_1h(j)y2o@5q#K~Jc5+@fQX22=V z#?mgHW}HBX(PCwad7W5LIvj$-WimY{c5)+$5>f_wEG`g|%0P!B6xWb7$7fLg${5v} zGncq1FoWWlV%8?q!yX?73%Pr-qmZGX23g9|LQyP5IAbezP)^>6>%_trDM^zEsyE1# zG8}`ndIKScAPiNa8Wh4|SdD4)7!l?e4J*S{5U!EKII2)X5FyuMav6>jGQEICF$@i3 zjZTiYIBiteFD>{T!Kz+}Mf5CX;ThJP1$+)@sq4Eqz zi&HGUh9V6t;{b;8i_oL^ConavS8Gs(pdb`C3KI}PsFZ?iT#IUixQDUiC^=K=6$&k^ zl|$D<@w>EoWhA=g`+WN;A*Kz6hRts)a?2Bc4uqa zn4UB=yA2lv!m|7GnDC$24c{S2WoxX_q!#p$8(bm_jX!}a$z z952j@k4oI$l|moevJg^<^ZG z?c!|B_NKs?>9baMUtTLMdAls7F79_#Z%!^)(Ehjg3x?d)QyzaoiX4-C(}|a*?$tMg zwfp;z8W=@zV(-1$?O*FI&{egnwu@}sYYi3e7X?qWb|jQ-txxDQBuxM0rL5|wOH;S_ z@0v{!k93nF>jI6ZCda)qHIQ_=<8jThTT5b5)=+(DK6bFYamkJ^2P;Yc<%7zjt#>xS z2li}9n&$ye&0X1?Ibpoxrti#|b%l4utGIL9;%l$2xBBZ-qyJblF|zdB#MS=hvK6;e znb_>kH?n*KXPZu1cYbuMy<*Cf@4=Z#H4Rr%`%$a6=l+D&Q~pci4zq_lJeiQ~THfbP zz7N~|Q{-9QG>6y$bU)DtM^xLAq^KjJaF? zE4KMj-maD(airz9sCotX+2-W~Z4bRaS?89XpSig1Z0@m2N!985%LjI$t&^`+&w9`y zT~|^0FgT-PUjNwc;NZs0{_Dvj1ut$Zo#9Pv60MSsJ()T!XLsm7ZY0w1BUqmAADUTI Aq5uE@ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_check_activated_dim.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_check_activated_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..7b705aae106d67c8f2b514e079286beb330503b7 GIT binary patch literal 1565 zcmaJ>dr;GM9M332@xgpd6r2!SU!b&2)21|1Fil$Q9R;kNvVmeqLtCItmjqin_G0Sh zaAp-= z(^JQfi5>$0z)Quw?OBrZkjdoKi9!nI$RdKFik-BJHxgR0a3i%ktSE*XuuMMD*kX=iwbvomfGUy6Y9mOETl#>2%0(=*^LL9>q4 zwAH{ePOv||sAB~EdYu}<)rlCaBCw#}7@~*tdX-YA!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APwss>^r)}z{_z8U%&%uS(E)w!iYt!M-xZxpbM1b^ y?HT4N)n;In(hgtLHPzm3Wc> literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_check_dim.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_check_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..0052595e42a994a682ca5c9a95bd916fcacfb8b2 GIT binary patch literal 4420 zcmV-K5xee*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-ZM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^dSHM literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_circle_bg_ef_dim.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_circle_bg_ef_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..4bc688614893e37fcdd38b9aaff802e74bd2772f GIT binary patch literal 2272 zcmbVOdsI?+9!I6ZCes+x9#gVlX0yEUf)JPpIO>XHph9!T65)!3a0#x8*#j*lv-j*c zYHFv<^|X_f89g+OZE7mBEN#otBJH8IO_G^4r8ax1Z1#`N{IS1t@BO{LpU?Mw&Mk_M z`^szToT(@j$}2ibC_!eb>%~k)zB2dMR%DtDi{!8rN`tc%Mi9kUL8%}vTBlHh5>TPa zS#=5IqEH@bngls47sqmxkdCZy$&k%D1A<1OxJ%3ig;EQ`xKvQB(ev=mrZae)M#aO+ z05Mf;5P<2LsMSVLx;idFxmv4atME(0a9lG7A<%)a0%z7`=uI3m5C4vrgREW06g=*o z2(0Dd-y0lqdB*MrKx{w_YpAN$Y4uz7PolVYWkRhX*LSwVpE)F`Kgh-G~IeJ)OCh1Lt2?il( zQW`Y|SOe*CE=ENvlnL|jh^6mc&>6(ykHmV@hd?1AqnH&23XM#q=yWc>-btHa3HXN@ zpOiKwGMSKAu3KfKk=rkHXgb73l1OS`P6wzo5(FDh*uyk6a5E*PCpAkZ%iRht`!VqC3 zjRgo8Y`#cHo4`ivO|U|*1Sj-r5WOF;p?`|y2#lZthKvailrd2O@#zo@nbIKxP9SCC zf@K=L3d%Mua;4|Jw?fdU$pTf8Mo5Qy7hjI%6Z#nf7BfN=5fTz2WV!r~pfe-+LKc$+ zFsYGj1`GcItNMRpMnR0BxQgR{ie=&msX*8AW9cKCkIe(>k&ZDUt?`dvWE>P~l25dd zpJ493u`HRQT{g>+d!i}#L}GVGUz?)hDlTpELj2qOx$7+_4bDRCs{2zgSbxl!aQv7X zo;)LP1v$s?TJ^<8CN`#tE{iO?xm0S04u=Gzx@<-N`J-|1ZL?Z(E&Z;)n| zl|=={T)ler+ryQ<1NKw*hRhFJTVv)O%F{M4Fw8!JoCN^DD!Y7y;qHcd zd+qMs!~aU#Wh&1I<8s@)rcHZrdb!i1=wd+RR^sKoVoLzA z^XAPUeMSZ*PQ3TjDK;^EXI$pGu!8u3^!UDQOFRTqJ>ifOKX4cZg*zg05(P4K21EQAKo=IeM*4;os*M1$9OqmBkLcJ$`79i#%gxWo+*sHhku@= z+vP?fl=%<_%C^`0RfV6$VPmtb2bf)6$6x2;v!%JymL9TVs4ZhH`)vnnkF3|1@{Xlg zxIa{rcRq|A*j)9LMRu>-ao|O6*}6Tr1(c!k_{=}eT32|38-yZWTy95;aj<0CgIdiJW9_BrKzvGm cqcV#d%FKDRTcGzEcKvfii{gZbB2x1I3kWcz!2kdN literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_circle_bg_ef_press.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_circle_bg_ef_press.png new file mode 100644 index 0000000000000000000000000000000000000000..c0f4b557f91137ed42c53d0b1bc943f5acf09e5f GIT binary patch literal 2200 zcmbVOYg7|w8V-mcDAuCjB9+Dj0gJgzNCq+*V3J8nnHTj>qCqqEIeLL`A41 zK7Gw~bTNT2DM1zyrHKj&hNPIBDlzL&)8tAVO&~1xPg6>y$*6`HhbGDt9FjrTKqAWG zIiyHd2t7o}Lz85I87ee9BQ!#qkt}7$ll=XNi_;*SK#po8#58$|LJg&HNbh+ed~X)h zNW}Llnq&^?gHur4aO@f)N7Oo#0s$@!y3{w!zjFLEPt%gIwJ^c`ZTp1GbiCCfjm?%7Dv^0s522klVx!fGrdu_Ew zg#Oo!&uXh9(v>JpgsQQ%Dk)x%1o8wJ&)r`eGArWVKw&BwUKB|Rf=SoPQH4f`a7g$U zYP>8S0zi<>hj}c%FVC0H005W?vba1Ri_HM}0N~A^;P@;ShIw4BfPui?OaS0Bd>IU1 zJ^&)VOdf!X!3nHTq1H$gQgp(u%xw1q7Whjn#8aUX4W^2~u#|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N5604K0cccfshX3eTve7f2 z^=n>Vn1|Sq;aXF4tAso-SA1D9{n8d;h3x90AoY1}VN%-neH;b!_0^~05sTzsT;813 z^s@Jmu4Tsj>H_1Ym+iWWY&XE}|~HiM7C!$~pbe+3~w6sh3G GYX1Yf)s8y= literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_color_picker_handler.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_color_picker_handler.png new file mode 100644 index 0000000000000000000000000000000000000000..7d02fdfeb32569117dee2e091c32f2dd61ca2fde GIT binary patch literal 3005 zcmV;u3qtgXP)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~|c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U7*i={n4aiL` zNmQuF&B-gas<2f8n`;GRgM{^!6u?SKvTcwn`GuBNuFf>#!Gt)CP zF*P$Y)KM@pFf`IP03tJ8LlY}gGb`4?pZBPB7%B|o_|H#M)s)5TT^D5IB>nPO$+YT)E* zYG`h3Ve05=WN2t%U}WIxZ06?bXklXJ=Hdb~1Djq`b5nD3S2t5vb4wRPLsuh5Hw#ls z16K<-H$xW-V@J4N&%EN2#JuEGn7x@md!c$w@ana4E=o--$uA1Y&(DFSfPjqrlKkR~ z`~n5%U^4}c@XWlF{PJQ=Q1n22>ylcOS(cjOR+OKs01jWPOf2@hxfoa&x;i^sI=PyI z{0(%slcl+#rIWL{p|P`xu@Y2o3OQk>4|I$^C~+Vq7MKt)1%jCHqz~l4Gf!$BFvk=D zvxfAlFk=P=MoCW>$B>F!Nq_$Tw`VpxaN-2Vj@X+4jS+c@D29pQ!%pQx|{TDo& zQ_0=jn3E?U&;D$tb$uX*hi=Dt7Sj;Fc>m`r6aJlQkgmCSC4_zDMApKH1x+$)$K1|K zaxi!o8&8l@4me<_*m^IX?a%}Mo`Xjm)FiH2tSZ#VN>OvN<=*5L@blB(A18x@T1w{H zlu9jmX6?a$=9v5S_4iHKFWFRl`53pi>@bgqy^H>uFOIGqb9+s>jg2q=ufOn!f6C?m z|Nb7YcyZ#QeSoicW9!xWFOMd2dwfjfGznPwopZ%QX|InRAvFTr5{yhd47|@9kKgf# R*bFLsJYD@<);T3K0Ra2Yu2TR2 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_contacts_button_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_contacts_button_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..c42fb796040db1731110b4dad22df0327bea1685 GIT binary patch literal 1251 zcmeAS@N?(olHy`uVBq!ia0vp^d_XM4!3HGT`Ez4{lw^r(L`iUdT1k0gQ7VIDN`6wR zf@f}GdTLN=VoGJ<$y6H#2IjQPkcg59UmvUF{9L_6kQ%*;+ybC(1_m4Zih{)C?9>v4 zq}24xJX@vryZ0+8WTx0Eg`4^s_!c;)W@LI)6{QAO`Gq7`WhYyvDB0U7*i={n4aiL` zNmQuF&B-gas<2f8n`;GRgM{^!6u?SKvTcwn`GuBNuFf>#!Gt)CP zF*P$Y)KM@pFf`IP03tJ8LlY}gGb`4?pZBPB7%B|o_|H#M)s)5TT^D5IB>nPO$+YT)E* zYG`h3Ve05=WN2t%U}WIxZ06?bXklXJ=Hdb~1DjrB6GIDQGXqmsb4wRPLsugw7Z+1Y zCv!IoAj8nj!W^d8Gq1QLF)uk4W^X3YUZ`FZyn3yii&7Iy@{2<9^K)P+ARr^ZB)>Q# zzd*q`*i1nqJTosPzr0uz6g?2%x}+9mmZhe+73JqDfWy}+6N~+BE(R8cuFlSuPOj!4 ze_I;3I$4?5Px?R(JoBXH0dq_d zFl+d&@#kS+U=;RraSW-r^=67McawuaTlrn9uZ}I(ttzxWsW{1+TK}+qb^itbC2x=L zkIO{vTDyO7oNhL|u_aVzarA`)2AhA`z20S@?|XU56xO9C)sCl4cD66eEL%{bxU}gV z-%kFf2NReX6HaJ$8BI$4$z`kGpu=<6>WZ$)2S#-csW!txnRLEd=Ii>KUhaCwv?Vzv z-CZhU*0z=^#r2QZtkTM2bNMm7Ej7|QNN`*3;$@xU>YUq;dzRkW*ZeV1X^P!F}gC*D&RP1=V L`njxgN@xNA0TZed literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_contacts_button_bg_press_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_contacts_button_bg_press_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..d6851b7d15cfc0fd420efb2dfcd301aa0cb51dfa GIT binary patch literal 1276 zcmbVMTTC2f6do=TEUCO0t0cy8HX&%(x$W-k&UCjhJD2VzEa0$E5=EHZ`B|ngm(C3C zLTZS-AT=gUG^y4HZ9t>e2#GJYn$ibJ>4Ry#rKyrsjU-YUNlgq!QTzv3^nvuj$;|wh zIp6o4bN+K?y0iW0!2=Bk5Cl1xPKgQ}AAnCoZ4G=+)f>;i;So>j^}4J~&q7fwCQnJ zIYpFrwcsj&4SAl;5k#?A#ET)^atZ{+vaHWR(?MtvbjM6jEd@LoDf=}riSoyqJGo9=F+V9JP+Y7-Pr5{BW&wQcQs3i#KJeXZT>m<``Yn&R$$- z-L!9i{a(jY;mXK7a#Na|oa|X%UY>g)H*tNWF!t+D_b*+4zIC}i{C$007MBGbn=J3`2qf`-_~yM#~-5k#lG(D?!u2>R#(R3@i$jiRtgob$F;`U-@lkS`a$dMmbO6C z8=v01IC}oc$6r2!_bFA%96vt5{PJ;e{n?s#OPAkXUAr-Na%25g$9;71+@YQet#=xO z!M|Reo?gASFtLTU=W@BtKR1ZAj|$gj-#Xh^QFngf=f#=o(+ZO73D-^VFI_p*v=~tC d^34O)wIuT5T~~4bxOB(=AEl*s@x$c6#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/white/00_contacts_button_focus_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_contacts_button_focus_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..bbf157f0a71f46156a70cf9cdb310ae7e6d8c9c2 GIT binary patch literal 1115 zcmbVLPfXKL7%vKlC<-@)OH-p_WNTm7wQIu!)^0N5kc=hF#6-IG4I0+I(mq__q$X;N z5f3I_yclDQ8pA>2$%7^mqlqzIxR97|!h;9B>A|S4V?z(bgH7A_@B96J-}k-myEZm@ zvZKAboua6Y?68(6<393rx3!Z0)&2HaG91L|A|6L&T-7~D4VkC}>8!0!!93K>`PsLy zpQ3h_twIqObEgyo*-<^Ti3YYy&=l1_5V*QA12J8KQjS7F&| zwHmF)qR5+Kfh@}*2hT@{MZ}+XupUGl|4@TLgTCQeF1Cw>Y5Csq(!~wQoNQhF z+EeZOV literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_edit_group_bg_bottom_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_edit_group_bg_bottom_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..9851e6d1a1a006e65cda83e9b3a8781ea348f843 GIT binary patch literal 3085 zcmV+o4D$1dP)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#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%*U`OKP?F-8&IS>`>ZZ~aQxr7pHKP;?5SVrP_RN&|xnyvDmp zCDo29_ub=)dtY_|Y2YTcV?-Oc#qw_KTcv;Jly_&?z_LNDu|a<2jlIZyKM#@rw?R@6 zA?%szMdBtd(f^5A2$+xdm$!rIz~xLsh8dKjcBO~ObCdfCO=RDwJs;~4+}!)9+|Ri! z!ut#x#J;EzS)?|5&7ZH3{FkvaieZb~cVJrrLzJLwd{l&48*GD(0qM$M1 zld)0JxCAk(oQPd7afurM)`a)*6~YQUF2es8Sd+K|cf`nE3-nPBtB+m&9RQFZLb$=^ Ro#g-k002ovPDHLkV1iX)PdESo literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_effect_footer_bounce_left_h.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_effect_footer_bounce_left_h.png new file mode 100644 index 0000000000000000000000000000000000000000..c9d985837c374dc4a68048dc95267adfbc3e5a3c GIT binary patch literal 4256 zcmV;R5MS?!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@|##Rr6KLRF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2zd>xek;Y~>g9p%mza=iycFN!%FO>^vSaprx9INmj zHODHvgAELe5*B%2m6Xd^=hX7uGF-Lo}!viu^vmZx3pb0!;L2gA#MYK3{;v zY_e#KgI1J91geq}*egq-1dQoq`{v%S01!@lgjEnDEM+~5g@Dq6_|}pe;D{k^di@>VW4n>GLqmLR7*T# z?(%!lSmE=Ht5H?-XP57{0CX<>pq77uRy&C%#$$L&IF%g~xKC$+*x8byWJ!tG`mYptqY+Cfo z6p@n@NE;$IIU25OJJW&FnT8BAC^fC@!Nl3y`W4hgY7>h^)6lM;yAZGqB$lyLh?&V` zFq6?Opj3ggD`Ob4K%lXrWVS=ONgew-NG(d02dhCDOM-k+!Nf%UDO(_Swqg5aOvfDn zdkFub01-YpvkIS?TO^)L%#s*}k|#3$L7lg(%(Lac0RSY5bNklvx{v?>002ovPDHLk FV1nC}Pi_DJ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_effect_tab_bounce_left_02.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_effect_tab_bounce_left_02.png new file mode 100644 index 0000000000000000000000000000000000000000..38642452b55050c72481b8a47d0cda8fed03830f GIT binary patch literal 4975 zcmV-#6OinQP)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~6Q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07*qo IM6N<$g1!GNz5oCK literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_effect_tab_bounce_right_02.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_effect_tab_bounce_right_02.png new file mode 100644 index 0000000000000000000000000000000000000000..bbe9a34a590b0ce2f4faea0144b75d10107a6649 GIT binary patch literal 4976 zcmV-$6OZhPP)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$;({X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share/osp/bitmaps/480x800/white/00_effect_title_tab_bounce_left.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_effect_title_tab_bounce_left.png new file mode 100644 index 0000000000000000000000000000000000000000..189c69a10af46101701ef7ccd07223eccc473e30 GIT binary patch literal 3952 zcmV-$50CJPP)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{deZ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#en ztB((~izBTJi8TjC1c4D?SH?2!h-FXDQjcMorMA-bo!C+TqbelW-Xpq& z@~1c%%#tVT*|xWQuQ(UR){4q$=H^DDo!0*RI{uvF=l8x?`#%6W;(5|tj2u`10000< KMNUMnLSTZbb6(#7 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_effect_title_tab_bounce_right.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_effect_title_tab_bounce_right.png new file mode 100644 index 0000000000000000000000000000000000000000..ebdad5b57269c9b97bf265df246ac869ed5e07f0 GIT binary patch literal 3946 zcmV-w50&tVP)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~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_yUEc&o5JSW87reH3mcm_t_(KEUtyDn+&@ayw;$z*OP>>QG@dnuoFy@9blzF z${Z)L_60#L6R2IWYUG`2#wKY<9RkPdza7Jl#3=S`{m6^#O5#&?GMGus%A_tb z?QH-%16EXqD~kAwm2|!5khl0)G6M!}ARJ2!KfrkV5h|jG5Eccghq7 z(YI-RZz=(!5&kR+>lQM?qwJz z2hR1LpU}Wu>;+7TvG8ASi;Tu5lR^^fr?^BpSkK5nvj6Umg0vSX=_J1jlBf;PGBB<< zsYJV90ypW|`tQPK*ME)Z=kE#F1%MR>*nC9b#g@MV08Vjru5Z6$82|tP07*qoM6N<$ Ef`ay6u>b%7 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_expandable_bg_bottom_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_expandable_bg_bottom_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..25925af9aba9d4c9093aa327e9a1556f10ea9711 GIT binary patch literal 3082 zcmV+l4E6JgP)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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+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} z0003sNkl(WSK^4gqCR#2pfqJGZO$` z&dW8|^OUrV9LH61xqKBsuuL?r?$;Uw9Hv2KnT8O8jx1#lnd49whkna%9c=+1tB zd%cmQ%}2*^=Iu^5T*si>X-lfADq;9}yq%ZNTdlKZxl(Bok)4E)nXiJy;$kv+2%bH6 z?9crtFh15oA#9bD(!tK|o?fq?6bi-SH4$AdeOrl{&dj&WJmtS@8tu@RSI0#E9dY^^ Y0C#-J1i9`P#{d8T07*qoM6N<$f>YVL#{d8T literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_expandable_bg_center_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_expandable_bg_center_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..b6c559b3e4be6753a59ffc729c4c3400df3260ce GIT binary patch literal 2884 zcmV-K3%m4*P)KLZ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^r*mC&k+fju!pu`O$3l z_hqxKK&s;jNtx1V-!Ix1-wpD5!*zY_^35jAF!=hc1Lu?3*U#TgWqYP|UGsJAW({Ev z&PfWKzv6+e&hleF@%;1VLkh9iFZ(&3d~(HnR`%CeSKok*5i*5LGw184&9{?2c_F6N zA^(2w*W{n4${dp)KVBaYxVTD|M*ntfXElo3dP}W~t5$o_v&hdiQ<-1ySXCYQ?2_;7my`SXv#g&-m90@P ek@(}?z{nu|LZ9>3?s8X9Devj(=d#Wzp$P!F-f%Vm literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_fast_scroll_handler_h.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_fast_scroll_handler_h.#.png new file mode 100755 index 0000000000000000000000000000000000000000..5b16a186b4944c55f23e2b65279f264b5930b890 GIT binary patch literal 1562 zcmeAS@N?(olHy`uVBq!ia0vp^UO+6x!3HD+;!d>zDajJoh?3y^w370~qErUQl>DSr z1<%~X^wgl##FWaylc_cg49rTIArU1JzCKpT`MG+DAT@dwxdlMo3=B5*6$OdO*{LN8 zNvY|XdA3ULckfqH$V{%1*XSQL?vFu&J;D8jzb> zlBiITo0C^;Rbi_HHrEQs1_|pcDS(xfWZNo192Makpx~Tel&WB=XRMoSU}&gdW~OIo zVrph)sH0$HU}&Uo07PcGh9*{~W>!Y#3Q(W~w5=#5%__*n4QdyVXRDM^Qc_^0uU}qX zu2*iXmtT~wZ)j<02{OaTNEfI=x41H|B(Xv_uUHvof=g;~a#3bMNoIbY0?5R~r2Ntn zTP2`NAzsKWfE$}v3=Jk=fazBx7U&!58GyV5Q|Rl9UukYGTy=3tP%6T`SPd=?sVqp< z4@xc0FD*(2MqHXQ$f^P>=c3falKi5O{QMkPC;vUD~!GInxu zHF9yafa!I~PcF?(%`1WFO+n~2!>JdP6mkoIHoK%2WtOF;xE1B+DuBIgm5JLe#yHJ` z>P^Az789I$^?{Dj2SqGWM8kxDsRzV_CtDx~p72xifT_I*n5@e!{;XkOVCwU9aSW-r z^=8KTY+*-{KQM}t8@Y{Tq&$t{R>f*2Zz;lHVtN%RPAB!t8v^$#EHLC(V zMER9G1iywvXKH$9cZZw4Jt(y_OL2D6tQmJx{_@G5)!7}g&@IK7f8U;&sW%(X?=%1W z%yV1rv!4gO5H{NeWeFg7di)s1anP2bk{{P_A+}$g?#5HC%Z(+@Ql<$10bnccd?|v3(YHKXgWYKOt48#gXUzkid#q;r#X zRnW%s94@Put;({P_`uzC{(_3Yt%jC|#{eXUe z27iE(K=6Z=Q7c0hsUA}EC|)uzb!I-xyj7`oDPj^Tt^T%?PV3r>SA_9Ort#ZXS~;J$ zuzDKYe@AA|T&Eqif-^WOr_Z~*e0jRqP0`~eOYWUGvBJ>Kuu?F!DfIk=Pd}$FZERfK zZxGWs?Pb~19U_}I?frS^XYt9!?tJl1x`J!WJ=zjes`S6}o;$a1+3(9XU&Kyb3@M4} zGUPnC^~mFmeV3Q}seONU^X@v0u4m;Atw|SW%&PkO=+;;1#W&YDE`A|=*5QTmjT!6S zF>0?fbFyA|%|m6+;_Uk8`!Y;+o$YTZxHSFp%b)9$^^e;}&A4!8alwM`7nF90?0na_ zS^j7OYb4_?*{p=(S+gd|^IM+c`NgIi=nydNov#`DG1e~IB@Qp%S{_l-Ig-U?-?VB2 zul4y5hW<_0yR)|iMz(0yJbZe%V^PAXZ~4DY{$Fzc4f|wPCPuFYp#}evgX_cQF|{sk fexTJ_$6>%QBb;UNIo;QcpwimY)z4*}Q$iB}l0Q@& literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_fast_scroll_popup_bg.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_fast_scroll_popup_bg.#.png new file mode 100755 index 0000000000000000000000000000000000000000..264061485cde63cc8537f893c9e6ced312c58096 GIT binary patch literal 2977 zcmV;S3tsezP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;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-P&+Xh1nTQDoq6aa8(2qJUHZI{=kP-@Y znHwqXzMTf(bX5~i0O!JAogiFd!zTx9>ot82nE<@McB&2>Qrj+Kk_t^-dw_6P#pMrL ze3OU4_hbRS8-Q=whEA}P6Lb|ctYD>Kv2o?>)NBzrw#>iYGPfd*SSoYtt+fE6uYU~y XWLn+gLjAeF00000NkvXXu0mjf#B_w{ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_fast_scroll_popup_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_fast_scroll_popup_bg_ef.#.png new file mode 100755 index 0000000000000000000000000000000000000000..40f2e8701ff7a8f0ec2ab179ea5ff10c3da38030 GIT binary patch literal 1535 zcmeAS@N?(olHy`uVBq!ia0vp^av;pX1|+Qw)-3{3k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlv>1qhnW#Q!N zX5nOEY2a$&=wxbS2Gi@AS6q^qmz)Z-Hxp~q&Aq%{;DFibEv*c5!g_JNpz`jJT%3gJ#? zr^G2GUE_Vg$7y-$O7LPS^mPrSl`YTXkHJ9y{1#3mW$G+}Mn z>s{Ah`#Ps=yZzSo#yW=C4N`5pT@;sYonvr@t^0l2=E$4xzb{|-v9|H(9R1wL`Rh5q zCi$vOzF`-rez#EbU{iD%;M7CB>~jSz)uzY0ZghzuvntajT0;Hrx-G zGy9XGr0yBbL?6rWcb?KfBbNKRhAm0n`&IPPDJ+74u(0dT~!P=ub#12u8>{acmI^r;91s86$<_Nxa^CWt z&%Zg?n#@%{%rWD9?GaU>=^d3G>%)4cY_qxbp|V!X>W$>ijmo7{oI77;Og5p*UGt5uTer+HUKV0-RIg~(!*|uDzmvuO{y&xa-@Ad4 Y;qYngcaioDTR}y#r>mdKI;Vst0FEU$ApigX literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_fast_scroll_rollover_bg_line_focus.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_fast_scroll_rollover_bg_line_focus.#.png new file mode 100755 index 0000000000000000000000000000000000000000..95d97b7c663291ec3813f8ca6f3872afe2aaa1cf GIT binary patch literal 2855 zcmV+?3)u9DP)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%_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`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} z0001(Nkl+rRfwXd|tgfK>TNVk>b{*=A&t&Vojm z)RAOFL2L+{_I%_DA~(D%WHMe|qkp~{PqrJeTp*oZB5@0al~3d-}nG?CsuMkI`0F*e$=KjBilSUi9Q1W X86652u_xYw00000NkvXXu0mjfiOy&7 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_01.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_01.png new file mode 100644 index 0000000000000000000000000000000000000000..03de1126be7a54587f4b59423f1910ce3cd2b7f3 GIT binary patch literal 1464 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3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dMwARzCwX!+ewNJA#T1G=d6K MPgg&ebxsLQ0R7PtTmS$7 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_05.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_05.png new file mode 100644 index 0000000000000000000000000000000000000000..eb7df366f0a00ecdd41aad73902d3aa22abdd415 GIT binary patch literal 1464 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlvYCrq?sCxFj(zITdDaCeU7pUIRD0daay`QWHz^i$e1Ab6_bTAS1sd zzc?emK*2fKRL@W$JTosPzq}X}JrLizq!wkCrKY$Q<>xAZ!`CVki~SaEZstY?W=1Bi zxcm*#n?g>Q=>r|34@w+Ji3KJEOo1RKJm~{D@XV8%2h1@=z^w71_eMGc1LF%%7srr_ zTU$aE^A80Gur+0Pc+7JVW1j45P`cVhVVnJikaM|tX-$7yc3MvGn5Lj+=$+-Unq%G6 z6VDwk-c>C>`SIHIX}U3=F52C?SAPHQ-s-b9=cTW2G5fbBO#5~*`vb<9UDLO*t5nSO zQ44EQ)6!6INM}5-UND6%g4r|d%ZAVo@%$e$EUt^Zoux2$;VywDnd^ZK=bR_@tvRqT zssbuvX)sPP_5DH z@)z5_$J5`IN#~f&?v4_?RJ3G4O7k4SJ0(_g@4hT4;%h&wyCzw|v4tUYGE4Bz9$bCk8Ns^b#4eTexbRWL@nX98d8I7F&?QF{qNm$Ve|xfe zv8wo{U-c%}-8KkU7XNoVz`J0f+%1&{Om{<n zmn+??p6qmS_cXI7<%U})ZtV8vOxaR=ao4GWJc-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlvPQY2fJW=4@=~!D$;>f_j_}9Rdk+LYm%;obAUV-~;3pzD;4qs2({F80_+@wD&6Zku{oEoA#&K~fZz}zsw zuGcM@cS81`xDDAEkHsD2yc#b2n|b9sb3^UQ=(S=$zsY<$^XAkhPhRdFo}LX2)ya;m z3M^kv0VY*V?HhpVW&AOhX_kP*e&-a@5aabIE)c9A*B5v1_Bisu5ViOE%)iV?li6BQ`fZJrDpAYa%*F0cQNCVt+o?)?OR%rnH2Wph5Y7PZUY9V Wpxytf&*i@Y6{()CelF{r5}E*=H6C;T literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_07.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_07.png new file mode 100644 index 0000000000000000000000000000000000000000..a01f5b250da2180ed6ce8547cf57b4b72cc4345f GIT binary patch literal 1459 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlvV4%h3MS6q^qmz)Z-HxpT~doO%TiO^it=+6z~O6^iN$^kH#c)512ZEN zS6u#v=uIIf%=Ced(FY|Cq{IRf0;WI^6Q1;e9C+qQ%>(9`B4E}C?hPzrU|@Xg>Eakt zacj%ewfTn}L=G&Rxx&V|h$)bLllSH&d1rhTzNwewP5R&BlbfY5bG3tylA!WR7bkmbHQ`X4c3J*^)Okg-WJc2TneYQg{|#*aBo>c?K`WBHNP~sya_p&bk_QnPk5eHL5N+@ zD{bbrtC*UTVzyr?E7Wa>woYBDZK7N>)%f|s`m-OE4>08I+oXQWbAd3Z81;1Zb6Mw< G&;$Te?+}Cl literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_08.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_08.png new file mode 100644 index 0000000000000000000000000000000000000000..caf593c303d7d81abb7443d4f9d3d83d8852ccb6 GIT binary patch literal 1480 zcmbVMdr%a09A6?Hp7>-OQ4rUqGReE$y%*jNhuq!n$(09q90M9nF1LHIdbhjoF5W@R zc#zqc`2tJQX>vvo0mHCMEfKUVRAzikFjgeu)J)}7I0Gr#gZ99){xJV&XLf(D&*%I3 zzJ9wkKX=76#e4+-0Ml$axI-S3!f$-6{2lTc$K+w2L=;N}oLlmd0u7ibu9OCCUb2jK z&?Hs4;R2lr0MTy7Su7RXS7I*Ct0Kb~mEX(DYyiky?&nF@dRhWY=`w~jLc^!JA&{Yr zP?64#*m(6C z(t0B_=~S^jAGB}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tmsj6NuFASD)<5HJOTnDC?z)An?q;q)R;HYLMkkmSz_vk7Ivap59SgzFbXx`k4mjO)QOb)+jnY%4o_I zSaRCO+3CjKC%d0kysTamz2nJ?-QVujmVbZuF3?tnZ)$On^M9Y^!MDrvw?^IF7PYoJ zZSzmpP5yHPpC8fu=w$!^B5X~sTxl=<v05rNOpIG|{k1ovflA#mtMA+AtvmJ`#<8w^#4ezaIz>n__p_rQc%=btw>>7;aMG~ZDb zNM(8nDt literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_10.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_10.png new file mode 100644 index 0000000000000000000000000000000000000000..9276c3168f3cf1cf277fed9b83c1eded18e2bbf8 GIT binary patch literal 1457 zcmbVMdrTX39KS*#8=)Ix%5W}vJLt%m?cKH4*52rlUazBpGAP7B48qYn;0AZsT@PCj z5}acb5agk3q9~g&iV1AQ2P}x7Z0Oh$GoMqU0~3@4gh;kQOnh8{qJQB2@RGaV>+|`3 zzOUcaXJ#B$MeL3M06^tPwYlUmHt=o*BBq4pEzsi72n4dU z1v+YQB2Ev%l(MN+B9mQ}k>jo^bDL=>`4E`o$7KT?BT=BAE9bqq-vX`L#pQWm8-~DD zh*V~Q)||?9W`cwuGN3_=XxxYq1&x>%#Sk-QegxDZC<3E87%^#31UHy)1O?Y0NLCZ+ zV%%l3uWQLG3sfpe9vp^!KA+a7*9u|@jGE167}3Exokm7zyp_B}`8B*ZE@;8Vc-;W?Uh{2KW=P__U2T2 z7}&*lg$mIv*P}QtNS1SVZ=nEC_69#9vT{+Va+~0;;22(V*esBIqNQ0H#}LwLwUJhg zz%WvWqE^CcvRU;;lCbGhFw_vVu^HE3BS{RgB1XI3h@zw}g)pWN2w~9M2_1>*OhK-L z_evD+W`eq`th>fdvEP%66Cy)Nf|w%+<-rcfEEOcdTPk=!BHN%v!J{ls3qEh4JZsU~ z7?FL7q3xo;fvfq&*-i8xwcAZP#Hho_|B8E!OaGso!Ll=OpgI24EWs_g0|V2I)|VF> zmxtly8zahBBi1o_KL9AE9k!Gl|M%}benI#oGfJyE-<(jEn%GL8ZBP?X;>ymJc7592 zgmj)4qp!9_T#u$zjx%6pn!0%+S~--q&@tD$*u+n_U6}b}wq|)@;fEXMu8bemZ#KSw zIk`DSVeQRw=g0aP@C`Hkz zrZ7C*&TX;&j>LG?hnhc)>+1#TavPtc#chhjvx>;3tQ!ZW>hF7c?oQ_~53zmchtZbw ze5GRl_Rg(ncjPniAM8j!xfBLwk5^xeHWak&Egy|deSRPE)0l=i z-C>>Y-AZSX_Wp$N&O-1mtl9dp(&TJ>%++$-P}5nM(EN^ipsSlYGTJlOIRD$puw)wB z{ZdCP*0nSlRj~5wp1eyj`(q3z_-kJ*Mf%I~8$Vn8d7!=am6*PYmtU(kRhu)vyS=Nv zT=~TG!0f}ySN~F9e&Z|Uo^H0WJ8k(gRHv`mp4htg)P()PnR6@Qy`Og;%i6c(e>>v! zv_bgd_57JCZAf$fVBE+lm8!m}<*oeMI|ncIKWoW*KYgK?xaKsdWXa{vGU literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_11.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_11.png new file mode 100644 index 0000000000000000000000000000000000000000..1483421cfca7e07983de667e9acbe330790f9bdd GIT binary patch literal 1444 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfh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*1=9nU2)_8nwPb~uj<7-bB z$B>F!Tf*$K4+RK>b4qx%v&U|dG(XGSzV`iGXNHiQ>%sfqn?z*5W0Y0VdwM|Mk>Z5Gn^zbvg= zr@ZQ=zQ`_yGM&7K_6$CPQzrBWG0kA<%~qM)uAXMBGqrX>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlv)RQ`Tue`Q(wU@0-~l%(^F9 z;aSc4gJ*uBj5ViC&jF`~1i^}k@(K;v(Ku%Yj=3$yzAIHjv7WgR{2{8 z>YcSty9d;Va7 z-KXZgoSnG*@=V95Z7N;nCm0Xv{;r5><$1L=kpElSwZ;_JM|>Yt91l8`M$TV3{j1@` z-xJi%a^BLhEqzrTWNYlV!lJSM$;tQ91>L{ct{(C#So3trr@u=gT`I#%CpNrdv|(FU zdv9LI`C69NrL+Gf-EuWZue|(U!QgMaldYF$0#`}7)5Xdvr{IWL@$AnNPK$~5_68rg z{YE;(e)HKyQ@$1|u*FYpHM!T@yXsxDp!SYsGle%cYvk{m*HOmvs(Y98+2#FA$2~)J zuK#h8@+`RBn*7Re*-oL(b(g07Ps$1|?9%4kaZ52fR<(gUc=Ijq|8u@6A7H4Nvufqm Sr61OU%2Q8QKbLh*2~7YT*dB%e literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_14.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_14.png new file mode 100644 index 0000000000000000000000000000000000000000..81ce61d25720c3a03b063c5fe2b065d457b988ae GIT binary patch literal 1474 zcmbVMe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X`P8@h^9j)C1@ z&oETC^@2MGhRuoVps?;?PX8HeUO9%_ed?Hx_w=j`z%NgLZ9X!p5R z=;lGUPVFx*`Q?`Lo&_W=3f(|Qhi6mmt@odax%?RaDYYdww7Tg_X2G5D&=Gml?!Hqk zj}HEN;j7q7pcZ@BbwgWxB(t-z0Xf*|K1S4GJSC0YoSm}Yv(IRcT;y?zt}X| z-@fhopYH66%;b6Td?+AW+lda-K;a(E!pGf7`E6Of`%{h$79x#VL)v@id)gl*V9>W4 VzBoQYTE-%ORVR}}cT(%?{{|f&7!&{i literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_15.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_15.png new file mode 100644 index 0000000000000000000000000000000000000000..6e1eab1d4e30481d58250ce029a8ae082a1f5c1f GIT binary patch literal 1477 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlvf&r@;9_Fz3e)SES6q^qmz)Z-HxpT~doO%TiO^it=+6z~O6^iN$^kH#c)512ZEN zS6u#v=uIIf%=Ced(FY|Cq{IRf0;WI^6Q1;e9C+qQ%>(9`B4E}KTzKOe0|Vn%PZ!6K zid$Pk74r`{i0E-I@)npn)mOl0Q-W4|q(H}8ew{PEd1=!YsEOY(GFHhG6`kC{$#YY) zDe1(i;wvU^_CAUIzT?ZSWbWxUQSa8>uYO;BfA8wIW!BGUEbg-}l$m`kc7w4|&G&;U z5nR(6IBUNBu3g+Ll@{=T;h^3Dr)~xF1ml8Dno%~IGY)IKH!1MEc~6}VZoci+vt?HX;~2}dr=K5&_RFZ{^%s}VY4=Od@>WxBe&*Ui~v_E~?S6YG6E z+xQkAW0PpEQa2De=)C%>*UUBFjRJ%@bJsB)&)Lr@lYK>&uU&ZBPHq#{JB{aGtYmUm ztPxxr@uZkR+^3Xpv2FQ-Tc3FQ&3{?HDzS>)V3Rx{W0my^`5RG8i#~`oD8G(#k*^G$ z$?&4|rqy)ytH#SUGy^WjyCoEDNZP~tzhJ=^{e^NtGA*zkQOp{>N$7s|U-Prv>d66RAy@u<%y*m2+EzV_r45TPI%nYVyG4>Y7iN?4SJ* aOkfCz*qpU%X-6}tVD)tMb6Mw<&;$S)P#8i0 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_16.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_16.png new file mode 100644 index 0000000000000000000000000000000000000000..db58fae2e188efe245103af29d6a7f3fba85a29e GIT binary patch literal 1467 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlvSX9-0@Lf6S6q^qmz)Z-HxpzpSg)fSUcFY%MX8A;`9&f5`8lu@5Rj2y zl3$#WU!dR|Y^rCd5T2Qrl3!j7iXMn>T~doO%TiO^it=+6z~O6^iN$^kH#c)512ZEN zS6u#v=uIIf%=Ced(FY|Cq{IRf0;WI^6Q1;e9C+qQ%>(9`B4F0IcvJwGu^3-_x;TbZ z+}aYlKL1dF09%ld5Q~3VFvpRY*$QFiDoh9eHJ@6^+xhyNzK^evNL~lmm8K&TLi{GJ zJk`EBx%{MUQSHlvs~=2y-GBYt?)UHZ-OHZmxBQsy*~8AWmR_dA58^v-ktc ziniw`QT|}Ds{&BQVHij?_+O17{C4Y)qrJoUe}X@jGq>=_T4o4_CT3~NyQ>P z)js_}R9`uhKBKy4QJB=^n!gMQ{xTI7GIDd$1h2*#&h+}$!_Khojqvp4Kh15*7O%Lu zs7oawJ7)^hmNn0`UN7BcW+ckUnrZFecs;m1D0Hg2QSVa0ASqGS=nxaLR}H`4NTUCzX|iCo;o@Dt4*7{k-(1&NTbJwp`hxqy4b_@q*>-{9 zW;?zt7ByLCoOEA2fpm0%DsTH!nCSpH>D Oaq8*n=d#Wzp$Py-iVorc literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_17.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_17.png new file mode 100644 index 0000000000000000000000000000000000000000..d481932a5eb863e373b5d72fe5f98e2c4a8e93c5 GIT binary patch literal 1461 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlvT~doO%TiO^it=+6z~O6^iN$^kH#c)512ZEN zS6u#v=uIIf%=Ced(FY|Cq{IRf0;WI^6Q1;e9C+qQ%>(9`B4E~da!LLc0|VnzPZ!6K zid$Pk7xo=;5YR1g6&4EWbP4;`v~u^n)e7QvjK@#@X71Css21vUQJ4_Zv_jEQ$xvmg zwxG(LGpW;fig%~(Z1G%nyX>}ke%k$WX6K$4fA9#dh}02V_mjg$@%V4P9c=bZ;SZu^ ze*fKP?7(cifyH5ijLm0-o$T?B6ZYnA%B*bHxzDmgZJTxx-!)cwrjv)%nOWq6*u=}2 zCZx}tIQ#wf2`BGNbyPVp{XsB$g~RKHgZndVF9a#f-pM4wBNI7gp3_Aam&?U`j!BXX z@k>hfFRrSVp7PXV$qt8gOe$}FKdt}br*+HIMl~)(Cp3SykJ^eQF`8ew7F9C#^R*wY zGLc#<8ti{S;>xYG%`bx_=Vcyw{-DI_@45EG6}R7(HKz+yGSwe4FlZ>++*q&fIcZyz z?i!~P%s*~TU@2rgQfMO=zl4YD*N@BHE8cB%SM#rU`L*iW-h)pwzqKXt8|rQgcGXL` zXts{Y6t#>$JvJSqC+e}DvZfz658U*dS(5Cy$SAw)^M(2)e>n^otlun|y6)q)$)JMN)78&q Iol`;+0IH1(od5s; literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_18.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_18.png new file mode 100644 index 0000000000000000000000000000000000000000..ac43b87d3f56ab9331df163b25c95ff6a8529666 GIT binary patch literal 1415 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`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cY&)kK9Z}^a}+7CoRwwE{T+~9$_gxB%DO;(j$DR<`7~o^-Mp_ni_sDk zNAIHSMvirY3;EU1E9k3?MkR(QFx>E8aW8W1|0id#=nU*@j(;_ae@pB@-*mb4#l`aF zp&0STaN^aNYI!pf00O2>M4HuewJ*2x?UB?->39P^+}(XLD7W(YVQU@~IU91O=|RA3 z?52kFRW0BPWoL5pqA$01J(o5-UO3rEe$%X#WnhUD{r4uvPIb(5oOj%A_~Xlzw($>U zKHd7v$e&*5$?*qzr#r9p+-~y54wvhn!;&R)&96>Gwa*0q8gai)3iVdReL<{pM7JKz zekJnj@vLB?6*#r#M(v*J?Q!qk47OOne4x`)Tl3Cj=i!n4jzBAPsV2j5=cU%bkg0vY zJve;?{PyOCeYbX9Wd>^2W{lqTw6}d0+2{@I2{{K9#MF3;`mhV{Q*m!}t_utL{ZgXt z``rAEW6gnY9XjCnP&VB4)Zpg5BNaPlRqLNfiBDaC-#IHP;`+pjW$ScM;_*VAb>qwV8q;=-KEBONq9`UR}x+%AQ z+i3j|RyXi8u8rk;BKBV!r3a_64D0Ej)ZQJT(+PFN@zJV#7i*6^3`T&Y`5wo`?K|^* OKU0$-lQ^L(di`&~QxR(b literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_20.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_20.png new file mode 100644 index 0000000000000000000000000000000000000000..20879c7693f88a2e64e744044cd5449bcb405b7b GIT binary patch literal 1477 zcmbVMdrT8|9IwEn@-RkWKG@?pK^TGFqt}++D6H+ZP)3ooAOsWfXpeG(-j%y!Er{8M z7-dd$n}m(0pg7%&Y;l;3z#?u8LJZ*4OmJ~=3yg)wvM?1%wq1d;{lWZWm)!kcpU?O6 zef_RBD>F4TXjhO#A_+C65f*XW;eDkW#qW=9%_DKxDH!quD_bPENsf|e?Q9_hn4F}8 zvQVVGqHKstl1TiE=I&8iG*>MH56s0$;%hq$h#lcl#_56mR2b zmq4=&;I&8=vgLvX6g^!D!Ra!a*9t!wU29J zc!6YWluwuT>MnDY#wT)dJx7rO%Vo1{sjmaFidli>i&+<-w<=@^kV`Xm*3Em%vl1;q zarCQ{-N>;{U^%}yy^emO(WpXUC5jpTEAADp{r}_)5}kp(&GD~h@okA6=$)>$zPMPs zJQO3|7*4zzudsJIC6Wz)m$A16pVmial*Vi3=IXQp4Z)vW_?e6NHm~H0AqyNg- zvu)x~!&zzaTqji%U2v$kwf^itP)NW`d{jVqb;c$+Xfi`k$Vh%o;Pr~SV#n*kz^`D? z=lcyCUOYwMmLvL0sN~K0hVxOMz2H(zS^Ed?H#_}*SIq=AbsY4M(B>vi#ZHC?N2dbn zKaUajrvsk*@Tl`-Rjx99c%yd6Z&B+?=xb}W%wO#IVs3BDV9ibI$60fh#wye3*6GDl zL)E`+ZYllcMnQL8yyxn+=BSp;7}f02*ou+c#Y)={LZ&?e`y;hEjfTOV+zU0}fp@M& ze0ezPZifS`92hBRPjAZ!eCqx7#*8Sru8rxEj-)ljWq-2oqlZZ&`)@dqxUdecPUxap z&kwzM^H|e$JG^6|vs#gV@9Hro$Io)+>$1D-l?nGr<4@-fbbT-}``|ll#_z2Y9j))C zguR5k@o>p>YoV~wz`wn#Gqev4uHn1O?o_}}N6ej@(~lj0Y}&r*)>5Qt%<*j|w*ADJ zPHS&R?d4khcFS<`=u}npVQD*|Y_cUzPri3CGu&_ItaR*g{>_N<=r_k>Qx-<(dwwAj YS=N=9BLNqF_WoE+hD_p9-NEX=0my0=UjP6A literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_21.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_21.png new file mode 100644 index 0000000000000000000000000000000000000000..535114d6f8780c2319522525ea2f3d5390ba8546 GIT binary patch literal 1465 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*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IHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlvU|{BEY-VWaYGmnZ zYGCPRVD98-Wa?;UXaLjenO9trn3tRivo{lHFIcacn;TxeR?bDKi6!|(A^G_^uoMuG zkzbNuoRMFk;2dnKXQ&XKnU|7ZUJQyJh;Lm|i!#enQ{0O3a}~hhYn6$`ehW7@b0Y&Y zBNJC#{)XsHAt%iAfsWA!B@U#-0uutJKoAq2^no0B=1I*1=9nU2)@a>-LZ5+w@w%sr zV@SoVEup&oha3c!e(}%>SJLK8H#?|c+3xT~US`MS@8ZAs{pPtWdZ#5|q2-t0p*4Gs zV_2A(FNb;Y%t<>>=IwrXNTt6{_w&7)H*3mw##DXZ!v5!G-u7+p853L%{8n7R64Jml z;bG~;{&}H&8U?*-sR@vJnfWJ$eX2$HeM8C zT~)0l^tSR|c(TFj<~~o3+nk^O^768`Ha9jjCI47I<@&s#oJeS x*YVAxFs5~7XQRS71zm$TpL6~{@0;=ghN)2-_uaXk69XzbJzf1=);T3K0RU`63Wopy literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_23.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_23.png new file mode 100644 index 0000000000000000000000000000000000000000..1f4401460ed1e05c0f58807eef43aa787b228c78 GIT binary patch literal 1478 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlvvXw;f*ib|<%7!|yM*nf(v) zKgj+dS!X`mSKEP8Qi8!Cf=5o&qlnXvZNk!*i8nvUr~OoFT0Z6Nj5+MiWt=KEH4ZT} zs~>qVXD-KyNVg|d|9NKcFBpX1)bx&^Ega#ENxHawVdbjgB%ATO1r zr928=Od3Jlx0+tX-dLc+?$yQpgy})!Tlv_<k{C_b{}%U3RoiN#_RB|M@{ui#r-SGB8pU&%#zsiA z&2Z_Smdg;>mb;HP;oz%h=?y#{?{}=vy|L))d?))L&IQt6rUb7Nn`(0K*yc|zyEd9Q z=~WdZ)N4sen~B|MH;*dQ+;RNg!8hs4B25yl_>Mf7tRO#Sg8lsS_L+OKU#H(?uf10A z=BW17tCJV+3R?L)ldU_>mYoEo@Ft(y~UuKj{P3XF*r?_Ks^~?L0 c>R2Qgat<8 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_24.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_24.png new file mode 100644 index 0000000000000000000000000000000000000000..913dfcebed412ddabd0608de6c49000308d8419b GIT binary patch literal 1450 zcmbVMeM}o=96qM$7|6hhAVlC&Aj4(cN4d82MrCcUb=@dq&~2T|GLGKSp3u8;ci4h1 zK{g|>GEs?wLnRBt@R1EOLR`j%1Dr#RgJqEglz?L9G+LbmaB;*dQ1lPnA6|0zem&3c z`F*`to0t1sL|A+n000r@T|~Y#J{5RFWzu)rqg|AS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~F0MZN`RAP<=R1C;?~G}Cr{1!!p+C4ubq)vnp=tk* zKQ5fG;3S_7%bXmK6WJYigs-`5`hK^^=6b}_X0JTgw^0ozc@mwJ+)HH&K6P6B2wE<* z=yc43YxyTnDm_sMJQ>~+sZi%bHLOZIHgN$q9gw9nur5brmaH{+#WFZi%;<0Mp zogA~^L)r&Jz8vxnP=EJisnPz8A_rH5T2>Y(OGGt1etEB#!~cp&t5ikoreiG}WdY{F z7Z0pyIk0o{75>$nG0pF4mrC)lMfZE@_`j3t-tDmDo9OeTkVl6qCN2NKvs%BVI&k4B zgO3(BPoGGdS#95+{Bx~u2$_u+B%;M{}8l^V^xuQylD z^?UxU!p7{@+i%KKuJrzlQU5MzF{yQhY|`24z4KC;&QD(#kYA|Dc&(ak@$KBLQQ;!* opFEj)Ep00i_>zopr0D>D1n*aa+ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_26.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_26.png new file mode 100644 index 0000000000000000000000000000000000000000..a732c3d84640a2c1905be1b19109eeb15846c7a8 GIT binary patch literal 1431 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlvKGI3GQ6uaL0dz%RPI`>Q5@0m>SotQFK(&e!Y%K z=uGSEooC{nJuAD-c1VRecYAHV-Mw>s>#x6lFwyML{I_MVqrM+}{-k2<0qLmK2l;>O zk6Js2#rezur-lUY4@=x9h*mJFOwGNx*=Ba*de#c(i(*e?e45h*Qf{d;vz*sxzW;(n z;k=Qe`FnYV$#K`b7AkSB@g?r-uVEYS69A<@rOL$}!YgBVBUFhKRdAh?Q6-K*` zm%lu|zRL}m#?5+^^;3JoxqJ8TE-DYY82HGuY1Y!J?wMz5H6}k}nKkvf+~cNzb+rjw z|JMCy`^UM?x~fo`vD0B=PW8;=OUx3CN^d1?)QHKBnU|Jd@yBh2=d4$P8_EP_Bs=mn z1E)*=HNVjBCNzU>@0Ka6GBy1VZPH2QKNDjZxkT1#`UB%{yl(Ng(gIJG$b3F{UCnpa zvh1?`Kg$<&9_=}1*0fKlP@>KM`RAKumyRw<*vZMFFgeM{IRr@b||EtfK=eH~9&7&|TyKn<(Q@Q^6>XT1qTFrg5#5Pc1>cy(( f3;%ok7E55*E-|%>$bP0l+XkKqtyh7 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_27.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_27.png new file mode 100644 index 0000000000000000000000000000000000000000..424d8a2c97284da5ee2bef3d4437c87fa06656e5 GIT binary patch literal 1433 zcmbVMdrTX3952~I0Mp0_ncG;hHOP4TCJ;1LqYe`Umb0FS+}@KA+F` z`MdhuoF}9)J7OdfiPW4yTE%f&=#7dLzf*o$82UxGjmPoYe0Wak!qXnRtE@3?`0*sRY z3l$dF;x*8vOhzS7=U3*~9F=7bjT20N9MA@EQGlfd3J9=nj}H$J;EFCT&O_S}2&_Pa zG6Gz6%5KR83>;4b3OOuuz)A#AVsZq7HJD}(fWin2At(f^WC)BaR5*+PYY!+|sXeqnxEZf|(>h@kH)qoHzy>^?K5%#|#)| zL=i-9(5py&n$l<>({vc32y1M_MGd4$q0_)hQ<@S%jHnvMRHBwrZ9p-SRKa1c+2a!^ zkAn`|WkkEHT(#+eT-?CZl)&*ej&p}QAh(ngIA1B}1q}HLIRX?i9w+Dbh03!UElKmt zGqlshb1bluU!2*%zS?9`p|BFgjQ ztKSQ>&TclR#O<&6@VGFSGS|#;e)d9b%hArxzQwA!D}9ZpJGOs!{q9mp|E;>42}9(- zV)Wo=y$!kZ_EZDduNH5FZXBKn}&^V zMvecL2`=qBv$Ob>o`I?&YjSVyW|Jm8Rv9tl?s~c3OpK#(uhm6uooXwHClW3<#1{Uk zX-Yo*{4OVdtoi7oGBZo|_IcfNvDs69Tq^qg@W;2$Ei*MS`sK!+Vd*=&jWtO7O!{$Y z6HpyIP=UXGGg_K>=WK1uTPF$K*h05mhDO|LO~prC7l4TFGv6j4f92hn&c8pJsFrSN zOXM!@OdpDLr;Xij{+Uwfq)$uRudw>8;O>LhPxTJ{5dYFQhmPd!(FP~F)VnV2*jKdV z%8RIK8=QLf_V6+Jk2fZ|?`X&MgFRbkQybnOwrq>79=)4Ub#HdqmJ~>8M9bLBnaj&w z^|_9(f(O8CU`(C&(PYobfu{45^Ob!Ue|cfFbRozXw85CJ#>cKrS5MBrYdxIxD1?HO g4=*2_Y>{k|1W&b(wRg^^hJKc2V-ESg{;8V30lKgeQvd(} literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_28.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_28.png new file mode 100644 index 0000000000000000000000000000000000000000..c238d2724b4b74196a08c34e05bb7f9130a78af4 GIT binary patch literal 1462 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nA0*tB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`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*9rcC~7nrwYV`&V>aPw1{JCf*w~7z)F2iOu0k}HG!2THl?IauH>r#|vreT%ltxQ{ zYh_&`$=a!aE-mSnpKh^em54^EGXGcH>s-hG$r&s;1N)ofU(FIYk~+}8+-!Ym zvw3+aR=P2QbTzz@7asvY(0wazDDvF#758#uS&@p#wy#fhbjA+8pq9qq(ag^pFO7dg zuy2mu`~L26ye(Xte7vh=+R(ixf7haK3jKW{y{^3O-B5c+_S9- zeYbC{WB{$BNuTc=OIT&8X;&xn+$-N_4M-Rq$?t;QoSAq5mzml`dyFWQHIg-*- z*5*RIY&f)C@eH{79+ciQ1=OBSy@VaeN-o?lI~KBU`-FTUekN#qz9-&^HWQ3&TgZt$ zXHL8eS)03-V%kDGvup$BJ5Fgz=nm{$p6#M-0*$H#=$3TD zSKrxvGjF7fq&2<2TzV&8X82+F={UvwBA=k09?O|@BuvZ9#B5#7slCj}qd#c}y^A-9 z_T*c!zpWJY-TdW%k2Ugfm$Re!evMa_a(zF(fPNHm|H+ZE3X}R+V_i;XR+Q8CdT(#f z$If2hoHlW)#g_WoqS{t}ZFcEF;%fBs-v<40EhwX__`~Vw?y|tV$jDDrRQ1is^#Z$ZG=Xv|}uCOyz zS6_V*8%zx@ZcU9S?oRcFk9gP~;*dP3W9CTf1p{i}WDr4gVud7vAILzDeK ORI51;|I~Q!t-k?RjSr>( literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_30.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_header_process_30.png new file mode 100644 index 0000000000000000000000000000000000000000..4e28564a2a14310d0c2b569acc1cf5fefd9f3c8b GIT binary patch literal 1476 zcmbVMdrTX39KQiFwlH9m@EGbY2gA+K-lGrbjq+%(g*wWkt%5NbJ9-D)Xz%LXu@(@A zGe*IofNYG#xEWkzTS6qT4aN}mV1mg+!xo~r4Hwjngg6w!_+#P~DEbHP4==gZ41_1wJ##SH}n6q#@=aiFPjNIdNNo)W}PW8A*dl@Z)MRW0kxiqlK1racS<|h9Phn zB9>{P6{iZ!xuBloX;39cWOhW2f@-B4RU#UtCIQ3{6oF9;MiONxf~yj71O-d72bC-o|kbUkButav~>`axPGBRmo8>pJ6G^EqKeb5-maV z%t4wm@|+V~&M(faV?W7gOq4vwl!pI`dxcB=pPa#xGqATg{?#nLEvW;&)3w%@7HgM> zW~Cd$OIPDtEGi8EHq4obbereL?pL&BS98Pb?>F3hF^LM!{&2TEdhBL;d+HVWX)Cj2 z`fP8DCF3HV)T3(q;1)VGguc@Z28BFR#c6Wb9TiOYW!LTFQ=bT_h4jF^J->BtKa>^! z>_l}-GPp215j#5Up4z>5c%Z8P)1#-ZZk-B43Wyhuh4n%o)lx^@T_^tBaqhBeP|;rh z^R^>xF%83PYf#jiH9;ZM!D-QS(D*34tEp4wHx8U^3YATUObKOm{)YaHQ-FpeE3*nUvqrn zHV>rjRi7NK{-gbRRuVL`(eL5|8E~j!AhPjPL~np$av}IgE z?704mv5Ex0k7v%5w7mq2otu(trc;LDCI85>*p{@&{GBG={}J%82Yl2+8O3VsY(~8G zdO+VVe8u@Y?0kFZrpK2Y9i5O^SJV~QH(&Xr_Xo#YS7PdKSkK+Qw8!tKYiGZoj*NeM z%%Q%Q`DAbZzNJ@Rt|n*ezr0nK5Iz}lx3ia;@ZT8k7Y_gc literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_icon_Back_ef.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_icon_Back_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..3ecadba7fd7496147fa333833c0fe91a14e1a636 GIT binary patch literal 1951 zcmbVNdsGv57EVP`0c}B~*n$oL5vyb}c?_8}(M>W5#1aZgEYP(Jc?>XOGI27PfCMYP z>7gQ^h#HDeY!MU-N|yy)R48(MP_-zsD@{{dA5>(uwz&1N6BWCEc=|`@%*^jG_xrwk z@9*9-TM`pur}@0$!(cF`DdSKzJ-+36rg+ou?vuTLrH5IRJcZH_8I(;&Vho9q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07dmL1xDsT${{9X#xIyNjcuiS&*I z4U6Vg)d-yz T^}w>o^UGAq6VQXw^uqrEpiv4X literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_icon_Back_ef_02.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_icon_Back_ef_02.png new file mode 100644 index 0000000000000000000000000000000000000000..f0efc398fe392b21a5927fa4f8ed41e5e47f3de9 GIT binary patch literal 1945 zcmbVNeOME99A6=5fQlIkM0F0uCG6$)#_rg7*>1z}7K{md@Fm7}y0P7EYzGVsQF)P< zh8bjPN@`M%5-DoHB$Ol`MWRfogi=WhFe9;qP@%dhSbzBRNB6tC-^+bJpYQu~WeM?7 zbKU*iDHO_F`AS4V&MTbH95?da(cZb5oO}tXib%rO6FF)NN{Q6s=_nw_)EiI*s@CRa zcA`QG#bv!-sUlQyv9Jcm7;2{s!-knjG=(Azx0%%%14;nt=mxz>M7`Z|h6?DlB5DdR zjumH?pgR4^JPVqX7q8Uh88ncV8Xg7+Z7@lIp@bT+VMdb`wuz_@d0}$xJZ4gXha!YQ zM15qGDlP$#;1(3%F*tM$3j_f^p8;}td_EWquvs9R$s%t)9pu71KFkgQrY|a~&7xfo zD-hYVE^;TL>IlLNGnqL#IgA_*1Gj8of)E5bIoNDEDM7d9nh3RxZn6fa{SBC16P) zu9VN^i=}K36o@4PsXzenWC$ddu-G#kPr~xqe7+<^Dvk^xfuNKvU~v(I7lN>ONQhJh zfiqaS$x5hA8gxdlp42;yjr>n6EU}tvcKcNRs#fEk$qA;yKor zo#}bxErMF~*{D`#!7<=rd|~|)^n)@s2+24Q8;lHb`Yo1)@T39+8@^R^to5#(An#hi^kgf5dE9y#iT&Em~RNDG~*>xqRD$)O3 zeoc2=W3BP0)q{Hrb!WL<>l(ecRQFeSqqh!L0N~|Cw#3C{OQ=`x&9-^_B6IRkHSo+O zyT?1xjnT=`Mq_eOHC7Kbjft{fZ)m*NT)*d}%S$yIG@(NeCcn5nB8;UyccI_2u)BY0 zKmeBDcex#2e7(=eKg}gWWUxn)kYS54hS~ zlgrD?$7}5grQdfSH)>cu#Pu5iqw|8F@_qNq`IFWIUbOc%(Mrx|uE7Qtj!t!_rKdxj zSV_hn0tw8AC%uO+SR;tz&IDqrRWGa#RJ&)CasA3*Y`d zZGmw1@5FDqs=>`K?Ds4c%sNV084-5gwP#=n5sa&7+t0PQ2Bn%qJ;E+x^Ew*d+Jxoe{}>w+{d)6e=D8EY6BEr!!0Wk*sZD{uo<3oum_FtTg_8|+bwNIXyP6}46KK8n zUppOo@ouq|wO~HQZ~M9TcJJN|-Xczw`Gl?T_w|Lg9(wg`LtAOw9mFe^_RX;xh>Tzpu0BxZ*J=N^$$cKr~QY?mc%tLNMuACE6b z4i-tmLqj*F)+blZ&UYz2vnk85rlM>@C;V~0Ywyw()t~oVxsvbJw7PxkMB4F1cK_@{ z?|j!8*z0gOyy!l4Ep9;%dXBd@rPeRK^ViR983x0$mq$jE6g58Y7d2L_yZ=^1-Pac` zbssF1d?mjw9(aB#Ua@v#!S^QNaR zUAuPF4Db8)dReUFVrOS(5Qbsp$4*Us7a?h{tgKuV9~(RDKQGF|?**!&;VK+keofF7 z*#mF;#7k5FwZ-HeS(`GeDwkKYV2^Xu+}K8Oq5SC%C+@jZG3oqS%BAthN8+@te*-fy B`b7W$ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_icon_Back_trans_ef.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_icon_Back_trans_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..19b3fd3744a61fffdff23261645d3828d742e17d GIT binary patch literal 1491 zcmeAS@N?(olHy`uVBq!ia0vp^S|H591|*LjJ{b+9BuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFsEgPM3hAM`dB6B=jtVb)aX^@765fKFxc2v6eK2Rr0UTq__OB&@Hb09I0xZL0)vRD^GUf^&XRs)DJWv2L<~p`n7AnVzAE zshOFfj)IYap^?4;5Si&3npl~dSs9rtK!Fm_wxX0Ys~{IQs9ivwtx`rwNr9EVetCJh zUb(Seeo?xx^|#0uTKVr7^KE~&-IMVSR9nfZANAQKal@=Hr> zm4GgVcpk{1iHq`zbF$JDTz5Q`N^fZsd*)yF1AWQ8NHOu6f08$3j=3M z6IU}6GbdLgLqiKEXA4&g3rkZs7fUB+10$Fj*z}rN8e5nr6~`kbKE6kf z9zA>WKuv_*vApmTzks^=MulBrGBPZ#7k({Pn0KFDbIKOq$-9^Ab&{*GIB{1sJ}&NF zb-4~llZ*9?=^4VsPICj)uS^N761updvVbit=k+J&bCVfwFW@jc=yIdxj07;#hG(cp zuyQM~7hbQ~=rbp&L`-I)-iAQ2n>xWCGq`dZ<2GsYWaU!XFtYU-B~ zhGW@xjXBrwubFIoV1-ZkUQV0aO08ep4k#|Q)Lr-|^;*ity9x3tr8cWnXFNJL;f9F4 zbm(`R$fF8OTPIECjhs3|VETF+X`XELKbsyz2}`ed&baK2K%4%7m=~u)UdA47`tR~_ zM~zF?XO)K^j{`5z;9xhM0si5by z(!FA0<&LLL4=q-?W$)=0k}g?%-zRXDK&6p;_|#8tqdy4Ma`t@CZ>-9_$8-OlZHETO z`|`v$?px)re#$snePxsH$1g%2QqQ9&h<`SeRhk#Ry6oB(_xl?T_#Jt2e~P?7__j}* zG8ei=A3eMx;LV-wYq^f!kxy5@!ddDx_kzba{R0dWbC*y1ns8JGRLpw1`njxgN@xNA Dd+!#* literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_icon_SIP_close_ef.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_icon_SIP_close_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..5a11bb05146b598dc7ead3442b67fe429ecd2900 GIT binary patch literal 1861 zcmaJ?c~BE)9E}wbP!S|vh`L7N0g{U(nw5Z%1qqVK5f$ozA=yC0&90k;1Wc)-6-7s3 zMnMWFioxoL6(gq#3@S<~9)JgUM!^=1;MtBMV>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iQ2^VZ&}XQ`QFRexgc`WXp^zHxM6$g>jLQ?1#N9@rcfUM zia44RV!S=S2D@WfJyve8*@vg^^~lPsbKk{M>|0rK%W%c=qO`O$f&7v$zn5CpWnX8J zw%l<&wB9tu13P0fz47VHbWHE;JqJ2mr%d1c#GIO*@u}Tuw(IQQr0?g}Q7S8MNk`z^ Q5!N4@I8X|m3|O1?52$VGUH||9 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_icon_back_ef.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_icon_back_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..6117a0d96309bb425f9b46e07799187a9478acce GIT binary patch literal 1926 zcmaJ?dsI_(9G^^KB8Z|QAi?!=6iBwQjSZO$WiJ>onq%5TLHD?03+}`1(&jK~q({&^ zKr_@+0;vUP5^2~F6iUGd9%J}6ZP7zPG66}nd~`=*{Sn>Yz4!MxpU>y}yyuq6GLn70 zgS|;4lCLC1C@1Du-4Df+cz2vUyPBASaFG(vM0L1XWrRpcT2u`I5?GZB$sv_?!}_yO z0*OQh4GJZ$l%{hvC`?niF*FN|5o{7EVW|aEY4RW(P(!%}ga_VlX#)X+mIuDhmc~di z0i-viSdCDoHAA7X=4s-!;L=1O!NMg3UOqWZn-N$qg7=z$>Jn(O) zlu{WWK#dTP~%0fj<;o}NI$fPkEFx-G5 zfLl?eMhkErNO<~p2r%|i7BRg@6Ok~wMTOBBv>10t<3OqO|DiDa5^cie&_DkEr?5$} z0fXpr$b=RcHALZb;cinHS73xxIBHa&X#RK>WqK4xO?ngq1eqKl@^u5EMa`zDF}zgD zl^`Zug=ip&kOvY9G=o9QW$^j&tXP&n7%yZq7$RnTEL$vyTP$J=#9~pLfHlq)qM8C2 zLhx~}_8+crLaw_NV2rRVgp7taA+6Ym!oXO_T*Jh^Bu%LIf~%d_7yg7?I^hi6UD$sW zdi;p!9{2KP+Y+0XjSnG2w;PGJ-XA__B)*nEB*G+x<;JhO3R5zdhnzlc@>_%4-qw6& zc(aP~Mq+?Hlq`8z*0XhG(v+z)ZOUh}t~>{4@+qFG1?dl}W1cLcQlcgomh5k?)%o*KB@wke!7WMxTY=d2#{zC?oe8qHk@??&0$VW8-Q5dDo}p zvZMgYPkh;Cb#XfW0TA5!*?|M+C`Uz)Kb)PiX^#iv2XdfC#n8~u<0axqVZe~3)nm&^ zXIXW2JEijLNjFVMi>xF?P)pX8Y_vV|dNk$N=d9g#v?Su=84kZ&^AoGruKVgciO)luq;YacXlMC5v%x^h zlUVbrel`W#B{q;JI_nU0UYMtM4mAJWYu=L#7KA?c#y$_U|Jq=gPl0 z71=){g#7jPZf5^e0|jC+nLRgLE|)AjdyoImzP6HpcZD@`yf>S>yKepN7@WOtL(Li8 zk!*JG_EEdtKCn@_BaXqS2n!9Z(lupK`}WMEgpV$4Id<$s-|yCGdDNZ7KJ|(NSxTkF zL;9d7VpdkP*(V+d-Qe>+p?xG z7=oa67}mH;moS>I-u0%>)mxV?;l){(Jd41kd&$()^qOc8lKyI*;nyr(0cK*+V1Y; i!{y!XaSv{r5=e?kuaR7tK9c1AGfG4m!Uq1j;=cf-6aF>; literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_icon_back_trans_ef.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_icon_back_trans_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..19b3fd3744a61fffdff23261645d3828d742e17d GIT binary patch literal 1491 zcmeAS@N?(olHy`uVBq!ia0vp^S|H591|*LjJ{b+9BuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFsEgPM3hAM`dB6B=jtVb)aX^@765fKFxc2v6eK2Rr0UTq__OB&@Hb09I0xZL0)vRD^GUf^&XRs)DJWv2L<~p`n7AnVzAE zshOFfj)IYap^?4;5Si&3npl~dSs9rtK!Fm_wxX0Ys~{IQs9ivwtx`rwNr9EVetCJh zUb(Seeo?xx^|#0uTKVr7^KE~&-IMVSR9nfZANAQKal@=Hr> zm4GgVcpk{1iHq`zbF$JDTz5Q`N^fZsd*)yF1AWQ8NHOu6f08$3j=3M z6IU}6GbdLgLqiKEXA4&g3rkZs7fUB+10$Fj*z}rN8e5nr6~`kbKE6kf z9zA>WKuv_*vApmTzks^=MulBrGBPZ#7k({Pn0KFDbIKOq$-9^Ab&{*GIB{1sJ}&NF zb-4~llZ*9?=^4VsPICj)uS^N761updvVbit=k+J&bCVfwFW@jc=yIdxj07;#hG(cp zuyQM~7hbQ~=rbp&L`-I)-iAQ2n>xWCGq`dZ<2GsYWaU!XFtYU-B~ zhGW@xjXBrwubFIoV1-ZkUQV0aO08ep4k#|Q)Lr-|^;*ity9x3tr8cWnXFNJL;f9F4 zbm(`R$fF8OTPIECjhs3|VETF+X`XELKbsyz2}`ed&baK2K%4%7m=~u)UdA47`tR~_ zM~zF?XO)K^j{`5z;9xhM0si5by z(!FA0<&LLL4=q-?W$)=0k}g?%-zRXDK&6p;_|#8tqdy4Ma`t@CZ>-9_$8-OlZHETO z`|`v$?px)re#$snePxsH$1g%2QqQ9&h<`SeRhk#Ry6oB(_xl?T_#Jt2e~P?7__j}* zG8ei=A3eMx;LV-wYq^f!kxy5@!ddDx_kzba{R0dWbC*y1ns8JGRLpw1`njxgN@xNA Dd+!#* literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_icon_jump.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_icon_jump.png new file mode 100755 index 0000000000000000000000000000000000000000..518aa05a70f0d6e797b932beb1324480cbbee5f2 GIT binary patch literal 2991 zcmV;g3sCflP)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$o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a/res/common/usr/share/osp/bitmaps/480x800/white/00_icon_jump_ef.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_icon_jump_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..2a49304950fc1f54a4354d5d5ab291babdb420fb GIT binary patch literal 1376 zcmeAS@N?(olHy`uVBq!ia0vp^av;pX1|+Qw)-3{3k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+n3Xa^B1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxKsVXI%uvD1M9IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD$Tv3bSNU;+l1ennz|zM-B0$V)JVzP|XC=H|jx7ncO3BHWAB;NpiyW)Z+ZoqGVvir744~DzI`cN=+=uFAB-e&w+(vKt_H^esM;Afr4|esh*)icxGNo zet9uiy|1s8XI^nhVqS8pr;Du;&;-5A%oHm_Qx``wGiNt5S4U$*Lsugwa|<&^S7$Q= zQ)3GwLpMj5UYGpj(%jU%5}4i;xLy|noO(e?A-4c%vrB4GW?5>ATTy_+aZn`9d!*| zZ#9%U`221;@_4vTFuSPowO-YU*K>BZbm@y``}O7e-|IZz-F`c-xl~CycnXjm7)HNveUd9D}B^9H%(ySEz=P666ro# ztA04UFaGWFchk-~KabVayK>Or4#P3~zfqygR>unOY)h2TnU#K`P|#wA1FK`i<;l2aD3+}t|=5u~y%;ml( z;={PKefQg#Z)XKw$o-kJm)X$nb=v{q3t}d(XWrLV=z65b<`?WV_k*m)vuXEVD_@*` z{&{*zWS_f|;M~-kzqB7z-U|_V%3yCVGrf4#s=P!P1~i7E8U0H6_o! zvn;>-GWgT3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2jt1LBs!QCs9EN|+ysqTp0o_AG0e%~Ly3H6OCcNdt6^USxYyma^a_3I)UIy(~% zHYKH4+U$_;I4`_XtnVVLNW+i6^&A=sR}F$bWbCf`5zQlz!0_~E)SjX*DaSxXny0Iu J%Q~loCIIJ4=^_9C literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_icon_more_ef.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_icon_more_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..5254957289b9fed4265a5e45df3287b51a1263fd GIT binary patch literal 1507 zcmeAS@N?(olHy`uVBq!ia0vp^S|H591|*LjJ{b+9BuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFe_z-M3hAM`dB6B=jtVb)aX^@765fKFxc2v6eK2Rr0UTq__OB&@Hb09I0xZL0)vRD^GUf^&XRs)DJWv2L<~p`n7AnVzAE zshOFfj)IYap^?4;5Si&3npl~dSs9rtK!Fm_wxX0Ys~{IQs9ivwtx`rwNr9EVetCJh zUb(Seeo?xx^|#0uTKVr7^KE~&-IMVSR9nfZANAQKal@=Hr> zm4GgVcpgi&u1T;Y}Gc(1?z{u3p#L~&a#nQ#p(9qS$$@Jb`N`?|c+12! zF^nP{u3bSc6B67TcYFxEqgcGXPFYt-NqiH>{aY^Pmy)ORzpXa6wzg(|JjZ?7!7V2y zMQE6aNOAGD-V5&jReM6By62(j2Z4Z6WrGJo746aqriqL74%oul|~GtIK(#|DApJ0|JeD(>DLy7Pa=- zk>FKEZgY;jUEcY3Y1OS#ne=)KnSWPIdbI`4*q%?`81W|1M$Z1=Z}WPaqdi9X%oRp) z9*#AWwl=)qXCJXe&Q&Y=%+yJLPS5?&x}1k+%8$DW+vDDF?0w-NF1PLZ&Y5P5FTOZ^ zG2=*xT8#wzclHj`)cj@3J$|Imh~rq;IKS!=)A2Qe=Ff_pxLXhDbF59QGTr!A$6?~* zujdcWooeSZ)$1uETe_B6rNfMv`+|3hUY^{v=KJ2b^^GbuX%cPkcI7R&>3F^L{I*>2 z>8FkFe0`c?v{QGs`}IcV1v*I~u7{Qz!)k8c_19nb zx+opkmk4)z4*}Q$iB}8kRQw literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_indexlist_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_indexlist_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..525449866377efe437a0d2e949dfa1d1bbdfc551 GIT binary patch literal 2873 zcmV-93&!+`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;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cN&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} z0001FNklX=b1 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_list_group_bg_bottom_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_list_group_bg_bottom_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..25925af9aba9d4c9093aa327e9a1556f10ea9711 GIT binary patch literal 3082 zcmV+l4E6JgP)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^ZHAR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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} z0003sNkl(WSK^4gqCR#2pfqJGZO$` z&dW8|^OUrV9LH61xqKBsuuL?r?$;Uw9Hv2KnT8O8jx1#lnd49whkna%9c=+1tB zd%cmQ%}2*^=Iu^5T*si>X-lfADq;9}yq%ZNTdlKZxl(Bok)4E)nXiJy;$kv+2%bH6 z?9crtFh15oA#9bD(!tK|o?fq?6bi-SH4$AdeOrl{&dj&WJmtS@8tu@RSI0#E9dY^^ Y0C#-J1i9`P#{d8T07*qoM6N<$f>YVL#{d8T literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_list_group_bg_center_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_list_group_bg_center_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..7e79c6c3d45e39d809885c812798ac7e70a2a8ca GIT binary patch literal 2884 zcmV-K3%m4*P)KL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5fN`*o*)G002ovPDHLk FV1i-E%W?n! literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_01.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_01.png new file mode 100644 index 0000000000000000000000000000000000000000..e6d984cb3d829748c578355bdc5b2777dbf1a8df GIT binary patch literal 1778 zcmbVNc~BE~6pjiJQ3Mf2gsSUOETB0yY=Q~KU=B)(Knzhc3P{LqLNv+7%|Ze#4kFqL ziU$aSqqTxjbV~7P0lB2Ws8}jfL98fhwaVayt%43(y5X?>!}>>eX7_h}-}~NszxQUh z%c4GYarSnmP$(|aaIu^m1MRO9mHf6eU0O>Hvk8fkh`}_3MTMi3WeApt0#buYi^@?I zlDhE{x`aZRq|qsqgfenDPmLMqDm#X5HJC^?g|b9oHL27aPy$FqwK^jod{)x{0y=~b zu4YFvBTXVSNf(}mqcLew3U%5BH5UN|OMxX;9%;aU5-PxI&>PJ>D<2%O%OmIZZ3YO8 zK!^=|aMUSfqzn*YI0~@oOq!a>fdCFnhhQcb<}LzQOo+*VSPW(`4Px@x!8|4ej6EQ! zh9erDTpTv0MXvZ@5=sptSTex}Nl!;ZFqk4E-x)TV#}Y-RjA2!o7!aMwFc|D{jiAkh9R0_Q z_oB^;R1?aOqh>4_SCjXl@f|0Vx%;q?9Y}h^i^g^2rKt2`Or2~%jf7Op2gwsUqC}(x)J)>&!(=8#^D>TO|jWcU+x5l#$ zw7m#*X>)X)@ym)gbG{sSUhJ#iapys{_e5$zU&t$cMxbD`HhIhG!srMO7_$8_x!=jN z+>t1k?TOZA_VriYf8GarcrKVey+@S1@0zANFA=%~1S!-x3FpqZgSAQej0mNodgl?= zMW0=f{NIMe*WD8MaqR)m z&m3**(M}2Jn(%U}4_x_>3glEI`llXVFQa<9GqTsVty!McA$IKhtfO|@iWBEp?K4iT zUeI+o>uu2dA2)nF$+PojJU6eqH#2S63*LjQLw1~)tGJO?m(n=vC)zQAAHKOE^xHF_ z!<%W9g2o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@8)YvWMsQw$F*B4%!KV&qme~U+g~+Pkgk@v#mi`Cq475ct;}Z+VIbXJ!g`u_TI<% zCEb>f=6mN4H1(7i*Z1cop6v}9G(1=zv{^f72h1nCieJ4BS?zb=!cahoTL-&$Xw93O zfn`~28=NtxNdD_H!ANA~lno-zJa2etO)6NNCwIR7dW3r}@cgFlm3tgLhw~eP;Qi+J{@hbrUPCDN448myS;ABM#*-J~yDVG;-*Wy+RXy4y<&y<5XN2J?E~ka{!Sp^5@`W^n7y zhP3=u%Ke9aFF}bCKr6VO91+*!d^$41=)%*kAC5v6C9M-DX8#RW C)uSH( literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_03.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_03.png new file mode 100644 index 0000000000000000000000000000000000000000..6ebf6de05b447bb328adfa6afe98568504dbddbf GIT binary patch literal 1697 zcmeAS@N?(olHy`uVBq!ia0vp^S|H591|*LjJ{b+9BuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFsEgPM3hAM`dB6B=jtVb)aX^@765fKFxc2v6eK2Rr0UTq__OB&@Hb09I0xZL0)vRD^GUf^&XRs)DJWfo`&anW2K2iJqZ} zfu)J1j)IYap@F`kk-mYsuAzaIskxPbp#l^r0c|TvNwW%aaf8|g1^l#~=$>Fbx5 zm+O@q>*W`v>l<2HTIw4Z=^Gj80#)c1SLT%@R_NvxE5l51Ni9w;$}A|!%+FH*nV6WA zUs__T1av9H3%LcpzHo!{ilG4o3^M(S!~%UoJp=vRT#&!Os*6j4QW4I;s=7F&vLIDI zD784hv?v)EA8E=k&A_n3ZxKi#&^1>6MVY`zNz8G{PcF?(%`5SAu~h=f=%r+)SeY2O zIyt$xI+-||n7A4l8ag>UnY%a{o4Go>7(1F6n!?P$rq|rk)YQev)zr+**u>D#)yUGt z&BW5c(8<-!$;Hvd%>t&^Gq1QLF)uk4W^X3YUZ`FZyn3yii&7Iy@{2<9^K)P+ARr^Z zB)>Q#zd*q`*i_F@Av`lLCBM8F6g?2%x}+9mmZhe+73JqDfWy}+6N~*8Zf@pA24+Sk zuDJXS(VId}nCSx@qYp|PNQng|1WbV-COqi_Iq=Mrng`4=MZm0aO?q!70|V1VPZ!6K zid%1HuI+nlAkc7o)q&K;#3DWaz%m0($MXWqW90*6Rhmx; zZu%TCmFHn~8&zf}|nn)hOMlB!U|%`@y% z&c5?xj^y7mQ)-L);WP&6-A#6ycGfLV_Bq_x%dH_QWHS9T#{{J{GG2xirOC`^McTS1 z_J4E|405~R@%XH!%Qr37^=?)dTqbJ2*3?j}zt;7^t7O3@^VOZ&J1>cv)TLjD3aZNtFzDuf%~-f{$H|TboBsNRGV6=%4SaXOnU_=Z{Wm8c?`1ZtR`2+( z>~KnY1>=c3%VX`doEju+B^87Pwk*y%-oLN5cJ)gE&3lfijfJxx%@q#a`gqM1?wy(s z-@fT)aTPET&9nE3&FZ;#`Dv>565f!OyV{pT9B+uoU*q^`G4Jng4P~+4?$S%RHO#*) z+i5JcaAkULKtfyLu9VL^Pn>P_UT5c8*12s@SN8qYAH~X_MRr(=^Ixkd3txEkztIKl yKVLLjc%2J2yKr3g+IZXh+5G?MQW5_+3>aADA5=BY=KKY!G(27XT-G@yGywq5>xa|; literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_04.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_04.png new file mode 100644 index 0000000000000000000000000000000000000000..372e02aad258055250f980825a5d8ba29e125652 GIT binary patch literal 1799 zcmbVNYfuws6b%aU5(J98v^K;FC?wfkl0a4>kZcmr1X7F|v4U%|K!jvNvYHTlMyyIl z#Hs0sHPornBB)r@0)iqwE7qZ{Vl}8$D{2w&L9JMz?MA@%hxJEyX7_uYbI-l^yLWc8 zEJf_)5#m9iP`r|pkTi0f;dtG~k>9hYFDxR5U_z)M=Hgj|5!GXqL>0aiqb6(6Y%C2! zRR#GMus8~3Y?fNCAQVywti&}8)PZ4`G&+(^p~S_Tbf_{HBdANUY_*n0d)(MeqpDRr z+5)x|km>|jjylP#$L5+-=pX>IV_*QJjyyC{ zO|Qy=(-6^!7P;clatJ~PGnq!CkztHx;QDMP$mMdG0K|kKI*Fhg3bX`jqH7IPM=c>gSYBY|xUZD*{8upJH zZ$um91v-qGh8ghXdL?-uSyM;JWbWQB7)s!JIgaOzR)8!ACvZa!uA>U(vKb(C zfm*A=jRwc{3`dJ#di4rSCDP*>>Z|<1>Nn`eibOFGz=2r8|B8Eqd&5obxkBKwDg0{Zn)`hP?T=hQd#a@BG-|W(^F>ed2OPo$e}kDccehsLpE>hvDWBJM z9B90r*EF=ct>pZk>r0;93%Sy^$*sm|q1f1Xb8Fwr!41u`CVQv$KTX|5uUXTvKcGak zXRphxquZ0lg54R3(#wOpgKi&8sF`2w?E2@&RbonJ-3d`~?<0DIGKw;93riZG!3ca{ zK5m}|PfuOjrac$_WYWo1mpZprh#Q3K(vN2_dtMBDF{AnR{c>4tIWVcma&Xff=RuFE zu)FLIbR|K=<>qJOe z!GyHSR=?N{{p0)WP3#}ET)M#Sw)1?xYlzRgFOIYf#bKEkd*766@Bc2k=vP?zW!~)l z3hJj7O>k9L{a5saR@=()rE_dOwW&oXeYT=q^T(X{uC2JIzNWDz)qf`9iXIQSK4gpN zonF5E%)FG@wLRU3{ksD!$4>n!zQt%yd@f(!;8W`+FRHNI;wu920MF+;+)L-T^sn|+ z1%ID+DDZ6AHn&Tx!XiqfWS@XzTYsZM_bq$>Hc9T}In@nUc_FDlbRhqR^#kBkwo!3( z;PHIc$FC__n1USSFR}a$`%SR` literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_05.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_05.png new file mode 100644 index 0000000000000000000000000000000000000000..33d663beb13ed2bd09602efb8bb6ec5ce73fa345 GIT binary patch literal 1797 zcmbVNX;2eq7>*?Zide9Mf?Br$sRtyx$%a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cc-Vp33T-AeaYk>VQq=?99+o?p5; wrkE_-dPN`kg?y=&oZ8SbIC!n`S-)2`?F+MSacs$x0^5%%Toj2M6DZgJ4PN@a%>V!Z literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_06.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_06.png new file mode 100644 index 0000000000000000000000000000000000000000..a0927f5000ce4350a7eb16e0193d96207dbec68e GIT binary patch literal 1806 zcmeAS@N?(olHy`uVBq!ia0vp^S|H591|*LjJ{b+9BuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFsEgPM3hAM`dB6B=jtVb)aX^@765fKFxc2v6eK2Rr0UTq__OB&@Hb09I0xZL0)vRD^GUf^&XRs)DJWfo`&anW2K2iJqZ} zfu)J1j)IYap@F`kk-mYsuAzaIskxPbp#l^r0c|TvNwW%aaf8|g1^l#~=$>Fbx5 zm+O@q>*W`v>l<2HTIw4Z=^Gj80#)c1SLT%@R_NvxE5l51Ni9w;$}A|!%+FH*nV6WA zUs__T1av9H3%LcpzHo!{ilG4o3^M(S!~%UoJp=vRT#&!Os*6j4QW4I;s=7F&vLIDI zD784hv?v)EA8E=k&A_n3ZxKi#&^1>6MVY`zNz8G{PcF?(%`5SAu~h=f=%r+)SeY2O zIyt$xI+-||n7A4l8ag>UnY%a{o4Go>7(1F6n!?P$rq|ri+|1R@($vh&*u>D#)yUG= z$=uc4$jQvj+{M(%%m}8}Gq1QLF)uk4W^X3YUZ`FZyn3yii&7Iy@{2<9^K)P+ARr^Z zB)>Q#zd*q`*i_F@Av`lLCBM8F6g?2%x}+9mmZhe+73JqDfWy}+6N~*8Zf@pA24+Sk zuDJXS(VId}nCSx@qYp|PNQng|1WbV-COqi_Iq=Mrng`4=MZm1FYfUvDFvr<>x;TbZ z+i9UNPuG-N`Q~B*f>kprP-k*7M=H6c~OIF#kUC!!1 zvhGIz$BLM5b<%B|hnp5YE=^MGk#K9cUVK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kd>{%yn0knq znpP%}fguF4V)=eb}OBvZ9(U1WWg{)GUAwhx!>P3LjA-YgKHP1|@Im(HVk`|^EhbiOwT06eNMgTvv0 zJRgn^2LxCg#xyrrtwSYhDLk#K#B`^);5)exM+-|(L@Pp&gy{+pC=e9UDG&{T6G|fi zgm9%=hUj(X>zRy}3u~3hu#B%oRD_BALdv)3`||ldR0^F6^8PFCNv`bw!tFeyJVy%&$H`n67^)T+tsNXb4yZ>~-cua!EmZ)^=4EBwQIGbz zF`f8Sr@0L)AKU$EWw)-~V|i2MfvYbUIfj+&J0d@^sXuAtAqo}TdNLB}+_Jr^-u4P7evx*gsi^0{^+eMeQ&jb>*9BR321fP$!=3JSN8Nf{2J=XU_E3Di;cV2Y#VB-m zMUKt(gF8Rf((wKGau=IFFI&FeHtw=z`N^4nd+|xyIZ!2dxB1w0#U6)n+e;V9ZB4br zHUPMO&VP2rK>Uv3#G;3ZTXt;D9}v^X<*URWhLu@;p5bqgY_{=yaLssgJd0PHkdRr| z8ZV&dT2_UvNvS9--pCr}U06N9Qi=t`*_mU~5=XSAdS;yT$Fc`!LxoZt^I!7tU-mnP0q~SGm-FW zMqN^j#s`FnuENR@M-I$Mc3`#SyIQcS;A5%06h?YZ z)wLtq-uwLA<9WC75jmrUH69ysGOUDs;QaGlc42?`CU&n@*9XX*N{2l5r{7*w+Y#Th z;*q@QqUj5bvCO)#^lam{z-+$)caJ77NMw1#64uWTtd3rn6Ps=9___VnxL;`VNcavs YZlkAt^St_Ug8Baw%v;Yr$&OC@8)F8vvH$=8 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_08.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_08.png new file mode 100644 index 0000000000000000000000000000000000000000..e9cb48eba7f5fdbf0660d2a4ffdaf2078f7070f6 GIT binary patch literal 1847 zcmbVNc~BE~6i%T;q*z5RQL9Tp5QHR~3z8u~P7WK0BqA0~3CRXRNH!#k1XSdjDu-7U z6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x7jAyLt)D=Rqb@J7^*54@82_b?S?kYD0a;uR_47wuXAJC z{T=+1trmqqef<2=fu$DD6YXa5bNKJFuk%xTW<0s`<>@nb|01%+o{(IJGNsBw)HT8$HmEQq;jv$1x|u3jz=R6KIK0> z;+wYhh}uYwuKhdRu-8u9Fm8z4T3h~fR5;VP|A!MP3tw&?UQ@QzgS$XFZqvD2!K literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_09.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_09.png new file mode 100644 index 0000000000000000000000000000000000000000..a7c254526e4caf49ccd588b8bd4628d1a4d42d30 GIT binary patch literal 1811 zcmbVNc~BE~6pleHidL;Bp372cbx5+iYy#QgO0tPWiC~C;a%fBz5+K=_EG8U|HUa{o zXb03-tfE*ED~Jbb9Wh?C9zeBP5ekYHsjZ446^{ztAlUw4{i8dx`@6pHeeb>Bd$T#A z^XH5lK6yBU!5AqG!sYZh+wnRNrN0->U5ug!S4td7g^_WTS!pB~0yVje0Hiu)JRv8P z>XhXd310@oDNd`1q#|X(n2OY~l@1KsqBGEJ2E#YNVo<6Q2?|(7#B23_V8_YRAfQ$I zfe~C8Br}KzjW#INNQ9-%SEy1GReUuV;1Bp(Fxr5Qpp<|`m!vmg7C*4hE=JEC+Z+(+ zgHVZn;9I96WubtGG!g)p4Y5=Z4+eNB8%7~M%J&2i2!=Q?!hyV5FobcvF$f0wACOiv zs^c&@F6q~zSAL*|q6`>^V>X-FW-m5rjOW07KA!_290Xy}2$m^DPbn=dy~%yR0#2Az zMy-L;l6t^lQMrsvru;zK)3+h$3^Lg}!+KMHqUe-yEJ_0hW04sxcH2 z3x&8?h>B2DjKHu^B=p9GUOce~_Y$BmcfiK`xIDf{EbtO=c@i%ahQ$b9!V^iv5}sIs zcnd@bI>43cO_WlvA_jD|v~E8a{U8?;83`pt8Wkj&G*AJd8j>PS8qxrW!nkZ0h|ucQ zq}k-Sp10BBgi*VKP)m%Y4(Q7-rhSjTk3`~)Ks*E$|5w~^x$6IuGY;(x$59;rDwcsQ zx&j^3cco7+-Zc-Qr#r?-w?^rq_^ouuiKMtdVQGA5JC)xEjkCY}ZS=4Vq?o!a-vp0$ ziSlZ(+Zzt#HK)D_(U<87OGT^5NM;@k+%5plFsccPVCr)zB8(gvFkT~mH@$}N- z2FQA0+0!$cx+@H)Hl+k*4)ud0;nmf9CS`9C5B^;Gs zNOx&}RoXUMlB%6StXp-(&4zwed)oU}60f@08XZjcDAnHdu^bq1!O zun;~q!Z`F^anqw7`ybK%vkK1go&r}|ojS_%@;`PCs%pwH?5;RlLuJ&iI{#-K`tjzG z!GZgl+cxGr@$ZOwp6-7$Gv;0@n8Y}^f&DpQ9ai|-{#n>xo?Au@-Nacl?ZN8rqOEmp zi#F|isSaQsXv{jes~+3AaLJI#qg}*eGxI=}bza^`Qv!Zm;a1AJ`pt%nnYHyFHP{Hj z{;Cnz$C_qVhS{E6?O5|NX6)P_b_{Ec{d$BVI(=W7dvI5!V18lSB39^LPfcdgrFr1K z>Yy2{ZJN7#*;@l3w0B$Ske)$D%fjz0?fI1{NDhB42s{Cnic0n%or*ipYIYV#ymke# zci$KmVM(vH)Z>~T%kD52GGc65Q*wX47su?;j2R@cdgM08ME$bMM>}rtMzbn3WFqS3 z(ddnyjOem!ooAHfCj7n_8O`)@>W!XIm;x`*^CPm3dW0aNIA@js3ity$6<&0V3or$Z9Y)3BNE?qGpUs)E%bZHu2Hf@yb^{e1( zZkY2FMfT$~@I<^teu!;)UU2NN>dY5Va$7`nD-&`>1=3JSFZTkAX zlWg@xw;yPrGjqDGjXUUB`l2iQ`07e1GN~^9@NiwN?Rsx-9i@EfZf7L3-gK5+Mmin8 NDXDlqUM^f}{Tn2%%LD)b literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_10.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_10.png new file mode 100644 index 0000000000000000000000000000000000000000..abbfe37cfbec5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?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_11.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_11.png new file mode 100644 index 0000000000000000000000000000000000000000..853c9c9680ede791719bf265d69918a5dfe44397 GIT binary patch literal 1736 zcmbVNX;2eq7>+>!5u}JxF6}mgRw3DJ2nk7vkj(~@DoDerqOv4Qh>&bZ77`FeEyaqW zj)D*sjTSA);eb|K5b8M)kZMOOidv^QYCTX9D70wphQs!U^+$JR_q(3wectPv-5eRQ z(8TF3$**vKahs4)TsjOsLvo^KS;M(py*xpf<)0V5D1 zRX`hcDn2|C5aBuu2xKtnawZ1?IBW*QX7boPe}Kh=m>|RgnOr)= zk<6DNVPjh4Nr zr_vHCTmx7wqDgoLA)t|-j)tJthKIj3tkI7picA@3M71EqV1jD3HLek~o{(YxxbaT3 zJ~~T_fig^wXXxZ)J(6dSlgZq@U&sn1z2Ps>smP+BX$UUQP-7ZGiU?@r2}7Y$@Yzf; z3?pKgEn>69EC_-{Fc*OXIAReJAY?;<<2K&K<*>szL1H+N6BfXRATbN(LP8i82_ZHV z#0rE1#<^0BoW*>Q@8$AEIt(RnT{MoTjdws~3Qpkq6kH34q5>HZ5U0{8 zaD(1jp3!I#OsC4k6k$4C4UFWMuX=}mP*@n3#pJNq;{S?!l&knZIRi;&Kx=dSt69dk z$PTnl-?l!vczby;4S8d9^k3)?}7;U_f*BliROk!#^8pXA>R+B)$o3! zo;cyO3|u$&H~?-szd=ASnd+4gSl^WqEV z21>RA3vV~O75daNe)2R;?3PA+bJdwhzgPT$NYd|SbA#s-^Yf%=TaT}g-u_Hl;Cblf zxfg3!EnX4g3-}RuwM*{&$^*GTFl1YmKgaAS-?Z_PQ&k(+GC=KgMMdke2D9P9w^=1! zoix@BiQToi38z?jIdXfyd|6q%&?`maU*x{5&Go2guMZ-bClqWB9F`o-I*=0cQT1a> zXbVzvsm#y*+U0%r$LbuTPb6ROZ93@tWRcM18@cl3tU*@H*37k&=k2oia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MJFCc2n1p|Io` zp>IV4a+=qM1?J$SSknALQ&fH}Wr4Pvqu=k=eI@DemnHc_nacFOoh8FO`-Z43(nW%BDu}c2>*7+Rh1c}!AdDEVYGj_N2>k||O zPi)C2BqVR6u9s({^kS^aydM$UT4^6GS|Ofy;V4)r{F-QvSo%xf+`ac}GdG|+3*@8m ztY#N)U_?H-y}`ymUcIBB!e1YE$SIassjoP%7|gAA&Tp=-E;>Fn zBioajv-x(ZZ{6ZKk%D2Yjfw0Vah~E_3#F#po#m29AlK%K>#@WDPWZ)$W8eEMCtGP+ zMrvX_-_9%q&e7!A0S9m0F0~e~xt4Hq&yQP%+awO1{83@e1=piX!{B@NODN^{Uq~7_ zcT|dnZVi;s20&LlsNERW^QxpIH?pTb@NQ;cRaaYVlOt^MJ2GN=^sS)aP1aZ2cN>L@ zWrLZc-05bg5?g_yy!bldX;mB-G;eV2yUnj tbxVbNewTQsz9gGp{k6Vq`(QPJNO&T%Di&O2pRxRx!b742Kl74Ie*-4twRHdh literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_13.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_13.png new file mode 100644 index 0000000000000000000000000000000000000000..85d6a5153a4a6970b3c75b4577b8d37d63b82e71 GIT binary patch literal 1819 zcmbVNYfuws6b&c^5mA&urDB&TT2QjPVG~FsU|v9!U@ z)CX3rf)yR1X>+M!lT$yL8NpTi})A;yAiPcVg1pa+5KMU+;i{!?w#E& z3k#lN?`lt@(WXd3L~?5Mvb=U5QQseL)_q0|vq^Cz8G*-;2BjXQ@zwZ76p(0?v8WtX zs#7-Aq5d@5gcwW_Nk&RTxhh=4P+Bkyqee%uX*B;pqfV(xKuKUD8jERp^!~~!I)JHp z^wlgWB-IJgI4mSpk4B`1DO9NmDvp{S7y$Sixs(A7N-6=PCQ(apjXe5WyIg8+*#_yr zTL_uJqmMcjDU|_2T#o`Q2IQ@R*f79G7%&2H5YA$N3BeEuGeOAL8-}bT_+5no|!?K@hv$Cd9~!*g0U?S?>oaZ^#W zr#bSNmy63;i9G6x^R{)jk&2g}%wNB({*a4HPR_@f(S^U{%gRg40yY0m!yNpk+BiTo zn@s+**83ZV8Vnt2105ZWU3yP{n?)`scO5p@C$fp}tE4+u1TWob+gvCn=abVeN7XNw z?YJ{0FK5;1(^IogcBXlfwEjugchIyK3Ou4~!qdwO!koo;R?Y7%16Nlx#taxb@*K2z z;j)C+!vSXPr3)=dXXGhC{D-FMimh4BUT53thM?{t=3ujH;;`v>UvlNlC;J``R9NqM zf$eQ5%w4c%DVpsNZOS6{h( zqJ1#GDSkNfmB<{heM%_bwl;Rgk#^hojNh8_+1-v49g?H1UF{AskH>CRhrijjL3gRm zqxy-*mFbgDyY6 zQlI|p?ow&_u#;S~zO4Fj(|l+B#!dZ!lRFP?3Gd8JDdd!YMStLS>f-IdIU2O^Y&bEq zXz1pBU`2qf#|CbwQ>`-tTf5(E^`Oupf27CV%0+cUgcMbl+tfbY7nGjA?DGC-O@u77 zJu=NfV1Ay}d)?E1%Pv;a{j$*Foaw!}2`j5NxNAzcptY{nuD!i?rxjifUh_J|6xKYW zb*^_@X48(+=fJ`cxK&uJVYsepcl#2-L*T7+`-&3m$Tzztmq;FVWl!=iuq{d69N*Sl zbHMSgtvO>y&oyEB>r-yQ%Xp_3dSFY^7Wq}$=J9H$FOnYVHKmqbE#8i#JU>*Om5p>+ zB~Hy)-0A3;nC$_3*G!+MZ+~c$!xGrdUI4!;Z8WvpBobA>jzGRVg-iM2 zqko=$I*U&H^ypl~jJ8}8inp>IuF{Q`fyotTtGGYhOydvzA TUXuL`%kN4e4ilXhL}&gDmO;ai literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_14.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_14.png new file mode 100644 index 0000000000000000000000000000000000000000..97f7f2acd55f4a2c0476f14f77211474e1048df0 GIT binary patch literal 1811 zcmbVNc~BE~6b>MA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ZOY+Nr{@~uk&z?VmFYKESooQ-|2*Al1g!q;5KN!;ce2efV1Jk*KSNpmIJ{a=-xEAA`i zDwMC6{Tv$?U3crjgl=i+stqO16^j~Ps@?Jk-tD_0pT2qh<6+@hzdNm`>Id?>gS#YR zjVX!bytjCM$Ml>j%Gz1t_I*F}9e;UxQ|FVqbyItlKNTK39H{e6x)J9H96H#{xK>eX zo4xwVdC!>N6vh=9cprM~u^86Dot^Nr!g9NkUYWV5vL*Jo wK`4s%iQgewnB1Hveb#fjZ+MvQuiHon#O0ca=Q?d4B3-{Gu_z9z5~St)4VG)JhyVZp literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_17.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_17.png new file mode 100644 index 0000000000000000000000000000000000000000..69ce8a5d7c56517d0d33425bf93be90f16a37db9 GIT binary patch literal 1755 zcmeAS@N?(olHy`uVBq!ia0vp^S|H591|*LjJ{b+9BuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFsEgPM3hAM`dB6B=jtVb)aX^@765fKFxc2v6eK2Rr0UTq__OB&@Hb09I0xZL0)vRD^GUf^&XRs)DJWfo`&anW2K2iJqZ} zfu)J1j)IYap@F`kk-mYsuAzaIskxPbp#l^r0c|TvNwW%aaf8|g1^l#~=$>Fbx5 zm+O@q>*W`v>l<2HTIw4Z=^Gj80#)c1SLT%@R_NvxE5l51Ni9w;$}A|!%+FH*nV6WA zUs__T1av9H3%LcpzHo!{ilG4o3^M(S!~%UoJp=vRT#&!Os*6j4QW4I;s=7F&vLIDI zD784hv?v)EA8E=k&A_n3ZxKi#&^1>6MVY`zNz8G{PcF?(%`5SAu~h=f=%r+)SeY2O zIyt$xI+-||n7A4l8ag>UnY%a{o4Go>7(1F6n!?P$rq|Tm(ahM`(bUY%*u>D#)yT=s z1*px<(7?>e(Zs;f9H!SZuec;JFF6%vZzj-Qs9qDidaay`QWHz^i$e1Ab6_bTAS1sd zzc?emK*2fKRL@W$JTosPzq}X}JrLizq!wkCrKY$Q<>xAZ!`CVki~SaEZstY?W=1Bi zxcm*#n?g>Q=>r|34@w+Ji3KJEOo1RKJm~{D@XV8%2h1@=z^w6cZRcrVj^p-paSW-r z^=9VAyxRr>4sR`()tk+13a-3Z+Q6WHZ_&l(#$UoVW!e7^?4Nisd3)N22^a6Oh_IPd zU0IPQl`7rl&33#gv0uc~n~CX5LwBo6l3aiJ@!j74%XWXYYqI%b*J0D8zx%GfhwzrY=bjsDo}Tp5rhiubs-ibc zp9(Aj)^RGT?2KFQKmGJm-B<006`N!J@oT(h3TbfEv03Tr7rK}K-{qHIPNoF@%{qOX zW%J1d0}b`bC-r%znBbb#|K<%F|}OqVWs@K zgqZrS^Jmj0Gv1KuoLVlnmgnlu^+)s)Hs93YUi*Q2Nf^)B_V}sk@f$d9Cgjd^uZ?0= zl<_#w>r{54f3CvMtw)6F;x_Nzrs}jV|4W+Igs>gnGj}yTJJG#`+sWeFjk1R}8TK04 zt5$AHSttJLj(z_&BYo#fyxEeIlomwB+Rjq4EWP^WZ0P2?)~g5jJ@U7dzgRe{<;r5) z(94t7rW=LcSuLjUl|jqm$-U*V|N6FWHfY;vF5HnECw;5%{l0xhB^^8oldTv1mM*#@ z>f_Zl!Lu_b{rarU!VGh@FY`xFKXssL*`65gmqsd+H)yN)3O39=EU!JKyIHf@C}{IP zZ`mc>D`MWF{S3?uN1T2x&#Cy54ytZEUHx3vIVCg! E03`gKIsgCw literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_18.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_18.png new file mode 100644 index 0000000000000000000000000000000000000000..638136033a4bc3b9a1da516e4c3c99a7dbb7cf24 GIT binary patch literal 1712 zcmbVNX;2eq7!G&=Y8yaM!0H+WOKpE{V5E&gorCeGOZHdxuIBb7de{^Sdzw3G4=e@q!0%_!$ zxo*C01Oj2MI7}eJ$B!JZ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gET4KZ(lk zm9O4=kKH>Ue(DGAMIL5bXRPMG$NabH#LiNL$pTEzDaHrOtblsVnC(XTo!_S8lr&NER-t zXVY1qw=PJ0xowzjfz%=KN8d~>%eOAt)n8bx6CA!~8dt~pt*g#N3u&saV4SwHn!A1b zlwGsWK9ddnrTO~eloKl#@0u6GV7>6l+0TD|W^Juvea{%TUuesMEa#iw9>kQ!UjG|d zS7#&F{I=}(6vv?3&)U+C$}ZmI*L%Qk`|ZDX^0wC>RcfebKe6-VzPct|@&1nM)syE< zT*Cgf>FL?9)uDIp+^MH3Ptlu3JEa){_pY+F5bO~RE z<&C*Z(vLW|x0yP1NxEs*_(<(6UU#z8Z|=?`8+*i-WML!`2PRDkLhiHMm7e~Ud>s`&1?UI>LpKCKbLh*2~7Z~tHG@R literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_22.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_22.png new file mode 100644 index 0000000000000000000000000000000000000000..b4d7594ef5742ff082eaffdabf0628439003ee55 GIT binary patch literal 1759 zcmbVNYfuws6iu-K1Q9D!5g2U@HM~rAH`yd4B|<_HzyhHVl?qt$*gy)&hGc<&bW{W_ zwLGj75z`9PP|!koSdk2Z&r(4VraFi)3dLZn)rz%J9c}3b#P)~vM|WoTd!2L7z4yC! zwj?e#!p+6og+L&Uu@6Prn;e!_@O2iUS6_zX0BLuz@l_R7mjVuj` zM`X&ptX?F9Kvlq6GGo9PT{x1ij?C913Hh;7MSg~Yqa=r}C50HdxB(4<$w)>`rq;kU^2oDxx%k|^ z4UkE*5G;d7o^vWOCXN)2>Jbu?22vFu3nH;#8U%wJn6rjN2O$uE=m5y3LLisP=7JFE z`9sFl^hy;sUMPO9g|B$zbPUsR0U$RwmzK+*q53oc;&3&?VQN%MvRjnN(QJ%I#yy=2L8FU_d0|*T(m+&ug*b~Vm+!M&E}V@eu;jtSj?t_EIKUuuej&9%Kwuy0Cxtk z7stPfWqu2PGX>EnwR&4Xz1j?v?-;Z~kqhj*NNl#nkqj@+&4D)WYxY_-QlT)N;AGT^KF~$Elzt*Dgu@qCjN_sC$B{{lhfIU5O zqu6Ho6n4sO?Ek6ifidK2NcBKzC8?>$b&vVk_n9oiiZQ20{4F($#ymeORMjl({@`nh zSE*Q4vu|R%*tr)Tcyo|f(7%Kw)@|9n$-%K~C@q*3HqP;H_JOMl66O5Sie740nCn%C z{Q6e;kC&u_(I0Pg-`)VqIvzi>s=b5^iR3`PrO=jM$}FtPUo9}c{~IwjH36Y5ThFJ( zX^>*?+CCq&;b>!E`Oeps-6JKwmJ@>mMSc!bnaTy58p{f!KOBh;xa4a^ zw>qx24HP*yce_Z-`X8Bstfqj5nM%Hg=#i+WK|5Y|y?W`fQ;fKw$81~FH9yLXPw{Be z!&`dmMZZ5w4(2UiPqpY6X9F-Bu1{SugkOs*Qg8s`b>gw01Din!nt& zgF9BxoFZGb(yR4!{o)`7lL)C&jea)#K#i z>CFd18L#y>jKpR08eBTZ?uRZ}x%+U2;X=#A;=#6KXSByh%RhhUSIXR$Je*uven$CZ%IZ?noV{JHyQdtRJjDLXHmN=Sbbm@t=XIZ!DZu!&q#>dyUm_YGtF#=B zPOqqYyvAd5cF+EO`~x`;gWFTdr5CDn8_X-aAl33i6myJk?kdM># zdC6$!zKAlJ#^2~_Ct^gCq&#sLTy*oAue`kto|&mWta?H{MabCe8PIpyO>O_>M2TXB J-w09*{{|l@sAd2F literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_23.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_23.png new file mode 100644 index 0000000000000000000000000000000000000000..42c5bedae0713b6fb4b5dc94c3b1f9a21ac4102d GIT binary patch literal 1806 zcmbVNc~BE~6b=;-p=w1uDr(oDP(_m6T#!J7TtF%)l29n9V@Q@HkYvMV10hAB4u{l= zXaNC7iii~AF;r2ZT%vM%P!w7`7%Xa~MUeghYNkRrAhv&4|LD%_{;uzP-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`{>q3RIEE=chJSO$eY+-QGMs~zAw99VBAZ8yqyMStopP0w_m&| zTs(41yEjZ?ZFxnJagJa??tQ_Y;}>Txj5qZmPK4Cu=I)8~62m^fbrl<9QySe#x-fI^ zlc90Px~?oJeC&rfX{lZ2zW6Nv!y^aMQNG0E3{u;s5{u literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_25.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_25.png new file mode 100644 index 0000000000000000000000000000000000000000..f5b06b3c1508348593823cdeaa439b4304dd07b6 GIT binary patch literal 1758 zcmbVNc~BE~6prA5fD|3DBE>F290KOpT#z*ZlWd|KK?-4@C`w2c5=gQ!Ss5Zgbje{^Sdf7kcD@4feXZ}zjW z&{gwn7uymDgn5Ch;c$HPw!Aj8@$ZFmm)7Eg3nq%jBG3dZO{PZ(d<7bh0D&4=A`*_s z6sC=r5H5jWouHCNW6_cjNRDbKG7E-c)aYSXd{1OwucM3t6D9I0<40xAWM z7{!v%Bsw9YRIN_eBN6GLQh9o^oTDHH_yb%cgd5Nxm<%v#)LH{%NG@ zHN7GM3Wvq7weS^>sKhWGM5U&srBTut6jYx`1vwlJl}4x1>0}&1Hkh=S%t+Q6Jf8K!uM%8F6aZREPSUB>J z8*fD$q$V9g4Mz-Uie8T2M}o&R8PDCjg)Bha8)%JQggUC79Wza#sfWcym8B7oq(fvRgno-6<~fom@z$M`RePm!hb8x&p$KD25u8s16WDuqYr9 zrP3o}`j4b;6th zuNlg%+e1b<4sN%O!JSTLddLGdi%c=)ec#WIG0i<$vqD^R;b!>^QZUkAT(JWpLpKQe zw7W{TC1u?8*16$%mz)BQGx^M#v8t{R?`B(XeslX7AMotu@P=M1cH{&3N6w1u0dLoz z7e)SIj4&gSAmk3z9FH{$TBzx(j6|!eO_YikLtf3N4zx*o)9Gsa!`5rBksdeZtr;H8 zHFsy`3$pJ%8MoR_JorJ7do+ul)pTC)Ag}oGP8$+gS#kI-EB9zpg_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jQXI}j#wYv3GrLo**cPPzK@~xx*K7RE^ex6Z_9k zmQ_rowKk{w9}6?Nd^o4G;`>H|JGj;|%Df6>_@SOF7U*d$*vZa&&y%WYZNKKf7aH@i!EQa-%?(C~HyK=3MJHrMFIIR0r;Mw7(&N@`C4P(?S7p#bG-( z@ih9u`<4u=S1mLTyGc>b`$MKC?FeTo1DeDq9v9)JO{I}mNgaC2M6UL}Z!`3yVWM;j z3eH&AmwjmKSI+Oxix@EQPZI2PImrAfdxGs0;~AyklKFtLV{B6X$R=yC^xi+ZreBH10nT zw0IK0v0c9OT14x`#DlAR;QYt)&u*x{vMr{u^k!c7e&=U?J}xd;NMO5H^~3K@pV^*z z`fld+-a?xs$2OZblvZeQV$y(X@085-W?9GDdtU1F_Kus{9uye$&btvR$wCSej%Rk~ zw4~LnP1)KvFsOm-^huAxW83!bLvk|{=9*QyEO?k+%E3&&(JSE#McdELKI-D!A#YH7 z-C6XAbFM$HC9W?>t8Q#Lk`j^UuCH;RP--*|mo7HlpB=nWiv8hr@b&O;uv>?tktyZW Wz|b+#u3HU;-%o%rL~xY1GW~B{wzOyf literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_28.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_28.png new file mode 100644 index 0000000000000000000000000000000000000000..5cd73c8867c5e7c0b4911da8b0a5f1b5d4824f1a GIT binary patch literal 1782 zcmeAS@N?(olHy`uVBq!ia0vp^S|H591|*LjJ{b+9BuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFsEgPM3hAM`dB6B=jtVb)aX^@765fKFxc2v6eK2Rr0UTq__OB&@Hb09I0xZL0)vRD^GUf^&XRs)DJWfo`&anW2K2iJqZ} zfu)J1j)IYap@F`kk-mYsuAzaIskxPbp#l^r0c|TvNwW%aaf8|g1^l#~=$>Fbx5 zm+O@q>*W`v>l<2HTIw4Z=^Gj80#)c1SLT%@R_NvxE5l51Ni9w;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k^STw6<>lEjjycF&_ACr`KrdN+dN((QYzeTRMqpR9YC%k{o ztk7Q?b$?>mO_palZ?k1EeI8?D8`AP*v+bf=&!(jvefxMpNKTum!cP`2MkABV>C;^} ze%yZhO?vr(>eI$6b}o>OpY`plD2Vmcp>urghi`vM0xCIJzt}1H&!#Ci zEn=Q6I1|{jKg97>!?b4GQmeV<%P+r7-hKDnufPBJmEPIhm1^|774Ut6?{5Y12X==~ zUw7Mj_)bwUr!-sp4z~q9lXN%U*MIEievoDRi(btIx*GedU3?B%%+RrIIl1G;+LW{Z g|EI6I`H#bZL5W+?=(Xj{1E8A7)78&qol`;+0D6(HSO5S3 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_29.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_29.png new file mode 100644 index 0000000000000000000000000000000000000000..73b0ae4539392064fd8da74f22ef424e8ae24577 GIT binary patch literal 1796 zcmbVNc~BE~6pj}|apXQ!6qf}pM@e>*0A?W^IXIL+I7FYhqEJTVnDGD<1rgD~iWi4cbqb1N0d*8mN4nv#{lof4cV_o@ec$`ud%yQ)_wa-L z7Z@xyAdyH50s}Z<#OS1Z_4SBvOLNQFeng}LZ!M82p6SVh6_|KGNs*&1rDkd zD#UVJjL86B9Jdnc#i4(F&EJElI zm&M|6S#&m?&ZWXIi_LQ9uxM^vHiza*hh1lEe2q(UV=!oR$kok{Mu%Z8mF3HDU&*2} zs5HNoR9A>S!wr-vae+*T&ghB>-DxiUn_PsgKm|Cah`=z(Oa<`cF&tCIV{(8U?n;J% zwPKkFOHt~sXDV6_st_lmB0mKt1t#;0h`*x0($CMG3b|3~-2aMuiYxj*IinEHP;|xd zuVR_mA}UZf{ZjhG;!E?OGNNM?L~GPc)YK3iM-SxqMyPsT6;|)-@iE?c1-WdYFmWVD zYw~i<^WzX(^vi5}I|Hio-qQBi zL)O(uITsv+p{*(vU$djytMh5p=|^8W0LI4v=M1M@TTaa?}hIr#;P*b|m~C+(sRd#fFNgKy__q-jv)$#$dY z;HLi2oa=+>jg2mCX64|kg=cM$03$oc^r7WG`3W0xFk%O(CFnje&|}8GW|_5FUOLH%|HSl;z;N)J;#{yFB2ZJ6`wLtcBTpz%=sN@$97f-jrR<+njqZ zT)Oo6j_ll9W!b_;I_87-=I`&AZ*jB6q-Maj@JvAJ_|3yr^06l0!o)6eNKoF1-8osk z&bNNL+A!bXy}ma7IoGILVyJlDWV<%PH)!>en+eCNn2R54sd4(&14UL9`=cE5U({ya wsPqT>s&ivrXKUJDB8CZ{C%nVk->=S`MH)N=RO_iFTHSvskQ>Z7&Dy;EZ|`5gaR2}S literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_30.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_list_process_30.png new file mode 100644 index 0000000000000000000000000000000000000000..70e04d91283f84473b3dbb0f59952f38d551c19f GIT binary patch literal 1816 zcmbVNX;c$u6b-8p6{TuXD|L*h5J+YwnLrW=OE!oYp%8&8ry7#U0wfbBBMFE_K~b^R zLKO}!-~ytSx*#s#f?yQ^QABB7kK$4fC?a(!R>V$3Y=2mPbk3RiwtL@w?|tu`Ssgh$ zbcD+U7YcTz)D4=y8tDymUwSX4O zkwbEm2-WGs(r`37ZMH&{mZajTX+eQNfR#@gFrb7Iuo{w$X1-NGduNwV&TZQu4R{A3 zk_5B?r{d(1fC$4;fWw3sD##B8{17ILKsaM&++F&F!27Nk!rYF z!;cb6-)oU80Zm5`CO!ySEEcAP&BSmm2=jP65MqHW7K21E%&A5~X=NDAQwA-FQL_ry zn+QE-1Z)VgZdjVXF0NJ_1RE zLa{`Mh!8}=f?=UZ=r0zs{UjnWI|P9_gEl_KWg`&cFZJX2N!bVtOIRUdE>|j%`0+SG zge#PU402^gGodu9&_P{2sr#Obe3Hu-;i!_pa0P}X4^}{=4kIwL4l@CwXbuwwV)aHf zW-;5YXCPWJitAHQwG_t;z`OkN^&ipaN~QiR$d83c{wwYQuKNGv3?!WaZN>4gVj0{b zE6_ImQ2ONJL-U|UvSV7+~`*TT4;I1K^ca|`RBM!IP-^6gv5qyrr zp)u}=Ff8<0ylYoGM|9P(wu_NCblm#NlUd!))Z_N@N6rtjB3yiRk61Tb;kidYZ}C|> z_Spk`y_WJT+iA2h|f#O})xcADCpPVII-QdVp?mo}u;Vbx&vC8IfDmo|DsdID{ZW%iB zT=9&$6X|1jB{z4i@Tpqst$RBu>&cil_l_Oa?!(X%--K=rX?UO&GoHHZO7~Fj#J3ci znqF-4EsuY>x}l~tE=6P4u1{o&`aNW<;ejp)!X@QT}iUfy!NCwBD>U)1%=Oh z%6hDQ2kh6CRhY`|oIgzs4!k;2pZaPkW>--;wRVyR?Nk)K^H9g+b&2tv!HpT&4~0k}9WD$N2V61%eg>*P~;N zqVj5wHQk}WvOEa)F(wXAteV?+D(FZxtGlCqysE$5)H|#9-d0Um0Y#qUYUx{Ms=2*# zL33=Y#X_+z&KC5~ow>4bs8@#9x9RD9Pt||K_&j=%Hh<;mb{?>A)#JR#dQIo~^~AAT z^ZRz*GL~i4-uWW9e_G~l*D&7FalvQLKK$#F?)d~}cj?rjrkA%3Y0{i8uW)kx*%NPc z#uw9PuUfJ>STVU88}oyC;q;1*_4n(q6{^1;5+d66y4L0JUEpFtRk&!dJ&X>$|`XIBHm7s3zKzeO^7urP|$Fu>a`ti!u4XzkSPY^UZJ^N0D~8<(?@l RDzg2nWRlt9y}|{Ve*>kK!dL(R literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_more_popup_press.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_more_popup_press.#.png new file mode 100644 index 0000000000000000000000000000000000000000..fe031a4293ebcd42e366f20058283ac921cce513 GIT binary patch literal 2934 zcmV-+3yJiJP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_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D(_5e(ubJ>=akbDl+2#8$lK>7TD+3%tQ@2J~__1@u$|5ku@U!TFAiVsGuDUz ghB{s7SyJOM0A!Nm%(74kvH$=807*qoM6N<$f-8D&umAu6 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_option_panel_handle_bg_ef.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_option_panel_handle_bg_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..d66d67c428497fe9c8a61c7b5a9bf84e46d1103c GIT binary patch literal 1554 zcmeAS@N?(olHy`uVBq!ia0vp^bAZ^7gAGVt^{dYWQj#UE5hcO-X(i=}MX3yqDfvmM z3ZA)%>8U}fi7AzZCsS=07?_nZLn2Bde0{8v^K*7iAWdWaj57fJ{tG z$}cUkRRX#c;)UD-xUqS~&|m@vn0`fKfxe-h0mw@*g}%P{mFDKcRTq~8r6Sym)!^cg z%7Rq=pw#00(xPNw#HA^NtSYc_E=o--$uA1Y&(DE{Vn9ZINq%ugeu08>u&JJ*LU?9g zN`84USiP^Wm1kaYNn&1ds;7&s63_&_%*+%kH#18kR|^XhGdB|_Lqk_1M@MsK7grZ^ zGe>7LLrYf!m|mCsATTyF!Z|2%}KXQ<0PoK2c`pi6z<-I=`|C|cD#U&=zRPW_2xW?sZ7&kYorQh8d7B^=e zwVw9&^SaI7Z3INLOXceJmkX&{oi<`sa6J&tz`@SJ-cZm`0A?UDL1Iu*I0H!UIjuLIHx8HtC>EV2voWLLU zUwFgo38GxA!K<%c3R*cO;$_nBO(%3aw;Wm9@3#12zlm@6?YGx-rk_sP8a4B1Qli;x z-tV!$RJ5jct-JpE9Y@#EMYrCT>Ax+r{u;OAV1mHS6Ls@^)CyN$_2O%1o@6WWv?wxs zb*Sz9^Xsp*Ux|LW>uz4gAltX*5|6d zeiPq*+_-5cyZSBvd~@DyUi{;-)v*l zYlZbuXMJ~^e!A$9#ks!Yi%QwB)U0Mz}rGg)TMQ|y3C=81wXl; zm#yGnUu1k|Z%|{)WKRpfKTR)q()nAIAEszsRh9W4>0t5F>+D}Xh zJ5b-E-62|{K&kvwjGXFbhYNK@mk9IS^sv||+1JwCzlY0!VL_eCnf|x4qClmzr>mdK II;Vst04V4}xBvhE literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_option_panel_handle_bg_ef_press.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_option_panel_handle_bg_ef_press.png new file mode 100644 index 0000000000000000000000000000000000000000..7497d12ce7fa104593605be813947f09edb8982e GIT binary patch literal 1427 zcmaJ>drTX396uOg(pY9(bV4(CxtUE9dXLfvy-^TakQ!RCKq!HX9qkXev3q!T(1J{G z0SO5Y<8)EOZ2U(P%^-$B5De5Y(ij$S5=1~2P^WPWaG3B&mf^Kf*dN17?tYK&=kxhK zb1gac*OZEQ1q4A#YnH_!ubuL1e=1u3PTA{ed5M!UoKh}VCV40UKxuBS6u?%7DhCcg zxoh6~0VG4vA%xCzN={og>Eala3Sv+%!^><4N>26il&ca*a49IKSrf84IE=uw+k_P8 zY`Bd#g9Z@rOW6>Qd8h$FDVN!K%!tTbAc5}uL%k1lJY)yjUjLdB2}7@ zouHhy9N5eW0M?ubLH4h7~M8bO|&s(Hsj0 z6{%9LN-`mGq&q1v{GKc;?v_a|80MvTj6m^VN@1YQ_Ww|Z*+Ywx1MJ89L}4+nh6k7f zh+LK6k{efcGU$pY%>tk#PRQf93*jo}RB#d}R&YFQ&efp=TtKsK&Lf8KHXCVWMTufv zz-loevI0ueZci^ue)c57gV`x(|*;cOVy&gTaE0eXP;pD|vc?+r6=s z4|{_TSb5q7d8}`Jkktf1k%z68v^?+Z{rQQ?S^fq8;;GEz@5QK^tR0_4tIn)!Z=3Z; zOwyO_<5Sg%`We-x;`>ST)ECJoye)xGlZPGzJ};cq7C1`o+TU$B%0J6T+9U1$n53Ab zh|>|L7hYP3>TJ0D1VdEkV+OxSE) z-D!WZ_{PuU9gWM}jrGW17Z%nU*?7@()qW&Df4=Sc;&X2wYo3UiyLij@@x|;}XUu^6*@IA&u;%XP}EhGvsyj)_0;+N_O&bV-B)UAH_tG=zb{MmYj>1=i?^o&0Z=$p z*gZX3)?;jCMr@@2tLsw(zU(wr-^y0^WbY?84>zAr@%fgEHpTh}MZP+uX<4(V3oP|G z6Yjk_-5OVXXvX``a~W^`wYBB^!!&fsKlo5R9o6?|=WykQ(ta$qdsJT?>d9V(Lmk;I ieW+Ez(*J$EKJsa3eWNjT1t@&M-=sCeZs|%tcj-R_{u4C- literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_panel_handle_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_panel_handle_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..a84c61b3a1f3802f5073fb1449f3e664aca499bb GIT binary patch literal 1960 zcmaJ?Yg7|w8Xg3?g5+ngb7Emb~k^uvmOqvW5pezVT z$?YXk8nFZm7eP4oA;K`a5dFbhw|^6+A%0RiIGSS|ue zP-Q+MN0jQ4_pc(c0N@E}6j^wdG=-p_x!U!3Ka>fl04a6(Ts8i{xu`d}zAs z0t9N*d?+(o%8=?4ku4f=sR2nZl_^xEg(|KZ62yVACLSSxBDfMXp<11hXW~P%x;$d< z4$~oU7J?V@p`VJ%lBR))m;nK!X$-20!DfQ&C>k@0!Hwds0a*+tgU)2p85}B;!Heeb z7))^PfrxAdbskR+i{^3>CqA?V$Mrlqy|}oTRvbyg4Eb~>m&>IySacSPN+77l5*@BI zQFX@9c?B3Tstg)EuEBJmTTz*d72$k{sPv~6Q2lFJopJ7(hzp~elzKXo#&EYZ50py( zKNLk@qm8&6`MKU-6*ekL^ax#!7_lOQiWpp8s5_OOmuNtgIA%~_n0Eda)3#tZX5515 z!Nl}v8WYUa=+s!TaTYI?@+3MVuGFaz3CxEG1)4^q=0yrQkxUMo!xlxsOs0?(FHA^C z5OTP1VtjNIH-e2^4juM;W4Q;AF43rEKvKPT6nQCAh#FF0)ob(;W|I{#U&w4;(CuNitoBB%_YO< zxAxgc3EMk%8554an4#?b?G?|vsWaTm-KQVMrUvHgIz{)6R*Dja4)p z+C4t$xF7hquI<(D>gA;!Q>(6jto|hXG@HX2m3*-D%XTJOwo4F()~ z^&Tk#y}4~Hd-Z8pUgofW-Ti&d@?N|2v-Mr+jp9#Nqve*G+JRa)FrBh(!2eD#$?Vmy zt)4OdkOYNTx|5R4g;Zt1xP)>`A8K(9YflA39+Q@=F(4gzf#!^yxP(q+LRQyks_{vbNxuH?Y?{26ghYp z71sotZ5Y}0ra0_A{~$)jGsHgvkJxNEfO583Ts-gk|UH;)u_uA~e+u9qFp zj{wg1zX-T+zr3-raVn?%**Up=Ff}#xZmj>)i7V$%p0vFEzQHEH+I8lP-r;b3B|Ba{ z9A|}_*P%L{tnXVxV99^m(jq!4G=(|SFGI|6nXR{O3=bb{bI5n3@4UFSNp9Z@hTrSS zJH=F3pFDZ8z9Hgp-@mE*5{B@xKhf1IsuPt(hT~jcNyQh-E){mVKHRfsSrB=fGQunl zyY)r|Wm|6hA++E`+rIwt%W z-8dEpT?|j2+4aKiRe3>Vc20f>cmh3{ VoT{!>=iI+uKq8dEj)cusKLYhE2S)$^ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_panel_handle_bg_ef_press.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_panel_handle_bg_ef_press.#.png new file mode 100644 index 0000000000000000000000000000000000000000..79195aa06129576920479bbe7f78d1c8eb8e89a5 GIT binary patch literal 2188 zcmai0YgiLk8lDIkkRnC-i0AR)nWN^?i4}F7-m!scME3=#EV1qCtkT7@`qTtIQz()wjLLf`bkApZ6 zUznVD9ijn%0Zzn?KqA<|Q~@j|@bwr%l30qe0f6R}B;^YdAOwts;zSZp+*DHw4ipJJ zaXeQxi7oYm;zfZeGAJx1geyo%5Kx3TFFHs|qM`y~2;qZC;yn^MHOUh5sGsWV8P_ zR4o30mLnYK&wBr>u$-GLg@_zT4)2u-P~&#l>Qh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!>|U8hM8a3L?2eGz-h|C79$T? zh1KJJ;Fo}9eHpWnK(TqVR!ynWeEmf}cq*2+73(LrJ=xfym@U;7|J@jKk3H%fH#pZ< zwC?!IPJ8d}Jd?+&8&3mkqnba<_Geb~Rb{Cw-^?|u^9nx7xLTa^Xm~g(AF_$G(NtIW z_C0hd40d=pGm|VivTbtqLU=>6Bj%rJ6!_sgLu;UcyT!=-Ok|P%|A55|VbuD@9Q-#k CfO?Yv literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_panel_list_bg_ef_press.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_panel_list_bg_ef_press.#.png new file mode 100644 index 0000000000000000000000000000000000000000..fffa8793f1caae607e84d8e8fe714b700d31521b GIT binary patch literal 1197 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE;=WQl7;NpOBzNqJ&XDuZK6ep0G} zXKrG8YEWuoN@d~6R2v2cW~I!Kh>{3jAFJg2T)jk)8oi3#0-$aN1{?c|g2d$P)DnfH z)bz|eTc!8A_bVx6rr0WloBA5~7C5J7WO`H;r3P2|g(O#HCtIc{+1n}DR9FEG$W1Lt zRH(?!$t$+1uvG$^YXxM3g!Ppaz)DK8ZIvL7itr6kaLzAERWQ{v&`mZlGgL4$(K9qL zur#sMQ7|$vG|)FR(l;>IH8ij?HMcS_RDc2{plwAdX;wilZcw{`JX@uVl9B=|ef{$C za=mh6z5JqdeM3u2OML?)eIp}XpbFjM%Dj@q3f;V7Wta&rsl~}fnFS@8`FRQ;6BCp2 zOG|8(fG&l2A-4c-Y+f-mn1BJMUy)d#Z>VPg@)As;uP=V3xw&xF#U(+h2=`(&xHzP; zAXPsowK%`DC>a=WY04n03ap%qQWHz^i$e1Ab6}wukda@KU!0L&px_*As%NMWo|%`D zUtSDW@9S&jnO9trn3tUD>0+w{G(j&jGsVil)xg=v(8G&eP`1g19yq1O?oUQklVEdbi=l3J8mmYU*Ll%J~r_OewbZnv1@ zG!L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r/share/osp/bitmaps/480x800/white/00_picker_button_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..d8bccbae83697a6b237f37423fa7bfec816f88ff GIT binary patch literal 1451 zcmeAS@N?(olHy`uVBq!ia0vp^d_b(g!3HFi-g!<3Qj#UE5hcO-X(i=}MX3yqDfvmM z3ZA)%>8U}fi7AzZCsS=07?{&CLn2Bde0{8v^Kf6`()~Xj@TAnpKdC8`Lf!&sHg;q@=(~U%$M( zT(8_%FTW^V-_X+15@d#vkuFe$ZgFK^Nn(X=Ua>OF1ees}t-3#_`hBq$Z(46Le)Ln;eW^@CE2 z^Gl18f$@>14ATq@JNy=b6armiQ# zzd*q`*i1nqJTosPzr0uz6g?2%x}+9mmZhe+73JqDfWy}+6N~*8&V>98(VId}nCSx@ zqYp|PNQng|1WbV-COqi_Iq=Mrng`4=MZm1l;-s3)z`%Ih)5S5Q;?|o`Ykww3fq8qQ zot>20&K$6I4{;NbvMpD>-CEJI(IUNIdp8_ z{%%cmN4tdF+Q~I1@16O6_uRR+X9a$kEn1-YWvac(1I+@~12(*|4WFzy`y_g+m*)Je zE4lA>=@ngO(q`JlwC=J*_MRJiV$Qr>wU}Y=`f2%5y6mp*Od$+R4)+b;#TcJXy>i0o z#jbr~oh}Qnzn% z#m}+tVG~jnzE}AF{fvEUitF6JPViBCxnqC)(Yj@)Z0~)y;WwIj=F<*YgEpBbzYeip zEXjUbCY-eK#=b;}gWilUgf}*qt>)BAR?AwlW5Rwf+uQw{6w9sV3STw}fBf->64Uh; zhb4-*cAj>0o~FDYL?8U}fi7AzZCsS=07?{&CLn2Bde0{8v^Kf6`()~Xj@TAnpKdC8`Lf!&sHg;q@=(~U%$M( zT(8_%FTW^V-_X+15@d#vkuFe$ZgFK^Nn(X=Ua>OF1ees}t-3#_`hBq$Z(46Le)Ln;eW^@CE2 z^Gl18f$@>14ATq@JNy=b6armi`Zn;KY}8Ct^hdgc|EB<3Zj!tBii+6&cdiC3?cb5UwyNq$jCetr%t1q5W|m*f{` zx^C+X3r;B4q#jQ72ZT*-WC60ZZ zd(%*+Az1RwIpve$8*1;X z8|QrN^Q@cJx#sI1j@u{JDb`rUEb10svMTpOlX}mDpBpq=@(LQ+eKrJbXf%#V?6H?^A}DkMK~X;%L$Q^ks&m3`Ai%e=qX2InsNKR5UtnX7xc*f#N-UOfDF|GI`BmohVh-tR8? nv$E}|_wrXhf4`RPXOUp&yx@EL?wVi1ppwVa)z4*}Q$iB}X#BDg literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bg.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bg.#.png new file mode 100755 index 0000000000000000000000000000000000000000..f32e3b94341c178ce0ec54d1f682a380d6af3258 GIT binary patch literal 516 zcmV+f0{i`mP)QF(00004XF*Lt006O% z3;baP00009a7bBm000ic000ic0Tn1pfB*mh8gxZibW?9;ba!ELWdKlNX>N2bPDNB8 zb~7$DE-^4L^m3s900DqWL_t(&L+x2XZo)te+y^zNJ#p((@`HYhL)91bKZuG0_g00i zCutCbBs+E-sTCHo2*~T5o%K4-B;}lwhozLVm`g0+@e2f00nBNeEve$Rm6pk;#sn}e zqyL;SDN(K;;!tsn`NE>+q?{VIx>csUmS1mTd$H5NeWUvi-#f95*yF``YEH`O3@qgr zx&AiX#J*%q-GIAXRpvwBeqOpt|WlW&G0;z~0GaOr`eg62Pz>#Ce+Z*)9R> z=l~2cipx8wW3>X1cwD_ggf$G(zVq2Ad_HAKEw_MgAaVG<)lteftW}Jd&UsK z&DrSrT5t}Cp|Qc3meF7=7}GMK^*80%?*l1>EXuT?;Qs^8yll|n3II0%0000QF(00004XF*Lt006O$ zeEU(80000WV@Og>004&%004{+008|`004nN004b?008NW002DY000@xb3BE2000U( zX+uL$P-t&-Z*ypGa3D!TLm+T+Z)Rz1WdHz3$DNjUR8-d%htIutdZEoQ0#b(FyTAa_ zdy`&8VVD_UC<6{NG_fI~0ue<-nj%P0#DLLIBvwSR5EN9f2P6n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ixI>G}f*)K9I4xP}G!4{q4u8 zr>zrUN#fn>u?MHuJkJg+*m`$+a_I@KclEu4_m{p`Ixe1CxwwP2oo8#7|6sZ{vTt5Z z9^1R_%D$F`%fOb2`5lwr?yNii^Nw0u^)PCPs1uiNByJ_nP9Cncu&b{h-y5|lUwTU) z+xo^wr-_PJMsWex}!Y@j3DM+(2|v`y8sjZt^dsYacGF6Z5DaU+>}Smfh{~ N{1^3Z?P_7qq2IA%Z4v+g literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bottom_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bottom_ef.#.png new file mode 100755 index 0000000000000000000000000000000000000000..a0bca42cb165a51cc720b63c8f714b929d16ff34 GIT binary patch literal 1091 zcmbVL&rj1(9IwuxL3S{DP-4tWAx0Co{#e^}%_gkv21^{`Si%k-DD8t4*1pm{+*mjW zi5f2k4qQx(2R&dk%E1s5;}6t}KaR$ze}WhP08Q`}HuOL^*tC7$_ulvO`To8+JTwsP z?Czu}Dq0xSOJqGpKK@V#`Cp#@b($N(!F@t%oMod}~4}>G_r|vdhp_j6H>6>h*fO zo`@rVlHpRRRLH^eF`^L*=3HzvVs6mWX3$|^`nHE{LlaN8LvXxeafjFq zT8SblV;Y9XaB-G#oG`8}?EshHUpIEu4$5;LWJ)kVv%X2{G11coliclXC{!fgC>MR3 z6ve3N$eeYciwk;&CO2`*wiGrmB;~B0)MTB_@f?@slDaBuyqXmSotM-$$8K1j6}VKA zmvXu)a9oa;g`}oyd{RrWSuvMNwXp>^z=mtWwq2XpZDGYdv5MwH10%nTP_5ko!&QV) zP(>clMkH`%)OIaY56*_=*^X9+zI_E+c^^4oE5C}pi+v%HPbB1gKFQ|PFm6>%WMwwb z%A$}<@mY;-VXgnk8AF_5!shs=S=vXW14D7A^~q*uc%Vxr#wVlkV{ZNx8LOb6XUmQ6 ze#ymzI~BYl~}ZYmu%p^>Fmb`i*a2`=gPCm#dS#Up~I;ID9m+vaz~w zuj5v?JO%D_9au5?)6ZUfl2_j@UAsN|q59^O=zV^DDKZc}84Ala@DyHOn0at;T|K^U Ze;4&=qi3qObayNq>q2fwf2@uz{sE_KTW|mX literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bubble_02_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bubble_02_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..7fc04f4a8336655442a689f011af6408e0ad8a1a GIT binary patch literal 1359 zcmeAS@N?(olHy`uVBq!ia0vp^YCtT)!3HEB_WN@HDajJoh?3y^w370~qErUQl>DSr z1<%~X^wgl##FWaylc_cg49sbnArU1JzCKpT`MG+DAT@dwxdlMo3=B5*6$OdO*{LN8 zNvY|XdA3ULckfqH$V{%1*XSQL?vFu&J;D8jzb> zlBiITo0C^;Rbi_HHrEQs1_|pcDS(xfWZNo192Makpx~Tel&WB=XRMoSU}&gdW~OIo zVrph)sH0$HU}&Uo07PcGh9*{~W>!Y#3Q(W~w5=#5%__*n4QdyVXRDM^Qc_^0uU}qX zu2*iXmtT~wZ)j<02{OaTNEfI=x41H|B(Xv_uUHvof=g;~a#3bMNoIbY0?5R~r2Ntn zTP2`NAzsKW@b!fooL3ADC}5E3S0onb8|oS8=jMX^1y)^L5|oN?23FO@A(aKG`a!A1 z`K3k4!1zd0hG_6aWMn= z+tSk9+0w|u)!fa|!o|hVQVFUz1zVVz5C}7Upkwqwi32IIz=VJ)5X6KheIN&(c~bL$ zIi?7hHTW45elsvI)_b}*hE&{oGwrO`5d)Fd**^c%Lb^EocE9%$7cE@O|G;CRz74qgJH3Y%vfa97y*{Yk-WH9_CY5o)spnp#>kZ8K+PA6hUi zFxhQ(uGfhx>UVy1z3qA1llwNllQ~r5-1@fv*Pg}qY*ajW)s7)}1G}5dC(gJ7%oR=* zXaBKDUfJhl)pp_l%N&l~)m8UK~ zUu5~B+m}>%3uX)W%S@JgNSf?`Ac3+s|zH!Ro zol(z9dOgMNu!m=)OO%&rowbBmg6>MAYrBtE#9!op)Zkpu_rvnn_r~>n;z8G6 zh(8dlY51D|yZ76SD+0ONX1$Mp^trO%eGk-E{pEP>(U9{hD_2Z=(lznMk!`tFY_IHP zyiJSd{|vTTqiLP~&_6k3+q|D;kF9g^wjNB}_v%GYh^Vmhz2HAJ_g+k0y|eGD>H&sB W&OXdd*{RDwMVzOrpUXO@geCxQ+vZ~c literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bubble_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bubble_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..2b6ce5d7584a354468bada994268833af68d882c GIT binary patch literal 1638 zcmah}dr;GM94~MR;$u8~PTfM0ISy%)ls=`_wrQnfMJ(L`B1&k3bkHPCgDvP()Tx`= zd15DuvIBS1J7#Cy;hX7dCo0}#+A$Tu`Pc?1iVvoqFqa~A`-9V5lHVhr&*%I2eZToE zJ#EhD@VCQREY@gE3Zi4i_xw-TaOS;N+Ua73Nwg}9&L9eC8%kj;xsk}n0F4=4jOj4c zSZXM)Q{oV%_PHSv65wW5;YWIG?0%iHsMnC{bMKCfXOIj zXY#e6mQ-Serj#-Y%P33J8_J3dVk28N3rMz07y&azqk!F9j9VpkDSJRy!p!~KTsANO zp^K#KmriAA(*Y$xVE~`QOEiEG1PBBiD2Xo+Kr;XsgkUbn+=4_XNx~OMU?DJgu^DTW zu|T3j)PuH|m6Tmb)1-vUwb^VO8;?U!i@A_kEcR=_a3X_9w3gyDYEQ(iu>l1Hvl=K9 zNt*~9@GGMEL)>_0b#L|gTx zB*xWYR-%M5Fy~Pa8z3{ed%Yn)knu(`mohPjf)*o$p~Q^gv<8u~nJ*lp$td9qAr&Zs z)N&yLsbB~a34}aE1cE$>FGP4^K|o_Dt_Tu~l#oKG;weNB!xjq>p-RD5L2@-Lmdld@ zTn%oeQQUw9?3x(6gIvLDxe_IXp)^7138FYq0qKPVO;`&F5>RFcfcG;^xRJ0~U6zb&8_44VDoxl_}nv6%F=n>(7k)D9e|yNj0`8?2C4H#r}%@yLUMC z$gnOa`Eh3U=u0P`UqAYzPdhn0f1NDa6}Bkslerz$J==OxE=Oo1XKZfu1+9uw43|H7 z^sKL-etvHAeS>Fj@U7l5Y4(iq!YQjSk6Pe)^mE?45YL*PrAHPlyhwzsdR!82h8;Ju z$WhB~D%NNoKa9Qc8!c)0<}b}kV8Vz-IP`F3M$3qb>f>9^DDVAID5#SDl3QPC40p$p z&>rv1bJrI+*NrtGyCP>rEZ4P$9-UxLjkZv({+Q(Ge22yXQ9Z_)+yel$2W+y znU;;79ir1%+#T|G)3F8BCG-b?*gX7fhXdk@o(60yQtlsEudek?wcbW3k2~)>- zu1c2PJu)?KdSm77lOAxxy$;oN#ad@8nd6Wbk8#!38PvXaJQKePJJdI7vTRY~^N4y? zUwc&Ml|8;&l?Ses)whTj`YyQJo#Rq(oettWsO=ASOs%dv=-7@X;SIA>-tsCB&xeVP903KpvQ6vRrp>b>q-{QkRe!n0v7_U&vnEa}}f z?8tdYD6{>p`ysotzZ&Z{Mi-6TI={AS%_K``LZ|b>J^+nt6n0K)*sEC{n|`G?;r7#( zj*)pkm1o+!^6EmqTi>61=W(}3+CaBWTkB}9Vui4%YgayxjpD@n|NI(N8sbvqt@;-i CoO4A0 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bubble_tail_bottom.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bubble_tail_bottom.png new file mode 100644 index 0000000000000000000000000000000000000000..aae4fdbfeb8b3ad800e72ea3552563fb3d26db61 GIT binary patch literal 1198 zcmbVMO=uid9G|918WRe!l#=F9AJbZ@WM}qGc4v2nY?Ik}vv!Ib!)BoiwwU>Nn;nz+ zaOTCG1jME_ZNy6sA^{J{-BK(l2nwP`i%@926%RJ{q#)Yff|SNL$!_!zdT^MT_c6cU z@Be@Qk9mJ${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$^Pm-e% z>^)^Pw*A{-`_a1H(+eis`l(9x?3>BDZco)<^@aXq+eGj1A2&xjO=GWSJaZ~CwV^Ew YGZgggiS{0x#ZrGc4_C$ZyLPt!1JnHE2mk;8 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bubble_tail_left.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bubble_tail_left.png new file mode 100644 index 0000000000000000000000000000000000000000..a7be7bd16ba02c1f51b1c5c71827b2f6d5bd77a9 GIT binary patch literal 1172 zcmbVMPi)gx828o|5N)SaXlNj9ytx}){8~<+R*4VU<>NPq=rfJjgF{fFijzP&W zW^e@?*5X&Ic$DLMrtNBt*2+g!lQ;<@(n*Al$Iu)%Iu?3{Ifp5z;~Cq{@&DcZg9o;i zG~FHdN?b zj^A{uR-Oa};$t8sQgJg0A&}(+OiQv1M}U}wqL5^-9EWLDl2tJSIuFmR`PQ^rLB)!_RXBzQf(WOQhcZ1ESMz z#qRZnB1Ptndd#<3QjB>-%moL#w1jdzJ4sl!r9v^I=vgGDC8+Bngj%tHv<%V}P0JRu z>03qCd| z@vDT)cPn7BK`03t!~=yX85}xpyB28%pG4`|ye-1MeHvRupEzJ6zN)>A{fq`Bi46s) zFwY@W3Q7j03vwDMqM{>(?_jMriJ8Eh5u)OFrC7QmR)NuStMu7st9h`?I>u+MQUB-1 z-&tF=OGvARkLv3$UX1loB)@fEQ5oCKKHa2Jm2}S?DP+O zyY}e~clOKHK>OYN`ks>+X=JkZ$)C6B)U3wGzG+|n}{>Q6T5ghlI&>z zn_vGfl1Q<~zebXtcFMNj8dy5(j}HHE`0Js2A3nay?MiY_ulD`6_VWi1qW?rmpFr2f HPn~%QTjP6u literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bubble_tail_left_ef.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bubble_tail_left_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..253fe7f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/share/osp/bitmaps/480x800/white/00_popup_bubble_tail_right.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bubble_tail_right.png new file mode 100644 index 0000000000000000000000000000000000000000..b65b16e9ad50d6d9a33dbd9653fb9ba4adab582b GIT binary patch literal 1207 zcmbVMUu@e%822`HLfyus?uDTa8Fz%VYV4fjII(GH-PmE7meQu#8l-8$wJ)tn?epv_ zPAb7@K@4cOA%V1qy`b_ifdt#MzD;5hn;4Z~OiX)WNc0URt*gchm4JzJn-m_ZJz&{) z_uYNJ-}l}3$L|jgytJ$J=~jxOcI6MKMKV7Xeot&C<5G}WCDUH4mGLmD;6V2vrI=_G z(s^4SgGH#D_2Y}MhoZJstWp`53x{L_*{mMwur=EyXo~9Tt+~2Ug_s_NW0sR)R<2xS zXv@qnBgsO%;AY{tbzsVa!&3t#W2$OMCe!;O-BXhZfeo=v*X#+$munejjaMe?aGPW3 zH5FXVFzZg03xjkPd5})BiI@=wfEGm-2uV={-83HuJQpXg7z2Ww6lFd|Hy(yq^UR7| zRC5hmM9MJZ7`rmZ1wp_D2^M){9FQa_1cvU>>h6@R3zTWFMAeAiawztW738W&Z`-QoUo>4%79NvT3Y3WB+xV-040}Im6WPU zijvNy`$3aqGpxw>i^+IAB>|OWLgUjpLCPfrRmci_I-$gy*u3Lo-7#R(u0`xNu;OE} za@K=7MqUY_iDm^1jw6ixapcn3VUdoGSdNJTzcWnF`fXL{S+7Gg=OLS3i?3{LVn3yT zWReV7AQ8_2kg`&WI4%mR#7mkgF%7Kwe`3ZFXSlF9{!=W?EmDEua-;N#u+cowAsyq9 z);Rx(8}{k1c~vRZepbDk=cA?&xyDG`qn8v+Lk-VukJb2 z9oY_tzW#jfgT>0NdhfN%pS=+L@%PaS%Mbp%cke;{=EBb1XWA4+z z*_e4xojypt(LVTb^wy$&=GmFHmM(qnqH<)u@BCbcTx{t&{@ta%B9W#OuMw%U8)&8Z zz7sdC>-$@e{WgF4`0LPMP literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bubble_tail_right_ef.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bubble_tail_right_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..e50dad10eaec46d0389d3405ca1cdb248e7ca740 GIT binary patch literal 1331 zcmbVMZA{!`951pU9AR^2%Qo3UEoK|SU9W}f(aLR>wy+x>V{j9k8duuq?kZe+YYSIc z*oUEUuZfEhw`g#h48w*55y^%#bGj|rvY2Q%bcPvlx}j`?4}KVlQ=bBdejxi`(>|~N z-|zq4167sfS&kc5i`|iVOjVaWbHCo7wi#kA9S*r)AKPrYn zH4x>N-B&;ff~1C&V4YbPc#e^@s7thETvjv&(Fjtq*@}r$12EBg5LQ$lHud>=3{_+w zR_h7412GOnlr60~sA;VXO05kNEn}NEp(Pdr38KIhQ7hW08jR(`W_cO7wvTZPofR<~ zeAt{(b%83B({zA(T!l`_O%NzWxribUMG*xk=_W|r4PVMh6fqu(A-(AQgF$V&9Ac{Z zvUy!_=ffhV8Dnrf9*?`?g)U7G;{;99HU~*Mp@h?DQBBcuszz>-fd_`9D=|~iRMch^ z>$N7+he1o{T!_X3fdyjKm=6>T8E%O&oN&4EXw>#=R@yMD!M|oKDs2Q?VgRoOhSsD@ zFdw1ZBpAl-;ficQXbrPXS71`aMqZPeqChqMybpsnE?JQog7nftF;5nG2tgnTf-U2C z*2@bt%NCavml8>i#juo@U@0$MN)tTHgg};Z5L;Nxb1X;EoVPfM^{a*{suD=*RiNH^ zEc;L_!|6aYH9e?ljmZkAifE>0M6?*n)llfhT1Az$xRGb4XUHf z7SZoz36BR396>|N34-QmFJHt_MLbQ?0#9S}So#0N42QBG%J z^8gigj1F7l$%e_j2$CZCc{XVMIPi9$B9&MnyvsQ5mU%x!51zSaqX((K_cVD z3wZ^X8^6t3d!hMoMPQkn3~LfEi>%Uq+WB_2#lSKJcbz_aUp^>{!?T z_tz;uoE=E?C${EKpZa7+Py3ClwbL&TJu8-Hp4 zlpk&PSkHH~m0RyMxyCUwE&TYNV23)Ax?!?=(@!H~J9kg~!8G-|x>n|7pZjehTsiW> q@t(H!-jTDt?IrU5w>ooD(va)rhb~>boqyc^jroO2zPEJOzJCD4QPt=G literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bubble_tail_top.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_bubble_tail_top.png new file mode 100644 index 0000000000000000000000000000000000000000..c8d6c0751d713cef6499e3a9aac71e5ba865800a GIT binary patch literal 1175 zcmbVMPi)&%77gOY)ej0*xbV&}PuV_ONC>*p+)NQu%&i{L;V`=zy7`x*O% zxaG8J8X)mUNJtYB(xfp>9AFwZB&1DKDxpankT@W58tZ{0AUI5@Qh9EZ!lBv$%l3Qk z^Y{CG|NUNl{>2iV?EwX?+q-O?*(QMpCY}GZF zPy?Cv+M9P!fni2FPP0W?wO3RNySy3e@R93NG{Y21k#AZnh_G$6a30f#OCgiqxu3xL|6MNwxQ8Z;jWcmW&GlJ{JaqVh{q=Ei*<3R1Ox#lCGfkNC3ELxAw%n(d- z_h3V@BK1anHE?KA%vFf3u8TZUg+-2j;cdrOftXhe8H(8)Fboj@t*k>W4-G}rm zh8zcBWm$r`S*5H1NGoB8bBb1$4Oz^Wu0CN zkA1aO`s0V=@9rePjlcfBT=|l3Pd+hr@7H=?yFW8^s{Z3fw{o%ndxGs;xtM&oHSx|b z?Xzhn*?+z;z0I_r4$_Nb_xceP|9SfR@`uUCVd{~-d-b(NX0ueiarfxd>yNG^#;4wR z?zW%0Il5WcY-P?*^v!7cnIoTl9Gp^8SATlyQgY+;_JxtYnfheQSiCm!P>Pwpb4z~v Sa`)5tS5YL=2vU`7J@Bs|I8vNTfM$h*BT0(Js)VXi;qW!lxLj z$WiQIFh!({IOtVchfL5hl+H>+eG(&M%?Hp(o`nJ`uthYl_G=cKk78@OES$UBIEJo4 z?7k?r?o=+-j>dHpph2JCD-k4#(zK5Z1ZkRl9Hj`7!U=fOUN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D07G{nHhL$camM+GIhOS0VhDOG2 zE*5TylcOS(cjOR+OKs01jWPOf2>r8e5u}J6al;IJ%gF z{Ox39<_2V%nVXs!xLF#TD?#<9kP~M5K*#8V5(iRZfe8UqAczT1`aljm^Q7hhb4(F1 zYqa}svtwXj+TiKp7*cU-OZeGrVMmeslIAmdZwjbP-O?+%#gMZ%iD z^eZmxKfv`%J*2DRwC{_B>VmAyO>L9r-4d~xlIP2LQLU}a{@8aj|fN&3m})l<#w zYg!yyzO$FVzdQfjbMd;=&6C|%t+Hyqp>ujs+s5_bTK4N}{(h?Dzq4uIr(bIy&w68V z?$Mu`xcI25FPw3+V|*sm@hKZ5=uF=|hwbLy%Q<3Z=Gxsqnjfjoyu#foz1{4=$A;O3 zMh!j>|NB+kXFj6TEC4#OlxYNiEsDTDBZ(X1(vsDMjn4! zG?Pg(_*hPdf^R-@;xh%zsZI-a#NA56&G zWSwj9JK@>n!lG|J*90aWyp!VEbaLMUkA#pKyA&6vDJNH+y!1twTSu~9@$GSmUjEcs zKD#@QAF&BxI)C`ymB}j?Ysux_<~!39G5@5|T#ut{jEh;8x$3;W8c;Q5seZi8m&U12 zZ)o_cy?d!>u)bSW@aKftI*F5CofWC!o~_wrxTtrYCkNMO*T{R@#6y>DxNv&jYUS1wJ$#l1t?Vukzx7S@&EemEiei>~F7dcme*1Fr@Y}ahRq5&F>+33R zG=)|qWU@^anR_B-(&o+K%b!16XBvKg?|+W1UZ+)CJ{xAuiioSLNjI9km#@{QE69o6 zeVXN5zvu7wCFZPMTl<4;{=bLm>!qG9$#_*c&+#x*i^CnC4G#<(j~{H_U9~KRH<)$D dslVb042+xfm*4q)dIP9V@O1TaS?83{1OTkQd$9lj literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_button_normal_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_button_normal_ef.#.png new file mode 100755 index 0000000000000000000000000000000000000000..3bb89e1da72f8b272580eb722a48c11c0d180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/bitmaps/480x800/white/00_popup_scroll.#.png new file mode 100755 index 0000000000000000000000000000000000000000..91dee336da30c687e1a04574920b762003325d95 GIT binary patch literal 2921 zcmV-v3zqbWP){Q700009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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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l3| 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} z0001#Nkl;U`zPF9w0|=?DQ-*XA#kE=F5OOIT zSXh=}c4lOz%v8vl2O={?M28Jl=-~}JT>C{_V~!JUc*PdFBCPO^GcL6+TEY}x&FeEJ z&_#s5(0zCP6X9Qlcut{O{J^-mkMP+l9Pxr72AEZw`W5p~6)&5r_Zox0MUDFaf7&8N TDQ*nP00000NkvXXu0mjf1?6g= literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_title_bg.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_title_bg.#.png new file mode 100755 index 0000000000000000000000000000000000000000..bbcece2fdca08cbf3e9ab0ae2ee5b21f3770645a GIT binary patch literal 1152 zcmbVMO=uKX93K)eZ8Q=}pc*`kBej)g=WBOocZRI#d?rh?al2VekfNE)ykv*$%o}H3 zvYRv&6fG$M;O2%;t1qZRPnhClwT9eDh7di5Zl_9A@{^}`WVF#|xzHXH_I)-^{# z0hspW$tBQ95RD^FaS#pWdL;|Gv>D0JRoBO8g6Qn3`ldAo5IGD+9WO(zT)s+?j-8XA~$Rr()SuDqqfBYup7M%4!)3-_W*WORSMdrDZLprZraQIZozMnvzy|MNTF( zUQp^BTVlmTQdP9HuB74|r}K)U$Z|>*;{vaVvZ~jySuaGUXMwt2C(^r)O>K*n)Bu+-}=Xt{rRYPUt zx*Yi}>T%sLIN4wmN=i%f)CSgmlbA8s7$z!?*NUZngex#wZk9gYY&H+@aK{9=HEy&Y z-G|%ix2z@?s}G)hpV@upqt7*h!=BtX4WE6DexcqC_LSQvw1HCxZ`**5iO=8v z|K_bOP-{9=`1|wI9YM?D)7tW}zKP#EX6IIZYCXTd?Z1B>?W*OKx8M7&KHQ_9%q^Ce u9{haveDE*4G~4|{>B`kV8m4<+yfZ}1EZteUs5Ul5|AegGr~Rr7op}jh$bCBi literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_title_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_popup_title_ef.#.png new file mode 100755 index 0000000000000000000000000000000000000000..ad4a435cb461b148e9cbfa75dc2dc48ad8958bd7 GIT binary patch literal 1273 zcmbVMTWs4@7Ei_2${u}y&0+1^(Y7)N2{hm+XjvQ5ZLS={mU%fSyT=5E zE~_}j7`Eb6CfSW93=5zkJQ&E56orPvIK_m*VQL#nlN3#m@D2wkh6{x`I)YX&3|g~t zc`hYLRa-Sc2#J% zijCe8%OxzJIEIxrjGM{HIxJN3a83akcf~ zW_5Ug4kyNfqp{`FYhNKq-BwwMr^{CtuAJZVNr!J;<%5=ymbV$7crmr(*9(__`d!%@ zc;D}P;QQ3kx&H8P`=?76>*pt>!>1aKJp6U*z1PpZv43;(aMR(Q9l}C~?7#hDhde*` zTIgV-J;c0vLp=4_5j->B_T4WxPM_>}tM9}9r{}-jeQ4&=!Rg}_f91gRp1Di>$D5u> zQ$H7r$hHk{LA&ymH>%3YN}%w#A53Q4?22Qp!(|A$ab!*?uEOM4yQ10)0J|=JPUcB#z g_N!d@?_J|{Na~SShM(PMFS$P>S?m(t;rl250VYhajsO4v literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_progress_bar_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_progress_bar_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..e7e4a1224d5f1af865f550362d070d0b27267f9a GIT binary patch literal 1248 zcmbVMZD`zN9M4^?w$;8&H)iV?k10$Cz02Dry~JMcCAssi?7DJ2c2!W8OP*_Eo8(N= z-nEpvO{o(H6SsZphaD)g7Z`{Nn`3myAzg<a1uZ+`jHGu7imC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DrR$#jUWSq#hjd)1SXmU6N>7^em?sl zhAL?|l%cW?M$5zTRCzMRr?J6@(1D@=1+u`D(PDN=HH4xUtLqAIUfaeo zv<@*Rz1W6RiAWR;XgWX{7wt?DB#E-Di*z$AOZKA_K~gvYZ`Mh=1%?$U4sBc*w5F%W zg_sm-*n%rBmNCtofa8Ti!BwDLnm&P(JkQrOD9Q;DPNSrna?z<8-Ax4v7%5%JnTn>O zHAOk83W)n~Ov?g;k@GD3~(5DCcm}Mc~=Ueqqs5TlO-funZi)?w63223ON4lu!y4T57CB?wfglwkgEap?Im4kdc&#}8 zQ!LFbSb??aX6eJlX7d0Qc8m^NG7Kyi!>?^;&qb zXS$!ato>LiK0Y?~^{%HsK)#sSeRO;NrR~uhcJuJc`uAU*EwrK!I~^tZ?{>BrJao78k_r3X95C7Ad`-uu-MSfk%+fS@rzO(jY3I~U!)BYz9{sa8? BtxNy_ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_scroll_bar_h.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_scroll_bar_h.#.png new file mode 100755 index 0000000000000000000000000000000000000000..de185753c9af59bc7e0708685a4ad47c014d6788 GIT binary patch literal 2940 zcmV-?3xo8DP)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#fknUxHUxJ0uo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x800/white/00_scroll_bar_handler_h.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_scroll_bar_handler_h.png new file mode 100644 index 0000000000000000000000000000000000000000..a909f20c5daac5abdf32d90df15ba2541d75b70d GIT binary patch literal 2843 zcmV+$3*_{PP)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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1>wllaZmLnI+5&YKL?fq0y6ST@{2R_ z3lyA#%@j1kGxJjN%ZoKZ(F5_VOKMSOS!#+~QGTuhIDD-#vDk0u=xXj_YHVO`jLY8; zy(#2`nLf}l`k=&tlvrRwz!V5#!jnFb1J69EdB7Y~1k4(VCam@h42<_ZT^vIyZoQel z-}|tG$Z_e*VLrR(KX&nE3&y_G|*=EcWJd*1KeUH*REtlZlZ>rCFp|5(q-&%nIr zOOyrQy_z@53mBu6ltnW=0~o~@`1a)=;5)JF-fs1eAuHU)3OT$VaN0B(&0q?wn#OcG zLH0<@eH|v_6YD!N*x$5UBzc>?-#9h2b+U-2@Kx5dwuxn5yA{?e#VmYj%IdoJ$U(jL zl>tSf2iYpZPW<3V{j1?|BJHcnjo=$u?{dE}EK6;@PH@leW6cS3lKEGMu`gh3YdEOA-O(?o6x}n``9S)i!@CYmyRQ5`XI^+w+Cy&5#ao+=ZY-&5tBd@W*OAN{+hJM6xGsIQ_? uN%x}Zs&CRj=2WG%mN)NiuNRVM;$hgf&t;ucLK6V2dk5qI literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_slider_handle_ef.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_slider_handle_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..e963c2ae87a710c4f04ee89d1f1479955a246ac6 GIT binary patch literal 4460 zcmV-y5tHtTP)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(Hl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~Dt0a!&$cmzn zvjR{k6o}(Eayr@Q2@p1$O+{5zdR71^rBbKUQTH3g><8esTCJR-DAHL0P!xqWo6TH0 zg6Rp+v~4>_DV0srq{H68rfE`96y+44*$+UAG3EzBpk*={W!TY|BuQl99TCG;pG%dSd={iLdG)+@&+b#gu>30)z0DtW4?3k2N%`lAYu+-=C`5dKG-`UwQ z0c`F!xjU%V`$>}gRK=|JdH%{zjJNQC-)ylNPUOny#wqSM_@RVi<q zFlvGz{EsnKYq#6ZXJkXvG%c6SX3xcOJl@t*_Gg^&SE3W6}9sw!1g zbxRP0dXgmDQ53nYRx9eWzEeU-Rush|fTHJlqps_Q>4sg$r#rNypBtJ%ub2dUy2R4~ zToy%fLQ#}JlBA|6icJ7*LP&>m?s=Za2q6go#BnUDswx9eIp;d(TuYL~41&O5jL{@X zJ_7h}+A4&HW%P3a_GZHX@HGI7QhF|v$uL5Q4&hjk)TDnGdmFXlc%K<)J0&b_`S-O_=yN`|&U@r_w%d)gf xys+zsu?rEVr7=Fr=I;scrP<&Al^C}De*gd+qm+*-P0auR002ovPDHLkV1oDNMWO%z literal 0 HcmV?d00001 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 new file mode 100644 index 0000000000000000000000000000000000000000..6c573ed82411c7277e17f71c15420044d9c193f5 GIT binary patch literal 4747 zcmV;65_Ii}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!j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/share/osp/bitmaps/480x800/white/00_softkey_left_text_bg_ef.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_softkey_left_text_bg_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..573c8adc0c52005b77f2bca761fc93b2543e7513 GIT binary patch literal 1319 zcmeAS@N?(olHy`uVBq!ia0vp^T|n%|!3HG%|LZ#jq$EpRBT9nv(@M${i&7aJQ}UBi z6+Ckj(^G>|6H_V+Po~;1Ffc1+hD4M^`1)8S=jZArg4F0$^BXQ!4Z zB&DWj=GiK}-@RW+Av48RDcsc8z_-9TH6zobswg$M$}c3jDm&RSMakYy!KT6rXh3di zNuokUZcbjYRfVk**jy_h8zii+qySb@l5ML5aa4qFfP!;=QL2Keo`G(%ftjI#nTejE ziGihwrH+D;fuVuEp^?6Uxvrssm8rRvfuRBvC;@FNN=dT{a&d#&1?1T(Wt5Z@Sn2DR zmzV368|&p4rRy77T3YHG80i}s=>k>g7FXt#Bv$C=6)VF`a7isrF3Kz@$;{7F0GXJW zlwVq6s|0i@#0$9vaAWg|p}_G8yuzFu#E6=>*lEl2^R8JRMC7=mi?madM5FugAM$)&lec_lEtDG0q5IQ4>(LT&-jW|!2W%(B!Jx1#)91+bT`GI6`b z6sLJmy(zfeVun+%KF~4xpom3^XqXT%^?;c0WDDfL6MkwQFtrx}lXc8e{a^+L#@U`O zjv*Dd-rU@ndniDJHK4wkbD5{}VU{UAN5!t_9F__3=sCb-V)CFx!1_-Ilc3O?bDifW z>aYl%y?(X!z4MAyT8-{O?hOkRG&s1LnihOmUn<_+8l2I&NMq9Dk27TW+RuNloTq;I z<(9aBbN=@Qw>huB-hEzk-@CHim#g-!`+L`5{`vW`iQeCOOnP;N9tBTJ{j>CI?(Vz$ z&ZKSr-tKr&`}<$Kd6Ko-x=#h?JVR@4=Fi~`Pn!D0nPcUG4<42Ir#QH_KMMWn8L;BA z#?80wcTY1hU$=U0s~Qr1UB35F`S$q#UmRS^z8DC5n`B)VF9;M6iRmwVeei|j;sp1L8WOe=wizOC zG(cFwRtjj2EUV+fmDXKAGaLgzYJYA%y~Yh_2v`G%W^@D^F3Y;O-R+k^0z=~?uQ;u| R`8PpDm#3?r%Q~loCIH_w-Shwe literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_softkey_left_text_bg_ef_press.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_softkey_left_text_bg_ef_press.png new file mode 100644 index 0000000000000000000000000000000000000000..c56df753990e7d80ebb88399a1b2f930891dfa7a GIT binary patch literal 1515 zcmeAS@N?(olHy`uVBq!ia0vp^T|n%|!3HG%|LZ#jq$EpRBT9nv(@M${i&7aJQ}UBi z6+Ckj(^G>|6H_V+Po~;1Ffc1+hD4M^`1)8S=jZArg4F0$^BXQ!4Z zB&DWj=GiK}-@RW+Av48RDcsc8z_-9TH6zobswg$M$}c3jDm&RSMakYy!KT6rXh3di zNuokUZcbjYRfVk**jy_h8zii+qySb@l5ML5aa4qFfP!;=QL2Keo`G(%ftjI#nTejE ziGihwrH+D;fuVuEp^?6Uxvrssm8rRvfuRBvC;@FNN=dT{a&d#&1?1T(Wt5Z@Sn2DR zmzV368|&p4rRy77T3YHG80i}s=>k>g7FXt#Bv$C=6)VF`a7isrF3Kz@$;{7F0GXJW zlwVq6s|0i@#0$9vaAWg|p}_G8yuzFu#E6=>*lEl2^R8JRMC7=m(LT&-jW|!2W%(B!Jx1#)91+bT`GI6`b z8K-$ry(zfe;(}AJKF~4xpom3^XqXT%^?;c0WDDfL6MkwQFtrx}lXY%D(;Nl{rg%>m z$B>F!Z|?ec&vuY#C`>o`=-+Yka2$80o#Vcs{bl;CVyEP8sd_N=_W8x%HuQ;IyY%?S z%7lO$(a(-s?-HN7)l4bM>$9*x0EY&P2oo1$Yl9Pu$gkx>ORuo++_uRo@>;BNx&Onf z?_cvr-cPNa`t@d1w%EcGt5Wx#Fyia%KgOiCV~Vxsuf6s6^(DpRSx-+_)v)b4=4dE4 z?Y*j<&IrsO$kag6<0$BoJwTiIJz z3aJUzFFKN!oBHODu&qL$h(Ji?jWlFcmHNwnwBFUs zXUc-h_vZb-_5AhMRei^k&AuB*R|dR!F|SkTopbK%cWdiqPTuynQti4neXfK+|MC7s z8oNIKT+`@eHzT8@tE6&Xd7+GPV204?$AQV4Z!)w_>sN71+Ir1l;mwtwq+73rX|jq$ zRisbLWD@yhZ}W%c%l2drjUz6K3t(X@h!n;Sijc5&fJnPQX-E_xq5>ogiW0cA65KS# z)@vdE8{a&fopAX1^}qfb%M+q}`)kdQX=J~Z)|kldvRl+z#q-GYE7w_;-Y<{6UfTbZ zcgpn3FQ=qMUVB?+J@xrcI~l%ZI;Ye2-`}1&E2{4Bhu!zzzbe~(G&EE->h;^FML!?E cw`Y}La8^04bvyrWH>mjaboFyt=akR{06cCc4*&oF literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_softkey_right_bg_ef.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_softkey_right_bg_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..73e2f236f8ae62f34bee76381cd98b468a3d8dd9 GIT binary patch literal 1504 zcmaJ>drT8|9RHP8C@dn#wxBEKb~9@-AM~s z1d%xe6*iXnV2V0L9GSW;+oFz9m1SxoaXN#WIH`^$Q;6GSPegY`!2L0H$=&af&*$@f zeR7-KuAG@Mb7KGiGab1^zPzrMUza*k{@%z)ST8Sgq^x48fLkN^Nr3@Ynk!)-hmTy# zX52S5pX3yY;<=ZiSS`E+C$qYLZze1U05$D4uG>Q4E@RU^$vV zufg+)?1@VL8)BCHVL$Syr5AliV;QK=KHtL&GIa0-etPhx&X|Xi>^%9_Ra? z!eU`1&mj4X$gLA7d2nmyhePqWU0_Iw6AC%5Y_f}P4<~V=hvOl8L8=aeR(M&O^NZtn zrxSOuqC~P3;~>nitf2FHXPf}_^? z7*?9((vP`@X}Mu5_;@)o!3f?8hRzl^A2ePv?wvjtY+AhuE+KrW-c58ZCwEGTUy5wTV)~|oo zQq$7V=xX?Q;D-Y@hn|dowc(RrXOGT1(0uUH)0bQRKIw38KiPl%;ltTqTXwtVT|AWo zRGFX#s6iZ1fQWw0dCQpXXy3gv=$5w@L~q3gZ~dZf>?XQaRgb-?jNEvt>$&?G+ipo8 z7VkJmm$YB@p15(Byyp)*cn4f(`;HcMHnm=8H_U5l8m_o@wU6$bq588(mG$z-v6Uax zx(gwaK2)`}H zgRYzhA^ztfm1?oA0UfiZ#}q$~bEX7&om{K-~ke+P22FvKX7{O5*v11e-#jwC=b0PoqbPX3s4C zuO?+rd=K2-1hqrURf9O_&;-eMk10Qzz3H{k!Y#^gT2UiCLTOiY>uWPCs+ZuXW6^iM za`)D1L(hC)w;3W;gS{K-Woih75_dVROEU*SRNfBtiDC8ry7J)gwtbbYnJvAF=A->} zJ8MT;(f9-X%6h0=r65)1mVp?!J}2SJ*u8bHCk4%+#r04yF)!+(Vr5jY`Te^1OpW#U z4RwN*h@-UH4&~A(PAk;l$a3Jamj}C%5c1Hnx2SVQxu*N-_NM~Lu9{hjNFbKA-M@W$ RZg2RX>&S8uM{KKW{{i6IAh`el literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_softkey_right_bg_ef_press.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_softkey_right_bg_ef_press.png new file mode 100644 index 0000000000000000000000000000000000000000..3f1bb502012ca4d8a40ce1745f5cadd056ae2794 GIT binary patch literal 1349 zcmb7DeM}o=9DX;5-AA^uu}py&FNbjnuJ=(2v^QD?y%riQVrc?@X^-AZIpIFIJGjzC zoK0k!sU*&*F=O*%i^?3BsWBTWngxh1W)s}hZOK?7#vlVswhZdne2-D^4{PEjckkEp zJip)Xd4Km}ZB6B-4Y?Zt0Gs?(Y!HoM^wzAq4}Gt?v%Aocqk9|lI=M+VI2D3&UT%b# zU*w`N2sys9?ORw1Kn5;^8uW(1V@yOA3C_e2F;PKm07}bZ3KwaCI@SoIg5<(y2ZwM> z;9YoqQGg049@s2Y#Z_1ruL(usEfFV=m$|Xh7=r{vsB>6MY?U-7=E9eB88kPyNgP{( z=q)b%UQ!K#TFfJ>5Gx`mYlJGMv0^(x+bO5rxeK#VG)2-jk}9#%6jM~fP&Bsu;3%5P zH!(rhw;T(tTzIptD-1~*hCvvGgsetM+UazXl#R66tO#M%IwhTpStTt$rNBZhq6&&G z$P#8Ma*cAk?!r-~_ev0z6t)jx=V4YsO$HCGmE-OdcMJVYhF2Bkx zPs=r1K~zv=7OFxA5VGJP5#=Q+~EQ6uUHig|0rc2Mo6j`17jw*M5-jWR?H^_JN68cMCQr zJamG6SqPjnl;`q(eE5Vtao5tbd3bV>xc~j!mg`${2=f=k0N4Y-J}@`C?beRMk;U&% zz4hVFr;kdDKQ(t8`oXyH$NKa0(tKW7{GG4*j#)kiH`cyza@X!x_P+G&@t*3NPdpQR zwEew{U^+8vr$0FQ;ONlB(dXj>?&Gsl$&Fylns1?cYbx9J|M~dMwqx%3gHI*LuL31$ zWIV7jJT|#rF}h|34u1|N2FJIsd#~)iQB{Bbkr^c!o$4Lx_--P(5WfB8$qU)x%ZK-U zGBMQq+a+OSAZO8-dH2YxedITD*FHNlZvk)4w?wlK#h*NF$)xT~3Ek1#85uu^V ISA-LP12Eyv4*&oF literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_softkey_right_text_bg_ef.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_softkey_right_text_bg_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..1c125df676eb177d78d9bb3072bb1dcccc88f6c2 GIT binary patch literal 1549 zcmaJ>e@qi+7`_$|s4~$lY(voV90L`4ceNlrXuFn!QbVCsCdD9GX|GVFcjw(Q4&n-!WOC~ph#T0=+qe%R0dPBX3pOe-4y}%$Jixz-}`-ep67ku z?|pM$=yNp@qG%BS01?`3+`zAm{F@s#kN>`U+0@T3?{k?(Zarn?943YUR2Hg~0JU~g z8DStyma47iiF5!6f@}pw&Zx`5%#>Yh3Sh)eJI%8JAYJLC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|0i@#0$9vaAWg|p}_G8yuzFu#E6=>*lEl2^R8JRMC7=m(LT&-jW|!2W%(B!Jx1#)91+bT`GI6`b z5T|)iy(zfeVuVw#KF~4xpom3^XqXT%^?;c0WDDfL6MkwQFtrx}lXX7hmS+qMO!l5G zjv*Dd-rV)~KV%@$P!Y*pDkqu$ zXczwdRQF9&(YfA^I`7Xy0s$NvEFw%?jI9k$EF!x!ice0S5|msSaXRL7%*iK4YkA6F zU-Ca`v-1ACGhCCRD|dX~zwhLmlzXYO7`m8!CpqwKj?pVFX7ec5u|0L?#GVs5sagC> zK1wfT_576YTQV*6-JOe{U-ZvXpBXMG?XZz?irEdVDfiq?ezNIz{&@VXmP1gbN@>dK z9rpxXICCfSc|}gUN>v#U?qE9c66Wzt7)%^USdYXZ~&s{{D>PIGaaQ-1(H( z>vEqjp162Vm%AINAre&e@L1CNLAegT)u zyWNh6bPlump>U5|oC8IFh~&BxOuog7Ap>SG-aGMA*cOd*^HZwOhY? zYuMc8Mb(pk{{NhtaM&`J@A}?VT5IS0-u2E)Q`vS+n0EBEr+HR$_xY<$&e|Ap<@3)w yr{4Ppia1C*{Qeu4yZv^~=9@iRuN`e?U}o4Fdtj^Ivy;m~#jB^QpUXO@geCy>2Oa|e literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_split_handler_bg_ef_h.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_split_handler_bg_ef_h.#.png new file mode 100644 index 0000000000000000000000000000000000000000..a08b949dbc56d96d0930c4da240ba682d46d74bd 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$oCcF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kfJe5E v5hyc9(pGn$!1nXet*W{vpceoD|NjF3yyF$=8|w}600000NkvXXu0mjfO9V-H literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_split_handler_v.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_split_handler_v.png new file mode 100644 index 0000000000000000000000000000000000000000..6d5cf3990efe088bc79319a67687fde1adedc623 GIT binary patch literal 2854 zcmV+>3)%FEP)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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ycSU)+_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} z0002JNklI@?>t!#-Iq;*Xh ztJQ48M!sOgApZ!`lFo>$We|fH#2^MSh(Qdp7^JXCwtdEDg!ll-ntf*^wUPS1VIx0| zXT(Nq#6}F_YT1a5*oZ+~t(-<;^{1`Hk%Ts>mJR>_0RR630LW;43+8$R&j0`b07*qo IM6N<$g7|iNN&o-= literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_title_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_title_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..c345c6623308169d9dcf8f15f6998ac2b21f802f GIT binary patch literal 2854 zcmV+>3)%FEP)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&>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f DyMIgx literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_toolbar_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_toolbar_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..6b73b4b08a4119261e003620c334d6e1158cee2c GIT binary patch literal 2857 zcmV+^3)b|BP)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)XSs8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@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~Nkl_vI77B|NjF3X{;U(PYg&g00000NkvXX Hu0mjfj1^1V literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_toolbar_bg_shadow.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_toolbar_bg_shadow.#.png new file mode 100644 index 0000000000000000000000000000000000000000..fee9dccf59a270c054f79d4bc188640d0c4e2b22 GIT binary patch literal 2841 zcmV+!3+D8RP)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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mV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_toolbar_button_bg_dim_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_toolbar_button_bg_dim_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..d010c567214efe421ab4d057965f621ca289c364 GIT binary patch literal 3045 zcmbVOc{o&iAD_uq$fXvotf72{l52t>un zkwTM=_=RV&qU?R)poOk%SROu_Qvf+#c3_Oa>ld&NXOY0~eBOnwM0{&nSi$j8qH(iGTEG7xI1M7-(<&nW) zmg8PNNZ;$`8L&4rfWU-VTLG3)M412^6f%G)b{I!Mj3U8)=n`e~g>3{3_yG}yl3;&1 z<>l%Dkhy#iz``-60Z0@Iz~SI1Gb|2=G6B#?6dHk)-8fT}84-&kqRoMy7ffc2&kQ8e zDE2>X$yOv-uu#Y&A`p?0k?=?ioXZbFpa=xQf(9CGDnpnGL>wU_%9JC}`=vku1p#~( zPsrkOfCWW{KQ~-Rg2_DnD+D&r)%9;-j^JmaWGO>LF?a|R9Eo7F7vlPX76@tJf8F>; zw7^ru0}(V(zzydI$j&2B?-yB?yMH&d0F-${bmy~Vhr$S>a09~GAV=s#A;Dx{;7k^i zNTFhp7>XU4iY4QzXcUTIjwKTab~v(`E!7-@!~N3uCoUdmZfj>oAW#St912B6kD znQVroAnlN7Gc5TR*NGz#GB^R?FS{(6-Je|izjBFWKFAPq`JP;E*sluk2<8g8f?zHW zAk%Sx;SLsu$&C~kEga8Z(NaJ@D*|NN^SNx`M}CQ{f3R3)|RuTy9T9rQ~GlCRaHrwz81aZ?R_*K zd1n6GX$RfI_FyP>fG?U2{8Zam>0DPwzSb%|YQ!9gDJv;HZ57+y?10NmOdj7!`J9rg zkOAqZwjSwF)`YukQ~^AOV>~w$Mt>Qt(psj7=u7@b~sqz@xkkKbst^o86&9aT3!@f(Rh5OeMyM1qI?-eJl0c>D9F$6mtMMr zw$S7Y9waXAJUM4qx+2eB-*iRFxi6EG0~->hA6~5-oLQSU=cl56c@B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$5^K&nf2je4@(&KYjZOL>_pD-9w1#WcCj9m9 z%MPcfTPswoxa)fwi*0k=me!t=dg#!nv=SPyL2+W%fCs?()8 ztC@8(tEIR4n3;5BZbrH(|MTm2@Ge_Qg>S>Bajv3(oTR$#qkO$|YKjUSD@1BRyW(6#S6@$r(E5Tlf1}H>0J-^g#fsBH z^$5Jqm^tTVR8^LDg%%P@)89u92zZm;RsQFcRGN-T<>tKDnik!B2p#+U!Q^DkU8?b} zplo_zF~k|_GToSy#3JK*x!%6@61#yNFLG!4Zgqf$-@Q+L^fxeG>LZAajm6qtxKdQ) z0L@BW6ApavFw{R&5k=M+oOQgleeml|mzRFN?rj9^UZFe&g9%i4>daH_n|WnwYC6WL z_Zih(3&O2vGRYczHtS70j$g`eTe1fKp zGD#AN1g`56lgr{YoWI;P-A_G#V$s=VZS@w(N9tQ};9;-}EEluozM}5~_op?KjLHy| fkFSaI>boH%+p!N*=1J2FKi*DMH%f)w?gRe;FNG*D literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_toolbar_button_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_toolbar_button_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..779de68cfc499d79b99b6e2c053309794b363f3d GIT binary patch literal 3144 zcmbVOXH-+!77ie&v;jnr9wX8W2?-=2ks^=)p$O6hMIn#?p(HU05UL1*AR|?ZgJNM2 zkPZ@>6otr(;?M>KK|lp5j_{;6Ny z03e39#5(Xs{oQAu5bs@_a9o);$T4xQOh>8@Gn7Cl0ZfQgFA@+RMDQg!kO;)E3tW-` z03hH)c5-F9+S*{esX-9Jt`3A1MB||W00Uzdjo=+XVgkKLzGR9aXrZ|c1SAs;L8lS6 zI<_=3k{{VJoKA8KKk4Kh9^j28f{cxT1}qGZAc({y09iqS6b6Q62>Qm0;mvo&P!RB& z3NyeE^rustP`!yu3tI12dv z0`aWTi9Q$ytoe6aypH zhDBqMFc=PQYJ$+$*EPkWP4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/osp/bitmaps/480x800/white/00_toolbar_button_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_toolbar_button_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..647104d35e28868883e48c926ae08c77afb92380 GIT binary patch literal 6026 zcmV;57j@`~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?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LxUjJJ z(6O?z;#gi@W)g{{sj8}Nn3e?qJjb$z#jql*YSyo)ack~v0%WV$&zS_qVW5I0mCp!KA&fm zg2HO5$^w8WNtQ!)SWc(Y;(3m)7Yt~c&J|RR%jJ|}!9YuEb5oNKz_$q@?>$wOcpfDj z;}a7L)6-K^NYWDLV(bY15Ps>VAU&Olvl zU43&?)5|I0*f2mCz&8PWGnGn*mRFWn6Ujt8l}aTFijvn2U9(KfB+S~F)TUrLmJ@hE zlpPMI&*uvS{DENk&hi~TpEruNqMCnyX+7Q8kC+2mk+9mKhf6W{dT{@(!rrRnCrOH--L00000NkvXXu0mjffHkoL literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_toolbar_button_press.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_toolbar_button_press.#.png new file mode 100644 index 0000000000000000000000000000000000000000..44b5c56d1fb3c68b67a0cef2e77ffb94752e9b9d GIT binary patch literal 3984 zcmbVPc{r5o`bA zB4bM-TZ+h*HmQX08|R$P@B7EOzJGk*>w4d3yFZ`%{@l;~T<`lP+1Z#&h%1Q;2na}! zEC}}e7QS_hiSVCl#))9#RP0IQaxB994wF@>0c580JwnP1hg3*Mf}C_Z&(~mPag?G zA(3VX91KQ;n-WctXfzCFrf&+v5s8RjSQ0asLuJzFzx*=ze*ebm{Z}jo&!$s3EVd(y z<^QV!?0i@pR70t*dhUe9W5k+sbkn^w~KS&v7?GcqoEx)Kvp;2^0=YYuNzsl6< z7^Qz`XmI&qOhhu%3+iv}F3O$KwwfJVidf$4eNdoX=BVWl$uj{AQ%q{J{XTT|Y_Gfo zHZRjZtbcgu@KL6&p%vB?OU9b4!>JbI2%wM~G287O)}wCt`S5Vgk%|}jP8B^Bj#@V5 zj&gB0YTT0}?X&{+y+b^&o0DWs4J*xzFOFLKQrf3FJ?iF))jukgk4dQGTHbQdq;;p5 zhb_51GuK`*Z9AvgZd#dH&x&mTQ8p75ONo14QuwUfPZi3`i3=Y#D#{LPat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jz^YD!ugYs?y*LkFwUwpQ97p9_Lq0Rwo@K zD_$1&l88ZAI-^vjjyODv=+`Q1CFHmql=w}fRxr5gYr{b<^b}dPavP4`r+uf!!1&utHZj5|wv{vw|%0+vsjG&7Xuo`dnyavqbXm8slu*7`mt_0)B9ORQ*K@73Rv*Hikd?G6Yr3?Brb6BVBBp6UW;SIFlo zNU|!u@Rhf!PQRbjwymA6%Vy?eUOGKn^L~A)*9p_uFn&Add=SXK3}Ztkf4%U8EIruf zcSLEEe6C7YSGS6n76cxC;T!Zaze#ttXhZmz(n|a5@ZTGjf37^J<<6ezkwl#?^QQd64rC!AdDC?8T4TM69}h-Qd6l@ov%$B9hGWK*xb;b37@`G@5Ycq zUCddSZXe+-&1$8lZge!;ti{@t;)!k+LiK)rer2)w71W=Bi6_Pg(!Y-Uy}OcEXjzw{S`YXVykCT(z_metfabptW4zgZodS_D0vAu>tMDn+O2l!Irl=vho$_U3TDqK)*8n>!Cr%>{JG2Q06wuaEq=H1-e%x+JfKN62h zF>tSR9a`jA_o!WoGosf~k-(HhL6}A66ymk zdo}0xjE;_uIaP$HdQT4*CMj0zGS_xOxB2DjBLU}<__nq- zHT#1;4?l^$d>cYrQ>Y1a=dP7S7LaM_ptnIN6+h*gKtS1VyebD|lWWxr9<%w;o5iq7 zP_&c1#z5JINKI3Q)(3H}PHg(XSSna1DWA}3epUE==%xt l?|5HIuk+BYg-uy^0q(`Jv`ww6pSS*zNkkh$HO~F){{h$D@}mF% literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_toolbar_button_press_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_toolbar_button_press_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..08bb322d438c4d838e5849d7b9fd71af6f2628e9 GIT binary patch literal 3105 zcmbVOc{o&iAD_t*T}unf+T0Pc&SDlbX4IG&`%s3+r5YRz&0=P(iQSa#1ecwOsbN_hHbI$oK=kxh|m*4mMJm=UhS9|4kTI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diff --git a/res/common/usr/share/osp/bitmaps/480x800/white/00_toolbar_press_ef.#.png b/res/common/usr/share/osp/bitmaps/480x800/white/00_toolbar_press_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..d9f7ed3dec14a5adee19205344094012a8cabf56 GIT binary patch literal 2839 zcmV+y3+VKTP)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^+zpz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7XQ}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&NklScu&lcUG)Y=iutb3iSkTo_7gUxq(nS pc-ap>4(G47gDM9A009600|1Rt7!f#>wABCr002ovPDHLkV1h!}LuLQ~ literal 0 HcmV?d00001 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=Ea7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g_arrow_down.png new file mode 100644 index 0000000000000000000000000000000000000000..da64f3493e401f577d096234eb5a6d009e5f759e GIT binary patch literal 4081 zcmVX1^@s6pCK4h00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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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$(!D+JH+9jaqj_LOzsU2jks%+#*^Nqt}DG60j z2*t5&+p%ri;oq}snu=88boY#_wu_8$?cyGNRZeTml;Yi)#?0pC(>lj|jlf_(v03m3zuT z0UIPZ$%=Q4C@;L>u+s1%TvhcFLH0VS{ah6%nBp{Y?kiq6LQxa*O65YJ4H8@wJV6x4 jzgN9Hy>O+4?f(G)24OxgusC@*00000NkvXXu0mjfs%yEh 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 zcmV;|4k+=7P)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+?J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HLkV1h2`BX9r! literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_arrow_left.png b/res/common/usr/share/osp/bitmaps/720x1280/00_arrow_left.png new file mode 100644 index 0000000000000000000000000000000000000000..6bdb1645ac2657fd39fe0922b5cb4303de5d147f GIT binary patch literal 3183 zcmV-#43P7QP)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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2zdX3SWv9u`%{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} z0004?Nkl1woswP+pN`XC$%bG1T(CqxMiQj^B{Y(sdEJaeGrd>%)KX0pdg?T@gT@Ldghf1 z0IG<)LB@ILCi@Ij7Po@v%k1GURLjblDa%J*XU?*4wXe54{1W(~)fVzFnZhwHw-wL= zfg+81ZZTc~)Qy&vfiJnfzrZ}Olj_U0lF7i!HuV)dG~6ZsZ(uIFJ^_CA+9s6Ve^|XW bpnn4ZW5-!DXN=e~00000NkvXXu0mjf!C~bK literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_badge_bg.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_badge_bg.#.png new file mode 100644 index 0000000000000000000000000000000000000000..145a9569f2308765cb2958cc7de7b82e69da5220 GIT binary patch literal 1612 zcmeAS@N?(olHy`uVBq!ia0vp^79h;Q1|(OsS<3+_$r9IylHmNblJdl&R0hYC{G?O` z&)mfH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zS^^(wSg#gibZZbysJQm9^vVTRCh4WwrvJAyFf){>3o1%In$`&_-#uOZT-G@yGywoq C$xyKX literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_button_01.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_button_01.#.png new file mode 100644 index 0000000000000000000000000000000000000000..138d2711324626d3be9fcd1ca1ceda933f139107 GIT binary patch literal 1218 zcmbVMeQ4Zd7|*DbqjY{u1UIZ?nONO=N#5j=yM*3mzHS%Ub;sS!6^b8e^0pUy`Dl`Q z=}qWRs|+m+|L_ZS6E-HYsmK(^HYS~aSSLCh%pv%N2r6>}MX}-^zG?5Of0X@UNb-K< z`Tc&+^SsZKedVF;YkM~IU>LSmFRB$Z_Mzv_R5yC($o&Qy)<@cKRQ1N9rV&6)vb<4< z>y9xFE6}i}Cl}x#hINhEwc%*Ev_mvKhcpr!GIo4~#<0O{v2U0YFv3USxb5bNt0&J8 zxNYT$-CT(-`3kJt#Z~~Tt)ZIPnlJ^6*tQiPj73D?z{tR3r{RWToF|reMKn*gDFRt{WyK4(2hR7RnXJDg4F&e68PC3wxbTv<)FQjE#A^=i`p(QrQD4NCqAm>z0W3vLA z11g)zC>@T~u$-)BBsp79X+;J=V{%$S$SDF3w1OsaY_@~d-7qp-6LxfMq}#@7*TjlS z0FB5CYM$5VR6x1zMP69|0$Nv7OKExx>EXRvC=%yMI95M z*4T0B+rLm-{i>@{E&lTI3;FBk>E2oMiI)^VmD_m(HnQjF?T5S8rPpQc=ia&X$mF5a zjmo{fkN2HET=|=udG^4Xn@U62-UBJ&x3hQ9f%N{|qBN*%sVG0|)j!{AlwLma-Km9# z?LE_%i(OAr-(37)@oYDHd~@oV4f;jp`#)YSJ~hAnM1S7}_So!|@+(_kT>Rnfb07A0 z4-7OH4qgg3{y1~0I=i{{TF};DMW;ZcX-I+4AT|zX(V7IiDZjZwvUmvUd%3 XpZf{@#d&#G@>kKdA@xo9p~wCKOX8NN literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_button_01_bg.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_button_01_bg.#.png new file mode 100644 index 0000000000000000000000000000000000000000..138d2711324626d3be9fcd1ca1ceda933f139107 GIT binary patch literal 1218 zcmbVMeQ4Zd7|*DbqjY{u1UIZ?nONO=N#5j=yM*3mzHS%Ub;sS!6^b8e^0pUy`Dl`Q z=}qWRs|+m+|L_ZS6E-HYsmK(^HYS~aSSLCh%pv%N2r6>}MX}-^zG?5Of0X@UNb-K< z`Tc&+^SsZKedVF;YkM~IU>LSmFRB$Z_Mzv_R5yC($o&Qy)<@cKRQ1N9rV&6)vb<4< z>y9xFE6}i}Cl}x#hINhEwc%*Ev_mvKhcpr!GIo4~#<0O{v2U0YFv3USxb5bNt0&J8 zxNYT$-CT(-`3kJt#Z~~Tt)ZIPnlJ^6*tQiPj73D?z{tR3r{RWToF|reMKn*gDFRt{WyK4(2hR7RnXJDg4F&e68PC3wxbTv<)FQjE#A^=i`p(QrQD4NCqAm>z0W3vLA z11g)zC>@T~u$-)BBsp79X+;J=V{%$S$SDF3w1OsaY_@~d-7qp-6LxfMq}#@7*TjlS z0FB5CYM$5VR6x1zMP69|0$Nv7OKExx>EXRvC=%yMI95M z*4T0B+rLm-{i>@{E&lTI3;FBk>E2oMiI)^VmD_m(HnQjF?T5S8rPpQc=ia&X$mF5a zjmo{fkN2HET=|=udG^4Xn@U62-UBJ&x3hQ9f%N{|qBN*%sVG0|)j!{AlwLma-Km9# z?LE_%i(OAr-(37)@oYDHd~@oV4f;jp`#)YSJ~hAnM1S7}_So!|@+(_kT>Rnfb07A0 z4-7OH4qgg3{y1~0I=i{{TF};DMW;ZcX-I+4AT|zX(V7IiDZjZwvUmvUd%3 XpZf{@#d&#G@>kKdA@xo9p~wCKOX8NN literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_button_01_focus.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_button_01_focus.#.png new file mode 100644 index 0000000000000000000000000000000000000000..1d62b74673587532b7b19a86a1f9c1c7141962f8 GIT binary patch literal 1268 zcmbVMZD<>196v1;H<(nR1qb5oCf%y$-g8OLo?Uu(>EcWmlVD06x@+!9a&7O$yNkJo z)wtRXS4x@4x_uJG4OF(yi5rv^mpP|YVa^Q%ry>lLd>D?_4~jDIxi+bODEr{?+&ypq z-|zo^hm!q$n>KFVh#<(O_)aMW=SSe%dH;Rz8^#YSaC+F42i&xocgu@70W_{F z1&{)YI`;A+=thv1yp|bo2NKWnIa9|KUk3Md3!)LEyT`MX+z4>dAyCi^0lR(v0)}d; zfMtUTGGU3JsO_xSAYJLtG<*jdpuHB+!AYpq@TzIJ_rdE4(~h`^N-^u86oJ z0=8<@Kq85XrVY>_&IEEKMWGyrQ*4mqs3%dHq-cVKg9}hBALMvCgf<=wYO~cmpORt? zU2rF0Mc1`>f+&~Ec$vXXyFgHpNW|x$=>U`nIAeyZcmc!N+GLP`le0C;)l38R8I>Wk z(t+W|B>{ssxT>iAPZi z(FTfZ+8NUvZB{_CXu76TG%Zw2bLjT0W~gS_>GIRF>a7H9?G>QLY*R;9;>&C6=x3nS zWRT{>UWxSmj#4bw8zLhTBQbP1LSYT8`hQ|ZKw}8MIQ~;C%_CTW{&KDK;byIQfB`$k zhOIF^cxnzo?s+UOMKj)wTgP@iFhRB*EKI+7;K$li^UjGZGPC&E=Y2O5d$){!p>@%h zv)4LG-*#57&0g8p^~qun`r!UuqSXEdzQkB&eRI9#0GXU@eWGyW8SBK6Wef!mNWO?D4dG?1xXYQnD+Y9GU9{cn) zUg$`w?Wxw0Z$1>FXBX4;g?z`Jugj+|P4`%T4!`9rUBCH4a$y6BwC(?Ly!F?g1O9&~ MF851wy?ZDA0e`Kx8UO$Q literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_button_expand_closed.png b/res/common/usr/share/osp/bitmaps/720x1280/00_button_expand_closed.png new file mode 100644 index 0000000000000000000000000000000000000000..ce8a799973c85cc4c1db9158852d4a844cfab5c8 GIT binary patch literal 1363 zcmeAS@N?(olHy`uVBq!ia0vp^x**KK1|+Sd9?b$$k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+n3Xa^B1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxSU1_g&``n5OwZ87 z)XdCKN5ROz&`93^h|F{iO{`4Ktc=VRpg;*|TTx1yRgjAt)Gi>;Rw<*Tq`*pFzr4I$ zuiRKKzbIYb(9+TpWQLKEE>MMTab;dfVufyAu`f(~1RD^r68eAMwS&*t9 zlvv ztM~P_^2{qPNz6-5^>ndS0-B(gnVDi`=IUhXv4~Pj*wm=R%;iu*SQ+p9GS;(mav!b#xiZTl~ z_{wxSIJtcKR{uTD>($-j`+NPXxSpT#Z~1Qj{7;3={oPVricO`_(g&sVrln=V(95e6 z`I_wn*xottvCMl?!XNy9-}{+$%6+j-Xo;4XOd~T+1+rLF< z{qhy-PV-56Qo3|8 zcH!;`FY4}VPE*;tM*q?Kt<3MfKIi_Bx6f|#j_MEV3*kZ9b8R{UGXsB@te^gd!*QTu N&ePS;Wt~$(699NA_QU`H literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_button_expand_opened.png b/res/common/usr/share/osp/bitmaps/720x1280/00_button_expand_opened.png new file mode 100644 index 0000000000000000000000000000000000000000..bd30cb6d83b43c88835aa9348d5279e7392cb885 GIT binary patch literal 1307 zcmeAS@N?(olHy`uVBq!ia0vp^x**KK1|+Sd9?b$$k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+n3Xa^B1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxSU1_g&``n5OwZ87 z)XdCKN5ROz&`93^h|F{iO{`4Ktc=VRpg;*|TTx1yRgjAt)Gi>;Rw<*Tq`*pFzr4I$ zuiRKKzbIYb(9+TpWQLKEE>MMTab;dfVufyAu`f(~1RD^r68eAMwS&*t9 zlvv ztM~P_^2{qPNz6-5^>ndS0-B(gnVDi`X6kHaXl!iYYGhzx=wfMP z>1JsF)9aF-T$-DjR|3v4~Pj*wm=R%;iu*SQ+p9GS-YD#Z)ad&?DuqW45_&F zX1byOAqSD;_g^k}k>n&5_SoTuWXT6hiZ+k1l$zx1VqC|GmF;_wLqmX-UpjFKF>y;u-})|95TaI;vcA>~hMt z9b4`i&g-22w`qo}ka3;(ec5YgqJK@1IKJeVO_?ht=yG>g1A2qnO1a6RQ>7|W28UrjmC<|7wsH3wyWIhj7q6r@zMJ7oVvnG z4YJ;kCTARxQRI~~KKu5GKJSf9Z;nboimN_;qd!-txy$2 K&t;ucLK6UkoZ9UG literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_button_left.png b/res/common/usr/share/osp/bitmaps/720x1280/00_button_left.png new file mode 100644 index 0000000000000000000000000000000000000000..9ce3c351c6e84dc35aa4cb2db15c27e576b4a218 GIT binary patch literal 3056 zcmV(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+_+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#b&~z!QQV_)*-F8qbBMr2z2ACSdJFkzIZL%S(k4oh+Lbc* zG-p*B6&rQBWjyQ$Cs0_F@qN>)YBG|w%0Bl$EuQS`#Vuo(X;;EIa-h98{X&Zg?fWrh z>=iQ1QtDYSvv>>D=l{}Wk}PL`CbG*CERqZfZRc%A3qnVgN8_gvPLg~UyGD}cVd?** zH7kV*cPW%et>K@FRirkX(VNZZs~588J>>V6*HUkhi%w5V^@mpqm}lV7Tj+Iyrhh0Avch)xTI>zVYR!*{I7#mb%c>o_?Api{ z(J*tbs9SCQPuf0^d2Q3$Le^p;w&$jHZd#(C_KP1}e#c^YwAm68YgvgL*=&!e#pgoS zc;bBfKj+Rpe_v76iN7=KG3K$kz93!b$dFZ;y`IhBLq9Y7o__Jh`<;WI`b22|M6@Nd zHJ|X9a6dLau0PbNO{m;F$~yMGS!3btztclLMt({q#DJT^f0^JN(?VLOOkUeIWa#

#lHQ%xq=6l$6c(BMm9~mHaN*HLG2^J&OG+Q>` z-iPhz&LHOFCUhLn=BB^TJ-*i(T(mbjXLv{%6Fq#Ec96n|xSW!kG7w82yIrWNt){lD z6L7kDQid45Gb~!jarW|Tpq7Ij8hJFaJw+JJ87mRTv;Pov>DysUF-r{; zWJa({?5UXO8pGH@b-db9R0zyt$i z6n{()T%zX3{Ku&Od#mr2fAI6A#hAlb`N)v9xL^Q7*AMsCrcGIlhQ{IksC}R1Tg7Qw zdg7ViAy-<|xY@&Et; literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_button_right.png b/res/common/usr/share/osp/bitmaps/720x1280/00_button_right.png new file mode 100644 index 0000000000000000000000000000000000000000..05d9327f002de167f9277c3866af01eb67f6545f GIT binary patch literal 1212 zcmeAS@N?(olHy`uVBq!ia0vp^x**KK1|+Sd9?b$$k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+n3Xa^B1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQ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Ng2A-`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} z0002VNklI6}l9DH;TsEF09c-^I;$i z$vkEll8J1yM3M|>$@z@s($a(3OsE1;A?^r&GGiP2%bt4|r+BN7Ju+NQJZo9muYdqp z7`Kt2t?_9NdWi(=?c76$?h_B-Ks+^=qoe?8V#`R9Gj>pdCg?g)NtU#EruvKW=A#=a zb#H>M0&OC*o^#M!WaxExS9hI}c9{mlj4R{%M^N3xDaPJ#FxyCy$R~f3=uCju0D&nh Uj9@KwVE_OC07*qoM6N<$f@TPYBme*a literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_category_button_focus.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_category_button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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} z00032Nkl z)Ql}60au_FN;haz_eM-5!4T?rGBd~mU7+JYqg%`#ss2ZL`!?~VdKYLHv@ZJI6m4x4 zyPp#J9c!K_xQ|#*?KJq38L4|3Tn~h;pHG7?n|oV$Ha;3(27)f(Czn>rf03EGjR1ZJ Y0Mt>#CNv@BR{#J207*qoM6N<$f;8!#>;M1& literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_category_panel_bg.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_category_panel_bg.#.png new file mode 100644 index 0000000000000000000000000000000000000000..b625d0629ce5d716d551e99a3ffb59f36438798c GIT binary patch literal 2857 zcmV+^3)b|BP)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 zt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}&`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~NklO literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_category_panel_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_category_panel_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..d08343a69bb2bde461a58b95f15dca1cb5421c1d GIT binary patch literal 2895 zcmV-V3$XNwP)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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~6cK>@5n61vilOmiJrHO% zilKa-ilws2(Gqid1&-!cWN8f*r3Qf!TD=MsIfW#F1ts*L)3U*87dpkzEU%DU`;VCr zI4eSwilHY)=~QY^j^QZCV{noTEEop)dD1epFoVUkSp0s?O4|ty`ad(C zDQ(x5+fb$kwPR(tfy{>~b{2 z=L-~4IZu%yPf@U8Sjy$|WO6xAz~(Dpn4_5Icovom3wT_CRDrM%7={&WsgxXLa!xYL z;m8HDm(d178Bbf*>U#)jBW!-ZY#U zkrUoOzFDbwEn{!}xtb3HcOGyxSF;D!JpbGfnrf*IT^}(Ol3w3>P|^6?^|;&&*WuRZ z>twcl(iv)G*SYF9mVA-(t-XnZS2}!x@#B9RAKE_o()W$i247PMXZq7l`}NdN=oQ`l zgwuEKK;AL$Qd@*`Wk+Z?BT@D>!rMkoUOWkb_ud1<$dSck>p16_VtO=7G zSj7xHvH~jHO>-Ge@(e%FM#=Uyw<54_+)5NKA$2UxHGG$0{bY@^2#hR?C2ec2Vgx znjp!AF8u4XYSehwvj%91aj(mc>%SDUcSd^tmC+X9M0D#VsFy)Vp!VvnQvsbQ9Liqdm9(<;j_^iFCv?uamU#)GG=6AEW&vWhU zWWG>={SibzRgih;x$h_q!H#3BE0+J<*0VOc4_#JnZ4di!#arfg_N8H&HtoTWiw1Q< zlf%o~mYI8g^B3X0Q4^K*OIk+j4xPEd>}WpCpSU5KBAkPqaCy(s<6RxS8UsC2x1K27 zvNxT+r2OQR=Yy>wn(Q58Z>2ZY-K9TV`cT`^jpV=D|Fzds-#xnQ?L4FFy(7Q;T=h7} zV5Q&xAf;~6^4H)0@wM>NiYvR`ID0Dga!yaU`f)%MaE$&{@PnFTZ~FhWN<|j(jci@@ Fe*prb3poG) literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_circle_button_focus.png b/res/common/usr/share/osp/bitmaps/720x1280/00_circle_button_focus.png new file mode 100644 index 0000000000000000000000000000000000000000..1c3ab64413e425cce203df13554ab7946fae969c GIT binary patch literal 2267 zcmbVOX;c&E8Ve43;_|PAYn2{fMnuifIwANl~r7B zunP91SOKpTD=xJv#j@j?)>H^v9huGv6}L^SsOVzUNG( zG&a)N!P9|4p*TyTU>P|^nV%W9}6GL#8PL{dyNAHh@sax*4Cr_zvY3MDvHr;#JsC;_CSYn5sNZSqtX4Nxis zw3X}_W{gIJW-6l!aWuX#HUTNjMtBNZXb2FjA}t?@A~o5P0LT$T`K!XOBWq41!fa5w_u zK`;r9fOmtadV+-G=*a0D1n6ux{--S zK{QoJ9eCkBT9XDWh^*1~iJyvhw z_N~#6O<0FD2=xZY=p$X?YrVSKO>WD!DYWyn5DUu;!%wU4rfuFSE&IJ>W@%noUTKwE zH0H*loOF2*S3`q{gP+UKPkg7QHs5`Ec7D9* z*A1;{vzC7La6ws!B~{U*|MHy8(OqwdQ+2lnPt@w4o{?GXu2HwRj1KDRkL_sNPvLie zJtzvX{l~c*)~tT3MX83)MWMVq2p2lObLyu?6^2JZD81s_MUj1hQR0unYkn771+ z>ScE$+o_^n5N?LmmzO<_4%WhATo_xH%@h~+BYIv?D)!ip7n|G-?U*b4&2xEJ3jKb zvuV@e?Yq0$&VALTaB8hb!@O^YWYi?y6>&f3{2cGG?x!bShB=jU*PT7)ae3^1N=WHt z@mY4KEHLep1{QNsX#KdXJoP!2t8{AFs^33cdCXJz86(4<|KmKr2m9_y;}-7{(T^M2 z>CU$rm-d(PJr;77K}X_UqmN(MaXt!ie-@GazkAL0r9fw4q9N* zlzqObzEit1v!Mi(8JdDQV}kEUNdEHYXdRXymO zlpzW=yNNY97E`GA6IG;-D4oaWjNDrAH3Zb-zjaC>-K>3;#A--P%8 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_color_picker_brightness.png b/res/common/usr/share/osp/bitmaps/720x1280/00_color_picker_brightness.png new file mode 100644 index 0000000000000000000000000000000000000000..507c217bdbe73f4679a670406bfb26133b568660 GIT binary patch literal 3168 zcmc(h={ppB7sr1h`cp1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{|ZYYkpsUU%ZSi!ft~a328{H~b*mw+PyY_3ei*3$ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_color_picker_color.png b/res/common/usr/share/osp/bitmaps/720x1280/00_color_picker_color.png new file mode 100644 index 0000000000000000000000000000000000000000..b14670b779d00e33de997dd6a2c3f52403670489 GIT binary patch literal 3272 zcmc(h_ct7Rx5mFh^d2P$M{m(FSbk4HPDlrlg== zvRX*czM!6^Sm%3}68k>!#nAam04Qs(u$!L^aqTT4eoqF7Xl>UELvUtHb0J{1CWGG(oh1NX+BQoRsxY>2b$|Z zf_hGZ3r@ddOo?IvS`jJG5}>6=f=Iz2CByHz0d^+8NlLc+@k_!C4r2gji&*qYXUetBTYS^qy;h-iE(0p zED|^m2nd9M=edAI@6bm5$L$)%E%B>Q<<_fX1yyuo>?tJ!C~Rz`ctr7r?6+BzT&}s~ zX-Rd3=W@u!C@_3G8Udg%o%QP4ql+*+eGMM3l!BpmlHB=BPULrWUAx>EtMu0bU?n(u z{8B=?ffJ=hj`F>HC$vxIb)Tm2@oBPWJ%d&wDBPa6Ir9JaH@Zb>*txll_4Qe!9;m&` zkWJJjvdal)bMf$3wECaZlW!fXf-!QAG5Ta@-?~PQO^R=gy`p;Vy0Dq5|EGzD_=kIv zzsJxOix6j7vtSNL(aC#xBv;Iz1brpeD>OlLUtN|sCxt94g1QF~lE`$)GDkPkpT;7L zh+y36DFBD9ew|-MDM?XYu`6St!~@L>{X!vt@-%!E0Kk16K`Ho9gJwS^06K*+;&s|w z$DKDNaOAf-uP=1c{Bc%#4i)U_f-*v>-BGs!oyDr2K}F+7>$t_8rN3%%E8r}=;xqi| zrMj$}={5Wre!EZ>bc(jcP?2d5P~LFin@=QheSr{2p=8gEJLBs#AY)DzBMd9V<;JOj4qB!i7XV#>%yaLfG|Or%^H;P-V#(`nx|5xB7JVrCBmOkX8cLG zh3Qw%O;5QaE|wL+nG{p)pw&ef%UX+svKtDI^HfG-*$j<~tKVf#a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ZxqyR!;OyMgWmJo&n7dFhhs0%ndqo!sb34u zgm;+8EjRq~0|vi?7RKO}30-3HmRg${-r=x0_^_U^al@wBCa+f2$#*AsNBuHm(!9U* zO>15a*1-q6AJN_z>3O=%RiKPtJZ=yF!A6{(Dp1i_Y(I+dJMBF^S!P>|4ive-54X;R zitJannYTF|Ywc;z!4?yyH0>`JW)BvgKEQ<*9*r;PpOVMLj$Njoq%y#+r{<;($J52{ z7TkfTsH|!RUTpsPYG#*zbx{f6e2QN~`V$ks z_Uj)rX-=nc+xt|#N$st09G)R``s|*#toZKH6C7UMBXjfiVQiA^jrM;$gO*r?};a`Jxm57)7+f_ zoBkbr=yO3Di`cjLm|7jPz%^8@y}*TgV#?s~w!TOrAxQPkhmBtoXF?BY-LSD2f0;P% zmbNQPenyY9*9N$A`WzhKB!3VfAychuON(`nw|o{mH~&65`SIyTOMB{K%OsvFcBX?X zMAm7wLm%L%blAavVRQuli#-7EX#OQp>i^(v0au{DU;8iruj^U`J)Pj0=AJ1}{}L9a z;iyg`!Y{HUtsz)Us1*Q_{~UOLJA>?3-XIc5L4wO^dF00TD_a0ysB5NE19g7(KOs{L A+5i9m literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_color_picker_color_h.png b/res/common/usr/share/osp/bitmaps/720x1280/00_color_picker_color_h.png new file mode 100644 index 0000000000000000000000000000000000000000..e860aa1162e5604cf12a3a5f66a7bfdd0a18e67a GIT binary patch literal 3370 zcmd5;)ms$$7X2Yemvo5IC7seRL#MzXEzJ<(P&$$hBJBYYX$C>0LqZ0JE@=h<$swdf z-~dO$L8;4mzV{Ef4{O)A_rqG>epm_jO!a6eIVb@DGzR+G764ppzp6FJNv|U5(J;?d zqVU(Z4FZ6Q@m~;uoIExFD9yZ~(0lj15W$EbFN8n00TjyZABgbue&_+f(|NQd9A>%2 zqDELcf*8f4-WVY)n8~>-| zl(S^(JnxdDi{cZ9PFKQ;e5YFp-$ySRXVf>V4$%!`WS!*H8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/usr/share/osp/bitmaps/720x1280/00_color_picker_custom_color.png b/res/common/usr/share/osp/bitmaps/720x1280/00_color_picker_custom_color.png new file mode 100644 index 0000000000000000000000000000000000000000..1eccb41569b914a49f759473a2234041a72fa684 GIT binary patch literal 3022 zcmc(h_d6B-`^R4*du5N5y~43&bB;a3k%N>G$4ExXijF-a$?nL=9vL}0MjazWj*xkb z>=1q4Mn@UvqxbjwKYXt1ao^ATy6*dj`+oj(C*80xWT54t1pqJ@8|hgCKsJ9~Yg1F6 z=dwN)n{%P@H?n^K03GY!AOra?xd5QG^n$@|-0<`Z@_XRv=g)5pgYo+Z`gwTWa|a+~ z7Hxxs+iY@Z5*H4jrirK*rheA!)cn@a6ck&AsH6Z5vq_>r@eI3F*Cl;@3f_UDMDnyW zR4Tib6n!%7G}Wp=Nm@*4V)EeeQh2G)WCwA5_^f40Yom4_-8@2tqo&U`Qm|4&(N{sQ zT>2K%-`lseDx(ucE9?)LshjT#JUA6114oe>8rKAIRPO;<$T%G}z?m1|WG^R>n6{vK zx5!YjWVoP=>!#EwHlP!h1}z6V24pC7uBZ(tq5#fAZmuifhBR;%d$K+bQ0Sw)a5CWd zLV%sDC$eU2TMH%ep*Y2N&;2G=jc;z$<;~nX(50oT9SJ#!ZwUHWs9RQYs zB1g}pAk91|bxM@)S&7Ilh39R$qKCv3k0vIa7ErV~Yq#(J*BkxfXV{sUwbj*WlU}H! z%b;Dv8M6Bh&hGTy??{ak;^DXV%feCePEm#wN8h?XADES09(hg^>pHidZg|p4M>^pf z7wk25#UdoxR;*Y8()99E_vOn3lc3KfK8lQy?k+D%9g}Mjdg0cutkf!Rbd*JOlH8Z~EL+>t<+5d}+%F#o4SHY-8X z3?(Bu>tr~;tr6dzX5a8?Q^zWV#JC3f9us^zk&@ ztR-(xI&>Rp45na-(#O##Qv^f#U9RXFAj73HKWFn&KLzd#=2$ zZE3#sd}T5Gl2W<@w5}Lq{l+Sxl2!3xzUpuchp}l{T}jqBk0+-m(d*6kptei%SywD_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(}+h9~mfiiXUp9 z2^QO}>#*#&bD*=MI|G|fn9z1So16YQ_rx0)T(mzrXGo-siy1k~I80}PT};nQABty) z-!8narK-BD9eBEVQUM#eJ0e=hc~){ZRL{u)i9DLvp2Cmjjuz+aIr_h~ziPbz literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_color_picker_custom_color_h.png b/res/common/usr/share/osp/bitmaps/720x1280/00_color_picker_custom_color_h.png new file mode 100644 index 0000000000000000000000000000000000000000..16124170d45d20ab006df098205d8e1b9045b48b GIT binary patch literal 3085 zcmaKuXHXN^9>p($^e#m}TzV4-9qEwJt3WUTR5}3>DWWvN(CdPTbc3MMivki1&Cr_! z0jZ%#7Z7|>1f}G$Z)Rt9c6Q%~d(Z#F@80>J^XVj9GdEzM<)#GyFc=x?S^;pb^=#In zraZeT_XhaSgvQs<_8tIq7ydY8Aotlt0B9{dVX$l0JbVIt?s@q5@)^Nke7^oZ?w)tt z00^4KSfk+9>l_*fb9+#ec=S^fA1iihJ}YPvnk`L4f}e)jIG(?7irun}MNf}{r?()U zJS7F4%x)=3pGZ4Nwaot_CF*5-V*k-X=u5Bh=7ZJ2)A|X`waQ&g-4GR?nm*G|-ck`w zUk1I*@;R!fvwLA#T04SP$QLkE*SYfFI}s!UhvDk#R|N1>t$-|Ol#UwU&GPUvm*PlF z8_=8^Wawxzd_dY&6KXUY&<;s~76Wa4GBhSz#2OS(0LK9r=Ou7W3OI^BS{(&w%wbL_ z8L)rK&rVj52KX+x#p?nOHBdQpJy8!JWdNJINv8^!lmaqF2zNv9rUBpy%yhMYnjXkl z#>a>QicsL#D<~KQqH_S7{tiO@`;}_uHHovNa%$CaLMnO@_S8~-R0xFhWif&g=M^?3 zr*lrZ+S2X8Ib3oP3QV7OKLAjW#(w5@_aunGSWO@(rC=Eyq&D7Dk_4QcmrhrPDtxs8 zSO^FoK9z*jaii5J(cY&ogtsX?ZqXIoKS*+~Wzwz(1?$s@UEe>l(JOq6o0?i#UY<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^kyK1*H0W6_aUkmKk*--%9!9f_ zN#h3fy(BtKu+~*nLBP_~|8=WCRpwsr);T>3q#3nc=Cmqba_L_3o}G}5a#E+N4Am2t zFj^GsCm2T>pb#HH0)U^7bb;e_HHHH$U=p#q&V57wDH_eC5)(vrYBSRE80DPldzJZb zLd9)>oEz0U+PVtpZF}^(_j0nWOQ81~t>VYXMKvE#OoNjYbCT`6kqadCx*LG1zQ^qe zzG1O)v943hr<<&()*b1_MvrLHoU7c-{jZ>xh2uS;q|JsWXEvKf=1f`+k)=YoYN1gf z4|-0u$v9Q2S58MF@*S?ObSKC_*?=kHywSZ?poY#1>0U+0`gE?nP1@?#my@XFG+naIb~kx?y0byy(<#mjY!a472eg3S^hEN5AGw7i2WMl3Z@I zMA4Tz3!;-a)fm&rEEkL0J)7>F=d^H%Aj3B4#cA6}jgP8BBsH2_iP01^B%K#>Mn`Ig z6S6SvX?i;(Q&whHguGarUVai-bou^6J&gHTpbNU z4P^q#k*4@hb+c(0v0KF?N9dnWvnnEX`-KuCt?G>(mV~er1YDlxdSZ>9QJ1+D!S-g>J)E0v%3NQV!AO>2DRKM%^^+>>zatZ|SOH?39LlvGf6p128DT{JoDl$_W zjYQRIUX`JC1P|!B_5^Bfnsz&)AjF}NadUtyDWg)+4FMoz&80Cv(d>Cb%Rj?;#d0pU z??~4nX){UB>kHVu$KN~2eWbM?VU058jA%=P{nyjWe>h&ZtiVkUpiRDOVH6c2R_J{a zvY_qC=sC@Xb_{cjNive#Ny=?4NcDSZ#_zVFcmisQsOfacdFl*))8O3&K@>Q-YE>N_ zN}bIn8wSIC_1^&i XdFi(-738?#00000NkvXXu0mjf&Nd7w literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_color_picker_saturation_h.png b/res/common/usr/share/osp/bitmaps/720x1280/00_color_picker_saturation_h.png new file mode 100644 index 0000000000000000000000000000000000000000..87a8a724d6bef308362d2f0255204c5ad04bb550 GIT binary patch literal 10641 zcmX|mWmHw)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Im8PG^qp%B`YDduEw8VCG&T$qEfv8>L^oi`vats+$;VH*5@PVfi% literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_contacts_button_bg.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_contacts_button_bg.#.png new file mode 100644 index 0000000000000000000000000000000000000000..8d4e327822a8db28173e2748a767b2b84d25d61e GIT binary patch literal 1199 zcmbVMZ)n_P7*Ac@^t9V_{+WUhQkcSa`PWM>i9Od`l3R~?^>#ho4Rl?ayzPZ+@@C0f zFYSbJ8)8+&4+Yt9ACwN+ut@0`G7J0X5ER^p?ZZSA{ZO>vSe1#ceh}ZZchwJN9}Fb# zzu)iqJF(Mg`dB}{CUf9{Ppo7o~93MH* zBV&u^ARI**3VXT|g6kIwtA@R>nJAnxCNh17qglpvK=5UI-j~Ddva{tx*?vD6eNId_voft?&k$H3Tl*B?+p*bDYHT ztf7fHLzPluPS;yD*5V49Bynm^7NwlPaRx7U8N8~AY0c2pY%a^UxOp!`re}ecu7h=( zTLZ8(71)3xGI-U*dVSGI+(dr;@UIlh8fG)Y5U&UEN zUrlAZBw5Vncu|Vu&Z?@a8@wh;T1plLgKBc^|C2KYJHy1q@tmup7pu(! zJlrt>ZjHCw2X5iE`XR5Y<>=d+?+qj_vk!i;<+sg8vzKn)nZN&D^_!>K7iTvdWR70i zxcU0w&X>Sve|&xNwUOPE1M9y3{0+T*cVpuGL~YOfkFP9lyLokXdQ0uVo`==SK5zc# z<7W>k$9@WwnU9Vw8Iy}0*RS^c()V)PWN~}LZQF5rwCDFJ>bs?>#_YmFGwR{7o?_?L zt?=C7GsQ-t{J}ks-r03=;nZJ=>Gx0kT55}4UsyWvDL4J$#T(KTIJqyVUAWeG=Y0B1 z=$y;HJALbc;^Vc#SG|9}_}Jx|d;7|f8-Lq#`}d!|1}8SPttV!lK2+^_YoihWLh?qR K{z>-0k$(Un9hUY0 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_contacts_button_focus.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_contacts_button_focus.#.png new file mode 100644 index 0000000000000000000000000000000000000000..8d6cd8a912993e08a1c693f6935d3de2d434a99a GIT binary patch literal 3059 zcmVv$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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C+@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} z0003VNkl1OWPVw3}{Mw3x@u-un01L3O z0VUTnz|?+4NuqSbzmsfCX59eFN*x|24=fsHHhIz>aMp zDqt@uju4L-uMzP73F0RUDE#cY`#Kjr`c002ovPDHLkV1gph BsbByA literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_date_picker_dot.png b/res/common/usr/share/osp/bitmaps/720x1280/00_date_picker_dot.png new file mode 100644 index 0000000000000000000000000000000000000000..7624a6c1ca6742291d68f6def1f3508071c94884 GIT binary patch literal 2839 zcmV+y3+VKTP)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>QdQ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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&NklBNBkQ_f6*Q3d7 pG?|Sm991}~5H|n-009600|2E~35~sq`S1V$002ovPDHLkV1g4cMF9W+ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_edit_field_clear.png b/res/common/usr/share/osp/bitmaps/720x1280/00_edit_field_clear.png new file mode 100644 index 0000000000000000000000000000000000000000..3e1bc2aff7ca122e5d00bf1d9a43954711140961 GIT binary patch literal 3249 zcmV;i3{LZjP)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+_+BaR3cnT7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#lGOPjEAEkME+70he-~LdwaSoa1p}eaX{c;;BjE!AmBF8OUGQo3?A9-Ic=cV9wMCyd>sn9 z^c0%gz>lFMFVi--8@2s%$yG|_;Un-C3c3VV9#e?jY2Xr8J^oa}^nliEehpezhA|Y0 zQ0IGTo5Iu|;s@t*x&`n_b+~>nKvP`MopcOp0C@ jaq%;nVwri8I{h;MDpzf_ah!pH00000NkvXXu0mjf-op`Z literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_edit_field_focus.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_edit_field_focus.#.png new file mode 100644 index 0000000000000000000000000000000000000000..36ce698ac7950e296d9fc0f4ca608ac69358f65d GIT binary patch literal 3029 zcmV;`3o7)9P)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{jYb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+_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} z00031NklA&X`+UGO3PC`}+j zHL`?_Jy`#HMz*p$D^+W2LZts~$r1DiS*-iGKMaCd9s2ZqBfF=wWjsDL&_ zC!wkbyzGJzb1d``e>IOrqE7WTu^~$6gkBY+~7l*~=%bAQd#vjJ*4Ujg~G{!}r9mHWlw&-^N XzbEJ>uCxrv00000NkvXXu0mjf=`W%M literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_edit_field_line_round_bg_01.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_edit_field_line_round_bg_01.#.png new file mode 100644 index 0000000000000000000000000000000000000000..2e75e09f5e8e1c6baee89f298271d331794ed6c6 GIT binary patch literal 3150 zcmV-U46*ZxP)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!B1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|&b7 z$PJ3Uy9-bvaIazbof{N;U(+V)`M#GM6nlGVppI=1!XOAXLV_T`wg(~5Spn&W=>o0c z(82TkwGhwq84exdbh}v<(Sch{(`u@!AW0Gcv)K&S_2w11)D6>GTal&GUL{Hk@Di8y odbzY~LI2Ut@(1=;&ExYk0Ad!OOz>% literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_edit_field_no_line_square_bg.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_edit_field_no_line_square_bg.#.png new file mode 100755 index 0000000000000000000000000000000000000000..c21d62e8425b26a9dcf8097889ec8de6a0a0e8dc GIT binary patch literal 2855 zcmV+?3)u9DP)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+mJ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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} z00028NklG#razc)f{M3wz6|t%Bs2nm z0I0T})m{BVq5PfN6H6s| x{|cICx$8dmywvR;wW3&Sv7ulB009600|2|dM9dJ0UG4w?002ovPDHLkV1gzDe6|1p literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_edit_group_bg_bottom.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_edit_group_bg_bottom.#.png new file mode 100644 index 0000000000000000000000000000000000000000..17bdb807e17b661dd2178c962dd5d35b83d3caa2 GIT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bIW6s}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} z0001uNkl};k5L&> zfPlmLjcPQqfZzZpv57CS-$>~D9Zj5m!*CYY2j;Yja}4`TYI|^r+cCK_tR;A1ErKlx zU`qt+31B^fmGS6Q%v6|7(vV8^#OQSk-<0RR6308=ktNOGCT@c;k- M07*qoM6N<$g2)hP0ssI2 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_effect_tab_text_dim_left.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_effect_tab_text_dim_left.#.png new file mode 100644 index 0000000000000000000000000000000000000000..bab5be3e24b81f964f9b31022523394578f39a9c GIT binary patch literal 2888 zcmV-O3%B%%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#fknUxHUxJ0uoB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JvzNHgOZVu 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} z0001SNklC*>FJAoP kNn4V1M*9x{0RR630O$S?G-%1ZUH||907*qoM6N<$f-9L{#Q*>R literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_effect_title_text_dim_left.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_effect_title_text_dim_left.#.png new file mode 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{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} z0001aNklKnZ{bNFEFAIT#fuj&Uc7km;>C*>FJ8QO@#4jc s7cXAC_`gV|U)@q^n=b$W0RR6306ZxzG2-JB82|tP07*qoM6N<$f@`W_zW@LL literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_effect_title_text_dim_right.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_effect_title_text_dim_right.#.png new file mode 100644 index 0000000000000000000000000000000000000000..e5c12c0bcc60143f4afc58a65b1663cc75f09905 GIT binary patch literal 2893 zcmV-T3$pZyP)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;QQA1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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} z0001ZNkl5eC4y6{00000NkvXXu0mjfpK)Or literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_fast_scroll_handler.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_fast_scroll_handler.#.png new file mode 100644 index 0000000000000000000000000000000000000000..c8248b3fe241154a8a0aee88972def41bd367d23 GIT binary patch literal 3820 zcmVKLZ*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;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8Au4_Y~P^VbEHaU)4DijLYOeS-F zbnMjWk4BFD?z(PO!~7@VbF(^c4p-)OGN(>AH6LJ(@q| zF98J&D+^2;(3Am=cJnQ##!je2GUe)rl`$2ap|+v7f%(NwKg|lj)d9nR=4fa|9c|M( zRhCU?bAy$trAo_MP-;MNRIX>g7PRWX278xC3_I5PtM^k_?s`_F4!{k8M}6P)PklPwkq zIFW!82{-{K5^y2`_kUG8EclbUC}5qOjwb6nA0000l+0C literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_fast_scroll_popup_bg.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_fast_scroll_popup_bg.#.png new file mode 100644 index 0000000000000000000000000000000000000000..d124431ccf7b597008de7ef6412254f9b331416e GIT binary patch literal 3031 zcmV;|3n=u7P)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;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!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} z00033Nkl{?p1hv{R zOfdL&nQk+A#bmOKkwnxoGm^Bh{E_(Rm0`q7c;ST?UU=bO{>NS9FdSegVPKD_nml=z z+i~>(>4@jvI-g37J&}GIfE%9&!P_W2c;Cg$a00LjEaNkXWop@Y@g;yoAif4MPsMw? z%_O*i%+xA{7hd=u#GBb@#|K&DTt#Igyzs*RC;lGnsUz{1VEi=_zX`^#U8ld89_+?C zJ!p4M@JO)g3BEOXiY{~5^gyjrcmTjOVLtNqaSyRl->I4xUU=buq*Z>jupwGg#>5u* Z7yt_8V;>J$s=ELH002ovPDHLkV1mv(r7Zve literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_fast_scroll_popup_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_fast_scroll_popup_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..6d503d5bca603900d82d84a87a92a328b449dd10 GIT binary patch literal 3646 zcmV-E4#Dw>P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ft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Gp;=B?CSp#K ztk%@7N7z}1{<0on@4T>!H%+0-BnnSB-yCR~gC~98zMgK`CajOY75Wi+bdWq!Z=0}q j!a+;#6TPI~r};MkIUZ#h=Z~BM00000NkvXXu0mjf&qt(0 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_groupedlist_bg_press.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_groupedlist_bg_press.#.png new file mode 100644 index 0000000000000000000000000000000000000000..0fc1eb92ec3ed11c8fff464d6863fc5db5529fb0 GIT binary patch literal 3143 zcmV-N47l@&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 zsJ6IeNwV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6_3c^4XMBk9Cf{+XCEpi3VY$+B23$?KdgiZW5f5Q@2ahl%@^O<=cWh5D( zuVqSaWd$o+AAtuj0WV1na5b}2$)*Pe;08Q%sSv_p`?>?pz{SyajF(sg8(?mkP$&1Yb2+H$ zIoPv^tbiSG0~+827<<$a7GRO4=`zc*V_nzRu}9nj7vKTh?cG?x&a0gmW2Qw>%)T5t ztJztRD^LN?(ELS2%Cc++g8h0pOK7aCHU^WbYE@Nl-=R;JI`vTm@;s0KPQOILpTig2 hj{zNH-*zgW0RS;}+Z<%1FIoTq002ovPDHLkV1jCPE&Kog literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_icon_SIP_close.png b/res/common/usr/share/osp/bitmaps/720x1280/00_icon_SIP_close.png new file mode 100644 index 0000000000000000000000000000000000000000..906a3e718b954d26f0b88e765b12b52c6b5363d4 GIT binary patch literal 1516 zcmeAS@N?(olHy`uVBq!ia0vp^_8`o`1|-Ad1?~eW$r9IylHmNblJdl&R0hYC{G?O` z&)mfH)S%SFl*+=BsWuD@%xRe+5hW46K32*3xq68pHF_1f1wh>l3^w)^1&PVosU-?Y zsp*+{wo31J?^jaDOtDo8H}y5}EpSfF$n>ZxN)4{^3rViZPPR-@vbR&PsjvbXkegbP zs8ErclUHn2VXFi-*9yo63F|8KW+g=7RhMR$W{Yl!|Z$R@KEJl?AE#L8-<0 zrA5iW_()TRX$FQJev3c~fv&OgFUkZ)N@9*nesXDUYF>$_i>(q+MlU5Z#mdyc!obyzzAjrHoZoUh9-_qCWeki7C@b@Mvmr|j!v#l z&Q9hAP9_FsrZBypdBr7(dC93TdozLdLiHNp)obNkl$uzQUlfv`p94z)0U7xv`NbLe z1q#l=W(peNnRzMs<;9wy=z;jwCABECEH%ZgC_h&L9KKeWSnPLpGdFUwbab%*x*p_j zOD991+s(`@%}h<59i4z~hv-cqC(QJLj?o7t4y42a69T3{5EGvCfgE_|NzDW1m?B`- zkW=5E%)r1Tg>h8Lv z`NcCOt0;ksjslJ{A}j~>nieh4i*hNv;PiLFv3dU&hikUhE%BZ0{psD0i(<2;|Etn} zujjeC@Z8MkXxZXI<;qFwAY^W$e>vkxtnPj0MGowD7++jkzJ0=;W0Kz=ev~q?EGQ6O zAZ+tY`ln-im+?zcohjdV`RunuuY4dmfxo*d!8t8+70eunX_Lz1KUN|_Gwc5 zkW{)=yj7iLUDl5Cngz>Fg{Z$?2mFPTTn}{J^~=$FDiYzz zxQ9Ww%y#u{rqii;zmHwoZ>cfQcFsr11ELS)wiJB3Z~Ndx0*@@qrX-O!TD>*aH(2C; zM$P%r)4gTe~DWM4fPz5Mo literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_icon_back.png b/res/common/usr/share/osp/bitmaps/720x1280/00_icon_back.png new file mode 100644 index 0000000000000000000000000000000000000000..eea75e291222e2c1afb87bb20d9fe60445d7cba7 GIT binary patch literal 1736 zcmbVNX;2eq7+yg^h*T7+RutDzQ3rD0F%ferU=RWdj-Z5Oftc)WOcq%PQpIYu2yH#f zkWy>W(WzLatw$S2QV*(7C{{o~ger#!f@o2w2i+i8e>nc=&b#|v@AJIpH@h=3VyTzs zOius+yh4}B)x;R$d?&gQ-`I8DEyVBvrijC$(PS)LV}<~U4o!l%`<(j*6}_ z$)HsIvP?4+of#3M%`|8QI&#QjP=pH!0vN(HAPyT5ix3x+M|g$A+__C7gCi=KK}>$- zRGcajl%Zw_a48J7ki!)+dEn?nCajrt$wIYU zIckeoiOH!LW)jk9>FMdzbQTpgr_dMzfxyYZWKswXiX{WVG&lvZ1dK7rA&b_mH(`1d z0iBGRBs2{ZlL=2>g#epWs@KGbWi(Ml%4oR8L}O6tG#GZqHKJ|7)X;x!yj9y0lVO5r zYRH17nYBbck^{!TMDE^g$f-zpBV1wD6GhP&<)}6dh7c@NE+!KvRGnTY@_4>Jc59ZdvFo z&#P$VkXgSG(kaa-436YisDF!nDT^mivRE93T*7n4EmiV33cj4d63Aszu2euC#p?b~ z&S-=)G-q?X(JW(IL61L3VR#E1zA9?(?qbAHn>V$) z{EFWc*uG?L&F#C^E2;Hqot2+isw%%K=qy%;VoT@P$8o+k*VLTD9&AxPCf#!lNGv;3jO?g8_GEVJEc`lndv_EYKhB)tc3!W4 z9N1<}=rU*fdsD6R+kyEZmn-kMUhs6Apc>mci8 z#MPa&L^nII(&S^m-W^y|9i&ML!h@fO2Rg{Lqiq7 z;5|!~Ye#!0CUkfY7Hqc1|C5E31y~ptg?RLz0w?VG%}&`Mz=fXu;YT_iz?V`;<+kyKzwVenFXX-Z z+w%v!CkdO2Oxg3jd*7e;%>mn{Ru|G!pZ)7v&p$h{Hm&7WQCHT}iY_$p!xfL-l!6^C aE|UQDBjXqKjfaMu|CUfig#3gwG3Q?=-mp^u literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_icon_focus.png b/res/common/usr/share/osp/bitmaps/720x1280/00_icon_focus.png new file mode 100644 index 0000000000000000000000000000000000000000..5e78946709d05c765527726eae93584cea582add GIT binary patch literal 3088 zcmbW3_ahYi1IIreviD3Pvgg^tS$D?S9j7};wEiPx=6SQsxc0svS{5r#H@sP|v!Y5z3ZiGA)582l0T z4*+1|`Y%)f_u?V|jMiRo`1R|aet~`uJpKHIP2q51|NDL(UU%IA2%aL?Vo|nhygCQ7 zdoc5a$miyMHazsgHn5~f?lcJ*5e9a%1d)PC9%L(rkr9nRPksV*N=jrh4^oc#DdPm) zlE|x+nAZtU`;Ob*2Jq;$aR*}i-DMVH$`Snk<=T}`_7tfXl%l-8Mm=BB?I+KIcUW(MF zjr2WxCB8-Dd7CN!?}H?d8aDk8Ab)KNz3cy<8>50}q{+$UrKJh84w!>WA3FRD+ve1Q zKE3-p0(x?=|E+mJEK1oi%7o_dTifS7i^9u;=?qU?r&m%PXtGG%UqHj6WFqF0KiUz zU+Y&Xdg@5enEAn=^KHFTlYDUy>0z240KjcSF$Gj#tzI`h0EYQdGSvnGd#xAcT4*n~ zUYKrWI&oHi0u$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;u)6mAUjufT65eF-9j+kp6vmJ?!8Ytw$dLL_!UX)5jF8n1LdG&Q{YP4( zT8LPuN}=2`>4{|NvqlRRiy6FD9xv{pu&=U?R+CapdfKx9Seb}r1`)fCUGaF>U*R5G zbJlq;sSYBPN!ROB`>f)Ey*wikR`eZpQ)*m>t_JIl_V_fA*r%CQo+mr7`MI`_@=W8! z_RI54&Nj~ZbYfwgIa*#2v(i-Ityu#N2%#`8@?4OOyFpt4{rHq9<2!0yzKPDRifEDu zwe*R)-P#x3`hm)4gUOC@IW~M_dVJH-8UwMP``~gEM-b5ENqkzxP2tPtc|0LC9lR_M z@7MP!cl!DJ(((?{ok5RbkF}Lq`8)^Ktg`HtY}R`$lT+_m=5D;--2Y`nfn*OzQ5s^1 zaMJ5f(2tGo#l7SKZ9UW*)E?>xrM@*h^TB2O@ZQjtKv?51)gPl2hsJ|b-QH%39hIHs zsK==LvFUN`fnHT&+1g>&v9DvLm2bdiH}x>}DV-=Qah&vZRB%`aWs^E4yJ5oGeWm$~ zupK1NqRwLX&x@`FQGdgbrL_ZwxdR~OuOmXq&#;5zgyW5l|<;Y9n$7nZz)}ET|&*h!756( z_ih|-wgycH32wihW3yg*B>Y(F-1GOlecLa^#~J(?8Rs-57RkDtMcL+(GyS!n_-ma$?Snx-%I=xjU72Ton=HvUv38_( zh3oR|1>1Q0-FccpNx3UHL`u_It1z{Q|I5Ld|s{lucK1ufKBapMX$V5p`}-7 zJ-o*-e?T;w?%}tX|F6#5A-Jtx;lfUjk?DtrL(h+c)fEqES#b|5at6uCoQF@&!YM{}rtAPi{Y!U4Kjs%6ni5;bLo|f0P4LBP+uy Im~-_10Llc(jsO4v literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_icon_jump.png b/res/common/usr/share/osp/bitmaps/720x1280/00_icon_jump.png new file mode 100644 index 0000000000000000000000000000000000000000..fe9b4b05207b1a0280620d863a2937cdb1aa92ca GIT binary patch literal 3073 zcmV+c4F2KLZ*U+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HOYTObFX@Kf`Esl5o4tamH4GB7aKc)B=-RNQ)V z%hBtwgUGRuom+M%t*qjU-C6eDYo&RBjl=l|sV!Z*3g6$FYU!S{V8^P7AEj@_E;Lq| z_-x|;1J$boo|$_-d&+xu&-ZofA0PNy(ZJ3xXH)Uv!NF#B{(bsC&h(1*cTGJc-ElQ- z-(wBkTbI)E*4da=B+uU>V($CV{uFcb53e7I!F%pr?)xCL;o;Te&)sq>rGHqvCi2AP zJiA-4J%0c9_EX|r$;==0kM6$rJ=OZhUGB~AeS7t7Kz8)^Zpr_4CRVduE%A!w!LqGC z!_I`V#yy(qv@|c>!v6Ee)w?7%-w@U8J?m7N^kJo5>GQr9uWo#J_0W6qwoSZ$ngeS} z?yZcyyES_L<6fQx&MUc}m!B^w&8Yyne*V3yrQaEfci&QxPv8@(`xEoiw=n6&GO=0T zmx?`DoSFQ2Wlh$HmFHUR7q3n}yt;jT&#hHvAJ)5lyjZz>%C6|6>y=8%oS9#INbkCE q@$Ucn@Z;ig&`<#f&v%=DED{VFCtMxc_)Z6c$|g@&KbLh*2~7ZbkK`W! literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_indexlist_bg.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_indexlist_bg.#.png new file mode 100644 index 0000000000000000000000000000000000000000..aa4d47ca6e95747ffd50403073ceb04db157b29f GIT binary patch literal 2846 zcmV+(3*q#MP)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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4DhIM>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@~ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_indexlist_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_indexlist_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..96342f6daaa2d9737123361a9eff455b219df581 GIT binary patch literal 2858 zcmV+_3)S?AP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6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Tyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z00028NklG#razc)f{M3wz6|t%Bs2nm z0I0T})m{BVq5PfN6H6s| x{|cICx$8dmywvR;wW3&Sv7ulB009600|2|dM9dJ0UG4w?002ovPDHLkV1gzDe6|1p literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_list_group_bg_bottom.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_list_group_bg_bottom.#.png new file mode 100644 index 0000000000000000000000000000000000000000..17bdb807e17b661dd2178c962dd5d35b83d3caa2 GIT binary patch literal 2908 zcmV-i3#0UjP)pPPiaF#P*7-ZbZ>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~ta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w 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} z0001uNkl};k5L&> zfPlmLjcPQqfZzZpv57CS-$>~D9Zj5m!*CYY2j;Yja}4`TYI|^r+cCK_tR;A1ErKlx zU`qt+31B^fmGS6Q%v6|7(vV8^#OQSk-<0RR6308=ktNOGCT@c;k- M07*qoM6N<$g2)hP0ssI2 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_list_group_bottom_cover_round_bg_normal.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_list_group_bottom_cover_round_bg_normal.#.png new file mode 100644 index 0000000000000000000000000000000000000000..d2e4f9c61f903364d34ac9abcc897c1e04968e08 GIT binary patch literal 2908 zcmV-i3#0UjP)pPPiaF#P*7-ZbZ>KLZ*U+I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7&;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+Nkl&Ut910jDNRWRa tfI+&EAVGozxeeJ5@WWUD009600|3E|Nhsea(kuV~002ovPDHLkV1jl&MiKx3 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_list_group_press_bg.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_list_group_press_bg.#.png new file mode 100644 index 0000000000000000000000000000000000000000..7038e9eeabb4d8e2555318a91ec3d8efcb18e96a GIT binary patch literal 2946 zcmV-|3w`v7P)pPPiaF#P*7-ZbZ>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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K^-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} z00023NklG!oSlYv)d=?c3_=kN03){;0FdPD)h9g)G0Lwo$lIjreZbHpx)}Aa* s7mc8NX6=c!DAu(&Q1Ac%0RR6305afIeP$tRnE(I)07*qoM6N<$f=(89FaQ7m literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_list_group_press_bg_bottom.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_list_group_press_bg_bottom.#.png new file mode 100644 index 0000000000000000000000000000000000000000..44044352da58e318824369dabae8a79abc6fe6de GIT binary patch literal 2906 zcmV-g3#IglP)pPPiaF#P*7-ZbZ>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`J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;a16%m4rY literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_list_group_press_bg_center.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_list_group_press_bg_center.#.png new file mode 100644 index 0000000000000000000000000000000000000000..4de51f7e0535c7474cf6a0799935a5be036e14e8 GIT binary patch literal 2843 zcmV+$3*_{PP)pPPiaF#P*7-ZbZ>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$;({X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JpPl@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+NklwPAmG@Zia0iS9SRsMSg>HH tFu-8lSg>HheuM3|_@P(;009600{|5+X$VvUXITIM002ovPDHLkV1k_IN9F(k literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_list_group_press_bg_top.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_list_group_press_bg_top.#.png new file mode 100644 index 0000000000000000000000000000000000000000..7e645576a9caecaef5d06e4f6b559b4db986f603 GIT binary patch literal 2917 zcmV-r3!3zaP)pPPiaF#P*7-ZbZ>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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c}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} z0001xNklZ67^5fQyJ50TtO%O9;{*&Ut+l|9!txpE%PtzEzY;k2#N&r~d!=gME9R`@NGqA9$OjyDamar4B{w)qvd;kCd|NjF3f6`pu&N|1C P00000NkvXXu0mjfbFFKR literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_list_group_single_cover_round_bg_normal.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_list_group_single_cover_round_bg_normal.#.png new file mode 100644 index 0000000000000000000000000000000000000000..aa02025ed413853cf72ac38b64e398010552f62e GIT binary patch literal 2948 zcmV-~3w!j5P)pPPiaF#P*7-ZbZ>KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n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x}JDO}Db1w@oD zbWUG#9h}>+zf#T0Ck)+yK z6s6%<=?q|^Sbcq4LsoEb&xKe_QV7o)*Wclkn3$J?p*LEx#}v~ zM}xaNlZNAOOV>Pe88xjO5OCv1T-$oJEXX9GG})Q>c)!k&fW`zFWhz5!a`yEu?HBy% b$-e;r)Wt<#zg_?X00000NkvXXu0mjf9|ShL literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_list_process_04.png b/res/common/usr/share/osp/bitmaps/720x1280/00_list_process_04.png new file mode 100644 index 0000000000000000000000000000000000000000..581ddf03083863664e0983f1be97b2b63d338867 GIT binary patch literal 4026 zcmV;r4@K~aP)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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{jYb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YSiCbg_@SzZ5$T=@}f*%Y9-+Q*2Y{#aCQp894 zobEFaQ3%W$F^=QAmche7duysQr6oypoo%H$-S?GJeBFk%Ykrg;zow~F-B9lo#F@*{vh4^=lb0$;O2JDLKi=jbZ|PD_|e zAnZ9t$x{PAbP0sL9i7`gqVY*t{$#+@u1#16d~N|hJQ4h+%C6*`%PPy4o|B#m_{?P| z$Moi9d;*jYEa3Ad;KLK}{cB5~Cc6U2FSo>&u!8?z4WYzom9QI=%hf+XL0UY>rIH_y`UinN>p@27g41$c-vjLxR&U4>> z-XwPw3JB?eqK;`kA&cAkjFfZkv|-{3Uip9N5PWVss01SbZyiePlyg3Hoz!O=OPzs9 zDk#TD0R_bim(!QFif!!JQF;OQ1+OchD%fnN!(1EEkV5sdx6EPw?X-OFtKB*qm?b_P z2Ap_wdaR?SNV#LJGk{HYZ|`Z*YgezUGL4oha;s<_8Wf_kK!Gp6%8*_9&)K)% g(tZQ~`sDus02sc3%SjOQjQ{`u07*qoM6N<$f{*=_O8@`> literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_list_process_05.png b/res/common/usr/share/osp/bitmaps/720x1280/00_list_process_05.png new file mode 100644 index 0000000000000000000000000000000000000000..764fb5cda3f2f980bf72d956543ceb2ce6a926ce GIT binary patch literal 4023 zcmV;o4@mHdP)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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?DAX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`jIdolSPT@KxBG&YCv!1WX z!xI8+*3ehhUqU3TbRwc@@HT+y4)4`v7Jv&PVpSIj{TjkMd#E-nf4_i8=mfk2;IfAB z)+J#|!|O&j3Ut9=P^)5@fTcNQ&x6S_fdupm)XwzGVBtB~hsx3{v&w2MkQA`)U?<*5frNWy5@bbU`;Q9I4zQ4c!Ip@94VHhsT zfLE{xz%{k9K4(G*uWs;D3PB8q!*^rr>FLS6ySw`#48xlmLGL2rZv};)2_c-iz`OZW zHX4n-4hDmF71ztl%P#<~8dmufz>>x{r|_3T2y0*P7KQsaGYlhjUH8i_0!Vn8CLq(4 zYlZ-`_}n_+r@QjFVHoN8`S~9J{_T)}xP$;l2rp#ci@o|AyTz%ytV1W*;r#MzD9G5vNLfBJO$zua= zst93EF+Vz|;Q6BmPxZU41D-1j%_G4tU38_op9P;*?DSZ`Z&ZpL*_3c{1R-xR;G=!O z+ea|=FBp|q_Iz5g^FuHT^7Y4!@B680ZNFlK&pS}?Q|50$m5B{^+G%=#MUTsk^`gp` zfltA20bL#ta2x#A+Cpbay8^!!Han0qcE;2oE1B2Jz^5g%F0W$(vV%ynYA%6%6GLe+ zBLcr!(G>w!32>A@j`+Q-u1$-8#@z(`Nv?e?6VP>C z9rkM;e*rZ&*UUY=yg@^6ST(g>waJBLrrgDM>vjQ62xOeg42{{@_jhT(gFij{Zvc^< Ve2EMowZZ@Z002ovPDHLkV1gH`T!jDt literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_list_process_08.png b/res/common/usr/share/osp/bitmaps/720x1280/00_list_process_08.png new file mode 100644 index 0000000000000000000000000000000000000000..d51739d25f69aaf55d2e8b71ea6de7c531741516 GIT binary patch literal 4059 zcmV<14j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~c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LZ2TOOaN_C z#7LDA>Vh|}udm-;US9q&olXq^*x%p(YFU=AF`N=53`q%dVS5|EyC{l&Pk;l!)z#Ij z$Hzwldc^>644_*lysBEhP1pZqI-MF97Zxhvx0=t-ZImcScO@OT?(3iSZ`QV@Y_yI{*VBMQK?} zm$wpm{y)GIIX^%D_3rMjmHGG^fL~nKtxJG5d6_No+W}*2q9f*Wfdjz7!NK3_>+4yN zKaoq;m4Mv3Pbp8hM$hvc)!>hLzyV-$b2Hl7+WL_5)yMI8>?k6+0KjJnhVOWuXQ=|; zq}0Nb5J3O%@bE8+yR7`FkmX|lXEcw9L%N>l8Fj&%oN6d` zLJ9+JJtA`dMuF9N@}+=z-{cX|cs%ZCP{2e$f`*8%c;FpDl{Lz#(6ZK_0O;kBp9c2_ zS)XT&7SH-T@GXJ64<#4$DMv{*fRCE${XtplH#mE8OQ2z?tt3@;dG3FrF!yKcfI#5M zQs8+Di^|r{uImmt7CF^qeV$jEp64}Xz&8cNQbpe6#G|7j_k%GO2zGaN5qMKTbd|u9 z`}1TXiue7>PI6RB z-o8JW^&;j1p4|Vp6yTogy8T(NV`EO1Pu%}!%uyPWv0`Gm#Fin#h9pZa8+b#82pf|5 z++GFCFFkmw-z}M9ts$9iY}9Wyn3Zr3T^VCx5%{>|pvwZ@m&xMKZ_RRXm)d%uFDBy zOsXwa7Cg5TBZqvt8Y)2tFKul_CH90dHjo{(Y!jkMX-=lqDAns3|l>!cw zKf{YC1iBImNTzv*u zO~su#mAe4}kE#x^pKoJ^>C@Yg5-78$aciY4$c!_dK8xfecfbL7S}o_%H1b@T(`^2LN>Qi7-c2a-9GG N002ovPDHLkV1md)o5lbD literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_list_process_09.png b/res/common/usr/share/osp/bitmaps/720x1280/00_list_process_09.png new file mode 100644 index 0000000000000000000000000000000000000000..454bc9c2c4c589c412a8c2204765d28ae5aec461 GIT binary patch literal 4052 zcmV;_4=eDAP)j{00009a7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&1cC{<7dbrk)lC1#~p>?rXE% zcGjPDBs&>PO(hfMu6F%`F_e1<;7yb}8F{^-n3pY2hgj~EqKt2+;Q@HW1r;c zCL`sp(UWL#hv1I?u1cKg09!?JnG|lAuTXalm6bz0vY8V>O@v zmjv<+yZM4F&dnK#5F(agC<|WZCPtlnJ{sr*eE@$*wAhId;zpLK$_>ndJYYHCavmul zr+krO+_84uv4xTor4n#e@b$>Ml1Mh~a+oz%(NjX3cW*rj{_Uo0t*YHIcW+C4yB4}o znDjhDLs5MrW7ID(rd&B+)27QkwYw?FP>f|T^~VMoc|oWUn^UPEYiCm#S(;ogrnoby zgp8)mL>EI#bNt1$=8a`fv~o&-bKTms48~*HN_Gw{w?`p$70792FmO=Pq<24lOZx-- c>Cx8#0Q`q<(sOkjT>t<807*qoM6N<$f>PmjdH?_b literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_list_process_11.png b/res/common/usr/share/osp/bitmaps/720x1280/00_list_process_11.png new file mode 100644 index 0000000000000000000000000000000000000000..4e87dc3c877f1bbc80b9c23636a7d48545f77528 GIT binary patch literal 3920 zcmV-W53lfvP)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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_M6WNW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q4*UAti{_4Lik7N||_s^=uGKoGsHVmUWa5d8V?5 zYpLmGo{&w(q zV8~Qzz#P6WjIr2tV6t-*tfPUIJsj79c#N{qJ<>Iv%RFx^WOo%+0(O6M4`+j}9Xd!Se@m zT9y_y&YgJ8U}fi7AzZCsS=07?{&CLn2Bde0{8v^Kf6`()~Xj@TAnpKdC8`Lf!&sHg;q@=(~U%$M( zT(8_%FTW^V-_X+15@d#vkuFe$ZgFK^Nn(X=Ua>OF1ees}t-3#_`hBq$Z(46Le)Ln;eW^@CE2 z^Gl18f$@>14ATq@JNy=b6armihg{2|P3~YLxoQ*78os3*vEX~Xf4PA|#Oic`& zoJ>re4NRTQ-HaV!dOh=sOA_;vQ(^XI0_}zBb-}CG%DE^tu_V7JBtJg~mI4AY@=NlI zGx7@*oP*62G{Q6UQu51-H9^q>@vTd0QD#|cid#{Bt^zoGtunFLPuSlOy(#2`nLf}l z`k=&tlvrRwz!V5#!jnFb1J69EdB7Y~1k4&TT$~NSZ1v33#WAGf)|+X$T!##J+9qGD zWIeb#$NbXcGx63A{fZT0qOAT3tuv;T$)|d3_-S~sNBr04W4egS6*M z7;N}`&-<^Q@YHPm;dKnxbVbY7-quvUk$->FI-Ttg9zL4EyKk}}zst*mntRH_>g0ai o{kOhBl*#wo{h(Q?HQWXa&P%qfDdpa^98{8cy85}Sb4q9e0JG+i^#A|> literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_progress_bg.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_progress_bg.#.png new file mode 100644 index 0000000000000000000000000000000000000000..b5e838ea3aba613d169b4ec14444084f06fb8648 GIT binary patch literal 1249 zcmaJ>ZD`zN98b3)I<3z6Qrop%mV&gScgd4W(o49ryGwH2v0it*p7cIUxb*V07khbG zlJ2fmq3awtssqOc4iq=$bc|7kFCSbBt#7TH3?~d3{bau=qNk&Rqm!Xe+Pmt9x{%~~ z$?y03zdZkcjwO4#YPU9Q#W1WkzE?`2@mcgVJ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x1280/00_scroll_bar_h.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_scroll_bar_h.#.png new file mode 100644 index 0000000000000000000000000000000000000000..f91aa2984cb87bc6016a6f2370332ee44bfa2171 GIT binary patch literal 1131 zcmeAS@N?(olHy`uVBq!ia0vp^vOp}t!3HD?=a?M_Qj#UE5hcO-X(i=}MX3yqDfvmM z3ZA)%>8U}fi7AzZCsS=07?_nZLn2Bde0{8v^K*7iAWdWaj57fJ{tG z$}cUkRRX#c;)UD-xUqS~&|m@vn0`fKfxe-h0mw@*g}%P{mFDKcRTq~8r6Sym)!^cg z%7Rq=pw#00(xPNw#HA^NtSYc_E=o--$uA1Y&(DE{Vn9ZINq%ugeu08>u&JJ*LU?9g zN`84USiP^Wm1kaYNn&1ds;7&s63_&_%*+%kGjl^jM`srkGfP)DLqk_13j-5lR~Hjw z10zdQLnB9Lm|mCsATTy#vB{a1P5?GVFwQboD&S-Y`RQy3Pr&67Saa*r?mm@+Ds3=M=AL zcB-nU&n%j>bhC%=-s3N3S1F1aGZzX9%vZm-$vB|)%#V=7WpSsxr5ADin;7`5PsclQ tf-vJ&A>oD7Sh%aUEls=H>CL2YfZ=d$r>ePg-7HY{_jL7hS?83{1OPWXZ;Jo` literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_scroll_bar_h_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_scroll_bar_h_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..2a15e4d30e43295e342cd792edaaa9166f2ee55f GIT binary patch literal 1224 zcmeAS@N?(olHy`uVBq!ia0vp^vOp}t!3HD?=a?M_Qj#UE5hcO-X(i=}MX3yqDfvmM z3ZA)%>8U}fi7AzZCsS=07?_nZLn2Bde0{8v^K*7iAWdWaj57fJ{tG z$}cUkRRX#c;)UD-xUqS~&|m@vn0`fKfxe-h0mw@*g}%P{mFDKcRTq~8r6Sym)!^cg z%7Rq=pw#00(xPNw#HA^NtSYc_E=o--$uA1Y&(DE{Vn9ZINq%ugeu08>u&JJ*LU?9g zN`84USiP^Wm1kaYNn&1ds;7&s63_&_%*+&EXj&Ru8kxG8S-QFz8oC-;xH_A;nLD{U z8aO(cx>=aQ^t$9Hm*%GCmB93-!1bCL;M5CB3b_S9n_W_iGRsm^+=}vZ6~JD$%Eav! z7o6rn^`_u-i>WJ4z4}1M=z}5_DWYLQz|;d`!jmnK15fy=dBD_O1WeW!HD#n27#M9l zT^vIyZk-9e*mcN($7E}it%!^NlbUZ2N%MLrbT)({UH`DimqZ9V#D^K~p-fiyb-lLm6*VpI=WIZyQGX1Zf`xPd|>u)@B zxh9!CiELcV&(pZB+al}a_V@&@njIa<_jZegJ!jH+V#(fjr)73fTuHWFtJ;F94TmHR z0&~A@+kRW%rMUsqF$W=~x6V1A9(<{L7{ML*=F65ThbNo6E7kj7{I!Mcrh1>~2W7iw zk8;=j{W5W0gX(sU)(R%}eHY7fdnOe0+HPPr`k5Bqm2~_{p_A6`v?H^3pI*no9VxDM z$7AkdwNg#fPp5;v+5{bT5DiING$A|Z>D?BO$hVGf!xv3yJEV11#eDUnm1@tJ(gP)~ se%KPw9J1%^|COuv`nGO2u4m$5h`CYox$32fAE<2cboFyt=akR{0NQD?zW@LL literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_scroll_bar_v.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_scroll_bar_v.#.png new file mode 100644 index 0000000000000000000000000000000000000000..a5e9875b67298b985884b4f500a3eaeda59d8e4e GIT binary patch literal 1123 zcmaJ=TSyd97@iU} zqc>-5(3WjUs@YzZ*QmNJWUVV;0Rtd~bd5gK5!^5}r7PgIcg#@a6a@8#scBOkaw{2y zHXwsE>r>efM}`747hw4SUq$*^j%7GM!`ApXRtVMzEJx0K6pm(VT|z=^oQZ{ZVX6lq zOJJBxCPQbcX=ryd9MAI%>u3CaA4d3`eiJFK&vYvD3LOi@fe1Q1&?2L4L7F4mbyI^GX9_RNLd$)aHq79)4 z9}0wcsgdI(e}roYNWrKSsFpY`Qq!2{icn1(z(jejHpdMXY<(Zl8f|Eh zQz;92VK4rIdNW+Du$StBTn3wAyo>$oqVq?%d%Wdr+v3e^;{y|SyN%nLAN*d9pTvup z*pPHzzB$E}9b%VAYGUWR^l2gex@FV3CLtxHclMuAl2 z?XKYN6eRYSUQd_bJu|YSe|zPX?9%w1vm2heU-sN8IsAU%K<@JL;%wRP$%@qvPkx9! z=^c&ldR)4|`uy>;NvwHre{4vcxFD|^i#!{h$lQA||H{Ss;X`9XsqBG@ubY24sgK?2 e%Mod^X<#1Fv@y{Bid{SIJ^Pr{B925-2mb(^$b3Hl literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_scroll_bar_v_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_scroll_bar_v_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..0516119494a03ab43bc3a8344d88e060551a58ff GIT binary patch literal 1240 zcmeAS@N?(olHy`uVBq!ia0vp^B0wz5!3HE(wfP(cQj#UE5hcO-X(i=}MX3yqDfvmM z3ZA)%>8U}fi7AzZCsS=07?_nZLn2Bde0{8v^K*7iAWdWaj57fJ{tG z$}cUkRRX#c;)UD-xUqS~&|m@vn0`fKfxe-h0mw@*g}%P{mFDKcRTq~8r6Sym)!^cg z%7Rq=pw#00(xPNw#HA^NtSYc_E=o--$uA1Y&(DE{Vn9ZINq%ugeu08>u&JJ*LU?9g zN`84USiP^Wm1kaYNn&1ds;7&s63_&_%*+%kXCnh=ClhB&GfP)DLqk_13o~OU3ugl} zGeb8gS0iILm|mCsATTy@RB=Av+fPpJ z^ei?Hy!t4jgJahU5m{#^1vc^JZPH9aZj#j%Ig&zbS4`Q}6Zoc|GTMAQ<5caXgDKTa z>u1cJ!;(_tTz(;yCn}Ah{DST6XE$d5%xV9%`-Jfeu~{a*JI}07=DI8JqK)C!v7VQC z0t<4FXngy5!}Fp~!k-skEq|n2o?a(magKk=5vji`%_hZN$&7CgW%?mA@2=hfAvJZ~ zmv#?6c`ZmUyb!W=qhB%4wsO;HDUIJ`-nzeNRak8yJ#AAhR|fO72|Fv9a>PU$5AWvB zIJu2~at3pqioBw literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_search_bg.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_search_bg.#.png new file mode 100644 index 0000000000000000000000000000000000000000..7781aa03527376a7068f21c624a9d206f9c09173 GIT binary patch literal 2848 zcmV+*3*YpKP)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#CDyyG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&IMdhr^%qvj zPmeyBbV2?{P~oB;-&GIokgQrxgb=%kP$=BoAKhE{(=!SetB literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_search_icon.png b/res/common/usr/share/osp/bitmaps/720x1280/00_search_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..71d5c97e7f3ed44b32f275779a8af483eac3756c GIT binary patch literal 3603 zcmV+u4(#!XP)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;x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6IZxbny)%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} z0009%NkliP_q%sKOK=Xu$DEma=J#FB z%$zefki>W^IgGFF|kGl%);P?;@sLZ~Oi&SAgqfht3K z8ih&*jf)}+g_<3 zgZ8ZF@Zo|(w=oHHxz%n#ba;k-476FgB+taekDg0)9hyEF-Oq1AquCFssk=1mk& z_l<`npxbKC%+lPp-L53ityX(kmY|nd?N>>lA6o5|1QdA&E_FaRCxO22NXe=_L)SQT z_u_}9s6gnOrTr{aOS=b8W~Z(WFSIKE&P@zlkln64LWQs75F~3hWf2 z17=OQ?3^_7q=kxoCAKNx7O*K~#8=>s*(RR@y}%R`zpOTqTS3UPH-H_8Uj&>5Du8u} z_T-l}{TDQsJzXCR)KkXC5vm=eZxx#D^Ri}l$l}bTeiYg|$bD)}aw`jbz8~m*@aaM) z9sBrb^^3W3C^WEXp)(_lZx<@_13ffb-zjw6x3|G;qdg`nOl1~(Onj1?fF6J4 Z_W;7{VCLxMbdmr7002ovPDHLkV1gs@ya@mR literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_slider_handle.png b/res/common/usr/share/osp/bitmaps/720x1280/00_slider_handle.png new file mode 100644 index 0000000000000000000000000000000000000000..4c18bc7797f2126b0bef33db7459b72ae1801bb1 GIT binary patch literal 3624 zcmV+@4%hLCP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~c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rxJ59QMzjt;$bTgNY0@s+D<+Q4(*fj6PtsC*`XC%}E+ zR!x95fe!?3FByXR-}&?pzkpTXab3>Ln~~N%abh(J;0rK$%yr%YkLq@YGA&U~X9 zzEu+ge*b%5wvMw0-D95QE=JtesEx{6wF`{@?RpEi8xtz_d{lS9qgXTYc1CYhcImVW zTnjA!2+Ty?LQ7+YvjZ%pIyR-$D1b}AH{fdN^$p;5^sTdW=FHoHBVaR;?MtRn0GEBM zuK4HMz*G`58J5;xVOqe8Qk%MJRJc{&fuF#QWS|U2NGmPiCB3QXq$UqjYZSm3@GB`O q8`7uroQI4+|D%nRP@&A+?*RbnUw(eG=J)0R0000t; literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_softkey_icon_add.png b/res/common/usr/share/osp/bitmaps/720x1280/00_softkey_icon_add.png new file mode 100644 index 0000000000000000000000000000000000000000..40f1320a0a0d282f8e7408c5cd186b8ec3bc1ce8 GIT binary patch literal 3037 zcmZWrc{CLM7XOOuTh@OA9VU#^t6Ba z?O;BDW)AYn5&TsSBs(8uqlHvr+& zczZO$evL=xU~Ug)k%)O_5opIvFKh=(#&D%e%8D?sn*rQniMrU$&sfZ~^_u6j%w+H>Seib0qCS0S$2L^YmB(SLA`4)ctRx0E0iwjiLh1 z&qTPX3etfvr+1zZK62T20~BP~VL!(-`mWw0_xAAp6> znBh}7NIgGBixv}b`ch(x#`hXi!JUI-pE@@E22ijzjoc0Tn~hOn8gXiBWqEnhyc6c^ z-iwSrMYmsXMV{RJ6{CH8u>bYLqBvIB6>CCs__e)%&$9T!;8TW&9y8xkO^zFxD93`M zqMc?QM3gMok}XGYiecX4UFBlYB-m4#PZA>(uf=(}BWm4wHBfs)mnteZD(iNn2z1lAHu{t+hOc5MlZ~T5I32s2QcaQfm%UXH^>)#LDg1U-}sCm zR)uzlcdR-=Y`@*<^V_7Gu?#c@J@lOJBGZXf9*>eS69ZUsxbVANR6I_hnr)%{9cYDfTfd*DQ|Y{^sL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z=AVZMv_>^HskU^D~0Gx!*viI0v^_%-83 zeo2U0^(4*TU<=%S&mOukVnj(^)oRuvx$L|P-Kit5a3bF!^ImIS4_FUf*FMb{wdrnp z-jr8Ebnz!{MYc3V`5deX<-VE9MHza4xXm(r?SD%rsk&h#k0h3 zLKpQyPS%b~;e%d-lKH%+FHiewczGZ(hhrNPq~V<5!t9;wjE@2Lici*CH~3zY zyV|>iK70;WQM$Hw^=Pv#Y$i-_yJ()xX8E4*eQApCuQ&VlL#0OI)O8tRi;DLXa5pf`JnI$td9U$6gJ^k36m+bjT3DAZtr WcrjgZOA`7gKVW8LZCC?yd+={qpq4NI literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_softkey_icon_zoom.png b/res/common/usr/share/osp/bitmaps/720x1280/00_softkey_icon_zoom.png new file mode 100644 index 0000000000000000000000000000000000000000..6296ddfbaccf1d29f3c791d6ea3331c7100f7f1e GIT binary patch literal 3702 zcmZveRa6vu+r|HcbV(zEl*CASgXb`h^V`GWp$XgmT{e5z*D&xx6N- z8b-nA4d}=!ow%P~@)Cg4P({UiJk6xv0YTsxB^hWo$Y>V79dk{)15JNKfQ}?+_Dj64 zM}}qus=@KlJfNycfX+tfA5viZ9@Jwm0qEUvhg)Ewjw)CB-cC+4y#w|L&e^z04)23j$8?gRo+5B zAVGUxeY(3(?E07z`waiurGi$q8eq3)EsnhZ>qaB{EpBFJeQj-8w;gJ2-)j+ag>1EL zwzzz97OHrGKl$-}g)dCfCQOU?^hay|v3~CDp?Bnw4)YrcS{JpH*B2aPJncFTI0S@o z)r8(BULEu1NHUiv4*E{0CS)5?`3@CS3CU~AGQefjq^jlAW4&m3lf(PKR z9@R1~NJfNqjaVKExIR$1)WY5cXcwJ#J^(yc=M#nZR;qN70icczgOsbWAGfdyH1Gqx=p=6%(N^<18YOSq zKlWrt#PqNExO!q4O?dPYWwa$sU%|P| zwK)!zd8ZQ;TUY3*CQNj*(c{eo7v@<;voUcl)yC_wD9FG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EYj`WC^?{A}wBr+B=_rHOzrlG$1w@U#rG`ZQq<@$% zLUE7a?2e=qtT@F6SMFqWjPo6TppsE(^hp?E;>SU3FwCgNAgwX{f5Wq~mqeg2Zi+3& SGa%>huz`+-p?VqAF8qHKtm-BJ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_softkey_left_bg.png b/res/common/usr/share/osp/bitmaps/720x1280/00_softkey_left_bg.png new file mode 100644 index 0000000000000000000000000000000000000000..91c8024cdad2ac37aca54933b0e5ce6d98e79623 GIT binary patch literal 3165 zcmYk9cU05a632f5gwPSGQkEu7dX)|dy$S>qn$m+JO;MU)LT?KqQezNAS}0O97>b0B zQ~{}>NEcY(NfDIxvb(SBA9H8U`OcmDxpU4vXKvz6OCv_Qt8@SWFq#_y^!5)BFo8k^0v`B#-M#M# z03kD2TO`bOgG1|R{s3Z@fO=u(Z^I52uz@6_*wRHM1!-AK69fyV*{$0y8yHaW^cEyg zrlz7&*sY})lIW&rRs>(CMi(U{^_?t+7x_#yAFU0Zzn|1zuiVGh57Q9A3|YpC*2*Y` zatQzBuhBi7-HR(Sx@bC)0DuKt?;-f`Oc(?lM`~(b7b4Pp1VABU^k9H!fg#HA#$PaR zLUNrzs2C72DE)>R7{vzYhNVJE09`{63Y#Np3lvZRF8%Iq%fL-(z(wro+8BVs9_NOG z0LK@C?4W{lK;VjJfB@M`#z`cxtng)P4#6n*OfEfTe z>x5VdfGQkt=@k|Z0b+6iHp4x*=J)H>EbEfwPUY5V5=7Jt(2ii~KpHq)hF^Thg!4L^ ziYtX{o~}%LXfC$`T8a7V{r~_Jq_dN6yMGok#8f>rq>_qfx+A^WN_`>Z=C*vkI$RN; z3jm8jkt63)vh`O{8q_G?^VipQsJw5}7d$#j_NrsneGe3D%)s{p{_KrG;WNVY^yV#5zK^dsIrws~Emo9U5 zr~F|i#)1eUE*$~DUXy>@7jZBp$~$^-IQU{$=gg?!8i4XLc^(J=xAjG2V14yEJzxOP zFF;Gy=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1280/00_softkey_right_bg.png new file mode 100644 index 0000000000000000000000000000000000000000..f6ea9234e6e8bc7f149420cd9368a66c8586faf6 GIT binary patch literal 3172 zcmZ9OXE+>Ow}$tGFnVthUcE)Hug;8KgJB2~B@98-L<^bGg;$B_86k;YBE-lji54|R z5OtL3L2#lc+9&6`&N<(8eysiMy|2C2zMu7LCEhgCr=h$?2>_rmG|;iU)U?ZZ042Lz zi-tTBFNMO-z%CE~DyBaH0eR2a0iZPZgu`#%^zaSx4fOE!<1vK8dHe!=-95eC00^1J zTA>hD>#XWWbNevk1oSgwUrQD!k0mS#&73YI#!EqOl)zgw#bVLUpsP#D*;|-El9GZ> zX0Z^benL4(zRdeFCHhsulm3&1@K;{rEk~<^=M57YYgK#L`XTZ*D0P;BoP`3Kx*W#M z@GZKht9xNtQVT;V;0NfT^>=v#&-fwWI8sgR245Tb2LK5frGkPs)BHB+>+u(K8?aml z2s#GR7L@+CF%-=Vw8BzgB|u9Lg2v_uS%E@Q;56XsvIK5Q04L$ctD^voJ0Q+aW zERe!X-`Y9MWq5Gx8u z!+}#TKYs{_$py@MyGXU4H)`nD#4bCPTc?H>P}arRLnZvlkw{5y5rQGx4Q55>E6#aZ zk{zMB9I_aBx^H`*0VqsoxpcdC7DAw{ArKT(aI|+MHa?PF@VU4wov#d4`e^~M5EMCl zE-qDn4XsLs_BnqkxJ~MDo2u}^QIdNdomK-VT%Shn`TgmQZc!S3YHDS9dD5s0X7AjO zj5tSi+-XCedH;%3J3Tu1_F+)~BkPFKCq4ew@p<2*`1;UOiWrxf)l~h{MyiWbu2H@& zLl?ZQ81s?^qkoD{Uh$up&&rJ8$R_1;I@u{B%;4wvj+-*P9a9DR-1Fb zon5?*?0WmvnRcpEC&d_;KvxHh9!7Z=eLcWQv?>ZF5;s`OCFUgcRf|i$&B7xt!;e<7 z!}>j~x*y$dXJ|pYNDGF7RJ#|-3uL2C<687(o?+@N)W1?U!0}~D*JAWuQhm7_B$JoQ zTA2SO;N3O#WW}PjFO?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jZd?0@)|7iKK^;6KN`;!@ylm7$*nDhK&GcDTy000JJOGiWi{{a60 z|De66lK=n!32;bRa{vGf6951U69E94oEQKA00(qQO+^RY0u%-qAbL0Q+5i9ncS%G+ zR5;6xR7*|+F%gW67K%mSx%(rML5PnjfsmgBs6 zL6B$%5x$Iwf(aIQU^cJAWg{*EMKCpcA4=~p$j<<70XzZtGL@v_o#2w-9l=cShF~HX z1Ut=1XPMv?!Jgnf!8cjQFb^L9`~aXLGv(F#N^|x}!=0dH}yO`)IB|8Gfh~ zMuaDBl$3QI7BICGrYi7ce*ui3Tqm2CMO`wIFwbW_EDuwB8x&LXFzzjILJ^E)Y`jaR zhGxOk5_V_Ses!-)FX&>)cCWDfc!=ut(9|SmZjux`#KDS$0M&|myW+wMxb=Iq?~*r` zcIGBOifE~%g%TFRO^xT-a4&P+=9A#Fx=QSKPsM*XS`mCz?oqcn*|E>GUDnH}UpWfT fTzfw=c!0+rRb|(N$1)T*00000NkvXXu0mjfvDVSy literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_tab_bg.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_tab_bg.#.png new file mode 100644 index 0000000000000000000000000000000000000000..27b873b9308ad6783b97ef851ff6abea61be02b0 GIT binary patch literal 976 zcmaJ=zi-n(7&QtiRYfI)7ytn}+zF}n-8pevTQ$Xv6A}qmX%f+}ARPPBSgn1=z7n@v z*^1PO5oQDn|3C*SrdF&B2U_SDjmZiA-`~4C&8J(e)M5?VVLc}%g6YvV0oA}+Cw1a@+b@sFq9Ei%zu96f`-$$- zKz1^WoCXnR3&P@38aeI;VW3Uc{m>A9AAAvk?-}BnY9l);lCEFbiAiH;rRnZ$xSA&} zJp_xX&IJO(9FPW^VWOvo*w@whIy;6U=tJ0sA)c9P*)>q4F#)QKBp1zLFjtUq0cizo z7AOcKh!u$DC5&`+UPl-VK9NU@y^dbD%7a*ZXNX0-5gf2)}@RlT^fO6LzOXD z^FxpJl0M$H^=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m_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z00015NklyR}I6A71bO7009600|2$i6)E4J1vCHv N002ovPDHLkV1iTNQZ@hp literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_tab_press_bg.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_tab_press_bg.#.png new file mode 100644 index 0000000000000000000000000000000000000000..802c3fe9b00ea47ed0f8b1865e44587594d4a10d GIT binary patch literal 1061 zcma)5(QDH{7!MnYmJNo8sE8by4-?j;moDiVR=2ikU5A;atE`V^$+Znza#?bp_xpX{-S^$~{PfxW z(D4w%F#Wknr9kJY;6JdR+7oYHEz;>2$&|NwK-fP36^HMdj!kr$l6}(n&^e` zzUJ_div&k%16B3kP|NC|JyJk>`TkYdD=s;RFCY)sT%8uKJQ##>8G3JKe;qs+_YuqS-piDG8P;aHeU~T|Fxj`#f4vnlJ*Sv&`tcxwsJhE(d&tg$tm$vnz%SX@CCviKcB#Zw0uODG(3k+nE zE8kXj#DU%~eWzX@`8B+7D>)pyAj&sCogBJX-dx-M{P69QyE|JyxctVIwZ`)OpARNh zd-jFaoA&Tfp8C{oOdM?5)kA?#0aH!;AFvnewGZC KH%(KV+H{LDht_2S_mzh?c IrY>In4GywPbpQYW literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_tab_select_bar.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_tab_select_bar.#.png new file mode 100644 index 0000000000000000000000000000000000000000..68b47e801ef592bb11e8a86b555f443da24df2ab GIT binary patch literal 954 zcmaJ=zi-n(7)4mXYV9-j6}y#K z5DOAW{1dL(pK@e8$U9-dI zTg6zu&Hr!cqhEYlW9>fc(jm*-gb3R{9S~rL?uc}V>z_USPMU&Hf&NAbGw)S99&#pZk3ixOD}~FYhQ1?E-#gjZW?bNw(f}E h1X(c3!v}lo;EMo%+`ZWONbeV~$!_nP?^{PN{s20oA@%?O literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_thumbs_bg_focus.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_thumbs_bg_focus.#.png new file mode 100644 index 0000000000000000000000000000000000000000..c73b844c2f176ecc5788b2f168105d45d8eddda0 GIT binary patch literal 2874 zcmV-A3&r$_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=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Yd^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} z0001GNklt<8 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_thumbs_line_bg.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_thumbs_line_bg.#.png new file mode 100644 index 0000000000000000000000000000000000000000..fc705240556ee81ea9d50d188aa0d3b99782c408 GIT binary patch literal 2871 zcmV-73&`||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>QdQz32K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(+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} z0001DNkl8v}fBAsn(z8c7C}tZ_{ext?qo zv7V99kZOQ~O(|TsaN!)jANnmP*1t;qr62cJ7cN}5@JQDChd&ByzBB3s009600{}=8 V5~G literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_time_picker_keypad_bg.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_time_picker_keypad_bg.#.png new file mode 100644 index 0000000000000000000000000000000000000000..6fdd82b54dd3b3bf17801196d91244f48c7e42a9 GIT binary patch literal 2885 zcmV-L3%c})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`J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_bg.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_time_picker_keypad_button_bg.#.png new file mode 100644 index 0000000000000000000000000000000000000000..261cbcb08ec3d235932fcc15c757b6148f966e0b GIT binary patch literal 2963 zcmV;E3vBd>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;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&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} z0002KNklBF9YK^6BE)0_g$(baC zOk^9xVhI_*c-d%2S3Eb&A8)OQHaf|NiOzsHBPxX7w5pvej3c)(jy{&lL2WB5haAA_ z&)EHn@4%65)nHB?N75wNq>#}NeBeXM;QhdooVPlIe+z7{c;50>XYjXyn*^L@4)~e? ze4CT(1>=ixy+M*!w{wNp$zDp0a<08zWdHMZD!RYSo>1F*3;4gUY9vA=s002ov JPDHLkV1oDLgA)J% literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_time_picker_keypad_button_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_time_picker_keypad_button_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..a9108b6d77c6676220007690d2aa4b5121b0bb82 GIT binary patch literal 3164 zcmV-i45RajP)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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pb^9I6T^vNPx}v%TvSW>QVHu?4pnn`OB-`7 z=I#fC@-f%D;FhLx(^d#V5!oV<|D1T$hy`Gnvf)qnvN~07#Pz0o(Wi2uFay(z{pX^` zN1}Vu<)m%JX43eCif)fYTkpO2btaxfwQdz#$&b#Tv$M6Cr7x$av(1xQ&9ts8&p6E^ z>3IG0WSyXAKVPAn556xvg)0m6_F{AO_}$kf3a-C@^LBCj>MWAx$c_8F@KH-&S-rAh JeJE|e{0rWKEh7K` literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_time_picker_tail.png b/res/common/usr/share/osp/bitmaps/720x1280/00_time_picker_tail.png new file mode 100644 index 0000000000000000000000000000000000000000..eea39f7cafbbd67a7373d88251558ff4ee8424f5 GIT binary patch literal 2990 zcmV;f3sLlmP)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;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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} z0002+Nklm~xWSwPycPc+6 zyb(7IgGOJw{S-bl2%3xMaaaJ38vwnDtz9JsE5*eDppDr3t;WmoT3j7sh;#kg5 z&~q$P-HMNO4UrEEz)7MZuKue?gPv7@q?Gg`Q#a$iIP800000NkvXX Hu0mjf`4p6_ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_title_bg.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_title_bg.#.png new file mode 100644 index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Y>|(1yALr7}&LWjNpH^b#V=(jCzIldYNS-({%xn@El52bCCl;!&M>e@# z$r!0P$p|Rjn^SOL^OFOGjr7M~&Og+>o9;U>&*RIp9y?(CtecU7L=a<&fa&?wR}-;s zY}&jm-5-I_jW50(zo)D&4(OoK#&Ne3x-J)f=k=E3+%nTcpV~FNu%-S+Lv>C}h+DqR z#ImwzIHa+z$^X|h7inN<&{*l?&BmyEXBS}t+(NC(7{rG0Ws45=gvMpI>33dTb*sTm zeUb@CAEZ8Y**@>~W}APp5JVC0A5Sza$%6-mJ1)&FqVHa}y8lPZ9!N1-G%v-t7pFvJ z%?$Q0^el=IhGJ|RKLhGwpZz?tEoPR{ekLk<=VT0jc}d~koRUnxw5rdiE1fpJK050# za5=2gqxOit-UWEcIzodTVRC;r--fX z@%KD`8Ra#uU+-9s>cM5*QCZvjuM2J~tvA2gO|t#LtOHeUc_CPFu6NCWMGx(A3*)8f z(~p8*o$O7|=_*VKe=^eaTkNL8zgHQWUrv5A933qktF=rt23b{IaG+hewPTla+Rjn7 anKcS%tJ(5x>8j(V`+!Ig&OgnS?))zd(P@ML literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_toolbar_button_ef_focus.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_toolbar_button_ef_focus.#.png new file mode 100644 index 0000000000000000000000000000000000000000..a32bfa4be7c24dd30052fca3613a2270f76ad4f7 GIT binary patch literal 4203 zcmV-x5R~tUP)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!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Kh!L=SJ~e6PJVlZnzOuPHWn4R*t@`LAeS=pC~!EAF{k60bGfX`ME7rs zV_I_@4?pOVxu^(82e|b4F-lHb9{Up#vVtrkVk%pvz_tcfZhxEP&eJ z;cl%tkP7;2^>E)A7*OaDp__)=QL`Ww^y)C2n?g&|fGYh8;}{E^0H!CnCxC^BUTT>f zBY-YoUV{4z(1N()+apVRFI#Uw0(igXL5dvd7Vw_o&H&!(-@9J43vk15*Vnwu73=x7 z;anGb;Pzt_+HE+8>JFrWu15`Lw-2bC$A1?9%MEuE^-CX`@p2q3%9y#B*upj+v*;sNXJ77P6Mze4X9OSyp3>Z zdm0vngfj}_T?yF*U6|8zTp0V#679$=^8KI3z}$IYaJ zghy8AC;GacV|4t`7dWzdPpXE?_~@ z_2zj#REA1c_m(73%|>`SV4!|9~_l8fPp$^##56(O*X>w0Rz=-#!~=t&N+Z_ zMtCt`pzMK;@c_9vGr!viuLKN~O|r)TG&tuZWK)5jfPw1q0hMEzinA%3hQ_YvN}(7i zjrE10yhZ(8W^zb0+UJUSpf33$eV{bKmjUETI=KdYXM;krd_BsNo z-NW5Dd?3HCZn-$Qo}b{J1?KnvKz?+=YT#CaJD=h+M72me4M?|u)jp8YV^nxWLmP(6 z(8`yg9S~|5E^Mq=VPoG?+4FT&D%+iXsch{QUoS0De0^c?im&^Y^Z!-@<^1c0uAKk& z8$_%eLV#9g-5_GHTaIiOYO5eXZSgZRZ#gnBpl-j3O_$J{gVe-kdVKG$GEHorsE> zXfHXg%+;4DZZCO~x@j+2>Y;H{(hTCOtJIqR8vrZF$QXYUFMR+2002ovPDHLkV1mut B-#h>S literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_toolbar_button_focus.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_toolbar_button_focus.#.png new file mode 100644 index 0000000000000000000000000000000000000000..4bb547d2adf1337a70dc810f1d71df0ebd45c2ba GIT binary patch literal 2568 zcmbVOdpuM9A79VYPZ42CQtFtH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u0tQ>7+VFQjIRPZb9e0s2Qq$8g_Tsf)4Dhy&8S2sxXYb zY6%{opV>blM_ptGw&MZ=)|qr)JWP3f?VcC;MR}cK#QY@4JgC$|Hw4T&mp*X~*&nr*B(u zvL~L`2!k^@j_lKuHg|3*iP5QN)&+VR345aNpZGT^KPIpCqy6KtnMy)kD(B(5VtktU z^frV_6eeBXc6>)#_2cKU=i(uz_TKTaONg9o@VRL2kn@u;P?1z%S-X!Tpv#COuKZWl z11Ge)>2GV2nm#XaoaM*wi%{}cPCh|jxZH${UZ;Z7=*`;6-C|OyN%G!Go_mU?8Vs@z6 zl7+Sj=Yw4C>@I_Ka)wvf_ErL+5~D%jjeBmDC@tv0rFEvgy?Ljzb)U6+cIX|FRH_d= zOATZJiwB8zd}-yOMOUc{64+I~k7pclS^gKQV_M!h$CA6=a&qTcQJWriz405|To1Ec|9^#e z2PU>m{@&jous-~He8RP>y7$^Xi}~T~Zcous2gf@QF-bnzfch0>{64Q~jdfd@=HJZ2 L&6`!l2v7eHz#v2a literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_toolbar_button_press.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_toolbar_button_press.#.png new file mode 100644 index 0000000000000000000000000000000000000000..c0537e9287e418ff7ada1f7e0884ea7df2a5fa02 GIT binary patch literal 6351 zcmbVRXH-+|vJOa*5=20dCZUSd1VRZIS`t9I^o~G6hhRcSng|F=mtI8ay^DY#ij>en zdPfiiK}34L_?_=N_x?ER{J8I0d%tDRGxN;6GrO!EsiUO=q-3E4006*ysz}|-UhU6u zmF)7&HuUk~WykD+GWO8J+Ie_e<1he4G}Zem`p}FMcKzDs)E)}?9Jgh-Jt}bqP86P;;UwUOO$A6YZxj=u3csRqk z{zb}IQwM~=;xHfy5wNf=SP}w~go;3*U>Fo81QG*7z@iW_QLvOS1S}&VB?E?l{%%~C z)^KP$8C|6E-?lDia4rWA4|f?+QEzW=5pQu3EY4mO0)xRs!D6CfV#1da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WN~f$de!dQ z_U{r}+%j|Dd#A5*!lr5Wak6RZZZ@HNs62H^^b|#(d8*6+F4D1ASOpwN6{a-j;-vcS zBChfzMuz-+QlTDjB6RuDJ0K1h6BE0mJ|Td+Qm*Y{b7g4^=nNqLHQMiDdVp~>@NJZ* z8fX52E3d9_bKz!k#$s(kUoqAh(X2*q#41l2*~Bl-JlY(KNWiDOK`BX{$WpJE>|4A# zKR-Y6cYVgQm7B~SoNg;GqQgZ_4}IevIw?rthaFC z0a%4d=q7bVl_MiZm$F$my|J0u4{HVZ=>fyS@nCZ!`F!qllWUx|=tJ3FPGn|3F7#}Y zFLR60tU-c@=W7gGzQ5aCr+eQ<5V4D8*6g0G?;5+C{L;y)mqmffJ7$o^Z)yqkrfeH= zp@+RJ`1xc6|9t>h~j%GI#+Qx7^^nW??bq-v8o7m|YWSL(= zo$t7DuV;$Nh0Wo8*Jk(qk9V*8mC-i%y7iv^OpJAIEBBpceLP<*aZQfa@RqaT+65ID Z@bRu~y^^&y_|Gqfdnherh0=q^{{za*k~07R literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_toolbar_press.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_toolbar_press.#.png new file mode 100644 index 0000000000000000000000000000000000000000..4f54c7fa95a9bf08f808132d9fa03e46d5c1a775 GIT binary patch literal 2996 zcmV;l3rqBgP)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(HlgRxt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usr/share/osp/bitmaps/720x1280/black/00_button_01_dim_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..af92a57fa08b8bc741e0cdbbf2d29df2efef7756 GIT binary patch literal 1374 zcmeAS@N?(olHy`uVBq!ia0vp^vOuiH!3HEP^d=+%DajJoh?3y^w370~qErUQl>DSr z1<%~X^wgl##FWaylc_cg49sbnArU1JzCKpT`MG+DAT@dwxdlMo3=B5*6$OdO*{LN8 zNvY|XdA3ULckfqH$V{%1*XSQL?vFu&J;D8jzb> zlBiITo0C^;Rbi_HHrEQs1_|pcDS(xfWZNo192Makpx~Tel&WB=XRMoSU}&gdW~OIo zVrph)sH0$HU}&Uo07PcGh9*{~W>!Y#3Q(W~w5=#5%__*n4QdyVXRDM^Qc_^0uU}qX zu2*iXmtT~wZ)j<02{OaTNEfI=x41H|B(Xv_uUHvof=g;~a#3bMNoIbY0?5R~r2Ntn zTP2`NAzsKW@b!fooL3ADC}5E3S0onb8|oS8=jMX^1y)^L5|oN?23FO@A(aKG`a!A1 z`K3k4!1zd0hG_? z$S+WE4mMNJ2+zz*$uBR~1Vs)nQm^qmnSh^Uy7#mqw8Y)5crjQe6`as9%gAxZ)Vu1+(Qy_>5Px?R(JoBXH0dq_d zFl$V0O?75qVC?gBaSW-r^=5{zUyFl4>q@~3GtXEYo4+HV{LbOk8=nivG^KpY+rgIO z6C=^$(UTzZI?+^dvECbp$!BhyTx|a3_pV?1SABgiM_9FXT$r%s)@!Fy?h51VrlkC@ zNhhybW}i4$vq7%X>Qw&W(_dXzwbl(xk7f`uB3U(UTX0;N4J#)92EcepyYx^*Bpz!=gACH zAMpFJA8q1lI`H&Yf==iDyG~CxO9*pR&P(TBuGqLPVm;fo7lN;M?)N`=<)MKw&ys(g zE^P<4)bdPvx%qm=lHcabe>30xd)4~ow3#Y~zwaCEHeasQDD}B-p~PEuMP={e_A}-6 z6BajxOkCx&R?hH}>-Gr~nm*Yw@3lzTyWyT2gVm%zSO2ztIpB1vUNw+EGUj6}_j2ib zK2G}+=Wcu#x%11Ki+7|N=5h!)|5ll^ezpn!`d^ZJcTQ!g?0DOf{mA-tU#L%+@b)eD mdD<*wo?JY1Wj1pymjOdf@4}S_)H+%~C7!3NpUXO@geCx#Lh=Cs literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_button_01_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_button_01_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..c42c6f316fcc01135ccd7164de04652197b154ab GIT binary patch literal 1395 zcmbVMeM}o=9Ilj11R*ZbkSU9o5+{T9u6NfS?LpVHcP&&X!_q*v_;p-g;8w0z?~b)} z!I0^;8UieA5nVRsU>p00y0L(B8)IPNwg~Dnl&Ong+#=IWClcd~s8^uqA7p=cxx4q{ zp6B^}yuaVQUS3v|p89yIN~KD771JJNT&+B7QdTH$6TFjAhE=k|CsznHa+nc;%H|iU z0p#MDTHpbUzwzbEpire!*Kl5+>~oirtiZ!e90N!Akiu4}3ayb4!v=s1RfAeCXwm$9 zc1Qzpev78c=+?VK6sY5hqavt?mU-D|fHnIy)^$)}gj580ATv;euMbLO#G;wkC6#%6 z8__`X5IJDcEI8$JmqU~w0>}vCI#!RO5JAAG!AKCO7Q*x>hUk@>(4hv>NRU`Qw0LP0 zYofn~^w7>lTgu9!sgvapi6G%{7!KpGAl4$N*=&w$V3d^Hxvgd-jM4>PB|2&o)*{!9t33Vb9l_X`IF}lNr@4a{d1&XNckq5-*Pb z6iZ@DslfPjsq~e_QuBbI(lMga8V4_)JE2lN(Bq%gIb|sJDBkap1wsKta(@v1_|}PLOitUfh&gxkM;ZOD I{iUt{07gspaR2}S literal 0 HcmV?d00001 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 new file mode 100755 index 0000000000000000000000000000000000000000..bd97759ad4aeeada64a2dcba7b825bbed64da987 GIT binary patch literal 3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zR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z0002&Nkl1l(e+DVAhg{F8qKYc2sG^E0s^~i^HEkgL*6GkQIw(<_+B(40GdcmE{*9XJCAU|;0f!$!qs;(yEeX;DiVW8^siai%vth9-Ni00000NkvXXu0mjf D>g$*+ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_button_expand_closed_ef.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_button_expand_closed_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..5d3969cdcb5ad8080dfbb65d8a40b874da088502 GIT binary patch literal 1740 zcmbVNdrT8|9IvP#Fs!I-JRCbuRFt*7JKEB#Eee#b1q%eoAb^IWy~0V`tLpqXDoHIHv&*o}T0M8dQ6##Q$QM?PUyto)253cK&ZrE z0#5-c^kH}gA^ij7n6*0AZv72YBp2mJ)(tfX`>cTpphfe+(cHjBp_O<+EU}kjEDyLBQ+-(%K9v zwJ=s9oz+F}#9#(R>4hAQ$z)=i0@2_lypAStLDIT?B1=&E=XG=j5ZK-QZS8#RAy;$9VM5DLHdTRB2+?15GaKM z`GJ853WXyuEC@#hAzWz)91@DaA$)X>b}1d^Zv7=;lD42L73T&aBoq5=U=$`=I9 zVdXj_h3S;|oL<7NcLoc+6Dtfe;21?3;z?37R{=2@Bt;rCNIei1#|Qiq2%U;F8Q0m< zGvloUHxN5;mDE6Lf$8`PiMQxS5Jbv_P%eU^wB@kfRf#kl3X=xHd?}yD181?S{}VF~ zZ4Ad=9RDenxg)v)?aMc%PjB8d53Zv-#z42mm(GiSWiTA3 zf_2i`P+!sAnUoZH>cN@1t;dOK_o;`C4|lo#oL73KZ)C__kkR#ezUk0pO-09;$CLve zeo33UB4xY3n2iRnZ#m~QMLmzadT(qn6*7}*^@B!hrnqO`zC29dD8Gw&z4mNt{nmQm zi%qFwMc z9DX*D+}!3-x#;tg@TkkU&yp9BHcOGVF=|z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yDTlZt0O|myX9rFAgUKDqr{qD`|*Yk}Xl3&1u!H-LzmSmfUxz;*Qp6+jIqyGg~e_bv@m?A?;xD*(qJ(sfM1nTelt=O7$9qn zivF^1X-$0Hk#Yv$cOj;(uVUvN>)GuizRxBWi;55Q`wTXpY>fVBuMc9`ckTgBc`Pj^ z3Io_h1+U66uZ}aq*D1%GWi(n%uQr4Zm$F<~RT*Es8HrSk{xlS^iL#?H8AX2sn^uQ% literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_button_left_ef.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_button_left_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..7313577ec01e80d7320bcf839017c9977f109854 GIT binary patch literal 1562 zcmbVMeNfYO81DF(f}-Mvr>MIaCgNtBkEVg-s9f5#0@{M5O6PD|+CVc%Q<7){>gG*3 zsb#x~8#0U2DHYrwQ@7K3#~dK;)NSe=p5x}`_&U#Ra^l2IopZMosoNi(e=L{e_mTH` zp7(u!@0&oObxBfUYNAS|O3KTnZOW*QJQJT)-el_FZe^GynH*9PUncpT0;8hbd?^Fu zan5qa#yH*8Rp*#&l`6K3wL2t-Wf|$>IgK-7qmenEf>x=rb7Y^>Rl!I=DO1jR_25W* z2MDlkJy@)>z!sm8@vyly0#j6DwYzF6T!b6USqx;$q(Zas}YRU;Ut;~j9;Ll zCb-K;8*LufQdWAB7OTCIQ&xM$v?v43h%SNk zNi6RLB8<*bex0NT6;B_9!1*ke$HZQ7JW)!@Ald1I5Dg4*TqLeBYf-W>|GM!+Ytdfq zV;~zN^6Lbbavo)AQLvJ`rwc_46>rD_fmII0SxNJ*bsXcB@@PG%e9^dBHwkBH&4?D) zYEc3q!B6or^z0~W>R zc}2EqH@7LS{U@hTl7D6P@xp_T58$)4*RtDhlj%l!MeudU`azpeP`H)b$`@6}p85x5tG_kKSF4R|o}>lN}} z^P8=$-Rs*=?g{PC6rGq5ns<56jvl+(L*G-?UwW@>=O5J8svqb6e7U6~|GAZFZtIa! z7Mtoo4UQdH%1;OCQxb<}7T}@PRa_qML znC$D9Qj^!WU#*xC49{ra(!YI004V-*?(i1zR?Om2HkFXCynbx@z`RxGk5&k8%;@OL z2^7^eh5J#>-iy5{0s6`-wOa?9F1XR&-{ddCXHWKSe&$HRZpYGZYU+QeJl@oMW3@GX zCl|ja+^Lu2f^y4*6A4orE_7QZvfJ4D?iYpWQfXIp}q4MXYEhFU&TAGj?MgZBgH zmX!qG58fPHrT+X*O0V4Te5kqaZrYw^vy~2~d9RngogtoXub%yjV9xFueX}}zI{vlp zp(SlCwnNE1Yv7r~#TzWkTZ@I!eZ`;l6(;a82I)|`=jg}D=XdQrcqeD)-_zHs_K)^; U4ES#hNB-7%CM*4kVeMQ00OxEyKmY&$ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_button_off.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_button_off.png new file mode 100644 index 0000000000000000000000000000000000000000..7a0c33f1f188fb6adf9fb51ce9af3fef6da87862 GIT binary patch literal 6416 zcmV+r8SmzaP)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{yri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K zVS-Y2QGom;+RQpAYztD@PIM?fgsI7MCx?fJe+8iA0%&2G1x)~;g%Hmt;D!(EQwXG1juy1-5~LK+N+FktVS43AamL27y!si~24I-Nd}PNyfa zj4c=|-V79tM%PkG@2YF;j6|BEZt9CTd!Ah_$r!&R43Bc7(vBNvLrPIDW3~!eWYd$# zBqu*iBoeO`i^VKHhRs0bYg=1eLxy4O@dqQHsjF{8Al&3Uj}TBoK^b>9kvls|X8E+j=51-^>j99Cj*j(=v0Z^+ zLwhjNf*Bc9K7mpPKuXI1UKDm#mVamktz@|jW@ao(31m|-q!Xh;2=Q(rk$B6pth@`L zz{k8nvJyye&RKJF^9D-kcEj{{1;b4Ugd1U)f$~^BiLDxhI2plWK8-?l8pV9NAcQ!c z&1T=t=kpm{0$X(vjXLY$$jC@}(|BuZYYSs+BO&BULP$#>*gy&mwbn_cRNS(xu~aG*$HHG-;K|n))C}V4 z)vL=TXq9bjZ0tf`q%pU9zB*RC>N#s%xvyHaN{^0?*1lwTuqG~f-JApJLhoHHAmIh$ smIdPFw#>ltWe6^Vcp1dsm-hby0Hc_21O$}M)&Kwi07*qoM6N<$g5}T^DgXcg literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_button_on.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_button_on.png new file mode 100644 index 0000000000000000000000000000000000000000..2cfd4ab9f370b8df101a45b16da0c45c6537b448 GIT binary patch literal 6625 zcmV<786M_|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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ra{pn(=QAZIy^M=XZd_?JLj6_LGsl>A*F;60vhK7 ztJZYB6^X{)2GAdi#wQnTJxc}0O&$N>@bQOt?)s#6t0BVt&T? z7e-opT1uCYQb0=S8oJ)!+SYm`8jBwT&>xM)FV##-^`@`8T`e@XwB7da-QWIB5WxMy zb+?a?kM*QyXSX6E$1!E_Xhy| zhYr3yw%GTWoEZD+;P@Pp$2fp406j{nzU1^&b1F5nwpb`M3n3y>iYBF00D!I(bPt7j z&hILa!w4BhJjpqqGEC!oAQ&8Oio`}a=NADC0=RVe-2?eM4db%H(bC$s;P34E_G5(7 zBmV6Gq5vAom#>`KJUHgdEnhhRvj9>6rT~lsm^^&&z>;iSO^h!i9G?FF${WYy$%Dg_ f2ZyI6)c*|tj8}ID^FXtq00000NkvXXu0mjfi@I@u literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_button_on_dim.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_button_on_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..7896bd4c9c94e7749afe298e5e3d089ae8705c4c GIT binary patch literal 6525 zcmV-@8G`1CP)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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z$q@r-0k#KtDFMf;r-tIjS6>|gVKoLw^;Ywlmpxqkxp#_)_Rmfh-bM!+->(ER10Xvv zJn%b?=l=P+eKo6ZOhbsc{ntqVZc@PZdY5OvXLt%wHAWQF3k&s3?Ba0`b0^)Gv@)NW zpP8FM2ajMhgIsDs29VAT0s`pdxnU< zJU=z}J#_h4TC>-_?0{r$sBfR+Ie(JdV8#cwC}h^@rQBACIHr_#tm0Av!fNv7owA>e zw5<-XQ41u)OR=pGKv=S{@P>oA*PJ3V|6^1Ozg{Vpdv-vw8RTV0b%hYA>`?CGwrf9_ z=;v*@F@xMK3T{7L-_vO#mb&s;3yY^6)Mn%vCj4_0gx{xi_f2@^`0MO9rDguDH$yr=4h|6JGO{%{1_=03MHR^co4r$3dg%BGduucdu zShuU$4k~mRfDh(*2F`);HZz|z+Wf3MS9-m%e+0k`jjp;x@@@o(ST#C~*~!Ay9;9L6 z(r(;NTEgb!fUs=W63ZT>u^e9glr##H7q36WHny`@k96TH0PWc$UBu1DT)qEs^9fBi gA>M@eD>MFg05y10_j10s4gdfE07*qoM6N<$f}fPXm;e9( literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_button_on_handler_dim.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_button_on_handler_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..cdad1468722ad6d34c5f90fc4f863b2f70414a2b GIT binary patch literal 6154 zcmV+l81?6gP)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!j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wY;N>;8(H|?R-~IRjC{*>>~HS*ep4jJ4WtFw9^j<} z9Iurcip_7nIs(E*43Jt&&F9a0xbvA;BBHk!W{OMb!NT{IK)L|D{8;`;$8-N|+li(e zn$i#gupGci0B%yi_6C<{-!nV~s3s!{T7?B2oAjMeJuF^uZ)s(IvNXTgKo7TIEccO4 ztGl^;Zikz6kB=Wx>9K=h`#`YWSeZ@|uw4Pmez<1Nj8?J$s2~m;CW=>d2mw^D*|>2k z$;|vo6ht4^ma2W(4740%XJ3n(^s<@Z%(2{d+LeDoA-7$F5eFG*3)oH!)N%mJ7LYa| z=nJLy|Hg=>FSHzXD>I9R;kmWk+ROS6kt(C2Mw-5|fVK{7Ww zw9E0FXL38tNPfRUW}EKhwnD^XN@>R?E+rtWu4vvX|JhF4S^(R%Kr-AJ+X?}M6$_w6JLI@{2n%iZ&_QAw3PvoWyayu2=VS2c`(?qPg z+6@cUYYv+8vdo0DQ4pT1mue4XtL{pw{Mx4R)KGeh+|8~UPNs@>2^8vr~yxrG5>ab^Jz z3*vH^E8e~!nN4LK&z+Q(EC?a;5XcE3lK5)BV6O~11fap}Gf)9ziJ9*hZEn{VD@AnO z526jP-8KV6Y?&Ox!c1|~-$-LQyw)yh6ld-{e2DA#&OeA-x`;=&xq9&S=nhSfAU=Zl cd((b50POY_!(f2v3jhEB07*qoM6N<$g31qfcmMzZ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_button_on_off_bg.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_button_on_off_bg.png new file mode 100644 index 0000000000000000000000000000000000000000..8e522203310b2cb6c746e6ea0b1b97527e0aab50 GIT binary patch literal 6313 zcmV;a7*^+rP)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^@S3L16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CFynNFwEvlh^w??yN;nAAorR+-M%kALBlifAP3c`iKR zK?tKoWB|!M*A~JmKgo>*kR2VXFLbT%?6-D5uzkm_U(Tl+Z{!wQ??DyA2LM!7RJdEV zZ2qLNv0=n>U3eb%zeu5QY5>XI)fF=f#c|IAb7+3k#s_-ZT36YLuKnA0?*6ICbu1JP zKuyX$10b(72os;%^w7lzy1UL&B3;jQAvlM}JzYUp6zXyZpxim3>3azcg$^Ntdq^hh zN4IQ#^khSQ{gid|-*)WW{j7Jey0|P^i zR8k^^P)jIFYMevL+3TDKc0<_;|2I}z#n`HWo=C(e*L8M$R#Q`*E!B@ZcJ6+|FMq8^ zFmu_h-i#*&;D>fYHk%EfJAa{ZXmGee0L+xWCNRqz>`KL@cS;DXG-)-XMHcS4Qd-_x zLdx2jnyYPXEkpHnbyFn=e+u9?+js6hR`4(;smYPeUc2pZ0Kn(97U{GbUDsm+1A{d~ zL&LS>6BAVcA=IwrVXf5+=$M}nS=gB2E#k4tYsqB8SX0yTvC4{ye90NE19)NQ?zi76 zDq5?=Tt^Wg`YsFkeE!bC z@sHQu0A&1;Lt;O_ul z-?{7Uys&0p)g>1NDAX*wy4!;1xwl1-mNm{jNXhWp>u>I-jPC#LQ{QfaDn9qsa-a}G z5DtgEa5(G*-M?V#1F#>!zjy84b3zp5IqV1bM>PHgTsJU*dOO0(Tvi2DLTG~qr3FB1 z(5JU#!%$c2oq<|9a7?!?$nM4M%8gCv9Lc*Sxs^E7J?<+2go1vb)uy5DXFmquu6tS% fOq>NaoBeM9((X_$NP_O{00000NkvXXu0mjfP|eUl literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_button_on_off_bg_dim.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_button_on_off_bg_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..0f7bdba489ab0ef515302045bce908da77fd199c GIT binary patch literal 6252 zcmV-y7?bCTP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb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4Ka049W>%a`7ajvP7q;aV7;bv+lhW#!r4 zk|@-s2KJq9E_Zt^rleBDaUAcox1Sl0N6!Jcq`+TQj(WJ8le-@Hvh!nx5P*z`#MahE zJe^M7xw?AKd)$g!u^k(n@x^Xw1z4Y9W`(sP%8Al)tGbbo%Y=Xs878CA)%MQz(;`j( zqs;s=fDPs02g{^XtsBef#&6K$_SavkYy6lEE)_3y_ZL$;j0Sd zmIACnca8Y{mUUg16;Sl;09XOAs+4d zYT44@JLj!-?U^SBLR12r;4Xewx0@35bg-3qyGC?a2F{o4DTJ}D76w=?q6GM+ czo`7*04Yw+<4-*($p8QV07*qoM6N<$g4rfiC;$Ke literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_button_on_off_handler_dim.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_button_on_off_handler_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..17ae20afda72406f35334d3dbd3a110022da1c4e GIT binary patch literal 5526 zcmV;H6=~{;P)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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{yriy6mMF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oN}=>9H1xNrrG&H^6-y4+HI%Oork6j@OsGxe-VB1uvVhr`imI2`7x#}}!d zuXky|Wz8-p#slC32pq=^cXs!-ea~aU6(Gdwi=(vcnY|4Xs%o1Yw9Y$2GT?*R(czmz z0B8A_=K{*Q{l2Ojs~~_QYwd6W1OR-;b;IrL-3OlUbH@=&&4I+~mAxqvsy#o(?!(F3 zQqnZVaL}I~9~~ZBpy#>rvKr4{2EI&XTLcsq;B(F!+dF#?{2&mH>#S@Mt%AP_5w+c# zR@7FQxG@G&DkO1?;b1U6J?))Xpyw4wSKE$u*Nyq`8Bf%!3nkcQds$2OuB_*U(m`x^8@8q~I)ATF{JYR9N{pt?PDgn$Q zpdi6xjCmUyTb(d$1>E6;bH3yN&-Ku*%&^-;n6fNxkfoxOREVNT4*I8~>2xy9!A6$a z32w0Wb`=3U2k%%!xSVsh)7fY>!bks|47`pvVbuEHa#|ldIKeG@G95dJgA|P`c=tM)6CE6}K|2 zvyrBWnxCD;lgaojiso}G@JcEsp5hk!?U$+?6-Q{3V9y+YAcQdA4?NfN93dPoxL}kq zN+}^EGYONovuY)!PGu^SB$o5DvnWlIB07^6$YcfRTm7ZQs%=m>LuP}vJ{SK+vD_R$ z>T(fQbXn#WEb#IY&~N=4n_u&zLQ}Z~>KvfT=cEFhRS2m5(9l$qs5Rh~HQ&gutLiQ` zZfy5$$)Xe09zf&c_tWfzz^6CE{ Y04W`T>WG^32mk;807*qoM6N<$f+e$)RsaA1 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_button_radio_Activated.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_button_radio_Activated.png new file mode 100644 index 0000000000000000000000000000000000000000..0bc40f93e87ef9f1ffc3cbe0313f2dcb9f9330cb GIT binary patch literal 1837 zcmeAS@N?(olHy`uVBq!ia0vp^_8`o`1|-Ad1?~eW$r9IylHmNblJdl&R0hYC{G?O` z&)mfH)S%SFl*+=BsWuD@%u1Od5hW46K32*3xq68pH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$4YX*Vd=BtkpTN>R!Wzttw?bj)J>(yXnh* z`R9K-%ILtH{hxL>rOo&&b^d$um)#$$YZ$Zo);zIq{-e0S%@cjAY=!;oT1L`@u4{2CEeD*@Vy(#S0p%-6+o75|CpdTTp?U{HO(x+U% Ux8z9EB~S(C>FVdQ&MBb@01o5nYXATM literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_button_radio_Activated_dim.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_button_radio_Activated_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..9835251757fde57bf27e447208a268fac70d7e11 GIT binary patch literal 3662 zcmZ{nRale@+l61G8|mJZfJo=2VTSG)x{N9##2&{HQRVk80pfK*dM#po{;|1$yJ-!!wM*!T-VZw(7S03fFN z&sad-2YLV?(su)c4Gdhp{Js2Ky}a2p!C*FTUoRK8m(BnXxPmZ-LW~b+`mUcEGq2RU=Yny_&o$9SsG%75)mYoAlAp)wUtZC+=0W`D$Jtzv|CV+qh5H^gDc?#f!0QMuCoPofb zT!32b%uMdrvpR}>zQ0Z7HpwBmq*WuW2n2la&CCQ@c~P2l&!{CG9y#PG3HAl$GKfZs zlYhfZ06<|H&EIP=cY!FfIuuGWxs}XL;IJF-fy2>p`+j$-+FJ<#HvPk9?)in986#xz zB0TPkpPb;h+7cJOx=3_sB3Ehw3J+GyFy8-lqgs@TTwdPY*;&#W09iSVnT6g%`|Ntm z?p|Jn$=zQ3{?@g{6)9>Hsg85`t#9I7r<8f>J>eV2)x8w;+cx5dTb4PF0Zm7wIUn`5 zA*D~UN?sC1w3H(O^#1AKli7#oTO0g0*a{mGK*I|KtdKN;3L7WvKiWJL=Keif7XWb9 z?$!I1mjFA$HF|Rj_He3rr(XC3h;Y$-?*jm~DqMn)v1Y|#0sv4cjO1%jW;*Ys=kLK| z?!{g0CBC(nd;{Vd=mSxJh@M9<``SOPi30J)PByUc*$aJDViE5#bd62-CKK#4`AjD7 zO@8e_kl)MO5lM)nJV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y_0=Lgeg)~R92ktq2*O5 zXCF=!cPO^s)j8aF=d&(H71oZhAK8Kk)7-}WHCSxadc;<-B`~q=|B;aYtu!!cF^__; SD*X2#0-CCNDs>?HsQ&@>_weBW literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_button_radio_activated.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_button_radio_activated.png new file mode 100644 index 0000000000000000000000000000000000000000..24e87413f3c122ea478fd18e426dc572501cb8b5 GIT binary patch literal 3215 zcmZXWRag}47KJ|q>F$;;fuWIx89D_98A_T#kP?0=K}Mv+pOj`0L^>oSh8!A60qK%1 zfg>R(b@1{$=VGmOvG&b=_sx!ZXsAU-%uEabAk)!SH@QufzaqrHb#q(F<=Y_g*0%5k zfQ06+a6o1@BLKukPhhZz4_&?dynJ1~yg77WFb?l$UM^3bIs*_ehc-pRO?T*(&X!J~ zdeLF;^t?>y2suokv0=1{d_tT=l)BNJd9!rJ9aI_`cr5+7(YSGOVQ=Y-g-PEK&k(G0 zeuxXtkA5?7u@ao`KGkxzIec9=t-Mu!jIJFez!H+CYD*eRhmn>**{QyV_jUKKtc$9m zh%0T5z<)bH$(cD=D{xZb@a-C}MczG*DKAB0dD>=A!HZBRUNCX=Uv1*k`JWb_QlJNuZ=C zz8?<(kef(%yY2B+zzBKe$cRi_J-MyOZae-BmxIIF^~PwKw<-WDexYO6!jM|#Fa`WD zkLwS-2Y9ZJNpk-=i*>1?P^|;GJ9Fm8-hbI>iJ};R{^lWoc05ri>GuC{k?Wi2F;ApAzART|EQfsM)LI zn*bqhm}~gTsQ=BO%9U0wF9>tdN%8^Uu{w_^e4tjPj}QR$T$E6i8p}xsqc9eqwd3wW z2g#+K%xfr5cPEq*O6(NI`pizS{1sFna=403$PV&Nl}!q3>>8QuO)lDL)<~}8P4UN` zFsDPH1x19X)=x-d&p8*3u8eCQ5c3tmY~wE$d~jdQ^_v9CPY8TJ4WV zjncpp$>8}zIqcchv=RCU!x`;j4p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res/common/usr/share/osp/bitmaps/720x1280/black/00_button_radio_activated_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..f37780302600ff78f63763e2167473b6c4f4ea78 GIT binary patch literal 3183 zcmV-#43P7QP)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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^>J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;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} z0004+Nkl`msJKj4l*xCu=YS=k4%C2Yd%Xj+fji(TPfa;2eByG3_XU0y*a8-TiwR$~OWnz~ z1a^xuNn^op0^<(zO#&M+;H$Q(yN=Aq*LRIy?&CNc^f|N8@pX^IxgI)x-Xp#iI)26@ zeoBo^!1#{GXMGJF-}Z=q2p#XU5ov{vzqM_t>*(3sLF1o*8xQzqo|@+vs(k}^bC|CS zoW;`EJOam#av9*r*Hp*XIe!71I)I<#scHJEpcVYZxjpxT9b@^#16%_4^gqDt0oM#^ zfax3maRMCJUOxjC_&mCP;XjP7NB!Skc;ST?UU=b!7hZVbg%@6U;e{7oc;P+7`v57A VUPU|$02TlM002ovPDHLkV1h!e@O}UQ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_button_radio_activated_press.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_button_radio_activated_press.png new file mode 100644 index 0000000000000000000000000000000000000000..11fa3b0a80771f88f0661f35b4be147669264c3d GIT binary patch literal 1463 zcmeAS@N?(olHy`uVBq!ia0vp^_8`o`1|-Ad1?~eW$r9IylHmNblJdl&R0hYC{G?O` z&)mfH)S%SFl*+=BsWuD@%xRe+5hW46K32*3xq68pHF_1f1wh>l3^w)^1&PVosU-?Y zsp*+{wo31J?^jaDOtDo8H}y5}EpSfF$n>ZxN)4{^3rViZPPR-@vbR&PsjvbXkegbP zs8ErclUHn2VXFi-*9yo63F|8KW+g=7RhMR$W{Yl!|Z$R@KEJl?AE#L8-<0 zrA5iW_()TRX$FQJev3c~fv&OgFUkZ)N@9*nesXDUYF>$_i>(q+MlU5Z#md;&#mL#& z$<@%s+0E6+(9p@z#L>dh(8bKm+{pqc4l@IrUIRxbb4yD{OBZKLQ$s^nBMW0!3l}$6 zQ!^727b9~M7nokpyyB9?yyR4vy_rCJp?WRw>a}t%N=+=uFAB-e&w-_YfQ&@&a&{jOl>x$Qwt{;Ibf5`h}DYnWR_J%3l$PoQ1-Vwne))bK` z*sCP5<(mA$jiyopOkrAORr{2qJ5-8PtT%YyYn-n6t}Jif-Lv=3PEg=E9I-kodQEHZ zhZc34hn)TuhlJ-LnD?~1Z}XIe>0IAi791(ncG|%+L*$j|^i=_#d5xb=9{Cr%SHk!u ziwa!Q(ZgRpzPA^`!BUzhCaR$+QZ{8^r(0+F1%{t$HiVR-%FZ;^-95jQM&;zQ4T zJzDx>lG2~KuRnx$eVD%PaQuu-SGLu9EqrWZll8%UM=|RU;Ujh59&U+mw$nLQ-E6i; zBWHsXf5GW#hdgIz3L0wPyYks1Y?j1MwZkWFZtRL+T|Y}QjcMD%B`ZJPJMbY~qgP_L zUG0-Ua~qU*6uvNd6z$;mbx+U1h_lz9^&j0T&(N`H%Hn0$rf(`aB%--L`ug_^rX_#k rU*Fos`scSMMi@hb`~8+$ZUcrBh6RhC9e#2URFrzU`njxgN@xNAxT_tj literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_button_radio_bg.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_button_radio_bg.png new file mode 100644 index 0000000000000000000000000000000000000000..fd590c7ecc7c11aaa0d25e8e944e5c67fc19cb2a GIT binary patch literal 6227 zcmV-Z7_8@sP)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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%c004N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*bqyC<4*6Xz&W@rEY zv#KZpZ$Wb2&VHcjvcd3;n}I9-zy#;g7#Mt{cTddT*;)TUKaIgSN`t9HVyRxQ&&|#K zw4{T6tCtPhiGq{)fZ6SKK00>$eTTz2$T)wWGae(5&C)cp#LkF7J0$3(q8_aj3;9eo zn>oNczGm_|yF$wgMs~ZM^$!gDT~3!zlI0%GxOTyaM4gDL^;&(eRLpPZ^RJF@_64I0 zd%F|h&m+N#2rH7%!ua#9n7t9`M(}S^j%nv=7vW-;3fl?iH|`+5>0Q@$zw4scNpTsV tJK_0ujC#{skC)mXX7o$zKX-8aV*qanrZS;TekcF{002ovPDHLkV1kgBf`|YB literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_button_radio_normal1.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_button_radio_normal1.png new file mode 100644 index 0000000000000000000000000000000000000000..cb930a5dd37c5caedbcf19c6bb7bd8513a72104a GIT binary patch literal 4623 zcmV+q67cPbP)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@|##Rr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M>qyc;>GV4uMXTn0t@`HR z;NZN~DS5gqqW6M$54Z>11MUI$fP26_;2v-fxIOaU0RV%3oA9ZG{Wbsq002ovPDHLk FV1ki6);$0K literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_button_radio_normal2.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_button_radio_normal2.png new file mode 100644 index 0000000000000000000000000000000000000000..bab4ba8bd18d24dac57a664a4588e318019bf7b7 GIT binary patch literal 3929 zcmV-f52o;mP)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#CDyyG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2l_4koTWFRSrLLnw6Cm&vFH@=vDjna!;8$HpSdmi@O^Gaqfy=Ea;@g`d8*ZF z-&RwSBoU9ti9{j~fp;%5ckXM#C+d#h?|*M@Zmwk9XP2&EFv$G;JdsG`F7Qr2u>DH- zczg!t6-BwFD9UG=ra23R0-a9hTqp5*y@Wy`{C@u<;49#9UwisK-);rq3*c@dk+_ve zB$g_b%0#77p3vr_;&U*ce`~7r)=n$jHb)Mo+wE%Ft#~r}`970jJOBTlD#S zOB`*uEdU%G9N==fFxJ)@M~^|*j91RovE1aLvuVtE@1J~gY;0`7_)+RuT*Cf?xDB?! nHrNK+U>j_MZLkgQPyIgt?5}s9Qe{&h00000NkvXXu0mjf1^sWi literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_button_radio_press.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_button_radio_press.png new file mode 100644 index 0000000000000000000000000000000000000000..14357c323365889d2ae3553ba30e8755cf0ebcf0 GIT binary patch literal 3620 zcmZvecRbXOAICo;ppw!dVH2X)j|4d5!@4{_q*8hRbN7vF1 z0Lbb8GXap5!vX*x6E`UI!2?%se{VlmZyzo_D3r_Rske*U6K4PjTtb^8Vdi^GD%iC% zh(Szvih;KoBPo{|BrcpGiC>tTj7C3(yI_&gw3}8-i->(FKZYH+d$Q{~m5rcgL8(ZS) zC=jm?Kto#Z#O;UUApkDIl$Ay9b&+%c1cB4!q(GNZc9#T4G@g1Nl4(N_{+gi6Kk2>! zX*dI*9-IIv0@Sq$!qFN0=0H9XU^nXMun9a61MCD|?o0#W=!?t{0>C`PU#>eFnFjTf;`<=x2dkzkpH`^2CKI#Cl;U6}6BMPo( z3s)iz_q_SQcSPj+m^}X(HqNDvTD<|t-&=y8`uvxTR>8aG#l`Kdtp)u)h_(F)JoE-f%#l6r*FA-ee1^X1I2kYnOK*=vWDokX4MMsoZ$=k&ckJ%?t5 zFvF%Poo|9>R{W_{;k{VMd!c^5DZJD7b` z0GzaXch3lt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ated.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_check_Activated.png new file mode 100644 index 0000000000000000000000000000000000000000..135a0bb36b98ec5c894c243af819318ccc1fb9ea GIT binary patch literal 1784 zcmaJ?c~BE~6kenvr$^ONu-Y}Wc#)GFBql;6K~fW>5Ctm&Az4C%JxCT4q$*%_q^Lzv z92H1GQR4w3GGOr_Lo1h60YRl!phHEJVx|Y+1>GQE|B&vy-QTg__r3Rf@9k_xaL_6j zM|Vd609+)2q7Y*Awchr2#4{{vW(P62;o@*S6ph983M~W(RcH(ZN??T=3V{@=WVL2sQxleGQmG84uxL45Zc|0@CxU>m*R45|F}JGMWtY zhvGDWTeMK#07JL}G{6anj%N^%Ms<0_+`3IAfuj&SUO;*q zRJbe{^hdQ2$f9_Yl{7jXWV0!BCX3Ccdw~oZok67$#wOF5JQkbB;DBQniSVXX#qvT# z0b{<1m4Fn7;~0-h)$8>Xy*CBbs;P7?muuBvFvtXgtV>34g@KIdJjNA7kWQ)9V7LZF zK&zr622H{RBqGwcM}V;jSwuIMCL&=}g94+{DKzVm#(^@~|3hJT02xu}$6q8~DPs8uxg1&mohcgUicn<| z3?cY9SM`p|nv`p81sEediy*CLGo%X8qA)mmWS(a7SQwM)jd4|z$KpLHmr4XfwHEe2 zg&yA`y2m=5Xj@`2(fANTbi0;l>nBTqA>wOEkcfnGLwny58Pei6r?xig#o|r%>9*Zd zvLXsNaqCV82G)NIZ?z34Ej%55L9zcrv~gbbM-B^hI~JH_E$ta<{%hl}X9~J&WC_Pl z+&(b3R+9JP>frFm5f1B8+iwL6>}tIE?=fHg(5c%UIh^pCIlG|kG-*|4#kGCETL#1K zZ5&K~+@^BqJQ@0IdCK1Gr^DHHw>&piL~Y}*A3QR!InB4fy?m>p{SZ@UXf56Jhu3Sb z%FyM3W*3h)H?`kr*1pd3dIfdX7nGNjzr3ikoUJb3C;nvTRiiQGQIJ_(=aW|TrOyK7 z&*hKV>C4=v7e?b}JY8edonh%tst9qubFCnkl+%P%t8MOmkyl?o6l~`zAIRwEaM?$n z=Fh(#e=J9L(D^_vXI%$fwC16%wbDJ}&e#2oz0fK(TGw5pvZ zoxNkns|Hgr7Ja@@*k*>N)Rx_4;x_#zjbB<_QG462X?RPqFLM8oATclbN#atKp{Z7~ zCBiM$tJ74r=20ES%*tLptCqnr!N7C-Mw7zQy5Zx8-qOtCnW;_9fNE-(mQh_6nQhj5 zzO$~>Y2z=JJ1#Ma1-I*V_X7@qL)GRxt5Sc!QL-go9oBV!Z(S#7;^X;FuS+b35ySygJcg6e^n$IAzgyQHIYx(g($@JN3qutKbp5|8b z!=SDKa$|9lT8P+YT}hj^XTwnBY;tc?2!XTpdBx3rvy`Kz+HaG3_P8gV-RoQ-{2K+Z z8D%vYHsOsX>Ic;32Ttp|_Al7K^fG?R?5h|T6rVj*$HVAo;9uV;7<=;Z0|MZ zbocGtoYZ@(L1h{qIaTKRsCoGO$oCb@OjDWhfV=@42zmL!?ad6E3crz~Qh4|C%FhlF zI=MgZIZ>6_3`igM8mm2K82>4ZJ{VXe&2zn;ot=XhZf{Sv>9cqO-FjZIDGQff znHw8$_)<+v>CzPVoW*^yp6YmOwSM3-%o;hI)8&@`9;@gb@~8$*J)JW3ud9o;S^q^6 LageBZWpw(#@3-4{ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_check_Activated_dim.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_check_Activated_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..2df05102d02bda1a8138a59ff81e91acdd8d3f8c GIT binary patch literal 3647 zcmV-F4#4q=P)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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%c004NIvOKvYIY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@^4Vram=n6fVrd4B=gz}LxM|IOYlxV}Y&Kvsa{fO-gm%>e*g z3(yLFm+ZlpbE*nNZVuAt2TA+ifBuFdH`fw3!eH}rnBioqjlEDxKM@W{2*ma66?sR8 zNcMw2>VEz4l?&wO|6PjP3eXxJ197vu;>uBIs!resIn}W*Zj{!O%nUCcLLRk%Qd9Qj zL}{Iy;rPRyaES;_HRtM$3(e|a$=(sZgwokujk0rX?Bu@x9~A%!+6*q0QpoIRE4<5O z?_`G;$%B1Cp;`SQG0>(|&+HI(G=>?Dq3w2fm&x7<{%!*T_Js?LpKt6>rJ%IAe++KA zO6SSm+1_3xfa_bZFBXyO#Zzajk7V!eU?Tzv46aMCFXu6k1KJg!uVnA^RJVS!Qt#~l zVjKo9 z`d<*49M|QHDu+mQuYKPAo1FEM2K$1zF0Uff^1c8P0)=LEO;x|i-pLMcPnZD!NetK7 zSw2xp*~pEf>P_#-zVTR{{&k)337_x@pYREv@Cl#r37_x@pYREv@bA)iI{+?St(JMQ R$AJI<002ovPDHLkV1jp*=oSC~ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_check_activated.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_check_activated.png new file mode 100644 index 0000000000000000000000000000000000000000..c2a6b3c9e8be733e44e7ddde998f4c3cdf2713db GIT binary patch literal 3190 zcmV-+42koJP)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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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wJDA?t)tEWI0d#(w^qEQ|Njfl6BJj9A*Y?tvnJ({raj@^lGZB8uKh?`2&$=; z?AmzWXsVj*bNrYw*8l3sJ_r8qIs7`wyE&45Xl4B4G4aF`PdxF&6Hh$x#1l_E@x&8P c{7Tkk0DnDTF@a}EO#lD@07*qoM6N<$f~0}~KmY&$ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_check_activated_dim.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_check_activated_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..d2c3348dab9e78c6ded0f053a9cb7f6616a66206 GIT binary patch literal 3189 zcmV-*42tuKP)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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~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Q*_r^yH1`EA^KhvKoY5*tKt)Lc;R1s_KMk-gB$L2I-_GgD$ zY_M2pmF#F1;As7L*z^>$;!3+!z2)8Tah9ZSLpQ*`^WSAIbGX5ansojxgYBT*FLBLpjCR$pTtdrz)RTMM zF`ziqHZ1n_gVoOT14&F-MpILweV5zQV4QtGI4d@u%|`5^L?wB2TPyS>^pp9 vPq<)wZKtq&z|gV%(Zwo6yVqv>xLY-$aU>_rMI6#&{Jn?-LHr8trnG+nOyj$6 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_check_dim.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_check_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..fbab13e615c67e05af4fd81e2ddebdd3171bc4c9 GIT binary patch literal 5267 zcmV;E6m08>P)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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>QdQz32KI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?1BZ-s(p;wtwIK`|rDVdt+42 zSswZ7<n2kx8;VJWFP#;WQrOyZ?Llv3I!7JND_w znj*=m^Xglg_1}H?_g+-#^6kL<{VDC{n_hhRvSqdM+2ALhpIxdK)ygp2JAYoxX8!8N z%NMgu>bH*PCJRrV%PX58^tKZuUYnEYpI&kCxZm?{ zQ$9S3c-8T3%Tm>||5G{pGv`jPm|~*e_vAs=zksN=Z=C0DOfVGVeA8q6pvU_12EVxn zN^F-K_MBjOR$#$$y?FM9CoE})OnSIW7+P$9CH-CZx*_w0_-VI$cK<*At-0`iJ6o-= zM3r8T@bRR(Nq;*Q>wa)ZxK=mi4%6pvbx9hcT-oN^%UAJlzFA{9`?RCg+_sh}0{Ux9 ziiD-alb>-&u`zFsULRX`>FYiHnp+PWng3)yINqb7KKbO@vuEGl_EL*JdcLw|4v%Az z`%He{(^4^J_1E`5e9l&Pci*Yn#$UGFe`YXBK4jTax@FFMld!+{LzRNRUyQQL$d1|m mylMHjX$ORVoQSVykziORmiqXw%9JUfI>pn~&t;ucLK6Tu6{(c~ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_check_press.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_check_press.png new file mode 100644 index 0000000000000000000000000000000000000000..9065f6722c8b5ecb5e3ad54750c4f31dc1d13736 GIT binary patch literal 3358 zcmV+(4dL>MP)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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!A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HC=1F?J-d}?m-(SQ=%jXWSK^{U%dA6usX5{jpoG6NrZLgF%6GCj; z_9vzMo+L>HK;Je8qx^m10Th)|--HnBrhSdaXGO+_(H(~pHh;l*QbP)eN(A$D93PC_Yo)3KqH zx)MUH`Kaun7rY1SUkLGbR%K6;WZM-~a#s literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_check_press_bg.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_check_press_bg.png new file mode 100644 index 0000000000000000000000000000000000000000..b268899628ce4d36578a55152694f59b018d4c24 GIT binary patch literal 1760 zcmaJ?X;2eq7>*-?rNcnQtAemD)IyOYn}ozf0?i3j0~n)3WRQ?-AcoC`WPt>vc(fuS zhad_CJc^|w2vX}&pa^&&Bh@KY7)3-ylyVeA83K&h4T$XzbZ7TF-{*Pn*|gw5KO5^6 z)&v5;nU}sK#FZbl~{sI2NO67G!g~^5Lpx~hGhz4Y%}al zAk0^)BvMQ&+Q5>d2vKI1AsP@ZjwTSieGOWfTn%GDBpjvEu)(3)dJs@4*kFj4h%D0b z;AoY9q7L4a7$}h^s^v@t=<5S`8(2620%J13fW&C@ECU;y=4Ih)^DzkorbRF{8=Nsp zDhdX8s163ah*VEG8G-;hoe0sq=yYfeKp{gE5*dH#o)C@YMQ2eMz`F;;wdoW}mY6Sm zrwiY)!DtNAvPh(agal#&m5A!1ND!0BG;>fWp16dk-l)N322YLNWtM>t>*YF?7E_@b zz|1I%MB^|vh+8`20-_a(-V^`o@EQnjf3eu_Yq{w3Us5}mVHCO2wBnEsrah<(L!8We6!W3XRWW(jZ7c;W8i^$4kJ4_*_1I#h=9n zX!Mv&BZp`8s?2(4u+)!YSv(yq!%&?BMPp_wAUGPuP<=G21$dk2fLn-4qd*h%?&kE& zc*}=%s(4r-)S(D49bcAe4*dc$pDJVs$#m+6{GP!o=7<@MN2N09ObW#K0G5OsLoye~ z|B7Yy2(Li%@_p&!oA=EFYw(WI;jLi{)^y+mFZ!K&+4K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HuNWFoz#!AFNG#Ad)HBe}%?0@jth%@)C>7xhtg4GcDhpEegHnt0 zON)|$@sXws(+mtd{1$-}0$pR}Uz7=ql*AmD{N&Qy)VvZ;7h5Huj9yA+ij|?6nWd|v zv#G0vvxTdXp`oLRnW>Yrv#F(#nX93pu`A3Bta@E7T#THJ3=Q0zObiWOjV%pb3@j~8 zU7XAvEsb1EU0`}W^NLFn^O93x_GW_Yh3GZFtJli8C^fMpzbGU>KL?fq0y6ST@{2R_ z3lyA#%@j1kGxJjN%ZoKZ(F5_VOKMSOS!#+~QGTuhIDD-#vDok8>S|zUW@7H>Y~bc< zY-nidVqolOVPgCXPWVG83T&~10#n61Cu}lLkk;WHj9D@1EYrVgjrTwn7A1jGwc_Xy%ICq zE(SCp>q2m&$f6hKlVf;1{A*XpteE{vf;sEu*;%uf=@b=v^ZMrB=(_BEQh~EE%YXCi zFT2=H!Yme@z4!Z0R@~+GcCN+8TTLtYPCTBmGG4oD(F@z--oSEnTO_{XhczrX*l%gGoCxlj7LVAkP@#c`h>=UGOks zOuAead0_s`vaWyobdK!S=`XVRSG3^Q6Bn18Ju6dO1oyq!yW`x?8iDKT_m1tkv_4C| zL&vW2<%?f6Z`)s;S>14mQ|i7*es)xqEbFZ7e|!d#i&Z)5LYb_8w|o`#pYd|Rc1ADd o4KWOscGdS<-9L!k>SthPFutAAAYQkfA5`voy85}Sb4q9e0D&+YE&u=k literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_color_picker_handler.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_color_picker_handler.png new file mode 100644 index 0000000000000000000000000000000000000000..02250e61df6435784a67db7b19de7e033b40467e GIT binary patch literal 2930 zcmV-&3yt)NP)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|m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>LF`Plvku+Iv4%cUwf{eZRAznfcJq zX0jk)U|?WiU|?WiU|?WiU|?WiU|?WiU|?mH@rb*xX7uSK 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/black/00_contacts_button_bg_dim_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/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/black/00_contacts_button_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_contacts_button_bg_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/black/00_contacts_button_bg_press_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_contacts_button_bg_press_ef.#.png new file mode 100755 index 0000000000000000000000000000000000000000..20ca6764084a3f905316987e14ef9cbb05c3cd81 GIT binary patch literal 3210 zcmV;540ZE~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#fknU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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} z0004XNklP{H z?ONFdP7I*T!)iRJ+NZ-z+u&fCm5!0384zcdApK!Ix*Af9M6O z$rvMX6p*1~D~8^awZ4jVt$Wk7zKRXKCl4K4iKBop#s~m3e}XlO;z(@EXuFOn&Ah1? zhjSsJ0ZM3q(sg)~PW#2-T$p)N(RED8wv2XB96xbYSc5S}Y|Cg*#-kQp`9hv0=&;|Q z_qW%(bl7iDo+XH`d|@&kwQS31mw&ENh4FC|5Z5s!y7GnHHoY6@vfVaCbma@KV@h!p z5CGt-Fg$c@W#&!AJWC#iI+bS$nt4-k=-3JX;3}-6^;LNpErffH@3*loqlKXLRT%&} zRT$9+Do$wdaMY=U21p;M7y!sQOzYxw9sV0EU57~5x?iyJrmkUshCS^lYgi4dVOPLj kL=4q#2D^M3KSA8b01Kv!8UBA#_W%F@07*qoM6N<$f}P>mp8x;= literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_effect_footer_bounce_left.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_effect_footer_bounce_left.png new file mode 100644 index 0000000000000000000000000000000000000000..a7e11eb98d8d4f8faf544763acde82066c04559c GIT binary patch literal 6039 zcmV;I7ij2-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%Y2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%!?oQmnmVNcH&PH6X zIPTcSELLG_mrJrQD!0d1@5)F{QI*-8yZivPwX;0O&ycqu{4nXc8X*{`VoW zepDw^`A7-ZcY0fgvCEr4COIiPX zyP{m3zOgt)rr)=c_a7M{Z$ebW;<9th@07`nH=#B$4*qU z1*(M(+6KNtr<$I#IzYpG0O0hPApK`^TzXW#*;YvT?;|e_%Kwow7C#Ec-SknL`GZ&R zMF!Ob-)bOh#B@~iX>P$l_wY8S2V`^9o6}#~fo%jNbwY6o2A=`znHjc_B+4`e-m5 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_effect_footer_bounce_right.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_effect_footer_bounce_right.png new file mode 100644 index 0000000000000000000000000000000000000000..1275d343e3fe2c7d5745fff8460d2285bc05e02f GIT binary patch literal 5986 zcmV-o7oF&dP)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~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H1 za=?|*&;YP%VFERruq62*6%cw*tFd{=7l$lbnx@I-!t?42c-kt01l1cvS3Oig+VH z*S4Q6RHIwpM$VR~UeroSo+m+Q_E2w0dkR!Es!e{hBJuyq@TX62FJc5sUu?n0bRpGi@k$;?HkoI{CfOEc|wd)LfQ29_sPawb=- zR@87(PT@w_^e}HpY3Br7wmqiJD^H1gJ|u|z0>|zwHn1*N8YP%Y^*Xs*Bq{GSz`k#crwfCO?kN!oN2FI$l#z%_HAfYMd!PckbNfVL3affX%0 z=o*aZceX7mjdVVL9OZaaD3%2IV&OJRGXRmgUE@$Ipp@|9)2zPd`%6RBq>&?L zMPxM~__1tBSSAo^1;FLcxdr*56c@!)6!D%A@)hcq!K%&j2`6nBz^6_%q-jVpRYRea zC|=qhEp+gpMvgiQ=Mp$|iN<_-QwS^YI57wmxZWt7N4Z_JoW3$1{`ZzRZwYSmgnNt6k-Q*eHN zjwlV;0`=UY^PUc%gx%tCRh!Flw&-|L6qzLmy^*P)06H{3ONAS)79*hgpC+N%_sc-c zz6Dki6GK5-@emO2`3+YyA1 pD0ivZHq15!g?%<{n27k_0RUh4H^uWJwZ8xW002ovPDHLkV1n9^pJxC7 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_effect_tab_bounce_left.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_effect_tab_bounce_left.png new file mode 100644 index 0000000000000000000000000000000000000000..42188380c763bbd0db454a320cea12e35938f794 GIT binary patch literal 5988 zcmV-q7n|sbP)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?>%_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ZzkVFkXzty<}>PCEC_OSqJ%hAHWxr^6ELm- zx#ETDRY0_bMs(5}fU=wSN8mc)X|rZjq8TW@w%Z2iQ4=q!ti`Ch7!U<0tP<`ZM}viO zRU+Joky&PXfkK6^0P5X2FweH=iQR)vv;bSg3+H6=PIanw1wYN~OF+6|t*4u#r~)Fz z?4VZFj28xc zTr0SED!!tU{{@-6FrdG#Gsl7$^$(74cKSYBf+|-VmIe5AW4?BC073boJ&q0_yE&oU zt7H+_S!h=Bn=1rB>^;a}70S1O7AYc|gdVBi&4e)IKkD!~0_%E7{hhwgkf_NMZGI{s zMbJPwk%c2pt{C+wQUVnN1)s?YXKa}W@FO67D)4tFe6mxlpxrB4ixUD$hYBaF#u^Nyfa4P9q7vutWl$)wqdZFZI}E)^04;?6qwJi^hVlDw zaQ8uRylT}JFJl-N016u*M&M8`_65HTiYkE_ZD%*w92c5tQKNJU)VT*Cy_&3m1oB83)YcYf9i#&U(tz>!8cpd#^yL;l*3k=eNb5j`H&hF?jXdE`D-^;jDY-4oZM4D&S^uhIEJ-2`P}%rO-0b) zD^T{V8s>?jCF-l>303{kyb<*y+E8+HszH0T3VrX?7ElO$y>>Scwjnnhq52x^4->M* z>~8{5r_~rDyV_C6P}mmLg=>Dc=nmB=s5z$he5s%Ihi;G zgiY!hSP%+A9~(t$!HHKBGQDRnl2OqcP~$PYHu^rj*FlK0#<_s-Yd>pMNC7^mh00{|UM^L{; QcK`qY07*qoM6N<$g1uu4C;$Ke literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_effect_tab_bounce_left_h.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_effect_tab_bounce_left_h.png new file mode 100644 index 0000000000000000000000000000000000000000..88aad57a35d1ef1896c2a36e512cccdec1cb75e7 GIT binary patch literal 5871 zcmVKLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rI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0}ePaCrWe<``AyOo{EI~*fkJ*N0&4F^6m4iY!1LsUv9yw|im2S8QX;vJ+ z`TG`#p9|r=L%6bTI1dgTwZPG}u5BcN@87anueeqNlt>LA}sZ{{`ZHFwJaldoOe%JbUv;C<(m?h(@=4 zz(RhVu#!VY>MBD{$*X+x8nq+iC_O_FnGkjIEp;H2z@0|s1wlrRIq^z1HeZy2`{rNG z5%~qMdLgqCdaI#K5@S+v#xz+o6ekDdAT$%zCf$E6i2P{*d;0@?6Am%C;?aN;gqbADIeD+;B9cA30x1 zaz{?;j0p6~Wc>Ci@ zmEv>7=^`T%4vhlJ=apAl;GV^Np2_8!QAHuYw?+owY+fM)|#Jy#8M_;oVa*uNOsjBzOt;7ldq#oCpPES&_t!>s zy=;iT2V)BysU&7WK*8Oc|BSYaMvM1h*~uKQkH`3L0Bl34bi*B1%>V!Z07*qoM6N<$ Ef)%Dcm;e9( literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_effect_tab_bounce_right_02.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_effect_tab_bounce_right_02.png new file mode 100644 index 0000000000000000000000000000000000000000..3a245213e3fb98358c39c6e87169d5c036d9f85c GIT binary patch literal 7003 zcmV-h8>HlkP)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#fknUx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*ft%3msVz>y9fhQj+)aWQdnyDd<-}3&i(?kPDx)&={3sC{aOj{`R)eoOi#{(;anVoXa*lz=2UOrtB`3c+1PD;&caAU|N^2dZJFc(7cjGGF8 zlH`^|{@68oeViil6JVWHJfe7-6gvv20enRM=txvUjK+;6s0n(7atch#&34-Y?%|=A z?u3qld<&TrSQ(^DMW#Ifw0p5Is9QA9)v@9nRyRBtwL!=L_Xi{q3?1 zD53q_0Hlrl;l42!L;&7^zby!NwV74CS;Jy$ZoDHGjB-3OhGhf$jq=3J$qhX-O8pl#oq{BkOziNf)DAt*Tt4Zdz!=1*1XE zc2ZPFH0|GxA8$d(wvM_5=g^Q#-`*TTzGL~GxqYboP%X)L2E&^SfbQ|A6tA<|USvcp z+{l>NeTZXXZ2#n#o+=38~q`i?SPxvhC1>gXR>KQOFefeKV71OrpHe zt1D6f@vpphJ1K-bv3~YRS>E;noFS2apNLTHvA&+!AQ0xFv11Qn3Gz#&{0_e8B547v zZ#y5c>S{ehQ86dk6A1(u4DY#sLjL_BMDY{2ENtG$hzFS@MyHZD_5gOF_z@$`xeyxo z4xZ|o`N070eZY98h!W&~GezV`@w_>FNUfqf>}V*5kOL6~p}c_$wo>wuiMpdZTYGz9 z2xlgVX7#*^(cr)tXVcxI&>KA|E1Rm1Zox#86j}nOI!f5cpH$(Mi82E?&JMZ^=X^28 dHLl}-2LK=aRz|tqnTP-Y002ovPDHLkV1oP{$5H?Q literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_effect_title_tab_bounce_left.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_effect_title_tab_bounce_left.png new file mode 100644 index 0000000000000000000000000000000000000000..ee65cf4ef7058f90c3223bf4f38e8504006b1702 GIT binary patch literal 5162 zcmV+_6xHjAP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*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z)35cB9%#8xMnWk%O8+BLJ^kjBJR%Q-5xe{*!HxdC8<_Qo&5`G*{89mdCQ`mfQqC?} zo$UZ1-ayp*ybJw)6fOTOv)-%G@B1ZQ=>B2c)PWJ*@JSLj(t@v46RHq^*80KeBOe%6 zC}6(DStdca(IADZv%P(9FW9%|hAznBAcab$JpT~CMB-|`LXSc>%E5WnuQ

41W9DM z8BfO!d)}6R(fyN37e{)T{QE1i@rYu6=L9qieCe7{qZ_tgyU#~4q9<_zyqRS{0c^uT zxalWDsN*54&*u{dY#Nk^G7rZAfY#Ov7bvLIRk{PC7=(e$N`@(`uO4z>}%d zSpwL@`-4zIZJ_Y1CM=-`3^fo~>@qZ2B71z>;?zZvfAbi$71=J6S1#_W2TAQirTU)% Y0Aqu>vCJDA6#xJL07*qoM6N<$f^NRB&j0`b literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_effect_title_tab_bounce_right.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_effect_title_tab_bounce_right.png new file mode 100644 index 0000000000000000000000000000000000000000..55066a50de6ed6d72f6145b9eb05a156358f1aa2 GIT binary patch literal 5071 zcmV;=6EN(FP)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@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?XEcVLF=zM#=dcB1hym^yS@TNMCRsya=Mw`m`(! za=z91gc5*AL7Ob>MjrtD!d9mna{?BZ?E+ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_expandable_bg_bottom_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_expandable_bg_bottom_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..3c2cd64e9d321e971df67747d337f5b20dab9ccc GIT binary patch literal 3154 zcmV-Y46XBtP)pPPiaF#P*7-ZbZ>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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<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} z00014NklG^H?*IS* literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_expandable_bg_top_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_expandable_bg_top_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..922ca0445260f571b50ea927ad88f701bbc48204 GIT binary patch literal 3173 zcmV-r44U(aP)pPPiaF#P*7-ZbZ>KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx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h8dtbnGtlBZ{Aov;; zOjZXsMPI`XE>6e6*w!le2iqcc_)ZDrlOHz_0zls_ilR3Wk>uen|Ax~JOqCl zyzl;M!JoF@8dXD00$y6fdOb5W0aZidc6}=RoPP2hN`Z8WQ=m{@DIlOOHXsCk0k0jsKPb@HP5- zv6CdpEr6?O*prBymF4Bug4Y_aR+g7rB60@ciHKe<0MHQpv8rw?0rlEO2>uv=zJ+<; zt-qRO!J5JQ?ifZy`WIld%w}P|!aYf?Vn`ln00000 LNkvXXu0mjfXL9a% literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_fast_scroll_handler.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_fast_scroll_handler.#.png new file mode 100644 index 0000000000000000000000000000000000000000..8accb2bb0630def42a2ac6722dbc58b1af73b0ef GIT binary patch literal 3808 zcmV<64j=J}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~{c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ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z00033Nkl{?p1hv{R zOfdL&nQk+A#bmOKkwnxoGm^Bh{E_(Rm0`q7c;ST?UU=bO{>NS9FdSegVPKD_nml=z z+i~>(>4@jvI-g37J&}GIfE%9&!P_W2c;Cg$a00LjEaNkXWop@Y@g;yoAif4MPsMw? z%_O*i%+xA{7hd=u#GBb@#|K&DTt#Igyzs*RC;lGnsUz{1VEi=_zX`^#U8ld89_+?C zJ!p4M@JO)g3BEOXiY{~5^gyjrcmTjOVLtNqaSyRl->I4xUU=buq*Z>jupwGg#>5u* Z7yt_8V;>J$s=ELH002ovPDHLkV1mv(r7Zve literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_fast_scroll_popup_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_fast_scroll_popup_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..6d503d5bca603900d82d84a87a92a328b449dd10 GIT binary patch literal 3646 zcmV-E4#Dw>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_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oznR>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} z00011NkluCZU3QlC1a#L2A_-5ZP!( zyWkE$a3W_Ob@)ZWOKBH%n8g3eD{i^zeZ45Mv{lgo009600{{)|5-bHeLjnK*002ov JPDHLkV1nczOQ-+< literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_focus.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_focus.#.png new file mode 100644 index 0000000000000000000000000000000000000000..4b7603a61a1a8c549e3ac4a68a2f6a88284af444 GIT binary patch literal 3012 zcmV;#3p@0QP)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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@qLb8+C!cGl4R22bd4u?*ku2LB zJ!);^-&mmcw&^VJ7I*_R(z0}hHs{oJ5(Cr(UVF6^6^pC_@Y(+` z)$K*38+g}pfiC~hN#|Td{>0|8?{4Cvs@4jS&b&!y=vjNw$yG!SgP^!(g?(O_3h=}S zM-lmvwH|7^(sT-VmPb-1nGI*JePB0l30t#bDhUknTUxC!&U)%5lv6L2;00000NkvXXu0mjf DQ{+`T literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_03.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_03.png new file mode 100644 index 0000000000000000000000000000000000000000..c3cb222e637d4e1dc9f310c9d698235839e53366 GIT binary patch literal 3386 zcmV-A4aM?_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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i?7{JS%KIF~xHzp4GGirJa zIhfz-?HHgF*Pa;z(3~^ZVGPio@2sj*MUj|8&kvaEbRZEq3Cy-!pgL<#owkVli9O4{ zyN-*hS}8!Cc^9DpcA^hg5!nlTY1I<@yf9_pt`CkP@*`_LRClTA1aLo(Ql`u!7h<}= zR^Al0V#!nzIO4Za3A;IP6}T3B^}#HVJISvAtEVLS2bSa?TkXe~vP<%lAj$tU3?|Dp zsAN#3U=kvqTb2U1ioPf=0ypevNt_?{2Hep)z>bLQj^*YWD7IwgN!?AhZS@$~jZvf! hpo_m_E`VJ5KL8CH0kY93EY1J`002ovPDHLkV1l@9Vk7_n literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_05.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_05.png new file mode 100644 index 0000000000000000000000000000000000000000..842d3f165ba14cb58676d96aa5b4803339c31777 GIT binary patch literal 3479 zcmV;I4QTR-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+=*RRWnoL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4L14MF9M^$ zTi~g^n*v^`>U6A=nnQ0GRAy`5P6D#iH11wK2VUCv9`HI5>IB#Zng%tks#jAKy6(n@ zB627qYXMX_CBB$a2L_Y@r6?ft9dF~WZqYU1jXkcYYB@3PZM$(!RSPi+6$5ob2Yv`t zY`m(f&k|Is0l!>0n2Q0LaN|F17Oeuy4r*OhR})mKy4W-w10-&I*5OO5z?v-%P*&BI zNT3sMwiuwXAQyF#zhX+Yph}TIK7CwH&GwBhK2cHCW#EB3fl0|d21uPs`F4KPMyW~y zgg4XQ7?XK3jSrv(D|9elMl*%tb! z&Ml`-O+=1kbJ-6!ab8u6eNboC)M=fpo#^B$BKv_aEm>jTD@*~n8F;9Bsn4`zX$i~J(6LCk-dT3Tm!|f vn0a#UCR?+93hc!w(ifoN&oM(F*ZvIv```ljin@!M00000NkvXXu0mjfvFdD~ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_08.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_08.png new file mode 100644 index 0000000000000000000000000000000000000000..1f809475580b813df828d6a0db6cf37de8cb8cb7 GIT binary patch literal 3485 zcmV;O4Px?%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-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>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} z0008WNkl$Emg+8| zS3>}a>mOun{x~!YIBO&#c_yI2L@r8`;4QFh!z+P+TCRV#-_+3#_<={jJn%k8;ShxY zQpeIznjaZUb;nYOd71u(NakfKA3+UP=^?C|?#tQqqU@E{( z9~?#GN53`ox{E`ntgx!(Waf?wF>PQiZwXriZX^QO4)DzqWtIa^S;_0|qbZQ@8DyYl z+zDfFzpTh_T8m>$#TEIH`+ghvlm;gFU1t6>W05=R@+Qj~H>?D16#Y<~04`fl~p1kH@00000 LNkvXXu0mjf{cvh8 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_09.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_09.png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0002ovPDHLkV1m^tfW-g+ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_13.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_13.png new file mode 100644 index 0000000000000000000000000000000000000000..5a6d5787be8bed98e041c1f274b98c595f37f092 GIT binary patch literal 3481 zcmV;K4QBF*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)XS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x+@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} z0008SNklS;`3O+#D%P_$rFL=;_spl^aNZonru(5^sz@=3%U z=nh;$mrzBl3L#MuE43!ANlXtZ@#S1NT$-D?;THPPfgv-wGn4Or-}yI*hQlF;sZDXn z+7X~}?f4{{RJ8`4B*-+;}GtOa*vi)24_#Ox5d0!M4fD4vdB4>xgeJ+cU zg^z}aY#hkVHNn^!lc(TrvVH4aU?YT)TmT*Y9diW8wf_SE#f%6CCZCbR00000NkvXX Hu0mjfNI`ZU literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_14.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_14.png new file mode 100644 index 0000000000000000000000000000000000000000..77bb1a8328ce774dad22044a3a17d7755262bf6e GIT binary patch literal 3460 zcmV-~4SVv5P)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#fkn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|;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} z0007tNklMXZQv zqas#Hn^u#W43T&Htk(Xi%3`^=cM{uDffCnf^hD%O>|XZ6bzD@{S^?_RO`Xxo+KJv=MPx7VrBzGp^TJetd+t_8 zM1E$?hng-9%>WPbC}qk#b|Gc}Y~@X1YnDtUfg^rTOW4hU8^E>T(FdD>+(~{7SUn-h zKd>afYjqT3sxHY-f+YXbX)sxiK^23l1V)Iw?pO-kDf*ze2;8u(C2@W@9CJqN13MzJ zJCT!XpxBa4PsyERdse%^Zj2&@08RgnnF6`;e*m#^^v3^*-w6N!002ovPDHLkV1nzp BS0exb literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_18.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_18.png new file mode 100644 index 0000000000000000000000000000000000000000..e5265576dcfe83dedb62d5d04a9cd8cc549bf70c GIT binary patch literal 3386 zcmV-A4aM?_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_C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usr/share/osp/bitmaps/720x1280/black/00_header_process_19.png new file mode 100644 index 0000000000000000000000000000000000000000..5b13b14561ef1d851932df24f04cabbdc8f6ac41 GIT binary patch literal 3460 zcmV-~4SVv5P)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_>;8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C-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} z0008ANklF&CA2%x z9n=j7(gy`0Z56~yZIjxxHit-jIX@hJ@+UL7Kp#3VWaeis-<;c=Nv_lBaFxmpu2{JS z>Q^QQnWU-(pbX3ad8+^|tEa%Rh@8i+or^JQRhiO?mm1#&K8r|WU?788OP#n59EeD( z&q4CQeFv75-Cj_cK&GZgz=VOcfjtp9iFAO)l!X5QAG6fg%k5VTCK30SSQr2^=v`YQ zXKOx)ibLj2)9zDk5Eph(O`ryJ463B6cVZ-T*R|^+QXe+pnWT;lC;f_(2<|4s#6hA)fCiLmkeMo zW3TQ&B65*Z+froks{$Xa`&?B$)T)!trHGt`df5**aY0qfk+J3l@X6X6s`^${=S(_@ zXYB`Ht|D@jvZab8_MuX00M8uMCh*b+M-llMn-A4o9GUx p)pOu5L?R;ry8b)n8pxIZ0{}Q-0$n*F6qEn}002ovPDHLkV1f~iY&`$~ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_23.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_23.png new file mode 100644 index 0000000000000000000000000000000000000000..e5ba271bf8fa08600d81fdf5bb0f8c1f0ef53ffb GIT binary patch literal 3461 zcmV;04SMp4P)KLZ*U+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Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z00088Nklnk zIm{+i%>yN12FO_lXjwl5_C@44_Ut6as8w|yST=yfpOgB;0e%&cpCbiQ)oEZAD5Uof z0P4;UflnfGa%vz|oi&)r)Jy92q9)LGCXfd%19PeMZQ!GbG=>H;m>a2ITnDNm(i-qX za=O}Bvw18D=FMdTpT0Txpd{s+9zQeQu}Up1JnxVK|r0L-Ab?2N?D zycrdT%$ug&qslNY?4XW-3eYjAqN*;%Na%_i*F~g$+JI-0+BcvCSP23$+sU~{Uq%>+ zD{h=q)k27bN-62IMnz+W{L6Xld8jykQ!xZc+_-rLKu2C}AwW~9Tof8_ z%BornSnA`?#n|$r9SE}lyaV3ECif5^b>n=5T>z9-wLD<0SJU4RAg`wBK%f^6YGc6K zLWcS>fxIEl1iEv>pa51>^?9G=vrb)&5THH3SyiV3p zYFmyl(nl`7toQi-x|7a{i2MolvhQx=f~uARrL+lb+Vr8S-gVNMGwF0aYd1K#ipXBd zme#DWkC75xDOt|C<%6S${D`fGDlQI90Cz$pB_dU4;AK^P0Nis0S{v9NwuCKNF_okY z@ms%w-3+>FwRH`6>{7-D)4p0d>vQ_f*vYt~wSZj_sh!EqH6^h{Q%}y_WKXOg n1GNx|j09->cgz^bwf_SE8S(+olrBuw00000NkvXXu0mjfrLJtk literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_24.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_24.png new file mode 100644 index 0000000000000000000000000000000000000000..933f97b7b7e582245e46a0e9fc30c718b7a2ef6a GIT binary patch literal 3457 zcmV-{4Sw>8P)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%c004NIvOKv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>mqMD~i#ofL6uRhw(RE(CN=k3Q5XPo=oOnI zu{p07ibJ-V#@(aFAWPUmwSflEGpMSnUMOOrORn7#k=9WIo>^+kfD&LX3dnq?MafX=!0?_=1mc3f<##sG%3rXQ@TV-fM?EwGU%n`Hp?jCb`15|RBtw%JH4 zJ#(^EGx}V0*6E1IpV(FQ-3^>p)mi~R>MNV7*3CNU%36=!Tt#Fv@TCPy>|lVQZF5C4nP;>zDCav|hH`hrlb~ zV$kh_DKK!7Ujr8UB>CHxky$aC;~xS4&^tsp>Rv**0K*7VEkD=fGW{Y2jmCM4HEPat$mtV-l6zNw#Bk4`{|% jWGFzVf5)5xx$=Ji$7=jWxHlK+00000NkvXXu0mjfbOCZ+ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_25.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_25.png new file mode 100644 index 0000000000000000000000000000000000000000..761d563659b555ccf33e3686b8d4d23465aa4bba GIT binary patch literal 3433 zcmV-v4VLnWP)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}e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LORQ01lRUFh^y9&V(@Onr%cTF?hsdTPZzV52(D)7J#VBd=kY||_Y zXQgTnI1-WOwREmQE4^j_Su6d@{O2vu1e!4#nF`SC@0b~olm7z%Z9ngxMm?zS00000 LNkvXXu0mjf^=@f^ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_26.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_26.png new file mode 100644 index 0000000000000000000000000000000000000000..406e69ed7a820c4c626a93edf0e1828f7468d70a GIT binary patch literal 3433 zcmV-v4VLnWP)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 zsJ6IeNwVZxrd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qGvQ-Os40&k1dcbMDH8cZ(kl~fo2Gw5YIBeOGa zCdDE1rV+Q)JcIM*`If)K>`P4SBQxW(k8we3jxf0LZYn%*?+SX zNJRDmwN1MN7l4O0eUk!X?YfiBzKHye&1K)*#z|FesOk$Kckg$=qr@^~+@zCx)>?FO z6_L%rmY!PAVIGuKegRAkxb1_ZhTmy+snR+VjCcAIF18l@d jWFSDNf5)5xx%O`WrPKu#>Oc7}00000NkvXXu0mjf8^&gV literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_30.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_header_process_30.png new file mode 100644 index 0000000000000000000000000000000000000000..f1f81cdf8d9a75a6b64ab65cd466a7fc6be07b97 GIT binary patch literal 3468 zcmV;74Ri8|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;QQA1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P zD{uvP=q70ZcSK~NpboE@b<)gQjTZSLvSH#Zg?Rv?uwDHRTEQ55Qtv}33dzM8Q^5_(`ymg*o(-o0_S>&{4EptJJ!=0 zQ*k0c2}J(8elU5qL1lv~2QMM=ylE1+IqZ$%ao~)Vgv8adZpI$14XldD`o8R31B*?Y udrEF6yK8+1SdX#DP=F5pjyV8w?cV@PgAJHbW{#Tx0000uW3k literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_icon_Back_ef.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_icon_Back_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..925ce22434362757378a4130394c3aa6cfa470ad GIT binary patch literal 2355 zcmbVOdpJ~iA0Hxei6}|R?6fXj%#9f{!=y1YGRrh}2o>JO%)vBf&X|iCMl4E7c)O^S z)kU-jwM?uKp+c9nUg;)dWVMwP&$hbYJyYr3KYI3$_dMsE-{pKipYQ$moV|gYHkzB* znZRH$bA}&{4UOKq$9O*U4*i$qAT%tK(ZggxV6;rZkpM6X4~zof3?U~5U;`XpVtgmy z1%u6t<_Cw#!k7UhE+|BDbTUY#Pz<4AFfVVVn8OtSGI$ga!xxbe;Cvn#5sG7? znPMss%lAu?06|Hcg1JcoE|G`uUJv(Dk{|*hAmhN5!Z?wXq$DFg@{*vrZX1Pwe-x1k z$cRryg)sx+R8RuIaY#2;E*gV@tb=3G7%U16-FR1wI|+v;VLjlVF9f7b z!iy%cX}+IzK`SyMRwfgZP$-2$fmFC5K}ie>LnIP)99XO?B;hJe6v;SBSCMqp90LuI zawUARj1P+7Iz~@1FT^70=RiRrLn%386b6Y#357bpK1xevY~X)p zd{tT+oG1oRY(NUiC0r;U(W~abQ0)F$kxme@hQyNap`>u)XdqWE1Vl0hjf{Z4AbETq z35O=2sYG`=-W~5l$6_!9A1Z-PAP{lBG@=g`jh*B88Wu}I`+A`1J`@iKh@oR4D1}b+ z#nZ89Dglk5&tVxNsf;7y0&{x#klxQ&%0FUBR0+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FQO7{N`LM<^OjR^_uj{l8<;;UWM4 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_icon_Back_ef_02.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_icon_Back_ef_02.png new file mode 100644 index 0000000000000000000000000000000000000000..3541c28f2088714fb0392222ce5a39865c1c8476 GIT binary patch literal 2381 zcmbVOc|25WA0IJxmrGQl#*_&$8?#=cJ8Q&PCnPOn=3r#zjG4)dC0o78k~YzTtLW{j zkX-I76)jR(qjFQ1t5ue`y(HV)JyYp@|LAl7c%RQX=l49%`F?-=t3|IKzNAx5r99y7skch1zce; z&2SMfSP{(iq6$DUny<#7RbnZ`hQVCdsib_t4nTnj10qBc8gi_@0f`U^X~-Y~7t570 zfk=^iybK74_vQ)WcL*p#bO3kzCQFyRuNazh(C=yZ$ zSTdGLabXi(hzvF!ha)qXWHy;hA#hj}1`~^4(D5xUo`WS**korq2_oXycm|2gB6Elk zm5ygSyRa9y9um2NFA)F>c14igFI@cJa;Z!iz*m4W9tcJ+bbxOpr~u`WpcKIjAR_F7 zL=qvWl-sMz^Ep};AQQy`LXHd+BR=JqD*A?f7aW;IqRDShW7GDn!Ac0Pd3_2RgHwj)a7<`upi_TN^ zj+_|t*}QRSbAqR5k3T2o0g}li-QI4vr|!`))AYxeaMJEuso{pLtIbS}qW`qTjGHHG z=w08VW!nGY-V)2CTgwjqkw%vy1atc|b@FrJuZswAI-5tkYF~r<#Sr7w{c(e1coagUnYK-Dn#xL4s4{uCr zM>%AmCb0^*jA4Dy-Z7}JoXr@cHy8Jx;zwF+Fi?Kz-f#xr@kZfxOKvc+<`+XTbNPTi z7>24?q$17WBHehY?9}vv^^1UuMd1_hi$QW8+=CwIW zV@7jkzu5Vsd@<;;sL|eQ%U-Kan2QGO-ThmWzOKXb|5&rKWVd1KUDU-FWtxUpPv6v> zvrN!yduKPHJm^&*C?j(lHHaBio#%ZWmUoc0S7m8eK8yk{l$Za0{W+7^(r(gw=@;{o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D8?q zAJOIvi70Ysoc^uxuhfIOcE$L&na4GMf9>93z_o(+;XBz5xdQnb{@a(#3LmENuid|> zx?Fn4r1l*(wHNv4WuKJUHDCNRe_``pz3Ml-A{*A|-8p*eT#mz@xXnk@*NPrucYj;t zlDsb>Ug>&n$NsZQH+pxd$sPFPbggE=-kl|F(;ap#m@JdGZHeAz$u$)Yb{E3R!>6(P zD8_LIKHHxDH*BA*)uNY%u|3(YOe?P*zIL3elX>neKI^V)MN{nTLsxr?{Yd{ieb!}R yW4;E?(yuP_?WRBT{I=f;9N)mm|0q|_D#5_NaG49|D&6Uz3d7UY&t;ucLK6TA-*@By literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_icon_back_ef.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_icon_back_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..069d83e9b4cec765e18a4ae6df4b6062fffcfcdc GIT binary patch literal 1760 zcmbVNe_V@s93NfkP}JoJ$77m9we8unt!LB9e%8vSCMW7>ZO>{~+cVo!Tir>>5qHH4 zS6xVlmltt$3Z0@fle!R6aXI9rAIDukBo);?OLg~$mp|@#J&=l%Ztem$u{Qa^{u zvnLY>1P8IdK!(r0*3W(tKCam?{SiL7V!}{t6{^CFay>%eD$z&;5NqU7hzyY{6E;>M z-UNb;N*xl4g-TYi6{v1 z5*;6jR{JOFkyVM(5Jh5)f~6$-`T*W0Hcp^HFgak-#A*#}6Nfm$%f{E%V+s)%5y4_O z#CJx8N`e4Bsz(3@8S+$6K@eav$snDub=rCP~mP+=;c zMHe#ZOrDSif-sK{3t^bW5D8d3K9x4c@jfg>6L5th5sNQ^1RyA+u~;xD^5QZ?LOdT_ zIy8nAYYmuOt3bx|s&T!eSonijHeZj(F;pLdqOoHY5EPAKs398F0sK`=VDTEYR*4!7 zORVX6=dA$ItK$)+NRMiOk@&LJ@6j*fLS8f>ANB(I!V$l{AXosiXfOzK1(1kG9K|aC zPs}K|F%)ZY{HIvPj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+TpWQLKEE>MMTab;dfVufyAu`f(~1RD^r68eAMwS&*t9 zlvv ztM~P_^2{qPNz6-5^>ndS0-B(gnVDi`X5eD!V&ZD-V&H0GXy|I>}X~T)9aF-T$-DjR|3v4~Pj*wm=R%;iu*SQ+p9GS)2Jj>0)4Dbn$d?45_&F zX69brLk0q^$=a-}tcw<&;=>@l!Hdn2OF4x>CFnwXx~56sAK}|wxh2#5 zG;4PL{`2I?InLL+)}6@xpmf;r0*mj3mCnY;%q+EPS$<^YX*{uc_00S5-=LS~O-BT# z?9_@qc#Gq})H2guMtO@j(K)Hm8l-Bcby6=>l;E$ tTn{fx_o;opZ`Q^0{!RakU#w?fW>B7f??#K(=9{20#?#f$Wt~$(69DYduC)LF literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_icon_jump_left.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_icon_jump_left.png new file mode 100644 index 0000000000000000000000000000000000000000..13d4593054fa1bdbe67180817f527d4f1b0dad0e GIT binary patch literal 3113 zcmV+^4A%3BP)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=fnQv8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z04piUwpD^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`YVK-a=v4~Pj*wm=R%;iu*SQ+p9GS&JT<4a^aY^`0({Ar-fh z{`~)Me>i~IhsRl<$Exbe#l?McEDfy@tvx+G5l1z3jS6RWpMUdkvQ5Lj=Z=rNd0I`@ zHXWP3@QTucSZ^FJ@pE*etnD09WG0+m0jn5_S91* z0qZ6i-qIb)2E}y>N|B8=84gQi6-xg(>=8)MZ0K{Gb>XK4PaXe}=Zz5zvn?~yEE?7* zGnzjz>YkJ}=Ze68<|FJL2D=&acY3FJOcr_cB2B4t@)I+GWjp4uNilI3vQ|yi3RxNR z;%&jIs~ulTEJ9ZoR$0z@mCIjcF-MJ8O^1*FK=|Q_SIv$E@yuNCG1o(P+JvrC-!Gg> zvftWe6El^Y-=O50Gk4_%^@blDmWq6>xZ9l97H9l!W<2QY9;zZ_t0U|?oA$y{Z&;Od!mpyJ8X)z4*}Q$iB}A3eI> literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_icon_more_ef.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_icon_more_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..abe5d0159fd0a168e45021f390e7b959fb289d1a GIT binary patch literal 1201 zcmbVMZ)n_P7>^954CfRD>4cGH=$!15ytyQIZ@BZgOD^3}uh#2f%U0*oIy!UOU-@z9j{E-e_q&!3haD%k05HUpuk07?< zS)-_iENAl2BFZt$riNP|B16?@G#h)omFV!X7f>|Ajk$ZLLNqYdSGT9eZRl`?r`cSrQ34MUi;cYrKhoknx5}&0d9p2V?5YYG z&vR=|4ORPD9fycj_;kt^0bo^?2eP87U=J&aKoUgys3{<8imFK&wk;gB7CH^BW|(bT zbd~4E2njSnXti2=E6w9@Q~(gdghP^2R3jBl`oxM;ezdd0V4%nj-GI2*XA?$i1UE^Z zqn@sX;04v{I?CgMP z?(S|VQKa5z&xS6&6l=o3cGE*XsTg^Vp74(AXo{E>btsorSuK?%0J0@LTh3;oVj8fd zi&BSUBdlafYDR^UZptPAWeJ*T73xyjloSAp#Y_iV@grjSHtN`Qsogdf+!d?oA+iV# z>ljaTDxiN16C91@myu(J*kf1otGOH4H%+mWfqFWv z>t+&nQI<MlcPyNVAHII$#_aISFScE}SloZ%9l5)^ z`_4+`=Ih6!1DEGcyxsL^?mzO%?z!#SyS1}dj$DSf3YU83lwGHeUiiVh?LEF&IQ`R? z!z-WOd=>PZ$>;u>f9lV{d$&>f=)G^2UUKI?*|(2w&!2ey_VV%@*X>Oo^M{{%Oq}mM zyuY|`@`DxqyU$-Zc6#CBN&mM)@ywMa^Lu;dENE=I^L}&ot->EWW|x*;yY$)b_p9(g gbGa?b)!rlbFkgR_d!lQaTTFf;m2#i)Vd>!X-(wP(i2wiq literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_indexlist_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_indexlist_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..28cd706cd0b0689d08a4eb1345f6078e15841634 GIT binary patch literal 2871 zcmV-73&`||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!jyGOO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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} z0001DNkls%v!S?$|}lB@?6)Ibh$T2M8pCZFK@z67BgKe6%sZ z*Iw~Y*q4S9cpqHPB1auKaNxj!1JA;owd09;d*9009600|3j# V7s#mV_Ba3l002ovPDHLkV1lh`R_y=) literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_list_group_bg_bottom_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_list_group_bg_bottom_ef.#.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E@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} z0004oNklzn2@r0KCO`pM90EcL1spP?a&pJqi=4zm5$Pk+ac^yM0Anmi?wzR!0ZWE0Wj9u`6B0)h$zX+A?&D>q9KG`O6jb}&H7ra7Xlps zm|1J*DWx;-{cR~lNgfShAbH+2jfN0*i=0>9`=xX4#2DiM*#5;nN31c%IplSS6g84=mkb-Io*-iV0ylRCe*cs_uE z)o#$yM61^{D%10%{Ba{d4S002ovPDHLkV1m;1 B=_>#L literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_list_group_bg_center_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_list_group_bg_center_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..6e0777b205ebae3afef88d4e905830485c402604 GIT binary patch literal 2933 zcmV-*3ySoKP)pPPiaF#P*7-ZbZ>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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jt0IgV^o2=y1E(=;U|DO0ANuR>2WoZDyh)_HEWtc z#czq>i3SUTfW~Caawt85gG|$88Zd5WEY%tn&iVW!!5FXAT%}YsZ&d~Cvr=kpd6~b+ zd*v)~1i-3#)fKH(Bk!LD?AS1jm$qfCbIzAAPASa@WpK`yY|DOY80Ko;)C*YCaU7(X z-12=t;GFaPvn{LUCM{`>bIyI=4~A*F$>hizu(_qt=A7Z=dC!7 zFXK2)%4p)A=goVbSD&-(^)$=27Zw)kM6?%%;gE>%m$7H`l`%RaVn50ld$d;1mC_Bv zFkaGJ>p N002ovPDHLkV1jo{V*LOB literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_list_group_bg_top_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_list_group_bg_top_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..6f3e5454349fd46e7b638c3a49d560d6d8a694b7 GIT binary patch literal 3155 zcmV-Z46O5sP)pPPiaF#P*7-ZbZ>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@|##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^Xr~Wt6s8*KBt!^j zfhw8Sg@f+jKhw13gMI;gH^TBh4M~Bsj%CpWbgIx_DKr7l&&N=5t>5R{z!&^G8ByCg z@Hz0wl%WG!@~W*{vvxmhjHyNM(4c+rMM$d4flq;N4-C3KWLbo^x;FTa4+*;Uh}u*> z_ibh%A~|3?!21DsS45tQ$fUqE>bCvIyldmtR^fdEe9%a7KLX#g*|wf)Z|^!}$zsae zpMZ~mCv48cn!p#vm|{xXT3T>fh0fNJA6xqO`Yi4jy60yePY8UD`y}}f+b^tVbt2+A z0-9^lGd6evyyGZmGuK9p?}*wZYD_);8E}qE1>x(WW-NjHlORa6g*@cbsbxEZZm!wiUA=N6ou*W~KcIgTbo<#vD7(Rn@o7F#GzZMXkcg0MJIWNa<0H-M+LeQ{H(|4F>h34C;a!jbzPvZ+3X;fni+bn k7?0k3m-Y?({j+}t0R6?orEzj&@&Et;07*qoM6N<$g4JzjP5=M^ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_02.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_02.png new file mode 100644 index 0000000000000000000000000000000000000000..0576c6342c5cd4ecad2ada766c2e81a649b73684 GIT binary patch literal 3888 zcmV-056|$4P)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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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aA=9x{^hRw-4C5jka}DI;TPt6 z4&Fp`k2?Y!6eLri!fhg-VYe)2w#EOfUbjCqsa@iP3j-m}09+WZJ+o|%t^j=L82lfG zxQ*bK06qe^Y*_z&Md=d28%Csb8Tl!f_Km=Muw}>h6A7^iHz#^z=Wjz0Lp|;90KE4! z)>nfbze0aiAQt>506zhI0Pv%-#N7)cwd#28_6oiL@R^RPeQy#u9!apRMa(K-obx7@ zJlwH$K9CUMq-i~O@Z?x+Dp>-hk)Q4gYSQl^C)P~hO&UIu)WJt$Go~J4jy(NXINo$u zz^9U8hH1^6??B2c27J~Ad`JxmW3~mu^7hCprBa6VPevYfQ~fb*D!iIX*9k*>@ksG= zFIm=-jZJ9}4Dp?km&X+K88_GKEYE_c6yaV0osS53XxS3~l5T0M4&d5KLh95QgP=KM zhHt*~E z*yBdTIh@?Sr)i5Wzy|_P7uYlkBp%aT((0Nhr9=f4msYfp9AMkvWY|=Gx~%obw2lW| z0e1plaljd5U6DEQMT+g(R}_HP6luwh(h0aTc!w#_lnsw`ell=FwfA=Fc>gtZXTU4? ziW4NwfWEE3rsFc*=Hj;f_CvOvw`w=<0({BB#}0F|wXh@cm5t>yld2P9PnnR>GMZFG z*l57lOG)Jsw2X2}fb#|g+6ug{Ps`FujDGNCv09U

SIit*s(TiO@! c`)7X#0E!o>sT^%y>;M1&07*qoM6N<$g6LN_H2?qr literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_04.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_04.png new file mode 100644 index 0000000000000000000000000000000000000000..1cc3660a3f90efedac5a53430574c75fe0e649ef GIT binary patch literal 3955 zcmV-(4~+1MP)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ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?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_05.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_05.png new file mode 100644 index 0000000000000000000000000000000000000000..112a6b0b52fb105c8ce513a298d45f8a3b510229 GIT binary patch literal 3956 zcmV-)4~y`LP)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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_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H=Sd@9nYY^|#WUfnLEENLWpv(#s^P$4!3R zw%^{hCA1Gq1bE{WrmH6{mL7AnwXl;_C7#M-CiznINHTLDk&q|QT|tCR27GxdDL;ai zUXGzWVKvo9%i_Y$Nrb!m{^e)us(^mS-HnA*=5()$@#yEXv_HWgp8Y=n3^2z>nGKe# P00000NkvXXu0mjfI5Sf` literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_08.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_08.png new file mode 100644 index 0000000000000000000000000000000000000000..84f79cfad93fdd30f9af179368f8e2f6fa848731 GIT binary patch literal 4013 zcmV;e4^r@nP)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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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MSr4VQKV3EW(oy14N8iu!;rxCK zagnuuHSn$|c^jK0iBBNxdFID#!@%$Oq(EQrJDY-9_8606`J_4**%)qs$&&&;Zv#HHO$Du)+)<)@J$NF@mB4p*&9&~b&fGTf>SB0P zCGZW_6u-8}G6|u#ua&^J*CFF;s`b7W=v*av&r!dZ(3gPr*9dqDeFpfS;KGK8v?ZWa zc518xq4`{)vlDG1rmm_REB_4;an8LVe?L&z9HVAwO$9HcXR?L^KsCUD`Q99LM#pPI z5;Gsxe5k;O`*FIGOk$2kw_l0dA_n-xW28&WcVbODH1k~#ra2{|vCj)bwxSW{+fC~V zoEhc|hB4>*>oy<-0}ldk48VSk1(>cd5n5R`^y^PW(>@ht5b$8|0WM&(hAX+gbHs+l zp4&|34?^BQA)<@W(QSO#KsF|>y3#8ps^?7}ZhO+gcS~p&l4HJ8q;ZCcam-|~=f&4I zTN67WU$eHyOk$p~>3R?r0d#7Ru(bhSol08#l9pP|1#n?upsm2)>d+r^gOOzt7tFJD vHlXh?Usxz4Gjz%rw?3Yw{RsZ%$$tX?z0|f}v{E^100000NkvXXu0mjf5lxf& literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_10.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_10.png new file mode 100644 index 0000000000000000000000000000000000000000..105ae0b79370c2bf52c7f74c4d16ffa3e5b2cbbf GIT binary patch literal 3960 zcmV-;4~OuHP)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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?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ps/720x1280/black/00_list_process_21.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_21.png new file mode 100644 index 0000000000000000000000000000000000000000..f6b38815f4590f17b9e890a9ddc678884260b805 GIT binary patch literal 3915 zcmV-R547-!P)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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=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b@ zo&tE~_r`G&< zUo!q%BKqHVBP;nRXK5%xVv6RDwXChKb0V5pZWz*v7K;IV1Z<8o2v$5s37tu3KVU@62)uP}8zX)z9%n^nQGsx12Qm`S!2U6;(Hmw+U{ya8 Z_W&K##98@Ij^6+P002ovPDHLkV1k1TQON)R literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_22.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_22.png new file mode 100644 index 0000000000000000000000000000000000000000..dbd04e1c7e86915d8b63b1f5e2b9752a93419271 GIT binary patch literal 3926 zcmV-c52^5pP)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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|}gUOHJ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 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_26.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_26.png new file mode 100644 index 0000000000000000000000000000000000000000..03abf907d726f0edd8a8417b5b98c18674747a6b GIT binary patch literal 3904 zcmV-G55Mqj{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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$;({XG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Ic4LR zp+-^UZ7NRtYUdT$waqsaR44c*!>zS8ihd!DeqstVJaHC&Om@p@4gY7@56 zCd=ll{ycbFp}SoZ;GiJc0+n�&Ulb+UqKi>=_dY?Xe^z~4!}G!I@e8akA90lWtA z2Eel=NB)n@-du7-ngBk}(CG<)BSxK7HLleax3r<{cuq$&C4F}+TQ>NY9@O;Dfj>4h zBjEq84Vph}n)P0{wd9GVe=osr0UgwZ;%G^l>kPkFX>7Q$l8h!b zR+{ppJ@y$nJKz>#tl%m7+#*9u(2K{UxD>!4qvo7jYivtPqGwRi0Wm2~Ie-I`o#b+% zex7zf3x@-q;P3UnSQM87cb=~B|19Kl47j9 zdP|<}8KT%Rfcz9e%a1V`G^{L@H$z+iCNnQ>DoDGLyEu)>_}OUDCoMJurQQ|E;T-@U zDI*SN9CRAsJOv4^U=t#-p03&l@QSkGJ*rP|O`otDnsi28A1#}wzU`T6o>}->6BFDK p&@mia<0}Qf?)Lv#+J|bt2LLHLq9|NozpDTM002ovPDHLkV1gl!O(p;U literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_28.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_28.png new file mode 100644 index 0000000000000000000000000000000000000000..0343a6a586aa50bdfe5dddcbd3be3822fbfc7369 GIT binary patch literal 3967 zcmV-_4}kEAP)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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!jyGOOZ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)z5_V*i4?28k3{@hV_6+B&+hKxSsVTv^kd1 zCet5Crl0R+o^lL`m>3*x^Nywqw!Yu%w0DK2< zJ7CeH!?ssF-!diup7Z+hmeA)(1yKR{TF1ut(`o`@EL>7Q?)`r8gvH|;+zbQ`ax z3~welzLCS4)2;RUfmN3dS!O=z?N>qli=2s}yhtgU%mE@73e$OEv0qqK^ z-|cd(^Etyr_{!%xg^ko!5_6}%6F5jl_Pyp6?PQ)dCXH1-*m2OuNV@69Ei*sG9xgK81?Qoa&i3TLBJJq2*HQb?p& z9(knzej7q)(Q}*d{z2?;CY0lcU<#;528DaY~JdjoAeX)yqBgEOr+9gtR7wx2Ef^o&i>_#<_4H9^J+*SutX zy&+#MaEjNUp~?#wp0H|4{!}2-T$FZB;*$3+KU=3G`WwrGg^bs9(4+CK|IgC?C%<|4 ZGXQQ~xQhgQ9Nho_002ovPDHLkV1ikAY54#E literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_29.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_list_process_29.png new file mode 100644 index 0000000000000000000000000000000000000000..c9cc13837de4768c01aeb57e15c36bc26949fdbe GIT binary patch literal 3969 zcmV-{4}S28P)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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_CMtt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XeX 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} z0002ZNklZ$qi=CL3!>T#AQg=G{Dq%W~5vteXj| zc@+B=xcUHAbJYTe1mFM|Dg;;f`MERW8bn`#k`O`sdNv8MsE;-cn0~@{;M1& literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_option_panel_handle_bg_ef.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_option_panel_handle_bg_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..26652a72a4733842cacc29e9456dc9eebf99ccb7 GIT binary patch literal 3693 zcmai$XE5At+s6NHy^9(|qL)=x7oA*b@vuO5~ABv z!2>|QTCUEH2I13s2%JDYFBtAy*Y~Z zQUQQf-_WsZA#fc_m^@LK$8{0U0fFmd@&dn;M3-7>m3p9HXWsnS>u)ydg>M_@<~BDr zW_5ZX)((T_A=mIOyAJcKXJ?@bmn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maps/720x1280/black/00_panel_handle_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..75cf18945dd4deccf2e07b66ec51b76260c56eff GIT binary patch literal 4746 zcmYjTcQo8xxBlt9cOucEMK_4vduK%NWd>mgq9sc79?{9D5p@t^MD*T!)KQ|h;MGFH z@OjsF?_Kwg{XBc^v(MS<*=wDBPMm?BItd{oApig*ni?ub54`kXp7^*AsHjHr?STlq zG|YVffQaf}!vJzW(gOgYzN@mbfdLfe3-f`(yjV1qm07%A!CYKlIs-t!65JR9Hr}U| zy;{9c(vA&F*M=F<;IkMhC4^C@a`LhgkZZ-V7A?{kc2TIRVlxdE#$qKWhb7V&@)5@q zF5qpk7AHrP#KsTbtOu94&$V9djNLWP%k5U5!y6{>I`N4!HAD@?!iX!B9#i~`80hU^ z-x5#=C*<$~$nhJTSbfm!7{GOijLb8(PP}#iBVdLIAL!K0>lAtvb5C}llw*Yv7Kzd6 zoBCWEKa3hs2ufD^3@E5!gu$~pje$aJz;49RVG}Um2kf{)cV>Vv_;pS&24I=aN`q0D z3b0T)$EpBOX`p)IMZ79tCInEsX!lA23;ckPrm2etP}c->j*}DB1Ng*%kYQ{T4}cvE z*bTC?2LO>d0JYkgsm$rK8uDGfh=AQBED`*}VJ0EMYE4{FcR0pp}KRCc8^}@ls=mHKoIG$ypy7S+eCDK%RIx@ ztLe~e#!J0vNa>xdlACxgQpy&m^ns`E>GZwR#v0!ZmfV^cQ0FFx5uD0jZtaNmTbqmA z%(rvn3INVpU|m1B@v*|75$hBF_b2jb^}?q>n2Y8IZve1S;Sc~1H^>j*1At0lIB%UI z(?u6OUnlOPE}Z2qqFX!hNF|QmZY6RhLZ`4tuk3iL-zjlNkJT~r+6n$pULZj2X zNCmo0zLCm$k^QyD&+p=H4JW`>9K@%xXI+ZLaELc!PsXRqiMnR((!i!n;9wbwr8Z>K zP8HJ-Hi`$cm}oGc$-csrjImPto+>>Eh`hUvZdDgf53e_r{XyKQ+*~ff7^zlFH0k6k zoSQ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;lpw+QKn*aa+07*qoM6N<$g4#OASpWb4 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_picker_button_dim_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_picker_button_dim_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..08b878e82a47be984992a60bb8b8d005d9aa0139 GIT binary patch literal 3547 zcmV<14J7i3P)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*?vu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%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} z00099NklNe z{wm?p2@0_e8tiNiVJ%XfLC_4OIg^BxfqG4o0@Cq$$X(U0lr>7|K@ ziI=;(yWdtU3Ia=HANnTMIV0h#1Q%d%bNtnex6hKpFzh&>^gSJrnLCy&efumqiXx?p zqWpy__q-^QcA{sJ`^B(#Md^7ThGCfKG>6jnf0NvgKc%;Q$jnL?lK(;<${VkvfUUP> z-;44OOaAw(Ohg?Al)gYqfS=5q(lo8@*J}(-(?l4C!vN|4NRbKMtk>&KI-O4b>H9F9 zPA3l!53d5)X=V642!dO>u3r*DB-&*sgh=SRekllon*d%gGZgt~f9CssHknM`Fbrc@ z2%%iWObDSEhB2HA`s)|e| zGw3+Zm64H=+gn>(_nG+tGdG%ZNX17Ma1^{F4 VxOCM-YQq2k002ovPDHLkV1oY=sL%ia literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_picker_button_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_picker_button_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..08b878e82a47be984992a60bb8b8d005d9aa0139 GIT binary patch literal 3547 zcmV<14J7i3P)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%Y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iXx?p zqWpy__q-^QcA{sJ`^B(#Md^7ThGCfKG>6jnf0NvgKc%;Q$jnL?lK(;<${VkvfUUP> z-;44OOaAw(Ohg?Al)gYqfS=5q(lo8@*J}(-(?l4C!vN|4NRbKMtk>&KI-O4b>H9F9 zPA3l!53d5)X=V642!dO>u3r*DB-&*sgh=SRekllon*d%gGZgt~f9CssHknM`Fbrc@ z2%%iWObDSEhB2HA`s)|e| zGw3+Zm64H=+gn>(_nG+tGdG%ZNX17Ma1^{F4 VxOCM-YQq2k002ovPDHLkV1oY=sL%ia literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_picker_button_press_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_picker_button_press_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..2d8a23ae7cfc0b940e22bad1a0973ad541a906b0 GIT binary patch literal 3240 zcmV;Z3|I4sP)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@?wFpwUVxrV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m)pwUnm%>%HnN5(_4R7*I2()zaLo*a7GzR$U*=B002ovPDHLkV1j018j%11 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bg_ef.#.png new file mode 100755 index 0000000000000000000000000000000000000000..568bd40a6ac9cde6725dedcc4590000560d8082e GIT binary patch literal 4790 zcmV;n5=rfeP)004&%004{+008|`004nN004b?008NW002DY000@xb3BE2000U( zX+uL$P-t&-Z*ypGa3D!TLm+T+Z)Rz1WdHz3$DNjUR8-d%htIutdZEoQ0#b(FyTAa_ zdy`&8VVD_UC<6{NG_fI~0ue<-nj%P0#DLLIBvwSR5EN9f2P6n6F&ITuEN@2Ei>|D^ z_ww@lRz|vC zuzLs)$;-`!o*{AqUjza0dRV*yaMRE;fKCVhpQKsoe1Yhg01=zBIT!&C1$=TK@rP|Ibo3vKKm@PqnO#LJhq6%Ij6Hz*<$V$@wQAMN5qJ)hzm2h zoGcOF60t^#FqJFfH{#e-4l@G)6iI9sa9D{VHW4w29}?su;^hF~NC{tY+*d5%WDCTX za!E_i;d2ub1#}&jF5T4HnnCyEWTkKf0>c0%E1Ah>(_PY1)0w;+02c53Su*0<(nUqK zG_|(0G&D0Z{i;y^b@OjZ+}lNZ8Th$p5Uu}MTtq^NHl*T1?CO*}7&0ztZsv2j*bmJyf3G7=Z`5B*PvzoDiKdLpOAxi2$L0#SX*@cY z_n(^h55xYX#km%V()bZjV~l{*bt*u9?FT3d5g^g~#a;iSZ@&02Abxq_DwB(I|L-^b zXThc7C4-yrInE_0gw7K3GZ**7&k~>k0Z0NWkO#^@9q0fwx1%qj zZ=)yBuQ3=54Wo^*!gyjLF-e%Um=erBOdIALW)L%unZshS@>qSW9o8Sq#0s#5*edK% z>{;v(b^`kbN5rY%%y90wC>#%$kE_5P!JWYk;U;klcqzOl-UjcFXXA75rT9jCH~u<) z0>40zCTJ7v2qAyk54cquI@7b&LHdZ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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} z0002mNklKebs_XDox{55LT^%NdkYs`3B7|WQNAu_MA3~Y&M5MK zkVW!HetD2hLQ17Is!9O0s*2V%N`<0b{$~`$3wMa1L4yVj8Z>Coph1HM4f@dN;ez}8 zm8zA46f|hiph1HM4H`6P(4Y^FZYT0Kr|5bj^!F6~mKt=4toqcbtwi7$RzEW8M z%aN;G4i3kC;7t4+smgD0HvAGeOZD)(xW5s$7Z>8|VdN4$;&0+y{1LZ}&_-Mh^Skpb lU|sVuqUEjWn%A1Y0RW?}Y-ihCe7OJs002ovPDHLkV1lA`ky!u$ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bottom_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bottom_ef.#.png new file mode 100755 index 0000000000000000000000000000000000000000..d6d494d64d9bfd1fa2192dd9c26e0d60e2efcf37 GIT binary patch literal 2914 zcmV-o3!U_dP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5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r/share/osp/bitmaps/720x1280/black/00_popup_bubble_02_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bubble_02_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..13c6003860baedfa8a56517aca972d36e10337ec GIT binary patch literal 1839 zcmah~X;c$e7!5=g11Jc!QnU_n1BE1$gb7IrkT40P0!0=<;3y%PK!jvMW{{Ag4G4-A zEGl)Q6%IwDY*KM=D3H*fB}-}1ii%$Bgw zKs(BN6cUMKCkcYXiP@XD=UH14&$0ePCB)>6i(>EyRDowmwFpTdM-vf1qLL;d;fPe8 znbwZ@kVs^OGBO5_2?^%OP!&yT!q9Xo4Z$XneEf78sVoJ-fkY%pspeCMzHOocN;#hz z?G?fZ(F7pL${@WKiO`2e%JeBRuAJ)U3;5`Ggn$acrGQSAs>XOaKJ~ROk64?w=~Un~ z1W(~p$DN7^2?GL9EdqGaSe`Nl2m%m91KC~>1bP5W2FRo{hyi(mY@QdyV{(9ri%MA2 z$`!nDSUh2ic;i!(aa_Zr(=#$MXc;UTs!gJUTrSt7!DM<82v00ijZ1Z&YHY!z0*qiX ztx|(4Q8i#vlqRC-IG;**Iv#>b6B6=9SdC32ibxq$F+YOn3gg3m8v`XSoq^U3}OIIOkTmti{#21=eDd%}{ zKoP?m6bm>oC}M)3H^gDV-V6o{^y0uQE;Okz6>P1!6W+2s60>Ai)-T!CV0>7QxH_ zkpSdyCb<$dhD+5lWYVsZusgvOyp_uf&>~VC)kdOd>SP6kC8IcsC8HW3AOZs1qLpen znt{2Sj%Pet7||-%A#$-6RROQ_%TrEapUvV3VIj;GipJySvRN=p3^6415(&5h>I7Fl zRnFM|lQTNu4Bb>5|0$NqEusQV%QvM@yu4{1L``&zmS~O5tWBXr$E}gTf=He5?B1pn zCxO%Xp`SX=#pfh0EX#}Pa{HMr7&9;V?LZhD=V0@J1O0g*Y@V3pnpjs}xG=^@fy(of zQ&V%3so>e38-vfG2N(Koe}5eFdm69%vEyM!N7kLub-g8gO-GbvI?3PYYo-fc=(fnko0hrw&S@Y~<`ji4X#xA|qq~Lv7Pge;GIH1wf9@T9VA)cDY-K*z z?b?Z_p<$f_B4Ji!&~?`@rd2v0taNP7%Flga=iP?a&Z@98TsGKZ>cgXjWz~JVrkjz6 z_QPor2L*#^E6ldd*k}IYhnCr9i>EDg6}!G{?>?|N?}(WVDevONe1nKmW$BiEu3~VR zDrnVoy_NHbA^UMQb*2Zk$bsB$c1HtdvwAawogUxv$D-ow&Ap?aWP7+Tuq=+)UcK9X zPml4#)Z0#YON|>@64m&AOq8KuP8)^%?lR4W>w5~o6~az+v*Gj0_P1-T#LH)doA))x zt}Zz?JeYIbXx?9W%%2-pT%&;czKrGvU91X9@^ek##>2qTzppw7DA6m%6afJD#QIfS zcKX^o-F@u?f4w4Gb;ic=3mjM31((Owt$aK>RJaE9U7z)AxOMb+>6YQ}Uv@Ta-d25L z$qYU1LS69{JFH<|%~f%rqQAapu8T`)tDdZy{_uXQmCbcm!!@)=Qp(DPwjMii`ju?p z>ZQg}>+iBhRGs_w9#$PHI9asgRPw#Aor-KMb{Xt44XxH3{jEz^^NekGQ)+LDt15QC zbU9P`viFA3==1FNfj=@mIN!WFPfnfH1(EN5O2VFX#cSu(t^0HMXlCS~P0o#b{o;27 zLv?j^p+27sCp*-{Im>stNumne%T_>@vH9I*`+0n9?yZg_^{+!;Wp~yeT(5KV$eW*r zsfumIl;N@7_IAh1BREjCx(7Y=U~ggVXVnc$w+EE*qZamrN4S3uVUJ1%>(gC>kG7Aw;|Md^AXneE98(C`=IAD4ffX2cgu~{ zPEWcHpFU$%P}5X8IJ0p6yep-)kFb%rXuB~AgS6zie!1D&-aOMUOd<+}>xBt9{{X=& B$p!!b literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bubble_bg.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bubble_bg.#.png new file mode 100644 index 0000000000000000000000000000000000000000..b45dedb8a1a020b2e7bd28acb9128034cdc3bf23 GIT binary patch literal 1362 zcmeAS@N?(olHy`uVBq!ia0vp^79h;Q1|(OsS<3+_$r9IylHmNblJdl&R0hYC{G?O` z&)mfH)S%SFl*+=BsWuD@%xRe+5hW46K32*3xq68pHF_1f1wh>l3^w)^1&PVosU-?Y zsp*+{wo31J?^jaDOtDo8H}y5}EpSfF$n>ZxN)4{^3rViZPPR-@vbR&PsjvbXkegbP zs8ErclUHn2VXFi-*9yo63F|8KW+g=7RhMR$W{Yl!|Z$R@KEJl?AE#L8-<0 zrA5iW_()TRX$FQJev3c~fv&OgFUkZ)N@9*nesXDUYF>$_i>(q+MlU5Z#mdy&(AB`g z(9O}@#n9Er(9pun+}Op!z`)qh)ZE3`(hOz>HoZoU#*RiNE-o&HPR@ov-HuK!PHs*v z&K8CSCI;rt7BIb@dBr7(dC93TdozLdLiIZ1)obNkl$uzQUlfv`p94z)0U7xv`NbLe z1q#l=W(peNnRzMs<;9wy=z;jwCABECEH%ZgC_h&L9KKeWSnMb4Z;0L$Y++_XAk6fE zj?o7t4y42a69T3{5EGvCfgE_|NzDW1m?B`-I8|vJ!oa}Tz0CaGp^);aFSIN6dX=A@ zzDnfkQJ18igQr|nEQP)2OCP*;nig+<~vIj2ueOpU5qroqVR;lLy`p@Bt3fpIQ_ zD$fE=lXkm>JC z`}T$vAJm(;NL=*6B;JLczrq)HEoiA-(|;jtsno_6KEb2u>pA+g54F~OyRo^ek4Nk8 z31ip&8_cFMMlX5ccVEPJ@`8VhZ8*)Er`^bx3SZT=DO6bj;-nATnHDu)+>*Wapz*$H zw}M25AI~@|(itk=SI)LL@GIcwq3V{j-zS&fd?(|t?UsK_e4P)=ZjFB*7Y2W4Sbjlt zix$JSQ;~(s8nwj_&cEp6yyCM>+KuLI*YEsf-21GlXtD3WSL2VMQqI%W&t;ucLK6Upl-f1` literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bubble_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bubble_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..900f4e789ddc108003ee41e5a9ef429f9fc5a8c1 GIT binary patch literal 2374 zcmai0X;2es8g7on2!cpNK#*wzB4=(w5@9$JkSO5@U;vRZCJm$@$0iXH5EMBa+0{`5 z5sj{BK%y4la0rD$)KvsWK*0-Eg9i%ec;Esm4sN63?hk9GtGmCWpXYgx?|rL!XGGX) zGn1tz005Y=LYN$Qq|QDlB>b)}T;%`{wu+!wMU*5-k-?KeK!8B92?ALnUNXdicmmbm zIw2nbFiH|e$0}mkp>)1Pgyqd*uu72>W&?napHj->r$P#F6O=3z`(j?Twqrn{z!$^y zV&mCT29zQU$&^7+nPJiV%v3&2fbshg^ik4b0THC&fl5)DSWZ{^Vm|BA;rZ+~4g-FM zC{lefU!00%M}Q283qUF&lDTL!da>-^HA3l#H$2l^byFWKH3xvI)hs%WUq43g}68>fpBv!DPz8Lrm zRv;A6y}SuQcq$<{z?(@3A`%ExiZ_W##p6i?FK;G^Mw!$29+${qdeMTtX-q;Og8;Ls z6dE~@8bBg5m;^kPgrDQG#Bv2s%!lUe3Sqlnxzs=9(it*{r;x~^C6ctc3W!LNC?xU} zi4hI1y6`*p|2pn3T*3EpM*fSO;b3QQ zv&Hd$#WJ@ASK#dQTj|4#Z_NXV;f|5Pt??68RSN)!bQUupS~>9KV2|WJ)1u@2WLtv} z6`{5Kcaa+^ro#T@xV5eVLyK76jOjP>Hr71)#l-{^+gm(ZfHE(M_MME+u@78Cwy0@v zTa&`6RP{W7D0goNh@@6rPfo!mVdG?0Q-173zh~|Z;(Hy14@`xjz?N)lG zG^%&y)UgFlG1oD5M}Ro|9$O=>tMuKyqW&AMj2^Kr{|ISiSDbOM+?-?hM28$H=LlPo z6HSGrD7(mRm#&F1a&C7P>L$_cX6-9ftP$5DL^LzD6TFeQSg%Hhn7{Nt9IjT5^*<(c zgm;Jey?b4Md(t6y;k~tL=0arN%&uJ%?KO#?RHKi=@3eg?b-`WFJeWSBEy}tQAUKu~ z&bnS_Fc`LPU(}B7-_DO;d3b5{)1gdaSNk-Z&&-P_*KaZuA)k84kND490XJxJ?|MD#9P z$CWIb9>q{Ewa#7^d}*LKM#AJaASw=}$L89xzu?p=bgeS>{*GDe$BMnr+veF5@LX(akq zW~HVq-KrqGnoAtYmOq)F8{27ZH}w!b=GCx0ktP0z6w4`dLS$p?cPVz6_6GUKouK}3 z(WiN+x7ob=+1tGc^;RH{yC`xu@~4ahw6e+gY|=4zH|3O3cT1~!m6OX-QC6>Zs7*TZe5tN2IqF!^V-B3oq54JQ0(XR+BGLSDl12d{pN;_S6^KXv*LqPIvFqwOP`^`Z+JO8cvdMK~UJLBm?x zCqe#KLJv_^FK=1lajxmXW#{~&7VmvYcvt5x*AVNOWrnhQ@6PUJI-0&%SF^P<7_@$4 z)88Ew6M>J3r=6pSe`aNzDZQ3@##ZQlC%fIY_WAE6+V!sWFA~#Egc@J}_0xFa-E3Wz z$5Vm!{7}x(U}V~&HY?Qcb)LZc{eBh*hta%0Jaqta+%#{7?Yn07&xREg#;gh4xc$F^ CcE9KV literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bubble_tail_bottom.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bubble_tail_bottom.png new file mode 100644 index 0000000000000000000000000000000000000000..c642ef4b288d745e078a23f761a647897d1fd91f GIT binary patch literal 1326 zcmbVMeP|nH9KI%9(`D6v*vPlSu>m3rlB7&B$wQ^IosS_ z?=B{-ircEvx~>#funv_LnH2oMA`E2%zY01ORG6ScbSqlx21-E(N=JRuHq}4M{_wcF z_v3!g^Zef5$4zv!pD44}*bxLN3%7DnIM(H#(h~T-h0M;vq1xno%`Uay%nG`MFru1} z&~RE9kfM?xjtpOuni0g>FUNY#-bfprRMRdYZ{y0PHHb!#=9Zi$BnKrEO-KW>;>Ui! z@&Sg*q95z=L>eO+E2ZStQC;d9ZI2~K2a}YDwH!yAb2KDKOQwM4(nE?t=ls|vFAeAU zZ5%^4P0T?*w&hfBqyuGDT|zysCTFq{0F)$M!0jPP(0~$+fWRB!O*(;__K-B;MYk^u zs_9}s9pysXT5#pZQl_cVIG)XBUD+m=st@3RqNqFvK{%m>(-=`qA?H+#+5!V78A)B% zOj%XXJfo0MGo~Mdo^Bl>twka`#EP*UC>Sz4CulfuHR9=X{#={Zh8dOqbz@g+BQ~N* zcvLdfjGlz~=&vn+VeIZNlsAOl(2wdeOo}kXsmV-QQp_;t$KV&2D2p^8ycF-_2)76D zJOKa`VmZdk@f5@OLcSmJ_>pc0L4;X&dri;jv^?Yqp)qP_w*LbkQ%CwP)yCKd)YHI$P@gaNpA5 z)4daCF5f)rxMNv+Qe=)a*juc_&5n&r^U1*c^!RU83;Wx@J^9JP#mUdRpE{7RF2C#6 zzKEbJA4|s$y&Au_XK698{>lrTf7%{j@t(5JmR4zHG--RZ}0v$EuKSpoPs)09|$w*t>Om$xcS6P2Ub@ZXr#fLAH(^uxdZm+2OhOq?J zr;9(mYEAS-hvFDmZ9#@Dj*Z&r(=JELk;VNF@4M?Lr{DMtymZR8XkB}#d1|C&Dfox! zD7{^@cCcaUFWb_CKV3XIF&22I;@sHlT?y>cfrMrGUhCBRWlP^%e?=WLw&jC?b=$bJ z-gEvrd*uq7y4!7CJ~UJF{9Ah;amCM&c)g`9rrhcHsAr?Pq%xj}S7p9h7z;h%zCG7z iJ5Q&sGuMleq7vlliPWC>53dFDf3Ps$&b=LspZy23A-I76 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bubble_tail_bottom_ef.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bubble_tail_bottom_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..587452a2f8397c1418d9492e97bf47b3a265eb7f GIT binary patch literal 1903 zcmbVNd05kS7_I^i>Zoj^!qj1?D5cUPr3Wb#Xp;g(3KgobF_qE=snDi2VHCj~B8Uf0 zCvr|1APT6=19?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2^)=$Xn}-flW@ z=2ZM0$7uaNL*F!omFETfCAjM=s;(C4a#9}ehzM8wl##yszOJKw{s}y1t<>#S>4ay` zhwz{itzCXcGDf}+3Qqf3OkGjAa%o)K@s-t`^XoQz?U>M^Ueta)ak%jLm+O}7YJ4E0 z_)*@ndSBjScz|`QY^MVe^nlvN`sOXxM*0HyneRxD*D)t#`fUE-Lrr2`GE9%^x_x$U z#_6Jf#Cr9oi9tp55B^-_x9xFK`Q;@^KZOdsn%=CWM(+Q?{nB`9?_X3NWw2q6W_wiQ QHTy46sfakmRx?9%O!U*}z2tsv&Lnr) z-PNR3wAoNP^U^6B-5%WN({xjOR2&pB8`Kv?W#Yew7Qs3g5*SQDoWE<6>O_a@w8r&mt1KIc5EMOwK%ywm zpfr+|xsz+CpCFvm>cpfqnS7Sd>P5e7%lIqB5=Ik5|6rvgXYme@`U6z4X#2G#ZCYvcuNk{an-g;-M5U3b&l*{r zkLlhP7{~6xifln_4L@qAI4N>L)U&fiq*)0uO5z*8qAEP3!<-ZmX(j|EiH1-Zj*CKA zlsG|%3`d4wi(@xzPzVM?5;MfX_%MVLEeI?#6pU~}C`gMEWLwyTW?HhAMJ>H5*4xAi z55)3u1IdK#!z-~{HIu2N4Ns*b1qtg*R@Zn$trOnLn%k?(eG~?^(R}_C~kovefZgTjNo1Yyal^PURT%T=ISg zzjYtrawksqxXX0NP+X>hA8qrG(Fncj03KRO?~-m&;x`_Wf6BcA<4!wvo( zJ)2Lap3bDc}_fU1>yQ-h}M<(`L59g6)#)K^`#(^Fr$7j?JSRRw!JqwO27pS~dkHaqL1F>mnUmGy1`y!%Cj gA7E~SPDgCPL0nGVj_2}UI_$qwLK+c29GW`y4<5#((EtDd literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bubble_tail_left_ef.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bubble_tail_left_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..9d84fc3d46dd7bdaff20f8fbf756ab8ea549781d GIT binary patch literal 1730 zcmbVNdr;GM9IpsFo7Pq+LSX_5YH0&hXj9Ti0R_~FAmg0k z6!h?MOc8g0$P_^YaiHiFWFBJ^b)Fjs1MxBB7|f|l5#0Xp{A0P~_xyf7-}hxtaL_6z z`?>Zs8qG`2%fe&fL>wDL5X8#CwjfoAiIBbK#>eraGnN(x{n(;wtb6Bbg zW2-SUzJ<_I`G{RS0j6U2aYa@^${OJsLQf?{lZfKlEe6a;Dp3)gx?$<`Iw8pQMq~n% z%ZEUjj0=KdxfB(9qcTJ+7RUt>aDwAQSUv)C5U#`<1tl^NlyL=o9xRcATnLiM#S#HL zfmIsKq{gVlCiLnlz2jK;qgbJoz%(RIgyDGNLL}Q#2-VEKZfUFL zT_~>e5chko&?{uIvlxnYnOGxkmo5J>3oGUIUAL+KzQ3eBkl558BhK`ys|-|26dYdu zn?TQR`KQix)E@Tf9ojayF!D)6o}ssFvVTMRqh#kh$Nqf%%gc-+uUoqn6@UMBdhw;V zX-`KV^;}-mR`GVdOG{FwOP||czM+=|2P|de)ZGEwigNDdKDIMGVcu{A56}E={f%or-eMz?05Nk@qcCuYTGg zJAZ&QwAaK%8>;G`NwQjArn~pViQVew^4*)K%Yg^Uozu=&3x-=q(r-ns-tq8~0NwfX zaP_u%3t&DJbtb7kGdlP3H%;qKZ4g23zRAhH16xgJ`%d2JZQWiO>xJo;69SX4b{WlNda45eO;GzqrAS@qf;F^ zD>NG=6w~>WGF%esR7Agi+PP|sToNtK3BR7Izlcfu<^<)Trm^w$xXTgcj)YIH8qW1s|~SujLoNGvMaH;C&oFM&49U zO?NosG$XcmV0msW;C3<4(|Gty-Ux&ggcxtSlyn!Okk`tr&w#6wRA1f|EB)uG=}W(| nKRX(-?i%w{7th?i(Z-Rs--)^GMa8b&*1w8U7KBzvHtqZe`<#*~ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bubble_tail_right.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bubble_tail_right.png new file mode 100644 index 0000000000000000000000000000000000000000..50b5e0b077a6b283f384c2eeb7eec4ab1eeb3cdc GIT binary patch literal 1290 zcmeAS@N?(olHy`uVBq!ia0vp^Dj>|k1|%Oc%$NbBBuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFsEgPM3hAM`dB6B=jtVb)aX^@765fKFxc2v6eK2Rr0UTq__OB&@Hb09I0xZL0)vRD^GUf^&XRs)DJWv2L<~p`n7AnVzAE zshOFfj)IYap^?4;5Si&3npl~dSs9rtK!Fm_wxX0Ys~{IQs9ivwtx`rwNr9EVetCJh zUb(Seeo?xx^|#0uTKVr7^KE~&-IMVSR9nfZANAQKal@=Hr> zm4GgVcpk{1iHq`zbF$JDTz5Q`N^fZsd*)yF1AWQ8NHOu6e~j`b4ynX z7b6o>LswTLLqkV5XBS6v7gtM1M+-L#CqtMS*z}s1n;N;9xw=^zI=dMfx*9oI7y?Z) zGB7i8GIBF;afIph%quQQ%u7y%*_#Qp7pm74uU;$XqSVBa{GyQj{2W*c2*}7U$uG{x zFHmp}HdD|D&&*57FE7>vMGwTcE~!PCWvMA{Mftf3;PAD|#A3g>qoJuOkZ?A%1iIYN z(9+q`+{MJ%%*4gg$kNrtQVFUzg`6so1^G^l_Mk`Mj$B>F!Z*CZRGbPF#|G3+$N#&3!$8)74nj1XZDniuaNeqFD6(OEv% zaOvj~tIjx2eW|=gt5-f!CgJWgHR--XJOS?MSFKaDmNqWxHrQtUrIp)8vu8uUMTxAM zmEpP9?4eWRzBSplKFey`y1KP}>x{;K+OOoYenfoTnbRXZWtwDKSm5`XeJRxv@F;F-4tvWa80zT#DfKgX53oB;WOYp7(yTH7Ox_ z`qX(-SuED{*cepB%z>_N%4BBzomExEOujUhLMIbhbgq`fS%{v<#DQ3ob`7q=wfeku z=kRbA%RS4ePN7qjOJN;h;%Hqm9Gl6)pjoW&NSj5g%f@LS6JKLA%fNdrtsr33%Rr4t z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%t^6 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bubble_tail_top.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bubble_tail_top.png new file mode 100644 index 0000000000000000000000000000000000000000..b760c0ad0aea136f0413a42a4292418aee4cddac GIT binary patch literal 1270 zcmbVMZD<>19KSTU%#fBivAC_(<2odkCYR^(dS_yDxx3i7B@1a_-4yI4dD0xs-DP)| zB`sxLEsRWMOi=6xnH2|Xzf6THgNX~aB8nf1Ob{JNC;KoEW>i|3CkiyO2r0)NMax$1torIl^brc*K16??dkmY+(Tn2MuA&7*$I~UDP1P7S%k& zld?DgvrsHfo&FX^Fw9z#a%09=>KIc{WshiLJPo;u*ccWWZdAp>BsB0moRE|#asS3m z0+)(W;zS_jO;tHqmPV#EI69rq6{aT(bdeZ-5sx$&Bp^dW#2a!&(V0e+*w$sx+}tJ! zd>dj+Mu{D##!?xaQ#FVOJU(~93jiJrdVoI=41yt?@&bzVqC4mYekKrPs1V-12xLtw zmY6J`Xxl=oC{Z?yDnpX>dfij^c~otJ1T;;X8WiP52)90^7-GY%=mQ-E9_j^6sv452 z;HILOS8GO;K%VX#L9V7!yTXdz4ipL**$}HF@OVjCHqW(<){QLu*Nr{VdTy!;$t={> znpQyhC=GPTD0YuFWCD>l%yCUZNf9f&TBylTF_L_gKwmsXsmK5-LK(lN(5srh7#$Mb&I8O6HpN|Gy0sw&u2mKr?`1n95oB)1$mzz{{LsSZ|V^>0U z+g$3AT!z!2XsB9FRV$qe$dpw>)yrxX=SG9L>x85f)w=$?nVy}~@=%k`z+ysEWqdon zjI@V+HckatfdgEaMxFyeb99LJb3s2(Q?$U-M4MauKQSYbGo)D@|0$Nv7OFsVx?B2a zvD-XQK^>!^)))*ArZLR&T#{#Vji2)mx3-2?$GeU><{fV_PD zuUg?5t~uqUUA@i2OZgvWzxy!aylJ~L9IK?4rFWR~k2n9aY|gsAd~EHu_1@xvBj2?C zSeer%SJ-C3NC{m!bkPpzB6(8alptFa;exUKfvX@}$EEAP$s%{?HW=;_*UoqAye zYd-6|_q6k@ZH-zn)`PyLhI0|4IvZ zXY9?BOB;)?4uh)h=zPtEqtn%`;`Jc``a6Hv-T@9UEc(c#;**bzpF63+{ zxnDvnnsce^%-1E~^;X>aMQp~>e7Agi=4{v6bnM~f%#)vg&~wpZIf!3=!?WKxj(vaX V6Y;g$-wyLnloZnZwfOk!{{S2JqvZeq literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bubble_tail_top_ef.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_bubble_tail_top_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..194a9d6ee207ef285463e134d082fdd929b6ce26 GIT binary patch literal 1645 zcmbVNeM}Q~7{2mR0TEGj6XwTx6{%HP?x3Z;!Qk4v&N>REkbx2%*WOVMXs_HIP}r8C zh=Ktk8@g&-Ca^8Ym>Qi7=M)x6Kpm58%w@)zsEnbQDT{MTma!{>+aJb1cDcLX$Gy+< zKEL-PS8qvwbwNl}2mk;JOdD~lIIi(MK~nL31MqsqAyOc6g)Fu}s318Sz$n&6gC-~G zpsh4XRhC|$lK{ZKfXU7ka?NR|opmZnpN-Pvbc<*JNJ{azNqaFZfHvB}xRRlJXL=!! zp^~8-wK>l0HqeF4#ww1^s!GqcR~6fJ6qND`nB+l40w*nypvPI_;!#gBG{cLEbKkZK z0%uHw;$-NFs9duJG_V{Es+IAv_Ba>@H5w(Hpw?*M4ImN+BdR#@*2KaIs9J*}iQw!7 ziQYJ>0JY-ASzqER87dS6H>y%qR8%M{;*~7tP{BH#&c}fuv7$vRU+EG^PppfV%`xCK zZ|4}dz_2dR$4J`PG9eifl|DIw(``0CC3f+%ff7Te@{n#7tc+7RoxXF;So4CF{#V8` zt@-RqH?6YLJX^-u#e5XV=D=d?p6|$KD5^m-I7UngS%S0nGAHd4On5RReo;~kg~CXp zj?m&rf*K|W1couA0ml+?LWf~mqgD^kaXbr);5tpBL676Go`7Kj(He1rz>JA_JfcU` zYW*D6)WFfCz;f9vTQXMxmO@rw`9jtW8nQH?Jcn^nYz4p0 zm!2o5#c7Tyrzs=HI>DLvqRcb=W1>QgFu(?_PE-!VI)g3|PcUc_a2=u}a2+&@rT$OM zRH7J_uQ>iwEOT381^T8>OJ7_(Z64Ysb_^%B#-z3QqX#Vvs*FhpOUL8ud_Bk5j%56oa4Ki7~!qOGC zRvP+vT6k^5GEiNbUD6E=!x7u>UVQYCe!f?GqK3HxQUh|uk&|vWHxzi{UI9nqd-{Lx3`tQZHGp8E{-_T zBq1ZR&Pc(tFV;EoGtULr{d#FoVTNMvcsDjEKDj?08k2uhlvRAc<1>lz=VRWTUjOj)zak*V+s*s4^zh`)R5)r#XDc*|+!0MN9U#5G5nD_^S1lXvuEt#4ktc;(a{i=6y?_udr|i<{dn4a9hs3~F{wwJZju z{TaP)Js#~T`sthZQXjrih)sRymD@*tNW3-r%Tn+BhE7hQl?H5+3~ib>)>HYq=4et+ zTVrs}__D~nnvip{!?@|x*gDy*q{Hpq9i0>1(8tlnt}uOh8kM$x!SMv8G-^2Yk8Obw zS&{May!5zV`S~&V1Gzn*+wn+ux(CbL2aNW%WARf9hwp~x2PS<#B+Csb4qCmtsp}AT zx%ZvvD}Dw?@KDtY4Gk03I}x)S^Zfu!L^^&{pTFZDBEL_) literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_button_dim_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_button_dim_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..d1ba39a38ae9cfac2822d6bd292565120e169659 GIT binary patch literal 1670 zcmbVNdr;GM9It{?QS?L<)Pu`{Iz(ub(5AFUg_abA8x>ooC~jEVKqDlnO|S(;-FB=X zPT7##)Ds8z*x>X~8K5Wwl>_lOMBqU10atZ9aWasBFg=#?aQnmg$8x{q_xgT5-}fae zN)_hpwA_iu<2i?~$JE^H!Mzc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@f9!X^J_rIZ%mu>*FbswO5Fdnid}hL-V7OQSiy$fr zLI?~?5l8`npj0H2D-c11j4zNz@MZ86$J?-wT+WYBN<|1H307&jNVCX#5=KKIfbD#Nu`jaX{rJ=Mv^A2M$!VvlVMYpSpENr8ILiB=PZtY70c8WQ-RLy zo6=_vZ<+@qn2w>C)`)Lw$zZWu`&5WD#n#hb(w6HfU3ekq7!IFpm|m~6cp??4@m{Zt z_oN}ATT(neuU}S4G@+LJzORC6ZYO9;xIzhvdP(P2=6jmev?+&YI45ngUA0 z+g`?p?Ns##b~Ja)jdDbmUKzb*&oOw|Ir|Q&Y$X9Iy1Y5;w(NOnbEG9w^Vo2I@x_xN z>tzGIO*!&Lwwr9_#nxisv^IHrc}u1Lxfiwhhd;_@jc^=8qbGM2f ze55jZO-4s2yw`VDulJ+=e%r3cp37YWefS*_4IeuK=I`{_JXk~dulO;<@2M@yC4Jk^ zbGz(9xPe_4gL|i@DvI{G{^9fBtERO^(YpQutf2Hvk8-fe*L`$7vVPH}l_nJIj>!s) zSle2E({W=csA=m^TtaBWwE!df!NW~v*WmJZ&sUm`aN)+g$`Jm+x;t+6vh&&3YswDe z3omf))(5Gt?!A2f)OUp1@ z^SoE}Yy6(?uXMs)?&*F{ikhm~Z0_{M?k(1#gR=LSWSkbog!e6d7#u{278K=07sqPG z2(WVOl1Ya38n=lTD7yRlHa**4Tf6bhh&JT?Z!?y|YWJf9t5>hS-rCybscmm>{A>0) zHr>>J&^7+chd9PXY^h&46Rv8%R e^?KCLh0U7RKAU)OYh$1D7ot)mAV*|bTmA+w!i)_7 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_button_press_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_button_press_ef.#.png new file mode 100755 index 0000000000000000000000000000000000000000..ef508be4671ae64c244f8b8eb8185fa7fb31bc5d GIT binary patch literal 3057 zcmVKLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6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mL004C`008P>0026e000+nl3&F} z0003TNkl+% zy0Ml@`&Xm61-Q2Mmf=?3=|4grCbxOCH_$)>4K&a|0}V9LKm!dl&_DwXG|)f;4K&a| z1Fb@vn#ATD(i;p@>HMG}wEJ6S+c<3qJ;7ELx{ITqvszJ=$Jnbv--;Xk6}GvH9`=jz zL8tV16HWpOQ=j;05=XOvhPy(y3FC zFvDGO{26uj#9P_@Z{>?L*WTiXiKgPat6u{Eo$WZw)Q(6!00000NkvXXu0mjfS8=In literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_scroll.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_scroll.#.png new file mode 100644 index 0000000000000000000000000000000000000000..e0ac310b3303cc052d1c9eb3d74060c6c3f425fa GIT binary patch literal 2999 zcmV;o3rO^dP)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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OoQl445ML^Y)`I>)jyD{4wg zlV}v0BJ$aw)v?=N+SQyydy|zkS+p`it9oruE+9v|M@i%dVdD%-L%vcfU3{ zJG*pFe9&^B(tMy~b^Xx3FZRa2pWW=)c}BSPdE3z~AMEzk3$J|iP;lYhA8*V)Ix+Y6 zukF{5FSNd!al##fd+LQN_piPG?LX6(4;^e?Y8Y#8c(0_EhL0sDe)@jz?TzBk+vavS z;Nq>*GZ(sN4$uG6XHM;Hdhp`SW0SwHxjI#DY#VrM^Tdf=U1zk3rHxJB7)Oqr{i<*A y>kp4Vzq9S*s`$wbx`Y<*O@5;PF|#l~O{^pCt{q>voLTc-^drgZ9oi-3?eWKfqL!%u literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_title_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_popup_title_ef.#.png new file mode 100755 index 0000000000000000000000000000000000000000..423231c0c87e5bdbcb66e5fb7b605ff13fb7095d GIT binary patch literal 1136 zcmbVMTWHfz7>+2SlYtN7Wguix=LWX9v`yQ%I&-V5*tvC;6@+P)oNZxEPE1a1J8w89 zDCm=dFQO9!Z$sFls3^h^*@M0b^L5@}C_`nSxOuX*(}&@Mha~6rf8T%4h4!|6wKa7$ z1VPlMT9pi*x8isIn$`HbZ}XA8c-n&09O{IdT|26lod>swZcr_I$mWuO2`qp#vSj6LPbej*1zrKK{bQOU7evrNf?6~xmu@Fz=mIhl z3PN^CXu4P| z28*E}bo*#F9*_GR92dY60k3Q$trW1mZB+&Zc)Dvk$b>fOGip7sfD#n8bkPONNvD^H zZLbn295TA3IW!w&Xv^~bT9Eco2K+H&S!pj@b^x6L9xS*z&PVUIDj3J^-->)eY>jZx zHE~k3yaM%t1#Fa35){4(8m1vI$#66#Dp5J6Fe=BgA{$ktn9NCHB&=|}ROMI>%k!!v zvN2v&)G*7coEVBrGQ&t=Q3`QMS*~JJwudxZ2UWc$)?2|w{)rW27ib8&SqSsh3TW?# z2zvd{A>~eSl0ssP zNiwlWSdDWcwtW$6{7=kiYz*xe$6v)#J;D{}FPBOmZ*(j*#)~&^Um4{;&(+-; zvukIF#J#@4p${j!$FG&2r=Q&2^u0s+I<>PfcKYG{H?!lzAMZ@Rt``{Y@~Qgyv+rMB zdan7G6Vg8KuT>>9!N)r Fegh#beFFdh literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_progress_bar_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_progress_bar_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..ccbadf905e559e53965d274453d879cb4f1314c3 GIT binary patch literal 1359 zcmeAS@N?(olHy`uVBq!ia0vp^B0wz5!3HE(wfP(cQj#UE5hcO-X(i=}MX3yqDfvmM z3ZA)%>8U}fi7AzZCsS=07?{&CLn2Bde0{8v^Kf6`()~Xj@TAnpKdC8`Lf!&sHg;q@=(~U%$M( zT(8_%FTW^V-_X+15@d#vkuFe$ZgFK^Nn(X=Ua>OF1ees}t-3#_`hBq$Z(46Le)Ln;eW^@CE2 z^Gl18f$@>14ATq@JNy=b6armihg{2|P3~YLx4K18a3|!4zEX~Xf4PA{KP0S6P zO)Z?999^BAo!p#YdOh=sOA_;vQ(^XI0_}zBHN~sf%DE^tu_V7JBtJg~mI4AY@=NlI zGx7@*oP*62G{Q6UQu51-H9^q>@vTd0QD#|cid#{Bt^zoGtunFLPuSlOy(#2`nLf}l z`k=&tlvrRwz!V5#!jnFb1J69EdB7Y~1k4&4oL%7z42<=jE{-7;x86+K?{zpphgZ15X9NB^vHej zoQy7y+ZG~U4)qrcpZosw+q~k*vkZ8S|B^g5!*9_~&tx`(p681*Z@mA}+$Ox&eACUG znFS2D6Ao7Rdr8;qXzEtrShqV`J1%iyz=WTgYnqw8YQEX5zx&p0p4KSy;GO}+1@O%==K!;T~&)VO82&fr5~2b zu#bDNI6_Bl)*tPBF0lm3dj~?}4s9^5xj+9pC-YHH+r8<5LR%Ja&P$Cvn}7b(`aQcU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3*wwan-m+u_CWd96r`EX}*ZS~w2Y>Goie0hyr z$9HV!pT}=X-24^ay+6(KnvSE?j$g1%CH?f|mIIT%gXcf#p9$c@>y4q_wZFG;ru0I{nF#KwSoKV!g)Z(c d8U}fi7AzZCsS=07?_nZLn2Bde0{8v^K*7iAWdWaj57fJ{tG z$}cUkRRX#c;)UD-xUqS~&|m@vn0`fKfxe-h0mw@*g}%P{mFDKcRTq~8r6Sym)!^cg z%7Rq=pw#00(xPNw#HA^NtSYc_E=o--$uA1Y&(DE{Vn9ZINq%ugeu08>u&JJ*LU?9g zN`84USiP^Wm1kaYNn&1ds;7&s63_&_%*+%kGjl^jM`srkGfP)DLqk_13j-5lR~Hjw z10zdQLnB9Lm|mCsATTy#vB{a1P5?GVFwQboD&S-Y`RQy3Pr&67Saa*r?mm@+Ds3=M=AL zcB-nU&n%j>bhC%=-s3N3S1F1aGZzX9%vZm-$vB|)%#V=7WpSsxr5ADin;7`5PsclQ tf-vJ&A>oD7Sh%aUEls=H>CL2YfZ=d$r>ePg-7HY{_jL7hS?83{1OPWXZ;Jo` literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_scroll_bar_h_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_scroll_bar_h_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..2a15e4d30e43295e342cd792edaaa9166f2ee55f GIT binary patch literal 1224 zcmeAS@N?(olHy`uVBq!ia0vp^vOp}t!3HD?=a?M_Qj#UE5hcO-X(i=}MX3yqDfvmM z3ZA)%>8U}fi7AzZCsS=07?_nZLn2Bde0{8v^K*7iAWdWaj57fJ{tG z$}cUkRRX#c;)UD-xUqS~&|m@vn0`fKfxe-h0mw@*g}%P{mFDKcRTq~8r6Sym)!^cg z%7Rq=pw#00(xPNw#HA^NtSYc_E=o--$uA1Y&(DE{Vn9ZINq%ugeu08>u&JJ*LU?9g zN`84USiP^Wm1kaYNn&1ds;7&s63_&_%*+&EXj&Ru8kxG8S-QFz8oC-;xH_A;nLD{U z8aO(cx>=aQ^t$9Hm*%GCmB93-!1bCL;M5CB3b_S9n_W_iGRsm^+=}vZ6~JD$%Eav! z7o6rn^`_u-i>WJ4z4}1M=z}5_DWYLQz|;d`!jmnK15fy=dBD_O1WeW!HD#n27#M9l zT^vIyZk-9e*mcN($7E}it%!^NlbUZ2N%MLrbT)({UH`DimqZ9V#D^K~p-fiyb-lLm6*VpI=WIZyQGX1Zf`xPd|>u)@B zxh9!CiELcV&(pZB+al}a_V@&@njIa<_jZegJ!jH+V#(fjr)73fTuHWFtJ;F94TmHR z0&~A@+kRW%rMUsqF$W=~x6V1A9(<{L7{ML*=F65ThbNo6E7kj7{I!Mcrh1>~2W7iw zk8;=j{W5W0gX(sU)(R%}eHY7fdnOe0+HPPr`k5Bqm2~_{p_A6`v?H^3pI*no9VxDM z$7AkdwNg#fPp5;v+5{bT5DiING$A|Z>D?BO$hVGf!xv3yJEV11#eDUnm1@tJ(gP)~ se%KPw9J1%^|COuv`nGO2u4m$5h`CYox$32fAE<2cboFyt=akR{0NQD?zW@LL literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_scroll_bar_handler_h.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_scroll_bar_handler_h.png new file mode 100644 index 0000000000000000000000000000000000000000..e10b9646c69b74cf229b1fd29d933e044eb49911 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!jyGO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%>u3CaA4d3`eiJFK&vYvD3LOi@fe1Q1&?2L4L7F4mbyI^GX9_RNLd$)aHq79)4 z9}0wcsgdI(e}roYNWrKSsFpY`Qq!2{icn1(z(jejHpdMXY<(Zl8f|Eh zQz;92VK4rIdNW+Du$StBTn3wAyo>$oqVq?%d%Wdr+v3e^;{y|SyN%nLAN*d9pTvup z*pPHzzB$E}9b%VAYGUWR^l2gex@FV3CLtxHclMuAl2 z?XKYN6eRYSUQd_bJu|YSe|zPX?9%w1vm2heU-sN8IsAU%K<@JL;%wRP$%@qvPkx9! z=^c&ldR)4|`uy>;NvwHre{4vcxFD|^i#!{h$lQA||H{Ss;X`9XsqBG@ubY24sgK?2 e%Mod^X<#1Fv@y{Bid{SIJ^Pr{B925-2mb(^$b3Hl literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_scroll_bar_v_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_scroll_bar_v_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..52eac0a019ca6840dbea342ac653a90ad6f997cb GIT binary patch literal 3103 zcmV+)4B+#LP)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=2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g_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_search_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..aea105f0fab75e6572f0ad7d257b97ae51193d75 GIT binary patch literal 2857 zcmV+^3)b|BP)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;%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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~Nkl|aQFI#00000NkvXX Hu0mjfEyzpQ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_search_edit_field_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_search_edit_field_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..14482d36da837b45f0452c552dde3225e231d762 GIT binary patch literal 1834 zcmaJ?c~BE~7>%G25ftPQ5$Voq(Uv5e1QH;V2q6hVA((+E5tSN}g@lmovRNdcv~mel zQcn&qL}?8oS_S3us-P&M;02D32L-Biz=}c@FQywS*gr~lcK3J8d++oVt{Ml5CU2lmjecEqE62-@W79{9Aa+XhCtvW1lRDu zf0B}kC4d0IV1PyQqAKVN2Eb<17~U*4n?V7XbOsZm6E~a6@aC}C9HtNO=>mypm@I`1$#nHJD5)fuQPBb-3I>)#>MtDF|V`0#l>7 z8qon}MR_cejPpPu(|=0PqT{kU{ikCh4h%BLQHVjKn@bu4ipBpA)oRDldOQODobP`M z>!qnE3`M|tBpFi>jf==8W;r+`C*JdjYJsntr3kS%10f*8KOzJ5XmL&W5JF$E$4-`j`j%V!6Qm}6Wa zqDa=lI(&?){LJ;6kZZPr79}DJVNAUiRt8~+7Wh~)M?G;a>Ofn5W~mB^KkxhjoP8F~Zh`gW>Cmucb6Z$d?-Koh}Mp>d3ddl=86V)Ic@m zaxajb*CY}ZbQcO83SzkZ*HHS6kx3&Kr3Lvfy3bE$y|6bjTC##NE^L}@*^-t219`YC zQC5`R5!TV1P!+TL?wo9=fxdmEQLleF+-Rzt+%W_iz4>-)Di(Tsv#oaN`dzaBbW_>f zzVqwpp|U4syFJ@NpTFOj%s3B(=+m{FYMm=W9dAr7M7`7s-Q%og`rJHW)5G zkg!g=tiRal_p|+t#Ux!P-`*GA85GqZHQ3%sl}wXP+6h=-_Rc33+EkVGlqtD4xX#8F z?8n}M2zt(y`(+xdJ(>ORb?b@^Yb=%Jr|sx9JK7I{CmL2=_0ODb+C8haAN6-XKeM9n z-BWjqL1&BaWA_O{J*{wG&4+-lP?g$d$ARfIr|Fx|KX4G_<|4PtuD8$aeCZarC~=zb zHRdE0-95`QX4lJvsH1e0*Ww^9=bYKmS`fNTn&rN*h_z{pTVqjWo@Fa}Ihi%BF1s7V z1FK#iRF_JZog_b7>-KJn#moCK&OWJmnG_Ghkw}HxZc5Ys2h=vqwz4V9x^e3>`J4=o zc=)HEPo9~vt1T|GY)15HHuRqDx8}lc!$BjrH2Xut2B;5@@Q>NL4&`OVXHZK=O`6d- zV|qY+KsTE-+&nK_W6W*bQ;Vra$?%!ElmDtO9p9^R}6;jw|cRJ0Clw zKW*(j(6;tuh1}2w> z+qiSlV!M|n*F??pMvMGcvO^{3Z0jBc_|r{ANl=%la!X|f6t&Cl-p=5IG`1=F@mc7* zy&D#sy)ruvg?NmDgw3!EL~S!n-&|7?X-o6S6?s06cA|!>qKCIs_M3W+8+37RJMU&> zj9MFNqN85F8h*8UQQh5Sf+EGwo^C)$s`=LegzWMtl?W@0j vmt5;Yk=0f=3`q_T!fWl{EH!$Rd~0Dt3V^D;Iz@sY^WQ5(6fQg(xF+*&$tcMH literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_search_icon_ef.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_search_icon_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..6f2e34ed601cc12ca8fd3964f123a4cd15a72bf1 GIT binary patch literal 1806 zcmbVNX;c$e6b=Ryfj|)yS;QfL)+VEe=4kItES@6DV0efPWf-Fs$F zSZENz%)tzY!x2O)`Qg}1GCZbpv61c2SAaTvfuG!WoLrjw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UUr2gal6yVkVRcY#i3Fkis=!S<{sG#7yM+J% literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_slider_handle_ef.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_slider_handle_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..bc6e3f55bb58a0240d5d797857992af6744d6779 GIT binary patch literal 5773 zcmV;87INu{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$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l})6j_bM)`~7|yK=*m4)}a9H=V$<0y`=S$kFS zMv^3TY;5e!d_I4L5OO&Pf|lbrOZ|TTe*m-&%DIkfitR&+mzS68gTdfy&Uqk&_)lHe zFXeJMOHmZ7+wDGf9H;xTrW_%JWHK4cvaA_R(=J3&WO<(Vx4~fW-=61{0o04d;-M-t zhi=I%7K_pH@^a1dy#I~kxF5&ye;9`G@0zClMp2Y;!!REAdcB<>2)q{wN>x?evaIP$ zCNo1Ro%Ve{a9ww0Fc|zUilPkw&BMYu5}>D))QF;JrPJwj!Z6&ONL=w(KKyLlB7@w(F%f~={U}g<2daw42Mp52_ZyL6wNS< zylI-#s;Z6=Le9i-toXj)bY1s5$8qd9j=#fROQt(aKz^Y;t51QFvDXJNBg^u?>AL=# zOeS+lRn-Yel0XRY0Sq|j{V)tWK@fDqFm%E&^x`-UIp;jBHZVz&6j_#4MNu-Us^%3% zDM*r(1z-vxv^b6t1VP<#oWFUV_opa|{(`-R-p(-VoRd$YncrSzhzs+Vt%S;v`7|&bgDSt?v7NEso$TELswJ6jk$PvUv3G3bDD z_0YeO-iQnUGxa?7nn_Ij{M{Y<=a4vl{_c(*fHwBt-7!erNjJNWCGbC!!%G14|BV4q zQ&&=#o?7q$dxs^G6hNG2-a+awT^4hc*z~00000 LNkvXXu0mjfv;^~3 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_slider_handle_ef_dim.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_slider_handle_ef_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..68f4fcf66b11b6ad0b510169c03c7ce44204b59f GIT binary patch literal 5649 zcmWky2{_cx8~=(}_a@32in4Oww=C;e_ac^(Bi4~Caz^W>M6#}RB<#ACJNK3Q*pS3J za&8F!TwA&R`i?HPw3O0nr%sO| z=zaB({s6#u^}kF7U~@SEfWg#VTieXc%_qRe-_6HYz(8AD!1t+-tNRld00^GTvp`u| zY+h3*FCIb-6VMn#9|Q+T00Di4W>38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+Z%mX988#N=#T&E+ToL&HB?%i53#F9vwTGn$jBG! zt+)EO{Z(nuYgyN`zO+OtKK(-toVAWaG&h(oUVI$--D|8%m&?BX$=Lp1Y~@u>o-Yk~ lbzeWx26)Y&`)e-vfJA?4H0?ll2!(S41~3zyYN$ih{{gQ1y0!oS literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_slider_handle_ef_press.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_slider_handle_ef_press.png new file mode 100644 index 0000000000000000000000000000000000000000..a00db9678aea13442b91ce2f72b4ad8e332cdd1a GIT binary patch literal 3464 zcmV;34R`X1P)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;mqRrN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F{4IO;Lr zU=`&15Tq9toN)5}qowe*47dQy{M?A6C>!axM830VC`H5 zByqm|w|i|e&J=RaKrBpzDFWK82psBXLg)f;*~{2%;vITHW? literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_softkey_left_text_bg_ef_press.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_softkey_left_text_bg_ef_press.png new file mode 100644 index 0000000000000000000000000000000000000000..f1966a8867003fed87c36cdec3c79275562b21a0 GIT binary patch literal 3623 zcmbW3cQD-D+s3~hqPM6KC4?v&C3>*xYO7|I=+P|^Q4=j>MRXzRVza9xdWn#%tlokp zR}wguBQgzr&Dg2=&9ssbY-z$E0UBn5c!9zhc38(%9UThp zzJhr2loUiVJ4~EDk#?GjBv6zR{WdiK`>aqgdlK`AVo_`+$ z5a^@aa5BIyQ-GbUAPwMWb&uBuJXL_Iq5FwCfb|`K&BL%;37D1u?m(?P^nuz2pq;=> zR|inj19xEYF=7BkIN;PLC>R2~%mvtVcdfv`Zr3ocfi63hTL;DoDd|MnQA_w!Sy@T) zi4vfkx7ie&|8maLkn9Z2<&ue#WBRuD6#xp-*e`FpcNRimtRWB-Qm~AU5*uxl7dKs8 zR?b(4D*ZG7U@0hai6*;hm1{R%efnBf+PK2j5zkg`#8}qVy<^zIA@xH!9{CN~d}0 zGWR`I@3evL;*@vnW;fIYXANRofwB0fXy+yG$rRsA&`KBka%=R$ZFy1rgj{V=9;kh& zMi!nXQRd)E{@YN5**d6w`49khn|wRQMXAXVp3zG~!52H~XL<#<0E7oL-5&rRXbVYN z^w+ERQUic?K@_M~lY778ns_@UPsf$H4!Tn(g_l}F-JM#@TC{Emo&YDYsuxYXMx#xGM7Ya!4zuF+?XSQ z4t)xiBq4r$JR9t$VVbNx!; z2(C==`b*s+x?#5<>AX~q0@QH8$Lp%e3WaOKm7YwqscMkkJMBNNQOR~cx+B@srS;*i zI8BD@z=xYv^p!o=YwuT)Hzgdn4t)rwV2RRcr%|8?*5Y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zJ^J7G|4K60U-`eqwLsx{+O?xl!asOE*5@tuPmY^wFxO%P-(1i56nF0Q#G~>SuZZeZ z8pJi&aiQ?GRprEe=^XzcY|HP*SQc$liL9aEH^_$h5bo!#b)s_*nhcs|w)hdL>mv}b Yl6ErgGQD&0O#=X-ZLC$J>G1S_02iEW5dZ)H literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_softkey_right_text_bg_ef.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_softkey_right_text_bg_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..e3fc84adc2a19fdbdae4ce8c21fbb127d3197bf1 GIT binary patch literal 3624 zcmV+@4%hLCP)Cm-I00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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_3R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N@yjDn? zz<>Z1qqpyHTT8904ganBd{6_LZOWyJnnHz&2+2XW#CR;lGfE>3Z>)-S&L}KRMIa2_ zMr$@3=ROeGm~zy@^2MMtk9YjV@wH*53u93~f*fFn%irKJ7}r!A!%7&ql{JrWnJ% zybEnm^~99DV$oy6r-lCh9%akh_h{`vyWYpw=^q+@ki?#mcQc=ZoqJ4s>l?i~JZF@GkWF2yzpZsL9 zOt*Penh<|&u|n0!e4WUIO60HYT19gyAh~c{vON)!LkjA;K!^0<&n3~WQ tY0|GYkd96&3WXZ5oLo3z0D$vzN&sJSzGUUya1p2hz|_#n0Il!w{NH%St6=~D literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_split_handler_bg_ef_h.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_split_handler_bg_ef_h.#.png new file mode 100644 index 0000000000000000000000000000000000000000..e2bf2d5a696b5af8f09e9ceb0d12505de5029cb9 GIT binary patch literal 2859 zcmV+`3)J+9P)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@|##Rr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HV(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} z00011Nklp>i3rtr zyh_&(Z{uQ~MoNIHZd(2kGTK<002ov JPDHLkV1kSeO_u-w literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_split_handler_bg_ef_v.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_split_handler_bg_ef_v.#.png new file mode 100644 index 0000000000000000000000000000000000000000..d2223f0aaa1681c0d7014660927ba35cd90f22a6 GIT binary patch literal 2863 zcmV+~3()k5P)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{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NTpeI-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} z00015Nklmo@^L#IeTM7H@X!;M!Nnx?Ka_U#=UZ+QyPJ^+F4CQsIp5}p76 N002ovPDHLkV1k42P9gvR literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_split_handler_h.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_split_handler_h.png new file mode 100644 index 0000000000000000000000000000000000000000..dfcc1b9384f3e9377f3ed45594eaefc1108ddbb8 GIT binary patch literal 2820 zcmV+f3;XnmP)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*nee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s}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} z0001KNkle`E#R%gt1BU=7v1JQ59rCECI3LSnMhXe^H!NMi$G#TQj_%m4rX836zQ c0RR630JC%*A9t|I6#xJL07*qoM6N<$f+XKo5C8xG literal 0 HcmV?d00001 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 new file mode 100755 index 0000000000000000000000000000000000000000..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=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;m{9|qGl44kKm&_KbX~^{00000NkvXXu0mjf_Etun literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_toolbar_button.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_toolbar_button.#.png new file mode 100644 index 0000000000000000000000000000000000000000..0a1a5aa0f74f7d2c3ecfeac22ea2df94e432cb5c GIT binary patch literal 5692 zcmbU_cQ}=Q-v}8Ym08LP;Y{OjWS--gNA^tCG2{obbMO-i}nN7@WN$zm|ucv!kJ-9p=7Quj5TBsxwZm#^!i)v@YBM z=K-|)4FmM^@T6cxk#KcXW2eDhh5jwF&aOViX024T8U`DEKd- z%+dP%2%NVgzYGuzZ~)6f_+_Pm5NWWyw7eug6bu1_AW#q(27rL!GB7w8!vD_@q;T`b zIKd5(sDF4-c8Y>7c)TYZ1oHLu1^P+>ao)}#h`hW!2n+>5p#Ta5z~?>|Z|4WV`Uw4@ zfOPb6@OJgYyW+6?zbV?;;|O>~L5igRx`Kx%8vSp=Sf76sMNt{Z&(0GB0fIpu9>4GP zH?$Al(D8r8_>a&&#`irPL57Y#ID)qW#U4&Ve~>A<`|pf?15%`c-|}{)7{$&ViE|)$ zIAZZyNJT-)7a+zJ1D8>QK_N&fbqE52REI(!^3n)7c`ytKkwVI&5OV5&X#6K!FiK8U zR#pxvD=#Gtfv7{})nL*nd1=ZXCM$)Im-~aOh4sPPVI3U*@O7o|{RbEEUvc3GZ$~>k z&f6G=bN}N3`Yt#;&c_Ak$&WCS0YdoAT(KCOug`Du{Oh(zM{n1Aju@0T&V&DN{lZ=U z1Amw_R7wqj07Imu)PLVwRTeBGFAbB1s7XP=sz@ope{eDXADw|H!hn7|$NzDbKSvY~ z{Js3Q>r*!W4jxA=C1SiOp>e54IFE|zg1Z({)!6UDm$cqna~Ah{wk}gkDW=}vrG4{; z`+0hmbxf`{Y1FNdWJf}SE~tO|$!r;M=|(9sA^|;NAgCT&r6p@2Y+$U-$uT~*1f2QA z7#02Ug{YKb`#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uEJ?t2BK zZW8pY(jKGwRMQT=5#%d(&UX~*%k7tSO|i88uuPy{f~A>Oh4AiiBkUVkXdeb zX1ro+bWV;EHGQqryN7EHXNjv%?{1YmboGVbBdiO^i*}voa^KAAH-Y%>+Fgh7CO8Sm zp@gxwgb7mmft${!Eav+Sw*TK@F~78UB@MGdSq>mHs96t zlaBA6p-;F^w@(n3AQg(}RK+V1Nm9@OYq+vf>S=@+GbuhWjm!;h?KpvqP?$71_qnaN zTOU4X=~C$C+g;Yv@AYjhtaC&7fTc{d*Rp5GjY_CNJ%@Fdo%djmaS-8a*j#io^SFD9 zv7oU4cg*Na?yH2?qAM`Wj@A-m;$V-3ghtR(UJTOhHmz`&WFmM&VId`IlQ~cg`ca}j hGs@Zb>1)&u0YKqEQ@3dcbbb5kg*LTCl_ET1{twwbN}m7# literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_toolbar_button_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_toolbar_button_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..69130d285cca600d42bcb3af6dcd158923847b38 GIT binary patch literal 3711 zcmbVPc|4SB8y?w(3fZe^vK3~`V3@&RHainiQ8H!*W0@H<6EjLHMNVWbOJqqz$(ABp z$-Y%uWX~W}s89;uIH%6{{c(QhkMI4x@AE#(eO>o;-_QO0@kA3Gt)wKBB>(_`l#Mmk zng4g$_{2o`?Rc39zXd3wdKpG3lF$4X{i{$q=rXe8UpC;@8Gtgh6 z4ml8j7&?;zGz9DGlJuZZARG>c8W_UiP#qvl4+?|m@n5(u)BtG+N5YJNza9|Z8m#H8{!g&2sXla2>bXlxs-8Hm3E zCR52sEY46*AB)D|3^B$y7!-;yGQ=PdXgJ2e5@)0jhyUjIC#;^KF&wRjF~H#U@lYrZ zW{H5|F<2}Dre|q@FvRNp#@f(WY$AFsUIFGM-5f0{)p_B=sNsZzx6MEus2Q41ObS zGy-9X#uz}c8^RG#W6&=w`Txl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mcxIvp6mX4cA(h$ zg0mvr)+l@RWZ`(V)$Mkz-4k8Nidr`*ExY~na&EvR0tCOv-heRB(>IS#O&$5?+Haq= zL2zW#C{|pB2tH3cHh&qlVe$9(x3aXftmy0%_t_iIq}3)wUz2Zv?@90CbscQ8F9N=+ n=-#pDttwoPnS_NmPavSW^Z^V;2jWnF5djqiP5ByGi;({Tj0g1{ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_toolbar_button_ef_press.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_toolbar_button_ef_press.#.png new file mode 100644 index 0000000000000000000000000000000000000000..9a994d3b59fa7f906c1b690adb1eae55ebe61c2e GIT binary patch literal 6965 zcmV-58_MK~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~taR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~Nu5A8;_>(w z03K_aw(-T+3bUGfdwb6g4-Y$)^K;k3#a=z6>^sTb$P>sJl+JF+6L?aWNMERdUS(9{ zAx+XG$`fx*lyCi)mGk%X^vvJBeftW5w0Y(H3@jIbT}O`|edX4zTf4FPfC$S$WK;zl zrWPQU_=q+9fQSMyB|~kNSus;tgK`m;qPB8C#Noq-rv?WHzXUK%TjkH@w>@vHjdB)3 zufP8K$-%+FJ+rg3{KyemNW_mE(G<}Hp6|#JD5Ay7Z#5Pv2m#pB+}vDy`0(L}7cN}5 z4j?H{JbPh4F~Dj7gbyA(c=pbnJI%CUUhfc_wE$Z6h&2FP^AMX@EH?H1_upRukltM8?kUi!b$(a}gMmGW%H(QUzCaH*@SYwE_08?t^dCpRrOG*Yq2 z8z*Il0lxX>o84n$W5Jo3nfh!tTa(Y{^+KWWREGiTx-P1#s|$X=f4-@yDcjZ6mHh0p z&&m!1#3p71iWj)Uv?<3+;sxcEimlj+dtMV=!9{r?*M9~8uYbs={)?V100000NkvXX Hu0mjfJt_jT literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_toolbar_button_press.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_toolbar_button_press.#.png new file mode 100644 index 0000000000000000000000000000000000000000..c0537e9287e418ff7ada1f7e0884ea7df2a5fa02 GIT binary patch literal 6351 zcmbVRXH-+|vJOa*5=20dCZUSd1VRZIS`t9I^o~G6hhRcSng|F=mtI8ay^DY#ij>en zdPfiiK}34L_?_=N_x?ER{J8I0d%tDRGxN;6GrO!EsiUO=q-3E4006*ysz}|-UhU6u zmF)7&HuUk~WykD+GWO8J+Ie_e<1he4G}Zem`p}FMcKzDs)E)}?9Jgh-Jt}bqP86P;;UwUOO$A6YZxj=u3csRqk z{zb}IQwM~=;xHfy5wNf=SP}w~go;3*U>Fo81QG*7z@iW_QLvOS1S}&VB?E?l{%%~C z)^KP$8C|6E-?lDia4rWA4|f?+QEzW=5pQu3EY4mO0)xRs!D6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CZuZw?WN~f$de!dQ z_U{r}+%j|Dd#A5*!lr5Wak6RZZZ@HNs62H^^b|#(d8*6+F4D1ASOpwN6{a-j;-vcS zBChfzMuz-+QlTDjB6RuDJ0K1h6BE0mJ|Td+Qm*Y{b7g4^=nNqLHQMiDdVp~>@NJZ* z8fX52E3d9_bKz!k#$s(kUoqAh(X2*q#41l2*~Bl-JlY(KNWiDOK`BX{$WpJE>|4A# zKR-Y6cYVgQm7B~SoNg;GqQgZ_4}IevIw?rthaFC z0a%4d=q7bVl_MiZm$F$my|J0u4{HVZ=>fyS@nCZ!`F!qllWUx|=tJ3FPGn|3F7#}Y zFLR60tU-c@=W7gGzQ5aCr+eQ<5V4D8*6g0G?;5+C{L;y)mqmffJ7$o^Z)yqkrfeH= zp@+RJ`1xc6|9t>h~j%GI#+Qx7^^nW??bq-v8o7m|YWSL(= zo$t7DuV;$Nh0Wo8*Jk(qk9V*8mC-i%y7iv^OpJAIEBBpceLP<*aZQfa@RqaT+65ID Z@bRu~y^^&y_|Gqfdnherh0=q^{{za*k~07R literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/black/00_toolbar_button_press_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/black/00_toolbar_button_press_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..d3340591479474fc5cf4346f5232b513363e49a7 GIT binary patch literal 5018 zcmbVQc|4SB-=DH1`;oF_nIVMc@*%rMBlWf!t%ne0RdA$wUO zvP70FN5V*vW8ZnF^PHad{p0yOf4ukSzOVaQe&6qJz3$KTxg!k?e&=8nWCZ{K9J)G4 zBl;Wt^I>78w{un3=`BEjtZha{6Ya?qtUDf{fg{@Dfx0f(`*^ z4vsoL?s&A10mjb9$xayuQd0%0cp>NnE_gB)=;h)}AR)YNfd1x1(EC59p&;PjB4no< zpnn-yaA%GKyZ#Y1X3FglS681X~VUYv}I*vlojDx%F3DwTJjp&igF4Hzc~IARttrc z(NIuU)I!OjWMs5uH8eF~TG}X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;9dx=qAT XwVi$MI*Nr5%(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 0 HcmV?d00001 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 new file mode 100755 index 0000000000000000000000000000000000000000..3f240194cfd9bf94e5b22c300863f24213f6c2b0 GIT binary patch literal 1481 zcmeAS@N?(olHy`uVBq!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/copy&paste_Handler_center.png new file mode 100644 index 0000000000000000000000000000000000000000..127cbda0e77590604f974ec2db14bfa732dbf829 GIT binary patch literal 4631 zcmaJ@Wml996TT5-X^@myq)R%bVV6d_7D2j^1}T9>I;0y3MS2NImyqrfkX%BgK|okK zU!Fhkewew=e3+SQ=FFU#7;Q~uLOdEg000P8RTOj|Q1U?xaj+k>ht`4E1K_%=7<&N# zKG}bQ0pxsq3IKRoj!>w!wu76uo0o%|JA*0|%HZzlX6N|E76AMf^YrZX^>!$w&sR<$ z>e28tbvIoK90pxT9GpCvjf)YNL@k=}(*lJ~*AqoWEZV`sXv~BJcszv;H$g1kJZPQq zb3#~AbnNi;@4zDG*|zh|vAf1OnJol5uYLm5i9?W~BBUb%Cn$%|Klv3l(A)oeomVat zkHsAz!Kt@l^txrn04{>1q@FW%g1!S7e$)6kK&M7-CqG@(J@GCi+Y|#Hj?w9z{6ZZE zP7cTgBtS|4IVB8uUKX1kP>2Osj96Q(0opu(1$)TmGyu=L$PUB+Owt%BFbb0a1~S`d z1;9ZPKuj3MDgrQmfZR^KR~(q<0r*vo>{Ni-W}tJN1iuczAprPwq9Zr~tU$nGkeS&J z2+sz{m5z<1j-FSOY;iqwD!Wb!$s(>8YJ$V#0Wvb;rRNw|rFu>-YWc`AM~=7KKbu-G zRG9b|dK3T(lPMmmMc?|36IG9oizYM?ne*&+VBa%YS*_h|OjNqd0l;tX;K@5~zIqzC zBsSdT?lbEFmV+67q0f1oT^+GpBT%@rXoPnEuQ!UHl8_4v8|&-yYP}E>%VDFSJNs_) zPNUm5m%&mu=cm8E|6vIgd>yKcb@8iv^yFnR-9!p*xYg2TqVi2M{{0PjnyFXS3JK#P zU(+G=NKnX$M++7+#XwRx`&g&$ZT_rsUt`LwiU74vG8lo$JY}z~G0)W5NnqZcf6f8m zxYe!eCkGBD+#&4ugzx>K?5%PkD*(4sP4NH#GX)l2{o#7q0UQ8OC=BJQm8U)Fddl62 zP1p5!sSE$cLNpx0(%TIof#BJ|={z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qxPBO%IQTqO9yr7Ug3oTpjd+W#_$|~}qS=riW;?Ewlr`PQDKLPRz%;Lp z`!Q6hrVMg-;&8gy$k<);>z{TFJCSCeP46%i$3xD zvyKVmk=s~xhu;MSK>Wx8AT80xKf}0Shx-CI(Ow7OkbmZwK>de4cu!af%fsabR24N9 Jsv#Ed{|AErw*&wH literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/copy&paste_Handler_center_reverse.png b/res/common/usr/share/osp/bitmaps/720x1280/copy&paste_Handler_center_reverse.png new file mode 100644 index 0000000000000000000000000000000000000000..909efca345a54b7f13fd49581c541ff0e48bae09 GIT binary patch literal 4626 zcma)8_dnH-|9#22wv4QZ%&eQ8&As-uT`rOAYjllLLiQfnn`>sTP*=FN%n-6yb_j2) ztBm{g`47H7oag!J{BX|m@fX8K9y;5RA^^GXV;T0GkneyA8ll1hC-`+MWV}(HGhN1b}547b8JoGQdgi z7_A04%L6szX0hsk`D1{=3DzeI%!vSxwGmEQz{h5wYmAnn5dcvFkBy=u9sxxDfXyH` z_gf%58(`2lK`0yx)zR(<-X@jZsL;YAs~%zr67eEMAVfI?#~)ghAKKY%+-!|kd#V7yns?yDjWD>0 zHCUb`7SlBOYe`TkcHbVZ6|78HB;cP*ry)$Y1_4! z3o>jN(Rn4P<;0(gmp+Vvq&)h{JBfE#UlqP2R9ck+KDsIq_$P~0JhLbK1LLPP_wHK9 z0l-O{NB0i_5Mi)$*xI-c{z&;+vyc}EcG6Dq0sw0@9#Qyklkxxv0MrUY1V5^>opmz{ zcahxhCSK~MxU!KBhw$|EKxiT44#D?d+B~WWg$P8Beq91ku}aEkqO8#hP;`fS9r)F1Wh2i0I;YIESJcj2^<0rL@G1 zW8s{pTI?r^FYm}kS!uK;%MSwLp;wVuO|i6)MkB=^l%Jt36*8>h8pRaf9lXVI67Ln} zet-FiRWV+=Xy<#iGtEMx5_I5k*Dq#LiM|()Mf-ap4Nrv0Qtd|?9@bD+_p^R9t08QQ zIkz8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j!Zgt1md6-SNKQ#)u%-keX z1%ky|vFgPwcV|Afe2NNzADW@WXcKbMEOjA|835S;lvu}&FR@syH?5}5j<&D<9stLb VAhjUa-bDZa002ovPDHLkV1h3Rt5g60 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/copy&paste_Handler_left_01.png b/res/common/usr/share/osp/bitmaps/720x1280/copy&paste_Handler_left_01.png new file mode 100644 index 0000000000000000000000000000000000000000..6ee3b804e82b596ed60ec13b2a5028dd0c21cc63 GIT binary patch literal 3943 zcmV-t518KLZ*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#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N(6};#$gjH2qB06jv!{OXOcxVg2Ws%KY}#B)MuAgtxXx8mN65OqaHzG zigDP)rp%oDz3ts^7g^>a$n=zQ`eH$txd&fuRZU}yv;ECAV*!IY9uXw!7>7+>WolP5oJ5~M}2%;F;r(na#jgMV_Hnc$90*hs0h)R2HmRcn2hH) z0FL1pj^P-N;TVqL7>?l>j^P-N;TVqL7>?l>j^P{UcdUEe{EpUUIbUWR!!aDgG0Mjf zLO@7j0ti9m+L-{r%L2Y26%tdU76{~kF9^UZ0Qhn0^7lTyCNVL34T1Oa4?X}t2>?Dl zbLzy1#VCL#SO-x7uowlL`S^no0H=jPPvE<=pPlTV{`K6L#i&Xc&|eT0{1?BvcJ}lB zlZ>(RkxM__)A{T#*B0F;Gf@0APQbEi&>eDTRg{Qw3SV;BB`iIl@8ZU*2a zglsgK(-il)uy^u$m@#%9z`&p<@a@A^&F$a*8~{(ZqxbOqP>TQn002ovPDHLkV1m9l BW{>~? literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/copy&paste_Handler_left_reverse.png b/res/common/usr/share/osp/bitmaps/720x1280/copy&paste_Handler_left_reverse.png new file mode 100644 index 0000000000000000000000000000000000000000..eac56f1f74b651abb745190a090b6d6cb5401daf GIT binary patch literal 4039 zcmV;&4><6NP)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_CMttHv6z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copy&paste_Handler_right.png new file mode 100644 index 0000000000000000000000000000000000000000..2822d3d33a84913e152dc4ce5c71e55cd08313b2 GIT binary patch literal 4133 zcmV+=5ZdpFP)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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~sfvAd@4sDqm2)!?dR&NLV&GW%n00000NkvXXu0mjf<)6c> literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/copy&paste_Magnifier.#.png b/res/common/usr/share/osp/bitmaps/720x1280/copy&paste_Magnifier.#.png new file mode 100644 index 0000000000000000000000000000000000000000..92158c61e2dae6b14ed3cab8f355d15da7359c5f GIT binary patch literal 6626 zcmV<886D<{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;x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Ll+_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} z00090Nklsu(-nnyrmo4^@*_m%o=KSW& z>?)1Mg%s*OTh}E;8p@y01IG|02aU{H4#b+V2NM>Eb5`E zRm+bb#jIEM5@;+Js zbe2ljFmNB(Tk^@^32+Rkr=22{Qr3Vgz++%{Bs1SOvTSwnYMW8rTUm+K)J{MKpke!0QO$z5ovV1J{!e zo(FaTS7~k2mrYB+6=0u@JpBqhGnw04*`0_%X4fdTyud<8xNPk}oo-z3ZNu5uo# z0W-j;>O@DNv>P(fa7!?vPr62Jmj0E^NZ4Xp&QM6duB319&%fJJudS?rPTG52rBmV55c0OXoxPwa>5V*mgE M07*qoM6N<$f(zM%pa1{> literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/copy&paste_icon_search.png b/res/common/usr/share/osp/bitmaps/720x1280/copy&paste_icon_search.png new file mode 100644 index 0000000000000000000000000000000000000000..1eab182aad076eb9482da83da86167516c48791a GIT binary patch literal 3393 zcmV-H4ZiY;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`kF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7ng!11Ds{sqfTo%awxhy6BPit5 z@q>M4P=DA0fI3le XXmcISMY30b00000NkvXXu0mjf+y7ia literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_badge_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_badge_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..b97c41727d7fa1940e5499fcc87d6aaf38a24baf GIT binary patch literal 2328 zcmbVOc~}$I7LOGu2(pL*F2EQpV1+D0h)Ez~R%HoGSY?xt3?xW0F*AY4s~aE)B4Pza z)FPWjl(?YstOY)`qI@C+5fv4w2rd-_HG*hs-$cc}KYab;-EU^@y=Ttvcb0q3e3KU( zxMJpvc{6Z0+)Uq2o^tZ7Q_N>kEa=@m!C@%^Pg_F>9kqW}GByb`G_{v4ekPs3{ z)~#)Wym7ecNwTmgG)fS_5W{kUNUuZC$dwoxhx7K)C`IBm5DFwh$ub2KKYFeO56C1; ze59vrl+S9(me>UDw#;8)9HE+5Ol{h+>vz(RHSiNAWl;Z zTnG`XWJ**9D*!#CC=phpOg!f4#}MR7f#5T-0{N6EEM-KENJ%6UNJP0@AJ+$M1QkMm zyYWSBBy61$A_^e{R;$F=c_cYafwA2Evmw1A<_#lACBqIyl*)z0YB{7peYs3L_J$yl zNf;CkZ7Bt$a>z6;g$I(!bQ+b$C(%hf4u{M0;M1l!zJ%q|_#Qkujm=$3#s&|h(J%=} zr}D@wPd3GaGllh4AgD+ohNkSwFuR|ytbfEZI4Vel!m2PBPMxZNU@45kh!j==oKPy@ z8Yxpq;B;iM{&+q{%Y{_3G)Tf%!E)e3ei^ba*ymFDOX)O<2T1;3aeu^0{-2x?F=vSS z;`py(nG#_Ys9%0AeQfi&c_0PWF)FMzivP5l#NiBA`f^!enmfZWeL?uh*~xbHc6Ni} zOLyF(IPz;J^UqYsy1#y!`!vh>-EU%X|9JVB&saZ6@HX*!wZ-eU>bISxwQG-<9B!>q zWc3Xvg>Z|A_D@EK9jL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kjZkZF^Waqa~0iUeEvTI2u%U&Sh-hwk1Qm|AkeA({kS0min)@AzMw$xNT(9^PI zd#>w=n&C$aYcgj;EFF%!(XdOi>pQt|^SJRZ{KbCk^kar4{`OJxy|Oob-IgwEoN#hx zu!npt*MFNo@K&eO?J6lL@n_0A+S_$nt#(6QU5ddkwQ&qfU2)!}+mE&AKPPIW;wbTam#EfPF;6yDWN4sW=7{-9UhDs46^+h zzwtZ=?63*ARrWYKaLg!VzIBx#l+lp3!)HmrDbPKRe8SAyOT_klzkhvXqQFHXev%)% zwSGUP_|3UzHetP)CDyrU_*H=snhuO_^dGyk8uwELN|gRNUXGiND|A~hnfqHuyZ&Fr Mmlw#@vJ*1@110FWy#N3J literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_button_01_dim_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_button_01_dim_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..af92a57fa08b8bc741e0cdbbf2d29df2efef7756 GIT binary patch literal 1374 zcmeAS@N?(olHy`uVBq!ia0vp^vOuiH!3HEP^d=+%DajJoh?3y^w370~qErUQl>DSr z1<%~X^wgl##FWaylc_cg49sbnArU1JzCKpT`MG+DAT@dwxdlMo3=B5*6$OdO*{LN8 zNvY|XdA3ULckfqH$V{%1*XSQL?vFu&J;D8jzb> zlBiITo0C^;Rbi_HHrEQs1_|pcDS(xfWZNo192Makpx~Tel&WB=XRMoSU}&gdW~OIo zVrph)sH0$HU}&Uo07PcGh9*{~W>!Y#3Q(W~w5=#5%__*n4QdyVXRDM^Qc_^0uU}qX zu2*iXmtT~wZ)j<02{OaTNEfI=x41H|B(Xv_uUHvof=g;~a#3bMNoIbY0?5R~r2Ntn zTP2`NAzsKW@b!fooL3ADC}5E3S0onb8|oS8=jMX^1y)^L5|oN?23FO@A(aKG`a!A1 z`K3k4!1zd0hG_? z$S+WE4mMNJ2+zz*$uBR~1Vs)nQm^qmnSh^Uy7#mqw8Y)5crjQe6`as9%gAxZ)Vu1+(Qy_>5Px?R(JoBXH0dq_d zFl$V0O?75qVC?gBaSW-r^=5{zUyFl4>q@~3GtXEYo4+HV{LbOk8=nivG^KpY+rgIO z6C=^$(UTzZI?+^dvECbp$!BhyTx|a3_pV?1SABgiM_9FXT$r%s)@!Fy?h51VrlkC@ zNhhybW}i4$vq7%X>Qw&W(_dXzwbl(xk7f`uB3U(UTX0;N4J#)92EcepyYx^*Bpz!=gACH zAMpFJA8q1lI`H&Yf==iDyG~CxO9*pR&P(TBuGqLPVm;fo7lN;M?)N`=<)MKw&ys(g zE^P<4)bdPvx%qm=lHcabe>30xd)4~ow3#Y~zwaCEHeasQDD}B-p~PEuMP={e_A}-6 z6BajxOkCx&R?hH}>-Gr~nm*Yw@3lzTyWyT2gVm%zSO2ztIpB1vUNw+EGUj6}_j2ib zK2G}+=Wcu#x%11Ki+7|N=5h!)|5ll^ezpn!`d^ZJcTQ!g?0DOf{mA-tU#L%+@b)eD mdD<*wo?JY1Wj1pymjOdf@4}S_)H+%~C7!3NpUXO@geCx#Lh=Cs literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_button_01_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_button_01_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..c42c6f316fcc01135ccd7164de04652197b154ab GIT binary patch literal 1395 zcmbVMeM}o=9Ilj11R*ZbkSU9o5+{T9u6NfS?LpVHcP&&X!_q*v_;p-g;8w0z?~b)} z!I0^;8UieA5nVRsU>p00y0L(B8)IPNwg~Dnl&Ong+#=IWClcd~s8^uqA7p=cxx4q{ zp6B^}yuaVQUS3v|p89yIN~KD771JJNT&+B7QdTH$6TFjAhE=k|CsznHa+nc;%H|iU z0p#MDTHpbUzwzbEpire!*Kl5+>~oirtiZ!e90N!Akiu4}3ayb4!v=s1RfAeCXwm$9 zc1Qzpev78c=+?VK6sY5hqavt?mU-D|fHnIy)^$)}gj580ATv;euMbLO#G;wkC6#%6 z8__`X5IJDcEI8$JmqU~w0>}vCI#!RO5JAAG!AKCO7Q*x>hUk@>(4hv>NRU`Qw0LP0 zYofn~^w7>lTgu9!sgvapi6G%{7!KpGAl4$N*=&w$V3d^Hxvgd-jM4>PB|2&o)*{!9t33Vb9l_X`IF}lNr@4a{d1&XNckq5-*Pb z6iZ@DslfPjsq~e_QuBbI(lMga8V4_)JE2lN(Bq%gIb|sJDBkap1wsKta(@v1_|}PLOitUfh&gxkM;ZOD I{iUt{07gspaR2}S literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_button_01_press_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_button_01_press_ef.#.png new file mode 100755 index 0000000000000000000000000000000000000000..bd97759ad4aeeada64a2dcba7b825bbed64da987 GIT binary patch literal 3009 zcmV;y3qJITP)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^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@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} z0002&Nkl1l(e+DVAhg{F8qKYc2sG^E0s^~i^HEkgL*6GkQIw(<_+B(40GdcmE{*9XJCAU|;0f!$!qs;(yEeX;DiVW8^siai%vth9-Ni00000NkvXXu0mjf D>g$*+ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_button_expand_closed_ef.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_button_expand_closed_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..5d3969cdcb5ad8080dfbb65d8a40b874da088502 GIT binary patch literal 1740 zcmbVNdrT8|9IvP#Fs!I-JRCbuRFt*7JKEB#Eee#b1q%eoAb^IWy~0V`tLpqXDoHIHv&*o}T0M8dQ6##Q$QM?PUyto)253cK&ZrE z0#5-c^kH}gA^ij7n6*0AZv72YBp2mJ)(tfX`>cTpphfe+(cHjBp_O<+EU}kjEDyLBQ+-(%K9v zwJ=s9oz+F}#9#(R>4hAQ$z)=i0@2_lypAStLDIT?B1=&E=XG=j5ZK-QZS8#R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1cjFX;}?gqX3=D! zDw%xT7PAs_bTn;7`Fxwr#Ie?5e=n9LTITXw&Bh@(sZlV=3F^BoW)95uQ7$J~D0z@Ey zMPMupK@qW{2uZkH0!du*8Xx2eSAg2|l(fh3R=5yc1vu#>AW zQ8Z>!<4(JJhutwQ_@7){b5F$r}Le4l>^M7*2XPn_X zisN6!;@n~?&@p{q`pn{e^WY|?V=PQ-%t}77h{c-NrjSXJ?VbH)jfQEMe=}9Fe|mg1 z)Z?cLty?YYte(7(jyr$w==I>e8a<_z-syK{KT&lBp4u(lGkejEJ)3)` z2Jdtap0{KFne5)dwqxcwwvIdV303a8p>OI33%7PhE^vKU{d2v48zo|K-#zWOJcinM|H<0g z+i{?OzU%DDqV)JGg}t!hP_gij<%Rum+lr8%PgvPrWrtQQD0$qG^OkEYUB+I$BPyWw z`*fG$`OtyDTlZt0O|myX9rFAgUKDqr{qD`|*Yk}Xl3&1u!H-LzmSmfUxz;*Qp6+jIqyGg~e_bv@m?A?;xD*(qJ(sfM1nTelt=O7$9qn zivF^1X-$0Hk#Yv$cOj;(uVUvN>)GuizRxBWi;55Q`wTXpY>fVBuMc9`ckTgBc`Pj^ z3Io_h1+U66uZ}aq*D1%GWi(n%uQr4Zm$F<~RT*Es8HrSk{xlS^iL#?H8AX2sn^uQ% literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_button_left_ef.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_button_left_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..7313577ec01e80d7320bcf839017c9977f109854 GIT binary patch literal 1562 zcmbVMeNfYO81DF(f}-Mvr>MIaCgNtBkEVg-s9f5#0@{M5O6PD|+CVc%Q<7){>gG*3 zsb#x~8#0U2DHYrwQ@7K3#~dK;)NSe=p5x}`_&U#Ra^l2IopZMosoNi(e=L{e_mTH` zp7(u!@0&oObxBfUYNAS|O3KTnZOW*QJQJT)-el_FZe^GynH*9PUncpT0;8hbd?^Fu zan5qa#yH*8Rp*#&l`6K3wL2t-Wf|$>IgK-7qmenEf>x=rb7Y^>Rl!I=DO1jR_25W* z2MDlkJy@)>z!sm8@vyly0#j6DwYzF6T!b6USqx;$q(Zas}YRU;Ut;~j9;Ll zCb-K;8*LufQdWAB7OTCIQ&xM$v?v43h%SNk zNi6RLB8<*bex0NT6;B_9!1*ke$HZQ7JW)!@Ald1I5Dg4*TqLeBYf-W>|GM!+Ytdfq zV;~zN^6Lbbavo)AQLvJ`rwc_46>rD_fmII0SxNJ*bsXcB@@PG%e9^dBHwkBH&4?D) zYEc3q!B6or^z0~W>R zc}2EqH@7LS{U@hTl7D6P@xp_T58$)4*RtDhlj%l!MeudU`azpeP`H)b$`@6}p85x5tG_kKSF4R|o}>lN}} z^P8=$-Rs*=?g{PC6rGq5ns<56jvl+(L*G-?UwW@>=O5J8svqb6e7U6~|GAZFZtIa! z7Mtoo4UQdH%1;OCQxb<}7T}@PRa_qML znC$D9Qj^!WU#*xC49{ra(!YI004V-*?(i1zR?Om2HkFXCynbx@z`RxGk5&k8%;@OL z2^7^eh5J#>-iy5{0s6`-wOa?9F1XR&-{ddCXHWKSe&$HRZpYGZYU+QeJl@oMW3@GX zCl|ja+^Lu2f^y4*6A4orE_7QZvfJ4D?iYpWQfXIp}q4MXYEhFU&TAGj?MgZBgH zmX!qG58fPHrT+X*O0V4Te5kqaZrYw^vy~2~d9RngogtoXub%yjV9xFueX}}zI{vlp zp(SlCwnNE1Yv7r~#TzWkTZ@I!eZ`;l6(;a82I)|`=jg}D=XdQrcqeD)-_zHs_K)^; U4ES#hNB-7%CM*4kVeMQ00OxEyKmY&$ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_button_off.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_button_off.png new file mode 100644 index 0000000000000000000000000000000000000000..7a0c33f1f188fb6adf9fb51ce9af3fef6da87862 GIT binary patch literal 6416 zcmV+r8SmzaP)KLZ*U+IBfRsybQWXdwQbLP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DgXcg literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_button_on.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_button_on.png new file mode 100644 index 0000000000000000000000000000000000000000..2cfd4ab9f370b8df101a45b16da0c45c6537b448 GIT binary patch literal 6625 zcmV<786M_|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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@XtuYk)!Ro75T z!VcKSG($i3>wPb|i-M!<9%tk6mcvrWD(w@3uA9h>e~ihG-&xl5;;G(r;$ZUpJIIZl zgRYxZT|)|)TfJuO5dxj5_Hs4h*#GK_ms;A|4so4ds8)Lb3c7A!?0;WFV(N z6hf?8wdxg3+PN)z94ULU&L}T$c4;_5_>_W#a>K+*Pqvw9ooy}yP zyD&KLH=OgvT5~!WV-QlHkk5k$;)s9aF+|pFg=X5``Hv-l!YyPmb?GFofBZH?dJ?8( zfiqrxc#BeSg@9?A$NDyH{>MWH54?Lb>WLeZcMk^u{OHF&d1xk?eCG1drN81_3oJCq zr8I3uAfL;@5emW9UIg1W!5>`%U$`CI@$)=35c==+-K9CCu~>6rG4FjxN5^Ba z=92&leVaGWT^t1b%7C1{abxoOrf=MTcKGt;AJ0rD_cG3H=8d_&N99S$Ra{pn(=QAZIy^M=XZd_?JLj6_LGsl>A*F;60vhK7 ztJZYB6^X{)2GAdi#wQnTJxc}0O&$N>@bQOt?)s#6t0BVt&T? z7e-opT1uCYQb0=S8oJ)!+SYm`8jBwT&>xM)FV##-^`@`8T`e@XwB7da-QWIB5WxMy zb+?a?kM*QyXSX6E$1!E_Xhy| zhYr3yw%GTWoEZD+;P@Pp$2fp406j{nzU1^&b1F5nwpb`M3n3y>iYBF00D!I(bPt7j z&hILa!w4BhJjpqqGEC!oAQ&8Oio`}a=NADC0=RVe-2?eM4db%H(bC$s;P34E_G5(7 zBmV6Gq5vAom#>`KJUHgdEnhhRvj9>6rT~lsm^^&&z>;iSO^h!i9G?FF${WYy$%Dg_ f2ZyI6)c*|tj8}ID^FXtq00000NkvXXu0mjfi@I@u literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_button_on_dim.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_button_on_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..7896bd4c9c94e7749afe298e5e3d089ae8705c4c GIT binary patch literal 6525 zcmV-@8G`1CP)KLZ*U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/common/usr/share/osp/bitmaps/720x1280/default/00_button_on_handler_dim.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_button_on_handler_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..cdad1468722ad6d34c5f90fc4f863b2f70414a2b GIT binary patch literal 6154 zcmV+l81?6gP)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^>J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En{VD@AnO z526jP-8KV6Y?&Ox!c1|~-$-LQyw)yh6ld-{e2DA#&OeA-x`;=&xq9&S=nhSfAU=Zl cd((b50POY_!(f2v3jhEB07*qoM6N<$g31qfcmMzZ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_button_on_off_bg.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_button_on_off_bg.png new file mode 100644 index 0000000000000000000000000000000000000000..8e522203310b2cb6c746e6ea0b1b97527e0aab50 GIT binary patch literal 6313 zcmV;a7*^+rP)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#bBI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>1NDAX*wy4!;1xwl1-mNm{jNXhWp>u>I-jPC#LQ{QfaDn9qsa-a}G z5DtgEa5(G*-M?V#1F#>!zjy84b3zp5IqV1bM>PHgTsJU*dOO0(Tvi2DLTG~qr3FB1 z(5JU#!%$c2oq<|9a7?!?$nM4M%8gCv9Lc*Sxs^E7J?<+2go1vb)uy5DXFmquu6tS% fOq>NaoBeM9((X_$NP_O{00000NkvXXu0mjfP|eUl literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_button_on_off_bg_dim.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_button_on_off_bg_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..0f7bdba489ab0ef515302045bce908da77fd199c GIT binary patch literal 6252 zcmV-y7?bCTP)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_3Rg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j+ide6pDOj714VJUOZsm}*pig6Q=CIU$kUrf`q zgS>)!4S1=3i~vld+3Zr1L>oe+YEMta`5=oqRxL@AU_2T=r!qJ*h4UJ-7s@QA0LH`N z@b5{I7>P@|BlWmjQP0!UHOn$YQ8elGx_?^&p3HS#DCQ>s2EA_QFSBVh6sagmQ}a@h zJaD$YSVGIoS4o^;G#dU*O4(D%%c+sRMj3ppzz>P2Hyrl=oFwUiXWnF6k5Ob9qG&ej zblOh?=#?_J(hPFQ@c2{Y#r;lar~OQ|8a`@qw&u8Q?nyb%BOaq=?fhda7t*wpU z0N4i5QIm^T{{tkf6c6h{*=?*Lo|aK&I<&-HzQ zhY|73jGVp$z)IqnU%7ly96NsU6GXv^>$!8_rtFeGztQcenTOMClT>Lbks*m=>i2rj zcRKAq0=THaZvyBl@?z}Ki)ZhW_RNfRU+4Ka049W>%a`7ajvP7q;aV7;bv+lhW#!r4 zk|@-s2KJq9E_Zt^rleBDaUAcox1Sl0N6!Jcq`+TQj(WJ8le-@Hvh!nx5P*z`#MahE zJe^M7xw?AKd)$g!u^k(n@x^Xw1z4Y9W`(sP%8Al)tGbbo%Y=Xs878CA)%MQz(;`j( zqs;s=fDPs02g{^XtsBef#&6K$_SavkYy6lEE)_3y_ZL$;j0Sd zmIACnca8Y{mUUg16;Sl;09XOAs+4d zYT44@JLj!-?U^SBLR12r;4Xewx0@35bg-3qyGC?a2F{o4DTJ}D76w=?q6GM+ czo`7*04Yw+<4-*($p8QV07*qoM6N<$g4rfiC;$Ke literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_button_on_off_handler_dim.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_button_on_off_handler_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..17ae20afda72406f35334d3dbd3a110022da1c4e GIT binary patch literal 5526 zcmV;H6=~{;P)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>KLZ*U+IBfRsybQWXdwQbLP>6pAq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$YcfRTm7ZQs%=m>LuP}vJ{SK+vD_R$ z>T(fQbXn#WEb#IY&~N=4n_u&zLQ}Z~>KvfT=cEFhRS2m5(9l$qs5Rh~HQ&gutLiQ` zZfy5$$)Xe09zf&c_tWfzz^6CE{ Y04W`T>WG^32mk;807*qoM6N<$f+e$)RsaA1 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_button_radio_Activated.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_button_radio_Activated.png new file mode 100644 index 0000000000000000000000000000000000000000..0bc40f93e87ef9f1ffc3cbe0313f2dcb9f9330cb GIT binary patch literal 1837 zcmeAS@N?(olHy`uVBq!ia0vp^_8`o`1|-Ad1?~eW$r9IylHmNblJdl&R0hYC{G?O` z&)mfH)S%SFl*+=BsWuD@%u1Od5hW46K32*3xq68pHF_1f1wh>l3^w)^1&PVosU-?Y zsp*+{wo31J?^jaDOtDo8H}y5}EpSfF$n>ZxN)4{^3rViZPPR-@vbR&PsjvbXkegbP zs8ErclUHn2VXFi-*9yo63F|81#=KlDb#X~hD#E>34K5C;EJ)Q4 zN-fSWElLJPT$(b-ssbzLqSVBa{GyQj{2W*)24v)y0tH8F8D zGIMc*>2=9ZF3nBND}m`vLFhHbsTY(KatnYqyQCInmZhe+73JqDfW2&$iQ6qkIL(9V zO~LIJW1M>RfsWA!MJ!T8!-RmT2gHOYTObFX@Kf`Esl5o8tS{VMq7Te13q4&NLn>~) zndRFd5-!m2y7c?&nRjoNUd>=Jwd8mt7k0tHgNZTFWqK&T<&nvZt}%)VE+6|@iVUR` zH~rh7;Kf&E$S9h^YRax$B^V+QSa{cVhxFzbe_r^V_xb<5TL0=}PY$82#wFRJJU)ld ztp2s?Rp{PulVGodzqO?H9C!M_;*Sl@*EEb;`{B*iiIU4siW?q#_8^(hVQR|+<t5UB_bh)dF0_s>6XV(+_Ud5M!{cH-({onre(1gbVH?}#W!oIT-_iW=@ys`e^rHVi zTnf+kOHXr|+4}$K_vqONPw@7M=01Mt!n?;|&n*cygXhgompLz6f6;zg^mMiD>}gRm zo9`EXd9|#j`uIk7)%M=$QXj0ccHOcpslURyOl_TYSnAD(xvTe{3HklC`n+z@QbUR6 ze$jY-8?n=z5C6rBSt$Nax@69mvh3>GyS0;itBw`wGa2{&nC-><`p|t*@fj2Umz_Nq zJU^A`pQq`or)mE#-}tcoZs1X^L)mPbZQi!~9H_o@BcWiiRQhB9Rpir`E zx;)R@xgNGQQq^`DHoK)4GH>wM8#+^XhGXMj8Kv#tg4O&gl*Rcxdak7H4-=cQF8@V? z#2xk$r5|5UarXS$dgjinw)6jMY*$R*{`;D6Mw&x0_lo~BUJ7kK&ico`;@aig5?^&^ z%A}R7|5>*@a>lm%Z{{>k-|TmxH>M_}_v%0GEnORSu$r}eOOg3Fdt&%&>75nhpr*B(1KF(e6l1+|f>$4YX*Vd=BtkpTN>R!Wzttw?bj)J>(yXnh* z`R9K-%ILtH{hxL>rOo&&b^d$um)#$$YZ$Zo);zIq{-e0S%@cjAY=!;oT1L`@u4{2CEeD*@Vy(#S0p%-6+o75|CpdTTp?U{HO(x+U% Ux8z9EB~S(C>FVdQ&MBb@01o5nYXATM literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_button_radio_Activated_dim.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_button_radio_Activated_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..9835251757fde57bf27e447208a268fac70d7e11 GIT binary patch literal 3662 zcmZ{nRale@+l61G8|mJZfJo=2VTSG)x{N9##2&{HQRVk80pfK*dM#po{;|1$yJ-!!wM*!T-VZw(7S03fFN z&sad-2YLV?(su)c4Gdhp{Js2Ky}a2p!C*FTUoRK8m(BnXxPmZ-LW~b+`mUcEGq2RU=Yny_&o$9SsG%75)mYoAlAp)wUtZC+=0W`D$Jtzv|CV+qh5H^gDc?#f!0QMuCoPofb zT!32b%uMdrvpR}>zQ0Z7HpwBmq*WuW2n2la&CCQ@c~P2l&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po9h|a)Yb*aIJUW+MP<>hY=C#@TwR&&4v1@aDOhl-*|<@-MFAD-CKsZa^=Q4s13pl z>aQyTGqCpx6_a2ngstv9-Q_d*#+2^jk-GyIqty-ek5`T=mAB(!UHji=oFr=aC+vR> zWcZBUHo>MnJ1ndlw2I$dAc$Lo9#*Ncr9{-@H(*#XawRO&}SKb+1s z+%}6W{C@1+;334xqdeWdUaYUvf9}Isqi<6}&rIiYiZINKl@NRua^rVYF!garwq;JU z0o^6_FF-<>P!Pt%mL`rK?}TbK&v#yBG5{K-DIo)N{!j_&Fqrf z8}AwLUivo@v%2Rtn%c9T0u2koTJfOmcUj1+1jpJToQuG0!%r*3L~&@Ys_=GBsEccw68GKDKYPKZfgQA(R!PaRe2J_L8X})2*tQf4 zXEy_$cKx)pvvtWm4NGs(jFcO8bta$yA|ht2xQOX-y_0=Lgeg)~R92ktq2*O5 zXCF=!cPO^s)j8aF=d&(H71oZhAK8Kk)7-}WHCSxadc;<-B`~q=|B;aYtu!!cF^__; SD*X2#0-CCNDs>?HsQ&@>_weBW literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_button_radio_activated.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_button_radio_activated.png new file mode 100644 index 0000000000000000000000000000000000000000..24e87413f3c122ea478fd18e426dc572501cb8b5 GIT binary patch literal 3215 zcmZXWRag}47KJ|q>F$;;fuWIx89D_98A_T#kP?0=K}Mv+pOj`0L^>oSh8!A60qK%1 zfg>R(b@1{$=VGmOvG&b=_sx!ZXsAU-%uEabAk)!SH@QufzaqrHb#q(F<=Y_g*0%5k zfQ06+a6o1@BLKukPhhZz4_&?dynJ1~yg77WFb?l$UM^3bIs*_ehc-pRO?T*(&X!J~ zdeLF;^t?>y2suokv0=1{d_tT=l)BNJd9!rJ9aI_`cr5+7(YSGOVQ=Y-g-PEK&k(G0 zeuxXtkA5?7u@ao`KGkxzIec9=t-Mu!jIJFez!H+CYD*eRhmn>**{QyV_jU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uxBpCjk|OiB|0ai{wuu1% zLA(Hjg#+;W<~DZ#_(u$YT{{5e(*a=cO0ws3iY2*EEV9xiH$2u)aBz@1rwhw)~1ywuQPJ>h?$3EDiF)iIuDZiO?@mC@{BwhM)Q zr;(-6g<9V&)~(he^Za;r@|6gN#{vIq=g=P2hEM^WMX4%0VNi=jJl~;fyz3d3|KP}I z(K5L0klA6ry?lJyZsW`;yvi>fEUT-CTGYgx8dF*p-aCSr-w=D!uS!a>wE5P^FoyFT+?N?#Q`%xy>i4%!x{qBET(RzFR z=b;rAzQnJ(6l*P0T6q0~g>$X?cVvxF^xk;y%2zfOZZtl%;|(DV xbhozukT>GT-ArybrM2z#qGs`j)tLnCDiWKe*tvj{rvy{ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_button_radio_activated_dim.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_button_radio_activated_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..f37780302600ff78f63763e2167473b6c4f4ea78 GIT binary patch literal 3183 zcmV-#43P7QP)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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*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res/common/usr/share/osp/bitmaps/720x1280/default/00_button_radio_activated_press.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_button_radio_activated_press.png new file mode 100644 index 0000000000000000000000000000000000000000..11fa3b0a80771f88f0661f35b4be147669264c3d GIT binary patch literal 1463 zcmeAS@N?(olHy`uVBq!ia0vp^_8`o`1|-Ad1?~eW$r9IylHmNblJdl&R0hYC{G?O` z&)mfH)S%SFl*+=BsWuD@%xRe+5hW46K32*3xq68pHF_1f1wh>l3^w)^1&PVosU-?Y zsp*+{wo31J?^jaDOtDo8H}y5}EpSfF$n>ZxN)4{^3rViZPPR-@vbR&PsjvbXkegbP zs8ErclUHn2VXFi-*9yo63F|8KW+g=7RhMR$W{Yl!|Z$R@KEJl?AE#L8-<0 zrA5iW_()TRX$FQJev3c~fv&OgFUkZ)N@9*nesXDUYF>$_i>(q+MlU5Z#md;&#mL#& z$<@%s+0E6+(9p@z#L>dh(8bKm+{pqc4l@IrUIRxbb4yD{OBZKLQ$s^nBMW0!3l}$6 zQ!^727b9~M7nokpyyB9?yyR4vy_rCJp?WRw>a}t%N=+=uFAB-e&w-_YfQ&@&a&{jOl>x$Qwt{;Ibf5`h}DYnWR_J%3l$PoQ1-Vwne))bK` z*sCP5<(mA$jiyopOkrAORr{2qJ5-8PtT%YyYn-n6t}Jif-Lv=3PEg=E9I-kodQEHZ zhZc34hn)TuhlJ-LnD?~1Z}XIe>0IAi791(ncG|%+L*$j|^i=_#d5xb=9{Cr%SHk!u ziwa!Q(ZgRpzPA^`!BUzhCaR$+QZ{8^r(0+F1%{t$HiVR-%FZ;^-95jQM&;zQ4T zJzDx>lG2~KuRnx$eVD%PaQuu-SGLu9EqrWZll8%UM=|RU;Ujh59&U+mw$nLQ-E6i; zBWHsXf5GW#hdgIz3L0wPyYks1Y?j1MwZkWFZtRL+T|Y}QjcMD%B`ZJPJMbY~qgP_L zUG0-Ua~qU*6uvNd6z$;mbx+U1h_lz9^&j0T&(N`H%Hn0$rf(`aB%--L`ug_^rX_#k rU*Fos`scSMMi@hb`~8+$ZUcrBh6RhC9e#2URFrzU`njxgN@xNAxT_tj literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_button_radio_bg.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_button_radio_bg.png new file mode 100644 index 0000000000000000000000000000000000000000..fd590c7ecc7c11aaa0d25e8e944e5c67fc19cb2a GIT binary patch literal 6227 zcmV-Z7_8@sP)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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#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lEI}4-b@` zovr_5oYl?Hk|d;4DJ(B90|2I`?qg_Z_|kz74Gm*z>OKHqc{zjB!h){Q(8HZGsOr&= zPiFo}W1Wla483!2FpUnL2FNX&eW3IoJIN>A#O|q29kEgznCFxV6C9DdKh@IOhOR-rCyyQ|iUMadf?~AjvBHO^J#m$vk=Yllzh^-7^FMbSw-& zG#bU|=xDPPtx!O*xQX4}GWPcNP_NgTYHoJB175EOe!m~#aO9K}ZDHXB^7(?PziZUu zF|cB(RQT7_!m~0uAVoWm00uz%X!5h9Y_t8Eh@>V0bOmN897f-@KE&hk3yBc(`5dxq zYx z7=+jBh1cVO-R@|rxz+16?C)1l-Ya8kYs)-B8{1V4JTpmPoC!ryzMFgU_aADts)|dH zpPog4NkTXhvkwf6d?v}#BoRrZgQwP|1-|{n9<<{HOkF#LT=uCZRS{ZeoO*bqyC<4*6Xz&W@rEY zv#KZpZ$Wb2&VHcjvcd3;n}I9-zy#;g7#Mt{cTddT*;)TUKaIgSN`t9HVyRxQ&&|#K zw4{T6tCtPhiGq{)fZ6SKK00>$eTTz2$T)wWGae(5&C)cp#LkF7J0$3(q8_aj3;9eo zn>oNczGm_|yF$wgMs~ZM^$!gDT~3!zlI0%GxOTyaM4gDL^;&(eRLpPZ^RJF@_64I0 zd%F|h&m+N#2rH7%!ua#9n7t9`M(}S^j%nv=7vW-;3fl?iH|`+5>0Q@$zw4scNpTsV tJK_0ujC#{skC)mXX7o$zKX-8aV*qanrZS;TekcF{002ovPDHLkV1kgBf`|YB literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_button_radio_normal1.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_button_radio_normal1.png new file mode 100644 index 0000000000000000000000000000000000000000..cb930a5dd37c5caedbcf19c6bb7bd8513a72104a GIT binary patch literal 4623 zcmV+q67cPbP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;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Nn3zZm3^dMH z+1RrH)Rd!@)%ptMH(!L(ZtJkuUdQI zA3kgV-|gxW&(hM80epRCW~MMYI_g|3+)YuwbROf6FQGPW-Mhg;4tec$O0S$nF2CEn zkPn5x+>N-}^;Ju2etagKPXF%Kty`2zrF-u#4EYeDqtHKs7@dUwY@zaLGtZ{3-}k@5 z;V{8q@D1RL)g|SAS1rXs-^7bXqvw*z|S(%vv@w@gn@69@#}2fl#0%}T4l?bvF0 zE)WP99*^f@DwQIa%e4(!(=@{2FjG@gZv&@Wsh!&uwCd$~pU?N@+1c5&M`wG57lVI#SAgHRAPp@%#Pwe7<*p?*Z?( z(>>a~KfDe+4ZIMEM9xPdku%wBb~u~OlF#QW%Q7|McDorI9K`GO;`90F>+5^hio}=c zfOP7Whh-oNxW~rEPL7R@ov{|&<^gtgcJO#SSaa(b<~HbM>qyc;>GV4uMXTn0t@`HR z;NZN~DS5gqqW6M$54Z>11MUI$fP26_;2v-fxIOaU0RV%3oA9ZG{Wbsq002ovPDHLk FV1ki6);$0K literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_button_radio_normal2.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_button_radio_normal2.png new file mode 100644 index 0000000000000000000000000000000000000000..bab4ba8bd18d24dac57a664a4588e318019bf7b7 GIT binary patch literal 3929 zcmV-f52o;mP)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}k3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10Mpi><_Bu|?p6ex=uND^R}WW{~G8g!!RuUkxHeOH#RoVb^RE7*8O@Oyd+7a z(`hz0H(v+-GJ5yHfmKyq$z(E1TU%RwgPsO26bfjX76Se>T9ox*RaM{L-QE30)3jr3 z58Uq(LXgYl$Y!%|0QW2htE%b-e#+%?bUK}5teGW*V0(L;YPGs-jPI5vd?S@gDb;G# zv{cVR@9gXVtQzCJ`CwI5y}->(CSz(dKC3E~3dLe^0a&&w;p^#i+S_WiEXVdz&gb(0 zH>?7Gw7a`I5Nxk%wHk+qhgUB$OiAZ#&H>=+{{H^Ju)UP`_V&0)=XKtM-z=BQj^0HF ziQeDe2YAbD@LZ$O7&sQ7(P#i%F&nHjn@xtHTCEmR96M?0P7fs@H(6L{eDdIy@a5Q0D;&;^ZDRt54&Uqcr6$V zrrmD$z!DCJ!vH^9vRX2l_4koTWFRSrLLnw6Cm&vFH@=vDjna!;8$HpSdmi@O^Gaqfy=Ea;@g`d8*ZF z-&RwSBoU9ti9{j~fp;%5ckXM#C+d#h?|*M@Zmwk9XP2&EFv$G;JdsG`F7Qr2u>DH- zczg!t6-BwFD9UG=ra23R0-a9hTqp5*y@Wy`{C@u<;49#9UwisK-);rq3*c@dk+_ve zB$g_b%0#77p3vr_;&U*ce`~7r)=n$jHb)Mo+wE%Ft#~r}`970jJOBTlD#S zOB`*uEdU%G9N==fFxJ)@M~^|*j91RovE1aLvuVtE@1J~gY;0`7_)+RuT*Cf?xDB?! nHrNK+U>j_MZLkgQPyIgt?5}s9Qe{&h00000NkvXXu0mjf1^sWi literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_button_radio_press.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_button_radio_press.png new file mode 100644 index 0000000000000000000000000000000000000000..14357c323365889d2ae3553ba30e8755cf0ebcf0 GIT binary patch literal 3620 zcmZvecRbXOAICo;ppw!dVH2X)j|4d5!@4{_q*8hRbN7vF1 z0Lbb8GXap5!vX*x6E`UI!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%)9aF-T$-DjR|3Q!gkfv4~Pj*wm=R%;iu*SQ+p9GS!=ZKt7Kqc^zd|X45_&F z=4K$*Ap;(U3#C8a*ZrB#E?_f3zG{=KYyN}w{Y~yO%vW%3S#T)r_7YEZ-Im%HyWFp* zMW(OWdiGM(ZJiCFC9dbUh?ch>leqL#v9qyuiRz}nX)h;A&&&0D-jW{M!EwG({G{BS z57RW0c_tOCn`q~CXy*m>z#Z{AQ$8&2z3a#$_*|vZ;-XFg?-%PoTo;cX+Im4{hnm!F zxul-f?8TEGs4iIiP%+WsQ*tIpg{R^@*x%+G9Hda$)_hgUDlG`Ie` y{mx0BJ6@k%+P|v3^LE;@x<6}P*gNlMkzio(zi{>ak6Bira>mou&t;ucLK6UohqKxM literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_check_Activated.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_check_Activated.png new file mode 100644 index 0000000000000000000000000000000000000000..135a0bb36b98ec5c894c243af819318ccc1fb9ea GIT binary patch literal 1784 zcmaJ?c~BE~6kenvr$^ONu-Y}Wc#)GFBql;6K~fW>5Ctm&Az4C%JxCT4q$*%_q^Lzv z92H1GQR4w3GGOr_Lo1h60YRl!phHEJVx|Y+1>GQE|B&vy-QTg__r3Rf@9k_xaL_6j zM|Vd609+)2q7Y*Awchr2#4{{vW(P62;o@*S6ph983M~W(RcH(ZN??T=3V{@=WVL2sQxleGQmG84uxL45Zc|0@CxU>m*R45|F}JGMWtY zhvGDWTeMK#07JL}G{6anj%N^%Ms<0_+`3IAfuj&SUO;*q zRJbe{^hdQ2$f9_Yl{7jXWV0!BCX3Ccdw~oZok67$#wOF5JQkbB;DBQniSVXX#qvT# z0b{<1m4Fn7;~0-h)$8>Xy*CBbs;P7?muuBvFvtXgtV>34g@KIdJjNA7kWQ)9V7LZF zK&zr622H{RBqGwcM}V;jSwuIMCL&=}g94+{DKzVm#(^@~|3hJT02xu}$6q8~DPs8uxg1&mohcgUicn<| z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OwSM3-%o;hI)8&@`9;@gb@~8$*J)JW3ud9o;S^q^6 LageBZWpw(#@3-4{ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_check_Activated_dim.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_check_Activated_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..2df05102d02bda1a8138a59ff81e91acdd8d3f8c GIT binary patch literal 3647 zcmV-F4#4q=P)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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#C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activated.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_check_activated.png new file mode 100644 index 0000000000000000000000000000000000000000..c2a6b3c9e8be733e44e7ddde998f4c3cdf2713db GIT binary patch literal 3190 zcmV-+42koJP)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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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}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} z0004@Nklj`zWvkg6{k z?}N7hj$7<`AG~uF@3w|71*v{?m7jOQtIk>88#2BD)Dx>xxvImH?9Ecf+n?T$@dV%n z!1Ik8Ac5EJwU~2$Xu8S=HYF4uoa~xCFWmqMJW8^sz<&m8fCL^b*`wpl!4{t69oqm2 zJZiG1y6t`8*580q2#=cVsqmekCvyP5uHtXPcB+wh#R|Lzz=!8EkHU(70Vp&ks+ej2 z?k+rJwJDA?t)tEWI0d#(w^qEQ|Njfl6BJj9A*Y?tvnJ({raj@^lGZB8uKh?`2&$=; z?AmzWXsVj*bNrYw*8l3sJ_r8qIs7`wyE&45Xl4B4G4aF`PdxF&6Hh$x#1l_E@x&8P c{7Tkk0DnDTF@a}EO#lD@07*qoM6N<$f~0}~KmY&$ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_check_activated_dim.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_check_activated_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..d2c3348dab9e78c6ded0f053a9cb7f6616a66206 GIT binary patch literal 3189 zcmV-*42tuKP)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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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J42VGm=^w$8 zac9WJ=J;Q;%!=?1G;Tk%K7RNxJctsX7&Sf`E^ecC1j4*=5uYR0w)f|+NmvwOS7&&_ zkmpz4FR^SfH;dk9acPx{GRh)3?CTBJZMs{ck8?fJ-k3}f9-C*SiF<3(U7okNR(>0@ zF#A>>M9aSGHl_>mxoMk?>2q^6kE&sr#aN1AvS91W#&lxw?q7ag%D*76_q+d|6LKWD zHhHhM(D0+@=j$sAw#@B7nd~9DXirUfTU)NPw5W)kReI30JNasP<(ggatJJF3&jv2j8pttz6|LvP z&bLF)FPUWYR0D_!*EtmDZ8=p&nrpT@NIHcG~1=4^siT}3l%SPo359ITq~Qr zapv^kpncNY+}?wm&+D3#5+~->g?&Rwe}{HJwl%}_N zyHk3UWdIFlXHNI8A9dfVXEhu}3}-XjYgQ87 z96GDvwsS`L`0YDK#|CQ*_r^yH1`EA^KhvKoY5*tKt)Lc;R1s_KMk-gB$L2I-_GgD$ zY_M2pmF#F1;As7L*z^>$;!3+!z2)8Tah9ZSLpQ*`^WSAIbGX5ansojxgYBT*FLBLpjCR$pTtdrz)RTMM zF`ziqHZ1n_gVoOT14&F-MpILweV5zQV4QtGI4d@u%|`5^L?wB2TPyS>^pp9 vPq<)wZKtq&z|gV%(Zwo6yVqv>xLY-$aU>_rMI6#&{Jn?-LHr8trnG+nOyj$6 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_check_dim.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_check_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..fbab13e615c67e05af4fd81e2ddebdd3171bc4c9 GIT binary patch literal 5267 zcmV;E6m08>P)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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 z00esg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/default/00_check_press.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_check_press.png new file mode 100644 index 0000000000000000000000000000000000000000..9065f6722c8b5ecb5e3ad54750c4f31dc1d13736 GIT binary patch literal 3358 zcmV+(4dL>MP)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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^+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2lU7XQ}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} z0006>Nkl6$}u zcpdm~IQ&6G#a!V5?9PKLrEZ95!$%IT$vy}0K6AYW@XWHWTC3IiN%LdN*917>tJUgh zr_=d!cQu>M&*gIYgXsVOsI}YeUmEZ|pLd@VezLo|7u|06+GGF>;77ifp6fcD8M*_Y z3%{%ED}mP;09|;tvWJG>w;2Fk_;h6t3J(CI(detm007w4T;mTadvJInDo$qTp94@T zl@1KP&b0UJA#8HC=1F?J-d}?m-(SQ=%jXWSK^{U%dA6usX5{jpoG6NrZLgF%6GCj; z_9vzMo+L>HK;Je8qx^m10Th)|--HnBrhSdaXGO+_(H(~pHh;l*QbP)eN(A$D93PC_Yo)3KqH zx)MUH`Kaun7rY1SUkLGbR%K6;WZM-~a#s literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_check_press_bg.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_check_press_bg.png new file mode 100644 index 0000000000000000000000000000000000000000..b268899628ce4d36578a55152694f59b018d4c24 GIT binary patch literal 1760 zcmaJ?X;2eq7>*-?rNcnQtAemD)IyOYn}ozf0?i3j0~n)3WRQ?-AcoC`WPt>vc(fuS zhad_CJc^|w2vX}&pa^&&Bh@KY7)3-ylyVeA83K&h4T$XzbZ7TF-{*Pn*|gw5KO5^6 z)&v5;nU}sK#FZbl~{sI2NO67G!g~^5Lpx~hGhz4Y%}al zAk0^)BvMQ&+Q5>d2vKI1AsP@ZjwTSieGOWfTn%GDBpjvEu)(3)dJs@4*kFj4h%D0b z;AoY9q7L4a7$}h^s^v@t=<5S`8(2620%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8iDKT_m1tkv_4C| zL&vW2<%?f6Z`)s;S>14mQ|i7*es)xqEbFZ7e|!d#i&Z)5LYb_8w|o`#pYd|Rc1ADd o4KWOscGdS<-9L!k>SthPFutAAAYQkfA5`voy85}Sb4q9e0D&+YE&u=k literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_color_picker_handler.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_color_picker_handler.png new file mode 100644 index 0000000000000000000000000000000000000000..02250e61df6435784a67db7b19de7e033b40467e GIT binary patch literal 2930 zcmV-&3yt)NP)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 zsJ6IeN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im_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 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_press_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_contacts_button_bg_press_ef.#.png new file mode 100755 index 0000000000000000000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0EU57~5x?iyJrmkUshCS^lYgi4dVOPLj kL=4q#2D^M3KSA8b01Kv!8UBA#_W%F@07*qoM6N<$f}P>mp8x;= literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_effect_footer_bounce_left.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_effect_footer_bounce_left.png new file mode 100644 index 0000000000000000000000000000000000000000..a7e11eb98d8d4f8faf544763acde82066c04559c GIT binary patch literal 6039 zcmV;I7ij2-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#t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_{`sK$$WyclRh z9EumjE5W09=SZ}3q$gY_dL2;2O5hZu7D6JPQP|X|l8sz!Z`b#ojr53W+5#oY+=$|N zC0Ymj#HEraf~dr?Hu#HX74bE5>_9UE(adczJ!m1Y*o)1>^qlN`8GAvg2ow!~$x1f{ z`^%Xt>i$Zz0%A~v7zrT*ERG{?!SO7t>bzdBRL$w@lsM`L6b;;T)ML&-Goyg(I^PCF zfxmFT!epJZIvF8T$L2V3B@nXG+y=~sPN>&RydwvJ#6d9iw}EICsW&0Fuiv}rC6yST z8@^BbZQZ`r+@}U^P292K`!t|!EdYLPM@iIf#9iZsN|~wpkBx6&a>Ba;_0Vi2ma%b9 zZ#JZZcOy}a8uPk-c<)M)_=08!j`~nkE>4xa;881NLY8rgfucBeWs_x z6j+1P@I3_IjH*_na{cie=@HqN2eknJ)vd9f9La^YT%!?oQmnmVNcH&PH6X zIPTcSELLG_mrJrQD!0d1@5)F{QI*-8yZivPwX;0O&ycqu{4nXc8X*{`VoW zepDw^`A7-ZcY0fgvCEr4COIiPX zyP{m3zOgt)rr)=c_a7M{Z$ebW;<9th@07`nH=#B$4*qU z1*(M(+6KNtr<$I#IzYpG0O0hPApK`^TzXW#*;YvT?;|e_%Kwow7C#Ec-SknL`GZ&R zMF!Ob-)bOh#B@~iX>P$l_wY8S2V`^9o6}#~fo%jNbwY6o2A=`znHjc_B+4`e-m5 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_effect_footer_bounce_right.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_effect_footer_bounce_right.png new file mode 100644 index 0000000000000000000000000000000000000000..1275d343e3fe2c7d5745fff8460d2285bc05e02f GIT binary patch literal 5986 zcmV-o7oF&dP)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|mQc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002ovPDHLkV1n9^pJxC7 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_effect_tab_bounce_left.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_effect_tab_bounce_left.png new file mode 100644 index 0000000000000000000000000000000000000000..42188380c763bbd0db454a320cea12e35938f794 GIT binary patch literal 5988 zcmV-q7n|sbP)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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rX?7ElO$y>>Scwjnnhq52x^4->M* z>~8{5r_~rDyV_C6P}mmLg=>Dc=nmB=s5z$he5s%Ihi;G zgiY!hSP%+A9~(t$!HHKBGQDRnl2OqcP~$PYHu^rj*FlK0#<_s-Yd>pMNC7^mh00{|UM^L{; QcK`qY07*qoM6N<$g1uu4C;$Ke literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_effect_tab_bounce_left_h.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_effect_tab_bounce_left_h.png new file mode 100644 index 0000000000000000000000000000000000000000..88aad57a35d1ef1896c2a36e512cccdec1cb75e7 GIT binary patch literal 5871 zcmVKLZ*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`!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g1$Ex zIWu6_>$i@&|2U{KS^yF#V=62hI1s2O z0u0qNBSj;l!Y9yvH*b_j65Wn#Tp%7GL|59@;(7#zH@ne>{|=mUPr~j9Cp)Rc0`Y|~ z>WiSRDyIg)Dp?f~hX!|H4PLU5~!szv7=DQge%NlFaR%^1f8;_s-Y z7Wa>U@=Q(!VVZ_45P!?qRN;HH&20SPD&PD7Y#bPuy~Fh^>@JiG#ACbaXOHTcfwLDv zxBL47@%t4rYDWv;Rr9==F_E-F^Y5wVD=r9q@M7Tw;%}+pUO=NqnxS(o4|7`}uGh0J z2u)1X0&ywf)6OG$h9N~txjDDKgB7Tn&YO&2xt)ku$c5*_m@Xd7n z+`Wn+qUD;817A2;pcrlu7-|fMb;<(5w9svR5$z`qxa5WE1>!MEGqdhCYl{=*ib^!7 ztRuxT5jp!W5D%UMdfPJP0}ePaCrWe<``AyOo{EI~*fkJ*N0&4F^6m4iY!1LsUv9yw|im2S8QX;vJ+ z`TG`#p9|r=L%6bTI1dgTwZPG}u5BcN@87anueeqNlt>LA}sZ{{`ZHFwJaldoOe%JbUv;C<(m?h(@=4 zz(RhVu#!VY>MBD{$*X+x8nq+iC_O_FnGkjIEp;H2z@0|s1wlrRIq^z1HeZy2`{rNG z5%~qMdLgqCdaI#K5@S+v#xz+o6ekDdAT$%zCf$E6i2P{*d;0@?6Am%C;?aN;gqbADIeD+;B9cA30x1 zaz{?;j0p6~Wc>Ci@ zmEv>7=^`T%4vhlJ=apAl;GV^Np2_8!QAHuYw?+owY+fM)|#Jy#8M_;oVa*uNOsjBzOt;7ldq#oCpPES&_t!>s zy=;iT2V)BysU&7WK*8Oc|BSYaMvM1h*~uKQkH`3L0Bl34bi*B1%>V!Z07*qoM6N<$ Ef)%Dcm;e9( literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_effect_tab_bounce_right_02.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_effect_tab_bounce_right_02.png new file mode 100644 index 0000000000000000000000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>FNUfqf>}V*5kOL6~p}c_$wo>wuiMpdZTYGz9 z2xlgVX7#*^(cr)tXVcxI&>KA|E1Rm1Zox#86j}nOI!f5cpH$(Mi82E?&JMZ^=X^28 dHLl}-2LK=aRz|tqnTP-Y002ovPDHLkV1oP{$5H?Q literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_effect_title_tab_bounce_left.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_effect_title_tab_bounce_left.png new file mode 100644 index 0000000000000000000000000000000000000000..ee65cf4ef7058f90c3223bf4f38e8504006b1702 GIT binary patch literal 5162 zcmV+_6xHjAP)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##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#A%E-^F{vFgM8##9-Ss)r zOhtol*=Y&VFA6c}b0m@4=>6LHf|CJH%7|H5K|v!*+9-%*KwJZ`qosHP@PVm$F|ugq zAleDD(Io1T9*qP#A+w+v6vJt;M#^ol}8R^}O% z@oc2zQ2?0$Jb^Svont2|NB~YWZjHu^XPZET$rVlKit3Be96~C{e3sO+Wm_0+eko2? zzNvV%X!i7oXG96Q5=7=TAs+<92oPTASO$ZO7TNG95YBcoAXemW&8(R08k1~j4mGAZ zHR~-sB2#>;jYzsjuRE^##HcL88-O)Ic*52So#oy7BO3RWL65fv7<1hD&4HNJ?{+Y_Ci491f(9YTKBqz zi`H#Z@t|t}qbn`N1m+7dVl(eihcfVNoB)FpWf@f<3 zAQZEYbj#UTfr^Ji(#?hUBjB8XJW2T`k~o`|t^774xy@PbN%Bm;v;6{$R})03+5;dJ z)35cB9%#8xMnWk%O8+BLJ^kjBJR%Q-5xe{*!HxdC8<_Qo&5`G*{89mdCQ`mfQqC?} zo$UZ1-ayp*ybJw)6fOTOv)-%G@B1ZQ=>B2c)PWJ*@JSLj(t@v46RHq^*80KeBOe%6 zC}6(DStdca(IADZv%P(9FW9%|hAznBAcab$JpT~CMB-|`LXSc>%E5WnuQ

41W9DM z8BfO!d)}6R(fyN37e{)T{QE1i@rYu6=L9qieCe7{qZ_tgyU#~4q9<_zyqRS{0c^uT zxalWDsN*54&*u{dY#Nk^G7rZAfY#Ov7bvLIRk{PC7=(e$N`@(`uO4z>}%d zSpwL@`-4zIZJ_Y1CM=-`3^fo~>@qZ2B71z>;?zZvfAbi$71=J6S1#_W2TAQirTU)% Y0Aqu>vCJDA6#xJL07*qoM6N<$f^NRB&j0`b literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_effect_title_tab_bounce_right.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_effect_title_tab_bounce_right.png new file mode 100644 index 0000000000000000000000000000000000000000..55066a50de6ed6d72f6145b9eb05a156358f1aa2 GIT binary pat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KWF8{Dp-M#X|1ML{gE9&h8IACc+D_eDa&w@GopO1^5oOi(A_!W z#lcF9d3{axNuYeRfJUT(g(28Kskg^4U=pp~dm)2Jsv@;NHmz z9E8->Fe(LjGo$04OM`fP1G1+*2jv+Xg01Qi;X0yKKcfHNSylptw0&-#`ZkE?0b313 z*{zDXpr8m+6pAG=C=&FA!Z&wlK6fdm`kE87AOVOB+Gaq_kI2Zr;{ulk@w}>7oywn$ zA6q3v>PP@UG5yR;=O3eOajXxLFV&k=9Nv_vH$X%LU?f~zAV^W$ha$phI5xgH!|2u46k z5{9>+{Nv@P4dM&Hdv>zIYS@h?m_{>Y#DT*r&)9G*L9S@OA|L^T(mCSi;9H$g%0;i+uKZt2a=cTDF8>E{ZXE!&bl~xVFgeLLb)Ving|!m zVeZ zM_yDq0y$u1%s0#Li0ae1JSfOOY?XEcVLF=zM#=dcB1hym^yS@TNMCRsya=Mw`m`(! za=z91gc5*AL7Ob>MjrtD!d9mna{?BZ?E+ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_expandable_bg_bottom_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_expandable_bg_bottom_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..3c2cd64e9d321e971df67747d337f5b20dab9ccc GIT binary patch literal 3154 zcmV-Y46XBtP)pPPiaF#P*7-ZbZ>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(HlgR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RNZ{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} z00014NklG^H?*IS* literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_expandable_bg_top_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_expandable_bg_top_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..922ca0445260f571b50ea927ad88f701bbc48204 GIT binary patch literal 3173 zcmV-r44U(aP)pPPiaF#P*7-ZbZ>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$I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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} z0004yNklYU6vy!+1*<~`^BDRPzf0Ep1UZ|64mRh8dtbnGtlBZ{Aov;; zOjZXsMPI`XE>6e6*w!le2iqcc_)ZDrlOHz_0zls_ilR3Wk>uen|Ax~JOqCl zyzl;M!JoF@8dXD00$y6fdOb5W0aZidc6}=RoPP2hN`Z8WQ=m{@DIlOOHXsCk0k0jsKPb@HP5- zv6CdpEr6?O*prBymF4Bug4Y_aR+g7rB60@ciHKe<0MHQpv8rw?0rlEO2>uv=zJ+<; zt-qRO!J5JQ?ifZy`WIld%w}P|!aYf?Vn`ln00000 LNkvXXu0mjfXL9a% literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_fast_scroll_handler.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_fast_scroll_handler.#.png new file mode 100644 index 0000000000000000000000000000000000000000..8accb2bb0630def42a2ac6722dbc58b1af73b0ef GIT binary patch literal 3808 zcmV<64j=J}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|mQcmR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8txj!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} z00033Nkl{?p1hv{R zOfdL&nQk+A#bmOKkwnxoGm^Bh{E_(Rm0`q7c;ST?UU=bO{>NS9FdSegVPKD_nml=z z+i~>(>4@jvI-g37J&}GIfE%9&!P_W2c;Cg$a00LjEaNkXWop@Y@g;yoAif4MPsMw? z%_O*i%+xA{7hd=u#GBb@#|K&DTt#Igyzs*RC;lGnsUz{1VEi=_zX`^#U8ld89_+?C zJ!p4M@JO)g3BEOXiY{~5^gyjrcmTjOVLtNqaSyRl->I4xUU=buq*Z>jupwGg#>5u* Z7yt_8V;>J$s=ELH002ovPDHLkV1mv(r7Zve literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_fast_scroll_popup_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_fast_scroll_popup_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..6d503d5bca603900d82d84a87a92a328b449dd10 GIT binary patch literal 3646 zcmV-E4#Dw>P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e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z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z00011NkluCZU3QlC1a#L2A_-5ZP!( zyWkE$a3W_Ob@)ZWOKBH%n8g3eD{i^zeZ45Mv{lgo009600{{)|5-bHeLjnK*002ov JPDHLkV1nczOQ-+< literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_focus.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_focus.#.png new file mode 100644 index 0000000000000000000000000000000000000000..4b7603a61a1a8c549e3ac4a68a2f6a88284af444 GIT binary patch literal 3012 zcmV;#3p@0QP)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>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?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} z0007vNkluO-?2)JG(3i7oB9Xv)i4SZ_ocU84Lzor*?yD)+Rt{Z92~+RV@QG z;5JaQ4$!lH3LJ^ZS=P0aEJm%W3&64gBz~RXiUZsik)MSEsp<@{3RJ@RDL}*fQ{c0R zoL?G9Rp$(5I@qLb8+C!cGl4R22bd4u?*ku2LB zJ!);^-&mmcw&^VJ7I*_R(z0}hHs{oJ5(Cr(UVF6^6^pC_@Y(+` z)$K*38+g}pfiC~hN#|Td{>0|8?{4Cvs@4jS&b&!y=vjNw$yG!SgP^!(g?(O_3h=}S zM-lmvwH|7^(sT-VmPb-1nGI*JePB0l30t#bDhUknTUxC!&U)%5lv6L2;00000NkvXXu0mjf DQ{+`T literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_03.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_03.png new file mode 100644 index 0000000000000000000000000000000000000000..c3cb222e637d4e1dc9f310c9d698235839e53366 GIT binary patch literal 3386 zcmV-A4aM?_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$oCcFS8ne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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} z00082NklEX zWV>nFy{hNg!Vanh)PbHs&8q6vEDBwB?WTw{&l>PdseJ=VfNB(w`A+IyeJL;y*IheR z)pAUvt^zNt{T{dsY!pEwB5hUuWjikc7J$|$pvS3YYlh`JOdsWP<6mWH$|io5tmXM z6Ce?hH(5^muC08-4On$*ts88^Op*C;k1?47Q`Rm4zXQi?7{JS%KIF~xHzp4GGirJa zIhfz-?HHgF*Pa;z(3~^ZVGPio@2sj*MUj|8&kvaEbRZEq3Cy-!pgL<#owkVli9O4{ zyN-*hS}8!Cc^9DpcA^hg5!nlTY1I<@yf9_pt`CkP@*`_LRClTA1aLo(Ql`u!7h<}= zR^Al0V#!nzIO4Za3A;IP6}T3B^}#HVJISvAtEVLS2bSa?TkXe~vP<%lAj$tU3?|Dp zsAN#3U=kvqTb2U1ioPf=0ypevNt_?{2Hep)z>bLQj^*YWD7IwgN!?AhZS@$~jZvf! hpo_m_E`VJ5KL8CH0kY93EY1J`002ovPDHLkV1l@9Vk7_n literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_05.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_05.png new file mode 100644 index 0000000000000000000000000000000000000000..842d3f165ba14cb58676d96aa5b4803339c31777 GIT binary patch literal 3479 zcmV;I4QTR-P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#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ZR&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} z0008GNklLK`@d4r+ z_z3E)SFuQ|La7I&m0FwHgUJwxHxn3^q}h!L^dbvO_xsB3{=War&derjHk(|eHo^sK zL!fT$QZJKKH4hYlNg!t(plG&=XCQ-l0;~ha zz$4%t@I^%GT|OiS+;m{Aws9WRNQ9Yo?bQVE0;qR`0T7Xzh-?C%oPq#%4L14MF9M^$ zTi~g^n*v^`>U6A=nnQ0GRAy`5P6D#iH11wK2VUCv9`HI5>IB#Zng%tks#jAKy6(n@ zB627qYXMX_CBB$a2L_Y@r6?ft9dF~WZqYU1jXkcYYB@3PZM$(!RSPi+6$5ob2Yv`t zY`m(f&k|Is0l!>0n2Q0LaN|F17Oeuy4r*OhR})mKy4W-w10-&I*5OO5z?v-%P*&BI zNT3sMwiuwXAQyF#zhX+Yph}TIK7CwH&GwBhK2cHCW#EB3fl0|d21uPs`F4KPMyW~y zgg4XQ7?XK3jSrv(D|9elMl*%tb! z&Ml`-O+=1kbJ-6!ab8u6eNboC)M=fpo#^B$BKv_aEm>jTD@*~n8F;9Bsn4`zX$i~J(6LCk-dT3Tm!|f vn0a#UCR?+93hc!w(ifoN&oM(F*ZvIv```ljin@!M00000NkvXXu0mjfvFdD~ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_08.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_08.png new file mode 100644 index 0000000000000000000000000000000000000000..1f809475580b813df828d6a0db6cf37de8cb8cb7 GIT binary patch liter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=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z0008WNkl$Emg+8| zS3>}a>mOun{x~!YIBO&#c_yI2L@r8`;4QFh!z+P+TCRV#-_+3#_<={jJn%k8;ShxY zQpeIznjaZUb;nYOd71u(NakfKA3+UP=^?C|?#tQqqU@E{( z9~?#GN53`ox{E`ntgx!(Waf?wF>PQiZwXriZX^QO4)DzqWtIa^S;_0|qbZQ@8DyYl z+zDfFzpTh_T8m>$#TEIH`+ghvlm;gFU1t6>W05=R@+Qj~H>?D16#Y<~04`fl~p1kH@00000 LNkvXXu0mjf{cvh8 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_09.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_09.png new file mode 100644 index 0000000000000000000000000000000000000000..a70c086270a050da04bed372a2a0c39260e63fac GIT binary patch literal 3466 zcmV;54R!K~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%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!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z0008ENkll&C;J`j7vBC1dV^d z5CbA*XwbaVvI``S3qeo zk>@2w`F`Aa33v`10MCHWBJzEt3aRQ8 zumTj_$Grqp98c}J4Fg|Q)kWZ=h@Ag7kgCoa%tQjBY1W(pUDw|uYrl1>m4Jt;x+@~B z+&~7inoy(x9EnJ$&-3fRZM%F4)PXtoT@O@sXBgC2fKBnQ{A;rB_k*$6a_v_lvJ31x z1p)4>Y9Y_CUjfFg-39hUq>0R7)GeW>>{7-}rkX z(gteI_L8bDWl`vsYd1xt888^VUE9fTC|PD-kVM%Ss_Y;@W3{KwANJ z#nJY*g#b;ub|(<1m1dUCBJw)xes+>TS=I7E?=0A2kZa|Pt$-vCyG@`LDo2%-Q0002ovPDHLkV1m^tfW-g+ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_13.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_13.png new file mode 100644 index 0000000000000000000000000000000000000000..5a6d5787be8bed98e041c1f274b98c595f37f092 GIT binary patch literal 3481 zcmV;K4QBF*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~6QE69c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3gv};>)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} z0008SNklS;`3O+#D%P_$rFL=;_spl^aNZonru(5^sz@=3%U z=nh;$mrzBl3L#MuE43!ANlXtZ@#S1NT$-D?;THPPfgv-wGn4Or-}yI*hQlF;sZDXn z+7X~}?f4{{RJ8`4B*-+;}GtOa*vi)24_#Ox5d0!M4fD4vdB4>xgeJ+cU zg^z}aY#hkVHNn^!lc(TrvVH4aU?YT)TmT*Y9diW8wf_SE#f%6CCZCbR00000NkvXX Hu0mjfNI`ZU literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_14.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_14.png new file mode 100644 index 0000000000000000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Bmlc25DBO7E8;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} z0007tNklMXZQv zqas#Hn^u#W43T&Htk(Xi%3`^=cM{uDffCnf^hD%O>|XZ6bzD@{S^?_RO`Xxo+KJv=MPx7VrBzGp^TJetd+t_8 zM1E$?hng-9%>WPbC}qk#b|Gc}Y~@X1YnDtUfg^rTOW4hU8^E>T(FdD>+(~{7SUn-h zKd>afYjqT3sxHY-f+YXbX)sxiK^23l1V)Iw?pO-kDf*ze2;8u(C2@W@9CJqN13MzJ zJCT!XpxBa4PsyERdse%^Zj2&@08RgnnF6`;e*m#^^v3^*-w6N!002ovPDHLkV1nzp BS0exb literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_18.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_18.png new file mode 100644 index 0000000000000000000000000000000000000000..e5265576dcfe83dedb62d5d04a9cd8cc549bf70c GIT binary patch literal 3386 zcmV-A4aM?_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 zfoHYnBQ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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} z0007INklQ(=&e@VR%p@5^ zux21*;ERY{B?iELpzuH7-Mr;n6!r%OGnM-^6$Zc@`o!kQY|dv%dB~!v>~6L4gs_9^ z0WDx+P}{2dAVr}^uHO-n&P@}ZDRpT;8PJRZGT$k=TVD%I#4Xn^scJPwp<1BMs3;n9 z;2GI9MuLU=dl`9)w=;K=%KVt_V+y(re+&wAq}_6m5N zQhtnATy11A3aL}6lHfV!Z07*qoM6N<$f*B!4xc~qF literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_19.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_19.png new file mode 100644 index 0000000000000000000000000000000000000000..5b13b14561ef1d851932df24f04cabbdc8f6ac41 GIT binary patch literal 3460 zcmV-~4SVv5P)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++o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5VTCK30SSQr2^=v`YQ zXKOx)ibLj2)9zDk5Eph(O`ryJ463B6cVZ-T*R|^+QXe+pnWT;lC;f_(2<|4s#6hA)fCiLmkeMo zW3TQ&B65*Z+froks{$Xa`&?B$)T)!trHGt`df5**aY0qfk+J3l@X6X6s`^${=S(_@ zXYB`Ht|D@jvZab8_MuX00M8uMCh*b+M-llMn-A4o9GUx p)pOu5L?R;ry8b)n8pxIZ0{}Q-0$n*F6qEn}002ovPDHLkV1f~iY&`$~ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_23.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_23.png new file mode 100644 index 0000000000000000000000000000000000000000..e5ba271bf8fa08600d81fdf5bb0f8c1f0ef53ffb GIT binary patch literal 3461 zcmV;04SMp4P)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%_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ms%w-3+>FwRH`6>{7-D)4p0d>vQ_f*vYt~wSZj_sh!EqH6^h{Q%}y_WKXOg n1GNx|j09->cgz^bwf_SE8S(+olrBuw00000NkvXXu0mjfrLJtk literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_24.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_24.png new file mode 100644 index 0000000000000000000000000000000000000000..933f97b7b7e582245e46a0e9fc30c718b7a2ef6a GIT binary patch literal 3457 zcmV-{4Sw>8P)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;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cN&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} z00084Nkl0Y8l2z@s-! z^lDHvU`#5gG1edyv|xFush79O%cRTBmXdH_lF80)XJ&u<{%_vAY0~TUI7#IUC#;+T z<(1Jv2B~Tpr~wl|$tu8s)m>mqMD~i#ofL6uRhw(RE(CN=k3Q5XPo=oOnI zu{p07ibJ-V#@(aFAWPUmwSflEGpMSnUMOOrORn7#k=9WIo>^+kfD&LX3dnq?MafX=!0?_=1mc3f<##sG%3rXQ@TV-fM?EwGU%n`Hp?jCb`15|RBtw%JH4 zJ#(^EGx}V0*6E1IpV(FQ-3^>p)mi~R>MNV7*3CNU%36=!Tt#Fv@TCPy>|lVQZF5C4nP;>zDCav|hH`hrlb~ zV$kh_DKK!7Ujr8UB>CHxky$aC;~xS4&^tsp>Rv**0K*7VEkD=fGW{Y2jmCM4HEPat$mtV-l6zNw#Bk4`{|% jWGFzVf5)5xx$=Ji$7=jWxHlK+00000NkvXXu0mjfbOCZ+ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_25.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_25.png new file mode 100644 index 0000000000000000000000000000000000000000..761d563659b555ccf33e3686b8d4d23465aa4bba GIT binary patch literal 3433 zcmV-v4VLnWP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*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} z0007%Nkl|Ce!ht>AlQPfh-p=j zMrxB()7lJ?_|F^+OOo47Q|KQVIBs*??*4ARb|!_vV8Bh1Tih_20p&??l1Zvs0cyYk zP_hf4XV)2UDkA5pYZp?ST2)tobpt5)b%Hw%@VkiooGOs2mVr&68qUuF%6^{#pGD;I z%0Q~RY%s-OleTSi0rZ^0y>U<@ zfy_)#fjI-|1BW8gN(_LtK*Rrl_oK`=F6=iACR6u8Dhz-*^q#Fzur(hia@5XHrXH zIx#>eezL00M}~5)$*cmXkJxKCkceCaW?N4H%9CxUol6n<6B}he+{9H?t>tXAo2MaF zt($hT$U2HXTt(z0@TDy)>|>)XgsB2gd~y_#;hG^!cE71DD zL2_SazI5nJR|Ixcb=#bCZ0M_MNmX}%=Rv!5FwA#Siu@X|HKfRIS&@HkzVXGLzXA50 zzxX2mlexp>jiQLORQ01lRUFh^y9&V(@Onr%cTF?hsdTPZzV52(D)7J#VBd=kY||_Y zXQgTnI1-WOwREmQE4^j_Su6d@{O2vu1e!4#nF`SC@0b~olm7z%Z9ngxMm?zS00000 LNkvXXu0mjf^=@f^ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_26.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_26.png new file mode 100644 index 0000000000000000000000000000000000000000..406e69ed7a820c4c626a93edf0e1828f7468d70a GIT binary patch literal 3433 zcmV-v4VLnWP)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?D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om?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} z00084NklwXYO~;dz$t8eg3C*hX1Uc0+qF) zqij;uD$oE%fr@p2uJv7DOGG-UXJ;u!t*R5iv;k!PoZu4&_*F!H3=~LJM}S$N7Va+r z%ICYlClT2{Hjt{08O%`dkd{4Y59m1)r~(&&@!e-EvYqGvQ-Os40&k1dcbMDH8cZ(kl~fo2Gw5YIBeOGa zCdDE1rV+Q)JcIM*`If)K>`P4SBQxW(k8we3jxf0LZYn%*?+SX zNJRDmwN1MN7l4O0eUk!X?YfiBzKHye&1K)*#z|FesOk$Kckg$=qr@^~+@zCx)>?FO z6_L%rmY!PAVIGuKegRAkxb1_ZhTmy+snR+VjCcAIF18l@d jWFSDNf5)5xx%O`WrPKu#>Oc7}00000NkvXXu0mjf8^&gV literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_30.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_header_process_30.png new file mode 100644 index 0000000000000000000000000000000000000000..f1f81cdf8d9a75a6b64ab65cd466a7fc6be07b97 GIT binary patch literal 3468 zcmV;74Ri8|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%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>n9N=dW`7u-=RUHFn zflB!N0HE}I8+b1wyL$#w)k%XH30_jS7qx(n3xP6l45$V7cYrq{(kKjMFc*R^t^;c# z(jM?3CE%!VxvyW^&l*f>?zeei04$)F zZH~m|yqK#FSvHNiODjcE*g-Xc6`*TS6RLV5kA+UTaa}~}do6fosZ9e)fSD*Di=C3Y z^l6BNc*TuNs#=M$P&Keldss9U$Uj}iPQ?I?yYa7mSgsnbHci9;i5s`}0jTNS76UXI ztVM(B%$%y;%>m@=&yl>VeWwq|1n>yBW#>yG@*?lz9%CVO<8lVfbzn7x0oJU?H1DQA zF+ko;V?AK*1J7MRE&$g=Bo?TW;l50lwM=+n$8`gl0iFU^UAD}N$m5)Dnsn}J#8_y< zKdh>wsyYWOI+!KkMqU_G0JV&F^|p|Rv{bci*)|S50dBin9*D?%!IVGmtg|a3zhkrP zD{uvP=q70ZcSK~NpboE@b<)gQjTZSLvSH#Zg?Rv?uwDHRTEQ55Qtv}33dzM8Q^5_(`ymg*o(-o0_S>&{4EptJJ!=0 zQ*k0c2}J(8elU5qL1lv~2QMM=ylE1+IqZ$%ao~)Vgv8adZpI$14XldD`o8R31B*?Y udrEF6yK8+1SdX#DP=F5pjyV8w?cV@PgAJHbW{#Tx0000uW3k literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_icon_Back_ef.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_icon_Back_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..925ce22434362757378a4130394c3aa6cfa470ad GIT binary patch literal 2355 zcmbVOdpJ~iA0Hxei6}|R?6fXj%#9f{!=y1YGRrh}2o>JO%)vBf&X|iCMl4E7c)O^S z)kU-jwM?uKp+c9nUg;)dWVMwP&$hbYJyYr3KYI3$_dMsE-{pKipYQ$moV|gYHkzB* znZRH$bA}&{4UOKq$9O*U4*i$qAT%tK(ZggxV6;rZkpM6X4~zof3?U~5U;`XpVtgmy z1%u6t<_Cw#!k7UhE+|BDbTUY#Pz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^ zp8g)Y%s!^ux~L-I^1yi4yC?Jq7MjhuYKx3w4KncBOD4wu2gA(%{@Hk_2wey}E1H{U zO1G9gU#p?tZplqEYDuYj<8n8^sn;xf>9s`yMb!bF%esB26KYnY=>LcI~^P& z-i)qc9MTRAuRfE!yg9kB#_RN@-!d~ZPfq;uaILyKXkSxUNC-ZMyC*EpA~)TxWR;h? z$X$K8)nFm&e%vL3_OC;QcTG-`-tJu5?0K}xTUta56skNdj$}m^CABnZc7E4X*LO%kupc#= zKR@?I_(G3Y)`LGyJgR<{XMOg!!9kWI`e>nC71&jpl9`|^<8B^!k1{3tsA} z5~anGK4sPo>@|yEIEBEH$9F{+> z`+zum`1yGJ-u|AjvGC@{-N-zvg1pudSC2a3#FH|)&4>5wo=Es~%nn9M{Oh%+N+uoa xzmXSiX{x=qfH^x>sXM>2`~P;FQO7{N`LM<^OjR^_uj{l8<;;UWM4 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_icon_Back_ef_02.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_icon_Back_ef_02.png new file mode 100644 index 0000000000000000000000000000000000000000..3541c28f2088714fb0392222ce5a39865c1c8476 GIT binary patch literal 2381 zcmbVOc|25WA0IJxmrGQl#*_&$8?#=cJ8Q&PCnPOn=3r#zjG4)dC0o78k~YzTtLW{j zkX-I76)jR(qjFQ1t5ue`y(HV)JyYp@|LAl7c%RQX=l49%`F?-=t3|IKzNAx5r99y7skch1zce; z&2SMfSP{(iq6$DUny<#7RbnZ`hQVCdsib_t4nTnj10qBc8gi_@0f`U^X~-Y~7t570 zfk=^iybK74_vQ)WcL*p#bO3kzCQFyRuNazh(C=yZ$ zSTdGLabXi(hzvF!ha)qXWHy;hA#hj}1`~^4(D5xUo`WS**korq2_oXycm|2gB6Elk zm5ygSyRa9y9um2NFA)F>c14igFI@cJa;Z!iz*m4W9tcJ+bbxOpr~u`WpcKIjAR_F7 zL=qvWl-sMz^Ep};AQQy`LXHd+BR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60w<>`c62Yu5ESHkwaB-7QLjs$oM6lP`v-+>T<*{QesOns z+PPMHcD?+xcmL-UpFcjg(ot=)r)p`)QX!k3Jrm78x!pUVo_NJ&u7dze+RsHI;@`RS zr>7se_i1O(>^B+x(K($vZ(o1D>Cd|v(mOQ6SFMh8kA5yFuH;cN#nx_9+PZV!Y8YM5 zDM{H#9t^pb=h_D`P`Xk%|4HwjsoOtFuAQ>`aQ19jgY0SjJD<9Xo>YiG#kj_`n%%ZS zzF=9!yjlU7qOA>=HQkS=OvrP&!+Lhz345035hp%!2~U?OXRl!m_B$cG#7=2mQ=QnA zpo8x5Y`v=*?Dd%MN&H}7)BgCbA^k*{_0l8tR=wY5UX?Lb5o0iK4vO3UOno1Jp{Na0 zcia-IAOD^1Fy$`zZZCMhYX|$XgG<6IjMhw)Xlc<_CtFO@{@TY)tD8?q zAJOIvi70Ysoc^uxuhfIOcE$L&na4GMf9>93z_o(+;XBz5xdQnb{@a(#3LmENuid|> zx?Fn4r1l*(wHNv4WuKJUHDCNRe_``pz3Ml-A{*A|-8p*eT#mz@xXnk@*NPrucYj;t zlDsb>Ug>&n$NsZQH+pxd$sPFPbggE=-kl|F(;ap#m@JdGZHeAz$u$)Yb{E3R!>6(P zD8_LIKHHxDH*BA*)uNY%u|3(YOe?P*zIL3elX>neKI^V)MN{nTLsxr?{Yd{ieb!}R yW4;E?(yuP_?WRBT{I=f;9N)mm|0q|_D#5_NaG49|D&6Uz3d7UY&t;ucLK6TA-*@By literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_icon_back_ef.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_icon_back_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..069d83e9b4cec765e18a4ae6df4b6062fffcfcdc GIT binary patch literal 1760 zcmbVNe_V@s93NfkP}JoJ$77m9we8unt!LB9e%8vSCMW7>ZO>{~+cVo!Tir>>5qHH4 zS6xVlmltt$3Z0@fle!R6aXI9rAIDukBo);?O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Om$34Fz3u9;E)GDw6?6skz!z`@y5v1bN>@-N)Q{A3!f+Y;DFL>_i=yLT8@w3W z4vxc%pyz|9;n~s4!O!7Y(d)tE@XY8_!iBQSk4_8z3(tbi1OA04N9P64f?L7I0$>T< zh3Z%<>xQW=wCk)a>76|Z2pl3UjzAM>^8pMK^*6*VM%mBED!wBxWl75hn0St7E{=Az zqaE$&fAL7vrr@~;sw3IVXR0HF90!oi$fjp7jk0wcc-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`X5eD!V&ZD-V&H0GXy|I>}X~T)9aF-T$-DjR|3v4~Pj*wm=R%;iu*SQ+p9GS)2Jj>0)4Dbn$d?45_&F zX69brLk0q^$=a-}tcw<&;=>@l!Hdn2OF4x>CFnwXx~56sAK}|wxh2#5 zG;4PL{`2I?InLL+)}6@xpmf;r0*mj3mCnY;%q+EPS$<^YX*{uc_00S5-=LS~O-BT# z?9_@qc#Gq})H2guMtO@j(K)Hm8l-Bcby6=>l;E$ tTn{fx_o;opZ`Q^0{!RakU#w?fW>B7f??#K(=9{20#?#f$Wt~$(69DYduC)LF literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_icon_jump_left.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_icon_jump_left.png new file mode 100644 index 0000000000000000000000000000000000000000..13d4593054fa1bdbe67180817f527d4f1b0dad0e GIT binary patch literal 3113 zcmV+^4A%3BP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(v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>xZ9l97H9l!W<2QY9;zZ_t0U|?oA$y{Z&;Od!mpyJ8X)z4*}Q$iB}A3eI> literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_icon_more_ef.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_icon_more_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..abe5d0159fd0a168e45021f390e7b959fb289d1a GIT binary patch literal 1201 zcmbVMZ)n_P7>^954CfRD>4cGH=$!15ytyQIZ@BZgOD^3}uh#2f%U0*oIy!UOU-@z9j{E-e_q&!3haD%k05HUpuk07?< zS)-_iENAl2BFZt$riNP|B16?@G#h)omFV!X7f>|Ajk$ZLLNqYdSGT9eZRl`?r`cSrQ34MUi;cYrKhoknx5}&0d9p2V?5YYG z&vR=|4ORPD9fycj_;kt^0bo^?2eP87U=J&aKoUgys3{<8imFK&wk;gB7CH^BW|(bT zbd~4E2njSnXti2=E6w9@Q~(gdghP^2R3jBl`oxM;ezdd0V4%nj-GI2*XA?$i1UE^Z zqn@sX;04v{I?CgMP z?(S|VQKa5z&xS6&6l=o3cGE*XsTg^Vp74(AXo{E>btsorSuK?%0J0@LTh3;oVj8fd zi&BSUBdlafYDR^UZptPAWeJ*T73xyjloSAp#Y_iV@grjSHtN`Qsogdf+!d?oA+iV# z>ljaTDxiN16C91@myu(J*kf1otGOH4H%+mWfqFWv z>t+&nQI<MlcPyNVAHII$#_aISFScE}SloZ%9l5)^ z`_4+`=Ih6!1DEGcyxsL^?mzO%?z!#SyS1}dj$DSf3YU83lwGHeUiiVh?LEF&IQ`R? z!z-WOd=>PZ$>;u>f9lV{d$&>f=)G^2UUKI?*|(2w&!2ey_VV%@*X>Oo^M{{%Oq}mM zyuY|`@`DxqyU$-Zc6#CBN&mM)@ywMa^Lu;dENE=I^L}&ot->EWW|x*;yY$)b_p9(g gbGa?b)!rlbFkgR_d!lQaTTFf;m2#i)Vd>!X-(wP(i2wiq literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_indexlist_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_indexlist_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..28cd706cd0b0689d08a4eb1345f6078e15841634 GIT binary patch literal 2871 zcmV-73&`||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{deZ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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} z0001DNkls%v!S?$|}lB@?6)Ibh$T2M8pCZFK@z67BgKe6%sZ z*Iw~Y*q4S9cpqHPB1auKaNxj!1JA;owd09;d*9009600|3j# V7s#mV_Ba3l002ovPDHLkV1lh`R_y=) literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_list_group_bg_bottom_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_list_group_bg_bottom_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..d227fb4dcccc9900243697e054c916aefb481568 GIT binary patch literal 3163 zcmV-h45agkP)pPPiaF#P*7-ZbZ>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>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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} z0004oNklzn2@r0KCO`pM90EcL1spP?a&pJqi=4zm5$Pk+ac^yM0Anmi?wzR!0ZWE0Wj9u`6B0)h$zX+A?&D>q9KG`O6jb}&H7ra7Xlps zm|1J*DWx;-{cR~lNgfShAbH+2jfN0*i=0>9`=xX4#2DiM*#5;nN31c%IplSS6g84=mkb-Io*-iV0ylRCe*cs_uE z)o#$yM61^{D%10%{Ba{d4S002ovPDHLkV1m;1 B=_>#L literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_list_group_bg_center_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_list_group_bg_center_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..6e0777b205ebae3afef88d4e905830485c402604 GIT binary patch literal 2933 zcmV-*3ySoKP)pPPiaF#P*7-ZbZ>KLZ*U+IBfRsybQWXdwQ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bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z0007(Nklc!m+5=SLSOHaFk0N@LNV*m$X7^Ve^NZ*ESYpt7u!2qL? zydYv{jIr+oj2=>?0YfQO)mk+S!(4S72Sl_JhT-7^W=^A|l+Av>e`#Chk<_{scf>c* z>GY+PYP{cr1evDEc&+AEz3K`htoM4oE!TCM8yg!GhGBF1C~d9vu-EHdGR8i%+wDjQ z(FKqJct})%1Hb@Sobx5$_XDNWex*{W6VbCMihi+t;ZBkyur2c_M+pE!jE_*4P+vOV zdnkku?RGn|E%PWz5&+mnt_FZjDdl;ZWvx6@Wr6Ml3L&~_mbIjm=KwaRVQ&~?r`Olw z96&lF)HE*bbm9xf*eQV5(=eL|Jt0IgV^o2=y1E(=;U|DO0ANuR>2WoZDyh)_HEWtc z#czq>i3SUTfW~Caawt85gG|$88Zd5WEY%tn&iVW!!5FXAT%}YsZ&d~Cvr=kpd6~b+ zd*v)~1i-3#)fKH(Bk!LD?AS1jm$qfCbIzAAPASa@WpK`yY|DOY80Ko;)C*YCaU7(X z-12=t;GFaPvn{LUCM{`>bIyI=4~A*F$>hizu(_qt=A7Z=dC!7 zFXK2)%4p)A=goVbSD&-(^)$=27Zw)kM6?%%;gE>%m$7H`l`%RaVn50ld$d;1mC_Bv zFkaGJ>p N002ovPDHLkV1jo{V*LOB literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_list_group_bg_top_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_list_group_bg_top_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..6f3e5454349fd46e7b638c3a49d560d6d8a694b7 GIT binary patch literal 3155 zcmV-Z46O5sP)pPPiaF#P*7-ZbZ>KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0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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} z000DmNklWy0(>Wk|O@Nb*zq!?G0hB=H`==r@9=yX6V4<&6fA(3b*GIK) zfn1%D_i>X)y9i!K3&vP6*MMUGyndpK0H) z0$%h0A9TNMcyZLwyV^pbpS3#0OW^Asnw~B@b;0*x3*ZZd?nEcA1|G8OoWj-4B0j5vy%DMH&eVg7c(mzFm^Xr~Wt6s8*KBt!^j zfhw8Sg@f+jKhw13gMI;gH^TBh4M~Bsj%CpWbgIx_DKr7l&&N=5t>5R{z!&^G8ByCg z@Hz0wl%WG!@~W*{vvxmhjHyNM(4c+rMM$d4flq;N4-C3KWLbo^x;FTa4+*;Uh}u*> z_ibh%A~|3?!21DsS45tQ$fUqE>bCvIyldmtR^fdEe9%a7KLX#g*|wf)Z|^!}$zsae zpMZ~mCv48cn!p#vm|{xXT3T>fh0fNJA6xqO`Yi4jy60yePY8UD`y}}f+b^tVbt2+A z0-9^lGd6evyyGZmGuK9p?}*wZYD_);8E}qE1>x(WW-NjHlORa6g*@cbsbxEZZm!wiUA=N6ou*W~KcIgTbo<#vD7(Rn@o7F#GzZMXkcg0MJIWNa<0H-M+LeQ{H(|4F>h34C;a!jbzPvZ+3X;fni+bn k7?0k3m-Y?({j+}t0R6?orEzj&@&Et;07*qoM6N<$g4JzjP5=M^ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_02.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_02.png new file mode 100644 index 0000000000000000000000000000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#}0F|wXh@cm5t>yld2P9PnnR>GMZFG z*l57lOG)Jsw2X2}fb#|g+6ug{Ps`FujDGNCv09U

SIit*s(TiO@! c`)7X#0E!o>sT^%y>;M1&07*qoM6N<$g6LN_H2?qr literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_04.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_04.png new file mode 100644 index 0000000000000000000000000000000000000000..1cc3660a3f90efedac5a53430574c75fe0e649ef GIT binary patch literal 3955 zcmV-(4~+1MP)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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~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gpM#F)k~-whW~p9r1Mnfx{o zU$1EyA8)s{Yn_Q)2A*BSbOdzJAmE{8OZ-ck+ZU}*2J-7S0C>PVLtPFs(OKOHo~=JN z%-!)&gmBH@4-MHI!E&@_JfG)7fJp-tpe(?F`T2tJXieIa^V~8~g86yS zDyxDI1e#7UZxon%baP2F(o`ummORj<6)j{1*fuyb%nuCfJj1s&AUOkf0-saBK4e{y z3G+pa#oAXCfJba;$&S(qxHEW%B~a!K*L?k>;f8$g?Y86dC)}L@ui$e^=wbCcy_8u! zUgYMg{r1w9P#;pM-MkL)84K??tj)@a9Y>Y8DgS1&3?*a)I?W|vjR9XQC1oS1Xyupz zCnXtZCGfsZY~ozyB*Of3G-LBnqY&aqaKk`nzB9&+`~RiA2Y>hE?*JS|*6?wRrOyBW N002ovPDHLkV1hagRRaJ3 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_05.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_05.png new file mode 100644 index 0000000000000000000000000000000000000000..112a6b0b52fb105c8ce513a298d45f8a3b510229 GIT binary patch literal 3956 zcmV-)4~y`LP)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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_M6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WjF~V;xbA3G)0YsF_G|+4*D%9KaR@ht+5leReePjZ5 zMiLAFJn{n1%yVN&*_PDQ6bP`E*M;VN&GQSZpiq>YMZntua=^yd`?CtKhlZrQG>V9v zfVkqbS3*Lc-cJmfJ$Lo|T=TkvarQR4`-ei-52n&i^$PR!o?nhJQ?7V zHsC|odtf8l(#Z1lo+qN%2>r(s_qw+K7*}n)YTABlB)<7X@vn@}u6zocYs34isVP3$ znN{bywgop+>h}!xEugar0S{}+;Z2j0_Sz6Vp>%3YLC`!k-th)R z6aD^+q2^ed>rR^)B6_wHB!Fsw19!bS=8le2LlQIpTJuLK`t8Rl7g=@9k6(%Cs_sIr z-~$Jy^M09Kk74f8>bfJMjmrgnTG2uwpsv74aCgHn=@9rFdW%dW;9lShD(VbwU6HBe z3rjK9&FhEaX_t!93%ECUk10?U4L5TBuH=Sd@9nYY^|#WUfnLEENLWpv(#s^P$4!3R zw%^{hCA1Gq1bE{WrmH6{mL7AnwXl;_C7#M-CiznINHTLDk&q|QT|tCR27GxdDL;ai zUXGzWVKvo9%i_Y$Nrb!m{^e)us(^mS-HnA*=5()$@#yEXv_HWgp8Y=n3^2z>nGKe# P00000NkvXXu0mjfI5Sf` literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_08.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_08.png new file mode 100644 index 0000000000000000000000000000000000000000..84f79cfad93fdd30f9af179368f8e2f6fa848731 GIT binary patch literal 4013 zcmV;e4^r@nP)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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$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git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_10.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_10.png new file mode 100644 index 0000000000000000000000000000000000000000..105ae0b79370c2bf52c7f74c4d16ffa3e5b2cbbf GIT binary patch literal 3960 zcmV-;4~OuHP)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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_huIF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oa=ZfpZJOuoPX_%b5sy#js%eq!F* zezVjSk)eM+6Gv@) zpKf3XJQ0zQOpyWaEo;2mDm>dJK&CzYE;TQniO3^$g&&u!<)<10ZeZyyt)`2QErIXN z4rmKLzev2e-#*uOl0O4J(etMw@^dhG{Xy5XlR^QUef9&z^H=)5D#&f?<707)+{CFWE-VN1I@=1WCXUqo$#toWz$f)a$GPV|Z6@V|QmhvxrSNGBy!)KN69% zSn1Z8x(*ozY#K9Ntxc+Yx$eAu=tyW2s5NfB3i3r1zNc2Oj@f&oS!L3tXKV@~>^5Wx zMF1TyE^N9$zKnk9NNQ?%g5?RTy5#RPWSWyw=Oisf@8bEo#6t8n^XKbw_31_{#;v!{ f(!M2s`|#fYkV*4TRfEQ400000NkvXXu0mjfF$8wY literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_21.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_21.png new file mode 100644 index 0000000000000000000000000000000000000000..f6b38815f4590f17b9e890a9ddc678884260b805 GIT binary patch literal 3915 zcmV-R547-!P)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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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ty81p_P#YKHvMX!5*E#c`;1?f~CiwvhzxB|lWw)?P!rzf$C}o4kk`SEBoY&49~E zUeCMM^;KV%He(s>3jIhU?@Dy%8$ul7B$uONjr^{%U9?G9TIT&a`Kzu>zhUG}<6S3D ziiX}KxW>B|Qq?tuA%MpK9yWA;lMuVo5%GTj9Lf7H0G`OTRdnI`qa5+<{bv9#w}HG1 zFT@B(U6D^6B`($YKmP^rPKk;-q9C#8m4Pu!Uai^aPXIhq)L7Lhh{|}L11(tvuL1lm zkx+LO>{*sTEBU>KrriX46}jv8JP|FF(7%CpVTuA~ekope z?LRJxHeOu{Z>A)^QOgFf=7LX(=TAfA?U~~JgPIjzT~Tlkzy|=2*5|rw3vS@3-&5#E zK({;6|Gp?l06YiqCMV1$WeS@!MfAkdsnHd(DEQCu`CS0_ae1`H!Q?$hK#=6pr2(b@ zo&tE~_r`G&< zUo!q%BKqHVBP;nRXK5%xVv6RDwXChKb0V5pZWz*v7K;IV1Z<8o2v$5s37tu3KVU@62)uP}8zX)z9%n^nQGsx12Qm`S!2U6;(Hmw+U{ya8 Z_W&K##98@Ij^6+P002ovPDHLkV1k1TQON)R literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_22.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_22.png new file mode 100644 index 0000000000000000000000000000000000000000..dbd04e1c7e86915d8b63b1f5e2b9752a93419271 GIT binary patch literal 3926 zcmV-c52^5pP)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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)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`T(k^-fX?*`W1ue_<7m41)wfPc_MUa}8fbIto^ z{GMSyLTSNsJzO~cQ&*d`1U{9dI$cRP2nhbt)08Iz_^b)|m>UvyIo%BnEN_oI5v2y! zKMfT9D^F3^?LVef8?QQrw=fW2-vjs`0XW5U$TD}4w|55OJM*CUCO*?0AFXNEx~?Se zXzKR@<|Cl<0N_V8fyb6-e>oR6L}WSwin&vx)m+co z1mMD;=B!6+M(`|p=7AjWsR7}U1vs!eNiG`I^F%a-x$~kA;5poz5$jfW34j+C;J03S za@cIGCo#W}OB!@dcM+$v3z(al7tB|Fc5-<7*g7#HUIG`w64)i(^#QyTNbCg>O{Crz z_uCVZQc8`PU1Q6%On9cuq3^!5r8@%fm;p;FN+;k>;MoB=JHSRZIX*q gZvVffJyiQQ094VEzmVn&$p8QV07*qoM6N<$f}WI9mH+?% literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_26.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_26.png new file mode 100644 index 0000000000000000000000000000000000000000..03abf907d726f0edd8a8417b5b98c18674747a6b GIT binary patch literal 3904 zcmV-G55Mqj{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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_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7XQ}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} z000DrNkll+fXhIjO-|?vZV9miMBug7dya}; z0_fYsNMLha3jp*aHNXj8Yu%)(&K0t6^u8=>krPrT7++j0kT`%VN;M96Z^^(xYOlu> z(bRF>qOPvXc(-s|Kx}iJKi68fD}kqU&pB>gA@HfTFQ~xUtV1f)JMw$X|1PSkst67k z61CdWf5!{F*1E+|%AksxitGT6UfZ_l+allQ8j6}O%=CSupBSQ^F_Q99DOJ`HIc4LR zp+-^UZ7NRtYUdT$waqsaR44c*!>zS8ihd!DeqstVJaHC&Om@p@4gY7@56 zCd=ll{ycbFp}SoZ;GiJc0+n�&Ulb+UqKi>=_dY?Xe^z~4!}G!I@e8akA90lWtA z2Eel=NB)n@-du7-ngBk}(CG<)BSxK7HLleax3r<{cuq$&C4F}+TQ>NY9@O;Dfj>4h zBjEq84Vph}n)P0{wd9GVe=osr0UgwZ;%G^l>kPkFX>7Q$l8h!b zR+{ppJ@y$nJKz>#tl%m7+#*9u(2K{UxD>!4qvo7jYivtPqGwRi0Wm2~Ie-I`o#b+% zex7zf3x@-q;P3UnSQM87cb=~B|19Kl47j9 zdP|<}8KT%Rfcz9e%a1V`G^{L@H$z+iCNnQ>DoDGLyEu)>_}OUDCoMJurQQ|E;T-@U zDI*SN9CRAsJOv4^U=t#-p03&l@QSkGJ*rP|O`otDnsi28A1#}wzU`T6o>}->6BFDK p&@mia<0}Qf?)Lv#+J|bt2LLHLq9|NozpDTM002ovPDHLkV1gl!O(p;U literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_28.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_28.png new file mode 100644 index 0000000000000000000000000000000000000000..0343a6a586aa50bdfe5dddcbd3be3822fbfc7369 GIT binary patch literal 3967 zcmV-_4}kEAP)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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{deZf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4Ll+_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} z000E4Nkl*VAFn~De< zjEyFLs>vTKrCh%n10a4M060_meGcFke@+2pd`$!qH6p*&WX%iY2LOirO894AWB`5w znDgh}laB%H02sAwp^7KrYuO_DLOup?fmIHP9KfuYgjJIt02s5{T_OkYg@|S=A+MB5 z0PNOW&ut+EFeM_@8F{7D7{K|O4lL)Jt~$t=qd*ZEe5~Lj5v9S&E2SnL4sB6-f%=!}ZB4rHD<ns;L@Hz+)92Z#MWMe)z5_V*i4?28k3{@hV_6+B&+hKxSsVTv^kd1 zCet5Crl0R+o^lL`m>3*x^Nywqw!Yu%w0DK2< zJ7CeH!?ssF-!diup7Z+hmeA)(1yKR{TF1ut(`o`@EL>7Q?)`r8gvH|;+zbQ`ax z3~welzLCS4)2;RUfmN3dS!O=z?N>qli=2s}yhtgU%mE@73e$OEv0qqK^ z-|cd(^Etyr_{!%xg^ko!5_6}%6F5jl_Pyp6?PQ)dCXH1-*m2OuNV@69Ei*sG9xgK81?Qoa&i3TLBJJq2*HQb?p& z9(knzej7q)(Q}*d{z2?;CY0lcU<#;528DaY~JdjoAeX)yqBgEOr+9gtR7wx2Ef^o&i>_#<_4H9^J+*SutX zy&+#MaEjNUp~?#wp0H|4{!}2-T$FZB;*$3+KU=3G`WwrGg^bs9(4+CK|IgC?C%<|4 ZGXQQ~xQhgQ9Nho_002ovPDHLkV1ikAY54#E literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_29.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_list_process_29.png new file mode 100644 index 0000000000000000000000000000000000000000..c9cc13837de4768c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F} z0002ZNklZ$qi=CL3!>T#AQg=G{Dq%W~5vteXj| zc@+B=xcUHAbJYTe1mFM|Dg;;f`MERW8bn`#k`O`sdNv8MsE;-cn0~@{;M1& literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_option_panel_handle_bg_ef.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_option_panel_handle_bg_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..26652a72a4733842cacc29e9456dc9eebf99ccb7 GIT binary patch literal 3693 zcmai$XE5At+s6NHy^9(|qL)=x7oA*b@vuO5~ABv z!2>|QTCUEH2I13s2%JDYFBtAy*Y~Z zQUQQf-_WsZA#fc_m^@LK$8{0U0fFmd@&dn;M3-7>m3p9HXWsnS>u)ydg>M_@<~BDr zW_5ZX)((T_A=mIOyAJcKXJ?@bmnXQDwl(f>aoccBg430*Z@=}5?~T4AjdEPrO3}P* zAiud}o8auxc5Ji&(XSiRdMB&pBpr(vbH+p73H0)e-#l4c7P`P!T9yJnJypUBN);}% zb;AFn%SU73+p%^607uQ9os;||_+hS*tE2umhssx)1w25Qi}pKj0C=p%Edm>?Q|>1L z0JVZ}&?i;a-<@}bI*9Id5-xO-U)oDYLAZOmAT$uNCt>$q*b7udK=@;ZKe2)A!ILU% zk{!mbF=<{@B3))*s1&`Z&mBneJNa9}NeNU3Na!3m=Hu`j6D+urNtm*uPdPfZ2xt?z z*}ulo8*}QWN@XW-Kk*gINntF={r=)Ji(-;=;r4g5EA@Pe60~2mK&xg1pW|qhx@8p7J3#2vsz{B_qZkR%#+HH;zt>G z@o}b=>3-&Ix^vcZ*HK(7)4)7Rw4@ccfCRAeDs}lWODGGCE1W9NFPWMs3~V%A$-37FQO5ZNCG=V#8nOMDm3?0>g9ORt1^B9XZtCMqMg zm$jWuo$YC60m6WS8BzzyGITO{Ggv`jSUIW$wS*!!J2o4FrIbH54XM&FlQ3N`C!Neh zo1u_Kd#0?W@N)UGSQNa>6Q=wz)bc8x$g*3n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Z@=#>|o6{ znsAJk3-$6=NaGUt1?t}=be+v<;}Y8*?G)|Gnw6>EiFJDC9~c;@-XCq6bX>!UD&x={ zG~HhLMl<#7VHyevG7`cE*kuv|k4x>BcWO$$D#-cjQFK!X3~NzW)FD)?8+*EIhSHGJ!2Ly@nQ{wDGG)YJaJ&6Q?a z;u7a-sD+RGbknpKB()%2I^Dd&G)ZFqjfVDsQEwA1KEu4{qDrBS-`UL+K2t;^tcp)= zzOg5Cnd{4$ExmV~U|!E4E=}w|ek?2mgA<~>$3JVGwxi@7*O@F|&x3Rw{&MOsCH`^h rzkK>f$iHO#TS(uzGZFweKPLt3hW0|($$nfEX8?d|8*9~o9V7k?cMz1L literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_panel_handle_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_panel_handle_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..75cf18945dd4deccf2e07b66ec51b76260c56eff GIT binary patch literal 4746 zcmYjTcQo8xxBlt9cOucEMK_4vduK%NWd>mgq9sc79?{9D5p@t^MD*T!)KQ|h;MGFH z@OjsF?_Kwg{XBc^v(MS<*=wDBPMm?BItd{oApig*ni?ub54`kXp7^*AsHjHr?STlq zG|YVffQaf}!vJzW(gOgYzN@mbfdLfe3-f`(yjV1qm07%A!CYKlIs-t!65JR9Hr}U| zy;{9c(vA&F*M=F<;IkMhC4^C@a`LhgkZZ-V7A?{kc2TIRVlxdE#$qKWhb7V&@)5@q zF5qpk7AHrP#KsTbtOu94&$V9djNLWP%k5U5!y6{>I`N4!HAD@?!iX!B9#i~`80hU^ z-x5#=C*<$~$nhJTSbfm!7{GOijLb8(PP}#iBVdLIAL!K0>lAtvb5C}llw*Yv7Kzd6 zoBCWEKa3hs2ufD^3@E5!gu$~pje$aJz;49RVG}Um2kf{)cV>Vv_;pS&24I=aN`q0D z3b0T)$EpBOX`p)IMZ79tCInEsX!lA23;ckPrm2etP}c->j*}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{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} z0003=Nkld_I@ua+ypflhhbf9#8lHd7fuQQP}Bpx*w0n)o3)*ZnyjIw9YxH ss!G=D^?tEfY(+%FZ^hL*jjGDe03q;lpw+QKn*aa+07*qoM6N<$g4#OASpWb4 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_picker_button_dim_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_picker_button_dim_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..08b878e82a47be984992a60bb8b8d005d9aa0139 GIT binary patch literal 3547 zcmV<14J7i3P)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#fknUxHU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iWObDSEhB2HA`s)|e| zGw3+Zm64H=+gn>(_nG+tGdG%ZNX17Ma1^{F4 VxOCM-YQq2k002ovPDHLkV1oY=sL%ia literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_picker_button_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_picker_button_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..08b878e82a47be984992a60bb8b8d005d9aa0139 GIT binary patch literal 3547 zcmV<14J7i3P)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#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JqPBbIW6s}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} z00099NklNe z{wm?p2@0_e8tiNiVJ%XfLC_4OIg^BxfqG4o0@Cq$$X(U0lr>7|K@ ziI=;(yWdtU3Ia=HANnTMIV0h#1Q%d%bNtnex6hKpFzh&>^gSJrnLCy&efumqiXx?p zqWpy__q-^QcA{sJ`^B(#Md^7ThGCfKG>6jnf0NvgKc%;Q$jnL?lK(;<${VkvfUUP> z-;44OOaAw(Ohg?Al)gYqfS=5q(lo8@*J}(-(?l4C!vN|4NRbKMtk>&KI-O4b>H9F9 zPA3l!53d5)X=V642!dO>u3r*DB-&*sgh=SRekllon*d%gGZgt~f9CssHknM`Fbrc@ z2%%iWObDSEhB2HA`s)|e| zGw3+Zm64H=+gn>(_nG+tGdG%ZNX17Ma1^{F4 VxOCM-YQq2k002ovPDHLkV1oY=sL%ia literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_picker_button_press_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_picker_button_press_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..2d8a23ae7cfc0b940e22bad1a0973ad541a906b0 GIT binary patch literal 3240 zcmV;Z3|I4sP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x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c3oB>~e1K_3RcYtA0VPDQ(1IK!V(635)?N~j}#F(7VHgG6s zztuPb#&VY(nw*a{ccR{H;Bz>XXGN)2q30!jkg46vT=i5ATRU|m<_1>i>IxP}$gME#ng z#>C+#-~q5CElPQV42bop-vW-@ouXv)Uce1t8CcP0uhLTbzASAhuk2@s17J^?V^g^$ zw2~BaH>FMW?1@2Jk~+}M{##3ux~nI8B-m~wskW^5R59UpOV&HnxxcHkUKEe#@wYQG a`!fI&i>(e`BacP^0000N2bPDNB8 zb~7$DE-^4L^m3s900I+9L_t(|UhQ1LZo?o9B1f!5XYf`h z0s{rtL_mrnMKK4-9Eke^i0k!-?mp%qYeVuDQnUwvVdFJxw&aaUpHb-}LS&P8_YE*h zxrxzRP!Isu@*fJa@?)l!v&gVQfPyUgpddwGAGIjO!s_psgDmC*LctbQ xNr?#xrm)pwUnm%>%HnN5(_4R7*I2()zaLo*a7GzR$U*=B002ovPDHLkV1j018j%11 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bg_ef.#.png new file mode 100755 index 0000000000000000000000000000000000000000..568bd40a6ac9cde6725dedcc4590000560d8082e GIT binary patch literal 4790 zcmV;n5=rfeP)004&%004{+008|`004nN004b?008NW002DY000@xb3BE2000U( zX+uL$P-t&-Z*ypGa3D!TLm+T+Z)Rz1WdHz3$DNjUR8-d%htIutdZEoQ0#b(FyTAa_ zdy`&8VVD_UC<6{NG_fI~0ue<-nj%P0#DLLIBvwSR5EN9f2P6n6F&ITuEN@2Ei>|D^ z_ww@lRz|vC zuzLs)$;-`!o*{AqUjza0dRV*yaMRE;fKCVhpQKsoe1Yhg01=zBIT!&C1$=TK@rP|Ibo3vKKm@PqnO#LJhq6%Ij6Hz*<$V$@wQAMN5qJ)hzm2h zoGcOF60t^#FqJFfH{#e-4l@G)6iI9sa9D{VHW4w29}?su;^hF~NC{tY+*d5%WDCTX za!E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~mKt=4toqcbtwi7$RzEW8M z%aN;G4i3kC;7t4+smgD0HvAGeOZD)(xW5s$7Z>8|VdN4$;&0+y{1LZ}&_-Mh^Skpb lU|sVuqUEjWn%A1Y0RW?}Y-ihCe7OJs002ovPDHLkV1lA`ky!u$ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bottom_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bottom_ef.#.png new file mode 100755 index 0000000000000000000000000000000000000000..d6d494d64d9bfd1fa2192dd9c26e0d60e2efcf37 GIT binary patch literal 2914 zcmV-o3!U_dP)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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@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} z0001uNkln+a M07*qoM6N<$f<+l;5dZ)H literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bubble_02_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bubble_02_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..13c6003860baedfa8a56517aca972d36e10337ec GIT binary patch literal 1839 zcmah~X;c$e7!5=g11Jc!QnU_n1BE1$gb7IrkT40P0!0=<;3y%PK!jvMW{{Ag4G4-A zEGl)Q6%IwDY*KM=D3H*fB}-}1ii%$Bgw zKs(BN6cUMKCkcYXiP@XD=UH14&$0ePCB)>6i(>EyRDowmwFpTdM-vf1qLL;d;fPe8 znbwZ@kVs^OGBO5_2?^%OP!&yT!q9Xo4Z$XneEf78sVoJ-fkY%pspeCMzHOocN;#hz z?G?fZ(F7pL${@WKiO`2e%JeBRuAJ)U3;5`Ggn$acrGQSAs>XOaKJ~ROk64?w=~Un~ z1W(~p$DN7^2?GL9EdqGaSe`Nl2m%m91KC~>1bP5W2FRo{hyi(mY@QdyV{(9ri%MA2 z$`!nDSUh2ic;i!(aa_Zr(=#$MXc;UTs!gJUTrSt7!DM<82v00ijZ1Z&YHY!z0*qiX ztx|(4Q8i#vlqR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P`viFA3==1FNfj=@mIN!WFPfnfH1(EN5O2VFX#cSu(t^0HMXlCS~P0o#b{o;27 zLv?j^p+27sCp*-{Im>stNumne%T_>@vH9I*`+0n9?yZg_^{+!;Wp~yeT(5KV$eW*r zsfumIl;N@7_IAh1BREjCx(7Y=U~ggVXVnc$w+EE*qZamrN4S3uVUJ1%>(gC>kG7Aw;|Md^AXneE98(C`=IAD4ffX2cgu~{ zPEWcHpFU$%P}5X8IJ0p6yep-)kFb%rXuB~AgS6zie!1D&-aOMUOd<+}>xBt9{{X=& B$p!!b literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bubble_bg.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bubble_bg.#.png new file mode 100644 index 0000000000000000000000000000000000000000..b45dedb8a1a020b2e7bd28acb9128034cdc3bf23 GIT binary patch literal 1362 zcmeAS@N?(olHy`uVBq!ia0vp^79h;Q1|(OsS<3+_$r9IylHmNblJdl&R0hYC{G?O` z&)mfH)S%SFl*+=BsWuD@%xRe+5hW46K32*3xq68pHF_1f1wh>l3^w)^1&PVosU-?Y zsp*+{wo31J?^jaDOtDo8H}y5}EpSfF$n>ZxN)4{^3rViZPPR-@vbR&PsjvbXkegbP zs8ErclUHn2VXFi-*9yo63F|8KW+g=7RhMR$W{Yl!|Z$R@KEJl?AE#L8-<0 zrA5iW_()TRX$FQJev3c~fv&OgFUkZ)N@9*nesXDUYF>$_i>(q+MlU5Z#mdy&(AB`g z(9O}@#n9Er(9pun+}Op!z`)qh)ZE3`(hOz>HoZoU#*RiNE-o&HPR@ov-HuK!PHs*v z&K8CSCI;rt7BIb@dBr7(dC93TdozLdLiIZ1)obNkl$uzQUlfv`p94z)0U7xv`NbLe z1q#l=W(peNnRzMs<;9wy=z;jwCABECEH%ZgC_h&L9KKeWSnMb4Z;0L$Y++_XAk6fE zj?o7t4y42a69T3{5EGvCfgE_|NzDW1m?B`-I8|vJ!oa}Tz0CaGp^);aFSIN6dX=A@ zzDnfkQJ18igQr|nEQP)2OCP*;nig+<~vIj2ueOpU5qroqVR;lLy`p@Bt3fpIQ_ zD$fE=lXkm>JC z`}T$vAJm(;NL=*6B;JLczrq)HEoiA-(|;jtsno_6KEb2u>pA+g54F~OyRo^ek4Nk8 z31ip&8_cFMMlX5ccVEPJ@`8VhZ8*)Er`^bx3SZT=DO6bj;-nATnHDu)+>*Wapz*$H zw}M25AI~@|(itk=SI)LL@GIcwq3V{j-zS&fd?(|t?UsK_e4P)=ZjFB*7Y2W4Sbjlt zix$JSQ;~(s8nwj_&cEp6yyCM>+KuLI*YEsf-21GlXtD3WSL2VMQqI%W&t;ucLK6Upl-f1` literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bubble_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bubble_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..900f4e789ddc108003ee41e5a9ef429f9fc5a8c1 GIT binary patch literal 2374 zcmai0X;2es8g7on2!cpNK#*wzB4=(w5@9$JkSO5@U;vRZCJm$@$0iXH5EMBa+0{`5 z5sj{BK%y4la0rD$)KvsWK*0-Eg9i%ec;Esm4sN63?hk9GtGmCWpXYgx?|rL!XGGX) zGn1tz005Y=LYN$Qq|QDlB>b)}T;%`{wu+!wMU*5-k-?KeK!8B92?ALnUNXdicmmbm zIw2nbFiH|e$0}mkp>)1Pgyqd*uu72>W&?napHj->r$P#F6O=3z`(j?Twqrn{z!$^y zV&mCT29zQU$&^7+nPJiV%v3&2fbshg^ik4b0THC&fl5)DSWZ{^Vm|BA;rZ+~4g-FM zC{lefU!00%M}Q283qUF&lDTL!da>-^HA3l#H$2l^byFWKH3xvI)hs%WUq43g}68>fpBv!DPz8Lrm zRv;A6y}SuQcq$<{z?(@3A`%ExiZ_W##p6i?FK;G^Mw!$29+${qdeMTtX-q;Og8;Ls z6dE~@8bBg5m;^kPgrDQG#Bv2s%!lUe3Sq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/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bubble_tail_bottom.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bubble_tail_bottom.png new file mode 100644 index 0000000000000000000000000000000000000000..c642ef4b288d745e078a23f761a647897d1fd91f GIT binary patch literal 1326 zcmbVMeP|nH9KI%9(`D6v*vPlSu>m3rlB7&B$wQ^IosS_ z?=B{-ircEvx~>#funv_LnH2oMA`E2%zY01ORG6ScbSqlx21-E(N=JRuHq}4M{_wcF z_v3!g^Zef5$4zv!pD44}*bxLN3%7DnIM(H#(h~T-h0M;vq1xno%`Uay%nG`MFru1} z&~RE9kfM?xjtpOuni0g>FUNY#-bfprRMRdYZ{y0PHHb!#=9Zi$BnKrEO-KW>;>Ui! z@&Sg*q95z=L>eO+E2ZStQC;d9ZI2~K2a}YDwH!yAb2KDKOQwM4(nE?t=ls|vFAeAU zZ5%^4P0T?*w&hfBqyuGDT|zysCTFq{0F)$M!0jPP(0~$+fWRB!O*(;__K-B;MYk^u zs_9}s9pysXT5#pZQl_cVIG)XBUD+m=st@3RqNqFvK{%m>(-=`qA?H+#+5!V78A)B% zOj%XXJfo0MGo~Mdo^Bl>twka`#EP*UC>Sz4CulfuHR9=X{#={Zh8dOqbz@g+BQ~N* zcvLdfjGlz~=&vn+VeIZNlsAOl(2wdeOo}kXsmV-QQp_;t$KV&2D2p^8ycF-_2)76D zJOKa`VmZdk@f5@OLcSmJ_>pc0L4;X&dri;jv^?Yqp)qP_w*LbkQ%CwP)yCKd)YHI$P@gaNpA5 z)4daCF5f)rxMNv+Qe=)a*juc_&5n&r^U1*c^!RU83;Wx@J^9JP#mUdRpE{7RF2C#6 zzKEbJA4|s$y&Au_XK698{>lrTf7%{j@t(5JmR4zHG--RZ}0v$EuKSpoPs)09|$w*t>Om$xcS6P2Ub@ZXr#fLAH(^uxdZm+2OhOq?J zr;9(mYEAS-hvFDmZ9#@Dj*Z&r(=JELk;VNF@4M?Lr{DMtymZR8XkB}#d1|C&Dfox! zD7{^@cCcaUFWb_CKV3XIF&22I;@sHlT?y>cfrMrGUhCBRWlP^%e?=WLw&jC?b=$bJ z-gEvrd*uq7y4!7CJ~UJF{9Ah;amCM&c)g`9rrhcHsAr?Pq%xj}S7p9h7z;h%zCG7z iJ5Q&sGuMleq7vlliPWC>53dFDf3Ps$&b=LspZy23A-I76 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bubble_tail_bottom_ef.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bubble_tail_bottom_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..587452a2f8397c1418d9492e97bf47b3a265eb7f GIT binary patch literal 1903 zcmbVNd05kS7_I^i>Zoj^!qj1?D5cUPr3Wb#Xp;g(3KgobF_qE=snDi2VHCj~B8Uf0 zCvr|1APT6=19?C^sBXycz$u8+2Ne}`>gJrzZK!jpg4-WH`(t^M{EmF@`+mRgc(Pg@ z6X8moLZwhBuF6OxjvRgLkMjibJxD1lBZqehMIsT8r4m_M3rdmcu@n?g8nuhjI8>|8 zUiuvxOrbcW8Z?PSqAFUV!;BoQ-G*Z|nn^T;5*%tZYjx=;0i>Xd4JIk$e)~}dV9-k$ z2|^W5Wroo-L*z0G8ow+?qg$4)gY=Bh5FpqpAqk8qp#`kQ3==M~N*OPBCFI<`&1C>D zOo((Tz0Q1E{ z7!in}fHADngcDkm4jt1qkh-H-_&>1{*n(;a%%Z`tjIjz(r(pz!r(tFQju!#U1cOPB zW#NAI^t?PRf?5n8q55zOW&~cuS7LaLzD&*+$`mjN2STLhAPB*b7!klC0Rr(M1p+Zf zvHJfLGcM^2*Ipd|DweS=vI6bXSEWxbUNsMDB0I)Hwual!iucHlt5PB|jrG#Kk~z`w zGWUY}Y$3QO<;I!(rQQ>3y*Wz#-8INN;tDsgW>$eG9gdF9{e@o`w$A3L&Z`ly0L8?v zIdiwp^`|cJ8&_Of9Fg5z-17Tic`B!zcK&gTJ8JXs{XIJ8{weWu2v7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MEWLwyTW?HhAMJ>H5*4xAi z55)3u1IdK#!z-~{HIu2N4Ns*b1qtg*R@Zn$trOnLn%k?(eG~?^(R}_C~kovefZgTjNo1Yyal^PURT%T=ISg zzjYtrawksqxXX0NP+X>hA8qrG(Fncj03KRO?~-m&;x`_Wf6BcA<4!wvo( zJ)2Lap3bDc}_fU1>yQ-h}M<(`L59g6)#)K^`#(^Fr$7j?JSRRw!JqwO27pS~dkHaqL1F>mnUmGy1`y!%Cj gA7E~SPDgCPL0nGVj_2}UI_$qwLK+c29GW`y4<5#((EtDd literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bubble_tail_left_ef.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bubble_tail_left_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..9d84fc3d46dd7bdaff20f8fbf756ab8ea549781d GIT binary patch literal 1730 zcmbVNdr;GM9IpsFo7Pq+LSX_5YH0&hXj9Ti0R_~FAmg0k z6!h?MOc8g0$P_^YaiHiFWFBJ^b)Fjs1MxBB7|f|l5#0Xp{A0P~_xyf7-}hxtaL_6z z`?>Zs8qG`2%fe&fL>wDL5X8#CwjfoAiIBbK#>eraGnN(x{n(;wtb6Bbg zW2-SUzJ<_I`G{RS0j6U2aYa@^${OJsLQf?{lZfKlEe6a;Dp3)gx?$<`Iw8pQMq~n% z%ZEUjj0=KdxfB(9qcTJ+7RUt>aDwAQSUv)C5U#`<1tl^NlyL=o9xRcATnLiM#S#HL zfmIsKq{gVlCiLnlz2jK;qgbJoz%(RIgyDGNLL}Q#2-VEKZfUFL zT_~>e5chko&?{uIvlxnYnOGxkmo5J>3oGUIUAL+KzQ3eBkl558BhK`ys|-|26dYdu zn?TQR`KQix)E@Tf9ojayF!D)6o}ssFvVTMRqh#kh$Nqf%%gc-+uUoqn6@UMBdhw;V zX-`KV^;}-mR`GVdOG{FwOP||czM+=|2P|de)ZGEwigNDdKDIMGVcu{A56}E={f%or-eMz?05Nk@qcCuYTGg zJAZ&QwAaK%8>;G`NwQjArn~pViQVew^4*)K%Yg^Uozu=&3x-=q(r-ns-tq8~0NwfX zaP_u%3t&DJbtb7kGdlP3H%;qKZ4g23zRAhH16xgJ`%d2JZQWiO>xJo;69SX4b{WlNda45eO;GzqrAS@qf;F^ zD>NG=6w~>WGF%esR7Agi+PP|sToNtK3BR7Izlcfu<^<)Trm^w$xXTgcj)YIH8qW1s|~SujLoNGvMaH;C&oFM&49U zO?NosG$XcmV0msW;C3<4(|Gty-Ux&ggcxtSlyn!Okk`tr&w#6wRA1f|EB)uG=}W(| nKRX(-?i%w{7th?i(Z-Rs--)^GMa8b&*1w8U7KBzvHtqZe`<#*~ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bubble_tail_right.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bubble_tail_right.png new file mode 100644 index 0000000000000000000000000000000000000000..50b5e0b077a6b283f384c2eeb7eec4ab1eeb3cdc GIT binary patch literal 1290 zcmeAS@N?(olHy`uVBq!ia0vp^Dj>|k1|%Oc%$NbBBuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFsEgPM3hAM`dB6B=jtVb)aX^@765fKFxc2v6eK2Rr0UTq__OB&@Hb09I0xZL0)vRD^GUf^&XRs)DJWv2L<~p`n7AnVzAE zshOFfj)IYap^?4;5Si&3npl~dSs9rtK!Fm_wxX0Ys~{IQs9ivwtx`rwNr9EVetCJh zUb(Seeo?xx^|#0uTKVr7^KE~&-IMVSR9nfZANAQKal@=Hr> zm4GgVcpk{1iHq`zbF$JDTz5Q`N^fZsd*)yF1AWQ8NHOu6e~j`b4ynX z7b6o>LswTLLqkV5XBS6v7gtM1M+-L#CqtMS*z}s1n;N;9xw=^zI=dMfx*9oI7y?Z) zGB7i8GIBF;afIph%quQQ%u7y%*_#Qp7pm74uU;$XqSVBa{GyQj{2W*c2*}7U$uG{x zFHmp}HdD|D&&*57F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8*d-*_quWF;JFkk@E7me;h2o=o7|3P)*kkY zT6?3jeADWCUCj*-Ht&YdHwFo;^S?iSa^vtf1M6-g-d6Cnujlmm7u5V!*#NZG89UTi zdZdp>Z$Z^(+j`o!`grJrJWn(%L;my@`5lZN2$RjPZjP9BQ(AM|aiJ-*-0oAVR@lFs zvGdR&vh#Aq#kRyYE0G>qUH5vHuVyJEt+V^ro?kvI?SLnCRPbR{i~pULpAVcRuP&0U zct6-tDSW21Yj#n81Y|vZd^2g_v0O$&|H12J>+esA7!6Fuy|60(Hsq6S6F^at{*jHh{GS{8mkr;3dzT|lNTY8T=GVLd? z=i%(G43j3fwc9-)KOj1#dxfU>&7sE3f%3K1l8O!fox|GV4>*UrQ+Yi*b=mC+F#!uZ xF7!0V><4#jY*rZ%Pvu7mn4x`rNyS39X)MRw!Vf|{R2Lse%t^6 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bubble_tail_top.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bubble_tail_top.png new file mode 100644 index 0000000000000000000000000000000000000000..b760c0ad0aea136f0413a42a4292418aee4cddac GIT binary patch literal 1270 zcmbVMZD<>19KSTU%#fBivAC_(<2odkCYR^(dS_yDxx3i7B@1a_-4yI4dD0xs-DP)| zB`sxLEsRWMOi=6xnH2|Xzf6THgNX~aB8nf1Ob{JNC;KoEW>i|3CkiyO2r0)NMax$1torIl^brc*K16??dkmY+(Tn2MuA&7*$I~UDP1P7S%k& zld?DgvrsHfo&FX^Fw9z#a%09=>KIc{WshiLJPo;u*ccWWZdAp>BsB0moRE|#asS3m z0+)(W;zS_jO;tHqmPV#EI69rq6{aT(bdeZ-5sx$&Bp^dW#2a!&(V0e+*w$sx+}tJ! zd>dj+Mu{D##!?xaQ#FVOJU(~93jiJrdVoI=41yt?@&bzVqC4mYekKrPs1V-12xLtw zmY6J`Xxl=oC{Z?yDnpX>dfij^c~otJ1T;;X8WiP52)90^7-GY%=mQ-E9_j^6sv452 z;HILOS8GO;K%VX#L9V7!yTXdz4ipL**$}HF@OVjCHqW(<){QLu*Nr{VdTy!;$t={> znpQyhC=GPTD0YuFWCD>l%yCUZNf9f&TBylTF_L_gKwmsXsmK5-LK(lN(5srh7#$Mb&I8O6HpN|Gy0sw&u2mKr?`1n95oB)1$mzz{{LsSZ|V^>0U z+g$3AT!z!2XsB9FRV$qe$dpw>)yrxX=SG9L>x85f)w=$?nVy}~@=%k`z+ysEWqdon zjI@V+HckatfdgEaMxFyeb99LJb3s2(Q?$U-M4MauKQSYbGo)D@|0$Nv7OFsVx?B2a zvD-XQK^>!^)))*ArZLR&T#{#Vji2)mx3-2?$GeU><{fV_PD zuUg?5t~uqUUA@i2OZgvWzxy!aylJ~L9IK?4rFWR~k2n9aY|gsAd~EHu_1@xvBj2?C zSeer%SJ-C3NC{m!bkPpzB6(8alptFa;exUKfvX@}$EEAP$s%{?HW=;_*UoqAye zYd-6|_q6k@ZH-zn)`PyLhI0|4IvZ zXY9?BOB;)?4uh)h=zPtEqtn%`;`Jc``a6Hv-T@9UEc(c#;**bzpF63+{ zxnDvnnsce^%-1E~^;X>aMQp~>e7Agi=4{v6bnM~f%#)vg&~wpZIf!3=!?WKxj(vaX V6Y;g$-wyLnloZnZwfOk!{{S2JqvZeq literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bubble_tail_top_ef.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_bubble_tail_top_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..194a9d6ee207ef285463e134d082fdd929b6ce26 GIT binary patch literal 1645 zcmbVNeM}Q~7{2mR0TEGj6XwTx6{%HP?x3Z;!Qk4v&N>REkbx2%*WOVMXs_HIP}r8C zh=Ktk8@g&-Ca^8Ym>Qi7=M)x6Kpm58%w@)zsEnbQDT{MTma!{>+aJb1cDcLX$Gy+< zKEL-PS8qvwbwNl}2mk;JOdD~lIIi(MK~nL31MqsqAyOc6g)Fu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&{May!5zV`S~&V1Gzn*+wn+ux(CbL2aNW%WARf9hwp~x2PS<#B+Csb4qCmtsp}AT zx%ZvvD}Dw?@KDtY4Gk03I}x)S^Zfu!L^^&{pTFZDBEL_) literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_button_dim_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_button_dim_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..d1ba39a38ae9cfac2822d6bd292565120e169659 GIT binary patch literal 1670 zcmbVNdr;GM9It{?QS?L<)Pu`{Iz(ub(5AFUg_abA8x>ooC~jEVKqDlnO|S(;-FB=X zPT7##)Ds8z*x>X~8K5Wwl>_lOMBqU10atZ9aWasBFg=#?aQnmg$8x{q_xgT5-}fae zN)_hpwA_iu<2i?~$JE^H!Mzc4KH$D#?s37~w2W28uo^mnHET^cPp+rqaUh)3CgN&b zt54l|3lHS+91@7=7&a#IW2ufN`C7XS-$EKWG>;b;WHD-WNjM9{Bzp-5v0ZXnjDnQ%>-Dq5G8q?72upmji?MamJ7II9ILWHQA_Ei!O|SIVvJ#{v+T z5Mh&K;G|J8kx@VhZNdQ&-``IM!7zZLd{`(#QP>wiAQ%xq+(7+cp;UxQ5iv0JfSfjy zK0&I+LZ@_bI~izTS))`SFq_SMvp=6UB?@4PL}KSa5I;`Bk4dFit;LUGyrvm2oY9#G zBTLW}U}x0E(; zX>2&fuv$uoPwOQ(y;Inb_hO|XCS1$Xrf8Z@p00o>1I^Nmfi?mm8Wix}Oi+5-%&f7e zXVO~?HxavVeW-~hfrOV`glH^VfM}4gt%$-3JPV z*UC^bu=AChW%%Ig{1QTzcBjfbK2x)#^~?^iY+(D%wl6*BZ_>H_oR@JiyRvVjHh5{* zJcpaNuRcDmMemIq9ZC4!AujNc4f^H}OW;sp*yHq!ENj?M9reTY-o@z~+1Ldc538Au z>|W5-dOar&pl97J@EuA>B?jo*)s>s)_ds7IX*9X@wgD#DchAAmHz)kp<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h&&3YswDe z3omf))(5Gt?!A2f)OUp1@ z^SoE}Yy6(?uXMs)?&*F{ikhm~Z0_{M?k(1#gR=LSWSkbog!e6d7#u{278K=07sqPG z2(WVOl1Ya38n=lTD7yRlHa**4Tf6bhh&JT?Z!?y|YWJf9t5>hS-rCybscmm>{A>0) zHr>>J&^7+chd9PXY^h&46Rv8%R e^?KCLh0U7RKAU)OYh$1D7ot)mAV*|bTmA+w!i)_7 literal 0 HcmV?d00001 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 new file mode 100755 index 0000000000000000000000000000000000000000..ef508be4671ae64c244f8b8eb8185fa7fb31bc5d GIT binary patch literal 3057 zcmVKLZ*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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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} z0003TNkl+% zy0Ml@`&Xm61-Q2Mmf=?3=|4grCbxOCH_$)>4K&a|0}V9LKm!dl&_DwXG|)f;4K&a| z1Fb@vn#ATD(i;p@>HMG}wEJ6S+c<3qJ;7ELx{ITqvszJ=$Jnbv--;Xk6}GvH9`=jz zL8tV16HWpOQ=j;05=XOvhPy(y3FC zFvDGO{26uj#9P_@Z{>?L*WTiXiKgPat6u{Eo$WZw)Q(6!00000NkvXXu0mjfS8=In literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_scroll.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_scroll.#.png new file mode 100644 index 0000000000000000000000000000000000000000..e0ac310b3303cc052d1c9eb3d74060c6c3f425fa GIT binary patch literal 2999 zcmV;o3rO^dP)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%c004NIv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AqOKoAiPesNk8hx=D%Y zIy{zs2S-GX4L5%3PtN#vxR1$im_Z#rD;;Rk94_kc9u~hiYXSSiecr_b&T))W+~W{| t{Dg~P0|z+45xP|~>*fFPiIuOK!U&63NiNZ!=G`dU!K7bj42#92a2aLoAP4=Kc@qv(;n2?D}Bu0$kiG^Qpcaw*O2b;FP z-|yS+=kxvFiO!Dwn;M%M34+*^Z`F!;-HM;KXExyX{+Ie%@bWU!dr>zmql)1JLbhN( zAoGqf0E)n{Mi0$_3_+|b+ofLATWFU|=){dkCmuQ;MiWG)IrI#32q3Z_4A^d#`s?}) zinOgP)x#H4<~lVpt;&?O^A zqaTi-EQLK?4#DvXg%x5qs3i)gj1CQtX5$R)I8j_x?En?Qe{QU*9h62rKo>y(M|>04 zqrANi#<_dCp-2&XBfak1xG2W32F(!%xG1k>Df}gF*_OoQl445ML^Y)`I>)jyD{4wg zlV}v0BJ$aw)v?=N+SQyydy|zkS+p`it9oruE+9v|M@i%dVdD%-L%vcfU3{ zJG*pFe9&^B(tMy~b^Xx3FZRa2pWW=)c}BSPdE3z~AMEzk3$J|iP;lYhA8*V)Ix+Y6 zukF{5FSNd!al##fd+LQN_piPG?LX6(4;^e?Y8Y#8c(0_EhL0sDe)@jz?TzBk+vavS z;Nq>*GZ(sN4$uG6XHM;Hdhp`SW0SwHxjI#DY#VrM^Tdf=U1zk3rHxJB7)Oqr{i<*A y>kp4Vzq9S*s`$wbx`Y<*O@5;PF|#l~O{^pCt{q>voLTc-^drgZ9oi-3?eWKfqL!%u literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_title_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_popup_title_ef.#.png new file mode 100755 index 0000000000000000000000000000000000000000..423231c0c87e5bdbcb66e5fb7b605ff13fb7095d GIT binary patch literal 1136 zcmbVMTWHfz7>+2SlYtN7Wguix=LWX9v`yQ%I&-V5*tvC;6@+P)oNZxEPE1a1J8w89 zDCm=dFQO9!Z$sFls3^h^*@M0b^L5@}C_`nSxOuX*(}&@Mha~6rf8T%4h4!|6wKa7$ z1VPlMT9pi*x8isIn$`HbZ}XA8c-n&09O{IdT|26lod>swZcr_I$mWuO2`qp#vSj6LPbej*1zrKK{bQOU7evrNf?6~xmu@Fz=mIhl z3PN^CXu4P| z28*E}bo*#F9*_GR92dY60k3Q$trW1mZB+&Zc)Dvk$b>fOGip7sfD#n8bkPONNvD^H zZLbn295TA3IW!w&Xv^~bT9Eco2K+H&S!pj@b^x6L9xS*z&PVUIDj3J^-->)eY>jZx zHE~k3yaM%t1#Fa35){4(8m1vI$#66#Dp5J6Fe=BgA{$ktn9NCHB&=|}ROMI>%k!!v zvN2v&)G*7coEVBrGQ&t=Q3`QMS*~JJwudxZ2UWc$)?2|w{)rW27ib8&SqSsh3TW?# z2zvd{A>~eSl0ssP zNiwlWSdDWcwtW$6{7=kiYz*xe$6v)#J;D{}FPBOmZ*(j*#)~&^Um4{;&(+-; zvukIF#J#@4p${j!$FG&2r=Q&2^u0s+I<>PfcKYG{H?!lzAMZ@Rt``{Y@~Qgyv+rMB zdan7G6Vg8KuT>>9!N)r Fegh#beFFdh literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_progress_bar_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_progress_bar_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..ccbadf905e559e53965d274453d879cb4f1314c3 GIT binary patch literal 1359 zcmeAS@N?(olHy`uVBq!ia0vp^B0wz5!3HE(wfP(cQj#UE5hcO-X(i=}MX3yqDfvmM z3ZA)%>8U}fi7AzZCsS=07?{&CLn2Bde0{8v^Kf6`()~Xj@TAnpKdC8`Lf!&sHg;q@=(~U%$M( zT(8_%FTW^V-_X+15@d#vkuFe$ZgFK^Nn(X=Ua>OF1ees}t-3#_`hBq$Z(46Le)Ln;eW^@CE2 z^Gl18f$@>14ATq@JNy=b6armihg{2|P3~YLx4K18a3|!4z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/bitmaps/720x1280/default/00_scroll_bar_h_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_scroll_bar_h_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..2a15e4d30e43295e342cd792edaaa9166f2ee55f GIT binary patch literal 1224 zcmeAS@N?(olHy`uVBq!ia0vp^vOp}t!3HD?=a?M_Qj#UE5hcO-X(i=}MX3yqDfvmM z3ZA)%>8U}fi7AzZCsS=07?_nZLn2Bde0{8v^K*7iAWdWaj57fJ{tG z$}cUkRRX#c;)UD-xUqS~&|m@vn0`fKfxe-h0mw@*g}%P{mFDKcRTq~8r6Sym)!^cg z%7Rq=pw#00(xPNw#HA^NtSYc_E=o--$uA1Y&(DE{Vn9ZINq%ugeu08>u&JJ*LU?9g zN`84USiP^Wm1kaYNn&1ds;7&s63_&_%*+&EXj&Ru8kxG8S-QFz8oC-;xH_A;nLD{U z8aO(cx>=aQ^t$9Hm*%GCmB93-!1bCL;M5CB3b_S9n_W_iGRsm^+=}vZ6~JD$%Eav! z7o6rn^`_u-i>WJ4z4}1M=z}5_DWYLQz|;d`!jmnK15fy=dBD_O1WeW!HD#n27#M9l zT^vIyZk-9e*mcN($7E}it%!^NlbUZ2N%MLrbT)({UH`DimqZ9V#D^K~p-fiyb-lLm6*VpI=WIZyQGX1Zf`xPd|>u)@B zxh9!CiELcV&(pZB+al}a_V@&@njIa<_jZegJ!jH+V#(fjr)73fTuHWFtJ;F94TmHR z0&~A@+kRW%rMUsqF$W=~x6V1A9(<{L7{ML*=F65ThbNo6E7kj7{I!Mcrh1>~2W7iw zk8;=j{W5W0gX(sU)(R%}eHY7fdnOe0+HPPr`k5Bqm2~_{p_A6`v?H^3pI*no9VxDM z$7AkdwNg#fPp5;v+5{bT5DiING$A|Z>D?BO$hVGf!xv3yJEV11#eDUnm1@tJ(gP)~ se%KPw9J1%^|COuv`nGO2u4m$5h`CYox$32fAE<2cboFyt=akR{0NQD?zW@LL literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_scroll_bar_handler_h.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_scroll_bar_handler_h.png new file mode 100644 index 0000000000000000000000000000000000000000..e10b9646c69b74cf229b1fd29d933e044eb49911 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{de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3I6IZxbny)%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~Nkl} zqc>-5(3WjUs@YzZ*QmNJWUVV;0Rtd~bd5gK5!^5}r7PgIcg#@a6a@8#scBOkaw{2y zHXwsE>r>efM}`747hw4SUq$*^j%7GM!`ApXRtVMzEJx0K6pm(VT|z=^oQZ{ZVX6lq zOJJBxCPQbcX=ryd9MAI%>u3CaA4d3`eiJFK&vYvD3LOi@fe1Q1&?2L4L7F4mbyI^GX9_RNLd$)aHq79)4 z9}0wcsgdI(e}roYNWrKSsFpY`Qq!2{icn1(z(jejHpdMXY<(Zl8f|Eh zQz;92VK4rIdNW+Du$StBTn3wAyo>$oqVq?%d%Wdr+v3e^;{y|SyN%nLAN*d9pTvup z*pPHzzB$E}9b%VAYGUWR^l2gex@FV3CLtxHclMuAl2 z?XKYN6eRYSUQd_bJu|YSe|zPX?9%w1vm2heU-sN8IsAU%K<@JL;%wRP$%@qvPkx9! z=^c&ldR)4|`uy>;NvwHre{4vcxFD|^i#!{h$lQA||H{Ss;X`9XsqBG@ubY24sgK?2 e%Mod^X<#1Fv@y{Bid{SIJ^Pr{B925-2mb(^$b3Hl literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_scroll_bar_v_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_scroll_bar_v_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..52eac0a019ca6840dbea342ac653a90ad6f997cb GIT binary patch literal 3103 zcmV+)4B+#LP)KLZ*U+I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cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z0003>Nklw+ zee#}@%wv(kar zo}JDDdK`g!;Hn9l4FDd12XB`^1Z=QE`zi7qxC5qjQDNZjm;tvA3}XOuVB+dV0SdTi z+CD*&4Fonu=yUM9#OP-^Fmn7qP>CA-aT}$JI_s-2PXM2*XSWM5lQeBfcL}^YFuFNd z%56$uAt?h2Gh0bo0FS_ngATyXt*lG|Bd`UQz>}nT#RPu)K7h5iV>O93;1}=?T>85k zpZo}HfHz>}<6=soc{+u+x4yEur@HpO!pB(`U<5uZDNfv7BCvO5ySiJSx&o|H@V&!S tnJm^9qwAeg`g0icE8>U5&hf+V0RTl~avo7~TCo5C002ovPDHLkV1mcazI*@x literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_search_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_search_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..aea105f0fab75e6572f0ad7d257b97ae51193d75 GIT binary patch literal 2857 zcmV+^3)b|BP)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{yriy6mMFg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$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~Nkl|aQFI#00000NkvXX Hu0mjfEyzpQ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_search_edit_field_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_search_edit_field_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..14482d36da837b45f0452c552dde3225e231d762 GIT binary patch literal 1834 zcmaJ?c~BE~7>%G25ftPQ5$Voq(Uv5e1QH;V2q6hVA((+E5tSN}g@lmovRNdcv~mel zQcn&qL}?8oS_S3us-P&M;02D32L-Biz=}c@FQywS*gr~lcK3J8d++oVt{Ml5CU2lmjecEqE62-@W79{9Aa+XhCtvW1lRDu zf0B}kC4d0IV1PyQqAKVN2Eb<17~U*4n?V7XbOsZm6E~a6@aC}C9H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y&D#sy)ruvg?NmDgw3!EL~S!n-&|7?X-o6S6?s06cA|!>qKCIs_M3W+8+37RJMU&> zj9MFNqN85F8h*8UQQh5Sf+EGwo^C)$s`=LegzWMtl?W@0j vmt5;Yk=0f=3`q_T!fWl{EH!$Rd~0Dt3V^D;Iz@sY^WQ5(6fQg(xF+*&$tcMH literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_search_icon_ef.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_search_icon_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..6f2e34ed601cc12ca8fd3964f123a4cd15a72bf1 GIT binary patch literal 1806 zcmbVNX;c$e6b=Ryfj|)yS;QfL)+VEe=4kItES@6DV0efPWf-Fs$F zSZENz%)tzY!x2O)`Qg}1GCZbpv61c2SAaTvfuG!WoLrjw*p5CoV^GRW{^GC@y(Mg?gUDt0qTAcO72WYfHXnTv>d z)5zl4;e6qYFYJv&l%uGcO`)Wuq>xkSWJHrd0a+}TfrCaPVHPB9stT3pNGh%CECV0X zN;L{Ksz6kLfl(5NB%>T6ru1D1uv#pBPps0;BnnFzMJG{HKr)pA!-lxtT5Hj8=wBHh zwAMzZsv$}^q(zc7QtUk9U1z~q?mq6wV2G(J+EK3s;73vvT#AeYIS<@gYm$EVYUG#lm&0%-zzAeF)8 z(S>xOz*{(r6{)nSL?wl0{VFiOGg#_Jv230OlAwqt5DQ6m~W^3gms*sh|i7G-Fq6d zKGBA2+u82spbX|$`rR@AA}4A@T(PEPP+vVAwlN)sPm%`oVesm%y6&2nJLKfN&3&(W zW1=n3-amXr`5*(o)bZYxgGlF;vQbrE>{wgy8=>d#RcAJy`2I~#YIjp{Y&$n^?8QM7 zJ^s{!+DWeKp#$ix8*wd}6|Zi)tTN3MbUTmW@3c%GZqk42a``K}?PCF~zqS&5j~ER# zG$RQuCr%FrY4Zz5w{1RcW-*%BRi1Hg%EVSM)MV1ogtr35wAJ=*7nkRw7QOR*Rrn=6 zKgw$smJFWL#eR|#HsIUzrpm65vwsocp^=|aP5?)d8#ip~T%Td4Ub?l($9+lvxfCPk zI-rQz;Ylo6rb@PY&0cnX=VQ04HyKGh8>VN-i&v=`MyaW;gV_tZtK-ka z6_oYfW=CyRXm(GWf|Dl8FIQAQv)ywP-+e##Yo5#Mg&kf=*Pq+>>?A10=dEup@VolW z?Tqip*_R!t^GP9X*7fdIlTV$4SYZb)c3gOLEvVVkcwd=qdRbeM2hf-h*U~_no}+7P z=Y;kza;WNPsDq!Ry)Nj4dH^+k-r>@5ms*%Ro;xw(HnOh5{z+O=M93pXRRw4sBGQlT zT00^x%2kRo?+4@jt0iyxjbGlKc|Ey8EUg*oQ>Q2 ztVg|_t{WU`o;%(2Iyr?mscYR}U9KJIk8%$t6*J;Z>{f)-MteW_xzo>L zX~MwpL}Pybg#Xm!94GG)ooUUr2gal6yVkVRcY#i3Fkis=!S<{sG#7yM+J% literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_slider_handle_ef.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_slider_handle_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..bc6e3f55bb58a0240d5d797857992af6744d6779 GIT binary patch literal 5773 zcmV;87INu{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#fknUxHUxJ0u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_c(*fHwBt-7!erNjJNWCGbC!!%G14|BV4q zQ&&=#o?7q$dxs^G6hNG2-a+awT^4hc*z~00000 LNkvXXu0mjfv;^~3 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_slider_handle_ef_dim.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_slider_handle_ef_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..68f4fcf66b11b6ad0b510169c03c7ce44204b59f GIT binary patch literal 5649 zcmWky2{_cx8~=(}_a@32in4Oww=C;e_ac^(Bi4~Caz^W>M6#}RB<#ACJNK3Q*pS3J za&8F!TwA&R`i?HPw3O0nr%sO| z=zaB({s6#u^}kF7U~@SEfWg#VTieXc%_qRe-_6HYz(8AD!1t+-tNRld00^GTvp`u| zY+h3*FCIb-6VMn#9|Q+T00Di4W>38>Do788CkVcuG9%CnuwmILyVE zUNU^ATN5lyjxI`gIefAlR^<7ujl3~--Y}y?%wR8>j0>Nrx-y%mvK&)6mR?m>lQTo0Tnui zsw*H>$q@X_84kO4x zRgek@Ty;s%0o+u9O2Yk@Fu+C%V0ShAtPFe?2c!(FUG;&FO+eQ;n6VZBF#%HM39%4> zCJb;Gymc!Wh{*=nb@#2+e&4MIlSC<=%C1#w7E*>q+JVIV=&Y?JZitK>?{!R1j?E2c;clc+h zo#U`|_&KWQQJ3}ElfMyar{tp_9V%(XbUi!vk6^bx4cjXrfuRI; z^P7gL^7_(H=yHA-UiY0e`xH!GPc z`nf;eucU5GJaQ(~1ktcX!n)`cXo8>ujyJUQZH#P8zU!9?@CwOYnWI;vr;ai2xpOnE z)Uf_`%ay;MIh|yr<8AcCZhd1*xhe?`OVIwTD8!biEpw;&%_W1HV#`UkN!>|r#H~%S zvK%>m?ptX?bB{f1>69^I0(S>v*YehS*JRgt)&%$M81kI%`4#`MSP?-Cd%(HY!RvDC zv@TgPT2@6^#6szN%PaCJw$Q5gjffBC@ugSgo?(^8qOTbk;;IVMr?}m&yOG^L{0wNh zv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WeFg7;!A3`svm?lKuBXvr-f-V4XuBE@R z=;w3R$&C#>KTS6QG5i2>w3Ok}Zc#BU_Hd?Z+4nnZuhhSy@)uB0nWbpPc8e_DecTo4 z3Nx>#*e?}{gi>{BvgZ0za|`cKPG-rMg)cTjZjeIGA2oViP&V`4W{Z7;*GW1lq*utG z_7#l_XWVW}wOyH|w;6mvDcN68=ME?;FvBH`WHoL_t%5HW7^!_k7p;ZCZx$fRPWx&r zc^Yi1?w47{K@%cLA@;ljL&Zv0pbl6(B?2CeUIeLr4`jw~DW(%g&JHlN%?!?mQ6^Qn zKE7Qm?C_Lou=5#5C{OK5Fr=jH^wN3ajB#ru@P*YSVgtFZMyV*Sz`;^ z3@geX697|I#3i5k6+bVAL+}_UWJa0T$cj?(g&xQ+OK2#@W$O z(WKn#w?e;Hm5%q-_(gGXE}WNx+Z%mX988#N=#T&E+ToL&HB?%i53#F9vwTGn$jBG! zt+)EO{Z(nuYgyN`zO+OtKK(-toVAWaG&h(oUVI$--D|8%m&?BX$=Lp1Y~@u>o-Yk~ lbzeWx26)Y&`)e-vfJA?4H0?ll2!(S41~3zyYN$ih{{gQ1y0!oS literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_slider_handle_ef_press.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_slider_handle_ef_press.png new file mode 100644 index 0000000000000000000000000000000000000000..a00db9678aea13442b91ce2f72b4ad8e332cdd1a GIT binary patch literal 3464 zcmV;34R`X1P)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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~DCK&s|V^?q2Hk}Pj5V&$cFEc9$|B^aq-}v zGoIu!T3GY9hGo}>Uqy*Aw)?p?q^kQZ~=14Mg z@>cORT}{m;y@->I-xW}jFG;eP=d|o}q@IUcA^vD`>oajIf2=fbFE9ID@cr_WO~Mx6 zD{_B#zi{UeLPhD;!Oi3CuBe$Pq21^6tTrq6MIK0>1^j${X#b(&IGZm!`;3Mn@p3o;AeI@{K!O`5v0EU?U zHlt+Y;>C$v+@~^UoDC6SNkkLi!0!C=bRD=fQd6Ly z*<8_X5skfbE|p;YnmF(siO`3L2>$^aD;m^G{RfvVmw)|g+xA)b7_5$oz|Yo;m$}v5 z+$xh!OG!!b*24DtDyKFzHN98l@bU5SI)pT`8X+T$sJZnjPpr&Mj+?Y9(0N5x7%@B18DCVrcvw0< zL$O#wlW=%99ZbVO#F_OoS(8VjF{4IO;Lr zU=`&15Tq9toN)5}qowe*47dQy{M?A6C>!axM830VC`H5 zByqm|w|i|e&J=RaKrBpzDFWK82psBXLg)f;*~{2%;vITHW? literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_softkey_left_text_bg_ef_press.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_softkey_left_text_bg_ef_press.png new file mode 100644 index 0000000000000000000000000000000000000000..f1966a8867003fed87c36cdec3c79275562b21a0 GIT binary patch literal 3623 zcmbW3cQD-D+s3~hqPM6KC4?v&C3>*xYO7|I=+P|^Q4=j>MRXzRVza9xdWn#%tlokp zR}wguBQgzr&Dg2=&9ssbY-z$E0UBn5c!9zhc38(%9UThp zzJhr2loUiVJ4~EDk#?GjBv6zR{WdiK`>aqgdlK`AVo_`+$ z5a^@aa5BIyQ-GbUAPwMWb&uBuJXL_Iq5FwCfb|`K&BL%;37D1u?m(?P^nuz2pq;=> zR|inj19xEYF=7BkIN;PLC>R2~%mvtVcdfv`Zr3ocfi63hTL;DoDd|MnQA_w!Sy@T) zi4vfkx7ie&|8maLkn9Z2<&ue#WBRuD6#x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W zq@gJ4s7>q*HATfGb>GwVlT!G|-4Q`7>sjI1Pz@`KMA*^9=4Zla_Gm%YZdTem&&S25 z8y%bMwKIKPeO&GD17)P{?B6=x>I|3-;QU#%Kx?w{nEQ$Fx!dnI2j(A3kJH%G($0yA zviDA$WyEGK_DybQJu@Q!f&~CTM*#5q{DSKjJEoM1$Z9T7~yB_G!Vl)0YXtyTOxh1uM%;+U) zS6AJ&kEc5XL$k?;c0z>(0hS0UEd_A z(0YB#r}4nGS+g+@L_n%OBBTY1XnfVz-cTQ3!uTHiz4vnU*jS2`p;lBoRoGR1^ z;g<6JKC7Bsh|mJO|FY>nd4*zN$9ELZ7}MlMXTbK?O27+t80gSsu)m(tUr<&DreauJ z4|cdSkX>Xj|6Vk*FNXYY-e@&sNsUe_{BLfvHf)xNSMYyd!~c~5r!rh642=JhrT@1) zJ^J7G|4K60U-`eqwLsx{+O?xl!asOE*5@tuPmY^wFxO%P-(1i56nF0Q#G~>SuZZeZ z8pJi&aiQ?GRprEe=^XzcY|HP*SQc$liL9aEH^_$h5bo!#b)s_*nhcs|w)hdL>mv}b Yl6ErgGQD&0O#=X-ZLC$J>G1S_02iEW5dZ)H literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_softkey_right_text_bg_ef.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_softkey_right_text_bg_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..e3fc84adc2a19fdbdae4ce8c21fbb127d3197bf1 GIT binary patch literal 3624 zcmV+@4%hLCP)Cm-I00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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&#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z-3s0Uon=f~54IMx=A*H<{js~@?M)HBgA9XafJ%bz19WTn+%gN}3 zJ}o)j>e}Y1B@FZo2zCsIDl6XEzjeIR9kLK2@S~W>V!ifM=$YiX->>=uyH91u89W&o z=Twxrq!VvtS;9r$6!JE)wFH3hs{jCx0f1lU7rJ?oNfiKK%L4#3ashxFmhRqf1OSxc zrUrWUq4VDfnlMoZ{()t3^5Es9+1r_3B?dPqZ1li};BN9cYZ3>>?0sDavmvfQbTnty zyuRU$v4$DP;FyWdDV{&ooJgjynrWdD5@cmbpy{Lh!wSVucqnke7lz3w9Ku}6GW|!! zg2XTMz>#ITCA)P&P=#6gU=Yr3sw5MZagw=K6t@?W9+vLow#{oTFCr(CpZ*R60tN3R zj%SK>iv3a?J{Eg+^;g+I16ml0>0x8Zc~Ui*Y*gH#C0t;dPTazLuODc%XyEN@yjDn? zz<>Z1qqpyHTT8904ganBd{6_LZOWyJnnHz&2+2XW#CR;lGfE>3Z>)-S&L}KRMIa2_ zMr$@3=ROeGm~zy@^2MMtk9YjV@wH*53u93~f*fFn%irKJ7}r!A!%7&ql{JrWnJ% zybEnm^~99DV$oy6r-lCh9%akh_h{`vyWYpw=^q+@ki?#mcQc=ZoqJ4s>l?i~JZF@GkWF2yzpZsL9 zOt*Penh<|&u|n0!e4WUIO60HYT19gyAh~c{vON)!LkjA;K!^0<&n3~WQ tY0|GYkd96&3WXZ5oLo3z0D$vzN&sJSzGUUya1p2hz|_#n0Il!w{NH%St6=~D literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_split_handler_bg_ef_h.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_split_handler_bg_ef_h.#.png new file mode 100644 index 0000000000000000000000000000000000000000..e2bf2d5a696b5af8f09e9ceb0d12505de5029cb9 GIT binary patch literal 2859 zcmV+`3)J+9P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;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Z{uQ~MoNIHZd(2kGTK<002ov JPDHLkV1kSeO_u-w literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_split_handler_bg_ef_v.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_split_handler_bg_ef_v.#.png new file mode 100644 index 0000000000000000000000000000000000000000..d2223f0aaa1681c0d7014660927ba35cd90f22a6 GIT binary patch literal 2863 zcmV+~3()k5P)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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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} z00015Nklmo@^L#IeTM7H@X!;M!Nnx?Ka_U#=UZ+QyPJ^+F4CQsIp5}p76 N002ovPDHLkV1k42P9gvR literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_split_handler_h.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_split_handler_h.png new file mode 100644 index 0000000000000000000000000000000000000000..dfcc1b9384f3e9377f3ed45594eaefc1108ddbb8 GIT binary patch literal 2820 zcmV+f3;XnmP)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^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a!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} z0001KNkle`E#R%gt1BU=7v1JQ59rCECI3LSnMhXe^H!NMi$G#TQj_%m4rX836zQ c0RR630JC%*A9t|I6#xJL07*qoM6N<$f+XKo5C8xG literal 0 HcmV?d00001 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 new file mode 100755 index 0000000000000000000000000000000000000000..b8e86854f4b134ef068379f5e730aa94c49179a8 GIT binary patch literal 2889 zcmV-P3%2x$P)KLZ*U+IBfRs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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)NklJQ0K;s=$^ra;sJp<@g?7YitVmI;m{9|qGl44kKm&_KbX~^{00000NkvXXu0mjf_Etun literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_toolbar_button.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_toolbar_button.#.png new file mode 100644 index 0000000000000000000000000000000000000000..0a1a5aa0f74f7d2c3ecfeac22ea2df94e432cb5c GIT binary patch literal 5692 zcmbU_cQ}=Q-v}8Ym08LP;Y{OjWS--gNA^tCG2{obbMO-i}nN7@WN$zm|ucv!kJ-9p=7Quj5TBsxwZm#^!i)v@YBM z=K-|)4FmM^@T6cxk#KcXW2eDhh5jwF&aOViX024T8U`DEKd- z%+dP%2%NVgzYGuzZ~)6f_+_Pm5NWWyw7eug6bu1_AW#q(27rL!GB7w8!vD_@q;T`b zIKd5(sDF4-c8Y>7c)TYZ1oHLu1^P+>ao)}#h`hW!2n+>5p#Ta5z~?>|Z|4WV`Uw4@ zfOPb6@OJgYyW+6?zbV?;;|O>~L5igRx`Kx%8vSp=Sf76sMNt{Z&(0GB0fIpu9>4GP zH?$Al(D8r8_>a&&#`irPL57Y#ID)qW#U4&Ve~>A<`|p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 z?q?u(R^F5>y;!*hcSw-wy!DcnI7JuOI$zzQ6jsHds-!=UMM0nZAujq-KdV&hFlkcz z!Xwu|<7;ZZWu!>{(C+fyd{;!(O^*%p3<{b&yre>_TpR7{%~bDJJL~3#pUBUz8V|L& z{3jM2@L+YaPo!yu9+Fv$1IsAXhrvQ-9C0gm6sA9|uPnT)F8VPtG4v*+&^bCB#yZ$x zB-Q_T${+hh*6{t#l6%FXGCrnGG*U3glHF(07~b!8$ud-&&o^1-_7JJxkiA!{-RyhK zNH}d&>R!&s<3maDl+7K(r&S*@1&tK(HyEK-+^#9$T90<9EBxHYkSdtx;QAU%BrRqW zF1E1iLI&`{3);fIICO$R@E;ZV`D3m$Ovcr#55D6=LVBV`5w)KX8Sfp})PXkKRjb(?+4y0mogUz@ZdPT@X^==7yuSHGf!GO!NEhpiRaM<&23uEJ?t2BK zZW8pY(jKGwRMQT=5#%d(&UX~*%k7tSO|i88uuPy{f~A>Oh4AiiBkUVkXdeb zX1ro+bWV;EHGQqryN7EHXNjv%?{1YmboGVbBdiO^i*}voa^KAAH-Y%>+Fgh7CO8Sm zp@gxwgb7mmft${!Eav+Sw*TK@F~78UB@MGdSq>mHs96t zlaBA6p-;F^w@(n3AQg(}RK+V1Nm9@OYq+vf>S=@+GbuhWjm!;h?KpvqP?$71_qnaN zTOU4X=~C$C+g;Yv@AYjhtaC&7fTc{d*Rp5GjY_CNJ%@Fdo%djmaS-8a*j#io^SFD9 zv7oU4cg*Na?yH2?qAM`Wj@A-m;$V-3ghtR(UJTOhHmz`&WFmM&VId`IlQ~cg`ca}j hGs@Zb>1)&u0YKqEQ@3dcbbb5kg*LTCl_ET1{twwbN}m7# literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_toolbar_button_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_toolbar_button_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..69130d285cca600d42bcb3af6dcd158923847b38 GIT binary pat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K5yvA7i-@>T}U(4$!oQ0t{u;hRot`tYG{0_?C9vou2^GSUuvU~PG=)T z6t1kSpwoH<)6~zfoLxi49^a!{+FI6;(gqfCXP2%F4$+9r!3p zc=Yn{Xiy;=eCk!bE*0pqu0EX#>F(}k06Yo$oy{w&@F3iXK2$9>hjOU0>{@aIxdY8s zi{g|$HJVQ)quXa*?WQ$PCMbzU`NjL({n-Prf4aLk-lFtQt*ck4l25U6-dIRV>Z4Ua zz&FX{(I#|1Y9ya`oUTYFxdfu`@X#^P&CQJw;U8fs+;b}$X%rqwL@)Ydex7_-^<`8N zrS6m%-w&z}mY>&!6sN`VJM|F%!0F;!JPW_wi(QGPiR>j0_FwDReMc7kf-J;z;f{3iJIE?L}50&x&Lk|4qJ!Tafqtc1%&Qsbjs0T`H5d>yJ_;ThFHq4jjabxSokhc8@VB&NmcxIvp6mX4cA(h$ zg0mvr)+l@RWZ`(V)$Mkz-4k8Nidr`*ExY~na&EvR0tCOv-heRB(>IS#O&$5?+Haq= zL2zW#C{|pB2tH3cHh&qlVe$9(x3aXftmy0%_t_iIq}3)wUz2Zv?@90CbscQ8F9N=+ n=-#pDttwoPnS_NmPavSW^Z^V;2jWnF5djqiP5ByGi;({Tj0g1{ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/default/00_toolbar_button_ef_press.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_toolbar_button_ef_press.#.png new file mode 100644 index 0000000000000000000000000000000000000000..9a994d3b59fa7f906c1b690adb1eae55ebe61c2e GIT binary patch literal 6965 zcmV-58_MK~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|h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png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_toolbar_button_press.#.png new file mode 100644 index 0000000000000000000000000000000000000000..c0537e9287e418ff7ada1f7e0884ea7df2a5fa02 GIT binary patch literal 6351 zcmbVRXH-+|vJOa*5=20dCZUSd1VRZIS`t9I^o~G6hhRcSng|F=mtI8ay^DY#ij>en zdPfiiK}34L_?_=N_x?ER{J8I0d%tDRGxN;6GrO!EsiUO=q-3E4006*ysz}|-UhU6u zmF)7&HuUk~WykD+GWO8J+Ie_e<1he4G}Zem`p}FMcKzDs)E)}?9Jgh-Jt}bqP86P;;UwUOO$A6YZxj=u3csRqk z{zb}IQwM~=;xHfy5wNf=SP}w~go;3*U>Fo81QG*7z@iW_QLvOS1S}&VB?E?l{%%~C z)^KP$8C|6E-?lDia4rWA4|f?+QEzW=5pQu3EY4mO0)xRs!D6CfV#1da!gyad4{IM` zH$3-08ju*gEzZ&1!x8HS`lHd>2J7ho=elJ2FBe?hH8uaO*bV=8pe{ou>SOIL3K0Q| zy1M@H>n~}%hc4!SY5YfNyuPnHMpPGr$9m#yFZaWa`ycRS?EbrFJ@q$Ern3W1=+q$S0`Fcb=gfJh(_C@JJW*n4hx4{JAD%s+M=FYW$~Mf_K+ z3<8I-_Q2xwu~?UXGC;=x>w(2PVBJ9oJqZyA$jH$RjrGR=*`9xSi^Sj@y)bBH9M%=| zSA1n0|AT!gsF=7C0s)3V#ZiC!R+I!wz@So4h?2M%SP?1C^*0v%|B0FCB^l8_$?<=Z z<)5X?4E!_vcj{kG{#`s6x66vbU6w}e=6ELnz;JO7si^NWJ)7z1Vm{&7HMk*Y|B@5N zVDvCvRSm~Ys3wJl+enpPpGdyWa6ZC|3fV=NK^^bsD1?vzb#kmI>+Vd0C`O2d<3v>D zkZyvXLg**z4G4y40wdEy4iN-yKj5V={6hAC!Zz&%e`JEH+~OBt{=xjaoecZ{{9qnm zp?sfVT0KHJ_qyn(tqu-}I-_~*owt@qRn5`%{=xE4v*3)FjKqw+TMggdVj9O9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_toolbar_button_press_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/default/00_toolbar_button_press_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..d3340591479474fc5cf4346f5232b513363e49a7 GIT binary patch literal 5018 zcmbVQc|4SB-=DH1`;oF_nIVMc@*%rMBlWf!t%ne0RdA$wUO zvP70FN5V*vW8ZnF^PHad{p0yOf4ukSzOVaQe&6qJz3$KTxg!k?e&=8nWCZ{K9J)G4 zBl;Wt^I>78w{un3=`BEjtZha{6Ya?qtUDf{fg{@Dfx0f(`*^ z4vsoL?s&A10mjb9$xayuQd0%0cp>NnE_gB)=;h)}AR)YNfd1x1(EC59p&;PjB4no< zpnn-yaA%GKyZ#Y1X3FglS681X~VUYv}I*vlojDx%F3DwTJjp&igF4Hzc~IARttrc z(NIuU)I!OjWMs5uH8eF~TG}X0q#}|Imeu%$)g_R~Sb`n?mtIG@-hZ$P{}qeSa>rxI zM0X64==`e!3>}DMBFTa13e-X?03}Tw2{ZjkD%E}s=TJkbTWjGS1ETaVa2aEgv#0*L|2Kuu&{!g*|nxa?W z&+flVpFa5a=D`!_JI0;9HN+V=F8}~sJ-SE@jMv0+mbY`}j(68gbk{8-&{dH{$!}sM z?G5-_mA)OlAEum4$rcu5$RN0#(?+<~{%-2aw8{eOv2uah!^%@kQKyB&Ij*I^ou;*<8_X^hcLiT)HI0(kP z`U&i4U{oh4e0jbu%uI@#TU-+;8KwP2MK|$IWg7YQN~d}KVHVBgXlSQ(hxsTsao*2V z0)QEpuAPbLn(NB@(Cr#jsLfhX1vKpzD8ZPEiHiktC$j`g&N5ccaWSX?dQMp6we9MC zFN6 z!9$Wefeh1> z=W%e0?ctm3D0J%c#-h559S33^^X=c`wm4g%z_IUJtIML3Cmw)?%4;^kg5uE|(KBSk zXlwaU@iSDC8^?oCF3mTu&!Cg|oVi=08pS6^OFjmFs9ZCMH96ol)y%HC>mux2`NYUc zUhV73%nla-ep2#=@$r7itzos8@b*WI4;!=K@T#4**}?Q{a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#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 0 HcmV?d00001 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 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/720x1280/white/00_badge_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_badge_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..b97c41727d7fa1940e5499fcc87d6aaf38a24baf GIT binary patch literal 2328 zcmbVOc~}$I7LOGu2(pL*F2EQpV1+D0h)Ez~R%HoGSY?xt3?xW0F*AY4s~aE)B4Pza z)FPWjl(?YstOY)`qI@C+5fv4w2rd-_HG*hs-$cc}KYab;-EU^@y=Ttvcb0q3e3KU( zxMJpvc{6Z0+)Uq2o^tZ7Q_N>kEa=@m!C@%^Pg_F>9kqW}GByb`G_{v4ekPs3{ z)~#)Wym7ecNwTmgG)fS_5W{kUNUuZC$dwoxhx7K)C`IBm5DFwh$ub2KKYFeO56C1; ze59vrl+S9(me>UDw#;8)9HE+5Ol{h+>vz(RHSiNAWl;Z zTnG`XWJ**9D*!#CC=phpOg!f4#}MR7f#5T-0{N6EEM-KENJ%6UNJP0@AJ+$M1QkMm zyYWSBBy61$A_^e{R;$F=c_cYafwA2Evmw1A<_#lACBqIyl*)z0YB{7peYs3L_J$yl zNf;CkZ7Bt$a>z6;g$I(!bQ+b$C(%hf4u{M0;M1l!zJ%q|_#Qkujm=$3#s&|h(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vgR>mFa0| zX`Qu$#`8&j3r51@Oyf)Uu;JT^#&;fj+ll-IKjc@oZ%){so7`hKDpz;8Q3{QU6G(6J zx{j_WHJ<-`$J`^$WoD6ewWWwgsT}LW2qncg3XbEt8?(2Q?ni{5Q@`4>jqb>9ITKx< zNZ9kP&6pFqd&u$Cr1#F~toK#CsS9xv;M=H}*6FF_&6(&hs9wxS{a+E1>g z_OrIK`ktb1m(bFtu^vwZ79nS2trFfWXxvCT6kDI1GOPNuP56$}3miD^~k`uhVSU&^+Y-?eAG{E0?{P40>WN z5(RkjZkZF^Waqa~0iUeEvTI2u%U&Sh-hwk1Qm|AkeA({kS0min)@AzMw$xNT(9^PI zd#>w=n&C$aYcgj;EFF%!(XdOi>pQt|^SJRZ{KbCk^kar4{`OJxy|Oob-IgwEoN#hx zu!npt*MFNo@K&eO?J6lL@n_0A+S_$nt#(6QU5ddkwQ&qfU2)!}+mE&AKPPIW;wbTam#EfPF;6yDWN4sW=7{-9UhDs46^+h zzwtZ=?63*ARrWYKaLg!VzIBx#l+lp3!)HmrDbPKRe8SAyOT_klzkhvXqQFHXev%)% zwSGUP_|3UzHetP)CDyrU_*H=snhuO_^dGyk8uwELN|gRNUXGiND|A~hnfqHuyZ&Fr Mmlw#@vJ*1@110FWy#N3J literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_button_01_dim_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_button_01_dim_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..0f03ee958180518062a0b8c001692b37a5c48d7f GIT binary patch literal 3369 zcmV+^4c79BP)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&#Q1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nl3&F} z000AlNkl7ZBm}xoda@&B-tT?Qc%D#7F^&i!6d=Y~ zpJIFwV=o-`R0tuo!PHX>0}6-$rG_B4phAcgU;^)euYd*pdsOj(-+^C%_kgdIisG`| zKsE3k@Eu?ShK^Jv^f4(HiFJLT1N;R1tdt6c5K1P1-vZwQuK*8d=|zJCP(7l?0?25m zb3k6(MF{ae>6roi2z&;#fu@Ff8XS$-oCaV41;EkIF7N~3N&Uxfw0D02XZqRFwF$;Z zuhhLz0Isy-uQi7lTG5`I0Vlwpx)y#SN;SeZiW{<{fibI+gw6wh1AhPwonCLmD2Jo% zX&aH|WHkq=lv28pT3WC4g29L|hB6ZA_bY9;t?NrlA7>%pYK@yG)CGDN1N11Nz$eojx-ud>7?Y2T{%>AM%W(XegN)3qi2dVdI%al zGc@{SB2`1+NkY|q(C~%QduN}%M0)Str_Y(*Pp^^GgbxSxP$T^>k*fPzd%}_49JMK> zlz1S$6H~)5?wq|MzQ+`cMPZsIjYeZ)kSX!NI|Ss?}<01dv!- zS`sTOE14*Y?4zS2r(Unmn5Jo0tJRPD`}@~W+qPZDadzA7_DZ+g4fFZDSXfwSudc54 zq?AD}mwR-LUDr(oK_Ji1&$Fker-fdx_eHzie&aaKj&0j+TvG*j<#KuV@bJ*8*XwUP zozC3y^72W!T)rq23WH{|iInm`qYZ*U0JK`IOub$&?(OZ(A0HooZdulcQmM47Z-)Pl zitFp^hVT1D(==y2&-+pcF)yXe0Wy_({OlY>k>&@kQtHIAtY3ZKKQm49Vsmq|e`{0( zs8lK$AeYT%U*~eUyp+;Pr_&=3#$gz$AP79ybuW9pUK?p+a=UjDPwBMF#569( oJb?lrhzH_ZP<_jPDG~n+05{nOJ;3No`2YX_07*qoM6N<$f+u|9ssI20 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_button_expand_closed_ef.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_button_expand_closed_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..e0e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kwl=}1jwB^|X!H`Xq`Q`T|I=ceHC z;2Pz9(Uv2hpS(K4hX?jI`}Kwm4HZA`{%Bw*_*E^x6+K5n;}$zsIO3JYsI0c`c=zy+ QUCxUjCPFDc9-dbGH>IeB-v9sr literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_button_expand_opened_ef.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_button_expand_opened_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..b1dec9a6c38088d8ba92e59e8a546fca2013c018 GIT binary patch literal 1612 zcmeAS@N?(olHy`uVBq!ia0vp^x**KK1|+Sd9?b$$k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+n3Xa^B1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxSU1_g&``n5OwZ87 z)XdCKN5ROz&`93^h|F{iO{`4Ktc=VRpg;*|TTx1yRgjAt)Gi>;Rw<*Tq`*pFzr4I$ zuiRKKzbIYb(9+TpWQLKEE>MMTab;dfVufyAu`f(~1RD^r68eAMwS&*t9 zlvv ztM~P_^2{qPNz6-5^>ndS0-B(gnVDi`W@u^RWNu_&X<%$S6>8c?%;; z0~d3cUYGpj(%jU%5}4i;gkD3OdO=Acw*Y9fOKMSOS!#+~QGTuh*vnR#INf6Ciqkx( z-V~f}F?7SJS0CsYeNe-tWgk zi{sXRmo>A#RLice&i#XCE-&+5YVE1IG9HO-e7BrGbxEqgyN2L|$+_YVf_Iqx^!vWpSa4r@VCuO!cb~ZUBU1x5qXh0JC&g|b zdvW=1tH*AhbwwemQEwXM-`q})o?;h&aCTm|Uqj>u$9)Y^&h@>y(js=J)jzD$zRcWR zz%gCq23zC@$s2m>%zkhBGIhp6W^v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l@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} z0006^NklX3h8gd1pqtOYjAt68mPV8oL9_ zz#U-0rnEnvpfP4mf48N9+;7~#vC*Rd_l*Xof$O6H_l36L72D5sf>pK9Y&N%&0;_6o zDNjVEft$b{@CvzPzy8JEgAULju$6uimhT&C!YPGr$_nI=KExA=-sbjf! rekY&;+_uNDiv*c$eooN;8T!`%IQKsK(zNH@00000NkvXXu0mjf3qVX> literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_button_off.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_button_off.png new file mode 100644 index 0000000000000000000000000000000000000000..e58e522f4b77df4726f538ee97ed58254321e85d GIT binary patch literal 7001 zcmV-f8>ZxmP)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#eyhG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o_TBG%>&{*mXRmFa9<^=zx{>W;e>gcYj^?$_ zkanpKM#*GSTzl=?v{JdGPfeXRW@paorfFhXcDsq~a%+JlGZK@~fr{mp)Y3DDZuG)s0B!}2t!E*wx7FmqAV}!jM#k~~!E+!dp{KYjYt1hrZn$8pxY+!U!OlE@4G-?6M$x@&i3Td098 zTS=zU{|xM!*5^SB7C8*}h}!FAIg)>lfzF;W~DFm*p+YXoQf|>ve3$W5?(Y z48!~qaG-azHVzJe9|G^l=llOIozDK|?94QkN*UL6Vn{BNEO!}fHX7)L#o*9({2(|2 z90Z=|Xm{2@$0cj<+mC(YcTCgVJ2X7jN`+djM!0kmDVB}35@9Ho+D%qa zN~3?vHn#8BdBP8Zdw|=zfw67}cBvK1?;n0+$M^lWfA~7!&y`ZYT3lS9TwbKntYa>< zm|WSIHojxKHU#axlNHTsrBs-fO%S9=XR?^4`4iyt|N6audGum*`TpBKe0ktlF<}C@ z8@L0a>#Nl&l}eeg*+2?`lwrHt7ssaEG_%}h(!elGY}>)}1A-udrfK8AVc_BKAAaoA zrA%|#;W%${gVrDJ`8D7=Uht#R4!5yiBXX%J;s1__5kXO|+?S r#Pa`F;*=tm7>-zCIAYmA`QHHm8U({D(~VX}00000NkvXXu0mjfBBFRj literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_button_off_dim.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_button_off_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..340ee9da457aac25a76cb19eb0532bcecaa00ad3 GIT binary patch literal 6902 zcmVKLZ*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!B1ZZ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uZYYSs+BO&BULP$#>*gy&mwbn_cRNS(xu~aG*$HHG-;K|n))C}V4 z)vL=TXq9bjZ0tf`q%pU9zB*RC>N#s%xvyHaN{^0?*1lwTuqG~f-JApJLhoHHAmIh$ smIdPFw#>ltWe6^Vcp1dsm-hby0Hc_21O$}M)&Kwi07*qoM6N<$g5}T^DgXcg literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_button_on.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_button_on.png new file mode 100644 index 0000000000000000000000000000000000000000..af8cdc502709f86e7a12a3ee2009439da94f7548 GIT binary patch literal 6703 zcmV+~8qnp5P)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;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FaKLPU(yYw!WGpS4dG51KryHU*ZflDt#iLj z9uG@$UWY)X2>8Xw*$}lc5O2W>w4eg`1x8Sg-p^mOKmF=;?{_Lx|K132wKx$=*v0@r z5r8aZi|2$C$(b|O_j^ZphvjiH8VJKp2-t4>g7Ibr^hN=y!qJju6-nU2CHu20Ct|OW zp(DBJY~gyZcRdT=<5ks8r+YI8Y|q(q*Uu_H@jAFyT7c~VUP8d}qJSLY)>mI00zoMP zNL5*zJ8yqD`lkDTWay>r3m5Fk!T!LkOTWCBM4(Ke0EM`Hip? z{Hl^Gw`4O=J;<8ZP5?;SuHBR9PCnAJjqmHdQ*TN1(FR83t)(qsI}uRJ0W4cU+JKaQ z$~pv^r22K0pIQ->3_zL})3;g*S3B1PqP*~heRkqK=WRChi`-=PQ?z(n8tP+5G;ENJ zcP2)hg!@3>Hrm;>MQ=&;(z;syD?}7iN;^_Cg+pEZwL1z4*El3~TR&fE+Xl&ckbkyS7XtA_XL7`jIX_JH^S16`GngKrK|4tu zH+6%R04NaU;-nnQUbeoNdix*~)sLuAB1KI&pWWwB<;w z0~^x=)D!Qa9yiTtC&5X}MNCN8(q^|=l1N%8CKwaK*JV)(iy~iH5ZTf-Iai*MW6b<9 z89G&&FP$et3IKJi>mmTiO)TJML2QI+)v5a8;|rXG+vUWZP12SFLWo{S(Ip@f09*)o zO;l(f48`CQ81rDBV&1u8M2!QEW*Y!2YyA>d!b6q#G6Z6YGNW-d|>XJ>i zg!Rb*HO^Y1;XxXib)9wfa8VtQ#QenE&4;*(?QGX0U3dwgZF{7Pxc!)`8*jIt&~zK( fZHRv{?f(Y=iA=Sd;kSnV00000NkvXXu0mjfiv15z literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_button_on_handler_dim.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_button_on_handler_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..3ee94e9a17b1e8a932051cf5c8cc802a3697efdf GIT binary patch literal 6228 zcmV-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/white/00_button_on_off_bg_dim.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_button_on_off_bg_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..f54e048ae4fd47a865223dda5f91dab99fa810f4 GIT binary patch literal 7791 zcmV-#9+2UQP)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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kUfsTZJ6FzUFuZFg4+Ggi z|MzeH`TfDs1qlV<0kEHW<{7QOzkj2y>zCZytg{&>*F!_=TaX1PH5}v4!g|f-SGYPq1$iY zG{HG{l^N*(V7tEjun2-c^+%Vt;5aotb@kxrGBXr2w+@Y;e)b8aiAvkf5r>Q{zEs2b)+VT34-5JfQadqLC0}=~> z13)tjGy2hwf85*K+jFCB+lw6AF65W)1ArllIzcBm*J`y+J@DXzW9KH$nkuOos2N|$ zZOpekxZ{I?V-_T7RAVYwh^A@$v!A_J|KdM>ap961mh_a$rJ`k7uCD90PAMgX=vwY< zT-LZS#uCmsi{m7Wfn=Rcc#_St7UoU!z?i@GL%H}|&xz~Q)zUqV%c zqbs7*nUD8Ac-Lf@Dd`jM28b($BVP;2$K}TV4*(F7H!}$J+a>@2002ovPDHLkV1fpI B$&3I1 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_button_on_off_handler.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_button_on_off_handler.png new file mode 100644 index 0000000000000000000000000000000000000000..725bb67d45cf8c1cad95f1062b59e3a9cf8694f3 GIT binary patch literal 6277 zcmV;07<%W4P)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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#fknUx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F4<1aww-d>G;=dErLkNtfA-yD1IGpjht6?u zW&^q6XKWfR18;WE^9PzLh3(F=^q|m7AGpt vrv%Bzu!6Y*kNzx@iGh?*PQR>YY5#8k|0{H=;$Pcn00000NkvXXu0mjf**gb^ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_button_on_off_handler_dim.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_button_on_off_handler_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..e87a16e42d5a1ea7c9b0d7d775b1b6969f5b6bbd GIT binary patch literal 5962 zcmV-Q7q#e#P)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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?wV3fxu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eLVpSks!8u zJo3hk=d|_rB}3tG*cb47iO1uCqPXE!T#zN%ktTDywr*8jblq}j#bOcJ+?dD^TL{Dol7;t;Nt%{;3vM7o~l0?Ee zIHe{t43idBRiB$HXfrdJ(notfo*Nw8Uv>mrjbz#H*eqlP^+Y(|&S9X1MnQR9bm+*_)-c7w%*C?@R1_`WzMKrorx|sHt07*qoM6N<$f}@I4m;e9( literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_button_radio_Activated.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_button_radio_Activated.png new file mode 100644 index 0000000000000000000000000000000000000000..e76b7a755bd3acd1180d07092a00ed78c8736d9c GIT binary patch literal 1802 zcmaJ?3p7-D9G*=IC*`%-RdM%9+gj#nh8Z&^jK`cBG($r7jO0r?w>3ZtGc6DVr6^D{DhYXiLh{CTs5q?Vgjp=id8&obUU7kNV031rC*82LY*s1q!J=B2VEC zMM%Bl5J(W`<1dbj6w@Uj+XY~%8JK_!LPdaDwoR^Ns9E5YE(4ouw+SFH1wkWO;QOQk zd47O9j6eVtPq7yhNhE+q!;>7SG#becAQMSs0uj4u_9O=emBt`D0@D|WMMETE3_izm zIu^EKfe|RGU=Ro@l?tz-;9(@3K%&#>S`9MU9z)nGW96twZ7)|^&nR#pr5KSaP$?`2 zw2GooI2vVvSf=kwkSS(m<;v+cVGSdwMG685Pt=w)1LX1kA1ag0qLnBg`jGEOg_ZuX z3W&gmlyEd6#ttsbS{q8ia7Q2!3M2k7yltk7ei1MVDisWL5%VB|-0$wVWFvvs)D%pWdqdU5CNF)z3-GSulMsy=_oX8Za6WM)+%Yntw zGDwcja3vqOj&pLgR*)&M$Q%ff#y}EJ1eO6)B{QUR=i)G@-ZWP-cP`X9xdbd3g7#ql zbr=;%z|fcd17BnBA4Upum0_ihujD=S2NuGkZZN;7?kV? zlTa(irIG2&?nTn0+2L{dE%M4@-uE*!-q9g}dP~?*9Jf z8&`~nCXc1+H>ZTKvW$|`Ic9^AHCuuXYE&!EKk0uF?VDke^r9s^ZyPpWhYt z6^h%-GUjzYNK7i#6vTzcrI6nQ*rUL=r-7D)?ebK=C?JJwK^`&+8NW!v!(rt za1J*WREECtIj}Owt|U}&wsG@5a8vRgqh9h&v3`ov3g=oi=pDIyP}jv#)*9}d{LpAr z_hQ+W#>(M7w6?~tC!t=qJx@t|g+ zr?9EMsex-Ar5I$n#9o}_Rv)_GI-0fL89E=73RM;`k~^OrwFn$MT;o|G!*3n09M-Al zr{?6aBu^TNk3M;EJ=3YYwf1zvre*BP(5yP$#Ja_lLDg}(ai%cF)8rsft+~oP{PQKA=@2QJuQO8b?A3W)N_p$8HI>C6arnlKUUKDK0O<7&7)~~He8qFQh`#XN~ zvX>2KVs;SZ@mWugyA?uRLE%xB;)#g!F;`j)5IY->o=m>K==-NN{!1@yOjzI>8&x$H zRT0215~JI*+D0G$mDcT2`R<%)QE`j$dbtTlYN{8ibA(go6%u@m n?bRxhf86PNyyA_o49#1Fi<_kIk`zPc+P@Rm!-rGowk72saoW|x literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_button_radio_Activated_dim.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_button_radio_Activated_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..d82a2d758f2455ef48074014d102ccc9a49ae983 GIT binary patch literal 3648 zcmZveWl)q27lt1MX;`F@kS^&ISXkJlyO(ZQLR?BI=?)3$SOk$yK^7_LhDBOhT0lSv zLGttc|IOU@xqhE(=FFTpU2PQ-!pDRF0FbDuD(e3u&p!dUF2q|ihvJwD=i!f$w6Ebo&d zieuwPuGa&L-R9aacE<0T=H+&)Pf?8%cwP9!nX00C;-SP9P^L%UBL@2h*0%)Y!wA_u z05beW2Nv&JHZ0&W7z}>O+J*N8!19|W!Uwvv^16f=V(vlv&>Rb_&`7K_@R`5 zd_WSk6p&ZO3Poje8UTejfX%4A-6o*R57=;p>`VipsLPx{EWkXSg$k=M6=0@tj8z1j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53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z0009pNkl3TZPmV`~V_(zSE8LL2B% z$doA%8Zg9#F8KpGc`BtYxMRT`yd<{lB!eLl#ExS})}5p~>E3%fRQ(ZXA&pPru6dqS z@Z9@(-n-|0d1OR{H#HpI;848c6|Z>3D_-%6SG?jCuXx2PUh#_0RODXQgKlr!o~n#h z=8R)%#xXNMdH9nrvFu4K+g{+^yE=FE@O7=pjCzK5eeL?>bY*(p7k{=HG)<%3V7t4` zLH_`N?2jQQe zXE2-?JHh$M^PCw!6UITjbo0HN4>F0r^2?QrQ6ZYY>)mD3+a!|c<-S9c#bZKqvN z_iLZ0CXW2;arP=92*xo`pq6gD%XAhJa(vLgF3z&~OEEZ~FeOGulaQ-8My zunYD%`}`nJg;y@XaK~j=gnhoZ3w9(^oskVQ+^^h=Ofhe!4OD;vU|yoRg+ur=5e`_k zx9qQ(o8$nvU%Ka*;4)PTX2L)b$OG=*3L(Rt9{k?br7h4Rq|K6Du-P1A{aJu7+)2im zr_3xRj47GF3h>7(-UsOkbcpG)LBNV#wAmhDzEFhE-70zN3D_-%6SG?jCuXx30AbuMFaw1;dqjX7R00000 LNkvXXu0mjfnGw+% literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_button_radio_activated_press.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_button_radio_activated_press.png new file mode 100644 index 0000000000000000000000000000000000000000..47a5f30739964348ca38cefff88746781d2709d6 GIT binary patch literal 1809 zcmaJ?Yfuwc6pny`D54Z9*rGA0phA+(3lfN!WP=0^U;u*;AWO0&TSzwDEJ?tTs^9}G zTF_EO6lkS@6i{o$2NjfxfCXg+AH_k0wg@W4+KSqOb^~JjgSvBf@7=rS`_B2!J!dvE zJam~3Om!^P2f1e$=GAPgo6RA@X*mS`b0EQ29c z%E!%c0EuLsfJ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HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_button_radio_dim_bg.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_button_radio_dim_bg.png new file mode 100644 index 0000000000000000000000000000000000000000..bdb1db5be43daeb86d28a7d6bfd5c245e186b2d0 GIT binary patch literal 6373 zcmVj{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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*?vuTf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g`)@JvO z*1I9(jxMzs_xBGJPnc`mH=^{yzLyZ8;j3i00wbRA?)la~X>sp&# z0I<2mNd)nQ^RG_>_!SX_uMOYpilQbFAWwE7wYx; z#ZP|!QH==QLX!Br9EHWEw& z(;^~Rn^C9RRe5#Bg^9VjxfHcM65XCvn`X&R~H!bW=N} zm6@EGeFfFyWAK?p_Dp3d3dR^H6QRDef;)>}zRfryaWjMFsb-Bw4PJ$vr> z$yZJq0DlXhb(jT7e_E^6=03gp`};(a7Lr1UBb}$N39vRRdhaX7MAZ`~CNW;AB8dpj zIk;Xy(q71VjBbZseVVoIK|xXvya?d0fxKMh zFyRTn#agZQ+U><#%R4(;twNH7C^A9yQbi$T6ucPcT?N2oUtd3t4UM3`e*nc|3303* zIL8nI($wc=Xgk~3*j&f%&Ncwti=w!$7?zcS_kl!!Zkp|tqVek&-khABoh1POum^tF z@O$lh0Df`pv-zc)Hy2itIQCH#iP0>qSP1-}2+>;C7eW{Sq)!Beo|?MnYy$vGgboq4 zSn+0LOe@cpFhp|b%z4T(%bjk@QIsTSPQO~6oSfVO@Xr7`Pn-YOf`5u?S_SYIckbTt z^Yd5hAvl}FanRa`F-n+7a#b}?bTX636P)0e<)_?R50FS6#=Q5`O;b)&%coDB8GrTF zvnK#t0`OmttGs%W!uwp|dz~5pKL+rl>o=}9KL7mMvQobB8~ydkOOV`IBBS+U`lr_JvL8 n+czq|h5r`*TljBE``-ZoV55dV#pQRP00000NkvXXu0mjfuC@`3 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_button_radio_normal1.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_button_radio_normal1.png new file mode 100644 index 0000000000000000000000000000000000000000..22df054528f2874d73ab8cdd783bb3c3ff5a83ee GIT binary patch literal 5131 zcmV+m6!hzfP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRM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jeJh tB0dfr2aW^Bf#bk&;5cv`I7agS0RUMU0W4&B+4uke002ovPDHLkV1k20upR&a literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_button_radio_normal2.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_button_radio_normal2.png new file mode 100644 index 0000000000000000000000000000000000000000..7c94db06d4c7ce4a0fe3c26bbc73d2bdaa814684 GIT binary patch literal 4378 zcmV+#5#{cQP)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;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Sr1;jcC9m(S@w85gDovB zSKV&6cP(~2#u^$Le)4!cH0t_{JwHD`T3cKDc`z94y>;u>vLr=zq8jZgex$ChuKn`m z%iqYdtlNLH$Kx5?xpQaJ$jC^K%jLQo&Aq578;A^GxUR15OQ+M>8VCdyR=d1iE?4*V z?c0w{OicXla=HEzMKP)=6!n3)AP6Bs$biG)kh{CP|7>e(+p~G|=64u|F+@}1Ua!}E z>eQ*PPnRyfqfCU&*vMt zbm`K?hK7b80Za}J4NZ%ph^LitOb)~!nIja1va+%?0M?Y0l>8${j+9hXR5)^Sa*9(@ zQf!ZJ{sn_Uug~YZ<8rxr&zw2)M^8`BIDkpF+dUZy+}}pc0+0$I z836Y0-*3Be<;u+DhSf}`B06MO{ UNGcW%6aWAK07*qoM6N<$f;1gLqW}N^ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_button_radio_press.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_button_radio_press.png new file mode 100644 index 0000000000000000000000000000000000000000..14357c323365889d2ae3553ba30e8755cf0ebcf0 GIT binary patch literal 3620 zcmZvecRbXOAICo;ppw!dVH2X)j|4d5!@4{_q*8hRbN7vF1 z0Lbb8GXap5!vX*x6E`UI!2?%se{VlmZyzo_D3r_Rske*U6K4PjTtb^8Vdi^GD%iC% zh(Szvih;KoBPo{|BrcpGiC>tTj7C3(yI_&gw3}8-i->(FKZYH+d$Q{~m5rcgL8(ZS) zC=jm?Kto#Z#O;UUApkDIl$Ay9b&+%c1cB4!q(GNZc9#T4G@g1Nl4(N_{+gi6Kk2>! zX*dI*9-IIv0@Sq$!qFN0=0H9XU^nXMun9a61MCD|?o0#W=!?t{0>C`PU#>eFnFjTf;`<=x2dkzkpH`^2CKI#Cl;U6}6BMPo( z3s)iz_q_SQcSPj+m^}X(HqNDvTD<|t-&=y8`uvxTR>8aG#l`Kdtp)u)h_(F)JoE-f%#l6r*FA-ee1^X1I2kYnOK*=vWDokX4MMsoZ$=k&ckJ%?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$UNK2h8mp%skp zmNV&d*#7)bcvopD=l)l!(JA?ARb2a(AMQMq6z#cgl4FqfJ+ZpS+dJ-h`*pPKd?b3v z@zbOlv3vHx&ibL6FIBCzgX2UGHc!2{WoE-`k#m{1Ecco1@c#ImiG6+JKj}5SZ4IUu z4K|2Lab279$x3^%ChHlO%LjB!M0;GOf2>Sto;cfkhVHg2)%;hceD64KEIsFv(1Y;3 feQsC78yFcf)0c2W&IvyWDk3~x{an^LB{Ts5g_n%U literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_check_Activated.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_check_Activated.png new file mode 100644 index 0000000000000000000000000000000000000000..b20372ea1164c824b4d443796b8e5563f70d0783 GIT binary patch literal 1758 zcmaJ?3s4hR6b&EcqaX^3AUNxyBdGZTfdm2q0Sq>X5DZ!@EXfj9Om;~Y5Bc0|Dz1xM5}BOz5nrGiK$MFr{r?FIomQ|Zp#eV;k!-23jmZ}vz; zc&L@7qa}$%vf^#yMiQgH;Wb}Oe1&l~y~N;v2gl%1XdY`Y5o{94*I$J}qGT8c5?~1;$GutFq9 zFdRW;fI$&TKvQuJNJRSX2vTfbR;HLu6Ok~g3c{##3e9k&IUt|^|4^xP9<9J5;rH== zP*@>I$6#tCtUy!cBBF4KE(TW^J4g;gI4T#Q=>EAZMkJv)sz^dHASj9nxC#-O7*#6V zX7GGIn1BDdyaIyg^k7Dyr@MDBBbY(wy0bhy7~XSS zE-Ffu!ZLi0D}K*qEyy*rf)pb>b747>28%=Fs1%qvG8KXouzpE$0t}X7mx$&l& z$6LMbuPu%^sk@yf*lk>Y$~o=+8QV76P->Vhz(ZbfY^Pc^b(s@Hzfl)K(y(TLAR z*Nn<>rT_H!liDxWA5ooeTh%Z@^KEtik2MUY*iRXaj9<4;{0`Q%sLQiD{_J_3e*6~r zK>gRiK!C(eAAC?-e|efm)TZ~7xCtNq`Ab60s!PIEUPW!&v!uz{ zjuU$we)P>AJA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Y5aA|Y^ z_sC08Ty}wr!NL2wo|m%Zs5Uh~&B=a7Ns5xA1XTMUa0A1ekH(jM*}2gG4Jp|NzLR6# z8IPl;>wieeK9p@N{aU*mkj4+DKp%e?$==rvZyblcMQ!mGZ}Apy@fL6K7H{zuZ}Apy g@fL6KV>SK^0FLK@uw7c&^#A|>07*qoM6N<$g36Mfy8r+H literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_check_activated_press.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_check_activated_press.png new file mode 100644 index 0000000000000000000000000000000000000000..166ab4a954c012cd97f8e3398d95b8d680b9a12e GIT binary patch literal 1717 zcmaJ?3rrJt7(c+-ioom`0t#|gH&LY5Yw6Le6zCH=$0M{6rc)^GK~LyixgN9#Lmr!i zjj`!~shOG17@cF_D;WlK)RDMH1f81*(OOZ&xjLOr1Y~np9&X8)m+$WX`hLIf@&CSD zU3zMgzwaVn008_o$;u37Oz^zyxy&~+d%-nk2&Gk7w3f`HZF&j=WJWR<12txSK9+&$ zjip83VQ~Q9lZWfF=&Y32B?i*W(|dGycC&>+13+AY-J&-XU^JME<>Q2ud#~ebE{GeY z+)PmlKgFWJOnCAZ3e#>$)fu)F7*HcOAs&pgOBez(M(aVlxsb3*>{9L|uY{Rxl>MMrKE!jlEOd{PZ(|B!!U>-JUB*#An#`XJC1y2H zxP`_^0`xHIbID>_%4IyA3c+kiNqI(0Sf>-kqztm_EfCD(LuRulu1Rexoq_%1#;n>_ zU8x0wGB7JyOc|K_$Xhl8W^(s@LmoxO8%Y|4Gnb+-RFZ~bGe*!FrIgE@@Qk=oB2%dO zF?^*QMipw60EXqV7@1fGD-k4CE>_4@GaR#FV^KscL=jY}Kt(XD637HX5sJV{zDfa$ zgbLvdRzp~6Jz>CR?Ba~wX{`9USc!td^fXE7NV0II0@6(+O<*~iOR%G+*4TN zEIEr&2t8p7;Mo7k8N@gPd5Ys-#WJ(SRG?@2tn``1v*y7Frei3kHIUT@9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+N-D6qP^MlSc5%9TrXEDn>X(N_WRc(XNM`hd`UWel2j^* zWm!Zbk&bR|QcB9@3WdTm*7A8CJjl{$G;S1&>*crlf17J27V!S~_!l$jlka^crQ&!h zN#EhVjt2f_0_xj!O63Zc6{GO1xR}ZOavjKPt)&-ufWyFGZ*T7>qobdW4-S5KKHlG- zibkVWr-OGKN7~hD`N@;jKbM#9XBv&hAHZM0w&xw2@2+2E=E^kz^a1Yx9|7+IalqwcTXw?)4tvgA{>YY5yGn X%Y7Mhyg6Da00000NkvXXu0mjf@HzP2 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_check_dim.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_check_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..0854732189a5a0981d3de2908d5904337a7b2fea GIT binary patch literal 1837 zcmaJ?2~ZPP7+#NpQbnZJ8kBThwM82e5=cl=QV2;nltj%TQ9DSE1tKQ9CJPBcK^;Xw zP_!zCN39ABsIejzMU;s;pv4mgs0b3OXa%c5##BUYHwfApOLyMxyT0%HkN3aX%tfN` ziEdtQ002ykjNps$KG^w=bHTsSD?B>zj(`c|m;{N#j0!yraMg$s1|zkKcvuW8)G4d4 z!a)Eq2GU67m|PgeRv}ul!igc9v?$I7fS_O#s!%1u7^sBfH98LT>|6~5YSbJknlAJc zqC7Z36JgfF60=CEGAF87YAEA^HOcBEdBuTHr4=!$&(-g|)>0t$i=%om*s(=>CpoR%pOfHWR$P)zkGlsc* zM3tn4b=WXh{eepzk?Sl4Es9&_!+K3JtPay7T5vFAwq`_MLIor04RO^Y`Vty8BA0?Y zLvbGLzYcnM39laK@O|0hllO%W>+ovV<7K^|?z^w>+wxN+pDQ)BJ}HbuT0^GP)w$dy z#Zbpz|DEJ9ZX&;^#c^x9SSBkXzS7J~%4{IXyae5UB^-fdf-HT)q_YR-U!TdjbtHG% z{R>lF(+EcwF>`K_hzEuCd^uJT`PiptJHP!C?w#|dsIr*a&UXkMZ!uH~H%lVsA z>OD`iB-&@>DdZWyeZKem{J5u&Pv!OR*ibW`d9yDAswXU-&;aJ@&qj%E-dNJv)4S=! z`lDIeC28wr&&TD5R(9ALX862ru3b(L3k!>M^%nQ1fz!6X?)&0|*(-nZ3*Z># zuuu8SZ)m*(YlJqbExVt2y8?CGZyp$ZrpjtgUAl+3aAOjO#wuMH^@lk^BC#HPnb31- zx+NNwKg=jA(^^Z*!=GM%ko-%FD5?>QJKgRUv$MLecyd(~&tBTYzRjE0wx`N1gu}eX zo;>!#`0AKDMq_iItt(TKZn@`1ygZ&A9zTZQqSNOAI6kwNrZ4ZMhUja|IT#WKMdh0b z(aXxrLK{DF&TaYgD;oG&$$3t}a``L5l%`^918^%UPS6W0^k-UQ7({`*l($Nch^*dYba9}taUZMj^()$b586sdo!E1@}F~A z9v-KpclL`ky8YczOPAD$gcOWppu>5yyXqYe&!xW+Cs%H(*hElu=9+s&qY@T5Mjx-O z>W_)7xzQI6uB$OwJEqoZVdLrind2^uSt%?Pc)P&Hb30YyM7M#Cm1C!GET42JTb5tQ za93u^uDodLDvyg$-dPJHP1Eum1@4?N9CT?~Ysq>7_Bh*GY5DkSI9JkkwWg190b&Ez U?@~@rY;pd;A_XG8B{X)!KQ5r=WB>pF literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_check_dim_bg.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_check_dim_bg.png new file mode 100644 index 0000000000000000000000000000000000000000..ec7ad7db8d5c4ae66b4ebce6fb52a36a549aad52 GIT binary patch literal 3670 zcmV-c4yo~pP)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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%c004NIvOKvY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ZVD5dCnu3>0s1OQ36 zf+qyM0|SGg^tNe%{~Lf?3=X~qA?S6@_5dP!Gy={zAVKrT8An9d03hN8ykgrFT!f^k z&5eswA2N%4?4X6mO4`5UC6~d z@zmSX34(^TfQ5_OSxb2cEAPX@w6)T3^@sU?;~(Cqi&3K2GACKjKp~ z0bVZOf>J64-;6PoN){l5?aDl3^eUG-(YkxO5e+|SdhplRC7hoA24n2nmHC2co^Eb! zqiC9-lr=SQN*Rhp6PsJxD46D{EBMsPs*%a;VE-VCL&Ip=08q+sXc*YvKR_n4gVf5Z z;VS!F?wIEDg}sgMKVBwBM{s_2hIqUWot;sH!(k{&oynnA0&61wh->)caTQzTP;c46)8A+S=P18u(86`uO1V@P1mp9%=s!0BI((&u0sGBLDyZ07*qoM6N<$f+AnrTL1t6 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_check_press.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_check_press.png new file mode 100644 index 0000000000000000000000000000000000000000..9065f6722c8b5ecb5e3ad54750c4f31dc1d13736 GIT binary patch literal 3358 zcmV+(4dL>MP)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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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rY1SUkLGbR%K6;WZM-~a#s literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_check_press_bg.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_check_press_bg.png new file mode 100644 index 0000000000000000000000000000000000000000..cda624f645facd1e61ef1c3b5f68a5f3072ef89a GIT binary patch literal 1925 zcmaJ?YgE%_7%r3vV*^oO^KPu?APi_oZ?uI9ZPNl`0Rab2pe=2Lf^E7ql~z#@1O|Ep zKwYwiBs4C2W}#YA_xjpQ8*r4s^a#;nUmzZnnt`6q;B2BFdG*o;&JF2JWGxtB)$?&MSuvkJPnCO!aco>oXM`B_(7j5NzNQ0%`=80|xb4jgD*JQC{eBiMeeXqyR4< zcqWhX(y2sA3?M`?1YlC>{)zwy0$406#9*>mkRLz`fM{Rilu=Nhr_XH&}jYy!e3|9;Bte%Mz?rM0Y-ER zOr^zDs0Oep%2QE2&Z7{Xz6?RFl}KI-Yjm#?MWhTg$h9Cu4FJ_@TU;;DIy@Hn*Nr!# zb@4_m0>&abRF5f$^H{TZicIA0?S^bX!W(WhrXmhSz7|FmdNrcKBVZnd_(D~xlw7`0 z9KZ;G1rSFl7SSL`z-RE;d z+%LJxH{^^Vq|-Sp4h;(YpPYe&GoY58MzlsPXRaU7 zai=0+e!QV;&=i^O&YzY0{BKE{gQ>lXlFCdi$h%qlPV0iL-j8mH?(u^kx2?C{JSS+) zpLuM5c>kf1`1nU|tpYHQ;9UvM*OtM;eaQl^ zmM3S^Xgj9WOUYIBLCsGx7Wn4>SY4_oMeNL&6Xw+E8ZtOnR=O$u((Z#p&##Q;i~VxH z^YyNdi8{dOI7KNL&zygU{u{mGWKYwRQ%8GdoR*EoWAFKjisMkebaF!XBB`O~v_dvzNk4Pja7 zXyad&%B1>%^M9Tee+OP~xyiUY^gS$XFJ3(WcVFzBZQVj|Ee8x&K1)saoVoKf*PEVS5SMYmM^W1c2YsIHZq@~te7tG&gOED+OAcQe zw58*hzV<6yo}aNOu64AqHfN;oTIe5-bBv`(D^AY-WM<>G{yoEpIocds-g}MFYc<|I z9^F^J$nj2XlBfT|oTboSlgU0&dVpNBlC&pqPspn04mhF95XrNlzK+qu$2eP0qYx+mA6q6a{}JkmdaYHlhm` literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_circle_bg_ef.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_circle_bg_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..94381203d4d97c0922ae3ffa2d887774c8f3be06 GIT binary patch literal 5258 zcmV;56m{!~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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`;qmVv-FXN`BV7QDl#T-p~W&$Kc*8f51;n^bc zYU`GHIYa>b6#uft=R>9l0@FQ z0I#PY=~zqYLN2{#&}2C1wTJAXd%hDB>%&bLyjiwgLpPmAwH6IYmiV9~mZWT)qII7r z02QFC5L%Vr&FRkiw~0I)ueMqDxLvkW5mb6$O|p=`$4plZ649B1!R( z?V6xhH~sB(yyC9K1Qae=3Q?M(qH8(cJe4c}3ew>H)F%l@U@>AWfy;jf0BS!}wj+$W Qod5s;07*qoM6N<$g5F%->i_@% literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_circle_bg_ef_dim.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_circle_bg_ef_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..8c2ac623eeee61568d780bb0dc51c8641065ed78 GIT binary patch literal 4954 zcmV-g6Q%5lP)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~{cZZ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(;5d|ho2a{(B1m8^mhe%Zq40Lxm2+W?izPM=P&FrYwEC@^5y zeS^vYu{%?l=$K&AjvQHMh5^1Mi{N)+gC)MK_jL;}Gf8GGrN~UV=oZLY;Z|?Iv+aOb zzriyWphMF^3CuYhlTPSX#qMRsN;1!!v*ktSvJ+1&*hT{1t_@^gDk;BCV_>m$$IAZ( Y05xtRh|HF(TmS$707*qoM6N<$f+Frft^fc4 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_circle_bg_ef_press.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_circle_bg_ef_press.png new file mode 100644 index 0000000000000000000000000000000000000000..606c599da131ebf1da10702d0e2981420b53127f GIT binary patch literal 4876 zcmV+n6Z7neP)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{j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7!F3@KSMJZwqQWQ7?s#6RQ2xO!re&k73CkuAUZ!fkx?PHZ-C|mtB UM`8c$4p15D>FVdQ&MBb@0G5grg8%>k literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_contacts_button_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_contacts_button_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..331108dd96447fcc2a75d7514968226094a793f5 GIT binary patch literal 1449 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+cK9s8oC-;I-5H= zTUZ#In3x)x8aSE4^m^tMmn7yTr^4*b1lkMLYl2s=m2**QVo82cNPd0}ECmE)tO=H@A)SJ^w1A9=SXr^z%=7((cS$Zh^+!1E!77Wmhm=KX7>iSARo>(!_$UMHTPA zR!Pq&Z}1nM$Q!ZpYStbV&)qY9mUaGAUA4zB%wwwS<(DPeB3!WvI?TE%ulh1B_Oi&E)+H%86R(SG(^<56Eq zZ{)$e46Q8oh`AREqs8YaR9~F?EP83{pDX!o8ymkb)_c)@XdjCNgCNVUSqHX+bb<;` MPgg&ebxsLQ0Nzp!1ONa4 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_contacts_button_bg_press_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_contacts_button_bg_press_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..382a274242f3360ceafe0c617801588817d8e90c GIT binary patch literal 1461 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+cK9s8oC-enY+3; zTRIuL8Ce)QIk}p_^m^tMmn7yTr^4*b1lkMLYl2s=m2**QVo82cNPd0}ECmE)}|bKS8Bw(UHk7EPs75uQ*rd z7~Aw>!v2GcoXZ8jU2t4z!2G^eM@p<}1E1HkZ+nbRZOVFdJ(pcBt@8QY^m*lJ(<*1I zTD7dM*YKK;liuYcK6jrPak(i8Ue?eR>)tAE_WIbg2ImCUhy`=xWK`Dj*f544h&FGn zd!Qk~v#(Txs$IImf#EG*S~Y|SE#b2(|3>2-OLBAGj!Tk_z{PO*eCHf2^?Sx)UyyEhyLGv@qRoS;B|s`)wa{*Ea8PEB0D? z$!N+u)2E+hLSFh#+*Frhm2^t?lGwudT%k|eio0Ugm1`AuIIm0E|M`!=Z7xY!hxN9v z!|m*CmZ|2%wkAebzjNU{eu>Aa`GSH82k#+2Co?Ag*%k}Astuj{5;zv8EZe!Z-1ULj zTAuZfobn}|?#j%MzNS^v^6{p_`vYB9XYHwHLB)ls5Q34A!s9y_m(B?@J!Dde?8YOuqFm arvZa}_z|C|eczZs1*xa2pUXO@geCydDiT5f literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_contacts_button_focus.#.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_contacts_button_focus.#.png new file mode 100644 index 0000000000000000000000000000000000000000..bcdc058684bec25499181878f7eac5c7423c4662 GIT binary patch literal 3014 zcmV;%3pwKLZ*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$I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fj8IsCR#k-$2E9U@^#p>R zP%X>GywRB8iN@JD7xl#gB3GT~ics#-fR6H9P>Q$!oF|?xeRuOaSHoaq4QU`dz|f5+v3Ai;{zRcyNTO+%=d-GPvUVxjAra- zZyR?MPiIRypWHgodwI_1S6gom2HwwIe{SvQ$f0<4c-z>Xvc8g%zN;r*yDC}Bc2UF4 z_nI$`xgH)jXId-geX5nd-+p;^^}-ER!n>JgN|%N3uGIsJnml^p$CeJ1^Mrexb-W^e8>N@JQx+;#l*j%Ng%Z$@4ED>LWOOKHWHWk?yT9 z2FiB!`?{5Lxs$ykbqki=bp`dZqt|Z*YKne*`x<`RAKL$v8(*+GynW#4DOA3jD0kId T8@Rn}h4bPQv3hZ^c6aYDsSI?K literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_edit_group_bg_bottom_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_edit_group_bg_bottom_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..21c80160643b7e1f1257ab0461912fa677e5e0cd GIT binary patch literal 3153 zcmV-X46gHuP)pPPiaF#P*7-ZbZ>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 zf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ND)J)Y%0y z>zaGj4rA~EfE%F(3!T~%7yuW84|P7LU{@#BkN*n$I)Vu%ScB~^TQJ=*!2}a*DXip# rl9N^EF|Walukq55#0CHW|NjF3gGA)6Jc8{b00000NkvXXu0mjfT|Ql( literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_edit_group_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_edit_group_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..6929e03fe2359937158692f5fc76acb0c31cf42b GIT binary patch literal 3310 zcmVpPPiaF#P*7-ZbZ>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~|c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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} z0006RNklVcG`G~1 zv4;&NC^oGq@jn;{eKY1oL;sEDNx1OcgK3w_wQPu{7rqZUaC1KQL=b7| z_X>hB07U@50Zg&FHT828{hZGaI|sGTIfvue=v&?UtNKNQ89HM|&3G~wKuj&_# zzSX^V92=Z-0N7syR`9$B++4TZGyPQ7$_HEdoRlJ>1QEsOB#JGPaDP50rL^+F)|q}P z-(0s`&wBuX!aP`va}KlJoSYnKyHYljB%&x0MV9TA7kV>7L{TZ5NuC^OyJovN@hcY# zf)yRdhF-16KGeplfCPXWQZ|#+s}*|J~mFr_O6XtX^j_vWJhhr|^;= sdo+qA-^8tY4g6eUqqxW(hba0p0JRKud+O^Z^8f$<07*qoM6N<$f_NG)4*&oF literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_edit_group_bg_top_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_edit_group_bg_top_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..8d15a9428c5ca2a36830c37918d2259d96fd075d GIT binary patch literal 3129 zcmV-9494?`P)pPPiaF#P*7-ZbZ>KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1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Y3QbDjEt`~-oGs~YhoXq-P!Y8Fvb9&@e`~W z1Q%>p3xBK+WKC_C>NTlAL@z{?+ z*VW2WwUQ?yk%)wZ_Mi~2qli+qlJ9l3@_IQxMJt!(VT$Lu(1(3FLS>Qw{Suv#s+GJx z?8~0#0)WE9j?RATtDRPnh{Q*sIGm_3Afnu(Q5-I38Y2Ur#S_D#lRAa{|6iHHQdkPR1LnTJflp$v_|^CcLLUPF9ZI>H T!2y5100000NkvXXu0mjfz{k+% literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_effect_footer_bounce_left.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_effect_footer_bounce_left.png new file mode 100644 index 0000000000000000000000000000000000000000..a7e11eb98d8d4f8faf544763acde82066c04559c GIT binary patch literal 6039 zcmV;I7ij2-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%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Vh&;p?4rCFNJmzP5xGQl8m+Q1X}tC9^orS`%k{)GZ$=^=orLWN{6P zaqRWA`%>GClJ&97X5cHP4-^9C(ca99eI!tIP2!-{N50Uk0RMkgMGxQx;6_SjZ(>+B z*q7pFOh_}p*e@jS2X%v=Ge!VO0O_b2%7aiYASZi7HT|CL3z=cqz~_{`sK$$WyclRh z9EumjE5W09=SZ}3q$gY_dL2;2O5hZu7D6JPQP|X|l8sz!Z`b#ojr53W+5#oY+=$|N zC0Ymj#HEraf~dr?Hu#HX74bE5>_9UE(adczJ!m1Y*o)1>^qlN`8GAvg2ow!~$x1f{ z`^%Xt>i$Zz0%A~v7zrT*ERG{?!SO7t>bzdBRL$w@lsM`L6b;;T)ML&-Goyg(I^PCF zfxmFT!epJZIvF8T$L2V3B@nXG+y=~sPN>&RydwvJ#6d9iw}EICsW&0Fuiv}rC6yST z8@^BbZQZ`r+@}U^P292K`!t|!EdYLPM@iIf#9iZsN|~wpkBx6&a>Ba;_0Vi2ma%b9 zZ#JZZcOy}a8uPk-c<)M)_=08!j`~nkE>4xa;881NLY8rgfucBeWs_x z6j+1P@I3_IjH*_na{cie=@HqN2eknJ)vd9f9La^YT%!?oQmnmVNcH&PH6X zIPTcSELLG_mrJrQD!0d1@5)F{QI*-8yZivPwX;0O&ycqu{4nXc8X*{`VoW zepDw^`A7-ZcY0fgvCEr4COIiPX zyP{m3zOgt)rr)=c_a7M{Z$ebW;<9th@07`nH=#B$4*qU z1*(M(+6KNtr<$I#IzYpG0O0hPApK`^TzXW#*;YvT?;|e_%Kwow7C#Ec-SknL`GZ&R zMF!Ob-)bOh#B@~iX>P$l_wY8S2V`^9o6}#~fo%jNbwY6o2A=`znHjc_B+4`e-m5 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_effect_footer_bounce_right.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_effect_footer_bounce_right.png new file mode 100644 index 0000000000000000000000000000000000000000..1275d343e3fe2c7d5745f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-QwS^YI57wmxZWt7N4Z_JoW3$1{`ZzRZwYSmgnNt6k-Q*eHN zjwlV;0`=UY^PUc%gx%tCRh!Flw&-|L6qzLmy^*P)06H{3ONAS)79*hgpC+N%_sc-c zz6Dki6GK5-@emO2`3+YyA1 pD0ivZHq15!g?%<{n27k_0RUh4H^uWJwZ8xW002ovPDHLkV1n9^pJxC7 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_effect_tab_bounce_left.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_effect_tab_bounce_left.png new file mode 100644 index 0000000000000000000000000000000000000000..42188380c763bbd0db454a320cea12e35938f794 GIT binary patch literal 5988 zcmV-q7n|sbP)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|}gUO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RylT}JFJl-N016u*M&M8`_65HTiYkE_ZD%*w92c5tQKNJU)VT*Cy_&3m1oB83)YcYf9i#&U(tz>!8cpd#^yL;l*3k=eNb5j`H&hF?jXdE`D-^;jDY-4oZM4D&S^uhIEJ-2`P}%rO-0b) zD^T{V8s>?jCF-l>303{kyb<*y+E8+HszH0T3VrX?7ElO$y>>Scwjnnhq52x^4->M* z>~8{5r_~rDyV_C6P}mmLg=>Dc=nmB=s5z$he5s%Ihi;G zgiY!hSP%+A9~(t$!HHKBGQDRnl2OqcP~$PYHu^rj*FlK0#<_s-Yd>pMNC7^mh00{|UM^L{; QcK`qY07*qoM6N<$g1uu4C;$Ke literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_effect_tab_bounce_left_h.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_effect_tab_bounce_left_h.png new file mode 100644 index 0000000000000000000000000000000000000000..88aad57a35d1ef1896c2a36e512cccdec1cb75e7 GIT binary patch literal 5871 zcmVKLZ*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@|##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~uKQkH`3L0Bl34bi*B1%>V!Z07*qoM6N<$ Ef)%Dcm;e9( literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_effect_tab_bounce_right_02.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_effect_tab_bounce_right_02.png new file mode 100644 index 0000000000000000000000000000000000000000..3a245213e3fb98358c39c6e87169d5c036d9f85c GIT binary patch literal 7003 zcmV-h8>HlkP)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-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>KQOFefeKV71OrpHe zt1D6f@vpphJ1K-bv3~YRS>E;noFS2apNLTHvA&+!AQ0xFv11Qn3Gz#&{0_e8B547v zZ#y5c>S{ehQ86dk6A1(u4DY#sLjL_BMDY{2ENtG$hzFS@MyHZD_5gOF_z@$`xeyxo z4xZ|o`N070eZY98h!W&~GezV`@w_>FNUfqf>}V*5kOL6~p}c_$wo>wuiMpdZTYGz9 z2xlgVX7#*^(cr)tXVcxI&>KA|E1Rm1Zox#86j}nOI!f5cpH$(Mi82E?&JMZ^=X^28 dHLl}-2LK=aRz|tqnTP-Y002ovPDHLkV1oP{$5H?Q literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_effect_title_tab_bounce_left.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_effect_title_tab_bounce_left.png new file mode 100644 index 0000000000000000000000000000000000000000..ee65cf4ef7058f90c3223bf4f38e8504006b1702 GIT binary patch literal 5162 zcmV+_6xHjAP)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+=*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RB&j0`b literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_effect_title_tab_bounce_right.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_effect_title_tab_bounce_right.png new file mode 100644 index 0000000000000000000000000000000000000000..55066a50de6ed6d72f6145b9eb05a156358f1aa2 GIT binary patch literal 5071 zcmV;=6EN(FP)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(?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v0^A_> za)_lt{GH)En-$KBp?R+YH;5+$srq48zBJxBfCMA1ZTlRoUPE1pqm5Zw*FTl3PF_WW`?7%A3^KB4+H^>|aQ}!6& zD!ip~QitaA=Yo~HfN>Epq-gf(1ibJQh3>u^*hS4q1w1MmiIpc=?FIA81Bf~_pButw zMo_9?(GE}}!-9-aKWF8{Dp-M#X|1ML{gE9&h8IACc+D_eDa&w@GopO1^5oOi(A_!W z#lcF9d3{axNuYeRfJUT(g(28Kskg^4U=pp~dm)2Jsv@;NHmz z9E8->Fe(LjGo$04OM`fP1G1+*2jv+Xg01Qi;X0yKKcfHNSylptw0&-#`ZkE?0b313 z*{zDXpr8m+6pAG=C=&FA!Z&wlK6fdm`kE87AOVOB+Gaq_kI2Zr;{ulk@w}>7oywn$ zA6q3v>PP@UG5yR;=O3eOajXxLFV&k=9Nv_vH$X%LU?f~zAV^W$ha$phI5xgH!|2u46k z5{9>+{Nv@P4dM&Hdv>zIYS@h?m_{>Y#DT*r&)9G*L9S@OA|L^T(mCSi;9H$g%0;i+uKZt2a=cTDF8>E{ZXE!&bl~xVFgeLLb)Ving|!m zVeZ zM_yDq0y$u1%s0#Li0ae1JSfOOY?XEcVLF=zM#=dcB1hym^yS@TNMCRsya=Mw`m`(! za=z91gc5*AL7Ob>MjrtD!d9mna{?BZ?E+ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_expandable_bg_bottom_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_expandable_bg_bottom_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..02ec6fb1dc3df76d4f6273d2bc00dcc74f056601 GIT binary patch literal 3149 zcmV-T46^fyP)pPPiaF#P*7-ZbZ>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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Wgd>Cn(Moj$h- z0{~8e0f@}ww!d^e`W;x*FR*w#zOi;}H63%x`~NxS0bBpERj5kU@Y}I7T|4)Jyu}{0E9AWDORnNQ%$pB z2_Z-_>;?nLyls!!G#i#$Q*tG_m^hI3w*W)|M82xn$(UC^%#9|Kdz-Rc+*NBzu4y(b z+a8l-{v+Rc7UzW!91i+?>b75vx^`#in!XU#wcBpzaWowC={S|23Z64=7A9FB`MiW| n_~M)u{*;JkMPt8367K^5bXElebZSfY00000NkvXXu0mjfPcqhu literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_expandable_bg_center_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_expandable_bg_center_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..6525ed642041a55c0065c26816725793f4a27441 GIT binary patch literal 2881 zcmV-H3%>M;P)pPPiaF#P*7-ZbZ>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>QdQz32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AH6LJ(@q| zF98J&D+^2;(3Am=cJnQ##!je2GUe)rl`$2ap|+v7f%(NwKg|lj)d9nR=4fa|9c|M( zRhCU?bAy$trAo_MP-;MNRIX>g7PRWX278xC3_I5PtM^k_?s`_F4!{k8M}6P)PklPwkq zIFW!82{-{K5^y2`_kUG8EclbUC}5qOjwb6nA0000l+0C literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_fast_scroll_popup_bg.#.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_fast_scroll_popup_bg.#.png new file mode 100644 index 0000000000000000000000000000000000000000..d124431ccf7b597008de7ef6412254f9b331416e GIT binary patch literal 3031 zcmV;|3n=u7P)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?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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} z00033Nkl{?p1hv{R zOfdL&nQk+A#bmOKkwnxoGm^Bh{E_(Rm0`q7c;ST?UU=bO{>NS9FdSegVPKD_nml=z z+i~>(>4@jvI-g37J&}GIfE%9&!P_W2c;Cg$a00LjEaNkXWop@Y@g;yoAif4MPsMw? z%_O*i%+xA{7hd=u#GBb@#|K&DTt#Igyzs*RC;lGnsUz{1VEi=_zX`^#U8ld89_+?C zJ!p4M@JO)g3BEOXiY{~5^gyjrcmTjOVLtNqaSyRl->I4xUU=buq*Z>jupwGg#>5u* Z7yt_8V;>J$s=ELH002ovPDHLkV1mv(r7Zve literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_fast_scroll_popup_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_fast_scroll_popup_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..6d503d5bca603900d82d84a87a92a328b449dd10 GIT binary patch literal 3646 zcmV-E4#Dw>P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-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ZP!( zyWkE$a3W_Ob@)ZWOKBH%n8g3eD{i^zeZ45Mv{lgo009600{{)|5-bHeLjnK*002ov JPDHLkV1nczOQ-+< literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_focus.#.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_focus.#.png new file mode 100644 index 0000000000000000000000000000000000000000..4b7603a61a1a8c549e3ac4a68a2f6a88284af444 GIT binary patch literal 3012 zcmV;#3p@0QP)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!?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p_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z0007UNklkaPA6QGy~CB+8_+p> zFE1#ie4dX1gnR}7%|}f{%^*MyHU*FZNB{(FHz}oR040FZ2ku5@S%-%b0C$ErT&)36 z5K%rP&>etT%R6db)C^;xq9p)RKLLP+ZygF5$b@;6;qd^=1yrn* zn)v|Dg^QPcVFZ-v-MLaKZ~+QMsB+fM5VjJbOI?7Z0E?m80;hawT=E7gU!h$ULQBCp zpjgzKL5*ur)3TnmmjxobthQdSQx^X%pUW)EJ~?vL+=`wx>)c$m0gwoQq$4wZ%nj&p zID}PIEjj?qu;u`MzREnb-EPy}Zg+b;9>X&Le*olJmi5tDt1MmsX{|pBm>~en{uT%! z>rS93ioWmn`_H4%NRP+k-;>GY+rWwTU!9Yk-v;z6ilPbs{J^5q0|KR8WyMy9P zibN@uh~y|;n`}KjS0tkWtAnPPNQuE8TGR<%V}+OZGKf@HPM{SCCc>z5N|? c?LdDA0PJ7sWb2a`2LJ#707*qoM6N<$g0o0Ywg3PC literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_03.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_03.png new file mode 100644 index 0000000000000000000000000000000000000000..8a48448d4b333047fab9899eaa3d6b65cf5acdcd GIT binary patch literal 3367 zcmV+?4cPLDP)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+_+BaR3cnT7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iB zs&*rwwa!9-Mj})tYbS-RMd(xrkQ88*sx7dPjWZMkR5-uQC$y_dXeo;U+N7r88YBy8 zdoQ!rs^jsP1HgX2&(7!bkB&@K0{;88O6+89;k>6EXuIA1axQ;HHr?WeFn0qDhr{Y{ zIHolbje?mwXMc>E6FoiCT{-qe^=+;z4hHF8vfvm@XRD4gbjd_h_0@!LU*no3;Y=$S%i!X!vw85W46)_ xXJ6@fC--Du!v${xpbiCT)zH`9G4~GicL4Xw+lmU9FWdkC002ovPDHLkV1m0IN5%jE literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_04.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_04.png new file mode 100644 index 0000000000000000000000000000000000000000..1e93c72fc2ee6bed8dc29e13c3bed5594dc2ef71 GIT binary patch literal 3453 zcmV-@4TAECP)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^+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oP1R=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} z00080Nkl0{>wM;ZMwBBH!6(1JsxTf*Up1q_G?N-38&;8%ESMMUYfKoTYg z@XSD!Mnw8r4zJ+}sK+`_HKo1WVG7`}38n%rC!!SqT|YK}hpu(VVcqC3D;b^+U>gDD zDy8OKfab!*PuIc-s92AHQpz>~azv;$teqijEkfs;0L`*2^Umk9UDlAH+5!tX(r)>! zm3p_^eLo(Lp8>$KtV2;0UjY1MF(*L~YoyV>@N}sgmT6)K=$i7oK%mIi^L25Ph f_IJ#!1N|KUqA~+)R4hc%00000NkvXXu0mjfV)$(Z literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_05.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_05.png new file mode 100644 index 0000000000000000000000000000000000000000..b95b2b0fc9d9766b164446eb87c135eb4c05568b GIT binary patch literal 3448 zcmV-;4TtiHP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmg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PBbIW6s}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} z0008MNklN8AK0&r#=fq2q6K40KzJ8#*%F|o6pPTGF-3M zlQI|;E`SFBBOye;?hHNbcDt7}P4Ch)y|Zmwwpy)N{U!mV48+p*EdYHXL=V8UEL%6c z4&``g0KnUBw@wsA&xgaoYBU;uyWQ@$X0!Q+!GMS$gm3}eD{1ve6_h+zvOzYfZQF_C zI5Pm)@As`JioS3d4N4NxJAes*m}P4ygmBIQ;&&)Joz8avbG1JXg1|dW(Nr6g zK|NLlascQ?lmMnGBR{m`uO%u>ue zYg`zUvYCC~pJ+?kJL6&PT>7-ni?0Ainy2dPhjR3l23bk~{H$=@LR;iXCW{PLN2pch zveIG<)IU^eRd?BcerJ?`2YTiG9`lTNOY;0CUxx z)&44-HS1Y++?>^ys)82-Seb$pdg$Ztm}>|6Hvpsf@Cx6#ZASnA002ovPDHLkV1n_j BZ4>|i literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_09.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_09.png new file mode 100644 index 0000000000000000000000000000000000000000..f835fd4e5c328ebc9d379138a77a593b802f879e GIT binary patch literal 3449 zcmV-<4TkcGP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5D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m8z!FId-ay%a2`M&?lb=_QdlMo^YkN`;9!1Y>2 z;}O7gzu$i>%W}Be?cUbh?*X_6@Fav7cMWt8U{hDA z;y4a17RZvNF0=s(SajAk4(7`52a6~bZ1uGUO6nX$QB){zJ+rK7Yo;Zq2}rFInT3NY zZEhUL6N@P2Opjg@ki%9N8ltpRH1=Q_rJQNjx-b@&4wjnLX>0DayS>i7$p=4o-VbT? zWRtcGz=sxojk4%9q{-{LBb2MkGs!{+lo?7uR~BeiT`f?`Cc7O2g$7@>Kqte#c5S+b zvhy?+-kwD@4ZBF4)Q(y>b0SJ@f%t|xxklg;X2#P0(zZccXqu|vKVV$7AFnb%L|I#) zT+=R0WwcyNn2|iGs4xi;y_n|Q@sACfgJNjt2va$7rMS7$`B2W|4Ok+3?W+!oiF7z+ zkqKI)@C0B*MC-0juDLuxjAirhw2)CEVXQXlwwr6!tXI+TG^_8V92!$w5Tk}(KgZlU b(7yoyMm^o;&=x?r00000NkvXXu0mjf;w)Z6 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_10.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_10.png new file mode 100644 index 0000000000000000000000000000000000000000..16b8c3f2325278953b40b58689a20ea20d31d05e GIT binary patch literal 3432 zcmV-u4VUtXP)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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(O`qe+B?OchfLSOVaWH0000< KMNUMnLSTX&>SkO3 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_11.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_11.png new file mode 100644 index 0000000000000000000000000000000000000000..e65b8d2971027b53b0aacb089ccd18e1b37cf182 GIT binary patch literal 3409 zcmV-X4X*NuP)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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|9fAvLVMxkuI_U z3YF}vZAj8Ijre5%;7xZ8m%N-gE1;2do;fs5t$#GJR=ni70ObxqPZdlY$3}@YJt(LH z@|5bbk?X45EpEvb&ssM|TQg5BHM!i74w07G00000 LNkvXXu0mjfb}v*U literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_13.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_13.png new file mode 100644 index 0000000000000000000000000000000000000000..2a6bd909c023e596428442d8e10ebfd812eb5af0 GIT binary patch literal 3437 zcmV-z4U+PSP)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 zsJ6IeNwVZx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jX9$?t P00000NkvXXu0mjffoWnM literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_14.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_14.png new file mode 100644 index 0000000000000000000000000000000000000000..89fc0b3c44ec6bd2c89824a826ae20bbc77c33d3 GIT binary patch literal 3460 zcmV-~4SVv5P)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_huIFR9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rRFX` z3z6c@tuO*g&+bAg<=FuFqErcMr;pf*(#1AFQh>X@Y=K)o)4qyrCbbTf_32aV^*S7n z$6rUI(f7mQ5DtgKlE*;R1{8>S(+Pm}_>Diqx~@^zH2~mvJf3|pZv*l~cUec8reT_< z7XVG?4F-e1lgZ@IbUOWD&03plX$i6furdK~1`+`80FpS4byz1L+xQ`1E&x`mRc^cD zTmuR$%l3QMfBY2E+;002ovPDHLkV1nTUPoMw* literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_18.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_18.png new file mode 100644 index 0000000000000000000000000000000000000000..b3dc51bbb0101c74f9ebce61b591fba469657d36 GIT binary patch literal 3383 zcmV-74ao9|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_3Rg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 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} z0007FNkle~l4Z;C$Fno;a&bts>kZ_a=21EpAj%5K^i?>!pR9y?CVQK&y0ctfOGM^R6 zGg1Zh(dDVWwAU-F0DSbpw7}Iwv;tu2Cj{{3T8ARhjR~{T;c)=V6;#a3&n`gE%Ejwz zVH8wpMu3?^8=y#qDi`heu&oMRW&`x3YlyG5AVMyTQ&vD`Mil>{UG0>XLKmQeZyKpV zx{&tvvQTB0S6eQZS&}4C5Cm}$1Wgo0kxO&667zn)UjTTQ(Ai*U1+uaAO=Hn)B#7V^S3<(Vgk5H6}r7cLOhQ5Et+&j>}0RTgI(i059DT)99 N002ovPDHLkV1iz-LX7|b literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_19.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_19.png new file mode 100644 index 0000000000000000000000000000000000000000..643af2b2f34f8858009842e9eb1d131da55ed08f GIT binary patch literal 3425 zcmV-n4W9CeP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;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X^EB0KZNJ#N-`wb^rhX07*qoM6N<$f@RrmF8}}l literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_21.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_21.png new file mode 100644 index 0000000000000000000000000000000000000000..56223f0d50094ebe32d8726ba6263f8dde5207a6 GIT binary patch literal 3441 zcmV-%4UY1OP)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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&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} z0007MXU97?ur_gT8%`XV~1;c1<=?t4D3jpOl%*JL+%W%dSC zW$)w(t+mVj9RMBx#lJH?3=wTF0#w5S0Db-}G_AD(kN`+r;2JW^N)+k-u$oWB@KM)fPCA6YEqhppNxDxk9^I zh*w#wB4%qh*UDgCE|)%lZ+z{Ss@71DL>HZh`drcP0sM~R zcy!GHt+KO+VL0cad0OpL9LG;_9Q!4=6^6x4g@0>}8etfI0x-5*JStL)vq}|(MHNs` zSL!efX8_(?#ji-Mzv`Uq{CPmBxY>7r%AzP5SE$u5D=T?GiKr7p*T9UTC|9k?Wb$*j z+XV$hvNWg{B8!4Ep#D*7zu$jctyZ5mn@xu|0;vm7CI&TiP8vs1H1mBw@I3Dq02~en z&lvLoz_Ux*pGFQlP4CZ9N^9+RyWMfG*PFH5?eEQIGi|k6Kl0S6s?>&KU?e8Jr0z(f zwH|N`dH|r5S}UcdL^ONJkl(kUY+LhTtWx2#Ydd_O9Kez?n7SLqgkN|kNnC+oPWElN;H3c8uHC=!_J`H~2J~kDxt;wx T&$grC00000NkvXXu0mjf96n{i literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_22.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_22.png new file mode 100644 index 0000000000000000000000000000000000000000..1916c4a4913a6e03e5f5ddb080b7b32ed64f5446 GIT binary patch literal 3384 zcmV-84af3{P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(v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K2Y^PS5w_dy?+Rx0+=F7MUUWe$pI2{=D;?)t})B(avu8~12y;k`v3p{07*qoM6N<$g2l^mmjD0& literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_24.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_24.png new file mode 100644 index 0000000000000000000000000000000000000000..5149c403b9f48395ef300342e02e872683298d51 GIT binary patch literal 3419 zcmV-h4W#mkP)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;Kp2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NQEJG?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} z0007pNklmRoM|;8JdPme<|>16Sk^IBv@= z_c}`trr6TbD+W?p3ddo}APS0w+e~11%p^0eg2g@%V@NW;dEfVDUJQ=MBd#fKaAolh z)D$212_b~f{XGC7fLQ%5)u$k$-C2MfVgO*MzO5mIC;;RDav!*WS6NMldI0XUY`De_ zz?_I?=LEU~FtR+OP=o5=w(BNDRK67`RTAm3RB|jB42TFqh*(WvXvo$x5f!HbahMXo zQ~?=-i1cSgD!T&)^=R`|UD@*)766{=U<`025lsN-{s{q$eb=FCW;)C>m&XHa#-L&$ z#H|m|Elcs_R2T-OXLlro2wi|8Ce=)N=NvI*(hXgJxB=(q+7?vF=h`W6p!@>c)tq@L zYyyhedUMuLYtYUzo)IWy)pdy|m}i~ak47^~DN`xsQA+viL^v-Xm#B>SAf=2h-Jr#u zr95^V*J_KK2ALXxk|fEsYW&)Cy{f9%W(yP0(y|29#qUbKEX#Th4IZz$TA&5HIr5b4 zyQAm$ShYYq%f4olZK*+}HFEV>1DCs+dd_C#BHf>=W6ZKFwRlHAUl7s46^L)Bse{3% z+C5(kFk>eFi*MOa3{BObMz&IyEz7b<>l(*wLUSTo`T`Y(cHv%SD{82=2tX=?7yMS=1pR*hXVZ&eBhdTbG1m_CIshGT>vR}ZPJjRa002ovPDHLkV1oC#U8w*7 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_25.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_25.png new file mode 100644 index 0000000000000000000000000000000000000000..1261fef4ff8b78557ebf58b3edf25af99edc8da2 GIT binary patch literal 3389 zcmV-D4Z`w?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#KMS9g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*UYD literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_27.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_27.png new file mode 100644 index 0000000000000000000000000000000000000000..16915f481fc8f9aca2bb80e91bf49aca6858a309 GIT binary patch literal 3404 zcmV-S4YTrzP)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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Fn8b%z4#xk{s_0G{h$O5pZHGzVbjPXOSZYac2+Ght>jJPu$h0TpSj z$1Xr)A@TfL7y)IfJJMPQHb9{W)rxbc4O@uN-Pr)i1YEbZEN~*H#w9BtvyY_zV7Xe0 zTnb!(vbJfs2buX8HLYcVsIFQ|lB5q{3Sgm>vQ;!U91mR7V+bM3}}&sI)#!?4&M!`^3-bxQ&gkQ)X0NxN-3*e#Z?uF)=~?URrDljpN;!n z)cLE=$(6qhXd@mD8`Sw?t4>KX%xrQ<&NyQM6PoHMrDnDyTI+sOf z1Uz5;=|x1eaRJ(kK`ml+J`~>Bs>3i-5&or1*%u>+S*BCp_rDr1{bUIfGK^VSYa+^A z`%rF<3&-OzJe^MO0ie_A{8UP?%JmB{^_v8SU64BzN8^shr?s?t_0DRxiy4`NZi9U2F_azZE&Q`WN*L*M-Om@57 zV;sjpiRVoYt(x{@*KDN^aU4Gx4Rgr35tS4~#>d7Mq;g;O`ghE&1N|NVP~h%$y3YFf P00000NkvXXu0mjffUIHe literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_29.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_header_process_29.png new file mode 100644 index 0000000000000000000000000000000000000000..f20d4f1bc405fbaf19c3f56a61929c2a690ad032 GIT binary patch literal 3428 zcmV-q4V&_bP)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$Q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$E!B{@IYHXO3!Y7JCv5?xR6XeHs@#j~A?aiPn^4>&Srw|jq3U$0{zdh3@9yE(!=O~U&D0z!pFWJ3UiVv`|9l$1rEA{ zz<(Uzoe>S|Vk~!XOAxhlj|`TV7k+>J^26#Z!WW?l6n0_H1kdO+q77+?_ALw8=2lTT zq1{-#MSDcIXtVOdB>xWW^u=|Y+_zCe=p_5=!B#q20<(lItV^OgZoGQh{6`bS4rX0u HM5X=-?w;&) literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_icon_Back_ef_02.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_icon_Back_ef_02.png new file mode 100644 index 0000000000000000000000000000000000000000..742e8c4f7e3c5c3bce0eadd451c600ce319cbb7a GIT binary patch literal 2358 zcmbVOdpJ~iA0Lehqbx}xj1h{=I5TF_{j~CWMl>N)X{IknuotfP@NLavwNFo7i(0F$Mk8_7_k{jSbC6cIkPxS1CfvqV8 zLTV_>Z`KyPqhsPBNKVD!l9H0JNd&A+8HWQX6pD@mk9UJL+*B!2h@0#tRXNNtus{`G zDUw4XnG~&KJd*Z50#>{@0Cf zYOBIi zqC450N%3HlJV*>S9stM;CYenpQ;2>n3WMp6pX2xzmQ5je5SV^`zMgRA0XE*3f@iXr zo+L7xL7=b*z#KL}s)D#uJ~(Gr1lyg(vi}iFWhy}~BvXdVWa7CF2#J?LGF7}xj%J3D z(5oUuQh_W^;_$g%)^ymCiMc=T`Ab3*z2m~U)^7Yik&G7RivdJs} zcAUu|F({Z>tl|udNSnz77v4g(pS{kH!P;o$nEd`N9B} zZ+P;+#DBEGM>m>x%@iN3K4Cq28Z=%sY>BrtQ1u-)%enV}dN}?;E_H!$pW(^{k!jti zw9XhGhP!>nq1Hdu*>(y;!;JY^qdo%j^3is)GWCJ8dg{9L!seBc$LfR2f>#f#_RFM8 z=FyMs(9oX_sm5rwg%fNW!i8y22 z-;LSEZ0i9AgMTtHFp&p_ITj(U)WXtrzD*4lfxOqzW2-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sMg@Z?cunbmFN;;wpB$&HQd^Mt;MdVj-euZ3cCnIj}ZcoA_c+%Cm@0-drf`|Q)+T75KE1SIxJ(4kbLpf);29u*i zsQVbhJ*5@*YW0`hr&qopp$|9q?ktT}qN8pP{*r%VV$D1QfF58>*c=L{-5Irr+Jr*S zwOWdc;7XRg)oL_07~{+@ zwSII(y2dGc(zl%25}_EohKT{ zoC*D7V00_?ktX)5?GwVmK@pkdo^$BxUfa;Vchr{l_NpJW6KaP4rQ5_i8jWU>x|k>y ziA0QT+8UH7%D7K^+pTZ95@%^?8GX${DOeiaoJ%7llb6uaHU$I=VPS8#>H7OMK${Z;25b-u*;;;r>* z$vS3Gf7zmncA*hBG&=cvUS3{F{fk86rUc}{e^jcMbe>qV0k*G8b@5}>2~%?Q3)pOS z)A;y!C3?Q5q$W91SYP;Nxvw%Qtt@@KAJ@k>q;nNiq1&Nes>t0EfszGWfXTq`QaRU3=9sE%nCY?fb| v;NGL2y}XW@_dZr&I?4Weu$7LKAS@B{>ryBV8?T==-$ue1;qDj3#C literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_icon_back_trans_ef.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_icon_back_trans_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..4973cb40fdbca5c8d06be77545d7b49551d462fb GIT binary patch literal 1734 zcmbVNX;2eq7!G)pD_WI;N^RFD6pP7b6LLa8atVwBPJd%iNMYMssvoruziD*$A z1yg}b5H%W@szV}DLn4)_NlJl==I;mi8ik~Q1|eX;s7co9g+>u=Ojk(Gt=k|C7=sW= zBHBx*q7|Wl1k)h^hry;RnGghUxeUmg!{tJY0TvTtflTt|(jjjlhbv_9fbok)TGOc# zgyB;8xGi!eqNxc27lNR{U|<;73`~~@LIQ!ns=;E>Nd#SQ(h{(duGKG?P>>>er4Gdj z6w?A$MK~TyAw)FN)0ZJ=aE0QPuvR~wC^BWB5ynA?!2~rLYg}V!JrR!l=f)e+`bZOw z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/osp/bitmaps/720x1280/white/00_icon_jump_left.png new file mode 100644 index 0000000000000000000000000000000000000000..13d4593054fa1bdbe67180817f527d4f1b0dad0e GIT binary patch literal 3113 zcmV+^4A%3BP)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#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%FQfBK?E1hfHQqTv?ypX zAz~=@20`F%#?{z+IIG~oX*0%XR#56}yl~*c{rdgSy%!Eh;=ckwzm~G6*P)?nIswj{??13)Y&utXxUb*^g{^I-2+m&U{K zQGORdC;+!YXQwB7w>Q_1Bwat)u;1%CiXtZgL;?VdR1`VY?{&u{hkmf~$hN398-;u> z8wU_xBUCt_%f{7aqcE~9k}UhdBq0PlZPTgOsu>S1vdU`(5CRa%=d$s7t(xhyO-Bep zl9C?`BulP4VW(|6YO_(SD01pBd$0o_1|a&~kDZRq>zBE)bb5bVQRJlBY!o|f({bGi zNtQnI-Q41m5P~Dy;`5;QX0)_>L)Y|`sHNQv`cLDLZP9b8G!r}*R3?!ulYCi2HhlHY jlD;J3MbS8Dk;KOU8Yl!br>FrB00000NkvXXu0mjfxnS1j literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_list_group_bg_center_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_list_group_bg_center_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..d63a9fd4899e8498ec0291b26881705aededcee7 GIT binary patch literal 2881 zcmV-H3%>M;P)pPPiaF#P*7-ZbZ>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#eyhGvp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#+s}*|J~mFr_O6XtX^j_vWJhhr|^;= sdo+qA-^8tY4g6eUqqxW(hba0p0JRKud+O^Z^8f$<07*qoM6N<$f_NG)4*&oF literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_list_group_bg_top_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_list_group_bg_top_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..babe9dcc5dfdab6105071b7bc3427ccfeca98e2f GIT binary patch literal 3130 zcmV-A48`+_P)pPPiaF#P*7-ZbZ>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#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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} z0004HNklJcr&v5QCm0f{>+%W+5VCB22{K1pALu=0IiI?ocLIP~6qXV~U@@B< zI&G~Wmx>u8l87jAr9GI4)RLpeRT46Dp9D9RN_nu>E$ka$C)Mj)C0 z{4fkAGZ+!2Z;cA!(k3$)K8gp11t)b3`~SZ(hQ+WL#tioM`ht7r8!UP?et^*X0CrZ) U2x=(l;s5{u07*qoM6N<$f&(kfc>n+a literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_list_process_01.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_list_process_01.png new file mode 100644 index 0000000000000000000000000000000000000000..26cff47c45ae68090460ed226da675e6d8189c08 GIT binary patch literal 3968 zcmV-`4}b89P)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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+_+BaR3cnT7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73m=XI972egF_iUR!)H8I z>H3p`g-nse0I=WhWzCPtREeqLLBub|an>!s&s9JA1po5#Vjm8N@2{_~`9J<_(Mrqx ze*evJoUm)le{y>Xco$+fJf2n~_6h#&?ak-`JnpNEescTE%ggw9Ja*ZAg%tB~@9?wP z?9btF`1}0)JiEHOiY_iLjsWoV^t9EqR9L1mIF8e6NyumWWICPh3R>Cw5j8nn4vDxr zFUykV$m+bIlL*g?>Ujs*cvO}j4LtSl7T2uF;6n!97zw|uPf3IjO3NoD2OSH1pz|<8 zwj^{%;PNH|AJ&1lMiBc;Cd+GEJ}x=<5QJM<211BL2Oi)b1uX^&&uy~olna~Oj}vB+ zp*1~oF4pr|UIm|k-vYWB5V!??CwZf_q%By5#T6&)vW;CaJ;+XGbrn1y-vR=~{;Fs2 zTc(>+Zmp@{L-3mweJQ|HfCIo|QHC!ApTNzkVGIPfj)-k>f#pgwwH(G4wH zcJphpIJeI5g%Dev0d?UMs1E_9$>+9(PH+L>henI-3nA9JgO)jgnVx}JDO}Db1w@oD zbWUG#9h}>+zf#T0Ck)+yK z6s6%<=?q|^Sbcq4LsoEb&xKe_QV7o)*Wclkn3$J?p*LEx#}v~ zM}xaNlZNAOOV>Pe88xjO5OCv1T-$oJEXX9GG})Q>c)!k&fW`zFWhz5!a`yEu?HBy% b$-e;r)Wt<#zg_?X00000NkvXXu0mjf9|ShL literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_list_process_04.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_list_process_04.png new file mode 100644 index 0000000000000000000000000000000000000000..581ddf03083863664e0983f1be97b2b63d338867 GIT binary patch literal 4026 zcmV;r4@K~aP)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&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{`u07*qoM6N<$f{*=_O8@`> literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_list_process_05.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_list_process_05.png new file mode 100644 index 0000000000000000000000000000000000000000..764fb5cda3f2f980bf72d956543ceb2ce6a926ce GIT binary patch literal 4023 zcmV;o4@mHdP)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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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pS}?Q|50$m5B{^+G%=#MUTsk^`gp` zfltA20bL#ta2x#A+Cpbay8^!!Han0qcE;2oE1B2Jz^5g%F0W$(vV%ynYA%6%6GLe+ zBLcr!(G>w!32>A@j`+Q-u1$-8#@z(`Nv?e?6VP>C z9rkM;e*rZ&*UUY=yg@^6ST(g>waJBLrrgDM>vjQ62xOeg42{{@_jhT(gFij{Zvc^< Ve2EMowZZ@Z002ovPDHLkV1gH`T!jDt literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_list_process_08.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_list_process_08.png new file mode 100644 index 0000000000000000000000000000000000000000..d51739d25f69aaf55d2e8b71ea6de7c531741516 GIT binary patch literal 4059 zcmV<14j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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#2HOnI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64}Xz&8cNQbpe6#G|7j_k%GO2zGaN5qMKTbd|u9 z`}1TXiue7>PI6RB z-o8JW^&;j1p4|Vp6yTogy8T(NV`EO1Pu%}!%uyPWv0`Gm#Fin#h9pZa8+b#82pf|5 z++GFCFFkmw-z}M9ts$9iY}9Wyn3Zr3T^VCx5%{>|pvwZ@m&xMKZ_RRXm)d%uFDBy zOsXwa7Cg5TBZqvt8Y)2tFKul_CH90dHjo{(Y!jkMX-=lqDAns3|l>!cw zKf{YC1iBImNTzv*u zO~su#mAe4}kE#x^pKoJ^>C@Yg5-78$aciY4$c!_dK8xfecfbL7S}o_%H1b@T(`^2LN>Qi7-c2a-9GG N002ovPDHLkV1md)o5lbD literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_list_process_09.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_list_process_09.png new file mode 100644 index 0000000000000000000000000000000000000000..454bc9c2c4c589c412a8c2204765d28ae5aec461 GIT binary patch literal 4052 zcmV;_4=eDAP)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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{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share/osp/bitmaps/720x1280/white/00_list_process_11.png new file mode 100644 index 0000000000000000000000000000000000000000..4e87dc3c877f1bbc80b9c23636a7d48545f77528 GIT binary patch literal 3920 zcmV-W53lfvP)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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{deZfso3oq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} z000E3NklU&^idX|!Ht`78@Bx6y5$o9!AHW?cVrfeWLksR*-BcGM&bJ^X zoCH1uFeR&WEgpH=2*9VNUeFYNOp}{PPQj}bBD)AvWrWZ`p&@{u0L*B7=kQa5fR+kZ zsqw$!8XwU-frc0S0ANl*QClv=@>V0y>w;H7sj%SUA+2+rU^-`vX)9o0+2SdHj{p)& z;8oExqf0gBlye^0hMy?FOA0)nEJ7bs!XFwDe#$uyY{8EdsVpa}q;M}KdDUDIL+&}} zUR!vd++78pqgz?iyrm=vzH19VmDJ_A;s#ucYW|ROK5hy>l0?|DO>tpa0g2@EJDK|r z6hW>|Tn4r#OJFH+|FLP26G^J9<&g@lk*rp$R^N}~xcYNJp6Ua@X0wU5+wGg(Zs%QJ zU%%y?zh#V-y6|I(yDxfpC{qHMZ#J8c+wJzv^Yin+hI@K?`ug$l@n-

[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 + +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; + } + + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + if (!pEcoreEvas) + { + return ECORE_CALLBACK_PASS_ON; + } + + _Window* pCurFrame = pControlManager->GetCurrentFrame(); + if (!pCurFrame) + { + return ECORE_CALLBACK_PASS_ON; + } + + 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; + } + + _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_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; + } + + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + if (!pEcoreEvas) + { + return ECORE_CALLBACK_PASS_ON; + } + + _Window* pCurFrame = pControlManager->GetCurrentFrame(); + if (!pCurFrame) + { + return ECORE_CALLBACK_PASS_ON; + } + + _Control* pPrevControl = pControlManager->GetObject(pEcoreEvas->GetDragAndDropTargetHandle()); + if (pPrevControl) + { + int pid = pEcoreEvas->GetProcessId(pCurFrame->GetNativeHandle()); + SysLog(NID_UI, "[DND][T:%d][0x%x] LEFT", pid, pPrevControl); + pPrevControl->GetControlDelegate().OnDragAndDropLeft(); + } + + 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 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; + } + + __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(); + } + + __isOutOfSource = true; + } + } +#endif +} + +Eina_Bool +OnClientMessageReceived(void* pData, int type, void* pEvent) +{ + Ecore_X_Event_Client_Message* pClientEvent = static_cast(pEvent); + SysTryReturn(NID_UI, pClientEvent, ECORE_CALLBACK_RENEW, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + _ControlManager* pControlManager = _ControlManager::GetInstance(); + if (!pControlManager) + { + return ECORE_CALLBACK_RENEW; + } + + if (pClientEvent->message_type == __atomRotateRootAngle) + { + int angle = pClientEvent->data.l[0]; + + SysTryReturn(NID_UI, pControlManager, ECORE_CALLBACK_RENEW, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + pControlManager->OnWindowRotated(angle); + } + + if (pClientEvent->message_type == ECORE_X_ATOM_E_ILLUME_ACCESS_CONTROL) + { + bool bFind = false; + int winCount = pControlManager->GetWindowCount(); + for (int i = 0; i < winCount; i++) + { + _Window* pWindow = pControlManager->GetWindow(i); + if (!pWindow) + { + continue; + } + + Ecore_X_Window win = (Ecore_X_Window)pWindow->GetNativeHandle(); + + if (win == (Ecore_X_Window)pClientEvent->data.l[0]) + { + bFind = true; + break; + } + } + + if (!bFind) + { + return ECORE_CALLBACK_RENEW; + } + + int x = 0; + int y = 0; + if ((unsigned int)pClientEvent->data.l[1] == ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_NEXT) + { + SysLog(NID_UI, "Accessibility action : Move next"); + _AccessibilityGesture::ProcessGesture(_ACCESSIBILITY_GESTURE_TYPE_FLICK_DOWN); + } + else if ((unsigned int)pClientEvent->data.l[1] == ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_READ_NEXT) + { + SysLog(NID_UI, "Accessibility action : Move next"); + _AccessibilityGesture::ProcessGesture(_ACCESSIBILITY_GESTURE_TYPE_FLICK_RIGHT); + } + else if ((unsigned int)pClientEvent->data.l[1] == ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_READ_PREV) + { + SysLog(NID_UI, "Accessibility action : Move previous"); + _AccessibilityGesture::ProcessGesture(_ACCESSIBILITY_GESTURE_TYPE_FLICK_LEFT); + } + else if ((unsigned int)pClientEvent->data.l[1] == ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_PREV) + { + SysLog(NID_UI, "Accessibility action : Move previous"); + _AccessibilityGesture::ProcessGesture(_ACCESSIBILITY_GESTURE_TYPE_FLICK_UP); + } + else if ((unsigned int)pClientEvent->data.l[1] == ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_ACTIVATE) + { + SysLog(NID_UI, "Accessibility action : Activate"); + _AccessibilityGesture::ProcessGesture(_ACCESSIBILITY_GESTURE_TYPE_ONE_FINGER_DOUBLE_TAP); + } + else if ((unsigned int)pClientEvent->data.l[1] == ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_READ) + { + x = (Evas_Coord)pClientEvent->data.l[2]; + y = (Evas_Coord)pClientEvent->data.l[3]; + SysLog(NID_UI, "Accessibility action : Read"); + _AccessibilityGesture::ProcessGesture(_ACCESSIBILITY_GESTURE_TYPE_ONE_FINGER_ONE_TAP, x, y); + } + else if ((unsigned int)pClientEvent->data.l[1] == ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_UP) + { + SysLog(NID_UI, "Accessibility action : value increased"); + _AccessibilityGesture::ProcessGesture(_ACCESSIBILITY_GESTURE_TYPE_VALUE_INCREASED); + } + else if ((unsigned int)pClientEvent->data.l[1] == ELM_ACCESS_ACTION_UNHIGHLIGHT) + { + 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) + { + 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); + } + } + else if ((unsigned int)pClientEvent->data.l[1] == ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_DOWN) + { + SysLog(NID_UI, "Accessibility action : value decreased"); + _AccessibilityGesture::ProcessGesture(_ACCESSIBILITY_GESTURE_TYPE_VALUE_DECREASED); + } + } + + if (pClientEvent->message_type == ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_REQUEST) + { + SysLog(NID_UI, "[Ime Rotation]"); + + _Window* pWindow = pControlManager->GetCurrentFrame(); + if (pWindow) + { + NativeWindowHandle handle = pWindow->GetNativeHandle(); + + if (pClientEvent->win == handle) + { + int angle = pClientEvent->data.l[1]; + SysLog(NID_UI, "[Ime Rotation] Receive the client message(xid = 0x%x, angle = %d)", handle, angle); + + _Frame* pFrame = dynamic_cast<_Frame*>(pWindow); + + if (pFrame) + { + _FrameImpl* pFrameImpl = static_cast(pFrame->GetUserData()); + if (pFrameImpl) + { + _FormImpl* pCurrentFormImpl = pFrameImpl->GetCurrentForm(); + + if (pCurrentFormImpl) + { + pCurrentFormImpl->UpdateOrientation(angle); + } + else + { + pFrameImpl->UpdateOrientation(angle); + } + } + } + } + } + } + + 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 +namespace +{ +#define __UNUSED__ + +enum _ClipType +{ + _CLIP_TYPE_PRIMARY, + _CLIP_TYPE_SECONDARY, + _CLIP_TYPE_CLIPBOARD, + _CLIP_TYPE_XDND, + _CLIP_TYPE_MAX, +}; + +struct _Clip +{ + Ecore_X_Selection selection; + Eina_Bool (* set)(Ecore_X_Window window, const void* pData, int size); + Eina_Bool (* clear)(void); + void (* request)(Ecore_X_Window window, const char* pTarget); + + bool active; + _ClipFormat format; + char* pBuffer; + + _ClipFormat requestedFormat; + char* pRetrievedBuffer; + int bufferLength; + bool completed; +}; + +typedef Eina_Bool (*ClipConverter)(char* pTarget, void* pData, int size, void** outData, int* outSize, Ecore_X_Atom* pType, int* pTypeSize); +typedef int (*ClipResponseHandler)(_Clip* pClip, Ecore_X_Event_Selection_Notify* pNotify); +typedef int (*ClipNotifyHandler)(_Clip* pClip, Ecore_X_Event_Selection_Notify* pNotify); + +enum +{ + _ATOM_TARGETS = 0, + _ATOM_ATOM, + _ATOM_LISTING_ATOMS = _ATOM_ATOM, + _ATOM_TEXT_URI, + _ATOM_TEXT_URILIST, + _ATOM_TEXT_X_VCARD, + _ATOM_IMAGE_PNG, + _ATOM_IMAGE_JPEG, + _ATOM_IMAGE_BMP, + _ATOM_IMAGE_GIF, + _ATOM_IMAGE_TIFF, + _ATOM_IMAGE_SVG, + _ATOM_IMAGE_XPM, + _ATOM_IMAGE_TGA, + _ATOM_IMAGE_PPM, + _ATOM_XELM, + _ATOM_TEXT_HTML_UTF8, + _ATOM_TEXT_HTML, + _ATOM_STRING_UTF8, + _ATOM_STRING, + _ATOM_TEXT, + _ATOM_TEXT_PLAIN_UTF8, + _ATOM_TEXT_PLAIN, + _ATOM_MAX, +}; + +struct _Atom +{ + const char* pName; + _ClipFormat formats; + ClipConverter convert; + ClipResponseHandler response; + ClipNotifyHandler notify; + Ecore_X_Atom atom; +}; + +Eina_Bool ClearClip(void* pData __UNUSED__, int type, void* pEvent); +Eina_Bool NotifyClip(void* pData __UNUSED__, int type, void* pEvent); + +Eina_Bool ConvertClipIntoTarget(char* pTarget, void* pData, int size, void** outData, int* outSize, Ecore_X_Atom* pType, int* pTypeSize); +Eina_Bool ConvertClipIntoText(char* pTarget, void* pData, int size, void** outData, int* outSize, Ecore_X_Atom* pType, int* pTypeSize); +Eina_Bool ConvertClipIntoHtml(char* pTarget, void* pData, int size, void** outData, int* outSize, Ecore_X_Atom* pType, int* pTypeSize); +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); + +int NotifyTarget(_Clip* pClip, Ecore_X_Event_Selection_Notify* pNotify); +int NotifyText(_Clip* pClip, Ecore_X_Event_Selection_Notify* pNotify); +int NotifyImage(_Clip* pClip, Ecore_X_Event_Selection_Notify* pNotify); +int NotifyUri(_Clip* pClip, Ecore_X_Event_Selection_Notify* pNotify); +int NotifyEdje(_Clip* pClip, Ecore_X_Event_Selection_Notify* pNotify); +int NotifyHtml(_Clip* pClip, Ecore_X_Event_Selection_Notify* pNotify); + +int RequestClip(_Clip* pClip, Ecore_X_Event_Selection_Notify* pNotify); + +_Atom __atomList[_ATOM_MAX]; +_Clip __clipList[_CLIP_TYPE_MAX]; + +Eina_Bool +ClearClip(void* pData __UNUSED__, int type __UNUSED__, void* pEvent) +{ + SysTryReturn(NID_UI, pEvent, ECORE_CALLBACK_PASS_ON, E_INVALID_ARG, "[E_INVALID_ARG] The specified data is not valid."); + + Ecore_X_Event_Selection_Clear* pE = (Ecore_X_Event_Selection_Clear*) pEvent; + Ecore_X_Window window = pE->win; + + _ClipType clipType = _CLIP_TYPE_SECONDARY; + __clipList[clipType].requestedFormat = (_ClipFormat)(_CLIP_FORMAT_TEXT|_CLIP_FORMAT_IMAGE); + + ecore_x_selection_secondary_request(window, ECORE_X_SELECTION_TARGET_TARGETS); + + return ECORE_CALLBACK_PASS_ON; +} + +Eina_Bool +ConvertClipIntoTarget(char* pTarget __UNUSED__, void* pData, int size__UNUSED__, void** outData, int* outSize, Ecore_X_Atom* pType, int* pTypeSize) +{ + return EINA_TRUE; + + /* + SysTryReturn(NID_UI, outData, EINA_FALSE, E_INVALID_ARG, "[E_INVALID_ARG] The specified data is not valid."); + SysTryReturn(NID_UI, outSize, EINA_FALSE, E_INVALID_ARG, "[E_INVALID_ARG] The specified data is not valid."); + SysTryReturn(NID_UI, pData, EINA_FALSE, E_INVALID_ARG, "[E_INVALID_ARG] The specified data is not valid."); + SysTryReturn(NID_UI, pType, EINA_FALSE, E_INVALID_ARG, "[E_INVALID_ARG] The specified data is not valid."); + SysTryReturn(NID_UI, pTypeSize, EINA_FALSE, E_INVALID_ARG, "[E_INVALID_ARG] The specified data is not valid."); + + int index = *((int*) pData); + SysTryReturn(NID_UI, index < _CLIP_TYPE_MAX, EINA_FALSE, E_INVALID_ARG, "[E_INVALID_ARG] The specified data is not valid."); + + int count = 0; + for (int i = 0; i < _ATOM_MAX; i++) + { + if (__clipList[index].format & __atomList[i].formats) + count++; + } + + // Make the atom list to be possible to return data. + Ecore_X_Atom* pAtoms = null; + if (count > 0) + { + pAtoms = (Ecore_X_Atom*) malloc(sizeof(Ecore_X_Atom) * count); + SysTryReturn(NID_UI, pAtoms, EINA_FALSE, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + + for (int i = 0, count = 0; i < _ATOM_MAX; i++) + { + if (__clipList[index].format & __atomList[i].formats) + pAtoms[count++] = __atomList[i].atom; + } + } + + *outData = pAtoms; + *outSize = count; + *pTypeSize = 32; + *pType = ECORE_X_ATOM_ATOM; + + return EINA_TRUE; + */ +} + +Eina_Bool +ConvertClipIntoText(char* pTarget __UNUSED__, void* pData, int size __UNUSED__, void** outData, int* outSize, Ecore_X_Atom* pType __UNUSED__, int* pTypeSize __UNUSED__) +{ + SysTryReturn(NID_UI, outData, EINA_FALSE, E_INVALID_ARG, "[E_INVALID_ARG] The specified data is not valid."); + SysTryReturn(NID_UI, outSize, EINA_FALSE, E_INVALID_ARG, "[E_INVALID_ARG] The specified data is not valid."); + SysTryReturn(NID_UI, pData, EINA_FALSE, E_INVALID_ARG, "[E_INVALID_ARG] The specified data is not valid."); + + int index = *((int*) pData); + SysTryReturn(NID_UI, index < _CLIP_TYPE_MAX, EINA_FALSE, E_INVALID_ARG, "[E_INVALID_ARG] The specified data is not valid."); + SysTryReturn(NID_UI, __clipList[index].active, EINA_FALSE, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + if (__clipList[index].format & _CLIP_FORMAT_TEXT) + { + *outData = strdup(__clipList[index].pBuffer); + *outSize = strlen(__clipList[index].pBuffer); + } + + return EINA_TRUE; +} + +Eina_Bool +ConvertClipIntoHtml(char* pTarget __UNUSED__, void* pData, int size __UNUSED__, void** outData, int* outSize, Ecore_X_Atom* pType __UNUSED__, int* pTypeSize __UNUSED__) +{ + SysTryReturn(NID_UI, outData, EINA_FALSE, E_INVALID_ARG, "[E_INVALID_ARG] The specified data is not valid."); + SysTryReturn(NID_UI, outSize, EINA_FALSE, E_INVALID_ARG, "[E_INVALID_ARG] The specified data is not valid."); + SysTryReturn(NID_UI, pData, EINA_FALSE, E_INVALID_ARG, "[E_INVALID_ARG] The specified data is not valid."); + + int index = *((int*) pData); + SysTryReturn(NID_UI, index < _CLIP_TYPE_MAX, EINA_FALSE, E_INVALID_ARG, "[E_INVALID_ARG] The specified data is not valid."); + SysTryReturn(NID_UI, __clipList[index].active, EINA_FALSE, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + if (__clipList[index].format & _CLIP_FORMAT_HTML) + { + *outData = strdup(__clipList[index].pBuffer); + *outSize = strlen(__clipList[index].pBuffer); + } + + return EINA_TRUE; +} + +Eina_Bool +ConvertClipIntoEdje(char* pTarget __UNUSED__, void* pData, int size __UNUSED__, void** outData, int* outSize, Ecore_X_Atom* pType __UNUSED__, int* pTypeSize __UNUSED__) +{ + return EINA_TRUE; +} + +Eina_Bool +ConvertClipIntoUri(char* pTarget __UNUSED__, void* pData, int size __UNUSED__, void** outData, int* outSize, Ecore_X_Atom* pType __UNUSED__, int* pTypeSize __UNUSED__) +{ + SysTryReturn(NID_UI, outData, EINA_FALSE, E_INVALID_ARG, "[E_INVALID_ARG] The specified data is not valid."); + SysTryReturn(NID_UI, outSize, EINA_FALSE, E_INVALID_ARG, "[E_INVALID_ARG] The specified data is not valid."); + SysTryReturn(NID_UI, pData, EINA_FALSE, E_INVALID_ARG, "[E_INVALID_ARG] The specified data is not valid."); + + int index = *((int*) pData); + SysTryReturn(NID_UI, index < _CLIP_TYPE_MAX, EINA_FALSE, E_INVALID_ARG, "[E_INVALID_ARG] The specified data is not valid."); + SysTryReturn(NID_UI, __clipList[index].active, EINA_FALSE, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + if (__clipList[index].format & _CLIP_FORMAT_IMAGE) + { + *outData = strdup(__clipList[index].pBuffer); + *outSize = strlen(__clipList[index].pBuffer); + } + + return EINA_TRUE; +} + +Eina_Bool +ConvertClipIntoImage(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) +{ + return 0; +} + +Eina_Bool +OnClipboardClosed(void* pData __UNUSED__, int type, void* pEvent) +{ + SysTryReturn(NID_UI, pEvent, ECORE_CALLBACK_PASS_ON, E_INVALID_ARG, "[E_INVALID_ARG] The specified data is not valid."); + + _Clipboard* pClipboard = _Clipboard::GetInstance(); + if (pClipboard) + { + bool visible = pClipboard->IsPopupVisible(); + + if (visible == true) + { + pClipboard->FireEvent(0, null); + } + } + + return ECORE_CALLBACK_PASS_ON; +} + +Eina_Bool +NotifyClip(void* pData __UNUSED__, int type, void* pEvent) +{ + SysTryReturn(NID_UI, pEvent, ECORE_CALLBACK_PASS_ON, E_INVALID_ARG, "[E_INVALID_ARG] The specified data is not valid."); + + Ecore_X_Event_Selection_Notify* pE = (Ecore_X_Event_Selection_Notify*) pEvent; + + int i = 0; + for (i = 0; i < _CLIP_TYPE_MAX; i++) + { + if (__clipList[i].selection == pE->selection) + { + break; + } + } + + SysTryReturn(NID_UI, i < _CLIP_TYPE_MAX, ECORE_CALLBACK_PASS_ON, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + _Clip* pClip = __clipList + i; + for (i = 0; i < _ATOM_MAX; i++) + { + if (!strcmp(pE->target, __atomList[i].pName)) + { + if (__atomList[i].notify) + { + __atomList[i].notify(pClip, pE); + } + } + } + + return ECORE_CALLBACK_PASS_ON; +} + +int +NotifyTarget(_Clip* pClip, Ecore_X_Event_Selection_Notify* pNotify) +{ + SysTryReturn(NID_UI, pClip, ECORE_CALLBACK_PASS_ON, E_INVALID_ARG, "[E_INVALID_ARG] The specified data is not valid."); + SysTryReturn(NID_UI, pNotify, ECORE_CALLBACK_PASS_ON, E_INVALID_ARG, "[E_INVALID_ARG] The specified data is not valid."); + + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + SysTryReturn(NID_UI, pEcoreEvas, ECORE_CALLBACK_PASS_ON, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + _ControlManager* pControlManager = _ControlManager::GetInstance(); + SysTryReturn(NID_UI, pControlManager, ECORE_CALLBACK_PASS_ON, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + _Window* pWindow = pControlManager->GetClipboardOwner(); + SysTryReturn(NID_UI, pWindow, ECORE_CALLBACK_PASS_ON, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + _RootVisualElement* pRootVE = pWindow->GetRootVisualElement(); + SysTryReturn(NID_UI, pRootVE, ECORE_CALLBACK_PASS_ON, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + _EflLayer* pLayer = static_cast<_EflLayer*>(pRootVE->GetNativeLayer()); + SysTryReturn(NID_UI, pLayer, ECORE_CALLBACK_PASS_ON, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + Ecore_Evas* pEE = pLayer->GetEcoreEvas(); + Ecore_X_Window window = (Ecore_X_Window) ecore_evas_window_get(pEE); + + Ecore_X_Atom dataType = 0; + char* pBuffer = null; + if (pEcoreEvas->GetSelectedCbhmItem(&dataType, &pBuffer)) + { + free(pBuffer); + + const char* pHtmlAtomName = "text/html;charset=utf-8"; + Ecore_X_Atom htmlType = ecore_x_atom_get(pHtmlAtomName); + + if (dataType == htmlType) + { + pClip->request(window, pHtmlAtomName); + return ECORE_CALLBACK_PASS_ON; + } + } + + Ecore_X_Selection_Data_Targets* pTargets = (Ecore_X_Selection_Data_Targets*) (pNotify->data); + Ecore_X_Atom* pAtomList = (Ecore_X_Atom*) (pTargets->data.data); + + int i, j = 0; + for (j = (_ATOM_LISTING_ATOMS+1); j < _ATOM_MAX; j++) + { + SysLog(NID_UI, "[Clipboard] __atomList[%d].atom = %d", j, __atomList[j].atom); + + if (!(__atomList[j].formats & pClip->requestedFormat)) + { + continue; + } + + for (i = 0; i < pTargets->data.length; i++) + { + SysLog(NID_UI, "[Clipboard] pAtomList[%d] = %d", i, pAtomList[i]); + + if ((__atomList[j].atom == pAtomList[i]) && (__atomList[j].notify)) + { + if ((j == _ATOM_XELM) && (!(pClip->requestedFormat & _CLIP_FORMAT_MARKUP))) + { + continue; + } + + SysLog(NID_UI, "[Clipboard] go to __atomList[%d].atom = %d", j, __atomList[j].atom); + goto FOUND; + } + } + } + + return ECORE_CALLBACK_PASS_ON; + +FOUND: + pClip->request(window, __atomList[j].pName); + return ECORE_CALLBACK_PASS_ON; +} + +int +NotifyText(_Clip* pClip, Ecore_X_Event_Selection_Notify* pNotify) +{ + SysTryReturn(NID_UI, pClip, 0, E_INVALID_ARG, "[E_INVALID_ARG] The specified data is not valid."); + SysTryReturn(NID_UI, pNotify, 0, E_INVALID_ARG, "[E_INVALID_ARG] The specified data is not valid."); + + Ecore_X_Selection_Data* pData = (Ecore_X_Selection_Data*) pNotify->data; + SysTryReturn(NID_UI, pData->data, 0, E_INVALID_ARG, "[E_INVALID_ARG] The specified data is not valid."); + + pClip->bufferLength = (int) pData->length; + + char* pStr = (char*)malloc(sizeof(char) * (pClip->bufferLength + 1)); + if (pStr) + { + strncpy(pStr, (char*)pData->data, pClip->bufferLength); + pStr[pClip->bufferLength] = '\0'; + } + else + { + SysLog(NID_UI, "[Clipboard] pStr is null."); + return 0; + } + + pClip->pRetrievedBuffer = pStr; + + _Clipboard::GetInstance()->FireEvent(_CLIP_FORMAT_TEXT, pClip->pRetrievedBuffer); + + return 0; +} + +int +NotifyImage(_Clip* pClip, Ecore_X_Event_Selection_Notify* pNotify) +{ + SysTryReturn(NID_UI, pClip, 0, E_INVALID_ARG, "[E_INVALID_ARG] The specified data is not valid."); + SysTryReturn(NID_UI, pNotify, 0, E_INVALID_ARG, "[E_INVALID_ARG] The specified data is not valid."); + + Ecore_X_Selection_Data* pData = (Ecore_X_Selection_Data*) pNotify->data; + SysTryReturn(NID_UI, pData->data, 0, E_INVALID_ARG, "[E_INVALID_ARG] The specified data is not valid."); + + pClip->bufferLength = (int) pData->length; + + char* pStr = (char*)malloc(sizeof(char) * (pClip->bufferLength + 1)); + if (pStr) + { + strncpy(pStr, (char*)pData->data, pClip->bufferLength); + pStr[pClip->bufferLength] = '\0'; + } + else + { + SysLog(NID_UI, "[Clipboard] pStr is null."); + return 0; + } + + pClip->pRetrievedBuffer = pStr; + + _Clipboard::GetInstance()->FireEvent(_CLIP_FORMAT_IMAGE, pClip->pRetrievedBuffer); + + return 0; +} + +int +NotifyUri(_Clip* pClip, Ecore_X_Event_Selection_Notify* pNotify) +{ + SysTryReturn(NID_UI, pClip, 0, E_INVALID_ARG, "[E_INVALID_ARG] The specified data is not valid."); + SysTryReturn(NID_UI, pNotify, 0, E_INVALID_ARG, "[E_INVALID_ARG] The specified data is not valid."); + + Ecore_X_Selection_Data* pData = (Ecore_X_Selection_Data*) pNotify->data; + SysTryReturn(NID_UI, pData->data, 0, E_INVALID_ARG, "[E_INVALID_ARG] The specified data is not valid."); + + pClip->bufferLength = (int) pData->length; + + char* pStr = (char*)malloc(sizeof(char) * (pClip->bufferLength + 1)); + if (pStr) + { + strncpy(pStr, (char*)pData->data, pClip->bufferLength); + pStr[pClip->bufferLength] = '\0'; + } + else + { + SysLog(NID_UI, "[Clipboard] pStr is null."); + return 0; + } + + pClip->pRetrievedBuffer = pStr; + + _Clipboard::GetInstance()->FireEvent(_CLIP_FORMAT_IMAGE, pClip->pRetrievedBuffer); + + return 0; +} + +int +NotifyEdje(_Clip* pClip, Ecore_X_Event_Selection_Notify* pNotify) +{ + SysTryReturn(NID_UI, pClip, 0, E_INVALID_ARG, "[E_INVALID_ARG] The specified data is not valid."); + SysTryReturn(NID_UI, pNotify, 0, E_INVALID_ARG, "[E_INVALID_ARG] The specified data is not valid."); + + Ecore_X_Selection_Data* pData = (Ecore_X_Selection_Data*) pNotify->data; + SysTryReturn(NID_UI, pData->data, 0, E_INVALID_ARG, "[E_INVALID_ARG] The specified data is not valid."); + + pClip->bufferLength = (int) pData->length; + + char* pStr = (char*)malloc(sizeof(char) * (pClip->bufferLength + 1)); + if (pStr) + { + strncpy(pStr, (char*)pData->data, pClip->bufferLength); + pStr[pClip->bufferLength] = '\0'; + } + else + { + SysLog(NID_UI, "[Clipboard] pStr is null."); + return 0; + } + + pClip->pRetrievedBuffer = pStr; + + _Clipboard::GetInstance()->FireEvent(_CLIP_FORMAT_TEXT, pClip->pRetrievedBuffer); + + return 0; +} + +int +NotifyHtml(_Clip* pClip, Ecore_X_Event_Selection_Notify* pNotify) +{ + SysTryReturn(NID_UI, pClip, 0, E_INVALID_ARG, "[E_INVALID_ARG] The specified data is not valid."); + SysTryReturn(NID_UI, pNotify, 0, E_INVALID_ARG, "[E_INVALID_ARG] The specified data is not valid."); + + Ecore_X_Selection_Data* pData = (Ecore_X_Selection_Data*) pNotify->data; + SysTryReturn(NID_UI, pData->data, 0, E_INVALID_ARG, "[E_INVALID_ARG] The specified data is not valid."); + + pClip->bufferLength = (int) pData->length; + + char* pStr = (char*)malloc(sizeof(char) * (pClip->bufferLength + 1)); + if (pStr) + { + strncpy(pStr, (char*)pData->data, pClip->bufferLength); + pStr[pClip->bufferLength] = '\0'; + } + else + { + SysLog(NID_UI, "[Clipboard] pStr is null."); + return 0; + } + + pClip->pRetrievedBuffer = pStr; + + _Clipboard::GetInstance()->FireEvent(_CLIP_FORMAT_HTML, pClip->pRetrievedBuffer); + + return 0; +} +} // Anonymous + +namespace Tizen { namespace Ui +{ + +_EcoreEvas* +_EcoreEvas::CreateInstanceN(void) +{ + _EcoreEvas* pEcoreEvas = new (std::nothrow) _EcoreEvas; + SysTryReturn(NID_UI, pEcoreEvas, 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 pEcoreEvas; + +CATCH: + delete pEcoreEvas; + return null; +} + +_EcoreEvas::_EcoreEvas(void) + : __pWindowVisibilityChanged(null) + , __pWindowPropertyChanged(null) + , __pWindowShown(null) + , __pWindowConfigured(null) + , __pClientMessageReceived(null) + , __pClearClip(null) + , __pNotifyClip(null) + , __pClipboardClosed(null) + , __pEvas(null) + , __pForegroundWindow(null) + , __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); + + __pWindowVisibilityChanged = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_VISIBILITY_CHANGE, OnWindowVisibilityChanged, (void*) this); + SysTryReturnVoidResult(NID_UI, __pWindowVisibilityChanged, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + __pClientMessageReceived = ecore_event_handler_add(ECORE_X_EVENT_CLIENT_MESSAGE, OnClientMessageReceived, NULL); + + ecore_x_event_mask_set(ecore_x_window_root_first_get(), ECORE_X_EVENT_MASK_WINDOW_CONFIGURE); + ecore_x_event_mask_set(ecore_x_window_root_first_get(), ECORE_X_EVENT_MASK_WINDOW_PROPERTY); + + _pEvas = this; + + GetEcoreEvasMgr()->SetEcoreEvas(*this); + + //int ret = 0; + //ret = runtime_info_set_changed_cb(RUNTIME_INFO_KEY_ROTATION_LOCK_ENABLED, OnAutoRotationChanged, NULL); + //SysTryCatch(NID_UI, ret == 0, , E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + result r = InitializeAtomList(); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + __pWindowShown = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_SHOW, OnWindowShown, (void*) this); + SysTryCatch(NID_UI, __pWindowShown, , E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + __pWindowConfigured = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_CONFIGURE, OnWindowConfigured, NULL); + SysTryCatch(NID_UI, __pWindowConfigured, , E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + __pWindowPropertyChanged = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_PROPERTY, OnWindowPropertyChanged, NULL); + SysTryCatch(NID_UI, __pWindowPropertyChanged, , E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + SetLastResult(E_SUCCESS); + + return; + +CATCH: + if (__pWindowVisibilityChanged) + { + ecore_event_handler_del(__pWindowVisibilityChanged); + __pWindowVisibilityChanged = null; + } + + if (__pWindowShown) + { + ecore_event_handler_del(__pWindowShown); + __pWindowShown = null; + } + + if (__pWindowConfigured) + { + ecore_event_handler_del(__pWindowConfigured); + __pWindowConfigured = null; + } +} + +_EcoreEvas::~_EcoreEvas(void) +{ + if (__pWindowVisibilityChanged) + { + ecore_event_handler_del(__pWindowVisibilityChanged); + __pWindowVisibilityChanged = null; + } + + if (__pWindowShown) + { + ecore_event_handler_del(__pWindowShown); + __pWindowShown = null; + } + + if (__pWindowConfigured) + { + ecore_event_handler_del(__pWindowConfigured); + __pWindowConfigured = null; + } + + if (__pClientMessageReceived) + { + ecore_event_handler_del(__pClientMessageReceived); + __pClientMessageReceived = null; + } + + for (int i = 0; i < _ATOM_MAX; i++) + { + if (__atomList[i].atom) + { + ecore_x_selection_converter_atom_del(__atomList[i].atom); + } + } + + if (__pClearClip) + { + ecore_event_handler_del(__pClearClip); + __pClearClip = null; + } + + if (__pNotifyClip) + { + ecore_event_handler_del(__pNotifyClip); + __pNotifyClip = null; + } + + if (__pClipboardClosed) + { + ecore_event_handler_del(__pClipboardClosed); + __pClipboardClosed = null; + } + + if (__pWindowPropertyChanged) + { + ecore_event_handler_del(__pWindowPropertyChanged); + __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); +} + +void +_EcoreEvas::RotateWindow(const _Window& window, int orientation, bool rotateEvas) +{ + // Set window bounds according to the rotation + // Rotate Evas + + _EflLayer* pLayer = GetEflLayer(window); + if (!pLayer) + { + return; + } + + Ecore_Evas* pEcoreEvas = pLayer->GetEcoreEvas(); + + /* + int curOrientation = ecore_evas_rotation_get(pEcoreEvas); + if (curOrientation == orientation) + { + return; + } + */ + + bool rotatePartial = true; + + _Frame* pFrame = dynamic_cast<_Frame*>(const_cast<_Window*>(&window)); + if (pFrame) + { + FrameShowMode showMode = pFrame->GetShowMode(false); + if (showMode == FRAME_SHOW_MODE_FULL_SCREEN) + { + rotatePartial = false; + } + } + + _Window* pWindow = const_cast<_Window*>(&window); + if (pWindow->IsLayoutChangable() == true) + { + rotatePartial = false; + } + + Ecore_X_Window win = (Ecore_X_Window) ecore_evas_window_get(pEcoreEvas); + + int rootW = 0; + int rootH = 0; + ecore_x_window_size_get(ecore_x_window_root_get(win), &rootW, &rootH); + + if (rotatePartial == false) + { + if (rotateEvas == true) + { + ecore_evas_rotation_with_resize_set(pEcoreEvas, orientation); + + pLayer->SetOrientationChanged(orientation); + + if ((orientation == 0) || (orientation == 180)) + { + if (pWindow->IsOrientationRoot()) + { + pLayer->SetSize(FloatDimension(rootW, rootH)); + } + else + { + pLayer->SetBounds(FloatRectangle(0, 0, rootW, rootH)); + } + } + else + { + 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); + } + } + else + { + if (rotateEvas == true) + { + ecore_evas_rotation_set(pEcoreEvas, orientation); + + pLayer->SetOrientationChanged(orientation); + } + + Rectangle winBounds = _CoordinateSystemUtils::Transform(window.GetBounds()); + int rotate = ecore_evas_rotation_get(pEcoreEvas); + + int winX = winBounds.x; + int winY = winBounds.y; + + switch (rotate) + { + case 270: + winX = rootW - winBounds.y - winBounds.height; + winY = winBounds.x; + break; + case 90: + winX = winBounds.y; + winY = rootH - winBounds.x - winBounds.width; + break; + case 180: + winX = rootW - winBounds.x - winBounds.width; + winY = rootH - winBounds.y - winBounds.height; + break; + default: + break; + } + + int x = 0; + int y = 0; + 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) + { + 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->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); + } + } +} + +_EflLayer* +_EcoreEvas::GetEflLayer(const _Window& window) const +{ + _RootVisualElement* pRootVisualElement = null; + + pRootVisualElement = window.GetRootVisualElement(); + if (!pRootVisualElement) + { + SysLog(NID_UI, "The root visual element is null."); + return null; + } + + _EflLayer* pEflLayer = static_cast<_EflLayer*>(pRootVisualElement->GetNativeLayer()); + if (!pEflLayer) + { + SysLog(NID_UI, "The efl layer is null."); + return null; + } + + return pEflLayer; +} + +bool +_EcoreEvas::GetFloatingMode(void) const +{ + SysTryReturn(NID_UI, __pForegroundWindow, false, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + Eina_Bool ret = elm_win_floating_mode_get(__pForegroundWindow); + + SetLastResult(E_SUCCESS); + + return (ret ? true : false); +} + +// [ToDo] Remove API +bool +_EcoreEvas::GetFloatingMode(const _Window& window) const +{ + _EflLayer* pLayer = GetEflLayer(window); + SysTryReturn(NID_UI, pLayer, false, E_INVALID_ARG, "[E_INVALID_ARG] The window doesn't have a elf layer."); + + Evas_Object* pWinObj = pLayer->GetElmWin(); + SysTryReturn(NID_UI, pWinObj, false, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + Eina_Bool ret = elm_win_floating_mode_get(pWinObj); + + SetLastResult(E_SUCCESS); + + return (ret ? true : false); +} + +unsigned int +_EcoreEvas::GetActiveWindow(void) +{ + Ecore_X_Window* pRoots = null; + Ecore_X_Window activeWin = 0; + int num = 0; + + pRoots = ecore_x_window_root_list(&num); + if (pRoots) + { + Ecore_X_Atom activeAtom = ecore_x_atom_get("_NET_ACTIVE_WINDOW"); + int ret = ecore_x_window_prop_window_get(pRoots[0], activeAtom, &activeWin, 1); + + free(pRoots); + + if (ret < 0) + { + return 0; + } + } + + return activeWin; +} + +int +_EcoreEvas::GetProcessId(unsigned int window) +{ + int pid = 0; + Eina_Bool ret = ecore_x_netwm_pid_get(window, &pid); + + if (ret != EINA_TRUE) + { + return 0; + } + + return pid; +} + +void +_EcoreEvas::SetOwner(NativeWindowHandle ownee, NativeWindowHandle owner) +{ + Ecore_X_Window win = ecore_x_icccm_transient_for_get(ownee); + if (win != owner) + { + ecore_x_icccm_transient_for_unset(ownee); + ecore_x_icccm_transient_for_set(ownee, owner); + SysLog(NID_UI, "[WIN ORDER][WIN 0x%x] transient_for_set -> 0x%x", ownee, owner); + } +} + +void +_EcoreEvas::ActivateWindow(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_evas_activate(pEcoreEvas); + + NativeWindowHandle currentWindow = window.GetNativeHandle(); + unsigned int activeWindow = GetActiveWindow(); + int pid = GetProcessId(activeWindow); + SysLog(NID_UI, "currentWindow = 0x%x, activeWindow = 0x%x, pid = %d", currentWindow, activeWindow, pid); + + SetLastResult(E_SUCCESS); +} + +void +_EcoreEvas::MinimizeWindow(_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_evas_lower(pEcoreEvas); + ecore_evas_iconified_set(pEcoreEvas, EINA_TRUE); + + SetLastResult(E_SUCCESS); +} + +void +_EcoreEvas::SetRenderBackend(_RenderBackend backend) +{ + switch (backend) + { + case _RENDER_BACKEND_SW: + elm_config_preferred_engine_set("software_x11"); + break; + case _RENDER_BACKEND_GL: + elm_config_preferred_engine_set("opengl_x11"); + break; + case _RENDER_BACKEND_DEFAULT: + // fall through + default: + elm_config_preferred_engine_set(NULL); + break; + } +} + +_RenderBackend +_EcoreEvas::GetRenderBackend(void) +{ + _RenderBackend backend = _RENDER_BACKEND_DEFAULT; + + const char* pEngine = elm_config_preferred_engine_get(); + + if (pEngine == NULL) + { + backend = _RENDER_BACKEND_DEFAULT; + } + else if (strcmp(pEngine, "software_x11") == 0) + { + backend = _RENDER_BACKEND_SW; + } + else if (strcmp(pEngine, "opengl_x11") == 0) + { + backend = _RENDER_BACKEND_GL; + } + + return backend; +} + +result +_EcoreEvas::CopyClip(_ClipFormat format, const char* pChar) +{ + SysTryReturn(NID_UI, IsValidClipFormat(format), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The data type is invalid."); + SysTryReturn(NID_UI, pChar, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The data is invalid."); + + Ecore_X_Atom dataType = 0; + + switch (format) + { + case _CLIP_FORMAT_TEXT: + dataType = ecore_x_atom_get("UTF8_STRING"); + break; + case _CLIP_FORMAT_IMAGE: + dataType = ecore_x_atom_get("text/uri"); + break; + case _CLIP_FORMAT_HTML: + dataType = ecore_x_atom_get("text/html;charset=utf-8"); + break; + default: + break; + } + + _ControlManager* pControlManager = _ControlManager::GetInstance(); + + _Window* pWindow = pControlManager->GetClipboardOwner(); + if (!pWindow) + { + return E_SUCCESS; + } + + _EflLayer* pLayer = GetEflLayer(*pWindow); + if (!pLayer) + { + return E_SUCCESS; + } + + Ecore_X_Window window = (Ecore_X_Window) ecore_evas_window_get(pLayer->GetEcoreEvas()); + SysAssert(window); + + SetCbhmItem(window, dataType, (char*)pChar); + + return E_SUCCESS; +} + +bool +_EcoreEvas::RetrieveClipN(int index, int* format, char** pData) +{ + Ecore_X_Atom dataType = 0; + + _ControlManager* pControlManager = _ControlManager::GetInstance(); + + _Window* pWindow = pControlManager->GetClipboardOwner(); + if (!pWindow) + { + return false; + } + + _EflLayer* pLayer = GetEflLayer(*pWindow); + if (!pLayer) + { + return false; + } + + GetCbhmItem(index, &dataType, pData); + + if ((dataType == ecore_x_atom_get("UTF8_STRING")) + ||(dataType == ecore_x_atom_get("application/x-elementary-markup"))) + { + *format = _CLIP_FORMAT_TEXT; + } + else if (dataType == ecore_x_atom_get("text/uri")) + { + *format = _CLIP_FORMAT_IMAGE; + } + else if (dataType == ecore_x_atom_get("text/html;charset=utf-8")) + { + *format = _CLIP_FORMAT_HTML; + } + + if (*pData == null) + { + return false; + } + + // Convert markup to utf8. + if (dataType == ecore_x_atom_get("application/x-elementary-markup")) + { + char* pTempChar = evas_textblock_text_markup_to_utf8(NULL, *pData); + SysLog(NID_UI, "[Clipboard] markup[%s] -> utf8[%s]", *pData, pTempChar); + free(*pData); + + *pData = pTempChar; + } + + return true; +} + +int +_EcoreEvas::GetClipCount(void) const +{ + _ControlManager* pControlManager = _ControlManager::GetInstance(); + + _Window* pWindow = pControlManager->GetClipboardOwner(); + if (!pWindow) + { + return 0; + } + + _EflLayer* pLayer = GetEflLayer(*pWindow); + if (!pLayer) + { + return 0; + } + + int count = GetCbhmItemCount(); + + return count; +} + +void +_EcoreEvas::OpenClipboard(unsigned long clipFormats) +{ + _ControlManager* pControlManager = _ControlManager::GetInstance(); + + _Window* pWindow = pControlManager->GetClipboardOwner(); + if (!pWindow) + { + return; + } + + _EflLayer* pLayer = GetEflLayer(*pWindow); + if (!pLayer) + { + return; + } + + Ecore_X_Window window = (Ecore_X_Window) ecore_evas_window_get(pLayer->GetEcoreEvas()); + SysAssert(window); + + ecore_x_selection_secondary_set(window, "", 1); + + if (_CLIP_FORMAT_IMAGE & clipFormats) + { + SendCbhmMessage(window, ATOM_CBHM_CLIPBOARD_SHOW_ALL); + } + else + { + SendCbhmMessage(window, ATOM_CBHM_CLIPBOARD_SHOW); + } + + __openClipboard = true; +} + +void +_EcoreEvas::CloseClipboard(void) +{ + _ControlManager* pControlManager = _ControlManager::GetInstance(); + + _Window* pWindow = pControlManager->GetClipboardOwner(); + if (!pWindow) + { + return; + } + + _EflLayer* pLayer = GetEflLayer(*pWindow); + if (!pLayer) + { + return; + } + + Ecore_X_Window window = (Ecore_X_Window) ecore_evas_window_get(pLayer->GetEcoreEvas()); + SysAssert(window); + + __openClipboard = false; + SendCbhmMessage(window, ATOM_CBHM_CLIPBOARD_HIDE); +} + +bool +_EcoreEvas::IsClipboardOpened(void) +{ + return __openClipboard; +} + +String +_EcoreEvas::ConvertMarkupToUtf8(const String& string) +{ + char* pChar = _Clipboard::GetInstance()->EncodeToCharN(string); + if (!pChar) + { + return String(L""); + } + + char* pTempChar = evas_textblock_text_markup_to_utf8(NULL, pChar); + SysLog(NID_UI, "[Clipboard] markup[%s] -> utf8[%s]", pChar, pTempChar); + free(pChar); + + String str(pTempChar); + free(pTempChar); + + return str; +} + +result +_EcoreEvas::SetEventPropagation(const _Control& control, bool enable) +{ + _EflNode* pEflNode = dynamic_cast<_EflNode*>(control.GetVisualElement()->GetNativeNode()); + SysTryReturn(NID_UI, pEflNode, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + Evas_Object* pEvasObject = (Evas_Object*) pEflNode->GetGroupContainer(); + SysTryReturn(NID_UI, pEvasObject, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + evas_object_propagate_events_set(pEvasObject, (enable ? EINA_TRUE : EINA_FALSE)); + + return E_SUCCESS; +} + +result +_EcoreEvas::SetFocus(const _Control& control, bool focus) +{ + _EflNode* pEflNode = dynamic_cast<_EflNode*>(control.GetVisualElement()->GetNativeNode()); + SysTryReturn(NID_UI, pEflNode, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + Evas_Object* pEvasObject = (Evas_Object*) pEflNode->GetGroupContainer(); + SysTryReturn(NID_UI, pEvasObject, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + evas_object_focus_set(pEvasObject, (focus ? EINA_TRUE : EINA_FALSE)); + + return E_SUCCESS; +} + +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."); + + Ecore_Evas* pEcoreEvas = pLayer->GetEcoreEvas(); + SysTryReturn(NID_UI, pEcoreEvas, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + Ecore_X_Window win = (Ecore_X_Window) ecore_evas_window_get(pEcoreEvas); + + if (showState) + { + ecore_x_e_illume_indicator_state_set(win, ECORE_X_ILLUME_INDICATOR_STATE_ON); + } + else + { + ecore_x_e_illume_indicator_state_set(win, ECORE_X_ILLUME_INDICATOR_STATE_OFF); + } + + return E_SUCCESS; +} + +bool +_EcoreEvas::GetIndicatorShowState(const _Window& window) const +{ + _EflLayer* pLayer = GetEflLayer(window); + SysTryReturn(NID_UI, pLayer, false, E_INVALID_ARG, "[E_INVALID_ARG] The window doesn't have a elf layer."); + + Ecore_Evas* pEcoreEvas = pLayer->GetEcoreEvas(); + SysTryReturn(NID_UI, pEcoreEvas, false, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + Ecore_X_Window win = (Ecore_X_Window) ecore_evas_window_get(pEcoreEvas); + Ecore_X_Illume_Indicator_State state = ecore_x_e_illume_indicator_state_get(win); + + bool showState = true; + if (state == ECORE_X_ILLUME_INDICATOR_STATE_ON) + { + showState = true; + } + else if (state == ECORE_X_ILLUME_INDICATOR_STATE_OFF) + { + showState = false; + } + + return showState; +} + +// [ToDo] Remove API +Rectangle +_EcoreEvas::GetIndicatorBounds(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."); + + Ecore_X_Window win = (Ecore_X_Window) ecore_evas_window_get(pEcoreEvas); + Ecore_X_Window rootWin = (Ecore_X_Window) ecore_x_window_root_get(win); + + int x = 0; + int y = 0; + int width = 0; + int height = 0; + + bool ret = false; + ret = ecore_x_e_illume_indicator_geometry_get(rootWin, &x, &y, &width, &height); + SysTryReturn(NID_UI, ret == true, Rectangle(0, 0, 0, 0), E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + SetLastResult(E_SUCCESS); + + return Rectangle(x, y, width, height); +} + +// [ToDo] Remove API +result +_EcoreEvas::SetIndicatorOpacity(const _Window& window, _IndicatorOpacity opacity) +{ + _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."); + + Ecore_Evas* pEcoreEvas = pLayer->GetEcoreEvas(); + SysTryReturn(NID_UI, pEcoreEvas, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + Ecore_X_Window win = (Ecore_X_Window) ecore_evas_window_get(pEcoreEvas); + + Ecore_X_Illume_Indicator_Opacity_Mode mode = ECORE_X_ILLUME_INDICATOR_OPACITY_UNKNOWN; + switch (opacity) + { + case _INDICATOR_OPACITY_UNKNOWN: + mode = ECORE_X_ILLUME_INDICATOR_OPACITY_UNKNOWN; + break; + case _INDICATOR_OPACITY_OPAQUE: + mode = ECORE_X_ILLUME_INDICATOR_OPAQUE; + break; + case _INDICATOR_OPACITY_TRANSLUCENT: + mode = ECORE_X_ILLUME_INDICATOR_TRANSLUCENT; + break; + case _INDICATOR_OPACITY_TRANSPARENT: + mode = ECORE_X_ILLUME_INDICATOR_TRANSPARENT; + break; + default: + SysLogException(NID_UI, E_INVALID_ARG, "[E_INVALID_ARG] The specified data is not valid."); + return E_INVALID_ARG; + } + + ecore_x_e_illume_indicator_opacity_set(win, mode); + + return E_SUCCESS; +} + +// [ToDo] Remove API +_IndicatorOpacity +_EcoreEvas::GetIndicatorOpacity(const _Window& window) const +{ + _EflLayer* pLayer = GetEflLayer(window); + SysTryReturn(NID_UI, pLayer, _INDICATOR_OPACITY_UNKNOWN, E_INVALID_ARG, "[E_INVALID_ARG] The window doesn't have a elf layer."); + + Ecore_Evas* pEcoreEvas = pLayer->GetEcoreEvas(); + SysTryReturn(NID_UI, pEcoreEvas, _INDICATOR_OPACITY_UNKNOWN, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + Ecore_X_Window win = (Ecore_X_Window) ecore_evas_window_get(pEcoreEvas); + Ecore_X_Illume_Indicator_Opacity_Mode mode = ecore_x_e_illume_indicator_opacity_get(win); + + _IndicatorOpacity opacity = _INDICATOR_OPACITY_UNKNOWN; + switch (mode) + { + case ECORE_X_ILLUME_INDICATOR_OPACITY_UNKNOWN: + opacity = _INDICATOR_OPACITY_UNKNOWN; + break; + case ECORE_X_ILLUME_INDICATOR_OPAQUE: + opacity = _INDICATOR_OPACITY_OPAQUE; + break; + case ECORE_X_ILLUME_INDICATOR_TRANSLUCENT: + opacity = _INDICATOR_OPACITY_TRANSLUCENT; + break; + case ECORE_X_ILLUME_INDICATOR_TRANSPARENT: + opacity = _INDICATOR_OPACITY_TRANSPARENT; + break; + default: + SysLogException(NID_UI, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + return _INDICATOR_OPACITY_UNKNOWN; + } + + SetLastResult(E_SUCCESS); + + return opacity; +} + +void +_EcoreEvas::SetWindowActivationEnabled(const _Window& window, bool enable) +{ + _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); + + Eina_Bool acceptsFocus; + Ecore_X_Window_State_Hint initialState; + Ecore_X_Pixmap iconPixmap; + Ecore_X_Pixmap iconMask; + Ecore_X_Window iconWindow; + Ecore_X_Window windowGroup; + Eina_Bool isUrgent; + + ecore_x_icccm_hints_get(win, &acceptsFocus, &initialState, &iconPixmap, &iconMask, &iconWindow, &windowGroup, &isUrgent); + ecore_x_icccm_hints_set(win, (enable ? EINA_TRUE : EINA_FALSE), initialState, iconPixmap, iconMask, iconWindow, windowGroup, isUrgent); +} + +bool +_EcoreEvas::IsWindowActivationEnabled(const _Window& window) +{ + _EflLayer* pLayer = GetEflLayer(window); + SysTryReturn(NID_UI, pLayer, true, E_INVALID_ARG, "[E_INVALID_ARG] The window doesn't have a elf layer."); + + Ecore_Evas* pEcoreEvas = pLayer->GetEcoreEvas(); + SysTryReturn(NID_UI, pEcoreEvas, true, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + Ecore_X_Window win = (Ecore_X_Window) ecore_evas_window_get(pEcoreEvas); + + Eina_Bool acceptsFocus; + Ecore_X_Window_State_Hint initialState; + Ecore_X_Pixmap iconPixmap; + Ecore_X_Pixmap iconMask; + Ecore_X_Window iconWindow; + Ecore_X_Window windowGroup; + Eina_Bool isUrgent; + + ecore_x_icccm_hints_get(win, &acceptsFocus, &initialState, &iconPixmap, &iconMask, &iconWindow, &windowGroup, &isUrgent); + + return (acceptsFocus ? true : false); +} + +void +_EcoreEvas::SetWindowName(const _Window& window, const Tizen::Base::String& name) +{ + _EflLayer* pLayer = GetEflLayer(window); + SysTryReturnVoidResult(NID_UI, pLayer, E_INVALID_ARG, "[E_INVALID_ARG] The window doesn't have a elf layer."); + + 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) + { + // 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; + } +} + +void +_EcoreEvas::SetWindowType(const _Window& window, int winType) +{ + _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); + + if (winType == _WINDOW_TYPE_SUB) + { + ecore_x_netwm_window_type_set(win, ECORE_X_WINDOW_TYPE_UTILITY); + } +} + +result +_EcoreEvas::SetFloatingMode(const _Window& window, bool enable) +{ + _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."); + + Evas_Object* pWinObj = pLayer->GetElmWin(); + SysTryReturn(NID_UI, pWinObj, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + elm_win_floating_mode_set(pWinObj, (enable ? EINA_TRUE : EINA_FALSE)); + + return E_SUCCESS; +} + +// [ToDo] Remove API +Evas* +_EcoreEvas::GetEvas(void) const +{ + SysLog(NID_UI, "Do not use."); + _Window* pWindow = _ControlManager::GetInstance()->GetCurrentFrame(); + if (!pWindow) + { + return null; + } + + _EflLayer* pLayer = GetEflLayer(*pWindow); + if (!pLayer) + { + return null; + } + + return pLayer->GetEvas(); +} + +// [ToDo] Remove API +Ecore_Evas* +_EcoreEvas::GetEcoreEvas(void) const +{ + SysLog(NID_UI, "Do not use."); + _Window* pWindow = _ControlManager::GetInstance()->GetCurrentFrame(); + if (!pWindow) + { + return null; + } + + _EflLayer* pLayer = GetEflLayer(*pWindow); + if (!pLayer) + { + return null; + } + + return pLayer->GetEcoreEvas(); +} + +// [ToDo] Remove API +Evas_Object* +_EcoreEvas::GetWindowObject(void) const +{ + SysLog(NID_UI, "Do not use."); + _Window* pWindow = _ControlManager::GetInstance()->GetCurrentFrame(); + if (!pWindow) + { + return null; + } + + _EflLayer* pLayer = GetEflLayer(*pWindow); + if (!pLayer) + { + return null; + } + + return pLayer->GetElmWin(); +} + +// [ToDo] Remove API +Ecore_X_Window +_EcoreEvas::GetXWindow(void) const +{ + SysLog(NID_UI, "Do not use."); + _Window* pWindow = _ControlManager::GetInstance()->GetCurrentFrame(); + if (!pWindow) + { + return 0; + } + + _EflLayer* pLayer = GetEflLayer(*pWindow); + if (!pLayer) + { + return 0; + } + + Ecore_X_Window win = (Ecore_X_Window) ecore_evas_window_get(pLayer->GetEcoreEvas()); + + return win; +} + +void +_EcoreEvas::AllowSetWindowBounds(bool allow) +{ + __changeBounds = allow; +} + +bool +_EcoreEvas::IsWindowVisible(const _Window& window) +{ + _EflLayer* pLayer = GetEflLayer(window); + SysTryReturn(NID_UI, pLayer, false, E_INVALID_ARG, "[E_INVALID_ARG] The window doesn't have a elf layer."); + + Ecore_Evas* pEcoreEvas = pLayer->GetEcoreEvas(); + SysTryReturn(NID_UI, pEcoreEvas, false, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + Ecore_X_Window win = (Ecore_X_Window) ecore_evas_window_get(pEcoreEvas); + + int ret = ecore_x_window_visible_get(win); + if (ret == 1) + { + return true; + } + else + { + return false; + } +} + +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) +{ + /* + _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); + Ecore_X_Atom atomPanelScrollable = ecore_x_atom_get("_E_MOVE_PANEL_SCROLLABLE_STATE"); + + unsigned int val[3]; + ecore_x_window_prop_card32_get(win, atomPanelScrollable, val, 3); + + if (enable) + { + val[1] = 1; + } + else + { + val[1] = 0; + } + + ecore_x_window_prop_card32_set(win, atomPanelScrollable, val, 3); + */ +} + +// [ToDo] Remove API +bool +_EcoreEvas::IsQuickPanelScrollEnabled(const _Window& window) +{ + /* + _EflLayer* pLayer = GetEflLayer(window); + SysTryReturn(NID_UI, pLayer, false, E_INVALID_ARG, "[E_INVALID_ARG] The window doesn't have a elf layer."); + + Ecore_Evas* pEcoreEvas = pLayer->GetEcoreEvas(); + SysTryReturn(NID_UI, pEcoreEvas, false, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + Ecore_X_Window win = (Ecore_X_Window) ecore_evas_window_get(pEcoreEvas); + Ecore_X_Atom atomPanelScrollable = ecore_x_atom_get("_E_MOVE_PANEL_SCROLLABLE_STATE"); + + unsigned int val[3]; + ecore_x_window_prop_card32_get(win, atomPanelScrollable, val, 3); + + if (val[1] == 0) + { + return false; + } + else + { + return true; + } + */ + + return true; +} + +void +_EcoreEvas::SetWindowLevel(const _Window& window, _WindowLevel level) +{ + _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); + ecore_x_icccm_transient_for_unset(win); + SysLog(NID_UI, "[WIN ORDER][WIN 0x%x] transient_for_unset", win); + + if (level == _WINDOW_LEVEL_NORMAL) + { + ecore_x_netwm_window_type_set(win, ECORE_X_WINDOW_TYPE_NORMAL); + SysLog(NID_UI, "[WIN ORDER][WIN 0x%x] set : ECORE_X_WINDOW_TYPE_NORMAL", win); + } + else if (level == _WINDOW_LEVEL_NOTIFICATION_HIGH) + { + ecore_x_netwm_window_type_set(win, ECORE_X_WINDOW_TYPE_NOTIFICATION); + utilx_set_system_notification_level((Display*)ecore_x_display_get(), win, UTILX_NOTIFICATION_LEVEL_HIGH); + SysLog(NID_UI, "[WIN ORDER][WIN 0x%x] set : ECORE_X_WINDOW_TYPE_NOTIFICATION, UTILX_NOTIFICATION_LEVEL_HIGH", win); + } + else if (level == _WINDOW_LEVEL_NOTIFICATION_MIDDLE) + { + ecore_x_netwm_window_type_set(win, ECORE_X_WINDOW_TYPE_NOTIFICATION); + utilx_set_system_notification_level((Display*)ecore_x_display_get(), win, UTILX_NOTIFICATION_LEVEL_NORMAL); + SysLog(NID_UI, "[WIN ORDER][WIN 0x%x] set : ECORE_X_WINDOW_TYPE_NOTIFICATION, UTILX_NOTIFICATION_LEVEL_NORMAL", win); + } + + SetLastResult(E_SUCCESS); +} + +_WindowLevel +_EcoreEvas::GetWindowLevel(const _Window& window) const +{ + _EflLayer* pLayer = GetEflLayer(window); + SysTryReturn(NID_UI, pLayer, _WINDOW_LEVEL_UNKNOWN, E_INVALID_ARG, "[E_INVALID_ARG] The window doesn't have a elf layer."); + + Ecore_Evas* pEcoreEvas = pLayer->GetEcoreEvas(); + SysTryReturn(NID_UI, pEcoreEvas, _WINDOW_LEVEL_UNKNOWN, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + Ecore_X_Window win = (Ecore_X_Window) ecore_evas_window_get(pEcoreEvas); + + Ecore_X_Window_Type type = ECORE_X_WINDOW_TYPE_UNKNOWN; + ecore_x_netwm_window_type_get(win, &type); + + _WindowLevel winLevel = _WINDOW_LEVEL_UNKNOWN; + if (type == ECORE_X_WINDOW_TYPE_NORMAL) + { + winLevel = _WINDOW_LEVEL_NORMAL; + } + else if (type == ECORE_X_WINDOW_TYPE_NOTIFICATION) + { + Utilx_Notification_Level notificationLevel = utilx_get_system_notification_level((Display*)ecore_x_display_get(), win); + + if (notificationLevel == UTILX_NOTIFICATION_LEVEL_HIGH) + { + winLevel = _WINDOW_LEVEL_NOTIFICATION_HIGH; + } + else if (notificationLevel == UTILX_NOTIFICATION_LEVEL_NORMAL) + { + winLevel = _WINDOW_LEVEL_NOTIFICATION_MIDDLE; + } + } + + SetLastResult(E_SUCCESS); + + return winLevel; +} + +void +_EcoreEvas::SetWindowBounds(const _Window& window, const Rectangle& bounds, bool resizeOnly) +{ + if (__changeBounds == false) + { + return; + } + + _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(); + Ecore_X_Window win = (Ecore_X_Window) ecore_evas_window_get(pEcoreEvas); + + Evas_Object* pWinObject = pLayer->GetElmWin(); + SysTryReturnVoidResult(NID_UI, pWinObject, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + Rectangle winBounds = _CoordinateSystemUtils::Transform(bounds); + + int rotate = ecore_evas_rotation_get(pEcoreEvas); + +// _Window* pWindow = const_cast<_Window*>(&window); +// _ContextMenu* pContextMenu = dynamic_cast<_ContextMenu*>(pWindow); +// if (pContextMenu) + if ((window.IsOrientationRoot() == false) && (window.IsRotationSynchronized() == false)) + { + _ControlManager* pControlManager = _ControlManager::GetInstance(); + if (pControlManager) + { + _Window* pCurFrame = pControlManager->GetCurrentFrame(); + if (pCurFrame) + { + int ownerRotate = GetWindowRotation(*pCurFrame); + if (ownerRotate != rotate) + { + return; + } + } + } + } + + int winX = winBounds.x; + int winY = winBounds.y; + + int rootW = 0; + int rootH = 0; + ecore_x_window_size_get(ecore_x_window_root_get(win), &rootW, &rootH); + + switch (rotate) + { + case 270: + winX = rootW - winBounds.y - winBounds.height; + winY = winBounds.x; + break; + case 90: + winX = winBounds.y; + winY = rootH - winBounds.x - winBounds.width; + break; + case 180: + winX = rootW - winBounds.x - winBounds.width; + winY = rootH - winBounds.y - winBounds.height; + break; + default: + break; + } + + int x = 0; + int y = 0; + 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) + { + 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->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, bool resizeOnly) +{ + if (__changeBounds == false) + { + return; + } + + _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(); + Ecore_X_Window win = (Ecore_X_Window) ecore_evas_window_get(pEcoreEvas); + + Evas_Object* pWinObject = pLayer->GetElmWin(); + SysTryReturnVoidResult(NID_UI, pWinObject, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + FloatRectangle winBoundsF = _CoordinateSystemUtils::Transform(bounds); + Rectangle winBounds = _CoordinateSystemUtils::ConvertToInteger(winBoundsF); + + int rotate = ecore_evas_rotation_get(pEcoreEvas); + +// _Window* pWindow = const_cast<_Window*>(&window); +// _ContextMenu* pContextMenu = dynamic_cast<_ContextMenu*>(pWindow); +// if (pContextMenu) + if ((window.IsOrientationRoot() == false) && (window.IsRotationSynchronized() == false)) + { + _ControlManager* pControlManager = _ControlManager::GetInstance(); + if (pControlManager) + { + _Window* pCurFrame = pControlManager->GetCurrentFrame(); + if (pCurFrame) + { + int ownerRotate = GetWindowRotation(*pCurFrame); + if (ownerRotate != rotate) + { + return; + } + } + } + } + + int winX = winBounds.x; + int winY = winBounds.y; + + int rootW = 0; + int rootH = 0; + ecore_x_window_size_get(ecore_x_window_root_get(win), &rootW, &rootH); + + switch (rotate) + { + case 270: + winX = rootW - winBounds.y - winBounds.height; + winY = winBounds.x; + break; + case 90: + winX = winBounds.y; + winY = rootH - winBounds.x - winBounds.width; + break; + case 180: + winX = rootW - winBounds.x - winBounds.width; + winY = rootH - winBounds.y - winBounds.height; + break; + default: + break; + } + + int x = 0; + int y = 0; + 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) + { + 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->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::SetWindowVisibleState(const _Window& window, bool visibleState) +{ + _EflLayer* pLayer = GetEflLayer(window); + SysTryReturnVoidResult(NID_UI, pLayer, E_INVALID_ARG, "[E_INVALID_ARG] The window doesn't have a elf layer."); + + Evas_Object* pWinObj = pLayer->GetElmWin(); + SysTryReturnVoidResult(NID_UI, pWinObj, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + pLayer->SetShowState(visibleState); + + SetLastResult(E_SUCCESS); +} + +void +_EcoreEvas::SetOwner(const _Window& ownee, const _Control& owner) +{ + _Window* pOwnerWindow = owner.GetRootWindow(); + SysTryReturnVoidResult(NID_UI, pOwnerWindow, E_INVALID_ARG, "[E_INVALID_ARG] The owner doesn't have a root window."); + + _EflLayer* pOwnerLayer = GetEflLayer(*pOwnerWindow); + SysTryReturnVoidResult(NID_UI, pOwnerLayer, E_INVALID_ARG, "[E_INVALID_ARG] The owner doesn't have a elf layer."); + + _EflLayer* pOwneeLayer = GetEflLayer(ownee); + SysTryReturnVoidResult(NID_UI, pOwneeLayer, E_INVALID_ARG, "[E_INVALID_ARG] The ownee doesn't have a elf layer."); + + Ecore_X_Window ownerWin = (Ecore_X_Window) ecore_evas_window_get(pOwnerLayer->GetEcoreEvas()); + Ecore_X_Window owneeWin = (Ecore_X_Window) ecore_evas_window_get(pOwneeLayer->GetEcoreEvas()); + + Ecore_X_Window_Type type; + ecore_x_netwm_window_type_get(owneeWin, &type); + if ((type == ECORE_X_WINDOW_TYPE_NORMAL) || (type == ECORE_X_WINDOW_TYPE_UTILITY)) + { + Ecore_X_Window win = ecore_x_icccm_transient_for_get(owneeWin); + if (win != ownerWin) + { + ecore_x_icccm_transient_for_unset(owneeWin); + ecore_x_icccm_transient_for_set(owneeWin, ownerWin); + SysLog(NID_UI, "[WIN ORDER][WIN 0x%x] transient_for_set -> 0x%x", owneeWin, ownerWin); + } + } + else + { + SysLog(NID_UI, "[WIN ORDER][WIN 0x%x] Skip to transient_for_set", owneeWin); + } + + // Ownee window + // 1. IsLayoutChangable : true + // 2. IsRotationSynchronized : true + // -> available_set + + if ((ownee.IsLayoutChangable() == true) || (ownee.IsRotationSynchronized() == true)) + { + int* rotations = null; + unsigned int count = 0; + Eina_Bool ret = ecore_evas_wm_rotation_available_rotations_get(pOwnerLayer->GetEcoreEvas(), &rotations, &count); + + if (ret) + { + if (rotations) + { + SetWindowAvailabledRotation(ownee, rotations, count); + free(rotations); + } + } + + bool preferredRoation = pOwnerWindow->GetPreferredRotation(); + if (preferredRoation == true) + { + //int preferredRotation = ecore_evas_wm_rotation_preferred_rotation_get(pOwnerLayer->GetEcoreEvas()); + int preferredRotation = 0; + ecore_x_e_window_rotation_preferred_rotation_get(ownerWin, &preferredRotation); + SetWindowPreferredRotation(ownee, preferredRotation); + } + else + { + SetWindowPreferredRotation(ownee, -1); + } + } + else + { + int ownerRotation = GetWindowRotation(*pOwnerWindow); + SetWindowPreferredRotation(ownee, ownerRotation); + } + + SetLastResult(E_SUCCESS); +} + +int +_EcoreEvas::GetWindowRotation(const _Window& window) +{ + _EflLayer* pLayer = GetEflLayer(window); + if (!pLayer) + { + return 0; + } + + int rotation = ecore_evas_rotation_get(pLayer->GetEcoreEvas()); + return rotation; +} + +void +_EcoreEvas::SetWindowPreferredRotation(const _Window& window, int rotation, bool force) +{ + _EflLayer* pLayer = GetEflLayer(window); + if (!pLayer) + { + return; + } + + Ecore_X_Window win = (Ecore_X_Window) ecore_evas_window_get(pLayer->GetEcoreEvas()); + + if (force == true) + { + ecore_x_e_window_rotation_app_set(win, EINA_TRUE); + } + SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] Set window preferred rotation(%d).", win, rotation); + ecore_evas_wm_rotation_preferred_rotation_set(pLayer->GetEcoreEvas(), rotation); + + _Window* pWindow = const_cast<_Window*>(&window); + if (pWindow) + { + if (rotation == -1) + { + pWindow->SetPreferredRotation(false); + } + else + { + pWindow->SetPreferredRotation(true); + } + } +} + +void +_EcoreEvas::SetWindowAvailabledRotation(const _Window& window, int* rotations, unsigned int count, bool force) +{ + _EflLayer* pLayer = GetEflLayer(window); + if (!pLayer) + { + return; + } + + Ecore_X_Window win = (Ecore_X_Window) ecore_evas_window_get(pLayer->GetEcoreEvas()); + + // Skip available_set if there is not change + if (force == false) + { + int* prevRotations = null; + unsigned int prevCount = 0; + Eina_Bool ret = ecore_evas_wm_rotation_available_rotations_get(pLayer->GetEcoreEvas(), &prevRotations, &prevCount); + free(prevRotations); + + if (ret) + { + if (prevCount == count) + { + return; + } + } + } + else + { + ecore_x_e_window_rotation_app_set(win, EINA_TRUE); + } + + SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] Set window available rotation(%d).", win, count); + ecore_evas_wm_rotation_available_rotations_set(pLayer->GetEcoreEvas(), rotations, count); +} + +void +_EcoreEvas::RegisterWindowStateCallback(const _Window& window) +{ + _EflLayer* pLayer = GetEflLayer(window); + if (!pLayer) + { + return; + } + + 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 +_EcoreEvas::SetWindowRotationBounds(const _Window& window, int rotation, const Tizen::Graphics::Rectangle& bounds) +{ + _EflLayer* pLayer = GetEflLayer(window); + if (!pLayer) + { + return; + } + + Rectangle winBounds = _CoordinateSystemUtils::Transform(bounds); + + Ecore_X_Window win = (Ecore_X_Window) ecore_evas_window_get(pLayer->GetEcoreEvas()); + SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] Set rotation bounds(ROT %d, %d, %d, %d, %d).", win, rotation, winBounds.x, winBounds.y, winBounds.width, winBounds.height); + ecore_x_e_window_rotation_geometry_set(win, rotation, winBounds.x, winBounds.y, winBounds.width, winBounds.height); +} + +void +_EcoreEvas::SetWindowRotationBounds(const _Window& window, int rotation, const Tizen::Graphics::FloatRectangle& bounds) +{ + _EflLayer* pLayer = GetEflLayer(window); + if (!pLayer) + { + return; + } + + FloatRectangle winBoundsF = _CoordinateSystemUtils::Transform(bounds); + Rectangle winBounds = _CoordinateSystemUtils::ConvertToInteger(winBoundsF); + + Ecore_X_Window win = (Ecore_X_Window) ecore_evas_window_get(pLayer->GetEcoreEvas()); + SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] Set rotation bounds(ROT %d, %d, %d, %d, %d).", win, rotation, winBounds.x, winBounds.y, winBounds.width, winBounds.height); + ecore_x_e_window_rotation_geometry_set(win, rotation, winBounds.x, winBounds.y, winBounds.width, winBounds.height); +} + +// [ToDo] Remove API +const _Control* +_EcoreEvas::GetFrame(void) const +{ + SysLog(NID_UI, "Do not use."); + return __pFrame; +} + +// [ToDo] Remove API +_RootVisualElement* +_EcoreEvas::GetRootVisualElement(void)const +{ + SysLog(NID_UI, "Do not use."); + return null; +} + +// [ToDo] Remove API +void +_EcoreEvas::SetFrame(const _Control& control) +{ + SysLog(NID_UI, "Do not use."); + __pFrame = const_cast<_Control*>(&control); +} + +bool +_EcoreEvas::GetSelectedCbhmItem(Ecore_X_Atom* pDataType, char** pBuffer) const +{ + Ecore_X_Window cbhmWin = GetCbhmWindow(); + Ecore_X_Atom atomCbhmItem = ecore_x_atom_get(ATOM_CBHM_SELECTED_ITEM); + Ecore_X_Atom atomItemType = 0; + + char* pRet = (char*)GetCbhmReply(cbhmWin, atomCbhmItem, &atomItemType, NULL); + if (pRet) + { + Ecore_X_Atom x_atom_cbhm_error = ecore_x_atom_get(ATOM_CBHM_ERROR); + if (atomItemType == x_atom_cbhm_error) + { + free(pRet); + return false; + } + + if (pBuffer) + { + *pBuffer = pRet; + } + else + { + free(pRet); + } + + if (pDataType) + { + *pDataType = atomItemType; + } + + return true; + } + + return false; +} + +bool +_EcoreEvas::IsAccessibilityScreenReaderActivated(void) +{ + Eina_Bool acc = elm_config_access_get(); + return acc; +} + +void +_EcoreEvas::SetDragAndDropEnabled(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, "[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."); + + 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; +} + +result +_EcoreEvas::DragAndDropDrop(const _Window& window) +{ + Ecore_X_Window win = (Ecore_X_Window)window.GetNativeHandle(); + + 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; +} + +_ControlHandle +_EcoreEvas::GetDragAndDropTargetHandle(void) const +{ + return __dragAndDropTargetHandle; +} + +result +_EcoreEvas::InitializeAtomList(void) +{ + __atomList[_ATOM_TARGETS].pName = "TARGETS"; + __atomList[_ATOM_TARGETS].formats = _CLIP_FORMAT_TARGETS; + __atomList[_ATOM_TARGETS].convert = ConvertClipIntoTarget; + __atomList[_ATOM_TARGETS].response = RequestClip; + __atomList[_ATOM_TARGETS].notify = NotifyTarget; + __atomList[_ATOM_TARGETS].atom = 0; + + __atomList[_ATOM_ATOM].pName = "ATOM"; + __atomList[_ATOM_ATOM].formats = _CLIP_FORMAT_TARGETS; + __atomList[_ATOM_ATOM].convert = ConvertClipIntoTarget; + __atomList[_ATOM_ATOM].response = RequestClip; + __atomList[_ATOM_ATOM].notify = NotifyTarget; + __atomList[_ATOM_ATOM].atom = 0; + + __atomList[_ATOM_XELM].pName = "application/x-elementary-markup"; + __atomList[_ATOM_XELM].formats = _CLIP_FORMAT_MARKUP; + __atomList[_ATOM_XELM].convert = ConvertClipIntoEdje; + __atomList[_ATOM_XELM].response = null; + __atomList[_ATOM_XELM].notify = NotifyEdje; + __atomList[_ATOM_XELM].atom = 0; + + __atomList[_ATOM_TEXT_URI].pName = "text/uri"; + __atomList[_ATOM_TEXT_URI].formats = _CLIP_FORMAT_IMAGE; + __atomList[_ATOM_TEXT_URI].convert = ConvertClipIntoUri; + __atomList[_ATOM_TEXT_URI].response = null; + __atomList[_ATOM_TEXT_URI].notify = NotifyUri; + __atomList[_ATOM_TEXT_URI].atom = 0; + + __atomList[_ATOM_TEXT_URILIST].pName = "text/uri-list"; + __atomList[_ATOM_TEXT_URILIST].formats = _CLIP_FORMAT_IMAGE; + __atomList[_ATOM_TEXT_URILIST].convert = ConvertClipIntoUri; + __atomList[_ATOM_TEXT_URILIST].response = null; + __atomList[_ATOM_TEXT_URILIST].notify = NotifyUri; + __atomList[_ATOM_TEXT_URILIST].atom = 0; + + __atomList[_ATOM_TEXT_X_VCARD].pName = "text/x-vcard"; + __atomList[_ATOM_TEXT_X_VCARD].formats = _CLIP_FORMAT_VCARD; + __atomList[_ATOM_TEXT_X_VCARD].convert = null; + __atomList[_ATOM_TEXT_X_VCARD].response = null; + __atomList[_ATOM_TEXT_X_VCARD].notify = null; + __atomList[_ATOM_TEXT_X_VCARD].atom = 0; + + __atomList[_ATOM_IMAGE_PNG].pName = "image/png"; + __atomList[_ATOM_IMAGE_PNG].formats = _CLIP_FORMAT_IMAGE; + __atomList[_ATOM_IMAGE_PNG].convert = ConvertClipIntoImage; + __atomList[_ATOM_IMAGE_PNG].response = null; + __atomList[_ATOM_IMAGE_PNG].notify = NotifyImage; + __atomList[_ATOM_IMAGE_PNG].atom = 0; + + __atomList[_ATOM_IMAGE_JPEG].pName = "image/jpeg"; + __atomList[_ATOM_IMAGE_JPEG].formats = _CLIP_FORMAT_IMAGE; + __atomList[_ATOM_IMAGE_JPEG].convert = ConvertClipIntoImage; + __atomList[_ATOM_IMAGE_JPEG].response = null; + __atomList[_ATOM_IMAGE_JPEG].notify = NotifyImage; + __atomList[_ATOM_IMAGE_JPEG].atom = 0; + + __atomList[_ATOM_IMAGE_BMP].pName = "image/x-ms-bmp"; + __atomList[_ATOM_IMAGE_BMP].formats = _CLIP_FORMAT_IMAGE; + __atomList[_ATOM_IMAGE_BMP].convert = ConvertClipIntoImage; + __atomList[_ATOM_IMAGE_BMP].response = null; + __atomList[_ATOM_IMAGE_BMP].notify = NotifyImage; + __atomList[_ATOM_IMAGE_BMP].atom = 0; + + __atomList[_ATOM_IMAGE_GIF].pName = "image/gif"; + __atomList[_ATOM_IMAGE_GIF].formats = _CLIP_FORMAT_IMAGE; + __atomList[_ATOM_IMAGE_GIF].convert = ConvertClipIntoImage; + __atomList[_ATOM_IMAGE_GIF].response = null; + __atomList[_ATOM_IMAGE_GIF].notify = NotifyImage; + __atomList[_ATOM_IMAGE_GIF].atom = 0; + + __atomList[_ATOM_IMAGE_TIFF].pName = "image/tiff"; + __atomList[_ATOM_IMAGE_TIFF].formats = _CLIP_FORMAT_IMAGE; + __atomList[_ATOM_IMAGE_TIFF].convert = ConvertClipIntoImage; + __atomList[_ATOM_IMAGE_TIFF].response = null; + __atomList[_ATOM_IMAGE_TIFF].notify = NotifyImage; + __atomList[_ATOM_IMAGE_TIFF].atom = 0; + + __atomList[_ATOM_IMAGE_SVG].pName = "image/svg+xml"; + __atomList[_ATOM_IMAGE_SVG].formats = _CLIP_FORMAT_IMAGE; + __atomList[_ATOM_IMAGE_SVG].convert = ConvertClipIntoImage; + __atomList[_ATOM_IMAGE_SVG].response = null; + __atomList[_ATOM_IMAGE_SVG].notify = NotifyImage; + __atomList[_ATOM_IMAGE_SVG].atom = 0; + + __atomList[_ATOM_IMAGE_XPM].pName = "image/x-xpixmap"; + __atomList[_ATOM_IMAGE_XPM].formats = _CLIP_FORMAT_IMAGE; + __atomList[_ATOM_IMAGE_XPM].convert = ConvertClipIntoImage; + __atomList[_ATOM_IMAGE_XPM].response = null; + __atomList[_ATOM_IMAGE_XPM].notify = NotifyImage; + __atomList[_ATOM_IMAGE_XPM].atom = 0; + + __atomList[_ATOM_IMAGE_TGA].pName = "image/x-tga"; + __atomList[_ATOM_IMAGE_TGA].formats = _CLIP_FORMAT_IMAGE; + __atomList[_ATOM_IMAGE_TGA].convert = ConvertClipIntoImage; + __atomList[_ATOM_IMAGE_TGA].response = null; + __atomList[_ATOM_IMAGE_TGA].notify = NotifyImage; + __atomList[_ATOM_IMAGE_TGA].atom = 0; + + __atomList[_ATOM_IMAGE_PPM].pName = "image/x-portable-pixmap"; + __atomList[_ATOM_IMAGE_PPM].formats = _CLIP_FORMAT_IMAGE; + __atomList[_ATOM_IMAGE_PPM].convert = ConvertClipIntoImage; + __atomList[_ATOM_IMAGE_PPM].response = null; + __atomList[_ATOM_IMAGE_PPM].notify = NotifyImage; + __atomList[_ATOM_IMAGE_PPM].atom = 0; + + __atomList[_ATOM_TEXT_HTML_UTF8].pName = "text/html;charset=utf-8"; + __atomList[_ATOM_TEXT_HTML_UTF8].formats = _CLIP_FORMAT_HTML; + __atomList[_ATOM_TEXT_HTML_UTF8].convert = ConvertClipIntoHtml; + __atomList[_ATOM_TEXT_HTML_UTF8].response = null; + __atomList[_ATOM_TEXT_HTML_UTF8].notify = NotifyHtml; + __atomList[_ATOM_TEXT_HTML_UTF8].atom = 0; + + __atomList[_ATOM_TEXT_HTML].pName = "text/html"; + __atomList[_ATOM_TEXT_HTML].formats = _CLIP_FORMAT_HTML; + __atomList[_ATOM_TEXT_HTML].convert = ConvertClipIntoHtml; + __atomList[_ATOM_TEXT_HTML].response = null; + __atomList[_ATOM_TEXT_HTML].notify = NotifyHtml; + __atomList[_ATOM_TEXT_HTML].atom = 0; + + __atomList[_ATOM_STRING_UTF8].pName = "UTF8_STRING"; + __atomList[_ATOM_STRING_UTF8].formats = (_ClipFormat) (_CLIP_FORMAT_TEXT | _CLIP_FORMAT_MARKUP | _CLIP_FORMAT_HTML); + __atomList[_ATOM_STRING_UTF8].convert = ConvertClipIntoText; + __atomList[_ATOM_STRING_UTF8].response = null; + __atomList[_ATOM_STRING_UTF8].notify = NotifyText; + __atomList[_ATOM_STRING_UTF8].atom = 0; + + __atomList[_ATOM_STRING].pName = "STRING"; + __atomList[_ATOM_STRING].formats = (_ClipFormat) (_CLIP_FORMAT_TEXT | _CLIP_FORMAT_MARKUP | _CLIP_FORMAT_HTML); + __atomList[_ATOM_STRING].convert = ConvertClipIntoText; + __atomList[_ATOM_STRING].response = null; + __atomList[_ATOM_STRING].notify = NotifyText; + __atomList[_ATOM_STRING].atom = 0; + + __atomList[_ATOM_TEXT].pName = "TEXT"; + __atomList[_ATOM_TEXT].formats = (_ClipFormat) (_CLIP_FORMAT_TEXT | _CLIP_FORMAT_MARKUP | _CLIP_FORMAT_HTML); + __atomList[_ATOM_TEXT].convert = ConvertClipIntoText; + __atomList[_ATOM_TEXT].response = null; + __atomList[_ATOM_TEXT].notify = null; + __atomList[_ATOM_TEXT].atom = 0; + + __atomList[_ATOM_TEXT_PLAIN_UTF8].pName = "text/plain;charset=utf-8"; + __atomList[_ATOM_TEXT_PLAIN_UTF8].formats = (_ClipFormat) (_CLIP_FORMAT_TEXT | _CLIP_FORMAT_MARKUP | _CLIP_FORMAT_HTML); + __atomList[_ATOM_TEXT_PLAIN_UTF8].convert = ConvertClipIntoText; + __atomList[_ATOM_TEXT_PLAIN_UTF8].response = null; + __atomList[_ATOM_TEXT_PLAIN_UTF8].notify = null; + __atomList[_ATOM_TEXT_PLAIN_UTF8].atom = 0; + + __atomList[_ATOM_TEXT_PLAIN].pName = "text/plain"; + __atomList[_ATOM_TEXT_PLAIN].formats = (_ClipFormat) (_CLIP_FORMAT_TEXT | _CLIP_FORMAT_MARKUP | _CLIP_FORMAT_HTML); + __atomList[_ATOM_TEXT_PLAIN].convert = ConvertClipIntoText; + __atomList[_ATOM_TEXT_PLAIN].response = null; + __atomList[_ATOM_TEXT_PLAIN].notify = null; + __atomList[_ATOM_TEXT_PLAIN].atom = 0; + + __clipList[_CLIP_TYPE_PRIMARY].selection = ECORE_X_SELECTION_PRIMARY; + __clipList[_CLIP_TYPE_PRIMARY].set = ecore_x_selection_primary_set; + __clipList[_CLIP_TYPE_PRIMARY].clear = ecore_x_selection_primary_clear; + __clipList[_CLIP_TYPE_PRIMARY].request = ecore_x_selection_primary_request; + __clipList[_CLIP_TYPE_PRIMARY].active = false; + __clipList[_CLIP_TYPE_PRIMARY].pBuffer = null; + __clipList[_CLIP_TYPE_PRIMARY].pRetrievedBuffer = null; + __clipList[_CLIP_TYPE_PRIMARY].bufferLength = 0; + __clipList[_CLIP_TYPE_PRIMARY].completed = false; + + __clipList[_CLIP_TYPE_SECONDARY].selection = ECORE_X_SELECTION_SECONDARY; + __clipList[_CLIP_TYPE_SECONDARY].set = ecore_x_selection_secondary_set; + __clipList[_CLIP_TYPE_SECONDARY].clear = ecore_x_selection_secondary_clear; + __clipList[_CLIP_TYPE_SECONDARY].request = ecore_x_selection_secondary_request; + __clipList[_CLIP_TYPE_SECONDARY].active = false; + __clipList[_CLIP_TYPE_SECONDARY].pBuffer = null; + __clipList[_CLIP_TYPE_SECONDARY].pRetrievedBuffer = null; + __clipList[_CLIP_TYPE_SECONDARY].bufferLength = 0; + __clipList[_CLIP_TYPE_SECONDARY].completed = false; + + __clipList[_CLIP_TYPE_CLIPBOARD].selection = ECORE_X_SELECTION_CLIPBOARD; + __clipList[_CLIP_TYPE_CLIPBOARD].set = ecore_x_selection_clipboard_set; + __clipList[_CLIP_TYPE_CLIPBOARD].clear = ecore_x_selection_clipboard_clear; + __clipList[_CLIP_TYPE_CLIPBOARD].request = ecore_x_selection_clipboard_request; + __clipList[_CLIP_TYPE_CLIPBOARD].active = false; + __clipList[_CLIP_TYPE_CLIPBOARD].pBuffer = null; + __clipList[_CLIP_TYPE_CLIPBOARD].pRetrievedBuffer = null; + __clipList[_CLIP_TYPE_CLIPBOARD].bufferLength = 0; + __clipList[_CLIP_TYPE_CLIPBOARD].completed = false; + + __clipList[_CLIP_TYPE_XDND].selection = ECORE_X_SELECTION_XDND; + __clipList[_CLIP_TYPE_XDND].request = ecore_x_selection_xdnd_request; + __clipList[_CLIP_TYPE_XDND].active = false; + __clipList[_CLIP_TYPE_XDND].pBuffer = null; + __clipList[_CLIP_TYPE_XDND].pRetrievedBuffer = null; + __clipList[_CLIP_TYPE_XDND].bufferLength = 0; + __clipList[_CLIP_TYPE_XDND].completed = false; + + for (int i = 0; i < _ATOM_MAX; i++) + { + __atomList[i].atom = ecore_x_atom_get(__atomList[i].pName); + //ecore_x_selection_converter_atom_add(__atomList[i].atom, __atomList[i].convert); + + SysLog(NID_UI, "[Clipboard] __atomList[%d] : pName = %s, atom = %d", i, __atomList[i].pName, __atomList[i].atom); + } + + result r = E_SUCCESS; + + __pClearClip = ecore_event_handler_add(ECORE_X_EVENT_SELECTION_CLEAR, ClearClip, NULL); + SysTryCatch(NID_UI, __pClearClip, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + __pNotifyClip = ecore_event_handler_add(ECORE_X_EVENT_SELECTION_NOTIFY, NotifyClip, NULL); + SysTryCatch(NID_UI, __pNotifyClip, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + __pClipboardClosed = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_FOCUS_IN, OnClipboardClosed, null); + SysTryCatch(NID_UI, __pClipboardClosed, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + __atomRotateRootAngle = ecore_x_atom_get("_E_ILLUME_ROTATE_ROOT_ANGLE"); + + return r; + +CATCH: + for (int i = 0; i < _ATOM_MAX; i++) + { + if (__atomList[i].atom) + { + ecore_x_selection_converter_atom_del(__atomList[i].atom); + } + } + + if (__pClearClip) + { + ecore_event_handler_del(__pClearClip); + __pClearClip = null; + } + + if (__pNotifyClip) + { + ecore_event_handler_del(__pNotifyClip); + __pNotifyClip = null; + } + + if (__pClipboardClosed) + { + ecore_event_handler_del(__pClipboardClosed); + __pClipboardClosed = null; + } + + return r; +} + +bool +_EcoreEvas::IsValidClipFormat(_ClipFormat clipFormat) +{ + return ((_CLIP_FORMAT_TEXT & clipFormat) || + (_CLIP_FORMAT_MARKUP & clipFormat) || + (_CLIP_FORMAT_IMAGE & clipFormat) || + (_CLIP_FORMAT_VCARD & clipFormat) || + (_CLIP_FORMAT_HTML & clipFormat)); +} + +Ecore_X_Window +_EcoreEvas::GetCbhmWindow(void) const +{ + Ecore_X_Atom atomCbhm = ecore_x_atom_get(ATOM_CBHM_WINDOW_NAME); + Ecore_X_Window cbhmWin = 0; + + unsigned char* pBuf = NULL; + int num = 0; + int ret = ecore_x_window_prop_property_get(0, atomCbhm, XA_WINDOW, 0, &pBuf, &num); + + if (ret && num) + { + memcpy(&cbhmWin, pBuf, sizeof(Ecore_X_Window)); + } + + if (pBuf) + { + free(pBuf); + } + + return cbhmWin; +} + +bool +_EcoreEvas::SendCbhmMessage(Ecore_X_Window xwin, const char* pMsg) +{ + Ecore_X_Window cbhmWin = GetCbhmWindow(); + Ecore_X_Atom atomCbhmMsg = ecore_x_atom_get(ATOM_CBHM_MSG); + + if (!cbhmWin || !atomCbhmMsg) + { + return false; + } + + XClientMessageEvent m; + memset(&m, 0, sizeof(m)); + m.type = ClientMessage; + m.display = (Display*)ecore_x_display_get(); + m.window = xwin; + m.message_type = atomCbhmMsg; + m.format = 8; + snprintf(m.data.b, 20, "%s", pMsg); + + XSendEvent((Display*)ecore_x_display_get(), cbhmWin, False, NoEventMask, (XEvent*)&m); + + ecore_x_sync(); + + // [SLP] + Thread::Sleep(100); + + return true; +} + +bool +_EcoreEvas::SetCbhmItem(Ecore_X_Window xwin, Ecore_X_Atom dataType, char* pItemData) +{ + Ecore_X_Window cbhmWin = GetCbhmWindow(); + Ecore_X_Atom atomCbhmItem = ecore_x_atom_get(ATOM_CBHM_ITEM); + + ecore_x_sync(); + ecore_x_window_prop_property_set(cbhmWin, atomCbhmItem, dataType, 8, pItemData, strlen(pItemData) + 1); + ecore_x_sync(); + + if (SendCbhmMessage(xwin, ATOM_CBHM_SET_ITEM)) + { + return true; + } + + return false; +} + +void* +_EcoreEvas::GetCbhmReply(Ecore_X_Window xwin, Ecore_X_Atom property, Ecore_X_Atom* pDataType, int* pNum) const +{ + unsigned char* pData = null; + + if (pDataType) + { + *pDataType = 0; + } + + if (!property) + { + return null; + } + + ecore_x_sync(); + + if (pNum) + { + *pNum = 0; + } + + long unsigned int numRet = 0; + long unsigned int bytes = 0; + int ret = 0; + int sizeRet = 0; + unsigned int i = 0; + unsigned char* pPropRet = null; + Ecore_X_Atom typeRet; + + ret = XGetWindowProperty((Display*)ecore_x_display_get(), xwin, property, 0, LONG_MAX, False, + ecore_x_window_prop_any_type(), (Atom*)&typeRet, &sizeRet, &numRet, &bytes, &pPropRet); + if (ret != Success) + { + return null; + } + + if (!numRet) + { + XFree(pPropRet); + return null; + } + + if (!(pData = (unsigned char*)malloc(numRet * sizeRet / 8))) + { + XFree(pPropRet); + return null; + } + + switch (sizeRet) + { + case 8: + for (i = 0; i < numRet; i++) + (pData)[i] = pPropRet[i]; + break; + case 16: + for (i = 0; i < numRet; i++) + ((unsigned short *)pData)[i] = ((unsigned short *)pPropRet)[i]; + break; + case 32: + for (i = 0; i < numRet; i++) + ((unsigned int *)pData)[i] = ((unsigned long *)pPropRet)[i]; + break; + } + + XFree(pPropRet); + + // [SLP] + Thread::Sleep(100); + + if (pNum) + { + *pNum = numRet; + } + + if (pDataType) + { + *pDataType = typeRet; + } + + return pData; +} + +int +_EcoreEvas::GetCbhmItemCount(void) const +{ + char* pRet = null; + int count = null; + + Ecore_X_Atom atomCbhmCountGet = ecore_x_atom_get(ATOM_CBHM_COUNT_GET); + Ecore_X_Window cbhmWin = GetCbhmWindow(); + + pRet = (char*)GetCbhmReply(cbhmWin, atomCbhmCountGet, null, null); + if (pRet) + { + count = atoi(pRet); + free(pRet); + return count; + } + + return -1; +} + +bool +_EcoreEvas::GetCbhmItem(int index, Ecore_X_Atom* pDataType, char** pBuffer) const +{ + if (pBuffer) + { + *pBuffer = null; + } + + if (pDataType) + { + *(int*)pDataType = 0; + } + + Ecore_X_Window cbhmWin = GetCbhmWindow(); + char sendBuf[20]; + char* pRet; + + snprintf(sendBuf, 20, "CBHM_ITEM%d", index); + Ecore_X_Atom atomCbhmItem = ecore_x_atom_get(sendBuf); + Ecore_X_Atom atomItemType = 0; + + pRet = (char*)GetCbhmReply(cbhmWin, atomCbhmItem, &atomItemType, NULL); + if (pRet) + { + if (pBuffer) + { + *pBuffer = pRet; + } + else + { + free(pRet); + } + + if (pDataType) + { + *pDataType = atomItemType; + } + + Ecore_X_Atom x_atom_cbhm_error = ecore_x_atom_get(ATOM_CBHM_ERROR); + if (atomItemType == x_atom_cbhm_error) + { + return false; + } + + return true; + } + + return false; +} + +}} // Tizen::Ui + diff --git a/src/ui/FUi_EcoreEvasMgr.cpp b/src/ui/FUi_EcoreEvasMgr.cpp new file mode 100644 index 0000000..921fb62 --- /dev/null +++ b/src/ui/FUi_EcoreEvasMgr.cpp @@ -0,0 +1,115 @@ +// +// 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_EcoreEvasMgr.cpp + * @brief This is the implementation file for the _EcoreEvasMgr class. + */ + +#include +#include +#include +#include "FUi_EcoreEvasMgr.h" +#include "FUi_EcoreEvas.h" + +using namespace Tizen::Ui; + +namespace +{ +_EcoreEvasMgr* __pEcoreEvasMgr = null; +} // Anonymous + +namespace Tizen { namespace Ui +{ + +_EcoreEvasMgr::_EcoreEvasMgr(void) + : __pEcoreEvas(null) +{ +} + +_EcoreEvasMgr::~_EcoreEvasMgr(void) +{ +} + +void +_EcoreEvasMgr::SetEcoreEvas(const _EcoreEvas& ecoreEvas) +{ + __pEcoreEvas = &ecoreEvas; +} + +_EcoreEvas* +_EcoreEvasMgr::GetEcoreEvas(void) const +{ + return const_cast<_EcoreEvas*>(__pEcoreEvas); +} + +void +_EcoreEvasMgr::BeginMainLoop(void) +{ + ecore_main_loop_begin(); +} + +void +_EcoreEvasMgr::EndMainLoop(void) +{ + ecore_main_loop_quit(); +} + +void +_EcoreEvasMgr::SetRenderBackend(int backend) +{ + GetEcoreEvas()->SetRenderBackend((_RenderBackend)backend); +} + +int +_EcoreEvasMgr::GetRenderBackend(void) +{ + return GetEcoreEvas()->GetRenderBackend(); +} + +void +DestroyEcoreEvasMgr(void) +{ + _EcoreEvasMgr* pEcoreEvasMgr = GetEcoreEvasMgr(); + + if (pEcoreEvasMgr) + { + _EcoreEvas* pEcoreEvas = pEcoreEvasMgr->GetEcoreEvas(); + if (pEcoreEvas) + { + delete pEcoreEvas; + } + } + + delete __pEcoreEvasMgr; + __pEcoreEvasMgr = null; +} + +_EcoreEvasMgr* +GetEcoreEvasMgr(void) +{ + if (__pEcoreEvasMgr) + { + return __pEcoreEvasMgr; + } + + __pEcoreEvasMgr = new (std::nothrow) _EcoreEvasMgr; + + return __pEcoreEvasMgr; +} + +}} // Tizen::Ui diff --git a/src/ui/FUi_EflUiEventManager.cpp b/src/ui/FUi_EflUiEventManager.cpp new file mode 100644 index 0000000..bd9fa40 --- /dev/null +++ b/src/ui/FUi_EflUiEventManager.cpp @@ -0,0 +1,2098 @@ +// +// 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_EflUiEventManager.cpp + * @brief This is the implementation file for _EflUiEventManager class. + */ +#include +#include +#include +#ifdef KEY_CAMERA +#undef KEY_CAMERA +#endif +#ifdef KEY_BACK +#undef KEY_BACK +#endif +#ifdef KEY_HOME +#undef KEY_HOME +#endif +#ifdef KEY_MAIL +#undef KEY_MAIL +#endif +#ifdef KEY_MUTE +#undef KEY_MUTE +#endif +#ifdef KEY_APPS +#undef KEY_APPS +#endif +#ifdef KEY_MENU +#undef KEY_MENU +#endif +#ifdef KEY_SEARCH +#undef KEY_SEARCH +#endif +#ifdef KEY_VOICE +#undef KEY_VOICE +#endif +#include +#include +#include +#include +#include +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_Control.h" +#include "FUi_ControlManager.h" +#include "FUi_KeyEventManager.h" +#include "FUi_Window.h" +#include "FUi_UiEventManager.h" +#include "FUi_EflUiEventManager.h" +#include "FUi_UiTouchEvent.h" +#include "FUi_UiNotificationEvent.h" +#include "FUi_UiKeyEvent.h" +#include "FUi_UiFocusEvent.h" +#include "FUi_EcoreEvasMgr.h" +#include "FUi_EcoreEvas.h" +#include "FUi_TouchManager.h" +#include "FUiAnim_EflNode.h" +#include "FUiAnim_ControlVisualElement.h" +#include "FUiAnim_RootVisualElement.h" +#include "FUiAnim_EflLayer.h" +#include "FUi_AccessibilityManager.h" + +using namespace std; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Animations; +using namespace Tizen::Graphics; +using namespace Tizen::Base::Collection; +using namespace Tizen::Base; +using namespace Tizen::Ui::Controls; + +namespace +{ +#define __UNUSED__ + +int __touchTailCount = 0; +const int KEY_COUNT = 300; +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) +{ + _VisualElement* pVisualElement = control.GetVisualElement(); + SysTryReturn(NID_UI, pVisualElement, null, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + _EflNode* pEflNode = dynamic_cast<_EflNode*>(pVisualElement->GetNativeNode()); + SysTryReturn(NID_UI, pEflNode, null, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + return (Evas_Object*)pEflNode->GetGroupContainer(); +} + +/* +Evas* +GetEvas(const _Control& control) +{ + Evas* pEvas = null; + Evas_Object* pEvasObject = GetEvasObject(control); + if (pEvasObject) + { + pEvas = evas_object_evas_get(pEvasObject); + SysTryReturn(NID_UI, pEvas, null, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + } + + return pEvas; +} +*/ + +class _Event +{ +public: + _Event(void) + : _pEventManager(null) + { + _pEventManager = _UiEventManager::GetInstance(); + SysTryReturnVoidResult(NID_UI, _pEventManager, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + SetLastResult(E_SUCCESS); + } + + virtual ~_Event(void) + { + } + +private: + _Event(const _Event& rhs); + _Event& operator =(const _Event& rhs); + + virtual result SendImpl(void) = 0; + +public: + result Send(void) + { + return SendImpl(); + } + +protected: + _UiEventManager* _pEventManager; +}; // _Event + +struct _EvasConvertKeys +{ + _KeyCode code; + const char* pName; +}; + +const _EvasConvertKeys keyTable[] = +{ + { _KEY_ESC, "Escape" }, + { _KEY_GRAVE, "grave" }, + { _KEY_1, "1" }, + { _KEY_2, "2" }, + { _KEY_3, "3" }, + { _KEY_4, "4" }, + { _KEY_5, "5" }, + { _KEY_6, "6" }, + { _KEY_7, "7" }, + { _KEY_8, "8" }, + { _KEY_9, "9" }, + { _KEY_0, "0" }, + { _KEY_MINUS, "minus" }, + { _KEY_EQUAL, "equal" }, + { _KEY_BACKSLASH, "backslash" }, + { _KEY_BACKSPACE, "BackSpace" }, + { _KEY_TAB, "Tab" }, + { _KEY_Q, "q" }, + { _KEY_W, "w" }, + { _KEY_E, "e" }, + { _KEY_R, "r" }, + { _KEY_T, "t" }, + { _KEY_Y, "y" }, + { _KEY_U, "u" }, + { _KEY_I, "i" }, + { _KEY_O, "o" }, + { _KEY_P, "p" }, + { _KEY_LBRACKET, "bracketleft" }, + { _KEY_RBRACKET, "bracketright" }, + { _KEY_ENTER, "Return" }, + { _KEY_CAPSLOCK, "Caps_Lock" }, + { _KEY_A, "a" }, + { _KEY_S, "s" }, + { _KEY_D, "d" }, + { _KEY_F, "f" }, + { _KEY_G, "g" }, + { _KEY_H, "h" }, + { _KEY_J, "j" }, + { _KEY_K, "k" }, + { _KEY_L, "l" }, + { _KEY_SEMICOLON, "semicolon" }, + { _KEY_APOSTROPHE, "apostrophe" }, + { _KEY_SHIFT_L, "Shift_L" }, + { _KEY_Z, "z" }, + { _KEY_X, "x" }, + { _KEY_C, "c" }, + { _KEY_V, "v" }, + { _KEY_B, "b" }, + { _KEY_N, "n" }, + { _KEY_M, "m" }, + { _KEY_COMMA, "comma" }, + { _KEY_DOT, "period" }, + { _KEY_SLASH, "slash" }, + { _KEY_SHIFT_R, "Shift_R" }, + { _KEY_CTRL_L, "Control_L" }, + { _KEY_LALT, "Alt_L" }, + { _KEY_SPACE, "space" }, + { _KEY_RALT, "Alt_R" }, + { _KEY_CTRL_R, "Control_R" }, + { _KEY_FN_1, "F1" }, + { _KEY_FN_2, "F2" }, + { _KEY_FN_3, "F3" }, + { _KEY_FN_4, "F4" }, + { _KEY_FN_5, "F5" }, + { _KEY_FN_6, "F6" }, + { _KEY_FN_7, "F7" }, + { _KEY_FN_8, "F8" }, + { _KEY_FN_9, "F9" }, + { _KEY_FN_10, "F10" }, + { _KEY_FN_11, "F11" }, + { _KEY_FN_12, "F12" }, + { _KEY_NUM_LOCK, "Num_Lock" }, + { _KEY_NUMPAD_DIVIDE, "KP_Divide" }, + { _KEY_NUMPAD_MULTIPLY, "KP_Multiply" }, + { _KEY_NUMPAD_SUBTRACT, "KP_Subtract" }, + { _KEY_NUMPAD_7, "KP_Home" }, + { _KEY_NUMPAD_8, "KP_Up" }, + { _KEY_NUMPAD_9, "KP_Prior" }, + { _KEY_NUMPAD_4, "KP_Left" }, + { _KEY_NUMPAD_5, "KP_Begin" }, + { _KEY_NUMPAD_6, "KP_Right" }, + { _KEY_NUMPAD_ADD, "KP_Add" }, + { _KEY_NUMPAD_1, "KP_End" }, + { _KEY_NUMPAD_2, "KP_Down" }, + { _KEY_NUMPAD_3, "KP_Next" }, + { _KEY_NUMPAD_0, "KP_Insert" }, + { _KEY_NUMPAD_DOT, "KP_Delete" }, + { _KEY_NUMPAD_ENTER, "KP_Enter" }, + { _KEY_PRINT, "Print" }, + { _KEY_SCROLL_LOCK, "Scroll_Lock" }, + { _KEY_PAUSEBREAK, "Pause" }, + { _KEY_INSERT, "Insert" }, + { _KEY_HOME_BUTTON, "Home" }, + { _KEY_PAGE_UP, "Prior" }, + { _KEY_DELETE, "Delete" }, + { _KEY_END_BUTTON, "End" }, + { _KEY_PAGE_DOWN, "Next" }, + { _KEY_UP, "Up" }, + { _KEY_LEFT, "Left" }, + { _KEY_DOWN, "Down" }, + { _KEY_RIGHT, "Right" }, + { _KEY_CONTEXT_MENU, "Menu" }, + { _KEY_MENU, "XF86Send" }, + + { _KEY_COMMA, "less" }, /*virtual keypad <*/ + { _KEY_9, "parenleft" }, /*virtual keypad (*/ + { _KEY_0, "parenright" }, /*virtual keypad )*/ + + { _KEY_BACK, "XF86Stop" }, +// { _KEY_HOME, "XF86Phone" }, + { _KEY_WEB_PAGE, "XF86WWW" }, + { _KEY_MAIL, "XF86Mail" }, + { _KEY_SCREEN_SAVER, "XF86ScreenSaver" }, + { _KEY_BRIGHTNESS_DOWN, "XF86MonBrightnessDown" }, + { _KEY_BRIGHTNESS_UP, "XF86MonBrightnessUp" }, + { _KEY_MUTE, "XF86AudioMute" }, +// { _KEY_VOLUME_DOWN, "XF86AudioLowerVolume" }, +// { _KEY_VOLUME_UP, "XF86AudioRaiseVolume" }, + { _KEY_PLAY_PAUSE, "XF86AudioPlay" }, + { _KEY_NEXT_SONG, "XF86AudioNext" }, + { _KEY_PREVIOUS_SONG, "XF86AudioPrev" }, + { _KEY_APPS, "XF86Launch0" }, + { _KEY_MENU, "XF86Send" }, + { _KEY_SOFT_KEYBOARD, "XF86MenuKB" }, + { _KEY_SEARCH, "XF86Search" }, + { _KEY_VOICE, "XF86Launch2" }, + { _KEY_QUICK_PANEL, "XF86Tools" } +}; + +class _KeyEvent + : public _Event +{ +public: + _KeyEvent(KeyState keyState, _KeyCode keyCode, int keyModifier, void* pUserData) + : __pTarget(null) + , __keyInfo(keyState, keyCode, keyModifier, pUserData) + { + __pTarget = GetTarget(keyCode); + if (IsNativeWindowActivated(__pTarget) == false) + { + SysTryReturnVoidResult(NID_UI, IsNativeWindowActivated(__pTarget), E_SYSTEM, "[E_SYSTEM] NativeWindow is not activated yet"); + } + } + + virtual ~_KeyEvent(void) + { + } + + static _KeyCode GetKeyCode(const char* pKeyName) + { + ClearLastResult(); + + SysTryReturn(NID_UI, pKeyName, _KEY_INVALID, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + for (unsigned int i = 0; i < sizeof(keyTable) / sizeof(_EvasConvertKeys); ++i) + { + if (strcmp(keyTable[i].pName, pKeyName) == 0) + { + return keyTable[i].code; + } + } + + return _KEY_INVALID; + } + + static int GetKeyModifier(const int keyModifier) + { + ClearLastResult(); + unsigned int modifier = _KEY_MODIFIER_NONE; + + if(ECORE_EVENT_MODIFIER_SHIFT & keyModifier) + { + modifier |= _KEY_MODIFIER_SHIFT; + } + if(ECORE_EVENT_MODIFIER_CTRL & keyModifier) + { + modifier |= _KEY_MODIFIER_CTRL; + } + if(ECORE_EVENT_MODIFIER_ALT & keyModifier) + { + modifier |= _KEY_MODIFIER_ALT; + } + if(ECORE_EVENT_MODIFIER_WIN & keyModifier) + { + modifier |= _KEY_MODIFIER_WIN; + } + if(ECORE_EVENT_MODIFIER_SCROLL & keyModifier) + { + modifier |= _KEY_MODIFIER_SCROLL; + } + if(ECORE_EVENT_MODIFIER_NUM & keyModifier) + { + modifier |= _KEY_MODIFIER_NUM; + } + if(ECORE_EVENT_MODIFIER_CAPS & keyModifier) + { + modifier |= _KEY_MODIFIER_CAPS; + } + if(ECORE_EVENT_LOCK_SCROLL & keyModifier) + { + modifier |= _KEY_LOCK_SCROLL; + } + if(ECORE_EVENT_LOCK_NUM & keyModifier) + { + modifier |= _KEY_LOCK_NUM; + } + if(ECORE_EVENT_LOCK_CAPS & keyModifier) + { + modifier |= _KEY_LOCK_CAPS; + } + if(ECORE_EVENT_LOCK_SHIFT & keyModifier) + { + modifier |= _KEY_LOCK_SHIFT; + } + if(ECORE_EVENT_MODIFIER_ALTGR & keyModifier) + { + modifier |= _KEY_MODIFIER_ALTGR; + } + + return modifier; + } + +private: + _KeyEvent(const _KeyEvent& rhs); + _KeyEvent& operator =(const _KeyEvent& rhs); + + virtual result SendImpl(void) + { + SysTryReturn(NID_UI, __pTarget, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + _UiKeyEvent event(__pTarget->GetHandle(), __keyInfo); + + return _pEventManager->SendEvent(event); + } + + _Control* GetTarget(_KeyCode keyCode) const + { + _KeyEventManager* pKeyEventManager = _KeyEventManager::GetInstance(); + SysTryReturn(NID_UI, pKeyEventManager, null, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + _ControlManager* pControlManager = _ControlManager::GetInstance(); + SysTryReturn(NID_UI, pControlManager, null, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + _Control* pControl = pControlManager->GetFocusControl(); + if (!pControl) + { + pControl = pControlManager->GetCurrentFrame(); + } + SysTryReturn(NID_UI, pControl, null, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + SetLastResult(E_SUCCESS); + + return pControl; + } + + bool + IsNativeWindowActivated(_Control* pControl) + { + bool nativeWindowActivated = false; + _Control* pParent = pControl; + + while (pParent) + { + _Window* pWindow = dynamic_cast<_Window*>(pParent); + if (pWindow && (pWindow->GetNativeWindowActivated() == true)) + { + nativeWindowActivated = true; + break; + } + + pParent = pParent->GetParent(); + } + return nativeWindowActivated; + } + +private: + _Control* __pTarget; + _KeyInfo __keyInfo; +}; // _KeyEvent + +class _TouchEventManager +{ +public: + static _TouchEventManager* GetInstance(void) + { + if (__pInstance == null) + { + __pInstance = new (std::nothrow) _TouchEventManager; + SysTryReturn(NID_UI, __pInstance, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + } + + SetLastResult(E_SUCCESS); + + return __pInstance; + } + + result AddControl(int pointId, const _ControlHandle& controlHandle) + { + bool exist = false; + result r = E_SUCCESS; + + __pTargetMap->ContainsKey(pointId, exist); + + if (exist) + { + r = __pTargetMap->Remove(pointId); + 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, "A system error occurred."); + + return r; + } + + _Control* GetControl(int pointId) + { + SysTryReturn(NID_UI, __pTargetMap, null, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + _ControlHandle controlHandle; + + __pTargetMap->GetValue(pointId, controlHandle); + + _ControlManager* pControlManager = _ControlManager::GetInstance(); + result r = GetLastResult(); + SysTryReturn(NID_UI, pControlManager, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + return pControlManager->GetObject(controlHandle); + } + +private: + _TouchEventManager(void) + { + result r = E_SUCCESS; + unique_ptr > pTargetMap(new (std::nothrow) HashMapT); + 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)); + + __pTargetMap = move(pTargetMap); + + SetLastResult(E_SUCCESS); + } + + ~_TouchEventManager(void) + { + } + + _TouchEventManager(const _TouchEventManager& rhs); + _TouchEventManager& operator =(const _TouchEventManager& rhs); + +private: + static _TouchEventManager* __pInstance; + unique_ptr > __pTargetMap; +}; + +_TouchEventManager* _TouchEventManager::__pInstance = null; + +class _TouchEvent + : public _Event +{ +public: + _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(); + SysTryReturnVoidResult(NID_UI, __pTouchEventManager, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + result r = E_SUCCESS; + Tizen::Graphics::Point current(x, y); + + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + SysTryReturnVoidResult(NID_UI, pTouchManager, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + unsigned int pointId = 0; + + if (status == _TOUCH_PRESSED) + { + IListT<_FingerInfo*>* pFingerInfoList = pTouchManager->GetMultiFingerInfoListN(); + SysTryReturnVoidResult(NID_UI, pFingerInfoList, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + const int count = pFingerInfoList->GetCount(); + + for (int i = 0; i < count; i++) + { + _FingerInfo* pFingerInfo = null; + pFingerInfoList->GetAt(i, pFingerInfo); + if (pFingerInfo == null) + { + continue; + } + + 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; + + pointId = pTouchManager->GeneratePointId(deviceId); + SysSecureLog(NID_UI, "OnTouchPressed pointId = %d", pointId); + } + else + { + pointId = pTouchManager->GetPointId(deviceId); + } + + if (status == _TOUCH_RELEASED) + { + SysSecureLog(NID_UI, "OnTouchReleased pointId = %d", pointId); + } + + 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."); + + _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; + } + + 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."); + if (r != E_SUCCESS) + { + SetLastResult(E_SYSTEM); + return; + } + } + else + { + current = _CoordinateSystemUtils::InverseTransform(current); + } + + __touchInfo.SetTouchInfo(pointId, status, current, false, timeStamp, z, buttons); + + if (status == _TOUCH_PRESSED) + { + pTouchManager->SetListenerOnly(pointId, false); + _Control* pControl = GetTarget(current.x, current.y, pRootControl, pointId); + + if (pControl == null) + { + pTouchManager->ResetTouchInfo(); + SysSecureLog(NID_UI, "ResetTouchInfo x(%d), y(%d), deviceID(%d), pointID(%d)", current.x, current.y, deviceId, pointId); + SetLastResult(E_SYSTEM); + return; + } + else + { + r = __pTouchEventManager->AddControl(pointId, pControl->GetHandle()); + if (r != E_SUCCESS) + { + SetLastResult(E_SYSTEM); + return; + } + } + } + else + { + _Control* pControl = pTouchManager->GetChangedTouchableTarget(); + if (pControl == null) + { + ClearLastResult(); + } + else + { + if (pControl->GetChangingEventTarget() == true && pControl->GetVisibleState() == true) + { + r = __pTouchEventManager->AddControl(pointId, pControl->GetHandle()); + SysSecureLog(NID_UI, "touch_moved, touch_released : pointId = %d, AddControl = 0x%x", pointId, pControl); + if (r != E_SUCCESS) + { + SetLastResult(E_SYSTEM); + return; + } + } + } + } + } + + virtual ~_TouchEvent(void) + { + } + +private: + virtual result SendImpl(void) + { + _Control* pTarget = __pTouchEventManager->GetControl(__touchInfo.GetPointId()); + if (pTarget == null) + { + if (__touchInfo.GetTouchStatus() == _TOUCH_MOVED) + { + SysLog(NID_UI, "Target is null for the move event, skip sendImpl"); + return E_SUCCESS; + } + + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + pTouchManager->SetTouchCanceled(null); + pTouchManager->ResetTouchInfo(); + + SysLog(NID_UI, "ResetTouchInfo"); + return E_SUCCESS; + } + + _UiTouchEvent event(pTarget->GetHandle(), __touchInfo); + + return _pEventManager->SendEvent(event); + } + +private: + _TouchEvent(const _TouchEvent& rhs); + _TouchEvent& operator =(const _TouchEvent& rhs); + + _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."); + + _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)); + + if (pRootControl) + { + _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* pTouchedWindow = pControlManager->GetTouchedWindow(); + if (pTouchedWindow == null) + { + SetLastResult(E_SYSTEM); + return null; + } + + _RootVisualElement* pRootVisualElement = pTouchedWindow->GetRootVisualElement(); + if (pRootVisualElement == null) + { + SetLastResult(E_SYSTEM); + return null; + } + + Tizen::Graphics::Rectangle touchedWindowBounds = pTouchedWindow->GetBounds(); + /*ptf.x = static_cast(x - touchedWindowBounds.x); + ptf.y = static_cast(y - touchedWindowBounds.y);*/ + + 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--) + { + _ControlVisualElement* pChildControlVisualElement = dynamic_cast<_ControlVisualElement*>(pList->GetAt(i)); + if (pChildControlVisualElement) + { + _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(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()) + { + 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(true)); + if ((x >= ownerRc.x) && (x <= (ownerRc.x + ownerRc.width)) && (y >= ownerRc.y) && (y <= (ownerRc.y + ownerRc.height))) + { + pControl = pOwner; + } + } + } + + 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 + { + 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; + } + } + } + + if (pControl != null) + { + return pControl; + } + } + + return pControl; + } + + result GetPosition(_TouchStatus status, int x, int y, Point& point) const + { + result r = E_SUCCESS; + + _ControlManager* pControlManager = _ControlManager::GetInstance(); + SysTryReturn(NID_UI, pControlManager, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + _Window* pWindow = pControlManager->GetTouchedWindow(); + if (pWindow == null) + { + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + if (pTouchManager) + { + pTouchManager->ResetTouchInfo(); + SysLog(NID_UI, "pWindow is null, ResetTouchInfo"); + } + } + 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: + _TouchInfo __touchInfo; + _TouchEventManager* __pTouchEventManager; +}; // _TouchEvent + +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."); + + _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; +} + +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) +{ + 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."); + + _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(); + + __keyPressed[_KeyEvent::GetKeyCode(pEv->keyname)] = true; + + 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."); + + if (__keyPressed[_KeyEvent::GetKeyCode(pEv->keyname)] != true) + { + SysLog(NID_UI, "KeyCode %s is not pressed", pEv->keyname); + return ECORE_CALLBACK_PASS_ON; + } + + _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); + + if (pEv->message_type != ecore_x_atom_get("CBHM_MSG")) + { + return ECORE_CALLBACK_PASS_ON; + } + + if (!strcmp("SET_OWNER", pEv->data.b)) + { + _KeyEvent event(KEY_PRESSED, _KEY_CLIPBOARD, 0, pEv); + SysSecureLog(NID_UI, "KeyName = clipboard, KeyCode = _KEY_CLIPBOARD, KeyModifier = 0"); + event.Send(); + + SetLastResult(E_SUCCESS); + } + + return ECORE_CALLBACK_PASS_ON; +} + + +void +ResetTouchQueueStatus(void) +{ + __touchTailCount = 20; + if (!__pVSyncTimer) + { + __pVSyncTimer = ecore_timer_add(1.0 / 60.0, TouchEventHandlerVSync, null); + } +} + +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; +} + +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) + { + return false; + } + + std::list::iterator pos = __pRawTouchInfoList->begin(); + RawTouchInfo cur = *pos; + if (cur.timeStamp >= timeStamp) + { + return false; + } + + std::list::iterator iter = __pRawTouchInfoList->erase(pos); + int devId = cur.device; + + for (; iter != __pRawTouchInfoList->end(); iter++) + { + if (cur.timeStamp >= timeStamp) + { + *pRawInfo = cur; + return true; + } + + switch (cur.type) + { + case Tizen::Ui::_TOUCH_PRESSED: + case Tizen::Ui::_TOUCH_RELEASED: + *pRawInfo = cur; + return true; + break; + + case Tizen::Ui::_TOUCH_MOVED: + if ((*iter).device != devId) + { + continue; + } + + if (cur.type != (*iter).type || cur.window != (*iter).window || cur.buttons != (*iter).buttons) + { + *pRawInfo = cur; + return true; + } + + 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; + } + + 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; + + return true; + } + else + { + cur = *iter; + iter = __pRawTouchInfoList->erase(iter); + } + break; + + default: + break; + } + } + + *pRawInfo = cur; + + return true; +} + + +bool +DequeueTouchPressEvent(unsigned int& window, int& x, int& y, int& device, unsigned int& timeStamp, int& buttons, int& type, bool forceNow) +{ + RawTouchInfo cur; + + cur.window = 0; + cur.x = -1; + cur.y = -1; + cur.type = -1; + cur.buttons = -1; + cur.device = -1; + cur.timeStamp = 0; + + double checkTime = 0.0; + + if (forceNow) + { + checkTime = ecore_time_get() * 1000.0; + } + else + { + checkTime = ecore_time_get() * 1000.0 - 8.0; + } + + if (!FindTouchEventAtTime(&cur, (unsigned int)checkTime)) + { + return false; + } + + window = cur.window; + x = cur.x; + y = cur.y; + device = cur.device; + timeStamp = cur.timeStamp; + buttons = cur.buttons; + type = cur.type; + + return true; +} + +Eina_Bool +TouchEventHandlerVSync(void* pData) +{ + SysTryReturn(NID_UI, __pRawTouchInfoList, EINA_FALSE, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + if (__pRawTouchInfoList->size() <= 0) + { + if (--__touchTailCount <= 0) + { + __pVSyncTimer = null; + return EINA_FALSE; + } + } + + 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)) + { + 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; + + 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 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."); + + if (pEv->multi.device != 0) + { + bool touchableApp = false; + for (int deviceCount = 0; deviceCountroot.x, pEv->root.y, pEv->multi.device, pEv->buttons); + + if (__touchPressed[pEv->multi.device] == true) + { + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + if (pTouchManager) + { + pTouchManager->SetTouchCanceled(null); + SysLog(NID_UI, "pWindow is null, CancelTouch"); + + for(int i=0; iResetTouchInfo(); + SysLog(NID_UI, "pWindow is null, ResetTouchInfo"); + } + } + + __touchPressed[pEv->multi.device] = true; + + if (!QueueTouchPressEvent(pEv)) + { + 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) + { + SysLog(NID_UI, "[%s] Propagating.", GetErrorMessage(r)); + return ECORE_CALLBACK_PASS_ON; + } + + event.Send(); + } + else + { + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + if (pTouchManager) + { + pTouchManager->ResetTouchInfo(); + SysLog(NID_UI, "Mouse right/wheel button is pressed, ResetTouchInfo"); + } + + _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); + + return ECORE_CALLBACK_PASS_ON; +} + +Eina_Bool +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."); + + int pointId = pTouchManager->GetPointId(pEv->multi.device); + + 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, 0, pEv->buttons); + + result r = GetLastResult(); + if (r!= E_SUCCESS) + { + SysLog(NID_UI, "[%s] Propagating.", GetErrorMessage(r)); + return ECORE_CALLBACK_PASS_ON; + } + + event.Send(); + } + else + { + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + if (pTouchManager) + { + pTouchManager->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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + int count = pFingerInfoList->GetCount(); + + for (int i = 0; i < count; i++) + { + _FingerInfo* pFingerInfo = null; + pFingerInfoList->GetAt(i, pFingerInfo); + if (pFingerInfo == null) + { + continue; + } + + if (static_cast(pFingerInfo->GetDeviceId()) == pEv->multi.device) + { + pFingerInfo->SetPointId(INVALID_POINT_ID); + break; + } + } + delete pFingerInfoList; + + pTouchManager->SetChangedTouchableTarget(null); + + SetLastResult(E_SUCCESS); + return ECORE_CALLBACK_PASS_ON; +} + +Eina_Bool +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); + + 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) + { + return ECORE_CALLBACK_PASS_ON; + } + + event.Send(); + + SetLastResult(E_SUCCESS); + + return ECORE_CALLBACK_PASS_ON; +} + +Eina_Bool +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, "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) + { + return ECORE_CALLBACK_PASS_ON; + } + + event.Send(); + + SetLastResult(E_SUCCESS); + + return ECORE_CALLBACK_PASS_ON; +} + +Eina_Bool +OnKeyboardInserted(void* pData __UNUSED__, int type __UNUSED__, void* pEventInfo) +{ + Ecore_X_Event_Window_Property *pEv = static_cast (pEventInfo); + if ( pEv->atom != __keyboardExist) + { +// SysLog(NID_UI, "OnKeyboardInserted - atom of event(%d), __keyboardExist(%d)", pEv->atom, __keyboardExist); + return ECORE_CALLBACK_PASS_ON; + } + + ArrayList* pArgs = null; + result r = E_SUCCESS; + Boolean* pIsKeyboardOn = null; + _UiEventManager* pEventManager = _UiEventManager::GetInstance(); + SysTryReturn(NID_UI, pEventManager, ECORE_CALLBACK_PASS_ON, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + _Control* pControl = _ControlManager::GetInstance()->GetFocusControl(); + SysTryReturn(NID_UI, pControl, ECORE_CALLBACK_PASS_ON, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + bool isKeyboardOn = false; + unsigned int value = 0; + int returnResult = -1; + + returnResult = ecore_x_window_prop_card32_get(pEv->win, __keyboardExist, &value, 1); + if (returnResult) + { + if (value > 0) + { + isKeyboardOn = true; + } + + pArgs = new (std::nothrow) ArrayList; + 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)); + + String* pString = new (std::nothrow) String(KEYBOARD_INSERTED_EVENT); + r = pArgs->Add(*pString); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pIsKeyboardOn = new (std::nothrow) Boolean(isKeyboardOn); + r = pArgs->Add(*pIsKeyboardOn); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + _UiNotificationEvent event(pControl->GetHandle(), pArgs); + r = pEventManager->SendEvent(event); +// SysLog(NID_UI, "OnKeyboardInserted - sent keyboard inserted noti"); + } + + SetLastResult(r); + + return ECORE_CALLBACK_PASS_ON; + +CATCH: + if (pArgs) + { + delete pArgs; + } + + if (pIsKeyboardOn) + { + delete pIsKeyboardOn; + } + + return ECORE_CALLBACK_PASS_ON; +} + +Eina_Bool +OnWindowFocusIn(void* pData __UNUSED__, int type __UNUSED__, void* pEventInfo) +{ + SysLog(NID_UI, "Enter"); + + Ecore_X_Event_Window_Focus_In* pEv = static_cast(pEventInfo); + 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, null, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + int count = pControlManager->GetWindowCount(); + + _Control* pFocusedControl = null; + for (int i = count - 1; i >= 0; --i) + { + _Window* pWindow = pControlManager->GetWindow(i); + if (pWindow) + { + NativeWindowHandle nativeWindowHandle = pWindow->GetNativeHandle(); + if (pEv->win == nativeWindowHandle) + { + pFocusedControl = pWindow->GetCurrentFocusControl(); + + if (pFocusedControl) + { + pFocusedControl->SetFocused(); + break; + } + } + } + } + _AccessibilityManager::GetInstance()->RequestAutoReading(_ACCESSIBILITY_AUTO_READING_MODE_FIRST_ITEM); + return ECORE_CALLBACK_PASS_ON; +} + +Eina_Bool +OnWindowFocusOut(void* pData __UNUSED__, int type __UNUSED__, void* pEventInfo) +{ + SysLog(NID_UI, "Enter"); + + Ecore_X_Event_Window_Focus_Out* pEv = static_cast(pEventInfo); + 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, null, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + _Control* pFocusedControl = pControlManager->GetFocusControl(); + if (pFocusedControl) + { + _Window* pRootWindow = pFocusedControl->GetRootWindow(); + if (pRootWindow) + { + NativeWindowHandle nativeWindowHandle = pRootWindow->GetNativeHandle(); + if (pEv->win == nativeWindowHandle) + { + pControlManager->TakeFocusFromControl(*pFocusedControl); + } + } + } + _AccessibilityManager::GetInstance()->RequestAutoReading(_ACCESSIBILITY_AUTO_READING_MODE_RESET); + return ECORE_CALLBACK_PASS_ON; +} + +// Evas Callbacks +void +OnEvasKeyPressed(void* pData, Evas* pEvas, Evas_Object* pEvasObject, void* pEventInfo) +{ + Evas_Event_Key_Down* pEv = static_cast (pEventInfo); + SysTryReturnVoidResult(NID_UI, pEv, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + SetLastResult(E_SUCCESS); +} + +void +OnEvasKeyReleased(void* pData, Evas* pEvas, Evas_Object* pEvasObject, void* pEventInfo) +{ + Evas_Event_Key_Up* pEv = static_cast (pEventInfo); + SysTryReturnVoidResult(NID_UI, pEv, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + SetLastResult(E_SUCCESS); +} + +void +OnEvasTouchPressed(void* pData, Evas* pEvas, Evas_Object* pEvasObject, void* pEventInfo) +{ + Evas_Event_Mouse_Down* pEv = static_cast (pEventInfo); + SysTryReturnVoidResult(NID_UI, pEv, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + _Control* pControl = static_cast<_Control*>(pData); + SysTryReturnVoidResult(NID_UI, pControl, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + if (__touchPressed[0] == true) + { + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + if (pTouchManager) + { + pTouchManager->SetTouchCanceled(null); + SysLog(NID_UI, "pWindow is null, CancelTouch"); + + __touchPressed[0] = false; + pTouchManager->ResetTouchInfo(); + SysLog(NID_UI, "pWindow is null, ResetTouchInfo"); + } + } + + __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); + + result r = GetLastResult(); + if (r != E_SUCCESS) + { + SysLog(NID_UI, "[%s] Propagating.", GetErrorMessage(r)); + return; + } + + event.Send(); + + SetLastResult(E_SUCCESS); +} + +void +OnEvasTouchReleased(void* pData, Evas* pEvas, Evas_Object* pEvasObject, void* pEventInfo) +{ + Evas_Event_Mouse_Up* pEv = static_cast (pEventInfo); + SysTryReturnVoidResult(NID_UI, pEv, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + _Control* pControl = static_cast<_Control*>(pData); + SysTryReturnVoidResult(NID_UI, pControl, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + __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); + + result r = GetLastResult(); + if (r != E_SUCCESS) + { + SysLog(NID_UI, "[%s] Propagating.", GetErrorMessage(r)); + return; + } + + event.Send(); + + SetLastResult(E_SUCCESS); +} + +void +OnEvasTouchMoved(void* pData, Evas* pEvas, Evas_Object* pEvasObject, void* pEventInfo) +{ + Evas_Event_Mouse_Move* pEv = static_cast (pEventInfo); + SysTryReturnVoidResult(NID_UI, pEv, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + _Control* pControl = static_cast<_Control*>(pData); + SysTryReturnVoidResult(NID_UI, pControl, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + SysSecureLog(NID_UI, "OnEvasTouchMoved - x(%d), y(%d)", pEv->cur.canvas.x, pEv->cur.canvas.x); + _TouchEvent event(0, _TOUCH_MOVED, pEv->cur.canvas.x, pEv->cur.canvas.y, pEv->timestamp, pControl); + + result r = GetLastResult(); + if (r != E_SUCCESS) + { + SysLog(NID_UI, "[%s] Propagating.", GetErrorMessage(r)); + return; + } + + event.Send(); + + SetLastResult(E_SUCCESS); +} + +void +OnEvasMultiTouchPressed(void* pData, Evas* pEvas, Evas_Object* pEvasObject, void* pEventInfo) +{ + Evas_Event_Multi_Down* pEv = static_cast (pEventInfo); + SysTryReturnVoidResult(NID_UI, pEv, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + SetLastResult(E_SUCCESS); +} + +void +OnEvasMultiTouchReleased(void* pData, Evas* pEvas, Evas_Object* pEvasObject, void* pEventInfo) +{ + Evas_Event_Multi_Up* pEv = static_cast (pEventInfo); + SysTryReturnVoidResult(NID_UI, pEv, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + SetLastResult(E_SUCCESS); +} + +void +OnEvasMultiTouchMoved(void* pData, Evas* pEvas, Evas_Object* pEvasObject, void* pEventInfo) +{ + Evas_Event_Multi_Move* pEv = static_cast (pEventInfo); + SysTryReturnVoidResult(NID_UI, pEv, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + SetLastResult(E_SUCCESS); +} + +}; // Anonymous + +namespace Tizen { namespace Ui +{ + +_EflUiEventManager::_EflUiEventManager(void) + : __notificaitonEventType(-1) +{ + unique_ptr > pEventHandlers(new (std::nothrow) LinkedListT); + SysTryReturnVoidResult(NID_UI, pEventHandlers, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + // Noti + __notificaitonEventType = ecore_event_type_new(); + SysTryReturnVoidResult(NID_UI, __notificaitonEventType >= 1, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + Ecore_Event_Handler* pEventHandler = ecore_event_handler_add(__notificaitonEventType, OnNotified, null); + SysTryReturnVoidResult(NID_UI, pEventHandler, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + pEventHandlers->Add(pEventHandler); + + // Key + pEventHandler = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, OnKeyPressed, null); + SysTryReturnVoidResult(NID_UI, pEventHandler, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + pEventHandlers->Add(pEventHandler); + + pEventHandler = ecore_event_handler_add(ECORE_EVENT_KEY_UP, OnKeyReleased, null); + SysTryReturnVoidResult(NID_UI, pEventHandler, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + pEventHandlers->Add(pEventHandler); + + // clipboard key + pEventHandler = ecore_event_handler_add(ECORE_X_EVENT_CLIENT_MESSAGE, OnClipboardMessageReceived, null); + SysTryReturnVoidResult(NID_UI, pEventHandler, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + pEventHandlers->Add(pEventHandler); + + // Touch + pEventHandler = ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, OnTouchPressed, null); + SysTryReturnVoidResult(NID_UI, pEventHandler, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + pEventHandlers->Add(pEventHandler); + + pEventHandler = ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP, OnTouchReleased, null); + SysTryReturnVoidResult(NID_UI, pEventHandler, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + pEventHandlers->Add(pEventHandler); + + pEventHandler = ecore_event_handler_add(ECORE_EVENT_MOUSE_MOVE, OnTouchMoved, null); + SysTryReturnVoidResult(NID_UI, pEventHandler, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + 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."); + + pEventHandlers->Add(pEventHandler); + + // WIndo focus + pEventHandler = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_FOCUS_IN, OnWindowFocusIn, null); + SysTryReturnVoidResult(NID_UI, pEventHandler, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + pEventHandlers->Add(pEventHandler); + + pEventHandler = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_FOCUS_OUT, OnWindowFocusOut, null); + SysTryReturnVoidResult(NID_UI, pEventHandler, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + pEventHandlers->Add(pEventHandler); + + __pEventHandlers = move(pEventHandlers); + + __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); +} + +_EflUiEventManager::~_EflUiEventManager(void) +{ + Tizen::Base::Collection::IEnumeratorT* pEnumerator = __pEventHandlers->GetEnumeratorN(); + 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) + { + Ecore_Event_Handler* pEventHandler = null; + pEnumerator->GetCurrent(pEventHandler); + if (pEventHandler) + { + ecore_event_handler_del(pEventHandler); + } + } + + 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) +{ + result r = E_SUCCESS; + + Evas_Object* pEvasObject = GetEvasObject(control); + SysTryReturn(NID_UI, pEvasObject, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + evas_object_event_callback_add(pEvasObject, EVAS_CALLBACK_KEY_UP, OnEvasKeyReleased, &control); + evas_object_event_callback_add(pEvasObject, EVAS_CALLBACK_KEY_DOWN, OnEvasKeyPressed, &control); + + return r; +} + +result +_EflUiEventManager::RegisterTouchEventHandler(const _Control& control) +{ + result r = E_SUCCESS; + + Evas_Object* pEvasObject = GetEvasObject(control); + SysTryReturn(NID_UI, pEvasObject, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + evas_object_event_callback_add(pEvasObject, EVAS_CALLBACK_MOUSE_UP, OnEvasTouchReleased, &control); + evas_object_event_callback_add(pEvasObject, EVAS_CALLBACK_MOUSE_DOWN, OnEvasTouchPressed, &control); + evas_object_event_callback_add(pEvasObject, EVAS_CALLBACK_MOUSE_MOVE, OnEvasTouchMoved, &control); + + evas_object_event_callback_add(pEvasObject, EVAS_CALLBACK_MULTI_UP, OnEvasMultiTouchReleased, &control); + evas_object_event_callback_add(pEvasObject, EVAS_CALLBACK_MULTI_DOWN, OnEvasMultiTouchPressed, &control); + evas_object_event_callback_add(pEvasObject, EVAS_CALLBACK_MULTI_MOVE, OnEvasMultiTouchMoved, &control); + + return r; +} + +result +_EflUiEventManager::UnregisterKeyEventHandler(const _Control& control) +{ + result r = E_SUCCESS; + + Evas_Object* pEvasObject = GetEvasObject(control); + SysTryReturn(NID_UI, pEvasObject, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + evas_object_event_callback_del(pEvasObject, EVAS_CALLBACK_KEY_UP, OnEvasKeyReleased); + evas_object_event_callback_del(pEvasObject, EVAS_CALLBACK_KEY_DOWN, OnEvasKeyPressed); + + return r; +} + +result +_EflUiEventManager::UnregisterTouchEventHandler(const _Control& control) +{ + result r = E_SUCCESS; + + Evas_Object* pEvasObject = GetEvasObject(control); + SysTryReturn(NID_UI, pEvasObject, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + evas_object_event_callback_del(pEvasObject, EVAS_CALLBACK_MOUSE_UP, OnEvasTouchReleased); + evas_object_event_callback_del(pEvasObject, EVAS_CALLBACK_MOUSE_DOWN, OnEvasTouchPressed); + evas_object_event_callback_del(pEvasObject, EVAS_CALLBACK_MOUSE_MOVE, OnEvasTouchMoved); + + evas_object_event_callback_del(pEvasObject, EVAS_CALLBACK_MULTI_UP, OnEvasMultiTouchReleased); + evas_object_event_callback_del(pEvasObject, EVAS_CALLBACK_MULTI_DOWN, OnEvasMultiTouchPressed); + evas_object_event_callback_del(pEvasObject, EVAS_CALLBACK_MULTI_MOVE, OnEvasMultiTouchMoved); + + return r; +} + +result +_EflUiEventManager::PostEvent(const _UiEvent& event) +{ + ClearLastResult(); + + result r = E_SUCCESS; + + _UiEvent* pEvent = event.CloneN(); + SysTryReturn(NID_UI, pEvent, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + Ecore_Event* pEcoreEvent = ecore_event_add(__notificaitonEventType, pEvent, FreeEvent, null); + SysTryReturn(NID_UI, pEcoreEvent, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + return r; +} + +} + +} // Tizen::Ui diff --git a/src/ui/FUi_EflUiEventManager.h b/src/ui/FUi_EflUiEventManager.h new file mode 100644 index 0000000..8f4f1f8 --- /dev/null +++ b/src/ui/FUi_EflUiEventManager.h @@ -0,0 +1,75 @@ +// +// 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_EflUiEventManager.h + * @brief This is the header file for the _EflUiEventManager class. + * + * This header file contains the declarations of the _EflUiEventManager class. @n + */ + +#ifndef _FUI_INTERNAL_EFL_UI_EVENT_MANAGER_H_ +#define _FUI_INTERNAL_EFL_UI_EVENT_MANAGER_H_ + +#include +#include +#include "FUi_IUiEventManager.h" + +namespace Tizen { namespace Ui +{ + +/** + * This is internal. If used in an application, the application can get rejected during the certification process. + * @class FUi_EflUiEventManager + * @brief This class impliments _EflUiEventManager and + * fire the Window Event object of a Ui Control. + */ +class _EflUiEventManager + : public _IUiEventManager +{ +public: + /** + * This is the default class constructor. + * + */ + _EflUiEventManager(void); + + /** + * This is the default class destructor. + * + */ + virtual ~_EflUiEventManager(void); + +private: + _EflUiEventManager(const _EflUiEventManager& rhs); + _EflUiEventManager& operator =(const _EflUiEventManager& rhs); + + virtual result RegisterKeyEventHandler(const _Control& control); + virtual result RegisterTouchEventHandler(const _Control& control); + 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; + std::unique_ptr > __pEventHandlers; +}; // _EflUiEventManager + +}} // Tizen::Ui + +#endif //_FUI_INTERNAL_EFL_UI_EVENT_MANAGER_H_ diff --git a/src/ui/FUi_EflWindow.cpp b/src/ui/FUi_EflWindow.cpp new file mode 100644 index 0000000..538866e --- /dev/null +++ b/src/ui/FUi_EflWindow.cpp @@ -0,0 +1,89 @@ +// +// 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_EflWindow.cpp + * @brief This is the implementation file for the _EflWindow class. + */ + +#include +#include +#include "FUi_EflWindow.h" +#include "FUiAnim_RootVisualElement.h" +#include "FUi_EcoreEvas.h" +#include "FUi_Control.h" + +using namespace Tizen::Ui::Animations; + +namespace Tizen { namespace Ui +{ + +_EflWindow* +_EflWindow::CreateInstanceN(void) +{ + _EflWindow* pEflWindow = new (std::nothrow) _EflWindow; + SysTryReturn(NID_UI, pEflWindow, 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 pEflWindow; + +CATCH: + delete pEflWindow; + return null; +} + +_EflWindow::~_EflWindow(void) +{ + if (__pEcoreEvas) + { + delete __pEcoreEvas; + __pEcoreEvas = null; + } +} + +void +_EflWindow::SetFrame(const _Control& control) +{ + __pEcoreEvas->SetFrame(control); +} + +_EflWindow::_EflWindow(void) + : __pEcoreEvas(null) +{ + __pEcoreEvas = _EcoreEvas::CreateInstanceN(); + + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI, __pEcoreEvas, r, "[%s] Propagating.", GetErrorMessage(r)); + + SetLastResult(E_SUCCESS); +} +_RootVisualElement* +_EflWindow::GetRootVisualElement(void) +{ + if(__pEcoreEvas) + { + return __pEcoreEvas->GetRootVisualElement(); + } + return null; + +} + +}} // Tizen::Ui diff --git a/src/ui/FUi_EflWindow.h b/src/ui/FUi_EflWindow.h new file mode 100644 index 0000000..e1b2820 --- /dev/null +++ b/src/ui/FUi_EflWindow.h @@ -0,0 +1,65 @@ +// +// 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_EflWindow.h + * @brief This is the header file for the _EflWindow class. + * + * This header file contains the declarations of the %_EflWindow class. + */ + +#ifndef _FUI_INTERNAL_EFL_WINDOW_H_ +#define _FUI_INTERNAL_EFL_WINDOW_H_ + +#include +#include "FUi_IWindow.h" + +namespace Tizen { namespace Ui { namespace Animations +{ +class _RootVisualElement; +}}} + +namespace Tizen { namespace Ui +{ +class _EcoreEvas; +class _Control; + +class _EflWindow + : public _IWindow +{ +public: + static _EflWindow* CreateInstanceN(void); + + virtual ~_EflWindow(void); + + virtual void SetFrame(const _Control& control); + + Tizen::Ui::Animations::_RootVisualElement* GetRootVisualElement(void); + +private: + _EflWindow(void); + + _EflWindow(const _EflWindow& rhs); + _EflWindow& operator =(const _EflWindow& rhs); + +private: + _EcoreEvas* __pEcoreEvas; +}; // _EflWindow + +}} // Tizen::Ui + +#endif // _FUI_INTERNAL_EFL_WINDOW_H_ diff --git a/src/ui/FUi_ErrorMessages.cpp b/src/ui/FUi_ErrorMessages.cpp new file mode 100644 index 0000000..8ccbf9c --- /dev/null +++ b/src/ui/FUi_ErrorMessages.cpp @@ -0,0 +1,25 @@ +// +// 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. +// + +#include "FUi_ErrorMessages.h" + +namespace Tizen { namespace Ui { + +const char* _UiError::OUT_OF_MEMORY = "[E_OUT_OF_MEMORY] Insufficient memory."; +const char* _UiError::SYSTEM = "[E_SYSTEM] System error occurred."; + +}} // Tizen::Ui diff --git a/src/ui/FUi_FingerInfo.cpp b/src/ui/FUi_FingerInfo.cpp new file mode 100644 index 0000000..a27ffa2 --- /dev/null +++ b/src/ui/FUi_FingerInfo.cpp @@ -0,0 +1,126 @@ +// +// 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_FingerInfo.cpp + * @brief This is the implementation file for _FingerInfo class. + */ + +// Includes +#include +#include "FUi_FingerInfo.h" + +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui +{ + +_FingerInfo::_FingerInfo(void) + : __deviceId(INVALID_POINT_ID) + , __pointId(INVALID_POINT_ID) + , __status(_TOUCH_FOCUS_OUT) + , __point(0, 0) + , __startPoint(0, 0) + , __screenPoint(0, 0) + ,__touchMoveReady(false) +{ +} + +_FingerInfo::~_FingerInfo(void) +{ +} + +void +_FingerInfo::SetDeviceId(unsigned long deviceId) +{ + __deviceId = deviceId; +} + +unsigned long +_FingerInfo::GetDeviceId(void) const +{ + return __deviceId; +} + +void +_FingerInfo::SetPointId(unsigned long pointId) +{ + __pointId = pointId; +} + +void +_FingerInfo::SetPoint(const FloatPoint& screenPoint, const FloatPoint& point) +{ + __screenPoint = screenPoint; + __point = point; +} + +unsigned long +_FingerInfo::GetPointId(void) const +{ + return __pointId; +} + +FloatPoint +_FingerInfo::GetPoint(void) const +{ + return __point; +} + +FloatPoint +_FingerInfo::GetScreenPoint(void) const +{ + return __screenPoint; +} + +void +_FingerInfo::SetStatus(const _TouchStatus status) +{ + __status = status; +} + +_TouchStatus +_FingerInfo::GetStatus(void) const +{ + return __status; +} + +void +_FingerInfo::SetStartPoint(const FloatPoint& point) +{ + __startPoint = point; +} + +FloatPoint +_FingerInfo::GetStartPoint(void) const +{ + return __startPoint; +} + +void +_FingerInfo::SetMoveReady(bool moveReady) +{ + __touchMoveReady = moveReady; +} + +bool +_FingerInfo::GetMoveReady(void) const +{ + return __touchMoveReady; +} + +} } //Tizen::Ui diff --git a/src/ui/FUi_FocusManagerImpl.cpp b/src/ui/FUi_FocusManagerImpl.cpp new file mode 100644 index 0000000..9007360 --- /dev/null +++ b/src/ui/FUi_FocusManagerImpl.cpp @@ -0,0 +1,559 @@ +// +// 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_FocusManagerImpl.cpp +* @brief This is the implementation file for _FocusManagerImpl class. +* @version 2.0 +* +*/ + +#include +#include +#include "FUi_FocusManagerImpl.h" +#include "FUi_ControlImpl.h" +#include "FUi_WindowImpl.h" +#include "FUi_ControlManager.h" +#include "FUiCtrl_Form.h" +#include "FUi_UiEventManager.h" +#include "FUi_ResourceManager.h" +#include "FUi_UiKeyEvent.h" +#include "FUi_Window.h" +#include "FUiCtrl_Frame.h" +#include "FUi_TouchManager.h" + +using namespace std; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Ui::Animations; + +namespace Tizen { namespace Ui +{ +//////////////////////////////////////////////////////////////////////////////// +/// _FocusManagerImpl class Lifecycle +_FocusManagerImpl* _FocusManagerImpl::__pInstance = null; + +_FocusManagerImpl::_FocusManagerImpl(void) + : __pCurrentFocusUiControl(null) + , __isFocusMode(false) + , __focusDirection(FOCUS_DIRECTION_DOWNWARD) +{ +#ifdef _FOCUS_UI_ + _UiEventManager* pUiEventManager = _UiEventManager::GetInstance(); + if (pUiEventManager) + { + result r = pUiEventManager->AddPostKeyEventListener(*this); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pUiEventManager->AddTouchEventListener(*this); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } +#endif +} + + +_FocusManagerImpl::~_FocusManagerImpl(void) +{ + // NOTHING +} + +void +_FocusManagerImpl::Initialize(void) +{ + static pthread_once_t once_block = PTHREAD_ONCE_INIT; + + if (__pInstance == null) + { + pthread_once(&once_block, InitializeInstance); + } +} + +_FocusManagerImpl* +_FocusManagerImpl::GetInstance(void) +{ + return __pInstance; +} + +void +_FocusManagerImpl::InitializeInstance(void) +{ + ClearLastResult(); + + if (__pInstance == null) + { + __pInstance = new (std::nothrow) _FocusManagerImpl; + SysTryReturnVoidResult(NID_UI, __pInstance != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + } +} + +void +_FocusManagerImpl::ReleaseInstance(void) +{ + if (__pInstance) + { + delete __pInstance; + __pInstance = null; + } +} + +//////////////////////////////////////////////////////////////////////////////// +/// _FocusManagerImpl class Operation + +_ControlImpl* +_FocusManagerImpl::GetCurrentFocusOwner(void) const +{ + _Control* pFocus = _ControlManager::GetInstance()->GetFocusControl(); + if(pFocus == null) + { + return null; + } + + _ControlImpl* pFocusImpl = static_cast <_ControlImpl*>(pFocus->GetUserData()); + SysAssert(pFocusImpl); + + return pFocusImpl; +} + + +_WindowImpl* +_FocusManagerImpl::GetCurrentFocusedWindow(void) const +{ + _Control* pFocus = _ControlManager::GetInstance()->GetFocusControl(); + if(pFocus == null) + { + return null; + } + _Window* pWindow = pFocus->GetRootWindow(); + if (pWindow == null) + { + return null; + } + + _WindowImpl* pWindowImpl = static_cast <_WindowImpl*>(static_cast <_ControlImpl*>(pWindow->GetUserData())); + if (pWindowImpl == null) + { + return null; + } + + + return pWindowImpl; +} + +bool +_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 +{ + int nextIndex = currentIndex; + if (focusDirection == FOCUS_DIRECTION_DOWNWARD) + { + ++nextIndex; + if (nextIndex == pFocusControlList->GetCount()) + { + nextIndex = 0; + } + } + else + { + --nextIndex; + if (nextIndex < 0) + { + nextIndex = pFocusControlList->GetCount() - 1; + } + } + return nextIndex; + + +} + +bool +_FocusManagerImpl::IsFocusable(_Control* pControl) const +{ + bool isFocusalbe = pControl->IsFocusable(); + bool enableState = pControl->IsEnabled(); + bool visibleState = pControl->IsVisible(); + bool isNavigatable = pControl->IsFocusNavigateEnabled(); + if (enableState && visibleState && isFocusalbe && isNavigatable) + { + return true; + } + return false; +} + +_Control* +_FocusManagerImpl::FindTraversalControlFromChild(_Control* pControl) +{ + IListT<_Control*>* pFocusControlList = null; + bool findNextFocusControl = false; + + _Window* pTop = pControl->GetRootWindow(); + if (pTop) + { + pFocusControlList = pTop->GetFocusList(); + } + + if (pFocusControlList) + { + unique_ptr > pEnum (pFocusControlList->GetEnumeratorN()); + + while (pEnum->MoveNext() == E_SUCCESS) + { + _Control* pEnumeratorControl = null; + pEnum->GetCurrent(pEnumeratorControl); + + //Find current focused control + if (pControl == pEnumeratorControl) + { + findNextFocusControl = true; + } + } + } + + if (findNextFocusControl == false) + { + _Control* pParent = pControl->GetParent(); + if (pParent) + { + return FindTraversalControlFromChild(pParent); + } + } + + return pControl; +} + +bool +_FocusManagerImpl::IsFocusControlListControl(_Control* pControl) const +{ + IListT<_Control*>* pFocusControlList = null; + + _Window* pTop = pControl->GetRootWindow(); + if (pTop) + { + pFocusControlList = pTop->GetFocusList(); + } + + if (pFocusControlList) + { + unique_ptr > pEnum (pFocusControlList->GetEnumeratorN()); + while (pEnum->MoveNext() == E_SUCCESS) + { + _Control* pEnumeratorControl = null; + pEnum->GetCurrent(pEnumeratorControl); + + //Find current focused control + if (pControl == pEnumeratorControl) + { + return true; + } + } + } + + return false; +} + +void +_FocusManagerImpl::StartFocusTraversal(_Control* pControl, FocusDirection focusDirection) +{ + _Control* pOriginalControl = pControl; + _Window* pTop = pControl->GetRootWindow(); + if (pTop == null) + { + return; + } + bool isWindowEnabled = pTop->IsEnabled(); + if (!isWindowEnabled) + { + return; + } + _Control* pFocusTraversalControl = pTop->GetFocusTraversalControl(pControl); + if (pFocusTraversalControl) + { + pControl = pFocusTraversalControl; + pControl->SetFocused(); + } + else + { + _Control* pTraversalControl = FindTraversalControlFromChild(pControl); + pTop->SetFocusTraversalControl(pTraversalControl, true); + } + + + bool focusMode = pControl->IsFocusModeStateEnabled(); + if (IsFocusModeStateEnabled() == false) + { + SetFocusModeStateEnabled(true); + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + if (pTouchManager && IsFocusModeStateEnabled()) + { + pTouchManager ->SetTouchCanceled(null); + } + if (pOriginalControl) + { + pOriginalControl->OnFocusModeStateChanged(); + } + } + + if (focusMode == false && pControl->IsFocused()) + { + if (IsFocusable(pControl)) + { + if (IsFocusControlListControl(pControl)) + { + pTop->SetFocusTraversalControl(pControl, true); + } + _Control* pParentControl = pControl->GetParent(); + if (pParentControl) + { + pParentControl->OnChildControlFocusMoved(*pControl); + while(pParentControl) + { + pParentControl->OnDescendantControlFocusMoved(*pControl); + pParentControl = pParentControl->GetParent(); + } + } + pControl->DrawFocus(); + return; + } + } + + if (focusDirection == FOCUS_DIRECTION_DOWNWARD) + { + _Control* pFocusControl = pControl->GetNextFocus(); + if (pFocusControl) + { + pFocusControl->SetFocused(); + pFocusControl->DrawFocus(); + pTop->SetFocusTraversalControl(pFocusControl, true); + return; + } + } + else + { + _Control* pFocusControl = pControl->GetPreviousFocus(); + if (pFocusControl) + { + pFocusControl->SetFocused(); + pFocusControl->DrawFocus(); + pTop->SetFocusTraversalControl(pFocusControl, true); + return; + } + } + + IListT<_Control*>* pFocusControlList = null; + + pFocusControlList = pTop->GetFocusList(); + + if (pFocusControlList) + { + unique_ptr > pEnum (pFocusControlList->GetEnumeratorN()); + SysTryReturnVoidResult(NID_UI_CTRL, pEnum, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + int index = 0; + bool findNextFocusControl = false; + _Control* pNextFocusControl = null; + int count = 0; + int loopCount = pFocusControlList->GetCount() + 1; + while (pEnum->MoveNext() == E_SUCCESS) + { + _Control* pEnumeratorControl = null; + pEnum->GetCurrent(pEnumeratorControl); + + //Find current focused control + if (pControl == pEnumeratorControl) + { + //Find next focusable control. + index = GetNextIndex(index, focusDirection, pFocusControlList); + count ++; + while (pFocusControlList->GetAt(index, pNextFocusControl) == E_SUCCESS) + { + + if (IsFocusable(pNextFocusControl)) + { + if (pNextFocusControl != pControl) + { + pNextFocusControl->SetFocused(); + } + else + { + pTop->SetFocusControl(pNextFocusControl, true); + } + findNextFocusControl = true; + break; + } + else + { + count ++; + if (loopCount == count) + { + return; + } + index = GetNextIndex(index, focusDirection, pFocusControlList); + } + + } + } + + if (findNextFocusControl == true) + { + break; + } + + index ++; + } + + pTop->SetFocusTraversalControl(pNextFocusControl, true); + if (pNextFocusControl && findNextFocusControl == true) + { + _Control* pParentControl = pNextFocusControl->GetParent(); + if (pParentControl) + { + pParentControl->OnChildControlFocusMoved(*pNextFocusControl); + while(pParentControl) + { + pParentControl->OnDescendantControlFocusMoved(*pNextFocusControl); + pParentControl = pParentControl->GetParent(); + } + } + pNextFocusControl->DrawFocus(); + } + } +} + +bool +_FocusManagerImpl::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) +{ + //Ecore_X_Window rootWindow = ecore_x_window_root_first_get(); + //Ecore_X_Atom keyboardExist = ecore_x_atom_get("X External Keyboard Exist"); + unsigned int keyboardNumber = 0; + //int ret = ecore_x_window_prop_card32_get(rootWindow, keyboardExist, &keyboardNumber, 1); + if (keyboardNumber == 0) + { + return false; + } + _KeyCode keyCode = keyInfo.GetKeyCode(); + __focusDirection = FOCUS_DIRECTION_DOWNWARD; + _Control* pControl = const_cast<_Control*> (&source); + + switch(keyCode) + { + case _KEY_TAB : + { + if (keyInfo.GetKeyModifier() & _KEY_MODIFIER_SHIFT) + { + __focusDirection = FOCUS_DIRECTION_UPWARD; + } + break; + } + case _KEY_UP : + { + __focusDirection = FOCUS_DIRECTION_UPWARD; + break; + } + case _KEY_DOWN : + { + __focusDirection = FOCUS_DIRECTION_DOWNWARD; + break; + } + default : + { + return false; + } + } + StartFocusTraversal(pControl, __focusDirection); + return false; +} + +bool _FocusManagerImpl::IsForwardDirection(void) const +{ + if (__focusDirection == FOCUS_DIRECTION_DOWNWARD) + { + return true; + } + return false; +} + +bool +_FocusManagerImpl::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) +{ + return false; +} + +bool +_FocusManagerImpl::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + if (!IsFocusModeStateEnabled()) + { + return false; + } + + _Control* pSourceControl = const_cast<_Control*>(&source); + SetFocusModeStateEnabled(false); + + _Window* pTop = source.GetRootWindow(); + bool isFocusListControl = IsFocusControlListControl(pSourceControl); + if (pTop) + { + _Control* pControl = null; + if (isFocusListControl) + { + pControl = pTop->GetFocusControl(pSourceControl); + } + else + { + pControl = pTop->GetCurrentFocusControl(); + } + while(pControl) + { + if (pControl) + { + pControl->OnFocusModeStateChanged(); + pControl->RemoveFocusRing(); + } + pControl = pControl->GetParent(); + } + } + + return false; +} + +bool +_FocusManagerImpl::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + return false; +} + +bool +_FocusManagerImpl:: OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + return false; +} + +bool +_FocusManagerImpl::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + return false; +} +} } //Tizen::Ui + diff --git a/src/ui/FUi_GridLayoutImpl.cpp b/src/ui/FUi_GridLayoutImpl.cpp new file mode 100644 index 0000000..e8cf77a --- /dev/null +++ b/src/ui/FUi_GridLayoutImpl.cpp @@ -0,0 +1,457 @@ +// +// 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_GridLayoutImpl.cpp + * @brief This is the implementation file for _GridLayoutImpl class. + * + * This file contains the implementation of _GridLayoutImpl class. + */ + +#include "FUi_GridLayoutImpl.h" +#include "FUi_CoordinateSystemUtils.h" + +namespace Tizen { namespace Ui +{ + +// _GridLayoutImpl implementation +_GridLayoutImpl::_GridLayoutImpl(GridLayout* pPublicLayout, _Layout::TableLayout* pCoreLayout) + : _LayoutImpl(pPublicLayout, pCoreLayout) + , __maxRow(0) + , __maxColumn(0) +{ +} + +_GridLayoutImpl::~_GridLayoutImpl() +{ +} + +Tizen::Ui::LayoutType +_GridLayoutImpl::GetLayoutType(void) const +{ + return LAYOUT_GRID; +} + +_GridLayoutImpl* +_GridLayoutImpl::CreateGridLayoutImplN(GridLayout* pPublicLayout, int maxRow, int maxColumn) +{ + ClearLastResult(); + + _Layout::TableLayout* pCoreLayout = null; + _GridLayoutImpl* pImplLayout = null; + result r = E_SUCCESS; + + pCoreLayout = _Layout::TableLayout::CreateTableLayoutN(); + r = GetLastResult(); + SysTryReturn(NID_UI, pCoreLayout != null, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + pImplLayout = new (std::nothrow) _GridLayoutImpl(pPublicLayout, pCoreLayout); + r = CheckConstruction(pCoreLayout, pImplLayout); + SysTryReturn(NID_UI, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pImplLayout->Construct(maxRow, maxColumn); + if (r != E_SUCCESS) + { + delete pImplLayout; + SysTryReturn(NID_UI, false, null, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + return pImplLayout; +} + +const char* +_GridLayoutImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::GridLayout"; +} + +const GridLayout& +_GridLayoutImpl::GetPublic(void) const +{ + return static_cast (_LayoutImpl::GetPublic()); +} + +GridLayout& +_GridLayoutImpl::GetPublic(void) +{ + return static_cast (_LayoutImpl::GetPublic()); +} + +const _Layout::TableLayout& +_GridLayoutImpl::GetCore(void) const +{ + return static_cast (_LayoutImpl::GetCore()); +} + +_Layout::TableLayout& +_GridLayoutImpl::GetCore(void) +{ + return static_cast <_Layout::TableLayout&>(_LayoutImpl::GetCore()); +} + +const _GridLayoutImpl* +_GridLayoutImpl::GetInstance(const GridLayout& layout) +{ + return static_cast (_LayoutImpl::GetInstance(layout)); +} + +_GridLayoutImpl* +_GridLayoutImpl::GetInstance(GridLayout& layout) +{ + return static_cast <_GridLayoutImpl*>(_LayoutImpl::GetInstance(layout)); +} + +result +_GridLayoutImpl::Construct(int maxRow, int maxColumn) +{ + ClearLastResult(); + + result r = GetCore().CreateTable(maxRow, maxColumn); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __maxRow = maxRow; + __maxColumn = maxColumn; + + return E_SUCCESS; +} + +result +_GridLayoutImpl::SetColumnStretchable(int columnIndex, bool stretchable) +{ + ClearLastResult(); + + return GetCore().SetColumnStretchable(columnIndex, stretchable); +} + +result +_GridLayoutImpl::SetColumnShrinkable(int columnIndex, bool shrinkable) +{ + ClearLastResult(); + + return GetCore().SetColumnShrinkable(columnIndex, shrinkable); +} + +result +_GridLayoutImpl::SetColumnCollapsed(int columnIndex, bool collapsed) +{ + ClearLastResult(); + + return GetCore().SetColumnCollapsed(columnIndex, collapsed); +} + +result +_GridLayoutImpl::SetAllColumnsStretchable(bool stretchable) +{ + ClearLastResult(); + + result r = E_SUCCESS; + bool* pOldStretchable = new (std::nothrow) bool[__maxColumn]; + SysTryReturn(NID_UI, pOldStretchable != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + memset(pOldStretchable, 0, sizeof(bool) * __maxColumn); + + int col = 0; + for (col = 0; col < __maxColumn; col++) + { + pOldStretchable[col] = GetCore().GetColumnStretchable(col); + r = GetLastResult(); + if (r != E_SUCCESS) + { + SysLogException(NID_UI, E_INVALID_ARG, "[E_INVALID_ARG] max column is invalid value."); + goto CATCH; + } + + r = GetCore().SetColumnStretchable(col, stretchable); + if (r != E_SUCCESS) + { + SysLogException(NID_UI, E_INVALID_ARG, "[E_INVALID_ARG] max column is invalid value."); + goto CATCH; + } + } + + delete[] pOldStretchable; + + return r; + +CATCH: + for (int colIndex = 0; colIndex < col; colIndex++) + { + GetCore().SetColumnStretchable(colIndex, pOldStretchable[colIndex]); + } + + delete[] pOldStretchable; + + return r; +} + +result +_GridLayoutImpl::SetAllColumnsShrinkable(bool shrinkable) +{ + ClearLastResult(); + + result r = E_SUCCESS; + bool* pOldShrinkable = new (std::nothrow) bool[__maxColumn]; + SysTryReturn(NID_UI, pOldShrinkable != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + memset(pOldShrinkable, 0, sizeof(bool) * __maxColumn); + + int col = 0; + for (col = 0; col < __maxColumn; col++) + { + pOldShrinkable[col] = GetCore().GetColumnShrinkable(col); + r = GetLastResult(); + if (r != E_SUCCESS) + { + SysLogException(NID_UI, E_INVALID_ARG, "[E_INVALID_ARG] max column is invalid value."); + goto CATCH; + } + + r = GetCore().SetColumnShrinkable(col, shrinkable); + if (r != E_SUCCESS) + { + SysLogException(NID_UI, E_INVALID_ARG, "[E_INVALID_ARG] max column is invalid value."); + goto CATCH; + } + } + + delete[] pOldShrinkable; + + return r; + +CATCH: + for (int colIndex = 0; colIndex < col; colIndex++) + { + GetCore().SetColumnShrinkable(colIndex, pOldShrinkable[colIndex]); + } + + delete[] pOldShrinkable; + + return r; +} + +result +_GridLayoutImpl::SetColumnSpacing(int columnIndex, float space) +{ + ClearLastResult(); + + return GetCore().SetColumnSpacing(columnIndex, space); +} + +result +_GridLayoutImpl::SetRowStretchable(int rowIndex, bool stretchable) +{ + ClearLastResult(); + + return GetCore().SetRowStretchable(rowIndex, stretchable); +} + +result +_GridLayoutImpl::SetRowShrinkable(int rowIndex, bool shrinkable) +{ + ClearLastResult(); + + return GetCore().SetRowShrinkable(rowIndex, shrinkable); +} + +result +_GridLayoutImpl::SetRowCollapsed(int rowIndex, bool collapsed) +{ + ClearLastResult(); + + return GetCore().SetRowCollapsed(rowIndex, collapsed); +} + +result +_GridLayoutImpl::SetAllRowsStretchable(bool stretchable) +{ + ClearLastResult(); + + result r = E_SUCCESS; + bool* pOldStretchable = new (std::nothrow) bool[__maxRow]; + SysTryReturn(NID_UI, pOldStretchable != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + memset(pOldStretchable, 0, sizeof(bool) * __maxRow); + + + int row = 0; + for (row = 0; row < __maxRow; row++) + { + pOldStretchable[row] = GetCore().GetRowStretchable(row); + r = GetLastResult(); + if (r != E_SUCCESS) + { + SysLogException(NID_UI, E_INVALID_ARG, "[E_INVALID_ARG] max row is invalid value."); + goto CATCH; + } + + r = GetCore().SetRowStretchable(row, stretchable); + if (r != E_SUCCESS) + { + SysLogException(NID_UI, E_INVALID_ARG, "[E_INVALID_ARG] max row is invalid value."); + goto CATCH; + } + } + + delete[] pOldStretchable; + + return r; + +CATCH: + for (int rowIndex = 0; rowIndex < row; rowIndex++) + { + GetCore().SetRowStretchable(rowIndex, pOldStretchable[rowIndex]); + } + + delete[] pOldStretchable; + + return r; +} + +result +_GridLayoutImpl::SetAllRowsShrinkable(bool shrinkable) +{ + ClearLastResult(); + + result r = E_SUCCESS; + bool* pOldShrinkable = new (std::nothrow) bool[__maxRow]; + SysTryReturn(NID_UI, pOldShrinkable != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + memset(pOldShrinkable, 0, sizeof(bool) * __maxRow); + + int row = 0; + for (row = 0; row < __maxRow; row++) + { + pOldShrinkable[row] = GetCore().GetRowShrinkable(row); + r = GetLastResult(); + if (r != E_SUCCESS) + { + SysLogException(NID_UI, E_INVALID_ARG, "[E_INVALID_ARG] max row is invalid value."); + goto CATCH; + } + + r = GetCore().SetRowShrinkable(row, shrinkable); + if (r != E_SUCCESS) + { + SysLogException(NID_UI, E_INVALID_ARG, "[E_INVALID_ARG] max row is invalid value."); + goto CATCH; + } + } + + delete[] pOldShrinkable; + + return r; + +CATCH: + for (int rowIndex = 0; rowIndex < row; rowIndex++) + { + GetCore().SetRowShrinkable(rowIndex, pOldShrinkable[rowIndex]); + } + delete[] pOldShrinkable; + + return r; +} + +result +_GridLayoutImpl::SetRowSpacing(int rowIndex, float space) +{ + ClearLastResult(); + + return GetCore().SetRowSpacing(rowIndex, space); +} + +result +_GridLayoutImpl::SetPosition(_ControlImpl& control, int row, int column, int rowSpan, int columnSpan) +{ + ClearLastResult(); + + _Layout::LayoutItem& layoutItem = control.GetLayoutContainer(); + + result r = E_SUCCESS; + int rowSize = 1; + int colSize = 1; + + SysTryReturn(NID_UI, GetCore().ItemExists(layoutItem), E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] The control is not belong to layout"); + + SysTryReturn(NID_UI, row >= 0, E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Negative input argument : row(%d)", row); + SysTryReturn(NID_UI, row < __maxRow, E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Input Argument row over the max row : row(%d), maxRow(%d)", row, __maxRow); + SysTryReturn(NID_UI, column >= 0, E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Negative input argument : column(%d)", column); + SysTryReturn(NID_UI, column < __maxColumn, E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Input Argument column over the max column : column(%d), maxColumn(%d)", column, __maxColumn); + + SysTryReturn(NID_UI, rowSpan > 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The row span is negative value or zero."); + SysTryReturn(NID_UI, columnSpan > 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The column span is negative value or zero."); + + SysTryReturn(NID_UI, (row + rowSpan - 1) < __maxRow, E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] Out of range."); + SysTryReturn(NID_UI, (column + columnSpan - 1) < __maxColumn, E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Out of range."); + + r = GetCore().GetMergeSize(row, column, rowSize, colSize); + SysTryReturn(NID_UI, (r == E_SUCCESS), r, r, + "The specified span tries to include a cell which is already included in another span."); + + _Layout::LayoutItem* prevItem = GetCore().GetItem(row, column); + if (prevItem) + { + if (prevItem != &layoutItem) + { + r = GetCore().SwapItemPosition(layoutItem, *prevItem); + } + } + else + { + r = GetCore().SetItemPosition(layoutItem, row, column); + } + GetCore().SetFillCell(row, column, false, false); + + if (r != E_SUCCESS) + { + return r; + } + + if (rowSpan != rowSize || columnSpan != colSize) + { + for (int y = 0; y < rowSpan; y++) + { + for (int x = 0; x < columnSpan; x++) + { + r = GetCore().Unmerge(row + y, column + x); + if (r == E_SYSTEM) + { + return r; + } + } + } + + r = GetCore().Merge(row, column, row + rowSpan - 1, column + columnSpan - 1); + GetCore().SetFillCell(row, column, true, true); + } + + return r; +} + +int +_GridLayoutImpl::GetRowCount() const +{ + return __maxRow; +} + +int +_GridLayoutImpl::GetColumnCount() const +{ + return __maxColumn; +} + +}} // Tizen::Ui diff --git a/src/ui/FUi_GridLayoutImpl.h b/src/ui/FUi_GridLayoutImpl.h new file mode 100644 index 0000000..a4f8af7 --- /dev/null +++ b/src/ui/FUi_GridLayoutImpl.h @@ -0,0 +1,364 @@ +// +// 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_GridLayoutImpl.h + * @brief This is the header file for _GridLayoutImpl class. + * + * This header file contains the declaration of _GridLayoutImpl class. + */ + +#ifndef _FUI_INTERNAL_GRID_LAYOUT_IMPL_H +#define _FUI_INTERNAL_GRID_LAYOUT_IMPL_H + +#include +#include "FUi_LayoutImpl.h" +#include "FUi_LayoutTableLayout.h" + +namespace Tizen { namespace Ui +{ + +class GridLayout; + +class _GridLayoutImpl + : public _LayoutImpl +{ +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~_GridLayoutImpl(void); + + /** + * Creates the instance of _GridLayoutImpl. + * + * @since 2.0 + * @return The instance of _GridLayoutImpl. + * @param[in] pPublicLayout The public class of grid layout. + * @param[in] maxRow The max number of row. + * @param[in] maxColumn The max number of column. + * @exception E_SUCCESS The method was successful. + * @exception E_OUT_OF_MEMORY Insufficient memory. + */ + static _GridLayoutImpl* CreateGridLayoutImplN(GridLayout* pPublicLayout, int maxRow, int maxColumn); + + /** + * Gets the name of public class. + * + * @since 2.0 + * @return The name of public class. + */ + virtual const char* GetPublicClassName(void) const; + + /** + * Gets the public class. + * + * @since 2.0 + * @return The public class. + */ + virtual const GridLayout& GetPublic(void) const; + + /** + * Gets the public class. + * + * @since 2.0 + * @return The public class. + */ + virtual GridLayout& GetPublic(void); + + /** + * Gets the core class. + * + * @since 2.0 + * @return The core class. + */ + virtual const _Layout::TableLayout& GetCore(void) const; + + /** + * Gets the core class. + * + * @since 2.0 + * @return The core class. + */ + virtual _Layout::TableLayout& GetCore(void); + + /** + * Gets the _GridLayoutImpl instance for the GridLayout. + * + * @since 2.0 + * @return The _GridLayoutImpl instance. + * @param[in] pLayout The GridLayout instance. + */ + static const _GridLayoutImpl* GetInstance(const GridLayout& layout); + + /** + * Gets the _GridLayoutImpl instance for the GridLayout. + * + * @since 2.0 + * @return The _GridLayoutImpl instance. + * @param[in] pLayout The GridLayout instance. + */ + static _GridLayoutImpl* GetInstance(GridLayout& layout); + + /** + * Sets the stretching ability of the specified column. + * + * @since 2.0 + * @return An error code + * @param[in] columnIndex The column index + * @param[in] stretchable Set to @c true to make the column as stretchable @n + * @c false, otherwise + * @exception E_SUCCESS The method was successful. + * @exception E_OUT_OF_RANGE Input Argument value over the max value. + */ + result SetColumnStretchable(int columnIndex, bool stretchable); + + /** + * Sets the shrinking ability of the specified column. + * + * @since 2.0 + * @return An error code + * @param[in] columnIndex The column index + * @param[in] shrinkable Set to @c true to make the column as shrinkable @n + * @c false, otherwise + * @exception E_SUCCESS The method was successful. + * @exception E_OUT_OF_RANGE Input Argument value over the max value. + */ + result SetColumnShrinkable(int columnIndex, bool shrinkable); + + /** + * Sets the collapsibility of a column. + * + * @since 2.0 + * @return An error code + * @param[in] columnIndex The column index + * @param[in] collapsed Set to @c true to make the column as collapsible @n + * @c false, otherwise + * @exception E_SUCCESS The method was successful. + * @exception E_OUT_OF_RANGE Input Argument value over the max value. + */ + result SetColumnCollapsed(int columnIndex, bool collapsed); + + /** + * Sets the stretching ability of all columns. + * + * @since 2.0 + * @return An error code + * @param[in] stretchable Set to @c true to set all columns as stretchable @n + * @c false, otherwise + * @exception E_SUCCESS The method was successful. + * @exception E_OUT_OF_RANGE Input Argument value over the max value. + * @exception E_OUT_OF_MEMORY Insufficient memory. + */ + result SetAllColumnsStretchable(bool stretchable); + + /** + * Sets the shrinking ability of all columns. + * + * @since 2.0 + * @return An error code + * @param[in] shrinkable Set to @c true to set all columns as shrinkable @n + * @c false, otherwise + * @exception E_SUCCESS The method was successful. + * @exception E_OUT_OF_RANGE Input Argument value over the max value. + * @exception E_OUT_OF_MEMORY Insufficient memory. + */ + result SetAllColumnsShrinkable(bool shrinkable); + + /* + * Sets the space before the specified column index. + * + * @since 2.1 + * @return An error code + * @param[in] columnIndex The column index + * @param[in] space The space + * @exception E_SUCCESS The method was successful. + * @exception E_OUT_OF_RANGE Input Argument value over the max value. + */ + result SetColumnSpacing(int columnIndex, float space); + + /** + * Sets the stretching ability of the specified row. + * + * @since 2.0 + * @return An error code + * @param[in] rowIndex The row index + * @param[in] stretchable Set to @c true to make the row as stretchable @n + * @c false, otherwise + * @exception E_SUCCESS The method was successful. + * @exception E_OUT_OF_RANGE Input Argument value over the max value. + */ + result SetRowStretchable(int rowIndex, bool stretchable); + + /** + * Sets the shrinking ability of the specified row. + * + * @since 2.0 + * @return An error code + * @param[in] rowIndex The row index + * @param[in] shrinkable Set to @c true to make the row as shrinkable @n + * @c false, otherwise + * @exception E_SUCCESS The method was successful. + * @exception E_OUT_OF_RANGE Input Argument value over the max value. + */ + result SetRowShrinkable(int rowIndex, bool shrinkable); + + /** + * Sets the collapsibility of the specified row. + * + * @since 2.0 + * @return An error code + * @param[in] rowIndex The row index + * @param[in] collapsed Set to @c true to make the row as collapsible @n + * @c false, otherwise + * @exception E_SUCCESS The method was successful. + * @exception E_OUT_OF_RANGE Input Argument value over the max value. + */ + result SetRowCollapsed(int rowIndex, bool collapsed); + + /** + * Sets the stretching ability of all rows. + * + * @since 2.0 + * @return An error code + * @param[in] stretchable Set to @c true to set all rows as stretchable @n + * @c false, otherwise + * @exception E_SUCCESS The method was successful. + * @exception E_OUT_OF_RANGE Input Argument value over the max value. + * @exception E_OUT_OF_MEMORY Insufficient memory. + */ + result SetAllRowsStretchable(bool stretchable); + + /** + * Sets the shrinking ability of all rows. + * + * @since 2.0 + * @return An error code + * @param[in] shrinkable Set to @c true to set all rows as shrinkable @n + * @c false, otherwise + * @exception E_SUCCESS The method was successful. + * @exception E_OUT_OF_RANGE Input Argument value over the max value. + * @exception E_OUT_OF_MEMORY Insufficient memory. + */ + result SetAllRowsShrinkable(bool shrinkable); + + /* + * Sets the space before the specified column index. + * + * @since 2.1 + * @return An error code + * @param[in] rowIndex The row index + * @param[in] space The space + * @exception E_SUCCESS The method was successful. + * @exception E_OUT_OF_RANGE Input Argument value over the max value. + */ + result SetRowSpacing(int rowIndex, float space); + + /** + * Adds the control at the specified position. + * Sets the position and span of the control. + * + * @since 2.0 + * @return An error code + * @param[in] control The control for which the position is set + * @param[in] row The row index + * @param[in] column The column index + * @param[in] rowSpan The row span specifies how many cells in the row should be merged into a cell. + * @param[in] columnSpan The column span specifies how many cells in the column should be merged into a cell. + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_OUT_OF_RANGE Input Argument value over the max value. + * @exception E_SYSTEM A system error occurred. + */ + result SetPosition(_ControlImpl& control, int row, int column, int rowSpan, int columnSpan); + + /** + * Gets the type of the layout. + * + * @since 2.0 + * @return The layout type + */ + virtual LayoutType GetLayoutType(void) const; + +protected: + /** + * This is the default constructor for this class. + * + * @since 2.0 + */ + _GridLayoutImpl(GridLayout* pPublicLayout, _Layout::TableLayout* pCoreLayout); + + /** + * Gets the number of rows in a grid layout. + * + * @since 2.0 + * @return The number of rows + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + int GetRowCount(void) const; + + /** + * Gets the number of columns in a grid layout. + * + * @since 2.0 + * @return The number of columns + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + int GetColumnCount(void) const; + +private: + /** + * This is the copy constructor for this class. + * + * @since 2.0 + */ + _GridLayoutImpl(const _GridLayoutImpl&); + + /** + * This is the substitution operator for this class. + * + * @since 2.0 + */ + _GridLayoutImpl& operator =(const _GridLayoutImpl&); + + /** + * Initializes this instance of _GridLayoutImpl with the specified parameters. + * + * @since 2.0 + * @return An error code + * @param[in] maxRow The max number of rows + * @param[in] maxColumn The max number of columns + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_SYSTEM A system error occurred. + */ + result Construct(int maxRow, int maxColumn); + +private: + int __maxRow; + int __maxColumn; + + friend class GridLayout; +}; // _GridLayoutImpl + +}} // Tizen::Ui + +#endif // #ifndef _FUI_INTERNAL_GRID_LAYOUT_IMPL_H diff --git a/src/ui/FUi_HorizontalBoxLayoutImpl.cpp b/src/ui/FUi_HorizontalBoxLayoutImpl.cpp new file mode 100644 index 0000000..59f3ebc --- /dev/null +++ b/src/ui/FUi_HorizontalBoxLayoutImpl.cpp @@ -0,0 +1,273 @@ +// +// 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_HorizontalBoxLayoutImpl.cpp + * @brief This is the implementation file for _HorizontalBoxLayoutImpl class. + * + * This file contains the implementation of _HorizontalBoxLayoutImpl class. + */ + +#include "FUi_HorizontalBoxLayoutImpl.h" +#include "FUi_CoordinateSystemUtils.h" + +namespace Tizen { namespace Ui +{ + +namespace +{ +static const int CONVERT_ERROR_CODE = -1; + +_Layout::LinearLayoutDirection +ConvertEnum(HorizontalDirection val) +{ + switch (val) + { + case HORIZONTAL_DIRECTION_RIGHTWARD: + return _Layout::LINEAR_LEFT_TO_RIGHT; + + case HORIZONTAL_DIRECTION_LEFTWARD: + return _Layout::LINEAR_RIGHT_TO_LEFT; + + default: + return _Layout::LINEAR_NONE_DIRECTION; + } +} + +HorizontalDirection +ConvertEnum(_Layout::LinearLayoutDirection val) +{ + switch (val) + { + case _Layout::LINEAR_LEFT_TO_RIGHT: + return HORIZONTAL_DIRECTION_RIGHTWARD; + + case _Layout::LINEAR_RIGHT_TO_LEFT: + return HORIZONTAL_DIRECTION_LEFTWARD; + + default: + return static_cast (CONVERT_ERROR_CODE); + } +} +} + +// _HorizontalBoxLayoutImpl implementation +_HorizontalBoxLayoutImpl::_HorizontalBoxLayoutImpl(HorizontalBoxLayout* pPublicLayout, _Layout::LinearLayout* pCoreLayout) + : _LayoutImpl(pPublicLayout, pCoreLayout) +{ +} + +_HorizontalBoxLayoutImpl::~_HorizontalBoxLayoutImpl() +{ +} + +Tizen::Ui::LayoutType +_HorizontalBoxLayoutImpl::GetLayoutType(void) const +{ + return LAYOUT_HORIZONTAL_BOX; +} + +result +_HorizontalBoxLayoutImpl::Construct(HorizontalDirection direction) +{ + ClearLastResult(); + + _Layout::LinearLayoutDirection linearDirection = ConvertEnum(direction); + SysTryReturn(NID_UI, linearDirection != _Layout::LINEAR_NONE_DIRECTION, + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid data."); + + result r = GetCore().Initialize(_Layout::LINEAR_HORIZONTAL, linearDirection); + + return r; +} + +result +_HorizontalBoxLayoutImpl::GetDirection(HorizontalDirection& direction) const +{ + ClearLastResult(); + + _Layout::LinearLayoutDirection internalDirection; + + result r = GetCore().GetDirection(internalDirection); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + direction = ConvertEnum(internalDirection); + + return r; +} + +result +_HorizontalBoxLayoutImpl::SetVerticalAlignment(_ControlImpl& control, LayoutVerticalAlignment vertAlign) +{ + result r = SetAlignment(control, LAYOUT_HORIZONTAL_ALIGN_LEFT, vertAlign); + + return r; +} + +result +_HorizontalBoxLayoutImpl::SetSpacing(_ControlImpl& control, float space) +{ + ClearLastResult(); + + _Layout::LayoutItem& layoutItem = control.GetLayoutContainer(); + + result r = GetCore().SetItemSpacing(layoutItem, space); + + return r; +} + +result +_HorizontalBoxLayoutImpl::SetVerticalMargin(_ControlImpl& control, float top, float bottom) +{ + result r = SetMargin(control, 0.0f, 0.0f, top, bottom); + + return r; +} + +result +_HorizontalBoxLayoutImpl::SetWidth(_ControlImpl& control, float width) +{ + ClearLastResult(); + + result r = SetHorizontalFitPolicy(control, FIT_POLICY_FIXED); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _Layout::LayoutRect rect; + r = GetItemBaseRect(control, rect); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + rect.w = width; + r = SetItemBaseRect(control, rect); + + return r; +} + +result +_HorizontalBoxLayoutImpl::SetItemHorizontalFitPolicy(_ControlImpl& control, FitPolicy policy) +{ + result r = SetHorizontalFitPolicy(control, policy); + + return r; +} + +result +_HorizontalBoxLayoutImpl::SetHeight(_ControlImpl& control, float height) +{ + ClearLastResult(); + + result r = SetVerticalFitPolicy(control, FIT_POLICY_FIXED); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _Layout::LayoutRect rect; + r = GetItemBaseRect(control, rect); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + rect.h = height; + r = SetItemBaseRect(control, rect); + + return r; +} + +result +_HorizontalBoxLayoutImpl::SetItemVerticalFitPolicy(_ControlImpl& control, FitPolicy policy) +{ + result r = SetVerticalFitPolicy(control, policy); + + return r; +} + +result +_HorizontalBoxLayoutImpl::SetWeight(_ControlImpl& control, float weight) +{ + ClearLastResult(); + + _Layout::LayoutItem& layoutItem = control.GetLayoutContainer(); + + result r = GetCore().SetItemWeight(layoutItem, weight); + + return r; +} + +_HorizontalBoxLayoutImpl* +_HorizontalBoxLayoutImpl::CreateHorizontalBoxLayoutImplN(HorizontalBoxLayout* pPublicLayout, HorizontalDirection direction) +{ + ClearLastResult(); + + _Layout::LinearLayout* pCoreLayout = null; + _HorizontalBoxLayoutImpl* pImplLayout = null; + result r = E_SUCCESS; + + pCoreLayout = _Layout::LinearLayout::CreateLinearLayoutN(); + r = GetLastResult(); + SysTryReturn(NID_UI, pCoreLayout != null, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + pImplLayout = new (std::nothrow) _HorizontalBoxLayoutImpl(pPublicLayout, pCoreLayout); + r = CheckConstruction(pCoreLayout, pImplLayout); + SysTryReturn(NID_UI, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pImplLayout->Construct(direction); + if (r != E_SUCCESS) + { + delete pImplLayout; + SysTryReturn(NID_UI, false, null, E_INVALID_ARG, "[E_INVALID_ARG] The Direction is invalid."); + } + + return pImplLayout; +} + +const char* +_HorizontalBoxLayoutImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::HorizontalBoxLayout"; +} + +const HorizontalBoxLayout& +_HorizontalBoxLayoutImpl::GetPublic(void) const +{ + return static_cast (_LayoutImpl::GetPublic()); +} + +HorizontalBoxLayout& +_HorizontalBoxLayoutImpl::GetPublic(void) +{ + return static_cast (_LayoutImpl::GetPublic()); +} + +const _Layout::LinearLayout& +_HorizontalBoxLayoutImpl::GetCore(void) const +{ + return static_cast (_LayoutImpl::GetCore()); +} + +_Layout::LinearLayout& +_HorizontalBoxLayoutImpl::GetCore(void) +{ + return static_cast <_Layout::LinearLayout&>(_LayoutImpl::GetCore()); +} + +const _HorizontalBoxLayoutImpl* +_HorizontalBoxLayoutImpl::GetInstance(const HorizontalBoxLayout& layout) +{ + return static_cast (_LayoutImpl::GetInstance(layout)); +} + +_HorizontalBoxLayoutImpl* +_HorizontalBoxLayoutImpl::GetInstance(HorizontalBoxLayout& layout) +{ + return static_cast <_HorizontalBoxLayoutImpl*>(_LayoutImpl::GetInstance(layout)); +} + +}} // Tizen::Ui diff --git a/src/ui/FUi_HorizontalBoxLayoutImpl.h b/src/ui/FUi_HorizontalBoxLayoutImpl.h new file mode 100644 index 0000000..365a25e --- /dev/null +++ b/src/ui/FUi_HorizontalBoxLayoutImpl.h @@ -0,0 +1,278 @@ +// +// 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_HorizontalBoxLayoutImpl.h + * @brief This is the header file for _HorizontalBoxLayoutImpl class. + * + * This header file contains the declaration of _HorizontalBoxLayoutImpl class. + */ + +#ifndef _FUI_INTERNAL_HORIZONTAL_BOX_LAYOUT_IMPL_H +#define _FUI_INTERNAL_HORIZONTAL_BOX_LAYOUT_IMPL_H + +#include +#include "FUi_LayoutImpl.h" +#include "FUi_LayoutLinearLayout.h" + +namespace Tizen { namespace Ui +{ + +class HorizontalBoxLayout; + +class _HorizontalBoxLayoutImpl + : public _LayoutImpl +{ +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~_HorizontalBoxLayoutImpl(void); + + /** + * Creates the instance of _HorizontalBoxLayoutImpl. + * + * @since 2.0 + * @return The instance of _HorizontalBoxLayoutImpl. + * @param[in] pPublicLayout The public class of horizontal box layout. + * @param[in] direction The direction of horizontal box layout. + * @exception E_SUCCESS The method was successful. + * @exception E_OUT_OF_MEMORY Insufficient memory. + */ + static _HorizontalBoxLayoutImpl* CreateHorizontalBoxLayoutImplN(HorizontalBoxLayout* pPublicLayout, HorizontalDirection direction = HORIZONTAL_DIRECTION_RIGHTWARD); + + /** + * Gets the name of public class. + * + * @since 2.0 + * @return The name of public class. + */ + virtual const char* GetPublicClassName(void) const; + + /** + * Gets the public class. + * + * @since 2.0 + * @return The public class. + */ + virtual const HorizontalBoxLayout& GetPublic(void) const; + + /** + * Gets the public class. + * + * @since 2.0 + * @return The public class. + */ + virtual HorizontalBoxLayout& GetPublic(void); + + /** + * Gets the public class. + * + * @since 2.0 + * @return The public class. + */ + virtual const _Layout::LinearLayout& GetCore(void) const; + + /** + * Gets the public class. + * + * @since 2.0 + * @return The public class. + */ + virtual _Layout::LinearLayout& GetCore(void); + + /** + * Gets the _HorizontalBoxLayoutImpl instance for the HorizontalBoxLayout. + * + * @since 2.0 + * @return The _HorizontalBoxLayoutImpl instance. + * @param[in] pLayout The HorizontalBoxLayout instance. + */ + static const _HorizontalBoxLayoutImpl* GetInstance(const HorizontalBoxLayout& layout); + + /** + * Gets the _HorizontalBoxLayoutImpl instance for the HorizontalBoxLayout. + * + * @since 2.0 + * @return The _HorizontalBoxLayoutImpl instance. + * @param[in] pLayout The HorizontalBoxLayout instance. + */ + static _HorizontalBoxLayoutImpl* GetInstance(HorizontalBoxLayout& layout); + + /** + * Gets the direction of the HorizontalBoxLayout. + * + * @since 2.0 + * @return An error code + * @param[out] direction The direction in which the children are attached + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + result GetDirection(HorizontalDirection& direction) const; + + /** + * Sets the vertical alignment of the specified control. + * + * @since 2.0 + * @return An error code + * @param[in] control The control for which the alignment is set + * @param[in] alignment The vertical alignment + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @exception E_INVALID_ARG The alignment parameter is invalid. + */ + result SetVerticalAlignment(_ControlImpl& control, LayoutVerticalAlignment vertAlign); + + /* + * Sets the space between the specified control and its predecessor. + * + * @since 2.1 + * @return An error code + * @param[in] control The control for which the space is set + * @param[in] space The space + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + result SetSpacing(_ControlImpl& control, float space); + + /* + * Sets the vertical margins of the specified control. + * + * @since 2.1 + * @return An error code + * @param[in] control The control for which the margins are set + * @param[in] top The top margin + * @param[in] bottom The bottom margin + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + result SetVerticalMargin(_ControlImpl& control, float top, float bottom); + + /* + * Sets the width of the specified control with the fixed length. + * + * @since 2.1 + * @return An error code + * @param[in] control The control for which the width is set + * @param[in] virWidth This is not used. + * @param[in] phyWidth The value of the width + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + result SetWidth(_ControlImpl& control, float width); + + /** + * Sets the width of the specified control with the fitting policy. + * + * @since 2.0 + * @return An error code + * @param[in] control The control for which the width is set + * @param[in] policy The fitting policy for the width + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + result SetItemVerticalFitPolicy(_ControlImpl& control, FitPolicy policy); + + /* + * Sets the height of the specified control with fixed length. + * + * @since 2.1 + * @return An error code + * @param[in] control The control for which the height is set + * @param[in] virHeight This is not used. + * @param[in] phyHeight The value of the height + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + result SetHeight(_ControlImpl& control, float height); + + /** + * Sets the height of the specified control with the fitting policy. + * + * @since 2.0 + * @return An error code + * @param[in] control The control for which the height is set + * @param[in] policy The fitting policy for the height + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + result SetItemHorizontalFitPolicy(_ControlImpl& control, FitPolicy policy); + + /** + * Sets the weight of the specified control. + * + * @since 2.0 + * @return An error code + * @param[in] control 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 was successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + result SetWeight(_ControlImpl& control, float weight); + + /** + * Gets the type of the layout. + * + * @since 2.0 + * @return The layout type + */ + virtual LayoutType GetLayoutType(void) const; + +protected: + /** + * This is the default constructor for this class. + * + * @since 2.0 + */ + _HorizontalBoxLayoutImpl(HorizontalBoxLayout* pPublicLayout, _Layout::LinearLayout* pCoreLayout); + +private: + /** + * This is the copy constructor for this class. + * + * @since 2.0 + */ + _HorizontalBoxLayoutImpl(const _HorizontalBoxLayoutImpl&); + + /** + * This is the substitution operator for this class. + * + * @since 2.0 + */ + _HorizontalBoxLayoutImpl& operator =(const _HorizontalBoxLayoutImpl&); + + /** + * Initializes this instance of _HorizontalBoxLayoutImpl with the specified parameters. + * + * @since 2.0 + * @return An error code + * @param[in] direction The direction of horizontal box layout. + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_SYSTEM A system error occurred. + */ + result Construct(HorizontalDirection direction); +}; // _HorizontalBoxLayoutImpl + +}} // Tizen::Ui + +#endif // _FUI_INTERNAL_HORIZONTAL_BOX_LAYOUT_IMPL_H diff --git a/src/ui/FUi_ImeOrientationAgent.cpp b/src/ui/FUi_ImeOrientationAgent.cpp new file mode 100644 index 0000000..fd88b73 --- /dev/null +++ b/src/ui/FUi_ImeOrientationAgent.cpp @@ -0,0 +1,220 @@ +// +// 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_ImeOrientationAgent.cpp + * @brief This is the implementation file for the _ImeOrientationAgent class. + */ + +#include +#include +#include +#include +#include +#include "FUi_ImeOrientationAgent.h" +#include "FUi_ControlManager.h" +#include "FUi_ControlImplManager.h" +#include "FUi_PublicOrientationEvent.h" +#include "FUi_ControlImpl.h" +#include "FUi_Window.h" +#include "FUiCtrl_FormImpl.h" +#include "FUiCtrl_FrameImpl.h" +#include "FUiCtrl_Frame.h" +#include "FUiCtrl_Form.h" +#include "FUi_EcoreEvasMgr.h" +#include "FUi_EcoreEvas.h" +#include "FUi_ControlManager.h" +#include "FUi_UiNotificationEvent.h" +#include "FUi_UiEventManager.h" +#include "FUiAnim_RootVisualElement.h" +#include "FUiAnim_EflLayer.h" + +using namespace std; +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Ui::Animations; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { + +_ImeOrientationAgent* +_ImeOrientationAgent::CreateInstanceN(Control& publicControl) +{ + SysLog(NID_UI, "[Ime Rotation]"); + + _ImeOrientationAgent* pAgent = new (std::nothrow) _ImeOrientationAgent(publicControl); + SysTryReturn(NID_UI, pAgent, 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 pAgent; + +CATCH: + delete pAgent; + return null; +} + +_ImeOrientationAgent::_ImeOrientationAgent(Control& publicControl) + : __publicControl(publicControl) + , __pPublicEvent(null) + , __status(ORIENTATION_STATUS_PORTRAIT) +{ + _PublicOrientationEvent* pPublicEvent = _PublicOrientationEvent::CreateInstanceN(publicControl); + + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI, pPublicEvent, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pPublicEvent = pPublicEvent; + + SetLastResult(E_SUCCESS); +} + +_ImeOrientationAgent::~_ImeOrientationAgent(void) +{ + if (__pPublicEvent) + { + delete __pPublicEvent; + __pPublicEvent = null; + } +} + +void +_ImeOrientationAgent::AddListener(IOrientationEventListener& listener) +{ + result r = __pPublicEvent->AddListener(listener); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + SetLastResult(E_SUCCESS); +} + +void +_ImeOrientationAgent::RemoveListener(IOrientationEventListener& listener) +{ + result r = __pPublicEvent->RemoveListener(listener); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + SetLastResult(E_SUCCESS); +} + +OrientationStatus +_ImeOrientationAgent::GetStatus(void) const +{ + return __status; +} + +void +_ImeOrientationAgent::UpdateOrientation(int angle) +{ + SysLog(NID_UI, "[Ime Rotation]"); + + _ControlImpl* pImpl = _ControlImpl::GetInstance(__publicControl); + if (!pImpl) + { + return; + } + + _Window* pRootWindow = pImpl->GetCore().GetRootWindow(); + if (!pRootWindow) + { + return; + } + + int rotation = angle; + + _RootVisualElement* pRootVisualElement = pRootWindow->GetRootVisualElement(); + if (!pRootVisualElement) + { + SysLog(NID_UI, "[Ime Rotation] The root visual element is null."); + return; + } + + _EflLayer* pLayer = static_cast<_EflLayer*>(pRootVisualElement->GetNativeLayer()); + if (!pLayer) + { + SysLog(NID_UI, "[Ime Rotation] The efl layer is null."); + return; + } + + Evas_Object* pWinObj = pLayer->GetElmWin(); + + if (pWinObj) + { + elm_win_rotation_with_resize_set(pWinObj, rotation); + } + + OrientationStatus status = ORIENTATION_STATUS_NONE; + switch (rotation) + { + case 0: + status = ORIENTATION_STATUS_PORTRAIT; + break; + case 270: + status = ORIENTATION_STATUS_LANDSCAPE; + break; + case 180: + status = ORIENTATION_STATUS_PORTRAIT_REVERSE; + break; + case 90: + status = ORIENTATION_STATUS_LANDSCAPE_REVERSE; + break; + default: + break; + } + + __status = status; + + FireEvent(status); + pImpl->Invalidate(true); +} + +void +_ImeOrientationAgent::FireEvent(OrientationStatus status) +{ + ClearLastResult(); + + _ControlManager* pCoreManager = _ControlManager::GetInstance(); + SysAssert(pCoreManager); + + _ControlImpl* pImpl = _ControlImpl::GetInstance(__publicControl); + if (!pImpl) + { + return; + } + + _ControlOrientation coreOrientation = + (status == ORIENTATION_STATUS_PORTRAIT || status == ORIENTATION_STATUS_PORTRAIT_REVERSE) ? + _CONTROL_ORIENTATION_PORTRAIT : _CONTROL_ORIENTATION_LANDSCAPE; + + _ControlImplManager* pImplManager = _ControlImplManager::GetInstance(); + SysAssert(pImplManager); + + // Core + pCoreManager->SetOrientation(coreOrientation); + pImplManager->SetOrientationStatus(status); + pImpl->GetCore().ChangeLayout(coreOrientation); + + // Public + IEventArg* pArg = _PublicOrientationEvent::CreateOrientationEventArgN(*__pPublicEvent->GetSource(), status); + __pPublicEvent->Fire(*pArg); +} + +}} // Tizen::Ui diff --git a/src/ui/FUi_ImeOrientationAgent.h b/src/ui/FUi_ImeOrientationAgent.h new file mode 100644 index 0000000..999ff56 --- /dev/null +++ b/src/ui/FUi_ImeOrientationAgent.h @@ -0,0 +1,65 @@ +// +// 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_ImeOrientationAgent.h + * @brief This is the header file for the _ImeOrientationAgent class. + * + * This header file contains the declarations of the %_ImeOrientationAgent class. + */ + +#ifndef _FUI_INTERNAL_IME_ORIENTATION_AGENT_H_ +#define _FUI_INTERNAL_IME_ORIENTATION_AGENT_H_ + +#include +#include "FUi_Types.h" + +namespace Tizen { namespace Ui +{ + +class _PublicOrientationEvent; + +class _ImeOrientationAgent +{ +public: + static _ImeOrientationAgent* CreateInstanceN(Control& publicControl); + ~_ImeOrientationAgent(void); + + void AddListener(IOrientationEventListener& listener); + void RemoveListener(IOrientationEventListener& listener); + + OrientationStatus GetStatus(void) const; + + void UpdateOrientation(int angle); + +private: + void FireEvent(OrientationStatus status); + + _ImeOrientationAgent(Control& publicControl); + + _ImeOrientationAgent(const _ImeOrientationAgent& rhs); + _ImeOrientationAgent& operator =(const _ImeOrientationAgent& rhs); + +private: + Control& __publicControl; + _PublicOrientationEvent* __pPublicEvent; + OrientationStatus __status; +}; // _ImeOrientationAgent + +}} // Tizen::Ui + +#endif // _FUI_INTERNAL_IME_ORIENTATION_AGENT_H_ \ No newline at end of file diff --git a/src/ui/FUi_InputConnectionImpl.cpp b/src/ui/FUi_InputConnectionImpl.cpp new file mode 100644 index 0000000..728bbc3 --- /dev/null +++ b/src/ui/FUi_InputConnectionImpl.cpp @@ -0,0 +1,1638 @@ +// +// 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_InputConnectionImpl.cpp + * @brief This is the implementation file for the _InputConnectionImpl class. + */ + +#include +#include +#include +#include +#include +#include +#include "FUi_BidiUtils.h" +#include "FUi_Control.h" +#include "FUi_ControlImpl.h" +#include "FUi_ControlManager.h" +#include "FUi_CoordinateSystemUtils.h" +#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" +#include "FUi_Window.h" +#include "FUiAnim_EflLayer.h" +#include "FUiAnim_RootVisualElement.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Locales; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Animations; + +namespace { + +const int LANGUAGE_CODE_START = 0; +const int LANGUAGE_CODE_MAX = 2; +const int LANGUAGE_IM_DATA_LENGTH = 10; + +void +OnInputPanelShowStateEvent(void* pData, Ecore_IMF_Context* pContext, int value) +{ + SysTryReturnVoidResult(NID_UI, pData != null, E_INVALID_ARG, "[E_INVALID_ARG] OnInputPanelShowStateEvent pData is null "); + SysTryReturnVoidResult(NID_UI, pContext != null, E_INVALID_ARG, "[E_INVALID_ARG] OnInputPanelShowStateEvent pContext is null "); + + SysLog(NID_UI_CTRL, "[InputConnection] OnInputPanelShowStateEvent is called.[ctx=0x%x, showState=%d]\n", pContext, value); + + _InputConnectionImpl* pImpl = static_cast<_InputConnectionImpl*>(pData); + IInputConnectionEventListener* pListener = pImpl->GetInputConnectionListener(); + IInputConnectionEventListenerF* pListenerF = pImpl->GetInputConnectionListenerF(); + InputConnection* pInputConnection = pImpl->GetInputConnection(); + + result r = E_SUCCESS; + + Ecore_IMF_Input_Panel_State ecoreInputPanelShowState = static_cast(value); + InputPanelShowState inputPanelState = INPUT_PANEL_SHOW_STATE_HIDE; + + switch (ecoreInputPanelShowState) + { + case ECORE_IMF_INPUT_PANEL_STATE_SHOW: + inputPanelState = INPUT_PANEL_SHOW_STATE_SHOW; + break; + case ECORE_IMF_INPUT_PANEL_STATE_HIDE: + inputPanelState = INPUT_PANEL_SHOW_STATE_HIDE; + break; + case ECORE_IMF_INPUT_PANEL_STATE_WILL_SHOW: + return; + default: + break; + } + + r = pImpl->SetInputPanelShowState(inputPanelState); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] This instance is not constructed."); + + if (pListener) + { + pListener->OnInputConnectionPanelShowStateChanged(*pInputConnection, inputPanelState); + } + if (pListenerF) + { + pListenerF->OnInputConnectionPanelShowStateChanged(*pInputConnection, inputPanelState); + } + SetLastResult(E_SUCCESS); + + return; +} + +void +OnInputPanelLanguageEvent(void* pData, Ecore_IMF_Context* pContext, int value) +{ + SysTryReturnVoidResult(NID_UI, pData != null, E_INVALID_ARG, "[E_INVALID_ARG] OnInputPanelLanguageEvent pData is null "); + SysTryReturnVoidResult(NID_UI, pContext != null, E_INVALID_ARG, "[E_INVALID_ARG] OnInputPanelLanguageEvent pContext is null "); + + _InputConnectionImpl* pImpl = static_cast<_InputConnectionImpl*>(pData); + IInputConnectionEventListener* pListener = pImpl->GetInputConnectionListener(); + IInputConnectionEventListenerF* pListenerF = pImpl->GetInputConnectionListenerF(); + InputConnection* pInputConnection = pImpl->GetInputConnection(); + + char* pLocale = null; + ecore_imf_context_input_panel_language_locale_get(pContext, &pLocale); + String tempBuffer(pLocale); + String language; + tempBuffer.SubString(LANGUAGE_CODE_START, LANGUAGE_CODE_MAX, language); + LanguageCode newLanguageCode = Locale::TwoLetterLanguageCodeStringToLanguageCode(language); + + if (pListener) + { + pListener->OnInputConnectionPanelLanguageChanged(*pInputConnection, newLanguageCode); + } + if (pListenerF) + { + pListenerF->OnInputConnectionPanelLanguageChanged(*pInputConnection, newLanguageCode); + } + if (pLocale) + { + free(pLocale); + } + + SetLastResult(E_SUCCESS); + + return; +} + +void +OnInputPanelSizeChangedEvent(void* pData, Ecore_IMF_Context* pContext, int value) +{ + SysTryReturnVoidResult(NID_UI, pData != null, E_INVALID_ARG, "[E_INVALID_ARG] OnInputPanelSizeChangedEvent pData is null "); + SysTryReturnVoidResult(NID_UI, pContext != null, E_INVALID_ARG, "[E_INVALID_ARG] OnInputPanelSizeChangedEvent pContext is null "); + + _InputConnectionImpl* pImpl = static_cast<_InputConnectionImpl*>(pData); + IInputConnectionEventListener* pListener = pImpl->GetInputConnectionListener(); + IInputConnectionEventListenerF* pListenerF = pImpl->GetInputConnectionListenerF(); + InputConnection* pInputConnection = pImpl->GetInputConnection(); + + Rectangle bounds = pImpl->GetInputPanelBounds(); + + SysLog(NID_UI_CTRL, "[InputConnection] OnInputPanelSizeChangedEvent is called.[ctx=0x%x][x = %d, y = %d, width = %d, height = %d]\n", pContext, bounds.x, bounds.y, bounds.width, bounds.height); + + if (pListener) + { + pListener->OnInputConnectionPanelBoundsChanged(*pInputConnection, bounds); + } + if (pListenerF) + { + pListenerF->OnInputConnectionPanelBoundsChanged(*pInputConnection, _CoordinateSystemUtils::ConvertToFloat(bounds)); + } + + SetLastResult(E_SUCCESS); + + return; +} + +void +OnInputPanelPredictionModeEvent(void* pData, Ecore_IMF_Context* pContext, int value) +{ + SysTryReturnVoidResult(NID_UI, pData != null, E_INVALID_ARG, "[E_INVALID_ARG] OnInputPanelPredictionModeEvent pData is null "); + SysTryReturnVoidResult(NID_UI, pContext != null, E_INVALID_ARG, "[E_INVALID_ARG] OnInputPanelPredictionModeEvent pContext is null "); + + _InputConnectionImpl* pImpl = static_cast<_InputConnectionImpl*>(pData); + IInputConnectionEventListener* pListener = pImpl->GetInputConnectionListener(); + IInputConnectionEventListenerF* pListenerF = pImpl->GetInputConnectionListenerF(); + InputConnection* pInputConnection = pImpl->GetInputConnection(); + + if (pListener) + { + pListener->OnInputConnectionTextPredictionShowStateChanged(*pInputConnection, static_cast(value)); + } + if (pListenerF) + { + pListenerF->OnInputConnectionTextPredictionShowStateChanged(*pInputConnection, static_cast(value)); + } + SetLastResult(E_SUCCESS); + + return; +} + +void +OnInputPanelPredictionSizeChangedEvent(void* pData, Ecore_IMF_Context* pContext, int value) +{ + SysTryReturnVoidResult(NID_UI, pData != null, E_INVALID_ARG, "[E_INVALID_ARG] OnInputPanelPredictionSizeChangedEvent pData is null "); + SysTryReturnVoidResult(NID_UI, pContext != null, E_INVALID_ARG, "[E_INVALID_ARG] OnInputPanelPredictionSizeChangedEvent pContext is null "); + + _InputConnectionImpl* pImpl = static_cast<_InputConnectionImpl*>(pData); + IInputConnectionEventListener* pListener = pImpl->GetInputConnectionListener(); + IInputConnectionEventListenerF* pListenerF = pImpl->GetInputConnectionListenerF(); + InputConnection* pInputConnection = pImpl->GetInputConnection(); + + Rectangle bounds = pImpl->GetPredictionBounds(); + + if (pListener) + { + pListener->OnInputConnectionTextPredictionBoundsChanged(*pInputConnection, bounds); + } + if (pListenerF) + { + pListenerF->OnInputConnectionTextPredictionBoundsChanged(*pInputConnection, _CoordinateSystemUtils::ConvertToFloat(bounds)); + } + SetLastResult(E_SUCCESS); + + return; +} + +Eina_Bool +OnRetrieveSurrounding(void* pData, Ecore_IMF_Context* pContext, char** pText, int* pCursorPostion) +{ + SysTryReturn(NID_UI, pData != null, EINA_FALSE, E_INVALID_ARG, "[E_INVALID_ARG] OnRetrieveSurrounding pData == null."); + SysTryReturn(NID_UI, pContext != null, EINA_FALSE, E_INVALID_ARG, "[E_INVALID_ARG] OnRetrieveSurrounding pContext is null "); + + _InputConnectionImpl* pImpl = static_cast<_InputConnectionImpl*>(pData); + IInputConnectionProvider* pProvider = pImpl->GetInputConnectionProvider(); + + InputConnection* pInputConnection = pImpl->GetInputConnection(); + + char* pSurroundingText = null; + String string; + + pProvider->GetPreviousText(*pInputConnection, string, *pCursorPostion); + + int len = wcstombs(0, static_cast(string.GetPointer()), 0); + //SysTryReturn(NID_BASE, len != -1, null, E_INVALID_ARG, "[E_INVALID_ARG] Invalid string."); + + if (pText == null) + { + return ECORE_CALLBACK_PASS_ON; + } + + if (len < 0) + { + *pText = null; + return ECORE_CALLBACK_DONE; + } + //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] Memory allocation failed."); + + len = wcstombs(pSurroundingText, static_cast(string.GetPointer()), len); + pSurroundingText[len] = null; + *pText = pSurroundingText; + + SetLastResult(E_SUCCESS); + + return ECORE_CALLBACK_PASS_ON; +} + +void +OnCommitTextEcoreEvent(void* pData, Ecore_IMF_Context* pContext, void* pEventInfo) +{ + SysTryReturnVoidResult(NID_UI, pData != null, E_INVALID_ARG, "[E_INVALID_ARG] OnCommitTextEcoreEvent pData is null "); + SysTryReturnVoidResult(NID_UI, pEventInfo != null, E_INVALID_ARG, "[E_INVALID_ARG] OnCommitTextEcoreEvent pEventInfo is null "); + + _InputConnectionImpl* pImpl = static_cast<_InputConnectionImpl*>(pData); + IInputConnectionEventListener* pListener = pImpl->GetInputConnectionListener(); + IInputConnectionEventListenerF* pListenerF = pImpl->GetInputConnectionListenerF(); + + String commitText(static_cast(pEventInfo)); + InputConnection* pInputConnection = pImpl->GetInputConnection(); + + if (pListener) + { + pListener->OnInputConnectionTextCommitted(*pInputConnection, commitText); + } + if (pListenerF) + { + pListenerF->OnInputConnectionTextCommitted(*pInputConnection, commitText); + } + + SetLastResult(E_SUCCESS); + + return; +} + +void +OnComposeTextEcoreEvent(void* pData, Ecore_IMF_Context* pContext, void* pEventInfo) +{ + SysTryReturnVoidResult(NID_UI, pData != null, E_INVALID_ARG, "[E_INVALID_ARG] OnComposeTextEcoreEvent pData is null "); + //SysTryReturnVoidResult(NID_UI, pEventInfo != null, E_INVALID_ARG, "[E_INVALID_ARG] OnComposeTextEcoreEvent pEventInfo is null "); + + _InputConnectionImpl* pImpl = static_cast<_InputConnectionImpl*>(pData); + IInputConnectionEventListener* pListener = pImpl->GetInputConnectionListener(); + IInputConnectionEventListenerF* pListenerF = pImpl->GetInputConnectionListenerF(); + + int cursorPosition = 0; + char* pText = null; + ecore_imf_context_preedit_string_get(pContext, &pText, &cursorPosition); + String composingText(pText); + if (pText) + { + free(pText); + } + + InputConnection* pInputConnection = pImpl->GetInputConnection(); + + if (pListener) + { + pListener->OnInputConnectionComposingTextChanged(*pInputConnection, composingText, cursorPosition); + } + if (pListenerF) + { + pListenerF->OnInputConnectionComposingTextChanged(*pInputConnection, composingText, cursorPosition); + } + + SetLastResult(E_SUCCESS); + + return; +} + +void +OnDeleteSurroundingTextEcoreEvent(void* pData, Ecore_IMF_Context* pContext, void* pEventInfo) +{ + SysTryReturnVoidResult(NID_UI, pData != null, E_INVALID_ARG, "[E_INVALID_ARG] OnDeleteSurroundingTextEcoreEvent pData is null "); + SysTryReturnVoidResult(NID_UI, pEventInfo != null, E_INVALID_ARG, "[E_INVALID_ARG] OnDeleteSurroundingTextEcoreEvent pEventInfo is null "); + + _InputConnectionImpl* pImpl = static_cast<_InputConnectionImpl*>(pData); + IInputConnectionProvider* pProvider = pImpl->GetInputConnectionProvider(); + Ecore_IMF_Event_Delete_Surrounding* pEvent = static_cast(pEventInfo); + + InputConnection* pInputConnection = pImpl->GetInputConnection(); + pProvider->DeleteSurroundingText(*pInputConnection, pEvent->offset, pEvent->n_chars); + + SetLastResult(E_SUCCESS); + + return; +} + +/* +Eina_Bool +OnUSBKeyboardEcoreEvent(void* pData, int eventType, void* pEventInfo) +{ + return ECORE_CALLBACK_PASS_ON; +} +*/ + +} // Anonymous + +namespace Tizen { namespace Ui { + +_InputConnectionImpl::_InputConnectionImpl(InputConnection* pInputConnection) + : __pContext(null) + , __controlHandle() + , __IsBounded(false) + , __pListener(null) + , __pListenerF(null) + , __pProvider(null) + , __pInputConnection(pInputConnection) + , __inputPanelAction(INPUT_PANEL_ACTION_ENTER) + , __inputPanelState(INPUT_PANEL_SHOW_STATE_HIDE) + , __inputPanelStyle(INPUT_PANEL_STYLE_NORMAL) + , __pUSBEventHandler(null) + , __IsKeyEventSkipped(false) + , __passwordMode(false) +{ + +} + +_InputConnectionImpl::~_InputConnectionImpl(void) +{ + __pInputConnection = null; + __pListener = null; + __pListenerF = null; + __pProvider = null; + if (__pContext) + { + RemoveInputPanelCallback(); + RemoveEcoreEventCallback(); + RemoveEvasObjectEventCallback(); + ecore_imf_context_focus_out(__pContext); + ecore_imf_context_del(__pContext); + ecore_imf_shutdown(); + __pContext = null; + } +} + +_InputConnectionImpl* +_InputConnectionImpl::CreateInputConnectionImplN(InputConnection* pInputConnection) +{ + ClearLastResult(); + + _InputConnectionImpl* pImpl = new (std::nothrow) _InputConnectionImpl(pInputConnection); + SysTryReturn(NID_UI, pImpl, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + return pImpl; + +} + +result +_InputConnectionImpl::Initialize(const _Control& control, const IInputConnectionEventListener& listener, const IInputConnectionProvider& provider) +{ + result r = E_SUCCESS; + + __controlHandle = control.GetHandle(); + + __pListener = const_cast(&listener); + __pListenerF = null; + __pProvider = const_cast(&provider); + + ecore_imf_init(); + const char* pId = ecore_imf_context_default_id_get(); + SysTryReturnResult(NID_UI, pId != null, E_SYSTEM, "A system error occurred."); + + + __pContext = (Ecore_IMF_Context*)ecore_imf_context_add(pId); + SysTryReturnResult(NID_UI, __pContext, E_SYSTEM, "A system error occurred."); + + AddInputPanelCallback(); + AddEcoreEventCallback(); + AddEvasObjectEventCallback(); + + return r; + +} + +result +_InputConnectionImpl::Initialize(const _Control& control, const IInputConnectionEventListenerF& listener, const IInputConnectionProvider& provider) +{ + result r = E_SUCCESS; + + __controlHandle = control.GetHandle(); + + __pListener = null; + __pListenerF = const_cast(&listener); + __pProvider = const_cast(&provider); + + ecore_imf_init(); + const char* pId = ecore_imf_context_default_id_get(); + SysTryReturnResult(NID_UI, pId != null, E_SYSTEM, "A system error occurred."); + + + __pContext = (Ecore_IMF_Context*)ecore_imf_context_add(pId); + SysTryReturnResult(NID_UI, __pContext, E_SYSTEM, "A system error occurred."); + + AddInputPanelCallback(); + AddEcoreEventCallback(); + AddEvasObjectEventCallback(); + + return r; + +} + +result +_InputConnectionImpl::BindInputMethod(void) +{ + result r = E_SUCCESS; + + SysAssertf(__pContext != null, "Not yet constructed. Construct() should be called before use."); + + _Control* pControl = _ControlManager::GetInstance()->GetObject(__controlHandle); + + _Window* pWindow = pControl->GetRootWindow(); + if (pWindow) + { + _RootVisualElement* pRootVE = pWindow->GetRootVisualElement(); + _EflLayer* pLayer = static_cast<_EflLayer*>(pRootVE->GetNativeLayer()); + + if (pLayer) + { + ecore_imf_context_client_window_set(__pContext, (void*)ecore_evas_window_get(pLayer->GetEcoreEvas())); + ecore_imf_context_client_canvas_set(__pContext, pLayer->GetEvas()); + ecore_imf_context_input_panel_enabled_set(__pContext, EINA_FALSE); + } + } + + ecore_imf_context_focus_in(__pContext); + __IsBounded = true; + + SysLog(NID_UI_CTRL, "[InputConnection] BindInputMethod is called.[ctx=0x%x]\n", __pContext); + + return r; +} + +result +_InputConnectionImpl::UnbindInputMethod(void) +{ + result r = E_SUCCESS; + + SysAssertf(__pContext != null, "Not yet constructed. Construct() should be called before use."); + + ecore_imf_context_focus_out(__pContext); + + SysLog(NID_UI_CTRL, "[InputConnection] UnbindInputMethod is called.[ctx=0x%x]\n", __pContext); + + __IsBounded = false; + + return r; +} + +result +_InputConnectionImpl::ShowInputPanel(void) +{ + result r = E_SUCCESS; + + SysAssertf(__pContext != null, "Not yet constructed. Construct() should be called before use."); + SysTryReturnResult(NID_UI, __IsBounded, E_INVALID_STATE, "This is not a bind state"); + + ecore_imf_context_input_panel_show(__pContext); + __inputPanelState = INPUT_PANEL_SHOW_STATE_SHOW; + + SysLog(NID_UI_CTRL, "[InputConnection] ShowInputPanel is called.[ctx=0x%x]\n", __pContext); + + return r; +} + +result +_InputConnectionImpl::HideInputPanel(void) +{ + result r = E_SUCCESS; + + SysAssertf(__pContext != null, "Not yet constructed. Construct() should be called before use."); + SysTryReturnResult(NID_UI, __IsBounded, E_INVALID_STATE, "This is not a bind state"); + + ecore_imf_context_input_panel_hide(__pContext); + __inputPanelState = INPUT_PANEL_SHOW_STATE_HIDE; + + SysLog(NID_UI_CTRL, "[InputConnection] HideInputPanel is called.[ctx=0x%x]\n", __pContext); + + return r; +} + +result +_InputConnectionImpl::SetInputPanelStyle(InputPanelStyle style) +{ + result r = E_SUCCESS; + + SysAssertf(__pContext != null, "Not yet constructed. Construct() should be called before use."); + + __inputPanelStyle = style; + + Ecore_IMF_Input_Panel_Layout ecorePanelLayout = ECORE_IMF_INPUT_PANEL_LAYOUT_NORMAL; + + switch (style) + { + case INPUT_PANEL_STYLE_NORMAL: + ecorePanelLayout = ECORE_IMF_INPUT_PANEL_LAYOUT_NORMAL; + if (__passwordMode == true) + { + ecorePanelLayout = ECORE_IMF_INPUT_PANEL_LAYOUT_PASSWORD; + } + break; + case INPUT_PANEL_STYLE_NUMBER: + ecorePanelLayout = ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBER; + break; + case INPUT_PANEL_STYLE_EMAIL: + ecorePanelLayout = ECORE_IMF_INPUT_PANEL_LAYOUT_EMAIL; + break; + case INPUT_PANEL_STYLE_URL: + ecorePanelLayout = ECORE_IMF_INPUT_PANEL_LAYOUT_URL; + break; + case INPUT_PANEL_STYLE_PHONE_NUMBER: + ecorePanelLayout = ECORE_IMF_INPUT_PANEL_LAYOUT_PHONENUMBER; + break; + case INPUT_PANEL_STYLE_IP: + ecorePanelLayout = ECORE_IMF_INPUT_PANEL_LAYOUT_IP; + break; + case INPUT_PANEL_STYLE_NUMBER_ONLY: + ecorePanelLayout = ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBERONLY; + break; + default: + break; + } + + ecore_imf_context_input_panel_layout_set(__pContext, ecorePanelLayout); + return r; +} + +InputPanelStyle +_InputConnectionImpl::GetInputPanelStyle(void) const +{ + ClearLastResult(); + + SysAssertf(__pContext != null, "Not yet constructed. Construct() should be called before use."); + + Ecore_IMF_Input_Panel_Layout ecorePanelLayout = ecore_imf_context_input_panel_layout_get(__pContext); + InputPanelStyle inputPanelStyle = INPUT_PANEL_STYLE_NORMAL; + + switch (ecorePanelLayout) + { + case ECORE_IMF_INPUT_PANEL_LAYOUT_NORMAL: + inputPanelStyle = INPUT_PANEL_STYLE_NORMAL; + break; + case ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBER: + inputPanelStyle = INPUT_PANEL_STYLE_NUMBER; + break; + case ECORE_IMF_INPUT_PANEL_LAYOUT_EMAIL: + inputPanelStyle = INPUT_PANEL_STYLE_EMAIL; + break; + case ECORE_IMF_INPUT_PANEL_LAYOUT_URL: + inputPanelStyle = INPUT_PANEL_STYLE_URL; + break; + case ECORE_IMF_INPUT_PANEL_LAYOUT_PHONENUMBER: + inputPanelStyle = INPUT_PANEL_STYLE_PHONE_NUMBER; + break; + case ECORE_IMF_INPUT_PANEL_LAYOUT_IP: + inputPanelStyle = INPUT_PANEL_STYLE_IP; + break; + case ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBERONLY: + inputPanelStyle = INPUT_PANEL_STYLE_NUMBER_ONLY; + break; + default: + break; + } + + return inputPanelStyle; +} + +result +_InputConnectionImpl::SetAutoCapitalizationMode(AutoCapitalizationMode autoCapitalizationMode) +{ + result r = E_SUCCESS; + + SysAssertf(__pContext != null, "Not yet constructed. Construct() should be called before use."); + + Ecore_IMF_Autocapital_Type ecoreAutoCapitalization = ECORE_IMF_AUTOCAPITAL_TYPE_SENTENCE; + + switch (autoCapitalizationMode) + { + case AUTO_CAPITALIZATION_MODE_NONE: + ecoreAutoCapitalization = ECORE_IMF_AUTOCAPITAL_TYPE_NONE; + break; + case AUTO_CAPITALIZATION_MODE_WORD: + ecoreAutoCapitalization = ECORE_IMF_AUTOCAPITAL_TYPE_WORD; + break; + case AUTO_CAPITALIZATION_MODE_SENTENCE: + ecoreAutoCapitalization = ECORE_IMF_AUTOCAPITAL_TYPE_SENTENCE; + break; + case AUTO_CAPITALIZATION_MODE_ALL: + ecoreAutoCapitalization =ECORE_IMF_AUTOCAPITAL_TYPE_ALLCHARACTER; + break; + default: + break; + } + + ecore_imf_context_autocapital_type_set(__pContext, ecoreAutoCapitalization); + return r; +} + +AutoCapitalizationMode +_InputConnectionImpl::GetAutoCapitalizationMode(void) const +{ + ClearLastResult(); + + SysAssertf(__pContext != null, "Not yet constructed. Construct() should be called before use."); + + Ecore_IMF_Autocapital_Type ecoreAutoCapitalization = ecore_imf_context_autocapital_type_get(__pContext); + AutoCapitalizationMode autoCapitalizationMode = AUTO_CAPITALIZATION_MODE_SENTENCE; + + switch (ecoreAutoCapitalization) + { + case ECORE_IMF_AUTOCAPITAL_TYPE_NONE: + autoCapitalizationMode = AUTO_CAPITALIZATION_MODE_NONE; + break; + case ECORE_IMF_AUTOCAPITAL_TYPE_WORD: + autoCapitalizationMode = AUTO_CAPITALIZATION_MODE_WORD; + break; + case ECORE_IMF_AUTOCAPITAL_TYPE_SENTENCE: + autoCapitalizationMode = AUTO_CAPITALIZATION_MODE_SENTENCE; + break; + case ECORE_IMF_AUTOCAPITAL_TYPE_ALLCHARACTER: + autoCapitalizationMode = AUTO_CAPITALIZATION_MODE_ALL; + break; + default: + break; + } + + return autoCapitalizationMode; +} + +InputPanelShowState +_InputConnectionImpl::GetInputPanelShowState(void) const +{ + ClearLastResult(); + + SysAssertf(__pContext != null, "Not yet constructed. Construct() should be called before use."); + + return __inputPanelState; +} + +result +_InputConnectionImpl::SetInputPanelShowState(InputPanelShowState state) +{ + result r = E_SUCCESS; + + SysAssertf(__pContext != null, "Not yet constructed. Construct() should be called before use."); + + __inputPanelState = state; + return r; +} + +result +_InputConnectionImpl::FinishTextComposition(void) +{ + result r = E_SUCCESS; + + SysAssertf(__pContext != null, "Not yet constructed. Construct() should be called before use."); + SysTryReturnResult(NID_UI, __IsBounded, E_INVALID_STATE, "This is not a bind state"); + + ecore_imf_context_reset(__pContext); + return r; +} + +result +_InputConnectionImpl::SetInputPanelAction(InputPanelAction inputPanelAction) +{ + result r = E_SUCCESS; + + SysAssertf(__pContext != null, "Not yet constructed. Construct() should be called before use."); + + __inputPanelAction = inputPanelAction; + Ecore_IMF_Input_Panel_Return_Key_Type ecorePanelAction = ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT; + + switch (inputPanelAction) + { + case INPUT_PANEL_ACTION_GO: + ecorePanelAction = ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_GO; + break; + case INPUT_PANEL_ACTION_NEXT: + ecorePanelAction = ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_NEXT; + break; + case INPUT_PANEL_ACTION_SEND: + ecorePanelAction = ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_SEND; + break; + case INPUT_PANEL_ACTION_SEARCH: + ecorePanelAction = ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_SEARCH; + break; + case INPUT_PANEL_ACTION_LOGIN: + ecorePanelAction = ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_LOGIN; + break; + case INPUT_PANEL_ACTION_SIGN_IN: + ecorePanelAction = ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_SIGNIN; + break; + case INPUT_PANEL_ACTION_JOIN: + ecorePanelAction = ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_JOIN; + break; + case INPUT_PANEL_ACTION_DONE: + ecorePanelAction = ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DONE; + break; + case INPUT_PANEL_ACTION_ENTER: + ecorePanelAction = ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT; + break; + default: + break; + } + + ecore_imf_context_input_panel_return_key_type_set(__pContext, ecorePanelAction); + + return r; +} + +InputPanelAction +_InputConnectionImpl::GetInputPanelAction(void) const +{ + ClearLastResult(); + + SysAssertf(__pContext != null, "Not yet constructed. Construct() should be called before use."); + + Ecore_IMF_Input_Panel_Return_Key_Type ecorePanelAction = ecore_imf_context_input_panel_return_key_type_get(__pContext); + InputPanelAction inputPanelAction = INPUT_PANEL_ACTION_ENTER; + + switch (ecorePanelAction) + { + case ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_GO: + inputPanelAction = INPUT_PANEL_ACTION_GO; + break; + case ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_NEXT: + inputPanelAction = INPUT_PANEL_ACTION_NEXT; + break; + case ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_SEND: + inputPanelAction = INPUT_PANEL_ACTION_SEND; + break; + case ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_SEARCH: + inputPanelAction = INPUT_PANEL_ACTION_SEARCH; + break; + case ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_LOGIN: + inputPanelAction = INPUT_PANEL_ACTION_LOGIN; + break; + case ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_SIGNIN: + inputPanelAction = INPUT_PANEL_ACTION_SIGN_IN; + break; + case ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_JOIN: + inputPanelAction = INPUT_PANEL_ACTION_JOIN; + break; + case ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DONE: + inputPanelAction = INPUT_PANEL_ACTION_DONE; + break; + case ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT: + inputPanelAction = INPUT_PANEL_ACTION_ENTER; + break; + default: + break; + } + + return inputPanelAction; +} + +result +_InputConnectionImpl::SetInputPanelActionEnabled(bool enable) +{ + result r = E_SUCCESS; + + SysAssertf(__pContext != null, "Not yet constructed. Construct() should be called before use."); + + ecore_imf_context_input_panel_return_key_disabled_set(__pContext, (!enable ? EINA_TRUE : EINA_FALSE)); + return r; +} + +bool +_InputConnectionImpl::IsInputPanelActionEnabled(void) const +{ + ClearLastResult(); + + SysAssertf(__pContext != null, "Not yet constructed. Construct() should be called before use."); + + Eina_Bool enabled = ecore_imf_context_input_panel_return_key_disabled_get(__pContext); + + return static_cast(!enabled); +} + +result +_InputConnectionImpl::SetCursorPosition(int position) +{ + result r = E_SUCCESS; + + SysAssertf(__pContext != null, "Not yet constructed. Construct() should be called before use."); + SysTryReturnResult(NID_UI, position >= 0, E_INVALID_ARG, "The input parameter is invalid."); + SysTryReturnResult(NID_UI, __IsBounded, E_INVALID_STATE, "This is not a bind state"); + + ecore_imf_context_cursor_position_set(__pContext, position); + return r; +} + +result +_InputConnectionImpl::SetCursorBounds(const Rectangle& rect) +{ + result r = E_SUCCESS; + + SysAssertf(__pContext != null, "Not yet constructed. Construct() should be called before use."); + + SysTryReturnResult(NID_UI, (rect.width > 0)&&(rect.height > 0), E_INVALID_ARG, "The input parameter is invalid."); + SysTryReturnResult(NID_UI, __IsBounded, E_INVALID_STATE, "This is not a bind state"); + + + Rectangle cursorRectangle; + cursorRectangle = rect; + + const _Control* pControl = _ControlManager::GetInstance()->GetObject(__controlHandle); + + if (pControl) + { + Rectangle absoluteControlRectangle; + absoluteControlRectangle = pControl->GetAbsoluteBounds(true); + cursorRectangle.x += absoluteControlRectangle.x; + cursorRectangle.y += absoluteControlRectangle.y; + } + + Rectangle physicalRect = _CoordinateSystemUtils::Transform(cursorRectangle); + + ecore_imf_context_cursor_location_set(__pContext, physicalRect.x, physicalRect.y, physicalRect.width, physicalRect.height); + return r; +} + +result +_InputConnectionImpl::SetCursorBounds(const FloatRectangle& rect) +{ + result r = E_SUCCESS; + + SysAssertf(__pContext != null, "Not yet constructed. Construct() should be called before use."); + + SysTryReturnResult(NID_UI, (rect.width > 0)&&(rect.height > 0), E_INVALID_ARG, "The input parameter is invalid."); + SysTryReturnResult(NID_UI, __IsBounded, E_INVALID_STATE, "This is not a bind state"); + + + FloatRectangle cursorRectangle; + cursorRectangle = rect; + + const _Control* pControl = _ControlManager::GetInstance()->GetObject(__controlHandle); + + if (pControl) + { + FloatRectangle absoluteControlRectangle; + absoluteControlRectangle = pControl->GetAbsoluteBoundsF(true); + cursorRectangle.x += absoluteControlRectangle.x; + cursorRectangle.y += absoluteControlRectangle.y; + } + + FloatRectangle physicalFloatRect = _CoordinateSystemUtils::Transform(cursorRectangle); + Rectangle physicalRect = _CoordinateSystemUtils::ConvertToInteger(physicalFloatRect); + + ecore_imf_context_cursor_location_set(__pContext, physicalRect.x, physicalRect.y, physicalRect.width, physicalRect.height); + return r; +} + +Rectangle +_InputConnectionImpl::GetInputPanelBounds(void) const +{ + ClearLastResult(); + + SysAssertf(__pContext != null, "Not yet constructed. Construct() should be called before use."); + + Rectangle inputPanelPhysicalRect; + Rectangle inputPanelLogicalRect; + + 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 +_InputConnectionImpl::GetInputPanelBoundsF(void) const +{ + ClearLastResult(); + + SysAssertf(__pContext != null, "Not yet constructed. Construct() should be called before use."); + + int x = 0; + int y = 0; + int w = 0; + int h = 0; + + ecore_imf_context_input_panel_geometry_get(__pContext, &x, &y, &w, &h); + + 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 +_InputConnectionImpl::GetPredictionBounds(void) const +{ + ClearLastResult(); + + SysAssertf(__pContext != null, "Not yet constructed. Construct() should be called before use."); + + Rectangle predictionPhysicalRect; + Rectangle predictionLogicalRect; + + 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 +_InputConnectionImpl::GetPredictionBoundsF(void) const +{ + ClearLastResult(); + + SysAssertf(__pContext != null, "Not yet constructed. Construct() should be called before use."); + + int x = 0; + int y = 0; + int w = 0; + int h = 0; + + ecore_imf_context_candidate_panel_geometry_get(__pContext, &x, &y, &w, &h); + + 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 +_InputConnectionImpl::SetTextPredictionEnabled(bool enable) +{ + result r = E_SUCCESS; + + SysAssertf(__pContext != null, "Not yet constructed. Construct() should be called before use."); + + ecore_imf_context_prediction_allow_set(__pContext, (enable ? EINA_TRUE : EINA_FALSE)); + + return r; +} + +bool +_InputConnectionImpl::IsTextPredictionEnabled(void) const +{ + ClearLastResult(); + + SysAssertf(__pContext != null, "Not yet constructed. Construct() should be called before use."); + + Eina_Bool enabled = ecore_imf_context_prediction_allow_get(__pContext); + + return static_cast(enabled); +} + +result +_InputConnectionImpl::SetCapsLockEnabled(bool enable) +{ + result r = E_SUCCESS; + + SysAssertf(__pContext != null, "Not yet constructed. Construct() should be called before use."); + + ecore_imf_context_input_panel_caps_lock_mode_set(__pContext, (enable ? EINA_TRUE : EINA_FALSE)); + + return r; +} + +bool +_InputConnectionImpl::IsCapsLockEnabled(void) const +{ + ClearLastResult(); + + SysAssertf(__pContext != null, "Not yet constructed. Construct() should be called before use."); + + Eina_Bool enabled = ecore_imf_context_input_panel_caps_lock_mode_get(__pContext); + + return static_cast(enabled); +} + +result +_InputConnectionImpl::SetPasswordMode(bool enable) +{ + result r = E_SUCCESS; + + SysAssertf(__pContext != null, "Not yet constructed. Construct() should be called before use."); + + __passwordMode = true; + ecore_imf_context_input_panel_layout_set(__pContext, ECORE_IMF_INPUT_PANEL_LAYOUT_PASSWORD); + + return r; +} + +bool +_InputConnectionImpl::IsPasswordMode(void) const +{ + return __passwordMode; +} + +result +_InputConnectionImpl::SetInputPanelLanguage(LanguageCode languageCode) +{ + result r = E_SUCCESS; + + SysAssertf(__pContext != null, "Not yet constructed. Construct() should be called before use."); + + String language(L""); + language = _BidiUtils::ConvertLanguageCountryCodeString(languageCode); + if (language == String(L"")) + { + const char* pLanguage = "lang=en_US"; + ecore_imf_context_input_panel_imdata_set(__pContext, pLanguage, LANGUAGE_IM_DATA_LENGTH); + return r; + } + else + { + 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] Memory allocation failed."); + + len = wcstombs(pLanguage, static_cast(language.GetPointer()), len); + pLanguage[len] = null; + + ecore_imf_context_input_panel_imdata_set(__pContext, pLanguage, LANGUAGE_IM_DATA_LENGTH); + + free(pLanguage); + } + return r; +} + +LanguageCode +_InputConnectionImpl::GetInputPanelLanguage(void) const +{ + SysAssertf(__pContext != null, "Not yet constructed. Construct() should be called before use."); + + ClearLastResult(); + + char* pLocale = null; + + ecore_imf_context_input_panel_language_locale_get(__pContext, &pLocale); + + String tempBuffer(pLocale); + String language; + tempBuffer.SubString(LANGUAGE_CODE_START, LANGUAGE_CODE_MAX, language); + + if (pLocale) + { + free(pLocale); + } + + return Locale::TwoLetterLanguageCodeStringToLanguageCode(language); +} + +void +_InputConnectionImpl::SendOpaqueCommand(const String& command) +{ + SysAssertf(__pContext != null, "Not yet constructed. Construct() should be called before use."); + + char* pCommand = null; + int length = 0; + + length = wcstombs(0, static_cast(command.GetPointer()), 0); + 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 allocation failed."); + + length = wcstombs(pCommand, static_cast(command.GetPointer()), length); + pCommand[length] = null; + + ecore_imf_context_input_panel_imdata_set(__pContext, pCommand, length); + + free(pCommand); +} + +InputConnection* +_InputConnectionImpl::GetInputConnection(void) const +{ + return __pInputConnection; +} + +IInputConnectionEventListener* +_InputConnectionImpl::GetInputConnectionListener(void) const +{ + return __pListener; +} + +IInputConnectionEventListenerF* +_InputConnectionImpl::GetInputConnectionListenerF(void) const +{ + return __pListenerF; +} + +IInputConnectionProvider* +_InputConnectionImpl::GetInputConnectionProvider(void) const +{ + return __pProvider; +} + +bool +_InputConnectionImpl::CheckContextEvent(Ecore_IMF_Event_Type type, void* pEventInfo) +{ + ClearLastResult(); + + if (type == ECORE_IMF_EVENT_KEY_DOWN) + { + Evas_Event_Key_Down* pDownEvent = static_cast(pEventInfo); + SysTryReturn(NID_UI, pDownEvent != null, false, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + Ecore_IMF_Event_Key_Down ecoreEvent; + ecore_imf_evas_event_key_down_wrap(pDownEvent, &ecoreEvent); + if (ecore_imf_context_filter_event(__pContext, type, (Ecore_IMF_Event*)&ecoreEvent) == EINA_TRUE) + { + return true; + } + } + else if (type == ECORE_IMF_EVENT_KEY_UP) + { + Evas_Event_Key_Up* pUpEvent = static_cast(pEventInfo); + SysTryReturn(NID_UI, pUpEvent != null, false, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + Ecore_IMF_Event_Key_Up ecoreEvent; + ecore_imf_evas_event_key_up_wrap(pUpEvent, &ecoreEvent); + if (ecore_imf_context_filter_event(__pContext, type, (Ecore_IMF_Event*)&ecoreEvent) == EINA_TRUE) + { + return true; + } + } + return false; +} + +bool +_InputConnectionImpl::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) +{ + if (__IsKeyEventSkipped) + { + return false; + } + + _KeyCode keyCode = keyInfo.GetKeyCode(); + if (keyCode == _KEY_CLIPBOARD) + { + return false; + } + + Ecore_Event_Key* pEvent = static_cast(keyInfo.GetUserData()); + 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 allocation failed."); + + pKeyDown->keyname = pEvent->keyname; + + //need to check with SLP + int modifiers = ECORE_IMF_KEYBOARD_MODIFIER_NONE; + + if (pEvent->modifiers & ECORE_EVENT_MODIFIER_SHIFT) + { + modifiers |= ECORE_IMF_KEYBOARD_MODIFIER_SHIFT; + } + if (pEvent->modifiers & ECORE_EVENT_MODIFIER_CTRL) + { + modifiers |= ECORE_IMF_KEYBOARD_MODIFIER_CTRL; + } + if (pEvent->modifiers & ECORE_EVENT_MODIFIER_ALT) + { + modifiers |= ECORE_IMF_KEYBOARD_MODIFIER_ALT; + } + if (pEvent->modifiers & ECORE_EVENT_MODIFIER_WIN) + { + modifiers |= ECORE_IMF_KEYBOARD_MODIFIER_WIN; + } + pKeyDown->modifiers = static_cast(modifiers); + + int locks = ECORE_IMF_KEYBOARD_LOCK_NONE; + if (pEvent->modifiers & ECORE_EVENT_LOCK_SCROLL) + { + locks |= ECORE_IMF_KEYBOARD_LOCK_SCROLL; + } + if (pEvent->modifiers & ECORE_EVENT_LOCK_NUM) + { + locks |= ECORE_IMF_KEYBOARD_LOCK_NUM; + } + if (pEvent->modifiers & ECORE_EVENT_LOCK_CAPS) + { + locks |= ECORE_IMF_KEYBOARD_LOCK_CAPS; + } + pKeyDown->locks = static_cast(locks); + + pKeyDown->key = pEvent->key; + pKeyDown->string = pEvent->string; + pKeyDown->compose = pEvent->compose; + pKeyDown->timestamp = pEvent->timestamp; + + const _Control* pControl = _ControlManager::GetInstance()->GetObject(__controlHandle); + + if (&source == pControl) + { + if(CheckUSBKeyboardStatus() && pKeyDown->string)//usb keyboard exist + { + const char* key = const_cast(pKeyDown->string); + if(FilterKeyOnUSBMode(GetInputPanelStyle(), key, true) == E_SUCCESS) + { + free(pKeyDown); + return false; + } + } + + if (ecore_imf_context_filter_event(__pContext, ECORE_IMF_EVENT_KEY_DOWN, (Ecore_IMF_Event*)pKeyDown) == EINA_TRUE) + { + free(pKeyDown); + + return false; + } + else + { + 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; + } + + InputConnection* pInputConnection = GetInputConnection(); + String commitText(pEvent->compose); + wchar_t commitChar= '\0'; + commitText.GetCharAt(0, commitChar); + IInputConnectionEventListener* pListener = GetInputConnectionListener(); + IInputConnectionEventListenerF* pListenerF = GetInputConnectionListenerF(); + if (Character::IsAlphaNumeric(commitChar)) + { + if (pListener) + { + pListener->OnInputConnectionTextCommitted( *pInputConnection, commitText); + } + if (pListenerF) + { + pListenerF->OnInputConnectionTextCommitted( *pInputConnection, commitText); + } + } + if (commitText == L" " || commitText == L"\t") + { + if (pListener) + { + pListener->OnInputConnectionTextCommitted( *pInputConnection, commitText); + } + if (pListenerF) + { + pListenerF->OnInputConnectionTextCommitted( *pInputConnection, commitText); + } + } + if (commitText == L"\n" || commitText == L"\r") + { + if (pListener) + { + pListener->OnInputConnectionTextCommitted( *pInputConnection, commitText); + } + if (pListenerF) + { + pListenerF->OnInputConnectionTextCommitted( *pInputConnection, commitText); + } + } + if ( (commitChar >= 0x21 && commitChar <= 0x2F) || (commitChar >= 0x3A && commitChar <= 0x40) || + (commitChar >= 0x5B && commitChar <= 0x60) || (commitChar >= 0x7B && commitChar<= 0x7E) ) + { + if (pListener) + { + pListener->OnInputConnectionTextCommitted( *pInputConnection, commitText); + } + if (pListenerF) + { + pListenerF->OnInputConnectionTextCommitted( *pInputConnection, commitText); + } + } + + free(pKeyDown); + + return false; + } + } + + free(pKeyDown); + + SetLastResult(E_SUCCESS); + + return false; +} + +bool +_InputConnectionImpl::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) +{ + if (__IsKeyEventSkipped) + { + return false; + } + + _KeyCode keyCode = keyInfo.GetKeyCode(); + if (keyCode == _KEY_CLIPBOARD) + { + return false; + } + + Ecore_Event_Key* pEvent = static_cast(keyInfo.GetUserData()); + 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 allocation failed."); + + pKeyUp->keyname = pEvent->keyname; + + //need to check with SLP + int modifiers = ECORE_IMF_KEYBOARD_MODIFIER_NONE; + + if (pEvent->modifiers & ECORE_EVENT_MODIFIER_SHIFT) + { + modifiers |= ECORE_IMF_KEYBOARD_MODIFIER_SHIFT; + } + if (pEvent->modifiers & ECORE_EVENT_MODIFIER_CTRL) + { + modifiers |= ECORE_IMF_KEYBOARD_MODIFIER_CTRL; + } + if (pEvent->modifiers & ECORE_EVENT_MODIFIER_ALT) + { + modifiers |= ECORE_IMF_KEYBOARD_MODIFIER_ALT; + } + if (pEvent->modifiers & ECORE_EVENT_MODIFIER_WIN) + { + modifiers |= ECORE_IMF_KEYBOARD_MODIFIER_WIN; + } + pKeyUp->modifiers = static_cast(modifiers); + + int locks = ECORE_IMF_KEYBOARD_LOCK_NONE; + if (pEvent->modifiers & ECORE_EVENT_LOCK_SCROLL) + { + locks |= ECORE_IMF_KEYBOARD_LOCK_SCROLL; + } + if (pEvent->modifiers & ECORE_EVENT_LOCK_NUM) + { + locks |= ECORE_IMF_KEYBOARD_LOCK_NUM; + } + if (pEvent->modifiers & ECORE_EVENT_LOCK_CAPS) + { + locks |= ECORE_IMF_KEYBOARD_LOCK_CAPS; + } + pKeyUp->locks = static_cast(locks); + + pKeyUp->key = pEvent->key; + pKeyUp->string = pEvent->string; + pKeyUp->compose = pEvent->compose; + pKeyUp->timestamp = pEvent->timestamp; + + const _Control* pControl = _ControlManager::GetInstance()->GetObject(__controlHandle); + + if (&source == pControl) + { + if(CheckUSBKeyboardStatus() && pKeyUp->string)//usb keyboard exist + { + const char* key = const_cast(pKeyUp->string); + if(FilterKeyOnUSBMode(GetInputPanelStyle(), key) == E_SUCCESS) + { + free(pKeyUp); + return false; + } + } + + if (ecore_imf_context_filter_event(__pContext, ECORE_IMF_EVENT_KEY_UP, (Ecore_IMF_Event*)pKeyUp) == EINA_TRUE) + { + free(pKeyUp); + + return false; + } + } + + free(pKeyUp); + + SetLastResult(E_SUCCESS); + + return false; +} + +void +_InputConnectionImpl::AddInputPanelCallback(void) +{ + ecore_imf_context_input_panel_event_callback_add(__pContext, ECORE_IMF_INPUT_PANEL_STATE_EVENT, OnInputPanelShowStateEvent, this); + ecore_imf_context_input_panel_event_callback_add(__pContext, ECORE_IMF_INPUT_PANEL_LANGUAGE_EVENT, OnInputPanelLanguageEvent, this); + ecore_imf_context_input_panel_event_callback_add(__pContext, ECORE_IMF_INPUT_PANEL_GEOMETRY_EVENT, OnInputPanelSizeChangedEvent, this); + ecore_imf_context_input_panel_event_callback_add(__pContext, ECORE_IMF_CANDIDATE_PANEL_STATE_EVENT, OnInputPanelPredictionModeEvent, this); + ecore_imf_context_input_panel_event_callback_add(__pContext, ECORE_IMF_CANDIDATE_PANEL_GEOMETRY_EVENT, OnInputPanelPredictionSizeChangedEvent, this); + ecore_imf_context_retrieve_surrounding_callback_set(__pContext, OnRetrieveSurrounding, this); + + return; +} + +void +_InputConnectionImpl::AddEcoreEventCallback(void) +{ + ecore_imf_context_event_callback_add(__pContext, ECORE_IMF_CALLBACK_COMMIT, OnCommitTextEcoreEvent, this); + ecore_imf_context_event_callback_add(__pContext, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, OnComposeTextEcoreEvent, this); + ecore_imf_context_event_callback_add(__pContext, ECORE_IMF_CALLBACK_DELETE_SURROUNDING, OnDeleteSurroundingTextEcoreEvent, this); + +/* + //Internal USB Check + Ecore_X_Window rootWindow = ecore_x_window_root_first_get(); + ecore_x_event_mask_set(rootWindow, ECORE_X_EVENT_MASK_WINDOW_PROPERTY); + __pUSBEventHandler = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_PROPERTY, OnUSBKeyboardEcoreEvent, this); + */ + return; +} + +void +_InputConnectionImpl::AddEvasObjectEventCallback(void) +{ + result r = _UiEventManager::GetInstance()->AddTargetPostKeyEventListener(*this); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + return; +} + +void +_InputConnectionImpl::RemoveInputPanelCallback(void) +{ + ecore_imf_context_input_panel_event_callback_del(__pContext, ECORE_IMF_INPUT_PANEL_STATE_EVENT, OnInputPanelShowStateEvent); + ecore_imf_context_input_panel_event_callback_del(__pContext, ECORE_IMF_INPUT_PANEL_LANGUAGE_EVENT, OnInputPanelLanguageEvent); + ecore_imf_context_input_panel_event_callback_del(__pContext, ECORE_IMF_INPUT_PANEL_GEOMETRY_EVENT, OnInputPanelSizeChangedEvent); + ecore_imf_context_input_panel_event_callback_del(__pContext, ECORE_IMF_CANDIDATE_PANEL_STATE_EVENT, OnInputPanelPredictionModeEvent); + ecore_imf_context_input_panel_event_callback_del(__pContext, ECORE_IMF_CANDIDATE_PANEL_GEOMETRY_EVENT, OnInputPanelPredictionSizeChangedEvent); + + return; +} + +void +_InputConnectionImpl::RemoveEcoreEventCallback(void) +{ + ecore_imf_context_event_callback_del(__pContext, ECORE_IMF_CALLBACK_COMMIT, OnCommitTextEcoreEvent); + ecore_imf_context_event_callback_del(__pContext, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, OnComposeTextEcoreEvent); + ecore_imf_context_event_callback_del(__pContext, ECORE_IMF_CALLBACK_DELETE_SURROUNDING, OnDeleteSurroundingTextEcoreEvent); + +/* + //Internal USB Check Release + if (__pUSBEventHandler) + { + ecore_event_handler_del(__pUSBEventHandler); + __pUSBEventHandler = null; + } + */ + return; +} + +void +_InputConnectionImpl::RemoveEvasObjectEventCallback(void) +{ + result r = _UiEventManager::GetInstance()->RemoveTargetPostKeyEventListener(*this); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + return; +} + +_InputConnectionImpl* +_InputConnectionImpl::GetInstance(InputConnection& inputConnection) +{ + return inputConnection.__pInputConnectionImpl; +} +const _InputConnectionImpl* +_InputConnectionImpl::GetInstance(const InputConnection& inputConnection) +{ + return inputConnection.__pInputConnectionImpl; +} + +int +_InputConnectionImpl::CheckUSBKeyboardStatus(void) +{ + return _InputConnectionUtils::CheckUSBKeyboardStatus(); +} + +result +_InputConnectionImpl::FilterKeyOnUSBMode(InputPanelStyle style, const char* key, bool commit) +{ + if(!(style == INPUT_PANEL_STYLE_NUMBER_ONLY || style == INPUT_PANEL_STYLE_PHONE_NUMBER || style == INPUT_PANEL_STYLE_IP)) + { + return E_INVALID_ARG; + } + + SysTryReturn(NID_UI, key, E_INVALID_ARG, E_INVALID_ARG, "key is null"); + + 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[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; + int keyCount = 0; + + if(style == INPUT_PANEL_STYLE_NUMBER_ONLY) + { + keyCount = 10; + memcpy(TempKey, keyOnNumOnlyStyle, keyCount*sizeof(char)); + } + else if(style == INPUT_PANEL_STYLE_PHONE_NUMBER) + { + keyCount = 13; + memcpy(TempKey, keyOnPhoneNumStyle, keyCount*sizeof(char)); + } + else if(style == INPUT_PANEL_STYLE_IP) + { + keyCount = 18; + memcpy(TempKey, keyOnIPStyle, keyCount*sizeof(char)); + } + + for (int i = 0; i < keyCount ; i++) + { + if(TempKey[i] == key[0]) + { + isExist = true; + break; + } + } + + if (isExist == true && commit == true) + { + String commitText(key); + if (commitText.GetLength() > 1) + { + return E_SUCCESS; + } + InputConnection* pInputConnection = GetInputConnection(); + IInputConnectionEventListener* pListener = GetInputConnectionListener(); + IInputConnectionEventListenerF* pListenerF = GetInputConnectionListenerF(); + if (pListener) + { + pListener->OnInputConnectionTextCommitted( *pInputConnection, commitText); + } + if (pListenerF) + { + pListenerF->OnInputConnectionTextCommitted( *pInputConnection, commitText); + } + } + + return E_SUCCESS; +} + +void +_InputConnectionImpl::SetKeyEventSkipped(bool enabled) +{ + __IsKeyEventSkipped = enabled; +} + +}} // Tizen::Ui diff --git a/src/ui/FUi_InputConnectionImpl.h b/src/ui/FUi_InputConnectionImpl.h new file mode 100644 index 0000000..31b9fbb --- /dev/null +++ b/src/ui/FUi_InputConnectionImpl.h @@ -0,0 +1,138 @@ +// +// 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_InputConnectionImpl.h +* @brief This is the implementation file for the _InputConnectionImpl class. +*/ + +#ifndef _FUI_INTERNAL_INPUT_CONNECTION_IMPL_H_ +#define _FUI_INTERNAL_INPUT_CONNECTION_IMPL_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "FUi_Control.h" + +namespace Tizen { namespace Ui { + +class InputConnection; + +/** +* @class _InputConnectionImpl +* @brief This class is a based input method implements the behavior +* @since 2.0 +* +*/ +class _InputConnectionImpl + : public Tizen::Base::Object + , public _IKeyEventListener +{ +public: + virtual ~_InputConnectionImpl(void); + static _InputConnectionImpl* CreateInputConnectionImplN(InputConnection* pInputConnection); + + result Initialize(const Tizen::Ui::_Control& control, const IInputConnectionEventListener& listener, const IInputConnectionProvider& provider); + result Initialize(const Tizen::Ui::_Control& control, const IInputConnectionEventListenerF& listener, const IInputConnectionProvider& provider); + result BindInputMethod(void); + result UnbindInputMethod(void); + result ShowInputPanel(void); + result HideInputPanel(void); + result SetInputPanelStyle(InputPanelStyle style); + InputPanelStyle GetInputPanelStyle(void) const; + result SetAutoCapitalizationMode(AutoCapitalizationMode autoCapitalizationMode); + AutoCapitalizationMode GetAutoCapitalizationMode(void) const; + InputPanelShowState GetInputPanelShowState(void) const; + result SetInputPanelShowState(InputPanelShowState showState); + result FinishTextComposition(void); + result SetInputPanelAction(InputPanelAction inputPanelAction); + InputPanelAction GetInputPanelAction(void) const; + result SetInputPanelActionEnabled(bool enabled); + bool IsInputPanelActionEnabled(void) const; + result SetCursorPosition(int position); + result SetCursorBounds(const Tizen::Graphics::Rectangle& rect); + result SetCursorBounds(const Tizen::Graphics::FloatRectangle& rect); + Tizen::Graphics::Rectangle GetInputPanelBounds(void) const; + Tizen::Graphics::FloatRectangle GetInputPanelBoundsF(void) const; + Tizen::Graphics::Rectangle GetPredictionBounds(void) const; + Tizen::Graphics::FloatRectangle GetPredictionBoundsF(void) const; + result SetTextPredictionEnabled(bool enable); + bool IsTextPredictionEnabled(void) const; + result SetCapsLockEnabled(bool enable); + bool IsCapsLockEnabled(void) const; + result SetPasswordMode(bool enable); + bool IsPasswordMode(void) const; + + result SetInputPanelLanguage(Tizen::Locales::LanguageCode languageCode); + Tizen::Locales::LanguageCode GetInputPanelLanguage(void) const; + InputConnection* GetInputConnection(void) const; + IInputConnectionEventListener* GetInputConnectionListener(void) const; + IInputConnectionEventListenerF* GetInputConnectionListenerF(void) const; + IInputConnectionProvider* GetInputConnectionProvider(void) const; + bool CheckContextEvent(Ecore_IMF_Event_Type type, void* pEventInfo); + int CheckUSBKeyboardStatus(void); + void SendOpaqueCommand (const Tizen::Base::String& command); + + static _InputConnectionImpl* GetInstance(InputConnection& inputConnection); + static const _InputConnectionImpl* GetInstance(const InputConnection& inputConnection); + + virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo); + virtual bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo); + +//Internal + void SetKeyEventSkipped(bool enabled); + +private: + _InputConnectionImpl(InputConnection* pInputConnection); + _InputConnectionImpl(const _InputConnectionImpl& rhs); + _InputConnectionImpl& operator=(const _InputConnectionImpl& rhs); + + void AddInputPanelCallback(void); + void AddEcoreEventCallback(void); + void AddEvasObjectEventCallback(void); + void RemoveInputPanelCallback(void); + void RemoveEcoreEventCallback(void); + void RemoveEvasObjectEventCallback(void); + + result FilterKeyOnUSBMode(InputPanelStyle style, const char* key, bool commit = false); + +private: + Ecore_IMF_Context* __pContext; + _ControlHandle __controlHandle; + bool __IsBounded; + IInputConnectionEventListener* __pListener; + IInputConnectionEventListenerF* __pListenerF; + IInputConnectionProvider* __pProvider; + InputConnection* __pInputConnection; + InputPanelAction __inputPanelAction; + InputPanelShowState __inputPanelState; + InputPanelStyle __inputPanelStyle; + Ecore_Event_Handler* __pUSBEventHandler; + bool __IsKeyEventSkipped; + bool __passwordMode; + +}; // _InputConnectionImpl + +}} // Tizen::Ui + +#endif // _FUI_INTERNAL_INPUT_CONNECTION_IMPL_H_ + + 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 new file mode 100644 index 0000000..8befcb2 --- /dev/null +++ b/src/ui/FUi_KeyEventInfoImpl.cpp @@ -0,0 +1,88 @@ +// +// 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_KeyEventInfoImpl.cpp +* @brief This is the implementation for the _KeyEventInfoImpl class. +* @version 2.0 +*/ + +#include +#include +#include +#include +#include "FUi_KeyEventInfoImpl.h" +#include "FUi_UiKeyEvent.h" + +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui +{ + +_KeyEventInfoImpl* +_KeyEventInfoImpl::CreateInstanceN(KeyEventInfo* pPublic) +{ + ClearLastResult(); + + _KeyEventInfoImpl* pImpl = new (std::nothrow) _KeyEventInfoImpl(pPublic); + SysTryReturn(NID_UI, pImpl, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + return pImpl; +} + +_KeyEventInfoImpl::_KeyEventInfoImpl(KeyEventInfo* pPublic) + : __pPublic(pPublic) + , __keyCode(KEY_INVALID) + , __keyModifier(KEY_MODIFIER_NONE) +{ +} + +_KeyEventInfoImpl::~_KeyEventInfoImpl(void) +{ +} + +void +_KeyEventInfoImpl::SetKeyEventInfo(KeyCode keyCode, int keyModifiers) +{ + __keyCode = keyCode; + __keyModifier = keyModifiers; +} + +void +_KeyEventInfoImpl::SetKeyCode(KeyCode keyCode) +{ + __keyCode = keyCode; +} + +KeyCode +_KeyEventInfoImpl::GetKeyCode(void) const +{ + return __keyCode; +} + +void +_KeyEventInfoImpl::SetKeyModifier(int keyModifiers) +{ + __keyModifier = keyModifiers; +} + +int +_KeyEventInfoImpl::GetKeyModifier(void) const +{ + return __keyModifier; +} + +} } // Tizen::Ui diff --git a/src/ui/FUi_KeyEventManager.cpp b/src/ui/FUi_KeyEventManager.cpp new file mode 100644 index 0000000..f1cb730 --- /dev/null +++ b/src/ui/FUi_KeyEventManager.cpp @@ -0,0 +1,267 @@ +// +// 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_KeyEventManager.cpp +* @brief This is the implementation file for _KeyEventManager class. +* @version 2.0 +* @see Tizen::Ui::_KeyEventManager +* +*/ + +// includes +#include +#include +#include +#include +#include +#include +#include "FUi_KeyEventManager.h" +#include "FUi_KeyEventManagerImpl.h" +#include "FUi_Control.h" +#include "FUi_ControlImpl.h" +#include "FUi_ControlManager.h" +#include "FUi_IKeyEventListener.h" +#include "FUi_UiEventManager.h" +#include "FUi_UiKeyEvent.h" + +// using namespaces +using namespace Tizen::Ui; +using namespace Tizen::Base::Collection; + +namespace +{ +class _KeyEventListener + : public _IKeyEventListener + , virtual public _IUiEventListener + , virtual public Tizen::Base::Runtime::IEventListener +{ +public: + _KeyEventListener(void) + { + } + + virtual ~_KeyEventListener(void) + { + } + + virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) + { + _KeyEventManager* pKeyManager = _KeyEventManager::GetInstance(); + SysTryReturn(NID_UI, pKeyManager, false, E_SYSTEM, "[E_SYSTEM] System error occurred. "); + + LinkedListT* pList = pKeyManager->GetKeyEventListener(); + + bool isFiltered = false; + + if (pList) + { + IEnumeratorT<_IKeyEventListener*>* pEnumerator = pList->GetEnumeratorN(); + + if (pEnumerator) + { + while (pEnumerator->MoveNext() == E_SUCCESS) + { + _IKeyEventListener* pKeyEventListener = null; + pEnumerator->GetCurrent(pKeyEventListener); + + if (pKeyEventListener != null) + { + isFiltered = pKeyEventListener->OnKeyPressed(source, keyInfo); + } + + //only call first key listener + if (keyInfo.GetKeyCode() == _KEY_END) + { + break; + } + } + + delete pEnumerator; + } + } + + return isFiltered; + } + + virtual bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) + { + _KeyEventManager* pKeyManager = _KeyEventManager::GetInstance(); + SysTryReturn(NID_UI, pKeyManager, false, E_SYSTEM, "[E_SYSTEM] System error occurred. "); + + LinkedListT* pList = pKeyManager->GetKeyEventListener(); + bool isFiltered = false; + + if (pList) + { + IEnumeratorT<_IKeyEventListener*>* pEnumerator = pList->GetEnumeratorN(); + + if (pEnumerator) + { + while (pEnumerator->MoveNext() == E_SUCCESS) + { + _IKeyEventListener* pKeyEventListener = null; + pEnumerator->GetCurrent(pKeyEventListener); + + if (pKeyEventListener != null) + { + isFiltered = pKeyEventListener->OnKeyReleased(source, keyInfo); + } + + //only call first key listener + if (keyInfo.GetKeyCode() == _KEY_END) + { + break; + } + } + + delete pEnumerator; + } + } + + return isFiltered; + } +}; +} + + +namespace Tizen { namespace Ui +{ + +_KeyEventManager* _KeyEventManager::__pInstance = null; + +_KeyEventManager::_KeyEventManager(void) + : __pKeyEventListeners(null) + , __pKeyEventListener(null) + , __pKeyCapturingMap(null) +{ + _UiEventManager* pEventManager = _UiEventManager::GetInstance(); + SysTryReturnVoidResult(NID_UI, pEventManager, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + __pKeyEventListener = new (std::nothrow)_KeyEventListener; + 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, "[%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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + pEventManager->AddKeyEventListener(*__pKeyEventListener); + + return; + +CATCH: + if (__pKeyEventListener) + { + delete __pKeyEventListener; + __pKeyEventListener = null; + } + + if (__pKeyCapturingMap) + { + delete __pKeyCapturingMap; + __pKeyCapturingMap = null; + } +} + +_KeyEventManager::~_KeyEventManager(void) +{ + if (__pKeyEventListeners) + { + delete __pKeyEventListeners; + __pKeyEventListeners = null; + } + + if (__pKeyEventListener) + { + _UiEventManager* pEventManager = _UiEventManager::GetInstance(); + if (pEventManager) + { + pEventManager->RemoveKeyEventListener(*__pKeyEventListener); + } + + delete __pKeyEventListener; + __pKeyEventListener = null; + } + + if (__pKeyCapturingMap) + { + delete __pKeyCapturingMap; + __pKeyCapturingMap = null; + } +} + +void +_KeyEventManager::Initialize(void) +{ + static pthread_once_t once_block = PTHREAD_ONCE_INIT; + + if (__pInstance == null) + { + pthread_once(&once_block, InitializeInstance); + } +} + +_KeyEventManager* +_KeyEventManager::GetInstance(void) +{ + return __pInstance; +} + +void +_KeyEventManager::InitializeInstance(void) +{ + ClearLastResult(); + + if (__pInstance == null) + { + __pInstance = new (std::nothrow) _KeyEventManager; + SysTryReturnVoidResult(NID_UI, __pInstance != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + } +} + +void +_KeyEventManager::ReleaseInstance(void) +{ + if (__pInstance) + { + delete __pInstance; + __pInstance = null; + } +} + +void +_KeyEventManager::AddKeyEventListener(const _IKeyEventListener& listener) +{ + __pKeyEventListeners->Add(const_cast<_IKeyEventListener*>(&listener)); +} + + +void +_KeyEventManager::RemoveKeyEventListener(const _IKeyEventListener& listener) +{ + __pKeyEventListeners->Remove(const_cast<_IKeyEventListener*>(&listener)); +} + +LinkedListT* +_KeyEventManager::GetKeyEventListener(void) const +{ + return __pKeyEventListeners; +} + +} } //Tizen::Ui diff --git a/src/ui/FUi_KeyEventManagerImpl.cpp b/src/ui/FUi_KeyEventManagerImpl.cpp new file mode 100644 index 0000000..410356f --- /dev/null +++ b/src/ui/FUi_KeyEventManagerImpl.cpp @@ -0,0 +1,209 @@ +// +// 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_KeyEventManagerImpl.cpp +* @brief This is the implementation file for _KeyEventManagerImpl class. +* @version 2.0 +* @see Tizen::Ui::_KeyEventManagerImpl +* +*/ + +// includes +#include +#include +#include +#include +#include +#include +#include "FUi_KeyEventManagerImpl.h" +#include "FUi_ControlImpl.h" +#include "FUi_Control.h" +#include "FUi_KeyEventManager.h" + +// using namespaces +using namespace Tizen::Ui; + +namespace Tizen { namespace Ui +{ + +//////////////////////////////////////////////////////////////////////////////// +/// _KeyEventManagerImpl class Lifecycle + +class _KeyEventManagerImpl::PublicEventListener + : public _IKeyEventListener + , virtual public _IUiEventListener + , virtual public Tizen::Base::Runtime::IEventListener +{ +public: + PublicEventListener(_KeyEventManagerImpl& mgrImpl) + : __keyMgrImpl(mgrImpl) + { + } + + virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) + { + 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. "); + + if (pEnum) + { + while (pEnum->MoveNext() == E_SUCCESS) + { + IKeyEventListener* pKeyEventListener = null; + pEnum->GetCurrent(pKeyEventListener); + + if (pKeyEventListener != null) + { + pKeyEventListener->OnKeyPressed(pImpl->GetPublic(), static_cast(keyInfo.GetKeyCode())); + } + } + } + + delete pEnum; + return false; + +CATCH: + delete pEnum; + return false; + }; + + virtual bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) + { + 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. "); + + if (pEnum) + { + while (pEnum->MoveNext() == E_SUCCESS) + { + IKeyEventListener* pKeyEventListener = null; + pEnum->GetCurrent(pKeyEventListener); + + if (pKeyEventListener != null) + { + pKeyEventListener->OnKeyReleased(pImpl->GetPublic(), static_cast(keyInfo.GetKeyCode())); + } + } + } + + delete pEnum; + return false; + +CATCH: + delete pEnum; + return false; + }; + +private: + PublicEventListener(const PublicEventListener&); + PublicEventListener& operator =(const PublicEventListener&); + +private: + _KeyEventManagerImpl& __keyMgrImpl; +}; + + +_KeyEventManagerImpl* _KeyEventManagerImpl::__pInstance = null; + +_KeyEventManagerImpl::_KeyEventManagerImpl(void) +{ + __pPublicKeyEventListeners = new (std::nothrow) Tizen::Base::Collection::LinkedListT ; + 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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + _KeyEventManager* pKeyMgr = _KeyEventManager::GetInstance(); + if (pKeyMgr != null) + { + pKeyMgr->AddKeyEventListener(*__pKeyEventListeners); + } +} + +_KeyEventManagerImpl::~_KeyEventManagerImpl(void) +{ + if (__pPublicKeyEventListeners) + { + delete __pPublicKeyEventListeners; + __pPublicKeyEventListeners = null; + } + + if (__pKeyEventListeners) + { + delete __pKeyEventListeners; + __pKeyEventListeners = null; + } +} + +void +_KeyEventManagerImpl::Initialize(void) +{ + static pthread_once_t once_block = PTHREAD_ONCE_INIT; + + if (__pInstance == null) + { + pthread_once(&once_block, InitializeInstance); + } +} + +_KeyEventManagerImpl* +_KeyEventManagerImpl::GetInstance(void) +{ + return __pInstance; +} + +void +_KeyEventManagerImpl::InitializeInstance(void) +{ + ClearLastResult(); + + if (__pInstance == null) + { + __pInstance = new (std::nothrow) _KeyEventManagerImpl; + SysTryReturnVoidResult(NID_UI, __pInstance != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + } +} + +void +_KeyEventManagerImpl::ReleaseInstance(void) +{ + if (__pInstance) + { + delete __pInstance; + __pInstance = null; + } +} + +//////////////////////////////////////////////////////////////////////////////// +/// KeyEventManager class Operation + +void +_KeyEventManagerImpl::AddKeyEventListener(IKeyEventListener& listener) +{ + __pPublicKeyEventListeners->Add(&listener); +} + + +void +_KeyEventManagerImpl::RemoveKeyEventListener(IKeyEventListener& listener) +{ + __pPublicKeyEventListeners->Remove(&listener); +} + +} } //Tizen::Ui diff --git a/src/ui/FUi_LayoutImpl.cpp b/src/ui/FUi_LayoutImpl.cpp new file mode 100644 index 0000000..6ce5050 --- /dev/null +++ b/src/ui/FUi_LayoutImpl.cpp @@ -0,0 +1,580 @@ +// +// 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_LayoutImpl.cpp + * @brief This is the implementation file for _Layout class. + * + * This file contains the implementation of _Layout class. + */ + +#include +#include +#include +#include +#include +#include +#include "FUi_LayoutImpl.h" + +using namespace Tizen::Base; + +namespace Tizen { namespace Ui +{ + +namespace +{ +static const int CONVERT_ERROR_CODE = -1; + +_Layout::HorizontalAlign +ConvertEnum(const LayoutHorizontalAlignment val) +{ + switch (val) + { + case LAYOUT_HORIZONTAL_ALIGN_LEFT: + return _Layout::ITEM_HORIZONTAL_ALIGN_LEFT; + + case LAYOUT_HORIZONTAL_ALIGN_RIGHT: + return _Layout::ITEM_HORIZONTAL_ALIGN_RIGHT; + + case LAYOUT_HORIZONTAL_ALIGN_CENTER: + return _Layout::ITEM_HORIZONTAL_ALIGN_CENTER; + + default: + return static_cast <_Layout::HorizontalAlign>(CONVERT_ERROR_CODE); + } +} + +LayoutHorizontalAlignment +ConvertEnum(const _Layout::HorizontalAlign val) +{ + switch (val) + { + case _Layout::ITEM_HORIZONTAL_ALIGN_LEFT: + return LAYOUT_HORIZONTAL_ALIGN_LEFT; + + case _Layout::ITEM_HORIZONTAL_ALIGN_RIGHT: + return LAYOUT_HORIZONTAL_ALIGN_RIGHT; + + case _Layout::ITEM_HORIZONTAL_ALIGN_CENTER: + return LAYOUT_HORIZONTAL_ALIGN_CENTER; + + default: + return static_cast (CONVERT_ERROR_CODE); + } +} + +_Layout::VerticalAlign +ConvertEnum(const LayoutVerticalAlignment val) +{ + switch (val) + { + case LAYOUT_VERTICAL_ALIGN_TOP: + return _Layout::ITEM_VERTICAL_ALIGN_TOP; + + case LAYOUT_VERTICAL_ALIGN_BOTTOM: + return _Layout::ITEM_VERTICAL_ALIGN_BOTTOM; + + case LAYOUT_VERTICAL_ALIGN_MIDDLE: + return _Layout::ITEM_VERTICAL_ALIGN_MIDDLE; + + default: + return static_cast <_Layout::VerticalAlign>(CONVERT_ERROR_CODE); + } +} + +LayoutVerticalAlignment +ConvertEnum(const _Layout::VerticalAlign val) +{ + switch (val) + { + case _Layout::ITEM_VERTICAL_ALIGN_TOP: + return LAYOUT_VERTICAL_ALIGN_TOP; + + case _Layout::ITEM_VERTICAL_ALIGN_BOTTOM: + return LAYOUT_VERTICAL_ALIGN_BOTTOM; + + case _Layout::ITEM_VERTICAL_ALIGN_MIDDLE: + return LAYOUT_VERTICAL_ALIGN_MIDDLE; + + default: + return static_cast (CONVERT_ERROR_CODE); + } +} + +_Layout::LayoutMatchMode +ConvertEnum(FitPolicy val) +{ + switch (val) + { + case FIT_POLICY_FIXED: + return _Layout::NONE_MODE; + + case FIT_POLICY_CONTENT: + return _Layout::WRAP_CONTENT; + + case FIT_POLICY_PARENT: + return _Layout::MATCH_PARENT; + + default: + return static_cast <_Layout::LayoutMatchMode>(CONVERT_ERROR_CODE); + } +} + +FitPolicy +ConvertEnum(_Layout::LayoutMatchMode val) +{ + switch (val) + { + case _Layout::NONE_MODE: + return FIT_POLICY_FIXED; + + case _Layout::WRAP_CONTENT: + return FIT_POLICY_CONTENT; + + case _Layout::MATCH_PARENT: + return FIT_POLICY_PARENT; + + default: + return static_cast (CONVERT_ERROR_CODE); + } +} +} + +// _LayoutImpl implementation +_LayoutImpl::_LayoutImpl(Layout* pPublicLayout, _Layout::Layout* pCoreLayout) + : _pPublicLayout(pPublicLayout) + , _pCoreLayout(pCoreLayout) +{ +} + +_LayoutImpl::~_LayoutImpl() +{ + delete _pCoreLayout; +} + +result +_LayoutImpl::CheckConstruction(_Layout::Layout* pCoreLayout, _LayoutImpl* pImplLayout) +{ + if (pImplLayout == null) + { + delete pCoreLayout; + SysLogException(NID_UI, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + return E_OUT_OF_MEMORY; + } + + result r = GetLastResult(); + + if (IsFailed(r)) + { + delete pImplLayout; + pImplLayout = null; + + SysLogException(NID_UI, r, "[%s] Propagating.", GetErrorMessage(r)); + return r; + } + + return E_SUCCESS; +} + +_SharedPtr <_LayoutImpl> +_LayoutImpl::GetLayoutImpl(Layout* pPublicLayout) +{ + LayoutImplHolder* pHolder = static_cast (pPublicLayout->_pImpl); + SysAssert(pHolder != null); + + return pHolder->layoutImpl; +} + +void +_LayoutImpl::SetLayoutImpl(Layout* pPublicLayout, _LayoutImpl* pImplLayout) +{ + LayoutImplHolder* pHolder = static_cast (pPublicLayout->_pImpl); + SysAssert(pHolder != null); + + pHolder->layoutImpl.SetNull(); + pHolder->layoutImpl.Bind(pImplLayout); +} + +const char* +_LayoutImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Layout"; +} + +const Layout& +_LayoutImpl::GetPublic(void) const +{ + return *_pPublicLayout; +} + +Layout& +_LayoutImpl::GetPublic(void) +{ + return *_pPublicLayout; +} + +const _Layout::Layout& +_LayoutImpl::GetCore(void) const +{ + return *_pCoreLayout; +} + +_Layout::Layout& +_LayoutImpl::GetCore(void) +{ + return *_pCoreLayout; +} + +const _LayoutImpl* +_LayoutImpl::GetInstance(const Layout& layout) +{ + LayoutImplHolder* pHolder = static_cast (layout._pImpl); + SysAssert(pHolder != null); + + const _LayoutImpl* pImpl = pHolder->layoutImpl.Get(); + + return pImpl; +} + +_LayoutImpl* +_LayoutImpl::GetInstance(Layout& layout) +{ + LayoutImplHolder* pHolder = static_cast (layout._pImpl); + SysAssert(pHolder != null); + + _LayoutImpl* pImpl = pHolder->layoutImpl.Get(); + + return pImpl; +} + +result +_LayoutImpl::SetAlignment(const _ControlImpl& item, const LayoutHorizontalAlignment horizontalAlign, const LayoutVerticalAlignment verticalAlign) +{ + ClearLastResult(); + + _Layout::LayoutItem& layoutItem = item.GetLayoutContainer(); + + _Layout::ItemAlign itemAlign; + itemAlign.HAlign = ConvertEnum(horizontalAlign); + SysTryReturn(NID_UI, itemAlign.HAlign != (_Layout::HorizontalAlign) CONVERT_ERROR_CODE, + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The given parameter is invalid."); + + itemAlign.VAlign = ConvertEnum(verticalAlign); + SysTryReturn(NID_UI, itemAlign.VAlign != (_Layout::VerticalAlign) CONVERT_ERROR_CODE, + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The given parameter is invalid."); + + return _pCoreLayout->SetItemAlignment(layoutItem, itemAlign); +} + +result +_LayoutImpl::GetAlignment(const _ControlImpl& item, LayoutHorizontalAlignment& horizontalAlign, LayoutVerticalAlignment& verticalAlign) const +{ + _Layout::LayoutItem& layoutItem = item.GetLayoutContainer(); + + _Layout::ItemAlign itemAlign; + + result r = _pCoreLayout->GetItemAlignment(layoutItem, itemAlign); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + horizontalAlign = ConvertEnum(itemAlign.HAlign); + verticalAlign = ConvertEnum(itemAlign.VAlign); + + return E_SUCCESS; +} + +result +_LayoutImpl::SetMargin(const _ControlImpl& item, int left, int right, int top, int bottom) +{ + SysTryReturn(NID_UI, left >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The left margin is negative."); + SysTryReturn(NID_UI, right >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The right margin is negative."); + SysTryReturn(NID_UI, top >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The top margin is negative."); + SysTryReturn(NID_UI, bottom >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The bottom margin is negative."); + + _Layout::LayoutItem& layoutItem = item.GetLayoutContainer(); + + _Layout::ItemMargin itemMargin; + + itemMargin.left = left; + itemMargin.right = right; + itemMargin.top = top; + itemMargin.bottom = bottom; + + result r = _pCoreLayout->SetItemMargin(layoutItem, itemMargin); + + return r; +} + +result +_LayoutImpl::SetMargin(const _ControlImpl& item, float left, float right, float top, float bottom) +{ + SysTryReturn(NID_UI, left >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The left margin is negative."); + SysTryReturn(NID_UI, right >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The right margin is negative."); + SysTryReturn(NID_UI, top >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The top margin is negative."); + SysTryReturn(NID_UI, bottom >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The bottom margin is negative."); + + _Layout::LayoutItem& layoutItem = item.GetLayoutContainer(); + + _Layout::ItemMargin itemMargin; + + itemMargin.left = static_cast (left); + itemMargin.right = static_cast (right); + itemMargin.top = static_cast (top); + itemMargin.bottom = static_cast (bottom); + + result r = _pCoreLayout->SetItemMargin(layoutItem, itemMargin); + + return r; +} + +result +_LayoutImpl::GetMargin(const _ControlImpl& item, int& left, int& right, int& top, int& bottom) const +{ + _Layout::LayoutItem& layoutItem = item.GetLayoutContainer(); + + _Layout::ItemMargin itemMargin; + + result r = _pCoreLayout->GetItemMargin(layoutItem, itemMargin); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + left = itemMargin.left; + right = itemMargin.right; + top = itemMargin.top; + bottom = itemMargin.bottom; + + return r; +} + +result +_LayoutImpl::GetMargin(const _ControlImpl& item, float& left, float& right, float& top, float& bottom) const +{ + _Layout::LayoutItem& layoutItem = item.GetLayoutContainer(); + + _Layout::ItemMargin itemMargin; + + result r = _pCoreLayout->GetItemMargin(layoutItem, itemMargin); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + left = static_cast (itemMargin.left); + right = static_cast (itemMargin.right); + top = static_cast (itemMargin.top); + bottom = static_cast (itemMargin.bottom); + + return r; +} + +result +_LayoutImpl::SetHorizontalFitPolicy(const _ControlImpl& item, const FitPolicy policy) +{ + _Layout::LayoutItem& layoutItem = item.GetLayoutContainer(); + + _Layout::LayoutMatchMode matchMode; + + matchMode = ConvertEnum(policy); + + SysTryReturn(NID_UI, matchMode != (_Layout::LayoutMatchMode) CONVERT_ERROR_CODE, + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The given parameter is invalid."); + + result r = _pCoreLayout->SetItemWidthMatchMode(layoutItem, matchMode); + + return r; +} + +result +_LayoutImpl::GetHorizontalFitPolicy(const _ControlImpl& item, FitPolicy& policy) const +{ + _Layout::LayoutItem& layoutItem = item.GetLayoutContainer(); + + _Layout::LayoutMatchMode matchMode; + + result r = _pCoreLayout->GetItemWidthMatchMode(layoutItem, matchMode); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + policy = ConvertEnum(matchMode); + + return r; +} + +result +_LayoutImpl::SetVerticalFitPolicy(const _ControlImpl& item, const FitPolicy matchMode) +{ + _Layout::LayoutItem& layoutItem = item.GetLayoutContainer(); + + _Layout::LayoutMatchMode layoutMatchMode; + + layoutMatchMode = ConvertEnum(matchMode); + + SysTryReturn(NID_UI, layoutMatchMode != (_Layout::LayoutMatchMode) CONVERT_ERROR_CODE, + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The given parameter is invalid."); + + result r = _pCoreLayout->SetItemHeightMatchMode(layoutItem, layoutMatchMode); + + return r; +} + +result +_LayoutImpl::GetVerticalFitPolicy(const _ControlImpl& item, FitPolicy& policy) const +{ + _Layout::LayoutItem& layoutItem = item.GetLayoutContainer(); + + _Layout::LayoutMatchMode matchMode; + + result r = _pCoreLayout->GetItemHeightMatchMode(layoutItem, matchMode); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + policy = ConvertEnum(matchMode); + + return r; +} + +result +_LayoutImpl::UpdateLayout(void) +{ + result r = _pCoreLayout->UpdateLayout(); + + return r; +} + +result +_LayoutImpl::AddItem(_ControlImpl& addItem) +{ + _Layout::LayoutItem& layoutItem = addItem.GetLayoutContainer(); + + result r = _pCoreLayout->AddItem(layoutItem); + + return r; +} + +result +_LayoutImpl::RemoveItem(const _ControlImpl& removeItem) +{ + _Layout::LayoutItem& layoutItem = removeItem.GetLayoutContainer(); + + result r = _pCoreLayout->RemoveItem(layoutItem); + + return r; +} + +result +_LayoutImpl::OnChangeViewPos(int viewPosX, int viewPosY) +{ + result r = _pCoreLayout->OnChangeViewPosition(viewPosX, viewPosY); + + return r; +} + +result +_LayoutImpl::SetItemBaseRect(const _ControlImpl& item, const _Layout::LayoutRect baseRect) +{ + SysTryReturn(NID_UI, baseRect.x >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] X position is negative."); + SysTryReturn(NID_UI, baseRect.y >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Y position is negative."); + SysTryReturn(NID_UI, baseRect.w >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Width is negative."); + SysTryReturn(NID_UI, baseRect.h >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Height is negative."); + + _Layout::LayoutItem& layoutItem = item.GetLayoutContainer(); + + result r = _pCoreLayout->SetItemBaseRect(layoutItem, baseRect); + + return r; +} + +result +_LayoutImpl::GetItemBaseRect(const _ControlImpl& item, _Layout::LayoutRect& baseRect) const +{ + _Layout::LayoutItem& layoutItem = item.GetLayoutContainer(); + + result r = _pCoreLayout->GetItemBaseRect(layoutItem, baseRect); + + return r; +} + +void +_LayoutImpl::AllocateLayoutImpl(Layout* pPublicLayout, _SharedPtr layoutImpl) +{ + LayoutImplHolder* pHolder = static_cast (pPublicLayout->_pImpl); + SysAssert(pHolder != null); + + pHolder->layoutImpl = layoutImpl; +} + +Layout* +_LayoutImpl::CreatePublicLayoutN(_SharedPtr layoutImpl) +{ + _LayoutImpl* pLayoutImpl = layoutImpl.Get(); + if (pLayoutImpl == null) + { + return null; + } + + switch (pLayoutImpl->GetLayoutType()) + { + case LAYOUT_RELATIVE: + { + RelativeLayout* pPublicLayout = new (std::nothrow) RelativeLayout; + SysTryReturn(NID_UI, pPublicLayout != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + _LayoutImpl::AllocateLayoutImpl(pPublicLayout, layoutImpl); + + return pPublicLayout; + } + + case LAYOUT_VERTICAL_BOX: + { + VerticalBoxLayout* pPublicLayout = new (std::nothrow) VerticalBoxLayout; + SysTryReturn(NID_UI, pPublicLayout != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + _LayoutImpl::AllocateLayoutImpl(pPublicLayout, layoutImpl); + + return pPublicLayout; + } + + case LAYOUT_HORIZONTAL_BOX: + { + HorizontalBoxLayout* pPublicLayout = new (std::nothrow) HorizontalBoxLayout; + SysTryReturn(NID_UI, pPublicLayout != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + _LayoutImpl::AllocateLayoutImpl(pPublicLayout, layoutImpl); + + return pPublicLayout; + } + + case LAYOUT_GRID: + { + GridLayout* pPublicLayout = new (std::nothrow) GridLayout; + SysTryReturn(NID_UI, pPublicLayout != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + _LayoutImpl::AllocateLayoutImpl(pPublicLayout, layoutImpl); + + return pPublicLayout; + } + + case LAYOUT_CARD: + { + CardLayout* pPublicLayout = new (std::nothrow) CardLayout; + SysTryReturn(NID_UI, pPublicLayout != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + _LayoutImpl::AllocateLayoutImpl(pPublicLayout, layoutImpl); + + return pPublicLayout; + } + + default: + SysAssert(false); + return null; + } + return null; +} + +}} // Tizen::Ui diff --git a/src/ui/FUi_LayoutImpl.h b/src/ui/FUi_LayoutImpl.h new file mode 100644 index 0000000..7224e3b --- /dev/null +++ b/src/ui/FUi_LayoutImpl.h @@ -0,0 +1,333 @@ +// +// 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_LayoutImpl.h + * @brief This is the header file for _LayoutImpl class. + * + * This header file contains the declaration of _LayoutImpl class. + */ + +#ifndef _FUI_LAYOUT_IMPL_H_ +#define _FUI_LAYOUT_IMPL_H_ + +#include +#include +#include "FUi_ControlImpl.h" +#include "FUi_LayoutLayout.h" +#include "FUi_SharedPtr.h" + +namespace Tizen { namespace Ui +{ + +class Layout; + +class _LayoutImpl + : public Tizen::Base::Object +{ +public: + /** + * This is the default constructor for this class. + * + * @since 2.0 + */ + _LayoutImpl(const _LayoutImpl&); + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~_LayoutImpl(void); + + /** + * Gets the name of public class. + * + * @since 2.0 + * @return The name of public class. + */ + virtual const char* GetPublicClassName(void) const; + + /** + * Gets the public class. + * + * @since 2.0 + * @return The public class. + */ + virtual const Layout& GetPublic(void) const; + + /** + * Gets the public class. + * + * @since 2.0 + * @return The public class. + */ + virtual Layout& GetPublic(void); + + /** + * Gets the core class. + * + * @since 2.0 + * @return The core class. + */ + virtual const _Layout::Layout& GetCore(void) const; + + /** + * Gets the core class. + * + * @since 2.0 + * @return The core class. + */ + virtual _Layout::Layout& GetCore(void); + + /** + * Gets the _LayoutImpl instance for the Layout. + * + * @since 2.0 + * @return The _LayoutImpl instance. + * @param[in] pLayout The Layout instance. + */ + static const _LayoutImpl* GetInstance(const Layout& layout); + + /** + * Gets the _LayoutImpl instance for the Layout. + * + * @since 2.0 + * @return The _LayoutImpl instance. + * @param[in] pLayout The Layout instance. + */ + static _LayoutImpl* GetInstance(Layout& layout); + + /** + * Gets the type of the layout. + * + * @since 2.0 + * @return The layout type + */ + virtual LayoutType GetLayoutType(void) const = 0; + + /** + * + * + * @return An error code + * @exception + * @since 2.0 + */ + result UpdateLayout(void); + + static _SharedPtr <_LayoutImpl> GetLayoutImpl(Layout* pLayout); + static Layout* CreatePublicLayoutN(_SharedPtr <_LayoutImpl> layoutImpl); + static void SetLayoutImpl(Layout* pPublicLayout, _LayoutImpl* pImplLayout); + +protected: + _LayoutImpl(Layout* pPublicLayout, _Layout::Layout* _pCoreLayout); + static result CheckConstruction(_Layout::Layout* pCoreLayout, _LayoutImpl* pImplLayout); + + /** + * Sets the alignment of the specified item. + * + * @return An error code + * @param[in] item The item for which the alignment is set + * @param[in] align The alignment + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @exception E_INVALID_ARG The alignment parameter is invalid. + * @since 2.0 + */ + result SetAlignment(const _ControlImpl& item, const LayoutHorizontalAlignment horizontalAlign, const LayoutVerticalAlignment verticalAlign); + + /** + * Gets the alignment of the specified item. + * + * @return An error code + * @param[in] item The item to get the alignment + * @param[out] align The alignment + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @since 2.0 + */ + result GetAlignment(const _ControlImpl& item, LayoutHorizontalAlignment& horizontalAlign, LayoutVerticalAlignment& verticalAlign) const; + + /** + * Sets the margin of the specified item. + * + * @return An error code + * @param[in] item The item for which the margin is set + * @param[in] margin The margin + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @since 2.0 + */ + result SetMargin(const _ControlImpl& item, int left, int right, int top, int bottom); + + /* + * Sets the margin of the specified item. + * + * @return An error code + * @param[in] item The item for which the margin is set + * @param[in] margin The margin + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @since 2.1 + */ + result SetMargin(const _ControlImpl& item, float left, float right, float top, float bottom); + + /** + * Gets the margin of the specified item. + * + * @return An error code + * @param[in] item The item to get the margin + * @param[out] margin The margin + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @since 2.0 + */ + result GetMargin(const _ControlImpl& item, int& left, int& right, int& top, int& bottom) const; + + /* + * Gets the margin of the specified item. + * + * @return An error code + * @param[in] item The item to get the margin + * @param[out] margin The margin + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @since 2.1 + */ + result GetMargin(const _ControlImpl& item, float& left, float& right, float& top, float& bottom) const; + + /** + * Sets the width of the specified item with the match policy. + * + * @return An error code + * @param[in] item The item for which the width is set + * @patam[in] matchMode The match policy + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @since 2.0 + */ + result SetHorizontalFitPolicy(const _ControlImpl& item, const FitPolicy policy); + + /** + * Gets the width of the specified item with the match policy. + * + * @return An error code + * @param[in] item The item to get the match policy of the width + * @patam[out] matchMode The match policy + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @since 2.0 + */ + result GetHorizontalFitPolicy(const _ControlImpl& item, FitPolicy& policy) const; + + /** + * Sets the height of the specified item with the match policy. + * + * @return An error code + * @param[in] item The item for which the height is set + * @patam[in] matchMode The match policy + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @since 2.0 + */ + result SetVerticalFitPolicy(const _ControlImpl& item, const FitPolicy matchMode); + + /** + * Gets the height of the specified item with the match policy. + * + * @return An error code + * @param[in] item The item to get the match policy of the height + * @patam[out] matchMode The match policy + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @since 2.0 + */ + result GetVerticalFitPolicy(const _ControlImpl& item, FitPolicy& matchMode) const; + + /** + * Adds the item at the end of the list maintained by the layout + * + * @return An error code + * @param[in] addItem + * @exception + * @since 2.0 + */ + result AddItem(_ControlImpl& addItem); + + /** + * + * + * @return An error code + * @param[in] removeItem + * @exception + * @since 2.0 + */ + result RemoveItem(const _ControlImpl& removeItem); + + /** + * + * + * @return An error code + * @param[in] viewPosX The x coordinate + * @param[in] viewPosY The y coordinate + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE The layout have a item instance that is in an invalid state. + * @since 2.0 + */ + result OnChangeViewPos(int viewPosX, int viewPosY); + + /** + * Sets the base location and dimension of the specified item. + * + * @return An error code + * @param[in] item The item for which the base location and dimension are set + * @patam[in] baseRect The rectangle value with the location and dimension + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @since 2.0 + */ + result SetItemBaseRect(const _ControlImpl& item, const _Layout::LayoutRect baseRect); + + /** + * Gets the base location and dimension of the specified item. + * + * @return An error code + * @param[in] item The item to get the base location and dimension + * @patam[out] baseRect The rectangle value with the location and dimension + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @since 2.0 + */ + result GetItemBaseRect(const _ControlImpl& item, _Layout::LayoutRect& baseRect) const; + +private: + _LayoutImpl& operator =(const _LayoutImpl&); + static void AllocateLayoutImpl(Layout* pPublicLayout, _SharedPtr layoutImpl); + +protected: + Layout* _pPublicLayout; + _Layout::Layout* _pCoreLayout; + +}; // _LayoutImpl + +struct LayoutImplHolder +{ + _SharedPtr layoutImpl; +}; + +}} // Tizen::Ui + +#endif // _FUI_LAYOUT_IMPL_H_ diff --git a/src/ui/FUi_Matrix3Df.cpp b/src/ui/FUi_Matrix3Df.cpp new file mode 100644 index 0000000..fbe7a81 --- /dev/null +++ b/src/ui/FUi_Matrix3Df.cpp @@ -0,0 +1,854 @@ +// +// 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_Matrix3Df.h + * @brief Header file of _Matrix3Df class + * + * This file contains declarations _Matrix3Df class. + */ + +#include +#include "FUi_Math.h" +#include "FUi_Matrix3Df.h" + +#define PI 3.141592653f + +namespace +{ + +float identityTransform[4][4] = +{ + { 1.0f, 0.0f, 0.0f, 0.0f }, + { 0.0f, 1.0f, 0.0f, 0.0f }, + { 0.0f, 0.0f, 1.0f, 0.0f }, + { 0.0f, 0.0f, 0.0f, 1.0f } +}; + +}; + +namespace Tizen { namespace Ui { namespace Animations +{ + +_Matrix3Df::_Matrix3Df(void) +{ + LoadIdentity(); +} + +_Matrix3Df::_Matrix3Df(const float* pValues) +{ + memcpy(__m, pValues, sizeof(__m)); + __complexity = GenericMatrix; +} + +_Matrix3Df& +_Matrix3Df::Assign(const _Matrix3Df& rhs) +{ + memcpy(__m, rhs.__m, sizeof(__m)); + __complexity = rhs.__complexity; + + return *this; +} + +_Matrix3Df& +_Matrix3Df::operator =(const _Matrix3Df& rhs) +{ + if (&rhs != this) + return Assign(rhs); + + return *this; +} + +bool +_Matrix3Df::operator ==(const _Matrix3Df& rhs) const +{ + return (__m[0][0] == rhs.__m[0][0] && + __m[0][1] == rhs.__m[0][1] && + __m[0][2] == rhs.__m[0][2] && + __m[0][3] == rhs.__m[0][3] && + __m[1][0] == rhs.__m[1][0] && + __m[1][1] == rhs.__m[1][1] && + __m[1][2] == rhs.__m[1][2] && + __m[1][3] == rhs.__m[1][3] && + __m[2][0] == rhs.__m[2][0] && + __m[2][1] == rhs.__m[2][1] && + __m[2][2] == rhs.__m[2][2] && + __m[2][3] == rhs.__m[2][3] && + __m[3][0] == rhs.__m[3][0] && + __m[3][1] == rhs.__m[3][1] && + __m[3][2] == rhs.__m[3][2] && + __m[3][3] == rhs.__m[3][3]); +} + +bool +_Matrix3Df::operator !=(const _Matrix3Df& rhs) const +{ + return (__m[0][0] != rhs.__m[0][0] || + __m[0][1] != rhs.__m[0][1] || + __m[0][2] != rhs.__m[0][2] || + __m[0][3] != rhs.__m[0][3] || + __m[1][0] != rhs.__m[1][0] || + __m[1][1] != rhs.__m[1][1] || + __m[1][2] != rhs.__m[1][2] || + __m[1][3] != rhs.__m[1][3] || + __m[2][0] != rhs.__m[2][0] || + __m[2][1] != rhs.__m[2][1] || + __m[2][2] != rhs.__m[2][2] || + __m[2][3] != rhs.__m[2][3] || + __m[3][0] != rhs.__m[3][0] || + __m[3][1] != rhs.__m[3][1] || + __m[3][2] != rhs.__m[3][2] || + __m[3][3] != rhs.__m[3][3]); +} + +void +_Matrix3Df::Optimize(void) +{ + if (__m[3][3] != 1.0f) + { + __complexity = GenericMatrix; + return; + } + + if (__m[1][0] != 0.0f || __m[2][0] != 0.0f || __m[2][1] != 0.0f) + { + __complexity = GenericMatrix; + return; + } + + if (__m[0][1] != 0.0f || __m[0][2] != 0.0f || __m[0][3] != 0.0f || + __m[1][2] != 0.0f || __m[1][3] != 0.0f || __m[2][3] != 0.0f) + { + __complexity = GenericMatrix; + return; + } + + bool isTranslate = (__m[3][0] != 0.0f || __m[3][1] != 0.0f || __m[3][2] != 0.0f); + bool isDiagonal = (__m[0][0] == 1.0f && __m[1][1] == 1.0f && __m[2][2] == 1.0f); + + if (isTranslate && isDiagonal) + __complexity = TranslationMatrix; + else if (isTranslate) + __complexity = GenericMatrix; + else if (isDiagonal) + __complexity = IdentityMatrix; + else + __complexity = ScaleMatrix; +} + +_Matrix3Df& +_Matrix3Df::operator *=(const _Matrix3Df& rhs) +{ + if (__complexity == IdentityMatrix) + { + *this = rhs; + } + else if (rhs.__complexity == IdentityMatrix) + { + // nothing... + } + else + { + *this = *this * rhs; + } + + return *this; +} + +_Matrix3Df& +_Matrix3Df::MultiplyMatrix(const _Matrix3Df& matrix) +{ + *this = *this * matrix; + + return *this; +} + +_Matrix3Df& +_Matrix3Df::Concatenate(const _Matrix3Df* matrix) +{ + return Concatenate(*matrix); +} + +_Matrix3Df& +_Matrix3Df::Concatenate(const _Matrix3Df& matrix) +{ + *this = matrix * *this; + + return *this; +} + +float +_Matrix3Df::GetDeterminant(void) const +{ + float a0, a1, a2, a3, a4, a5; + float b0, b1, b2, b3, b4, b5; + float det; + + a0 = __m[0][0] * __m[1][1] - __m[0][1] * __m[1][0]; + a1 = __m[0][0] * __m[1][2] - __m[0][2] * __m[1][0]; + a2 = __m[0][0] * __m[1][3] - __m[0][3] * __m[1][0]; + a3 = __m[0][1] * __m[1][2] - __m[0][2] * __m[1][1]; + a4 = __m[0][1] * __m[1][3] - __m[0][3] * __m[1][1]; + a5 = __m[0][2] * __m[1][3] - __m[0][3] * __m[1][2]; + + b0 = __m[2][0] * __m[3][1] - __m[2][1] * __m[3][0]; + b1 = __m[2][0] * __m[3][2] - __m[2][2] * __m[3][0]; + b2 = __m[2][0] * __m[3][3] - __m[2][3] * __m[3][0]; + b3 = __m[2][1] * __m[3][2] - __m[2][2] * __m[3][1]; + b4 = __m[2][1] * __m[3][3] - __m[2][3] * __m[3][1]; + b5 = __m[2][2] * __m[3][3] - __m[2][3] * __m[3][2]; + + det = a0 * b5 - a1 * b4 + a2 * b3 + a3 * b2 - a4 * b1 + a5 * b0; + + return det; +} + +bool +_Matrix3Df::IsInvertible(void) const +{ + if (__complexity == IdentityMatrix) + return true; + + if (__complexity == TranslationMatrix) + return true; + + return !_FloatHardCompare(GetDeterminant(), 0.0f); +} + +bool +_Matrix3Df::Invert(void) +{ + // TODO: + // Optimize using NEON + float a0, a1, a2, a3, a4, a5; + float b0, b1, b2, b3, b4, b5; + float det; + + if (__complexity == IdentityMatrix) + return true; + + if (__complexity == TranslationMatrix) + { + __m[3][0] = -__m[3][0]; + __m[3][1] = -__m[3][1]; + __m[3][2] = -__m[3][2]; + return true; + } + + + a0 = __m[0][0] * __m[1][1] - __m[0][1] * __m[1][0]; + a1 = __m[0][0] * __m[1][2] - __m[0][2] * __m[1][0]; + a2 = __m[0][0] * __m[1][3] - __m[0][3] * __m[1][0]; + a3 = __m[0][1] * __m[1][2] - __m[0][2] * __m[1][1]; + a4 = __m[0][1] * __m[1][3] - __m[0][3] * __m[1][1]; + a5 = __m[0][2] * __m[1][3] - __m[0][3] * __m[1][2]; + + b0 = __m[2][0] * __m[3][1] - __m[2][1] * __m[3][0]; + b1 = __m[2][0] * __m[3][2] - __m[2][2] * __m[3][0]; + b2 = __m[2][0] * __m[3][3] - __m[2][3] * __m[3][0]; + b3 = __m[2][1] * __m[3][2] - __m[2][2] * __m[3][1]; + b4 = __m[2][1] * __m[3][3] - __m[2][3] * __m[3][1]; + b5 = __m[2][2] * __m[3][3] - __m[2][3] * __m[3][2]; + + det = a0 * b5 - a1 * b4 + a2 * b3 + a3 * b2 - a4 * b1 + a5 * b0; + if (_FloatHardCompare(det, 0.0f)) + return false; + + + float inverse_m[4][4]; + + inverse_m[0][0] = +__m[1][1] * b5 - __m[1][2] * b4 + __m[1][3] * b3; + inverse_m[1][0] = -__m[1][0] * b5 + __m[1][2] * b2 + __m[1][3] * b1; + inverse_m[2][0] = +__m[1][0] * b4 - __m[1][1] * b2 + __m[1][3] * b0; + inverse_m[3][0] = -__m[1][0] * b3 + __m[1][1] * b1 - __m[1][2] * b0; + inverse_m[0][1] = -__m[0][1] * b5 + __m[0][2] * b4 - __m[0][3] * b3; + inverse_m[1][1] = +__m[0][0] * b5 - __m[0][2] * b2 + __m[0][3] * b1; + inverse_m[2][1] = -__m[0][0] * b4 + __m[0][1] * b2 - __m[0][3] * b0; + inverse_m[3][1] = +__m[0][0] * b3 - __m[0][1] * b1 + __m[0][2] * b0; + inverse_m[0][2] = +__m[3][1] * a5 - __m[3][2] * a4 + __m[3][3] * a3; + inverse_m[1][2] = -__m[3][0] * a5 + __m[3][2] * a2 - __m[3][3] * a1; + inverse_m[2][2] = +__m[3][0] * a4 - __m[3][1] * a2 + __m[3][3] * a0; + inverse_m[3][2] = -__m[3][0] * a3 + __m[3][1] * a1 - __m[3][2] * a0; + inverse_m[0][3] = -__m[2][1] * a5 + __m[2][2] * a4 - __m[2][3] * a3; + inverse_m[1][3] = +__m[2][0] * a5 - __m[2][2] * a2 + __m[2][3] * a1; + inverse_m[2][3] = -__m[2][0] * a4 + __m[2][1] * a2 - __m[2][3] * a0; + inverse_m[3][3] = +__m[2][0] * a3 - __m[2][1] * a1 + __m[2][2] * a0; + + for (int i = 0; i < 4; i++) + { + for (int j = 0; j < 4; j++) + inverse_m[j][i] /= det; + } + + memcpy(__m, inverse_m, sizeof(__m)); + __complexity = GenericMatrix; + + return true; +} + +void +_Matrix3Df::LoadIdentity(void) +{ + memcpy(__m, identityTransform, sizeof(__m)); + __complexity = IdentityMatrix; +} + +void +_Matrix3Df::Transpose(void) +{ + int i, j; + float tmp; + + for (i = 0; i < 4; i++) + { + for (j = i + 1; j < 4; j++) + { + tmp = __m[i][j]; + __m[i][j] = __m[j][i]; + __m[j][i] = tmp; + } + } + + __complexity = GenericMatrix; +} + +void +_Matrix3Df::Translate(float tx, float ty, float tz) +{ + if (__complexity == IdentityMatrix) + { + __m[3][0] = tx; + __m[3][1] = ty; + __m[3][2] = tz; + __complexity = TranslationMatrix; + } + else if (__complexity == TranslationMatrix) + { + __m[3][0] += tx; + __m[3][1] += ty; + __m[3][2] += tz; + } + else if (__complexity == ScaleMatrix) + { + __m[3][0] = __m[0][0] * tx; + __m[3][1] = __m[1][1] * ty; + __m[3][2] = __m[1][2] * tz; + __complexity = GenericMatrix; + } + else + { +#ifndef GEM_SIMD + __m[3][0] += (__m[0][0] * tx + __m[1][0] * ty + __m[2][0] * tz); + __m[3][1] += (__m[0][1] * tx + __m[1][1] * ty + __m[2][1] * tz); + __m[3][2] += (__m[0][2] * tx + __m[1][2] * ty + __m[2][2] * tz); + __m[3][3] += (__m[0][3] * tx + __m[1][3] * ty + __m[2][3] * tz); + __complexity = GenericMatrix; +#else + float32x4_t f4Dest; + + f4Dest = vld1q_f32(m_mtx.m[3]); + f4Dest = vmlaq_n_f32(f4Dest, vld1q_f32(m_mtx.m[0]), tx); + f4Dest = vmlaq_n_f32(f4Dest, vld1q_f32(m_mtx.m[1]), ty); + f4Dest = vmlaq_n_f32(f4Dest, vld1q_f32(m_mtx.m[2]), tz); + + vst1q_f32(m_mtx.m[3], f4Dest); +#endif + } +} + +void +_Matrix3Df::Scale(float sx, float sy, float sz) +{ +#ifndef GEM_SIMD + if (sx != 1.0f) + { + __m[0][0] *= sx; + __m[0][1] *= sx; + __m[0][2] *= sx; + __m[0][3] *= sx; + } + + if (sy != 1.0f) + { + __m[1][0] *= sy; + __m[1][1] *= sy; + __m[1][2] *= sy; + __m[1][3] *= sy; + } + + if (sz != 1.0f) + { + __m[2][0] *= sz; + __m[2][1] *= sz; + __m[2][2] *= sz; + __m[2][3] *= sz; + } + + if (__complexity == IdentityMatrix) + __complexity = ScaleMatrix; + else + __complexity = GenericMatrix; + +#else + vst1q_f32(m_mtx.m[0], vmulq_n_f32(vld1q_f32(m_mtx.m[0]), sx)); + vst1q_f32(m_mtx.m[1], vmulq_n_f32(vld1q_f32(m_mtx.m[1]), sy)); + vst1q_f32(m_mtx.m[2], vmulq_n_f32(vld1q_f32(m_mtx.m[2]), sz)); +#endif +} + +void +_Matrix3Df::Shear(float xy, float yz, float zx, float yx, float zy, float xz) +{ + _Matrix3Df ShearMatrix; + + // refer: http://www.j3d.org/matrix_faq/matrfaq_latest.html#Q43 + + if (xy == 0.0f && yz == 0.0f && zx == 0.0f && + yx == 0.0f && zy == 0.0f && xz == 0.0f) + return; + + + memcpy(ShearMatrix.__m, identityTransform, sizeof(ShearMatrix.__m)); + + ShearMatrix.__m[0][1] = xy; + ShearMatrix.__m[0][2] = xz; + + ShearMatrix.__m[1][0] = yx; + ShearMatrix.__m[1][2] = yz; + + ShearMatrix.__m[2][0] = zx; + ShearMatrix.__m[2][1] = zy; + + ShearMatrix.__complexity = GenericMatrix; + + *this = *this * ShearMatrix; +} + +void +_Matrix3Df::Rotate(float angle, float x, float y, float z) +{ +#if 1 + if (angle == 0.0f) + return; + + // Rotation using quaternion + + angle = angle * M_PI / 180.0f; + + angle /= 2.0f; + float sinA = sinf(angle); + float cosA = cosf(angle); + float sinA2 = sinA * sinA; + + // normalize + float length = sqrtf(x * x + y * y + z * z); + if (length == 0.0f) + { + // bad vector, just use something reasonable +#if 0 + x = 0.0f; + y = 0.0f; + z = 1.0f; +#else + return; +#endif + } + else if (length != 1.0f) + { + x /= length; + y /= length; + z /= length; + } + + + float mat[4][4] = { {0.0f, }, }; + + // optimize case where axis is along major axis + if (x == 1.0f && y == 0.0f && z == 0.0f) + { + mat[0][0] = 1.0f; + mat[0][1] = 0.0f; + mat[0][2] = 0.0f; + mat[1][0] = 0.0f; + mat[1][1] = 1.0f - 2.0f * sinA2; + mat[1][2] = 2.0f * sinA * cosA; + mat[2][0] = 0.0f; + mat[2][1] = -2.0f * sinA * cosA; + mat[2][2] = 1.0f - 2.0f * sinA2; + mat[0][3] = mat[1][3] = mat[2][3] = 0.0f; + mat[3][0] = mat[3][1] = mat[3][2] = 0.0f; + mat[3][3] = 1.0f; + } + else if (x == 0.0f && y == 1.0f && z == 0.0f) + { + mat[0][0] = 1.0f - 2.0f * sinA2; + mat[0][1] = 0.0f; + mat[0][2] = -2.0f * sinA * cosA; + mat[1][0] = 0.0f; + mat[1][1] = 1.0f; + mat[1][2] = 0.0f; + mat[2][0] = 2.0f * sinA * cosA; + mat[2][1] = 0.0f; + mat[2][2] = 1.0f - 2.0f * sinA2; + mat[0][3] = mat[1][3] = mat[2][3] = 0.0f; + mat[3][0] = mat[3][1] = mat[3][2] = 0.0f; + mat[3][3] = 1.0f; + } + else if (x == 0.0f && y == 0.0f && z == 1.0f) + { + mat[0][0] = 1.0f - 2.0f * sinA2; + mat[0][1] = 2.0f * sinA * cosA; + mat[0][2] = 0.0f; + mat[1][0] = -2.0f * sinA * cosA; + mat[1][1] = 1.0f - 2.0f * sinA2; + mat[1][2] = 0.0f; + mat[2][0] = 0.0f; + mat[2][1] = 0.0f; + mat[2][2] = 1.0f; + mat[0][3] = mat[1][3] = mat[2][3] = 0.0f; + mat[3][0] = mat[3][1] = mat[3][2] = 0.0f; + mat[3][3] = 1.0f; + } + else + { + float x2 = x * x; + float y2 = y * y; + float z2 = z * z; + + mat[0][0] = 1.0f - 2.0f * (y2 + z2) * sinA2; + mat[0][1] = 2.0f * (x * y * sinA2 + z * sinA * cosA); + mat[0][2] = 2.0f * (x * z * sinA2 - y * sinA * cosA); + mat[1][0] = 2.0f * (y * x * sinA2 - z * sinA * cosA); + mat[1][1] = 1.0f - 2.0f * (z2 + x2) * sinA2; + mat[1][2] = 2.0f * (y * z * sinA2 + x * sinA * cosA); + mat[2][0] = 2.0f * (z * x * sinA2 + y * sinA * cosA); + mat[2][1] = 2.0f * (z * y * sinA2 - x * sinA * cosA); + mat[2][2] = 1.0f - 2.0f * (x2 + y2) * sinA2; + mat[0][3] = mat[1][3] = mat[2][3] = 0.0f; + mat[3][0] = mat[3][1] = mat[3][2] = 0.0f; + mat[3][3] = 1.0f; + } + + *this *= _Matrix3Df((const float*)mat); +#else + _Matrix3Df rotMat; + float sinAngle, cosAngle; + float mag; + + if (angle == 0.0f) + return; + + mag = sqrtf(x * x + y * y + z * z); + sinAngle = sinf(angle * PI / 180.0f); + cosAngle = cosf(angle * PI / 180.0f); + + if (mag > 0.0f) + { + float xx, yy, zz, xy, yz, zx, xs, ys, zs; + float oneMinusCos; + + x /= mag; + y /= mag; + z /= mag; + + xx = x * x; + yy = y * y; + zz = z * z; + xy = x * y; + yz = y * z; + zx = z * x; + xs = x * sinAngle; + ys = y * sinAngle; + zs = z * sinAngle; + oneMinusCos = 1.0f - cosAngle; + + rotMat.__m[0][0] = (oneMinusCos * xx) + cosAngle; + rotMat.__m[1][0] = (oneMinusCos * xy) - zs; + rotMat.__m[2][0] = (oneMinusCos * zx) + ys; + rotMat.__m[3][0] = 0.0f; + + rotMat.__m[0][1] = (oneMinusCos * xy) + zs; + rotMat.__m[1][1] = (oneMinusCos * yy) + cosAngle; + rotMat.__m[2][1] = (oneMinusCos * yz) - xs; + rotMat.__m[3][1] = 0.0f; + + rotMat.__m[0][2] = (oneMinusCos * zx) - ys; + rotMat.__m[1][2] = (oneMinusCos * yz) + xs; + rotMat.__m[2][2] = (oneMinusCos * zz) + cosAngle; + rotMat.__m[3][2] = 0.0f; + + rotMat.__m[0][3] = 0.0f; + rotMat.__m[1][3] = 0.0f; + rotMat.__m[2][3] = 0.0f; + rotMat.__m[3][3] = 1.0f; + + rotMat.__complexity = GenericMatrix; + + *this = *this * rotMat; + } +#endif +} + +void +_Matrix3Df::MakeOrthogonal(float left, float right, float bottom, float top, float n, float f) +{ + _Matrix3Df mat; + float w, h, d; + + memcpy(mat.__m, identityTransform, sizeof(mat.__m)); + + w = right - left; + h = top - bottom; + d = f - n; + + // CHECKME: + if (w == 0.0f) + w = ALMOST_ZERO_FLOAT; + if (h == 0.0f) + h = ALMOST_ZERO_FLOAT; + if (d == 0.0f) + d = ALMOST_ZERO_FLOAT; + + mat.__m[0][0] = 2.0f / w; + mat.__m[1][1] = 2.0f / h; + mat.__m[2][2] = -2.0f / d; + + mat.__m[3][0] = -(right + left) / w; + mat.__m[3][1] = -(bottom + top) / h; + mat.__m[3][2] = -(n + f) / d; + mat.__m[3][3] = 1.0f; + + mat.__complexity = GenericMatrix; + + *this *= mat; +} + +void +_Matrix3Df::MakeFrustum(float left, float right, float bottom, float top, float nearZ, float farZ) +{ + _Matrix3Df mat; + float w, h, d; + + memcpy(mat.__m, identityTransform, sizeof(mat.__m)); + + w = right - left; + h = top - bottom; + d = farZ - nearZ; + + // CHECKME: + if (w == 0.0f) + w = ALMOST_ZERO_FLOAT; + if (h == 0.0f) + h = ALMOST_ZERO_FLOAT; + if (d == 0.0f) + d = ALMOST_ZERO_FLOAT; + + mat.__m[0][0] = 2.0f * nearZ / w; + mat.__m[1][1] = 2.0f * nearZ / h; + mat.__m[2][0] = (right + left) / w; + mat.__m[2][1] = (top + bottom) / h; + mat.__m[2][2] = -(farZ + nearZ) / d; + mat.__m[2][3] = -1.0f; + mat.__m[3][2] = -2.0f * farZ * nearZ / d; + mat.__m[3][3] = 0.0f; + + mat.__complexity = GenericMatrix; + + *this *= mat; +} + +void +_Matrix3Df::MakePerspective(float fovy, float aspect, float nearZ, float farZ) +{ + float frustumW, frustumH; + + frustumH = tanf(fovy / 360.0f * PI) * nearZ; + frustumW = frustumH * aspect; + + MakeFrustum(-frustumW, frustumW, -frustumH, frustumH, nearZ, farZ); +} + +void +_Matrix3Df::MakeLookAt(float eyeX, float eyeY, float eyeZ, float centerX, float centerY, float centerZ, float upX, float upY, float upZ) +{ + _Matrix3Df mat; + float x[3], y[3], z[3]; + float mag; + + // Make rotation matrix + // Z vector + z[0] = eyeX - centerX; + z[1] = eyeY - centerY; + z[2] = eyeZ - centerZ; + + mag = sqrtf(z[0] * z[0] + z[1] * z[1] + z[2] * z[2]); + if (mag) + { + // mpichler, 19950515 + z[0] /= mag; + z[1] /= mag; + z[2] /= mag; + } + + // Y vector + y[0] = upX; + y[1] = upY; + y[2] = upZ; + + // X vector = Y cross Z + x[0] = y[1] * z[2] - y[2] * z[1]; + x[1] = -y[0] * z[2] + y[2] * z[0]; + x[2] = y[0] * z[1] - y[1] * z[0]; + + // Recompute Y = Z cross X + y[0] = z[1] * x[2] - z[2] * x[1]; + y[1] = -z[0] * x[2] + z[2] * x[0]; + y[2] = z[0] * x[1] - z[1] * x[0]; + + // mpichler, 19950515 + // cross product gives area of parallelogram, which is < 1.0 for + // non-perpendicular unit-length vectors; so normalize x, y here + mag = sqrtf(x[0] * x[0] + x[1] * x[1] + x[2] * x[2]); + if (mag) + { + x[0] /= mag; + x[1] /= mag; + x[2] /= mag; + } + + mag = sqrtf(y[0] * y[0] + y[1] * y[1] + y[2] * y[2]); + if (mag) + { + y[0] /= mag; + y[1] /= mag; + y[2] /= mag; + } + + mat.__m[0][0] = x[0]; + mat.__m[1][0] = x[1]; + mat.__m[2][0] = x[2]; + mat.__m[3][0] = 0.0f; + mat.__m[0][1] = y[0]; + mat.__m[1][1] = y[1]; + mat.__m[2][1] = y[2]; + mat.__m[3][1] = 0.0f; + mat.__m[0][2] = z[0]; + mat.__m[1][2] = z[1]; + mat.__m[2][2] = z[2]; + mat.__m[3][2] = 0.0f; + + mat.__complexity = GenericMatrix; + + *this *= mat; + + // Translate Eye to Origin + Translate(-eyeX, -eyeY, -eyeZ); +} + +_Matrix3Df& +_Matrix3Df::MakeTransformAtAnchor(float x, float y, float z) +{ + *this = _Matrix3DfTr(x, y, z) * (*this) * _Matrix3DfTr(-x, -y, -z); + + return *this; +} + +float +_Matrix3Df::Normalize(void) +{ + float w; + + w = __m[3][3]; + if (w == 1.0f || w == 0.0f) + return w; + + for (int i = 0; i < 4; i++) + { + for (int j = 0; j < 4; j++) + __m[i][j] /= w; + } + + __complexity = GenericMatrix; + + return w; +} + +void +_Matrix3Df::Transform(float* pX, float* pY, float* pZ) const +{ +#ifndef GEM_SIMD + float x, y, z, w; + + x = *pX; + y = *pY; + z = *pZ; + + if (__complexity == IdentityMatrix) + { + return; + } + else if (__complexity == TranslationMatrix) + { + *pX += __m[3][0]; + *pY += __m[3][1]; + *pZ += __m[3][2]; + } + else if (__complexity == ScaleMatrix) + { + *pX = __m[0][0] * x; + *pY = __m[1][1] * y; + *pZ = __m[2][2] * z; + } + else + { + *pX = (__m[0][0] * x) + (__m[1][0] * y) + (__m[2][0] * z) + (__m[3][0]); + *pY = (__m[0][1] * x) + (__m[1][1] * y) + (__m[2][1] * z) + (__m[3][1]); + *pZ = (__m[0][2] * x) + (__m[1][2] * y) + (__m[2][2] * z) + (__m[3][2]); + w = (__m[0][3] * x) + (__m[1][3] * y) + (__m[2][3] * z) + (__m[3][3]); + + // TODO: what if w == 0 ???? + + if (w != 1.0f) + { + *pX /= w; + *pY /= w; + *pZ /= w; + } + } +#else + float pVector[4]; + float32x4_t f4Dest; + + f4Dest = vmulq_n_f32(vld1q_f32(m_mtx.m[0]), *pX); + f4Dest = vmlaq_n_f32(f4Dest, vld1q_f32(m_mtx.m[1]), *pY); + f4Dest = vmlaq_n_f32(f4Dest, vld1q_f32(m_mtx.m[2]), *pZ); + f4Dest = vmlaq_n_f32(f4Dest, vld1q_f32(m_mtx.m[3]), 1.0f); + + vst1q_f32(pVector, f4Dest); + + *pX = pVector[0] / pVector[3]; + *pY = pVector[1] / pVector[3]; + *pZ = pVector[2] / pVector[3]; +#endif + + + // CHECKME: + // Needless to check 4th row ?? +} + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/FUi_ModalLoopManager.cpp b/src/ui/FUi_ModalLoopManager.cpp new file mode 100644 index 0000000..a1b3290 --- /dev/null +++ b/src/ui/FUi_ModalLoopManager.cpp @@ -0,0 +1,253 @@ +// +// 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_ModalLoopManager.cpp + * @brief This is the implementation file for the _ModalLoopManager class. + */ + +#include +#include +#include +#include +#include "FUi_ModalLoopManager.h" +#include "FUi_EcoreEvasMgr.h" + +using namespace Tizen::Base::Runtime; +using namespace Tizen::Ui; + +namespace Tizen { namespace Ui +{ + +_ModalLoopManager::_ModalLoopManager(void) + : __pTimerInfoList(null) + , __nestedMainLoop(0) + , __lastExitCode(-1) +{ + __pTimerInfoList = new (std::nothrow) TimerInfoList; + SysAssert(__pTimerInfoList); + __pTimerInfoList->Construct(); +} + +_ModalLoopManager::~_ModalLoopManager(void) +{ + if (__pTimerInfoList) + { + _TimerInfo timerInfo; + const int count = __pTimerInfoList->GetCount(); + for (int i = 0; i < count; i++) + { + timerInfo.pTimer = null; + __pTimerInfoList->GetAt(i, timerInfo); + if (timerInfo.pTimer) + { + delete timerInfo.pTimer; + } + } + __pTimerInfoList->RemoveAll(); + delete __pTimerInfoList; + __pTimerInfoList = null; + } + + if (__nestedMainLoop > 0) + { + SysLog(NID_UI, "[ModalLoopManager] The count of nested main loops is: %d", __nestedMainLoop); + } +} + +int +_ModalLoopManager::BeginMainLoop(void) +{ + __lastExitCode = -1; + __nestedMainLoop++; + ::GetEcoreEvasMgr()->BeginMainLoop(); + + return __nestedMainLoop; +} + +int +_ModalLoopManager::BeginMainLoop(unsigned long timeOut, int exitCode) +{ + result r = E_SUCCESS; + Timer* pTimer = null; + + if (timeOut > 0l) + { + pTimer = new (std::nothrow) Timer; + SysTryReturn(NID_UI, pTimer != null, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create Timer."); + + r = pTimer->Construct(*this); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pTimer->Start(timeOut); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + _TimerInfo timerInfo; + timerInfo.loopId = __nestedMainLoop + 1; + timerInfo.pTimer = pTimer; + timerInfo.exitCode = exitCode; + timerInfo.expired = false; + r = __pTimerInfoList->Add(timerInfo); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + return BeginMainLoop(); + +CATCH: + delete pTimer; + return -1; +} + +int +_ModalLoopManager::EndMainLoop(int exitCode, bool endAllLoops) +{ + if (__nestedMainLoop == 0) + { + return __nestedMainLoop; + } + + __lastExitCode = exitCode; + + _TimerInfo timerInfo; + int timerCount = 0; + int loopCount = endAllLoops ? __nestedMainLoop : 1; + while (loopCount--) + { + timerCount = __pTimerInfoList->GetCount(); + if (timerCount > 0) + { + __pTimerInfoList->GetAt(timerCount - 1, timerInfo); + if (timerInfo.loopId == __nestedMainLoop) + { + timerInfo.pTimer->Cancel(); + delete timerInfo.pTimer; + __pTimerInfoList->RemoveAt(timerCount - 1); + } + } + timerCount = __pTimerInfoList->GetCount(); + if (timerCount > 0) + { + __pTimerInfoList->GetAt(timerCount - 1, timerInfo); + if ((timerInfo.loopId == __nestedMainLoop - 1) && (timerInfo.expired == true)) + { + __lastExitCode = -2; + } + } + ::GetEcoreEvasMgr()->EndMainLoop(); + __nestedMainLoop--; + } + + return __nestedMainLoop; +} + +int +_ModalLoopManager::GetLastExitCode(void) +{ + return __lastExitCode; +} + +void +_ModalLoopManager::SetLastExitCode(int lastExitCode) +{ + __lastExitCode = lastExitCode; +} + +void +_ModalLoopManager::OnTimerExpired(Timer& timer) +{ + const int count = __pTimerInfoList->GetCount(); + int pos = -1; + int i = count -1; + _TimerInfo timerInfo; + + while (i >= 0) + { + __pTimerInfoList->GetAt(i, timerInfo); + + if (timerInfo.pTimer == &timer) + { + pos = timerInfo.loopId; + timerInfo.expired = true; + __pTimerInfoList->SetAt(timerInfo, i); + break; + } + i--; + } + + if (pos == __nestedMainLoop) + { + _ModalLoopManager::GetInstance()->EndMainLoop(timerInfo.exitCode, false); + } +} + +_ModalLoopManager* _ModalLoopManager::__pInstance = null; + +void +_ModalLoopManager::Initialize(void) +{ + static _ModalLoopManager instance; + __pInstance = &instance; +} + +_ModalLoopManager* +_ModalLoopManager::GetInstance(void) +{ + static pthread_once_t once_block = PTHREAD_ONCE_INIT; + + if (!__pInstance) + { + pthread_once(&once_block, Initialize); + } + + return __pInstance; +} + +_ModalLoopManager::_TimerInfo::_TimerInfo(void) + : loopId(-1) + , pTimer(null) + , exitCode(-1) + , expired(false) +{ +} + +_ModalLoopManager::_TimerInfo::~_TimerInfo(void) +{ +} + +bool +_ModalLoopManager::_TimerInfo::operator==(const _ModalLoopManager::_TimerInfo& rhs) const +{ + return ((loopId == rhs.loopId) && (pTimer == rhs.pTimer) && (exitCode == rhs.exitCode) && (expired == rhs.expired)); +} + +bool _ModalLoopManager::_TimerInfo::operator!=(const _ModalLoopManager::_TimerInfo& rhs) const +{ + return ((loopId != rhs.loopId) || (pTimer != rhs.pTimer) || (exitCode != rhs.exitCode) || (expired != rhs.expired)); +} + +_ModalLoopManager::_TimerInfo& +_ModalLoopManager::_TimerInfo::operator=(const _ModalLoopManager::_TimerInfo& rhs) +{ + loopId = rhs.loopId; + pTimer = rhs.pTimer; + exitCode = rhs.exitCode; + expired = rhs.expired; + + return *this; +} + +}} // Tizen::Ui diff --git a/src/ui/FUi_NativeObjectHandler.cpp b/src/ui/FUi_NativeObjectHandler.cpp new file mode 100644 index 0000000..8e68c01 --- /dev/null +++ b/src/ui/FUi_NativeObjectHandler.cpp @@ -0,0 +1,156 @@ +// +// 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_NativeObjectHandler.cpp + * @brief This is the implementation file for the _NativeObjectHandler class. + */ + +#include +#include "FUiAnimDisplayContext.h" +#include "FUiAnimVisualElement.h" + +#include "FUi_NativeObjectHandler.h" + +#include "FUiAnim_VisualElementImpl.h" +#include "FUiAnim_DisplayContextImpl.h" +#include "FUiAnim_EflNode.h" +#include "FUiAnim_EflLayer.h" + +#include +#include "FUi_ControlImpl.h" + + + + +using namespace Tizen::Ui::Animations; + +namespace Tizen { namespace Ui { + +Handle +_NativeObjectHandler::CreateNativeImageObjectN(const DisplayContext* pDisplayContext, int width, int height) +{ +// * @exception E_SUCCESS The method is successful. +// * @exception E_INVALID_ARG The specified @c pDisplayContext is invalid. +// * @exception E_UNSUPPORTED_OPERATION This operation is not supported. + if(!pDisplayContext) + { + return null; + } + + _DisplayContextImpl* pDispImpl = _DisplayContextImpl::GetInstance(*(DisplayContext*)pDisplayContext); + + if(!pDispImpl->GetNativeLayer()) + { + return null; + } + Evas* pEvas = ((_EflLayer*)pDispImpl->GetNativeLayer())->GetEvas(); + + if(!pEvas) + { + return null; + } + + Evas_Object* pImage = evas_object_image_filled_add(pEvas); + evas_object_resize(pImage, width, height); + evas_object_move(pImage, 0, 0); +// evas_object_show(pImage); + + return reinterpret_cast(pImage); +} + +result +_NativeObjectHandler::SetNativeObjectToVisualElement(VisualElement* pVisualElement, Handle nativeObjectHandle) +{ +// * @exception E_SUCCESS The method is successful. +// * @exception E_INVALID_ARG The specified @c pNativeObject is @c null. +// * @exception E_UNSUPPORTED_OPERATION This operation is not supported. + Evas_Object* pNative = reinterpret_cast(nativeObjectHandle); + + if(!pNative || !pVisualElement) + { + return E_INVALID_ARG; + } + + _VisualElementImpl* pVEImpl = _VisualElementImpl::GetInstance(*pVisualElement); + + _EflNode* pNode = (_EflNode*)pVEImpl->GetNativeNode(); + pNode->AddNativeSmartObject(*pVisualElement, pNative); + + const char* pName = null; + evas_object_image_file_get(pNative, &pName, null); + if (!pName) + { + int imageWidth = 0; + int imageHeight = 0; + + evas_object_image_size_get(pNative, &imageWidth, &imageHeight); + evas_object_image_data_update_add(pNative, 0, 0, imageWidth, imageHeight); + } + return E_SUCCESS; +} + + +result +_NativeObjectHandler::SetNativeObjectShowState(Handle nativeObjectHandle, bool show) +{ +// * @exception E_SUCCESS The method is successful. +// * @exception E_INVALID_ARG The specified @c pVisualElement or @c pNativeObject is invalid. +// * @exception E_UNSUPPORTED_OPERATION This operation is not supported. + Evas_Object* pNative = reinterpret_cast(nativeObjectHandle); + if(!pNative) + { + return E_INVALID_ARG; + } + if(show) + { + evas_object_show(pNative); + } + else + { + evas_object_hide(pNative); + } + + return E_SUCCESS; +} + + +result +_NativeObjectHandler::DestroyNativeObject(VisualElement* pVisualElement, Handle nativeObjectHandle) +{ +// * @exception E_SUCCESS The method is successful. +// * @exception E_UNSUPPORTED_OPERATION This operation is not supported. + + if(pVisualElement) + { + _VisualElementImpl* pVEImpl = _VisualElementImpl::GetInstance(*pVisualElement); + + _EflNode* pNode = (_EflNode*)pVEImpl->GetNativeNode(); + pNode->AddNativeSmartObject(*pVisualElement, null); + + } + Evas_Object* pNative = reinterpret_cast(nativeObjectHandle); + if(pNative) + { + evas_object_del(pNative); + + } + return E_SUCCESS; +} + +}} // namespace Tizen { namespace Ui { + diff --git a/src/ui/FUi_NativeObjectHandler.h b/src/ui/FUi_NativeObjectHandler.h new file mode 100644 index 0000000..bada4a1 --- /dev/null +++ b/src/ui/FUi_NativeObjectHandler.h @@ -0,0 +1,113 @@ +#ifndef _FUI_NATIVE_OBJECT_HANDLER_H_ +#define _FUI_NATIVE_OBJECT_HANDLER_H_ + +#include + +namespace Tizen { namespace Ui { namespace Animations { + class DisplayContext; + class VisualElement; +}}} + +namespace Tizen { namespace Ui { + +/** +* @class _NativeObjectHandler +* @brief This class provides utility methods for helping to handle a native image object. +* +* @since 2.1 +* +* @final This class is not intended for extension. +* +* The %_NativeObjectHandler class provides utility methods for helping to handle a native image object. +*/ +class _OSP_EXPORT_ _NativeObjectHandler +{ +public: + /** + * Creates a native image object. + * + * @since 2.1 + * + * @return The native image object handle.@n + * else @c 0 if an error occurs. + * @param[in] pDisplayContext The display context of the window + * @param[in] width The width of the native image object + * @param[in] height The height of the native image object + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified @c pDisplayContext is invalid. + * @exception E_UNSUPPORTED_OPERATION This operation is not supported. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + static Handle CreateNativeImageObjectN(const Tizen::Ui::Animations::DisplayContext* pDisplayContext, int width, int height); + + /** + * Sets a native image object to the visual element. + * + * @since 2.1 + * + * @return An error code + * @param[in] pVisualElement The visual element to set the native image object + * @param[in] nativeObjectHandle The handle of native image object + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified @c pVisualElement or @c pNativeObject is invalid. + * @exception E_UNSUPPORTED_OPERATION This operation is not supported. + */ + static result SetNativeObjectToVisualElement(Tizen::Ui::Animations::VisualElement* pVisualElement, Handle nativeObjectHandle); + + /** + * Sets the show state of the native image object. + * + * @since 2.1 + * + * @return An error code + * @param[in] pNativeObject The native image object + * @param[in] show The new show state + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified @c pNativeObject is @c null. + * @exception E_UNSUPPORTED_OPERATION This operation is not supported. + */ + static result SetNativeObjectShowState(Handle nativeObjectHandle, bool show); + + /** + * Deallocates the native image object. + * + * @since 2.1 + * + * @return An error code + * @param[in] pVisualElement The display context + * @param[in] pNativeObject The native image object + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified @c pVisualElement or @c pNativeObject is invalid. + * @exception E_UNSUPPORTED_OPERATION This operation is not supported. + */ + static result DestroyNativeObject(Tizen::Ui::Animations::VisualElement* pVisualElement, Handle nativeObjectHandle); + + +private: + // + // This default constructor is intentionally declared as private because this class cannot be constructed. + // + _NativeObjectHandler(void); + + // + // This destructor is intentionally declared as private because this class cannot be constructed. + // + virtual ~_NativeObjectHandler(void); + + // + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + // + // @param[in] rhs An instance of %_NativeObjectHandler + // + _NativeObjectHandler(const _NativeObjectHandler& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + // @param[in] rhs An instance of %_NativeObjectHandler + // + _NativeObjectHandler& operator =(const _NativeObjectHandler& rhs); +}; //_NativeObjectHandler +}} // namespace Tizen { namespace Ui { + +#endif //_FUI_NATIVE_OBJECT_HANDLER_H_ diff --git a/src/ui/FUi_OrientationAgent.cpp b/src/ui/FUi_OrientationAgent.cpp new file mode 100644 index 0000000..6ee058f --- /dev/null +++ b/src/ui/FUi_OrientationAgent.cpp @@ -0,0 +1,573 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.1 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// 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_OrientationAgent.cpp + * @brief This is the implementation file for the _OrientationAgent class. + */ + +#include +#include +#include +#include +#include "FUi_OrientationAgent.h" +#include "FUi_ControlManager.h" +#include "FUi_ControlImplManager.h" +#include "FUi_PublicOrientationEvent.h" +#include "FUi_ControlImpl.h" +#include "FUi_Window.h" +#include "FUiCtrl_FormImpl.h" +#include "FUiCtrl_FrameImpl.h" +#include "FUiCtrl_Frame.h" +#include "FUiCtrl_Form.h" +#include "FUi_EcoreEvasMgr.h" +#include "FUi_EcoreEvas.h" +#include "FUi_ControlManager.h" +#include "FUi_UiNotificationEvent.h" +#include "FUi_UiEventManager.h" +#include "FUi_TouchManager.h" + +using namespace std; +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Graphics; + +namespace +{ +const wchar_t* _REQUEST_ORIENTATION_EVENT = L"RequestOrientationEvent"; +} + +namespace Tizen { namespace Ui { + +_OrientationAgent* +_OrientationAgent::CreateInstanceN(Control& publicControl) +{ + _OrientationAgent* pAgent = new (std::nothrow) _OrientationAgent(publicControl); + SysTryReturn(NID_UI, pAgent, 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 pAgent; + +CATCH: + delete pAgent; + return null; +} + +_OrientationAgent::_OrientationAgent(Control& publicControl) + : __publicControl(publicControl) + , __pPublicEvent(null) + , __mode(ORIENTATION_PORTRAIT) + , __status(ORIENTATION_STATUS_PORTRAIT) + , __tempStatus(ORIENTATION_STATUS_PORTRAIT) + , __firePublicEvent(false) + , __statusChanged(false) + , __updateStatus(true) + , __draw(false) +{ + _PublicOrientationEvent* pPublicEvent = _PublicOrientationEvent::CreateInstanceN(publicControl); + + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI, pPublicEvent, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pPublicEvent = pPublicEvent; + + SetLastResult(E_SUCCESS); +} + +_OrientationAgent::~_OrientationAgent(void) +{ + if (__pPublicEvent) + { + delete __pPublicEvent; + __pPublicEvent = null; + } +} + +void +_OrientationAgent::AddListener(IOrientationEventListener& listener) +{ + result r = __pPublicEvent->AddListener(listener); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + SetLastResult(E_SUCCESS); +} + +void +_OrientationAgent::RemoveListener(IOrientationEventListener& listener) +{ + result r = __pPublicEvent->RemoveListener(listener); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + SetLastResult(E_SUCCESS); +} + +Orientation +_OrientationAgent::GetMode(void) const +{ + return __mode; +} + +OrientationStatus +_OrientationAgent::GetStatus(void) const +{ + return __status; +} + +void +_OrientationAgent::SetMode(Orientation mode) +{ + SysTryReturnVoidResult(NID_UI, mode != ORIENTATION_NONE, E_INVALID_ARG, "[E_INVALID_ARG] A specified input parameter is invalid."); + + SetLastResult(E_SUCCESS); + + if (__mode == mode) + { + return; + } + + __mode = mode; + Update(); +} + +void +_OrientationAgent::Update(bool draw) +{ + // Update orientation status(Not Auto-mode) + // Request rotation to window manager -> async -> Update VEs + // Window(not rotation) -> sync -> UpdateVEs + + SysLog(NID_UI, "[WM ROTATION][AGENT 0x%x] ---------- Update : START ----------", this); + + _ControlImplManager* pImplManager = _ControlImplManager::GetInstance(); + SysAssert(pImplManager); + + _ControlImpl* pImpl = _ControlImpl::GetInstance(__publicControl); + if (!pImpl) + { + return; + } + + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + if (!pEcoreEvas) + { + return; + } + + bool autoMode = false; + + if ((__mode == ORIENTATION_AUTOMATIC) || (__mode == ORIENTATION_AUTOMATIC_FOUR_DIRECTION)) + { + autoMode = true; + } + +// if (autoMode == false) +// { + // [Sync] + // Update orientation status + // Update VEs + // Fire orientation event + // Rotate screen + // Set preffered rotation + + _Window* pWindow = pImpl->GetCore().GetRootWindow(); + NativeWindowHandle handle = 0; + if (pWindow) + { + handle = pWindow->GetNativeHandle(); + } + + OrientationStatus status = pImplManager->GetOrientationStatus(__mode); + SysLog(NID_UI, "[WM ROTATION][AGENT 0x%x][WIN 0x%x] Update : __mode(%d) -> status(%d)", this, handle, __mode, status); + + if (__updateStatus == true) + { + __statusChanged = false; + if (__status != status) + { + __statusChanged = true; + __updateStatus = false; + } + } + + __status = status; + + pEcoreEvas->AllowSetWindowBounds(false); + FireEvent(status); + pEcoreEvas->AllowSetWindowBounds(true); + + // For the form to be made by Ui-Builder + if ((draw == true) && (__statusChanged == true)) + { + _ControlOrientation coreOrientation = + (status == ORIENTATION_STATUS_PORTRAIT || status == ORIENTATION_STATUS_PORTRAIT_REVERSE) ? + _CONTROL_ORIENTATION_PORTRAIT : _CONTROL_ORIENTATION_LANDSCAPE; + + Rectangle temp; + bool exist = pImpl->GetBuilderBounds(coreOrientation, temp); + if (exist) + { + pImpl->Invalidate(true); + } + } + + // Despite not changing status, it needs to rotate screen. + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(__publicControl); + pImplManager->RotateScreen(pControlImpl, status); + + _Window* pRootWindow = pImpl->GetCore().GetRootWindow(); + if (pRootWindow) + { + SetRotation(*pRootWindow, __mode); + } +// } +// else +// { + // [Async] + // Set preffered rotation + +// _Window* pRootWindow = pImpl->GetCore().GetRootWindow(); +// if (pRootWindow) +// { +// SetRotation(*pRootWindow, __mode); +// } + + __draw = draw; +// } + + SysLog(NID_UI, "[WM ROTATION][AGENT 0x%x] ---------- Update : END ----------", this); +} + +void +_OrientationAgent::UpdateOrientation(void) +{ + // Get window rotation + // Update VEs + // Fire orientation event + // Update window bounds + // Invalidate + + SysLog(NID_UI, "[WM ROTATION][AGENT 0x%x] ---------- UpdateOrientation : START ----------", this); + + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + if (!pEcoreEvas) + { + return; + } + + _ControlImpl* pImpl = _ControlImpl::GetInstance(__publicControl); + if (!pImpl) + { + return; + } + + _Window* pRootWindow = pImpl->GetCore().GetRootWindow(); + if (!pRootWindow) + { + return; + } + pRootWindow->ResetFocusList(); + + int rotation = pEcoreEvas->GetWindowRotation(*pRootWindow); + OrientationStatus status = ORIENTATION_STATUS_NONE; + switch (rotation) + { + case 0: + status = ORIENTATION_STATUS_PORTRAIT; + break; + case 270: + status = ORIENTATION_STATUS_LANDSCAPE; + break; + case 180: + status = ORIENTATION_STATUS_PORTRAIT_REVERSE; + break; + case 90: + status = ORIENTATION_STATUS_LANDSCAPE_REVERSE; + break; + default: + break; + } + + if (__updateStatus == true) + { + __statusChanged = false; + if (__status != status) + { + __statusChanged = true; + __updateStatus = false; + } + } + + __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 + if ((__draw == true) && (__statusChanged == true)) + { + _ControlOrientation coreOrientation = + (status == ORIENTATION_STATUS_PORTRAIT || status == ORIENTATION_STATUS_PORTRAIT_REVERSE) ? + _CONTROL_ORIENTATION_PORTRAIT : _CONTROL_ORIENTATION_LANDSCAPE; + + Rectangle temp; + bool exist = pImpl->GetBuilderBounds(coreOrientation, temp); + if (exist) + { + pImpl->Invalidate(true); + } + } + + if (preBounds != nextBounds) + { + pEcoreEvas->RotateWindow(*pRootWindow, rotation, false); + } + + if (__statusChanged == true) + { + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + if (pTouchManager) + { + pTouchManager->ResetTouchInfo(); + SysLog(NID_UI, "ResetTouchInfo"); + } + + _UiEventManager* pUiEventManger = _UiEventManager::GetInstance(); + if (pUiEventManger) + { + pUiEventManger->ClearEventQueue(); + } + } + + pImpl->Invalidate(true); + + Rectangle bounds = pRootWindow->GetBounds(); + SysLog(NID_UI, "[WM ROTATION][AGENT 0x%x][WIN 0x%x, ROT %d, %d, %d, %d, %d] Update Orientation.", this, pRootWindow->GetNativeHandle(), rotation, bounds.x, bounds.y, bounds.width, bounds.height); + + SysLog(NID_UI, "[WM ROTATION][AGENT 0x%x] ---------- UpdateOrientation : END ----------", this); +} + +void +_OrientationAgent::RequestOrientationEvent(void) +{ + ClearLastResult(); + + _ControlImpl* pImpl = _ControlImpl::GetInstance(__publicControl); + SysTryReturnVoidResult(NID_UI, pImpl, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + unique_ptr pEventArgs(new (std::nothrow) ArrayList()); + SysTryReturnVoidResult(NID_UI, pEventArgs, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + pEventArgs->Construct(); + + unique_ptr pString(new (std::nothrow) Tizen::Base::String(_REQUEST_ORIENTATION_EVENT)); + SysTryReturnVoidResult(NID_UI, pString, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + + pEventArgs->Add(*(pString.get())); + + _UiNotificationEvent event(pImpl->GetCore().GetHandle(), pEventArgs.get()); + + result r = _UiEventManager::GetInstance()->PostEvent(event); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + pString.release(); + pEventArgs.release(); +} + +void +_OrientationAgent::FireOrientationEvent(void) +{ + if (__firePublicEvent) + { + return; + } + + __firePublicEvent = true; + + SysLog(NID_UI, "Fire the orientation event."); + + if (__statusChanged) + { + IEventArg* pArg = _PublicOrientationEvent::CreateOrientationEventArgN(*__pPublicEvent->GetSource(), __status); + __pPublicEvent->Fire(*pArg); + + __updateStatus = true; + } +} + +void +_OrientationAgent::FireEvent(OrientationStatus status, bool callback) +{ + ClearLastResult(); + + _ControlManager* pCoreManager = _ControlManager::GetInstance(); + SysAssert(pCoreManager); + + _ControlImpl* pImpl = _ControlImpl::GetInstance(__publicControl); + if (!pImpl) + { + return; + } + + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + if (!pEcoreEvas) + { + return; + } + + _ControlOrientation coreOrientation = + (status == ORIENTATION_STATUS_PORTRAIT || status == ORIENTATION_STATUS_PORTRAIT_REVERSE) ? + _CONTROL_ORIENTATION_PORTRAIT : _CONTROL_ORIENTATION_LANDSCAPE; + + _ControlImplManager* pImplManager = _ControlImplManager::GetInstance(); + SysAssert(pImplManager); + + // Core + pCoreManager->SetOrientation(coreOrientation); + pImplManager->SetOrientationStatus(status); + pImpl->GetCore().ChangeLayout(coreOrientation); + + int owneeCount = pImpl->GetCore().GetOwneeCount(); + for (int i = 0; i < owneeCount; i++) + { + _Window* pOwnee = pImpl->GetCore().GetOwnee(i); + if (pOwnee) + { + if (pOwnee->GetWindowType() == _WINDOW_TYPE_VE) + { + pOwnee->ChangeLayout(coreOrientation); + } + else + { + if (!(/*(callback == true) && */(pOwnee->IsRotationSynchronized() == true))) + { + pOwnee->ChangeLayout(coreOrientation); + } + + if (pOwnee->GetVisibleState() == true) + { + pEcoreEvas->SetOwner(*pOwnee, pImpl->GetCore()); + } + } + } + } + + _Control* pParent = pImpl->GetCore().GetParent(); + if (pParent) + { + int owneeCount = pParent->GetOwneeCount(); + for (int i = 0; i < owneeCount; i++) + { + _Window* pOwnee = pParent->GetOwnee(i); + if (pOwnee) + { + if (pOwnee->GetWindowType() == _WINDOW_TYPE_VE) + { + pOwnee->ChangeLayout(coreOrientation); + } + else + { + if (!(/*(callback == true) && */(pOwnee->IsRotationSynchronized() == true))) + { + pOwnee->ChangeLayout(coreOrientation); + } + + if (pOwnee->GetVisibleState() == true) + { + pEcoreEvas->SetOwner(*pOwnee, *pParent); + } + } + } + } + } + + // Public + if (__firePublicEvent && __statusChanged) + { + IEventArg* pArg = _PublicOrientationEvent::CreateOrientationEventArgN(*__pPublicEvent->GetSource(), status); + __pPublicEvent->Fire(*pArg); + + __updateStatus = true; + } +} + +void +_OrientationAgent::SetRotation(const _Window& window, Orientation orientation) +{ + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + if (!pEcoreEvas) + { + return; + } + + switch (orientation) + { + case ORIENTATION_PORTRAIT: + pEcoreEvas->SetWindowPreferredRotation(window, 0); + break; + case ORIENTATION_LANDSCAPE: + pEcoreEvas->SetWindowPreferredRotation(window, 270); + break; + case ORIENTATION_PORTRAIT_REVERSE: + pEcoreEvas->SetWindowPreferredRotation(window, 180); + break; + case ORIENTATION_LANDSCAPE_REVERSE: + pEcoreEvas->SetWindowPreferredRotation(window, 90); + break; + case ORIENTATION_AUTOMATIC: + { + pEcoreEvas->SetWindowPreferredRotation(window, -1); + int autoRotation[3] = {0, 90, 270}; + pEcoreEvas->SetWindowAvailabledRotation(window, autoRotation, 3); + } + + break; + case ORIENTATION_AUTOMATIC_FOUR_DIRECTION: + { + pEcoreEvas->SetWindowPreferredRotation(window, -1); + int autoFourRotation[4] = {0, 90, 180, 270}; + pEcoreEvas->SetWindowAvailabledRotation(window, autoFourRotation, 4); + } + + break; + default: + break; + } +} + +}} // Tizen::Ui diff --git a/src/ui/FUi_OrientationAgent.h b/src/ui/FUi_OrientationAgent.h new file mode 100644 index 0000000..edd99b0 --- /dev/null +++ b/src/ui/FUi_OrientationAgent.h @@ -0,0 +1,79 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.1 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// 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_OrientationAgent.h + * @brief This is the header file for the _OrientationAgent class. + * + * This header file contains the declarations of the %_OrientationAgent class. + */ + +#ifndef _FUI_INTERNAL_ORIENTATION_AGENT_H_ +#define _FUI_INTERNAL_ORIENTATION_AGENT_H_ + +#include +#include "FUi_Types.h" + +namespace Tizen { namespace Ui +{ + +class _PublicOrientationEvent; +class _Window; + +class _OrientationAgent +{ +public: + static _OrientationAgent* CreateInstanceN(Control& publicControl); + ~_OrientationAgent(void); + + void AddListener(IOrientationEventListener& listener); + void RemoveListener(IOrientationEventListener& listener); + + Orientation GetMode(void) const; + OrientationStatus GetStatus(void) const; + void SetMode(Orientation orientation); + + void Update(bool draw = false); + void UpdateOrientation(void); + void SetRotation(const _Window& window, Orientation orientation); + + void RequestOrientationEvent(void); + void FireOrientationEvent(void); + +private: + void FireEvent(OrientationStatus status, bool callback = false); + + _OrientationAgent(Control& publicControl); + + _OrientationAgent(const _OrientationAgent& rhs); + _OrientationAgent& operator =(const _OrientationAgent& rhs); + +private: + Control& __publicControl; + _PublicOrientationEvent* __pPublicEvent; + Orientation __mode; + OrientationStatus __status; + OrientationStatus __tempStatus; + bool __firePublicEvent; + bool __statusChanged; + bool __updateStatus; + bool __draw; +}; // _OrientationAgent + +}} // Tizen::Ui + +#endif // _FUI_INTERNAL_ORIENTATION_AGENT_H_ diff --git a/src/ui/FUi_PropertyBase.cpp b/src/ui/FUi_PropertyBase.cpp new file mode 100644 index 0000000..bacd047 --- /dev/null +++ b/src/ui/FUi_PropertyBase.cpp @@ -0,0 +1,110 @@ +// +// 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_PropertyBase.cpp + * @brief This is the implementation file for _PropertyBase class. + */ + +#include +#include +#include "FUi_PropertyBase.h" + +using namespace Tizen::Base; + +namespace Tizen { namespace Ui +{ + +// PropertyBase class +_PropertyBase::_PropertyBase(void) + : __pPropertyChangeEventListener(null) +{ +} + +_PropertyBase::~_PropertyBase(void) +{ + __pPropertyChangeEventListener = null; +} + +result +_PropertyBase::SetProperty(const String& name, const Variant& value) +{ + SetLastResult(E_OBJ_NOT_FOUND); + return E_KEY_NOT_FOUND; +} + +Variant +_PropertyBase::GetProperty(const String& name) const +{ + SetLastResult(E_KEY_NOT_FOUND); + return Variant::NULL_VARIANT; +} + +bool +_PropertyBase::IsPropertyChangeEventListenerAdded(void) const +{ + return (__pPropertyChangeEventListener != null); +} + +result +_PropertyBase::AddPropertyChangeEventListener(const Tizen::Ui::_IPropertyChangeEventListener& listener) +{ + return SetPropertyChangeEventListener(&listener); +} + +result +_PropertyBase::RemovePropertyChangeEventListener(const Tizen::Ui::_IPropertyChangeEventListener& listener) +{ + ClearLastResult(); + __pPropertyChangeEventListener = null; + + return E_SUCCESS; +} + +result +_PropertyBase::SetPropertyChangeEventListener(const Tizen::Ui::_IPropertyChangeEventListener* pListener) +{ + ClearLastResult(); + + __pPropertyChangeEventListener = const_cast<_IPropertyChangeEventListener*>(pListener); + + return E_SUCCESS; +} + +bool +_PropertyBase::FirePropertyEvent(const Tizen::Ui::_PropertyBase& source, const String& name, const Variant& oldValue, const Variant& newValue, bool isChangedEvent) +{ + ClearLastResult(); + + if (!__pPropertyChangeEventListener) + { + return true; + } + + if (isChangedEvent) + { + __pPropertyChangeEventListener->OnPropertyChanged(const_cast<_PropertyBase&>(source), name, oldValue, newValue); + } + else + { + __pPropertyChangeEventListener->OnPropertyChanging(const_cast<_PropertyBase&>(source), name, oldValue, newValue); + } + + return true; +} + +} } //Tizen::Ui + diff --git a/src/ui/FUi_PropertyUtils.cpp b/src/ui/FUi_PropertyUtils.cpp new file mode 100644 index 0000000..762229c --- /dev/null +++ b/src/ui/FUi_PropertyUtils.cpp @@ -0,0 +1,172 @@ +// +// 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_PropertyUtils.cpp + * @brief This is the implementation file for _PropertyUtils class. + */ + +#include +#include +#include +#include "FUi_PropertyUtils.h" + +using namespace Tizen::Base; + +namespace Tizen { namespace Ui +{ + +/** + * @class _StringComparer + * @brief We implemented new custom string-comparer for performance. + * @since 2.1 + * + */ + +// _StringComparer class +_StringComparer::_StringComparer(void) +{ + +} + +_StringComparer::~_StringComparer(void) +{ + +} + +result +_StringComparer::Compare(const Object& obj1, const Object& obj2, int& cmp) const +{ + const String* pString1 = static_cast(&obj1); + const String* pString2 = static_cast(&obj2); + + // dirty optimization. HaspMap do not care of the sign. It is interested only in zero or not. + if (*pString1 == *pString2) + { + cmp = 0; + } + else + { + cmp = -1; + } + + return E_SUCCESS; +} + +// _StringHashProvider class +_StringHashProvider::_StringHashProvider(void) +{ + +} + +_StringHashProvider::~_StringHashProvider(void) +{ + +} + +int +_StringHashProvider::GetHashCode(const Object& obj) const +{ + return obj.GetHashCode(); +} + +// _PropertyUtils class +_PropertyUtils::_PropertyUtils(void) + : __pStringComparer(null) + , __pStringHashProvider(null) +{ + +} + +_PropertyUtils::~_PropertyUtils(void) +{ + if (__pStringComparer) + { + delete __pStringComparer; + } + + if (__pStringHashProvider) + { + delete __pStringHashProvider; + } +} + +_PropertyUtils* +_PropertyUtils::GetInstance(void) +{ +#if 0 + static _PropertyUtils* pPropertyUtils = null; + result r = E_SUCCESS; + if (pPropertyUtils == null) + { + pPropertyUtils = new (std::nothrow) _PropertyUtils; + SysTryReturn(NID_UI, pPropertyUtils != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create pPropertyUtils."); + + r = pPropertyUtils->Construct(); + SysTryReturn(NID_UI, r == E_SUCCESS, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to construct pPropertyUtils."); + } + + return pPropertyUtils; +#else + static _PropertyUtils propertyUtils; + static bool initialized = false; + + if (!initialized) + { + result r = propertyUtils.Construct(); + SysTryReturn(NID_UI, r == E_SUCCESS, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to construct pPropertyUtils."); + + initialized = true; + } + + return &propertyUtils; +#endif +} + +const _StringComparer* +_PropertyUtils::GetStringComparer() const +{ + return __pStringComparer; +} + +const _StringHashProvider* +_PropertyUtils::GetStringHashProvider() const +{ + return __pStringHashProvider; +} + +result +_PropertyUtils::Construct(void) +{ + result r = E_SUCCESS; + + if (!__pStringComparer) + { + __pStringComparer = new (std::nothrow) _StringComparer; + } + SysTryReturn(NID_UI, __pStringComparer != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _StringComparer."); + + if (!__pStringHashProvider) + { + __pStringHashProvider = new (std::nothrow) _StringHashProvider; + } + SysTryReturn(NID_UI, __pStringHashProvider != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _StringHashProvider."); + + return r; +} + +} } //Tizen::Ui + diff --git a/src/ui/FUi_PublicOrientationEvent.cpp b/src/ui/FUi_PublicOrientationEvent.cpp new file mode 100644 index 0000000..216da0c --- /dev/null +++ b/src/ui/FUi_PublicOrientationEvent.cpp @@ -0,0 +1,153 @@ +// +// 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_PublicOrientationEvent.cpp + * @brief This is the implementation for the _PublicOrientationEvent class. + * @version 1.0 + */ + +#include +#include +#include +#include "FUi_PublicOrientationEvent.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; + +namespace Tizen { namespace Ui +{ +/** + * @class _PublicOrientationEventArg + * @brief This class is used as the argument to orientation event listener. + * + * This class is used as the argument to orientation event listener. When an orientation event is generated + * (such as when a button is pressed) the OrientationEvent calls OrientationEventListener's OnOrientationPerformed + * with an instance of this class as an argument. + * + * From this class, one can find out, the (event) source object and the orientation ID. + */ +class _PublicOrientationEventArg + : public Tizen::Base::Runtime::IEventArg + , public Tizen::Base::Object +{ +public: + _PublicOrientationEventArg(const Control& source, OrientationStatus orientationStatus); + + virtual ~_PublicOrientationEventArg(void); + + const Control* GetSource(void) const; + int GetOrientationStatus(void) const; + +private: + _PublicOrientationEventArg(const _PublicOrientationEventArg& rhs); + _PublicOrientationEventArg& operator =(const _PublicOrientationEventArg& rhs); + +private: + Control* __pSource; + OrientationStatus __orientationStatus; +}; // _PublicOrientationEventArg + +_PublicOrientationEventArg::_PublicOrientationEventArg(const Control& source, OrientationStatus orientationStatus) + : __pSource(const_cast (&source)) + , __orientationStatus(orientationStatus) +{ +} + +_PublicOrientationEventArg::~_PublicOrientationEventArg(void) +{ +} + +const Control* +_PublicOrientationEventArg::GetSource(void) const +{ + return __pSource; +} + +int +_PublicOrientationEventArg::GetOrientationStatus(void) const +{ + return __orientationStatus; +} + +_PublicOrientationEvent* +_PublicOrientationEvent::CreateInstanceN(const Control& source) +{ + _PublicOrientationEvent* pPublicOrientationEvent = new (std::nothrow) _PublicOrientationEvent(source); + SysTryReturn(NID_UI, pPublicOrientationEvent, 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 pPublicOrientationEvent; + +CATCH: + delete pPublicOrientationEvent; + return null; +} + +IEventArg* +_PublicOrientationEvent::CreateOrientationEventArgN(const Control& source, OrientationStatus orientationStatus) +{ + _PublicOrientationEventArg* pEventArg = new (std::nothrow) _PublicOrientationEventArg(source, orientationStatus); + SysTryReturn(NID_UI, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + + SetLastResult(E_SUCCESS); + + return pEventArg; +} + +_PublicOrientationEvent::~_PublicOrientationEvent(void) +{ +} + +const Control* +_PublicOrientationEvent::GetSource(void) const +{ + return __pSource; +} + +void +_PublicOrientationEvent::FireImpl(IEventListener& listener, const IEventArg& arg) +{ + IOrientationEventListener* pEventListener = dynamic_cast (&listener); + SysTryReturnVoidResult(NID_UI, pEventListener, E_INVALID_ARG, "[E_INVALID_ARG] A specified input parameter is invalid."); + + const _PublicOrientationEventArg* pArg = dynamic_cast (&arg); + SysTryReturnVoidResult(NID_UI, pArg, E_INVALID_ARG, "[E_INVALID_ARG] A specified input parameter is invalid."); + + SysLog(NID_UI, "[WM ROTATION] Fire the public orientation event with %d -> 0x%x", pArg->GetOrientationStatus(), __pSource); + + pEventListener->OnOrientationChanged(*__pSource, (OrientationStatus)(pArg->GetOrientationStatus())); + + SetLastResult(E_SUCCESS); +} + +_PublicOrientationEvent::_PublicOrientationEvent(const Control& source) + : __pSource(null) +{ + result r = _Event::Initialize(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pSource = &source; + + SetLastResult(E_SUCCESS); +} + +}} // Tizen::Ui diff --git a/src/ui/FUi_RelativeLayoutImpl.cpp b/src/ui/FUi_RelativeLayoutImpl.cpp new file mode 100644 index 0000000..6500e2e --- /dev/null +++ b/src/ui/FUi_RelativeLayoutImpl.cpp @@ -0,0 +1,314 @@ +// +// 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_RelativeLayoutImpl.cpp + * @brief This is the implementation file for _RelativeLayoutImpl class. + * + * This file contains the implementation of _RelativeLayoutImpl class. + */ + +#include "FUi_RelativeLayoutImpl.h" + +namespace Tizen { namespace Ui +{ + +namespace +{ + +_Layout::RelativeLayoutEdge +ConvertEnum(CenterAlignmentType var) +{ + switch (var) + { + case CENTER_ALIGN_HORIZONTAL: + return _Layout::EDGE_HCENTER; + + case CENTER_ALIGN_VERTICAL: + return _Layout::EDGE_VCENTER; + + default: + return _Layout::EDGE_NONE; + } +} + +_Layout::RelativeLayoutEdge +ConvertEnum(RectangleEdgeType var) +{ + switch (var) + { + case RECT_EDGE_LEFT: + return _Layout::EDGE_LEFT; + + case RECT_EDGE_RIGHT: + return _Layout::EDGE_RIGHT; + + case RECT_EDGE_TOP: + return _Layout::EDGE_TOP; + + case RECT_EDGE_BOTTOM: + return _Layout::EDGE_BOTTOM; + + default: + return _Layout::EDGE_NONE; + } +} + +} + +// _RelativelayoutImpl implementation +_RelativeLayoutImpl::_RelativeLayoutImpl(RelativeLayout* pPublicLayout, _Layout::RelativeLayout* pCoreLayout) + : _LayoutImpl(pPublicLayout, pCoreLayout) +{ +} + +_RelativeLayoutImpl::~_RelativeLayoutImpl(void) +{ +} + +Tizen::Ui::LayoutType +_RelativeLayoutImpl::GetLayoutType(void) const +{ + return LAYOUT_RELATIVE; +} + +_RelativeLayoutImpl* +_RelativeLayoutImpl::CreateRelativeLayoutImplN(RelativeLayout* pPublicLayout) +{ + ClearLastResult(); + + _Layout::RelativeLayout* pCoreLayout = null; + _RelativeLayoutImpl* pImplLayout = null; + result r = E_SUCCESS; + + pCoreLayout = _Layout::RelativeLayout::CreateRelativeLayoutN(); + r = GetLastResult(); + SysTryReturn(NID_UI, pCoreLayout != null, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + pImplLayout = new (std::nothrow) _RelativeLayoutImpl(pPublicLayout, pCoreLayout); + r = CheckConstruction(pCoreLayout, pImplLayout); + SysTryReturn(NID_UI, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + return pImplLayout; +} + +const char* +_RelativeLayoutImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::RelativeLayout"; +} + +const RelativeLayout& +_RelativeLayoutImpl::GetPublic(void) const +{ + return static_cast (_LayoutImpl::GetPublic()); +} + +RelativeLayout& +_RelativeLayoutImpl::GetPublic(void) +{ + return static_cast (_LayoutImpl::GetPublic()); +} + +const _Layout::RelativeLayout& +_RelativeLayoutImpl::GetCore(void) const +{ + return static_cast (_LayoutImpl::GetCore()); +} + +_Layout::RelativeLayout& +_RelativeLayoutImpl::GetCore(void) +{ + return static_cast <_Layout::RelativeLayout&>(_LayoutImpl::GetCore()); +} + +const _RelativeLayoutImpl* +_RelativeLayoutImpl::GetInstance(const RelativeLayout& layout) +{ + return static_cast (_LayoutImpl::GetInstance(layout)); +} + +_RelativeLayoutImpl* +_RelativeLayoutImpl::GetInstance(RelativeLayout& layout) +{ + return static_cast <_RelativeLayoutImpl*>(_LayoutImpl::GetInstance(layout)); +} + +result +_RelativeLayoutImpl::SetCenterAligned(_ControlImpl& control, CenterAlignmentType alignment) +{ + ClearLastResult(); + + _Layout::LayoutItem& layoutItem = control.GetLayoutContainer(); + + _Layout::RelativeLayoutEdge edge = ConvertEnum(alignment); + SysTryReturn(NID_UI, edge != _Layout::EDGE_NONE, E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] The rectangle edge is invalid argument."); + + result r = GetCore().SetRelation(layoutItem, edge); + + return r; +} + +result +_RelativeLayoutImpl::SetRelation(_ControlImpl& childControl, _ControlImpl& targetControl, RectangleEdgeRelation edgeRelation) +{ + ClearLastResult(); + + _Layout::LayoutItem& childItem = childControl.GetLayoutContainer(); + _Layout::LayoutItem& targetItem = targetControl.GetLayoutContainer(); + + _Layout::RelativeLayoutEdge sourceEdge; + _Layout::RelativeLayoutEdge targetEdge; + switch (edgeRelation) + { + case RECT_EDGE_RELATION_LEFT_TO_LEFT: + sourceEdge = _Layout::EDGE_LEFT; + targetEdge = _Layout::EDGE_LEFT; + break; + + case RECT_EDGE_RELATION_LEFT_TO_RIGHT: + sourceEdge = _Layout::EDGE_LEFT; + targetEdge = _Layout::EDGE_RIGHT; + break; + + case RECT_EDGE_RELATION_RIGHT_TO_RIGHT: + sourceEdge = _Layout::EDGE_RIGHT; + targetEdge = _Layout::EDGE_RIGHT; + break; + + case RECT_EDGE_RELATION_RIGHT_TO_LEFT: + sourceEdge = _Layout::EDGE_RIGHT; + targetEdge = _Layout::EDGE_LEFT; + break; + + case RECT_EDGE_RELATION_TOP_TO_TOP: + sourceEdge = _Layout::EDGE_TOP; + targetEdge = _Layout::EDGE_TOP; + break; + + case RECT_EDGE_RELATION_TOP_TO_BOTTOM: + sourceEdge = _Layout::EDGE_TOP; + targetEdge = _Layout::EDGE_BOTTOM; + break; + + case RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM: + sourceEdge = _Layout::EDGE_BOTTOM; + targetEdge = _Layout::EDGE_BOTTOM; + break; + + case RECT_EDGE_RELATION_BOTTOM_TO_TOP: + sourceEdge = _Layout::EDGE_BOTTOM; + targetEdge = _Layout::EDGE_TOP; + break; + + default: + SysTryReturn(NID_UI, false, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The rectangle edge is invalid argument."); + break; + } + + return GetCore().SetRelation(childItem, sourceEdge, &targetItem, targetEdge); +} + +result +_RelativeLayoutImpl::ResetCenterAligned(_ControlImpl& control, CenterAlignmentType alignment) +{ + ClearLastResult(); + + _Layout::LayoutItem& layoutItem = control.GetLayoutContainer(); + + _Layout::RelativeLayoutEdge edge = ConvertEnum(alignment); + SysTryReturn(NID_UI, edge != _Layout::EDGE_NONE, E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] The rectangle edge is invalid argument."); + + result r = GetCore().UnsetRelation(layoutItem, edge); + + return r; +} + +result +_RelativeLayoutImpl::ResetRelation(_ControlImpl& control, RectangleEdgeType edgeType) +{ + ClearLastResult(); + + _Layout::LayoutItem& layoutItem = control.GetLayoutContainer(); + + _Layout::RelativeLayoutEdge edge = ConvertEnum(edgeType); + SysTryReturn(NID_UI, edge != _Layout::EDGE_NONE, E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] The rectangle edge is invalid argument."); + + result r = GetCore().UnsetRelation(layoutItem, edge); + + return r; +} + +result +_RelativeLayoutImpl::SetHeight(_ControlImpl& control, float height) +{ + ClearLastResult(); + + result r = SetVerticalFitPolicy(control, FIT_POLICY_FIXED); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _Layout::LayoutRect rect; + r = GetItemBaseRect(control, rect); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + rect.h = height; + r = SetItemBaseRect(control, rect); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +_RelativeLayoutImpl::SetWidth(_ControlImpl& control, float width) +{ + ClearLastResult(); + + result r = SetHorizontalFitPolicy(control, FIT_POLICY_FIXED); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _Layout::LayoutRect rect; + r = GetItemBaseRect(control, rect); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + rect.w = width; + r = SetItemBaseRect(control, rect); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +_RelativeLayoutImpl::SetItemMargin(const _ControlImpl& item, float left, float right, float top, float bottom) +{ + return _LayoutImpl::SetMargin(item, left, right, top, bottom); +} + +result +_RelativeLayoutImpl::SetItemHorizontalFitPolicy(const _ControlImpl& item, const FitPolicy policy) +{ + return _LayoutImpl::SetHorizontalFitPolicy(item, policy); +} + +result +_RelativeLayoutImpl::SetItemVerticalFitPolicy(const _ControlImpl& item, FitPolicy policy) +{ + return _LayoutImpl::SetVerticalFitPolicy(item, policy); +} + +}} // Tizen::Ui diff --git a/src/ui/FUi_RelativeLayoutImpl.h b/src/ui/FUi_RelativeLayoutImpl.h new file mode 100644 index 0000000..0fc505f --- /dev/null +++ b/src/ui/FUi_RelativeLayoutImpl.h @@ -0,0 +1,256 @@ +// +// 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_RelativeLayoutImpl.h + * @brief This is the header file for _RelativeLayoutImpl class. + * + * This header file contains the declaration of _RelativeLayoutImpl class. + */ + +#ifndef _FUI_INTERNAL_RELATIVE_LAYOUT_IMPL_H +#define _FUI_INTERNAL_RELATIVE_LAYOUT_IMPL_H + +#include +#include "FUi_LayoutImpl.h" +#include "FUi_LayoutRelativeLayout.h" + +namespace Tizen { namespace Ui +{ + +class RelativeLayout; + +class _RelativeLayoutImpl + : public _LayoutImpl +{ +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~_RelativeLayoutImpl(void); + + /** + * Creates the instance of _RelativeLayoutImpl. + * + * @since 2.0 + * @return The instance of _RelativeLayoutImpl. + * @param[in] pPublicLayout The public class of relative layout. + * @exception E_SUCCESS The method was successful. + * @exception E_OUT_OF_MEMORY Insufficient memory. + */ + static _RelativeLayoutImpl* CreateRelativeLayoutImplN(RelativeLayout* pPublicLayout); + + /** + * Gets the name of public class. + * + * @since 2.0 + * @return The name of public class. + */ + virtual const char* GetPublicClassName(void) const; + + /** + * Gets the public class. + * + * @since 2.0 + * @return The public class. + */ + virtual const RelativeLayout& GetPublic(void) const; + + /** + * Gets the public class. + * + * @since 2.0 + * @return The public class. + */ + virtual RelativeLayout& GetPublic(void); + + /** + * Gets the core class. + * + * @since 2.0 + * @return The core class. + */ + virtual const _Layout::RelativeLayout& GetCore(void) const; + + /** + * Gets the core class. + * + * @since 2.0 + * @return The core class. + */ + virtual _Layout::RelativeLayout& GetCore(void); + + /** + * Gets the _RelativeLayoutImpl instance for the RelativeLayout. + * + * @since 2.0 + * @return The _RelativeLayoutImpl instance. + * @param[in] pLayout The RelativeLayout instance. + */ + static const _RelativeLayoutImpl* GetInstance(const RelativeLayout& layout); + + /** + * Gets the _RelativeLayoutImpl instance for the RelativeLayout. + * + * @since 2.0 + * @return The _RelativeLayoutImpl instance. + * @param[in] pLayout The RelativeLayout instance. + */ + static _RelativeLayoutImpl* GetInstance(RelativeLayout& layout); + + /** + * Sets the specified control at the center of the parent control. + * + * @since 2.0 + * @return An error code + * @param[in] control The control to be center aligned + * @param[in] alignment The center alignment for a control either vertically or horizontally + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_SYSTEM A system error occurred. + */ + result SetCenterAligned(_ControlImpl& control, CenterAlignmentType alignment); + + /** + * Sets the relation of the specified child control for the edge with other control. + * + * @since 2.0 + * @return An error code + * @param[in] childControl The control for which the relation is set + * @param[in] targetControl The target control @n + * It should be a parent or sibling. + * @param[in] edgeRelation The edge of the specified control to be aligned with the edge of the target control + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_SYSTEM A system error occurred. + */ + result SetRelation(_ControlImpl& childControl, _ControlImpl& targetControl, RectangleEdgeRelation edgeRelation); + + /** + * Resets the center position of the specified control. + * + * @since 2.0 + * @return An error code + * @param[in] childControl The control to be center aligned + * @param[in] alignment The center alignment for a control either vertically or horizontally + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_SYSTEM A system error occurred. + */ + result ResetCenterAligned(_ControlImpl& control, CenterAlignmentType alignment); + + /** + * Resets the relation of the specified control for the vertical edge. + * + * @since 2.0 + * @return An error code + * @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 was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_SYSTEM A system error occurred. + */ + result ResetRelation(_ControlImpl& control, RectangleEdgeType edgeType); + + /* + * Sets the height of the specified control to the fixed size. + * + * @since 2.1 + * @return An error code + * @param[in] childControl The control for which the height is set + * @param[in] height The value of the height + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + result SetHeight(_ControlImpl& control, float height); + + /* + * Sets the width of the specified control to the fixed size. + * + * @since 2.1 + * @return An error code + * @param[in] childControl The control for which the width is set + * @param[in] width The value of the width + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + result SetWidth(_ControlImpl& control, float width); + + /* + * Sets the margins of the specified control. + * + * @since 2.1 + * @return An error code + * @param[in] item The control for which the margins are set + * @param[in] left The left margin + * @param[in] right The right margin + * @param[in] top The top margin + * @param[in] bottom The bottom margin + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + result SetItemMargin(const _ControlImpl& item, float left, float right, float top, float bottom); + + /** + * Sets the width of the specified control as per the fitting policy. + * + * @since 2.0 + * @return An error code + * @param[in] item The control for which the width is set + * @param[in] policy The fitting policy for the width + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + result SetItemHorizontalFitPolicy(const _ControlImpl& item, const FitPolicy policy); + + /** + * Sets the height of the specified control as per the fitting policy. + * + * @since 2.0 + * @return An error code + * @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 was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + result SetItemVerticalFitPolicy(const _ControlImpl& item, const FitPolicy policy); + + /** + * Gets the type of the layout. + * + * @since 2.0 + * @return The layout type + */ + virtual LayoutType GetLayoutType(void) const; + +protected: + /** + * This is the default constructor for this class. + * + * @since 2.0 + */ + _RelativeLayoutImpl(RelativeLayout* pPublicLayout, _Layout::RelativeLayout* pCoreLayout); +}; // _RelativeLayoutImpl + +}} // Tizen::Ui + +#endif // _FUI_INTERNAL_RELATIVE_LAYOUT_IMPL_H diff --git a/src/ui/FUi_ResourceManager.cpp b/src/ui/FUi_ResourceManager.cpp new file mode 100644 index 0000000..912a194 --- /dev/null +++ b/src/ui/FUi_ResourceManager.cpp @@ -0,0 +1,2809 @@ +// +// 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. +// +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "FUi_Control.h" +#include "FUi_ControlManager.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_ResourceManager.h" +#include "FUi_ResourceStringLoader.h" +#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; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Ui::_Resource; + +namespace +{ +const int DEFAULT_SCREEN_WIDTH = 720; +const int DEFAULT_SCREEN_HEIGHT = 1280; + +const int DPI_FOR_XHIGH = 290; +const int DPI_FOR_HIGH = 200; +const int DPI_FOR_MIDDLE = 150; +const int DPI_FOR_LOW = 0; + +template class ResourceFallbackItemComparer + : public IComparerT +{ +public: + ResourceFallbackItemComparer(void) {} + virtual ~ResourceFallbackItemComparer(void) {} + virtual result Compare(const T& obj1, const T& obj2, int& cmp) const + { + if (obj1->scaleFactor > obj2->scaleFactor) + { + cmp = 1; + return E_SUCCESS; + } + else if (obj1->scaleFactor < obj2->scaleFactor) + { + cmp = -1; + return E_SUCCESS; + } + else + { + cmp = 0; + return E_SUCCESS; + } + } +}; + +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; + switch(format) + { + case BITMAP_PIXEL_FORMAT_RGB565: + out = MEDIA_PIXEL_FORMAT_RGB565LE; + break; + case BITMAP_PIXEL_FORMAT_ARGB8888: + out = MEDIA_PIXEL_FORMAT_BGRA8888; + break; + case BITMAP_PIXEL_FORMAT_R8G8B8A8: + out = MEDIA_PIXEL_FORMAT_RGBA8888; + break; + default: + break; + } + return out; +} + +feedback_pattern_e Convert_ResourceFeedbackPatternTofeedback_pattern_e(Tizen::Ui::_ResourceFeedbackPattern pattern) +{ + feedback_pattern_e outPattern = FEEDBACK_PATTERN_TAP; + switch (pattern) + { + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_TAP: + outPattern = FEEDBACK_PATTERN_TAP; + break; + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_SIP: + outPattern = FEEDBACK_PATTERN_SIP; + break; + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_SIP_BACKSPACE: + outPattern = FEEDBACK_PATTERN_SIP_BACKSPACE; + break; + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_MAX_CHARACTER: + outPattern = FEEDBACK_PATTERN_MAX_CHARACTER; + break; + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_KEY0: + outPattern = FEEDBACK_PATTERN_KEY0; + break; + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_KEY1: + outPattern = FEEDBACK_PATTERN_KEY1; + break; + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_KEY2: + outPattern = FEEDBACK_PATTERN_KEY2; + break; + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_KEY3: + outPattern = FEEDBACK_PATTERN_KEY3; + break; + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_KEY4: + outPattern = FEEDBACK_PATTERN_KEY4; + break; + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_KEY5: + outPattern = FEEDBACK_PATTERN_KEY5; + break; + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_KEY6: + outPattern = FEEDBACK_PATTERN_KEY6; + break; + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_KEY7: + outPattern = FEEDBACK_PATTERN_KEY7; + break; + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_KEY8: + outPattern = FEEDBACK_PATTERN_KEY8; + break; + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_KEY9: + outPattern = FEEDBACK_PATTERN_KEY9; + break; + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_KEY_STAR: + outPattern = FEEDBACK_PATTERN_KEY_STAR; + break; + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_KEY_SHARP: + outPattern = FEEDBACK_PATTERN_KEY_SHARP; + break; + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_HOLD: + outPattern = FEEDBACK_PATTERN_HOLD; + break; + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_MULTI_TAP: + outPattern = FEEDBACK_PATTERN_MULTI_TAP; + break; + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_HW_TAP: + outPattern = FEEDBACK_PATTERN_HW_TAP; + break; + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_HW_HOLD: + outPattern = FEEDBACK_PATTERN_HW_HOLD; + break; + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_MESSAGE: + outPattern = FEEDBACK_PATTERN_MESSAGE; + break; + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_MESSAGE_ON_CALL: + outPattern = FEEDBACK_PATTERN_MESSAGE_ON_CALL; + break; + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_EMAIL: + outPattern = FEEDBACK_PATTERN_EMAIL; + break; + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_EMAIL_ON_CALL: + outPattern = FEEDBACK_PATTERN_EMAIL_ON_CALL; + break; + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_WAKEUP: + outPattern = FEEDBACK_PATTERN_WAKEUP; + break; + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_WAKEUP_ON_CALL: + outPattern = FEEDBACK_PATTERN_WAKEUP_ON_CALL; + break; + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_SCHEDULE: + outPattern = FEEDBACK_PATTERN_SCHEDULE; + break; + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_SCHEDULE_ON_CALL: + outPattern = FEEDBACK_PATTERN_SCHEDULE_ON_CALL; + break; + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_TIMER: + outPattern = FEEDBACK_PATTERN_TIMER; + break; + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_TIMER_ON_CALL: + outPattern = FEEDBACK_PATTERN_TIMER_ON_CALL; + break; + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_GENERAL: + outPattern = FEEDBACK_PATTERN_GENERAL; + break; + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_GENERAL_ON_CALL: + outPattern = FEEDBACK_PATTERN_GENERAL_ON_CALL; + break; + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_POWERON: + outPattern = FEEDBACK_PATTERN_POWERON; + break; + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_POWEROFF: + outPattern = FEEDBACK_PATTERN_POWEROFF; + break; + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_CHARGERCONN: + outPattern = FEEDBACK_PATTERN_CHARGERCONN; + break; + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_CHARGERCONN_ON_CALL: + outPattern = FEEDBACK_PATTERN_CHARGERCONN_ON_CALL; + break; + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_FULLCHARGED: + outPattern = FEEDBACK_PATTERN_FULLCHARGED; + break; + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_FULLCHARGED_ON_CALL: + outPattern = FEEDBACK_PATTERN_FULLCHARGED_ON_CALL; + break; + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_LOWBATT: + outPattern = FEEDBACK_PATTERN_LOWBATT; + break; + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_LOWBATT_ON_CALL: + outPattern = FEEDBACK_PATTERN_LOWBATT_ON_CALL; + break; + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_LOCK: + outPattern = FEEDBACK_PATTERN_LOCK; + break; + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_UNLOCK: + outPattern = FEEDBACK_PATTERN_UNLOCK; + break; + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_CALLCONNECT: + outPattern = FEEDBACK_PATTERN_CALLCONNECT; + break; + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_DISCALLCONNECT: + outPattern = FEEDBACK_PATTERN_DISCALLCONNECT; + break; + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_MINUTEMINDER: + outPattern = FEEDBACK_PATTERN_MINUTEMINDER; + break; + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_VIBRATION: + outPattern = FEEDBACK_PATTERN_VIBRATION; + break; + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_SHUTTER: + outPattern = FEEDBACK_PATTERN_SHUTTER; + break; + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_LIST_REORDER: + outPattern = FEEDBACK_PATTERN_LIST_REORDER; + break; + case Tizen::Ui::_RESOURCE_FEEDBACK_PATTERN_SLIDER_SWEEP: + outPattern = FEEDBACK_PATTERN_SLIDER_SWEEP; + break; + default: + break; + } + return outPattern; +} + +extern "C" +{ + __attribute__((constructor)) void _OSP_EXPORT_ _ResourceManager_PreInitialize(void) + { + Tizen::Ui::_ResourceManager::PreInitialize(); + } +} +} +namespace Tizen { namespace Graphics +{ +result +_CreateCoordinateTransformer(_ICoordinateSystemTransformer*& pTransformer, int srcResolution, _BaseScreenSize srcBaseScreenSize, Dimension destResolution, _BaseScreenSize destBaseScreenSize); +}} + +namespace Tizen { namespace Ui +{ + +int _SCREEN_HEIGHT_ = 0; + +Color _GetDefaultBackgroundColor(void) +{ + Color color; + GET_COLOR_CONFIG(BASIC::background, color); + return color; +} +Color _GetDefaultForegroundColor(void) +{ + Color color; + GET_COLOR_CONFIG(BASIC::foreground, color); + return color; +} + +_ResourceManager* pRsrcMgr = null; + +_ResourceManager* +_ResourceManager::GetInstance(void) +{ + if(unlikely(pRsrcMgr == null)) + { + PreInitialize(); + } + if(unlikely(!(pRsrcMgr->__postInitialize))) + { + pRsrcMgr->PostInitialize(); + } + return pRsrcMgr; +} + +void +_ResourceManager::CreateInstance(void) +{ + static _ResourceConfigInitiator initiator; + static _ResourceManager pManager; + pRsrcMgr = &pManager; +} + +_ResourceManager::_ResourceManager(void) + : __pStringLoader(null) + , __pParser(null) + , __pTransformer(null) + , __appBasePortraitMode("") + , __appBaseLandscapeMode("") + , __targetPortraitMode("") + , __targetLandscapeMode("") + , __defaultPortraitMode(L"720x1280") + , __defaultLandscapeMode(L"1280x720") + , __systemTheme(L"") + , __userTheme(L"") + , __appliedUserTheme(false) + , __initializeFeedback(false) + , __preInitialize(false) + , __postInitialize(false) + , __appBaseWidth(-1) + , __appBaseHeight(-1) + , __targetWidth(-1) + , __targetHeight(-1) + , __deviceDPI(-1) + , __feedbackStatus(_RESOURCE_FEEDBACK_STATUS_INIT) + , __feedbackAcquireCount(0) + , __pFallbackList(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; + + 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"); + + __targetPortraitMode.Append(__targetWidth); + __targetPortraitMode.Append(L"x"); + __targetPortraitMode.Append(__targetHeight); + + __targetLandscapeMode.Append(__targetHeight); + __targetLandscapeMode.Append(L"x"); + __targetLandscapeMode.Append(__targetWidth); + ClearLastResult(); +} + +void +_ResourceManager::PreInitialize(void) +{ + static pthread_once_t onceBlock = PTHREAD_ONCE_INIT; + if (pRsrcMgr == null) + { + pthread_once(&onceBlock, CreateInstance); + } +} + +void +_ResourceManager::PostInitialize(void) +{ + int appLogicalResolution = _CoordinateSystem::GetInstance()->GetLogicalResolutionInt(); + int appBaseWidth = 0; + int appBaseHeight = 0; + result r = E_FAILURE; + switch(appLogicalResolution) + { + case 240: + appBaseWidth = 240; + appBaseHeight = 400; + break; + case 320: + appBaseWidth = 320; + appBaseHeight = 480; + break; + case 480: + appBaseWidth = 480; + appBaseHeight = 800; + break; + case 720: + appBaseWidth = 720; + appBaseHeight = 1280; + break; + default: + appBaseWidth = __targetWidth; + appBaseHeight = __targetHeight; + break; + } + __appBaseWidth = appBaseWidth; + __appBaseHeight = appBaseHeight; + + __appBasePortraitMode.Append(appBaseWidth); + __appBasePortraitMode.Append(L"x"); + __appBasePortraitMode.Append(appBaseHeight); + + __appBaseLandscapeMode.Append(appBaseHeight); + __appBaseLandscapeMode.Append(L"x"); + __appBaseLandscapeMode.Append(appBaseWidth); + _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); + __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT]->SetResolution(__appBasePortraitMode); + SelectConfigTable(); + if (__userTheme.GetLength() > 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])); + } + } + _CanvasImpl::SetThemeInfoCallback(_GetDefaultForegroundColor, _GetDefaultBackgroundColor); + __postInitialize = true; + DoPostInitialization(); + ClearLastResult(); +} + +void +_ResourceManager::SelectConfigTable(void) +{ + __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT]->SetPalette(__systemTheme); +} + +bool +_ResourceManager::InitializeTheme(MapContainer& mapContainer) +{ + bool r = true; + String themeFile(L""); + mapContainer.CreateMap(RESOURCE_TYPE_IMAGE); + mapContainer.CreateMap(RESOURCE_TYPE_COLOR); + mapContainer.CreateMap(RESOURCE_TYPE_ANIMATION); + 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, bool preInit) +{ + _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 + { + _SCREEN_HEIGHT_ = __logicalHeight; + } + + SysLog(NID_UI, "_SCREEN_HEIGHT_ : %d, resolution : %ls", _SCREEN_HEIGHT_, resolution.GetPointer()); + int count = ConfigLoader::GetInstance()->GetInitFuncCount(); + for (int i = 0; i < count; i++) + { + _Init_Func func = null; + ConfigLoader::GetInstance()->GetInitFunc(i, func); + if (func) + { + func(mapContainer, resolution, preInit); + } + } +} + +void +_ResourceManager::DoPostInitialization(void) +{ + if (_AppInfo::IsOspCompat()) + { + SysLog(NID_UI, "Compatibility symbols are loaded."); + SetSystemColor(); + } +} + +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]) + { + pContainer = __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_LANDSCAPE]; + } + else + { + pContainer = new (std::nothrow) MapContainer(); + SysTryReturn(NID_UI, pContainer, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + pContainer->SetResolution(__appBaseLandscapeMode); + pContainer->CreateMap(RESOURCE_TYPE_SHAPE); + pContainer->CreateMap(RESOURCE_TYPE_DIMENSION); + pContainer->CreateMap(RESOURCE_TYPE_FIXED_VALUE); + LoadConfig(__appBaseLandscapeMode, *pContainer, __appBaseWidth, __appBaseHeight, false); + __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_LANDSCAPE] = pContainer; + } + break; + case MAP_CONTAINER_TYPE_DEFAULT_PORTRAIT: + if (__pMapContainer[MAP_CONTAINER_TYPE_DEFAULT_PORTRAIT]) + { + pContainer = __pMapContainer[MAP_CONTAINER_TYPE_DEFAULT_PORTRAIT]; + } + else + { + if(__defaultPortraitMode == __appBasePortraitMode) + { + __pMapContainer[MAP_CONTAINER_TYPE_DEFAULT_PORTRAIT] = __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT]; + __pMapContainer[MAP_CONTAINER_TYPE_DEFAULT_LANDSCAPE] = __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_LANDSCAPE]; + pContainer = __pMapContainer[MAP_CONTAINER_TYPE_DEFAULT_PORTRAIT]; + } + else + { + pContainer = new (std::nothrow) MapContainer(); + SysTryReturn(NID_UI, pContainer, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + pContainer->SetResolution(__defaultPortraitMode); + 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, false); + __pMapContainer[MAP_CONTAINER_TYPE_DEFAULT_PORTRAIT] = pContainer; + } + } + break; + case MAP_CONTAINER_TYPE_DEFAULT_LANDSCAPE: + if (__pMapContainer[MAP_CONTAINER_TYPE_DEFAULT_LANDSCAPE]) + { + pContainer = __pMapContainer[MAP_CONTAINER_TYPE_DEFAULT_LANDSCAPE]; + } + else + { + if(__defaultPortraitMode == __appBasePortraitMode) + { + __pMapContainer[MAP_CONTAINER_TYPE_DEFAULT_PORTRAIT] = __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT]; + __pMapContainer[MAP_CONTAINER_TYPE_DEFAULT_LANDSCAPE] = __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_LANDSCAPE]; + pContainer = __pMapContainer[MAP_CONTAINER_TYPE_DEFAULT_LANDSCAPE]; + } + else + { + pContainer = new (std::nothrow) MapContainer(); + SysTryReturn(NID_UI, pContainer, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + pContainer->SetResolution(__defaultLandscapeMode); + 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, false); + __pMapContainer[MAP_CONTAINER_TYPE_DEFAULT_LANDSCAPE] = pContainer; + } + } + break; + default: + break; + } + return pContainer; +} + +_ResourceManager::~_ResourceManager(void) +{ + delete __pStringLoader; + __pStringLoader = null; + delete __pTransformer; + __pTransformer = null; + + if(__pFallbackList) + { + ResourceFallbackItem* pItem = null; + int count = __pFallbackList->GetCount(); + for (int i = 0; i < count; i++) + { + __pFallbackList->GetAt(i, pItem); + delete pItem; + } + __pFallbackList->RemoveAll(); + delete __pFallbackList; + __pFallbackList = null; + } + + bool deleteDefaultMap = true; + if (__pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT] == __pMapContainer[MAP_CONTAINER_TYPE_DEFAULT_PORTRAIT]) + { + deleteDefaultMap = false; + } + delete __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT]; + __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT] = null; + delete __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_LANDSCAPE]; + __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_LANDSCAPE] = null; + + if (deleteDefaultMap) + { + delete __pMapContainer[MAP_CONTAINER_TYPE_DEFAULT_PORTRAIT]; + __pMapContainer[MAP_CONTAINER_TYPE_DEFAULT_PORTRAIT] = null; + delete __pMapContainer[MAP_CONTAINER_TYPE_DEFAULT_LANDSCAPE]; + __pMapContainer[MAP_CONTAINER_TYPE_DEFAULT_LANDSCAPE] = null; + } + delete __pParser; + __pParser = null; + feedback_deinitialize(); +} +void +_ResourceManager::ReloadTheme(Tizen::Base::String& themeName, bool userdefine) +{ + if(userdefine) + { + __userTheme = themeName; + } + else + { + __systemTheme = themeName; + } +} + +result +_ResourceManager::GetBitmapInternalN(const String& fileName, BitmapPixelFormat pixelFormat, _ControlOrientation orientation, bool isCustom, bool replacementColor, const Color& color, Bitmap*& pBitmap) +{ + result r = E_SUCCESS; + Bitmap* pTempBitmap = null; + int foundFolderWidth = 0; + String fullName = FindImagePath(fileName, foundFolderWidth, isCustom); + if(foundFolderWidth == __targetWidth) + { + 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)); + 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 // 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; + 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; + } + else + { + r = E_SYSTEM; + } + if(pTempBitmap != null) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pTempBitmap)) + { + pBitmap = pTempBitmap; + r = E_SUCCESS; + } + else + { + if(replacementColor) + { + Bitmap* pReplacementBitmap = null; + pReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), color); + if(pReplacementBitmap) + { + 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) + { + pBitmap = pTempBitmap; + } + else + { + delete pTempBitmap; + } + } + } + } + } + return r; +CATCH: + delete pTempBitmap; + return r; +} + +result +_ResourceManager::GetBitmapN(int bitmapId, BitmapPixelFormat pixelFormat, _ControlOrientation orientation, bool replacementColor, const Color& color, Bitmap*& pBitmap) +{ + result r = E_SYSTEM; + ResourceItem* pItem = null; + String fileName; + r = __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT]->GetImageMap()->GetValue(bitmapId, pItem); + if (r == E_SUCCESS) + { + fileName = pItem->GetImageName(); + if (fileName.IsEmpty()) + { + r = E_OBJ_NOT_FOUND; + } + else + { + r = GetBitmapInternalN(fileName, pixelFormat, orientation, IsCustomBitmap(bitmapId), replacementColor, color, pBitmap); + } + } + return r; +} + +result +_ResourceManager::GetString(const char* stringId, String& string) +{ + return __pStringLoader->GetString(stringId, string); +} + +result +_ResourceManager::GetColor(int colorId, Color& color) +{ + result r = E_SYSTEM; + ResourceItem* pItem = null; + r = __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT]->GetColorMap()->GetValue(colorId, pItem); + if(r == E_SUCCESS) + { + if(pItem->isInitialized()) + { + color.SetRGB32(pItem->GetColor(), true); + } + else + { + unsigned int value = 0; + ResourceItem* pPaletteItem = null; + const char* key = pItem->GetRawString(); + ResourceKey resourceKey(key); + __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT]->GetPalette()->GetValue(resourceKey, pPaletteItem); + if(pPaletteItem) + { + value = pPaletteItem->GetColor(); + pItem->SetRawDataColor(value); + color.SetRGB32(value, true); + } + else + { + color.SetRGB32(0,true); + } + } + } + return r; +} + +result +_ResourceManager::GetDimension(int dimensionId, _ControlOrientation orientation, Dimension& dimension) +{ + result r = E_SUCCESS; + ResourceItem* pItem = null; + + if (orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + r = GetMapContainer(MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT)->GetDimensionMap()->GetValue(dimensionId, pItem); + if (r != E_SUCCESS) + { + r = GetMapContainer(MAP_CONTAINER_TYPE_APP_BASE_LANDSCAPE)->GetDimensionMap()->GetValue(dimensionId, pItem); + } + } + else + { + r = GetMapContainer(MAP_CONTAINER_TYPE_APP_BASE_LANDSCAPE)->GetDimensionMap()->GetValue(dimensionId, pItem); + if (r != E_SUCCESS) + { + r = GetMapContainer(MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT)->GetDimensionMap()->GetValue(dimensionId, pItem); + } + } + + if (r == E_SUCCESS) + { + dimension.SetSize(pItem->GetDimension().width, pItem->GetDimension().height); + } + else + { + r = GetDefaultShapeWithScaling(dimensionId, orientation, dimension); + } + + return r; +} + +result +_ResourceManager::GetDimension(int dimensionId, _ControlOrientation orientation, Tizen::Graphics::FloatDimension& dimension) +{ + result r = E_SUCCESS; + ResourceItem* pItem = null; + + if (orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + r = GetMapContainer(MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT)->GetDimensionMap()->GetValue(dimensionId, pItem); + if (r != E_SUCCESS) + { + r = GetMapContainer(MAP_CONTAINER_TYPE_APP_BASE_LANDSCAPE)->GetDimensionMap()->GetValue(dimensionId, pItem); + } + } + else + { + r = GetMapContainer(MAP_CONTAINER_TYPE_APP_BASE_LANDSCAPE)->GetDimensionMap()->GetValue(dimensionId, pItem); + if (r != E_SUCCESS) + { + r = GetMapContainer(MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT)->GetDimensionMap()->GetValue(dimensionId, pItem); + } + } + + if (r == E_SUCCESS) + { + dimension = pItem->GetDimension(); + } + else + { + r = GetDefaultShapeWithScaling(dimensionId, orientation, dimension); + } + + return r; +} + +result +_ResourceManager::GetAnimationN(int animationId, ArrayList*& pList) +{ + ResourceAnimationFrameList* pFrameList = null; + AnimationFrame* pFrame = null; + Bitmap* pBitmap = null; + ResourceItem* pItem = null; + + bool isCustom = __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT]->GetAnimationMap()->IsUserThemeItem(animationId); + result r = __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT]->GetAnimationMap()->GetValue(animationId, pItem); + SysTryReturnResult(NID_UI, r == E_SUCCESS, E_SYSTEM,"System error is occured."); + + pFrameList = pItem->GetAnimationFrameList(); + Tizen::Base::Collection::LinkedListT* pAnimationList = static_cast* >(pFrameList->GetAnimationList()); + if (pAnimationList == null) + { + return E_SYSTEM; + } + int count = pAnimationList->GetCount(); + if (count == 0) + { + return E_SYSTEM; + } + pList = new (std::nothrow) ArrayList(); + int i = 0; + for (; i < count ; i++) + { + ResourceAnimationFrame frame; + r = pAnimationList->GetAt(i, frame); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM,"System error is occured."); + r = GetBitmapInternalN(frame.__fileName, BITMAP_PIXEL_FORMAT_ARGB8888, _CONTROL_ORIENTATION_PORTRAIT, isCustom, false, 0, pBitmap); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM,"System error is occured."); + pFrame = new (std::nothrow) AnimationFrame(*pBitmap, frame.__duration); + SysTryCatch(NID_UI, pFrame, , E_SYSTEM,"System error is occured."); + pList->Add(pFrame); + delete pBitmap; + } + return E_SUCCESS; + +CATCH: + delete pBitmap; + delete pFrame; + delete pList; + pList = null; + return E_SYSTEM; +} +result +_ResourceManager::GetShape(int shapeId, _ControlOrientation orientation, int& value) +{ + result r = E_SUCCESS; + ResourceItem* pItem = null; + + if (orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + 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); + } + } + else + { + r = GetMapContainer(MAP_CONTAINER_TYPE_APP_BASE_LANDSCAPE)->GetShapeMap()->GetValue(shapeId, pItem); + if (r != E_SUCCESS) + { + r = GetMapContainer(MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT)->GetShapeMap()->GetValue(shapeId, pItem); + } + } + + if (r == E_SUCCESS) + { + value = (int)pItem->GetFloat(); + } + else + { + r = GetDefaultShapeWithScaling(shapeId, orientation, value); + } + return r; +} + +result +_ResourceManager::GetShape(int shapeId, _ControlOrientation orientation, float& value) +{ + result r = E_SUCCESS; + ResourceItem* pItem = null; + + if (orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + 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); + } + } + else + { + r = GetMapContainer(MAP_CONTAINER_TYPE_APP_BASE_LANDSCAPE)->GetShapeMap()->GetValue(shapeId, pItem); + if (r != E_SUCCESS) + { + r = GetMapContainer(MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT)->GetShapeMap()->GetValue(shapeId, pItem); + } + } + + if (r == E_SUCCESS) + { + value = pItem->GetFloat(); + } + else + { + r = GetDefaultShapeWithScaling(shapeId, orientation, value); + } + + return r; +} + +result +_ResourceManager::GetFixedValue(int fixedValueId, _ControlOrientation orientation, int& value) +{ + result r = E_SUCCESS; + ResourceItem* pItem = null; + + if (orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + r = GetMapContainer(MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT)->GetFixedValueMap()->GetValue(fixedValueId, pItem); + if (r != E_SUCCESS) + { + + r = GetMapContainer(MAP_CONTAINER_TYPE_APP_BASE_LANDSCAPE)->GetFixedValueMap()->GetValue(fixedValueId, pItem); + } + } + else + { + r = GetMapContainer(MAP_CONTAINER_TYPE_APP_BASE_LANDSCAPE)->GetFixedValueMap()->GetValue(fixedValueId, pItem); + if (r != E_SUCCESS) + { + r = GetMapContainer(MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT)->GetFixedValueMap()->GetValue(fixedValueId, pItem); + } + } + + if (r != E_SUCCESS) + { + if (orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + r = GetMapContainer(MAP_CONTAINER_TYPE_DEFAULT_PORTRAIT)->GetFixedValueMap()->GetValue(fixedValueId, pItem); + if (r != E_SUCCESS) + { + r = GetMapContainer(MAP_CONTAINER_TYPE_DEFAULT_LANDSCAPE)->GetFixedValueMap()->GetValue(fixedValueId, pItem); + } + } + else + { + r = GetMapContainer(MAP_CONTAINER_TYPE_DEFAULT_LANDSCAPE)->GetFixedValueMap()->GetValue(fixedValueId, pItem); + if (r != E_SUCCESS) + { + r = GetMapContainer(MAP_CONTAINER_TYPE_DEFAULT_PORTRAIT)->GetFixedValueMap()->GetValue(fixedValueId, pItem); + } + } + } + + if (r == E_SUCCESS) + { + value = (int)(pItem->GetFloat()); + } + + return r; +} + +result +_ResourceManager::GetFixedValue(int fixedValueId, _ControlOrientation orientation, float& value) +{ + result r = E_SUCCESS; + ResourceItem* pItem = null; + + if (orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + r = GetMapContainer(MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT)->GetFixedValueMap()->GetValue(fixedValueId, pItem); + if (r != E_SUCCESS) + { + + r = GetMapContainer(MAP_CONTAINER_TYPE_APP_BASE_LANDSCAPE)->GetFixedValueMap()->GetValue(fixedValueId, pItem); + } + } + else + { + r = GetMapContainer(MAP_CONTAINER_TYPE_APP_BASE_LANDSCAPE)->GetFixedValueMap()->GetValue(fixedValueId, pItem); + if (r != E_SUCCESS) + { + r = GetMapContainer(MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT)->GetFixedValueMap()->GetValue(fixedValueId, pItem); + } + } + + if (r != E_SUCCESS) + { + if (orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + r = GetMapContainer(MAP_CONTAINER_TYPE_DEFAULT_PORTRAIT)->GetFixedValueMap()->GetValue(fixedValueId, pItem); + if (r != E_SUCCESS) + { + r = GetMapContainer(MAP_CONTAINER_TYPE_DEFAULT_LANDSCAPE)->GetFixedValueMap()->GetValue(fixedValueId, pItem); + } + } + else + { + r = GetMapContainer(MAP_CONTAINER_TYPE_DEFAULT_LANDSCAPE)->GetFixedValueMap()->GetValue(fixedValueId, pItem); + if (r != E_SUCCESS) + { + r = GetMapContainer(MAP_CONTAINER_TYPE_DEFAULT_PORTRAIT)->GetFixedValueMap()->GetValue(fixedValueId, pItem); + } + } + } + + if (r == E_SUCCESS) + { + value = pItem->GetFloat(); + } + + return r; +} + +bool +_ResourceManager::IsCustomColor(int colorId) +{ + return __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT]->GetColorMap()->IsUserThemeItem(colorId); +} +bool +_ResourceManager::IsCustomBitmap(int bitmapId) +{ + return __pMapContainer[MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT]->GetImageMap()->IsUserThemeItem(bitmapId); +} + +result +_ResourceManager::PlayFeedback(_ResourceFeedbackPattern pattern, const _Control* pControl) +{ + if (unlikely(__initializeFeedback == false)) + { + feedback_error_e error = (feedback_error_e)feedback_initialize(); + if(error != FEEDBACK_ERROR_NONE) + { + SysLog(NID_UI, "It failed to initialize feedback module."); + } + __initializeFeedback = true; + } + + if (__feedbackStatus == _RESOURCE_FEEDBACK_STATUS_PLAYED) + { + SysLog(NID_UI, "feedback is already played."); + return E_SUCCESS; + } + + bool play = true; + _Control* pTempControl = const_cast<_Control*>(pControl); + + while(pTempControl) + { + if (pTempControl->IsEffectSoundEnabled() == false) + { + play = false; + break; + } + pTempControl = pTempControl->GetParent(); + } + + if (!play) + { + SysLog(NID_UI, "feedback is disabled for this control"); + return E_SUCCESS; + } + + feedback_pattern_e playPattern = Convert_ResourceFeedbackPatternTofeedback_pattern_e(pattern); + __feedbackStatus = _RESOURCE_FEEDBACK_STATUS_PLAYED; + int r = feedback_play(playPattern); + if (r == FEEDBACK_ERROR_NONE) + { + SysLog(NID_UI, "It succeeded to play feedback."); + return E_SUCCESS; + } + else + { + SysLog(NID_UI, "It failed to play feedback."); + return E_SYSTEM; + } + return E_SUCCESS; +} + +result +_ResourceManager::GetDefaultShapeWithScaling(int shapeId, _ControlOrientation orientation, int& value) +{ + result r = E_SUCCESS; + ResourceItem* pItem = null; + + if (orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + r = GetMapContainer(MAP_CONTAINER_TYPE_DEFAULT_PORTRAIT)->GetShapeMap()->GetValue(shapeId, pItem); + if (r != E_SUCCESS) + { + r = GetMapContainer(MAP_CONTAINER_TYPE_DEFAULT_LANDSCAPE)->GetShapeMap()->GetValue(shapeId, pItem); + } + } + else + { + r = GetMapContainer(MAP_CONTAINER_TYPE_DEFAULT_LANDSCAPE)->GetShapeMap()->GetValue(shapeId, pItem); + if (r != E_SUCCESS) + { + r = GetMapContainer(MAP_CONTAINER_TYPE_DEFAULT_PORTRAIT)->GetShapeMap()->GetValue(shapeId, pItem); + } + } + + if (r == E_SUCCESS) + { + value = (int)pItem->GetFloat(); + } + + if (r == E_SUCCESS) + { + int temp = __pTransformer->Transform(value); + if (temp == 0 && value > 0) + { + value = 1; + } + else + { + value = temp; + } + } + return r; +} + +result +_ResourceManager::GetDefaultShapeWithScaling(int shapeId, _ControlOrientation orientation, Tizen::Graphics::FloatDimension& dimension) +{ + result r = E_SUCCESS; + ResourceItem* pItem = null; + + if (orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + r = GetMapContainer(MAP_CONTAINER_TYPE_DEFAULT_PORTRAIT)->GetDimensionMap()->GetValue(shapeId, pItem); + if (r != E_SUCCESS) + { + r = GetMapContainer(MAP_CONTAINER_TYPE_DEFAULT_LANDSCAPE)->GetDimensionMap()->GetValue(shapeId, pItem); + } + } + else + { + r = GetMapContainer(MAP_CONTAINER_TYPE_DEFAULT_LANDSCAPE)->GetDimensionMap()->GetValue(shapeId, pItem); + if (r != E_SUCCESS) + { + r = GetMapContainer(MAP_CONTAINER_TYPE_DEFAULT_PORTRAIT)->GetDimensionMap()->GetValue(shapeId, pItem); + } + } + + if (r == E_SUCCESS) + { + dimension = __pTransformer->Transform(pItem->GetDimension()); + } + + return r; +} + +result +_ResourceManager::GetDefaultShapeWithScaling(int shapeId, _ControlOrientation orientation, float& outValue) +{ + result r = E_SUCCESS; + ResourceItem* pItem = null; + + if (orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + r = GetMapContainer(MAP_CONTAINER_TYPE_DEFAULT_PORTRAIT)->GetShapeMap()->GetValue(shapeId, pItem); + if (r != E_SUCCESS) + { + r = GetMapContainer(MAP_CONTAINER_TYPE_DEFAULT_LANDSCAPE)->GetShapeMap()->GetValue(shapeId, pItem); + } + } + else + { + r = GetMapContainer(MAP_CONTAINER_TYPE_DEFAULT_LANDSCAPE)->GetShapeMap()->GetValue(shapeId, pItem); + if (r != E_SUCCESS) + { + r = GetMapContainer(MAP_CONTAINER_TYPE_DEFAULT_PORTRAIT)->GetShapeMap()->GetValue(shapeId, pItem); + } + } + + if (r == E_SUCCESS) + { + outValue = __pTransformer->Transform(pItem->GetFloat()); + } + + return r; +} + +result +_ResourceManager::GetDefaultShapeWithScaling(int shapeId, _ControlOrientation orientation, Dimension& dimension) +{ + result r = E_SUCCESS; + ResourceItem* pItem = null; + + if (orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + r = GetMapContainer(MAP_CONTAINER_TYPE_DEFAULT_PORTRAIT)->GetDimensionMap()->GetValue(shapeId, pItem); + if (r != E_SUCCESS) + { + r = GetMapContainer(MAP_CONTAINER_TYPE_DEFAULT_LANDSCAPE)->GetDimensionMap()->GetValue(shapeId, pItem); + } + } + else + { + r = GetMapContainer(MAP_CONTAINER_TYPE_DEFAULT_LANDSCAPE)->GetDimensionMap()->GetValue(shapeId, pItem); + if (r != E_SUCCESS) + { + r = GetMapContainer(MAP_CONTAINER_TYPE_DEFAULT_PORTRAIT)->GetDimensionMap()->GetValue(shapeId, pItem); + } + } + + if (r == E_SUCCESS) + { + Dimension dim((int)pItem->GetDimension().width, (int)pItem->GetDimension().height); + Dimension temp = __pTransformer->Transform(dim); + if (temp.width == 0 && dim.width > 0) + { + temp.width = 1; + } + if (temp.height == 0 && dim.height > 0) + { + temp.height = 1; + } + dimension = temp; + } + return r; +} + +#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(theme)->Add(resourceKey, pItem);\ + } + +void +_ResourceManager::LoadBlackPalette(void) +{ + 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) +{ + 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); +} + +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) +{ + if(systemTheme == L"black") + { + LoadBlackPalette(); + } + else if (systemTheme == L"white") + { + LoadWhitePalette(); + } + else if (systemTheme == L"default") + { + LoadDefaultPalette(); + } + else + { + SysAssert(0); + } +} + +void +_ResourceManager::GetThemeName(String& systemTheme, String& userTheme) const +{ + systemTheme = __systemTheme; + userTheme = __userTheme; +} + +void +_ResourceManager::SetSystemColor(void) +{ + void* handle =null; + Color* pColor = null; + Color* (*GetSystemColor)(const String&) = null; + + handle = dlopen ("libosp-compat.so", RTLD_LAZY); + if (!handle) + { + return; + } + GetSystemColor = reinterpret_cast(dlsym(handle, "_GetSystemColor")); + if (dlerror() != NULL) + { + goto CATCH; + } + + pColor = GetSystemColor(L"TITLE_TEXT"); + if (pColor != null) + { + GET_COLOR_CONFIG(HEADER::TITLE_TEXT_NORMAL, *pColor); + } + + pColor = GetSystemColor(L"BODY_TEXT"); + if (pColor != null) + { + GET_COLOR_CONFIG(BUTTON::TEXT_NORMAL, *pColor); + } + + pColor = GetSystemColor(L"FOREGROUND"); + if (pColor != null) + { + GET_COLOR_CONFIG(BASIC::foreground, *pColor); + } + + pColor = GetSystemColor(L"BACKGROUND"); + if (pColor != null) + { + GET_COLOR_CONFIG(BASIC::background, *pColor); + } + + pColor = GetSystemColor(L"LIST_BACKGROUND"); + if (pColor != null) + { + GET_COLOR_CONFIG(FORM::BG_NORMAL, *pColor); + } + + pColor = GetSystemColor(L"FORM_BACKGROUND"); + if (pColor != null) + { + GET_COLOR_CONFIG(FORM::BG_NORMAL, *pColor); + } + + pColor = GetSystemColor(L"FORM_GROUP_BACKGROUND"); + if (pColor != null) + { + GET_COLOR_CONFIG(PANEL::GROUPED_STYLE_BG_NORMAL, *pColor); + } + + pColor = GetSystemColor(L"POPUP_BACKGROUND"); + if (pColor != null) + { + GET_COLOR_CONFIG(POPUP::BG_NORMAL, *pColor); + } + + pColor = GetSystemColor(L"GROUP_ITEM_TEXT"); + if (pColor != null) + { + GET_COLOR_CONFIG(CHECKBUTTON::TEXT_NORMAL, *pColor); + } + + pColor = GetSystemColor(L"LIST_ITEM_TEXT"); + if (pColor != null) + { + GET_COLOR_CONFIG(TABLEVIEW::ITEM_TEXT_NORMAL, *pColor); + } + + pColor = GetSystemColor(L"LIST_ITEM_PRESSED_TEXT"); + if (pColor != null) + { + GET_COLOR_CONFIG(TABLEVIEW::ITEM_TEXT_PRESSED, *pColor); + } + + pColor = GetSystemColor(L"LIST_ITEM_HIGHLIGHTED_TEXT"); + if (pColor != null) + { + GET_COLOR_CONFIG(TABLEVIEW::ITEM_TEXT_HIGHLIGHTED, *pColor); + } + + //fall through +CATCH: + dlclose(handle); + return; +} +bool +_ResourceManager::GetDensityDirectory(const String& directoryName, float& scaleFactor) +{ + float denominator = 0.0; + float numerator = 0.0; + if(!(directoryName.StartsWith(L"screen-density",0))) + { + return false; + } + + if (__deviceDPI >= DPI_FOR_XHIGH) + { + numerator = 9.0; + } + else if (__deviceDPI >= DPI_FOR_HIGH) + { + numerator = 6.0; + } + else if (__deviceDPI >= DPI_FOR_MIDDLE) + { + numerator = 4.0; + } + else if (__deviceDPI < DPI_FOR_MIDDLE && __deviceDPI > DPI_FOR_LOW) + { + numerator = 3.0; + } + else + { + return false; + } + + if(directoryName.Contains(L"xhigh")) + { + denominator = 9.0; + } + else if(directoryName.Contains(L"high")) + { + denominator = 6.0; + } + else if(directoryName.Contains(L"middle")) + { + denominator = 4.0; + } + else if(directoryName.Contains(L"low")) + { + denominator = 3.0; + } + else + { + return false; + } + + scaleFactor = numerator / denominator; + return true; +} + +bool +_ResourceManager::GetResolutionDirectory(const String& directoryName, float& scaleFactor) +{ + if(!(directoryName.Contains(L"0"))) + { + return false; + } + + int index = 0; + if(directoryName.IndexOf(L"x", 0, index) != E_SUCCESS) + { + return false; + } + String width = 0; + + if(directoryName.SubString(0, index - 1, width)) + { + int denominatorInt = 0; + float denominator = 0; + float numerator = 0; + if(Integer::Parse(width, denominatorInt) == E_SUCCESS) + { + denominator = (float)denominatorInt; + numerator = __targetWidth; + scaleFactor = numerator / denominator; + return true; + } + } + return false; +} + +String +_ResourceManager::FindImagePath(const String& fileName, int& foundFolderWidth, bool isCustom) +{ + bool find = false; + String fullName(L""); + ResourceFallbackItem* pItem = null; + + if(isCustom) + { + String resDirectory = _AppInfo::GetAppRootPath() + L"res/themes/"+__userTheme; + if(__pFallbackList == null) + { + __pFallbackList = new (std::nothrow) ArrayListT; + SysTryReturn(NID_UI, __pFallbackList, L"", E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + Directory dir; + result r = dir.Construct(resDirectory); + if (r == E_SUCCESS) + { + DirEnumerator* pDirEnum = dir.ReadN(); + if (pDirEnum != null) + { + while (pDirEnum->MoveNext() == E_SUCCESS) + { + DirEntry entry = pDirEnum->GetCurrentDirEntry(); + if(entry.IsDirectory()) + { + float scaleFactor = 0; + String directoryName = entry.GetName(); + if(GetDensityDirectory(directoryName, scaleFactor)) + { + pItem = new (std::nothrow) ResourceFallbackItem; + SysTryCatch(NID_UI, pItem, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + pItem->scaleFactor = scaleFactor; + pItem->directoryName = directoryName; + __pFallbackList->Add(pItem); + } + else if(GetResolutionDirectory(directoryName, scaleFactor)) + { + pItem = new (std::nothrow) ResourceFallbackItem; + SysTryCatch(NID_UI, pItem, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + pItem->scaleFactor = scaleFactor; + pItem->directoryName = directoryName; + __pFallbackList->Add(pItem); + } + } + } + ResourceFallbackItemComparer comparer; + __pFallbackList->Sort(comparer); + delete pDirEnum; + } + for(int i = 0 ; i < __pFallbackList->GetCount() ; i++) + { + ResourceFallbackItem* pItem; + if(__pFallbackList->GetAt(i,pItem) == E_SUCCESS) + { + if(pItem->scaleFactor < 1.001 && pItem->scaleFactor > 0.999) + { + __pFallbackList->RemoveAt(i); + __pFallbackList->InsertAt(pItem,0); + if(pItem->directoryName.Contains(L"0")) + { + break; + } + } + } + } + } + } + for(int i = 0 ; i <__pFallbackList->GetCount() ; i++) + { + ResourceFallbackItem* pItem; + __pFallbackList->GetAt(i,pItem); + fullName = resDirectory + L"/" + pItem->directoryName + L"/" + fileName; + if (File::IsFileExist(fullName)) + { + find = true; + foundFolderWidth = __targetWidth / pItem->scaleFactor; + if(foundFolderWidth > __targetWidth) + { + if( foundFolderWidth < __targetWidth + 3) + { + foundFolderWidth = __targetWidth; + } + } + else + { + if( foundFolderWidth >__targetWidth - 3) + { + foundFolderWidth = __targetWidth; + } + } + break; + } + } + } + if(!find) + { + fullName = String(L"/usr/share/osp/bitmaps/" + __targetPortraitMode+ "/" + __systemTheme + L"/" + fileName); + if (File::IsFileExist(fullName)) + { + find = true; + foundFolderWidth = __targetWidth; + } + else + { + fullName = String(L"/usr/share/osp/bitmaps/" + __defaultPortraitMode+ "/" + __systemTheme + L"/" + fileName); + if (File::IsFileExist(fullName)) + { + find = true; + foundFolderWidth = DEFAULT_SCREEN_WIDTH; + } + } + } + + if(!find) + { + fullName = String(L"/usr/share/osp/bitmaps/" + __targetPortraitMode + "/" + fileName); + if (File::IsFileExist(fullName)) + { + find = true; + foundFolderWidth = __targetWidth; + } + else + { + fullName = String(L"/usr/share/osp/bitmaps/" + __defaultPortraitMode+ "/" + fileName); + if (File::IsFileExist(fullName)) + { + find = true; + foundFolderWidth = DEFAULT_SCREEN_WIDTH; + } + } + } + + if(!find) + { + return L""; + } + else + { + return fullName; + } +CATCH: + if(__pFallbackList) + { + ResourceFallbackItem* pItem = null; + int count = __pFallbackList->GetCount(); + for (int i = 0; i < count; i++) + { + __pFallbackList->GetAt(i, pItem); + delete pItem; + } + __pFallbackList->RemoveAll(); + delete __pFallbackList; + __pFallbackList = null; + } + return L""; +} + +bool +_ResourceManager::IsFeedbackPlayed(void) +{ + if (__feedbackStatus == _RESOURCE_FEEDBACK_STATUS_INIT) + { + return false; + } + return true; +} + +void +_ResourceManager::AcquireFeedback(void) +{ + ++__feedbackAcquireCount; +} + +void +_ResourceManager::ReleaseFeedback(void) +{ + __feedbackAcquireCount >0 ? --__feedbackAcquireCount : __feedbackAcquireCount = 0; + if(__feedbackAcquireCount == 0) + { + __feedbackStatus = _RESOURCE_FEEDBACK_STATUS_INIT; + } +} +void +_ResourceManager::ResetFeedback(void) +{ + __feedbackAcquireCount = 0; + __feedbackStatus = _RESOURCE_FEEDBACK_STATUS_INIT; +} +Dimension +_ResourceManager::GetLogicalScreenSizen(void) +{ + return Dimension(__logicalWidth, __logicalHeight); +} +}}//Tizen::Ui diff --git a/src/ui/FUi_SystemUtilImpl.cpp b/src/ui/FUi_SystemUtilImpl.cpp new file mode 100644 index 0000000..aabaf20 --- /dev/null +++ b/src/ui/FUi_SystemUtilImpl.cpp @@ -0,0 +1,372 @@ +// +// 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. +// +#include +#include +#include +#include + +//to avoid camera key code definition +#ifdef KEY_CAMERA +#undef KEY_CAMERA +#endif +#if defined KEY_BACK +#undef KEY_BACK +#endif +#if defined KEY_HOME +#undef KEY_HOME +#endif +#if defined KEY_MAIL +#undef KEY_MAIL +#endif +#if defined KEY_MUTE +#undef KEY_MUTE +#endif +#if defined KEY_APPS +#undef KEY_APPS +#endif +#if defined KEY_MENU +#undef KEY_MENU +#endif +#if defined KEY_SEARCH +#undef KEY_SEARCH +#endif +#if defined KEY_VOICE +#undef KEY_VOICE +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include "FUi_UiKeyEvent.h" +#include "FUi_CoordinateSystemUtils.h" + +using namespace Tizen::Security; +using namespace Tizen::Graphics; +using namespace Tizen::Base; + +namespace Tizen { namespace Ui +{ + +struct ConvertKeys +{ + _KeyCode code; + const char* pName; +}; + +const ConvertKeys KeyCodeMap[] = { + { _KEY_ESC, "Escape" }, + { _KEY_GRAVE, "grave" }, + { _KEY_1, "1" }, + { _KEY_2, "2" }, + { _KEY_3, "3" }, + { _KEY_4, "4" }, + { _KEY_5, "5" }, + { _KEY_6, "6" }, + { _KEY_7, "7" }, + { _KEY_8, "8" }, + { _KEY_9, "9" }, + { _KEY_0, "0" }, + { _KEY_MINUS, "minus" }, + { _KEY_EQUAL, "equal" }, + { _KEY_BACKSLASH, "backslash" }, + { _KEY_BACKSPACE, "BackSpace" }, + { _KEY_TAB, "Tab" }, + { _KEY_Q, "q" }, + { _KEY_W, "w" }, + { _KEY_E, "e" }, + { _KEY_R, "r" }, + { _KEY_T, "t" }, + { _KEY_Y, "y" }, + { _KEY_U, "u" }, + { _KEY_I, "i" }, + { _KEY_O, "o" }, + { _KEY_P, "p" }, + { _KEY_LBRACKET, "bracketleft" }, + { _KEY_RBRACKET, "bracketright" }, + { _KEY_ENTER, "Return" }, + { _KEY_CAPSLOCK, "Caps_Lock" }, + { _KEY_A, "a" }, + { _KEY_S, "s" }, + { _KEY_D, "d" }, + { _KEY_F, "f" }, + { _KEY_G, "g" }, + { _KEY_H, "h" }, + { _KEY_J, "j" }, + { _KEY_K, "k" }, + { _KEY_L, "l" }, + { _KEY_SEMICOLON, "semicolon" }, + { _KEY_APOSTROPHE, "apostrophe" }, + { _KEY_SHIFT_L, "Shift_L" }, + { _KEY_Z, "z" }, + { _KEY_X, "x" }, + { _KEY_C, "c" }, + { _KEY_V, "v" }, + { _KEY_B, "b" }, + { _KEY_N, "n" }, + { _KEY_M, "m" }, + { _KEY_COMMA, "comma" }, + { _KEY_DOT, "period" }, + { _KEY_SLASH, "slash" }, + { _KEY_SHIFT_R, "Shift_R" }, + { _KEY_CTRL_L, "Control_L" }, + { _KEY_LALT, "Alt_L" }, + { _KEY_SPACE, "space" }, + { _KEY_RALT, "Alt_R" }, + { _KEY_CTRL_R, "Control_R" }, + { _KEY_FN_1, "F1" }, + { _KEY_FN_2, "F2" }, + { _KEY_FN_3, "F3" }, + { _KEY_FN_4, "F4" }, + { _KEY_FN_5, "F5" }, + { _KEY_FN_6, "F6" }, + { _KEY_FN_7, "F7" }, + { _KEY_FN_8, "F8" }, + { _KEY_FN_9, "F9" }, + { _KEY_FN_10, "F10" }, + { _KEY_FN_11, "F11" }, + { _KEY_FN_12, "F12" }, + { _KEY_NUM_LOCK, "Num_Lock" }, + { _KEY_NUMPAD_DIVIDE, "KP_Divide" }, + { _KEY_NUMPAD_MULTIPLY, "KP_Multiply" }, + { _KEY_NUMPAD_SUBTRACT, "KP_Subtract" }, + { _KEY_NUMPAD_7, "KP_Home" }, + { _KEY_NUMPAD_8, "KP_Up" }, + { _KEY_NUMPAD_9, "KP_Prior" }, + { _KEY_NUMPAD_4, "KP_Left" }, + { _KEY_NUMPAD_5, "KP_Begin" }, + { _KEY_NUMPAD_6, "KP_Right" }, + { _KEY_NUMPAD_ADD, "KP_Add" }, + { _KEY_NUMPAD_1, "KP_End" }, + { _KEY_NUMPAD_2, "KP_Down" }, + { _KEY_NUMPAD_3, "KP_Next" }, + { _KEY_NUMPAD_0, "KP_Insert" }, + { _KEY_NUMPAD_DOT, "KP_Delete" }, + { _KEY_NUMPAD_ENTER, "KP_Enter" }, + { _KEY_PRINT, "Print" }, + { _KEY_SCROLL_LOCK, "Scroll_Lock" }, + { _KEY_PAUSEBREAK, "Pause" }, + { _KEY_INSERT, "Insert" }, + { _KEY_HOME_BUTTON, "Home" }, + { _KEY_PAGE_UP, "Prior" }, + { _KEY_DELETE, "Delete" }, + { _KEY_END_BUTTON, "End" }, + { _KEY_PAGE_DOWN, "Next" }, + { _KEY_UP, "Up" }, + { _KEY_LEFT, "Left" }, + { _KEY_DOWN, "Down" }, + { _KEY_RIGHT, "Right" }, + { _KEY_CONTEXT_MENU, "Menu" }, + { _KEY_MENU, "XF86Send" }, + + { _KEY_BACK, "XF86Stop" }, +// { _KEY_HOME, "XF86Phone" }, + { _KEY_WEB_PAGE, "XF86WWW" }, + { _KEY_MAIL, "XF86Mail" }, + { _KEY_SCREEN_SAVER, "XF86ScreenSaver" }, + { _KEY_BRIGHTNESS_DOWN, "XF86MonBrightnessDown" }, + { _KEY_BRIGHTNESS_UP, "XF86MonBrightnessUp" }, + { _KEY_MUTE, "XF86AudioMute" }, +// { _KEY_VOLUME_DOWN, "XF86AudioLowerVolume" }, +// { _KEY_VOLUME_UP, "XF86AudioRaiseVolume" }, + { _KEY_PLAY_PAUSE, "XF86AudioPlay" }, + { _KEY_NEXT_SONG, "XF86AudioNext" }, + { _KEY_PREVIOUS_SONG, "XF86AudioPrev" }, + { _KEY_APPS, "XF86Launch0" }, + { _KEY_MENU, "XF86Send" }, + { _KEY_SOFT_KEYBOARD, "XF86MenuKB" }, + { _KEY_SEARCH, "XF86Search" }, + { _KEY_VOICE, "XF86Launch2" }, + { _KEY_QUICK_PANEL, "XF86Tools" }, +}; + +struct _DisplayDeleter +{ + void operator()(Display* pDisplay) + { + XCloseDisplay(pDisplay); + } +}; + +_SystemUtilImpl::_SystemUtilImpl(void) +{ +} + +_SystemUtilImpl::~_SystemUtilImpl(void) +{ +} + +result +_SystemUtilImpl::GenerateKeyEvent(Tizen::Ui::KeyEventType keyEvent, Tizen::Ui::_KeyCode keyCode) +{ + result r = E_SUCCESS; + + Display* pDisplay = (Display*)ecore_x_display_get(); + 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, "pDpy is invalid. something wrong!"); + + int key = -1; + + for (unsigned int idx = 0; idx < sizeof(KeyCodeMap) / sizeof(ConvertKeys); ++idx) + { + if (KeyCodeMap[idx].code == keyCode) + { + KeySym keySym = XStringToKeysym(KeyCodeMap[idx].pName); + key = (int) XKeysymToKeycode(pDpy.get(), keySym); + break; + } + } + + if (key == -1) + { + SysLogException(NID_UI, E_INVALID_ARG, "[E_INVALID_ARG] Unsupported KeyCode argument."); + return E_INVALID_ARG; + } + + switch (keyEvent) + { + case KEY_EVENT_TYPE_PRESSED: + XTestFakeKeyEvent(pDisplay, key, true, CurrentTime); + break; + + case KEY_EVENT_TYPE_RELEASED: + XTestFakeKeyEvent(pDisplay, key, false, CurrentTime); + break; + + default: + SysLogException(NID_UI, E_INVALID_ARG, "[E_INVALID_ARG] Invalid KeyEventType argument."); + return E_INVALID_ARG; + } + + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + return r; +} + +result +_SystemUtilImpl::GenerateTouchEvent(TouchEventType touchEvent, const Tizen::Graphics::Point& point) +{ + return GenerateTouchEvent(touchEvent, _CoordinateSystemUtils::ConvertToFloat(point)); +} + +result +_SystemUtilImpl::GenerateTouchEvent(TouchEventType touchEvent, const Tizen::Graphics::FloatPoint& point) +{ + result r = E_SUCCESS; + + Display* pDisplay = (Display*)ecore_x_display_get(); + 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, "pDpy is invalid. something wrong!"); + + int width = DisplayWidth(pDpy.get(), DefaultScreen(pDpy.get())); + int height = DisplayHeight(pDpy.get(), DefaultScreen(pDpy.get())); + + if (( point.x<0 || point.x>width) || (point.y<0 || point.y>height)) + { + SysLogException(NID_UI, E_INVALID_ARG, "[E_INVALID_ARG] Out of bounds x, y argument."); + return E_INVALID_ARG; + } + + int screenNumber = 0; //main screen + int button = 1; //left button + + switch (touchEvent) + { + case TOUCH_EVENT_TYPE_PRESSED: + XWarpPointer(pDisplay, None, XRootWindow(pDisplay, 0), 0, 0, 0, 0, point.x, point.y); + XTestFakeButtonEvent(pDisplay, button, true, CurrentTime); + break; + + case TOUCH_EVENT_TYPE_RELEASED: + XWarpPointer(pDisplay, None, XRootWindow(pDisplay, 0), 0, 0, 0, 0, point.x, point.y); + XTestFakeButtonEvent(pDisplay, button, false, CurrentTime); + break; + + case TOUCH_EVENT_TYPE_MOVED: + XTestFakeMotionEvent(pDisplay, screenNumber, point.x, point.y, CurrentTime); + break; + + default: + SysLogException(NID_UI, E_INVALID_ARG, "[E_INVALID_ARG] Invalid TouchEventType argument."); + return E_INVALID_ARG; + } + + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + return r; +} + +Tizen::Graphics::Bitmap* +_SystemUtilImpl::CaptureScreenN(void) +{ + result r = E_SUCCESS; + + std::unique_ptr pDpy(XOpenDisplay(NULL)); + SysTryReturn(NID_UI, pDpy.get(), null, E_OPERATION_FAILED, "[E_OPERATION_FAILED] pDpy is invalid. something wrong!"); + + int width = DisplayWidth(pDpy.get(), DefaultScreen(pDpy.get())); + int height = DisplayHeight(pDpy.get(), DefaultScreen(pDpy.get())); + + void* pDump = utilx_create_screen_shot(pDpy.get(), width, height); + SysTryReturn(NID_UI, pDump, null, E_OPERATION_FAILED, "[E_OPERATION_FAILED] pDump is invalid. something wrong!"); + + std::unique_ptr pBuffer(new (std::nothrow) ByteBuffer()); + SysTryReturn(NID_UI, pBuffer != null, null, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Memory allocation failure."); + + r = pBuffer->Construct(static_cast(pDump), 0, width*height*4, width*height*4); + SysTryReturn(NID_UI, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + Tizen::Graphics::Dimension dim(width, height); + std::unique_ptr pBitmap(new (std::nothrow) Bitmap()); + SysTryReturn(NID_UI, pBitmap != null, null, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Memory allocation failure."); + + r = pBitmap->Construct(*pBuffer, dim, BITMAP_PIXEL_FORMAT_ARGB8888); + SysTryReturn(NID_UI, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + utilx_release_screen_shot(); + + return pBitmap.release(); +} + +result +_SystemUtilImpl::SendKeyStopMessage(void) +{ + bool r = false; + int num; + Ecore_X_Window *_keygrab_win = null; + char msg_data[] = "PxXF86Stop"; + + Ecore_X_Atom type = ecore_x_atom_get("_HWKEY_EMULATION"); + + int ret = ecore_x_window_prop_property_get(null, type, ECORE_X_ATOM_WINDOW, 32, (unsigned char **)&_keygrab_win, &num); + if (ret && num) + { + Ecore_X_Window xWindow = *_keygrab_win; + + r = ecore_x_client_message8_send(xWindow, type, msg_data, sizeof(msg_data)); + SysTryReturn(NID_UI, r == true, E_OPERATION_FAILED, E_OPERATION_FAILED, "ecore_x_client_message8_send failed."); + } + + return E_SUCCESS; +} + +}} //Tizen::Ui diff --git a/src/ui/FUi_TouchEffectImpl.cpp b/src/ui/FUi_TouchEffectImpl.cpp new file mode 100644 index 0000000..0ddaade --- /dev/null +++ b/src/ui/FUi_TouchEffectImpl.cpp @@ -0,0 +1,101 @@ +// +// Open Service Platform +// Copyright (c) 2012 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_TouchEffectImpl.cpp + * @brief This is the implementation for _TouchEffectImpl class. + * + * This file contains definitions of %_TouchEffectImpl class. + */ +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui +{ + +_TouchEffectImpl::_TouchEffectImpl(void) +{ +} + +_TouchEffectImpl::~_TouchEffectImpl(void) +{ +} + +result +_TouchEffectImpl::Construct(void) +{ + int feedbackError = FEEDBACK_ERROR_NONE; + + feedbackError = feedback_initialize(); + SysTryReturn(NID_UI, feedbackError == FEEDBACK_ERROR_NONE, E_OPERATION_FAILED, E_OPERATION_FAILED, + "[E_OPERATION_FAILED,] Failed to initialize feedback API"); + + return E_SUCCESS; +} + +result +_TouchEffectImpl::Play(TouchEffectType type) +{ + int feedbackError = FEEDBACK_PATTERN_NONE; + switch(type) + { + case TOUCH_EFFECT_TAP: + feedbackError = feedback_play(FEEDBACK_PATTERN_TAP); + SysTryReturn(NID_UI, feedbackError == FEEDBACK_ERROR_NONE, E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] Failed to play the TAP effect."); + SysLog(NID_UI, "It failed to play the TAP effect."); + break; + + case TOUCH_EFFECT_SIP: + feedbackError = feedback_play(FEEDBACK_PATTERN_SIP); + SysTryReturn(NID_UI, feedbackError == FEEDBACK_ERROR_NONE, E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] Failed to play the SIP effect."); + SysLog(NID_UI, "It failed to play the SIP effect."); + break; + + case TOUCH_EFFECT_NO_SOUND: + feedbackError = feedback_play_type(FEEDBACK_TYPE_VIBRATION, FEEDBACK_PATTERN_SIP); + SysTryReturn(NID_UI, feedbackError == FEEDBACK_ERROR_NONE, E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] Failed to play the NO_SOUND effect."); + SysLog(NID_UI, "It failed to play the NO_SOUND effect."); + break; + + default: + SysTryReturn(NID_UI, false, E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] The specified type is invalid."); + break; + } + + return E_SUCCESS; +} + +_TouchEffectImpl* +_TouchEffectImpl::GetInstance(TouchEffect& touchEffect) +{ + return touchEffect.__pTouchEffectImpl; +} + +const _TouchEffectImpl* +_TouchEffectImpl::GetInstance(const TouchEffect& touchEffect) +{ + return touchEffect.__pTouchEffectImpl; +} + +} }// Tizen::Ui diff --git a/src/ui/FUi_TouchEventArg.cpp b/src/ui/FUi_TouchEventArg.cpp new file mode 100644 index 0000000..cc4c8cd --- /dev/null +++ b/src/ui/FUi_TouchEventArg.cpp @@ -0,0 +1,97 @@ +// +// 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_TouchEventArg.cpp + * @brief This is the implementation file for the _TouchEventArg class. + */ + +#include "FUi_TouchEventArg.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui +{ + +_TouchEventArg::_TouchEventArg(const Tizen::Ui::Control& source, _TouchStatus status) + : __PointId(0) + , __pSource(const_cast (&source)) + , __touchStatus(status) + , __startPosition(-1, -1) + , __currentPosition(-1, -1) + , __isFlicked(false) +{ + +} + +_TouchEventArg::~_TouchEventArg(void) +{ + // NOTHING +} + +_TouchStatus +_TouchEventArg::GetTouchStatus(void) const +{ + return (__touchStatus); +} + +const Tizen::Ui::Control* +_TouchEventArg::GetSource(void) const +{ + return (__pSource); +} + +void +_TouchEventArg::SetTouchPosition(unsigned long PointId, float startX, float startY, float currentX, float currentY) +{ + __PointId = PointId; + __startPosition = Tizen::Graphics::FloatPoint(startX, startY); + __currentPosition = Tizen::Graphics::FloatPoint(currentX, currentY); +} + +unsigned long +_TouchEventArg::GetPointId(void) const +{ + return __PointId; +} + +const FloatPoint +_TouchEventArg::GetStartPosition(void) const +{ + return __startPosition; +} + +const FloatPoint +_TouchEventArg::GetCurrentPosition(void) const +{ + return __currentPosition; +} + +void +_TouchEventArg::SetFlickedStatus(bool isFlicked) +{ + __isFlicked = isFlicked; +} + +bool +_TouchEventArg::IsFlicked(void) const +{ + return __isFlicked; +} + +}} // Tizen::Ui diff --git a/src/ui/FUi_TouchEventInfoImpl.cpp b/src/ui/FUi_TouchEventInfoImpl.cpp new file mode 100644 index 0000000..7e05492 --- /dev/null +++ b/src/ui/FUi_TouchEventInfoImpl.cpp @@ -0,0 +1,115 @@ +// +// 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_TouchEventInfoImpl.cpp +* @brief This is the implementation for the _TouchEventInfoImpl class. +* @version 2.0 +*/ + +// includes +#include +#include +#include +#include +#include "FUi_TouchEventInfoImpl.h" +#include "FUi_UiTouchEvent.h" + +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui +{ + +_TouchEventInfoImpl* +_TouchEventInfoImpl::CreateInstanceN(TouchEventInfo* pPublic) +{ + ClearLastResult(); + + _TouchEventInfoImpl* pImpl = new (std::nothrow) _TouchEventInfoImpl(pPublic); + SysTryReturn(NID_UI, pImpl, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + return pImpl; +} + +_TouchEventInfoImpl::_TouchEventInfoImpl(TouchEventInfo* pPublic) + : __pPublic(pPublic) + , __pointId(0) + , __touchStatus(_TOUCH_PRESSED) + , __startPosition(0, 0) + , __currentPosition(0, 0) + , __isFlicked(false) +{ +} + +_TouchEventInfoImpl::~_TouchEventInfoImpl(void) +{ +} + +void +_TouchEventInfoImpl::SetTouchEventInfo(const _TouchInfo& touchInfo, const Point startPosition) +{ + __pointId = touchInfo.GetPointId(); + __startPosition.x = startPosition.x; + __startPosition.y = startPosition.y; + __currentPosition.x = touchInfo.GetCurrentPosition().x; + __currentPosition.y = touchInfo.GetCurrentPosition().y; + __isFlicked = touchInfo.IsFlicked(); + __touchStatus = touchInfo.GetTouchStatus(); +} + +unsigned long +_TouchEventInfoImpl::GetPointId(void) const +{ + return __pointId; +} + +Point +_TouchEventInfoImpl::GetStartPosition(void) const +{ + return Point(__startPosition.x, __startPosition.y); +} + +FloatPoint +_TouchEventInfoImpl::GetStartPositionF(void) const +{ + return __startPosition; +} + +Point +_TouchEventInfoImpl::GetCurrentPosition(void) const +{ + return Point(__currentPosition.x, __currentPosition.y); +} + +FloatPoint +_TouchEventInfoImpl::GetCurrentPositionF(void) const +{ + return __currentPosition; +} + +_TouchStatus +_TouchEventInfoImpl::GetTouchStatus(void) const +{ + return __touchStatus; +} + +bool +_TouchEventInfoImpl::IsFlicked(void) const +{ + return __isFlicked; +} + +} } // Tizen::Ui diff --git a/src/ui/FUi_TouchEventManagerImpl.cpp b/src/ui/FUi_TouchEventManagerImpl.cpp new file mode 100644 index 0000000..89cf756 --- /dev/null +++ b/src/ui/FUi_TouchEventManagerImpl.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 FUi_TouchEventManagerImpl.cpp + * @brief This is the implementation file for %_TouchEventManagerImpl class + * @version 2.0 + * + * This file contains the implementation of %_TouchEventManagerImpl class. + * + */ + +#include +#include +#include "FUi_TouchEventArg.h" +#include "FUi_TouchEventManagerImpl.h" +#include "FUi_TouchManager.h" + +using namespace Tizen::Base::Collection; + +namespace Tizen { namespace Ui +{ + +_TouchEventManagerImpl::_TouchEventManagerImpl(void) +{ +} + +_TouchEventManagerImpl::~_TouchEventManagerImpl(void) +{ +} + +IListT* +_TouchEventManagerImpl::GetTouchInfoListN(void) const +{ + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + 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, "[%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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + for (int i = 0; i < pFingerInfoList->GetCount(); i++) + { + _FingerInfo* pFingerInfo = null; + pFingerInfoList->GetAt(i, pFingerInfo); + + if (pFingerInfo == null) + { + continue; + } + + 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, "[%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) + { + touchStatus = _TOUCH_PRESSED; + } + + _TouchEventArg touchEventArg(pImpl->GetPublic(), touchStatus); + touchEventArg.SetTouchPosition(pFingerInfo->GetPointId(), pFingerInfo->GetStartPoint().x, pFingerInfo->GetStartPoint().y, pFingerInfo->GetPoint().x, pFingerInfo->GetPoint().y); + pTouchEventInfo->Construct(touchEventArg); + + pTouchEventInfoList->Add(pTouchEventInfo); + } + } + } + + delete pFingerInfoList; + pFingerInfoList = null; + + return pTouchEventInfoList; + +CATCH: + if (pTouchEventInfoList) + { + IEnumeratorT* pEnumerator = pTouchEventInfoList->GetEnumeratorN(); + if (pEnumerator) + { + while(pEnumerator->MoveNext() == E_SUCCESS) + { + TouchEventInfo* pTouchEventInfo = null; + pEnumerator->GetCurrent(pTouchEventInfo); + if (!pTouchEventInfo) + { + continue; + } + + delete pTouchEventInfo; + } + delete pEnumerator; + } + + pTouchEventInfoList->RemoveAll();; + delete pTouchEventInfoList; + pTouchEventInfoList = null; + } + + if (pFingerInfoList) + { + delete pFingerInfoList; + pFingerInfoList = null; + } + + return null; +} + +}} //Tizen::Ui diff --git a/src/ui/FUi_TouchFlickGestureDetector.cpp b/src/ui/FUi_TouchFlickGestureDetector.cpp new file mode 100644 index 0000000..ff1638a --- /dev/null +++ b/src/ui/FUi_TouchFlickGestureDetector.cpp @@ -0,0 +1,578 @@ +// +// 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_TouchFlickGestureDetector.cpp + * @brief This is the implementation file for %_TouchFlickGestureDetector class + * @version 2.0 + * + * This file contains the implementation of %_TouchFlickGestureDetector class. + * + */ + +#include +#include +#include +#include "FUi_TouchManager.h" +#include "FUi_TouchFlickGestureDetector.h" +#include "FUi_ITouchFlickGestureEventListener.h" +#include "FUi_TouchFlickGestureDetectorImpl.h" + +using namespace Tizen::Base::Utility; +using namespace Tizen::System; +using namespace Tizen::Base::Collection; + +namespace Tizen { namespace Ui +{ + +namespace{ +const int MAX_VALUE = -10000; +const int MIN_VALUE = 10000; +const int IGNORE_OVERSHOOT_TIME = 80; +const int IGNORE_OVERSHOOT_MM = 5; +const int DIRECT_MOVE_TIME = 80;; +const int DIRECT_MOVE_MM = 3; +const int MAX_TIME_WND = 200; +const int MIN_TIME_WND = 30; +const int FIRST_MOVE_BOUND_MM = 2; +const int MM_H = 72; +const int RES_H = 800; +const int IGNORE_OVERSHOOT_PXL = IGNORE_OVERSHOOT_MM * RES_H / MM_H; +const int DIRECT_MOVE_PXL = DIRECT_MOVE_MM * RES_H / MM_H; +const int MIN_MOVE_PXL = FIRST_MOVE_BOUND_MM * RES_H / MM_H; +const unsigned int FIRST_POINT_ID = 0; +} + +/* lcd size 480x800 DEVICE_SIZE_VERTICAL 72 + * lcd size 240x400 DEVICE_SIZE_VERTICAL 66 + * lcd size 320x480 DEVICE_SIZE_VERTICAL 66 + * + * RES_H = lcd size(height) + * */ +_TouchFlickGestureDetector::_TouchFlickGestureDetector(void) + : __xDistance(0) + , __yDistance(0) + , __duration(0) + , __direction(_FLICK_DIRECTION_NONE) + , __maxMoveX(MAX_VALUE) + , __minMoveX(MIN_VALUE) + , __maxMoveY(MAX_VALUE) + , __minMoveY(MIN_VALUE) + , __pFlickInfoList(null) +{ + result r = GetLastResult(); + 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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + return; +} + +_TouchFlickGestureDetector::~_TouchFlickGestureDetector(void) +{ + ClearVariables(); + + delete __pFlickInfoList; + __pFlickInfoList = null; +} + +void +_TouchFlickGestureDetector::CheckMoveMinMax(const int x, const int y) +{ + if (x > __maxMoveX) + { + __maxMoveX = x; + } + + if (x < __minMoveX) + { + __minMoveX = x; + } + + if (y > __maxMoveY) + { + __maxMoveY = y; + } + + if (y < __minMoveY) + { + __minMoveY = y; + } +} + +void +_TouchFlickGestureDetector::ClearVariables(void) +{ + __maxMoveX = -10000; + __minMoveX = 10000; + __maxMoveY = -10000; + __minMoveY = 10000; + + for (int i = 0; i < __pFlickInfoList->GetCount(); i++) + { + _FlickInfo* pFlickInfo = null; + __pFlickInfoList->GetAt(i, pFlickInfo); + + if (pFlickInfo) + { + delete pFlickInfo; + } + } + + __pFlickInfoList->RemoveAll(); +} + +bool +_TouchFlickGestureDetector::FindFlickWindow(const ArrayListT<_FlickInfo*>* pList, const _FlickInfo* pFlickInfo, int* pStartIndex, int* pEndIndex) +{ + int pointCount = pList->GetCount(); + int endIdx = pointCount - 1; + + enum + { + FD_NONE = 0, FD_RIGHT = 0x1, FD_UP = 0x2, FD_LEFT = 0x4, FD_DOWN = 0x8 + }; + + int dirOpp = FD_NONE; + int dir = FD_NONE; + int deltaX = 0, deltaY = 0; + + int i = 0; + for (i = endIdx - 1; i > 0; i--) + { + bool isDirChanged = false; + int distanceX = 0; + int distanceY = 0; + _FlickInfo* pVecPoints = null; + _FlickInfo* pPrevVecPoints = null; + + pList->GetAt(i, pVecPoints); + pList->GetAt(i - 1, pPrevVecPoints); + + if (pVecPoints && pPrevVecPoints) + { + distanceX = pVecPoints->x - pPrevVecPoints->x; + distanceY = pVecPoints->y - pPrevVecPoints->y; + } + + if (distanceX == 0 && distanceY == 0) + { + continue; + } + else if (distanceX > 0 && distanceX > Math::Abs(distanceY)) // Right + { + dirOpp |= FD_LEFT; + + if (dirOpp & FD_RIGHT) + { + isDirChanged = true; + } + else + { + dir = FD_RIGHT; + } + } + else if (distanceX < 0 && distanceX < -Math::Abs(distanceY)) // Left + { + dirOpp |= FD_RIGHT; + + if (dirOpp & FD_LEFT) + { + isDirChanged = true; + } + else + { + dir = FD_LEFT; + } + } + else if (distanceY > 0 && distanceY >= Math::Abs(distanceX)) // Down + { + dirOpp |= FD_UP; + + if (dirOpp & FD_DOWN) + { + isDirChanged = true; + } + else + { + dir = FD_DOWN; + } + } + else if (distanceY < 0 && distanceY <= -Math::Abs(distanceX)) // Up + { + dirOpp |= FD_DOWN; + + if (dirOpp & FD_UP) + { + isDirChanged = true; + } + else + { + dir = FD_UP; + } + } + + if (isDirChanged) + { + if (pFlickInfo->time - pVecPoints->time < IGNORE_OVERSHOOT_TIME + && Math::Abs(deltaX) < IGNORE_OVERSHOOT_PXL && Math::Abs(deltaY) < IGNORE_OVERSHOOT_PXL) + { + endIdx = i; + dirOpp = FD_NONE; + dir = FD_NONE; + deltaX = distanceX; + deltaY = distanceY; + continue; + } + break; + } + else + { + deltaX += distanceX; + deltaY += distanceY; + } + + if (pFlickInfo->time - pPrevVecPoints->time > DIRECT_MOVE_TIME + && Math::Abs(deltaX) < DIRECT_MOVE_PXL && Math::Abs(deltaY) < DIRECT_MOVE_PXL) + { + --i; + *pStartIndex = i; + *pEndIndex = endIdx; + return false; + } + + if (pFlickInfo->time - pVecPoints->time > MAX_TIME_WND) + { + break; + } + } + + *pStartIndex = i; + *pEndIndex = endIdx; + + switch(dir) + { + case FD_NONE: + __direction = _FLICK_DIRECTION_NONE; + break; + + case FD_RIGHT: + __direction = _FLICK_DIRECTION_RIGHT; + break; + + case FD_LEFT: + __direction = _FLICK_DIRECTION_LEFT; + break; + + case FD_UP: + __direction = _FLICK_DIRECTION_UP; + break; + + case FD_DOWN: + __direction = _FLICK_DIRECTION_DOWN; + break; + + default: + break; + } + return true; +} + +bool +_TouchFlickGestureDetector::CalculateFlick(const ArrayListT<_FlickInfo*>* pList, const _FlickInfo* pFlickInfo, _FlickInfo* pReturnFlick) +{ + enum + { + ITEM_EXECUTION, DIRECT_MOVE, FLICK_START + } + + flickStatus = FLICK_START; + + if ((__maxMoveX - __minMoveX) < MIN_MOVE_PXL + && (__maxMoveY - __minMoveY) < MIN_MOVE_PXL) + { + flickStatus = ITEM_EXECUTION; + + pReturnFlick->x = pReturnFlick->y = 0; + pReturnFlick->time = MIN_TIME_WND; + ClearVariables(); + return (flickStatus != ITEM_EXECUTION); + } + + int startIdx = 0; + int endIdx = 0; + int endPosX = 0; + int endPosY = 0; + int endTime = 0; + int startPosX = 0; + int startPosY = 0; + int startTime = 0; + int distanceX = 0; + int distanceY = 0; + int time = 0; + + if (!FindFlickWindow(pList, pFlickInfo, &startIdx, &endIdx)) + { + flickStatus = DIRECT_MOVE; + } + + _FlickInfo* pEndVecPoint = null; + _FlickInfo* pStartVecPoint = null; + + pList->GetAt(endIdx, pEndVecPoint); + pList->GetAt(startIdx, pStartVecPoint); + + if (pEndVecPoint) + { + endPosX = pEndVecPoint->x; + endPosY = pEndVecPoint->y; + } + endTime = pFlickInfo->time; + + if (pStartVecPoint) + { + startPosX = pStartVecPoint->x; + startPosY = pStartVecPoint->y; + startTime = pStartVecPoint->time; + } + + distanceX = endPosX - startPosX; + distanceY = endPosY - startPosY; + time = endTime - startTime; + + if (time < MIN_TIME_WND) + { + time = MIN_TIME_WND; + } + + pReturnFlick->x = distanceX; + pReturnFlick->y = distanceY; + pReturnFlick->time = time; + + if (flickStatus == DIRECT_MOVE) + { + pReturnFlick->x = pReturnFlick->y = 0; + } + + ClearVariables(); + return true; +} + +result +_TouchFlickGestureDetector::OnTouchDown(ArrayListT<_FlickInfo*>* pList, const _FlickInfo* pFlickInfo) +{ + result r = pList->Add(const_cast<_FlickInfo*>(pFlickInfo)); + SysTryReturnResult(NID_UI, r == E_SUCCESS, r, GetErrorMessage(r), "Propagating."); + + CheckMoveMinMax(pFlickInfo->x, pFlickInfo->y); + + return E_SUCCESS; +} + +result +_TouchFlickGestureDetector::OnTouchMove(ArrayListT<_FlickInfo*>* pList, const _FlickInfo* pFlickInfo) +{ + result r = pList->Add(const_cast<_FlickInfo*>(pFlickInfo)); + SysTryReturnResult(NID_UI, r == E_SUCCESS, r, GetErrorMessage(r), "Propagating."); + + CheckMoveMinMax(pFlickInfo->x, pFlickInfo->y); + + return E_SUCCESS; +} + +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, GetErrorMessage(r), "Propagating."); + + CheckMoveMinMax(pFlickInfo->x, pFlickInfo->y); + + _FlickInfo* pTempVecPoint = null; + bool flickEnable = false; + + int count = pList->GetCount(); + for(int i=0; i < count; i++) + { + pList->GetAt(i, pTempVecPoint); + if(pTempVecPoint->touchStatus == _TOUCH_MOVED) + { + flickEnable = true; + break; + } + } + + isFlicked = flickEnable?(CalculateFlick(pList, pFlickInfo, pReturnFlick)):false; + + return E_SUCCESS; +} + +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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + pFlickInfo->time = touchinfo.GetTimeStamp(); + pFlickInfo->x = touchinfo.GetCurrentPosition().x; + pFlickInfo->y = touchinfo.GetCurrentPosition().y; + pFlickInfo->touchStatus = touchinfo.GetTouchStatus(); + + __xDistance = 0; + __yDistance = 0; + __duration = 0; + __direction = _FLICK_DIRECTION_NONE; + + SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_READY); + SetGestureStart(true); + + result r = OnTouchDown(__pFlickInfoList, pFlickInfo); + if (r != E_SUCCESS) + { + delete pFlickInfo; + } + + return false; +} + +bool +_TouchFlickGestureDetector::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + if (touchinfo.GetPointId() != FIRST_POINT_ID) + { + return false; + } + + _FlickInfo* pFlickInfo = new (std::nothrow) _FlickInfo; + 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; + pFlickInfo->y = touchinfo.GetCurrentPosition().y; + pFlickInfo->touchStatus = touchinfo.GetTouchStatus(); + + result r = OnTouchMove(__pFlickInfoList, pFlickInfo); + if (r != E_SUCCESS) + { + delete pFlickInfo; + } + + return false; +} + +bool +_TouchFlickGestureDetector::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + if (touchinfo.GetPointId() != FIRST_POINT_ID) + { + return false; + } + + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + SysTryReturn(NID_UI, pTouchManager, false, E_SYSTEM, "[E_SYSTEM] _TouchManager does not exist."); + + _FlickInfo returnedFlickInfo = {0, }; + + _FlickInfo* pFlickInfo = new (std::nothrow) _FlickInfo; + 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; + pFlickInfo->y = touchinfo.GetCurrentPosition().y; + pFlickInfo->touchStatus = touchinfo.GetTouchStatus(); + + bool isFlicked = false; + + if (pTouchManager->GetPointCount() > 1) //supports only one finger count + { + delete pFlickInfo; + ClearVariables(); + } + else + { + result r = OnTouchUp(__pFlickInfoList, pFlickInfo, &returnedFlickInfo, isFlicked); + if (r != E_SUCCESS) + { + delete pFlickInfo; + } + } + + SetGestureStart(false); + if (isFlicked && (returnedFlickInfo.x != 0 || returnedFlickInfo.y != 0)) + { + __xDistance = returnedFlickInfo.x; + __yDistance = returnedFlickInfo.y; + __duration = returnedFlickInfo.time; + + SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_SUCCESS); + } + else + { + __xDistance = 0; + __yDistance = 0; + __duration = 0; + + SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_FAILED); + } + + return false; +} + +bool +_TouchFlickGestureDetector::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + ClearVariables(); + + return false; +} + +void +_TouchFlickGestureDetector::GetDistance(int& x, int &y) const +{ + x = __xDistance; + y = __yDistance; +} + +void +_TouchFlickGestureDetector::GetDistance(float& x, float &y) const +{ + x = __xDistance; + y = __yDistance; +} + +int +_TouchFlickGestureDetector::GetDuration(void) const +{ + return __duration; +} + +_FlickDirection +_TouchFlickGestureDetector::GetDirection(void) const +{ + return __direction; +} + +}} // Tizen::Ui diff --git a/src/ui/FUi_TouchFlickGestureDetectorImpl.cpp b/src/ui/FUi_TouchFlickGestureDetectorImpl.cpp new file mode 100644 index 0000000..cbb4740 --- /dev/null +++ b/src/ui/FUi_TouchFlickGestureDetectorImpl.cpp @@ -0,0 +1,120 @@ +// +// 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_TouchFlickGestureDetectorImpl.cpp + * @brief This is the implementation file for %_TouchFlickGestureDetectorImpl class + * @version 2.0 + * + * This file contains the implementation of %_TouchFlickGestureDetectorImpl class. + * + */ + +#include +#include "FUi_TouchFlickGestureDetectorImpl.h" +#include "FUi_TouchFlickGestureDetector.h" + +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui +{ + +_TouchFlickGestureDetectorImpl::_TouchFlickGestureDetectorImpl(TouchFlickGestureDetector* pPublic, _TouchFlickGestureDetector* pCore) + : _TouchGestureDetectorImpl(pPublic, pCore) +{ +} + +_TouchFlickGestureDetectorImpl::~_TouchFlickGestureDetectorImpl(void) +{ +} + +_TouchFlickGestureDetectorImpl* +_TouchFlickGestureDetectorImpl::CreateInstanceN(TouchFlickGestureDetector* pPublic) +{ + ClearLastResult(); + + _TouchFlickGestureDetector* pCore = null; + pCore = new (std::nothrow) _TouchFlickGestureDetector; + 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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + return pImpl; + +CATCH: + delete pCore; + + return null; +} + +_TouchFlickGestureDetectorImpl* +_TouchFlickGestureDetectorImpl::GetInstance(TouchFlickGestureDetector& gestureDetector) +{ + return static_cast<_TouchFlickGestureDetectorImpl*> (gestureDetector.__pTouchGestureDetectorImpl); +} + +const _TouchFlickGestureDetectorImpl* +_TouchFlickGestureDetectorImpl::GetInstance(const TouchFlickGestureDetector& gestureDetector) +{ + return static_cast (gestureDetector.__pTouchGestureDetectorImpl); +} + +const _TouchFlickGestureDetector& +_TouchFlickGestureDetectorImpl::GetCore(void) const +{ + return static_cast(_TouchGestureDetectorImpl::GetCore()); +} + +_TouchFlickGestureDetector& +_TouchFlickGestureDetectorImpl::GetCore(void) +{ + return static_cast<_TouchFlickGestureDetector&>(_TouchGestureDetectorImpl::GetCore()); +} + +result +_TouchFlickGestureDetectorImpl::GetDistance(int &x, int &y) const +{ + GetCore().GetDistance(x, y); + + return E_SUCCESS; +} + +result +_TouchFlickGestureDetectorImpl::GetDistance(float &x, float &y) const +{ + GetCore().GetDistance(x, y); + + return E_SUCCESS; +} + +int +_TouchFlickGestureDetectorImpl::GetDuration(void) const +{ + ClearLastResult(); + + return GetCore().GetDuration(); +} + +FlickDirection +_TouchFlickGestureDetectorImpl::GetDirection(void) const +{ + ClearLastResult(); + + return static_cast(GetCore().GetDirection()); +} + +}} //Tizen::Ui diff --git a/src/ui/FUi_TouchGestureDetector.cpp b/src/ui/FUi_TouchGestureDetector.cpp new file mode 100644 index 0000000..7712241 --- /dev/null +++ b/src/ui/FUi_TouchGestureDetector.cpp @@ -0,0 +1,1191 @@ +// +// 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_TouchGestureDetector.cpp + * @brief This is the implementation file for %_TouchGestureDetector class + * @version 2.0 + * + * This file contains the implementation of %_TouchGestureDetector class. + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "FUi_TouchManager.h" +#include "FUi_ITouchFlickGestureEventListener.h" +#include "FUi_ITouchLongPressGestureEventListener.h" +#include "FUi_ITouchTapGestureEventListener.h" +#include "FUi_ITouchPinchGestureEventListener.h" +#include "FUi_ITouchPanningGestureEventListener.h" +#include "FUi_ITouchRotationGestureEventListener.h" +#include "FUi_ITouchCustomGestureEventListener.h" +#include "FUi_TouchFlickGestureDetectorImpl.h" +#include "FUi_TouchLongPressGestureDetectorImpl.h" +#include "FUi_TouchTapGestureDetectorImpl.h" +#include "FUi_TouchPinchGestureDetectorImpl.h" +#include "FUi_TouchPanningGestureDetectorImpl.h" +#include "FUi_TouchRotationGestureDetectorImpl.h" +#include "FUi_ControlManager.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui +{ + +_TouchGestureDetector::_TouchGestureDetector(void) + : __isTouchEventDelayed(false) + , __isTouchCanceledOnSuccess(false) + , __isDetectionStarted(false) + , __currentState(_TOUCH_GESTURE_DETECTOR_STATE_READY) + , __type(_TOUCH_GESTURE_DETECTOR_TYPE_CUSTOM) + , __pUserData(null) + , __pDelegator(null) + , __pWantToFailList(null) + , __pCurrentWantToFailList(null) + , __pEventListenerList(null) +{ + ClearLastResult(); + + __pEventListenerList = new (std::nothrow) LinkedListT<_ITouchGestureEventListener*>; + 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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + __pCurrentWantToFailList = new (std::nothrow) LinkedListT<_TouchGestureDetector*>; + SysTryCatch(NID_UI, __pCurrentWantToFailList, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + __pDelegator = this; + + return; + +CATCH: + if (__pEventListenerList) + { + delete __pEventListenerList; + __pEventListenerList = null; + } + + if (__pWantToFailList) + { + delete __pWantToFailList; + __pWantToFailList = null; + } + + if (__pCurrentWantToFailList) + { + delete __pCurrentWantToFailList; + __pCurrentWantToFailList = null; + } +} + +_TouchGestureDetector::~_TouchGestureDetector(void) +{ + delete __pEventListenerList; + __pEventListenerList = null; + + delete __pWantToFailList; + __pWantToFailList = null; + + delete __pCurrentWantToFailList; + __pCurrentWantToFailList = null; + + __pDelegator = null; +} + +result +_TouchGestureDetector::AddGestureListener(const _ITouchGestureEventListener& listener) +{ + bool exist = __pEventListenerList->Contains(const_cast <_ITouchGestureEventListener*>(&listener)); + if (!exist) + { + SysTryReturnResult(NID_UI, + __pEventListenerList->Add(const_cast <_ITouchGestureEventListener*>(&listener)) == E_SUCCESS, E_SYSTEM, + "System error occurred."); + } + + return E_SUCCESS; +} + +result +_TouchGestureDetector::RemoveGestureListener(const _ITouchGestureEventListener& listener) +{ + if (__pEventListenerList->GetCount() == 0) + { + return E_INVALID_CONDITION; + } + + SysTryReturnResult(NID_UI, + __pEventListenerList->Remove(const_cast <_ITouchGestureEventListener*>(&listener)) == E_SUCCESS, E_SYSTEM, + "System error occurred."); + + return E_SUCCESS; +} + +IListT <_ITouchGestureEventListener*>* +_TouchGestureDetector::GetGestureListenerList(void) const +{ + return __pEventListenerList; +} + +void +_TouchGestureDetector::SetDelegate(const _ITouchGestureDelegate& delegator) +{ + __pDelegator = const_cast<_ITouchGestureDelegate*>(&delegator); +} + +_ITouchGestureDelegate* +_TouchGestureDetector::GetDelegate(void) const +{ + return __pDelegator; +} + +result +_TouchGestureDetector::SetControl(const _Control& control) +{ + __gestureContol = control.GetHandle(); + + return E_SUCCESS; +} + +_Control* +_TouchGestureDetector::GetControl(void) const +{ + _ControlManager* pControlManager = _ControlManager::GetInstance(); + SysTryReturn(NID_UI, pControlManager, null, E_SYSTEM, "[E_SYSTEM] _ControlManager does not exist."); + + return pControlManager->GetObject(__gestureContol); +} + +_TouchGestureDetectorState +_TouchGestureDetector::GetDetectorState(void) const +{ + return __currentState; +} + +void +_TouchGestureDetector::SetDetectorType(_TouchGestureDetectorType type) +{ + __type = type; +} + +_TouchGestureDetectorType +_TouchGestureDetector::GetDetectorType(void) const +{ + return __type; +} + +void +_TouchGestureDetector::SetDelayTouchEventEnabled(bool enabled) +{ + __isTouchEventDelayed = enabled; +} + +bool +_TouchGestureDetector::IsDelayTouchEventEnabled(void) const +{ + return __isTouchEventDelayed; +} + +void +_TouchGestureDetector::SetCancelTouchEventOnSuccessEnabled(bool enabled) +{ + __isTouchCanceledOnSuccess = enabled; +} + +bool +_TouchGestureDetector::IsCancelTouchEventOnSuccessEnabled(void) const +{ + return __isTouchCanceledOnSuccess; +} + +void +_TouchGestureDetector::SetUserData(void* pUserData) +{ + __pUserData = pUserData; +} + +void* +_TouchGestureDetector::GetUserData(void) const +{ + return __pUserData; +} + +bool +_TouchGestureDetector::ExistWaitingList(void) const +{ + bool exist = false; + + if (__pCurrentWantToFailList && (__pCurrentWantToFailList->GetCount() > 0)) + { + exist = true; + } + + return exist; +} + +result +_TouchGestureDetector::StartOnFailureOf(const _TouchGestureDetector& gesture) +{ + 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, "System error occurred."); + } + + return E_SUCCESS; +} + +bool +_TouchGestureDetector::IsPossibleToAddFailList(const _TouchGestureDetector& gesture) +{ + IListT<_TouchGestureDetector*>* pList = gesture.GetWantToFailList(); + if (pList == null) + { + return true; + } + + IEnumeratorT<_TouchGestureDetector*>* pEnumerator = pList->GetEnumeratorN(); + if (pEnumerator) + { + while(pEnumerator->MoveNext() == E_SUCCESS) + { + _TouchGestureDetector* pGesture = null; + pEnumerator->GetCurrent(pGesture); + if (pGesture == null) + { + continue; + } + + if (pGesture == this) + { + delete pEnumerator; + return false; + } + } + delete pEnumerator; + } + return true; +} + +void +_TouchGestureDetector::SetDetectorState(_TouchGestureDetectorState state) +{ + __currentState = state; + + if (state == _TOUCH_GESTURE_DETECTOR_STATE_READY) + { + IEnumeratorT<_TouchGestureDetector*>* pEnumerator = __pWantToFailList->GetEnumeratorN(); + + if (pEnumerator) + { + while(pEnumerator->MoveNext() == E_SUCCESS) + { + _TouchGestureDetector* pGesture = null; + pEnumerator->GetCurrent(pGesture); + if (pGesture == null) + { + continue; + } + + bool exist = __pCurrentWantToFailList->Contains(pGesture); + if (!exist) + { + __pCurrentWantToFailList->Add(pGesture); + } + } + delete pEnumerator; + } + } + + if (state == _TOUCH_GESTURE_DETECTOR_STATE_STARTED || state == _TOUCH_GESTURE_DETECTOR_STATE_CHANGED || state == _TOUCH_GESTURE_DETECTOR_STATE_FINISHED) + { + if (ExistWaitingList()) + { + __isDetectionStarted = true; + __currentState = _TOUCH_GESTURE_DETECTOR_STATE_SUCCESS_AND_WAIT; + return; + } + + _Control* pControl = GetControl(); + if (pControl) + { + IListT <_TouchGestureDetector*>* pList = pControl->GetStartedGestureDetectorListN(); + if (pList) + { + IEnumeratorT<_TouchGestureDetector*>* pEnumerator = pList->GetEnumeratorN(); + if (pEnumerator) + { + while(pEnumerator->MoveNext() == E_SUCCESS) + { + _TouchGestureDetector* pStartedGestureDetector = null; + pEnumerator->GetCurrent(pStartedGestureDetector); + if (pStartedGestureDetector && (pStartedGestureDetector == this)) + { + _TouchGestureDetectorEventType eventType = pStartedGestureDetector->GetGestureDetectorEventType(); + if (eventType == _TOUCH_GESTURE_DETECTOR_EVENT_TYPE_DISCRETE || + (eventType == _TOUCH_GESTURE_DETECTOR_EVENT_TYPE_CONTINUOUS && state == _TOUCH_GESTURE_DETECTOR_STATE_FINISHED)) + { + pControl->SetStartedGestureDetector(*this, _TOUCH_GESTURE_DETECTOR_STATE_SUCCESS); + } + } + } + delete pEnumerator; + } + delete pList; + } + } + + ProcessPublicListener(*this); + ProcessCoreListener(*this); + NotifyStateChanged(); + } + else if (state == _TOUCH_GESTURE_DETECTOR_STATE_FAILED) + { + _Control* pControl = GetControl(); + if (pControl) + { + IListT <_TouchGestureDetector*>* pList = pControl->GetStartedGestureDetectorListN(); + if (pList) + { + IEnumeratorT<_TouchGestureDetector*>* pEnumerator = pList->GetEnumeratorN(); + if (pEnumerator) + { + while(pEnumerator->MoveNext() == E_SUCCESS) + { + _TouchGestureDetector* pStartedGestureDetector = null; + pEnumerator->GetCurrent(pStartedGestureDetector); + if (pStartedGestureDetector && (pStartedGestureDetector == this)) + { + pControl->SetStartedGestureDetector(*this, _TOUCH_GESTURE_DETECTOR_STATE_FAILED); + } + } + delete pEnumerator; + } + delete pList; + } + } + + NotifyStateChanged(); + } + else if (state == _TOUCH_GESTURE_DETECTOR_STATE_CANCELED) + { + if (!IsGestureStarted()) + { + SetToDefaultState(); + } + + SetGestureStart(false); + } + + _TouchGestureDetectorState currentState = GetDetectorState(); + if (( !__isDetectionStarted && currentState == _TOUCH_GESTURE_DETECTOR_STATE_FINISHED) || currentState == _TOUCH_GESTURE_DETECTOR_STATE_FAILED || currentState == _TOUCH_GESTURE_DETECTOR_STATE_SUCCESS) + { + SetToDefaultState(); + } +} + +void +_TouchGestureDetector::SetToDefaultState(void) +{ + __pCurrentWantToFailList->RemoveAll(); + __isDetectionStarted = false; + SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_READY); +} + +_TouchGestureDetectorEventType +_TouchGestureDetector::GetGestureDetectorEventType(void) +{ + _TouchGestureDetectorType type = GetDetectorType(); + + if (type == _TOUCH_GESTURE_DETECTOR_TYPE_PINCH ||type == _TOUCH_GESTURE_DETECTOR_TYPE_CUSTOM + ||type == _TOUCH_GESTURE_DETECTOR_TYPE_ROTATION || type == _TOUCH_GESTURE_DETECTOR_TYPE_PANNING) + { + return _TOUCH_GESTURE_DETECTOR_EVENT_TYPE_CONTINUOUS; + } + else + { + return _TOUCH_GESTURE_DETECTOR_EVENT_TYPE_DISCRETE; + } +} + +String +_TouchGestureDetector::GetDescription(void) +{ + String type(L""); + + switch (GetDetectorType()) + { + case _TOUCH_GESTURE_DETECTOR_TYPE_CUSTOM: + type = L"_TOUCH_GESTURE_DETECTOR_TYPE_CUSTOM"; + break; + + case _TOUCH_GESTURE_DETECTOR_TYPE_TAP: + type = L"_TOUCH_GESTURE_DETECTOR_TYPE_TAP"; + break; + + case _TOUCH_GESTURE_DETECTOR_TYPE_LONG_PRESS: + type = L"_TOUCH_GESTURE_DETECTOR_TYPE_LONG_PRESS"; + break; + + case _TOUCH_GESTURE_DETECTOR_TYPE_PINCH: + type = L"_TOUCH_GESTURE_DETECTOR_TYPE_PINCH"; + break; + + case _TOUCH_GESTURE_DETECTOR_TYPE_FLICK: + type = L"_TOUCH_GESTURE_DETECTOR_TYPE_FLICK"; + break; + + case _TOUCH_GESTURE_DETECTOR_TYPE_ROTATION: + type = L"_TOUCH_GESTURE_DETECTOR_TYPE_ROTATION"; + break; + + case _TOUCH_GESTURE_DETECTOR_TYPE_PANNING: + type = L"_TOUCH_GESTURE_DETECTOR_TYPE_PANNING"; + break; + + default: + break; + } + + String description(L""); + + description.Format(LOG_LEN_MAX, L"%ls state(%d) delay(%d) cancelonSuccess(%d)", + type.GetPointer(), GetDetectorState(), + IsDelayTouchEventEnabled(), IsCancelTouchEventOnSuccessEnabled()); + + return description; +} + +IListT <_TouchGestureDetector*>* +_TouchGestureDetector::GetWantToFailList(void) const +{ + return __pWantToFailList; +} + +void +_TouchGestureDetector::ProcessPublicListener(_TouchGestureDetector& gesture) +{ + _TouchGestureDetectorImpl* pImpl = static_cast<_TouchGestureDetectorImpl*>(gesture.GetUserData()); + if (!pImpl) + { + return; + } + + IListT* pPublicList = pImpl->GetGestureEventListenerList(); + if (!pPublicList) + { + return; + } + + IEnumeratorT* pEnumerator = pPublicList->GetEnumeratorN(); + SysTryReturnVoidResult(NID_UI, pEnumerator, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + while(pEnumerator->MoveNext() == E_SUCCESS) + { + ITouchGestureEventListener* pListener = null; + pEnumerator->GetCurrent(pListener); + + if (pListener == null) + { + continue; + } + + switch(gesture.GetDetectorType()) + { + case _TOUCH_GESTURE_DETECTOR_TYPE_TAP: + { + ITouchTapGestureEventListener* pPublicListener = dynamic_cast(pListener); + TouchTapGestureDetector* pPublicGestureDetector = dynamic_cast(dynamic_cast(&pImpl->GetPublic())); + + if (pPublicListener && pPublicGestureDetector) + { + if (gesture.GetDetectorState() == _TOUCH_GESTURE_DETECTOR_STATE_CANCELED) + { + pPublicListener->OnTapGestureCanceled(*pPublicGestureDetector); + gesture.SetToDefaultState(); + } + else if (gesture.GetDetectorState() == _TOUCH_GESTURE_DETECTOR_STATE_SUCCESS) + { + pPublicListener->OnTapGestureDetected(*pPublicGestureDetector); + } + } + } + break; + + case _TOUCH_GESTURE_DETECTOR_TYPE_LONG_PRESS: + { + ITouchLongPressGestureEventListener* pPublicListener = dynamic_cast(pListener); + TouchLongPressGestureDetector* pPublicGestureDetector = dynamic_cast(dynamic_cast(&pImpl->GetPublic())); + + if (pPublicListener && pPublicGestureDetector) + { + if (gesture.GetDetectorState() == _TOUCH_GESTURE_DETECTOR_STATE_CANCELED) + { + pPublicListener->OnLongPressGestureCanceled(*pPublicGestureDetector); + gesture.SetToDefaultState(); + } + else if (gesture.GetDetectorState() == _TOUCH_GESTURE_DETECTOR_STATE_SUCCESS) + { + pPublicListener->OnLongPressGestureDetected(*pPublicGestureDetector); + } + } + } + break; + + case _TOUCH_GESTURE_DETECTOR_TYPE_PINCH: + { + ITouchPinchGestureEventListener* pPublicListener = dynamic_cast(pListener); + TouchPinchGestureDetector* pPublicGestureDetector = dynamic_cast(dynamic_cast(&pImpl->GetPublic())); + + if (pPublicListener && pPublicGestureDetector) + { + switch(gesture.GetDetectorState()) + { + case _TOUCH_GESTURE_DETECTOR_STATE_STARTED: + pPublicListener->OnPinchGestureStarted(*pPublicGestureDetector); + break; + + case _TOUCH_GESTURE_DETECTOR_STATE_CHANGED: + pPublicListener->OnPinchGestureChanged(*pPublicGestureDetector); + break; + + case _TOUCH_GESTURE_DETECTOR_STATE_FINISHED: + pPublicListener->OnPinchGestureFinished(*pPublicGestureDetector); + break; + + case _TOUCH_GESTURE_DETECTOR_STATE_CANCELED: + pPublicListener->OnPinchGestureCanceled(*pPublicGestureDetector); + gesture.SetToDefaultState(); + break; + + default: + break; + } + } + } + break; + + case _TOUCH_GESTURE_DETECTOR_TYPE_FLICK: + { + ITouchFlickGestureEventListener* pPublicListener = dynamic_cast(pListener); + TouchFlickGestureDetector* pPublicGestureDetector = dynamic_cast(dynamic_cast(&pImpl->GetPublic())); + + if (pPublicListener && pPublicGestureDetector) + { + if (gesture.GetDetectorState() == _TOUCH_GESTURE_DETECTOR_STATE_CANCELED) + { + pPublicListener->OnFlickGestureCanceled(*pPublicGestureDetector); + gesture.SetToDefaultState(); + } + else if (gesture.GetDetectorState() == _TOUCH_GESTURE_DETECTOR_STATE_SUCCESS) + { + pPublicListener->OnFlickGestureDetected(*pPublicGestureDetector); + } + } + } + break; + + case _TOUCH_GESTURE_DETECTOR_TYPE_ROTATION: + { + ITouchRotationGestureEventListener* pPublicListener = dynamic_cast(pListener); + TouchRotationGestureDetector* pPublicGestureDetector = dynamic_cast(dynamic_cast(&pImpl->GetPublic())); + + if (pPublicListener && pPublicGestureDetector) + { + switch(gesture.GetDetectorState()) + { + case _TOUCH_GESTURE_DETECTOR_STATE_STARTED: + pPublicListener->OnRotationGestureStarted(*pPublicGestureDetector); + break; + + case _TOUCH_GESTURE_DETECTOR_STATE_CHANGED: + pPublicListener->OnRotationGestureChanged(*pPublicGestureDetector); + break; + + case _TOUCH_GESTURE_DETECTOR_STATE_FINISHED: + pPublicListener->OnRotationGestureFinished(*pPublicGestureDetector); + break; + + case _TOUCH_GESTURE_DETECTOR_STATE_CANCELED: + pPublicListener->OnRotationGestureCanceled(*pPublicGestureDetector); + gesture.SetToDefaultState(); + break; + + default: + break; + } + } + } + break; + + case _TOUCH_GESTURE_DETECTOR_TYPE_PANNING: + { + ITouchPanningGestureEventListener* pPublicListener = dynamic_cast(pListener); + TouchPanningGestureDetector* pPublicGestureDetector = dynamic_cast(dynamic_cast(&pImpl->GetPublic())); + + if (pPublicListener && pPublicGestureDetector) + { + switch(gesture.GetDetectorState()) + { + case _TOUCH_GESTURE_DETECTOR_STATE_STARTED: + pPublicListener->OnPanningGestureStarted(*pPublicGestureDetector); + break; + + case _TOUCH_GESTURE_DETECTOR_STATE_CHANGED: + pPublicListener->OnPanningGestureChanged(*pPublicGestureDetector); + break; + + case _TOUCH_GESTURE_DETECTOR_STATE_FINISHED: + pPublicListener->OnPanningGestureFinished(*pPublicGestureDetector); + break; + + case _TOUCH_GESTURE_DETECTOR_STATE_CANCELED: + pPublicListener->OnPanningGestureCanceled(*pPublicGestureDetector); + gesture.SetToDefaultState(); + break; + + default: + break; + } + } + } + break; + + case _TOUCH_GESTURE_DETECTOR_TYPE_CUSTOM: + default: + { + ITouchCustomGestureEventListener* pPublicListener = dynamic_cast(pListener); + + if (pPublicListener) + { + switch(gesture.GetDetectorState()) + { + case _TOUCH_GESTURE_DETECTOR_STATE_STARTED: + pPublicListener->OnCustomGestureStarted(pImpl->GetPublic()); + break; + + case _TOUCH_GESTURE_DETECTOR_STATE_CHANGED: + pPublicListener->OnCustomGestureChanged(pImpl->GetPublic()); + break; + + case _TOUCH_GESTURE_DETECTOR_STATE_SUCCESS: + pPublicListener->OnCustomGestureFinished(pImpl->GetPublic()); + break; + + case _TOUCH_GESTURE_DETECTOR_STATE_CANCELED: + pPublicListener->OnCustomGestureCanceled(pImpl->GetPublic()); + gesture.SetToDefaultState(); + break; + + default: + break; + } + } + } + break; + } + } + delete pEnumerator; +} + +void +_TouchGestureDetector::ProcessCoreListener(_TouchGestureDetector& gesture) +{ + IListT <_ITouchGestureEventListener*>* pList = gesture.GetGestureListenerList(); + if (!pList) + { + return; + } + + IEnumeratorT<_ITouchGestureEventListener*>* pEnumerator = pList->GetEnumeratorN(); + SysTryReturnVoidResult(NID_UI, pEnumerator, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + while(pEnumerator->MoveNext() == E_SUCCESS) + { + _ITouchGestureEventListener* pListener = null; + pEnumerator->GetCurrent(pListener); + + if (pListener == null) + { + continue; + } + + switch(gesture.GetDetectorType()) + { + case _TOUCH_GESTURE_DETECTOR_TYPE_TAP: + { + _ITouchTapGestureEventListener* pCoreListener = dynamic_cast<_ITouchTapGestureEventListener*>(pListener); + _TouchTapGestureDetector* pCoreGestureDetector = dynamic_cast<_TouchTapGestureDetector*>(&gesture); + + if (pCoreListener && pCoreGestureDetector) + { + if (pCoreGestureDetector->GetDetectorState() == _TOUCH_GESTURE_DETECTOR_STATE_CANCELED) + { + pCoreListener->OnTapGestureCanceled(*pCoreGestureDetector); + pCoreGestureDetector->SetToDefaultState(); + } + else if (pCoreGestureDetector->GetDetectorState() == _TOUCH_GESTURE_DETECTOR_STATE_SUCCESS) + { + pCoreListener->OnTapGestureDetected(*pCoreGestureDetector); + } + } + } + break; + + case _TOUCH_GESTURE_DETECTOR_TYPE_LONG_PRESS: + { + _ITouchLongPressGestureEventListener* pCoreListener = dynamic_cast<_ITouchLongPressGestureEventListener*>(pListener); + _TouchLongPressGestureDetector* pCoreGestureDetector = dynamic_cast<_TouchLongPressGestureDetector*>(&gesture); + + if (pCoreListener && pCoreGestureDetector) + { + if (pCoreGestureDetector->GetDetectorState() == _TOUCH_GESTURE_DETECTOR_STATE_CANCELED) + { + pCoreListener->OnLongPressGestureCanceled(*pCoreGestureDetector); + pCoreGestureDetector->SetToDefaultState(); + } + else if (pCoreGestureDetector->GetDetectorState() == _TOUCH_GESTURE_DETECTOR_STATE_SUCCESS) + { + pCoreListener->OnLongPressGestureDetected(*pCoreGestureDetector); + } + } + } + break; + + case _TOUCH_GESTURE_DETECTOR_TYPE_PINCH: + { + _ITouchPinchGestureEventListener* pCoreListener = dynamic_cast<_ITouchPinchGestureEventListener*>(pListener); + _TouchPinchGestureDetector* pCoreGestureDetector = dynamic_cast<_TouchPinchGestureDetector*>(&gesture); + + if (pCoreListener && pCoreGestureDetector) + { + switch(GetDetectorState()) + { + case _TOUCH_GESTURE_DETECTOR_STATE_STARTED: + pCoreListener->OnPinchGestureStarted(*pCoreGestureDetector); + break; + + case _TOUCH_GESTURE_DETECTOR_STATE_CHANGED: + pCoreListener->OnPinchGestureChanged(*pCoreGestureDetector); + break; + + case _TOUCH_GESTURE_DETECTOR_STATE_FINISHED: + pCoreListener->OnPinchGestureFinished(*pCoreGestureDetector); + break; + + case _TOUCH_GESTURE_DETECTOR_STATE_CANCELED: + pCoreListener->OnPinchGestureCanceled(*pCoreGestureDetector); + pCoreGestureDetector->SetToDefaultState(); + break; + + default: + break; + } + } + } + break; + + case _TOUCH_GESTURE_DETECTOR_TYPE_FLICK: + { + _ITouchFlickGestureEventListener* pCoreListener = dynamic_cast<_ITouchFlickGestureEventListener*>(pListener); + _TouchFlickGestureDetector* pCoreGestureDetector = dynamic_cast<_TouchFlickGestureDetector*>(&gesture); + + if (pCoreListener && pCoreGestureDetector) + { + if (pCoreGestureDetector->GetDetectorState() == _TOUCH_GESTURE_DETECTOR_STATE_CANCELED) + { + pCoreListener->OnFlickGestureCanceled(*pCoreGestureDetector); + pCoreGestureDetector->SetToDefaultState(); + } + else if (pCoreGestureDetector->GetDetectorState() == _TOUCH_GESTURE_DETECTOR_STATE_SUCCESS) + { + pCoreListener->OnFlickGestureDetected(*pCoreGestureDetector); + } + } + } + break; + + case _TOUCH_GESTURE_DETECTOR_TYPE_ROTATION: + { + _ITouchRotationGestureEventListener* pCoreListener = dynamic_cast<_ITouchRotationGestureEventListener*>(pListener); + _TouchRotationGestureDetector* pCoreGestureDetector = dynamic_cast<_TouchRotationGestureDetector*>(&gesture); + + if (pCoreListener && pCoreGestureDetector) + { + switch(GetDetectorState()) + { + case _TOUCH_GESTURE_DETECTOR_STATE_STARTED: + pCoreListener->OnRotationGestureStarted(*pCoreGestureDetector); + break; + + case _TOUCH_GESTURE_DETECTOR_STATE_CHANGED: + pCoreListener->OnRotationGestureChanged(*pCoreGestureDetector); + break; + + case _TOUCH_GESTURE_DETECTOR_STATE_FINISHED: + pCoreListener->OnRotationGestureFinished(*pCoreGestureDetector); + break; + + case _TOUCH_GESTURE_DETECTOR_STATE_CANCELED: + pCoreListener->OnRotationGestureCanceled(*pCoreGestureDetector); + pCoreGestureDetector->SetToDefaultState(); + break; + + default: + break; + } + } + } + break; + + case _TOUCH_GESTURE_DETECTOR_TYPE_PANNING: + { + _ITouchPanningGestureEventListener* pCoreListener = dynamic_cast<_ITouchPanningGestureEventListener*>(pListener); + _TouchPanningGestureDetector* pCoreGestureDetector = dynamic_cast<_TouchPanningGestureDetector*>(&gesture); + + if (pCoreListener && pCoreGestureDetector) + { + switch(GetDetectorState()) + { + case _TOUCH_GESTURE_DETECTOR_STATE_STARTED: + pCoreListener->OnPanningGestureStarted(*pCoreGestureDetector); + break; + + case _TOUCH_GESTURE_DETECTOR_STATE_CHANGED: + pCoreListener->OnPanningGestureChanged(*pCoreGestureDetector); + break; + + case _TOUCH_GESTURE_DETECTOR_STATE_FINISHED: + pCoreListener->OnPanningGestureFinished(*pCoreGestureDetector); + break; + + case _TOUCH_GESTURE_DETECTOR_STATE_CANCELED: + pCoreListener->OnPanningGestureCanceled(*pCoreGestureDetector); + pCoreGestureDetector->SetToDefaultState(); + break; + + default: + break; + } + } + } + break; + + case _TOUCH_GESTURE_DETECTOR_TYPE_CUSTOM: + default: + { + _ITouchCustomGestureEventListener* pCoreListener = dynamic_cast<_ITouchCustomGestureEventListener*>(pListener); + + if (pCoreListener) + { + switch(GetDetectorState()) + { + case _TOUCH_GESTURE_DETECTOR_STATE_STARTED: + pCoreListener->OnCustomGestureStarted(gesture); + break; + + case _TOUCH_GESTURE_DETECTOR_STATE_CHANGED: + pCoreListener->OnCustomGestureChanged(gesture); + break; + + case _TOUCH_GESTURE_DETECTOR_STATE_SUCCESS: + pCoreListener->OnCustomGestureFinished(gesture); + break; + + case _TOUCH_GESTURE_DETECTOR_STATE_CANCELED: + pCoreListener->OnCustomGestureCanceled(gesture); + gesture.SetToDefaultState(); + break; + + default: + break; + } + } + } + break; + } + } + delete pEnumerator; +} + +void +_TouchGestureDetector::NotifyStateChanged(void) +{ + _ControlManager* pControlManager = _ControlManager::GetInstance(); + SysTryReturnVoidResult(NID_UI, pControlManager, E_SYSTEM, "[E_SYSTEM] _ControlManager does not exist."); + + _Control* pControl = GetControl(); + SysTryReturnVoidResult(NID_UI, pControl, E_INVALID_CONDITION, "[E_INVALID_CONDITION] invalid GestureDetectorControl()"); + + IListT<_TouchGestureDetector*>* pGestureList = pControlManager->GetGestureDetectorList(); + if (!pGestureList || (pGestureList && pGestureList->GetCount() == 0)) + { + pGestureList = pControl->GetGestureDetectorList(); + } + + if (pGestureList) + { + IEnumeratorT<_TouchGestureDetector*>* pEnumerator = pGestureList->GetEnumeratorN(); + if (pEnumerator) + { + while(pEnumerator->MoveNext() == E_SUCCESS) + { + _TouchGestureDetector* pGestureDetector = null; + pEnumerator->GetCurrent(pGestureDetector); + if (pGestureDetector == null || !pGestureDetector->ExistWaitingList()) + { + continue; + } + + IListT<_TouchGestureDetector*>* pWaitingList = pGestureDetector->GetWantToFailList(); + if (pWaitingList) + { + IEnumeratorT<_TouchGestureDetector*>* pWaitingEnumerator = pWaitingList->GetEnumeratorN(); + if (pWaitingEnumerator) + { + while(pWaitingEnumerator->MoveNext() == E_SUCCESS) + { + _TouchGestureDetector* pWaitingGestureDetector = null; + pWaitingEnumerator->GetCurrent(pWaitingGestureDetector); + if (pWaitingGestureDetector == null) + { + continue; + } + + if (pWaitingGestureDetector == this) + { + pGestureDetector->OnGestureDetectorStateChanged(*this); + } + } + delete pWaitingEnumerator; + } + } + } + delete pEnumerator; + } + } + + ProcessGestureCondition(); +} + +void +_TouchGestureDetector::ProcessGestureCondition(void) +{ + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + SysTryReturnVoidResult(NID_UI, pTouchManager, E_SYSTEM, "[E_SYSTEM] _ControlManager does not exist."); + + _Control* pControl = GetControl(); + SysTryReturnVoidResult(NID_UI, pControl, E_INVALID_CONDITION, "[E_INVALID_CONDITION] invalid GestureDetectorControl()"); + + //send delayed touch event when all gestures set delayed touch events decided its state(success or failed) and all failed. + if (!pControl->IsDelayedTouchEventEnabled() && pControl->IsPossibleToSendDelayedTouchEvent() && !pControl->IsSentDelayedEvent()) + { + SendDelayedTouchEvent(pControl); + } + + if (pControl->IsCancelOnGestureSuccess()) + { + pTouchManager->SetTouchCancelOnGesture(true); + pTouchManager->SetTouchCanceled(null); + pTouchManager->SetTouchCanceledOnGestureSuccess(true); + } + + bool allDetected = true; + IMapEnumeratorT <_TouchGestureDetector*, _TouchGestureDetectorState>* pMapEnumerator = pControl->GetStartedGestureDetectorEnumeratorN(); + if (pMapEnumerator) + { + while(pMapEnumerator->MoveNext() == E_SUCCESS) + { + _TouchGestureDetectorState state = _TOUCH_GESTURE_DETECTOR_STATE_READY; + pMapEnumerator->GetValue(state); + + if (state == _TOUCH_GESTURE_DETECTOR_STATE_STARTED) + { + allDetected = false; + break; + } + } + delete pMapEnumerator; + } + + if (allDetected) + { + pControl->ClearStartedGestureDetectorList(); + } +} + +void +_TouchGestureDetector::SendDelayedTouchEvent(_Control* pControl) +{ + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + SysTryReturnVoidResult(NID_UI, pTouchManager, E_SYSTEM, "[E_SYSTEM] _ControlManager does not exist."); + + //send delayed event if all started gesture are failed. + IListT<_TouchInfo*>* pList = pControl->GetTouchInfoList(); + if (pList) + { + IEnumeratorT<_TouchInfo*>* pEnumerator = pList->GetEnumeratorN(); + if (pEnumerator) + { + while(pEnumerator->MoveNext() == E_SUCCESS) + { + _TouchInfo* pTouchInfo = null; + pEnumerator->GetCurrent(pTouchInfo); + if (pTouchInfo == null) + { + continue; + } + + pControl->SetSendingDelayedEvent(true); + pTouchManager->SendEvent(pControl, *pTouchInfo); + } + delete pEnumerator; + pControl->SetSendingDelayedEvent(false); + pControl->SetSentDelayedEvent(true); + } + } +} + +IListT<_TouchGestureDetector*>* +_TouchGestureDetector::GetCurrentWantToFailList(void) const +{ + return __pCurrentWantToFailList; +} + +void +_TouchGestureDetector::OnGestureDetectorStateChanged(const _TouchGestureDetector& gestureDetector) +{ + if (GetDetectorState() == _TOUCH_GESTURE_DETECTOR_STATE_SUCCESS_AND_WAIT) + { + _TouchGestureDetectorState state = gestureDetector.GetDetectorState(); + if (state == _TOUCH_GESTURE_DETECTOR_STATE_SUCCESS) + { + SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_FAILED); + } + else if (state == _TOUCH_GESTURE_DETECTOR_STATE_FAILED) + { + IListT<_TouchGestureDetector*>* pWaitingList = GetCurrentWantToFailList(); + if (pWaitingList) + { + bool exist = pWaitingList->Contains(const_cast<_TouchGestureDetector*>(&gestureDetector)); + if (exist) + { + _TouchGestureDetector* pGestureDetector = const_cast<_TouchGestureDetector*>(&gestureDetector); + pWaitingList->Remove(pGestureDetector); + } + } + _TouchGestureDetectorType type = GetDetectorType(); + if (type != _TOUCH_GESTURE_DETECTOR_TYPE_PINCH && type != _TOUCH_GESTURE_DETECTOR_TYPE_ROTATION && type != _TOUCH_GESTURE_DETECTOR_TYPE_PANNING) + { + SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_SUCCESS); + } + } + } + else if (GetDetectorState() == _TOUCH_GESTURE_DETECTOR_STATE_READY) + { + _TouchGestureDetectorState state = gestureDetector.GetDetectorState(); + + if (state == _TOUCH_GESTURE_DETECTOR_STATE_SUCCESS) + { + SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_FAILED); + } + else if (state == _TOUCH_GESTURE_DETECTOR_STATE_FAILED) + { + IListT<_TouchGestureDetector*>* pWaitingList = GetCurrentWantToFailList(); + if (pWaitingList) + { + bool exist = pWaitingList->Contains(const_cast<_TouchGestureDetector*>(&gestureDetector)); + if (exist) + { + _TouchGestureDetector* pGestureDetector = const_cast<_TouchGestureDetector*>(&gestureDetector); + pWaitingList->Remove(pGestureDetector); + } + } + } + } +} + +void +_TouchGestureDetector::SetGestureStart(bool start) +{ + __isDetectionStarted = start; + + if (start == true) + { + _Control* pControl = GetControl(); + if (pControl) + { + pControl->AddStartedGestureDetector(*this, _TOUCH_GESTURE_DETECTOR_STATE_STARTED); + } + } +} + +bool +_TouchGestureDetector::IsGestureStarted(void) const +{ + return __isDetectionStarted; +} + +bool +_TouchGestureDetector::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + return false; +} + +bool +_TouchGestureDetector::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + return false; +} + +bool +_TouchGestureDetector::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + return false; +} + +bool +_TouchGestureDetector::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + return false; +} + +void +_TouchGestureDetector::OnTouchGestureDetectorAdded(void) +{ +} + +void +_TouchGestureDetector::OnTouchGestureDetectorRemoved(void) +{ +} + +}} // Tizen::Ui diff --git a/src/ui/FUi_TouchGestureDetectorImpl.cpp b/src/ui/FUi_TouchGestureDetectorImpl.cpp new file mode 100644 index 0000000..9e03c3c --- /dev/null +++ b/src/ui/FUi_TouchGestureDetectorImpl.cpp @@ -0,0 +1,358 @@ +// +// 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_TouchGestureDetectorImpl.cpp + * @brief This is the implementation file for %_TouchGestureDetectorImpl class + * @version 2.0 + * + * This file contains the implementation of %_TouchGestureDetectorImpl class. + * + */ + +#include +#include +#include "FUi_TouchGestureDetectorImpl.h" +#include "FUi_ITouchEventListener.h" +#include "FUi_TouchEventArg.h" +#include "FUi_TouchManager.h" + +using namespace Tizen::Base::Collection; + +namespace Tizen { namespace Ui +{ + +_TouchGestureDetectorImpl::_TouchGestureDetectorImpl(TouchGestureDetector* pPublic, _TouchGestureDetector* pCore) + : __pPublicGestureEventListenerList(null) +{ + __pPublicGestureDetector = pPublic; + __pCoreGestureDetector = pCore; + + __pPublicGestureEventListenerList = new (std::nothrow) LinkedListT; + SysTryReturnVoidResult(NID_UI, __pPublicGestureEventListenerList, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + pCore->SetUserData(this); + pCore->SetDelegate(*this); + + ClearLastResult(); +} + +_TouchGestureDetectorImpl* +_TouchGestureDetectorImpl::CreateInstanceN(TouchGestureDetector* pPublic) +{ + ClearLastResult(); + + _TouchGestureDetector* pCore = null; + pCore = new (std::nothrow) _TouchGestureDetector; + 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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + ClearLastResult(); + + return pImpl; + +CATCH: + delete pCore; + + return null; +} + +_TouchGestureDetectorImpl::~_TouchGestureDetectorImpl(void) +{ + delete __pPublicGestureEventListenerList; + __pPublicGestureEventListenerList = null; + + delete __pCoreGestureDetector; + __pCoreGestureDetector = null; + + ClearLastResult(); +} + +const _TouchGestureDetector& +_TouchGestureDetectorImpl::GetCore(void) const +{ + return *__pCoreGestureDetector; +} + +_TouchGestureDetector& +_TouchGestureDetectorImpl::GetCore(void) +{ + return *__pCoreGestureDetector; +} + +const TouchGestureDetector& +_TouchGestureDetectorImpl::GetPublic(void) const +{ + return *__pPublicGestureDetector; +} + +TouchGestureDetector& +_TouchGestureDetectorImpl::GetPublic(void) +{ + return *__pPublicGestureDetector; +} + +_TouchGestureDetectorImpl* +_TouchGestureDetectorImpl::GetInstance(TouchGestureDetector& gestureDetector) +{ + return gestureDetector.__pTouchGestureDetectorImpl; +} + +const _TouchGestureDetectorImpl* +_TouchGestureDetectorImpl::GetInstance(const TouchGestureDetector& gestureDetector) +{ + return gestureDetector.__pTouchGestureDetectorImpl; +} + +result +_TouchGestureDetectorImpl::AddGestureEventListener(ITouchGestureEventListener& listener) +{ + bool exist = __pPublicGestureEventListenerList->Contains(const_cast(&listener)); + if (exist) + { + return E_OBJ_ALREADY_EXIST; + } + + result r = __pPublicGestureEventListenerList->Add(&listener); + SysTryReturnResult(NID_UI, r == E_SUCCESS, r, GetErrorMessage(r), "Propagating."); + + return E_SUCCESS; +} + +result +_TouchGestureDetectorImpl::RemoveGestureEventListener(ITouchGestureEventListener& listener) +{ + result r = __pPublicGestureEventListenerList->Remove(&listener); + SysTryReturnResult(NID_UI, r == E_SUCCESS, r, GetErrorMessage(r), "Propagating."); + + return E_SUCCESS; +} + +IListT * +_TouchGestureDetectorImpl::GetGestureEventListenerList(void) const +{ + return __pPublicGestureEventListenerList; +} + +result +_TouchGestureDetectorImpl::SetDetectorState(TouchGestureDetectorState state) +{ + GetCore().SetDetectorState(static_cast<_TouchGestureDetectorState>(state)); + + return E_SUCCESS; +} + +TouchGestureDetectorState +_TouchGestureDetectorImpl::GetDetectorState(void) const +{ + ClearLastResult(); + + return static_cast(GetCore().GetDetectorState()); +} + +Control* +_TouchGestureDetectorImpl::GetControl(void) const +{ + _Control* pControl = GetCore().GetControl(); + SysTryReturn(NID_UI, pControl, null, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + ClearLastResult(); + + _ControlImpl* pControlImpl = static_cast<_ControlImpl*>(pControl->GetUserData()); + return &(pControlImpl->GetPublic()); +} + +result +_TouchGestureDetectorImpl::SetDelayTouchEventEnabled(bool enable) +{ + GetCore().SetDelayTouchEventEnabled(enable); + + return E_SUCCESS; +} + +bool +_TouchGestureDetectorImpl::IsDelayTouchEventEnabled(void) const +{ + ClearLastResult(); + + return GetCore().IsDelayTouchEventEnabled(); +} + +result +_TouchGestureDetectorImpl::SetCancelTouchEventOnSuccessEnabled(bool enable) +{ + GetCore().SetCancelTouchEventOnSuccessEnabled(enable); + + return E_SUCCESS; +} + +bool +_TouchGestureDetectorImpl::IsCancelTouchEventOnSuccessEnabled(void) const +{ + ClearLastResult(); + + return GetCore().IsCancelTouchEventOnSuccessEnabled(); +} + +result +_TouchGestureDetectorImpl::StartOnFailureOf(const TouchGestureDetector& gesture) +{ + const _TouchGestureDetectorImpl* pImpl = GetInstance(gesture); + 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)); + + return r; +} + +bool +_TouchGestureDetectorImpl::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + //public + TouchGestureDetector& publicDetector = GetPublic(); + Control* pControl = static_cast(source.GetUserData()); + _TouchEventArg* pEventArg = null; + + if (pControl) + { + TouchEventInfo publicTouchInfo; + + pEventArg = GetTouchEventArgN(*pControl, touchinfo); + SysTryReturn(NID_UI, pEventArg, false, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + publicTouchInfo.Construct(*pEventArg); + + publicDetector.OnTouchPressed(*pControl, publicTouchInfo); + } + + //core + _TouchGestureDetector& coreDetector = GetCore(); + + coreDetector.OnTouchPressed(source, touchinfo); + + delete pEventArg; + return false; +} + +bool +_TouchGestureDetectorImpl::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + //public + TouchGestureDetector& publicDetector = GetPublic(); + Control* pControl = static_cast(source.GetUserData()); + _TouchEventArg* pEventArg = null; + + if (pControl) + { + TouchEventInfo publicTouchInfo; + + pEventArg = GetTouchEventArgN(*pControl, touchinfo); + SysTryReturn(NID_UI, pEventArg, false, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + publicTouchInfo.Construct(*pEventArg); + + publicDetector.OnTouchMoved(*pControl, publicTouchInfo); + } + + //core + _TouchGestureDetector& coreDetector = GetCore(); + + coreDetector.OnTouchMoved(source, touchinfo); + + delete pEventArg; + return false; +} + +bool +_TouchGestureDetectorImpl::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + //public + TouchGestureDetector& publicDetector = GetPublic(); + Control* pControl = static_cast(source.GetUserData()); + _TouchEventArg* pEventArg = null; + + if (pControl) + { + TouchEventInfo publicTouchInfo; + + pEventArg = GetTouchEventArgN(*pControl, touchinfo); + SysTryReturn(NID_UI, pEventArg, false, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + publicTouchInfo.Construct(*pEventArg); + + publicDetector.OnTouchReleased(*pControl, publicTouchInfo); + } + + //core + _TouchGestureDetector& coreDetector = GetCore(); + + coreDetector.OnTouchReleased(source, touchinfo); + + delete pEventArg; + return false; +} + +bool +_TouchGestureDetectorImpl::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + //public + TouchGestureDetector& publicDetector = GetPublic(); + Control* pControl = static_cast(source.GetUserData()); + _TouchEventArg* pEventArg = null; + + if (pControl) + { + TouchEventInfo publicTouchInfo; + + pEventArg = GetTouchEventArgN(*pControl, touchinfo); + SysTryReturn(NID_UI, pEventArg, false, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + publicTouchInfo.Construct(*pEventArg); + + publicDetector.OnTouchCanceled(*pControl, publicTouchInfo); + } + + //core + _TouchGestureDetector& coreDetector = GetCore(); + coreDetector.OnTouchCanceled(source, touchinfo); + + delete pEventArg; + return false; +} + + +_TouchEventArg* +_TouchGestureDetectorImpl::GetTouchEventArgN(const Control& source, const _TouchInfo& touchInfo) +{ + ClearLastResult(); + + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + 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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + pEventArg->SetTouchPosition(touchInfo.GetPointId(), pTouchManager->GetStartPoint(touchInfo.GetPointId()).x, + pTouchManager->GetStartPoint(touchInfo.GetPointId()).y, + touchInfo.GetCurrentPosition().x, touchInfo.GetCurrentPosition().y); + + return pEventArg; +} + +} } //Tizen::Ui diff --git a/src/ui/FUi_TouchGestureTimerManager.cpp b/src/ui/FUi_TouchGestureTimerManager.cpp new file mode 100644 index 0000000..e22a27d --- /dev/null +++ b/src/ui/FUi_TouchGestureTimerManager.cpp @@ -0,0 +1,283 @@ +// +// 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_TouchGestureTimerManager.cpp + * @brief This is the implementation file for %_TouchGestureTimerManager class + * @version 2.0 + * + * This file contains the implementation of %_TouchGestureTimerManager class. + * + */ + +// includes +#include "FUi_ControlManager.h" +#include "FUi_TouchGestureTimerManager.h" +#include "FUi_TouchTapGestureDetector.h" +#include "FUi_TouchLongPressGestureDetector.h" +#include "FUi_Control.h" + +using namespace Tizen::Base::Collection; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui +{ +class _TouchGestureTimerManager::_TouchGestureTimerListener + : public ITimerEventListener +{ +public: + _TouchGestureTimerListener(_TouchGestureTimerManager& mgr) + : __pManager(&mgr) + { + } + + virtual void OnTimerExpired(Timer& timer) + { + if (!__pManager) + { + return; + } + __pManager->SetTimerState(false); + _TouchLongPressGestureDetector* pLongPressGesture = null; + _TouchTapGestureDetector* pTapGesture = null; + _TouchGestureDetector* pGestureDetector = __pManager->GetGestureDetector(); + + if (pGestureDetector) + { + _Control* pControl = pGestureDetector->GetControl(); + SysTryReturnVoidResult(NID_UI, pControl, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + Tizen::Base::Collection::IListT<_TouchGestureDetector*>* pGestureList = pControl->GetGestureDetectorList(); + if (!pGestureList || (pGestureList && (pGestureList->GetCount() <= 0))) + { + return; + } + + IEnumeratorT<_TouchGestureDetector*>* pEnumerator = pGestureList->GetEnumeratorN(); + SysTryReturnVoidResult(NID_UI, pEnumerator, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + bool gestureExist = false; + + while (pEnumerator->MoveNext() == E_SUCCESS) + { + _TouchGestureDetector* pTempGestureDetector = null; + pEnumerator->GetCurrent(pTempGestureDetector); + + if (pGestureDetector == pTempGestureDetector) + { + gestureExist = true; + } + } + + delete pEnumerator; + + if (gestureExist == false) + { + return; + } + + switch(pGestureDetector->GetDetectorType()) + { + case _TOUCH_GESTURE_DETECTOR_TYPE_TAP: + { + pTapGesture = dynamic_cast<_TouchTapGestureDetector*>(pGestureDetector); + + if (pTapGesture && pTapGesture->IsGestureStarted()) + { + pTapGesture->SetGestureStart(false); + + if (pTapGesture->IsAllTapped() && pTapGesture->IsInBounds()) + { + pTapGesture->SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_SUCCESS); + } + else + { + pTapGesture->SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_FAILED); + } + } + + pTapGesture->ClearTapInfoList(); + } + break; + + case _TOUCH_GESTURE_DETECTOR_TYPE_LONG_PRESS: + { + pLongPressGesture = dynamic_cast<_TouchLongPressGestureDetector*>(pGestureDetector); + + if (pLongPressGesture && pLongPressGesture->IsGestureStarted()) + { + pLongPressGesture->SetGestureStart(false); + + pLongPressGesture->EnableToDeleteTimer(false); + + if (pLongPressGesture->IsPressed()) + { + pLongPressGesture->SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_SUCCESS); + } + else + { + pLongPressGesture->SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_FAILED); + } + } + + pLongPressGesture->ClearLongPressInfoList(); + } + break; + + default: + break; + } + } + + if (__pManager) + { + __pManager->SetTimerExpiredState(true); + } + + if (pLongPressGesture) + { + pLongPressGesture->ResetGestureTimerManager(); + } + + if (pTapGesture) + { + pTapGesture->ResetGestureTimerManager(); + } + } + + void SetTouchGestureTimerManager(_TouchGestureTimerManager* pManager) + { + __pManager = pManager; + } + +private: + _TouchGestureTimerManager* __pManager; +}; + +_TouchGestureTimerManager::_TouchGestureTimerManager(const _TouchGestureDetector& gestureDetector) + : __isTimerExpired(false) + , __isTimerStarted(false) + , __pTimer(null) + , __pTimerListener(null) +{ + ClearLastResult(); + + result r = E_SUCCESS; + + __pGestureDetector = const_cast<_TouchGestureDetector*>(&gestureDetector); + __pTimerListener = new (std::nothrow) _TouchGestureTimerListener(*this); + 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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + r = __pTimer->Construct(*__pTimerListener); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return; + +CATCH: + if (__pTimerListener) + { + __pTimerListener->SetTouchGestureTimerManager(null); + delete __pTimerListener; + __pTimerListener = null; + } + + if (__pTimer) + { + delete __pTimer; + __pTimer = null; + } +} + +_TouchGestureTimerManager::~_TouchGestureTimerManager(void) +{ + if (__pTimer) + { + __pTimer->Cancel(); + + delete __pTimer; + __pTimer = null; + } + + if (__pTimerListener) + { + __pTimerListener->SetTouchGestureTimerManager(null); + delete __pTimerListener; + __pTimerListener = null; + } +} + +_TouchGestureDetector* +_TouchGestureTimerManager::GetGestureDetector(void) const +{ + return __pGestureDetector; +} + +bool +_TouchGestureTimerManager::IsTimerStarted(void) +{ + return __isTimerStarted; +} + +void +_TouchGestureTimerManager::SetTimerState(bool started) +{ + __isTimerStarted = started; +} + +void +_TouchGestureTimerManager::SetTimerExpiredState(bool expired) +{ + __isTimerExpired = expired; +} + +result +_TouchGestureTimerManager::StartTimer(int time) +{ + SysTryReturnResult(NID_UI, __pTimer != null, E_SYSTEM, "System error occurred. "); + + result r = __pTimer->Start(time); + SysTryReturnResult(NID_UI, r == E_SUCCESS, r, GetErrorMessage(r), "Propagating."); + + __isTimerStarted = true; + __isTimerExpired = false; + + return E_SUCCESS; +} + +bool +_TouchGestureTimerManager::IsTimerExpired(void) +{ + return __isTimerExpired; +} + +result +_TouchGestureTimerManager::CancelTimer(void) +{ + result r = __pTimer->Cancel(); + SysTryReturnResult(NID_UI, r == E_SUCCESS, r, GetErrorMessage(r), "Propagating."); + + __isTimerStarted = false; + __isTimerExpired = true; + + return E_SUCCESS; +} + +}} // Tizen::Ui + diff --git a/src/ui/FUi_TouchGestureTimerManager.h b/src/ui/FUi_TouchGestureTimerManager.h new file mode 100644 index 0000000..beeab27 --- /dev/null +++ b/src/ui/FUi_TouchGestureTimerManager.h @@ -0,0 +1,67 @@ +// +// 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_TouchGestureTimerManager.h + * @brief This is the header file for the %_TouchGestureTimerManager class. + * + * This header file contains the declarations of the %_TouchGestureTimerManager class. + */ +#ifndef _FUI_INTERNAL_TOUCH_GESTURE_TIMER_MANAGER_H_ +#define _FUI_INTERNAL_TOUCH_GESTURE_TIMER_MANAGER_H_ + +#include +#include "FUi_Types.h" +#include "FUi_UiTouchEvent.h" + +namespace Tizen { namespace Ui +{ +class _TouchGestureTimerManager + : public Tizen::Base::Object +{ +public: + _TouchGestureTimerManager(const _TouchGestureDetector& gestureDetector); + virtual ~_TouchGestureTimerManager(void); + + result StartTimer(int time); + bool IsTimerStarted(void); + + bool IsTimerExpired(void); + result CancelTimer(void); + + _TouchGestureDetector* GetGestureDetector(void) const; + +private: + _TouchGestureTimerManager(const _TouchGestureTimerManager&); + _TouchGestureTimerManager& operator =(const _TouchGestureTimerManager&); + + void SetTimerExpiredState(bool expired); + void SetTimerState(bool started); + +private: + bool __isTimerExpired; + bool __isTimerStarted; + Tizen::Base::Runtime::Timer* __pTimer; + + class _TouchGestureTimerListener; + _TouchGestureTimerListener* __pTimerListener; + + _TouchGestureDetector* __pGestureDetector; + static _TouchGestureTimerManager* __pInstance; +}; // _TouchGestureTimerManager +}} //Tizen::Ui + +#endif //_FUI_INTERNAL_TOUCH_GESTURE_TIMER_MANAGER_H_ diff --git a/src/ui/FUi_TouchLongPressGestureDetector.cpp b/src/ui/FUi_TouchLongPressGestureDetector.cpp new file mode 100644 index 0000000..43f6a1e --- /dev/null +++ b/src/ui/FUi_TouchLongPressGestureDetector.cpp @@ -0,0 +1,442 @@ +// +// 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_TouchLongPressGestureDetector.cpp + * @brief This is the implementation file for %_TouchLongPressGestureDetector class + * @version 2.0 + * + * This file contains the implementation of %_TouchLongPressGestureDetector class. + * + */ +#include +#include +#include +#include +#include "FUi_TouchLongPressGestureDetector.h" +#include "FUi_ITouchLongPressGestureEventListener.h" +#include "FUi_TouchManager.h" +#include "FUi_TouchLongPressGestureDetectorImpl.h" +#include "FUi_TouchGestureTimerManager.h" + +using namespace Tizen::Base::Utility; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui +{ +const int DEFAULT_DURATION = 500; +const int DEFAULT_MOVE_ALLOWANCE = 10; +const int DEFAULT_TOUCH_COUNT = 1; +const int MAX_TOUCH_COUNT = 10; + +class _TouchLongPressGestureDetector::_LongPressInfo +{ +public: + bool __isPressed; + bool __isInBounds; + int __touchCount; +}; + +_TouchLongPressGestureDetector::_TouchLongPressGestureDetector(void) + : __duration(DEFAULT_DURATION) + , __moveAllowance(DEFAULT_MOVE_ALLOWANCE) + , __touchCount(DEFAULT_TOUCH_COUNT) + , __maxPointId(DEFAULT_TOUCH_COUNT-1) + , __pGestureTimerManager(null) + , __touchCanceled(false) + , __deleteTimer(true) + , __pLongPressInfoList(null) +{ + result r = GetLastResult(); + 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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + int __duration = static_cast(elm_config_longpress_timeout_get() * 1000); + if (__duration == 0) + { + __duration = 500; + } + + for(int i=0; i < MAX_TOUCH_COUNT; i++) + { + _LongPressInfo* pLongPressInfo = new (std::nothrow) _LongPressInfo; + SysTryCatch(NID_UI, pLongPressInfo, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + pLongPressInfo->__isPressed = false; + pLongPressInfo->__isInBounds = false; + pLongPressInfo->__touchCount = 0; + + __pLongPressInfoList->Add(pLongPressInfo); + } + + SetDetectorType(_TOUCH_GESTURE_DETECTOR_TYPE_LONG_PRESS); + return; + +CATCH: + if (__pLongPressInfoList) + { + RemoveLongPressInfoList(); + delete __pLongPressInfoList; + __pLongPressInfoList = null; + } +} + +_TouchLongPressGestureDetector::~_TouchLongPressGestureDetector(void) +{ + RemoveLongPressInfoList(); + __pLongPressInfoList->RemoveAll(); + + delete __pLongPressInfoList; + __pLongPressInfoList = null; + + if (__pGestureTimerManager != null) + { + __pGestureTimerManager->CancelTimer(); + + delete __pGestureTimerManager; + __pGestureTimerManager = null; + + __touchCanceled = false; + } +} + +void +_TouchLongPressGestureDetector::RemoveLongPressInfoList(void) +{ + IEnumeratorT<_LongPressInfo*>* pEnumerator = __pLongPressInfoList->GetEnumeratorN(); + if (pEnumerator) + { + while(pEnumerator->MoveNext() == E_SUCCESS) + { + _LongPressInfo* pLongPressInfo = null; + pEnumerator->GetCurrent(pLongPressInfo); + if (!pLongPressInfo) + { + continue; + } + delete pLongPressInfo; + } + delete pEnumerator; + } +} + +result +_TouchLongPressGestureDetector::SetDuration(int duration) +{ + SysTryReturnResult(NID_UI, duration > 0, E_INVALID_ARG, "Argument is less than 0"); + + __duration = duration; + return E_SUCCESS; +} + +int +_TouchLongPressGestureDetector::GetDuration(void) const +{ + return __duration; +} + +result +_TouchLongPressGestureDetector::SetMoveAllowance(int allowance) +{ + SysTryReturnResult(NID_UI, allowance > 0, E_INVALID_ARG, "Argument is less than 0"); + + __moveAllowance = allowance; + return E_SUCCESS; +} + +result +_TouchLongPressGestureDetector::SetMoveAllowance(float allowance) +{ + SysTryReturnResult(NID_UI, allowance > 0, E_INVALID_ARG, "Argument is less than 0"); + + __moveAllowance = allowance; + return E_SUCCESS; +} + +int +_TouchLongPressGestureDetector::GetMoveAllowance(void) const +{ + return __moveAllowance; +} + +float +_TouchLongPressGestureDetector::GetMoveAllowanceF(void) const +{ + return __moveAllowance; +} + +result +_TouchLongPressGestureDetector::SetTouchCount(int count) +{ + SysTryReturnResult(NID_UI, count > 0, E_INVALID_ARG, "Argument is less than 0"); + + __touchCount = count; + __maxPointId = __touchCount-1; + + if (__touchCount > DEFAULT_TOUCH_COUNT) + { + _Control* pControl = GetControl(); + if (pControl && !pControl->IsMultiTouchEnabled()) + { + pControl->SetMultiTouchEnabled(true); + } + } + + return E_SUCCESS; +} + +int +_TouchLongPressGestureDetector::GetTouchCount(void) const +{ + return __touchCount; +} + +void +_TouchLongPressGestureDetector::EnableToDeleteTimer(bool deleteTimer) +{ + __deleteTimer = deleteTimer; +} + +bool +_TouchLongPressGestureDetector::IsPressed(void) +{ + bool allPressed = false; + for(int i=0; i<__touchCount; i++) + { + _LongPressInfo* pLongPressInfo = null; + __pLongPressInfoList->GetAt(i, pLongPressInfo); + if (pLongPressInfo) + { + if (pLongPressInfo->__isPressed && pLongPressInfo->__isInBounds + && (pLongPressInfo->__touchCount == DEFAULT_TOUCH_COUNT)) + { + allPressed = true; + } + else + { + allPressed = false; + } + } + } + + return allPressed; +} + +void +_TouchLongPressGestureDetector::ResetGestureTimerManager(void) +{ + if (__pGestureTimerManager) + { + delete __pGestureTimerManager; + __pGestureTimerManager = null; + } + __touchCanceled = false; + __deleteTimer = true; +} + +bool +_TouchLongPressGestureDetector::IsTouchCanceled(void) const +{ + return __touchCanceled; +} + +bool +_TouchLongPressGestureDetector::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + if (touchinfo.GetPointId() > __maxPointId || GetDetectorState() != _TOUCH_GESTURE_DETECTOR_STATE_READY ) + { + return false; + } + + _LongPressInfo* pLongPressInfo = null; + __pLongPressInfoList->GetAt(touchinfo.GetPointId(), pLongPressInfo); + SysTryReturn(NID_UI, pLongPressInfo, false, E_SYSTEM, "[E_SYSTEM] System error occurred. "); + + pLongPressInfo->__isPressed = true; + pLongPressInfo->__isInBounds = true; + pLongPressInfo->__touchCount++; + SysTryReturn(NID_UI, __pLongPressInfoList->SetAt(pLongPressInfo, touchinfo.GetPointId()) == E_SUCCESS, + false, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + bool allTouched = false; + for(int i=0; i<__touchCount; i++) + { + _LongPressInfo* pLongPressInfo = null; + __pLongPressInfoList->GetAt(i, pLongPressInfo); + if (pLongPressInfo) + { + if (pLongPressInfo->__isPressed) + { + allTouched = true; + } + else + { + allTouched = false; + } + } + } + + if (allTouched) + { + SetGestureStart(true); + + __pGestureTimerManager = new (std::nothrow) _TouchGestureTimerManager(*this); + SysTryReturn(NID_UI, __pGestureTimerManager, null, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + if (__pGestureTimerManager->IsTimerStarted() == false) + { + _Control* pControl = GetControl(); + if (!pControl) + { + SetControl(source); + } + + if (__pGestureTimerManager->StartTimer(__duration) != E_SUCCESS) + { + SysLogException(NID_UI, E_SYSTEM, "[E_SYSTEM] LongPress timer is not started."); + } + } + } + + return false; +} + +bool +_TouchLongPressGestureDetector::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + if (touchinfo.GetPointId() > __maxPointId || GetDetectorState() != _TOUCH_GESTURE_DETECTOR_STATE_READY ) + { + return false; + } + + _LongPressInfo* pLongPressInfo = null; + __pLongPressInfoList->GetAt(touchinfo.GetPointId(), pLongPressInfo); + SysTryReturn(NID_UI, pLongPressInfo, false, E_SYSTEM, "[E_SYSTEM] System error occurred. "); + + if (!pLongPressInfo->__isInBounds) + { + return false; + } + + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + SysTryReturn(NID_UI, pTouchManager, false, E_SYSTEM, "[E_SYSTEM] _TouchManager does not exist."); + + Point startPoint(pTouchManager->GetStartPoint(touchinfo.GetPointId()).x, pTouchManager->GetStartPoint(touchinfo.GetPointId()).y); + _Control* pControl = GetControl(); + if (pControl) + { + startPoint.x -= pControl->GetAbsoluteBounds().x; + startPoint.y -= pControl->GetAbsoluteBounds().y; + } + + if (Math::Abs(startPoint.x- touchinfo.GetCurrentPosition().x) > __moveAllowance + || Math::Abs(startPoint.y - touchinfo.GetCurrentPosition().y) > __moveAllowance) + { + pLongPressInfo->__isInBounds = false; + } + else + { + pLongPressInfo->__isInBounds = true; + } + + SysTryReturn(NID_UI, __pLongPressInfoList->SetAt(pLongPressInfo, touchinfo.GetPointId()) == E_SUCCESS, + false, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + return false; +} + +bool +_TouchLongPressGestureDetector::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + if (touchinfo.GetPointId() > __maxPointId || GetDetectorState() != _TOUCH_GESTURE_DETECTOR_STATE_READY ) + { + return false; + } + + _LongPressInfo* pLongPressInfo = null; + __pLongPressInfoList->GetAt(touchinfo.GetPointId(), pLongPressInfo); + SysTryReturn(NID_UI, pLongPressInfo, false, E_SYSTEM, "[E_SYSTEM] System error occurred. "); + + pLongPressInfo->__isPressed = false; + pLongPressInfo->__isInBounds = false; + + SysTryReturn(NID_UI, __pLongPressInfoList->SetAt(pLongPressInfo, touchinfo.GetPointId()) == E_SUCCESS, + false, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + //when touch is released not expired timer -> failed + if (IsGestureStarted() && __pGestureTimerManager != null && !__pGestureTimerManager->IsTimerExpired()) + { + __pGestureTimerManager->CancelTimer(); + + delete __pGestureTimerManager; + __pGestureTimerManager = null; + + SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_FAILED); + ClearLongPressInfoList(); + } + + return false; +} + +bool +_TouchLongPressGestureDetector::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + ClearLongPressInfoList(); + + if (__pGestureTimerManager != null && __pGestureTimerManager->IsTimerExpired() == false) + { + __pGestureTimerManager->CancelTimer(); + __touchCanceled = true; + + if (__deleteTimer) + { + delete __pGestureTimerManager; + __pGestureTimerManager = null; + } + else + { + __touchCanceled = true; + } + } + + return false; +} + +void +_TouchLongPressGestureDetector::ClearLongPressInfoList(void) +{ + for(int i=0; i < MAX_TOUCH_COUNT; i++) + { + _LongPressInfo* pLongPressInfo = null; + __pLongPressInfoList->GetAt(i, pLongPressInfo); + if (!pLongPressInfo) + { + continue; + } + + pLongPressInfo->__isPressed = false; + pLongPressInfo->__touchCount = 0; + pLongPressInfo->__isInBounds = false; + + __pLongPressInfoList->SetAt(pLongPressInfo, i); + } +} + +} } // Tizen::Ui + diff --git a/src/ui/FUi_TouchLongPressGestureDetectorImpl.cpp b/src/ui/FUi_TouchLongPressGestureDetectorImpl.cpp new file mode 100644 index 0000000..18133dc --- /dev/null +++ b/src/ui/FUi_TouchLongPressGestureDetectorImpl.cpp @@ -0,0 +1,142 @@ +// +// 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_TouchLongPressGestureDetectorImpl.cpp + * @brief This is the implementation file for %_TouchLongPressGestureDetectorImpl class + * @version 2.0 + * + * This file contains the implementation of %_TouchLongPressGestureDetectorImpl class. + * + */ + +#include +#include "FUi_TouchLongPressGestureDetectorImpl.h" +#include "FUi_TouchLongPressGestureDetector.h" + +namespace Tizen { namespace Ui +{ + +_TouchLongPressGestureDetectorImpl::_TouchLongPressGestureDetectorImpl(TouchLongPressGestureDetector* pPublic, _TouchLongPressGestureDetector* pCore) + : _TouchGestureDetectorImpl(pPublic, pCore) +{ +} + +_TouchLongPressGestureDetectorImpl::~_TouchLongPressGestureDetectorImpl(void) +{ +} + +_TouchLongPressGestureDetectorImpl* +_TouchLongPressGestureDetectorImpl::CreateInstanceN(TouchLongPressGestureDetector* pPublic) +{ + ClearLastResult(); + + _TouchLongPressGestureDetector* pCore = null; + pCore = new (std::nothrow) _TouchLongPressGestureDetector; + 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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + return pImpl; + +CATCH: + delete pCore; + + return null; +} + +const _TouchLongPressGestureDetector& +_TouchLongPressGestureDetectorImpl::GetCore(void) const +{ + return static_cast(_TouchGestureDetectorImpl::GetCore()); +} + +_TouchLongPressGestureDetector& +_TouchLongPressGestureDetectorImpl::GetCore(void) +{ + return static_cast<_TouchLongPressGestureDetector&>(_TouchGestureDetectorImpl::GetCore()); +} + +_TouchLongPressGestureDetectorImpl* +_TouchLongPressGestureDetectorImpl::GetInstance(TouchLongPressGestureDetector& gestureDetector) +{ + return static_cast<_TouchLongPressGestureDetectorImpl*> (gestureDetector.__pTouchGestureDetectorImpl); +} + +const _TouchLongPressGestureDetectorImpl* +_TouchLongPressGestureDetectorImpl::GetInstance(const TouchLongPressGestureDetector& gestureDetector) +{ + return static_cast (gestureDetector.__pTouchGestureDetectorImpl); +} + +result +_TouchLongPressGestureDetectorImpl::SetDuration(int duration) +{ + return GetCore().SetDuration(duration); +} + +int +_TouchLongPressGestureDetectorImpl::GetDuration(void) const +{ + ClearLastResult(); + + return GetCore().GetDuration(); +} + +result +_TouchLongPressGestureDetectorImpl::SetMoveAllowance(int allowance) +{ + return GetCore().SetMoveAllowance(allowance); +} + +int +_TouchLongPressGestureDetectorImpl::GetMoveAllowance(void) const +{ + ClearLastResult(); + + return GetCore().GetMoveAllowance(); +} + +result +_TouchLongPressGestureDetectorImpl::SetMoveAllowance(float allowance) +{ + return GetCore().SetMoveAllowance(allowance); +} + +float +_TouchLongPressGestureDetectorImpl::GetMoveAllowanceF(void) const +{ + ClearLastResult(); + + return GetCore().GetMoveAllowanceF(); +} + +result +_TouchLongPressGestureDetectorImpl::SetTouchCount(int count) +{ + return GetCore().SetTouchCount(count); +} + +int +_TouchLongPressGestureDetectorImpl::GetTouchCount(void) const +{ + ClearLastResult(); + + return GetCore().GetTouchCount(); +} + +} } // Tizen::Ui diff --git a/src/ui/FUi_TouchManager.cpp b/src/ui/FUi_TouchManager.cpp new file mode 100644 index 0000000..4638c53 --- /dev/null +++ b/src/ui/FUi_TouchManager.cpp @@ -0,0 +1,1139 @@ +// +// 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_TouchManager.cpp + * @brief This is the implementation file for _TouchManager class. + */ + +#include +#include +#include +#include +#include "FUi_UiTouchEvent.h" +#include "FUi_UiEventManager.h" +#include "FUi_ITouchEventListener.h" +#include "FUi_TouchGestureDetector.h" +#include "FUi_ControlManager.h" +#include "FUi_Control.h" +#include "FUi_TouchManager.h" +#include "FUi_ControlImpl.h" +#include "FUi_ResourceManager.h" + +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; + +namespace +{ +class _TouchEventListener + : public _ITouchEventListener + , virtual public _IUiEventListener + , virtual public Tizen::Base::Runtime::IEventListener +{ +public: + _TouchEventListener(void) + { + } + + virtual ~_TouchEventListener(void) + { + } + + virtual bool OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) + { + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + SysTryReturn(NID_UI, pTouchManager, false, E_SYSTEM, "[E_SYSTEM] _TouchManager does not exist."); + + if (touchinfo.GetPointId() == SINGLE_POINT_ID) + { + pTouchManager->SetTouchAllowed(true); + pTouchManager->SetTouchCanceledOnGestureSuccess(false); + pTouchManager->SetTouchControlSource(source); + pTouchManager->SetFocusedControlSource(source); + } + else + { + _Control* pTouchedControl = pTouchManager->GetTouchControlSource(); + if (pTouchedControl == null) + { + pTouchManager->SetTouchAllowed(true); + pTouchManager->SetTouchControlSource(source); + pTouchManager->SetFocusedControlSource(source); + } + } + + if (!pTouchManager->IsSendingDelayedEvent()) + { + return false; + } + + result r = pTouchManager->AddPoint(touchinfo.GetPointId(), touchinfo.GetCurrentPosition(), _TOUCH_PRESSED); + SysTryReturn(NID_UI, r == E_SUCCESS, true, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + return false; + } + + virtual bool OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) + { + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + SysTryReturn(NID_UI, pTouchManager, false, E_SYSTEM, "[E_SYSTEM] _TouchManager does not exist."); + + if (!pTouchManager->IsTouchAllowed()) + { + return true; + } + + if (!pTouchManager->IsSendingDelayedEvent()) + { + return false; + } + + result r = pTouchManager->AddPoint(touchinfo.GetPointId(), touchinfo.GetCurrentPosition(), _TOUCH_RELEASED); + SysTryReturn(NID_UI, r == E_SUCCESS, true, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + return false; + } + + virtual bool OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) + { + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + SysTryReturn(NID_UI, pTouchManager, false, E_SYSTEM, "[E_SYSTEM] _TouchManager does not exist."); + + if (!pTouchManager->IsTouchAllowed()) + { + return true; + } + + if(!pTouchManager->IsInTouchMoveAllowanceBounds(source, touchinfo)) + { + return true; + } + + if (!pTouchManager->IsSendingDelayedEvent()) + { + return false; + } + + result r = pTouchManager->AddPoint(touchinfo.GetPointId(), touchinfo.GetCurrentPosition(), _TOUCH_MOVED); + if (r != E_SUCCESS) + { + return true; + } + + return false; + } + + virtual bool OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) + { + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + SysTryReturn(NID_UI, pTouchManager, false, E_SYSTEM, "[E_SYSTEM] _TouchManager does not exist."); + + if (pTouchManager->IsTouchCanceledOnGestureSuccess() == false) + { + CancelGesture(source, touchinfo); + } + + _ITouchEventListener* pTouchedControlEventListener = source.GetPropagatedTouchEventListener(); + + if (pTouchedControlEventListener != null) + { + pTouchManager->SetTouchAllowed(false); + pTouchManager->ResetTouchInfo(); + } + + return false; + } + +private: + void CancelGesture(const _Control& source, const _TouchInfo& touchinfo) + { + IListT <_TouchGestureDetector*>* pGestureList = source.GetGestureDetectorList(); + + if (pGestureList) + { + IEnumeratorT<_TouchGestureDetector*>* pEnumerator = pGestureList->GetEnumeratorN(); + + if (pEnumerator) + { + while(pEnumerator->MoveNext() == E_SUCCESS) + { + _TouchGestureDetector* pGestureDetector = null; + pEnumerator->GetCurrent(pGestureDetector); + + if (pGestureDetector == null) + { + continue; + } + + if (pGestureDetector->IsGestureStarted()) + { + pGestureDetector->SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_CANCELED); + pGestureDetector->ProcessPublicListener(*pGestureDetector); + pGestureDetector->ProcessCoreListener(*pGestureDetector); + } + else + { + pGestureDetector->SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_CANCELED); + } + + pGestureDetector->OnTouchCanceled(source, touchinfo); + } + delete pEnumerator; + } + } + } +}; +} + +namespace Tizen { namespace Ui +{ + +_MultiFingerInfo::_MultiFingerInfo(void) + : __currentPointId(0) + , __generatedPointId(0) + , __pointCount(0) + , __pFingerInfoMap(null) +{ + __pFingerInfoMap = new (std::nothrow) HashMapT; + 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; + +CATCH: + delete __pFingerInfoMap; + __pFingerInfoMap = null; + return; +} + +_MultiFingerInfo::~_MultiFingerInfo(void) +{ + RemoveFingerInfoList(); +} + +void +_MultiFingerInfo::RemoveFingerInfoList(void) +{ + IMapEnumeratorT* pEnumerator = __pFingerInfoMap->GetMapEnumeratorN(); + if (pEnumerator) + { + while(pEnumerator->MoveNext() == E_SUCCESS) + { + _FingerInfo* pFingerInfo = null; + pEnumerator->GetValue(pFingerInfo); + + if (pFingerInfo) + { + delete pFingerInfo; + } + + } + delete pEnumerator; + } + + __pFingerInfoMap->RemoveAll(); + delete __pFingerInfoMap; + __pFingerInfoMap = null; +} + +unsigned long +_MultiFingerInfo::GeneratePointId(unsigned long deviceId) +{ + if (__pointCount == 0) + { + InitializeFingerInfo(); + } + + _FingerInfo* pFingerInfo = null; + __pFingerInfoMap->GetValue(deviceId, pFingerInfo); + + unsigned int pointId = 0; + pointId = __generatedPointId; + + if (pFingerInfo == null) + { + pFingerInfo = new (std::nothrow) _FingerInfo; + 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); + __pFingerInfoMap->Add(deviceId, pFingerInfo); + } + else + { + pFingerInfo->SetDeviceId(deviceId); + pFingerInfo->SetPointId(pointId); + __pFingerInfoMap->SetValue(deviceId, pFingerInfo); + } + + __currentPointId = pointId; + __generatedPointId++; + return pointId; + +} + +unsigned long +_MultiFingerInfo::GetPointId(unsigned long deviceId) const +{ + _FingerInfo* pFingerInfo = null; + __pFingerInfoMap->GetValue(deviceId, pFingerInfo); + if (pFingerInfo == null) + { + return INVALID_POINT_ID; + } + + return pFingerInfo->GetPointId(); +} + +unsigned long +_MultiFingerInfo::GetCurrentPointId(void) const +{ + return __currentPointId; +} + +FloatPoint +_MultiFingerInfo::GetPosition(unsigned long id) const +{ + FloatPoint errorPoint(-1, -1); + + IListT<_FingerInfo*>* pFingerList = __pFingerInfoMap->GetValuesN(); + if (pFingerList) + { + IEnumeratorT<_FingerInfo*>* pEnumerator = pFingerList->GetEnumeratorN(); + if (pEnumerator) + { + while(pEnumerator->MoveNext() == E_SUCCESS) + { + _FingerInfo* pFingerInfo = null; + pEnumerator->GetCurrent(pFingerInfo); + + if (pFingerInfo == null) + { + continue; + } + + if (pFingerInfo->GetPointId() == id) + { + delete pEnumerator; + delete pFingerList; + return pFingerInfo->GetPoint(); + } + } + delete pEnumerator; + } + delete pFingerList; + } + + return errorPoint; +} + +FloatPoint +_MultiFingerInfo::GetScreenPoint(unsigned long id) const +{ + FloatPoint errorPoint(-1, -1); + + IListT<_FingerInfo*>* pFingerList = __pFingerInfoMap->GetValuesN(); + if (pFingerList) + { + IEnumeratorT<_FingerInfo*>* pEnumerator = pFingerList->GetEnumeratorN(); + if (pEnumerator) + { + while(pEnumerator->MoveNext() == E_SUCCESS) + { + _FingerInfo* pFingerInfo = null; + pEnumerator->GetCurrent(pFingerInfo); + + if (pFingerInfo == null) + { + continue; + } + + if (pFingerInfo->GetPointId() == id) + { + delete pEnumerator; + delete pFingerList; + return pFingerInfo->GetScreenPoint(); + } + } + delete pEnumerator; + } + delete pFingerList; + } + + return errorPoint; +} + +FloatPoint +_MultiFingerInfo::GetStartPoint(unsigned long id) const +{ + FloatPoint errorPoint(-1, -1); + + IListT<_FingerInfo*>* pFingerList = __pFingerInfoMap->GetValuesN(); + if (pFingerList) + { + IEnumeratorT<_FingerInfo*>* pEnumerator = pFingerList->GetEnumeratorN(); + if (pEnumerator) + { + while(pEnumerator->MoveNext() == E_SUCCESS) + { + _FingerInfo* pFingerInfo = null; + pEnumerator->GetCurrent(pFingerInfo); + + if (pFingerInfo == null) + { + continue; + } + + if (pFingerInfo->GetPointId() == id) + { + delete pEnumerator; + delete pFingerList; + return pFingerInfo->GetStartPoint(); + } + } + delete pEnumerator; + } + delete pFingerList; + } + + return errorPoint; +} + +_TouchStatus +_MultiFingerInfo::GetStatus(unsigned long id) const +{ + IListT<_FingerInfo*>* pFingerList = __pFingerInfoMap->GetValuesN(); + if (pFingerList) + { + IEnumeratorT<_FingerInfo*>* pEnumerator = pFingerList->GetEnumeratorN(); + if (pEnumerator) + { + while(pEnumerator->MoveNext() == E_SUCCESS) + { + _FingerInfo* pFingerInfo = null; + pEnumerator->GetCurrent(pFingerInfo); + + if (pFingerInfo == null) + { + continue; + } + + if (pFingerInfo->GetPointId() == id) + { + delete pEnumerator; + delete pFingerList; + return pFingerInfo->GetStatus(); + } + } + delete pEnumerator; + } + delete pFingerList; + } + + return _TOUCH_PRESSED; +} + +int +_MultiFingerInfo::GetPointCount(void) const +{ + return __pointCount; +} + +IListT<_FingerInfo*>* +_MultiFingerInfo::GetMultiFingerListN(void) const +{ + IListT<_FingerInfo*>* pFingerInfoMapList = __pFingerInfoMap->GetValuesN(); + SysTryReturn(NID_UI, pFingerInfoMapList, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + return pFingerInfoMapList; +} + +void +_MultiFingerInfo::ResetFingerInfo(void) +{ + __pointCount = 0; + __currentPointId = 0; + __generatedPointId = 0; +} + +void +_MultiFingerInfo::InitializeFingerInfo(void) +{ + IListT<_FingerInfo*>* pFingerList = __pFingerInfoMap->GetValuesN(); + + if (pFingerList) + { + IEnumeratorT<_FingerInfo*>* pEnumerator = pFingerList->GetEnumeratorN(); + if (pEnumerator) + { + while(pEnumerator->MoveNext() == E_SUCCESS) + { + _FingerInfo* pFingerInfo = null; + pEnumerator->GetCurrent(pFingerInfo); + + if (pFingerInfo == null) + { + continue; + } + + pFingerInfo->SetStatus(_TOUCH_FOCUS_OUT); + pFingerInfo->SetPointId(INVALID_POINT_ID); + __pFingerInfoMap->SetValue(pFingerInfo->GetDeviceId(), pFingerInfo); + } + delete pEnumerator; + } + delete pFingerList; + } +} + +result +_MultiFingerInfo::SetFingerInfo(unsigned long pointId, const FloatPoint& point, const FloatPoint& screenPoint, const _TouchStatus status) +{ + _FingerInfo* pFingerInfo = null; + + IListT<_FingerInfo*>* pFingerList = __pFingerInfoMap->GetValuesN(); + if (pFingerList) + { + IEnumeratorT<_FingerInfo*>* pEnumerator = pFingerList->GetEnumeratorN(); + if (pEnumerator) + { + while(pEnumerator->MoveNext() == E_SUCCESS) + { + pEnumerator->GetCurrent(pFingerInfo); + if (pFingerInfo == null) + { + continue; + } + + if (pFingerInfo->GetPointId() == pointId) + { + break; + } + pFingerInfo = null; + } + delete pEnumerator; + } + delete pFingerList; + } + + if (pFingerInfo == null) + { + SysLog(NID_UI, "Failed to SetFingerInfo, pFingerInfo is null"); + return E_INVALID_CONDITION; + } + + switch (status) + { + case _TOUCH_PRESSED: + pFingerInfo->SetStartPoint(screenPoint); + pFingerInfo->SetPoint(screenPoint, point); + pFingerInfo->SetStatus(_TOUCH_PRESSED); + pFingerInfo->SetMoveReady(false); + __pointCount++; + break; + + case _TOUCH_MOVED: + if (pFingerInfo->GetStatus() == _TOUCH_RELEASED || pFingerInfo->GetStatus() == _TOUCH_FOCUS_OUT || pFingerInfo->GetPoint() == point) + { + return E_INVALID_CONDITION; + } + + pFingerInfo->SetPoint(screenPoint, point); + pFingerInfo->SetStatus(_TOUCH_MOVED); + break; + + case _TOUCH_RELEASED: + if (pFingerInfo->GetStatus() == _TOUCH_RELEASED || pFingerInfo->GetStatus() == _TOUCH_FOCUS_OUT) + { + SysLog(NID_UI,"OnTouchReleased without OnTouchPressed"); + ResetFingerInfo(); + return E_INVALID_CONDITION; + } + + pFingerInfo->SetPoint(screenPoint, point); + pFingerInfo->SetStatus(_TOUCH_RELEASED); + pFingerInfo->SetMoveReady(false); + __pointCount--; + + if (__pointCount == 0 ) + { + __currentPointId = 0; + __generatedPointId = 0; + } + break; + + case _TOUCH_CANCELED: + pFingerInfo->SetStatus(_TOUCH_CANCELED); + break; + + default: + break; + } + + __pFingerInfoMap->SetValue(pFingerInfo->GetDeviceId(), pFingerInfo); + return E_SUCCESS; +} + +_TouchManager* _TouchManager::__pInstance = null; + +_TouchManager::_TouchManager(void) + : __pMultiFingerInfo(null) + , __touchCanceled(false) + , __touchAllowed(true) + , __pTouchEventListener(null) + , __captureAllowOutOfBounds(false) + , __captureAllowOwnerBounds(false) + , __isSendingDelayedEvent(true) + , __touchCanceledOnGestureSuccess(false) + , __changedTouchableTarget(null) +{ + ClearLastResult(); + + result r = E_SUCCESS; + _UiEventManager* pEventManager = null; + + __pMultiFingerInfo = new (std::nothrow) _MultiFingerInfo; + 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, "[%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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + for (int i = 0; iRemoveTouchEventListener(*__pTouchEventListener); + } + + delete __pTouchEventListener; + __pTouchEventListener = null; +} + +void +_TouchManager::Initialize(void) +{ + static pthread_once_t once_block = PTHREAD_ONCE_INIT; + + if (__pInstance == null) + { + pthread_once(&once_block, InitializeInstance); + } + +} + +_TouchManager* +_TouchManager::GetInstance(void) +{ + return __pInstance; +} + +void +_TouchManager::InitializeInstance(void) +{ + ClearLastResult(); + + if (__pInstance == null) + { + __pInstance = new (std::nothrow) _TouchManager; + SysTryReturnVoidResult(NID_UI, __pInstance != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + } +} + +void +_TouchManager::ReleaseInstance(void) +{ + if (__pInstance) + { + delete __pInstance; + __pInstance = null; + } +} + +result +_TouchManager::AddPoint(unsigned long pointId, const FloatPoint& point, _TouchStatus status) +{ + FloatPoint screenPos(point.x, point.y); + FloatPoint controlPos(0, 0); + + _Control* pControl = GetTouchControlSource(); + if (pControl) + { + controlPos.x = pControl->GetAbsoluteBoundsF().x; + controlPos.y = pControl->GetAbsoluteBoundsF().y; + + screenPos.x += controlPos.x; + screenPos.y += controlPos.y; + } + + return __pMultiFingerInfo->SetFingerInfo(pointId, point, screenPos, status); +} + +unsigned long +_TouchManager::GetPointId(unsigned long deviceId) const +{ + return __pMultiFingerInfo->GetPointId(deviceId); +} + +Tizen::Graphics::FloatPoint +_TouchManager::GetStartPoint(unsigned long pointId) const +{ + return __pMultiFingerInfo->GetStartPoint(pointId); +} + +unsigned long +_TouchManager::GetCurrentPointId(void) const +{ + return __pMultiFingerInfo->GetCurrentPointId(); +} + +unsigned long +_TouchManager::GeneratePointId(const unsigned long deviceId) const +{ + return __pMultiFingerInfo->GeneratePointId(deviceId); +} + +FloatPoint +_TouchManager::GetPosition(unsigned long id) const +{ + return __pMultiFingerInfo->GetPosition(id); +} + +FloatPoint +_TouchManager::GetScreenPoint(unsigned long id) const +{ + return __pMultiFingerInfo->GetScreenPoint(id); +} + +TouchStatus +_TouchManager::GetTouchStatus(const unsigned long id) const +{ + return (static_cast (__pMultiFingerInfo->GetStatus(id))); +} + + int + _TouchManager::GetPointCount(void) const + { + return __pMultiFingerInfo->GetPointCount(); + } + +void +_TouchManager::SetTouchControlSource(const _Control& source) +{ + __touchControlHandle = source.GetHandle(); +} + +_Control* +_TouchManager::GetTouchControlSource(void) const +{ + _ControlManager* pControlManager = _ControlManager::GetInstance(); + SysTryReturn(NID_UI, pControlManager, null, E_SYSTEM, "[E_SYSTEM] _ControlManager does not exist."); + + return pControlManager->GetObject(__touchControlHandle); +} + +void +_TouchManager::SetFocusedControlSource(const _Control& source) +{ + __focusedControlHandle = source.GetHandle(); +} + +_Control* +_TouchManager::GetFocusedControlSource(void) const +{ + _ControlManager* pControlManager = _ControlManager::GetInstance(); + SysTryReturn(NID_UI, pControlManager, null, E_SYSTEM, "[E_SYSTEM] _ControlManager does not exist."); + + return pControlManager->GetObject(__focusedControlHandle); +} + +result +_TouchManager::SendEvent(_Control* pControl, const _TouchInfo& touchInfo) +{ + SysTryReturnResult(NID_UI, pControl, E_INVALID_ARG, "pControl is null."); + + _UiTouchEvent event(pControl->GetHandle(), touchInfo, _UI_EVENT_ROUTE_DIRECT); + + _Control* pTouchedControl = GetTouchControlSource(); + if (pTouchedControl) + { + event.SetOriginalDestination(*pTouchedControl); + } + + _UiEventManager* pEventManager = _UiEventManager::GetInstance(); + SysTryReturnResult(NID_UI, pEventManager, E_SYSTEM, "_UiEventManager does not exist."); + + __isSendingDelayedEvent = false; + result r = pEventManager->SendEvent(event); + __isSendingDelayedEvent = true; + + return r; +} + +void +_TouchManager::SetTouchCancelOnGesture(bool onlyTouchEvent) +{ + __touchCanceledOnGestureSuccess = onlyTouchEvent; +} + +void +_TouchManager::SetTouchCanceled(_Control* pControl) +{ + if (GetTouchControlSource()) + { + if (pControl != null && pControl != GetTouchControlSource()) + { + return; + } + + FloatPoint currentPoint(0, 0); + _TouchInfo touchInfo; + + if (GetTouchControlSource()->IsMultiTouchEnabled()) + { + currentPoint.x = GetScreenPoint(GetCurrentPointId()).x; + currentPoint.y = GetScreenPoint(GetCurrentPointId()).y; + + _TouchInfo multiTouchInfo(GetCurrentPointId(), _TOUCH_CANCELED, currentPoint, false, 0); + touchInfo = multiTouchInfo; + } + else + { + currentPoint.x = GetScreenPoint(SINGLE_POINT_ID).x; + currentPoint.y = GetScreenPoint(SINGLE_POINT_ID).y; + + _TouchInfo singleTouchInfo(SINGLE_POINT_ID, _TOUCH_CANCELED, currentPoint, false, 0); + touchInfo = singleTouchInfo; + } + + _UiTouchEvent event(GetTouchControlSource()->GetHandle(), touchInfo); + + _UiEventManager* pEventManager = _UiEventManager::GetInstance(); + SysTryReturnVoidResult(NID_UI, pEventManager, E_SYSTEM, "[E_SYSTEM] _UiEventManager does not exist."); + + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + SysTryReturnVoidResult(NID_UI, pTouchManager, E_SYSTEM, "[E_SYSTEM] _TouchManager does not exist."); + + result r = pTouchManager->AddPoint(touchInfo.GetPointId(), currentPoint, _TOUCH_CANCELED); + if (r != E_SUCCESS) + { + SetLastResult(E_SYSTEM); + return; + } + + SysLog(NID_UI, "SendTouchCancelEvent"); + pEventManager->SendEvent(event); + + IListT<_FingerInfo*>* pFingerInfoList = pTouchManager->GetMultiFingerInfoListN(); + SysTryReturnVoidResult(NID_UI, pFingerInfoList, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + int count = pFingerInfoList->GetCount(); + + for (int i = 0; i < count; i++) + { + _FingerInfo* pFingerInfo = null; + pFingerInfoList->GetAt(i, pFingerInfo); + if (pFingerInfo == null) + { + continue; + } + + if (pFingerInfo->GetPointId() == touchInfo.GetPointId()) + { + pFingerInfo->SetPointId(INVALID_POINT_ID); + break; + } + } + delete pFingerInfoList; + } + SetLastResult(E_SUCCESS); + _ResourceManager::GetInstance()->ResetFeedback(); +} + +void +_TouchManager::SetTouchReleased(void) +{ + if (GetTouchControlSource() && GetTouchControlSource()->IsAttachedToMainTree()) + { + FloatPoint currentPoint(0, 0); + _TouchInfo touchInfo; + + if (GetTouchControlSource()->IsMultiTouchEnabled()) + { + currentPoint.x = GetScreenPoint(GetCurrentPointId()).x; + currentPoint.y = GetScreenPoint(GetCurrentPointId()).y; + + _TouchInfo multiTouchInfo(GetCurrentPointId(), _TOUCH_RELEASED, currentPoint, false, 0); + touchInfo = multiTouchInfo; + } + else + { + currentPoint.x = GetScreenPoint(SINGLE_POINT_ID).x; + currentPoint.y = GetScreenPoint(SINGLE_POINT_ID).y; + + _TouchInfo singleTouchInfo(SINGLE_POINT_ID, _TOUCH_RELEASED, currentPoint, false, 0); + touchInfo = singleTouchInfo; + } + + _UiTouchEvent event(GetTouchControlSource()->GetHandle(), touchInfo); + + _UiEventManager* pEventManager = _UiEventManager::GetInstance(); + SysTryReturnVoidResult(NID_UI, pEventManager, E_SYSTEM, "[E_SYSTEM] _UiEventManager does not exist."); + + pEventManager->SendEvent(event); + + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + 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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + int count = pFingerInfoList->GetCount(); + + for (int i = 0; i < count; i++) + { + _FingerInfo* pFingerInfo = null; + pFingerInfoList->GetAt(i, pFingerInfo); + if (pFingerInfo == null) + { + continue; + } + + if (pFingerInfo->GetPointId() == touchInfo.GetPointId()) + { + pFingerInfo->SetPointId(INVALID_POINT_ID); + break; + } + } + delete pFingerInfoList; + + } + SetLastResult(E_SUCCESS); +} + +bool +_TouchManager::IsTouchCanceledOnGestureSuccess(void) const +{ + return __touchCanceledOnGestureSuccess; +} + +void +_TouchManager::SetTouchCanceledOnGestureSuccess(bool cancel) +{ + __touchCanceledOnGestureSuccess = cancel; +} + +void +_TouchManager::SetTouchAllowed(bool allowed) +{ + __touchAllowed = allowed; +} + +bool +_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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + const int count = pFingerInfoList->GetCount(); + + for (int i = 0; i < count; i++) + { + _FingerInfo* pFingerInfo = null; + pFingerInfoList->GetAt(i, pFingerInfo); + if (pFingerInfo == null) + { + continue; + } + + if (pFingerInfo->GetPointId() == touchInfo.GetPointId()) + { + if (pFingerInfo->GetMoveReady() == true) + { + delete pFingerInfoList; + pFingerInfoList = null; + return true; + } + + FloatPoint tmpPoint = GetStartPoint(touchInfo.GetPointId()); + FloatRectangle absBounds = source.GetAbsoluteBoundsF(); + + FloatPoint startPoint(tmpPoint.x - absBounds.x, tmpPoint.y - absBounds.y); + FloatPoint currentPoint = touchInfo.GetCurrentPosition(); + + //SysLog(NID_UI, "[Touch Test] tmpPoint(%d, %d) absBounds(%d, %d) startPoint(%d, %d) currentPoint(%d, %d)", + // tmpPoint.x, tmpPoint.y, absBounds.x, absBounds.y, startPoint.x, startPoint.y, currentPoint.x, currentPoint.y); + + int distance = int(hypot(abs(startPoint.x-currentPoint.x), abs(startPoint.y-currentPoint.y))); + + if (distance >= source.GetTouchPressThresholdPixel()) + { + pFingerInfo->SetMoveReady(true); + + delete pFingerInfoList; + return true; + } + } + } + + delete pFingerInfoList; + return false; +} + +void +_TouchManager::SetCapturedControl(const _Control* pControl, bool allowOutOfBounds, bool allowOwnerBounds) +{ + if (pControl) + { + __capturedControlHandle = pControl->GetHandle(); + } + else + { + __capturedControlHandle = _ControlHandle(); + } + + __captureAllowOutOfBounds = allowOutOfBounds; + __captureAllowOwnerBounds = allowOwnerBounds; +} + +_Control* +_TouchManager::GetCapturedControl(void) const +{ + _ControlManager* pControlManager = _ControlManager::GetInstance(); + SysTryReturn(NID_UI, pControlManager, null, E_SYSTEM, "[E_SYSTEM] _ControlManager does not exist."); + + return pControlManager->GetObject(__capturedControlHandle); +} + +bool +_TouchManager::IsCaptureAllowedOutOfBounds(void) const +{ + return __captureAllowOutOfBounds; +} + +bool +_TouchManager::IsCaptureAllowedOwnerBounds(void) const +{ + return __captureAllowOwnerBounds; +} + +void +_TouchManager::ResetTouchInfo(void) +{ + __pMultiFingerInfo->ResetFingerInfo(); + + _Control* pControl = GetTouchControlSource(); + if (pControl) + { + IListT <_TouchGestureDetector*>* pGestureList = pControl->GetGestureDetectorList(); + + if (pGestureList) + { + IEnumeratorT<_TouchGestureDetector*>* pEnumerator = pGestureList->GetEnumeratorN(); + + if (pEnumerator) + { + while(pEnumerator->MoveNext() == E_SUCCESS) + { + _TouchGestureDetector* pGestureDetector = null; + pEnumerator->GetCurrent(pGestureDetector); + + if (pGestureDetector == null) + { + continue; + } + + pGestureDetector->SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_CANCELED); + pGestureDetector->ProcessCoreListener(*pGestureDetector); + } + delete pEnumerator; + } + } + } + + __touchAllowed = false; +} + +IListT<_FingerInfo*>* +_TouchManager::GetMultiFingerInfoListN(void) const +{ + return __pMultiFingerInfo->GetMultiFingerListN(); +} + +bool +_TouchManager::IsSendingDelayedEvent(void) const +{ + return __isSendingDelayedEvent; +} + +void +_TouchManager::SetChangedTouchableTarget(_Control* pTarget) +{ + __changedTouchableTarget = pTarget; +} + +_Control* +_TouchManager::GetChangedTouchableTarget(void) +{ + return __changedTouchableTarget; +} +} } //Tizen::Ui diff --git a/src/ui/FUi_TouchPanningGestureDetector.cpp b/src/ui/FUi_TouchPanningGestureDetector.cpp new file mode 100644 index 0000000..9e97e01 --- /dev/null +++ b/src/ui/FUi_TouchPanningGestureDetector.cpp @@ -0,0 +1,391 @@ +// +// 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_TouchPanningGestureDetector.cpp + * @brief This is the implementation file for %_TouchPanningGestureDetector class + * @version 2.0 + * + * This file contains the implementation of %_TouchPanningGestureDetector class. + * + */ +#include +#include +#include +#include "FUi_TouchPanningGestureDetector.h" +#include "FUi_ITouchPanningGestureEventListener.h" +#include "FUi_TouchManager.h" +#include "FUi_TouchPanningGestureDetectorImpl.h" + +using namespace Tizen::Base::Utility; +using namespace Tizen::Base::Collection; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Graphics; + +namespace +{ +const int DEFAULT_TOUCH_COUNT = 1; +const int MIN_MOVEALLOWANCE = 20; +const int POLLING_PANNING = 16; +} + +namespace Tizen { namespace Ui +{ +_TouchPanningGestureDetector::_TouchPanningGestureDetector(void) + : __touchCount(DEFAULT_TOUCH_COUNT) + , __fingerCount(0) + , __maxPointId(DEFAULT_TOUCH_COUNT-1) + , __pTimer(null) +{ + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pTimer = new (std::nothrow)Timer; + 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)); + + SetDetectorType(_TOUCH_GESTURE_DETECTOR_TYPE_PANNING); + return; + +CATCH: + delete __pTimer; + __pTimer = null; +} + +_TouchPanningGestureDetector::~_TouchPanningGestureDetector(void) +{ + delete __pTimer; + __pTimer = null; +} + +result +_TouchPanningGestureDetector::SetTouchCount(int count) +{ + SysTryReturnResult(NID_UI, count > 0, E_INVALID_ARG, "Argument is less than 0"); + + __touchCount = count; + __maxPointId = __touchCount-1; + + if (__touchCount > DEFAULT_TOUCH_COUNT) + { + _Control* pControl = GetControl(); + if (pControl && !pControl->IsMultiTouchEnabled()) + { + pControl->SetMultiTouchEnabled(true); + } + } + + return E_SUCCESS; +} + +int +_TouchPanningGestureDetector::GetTouchCount(void) const +{ + return __touchCount; +} + +IListT<_TouchInfo*>* +_TouchPanningGestureDetector::GetTouchInfoListN(const _Control* pControl) const +{ + if (GetDetectorState() != _TOUCH_GESTURE_DETECTOR_STATE_STARTED + && GetDetectorState() != _TOUCH_GESTURE_DETECTOR_STATE_CHANGED + && GetDetectorState() != _TOUCH_GESTURE_DETECTOR_STATE_FINISHED) + { + return null; + } + + Point controlPos(0, 0); + if (pControl != null) + { + controlPos.x = pControl->GetAbsoluteBounds().x; + controlPos.y = pControl->GetAbsoluteBounds().y; + } + + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + 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, "[%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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + for (int i = 0; i < pFingerInfoList->GetCount(); i++) + { + _FingerInfo* pFingerInfo = null; + pFingerInfoList->GetAt(i, pFingerInfo); + + if (pFingerInfo == null) + { + continue; + } + + if (pFingerInfo->GetStatus() != _TOUCH_FOCUS_OUT) + { + _TouchInfo* pTouchInfo = new (std::nothrow) _TouchInfo; + 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); + pReturnList->Add(pTouchInfo); + + if (pReturnList->GetCount() == __touchCount) + { + break; + } + } + } + + delete pFingerInfoList; + + return pReturnList; + +CATCH: + if (pReturnList) + { + IEnumeratorT<_TouchInfo*>* pEnumerator = pReturnList->GetEnumeratorN(); + if (pEnumerator) + { + while(pEnumerator->MoveNext() == E_SUCCESS) + { + _TouchInfo* pTouchInfo = null; + pEnumerator->GetCurrent(pTouchInfo); + if (pTouchInfo == null) + { + continue; + } + + delete pTouchInfo; + } + delete pEnumerator; + } + pReturnList->RemoveAll(); + delete pReturnList; + pReturnList = null; + } + if (pFingerInfoList) + { + delete pFingerInfoList; + pFingerInfoList = null; + } + + return null; +} + +bool +_TouchPanningGestureDetector::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + if (touchinfo.GetPointId() > __maxPointId) + { + return false; + } + + if (__fingerCount < 0) + { + __fingerCount = 0; + } + + __fingerCount++; + if ( __fingerCount < __touchCount) + { + SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_READY); + } + else if (__touchCount == __fingerCount) + { + SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_READY); + SetGestureStart(true); + SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_STARTED); + __pTimer->Start(POLLING_PANNING); + } + + return false; +} + +bool +_TouchPanningGestureDetector::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + if (touchinfo.GetPointId() > __maxPointId) + { + return false; + } + + _TouchGestureDetectorState state = GetDetectorState(); + if (state == _TOUCH_GESTURE_DETECTOR_STATE_STARTED || state == _TOUCH_GESTURE_DETECTOR_STATE_SUCCESS_AND_WAIT || state == _TOUCH_GESTURE_DETECTOR_STATE_CHANGED) + { + if (__touchCount > DEFAULT_TOUCH_COUNT) + { + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + SysTryReturn(NID_UI, pTouchManager != null, null, E_SYSTEM, "[E_SYSTEM] _TouchManager does not found."); + + IListT<_FingerInfo*>* pFingerInfoList = pTouchManager->GetMultiFingerInfoListN(); + bool movedAll = false; + enum moveDirection + { + NONE = 0x0, RIGHT = 0x1, UP = 0x2, LEFT = 0x4, DOWN = 0x8 + }; + + int directionList[__touchCount]; + + if (pFingerInfoList) + { + for(int i=0; i < __touchCount; i++) + { + _FingerInfo* pFingerInfo = null; + pFingerInfoList->GetAt(i, pFingerInfo); + directionList[i] = NONE; + + if (pFingerInfo) + { + FloatPoint currentPoint = pFingerInfo->GetPoint(); + FloatPoint controlPosition(0,0); + _Control* pControl = GetControl(); + if (pControl) + { + controlPosition.x = pControl->GetAbsoluteBoundsF().x; + controlPosition.y = pControl->GetAbsoluteBoundsF().y; + } + FloatPoint startPoint = pFingerInfo->GetStartPoint(); + startPoint.x = startPoint.x - controlPosition.x; + startPoint.y = startPoint.y - controlPosition.y; + + if (Math::Abs(startPoint.x - currentPoint.x) >= MIN_MOVEALLOWANCE || Math::Abs(startPoint.y - currentPoint.y) >= MIN_MOVEALLOWANCE) + { + movedAll = true; + + if (currentPoint.x - startPoint.x > 0) + { + directionList[i] |= RIGHT; + } + else if (currentPoint.x - startPoint.x < 0) + { + directionList[i] |= LEFT; + } + + if (currentPoint.y - startPoint.y > 0) + { + directionList[i] |= DOWN; + } + else if (currentPoint.y - startPoint.y < 0) + { + directionList[i] |= UP; + } + } + else + { + movedAll = false; + } + } + } + delete pFingerInfoList; + } + + if (movedAll) + { + bool sameDirection = true; + for(int i=0; i<__touchCount-1; i++) + { + if (directionList[i] != directionList[i+1]) + { + sameDirection = false; + break; + } + } + + if (sameDirection) + { + SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_CHANGED); + __pTimer->Start(POLLING_PANNING); + } + } + } + else + { + SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_CHANGED); + __pTimer->Start(POLLING_PANNING); + } + } + return false; +} + +void +_TouchPanningGestureDetector::OnTimerExpired(Timer& timer) +{ + SetDetectorStateChanged(); + + __pTimer->Start(POLLING_PANNING); +} + +void +_TouchPanningGestureDetector::SetDetectorStateChanged(void) +{ + if ( GetDetectorState() == _TOUCH_GESTURE_DETECTOR_STATE_CHANGED ) + { + SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_CHANGED); + } +} + +bool +_TouchPanningGestureDetector::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + if (touchinfo.GetPointId() > __maxPointId) + { + return false; + } + + __fingerCount--; + _TouchGestureDetectorState state = GetDetectorState(); + __pTimer->Cancel(); + + if (IsGestureStarted()) + { + SetGestureStart(false); + if ( state == _TOUCH_GESTURE_DETECTOR_STATE_STARTED || state == _TOUCH_GESTURE_DETECTOR_STATE_CHANGED || state == _TOUCH_GESTURE_DETECTOR_STATE_SUCCESS_AND_WAIT) + { + SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_FINISHED); + } + } + + return false; +} + +bool +_TouchPanningGestureDetector::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + __fingerCount = 0; + + return false; +} + +void +_TouchPanningGestureDetector::OnTouchGestureDetectorAdded(void) +{ + __touchCount = DEFAULT_TOUCH_COUNT; + __fingerCount = 0; + __maxPointId = DEFAULT_TOUCH_COUNT-1; +} + +void +_TouchPanningGestureDetector::OnTouchGestureDetectorRemoved(void) +{ + if (__pTimer) + { + __pTimer->Cancel(); + } +} + +}} // Tizen::Ui diff --git a/src/ui/FUi_TouchPanningGestureDetectorImpl.cpp b/src/ui/FUi_TouchPanningGestureDetectorImpl.cpp new file mode 100644 index 0000000..5f0a813 --- /dev/null +++ b/src/ui/FUi_TouchPanningGestureDetectorImpl.cpp @@ -0,0 +1,195 @@ +// +// 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_TouchPanningGestureDetectorImpl.cpp + * @brief This is the implementation file for %_TouchPanningGestureDetectorImpl class + * @version 2.0 + * + * This file contains the implementation of %_TouchPanningGestureDetectorImpl class. + * + */ + +#include +#include "FUi_TouchPanningGestureDetectorImpl.h" +#include "FUi_TouchPanningGestureDetector.h" + +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui +{ + +_TouchPanningGestureDetectorImpl::_TouchPanningGestureDetectorImpl(TouchPanningGestureDetector* pPublic, _TouchPanningGestureDetector* pCore) + : _TouchGestureDetectorImpl(pPublic, pCore) +{ +} + +_TouchPanningGestureDetectorImpl::~_TouchPanningGestureDetectorImpl(void) +{ +} + +_TouchPanningGestureDetectorImpl* +_TouchPanningGestureDetectorImpl::CreateInstanceN(TouchPanningGestureDetector* pPublic) +{ + ClearLastResult(); + + _TouchPanningGestureDetector* pCore = null; + pCore = new (std::nothrow) _TouchPanningGestureDetector; + 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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + return pImpl; + +CATCH: + delete pCore; + + return null; +} + +const _TouchPanningGestureDetector& +_TouchPanningGestureDetectorImpl::GetCore(void) const +{ + return static_cast(_TouchGestureDetectorImpl::GetCore()); +} + +_TouchPanningGestureDetector& +_TouchPanningGestureDetectorImpl::GetCore(void) +{ + return static_cast<_TouchPanningGestureDetector&>(_TouchGestureDetectorImpl::GetCore()); +} + +_TouchPanningGestureDetectorImpl* +_TouchPanningGestureDetectorImpl::GetInstance(TouchPanningGestureDetector& gestureDetector) +{ + return static_cast<_TouchPanningGestureDetectorImpl*> (gestureDetector.__pTouchGestureDetectorImpl); +} + +const _TouchPanningGestureDetectorImpl* +_TouchPanningGestureDetectorImpl::GetInstance(const TouchPanningGestureDetector& gestureDetector) +{ + return static_cast (gestureDetector.__pTouchGestureDetectorImpl); +} + +result +_TouchPanningGestureDetectorImpl::SetTouchCount(int count) +{ + return GetCore().SetTouchCount(count); +} + +int +_TouchPanningGestureDetectorImpl::GetTouchCount(void) const +{ + ClearLastResult(); + + return GetCore().GetTouchCount(); +} + +IList* +_TouchPanningGestureDetectorImpl::GetTouchInfoListN(void) const +{ + IListT<_TouchInfo*>* pTouchInfoList = GetCore().GetTouchInfoListN(GetCore().GetControl()); + 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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + for (int i = 0; i < pTouchInfoList->GetCount(); i++) + { + _TouchInfo* pFingerInfo = null; + pTouchInfoList->GetAt(i, pFingerInfo); + + if (pFingerInfo == null) + { + continue; + } + + TouchInfo* pTouchInfo = new (std::nothrow) TouchInfo; + 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 ) + { + pTouchInfo->id = pFingerInfo->GetPointId(); + pTouchInfo->position.x = pFingerInfo->GetCurrentPosition().x; + pTouchInfo->position.y = pFingerInfo->GetCurrentPosition().y; + pTouchInfo->status = TOUCH_PRESSED; + + pReturnList->Add(*pTouchInfo); + } + } + + pEnumerator = pTouchInfoList->GetEnumeratorN(); + if (pEnumerator) + { + while(pEnumerator->MoveNext() == E_SUCCESS) + { + _TouchInfo* pTouchInfo = null; + pEnumerator->GetCurrent(pTouchInfo); + if (pTouchInfo == null) + { + continue; + } + + delete pTouchInfo; + } + delete pEnumerator; + } + pTouchInfoList->RemoveAll(); + delete pTouchInfoList; + pTouchInfoList = null; + + ClearLastResult(); + + return pReturnList; + +CATCH: + if (pTouchInfoList) + { + IEnumeratorT<_TouchInfo*>* pEnumerator = pTouchInfoList->GetEnumeratorN(); + if (pEnumerator) + { + while(pEnumerator->MoveNext() == E_SUCCESS) + { + _TouchInfo* pTouchInfo = null; + pEnumerator->GetCurrent(pTouchInfo); + if (pTouchInfo == null) + { + continue; + } + + delete pTouchInfo; + } + delete pEnumerator; + } + pTouchInfoList->RemoveAll(); + delete pTouchInfoList; + pTouchInfoList = null; + } + + if (pReturnList) + { + pReturnList->RemoveAll(true); + delete pReturnList; + pReturnList = null; + } + + return null; +} + +} } // Tizen::Ui diff --git a/src/ui/FUi_TouchPinchGestureDetector.cpp b/src/ui/FUi_TouchPinchGestureDetector.cpp new file mode 100644 index 0000000..c90c3c2 --- /dev/null +++ b/src/ui/FUi_TouchPinchGestureDetector.cpp @@ -0,0 +1,294 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.1 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// 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_TouchPinchGestureDetector.cpp + * @brief This is the implementation file for %_TouchPinchGestureDetector class + * @version 2.0 + * + * This file contains the implementation of %_TouchPinchGestureDetector class. + * + */ + +#include +#include +#include +#include "FUi_TouchPinchGestureDetector.h" +#include "FUi_ITouchPinchGestureEventListener.h" +#include "FUi_TouchManager.h" +#include "FUi_TouchPinchGestureDetectorImpl.h" + +// namespace +using namespace Tizen::Graphics; +using namespace Tizen::Base::Collection; +using namespace Tizen::Base::Runtime; + +namespace +{ +const int POLLING_PINCH = 16; +const int PINCH_THRESHOLD = 10; +} + +namespace Tizen { namespace Ui +{ +_TouchPinchGestureDetector::_TouchPinchGestureDetector(void) + : __MinimumPoint(0, 0) + , __MaximumPoint(0, 0) + , __centerPosition(0, 0) + , __pTimer(null) + , __threshold(PINCH_THRESHOLD) + , __scale(0) +{ + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pTimer = new (std::nothrow)Timer; + 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)); + + SetDetectorType(_TOUCH_GESTURE_DETECTOR_TYPE_PINCH); + return; + +CATCH: + delete __pTimer; + __pTimer = null; +} + +_TouchPinchGestureDetector::~_TouchPinchGestureDetector(void) +{ + delete __pTimer; + __pTimer = null; +} + +bool +_TouchPinchGestureDetector::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + //SysLog(NID_UI, "pressId = %d, pressX = %d, pressY = %d", touchinfo.GetPointId(), touchinfo.GetCurrentPosition().x, touchinfo.GetCurrentPosition().y); + + if (MeasureArea() > __threshold) + { + SetGestureStart(true); + SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_STARTED); + + _Control* pControl = GetControl(); + if (pControl && !pControl->IsMultiTouchEnabled()) + { + pControl->SetMultiTouchEnabled(true); + } + } + + return false; +} + +bool +_TouchPinchGestureDetector::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + _TouchGestureDetectorState state = GetDetectorState(); + //SysLog(NID_UI, "moveId = %d, moveX = %d, moveY = %d", touchinfo.GetPointId(), touchinfo.GetCurrentPosition().x, touchinfo.GetCurrentPosition().y); + + if (state == _TOUCH_GESTURE_DETECTOR_STATE_STARTED || state == _TOUCH_GESTURE_DETECTOR_STATE_SUCCESS_AND_WAIT + || state == _TOUCH_GESTURE_DETECTOR_STATE_CHANGED) + { + //SysLog(NID_UI, "enter state ok"); + if (MeasureArea() > __threshold) + { + SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_CHANGED); + } + } + + return false; +} + +void +_TouchPinchGestureDetector::OnTimerExpired(Timer& timer) +{ + SetDetectorStateChanged(); + + __pTimer->Start(POLLING_PINCH); +} + +void +_TouchPinchGestureDetector::SetDetectorStateChanged(void) +{ + _TouchGestureDetectorState state = GetDetectorState(); + + if ( state == _TOUCH_GESTURE_DETECTOR_STATE_CHANGED ) + { + SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_CHANGED); + } +} + +bool +_TouchPinchGestureDetector::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + //SysLog(NID_UI, "releaseId = %d, releaseX = %d, releaseY = %d", touchinfo.GetPointId(), touchinfo.GetCurrentPosition().x, touchinfo.GetCurrentPosition().y); + + if (MeasureArea() > __threshold) + { + return false; + } + + __pTimer->Cancel(); + + _TouchGestureDetectorState state = GetDetectorState(); + + if (IsGestureStarted()) + { + SetGestureStart(false); + if (state == _TOUCH_GESTURE_DETECTOR_STATE_STARTED || state == _TOUCH_GESTURE_DETECTOR_STATE_CHANGED || state == _TOUCH_GESTURE_DETECTOR_STATE_SUCCESS_AND_WAIT) + { + SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_FINISHED); + } + } + + return false; +} + +bool +_TouchPinchGestureDetector::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + __pTimer->Cancel(); + __centerPosition.x = 0; + __centerPosition.y = 0; + __scale = 0; + __MinimumPoint.x = 0; + __MinimumPoint.y = 0; + __MaximumPoint.x = 0; + __MaximumPoint.y = 0; + + return false; +} + +Point +_TouchPinchGestureDetector::GetCenterPoint(void) const +{ + return Point(__centerPosition.x, __centerPosition.y); +} + +FloatPoint +_TouchPinchGestureDetector::GetCenterPointF(void) const +{ + return __centerPosition; +} + +int +_TouchPinchGestureDetector::GetScale(void) const +{ + return __scale; +} + +float +_TouchPinchGestureDetector::GetScaleF(void) const +{ + return __scale; +} + +int +_TouchPinchGestureDetector::MeasureArea(void) +{ + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + 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, "[%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); + + bool initialized = false; + + __MinimumPoint.x = 0; + __MinimumPoint.y = 0; + __MaximumPoint.x = 0; + __MaximumPoint.y = 0; + + for (int i = 0; i < pFingerInfoList->GetCount(); i++) + { + _FingerInfo* pFingerInfo = null; + pFingerInfoList->GetAt(i, pFingerInfo); + + if (pFingerInfo == null || pFingerInfo->GetPointId() == INVALID_POINT_ID || + pFingerInfo->GetStatus() == _TOUCH_RELEASED || pFingerInfo->GetStatus() == _TOUCH_CANCELED) + { + 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(); + + if (initialized) + { + if (__MinimumPoint.x > point.x) + { + __MinimumPoint.x = point.x; + } + if (__MinimumPoint.y > point.y) + { + __MinimumPoint.y = point.y; + } + if (__MaximumPoint.x < point.x) + { + __MaximumPoint.x = point.x; + } + if (__MaximumPoint.y < point.y) + { + __MaximumPoint.y = point.y; + } + } + else + { + __MinimumPoint.x = point.x; + __MinimumPoint.y = point.y; + __MaximumPoint.x = point.x; + __MaximumPoint.y = point.y; + + initialized = true; + } + } + + delete pFingerInfoList; + pFingerInfoList = null; + + __centerPosition.x = (__MinimumPoint.x+__MaximumPoint.x)/2; + __centerPosition.y = (__MinimumPoint.y+__MaximumPoint.y)/2; + + __scale = int(sqrt(pow(abs(__MaximumPoint.x-__MinimumPoint.x), 2) + pow(abs(__MaximumPoint.y-__MinimumPoint.y), 2))); + + initialized = false; + //SysLog(NID_UI, "centerX = %d, centerY = %d, area = %d", __centerPosition.x, __centerPosition.y, __scale); + + return __scale; +} + +} } // Tizen::Ui diff --git a/src/ui/FUi_TouchPinchGestureDetectorImpl.cpp b/src/ui/FUi_TouchPinchGestureDetectorImpl.cpp new file mode 100644 index 0000000..8513135 --- /dev/null +++ b/src/ui/FUi_TouchPinchGestureDetectorImpl.cpp @@ -0,0 +1,120 @@ +// +// 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_TouchPinchGestureDetectorImpl.cpp + * @brief This is the implementation file for %_TouchPinchGestureDetectorImpl class + * @version 2.0 + * + * This file contains the implementation of %_TouchPinchGestureDetectorImpl class. + * + */ + +#include +#include "FUi_TouchPinchGestureDetectorImpl.h" +#include "FUi_TouchPinchGestureDetector.h" + +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui +{ + +_TouchPinchGestureDetectorImpl::_TouchPinchGestureDetectorImpl(TouchPinchGestureDetector* pPublic, _TouchPinchGestureDetector* pCore) + : _TouchGestureDetectorImpl(pPublic, pCore) +{ +} + +_TouchPinchGestureDetectorImpl::~_TouchPinchGestureDetectorImpl(void) +{ +} + +_TouchPinchGestureDetectorImpl* +_TouchPinchGestureDetectorImpl::CreateInstanceN(TouchPinchGestureDetector* pPublic) +{ + ClearLastResult(); + + _TouchPinchGestureDetector* pCore = null; + pCore = new (std::nothrow) _TouchPinchGestureDetector; + 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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + return pImpl; + +CATCH: + delete pCore; + + return null; +} + +const _TouchPinchGestureDetector& +_TouchPinchGestureDetectorImpl::GetCore(void) const +{ + return static_cast(_TouchGestureDetectorImpl::GetCore()); +} + +_TouchPinchGestureDetector& +_TouchPinchGestureDetectorImpl::GetCore(void) +{ + return static_cast<_TouchPinchGestureDetector&>(_TouchGestureDetectorImpl::GetCore()); +} + +_TouchPinchGestureDetectorImpl* +_TouchPinchGestureDetectorImpl::GetInstance(TouchPinchGestureDetector& gestureDetector) +{ + return static_cast<_TouchPinchGestureDetectorImpl*> (gestureDetector.__pTouchGestureDetectorImpl); +} + +const _TouchPinchGestureDetectorImpl* +_TouchPinchGestureDetectorImpl::GetInstance(const TouchPinchGestureDetector& gestureDetector) +{ + return static_cast (gestureDetector.__pTouchGestureDetectorImpl); +} + +Point +_TouchPinchGestureDetectorImpl::GetCenterPoint(void) const +{ + ClearLastResult(); + + return GetCore().GetCenterPoint(); +} + +FloatPoint +_TouchPinchGestureDetectorImpl::GetCenterPointF(void) const +{ + ClearLastResult(); + + return GetCore().GetCenterPointF(); +} + +int +_TouchPinchGestureDetectorImpl::GetScale(void) const +{ + ClearLastResult(); + + return GetCore().GetScale(); +} + +float +_TouchPinchGestureDetectorImpl::GetScaleF(void) const +{ + ClearLastResult(); + + return GetCore().GetScaleF(); +} + +} } //Tizen::Ui diff --git a/src/ui/FUi_TouchRotationGestureDetector.cpp b/src/ui/FUi_TouchRotationGestureDetector.cpp new file mode 100644 index 0000000..bbedaed --- /dev/null +++ b/src/ui/FUi_TouchRotationGestureDetector.cpp @@ -0,0 +1,415 @@ +// +// 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_TouchRotationGestureDetector.cpp + * @brief This is the implementation file for %_TouchRotationGestureDetector class + * @version 2.0 + * + * This file contains the implementation of %_TouchRotationGestureDetector class. + * + */ +#include +#include +#include +#include +#include "FUi_TouchRotationGestureDetector.h" +#include "FUi_ITouchRotationGestureEventListener.h" +#include "FUi_TouchRotationGestureDetectorImpl.h" +#include "FUi_Control.h" +#include "FUi_FingerInfo.h" + +using namespace Tizen::Base::Collection; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Base::Utility; + +namespace +{ +const float PI = 3.14159265; +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; +} + +namespace Tizen { namespace Ui +{ +_TouchRotationGestureDetector::_TouchRotationGestureDetector(void) + : __distance(0) + , __angle(0) + , __fingerCount(0) + , __firstPoint(0, 0) + , __secondPoint(0, 0) + , __firstPrevPoint(0, 0) + , __secondPrevPoint(0, 0) + , __firstMovedDirection(0) + , __secondMovedDirection(0) + , __pTimer(null) + , __firstPointId(INVALID_POINT_ID) + , __secondPointId(INVALID_POINT_ID) +{ + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pTimer = new (std::nothrow) Timer; + 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)); + + SetDetectorType(_TOUCH_GESTURE_DETECTOR_TYPE_ROTATION); + return; + +CATCH: + delete __pTimer; + __pTimer = null; +} + +_TouchRotationGestureDetector::~_TouchRotationGestureDetector(void) +{ + delete __pTimer; + __pTimer = null; +} + +double +_TouchRotationGestureDetector::GetAngle(float x1, float y1, float x2, float y2) const +{ + float tempX = 0; + float tempY = 0; + float angle = 0; + + tempX= -y1; + tempY = x1; + + angle = acos( (tempX * x2 + tempY * y2) / + (sqrt( tempX * tempX + tempY * tempY ) * + sqrt(x2 * x2 + y2 * y2) ) )* DEGREE_180 / PI; + + if (angle > DEGREE_90) + { + angle = DEGREE_360 - acos( (x1 * x2 + y1 * y2) / + (sqrt( x1 * x1 + y1 * y1 ) * + sqrt(x2 * x2 + y2 * y2) ) )* DEGREE_180 / PI; + } + else + { + angle = acos( (x1 * x2 + y1 * y2) / + (sqrt( x1 * x1 + y1 * y1 ) * + sqrt(x2 * x2 + y2 * y2) ) )* DEGREE_180 / PI; + } + + return angle; +} + +float +_TouchRotationGestureDetector::GetAngle(void) const +{ + return __angle; +} + +float +_TouchRotationGestureDetector::GetDistance(void) const +{ + return __distance; +} + +float +_TouchRotationGestureDetector::GetDistanceF(void) const +{ + return __distance; +} + +bool +_TouchRotationGestureDetector::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + __fingerCount++; + + switch(__fingerCount) + { + case 1: + { + __firstPrevPoint.x = touchinfo.GetCurrentPosition().x; + __firstPrevPoint.y = touchinfo.GetCurrentPosition().y; + __firstPoint.x = touchinfo.GetCurrentPosition().x; + __firstPoint.y = touchinfo.GetCurrentPosition().y; + __distance = 0; + __angle = 0; + __firstPointId = touchinfo.GetPointId(); + SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_READY); + } + break; + + case 2: + { + __secondPrevPoint.x = touchinfo.GetCurrentPosition().x; + __secondPrevPoint.y = touchinfo.GetCurrentPosition().y; + __secondPoint.x = touchinfo.GetCurrentPosition().x; + __secondPoint.y = touchinfo.GetCurrentPosition().y; + __distance = Distance(__firstPrevPoint.x, __firstPrevPoint.y, __secondPrevPoint.x, __secondPrevPoint.y); + __angle = 0; + __secondPointId = touchinfo.GetPointId(); + __firstMovedDirection = 0; + __secondMovedDirection = 0; + SetGestureStart(true); + SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_STARTED); + + _Control* pControl = GetControl(); + if (pControl && !pControl->IsMultiTouchEnabled()) + { + pControl->SetMultiTouchEnabled(true); + } + } + break; + + default: + break; + } + + return false; +} + +bool +_TouchRotationGestureDetector::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + if (touchinfo.GetPointId() == __firstPointId || touchinfo.GetPointId() == __secondPointId) + { + float angle = 0; + _TouchGestureDetectorState state = GetDetectorState(); + + if (state == _TOUCH_GESTURE_DETECTOR_STATE_STARTED || state == _TOUCH_GESTURE_DETECTOR_STATE_SUCCESS_AND_WAIT || state == _TOUCH_GESTURE_DETECTOR_STATE_CHANGED) + { + if (touchinfo.GetPointId() == __firstPointId) + { + if (state == _TOUCH_GESTURE_DETECTOR_STATE_CHANGED) + { + __firstPrevPoint.x = __firstPoint.x; + __firstPrevPoint.y = __firstPoint.y; + } + + __firstPoint.x = touchinfo.GetCurrentPosition().x; + __firstPoint.y = touchinfo.GetCurrentPosition().y; + angle = GetAngle(__secondPoint.x - __firstPrevPoint.x, __secondPoint.y - __firstPrevPoint.y, __secondPoint.x - __firstPoint.x, __secondPoint.y - __firstPoint.y); + } + else + { + if (state == _TOUCH_GESTURE_DETECTOR_STATE_CHANGED) + { + __secondPrevPoint.x = __secondPoint.x; + __secondPrevPoint.y = __secondPoint.y; + } + + __secondPoint.x = touchinfo.GetCurrentPosition().x; + __secondPoint.y = touchinfo.GetCurrentPosition().y; + angle = GetAngle(__firstPoint.x-__secondPrevPoint.x, __firstPoint.y - __secondPrevPoint.y, __firstPoint.x - __secondPoint.x, __firstPoint.y - __secondPoint.y); + } + + __distance = Distance(__firstPoint.x, __firstPoint.y, __secondPoint.x, __secondPoint.y); + + if (state == _TOUCH_GESTURE_DETECTOR_STATE_STARTED) + { + if (Math::Abs(__firstPrevPoint.x - __firstPoint.x) >= MIN_MOVEALLOWANCE + || Math::Abs(__firstPrevPoint.y - __firstPoint.y) >= MIN_MOVEALLOWANCE + || Math::Abs(__secondPrevPoint.x - __secondPoint.x) >= MIN_MOVEALLOWANCE + || Math::Abs(__secondPrevPoint.y - __secondPoint.y) >= MIN_MOVEALLOWANCE) + { + enum moveDirection + { + NONE = 0x0, RIGHT = 0x1, UP = 0x2, LEFT = 0x4, DOWN = 0x8 + }; + + if (__firstPrevPoint.y - __firstPoint.y > 0) + { + if (__firstMovedDirection & DOWN) + { + __firstMovedDirection ^= DOWN; + } + + __firstMovedDirection |= UP; + } + else if (__firstPrevPoint.y - __firstPoint.y < 0) + { + if (__firstMovedDirection & UP) + { + __firstMovedDirection ^= UP; + } + + __firstMovedDirection |= DOWN; + } + + if (__secondPrevPoint.y - __secondPoint.y > 0) + { + if (__secondMovedDirection & DOWN) + { + __secondMovedDirection ^= DOWN; + } + + __secondMovedDirection |= UP; + + } + else if (__secondPrevPoint.y - __secondPoint.y < 0) + { + if (__secondMovedDirection & UP) + { + __secondMovedDirection ^= UP; + } + + __secondMovedDirection |= DOWN; + } + +// Do not check same direction during rotation gesture. +// If not check the direction, it dooesn't display any result until. +/* + if (__firstMovedDirection & __secondMovedDirection) + { + SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_FINISHED); + return false; + } +*/ + } + + if (angle >= DEGREE_360 - (MIN_ANGLE*2)) + { + if (angle <= DEGREE_360 - MIN_ANGLE) + { + __angle = -(DEGREE_360 - angle); + +/* if (state == _TOUCH_GESTURE_DETECTOR_STATE_STARTED) + { + __pTimer->Start(POLLING_ROTATION); + }*/ + + SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_CHANGED); + } + } + else + { + if (angle >= MIN_ANGLE) + { + __angle = angle; + + /* if (state == _TOUCH_GESTURE_DETECTOR_STATE_STARTED) + { + __pTimer->Start(POLLING_ROTATION); + }*/ + + SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_CHANGED); + } + } + } + else + { + if (angle >= DEGREE_360 - MIN_ANGLE) + { + __angle = -(DEGREE_360 - angle); + } + else + { + __angle = angle; + } + + SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_CHANGED); + } + } + } + + return false; +} + +void +_TouchRotationGestureDetector::OnTimerExpired(Timer& timer) +{ + SetDetectorStateChanged(); + + __pTimer->Start(POLLING_ROTATION); +} + +void +_TouchRotationGestureDetector::SetDetectorStateChanged(void) +{ + if (GetDetectorState() == _TOUCH_GESTURE_DETECTOR_STATE_CHANGED) + { + SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_CHANGED); + } +} + +bool +_TouchRotationGestureDetector::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + __fingerCount--; + + if (touchinfo.GetPointId() == __firstPointId || touchinfo.GetPointId() == __secondPointId) + { + __pTimer->Cancel(); + + if (touchinfo.GetPointId() == __firstPointId) + { + __firstPointId = INVALID_POINT_ID; + } + else + { + __secondPointId = INVALID_POINT_ID; + } + + _TouchGestureDetectorState state = GetDetectorState(); + + if (IsGestureStarted()) + { + SetGestureStart(false); + if (state == _TOUCH_GESTURE_DETECTOR_STATE_STARTED || state == _TOUCH_GESTURE_DETECTOR_STATE_CHANGED || state == _TOUCH_GESTURE_DETECTOR_STATE_SUCCESS_AND_WAIT) + { + SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_FINISHED); + } + } + } + + return false; +} + +bool +_TouchRotationGestureDetector::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + __firstMovedDirection = 0; + __secondMovedDirection = 0; + __fingerCount = 0; + __firstPointId = INVALID_POINT_ID; + __secondPointId = INVALID_POINT_ID; + __pTimer->Cancel(); + + return false; +} + +void +_TouchRotationGestureDetector::OnTouchGestureDetectorAdded(void) +{ + __firstMovedDirection = 0; + __secondMovedDirection = 0; + __fingerCount = 0; + __firstPointId = INVALID_POINT_ID; + __secondPointId = INVALID_POINT_ID; +} + +void +_TouchRotationGestureDetector::OnTouchGestureDetectorRemoved(void) +{ + if (__pTimer) + { + __pTimer->Cancel(); + } +} + +}} // Tizen::Ui diff --git a/src/ui/FUi_TouchRotationGestureDetectorImpl.cpp b/src/ui/FUi_TouchRotationGestureDetectorImpl.cpp new file mode 100644 index 0000000..9b4fcb8 --- /dev/null +++ b/src/ui/FUi_TouchRotationGestureDetectorImpl.cpp @@ -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 FUi_TouchRotationGestureDetectorImpl.cpp + * @brief This is the implementation file for %_TouchRotationGestureDetectorImpl class + * @version 2.0 + * + * This file contains the implementation of %_TouchRotationGestureDetectorImpl class. + * + */ + +// includes +#include +#include "FUi_TouchRotationGestureDetector.h" +#include "FUi_TouchRotationGestureDetectorImpl.h" + +namespace Tizen { namespace Ui +{ + +_TouchRotationGestureDetectorImpl::_TouchRotationGestureDetectorImpl(TouchRotationGestureDetector* pPublic, _TouchRotationGestureDetector* pCore) + : _TouchGestureDetectorImpl(pPublic, pCore) +{ +} + +_TouchRotationGestureDetectorImpl::~_TouchRotationGestureDetectorImpl(void) +{ +} + +_TouchRotationGestureDetectorImpl* +_TouchRotationGestureDetectorImpl::CreateInstanceN(TouchRotationGestureDetector* pPublic) +{ + ClearLastResult(); + + _TouchRotationGestureDetector* pCore = null; + pCore = new (std::nothrow) _TouchRotationGestureDetector; + 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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + return pImpl; + +CATCH: + delete pCore; + + return null; +} + +const _TouchRotationGestureDetector& +_TouchRotationGestureDetectorImpl::GetCore(void) const +{ + return static_cast(_TouchGestureDetectorImpl::GetCore()); +} + +_TouchRotationGestureDetector& +_TouchRotationGestureDetectorImpl::GetCore(void) +{ + return static_cast<_TouchRotationGestureDetector&>(_TouchGestureDetectorImpl::GetCore()); +} + +_TouchRotationGestureDetectorImpl* +_TouchRotationGestureDetectorImpl::GetInstance(TouchRotationGestureDetector& gestureDetector) +{ + return static_cast<_TouchRotationGestureDetectorImpl*> (gestureDetector.__pTouchGestureDetectorImpl); +} + +const _TouchRotationGestureDetectorImpl* +_TouchRotationGestureDetectorImpl::GetInstance(const TouchRotationGestureDetector& gestureDetector) +{ + return static_cast (gestureDetector.__pTouchGestureDetectorImpl); +} + +float +_TouchRotationGestureDetectorImpl::GetAngle(void) const +{ + ClearLastResult(); + + return GetCore().GetAngle(); +} + +int +_TouchRotationGestureDetectorImpl::GetDistance(void) const +{ + ClearLastResult(); + + return GetCore().GetDistance(); +} + +float +_TouchRotationGestureDetectorImpl::GetDistanceF(void) const +{ + ClearLastResult(); + + return GetCore().GetDistance(); +} + +}} // Tizen::Ui diff --git a/src/ui/FUi_TouchTapGestureDetector.cpp b/src/ui/FUi_TouchTapGestureDetector.cpp new file mode 100644 index 0000000..4edfbef --- /dev/null +++ b/src/ui/FUi_TouchTapGestureDetector.cpp @@ -0,0 +1,558 @@ +// +// 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_TouchTapGestureDetector.cpp + * @brief This is the implementation file for %_TouchTapGestureDetector class + * @version 2.0 + * + * This file contains the implementation of %_TouchTapGestureDetector class. + * + */ +#include +#include +#include +#include +#include "FUi_TouchTapGestureDetector.h" +#include "FUi_TouchManager.h" +#include "FUi_ITouchTapGestureEventListener.h" +#include "FUi_TouchTapGestureDetectorImpl.h" +#include "FUi_FingerInfo.h" +#include "FUi_TouchGestureTimerManager.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Base::Utility; +using namespace Tizen::Base::Collection; + +namespace +{ +const int DEFAULT_INTERNAL = 330; +const int DEFAULT_TAP_COUNT = 2; +const int DEFAULT_MOVE_ALLOWANCE = 10; +const int DEFAULT_TOUCH_COUNT = 1; +const int MAX_TOUCH_COUNT = 10; +} + +namespace Tizen { namespace Ui +{ + +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) + , __maxPointId(DEFAULT_TOUCH_COUNT-1) + , __pGestureTimerManager(null) + , __deleteTimer(true) + , __touchCanceled(false) + , __pTapInfoList(null) +{ + result r = GetLastResult(); + 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, "[%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, "[%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); + } + + SetDetectorType(_TOUCH_GESTURE_DETECTOR_TYPE_TAP); + return; + +CATCH: + if (__pTapInfoList) + { + RemoveTapInfoList(); + delete __pTapInfoList; + __pTapInfoList = null; + } +} + +_TouchTapGestureDetector::~_TouchTapGestureDetector(void) +{ + RemoveTapInfoList(); + __pTapInfoList->RemoveAll(); + + delete __pTapInfoList; + __pTapInfoList = null; + + if (__pGestureTimerManager) + { + if (IsTouchCanceled() == false) + { + __pGestureTimerManager->CancelTimer(); + } + + delete __pGestureTimerManager; + __pGestureTimerManager = null; + + __touchCanceled = false; + } +} + +void +_TouchTapGestureDetector::RemoveTapInfoList(void) +{ + IEnumeratorT<_TapInfo*>* pEnumerator = __pTapInfoList->GetEnumeratorN(); + if (pEnumerator) + { + while(pEnumerator->MoveNext() == E_SUCCESS) + { + _TapInfo* pTapInfo = null; + pEnumerator->GetCurrent(pTapInfo); + if (!pTapInfo) + { + continue; + } + delete pTapInfo; + } + delete pEnumerator; + } +} + +result +_TouchTapGestureDetector::SetTapCount(int count) +{ + SysTryReturnResult(NID_UI, count > 0, E_INVALID_ARG, "Argument is less than 0"); + + __tapCount = count; + return E_SUCCESS; +} + +int +_TouchTapGestureDetector::GetTapCount(void) const +{ + return __tapCount; +} + +result +_TouchTapGestureDetector::SetTapInterval(long intarval) +{ + SysTryReturnResult(NID_UI, intarval > 0, E_INVALID_ARG, "Argument is less than 0"); + + __interval = intarval; + return E_SUCCESS; +} + +long +_TouchTapGestureDetector::GetTapInterval(void) const +{ + return __interval; +} + +result +_TouchTapGestureDetector::SetTouchCount(int count) +{ + SysTryReturnResult(NID_UI, count > 0, E_INVALID_ARG, "Argument is less than 0"); + + __touchCount = count; + __maxPointId = __touchCount - 1; + + if (__touchCount > DEFAULT_TOUCH_COUNT) + { + _Control* pControl = GetControl(); + if (pControl && !pControl->IsMultiTouchEnabled()) + { + pControl->SetMultiTouchEnabled(true); + } + } + return E_SUCCESS; +} + +int +_TouchTapGestureDetector::GetTouchCount(void) const +{ + return __touchCount; +} + +result +_TouchTapGestureDetector::SetMoveAllowance(int allowance) +{ + 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."); + + for(int i=0; i<__touchCount; i++) + { + _TapInfo* pTapInfo = null; + __pTapInfoList->GetAt(i, pTapInfo); + if (!pTapInfo) + { + continue; + } + + pTapInfo->__tapMoveAllowance = allowance; + } + + return E_SUCCESS; +} + +int +_TouchTapGestureDetector::GetMoveAllowance(void) const +{ + return GetMoveAllowanceF(); +} + +result +_TouchTapGestureDetector::SetMoveAllowance(float allowance) +{ + 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."); + + for(int i=0; i<__touchCount; i++) + { + _TapInfo* pTapInfo = null; + __pTapInfoList->GetAt(i, pTapInfo); + if (!pTapInfo) + { + continue; + } + + pTapInfo->__tapMoveAllowance = allowance; + } + + return E_SUCCESS; +} + +float +_TouchTapGestureDetector::GetMoveAllowanceF(void) const +{ + _TapInfo* pTapInfo = null; + __pTapInfoList->GetAt(0, pTapInfo); + + return pTapInfo->__tapMoveAllowance; +} + +bool +_TouchTapGestureDetector::IsInBounds(void) +{ + 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 +_TouchTapGestureDetector::IsAllTapped(void) +{ + bool allTapped = true; + + for(int i=0; i<__touchCount; i++) + { + _TapInfo* pTapInfo = null; + __pTapInfoList->GetAt(i, pTapInfo); + if (!pTapInfo) + { + continue; + } + + if (pTapInfo->__isPressed && pTapInfo->__tappedCount >= __tapCount) + { + allTapped = true; + } + else + { + allTapped = false; + } + } + + return allTapped; +} + +bool +_TouchTapGestureDetector::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + if (touchinfo.GetPointId() > __maxPointId || GetDetectorState() != _TOUCH_GESTURE_DETECTOR_STATE_READY) + { + return false; + } + + _TapInfo* pTapInfo = null; + __pTapInfoList->GetAt(touchinfo.GetPointId(), pTapInfo); + SysTryReturn(NID_UI, pTapInfo, false, E_SYSTEM, "[E_SYSTEM] System error occurred. "); + + 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, + false, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + bool allTouched = false; + + for(int i=0; i<__touchCount; i++) + { + _TapInfo* pAllTapInfo = null; + __pTapInfoList->GetAt(i, pAllTapInfo); + if (pAllTapInfo) + { + if (pAllTapInfo->__isPressed) + { + allTouched = true; + } + else + { + allTouched = false; + } + } + } + + if (allTouched && !IsGestureStarted()) + { + SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_READY); + SetGestureStart(true); + + __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) + { + SetControl(source); + } + + if (__pGestureTimerManager->StartTimer(__interval) != E_SUCCESS) + { + SysLogException(NID_UI, E_SYSTEM, "[E_SYSTEM] Tapping timer is not started."); + } + } + } + + return false; +} + +bool +_TouchTapGestureDetector::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + if ((touchinfo.GetPointId() > __maxPointId) || (GetDetectorState() != _TOUCH_GESTURE_DETECTOR_STATE_READY)) + { + return false; + } + + _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) + { + pTapInfo->__tapIsInBounds = false; + + if (__pGestureTimerManager != null && __pGestureTimerManager->IsTimerStarted() == false) + { + if (IsTouchCanceled() == false) + { + __pGestureTimerManager->CancelTimer(); + __touchCanceled = true; + } + } + SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_FAILED); + ClearTapInfoList(); + } + + return false; +} + +bool +_TouchTapGestureDetector::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + if ((touchinfo.GetPointId() > __maxPointId) || (GetDetectorState() != _TOUCH_GESTURE_DETECTOR_STATE_READY)) + { + return false; + } + + _TapInfo* pTapInfo = null; + __pTapInfoList->GetAt(touchinfo.GetPointId(), pTapInfo); + SysTryReturn(NID_UI, pTapInfo, false, E_SYSTEM, "[E_SYSTEM] System error occurred. "); + + if (pTapInfo->__isPressed) + { + pTapInfo->__tappedCount++; + SysTryReturn(NID_UI, __pTapInfoList->SetAt(pTapInfo, touchinfo.GetPointId()) == E_SUCCESS, + 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 (__pGestureTimerManager != null && !__pGestureTimerManager->IsTimerExpired()) + { + if (IsTouchCanceled() == false) + { + __pGestureTimerManager->CancelTimer(); + } + + delete __pGestureTimerManager; + __pGestureTimerManager = null; + + __touchCanceled = false; + } + SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_FAILED); + ClearTapInfoList(); + return false; + } + } + + if (IsGestureStarted() && !__pGestureTimerManager->IsTimerExpired()) + { + if (IsAllTapped() && IsInBounds()) + { + if (__pGestureTimerManager != null && !__pGestureTimerManager->IsTimerExpired()) + { + if (IsTouchCanceled() == false) + { + __pGestureTimerManager->CancelTimer(); + } + + delete __pGestureTimerManager; + __pGestureTimerManager = null; + + __touchCanceled = false; + } + SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_SUCCESS); + ClearTapInfoList(); + } + } + else + { + if (!IsAllTapped() && !IsGestureStarted()) + { + if (__pGestureTimerManager != null && !__pGestureTimerManager->IsTimerExpired()) + { + if (IsTouchCanceled() == false) + { + __pGestureTimerManager->CancelTimer(); + } + + delete __pGestureTimerManager; + __pGestureTimerManager = null; + + __touchCanceled = false; + } + SetDetectorState(_TOUCH_GESTURE_DETECTOR_STATE_FAILED); + ClearTapInfoList(); + } + } + + return false; +} + +bool +_TouchTapGestureDetector::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + ClearTapInfoList(); + + 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++) + { + _TapInfo* pTapInfo = null; + __pTapInfoList->GetAt(i, pTapInfo); + if (!pTapInfo) + { + continue; + } + + pTapInfo->__isPressed = false; + pTapInfo->__tappedCount = 0; + + __pTapInfoList->SetAt(pTapInfo, i); + } +} + +}} //Tizen::Ui diff --git a/src/ui/FUi_TouchTapGestureDetectorImpl.cpp b/src/ui/FUi_TouchTapGestureDetectorImpl.cpp new file mode 100644 index 0000000..04a5e4c --- /dev/null +++ b/src/ui/FUi_TouchTapGestureDetectorImpl.cpp @@ -0,0 +1,150 @@ +// +// 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_TouchTapGestureDetectorImpl.cpp + * @brief This is the implementation file for %_TouchTapGestureDetectorImpl class + * @version 2.0 + * + * This file contains the implementation of% _TouchTapGestureDetectorImpl class. + * + */ + +#include "FUi_TouchTapGestureDetectorImpl.h" + +namespace Tizen { namespace Ui +{ + +_TouchTapGestureDetectorImpl::_TouchTapGestureDetectorImpl(TouchTapGestureDetector* pPublic, _TouchTapGestureDetector* pCore) + : _TouchGestureDetectorImpl(pPublic, pCore) +{ +} + +_TouchTapGestureDetectorImpl::~_TouchTapGestureDetectorImpl(void) +{ +} + +_TouchTapGestureDetectorImpl* +_TouchTapGestureDetectorImpl::CreateInstanceN(TouchTapGestureDetector* pPublic) +{ + ClearLastResult(); + + _TouchTapGestureDetector* pCore = null; + pCore = new (std::nothrow) _TouchTapGestureDetector; + 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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + return pImpl; + +CATCH: + delete pCore; + + return null; +} + +const _TouchTapGestureDetector& +_TouchTapGestureDetectorImpl::GetCore(void) const +{ + return static_cast(_TouchGestureDetectorImpl::GetCore()); +} + +_TouchTapGestureDetector& +_TouchTapGestureDetectorImpl::GetCore(void) +{ + return static_cast<_TouchTapGestureDetector&>(_TouchGestureDetectorImpl::GetCore()); +} + +_TouchTapGestureDetectorImpl* +_TouchTapGestureDetectorImpl::GetInstance(TouchTapGestureDetector& gestureDetector) +{ + return static_cast<_TouchTapGestureDetectorImpl*> (gestureDetector.__pTouchGestureDetectorImpl); +} + +const _TouchTapGestureDetectorImpl* +_TouchTapGestureDetectorImpl::GetInstance(const TouchTapGestureDetector& gestureDetector) +{ + return static_cast (gestureDetector.__pTouchGestureDetectorImpl); +} + +result +_TouchTapGestureDetectorImpl::SetTapCount(int count) +{ + return GetCore().SetTapCount(count); +} + +int +_TouchTapGestureDetectorImpl::GetTapCount(void) const +{ + ClearLastResult(); + + return GetCore().GetTapCount(); +} + +result +_TouchTapGestureDetectorImpl::SetTapInterval(long intarval) +{ + return GetCore().SetTapInterval(intarval); +} + +long +_TouchTapGestureDetectorImpl::GetTapInterval(void) const +{ + ClearLastResult(); + + return GetCore().GetTapInterval(); +} + +result +_TouchTapGestureDetectorImpl::SetMoveAllowance(int allowance) +{ + return GetCore().SetMoveAllowance(allowance); +} + +int +_TouchTapGestureDetectorImpl::GetMoveAllowance(void) const +{ + return GetCore().GetMoveAllowance(); +} + +result +_TouchTapGestureDetectorImpl::SetMoveAllowance(float allowance) +{ + return GetCore().SetMoveAllowance(allowance); +} + +float +_TouchTapGestureDetectorImpl::GetMoveAllowanceF(void) const +{ + return GetCore().GetMoveAllowanceF(); +} + +result +_TouchTapGestureDetectorImpl::SetTouchCount(int count) +{ + return GetCore().SetTouchCount(count); +} + +int +_TouchTapGestureDetectorImpl::GetTouchCount(void) const +{ + ClearLastResult(); + + return GetCore().GetTouchCount(); +} + +} } //Tizen::Ui diff --git a/src/ui/FUi_UiBuilder.cpp b/src/ui/FUi_UiBuilder.cpp new file mode 100644 index 0000000..d52ff0a --- /dev/null +++ b/src/ui/FUi_UiBuilder.cpp @@ -0,0 +1,466 @@ +// +// 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_UiBuilder.cpp +* @brief This is the implementation file for _UiBuilder class. +*/ + +#include +#include +#include +#include +#include "FGrp_Screen.h" +#include +#include "FUiCtrl_FrameImpl.h" +#include "FUi_UiBuilder.h" +#include "FUi_UiBuilderXmlHandler.h" +#include "FUi_ControlManager.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Io; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Media; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui +{ +_UiBuilder::_UiBuilder(void) + : __version(0) + , __lastIndex(0) + , __logicalResolution(0) + , __pUiBuilderControlList(null) + , __pContainer(null) + , __rotate(UIBUIDER_SCREEN_NONE) + , __pTransform(null) + , __xmlFile(L"") +{ +} + +_UiBuilder::~_UiBuilder(void) +{ + if (__pUiBuilderControlList) + { + _UiBuilderControl* pUiBuilderControl = null; + int controlCount = __pUiBuilderControlList->GetCount(); + for (int i = 0; i < controlCount; i++) + { + __pUiBuilderControlList->GetAt(i, pUiBuilderControl); + if (pUiBuilderControl) + { + delete pUiBuilderControl; + } + } + __pUiBuilderControlList->RemoveAll(); + delete __pUiBuilderControlList; + __pUiBuilderControlList = null; + } +} + +_UiBuilderControl* +_UiBuilder::GetControl(int index) const +{ + SysTryReturn(NID_UI, index >= 0 && index < UIBUILDER_CONTROL_MAX_COUNT, null, E_INVALID_ARG, + "[E_INVALID_ARG] Index is over than max control count"); + + _UiBuilderControl* pUiBuilderControl = null; + __pUiBuilderControlList->GetAt(index, pUiBuilderControl); + if (pUiBuilderControl == null) + { + SysLogException(NID_UI, GetLastResult(), "Failed to GetControl()"); + return null; + } + + return pUiBuilderControl; +} + +_UiBuilderControl* +_UiBuilder::GetControl(const Tizen::Base::String& id) const +{ + IEnumeratorT<_UiBuilderControl*>* pEnum = __pUiBuilderControlList->GetEnumeratorN(); + SysTryReturn(NID_UI, pEnum != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to get IEnumeratorT."); + _UiBuilderControl* pUiBuilderControl = null; + + while (pEnum->MoveNext() == E_SUCCESS) + { + pEnum->GetCurrent(pUiBuilderControl); + String controlId = pUiBuilderControl->GetId(); + + if (controlId.Equals(id, false)) + { + delete pEnum; + return pUiBuilderControl; + } + } + delete pEnum; + return null; + +} + +void +_UiBuilder::SetVersion(int xmlVersion) +{ + __version = xmlVersion; +} + +int +_UiBuilder::GetVersion(void) const +{ + return __version; +} + +result +_UiBuilder::Construct(const String& xmlFile, Container* pContainer) +{ + result r = E_SUCCESS; + + __pContainer = pContainer; + __xmlFile = xmlFile; + __pUiBuilderControlList = new (std::nothrow) ArrayListT<_UiBuilderControl*>; + SysTryCatch(NID_UI, __pUiBuilderControlList != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create __pUiBuilderControlList."); + + return r; + + CATCH: + + delete __pUiBuilderControlList; + return r; +} + +result +_UiBuilder::MakeUI(_UiBuilderControl* pControl) +{ + result r = E_SUCCESS; + + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + if(pUiBuilderControlTableManager == null) + { + return E_OUT_OF_MEMORY; + } + + for (int i = 0; i < UIBUILDER_CONTROL_MAX_COUNT; i++) + { + if (pUiBuilderControlTableManager->GetName(i).IsEmpty()) + { + break; + } + + if (pControl->GetType().Equals(pUiBuilderControlTableManager->GetName(i), false)) + { + _UiBuilderControlMakerFunctionPointer pControlMakerFunctionPointer = pUiBuilderControlTableManager->GetControlMaker(i); + if (pControlMakerFunctionPointer != null) + { + _UiBuilderControlMaker* pMaker = pControlMakerFunctionPointer(this); + r = pMaker->MakeControl(pControl); + + delete pMaker; + return r; + } + } + + } + + return E_OPERATION_FAILED; +} + +result +_UiBuilder::Parse(void) +{ + File file; + ByteBuffer buffer; + FileAttributes attrib; + int readCount = 0; + byte* pXmlContents = null; + result r = E_SUCCESS; + bool findPath = false; + int size = 0; + String xmlFilePath(L""); + String temp; + String homePath; + + __logicalResolution = _CoordinateSystem::GetInstance()->GetLogicalResolutionInt(); + + xmlFilePath.Append(__xmlFile); + xmlFilePath.Append(L".xml"); + + _ControlManager* pControlManager = _ControlManager::GetInstance(); + SysTryReturn(NID_UI, pControlManager != null, E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Unable to get the control manager"); + + int screenWidth = _Screen::GetWidth(); + int screenHeight = _Screen::GetHeight(); + + // find xml file with device deviceResolution + temp = xmlFilePath; + r = temp.Insert("/", 0); + SysTryReturn(NID_UI, r == E_SUCCESS, E_OPERATION_FAILED, E_OPERATION_FAILED, "[%s] Propagated.", GetErrorMessage(r)); + r = temp.Insert(screenHeight, 0); + SysTryReturn(NID_UI, r == E_SUCCESS, E_OPERATION_FAILED, E_OPERATION_FAILED, "[%s] Propagated.", GetErrorMessage(r)); + r = temp.Insert("x", 0); + SysTryReturn(NID_UI, r == E_SUCCESS, E_OPERATION_FAILED, E_OPERATION_FAILED, "[%s] Propagated.", GetErrorMessage(r)); + r = temp.Insert(screenWidth, 0); + SysTryReturn(NID_UI, r == E_SUCCESS, E_OPERATION_FAILED, E_OPERATION_FAILED, "[%s] Propagated.", GetErrorMessage(r)); + r = temp.Insert("res/", 0); + SysTryReturn(NID_UI, r == E_SUCCESS, E_OPERATION_FAILED, E_OPERATION_FAILED, "[%s] Propagated.", GetErrorMessage(r)); + + homePath = Tizen::App::App::GetInstance()->GetAppRootPath(); + r = temp.Insert(homePath, 0); + SysTryReturn(NID_UI, r == E_SUCCESS, E_OPERATION_FAILED, E_OPERATION_FAILED, "[%s] Propagated.", GetErrorMessage(r)); + SysLog(NID_IO, "[UiBuilder] ui builder res path: %ls", temp.GetPointer()); + + // find device deviceResolution directory + if (!File::IsFileExist(temp)) + { + temp = xmlFilePath; + r = temp.Insert("res/screen-size-normal/", 0); + SysTryReturn(NID_UI, r == E_SUCCESS, E_OPERATION_FAILED, E_OPERATION_FAILED, "[%s] Propagated.", GetErrorMessage(r)); + + homePath = Tizen::App::App::GetInstance()->GetAppRootPath(); + r = temp.Insert(homePath, 0); + SysTryReturn(NID_UI, r == E_SUCCESS, E_OPERATION_FAILED, E_OPERATION_FAILED, "[%s] Propagated.", GetErrorMessage(r)); + SysLog(NID_IO, "[UiBuilder] ui builder home path: %ls, res path: %ls", homePath.GetPointer(), temp.GetPointer()); + + if (!pControlManager->IsCoordinateSystemLogical() || !File::IsFileExist(temp)) // if autoscale on, find ScreenSize normal + { + findPath = false; + SysLogException(NID_UI, E_FILE_NOT_FOUND, "[E_FILE_NOT_FOUND] Parse failed -- %ls file not found.", temp.GetPointer()); + return E_FILE_NOT_FOUND; + } + } + + findPath = true; + xmlFilePath = temp; + r = file.Construct(xmlFilePath, L"r"); + if (IsFailed(r)) + { + SysLogException(NID_UI, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Parse Failed -- XML file Construct."); + return E_OPERATION_FAILED; + } + + r = Tizen::Io::File::GetAttributes(xmlFilePath, attrib); + if (IsFailed(r)) + { + SysLogException(NID_UI, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Parse Failed -- XML file GetAttributes."); + return E_OPERATION_FAILED; + } + size = (int) attrib.GetFileSize(); + + r = buffer.Construct(size); + if (IsFailed(r)) + { + SysLogException(NID_UI, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Parse Failed - Buffer Construct Failed."); + return E_OPERATION_FAILED; + } + + r = file.Read(buffer); + if (IsFailed(r)) + { + SysLogException(NID_UI, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Parse Failed -- can't read the file."); + return E_OPERATION_FAILED; + } + + readCount = buffer.GetPosition(); + pXmlContents = new (std::nothrow) byte[readCount]; + SysTryReturn(NID_UI, pXmlContents != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create XmlContents."); + buffer.Flip(); + + r = buffer.GetArray(pXmlContents, 0, readCount); + if (IsFailed(r)) + { + SysLogException(NID_UI, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Parse Failed -- buffer.GetArray is Failed."); + delete[] pXmlContents; + return E_OPERATION_FAILED; + } + + _UiBuilderXmlHandler xmlHandler; + bool returnValue = false; + char* pXmlBuffer = (char*) pXmlContents; + + + returnValue = xmlHandler.Construct(this); + if (returnValue == false) + { + delete[] pXmlContents; + return E_OPERATION_FAILED; + } + + r = xmlHandler.ParseXml(pXmlBuffer, readCount); + if (r != E_SUCCESS) + { + SysLogException(NID_UI, r, "[%s] Propagation.", GetErrorMessage(r)); + return r; + } + + if (__pTransform != null) + { + _UiBuilderControl* pUiBuilderControl; + for (int i = 0; i < UIBUILDER_CONTROL_MAX_COUNT; i++) + { + pUiBuilderControl = GetControl(i); + if (pUiBuilderControl != null) + { + _UiBuilderControlLayout* pUiBuilderControlLayoutPortrait; + _UiBuilderControlLayout* pUiBuilderControlLayoutLandscape; + + pUiBuilderControlLayoutPortrait = pUiBuilderControl->GetAttribute(UIBUILDER_ATTRIBUTE_PORTRAIT); + FloatRectangle rect = pUiBuilderControlLayoutPortrait->GetRectF(); + FloatRectangle realBounds = __pTransform->Transform(rect); + pUiBuilderControlLayoutPortrait->SetRect(realBounds.x, realBounds.y, realBounds.width, realBounds.height); + + pUiBuilderControlLayoutLandscape = pUiBuilderControl->GetAttribute(UIBUILDER_ATTRIBUTE_LANDSCAPE); + rect = pUiBuilderControlLayoutLandscape->GetRectF(); + realBounds = __pTransform->Transform(rect); + pUiBuilderControlLayoutLandscape->SetRect(realBounds.x, realBounds.y, realBounds.width, realBounds.height); + } + else + { + break; + } + } + + } + + //Make UiControls with UiBuilderControls + IEnumeratorT<_UiBuilderControl*>* pEnum = __pUiBuilderControlList->GetEnumeratorN(); + SysTryCatch(NID_UI, pEnum != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to get IEnumeratorT."); + + while (pEnum->MoveNext() == E_SUCCESS) + { + _UiBuilderControl* pUiBuilderControl = null; + pEnum->GetCurrent(pUiBuilderControl); + if (pUiBuilderControl != null) + { + r = MakeUI(pUiBuilderControl); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[UiBuilder] Failed to create control %ls", pUiBuilderControl->GetType().GetPointer()); + } + } + + if (__pTransform) + { + delete __pTransform; + __pTransform = null; + } + delete[] pXmlContents; + delete pEnum; + return E_SUCCESS; + + CATCH: + if (__pTransform) + { + delete __pTransform; + __pTransform = null; + } + delete[] pXmlContents; + delete pEnum; + return r; + +} + +_UiBuilderControl* +_UiBuilder::CreateControl(void) +{ + if (__pUiBuilderControlList == null) + { + __pUiBuilderControlList = new (std::nothrow) ArrayListT<_UiBuilderControl*>; + SysTryReturn(NID_UI, __pUiBuilderControlList != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create __pUiBuilderControlList."); + } + + _UiBuilderControl* pUiBuilderControl = null; + pUiBuilderControl = new (std::nothrow) _UiBuilderControl; + if (pUiBuilderControl != null) + { + __pUiBuilderControlList->Add(pUiBuilderControl); + } + else + { + SysLogException(NID_UI, E_OUT_OF_MEMORY, "Failed to CreateControl()"); + return null; + } + + return pUiBuilderControl; +} + +Tizen::Ui::Container* +_UiBuilder::GetContainer() const +{ + return __pContainer; +} + +void +_UiBuilder::SetUiBuilderRotateState(_UiBuilderScreenRotate rotate) +{ + __rotate = rotate; +} + +_UiBuilderScreenRotate +_UiBuilder::GetUiBuilderRotateState() const +{ + return __rotate; +} + +result +_UiBuilder::SetFormXmlResolution(int formXmlResoluton) +{ + result r = E_SUCCESS; + + if (__pTransform == null) + { + if (formXmlResoluton == 720 && __logicalResolution == 480) + { + __pTransform = _CoordinateSystem::GetTransformerN(720, _CoordinateSystem::GetInstance()->GetLogicalBaseScreenSize(), Dimension(480, 800), _CoordinateSystem::GetInstance()->GetPhysicalBaseScreenSize()); + SysTryReturn(NID_UI, __pTransform != null, null, GetLastResult(), + "Failed to get Transformer"); + } + if (formXmlResoluton == 480 && __logicalResolution == 720) + { + __pTransform = _CoordinateSystem::GetTransformerN(480, _CoordinateSystem::GetInstance()->GetLogicalBaseScreenSize(), Dimension(720, 1280), _CoordinateSystem::GetInstance()->GetPhysicalBaseScreenSize()); + SysTryReturn(NID_UI, __pTransform != null, GetLastResult(), GetLastResult(), + "Failed to get Transformer"); + } + } + else + { + SysLog(NID_UI, "__pTransform is already exists"); + r = E_SYSTEM; + } + return r; +} + +void +_UiBuilder::SetLayoutOrientation(_UiBuilderControl* pUiBuilderControl, Tizen::Ui::Control* pControl) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*pControl); + _UiBuilderControlLayout* pLayout = null; + FloatRectangle rect; + + pLayout = pUiBuilderControl->GetAttribute(UIBUILDER_ATTRIBUTE_PORTRAIT); + rect = pLayout->GetRectF(); + pControlImpl->SetBuilderBounds(_CONTROL_ORIENTATION_PORTRAIT, rect); + + pLayout = pUiBuilderControl->GetAttribute(UIBUILDER_ATTRIBUTE_LANDSCAPE); + rect = pLayout->GetRectF(); + pControlImpl->SetBuilderBounds(_CONTROL_ORIENTATION_LANDSCAPE, rect); +} + +_ICoordinateSystemTransformer* +_UiBuilder::GetTransformer() const +{ + return __pTransform; +} + +} } // Tizen::Ui diff --git a/src/ui/FUi_UiBuilderControl.cpp b/src/ui/FUi_UiBuilderControl.cpp new file mode 100644 index 0000000..10d8f84 --- /dev/null +++ b/src/ui/FUi_UiBuilderControl.cpp @@ -0,0 +1,425 @@ +// +// 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_UiBuilderControl.cpp +* @brief This is the implementation file for _UiBuilderControl class. +*/ + +#include +#include +#include +#include +#include +#include +#include "FUi_UiBuilder.h" +#include "FUi_UiBuilderControl.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Ui; + +namespace Tizen { namespace Ui +{ +_UiBuilderControl::_UiBuilderControl(void) + : __itemCount(0) + , __pHandle(null) + , __type(L"") + , __id(L"") + , __parentId(L"") + , __pUiBuilderControlElementList(null) + , __pUiBuilderControlItemList(null) +{ +} +_UiBuilderControl::~_UiBuilderControl(void) +{ + if (__pUiBuilderControlElementList) + { + _UiBuilderControlElement* pUiBuilderControlElement = null; + int controlCount = __pUiBuilderControlElementList->GetCount(); + for (int i = 0; i < controlCount; i++) + { + __pUiBuilderControlElementList->GetAt(i, pUiBuilderControlElement); + delete pUiBuilderControlElement; + } + __pUiBuilderControlElementList->RemoveAll(); + delete __pUiBuilderControlElementList; + __pUiBuilderControlElementList = null; + } + + if (__pUiBuilderControlItemList) + { + _UiBuilderControlItem* pUiBuilderControlItem = null; + int controlCount = __pUiBuilderControlItemList->GetCount(); + for (int i = 0; i < controlCount; i++) + { + __pUiBuilderControlItemList->GetAt(i, pUiBuilderControlItem); + delete pUiBuilderControlItem; + } + __pUiBuilderControlItemList->RemoveAll(); + delete __pUiBuilderControlItemList; + __pUiBuilderControlItemList = null; + } +} + +void +_UiBuilderControl::Construct(const Tizen::Base::String& type) +{ + if (__pUiBuilderControlElementList == null) + { + __pUiBuilderControlElementList = new (std::nothrow) ArrayListT<_UiBuilderControlElement*>; + } + if (__pUiBuilderControlItemList == null) + { + __pUiBuilderControlItemList = new (std::nothrow) ArrayListT<_UiBuilderControlItem*>; + } + + if (type.Equals(L"Map", false)) + { + return; + } + + if (type.Equals(L"Web", false)) + { + __pHandle = dlopen("libosp-web.so", RTLD_LAZY | RTLD_GLOBAL); + if (__pHandle == null) + { + SysLog(NID_UI, "Failed to libosp-web.so"); + } + } + SetType(type); +} + +void +_UiBuilderControl::SetId(const Tizen::Base::String& id) +{ + __id = id; +} + +void +_UiBuilderControl::SetType(const Tizen::Base::String& type) +{ + __type = type; +} + +void +_UiBuilderControl::SetParentWin(const Tizen::Base::String& parent) +{ + __parentId = parent; +} + +void +_UiBuilderControl::SetElement(int index, const Tizen::Base::String& elementName, const Tizen::Base::String& elementValue) +{ + _UiBuilderControlElement* pUiBuilderControlElement = null; + pUiBuilderControlElement = new (std::nothrow) _UiBuilderControlElement; + if (pUiBuilderControlElement != null) + { + pUiBuilderControlElement->SetName(elementName); + pUiBuilderControlElement->SetValue(elementValue); + __pUiBuilderControlElementList->Add(pUiBuilderControlElement); + } + else + { + SysLogException(NID_UI, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _UiBuilderControlElement."); + } +} + +void +_UiBuilderControl::SetItemName(const Tizen::Base::String& name) +{ + _UiBuilderControlItem* pUiBuilderControlItem = null; + __pUiBuilderControlItemList->GetAt(__itemCount, pUiBuilderControlItem); + SysTryReturnVoidResult(NID_UI, pUiBuilderControlItem != null, GetLastResult(), "Failed to get _UiBuilderControlItem"); + + pUiBuilderControlItem->SetItemName(name); + __itemCount++; +} + +void +_UiBuilderControl::SetItemElement(int index, const Tizen::Base::String& name, const Tizen::Base::String& value) +{ + + _UiBuilderControlItem* pUiBuilderControlItem = null; + if (index == 0) + { + pUiBuilderControlItem = new (std::nothrow) _UiBuilderControlItem; + pUiBuilderControlItem->SetItemElement(index, name, value); + __pUiBuilderControlItemList->Add(pUiBuilderControlItem); + } + else + { + __pUiBuilderControlItemList->GetAt(__itemCount, pUiBuilderControlItem); + SysTryReturnVoidResult(NID_UI, pUiBuilderControlItem != null, GetLastResult(), "Failed to get _UiBuilderControlItem"); + pUiBuilderControlItem->SetItemElement(index, name, value); + } +} + +bool +_UiBuilderControl::GetItemElement(int index, const Tizen::Base::String& elementName, Tizen::Base::String& elementOutValue) +{ + bool findElement = false; + + _UiBuilderControlItem* pUiBuilderControlItem = null; + __pUiBuilderControlItemList->GetAt(index, pUiBuilderControlItem); + if (pUiBuilderControlItem == null) + { + SysLogException(NID_UI, GetLastResult(), "Failed to get _UiBuilderControlItem"); + return null; + } + + + Tizen::Base::Collection::ArrayListT<_UiBuilderControlElement*>* pItemPropertyList = pUiBuilderControlItem->GetItemProperty(); + + IEnumeratorT<_UiBuilderControlElement*>* pEnum = pItemPropertyList->GetEnumeratorN(); + SysTryReturn(NID_UI, pEnum != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to get IEnumerator."); + _UiBuilderControlElement* pUiBuilderControlElement = null; + + while (pEnum->MoveNext() == E_SUCCESS) + { + pEnum->GetCurrent(pUiBuilderControlElement); + if (pUiBuilderControlElement->GetName().Equals(elementName, false) && pUiBuilderControlElement->GetValue().IsEmpty() == false) + { + elementOutValue = pUiBuilderControlElement->GetValue(); + findElement = true; + break; + } + } + delete pEnum; + + if (!findElement) + { + return false; + } + else + { + // < & > check + if (IsSpecialChar(elementOutValue)) + { + ConvertSpecialChar(elementOutValue); + } + } + if (elementOutValue[0] == ':' && elementOutValue[1] == ':') + { + result r = E_SUCCESS; + AppResource* pAppResource = AppResource::GetInstance(); + if (pAppResource == null) + { + return false; + } + String subStr; + String getStringValue; + elementOutValue.SubString(2, elementOutValue.GetLength() - 2, subStr); + elementOutValue = subStr; + r = pAppResource->GetString(elementOutValue, getStringValue); + elementOutValue = getStringValue; + } + + return true; +} + +bool +_UiBuilderControl::GetElement(const Tizen::Base::String& elementName, Tizen::Base::String& elementOutValue) +{ + bool findElement = false; + IEnumeratorT<_UiBuilderControlElement*>* pEnum = __pUiBuilderControlElementList->GetEnumeratorN(); + SysTryReturn(NID_UI, pEnum != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to get IEnumerator."); + _UiBuilderControlElement* pUiBuilderControlElement = null; + + while (pEnum->MoveNext() == E_SUCCESS) + { + pEnum->GetCurrent(pUiBuilderControlElement); + if (pUiBuilderControlElement->GetName().Equals(elementName, false) && pUiBuilderControlElement->GetValue().IsEmpty() == false) + { + elementOutValue = pUiBuilderControlElement->GetValue(); + findElement = true; + break; + } + } + delete pEnum; + + if (findElement == false) + { + return false; + } + else + { + // < & > check + if (IsSpecialChar(elementOutValue)) + { + ConvertSpecialChar(elementOutValue); + } + } + + if (elementOutValue[0] == ':' && elementOutValue[1] == ':') + { + result r = E_SUCCESS; + AppResource* pAppResource = AppResource::GetInstance(); + if (pAppResource == null) + { + return false; + } + String subStr; + String getStringValue; + elementOutValue.SubString(2, elementOutValue.GetLength() - 2, subStr); + elementOutValue = subStr; + + r = pAppResource->GetString(elementOutValue, getStringValue); + elementOutValue = getStringValue; + } + + return true; + +} + +int +_UiBuilderControl::GetItemCount(void) const +{ + return __itemCount; +} + +String +_UiBuilderControl::GetId(void) const +{ + return __id; +} + +String +_UiBuilderControl::GetType(void) const +{ + return __type; +} + +String +_UiBuilderControl::GetParentWin(void) const +{ + return __parentId; +} + +String +_UiBuilderControl::GetItemName(int index) const +{ + _UiBuilderControlItem* pUiBuilderControlItem = null; + __pUiBuilderControlItemList->GetAt(index, pUiBuilderControlItem); + SysTryReturn(NID_UI, pUiBuilderControlItem != null, L"", GetLastResult(), "Failed to get _UiBuilderControlItem"); + + return pUiBuilderControlItem->GetItemName(); +} + +_UiBuilderControlLayout* +_UiBuilderControl::GetAttribute(int mode) const +{ + return const_cast<_UiBuilderControlLayout*>(&__layout[mode]); +} + +bool +_UiBuilderControl::IsSpecialChar(const Tizen::Base::String& string) const +{ + if (string.IsEmpty()) + { + return false; + } + if (string.Contains(L"<") ||string.Contains(L"&") + || string.Contains(L">") || string.Contains(L"'") + || string.Contains(L""") || string.Contains(L"\\")) + { + return true; + } + else + { + return false; + } +} + +void +_UiBuilderControl::ConvertSpecialChar(Tizen::Base::String& string) const +{ + int len = string.GetLength(); + wchar_t* stringPointer = const_cast(string.GetPointer()); + int i = 0; + int j = 0; + + while (i < len) + { + if (stringPointer[i] == '\\') + { + if (stringPointer[i + 1] == 'n') + { + stringPointer[j] = '\n'; + i += 2; + j ++; + } + else if (stringPointer[i + 1] == 't') + { + stringPointer[j] = '\t'; + i += 2; + j ++; + } + else + { + stringPointer[j] = '\\'; + j++; + i++; + } + } + else if ((stringPointer[i] == '&') && (stringPointer[i + 1] == 'l') && (stringPointer[i + 2] == 't') && (stringPointer[i + 3] == ';')) + { + stringPointer[j] = '<'; + i += 4; + j++; + } + else if ((stringPointer[i] == '&') && (stringPointer[i + 1] == 'g') && (stringPointer[i + 2] == 't') && (stringPointer[i + 3] == ';')) + { + stringPointer[j] = '>'; + i += 4; + j++; + } + else if ((stringPointer[i] == '&') && (stringPointer[i + 1] == 'a') && (stringPointer[i + 2] == 'm') && (stringPointer[i + 3] == 'p') && (stringPointer[i + 4] == ';')) + { + stringPointer[j] = '&'; + i += 5; + j++; + } + else if ((stringPointer[i] == '&') && (stringPointer[i + 1] == 'a') && (stringPointer[i + 2] == 'p') && (stringPointer[i + 3] == 'o') && (stringPointer[i + 4] == 's') && + (stringPointer[i + 5] == ';')) + { + stringPointer[j] = 39; // ' + i += 6; + j++; + } + else if ((stringPointer[i] == '&') && (stringPointer[i + 1] == 'q') && (stringPointer[i + 2] == 'u') && (stringPointer[i + 3] == 'o') && (stringPointer[i + 4] == 't') && + (stringPointer[i + 5] == ';')) + { + stringPointer[j] = 34; // " + i += 6; + j++; + } + else + { + stringPointer[j] = stringPointer[i]; + i++; + j++; + } + } + + stringPointer[j] = '\0'; + string.SetLength(j); + +} + +} } // Tizen::Ui diff --git a/src/ui/FUi_UiBuilderControlElement.cpp b/src/ui/FUi_UiBuilderControlElement.cpp new file mode 100644 index 0000000..f8fa230 --- /dev/null +++ b/src/ui/FUi_UiBuilderControlElement.cpp @@ -0,0 +1,66 @@ +// +// 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_UiBuilderControlElement.cpp +* @brief This is the implementation file for Control class. +*/ + +#include +#include +#include "FUi_UiBuilder.h" +#include "FUi_UiBuilderControlElement.h" + +using namespace Tizen::Ui; +using namespace Tizen::Base; +namespace Tizen { namespace Ui +{ +_UiBuilderControlElement::_UiBuilderControlElement(void) + : __elementName(L"") + , __elementValue(L"") + +{ +} + +_UiBuilderControlElement::~_UiBuilderControlElement(void) +{ +} + +void +_UiBuilderControlElement::SetName(const Tizen::Base::String& name) +{ + __elementName= name; +} + +void +_UiBuilderControlElement::SetValue(const Tizen::Base::String& value) +{ + __elementValue = value; +} + +String +_UiBuilderControlElement::GetName(void) const +{ + return __elementName; +} +String +_UiBuilderControlElement::GetValue(void) const +{ + return __elementValue; +} + +} } // Tizen::Ui diff --git a/src/ui/FUi_UiBuilderControlItem.cpp b/src/ui/FUi_UiBuilderControlItem.cpp new file mode 100644 index 0000000..3972a74 --- /dev/null +++ b/src/ui/FUi_UiBuilderControlItem.cpp @@ -0,0 +1,95 @@ +// +// 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_UiBuilderControlItem.cpp +* @brief This is the implementation file for _UiBuilderControlItem class. +*/ + +// includes +#include +#include +#include "FUi_UiBuilder.h" +#include "FUi_UiBuilderControlItem.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Ui; + +namespace Tizen { namespace Ui +{ +_UiBuilderControlItem::_UiBuilderControlItem(void) + : _itemName(L"") + ,__pUiBuilderControlElementList(null) +{ + if (__pUiBuilderControlElementList == null) + { + __pUiBuilderControlElementList = new (std::nothrow) ArrayListT<_UiBuilderControlElement*>; + } +} + +_UiBuilderControlItem::~_UiBuilderControlItem(void) +{ + if (__pUiBuilderControlElementList) + { + _UiBuilderControlElement* pUiBuilderControlElement = null; + int controlCount = __pUiBuilderControlElementList->GetCount(); + for (int i = 0; i < controlCount; i++) + { + __pUiBuilderControlElementList->GetAt(i, pUiBuilderControlElement); + delete pUiBuilderControlElement; + } + __pUiBuilderControlElementList->RemoveAll(); + delete __pUiBuilderControlElementList; + __pUiBuilderControlElementList = null; + } +} + +void +_UiBuilderControlItem::SetItemName(const Tizen::Base::String& name) +{ + _itemName = name; +} + +String +_UiBuilderControlItem::GetItemName(void) const +{ + return _itemName; +} + +void +_UiBuilderControlItem::SetItemElement(int index, const Tizen::Base::String& name, const Tizen::Base::String& value) +{ + _UiBuilderControlElement* pUiBuilderControlElement = null; + pUiBuilderControlElement = new (std::nothrow) _UiBuilderControlElement; + if (pUiBuilderControlElement != null) + { + pUiBuilderControlElement->SetName(name); + pUiBuilderControlElement->SetValue(value); + __pUiBuilderControlElementList->Add(pUiBuilderControlElement); + } + + +} +ArrayListT<_UiBuilderControlElement*>* +_UiBuilderControlItem::GetItemProperty(void) +{ + return __pUiBuilderControlElementList; +} + + +} } // Tizen::Ui diff --git a/src/ui/FUi_UiBuilderControlLayout.cpp b/src/ui/FUi_UiBuilderControlLayout.cpp new file mode 100644 index 0000000..78657ae --- /dev/null +++ b/src/ui/FUi_UiBuilderControlLayout.cpp @@ -0,0 +1,145 @@ +// +// 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_UiBuilderControlLayout.cpp +* @brief This is the implementation file for _UiBuilderControlLayout class. +*/ + +#include +#include +#include "FUi_UiBuilder.h" +#include "FUi_UiBuilderControlLayout.h" +#include "FUi_CoordinateSystemUtils.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; + +namespace Tizen { namespace Ui +{ +_UiBuilderControlLayout::_UiBuilderControlLayout(void) + : __styleInformation(L"") +{ +} + +_UiBuilderControlLayout::~_UiBuilderControlLayout(void) +{ +} + +void +_UiBuilderControlLayout::SetStyle(const Tizen::Base::String& style) +{ + __styleInformation = style; +} + +void +_UiBuilderControlLayout::SetRect(const Tizen::Base::String& x, const Tizen::Base::String& y, Tizen::Base::String& width, Tizen::Base::String& height) +{ + float floatX = 0.0f, floatY = 0.0f, floatWidth = 0.0f, floatHeight = 0.0f; + + if (x.IsEmpty() == false) + { + floatX = _CoordinateSystemUtils::ConvertToFloat(x); + } + if (y.IsEmpty() == false) + { + floatY = _CoordinateSystemUtils::ConvertToFloat(y); + } + if (width.IsEmpty() == false) + { + floatWidth = _CoordinateSystemUtils::ConvertToFloat(width); + } + if (height.IsEmpty() == false) + { + floatHeight = _CoordinateSystemUtils::ConvertToFloat(height); + } + + __floatRect.x = floatX; + __floatRect.y = floatY; + __floatRect.width = floatWidth; + __floatRect.height = floatHeight; +} + +void +_UiBuilderControlLayout::SetRect(const float x, const float y, const float width, const float height) +{ + __floatRect.x = x; + __floatRect.y = y; + __floatRect.width = width; + __floatRect.height = height; +} + +String +_UiBuilderControlLayout::GetStyle(void) const +{ + return __styleInformation; +} + +Rectangle +_UiBuilderControlLayout::GetRect(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(__floatRect); +} + +FloatRectangle +_UiBuilderControlLayout::GetRectF(void) const +{ + return __floatRect; +} + + +void +_UiBuilderControlLayout::SetLayoutElement(int index, const Tizen::Base::String& name, const Tizen::Base::String& value) +{ + if (index >= UIBUILDER_CONTROL_ELEMENT_NUMBER) + { + return; + } + + __layoutElement[index].SetName(name); + __layoutElement[index].SetValue(value); + +} + +bool +_UiBuilderControlLayout::GetLayoutElement(const Tizen::Base::String& layoutElementName, Tizen::Base::String& outValue) const +{ + int index = 0; + while (layoutElementName.IsEmpty() == false && index < UIBUILDER_CONTROL_ELEMENT_NUMBER) + { + if (layoutElementName.Equals(__layoutElement[index].GetName(), false)) + { + if (__layoutElement[index].GetValue().IsEmpty() == false) + { + outValue = __layoutElement[index].GetValue(); + return true; + } + else + { + return false; + } + } + else + { + index++; + } + } + + return false; +} + +} } // Tizen::Ui diff --git a/src/ui/FUi_UiBuilderControlMaker.cpp b/src/ui/FUi_UiBuilderControlMaker.cpp new file mode 100644 index 0000000..1e3f645 --- /dev/null +++ b/src/ui/FUi_UiBuilderControlMaker.cpp @@ -0,0 +1,427 @@ +// +// 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_UiBuilderControlMaker.cpp +* @brief This is the implementation file for _UiBuilderControlMaker class. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#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; +using namespace Tizen::Ui::Controls; +using namespace Tizen::App; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui +{ +_UiBuilderControlMaker::_UiBuilderControlMaker(_UiBuilder* pUibuilder) + : __pLayoutMaker(new(std::nothrow)_LayoutMaker(pUibuilder)) + , __pUiBuilder(pUibuilder) +{ + SysTryReturnVoidResult(NID_UI, __pLayoutMaker != null, E_OUT_OF_MEMORY, "Memory allocation failed."); +} +_UiBuilderControlMaker::_UiBuilderControlMaker(void) + : __pUiBuilder(null) +{ +} +_UiBuilderControlMaker::~_UiBuilderControlMaker(void) +{ +} + +result +_UiBuilderControlMaker::MakeControl(_UiBuilderControl* pUiBuilderControl) +{ + Tizen::Ui::Control* pControl = null; + + if (pUiBuilderControl != null) + { + pControl = Make(pUiBuilderControl); + if ((pUiBuilderControl->GetType()).Equals(L"Header", false) || (pUiBuilderControl->GetType()).Equals(L"Footer", false)) + { + return E_SUCCESS; + } + if (pControl != null) + { + pControl->SetName(pUiBuilderControl->GetId()); + SetLayoutOrientation(pUiBuilderControl, pControl); + if (!(pUiBuilderControl->GetType().Equals(L"Form", false) || pUiBuilderControl->GetType().Equals(L"Popup", false))) + { + if (pUiBuilderControl->GetType().Equals(L"Panel", false) || pUiBuilderControl->GetType().Equals(L"ScrollPanel", false)) + { + if (pUiBuilderControl->GetParentWin().IsEmpty()) + { + return E_SUCCESS; + } + + } + AddControl(pUiBuilderControl, pControl); + result r = __pLayoutMaker->SetLayoutProperty(pUiBuilderControl, pControl); + if (r != E_SUCCESS) + { + return E_OPERATION_FAILED; + } + } + return E_SUCCESS; + } + } + + return E_OPERATION_FAILED; +} + +void +_UiBuilderControlMaker::ConvertStringToColor(const Tizen::Base::String& colorString, Color& color) +{ + int index = 0; + int len = 0; + int gap = 0; + const wchar_t* colorStringPointer = colorString.GetPointer(); + char ch; + unsigned long temp = 0; + + len = colorString.GetLength(); + + if (len < 1) + { + return; + } + color = 0; + + for (index = 0; index < len + 1; index++) + { + ch = colorStringPointer[index]; + if ((ch >= '0') && (ch <= '9')) + { + temp = temp << 4; + gap = ch - '0'; + temp |= gap; + + } + else if ((ch >= 'A') && (ch <= 'F')) + { + temp = temp << 4; + gap = ch - 'A' + 10; + temp |= gap; + + } + else if ((ch >= 'a') && (ch <= 'f')) + { + temp = temp << 4; + gap = ch - 'a' + 10; + temp |= gap; + } + } + color.SetRGB32(temp, false); +} + +void +_UiBuilderControlMaker::ConvertStringToColor32(const Tizen::Base::String& colorString, int opacity, Color& color) +{ + int index = 0; + int len = 0; + int gap = 0; + int alpha = 0; + const wchar_t* colorStringPointer = colorString.GetPointer(); + char ch; + unsigned long temp = 0; + + len = colorString.GetLength(); + + if (len < 1) + { + SysLog(NID_UI, "String is empty"); + return; + } + + color = 0; + + for (index = 0; index < len + 1; index++) + { + ch = colorStringPointer[index]; + if ((ch >= '0') && (ch <= '9')) + { + temp = temp << 4; + gap = ch - '0'; + temp |= gap; + + } + else if ((ch >= 'A') && (ch <= 'F')) + { + temp = temp << 4; + gap = ch - 'A' + 10; + temp |= gap; + + } + else if ((ch >= 'a') && (ch <= 'f')) + { + temp = temp << 4; + gap = ch - 'a' + 10; + temp |= gap; + } + } + + color.SetRGB32(temp, true); + alpha = ConvertOpacity100to255(opacity); + color.SetAlpha(alpha); +} + +int +_UiBuilderControlMaker::ConvertOpacity100to255(int opacity) +{ + return 255 * opacity / 100; +} + +bool +_UiBuilderControlMaker::ConvertHAlignToHorizontalAlignment(const Tizen::Base::String& align, HorizontalAlignment& alignment) +{ + if (align.Equals(L"ALIGN_LEFT", false)) + { + alignment = ALIGNMENT_LEFT; + } + else if (align.Equals(L"ALIGN_CENTER", false)) + { + alignment = ALIGNMENT_CENTER; + } + else if (align.Equals(L"ALIGN_RIGHT", false)) + { + alignment = ALIGNMENT_RIGHT; + } + else + { + return false; + } + + return true; +} + +bool +_UiBuilderControlMaker::ConvertVAlignToVerticalAlignment(const Tizen::Base::String& align, VerticalAlignment& alignment) +{ + if (align.Equals(L"ALIGN_TOP", false)) + { + alignment = ALIGNMENT_TOP; + } + else if (align.Equals(L"ALIGN_MIDDLE", false)) + { + alignment = ALIGNMENT_MIDDLE; + } + else if (align.Equals(L"ALIGN_BOTTOM", false)) + { + alignment = ALIGNMENT_BOTTOM; + } + else + { + return false; + } + + return true; +} + +bool +_UiBuilderControlMaker::ConvertSlideShowAnimation(const Tizen::Base::String& animationType, GalleryAnimation& animation) +{ + if (animationType.Equals(L"GALLERY_ANIMATION_PAGE", false)) + { + animation = GALLERY_ANIMATION_PAGE; + } + else if (animationType.Equals(L"GALLERY_ANIMATION_DISSOLVE", false)) + { + animation = GALLERY_ANIMATION_DISSOLVE; + } + else if (animationType.Equals(L"GALLERY_ANIMATION_ZOOM", false)) + { + animation = GALLERY_ANIMATION_ZOOM; + } + else + { + return false; + } + + return true; +} + +Tizen::Graphics::Bitmap* +_UiBuilderControlMaker::LoadBitmapN(const Tizen::Base::String& imagePath) +{ + AppResource* pAppResource = Tizen::App::App::GetInstance()->GetAppResource(); + if (pAppResource != null) + { + Tizen::Graphics::Bitmap* pBitmap = pAppResource->GetBitmapN(imagePath); + return pBitmap; + } + + return null; +} +void +_UiBuilderControlMaker::GetProperty(_UiBuilderControl* pControl, _UiBuilderControlLayout** pControlProperty) const +{ + // Form's orientation mode is AUTOMATIC + if (__pUiBuilder->GetUiBuilderRotateState() == UIBUIDER_SCREEN_NONE) + { + // Get device orientation + + bool autoRotateLock = false; + int ret = runtime_info_get_value_bool(RUNTIME_INFO_KEY_AUTO_ROTATION_ENABLED, &autoRotateLock); + + if (ret == RUNTIME_INFO_ERROR_NONE) + { + SysLog(NID_UI, "The flag of auto-rotate lock is %d.", autoRotateLock); + } + else + { + autoRotateLock = false; + SysLog(NID_UI, "It's failed to get the flag of auto-rotate."); + } + + 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); + } + else + { + __pUiBuilder->SetUiBuilderRotateState(UIBUIDER_SCREEN_VERTICAL); + } + } + + if (__pUiBuilder->GetUiBuilderRotateState() == UIBUIDER_SCREEN_HORIZONTAL) + { + *pControlProperty = pControl->GetAttribute(UIBUILDER_ATTRIBUTE_LANDSCAPE); + } + else + { + *pControlProperty = pControl->GetAttribute(UIBUILDER_ATTRIBUTE_PORTRAIT); + } + + return; +} + +void +_UiBuilderControlMaker::AddControl(_UiBuilderControl* pUiBuilderControl, Tizen::Ui::Control* pControl) +{ + Tizen::Base::String panePosition; + Tizen::Ui::Container* pContainer = GetContainer(); + Tizen::Ui::Control* pFindControl = null; + + + //Find Container + if (pContainer->GetName().Equals(pUiBuilderControl->GetParentWin())) + { + pFindControl = pContainer; + } + else + { + pFindControl = pContainer->GetControl(Tizen::Base::String(pUiBuilderControl->GetParentWin()), true); + } + + //Add SplitPanel child + if (pUiBuilderControl->GetElement(L"controlPosition", panePosition)) + { + + Tizen::Ui::Controls::SplitPanel *pSplitPanel = dynamic_cast(pFindControl); + if (pSplitPanel) + { + if(panePosition.Equals(L"first", false)) + { + pSplitPanel->SetPane(pControl, SPLIT_PANEL_PANE_ORDER_FIRST); + } + else + { + pSplitPanel->SetPane(pControl, SPLIT_PANEL_PANE_ORDER_SECOND); + } + } + } + + //Add Container chid + Tizen::Ui::Container* pParent = dynamic_cast(pFindControl); + + if (pParent != null) + { + pParent->AddControl(*pControl); + } +} + +Tizen::Ui::Container* +_UiBuilderControlMaker::GetContainer(void) const +{ + return __pUiBuilder->GetContainer(); +} + +void +_UiBuilderControlMaker::SetLayoutOrientation(_UiBuilderControl* pUiBuilderCOntrol, Tizen::Ui::Control* pControl) +{ + __pUiBuilder->SetLayoutOrientation(pUiBuilderCOntrol, pControl); +} + +void +_UiBuilderControlMaker::SetUiBuilderRotateState(_UiBuilderScreenRotate rotate) +{ + return __pUiBuilder->SetUiBuilderRotateState(rotate); +} + +_UiBuilderScreenRotate +_UiBuilderControlMaker::GetUiBuilderRotateState(void) +{ + return __pUiBuilder->GetUiBuilderRotateState(); +} + +Tizen::Graphics::_ICoordinateSystemTransformer* +_UiBuilderControlMaker::GetTransformer(void) const +{ + return __pUiBuilder->GetTransformer(); +} +} } // Tizen::Ui diff --git a/src/ui/FUi_UiBuilderControlTable.cpp b/src/ui/FUi_UiBuilderControlTable.cpp new file mode 100644 index 0000000..59ac301 --- /dev/null +++ b/src/ui/FUi_UiBuilderControlTable.cpp @@ -0,0 +1,201 @@ +// +// 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_UiBuilderControlTable.cpp +* @brief This is the implementation file for _UiBuilderControlTable class. +*/ + +#include +#include +#include +#include +#include +#include "FUi_UiBuilderControlTable.h" +#include "FUi_UiBuilder.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Ui; + +namespace Tizen { namespace Ui +{ +_UiBuilderControlTable::_UiBuilderControlTable(void) + : __pUiBuilderControlTableInFomationList(null) +{ + if (__pUiBuilderControlTableInFomationList == null) + { + __pUiBuilderControlTableInFomationList = new (std::nothrow) ArrayListT<_UiBuilderControlTableInFomation*>; + } +} + +_UiBuilderControlTable::~_UiBuilderControlTable(void) +{ + if (__pUiBuilderControlTableInFomationList) + { + _UiBuilderControlTableInFomation* pUiBuilderControlTableInFomation = null; + int controlCount = __pUiBuilderControlTableInFomationList->GetCount(); + for (int i = 0; i < controlCount; i++) + { + __pUiBuilderControlTableInFomationList->GetAt(i, pUiBuilderControlTableInFomation); + delete pUiBuilderControlTableInFomation; + } + __pUiBuilderControlTableInFomationList->RemoveAll(); + delete __pUiBuilderControlTableInFomationList; + __pUiBuilderControlTableInFomationList = null; + } +} + +_UiBuilderControlTableManager::_UiBuilderControlTableManager(void) +: __pControlTable(null) +{ + +} + +_UiBuilderControlTableManager::~_UiBuilderControlTableManager(void) +{ + +} + +result +_UiBuilderControlTableManager::Construct(void) +{ + if (__pControlTable == null) + { + __pControlTable = new (std::nothrow) _UiBuilderControlTable; + SysTryReturn(NID_UI, __pControlTable != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _UiBuilderControlTable."); + } + + return E_SUCCESS; +} + +_UiBuilderControlTableManager* +_UiBuilderControlTableManager::GetInstance() +{ + result r = E_SUCCESS; + static _UiBuilderControlTableManager* pUiBuilderControlTable = null; + + if (pUiBuilderControlTable == null) + { + pUiBuilderControlTable = new (std::nothrow) _UiBuilderControlTableManager; + SysTryReturn(NID_UI, pUiBuilderControlTable != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _pUiBuilder."); + + r = pUiBuilderControlTable->Construct(); + SysTryReturn(NID_UI, r == E_SUCCESS, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to construct _pUiBuilder."); + } + + return pUiBuilderControlTable; +} +_UiBuilderControlTable* +_UiBuilderControlTableManager::GetControlTable() const +{ + return __pControlTable; +} + +void +_UiBuilderControlTableManager::RegisterControl(const Tizen::Base::String& controlMakerName, _UiBuilderControlMakerFunctionPointer pControlMakerFunctionPointer) +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = GetInstance(); + _UiBuilderControlTable* pUiBuilderControlTable = null; + if(pUiBuilderControlTableManager != null && pControlMakerFunctionPointer != null) + { + pUiBuilderControlTable = pUiBuilderControlTableManager->GetControlTable(); + } + else + { + return; + } + + _UiBuilderControlTableInFomation* pUiBuilderControlTableInFomation = null; + pUiBuilderControlTableInFomation = new (std::nothrow) _UiBuilderControlTableInFomation; + if (pUiBuilderControlTableInFomation != null) + { + pUiBuilderControlTableInFomation->__controlMakerName = controlMakerName; + pUiBuilderControlTableInFomation->__pContolMakerFunctionPointer = pControlMakerFunctionPointer; + pUiBuilderControlTable->__pUiBuilderControlTableInFomationList->Add(pUiBuilderControlTableInFomation); + } + else + { + SysLogException(NID_UI, E_OUT_OF_MEMORY, "[UiBuilder] Failed to CreateControl()"); + } + + SysLog(NID_UI, "[UiBuilder]Register success [%ls]", pUiBuilderControlTableInFomation->__controlMakerName.GetPointer()); +} + +void +_UiBuilderControlTableManager::UnregisterControl(const Tizen::Base::String& controlMakerName) +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = GetInstance(); + _UiBuilderControlTable* pUiBuilderControlTable = null; + if(controlMakerName.IsEmpty() == false) + { + pUiBuilderControlTable = pUiBuilderControlTableManager->GetControlTable(); + } + else + { + return; + } + + IEnumeratorT<_UiBuilderControlTableInFomation*>* pEnum = pUiBuilderControlTable->__pUiBuilderControlTableInFomationList->GetEnumeratorN(); + _UiBuilderControlTableInFomation* pUiBuilderControlTableInFomation = null; + + while (pEnum->MoveNext() == E_SUCCESS) + { + pEnum->GetCurrent(pUiBuilderControlTableInFomation); + if (pUiBuilderControlTableInFomation->__controlMakerName.Equals(controlMakerName, false)) + { + pUiBuilderControlTableInFomation->__pContolMakerFunctionPointer = null; + break; + } + } + delete pEnum; + +} + +String +_UiBuilderControlTableManager::GetName(int index) const +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = GetInstance(); + SysTryReturn(NID_UI, pUiBuilderControlTableManager != null, null, E_SYSTEM, + "[E_SYSTEM] IUnable to get the UiBuilderControlTableManager"); + + _UiBuilderControlTable* pUiBuilderControlTable = pUiBuilderControlTableManager->GetControlTable(); + + _UiBuilderControlTableInFomation* pUiBuilderControlTableInFomation = null; + pUiBuilderControlTable->__pUiBuilderControlTableInFomationList->GetAt(index, pUiBuilderControlTableInFomation); + SysTryReturn(NID_UI, pUiBuilderControlTableInFomation != null, L"", GetLastResult(), "Failed to GetControl()"); + + return (const Tizen::Base::String) pUiBuilderControlTableInFomation->__controlMakerName; +} + +_UiBuilderControlMakerFunctionPointer +_UiBuilderControlTableManager::GetControlMaker(int index) const +{ + + _UiBuilderControlTableManager* pUiBuilderControlTableManager = GetInstance(); + SysTryReturn(NID_UI, pUiBuilderControlTableManager != null, null, E_SYSTEM, + "[E_SYSTEM] IUnable to get the UiBuilderControlTableManager"); + + _UiBuilderControlTable* pUiBuilderControlTable = pUiBuilderControlTableManager->GetControlTable(); + _UiBuilderControlTableInFomation* pUiBuilderControlTableInFomation = null; + pUiBuilderControlTable->__pUiBuilderControlTableInFomationList->GetAt(index, pUiBuilderControlTableInFomation); + SysTryReturn(NID_UI, pUiBuilderControlTableInFomation != null, null, GetLastResult(), "Failed to GetControl()"); + + return pUiBuilderControlTableInFomation->__pContolMakerFunctionPointer; +} + +} } // Tizen::Ui diff --git a/src/ui/FUi_UiBuilderXmlHandler.cpp b/src/ui/FUi_UiBuilderXmlHandler.cpp new file mode 100644 index 0000000..5586959 --- /dev/null +++ b/src/ui/FUi_UiBuilderXmlHandler.cpp @@ -0,0 +1,410 @@ +// +// 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_UiBuilderXmlHandler.cpp +* @brief This is the implementation file for _UiBuilderXmlHandler class. +*/ + +#include +#include +#include +#include "FUi_UiBuilderXmlHandler.h" +#include "FUi_UiBuilderControlElement.h" + +using namespace Tizen::Ui; + +namespace Tizen { namespace Ui +{ +void StartElementSaxFunc(void* pCtx, const xmlChar* pName, const xmlChar** pAttributes); +void ParseCharactersSaxFunc(void *ctx, const xmlChar *ch, int len); +xmlSAXHandler mySaxHandler = { +null, null, null, null, null, null, null, null, null, null, null, null, null, null, +StartElementSaxFunc, +null, null, ParseCharactersSaxFunc, null, null, null, null, null, null, null, null, null, null, null, null, null, null +}; + +_UiBuilderXmlHandler* XMLHandler = null; + +_UiBuilderXmlHandler::_UiBuilderXmlHandler(void) + : __pGenerator(null) + , __pControl(null) + , __formXmlResolutionExists(false) + , __errorLog("") + , __errorResult(E_SUCCESS) + , __layoutMode(UIBUILDER_ATTRIBUTE_PORTRAIT) + , __xPosition(L"") + , __yPosition(L"") + , __width(L"") + , __height(L"") + , __pProperty(null) + +{ +} + +_UiBuilderXmlHandler::~_UiBuilderXmlHandler(void) +{ +} + +bool +_UiBuilderXmlHandler::Construct(_UiBuilder* pGenerator) +{ + if (pGenerator) + { + XMLHandler = this; + __pGenerator = pGenerator; + return true; + } + return false; +} + +result +_UiBuilderXmlHandler::ParseXml(char* pXmlBuffer, int size) +{ + xmlSAXHandlerPtr pMySaxhandler = &mySaxHandler; + xmlSubstituteEntitiesDefault(1); + xmlSAXUserParseMemory(pMySaxhandler, null, pXmlBuffer, size); + xmlCleanupMemory(); + + if (__errorResult != E_SUCCESS) + { + SysLogException(NID_UI, E_INVALID_FORMAT, "[E_INVALID_FORMAT][UiBuilder] %ls", XMLHandler->__errorLog.GetPointer()); + return __errorResult; + } + return E_SUCCESS; + +} + +void +ParseCharactersSaxFunc(void*ctx, const xmlChar*ch, int len) +{ + if (XMLHandler->__formXmlResolutionExists == true) + { + int formXmlResolution = 0; + + if (xmlStrncmp( ch, (xmlChar*)"720", len) == 0) + { + formXmlResolution = 720; + XMLHandler->__errorResult = XMLHandler->__pGenerator->SetFormXmlResolution(formXmlResolution); + } + else + { + formXmlResolution = 480; + XMLHandler->__errorResult = XMLHandler->__pGenerator->SetFormXmlResolution(formXmlResolution); + } + XMLHandler->__formXmlResolutionExists = false; + } +} + +void +StartElementSaxFunc(void* pCtx, const xmlChar* pName, const xmlChar** pAttributes) +{ + if (XMLHandler->__errorResult != E_SUCCESS) + { + xmlStopParser((xmlParserCtxt*)pCtx); + } + + if (xmlStrcasecmp(pName, (xmlChar*) "Layout") == 0) + { + XMLHandler->SetAttribute(pAttributes); + } + else if (xmlStrcasecmp(pName, (xmlChar*) "Property") == 0) + { + XMLHandler->SetProperty(pAttributes); + } + else if (xmlStrcasecmp(pName, (xmlChar*) "Scene") == 0 || xmlStrcasecmp(pName, (xmlChar*) "ScenePanel") == 0 || xmlStrcasecmp(pName, (xmlChar*) "ScenePopup") == 0 || xmlStrcasecmp(pName, (xmlChar*) "SceneQuickPanelFrame") == 0) + { + XMLHandler->SetXmlVersion(pAttributes); + } + else if (xmlStrcasecmp(pName, (xmlChar*) "panelLayout") == 0) + { + // empty statement + } + else if (xmlStrcasecmp(pName, (xmlChar*) "itemSet") == 0) + { + // empty statement + } + else if (xmlStrcasecmp(pName, (xmlChar*) "LogicalCoordinate") == 0 || xmlStrcasecmp(pName, (xmlChar*) "BaseResolution") == 0) + { + XMLHandler->__formXmlResolutionExists = true; + } + else if (xmlStrcasecmp(pName, (xmlChar*) "headerItem") == 0) + { + XMLHandler->SetItem(pName, pAttributes); + + } + else if (xmlStrcasecmp(pName, (xmlChar*) "buttonItem") == 0) + { + XMLHandler->SetItem(pName, pAttributes); + + } + else if (xmlStrcasecmp(pName, (xmlChar*) "footerItem") == 0) + { + XMLHandler->SetItem(pName, pAttributes); + + } + else if (xmlStrcasecmp(pName, (xmlChar*) "backButton") == 0) + { + XMLHandler->SetItem(pName, pAttributes); + + } + else if (xmlStrcasecmp(pName, (xmlChar*) "item") == 0) + { + XMLHandler->SetItem(pName, pAttributes); + + } + else + { + XMLHandler->__pControl = XMLHandler->__pGenerator->CreateControl(); + if (XMLHandler->__pControl == null) + { + XMLHandler->__errorLog = "Failed to create UiBuilderControl"; + XMLHandler->__errorResult = E_INVALID_FORMAT; + } + + XMLHandler->__pControl->Construct((char*) pName); + + if (pAttributes != null) + { + for (int i = 0; (pAttributes[i] != null); i++) + { + if (xmlStrcasecmp(pAttributes[i], (xmlChar*) "id") == 0) + { + if (pAttributes[++i] != null) + { + XMLHandler->__pControl->SetId((char*) pAttributes[i]); + } + } + else if (xmlStrcasecmp(pAttributes[i], (xmlChar*) "parent") == 0) + { + if (pAttributes[++i] != null) + { + XMLHandler->__pControl->SetParentWin((char*) pAttributes[i]); + } + } + } + } + } +} + +void +_UiBuilderXmlHandler::ParseAttribute(const xmlChar** pAttributes, int index, const Tizen::Base::String& name) +{ + bool findAttribute = false; + + if (index == LAYOUT_SETTING) + { + index = 0; + const Tizen::Base::String parentWindow = __pControl->GetParentWin(); + _UiBuilderControl* pParentControl = XMLHandler->__pGenerator->GetControl(parentWindow); + if (parentWindow.GetLength() != 0) + { + Tizen::Base::String layoutType(L""); + _UiBuilderControlLayout* pParentProperty = pParentControl->GetAttribute(__layoutMode); + if (pParentProperty->GetLayoutElement(L"type", layoutType)) + { + __pProperty->SetLayoutElement(index, L"parentType", layoutType); + index++; + } + } + + for (int i = 0; pAttributes[i] != null; i++) + { + if (pAttributes[++i] != null) + { + if (__pProperty != null) + { + __pProperty->SetLayoutElement(index, (char*) pAttributes[i - 1], (char*) pAttributes[i]); + index++; + } + } + } + } + else if (name.Equals(L"mode", false) && pAttributes[index] != null) + { + if (xmlStrcasecmp(pAttributes[index], (xmlChar*) "Portrait") == 0) + { + __pProperty = XMLHandler->__pControl->GetAttribute(UIBUILDER_ATTRIBUTE_PORTRAIT); + __layoutMode = UIBUILDER_ATTRIBUTE_PORTRAIT; + findAttribute = true; + } + else if (xmlStrcasecmp(pAttributes[index], (xmlChar*) "Landscape") == 0) + { + __pProperty = XMLHandler->__pControl->GetAttribute(UIBUILDER_ATTRIBUTE_LANDSCAPE); + __layoutMode = UIBUILDER_ATTRIBUTE_LANDSCAPE; + findAttribute = true; + } + if (findAttribute == false) + { + __pProperty = XMLHandler->__pControl->GetAttribute(UIBUILDER_ATTRIBUTE_PORTRAIT); + } + } + else if (name.Equals(L"style", false) && pAttributes[index] != null) + { + __pProperty->SetStyle((char*) pAttributes[index]); + } + else if (name.Equals(L"x", false) && pAttributes[index] != null) + { + __xPosition = (char*) pAttributes[index]; + } + else if (name.Equals(L"y", false) && pAttributes[index] != null) + { + __yPosition = (char*) pAttributes[index]; + } + else if (name.Equals(L"width", false) && pAttributes[index] != null) + { + __width = (char*) pAttributes[index]; + } + else if (name.Equals(L"height", false) && pAttributes[index] != null) + { + __height = (char*) pAttributes[index]; + } + else + { + __errorLog = L"Failed to ExecAttribute"; + __errorResult = E_INVALID_FORMAT; + + } + +} + +void +_UiBuilderXmlHandler::SetAttribute(const xmlChar** pAttributes) +{ + if (pAttributes != null) + { + for (int i = 0; (pAttributes[i] != null); i++) + { + if (xmlStrcasecmp(pAttributes[i], (xmlChar*) "mode") == 0) + { + ParseAttribute(pAttributes, ++i, L"mode"); + } + else if (xmlStrcasecmp(pAttributes[i], (xmlChar*) "style") == 0) + { + ParseAttribute(pAttributes, ++i, L"style"); + } + else if (xmlStrcasecmp(pAttributes[i], (xmlChar*) "x") == 0) + { + ParseAttribute(pAttributes, ++i, L"x"); + } + else if (xmlStrcasecmp(pAttributes[i], (xmlChar*) "y") == 0) + { + ParseAttribute(pAttributes, ++i, L"y"); + } + else if (xmlStrcasecmp(pAttributes[i], (xmlChar*) "width") == 0) + { + ParseAttribute(pAttributes, ++i, L"width"); + } + else if (xmlStrcasecmp(pAttributes[i], (xmlChar*) "height") == 0) + { + ParseAttribute(pAttributes, ++i, L"height"); + } + } + } + else + { + __errorLog = L"Failed to SetAttribute"; + __errorResult = E_INVALID_FORMAT; + } + + __pProperty = XMLHandler->__pControl->GetAttribute(__layoutMode); + __pProperty->SetRect(__xPosition, __yPosition, __width, __height); + + //layout setting + if (pAttributes != null) + { + ParseAttribute(pAttributes, LAYOUT_SETTING, (char*) "layout"); + } + else + { + __errorLog = L"Failed to layout setting"; + __errorResult = E_INVALID_FORMAT; + } + +} + +void +_UiBuilderXmlHandler::SetProperty(const xmlChar** pAttributes) +{ + int index = 0; + if (pAttributes != null) + { + for (int i = 0; (pAttributes[i] != null); i++) + { + if (pAttributes[++i] != null) + { + XMLHandler->__pControl->SetElement(index, (char*) pAttributes[i - 1], (char*) pAttributes[i]); + } + index++; + } + } + else + { + __errorLog = L"Failed to SetProperty"; + __errorResult = E_INVALID_FORMAT; + + } +} + +void +_UiBuilderXmlHandler::SetItem(const xmlChar* name, const xmlChar** pAttributes) +{ + int index = 0; + int controlIndex = 0; + + while (pAttributes[index] != null) + { + if (pAttributes[++index] != null) + { + XMLHandler->__pControl->SetItemElement(controlIndex, (char*) pAttributes[index - 1], (char*) pAttributes[index]); + index++; + controlIndex++; + } + else + { + __errorLog = L"Failed to SetItem"; + __errorResult = E_INVALID_FORMAT; + + return; + } + } + XMLHandler->__pControl->SetItemName((char*) name); +} + +void +_UiBuilderXmlHandler::SetXmlVersion(const xmlChar** pAttributes) +{ + if (pAttributes != null) + { + for (int i = 0; (pAttributes[i] != null); i++) + { + if (xmlStrcasecmp(pAttributes[i], (xmlChar*) "Dversion") == 0) + { + if (pAttributes[++i] != null) + { + int ver = atoi((char*) pAttributes[i]); + XMLHandler->__pGenerator->SetVersion(ver); + } + } + } + } + else + { + __errorLog = "Failed to SetXmlVersion"; + __errorResult = E_INVALID_FORMAT; + } +} +} } // Tizen::Ui diff --git a/src/ui/FUi_UiEvent.cpp b/src/ui/FUi_UiEvent.cpp new file mode 100644 index 0000000..13143f2 --- /dev/null +++ b/src/ui/FUi_UiEvent.cpp @@ -0,0 +1,192 @@ +// +// 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_UiEvent.cpp + * @brief This is the implementation file for the _UiEvent class. + */ + +#include +#include +#include +#include "FUi_UiEvent.h" +#include "FUi_Control.h" +#include "FUi_ControlManager.h" + +using namespace Tizen::Base; +using namespace Tizen::App; + +namespace Tizen { namespace Ui +{ +_UiEvent::_UiEvent(const _UiObjectHandle& destination, const _UiObjectHandle& source, _UiEventRouteType routeType) + : __destination(destination) + , __source(source) + , __originalDestination(destination) + , __routeType(routeType) + , __accessibilityEvent(false) +{ +} + +_UiEvent::~_UiEvent(void) +{ +} + +_UiEvent::_UiEvent(const _UiEvent& rhs) + : __destination(rhs.__destination) + , __source(rhs.__source) + , __originalDestination(rhs.__originalDestination) + , __routeType(rhs.__routeType) + , __accessibilityEvent(rhs.__accessibilityEvent) +{ +} + +_UiEvent& +_UiEvent::operator =(const _UiEvent& rhs) +{ + if (this != &rhs) + { + __destination = rhs.__destination; + __source = rhs.__source; + __originalDestination = rhs.__originalDestination; + __routeType = rhs.__routeType; + } + + return *this; +} + +_UiObjectHandle +_UiEvent::GetDestination(void) const +{ + return __destination; +} + +_UiObjectHandle +_UiEvent::GetSource(void) const +{ + return __source; +} + +void +_UiEvent::SetOriginalDestination(const _Control& control) +{ + __originalDestination = control.GetHandle(); +} + +_UiObjectHandle +_UiEvent::GetOriginalDestination(void) const +{ + return __originalDestination; +} + +void +_UiEvent::SetRouteType(_UiEventRouteType routeType) +{ + __routeType = routeType; +} + +_UiEventRouteType +_UiEvent::GetRouteType(void) const +{ + return __routeType; +} + +result +_UiEvent::ProcessPreviewEvent(const _Control& control, bool& isFiltered) +{ + if (!IsEventEnabled(control)) + { + return E_SUCCESS; + } + + return OnPreviewEventProcessing(control, isFiltered); +} + +result +_UiEvent::ProcessEvent(const _Control& control, bool& isFiltered) +{ + if (!IsEventEnabled(control)) + { + return E_SUCCESS; + } + + bool isInputFiltered = isFiltered; + result r = OnEventProcessing(control, isFiltered); + SysTryReturn(NID_UI, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + if (!isInputFiltered && isFiltered) + { + const _Control* pTarget = GetControl(GetDestination()); + SysTryReturn(NID_UI, pTarget, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + if (IsEventEnabled(*pTarget) && (pTarget != &control)) + { + r = OnEventHandled(control); + } + } + + return r; +} + +result +_UiEvent::ProcessListener(const _IUiEventListener& listener, bool& isFiltered) +{ + return OnListenerProcessing(listener, isFiltered); +} + +const _Control* +_UiEvent::GetControl(const _UiObjectHandle& handle) const +{ + _ControlManager* pControlManager = _ControlManager::GetInstance(); + SysTryReturn(NID_UI, pControlManager, null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + return pControlManager->GetObject(handle); +} + +bool +_UiEvent::IsEventEnabled(const _Control& control) const +{ + if (_AppInfo::GetApiVersion() == _API_VERSION_2_0 && _AppInfo::IsOspCompat()) + { + return true; + } + + if (!control.IsEnabled()) + { + return false; + } + + return true; +} + +result +_UiEvent::OnEventHandled(const _Control& control) +{ + return E_SUCCESS; +} + +void +_UiEvent::SetAccessibilityEvent(bool set) +{ + __accessibilityEvent = set; +} + +bool +_UiEvent::GetAccessibilityEvent(void) const +{ + return __accessibilityEvent; +} + +}} // Tizen::Ui diff --git a/src/ui/FUi_UiEventManager.cpp b/src/ui/FUi_UiEventManager.cpp new file mode 100644 index 0000000..b4973bf --- /dev/null +++ b/src/ui/FUi_UiEventManager.cpp @@ -0,0 +1,827 @@ +// +// 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_UiEventManager.cpp + * @brief This is the implementation file for the _UiEventManager class. + */ + +#include +#include +#include +#include +#include +#include "FUi_UiEventManager.h" +#include "FUi_UiEvent.h" +#include "FUi_INotificationEventListener.h" +#include "FUi_IKeyEventListener.h" +#include "FUi_ITouchEventListener.h" +#include "FUi_IFocusEventListener.h" +#include "FUi_EflUiEventManager.h" +#include "FUi_Control.h" +#include "FUi_ControlManager.h" +#include "FUi_TouchManager.h" +#include "FUi_TouchGestureDetector.h" +#include "FUiAnim_ControlVisualElement.h" +#include "FUi_UiKeyEvent.h" +#include "FUi_KeyEventManager.h" +#include "FUi_ResourceManager.h" +#include "FUi_Window.h" + +using namespace std; +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; +using namespace Tizen::Ui::Animations; + +namespace Tizen { namespace Ui +{ + +_UiEventManager* _UiEventManager::__pInstance = null; + +void +_UiEventManager::Initialize(void) +{ + static pthread_once_t once_block = PTHREAD_ONCE_INIT; + + if (!__pInstance) + { + pthread_once(&once_block, InitInstance); + } +} + +void +_UiEventManager::Release(void) +{ + delete __pInstance; + __pInstance = null; +} + +_UiEventManager* +_UiEventManager::GetInstance(void) +{ + return __pInstance; +} + +void +_UiEventManager::InitInstance(void) +{ + if (!__pInstance) + { + __pInstance = new (std::nothrow) _UiEventManager; + SysAssert(__pInstance); + } +} + +result +_UiEventManager::AddTouchEventListener(const _ITouchEventListener& listener) +{ + return AddEventListener(_UI_EVENT_TOUCH, _UI_LISTENER_NONE, listener); +} + +result +_UiEventManager::AddKeyEventListener(const _IKeyEventListener& listener) +{ + return AddEventListener(_UI_EVENT_KEY, _UI_LISTENER_NONE, listener); +} + +result +_UiEventManager::AddFocusEventListener(const _IFocusEventListener& listener) +{ + return AddEventListener(_UI_EVENT_FOCUS, _UI_LISTENER_NONE, listener); +} + +result +_UiEventManager::AddNotificationEventListener(const _INotificationEventListener& listener) +{ + return AddEventListener(_UI_EVENT_NOTIFICAITON, _UI_LISTENER_NONE, listener); +} + +result +_UiEventManager::RemoveTouchEventListener(const _ITouchEventListener& listener) +{ + return RemoveEventListener(_UI_EVENT_TOUCH, _UI_LISTENER_NONE, listener); +} + +result +_UiEventManager::RemoveKeyEventListener(const _IKeyEventListener& listener) +{ + return RemoveEventListener(_UI_EVENT_KEY, _UI_LISTENER_NONE, listener); +} + +result +_UiEventManager::RemoveFocusEventListener(const _IFocusEventListener& listener) +{ + return RemoveEventListener(_UI_EVENT_FOCUS, _UI_LISTENER_NONE, listener); +} + +result +_UiEventManager::RemoveNotificationEventListener(const _INotificationEventListener& listener) +{ + return RemoveEventListener(_UI_EVENT_NOTIFICAITON, _UI_LISTENER_NONE, listener); +} + +result +_UiEventManager::AddPostKeyEventListener(const _IKeyEventListener& listener) +{ + return AddEventListener(_UI_EVENT_KEY, _UI_LISTENER_POST, listener); +} + +result +_UiEventManager::RemovePostKeyEventListener(const _IKeyEventListener& listener) +{ + return RemoveEventListener(_UI_EVENT_KEY, _UI_LISTENER_POST, listener); +} + +result +_UiEventManager::AddTargetPostKeyEventListener(const _IKeyEventListener& listener) +{ + return AddEventListener(_UI_EVENT_KEY, _UI_LISTENER_TARGET_POST, listener); +} + +result +_UiEventManager::RemoveTargetPostKeyEventListener(const _IKeyEventListener& listener) +{ + return RemoveEventListener(_UI_EVENT_KEY, _UI_LISTENER_TARGET_POST, listener); +} + +result +_UiEventManager::SendEvent(const _UiEvent& event) +{ + result r = E_SUCCESS; + + r = Fire(event); + + return r; +} + +result +_UiEventManager::PostEvent(const _UiEvent& event) +{ + return __pEventManager->PostEvent(event); +} + +result +_UiEventManager::GenerateKeyEvent(KeyState keyState, _KeyCode keyCode, _KeyModifier keyModifier, bool async) +{ + result r = E_SUCCESS; + + _UiObjectHandle uiObjectHandle = GetTarget(); + if (uiObjectHandle.IsNull()) + { + return r; + } + + _UiEventRouteType routeType = (keyState == KEY_LONGPRESSED) ? _UI_EVENT_ROUTE_DIRECT : _UI_EVENT_ROUTE_TUNNEL_BUBBLE; + + _KeyInfo keyInfo(keyState, keyCode, keyModifier, null); + + _UiKeyEvent event(uiObjectHandle, keyInfo, routeType); + + if (async) + { + r = PostEvent(event); + } + else + { + r = SendEvent(event); + } + + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +_UiEventManager::GenerateTouchEvent(_TouchStatus touchStatus, int x, int y, bool async) +{ + result r = E_SUCCESS; + + _UiObjectHandle uiObjectHandle = GetTarget(x, y); + if (uiObjectHandle.IsNull()) + { + return r; + } + + const unsigned long DEVICE_ID = 0; + + Point current(x, y); + unsigned int pointId = 0; + _UiEventRouteType routeType = _UI_EVENT_ROUTE_TUNNEL_BUBBLE; + + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + SysTryReturn(NID_UI, pTouchManager, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + switch (touchStatus) + { + case _TOUCH_PRESSED: + pointId = pTouchManager->GeneratePointId(DEVICE_ID); + break; + + case _TOUCH_LONG_PRESSED: + // fall through + case _TOUCH_DOUBLE_PRESSED: + routeType = _UI_EVENT_ROUTE_DIRECT; + pointId = pTouchManager->GetPointId(DEVICE_ID); + break; + + default: + pointId = pTouchManager->GetPointId(DEVICE_ID); + break; + } + + _TouchInfo touchInfo(pointId, touchStatus, current, false, 0); + _UiTouchEvent event(uiObjectHandle, touchInfo, routeType); + + if (async) + { + r = PostEvent(event); + } + else + { + r = SendEvent(event); + } + + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +_IUiEventManager* +_UiEventManager::GetEventManager(void) const +{ + return __pEventManager.get(); +} + +result +_UiEventManager::AddEventListener(_UiEventType eventType, _UiListenerType listenerType, const _IUiEventListener& listener) +{ + result r = E_SUCCESS; + + 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) + { + pEventListeners->Add(const_cast <_IUiEventListener*>(&listener)); + } + + return r; +} + +result +_UiEventManager::RemoveEventListener(_UiEventType eventType, _UiListenerType listenerType, const _IUiEventListener& listener) +{ + result r = E_SUCCESS; + + LinkedListT <_IUiEventListener*>* pEventListeners = GetEventListeners(eventType, listenerType); + if (pEventListeners) + { + pEventListeners->Remove(const_cast <_IUiEventListener*>(&listener)); + } + + return r; +} + +bool +_UiEventManager::IsListenerRegistered(_UiEventType eventType, _UiListenerType listenerType, const _IUiEventListener& listener) +{ + bool isRegistered = false; + + LinkedListT <_IUiEventListener*>* pEventListeners = GetEventListeners(eventType, listenerType); + if (pEventListeners) + { + Tizen::Base::Collection::IEnumeratorT <_IUiEventListener*>* pEnumerator = pEventListeners->GetEnumeratorN(); + SysTryReturn(NID_UI, pEnumerator, false, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + while (pEnumerator->MoveNext() == E_SUCCESS) + { + _IUiEventListener* pEventListener = null; + pEnumerator->GetCurrent(pEventListener); + if (!pEventListener) + { + continue; + } + + if (pEventListener == &listener) + { + isRegistered = true; + break; + } + } + + delete pEnumerator; + } + + return isRegistered; +} + +result +_UiEventManager::Fire(const _UiEvent& event) +{ + result r = E_SUCCESS; + + bool isFiltered = false; + + r = ProcessListener(event, isFiltered); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (!isFiltered) + { + r = ProcessGlobalGesture(event, isFiltered); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + if (event.GetEventType() == _UI_EVENT_TOUCH) + { + r = ProcessEvent(event, isFiltered); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + else if (!isFiltered) + { + r = ProcessEvent(event, isFiltered); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + if (!isFiltered ) + { + ProcessPostListener(event, isFiltered); + } + + return r; +} + +LinkedListT <_IUiEventListener*>* +_UiEventManager::GetEventListeners(_UiEventType eventType, _UiListenerType listenerType) const +{ + LinkedListT <_IUiEventListener*>* pEventListeners = null; + + if (listenerType == _UI_LISTENER_POST) + { + SysTryReturn(NID_UI, __pPostEventListenerMap, null, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] PostEventListenerMap is null."); + __pPostEventListenerMap->GetValue(eventType, pEventListeners); + } + else if (listenerType == _UI_LISTENER_TARGET_POST) + { + SysTryReturn(NID_UI, __pTargetPostEventListenerMap, null, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] TargetPostEventListenerMap is null."); + __pTargetPostEventListenerMap->GetValue(eventType, pEventListeners); + } + else + { + result r = E_SUCCESS; + + SysTryReturn(NID_UI, __pEventListenerMap, null, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] EventListenerMap is null."); + r = __pEventListenerMap->GetValue(eventType, pEventListeners); + SysTryReturn(NID_UI, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + return pEventListeners; +} + +result +_UiEventManager::ProcessListener(const _UiEvent& event, bool& isFiltered) +{ + return ProcessListener(event, _UI_LISTENER_NONE, isFiltered); +} + +result +_UiEventManager::ProcessTargetPostListener(const _UiEvent& event, bool& isFiltered) +{ + return ProcessListener(event, _UI_LISTENER_TARGET_POST, isFiltered); +} + +result +_UiEventManager::ProcessPostListener(const _UiEvent& event, bool& isFiltered) +{ + return ProcessListener(event, _UI_LISTENER_POST, isFiltered); +} + +result +_UiEventManager::ProcessListener(const _UiEvent& event, _UiListenerType listenerType, bool& isFiltered) +{ + result r = E_SUCCESS; + + LinkedListT <_IUiEventListener*>* pEventListeners = GetEventListeners(event.GetEventType(), listenerType); + if (pEventListeners) + { + Tizen::Base::Collection::IEnumeratorT <_IUiEventListener*>* pEnumerator = pEventListeners->GetEnumeratorN(); + SysTryReturn(NID_UI, pEnumerator, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + while (pEnumerator->MoveNext() == E_SUCCESS) + { + _IUiEventListener* pEventListener = null; + + pEnumerator->GetCurrent(pEventListener); + if (!pEventListener) + { + continue; + } + + r = const_cast<_UiEvent&>(event).ProcessListener(*pEventListener, isFiltered); + if (isFiltered) + { + break; + } + } + + delete pEnumerator; + } + + return r; +} + +result +_UiEventManager::ProcessEvent(const _UiEvent& event, bool& isFiltered) +{ + result r = E_SUCCESS; + if (event.GetEventType() == _UI_EVENT_TOUCH || event.GetEventType() == _UI_EVENT_KEY) + { + _ResourceManager::GetInstance()->AcquireFeedback(); + } + switch (event.GetRouteType()) + { + case _UI_EVENT_ROUTE_TUNNEL_BUBBLE: + { + LinkedListT <_UiObjectHandle> tunnelingPath; + LinkedListT <_UiObjectHandle> bubblingPath; + + r = MakeRoutingPath(tunnelingPath, bubblingPath, event); + + if (r == E_SUCCESS) + { + if (event.GetEventType() == _UI_EVENT_KEY) + { + CallTranslateKeyEventInfo(event,isFiltered); + } + + ProcessTunnelingEvent(tunnelingPath, event, isFiltered); + + if (event.GetEventType() == _UI_EVENT_TOUCH) + { + ProcessBubblingEvent(bubblingPath, event, isFiltered); + } + else if (!isFiltered) + { + ProcessBubblingEvent(bubblingPath, event, isFiltered); + } + } + } + break; + + case _UI_EVENT_ROUTE_DIRECT: + { + _ControlManager* pControlManager = _ControlManager::GetInstance(); + SysTryReturn(NID_UI, pControlManager, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + const _Control* pTarget = pControlManager->GetObject(event.GetDestination()); + if (pTarget) + { + r = const_cast<_UiEvent&>(event).ProcessEvent(*pTarget, isFiltered); + } + } + break; + + default: + break; + } + if (event.GetEventType() == _UI_EVENT_TOUCH || event.GetEventType() == _UI_EVENT_KEY) + { + _ResourceManager::GetInstance()->ReleaseFeedback(); + } + return r; +} + +result +_UiEventManager::CallTranslateKeyEventInfo(const _UiEvent& event, bool& isFiltered) +{ + _ControlManager* pControlManager = _ControlManager::GetInstance(); + SysTryReturn(NID_UI, pControlManager, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + _Control* pTarget = pControlManager->GetObject(event.GetDestination()); + SysTryReturn(NID_UI, pTarget, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] pTarget is null."); + + _UiKeyEvent& keyEvent = static_cast<_UiKeyEvent&>(const_cast<_UiEvent&>(event)); + + _KeyInfo* pKeyInfo = keyEvent.GetKeyInfo(); + SysTryReturn(NID_UI, pKeyInfo, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] pTarget is null."); + + _IPropagatedKeyEventListener* pKeyEventListener = pTarget->GetPropagatedKeyEventListener(); + SysTryReturn(NID_UI, pKeyEventListener, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + pKeyEventListener->TranslateKeyEventInfo(*pTarget, *pKeyInfo); + + return E_SUCCESS; +} + +result +_UiEventManager::ProcessGlobalGesture(const _UiEvent& event, bool& isFiltered) +{ + if (event.GetEventType() != _UI_EVENT_TOUCH) + { + return E_SUCCESS; + } + + if (event.GetAccessibilityEvent()) + { + return E_SUCCESS; + } + + _ControlManager* pControlManager = _ControlManager::GetInstance(); + SysTryReturn(NID_UI, pControlManager, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + SysTryReturn(NID_UI, pTouchManager, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + Tizen::Base::Collection::IListT<_TouchGestureDetector*>* pGestureList = pControlManager->GetGestureDetectorList(); + if (!pGestureList || (pGestureList && (pGestureList->GetCount() <= 0))) + { + return E_SUCCESS; + } + + result r = E_SUCCESS; + + Tizen::Base::Collection::IEnumeratorT <_TouchGestureDetector*>* pEnumerator = pGestureList->GetEnumeratorN(); + SysTryReturn(NID_UI, pEnumerator, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + _TouchGestureDetector* pGestureDetector = null; + while (pEnumerator->MoveNext() == E_SUCCESS) + { + pEnumerator->GetCurrent(pGestureDetector); + + if (!pGestureDetector) + { + continue; + } + + r = const_cast<_UiEvent&>(event).ProcessListener(*pGestureDetector, isFiltered); + if (isFiltered) + { + break; + } + } + + delete pEnumerator; + + return r; +} + +result +_UiEventManager::MakeRoutingPath(Tizen::Base::Collection::LinkedListT <_UiObjectHandle>& tunnelingPath, Tizen::Base::Collection::LinkedListT <_UiObjectHandle>& bubblingPath, const _UiEvent& event) +{ + result r = E_SUCCESS; + + _ControlManager* pControlManager = _ControlManager::GetInstance(); + SysTryReturn(NID_UI, pControlManager, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + _Control* pControl = pControlManager->GetObject(event.GetDestination()); + SysTryReturn(NID_UI, pControl, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + // Bubbling path + _Control* pBubblingTarget = pControl; + while (pBubblingTarget) + { + bubblingPath.Add(pBubblingTarget->GetHandle()); + pBubblingTarget = pBubblingTarget->GetParent(); + } + + // Tunneling path + for (int i = bubblingPath.GetCount() - 1; i > 0; i--) + { + _UiObjectHandle uiObjectHandle; + + r = bubblingPath.GetAt(i, uiObjectHandle); + if (r == E_SUCCESS) + { + tunnelingPath.Add(uiObjectHandle); + } + } + + return r; +} + +result +_UiEventManager::ProcessTunnelingEvent(const Tizen::Base::Collection::LinkedListT <_UiObjectHandle>& routingPath, const _UiEvent& event, bool& isFiltered) +{ + result r = E_SUCCESS; + + Tizen::Base::Collection::IEnumeratorT <_UiObjectHandle>* pEnumerator = routingPath.GetEnumeratorN(); + SysTryReturn(NID_UI, pEnumerator, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + _UiObjectHandle uiObjectHandle; + while (pEnumerator->MoveNext() == E_SUCCESS) + { + pEnumerator->GetCurrent(uiObjectHandle); + if (uiObjectHandle.IsNull()) + { + continue; + } + + const _Control* pControl = event.GetControl(uiObjectHandle); + if (!pControl) + { + continue; + } + + r = const_cast<_UiEvent&>(event).ProcessPreviewEvent(*pControl, isFiltered); + if (isFiltered) + { + r = E_SUCCESS; + break; + } + } + + delete pEnumerator; + + return r; +} + +result +_UiEventManager::ProcessBubblingEvent(const Tizen::Base::Collection::LinkedListT <_UiObjectHandle>& routingPath, const _UiEvent& event, bool& isFiltered) +{ + result r = E_SUCCESS; + + Tizen::Base::Collection::IEnumeratorT <_UiObjectHandle>* pEnumerator = routingPath.GetEnumeratorN(); + SysTryReturn(NID_UI, pEnumerator, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + _UiObjectHandle uiObjectHandle; + while (pEnumerator->MoveNext() == E_SUCCESS) + { + pEnumerator->GetCurrent(uiObjectHandle); + if (uiObjectHandle.IsNull()) + { + continue; + } + + const _Control* pControl = event.GetControl(uiObjectHandle); + if (!pControl) + { + continue; + } + + r = const_cast<_UiEvent&>(event).ProcessEvent(*pControl, isFiltered); + + if (!isFiltered && (event.GetDestination() == uiObjectHandle)) + { + ProcessTargetPostListener(event, isFiltered); + } + } + + delete pEnumerator; + + return r; +} + +_UiObjectHandle +_UiEventManager::GetTarget(void) const +{ + _Control* pControl = _ControlManager::GetInstance()->GetFocusControl(); + SysTryReturn(NID_UI, pControl, _UiObjectHandle(), E_SYSTEM, "[E_SYSTEM] System error occurred."); + + return pControl->GetHandle(); +} + +_UiObjectHandle +_UiEventManager::GetTarget(int x, int y) const +{ + Tizen::Graphics::FloatPoint ptf((float) x, (float) y); + + _ControlVisualElement* pRootControlElement = + dynamic_cast <_ControlVisualElement*>(_ControlManager::GetInstance()->GetTopVisibleWindowAt(Point(x, y))->GetVisualElement()); + SysTryReturn(NID_UI, pRootControlElement, _UiObjectHandle(), E_SYSTEM, "[E_SYSTEM] System error occurred."); + + _ControlVisualElement* pControlVisualElement = pRootControlElement->GetControlChildAtPoint(ptf); + SysTryReturn(NID_UI, pControlVisualElement, _UiObjectHandle(), E_SYSTEM, "[E_SYSTEM] System error occurred."); + + _Control* pControl = static_cast <_Control*>(pControlVisualElement->GetUserData()); + SysTryReturn(NID_UI, pControl, _UiObjectHandle(), E_SYSTEM, "[E_SYSTEM] System error occurred."); + + return pControl->GetHandle(); +} + +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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + while (pMapEnumerator->MoveNext() == E_SUCCESS) + { + Tizen::Base::Collection::LinkedListT<_IUiEventListener*>* pListeners = null; + pMapEnumerator->GetValue(pListeners); + + if (!pListeners) + { + continue; + } + + delete pListeners; + } + + delete pMapEnumerator; +} + +_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, "[%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, "[%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, "[%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, "[%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, "[%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, "[%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, "[%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, "[%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, "[%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)); + + // move pointer + __pEventListenerMap = move(pEventListenerMap); + __pPostEventListenerMap = move(pPostEventListenerMap); + __pTargetPostEventListenerMap = move(pTargetPostEventListenerMap); +} + +_UiEventManager::~_UiEventManager(void) +{ + RemoveAllEventListenerList(__pEventListenerMap.get()); + RemoveAllEventListenerList(__pPostEventListenerMap.get()); + RemoveAllEventListenerList(__pTargetPostEventListenerMap.get()); +} + +}} // Tizen::Ui diff --git a/src/ui/FUi_UiFocusEvent.cpp b/src/ui/FUi_UiFocusEvent.cpp new file mode 100644 index 0000000..1bb799b --- /dev/null +++ b/src/ui/FUi_UiFocusEvent.cpp @@ -0,0 +1,151 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +/** + * @file FUi_UiFocusEvent.cpp + * @brief This is the implementation file for _UiFocusEvent class. + */ + +#include +#include +#include "FUi_UiFocusEvent.h" +#include "FUi_IFocusEventListener.h" +#include "FUi_Control.h" + +namespace Tizen { namespace Ui +{ + +_UiFocusEvent::_UiFocusEvent(const _UiObjectHandle& destination, FocusStatus focusState, _UiEventRouteType routeType, const _UiObjectHandle& source) + : _UiEvent(destination, source, routeType) + , __focusState(focusState) +{ +} + +_UiFocusEvent::~_UiFocusEvent(void) +{ +} + +_UiFocusEvent::_UiFocusEvent(const _UiFocusEvent& rhs) + : _UiEvent(rhs) + , __focusState(rhs.__focusState) +{ +} + +_UiFocusEvent& +_UiFocusEvent::operator =(const _UiFocusEvent& rhs) +{ + _UiEvent::operator =(rhs); + + if (this != &rhs) + { + __focusState = rhs.__focusState; + } + + return *this; +} + +FocusStatus +_UiFocusEvent::GetFocusState(void) const +{ + return __focusState; +} + +_UiFocusEvent* +_UiFocusEvent::CloneN(void) const +{ + return new (std::nothrow) _UiFocusEvent(*this); +} + +_UiEventType +_UiFocusEvent::GetEventType(void) const +{ + return _UI_EVENT_FOCUS; +} + +result +_UiFocusEvent::OnPreviewEventProcessing(const _Control& control, bool& isFiltered) +{ + return E_SUCCESS; +} + +result +_UiFocusEvent::OnEventProcessing(const _Control& control, bool& isFiltered) +{ + _IFocusEventListener* pFocusListener = control.GetEventListener<_UI_EVENT_FOCUS, _IFocusEventListener*>(); + SysTryReturn(NID_UI, pFocusListener, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + return FireListener(pFocusListener, isFiltered); +} + +result +_UiFocusEvent::OnListenerProcessing(const _IUiEventListener& listener, bool& isFiltered) +{ + if (isFiltered) + { + return E_SUCCESS; + } + + _IFocusEventListener* pFocusListener = dynamic_cast <_IFocusEventListener*>(const_cast <_IUiEventListener*>(&listener)); + SysTryReturn(NID_UI, pFocusListener, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + return FireListener(pFocusListener, isFiltered); +} + +bool +_UiFocusEvent::IsEventEnabled(const _Control& control) const +{ + // call a listener method by the key state + if (FOCUS_GAINED == GetFocusState()) + { + return _UiEvent::IsEventEnabled(control); + } + + return true; +} + +result +_UiFocusEvent::FireListener(const _IFocusEventListener* pListener, bool& isFiltered) +{ + SysTryReturn(NID_UI, pListener, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + result r = E_SUCCESS; + + _IFocusEventListener* pFocusListener = const_cast <_IFocusEventListener*>(pListener); + SysTryReturn(NID_UI, pFocusListener, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + const _Control* pTarget = GetControl(GetDestination()); + SysTryReturn(NID_UI, pTarget, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + // call a listener method by the key state + switch (GetFocusState()) + { + case FOCUS_GAINED: + isFiltered = pFocusListener->OnFocusGained(*pTarget); + break; + + case FOCUS_LOST: + isFiltered = pFocusListener->OnFocusLost(*pTarget); + break; + + default: + //SysLogI(NID_UI, "unable to determine the key event type."); + r = E_SYSTEM; + break; + } + + return r; +} +}}//Tizen::Ui diff --git a/src/ui/FUi_UiKeyEvent.cpp b/src/ui/FUi_UiKeyEvent.cpp new file mode 100644 index 0000000..b3d206a --- /dev/null +++ b/src/ui/FUi_UiKeyEvent.cpp @@ -0,0 +1,338 @@ +// +// 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_UiKeyEvent.cpp + * @brief This is the implementation file for the _UiKeyEvent class. + */ + +#include +#include +#include +#include "FUi_UiKeyEvent.h" +#include "FUi_IKeyEventListener.h" +#include "FUi_IKeyEventPreviewer.h" +#include "FUi_Control.h" +#include "FUi_ControlImpl.h" + +namespace Tizen { namespace Ui +{ + +_KeyInfo::_KeyInfo(KeyState keyState, _KeyCode keyCode, int keyModifier, void* pUserData) + : __keyState(keyState) + , __keyCode(keyCode) + , __keyModifier(keyModifier) + , __pUserData(pUserData) +{ +} + +_KeyInfo::_KeyInfo(const _KeyInfo& rhs) + : __keyState(rhs.__keyState) + , __keyCode(rhs.__keyCode) + , __keyModifier(rhs.__keyModifier) + , __pUserData(rhs.__pUserData) +{ +} + +_KeyInfo& +_KeyInfo::operator =(const _KeyInfo& rhs) +{ + if (this != &rhs) + { + __keyState = rhs.__keyState; + __keyCode = rhs.__keyCode; + __keyModifier = rhs.__keyModifier; + __pUserData = rhs.__pUserData; + } + + return *this; +} + +_KeyInfo::~_KeyInfo(void) +{ +} + +void +_KeyInfo::SetKeyState(KeyState keyState) +{ + __keyState = keyState; +} + +KeyState +_KeyInfo::GetKeyState(void) const +{ + return __keyState; +} + +void +_KeyInfo::SetKeyCode(_KeyCode keyCode) +{ + __keyCode = keyCode; +} + +_KeyCode +_KeyInfo::GetKeyCode(void) const +{ + return __keyCode; +} + +void +_KeyInfo::SetKeyModifier(int keyModifier) +{ + __keyModifier = keyModifier; +} + +int +_KeyInfo::GetKeyModifier(void) const +{ + return __keyModifier; +} + +void +_KeyInfo::SetUserData(void* pUserData) +{ + __pUserData = pUserData; +} + +void* +_KeyInfo::GetUserData(void) const +{ + return __pUserData; +} + +_UiKeyEvent::_UiKeyEvent(const _UiObjectHandle& destination, const _KeyInfo& keyInfo, _UiEventRouteType routeType, const _UiObjectHandle& source) + : _UiEvent(destination, source, routeType) + , __keyInfo(keyInfo) +{ +} + +_UiKeyEvent::~_UiKeyEvent(void) +{ +} + +_UiKeyEvent::_UiKeyEvent(const _UiKeyEvent& rhs) + : _UiEvent(rhs) + , __keyInfo(rhs.__keyInfo) +{ +} + +_UiKeyEvent& +_UiKeyEvent::operator =(const _UiKeyEvent& rhs) +{ + _UiEvent::operator =(rhs); + + if (this != &rhs) + { + __keyInfo = rhs.__keyInfo; + } + + return *this; +} + +_KeyInfo* +_UiKeyEvent::GetKeyInfo(void) const +{ + return const_cast<_KeyInfo*>(&__keyInfo); +} + +_UiKeyEvent* +_UiKeyEvent::CloneN(void) const +{ + return new (std::nothrow) _UiKeyEvent(*this); +} + +_UiEventType +_UiKeyEvent::GetEventType(void) const +{ + return _UI_EVENT_KEY; +} + +void +_UiKeyEvent::SetKeyState(const KeyState keyState) +{ + __keyInfo.SetKeyState(keyState); +} + +KeyState +_UiKeyEvent::GetKeyState(void) const +{ + return __keyInfo.GetKeyState(); +} + +void +_UiKeyEvent::SetKeyCode(const _KeyCode keyCode) +{ + __keyInfo.SetKeyCode(keyCode); +} + +_KeyCode +_UiKeyEvent::GetKeyCode(void) const +{ + return __keyInfo.GetKeyCode(); +} + +void +_UiKeyEvent::SetKeyModifier(int keyModifier) +{ + __keyInfo.SetKeyModifier(keyModifier); +} + +int +_UiKeyEvent::GetKeyModifier(void) const +{ + return __keyInfo.GetKeyModifier(); +} + +bool +_UiKeyEvent::IsEventEnabled(const _Control& control) const +{ + if (!_UiEvent::IsEventEnabled(control)) + { + return false; + } + + if (( GetKeyInfo()->GetKeyCode() == _KEY_CONTEXT_MENU ) + || ( GetKeyInfo()->GetKeyCode() == _KEY_BACK )) + { + } + else + { + if (!control.IsInputEventEnabled()) + { + return false; + } + } + + return true; +} + +result +_UiKeyEvent::OnPreviewEventProcessing(const _Control& control, bool& isFiltered) +{ + result r = E_SUCCESS; + + _IKeyEventPreviewer* pKeyEventPreviewer = control.GetPropagatedKeyEventListener(); + SysTryReturn(NID_UI, pKeyEventPreviewer, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + const _Control* pTarget = GetControl(GetDestination()); + SysTryReturn(NID_UI, pTarget, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + // call a listener method by the key state + switch (GetKeyState()) + { + 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; + + default: + //SysLogI(NID_UI, "unable to determine the key event type."); + r = E_SYSTEM; + break; + } + + return r; +} + +result +_UiKeyEvent::OnEventProcessing(const _Control& control, bool& isFiltered) +{ + if (isFiltered) + { + return E_SUCCESS; + } + + _IKeyEventListener* pKeyEventListener = control.GetPropagatedKeyEventListener(); + SysTryReturn(NID_UI, pKeyEventListener, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + return FireListener(pKeyEventListener, isFiltered); +} + +result +_UiKeyEvent::OnListenerProcessing(const _IUiEventListener& listener, bool& isFiltered) +{ + _IKeyEventListener* pKeyEventListener = dynamic_cast <_IKeyEventListener*>(const_cast <_IUiEventListener*>(&listener)); + SysTryReturn(NID_UI, pKeyEventListener, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + return FireListener(pKeyEventListener, isFiltered); +} + +result +_UiKeyEvent::FireListener(const _IKeyEventListener* pListener, bool& isFiltered) +{ + _IKeyEventListener* pKeyEventListener = const_cast <_IKeyEventListener*>(pListener); + SysTryReturn(NID_UI, pKeyEventListener, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + result r = E_SUCCESS; + + const _Control* pTarget = GetControl(GetDestination()); + SysTryReturn(NID_UI, pTarget, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + // call a listener method by the key state + switch (GetKeyState()) + { + 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 + case KEY_LONGPRESSED: + { + _ControlImpl* pTargetImpl = static_cast<_ControlImpl*>(pTarget->GetUserData()); + if (pTargetImpl) + { + pTargetImpl->GenerateKeyEvent(KEY_LONGPRESSED, GetKeyCode()); + } + } + break; + + default: + //SysLogI(NID_UI, "unable to determine the key event type."); + r = E_SYSTEM; + break; + } + + return r; +} + +}} // Tizen::Ui diff --git a/src/ui/FUi_UiManagerIpcMessages.cpp b/src/ui/FUi_UiManagerIpcMessages.cpp new file mode 100644 index 0000000..d67515f --- /dev/null +++ b/src/ui/FUi_UiManagerIpcMessages.cpp @@ -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_UiManagerIpcMessages.cpp + * @brief This file contains IPC message class generated by macros. + */ + +#define IPC_MESSAGE_IMPL +#include "FUi_UiManagerIpcMessages.h" + +// Generate constructors. +#include "ipc/struct_constructor_macros.h" +#include "FUi_UiManagerIpcMessages.h" + +// Generate destructors. +#include "ipc/struct_destructor_macros.h" +#include "FUi_UiManagerIpcMessages.h" + +// Generate param traits write methods. +#include "ipc/param_traits_write_macros.h" +namespace IPC +{ +#include "FUi_UiManagerIpcMessages.h" +} // namespace IPC + +// Generate param traits read methods. +#include "ipc/param_traits_read_macros.h" +namespace IPC +{ +#include "FUi_UiManagerIpcMessages.h" +} // namespace IPC diff --git a/src/ui/FUi_UiManagerProxy.cpp b/src/ui/FUi_UiManagerProxy.cpp new file mode 100644 index 0000000..8e3c477 --- /dev/null +++ b/src/ui/FUi_UiManagerProxy.cpp @@ -0,0 +1,72 @@ +// +// 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_UiManagerProxy.cpp + * @brief This is the implementation for the _UiManagerProxy class. + */ + +#include +#include "FUi_UiManagerIpcMessages.h" +#include "FUi_UiManagerProxy.h" + +using namespace std; +using namespace Tizen::Io; + +namespace Tizen { namespace Ui +{ + +_UiManagerProxy::_UiManagerProxy(void) +{ +} + +_UiManagerProxy::~_UiManagerProxy(void) +{ +} + +result +_UiManagerProxy::Construct(void) +{ + unique_ptr<_IpcClient> pIpcClient(new (std::nothrow) _IpcClient()); + SysTryReturnResult(NID_UI, pIpcClient, E_OUT_OF_MEMORY, "Memory is insufficient."); + + result r = pIpcClient->Construct(L"osp.ui.ipcserver.uimanager"); + SysTryReturnResult(NID_UI, r == E_SUCCESS, r, "Propagating."); + + __pIpcClient = move(pIpcClient); + + return E_SUCCESS; +} + +result +_UiManagerProxy::SetZOrderGroup(unsigned int window, int windowZOrderGroup) +{ + SysTryReturnResult(NID_UI, __pIpcClient, E_INVALID_STATE, "This has not been constructed as yet."); + + result r = E_SUCCESS; + unique_ptr pMsg(new (std::nothrow) UiManager_SetZOrderGroup(window, windowZOrderGroup, &r)); + SysTryReturnResult(NID_UI, pMsg, E_OUT_OF_MEMORY, "Memory is insufficient."); + + SysLog(NID_UI, "IPC message(0x%x, %d) is sent.", window, windowZOrderGroup); + result ret = __pIpcClient->SendRequest(*pMsg.get()); + SysTryReturnResult(NID_UI, ret == E_SUCCESS, ret, "Propagating."); + SysTryReturnResult(NID_UI, r == E_SUCCESS, E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method."); + + return E_SUCCESS; +} + +}} // Tizen::Ui diff --git a/src/ui/FUi_UiManagerProxy.h b/src/ui/FUi_UiManagerProxy.h new file mode 100644 index 0000000..0539d89 --- /dev/null +++ b/src/ui/FUi_UiManagerProxy.h @@ -0,0 +1,62 @@ +// +// 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_UiManagerProxy.h + * @brief This is the header file of the _UiManagerProxy class. + */ + +#ifndef _FUI_INTERNAL_UI_MANAGER_PROXY_H_ +#define _FUI_INTERNAL_UI_MANAGER_PROXY_H_ + +#include + +namespace Tizen { namespace Io +{ +class _IpcClient; +}} // Tizen::Io + +namespace Tizen { namespace Ui +{ + +/** + * @class _UiManagerProxy + * @brief + * @since 2.1 + */ +class _UiManagerProxy + : public Tizen::Base::Object +{ +public: + _UiManagerProxy(void); + virtual ~_UiManagerProxy(void); + + result Construct(void); + + result SetZOrderGroup(unsigned int window, int windowZOrderGroup); + +private: + _UiManagerProxy(const _UiManagerProxy& rhs); + _UiManagerProxy& operator =(const _UiManagerProxy& rhs); + +private: + std::unique_ptr __pIpcClient; +}; // _UiManagerProxy + +}} // Tizen::Ui + +#endif // _FUI_INTERNAL_UI_MANAGER_PROXY_H_ \ No newline at end of file diff --git a/src/ui/FUi_UiNotificationEvent.cpp b/src/ui/FUi_UiNotificationEvent.cpp new file mode 100644 index 0000000..44c2a64 --- /dev/null +++ b/src/ui/FUi_UiNotificationEvent.cpp @@ -0,0 +1,140 @@ +// +// 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_UiNotificationEvent.cpp + * @brief This is the implementation file for the _UiNotificationEvent class. + */ + +#include +#include +#include "FUi_UiNotificationEvent.h" +#include "FUi_INotificationEventListener.h" +#include "FUi_INotificationEventPreviewer.h" +#include "FUi_Control.h" + +namespace Tizen { namespace Ui +{ + +_UiNotificationEvent::_UiNotificationEvent(const _UiObjectHandle& destination, Tizen::Base::Collection::IList* pArgs, _UiEventRouteType routeType, const _UiObjectHandle& source) + : _UiEvent(destination, source, routeType) + , __pArgs(pArgs) +{ +} + +_UiNotificationEvent::~_UiNotificationEvent(void) +{ +} + +_UiNotificationEvent::_UiNotificationEvent(const _UiNotificationEvent& rhs) + : _UiEvent(rhs) + , __pArgs(rhs.__pArgs) +{ +} + +_UiNotificationEvent& +_UiNotificationEvent::operator =(const _UiNotificationEvent& rhs) +{ + _UiEvent::operator =(rhs); + + if (this != &rhs) + { + __pArgs = rhs.__pArgs; + } + + return *this; +} + +Tizen::Base::Collection::IList* +_UiNotificationEvent::GetArgs(void) const +{ + return __pArgs; +} + +_UiNotificationEvent* +_UiNotificationEvent::CloneN(void) const +{ + return new (std::nothrow) _UiNotificationEvent(*this); +} + +_UiEventType +_UiNotificationEvent::GetEventType(void) const +{ + return _UI_EVENT_NOTIFICAITON; +} + +bool +_UiNotificationEvent::IsEventEnabled(const _Control& control) const +{ + return true; +} + +result +_UiNotificationEvent::OnPreviewEventProcessing(const _Control& control, bool& isFiltered) +{ + result r = E_SUCCESS; + + _INotificationEventPreviewer* pNotificationPreviewer = control.GetEventPreviewer<_UI_EVENT_NOTIFICAITON, _INotificationEventPreviewer*>(); + SysTryReturn(NID_UI, pNotificationPreviewer, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + const _Control* pTarget = GetControl(GetDestination()); + SysTryReturn(NID_UI, pTarget, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + isFiltered = pNotificationPreviewer->OnPreviewNotifiedN(*pTarget, GetArgs()); + + return r; +} + +result +_UiNotificationEvent::OnEventProcessing(const _Control& control, bool& isFiltered) +{ + if (isFiltered) + { + return E_SUCCESS; + } + + _INotificationEventListener* pNotificationListener = control.GetEventListener<_UI_EVENT_NOTIFICAITON, _INotificationEventListener*>(); + SysTryReturn(NID_UI, pNotificationListener, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + return FireListener(pNotificationListener, isFiltered); +} + +result +_UiNotificationEvent::OnListenerProcessing(const _IUiEventListener& listener, bool& isFiltered) +{ + _INotificationEventListener* pNotificationListener = dynamic_cast <_INotificationEventListener*>(const_cast <_IUiEventListener*>(&listener)); + SysTryReturn(NID_UI, pNotificationListener, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + return FireListener(pNotificationListener, isFiltered); +} + +result +_UiNotificationEvent::FireListener(const _INotificationEventListener* pListener, bool& isFiltered) +{ + result r = E_SUCCESS; + + _INotificationEventListener* pNotificationListener = const_cast <_INotificationEventListener*>(pListener); + SysTryReturn(NID_UI, pNotificationListener, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + const _Control* pTarget = GetControl(GetDestination()); + SysTryReturn(NID_UI, pTarget, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + isFiltered = pNotificationListener->OnNotifiedN(*pTarget, GetArgs()); + + return r; +} + +}} // Tizen::Ui diff --git a/src/ui/FUi_UiTouchEvent.cpp b/src/ui/FUi_UiTouchEvent.cpp new file mode 100644 index 0000000..35b1056 --- /dev/null +++ b/src/ui/FUi_UiTouchEvent.cpp @@ -0,0 +1,676 @@ +// +// 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_UiTouchEvent.cpp + * @brief This is the implementation file for the _UiTouchEvent class. + */ + +#include +#include +#include +#include "FUi_UiTouchEvent.h" +#include "FUi_ITouchEventListener.h" +#include "FUi_ITouchEventPreviewer.h" +#include "FUi_Control.h" +#include "FUi_ControlManager.h" +#include "FUi_TouchGestureDetector.h" +#include "FUi_TouchManager.h" +#include "FUi_ITouchGestureDelegate.h" +#include "FUi_ControlImpl.h" +#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); +} + + +using namespace std::tr1; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui +{ +_TouchInfo::_TouchInfo(void) + : __pointId(0) + , __touchStatus(_TOUCH_PRESSED) + , __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, 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, int zAxis, unsigned int buttons) + : __pointId(pointId) + , __touchStatus(status) + , __currentPosition(current) + , __isFlicked(isFlick) + , __timeStamp(timeStamp) + , __zAxis(zAxis) + , __buttons(buttons) +{ +} + +_TouchInfo::_TouchInfo(const _TouchInfo& rhs) + : __pointId(rhs.__pointId) + , __touchStatus(rhs.__touchStatus) + , __currentPosition(rhs.__currentPosition) + , __isFlicked(rhs.__isFlicked) + , __timeStamp(rhs.__timeStamp) + , __zAxis(rhs.__zAxis) + , __buttons(rhs.__buttons) +{ +} + +_TouchInfo& +_TouchInfo::operator =(const _TouchInfo& rhs) +{ + if (this != &rhs) + { + __pointId = rhs.__pointId; + __touchStatus = rhs.__touchStatus; + __currentPosition = rhs.__currentPosition; + __isFlicked = rhs.__isFlicked; + __timeStamp = rhs.__timeStamp; + __zAxis = rhs.__zAxis; + __buttons = rhs.__buttons; + } + + return *this; +} + +_TouchInfo::~_TouchInfo(void) +{ +} + +_TouchStatus +_TouchInfo::GetTouchStatus(void) const +{ + return __touchStatus; +} + +Tizen::Graphics::FloatPoint +_TouchInfo::GetCurrentPosition(void) const +{ + return __currentPosition; +} + +unsigned long +_TouchInfo::GetPointId(void) const +{ + return __pointId; +} + +bool +_TouchInfo::IsFlicked(void) const +{ + return __isFlicked; +} + +long long +_TouchInfo::GetTimeStamp(void) const +{ + return __timeStamp; +} + +int +_TouchInfo::GetZAxis(void) const +{ + return __zAxis; +} + +unsigned int +_TouchInfo::GetButtons(void) const +{ + return __buttons; +} + +void +_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); + __isFlicked = isFlick; + __timeStamp = timeStamp; + __zAxis = zAxis; + __buttons = buttons; +} + +void +_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; + __isFlicked = isFlick; + __timeStamp = timeStamp; + __zAxis = zAxis; + __buttons = buttons; +} + +_UiTouchEvent::_UiTouchEvent(const _UiObjectHandle& destination, const _TouchInfo& touchInfo, _UiEventRouteType routeType, const _UiObjectHandle& source) + : _UiEvent(destination, source, routeType) + , __touchInfo(touchInfo) + , __pForcedControlList(new (std::nothrow) LinkedListT<_Control*>) +{ +} + +_UiTouchEvent::~_UiTouchEvent(void) +{ +} + +_UiTouchEvent::_UiTouchEvent(const _UiTouchEvent& rhs) + : _UiEvent(rhs) + , __touchInfo(rhs.__touchInfo) + , __pForcedControlList(rhs.__pForcedControlList) +{ +} + +_UiTouchEvent& +_UiTouchEvent::operator =(const _UiTouchEvent& rhs) +{ + _UiEvent::operator =(rhs); + + if (this != &rhs) + { + __touchInfo = rhs.__touchInfo; + __pForcedControlList = rhs.__pForcedControlList; + } + + return *this; +} + +const _TouchInfo* +_UiTouchEvent::GetTouchInfo(void) const +{ + return &__touchInfo; +} + +_UiTouchEvent* +_UiTouchEvent::CloneN(void) const +{ + return new (std::nothrow) _UiTouchEvent(*this); +} + +_UiEventType +_UiTouchEvent::GetEventType(void) const +{ + return _UI_EVENT_TOUCH; +} + +bool +_UiTouchEvent::IsEventEnabled(const _Control& control) const +{ + if (GetTouchInfo()->GetTouchStatus() == _TOUCH_CANCELED) + { + return true; + } + + if (!_UiEvent::IsEventEnabled(control)) + { + return false; + } + + if (!control.IsInputEventEnabled()) + { + return false; + } + + return true; +} + +result +_UiTouchEvent::OnPreviewEventProcessing(const _Control& control, bool& isFiltered) +{ + result r = E_SUCCESS; + + const _TouchInfo* pTouchInfo = GetTouchInfo(); + SysTryReturn(NID_UI, pTouchInfo, 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 +_UiTouchEvent::OnEventProcessing(const _Control& control, bool& isFiltered) +{ + result r = E_SUCCESS; + + bool doesControlExist = false; + + const _TouchInfo* pTouchInfo = GetTouchInfo(); + SysTryReturn(NID_UI, pTouchInfo, 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 +_UiTouchEvent::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 +_UiTouchEvent::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 _TouchInfo* pTouchInfo = GetTouchInfo(); + SysTryReturn(NID_UI, pTouchInfo, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + result r = E_SUCCESS; + + switch (pTouchInfo->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 +_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."); + + result r = E_SUCCESS; + + const _TouchInfo* pTouchInfo = GetTouchInfo(); + SysTryReturn(NID_UI, pTouchInfo, 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(); + SysTryReturnResult(NID_UI, pTouchManager, E_SYSTEM, "System error occurred. "); + + pTouchManager->ResetTouchInfo(); + + return E_SUCCESS; + } + + if (ResetTouchInfo(pTarget, *pTouchInfo) == E_SUCCESS) + { + isFiltered = true; + return E_SYSTEM; + } + + FloatPoint point(0, 0); + + if (pControl) + { + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + SysTryReturnResult(NID_UI, pTouchManager, E_SYSTEM, "System error occurred. "); + + point = GetRelativePoint(*pControl, pTouchInfo->GetCurrentPosition()); + + if (isTouchEvent && (pTouchInfo->GetTouchStatus() != _TOUCH_CANCELED)) + { + if (!pTouchManager->IsTouchAllowed() || (pTouchManager->IsTouchAllowed() && pTouchManager->IsTouchCanceledOnGestureSuccess()) + || (!pControl->IsMultiTouchEnabled() && pTouchInfo->GetPointId() > 0)) + { + isFiltered = true; + return E_SUCCESS; + } + } + } + else + { + point = GetRelativePoint(*pTarget, pTouchInfo->GetCurrentPosition()); + } + + _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: + isFiltered = pTouchEventListener->OnTouchMoved(*pTarget, touchInfo); + break; + + // 2.0 compatibility for touch simulate + case _TOUCH_LONG_PRESSED: + // fall through + case _TOUCH_DOUBLE_PRESSED: + { + void* pData = pTarget->GetUserData(); + if (pData) + { + _ControlImpl* pTargetImpl = static_cast<_ControlImpl*>(pData); + if (pTargetImpl) + { + pTargetImpl->GenerateTouchEvent(touchInfo); + } + } + } + break; + + 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; + } + + return r; +} + +result +_UiTouchEvent::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 _TouchInfo* pTouchInfo = GetTouchInfo(); + SysTryReturn(NID_UI, pTouchInfo, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + const _Control* pTarget = GetControl(GetDestination()); + + FloatPoint point = GetRelativePoint(*pControl, pTouchInfo->GetCurrentPosition()); + + if (!pControl->IsMultiTouchEnabled() && pTouchInfo->GetPointId() > 0) + { + isFiltered = false; + return E_SUCCESS; + } + + _TouchInfo touchInfo(pTouchInfo->GetPointId(), pTouchInfo->GetTouchStatus(), point, false, pTouchInfo->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 (touchInfo.GetTouchStatus()) + { + case _TOUCH_PRESSED: + eventDelivery = pTouchEventPreviewer->OnPreviewTouchPressed(*pTarget, touchInfo); + + break; + + case _TOUCH_RELEASED: + eventDelivery = pTouchEventPreviewer->OnPreviewTouchReleased(*pTarget, touchInfo); + + break; + + case _TOUCH_MOVED: + eventDelivery = pTouchEventPreviewer->OnPreviewTouchMoved(*pTarget, touchInfo); + + break; + + case _TOUCH_CANCELED: + eventDelivery = pTouchEventPreviewer->OnPreviewTouchCanceled(*pTarget, touchInfo); + 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; + 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; +} + +result +_UiTouchEvent::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 +_UiTouchEvent::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 +_UiTouchEvent::ResetTouchInfo(const _Control* pControl, const _TouchInfo& touchInfo) +{ + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + SysTryReturnResult(NID_UI, pTouchManager, E_SYSTEM, "System error occurred. "); + + if (pControl == null) + { + if (touchInfo.GetTouchStatus() == _TOUCH_RELEASED) + { + pTouchManager->ResetTouchInfo(); + } + + return E_SUCCESS; + } + + return E_INVALID_CONDITION; +} + +bool +_UiTouchEvent::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_VariantImpl.cpp b/src/ui/FUi_VariantImpl.cpp new file mode 100644 index 0000000..aa11362 --- /dev/null +++ b/src/ui/FUi_VariantImpl.cpp @@ -0,0 +1,332 @@ +// +// 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_VariantImpl.cpp + * @brief This is the implementation file for _VariantImpl class. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "FUi_VariantImpl.h" + +using namespace Tizen::Base; +using namespace Tizen::Ui; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui +{ + +_VariantImpl::_VariantImpl(void) + : __refCount(1) + , __type(VARIANT_TYPE_NONE) +{ + __data.valueLongLong = 0; +} + +_VariantImpl::~_VariantImpl(void) +{ + Clear(); +} + +void +_VariantImpl::AddRef(void) +{ + __refCount++; +} + +void +_VariantImpl::Release(void) +{ + if (__refCount >= 1) + { + __refCount--; + if (__refCount == 0) + { + delete this; + } + } +} + +void +_VariantImpl::Clear(void) +{ + if (unlikely(__type == VARIANT_TYPE_NONE)) + { + __data.valueDouble = 0; + return; + } + + switch (__type) + { + case VARIANT_TYPE_NONE: + return; + + case VARIANT_TYPE_INT: + __data.valueInt = 0; + break; + + case VARIANT_TYPE_UINT: + __data.valueUInt = 0; + break; + + case VARIANT_TYPE_BOOL: + __data.valueBool = false; + break; + + case VARIANT_TYPE_FLOAT: + __data.valueFloat = 0; + break; + + case VARIANT_TYPE_DOUBLE: + __data.valueDouble = 0; + break; + + case VARIANT_TYPE_LONG: + __data.valueLong = 0; + break; + + case VARIANT_TYPE_ULONG: + __data.valueULong = 0; + break; + + case VARIANT_TYPE_LONGLONG: + __data.valueLongLong = 0; + break; + + case VARIANT_TYPE_ULONGLONG: + __data.valueULongLong = 0; + break; + + case VARIANT_TYPE_STRING: + { + delete __data.pString; + __data.pString = null; + break; + } + + case VARIANT_TYPE_DATETIME: + { + delete __data.pDateTime; + __data.pDateTime = null; + break; + } + + case VARIANT_TYPE_COLOR: + { + delete __data.pColor; + __data.pColor = null; + break; + } + + case VARIANT_TYPE_POINT: + { + delete __data.pPoint; + __data.pPoint = null; + break; + } + + case VARIANT_TYPE_FLOAT_POINT: + { + delete __data.pFloatPoint; + __data.pFloatPoint = null; + break; + } + + case VARIANT_TYPE_RECTANGLE: + { + delete __data.pRect; + __data.pRect = null; + break; + } + + case VARIANT_TYPE_FLOAT_RECTANGLE: + { + delete __data.pRectf; + __data.pRectf = null; + break; + } + + case VARIANT_TYPE_DIMENSION: + { + delete __data.pDimension; + __data.pDimension = null; + break; + } + + case VARIANT_TYPE_FLOAT_DIMENSION: + { + delete __data.pFloatDimension; + __data.pFloatDimension = null; + break; + } + + case VARIANT_TYPE_FLOAT_MATRIX4: + { + delete __data.pFloatMatrix4; + __data.pFloatMatrix4 = null; + break; + } + + case VARIANT_TYPE_FLOAT_POINT3: + { + delete __data.pFloatPoint3; + __data.pFloatPoint3 = null; + break; + } + + case VARIANT_TYPE_FLOAT_VECTOR4: + { + delete __data.pFloatVector4; + __data.pFloatVector4 = null; + break; + } + + default: + break; + } + + __type = VARIANT_TYPE_NONE; +} + +void +_VariantImpl::Copy(const Variant& rhs) +{ + const _VariantImpl* pImpl = rhs.GetVariantImpl(); + __type = pImpl->__type; + + switch (pImpl->__type) + { + case VARIANT_TYPE_NONE: + break; + + case VARIANT_TYPE_INT: + __data.valueInt = pImpl->__data.valueInt; + break; + + case VARIANT_TYPE_UINT: + __data.valueUInt = pImpl->__data.valueUInt; + break; + + case VARIANT_TYPE_BOOL: + __data.valueBool = pImpl->__data.valueBool; + break; + + case VARIANT_TYPE_FLOAT: + __data.valueFloat = pImpl->__data.valueFloat; + break; + + case VARIANT_TYPE_DOUBLE: + __data.valueDouble = pImpl->__data.valueDouble; + break; + + case VARIANT_TYPE_LONG: + __data.valueLong = pImpl->__data.valueLong; + break; + + case VARIANT_TYPE_ULONG: + __data.valueULong = pImpl->__data.valueULong; + break; + + case VARIANT_TYPE_LONGLONG: + __data.valueLongLong = pImpl->__data.valueLongLong; + break; + + case VARIANT_TYPE_ULONGLONG: + __data.valueULongLong = pImpl->__data.valueULongLong; + break; + + case VARIANT_TYPE_STRING: + __data.pString = new (std::nothrow) String(*pImpl->__data.pString); + break; + + case VARIANT_TYPE_DATETIME: + __data.pDateTime = new (std::nothrow) DateTime(*pImpl->__data.pDateTime); + break; + + case VARIANT_TYPE_COLOR: + __data.pColor = new (std::nothrow) Color(*pImpl->__data.pColor); + break; + + case VARIANT_TYPE_POINT: + __data.pPoint = new (std::nothrow) Point(*pImpl->__data.pPoint); + break; + + case VARIANT_TYPE_FLOAT_POINT: + __data.pFloatPoint = new (std::nothrow) FloatPoint(*pImpl->__data.pFloatPoint); + break; + + case VARIANT_TYPE_RECTANGLE: + __data.pRect = new (std::nothrow) Rectangle(*pImpl->__data.pRect); + break; + + case VARIANT_TYPE_FLOAT_RECTANGLE: + __data.pRectf = new (std::nothrow) FloatRectangle(*pImpl->__data.pRectf); + break; + + case VARIANT_TYPE_DIMENSION: + __data.pDimension = new (std::nothrow) Dimension(*pImpl->__data.pDimension); + break; + + case VARIANT_TYPE_FLOAT_DIMENSION: + __data.pFloatDimension = new (std::nothrow) FloatDimension(*pImpl->__data.pFloatDimension); + break; + + case VARIANT_TYPE_FLOAT_MATRIX4: + __data.pFloatMatrix4 = new (std::nothrow) FloatMatrix4(*pImpl->__data.pFloatMatrix4); + break; + + case VARIANT_TYPE_FLOAT_POINT3: + __data.pFloatPoint3 = new (std::nothrow) FloatPoint3(*pImpl->__data.pFloatPoint3); + break; + + case VARIANT_TYPE_FLOAT_VECTOR4: + __data.pFloatVector4 = new (std::nothrow) FloatVector4(*pImpl->__data.pFloatVector4); + break; + + default: + break; + } +} + +void +_VariantImpl::SetVariantType(VariantType type) +{ + if (__type != type) + { + __type = type; + } +} + +bool +_VariantImpl::IsSameType(VariantType type) const +{ + return(__type == type); +} + +} } // Tizen::Ui diff --git a/src/ui/FUi_VerticalBoxLayoutImpl.cpp b/src/ui/FUi_VerticalBoxLayoutImpl.cpp new file mode 100644 index 0000000..adb9c10 --- /dev/null +++ b/src/ui/FUi_VerticalBoxLayoutImpl.cpp @@ -0,0 +1,274 @@ +// +// 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_VerticalBoxLayoutImpl.cpp + * @brief This is the implementation file for _VerticalBoxLayoutImpl class. + * + * This file contains the implementation of _VerticalBoxLayoutImpl class. + */ + +#include "FUi_VerticalBoxLayoutImpl.h" +#include "FUi_CoordinateSystemUtils.h" + +namespace Tizen { namespace Ui +{ + +namespace +{ +static const int CONVERT_ERROR_CODE = -1; + +_Layout::LinearLayoutDirection +ConvertEnum(VerticalDirection val) +{ + switch (val) + { + case VERTICAL_DIRECTION_DOWNWARD: + return _Layout::LINEAR_TOP_TO_BOTTOM; + + case VERTICAL_DIRECTION_UPWARD: + return _Layout::LINEAR_BOTTOM_TO_TOP; + + default: + return _Layout::LINEAR_NONE_DIRECTION; + } +} + +VerticalDirection +ConvertEnum(_Layout::LinearLayoutDirection val) +{ + switch (val) + { + case _Layout::LINEAR_TOP_TO_BOTTOM: + return VERTICAL_DIRECTION_DOWNWARD; + + case _Layout::LINEAR_BOTTOM_TO_TOP: + return VERTICAL_DIRECTION_UPWARD; + + default: + return static_cast (CONVERT_ERROR_CODE); + } +} +} + +// _VerticalBoxLayoutImpl implementation +_VerticalBoxLayoutImpl::_VerticalBoxLayoutImpl(VerticalBoxLayout* pPublicLayout, _Layout::LinearLayout* pCoreLayout) + : _LayoutImpl(pPublicLayout, pCoreLayout) +{ +} + +_VerticalBoxLayoutImpl::~_VerticalBoxLayoutImpl() +{ +} + +Tizen::Ui::LayoutType +_VerticalBoxLayoutImpl::GetLayoutType(void) const +{ + return LAYOUT_VERTICAL_BOX; +} + +result +_VerticalBoxLayoutImpl::Construct(VerticalDirection direction) +{ + ClearLastResult(); + + _Layout::LinearLayoutDirection linearDirection = ConvertEnum(direction); + SysTryReturn(NID_UI, linearDirection != _Layout::LINEAR_NONE_DIRECTION, + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid data."); + + result r = GetCore().Initialize(_Layout::LINEAR_VERTICAL, linearDirection); + + return r; +} + +result +_VerticalBoxLayoutImpl::GetDirection(VerticalDirection& direction) const +{ + ClearLastResult(); + + _Layout::LinearLayoutDirection internalDirection; + + result r = GetCore().GetDirection(internalDirection); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + direction = ConvertEnum(internalDirection); + + return r; +} + +result +_VerticalBoxLayoutImpl::SetHorizontalAlignment(_ControlImpl& control, LayoutHorizontalAlignment horAlign) +{ + result r = SetAlignment(control, horAlign, LAYOUT_VERTICAL_ALIGN_TOP); + + return r; +} + +result +_VerticalBoxLayoutImpl::SetSpacing(_ControlImpl& control, float space) +{ + ClearLastResult(); + + _Layout::LayoutItem& layoutItem = control.GetLayoutContainer(); + + result r = GetCore().SetItemSpacing(layoutItem, space); + + return r; +} + +result +_VerticalBoxLayoutImpl::SetHorizontalMargin(_ControlImpl& control, float left, float right) +{ + result r = SetMargin(control, left, right, 0.0f, 0.0f); + + return r; +} + +result +_VerticalBoxLayoutImpl::SetWidth(_ControlImpl& control, float width) +{ + ClearLastResult(); + + result r = SetHorizontalFitPolicy(control, FIT_POLICY_FIXED); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _Layout::LayoutRect rect; + r = GetItemBaseRect(control, rect); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + rect.w = width; + r = SetItemBaseRect(control, rect); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +_VerticalBoxLayoutImpl::SetItemHorizontalFitPolicy(_ControlImpl& control, FitPolicy policy) +{ + result r = SetHorizontalFitPolicy(control, policy); + + return r; +} + +result +_VerticalBoxLayoutImpl::SetHeight(_ControlImpl& control, float height) +{ + ClearLastResult(); + + result r = SetVerticalFitPolicy(control, FIT_POLICY_FIXED); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _Layout::LayoutRect rect; + r = GetItemBaseRect(control, rect); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + rect.h = height; + r = SetItemBaseRect(control, rect); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +_VerticalBoxLayoutImpl::SetItemVerticalFitPolicy(_ControlImpl& control, FitPolicy policy) +{ + result r = SetVerticalFitPolicy(control, policy); + + return r; +} + +result +_VerticalBoxLayoutImpl::SetWeight(_ControlImpl& control, float weight) +{ + ClearLastResult(); + + _Layout::LayoutItem& layoutItem = control.GetLayoutContainer(); + + result r = GetCore().SetItemWeight(layoutItem, weight); + + return r; +} + +_VerticalBoxLayoutImpl* +_VerticalBoxLayoutImpl::CreateVerticalBoxLayoutImplN(VerticalBoxLayout* pPublicLayout, VerticalDirection direction) +{ + ClearLastResult(); + + _Layout::LinearLayout* pCoreLayout = null; + _VerticalBoxLayoutImpl* pImplLayout = null; + result r = E_SUCCESS; + + pCoreLayout = _Layout::LinearLayout::CreateLinearLayoutN(); + r = GetLastResult(); + SysTryReturn(NID_UI, pCoreLayout != null, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + pImplLayout = new (std::nothrow) _VerticalBoxLayoutImpl(pPublicLayout, pCoreLayout); + r = CheckConstruction(pCoreLayout, pImplLayout); + SysTryReturn(NID_UI, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pImplLayout->Construct(direction); + if (r != E_SUCCESS) + { + delete pImplLayout; + SysTryReturn(NID_UI, false, null, E_INVALID_ARG, "[E_INVALID_ARG] The Direction is invalid."); + } + + return pImplLayout; +} + +const char* +_VerticalBoxLayoutImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::VerticalBoxLayout"; +} + +const VerticalBoxLayout& +_VerticalBoxLayoutImpl::GetPublic(void) const +{ + return static_cast (_LayoutImpl::GetPublic()); +} + +VerticalBoxLayout& +_VerticalBoxLayoutImpl::GetPublic(void) +{ + return static_cast (_LayoutImpl::GetPublic()); +} + +const _Layout::LinearLayout& +_VerticalBoxLayoutImpl::GetCore(void) const +{ + return static_cast (_LayoutImpl::GetCore()); +} + +_Layout::LinearLayout& +_VerticalBoxLayoutImpl::GetCore(void) +{ + return static_cast <_Layout::LinearLayout&>(_LayoutImpl::GetCore()); +} + +const _VerticalBoxLayoutImpl* +_VerticalBoxLayoutImpl::GetInstance(const VerticalBoxLayout& layout) +{ + return static_cast (_LayoutImpl::GetInstance(layout)); +} + +_VerticalBoxLayoutImpl* +_VerticalBoxLayoutImpl::GetInstance(VerticalBoxLayout& layout) +{ + return static_cast <_VerticalBoxLayoutImpl*>(_LayoutImpl::GetInstance(layout)); +} + +}} // Tizen::Ui diff --git a/src/ui/FUi_VerticalBoxLayoutImpl.h b/src/ui/FUi_VerticalBoxLayoutImpl.h new file mode 100644 index 0000000..22649ee --- /dev/null +++ b/src/ui/FUi_VerticalBoxLayoutImpl.h @@ -0,0 +1,278 @@ +// +// 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_VerticalBoxLayoutImpl.h + * @brief This is the header file for _VerticalBoxLayoutImpl class. + * + * This header file contains the declaration of _VerticalBoxLayoutImpl class. + */ + +#ifndef _FUI_INTERNAL_VERTICAL_BOX_LAYOUT_IMPL_H +#define _FUI_INTERNAL_VERTICAL_BOX_LAYOUT_IMPL_H + +#include +#include "FUi_LayoutImpl.h" +#include "FUi_LayoutLinearLayout.h" + +namespace Tizen { namespace Ui +{ + +class VerticalBoxLayout; + +class _VerticalBoxLayoutImpl + : public _LayoutImpl +{ +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~_VerticalBoxLayoutImpl(void); + + /** + * Creates the instance of _VerticalBoxLayoutImpl. + * + * @since 2.0 + * @return The instance of _VerticalBoxLayoutImpl. + * @param[in] pPublicLayout The public class of vertical box layout. + * @param[in] direction The direction of vertical box layout. + * @exception E_SUCCESS The method was successful. + * @exception E_OUT_OF_MEMORY Insufficient memory. + */ + static _VerticalBoxLayoutImpl* CreateVerticalBoxLayoutImplN(VerticalBoxLayout* pPublicLayout, VerticalDirection direction = VERTICAL_DIRECTION_DOWNWARD); + + /** + * Gets the name of public class. + * + * @since 2.0 + * @return The name of public class. + */ + virtual const char* GetPublicClassName(void) const; + + /** + * Gets the public class. + * + * @since 2.0 + * @return The public class. + */ + virtual const VerticalBoxLayout& GetPublic(void) const; + + /** + * Gets the public class. + * + * @since 2.0 + * @return The public class. + */ + virtual VerticalBoxLayout& GetPublic(void); + + /** + * Gets the public class. + * + * @since 2.0 + * @return The public class. + */ + virtual const _Layout::LinearLayout& GetCore(void) const; + + /** + * Gets the public class. + * + * @since 2.0 + * @return The public class. + */ + virtual _Layout::LinearLayout& GetCore(void); + + /** + * Gets the _VerticalBoxLayoutImpl instance for the VerticalBoxLayout. + * + * @since 2.0 + * @return The _VerticalBoxLayoutImpl instance. + * @param[in] pLayout The VerticalBoxLayout instance. + */ + static const _VerticalBoxLayoutImpl* GetInstance(const VerticalBoxLayout& layout); + + /** + * Gets the _VerticalBoxLayoutImpl instance for the VerticalBoxLayout. + * + * @since 2.0 + * @return The _VerticalBoxLayoutImpl instance. + * @param[in] pLayout The VerticalBoxLayout instance. + */ + static _VerticalBoxLayoutImpl* GetInstance(VerticalBoxLayout& layout); + + /** + * Gets the direction of the VerticalBoxLayout. + * + * @since 2.0 + * @return An error code + * @param[out] direction The direction in which the children are attached + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + result GetDirection(VerticalDirection& direction) const; + + /** + * Sets the horizontal alignment of the specified control. + * + * @since 2.0 + * @return An error code + * @param[in] control The control for which the alignment is set + * @param[in] alignment The horizontal alignment + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @exception E_INVALID_ARG The alignment parameter is invalid. + */ + result SetHorizontalAlignment(_ControlImpl& control, LayoutHorizontalAlignment horAlign); + + /* + * Sets the space between the specified control and its predecessor. + * + * @since 2.1 + * @return An error code + * @param[in] control The control for which the space is set + * @param[in] space The space + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + result SetSpacing(_ControlImpl& control, float space); + + /* + * Sets the horizontal margins of the specified control. + * + * @since 2.1 + * @return An error code + * @param[in] control The control for which the margins are set + * @param[in] top The top margin + * @param[in] bottom The bottom margin + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + result SetHorizontalMargin(_ControlImpl& control, float left, float right); + + /* + * Sets the width of the specified control with the fixed length. + * + * @since 2.1 + * @return An error code + * @param[in] control The control for which the width is set + * @param[in] virWidth This is not used. + * @param[in] phyWidth The value of the width + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + result SetWidth(_ControlImpl& control, float width); + + /** + * Sets the width of the specified control with the fitting policy. + * + * @since 2.0 + * @return An error code + * @param[in] control The control for which the width is set + * @param[in] policy The fitting policy for the width + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + result SetItemHorizontalFitPolicy(_ControlImpl& control, FitPolicy policy); + + /* + * Sets the height of the specified control with fixed length. + * + * @since 2.1 + * @return An error code + * @param[in] control The control for which the height is set + * @param[in] virHeight This is not used. + * @param[in] phyHeight The value of the height + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + result SetHeight(_ControlImpl& control, float height); + + /** + * Sets the height of the specified control with the fitting policy. + * + * @since 2.0 + * @return An error code + * @param[in] control The control for which the height is set + * @param[in] policy The fitting policy for the height + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + result SetItemVerticalFitPolicy(_ControlImpl& control, FitPolicy policy); + + /** + * Sets the weight of the specified control. + * + * @since 2.0 + * @return An error code + * @param[in] control 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 was successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + result SetWeight(_ControlImpl& control, float weight); + + /** + * Gets the type of the layout. + * + * @since 2.0 + * @return The layout type + */ + virtual LayoutType GetLayoutType(void) const; + +protected: + /** + * This is the default constructor for this class. + * + * @since 2.0 + */ + _VerticalBoxLayoutImpl(VerticalBoxLayout* pPublicLayout, _Layout::LinearLayout* pCoreLayout); + +private: + /** + * This is the copy constructor for this class. + * + * @since 2.0 + */ + _VerticalBoxLayoutImpl(const _VerticalBoxLayoutImpl&); + + /** + * This is the substitution operator for this class. + * + * @since 2.0 + */ + _VerticalBoxLayoutImpl& operator =(const _VerticalBoxLayoutImpl&); + + /** + * Initializes this instance of _VerticalBoxLayoutImpl with the specified parameters. + * + * @since 2.0 + * @return An error code + * @param[in] direction The direction of vertical box layout. + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_SYSTEM A system error occurred. + */ + result Construct(VerticalDirection direction); +}; // _VerticalBoxLayoutImpl + +}} // Tizen::Ui + +#endif // _FUI_INTERNAL_VERTICAL_BOX_LAYOUT_IMPL_H diff --git a/src/ui/FUi_Window.cpp b/src/ui/FUi_Window.cpp new file mode 100644 index 0000000..e1ae363 --- /dev/null +++ b/src/ui/FUi_Window.cpp @@ -0,0 +1,1091 @@ +// +// 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_Window.cpp + * @brief This is the implementation file for the _Window class. + */ + +#include +#include +#include +#include +#include +#include +#include "FUi_Window.h" +#include "FUi_ControlManager.h" +#include "FUi_TouchManager.h" +#include "FUiAnim_DisplayContextImpl.h" +#include "FUiAnim_RootVisualElement.h" +#include "FUiAnim_VisualElement.h" +#include "FUi_EcoreEvasMgr.h" +#include "FUi_EcoreEvas.h" +#include "FUiAnim_DisplayManager.h" +#include "FUiAnim_EflLayer.h" +#include "FUiCtrl_Form.h" +#include "FUiCtrl_FormImpl.h" +#include "FUiCtrl_FrameImpl.h" +#include "FUi_AccessibilityManager.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; +using namespace Tizen::Ui::Animations; +using namespace Tizen::Ui::Controls; + +namespace Tizen { namespace Ui +{ + +_Window* +_Window::CreateWindowN(void) +{ + _Window* pWindow = new (std::nothrow) _Window; + SysTryReturn(NID_UI, pWindow, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + result r = E_SUCCESS; + + if (IsFailed(GetLastResult())) + { + goto CATCH; + } + + r = pWindow->CreateRootVisualElement(); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pWindow->AcquireHandle(); + + return pWindow; + +CATCH: + delete pWindow; + return null; +} + +_Window::~_Window(void) +{ + SetDestroying(true); + Close(); + SetOwner(null); + + if (__pDisplayContext) + { + _DisplayContextImpl::DestroyPublicInstance(*__pDisplayContext); + __pDisplayContext = null; + } + + if(__pLayer) + { + //_EflLayer* pLayer = static_cast<_EflLayer*>(__pLayer); + //Ecore_X_Window win = (Ecore_X_Window) ecore_evas_window_get(pLayer->GetEcoreEvas()); + //SysLog(NID_UI, "[Multi_Window] destroy x window(0x%x)", win); + + if(__pRootVisualElement) + { + if (GetVisualElement()) + { + __pRootVisualElement->DetachChild(*GetVisualElement()); + } + } + delete __pLayer; + __pLayer = NULL; + } + + delete __pDimmingLayer; + __pDimmingLayer = null; + + __pRootVisualElement =NULL; + + _ControlManager::GetInstance()->DetachAllWindow(*this); +} + +_IWindowDelegate& +_Window::GetWindowDelegate(void) const +{ + if (IsDestroying()) + { + return const_cast<_Window&>(*this); + } + + SysAssert(__pWindowDelegate); + return *__pWindowDelegate; +} + +String +_Window::GetDescription(void) const +{ + String description = _Control::GetDescription(); + 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, IsDestroying(), __pDisplayContext); + + description.Append(descriptionTemp); + + return description; +} + +void +_Window::SetRootVisualElement(const Tizen::Ui::Animations::_RootVisualElement& rootVisualElement) +{ + _RootVisualElement* pRootVE = const_cast<_RootVisualElement*>(&rootVisualElement); + + __pRootVisualElement = pRootVE; +} + +void +_Window::SetLayer(const Tizen::Ui::Animations::_NativeLayer& layer) +{ + _NativeLayer* pLayer = const_cast<_NativeLayer*>(&layer); + + __pLayer = pLayer; +} + +bool +_Window::IsActivatedOnOpen(void) const +{ + return true; +} + +bool +_Window::IsActivated(void) const +{ + return __activated; +} + +void +_Window::SetWindowDelegate(_IWindowDelegate& delegate) +{ + ClearLastResult(); + __pWindowDelegate = &delegate; +} + +void +_Window::ResetWindowDelegate(void) +{ + ClearLastResult(); + __pWindowDelegate = this; +} + +bool +_Window::IsAttached(void) const +{ + return _ControlManager::GetInstance()->IsWindowAttached(*this); +} + +result +_Window::Open(bool drawAndShow) +{ + bool visibleState = GetVisibleState(); + if (!__isOpened && visibleState) + { + __isOpened = true; + __isInitialized = true; + result r = _ControlManager::GetInstance()->OpenWindow(*this, drawAndShow); + + if (__type != _WINDOW_TYPE_VE) + { + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + SysTryReturn(NID_UI, pEcoreEvas, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + pEcoreEvas->SetWindowVisibleState(*GetRootWindow(), visibleState); + } + + return r; + } + + return E_SUCCESS; +} + +void +_Window::Close(void) +{ + if (__isOpened) + { + if (__type != _WINDOW_TYPE_VE) + { + bool visibleState = GetVisibleState(); + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + SysTryReturnVoidResult(NID_UI, pEcoreEvas, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + pEcoreEvas->SetWindowVisibleState(*GetRootWindow(), visibleState); + } + + _ControlManager::GetInstance()->CloseWindow(*this); + __isOpened = false; + } +} + +_Control* +_Window::GetOwner(void) const +{ + ClearLastResult(); + return __pOwner; +} + +void +_Window::SetOwner(_Control* pOwner) +{ + ClearLastResult(); + + if (pOwner) + { + if (__type != _WINDOW_TYPE_VE) + { + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + if (pEcoreEvas) + { + if (__transient == true) + { + pEcoreEvas->SetOwner(*this, *pOwner); + } + + __transient = true; + } + } + } + + if (pOwner == __pOwner) + { + return; + } + + _VisualElement* pVE = GetVisualElement(); + + if (__pOwner) + { + __pOwner->DetachOwnee(*this); + + if (__type == _WINDOW_TYPE_VE) + { + _Window* pRootWindow = __pOwner->GetRootWindow(); + if (pRootWindow) + { + _RootVisualElement* pRootVE = pRootWindow->GetRootVisualElement(); + if (pRootVE && pVE) + { + pRootVE->DetachChild(*pVE); + } + } + } + } + + if (pOwner) + { + pOwner->AttachOwnee(*this); + + if (__type == _WINDOW_TYPE_VE) + { + _Window* pRootWindow = pOwner->GetRootWindow(); + if (pRootWindow) + { + _RootVisualElement* pRootVE = pRootWindow->GetRootVisualElement(); + if (pRootVE && pVE) + { + pRootVE->AttachChild(*pVE); + } + } + } + } + + _Control* pOldOwner = __pOwner; + __pOwner = pOwner; + GetWindowDelegate().OnOwnerChanged(pOldOwner); +} + +result +_Window::CreateRootVisualElement(_WindowType windowType) +{ + __type = windowType; + + if (__type == _WINDOW_TYPE_VE) + { + return E_SUCCESS; + } + + result r = CreateLayer(); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + SysAssert(pEcoreEvas); + __rotation = pEcoreEvas->GetWindowRotation(*this); + pEcoreEvas->RegisterWindowStateCallback(*this); + + // Get visual element. + _VisualElement* pVisualElement = GetVisualElement(); + SysAssert(pVisualElement); + + pVisualElement->SetName(L"Window"); + pVisualElement->SetClipChildrenEnabled(false); + pVisualElement->SetRenderOperation(_VisualElement::RENDER_OPERATION_COPY); + + // Attach visual element to root visual element. + __pRootVisualElement->AttachChild(*GetVisualElement()); + + if (__type == _WINDOW_TYPE_MAIN) + { + SysLog(NID_UI, "[WM ROTATION][WIN 0x%x, BASIC] Create.", GetNativeHandle()); + } + else + { + pEcoreEvas->SetWindowType(*this, _WINDOW_TYPE_SUB); + SysLog(NID_UI, "[WM ROTATION][WIN 0x%x, UTILITY] Create.", GetNativeHandle()); + } + + return E_SUCCESS; +} + +result +_Window::CreateLayer(void) +{ + _DisplayManager* pDisplayManager = _DisplayManager::GetInstance(); + SysAssert(pDisplayManager); + + if (__type == _WINDOW_TYPE_MAIN) + { + __pLayer = _NativeLayer::CreateInstanceN(); + } + else + { + __pLayer = _NativeLayer::CreateInstanceN(false); + } + + SysAssert(__pLayer); + __pRootVisualElement = __pLayer->GetRootVisualElement(); + + _EflLayer* pLayer = static_cast<_EflLayer*>(__pLayer); + SysAssert(pLayer); + + int rootWindowW = 0; + int rootWindowH = 0; + ecore_x_window_size_get(ecore_x_window_root_get((Ecore_X_Window)ecore_evas_window_get(pLayer->GetEcoreEvas())), &rootWindowW, &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"); + + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + if (pEcoreEvas) + { + String appName = _AppInfo::GetAppExecutableName(); + + pEcoreEvas->SetWindowName(*this, appName); + } + + return E_SUCCESS; +} + +void +_Window::SetActivationEnabled(bool enable) +{ + if (__type == _WINDOW_TYPE_VE) + { + SetFocusable(enable); + return; + } + + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + SysTryReturnVoidResult(NID_UI, pEcoreEvas, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + pEcoreEvas->SetWindowActivationEnabled(*GetRootWindow(), enable); + + SetLastResult(E_SUCCESS); +} + +bool +_Window::IsActivationEnabled(void) +{ + if (__type == _WINDOW_TYPE_VE || IsSystemWindow()) + { + return IsFocusable(); + } + + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + SysTryReturn(NID_UI, pEcoreEvas, true, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + bool enable = pEcoreEvas->IsWindowActivationEnabled(*GetRootWindow()); + + SetLastResult(E_SUCCESS); + + return enable; +} + +void +_Window::SetNativeWindowActivated(bool activated) +{ + __nativeWindowActivated = activated; +} + +bool +_Window::GetNativeWindowActivated(void) +{ + if ((GetWindowType() == _WINDOW_TYPE_VE) || IsSystemWindow()) + { + return true; + } + else + { + return __nativeWindowActivated; + } +} + +_RootVisualElement* +_Window::GetRootVisualElement(void) const +{ + return __pRootVisualElement; +} + +NativeWindowHandle +_Window::GetNativeHandle(void) const +{ + if (__type == _WINDOW_TYPE_VE) + { + return 0; + } + + _RootVisualElement* pRootVE = GetRootVisualElement(); + SysAssert(pRootVE); + + _EflLayer* pLayer = static_cast<_EflLayer*>(pRootVE->GetNativeLayer()); + SysAssert(pLayer); + + Ecore_Evas* pEcoreEvas = pLayer->GetEcoreEvas(); + Ecore_X_Window win = (Ecore_X_Window) ecore_evas_window_get(pEcoreEvas); + + return win; +} + +void +_Window::OnActivated(void) +{ + bool isFrameActivated = _ControlManager::GetInstance()->IsFrameActivated(); + SysLog(NID_UI, "frameActivated(%d)", isFrameActivated); + + _Control* focusedControl = GetCurrentFocusControl(); + + SetFocusWindowActivationChecked(true); + if (focusedControl) + { + focusedControl->SetFocused(); + } + + else + { + SetFocused(); + } + SetFocusWindowActivationChecked(false); + + _TouchManager* pTouchMgr = _TouchManager::GetInstance(); + if (pTouchMgr) + { + pTouchMgr->SetTouchCanceled(null); + } +} + +void +_Window::OnNativeWindowActivated(void) +{ + +} + +void +_Window::OnFocusableStateChanged(bool focusalbeState) +{ + if (__type == _WINDOW_TYPE_VE) + { + return; + } + + SetActivationEnabled(focusalbeState); +} + +bool +_Window::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); + GetWindowDelegate().OnNativeWindowActivated(); + } + else + { + SetNativeWindowActivated(false); + } + + pArgs->RemoveAll(true); + delete pArgs; + + return true; + } + + return false; +} + +void +_Window::OnDeactivated(void) +{ + bool isFrameActivated = _ControlManager::GetInstance()->IsFrameActivated(); + SysLog(NID_UI, "frameActivated(%d)", isFrameActivated); +} + +void +_Window::OnOwnerChanged(_Control* pOldOwner) +{ + +} + +result +_Window::OnBoundsChanging(const FloatRectangle& bounds) +{ + if (__type == _WINDOW_TYPE_VE) + { + return E_SUCCESS; + } + + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + SysTryReturn(NID_UI, pEcoreEvas, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + pEcoreEvas->SetWindowBounds(*GetRootWindow(), bounds); + result r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +void +_Window::OnVisibleStateChanged(void) +{ + ClearLastResult(); + + bool visibleState = GetVisibleState(); + if (visibleState == false) + { + Close(); + if(unlikely((_AccessibilityManager::IsActivated()))) + { + _AccessibilityManager::GetInstance()->RequestAutoReading(_ACCESSIBILITY_AUTO_READING_MODE_FIRST_ITEM); + } + } + + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + SetLastResult(E_SUCCESS); +} + +result +_Window::OnAttachingToMainTree(const _Control* pParent) +{ + if (__type == _WINDOW_TYPE_VE) + { + return E_SUCCESS; + } + + _EflLayer* pLayer = static_cast<_EflLayer*>(__pRootVisualElement->GetNativeLayer()); + SysAssert(pLayer); + SetVisibleState(true); + pLayer->SetShowState(true); + + return E_SUCCESS; +} + +result +_Window::OnDetachingFromMainTree(void) +{ + if (__type == _WINDOW_TYPE_VE) + { + return E_SUCCESS; + } + + _EflLayer* pLayer = static_cast<_EflLayer*>(__pRootVisualElement->GetNativeLayer()); + SysAssert(pLayer); + pLayer->SetShowState(false); + + return E_SUCCESS; +} + +void +_Window::OnWindowStateChanged(void) +{ + // <0> + // Update rotation + // <1> + // Find current form + // Call UpdateOrientation + // <2> + // Find current frame + // Call UpdateOrientation + // <3> + // Find window + // Change layout + // Rotate window + + SetOrientationCallbackModeEnabled(true); + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + if (!pEcoreEvas) + { + return; + } + + int rotation = pEcoreEvas->GetWindowRotation(*this); + + Rectangle winBounds = GetBounds(); + SysLog(NID_UI, "[WM ROTATION][WIN 0x%x, %d, %d, %d, %d] OnWindowStateChanged : prev ROT %d, cur ROT %d", GetNativeHandle(), winBounds.x, winBounds.y, winBounds.width, winBounds.height, __rotation, rotation); + + if (rotation == __rotation) + { + return; + } + + __rotation = rotation; + if(__pLayer) + { + _EflLayer* pLayer = dynamic_cast<_EflLayer*>(__pLayer); + if (pLayer) + { + pLayer->SetOrientationChanged(__rotation); + } + } + + + // <1> + int childCount = GetChildCount(); + for (int i = childCount; i > 0; i--) + { + _Control* pChild = GetChild(i - 1); + + _Form* pForm = dynamic_cast<_Form*>(pChild); + if (pForm) + { + if (pForm->IsVisible()) + { + // Current Form + _FormImpl* pFormImpl = static_cast<_FormImpl*>(pForm->GetUserData()); + if (pFormImpl) + { + 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; + } + } + } + + // <2> + if (IsOrientationRoot()) + { + _FrameImpl* pFrameImpl = static_cast<_FrameImpl*>(GetUserData()); + if (pFrameImpl) + { + pFrameImpl->UpdateOrientation(); + } + + return; + } + + // <3> + SysLog(NID_UI, "[WM ROTATION] ---------- Update Ownee Window : START ----------"); + + _ControlOrientation controlOrientation = (rotation == 0 || rotation == 180) ? _CONTROL_ORIENTATION_PORTRAIT : _CONTROL_ORIENTATION_LANDSCAPE; + ChangeLayout(controlOrientation, false); + + _ControlRotation controlRotation = _CONTROL_ROTATION_0; + switch (rotation) + { + case 0: + controlRotation = _CONTROL_ROTATION_0; + break; + case 90: + controlRotation = _CONTROL_ROTATION_90; + break; + case 180: + controlRotation = _CONTROL_ROTATION_180; + break; + case 270: + controlRotation = _CONTROL_ROTATION_270; + break; + default: + break; + } + ChangeLayout(controlRotation); + + pEcoreEvas->RotateWindow(*this, __rotation, false); + + Invalidate(true); + + SysLog(NID_UI, "[WM ROTATION] ---------- Update Ownee Window : END ----------"); + SetOrientationCallbackModeEnabled(false); +} + +void +_Window::OnTouchCaptureGained(void) +{ + +} + +void +_Window::OnTouchCaptureLost(void) +{ +} + +void +_Window::SetPreferredRotation(bool enable) +{ + __preferredRotation = enable; +} + +bool +_Window::GetPreferredRotation(void) const +{ + return __preferredRotation; +} + +bool +_Window::IsRotationSynchronized(void) const +{ + return false; +} + +bool +_Window::IsLayoutChangable(void) const +{ + if (__type == _WINDOW_TYPE_VE) + { + return true; + } + + return false; +} + +void +_Window::SetRotation(int rotation) +{ + __rotation = rotation; +} + +_WindowType +_Window::GetWindowType(void) +{ + return __type; +} + +void +_Window::OnChangeLayout(_ControlOrientation orientation) +{ + _DimmingLayer *pLayer = GetDimmingLayer(); + if (pLayer) + { + result r = GetDimmingLayer()->Rearrange(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + // if window, change its size specially for full-screen(Form, Frame, etc.). + _Control::OnChangeLayout(orientation); // if called, layout will be changed. +} + +WindowState +_Window::GetWindowState(void) const +{ + ClearLastResult(); + return __windowState; +} + +void +_Window::SetWindowState(WindowState windowState) +{ + __windowState = windowState; +} + +DisplayContext* +_Window::GetDisplayContext(void) const +{ + if (!__pDisplayContext) + { + SysTryReturn(NID_UI, __pLayer, null, E_SYSTEM, "[E_SYSTEM] Cannot gain the DisplayContext. This window is not completed."); + + __pDisplayContext = _DisplayContextImpl::CreatePublicInstance(*__pLayer); + } + + result r = GetLastResult(); + SysTryReturn(NID_UI, __pDisplayContext, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + return __pDisplayContext; +} + +result +_Window::SetZOrderGroup(int windowZOrderGroup) +{ + if (__type == _WINDOW_TYPE_VE) + { + return E_SUCCESS; + } + + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + + if (windowZOrderGroup == WINDOW_Z_ORDER_GROUP_HIGHEST) + { + pEcoreEvas->SetWindowLevel(*this, _WINDOW_LEVEL_NOTIFICATION_HIGH); + } + else if (windowZOrderGroup == WINDOW_Z_ORDER_GROUP_HIGH) + { + pEcoreEvas->SetWindowLevel(*this, _WINDOW_LEVEL_NOTIFICATION_MIDDLE); + } + else if (windowZOrderGroup == WINDOW_Z_ORDER_GROUP_NORMAL) + { + pEcoreEvas->SetWindowLevel(*this, _WINDOW_LEVEL_NORMAL); + } + + __transient = false; + + bool visible = pEcoreEvas->IsWindowVisible(*this); + bool activationEnabled = pEcoreEvas->IsWindowActivationEnabled(*this); + + if ((visible == true) && (activationEnabled == true)) + { + pEcoreEvas->ActivateWindow(*this); + } + + return E_SUCCESS; +} + +_Window::_Window() + : __type(_WINDOW_TYPE_MAIN) + , __windowState(WINDOW_STATE_INITIALIZED) + , __pOwner(null) + , __pWindowDelegate(null) + , __activated(false) + , __pRootVisualElement(null) + , __pLayer(null) + , __pDimmingLayer(null) + , __pDisplayContext(null) + , __systemWindow(false) + , __isOpened(false) + , __isInitialized(false) + , __pFocusControl(null) + , __pFocusTraversalControl(null) + , __transient(true) + , __dimmingEnabled(false) + , __rotation(-1) + , __preferredRotation(false) + , __orientationCallbackMode(false) + , __nativeWindowActivated(false) +{ + SetControlDelegate(*this); + SetWindowDelegate(*this); + SetClipToParent(false); // [ToDo] exception check. +} + +void +_Window::Activate(void) +{ + if (__activated) + { + return; + } + + __activated = true; + GetWindowDelegate().OnActivated(); +} + +void +_Window::Deactivate(void) +{ + __activated = false; + + if (IsDestroying() == false) + { + GetWindowDelegate().OnDeactivated(); + } +} + +void +_Window::SetSystemWindow(bool systemWindow) +{ + __systemWindow = systemWindow; +} + +bool +_Window::IsSystemWindow(void) const +{ + return __systemWindow; +} + +IListT<_Control*>* +_Window::GetFocusList(void) const +{ + if(!__pFocusControlList) + { + __pFocusControlList.reset(GetFocusListN()); + __pFocusControlList->InsertAt(const_cast<_Window*>(this), 0); + } + return __pFocusControlList.get(); +} + +void +_Window::ResetFocusList(void) +{ + if(__pFocusControlList) + { + __pFocusControlList.reset(); + } +} + +result +_Window::SetDimmingEnabled(bool enabled) +{ + __dimmingEnabled = enabled; + + return E_SUCCESS; +} + +bool +_Window::IsDimmingEnabled(void) const +{ + return __dimmingEnabled; +} + +void +_Window::SetDimmingLayer(_DimmingLayer* pLayer) +{ + __pDimmingLayer = pLayer; +} + +_DimmingLayer* +_Window::GetDimmingLayer(void) +{ + return __pDimmingLayer; +} + +void +_Window::SetOrientationCallbackModeEnabled(bool enable) +{ + __orientationCallbackMode = enable; +} + +bool +_Window::IsOrientationCallbackModeEnabled(void) const +{ + return __orientationCallbackMode; +} + +_Control* +_Window::GetFocusTraversalControl(_Control* pControl) const +{ + return __pFocusTraversalControl; +} + +void +_Window::SetFocusTraversalControl(_Control* pControl, bool on) +{ + if (on) + { + __pFocusTraversalControl = pControl; + } + else + { + __pFocusTraversalControl = this; + } +} + +void +_Window:: SetFocusControl(const _Control* pControl, bool on) +{ + SysTryReturnVoidResult(NID_UI, pControl, E_SYSTEM, "[E_SYSTEM] The pControl cannot be NULL."); + + __pFocusControl = const_cast<_Control*>(pControl); + + _ControlManager* pControlMgr = _ControlManager::GetInstance(); + SysAssert(pControlMgr); + + if (on) + { + if (IsActivated()) + { + pControlMgr->SetFocusControl(*pControl); + } + } + else + { + pControlMgr->SetFocusControl(*this, false); + SetFocused(); + } +} + +_Control* +_Window::GetFocusControl(const _Control* pControl) const +{ + return __pFocusControl; +} +_Control* +_Window::GetCurrentFocusControl(void) const +{ + return __pFocusControl; +} +}} // Tizen::Ui diff --git a/src/ui/FUi_WindowImpl.cpp b/src/ui/FUi_WindowImpl.cpp new file mode 100644 index 0000000..a3edec0 --- /dev/null +++ b/src/ui/FUi_WindowImpl.cpp @@ -0,0 +1,475 @@ +// +// 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_WindowImpl.cpp + * @brief This is the implementation file for the _WindowImpl class. + */ + +#include +#include +#include +#include "FUi_WindowImpl.h" +#include "FUi_Window.h" +#include "FUi_ErrorMessages.h" +#include "FUi_UiManagerProxy.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; +using namespace Tizen::Ui::Animations; + + +namespace Tizen { namespace Ui +{ + +class _WindowImpl::WindowImplDelegate + : public _IWindowDelegate +{ +public: + WindowImplDelegate(_WindowImpl& impl) + : __impl(impl) + , __core(impl.GetCore()) + , __public(impl.GetPublic()) + { + } + + virtual void OnActivated(void) + { + IEnumeratorT * pEnumerator = __impl.__pPublicWindowEventListeners->GetEnumeratorN(); + // 1. public + while (pEnumerator->MoveNext() == E_SUCCESS) + { + Runtime::IEventListener* pListener = null; + pEnumerator->GetCurrent(pListener); + IWindowEventListener* pWindowEventListener = dynamic_cast (pListener); + if (!pWindowEventListener) + { + continue; + } + + pWindowEventListener->OnWindowActivated(__public); + } + delete pEnumerator; + + // 2. self + __impl.SetWindowState(WINDOW_STATE_ACTIVATED); + + // 3. Impl + __impl.OnActivated(); + + // 4. Core + __core.OnActivated(); + } + + virtual void OnNativeWindowActivated(void) + { + __impl.OnNativeWindowActivated(); + __core.OnNativeWindowActivated(); + } + + virtual void OnDeactivated(void) + { + IEnumeratorT * pEnumerator = __impl.__pPublicWindowEventListeners->GetEnumeratorN(); + + // 1. public + while (pEnumerator->MoveNext() == E_SUCCESS) + { + Runtime::IEventListener* pListener = null; + pEnumerator->GetCurrent(pListener); + IWindowEventListener* pWindowEventListener = dynamic_cast (pListener); + if (!pWindowEventListener) + { + continue; + } + + pWindowEventListener->OnWindowDeactivated(__public); + } + delete pEnumerator; + + // 2. self + __impl.SetWindowState(WINDOW_STATE_DEACTIVATED); + + // 3. Impl + __impl.OnDeactivated(); + + // 4. Core + __core.OnDeactivated(); + } + + virtual void OnOwnerChanged(_Control* pOldOwner) + { + __impl.OnOwnerChanged(pOldOwner); + __core.OnOwnerChanged(pOldOwner); + } + +private: + WindowImplDelegate(const WindowImplDelegate& rhs); + WindowImplDelegate& operator =(const WindowImplDelegate& rhs); + +private: + _WindowImpl& __impl; + _Window& __core; + Window& __public; +}; // WindowImplDelegate + + +WindowState +_WindowImpl::GetErrorWindowState(void) +{ + return WINDOW_STATE_INITIALIZED; // [ToDo] Not good choice. But no option. +} + +_WindowImpl* +_WindowImpl::GetInstance(Window& window) +{ + return static_cast <_WindowImpl*> (window._pControlImpl); +} + +const _WindowImpl* +_WindowImpl::GetInstance(const Window& window) +{ + return static_cast (window._pControlImpl); +} + +_WindowImpl* +_WindowImpl::CreateWindowImplN(Window* pPublic, const Rectangle& bounds, + const Layout* pPublicPortraitLayout, const Layout* pPublicLandscapeLayout, + bool resizable, bool movable) +{ + result r = E_SUCCESS; + + _Window* pCore = _Window::CreateWindowN(); + SysTryReturn(NID_UI, pCore, null, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + _WindowImpl* pImpl = + new (std::nothrow) _WindowImpl(pPublic, pCore, bounds, + pPublicPortraitLayout, pPublicLandscapeLayout, + resizable, movable); + r = CheckConstruction(pCore, pImpl); + SysTryReturn(NID_UI, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + ClearLastResult(); + + return pImpl; +} + +_WindowImpl* +_WindowImpl::CreateWindowImplN(Window* pPublic, const FloatRectangle& bounds, + const Layout* pPublicPortraitLayout, const Layout* pPublicLandscapeLayout, + bool resizable, bool movable) +{ + result r = E_SUCCESS; + + _Window* pCore = _Window::CreateWindowN(); + SysTryReturn(NID_UI, pCore, null, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + _WindowImpl* pImpl = + new (std::nothrow) _WindowImpl(pPublic, pCore, bounds, + pPublicPortraitLayout, pPublicLandscapeLayout, + resizable, movable); + r = CheckConstruction(pCore, pImpl); + SysTryReturn(NID_UI, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + ClearLastResult(); + + return pImpl; +} + +_WindowImpl::~_WindowImpl(void) +{ + _WindowImpl::GetCore().ResetWindowDelegate(); + + delete __pImplDelegate; + __pImplDelegate = null; + + Close(); + + delete __pPublicWindowEventListeners; + __pPublicWindowEventListeners = null; +} + +const char* +_WindowImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Window"; +} + +const Window& +_WindowImpl::GetPublic(void) const +{ + return static_cast (_ControlImpl::GetPublic()); +} + +Window& +_WindowImpl::GetPublic(void) +{ + return static_cast (_ControlImpl::GetPublic()); +} + +const _Window& +_WindowImpl::GetCore(void) const +{ + return static_cast (_ControlImpl::GetCore()); +} + +_Window& +_WindowImpl::GetCore(void) +{ + return static_cast <_Window&>(_ControlImpl::GetCore()); +} + +void +_WindowImpl::AddWindowEventListener(Tizen::Ui::IWindowEventListener& listener) +{ + ClearLastResult(); + SysTryReturnVoidResult(NID_UI, + __pPublicWindowEventListeners->Add(&listener) == E_SUCCESS, + E_SYSTEM, _UiError::SYSTEM); +} + +void +_WindowImpl::RemoveWindowEventListener(Tizen::Ui::IWindowEventListener& listener) +{ + ClearLastResult(); + SysTryReturnVoidResult(NID_UI, + __pPublicWindowEventListeners->Remove(&listener) == E_SUCCESS, + E_SYSTEM, _UiError::SYSTEM); +} + +void +_WindowImpl::OnActivated(void) +{ + +} + +void +_WindowImpl::OnNativeWindowActivated(void) +{ + +} + +void +_WindowImpl::OnDeactivated(void) +{ + +} + +void +_WindowImpl::OnOwnerChanged(_Control* pOldOwner) +{ + +} + +result +_WindowImpl::OnBoundsChanging(const Rectangle& bounds) +{ + result r = E_SUCCESS; + r = _ControlImpl::OnBoundsChanging(bounds); + + /* + if (_WindowImpl::GetInstance(GetPublic()) == null) + { + r = CallOnBoundsChanging(bounds); + } + */ + + return r; +} + +void +_WindowImpl::OnRotated(_ControlRotation rotation) +{ + +} + +result +_WindowImpl::Open(bool drawAndShow) +{ + return GetCore().Open(drawAndShow); +} + +void +_WindowImpl::Close(void) +{ + GetCore().Close(); +} + +WindowState +_WindowImpl::GetWindowState(void) const +{ + ClearLastResult(); + return GetCore().GetWindowState(); +} + +void +_WindowImpl::SetWindowState(WindowState windowState) +{ + GetCore().SetWindowState(windowState); +} + +DisplayContext* +_WindowImpl::GetDisplayContext(void) const +{ + return GetCore().GetDisplayContext(); +} + +result +_WindowImpl::SetZOrderGroup(WindowZOrderGroup windowZOrderGroup) +{ + _UiManagerProxy uiManagerProxy; + result r = uiManagerProxy.Construct(); + SysTryReturnResult(NID_UI, r == E_SUCCESS, r, "Propagating."); + + NativeWindowHandle handle = GetCore().GetNativeHandle(); + r = uiManagerProxy.SetZOrderGroup(handle, static_cast(windowZOrderGroup)); + SysTryReturnResult(NID_UI, r == E_SUCCESS, r, "Propagating."); + + return GetCore().SetZOrderGroup(windowZOrderGroup); +} + +Control* +_WindowImpl::GetOwner(void) const +{ + _Control* pOwner = GetCore().GetOwner(); + if (pOwner) + { + _ControlImpl* pImpl = static_cast<_ControlImpl*>(pOwner->GetUserData()); + if (pImpl) + { + return (&pImpl->GetPublic()); + } + } + + return null; +} + +void +_WindowImpl::SetOwner(Tizen::Ui::Control *pControl) +{ + _ControlImpl* pImpl = _ControlImpl::GetInstance(*pControl); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + GetCore().SetOwner(&pImpl->GetCore()); +} + +NativeWindowHandle +_WindowImpl::GetNativeHandle(void) const +{ + return GetCore().GetNativeHandle(); +} + +result +_WindowImpl::Destroy(void) +{ + result r = E_SUCCESS; + + SetDestroyingFlag(true); + + Control* pOwner = GetOwner(); + if (pOwner) + { + _ControlImpl* pImpl = _ControlImpl::GetInstance(*pOwner); + pImpl->GetCore().DetachOwnee(GetCore()); + } + RemoveAllChildren(true, true); + Window* pWindow = &GetPublic(); + delete pWindow; + pWindow = null; + + return r; +} + +void +_WindowImpl::Initialize(Window* pPublic, _Window* pCore, const Layout* pPublicPortraitLayout, const Layout* pPublicLandscapeLayout) +{ + SysAssert(pPublic); + SysAssert(pCore); + + // Creation + __pImplDelegate = new (std::nothrow) WindowImplDelegate(*this); + SysTryReturnVoidResult(NID_UI, __pImplDelegate, E_OUT_OF_MEMORY, _UiError::OUT_OF_MEMORY); + + __pPublicWindowEventListeners = CreatePublicEventListenerListN(); + result r = GetLastResult(); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pCore->SetWindowDelegate(*__pImplDelegate); + r = GetLastResult(); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return; + +CATCH: + delete __pPublicWindowEventListeners; + __pPublicWindowEventListeners = null; +} + +_WindowImpl::_WindowImpl(Window* pPublic, _Window* pCore, const Layout* pPublicPortraitLayout, const Layout* pPublicLandscapeLayout) + : _ContainerImpl(pPublic, pCore, pPublicPortraitLayout, pPublicLandscapeLayout) + , __pPublicWindowEventListeners(null) + , __pImplDelegate(null) +{ + Initialize(pPublic, pCore, pPublicPortraitLayout, pPublicLandscapeLayout); +} + +_WindowImpl::_WindowImpl(Window* pPublic, _Window* pCore, const Rectangle& bounds, const Layout* pPublicPortraitLayout, const Layout* pPublicLandscapeLayout, bool resizable, bool movable) + : _ContainerImpl(pPublic, pCore, pPublicPortraitLayout, pPublicLandscapeLayout) +{ + result r = E_SUCCESS; + + Initialize(pPublic, pCore, pPublicPortraitLayout, pPublicLandscapeLayout); + + r = GetLastResult(); + if (IsFailed(r)) + { + return; + } + + bool allOrNone = (pPublicPortraitLayout && pPublicLandscapeLayout) || (!pPublicPortraitLayout && !pPublicLandscapeLayout); + SysAssert(allOrNone); + + r = SetBounds(bounds); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + pCore->SetResizable(resizable); + pCore->SetMovable(movable); +} + +_WindowImpl::_WindowImpl(Window* pPublic, _Window* pCore, const FloatRectangle& bounds, const Layout* pPublicPortraitLayout, const Layout* pPublicLandscapeLayout, bool resizable, bool movable) + : _ContainerImpl(pPublic, pCore, pPublicPortraitLayout, pPublicLandscapeLayout) +{ + result r = E_SUCCESS; + + Initialize(pPublic, pCore, pPublicPortraitLayout, pPublicLandscapeLayout); + + r = GetLastResult(); + if (IsFailed(r)) + { + return; + } + + bool allOrNone = (pPublicPortraitLayout && pPublicLandscapeLayout) || (!pPublicPortraitLayout && !pPublicLandscapeLayout); + SysAssert(allOrNone); + + r = SetBounds(bounds); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + pCore->SetResizable(resizable); + pCore->SetMovable(movable); +} + +}} //Tizen::Ui diff --git a/src/ui/animations/FUiAnimAnimationBase.cpp b/src/ui/animations/FUiAnimAnimationBase.cpp new file mode 100644 index 0000000..c07b477 --- /dev/null +++ b/src/ui/animations/FUiAnimAnimationBase.cpp @@ -0,0 +1,334 @@ +// +// 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 FUiAnimAnimationBase.cpp + * @brief This file contains implementation of AnimationBase class + * + * This file contains implementation of AnimationBase class. + */ + + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "FUiAnim_AnimationBaseImpl.h" + + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; + + +namespace Tizen { namespace Ui { namespace Animations +{ + +AnimationBase::AnimationBase(void) + : _pAnimationBaseImpl(null) +{ +} + +AnimationBase::~AnimationBase(void) +{ + if (_pAnimationBaseImpl != null) + { + delete _pAnimationBaseImpl; + _pAnimationBaseImpl = null; + } +} + +AnimationBase::AnimationBase(const AnimationBase& animationBase) +{ + ClearLastResult(); + + result r = E_SUCCESS; + + _pAnimationBaseImpl = new (std::nothrow) _AnimationBaseImpl(); + SysTryReturnVoidResult(NID_UI_ANIM, (_pAnimationBaseImpl != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = _pAnimationBaseImpl->Construct(); + if (r != E_SUCCESS) + { + SysLogException(NID_UI_ANIM, r, "[%s] Failed to construct _AnimationBaseImpl instance.", GetErrorMessage(r)); + + delete _pAnimationBaseImpl; + _pAnimationBaseImpl = null; + + return; + } + + SetInterpolatorType(animationBase.GetInterpolatorType()); + SetBezierControlPoints(animationBase._pAnimationBaseImpl->controlPointTime1, + animationBase._pAnimationBaseImpl->controlPointValue1, + animationBase._pAnimationBaseImpl->controlPointTime2, + animationBase._pAnimationBaseImpl->controlPointValue2); + SetDuration(animationBase.GetDuration()); + SetDelay(animationBase.GetDelay()); + SetOffset(animationBase.GetOffset()); + SetRepeatCount(animationBase.GetRepeatCount()); + SetAutoReverseEnabled(animationBase.IsAutoReverseEnabled()); + SetScaleRatio(animationBase.GetScaleRatio()); + SetHoldEndEnabled(animationBase.IsHoldEndEnabled()); + SetName(animationBase.GetName()); +} + +AnimationBase::AnimationBase(long duration, AnimationInterpolatorType interpolator) + : _pAnimationBaseImpl(null) +{ + ClearLastResult(); + + SysTryReturnVoidResult(NID_UI_ANIM, (duration >= 0), E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. duration = %ld", duration); + SysTryReturnVoidResult(NID_UI_ANIM, (interpolator >= ANIMATION_INTERPOLATOR_LINEAR && interpolator <= ANIMATION_INTERPOLATOR_BEZIER), + E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. interpolator is invalid."); + + result r = E_SUCCESS; + + _pAnimationBaseImpl = new (std::nothrow) _AnimationBaseImpl(); + SysTryReturnVoidResult(NID_UI_ANIM, (_pAnimationBaseImpl != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = _pAnimationBaseImpl->Construct(); + if (r != E_SUCCESS) + { + SysLogException(NID_UI_ANIM, r, "[%s] Propagating.", GetErrorMessage(r)); + + delete _pAnimationBaseImpl; + _pAnimationBaseImpl = null; + + return; + } + + _pAnimationBaseImpl->duration = duration; + _pAnimationBaseImpl->interpolator = interpolator; +} + +AnimationBase& +AnimationBase::operator =(const AnimationBase& rhs) +{ + if ((&rhs) != this) + { + SetInterpolatorType(rhs.GetInterpolatorType()); + SetBezierControlPoints(rhs._pAnimationBaseImpl->controlPointTime1, rhs._pAnimationBaseImpl->controlPointValue1, + rhs._pAnimationBaseImpl->controlPointTime2, rhs._pAnimationBaseImpl->controlPointValue2); + SetDuration(rhs.GetDuration()); + SetDelay(rhs.GetDelay()); + SetOffset(rhs.GetOffset()); + SetRepeatCount(rhs.GetRepeatCount()); + SetAutoReverseEnabled(rhs.IsAutoReverseEnabled()); + SetScaleRatio(rhs.GetScaleRatio()); + SetHoldEndEnabled(rhs.IsHoldEndEnabled()); + SetName(rhs.GetName()); + } + + return *this; +} + +void +AnimationBase::SetInterpolatorType(AnimationInterpolatorType interpolator) +{ + _pAnimationBaseImpl->interpolator = interpolator; +} + +AnimationInterpolatorType +AnimationBase::GetInterpolatorType(void) const +{ + return _pAnimationBaseImpl->interpolator; +} + +result +AnimationBase::SetBezierControlPoints(float controlPointTime1, float controlPointValue1, float controlPointTime2, float controlPointValue2) +{ + SysTryReturnResult(NID_UI_ANIM, (controlPointTime1 >= 0.0f && controlPointTime1 <= 1.0f), E_INVALID_ARG, "Invalid argument(s) is used. controlPointTime1 = %f", controlPointTime1); + SysTryReturnResult(NID_UI_ANIM, (controlPointValue1 >= 0.0f && controlPointValue1 <= 1.0f), E_INVALID_ARG, "Invalid argument(s) is used. controlPointValue1 = %f", controlPointValue1); + SysTryReturnResult(NID_UI_ANIM, (controlPointTime2 >= 0.0f && controlPointTime2 <= 1.0f), E_INVALID_ARG, "Invalid argument(s) is used. controlPointTime2 = %f", controlPointTime2); + SysTryReturnResult(NID_UI_ANIM, (controlPointValue2 >= 0.0f && controlPointValue2 <= 1.0f), E_INVALID_ARG, "Invalid argument(s) is used. controlPointValue2 = %f", controlPointValue2); + + if (_pAnimationBaseImpl->interpolator != ANIMATION_INTERPOLATOR_BEZIER) + { + return E_INVALID_OPERATION; + } + + _pAnimationBaseImpl->controlPointTime1 = controlPointTime1; + _pAnimationBaseImpl->controlPointValue1 = controlPointValue1; + _pAnimationBaseImpl->controlPointTime2 = controlPointTime2; + _pAnimationBaseImpl->controlPointValue2 = controlPointValue2; + + return E_SUCCESS; +} + +result +AnimationBase::GetBezierControlPoints(float& controlPointTime1, float& controlPointValue1, float& controlPointTime2, float& controlPointValue2) const +{ + if (_pAnimationBaseImpl->interpolator != ANIMATION_INTERPOLATOR_BEZIER) + { + return E_INVALID_OPERATION; + } + + controlPointTime1 = _pAnimationBaseImpl->controlPointTime1; + controlPointValue1 = _pAnimationBaseImpl->controlPointValue1; + controlPointTime2 = _pAnimationBaseImpl->controlPointTime2; + controlPointValue2 = _pAnimationBaseImpl->controlPointValue2; + + return E_SUCCESS; +} + +int +AnimationBase::GetKeyFrameCount(void) const +{ + return _pAnimationBaseImpl->keyFrameList.GetCount(); +} + +void +AnimationBase::SetName(const String& name) +{ + _pAnimationBaseImpl->animName = name; + +} + +String +AnimationBase::GetName(void) const +{ + return _pAnimationBaseImpl->animName; +} + +result +AnimationBase::SetDuration(long milliSeconds) +{ + SysTryReturnResult(NID_UI_ANIM, (milliSeconds >= 0), E_INVALID_ARG, "Invalid argument(s) is used. milliSeconds = %ld", milliSeconds); + + _pAnimationBaseImpl->duration = milliSeconds; + + return E_SUCCESS; +} + +result +AnimationBase::SetOffset(long milliSeconds) +{ + SysTryReturnResult(NID_UI_ANIM, (milliSeconds >= 0 && milliSeconds <= _pAnimationBaseImpl->duration), E_INVALID_ARG, + "Invalid argument(s) is used. milliSeconds = %ld", milliSeconds); + + _pAnimationBaseImpl->offset = milliSeconds; + + return E_SUCCESS; +} + +result +AnimationBase::SetDelay(long milliSeconds) +{ + SysTryReturnResult(NID_UI_ANIM, (milliSeconds >= 0), E_INVALID_ARG, "Invalid argument(s) is used. milliSeconds = %ld", milliSeconds); + + _pAnimationBaseImpl->delay = milliSeconds; + + return E_SUCCESS; +} + +result +AnimationBase::SetRepeatCount(long count) +{ + SysTryReturnResult(NID_UI_ANIM, (count >= 1), E_INVALID_ARG, "Invalid argument(s) is used. count = %ld", count); + + _pAnimationBaseImpl->repeatCount = count; + + return E_SUCCESS; +} + +void +AnimationBase::SetAutoReverseEnabled(bool autoReverse) +{ + _pAnimationBaseImpl->autoReverse = autoReverse; +} + +result +AnimationBase::SetScaleRatio(float scaleRatio) +{ + SysTryReturnResult(NID_UI_ANIM, (scaleRatio >= 0), E_INVALID_ARG, "Invalid argument(s) is used. scaleRatio = %f", scaleRatio); + + _pAnimationBaseImpl->scaleRatio = scaleRatio; + return E_SUCCESS; +} + +void +AnimationBase::SetHoldEndEnabled(bool holdEnd) +{ + _pAnimationBaseImpl->holdEnd = holdEnd; +} + +long +AnimationBase::GetDuration(void) const +{ + return _pAnimationBaseImpl->duration; +} + +long +AnimationBase::GetOffset(void) const +{ + return _pAnimationBaseImpl->offset; +} + +long +AnimationBase::GetDelay(void) const +{ + return _pAnimationBaseImpl->delay; +} + +long +AnimationBase::GetRepeatCount(void) const +{ + return _pAnimationBaseImpl->repeatCount; +} + +bool +AnimationBase::IsAutoReverseEnabled(void) const +{ + return _pAnimationBaseImpl->autoReverse; +} + +float +AnimationBase::GetScaleRatio(void) const +{ + return _pAnimationBaseImpl->scaleRatio; +} + +bool +AnimationBase::IsHoldEndEnabled(void) const +{ + return _pAnimationBaseImpl->holdEnd; +} + +void +AnimationBase::AnimationBase_Reserved1(void) +{ +} + +void +AnimationBase::AnimationBase_Reserved2(void) +{ +} + +void +AnimationBase::AnimationBase_Reserved3(void) +{ +} + + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnimAnimationGroup.cpp b/src/ui/animations/FUiAnimAnimationGroup.cpp new file mode 100644 index 0000000..76c63c0 --- /dev/null +++ b/src/ui/animations/FUiAnimAnimationGroup.cpp @@ -0,0 +1,95 @@ +// +// 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 FUiAnimAnimationGroup.cpp + * @brief This file contains implementation of Animation Group class + * + * This file contains implementation of Animation Group class. + */ + + +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "FUiAnim_AnimationGroupImpl.h" + + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Ui; + + +namespace Tizen { namespace Ui { namespace Animations +{ + +AnimationGroup::AnimationGroup(void) + : _pAnimationGroupImpl(null) +{ + ClearLastResult(); + + result r = E_SUCCESS; + + _pAnimationGroupImpl = new (std::nothrow) _AnimationGroupImpl(this); + SysTryReturnVoidResult(NID_UI_ANIM, (_pAnimationGroupImpl != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = _pAnimationGroupImpl->Construct(); + if (r != E_SUCCESS) + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] Failed to construct _AnimationGroupImpl instance."); + delete _pAnimationGroupImpl; + _pAnimationGroupImpl = null; + } +} + +AnimationGroup::~AnimationGroup(void) +{ + delete _pAnimationGroupImpl; + _pAnimationGroupImpl = null; +} + +AnimationGroup::AnimationGroup(const AnimationGroup& animationGroup) +{ + ClearLastResult(); + + result r = E_SUCCESS; + + _pAnimationGroupImpl = new (std::nothrow) _AnimationGroupImpl(this); + SysTryReturnVoidResult(NID_UI_ANIM, (_pAnimationGroupImpl != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = _pAnimationGroupImpl->Construct(); + if (r != E_SUCCESS) + { + SysLogException(NID_UI_ANIM, r, "[%s] Failed to construct _AnimationGroupImpl instance.", GetErrorMessage(r)); + + delete _pAnimationGroupImpl; + _pAnimationGroupImpl = null; + } +} + +}}} // Tizen::Ui::Animations diff --git a/src/ui/animations/FUiAnimAnimationTransaction.cpp b/src/ui/animations/FUiAnimAnimationTransaction.cpp new file mode 100644 index 0000000..23a43c3 --- /dev/null +++ b/src/ui/animations/FUiAnimAnimationTransaction.cpp @@ -0,0 +1,447 @@ +// +// 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 FUiAnimAnimationTransaction.cpp + * @brief This file contains implementation of AnimationTransaction class + * + * This file contains implementation of AnimationTransaction class. + */ + +#include +#include + +#include + +#include "FUiAnim_TransactionNode.h" +#include "FUiAnim_AnimationManager.h" + + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Animations; + + +namespace Tizen { namespace Ui { namespace Animations +{ + +AnimationTransaction::~AnimationTransaction(void) +{ + +} + +result +AnimationTransaction::Begin(void) +{ + _AnimationManager* pAnimationManager = _AnimationManager::GetInstance(); + if (!pAnimationManager) + { + return E_SUCCESS; + } + + int transactionId = pAnimationManager->BeginTransaction(); + SysTryReturnResult(NID_UI_ANIM, (transactionId != -1), E_OUT_OF_MEMORY, "Propagating."); + + return E_SUCCESS; +} + +result +AnimationTransaction::Begin(int& transactionId) +{ + _AnimationManager* pAnimationManager = _AnimationManager::GetInstance(); + if (!pAnimationManager) + { + return E_SUCCESS; + } + + transactionId = pAnimationManager->BeginTransaction(); + SysTryReturnResult(NID_UI_ANIM, (transactionId != -1), E_OUT_OF_MEMORY, "Propagating."); + + return E_SUCCESS; +} + +result +AnimationTransaction::Commit(void) +{ + _AnimationManager* pAnimationManager = _AnimationManager::GetInstance(); + if (!pAnimationManager) + { + return E_SUCCESS; + } + + result r = pAnimationManager->CommitTransaction(); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), r, "Propagating."); + + return r; +} + +result +AnimationTransaction::Stop(int transactionId) +{ + SysTryReturnResult(NID_UI_ANIM, (transactionId > 0), E_INVALID_ARG, "Invalid argument(s) is used. transactionId = %d", transactionId); + + _AnimationManager* pAnimationManager = _AnimationManager::GetInstance(); + if (!pAnimationManager) + { + return E_SUCCESS; + } + + result r = pAnimationManager->StopTransaction(transactionId); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), r, "Propagating."); + + return r; +} + +result +AnimationTransaction::Discard(void) +{ + _AnimationManager* pAnimationManager = _AnimationManager::GetInstance(); + if (!pAnimationManager) + { + return E_SUCCESS; + } + + result r = pAnimationManager->DiscardTransaction(); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), r, "Propagating."); + + return r; +} + +AnimationTransactionStatus +AnimationTransaction::GetStatus(int transactionId) +{ + SysTryReturn(NID_UI_ANIM, (transactionId > 0), ANIMATION_TRANSACTION_STATUS_STOPPED, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. transactionId = %d.", transactionId); + + _AnimationManager* pAnimationManager = _AnimationManager::GetInstance(); + + if (pAnimationManager && pAnimationManager->IsTransactionRunning(transactionId)) + { + return ANIMATION_TRANSACTION_STATUS_PLAYING; + } + + return ANIMATION_TRANSACTION_STATUS_STOPPED; +} + +result +AnimationTransaction::SetTransactionEventListener(IAnimationTransactionEventListener* pListener) +{ + _AnimationManager* pAnimationManager = _AnimationManager::GetInstance(); + if (pAnimationManager) + { + pAnimationManager->_AnimationManager::GetInstance()->SetTransactionEventListener(pListener); + } + + return E_SUCCESS; +} + +result +AnimationTransaction::SetCurrentTransactionEventListener(IAnimationTransactionEventListener* pListener) +{ + _AnimationManager* pAnimationManager = _AnimationManager::GetInstance(); + if (!pAnimationManager) + { + return E_SUCCESS; + } + + _TransactionNode* pNode = pAnimationManager->GetCurrentTransaction(); + SysTryReturnResult(NID_UI_ANIM, (pNode != null), E_INVALID_OPERATION, "Transaction isn't opened."); + + result r = pNode->SetEventListener(pListener); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), r, "Propagating."); + + return r; +} + +result +AnimationTransaction::SetVisualElementImplicitAnimationEnabled(bool enable) +{ + _AnimationManager* pAnimationManager = _AnimationManager::GetInstance(); + if (!pAnimationManager) + { + return E_SUCCESS; + } + + _TransactionNode* pNode = pAnimationManager->GetCurrentTransaction(); + SysTryReturnResult(NID_UI_ANIM, (pNode != null), E_INVALID_OPERATION, "Transaction isn't opened."); + + result r = pNode->SetImplicitAnimationEnabled(enable); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), r, "Propagating."); + + return r; +} + +result +AnimationTransaction::SetVisualElementAnimationStatusEventListener(IVisualElementAnimationStatusEventListener* pListener) +{ + _AnimationManager* pAnimationManager = _AnimationManager::GetInstance(); + if (!pAnimationManager) + { + return E_SUCCESS; + } + + _TransactionNode* pNode = pAnimationManager->GetCurrentTransaction(); + SysTryReturnResult(NID_UI_ANIM, (pNode != null), E_INVALID_OPERATION, "Transaction isn't opened."); + + pNode->SetStatusEventListener(pListener); + + return E_SUCCESS; +} + +result +AnimationTransaction::SetVisualElementAnimationTimingFunction(const IVisualElementAnimationTimingFunction* pTimingFunction) +{ + _AnimationManager* pAnimationManager = _AnimationManager::GetInstance(); + if (!pAnimationManager) + { + return E_SUCCESS; + } + + _TransactionNode* pNode = pAnimationManager->GetCurrentTransaction(); + SysTryReturnResult(NID_UI_ANIM, (pNode != null), E_INVALID_OPERATION, "Transaction isn't opened."); + + pNode->SetTimingFunction(pTimingFunction); + + return E_SUCCESS; +} + +result +AnimationTransaction::SetVisualElementAnimationValueInterpolator(const IVisualElementAnimationValueInterpolator* pValueInterpolator) +{ + _AnimationManager* pAnimationManager = _AnimationManager::GetInstance(); + if (!pAnimationManager) + { + return E_SUCCESS; + } + + _TransactionNode* pNode = pAnimationManager->GetCurrentTransaction(); + SysTryReturnResult(NID_UI_ANIM, (pNode != null), E_INVALID_OPERATION, "Transaction isn't opened."); + + pNode->SetValueInterpolator(pValueInterpolator); + + return E_SUCCESS; +} + +result +AnimationTransaction::SetVisualElementAnimationDuration(long milliseconds) +{ + _AnimationManager* pAnimationManager = _AnimationManager::GetInstance(); + if (!pAnimationManager) + { + return E_SUCCESS; + } + + _TransactionNode* pNode = pAnimationManager->GetCurrentTransaction(); + SysTryReturnResult(NID_UI_ANIM, (pNode != null), E_INVALID_OPERATION, "Transaction isn't opened."); + SysTryReturnResult(NID_UI_ANIM, (milliseconds >= 0 && milliseconds >= pNode->GetOffset()), + E_INVALID_ARG, "Invalid argument(s) is used. milliseconds = %ld", milliseconds); + + pNode->SetDuration(milliseconds); + + return E_SUCCESS; +} + +long +AnimationTransaction::GetVisualElementAnimationDuration(void) +{ + _AnimationManager* pAnimationManager = _AnimationManager::GetInstance(); + if (!pAnimationManager) + { + return E_SUCCESS; + } + + _TransactionNode* pNode = pAnimationManager->GetCurrentTransaction(); + SysTryReturn(NID_UI_ANIM, (pNode != null), -1, E_INVALID_OPERATION, "[E_INVALID_OPERATION] Transaction isn't opened."); + + return pNode->GetDuration(); +} + +result +AnimationTransaction::SetVisualElementAnimationOffset(long milliseconds) +{ + _AnimationManager* pAnimationManager = _AnimationManager::GetInstance(); + if (!pAnimationManager) + { + return E_SUCCESS; + } + + _TransactionNode* pNode = pAnimationManager->GetCurrentTransaction(); + SysTryReturnResult(NID_UI_ANIM, (pNode != null), E_INVALID_OPERATION, "Transaction isn't opened."); + SysTryReturnResult(NID_UI_ANIM, (milliseconds >= 0 && milliseconds <= pNode->GetDuration()), + E_INVALID_ARG, "Invalid argument(s) is used. milliseconds = %ld", milliseconds); + + pNode->SetOffset(milliseconds); + + return E_SUCCESS; +} + +long +AnimationTransaction::GetVisualElementAnimationOffset(void) +{ + _AnimationManager* pAnimationManager = _AnimationManager::GetInstance(); + if (!pAnimationManager) + { + return -1; + } + + _TransactionNode* pNode = pAnimationManager->GetCurrentTransaction(); + SysTryReturn(NID_UI_ANIM, (pNode != null), -1, E_INVALID_OPERATION, "[E_INVALID_OPERATION] Transaction isn't opened."); + + return pNode->GetOffset(); +} + +result +AnimationTransaction::SetVisualElementAnimationDelay(long milliseconds) +{ + SysTryReturnResult(NID_UI_ANIM, (milliseconds >= 0), E_INVALID_ARG, "Invalid argument(s) is used. milliseconds = %ld", milliseconds); + + _AnimationManager* pAnimationManager = _AnimationManager::GetInstance(); + if (!pAnimationManager) + { + return E_SUCCESS; + } + + _TransactionNode* pNode = pAnimationManager->GetCurrentTransaction(); + SysTryReturnResult(NID_UI_ANIM, (pNode != null), E_INVALID_OPERATION, "Transaction isn't opened."); + + pNode->SetDelay(milliseconds); + + return E_SUCCESS; +} + +long +AnimationTransaction::GetVisualElementAnimationDelay(void) +{ + _AnimationManager* pAnimationManager = _AnimationManager::GetInstance(); + if (!pAnimationManager) + { + return -1; + } + + _TransactionNode* pNode = pAnimationManager->GetCurrentTransaction(); + SysTryReturn(NID_UI_ANIM, (pNode != null), -1, E_INVALID_OPERATION, "[E_INVALID_OPERATION] Transaction isn't opened."); + + return pNode->GetDelay(); +} + +result +AnimationTransaction::SetVisualElementAnimationRepeatCount(long count) +{ + SysTryReturnResult(NID_UI_ANIM, (count >= 0), E_INVALID_ARG, "Invalid argument(s) is used. count = %ld", count); + + _AnimationManager* pAnimationManager = _AnimationManager::GetInstance(); + if (!pAnimationManager) + { + return E_SUCCESS; + } + + _TransactionNode* pNode = pAnimationManager->GetCurrentTransaction(); + SysTryReturnResult(NID_UI_ANIM, (pNode != null), E_INVALID_OPERATION, "Transaction isn't opened."); + + pNode->SetRepeatCount(count); + + return E_SUCCESS; +} + +long +AnimationTransaction::GetVisualElementAnimationRepeatCount(void) +{ + _AnimationManager* pAnimationManager = _AnimationManager::GetInstance(); + if (!pAnimationManager) + { + return -1; + } + + _TransactionNode* pNode = pAnimationManager->GetCurrentTransaction(); + SysTryReturn(NID_UI_ANIM, (pNode != null), -1, E_INVALID_OPERATION, "[E_INVALID_OPERATION] Transaction isn't opened."); + + return pNode->GetRepeatCount(); +} + +result +AnimationTransaction::SetVisualElementAnimationAutoReverseEnabled(bool autoReverse) +{ + _AnimationManager* pAnimationManager = _AnimationManager::GetInstance(); + if (!pAnimationManager) + { + return E_SUCCESS; + } + + _TransactionNode* pNode = pAnimationManager->GetCurrentTransaction(); + SysTryReturnResult(NID_UI_ANIM, (pNode != null), E_INVALID_OPERATION, "Transaction isn't opened."); + + pNode->SetAutoReverseEnabled(autoReverse); + + return E_SUCCESS; +} + +bool +AnimationTransaction::IsVisualElementAnimationAutoReverseEnabled(void) +{ + _AnimationManager* pAnimationManager = _AnimationManager::GetInstance(); + if (!pAnimationManager) + { + return false; + } + + _TransactionNode* pNode = pAnimationManager->GetCurrentTransaction(); + SysTryReturn(NID_UI_ANIM, (pNode != null), false, E_INVALID_OPERATION, "[E_INVALID_OPERATION] Transaction isn't opened."); + + bool autoReverse = pNode->IsAutoReverseEnabled(); + + result r = GetLastResult(); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), r, "Propagating."); + + return autoReverse; +} + +result +AnimationTransaction::SetVisualElementAnimationScaleRatio(float scaleRatio) +{ + SysTryReturnResult(NID_UI_ANIM, (scaleRatio > 0.f), E_INVALID_ARG, "Invalid argument(s) is used. scaleRatio = %f", scaleRatio); + + _AnimationManager* pAnimationManager = _AnimationManager::GetInstance(); + if (!pAnimationManager) + { + return E_SUCCESS; + } + + _TransactionNode* pNode = pAnimationManager->GetCurrentTransaction(); + SysTryReturnResult(NID_UI_ANIM, (pNode != null), E_INVALID_OPERATION, "Transaction isn't opened."); + + pNode->SetScaleRatio(scaleRatio); + + return E_SUCCESS; +} + +float +AnimationTransaction::GetVisualElementAnimationScaleRatio(void) +{ + _AnimationManager* pAnimationManager = _AnimationManager::GetInstance(); + if (!pAnimationManager) + { + return 0.0f; + } + + _TransactionNode* pNode = pAnimationManager->GetCurrentTransaction(); + SysTryReturn(NID_UI_ANIM, (pNode != null), 0.0f, E_INVALID_OPERATION, "[E_INVALID_OPERATION] Transaction isn't opened."); + + return pNode->GetScaleRatio(); +} + +} } } // Tizen::Ui::Animations diff --git a/src/ui/animations/FUiAnimBezierTimingFunction.cpp b/src/ui/animations/FUiAnimBezierTimingFunction.cpp new file mode 100644 index 0000000..f3c7a70 --- /dev/null +++ b/src/ui/animations/FUiAnimBezierTimingFunction.cpp @@ -0,0 +1,219 @@ +// +// 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 FUiAnimBezierTimingFunction.cpp + * @brief This file contains implementation of BezierTimingFunction class + * + * This file contains implementation BezierTimingFunction class. + */ + +#include + +#include +#include + +#include + +#include "FUi_Math.h" + + +namespace Tizen { namespace Ui { namespace Animations +{ + +#define THIRD 0.33333333333333f +#define ROOTTHREE 1.73205080756888f + +float +CubeRoot(float x) +{ + if (x < 0.0f) + { + return -powf(-x, THIRD); + } + + return powf(x, THIRD); +} + + +BezierTimingFunction::BezierTimingFunction(void) + : __timeProgress1(0.0f) + , __progress1(0.0f) + , __timeProgress2(0.0f) + , __progress2(0.0f) + , __coefficientA(0.0f) + , __coefficientB(0.0f) + , __coefficientC(0.0f) +{ + SetControlPoints(0.33f, 0.8f, 0.66f, 0.2f); +} + +BezierTimingFunction::~BezierTimingFunction(void) +{ + +} + +result +BezierTimingFunction::SetControlPoints(float timeProgress1, float progress1, float timeProgress2, float progress2) +{ + SysTryReturnResult(NID_UI_ANIM, (timeProgress1 >= 0.f && timeProgress1 <= 1.0f), E_INVALID_ARG, "Invalid argument(s) is used. timeProgress1 is invalid."); + SysTryReturnResult(NID_UI_ANIM, (progress1 >= 0.f && progress1 <= 1.0f), E_INVALID_ARG, "Invalid argument(s) is used. progress1 is invalid."); + SysTryReturnResult(NID_UI_ANIM, (timeProgress2 >= 0.f && timeProgress2 <= 1.0f), E_INVALID_ARG, "Invalid argument(s) is used. timeProgress2 is invalid."); + SysTryReturnResult(NID_UI_ANIM, (progress2 >= 0.f && progress2 <= 1.0f), E_INVALID_ARG, "Invalid argument(s) is used. progress2 is invalid."); + + __timeProgress1 = timeProgress1; + __progress1 = progress1; + + __timeProgress2 = timeProgress2; + __progress2 = progress2; + + // Bezier curve + // + // B(t) = (1-t)^3 * P0 + 3t(1-t)^2*P1 + 3t^2(1-t)*P2 + t^3*P3 + // = (P3 - P0 + 3P1 - 3P2) * t^3 + (3P0 - 6P1 + 3P2) * t^2 + (3P1 - 3P0) * t + P0 + // + // Now, P0 = (0, 0), P3 = (1, 1) + // + // (1 + 3P1 - 3P2) * t^3 + (3P2 - 6P1) * t^2 + 3P1 * t - timeProgress = 0 + + // ax^3 + bx^2 + cx + d = 0 + + __coefficientA = 1.0f + 3.0f * __timeProgress1 - 3.0f * __timeProgress2; + __coefficientB = 3.0f * __timeProgress2 - 6.0f * __timeProgress1; + __coefficientC = 3.0f * __timeProgress1; + + return E_SUCCESS; +} + +result +BezierTimingFunction::GetControlPoints(float& timeProgress1, float& progress1, float& timeProgress2, float& progress2) const +{ + timeProgress1 = __timeProgress1; + progress1 = __progress1; + + timeProgress2 = __timeProgress2; + progress2 = __progress2; + + return E_SUCCESS; +} + +float +BezierTimingFunction::CalculateProgress(float timeProgress) const +{ + float t = 0.0f; + float d = -timeProgress; + + // 1. Cardano's method + // http://www.wolframalpha.com + // http://www.dreamincode.net/code/snippet2915.htm + + SysTryReturn(NID_UI_ANIM, (__coefficientA <-ALMOST_ZERO_FLOAT || __coefficientA> ALMOST_ZERO_FLOAT), 0.0f, E_INVALID_OPERATION, + "[E_INVALID_OPERATION] Invalid control points."); + + // find the discriminant + float f = (3.0f * __coefficientC / __coefficientA - __coefficientB * __coefficientB / (__coefficientA * __coefficientA)) / 3.0f; + float g = (2.0f * powf(__coefficientB, 3) / powf(__coefficientA, 3) - 9.0f * __coefficientB * __coefficientC / (__coefficientA * __coefficientA) + 27.0f * d / __coefficientA) / 27.0f; + float h = g * g / 4.0f + powf(f, 3) / 27.0f; + + // evaluate discriminat + if (f >= -ALMOST_ZERO_FLOAT && f <= ALMOST_ZERO_FLOAT && g >= -ALMOST_ZERO_FLOAT && g <= ALMOST_ZERO_FLOAT && h >= + -ALMOST_ZERO_FLOAT && h <= ALMOST_ZERO_FLOAT) + { + // 3 equal roots + // when f, g and h all equal 0 the roots can be found by the following line + t = -CubeRoot(d / __coefficientA); + } + else if (h <= 0.0f) + { + // 3 real roots + // complicated maths making use of the method + float i = powf(g * g / 4.0f - h, 0.5f); + float j = CubeRoot(i); + float k = acosf(-(g / (2.0f * i))); + float m = cosf(k / 3.0f); + float n = ROOTTHREE * sinf(k / 3.0f); + float p = -(__coefficientB / (3.0f * __coefficientA)); + + float t1 = 2.0f * j * m + p; + float t2 = -j * (m + n) + p; + float t3 = -j * (m - n) + p; + + // find the proper t + if (t1 >= 0.0f && t1 <= 1.0f) + { + t = t1; + } + else if (t2 >= 0.0f && t2 <= 1.0f) + { + t = t2; + } + else if (t3 >= 0.0f && t3 <= 1.0f) + { + t = t3; + } + else + { + SysLogException(NID_UI_ANIM, E_INVALID_OPERATION, "[E_INVALID_OPERATION] control points are invalid."); + return 0.0f; + } + } + else // if (h > 0.0f) + { + // 1 real root and 2 complex roots + // complicated maths making use of the method + float r = -(g / 2.0f) + powf(h, 0.5f); + float s = CubeRoot(r); + float u = -(g / 2.0f) - powf(h, 0.5f); + float v = CubeRoot(u); + float p = -(__coefficientB / (3.0f * __coefficientA)); + + t = s + v + p; + } + + // calculate progress from t + // progress = (1 + 3P1 - 3P2) * t^3 + (3P2 - 6P1) * t^2 + 3P1 * t + return (1.0f + 3.0f * __progress1 - 3.0f * __progress2) * t * t * t + (3.0f * __progress2 - 6.0f * __progress1) * t * t + 3.0f * __progress1 * t; + +#if 0 + // 2. Newton-Raphson's method + // + // f(x) = ax^3 + bx^2 + cx + d + // f'(x) = 3ax^2 + 2bx + c + // + // x_n+1 = x_n - f(x_n) / f'(x_n) + + float t = 0.5f; + float t1 = 0.5f; + int iteration = 0; + + do + { + t = t1; + t1 = t - (a * t * t * t + b * t * t + c * t + d) / (3.0f * a * t * t + 2.0f * b * t + c); + iteration++; + } + while ((t - t1 > ALMOST_ZERO_FLOAT || t - t1 < -ALMOST_ZERO_FLOAT) && iteration < 10); + + // calculate progress from t + // progress = (1 + 3P1 - 3P2) * t^3 + (3P2 - 6P1) * t^2 + 3P1 * t + return (1.0f + 3.0f * __y1 - 3.0f * __y2) * t1 * t1 * t1 + (3.0f * __y2 - 6.0f * __y1) * t1 * t1 + 3.0f * __y1 * t1; +#endif +} + + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnimControlAnimator.cpp b/src/ui/animations/FUiAnimControlAnimator.cpp new file mode 100644 index 0000000..2e62b60 --- /dev/null +++ b/src/ui/animations/FUiAnimControlAnimator.cpp @@ -0,0 +1,1255 @@ +// +// 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 FUiAnimControlAnimator.cpp + * @brief This file contains implementation of ControlAnimator class + * + * This file contains implementation of ControlAnimator class. + */ + +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "FUiAnim_ControlAnimatorImpl.h" + + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; + + +namespace Tizen { namespace Ui { namespace Animations +{ + +///INIT_SYSCLASSTYPE(ControlAnimator); + +ControlAnimator::ControlAnimator(void) + : _pControlAnimatorImpl(null) +{ + +} + +ControlAnimator::~ControlAnimator(void) +{ + delete _pControlAnimatorImpl; + _pControlAnimatorImpl = null; +} + +result +ControlAnimator::Construct(const Control& source) +{ + SysAssertf((_pControlAnimatorImpl == null), "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class."); + + result r = E_SUCCESS; + + _pControlAnimatorImpl = new (std::nothrow) _ControlAnimatorImpl(this); + SysTryReturnResult(NID_UI_ANIM, (_pControlAnimatorImpl), E_OUT_OF_MEMORY, "Memory allocation failed."); + + r = _pControlAnimatorImpl->Construct(source); + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to construct _ControlAnimatorImpl instance."); + + return r; + +CATCH: + delete _pControlAnimatorImpl; + _pControlAnimatorImpl = null; + + return r; + +} + +result +ControlAnimator::StartUserAnimation(AnimationTargetType animTarget, const AnimationBase& animationBase) +{ + SysTryReturnResult(NID_UI_ANIM, (animTarget > ANIMATION_TARGET_NONE && animTarget < ANIMATION_TARGET_MAX), E_INVALID_ARG, + "Invalid argument(s) is used. AnimationTargetType argument is invalid."); + + SysTryReturnResult(NID_UI_ANIM, !(_pControlAnimatorImpl->IsAnimationTargetAnimating(animTarget)), E_INVALID_OPERATION, + "Same AnimationTargetType is being animated."); + + result r = E_SUCCESS; + int activeAnimationCount = _pControlAnimatorImpl->GetActiveAnimationListCount(); + + AnimationBase* pAnimBase = const_cast< AnimationBase* >(&animationBase); + SysTryReturnResult(NID_UI_ANIM, (pAnimBase != null), E_INVALID_ARG, "Invalid argument(s) is used. AnimationBase argument is invalid."); + + Rectangle rect(0, 0, 0, 0); + + SysTryReturnResult(NID_UI_ANIM, (_pControlAnimatorImpl->IsAnimatable(animTarget, rect, pAnimBase)), E_INVALID_ARG, + "Invalid argument(s) is used. AnimationBase argument is invalid."); + + if (_pControlAnimatorImpl->IsAnimationSupported() == false) + { + r = _pControlAnimatorImpl->SetControlProperty(animTarget, *pAnimBase); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to set control property."); + + return E_SUCCESS; + } + + AnimationBase* pAnimationBase = null; + pAnimationBase = _pControlAnimatorImpl->CloneAnimation(animTarget, *pAnimBase); + SysTryReturnResult(NID_UI_ANIM, (pAnimationBase), E_SYSTEM, "A system error has been occurred. Failed to clone animation."); + + if (animTarget == ANIMATION_TARGET_POSITION || animTarget == ANIMATION_TARGET_SIZE) + { + _pControlAnimatorImpl->SetLogicalBounds(_pControlAnimatorImpl->GetControl().GetBounds()); + } + else if (animTarget == ANIMATION_TARGET_ALPHA) + { + _pControlAnimatorImpl->SetShowState(_pControlAnimatorImpl->GetControl().GetShowState()); + } + + if (animTarget == ANIMATION_TARGET_POSITION || animTarget == ANIMATION_TARGET_SIZE) + { + _pControlAnimatorImpl->SetControlLogicalBounds(animTarget, *pAnimationBase); + + bool disable = false; + bool propagation = false; + + result r = _pControlAnimatorImpl->DisableImplicitAnimation(disable); + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to disable implicit animation."); + + r = _pControlAnimatorImpl->DisableVisualElementPropagation(propagation); + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to disable visual element propagation."); + + r = _pControlAnimatorImpl->GetControl().SetBounds(_pControlAnimatorImpl->GetLogicalBounds()); + + if (propagation) + { + _pControlAnimatorImpl->DisableVisualElementPropagation(propagation); + } + if (disable) + { + _pControlAnimatorImpl->DisableImplicitAnimation(disable); + } + + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to set bounds."); + + } + else if (animTarget == ANIMATION_TARGET_ALPHA) + { + _pControlAnimatorImpl->SetControlShowState(animTarget, *pAnimationBase); + + bool disable = false; + bool propagation = false; + + result r = _pControlAnimatorImpl->DisableImplicitAnimation(disable); + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to enable/disable implicit animation."); + + r = _pControlAnimatorImpl->DisableVisualElementPropagation(propagation); + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to enable/disable visual element propagation."); + + r = _pControlAnimatorImpl->GetControl().SetShowState((_pControlAnimatorImpl->GetShowState())); + if (propagation) + { + _pControlAnimatorImpl->DisableVisualElementPropagation(propagation); + } + if (disable) + { + _pControlAnimatorImpl->DisableImplicitAnimation(disable); + } + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to set show state."); + } + + //Create and play the Animation + r = _pControlAnimatorImpl->SetAnimation(animTarget, *pAnimationBase); + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlAnimatorImpl->SetAnimationTargetAnimating(animTarget, true); + + return r; + +CATCH: + if (_pControlAnimatorImpl->DestroyAnimation(activeAnimationCount) != E_SUCCESS) + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to destroy animation."); + return E_SYSTEM; + } + return r; +} + +result +ControlAnimator::StartUserAnimation(const AnimationGroup& animGroup) +{ + result r = E_SUCCESS; + bool isAnimating = false; + + ParallelAnimationGroup* pParallelAnimGrp = null; + SequentialAnimationGroup* pSequentialAnimGrp = null; + + pParallelAnimGrp = dynamic_cast< ParallelAnimationGroup* >(const_cast< AnimationGroup* >(&animGroup)); + pSequentialAnimGrp = dynamic_cast< SequentialAnimationGroup* >(const_cast< AnimationGroup* >(&animGroup)); + SysTryReturnResult(NID_UI_ANIM, ((pParallelAnimGrp) || (pSequentialAnimGrp)), E_INVALID_ARG, "Invalid argument(s) is used. AnimationGroup argument is invalid."); + + if (pParallelAnimGrp) + { + SysTryReturnResult(NID_UI_ANIM, (pParallelAnimGrp->GetAnimationCount() > 0), E_INVALID_ARG, "Invalid argument(s) is used. No animation found in AnimationGroup."); + + for (int animType = (static_cast< int >(ANIMATION_TARGET_NONE) + 1); animType < (static_cast< int >(ANIMATION_TARGET_MAX)); animType++) + { + AnimationTargetType animTarget = static_cast< AnimationTargetType >(animType); + AnimationBase* pAnimationBase = null; + pAnimationBase = pParallelAnimGrp->GetAnimationN(animTarget); + if (pAnimationBase != null) + { + isAnimating = _pControlAnimatorImpl->IsAnimationTargetAnimating(animTarget); + + Rectangle rect(0, 0, 0, 0); + + bool animatable = _pControlAnimatorImpl->IsAnimatable(animTarget, rect, pAnimationBase); + + delete pAnimationBase; + + SysTryReturnResult(NID_UI_ANIM, (animatable), E_INVALID_ARG, "Invalid argument(s) is used. AnimationGroup argument is invalid."); + //The below check was removed for 2.0 + SysTryReturnResult(NID_UI_ANIM, !(isAnimating), E_INVALID_OPERATION, "Same AnimationTargetType is being animated."); + } + } + + r = _pControlAnimatorImpl->SetGroupAnimation(pParallelAnimGrp); + } + else //if (pSequentialAnimGrp) + { + SysTryReturnResult(NID_UI_ANIM, (pSequentialAnimGrp->GetAnimationCount() > 0), E_INVALID_ARG, "Invalid argument(s) is used. No animation found in AnimationGroup."); + + for (int index = 0; index < pSequentialAnimGrp->GetAnimationCount(); index++) + { + AnimationTargetType animTarget = ANIMATION_TARGET_MAX; + AnimationBase* pAnimationBase = null; + pAnimationBase = pSequentialAnimGrp->GetAnimationAtN(index); + animTarget = pSequentialAnimGrp->GetAnimationTargetTypeAt(index); + + if (pAnimationBase != null) + { + isAnimating = _pControlAnimatorImpl->IsAnimationTargetAnimating(animTarget); + + Rectangle rect(0, 0, 0, 0); + + bool animatable = _pControlAnimatorImpl->IsAnimatable(animTarget, rect, pAnimationBase); + + delete pAnimationBase; + + SysTryReturnResult(NID_UI_ANIM, (animatable), E_INVALID_ARG, "Invalid argument(s) is used. AnimationGroup argument is invalid."); + //The below check should be removed for 2.0 + SysTryReturnResult(NID_UI_ANIM, !(isAnimating), E_INVALID_OPERATION, "Same AnimationTargetType is being animated."); + } + else + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. An animation in sequential group is null."); + return E_SYSTEM; + } + } + + r = _pControlAnimatorImpl->SetGroupAnimation(pSequentialAnimGrp); + } + + return r; +} + +result +ControlAnimator::StopAllAnimations(void) +{ + SysTryReturnResult(NID_UI_ANIM, (_pControlAnimatorImpl->GetActiveAnimationListCount() > 0), E_SUCCESS, "No Active Animation."); + + return _pControlAnimatorImpl->StopAllAnimations(); +} + +result +ControlAnimator::StopAnimation(ControlAnimatorTriggerType animTrigger) +{ + SysTryReturnResult(NID_UI_ANIM, (_pControlAnimatorImpl), E_SYSTEM, "A system error has been occurred. Control animator is not constructed properly."); + SysTryReturnResult(NID_UI_ANIM, (animTrigger >= ANIMATION_TRIGGER_USER && animTrigger <= ANIMATION_TRIGGER_SHOW_STATE_CHANGE), + E_INVALID_ARG, "Invalid argument(s) is used. ControlAnimatorTriggerType argument is invalid."); + + return _pControlAnimatorImpl->StopAnimation(animTrigger); +} + +AnimatorStatus +ControlAnimator::GetStatus(void) const +{ + if (_pControlAnimatorImpl->IsAnimationSupported()) + { + _pControlAnimatorImpl->SetAnimatorStatus(ANIMATOR_STATUS_STOPPED); + + for (int animType = ((int) ANIMATION_TARGET_NONE + 1); animType < ((int) ANIMATION_TARGET_MAX); animType++) + { + if (_pControlAnimatorImpl->IsAnimationTargetAnimating(animType) == true) + { + _pControlAnimatorImpl->SetAnimatorStatus(ANIMATOR_STATUS_PLAYING); + break; + } + } + return _pControlAnimatorImpl->GetAnimatorStatus(); + } + else + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Animation support is unavailable."); + return ANIMATOR_STATUS_STOPPED; + } +} + +AnimatorStatus +ControlAnimator::GetStatus(AnimationTargetType animTarget) const +{ + SysTryReturn(NID_UI_ANIM, (animTarget > ANIMATION_TARGET_NONE && animTarget < ANIMATION_TARGET_MAX), ANIMATOR_STATUS_STOPPED, E_INVALID_ARG, + "Invalid argument(s) is used. AnimationTargetType argument is invalid."); + + if (_pControlAnimatorImpl->IsAnimationSupported()) + { + if (_pControlAnimatorImpl->IsAnimationTargetAnimating(animTarget) == true) + { + return ANIMATOR_STATUS_PLAYING; + } + + return ANIMATOR_STATUS_STOPPED; + } + else + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Animation support is unavailable."); + return ANIMATOR_STATUS_STOPPED; + } +} + +result +ControlAnimator::AddControlAnimatorEventListener(IControlAnimatorEventListener& listener) +{ + SysTryReturnResult(NID_UI_ANIM, _pControlAnimatorImpl->IsAnimationSupported(), E_UNSUPPORTED_OPERATION, "Animation is unsupported."); + + return _pControlAnimatorImpl->AddControlAnimatorEventListener(listener); +} + +result +ControlAnimator::RemoveControlAnimatorEventListener(IControlAnimatorEventListener& listener) +{ + SysTryReturnResult(NID_UI_ANIM, (_pControlAnimatorImpl->IsAnimationSupported()), E_UNSUPPORTED_OPERATION, "Animation is unsupported."); + + return _pControlAnimatorImpl->RemoveControlAnimatorEventListener(listener); +} + +result +ControlAnimator::AddControlAnimatorDetailedEventListener(IControlAnimatorDetailedEventListener& listener) +{ + SysTryReturnResult(NID_UI_ANIM, (_pControlAnimatorImpl->IsAnimationSupported()), E_UNSUPPORTED_OPERATION, "Animation is unsupported."); + + return _pControlAnimatorImpl->AddControlAnimatorDetailedEventListener(listener); +} + +result +ControlAnimator::RemoveControlAnimatorDetailedEventListener(IControlAnimatorDetailedEventListener& listener) +{ + SysTryReturnResult(NID_UI_ANIM, (_pControlAnimatorImpl->IsAnimationSupported()), E_UNSUPPORTED_OPERATION, "Animation is unsupported."); + + return _pControlAnimatorImpl->RemoveControlAnimatorDetailedEventListener(listener); +} + +result +ControlAnimator::SetAnimation(ControlAnimatorTriggerType animTrigger, const AnimationGroup* pAnimationGroup) +{ + SysTryReturnResult(NID_UI_ANIM, ((animTrigger >= ANIMATION_TRIGGER_POSITION_CHANGE) && (animTrigger <= ANIMATION_TRIGGER_SHOW_STATE_CHANGE)), + E_INVALID_ARG, "Invalid argument(s) is used. ControlAnimatorTriggerType argument is invalid."); + + if (pAnimationGroup == null) + { + SysTryReturnResult(NID_UI_ANIM, (_pControlAnimatorImpl->GetStoredPropertyAnimationGroupType(animTrigger - 1) != + PROPERTY_ANIMATION_GROUP_TYPE_NONE), E_SUCCESS, "No custom implicit animation is set yet."); + SysTryReturnResult(NID_UI_ANIM, (_pControlAnimatorImpl->GetPropertyGroupList(animTrigger - 1)), E_SUCCESS, + "No custom implicit animation is set yet against this ControlAnimatorTriggerType."); + + _pControlAnimatorImpl->GetPropertyGroupList(animTrigger - 1)->RemoveAllAnimations(); + + delete _pControlAnimatorImpl->GetPropertyGroupList(animTrigger - 1); + _pControlAnimatorImpl->SetPropertyGroupList(animTrigger - 1, null); + _pControlAnimatorImpl->SetStoredPropertyAnimationGroupType(animTrigger - 1, PROPERTY_ANIMATION_GROUP_TYPE_NONE); + + return E_SUCCESS; + } + + SequentialAnimationGroup* pSequentialAnimGrp = null; + ParallelAnimationGroup* pParallelAnimGrp = null; + AnimationTargetType associatedAnimTarget = ANIMATION_TARGET_NONE; + + pSequentialAnimGrp = dynamic_cast< SequentialAnimationGroup* >(const_cast< AnimationGroup* >(pAnimationGroup)); + pParallelAnimGrp = dynamic_cast< ParallelAnimationGroup* >(const_cast< AnimationGroup* >(pAnimationGroup)); + SysTryReturnResult(NID_UI_ANIM, ((pSequentialAnimGrp) || (pParallelAnimGrp)), E_INVALID_ARG, "Invalid argument(s) is used. AnimationGroup argument is invalid."); + SysTryReturnResult(NID_UI_ANIM, (pAnimationGroup->GetAnimationCount() > 0), E_INVALID_ARG, "Invalid argument(s) is used. No animations added to AnimationGroup."); + + if (animTrigger == ANIMATION_TRIGGER_POSITION_CHANGE) + { + associatedAnimTarget = ANIMATION_TARGET_POSITION; + } + else if (animTrigger == ANIMATION_TRIGGER_SIZE_CHANGE) + { + associatedAnimTarget = ANIMATION_TARGET_SIZE; + } + else if (animTrigger == ANIMATION_TRIGGER_SHOW_STATE_CHANGE) + { + associatedAnimTarget = ANIMATION_TARGET_ALPHA; + } + + if (pSequentialAnimGrp) + { + int targetCount = 0; + for (int index = 0; index < pSequentialAnimGrp->GetAnimationCount(); index++) + { + AnimationTargetType animTarget = ANIMATION_TARGET_NONE; + animTarget = pSequentialAnimGrp->GetAnimationTargetTypeAt(index); + SysTryReturnResult(NID_UI_ANIM, ((animTarget > ANIMATION_TARGET_NONE) && (animTarget < ANIMATION_TARGET_MAX)), E_INVALID_ARG, + "Invalid argument(s) is used. AnimationTargetType argument is invalid."); + + if (associatedAnimTarget == animTarget) + { + targetCount++; + } + } + SysTryReturnResult(NID_UI_ANIM, (targetCount >= 1), E_INVALID_ARG, + "Invalid argument(s) is used. AnimationGroup should have at-least one animation of equivalent AnimationTargetType."); + + //Check for IsAnimatable() of all AnimationBase objects + for (int index = 0; index < pSequentialAnimGrp->GetAnimationCount(); index++) + { + AnimationTargetType animTarget = ANIMATION_TARGET_NONE; + AnimationBase* pAnimationBase = null; + pAnimationBase = pSequentialAnimGrp->GetAnimationAtN(index); + animTarget = pSequentialAnimGrp->GetAnimationTargetTypeAt(index); + + bool animatable = false; + if (pAnimationBase) + { + if (associatedAnimTarget != animTarget) + { + Rectangle rect(0, 0, 0, 0); + + animatable = _pControlAnimatorImpl->IsAnimatable(animTarget, rect, pAnimationBase); + } + + delete pAnimationBase; + + if ((associatedAnimTarget != animTarget) && (!animatable)) + { + SysLogException(NID_UI_ANIM, E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] Control is not animable. Animations cannot be set to control."); + return E_UNSUPPORTED_OPERATION; + } + } + else + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. An animation in sequential group animation is null."); + return E_SYSTEM; + } + } + + SequentialAnimationGroup* pSequentialAnimationGroup = null; + pSequentialAnimationGroup = new (std::nothrow) SequentialAnimationGroup(*pSequentialAnimGrp); + SysTryReturnResult(NID_UI_ANIM, (pSequentialAnimationGroup), E_OUT_OF_MEMORY, "Memory allocation failed."); + + if (pSequentialAnimationGroup->GetAnimationCount() != pSequentialAnimGrp->GetAnimationCount()) + { + if (pSequentialAnimationGroup->GetAnimationCount() > 0) + { + pSequentialAnimationGroup->RemoveAllAnimations(); + } + + delete pSequentialAnimationGroup; + + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to clone sequential group animation."); + return E_SYSTEM; + } + + if (_pControlAnimatorImpl->GetPropertyGroupList(animTrigger - 1)) + { + _pControlAnimatorImpl->GetPropertyGroupList(animTrigger - 1)->RemoveAllAnimations(); + delete _pControlAnimatorImpl->GetPropertyGroupList(animTrigger - 1); + _pControlAnimatorImpl->SetPropertyGroupList(animTrigger - 1, null); + _pControlAnimatorImpl->SetStoredPropertyAnimationGroupType(animTrigger - 1, PROPERTY_ANIMATION_GROUP_TYPE_NONE); + } + _pControlAnimatorImpl->SetPropertyGroupList(animTrigger - 1, pSequentialAnimationGroup); + _pControlAnimatorImpl->SetStoredPropertyAnimationGroupType(animTrigger - 1, PROPERTY_ANIMATION_GROUP_TYPE_SEQUENTIAL); + + return E_SUCCESS; + } + else //if (pParallelAnimGrp) + { + bool isPresent = false; + + if (animTrigger == ANIMATION_TRIGGER_POSITION_CHANGE) + { + isPresent = pParallelAnimGrp->IsAnimationAdded(ANIMATION_TARGET_POSITION); + } + else if (animTrigger == ANIMATION_TRIGGER_SIZE_CHANGE) + { + isPresent = pParallelAnimGrp->IsAnimationAdded(ANIMATION_TARGET_SIZE); + } + else if (animTrigger == ANIMATION_TRIGGER_SHOW_STATE_CHANGE) + { + isPresent = pParallelAnimGrp->IsAnimationAdded(ANIMATION_TARGET_ALPHA); + } + + SysTryReturnResult(NID_UI_ANIM, (isPresent), E_INVALID_ARG, + "Invalid argument(s) is used. AnimationGroup should have one animation of equivalent AnimationTargetType."); + + //Check for IsAnimatable() of all AnimationBase objects + for (int animType = ((int) ANIMATION_TARGET_NONE + 1); animType < ((int) ANIMATION_TARGET_MAX); animType++) + { + AnimationTargetType animTarget = static_cast< AnimationTargetType >(animType); + if (pParallelAnimGrp->IsAnimationAdded(animTarget) == false) + { + continue; + } + AnimationBase* pAnimationBase = null; + bool animatable = false; + + pAnimationBase = pParallelAnimGrp->GetAnimationN(animTarget); + if (pAnimationBase) + { + if (associatedAnimTarget != animTarget) + { + Rectangle rect(0, 0, 0, 0); + + animatable = _pControlAnimatorImpl->IsAnimatable(animTarget, rect, pAnimationBase); + } + + delete pAnimationBase; + + SysTryReturnResult(NID_UI_ANIM, !((associatedAnimTarget != animTarget) && (!animatable)), E_UNSUPPORTED_OPERATION, + "Animations cannot be set to control."); + + } + else + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. An animation in parallel group animation is null."); + return E_SYSTEM; + } + } + + ParallelAnimationGroup* pParallelAnimationGroup = null; + pParallelAnimationGroup = new (std::nothrow) ParallelAnimationGroup(*pParallelAnimGrp); + SysTryReturnResult(NID_UI_ANIM, (pParallelAnimationGroup), E_OUT_OF_MEMORY, "Memory allocation failed."); + + if (pParallelAnimationGroup->GetAnimationCount() != pParallelAnimGrp->GetAnimationCount()) + { + if (pParallelAnimationGroup->GetAnimationCount() > 0) + { + pParallelAnimationGroup->RemoveAllAnimations(); + } + + delete pParallelAnimationGroup; + + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to clone ParallelAnimationGroup instance."); + return E_SYSTEM; + } + + if (_pControlAnimatorImpl->GetPropertyGroupList(animTrigger - 1)) + { + _pControlAnimatorImpl->GetPropertyGroupList(animTrigger - 1)->RemoveAllAnimations(); + delete _pControlAnimatorImpl->GetPropertyGroupList(animTrigger - 1); + _pControlAnimatorImpl->SetPropertyGroupList(animTrigger - 1, null); + _pControlAnimatorImpl->SetStoredPropertyAnimationGroupType(animTrigger - 1, PROPERTY_ANIMATION_GROUP_TYPE_NONE); + } + _pControlAnimatorImpl->SetPropertyGroupList(animTrigger - 1, pParallelAnimationGroup); + _pControlAnimatorImpl->SetStoredPropertyAnimationGroupType(animTrigger - 1, PROPERTY_ANIMATION_GROUP_TYPE_PARALLEL); + + return E_SUCCESS; + } +} + +AnimationGroup* +ControlAnimator::GetAnimationN(ControlAnimatorTriggerType animTrigger) const +{ + SysTryReturn(NID_UI_ANIM, ((animTrigger >= ANIMATION_TRIGGER_POSITION_CHANGE) && (animTrigger <= ANIMATION_TRIGGER_SHOW_STATE_CHANGE)), + null, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. animTrigger is invalid."); + SysTryReturn(NID_UI_ANIM, (_pControlAnimatorImpl->GetStoredPropertyAnimationGroupType(animTrigger - 1) != PROPERTY_ANIMATION_GROUP_TYPE_NONE), + null, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. No implicit animations set to control."); + + if (_pControlAnimatorImpl->GetStoredPropertyAnimationGroupType(animTrigger - 1) == PROPERTY_ANIMATION_GROUP_TYPE_PARALLEL) + { + ParallelAnimationGroup* pTempParallelAnimGroup = dynamic_cast< ParallelAnimationGroup* >(_pControlAnimatorImpl->GetPropertyGroupList(animTrigger - 1)); + SysTryReturn(NID_UI_ANIM, (pTempParallelAnimGroup), null, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to get ParallelAnimationGroup instance."); + + ParallelAnimationGroup* pParallelAnimationGroup = new (std::nothrow) ParallelAnimationGroup(*pTempParallelAnimGroup); + SysTryReturn(NID_UI_ANIM, (pParallelAnimationGroup), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI_ANIM, (pParallelAnimationGroup->GetAnimationCount() > 0), null, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to create ParallelAnimationGroup."); + + return pParallelAnimationGroup; + } + else if (_pControlAnimatorImpl->GetStoredPropertyAnimationGroupType(animTrigger - 1) == PROPERTY_ANIMATION_GROUP_TYPE_SEQUENTIAL) + { + SequentialAnimationGroup* pTempSequentialAnimGroup = dynamic_cast< SequentialAnimationGroup* >(_pControlAnimatorImpl->GetPropertyGroupList(animTrigger - 1)); + SysTryReturn(NID_UI_ANIM, (pTempSequentialAnimGroup), null, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to clone SequentialAnimationGroup."); + + SequentialAnimationGroup* pSequentialAnimationGroup = new (std::nothrow) SequentialAnimationGroup(*pTempSequentialAnimGroup); + SysTryReturn(NID_UI_ANIM, (pSequentialAnimationGroup), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI_ANIM, (pSequentialAnimationGroup->GetAnimationCount() > 0), null, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to create SequentialAnimationGroup instance."); + + return pSequentialAnimationGroup; + } + else + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Invalid property animation group type provided."); + return null; + } +} + +result +ControlAnimator::SetPosition(int x, int y) +{ + SysTryReturnResult(NID_UI_ANIM, (_pControlAnimatorImpl->IsAnimationTargetAnimating(ANIMATION_TARGET_POSITION) == false), E_INVALID_OPERATION, "Same AnimationTargetType is already being animated."); + + result r = E_SUCCESS; + + Control& controlRef = _pControlAnimatorImpl->GetControl(); + Rectangle controlBounds = controlRef.GetBounds(); + Point newPosition = Point(x, y); + Point currentPosition = controlRef.GetPosition(); + + SysTryReturnResult(NID_UI_ANIM, (controlRef.IsMovable()), E_UNSUPPORTED_OPERATION, "Bounds cannot be modified."); + + //CustomControl s Condition check + CustomControlBase* pControlBase = dynamic_cast< CustomControlBase* >(&controlRef); + + if (pControlBase) + { + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(_pControlAnimatorImpl->GetControl()); + pControlImpl->OnBoundsChanging(Rectangle(x, y, controlRef.GetWidth(), controlRef.GetHeight())); + } + + int activeAnimationCount = _pControlAnimatorImpl->GetActiveAnimationListCount(); + AnimationBase* pAnimationBase = null; + + if (_pControlAnimatorImpl->GetStoredPropertyAnimationGroupType(ANIMATION_TRIGGER_POSITION_CHANGE - 1) == PROPERTY_ANIMATION_GROUP_TYPE_NONE) + { + if (currentPosition == newPosition) + { + return E_SUCCESS; + } + + PointAnimation* pPointAnim = new (std::nothrow) PointAnimation(currentPosition, newPosition, 400, ANIMATION_INTERPOLATOR_LINEAR); + SysTryReturnResult(NID_UI_ANIM, (pPointAnim), E_OUT_OF_MEMORY, "Memory allocation failed."); + + pAnimationBase = pPointAnim; + + Rectangle rect(x, y, 0, 0); + + if (!(_pControlAnimatorImpl->IsAnimatable(ANIMATION_TARGET_POSITION, rect, pAnimationBase, ANIMATION_TRIGGER_POSITION_CHANGE))) + { + delete pAnimationBase; + + SysLogException(NID_UI_ANIM, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. Animation type or position is invalid."); + return E_INVALID_ARG; + } + if (_pControlAnimatorImpl->IsAnimationSupported() == false) + { + r = _pControlAnimatorImpl->SetControlProperty(ANIMATION_TARGET_POSITION, *pAnimationBase); + if (r != E_SUCCESS) + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to set control property."); + r = E_SYSTEM; + } + + delete pAnimationBase; + + return r; + } + else + { + _pControlAnimatorImpl->SetLogicalBounds(controlRef.GetBounds()); + _pControlAnimatorImpl->SetControlLogicalBounds(ANIMATION_TARGET_POSITION, *pAnimationBase); + + bool disable = false; + bool propagation = false; + + result r = _pControlAnimatorImpl->DisableImplicitAnimation(disable); + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to disable/enable implicit animation."); + + r = _pControlAnimatorImpl->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 = controlRef.SetBounds(_pControlAnimatorImpl->GetLogicalBounds()); + + if (propagation) + { + _pControlAnimatorImpl->DisableVisualElementPropagation(propagation); + } + if (disable) + { + _pControlAnimatorImpl->DisableImplicitAnimation(disable); + } + + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to set bounds."); + r = _pControlAnimatorImpl->SetAnimation(ANIMATION_TARGET_POSITION, *pAnimationBase, ANIMATION_TRIGGER_POSITION_CHANGE); + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + } + else + { + Rectangle logicalBounds(x, y, controlBounds.width, controlBounds.height); + + _pControlAnimatorImpl->SetLogicalBounds(logicalBounds); + + //Need to call control bounds inside StartCustomImplicitAnimation + r = _pControlAnimatorImpl->StartCustomImplicitAnimation(ANIMATION_TRIGGER_POSITION_CHANGE, x, y, controlBounds.width, + controlBounds.height, + false); + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to set logical bounds."); + } + + //When Control's property is set with End Bounds in Custom Implicit animation params, it should return from here without animation + if (_pControlAnimatorImpl->IsAnimationSupported() == false) + { + return E_SUCCESS; + } + + _pControlAnimatorImpl->SetAnimationTargetStatus(ANIMATION_TRIGGER_POSITION_CHANGE); + + return r; + +CATCH: + if (pAnimationBase) + { + if (_pControlAnimatorImpl->DestroyAnimation(*pAnimationBase, ANIMATION_TARGET_POSITION) == E_SUCCESS) + { + pAnimationBase = null; + } + else + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to destroy animation."); + r = E_SYSTEM; + } + } + + SysTryReturnResult(NID_UI_ANIM, (_pControlAnimatorImpl->DestroyAnimation(activeAnimationCount) == E_SUCCESS), + E_SYSTEM, "A system error has been occurred. Failed to destroy animation."); + + return r; +} + +result +ControlAnimator::SetPosition(const Point& Position) +{ + return SetPosition(Position.x, Position.y); +} + +result +ControlAnimator::SetSize(int width, int height) +{ + SysTryReturnResult(NID_UI_ANIM, (_pControlAnimatorImpl->IsAnimationTargetAnimating(ANIMATION_TARGET_SIZE) == false), E_INVALID_OPERATION, "Same AnimationTargetType is being animated."); + SysTryReturnResult(NID_UI_ANIM, ((width > 0) && (height > 0)), E_INVALID_ARG, "Invalid argument(s) is used. width = %d, height = %d", width, height); + + result r = E_SUCCESS; + Control& controlRef = _pControlAnimatorImpl->GetControl(); + Rectangle controlBounds = controlRef.GetBounds(); + Dimension newSize = Dimension(width, height); + Dimension currentSize = controlRef.GetSize(); + + SysTryReturnResult(NID_UI_ANIM, (controlRef.IsResizable()), E_UNSUPPORTED_OPERATION, "Bounds cannot be modified."); + + //CustomControl Bounds Condition check + CustomControlBase* pControlBase = dynamic_cast< CustomControlBase* >(&controlRef); + if (pControlBase) + { + Dimension dim(width, height); + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(_pControlAnimatorImpl->GetControl()); + pControlImpl->OnEvaluateSize(dim); + } + else + { + SysTryReturnResult(NID_UI_ANIM, !((width < controlRef.GetMinimumSize().width) || + (height < controlRef.GetMinimumSize().height) || + (width > controlRef.GetMaximumSize().width) || + (height > controlRef.GetMaximumSize().height)), E_UNSUPPORTED_OPERATION, "Bounds cannot be modified."); + } + + int activeAnimationCount = _pControlAnimatorImpl->GetActiveAnimationListCount(); + AnimationBase* pAnimationBase = null; + + if (_pControlAnimatorImpl->GetStoredPropertyAnimationGroupType(ANIMATION_TRIGGER_SIZE_CHANGE - 1) == PROPERTY_ANIMATION_GROUP_TYPE_NONE) + { + if (currentSize == newSize) + { + return E_SUCCESS; + } + + DimensionAnimation* pDimensionAnim = new (std::nothrow) DimensionAnimation(currentSize, newSize, 400, ANIMATION_INTERPOLATOR_LINEAR); + SysTryReturnResult(NID_UI_ANIM, (pDimensionAnim), E_OUT_OF_MEMORY, "Memory allocation failed."); + + pAnimationBase = pDimensionAnim; + + Rectangle rect(0, 0, width, height); + + if (!(_pControlAnimatorImpl->IsAnimatable(ANIMATION_TARGET_SIZE, rect, pAnimationBase, ANIMATION_TRIGGER_SIZE_CHANGE))) + { + delete pAnimationBase; + + SysLogException(NID_UI_ANIM, E_INVALID_ARG, "Invalid argument(s) is used. Animation type or size is invalid."); + return E_INVALID_ARG; + } + + if (_pControlAnimatorImpl->IsAnimationSupported() == false) + { + r = _pControlAnimatorImpl->SetControlProperty(ANIMATION_TARGET_SIZE, *pAnimationBase); + + if (E_SUCCESS != r) + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Control property is not set."); + r = E_SYSTEM; + } + + delete pAnimationBase; + + return r; + } + else + { + _pControlAnimatorImpl->SetLogicalBounds(controlRef.GetBounds()); + _pControlAnimatorImpl->SetControlLogicalBounds(ANIMATION_TARGET_SIZE, *pAnimationBase); + + bool disable = false; + bool propagation = false; + + result r = _pControlAnimatorImpl->DisableImplicitAnimation(disable); + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to disable/enable implicit animation."); + + r = _pControlAnimatorImpl->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 = controlRef.SetBounds(_pControlAnimatorImpl->GetLogicalBounds()); + + if (propagation) + { + _pControlAnimatorImpl->DisableVisualElementPropagation(propagation); + } + if (disable) + { + _pControlAnimatorImpl->DisableImplicitAnimation(disable); + } + + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to set bounds."); + + //Play the animation + r = _pControlAnimatorImpl->SetAnimation(ANIMATION_TARGET_SIZE, *pAnimationBase, ANIMATION_TRIGGER_SIZE_CHANGE); + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + else + { + Rectangle logicalBounds(controlBounds.x, controlBounds.y, width, height); + _pControlAnimatorImpl->SetLogicalBounds(logicalBounds); + //Call control set bounds inside StartCustomImplicitAnimation + //start custom Implicit animation + r = _pControlAnimatorImpl->StartCustomImplicitAnimation(ANIMATION_TRIGGER_SIZE_CHANGE, controlBounds.x, controlBounds.y, width, height, false); + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to start custom implicit animation."); + } + //When Control's property is set with End Bounds in Custom Implicit animation params, it should return from here without animation + if (_pControlAnimatorImpl->IsAnimationSupported() == false) + { + return E_SUCCESS; + } + + _pControlAnimatorImpl->SetAnimationTargetStatus(ANIMATION_TRIGGER_SIZE_CHANGE); + + return r; + +CATCH: + if (pAnimationBase) + { + if (_pControlAnimatorImpl->DestroyAnimation(*pAnimationBase, ANIMATION_TARGET_SIZE) != E_SUCCESS) + { + pAnimationBase = null; + } + else + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to destroy animation."); + r = E_SYSTEM; + } + } + + SysTryReturnResult(NID_UI_ANIM, (_pControlAnimatorImpl->DestroyAnimation(activeAnimationCount) == E_SUCCESS), + E_SYSTEM, "A system error has been occurred. Failed to destroy animation."); + + return r; +} + +result +ControlAnimator::SetSize(const Dimension& size) +{ + return SetSize(size.width, size.height); +} + +result +ControlAnimator::SetBounds(int x, int y, int width, int height) +{ + SysTryReturnResult(NID_UI_ANIM, (_pControlAnimatorImpl->IsAnimationTargetAnimating(ANIMATION_TARGET_POSITION) == false), E_INVALID_OPERATION, "Same AnimationTargetType being animated."); + SysTryReturnResult(NID_UI_ANIM, (_pControlAnimatorImpl->IsAnimationTargetAnimating(ANIMATION_TARGET_SIZE) == false), E_INVALID_OPERATION, "Same AnimationTargetType being animated."); + SysTryReturnResult(NID_UI_ANIM, (width >= 0 && height >= 0), E_INVALID_ARG, "Invalid argument(s) is used. width = %d, height = %d", width, height); + + result r = E_SUCCESS; + Control& controlRef = _pControlAnimatorImpl->GetControl(); + Rectangle newBounds = Rectangle(x, y, width, height); + Rectangle currentBounds = controlRef.GetBounds(); + + SysTryReturnResult(NID_UI_ANIM, !((controlRef.IsMovable() == false) || (controlRef.IsResizable() == false)), E_UNSUPPORTED_OPERATION, "Bounds cannot be modified."); + + if (controlRef.IsResizable() == true) + { + //CustomControl Bounds Condition check + CustomControlBase* pControlBase = dynamic_cast< CustomControlBase* >(&controlRef); + + if (pControlBase) + { + Rectangle rect(x, y, width, height); + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(_pControlAnimatorImpl->GetControl()); + pControlImpl->OnBoundsChanging(rect); + } + else + { + SysTryReturnResult(NID_UI_ANIM, !((width < controlRef.GetMinimumSize().width) || + (height < controlRef.GetMinimumSize().height) || + (width > controlRef.GetMaximumSize().width) || + (height > controlRef.GetMaximumSize().height)), E_UNSUPPORTED_OPERATION, "Bounds cannot be modified."); + } + } + + Point newPosition = Point(x, y); + Point currentPosition = controlRef.GetPosition(); + Dimension newSize = Dimension(width, height); + Dimension currentSize = controlRef.GetSize(); + int activeAnimationCount = _pControlAnimatorImpl->GetActiveAnimationListCount(); + AnimationBase* pPointAnimationBase = null; + AnimationBase* pDimensionAnimationBase = null; + Rectangle logicalBounds(x, y, width, height); + _pControlAnimatorImpl->SetLogicalBounds(logicalBounds); + + if ((_pControlAnimatorImpl->GetStoredPropertyAnimationGroupType(ANIMATION_TRIGGER_POSITION_CHANGE - 1) == PROPERTY_ANIMATION_GROUP_TYPE_NONE) && + (_pControlAnimatorImpl->GetStoredPropertyAnimationGroupType(ANIMATION_TRIGGER_SIZE_CHANGE - 1) == PROPERTY_ANIMATION_GROUP_TYPE_NONE)) + { + if (currentBounds == newBounds) + { + return E_SUCCESS; + } + } + + //Position Animation + if (_pControlAnimatorImpl->GetStoredPropertyAnimationGroupType(ANIMATION_TRIGGER_POSITION_CHANGE - 1) == PROPERTY_ANIMATION_GROUP_TYPE_NONE) + { + pPointAnimationBase = new (std::nothrow) PointAnimation(currentPosition, newPosition, 400, ANIMATION_INTERPOLATOR_LINEAR); + SysTryReturnResult(NID_UI_ANIM, (pPointAnimationBase), E_OUT_OF_MEMORY, "Memory allocation failed."); + + if (_pControlAnimatorImpl->IsAnimationSupported() == false) + { + r = _pControlAnimatorImpl->SetControlProperty(ANIMATION_TARGET_POSITION, *pPointAnimationBase); + + delete pPointAnimationBase; + pPointAnimationBase = null; + + //Do not return if success, set size Bounds and then return. + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), r, "Control property is not set."); + } + else + { + //Create and set the animation to the layer + _pControlAnimatorImpl->SetControlLogicalBounds(ANIMATION_TARGET_POSITION, *pPointAnimationBase); + + bool disable = false; + bool propagation = false; + + result r = _pControlAnimatorImpl->DisableImplicitAnimation(disable); + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to disable/enable implicit animation."); + + r = _pControlAnimatorImpl->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 = controlRef.SetBounds(_pControlAnimatorImpl->GetLogicalBounds()); + + if (propagation) + { + _pControlAnimatorImpl->DisableVisualElementPropagation(propagation); + } + if (disable) + { + _pControlAnimatorImpl->DisableImplicitAnimation(disable); + } + + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to set bounds."); + + r = _pControlAnimatorImpl->SetAnimation(ANIMATION_TARGET_POSITION, *pPointAnimationBase, ANIMATION_TRIGGER_POSITION_CHANGE); + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + else + { + //call control Setbounds API inside StartCustomImplicitAnimation + r = _pControlAnimatorImpl->StartCustomImplicitAnimation(ANIMATION_TRIGGER_POSITION_CHANGE, x, y, width, height, false); + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to start custom implicit animation."); + } + + //Size Animation + if (_pControlAnimatorImpl->GetStoredPropertyAnimationGroupType(ANIMATION_TRIGGER_SIZE_CHANGE - 1) == PROPERTY_ANIMATION_GROUP_TYPE_NONE) + { + DimensionAnimation* pDimensionAnim = new (std::nothrow) DimensionAnimation(currentSize, newSize, 400, ANIMATION_INTERPOLATOR_LINEAR); + SysTryReturnResult(NID_UI_ANIM, (pDimensionAnim), E_OUT_OF_MEMORY, "Memory allocation failed."); + pDimensionAnimationBase = pDimensionAnim; + + if (_pControlAnimatorImpl->IsAnimationSupported() == false) + { + r = _pControlAnimatorImpl->SetControlProperty(ANIMATION_TARGET_SIZE, *pDimensionAnimationBase); + if (E_SUCCESS != r) + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Control property is not set."); + r = E_SYSTEM; + } + + delete pDimensionAnimationBase; + + return r; + } + else + { + _pControlAnimatorImpl->SetControlLogicalBounds(ANIMATION_TARGET_SIZE, *pDimensionAnimationBase); + + bool disable = false; + bool propagation = false; + + result r = _pControlAnimatorImpl->DisableImplicitAnimation(disable); + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to disable/enable implicit animation."); + + r = _pControlAnimatorImpl->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 = controlRef.SetBounds(_pControlAnimatorImpl->GetLogicalBounds()); + + if (propagation) + { + _pControlAnimatorImpl->DisableVisualElementPropagation(propagation); + } + if (disable) + { + _pControlAnimatorImpl->DisableImplicitAnimation(disable); + } + + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to set bounds."); + + r = _pControlAnimatorImpl->SetAnimation(ANIMATION_TARGET_SIZE, *pDimensionAnimationBase, ANIMATION_TRIGGER_SIZE_CHANGE); + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + else + { + //call control setbounds inside StartCustomImplicitAnimation + r = _pControlAnimatorImpl->StartCustomImplicitAnimation(ANIMATION_TRIGGER_SIZE_CHANGE, x, y, width, height, false); + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to start custom implicit animation."); + } + + //When Control's property is set with End Bounds in Custom Implicit animation params, it should return from here without animation + if (_pControlAnimatorImpl->IsAnimationSupported() == false) + { + return E_SUCCESS; + } + + _pControlAnimatorImpl->SetAnimationTargetStatus(ANIMATION_TRIGGER_POSITION_CHANGE); + _pControlAnimatorImpl->SetAnimationTargetStatus(ANIMATION_TRIGGER_SIZE_CHANGE); + + return r; + +CATCH: + if (pPointAnimationBase) + { + if (_pControlAnimatorImpl->DestroyAnimation(*pPointAnimationBase, ANIMATION_TARGET_POSITION) != E_SUCCESS) + { + pPointAnimationBase = null; + } + else + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to destroy animation."); + r = E_SYSTEM; + } + } + if (pDimensionAnimationBase) + { + if (_pControlAnimatorImpl->DestroyAnimation(*pDimensionAnimationBase, ANIMATION_TARGET_SIZE) != E_SUCCESS) + { + pDimensionAnimationBase = null; + } + else + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to destroy animation."); + r = E_SYSTEM; + } + } + + SysTryReturnResult(NID_UI_ANIM, (_pControlAnimatorImpl->DestroyAnimation(activeAnimationCount) == E_SUCCESS), + E_SYSTEM, "A system error has been occurred. Failed to destroy animation."); + + return r; +} + +result +ControlAnimator::SetBounds(const Rectangle& rect) +{ + return SetBounds(rect.x, rect.y, rect.width, rect.height); +} + +result +ControlAnimator::SetShowState(bool show) +{ + SysTryReturnResult(NID_UI_ANIM, (_pControlAnimatorImpl->IsAnimationTargetAnimating(ANIMATION_TARGET_ALPHA) == false), E_INVALID_OPERATION, "Same AnimationTargetType being animated."); + + result r = E_SUCCESS; + Control& controlRef = _pControlAnimatorImpl->GetControl(); + int activeAnimationCount = _pControlAnimatorImpl->GetActiveAnimationListCount(); + bool currentShowState = controlRef.GetShowState(); + bool newShowState = show; + FloatAnimation* pFloatAnim = null; + AnimationBase* pAnimationBase = null; + + if (_pControlAnimatorImpl->GetStoredPropertyAnimationGroupType(ANIMATION_TRIGGER_SHOW_STATE_CHANGE - 1) == PROPERTY_ANIMATION_GROUP_TYPE_NONE) + { + SysTryReturnResult(NID_UI_ANIM, (currentShowState != newShowState), E_SUCCESS, "Current show state of control is same as new show state."); + + pFloatAnim = new (std::nothrow) FloatAnimation(((newShowState) ? (0.0f) : (1.0f)), ((newShowState) ? (1.0f) : (0.0f)), 400, ANIMATION_INTERPOLATOR_LINEAR); + SysTryReturnResult(NID_UI_ANIM, (pFloatAnim), E_OUT_OF_MEMORY, "Memory allocation failed."); + pAnimationBase = pFloatAnim; + + Rectangle rect(0, 0, 0, 0); + + if (!(_pControlAnimatorImpl->IsAnimatable(ANIMATION_TARGET_ALPHA, rect, pAnimationBase, ANIMATION_TRIGGER_SHOW_STATE_CHANGE))) + { + delete pAnimationBase; + + SysLogException(NID_UI_ANIM, E_INVALID_ARG, "Invalid argument(s) is used. Custom implicit animation parameters are wrong."); + return E_INVALID_ARG; + } + if (_pControlAnimatorImpl->IsAnimationSupported() == false) + { + r = _pControlAnimatorImpl->SetControlProperty(ANIMATION_TARGET_ALPHA, *pAnimationBase); + if (E_SUCCESS != r) + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Control property is not set."); + r = E_SYSTEM; + } + + delete pAnimationBase; + + return r; + } + else + { + _pControlAnimatorImpl->SetControlShowState(ANIMATION_TARGET_ALPHA, *pAnimationBase); + + + bool disable = false; + bool propagation = false; + + result r = _pControlAnimatorImpl->DisableImplicitAnimation(disable); + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to disable/enable implicit animation."); + + r = _pControlAnimatorImpl->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 = _pControlAnimatorImpl->GetControl().SetShowState((_pControlAnimatorImpl->GetShowState())); + + if (propagation) + { + _pControlAnimatorImpl->DisableVisualElementPropagation(propagation); + } + if (disable) + { + _pControlAnimatorImpl->DisableImplicitAnimation(disable); + } + + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to set show state."); + + r = _pControlAnimatorImpl->SetAnimation(ANIMATION_TARGET_ALPHA, *pAnimationBase, ANIMATION_TRIGGER_SHOW_STATE_CHANGE); + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + else + { + _pControlAnimatorImpl->SetShowState(newShowState); + //Call control set show state inside StartCustomImplicitAnimation + r = _pControlAnimatorImpl->StartCustomImplicitAnimation(ANIMATION_TRIGGER_SHOW_STATE_CHANGE, 0, 0, 0, 0, newShowState); + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to start custom implicit animation."); + } + //When Control's property is set with End ShowState in Custom Implicit animation params, it should return from here without animation + if (_pControlAnimatorImpl->IsAnimationSupported() == false) + { + return E_SUCCESS; + } + + _pControlAnimatorImpl->SetAnimationTargetStatus(ANIMATION_TRIGGER_SHOW_STATE_CHANGE); + + return r; + +CATCH: + if (pAnimationBase) + { + if (_pControlAnimatorImpl->DestroyAnimation(*pAnimationBase, ANIMATION_TARGET_ALPHA) != E_SUCCESS) + { + pAnimationBase = null; + } + else + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to deallocate memory."); + r = E_SYSTEM; + } + } + + if (_pControlAnimatorImpl->DestroyAnimation(activeAnimationCount) != E_SUCCESS) + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to deallocate memory."); + r = E_SYSTEM; + } + SysTryReturnResult(NID_UI_ANIM, (_pControlAnimatorImpl->DestroyAnimation(activeAnimationCount) == E_SUCCESS), + E_SYSTEM, "A system error has been occurred. Failed to destroy animation."); + return r; +} + +bool +ControlAnimator::IsAnimationSupported(AnimationTargetType animTarget) const +{ + switch (animTarget) + { + case ANIMATION_TARGET_POSITION: + return _pControlAnimatorImpl->GetControl().IsMovable(); + + case ANIMATION_TARGET_SIZE: + return _pControlAnimatorImpl->GetControl().IsResizable(); + + case ANIMATION_TARGET_ALPHA: + return true; + + case ANIMATION_TARGET_ROTATION: + return true; + + default: + return false; + } +} + + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnimDimensionAnimation.cpp b/src/ui/animations/FUiAnimDimensionAnimation.cpp new file mode 100644 index 0000000..5951cb9 --- /dev/null +++ b/src/ui/animations/FUiAnimDimensionAnimation.cpp @@ -0,0 +1,431 @@ +// +// 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 FUiAnimDimensionAnimation.cpp + * @brief This file contains implementation of DimensionAnimation class + * + * This file contains implementation of DimensionAnimation class. + */ + +#include + +#include +#include +#include + +#include "FUiAnim_DimensionAnimationImpl.h" +#include "FUiAnim_AnimationBaseImpl.h" + + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Ui::Animations; +using namespace Tizen::Base::Collection; + + +namespace Tizen { namespace Ui { namespace Animations +{ + +DimensionAnimation::DimensionAnimation(void) + : _pDimensionAnimationImpl(null) +{ +} + +DimensionAnimation::DimensionAnimation(const Dimension& startValue, const Dimension& endValue, long duration, AnimationInterpolatorType interpolator) + : AnimationBase(duration, interpolator) + , _pDimensionAnimationImpl(null) +{ + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_ANIM, (_pAnimationBaseImpl), r, "[%s] Propagating.", GetErrorMessage(r)); + + SysTryReturnVoidResult(NID_UI_ANIM, (startValue.height >= 0 && startValue.width >= 0 && endValue.height >= 0 && endValue.width >= 0), + E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. startValue = (%d, %d), endValue = (%d, %d)", startValue.width, startValue.height, endValue.width, endValue.height); + + _pDimensionAnimationImpl = new (std::nothrow) _DimensionAnimationImpl(this); + if (_pDimensionAnimationImpl == null) + { + SysLogException(NID_UI_ANIM, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory Allocation failed."); + + delete _pAnimationBaseImpl; + _pAnimationBaseImpl = null; + + return; + } + + _pDimensionAnimationImpl->startValue = startValue; + _pDimensionAnimationImpl->endValue = endValue; +} + +DimensionAnimation::~DimensionAnimation(void) +{ + delete _pDimensionAnimationImpl; + _pDimensionAnimationImpl = null; +} + +DimensionAnimation::DimensionAnimation(const DimensionAnimation& dimensionAnimation) + : AnimationBase(dimensionAnimation) + , _pDimensionAnimationImpl(null) +{ + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_ANIM, (_pAnimationBaseImpl), r, "[%s] Propagating.", GetErrorMessage(r)); + + _pDimensionAnimationImpl = new (std::nothrow) _DimensionAnimationImpl(this); + SysTryCatch(NID_UI_ANIM, (_pDimensionAnimationImpl != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + dimensionAnimation.GetAnchor(_pDimensionAnimationImpl->anchorX, _pDimensionAnimationImpl->anchorY); + + r = _pDimensionAnimationImpl->CopyDimensionAnimationValue(dimensionAnimation); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to copy dimension animation."); + + return; + +CATCH: + delete _pAnimationBaseImpl; + _pAnimationBaseImpl = null; + delete _pDimensionAnimationImpl; + _pDimensionAnimationImpl = null; +} + +DimensionAnimation& +DimensionAnimation::operator =(const DimensionAnimation& rhs) +{ + ClearLastResult(); + + if ((&rhs) != this) + { + result r = E_SUCCESS; + + AnimationBase::operator =(rhs); + + rhs.GetAnchor(_pDimensionAnimationImpl->anchorX, _pDimensionAnimationImpl->anchorY); + + r = _pDimensionAnimationImpl->CopyDimensionAnimationValue(rhs); + SysTryReturn(NID_UI_ANIM, (r == E_SUCCESS), *this, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to copy dimension animation."); + } + + return *this; +} + +bool +DimensionAnimation::operator ==(const DimensionAnimation& dimensionAnimation) const +{ + result r = E_SUCCESS; + + if (_pAnimationBaseImpl->keyFrameList.GetCount() != dimensionAnimation._pAnimationBaseImpl->keyFrameList.GetCount()) + { + return false; + } + + ArrayListT< long >* pKeyList1 = null; + ArrayListT< long >* pKeyList2 = null; + ICollectionT< long >* pKeyN = _pAnimationBaseImpl->keyFrameList.GetKeysN(); + ICollectionT< long >* pKeyN1 = dimensionAnimation._pAnimationBaseImpl->keyFrameList.GetKeysN(); + + if (_pAnimationBaseImpl->keyFrameList.GetCount() != 0) + { + pKeyList1 = new (std::nothrow) ArrayListT< long >; + SysTryCatch(NID_UI_ANIM, (!(pKeyList1 == null || pKeyN == null)), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = pKeyList1->Construct(*pKeyN); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), , E_SYSTEM, "[E_SYSTEM] Failed to construct key list."); + + pKeyList2 = new (std::nothrow) ArrayListT< long >; + SysTryCatch(NID_UI_ANIM, !(pKeyList2 == null || pKeyN1 == null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = pKeyList2->Construct(*pKeyN1); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), , E_SYSTEM, "[E_SYSTEM] Failed to construct key list."); + + ComparerT< long > comparer; + + r = pKeyList1->Sort(comparer); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to sort key list."); + + r = pKeyList2->Sort(comparer); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to sort key list."); + + long time1 = 0; + long time2 = 0; + Object* pObjValue1 = null; + Object* pObjValue2 = null; + + for (int index = 0; index < _pAnimationBaseImpl->keyFrameList.GetCount(); index++) + { + pKeyList1->GetAt(index, time1); + pKeyList2->GetAt(index, time2); + if (time1 != time2) + { + goto CATCH; + } + _pAnimationBaseImpl->keyFrameList.GetValue(time1, pObjValue1); + dimensionAnimation._pAnimationBaseImpl->keyFrameList.GetValue(time2, pObjValue2); + if ((!pObjValue1) && (!pObjValue2)) + { + continue; + } + else if ((!pObjValue1) || (!pObjValue2)) + { + goto CATCH; + } + Dimension* pDimValue1 = dynamic_cast< Dimension* >(pObjValue1); + if (pDimValue1 == null) + { + goto CATCH; + } + + Dimension* pDimValue2 = dynamic_cast< Dimension* >(pObjValue2); + if (pDimValue2 == null) + { + goto CATCH; + } + if (!(pDimValue1->Equals(*pDimValue2))) + { + goto CATCH; + } + + } + + delete pKeyList1; + delete pKeyList2; + } + + delete pKeyN; + delete pKeyN1; + + if (!((_pDimensionAnimationImpl->startValue).Equals(dimensionAnimation._pDimensionAnimationImpl->startValue)) || + !((_pDimensionAnimationImpl->endValue).Equals(dimensionAnimation._pDimensionAnimationImpl->endValue))) + { + return false; + } + + if (((Float::Compare(_pDimensionAnimationImpl->anchorX, dimensionAnimation._pDimensionAnimationImpl->anchorX)) != 0) && + ((Float::Compare(_pDimensionAnimationImpl->anchorY, dimensionAnimation._pDimensionAnimationImpl->anchorY)) != 0)) + { + return false; + } + + return _pAnimationBaseImpl->CompareTimingValues(dimensionAnimation); + +CATCH: + delete pKeyN; + delete pKeyN1; + delete pKeyList1; + delete pKeyList2; + + return false; +} + +bool +DimensionAnimation::operator !=(const DimensionAnimation& rhs) const +{ + return !(*this == rhs); +} + +bool +DimensionAnimation::Equals(const Object& obj) const +{ + const DimensionAnimation* pDimAnim = dynamic_cast< const DimensionAnimation* >(&obj); + if (pDimAnim == null) + { + return false; + } + + return (*this == *pDimAnim); +} + +int +DimensionAnimation::GetHashCode(void) const +{ + return (((int) GetRepeatCount()) + ((int) GetOffset()) + ((int) GetDuration()) + ((int) GetDelay())); +} + +result +DimensionAnimation::SetAnchor(float anchorX, float anchorY) +{ + SysTryReturnResult(NID_UI_ANIM, (anchorX >= 0.0 && anchorX <= 1.0 && anchorY >= 0.0 && anchorY <= 1.0), E_INVALID_ARG, "Invalid argument(s) is used. anchorX = %f, anchorY = %f.", anchorX, anchorY); + + _pDimensionAnimationImpl->anchorX = anchorX; + _pDimensionAnimationImpl->anchorY = anchorY; + + return E_SUCCESS; +} + +void +DimensionAnimation::GetAnchor(float& anchorX, float& anchorY) const +{ + anchorX = _pDimensionAnimationImpl->anchorX; + anchorY = _pDimensionAnimationImpl->anchorY; + + return; +} + +result +DimensionAnimation::GetAnimatedValue(long currentTime, Dimension& animatedValue) const +{ + SysTryReturnResult(NID_UI_ANIM, (currentTime >= 0 && currentTime <= GetDuration()), E_INVALID_ARG, "Invalid argument(s) is used. currentTime = %ld", currentTime); + + float actualProgress = _pAnimationBaseImpl->GetActualProgressValue(currentTime); + SysTryReturnResult(NID_UI_ANIM, (actualProgress >= 0.0f && actualProgress <= 1.0f), E_SYSTEM, "A system error has been occurred. Failed to calculate progress."); + + return _pDimensionAnimationImpl->GetAnimatedValue(actualProgress, animatedValue); +} + +result +DimensionAnimation::AddKeyFrame(long time, const Dimension& value) +{ + SysTryReturnResult(NID_UI_ANIM, (time > 0 && time != _pAnimationBaseImpl->duration), E_INVALID_ARG, "Invalid argument(s) is used. time = %ld", time); + + result r = E_SUCCESS; + Dimension* pDimObj = null; + + if (time > _pAnimationBaseImpl->duration) + { + pDimObj = new (std::nothrow) Dimension(_pDimensionAnimationImpl->endValue); + SysTryReturnResult(NID_UI_ANIM, (pDimObj), E_OUT_OF_MEMORY, "Memory allocation failed."); + r = _pAnimationBaseImpl->keyFrameList.Add(_pAnimationBaseImpl->duration, dynamic_cast< Object* >(pDimObj)); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add to key frame list."); + + _pAnimationBaseImpl->duration = time; + _pDimensionAnimationImpl->endValue = value; + } + else + { + pDimObj = new (std::nothrow) Dimension(value); + SysTryReturnResult(NID_UI_ANIM, (pDimObj), E_OUT_OF_MEMORY, "Memory allocation failed."); + Object* pKeyValue = null; + _pAnimationBaseImpl->keyFrameList.GetValue(time, pKeyValue); + if (pKeyValue) + { + _pAnimationBaseImpl->keyFrameList.Remove(time); //If a key-value pair with the current key already exists, then remove the already existing entry + delete pKeyValue; + pKeyValue = null; + } + r = _pAnimationBaseImpl->keyFrameList.Add(time, dynamic_cast< Object* >(pDimObj)); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add to key frame list."); + } + + return r; +CATCH: + delete pDimObj; + pDimObj = null; + return r; +} + +result +DimensionAnimation::GetKeyFrameAt(int index, long& time, Dimension& 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); + + result r = E_SUCCESS; + Object* pObjValue = null; + Dimension* pDimValue = null; + ComparerT< long > comparer; + + ArrayListT< long >* pKeyList = new (std::nothrow) ArrayListT< long >; + ICollectionT< long >* pKeyN = _pAnimationBaseImpl->keyFrameList.GetKeysN(); + + SysTryCatch(NID_UI_ANIM, (pKeyList != null && pKeyN != null), r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = pKeyList->Construct(*pKeyN); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Failed to construct key list."); + SysTryCatch(NID_UI_ANIM, !(pKeyList->GetCount() <= 0), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Key list count is invalid."); + + r = pKeyList->Sort(comparer); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to sort key list."); + + r = pKeyList->GetAt(index, time); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to get the time from list."); + + r = _pAnimationBaseImpl->keyFrameList.GetValue(time, pObjValue); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to get key value."); + SysTryCatch(NID_UI_ANIM, (pObjValue != null), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to get key frame."); + + pDimValue = dynamic_cast< Dimension* >(pObjValue); + if (pDimValue) + { + value = *pDimValue; + } + + //fall through + +CATCH: + delete pKeyN; + delete pKeyList; + + return r; +} + +result +DimensionAnimation::RemoveKeyFrame(long time) +{ + return _pAnimationBaseImpl->RemoveKeyFrame(time); +} + +result +DimensionAnimation::RemoveKeyFrameAt(int index) +{ + return _pAnimationBaseImpl->RemoveKeyFrameAt(index); +} + +result +DimensionAnimation::RemoveAllKeyFrames(void) +{ + return _pAnimationBaseImpl->RemoveAllKeyFrames(); +} + +result +DimensionAnimation::SetStartValue(const Dimension& startValue) +{ + SysTryReturnResult(NID_UI_ANIM, (startValue.width >= 0 && startValue.height >= 0), E_INVALID_ARG, "Invalid argument(s) is used. startValue = (%d, %d)", startValue.width, startValue.height); + + _pDimensionAnimationImpl->startValue = startValue; + + return E_SUCCESS; +} + +result +DimensionAnimation::SetEndValue(const Dimension& endValue) +{ + SysTryReturnResult(NID_UI_ANIM, (endValue.width >= 0 && endValue.height >= 0), E_INVALID_ARG, "Invalid argument(s) is used. endValue = (%d, %d)", endValue.width, endValue.height); + + _pDimensionAnimationImpl->endValue = endValue; + + return E_SUCCESS; +} + +Dimension +DimensionAnimation::GetStartValue(void) const +{ + return _pDimensionAnimationImpl->startValue; +} + +Dimension +DimensionAnimation::GetEndValue(void) const +{ + return _pDimensionAnimationImpl->endValue; +} + +AnimationType +DimensionAnimation::GetType(void) const +{ + return ANIMATION_TYPE_DIMENSION_ANIMATION; +} + + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnimDiscreteTimingFunction.cpp b/src/ui/animations/FUiAnimDiscreteTimingFunction.cpp new file mode 100644 index 0000000..140a4ce --- /dev/null +++ b/src/ui/animations/FUiAnimDiscreteTimingFunction.cpp @@ -0,0 +1,75 @@ +// +// 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 FUiAnimDiscreteTimingFunction.cpp + * @brief This file contains implementation of DiscreteTimingFunction class + * + * This file contains implementation DiscreteTimingFunction class. + */ + +#include +#include + +#include + + +namespace Tizen { namespace Ui { namespace Animations +{ + + +DiscreteTimingFunction::DiscreteTimingFunction(void) + : __triggerTimeProgress(1.0f) +{ + +} + +DiscreteTimingFunction::~DiscreteTimingFunction(void) +{ + +} + +float +DiscreteTimingFunction::CalculateProgress(float timeProgress) const +{ + if (timeProgress >= __triggerTimeProgress) + { + return 1.0f; + } + + return 0.0f; +} + +result +DiscreteTimingFunction::SetTriggerTimeProgress(float timeProgress) +{ + SysTryReturnResult(NID_UI_ANIM, (timeProgress >= 0.f && timeProgress <= 1.0f), E_INVALID_ARG, "Invalid argument(s) is used. timeProgress is invalid."); + + __triggerTimeProgress = timeProgress; + + return E_SUCCESS; +} + +float +DiscreteTimingFunction::GetTriggerTimeProgress(void) const +{ + return __triggerTimeProgress; +} + + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnimDisplayContext.cpp b/src/ui/animations/FUiAnimDisplayContext.cpp new file mode 100644 index 0000000..c1609d2 --- /dev/null +++ b/src/ui/animations/FUiAnimDisplayContext.cpp @@ -0,0 +1,49 @@ +// +// 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 FUiAnimDisplayContext.cpp + * @brief This is the implementation file for DisplayContext class. + * + * This file contains implementation DisplayContext class. + */ + +#include "FUiAnimDisplayContext.h" +#include "FUiAnim_DisplayContextImpl.h" + +using namespace Tizen::Base; + + +namespace Tizen { namespace Ui { namespace Animations +{ + + +DisplayContext::DisplayContext(void) + : _pDisplayContextImpl(null) +{ +} +DisplayContext::~DisplayContext(void) +{ + if(_pDisplayContextImpl) + { + delete _pDisplayContextImpl; + _pDisplayContextImpl = null; + } +} + +}}} + diff --git a/src/ui/animations/FUiAnimEaseElasticInTimingFunction.cpp b/src/ui/animations/FUiAnimEaseElasticInTimingFunction.cpp new file mode 100644 index 0000000..c5350ca --- /dev/null +++ b/src/ui/animations/FUiAnimEaseElasticInTimingFunction.cpp @@ -0,0 +1,79 @@ +// +// 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 FUiAnimEaseElasticInTimingFunction.cpp + * @brief This file contains implementation of EaseElasticInTimingFunction class + * + * This file contains implementation EaseElasticInTimingFunction class. + */ + +#include + +#include +#include + +#include + +#include "FUi_Math.h" + + +namespace Tizen { namespace Ui { namespace Animations +{ + + +EaseElasticInTimingFunction::EaseElasticInTimingFunction(void) + : __period(0.4f) +{ +} + +EaseElasticInTimingFunction::~EaseElasticInTimingFunction(void) +{ +} + +result +EaseElasticInTimingFunction::SetPeriod(float period) +{ + SysTryReturnResult(NID_UI_ANIM, (period > 0.f && period < 1.0f), E_INVALID_ARG, "Invalid argument(s) is used. period is invalid."); + + __period = period; + + return E_SUCCESS; +} +float +EaseElasticInTimingFunction::GetPeriod(void) const +{ + return __period; +} + +float +EaseElasticInTimingFunction::CalculateProgress(float timeProgress) const +{ + if (_FloatCompare(timeProgress, 0.0f) || _FloatCompare(timeProgress, 1.0f)) + { + return timeProgress; + } + + float s = __period / 4.0f; + timeProgress -= 1.0f; + + return -powf(2.0f, 10.0f * timeProgress) * sinf((timeProgress - s) * static_cast< float >(M_PI) * 2.0f / __period); +} + + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnimEaseElasticOutTimingFunction.cpp b/src/ui/animations/FUiAnimEaseElasticOutTimingFunction.cpp new file mode 100644 index 0000000..9d725ce --- /dev/null +++ b/src/ui/animations/FUiAnimEaseElasticOutTimingFunction.cpp @@ -0,0 +1,78 @@ +// +// 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 FUiAnimEaseElasticOutTimingFunction.cpp + * @brief This file contains implementation of EaseElasticOutTimingFunction class + * + * This file contains implementation EaseElasticOutTimingFunction class. + */ + +#include + +#include +#include + +#include + +#include "FUi_Math.h" + + +namespace Tizen { namespace Ui { namespace Animations +{ + + +EaseElasticOutTimingFunction::EaseElasticOutTimingFunction(void) + : __period(0.4f) +{ +} + +EaseElasticOutTimingFunction::~EaseElasticOutTimingFunction(void) +{ +} + +result +EaseElasticOutTimingFunction::SetPeriod(float period) +{ + SysTryReturnResult(NID_UI_ANIM, (period > 0.f && period < 1.0f), E_INVALID_ARG, "Invalid argument(s) is used. period is invalid."); + + __period = period; + + return E_SUCCESS; +} + +float +EaseElasticOutTimingFunction::GetPeriod(void) const +{ + return __period; +} + +float +EaseElasticOutTimingFunction::CalculateProgress(float timeProgress) const +{ + if (_FloatCompare(timeProgress, 0.0f) || _FloatCompare(timeProgress, 1.0f)) + { + return timeProgress; + } + + float s = __period / 4.0f; + + return powf(2.0f, -10.0f * timeProgress) * sinf((timeProgress - s) * static_cast< float >(M_PI) * 2.0f / __period) + 1.0f; +} + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnimEaseInOutTimingFunction.cpp b/src/ui/animations/FUiAnimEaseInOutTimingFunction.cpp new file mode 100644 index 0000000..2dd05bb --- /dev/null +++ b/src/ui/animations/FUiAnimEaseInOutTimingFunction.cpp @@ -0,0 +1,58 @@ +// +// 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 FUiAnimEaseInOutTimingFunction.cpp + * @brief This file contains implementation of EaseInOutTimingFunction class + * + * This file contains implementation EaseInOutTimingFunction class. + */ + +#include + +#include + + +namespace Tizen { namespace Ui { namespace Animations +{ + + +EaseInOutTimingFunction::EaseInOutTimingFunction(void) +{ + +} + +EaseInOutTimingFunction::~EaseInOutTimingFunction(void) +{ + +} + +float +EaseInOutTimingFunction::CalculateProgress(float timeProgress) const +{ + // using cubic algorithm + if (timeProgress < 0.5f) + { + return 0.5f * powf(2.0f * timeProgress, 3); + } + + return 0.5f * powf(2.0f * (timeProgress - 1.0f), 3) + 1.0f; +} + + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnimEaseInTimingFunction.cpp b/src/ui/animations/FUiAnimEaseInTimingFunction.cpp new file mode 100644 index 0000000..db0797c --- /dev/null +++ b/src/ui/animations/FUiAnimEaseInTimingFunction.cpp @@ -0,0 +1,53 @@ +// +// 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 FUiAnimEaseInTimingFunction.cpp + * @brief This file contains implementation of EaseInTimingFunction class + * + * This file contains implementation EaseInTimingFunction class. + */ + +#include + +#include + + +namespace Tizen { namespace Ui { namespace Animations +{ + + +EaseInTimingFunction::EaseInTimingFunction(void) +{ + +} + +EaseInTimingFunction::~EaseInTimingFunction(void) +{ + +} + +float +EaseInTimingFunction::CalculateProgress(float timeProgress) const +{ + // using cubic algorithm + return powf(timeProgress, 3); +} + + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnimEaseOutInTimingFunction.cpp b/src/ui/animations/FUiAnimEaseOutInTimingFunction.cpp new file mode 100644 index 0000000..3809e33 --- /dev/null +++ b/src/ui/animations/FUiAnimEaseOutInTimingFunction.cpp @@ -0,0 +1,53 @@ +// +// 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 FUiAnimEaseOutInTimingFunction.cpp + * @brief This file contains implementation of EaseOutInTimingFunction class + * + * This file contains implementation EaseOutInTimingFunction class. + */ + +#include + +#include + + +namespace Tizen { namespace Ui { namespace Animations +{ + + +EaseOutInTimingFunction::EaseOutInTimingFunction(void) +{ + +} + +EaseOutInTimingFunction::~EaseOutInTimingFunction(void) +{ + +} + +float +EaseOutInTimingFunction::CalculateProgress(float timeProgress) const +{ + // using cubic algorithm + return 0.5f * powf(2.0f * timeProgress - 1.0f, 3) + 0.5f; +} + + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnimEaseOutTimingFunction.cpp b/src/ui/animations/FUiAnimEaseOutTimingFunction.cpp new file mode 100644 index 0000000..903464f --- /dev/null +++ b/src/ui/animations/FUiAnimEaseOutTimingFunction.cpp @@ -0,0 +1,53 @@ +// +// 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 FUiAnimEaseOutTimingFunction.cpp + * @brief This file contains implementation of EaseOutTimingFunction class + * + * This file contains implementation EaseOutTimingFunction class. + */ + +#include + +#include + + +namespace Tizen { namespace Ui { namespace Animations +{ + + +EaseOutTimingFunction::EaseOutTimingFunction(void) +{ + +} + +EaseOutTimingFunction::~EaseOutTimingFunction(void) +{ + +} + +float +EaseOutTimingFunction::CalculateProgress(float timeProgress) const +{ + // using cubic algorithm + return powf(timeProgress - 1.0f, 3) + 1.0f; +} + + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnimExpInTimingFunction.cpp b/src/ui/animations/FUiAnimExpInTimingFunction.cpp new file mode 100644 index 0000000..4cf9db2 --- /dev/null +++ b/src/ui/animations/FUiAnimExpInTimingFunction.cpp @@ -0,0 +1,73 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnimExpInTimingFunction.cpp + * @brief This file contains implementation of ExpInTimingFunction class + * + * This file contains implementation ExpInTimingFunction class. + */ + +#include + +#include +#include + +#include + + +namespace Tizen { namespace Ui { namespace Animations +{ + + +ExpInTimingFunction::ExpInTimingFunction(void) + : __scale(0.0f) + , __divisor(0.0f) +{ + SetScaleValue(5.0f); +} + +ExpInTimingFunction::~ExpInTimingFunction(void) +{ + +} + +result +ExpInTimingFunction::SetScaleValue(float scale) +{ + SysTryReturnResult(NID_UI_ANIM, (scale > 0.f), E_INVALID_ARG, "Invalid argument(s) is used. scale = %f", scale); + + __scale = scale; + __divisor = expf(__scale) - 1.0f; + + return E_SUCCESS; +} +float +ExpInTimingFunction::GetScaleValue(void) const +{ + return __scale; +} + +float +ExpInTimingFunction::CalculateProgress(float timeProgress) const +{ + return (expf(__scale * timeProgress) - 1.0f) / __divisor; +} + + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnimExpOutTimingFunction.cpp b/src/ui/animations/FUiAnimExpOutTimingFunction.cpp new file mode 100644 index 0000000..562bea6 --- /dev/null +++ b/src/ui/animations/FUiAnimExpOutTimingFunction.cpp @@ -0,0 +1,73 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnimExpOutTimingFunction.cpp + * @brief This file contains implementation of ExpOutTimingFunction class + * + * This file contains implementation ExpOutTimingFunction class. + */ + +#include + +#include +#include + +#include + + +namespace Tizen { namespace Ui { namespace Animations +{ + + +ExpOutTimingFunction::ExpOutTimingFunction(void) + : __scale(0.0f) + , __divisor(0.0f) +{ + SetScaleValue(5.0f); +} + +ExpOutTimingFunction::~ExpOutTimingFunction(void) +{ + +} + +result +ExpOutTimingFunction::SetScaleValue(float scale) +{ + SysTryReturnResult(NID_UI_ANIM, (scale > 0.f), E_INVALID_ARG, "Invalid argument(s) is used. scale = %f", scale); + + __scale = -scale; + __divisor = expf(__scale) - 1.0f; + + return E_SUCCESS; +} +float +ExpOutTimingFunction::GetScaleValue(void) const +{ + return -__scale; +} + +float +ExpOutTimingFunction::CalculateProgress(float timeProgress) const +{ + return (expf(__scale * timeProgress) - 1.0f) / __divisor; +} + + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnimFloatAnimation.cpp b/src/ui/animations/FUiAnimFloatAnimation.cpp new file mode 100644 index 0000000..9f8e283 --- /dev/null +++ b/src/ui/animations/FUiAnimFloatAnimation.cpp @@ -0,0 +1,396 @@ +// +// 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 FUiAnimFloatAnimation.cpp + * @brief This file contains implementation of FloatAnimation class + * + * This file contains implementation of FloatAnimation class. + */ + +#include + +#include +#include + +#include + +#include "FUiAnim_AnimationBaseImpl.h" +#include "FUiAnim_FloatAnimationImpl.h" + + +using namespace Tizen::Base; +using namespace Tizen::Ui::Animations; +using namespace Tizen::Base::Collection; + + +namespace Tizen { namespace Ui { namespace Animations +{ + + +FloatAnimation::FloatAnimation(void) + : _pFloatAnimationImpl(null) +{ +} + +FloatAnimation::FloatAnimation(float startValue, float endValue, long duration, AnimationInterpolatorType interpolator) + : AnimationBase(duration, interpolator) + , _pFloatAnimationImpl(null) +{ + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_ANIM, (_pAnimationBaseImpl), r, "[%s] Propagating.", GetErrorMessage(r)); + + _pFloatAnimationImpl = new (std::nothrow) _FloatAnimationImpl(this); + if (_pFloatAnimationImpl == null) + { + SysLogException(NID_UI_ANIM, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + delete _pAnimationBaseImpl; + _pAnimationBaseImpl = null; + + return; + } + + _pFloatAnimationImpl->startValue = startValue; + _pFloatAnimationImpl->endValue = endValue; +} + +FloatAnimation::~FloatAnimation(void) +{ + delete _pFloatAnimationImpl; + _pFloatAnimationImpl = null; +} + +FloatAnimation::FloatAnimation(const FloatAnimation& floatAnimation) + : AnimationBase(floatAnimation) + , _pFloatAnimationImpl(null) +{ + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_ANIM, (_pAnimationBaseImpl), r, "[%s] Propagating.", GetErrorMessage(r)); + + _pFloatAnimationImpl = new (std::nothrow) _FloatAnimationImpl(this); + SysTryCatch(NID_UI_ANIM, (_pFloatAnimationImpl != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = _pFloatAnimationImpl->CopyFloatAnimationValue(floatAnimation); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to copy float animation value."); + + return; + +CATCH: + delete _pAnimationBaseImpl; + _pAnimationBaseImpl = null; + delete _pFloatAnimationImpl; + _pFloatAnimationImpl = null; +} + +FloatAnimation& +FloatAnimation::operator =(const FloatAnimation& floatAnimation) +{ + ClearLastResult(); + + if ((&floatAnimation) != this) + { + result r = E_SUCCESS; + + AnimationBase::operator =(floatAnimation); + + r = _pFloatAnimationImpl->CopyFloatAnimationValue(floatAnimation); + SysTryReturn(NID_UI_ANIM, (r == E_SUCCESS), *this, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to copy float animation value."); + } + + return *this; +} + +bool +FloatAnimation::operator ==(const FloatAnimation& rhs) const +{ + result r = E_SUCCESS; + + if (_pAnimationBaseImpl->keyFrameList.GetCount() != rhs._pAnimationBaseImpl->keyFrameList.GetCount()) + { + return false; + } + + ArrayListT< long >* pKeyList1 = null; + ArrayListT< long >* pKeyList2 = null; + ICollectionT< long >* pKeyN = _pAnimationBaseImpl->keyFrameList.GetKeysN(); + ICollectionT< long >* pKeyN1 = rhs._pAnimationBaseImpl->keyFrameList.GetKeysN(); + + if (_pAnimationBaseImpl->keyFrameList.GetCount() != 0) + { + pKeyList1 = new (std::nothrow) ArrayListT< long >; + SysTryCatch(NID_UI_ANIM, (pKeyList1 && pKeyN), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = pKeyList1->Construct(*pKeyN); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), , E_SYSTEM, "[E_SYSTEM] Failed to construct key list."); + + pKeyList2 = new (std::nothrow) ArrayListT< long >; + SysTryCatch(NID_UI_ANIM, (pKeyList2 && pKeyN1), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = pKeyList2->Construct(*pKeyN1); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), , E_SYSTEM, "[E_SYSTEM] Failed to construct key list."); + + ComparerT< long > comparer; + + r = pKeyList1->Sort(comparer); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to sort key list."); + + r = pKeyList2->Sort(comparer); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to sort key list."); + + long time1 = 0; + long time2 = 0; + Object* pObjValue1 = null; + Object* pObjValue2 = null; + + for (int index = 0; index < _pAnimationBaseImpl->keyFrameList.GetCount(); index++) + { + pKeyList1->GetAt(index, time1); + pKeyList2->GetAt(index, time2); + if (time1 != time2) + { + goto CATCH; + } + _pAnimationBaseImpl->keyFrameList.GetValue(time1, pObjValue1); + rhs._pAnimationBaseImpl->keyFrameList.GetValue(time2, pObjValue2); + if ((!pObjValue1) && (!pObjValue2)) + { + continue; + } + else if ((!pObjValue1) || (!pObjValue2)) + { + goto CATCH; + } + + Float* pFlValue1 = dynamic_cast< Float* >(pObjValue1); + if (pFlValue1 == null) + { + goto CATCH; + } + + Float* pFlValue2 = dynamic_cast< Float* >(pObjValue2); + if (pFlValue2 == null) + { + goto CATCH; + } + if (!(pFlValue1->Equals(*pFlValue2))) + { + goto CATCH; + } + } + delete pKeyList1; + delete pKeyList2; + } + + delete pKeyN; + delete pKeyN1; + + if (!((_pFloatAnimationImpl->startValue).Equals(rhs._pFloatAnimationImpl->startValue)) + || !((_pFloatAnimationImpl->endValue).Equals(rhs._pFloatAnimationImpl->endValue))) + { + return false; + } + + return _pAnimationBaseImpl->CompareTimingValues(rhs); + +CATCH: + delete pKeyN; + delete pKeyN1; + delete pKeyList1; + delete pKeyList2; + + return false; +} + +bool +FloatAnimation::operator !=(const FloatAnimation& rhs) const +{ + return !(*this == rhs); +} + +bool +FloatAnimation::Equals(const Object& obj) const +{ + const FloatAnimation* pFloatAnim = dynamic_cast< const FloatAnimation* >(&obj); + + if (pFloatAnim == null) + { + return false; + } + + return (*this == *pFloatAnim); +} + +int +FloatAnimation::GetHashCode(void) const +{ + return (((int) GetRepeatCount()) + ((int) GetOffset()) + ((int) GetDuration()) + ((int) GetDelay())); +} + +result +FloatAnimation::GetAnimatedValue(long currentTime, float& animatedValue) const +{ + SysTryReturnResult(NID_UI_ANIM, (currentTime >= 0 && currentTime <= GetDuration()), E_INVALID_ARG, "Invalid argument(s) is used. currentTime = %ld", currentTime); + + float actualProgress = _pAnimationBaseImpl->GetActualProgressValue(currentTime); + SysTryReturnResult(NID_UI_ANIM, (actualProgress >= 0.0f && actualProgress <= 1.0f), E_SYSTEM, "A system error has been occurred. Failed to calculate progress."); + + return _pFloatAnimationImpl->GetAnimatedValue(actualProgress, animatedValue); +} + +result +FloatAnimation::AddKeyFrame(long time, float value) +{ + SysTryReturnResult(NID_UI_ANIM, (time > 0 && time != _pAnimationBaseImpl->duration), E_INVALID_ARG, "Invalid argument(s) is used. time = %ld", time); + + result r = E_SUCCESS; + Float* pFloatObj = null; + + if (time > _pAnimationBaseImpl->duration) + { + pFloatObj = new (std::nothrow) Float(_pFloatAnimationImpl->endValue); + SysTryReturnResult(NID_UI_ANIM, (pFloatObj), E_OUT_OF_MEMORY, "Memory allocation failed."); + + r = _pAnimationBaseImpl->keyFrameList.Add(_pAnimationBaseImpl->duration, dynamic_cast< Object* >(pFloatObj)); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add to key frame list."); + + _pAnimationBaseImpl->duration = time; + _pFloatAnimationImpl->endValue = value; + } + else + { + pFloatObj = new (std::nothrow) Float(value); + SysTryReturnResult(NID_UI_ANIM, (pFloatObj), E_OUT_OF_MEMORY, "Memory allocation failed."); + + Object* pKeyValue = null; + _pAnimationBaseImpl->keyFrameList.GetValue(time, pKeyValue); + if (pKeyValue) + { + _pAnimationBaseImpl->keyFrameList.Remove(time); + + delete pKeyValue; + } + + r = _pAnimationBaseImpl->keyFrameList.Add(time, dynamic_cast< Object* >(pFloatObj)); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add to key frame list."); + } + + return r; + +CATCH: + delete pFloatObj; + return r; +} + +result +FloatAnimation::GetKeyFrameAt(int index, long& time, float& value) const +{ + SysTryReturnResult(NID_UI_ANIM, (index >= 0 && index < _pAnimationBaseImpl->keyFrameList.GetCount()), + E_OUT_OF_RANGE, "Index (%d) is out of range.", index); + + result r = E_SUCCESS; + Object* pObjValue = null; + ComparerT< long > comparer; + Float* pFloatValue = null; + + ArrayListT< long >* pKeyList = new (std::nothrow) ArrayListT< long >; + ICollectionT< long >* pKeyN = _pAnimationBaseImpl->keyFrameList.GetKeysN(); + + SysTryCatch(NID_UI_ANIM, (pKeyList && pKeyN), r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = pKeyList->Construct(*pKeyN); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Failed to construct key list."); + SysTryCatch(NID_UI_ANIM, (pKeyList->GetCount() > 0), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Key list count is invalid."); + + r = pKeyList->Sort(comparer); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to sort key list."); + + r = pKeyList->GetAt(index, time); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to sort key list."); + + r = _pAnimationBaseImpl->keyFrameList.GetValue(time, pObjValue); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to get key value."); + SysTryCatch(NID_UI_ANIM, (pObjValue != null), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to get key frame."); + + pFloatValue = dynamic_cast< Float* >(pObjValue); + if (pFloatValue) + { + value = pFloatValue->ToFloat(); + } + + //fall through + +CATCH: + delete pKeyN; + delete pKeyList; + return r; +} + +result +FloatAnimation::RemoveKeyFrame(long time) +{ + return _pAnimationBaseImpl->RemoveKeyFrame(time); +} + +result +FloatAnimation::RemoveKeyFrameAt(int index) +{ + return _pAnimationBaseImpl->RemoveKeyFrameAt(index); +} + +result +FloatAnimation::RemoveAllKeyFrames(void) +{ + return _pAnimationBaseImpl->RemoveAllKeyFrames(); +} + +result +FloatAnimation::SetStartValue(float startValue) +{ + _pFloatAnimationImpl->startValue = startValue; + + return E_SUCCESS; + +} + +result +FloatAnimation::SetEndValue(float endValue) +{ + _pFloatAnimationImpl->endValue = endValue; + + return E_SUCCESS; +} + +float +FloatAnimation::GetStartValue(void) const +{ + return _pFloatAnimationImpl->startValue.ToFloat(); +} + +float +FloatAnimation::GetEndValue(void) const +{ + return _pFloatAnimationImpl->endValue.ToFloat(); +} + +AnimationType +FloatAnimation::GetType(void) const +{ + return ANIMATION_TYPE_FLOAT_ANIMATION; +} + +}}} // Tizen::Ui::Animations diff --git a/src/ui/animations/FUiAnimFrameAnimator.cpp b/src/ui/animations/FUiAnimFrameAnimator.cpp new file mode 100644 index 0000000..d3656dd --- /dev/null +++ b/src/ui/animations/FUiAnimFrameAnimator.cpp @@ -0,0 +1,207 @@ +// +// 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 FUiAnimFrameAnimator.cpp + * @brief This file contains implementation of FrameAnimator class + * + * This file contains implementation of FrameAnimator class. + */ + +#include + +#include + +#include +#include + +#include "FUiAnim_FrameAnimatorImpl.h" + +using namespace Tizen::Ui::Controls; + + +namespace Tizen { namespace Ui { namespace Animations +{ + +///INIT_SYSCLASSTYPE(FrameAnimator); + +FrameAnimator::FrameAnimator(void) + : _pFrameAnimatorImpl(null) +{ +} + +FrameAnimator::~FrameAnimator(void) +{ + delete _pFrameAnimatorImpl; + _pFrameAnimatorImpl = null; +} + +result +FrameAnimator::Construct(const Frame& source) +{ + SysAssertf((_pFrameAnimatorImpl == null), "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class."); + + result r = E_SUCCESS; + + _pFrameAnimatorImpl = new (std::nothrow) _FrameAnimatorImpl(this); + SysTryReturnResult(NID_UI_ANIM, (_pFrameAnimatorImpl), E_OUT_OF_MEMORY, "Memory allocation failed."); + + r = _pFrameAnimatorImpl->Construct(source); + + if (r != E_SUCCESS) + { + delete _pFrameAnimatorImpl; + _pFrameAnimatorImpl = null; + + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] Failed to construct _FrameAnimatorImpl instance."); + return E_SYSTEM; + } + + return E_SUCCESS; +} + +result +FrameAnimator::AddFrameAnimatorEventListener(IFrameAnimatorEventListener& listener) +{ + SysTryReturnResult(NID_UI_ANIM, _pFrameAnimatorImpl->IsAnimationSupported(), E_UNSUPPORTED_OPERATION, "Failed to add IFrameAnimatorEventListener instance as animation is unsupported."); + + result r = E_SUCCESS; + + r = _pFrameAnimatorImpl->AddFrameAnimatorEventListener(listener); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add IFrameAnimatorEventListener instance."); + + return r; +} + +result +FrameAnimator::RemoveFrameAnimatorEventListener(IFrameAnimatorEventListener& listener) +{ + SysTryReturnResult(NID_UI_ANIM, _pFrameAnimatorImpl->IsAnimationSupported(), E_UNSUPPORTED_OPERATION, "The animation is unsupported."); + + result r = E_SUCCESS; + + r = _pFrameAnimatorImpl->RemoveFrameAnimatorEventListener(listener); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to remove IFrameAnimatorEventListener instance."); + + return r; +} + +AnimatorStatus +FrameAnimator::GetStatus(void) const +{ + if (_pFrameAnimatorImpl->IsAnimationSupported()) + { + return _pFrameAnimatorImpl->GetFrameAnimatorStatus(); + } + + return ANIMATOR_STATUS_STOPPED; +} + +result +FrameAnimator::SetCurrentForm(const Form& form) +{ + SysTryReturnResult(NID_UI_ANIM, _pFrameAnimatorImpl->GetFrameAnimatorStatus() == ANIMATOR_STATUS_STOPPED, E_INVALID_OPERATION, "Frame animator is already animating."); + + result r = _pFrameAnimatorImpl->SetCurrentForm(form); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "Propagating."); + + return r; +} + +result +FrameAnimator::SetCurrentForm(Form *pForm) +{ + SysTryReturnResult(NID_UI_ANIM, pForm != null, E_INVALID_ARG, "pForm is null."); + return SetCurrentForm(*pForm); +} + +void +FrameAnimator::SetFormTransitionAnimation(FrameAnimatorFormTransitionAnimation animation, long duration, AnimationInterpolatorType interpolator) +{ + if (duration > 0 && duration <= 1000) + { + _pFrameAnimatorImpl->SetDuration(duration); + } + else + { + SysLog(NID_UI_ANIM, "Invalid argument(s) is used. duration =%d", duration); + } + + if (animation >= FRAME_ANIMATOR_FORM_TRANSITION_ANIMATION_TRANSLATE_LEFT + && animation < FRAME_ANIMATOR_FORM_TRANSITION_ANIMATION_MAX) + { + _pFrameAnimatorImpl->SetAnimationEffectType(animation); + } + else + { + SysLog(NID_UI_ANIM, "Invalid argument(s) is used. The type of form transition animation is invalid. [%d]", animation); + } + + if (interpolator >= ANIMATION_INTERPOLATOR_LINEAR + && interpolator <= ANIMATION_INTERPOLATOR_BEZIER) + { + _pFrameAnimatorImpl->SetAnimInterpolatorType(interpolator); + } + else + { + SysLog(NID_UI_ANIM, "Invalid argument(s) is used. The type of interpolator is invalid [%d].", interpolator); + } +} + +void +FrameAnimator::GetFormTransitionAnimation(FrameAnimatorFormTransitionAnimation& animation, long& duration, AnimationInterpolatorType& interpolator) const +{ + animation = _pFrameAnimatorImpl->GetAnimationEffectType(); + duration = _pFrameAnimatorImpl->GetDuration(); + interpolator = _pFrameAnimatorImpl->GetAnimInterpolatorType(); +} + +result +FrameAnimator::SetFormTransitionBezierControlPoints(float time1, float value1, float time2, float value2) +{ + SysTryReturnResult(NID_UI_ANIM, _pFrameAnimatorImpl->GetAnimInterpolatorType() == ANIMATION_INTERPOLATOR_BEZIER + , E_INVALID_OPERATION, "Interpolation type is non-bezier."); + SysTryReturnResult(NID_UI_ANIM, ((time1 >= 0.0f) && (time1 <= 1.0f)), E_INVALID_ARG, "Invalid argument(s) is used. time1 = %f", time1); + SysTryReturnResult(NID_UI_ANIM, ((value1 >= 0.0f) && (value1 <= 1.0f)), E_INVALID_ARG, "Invalid argument(s) is used. value1 = %f", value1); + SysTryReturnResult(NID_UI_ANIM, ((time2 >= 0.0f) && (time2 <= 1.0f)), E_INVALID_ARG, "Invalid argument(s) is used. time2 = %f", time2); + SysTryReturnResult(NID_UI_ANIM, ((value2 >= 0.0f) && (value2 <= 1.0f)), E_INVALID_ARG, "Invalid argument(s) is used. value2 = %f", value2); + + _pFrameAnimatorImpl->SetFormTransitionBezierControlPoints(time1, value1, time2, value2); + + return E_SUCCESS; +} + +result +FrameAnimator::GetFormTransitionBezierControlPoints(float& time1, float& value1, float& time2, float& value2) const +{ + SysTryReturnResult(NID_UI_ANIM, _pFrameAnimatorImpl->GetAnimInterpolatorType() == ANIMATION_INTERPOLATOR_BEZIER + , E_INVALID_OPERATION, "Interpolation type is non-bezier."); + + _pFrameAnimatorImpl->GetFormTransitionBezierControlPoints(time1, value1, time2, value2); + + return E_SUCCESS; +} + +result +FrameAnimator::StopAllAnimations(void) +{ + return _pFrameAnimatorImpl->StopAllAnimations(); +} + + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnimIVisualElementAnimationStatusEventListener.cpp b/src/ui/animations/FUiAnimIVisualElementAnimationStatusEventListener.cpp new file mode 100644 index 0000000..a01e9f9 --- /dev/null +++ b/src/ui/animations/FUiAnimIVisualElementAnimationStatusEventListener.cpp @@ -0,0 +1,35 @@ +// +// 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 FUiAnimIVisualElementAnimationStatusEventListener.cpp + * @brief This file contains implementation of IVisualElementAnimationStatusEventListener class + * + * This file contains implementation IVisualElementAnimationStatusEventListener class. + */ + +#include + +namespace Tizen { namespace Ui { namespace Animations +{ + +IVisualElementAnimationStatusEventListener::~IVisualElementAnimationStatusEventListener(void) +{ +} + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnimIVisualElementAnimationTickEventListener.cpp b/src/ui/animations/FUiAnimIVisualElementAnimationTickEventListener.cpp new file mode 100644 index 0000000..04f7d47 --- /dev/null +++ b/src/ui/animations/FUiAnimIVisualElementAnimationTickEventListener.cpp @@ -0,0 +1,36 @@ +// +// 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 FUiAnimIVisualElementAnimationTickEventListener.cpp + * @brief This file contains implementation of IVisualElementAnimationTickEventListener class + * + * This file contains implementation IVisualElementAnimationTickEventListener class. + */ + +#include + +namespace Tizen { namespace Ui { namespace Animations +{ + +IVisualElementAnimationTickEventListener::~IVisualElementAnimationTickEventListener(void) +{ + +} + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnimIVisualElementAnimationTimingFunction.cpp b/src/ui/animations/FUiAnimIVisualElementAnimationTimingFunction.cpp new file mode 100644 index 0000000..9fd80ce --- /dev/null +++ b/src/ui/animations/FUiAnimIVisualElementAnimationTimingFunction.cpp @@ -0,0 +1,42 @@ +// +// 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 FUiAnimIVisualElementAnimationTimingFunction.cpp + * @brief This file contains implementation of IVisualElementAnimationTimingFunction class + * + * This file contains implementation IVisualElementAnimationTimingFunction class. + */ + +#include + +namespace Tizen { namespace Ui { namespace Animations +{ + + +IVisualElementAnimationTimingFunction::IVisualElementAnimationTimingFunction(void) +{ + +} + +IVisualElementAnimationTimingFunction::~IVisualElementAnimationTimingFunction(void) +{ + +} + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnimIVisualElementAnimationValueInterpolator.cpp b/src/ui/animations/FUiAnimIVisualElementAnimationValueInterpolator.cpp new file mode 100644 index 0000000..bbe7a6b --- /dev/null +++ b/src/ui/animations/FUiAnimIVisualElementAnimationValueInterpolator.cpp @@ -0,0 +1,42 @@ +// +// 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 FUiAnimIVisualElementAnimationValueInterpolator.cpp + * @brief This file contains implementation of IVisualElementAnimationValueInterpolator class + * + * This file contains implementation IVisualElementAnimationValueInterpolator class. + */ + +#include + +namespace Tizen { namespace Ui { namespace Animations +{ + + +IVisualElementAnimationValueInterpolator::IVisualElementAnimationValueInterpolator(void) +{ + +} + +IVisualElementAnimationValueInterpolator::~IVisualElementAnimationValueInterpolator(void) +{ + +} + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnimIntegerAnimation.cpp b/src/ui/animations/FUiAnimIntegerAnimation.cpp new file mode 100644 index 0000000..459d5ca --- /dev/null +++ b/src/ui/animations/FUiAnimIntegerAnimation.cpp @@ -0,0 +1,396 @@ +// +// 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 FUiAnimIntegerAnimation.cpp + * @brief This file contains implementation of IntegerAnimation.cpp class + * This file contains implementation of IntegerAnimation.cpp class. + */ + +#include + +#include +#include + +#include + +#include "FUiAnim_IntegerAnimationImpl.h" +#include "FUiAnim_AnimationBaseImpl.h" + + +using namespace Tizen::Base; +using namespace Tizen::Ui::Animations; +using namespace Tizen::Base::Collection; + + +namespace Tizen { namespace Ui { namespace Animations +{ + +IntegerAnimation::IntegerAnimation(void) + : _pIntegerAnimationImpl(null) +{ +} + +IntegerAnimation::IntegerAnimation(int startValue, int endValue, long duration, AnimationInterpolatorType interpolator) + : AnimationBase(duration, interpolator) + , _pIntegerAnimationImpl(null) +{ + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_ANIM, (_pAnimationBaseImpl), r, "[%s] Propagating.", GetErrorMessage(r)); + + _pIntegerAnimationImpl = new (std::nothrow) _IntegerAnimationImpl(this); + if (_pIntegerAnimationImpl == null) + { + SysLogException(NID_UI_ANIM, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + delete _pAnimationBaseImpl; + _pAnimationBaseImpl = null; + + return; + } + + _pIntegerAnimationImpl->startValue = startValue; + _pIntegerAnimationImpl->endValue = endValue; +} + +IntegerAnimation::~IntegerAnimation(void) +{ + delete _pIntegerAnimationImpl; + _pIntegerAnimationImpl = null; +} + + +IntegerAnimation::IntegerAnimation(const IntegerAnimation& integerAnimation) + : AnimationBase(integerAnimation) + , _pIntegerAnimationImpl(null) +{ + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_ANIM, (_pAnimationBaseImpl), r, "[%s] Propagating.", GetErrorMessage(r)); + + _pIntegerAnimationImpl = new (std::nothrow) _IntegerAnimationImpl(this); + SysTryCatch(NID_UI_ANIM, (_pIntegerAnimationImpl != null), , E_OUT_OF_MEMORY, "Memory allocation failed."); + + r = _pIntegerAnimationImpl->CopyIntegerAnimationValue(integerAnimation); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to copy integer animation value."); + + return; + +CATCH: + delete _pAnimationBaseImpl; + _pAnimationBaseImpl = null; + delete _pIntegerAnimationImpl; + _pIntegerAnimationImpl = null; +} + +IntegerAnimation& +IntegerAnimation::operator =(const IntegerAnimation& rhs) +{ + ClearLastResult(); + + if ((&rhs) != this) + { + result r = E_SUCCESS; + + AnimationBase::operator =(rhs); + + r = _pIntegerAnimationImpl->CopyIntegerAnimationValue(rhs); + SysTryReturn(NID_UI_ANIM, (r == E_SUCCESS), *this, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to copy integer animation."); + } + + return *this; +} + +bool +IntegerAnimation::operator ==(const IntegerAnimation& rhs) const +{ + result r = E_SUCCESS; + + if (_pAnimationBaseImpl->keyFrameList.GetCount() != rhs._pAnimationBaseImpl->keyFrameList.GetCount()) + { + return false; + } + + ArrayListT< long >* pKeyList1 = null; + ArrayListT< long >* pKeyList2 = null; + ICollectionT< long >* pKeyN = _pAnimationBaseImpl->keyFrameList.GetKeysN(); + ICollectionT< long >* pKeyN1 = rhs._pAnimationBaseImpl->keyFrameList.GetKeysN(); + + if (_pAnimationBaseImpl->keyFrameList.GetCount() != 0) + { + pKeyList1 = new (std::nothrow) ArrayListT< long >; + SysTryCatch(NID_UI_ANIM, (!(pKeyList1 == null || pKeyN == null)), , E_OUT_OF_MEMORY, "Memory allocation failed."); + + r = pKeyList1->Construct(*pKeyN); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), , E_SYSTEM, "[E_SYSTEM] Failed to construct key list."); + + pKeyList2 = new (std::nothrow) ArrayListT< long >; + SysTryCatch(NID_UI_ANIM, !(pKeyList2 == null || pKeyN1 == null), , E_OUT_OF_MEMORY, "Memory allocation failed."); + + r = pKeyList2->Construct(*pKeyN1); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), , E_SYSTEM, "[E_SYSTEM] Failed to construct key list."); + + ComparerT< long > comparer; + + r = pKeyList1->Sort(comparer); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to sort key list."); + + r = pKeyList2->Sort(comparer); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to sort key list."); + + long time1 = 0; + long time2 = 0; + Object* pObjValue1 = null; + Object* pObjValue2 = null; + for (int index = 0; index < _pAnimationBaseImpl->keyFrameList.GetCount(); index++) + { + pKeyList1->GetAt(index, time1); + pKeyList2->GetAt(index, time2); + if (time1 != time2) + { + goto CATCH; + } + + _pAnimationBaseImpl->keyFrameList.GetValue(time1, pObjValue1); + rhs._pAnimationBaseImpl->keyFrameList.GetValue(time2, pObjValue2); + if ((!pObjValue1) && (!pObjValue2)) + { + continue; + } + else if ((!pObjValue1) || (!pObjValue2)) + { + goto CATCH; + } + + Integer* pIntValue1 = dynamic_cast< Integer* >(pObjValue1); + if (pIntValue1 == null) + { + goto CATCH; + } + Integer* pIntValue2 = dynamic_cast< Integer* >(pObjValue2); + if (pIntValue2 == null) + { + goto CATCH; + } + if (!(pIntValue1->Equals(*pIntValue2))) + { + goto CATCH; + } + + } + + delete pKeyList1; + delete pKeyList2; + } + + delete pKeyN; + delete pKeyN1; + + if (!((_pIntegerAnimationImpl->startValue).Equals(rhs._pIntegerAnimationImpl->startValue)) || + !((_pIntegerAnimationImpl->endValue).Equals(rhs._pIntegerAnimationImpl->endValue))) + { + return false; + } + + return _pAnimationBaseImpl->CompareTimingValues(rhs); + +CATCH: + delete pKeyN; + delete pKeyN1; + delete pKeyList1; + delete pKeyList2; + return false; +} + +bool +IntegerAnimation::operator !=(const IntegerAnimation& rhs) const +{ + return !(*this == rhs); +} + +bool +IntegerAnimation::Equals(const Object& rhs) const +{ + const IntegerAnimation* pIntAnim = dynamic_cast< const IntegerAnimation* >(&rhs); + + if (pIntAnim == null) + { + return false; + } + + return (*this == *pIntAnim); +} + +int +IntegerAnimation::GetHashCode(void) const +{ + return (((int) GetRepeatCount()) + ((int) GetOffset()) + ((int) GetDuration()) + ((int) GetDelay())); +} + +result +IntegerAnimation::GetAnimatedValue(long currentTime, int& animatedValue) const +{ + SysTryReturnResult(NID_UI_ANIM, (currentTime >= 0 && currentTime <= GetDuration()), E_INVALID_ARG, "Invalid argument(s) is used. currentTime = %ld", currentTime); + + float actualProgress = _pAnimationBaseImpl->GetActualProgressValue(currentTime); + SysTryReturnResult(NID_UI_ANIM, (actualProgress >= 0.0f && actualProgress <= 1.0f), E_SYSTEM, "A system error has been occurred. Failed to calculate progress."); + + return _pIntegerAnimationImpl->GetAnimatedValue(actualProgress, animatedValue); +} + +result +IntegerAnimation::AddKeyFrame(long time, int value) +{ + SysTryReturnResult(NID_UI_ANIM, (time > 0 && time != _pAnimationBaseImpl->duration), E_INVALID_ARG, "Invalid argument(s) is used. time = %ld", time); + + result r = E_SUCCESS; + Integer* pIntObj = null; + + if (time > _pAnimationBaseImpl->duration) + { + pIntObj = new (std::nothrow) Integer(_pIntegerAnimationImpl->endValue); + SysTryReturnResult(NID_UI_ANIM, (pIntObj), E_OUT_OF_MEMORY, "Memory allocation failed."); + + r = _pAnimationBaseImpl->keyFrameList.Add(_pAnimationBaseImpl->duration, dynamic_cast< Object* >(pIntObj)); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add to key frame list."); + + _pAnimationBaseImpl->duration = time; + _pIntegerAnimationImpl->endValue = value; + } + else + { + pIntObj = new (std::nothrow) Integer(value); + SysTryReturnResult(NID_UI_ANIM, (pIntObj), E_OUT_OF_MEMORY, "Memory allocation failed."); + Object* pKeyValue = null; + _pAnimationBaseImpl->keyFrameList.GetValue(time, pKeyValue); + if (pKeyValue) + { + _pAnimationBaseImpl->keyFrameList.Remove(time); + delete pKeyValue; + } + + r = _pAnimationBaseImpl->keyFrameList.Add(time, dynamic_cast< Object* >(pIntObj)); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add to key frame list."); + } + + return r; + +CATCH: + delete pIntObj; + return r; +} + +result +IntegerAnimation::GetKeyFrameAt(int index, long& time, int& 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); + + result r = E_SUCCESS; + Object* pObjValue = null; + Integer* pIntValue = null; + ComparerT< long > comparer; + + ArrayListT< long >* pKeyList = new (std::nothrow) ArrayListT< long >; + ICollectionT< long >* pKeyN = _pAnimationBaseImpl->keyFrameList.GetKeysN(); + + SysTryCatch(NID_UI_ANIM, (pKeyList != null && pKeyN != null), r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = pKeyList->Construct(*pKeyN); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Failed to construct key list."); + + SysTryCatch(NID_UI_ANIM, !(pKeyList->GetCount() <= 0), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Key list count is invalid."); + + r = pKeyList->Sort(comparer); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to sort key list."); + + r = pKeyList->GetAt(index, time); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to sort key list."); + + r = _pAnimationBaseImpl->keyFrameList.GetValue(time, pObjValue); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to get key value."); + SysTryCatch(NID_UI_ANIM, (pObjValue != null), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to get key frame."); + + pIntValue = dynamic_cast< Integer* >(pObjValue); + if (pIntValue) + { + value = pIntValue->ToInt(); + } + + //fall through + +CATCH: + delete pKeyN; + delete pKeyList; + + return r; +} + +result +IntegerAnimation::RemoveKeyFrame(long time) +{ + return _pAnimationBaseImpl->RemoveKeyFrame(time); +} + +result +IntegerAnimation::RemoveKeyFrameAt(int index) +{ + return _pAnimationBaseImpl->RemoveKeyFrameAt(index); +} + +result +IntegerAnimation::RemoveAllKeyFrames(void) +{ + return _pAnimationBaseImpl->RemoveAllKeyFrames(); +} + +result +IntegerAnimation::SetStartValue(int startValue) +{ + _pIntegerAnimationImpl->startValue = startValue; + + return E_SUCCESS; +} + +result +IntegerAnimation::SetEndValue(int endValue) +{ + _pIntegerAnimationImpl->endValue = endValue; + + return E_SUCCESS; +} + +int +IntegerAnimation::GetStartValue(void) const +{ + return _pIntegerAnimationImpl->startValue.ToInt(); +} + +int +IntegerAnimation::GetEndValue(void) const +{ + return _pIntegerAnimationImpl->endValue.ToInt(); +} + +AnimationType +IntegerAnimation::GetType(void) const +{ + return ANIMATION_TYPE_INTEGER_ANIMATION; +} + + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnimLinearTimingFunction.cpp b/src/ui/animations/FUiAnimLinearTimingFunction.cpp new file mode 100644 index 0000000..374e60f --- /dev/null +++ b/src/ui/animations/FUiAnimLinearTimingFunction.cpp @@ -0,0 +1,50 @@ +// +// 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 FUiAnimLinearTimingFunction.cpp + * @brief This file contains implementation of LinearTimingFunction class + * + * This file contains implementation LinearTimingFunction class. + */ + +#include + + +namespace Tizen { namespace Ui { namespace Animations +{ + + +LinearTimingFunction::LinearTimingFunction(void) +{ + +} + +LinearTimingFunction::~LinearTimingFunction(void) +{ + +} + +float +LinearTimingFunction::CalculateProgress(float timeProgress) const +{ + return timeProgress; +} + + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnimParallelAnimationGroup.cpp b/src/ui/animations/FUiAnimParallelAnimationGroup.cpp new file mode 100644 index 0000000..4447893 --- /dev/null +++ b/src/ui/animations/FUiAnimParallelAnimationGroup.cpp @@ -0,0 +1,342 @@ +// +// 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 FUiAnimParallelAnimationGroup.cpp + * @brief This file contains implementation of ParallelAnimationGroup class + * + * This file contains implementation of ParallelAnimationGroup class. + */ + +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "FUiAnim_AnimationGroupImpl.h" + + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; + + +namespace Tizen { namespace Ui { namespace Animations +{ + +ParallelAnimationGroup::ParallelAnimationGroup(void) + : AnimationGroup() + , _pParallelAnimationGroupImpl(null) +{ +} + +ParallelAnimationGroup::~ParallelAnimationGroup(void) +{ +} + +ParallelAnimationGroup::ParallelAnimationGroup(const ParallelAnimationGroup& animationGroup) + : AnimationGroup(animationGroup) + , _pParallelAnimationGroupImpl(null) +{ + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_ANIM, (_pAnimationGroupImpl), r, "[%s] Propagating.", GetErrorMessage(r)); + + int animationCount = animationGroup._pAnimationGroupImpl->animationList.GetCount(); + + _AnimationGroupImpl::AnimationStore animStore; + + for (int index = 0; index < animationCount; index++) + { + animationGroup._pAnimationGroupImpl->animationList.GetAt(index, animStore); + + r = AddAnimation(animStore.animTarget, *(animStore.pAnimationBase)); + if (r != E_SUCCESS) + { + SysLogException(NID_UI_ANIM, r, "[%s] Propagating.", GetErrorMessage(r)); + + delete _pAnimationGroupImpl; + _pAnimationGroupImpl = null; + + return; + } + } +} + +ParallelAnimationGroup& +ParallelAnimationGroup::operator =(const ParallelAnimationGroup& rhs) +{ + ClearLastResult(); + + if ((&rhs) != this) + { + result r = E_SUCCESS; + + // Deleting the contents + if (_pAnimationGroupImpl->animationList.GetCount() > 0) + { + int index = _pAnimationGroupImpl->animationList.GetCount(); + + while (index > 0) + { + _AnimationGroupImpl::AnimationStore animStore; + + _pAnimationGroupImpl->animationList.GetAt(index - 1, animStore); + + if (animStore.pAnimationBase) + { + delete animStore.pAnimationBase; + animStore.pAnimationBase = null; + } + + index--; + } + + _pAnimationGroupImpl->animationList.RemoveAll(); + } + + // Copying the contents + int animationCount = rhs._pAnimationGroupImpl->animationList.GetCount(); + + for (int index = 0; index < animationCount; index++) + { + _AnimationGroupImpl::AnimationStore animStore; + + rhs._pAnimationGroupImpl->animationList.GetAt(index, animStore); + + _AnimationGroupImpl::AnimationStore animStoreNew; + animStoreNew.animTarget = animStore.animTarget; + + animStoreNew.pAnimationBase = _pAnimationGroupImpl->CloneAnimation(animStore.animTarget, *(animStore.pAnimationBase), r); + SysTryReturn(NID_UI_ANIM, (animStoreNew.pAnimationBase), *this, r, "[%s] Failed to clone animation.", GetErrorMessage(r)); + + r = _pAnimationGroupImpl->animationList.Add(animStoreNew); + SysTryReturn(NID_UI_ANIM, (r == E_SUCCESS), *this, r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + + return *this; +} + +bool +ParallelAnimationGroup::operator ==(const ParallelAnimationGroup& rhs) const +{ + if (_pAnimationGroupImpl->animationList.GetCount() != rhs._pAnimationGroupImpl->animationList.GetCount()) + { + return false; + } + + int animationCount = rhs._pAnimationGroupImpl->animationList.GetCount(); + + for (int index = 0; index < animationCount; index++) + { + _AnimationGroupImpl::AnimationStore animStore; + + _pAnimationGroupImpl->animationList.GetAt(index, animStore); + + if (!(rhs._pAnimationGroupImpl->animationList.Contains(animStore))) + { + return false; + } + } + + return true; +} + +bool +ParallelAnimationGroup::operator !=(const ParallelAnimationGroup& rhs) const +{ + return !(*this == rhs); +} + +bool +ParallelAnimationGroup::Equals(const Object& obj) const +{ + const ParallelAnimationGroup* pParallelGrp = dynamic_cast< const ParallelAnimationGroup* >(&obj); + if (pParallelGrp == null) + { + return false; + } + + return (*this == *pParallelGrp); +} + +int +ParallelAnimationGroup::GetHashCode(void) const +{ + return GetAnimationCount(); +} + +void +ParallelAnimationGroup::RemoveAllAnimations(void) +{ + int index = _pAnimationGroupImpl->animationList.GetCount() - 1; + + while (index >= 0) + { + _AnimationGroupImpl::AnimationStore animStore; + + _pAnimationGroupImpl->animationList.GetAt(index, animStore); + + delete animStore.pAnimationBase; + animStore.pAnimationBase = null; + + index--; + } + + _pAnimationGroupImpl->animationList.RemoveAll(); +} + +int +ParallelAnimationGroup::GetAnimationCount(void) const +{ + return _pAnimationGroupImpl->animationList.GetCount(); +} + +result +ParallelAnimationGroup::AddAnimation(AnimationTargetType animTarget, const AnimationBase& animation) +{ + SysTryReturnResult(NID_UI_ANIM, (animTarget >= ANIMATION_TARGET_NONE && animTarget <= ANIMATION_TARGET_MAX), E_INVALID_ARG, "Invalid argument(s) is used. animTarget is invalid."); + + _AnimationGroupImpl::AnimationStore animStoreNew; + + animStoreNew.animTarget = animTarget; + + result r = E_SUCCESS; + + animStoreNew.pAnimationBase = _pAnimationGroupImpl->CloneAnimation(animTarget, const_cast< AnimationBase& >(animation), r); + SysTryReturnResult(NID_UI_ANIM, (animStoreNew.pAnimationBase), r, "Failed to clone animation "); + + int animationCount = _pAnimationGroupImpl->animationList.GetCount(); + int index = 0; + + _AnimationGroupImpl::AnimationStore animStore; + + for (index = 0; index < animationCount; index++) + { + _pAnimationGroupImpl->animationList.GetAt(index, animStore); + + if (animStore.animTarget == animTarget) + { + break; + } + } + + r = _pAnimationGroupImpl->animationList.Add(animStoreNew); + if (r != E_SUCCESS) + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add animation."); + + delete animStoreNew.pAnimationBase; + animStoreNew.pAnimationBase = null; + + return E_SYSTEM; + } + + if (index < animationCount) + { + _pAnimationGroupImpl->animationList.RemoveAt(index); + + delete animStore.pAnimationBase; + animStore.pAnimationBase = null; + } + + return E_SUCCESS; +} + +result +ParallelAnimationGroup::RemoveAnimation(AnimationTargetType animTarget) +{ + SysTryReturnResult(NID_UI_ANIM, (animTarget >= ANIMATION_TARGET_NONE && animTarget <= ANIMATION_TARGET_MAX), E_INVALID_ARG, "Invalid argument(s) is used. animTarget is invalid."); + + int animationCount = _pAnimationGroupImpl->animationList.GetCount(); + _AnimationGroupImpl::AnimationStore animStore; + + for (int index = 0; index < animationCount; index++) + { + _pAnimationGroupImpl->animationList.GetAt(index, animStore); + + if (animStore.animTarget == animTarget) + { + _pAnimationGroupImpl->animationList.RemoveAt(index); + + delete animStore.pAnimationBase; + animStore.pAnimationBase = null; + + return E_SUCCESS; + } + } + + return E_OBJ_NOT_FOUND; +} + +AnimationBase* +ParallelAnimationGroup::GetAnimationN(AnimationTargetType animTarget) const +{ + result r = E_SUCCESS; + + int animationCount = _pAnimationGroupImpl->animationList.GetCount(); + _AnimationGroupImpl::AnimationStore animStore; + + for (int index = 0; index < animationCount; index++) + { + _pAnimationGroupImpl->animationList.GetAt(index, animStore); + + if (animStore.animTarget == animTarget) + { + SysTryReturn(NID_UI_ANIM, (animStore.pAnimationBase), null, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Animation is invalid."); + + AnimationBase *pAnimationBase = _pAnimationGroupImpl->CloneAnimation(animTarget, *(animStore.pAnimationBase), r); + SysTryReturn(NID_UI_ANIM, (pAnimationBase), null, r, "[%s] Failed to clone animation.", GetErrorMessage(r)); + + return pAnimationBase; + } + } + + return null; +} + +bool +ParallelAnimationGroup::IsAnimationAdded(AnimationTargetType animTarget) +{ + int animationCount = _pAnimationGroupImpl->animationList.GetCount(); + _AnimationGroupImpl::AnimationStore animStore; + + for (int index = 0; index < animationCount; index++) + { + _pAnimationGroupImpl->animationList.GetAt(index, animStore); + + if (animStore.animTarget == animTarget) + { + return true; + } + } + + return false; +} + +AnimationGroupType +ParallelAnimationGroup::GetType(void) const +{ + return ANIMATION_GROUP_TYPE_PARALLEL; +} + +}}} // Tizen::Ui::Animations diff --git a/src/ui/animations/FUiAnimPointAnimation.cpp b/src/ui/animations/FUiAnimPointAnimation.cpp new file mode 100644 index 0000000..b9149c0 --- /dev/null +++ b/src/ui/animations/FUiAnimPointAnimation.cpp @@ -0,0 +1,396 @@ +// +// 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 FUiAnimPointAnimation.cpp + * @brief This file contains implementation of PointAnimation class + * + * This file contains implementation of PointAnimation class. + */ + +#include + +#include +#include + +#include + +#include "FUiAnim_PointAnimationImpl.h" +#include "FUiAnim_AnimationBaseImpl.h" + + +using namespace Tizen::Base; +using namespace Tizen::Ui::Animations; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; + + +namespace Tizen { namespace Ui { namespace Animations +{ + +PointAnimation::PointAnimation(void) + : _pPointAnimationImpl(null) +{ +} + +PointAnimation::PointAnimation(const Point& startValue, const Point& endValue, long duration, AnimationInterpolatorType interpolator) + : AnimationBase(duration, interpolator) + , _pPointAnimationImpl(null) +{ + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_ANIM, (_pAnimationBaseImpl), r, "[%s] Propagating.", GetErrorMessage(r)); + + _pPointAnimationImpl = new (std::nothrow) _PointAnimationImpl(this); + if (_pPointAnimationImpl == null) + { + SysLogException(NID_UI_ANIM, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + delete _pAnimationBaseImpl; + _pAnimationBaseImpl = null; + + return; + } + + _pPointAnimationImpl->startValue = startValue; + _pPointAnimationImpl->endValue = endValue; +} + +PointAnimation::~PointAnimation(void) +{ + delete _pPointAnimationImpl; + _pPointAnimationImpl = null; +} + +PointAnimation::PointAnimation(const PointAnimation& pointAnimation) + : AnimationBase(pointAnimation) + , _pPointAnimationImpl(null) +{ + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_ANIM, (_pAnimationBaseImpl), r, "[%s] Propagating.", GetErrorMessage(r)); + + _pPointAnimationImpl = new (std::nothrow) _PointAnimationImpl(this); + SysTryCatch(NID_UI_ANIM, (_pPointAnimationImpl), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = _pPointAnimationImpl->CopyPointAnimationValue(pointAnimation); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to copy point animation value."); + + return; + +CATCH: + delete _pAnimationBaseImpl; + _pAnimationBaseImpl = null; + delete _pPointAnimationImpl; + _pPointAnimationImpl = null; +} + +PointAnimation& +PointAnimation::operator =(const PointAnimation& rhs) +{ + ClearLastResult(); + + if ((&rhs) != this) + { + result r = E_SUCCESS; + + AnimationBase::operator =(rhs); + + r = _pPointAnimationImpl->CopyPointAnimationValue(rhs); + SysTryReturn(NID_UI_ANIM, (r == E_SUCCESS), *this, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to copy point animation value."); + } + + return *this; +} + +bool +PointAnimation::operator ==(const PointAnimation& rhs) const +{ + result r = E_SUCCESS; + + if (_pAnimationBaseImpl->keyFrameList.GetCount() != rhs._pAnimationBaseImpl->keyFrameList.GetCount()) + { + return false; + } + + ArrayListT< long >* pKeyList1 = null; + ArrayListT< long >* pKeyList2 = null; + ICollectionT< long >* pKeyN = _pAnimationBaseImpl->keyFrameList.GetKeysN(); + ICollectionT< long >* pKeyN1 = rhs._pAnimationBaseImpl->keyFrameList.GetKeysN(); + + if (_pAnimationBaseImpl->keyFrameList.GetCount() != 0) + { + pKeyList1 = new (std::nothrow) ArrayListT< long >; + SysTryCatch(NID_UI_ANIM, (pKeyList1 && pKeyN), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = pKeyList1->Construct(*pKeyN); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), , E_SYSTEM, "[E_SYSTEM] Failed to construct key list."); + + pKeyList2 = new (std::nothrow) ArrayListT< long >; + SysTryCatch(NID_UI_ANIM, (pKeyList2 && pKeyN1), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = pKeyList2->Construct(*pKeyN1); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), , E_SYSTEM, "[E_SYSTEM] Failed to construct key list."); + + ComparerT< long > comparer; + + r = pKeyList1->Sort(comparer); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to sort key list."); + + r = pKeyList2->Sort(comparer); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to sort key list."); + + long time1 = 0; + long time2 = 0; + Object* pObjValue1 = null; + Object* pObjValue2 = null; + + for (int index = 0; index < _pAnimationBaseImpl->keyFrameList.GetCount(); index++) + { + pKeyList1->GetAt(index, time1); + pKeyList2->GetAt(index, time2); + if (time1 != time2) + { + goto CATCH; + } + + _pAnimationBaseImpl->keyFrameList.GetValue(time1, pObjValue1); + rhs._pAnimationBaseImpl->keyFrameList.GetValue(time2, pObjValue2); + + if ((!pObjValue1) && (!pObjValue2)) + { + continue; + } + else if ((!pObjValue1) || (!pObjValue2)) + { + goto CATCH; + } + + Point* pPointValue1 = dynamic_cast< Point* >(pObjValue1); + if (pPointValue1 == null) + { + goto CATCH; + } + Point* pPointValue2 = dynamic_cast< Point* >(pObjValue2); + if (pPointValue2 == null) + { + goto CATCH; + } + if (!(pPointValue1->Equals(*pPointValue2))) + { + goto CATCH; + } + } + delete pKeyList1; + delete pKeyList2; + } + + delete pKeyN; + delete pKeyN1; + + if (!((_pPointAnimationImpl->startValue).Equals(rhs._pPointAnimationImpl->startValue)) || + !((_pPointAnimationImpl->endValue).Equals(rhs._pPointAnimationImpl->endValue))) + { + return false; + } + + return _pAnimationBaseImpl->CompareTimingValues(rhs); + +CATCH: + delete pKeyN; + delete pKeyN1; + delete pKeyList1; + delete pKeyList2; + + return false; +} + +bool +PointAnimation::operator !=(const PointAnimation& rhs) const +{ + return !(*this == rhs); +} + +bool +PointAnimation::Equals(const Object& rhs) const +{ + const PointAnimation* pPointAnim = dynamic_cast< const PointAnimation* >(&rhs); + if (pPointAnim == null) + { + return false; + } + + return (*this == *pPointAnim); +} + +int +PointAnimation::GetHashCode(void) const +{ + return (((int) GetRepeatCount()) + ((int) GetOffset()) + ((int) GetDuration()) + ((int) GetDelay())); +} + +result +PointAnimation::GetAnimatedValue(long currentTime, Point& animatedValue) const +{ + SysTryReturnResult(NID_UI_ANIM, (currentTime >= 0 && currentTime <= GetDuration()), E_INVALID_ARG, "Invalid argument(s) is used. currentTime = %ld", currentTime); + + float actualProgress = _pAnimationBaseImpl->GetActualProgressValue(currentTime); + SysTryReturnResult(NID_UI_ANIM, (actualProgress >= 0.0f && actualProgress <= 1.0f), E_SYSTEM, "System error in calculating progress."); + + return _pPointAnimationImpl->GetAnimatedValue(actualProgress, animatedValue); +} + +result +PointAnimation::AddKeyFrame(long time, const Point& value) +{ + SysTryReturnResult(NID_UI_ANIM, (time > 0 && time != _pAnimationBaseImpl->duration), E_INVALID_ARG, "Invalid argument(s) is used. time = %ld", time); + + result r = E_SUCCESS; + Point* pPointObj = null; + + if (time > _pAnimationBaseImpl->duration) + { + pPointObj = new (std::nothrow) Point(_pPointAnimationImpl->endValue); + SysTryReturnResult(NID_UI_ANIM, (pPointObj), E_OUT_OF_MEMORY, "Memory allocation failed."); + + r = _pAnimationBaseImpl->keyFrameList.Add(_pAnimationBaseImpl->duration, dynamic_cast< Object* >(pPointObj)); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. "); + + _pAnimationBaseImpl->duration = time; + _pPointAnimationImpl->endValue = value; //pointObj; + } + else + { + pPointObj = new (std::nothrow) Point(value); + SysTryReturnResult(NID_UI_ANIM, (pPointObj), E_OUT_OF_MEMORY, "Memory allocation failed."); + + Object* pKeyValue = null; + _pAnimationBaseImpl->keyFrameList.GetValue(time, pKeyValue); + if (pKeyValue) + { + _pAnimationBaseImpl->keyFrameList.Remove(time); + + delete pKeyValue; + } + r = _pAnimationBaseImpl->keyFrameList.Add(time, dynamic_cast< Object* >(pPointObj)); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred. Failed to add to key frame list."); + } + return r; + +CATCH: + delete pPointObj; + return r; +} + +result +PointAnimation::GetKeyFrameAt(int index, long& time, Point& 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); + + result r = E_SUCCESS; + Object* pObjValue = null; + Point* pPointValue = null; + ComparerT< long > comparer; + + ArrayListT< long >* pKeyList = new (std::nothrow) ArrayListT< long >; + ICollectionT< long >* pKeyN = _pAnimationBaseImpl->keyFrameList.GetKeysN(); + + SysTryCatch(NID_UI_ANIM, (pKeyList && pKeyN), r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = pKeyList->Construct(*pKeyN); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Failed to construct key list."); + + SysTryCatch(NID_UI_ANIM, (pKeyList->GetCount() > 0), , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Key list count is invalid."); + + r = pKeyList->Sort(comparer); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to sort key list."); + + r = pKeyList->GetAt(index, time); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to get the time from list."); + + r = _pAnimationBaseImpl->keyFrameList.GetValue(time, pObjValue); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to get key value."); + SysTryCatch(NID_UI_ANIM, (pObjValue != null), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to get key frame."); + + pPointValue = dynamic_cast< Point* >(pObjValue); + if (pPointValue) + { + value = *pPointValue; + } + + //fall through + +CATCH: + delete pKeyN; + delete pKeyList; + return r; +} + +result +PointAnimation::RemoveKeyFrame(long time) +{ + return _pAnimationBaseImpl->RemoveKeyFrame(time); +} + +result +PointAnimation::RemoveKeyFrameAt(int index) +{ + return _pAnimationBaseImpl->RemoveKeyFrameAt(index); +} + +result +PointAnimation::RemoveAllKeyFrames(void) +{ + return _pAnimationBaseImpl->RemoveAllKeyFrames(); +} + +result +PointAnimation::SetStartValue(const Point& startValue) +{ + _pPointAnimationImpl->startValue = startValue; + + return E_SUCCESS; +} + +result +PointAnimation::SetEndValue(const Point& endValue) +{ + _pPointAnimationImpl->endValue = endValue; + + return E_SUCCESS; +} + +Tizen::Graphics::Point +PointAnimation::GetStartValue(void) const +{ + return _pPointAnimationImpl->startValue; +} + +Tizen::Graphics::Point +PointAnimation::GetEndValue(void) const +{ + return _pPointAnimationImpl->endValue; +} + +AnimationType +PointAnimation::GetType(void) const +{ + return ANIMATION_TYPE_POINT_ANIMATION; +} + + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnimRectangleAnimation.cpp b/src/ui/animations/FUiAnimRectangleAnimation.cpp new file mode 100644 index 0000000..48ff4a4 --- /dev/null +++ b/src/ui/animations/FUiAnimRectangleAnimation.cpp @@ -0,0 +1,446 @@ +// +// 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 FUiAnimRectangleAnimation.cpp + * @brief This file contains implementation of RectangleAnimation class + * + * This file contains implementation of RectangleAnimation class. + */ + +#include +#include + +#include + +#include "FUiAnim_RectangleAnimationImpl.h" +#include "FUiAnim_AnimationBaseImpl.h" + + +using namespace Tizen::Base; +using namespace Tizen::Ui::Animations; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; + + +namespace Tizen { namespace Ui { namespace Animations +{ + +RectangleAnimation::RectangleAnimation(void) + : _pRectangleAnimationImpl(null) +{ +} + +RectangleAnimation::RectangleAnimation(const Rectangle& startValue, const Rectangle& endValue, long duration, AnimationInterpolatorType interpolator) + : AnimationBase(duration, interpolator) + , _pRectangleAnimationImpl(null) +{ + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_ANIM, (_pAnimationBaseImpl), r, "[%s] Propagating.", GetErrorMessage(r)); + + SysTryReturnVoidResult(NID_UI_ANIM, (startValue.height >= 0 && startValue.width >= 0 && endValue.height >= 0 && endValue.width >= 0), + E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. startValue = (%d, %d, %d, %d), endValue = (%d, %d, %d, %d)", + startValue.x, startValue.y, startValue.width, startValue.height, endValue.x, endValue.y, endValue.width, endValue.height); + + _pRectangleAnimationImpl = new (std::nothrow) _RectangleAnimationImpl(this); + if (_pRectangleAnimationImpl == null) + { + SysLogException(NID_UI_ANIM, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + delete _pAnimationBaseImpl; + _pAnimationBaseImpl = null; + + return; + } + + _pRectangleAnimationImpl->startValue = startValue; + _pRectangleAnimationImpl->endValue = endValue; +} + +RectangleAnimation::~RectangleAnimation(void) +{ + delete _pRectangleAnimationImpl; + _pRectangleAnimationImpl = null; +} + +RectangleAnimation::RectangleAnimation(const RectangleAnimation& rectangleAnimation) + : AnimationBase(rectangleAnimation) + , _pRectangleAnimationImpl(null) +{ + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_ANIM, (_pAnimationBaseImpl), r, "[%s] Propagating.", GetErrorMessage(r)); + + _pRectangleAnimationImpl = new (std::nothrow) _RectangleAnimationImpl(this); + SysTryCatch(NID_UI_ANIM, (_pRectangleAnimationImpl), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + rectangleAnimation.GetAnchor(_pRectangleAnimationImpl->anchorX, _pRectangleAnimationImpl->anchorY); + + r = _pRectangleAnimationImpl->CopyRectangleAnimationValue(rectangleAnimation); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to copy rectangle animation value."); + + return; + +CATCH: + delete _pAnimationBaseImpl; + _pAnimationBaseImpl = null; + delete _pRectangleAnimationImpl; + _pRectangleAnimationImpl = null; +} + +RectangleAnimation& +RectangleAnimation::operator =(const RectangleAnimation& rhs) +{ + ClearLastResult(); + + if ((&rhs) != this) + { + result r = E_SUCCESS; + + AnimationBase::operator =(rhs); + + rhs.GetAnchor(_pRectangleAnimationImpl->anchorX, _pRectangleAnimationImpl->anchorY); + + r = _pRectangleAnimationImpl->CopyRectangleAnimationValue(rhs); + SysTryReturn(NID_UI_ANIM, (r == E_SUCCESS), *this, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to copy rectangle animation value."); + } + + return *this; +} + +bool +RectangleAnimation::operator ==(const RectangleAnimation& rhs) const +{ + result r = E_SUCCESS; + + if (_pAnimationBaseImpl->keyFrameList.GetCount() != rhs._pAnimationBaseImpl->keyFrameList.GetCount()) + { + return false; + } + + ArrayListT< long >* pKeyList1 = null; + ArrayListT< long >* pKeyList2 = null; + ICollectionT< long >* pKeyN = _pAnimationBaseImpl->keyFrameList.GetKeysN(); + + if (_pAnimationBaseImpl->keyFrameList.GetCount() != 0) + { + pKeyList1 = new (std::nothrow) ArrayListT< long >; + SysTryCatch(NID_UI_ANIM, (pKeyList1 != null && pKeyN != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = pKeyList1->Construct(*pKeyN); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), , E_SYSTEM, "[E_SYSTEM] Failed to construct key list."); + + pKeyList2 = new (std::nothrow) ArrayListT< long >; + SysTryCatch(NID_UI_ANIM, (pKeyList2 != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + ComparerT< long > comparer; + + r = pKeyList1->Sort(comparer); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to sort key list."); + + r = pKeyList2->Sort(comparer); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to sort key list."); + + long time1 = 0; + long time2 = 0; + Object* pObjValue1 = null; + Object* pObjValue2 = null; + + for (int index = 0; index < _pAnimationBaseImpl->keyFrameList.GetCount(); index++) + { + pKeyList1->GetAt(index, time1); + pKeyList2->GetAt(index, time2); + if (time1 != time2) + { + goto CATCH; + } + + _pAnimationBaseImpl->keyFrameList.GetValue(time1, pObjValue1); + rhs._pAnimationBaseImpl->keyFrameList.GetValue(time2, pObjValue2); + + if ((!pObjValue1) && (!pObjValue2)) + { + continue; + } + else if ((!pObjValue1) || (!pObjValue2)) + { + goto CATCH; + } + + Rectangle* pRectValue1 = dynamic_cast< Rectangle* >(pObjValue1); + if (pRectValue1 == null) + { + goto CATCH; + } + Rectangle* pRectValue2 = dynamic_cast< Rectangle* >(pObjValue2); + if (pRectValue2 == null) + { + goto CATCH; + } + if (!(pRectValue1->Equals(*pRectValue2))) + { + goto CATCH; + } + + } + + delete pKeyList1; + delete pKeyList2; + } + delete pKeyN; + + if (!((_pRectangleAnimationImpl->startValue).Equals(rhs._pRectangleAnimationImpl->startValue)) || + !((_pRectangleAnimationImpl->endValue).Equals(rhs._pRectangleAnimationImpl->endValue))) + { + return false; + } + + if (((Float::Compare(_pRectangleAnimationImpl->anchorX, rhs._pRectangleAnimationImpl->anchorX)) != 0) && + ((Float::Compare(_pRectangleAnimationImpl->anchorY, rhs._pRectangleAnimationImpl->anchorY)) != 0)) + { + return false; + } + + return _pAnimationBaseImpl->CompareTimingValues(rhs); + + +CATCH: + delete pKeyN; + delete pKeyList1; + delete pKeyList2; + return false; +} + +bool +RectangleAnimation::operator !=(const RectangleAnimation& rhs) const +{ + return !(*this == rhs); +} + +bool +RectangleAnimation::Equals(const Object& obj) const +{ + const RectangleAnimation* pRectangleAnim = dynamic_cast< const RectangleAnimation* >(&obj); + if (pRectangleAnim == null) + { + return false; + } + + return (*this == *pRectangleAnim); +} + +int +RectangleAnimation::GetHashCode(void) const +{ + return (((int) GetRepeatCount()) + ((int) GetOffset()) + ((int) GetDuration()) + ((int) GetDelay())); +} + +result +RectangleAnimation::SetAnchor(float anchorX, float anchorY) +{ + SysTryReturnResult(NID_UI_ANIM, (anchorX >= 0.0 && anchorX <= 1.0 && anchorY >= 0.0 && anchorY <= 1.0), E_INVALID_ARG, "Invalid argument(s) is used. anchorX = %f, anchorY = %f.", anchorX, anchorY); + + _pRectangleAnimationImpl->anchorX = anchorX; + _pRectangleAnimationImpl->anchorY = anchorY; + + return E_SUCCESS; +} + +void +RectangleAnimation::GetAnchor(float& anchorX, float& anchorY) const +{ + anchorX = _pRectangleAnimationImpl->anchorX; + anchorY = _pRectangleAnimationImpl->anchorY; +} + +result +RectangleAnimation::GetAnimatedValue(long currentTime, Rectangle& animatedValue) const +{ + SysTryReturnResult(NID_UI_ANIM, (currentTime >= 0 && currentTime <= GetDuration()), E_INVALID_ARG, "Invalid argument(s) is used. currentTime = %ld", currentTime); + + float actualProgress = _pAnimationBaseImpl->GetActualProgressValue(currentTime); + SysTryReturnResult(NID_UI_ANIM, (actualProgress >= 0.0f && actualProgress <= 1.0f), E_SYSTEM, "System error in calculating progress."); + + return _pRectangleAnimationImpl->GetAnimatedValue(actualProgress, animatedValue); +} + +result +RectangleAnimation::AddKeyFrame(long time, const Rectangle& value) +{ + SysTryReturnResult(NID_UI_ANIM, (time > 0 && time != _pAnimationBaseImpl->duration), E_INVALID_ARG, "Invalid argument(s) is used. time = %ld", time); + + result r = E_SUCCESS; + Rectangle* pRectObj = null; + + if (time > _pAnimationBaseImpl->duration) + { + pRectObj = new (std::nothrow) Rectangle(_pRectangleAnimationImpl->endValue); + SysTryReturnResult(NID_UI_ANIM, (pRectObj != null), E_OUT_OF_MEMORY, "Memory allocation failed"); + + r = _pAnimationBaseImpl->keyFrameList.Add(_pAnimationBaseImpl->duration, dynamic_cast< Object* >(pRectObj)); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add to key frame list."); + + _pAnimationBaseImpl->duration = time; + _pRectangleAnimationImpl->endValue = value; + } + else + { + pRectObj = new (std::nothrow) Rectangle(value); + SysTryReturnResult(NID_UI_ANIM, (pRectObj != null), E_OUT_OF_MEMORY, "Memory allocation failed."); + + Object* pKeyValue = null; + _pAnimationBaseImpl->keyFrameList.GetValue(time, pKeyValue); + if (pKeyValue != null) + { + _pAnimationBaseImpl->keyFrameList.Remove(time); // Remove the already existing entry + delete pKeyValue; + } + r = _pAnimationBaseImpl->keyFrameList.Add(time, dynamic_cast< Object* >(pRectObj)); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add to key frame list."); + } + + return r; + +CATCH: + delete pRectObj; + return r; +} + +result +RectangleAnimation::GetKeyFrameAt(int index, long& time, Rectangle& 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); + + result r = E_SUCCESS; + Object* pObjValue = null; + Rectangle* pDimValue = null; + ComparerT< long > comparer; + + ArrayListT< long >* pKeyList = new (std::nothrow) ArrayListT< long >; + ICollectionT< long >* pKeyN = _pAnimationBaseImpl->keyFrameList.GetKeysN(); + + SysTryCatch(NID_UI_ANIM, (pKeyList != null && pKeyN != null), r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = pKeyList->Construct(*pKeyN); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Failed to construct key list."); + SysTryCatch(NID_UI_ANIM, !(pKeyList->GetCount() <= 0), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Key list count is invalid."); + + r = pKeyList->Sort(comparer); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to sort key list."); + + r = pKeyList->GetAt(index, time); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to get the time from list."); + + r = _pAnimationBaseImpl->keyFrameList.GetValue(time, pObjValue); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to get key value."); + + pDimValue = dynamic_cast< Rectangle* >(pObjValue); + if (pDimValue) + { + value = *pDimValue; + } + + //fall through +CATCH: + delete pKeyN; + delete pKeyList; + return r; +} + +result +RectangleAnimation::RemoveKeyFrame(long time) +{ + return _pAnimationBaseImpl->RemoveKeyFrame(time); +} + +result +RectangleAnimation::RemoveKeyFrameAt(int index) +{ + return _pAnimationBaseImpl->RemoveKeyFrameAt(index); +} + +result +RectangleAnimation::RemoveAllKeyFrames(void) +{ + result r = E_SUCCESS; + + IMapEnumeratorT< long, Object* >* pMapEnum = _pAnimationBaseImpl->keyFrameList.GetMapEnumeratorN(); + SysTryReturnResult(NID_UI_ANIM, (pMapEnum), E_OUT_OF_MEMORY, "Memory allocation failed."); + + MapEntryT< long, Object* > value; + + while (pMapEnum->MoveNext() == E_SUCCESS) + { + r = pMapEnum->GetCurrent(value); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to get the current value."); + + Object* pObj = value.GetValue(); + + delete pObj; + } + + _pAnimationBaseImpl->keyFrameList.RemoveAll(); + + //fall through +CATCH: + delete pMapEnum; + + return r; +} + +result +RectangleAnimation::SetStartValue(const Rectangle& startValue) +{ + SysTryReturnResult(NID_UI_ANIM, (startValue.width >= 0 && startValue.height >= 0), E_INVALID_ARG, "Invalid argument(s) is used. size = (%d, %d)", startValue.width, startValue.height); + + _pRectangleAnimationImpl->startValue = startValue; + + return E_SUCCESS; + +} + +result +RectangleAnimation::SetEndValue(const Rectangle& endValue) +{ + SysTryReturnResult(NID_UI_ANIM, (endValue.width >= 0 && endValue.height >= 0), E_INVALID_ARG, "Invalid argument(s) is used. size = (%d, %d)", endValue.width, endValue.height); + + _pRectangleAnimationImpl->endValue = endValue; + + return E_SUCCESS; +} + +Rectangle +RectangleAnimation::GetStartValue(void) const +{ + return _pRectangleAnimationImpl->startValue; +} + +Rectangle +RectangleAnimation::GetEndValue(void) const +{ + return _pRectangleAnimationImpl->endValue; +} + +AnimationType +RectangleAnimation::GetType(void) const +{ + return ANIMATION_TYPE_RECTANGLE_ANIMATION; +} + + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnimRotateAnimation.cpp b/src/ui/animations/FUiAnimRotateAnimation.cpp new file mode 100644 index 0000000..4715281 --- /dev/null +++ b/src/ui/animations/FUiAnimRotateAnimation.cpp @@ -0,0 +1,181 @@ +// +// 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 FUiAnimRotateAnimation.cpp + * @brief This file contains implementation of RotateAnimation class + * + * This file contains implementation of RotateAnimation class. + */ + +#include +#include + +#include + +#include "FUiAnim_RotateAnimationImpl.h" +#include "FUiAnim_AnimationBaseImpl.h" +#include "FUiAnim_FloatAnimationImpl.h" + + +using namespace Tizen::Base; +using namespace Tizen::Ui::Animations; +using namespace Tizen::Base::Collection; + + +namespace Tizen { namespace Ui { namespace Animations +{ + +RotateAnimation::RotateAnimation(void) + : _pRotateAnimationImpl(null) +{ +} + +RotateAnimation::RotateAnimation(float startValue, float endValue, long duration, AnimationInterpolatorType interpolator) + : FloatAnimation(startValue, endValue, duration, interpolator) + , _pRotateAnimationImpl(null) +{ + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_ANIM, (_pAnimationBaseImpl), r, "[%s] Propagating.", GetErrorMessage(r)); + + _pRotateAnimationImpl = new (std::nothrow) _RotateAnimationImpl(this); + if (_pRotateAnimationImpl == null) + { + SysLogException(NID_UI_ANIM, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + delete _pFloatAnimationImpl; + _pFloatAnimationImpl = null; + + delete _pAnimationBaseImpl; + _pAnimationBaseImpl = null; + + return; + } + + return; +} + +RotateAnimation::~RotateAnimation(void) +{ + delete _pRotateAnimationImpl; + _pRotateAnimationImpl = null; +} + +RotateAnimation::RotateAnimation(const RotateAnimation& rotateAnimation) + : FloatAnimation(rotateAnimation) + , _pRotateAnimationImpl(null) +{ + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_ANIM, (_pAnimationBaseImpl), r, "[%s] Propagating.", GetErrorMessage(r)); + + _pRotateAnimationImpl = new (std::nothrow) _RotateAnimationImpl(this); + SysTryCatch(NID_UI_ANIM, (_pRotateAnimationImpl != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + rotateAnimation.GetAnchor(_pRotateAnimationImpl->anchorX, _pRotateAnimationImpl->anchorY); + + return; + +CATCH: + delete _pAnimationBaseImpl; + _pAnimationBaseImpl = null; + delete _pFloatAnimationImpl; + _pFloatAnimationImpl = null; +} + +RotateAnimation& +RotateAnimation::operator =(const RotateAnimation& rhs) +{ + ClearLastResult(); + + if ((&rhs) != this) + { + FloatAnimation::operator =(rhs); + + rhs.GetAnchor(_pRotateAnimationImpl->anchorX, _pRotateAnimationImpl->anchorY); + } + + return *this; +} + +bool +RotateAnimation::operator ==(const RotateAnimation& rhs) const +{ + if (!(FloatAnimation::operator ==(rhs))) + { + return false; + } + + if (Float::Compare(_pRotateAnimationImpl->anchorX, rhs._pRotateAnimationImpl->anchorX) != 0 || + Float::Compare(_pRotateAnimationImpl->anchorY, rhs._pRotateAnimationImpl->anchorY) != 0) + { + return false; + } + + return true; +} + +bool +RotateAnimation::operator !=(const RotateAnimation& rhs) const +{ + return !(*this == rhs); +} + +bool +RotateAnimation::Equals(const Tizen::Base::Object& rhs) const +{ + const RotateAnimation* pRotateAnim = dynamic_cast< const RotateAnimation* >(&rhs); + if (pRotateAnim == null) + { + return false; + } + + return (*this == *pRotateAnim); +} + +int +RotateAnimation::GetHashCode(void) const +{ + return (((int) GetRepeatCount()) + ((int) GetOffset()) + ((int) GetDuration()) + ((int) GetDelay())); +} + +result +RotateAnimation::SetAnchor(float anchorX, float anchorY) +{ + SysTryReturnResult(NID_UI_ANIM, (anchorX >= 0.0 && anchorX <= 1.0 && anchorY >= 0.0 && anchorY <= 1.0), E_INVALID_ARG, "Invalid argument(s) is used. anchorX = %f, anchorX= %f.", anchorX, anchorY); + + _pRotateAnimationImpl->anchorX = anchorX; + _pRotateAnimationImpl->anchorY = anchorY; + + return E_SUCCESS; +} + +void +RotateAnimation::GetAnchor(float& anchorX, float& anchorY) const +{ + anchorX = _pRotateAnimationImpl->anchorX; + anchorY = _pRotateAnimationImpl->anchorY; + + return; +} + +AnimationType +RotateAnimation::GetType(void) const +{ + return ANIMATION_TYPE_ROTATE_ANIMATION; +} + +}}} // Tizen::Ui::Animations diff --git a/src/ui/animations/FUiAnimSequentialAnimationGroup.cpp b/src/ui/animations/FUiAnimSequentialAnimationGroup.cpp new file mode 100644 index 0000000..2f843b6 --- /dev/null +++ b/src/ui/animations/FUiAnimSequentialAnimationGroup.cpp @@ -0,0 +1,367 @@ +// +// 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 FUiAnimSequentialAnimationGroup.cpp + * @brief This file contains implementation of SequentialAnimationGroup class + * + * This file contains implementation of SequentialAnimationGroup class. + */ + +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "FUiAnim_AnimationGroupImpl.h" + + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; + + +namespace Tizen { namespace Ui { namespace Animations +{ + +SequentialAnimationGroup::SequentialAnimationGroup(void) + : AnimationGroup() + , _pSequentialAnimationGroupImpl(null) +{ +} + +SequentialAnimationGroup::~SequentialAnimationGroup(void) +{ +} + +SequentialAnimationGroup::SequentialAnimationGroup(const SequentialAnimationGroup& animationGroup) + : AnimationGroup(animationGroup) + , _pSequentialAnimationGroupImpl(null) +{ + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_ANIM, (_pAnimationGroupImpl), r, "[%s] Propagating.", GetErrorMessage(r)); + + int animationCount = animationGroup._pAnimationGroupImpl->animationList.GetCount(); + + _AnimationGroupImpl::AnimationStore animStore; + + for (int index = 0; index < animationCount; index++) + { + animationGroup._pAnimationGroupImpl->animationList.GetAt(index, animStore); + + r = AddAnimation(animStore.animTarget, *(animStore.pAnimationBase)); + if (r != E_SUCCESS) + { + SysLogException(NID_UI_ANIM, r, "[%s] Propagating.", GetErrorMessage(r)); + + delete _pAnimationGroupImpl; + _pAnimationGroupImpl = null; + + return; + } + } +} + +SequentialAnimationGroup& +SequentialAnimationGroup::operator =(const SequentialAnimationGroup& rhs) +{ + ClearLastResult(); + + if ((&rhs) != this) + { + result r = E_SUCCESS; + + // Deleting the contents + if (_pAnimationGroupImpl->animationList.GetCount() > 0) + { + int index = _pAnimationGroupImpl->animationList.GetCount(); + + while (index > 0) + { + _AnimationGroupImpl::AnimationStore animStore; + + _pAnimationGroupImpl->animationList.GetAt(index - 1, animStore); + + if (animStore.pAnimationBase) + { + delete animStore.pAnimationBase; + animStore.pAnimationBase = null; + } + + index--; + } + + _pAnimationGroupImpl->animationList.RemoveAll(); + } + + // Copying the contents + int animationCount = rhs._pAnimationGroupImpl->animationList.GetCount(); + + for (int index = 0; index < animationCount; index++) + { + _AnimationGroupImpl::AnimationStore animStore; + + rhs._pAnimationGroupImpl->animationList.GetAt(index, animStore); + + _AnimationGroupImpl::AnimationStore animStoreNew; + animStoreNew.animTarget = animStore.animTarget; + + animStoreNew.pAnimationBase = _pAnimationGroupImpl->CloneAnimation(animStore.animTarget, *(animStore.pAnimationBase), r); + SysTryReturn(NID_UI_ANIM, (animStoreNew.pAnimationBase), *this, r, "Failed to clone animation.", GetErrorMessage(r)); + + r = _pAnimationGroupImpl->animationList.Add(animStoreNew); + SysTryReturn(NID_UI_ANIM, (r == E_SUCCESS), *this, r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + + return *this; +} + +bool +SequentialAnimationGroup::operator ==(const SequentialAnimationGroup& rhs) const +{ + if (_pAnimationGroupImpl->animationList.GetCount() != rhs._pAnimationGroupImpl->animationList.GetCount()) + { + return false; + } + + int animationCount = rhs._pAnimationGroupImpl->animationList.GetCount(); + + for (int index = 0; index < animationCount; index++) + { + _AnimationGroupImpl::AnimationStore animStore; + + _pAnimationGroupImpl->animationList.GetAt(index, animStore); + + if (!(rhs._pAnimationGroupImpl->animationList.Contains(animStore))) + { + return false; + } + } + + return true; +} + +bool +SequentialAnimationGroup::operator !=(const SequentialAnimationGroup& rhs) const +{ + return !(*this == rhs); +} + +bool +SequentialAnimationGroup::Equals(const Object& obj) const +{ + const SequentialAnimationGroup* pSequentialGrp = dynamic_cast< const SequentialAnimationGroup* >(&obj); + if (pSequentialGrp == null) + { + return false; + } + + return (*this == *pSequentialGrp); +} + +int +SequentialAnimationGroup::GetHashCode(void) const +{ + return GetAnimationCount(); +} + +void +SequentialAnimationGroup::RemoveAllAnimations(void) +{ + int index = _pAnimationGroupImpl->animationList.GetCount() - 1; + + while (index >= 0) + { + _AnimationGroupImpl::AnimationStore animStore; + + _pAnimationGroupImpl->animationList.GetAt(index, animStore); + + delete animStore.pAnimationBase; + animStore.pAnimationBase = null; + + index--; + } + + _pAnimationGroupImpl->animationList.RemoveAll(); +} + +int +SequentialAnimationGroup::GetAnimationCount(void) const +{ + return _pAnimationGroupImpl->animationList.GetCount(); +} + +result +SequentialAnimationGroup::AddAnimation(AnimationTargetType animTarget, const AnimationBase& animation) +{ + SysTryReturnResult(NID_UI_ANIM, (animTarget >= ANIMATION_TARGET_NONE && animTarget <= ANIMATION_TARGET_MAX), E_INVALID_ARG, "Invalid argument(s) is used. animTarget is invalid."); + + result r = E_SUCCESS; + + _AnimationGroupImpl::AnimationStore animStore; + animStore.animTarget = animTarget; + + animStore.pAnimationBase = _pAnimationGroupImpl->CloneAnimation(animTarget, const_cast< AnimationBase& >(animation), r); + SysTryReturnResult(NID_UI_ANIM, (animStore.pAnimationBase), r, "Failed to clone animation."); + + r = _pAnimationGroupImpl->animationList.Add(animStore); + if (r != E_SUCCESS) + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to add to animation list."); + + delete animStore.pAnimationBase; + animStore.pAnimationBase = null; + + return r; + } + + return E_SUCCESS; +} + +result +SequentialAnimationGroup::SetAnimationAt(int index, AnimationTargetType animTarget, const AnimationBase& animation) +{ + SysTryReturnResult(NID_UI_ANIM, (animTarget >= ANIMATION_TARGET_NONE && animTarget <= ANIMATION_TARGET_MAX), E_INVALID_ARG, "Invalid argument(s) is used. animTarget is invalid."); + SysTryReturnResult(NID_UI_ANIM, (index >= 0 && index < _pAnimationGroupImpl->animationList.GetCount()), E_OUT_OF_RANGE, "Index (%d) is out of range.", index); + + result r = E_SUCCESS; + + _AnimationGroupImpl::AnimationStore animStore; + animStore.animTarget = animTarget; + + animStore.pAnimationBase = _pAnimationGroupImpl->CloneAnimation(animTarget, const_cast< AnimationBase& >(animation), r); + SysTryReturnResult(NID_UI_ANIM, (animStore.pAnimationBase), r, "Failed to clone animation."); + + _AnimationGroupImpl::AnimationStore animStoreCurrent; + _pAnimationGroupImpl->animationList.GetAt(index, animStoreCurrent); + + r = _pAnimationGroupImpl->animationList.SetAt(animStore, index); + if (r != E_SUCCESS) + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to insert into the animation list."); + + delete animStore.pAnimationBase; + animStore.pAnimationBase = null; + + return r; + } + + delete animStoreCurrent.pAnimationBase; + animStoreCurrent.pAnimationBase = null; + + return E_SUCCESS; +} + + +result +SequentialAnimationGroup::InsertAnimationAt(int index, AnimationTargetType animTarget, const AnimationBase& animation) +{ + SysTryReturnResult(NID_UI_ANIM, (animTarget >= ANIMATION_TARGET_NONE && animTarget <= ANIMATION_TARGET_MAX), E_INVALID_ARG, "Invalid argument(s) is used. animTarget is invalid."); + SysTryReturnResult(NID_UI_ANIM, (index >= 0 && index < _pAnimationGroupImpl->animationList.GetCount()), E_OUT_OF_RANGE, "Index (%d) is out of range.", index); + + result r = E_SUCCESS; + + _AnimationGroupImpl::AnimationStore animStore; + animStore.animTarget = animTarget; + + animStore.pAnimationBase = _pAnimationGroupImpl->CloneAnimation(animTarget, const_cast< AnimationBase& >(animation), r); + SysTryReturnResult(NID_UI_ANIM, (animStore.pAnimationBase), r, "Failed to clone animation."); + + _AnimationGroupImpl::AnimationStore animStoreCurrent; + _pAnimationGroupImpl->animationList.GetAt(index, animStoreCurrent); + + r = _pAnimationGroupImpl->animationList.InsertAt(animStore, index); + if (r != E_SUCCESS) + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to insert into the animation list."); + + delete animStore.pAnimationBase; + animStore.pAnimationBase = null; + + return r; + } + + return E_SUCCESS; +} + +result +SequentialAnimationGroup::RemoveAnimationAt(int index) +{ + SysTryReturnResult(NID_UI_ANIM, (index >= 0 && index < _pAnimationGroupImpl->animationList.GetCount()), E_OUT_OF_RANGE, "Index (%d) is out of range.", index); + + result r = E_SUCCESS; + + _AnimationGroupImpl::AnimationStore animStore; + + _pAnimationGroupImpl->animationList.GetAt(index, animStore); + + SysTryReturnResult(NID_UI_ANIM, (animStore.pAnimationBase), E_SYSTEM, "A system error has been occurred. Animation is invalid."); + + r = _pAnimationGroupImpl->animationList.RemoveAt(index); + SysTryReturnResult(NID_UI_ANIM, r == E_SUCCESS, E_SYSTEM, "A system error has been occurred. Failed to remove animation from animation list.") + + delete animStore.pAnimationBase; + animStore.pAnimationBase = null; + + return E_SUCCESS; +} + +AnimationBase* +SequentialAnimationGroup::GetAnimationAtN(int index) const +{ + SysTryReturn(NID_UI_ANIM, (index >= 0 && index < _pAnimationGroupImpl->animationList.GetCount()), null, + E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] Index (%d) is out of range.", index); + + _AnimationGroupImpl::AnimationStore animStore; + + _pAnimationGroupImpl->animationList.GetAt(index, animStore); + + SysTryReturn(NID_UI_ANIM, (animStore.pAnimationBase), null, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Animation is invalid."); + + result r = E_SUCCESS; + + AnimationBase *pAnimationBase = _pAnimationGroupImpl->CloneAnimation(animStore.animTarget, *(animStore.pAnimationBase), r); + SysTryReturn(NID_UI_ANIM, (pAnimationBase), null, r, "[%s] Failed to clone animation.", GetErrorMessage(r)); + + return pAnimationBase; +} + +AnimationTargetType +SequentialAnimationGroup::GetAnimationTargetTypeAt(int index) const +{ + SysTryReturn(NID_UI_ANIM, (index >= 0 && index < _pAnimationGroupImpl->animationList.GetCount()), ANIMATION_TARGET_NONE, + E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] Index (%d) is out of range.", index); + + _AnimationGroupImpl::AnimationStore animStore; + _pAnimationGroupImpl->animationList.GetAt(index, animStore); + + return animStore.animTarget; +} + +AnimationGroupType +SequentialAnimationGroup::GetType(void) const +{ + return ANIMATION_GROUP_TYPE_SEQUENTIAL; +} + +}}} // Tizen::Ui::Animations diff --git a/src/ui/animations/FUiAnimVisualElement.cpp b/src/ui/animations/FUiAnimVisualElement.cpp new file mode 100644 index 0000000..56e744e --- /dev/null +++ b/src/ui/animations/FUiAnimVisualElement.cpp @@ -0,0 +1,955 @@ +// +// 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 FUiAnimVisualElement.cpp + * @brief This file contains implementation of VisualElement class + * + * This file contains implementation VisualElement class. + */ + +#include +#include +#include +#include +#include + +#include "FUiAnim_VisualElementAnimationImpl.h" +#include "FUiAnim_VisualElementImpl.h" + +#define CHECK_NOT_CONSTRUCTED \ + SysAssertf(_pVisualElementImpl->__pSharedData == null, "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class."); + +#define CHECK_CONSTRUCTED \ + SysAssertf(_pVisualElementImpl->__pSharedData != null, "Not yet constructed! Construct() should be called before use."); + +#define CHECK_PARAMETER_CONSTRUCTED(element) \ + SysAssertf((element)._pVisualElementImpl && (element)._pVisualElementImpl->__pSharedData, "Not yet constructed! Construct() should be called before use."); + +#define CHECK_PRESENTATION_INSTANCE(pElement) \ + if ((pElement && pElement->_pVisualElementImpl == pElement->_pVisualElementImpl->__pPresentation)) { return; } + +#define CHECK_PRESENTATION_INSTANCE_RETURN(pElement, ret) \ + if ((pElement && pElement->_pVisualElementImpl == pElement->_pVisualElementImpl->__pPresentation)) { return ret; } + + +namespace Tizen { namespace Ui { namespace Animations +{ + +using namespace Tizen; +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; + +VisualElement::VisualElement(void) + : _pVisualElementImpl(null) +{ + _pVisualElementImpl = new (std::nothrow) _VisualElementImpl(*this); +} + +VisualElement::VisualElement(const VisualElement& rhs) + : _pVisualElementImpl(null) +{ + CHECK_PARAMETER_CONSTRUCTED(rhs); + + _pVisualElementImpl = new (std::nothrow) _VisualElementImpl(*this, *rhs._pVisualElementImpl); +} + +VisualElement* +VisualElement::CloneN(void) const +{ + CHECK_CONSTRUCTED; + + VisualElement* pCloned = new (std::nothrow) VisualElement(*this); + SysTryReturn(NID_UI_ANIM, pCloned, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + return pCloned; +} + +VisualElement::~VisualElement(void) +{ + if (_pVisualElementImpl) + { + SysLogException(NID_UI_ANIM, E_INVALID_STATE, "[E_INVALID_STATE] should be called Destroy() for deallocating the VisualElement."); + _pVisualElementImpl->Destroy(); + _pVisualElementImpl = null; + } +} + +result +VisualElement::Construct(void) +{ + SysTryReturnResult(NID_UI_ANIM, _pVisualElementImpl, E_OUT_OF_MEMORY, "Memory allocation failed."); + + SysAssertf(_pVisualElementImpl->__pSharedData == null, "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class."); + + result r = E_SUCCESS; + VisualElement* pClone = null; + + r = _pVisualElementImpl->Construct(); + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , r, "[%s] Failed to construct VisualElement instance.", GetErrorMessage(r)); + + pClone = CloneN(); + SysTryReturnResult(NID_UI_ANIM, pClone, E_INVALID_STATE, "Failed to create the presentation."); + SysTryCatch(NID_UI_ANIM, pClone->_pVisualElementImpl, r = E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] Presentation is invalid."); + + pClone->_pVisualElementImpl->__pSharedData = _pVisualElementImpl->__pSharedData; + pClone->_pVisualElementImpl->__pSharedData->AddRef(); + _pVisualElementImpl->__pSharedData->invalidatedNativeProps = _VisualElementImpl::HIERARCHY_PROPERTY_MASK; + + pClone->_pVisualElementImpl->__pModel = _pVisualElementImpl; + pClone->_pVisualElementImpl->__pPresentation = pClone->_pVisualElementImpl; + + _pVisualElementImpl->__pModel = _pVisualElementImpl; + _pVisualElementImpl->__pPresentation = pClone->_pVisualElementImpl; + + + // WARNING: + // Exceptional case for constructed-callback: + // This callback is invoked inside public-class, not inside impl-class because 'Construct' method will not be called for cloned(Presentation) VE + + // This is model object, not presentation object. + _pVisualElementImpl->InvokeOnConstructed(); + //pClone->_pVisualElementImpl->InvokeOnConstructed(); + + return r; + +CATCH: + delete pClone; + + return r; +} + +void +VisualElement::Destroy(void) +{ + if (likely(_pVisualElementImpl)) + { + if (likely(!_pVisualElementImpl->__isDestroying)) + { + _pVisualElementImpl->Destroy(); + _pVisualElementImpl = null; + + delete this; + } + } + else + { + delete this; + } +} + +Variant +VisualElement::GetProperty(const Tizen::Base::String& property) const +{ + CHECK_CONSTRUCTED; + + return _pVisualElementImpl->InvokeOnGetPropertyRequested(property); +} + +Variant +VisualElement::OnGetPropertyRequested(const Tizen::Base::String& property) const +{ + CHECK_CONSTRUCTED; + + return _pVisualElementImpl->GetProperty(property); +} + +result +VisualElement::SetProperty(const Tizen::Base::String& property, const Variant& value) +{ + CHECK_CONSTRUCTED; + CHECK_PRESENTATION_INSTANCE_RETURN(this, E_SUCCESS); + + return _pVisualElementImpl->InvokeOnSetPropertyRequested(property, value); +} + +result +VisualElement::OnSetPropertyRequested(const Tizen::Base::String& property, const Variant& value) +{ + CHECK_CONSTRUCTED; + result r = E_SUCCESS; + + r =_pVisualElementImpl->SetProperty(property, value); + if(r == E_KEY_NOT_FOUND) + { + r = _pVisualElementImpl->UpdatePresentationWhenCustomPropertyChanged(property, value); + } + return r; +} + +result +VisualElement::SetZOrderGroup(int zOrderGroup) +{ + CHECK_CONSTRUCTED; + CHECK_PRESENTATION_INSTANCE_RETURN(this, E_SUCCESS); + + SysTryReturnResult(NID_UI_ANIM, zOrderGroup >= Z_ORDER_GROUP_LOWEST, E_OUT_OF_RANGE, "zOrderGroup is less than Z_ORDER_GROUP_LOWEST"); + SysTryReturnResult(NID_UI_ANIM, zOrderGroup <= Z_ORDER_GROUP_HIGHEST, E_OUT_OF_RANGE, "zOrderGroup is greater than Z_ORDER_GROUP_HIGHEST"); + + return _pVisualElementImpl->SetZOrderGroup(zOrderGroup); +} + +int +VisualElement::GetZOrderGroup(void) const +{ + CHECK_CONSTRUCTED; + + return _pVisualElementImpl->GetZOrderGroup(); +} + +bool +VisualElement::IsRedrawOnResizeEnabled(void) const +{ + CHECK_CONSTRUCTED; + + return _pVisualElementImpl->GetRedrawOnResizeEnabled(); +} + +void +VisualElement::SetRedrawOnResizeEnabled(bool enabled) +{ + CHECK_CONSTRUCTED; + CHECK_PRESENTATION_INSTANCE(this); + + _pVisualElementImpl->SetRedrawOnResizeEnabled(enabled); +} + +FloatRectangle +VisualElement::GetBounds(void) const +{ + CHECK_CONSTRUCTED; + + return _pVisualElementImpl->GetBounds(); +} + +result +VisualElement::SetBounds(const FloatRectangle& bounds) +{ + CHECK_CONSTRUCTED; + CHECK_PRESENTATION_INSTANCE_RETURN(this, E_SUCCESS); + + return _pVisualElementImpl->SetBounds(bounds); +} + +float +VisualElement::GetZPosition(void) const +{ + CHECK_CONSTRUCTED; + + return _pVisualElementImpl->GetZPosition(); +} + +void +VisualElement::SetZPosition(float zPosition) +{ + CHECK_CONSTRUCTED; + CHECK_PRESENTATION_INSTANCE(this); + + _pVisualElementImpl->SetZPosition(zPosition); +} + +bool +VisualElement::IsVisible(void) const +{ + CHECK_CONSTRUCTED; + + return _pVisualElementImpl->IsVisible(); +} + +bool +VisualElement::GetShowState(void) const +{ + CHECK_CONSTRUCTED; + + return _pVisualElementImpl->GetShowState(); +} + +void +VisualElement::SetShowState(bool show) +{ + CHECK_CONSTRUCTED; + CHECK_PRESENTATION_INSTANCE(this); + + _pVisualElementImpl->SetShowState(show); +} + +float +VisualElement::GetOpacity(void) const +{ + CHECK_CONSTRUCTED; + + return _pVisualElementImpl->GetOpacity(); +} + +void +VisualElement::SetOpacity(float opacity) +{ + CHECK_CONSTRUCTED; + CHECK_PRESENTATION_INSTANCE(this); + + _pVisualElementImpl->SetOpacity(opacity); +} + +Tizen::Graphics::FloatMatrix4 +VisualElement::GetTransformMatrix(void) const +{ + CHECK_CONSTRUCTED; + + return _pVisualElementImpl->GetTransformMatrix(); +} + +result +VisualElement::SetTransformMatrix(const Tizen::Graphics::FloatMatrix4& transform) +{ + CHECK_CONSTRUCTED; + CHECK_PRESENTATION_INSTANCE_RETURN(this, E_SUCCESS); + + return _pVisualElementImpl->SetTransformMatrix(transform); +} + +Tizen::Graphics::FloatMatrix4 +VisualElement::GetChildrenTransformMatrix(void) const +{ + CHECK_CONSTRUCTED; + + return _pVisualElementImpl->GetChildrenTransformMatrix(); +} + +result +VisualElement::SetChildrenTransformMatrix(const Tizen::Graphics::FloatMatrix4& transform) +{ + CHECK_CONSTRUCTED; + CHECK_PRESENTATION_INSTANCE_RETURN(this, E_SUCCESS); + + return _pVisualElementImpl->SetChildrenTransformMatrix(transform); +} + +FloatPoint +VisualElement::GetAnchor(void) const +{ + CHECK_CONSTRUCTED; + + return _pVisualElementImpl->GetAnchor(); +} + +void +VisualElement::SetAnchor(const FloatPoint& anchor) +{ + CHECK_CONSTRUCTED; + CHECK_PRESENTATION_INSTANCE(this); + + _pVisualElementImpl->SetAnchor(anchor); +} + +float +VisualElement::GetAnchorZ(void) const +{ + CHECK_CONSTRUCTED; + + return _pVisualElementImpl->GetAnchorZ(); +} + +void +VisualElement::SetAnchorZ(float anchorZ) +{ + CHECK_CONSTRUCTED; + CHECK_PRESENTATION_INSTANCE(this); + + _pVisualElementImpl->SetAnchorZ(anchorZ); + +} + +VisualElement* +VisualElement::GetParent(void) const +{ + CHECK_CONSTRUCTED; + + if (_pVisualElementImpl->__isHidingParent) + { + return null; + } + + if (_pVisualElementImpl->GetParent() && !_pVisualElementImpl->GetParent()->__isInternal) + { + return _pVisualElementImpl->GetParent()->GetPublic(); + } + else + { + return null; + } +} + +Tizen::Base::Collection::IList* +VisualElement::GetChildrenN(void) const +{ + CHECK_CONSTRUCTED; + + return _pVisualElementImpl->GetPublicChildrenN(); +} + +int +VisualElement::GetChildrenCount(void) const +{ + CHECK_CONSTRUCTED; + + return _pVisualElementImpl->GetChildrenCount(); +} + +bool +VisualElement::IsChildOf(const VisualElement& other) const +{ + CHECK_CONSTRUCTED; + CHECK_PARAMETER_CONSTRUCTED(other); + + return _pVisualElementImpl->IsChildOf(*other._pVisualElementImpl); +} +bool +VisualElement::IsChildOf(const VisualElement* pOther) const +{ + SysTryReturnResult(NID_UI_ANIM, pOther != null, E_INVALID_ARG, "pOther is null"); + return IsChildOf(*pOther); +} + +result +VisualElement::AttachChild(const VisualElement& child) +{ + CHECK_CONSTRUCTED; + CHECK_PRESENTATION_INSTANCE_RETURN(this, E_SUCCESS); + CHECK_PARAMETER_CONSTRUCTED(child); + + return _pVisualElementImpl->AddChild(*child._pVisualElementImpl); +} + +result +VisualElement::AttachChild(VisualElement* pChild) +{ + SysTryReturnResult(NID_UI_ANIM, pChild != null, E_INVALID_ARG, "pChild is null"); + return AttachChild(*pChild); +} + +result +VisualElement::InsertChild(const VisualElement& child, const VisualElement* pReference, bool above) +{ + CHECK_CONSTRUCTED; + CHECK_PRESENTATION_INSTANCE_RETURN(this, E_SUCCESS); + CHECK_PARAMETER_CONSTRUCTED(child); + + _VisualElementImpl* pRefInternal = null; + if (pReference) + { + CHECK_PARAMETER_CONSTRUCTED(*pReference); + pRefInternal = pReference->_pVisualElementImpl; + } + + return _pVisualElementImpl->InsertChild(*child._pVisualElementImpl, pRefInternal, above); +} + +result +VisualElement::InsertChild(VisualElement* pChild, const VisualElement* pReference, bool above) +{ + CHECK_PRESENTATION_INSTANCE_RETURN(this, E_SUCCESS); + SysTryReturnResult(NID_UI_ANIM, pChild != null, E_INVALID_ARG, "pChild is null"); + return InsertChild(*pChild, pReference, above); +} + +result +VisualElement::DetachChild(const VisualElement& child) +{ + CHECK_CONSTRUCTED; + CHECK_PRESENTATION_INSTANCE_RETURN(this, E_SUCCESS); + CHECK_PARAMETER_CONSTRUCTED(child); + + _VisualElementImpl* pInternal = null; + + pInternal = child._pVisualElementImpl; + + return _pVisualElementImpl->RemoveChild(*pInternal, false); +} + +result +VisualElement::DetachChild(VisualElement* pChild) +{ + CHECK_PRESENTATION_INSTANCE_RETURN(this, E_SUCCESS); + SysTryReturnResult(NID_UI_ANIM, pChild != null, E_INVALID_ARG, "pChild is null"); + return DetachChild(*pChild); +} + +result +VisualElement::ChangeZOrder(const VisualElement* pReference, bool above) +{ + CHECK_CONSTRUCTED; + CHECK_PRESENTATION_INSTANCE_RETURN(this, E_SUCCESS); + + _VisualElementImpl* pRefInternal = null; + if (pReference) + { + CHECK_PARAMETER_CONSTRUCTED(*pReference); + pRefInternal = pReference->_pVisualElementImpl; + } + + return _pVisualElementImpl->SetZOrder(pRefInternal, above); +} + +result +VisualElement::SetAnimationProvider(IVisualElementAnimationProvider* pProvider) +{ + CHECK_CONSTRUCTED; + CHECK_PRESENTATION_INSTANCE_RETURN(this, E_SUCCESS); + + return _pVisualElementImpl->SetAnimationProvider(pProvider); +} + + +IVisualElementAnimationProvider* +VisualElement::GetAnimationProvider(void) const +{ + CHECK_CONSTRUCTED; + + return _pVisualElementImpl->GetAnimationProvider(); +} + +result +VisualElement::SetContentProvider(IVisualElementContentProvider* pProvider) +{ + CHECK_CONSTRUCTED; + CHECK_PRESENTATION_INSTANCE_RETURN(this, E_SUCCESS); + + return _pVisualElementImpl->SetContentProvider(pProvider); +} + +IVisualElementContentProvider* +VisualElement::GetContentProvider(void) const +{ + CHECK_CONSTRUCTED; + + return _pVisualElementImpl->GetContentProvider(); +} + +result +VisualElement::SetVisualElementEventListener(IVisualElementEventListener* pListener) +{ + CHECK_CONSTRUCTED; + CHECK_PRESENTATION_INSTANCE_RETURN(this, E_SUCCESS); + + return _pVisualElementImpl->SetVisualElementEventListener(pListener); +} + +IVisualElementEventListener* +VisualElement::GetVisualElementEventListener(void) const +{ + CHECK_CONSTRUCTED; + + return _pVisualElementImpl->GetVisualElementEventListener(); +} + +Tizen::Base::String +VisualElement::GetName(void) const +{ + CHECK_CONSTRUCTED; + + return _pVisualElementImpl->GetName(); +} + +void +VisualElement::SetName(const Tizen::Base::String& name) +{ + CHECK_CONSTRUCTED; + CHECK_PRESENTATION_INSTANCE(this); + + _pVisualElementImpl->SetName(name); +} + +void +VisualElement::SetUserData(void* pUserData) +{ + CHECK_CONSTRUCTED; + CHECK_PRESENTATION_INSTANCE(this); + + _pVisualElementImpl->SetUserData(pUserData); +} + +void* +VisualElement::GetUserData(void) const +{ + CHECK_CONSTRUCTED; + + return _pVisualElementImpl->GetUserData(); +} + +result +VisualElement::SetSurface(VisualElementSurface* pSurface) +{ + CHECK_CONSTRUCTED; + CHECK_PRESENTATION_INSTANCE_RETURN(this, E_SUCCESS); + + return _pVisualElementImpl->SetSurface(pSurface); +} + +VisualElementSurface* +VisualElement::GetSurfaceN(void) const +{ + CHECK_CONSTRUCTED; + + return _pVisualElementImpl->GetSurfaceN(); +} + +result +VisualElement::SetRenderOperation(RenderOperation renderOperation) +{ + CHECK_CONSTRUCTED; + CHECK_PRESENTATION_INSTANCE_RETURN(this, E_SUCCESS); + + return _pVisualElementImpl->SetRenderOperation(renderOperation); +} + +VisualElement::RenderOperation +VisualElement::GetRenderOperation(void) const +{ + CHECK_CONSTRUCTED; + + return _pVisualElementImpl->GetRenderOperation(); +} + +VisualElement* +VisualElement::GetChild(const Tizen::Base::String& name, bool searchDescendants) const +{ + CHECK_CONSTRUCTED; + + _VisualElementImpl* pChild = _pVisualElementImpl->GetChild(name, searchDescendants); + if (pChild) + { + return pChild->GetPublic(); + } + + return null; +} + +result +VisualElement::InvalidateRectangle(const FloatRectangle* pRectangle) +{ + CHECK_CONSTRUCTED; + CHECK_PRESENTATION_INSTANCE_RETURN(this, E_SUCCESS); + + return _pVisualElementImpl->InvalidateRectangle(pRectangle); +} + +FloatRectangle +VisualElement::GetUpdateRectangle(void) const +{ + CHECK_CONSTRUCTED; + + return _pVisualElementImpl->GetUpdateRectangle(); +} + +result +VisualElement::Draw(void) +{ + CHECK_CONSTRUCTED; + CHECK_PRESENTATION_INSTANCE_RETURN(this, E_SUCCESS); + + return _pVisualElementImpl->Draw(); +} + +Canvas* +VisualElement::GetCanvasN(void) const +{ + CHECK_CONSTRUCTED; + + return _pVisualElementImpl->GetCanvasN(); +} + +Canvas* +VisualElement::GetCanvasN(const Tizen::Graphics::Rectangle& bounds) const +{ + CHECK_CONSTRUCTED; + + return _pVisualElementImpl->GetCanvasN(bounds); +} + +Tizen::Graphics::Canvas* +VisualElement::GetCanvasN(const Tizen::Graphics::FloatRectangle& bounds) const +{ + CHECK_CONSTRUCTED; + + return _pVisualElementImpl->GetCanvasN(bounds); + +} + +VisualElement* +VisualElement::GetChildAt(const FloatPoint& point) const +{ + CHECK_CONSTRUCTED; + + _VisualElementImpl* pChild = _pVisualElementImpl->GetChildAt(point); + if (pChild) + { + return pChild->GetPublic(); + } + + return null; +} + +bool +VisualElement::IsClipChildrenEnabled(void) const +{ + CHECK_CONSTRUCTED; + + return _pVisualElementImpl->IsClipChildrenEnabled(); +} + +void +VisualElement::SetClipChildrenEnabled(bool clipChildren) +{ + CHECK_CONSTRUCTED; + CHECK_PRESENTATION_INSTANCE(this); + + _pVisualElementImpl->SetClipChildrenEnabled(clipChildren); +} + +result +VisualElement::ConvertCoordinates(FloatPoint& point, const VisualElement* pFromVisualElement) const +{ + CHECK_CONSTRUCTED; + + _VisualElementImpl* pFrom = null; + + if (pFromVisualElement) + { + CHECK_PARAMETER_CONSTRUCTED(*pFromVisualElement); + pFrom = pFromVisualElement->_pVisualElementImpl; + } + + return _pVisualElementImpl->ConvertCoordinates(point, pFrom); +} + +result +VisualElement::ConvertCoordinates(FloatRectangle& rectangle, const VisualElement* pFromVisualElement) const +{ + CHECK_CONSTRUCTED; + + _VisualElementImpl* pFrom = null; + + if (pFromVisualElement) + { + CHECK_PARAMETER_CONSTRUCTED(*pFromVisualElement); + pFrom = pFromVisualElement->_pVisualElementImpl; + } + + return _pVisualElementImpl->ConvertCoordinates(rectangle, pFrom); +} + +FloatPoint3 +VisualElement::TransformVectorFromOrigin(const Tizen::Graphics::FloatPoint3& originPoint, const VisualElement* pOriginVisualElement) const +{ + CHECK_CONSTRUCTED; + + CHECK_PARAMETER_CONSTRUCTED(*pOriginVisualElement); + + return _pVisualElementImpl->TransformVectorFromOrigin(originPoint, pOriginVisualElement->_pVisualElementImpl); +} + +result +VisualElement::SetContentBounds(const FloatRectangle& contentBounds) +{ + CHECK_CONSTRUCTED; + CHECK_PRESENTATION_INSTANCE_RETURN(this, E_SUCCESS); + + return _pVisualElementImpl->SetContentBounds(contentBounds); +} + +FloatRectangle +VisualElement::GetContentBounds(void) const +{ + CHECK_CONSTRUCTED; + + return _pVisualElementImpl->GetContentBounds(); +} + + +result +VisualElement::AddAnimation(const VisualElementAnimation& animation) +{ + CHECK_CONSTRUCTED; + CHECK_PRESENTATION_INSTANCE_RETURN(this, E_SUCCESS); + + return _pVisualElementImpl->AddAnimation(null, const_cast< VisualElementAnimation& >(animation)); +} + +result +VisualElement::AddAnimation(const Tizen::Base::String& keyName, const VisualElementAnimation& animation) +{ + CHECK_CONSTRUCTED; + CHECK_PRESENTATION_INSTANCE_RETURN(this, E_SUCCESS); + + return _pVisualElementImpl->AddAnimation(&keyName, const_cast< VisualElementAnimation& >(animation)); +} + + +result +VisualElement::RemoveAnimation(const Tizen::Base::String& keyName) +{ + CHECK_CONSTRUCTED; + CHECK_PRESENTATION_INSTANCE_RETURN(this, E_SUCCESS); + + return _pVisualElementImpl->RemoveAnimation(keyName); +} + +VisualElementAnimation* +VisualElement::GetAnimationN(const Tizen::Base::String& keyName) const +{ + CHECK_CONSTRUCTED; + + return _pVisualElementImpl->GetAnimationN(keyName); +} + +void +VisualElement::RemoveAllAnimations(void) +{ + CHECK_CONSTRUCTED; + CHECK_PRESENTATION_INSTANCE(this); + + _pVisualElementImpl->RemoveAllAnimations(); +} + +const VisualElement* +VisualElement::AcquirePresentationInstance(void) +{ + CHECK_CONSTRUCTED; + + if (likely(_pVisualElementImpl->GetPresentation())) + { + return _pVisualElementImpl->GetPresentation()->GetPublic(); + } + + return null; +} + +void +VisualElement::ReleasePresentationInstance(void) +{ + return; +} + +const VisualElement* +VisualElement::AcquireModelInstance(void) +{ + CHECK_CONSTRUCTED; + + if (likely(_pVisualElementImpl->GetModel())) + { + return _pVisualElementImpl->GetModel()->GetPublic(); + } + + return null; +} + +void +VisualElement::ReleaseModelInstance(void) +{ + return; +} + +void +VisualElement::SetImplicitAnimationEnabled(bool enable) +{ + CHECK_CONSTRUCTED; + CHECK_PRESENTATION_INSTANCE(this); + + _pVisualElementImpl->SetImplicitAnimationEnabled(enable); +} + +bool +VisualElement::IsImplicitAnimationEnabled(void) const +{ + CHECK_CONSTRUCTED; + + return _pVisualElementImpl->GetImplicitAnimationEnabled(); +} + +// Delegations +void +VisualElement::OnConstructed(void) +{ + +} + +/** + * This method is invoked before deallocating the VisualElement instance in the Destroy() method. + * @since 2.0 + * + * @see Destroy() + * @see Construct() + * @see OnConstructed() + */ +void +VisualElement::OnDestructing(void) +{ +} + +HitTestResult +VisualElement::OnHitTest(const FloatPoint& point) +{ + CHECK_CONSTRUCTED; + + int hitResult = _pVisualElementImpl->HitTestI(point); + + if (hitResult == _VisualElementImpl::HITTEST_MATCH) + { + return HIT_TEST_MATCH; + } + + return HIT_TEST_NOWHERE; +} + +bool +VisualElement::OnPrepareDraw(void) +{ + return true; +} + +result +VisualElement::SetFlushNeeded(void) +{ + CHECK_CONSTRUCTED; + CHECK_PRESENTATION_INSTANCE_RETURN(this, E_SUCCESS); + + return _pVisualElementImpl->SetFlushNeeded(); +} + +result +VisualElement::Flush(void) +{ + return _VisualElementImpl::FlushI(); +} + +void +VisualElement::OnDraw(Canvas& canvas) +{ +} + +VisualElementAnimation* +VisualElement::OnCreateAnimationForProperty(const Tizen::Base::String& property) +{ + CHECK_CONSTRUCTED; + + return _pVisualElementImpl->CreateAnimationForPropertyI(property); +} + + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnimVisualElementAnimation.cpp b/src/ui/animations/FUiAnimVisualElementAnimation.cpp new file mode 100644 index 0000000..63d0dbc --- /dev/null +++ b/src/ui/animations/FUiAnimVisualElementAnimation.cpp @@ -0,0 +1,466 @@ +// +// 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 FUiAnimVisualElementAnimation.cpp + * @brief This file contains implementation of VisualElementAnimation class + * + * This file contains implementation VisualElementAnimation class. + */ + +#include +#include +#include + +#include + +#include "FUiAnim_TimingFunction.h" +#include "FUiAnim_VisualElementAnimationImpl.h" + +namespace Tizen { namespace Ui { namespace Animations +{ + +// for TimingFunction +class _Singleton +{ +private: + _Singleton(void) + { + // TODO: may need lock for multi thread + pTimingFunctions = new (std::nothrow) Tizen::Base::Collection::HashMap(); + SysTryReturnVoidResult(NID_UI_ANIM, pTimingFunctions, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + result r = pTimingFunctions->Construct(); + if (r != E_SUCCESS) + { + delete pTimingFunctions; + pTimingFunctions = null; + + SetLastResult(r); + return; + } + + // Add timing functions to map + // Linear + LinearTimingFunction* pTimingFunctionLinear = new (std::nothrow) LinearTimingFunction(); + SysTryReturnVoidResult(NID_UI_ANIM, pTimingFunctionLinear, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + Tizen::Base::String* pKeyLinear = new (std::nothrow) Tizen::Base::String(L"Linear"); + SysTryReturnVoidResult(NID_UI_ANIM, pKeyLinear, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pKeyLinear->ToLowerCase(); + pTimingFunctions->Add(*pKeyLinear, *pTimingFunctionLinear); + + // EaseIn + EaseInTimingFunction* pTimingFunctionEaseIn = new (std::nothrow) EaseInTimingFunction(); + SysTryReturnVoidResult(NID_UI_ANIM, pTimingFunctionEaseIn, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + Tizen::Base::String* pKeyEaseIn = new (std::nothrow) Tizen::Base::String(L"EaseIn"); + SysTryReturnVoidResult(NID_UI_ANIM, pKeyEaseIn, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pKeyEaseIn->ToLowerCase(); + pTimingFunctions->Add(*pKeyEaseIn, *pTimingFunctionEaseIn); + + // EaseOut + EaseOutTimingFunction* pTimingFunctionEaseOut = new (std::nothrow) EaseOutTimingFunction(); + SysTryReturnVoidResult(NID_UI_ANIM, pTimingFunctionEaseOut, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + Tizen::Base::String* pKeyEaseOut = new (std::nothrow) Tizen::Base::String(L"EaseOut"); + SysTryReturnVoidResult(NID_UI_ANIM, pKeyEaseOut, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pKeyEaseOut->ToLowerCase(); + pTimingFunctions->Add(*pKeyEaseOut, *pTimingFunctionEaseOut); + + // EaseInOut + EaseInOutTimingFunction* pTimingFunctionEaseInOut = new (std::nothrow) EaseInOutTimingFunction(); + SysTryReturnVoidResult(NID_UI_ANIM, pTimingFunctionEaseInOut, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + Tizen::Base::String* pKeyEaseInOut = new (std::nothrow) Tizen::Base::String(L"EaseInOut"); + SysTryReturnVoidResult(NID_UI_ANIM, pKeyEaseInOut, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pKeyEaseInOut->ToLowerCase(); + pTimingFunctions->Add(*pKeyEaseInOut, *pTimingFunctionEaseInOut); + + // EaseOutIn + EaseOutInTimingFunction* pTimingFunctionEaseOutIn = new (std::nothrow) EaseOutInTimingFunction(); + SysTryReturnVoidResult(NID_UI_ANIM, pTimingFunctionEaseOutIn, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + Tizen::Base::String* pKeyEaseOutIn = new (std::nothrow) Tizen::Base::String(L"EaseOutIn"); + SysTryReturnVoidResult(NID_UI_ANIM, pKeyEaseOutIn, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pKeyEaseOutIn->ToLowerCase(); + pTimingFunctions->Add(*pKeyEaseOutIn, *pTimingFunctionEaseOutIn); + + // Discrete + DiscreteTimingFunction* pTimingFunctionDiscrete = new (std::nothrow) DiscreteTimingFunction(); + SysTryReturnVoidResult(NID_UI_ANIM, pTimingFunctionDiscrete, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + Tizen::Base::String* pKeyDiscrete = new (std::nothrow) Tizen::Base::String(L"Discrete"); + SysTryReturnVoidResult(NID_UI_ANIM, pKeyDiscrete, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pKeyDiscrete->ToLowerCase(); + pTimingFunctions->Add(*pKeyDiscrete, *pTimingFunctionDiscrete); + + // Bezier + BezierTimingFunction* pTimingFunctionBezier = new (std::nothrow) BezierTimingFunction(); + SysTryReturnVoidResult(NID_UI_ANIM, pTimingFunctionBezier, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + Tizen::Base::String* pKeyBezier = new (std::nothrow) Tizen::Base::String(L"Bezier"); + SysTryReturnVoidResult(NID_UI_ANIM, pKeyBezier, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pKeyBezier->ToLowerCase(); + pTimingFunctions->Add(*pKeyBezier, *pTimingFunctionBezier); + + // ExpIn + ExpInTimingFunction* pTimingFunctionExpIn = new (std::nothrow) ExpInTimingFunction(); + SysTryReturnVoidResult(NID_UI_ANIM, pTimingFunctionExpIn, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + Tizen::Base::String* pKeyExpIn = new (std::nothrow) Tizen::Base::String(L"ExpIn"); + SysTryReturnVoidResult(NID_UI_ANIM, pKeyExpIn, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pKeyExpIn->ToLowerCase(); + pTimingFunctions->Add(*pKeyExpIn, *pTimingFunctionExpIn); + + // ExpOut + ExpOutTimingFunction* pTimingFunctionExpOut = new (std::nothrow) ExpOutTimingFunction(); + SysTryReturnVoidResult(NID_UI_ANIM, pTimingFunctionExpOut, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + Tizen::Base::String* pKeyExpOut = new (std::nothrow) Tizen::Base::String(L"ExpOut"); + SysTryReturnVoidResult(NID_UI_ANIM, pKeyExpOut, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pKeyExpOut->ToLowerCase(); + pTimingFunctions->Add(*pKeyExpOut, *pTimingFunctionExpOut); + + // EaseElasticIn + EaseElasticInTimingFunction* pTimingFunctionEaseElasticIn = new (std::nothrow) EaseElasticInTimingFunction(); + SysTryReturnVoidResult(NID_UI_ANIM, pTimingFunctionEaseElasticIn, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + Tizen::Base::String* pKeyEaseElasticIn = new (std::nothrow) Tizen::Base::String(L"EaseElasticIn"); + SysTryReturnVoidResult(NID_UI_ANIM, pKeyEaseElasticIn, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pKeyEaseElasticIn->ToLowerCase(); + pTimingFunctions->Add(*pKeyEaseElasticIn, *pTimingFunctionEaseElasticIn); + + // EaseElasticOut + EaseElasticOutTimingFunction* pTimingFunctionEaseElasticOut = new (std::nothrow) EaseElasticOutTimingFunction(); + SysTryReturnVoidResult(NID_UI_ANIM, pTimingFunctionEaseElasticOut, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + Tizen::Base::String* pKeyEaseElasticOut = new (std::nothrow) Tizen::Base::String(L"EaseElasticOut"); + SysTryReturnVoidResult(NID_UI_ANIM, pKeyEaseElasticOut, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pKeyEaseElasticOut->ToLowerCase(); + pTimingFunctions->Add(*pKeyEaseElasticOut, *pTimingFunctionEaseElasticOut); + } + + ~_Singleton(void) + { + if (pTimingFunctions) + { + pTimingFunctions->RemoveAll(true); + } + + delete pTimingFunctions; + pTimingFunctions = null; + } + + static void + InitSingleton(void) + { + static _Singleton inst; + __pInstance = &inst; + } + +public: + static _Singleton* + GetInstance(void) + { + static pthread_once_t once_block = PTHREAD_ONCE_INIT; + if (!__pInstance) + { + pthread_once(&once_block, InitSingleton); + } + + return __pInstance; + } + + +public: + Tizen::Base::Collection::HashMap* pTimingFunctions; + +private: + _Singleton(const _Singleton& rhs); + _Singleton& operator =(const _Singleton& rhs); + static _Singleton* __pInstance; + +}; + +_Singleton* _Singleton::__pInstance = null; + +VisualElementAnimation::VisualElementAnimation(void) +{ + ClearLastResult(); + + _pAnimationImpl = new (std::nothrow) _VisualElementAnimationImpl(); + if (_pAnimationImpl == null) + { + SetLastResult(E_OUT_OF_MEMORY); + } +} + +VisualElementAnimation::~VisualElementAnimation(void) +{ + if (_pAnimationImpl) + { + delete _pAnimationImpl; + _pAnimationImpl = null; + } +} + +VisualElementAnimation::VisualElementAnimation(_VisualElementAnimationImpl* pAnimationImpl) + : _pAnimationImpl(pAnimationImpl) +{ + ClearLastResult(); +} + +VisualElementAnimation::VisualElementAnimation(const VisualElementAnimation& animation) + : _pAnimationImpl(null) +{ + ClearLastResult(); + + _pAnimationImpl = new (std::nothrow) _VisualElementAnimationImpl(*(animation._pAnimationImpl)); + SysTryReturnVoidResult(NID_UI_ANIM, (_pAnimationImpl != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); +} + +VisualElementAnimation& +VisualElementAnimation::operator =(const VisualElementAnimation& rhs) +{ + if (this != (&rhs)) + { + result r = _pAnimationImpl->CopyAnimationValue(*(rhs._pAnimationImpl)); + SysTryReturn(NID_UI_ANIM, (r == E_SUCCESS), *this, r, "[%s] Failed to copy the animation value.", GetErrorMessage(r)); + } + + return *this; +} + +bool +VisualElementAnimation::operator ==(const VisualElementAnimation& rhs) const +{ + if (this == &rhs) + { + return true; + } + + return (_pAnimationImpl->Equals(*(rhs._pAnimationImpl))); +} + +bool +VisualElementAnimation::operator !=(const VisualElementAnimation& rhs) const +{ + return (!operator == (rhs)); +} + +bool +VisualElementAnimation::Equals(const Tizen::Base::Object& obj) const +{ + const VisualElementAnimation* pAnimation = dynamic_cast< const VisualElementAnimation* >(&obj); + + if (pAnimation == null) + { + return false; + } + + return (*this == *pAnimation); +} + +int +VisualElementAnimation::GetHashCode(void) const +{ + return _pAnimationImpl->GetHashCode(); +} + +VisualElementAnimation* +VisualElementAnimation::CloneN(void) const +{ + VisualElementAnimation* pCloned = new (std::nothrow) VisualElementAnimation(*this); + SysTryReturn(NID_UI_ANIM, (pCloned != null), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + return pCloned; +} + +void +VisualElementAnimation::SetVisualElementAnimationStatusEventListener(IVisualElementAnimationStatusEventListener* pListener) +{ + _pAnimationImpl->SetStatusEventListener(pListener); +} + +IVisualElementAnimationStatusEventListener* +VisualElementAnimation::GetVisualElementAnimationStatusEventListener(void) const +{ + return _pAnimationImpl->GetStatusEventListener(); +} + +void +VisualElementAnimation::SetTimingFunction(const IVisualElementAnimationTimingFunction* pTimingFunction) +{ + _pAnimationImpl->SetTimingFunction(pTimingFunction); +} + +const IVisualElementAnimationTimingFunction* +VisualElementAnimation::GetTimingFunction(void) const +{ + return _pAnimationImpl->GetTimingFunction(); +} + +void +VisualElementAnimation::SetValueInterpolator(const IVisualElementAnimationValueInterpolator* pInterpolator) +{ + _pAnimationImpl->SetValueInterpolator(pInterpolator); +} + +const IVisualElementAnimationValueInterpolator* +VisualElementAnimation::GetValueInterpolator(void) const +{ + return _pAnimationImpl->GetValueInterpolator(); +} + +result +VisualElementAnimation::SetDuration(long milliseconds) +{ + SysTryReturnResult(NID_UI_ANIM, (milliseconds >= 0 && milliseconds >= _pAnimationImpl->GetOffset()), + E_INVALID_ARG, "Invalid argument(s) is used. milliseconds = %ld", milliseconds); + + _pAnimationImpl->SetDuration(milliseconds); + + return E_SUCCESS; +} + +long +VisualElementAnimation::GetDuration(void) const +{ + return _pAnimationImpl->GetDuration(); +} + +result +VisualElementAnimation::SetOffset(long milliseconds) +{ + SysTryReturnResult(NID_UI_ANIM, (milliseconds >= 0 && milliseconds <= _pAnimationImpl->GetDuration()), + E_INVALID_ARG, "Invalid argument(s) is used. milliseconds = %ld", milliseconds); + + _pAnimationImpl->SetOffset(milliseconds); + + return E_SUCCESS; +} + +long +VisualElementAnimation::GetOffset(void) const +{ + return _pAnimationImpl->GetOffset(); +} + +result +VisualElementAnimation::SetDelay(long milliseconds) +{ + SysTryReturnResult(NID_UI_ANIM, (milliseconds >= 0), E_INVALID_ARG, "Invalid argument(s) is used. milliseconds = %ld", milliseconds); + + _pAnimationImpl->SetDelay(milliseconds); + + return E_SUCCESS; +} + +long +VisualElementAnimation::GetDelay(void) const +{ + return _pAnimationImpl->GetDelay(); +} + +result +VisualElementAnimation::SetRepeatCount(long count) +{ + SysTryReturnResult(NID_UI_ANIM, (count >= 0), E_INVALID_ARG, "Invalid argument(s) is used. count = %ld", count); + + _pAnimationImpl->SetRepeatCount(count); + + return E_SUCCESS; +} + +long +VisualElementAnimation::GetRepeatCount(void) const +{ + return _pAnimationImpl->GetRepeatCount(); +} + +void +VisualElementAnimation::SetAutoReverseEnabled(bool autoReverse) +{ + _pAnimationImpl->SetAutoReverseEnabled(autoReverse); +} + +bool +VisualElementAnimation::IsAutoReverseEnabled(void) const +{ + return _pAnimationImpl->IsAutoReverseEnabled(); +} + +result +VisualElementAnimation::SetScaleRatio(float scaleRatio) +{ + SysTryReturnResult(NID_UI_ANIM, (scaleRatio > 0.f), E_INVALID_ARG, "Invalid argument(s) is used. scaleRatio = %f", scaleRatio); + + _pAnimationImpl->SetScaleRatio(scaleRatio); + + return E_SUCCESS; +} + +float +VisualElementAnimation::GetScaleRatio(void) const +{ + return _pAnimationImpl->GetScaleRatio(); +} + +void +VisualElementAnimation::SetUserData(void* pUserData) +{ + _pAnimationImpl->SetUserData(pUserData); +} + +void* +VisualElementAnimation::GetUserData(void) const +{ + return _pAnimationImpl->GetUserData(); +} + +const IVisualElementAnimationTimingFunction* +VisualElementAnimation::GetTimingFunctionByName(const Tizen::Base::String& name) +{ + _Singleton* pInstance = _Singleton::GetInstance(); + + SysTryReturn(NID_UI_ANIM, pInstance, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryReturn(NID_UI_ANIM, pInstance->pTimingFunctions, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + Tizen::Base::String functionName = name; + functionName.ToLowerCase(); + + IVisualElementAnimationTimingFunction* pTimingFunction = dynamic_cast< IVisualElementAnimationTimingFunction* >(pInstance->pTimingFunctions->GetValue(functionName)); + + SysTryReturn(NID_UI_ANIM, pTimingFunction, null, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. name = %ls.", name.GetPointer()); + + return pTimingFunction; +} + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnimVisualElementAnimationGroup.cpp b/src/ui/animations/FUiAnimVisualElementAnimationGroup.cpp new file mode 100644 index 0000000..0c22076 --- /dev/null +++ b/src/ui/animations/FUiAnimVisualElementAnimationGroup.cpp @@ -0,0 +1,162 @@ +// +// 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 FUiAnimVisualElementAnimationGroup.cpp + * @brief This file contains implementation of VisualElementAnimationGroup class + * + * This file contains implementation VisualElementAnimationGroup class. + */ + +#include + +#include +#include + +#include "FUiAnim_VisualElementAnimationGroupImpl.h" + +namespace Tizen { namespace Ui { namespace Animations +{ + +VisualElementAnimationGroup::VisualElementAnimationGroup(void) + : VisualElementAnimation(new (std::nothrow) _VisualElementAnimationGroupImpl()) +{ + if (_pAnimationImpl == null) + { + SetLastResult(E_OUT_OF_MEMORY); + } +} + +VisualElementAnimationGroup::~VisualElementAnimationGroup(void) +{ + +} + +VisualElementAnimationGroup::VisualElementAnimationGroup(const VisualElementAnimationGroup& animationGroup) + : VisualElementAnimation(null) +{ + ClearLastResult(); + + const _VisualElementAnimationGroupImpl* pAnimationImpl = _VisualElementAnimationGroupImpl::GetInstance(animationGroup); + + _pAnimationImpl = new (std::nothrow) _VisualElementAnimationGroupImpl(*pAnimationImpl); + SysTryReturnVoidResult(NID_UI_ANIM, (_pAnimationImpl), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); +} + +VisualElementAnimationGroup& +VisualElementAnimationGroup::operator =(const VisualElementAnimationGroup& rhs) +{ + ClearLastResult(); + + if (this != (&rhs)) + { + _VisualElementAnimationGroupImpl* pAnimationImpl = _VisualElementAnimationGroupImpl::GetInstance(*this); + const _VisualElementAnimationGroupImpl* pRhsAnimationImpl = _VisualElementAnimationGroupImpl::GetInstance(rhs); + + result r = pAnimationImpl->CopyAnimationValue(*pRhsAnimationImpl); + SysTryReturn(NID_UI_ANIM, (r == E_SUCCESS), *this, r, "[%s] Failed to copy the animation value.", GetErrorMessage(r)); + } + + return *this; +} + +bool +VisualElementAnimationGroup::operator ==(const VisualElementAnimationGroup& rhs) const +{ + return VisualElementAnimation::operator ==(rhs); +} + +bool +VisualElementAnimationGroup::operator !=(const VisualElementAnimationGroup& rhs) const +{ + return (!operator ==(rhs)); +} + +bool +VisualElementAnimationGroup::Equals(const Tizen::Base::Object& obj) const +{ + const VisualElementAnimationGroup* pAnimationGroup = dynamic_cast< const VisualElementAnimationGroup* >(&obj); + + if (pAnimationGroup == null) + { + return false; + } + + return (*this == *pAnimationGroup); +} + +int +VisualElementAnimationGroup::GetHashCode(void) const +{ + return VisualElementAnimation::GetHashCode(); +} + +VisualElementAnimation* +VisualElementAnimationGroup::CloneN(void) const +{ + VisualElementAnimation* pCloned = new (std::nothrow) VisualElementAnimationGroup(*this); + SysTryReturn(NID_UI_ANIM, pCloned, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + return pCloned; +} + +int +VisualElementAnimationGroup::GetAnimationCount(void) const +{ + const _VisualElementAnimationGroupImpl* pAnimationImpl = _VisualElementAnimationGroupImpl::GetInstance(*this); + + return pAnimationImpl->GetAnimationCount(); +} + +result +VisualElementAnimationGroup::AddAnimation(const VisualElementAnimation& animation) +{ + _VisualElementAnimationGroupImpl* pAnimationImpl = _VisualElementAnimationGroupImpl::GetInstance(*this); + + return pAnimationImpl->AddAnimation(animation); +} + +result +VisualElementAnimationGroup::RemoveAnimationAt(int index) +{ + _VisualElementAnimationGroupImpl* pAnimationImpl = _VisualElementAnimationGroupImpl::GetInstance(*this); + + SysTryReturnResult(NID_UI_ANIM, (index >= 0 && index < pAnimationImpl->GetAnimationCount()), E_OUT_OF_RANGE, "Index (%d) is out of range.", index); + + return pAnimationImpl->RemoveAnimationAt(index); +} + +void +VisualElementAnimationGroup::RemoveAllAnimations(void) +{ + _VisualElementAnimationGroupImpl* pAnimationImpl = _VisualElementAnimationGroupImpl::GetInstance(*this); + + pAnimationImpl->RemoveAllAnimations(); +} + +VisualElementAnimation* +VisualElementAnimationGroup::GetAnimationAtN(int index) const +{ + const _VisualElementAnimationGroupImpl* pAnimationImpl = _VisualElementAnimationGroupImpl::GetInstance(*this); + + SysTryReturn(NID_UI_ANIM, (index >= 0 && index < pAnimationImpl->GetAnimationCount()), null, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] Index (%d) is out of range.", index); + + return pAnimationImpl->GetAnimationAtN(index); +} + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnimVisualElementAnimationProvider.cpp b/src/ui/animations/FUiAnimVisualElementAnimationProvider.cpp new file mode 100644 index 0000000..a3a37ae --- /dev/null +++ b/src/ui/animations/FUiAnimVisualElementAnimationProvider.cpp @@ -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 FUiAnimVisualElementAnimationProvider.cpp + * @brief This file contains implementation of VisualElementAnimationProvider class + * + * This file contains implementation VisualElementAnimationProvider class. + */ + +#include +#include + +namespace Tizen { namespace Ui { namespace Animations +{ + +VisualElementAnimationProvider::VisualElementAnimationProvider(void) +{ +} + +VisualElementAnimationProvider::~VisualElementAnimationProvider(void) +{ +} + +VisualElementAnimation* +VisualElementAnimationProvider::CreateAnimationForProperty(VisualElement& target, const Tizen::Base::String& property) +{ + return target.OnCreateAnimationForProperty(property); +} + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnimVisualElementContentProvider.cpp b/src/ui/animations/FUiAnimVisualElementContentProvider.cpp new file mode 100644 index 0000000..3f8b838 --- /dev/null +++ b/src/ui/animations/FUiAnimVisualElementContentProvider.cpp @@ -0,0 +1,58 @@ +// +// 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 FUiAnimVisualElementContentProvider.cpp + * @brief This file contains implementation of VisualElementContentProvider class + * + * This file contains implementation VisualElementContentProvider class. + */ + +#include +#include + +namespace Tizen { namespace Ui { namespace Animations +{ + +VisualElementContentProvider::VisualElementContentProvider(void) +{ +} + +VisualElementContentProvider::~VisualElementContentProvider(void) +{ +} + +bool +VisualElementContentProvider::PrepareDraw(VisualElement& target) +{ + return true; +} + +void +VisualElementContentProvider::DrawContent(VisualElement& target, Tizen::Graphics::Canvas& canvas) +{ + target.OnDraw(canvas); +} + +enum HitTestResult +VisualElementContentProvider::HitTest(VisualElement& target, const Tizen::Graphics::FloatPoint& point) +{ + return target.OnHitTest(point); +} + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnimVisualElementPropertyAnimation.cpp b/src/ui/animations/FUiAnimVisualElementPropertyAnimation.cpp new file mode 100644 index 0000000..e837644 --- /dev/null +++ b/src/ui/animations/FUiAnimVisualElementPropertyAnimation.cpp @@ -0,0 +1,137 @@ +// +// 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 FUiAnimVisualElementPropertyAnimation.cpp + * @brief This file contains implementation of VisualElementPropertyAnimation class + * + * This file contains implementation VisualElementPropertyAnimation class. + */ + +#include + +#include + +#include "FUiAnim_VisualElementPropertyAnimationImpl.h" + +namespace Tizen { namespace Ui { namespace Animations +{ + +VisualElementPropertyAnimation::VisualElementPropertyAnimation(void) + : VisualElementValueAnimation(new (std::nothrow) _VisualElementPropertyAnimationImpl()) +{ + if (_pAnimationImpl == null) + { + SetLastResult(E_OUT_OF_MEMORY); + } +} + +VisualElementPropertyAnimation::~VisualElementPropertyAnimation(void) +{ + +} + +VisualElementPropertyAnimation::VisualElementPropertyAnimation(const VisualElementPropertyAnimation& animation) + : VisualElementValueAnimation(null) +{ + ClearLastResult(); + + const _VisualElementPropertyAnimationImpl* pAnimationImpl = _VisualElementPropertyAnimationImpl::GetInstance(animation); + + _pAnimationImpl = new (std::nothrow) _VisualElementPropertyAnimationImpl(*pAnimationImpl); + SysTryReturnVoidResult(NID_UI_ANIM, (_pAnimationImpl), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); +} + +VisualElementPropertyAnimation& +VisualElementPropertyAnimation::operator =(const VisualElementPropertyAnimation& rhs) +{ + ClearLastResult(); + + if (this != (&rhs)) + { + _VisualElementPropertyAnimationImpl* pAnimationImpl = _VisualElementPropertyAnimationImpl::GetInstance(*this); + const _VisualElementPropertyAnimationImpl* pRhsAnimationImpl = _VisualElementPropertyAnimationImpl::GetInstance(rhs); + + result r = pAnimationImpl->CopyAnimationValue(*pRhsAnimationImpl); + SysTryReturn(NID_UI_ANIM, (r == E_SUCCESS), *this, r, "[%s] Failed to copy the animation value.", GetErrorMessage(r)); + } + + return *this; +} + +bool +VisualElementPropertyAnimation::operator ==(const VisualElementPropertyAnimation& rhs) const +{ + return VisualElementValueAnimation::operator ==(rhs); +} + +bool +VisualElementPropertyAnimation::operator !=(const VisualElementPropertyAnimation& rhs) const +{ + return (!operator ==(rhs)); +} + +bool +VisualElementPropertyAnimation::Equals(const Tizen::Base::Object& obj) const +{ + const VisualElementPropertyAnimation* pAnimation = dynamic_cast< const VisualElementPropertyAnimation* >(&obj); + + if (pAnimation == null) + { + return false; + } + + return (*this == *pAnimation); +} + +int +VisualElementPropertyAnimation::GetHashCode(void) const +{ + return VisualElementValueAnimation::GetHashCode(); +} + +VisualElementAnimation* +VisualElementPropertyAnimation::CloneN(void) const +{ + VisualElementPropertyAnimation* pCloned = new (std::nothrow) VisualElementPropertyAnimation(*this); + SysTryReturn(NID_UI_ANIM, (pCloned != null), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + return pCloned; +} + +result +VisualElementPropertyAnimation::SetPropertyName(const Tizen::Base::String& property) +{ + _VisualElementPropertyAnimationImpl* pAnimationImpl = _VisualElementPropertyAnimationImpl::GetInstance(*this); + + SysTryReturnResult(NID_UI_ANIM, (property.IsEmpty() == false), E_INVALID_ARG, "Invalid argument(s) is used. property is empty."); + + pAnimationImpl->SetPropertyName(property); + + return E_SUCCESS; +} + +Tizen::Base::String +VisualElementPropertyAnimation::GetPropertyName(void) const +{ + const _VisualElementPropertyAnimationImpl* pAnimationImpl = _VisualElementPropertyAnimationImpl::GetInstance(*this); + + return pAnimationImpl->GetPropertyName(); +} + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnimVisualElementSurface.cpp b/src/ui/animations/FUiAnimVisualElementSurface.cpp new file mode 100644 index 0000000..ebbea18 --- /dev/null +++ b/src/ui/animations/FUiAnimVisualElementSurface.cpp @@ -0,0 +1,168 @@ +// +// 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 FUiAnimVisualElementSurface.cpp + * @brief This file contains implementation of VisualElementSurface class + * + * This file contains implementation VisualElementSurface class. + */ + +#include +#include +#include + +#include "FUiAnim_VisualElementCanvas.h" +#include "FUiAnim_VisualElementSurfaceImpl.h" + +using namespace std; +using namespace Tizen::Base; +using namespace Tizen::Graphics; + + +#define CHECK_NOT_CONSTRUCTED \ + SysAssertf(__pVisualElementSurfaceImpl == null, "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class."); + +#define CHECK_CONSTRUCTED \ + SysAssertf(__pVisualElementSurfaceImpl, "Not yet constructed! Construct() should be called before use."); + +#define CHECK_PARAMETER_CONSTRUCTED(element) \ + SysAssertf((element).__pVisualElementSurfaceImpl, "Not yet constructed! Construct() should be called before use."); + +namespace Tizen { namespace Ui { namespace Animations +{ + +VisualElementSurface::VisualElementSurface(void) + : __pVisualElementSurfaceImpl(null) +{ +} + +VisualElementSurface::VisualElementSurface(const VisualElementSurface& rhs) + : __pVisualElementSurfaceImpl(null) +{ + CHECK_PARAMETER_CONSTRUCTED(rhs); + + __pVisualElementSurfaceImpl = rhs.__pVisualElementSurfaceImpl; + __pVisualElementSurfaceImpl->AddRef(); +} + +VisualElementSurface& +VisualElementSurface::operator =(const VisualElementSurface& rhs) +{ + CHECK_PARAMETER_CONSTRUCTED(rhs); + + if (&rhs != this) + { + if (__pVisualElementSurfaceImpl != null) + { + __pVisualElementSurfaceImpl->Release(); + } + __pVisualElementSurfaceImpl = rhs.__pVisualElementSurfaceImpl; + __pVisualElementSurfaceImpl->AddRef(); + } + + return *this; +} + +VisualElementSurface::~VisualElementSurface(void) +{ + if (__pVisualElementSurfaceImpl && __pVisualElementSurfaceImpl->Release()) + { + __pVisualElementSurfaceImpl = null; + } +} + +result +VisualElementSurface::Construct(const DisplayContext& displayContext, const Dimension& size) +{ + CHECK_NOT_CONSTRUCTED; + + SysTryReturnResult(NID_UI_ANIM, size.width >= 0 && size.height >= 0, E_OUT_OF_RANGE, "Can't create the canvas which size is less than zero."); + + FloatDimension sizeF(size.width, size.height); + unique_ptr<_VisualElementSurfaceImpl> pImpl(_VisualElementSurfaceImpl::CreateInstanceN(displayContext, sizeF)); + result r = GetLastResult(); + SysTryReturnResult(NID_UI_ANIM, pImpl, r, "Propagating."); + + __pVisualElementSurfaceImpl = pImpl.release(); + + return E_SUCCESS; +} + +result +VisualElementSurface::Construct(const DisplayContext& displayContext, const FloatDimension& size) +{ + CHECK_NOT_CONSTRUCTED; + + SysTryReturnResult(NID_UI_ANIM, size.width >= 0.0f && size.height >= 0.0f, E_OUT_OF_RANGE, "Can't create the canvas which size is less than zero."); + + unique_ptr<_VisualElementSurfaceImpl> pImpl(_VisualElementSurfaceImpl::CreateInstanceN(displayContext, size)); + result r = GetLastResult(); + SysTryReturnResult(NID_UI_ANIM, pImpl, r, "Propagating."); + + __pVisualElementSurfaceImpl = pImpl.release(); + + return E_SUCCESS; +} + +result +VisualElementSurface::GetBufferInfo(BufferInfo& bufferInfo) const +{ + CHECK_CONSTRUCTED; + + SysTryReturnResult(NID_UI_ANIM, &bufferInfo != null, E_INVALID_STATE, "BufferInfo is not initialized."); + + __pVisualElementSurfaceImpl->GetBufferInfo(bufferInfo); + + return E_SUCCESS; +} + +Dimension +VisualElementSurface::GetSize(void) const +{ + CHECK_CONSTRUCTED; + + FloatDimension sizeF = __pVisualElementSurfaceImpl->GetSizeF(); + return Dimension(static_cast(sizeF.width), static_cast(sizeF.height)); +} + +Tizen::Graphics::FloatDimension +VisualElementSurface::GetSizeF(void) const +{ + CHECK_CONSTRUCTED; + + return __pVisualElementSurfaceImpl->GetSizeF(); +} + +bool +VisualElementSurface::Equals(const Tizen::Base::Object& obj) const +{ + CHECK_CONSTRUCTED; + + return __pVisualElementSurfaceImpl->Equals(obj); +} + +int +VisualElementSurface::GetHashCode(void) const +{ + CHECK_CONSTRUCTED; + + return __pVisualElementSurfaceImpl->GetHashCode(); +} + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnimVisualElementValueAnimation.cpp b/src/ui/animations/FUiAnimVisualElementValueAnimation.cpp new file mode 100644 index 0000000..ac727cf --- /dev/null +++ b/src/ui/animations/FUiAnimVisualElementValueAnimation.cpp @@ -0,0 +1,223 @@ +// +// 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 FUiAnimVisualElementValueAnimation.cpp + * @brief This file contains implementation of VisualElementVAlueAnimation class + * + * This file contains implementation VisualElementPropertyAnimation class. + */ + +#include + +#include + +#include "FUiAnim_VisualElementValueAnimationImpl.h" + +namespace Tizen { namespace Ui { namespace Animations +{ + +VisualElementValueAnimation::VisualElementValueAnimation(void) + : VisualElementAnimation(new (std::nothrow) _VisualElementValueAnimationImpl()) +{ + if (_pAnimationImpl == null) + { + SetLastResult(E_OUT_OF_MEMORY); + } +} + +VisualElementValueAnimation::~VisualElementValueAnimation(void) +{ + +} + +VisualElementValueAnimation::VisualElementValueAnimation(_VisualElementValueAnimationImpl* pImpl) + : VisualElementAnimation(pImpl) +{ +} + +VisualElementValueAnimation::VisualElementValueAnimation(const VisualElementValueAnimation& animation) + : VisualElementAnimation(null) +{ + ClearLastResult(); + + const _VisualElementValueAnimationImpl* pAnimationImpl = _VisualElementValueAnimationImpl::GetInstance(animation); + + _pAnimationImpl = new (std::nothrow) _VisualElementValueAnimationImpl(*pAnimationImpl); + SysTryReturnVoidResult(NID_UI_ANIM, (_pAnimationImpl), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); +} + +VisualElementValueAnimation& +VisualElementValueAnimation::operator =(const VisualElementValueAnimation& rhs) +{ + ClearLastResult(); + + if (this != (&rhs)) + { + _VisualElementValueAnimationImpl* pAnimationImpl = _VisualElementValueAnimationImpl::GetInstance(*this); + const _VisualElementValueAnimationImpl* pRhsAnimationImpl = _VisualElementValueAnimationImpl::GetInstance(rhs); + + result r = pAnimationImpl->CopyAnimationValue(*pRhsAnimationImpl); + SysTryReturn(NID_UI_ANIM, (r == E_SUCCESS), *this, r, "[%s] Failed to copy the animation value.", GetErrorMessage(r)); + } + + return *this; +} + +bool +VisualElementValueAnimation::operator ==(const VisualElementValueAnimation& rhs) const +{ + return VisualElementAnimation::operator ==(rhs); +} + +bool +VisualElementValueAnimation::operator !=(const VisualElementValueAnimation& rhs) const +{ + return (!operator ==(rhs)); +} + +bool +VisualElementValueAnimation::Equals(const Tizen::Base::Object& obj) const +{ + const VisualElementValueAnimation* pAnimation = dynamic_cast< const VisualElementValueAnimation* >(&obj); + + if (pAnimation == null) + { + return false; + } + + return (*this == *pAnimation); +} + +int +VisualElementValueAnimation::GetHashCode(void) const +{ + return VisualElementAnimation::GetHashCode(); +} + +VisualElementAnimation* +VisualElementValueAnimation::CloneN(void) const +{ + VisualElementAnimation* pCloned = new (std::nothrow) VisualElementValueAnimation(*this); + SysTryReturn(NID_UI_ANIM, (pCloned != null), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + return pCloned; +} + +void +VisualElementValueAnimation::SetVisualElementAnimationTickEventListener(IVisualElementAnimationTickEventListener* pListener) +{ + _VisualElementValueAnimationImpl* pAnimationImpl = _VisualElementValueAnimationImpl::GetInstance(*this); + + pAnimationImpl->SetTickEventListener(pListener); +} + +IVisualElementAnimationTickEventListener* +VisualElementValueAnimation::GetVisualElementAnimationTickEventListener(void) const +{ + const _VisualElementValueAnimationImpl* pAnimationImpl = _VisualElementValueAnimationImpl::GetInstance(*this); + + return pAnimationImpl->GetTickEventListener(); +} + +result +VisualElementValueAnimation::SetStartValue(const Tizen::Ui::Variant& startValue) +{ + SysTryReturnResult(NID_UI_ANIM, (startValue.IsEmpty() == false), E_INVALID_ARG, "Invalid argument(s) is used. startValue is empty."); + + _VisualElementValueAnimationImpl* pAnimationImpl = _VisualElementValueAnimationImpl::GetInstance(*this); + + pAnimationImpl->SetStartValue(startValue); + + return E_SUCCESS; +} + +Tizen::Ui::Variant +VisualElementValueAnimation::GetStartValue(void) const +{ + const _VisualElementValueAnimationImpl* pAnimationImpl = _VisualElementValueAnimationImpl::GetInstance(*this); + + return pAnimationImpl->GetStartValue(); +} + +result +VisualElementValueAnimation::SetEndValue(const Tizen::Ui::Variant& endValue) +{ + SysTryReturnResult(NID_UI_ANIM, (endValue.IsEmpty() == false), E_INVALID_ARG, "Invalid argument(s) is used. endValue is empty."); + + _VisualElementValueAnimationImpl* pAnimationImpl = _VisualElementValueAnimationImpl::GetInstance(*this); + + pAnimationImpl->SetEndValue(endValue); + + return E_SUCCESS; +} + +Tizen::Ui::Variant +VisualElementValueAnimation::GetEndValue(void) const +{ + const _VisualElementValueAnimationImpl* pAnimationImpl = _VisualElementValueAnimationImpl::GetInstance(*this); + + return pAnimationImpl->GetEndValue(); +} + +void +VisualElementValueAnimation::SetEndValueApplied(bool apply) +{ + _VisualElementValueAnimationImpl* pAnimationImpl = _VisualElementValueAnimationImpl::GetInstance(*this); + + pAnimationImpl->SetEndValueApplied(apply); +} + +bool +VisualElementValueAnimation::IsEndValueApplied(void) const +{ + const _VisualElementValueAnimationImpl* pAnimationImpl = _VisualElementValueAnimationImpl::GetInstance(*this); + + return pAnimationImpl->IsEndValueApplied(); +} + +result +VisualElementValueAnimation::AddKeyFrame(float timeProgress, const Tizen::Ui::Variant& value, const IVisualElementAnimationTimingFunction* pTimingFunction) +{ + SysTryReturnResult(NID_UI_ANIM, (timeProgress > 0.0f && timeProgress < 1.0f), E_OUT_OF_RANGE, "The time (%f) is out of range.", timeProgress); + SysTryReturnResult(NID_UI_ANIM, (value.IsEmpty() == false), E_INVALID_ARG, "Invalid argument(s) is used. value is empty."); + + _VisualElementValueAnimationImpl* pAnimationImpl = _VisualElementValueAnimationImpl::GetInstance(*this); + + return pAnimationImpl->AddKeyFrame(timeProgress, value, pTimingFunction); +} + +result +VisualElementValueAnimation::RemoveKeyFrame(float timeProgress) +{ + SysTryReturnResult(NID_UI_ANIM, (timeProgress > 0.0f && timeProgress < 1.0f), E_OUT_OF_RANGE, "The time (%f) is out of range.", timeProgress); + + _VisualElementValueAnimationImpl* pAnimationImpl = _VisualElementValueAnimationImpl::GetInstance(*this); + + return pAnimationImpl->RemoveKeyFrame(timeProgress); +} + +void +VisualElementValueAnimation::RemoveAllKeyFrames(void) +{ + _VisualElementValueAnimationImpl* pAnimationImpl = _VisualElementValueAnimationImpl::GetInstance(*this); + + pAnimationImpl->RemoveAllKeyFrames(); +} + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnim_AnimationBaseImpl.cpp b/src/ui/animations/FUiAnim_AnimationBaseImpl.cpp new file mode 100644 index 0000000..e981a70 --- /dev/null +++ b/src/ui/animations/FUiAnim_AnimationBaseImpl.cpp @@ -0,0 +1,248 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_AnimationBaseImpl.cpp + * @brief This file contains implementation of _AnimationBaseImpl class + * + * This file contains implementation _AnimationBaseImpl class. + */ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "FUiAnim_AnimationBaseImpl.h" + + +using namespace Tizen::Ui::Animations; +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; + + +#define INTERPOLATOR_LINEAR L"Linear" +#define INTERPOLATOR_EASEIN L"EaseIn" +#define INTERPOLATOR_EASEOUT L"EaseOut" +#define INTERPOLATOR_EASEINOUT L"EaseInOut" +#define INTERPOLATOR_DISCRETE L"Discrete" +#define INTERPOLATOR_BEZIER L"Bezier" + + +namespace Tizen { namespace Ui { namespace Animations +{ + +_AnimationBaseImpl::_AnimationBaseImpl() + : controlPointTime1(0.0) + , controlPointValue1(0.0) + , controlPointTime2(0.0) + , controlPointValue2(0.0) + , interpolator(ANIMATION_INTERPOLATOR_LINEAR) + , animName(String()) + , duration(250) + , offset(0) + , delay(0) + , repeatCount(1) + , autoReverse(false) + , scaleRatio(1.0f) + , holdEnd(true) +{ + +} + +_AnimationBaseImpl::~_AnimationBaseImpl(void) +{ + result r = RemoveAllKeyFrames(); + + SysTryReturnVoidResult(NID_UI_ANIM, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); +} + +result +_AnimationBaseImpl::Construct(void) +{ + return keyFrameList.Construct(); +} + + +result +_AnimationBaseImpl::RemoveKeyFrame(long time) +{ + SysTryReturnResult(NID_UI_ANIM, (time > 0 && time <= duration), E_INVALID_ARG, "Invalid argument(s) is used. time =%ld", time); + + result r = E_SUCCESS; + + Object* pObj = null; + + r = keyFrameList.GetValue(time, pObj); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_OBJ_NOT_FOUND, "Key frame is not found. time = %ld", time); + + delete pObj; + + keyFrameList.Remove(time); + + return E_SUCCESS; +} + +result +_AnimationBaseImpl::RemoveKeyFrameAt(int index) +{ + SysTryReturnResult(NID_UI_ANIM, (index >= 0 && index < keyFrameList.GetCount()), E_OUT_OF_RANGE, "Index (%d) is out of range.", index); + + result r = E_SUCCESS; + + ComparerT< long > comparer; + + Object* pObj = null; + long time = 0; + + ArrayListT< long >* pKeyList = new (std::nothrow) ArrayListT< long >; + SysTryReturnResult(NID_UI_ANIM, (pKeyList), E_OUT_OF_MEMORY, "Memory allocation failed."); + + ICollectionT< long >* pKeyN = keyFrameList.GetKeysN(); + SysTryCatch(NID_UI_ANIM, (pKeyN), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = pKeyList->Construct(*pKeyN); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Failed to construct key list."); + SysTryCatch(NID_UI_ANIM, !(pKeyList->GetCount() <= 0), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Key list count is invalid."); + + r = pKeyList->Sort(comparer); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to sort key list."); + + r = pKeyList->GetAt(index, time); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to sort key list."); + + keyFrameList.GetValue(time, pObj); + delete pObj; + + keyFrameList.Remove(time); + + //fall through +CATCH: + delete pKeyN; + delete pKeyList; + return r; + + return E_SUCCESS; +} + +result +_AnimationBaseImpl::RemoveAllKeyFrames(void) +{ + if (keyFrameList.GetCount() > 0) + { + IMapEnumeratorT< long, Object* >* pMapEnum = keyFrameList.GetMapEnumeratorN(); + result r = GetLastResult(); + SysTryReturnResult(NID_UI_ANIM, (pMapEnum != null), r, "Propagating."); + + while (pMapEnum->MoveNext() == E_SUCCESS) + { + Object* pValue = null; + pMapEnum->GetValue(pValue); + delete pValue; + } + + delete pMapEnum; + + keyFrameList.RemoveAll(); + } + + return E_SUCCESS; +} + +bool +_AnimationBaseImpl::CompareTimingValues(const AnimationBase& animBase) +{ + return ((interpolator == animBase._pAnimationBaseImpl->interpolator) + && (animName == animBase._pAnimationBaseImpl->animName) + && (duration == animBase._pAnimationBaseImpl->duration) + && (offset == animBase._pAnimationBaseImpl->offset) + && (delay == animBase._pAnimationBaseImpl->delay) + && (repeatCount == animBase._pAnimationBaseImpl->repeatCount) + && (autoReverse == animBase._pAnimationBaseImpl->autoReverse) + && (!(Float::Compare(scaleRatio, animBase._pAnimationBaseImpl->scaleRatio))) + && (holdEnd == animBase._pAnimationBaseImpl->holdEnd) + && (!(Float::Compare(controlPointTime1, animBase._pAnimationBaseImpl->controlPointTime1))) + && (!(Float::Compare(controlPointValue1, animBase._pAnimationBaseImpl->controlPointValue1))) + && (!(Float::Compare(controlPointTime2, animBase._pAnimationBaseImpl->controlPointTime2))) + && (!(Float::Compare(controlPointValue2, animBase._pAnimationBaseImpl->controlPointValue2)))); +} + +float +_AnimationBaseImpl::GetActualProgressValue(long currentTime) +{ + const IVisualElementAnimationTimingFunction* pTimingFunction = null; + + switch (interpolator) + { + case ANIMATION_INTERPOLATOR_LINEAR: + { + pTimingFunction = VisualElementAnimation::GetTimingFunctionByName(INTERPOLATOR_LINEAR); + } + break; + + case ANIMATION_INTERPOLATOR_EASE_IN: + { + pTimingFunction = VisualElementAnimation::GetTimingFunctionByName(INTERPOLATOR_EASEIN); + } + break; + + case ANIMATION_INTERPOLATOR_EASE_OUT: + { + pTimingFunction = VisualElementAnimation::GetTimingFunctionByName(INTERPOLATOR_EASEOUT); + } + break; + + case ANIMATION_INTERPOLATOR_EASE_IN_OUT: + { + pTimingFunction = VisualElementAnimation::GetTimingFunctionByName(INTERPOLATOR_EASEINOUT); + } + break; + + case ANIMATION_INTERPOLATOR_DISCRETE: + { + pTimingFunction = VisualElementAnimation::GetTimingFunctionByName(INTERPOLATOR_DISCRETE); + } + break; + + case ANIMATION_INTERPOLATOR_BEZIER: + { + pTimingFunction = new (std::nothrow) BezierTimingFunction(); + SysTryReturn(NID_UI_ANIM, (pTimingFunction), -1.0f, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + ((BezierTimingFunction*) pTimingFunction)->SetControlPoints(controlPointTime1, controlPointValue1, controlPointTime2, controlPointValue2); + } + break; + + } + + SysTryReturn(NID_UI_ANIM, pTimingFunction, -1.0f, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Timing function is null."); + + float dur = (1.0f / (float) duration) * ((float) currentTime); + float actualProgress = pTimingFunction->CalculateProgress( static_cast< float >(dur)); + + return actualProgress; +} + + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnim_AnimationBaseImpl.h b/src/ui/animations/FUiAnim_AnimationBaseImpl.h new file mode 100644 index 0000000..8b8009e --- /dev/null +++ b/src/ui/animations/FUiAnim_AnimationBaseImpl.h @@ -0,0 +1,86 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_AnimationBaseImpl.h + * @brief This is the header file for the _AnimationBaseImpl class. + * + * This header file contains the declarations of the _AnimationBaseImpl class. @n + */ + +#ifndef _FUI_ANIM_INTERNAL_ANIMATION_BASE_IMPL_H_ +#define _FUI_ANIM_INTERNAL_ANIMATION_BASE_IMPL_H_ + +#include +#include + +#include + + +namespace Tizen { namespace Ui { namespace Animations +{ + +class _AnimationBaseImpl + : public Tizen::Base::Object +{ +public: + /** + * Default constructor for %_AnimationBaseImpl class. + */ + _AnimationBaseImpl(); + + /** + * Destructor for %_AnimationBaseImpl class. + */ + ~_AnimationBaseImpl(void); + + result Construct(void); + + result RemoveKeyFrame(long time); + result RemoveKeyFrameAt(int index); + result RemoveAllKeyFrames(void); + + bool CompareTimingValues(const AnimationBase& animBase); + float GetActualProgressValue(long currentTime); + + Tizen::Base::Collection::HashMapT< long, Tizen::Base::Object* > keyFrameList; + + float controlPointTime1; + float controlPointValue1; + float controlPointTime2; + float controlPointValue2; + + AnimationInterpolatorType interpolator; + Tizen::Base::String animName; + + long duration; + long offset; + long delay; + long repeatCount; + bool autoReverse; + float scaleRatio; + bool holdEnd; + +private: + _AnimationBaseImpl& operator =(const _AnimationBaseImpl&); + _AnimationBaseImpl(const _AnimationBaseImpl& rhs); + +}; // _AnimationBaseImpl + +}}} // Tizen::Ui::Animations + +#endif //_FUI_ANIM_INTERNAL_ANIMATION_BASE_IMPL_H_ diff --git a/src/ui/animations/FUiAnim_AnimationGroupImpl.cpp b/src/ui/animations/FUiAnim_AnimationGroupImpl.cpp new file mode 100644 index 0000000..5d95dee --- /dev/null +++ b/src/ui/animations/FUiAnim_AnimationGroupImpl.cpp @@ -0,0 +1,357 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_AnimationGroupImpl.cpp + * @brief This file contains implementation of _AnimationGroupImpl class + * + * This file contains implementation _AnimationGroupImpl class. + */ + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "FUiAnim_AnimationGroupImpl.h" + + +using namespace Tizen::Ui::Animations; +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Ui; + + +namespace Tizen { namespace Ui { namespace Animations +{ + +_AnimationGroupImpl::_AnimationGroupImpl(AnimationGroup* pAnimationGroup) + : __pAnimationGroup(pAnimationGroup) +{ +} + +_AnimationGroupImpl::~_AnimationGroupImpl(void) +{ + result r = Dispose(); + + SysTryReturnVoidResult(NID_UI_ANIM, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); +} + +result +_AnimationGroupImpl::Dispose(void) +{ + result r = E_SUCCESS; + + int index = animationList.GetCount(); + + while (index > 0) + { + _AnimationGroupImpl::AnimationStore animStore; + + r = animationList.GetAt(index - 1, animStore); + + delete animStore.pAnimationBase; + animStore.pAnimationBase = null; + + index--; + } + + animationList.RemoveAll(); + + return r; +} + +AnimationBase* +_AnimationGroupImpl::CloneAnimation(AnimationTargetType animTarget, AnimationBase& animation, result& r) +{ + AnimationType animationType = animation.GetType(); + + switch (animTarget) + { + case ANIMATION_TARGET_SIZE: + { + switch (animationType) + { + case ANIMATION_TYPE_DIMENSION_ANIMATION: + { + DimensionAnimation* pDimValue = dynamic_cast< DimensionAnimation* >(&animation); + SysTryReturn(NID_UI_ANIM, (pDimValue), null, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Animation is not DimensionAnimation."); + + DimensionAnimation* pAnimValue = new (std::nothrow) DimensionAnimation(*pDimValue); + SysTryReturn(NID_UI_ANIM, (pAnimValue), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + return pAnimValue; + } + break; + + case ANIMATION_TYPE_RECTANGLE_ANIMATION: + { + RectangleAnimation* pRectValue = dynamic_cast< RectangleAnimation* >(&animation); + SysTryReturn(NID_UI_ANIM, (pRectValue), null, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Animation is not RectangleAnimation."); + + RectangleAnimation* pAnimValue = new (std::nothrow) RectangleAnimation(*pRectValue); + SysTryReturn(NID_UI_ANIM, (pAnimValue), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + return pAnimValue; + } + break; + + default: + r = E_INVALID_ARG; + return null; + } + } + break; + + + case ANIMATION_TARGET_POSITION: + { + switch (animationType) + { + case ANIMATION_TYPE_POINT_ANIMATION: + { + PointAnimation* pPtValue = dynamic_cast< PointAnimation* >(&animation); + SysTryReturn(NID_UI_ANIM, (pPtValue), null, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Animation is not PointAnimation."); + + PointAnimation* pAnimValue = new (std::nothrow) PointAnimation(*pPtValue); + SysTryReturn(NID_UI_ANIM, (pAnimValue), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + return pAnimValue; + } + break; + + case ANIMATION_TYPE_RECTANGLE_ANIMATION: + { + RectangleAnimation* pRectValue = dynamic_cast< RectangleAnimation* >(&animation); + SysTryReturn(NID_UI_ANIM, (pRectValue), null, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Animation is not RectangleAnimation."); + + RectangleAnimation* pAnimValue = new (std::nothrow) RectangleAnimation(*pRectValue); + SysTryReturn(NID_UI_ANIM, (pAnimValue), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + return pAnimValue; + } + break; + + default: + r = E_INVALID_ARG; + return null; + } + } + break; + + case ANIMATION_TARGET_ALPHA: + { + switch (animationType) + { + case ANIMATION_TYPE_FLOAT_ANIMATION: + { + FloatAnimation* pFloatValue = dynamic_cast< FloatAnimation* >(&animation); + SysTryReturn(NID_UI_ANIM, (pFloatValue), null, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Animation is not FloatAnimation."); + + FloatAnimation* pAnimValue = new (std::nothrow) FloatAnimation(*pFloatValue); + SysTryReturn(NID_UI_ANIM, (pAnimValue), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + return pAnimValue; + } + break; + + case ANIMATION_TYPE_INTEGER_ANIMATION: + { + IntegerAnimation* pIntValue = dynamic_cast< IntegerAnimation* >(&animation); + SysTryReturn(NID_UI_ANIM, (pIntValue), null, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Animation is not IntegerAnimation."); + + IntegerAnimation* pAnimValue = new (std::nothrow) IntegerAnimation(*pIntValue); + SysTryReturn(NID_UI_ANIM, (pAnimValue), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + return pAnimValue; + } + break; + + default: + r = E_INVALID_ARG; + return null; + } + } + break; + + case ANIMATION_TARGET_ROTATION: + { + if (animationType == ANIMATION_TYPE_ROTATE_ANIMATION) + { + RotateAnimation* pRotateValue = dynamic_cast< RotateAnimation* >(&animation); + SysTryReturn(NID_UI_ANIM, (pRotateValue), null, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Animation is not RotateAnimation."); + + RotateAnimation* pAnimValue = new (std::nothrow) RotateAnimation(*pRotateValue); + SysTryReturn(NID_UI_ANIM, (pAnimValue), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + return pAnimValue; + } + else + { + r = E_INVALID_ARG; + return null; + } + } + break; + + default: + r = E_INVALID_ARG; + return null; + } +} + +result +_AnimationGroupImpl::Construct() +{ + return animationList.Construct(); +} + +bool +_AnimationGroupImpl::AnimationStore::operator ==(const AnimationStore& animStore) const +{ + if (animTarget != animStore.animTarget) + { + return false; + } + + if ((!pAnimationBase) && (!animStore.pAnimationBase)) + { + return true; + } + else if (((pAnimationBase == null) && (animStore.pAnimationBase != null)) || + ((pAnimationBase != null) && (animStore.pAnimationBase == null))) + { + return false; + } + + if (pAnimationBase->GetType() != animStore.pAnimationBase->GetType()) + { + return false; + } + + switch (pAnimationBase->GetType()) + { + case ANIMATION_TYPE_FLOAT_ANIMATION: + { + FloatAnimation* pFlAnim1 = dynamic_cast< FloatAnimation* >(pAnimationBase); + SysTryReturn(NID_UI_ANIM, (pFlAnim1), false, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Animation is not FloatAnimation."); + + FloatAnimation* pFlAnim2 = dynamic_cast< FloatAnimation* >(animStore.pAnimationBase); + SysTryReturn(NID_UI_ANIM, (pFlAnim2), false, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Animation is not FloatAnimation."); + + if ((*pFlAnim1) != (*pFlAnim2)) + { + return false; + } + break; + } + + case ANIMATION_TYPE_INTEGER_ANIMATION: + { + IntegerAnimation* pIntAnim1 = dynamic_cast< IntegerAnimation* >(pAnimationBase); + SysTryReturn(NID_UI_ANIM, (pIntAnim1), false, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Animation is not IntegerAnimation."); + + IntegerAnimation* pIntAnim2 = dynamic_cast< IntegerAnimation* >(animStore.pAnimationBase); + SysTryReturn(NID_UI_ANIM, (pIntAnim2), false, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Animation is not IntegerAnimation."); + + if ((*pIntAnim1) != (*pIntAnim2)) + { + return false; + } + break; + } + + case ANIMATION_TYPE_DIMENSION_ANIMATION: + { + DimensionAnimation* pDimAnim1 = dynamic_cast< DimensionAnimation* >(pAnimationBase); + SysTryReturn(NID_UI_ANIM, (pDimAnim1), false, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Animation is not DimensionAnimation."); + + DimensionAnimation* pDimAnim2 = dynamic_cast< DimensionAnimation* >(animStore.pAnimationBase); + SysTryReturn(NID_UI_ANIM, (pDimAnim2), false, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Animation is not DimensionAnimation."); + + if ((*pDimAnim1) != (*pDimAnim2)) + { + return false; + } + break; + } + + case ANIMATION_TYPE_RECTANGLE_ANIMATION: + { + RectangleAnimation* pRectAnim1 = dynamic_cast< RectangleAnimation* >(pAnimationBase); + SysTryReturn(NID_UI_ANIM, (pRectAnim1), false, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Animation is not RectangleAnimation."); + + RectangleAnimation* pRectAnim2 = dynamic_cast< RectangleAnimation* >(animStore.pAnimationBase); + SysTryReturn(NID_UI_ANIM, (pRectAnim2), false, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Animation is not RectangleAnimation."); + + if ((*pRectAnim1) != (*pRectAnim2)) + { + return false; + } + break; + } + + case ANIMATION_TYPE_POINT_ANIMATION: + { + PointAnimation* pPtAnim1 = dynamic_cast< PointAnimation* >(pAnimationBase); + SysTryReturn(NID_UI_ANIM, (pPtAnim1), false, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Animation is not PointAnimation."); + + PointAnimation* pPtAnim2 = dynamic_cast< PointAnimation* >(animStore.pAnimationBase); + SysTryReturn(NID_UI_ANIM, (pPtAnim2), false, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Animation is not PointAnimation."); + + if ((*pPtAnim1) != (*pPtAnim2)) + { + return false; + } + break; + } + + case ANIMATION_TYPE_ROTATE_ANIMATION: + { + RotateAnimation* pRotAnim1 = dynamic_cast< RotateAnimation* >(pAnimationBase); + SysTryReturn(NID_UI_ANIM, (pRotAnim1), false, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Animation is not RotateAnimation."); + + RotateAnimation* pRotAnim2 = dynamic_cast< RotateAnimation* >(animStore.pAnimationBase); + SysTryReturn(NID_UI_ANIM, (pRotAnim2), false, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Animation is not RotateAnimation."); + + if ((*pRotAnim1) != (*pRotAnim2)) + { + return false; + } + break; + } + + default: + return false; + } + + return true; +} + +bool +_AnimationGroupImpl::AnimationStore::operator !=(const AnimationStore& animStore) const +{ + return !(*this == animStore); +} + +}}} //Tizen::Ui::Animations diff --git a/src/ui/animations/FUiAnim_AnimationGroupImpl.h b/src/ui/animations/FUiAnim_AnimationGroupImpl.h new file mode 100644 index 0000000..45ae96c --- /dev/null +++ b/src/ui/animations/FUiAnim_AnimationGroupImpl.h @@ -0,0 +1,75 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_AnimationGroupImpl.h + * @brief This is the header file for the _AnimationGroupImpl class. + * + * This header file contains the declarations of the _AnimationGroupImpl class. @n + */ + +#ifndef _FUI_ANIM_INTERNAL_ANIMATION_GROUP_IMPL_H_ +#define _FUI_ANIM_INTERNAL_ANIMATION_GROUP_IMPL_H_ + +#include +#include + +#include + + +namespace Tizen { namespace Ui { namespace Animations +{ + +class _AnimationGroupImpl + : public Tizen::Base::Object +{ +public: + ~_AnimationGroupImpl(void); + _AnimationGroupImpl(AnimationGroup* pAnimationGroup); + + result Construct(void); + result Dispose(void); + + AnimationBase* CloneAnimation(AnimationTargetType animTarget, AnimationBase& animationBase, result& res); + + struct AnimationStore + { + AnimationTargetType animTarget; + AnimationBase* pAnimationBase; + AnimationStore(void) + { + animTarget = ANIMATION_TARGET_NONE; + pAnimationBase = null; + } + ~AnimationStore(void) + { + } + bool operator ==(const AnimationStore& animStore) const; + bool operator !=(const AnimationStore& animStore) const; + }; + + Tizen::Base::Collection::ArrayListT< AnimationStore > animationList; + +private: + _AnimationGroupImpl& operator =(const _AnimationGroupImpl&); + _AnimationGroupImpl(const _AnimationGroupImpl& animationBaseImpl); + Tizen::Ui::Animations::AnimationGroup* __pAnimationGroup; +}; // _AnimationGroupImpl + +}}} // Tizen::Ui::Animations + +#endif //_FUI_ANIM_INTERNAL_ANIMATION_GROUP_IMPL_H_ diff --git a/src/ui/animations/FUiAnim_AnimationGroupNode.cpp b/src/ui/animations/FUiAnim_AnimationGroupNode.cpp new file mode 100644 index 0000000..f683f50 --- /dev/null +++ b/src/ui/animations/FUiAnim_AnimationGroupNode.cpp @@ -0,0 +1,286 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_AnimationGroupNode.cpp + * @brief This file contains implementation of _AnimationGroupNode class + * + * This file contains implementation _AnimationGroupNode class. + */ + +#include + +#include +#include +//#include + +#include "FUiAnim_AnimationGroupNode.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; + +//#define VE_DEBUG_ANIMATION + +namespace Tizen { namespace Ui { namespace Animations +{ + +_AnimationGroupNode::_AnimationGroupNode(VisualElement& target, const Tizen::Base::String* pName, VisualElementAnimation& animation) + : _TransactionNode() + , __target(target) + , __animation(animation) + , __deleteAnimation(false) + , __baseTime(0) + , __adjustedBaseTime(0) + , __currentRepeatCount(1) + , __totalDuration(0) + , __progress(0.0f) +{ + if (pName != null) + { + __name = *pName; + } + + _VisualElementAnimationImpl* pAnimationImpl = _VisualElementAnimationImpl::GetInstance(animation); + + result r = CopyAnimationValue(*pAnimationImpl); + SysTryReturnVoidResult(NID_UI_ANIM, r == E_SUCCESS, r, "[%s] Failed to copy the animation value.", GetErrorMessage(r)); + + // __pAnimation->GetRepeatCount() == 0 infinite + __totalDuration = __animation.GetDelay() + (__animation.GetDuration() * __animation.GetRepeatCount()) - __animation.GetOffset(); + + if (GetDuration() == 0) + { + SetDuration(1); + SetRepeatCount(1); + } + +#ifdef VE_DEBUG_MODULE + __tick = 0; +#endif +} + +_AnimationGroupNode::~_AnimationGroupNode(void) +{ + if (__deleteAnimation == true) + { + delete &__animation; + } +} + +VisualElementAnimation& +_AnimationGroupNode::GetAnimation(void) const +{ + return __animation; +} + +bool +_AnimationGroupNode::IsEqual(VisualElement& target, const Tizen::Base::String& keyName) const +{ + return (&__target == &target && __name == keyName); +} + +void +_AnimationGroupNode::SetBaseTime(unsigned int baseTime) +{ + __baseTime = baseTime; + __adjustedBaseTime = __baseTime; + + // reset for nested group repeat + __status = _STATUS_READY; +} + +void +_AnimationGroupNode::Commit(void) +{ + __isCommitted = true; + + if (dynamic_cast< _AnimationGroupNode* > (__pParent) == null) + { + __deleteAnimation = true; + } +} + +bool +_AnimationGroupNode::IsRemovable(void) const +{ + return (__pParent->IsRemovable() && __currentRepeatCount == GetRepeatCount() && __status != _STATUS_REPEAT); +} + +void +_AnimationGroupNode::CalculateProgress(unsigned int currentTime) +{ + long oldRepeatCount = 0; + long repeatCount = 0; + long delay = 0; + long duration = 0; + long offset = 0; + + // Set current Time +#ifdef VE_DEBUG_MODULE + if (_VeDebug::IsDebugEnabled()) + { + __tick += 16; + } +#endif + + switch(__status) + { + case _STATUS_FINISHING: + __status = _STATUS_FINISH; + return; + + case _STATUS_FINISH: + __status = _STATUS_END; + return; + + case _STATUS_END: + return; + + case _STATUS_REPEAT: + SetChildrenBaseTime(__baseTime + __adjustedBaseTime, false); + break; + + default: + // nothing to do + break; + } + + if (GetScaleRatio() > 0.f) + { + currentTime = (unsigned int) ((currentTime - __baseTime) / GetScaleRatio()); // Apply time scale value + } + + delay = GetDelay(); + + if (currentTime < (unsigned int)(delay)) + { + return; + } + + offset = GetOffset(); + repeatCount = GetRepeatCount(); + duration = GetDuration(); + if (duration == 0) + { + duration = 1; + repeatCount = 1; + } + + oldRepeatCount = __currentRepeatCount; + __currentRepeatCount = ((currentTime - delay + offset) / duration) + 1; + + __progress = static_cast< float >(currentTime - (delay + duration * (__currentRepeatCount - 1) - offset)) / static_cast< float >(duration); + + if (__status == _STATUS_READY) + { + __status = _STATUS_START; + __adjustedBaseTime = delay - offset; // __currentRepeatCount is always 1 + + SetChildrenBaseTime(__baseTime + __adjustedBaseTime, false); + } + else if (repeatCount > 0 && currentTime >= __totalDuration) // infinite loop if repeatCount == 0 + { + __currentRepeatCount = repeatCount; + __progress = 1.0f; + + __status = _STATUS_FINISHING; + } + else if (__currentRepeatCount > oldRepeatCount) + { + __status = _STATUS_REPEAT; + __adjustedBaseTime = delay + duration * (__currentRepeatCount - 1) - offset; + } + else + { + __status = _STATUS_RUNNING; + } + + // In case of nested group + if (__pParent->GetStatus() == _STATUS_FINISH || __pParent->GetStatus() == _STATUS_REPEAT) + { + __status = _STATUS_FINISH; + } +} + +void +_AnimationGroupNode::NotifyTransactionStarted(void) +{ + if (__isCommitted == false || __status != _STATUS_START) + { + return; + } + + _VisualElementAnimationImpl* pAnimationImpl = _VisualElementAnimationImpl::GetInstance(__animation); + + IVisualElementAnimationStatusEventListener* pListener = pAnimationImpl->GetStatusEventListener(); + + if (pListener == null) + { + return; + } + + pListener->OnVisualElementAnimationStarted(__animation, __name, pAnimationImpl->GetEventTarget()); +} + +void +_AnimationGroupNode::NotifyTransactionRepeated(void) +{ + if (__isCommitted == false || __status != _STATUS_REPEAT) + { + return; + } + + _VisualElementAnimationImpl* pAnimationImpl = _VisualElementAnimationImpl::GetInstance(__animation); + + IVisualElementAnimationStatusEventListener* pListener = pAnimationImpl->GetStatusEventListener(); + + if (pListener == null) + { + return; + } + + pListener->OnVisualElementAnimationRepeated(__animation, __name, pAnimationImpl->GetEventTarget(), __currentRepeatCount); +} + +void +_AnimationGroupNode::NotifyTransactionFinished(bool completed) +{ + if (__isCommitted == false || __status == _STATUS_END) + { + return; + } + + if (__status != _STATUS_FINISH) + { + __status = _STATUS_FINISH; + } + + _VisualElementAnimationImpl* pAnimationImpl = _VisualElementAnimationImpl::GetInstance(__animation); + + IVisualElementAnimationStatusEventListener* pListener = pAnimationImpl->GetStatusEventListener(); + + if (pListener == null) + { + return; + } + + pListener->OnVisualElementAnimationFinished(__animation, __name, pAnimationImpl->GetEventTarget(), completed); +} + + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnim_AnimationGroupNode.h b/src/ui/animations/FUiAnim_AnimationGroupNode.h new file mode 100644 index 0000000..9e39369 --- /dev/null +++ b/src/ui/animations/FUiAnim_AnimationGroupNode.h @@ -0,0 +1,84 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_AnimationGroupNode.h + * @brief This is the header file for the _AnimationGroupNode class. + * + * This header file contains the declarations of the _AnimationGroupNode class. + */ + +#ifndef _FUI_ANIM_INTERNAL_ANIMATION_GROUP_NODE_H_ +#define _FUI_ANIM_INTERNAL_ANIMATION_GROUP_NODE_H_ + +#include + +#include "FUiAnim_TransactionNode.h" + +#include "FUiAnim_Debug.h" + +namespace Tizen { namespace Ui { namespace Animations +{ + +class _AnimationGroupNode + : public _TransactionNode +{ +public: + _AnimationGroupNode(VisualElement& target, const Tizen::Base::String* pName, VisualElementAnimation& animation); + virtual ~_AnimationGroupNode(void); + + VisualElementAnimation& GetAnimation(void) const; + bool IsEqual(VisualElement& target, const Tizen::Base::String& keyName) const; + + virtual void SetBaseTime(unsigned int baseTime); + + virtual void Commit(void); + + virtual bool IsRemovable(void) const; + + virtual void NotifyTransactionStarted(void); + virtual void NotifyTransactionRepeated(void); + virtual void NotifyTransactionFinished(bool completed); + +private: + _AnimationGroupNode(void); + _AnimationGroupNode(const _AnimationGroupNode& rhs); + _AnimationGroupNode& operator =(const _AnimationGroupNode& rhs); + + virtual void CalculateProgress(unsigned int currentTime); + + VisualElement& __target; + Tizen::Base::String __name; + VisualElementAnimation& __animation; + bool __deleteAnimation; + + unsigned int __baseTime; + unsigned int __adjustedBaseTime; + long __currentRepeatCount; + + unsigned int __totalDuration; + float __progress; + +#ifdef VE_DEBUG_MODULE + unsigned int __tick; +#endif +}; // _AnimationGroupNode + +}}} // Tizen::Ui::Animations + +#endif // _FUI_ANIM_INTERNAL_ANIMATION_GROUP_NODE_H_ + diff --git a/src/ui/animations/FUiAnim_AnimationManager.cpp b/src/ui/animations/FUiAnim_AnimationManager.cpp new file mode 100644 index 0000000..3d4cd6e --- /dev/null +++ b/src/ui/animations/FUiAnim_AnimationManager.cpp @@ -0,0 +1,823 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_AnimationManager.cpp + * @brief This file contains implementation of _AnimationManager class + * + * This file contains implementation _AnimationManager class. + */ + +#include + +#include + +#include +#include +#include +#include + +#include "FUi_EcoreEvas.h" +#include "FUi_EcoreEvasMgr.h" + +#include "FUiAnim_RootVisualElement.h" +#include "FUiAnim_VisualElementImpl.h" +#include "FUiAnim_VisualElementAnimationImpl.h" +#include "FUiAnim_TransactionNode.h" +#include "FUiAnim_AnimationGroupNode.h" +#include "FUiAnim_VisualElementAnimationVariantInterpolator.h" +#include "FUiAnim_AnimationManager.h" +#include "FUiAnim_DisplayManager.h" + + +Ecore_Animator* pAnimator = null; + +Eina_Bool +__AnimatorCallback(void* pData) +{ +#ifndef VE_VSYNC_UPDATE + pAnimationManager->ProcessAnimationTick(); +#endif + + return EINA_TRUE; +} + +namespace Tizen { namespace Ui { namespace Animations +{ + +// default transaction event listener +class _TransactionEventListener + : public IAnimationTransactionEventListener + , virtual public Tizen::Base::Runtime::IEventListener +{ +public: + _TransactionEventListener(void); + virtual ~_TransactionEventListener(void); + + void SetTransactionEventListener(const IAnimationTransactionEventListener* pListener); + + virtual void OnAnimationTransactionStarted(int transactionId); + virtual void OnAnimationTransactionStopped(int transactionId); + virtual void OnAnimationTransactionFinished(int transactionId); + +private: + IAnimationTransactionEventListener* __pEventListener; +}; + +_TransactionEventListener::_TransactionEventListener(void) + : __pEventListener(null) +{ +} + +_TransactionEventListener::~_TransactionEventListener(void) +{ +} + +void +_TransactionEventListener::SetTransactionEventListener(const IAnimationTransactionEventListener* pListener) +{ + __pEventListener = const_cast< IAnimationTransactionEventListener* >(pListener); +} + +void +_TransactionEventListener::OnAnimationTransactionStarted(int transactionId) +{ + if (__pEventListener) + { + __pEventListener->OnAnimationTransactionStarted(transactionId); + } +} + +void +_TransactionEventListener::OnAnimationTransactionStopped(int transactionId) +{ + if (__pEventListener) + { + __pEventListener->OnAnimationTransactionStopped(transactionId); + } +} + +void +_TransactionEventListener::OnAnimationTransactionFinished(int transactionId) +{ + if (__pEventListener) + { + __pEventListener->OnAnimationTransactionFinished(transactionId); + } +} + +_AnimationManager* _AnimationManager::__pInstance = null; + +_AnimationManager::_AnimationManager(void) + : __isAnimating(false) + , __isInAnimationTick(false) + , __pRootTransaction(null) + , __pCurrentTransaction(null) + , __pCurrentTransactionExceptGroup(null) + , __pDefaultTransactionEventListener(null) + , __pDefaultTimingFunction(null) + , __pDefaultInterpolator(null) +{ + +} + +_AnimationManager::~_AnimationManager(void) +{ + +} + +_AnimationManager* +_AnimationManager::GetInstance(void) +{ + return __pInstance; +} + +result +_AnimationManager::CreateInstance(void) +{ + SysAssertf((__pInstance == null), "Already created."); + + __pInstance = new (std::nothrow) _AnimationManager(); + SysTryReturnResult(NID_UI_ANIM, __pInstance != null, E_OUT_OF_MEMORY, "Memory allocation failed."); + + result r = __pInstance->Construct(); + if (r != E_SUCCESS) + { + SysLogException(NID_UI_ANIM, r, "[%s] Failed to construct _AnimationManager instance.", GetErrorMessage(r)); + + delete __pInstance; + __pInstance = null; + + return null; + } + + return E_SUCCESS; +} + +void +_AnimationManager::ReleaseInstance(void) +{ + if (__pInstance != null) + { + __pInstance->Release(); + + delete __pInstance; + __pInstance = null; + } +} + +result +_AnimationManager::Release(void) +{ + if (pAnimator) + { + ecore_animator_del(pAnimator); + pAnimator = null; + } + + if (__pCurrentTransaction) + { + delete __pCurrentTransaction; + __pCurrentTransaction = null; + } + + __committedList.RemoveAllNodes(); + + delete __pRootTransaction; + __pRootTransaction = null; + + delete __pDefaultTransactionEventListener; + __pDefaultTransactionEventListener = null; + + delete __pDefaultTimingFunction; + __pDefaultTimingFunction = null; + + delete __pDefaultInterpolator; + __pDefaultInterpolator = null; + + return E_SUCCESS; +} + +result +_AnimationManager::Construct(void) +{ + result r = E_SUCCESS; + + __committedList.Construct(); + + __pRootTransaction = new (std::nothrow) _TransactionNode(); + SysTryReturnResult(NID_UI_ANIM, (__pRootTransaction != null), E_OUT_OF_MEMORY, "Memory allocation failed. Failed to create root transaction"); + + r = GetLastResult(); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), , r, "[%s] Failed to create root transaction.", GetErrorMessage(r)); + + __pRootTransaction->Commit(); //root is always committed. + + __pDefaultTransactionEventListener = new (std::nothrow) _TransactionEventListener(); + SysTryCatch(NID_UI_ANIM, __pDefaultTransactionEventListener != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, + "[E_OUT_OF_MEMORY] Memory allocation failed. Failed to create default transaction event listener."); + + __pDefaultTimingFunction = new (std::nothrow) LinearTimingFunction(); + SysTryCatch(NID_UI_ANIM, __pDefaultTimingFunction != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, + "[E_OUT_OF_MEMORY] Memory allocation failed. Failed to create default timing function map."); + + __pDefaultInterpolator = new (std::nothrow) _VisualElementAnimationVariantInterpolator(); + SysTryCatch(NID_UI_ANIM, __pDefaultInterpolator != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, + "[E_OUT_OF_MEMORY] Memory allocation failed. Failed to create default interpolator."); + + return E_SUCCESS; + +CATCH: + delete __pRootTransaction; + delete __pDefaultTransactionEventListener; + delete __pDefaultTimingFunction; + delete __pDefaultInterpolator; + + return r; +} + +void +_AnimationManager::SetAnimatorEnabled(bool animating) +{ +#ifdef VE_VSYNC_UPDATE + __isAnimating = animating; + + if (likely(animating)) + { + if (likely(pAnimator == null)) + { + pAnimator = (Ecore_Animator*)ecore_animator_add(__AnimatorCallback, _AnimationManager::GetInstance()); + } + } + else + { + if (pAnimator) + { + ecore_animator_del(pAnimator); + pAnimator = null; + } + } +#else + if (animating) + { + _DisplayManager* pDisplayManager = _DisplayManager::GetInstance(); + if (pDisplayManager) + { + pDisplayManager->AddWakeUpEvent(); + } + } +#endif +} + +result +_AnimationManager::AddAnimation(VisualElement& target, const Tizen::Base::String* pKeyName, VisualElementAnimation& animation) +{ + SysTryReturnResult(NID_UI_ANIM, (CreateCurrentTransactionIfNeeded() == true), E_SYSTEM, "A system error has been occurred. Current transaction is null."); + + if (pKeyName != null && pKeyName->IsEmpty() == false) + { + SysTryReturnResult(NID_UI_ANIM, (DoesAnimationExist(target, *pKeyName) == false), E_OBJ_ALREADY_EXIST, "Animation with keyName already exists. key name = %ls", pKeyName->GetPointer()); + } + + result r = E_SUCCESS; + + if (_VisualElementAnimationImpl::GetInstance(animation)->GetTimingFunction() == null) + { + animation.SetTimingFunction(__pDefaultTimingFunction); + } + + if (_VisualElementAnimationImpl::GetInstance(animation)->GetValueInterpolator() == null) + { + animation.SetValueInterpolator(__pDefaultInterpolator); + } + + // current trasaction + r = __pCurrentTransaction->AddAnimation(target, pKeyName, animation); + SysTryReturnResult(NID_UI_ANIM, r == E_SUCCESS, r, "Failed to add animation."); + + if (__pCurrentTransaction->IsCommitted() && __isAnimating == false) + { + SetAnimatorEnabled(true); + } + + return E_SUCCESS; +} + +result +_AnimationManager::RemoveAnimation(VisualElement& target, const Tizen::Base::String& keyName) +{ + result r = E_SUCCESS; + + if (__pCurrentTransaction) + { + r = __pCurrentTransaction->RemoveChildrenAnimation(target, keyName); + + if (r == E_SUCCESS) + { + return r; + } + } + + if (__committedList.IsEmpty() == false) + { + int committedCount = __committedList.GetCount(); + + _TransactionNode* pNode = null; + + for(int index = 0; index < committedCount; index++) + { + pNode = __committedList.GetNodeAt(index); + + if (pNode) + { + r = pNode->RemoveChildrenAnimation(target, keyName); + + if (r == E_SUCCESS) + { + return r; + } + } + } + } + + return __pRootTransaction->RemoveChildrenAnimation(target, keyName); +} + +void +_AnimationManager::RemoveAnimationByProperty(VisualElement& target, const Tizen::Base::String& property) +{ + if (__pCurrentTransaction) + { + __pCurrentTransaction->RemoveChildrenAnimationByProperty(target, property); + } + + if (__committedList.IsEmpty() == false) + { + int committedCount = __committedList.GetCount(); + + _TransactionNode* pNode = null; + + for(int index = 0; index < committedCount; index++) + { + pNode = __committedList.GetNodeAt(index); + + if (pNode) + { + pNode->RemoveChildrenAnimationByProperty(target, property); + } + } + } + + __pRootTransaction->RemoveChildrenAnimationByProperty(target, property); +} + +void +_AnimationManager::RemoveAllAnimations(VisualElement& target) +{ + if (__pCurrentTransaction) + { + __pCurrentTransaction->RemoveChildrenAllAnimations(target); + } + + if (__committedList.IsEmpty() == false) + { + int committedCount = __committedList.GetCount(); + + _TransactionNode* pNode = null; + + for(int index = 0; index < committedCount; index++) + { + pNode = __committedList.GetNodeAt(index); + + if (pNode) + { + pNode->RemoveChildrenAllAnimations(target); + } + } + } + + __pRootTransaction->RemoveChildrenAllAnimations(target); +} + +const VisualElementAnimation* +_AnimationManager::GetAnimation(VisualElement& target, const Tizen::Base::String& keyName) const +{ + const VisualElementAnimation* pAnimation = null; + + if (__pCurrentTransaction) + { + pAnimation = __pCurrentTransaction->GetChildrenAnimation(target, keyName); + + if (pAnimation) + { + return pAnimation; + } + } + + if (__committedList.IsEmpty() == false) + { + int committedCount = __committedList.GetCount(); + + _TransactionNode* pNode = null; + + for(int index = 0; index < committedCount; index++) + { + pNode = __committedList.GetNodeAt(index); + + if (pNode) + { + pAnimation = pNode->GetChildrenAnimation(target, keyName); + + if (pAnimation) + { + return pAnimation; + } + } + } + } + + return __pRootTransaction->GetChildrenAnimation(target, keyName); +} + +VisualElementAnimation* +_AnimationManager::GetAnimationN(VisualElement& target, const Tizen::Base::String& keyName) const +{ + const VisualElementAnimation* pAnimation = GetAnimation(target, keyName); + + if (pAnimation != null) + { + SetLastResult(E_SUCCESS); + return pAnimation->CloneN(); + } + + SetLastResult(E_OBJ_NOT_FOUND); + return null; +} + +bool +_AnimationManager::DoesAnimationExist(VisualElement& target, const Tizen::Base::String& keyName) const +{ + return (GetAnimation(target, keyName) != null); +} + +int +_AnimationManager::BeginTransaction(void) +{ + CommitCurrentTransactionIfNeeded(); + + _TransactionNode* pNode = null; + + if (__pCurrentTransaction == null) + { + pNode = new (std::nothrow) _TransactionNode(*__pRootTransaction); + SysTryReturn(NID_UI_ANIM, (pNode != null), -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed. Failed to create _TransactionNode."); + + result r = GetLastResult(); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), , r, "[%s] Failed to create _TransactionNode instance.", GetErrorMessage(r)); + } + else + { + pNode = new (std::nothrow) _TransactionNode(*__pCurrentTransaction); + SysTryReturn(NID_UI_ANIM, (pNode != null), -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed. Failed to create _TransactionNode."); + + result r = GetLastResult(); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), , r, "[%s] Failed to create _TransactionNode instance.", GetErrorMessage(r)); + + r = __pCurrentTransaction->AddChild(*pNode); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), , r, "[%s] Failed to add child.", GetErrorMessage(r)); + } + + __pCurrentTransaction = pNode; + __pCurrentTransactionExceptGroup = pNode; + + pNode->SetDefaultEventListener(__pDefaultTransactionEventListener); + + return pNode->GetId(); + +CATCH: + delete pNode; + + return -1; +} + +int +_AnimationManager::BeginGroupTransaction(VisualElement& target, const Tizen::Base::String* pKeyName, VisualElementAnimation& animation) +{ + SysTryReturn(NID_UI_ANIM, (CreateCurrentTransactionIfNeeded() == true), -1, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Current transaction is null."); + + if (pKeyName != null && pKeyName->IsEmpty() == false) + { + SysTryReturn(NID_UI_ANIM, (DoesAnimationExist(target, *pKeyName) == false), -1, E_OBJ_ALREADY_EXIST, "[E_OBJ_ALREADY_EXIST] Animation with keyName already exists. key name = %ls", pKeyName->GetPointer()); + } + + _AnimationGroupNode* pNode = new (std::nothrow) _AnimationGroupNode(target, pKeyName, animation); + SysTryReturn(NID_UI_ANIM, (pNode != null), -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed. Failed to create _AnimationNode."); + + result r = GetLastResult(); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), , r, "[%s] Failed to _AnimationGroupNode instance.", GetErrorMessage(r)); + + r = __pCurrentTransaction->AddChild(*pNode); + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , r, "[%s] Failed to add a child.", GetErrorMessage(r)); + + __pCurrentTransaction = pNode; + + return pNode->GetId(); + +CATCH: + + delete pNode; + + return -1; +} + +result +_AnimationManager::CommitTransaction(void) +{ + SysTryReturnResult(NID_UI_ANIM, __pCurrentTransaction != null, E_SYSTEM, "A system error has been occurred. Current transaction is null."); + + _TransactionNode* pParentTransaction = __pCurrentTransaction->GetParent(); + + if (__pCurrentTransaction->IsEmpty()) + { + if (pParentTransaction) + { + pParentTransaction->RemoveChild(*__pCurrentTransaction); + } + else + { + delete __pCurrentTransaction; + } + } + else + { + __pCurrentTransaction->Commit(); + + if (pParentTransaction == null) + { + __committedList.Add(__pCurrentTransaction); + + if (__isAnimating == false) + { + SetAnimatorEnabled(true); + } + } + } + + __pCurrentTransaction = pParentTransaction; + + if (dynamic_cast< _AnimationGroupNode* > (pParentTransaction) == null) + { + __pCurrentTransactionExceptGroup = pParentTransaction; + } + + return E_SUCCESS; +} + +result +_AnimationManager::DiscardTransaction(void) +{ + SysTryReturnResult(NID_UI_ANIM, (__pCurrentTransaction != null && __pCurrentTransaction->IsCommitted() == false), E_INVALID_OPERATION, "Transaction isn't opened."); + + delete __pCurrentTransaction; + + __pCurrentTransaction = null; + __pCurrentTransactionExceptGroup = null; + + return E_SUCCESS; +} + +result +_AnimationManager::DiscardTransaction(int transactionId) +{ + SysTryReturnResult(NID_UI_ANIM, (__pCurrentTransaction != null), E_INVALID_OPERATION, "Transaction isn't opened."); + + if (__pCurrentTransaction->GetId() == transactionId) + { + _TransactionNode* pParentTransaction = __pCurrentTransaction->GetParent(); + + if (pParentTransaction) + { + pParentTransaction->RemoveChild(*__pCurrentTransaction); + } + else + { + delete __pCurrentTransaction; + } + + __pCurrentTransaction = pParentTransaction; + + if (dynamic_cast< _AnimationGroupNode* > (pParentTransaction) == null) + { + __pCurrentTransactionExceptGroup = pParentTransaction; + } + } + else + { + __pCurrentTransaction->RemoveChild(transactionId); + } + + return E_SUCCESS; +} + +result +_AnimationManager::StopTransaction(int transactionId) +{ + _TransactionNode* pChild = null; + + if (__committedList.IsEmpty() == false) + { + int committedCount = __committedList.GetCount(); + + _TransactionNode* pNode = null; + + for (int index = 0; index < committedCount; index++) + { + pNode = __committedList.GetNodeAt(index); + + if (pNode) + { + if (pNode->GetId() == transactionId) + { + pNode->RemoveAll(); + + if (__isInAnimationTick == false) + { + __committedList.RemoveAt(index); + + delete pNode; + } + + return E_SUCCESS; + } + + pChild = pNode->GetChild(transactionId); + + if (pChild != null) + { + pNode->RemoveChild(transactionId); + + return E_SUCCESS; + } + } + } + } + + pChild = __pRootTransaction->GetChild(transactionId); + + if (pChild != null) + { + __pRootTransaction->RemoveChild(transactionId); + + return E_SUCCESS; + } + + return E_INVALID_ARG; +} + +bool +_AnimationManager::IsTransactionRunning(int transactionId) const +{ + _TransactionNode* pChild = __pRootTransaction->GetChild(transactionId); + + if (pChild != null) + { + return pChild->IsRunning(); + } + + return false; +} + +bool +_AnimationManager::IsImplicitAnimationEnabled(void) const +{ + if (__pCurrentTransactionExceptGroup) + { + return __pCurrentTransactionExceptGroup->IsImplicitAnimationEnabled(); + } + + return true; +} + +_TransactionNode* +_AnimationManager::GetCurrentTransaction(bool withGroup) const +{ + // default transaction is always committed. + if (__pCurrentTransaction && __pCurrentTransaction->IsCommitted()) + { + return null; + } + + if (withGroup == false) + { + return __pCurrentTransactionExceptGroup; + } + + return __pCurrentTransaction; +} + +bool +_AnimationManager::CreateCurrentTransactionIfNeeded(void) +{ + if (__pCurrentTransaction != null) + { + return true; + } + + int transactionId = BeginTransaction(); + SysTryReturn(NID_UI_ANIM, (transactionId >= 0), false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed. Failed to create _TransactionNode."); + + __pCurrentTransaction->SetDefaultEventListener(null); + + __pCurrentTransaction->Commit(); // default transaction is always committed. + + return true; +} + +void +_AnimationManager::CommitCurrentTransactionIfNeeded() +{ + // if current transaction is default transaction, only status of default transaction is committed, so must process to commit transaction. + if (__pCurrentTransaction != null && __pCurrentTransaction->IsCommitted(true)) + { + CommitTransaction(); + } +} + +void +_AnimationManager::SetTransactionEventListener(const IAnimationTransactionEventListener* pListener) +{ + static_cast< _TransactionEventListener* >(__pDefaultTransactionEventListener)->SetTransactionEventListener(pListener); +} + +void +_AnimationManager::ProcessCommittedTransaction(void) +{ + if (__committedList.IsEmpty()) + { + return; + } + + int committedCount = __committedList.GetCount(); + + _TransactionNode* pNode = null; + + + for(int index = 0; index < committedCount; index++) + { + pNode = __committedList.GetNodeAt(index); + + if (pNode) + { + pNode->DrawTargets(); + pNode->SetChildrenBaseTime(_AnimationTime::GetTime()); + + __pRootTransaction->AddChild(*pNode); + + __committedList.SetAt(null, index); + } + } + + __committedList.RemoveAll(); +} + +void +_AnimationManager::ProcessAnimationTick(void) +{ + if (unlikely(__isInAnimationTick)) + { + return; + } + + __isInAnimationTick = true; + + CommitCurrentTransactionIfNeeded(); + ProcessCommittedTransaction(); + + // process transactions; + __pRootTransaction->ProcessAnimationTick(_AnimationTime::GetTime()); + + if (likely(__pRootTransaction->IsEmpty() && __committedList.IsEmpty())) + { + SetAnimatorEnabled(false); + } + + __isInAnimationTick = false; +} + + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnim_AnimationManager.h b/src/ui/animations/FUiAnim_AnimationManager.h new file mode 100644 index 0000000..31bd951 --- /dev/null +++ b/src/ui/animations/FUiAnim_AnimationManager.h @@ -0,0 +1,152 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_AnimationManager.h + * @brief This is the header file for the _AnimationManager class. + * + * This header file contains the declarations of the _AnimationManager class. + */ + +#ifndef _FUI_ANIM_INTERNAL_ANIMATION_MANAGER_H_ +#define _FUI_ANIM_INTERNAL_ANIMATION_MANAGER_H_ + +#include +#include +#include + +#include + +#include "FUiAnim_TransactionNode.h" + +namespace Tizen { namespace Ui { namespace Animations +{ + +class IAnimationTransactionEventListener; +class IVisualElementAnimationTimingFunction; +class IVisualElementAnimationValueInterpolator; +class VisualElementAnimation; +class VisualElementAnimationGroup; + +class _AnimationManager +{ +public: + static _AnimationManager* GetInstance(void); + static result CreateInstance(void); + static void ReleaseInstance(void); + + //for animation + result AddAnimation(VisualElement& target, const Tizen::Base::String* pKeyName, VisualElementAnimation& animation); + result RemoveAnimation(VisualElement& target, const Tizen::Base::String& keyName); + void RemoveAnimationByProperty(VisualElement& target, const Tizen::Base::String& property); + void RemoveAllAnimations(VisualElement& target); + bool DoesAnimationExist(VisualElement& target, const Tizen::Base::String& keyName) const; + VisualElementAnimation* GetAnimationN(VisualElement& target, const Tizen::Base::String& keyName) const; + + //for transaction + int BeginTransaction(void); + int BeginGroupTransaction(VisualElement& target, const Tizen::Base::String* pKeyName, VisualElementAnimation& animation); + result CommitTransaction(void); + result DiscardTransaction(void); + result DiscardTransaction(int transactionId); + result StopTransaction(int transactionId); + bool IsTransactionRunning(int transactionId) const; + bool IsImplicitAnimationEnabled(void) const; + _TransactionNode* GetCurrentTransaction(bool withGroup = true) const; + void SetTransactionEventListener(const IAnimationTransactionEventListener* pListener); + + void ProcessAnimationTick(void); + +private: + _AnimationManager(void); + ~_AnimationManager(void); + + _AnimationManager(const _AnimationManager&); + _AnimationManager& operator =(const _AnimationManager&); + + result Construct(void); + result Release(void); + + void SetAnimatorEnabled(bool animating); + + bool CreateCurrentTransactionIfNeeded(void); + void CommitCurrentTransactionIfNeeded(void); + void ProcessCommittedTransaction(void); + + const VisualElementAnimation* GetAnimation(VisualElement& target, const Tizen::Base::String& keyName) const; + +private: + static _AnimationManager* __pInstance; + + bool __isAnimating; + bool __isInAnimationTick; + + _TransactionNode* __pRootTransaction; + _TransactionNode* __pCurrentTransaction; + _TransactionNode* __pCurrentTransactionExceptGroup; + + class CommittedListT : public Tizen::Base::Collection::ArrayListT<_TransactionNode*> + { + public: + _TransactionNode* GetNodeAt(int index) const + { + _TransactionNode* pNode = null; + + if (likely(GetAt(index, pNode) == E_SUCCESS)) + { + return pNode; + } + + return null; + } + + bool IsEmpty() const + { + return (GetCount() <= 0); + } + + void RemoveAllNodes(void) + { + _TransactionNode* pNode = null; + + int nodeCount = GetCount(); + + for (int index = 0; index < nodeCount; index++) + { + if (likely(GetAt(index, pNode) == E_SUCCESS)) + { + delete pNode; + } + } + + RemoveAll(); + } + }; + + CommittedListT __committedList; + + IAnimationTransactionEventListener* __pDefaultTransactionEventListener; + const IVisualElementAnimationTimingFunction* __pDefaultTimingFunction; + const IVisualElementAnimationValueInterpolator* __pDefaultInterpolator; + + friend class _DisplayManager; +}; // _AnimationManager + +}}} // Tizen::Ui::Animations + +#endif //_FUI_ANIM_INTERNAL_ANIMATION_MANAGER_H_ + diff --git a/src/ui/animations/FUiAnim_ControlAnimatorImpl.cpp b/src/ui/animations/FUiAnim_ControlAnimatorImpl.cpp new file mode 100644 index 0000000..c9e1589 --- /dev/null +++ b/src/ui/animations/FUiAnim_ControlAnimatorImpl.cpp @@ -0,0 +1,3702 @@ +// +// 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 FUiAnimControlAnimatorImpl.cpp + * @brief This file contains implementation of _ControlAnimatorImpl class + * + * This file contains implementation _ControlAnimatorImpl class. + */ + +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "FUi_ControlImplManager.h" +#include "FUi_WindowImpl.h" +#include "FUiAnim_ControlAnimatorImpl.h" +#include "FUiAnim_VisualElement.h" +#include "FUiAnim_VisualElementImpl.h" +#include "FUiAnim_VisualElementAnimationImpl.h" +#include "FUiAnim_VisualElementAnimationKeyFrame.h" +#include "FUiAnim_AnimationManager.h" +#include "FUiAnim_MatrixUtil.h" + + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; + + +#define TRANSACTION "TRANSACTION" +#define GROUP "GROUP" +#define POSITION "POS" +#define DIMENSION "DIM" +#define ALPHA "ALP" +#define ROTATION "ROT" + + +namespace Tizen { namespace Ui { namespace Animations +{ + +bool +_ControlAnimatorImpl::ActiveAnimation::operator ==(const _ControlAnimatorImpl::ActiveAnimation& rhs) const +{ + if ((animTarget == rhs.animTarget) && (pAnimationBase == rhs.pAnimationBase)) + { + return true; + } + + return false; +} + +bool +_ControlAnimatorImpl::ActiveAnimation::operator !=(const _ControlAnimatorImpl::ActiveAnimation& rhs) const +{ + if ((animTarget != rhs.animTarget) || (pAnimationBase != rhs.pAnimationBase)) + { + return true; + } + + return false; +} + +_ControlAnimatorImpl::_ControlAnimatorImpl(ControlAnimator* pControlAnimator) + : __pActiveAnimationList(null) + , __pControl(null) + , __pControlImpl(null) + , __pControlAnimator(pControlAnimator) + , __pVisualElement(null) + , __animatorStatus(ANIMATOR_STATUS_STOPPED) + , __logicalBoundsHolder(0, 0, 0, 0) + , __showStateHolder(true) + , __prevAnimationBoundsHolder(0, 0, 0, 0) + , __presentationBounds(0.0f, 0.0f, 0.0f, 0.0f) + , __targetCount(0) + , __sequentialGroupAnimation(false) + , __sequetialGroupAnimationDelay(0) + , __pAnimStatusEventListener(null) + , __pAnimDetailedEventListener(null) + , __animationId(0) + , __groupName(0) +{ + for (int animTarget = 0; animTarget < ANIMATION_TARGET_MAX; animTarget++) + { + __isAnimationTargetAnimating[animTarget] = false; + } + + for (int property = 0; property < ANIMATION_TRIGGER_SHOW_STATE_CHANGE; property++) + { + __pPropertyAnimationGroupList[property] = null; + __propertyAnimationGroupType[property] = PROPERTY_ANIMATION_GROUP_TYPE_NONE; + } +} + +_ControlAnimatorImpl::~_ControlAnimatorImpl() +{ + result r = E_SUCCESS; + + r = Dispose(); + + if (r != E_SUCCESS) + { + SysLogException(NID_UI_ANIM, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + for (int animTrigger = 0; animTrigger < ANIMATION_TRIGGER_SHOW_STATE_CHANGE; animTrigger++) + { + if (__pPropertyAnimationGroupList[animTrigger]) + { + __pPropertyAnimationGroupList[animTrigger]->RemoveAllAnimations(); + delete __pPropertyAnimationGroupList[animTrigger]; + __pPropertyAnimationGroupList[animTrigger] = null; + } + } + + delete __pAnimStatusEventListener; + __pAnimStatusEventListener = null; + delete __pAnimDetailedEventListener; + __pAnimDetailedEventListener = null; +} + +result +_ControlAnimatorImpl::Construct(const Control& source) +{ + result r = E_SUCCESS; + + SysAssertf((__pControl == null), "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class."); + + __pControl = const_cast< Control* >(&source); + __pActiveAnimationList = new (std::nothrow) ArrayListT< ActiveAnimation >(); + SysTryReturnResult(NID_UI_ANIM, __pActiveAnimationList != null, E_OUT_OF_MEMORY, "Memory allocation failed."); + + r = __pActiveAnimationList->Construct(); + if (r != E_SUCCESS) + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] Failed to construct _ControlAnimatorImpl instance."); + + Dispose(); + return E_SYSTEM; + } + + __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; +} + +result +_ControlAnimatorImpl::Dispose(void) +{ + result r = E_SUCCESS; + + if (__pActiveAnimationList) + { + r = RemoveAllAnimations(); + if (r != E_SUCCESS) + { + SysLogException(NID_UI_ANIM, r, "[%s] Failed to remove all animations.", GetErrorMessage(r)); + r = E_SYSTEM; + } + __pActiveAnimationList->RemoveAll(); + + delete __pActiveAnimationList; + __pActiveAnimationList = null; + } + + return r; +} + +bool +_ControlAnimatorImpl::IsAnimationSupported(void) const +{ + return _VisualElementAnimationImpl::IsAnimationSupported(); +} + +result +_ControlAnimatorImpl::SetAnimation(AnimationTargetType animTarget, AnimationBase& animationBase, ControlAnimatorTriggerType triggerType, VisualElementAnimationGroup* pAnimationGroup) +{ + result r = E_SUCCESS; + AnimationBase* pAnimationBase = const_cast< AnimationBase* >(&animationBase); + String animIdentifier; + const IVisualElementAnimationTimingFunction* pTimingFunction = null; + BezierTimingFunction* pBezierTimingFunction = null; + + SysTryReturnResult(NID_UI_ANIM, (animTarget > ANIMATION_TARGET_NONE && animTarget < ANIMATION_TARGET_MAX), E_INVALID_ARG, "Invalid argument(s) is used. animTarget is invalid."); + SysTryReturnResult(NID_UI_ANIM, (!(__isAnimationTargetAnimating[animTarget])), E_INVALID_OPERATION, "Same AnimationTargetType is being animated."); + + switch (pAnimationBase->GetInterpolatorType()) + { + case ANIMATION_INTERPOLATOR_LINEAR: + { + pTimingFunction = VisualElementAnimation::GetTimingFunctionByName(INTERPOLATOR_LINEAR); + } + break; + + case ANIMATION_INTERPOLATOR_EASE_IN: + { + pTimingFunction = VisualElementAnimation::GetTimingFunctionByName(INTERPOLATOR_EASEIN); + } + break; + + case ANIMATION_INTERPOLATOR_EASE_OUT: + { + pTimingFunction = VisualElementAnimation::GetTimingFunctionByName(INTERPOLATOR_EASEOUT); + } + break; + + case ANIMATION_INTERPOLATOR_EASE_IN_OUT: + { + pTimingFunction = VisualElementAnimation::GetTimingFunctionByName(INTERPOLATOR_EASEINOUT); + } + break; + + case ANIMATION_INTERPOLATOR_DISCRETE: + { + pTimingFunction = VisualElementAnimation::GetTimingFunctionByName(INTERPOLATOR_DISCRETE); + } + break; + + case ANIMATION_INTERPOLATOR_BEZIER: + { + float cpTime1 = 0.0; + float cpValue1 = 0.0; + float cpTime2 = 0.0; + float cpValue2 = 0.0; + + r = pAnimationBase->GetBezierControlPoints(cpTime1, cpValue1, cpTime2, cpValue2); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to get bezier points."); + + pBezierTimingFunction = new (std::nothrow) BezierTimingFunction(); + SysTryReturnResult(NID_UI_ANIM, (pBezierTimingFunction), E_OUT_OF_MEMORY, "Memory allocation failed."); + + pBezierTimingFunction->SetControlPoints(cpTime1, cpValue1, cpTime2, cpValue2); + pTimingFunction = pBezierTimingFunction; + + } + break; + } + + SysTryReturnResult(NID_UI_ANIM, (pTimingFunction != null), E_OUT_OF_MEMORY, "Memory allocation failed."); + + VisualElementPropertyAnimation* pAnimation = null; + VisualElementValueAnimation* pBoundsAnimation = null; + VisualElementValueAnimation* pBaseAnimation = null; + + if (animTarget == ANIMATION_TARGET_SIZE) + { + pBoundsAnimation = new (std::nothrow) VisualElementValueAnimation(); //deletion will happen in catch/ in Destroy animation + SysTryCatch(NID_UI_ANIM, (pBoundsAnimation), r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pBoundsAnimation->SetTimingFunction(pTimingFunction); + } + else + { + pAnimation = new (std::nothrow) VisualElementPropertyAnimation(); //deletion will happen in catch/ in Destroy animation + SysTryCatch(NID_UI_ANIM, (pAnimation), r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pAnimation->SetTimingFunction(pTimingFunction); + } + + switch (animTarget) + { + case ANIMATION_TARGET_SIZE: + { + DimensionAnimation* pDimensionAnim = null; + RectangleAnimation* pRectangleAnim = null; + + pDimensionAnim = dynamic_cast< DimensionAnimation* >(pAnimationBase); + pRectangleAnim = dynamic_cast< RectangleAnimation* >(pAnimationBase); + + SysTryCatch(NID_UI_ANIM, ((pDimensionAnim) || (pRectangleAnim)), , + E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. Animation is invalid."); + + Dimension controlSize; + Dimension controlPrevSize; + float anchorX = 0.0f; + float anchorY = 0.0f; + + float startWidth = 0.0f; + float startHeight = 0.0f; + float endWidth = 0.0f; + float endHeight = 0.0f; + + controlSize = __pControl->GetSize(); + controlPrevSize.width = __prevAnimationBoundsHolder.width; + controlPrevSize.height = __prevAnimationBoundsHolder.height; + + if (pDimensionAnim) + { + pDimensionAnim->GetAnchor(anchorX, anchorY); + + Dimension startSize = pDimensionAnim->GetStartValue(); + Dimension endSize = pDimensionAnim->GetEndValue(); + + startWidth = static_cast< float >(startSize.width); + startHeight = static_cast< float >(startSize.height); + endWidth = static_cast< float >(endSize.width); + endHeight = static_cast< float >(endSize.height); + + if (__sequentialGroupAnimation) + { + controlSize = controlPrevSize; + } + +#if MULTI_RESOLUTION + Dimension StartDim = _CoordinateSystemUtils::Transform(StartSize); + Dimension EndDim = _CoordinateSystemUtils::Transform(EndSize); + Dimension ControlDim = _CoordinateSystemUtils::Transform(ControlSize); + + Dimension ControlPrevDim = _CoordinateSystemUtils::Transform(ControlPrevSize); + ControlPrevSize = ControlPrevDim; + + StartSize = StartDim; + EndSize = EndDim; + ControlSize = ControlDim; +#endif + } + else + { + pRectangleAnim->GetAnchor(anchorX, anchorY); + + Rectangle startSize = pRectangleAnim->GetStartValue(); + Rectangle endSize = pRectangleAnim->GetEndValue(); + + if (__sequentialGroupAnimation) + { + controlSize = controlPrevSize; + } + + startWidth = static_cast< float >(startSize.width); + startHeight = static_cast< float >(startSize.height); + endWidth = static_cast< float >(endSize.width); + endHeight = static_cast< float >(endSize.height); + +#if MULTI_RESOLUTION + Rectangle StartRect = _CoordinateSystemUtils::Transform(StartSize); + Rectangle EndRect = _CoordinateSystemUtils::Transform(EndSize); + Dimension ControlDim = _CoordinateSystemUtils::Transform(ControlSize); + + Dimension ControlPrevDim = _CoordinateSystemUtils::Transform(ControlPrevSize); + ControlPrevSize = ControlPrevDim; + + StartSize = StartRect; + EndSize = EndRect; + ControlSize = ControlDim; +#endif + } + + FloatRectangle presentationBounds = const_cast((__pVisualElement)->AcquirePresentationInstance())->GetBounds(); + FloatRectangle modelBounds = __pVisualElement->GetBounds(); + + __presentationBounds = modelBounds; + + float currentAnchorX = presentationBounds.width * anchorX; + float currentAnchorY = presentationBounds.height * anchorY; + + float startAnchorX = startWidth * anchorX; + float startAnchorY = startHeight * anchorY; + + float endAnchorX = endWidth * anchorX; + float endAnchorY = endHeight * anchorY; + + float startX = modelBounds.x + (currentAnchorX - startAnchorX); + float startY = modelBounds.y + (currentAnchorY - startAnchorY); + + float endX = modelBounds.x + (currentAnchorX - endAnchorX); + float endY = modelBounds.y + (currentAnchorY - endAnchorY); + + pBoundsAnimation->SetStartValue(Variant(FloatRectangle(startX, startY, startWidth, startHeight))); + pBoundsAnimation->SetEndValue(Variant(FloatRectangle(endX, endY, endWidth, endHeight))); + pBoundsAnimation->SetVisualElementAnimationTickEventListener(this); + animIdentifier.Append(DIMENSION); + + __pVisualElement->ReleasePresentationInstance(); + } + break; + + case ANIMATION_TARGET_POSITION: + { + PointAnimation* pPointAnim = null; + RectangleAnimation* pRectangleAnim = null; + + pPointAnim = dynamic_cast< PointAnimation* >(pAnimationBase); + pRectangleAnim = dynamic_cast< RectangleAnimation* >(pAnimationBase); + + SysTryCatch(NID_UI_ANIM, ((pPointAnim) || (pRectangleAnim)), , E_INVALID_ARG, + "[E_INVALID_ARG] Invalid argument(s) is used. Animation is invalid."); + + Point controlPos; + float absStartX = 0.0f; + float absStartY = 0.0f; + float absEndX = 0.0f; + float absEndY = 0.0f; + + controlPos = __pControl->GetPosition(); + + Point parentPosition(0, 0); + + if (__pControlImpl->GetParent()) + { + parentPosition.x = __pControlImpl->GetParent()->GetClientBounds().x; + parentPosition.y = __pControlImpl->GetParent()->GetClientBounds().y; + } + + if (pPointAnim) + { + Point startPos = pPointAnim->GetStartValue(); + Point endPos = pPointAnim->GetEndValue(); + + absStartX = (static_cast< float >(parentPosition.x) + static_cast< float >(startPos.x)); + absStartY = (static_cast< float >(parentPosition.y) + static_cast< float >(startPos.y)); + + absEndX = (static_cast< float >(parentPosition.x) + static_cast< float >(endPos.x)); + absEndY = (static_cast< float >(parentPosition.y) + static_cast< float >(endPos.y)); + + //Todo : below API's are unavailable now +#if MULTI_RESOLUTION + Point StartPt = _CoordinateSystemUtils::Transform(StartPos); + Point EndPt = _CoordinateSystemUtils::Transform(EndPos); + Point ControlPt = _CoordinateSystemUtils::Transform(controlPos); + StartPos = StartPt; + EndPos = EndPt; + controlPos = ControlPt; +#endif + } + else + { + Rectangle startPos = pRectangleAnim->GetStartValue(); + Rectangle endPos = pRectangleAnim->GetEndValue(); + + absStartX = (static_cast< float >(parentPosition.x) + static_cast< float >(startPos.x)); + absStartY = (static_cast< float >(parentPosition.y) + static_cast< float >(startPos.y)); + + absEndX = (static_cast< float >(parentPosition.x) + static_cast< float >(endPos.x)); + absEndY = (static_cast< float >(parentPosition.y) + static_cast< float >(endPos.y)); + +#if MULTI_RESOLUTION + Rectangle StartRect = _CoordinateSystemUtils::Transform(StartPos); + Rectangle EndRect = _CoordinateSystemUtils::Transform(EndPos); + Point ControlPt = _CoordinateSystemUtils::Transform(controlPos); + StartPos = StartRect; + EndPos = EndRect; + controlPos = ControlPt; +#endif + } + + pAnimation->SetPropertyName(VeSubPropBoundsPosition); + + Variant startPosition(FloatPoint(absStartX, absStartY)); + Variant endPosition(FloatPoint(absEndX, absEndY)); + + pAnimation->SetStartValue(startPosition); + pAnimation->SetEndValue(endPosition); + animIdentifier.Append(POSITION); + } + break; + + case ANIMATION_TARGET_ALPHA: + { + IntegerAnimation* pIntegerAnim = null; + FloatAnimation* pFloatAnim = null; + + pIntegerAnim = dynamic_cast< IntegerAnimation* >(pAnimationBase); + pFloatAnim = dynamic_cast< FloatAnimation* >(pAnimationBase); + + SysTryCatch(NID_UI_ANIM, ((pIntegerAnim) || (pFloatAnim)), , E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. Animation is invalid."); + + pAnimation->SetPropertyName(VePrivPropShowOpacity); // need to change this with show state + + if (pIntegerAnim) + { + int startAlpha = 0; + int endAlpha = 1; + + startAlpha = pIntegerAnim->GetStartValue(); + endAlpha = pIntegerAnim->GetEndValue(); + + Variant startOpacityInt(static_cast< float >(startAlpha)); + Variant endOpacityInt(static_cast< float >(endAlpha)); + + pAnimation->SetStartValue(startOpacityInt); + pAnimation->SetEndValue(endOpacityInt); + } + else + { + float startAlpha = 0.0; + float endAlpha = 1.0; + + startAlpha = static_cast< float >(pFloatAnim->GetStartValue()); + endAlpha = static_cast< float >(pFloatAnim->GetEndValue()); + + Variant startOpacityFloat(startAlpha); + Variant endOpacityFloat(endAlpha); + + pAnimation->SetStartValue(startOpacityFloat); + pAnimation->SetEndValue(endOpacityFloat); + } + animIdentifier.Append(ALPHA); + } + break; + + case ANIMATION_TARGET_ROTATION: + { + RotateAnimation* pRotateAnim = null; + float anchorX = 0.0f; + float anchorY = 0.0f; + + pRotateAnim = dynamic_cast< RotateAnimation* >(pAnimationBase); + SysTryCatch(NID_UI_ANIM, (pRotateAnim), , E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. Animation is invalid."); + + pAnimation->SetPropertyName(VeSubPropTransformRotationZ); //check this :Todo + pRotateAnim->GetAnchor(anchorX, anchorY); + + _VisualElementImpl::GetInstance(*__pVisualElement)->SetAnchor(FloatPoint(anchorX, anchorY)); + + pAnimation->SetStartValue(Variant(pRotateAnim->GetStartValue())); + pAnimation->SetEndValue(Variant(pRotateAnim->GetEndValue())); + animIdentifier.Append(ROTATION); + } + break; + + default: + SysAssertf(false, "Animation type is invalid!"); + break; + } + + if (animTarget == ANIMATION_TARGET_SIZE) + { + pBaseAnimation = pBoundsAnimation; + } + else + { + pBaseAnimation = pAnimation; + } + + //Set the Animation values and start the Animation + pBaseAnimation->SetRepeatCount(pAnimationBase->GetRepeatCount()); + pBaseAnimation->SetEndValueApplied(pAnimationBase->IsHoldEndEnabled()); + pBaseAnimation->SetAutoReverseEnabled(pAnimationBase->IsAutoReverseEnabled()); + pBaseAnimation->SetScaleRatio(pAnimationBase->GetScaleRatio()); + pBaseAnimation->SetDuration(pAnimationBase->GetDuration()); + pBaseAnimation->SetOffset(pAnimationBase->GetOffset()); + pBaseAnimation->SetDelay(pAnimationBase->GetDelay()); + pBaseAnimation->SetVisualElementAnimationStatusEventListener(this); + + if (__sequentialGroupAnimation) + { + pBaseAnimation->SetDelay(pAnimationBase->GetDelay() + __sequetialGroupAnimationDelay); + } + + if (pAnimationBase->GetKeyFrameCount() > 0) + { + r = SetKeyFrameAnimation(animTarget, pAnimationBase, pTimingFunction, pBaseAnimation); + } + + animIdentifier.Append(__animationId); + + if (_AnimationManager::GetInstance() && _AnimationManager::GetInstance()->GetCurrentTransaction() != null) + { + animIdentifier.Append(TRANSACTION); + } + + __animationId++; + + if (pAnimationGroup == null) + { + r = __pVisualElement->AddAnimation(animIdentifier, *pBaseAnimation); + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Animation could not be started."); + r = AddActiveAnimation(animTarget, *pAnimationBase, *pBaseAnimation, triggerType, animIdentifier, pBezierTimingFunction); //Todo : check this + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Animation could not be added to playlist."); + } + else + { + String* pAnimName = new (std::nothrow) String(animIdentifier.GetLength() + __groupName.GetLength()); + SysTryCatch(NID_UI_ANIM, (pAnimName != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + *pAnimName = animIdentifier; + + pAnimName->Append(__groupName); + + pBaseAnimation->SetUserData((void*) (pAnimName)); + + r = pAnimationGroup->AddAnimation(*pBaseAnimation); + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Animation could not be added to the group."); + r = AddActiveAnimation(animTarget, *pAnimationBase, *pBaseAnimation, triggerType, *pAnimName, pBezierTimingFunction); + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Animation could not be added to playlist."); + } + + delete pAnimation; + delete pBoundsAnimation; + return r; + +CATCH: + //In case of error: free pAnimationBase if not added to ActiveAnimList. If added, its freed in Destroy Animation. + delete pAnimationBase; + delete pAnimation; + delete pBoundsAnimation; + delete pBezierTimingFunction; + + return r; +} + +result +_ControlAnimatorImpl::SetKeyFrameAnimation(AnimationTargetType animTarget, AnimationBase* pAnimationBase, const IVisualElementAnimationTimingFunction* pTimingFunction, VisualElementAnimation* pAnimation) +{ + long keyTime = 0; + result r = E_SUCCESS; + + VisualElementValueAnimation* pPropertyAnimation = dynamic_cast< VisualElementValueAnimation* >(pAnimation); + SysTryReturnResult(NID_UI_ANIM, (pPropertyAnimation != null), E_INVALID_ARG, "Invalid argument(s) is used. VisualElementAnimation is null."); + + switch (animTarget) + { + + case ANIMATION_TARGET_SIZE: + { + DimensionAnimation* pDimensionAnim = null; + RectangleAnimation* pRectangleAnim = null; + + pDimensionAnim = dynamic_cast< DimensionAnimation* >(pAnimationBase); + pRectangleAnim = dynamic_cast< RectangleAnimation* >(pAnimationBase); + SysTryReturnResult(NID_UI_ANIM, ((pDimensionAnim) || (pRectangleAnim)), E_INVALID_ARG, "Invalid argument(s) is used. Animation is invalid."); + + Dimension controlSize; + float anchorX = 0.0f; + float anchorY = 0.0f; + + controlSize = __pControl->GetSize(); + + if (pDimensionAnim) + { + Dimension dimValue(0, 0); + + pDimensionAnim->GetAnchor(anchorX, anchorY); + + for (int index = 0; index < pDimensionAnim->GetKeyFrameCount(); index++) + { + pDimensionAnim->GetKeyFrameAt(index, keyTime, dimValue); + + if (keyTime < pDimensionAnim->GetDuration()) + { + FloatRectangle modelBounds = __pVisualElement->GetBounds(); + FloatRectangle presentationBounds = const_cast((__pVisualElement)->AcquirePresentationInstance())->GetBounds(); + __pVisualElement->ReleasePresentationInstance(); + + float currentAnchorX = presentationBounds.width * anchorX; + float currentAnchorY = presentationBounds.height * anchorY; + float endAnchorX = dimValue.width * anchorX; + float endAnchorY = dimValue.height * anchorY; + + float endX = modelBounds.x + (currentAnchorX - endAnchorX); + float endY = modelBounds.y + (currentAnchorY - endAnchorY); + + Variant keyValue(FloatRectangle(endX, endY, static_cast< float >(dimValue.width), static_cast< float >(dimValue.height))); + + r = pPropertyAnimation->AddKeyFrame(keyTime / static_cast< float >(pDimensionAnim->GetDuration()), keyValue, const_cast< IVisualElementAnimationTimingFunction* >(pTimingFunction)); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add key frame."); + } + } + } + else //if (pRectangleAnim) + { + Rectangle dimValue(0, 0, 0, 0); + + pRectangleAnim->GetAnchor(anchorX, anchorY); + + for (int index = 0; index < pRectangleAnim->GetKeyFrameCount(); index++) + { + pRectangleAnim->GetKeyFrameAt(index, keyTime, dimValue); + + if (keyTime < pRectangleAnim->GetDuration()) + { + FloatRectangle modelBounds = __pVisualElement->GetBounds(); + FloatRectangle presentationBounds = const_cast((__pVisualElement)->AcquirePresentationInstance())->GetBounds(); + __pVisualElement->ReleasePresentationInstance(); + + float currentAnchorX = presentationBounds.width * anchorX; + float currentAnchorY = presentationBounds.height * anchorY; + float endAnchorX = dimValue.width * anchorX; + float endAnchorY = dimValue.height * anchorY; + + float endX = modelBounds.x + (currentAnchorX - endAnchorX); + float endY = modelBounds.y + (currentAnchorY - endAnchorY); + + Variant keyValue(FloatRectangle(endX, endY, static_cast< float >(dimValue.width), static_cast< float >(dimValue.height))); + r = pPropertyAnimation->AddKeyFrame(keyTime / static_cast< float >(pRectangleAnim->GetDuration()), keyValue, const_cast< IVisualElementAnimationTimingFunction* >(pTimingFunction)); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add key frame."); + } + } + } + } + break; + + case ANIMATION_TARGET_POSITION: + { + PointAnimation* pPointAnim = null; + RectangleAnimation* pRectangleAnim = null; + + pPointAnim = dynamic_cast< PointAnimation* >(pAnimationBase); + pRectangleAnim = dynamic_cast< RectangleAnimation* >(pAnimationBase); + SysTryReturnResult(NID_UI_ANIM, ((pPointAnim) || (pRectangleAnim)), E_INVALID_ARG, "Invalid argument(s) is used. Animation is invalid."); + + Point controlPos; + Rectangle clientBounds = __pControlImpl->GetParent()->GetClientBounds(); + FloatRectangle modelBounds = __pVisualElement->GetBounds(); + + controlPos = __pControl->GetPosition(); + + if (pPointAnim) + { + Point pointValue(0, 0); + Point prevPointValue = controlPos; + + for (int index = 0; index < pPointAnim->GetKeyFrameCount(); index++) + { + pPointAnim->GetKeyFrameAt(index, keyTime, pointValue); + + + if (keyTime < pPointAnim->GetDuration()) + { + float absPointX = (static_cast< float >(clientBounds.x) + static_cast< float >(pointValue.x)); + float absPointY = (static_cast< float >(clientBounds.y) + static_cast< float >(pointValue.y)); + + Variant keyValue(FloatPoint(absPointX, absPointY)); + + r = pPropertyAnimation->AddKeyFrame(static_cast< float >(keyTime) / static_cast< float >(pPointAnim->GetDuration()), keyValue, const_cast< IVisualElementAnimationTimingFunction* >(pTimingFunction)); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add key frame."); + } + + } + } + else //if (pRectangleAnim) + { + Rectangle pointValue(0, 0, 0, 0); + Rectangle prevPointValue = Rectangle(controlPos.x, controlPos.y, 0, 0); + + for (int index = 0; index < pRectangleAnim->GetKeyFrameCount(); index++) + { + pRectangleAnim->GetKeyFrameAt(index, keyTime, pointValue); + + if (keyTime < pRectangleAnim->GetDuration()) + { + float absPointX = (static_cast< float >(clientBounds.x) + static_cast< float >(pointValue.x)); + float absPointY = (static_cast< float >(clientBounds.y) + static_cast< float >(pointValue.y)); + + Variant keyValue(FloatPoint(absPointX, absPointY)); + + r = pPropertyAnimation->AddKeyFrame(static_cast< float >(keyTime) / static_cast< float >(pRectangleAnim->GetDuration()), keyValue, const_cast< IVisualElementAnimationTimingFunction* >(pTimingFunction)); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add key frame."); + } + } + } + } + break; + + case ANIMATION_TARGET_ALPHA: + { + IntegerAnimation* pIntegerAnim = null; + FloatAnimation* pFloatAnim = null; + + pIntegerAnim = dynamic_cast< IntegerAnimation* >(pAnimationBase); + pFloatAnim = dynamic_cast< FloatAnimation* >(pAnimationBase); + SysTryReturnResult(NID_UI_ANIM, (pIntegerAnim || pFloatAnim), E_INVALID_ARG, "Invalid argument(s) is used. Animation is invalid."); + + if (pIntegerAnim) + { + int alphaIntValue = 0; + + for (int index = 0; index < pIntegerAnim->GetKeyFrameCount(); index++) + { + pIntegerAnim->GetKeyFrameAt(index, keyTime, alphaIntValue); + + if (keyTime < pIntegerAnim->GetDuration()) + { + Variant keyValue(static_cast< float >(alphaIntValue)); + + r = pPropertyAnimation->AddKeyFrame(static_cast< float >(keyTime) / static_cast< float >(pIntegerAnim->GetDuration()), keyValue, const_cast< IVisualElementAnimationTimingFunction* >(pTimingFunction)); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add key frame."); + + } + } + } + else //if (pFloatAnim) + { + float alphaFltValue = 0.0; + + for (int index = 0; index < pFloatAnim->GetKeyFrameCount(); index++) + { + pFloatAnim->GetKeyFrameAt(index, keyTime, alphaFltValue); + + if (keyTime < pFloatAnim->GetDuration()) + { + Variant keyValue(static_cast< float >(alphaFltValue)); + + r = pPropertyAnimation->AddKeyFrame(static_cast< float >(keyTime) / static_cast< float >(pFloatAnim->GetDuration()), keyValue, const_cast< IVisualElementAnimationTimingFunction* >(pTimingFunction)); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add key frame."); + } + } + } + } + break; + + case ANIMATION_TARGET_ROTATION: + { + RotateAnimation* pRotateAnim = null; + + pRotateAnim = dynamic_cast< RotateAnimation* >(pAnimationBase); + SysTryReturnResult(NID_UI_ANIM, (pRotateAnim), E_INVALID_ARG, "Invalid argument(s) is used. Animation is invalid."); + + float rotateFltValue = 0; + + for (int index = 0; index < pRotateAnim->GetKeyFrameCount(); index++) + { + pRotateAnim->GetKeyFrameAt(index, keyTime, rotateFltValue); + + if (keyTime < pRotateAnim->GetDuration()) + { + Variant keyValue(rotateFltValue); + + r = pPropertyAnimation->AddKeyFrame(static_cast< float >(keyTime) / static_cast< float >(pRotateAnim->GetDuration()), keyValue, const_cast< IVisualElementAnimationTimingFunction* >(pTimingFunction)); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add key frame."); + } + } + } + break; + + default: + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. animTarget is invalid."); + return E_SYSTEM; + } + break; + } + + return E_SUCCESS; +} + +result +_ControlAnimatorImpl::SetGroupAnimation(AnimationGroup* pAnimGrp) +{ + result r = E_SUCCESS; + ParallelAnimationGroup* pParallelAnimGrp = null; + SequentialAnimationGroup* pSequentialAnimGrp = null; + AnimationTargetType animTargetArray[ANIMATION_TARGET_MAX] = + { + ANIMATION_TARGET_ROTATION, + ANIMATION_TARGET_SIZE, + ANIMATION_TARGET_POSITION, + ANIMATION_TARGET_ALPHA + }; + bool setLogicalPos = false; + bool setLogicalSize = false; + bool setShowStateInternal = false; + long delay = 0; + long duration = 0; + long totalDelay = 0; + long groupDuration = 0; + VisualElementAnimationGroup* pAnimationGroup = null; + String animIdentifier; + int activeAnimationCount = GetActiveAnimationListCount(); + + pParallelAnimGrp = dynamic_cast< ParallelAnimationGroup* >(pAnimGrp); + pSequentialAnimGrp = dynamic_cast< SequentialAnimationGroup* >(pAnimGrp); + SysTryReturnResult(NID_UI_ANIM, ((pParallelAnimGrp) || (pSequentialAnimGrp)), E_INVALID_ARG, "Invalid argument(s) is used. AnimationGroup argument is invalid."); + + __sequetialGroupAnimationDelay = 0; + pAnimationGroup = new (std::nothrow) VisualElementAnimationGroup(); + SysTryReturnResult(NID_UI_ANIM, (pAnimationGroup != null), E_OUT_OF_MEMORY, "Memory allocation failed."); + + animIdentifier.Append(__animationId); + animIdentifier.Append(GROUP); + __animationId++; + __groupName.Clear(); + __groupName = animIdentifier; + + if (pParallelAnimGrp) + { + for (int target = (static_cast< int >(ANIMATION_TARGET_NONE) + 1); target < (static_cast< int >(ANIMATION_TARGET_MAX)); target++) + { + AnimationTargetType animTarget = animTargetArray[target]; + AnimationBase* pAnimationBase = null; + pAnimationBase = pParallelAnimGrp->GetAnimationN(animTarget); + + if (pAnimationBase != null) + { + long duration = pAnimationBase->GetDuration(); + + if (pAnimationBase->IsAutoReverseEnabled()) + { + duration = duration * 2; + } + + duration = (duration * pAnimationBase->GetRepeatCount() * pAnimationBase->GetScaleRatio()) + ((pAnimationBase->GetDelay() - pAnimationBase->GetOffset()) * pAnimationBase->GetScaleRatio()); + + if (duration > groupDuration) + { + groupDuration = duration; + } + + if (IsAnimationSupported() == false) + { + r = SetControlProperty(animTarget, *pAnimationBase); + delete pAnimationBase; + + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to store animation values."); + } + else + { + if (pParallelAnimGrp->IsAnimationAdded(ANIMATION_TARGET_POSITION) || + pParallelAnimGrp->IsAnimationAdded(ANIMATION_TARGET_SIZE)) + { + 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)) + { + __showStateHolder = __pControl->GetShowState(); + setShowStateInternal = true; + } + + r = SetAnimation(animTarget, *pAnimationBase, ANIMATION_TRIGGER_USER, pAnimationGroup); + + if (r != E_SUCCESS) + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to start animation."); + goto CATCH; + } + + __isAnimationTargetAnimating[animTarget] = true; + + if (animTarget == ANIMATION_TARGET_POSITION || animTarget == ANIMATION_TARGET_SIZE) + { + SetControlLogicalBounds(animTarget, *pAnimationBase); + } + else if (animTarget == ANIMATION_TARGET_ALPHA) + { + SetControlShowState(animTarget, *pAnimationBase); + } + } + } + } + } + else + { + __prevAnimationBoundsHolder = __pControl->GetBounds(); + + for (int index = 0; index < pSequentialAnimGrp->GetAnimationCount(); index++) + { + AnimationTargetType animTarget = ANIMATION_TARGET_MAX; + AnimationBase* pAnimationBase = null; + pAnimationBase = pSequentialAnimGrp->GetAnimationAtN(index); + animTarget = pSequentialAnimGrp->GetAnimationTargetTypeAt(index); + + if (pAnimationBase != null) + { + if (IsAnimationSupported() == false) + { + r = SetControlProperty(animTarget, *pAnimationBase); + delete pAnimationBase; + + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to store animation values."); + } + else + { + if ((pSequentialAnimGrp->GetAnimationTargetTypeAt(index) == ANIMATION_TARGET_POSITION) || + (pSequentialAnimGrp->GetAnimationTargetTypeAt(index) == ANIMATION_TARGET_SIZE)) + { + __logicalBoundsHolder = __pControl->GetBounds(); + setLogicalPos = true; + setLogicalSize = true; + } + + if (pSequentialAnimGrp->GetAnimationTargetTypeAt(index) == ANIMATION_TARGET_ALPHA) + { + __showStateHolder = __pControl->GetShowState(); + setShowStateInternal = true; + } + + if (animTarget == ANIMATION_TARGET_SIZE) + { + r = SetPrevAnimationBoundsProperty(animTarget, *pAnimationBase); + + if (r != E_SUCCESS) + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to store previous animation bounds."); + delete pAnimationBase; + + goto CATCH; + } + } + + __sequentialGroupAnimation = true; + //Add the animation to the group + r = SetAnimation(animTarget, *pAnimationBase, ANIMATION_TRIGGER_USER, pAnimationGroup); + __sequentialGroupAnimation = false; + + if (pAnimationBase->IsAutoReverseEnabled() == true) + { + duration = 2 * pAnimationBase->GetDuration(); + } + else + { + duration = pAnimationBase->GetDuration(); + } + + delay = pAnimationBase->GetDelay(); + totalDelay = delay + duration * pAnimationBase->GetRepeatCount(); + totalDelay = totalDelay - (pAnimationBase->GetOffset()); + __sequetialGroupAnimationDelay = totalDelay; + groupDuration = groupDuration + __sequetialGroupAnimationDelay * pAnimationBase->GetScaleRatio(); + + if (r != E_SUCCESS) + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to start animation."); + goto CATCH; + } + + __isAnimationTargetAnimating[animTarget] = true; + + if (animTarget == ANIMATION_TARGET_POSITION || animTarget == ANIMATION_TARGET_SIZE) + { + SetControlLogicalBounds(animTarget, *pAnimationBase); + } + else if (animTarget == ANIMATION_TARGET_ALPHA) + { + SetControlShowState(animTarget, *pAnimationBase); + } + } + } + } + } + + if (setLogicalPos || setLogicalSize) + { + bool disable = false; + bool propagation = false; + + result r = DisableImplicitAnimation(disable); + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to disable/enable implicit animation."); + //if (pParallelAnimGrp == null) + { + 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."); + } + 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) + { + DisableVisualElementPropagation(propagation); + } + if (disable) + { + DisableImplicitAnimation(disable); + } + + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to set bounds."); + } + + if (setShowStateInternal) + { + bool disable = false; + bool propagation = false; + + result r = DisableImplicitAnimation(disable); + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to disable/enable implicit animation."); + + 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->SetShowState(__showStateHolder); + + if (propagation) + { + DisableVisualElementPropagation(propagation); + } + if (disable) + { + DisableImplicitAnimation(disable); + } + + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to set show state."); + } + + 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."); + + delete pAnimationGroup; + return r; + +CATCH: + //check clean up + delete pAnimationGroup; + + if (DestroyAnimation(activeAnimationCount) != E_SUCCESS) + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to deallocate memory."); + return E_SYSTEM; + } + + return r; +} + +result +_ControlAnimatorImpl::SetCustomImplicitAnimationParams(ControlAnimatorTriggerType triggerType, AnimationBase& animationBase, Rectangle& bounds, bool showState, bool lastTargetOccurence) +{ + result r = E_SUCCESS; + + AnimationBase* pAnimationBase = const_cast< AnimationBase* >(&animationBase); + + if ((__targetCount == 1) || ((__targetCount > 1) && lastTargetOccurence)) + { + pAnimationBase->SetHoldEndEnabled(true); + pAnimationBase->SetAutoReverseEnabled(false); + } + + if (triggerType == ANIMATION_TRIGGER_POSITION_CHANGE) + { + Point newPosition = Point(bounds.x, bounds.y); + Point currentPosition = __pControl->GetPosition(); + + PointAnimation* pPointAnim = null; + RectangleAnimation* pRectangleAnim = null; + + pPointAnim = dynamic_cast< PointAnimation* >(pAnimationBase); + pRectangleAnim = dynamic_cast< RectangleAnimation* >(pAnimationBase); + SysTryReturnResult(NID_UI_ANIM, ((pPointAnim) || (pRectangleAnim)), E_INVALID_ARG, "Invalid argument(s) is used. Animation is invalid."); + + if (pPointAnim) + { + if (__targetCount == 1) + { + pPointAnim->SetStartValue(currentPosition); + pPointAnim->SetEndValue(newPosition); + } + else //__targetCount > 1 + { + (lastTargetOccurence) ? (pPointAnim->SetEndValue(newPosition)) : (pPointAnim->SetStartValue(currentPosition)); + } + pAnimationBase = pPointAnim; + } + else //if (pRectangleAnim) + { + Rectangle newRectangle = Rectangle(bounds.x, bounds.y, bounds.width, bounds.height); + Rectangle currentRectangle = Rectangle(__pControl->GetBounds()); + + if (__targetCount == 1) + { + pRectangleAnim->SetStartValue(currentRectangle); + pRectangleAnim->SetEndValue(newRectangle); + } + else //__targetCount > 1 + { + (lastTargetOccurence) ? (pRectangleAnim->SetEndValue(newRectangle)) : (pRectangleAnim->SetStartValue(currentRectangle)); + } + pAnimationBase = pRectangleAnim; + } + } + else if (triggerType == ANIMATION_TRIGGER_SIZE_CHANGE) + { + Dimension newSize = Dimension(bounds.width, bounds.height); + Dimension currentSize = __pControl->GetSize(); + + DimensionAnimation* pDimensionAnim = null; + RectangleAnimation* pRectangleAnim = null; + + pDimensionAnim = dynamic_cast< DimensionAnimation* >(pAnimationBase); + pRectangleAnim = dynamic_cast< RectangleAnimation* >(pAnimationBase); + SysTryReturnResult(NID_UI_ANIM, ((pDimensionAnim) || (pRectangleAnim)), E_INVALID_ARG, "Invalid argument(s) is used. Animation is invalid."); + + if (pDimensionAnim) + { + if (__targetCount == 1) + { + pDimensionAnim->SetStartValue(currentSize); + pDimensionAnim->SetEndValue(newSize); + } + else //__targetCount > 1 + { + (lastTargetOccurence) ? (pDimensionAnim->SetEndValue(newSize)) : (pDimensionAnim->SetStartValue(currentSize)); + } + pAnimationBase = pDimensionAnim; + } + else //if (pRectangleAnim) + { + Rectangle newRectangle = Rectangle(bounds.x, bounds.y, bounds.width, bounds.height); + Rectangle currentRectangle = Rectangle(__pControl->GetBounds()); + + if (__targetCount == 1) + { + pRectangleAnim->SetStartValue(currentRectangle); + pRectangleAnim->SetEndValue(newRectangle); + } + else //__targetCount > 1 + { + (lastTargetOccurence) ? (pRectangleAnim->SetEndValue(newRectangle)) : (pRectangleAnim->SetStartValue(currentRectangle)); + } + pAnimationBase = pRectangleAnim; + } + } + if (triggerType == ANIMATION_TRIGGER_SHOW_STATE_CHANGE) + { + FloatAnimation* pFloatAnim = null; + IntegerAnimation* pIntegerAnim = null; + + pFloatAnim = dynamic_cast< FloatAnimation* >(pAnimationBase); + pIntegerAnim = dynamic_cast< IntegerAnimation* >(pAnimationBase); + SysTryReturnResult(NID_UI_ANIM, ((pFloatAnim) || (pIntegerAnim)), E_INVALID_ARG, "Invalid argument(s) is used. Animation is invalid."); + + float newShowState = 0.0f; + float currentShowState = 0.0f; + int inewShowState = 0; + int icurrentShowState = 0; + + if (pFloatAnim) + { + newShowState = ((showState) ? (1.0f) : (0.0f)); + currentShowState = ((showState) ? (0.0f) : (1.0f)); + } + else //if (pIntegerAnim) + { + inewShowState = ((showState) ? (1) : (0)); + icurrentShowState = ((showState) ? (0) : (1)); + } + + if (pFloatAnim) + { + if (__targetCount == 1) + { + pFloatAnim->SetStartValue(currentShowState); + pFloatAnim->SetEndValue(newShowState); + } + else //__targetCount > 1 + { + (lastTargetOccurence) ? (pFloatAnim->SetEndValue(newShowState)) : (pFloatAnim->SetStartValue(currentShowState)); + } + pAnimationBase = pFloatAnim; + } + else //if (pIntegerAnim) + { + if (__targetCount == 1) + { + pIntegerAnim->SetStartValue(icurrentShowState); + pIntegerAnim->SetEndValue(inewShowState); + } + else //__targetCount > 1 + { + (lastTargetOccurence) ? (pIntegerAnim->SetEndValue(inewShowState)) : (pIntegerAnim->SetStartValue(icurrentShowState)); + } + pAnimationBase = pIntegerAnim; + } + } + return r; +} + +result +_ControlAnimatorImpl::StartCustomImplicitAnimation(ControlAnimatorTriggerType triggerType, int x, int y, int width, int height, bool showState) +{ + result r = E_SUCCESS; + SysTryReturnResult(NID_UI_ANIM, (triggerType == ANIMATION_TRIGGER_POSITION_CHANGE || + triggerType == ANIMATION_TRIGGER_SIZE_CHANGE || + triggerType == ANIMATION_TRIGGER_SHOW_STATE_CHANGE), E_INVALID_ARG, "Invalid argument(s) is used. Trigger type is invalid."); + + long delay = 0; + long totalDelay = 0; + long groupDuration = 0; + + AnimationTargetType equivalentAnimTarget = ANIMATION_TARGET_NONE; + + VisualElementAnimationGroup* pAnimationGroup = null; + + __sequetialGroupAnimationDelay = 0; + pAnimationGroup = new (std::nothrow) VisualElementAnimationGroup(); + SysTryReturnResult(NID_UI_ANIM, (pAnimationGroup != null), E_OUT_OF_MEMORY, "Memory allocation failed."); + + if (triggerType == ANIMATION_TRIGGER_POSITION_CHANGE) + { + equivalentAnimTarget = ANIMATION_TARGET_POSITION; + } + else if (triggerType == ANIMATION_TRIGGER_SIZE_CHANGE) + { + equivalentAnimTarget = ANIMATION_TARGET_SIZE; + } + else + { + equivalentAnimTarget = ANIMATION_TARGET_ALPHA; + } + + ParallelAnimationGroup* pParallelAnimGrp = null; + SequentialAnimationGroup* pSequentialAnimGrp = null; + String animIdentifier; + + __targetCount = 0; + animIdentifier.Append(GROUP); + animIdentifier.Append(__animationId); + __animationId++; + __groupName.Clear(); + __groupName = animIdentifier; + + if (__propertyAnimationGroupType[triggerType - 1] == PROPERTY_ANIMATION_GROUP_TYPE_SEQUENTIAL) + { + pSequentialAnimGrp = dynamic_cast< SequentialAnimationGroup* >(__pPropertyAnimationGroupList[triggerType - 1]); + if (pSequentialAnimGrp) + { + for (int index = 0; index < pSequentialAnimGrp->GetAnimationCount(); index++) + { + AnimationTargetType animTgt = ANIMATION_TARGET_NONE; + + animTgt = pSequentialAnimGrp->GetAnimationTargetTypeAt(index); + if (animTgt > ANIMATION_TARGET_NONE && animTgt < ANIMATION_TARGET_MAX) + { + if (__isAnimationTargetAnimating[animTgt]) + { + SysLogException(NID_UI_ANIM, E_INVALID_OPERATION, "[E_INVALID_OPERATION] Same AnimationTargetType is being animated."); + delete pAnimationGroup; + return E_INVALID_OPERATION; + } + } + } + + for (int index = pSequentialAnimGrp->GetAnimationCount() - 1; index >= 0; index--) + { + if (pSequentialAnimGrp->GetAnimationTargetTypeAt(index) == equivalentAnimTarget) + { + __targetCount++; + } + } + + //Overwrite last Animation in AnimationGroup and check for IsAnimatable + bool verified = false; + for (int count = pSequentialAnimGrp->GetAnimationCount() - 1; count >= 0; count--) + { + AnimationTargetType animTgt = ANIMATION_TARGET_NONE; + animTgt = pSequentialAnimGrp->GetAnimationTargetTypeAt(count); + if (animTgt == equivalentAnimTarget) + { + bool animatable = false; + AnimationBase* pAnimBase = null; + pAnimBase = pSequentialAnimGrp->GetAnimationAtN(count); + + if (pAnimBase) + { + Rectangle rect(x, y, width, height); + + r = SetCustomImplicitAnimationParams(triggerType, *pAnimBase, rect, showState, true); + + //Comment: Only the last associated TGT_TYPE is checked for IsAnimatable as the rest is checked in ControlAnimator::SetAnimation(). + animatable = IsAnimatable(animTgt, rect, pAnimBase); + delete pAnimBase; + verified = true; + } + + if ((!animatable) || (r != E_SUCCESS)) + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to set custom implicit animation."); + delete pAnimationGroup; + return E_INVALID_ARG; + } + + if (verified) + { + break; + } + } + } + + int firstOccurence = -1; + int lastOccurence = -1; + + for (int index = 0; index < pSequentialAnimGrp->GetAnimationCount(); index++) + { + if (pSequentialAnimGrp->GetAnimationTargetTypeAt(index) == equivalentAnimTarget) + { + firstOccurence = index; + break; + } + } + + for (int index = pSequentialAnimGrp->GetAnimationCount() - 1; index >= 0; index--) + { + if (pSequentialAnimGrp->GetAnimationTargetTypeAt(index) == equivalentAnimTarget) + { + lastOccurence = index; + break; + } + } + + if (!(firstOccurence >= 0 && lastOccurence >= 0)) + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to start custom implicit animation."); + delete pAnimationGroup; + return E_SYSTEM; + } + + __prevAnimationBoundsHolder = __pControl->GetBounds(); + for (int index = 0; index < pSequentialAnimGrp->GetAnimationCount(); index++) + { + AnimationTargetType animTarget = ANIMATION_TARGET_MAX; + AnimationBase* pAnimationBase = null; + pAnimationBase = pSequentialAnimGrp->GetAnimationAtN(index); + animTarget = pSequentialAnimGrp->GetAnimationTargetTypeAt(index); + if (pAnimationBase) + { + if (animTarget == equivalentAnimTarget) + { + Rectangle rect(x, y, width, height); + + if (firstOccurence == lastOccurence) // (or) __targetCount==1 + { + r = SetCustomImplicitAnimationParams(triggerType, *pAnimationBase, rect, showState, true); + } + else + { + if (index == firstOccurence) + { + r = SetCustomImplicitAnimationParams(triggerType, *pAnimationBase, rect, showState, false); + } + else if (index == lastOccurence) + { + r = SetCustomImplicitAnimationParams(triggerType, *pAnimationBase, rect, showState, true); + } + } + if (r != E_SUCCESS) + { + delete pAnimationBase; + delete pAnimationGroup; + + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to set parameters for custom implicit animation."); + return E_SYSTEM; + } + } + if (!IsAnimationSupported()) + { + if (animTarget == equivalentAnimTarget) + { + if (index == lastOccurence) + { + Rectangle rect(x, y, width, height); + + r = SetCustomImplicitAnimationParams(triggerType, *pAnimationBase, rect, showState, true); + + if (r != E_SUCCESS) + { + delete pAnimationBase; + delete pAnimationGroup; + + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to set parameters for custom implicit animation."); + + return E_SYSTEM; + } + + r = SetControlProperty(animTarget, *pAnimationBase); + + delete pAnimationBase; + delete pAnimationGroup; + + if (r != E_SUCCESS) + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to set control property."); + return E_SYSTEM; + } + else + { + return E_SUCCESS; + } + } + } + } + else + { + __sequentialGroupAnimation = true; + r = SetAnimation(animTarget, *pAnimationBase, triggerType, pAnimationGroup); //check this group animation + __sequentialGroupAnimation = false; + + delay = pAnimationBase->GetDelay() + totalDelay; + totalDelay = delay + (pAnimationBase->GetDuration() * pAnimationBase->GetRepeatCount()); + totalDelay = totalDelay - (pAnimationBase->GetOffset()); + __sequetialGroupAnimationDelay = totalDelay; + groupDuration = groupDuration + __sequetialGroupAnimationDelay * pAnimationBase->GetScaleRatio(); + + if (r != E_SUCCESS) + { + delete pAnimationBase; + delete pAnimationGroup; + + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to set parameters for custom implicit animation."); + + return r; + } + + if (animTarget == ANIMATION_TARGET_SIZE) + { + if (SetPrevAnimationBoundsProperty(animTarget, *pAnimationBase) != E_SUCCESS) + { + delete pAnimationBase; + delete pAnimationGroup; + + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to store previous animation bounds."); + + return E_SYSTEM; + } + } + } + } + } + } + } + else if (__propertyAnimationGroupType[triggerType - 1] == PROPERTY_ANIMATION_GROUP_TYPE_PARALLEL) + { + pParallelAnimGrp = dynamic_cast< ParallelAnimationGroup* >(__pPropertyAnimationGroupList[triggerType - 1]); + if (pParallelAnimGrp) + { + for (int target = (static_cast< int >(ANIMATION_TARGET_NONE) + 1); target < (static_cast< int >(ANIMATION_TARGET_MAX)); target++) + { + + AnimationTargetType animTgt = static_cast< AnimationTargetType >(target); + + if (pParallelAnimGrp->IsAnimationAdded(animTgt) && __isAnimationTargetAnimating[animTgt]) + { + SysLogException(NID_UI_ANIM, E_INVALID_OPERATION, " [E_INVALID_OPERATION] Same AnimationTargetType is being animated."); + delete pAnimationGroup; + + return E_INVALID_OPERATION; + } + } + + __targetCount = 1; + for (int target = (static_cast< int >(ANIMATION_TARGET_NONE) + 1); target < (static_cast< int >(ANIMATION_TARGET_MAX)); target++) + { + AnimationTargetType animTgt = static_cast< AnimationTargetType >(target); + AnimationBase* pAnimBase = null; + pAnimBase = pParallelAnimGrp->GetAnimationN(animTgt); + if (pAnimBase != null) + { + bool animatable = false; + if (animTgt == equivalentAnimTarget) + { + Rectangle rect(x, y, width, height); + + r = SetCustomImplicitAnimationParams(triggerType, *pAnimBase, rect, showState); + //Comment: Only associated TGT_TYPE is checked for IsAnimatable as the rest is checked in ControlAnimator::SetAnimation(). + animatable = IsAnimatable(animTgt, rect, pAnimBase); + } + + delete pAnimBase; + + if (((animTgt == equivalentAnimTarget) && (!animatable)) || (r != E_SUCCESS)) + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to set custom implicit animation."); + delete pAnimationGroup; + + return E_INVALID_ARG; + } + } + } + + AnimationTargetType animTargetArray[ANIMATION_TARGET_MAX] = + { + ANIMATION_TARGET_ROTATION, + ANIMATION_TARGET_SIZE, + ANIMATION_TARGET_POSITION, + ANIMATION_TARGET_ALPHA + }; + + for (int target = (static_cast< int >(ANIMATION_TARGET_NONE) + 1); target < (static_cast< int >(ANIMATION_TARGET_MAX)); target++) + { + AnimationTargetType _animTarget = animTargetArray[target]; + AnimationBase* pAnimationBase = null; + pAnimationBase = pParallelAnimGrp->GetAnimationN(_animTarget); + if (pAnimationBase) + { + long duration = pAnimationBase->GetDuration(); + + duration = (duration * (pAnimationBase->GetRepeatCount()) * (pAnimationBase->GetScaleRatio())) + (pAnimationBase->GetDelay()) - (pAnimationBase->GetOffset()* pAnimationBase->GetScaleRatio()); + + if (duration > groupDuration) + { + groupDuration = duration; + } + + Rectangle rect(x, y, width, height); +#if 0 + if (_animTarget == equivalentAnimTarget) + { + r = SetCustomImplicitAnimationParams(triggerType, *pAnimationBase, rect, showState); + if (r != E_SUCCESS) + { + delete pAnimationBase; + delete pAnimationGroup; + + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to set parameters for custom implicit animation."); + return E_SYSTEM; + } + } +#endif + if (IsAnimationSupported() == false) + { + if (_animTarget == equivalentAnimTarget) + { + r = SetCustomImplicitAnimationParams(triggerType, *pAnimationBase, rect, showState, true); + if (r != E_SUCCESS) + { + delete pAnimationBase; + delete pAnimationGroup; + + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to set parameters for custom implicit animation."); + return E_SYSTEM; + } + + r = SetControlProperty(_animTarget, *pAnimationBase); + + delete pAnimationBase; + delete pAnimationGroup; + + if (r != E_SUCCESS) + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to set control property."); + return E_SYSTEM; + } + else + { + return E_SUCCESS; + } + } + } + else + { + //Create and set the animation to the layer + //Comment: Deep copy need not be done here as AnimationGroup did. + r = SetAnimation(_animTarget, *pAnimationBase, triggerType, pAnimationGroup); + if (r != E_SUCCESS) + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to start the animation."); + delete pAnimationGroup; + + return E_SYSTEM; + } + } + } + } + } + } + + if (equivalentAnimTarget != ANIMATION_TARGET_ALPHA) + { + bool disable = false; + bool propagation = false; + + result r = DisableImplicitAnimation(disable); + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to disable/enable implicit animation."); + + 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(x, y, width, height); + + if (propagation) + { + DisableVisualElementPropagation(propagation); + } + if (disable) + { + DisableImplicitAnimation(disable); + } + + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to set bounds."); + } + else + { + bool disable = false; + bool propagation = false; + + result r = DisableImplicitAnimation(disable); + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to disable/enable implicit animation."); + + 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->SetShowState(showState); + + if (propagation) + { + DisableVisualElementPropagation(propagation); + } + if (disable) + { + DisableImplicitAnimation(disable); + } + + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to set show state."); + } + + pAnimationGroup->SetDuration(groupDuration); + __pVisualElement->AddAnimation(animIdentifier, *pAnimationGroup); + +CATCH: + delete pAnimationGroup; + pAnimationGroup = null; + + return r; + +} + +result +_ControlAnimatorImpl::AddActiveAnimation(AnimationTargetType animTarget, AnimationBase& animBase, VisualElementAnimation& animNative, + ControlAnimatorTriggerType triggerType, + const String& animName, BezierTimingFunction* pBezierTiming) +{ + SysTryReturnResult(NID_UI_ANIM, (animTarget > ANIMATION_TARGET_NONE && animTarget < ANIMATION_TARGET_MAX), E_INVALID_ARG, "Invalid argument(s) is used. animTarget is invalid."); + + result r = E_SUCCESS; + ActiveAnimation activeAnim; + + activeAnim.animType = triggerType; + activeAnim.animTarget = animTarget; + activeAnim.pAnimationBase = (&animBase); + activeAnim.animName = animName; + activeAnim.pBezierTimingFunction = pBezierTiming; + + r = __pActiveAnimationList->Add(activeAnim); + SysTryReturnResult(NID_UI_ANIM, r == E_SUCCESS, E_SYSTEM, "A system error has been occurred. Failed to add animations to active play list."); + + return r; +} + +String +_ControlAnimatorImpl::GetActiveAnimationAt(int index) const +{ + SysTryReturn(NID_UI_ANIM, (index >= 0 && index < __pActiveAnimationList->GetCount()), + String(), E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] Index (%d) is out of range.", index); + + ActiveAnimation activeAnim; + + if (__pActiveAnimationList->GetAt(index, activeAnim) == E_SUCCESS) + { + return activeAnim.animName; + } + + return String(); +} + +String +_ControlAnimatorImpl::GetActiveAnimationAt(int index, ControlAnimatorTriggerType animTrigger) const +{ + SysTryReturn(NID_UI_ANIM, (index >= 0 && index < __pActiveAnimationList->GetCount()), + String(), E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] Index (%d) is out of range.", index); + + ActiveAnimation activeAnim; + + if (__pActiveAnimationList->GetAt(index, activeAnim) == E_SUCCESS) + { + if (animTrigger == activeAnim.animType) + { + return activeAnim.animName; + } + } + + return String(); +} + +int +_ControlAnimatorImpl::GetActiveAnimationListCount(void) const +{ + return __pActiveAnimationList->GetCount(); +} + +int +_ControlAnimatorImpl::GetActiveAnimationListCount(AnimationTargetType animTarget) const +{ + result r = E_SUCCESS; + int count = 0; + + for (int count = __pActiveAnimationList->GetCount() - 1; count >= 0; count--) + { + ActiveAnimation activeAnim; + + r = __pActiveAnimationList->GetAt(count, activeAnim); + SysTryReturn(NID_UI_ANIM, (r == E_SUCCESS), -1, r, "[%s] Failed to retrieve active animation from list.", GetErrorMessage(r)); + + if (activeAnim.animTarget == animTarget) + { + count++; + } + } + + return count; +} + +int +_ControlAnimatorImpl::GetActiveAnimationIndex(const String& animName) const +{ + result r = E_SUCCESS; + + for (int index = 0; index < __pActiveAnimationList->GetCount(); index++) + { + ActiveAnimation activeAnim; + + r = __pActiveAnimationList->GetAt(index, activeAnim); + SysTryReturn(NID_UI_ANIM, (r == E_SUCCESS), -1, r, "[%s] Failed to retrieve animation from the list.", GetErrorMessage(r)); + + if (activeAnim.animName == animName) + { + return index; + } + } + + return -1; +} + +result +_ControlAnimatorImpl::RemoveAnimationAt(int index) +{ + SysTryReturnResult(NID_UI_ANIM, + (index >= 0 && index < __pActiveAnimationList->GetCount()), E_OUT_OF_RANGE, "Index (%d) is out of range.", index); + + result r = E_SUCCESS; + ActiveAnimation activeAnim; + + r = __pActiveAnimationList->GetAt(index, activeAnim); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), r, "Failed to retrieve active animation from list."); + + r = __pActiveAnimationList->Remove(activeAnim); + SysTryReturnResult(NID_UI_ANIM, r == E_SUCCESS, E_SYSTEM, "A system error has been occurred. Failed to remove animation from play list."); + + delete activeAnim.pAnimationBase; + activeAnim.pAnimationBase = null; + delete activeAnim.pBezierTimingFunction; + activeAnim.pBezierTimingFunction = null; + + return r; +} + +result +_ControlAnimatorImpl::RemoveAllAnimations(void) +{ + result r = E_SUCCESS; + + for (int count = __pActiveAnimationList->GetCount() - 1; count >= 0; count--) + { + r = RemoveAnimationAt(count); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_OBJ_NOT_FOUND, "Failed to remove animation. index = %d", count); + } + + return r; +} + +result +_ControlAnimatorImpl::DestroyAnimation(int preActiveAnimationCount) +{ + result r = E_SUCCESS; + + for (int count = GetActiveAnimationListCount() - 1; count >= preActiveAnimationCount; count--) + { + String animName; + + animName = GetActiveAnimationAt(count); + r = __pVisualElement->RemoveAnimation(animName); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), r, "Failed to remove animation. keyName = %ls", animName.GetPointer()); + + if (RemoveAnimationAt(count) != E_SUCCESS) + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to remove animation. index = %d", count); + return E_SYSTEM; + } + } + + return r; +} + +result +_ControlAnimatorImpl::DestroyAnimation(AnimationBase& animBase, AnimationTargetType animTarget) +{ + result r = E_SUCCESS; + + int index = -1; + ActiveAnimation activeAnim; + + activeAnim.animTarget = animTarget; + activeAnim.pAnimationBase = (dynamic_cast< AnimationBase* >(&animBase)); + r = __pActiveAnimationList->IndexOf(activeAnim, index); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), r, "Failed to retrieve active animation from list."); + + r = RemoveAnimationAt(index); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), r, "Failed to remove animation from play list."); + + return r; +} + +result +_ControlAnimatorImpl::StopAllAnimations(void) +{ + result r = E_SUCCESS; + + __pVisualElement->RemoveAllAnimations(); + + return r; +} + +result +_ControlAnimatorImpl::StopAnimation(ControlAnimatorTriggerType animTrigger) +{ + SysTryReturnResult(NID_UI_ANIM, (GetActiveAnimationListCount() > 0), E_SUCCESS, "No active animation."); + + result r = E_SUCCESS; + + for (int index = GetActiveAnimationListCount() - 1; index >= 0; index--) + { + String animName; + + animName = GetActiveAnimationAt(index, animTrigger); + if (animName.IsEmpty() == false) + { + int startIndex = 0; + int indexOfGroup = 0; + if ((animName.IndexOf(GROUP, startIndex, indexOfGroup)) == E_SUCCESS) + { + String groupName; + r = animName.SubString(indexOfGroup, groupName); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Group name is not found."); + + r = __pVisualElement->RemoveAnimation(groupName); + } + else + { + r = __pVisualElement->RemoveAnimation(animName); + } + + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Animation is either running or already removed."); + } + } + + return r; +} + +AnimationBase* +_ControlAnimatorImpl::CloneAnimation(AnimationTargetType animTarget, AnimationBase& animationBase) +{ + AnimationBase* pAnimationBase = null; + + //Comment: Deep copy animation object & pass to SetAnimation, which will store in list of structures + switch (animTarget) + { + case ANIMATION_TARGET_SIZE: + { + DimensionAnimation* pDimAnim = null; + RectangleAnimation* pRectAnim = null; + + pDimAnim = dynamic_cast< DimensionAnimation* >(&animationBase); + pRectAnim = dynamic_cast< RectangleAnimation* >(&animationBase); + SysTryReturn(NID_UI_ANIM, ((pDimAnim) || (pRectAnim)), null, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. Animation is invalid."); + + if (pDimAnim) + { + DimensionAnimation* pDimValue = new (std::nothrow) DimensionAnimation(*pDimAnim); + pAnimationBase = pDimValue; + } + else + { + RectangleAnimation* pRectValue = new (std::nothrow) RectangleAnimation(*pRectAnim); + pAnimationBase = pRectValue; + } + } + break; + + case ANIMATION_TARGET_POSITION: + { + PointAnimation* pPointAnim = null; + RectangleAnimation* pRectAnim = null; + + pPointAnim = dynamic_cast< PointAnimation* >(&animationBase); + pRectAnim = dynamic_cast< RectangleAnimation* >(&animationBase); + SysTryReturn(NID_UI_ANIM, ((pPointAnim) || (pRectAnim)), null, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. Animation is invalid."); + + if (pPointAnim) + { + PointAnimation* pPointValue = new (std::nothrow) PointAnimation(*pPointAnim); + pAnimationBase = pPointValue; + } + else + { + RectangleAnimation* pRectValue = new (std::nothrow) RectangleAnimation(*pRectAnim); + pAnimationBase = pRectValue; + } + } + break; + + case ANIMATION_TARGET_ALPHA: + { + FloatAnimation* pFloatAnim = null; + IntegerAnimation* pIntegerAnim = null; + + pFloatAnim = dynamic_cast< FloatAnimation* >(&animationBase); + pIntegerAnim = dynamic_cast< IntegerAnimation* >(&animationBase); + SysTryReturn(NID_UI_ANIM, ((pFloatAnim) || (pIntegerAnim)), null, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. Animation is invalid."); + + if (pFloatAnim) + { + FloatAnimation* pFloatValue = new (std::nothrow) FloatAnimation(*pFloatAnim); + pAnimationBase = pFloatValue; + } + else + { + IntegerAnimation* pIntegerValue = new (std::nothrow) IntegerAnimation(*pIntegerAnim); + pAnimationBase = pIntegerValue; + } + } + break; + + case ANIMATION_TARGET_ROTATION: + { + RotateAnimation* pRotateAnimation = dynamic_cast< RotateAnimation* >(&animationBase); + SysTryReturn(NID_UI_ANIM, ((pRotateAnimation)), null, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. Animation is invalid."); + + RotateAnimation* pRotateValue = new (std::nothrow) RotateAnimation(*pRotateAnimation); + pAnimationBase = pRotateValue; + } + break; + + default: + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. animTarget is invalid."); + return null; + } + break; + } + + return pAnimationBase; +} + +bool +_ControlAnimatorImpl::IsAnimatable(AnimationTargetType animTarget, Rectangle& bounds, AnimationBase* pAnimationBase, ControlAnimatorTriggerType animTrigger) const +{ + bool animatable = false; + Rectangle endBounds(0, 0, 0, 0); + + endBounds = bounds; + + if (pAnimationBase) + { + if (pAnimationBase->IsHoldEndEnabled() == true) + { + switch (animTarget) + { + case ANIMATION_TARGET_SIZE: + { + if (animTrigger == ANIMATION_TRIGGER_USER) + { + DimensionAnimation* pDimAnim = null; + RectangleAnimation* pRectAnim = null; + + if (pAnimationBase->GetType() == ANIMATION_TYPE_DIMENSION_ANIMATION) + { + pDimAnim = dynamic_cast< DimensionAnimation* >(pAnimationBase); + if (pDimAnim != null) + { + if (pAnimationBase->IsAutoReverseEnabled()) + { + endBounds.width = pDimAnim->GetStartValue().width; + endBounds.height = pDimAnim->GetStartValue().height; + } + else + { + endBounds.width = pDimAnim->GetEndValue().width; + endBounds.height = pDimAnim->GetEndValue().height; + } + } + } + else if (pAnimationBase->GetType() == ANIMATION_TYPE_RECTANGLE_ANIMATION) + { + pRectAnim = dynamic_cast< RectangleAnimation* >(pAnimationBase); + if (pRectAnim != null) + { + if (pAnimationBase->IsAutoReverseEnabled()) + { + endBounds.width = pRectAnim->GetStartValue().width; + endBounds.height = pRectAnim->GetStartValue().height; + } + else + { + endBounds.width = pRectAnim->GetEndValue().width; + endBounds.height = pRectAnim->GetEndValue().height; + } + } + } + else + { + return false; + } + } + + if (!(__pControl->IsResizable())) + { + animatable = false; + } + else + { + //Scale Animation is allowed with any anchor (0,0) when HoldEnd=TRUE & Auto Reverse=FALSE + float ancX = 0.0f; + float ancY = 0.0f; + DimensionAnimation* pDimAnim = dynamic_cast< DimensionAnimation* >(pAnimationBase); + RectangleAnimation* pRectAnim = dynamic_cast< RectangleAnimation* >(pAnimationBase); + + (pDimAnim) ? (pDimAnim->GetAnchor(ancX, ancY)) : (pRectAnim->GetAnchor(ancX, ancY)); + + if ((Float::Compare(ancX, 0.0)) || (Float::Compare(ancY, 0.0))) + { + return false; + } + + //CustomControl Changes + CustomControlBase* pControlBase = dynamic_cast< CustomControlBase* >(__pControl); + + if (pControlBase) + { + Dimension endDimension(endBounds.width, endBounds.height); + __pControlImpl->OnEvaluateSize(endDimension); + } + else + { + Dimension controlMinSize = __pControl->GetMinimumSize(); + SysTryReturn(NID_UI_ANIM, ((endBounds.width >= controlMinSize.width) && (endBounds.height >= controlMinSize.height)), + false, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. end size = (%d, %d)", endBounds.width, endBounds.height); + + Dimension controlMaxSize = __pControl->GetMaximumSize(); + SysTryReturn(NID_UI_ANIM, ((endBounds.width <= controlMaxSize.width) && (endBounds.height <= controlMaxSize.height)), + false, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. end size = (%d, %d)", endBounds.width, endBounds.height); + } + animatable = true; + } + } + break; + + case ANIMATION_TARGET_POSITION: + { + if (animTrigger == ANIMATION_TRIGGER_USER) + { + PointAnimation* pPointAnim = null; + RectangleAnimation* pRectAnim = null; + + if (pAnimationBase->GetType() == ANIMATION_TYPE_POINT_ANIMATION) + { + pPointAnim = dynamic_cast< PointAnimation* >(pAnimationBase); + if (pPointAnim != null) + { + if (pAnimationBase->IsAutoReverseEnabled()) + { + endBounds.x = pPointAnim->GetStartValue().x; + endBounds.y = pPointAnim->GetStartValue().y; + } + else + { + endBounds.x = pPointAnim->GetEndValue().x; + endBounds.y = pPointAnim->GetEndValue().y; + } + } + } + else if (pAnimationBase->GetType() == ANIMATION_TYPE_RECTANGLE_ANIMATION) + { + pRectAnim = dynamic_cast< RectangleAnimation* >(pAnimationBase); + if (pRectAnim != null) + { + if (pAnimationBase->IsAutoReverseEnabled()) + { + endBounds.x = pRectAnim->GetStartValue().x; + endBounds.y = pRectAnim->GetStartValue().y; + } + else + { + endBounds.x = pRectAnim->GetEndValue().x; + endBounds.y = pRectAnim->GetEndValue().y; + } + } + } + else + { + return false; + } + } + + if (!(__pControl->IsMovable())) + { + animatable = false; + } + else + { + //CustomControl Changes + CustomControlBase* pControlBase = dynamic_cast< CustomControlBase* >(__pControl); + + if (pControlBase) + { + __pControlImpl->OnBoundsChanging(endBounds); //check this this API has been changed in 2.1 + } + //Comment. No limit on positive & negative "x" & "y" for the movable %Control's position property + animatable = true; + } + } + break; + + case ANIMATION_TARGET_ALPHA: + { + float endVal = -1.0f; + IntegerAnimation* pIntAnim = null; + FloatAnimation* pFloatAnim = null; + + if (pAnimationBase->GetType() == ANIMATION_TYPE_FLOAT_ANIMATION) + { + pFloatAnim = dynamic_cast< FloatAnimation* >(pAnimationBase); + if (pFloatAnim != null) + { + if (pAnimationBase->IsAutoReverseEnabled()) + { + endVal = pFloatAnim->GetStartValue(); + } + else + { + endVal = pFloatAnim->GetEndValue(); + } + } + } + else if (pAnimationBase->GetType() == ANIMATION_TYPE_INTEGER_ANIMATION) + { + pIntAnim = dynamic_cast< IntegerAnimation* >(pAnimationBase); + if (pIntAnim != null) + { + if (pAnimationBase->IsAutoReverseEnabled()) + { + endVal = (static_cast< float >(pIntAnim->GetStartValue())); + } + else + { + endVal = (static_cast< float >(pIntAnim->GetEndValue())); + } + } + } + else + { + return false; + } + + //removing the code of IsShowStateChangeable + if ((!(Float::Compare(endVal, 1.0))) || (!(Float::Compare(endVal, 0.0)))) + { + animatable = true; + } + else + { + SysLogException(NID_UI_ANIM, E_INVALID_ARG, "Invalid argument(s) is used. End value is invalid."); + return false; + } + + } + break; + + case ANIMATION_TARGET_ROTATION: + { + if (animTrigger == ANIMATION_TRIGGER_USER) + { + RotateAnimation* pRotAnim = null; + if (pAnimationBase->GetType() == ANIMATION_TYPE_ROTATE_ANIMATION) + { + float endVal = -1.0f; + pRotAnim = dynamic_cast< RotateAnimation* >(pAnimationBase); + if (pRotAnim != null) + { + if (pAnimationBase->IsAutoReverseEnabled()) + { + endVal = pRotAnim->GetStartValue(); + } + else + { + endVal = pRotAnim->GetEndValue(); + } + } + int roundingVal = Tizen::Base::Utility::Math::Round((double) endVal); + + if ((!(Float::Compare(endVal, static_cast< float >(roundingVal)))) && (((static_cast< int >(endVal) % 360) == 0))) //check this : Todo + { + animatable = true; + } + else + { + SysLogException(NID_UI_ANIM, E_INVALID_ARG, "Invalid argument(s) is used. End value is invalid."); + return false; + } + } + else + { + SysLogException(NID_UI_ANIM, E_INVALID_ARG, "Invalid argument(s) is used. End value is invalid."); + return false; + } + } + } + break; + + default: + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. animTarget is invalid."); + animatable = false; + } + break; + } + } + else //IsHoldEndEnabled = false + { + animatable = true; + } + } + + return animatable; +} + +result +_ControlAnimatorImpl::DisableImplicitAnimation(bool& state) +{ + bool enable = __pVisualElement->IsImplicitAnimationEnabled(); + __pVisualElement->SetImplicitAnimationEnabled(state); + state = enable; + + return E_SUCCESS; +} + +result +_ControlAnimatorImpl::DisableVisualElementPropagation(bool& state) +{ + bool propagate = _VisualElementImpl::GetInstance(*__pVisualElement)->GetPropertyPropagationEnabled(); + result r = _VisualElementImpl::GetInstance(*__pVisualElement)->SetPropertyPropagationEnabled(state); + state = propagate; + + return r; +} + +result +_ControlAnimatorImpl::SetControlProperty(AnimationTargetType animTarget, AnimationBase& animationBase) +{ + result r = E_SUCCESS; + + if (animationBase.IsHoldEndEnabled() == true) + { + switch (animTarget) + { + case ANIMATION_TARGET_SIZE: + { + DimensionAnimation* pDimAnim = null; + RectangleAnimation* pRectAnim = null; + + pDimAnim = dynamic_cast< DimensionAnimation* >(const_cast< AnimationBase* >(&animationBase)); + pRectAnim = dynamic_cast< RectangleAnimation* >(const_cast< AnimationBase* >(&animationBase)); + SysTryReturnResult(NID_UI_ANIM, ((pDimAnim) || (pRectAnim)), E_INVALID_ARG, "Invalid argument(s) is used. Animation is invalid."); + + if (pDimAnim) + { + Dimension dimVal(0, 0); + + (animationBase.IsAutoReverseEnabled()) ? (dimVal = pDimAnim->GetStartValue()) : (dimVal = pDimAnim->GetEndValue()); + r = (__pControl)->SetSize(dimVal.width, dimVal.height); + } + else //if (pRectAnim) + { + Rectangle rectVal(0, 0, 0, 0); + + (animationBase.IsAutoReverseEnabled()) ? (rectVal = pRectAnim->GetStartValue()) : (rectVal = pRectAnim->GetEndValue()); + r = (__pControl)->SetSize(rectVal.width, rectVal.height); + } + } + break; + + case ANIMATION_TARGET_POSITION: + { + PointAnimation* pPointAnim = null; + RectangleAnimation* pRectAnim = null; + + pPointAnim = dynamic_cast< PointAnimation* >(const_cast< AnimationBase* >(&animationBase)); + pRectAnim = dynamic_cast< RectangleAnimation* >(const_cast< AnimationBase* >(&animationBase)); + SysTryReturnResult(NID_UI_ANIM, ((pPointAnim) || (pRectAnim)), E_INVALID_ARG, "Invalid argument(s) is used. Animation is invalid."); + + if (pPointAnim) + { + Point val(0, 0); + + (animationBase.IsAutoReverseEnabled()) ? (val = pPointAnim->GetStartValue()) : (val = pPointAnim->GetEndValue()); + r = (__pControl)->SetPosition(val.x, val.y); + } + else //if (pRectAnim) + { + Rectangle rectVal(0, 0, 0, 0); + + (animationBase.IsAutoReverseEnabled()) ? (rectVal = pRectAnim->GetStartValue()) : (rectVal = pRectAnim->GetEndValue()); + r = (__pControl)->SetPosition(rectVal.x, rectVal.y); + } + } + break; + + case ANIMATION_TARGET_ALPHA: + { + FloatAnimation* pFloatAnim = null; + IntegerAnimation* pIntegerAnim = null; + + pFloatAnim = dynamic_cast< FloatAnimation* >(const_cast< AnimationBase* >(&animationBase)); + pIntegerAnim = dynamic_cast< IntegerAnimation* >(const_cast< AnimationBase* >(&animationBase)); + SysTryReturnResult(NID_UI_ANIM, ((pFloatAnim) || (pIntegerAnim)), E_INVALID_ARG, "Invalid argument(s) is used. Animation is invalid."); + + if (pFloatAnim) + { + float floatVal = 0.0f; + + (animationBase.IsAutoReverseEnabled()) ? (floatVal = pFloatAnim->GetStartValue()) : (floatVal = pFloatAnim->GetEndValue()); + + if (!(Float::Compare(floatVal, 1.0))) + { + r = __pControl->SetShowState(true); + } + else + { + r = __pControl->SetShowState(false); + } + + } + else //if (pIntegerAnim) + { + int intVal = 0; + + (animationBase.IsAutoReverseEnabled()) ? (intVal = pIntegerAnim->GetStartValue()) : (intVal = pIntegerAnim->GetEndValue()); + + if (intVal == 1) + { + r = __pControl->SetShowState(true); + } + else + { + r = __pControl->SetShowState(false); + } + } + } + break; + + case ANIMATION_TARGET_ROTATION: + { + //Comment: The Control's property will be the same even after the rotate animation is completed. + //So, no need to update the window property. + } + break; + + default: + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. animTarget is invalid."); + return E_SYSTEM; + } + break; + } + } + + if (IsAnimationSupported() == false) + { + _WindowImpl* pWindow = null; + pWindow = _ControlImplManager::GetInstance()->GetCurrentFrame(); + SysTryReturnResult(NID_UI_ANIM, (pWindow), E_SYSTEM, "A system error has been occurred. Failed to get current frame."); + + pWindow->GetPublic().Draw(); + __isAnimationTargetAnimating[animTarget] = false; + } + + return r; +} + +result +_ControlAnimatorImpl::SetControlShowState(AnimationTargetType animTarget, AnimationBase& animationBase) +{ + SysTryReturnResult(NID_UI_ANIM, (animTarget == ANIMATION_TARGET_ALPHA), E_SYSTEM, "animTarget is invalid."); + + if (animationBase.IsHoldEndEnabled() == true) + { + IntegerAnimation* pIntAnim = dynamic_cast< IntegerAnimation* >(const_cast< AnimationBase* >(&animationBase)); + FloatAnimation* pFloatAnim = dynamic_cast< FloatAnimation* >(const_cast< AnimationBase* >(&animationBase)); + + SysTryReturnResult(NID_UI_ANIM, (pIntAnim || pFloatAnim), E_INVALID_ARG, "Invalid argument(s) is used. Animation is invalid."); + + if (pIntAnim) + { + int endVal = -1; + + if (animationBase.IsAutoReverseEnabled() == false) + { + endVal = static_cast< float >(pIntAnim->GetEndValue()); + __showStateHolder = ((endVal == 1) ? (true) : (false)); + } + } + else //if (pFloatAnim) + { + float endVal = -1.0f; + + if (animationBase.IsAutoReverseEnabled() == false) + { + endVal = (static_cast< float >(pFloatAnim->GetEndValue())); + __showStateHolder = (((!(Float::Compare(endVal, 1.0)))) ? (true) : (false)); + } + } + } + + + if ((__pControl->GetShowState() == false) && ((animationBase.IsAutoReverseEnabled()) || (animationBase.IsHoldEndEnabled() == false))) + { + __pVisualElement->SetShowState(true); + __pVisualElement->Draw(); + __pVisualElement->SetShowState(false); + } + + return E_SUCCESS; +} + +result +_ControlAnimatorImpl::SetControlLogicalBounds(AnimationTargetType animTarget, AnimationBase& animationBase) +{ + result r = E_SUCCESS; + + if (animationBase.IsHoldEndEnabled() == true) + { + switch (animTarget) + { + case ANIMATION_TARGET_SIZE: + { + DimensionAnimation* pDimAnim = dynamic_cast< DimensionAnimation* >(const_cast< AnimationBase* >(&animationBase)); + RectangleAnimation* pRectAnim = dynamic_cast< RectangleAnimation* >(const_cast< AnimationBase* >(&animationBase)); + SysTryReturnResult(NID_UI_ANIM, ((pDimAnim) || (pRectAnim)), E_INVALID_ARG, "Invalid argument(s) is used. Animation is invalid."); + + if (pDimAnim) + { + Dimension dimVal(0, 0); + if (animationBase.IsAutoReverseEnabled() == false) + { + dimVal = pDimAnim->GetEndValue(); + __logicalBoundsHolder.width = dimVal.width; + __logicalBoundsHolder.height = dimVal.height; + } + } + else //if (pRectAnim) + { + Rectangle rectVal(0, 0, 0, 0); + if (animationBase.IsAutoReverseEnabled() == false) + { + rectVal = pRectAnim->GetEndValue(); + __logicalBoundsHolder.width = rectVal.width; + __logicalBoundsHolder.height = rectVal.height; + } + } + } + break; + + case ANIMATION_TARGET_POSITION: + { + PointAnimation* pPointAnim = dynamic_cast< PointAnimation* >(const_cast< AnimationBase* >(&animationBase)); + RectangleAnimation* pRectAnim = dynamic_cast< RectangleAnimation* >(const_cast< AnimationBase* >(&animationBase)); + SysTryReturnResult(NID_UI_ANIM, ((pPointAnim) || (pRectAnim)), E_INVALID_ARG, "Invalid argument(s) is used. Animation is invalid."); + + if (pPointAnim) + { + Point val(0, 0); + + if (animationBase.IsAutoReverseEnabled() == false) + { + val = pPointAnim->GetEndValue(); + __logicalBoundsHolder.x = val.x; + __logicalBoundsHolder.y = val.y; + } + } + else + { + Rectangle rectVal(0, 0, 0, 0); + + if (animationBase.IsAutoReverseEnabled() == false) + { + rectVal = pRectAnim->GetEndValue(); + __logicalBoundsHolder.x = rectVal.x; + __logicalBoundsHolder.y = rectVal.y; + } + } + } + break; + + default: + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. animTarget is invalid."); + return E_SYSTEM; + } + break; + } + } + return r; +} + +result +_ControlAnimatorImpl::AddControlAnimatorEventListener(const IControlAnimatorEventListener& listener) +{ + if (__pAnimStatusEventListener == null) + { + __pAnimStatusEventListener = new (std::nothrow) LinkedListT< IControlAnimatorEventListener* >(); + SysTryReturnResult(NID_UI_ANIM, (__pAnimStatusEventListener), E_OUT_OF_MEMORY, "Memory allocation failed."); + } + + IControlAnimatorEventListener* pStatusListener = const_cast< IControlAnimatorEventListener* >(&listener); + + if (__pAnimStatusEventListener->Contains(pStatusListener) == true) + { + return E_OBJ_ALREADY_EXIST; + } + + return __pAnimStatusEventListener->Add(pStatusListener); +} + +result +_ControlAnimatorImpl::RemoveControlAnimatorEventListener(const IControlAnimatorEventListener& listener) +{ + result r = E_SYSTEM; + + if (__pAnimStatusEventListener) + { + return __pAnimStatusEventListener->Remove((const_cast< IControlAnimatorEventListener* >(&listener))); + } + + return r; +} + +result +_ControlAnimatorImpl::AddControlAnimatorDetailedEventListener(const IControlAnimatorDetailedEventListener& listener) +{ + if (__pAnimDetailedEventListener == null) + { + __pAnimDetailedEventListener = new (std::nothrow) LinkedListT< IControlAnimatorDetailedEventListener* >(); + SysTryReturnResult(NID_UI_ANIM, (__pAnimDetailedEventListener), E_OUT_OF_MEMORY, "Memory allocation failed."); + } + + IControlAnimatorDetailedEventListener* pStatusListener = const_cast< IControlAnimatorDetailedEventListener* >(&listener); + + if (__pAnimDetailedEventListener->Contains(pStatusListener) == true) + { + return E_OBJ_ALREADY_EXIST; + } + + return __pAnimDetailedEventListener->Add(pStatusListener); +} + +result +_ControlAnimatorImpl::RemoveControlAnimatorDetailedEventListener(const IControlAnimatorDetailedEventListener& listener) +{ + result r = E_SYSTEM; + + if (__pAnimDetailedEventListener) + { + return __pAnimDetailedEventListener->Remove((const_cast< IControlAnimatorDetailedEventListener* >(&listener))); + } + + return r; +} + +result +_ControlAnimatorImpl::SetPrevAnimationBoundsProperty(AnimationTargetType animTarget, AnimationBase& animationBase) +{ + result r = E_SUCCESS; + + if (animationBase.IsHoldEndEnabled() == true) + { + switch (animTarget) + { + case ANIMATION_TARGET_SIZE: + { + DimensionAnimation* pDimAnim = null; + RectangleAnimation* pRectAnim = null; + pDimAnim = dynamic_cast< DimensionAnimation* >(const_cast< AnimationBase* >(&animationBase)); + pRectAnim = dynamic_cast< RectangleAnimation* >(const_cast< AnimationBase* >(&animationBase)); + SysTryReturnResult(NID_UI_ANIM, ((pDimAnim) || (pRectAnim)), E_INVALID_ARG, "Invalid argument(s) is used. Animation is invalid."); + + if (pDimAnim) + { + Dimension dimVal(0, 0); + (animationBase.IsAutoReverseEnabled()) ? (dimVal = pDimAnim->GetStartValue()) : (dimVal = pDimAnim->GetEndValue()); + __prevAnimationBoundsHolder.width = dimVal.width; + __prevAnimationBoundsHolder.height = dimVal.height; + } + else //if (pRectAnim) + { + Rectangle rectVal(0, 0, 0, 0); + (animationBase.IsAutoReverseEnabled()) ? (rectVal = pRectAnim->GetStartValue()) : (rectVal = pRectAnim->GetEndValue()); + __prevAnimationBoundsHolder.width = rectVal.width; + __prevAnimationBoundsHolder.height = rectVal.height; + } + } + break; + + default: + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. animTarget is invalid."); + return E_SYSTEM; + } + } + + return r; +} + +result +_ControlAnimatorImpl::SetAnimationTargetStatus(ControlAnimatorTriggerType triggerType) +{ + SysTryReturnResult(NID_UI_ANIM, (triggerType >= ANIMATION_TRIGGER_POSITION_CHANGE && triggerType <= ANIMATION_TRIGGER_SHOW_STATE_CHANGE), E_INVALID_ARG, "Invalid argument(s) is used. Animation trigger type is invalid."); + + result r = E_SUCCESS; + ParallelAnimationGroup* pParallelAnimGrp = null; + SequentialAnimationGroup* pSequentialAnimGrp = null; + + if (__propertyAnimationGroupType[triggerType - 1] == PROPERTY_ANIMATION_GROUP_TYPE_SEQUENTIAL) + { + pSequentialAnimGrp = dynamic_cast< SequentialAnimationGroup* >(__pPropertyAnimationGroupList[triggerType - 1]); + if (pSequentialAnimGrp) + { + for (int index = 0; index < pSequentialAnimGrp->GetAnimationCount(); index++) + { + AnimationTargetType _animTarget = pSequentialAnimGrp->GetAnimationTargetTypeAt(index); + SysTryReturnResult(NID_UI_ANIM, ((_animTarget > ANIMATION_TARGET_NONE) && (_animTarget < ANIMATION_TARGET_MAX)), + E_INVALID_ARG, "Invalid argument(s) is used. animTarget is invalid."); + + __isAnimationTargetAnimating[_animTarget] = true; + + if (_animTarget == ANIMATION_TARGET_POSITION || _animTarget == ANIMATION_TARGET_SIZE || _animTarget == ANIMATION_TARGET_ALPHA) + { + AnimationBase* pAnimationBase = null; + + pAnimationBase = pSequentialAnimGrp->GetAnimationAtN(index); + if (pAnimationBase) + { + if (_animTarget == ANIMATION_TARGET_ALPHA) + { + SetControlShowState(_animTarget, *pAnimationBase); + } + else + { + SetControlLogicalBounds(_animTarget, *pAnimationBase); + } + + delete pAnimationBase; + } + } + } + } + } + else if (__propertyAnimationGroupType[triggerType - 1] == PROPERTY_ANIMATION_GROUP_TYPE_PARALLEL) + { + pParallelAnimGrp = dynamic_cast< ParallelAnimationGroup* >(__pPropertyAnimationGroupList[triggerType - 1]); + if (pParallelAnimGrp) + { + for (int index = (static_cast< int >(ANIMATION_TARGET_NONE) + 1); index < (static_cast< int >(ANIMATION_TARGET_MAX)); index++) + { + AnimationTargetType _animTarget = static_cast< AnimationTargetType >(index); + AnimationBase* pAnimBase = null; + + pAnimBase = pParallelAnimGrp->GetAnimationN(_animTarget); + if (pAnimBase != null) + { + SysTryReturnResult(NID_UI_ANIM, ((_animTarget > ANIMATION_TARGET_NONE) && (_animTarget < ANIMATION_TARGET_MAX)), + E_INVALID_ARG, "Invalid argument(s) is used. animTarget is invalid."); + __isAnimationTargetAnimating[_animTarget] = true; + + if (_animTarget == ANIMATION_TARGET_POSITION || _animTarget == ANIMATION_TARGET_SIZE) + { + SetControlLogicalBounds(_animTarget, *pAnimBase); + } + else if (_animTarget == ANIMATION_TARGET_ALPHA) + { + SetControlShowState(_animTarget, *pAnimBase); + } + + delete pAnimBase; + } + } + } + } + //Set Target status playing in case of platform defined Implicit animations + else + { + if (triggerType == ANIMATION_TRIGGER_POSITION_CHANGE) + { + __isAnimationTargetAnimating[ANIMATION_TARGET_POSITION] = true; + } + + if (triggerType == ANIMATION_TRIGGER_SIZE_CHANGE) + { + __isAnimationTargetAnimating[ANIMATION_TARGET_SIZE] = true; + } + + if (triggerType == ANIMATION_TRIGGER_SHOW_STATE_CHANGE) + { + __isAnimationTargetAnimating[ANIMATION_TARGET_ALPHA] = true; + } + } + + return r; +} + +void +_ControlAnimatorImpl::OnVisualElementAnimationStarted(const VisualElementAnimation& animation, const String& keyName, VisualElement& target) +{ + ActiveAnimation activeAnim; + int index = -1; + String animName(0); + + if (keyName.IsEmpty() == true) + { + String* pUserData = (String*) (animation.GetUserData()); + if (pUserData != null) + { + animName = *pUserData; + } + } + else + { + animName = keyName; + } + + index = GetActiveAnimationIndex(animName); + + if (index == -1) + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Animation name mismatch in the playlist."); + return; + } + + if (__pActiveAnimationList->GetAt(index, activeAnim) != E_SUCCESS) + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Animation is not present in the playlist."); + return; + } + + __isAnimationTargetAnimating[activeAnim.animTarget] = true; + + int startIndex = 0; + int indexOf = 0; + + if ((animName.IndexOf(TRANSACTION, startIndex, indexOf)) != E_SUCCESS) + { + //Calling simple listeners registered in this control animator + if (__pAnimStatusEventListener) + { + IControlAnimatorEventListener* pEventListener = null; + for (int count = (__pAnimStatusEventListener->GetCount() - 1); count >= 0; count--) + { + __pAnimStatusEventListener->GetAt(count, pEventListener); + if (pEventListener) + { + pEventListener->OnControlAnimationStarted(*__pControlAnimator, *__pControl); + } + } + } + + //calling detailed event listerners registered in this control animator + if (__pAnimDetailedEventListener) + { + IControlAnimatorDetailedEventListener* pDetailedEventListener = null; + + for (int count = (__pAnimDetailedEventListener->GetCount() - 1); count >= 0; count--) + { + __pAnimDetailedEventListener->GetAt(count, pDetailedEventListener); + + if (pDetailedEventListener) + { + pDetailedEventListener->OnControlAnimationStarted(*__pControlAnimator, *__pControl, activeAnim.animType, activeAnim.animTarget, activeAnim.pAnimationBase); + } + } + } + } +} + +void +_ControlAnimatorImpl::OnVisualElementAnimationRepeated(const VisualElementAnimation& animation, const String& keyName, VisualElement& target, long currentRepeatCount) +{ + ActiveAnimation activeAnim; + int index = -1; + String animName(0); + + if (keyName.IsEmpty() == true) + { + String* pUserData = (String*) (animation.GetUserData()); + + if (pUserData != null) + { + animName = *pUserData; + } + } + else + { + animName = keyName; + } + + index = GetActiveAnimationIndex(animName); + if (index == -1) + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Animation name mismatch in the playlist."); + return; + } + + if (__pActiveAnimationList->GetAt(index, activeAnim) != E_SUCCESS) + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Animation is not present in the playlist."); + return; + } + + int startIndex = 0; + int indexOf = 0; + + if ((animName.IndexOf(TRANSACTION, startIndex, indexOf)) != E_SUCCESS) + { + if (__pAnimDetailedEventListener) + { + IControlAnimatorDetailedEventListener* pDetailedEventListener = null; + + for (int count = (__pAnimDetailedEventListener->GetCount() - 1); count >= 0; count--) + { + __pAnimDetailedEventListener->GetAt(count, pDetailedEventListener); + + if (pDetailedEventListener) + { + pDetailedEventListener->OnControlAnimationRepeated(*__pControlAnimator, *__pControl, activeAnim.animType, activeAnim.animTarget, activeAnim.pAnimationBase, currentRepeatCount); + } + } + } + } +} + +void +_ControlAnimatorImpl::OnVisualElementAnimationFinished(const VisualElementAnimation& animation, const String& keyName, VisualElement& target, bool completedNormally) +{ + String animName(0); + + if (keyName.IsEmpty() == true) + { + String* pUserData = (String*) (animation.GetUserData()); + + if (pUserData != null) + { + animName = *pUserData; + delete pUserData; + pUserData = null; + } + } + else + { + animName = keyName; + } + + _VisualElementImpl* pPresentationImpl = _VisualElementImpl::GetInstance(*const_cast(__pVisualElement->AcquirePresentationInstance())); + + if (pPresentationImpl == null) + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Screen is not updated with end values."); + } + else + { + VisualElementValueAnimation* pValueAnimation = dynamic_cast< VisualElementValueAnimation* >(const_cast< VisualElementAnimation* >(&animation)); + VisualElementPropertyAnimation* pAnimation = dynamic_cast< VisualElementPropertyAnimation* >(const_cast< VisualElementAnimation* >(&animation)); + + if (completedNormally == false || (pValueAnimation && pValueAnimation->IsEndValueApplied() == false)) + { + if (pAnimation) + { + String propName = pAnimation->GetPropertyName(); + + int startIndex = 0; + int indexOf = 0; + result r = E_SUCCESS; + + if ((propName.IndexOf(VeSubPropBoundsPosition, startIndex, indexOf)) == E_SUCCESS) + { + r = pPresentationImpl->SetProperty(VeSubPropBoundsPosition, FloatPoint(__pVisualElement->GetBounds().x, __pVisualElement->GetBounds().y)); + } + else if ((propName.IndexOf(VePropBounds, startIndex, indexOf)) == E_SUCCESS) + { + r = pPresentationImpl->SetProperty(VePropBounds, __pVisualElement->GetBounds()); + } + else if ((propName.IndexOf(VeSubPropTransformRotationZ, startIndex, indexOf)) == E_SUCCESS) + { + r = pPresentationImpl->SetProperty(VePropTransform, __pVisualElement->GetTransformMatrix()); + } + else if ((propName.IndexOf(VePrivPropShowOpacity, startIndex, indexOf)) == E_SUCCESS) + { + r = pPresentationImpl->SetProperty(VePropShowState, __pVisualElement->GetShowState()); + } + + if (r != E_SUCCESS) + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Screen is not updated with end values."); + } + } + else if (pValueAnimation) + { + pPresentationImpl->SetProperty(VePropBounds, __pVisualElement->GetBounds()); + } + } + } + + __pVisualElement->ReleasePresentationInstance(); + + ActiveAnimation activeAnim; + int index = -1; + + index = GetActiveAnimationIndex(animName); + + if (index == -1) + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Animation name mismatch in the playlist."); + return; + } + + if (__pActiveAnimationList->GetAt(index, activeAnim) != E_SUCCESS) + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Animation is not present in the playlist."); + return; + } + + int startIndex = 0; + int indexOf = 0; + + __isAnimationTargetAnimating[activeAnim.animTarget] = false; + + if (GetActiveAnimationListCount() == 1) + { + __pControlImpl->GetCore().AdjustAbsoluteBounds(); + } + + if ((animName.IndexOf(TRANSACTION, startIndex, indexOf)) != E_SUCCESS) + { + if (__pAnimStatusEventListener) + { + IControlAnimatorEventListener* pCaEventListener = null; + + for (int count = (__pAnimStatusEventListener->GetCount() - 1); count >= 0; count--) + { + __pAnimStatusEventListener->GetAt(count, pCaEventListener); + if (pCaEventListener) + { + if (completedNormally) + { + pCaEventListener->OnControlAnimationFinished(*__pControlAnimator, *__pControl); + } + else + { + pCaEventListener->OnControlAnimationStopped(*__pControlAnimator, *__pControl); + } + } + } + } + + //Calling detailed event listeners + if (__pAnimDetailedEventListener) + { + IControlAnimatorDetailedEventListener* pDetailedEventListener = null; + + for (int count = (__pAnimDetailedEventListener->GetCount() - 1); count >= 0; count--) + { + __pAnimDetailedEventListener->GetAt(count, pDetailedEventListener); + + if (pDetailedEventListener) + { + if (completedNormally) + { + pDetailedEventListener->OnControlAnimationFinished(*__pControlAnimator, *__pControl, activeAnim.animType, activeAnim.animTarget, activeAnim.pAnimationBase); + } + else + { + pDetailedEventListener->OnControlAnimationStopped(*__pControlAnimator, *__pControl, activeAnim.animType, activeAnim.animTarget, activeAnim.pAnimationBase); + } + } + } + } + } + + RemoveAnimationAt(index); +} + +void +_ControlAnimatorImpl::OnTickOccurred(const VisualElementAnimation& animation, const String& keyName, VisualElement& target, const Variant& currentValue) +{ + VisualElementValueAnimation* pAnimation = dynamic_cast< VisualElementValueAnimation* >(const_cast< VisualElementAnimation* >(&animation)); + VisualElement* pPresentation = const_cast< VisualElement* >(target.AcquirePresentationInstance()); + + if (pPresentation && pAnimation) + { + float diffX = 0.0f; + float diffY = 0.0f; + + 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 = currentValue.ToFloatRectangle().x; + diffY = currentValue.ToFloatRectangle().y; + } + + Variant newBounds(FloatRectangle(diffX, diffY, currentValue.ToFloatRectangle().width, currentValue.ToFloatRectangle().height)); + _VisualElementImpl::GetInstance(*pPresentation)->SetProperty(VePropBounds, newBounds); + } + else + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to get presentation instance of visual element."); + } + + target.ReleasePresentationInstance(); +} + +const _ControlAnimatorImpl* +_ControlAnimatorImpl::GetInstance(ControlAnimator& element) +{ + return element._pControlAnimatorImpl; +} + +result +_ControlAnimatorImpl::SetSize(float width, float height, int duration, AnimationInterpolatorType animInterpolator) +{ + SysTryReturnResult(NID_UI_ANIM, (IsAnimationTargetAnimating(ANIMATION_TARGET_SIZE) == false), E_INVALID_OPERATION, "Same AnimationTargetType is already being animated."); + SysTryReturnResult(NID_UI_ANIM, ((width > 0) && (height > 0)), E_INVALID_ARG, "Invalid argument(s) is used. width = %f, height = %f", width, height); + + result r = E_SUCCESS; + Control& controlRef = GetControl(); + FloatDimension newSize = FloatDimension(width, height); + FloatDimension currentSize = controlRef.GetSizeF(); + + SysTryReturnResult(NID_UI_ANIM, (controlRef.IsResizable()), E_UNSUPPORTED_OPERATION, "Bounds cannot be modified."); + + //CustomControl s Condition check + CustomControlBase* pControlBase = dynamic_cast< CustomControlBase* >(&controlRef); + + if (pControlBase) + { + FloatDimension dim(width, height); + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(GetControl()); + pControlImpl->OnEvaluateSize(dim); + } + else + { + SysTryReturnResult(NID_UI_ANIM, !((width < controlRef.GetMinimumSize().width) || + (height < controlRef.GetMinimumSize().height) || + (width > controlRef.GetMaximumSize().width) || + (height > controlRef.GetMaximumSize().height)), E_UNSUPPORTED_OPERATION, "Bounds cannot be modified."); + } + + + int activeAnimationCount = GetActiveAnimationListCount(); + + + if (currentSize == newSize) + { + return E_SUCCESS; + } + + + if (IsAnimationSupported() == false) + { + r = __pControl->SetSize(width, height); + if (r != E_SUCCESS) + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to set control property."); + r = E_SYSTEM; + } + + + return r; + } + else + { + bool disable = false; + bool propagation = false; + + result r = DisableImplicitAnimation(disable); + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to disable/enable implicit animation."); + + 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 = controlRef.SetSize(width, height); + + if (propagation) + { + DisableVisualElementPropagation(propagation); + } + if (disable) + { + DisableImplicitAnimation(disable); + } + + 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)); + } + + SetAnimationTargetStatus(ANIMATION_TRIGGER_SIZE_CHANGE); + + return r; + +CATCH: + + SysTryReturnResult(NID_UI_ANIM, (DestroyAnimation(activeAnimationCount) == E_SUCCESS), + E_SYSTEM, "A system error has been occurred. Failed to destroy animation."); + + return r; +} + +result +_ControlAnimatorImpl::SetPosition(float x, float y, int duration, AnimationInterpolatorType animInterpolator) +{ + SysLogException(NID_UI_ANIM, E_SYSTEM, "_ControlAnimatorImpl::SetPosition"); + SysTryReturnResult(NID_UI_ANIM, (IsAnimationTargetAnimating(ANIMATION_TARGET_POSITION) == false), E_INVALID_OPERATION, "Same AnimationTargetType is already being animated."); + + result r = E_SUCCESS; + + Control& controlRef = GetControl(); + + FloatPoint newPosition = FloatPoint(x, y); + FloatPoint currentPosition = controlRef.GetPositionF(); + + SysTryReturnResult(NID_UI_ANIM, (controlRef.IsMovable()), E_UNSUPPORTED_OPERATION, "Bounds cannot be modified."); + + //CustomControl s Condition check + CustomControlBase* pControlBase = dynamic_cast< CustomControlBase* >(&controlRef); + + if (pControlBase) + { + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(GetControl()); + pControlImpl->OnBoundsChanging(FloatRectangle(x, y, controlRef.GetWidthF(), controlRef.GetHeightF())); + } + + int activeAnimationCount = GetActiveAnimationListCount(); + + if (currentPosition == newPosition) + { + return E_SUCCESS; + } + + + if (!(__pControl->IsMovable())) + { + SysLogException(NID_UI_ANIM, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. Control is not Movable."); + return E_INVALID_ARG; + } + if (IsAnimationSupported() == false) + { + r = __pControl->SetPosition(x, y); + if (r != E_SUCCESS) + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to set control property."); + r = E_SYSTEM; + } + + + return r; + } + else + { + bool disable = false; + bool propagation = false; + + result r = DisableImplicitAnimation(disable); + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to disable/enable implicit animation."); + + 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 = controlRef.SetPosition(x, y); + + if (propagation) + { + DisableVisualElementPropagation(propagation); + } + if (disable) + { + DisableImplicitAnimation(disable); + } + + 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)); + } + + SetAnimationTargetStatus(ANIMATION_TRIGGER_POSITION_CHANGE); + + return r; + +CATCH: + SysTryReturnResult(NID_UI_ANIM, (DestroyAnimation(activeAnimationCount) == E_SUCCESS), + E_SYSTEM, "A system error has been occurred. Failed to destroy animation."); + + return r; +} + +result +_ControlAnimatorImpl::SetBounds(FloatRectangle bounds, int duration, AnimationInterpolatorType animInterpolator) +{ + SysLogException(NID_UI_ANIM, E_SYSTEM, "_ControlAnimatorImpl::SetPosition"); + SysTryReturnResult(NID_UI_ANIM, (IsAnimationTargetAnimating(ANIMATION_TARGET_SIZE) == false), E_INVALID_OPERATION, "Same AnimationTargetType is already being animated."); + SysTryReturnResult(NID_UI_ANIM, ((bounds.width > 0) && (bounds.height > 0)), E_INVALID_ARG, "Invalid argument(s) is used. width = %f, height = %f", bounds.width, bounds.height); + + result r = E_SUCCESS; + + Control& controlRef = GetControl(); + FloatPoint newPosition = FloatPoint(bounds.x, bounds.y); + FloatPoint currentPosition = controlRef.GetPositionF(); + + FloatDimension newSize = FloatDimension(bounds.width, bounds.height); + FloatDimension currentSize = controlRef.GetSizeF(); + + SysTryReturnResult(NID_UI_ANIM, (controlRef.IsResizable()), E_UNSUPPORTED_OPERATION, "Bounds cannot be modified."); + + //CustomControl s Condition check + CustomControlBase* pControlBase = dynamic_cast< CustomControlBase* >(&controlRef); + + if (pControlBase) + { + FloatDimension dim(bounds.width, bounds.height); + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(GetControl()); + pControlImpl->OnEvaluateSize(dim); + } + else + { + SysTryReturnResult(NID_UI_ANIM, !((bounds.width < controlRef.GetMinimumSize().width) || + (bounds.height < controlRef.GetMinimumSize().height) || + (bounds.width > controlRef.GetMaximumSize().width) || + (bounds.height > controlRef.GetMaximumSize().height)), E_UNSUPPORTED_OPERATION, "Bounds cannot be modified."); + } + + + int activeAnimationCount = GetActiveAnimationListCount(); + + + if (currentSize == newSize) + { + return E_SUCCESS; + } + + + if (IsAnimationSupported() == false) + { + r = __pControl->SetSize(bounds.width, bounds.height); + if (r != E_SUCCESS) + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to set control property."); + r = E_SYSTEM; + } + + + return r; + } + else + { + bool disable = false; + bool propagation = false; + + result r = DisableImplicitAnimation(disable); + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to disable/enable implicit animation."); + + 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 = controlRef.SetSize(bounds.width, bounds.height); + + if (propagation) + { + DisableVisualElementPropagation(propagation); + } + if (disable) + { + DisableImplicitAnimation(disable); + } + + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , E_SYSTEM, "[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)); + } + + SetAnimationTargetStatus(ANIMATION_TRIGGER_SIZE_CHANGE); + + SysTryReturnResult(NID_UI_ANIM, (IsAnimationTargetAnimating(ANIMATION_TARGET_POSITION) == false), E_INVALID_OPERATION, "Same AnimationTargetType is already being animated."); + SysTryReturnResult(NID_UI_ANIM, (controlRef.IsMovable()), E_UNSUPPORTED_OPERATION, "Bounds cannot be modified."); + + if (pControlBase) + { + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(GetControl()); + pControlImpl->OnBoundsChanging(FloatRectangle(bounds.x, bounds.y, controlRef.GetWidthF(), controlRef.GetHeightF())); + } + + if (currentPosition == newPosition) + { + return E_SUCCESS; + } + + if (!(__pControl->IsMovable())) + { + SysLogException(NID_UI_ANIM, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. Control is not Movable."); + return E_INVALID_ARG; + } + if (IsAnimationSupported() == false) + { + r = __pControl->SetPosition(bounds.x, bounds.y); + if (r != E_SUCCESS) + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to set control property."); + r = E_SYSTEM; + } + + return r; + } + else + { + bool disable = false; + bool propagation = false; + + result r = DisableImplicitAnimation(disable); + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to disable/enable implicit animation."); + + 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 = controlRef.SetPosition(bounds.x, bounds.y); + + if (propagation) + { + DisableVisualElementPropagation(propagation); + } + if (disable) + { + DisableImplicitAnimation(disable); + } + + 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)); + } + + SetAnimationTargetStatus(ANIMATION_TRIGGER_POSITION_CHANGE); + return r; + +CATCH: + SysTryReturnResult(NID_UI_ANIM, (DestroyAnimation(activeAnimationCount) == E_SUCCESS), + E_SYSTEM, "A system error has been occurred. Failed to destroy animation."); + + return r; +} + +result +_ControlAnimatorImpl::SetAnimationF(AnimationTargetType animTarget, ControlAnimatorTriggerType triggerType, int duration, AnimationInterpolatorType animInterpolator, Variant startValue, Variant endValue) +{ + result r = E_SUCCESS; + String animIdentifier; + const IVisualElementAnimationTimingFunction* pTimingFunction = null; + BezierTimingFunction* pBezierTimingFunction = null; + AnimationBase* pAnimationBase = null; + + SysTryReturnResult(NID_UI_ANIM, (animTarget > ANIMATION_TARGET_NONE && animTarget < ANIMATION_TARGET_ROTATION), E_INVALID_ARG, "Invalid argument(s) is used. animTarget is invalid."); + SysTryReturnResult(NID_UI_ANIM, (!(__isAnimationTargetAnimating[animTarget])), E_INVALID_OPERATION, "Same AnimationTargetType is being animated."); + + switch (animInterpolator) + { + case ANIMATION_INTERPOLATOR_LINEAR: + { + pTimingFunction = VisualElementAnimation::GetTimingFunctionByName(INTERPOLATOR_LINEAR); + } + break; + + case ANIMATION_INTERPOLATOR_EASE_IN: + { + pTimingFunction = VisualElementAnimation::GetTimingFunctionByName(INTERPOLATOR_EASEIN); + } + break; + + case ANIMATION_INTERPOLATOR_EASE_OUT: + { + pTimingFunction = VisualElementAnimation::GetTimingFunctionByName(INTERPOLATOR_EASEOUT); + } + break; + + case ANIMATION_INTERPOLATOR_EASE_IN_OUT: + { + pTimingFunction = VisualElementAnimation::GetTimingFunctionByName(INTERPOLATOR_EASEINOUT); + } + break; + + case ANIMATION_INTERPOLATOR_DISCRETE: + { + pTimingFunction = VisualElementAnimation::GetTimingFunctionByName(INTERPOLATOR_DISCRETE); + } + break; + + case ANIMATION_INTERPOLATOR_BEZIER: + { + float cpTime1 = 0.0; + float cpValue1 = 0.0; + float cpTime2 = 0.0; + float cpValue2 = 0.0; + + PointAnimation dummyAnimation(Point(0,0), Point(0,100), 400, ANIMATION_INTERPOLATOR_LINEAR); + r = dummyAnimation.GetBezierControlPoints(cpTime1, cpValue1, cpTime2, cpValue2); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to get bezier points."); + + pBezierTimingFunction = new (std::nothrow) BezierTimingFunction(); + SysTryReturnResult(NID_UI_ANIM, (pBezierTimingFunction), E_OUT_OF_MEMORY, "Memory allocation failed."); + + pBezierTimingFunction->SetControlPoints(cpTime1, cpValue1, cpTime2, cpValue2); + pTimingFunction = pBezierTimingFunction; + + } + break; + } + + SysTryReturnResult(NID_UI_ANIM, (pTimingFunction != null), E_OUT_OF_MEMORY, "Memory allocation failed."); + + VisualElementPropertyAnimation* pAnimation = null; + VisualElementValueAnimation* pBoundsAnimation = null; + VisualElementValueAnimation* pBaseAnimation = null; + + if (animTarget == ANIMATION_TARGET_SIZE) + { + pBoundsAnimation = new (std::nothrow) VisualElementValueAnimation(); //deletion will happen in catch/ in Destroy animation + SysTryCatch(NID_UI_ANIM, (pBoundsAnimation), r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pBoundsAnimation->SetTimingFunction(pTimingFunction); + } + else + { + pAnimation = new (std::nothrow) VisualElementPropertyAnimation(); //deletion will happen in catch/ in Destroy animation + SysTryCatch(NID_UI_ANIM, (pAnimation), r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pAnimation->SetTimingFunction(pTimingFunction); + } + + switch (animTarget) + { + case ANIMATION_TARGET_SIZE: + { + float startWidth = startValue.ToFloatDimension().width; + float startHeight = startValue.ToFloatDimension().height; + float endWidth = endValue.ToFloatDimension().width; + float endHeight = endValue.ToFloatDimension().height; + + FloatRectangle presentationBounds = const_cast((__pVisualElement)->AcquirePresentationInstance())->GetBounds(); + FloatRectangle modelBounds = __pVisualElement->GetBounds(); + + __presentationBounds = modelBounds; + + float startX = presentationBounds.x; + float startY = presentationBounds.y; + + float endX = modelBounds.x; + float endY = modelBounds.y; + + pBoundsAnimation->SetStartValue(Variant(FloatRectangle(startX, startY, startWidth, startHeight))); + pBoundsAnimation->SetEndValue(Variant(FloatRectangle(endX, endY, endWidth, endHeight))); + pBoundsAnimation->SetVisualElementAnimationTickEventListener(this); + animIdentifier.Append(DIMENSION); + + __pVisualElement->ReleasePresentationInstance(); + } + break; + + case ANIMATION_TARGET_POSITION: + { + FloatPoint controlPos; + float absStartX = 0.0f; + float absStartY = 0.0f; + float absEndX = 0.0f; + float absEndY = 0.0f; + + controlPos = __pControl->GetPositionF(); + + FloatPoint parentPosition(0, 0); + + if (__pControlImpl->GetParent()) + { + parentPosition.x = __pControlImpl->GetParent()->GetClientBoundsF().x; + parentPosition.y = __pControlImpl->GetParent()->GetClientBoundsF().y; + } + + absStartX = parentPosition.x + startValue.ToFloatPoint().x; + absStartY = parentPosition.y + startValue.ToFloatPoint().y; + + absEndX = parentPosition.x + endValue.ToFloatPoint().x; + absEndY = parentPosition.y + endValue.ToFloatPoint().y; + + pAnimation->SetPropertyName(VeSubPropBoundsPosition); + + Variant startPosition(FloatPoint(absStartX, absStartY)); + Variant endPosition(FloatPoint(absEndX, absEndY)); + + pAnimation->SetStartValue(startPosition); + pAnimation->SetEndValue(endPosition); + animIdentifier.Append(POSITION); + } + break; + + case ANIMATION_TARGET_ALPHA: + { + pAnimation->SetPropertyName(VePrivPropShowOpacity); + + pAnimation->SetStartValue(startValue); + pAnimation->SetEndValue(endValue); + animIdentifier.Append(ALPHA); + } + break; + + default: + SysAssertf(false, "Animation type is invalid!"); + break; + } + + if (animTarget == ANIMATION_TARGET_SIZE) + { + pBaseAnimation = pBoundsAnimation; + } + else + { + pBaseAnimation = pAnimation; + } + + //Set the Animation values and start the Animation + pBaseAnimation->SetDuration(duration); + pBaseAnimation->SetVisualElementAnimationStatusEventListener(this); + + animIdentifier.Append(__animationId); + __animationId++; + + r = __pVisualElement->AddAnimation(animIdentifier, *pBaseAnimation); + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Animation could not be started."); + r = AddActiveAnimation(animTarget, *pAnimationBase, *pBaseAnimation, triggerType, animIdentifier, pBezierTimingFunction); + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Animation could not be added to playlist."); + + delete pAnimation; + return r; + +CATCH: + delete pAnimation; + delete pBoundsAnimation; + delete pBezierTimingFunction; + + return r; +} +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnim_ControlAnimatorImpl.h b/src/ui/animations/FUiAnim_ControlAnimatorImpl.h new file mode 100644 index 0000000..20fb0f0 --- /dev/null +++ b/src/ui/animations/FUiAnim_ControlAnimatorImpl.h @@ -0,0 +1,280 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_ControlAnimatorImpl.h + * @brief Header file of _ControlAnimatorImpl class + * + * This file contains declarations _ControlAnimatorImpl class. + */ + +#ifndef _FUI_ANIM_INTERNAL_CONTROL_ANIMATOR_IMPL_H_ +#define _FUI_ANIM_INTERNAL_CONTROL_ANIMATOR_IMPL_H_ + +#include +#include +#include +#include +#include + +#include "FUi_ControlImpl.h" + + +namespace Tizen { namespace Ui { namespace Animations +{ + +class VisualElement; +class BezierTimingFunction; + +#define INTERPOLATOR_LINEAR L"Linear" +#define INTERPOLATOR_EASEIN L"EaseIn" +#define INTERPOLATOR_EASEOUT L"EaseOut" +#define INTERPOLATOR_EASEINOUT L"EaseInOut" +#define INTERPOLATOR_DISCRETE L"Discrete" +#define INTERPOLATOR_BEZIER L"Bezier" + +enum StoredPropertyAnimationGroupType +{ + PROPERTY_ANIMATION_GROUP_TYPE_NONE, + PROPERTY_ANIMATION_GROUP_TYPE_PARALLEL, + PROPERTY_ANIMATION_GROUP_TYPE_SEQUENTIAL +}; + +class _ControlAnimatorImpl + : public Tizen::Base::Object + , public Tizen::Ui::Animations::IVisualElementAnimationStatusEventListener + , public Tizen::Ui::Animations::IVisualElementAnimationTickEventListener + , virtual public Tizen::Base::Runtime::IEventListener +{ +public: + static const _ControlAnimatorImpl* GetInstance(ControlAnimator& element); + _ControlAnimatorImpl(ControlAnimator* pAnimator); + ~_ControlAnimatorImpl(void); + + _ControlAnimatorImpl(const _ControlAnimatorImpl& rhs); + _ControlAnimatorImpl& operator =(const _ControlAnimatorImpl& rhs); + + result Construct(const Control& control); + result Dispose(void); + + bool IsAnimationSupported(void) const; + + result SetAnimation(AnimationTargetType animTarget, AnimationBase& animationBase, ControlAnimatorTriggerType animType = ANIMATION_TRIGGER_USER, VisualElementAnimationGroup* pAnimGroup = null); + result SetKeyFrameAnimation(AnimationTargetType animTarget, AnimationBase* pAnimationBase, const IVisualElementAnimationTimingFunction* pTimingFunction, VisualElementAnimation* pAnimation); + result SetGroupAnimation(AnimationGroup* pAnimGrp); + + result StartCustomImplicitAnimation(ControlAnimatorTriggerType triggerType, int x, int y, int width, int height, bool showState); + result SetCustomImplicitAnimationParams(ControlAnimatorTriggerType triggerType, AnimationBase& animationBase, Tizen::Graphics::Rectangle& bounds, bool showState, bool lastTargetOccurence = false); + + result AddActiveAnimation(AnimationTargetType animTarget, AnimationBase& animBase, Tizen::Ui::Animations::VisualElementAnimation& animNative, ControlAnimatorTriggerType triggerType, const Tizen::Base::String& animName, BezierTimingFunction* pBezierTiming); + Tizen::Base::String GetActiveAnimationAt(int index) const; + Tizen::Base::String GetActiveAnimationAt(int index, ControlAnimatorTriggerType animTrigger) const; + int GetActiveAnimationIndex(const Tizen::Base::String& animName) const; + int GetActiveAnimationListCount(AnimationTargetType animTarget) const; + int GetActiveAnimationListCount(void) const; + + result RemoveAnimationAt(int index); + result RemoveAllAnimations(void); + + result DestroyAnimation(int preActiveAnimationCount); + result DestroyAnimation(AnimationBase& animBase, AnimationTargetType animTarget); + + result StopAllAnimations(void); + result StopAnimation(ControlAnimatorTriggerType animTrigger); + + AnimationBase* CloneAnimation(AnimationTargetType animTarget, AnimationBase& animationBase); + + bool IsAnimatable(AnimationTargetType animTarget, Tizen::Graphics::Rectangle& rect, AnimationBase* pAnimationBase = null + , ControlAnimatorTriggerType animTrigger = ANIMATION_TRIGGER_USER) const; + + result AddControlAnimatorEventListener(const IControlAnimatorEventListener& listener); + result RemoveControlAnimatorEventListener(const IControlAnimatorEventListener& listener); + + result AddControlAnimatorDetailedEventListener(const IControlAnimatorDetailedEventListener& listener); + result RemoveControlAnimatorDetailedEventListener(const IControlAnimatorDetailedEventListener& listener); + + result SetPrevAnimationBoundsProperty(AnimationTargetType animTarget, AnimationBase& animationBase); + result SetAnimationTargetStatus(ControlAnimatorTriggerType triggerType); + + result DisableImplicitAnimation(bool& state); + result DisableVisualElementPropagation(bool& state); + + result SetControlProperty(AnimationTargetType animTarget, AnimationBase& animationBase); + result SetControlLogicalBounds(AnimationTargetType animTarget, AnimationBase& animationBase); + result SetControlShowState(AnimationTargetType animTarget, AnimationBase& animationBase); + + result SetPosition(float x, float y, int duration = 250, AnimationInterpolatorType animInterpolator = ANIMATION_INTERPOLATOR_LINEAR); + result SetSize(float width, float height, int duration = 250, AnimationInterpolatorType animInterpolator = ANIMATION_INTERPOLATOR_LINEAR); + result SetBounds(Tizen::Graphics::FloatRectangle bounds, int duration = 250, AnimationInterpolatorType animInterpolator = ANIMATION_INTERPOLATOR_LINEAR); + result SetAnimationF(AnimationTargetType animTarget, ControlAnimatorTriggerType triggerType, int duration, AnimationInterpolatorType animInterpolator, Variant startValue, Variant endValue); + + Tizen::Graphics::Rectangle + GetLogicalBounds(void) const + { + return __logicalBoundsHolder; + } + + void + SetLogicalBounds(Tizen::Graphics::Rectangle rect) + { + __logicalBoundsHolder = rect; + } + + bool GetShowState(void) const + { + return __showStateHolder; + } + + void + SetShowState(bool showState) + { + __showStateHolder = showState; + } + + Control& + GetControl(void) const + { + return *__pControl; + } + + void + SetControl(Control& control) + { + __pControl = &control; + } + + AnimatorStatus + GetAnimatorStatus(void) const + { + return __animatorStatus; + } + + void + SetAnimatorStatus(AnimatorStatus animatorStatus) + { + __animatorStatus = animatorStatus; + } + + void + SetAnimationTargetAnimating(int target, bool animating) + { + __isAnimationTargetAnimating[target] = animating; + } + + bool + IsAnimationTargetAnimating(int target) const + { + return __isAnimationTargetAnimating[target]; + } + + StoredPropertyAnimationGroupType + GetStoredPropertyAnimationGroupType(int triggerType) const + { + return __propertyAnimationGroupType[triggerType]; + } + + void + SetStoredPropertyAnimationGroupType(int triggerType, StoredPropertyAnimationGroupType groupType) + { + // triggerType is ControlAnimatorTriggerType - 1 + __propertyAnimationGroupType[triggerType] = groupType; + } + + AnimationGroup* + GetPropertyGroupList(int triggerType) const + { + return __pPropertyAnimationGroupList[triggerType]; + } + + void + SetPropertyGroupList(int triggerType, AnimationGroup* animGroup) + { + __pPropertyAnimationGroupList[triggerType] = animGroup; + } + + void OnVisualElementAnimationStarted(const VisualElementAnimation& animation, const Tizen::Base::String& keyName, VisualElement& target); + void OnVisualElementAnimationRepeated(const VisualElementAnimation& animation, const Tizen::Base::String& keyName, VisualElement& target, long currentRepeatCount); + void OnVisualElementAnimationFinished(const VisualElementAnimation& animation, const Tizen::Base::String& keyName, VisualElement& target, bool completedNormally); + + void OnTickOccurred(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, const Tizen::Ui::Variant& currentValue); + +private: + struct ActiveAnimation + { + ControlAnimatorTriggerType animType; + AnimationTargetType animTarget; + AnimationBase* pAnimationBase; + Tizen::Base::String animName; + Tizen::Ui::Animations::BezierTimingFunction* pBezierTimingFunction; + + ActiveAnimation(void) + { + animTarget = ANIMATION_TARGET_NONE; + animType = ANIMATION_TRIGGER_USER; + pAnimationBase = null; + animName = Tizen::Base::String(""); + pBezierTimingFunction = null; + } + ~ActiveAnimation(void) + { + } + bool operator ==(const ActiveAnimation& rhs) const; + bool operator !=(const ActiveAnimation& rhs) const; + }; + + Tizen::Base::Collection::ArrayListT< ActiveAnimation >* __pActiveAnimationList; + + //@remark: This object need not be deleted in ControlAnimator scope + Tizen::Ui::Control* __pControl; + Tizen::Ui::_ControlImpl* __pControlImpl; + Tizen::Ui::Animations::ControlAnimator* __pControlAnimator; + Tizen::Ui::Animations::VisualElement* __pVisualElement; + + AnimatorStatus __animatorStatus; + + Tizen::Graphics::Rectangle __logicalBoundsHolder; + bool __showStateHolder; + + Tizen::Graphics::Rectangle __prevAnimationBoundsHolder; + Tizen::Graphics::FloatRectangle __presentationBounds; + + bool __isAnimationTargetAnimating[ANIMATION_TARGET_MAX]; + + StoredPropertyAnimationGroupType __propertyAnimationGroupType[ANIMATION_TRIGGER_SHOW_STATE_CHANGE]; + Tizen::Ui::Animations::AnimationGroup* __pPropertyAnimationGroupList[ANIMATION_TRIGGER_SHOW_STATE_CHANGE]; + + // Holder for number of animations of same TargetType in AnimationGroupSequential + int __targetCount; + + // sequentialGroupAnimation or parallel Animation group + bool __sequentialGroupAnimation; + float __sequetialGroupAnimationDelay; + + Tizen::Base::Collection::LinkedListT< IControlAnimatorEventListener* >* __pAnimStatusEventListener; + Tizen::Base::Collection::LinkedListT< IControlAnimatorDetailedEventListener* >* __pAnimDetailedEventListener; + + // This is Id or each animation + int __animationId; + + Tizen::Base::String __groupName; + + friend class Tizen::Ui::Control; +}; // _ControlAnimatorImpl + +}}} // Tizen::Ui::Animations + +#endif //_FUI_ANIM_INTERNAL_CONTROL_ANIMATOR_IMPL_H_ diff --git a/src/ui/animations/FUiAnim_ControlVisualElement.cpp b/src/ui/animations/FUiAnim_ControlVisualElement.cpp new file mode 100644 index 0000000..0bc1667 --- /dev/null +++ b/src/ui/animations/FUiAnim_ControlVisualElement.cpp @@ -0,0 +1,343 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_ControlVisualElement.cpp + * @brief This file contains implementation of _ControlVisualElement class + * + * This file contains implementation _ControlVisualElement class. + */ + +#include + +#include "FUiAnim_EflNode.h" +#include "FUiAnim_ControlVisualElement.h" +#include "FUiAnim_VisualElementImpl.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + + +namespace Tizen { namespace Ui { namespace Animations +{ + + +//IMPLEMENT_PROPERTY(_ControlVisualElement); + +_ControlVisualElement::_ControlVisualElement(void) + : __autoResize(false) +{ + +} + +_ControlVisualElement::~_ControlVisualElement(void) +{ +} + +VisualElement* +_ControlVisualElement::CloneN(void) const +{ + return new (std::nothrow) _ControlVisualElement(*this); +} + +_ControlVisualElement::_ControlVisualElement(const _ControlVisualElement& rhs) + : _VisualElement(rhs) + , __autoResize(rhs.__autoResize) +{ +} + +result +_ControlVisualElement::ConstructControlVisualElement(void) +{ + result r = VisualElement::Construct(); + SysTryReturnResult(NID_UI_ANIM, r == E_SUCCESS, r, "Propagating."); + + _pVisualElementImpl->SetZOrderGroup(Z_ORDER_GROUP_CONTROL); + + SetImplicitAnimationEnabled(false); + + return r; +} + +_ControlVisualElement* +_ControlVisualElement::__GetControlChildAtPoint(Tizen::Graphics::FloatPoint& point, int parentHitTest) +{ + _ControlVisualElement* pHitTarget = null; + Tizen::Graphics::FloatPoint hitPoint = point; + int hitTest = _pVisualElementImpl->InvokeHitTest(point); + if ((hitTest & _VisualElementImpl::HITTEST_MATCH) != 0) + { + // passed hittest + pHitTarget = this; +#if 0 + // this passed hittest, but not parent --> clipped out by parent + if (GetParent() && IsClipToParent()) + { + if ((parentHitTest & HITTEST_MATCH) == 0) + pHitTarget = null; + } +#endif + } + + if ((hitTest & _VisualElementImpl::HITTEST_NOMORECHILDREN) == 0) + { + int count = _pVisualElementImpl->__children.GetCount(); + for (int i = count - 1; i >= 0; i--) // from top to bottom + { + // Skip non-ControlVisualElement + _VisualElementImpl* pTemp = _pVisualElementImpl->__children.GetChildAt(i); + _ControlVisualElement* pChild = null; + if (!pTemp) + { + continue; + } + + pChild = dynamic_cast< _ControlVisualElement* >(pTemp->GetPublic()); + if (!pChild) + { + continue; + } + + Tizen::Graphics::FloatPoint childHitPoint = point; + + pChild->ConvertCoordinates(childHitPoint, this); + + _ControlVisualElement* pChildHitTarget = pChild->__GetControlChildAtPoint(childHitPoint, hitTest); + if (pChildHitTarget) + { + pHitTarget = pChildHitTarget; + hitPoint = childHitPoint; + break; + } + } + } + + + if (pHitTarget) + { + point = hitPoint; + return pHitTarget; + } + + return null; +} + +// WARNING: +// Because Hit-Testing from self, clipping flags of self will be ignored. +_ControlVisualElement* +_ControlVisualElement::GetControlChildAtPoint(Tizen::Graphics::FloatPoint& point) +{ + _ControlVisualElement* pHitTarget = __GetControlChildAtPoint(point, _VisualElementImpl::HITTEST_MATCH); + + if (!pHitTarget) + { + SetLastResult(E_OBJ_NOT_FOUND); // TBD: error code + } + else + { + ClearLastResult(); + } + return pHitTarget; +} + +bool +_ControlVisualElement::IsAutoResizeChildrenEnabled(void) const +{ + return __autoResize; +} + +result +_ControlVisualElement::SetAutoResizeChildrenEnabled(bool autoResize) +{ + ClearLastResult(); + + __autoResize = autoResize; +// _ControlVisualElement* pVisualElement = dynamic_cast< _ControlVisualElement* >(__pPresentation->__pPublicInstance); +// pVisualElement->__autoResize = autoResize; + + return E_SUCCESS; +} + +Variant +_ControlVisualElement::OnGetPropertyRequested(const Tizen::Base::String& property) const +{ + if (property == *pVePropBounds) + { + return _PropGetControlBounds(); + } + else if (property == *pVePropImplicitAnimationEnabled) + { + return _PropGetControlImplicitAnimationEnabled(); + } + else if (property == *pVePropPropertyPropagationEnabled) + { + return _PropGetControlPropertyPropagationEnabled(); + } + + return VisualElement::OnGetPropertyRequested(property); +} + +result +_ControlVisualElement::OnSetPropertyRequested(const Tizen::Base::String& property, const Variant& value) +{ + if (property == *pVePropBounds) + { + return _PropSetControlBounds(value); + } + else if (property == *pVePropImplicitAnimationEnabled) + { + return _PropSetControlImplicitAnimationEnabled(value); + } + else if (property == *pVePropPropertyPropagationEnabled) + { + return _PropSetControlPropertyPropagationEnabled(value); + } + + return VisualElement::OnSetPropertyRequested(property, value); +} + +Variant +_ControlVisualElement::_PropGetControlBounds(void) const +{ + return _VisualElementImpl::GetInstance(*this)->GetBoundsProperty(); +} + +result +_ControlVisualElement::_PropSetControlBounds(const Variant& v) +{ + result r = _VisualElementImpl::GetInstance(*this)->SetBoundsProperty(v); + SysTryReturnResult(NID_UI_ANIM, !IsFailed(r), r,"Can't set bounds for control VisualElement."); + + if (__autoResize) + { + Tizen::Base::Collection::IList* pList = GetChildrenN(); + if (!pList) + { + return E_SYSTEM; + } + + Tizen::Graphics::FloatRectangle clientBounds = v.ToFloatRectangle(); + clientBounds.x = 0.0f; + clientBounds.y = 0.0f; + + for (int i = 0; i < pList->GetCount(); i++) + { + _ControlVisualElement* pChild = dynamic_cast< _ControlVisualElement* >(pList->GetAt(i)); + if (pChild) + { + pChild->SetBounds(clientBounds); + } + } + + if (pList->GetCount() > 2) + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Invalid control state(root/system/client)"); + } + + delete pList; + } + + return E_SUCCESS; +} + +Variant +_ControlVisualElement::_PropGetControlImplicitAnimationEnabled(void) const +{ + return _VisualElementImpl::GetInstance(*this)->GetImplicitAnimationProperty(); +} + +result +_ControlVisualElement::_PropSetControlImplicitAnimationEnabled(const Variant& v) +{ + result r = _VisualElementImpl::GetInstance(*this)->SetImplicitAnimationProperty(v); + SysTryReturnResult(NID_UI_ANIM, !IsFailed(r), r, "Can't enable or diable implicit animation for control VisualElement."); + + if (__autoResize) + { + Tizen::Base::Collection::IList* pList = GetChildrenN(); + if (!pList) + { + return E_SYSTEM; + } + + bool enable = v.ToBool(); + + for (int i = 0; i < pList->GetCount(); i++) + { + _ControlVisualElement* pChild = dynamic_cast< _ControlVisualElement* >(pList->GetAt(i)); + if (pChild) + { + pChild->SetImplicitAnimationEnabled(enable); + } + } + + if (pList->GetCount() > 2) + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Invalid control state(root/system/client)"); + } + + delete pList; + } + + return E_SUCCESS; +} + +Variant +_ControlVisualElement::_PropGetControlPropertyPropagationEnabled(void) const +{ + return _VisualElementImpl::GetInstance(*this)->GetPropertyPropagationProperty(); +} + +result +_ControlVisualElement::_PropSetControlPropertyPropagationEnabled(const Variant& v) +{ + result r = _VisualElementImpl::GetInstance(*this)->SetPropertyPropagationProperty(v); + SysTryReturnResult(NID_UI_ANIM, !IsFailed(r), r, "Can't enable or diable property propagation for control VisualElement."); + + if (__autoResize) + { + Tizen::Base::Collection::IList* pList = GetChildrenN(); + if (!pList) + { + return E_SYSTEM; + } + + bool enable = v.ToBool(); + + for (int i = 0; i < pList->GetCount(); i++) + { + _ControlVisualElement* pChild = dynamic_cast< _ControlVisualElement* >(pList->GetAt(i)); + if (pChild) + { + _VisualElementImpl::GetInstance(*pChild)->SetPropertyPropagationEnabled(enable); + } + } + + if (pList->GetCount() > 2) + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Invalid control state(root/system/client)"); + } + + delete pList; + } + + return E_SUCCESS; +} + + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnim_ControlVisualElement.h b/src/ui/animations/FUiAnim_ControlVisualElement.h new file mode 100644 index 0000000..dd08345 --- /dev/null +++ b/src/ui/animations/FUiAnim_ControlVisualElement.h @@ -0,0 +1,122 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_ControlVisualElement.h + * @brief Header file of _ControlVisualElement class + * + * This file contains declarations _ControlVisualElement class. + */ + +#ifndef _FUI_ANIM_INTERNAL_CONTROL_VISUAL_ELEMENT_H_ +#define _FUI_ANIM_INTERNAL_CONTROL_VISUAL_ELEMENT_H_ + +#include "FUiAnim_VisualElement.h" +#include "FUi_Colorf.h" + +namespace Tizen { namespace Ui { namespace Animations +{ + +class _ControlVisualElement + : public _VisualElement +{ +public: + /** + * This is the default constructor for this class. + * + * @since 2.0 + */ + _ControlVisualElement(void); + + + /** + * Initializes the instance of _ControlVisualElement. + * + * @since 2.0 + * @return An error code + * @exception E_SUCCESS This method was successful. + * @exception E_SYSTEM A system error occurred. + */ + result ConstructControlVisualElement(void); + +protected: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~_ControlVisualElement(void); + + + _ControlVisualElement(const _ControlVisualElement& rhs); + +public: + /** + * Definition for VisualElement's ZOrder Group. + * Z_ORDER_GROUP_SYSTEM group has higher position then position of Z_ORDER_GROUP_ALWASY_ON_TOP group. + * @since 2.0 + */ + static const int Z_ORDER_GROUP_CONTROL = 2001; // the UI system use this level. (Control) + + /** + * Clones the instance of VisualElement. + * + * @since 2.0 + * @return The pointer to the cloned VisualElement instance. + */ + virtual VisualElement* CloneN(void) const; + + /** + * Gets the top-most child ControlVisualElement indicated by @c point. + * + * @since 2.0 + * @return the child ControlVisualElement indicated by point. + * @param[in] point The position to find the child ControlVisualElement. + */ + _ControlVisualElement* GetControlChildAtPoint(Tizen::Graphics::FloatPoint& point); + + + bool IsAutoResizeChildrenEnabled(void) const; + + result SetAutoResizeChildrenEnabled(bool autoResize); + + + virtual Variant OnGetPropertyRequested(const Tizen::Base::String& property) const; + + + virtual result OnSetPropertyRequested(const Tizen::Base::String& property, const Variant& value); + +private: + _ControlVisualElement* __GetControlChildAtPoint(Tizen::Graphics::FloatPoint& point, int parentHitTest); + + Variant _PropGetControlBounds(void) const; + result _PropSetControlBounds(const Variant& v); + + Variant _PropGetControlImplicitAnimationEnabled(void) const; + result _PropSetControlImplicitAnimationEnabled(const Variant& v); + + Variant _PropGetControlPropertyPropagationEnabled(void) const; + result _PropSetControlPropertyPropagationEnabled(const Variant& v); +private: + bool __autoResize; + +}; // _ControlVisualElement + +}}} // Tizen::Ui::Animations + +#endif //_FUI_ANIM_INTERNAL_CONTROL_VISUAL_ELEMENT_H_ + diff --git a/src/ui/animations/FUiAnim_Debug.cpp b/src/ui/animations/FUiAnim_Debug.cpp new file mode 100644 index 0000000..1eef537 --- /dev/null +++ b/src/ui/animations/FUiAnim_Debug.cpp @@ -0,0 +1,1861 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_Debug.cpp + * @brief This file contains implementation of _VeDebug class + * + * This file contains implementation _VeDebug class. + */ + +#ifdef VE_DEBUG_MODULE +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef VE_SIMULATOR +#include +#include +#endif + +#include "FUiAnim_VisualElementImpl.h" +#include "FUiAnim_RootVisualElement.h" +#include "FUiAnim_VisualElementSharedData.h" +#include "FUiAnim_VisualElementSurfaceImpl.h" +#include "FUiAnim_Debug.h" + +#ifdef VE_DEBUG_MODULE + +#ifndef VE_SIMULATOR +#include "FUi_ControlImpl.h" +#include "FUiCtrl_Label.h" +#include "FUiCtrl_Button.h" +#include "FUiCtrl_Edit.h" +#include "FUiCtrl_Popup.h" +#endif + +#include "FUiAnim_EflNode.h" +#include "FUiAnim_EflLayer.h" +#include "FUiAnim_AnimationManager.h" +#include "FUiAnim_DisplayManager.h" + +#include "FUi_EcoreEvas.h" +#include "FUi_EcoreEvasMgr.h" + + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Animations +{ + +#ifdef _OSP_PERF_ +int _ElapsedTime::depth = 0; +char _ElapsedTime::logs[500][256]; +int _ElapsedTime::maxdepth = 0; +int _ElapsedTime::count = 0; +#endif + +#define DIGITATPOSITION(number, digit) static_cast< int >((number % static_cast< int >(powf(10.0f, (digit)))) / powf(10.0f, (digit - 1))) + +bool _VeDebug::__veDebugEnabled = false; + +void +_VeDebug::SetDebugEnabled(bool enable) +{ + __veDebugEnabled = enable; +} + +bool +_VeDebug::IsDebugEnabled(void) +{ + return __veDebugEnabled; +} + +#ifdef UI_ANIM_DEBUG + +static int oldDepth = 0; +void +_VeDebug::DumpVisualElementLayout(_VisualElementImpl* pElement, FILE* pFile) +{ + static int count = 0; + int depth = 0; + int nativeVisible = -1; + _VisualElementImpl* pDepth = null; + _VisualElementImpl* pModel = null; + _VisualElementImpl* pPresentation = null; + char logMessage[LOG_LEN_MAX] = {0, }; + char endTag[256] = {0, }; + + if (!pElement) + { + return; + } + + depth = -1; + pDepth = pElement; + while (pDepth) + { + depth++; + pDepth = pDepth->__pParent; + } + + while (oldDepth >= depth) + { + if (count > 0) + { + char indent[128] = {0, }; + snprintf(indent, 64, "%*s", (depth+(oldDepth-depth))*4, " "); + strcat(endTag, indent); + strcat(endTag, "\n"); + oldDepth--; + } + else + { + break; + } + } + + if (pElement->GetModel() == pElement) + { + pModel = pElement; + pPresentation = pElement->GetPresentation(); + } + else + { + pModel = pElement->GetModel(); + pPresentation = pElement; + } + + if (pElement && pElement->__pSharedData->pNativeNode) + { + VisualElementSurface* pSurface = dynamic_cast< VisualElementSurface* >(pElement->__pSharedData->pNativeNode->GetSurface()); + if (pSurface && _VisualElementSurfaceImpl::GetInstance(*pSurface)) + { + nativeVisible = evas_object_visible_get(reinterpret_cast< Evas_Object* >(_VisualElementSurfaceImpl::GetInstance(*pSurface)->GetNativeHandle())); + } + } + + + Tizen::Base::String name = pElement->GetSharedData().name; + +#ifndef VE_SIMULATOR + Tizen::Ui::_Control* pControl = null; + Tizen::Ui::_ControlImpl* pCtrlImpl = null; + + pControl = dynamic_cast< Tizen::Ui::_Control* >(static_cast< Tizen::Ui::_Control* >(pElement->GetUserData())); + if (pControl) + { + pCtrlImpl = dynamic_cast< Tizen::Ui::_ControlImpl* >(static_cast< Tizen::Ui::_ControlImpl* >(pControl->GetUserData())); + if (pCtrlImpl) + { + name = name + L", " + pCtrlImpl->GetPublicClassName(); + } + + Tizen::Ui::Controls::_Label* pLabel = null; + Tizen::Ui::Controls::_Edit* pEdit = null; + Tizen::Ui::Controls::_Button* pButton = null; + Tizen::Ui::Controls::_Popup* pPopup = null; + Tizen::Ui::Controls::Form* pForm = null; + Tizen::Ui::Controls::Header* pHeader = null; + Tizen::Ui::_Window* pWindow = null; + + pLabel = dynamic_cast< Tizen::Ui::Controls::_Label* >(pControl); + if (pLabel) + { + name = name + L", '" + pLabel->GetText() + L"'"; + } + + pEdit = dynamic_cast< Tizen::Ui::Controls::_Edit* >(pControl); + if (pEdit) + { + name = name + L", '" + pEdit->GetText() + L"'"; + } + + pButton = dynamic_cast< Tizen::Ui::Controls::_Button* >(pControl); + if (pButton) + { + name = name + L", '" + pButton->GetText() + L"'"; + } + + pPopup = dynamic_cast< Tizen::Ui::Controls::_Popup* >(pControl); + if (pPopup) + { + name = name + L", '" + pPopup->GetTitleText() + L"'"; + } + + pWindow = dynamic_cast< Tizen::Ui::_Window* >(pControl); + if (pWindow) + { + name = name + L", '_Window'"; + } + + pForm = dynamic_cast< Tizen::Ui::Controls::Form* >(pControl); + if (pForm) + { + name = name + L", '" + pForm->GetTitleText() + L"'"; + } + + pHeader = dynamic_cast< Tizen::Ui::Controls::Header* >(pControl); + if (pHeader) + { + name = name + L", '" + pHeader->GetTitleText() + L"'"; + } + } +#endif + + if (pElement && pElement->__pSharedData->pNativeNode) + { + _EflNode* pNativeNode = dynamic_cast< _EflNode* >(pElement->__pSharedData->pNativeNode); + if (pNativeNode) + { + Evas_Object* pEvasObject = null; + + if (pNativeNode->GetSurface() && _VisualElementSurfaceImpl::GetInstance(*pNativeNode->GetSurface())) + { + pEvasObject = reinterpret_cast< Evas_Object* >(_VisualElementSurfaceImpl::GetInstance(*pNativeNode->GetSurface())->GetNativeHandle()); + } + else + { + pEvasObject = pNativeNode->__pRectangleObject; + } + + if (pEvasObject) + { + Dimension imageSize; + Rectangle absolute; + Rectangle relative; + Rectangle filled; + int red = 0; + int green = 0; + int blue = 0; + int alpha = 0; + unsigned int rgb = 0; + const char* eoType = evas_object_type_get(pEvasObject); + char style1[LOG_LEN_MAX] = {0, }; + char title1[LOG_LEN_MAX] = {0, }; + char style[LOG_LEN_MAX] = {0, }; + char title[LOG_LEN_MAX] = {0, }; + + if (!pElement->GetName().IsEmpty()) + { + ByteBuffer* pByteBuffer(Tizen::Base::Utility::StringUtil::StringToUtf8N(pElement->GetName())); + evas_object_name_set(pEvasObject, (const char*)pByteBuffer->GetPointer()); + delete pByteBuffer; + } + + 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())); +// if (pWindow) +// { +// Rectangle windowRect = pWindow->GetBounds(); +// realBounds.x += windowRect.x; +// realBounds.y += windowRect.y; +// } + _VisualElementCoordinateSystem::ConvertDimensionToPhysical(realBounds.width, realBounds.height); + _VisualElementCoordinateSystem::MakeIntegralPoint(realBounds.width, realBounds.height, relative.width, relative.height); + _VisualElementCoordinateSystem::ConvertPointToPhysical(realBounds.x, realBounds.y); + _VisualElementCoordinateSystem::MakeIntegralPoint(realBounds.x, realBounds.y, relative.x, relative.y); + + + bool showState = pElement->GetShowState(); + bool visible = pElement->IsVisible(); + bool evasVisible = evas_object_visible_get(pEvasObject); + + if (!strcmp(eoType, "image")) + { + char filename[LOG_LEN_MAX/4] = {0, }; + char savePath[LOG_LEN_MAX/2] = {0, }; + Evas_Object* pEvasObjectImage = pEvasObject; + Evas_Object* pSource = evas_object_image_source_get(pEvasObject); + if (pSource) + { + pEvasObjectImage = pSource; + } + evas_object_image_size_get(pEvasObjectImage, &imageSize.width, &imageSize.height); + FloatRectangle contentBounds = pElement->__contentBounds; + filled.x = realBounds.x * contentBounds.x; + filled.y = realBounds.y * contentBounds.y; + filled.width = realBounds.width * contentBounds.width; + filled.height = realBounds.height * contentBounds.height; + + if (name.GetLength() > 0) + { + snprintf(filename, sizeof(filename), "VE_%d_%ls_%08x.png", count, pElement->GetName().GetPointer(), (unsigned int)pElement->GetPresentation()); + } + else + { + snprintf(filename, sizeof(filename), "VE_%d_%08x.png", count, (unsigned int)pElement->GetPresentation()); + } + + // save the image file + strncpy(savePath, "/tmp/layout/", 12); + strncat(savePath, filename, strlen(filename)); + evas_object_image_save(pEvasObjectImage, savePath, NULL, "quality=100 compress=9"); + + snprintf(style1, LOG_LEN_MAX, "background-image:url('%s'); background-size:%dpx %dpx; ", filename, filled.width, filled.height); + snprintf(title1, LOG_LEN_MAX, "%s\nImage: w=%d h=%d\nEvas Absolute Bounds: x=%d y=%d w=%d h=%d\nVE Relative Bounds: x=%d y=%d w=%d h=%d\nFilled Bounds: x=%d y=%d w=%d h=%d\n", + filename, relative.width, relative.height, absolute.x, absolute.y, absolute.width, absolute.height, relative.x, relative.y, relative.width, relative.height, filled.x, filled.y, filled.width, filled.height); + } + else + { + evas_object_color_get(pEvasObject, &red, &green, &blue, &alpha); + rgb = (((red << 16) & 0x00ff0000) | ((green << 8) & 0x0000ff00) | (blue & 0x000000ff)); + if (alpha) + { + snprintf(style1, LOG_LEN_MAX, "background-color:#%06x; ", rgb); + } + else + { + //snprintf(style1, LOG_LEN_MAX, "pointer-events: none; "); + } + snprintf(title1, LOG_LEN_MAX, "No Surface\nColor: #%06x Alpha: %02x\nEvas Absolute Bounds: x=%d y=%d w=%d h=%d\nVE Relative Bounds: x=%d y=%d w=%d h=%d\n", rgb, alpha, absolute.x, absolute.y, absolute.width, absolute.height, relative.x, relative.y, relative.width, relative.height); + } + + snprintf(title, LOG_LEN_MAX, "%s\nname=%ls\nshow=%s visible=%s evas=%s\nmodel=%#x\npresentation=%#x\nparent=%#x\nevas_object=%#x\nclip-source=%#x", + title1, name.GetPointer(), showState ? "true" : "false", visible ? "true" : "false", evasVisible ? "show" : "hide", (unsigned int)pModel, (unsigned int)pPresentation, (unsigned int)pElement->GetParent(), (unsigned int)pEvasObject, (unsigned int)pElement->GetClipSource()); + snprintf(style, LOG_LEN_MAX, "%sopacity:%.2f; position:absolute; left:%dpx; top:%dpx; width:%dpx; height:%dpx; border:1px dotted #aaaaaa; z-index:%d; display:%s;%s", + style1, (pElement->__opacity), relative.x, relative.y, relative.width, relative.height, depth, (showState ? "block" : "none"), (pElement->__isClipChildren ? " overflow:hidden;" : "")); + + snprintf(logMessage, LOG_LEN_MAX, "%s%*s

\n", endTag, depth*4, " ", (unsigned int)pElement, style, title); + fputs(logMessage,pFile); + } + + Eina_List *pEvasObjects = evas_object_smart_members_get(pNativeNode->__pNativeSmartObject); + void* pObject; + EINA_LIST_FREE(pEvasObjects, pObject) + { + pEvasObject = (Evas_Object*)pObject; + if (pEvasObject) + { + Dimension imageSize; + Rectangle absolute; + Rectangle relative; + Rectangle filled; + int red = 0; + int green = 0; + int blue = 0; + int alpha = 0; + unsigned int rgb = 0; + const char* eoType = evas_object_type_get(pEvasObject); + char style1[LOG_LEN_MAX] = {0, }; + char title1[LOG_LEN_MAX] = {0, }; + char style[LOG_LEN_MAX] = {0, }; + char title[LOG_LEN_MAX] = {0, }; + + if (!pElement->GetName().IsEmpty()) + { + ByteBuffer* pByteBuffer(Tizen::Base::Utility::StringUtil::StringToUtf8N(pElement->GetName())); + evas_object_name_set(pEvasObject, (const char*)pByteBuffer->GetPointer()); + delete pByteBuffer; + } + + evas_object_geometry_get(pEvasObject, &absolute.x, &absolute.y, &absolute.width, &absolute.height); + + FloatRectangle realBounds = pElement->__bounds; + _RootVisualElement* pRoot = dynamic_cast<_RootVisualElement*>(pElement->__pPublicInstance); + if (pRoot) + { + _NativeLayer* pLayer = pRoot->GetNativeLayer(); + FloatRectangle rect = pLayer->GetBounds(); + realBounds.x += rect.x; + realBounds.y += rect.y; + } + _VisualElementCoordinateSystem::ConvertDimensionToPhysical(realBounds.width, realBounds.height); + _VisualElementCoordinateSystem::MakeIntegralPoint(realBounds.width, realBounds.height, relative.width, relative.height); + _VisualElementCoordinateSystem::ConvertPointToPhysical(realBounds.x, realBounds.y); + _VisualElementCoordinateSystem::MakeIntegralPoint(realBounds.x, realBounds.y, relative.x, relative.y); + + + bool showState = pElement->GetShowState(); + bool visible = pElement->IsVisible(); + bool evasVisible = evas_object_visible_get(pEvasObject); + + if (!strcmp(eoType, "image")) + { + char filename[LOG_LEN_MAX/4] = {0, }; + char savePath[LOG_LEN_MAX/2] = {0, }; + Evas_Object* pEvasObjectImage = pEvasObject; + Evas_Object* pSource = evas_object_image_source_get(pEvasObject); + if (pSource) + { + pEvasObjectImage = pSource; + } + evas_object_image_size_get(pEvasObjectImage, &imageSize.width, &imageSize.height); + evas_object_image_fill_get(pEvasObject, &filled.x, &filled.y, &filled.width, &filled.height); + + if (name.GetLength() > 0) + { + snprintf(filename, sizeof(filename), "VE_%d_%ls_%08x.png", count, pElement->GetName().GetPointer(), (unsigned int)pElement->GetPresentation()); + } + else + { + snprintf(filename, sizeof(filename), "VE_%d_%08x.png", count, (unsigned int)pElement->GetPresentation()); + } + + // save the image file + strncpy(savePath, "/tmp/layout/", 12); + strncat(savePath, filename, strlen(filename)); + evas_object_image_save(pEvasObjectImage, savePath, NULL, "quality=100 compress=9"); + + snprintf(style1, LOG_LEN_MAX, "background-image:url(%s); ", filename); + snprintf(title1, LOG_LEN_MAX, "%s\nImage: w=%d h=%d\nEvas Absolute Bounds: x=%d y=%d w=%d h=%d\nVE Relative Bounds: x=%d y=%d w=%d h=%d\nFilled Bounds: x=%d y=%d w=%d h=%d\n", + filename, relative.width, relative.height, absolute.x, absolute.y, absolute.width, absolute.height, relative.x, relative.y, relative.width, relative.height, filled.x, filled.y, filled.width, filled.height); + } + else + { + evas_object_color_get(pEvasObject, &red, &green, &blue, &alpha); + rgb = (((red << 16) & 0x00ff0000) | ((green << 8) & 0x0000ff00) | (blue & 0x000000ff)); + if (alpha) + { + snprintf(style1, LOG_LEN_MAX, "background-color:#%06x; ", rgb); + } + else + { + //snprintf(style1, LOG_LEN_MAX, "pointer-events: none; "); + } + snprintf(title1, LOG_LEN_MAX, "No Surface\nColor: #%06x Alpha: %02x\nEvas Absolute Bounds: x=%d y=%d w=%d h=%d\nVE Relative Bounds: x=%d y=%d w=%d h=%d\n", rgb, alpha, absolute.x, absolute.y, absolute.width, absolute.height, relative.x, relative.y, relative.width, relative.height); + } + + snprintf(title, LOG_LEN_MAX, "%s\nname=%ls\nshow=%s visible=%s evas=%s\nmodel=%#x\npresentation=%#x\nparent=%#x\nevas_object=%#x\nclip-source=%#x", + title1, name.GetPointer(), showState ? "true" : "false", visible ? "true" : "false", evasVisible ? "show" : "hide", (unsigned int)pModel, (unsigned int)pPresentation, (unsigned int)pElement->GetParent(), (unsigned int)pEvasObject, (unsigned int)pElement->GetClipSource()); + snprintf(style, LOG_LEN_MAX, "%sopacity:%.2f; position:absolute; left:%dpx; top:%dpx; width:%dpx; height:%dpx; border:1px dotted #aaaaaa; z-index:%d; display:%s;%s", + style1, (pElement->__opacity), relative.x, relative.y, relative.width, relative.height, depth, (showState ? "block" : "none"), (pElement->__isClipChildren ? " overflow:hidden;" : "")); + + snprintf(logMessage, LOG_LEN_MAX, "%s%*s
\n", endTag, depth*4, " ", (unsigned int)pElement, style, title); + fputs(logMessage,pFile); + } + } + } + } + + count++; + oldDepth = depth; +} + +void +_VeDebug::DumpVeLayout(_VisualElementImpl* pElement, int indent, FILE* pFile) +{ + if (!pElement) + { + _DisplayManager* pDisplayManager = _DisplayManager::GetInstance(); + if (pDisplayManager != null && pDisplayManager->GetRoot(0)) + { + pElement = _VisualElementImpl::GetInstance(*pDisplayManager->GetRoot(0)); + } + } + + bool prevDebugEnabled = IsDebugEnabled(); + SetDebugEnabled(true); + + if (pElement) + { + if (indent == 0) + { + } + + DumpVisualElementLayout(pElement, pFile); + + int count = pElement->__children.GetCount(); + for (int i = 0; i < count; i++) + { + _VeDebug::DumpVeLayout(pElement->__children.GetChildAt(i), indent + 3, pFile); + } + + if (indent == 0) + { + char endTag[LOG_LEN_MAX] = {0, }; + while (oldDepth >= 0) + { + char indent[128] = {0, }; + snprintf(indent, 64, "%*s", oldDepth*4, " "); + strcat(endTag, indent); + strcat(endTag, "
\n"); + oldDepth--; + } + fputs(endTag, pFile); + } + } + + SetDebugEnabled(prevDebugEnabled); + + return; +} + +void +_VeDebug::DumpEvasObjectForGraphI(FILE* pFile, Evas_Object* pEvasObject, int depth, int pos) +{ + if (!pEvasObject) + { + return; + } + + Tizen::Base::String typeName(evas_object_type_get(pEvasObject)); + + int objX = 0; + int objY = 0; + int objW = 0; + int objH = 0; + evas_object_geometry_get(pEvasObject, &objX, &objY, &objW, &objH); + + Evas_Object* pClipper = evas_object_clip_get(pEvasObject); + const Evas_Map* pMap = evas_object_map_get(pEvasObject); + Evas_Render_Op renderOp = evas_object_render_op_get(pEvasObject); + + int r = 0; + int g = 0; + int b = 0; + int a = 0; + evas_object_color_get(pEvasObject, &r, &g, &b, &a); + + int visible = evas_object_visible_get(pEvasObject); + + Tizen::Base::String output; + Tizen::Base::String label; + Tizen::Base::String common; + Tizen::Base::String type; + Tizen::Base::String order; + Tizen::Base::String clipper; + Tizen::Base::String map; + Tizen::Base::String bounds; + Tizen::Base::String showState; + Tizen::Base::String rop; + Tizen::Base::String color; + Tizen::Base::String imageSize; + Tizen::Base::String imageFill; + Tizen::Base::String imageSource; + + + type.Format(256, L"type %ls", typeName.GetPointer()); + order.Format(256, L"order %d-%d", depth, pos); + clipper.Format(256, L"clipper %x", pClipper); + map.Format(256, L"map %ls", (pMap ? L"used" : L"unused")); + bounds.Format(256, L"bounds %d : %d ~ %d : %d", objX, objY, objX + objW, objY + objH); + showState.Format(256, L"showState %ls", (visible ? L"show" : L"hidden")); + rop.Format(256, L"rop %d", renderOp); + color.Format(256, L"color 0x%08x", (a << 24) | (r << 16) | (g << 8) | b); + + + if (typeName == "image") + { + int iw = 0; + int ih = 0; + evas_object_image_size_get(pEvasObject, &iw, &ih); + int fillX = 0; + int fillY = 0; + int fillW = 0; + int fillH = 0; + evas_object_image_fill_get(pEvasObject, &fillX, &fillY, &fillW, &fillH); + Evas_Object* pSource = evas_object_image_source_get(pEvasObject); + + imageSize.Format(256, L"imageSize %d:%d", iw, ih); + imageFill.Format(256, L"fill %d : %d ~ %d : %d", fillX, fillY, fillX + fillW, fillY + fillH); + imageSource.Format(256, L"source N%lx", pSource); + + if (pSource) + { + DumpEvasObjectForGraphI(pFile, pSource, depth, pos); + fprintf(pFile, "N%lx:proxy -> N%lx [style=dashed, label=source];\n", (unsigned long)pEvasObject, (unsigned long)pSource); + } + } + + + label = L"" + type + L""; + label += L"" + order + L""; + label += L"" + clipper + L""; + label += L"" + map + L""; + label += L"" + bounds + L""; + label += L"" + showState + L""; + label += L"" + rop + L""; + label += L"" + color + L""; + + if (!imageSize.IsEmpty()) + { + label += L"" + imageSize + L""; + } + + if (!imageFill.IsEmpty()) + { + label += L"" + imageFill + L""; + } + + if (!imageSource.IsEmpty()) + { + label += L"" + imageSource + L""; + } + + output.Format(1024, L"N%lx [ fillcolor=\"#%06x\", style=filled, label=<%ls
>];\n", + (unsigned long)pEvasObject, + 0xFAF0E6, + label.GetPointer() + ); + + fprintf(pFile, "%ls", output.GetPointer()); + + + if (pClipper) + { + fprintf(pFile, "N%lx:clipper -> N%lx [style=\"dotted\", label=clipper]; \n", + (unsigned long)pEvasObject, + (unsigned long)pClipper + ); + } +} + +void +_VeDebug::DumpEvasTreeGraphI(FILE* pFile, Evas_Object* pObject, int depth, int pos) +{ + if (!pObject) + { + return; + } + + bool prevDebugEnabled = IsDebugEnabled(); + SetDebugEnabled(true); + + DumpEvasObjectForGraphI(pFile, pObject, depth, pos); + + pos = 0; + void* pChild = null; + Eina_List* pList = evas_object_smart_members_get(pObject); + EINA_LIST_FREE(pList, pChild) + { + if (pChild) + { + DumpEvasTreeGraphI(pFile, (Evas_Object*)pChild, depth + 1, pos++); + fprintf(pFile, "N%lx -> N%lx [style=\"solid,bold\"] \n", (unsigned long)pChild, (unsigned long)pObject); + } + } + + SetDebugEnabled(prevDebugEnabled); +} + +void +_VeDebug::DumpVeObjectForGraphI(FILE* pFile, _VisualElementImpl* pVisualElementImpl, int depth, int pos) +{ + if (!pVisualElementImpl) + { + return; + } + + bool isModel = (pVisualElementImpl == pVisualElementImpl->__pModel); + bool isPresentation = (pVisualElementImpl == pVisualElementImpl->__pPresentation); + + Tizen::Base::String output; + Tizen::Base::String label; + Tizen::Base::String model; + Tizen::Base::String name; + Tizen::Base::String order; + Tizen::Base::String clip; + Tizen::Base::String transformed; + Tizen::Base::String show; + Tizen::Base::String visible; + Tizen::Base::String ror; + Tizen::Base::String opacity; + Tizen::Base::String showOpacity; + Tizen::Base::String opacityFromRoot; + Tizen::Base::String bounds; + Tizen::Base::String invBounds; + Tizen::Base::String rop; + const Tizen::Graphics::FloatRectangle& boundsRect = pVisualElementImpl->__bounds; + const Tizen::Graphics::FloatRectangle& invBoundsRect = pVisualElementImpl->GetSharedData().invalidatedRegion; + + model.Format(256, L"type %ls", (isModel ? L"Model" : isPresentation ? L"Presentation" : L"")); + name.Format(256, L"name %ls", pVisualElementImpl->GetSharedData().name.GetPointer()); + order.Format(256, L"order %d-%d", depth, pos); + clip.Format(256, L"clip %ls", (pVisualElementImpl->__isClipChildren ? L"CS" : L"NO-CS")); + transformed.Format(256, L"xform %ls", (pVisualElementImpl->__needTransform ? L"NO-AA" : L"AA")); + show.Format(256, L"showState %ls", (pVisualElementImpl->GetShowState() ? L"show" : L"hidden")); + visible.Format(256, L"visibility %ls", (pVisualElementImpl->IsVisible() ? L"visible" : L"invisible")); + ror.Format(256, L"redrawOnResize %ls", (pVisualElementImpl->GetRedrawOnResizeEnabled() ? L"ROR" : L"NO-ROR")); + opacity.Format(256, L"opacity %3.1f", pVisualElementImpl->GetOpacity()); + showOpacity.Format(256, L"showOpacity %3.1f", pVisualElementImpl->__showOpacity); + opacityFromRoot.Format(256, L"visOpacity %3.1f", pVisualElementImpl->GetOpacityFromRoot()); + bounds.Format(256, L"bounds %.2f : %.2f ~ %.2f : %.2f", boundsRect.x, boundsRect.y, boundsRect.x + boundsRect.width, boundsRect.y + boundsRect.height); + invBounds.Format(256, L"invBounds %.2f : %.2f ~ %.2f : %.2f", invBoundsRect.x, invBoundsRect.y, invBoundsRect.x + invBoundsRect.width, invBoundsRect.y + invBoundsRect.height); + rop.Format(256, L"rop %d", pVisualElementImpl->__renderOperation); + + + long color = (isModel ? 0xF0FFF0 : isPresentation ? 0xE6E6FA : 0x708090); + + label = L"" + model + L""; + label += L"" + name + L""; + label += L"" + order + L""; + label += L"" + clip + L""; + label += L"" + transformed + L""; + label += L"" + show + L""; + label += L"" + visible + L""; + label += L"" + ror + L""; + label += L"" + opacity + L""; + label += L"" + showOpacity + L""; + label += L"" + opacityFromRoot + L""; + label += L"" + bounds + L""; + label += L"" + invBounds + L""; + label += L"" + rop + L""; + + output.Format(1024, L"N%lx [ fillcolor=\"#%06x\", style=filled, label=<%ls
>];\n", + (unsigned long)pVisualElementImpl->GetPublic(), + color, + label.GetPointer() + ); + + fprintf(pFile, "%ls", output.GetPointer()); + + + if (isPresentation) + { + _EflNode* pEflNode = static_cast< _EflNode* >(pVisualElementImpl->GetSharedData().pNativeNode); + Evas_Object* pEvasObject = reinterpret_cast< Evas_Object* >(pEflNode->GetGroupContainer()); + + fprintf(pFile, "N%lx -> N%lx [dir=none, style=\"dotted\", label=native]; \n", + (unsigned long)pVisualElementImpl->GetPublic(), + (unsigned long)pEvasObject + ); + + if (pVisualElementImpl->__pModel && pVisualElementImpl->__pModel->GetPublic() && + pVisualElementImpl->__pPresentation && pVisualElementImpl->__pPresentation->GetPublic()) + { + fprintf(pFile, "N%lx -> N%lx [style=\"dotted\"]; \n", + (unsigned long)pVisualElementImpl->__pModel->GetPublic(), + (unsigned long)pVisualElementImpl->__pPresentation->GetPublic() + ); + } + } +} + +void +_VeDebug::DumpVeTreeGraphI(FILE* pFile, _VisualElementImpl* pVisualElementImpl, int depth, int pos) +{ + if (!pVisualElementImpl) + { + return; + } + + bool prevDebugEnabled = IsDebugEnabled(); + SetDebugEnabled(true); + + DumpVeObjectForGraphI(pFile, pVisualElementImpl, depth, pos); + + for (int i = 0; i < pVisualElementImpl->__children.GetCount(); i++) + { + _VisualElementImpl* pChild = pVisualElementImpl->__children.GetChildAt(i); + DumpVeTreeGraphI(pFile, pChild, depth + 1, i); + fprintf(pFile, "N%lx -> N%lx [style=\"solid,bold\"] \n", + (unsigned long)pChild->GetPublic(), + (unsigned long)pVisualElementImpl->GetPublic() + ); + } + + SetDebugEnabled(prevDebugEnabled); +} + +void +_VeDebug::DumpEvasTreeGraph(const char* pFilePath, VisualElement* pVisualElement) +{ + _VisualElementImpl* pElement = null; + + if (!pVisualElement) + { + _DisplayManager* pDisplayManager = _DisplayManager::GetInstance(); + if (pDisplayManager != null && pDisplayManager->GetRoot(0)) + { + pElement = _VisualElementImpl::GetInstance(*pDisplayManager->GetRoot(0)); + } + } + else + { + pElement = _VisualElementImpl::GetInstance(*pVisualElement); + } + + if (!pElement) + { + return; + } + + FILE* pFile = fopen(pFilePath, "wt"); + if (!pFile) + { + return; + } + + fprintf(pFile, "digraph VisualElementDump {\n"); + fprintf(pFile, "node [shape=plaintext, fontsize=10.0];\n"); + fprintf(pFile, "edge [fontsize=10.0];\n"); + //fprintf(pFile, "rankdir = TB;\n"); + fprintf(pFile, "rankdir = BT;\n"); + fprintf(pFile, "\n"); + + + bool prevDebugEnabled = IsDebugEnabled(); + SetDebugEnabled(true); + + + _EflNode* pEflNode = static_cast< _EflNode* >(pElement->GetSharedData().pNativeNode); + Evas_Object* pEvasObject = reinterpret_cast< Evas_Object* >(pEflNode->GetGroupContainer()); + + fprintf(pFile, "subgraph cluster_evas {\n"); + fprintf(pFile, "clusterrank = local;\n"); + fprintf(pFile, "fontsize = 30.0;\n"); + fprintf(pFile, "label = \"Evas Object\";\n"); + DumpEvasTreeGraphI(pFile, pEvasObject, 0, 0); + fprintf(pFile, "}\n"); + + fprintf(pFile, "subgraph cluster_model {\n"); + fprintf(pFile, "clusterrank = local;\n"); + fprintf(pFile, "fontsize = 30.0;\n"); + fprintf(pFile, "label = \"Model\";\n"); + DumpVeTreeGraphI(pFile, pElement->__pModel, 0, 0); + fprintf(pFile, "}\n"); + + fprintf(pFile, "subgraph cluster_presentation {\n"); + fprintf(pFile, "clusterrank = local;\n"); + fprintf(pFile, "fontsize = 30.0;\n"); + fprintf(pFile, "label = \"Presentation\";\n"); + DumpVeTreeGraphI(pFile, pElement->__pPresentation, 0, 0); + fprintf(pFile, "}\n"); + + fprintf(pFile, "\n"); + + SetDebugEnabled(prevDebugEnabled); + + fprintf(pFile, "}\n\n"); + + fclose(pFile); +} +#endif + +void +_VeDebug::DumpVisualElement(_VisualElementImpl* pElement, const char* func, int line, const char* fmt, ...) +{ + static int count = 0; + int len = 0; + int depth = 0; + int nativeVisible = -1; + _VisualElementImpl* pDepth = null; + _VisualElementImpl* pModel = null; + _VisualElementImpl* pPresentation = null; + char logPlaceMessage[LOG_LEN_MAX] = { 0, }; + char logMessage[LOG_LEN_MAX] = {0, }; + char logSpaces[LOG_LEN_MAX] = { 0, }; + va_list args; + + if (!pElement) + { + return; + } + + depth = -1; + pDepth = pElement; + while (pDepth) + { + depth++; + pDepth = pDepth->__pParent; + } + + if (pElement->GetModel() == pElement) // presenter + { + pModel = pElement->GetModel(); + pPresentation = pElement->GetPresentation(); + } + else + { + pModel = null; + pPresentation = pElement; + } + + if (pPresentation && pPresentation->__pSharedData->pNativeNode) + { + VisualElementSurface* pSurface = dynamic_cast< VisualElementSurface* >(pPresentation->__pSharedData->pNativeNode->GetSurface()); + if (pSurface && _VisualElementSurfaceImpl::GetInstance(*pSurface)) + { + nativeVisible = evas_object_visible_get(reinterpret_cast< Evas_Object* >(_VisualElementSurfaceImpl::GetInstance(*pSurface)->GetNativeHandle())); + } + } + + if (func) + { + snprintf(logPlaceMessage, sizeof(logPlaceMessage), "(%s:%4d)", func, line); + } + + snprintf(logSpaces, sizeof(logSpaces), "%*s", depth * 3, " "); + + Tizen::Base::String name = pElement->GetSharedData().name; + +#ifndef VE_SIMULATOR + Tizen::Ui::_Control* pControl = null; + Tizen::Ui::_ControlImpl* pCtrlImpl = null; + + pControl = dynamic_cast< Tizen::Ui::_Control* >(static_cast< Tizen::Ui::_Control* >(pElement->GetUserData())); + if (pControl) + { + pCtrlImpl = dynamic_cast< Tizen::Ui::_ControlImpl* >(static_cast< Tizen::Ui::_ControlImpl* >(pControl->GetUserData())); + if (pCtrlImpl) + { + name = name + L", " + pCtrlImpl->GetPublicClassName(); + } + + Tizen::Ui::Controls::_Label* pLabel = null; + Tizen::Ui::Controls::_Edit* pEdit = null; + Tizen::Ui::Controls::_Button* pButton = null; + Tizen::Ui::Controls::_Popup* pPopup = null; + Tizen::Ui::Controls::Form* pForm = null; + Tizen::Ui::Controls::Header* pHeader = null; + Tizen::Ui::_Window* pWindow = null; + + pLabel = dynamic_cast< Tizen::Ui::Controls::_Label* >(pControl); + if (pLabel) + { + name = name + L", '" + pLabel->GetText() + L"'"; + } + + pEdit = dynamic_cast< Tizen::Ui::Controls::_Edit* >(pControl); + if (pEdit) + { + name = name + L", '" + pEdit->GetText() + L"'"; + } + + pButton = dynamic_cast< Tizen::Ui::Controls::_Button* >(pControl); + if (pButton) + { + name = name + L", '" + pButton->GetText() + L"'"; + } + + pPopup = dynamic_cast< Tizen::Ui::Controls::_Popup* >(pControl); + if (pPopup) + { + name = name + L", '" + pPopup->GetTitleText() + L"'"; + } + + pWindow = dynamic_cast< Tizen::Ui::_Window* >(pControl); + if (pWindow) + { + name = name + L", '_Window'"; + } + + pForm = dynamic_cast< Tizen::Ui::Controls::Form* >(pControl); + if (pForm) + { + name = name + L", '" + pForm->GetTitleText() + L"'"; + } + + pHeader = dynamic_cast< Tizen::Ui::Controls::Header* >(pControl); + if (pHeader) + { + name = name + L", '" + pHeader->GetTitleText() + L"'"; + } + } +#endif + + +#define TERMCOLOR_FMT //"%c[%d;%d;%dm" + + len = snprintf(logMessage, sizeof(logMessage), + TERMCOLOR_FMT "\n%4d = %2d%s:" TERMCOLOR_FMT "\n%s - [VE(%ls): 0x%08lx->0x%08lx]%s\n%s - [show:%s, %s, %d] [op=%.1f, %.1f, %.1f, %.1f] [%s] [0x%x, " + "0x%x, 0x%x %s=%p]\n%s - bounds=" VELOGRECTTAG " invRect=" VELOGRECTTAG " vRect=" VELOGRECTTAG, + /*0x1B, 1, 31, 10,*/ + count, depth, + (pElement != pElement->__pModel ? "P" : " "), + /*0x1B, 0, 0, 10,*/ + logSpaces, + name.GetPointer(), //(pElement->__pSharedData ? pElement->__pSharedData->name.GetPointer() : L" "), + (unsigned long) pModel, (unsigned long) pPresentation, + logPlaceMessage, + logSpaces, + (pElement->GetShowState() ? "show" : "hide"), (pElement->IsVisible() ? " visible" : "invisible"), nativeVisible, + pElement->__showOpacity, pElement->__opacity, pElement->__contentOpacity, pElement->GetOpacityFromRoot(), + (pElement->__pSharedData->pSurface ? " sfc" : "nosfc"), + pElement->__invalidatedProps, + pElement->__childrenNeedsUpdateProps, + pElement->__pSharedData->invalidatedNativeProps, (pElement->__isClipChildren ? "CS" : "NOCS"), + pElement->__pClipSource, + logSpaces, + VELOGRECT(pElement->__bounds), + VELOGRECT(pElement->__pSharedData->invalidatedRegion), + VELOGRECT(pElement->__visibleRect) + ); + +#undef TERMCOLOR_FMT + + va_start(args, fmt); + vsnprintf(&logMessage[len], sizeof(logMessage) - len, fmt, args); + va_end(args); + + //VeLog(NID_UI_ANIM, "%s", logMessage); + + + if (pElement == pPresentation && pElement->__pSharedData->pNativeNode) + { + _EflNode* pNativeNode = dynamic_cast< _EflNode* >(pPresentation->__pSharedData->pNativeNode); + if (pNativeNode) + { + Evas_Object* pEvasObject = null; + + if (pNativeNode->GetSurface() && _VisualElementSurfaceImpl::GetInstance(*pNativeNode->GetSurface())) + { + pEvasObject = reinterpret_cast< Evas_Object* >(_VisualElementSurfaceImpl::GetInstance(*pNativeNode->GetSurface())->GetNativeHandle()); + } + else + { + pEvasObject = pNativeNode->__pRectangleObject; + } + + if (pEvasObject) + { + int iw = 0; + int ih = 0; + int ox = 0; + int oy = 0; + int ow = 0; + int oh = 0; + int fx = 0; + int fy = 0; + int fw = 0; + int fh = 0; + int red = 0; + int green = 0; + int blue = 0; + int alpha = 0; + int argb = 0; + const char* eoType = evas_object_type_get(pEvasObject); + + if (!pElement->GetName().IsEmpty()) + { + ByteBuffer* pByteBuffer(Tizen::Base::Utility::StringUtil::StringToUtf8N(pElement->GetName())); + evas_object_name_set(pEvasObject, (const char*)pByteBuffer->GetPointer()); + delete pByteBuffer; + } + + + if (!strcmp(eoType, "image")) + { + if (evas_object_image_source_get(pEvasObject)) + { + evas_object_image_size_get(evas_object_image_source_get(pEvasObject), &iw, &ih); + } + else + { + evas_object_image_size_get(pEvasObject, &iw, &ih); + } + evas_object_image_fill_get(pEvasObject, &fx, &fy, &fw, &fh); + } + + evas_object_geometry_get(pEvasObject, &ox, &oy, &ow, &oh); + evas_object_color_get(pEvasObject, &red, &green, &blue, &alpha); + argb = (((alpha << 24) & 0xff000000) | ((red << 16) & 0x00ff0000) | ((green << 8) & 0x0000ff00) | (blue & 0x000000ff)); + bool showState = evas_object_visible_get(pEvasObject); + + len = strlen(logMessage); + snprintf(&logMessage[len], sizeof(logMessage) - len, "%s - type=%s[%p] bounds=[%d:%d ~ %d:%d] fill=[%d:%d ~ %d:%d] imgsize=[%d:%d] show=%s color=%08X", + logSpaces, evas_object_type_get(pEvasObject), pEvasObject, ox, oy, ox + ow, oy + oh, fx, fy, fx + fw, fy + fh, iw, ih, (showState ? "visible" : "invisible"), argb); + + //VeLog(NID_UI_ANIM, "%s", logMessage); + } + } + } + + VeLog(NID_UI_ANIM, "%s", logMessage); + + count++; +} + +void +_VeDebug::DumpVeTree(_VisualElementImpl* pElement, int indent) +{ + if (!pElement) + { + _DisplayManager* pDisplayManager = _DisplayManager::GetInstance(); + if (pDisplayManager != null && pDisplayManager->GetRoot(0)) + { + pElement = _VisualElementImpl::GetInstance(*pDisplayManager->GetRoot(0)); + } + } + + bool prevDebugEnabled = IsDebugEnabled(); + SetDebugEnabled(true); + + if (pElement) + { + if (indent == 0) + { + VeLog(NID_UI_ANIM, "--------------------------[VE DUMP START]---------------------------"); + } + + VELOGEX_NOFUNCTION(pElement, ""); + VELOGEX_NOFUNCTION(pElement->__pPresentation, "\n"); + + int count = pElement->__children.GetCount(); + for (int i = 0; i < count; i++) + { + _VeDebug::DumpVeTree(pElement->__children.GetChildAt(i), indent + 3); + } + + if (indent == 0) + { + VeLog(NID_UI_ANIM, "--------------------------[VE DUMP END]-----------------------------"); +#if 0 + extern int sfc_memory_usage; + VeLog(NID_UI_ANIM, "--------------------------[IMAGE SIZE=%d KB]-----------------------------", sfc_memory_usage / 1024); +#endif + } + } + + SetDebugEnabled(prevDebugEnabled); + + return; +} + + +void +_VeDebug::DumpEvasTree(_VisualElementImpl* pElement, int indent) +{ + if (!pElement) + { + _DisplayManager* pDisplayManager = _DisplayManager::GetInstance(); + if (pDisplayManager != null && pDisplayManager->GetRoot(0)) + { + pElement = _VisualElementImpl::GetInstance(*pDisplayManager->GetRoot(0)); + } + } + + bool prevDebugEnabled = IsDebugEnabled(); + SetDebugEnabled(true); + + if (pElement) + { + if (indent == 0) + { + VeLog(NID_UI_ANIM, "--------------------------[EVAS DUMP START]---------------------------"); + } + + //VELOGEX_NOFUNCTION(pElement, ""); + //VELOGEX_NOFUNCTION(pElement->__pPresentation, "\n"); + + DumpEvasTreeI((Evas_Object*)((_EflNode*)pElement->__pSharedData->pNativeNode)->GetGroupContainer(), indent); + + if (indent == 0) + { + VeLog(NID_UI_ANIM, "--------------------------[EVAS DUMP END]-----------------------------"); + } + } + + SetDebugEnabled(prevDebugEnabled); + + return; +} + + +void +_VeDebug::DumpEvasTreeI(Evas_Object* pParent, int indent) +{ + if (!pParent) + { + return; + } + + bool prevDebugEnabled = IsDebugEnabled(); + SetDebugEnabled(true); + + char logMessage1[LOG_LEN_MAX] = { 0, }; + char logMessage2[LOG_LEN_MAX] = { 0, }; + char logSpaces[LOG_LEN_MAX] = { 0, }; + + int iw = 0; + int ih = 0; + int mox = 0; + int moy = 0; + int mow = 0; + int moh = 0; + int sox = 0; + int soy = 0; + int sow = 0; + int soh = 0; + int mfx = 0; + int mfy = 0; + int mfw = 0; + int mfh = 0; + int sfx = 0; + int sfy = 0; + int sfw = 0; + int sfh = 0; + int red = 0; + int green = 0; + int blue = 0; + int alpha = 0; + int argb = 0; + int renderOperation = 0; + bool mshowState = false; + bool sshowState = false; + void* pBuffer = null; + Tizen::Base::String type(evas_object_type_get(pParent)); + evas_object_geometry_get(pParent, &mox, &moy, &mow, &moh); + + // color & show state + renderOperation = evas_object_render_op_get(pParent); + evas_object_color_get(pParent, &red, &green, &blue, &alpha); + argb = (((alpha << 24) & 0xff000000) | ((red << 16) & 0x00ff0000) | ((green << 8) & 0x0000ff00) | (blue & 0x000000ff)); + mshowState = evas_object_visible_get(pParent); + + if (type != "visual_element")// && argb != 0) + { + bool clip = evas_object_clip_get(pParent) ? true : false; + char source = ' '; + + snprintf(logSpaces, sizeof(logSpaces), "%*s", indent, " "); + if (type == "image") + { + source = 'P'; + } + + if (evas_object_clipees_get(pParent)) + { + type = "cliper"; + } + + snprintf(logMessage1, sizeof(logMessage1), + "%s[%#x][%c] : %ls(%s) fill(%d,%d,%d,%d) bounds(%d,%d,%d,%d) argb(0x%08x) %s clip=%s show=%s", + logSpaces, (unsigned int)pParent, source, type.GetPointer(), evas_object_name_get(pParent), mfx, mfy, mfw, mfh, mox, moy, mow, moh, + (unsigned int)argb, (renderOperation ? "COPY" : "BLEND"), (clip ? "true" : "false"), (mshowState ? "true" : "false") + ); + + VeLog(NID_UI_ANIM, "%s", logMessage1); + + if (type == "image") + { + source = 'S'; + evas_object_image_fill_get(pParent, &mfx, &mfy, &mfw, &mfh); + + // image + Evas_Object* pSource = evas_object_image_source_get(pParent); + pSource = pSource ? pSource : pParent; + + evas_object_image_size_get(pSource, &iw, &ih); + pBuffer = (void*)evas_object_image_data_get(pSource, EINA_FALSE); + evas_object_geometry_get(pSource, &sox, &soy, &sow, &soh); + evas_object_image_fill_get(pSource, &sfx, &sfy, &sfw, &sfh); + sshowState = evas_object_visible_get(pSource); + + snprintf(logMessage2, sizeof(logMessage2), + "%s[%#x][%c] : %ls(%s:%#x %d,%d) fill(%d,%d,%d,%d) bounds(%d,%d,%d,%d) argb(0x%08x) %s show=%s", + logSpaces, (unsigned int)pSource, source, type.GetPointer(), evas_object_name_get(pParent), (unsigned int)pBuffer, iw, ih, sfx, sfy, sfw, sfh, sox, soy, sow, soh, + (unsigned int)argb, (renderOperation ? "COPY" : "BLEND"), (sshowState ? "true" : "false") + ); + + VeLog(NID_UI_ANIM, "%s", logMessage2); + } + } + + + void* pObject = null; + Eina_List* pList = evas_object_smart_members_get(pParent); + EINA_LIST_FREE(pList, pObject) + { + if (pObject) + { + DumpEvasTreeI((Evas_Object*)pObject, indent+2); + } + } + + SetDebugEnabled(prevDebugEnabled); + + return; +} + +void +_VeDebug::DumpAllEvas(Evas* pEvas) +{ + Eina_List* pEvasObjects = null; + void* pObject = null; + Evas_Object* pEvasObject = null; +// int w, h; + + if (pEvas) + { + pEvasObjects = evas_objects_in_rectangle_get(pEvas, + -99999, -99999, 99999 * 2, 99999 * 2, + 1, 1 + ); + } + + if (!pEvasObjects) + { + return; + } + + VeLog(NID_UI_ANIM, "--------------------------[EVAS ALL DUMP START]-----------------------------"); + + pEvasObject = null; + EINA_LIST_FREE(pEvasObjects, pObject) + { + if (likely(pObject)) + { + pEvasObject = (Evas_Object*)pObject; + + Tizen::Base::String type(evas_object_type_get(pEvasObject)); + + char logMessage[1024]; + int iw = 0; + int ih = 0; + int ox = 0; + int oy = 0; + int ow = 0; + int oh = 0; + int red = 0; + int green = 0; + int blue = 0; + int alpha = 0; + int argb = 0; + Evas_Object* pSource = NULL; + if (type == "image") + { + pSource = evas_object_image_source_get(pEvasObject); + evas_object_image_size_get(pEvasObject, &iw, &ih); + } + evas_object_geometry_get(pEvasObject, &ox, &oy, &ow, &oh); + evas_object_color_get(pEvasObject, &red, &green, &blue, &alpha); + argb = (((alpha << 24) & 0xff000000) | ((red << 16) & 0x00ff0000) | ((green << 8) & 0x0000ff00) | (blue & 0x000000ff)); + bool showState = evas_object_visible_get(pEvasObject); + + snprintf(logMessage, sizeof(logMessage), " - type=%ls[%p] bounds=[%d:%d ~ %d:%d] imgsize=[%d:%d] show=%s color=%08X source=%p", + type.GetPointer(), pEvasObject, ox, oy, ox + ow, oy + oh, iw, ih, (showState ? "visible" : "invisible"), argb, pSource); + + VeLog(NID_UI_ANIM, "%s", logMessage); + } + } + + VeLog(NID_UI_ANIM, "--------------------------[EVAS ALL DUMP END]-----------------------------"); +} + +void +_VeDebug::DumpAllEvasImages(Evas *pEvas) +{ + Eina_List* pEvasObjects = null; + void* pObject = null; + Evas_Object* pEvasObject = null; + static int count = 0; + char filename[2048] = {0, }; + const char* pathPrefix = "/tmp/"; + + if (pEvas) + { + pEvasObjects = evas_objects_in_rectangle_get(pEvas, + -99999, -99999, 99999 * 2, 99999 * 2, + 1, 1 + ); + } + + if (!pEvasObjects) + { + return; + } + + VeLog(NID_UI_ANIM, "--------------------------[EVAS ALL DUMP IMAGE START]-----------------------------"); + + pEvasObject = null; + EINA_LIST_FREE(pEvasObjects, pObject) + { + if (likely(pObject)) + { + pEvasObject = (Evas_Object*)pObject; + + Tizen::Base::String type(evas_object_type_get(pEvasObject)); + + if (type == "image") + { + Evas_Object* pSource = evas_object_image_source_get(pEvasObject); + pEvasObject = pSource ? pSource : pEvasObject; + + if (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")) + { + evas_object_image_save(pEvasObject, "/tmp/lastimage.png", NULL, "quality=100 compress=9"); + VeLog(NID_UI_ANIM, "--------------------------[VE DUMP IMAGE END]-----------------------------"); + } + else + { + VeLog(NID_UI_ANIM, "--------------------------[VE DUMP IMAGE ERROR!!!]-----------------------------"); + } + } + } + } + } + + VeLog(NID_UI_ANIM, "--------------------------[EVAS ALL DUMP IMAGE END]-----------------------------"); +} + +void +_VeDebug::PrintVeTree(_VisualElementImpl* pElement, int depth, unsigned int remainingChild) +{ + static Tizen::Base::String output = ""; + Tizen::Base::String item = ""; + Tizen::Base::String surface = ""; + Tizen::Base::String name = ""; + + if (!pElement) + { + _DisplayManager* pDisplayManager = _DisplayManager::GetInstance(); + if (pDisplayManager != null && pDisplayManager->GetRoot(0)) + { + pElement = _VisualElementImpl::GetInstance(*pDisplayManager->GetRoot(0)); + } + } + + if (!pElement) + { + return; + } + + + bool prevDebugEnabled = IsDebugEnabled(); + SetDebugEnabled(true); + + if (pElement->GetSharedData().pSurface) + { + surface = "(S)"; + } + + if (pElement->GetName().GetLength() <= 0) + { + name.Format(255, L"%ls%#x", surface.GetPointer(), pElement); + } + else + { + name.Format(255, L"%ls%ls", surface.GetPointer(), pElement->GetName().GetPointer()); + } + + // Print + for (int i = 1; i <= depth; i++) + { + int childrenCount = 0; + if (pElement->__pParent) + { + childrenCount = pElement->__pParent->__children.GetCount(); + } + + // only one child + if (childrenCount <= 1) + { + if (remainingChild) + { + remainingChild -= pow(10, depth - 1); + } + + // Print name + item.Format(255, L"-%-16ls", name.GetPointer()); + output.Append(item); + break; + } + // first child + else if (DIGITATPOSITION(remainingChild, depth) == childrenCount) + { + remainingChild -= powf(10.0f, depth - 1); + + // Print name + item.Format(255, L"T%-16ls", name.GetPointer()); + output.Append(item); + break; + } + // last child + else if (depth == i) + { + remainingChild -= powf(10.0f, depth - 1); + // Print name + item.Format(255, L"%s%-16ls", (DIGITATPOSITION(remainingChild, i) == 0) ? "L" : "L", name.GetPointer()); + output.Append(item); + } + // other + else + { + item.Format(255, L"%s%-16ls", (DIGITATPOSITION(remainingChild, i) > 0) ? "|" : " ", L""); + output.Append(item); + } + } + + // Print children + int count = pElement->__children.GetCount(); + if (count > 0) + { + for (int i = 0; i < count; i++) + { + if (pElement->__children.GetChildAt(i)) + { + PrintVeTree(pElement->__children.GetChildAt(i), depth + 1, remainingChild + (count - i) * powf(10.0f, depth)); + } + } + } + else + { + //output.Append("\n"); + // Print log + VeLog(NID_UI_ANIM, "%s", output.GetPointer()); + output = ""; + } + + SetDebugEnabled(prevDebugEnabled); +} + +void +_VeDebug::DumpVeImage(_VisualElementImpl* pElement, const char* pathPrefix) +{ + static int count = 0; + char filename[2048] = {0, }; + + if (!pathPrefix) + { + pathPrefix = "/tmp/"; + } + + if (!pElement) + { + _DisplayManager* pDisplayManager = _DisplayManager::GetInstance(); + if (pDisplayManager != null && pDisplayManager->GetRoot(0)) + { + pElement = _VisualElementImpl::GetInstance(*pDisplayManager->GetRoot(0)); + } + } + + if (!pElement) + { + return; + } + + + Tizen::Base::String name = pElement->GetName(); + if (name.GetLength() > 0) + { + snprintf(filename, sizeof(filename), "%sVE_%d_%ls_%08x.png", pathPrefix, count++, pElement->GetName().GetPointer(), (unsigned int)pElement->GetPresentation()); + } + else + { + snprintf(filename, sizeof(filename), "%sVE_%d_%08x.png", pathPrefix, count++, (unsigned int)pElement->GetPresentation()); + } + + VisualElementSurface* pSurface = pElement->__pSharedData->pNativeNode->GetSurface(); + if (pSurface && _VisualElementSurfaceImpl::GetInstance(*pSurface)) + { + Evas_Object* pEvasObjectImage = null; + Evas_Object* pSource = evas_object_image_source_get((Evas_Object*)_VisualElementSurfaceImpl::GetInstance(*pSurface)->GetNativeHandle()); + if (pSource) + { + pEvasObjectImage = pSource; + } + else + { + pEvasObjectImage = (Evas_Object*)_VisualElementSurfaceImpl::GetInstance(*pSurface)->GetNativeHandle(); + } + + if (pEvasObjectImage) + { + VeLog(NID_UI_ANIM, "--------------------------[VE DUMP IMAGE START %#08x]---------------------------", pElement); + if (evas_object_image_save(pEvasObjectImage, filename, NULL, "quality=100 compress=9")) + { + evas_object_image_save(pEvasObjectImage, "/tmp/lastimage.png", NULL, "quality=100 compress=9"); + VeLog(NID_UI_ANIM, "--------------------------[VE DUMP IMAGE END]-----------------------------"); + } + else + { + VeLog(NID_UI_ANIM, "--------------------------[VE DUMP IMAGE ERROR!!!]-----------------------------"); + } + } + } +} + +void +_VeDebug::DumpAllVeImages(_VisualElementImpl* pElement, const char* pathPrefix) +{ + if (!pElement) + { + _DisplayManager* pDisplayManager = _DisplayManager::GetInstance(); + if (pDisplayManager != null && pDisplayManager->GetRoot(0)) + { + pElement = _VisualElementImpl::GetInstance(*pDisplayManager->GetRoot(0)); + } + } + + if (pElement == null) + { + return; + } + + DumpVeImage(pElement, pathPrefix); + + int count = pElement->__children.GetCount(); + for (int i = 0; i < count; i++) + { + if (pElement->__children.GetChildAt(i)) + { + DumpAllVeImages(pElement->__children.GetChildAt(i), pathPrefix); + } + } +} + +void +_VeDebug::ReflushAll(_VisualElementImpl* pElement, int depth) +{ + pElement->SetFlushNeeded(); + + int count = pElement->__children.GetCount(); + for (int i = 0; i < count; i++) + { + ReflushAll(pElement->__children.GetChildAt(i), depth + 1); + } + + if (depth == 0) + { + _EflNode* pEflNode = dynamic_cast< _EflNode* >(pElement->__pSharedData->pNativeNode); + if (pEflNode != null) + { + ecore_evas_manual_render(ecore_evas_ecore_evas_get(pEflNode->GetEvas())); + } + } +} + + +}}} // Tizen::Ui::Animations + + +extern "C" _OSP_EXPORT_ void +DumpVeTree(void) +{ + Tizen::Ui::Animations::_DisplayManager* pDisplayManager = Tizen::Ui::Animations::_DisplayManager::GetInstance(); + + for (int i = 0; i < pDisplayManager->GetRootCount(); i++) + { + Tizen::Ui::Animations::_VisualElementImpl* pVisualElementImpl = Tizen::Ui::Animations::_VisualElementImpl::GetInstance(*pDisplayManager->GetRoot(i)); + if (pVisualElementImpl) + { + Tizen::Ui::Animations::_VeDebug::DumpVeTree(pVisualElementImpl, 0); + } + } +} + +extern "C" _OSP_EXPORT_ void +DumpEvasTree(void) +{ + Tizen::Ui::Animations::_DisplayManager* pDisplayManager = Tizen::Ui::Animations::_DisplayManager::GetInstance(); + + for (int i = 0; i < pDisplayManager->GetRootCount(); i++) + { + Tizen::Ui::Animations::_VisualElementImpl* pVisualElementImpl = Tizen::Ui::Animations::_VisualElementImpl::GetInstance(*pDisplayManager->GetRoot(i)); + if (pVisualElementImpl) + { + Tizen::Ui::Animations::_VeDebug::DumpEvasTree(pVisualElementImpl, 0); + } + } +} + +extern "C" _OSP_EXPORT_ void +DumpAllVeImages(void) +{ + Tizen::Ui::Animations::_DisplayManager* pDisplayManager = Tizen::Ui::Animations::_DisplayManager::GetInstance(); + + for (int i = 0; i < pDisplayManager->GetRootCount(); i++) + { + Tizen::Ui::Animations::_VisualElementImpl* pVisualElementImpl = Tizen::Ui::Animations::_VisualElementImpl::GetInstance(*pDisplayManager->GetRoot(i)); + if (pVisualElementImpl) + { + Tizen::Ui::Animations::_VeDebug::DumpAllVeImages(pVisualElementImpl, 0); + } + } +} + +extern "C" _OSP_EXPORT_ void +DumpAllEvas(void) +{ + Tizen::Ui::Animations::_DisplayManager* pDisplayManager = Tizen::Ui::Animations::_DisplayManager::GetInstance(); + + for (int i = 0; i < pDisplayManager->GetRootCount(); i++) + { + Tizen::Ui::Animations::_RootVisualElement* pRoot = pDisplayManager->GetRoot(i); + if (!pRoot) + { + continue; + } + Tizen::Ui::Animations::_EflLayer* pLayer = dynamic_cast(pRoot->GetNativeLayer()); + if (!pLayer) + { + continue; + } + Evas* pEvas = pLayer->GetEvas(); + if (!pEvas) + { + continue; + } + Tizen::Ui::Animations::_VeDebug::DumpAllEvas(pEvas); + } +} + +extern "C" _OSP_EXPORT_ void +DumpAllEvasImages(void) +{ + Tizen::Ui::Animations::_DisplayManager* pDisplayManager = Tizen::Ui::Animations::_DisplayManager::GetInstance(); + + for (int i = 0; i < pDisplayManager->GetRootCount(); i++) + { + Tizen::Ui::Animations::_RootVisualElement* pRoot = pDisplayManager->GetRoot(i); + if (!pRoot) + { + continue; + } + Tizen::Ui::Animations::_EflLayer* pLayer = dynamic_cast(pRoot->GetNativeLayer()); + if (!pLayer) + { + continue; + } + Evas* pEvas = pLayer->GetEvas(); + if (!pEvas) + { + continue; + } + Tizen::Ui::Animations::_VeDebug::DumpAllEvasImages(pEvas); + } +} + +#ifdef UI_ANIM_DEBUG +extern "C" _OSP_EXPORT_ void +DumpVeLayout(void) +{ + Tizen::Ui::Animations::_DisplayManager* pDisplayManager = Tizen::Ui::Animations::_DisplayManager::GetInstance(); + + int ret = system("rm -rf /tmp/layout"); + ret = system("mkdir /tmp/layout"); + if (ret) + { + return; + } + + FILE* pFile = fopen("/tmp/layout/layout.html", "w"); + fprintf(pFile, "\n"); + fprintf(pFile, "
\n"); + fprintf(pFile, "
Model\n"); + fprintf(pFile, "
\n"); + // Model + for (int i = 0; i < pDisplayManager->GetRootCount(); i++) + { + Tizen::Ui::Animations::_VisualElementImpl* pVisualElementImpl = Tizen::Ui::Animations::_VisualElementImpl::GetInstance(*pDisplayManager->GetRoot(i)); + if (pVisualElementImpl) + { + Tizen::Ui::Animations::_VeDebug::DumpVeLayout(pVisualElementImpl, 0, pFile); + } + } + fprintf(pFile, "
\n"); + fprintf(pFile, "
Presentation\n"); + fprintf(pFile, "
\n"); + + // Presentation + for (int i = 0; i < pDisplayManager->GetRootCount(); i++) + { + Tizen::Ui::Animations::_VisualElementImpl* pVisualElementImpl = const_cast(Tizen::Ui::Animations::_VisualElementImpl::GetInstance(*pDisplayManager->GetRoot(i)->AcquirePresentationInstance())); + if (pVisualElementImpl) + { + Tizen::Ui::Animations::_VeDebug::DumpVeLayout(pVisualElementImpl, 0, pFile); + } + pDisplayManager->GetRoot(i)->ReleasePresentationInstance(); + } + fprintf(pFile, "
\n"); + + fprintf(pFile, "\n"); + fprintf(pFile, "\n"); + fclose(pFile); +} + +extern "C" _OSP_EXPORT_ void +DumpEvasTreeGraph(void) +{ + Tizen::Ui::Animations::_DisplayManager* pDisplayManager = Tizen::Ui::Animations::_DisplayManager::GetInstance(); + + for (int i = 0; i < pDisplayManager->GetRootCount(); i++) + { + char filePath[256]; + snprintf(filePath, sizeof(filePath), "/tmp/graph_%d.dot", i); + Tizen::Ui::Animations::_VeDebug::DumpEvasTreeGraph(filePath, pDisplayManager->GetRoot(i)); + } +} +#endif + +#ifdef __i386__ +extern "C" _OSP_EXPORT_ void +DebugAnimBreak(void) +{ + asm volatile ("int $3\n"); +} +#endif + + +#endif + diff --git a/src/ui/animations/FUiAnim_Debug.h b/src/ui/animations/FUiAnim_Debug.h new file mode 100644 index 0000000..4a119b0 --- /dev/null +++ b/src/ui/animations/FUiAnim_Debug.h @@ -0,0 +1,192 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_Debug.h + * @brief Header file of _VeDebug class + * + * This file contains declarations _VeDebug class. + */ + +#ifndef _FUI_ANIM_INTERNAL_DEBUG_H_ +#define _FUI_ANIM_INTERNAL_DEBUG_H_ + +#include +#include + +//#define VE_DEBUG // debug config +//#define UI_ANIM_DEBUG +#define VE_DEBUG_MODULE + +extern "C" _OSP_EXPORT_ void DumpAllEvas(void); +extern "C" _OSP_EXPORT_ void DumpVeTree(void); +extern "C" _OSP_EXPORT_ void DumpEvasTree(void); +extern "C" _OSP_EXPORT_ void DumpVeLayout(void); + +namespace Tizen { namespace Ui { namespace Animations +{ + +#ifdef VE_DEBUG_MODULE + +#ifdef _OSP_PERF_ +class _ElapsedTime +{ +public: + _ElapsedTime(const char* tag = null) + { + struct timeval tv; + + tagName = tag; + + gettimeofday(&tv, null); + start_time = (long long)tv.tv_sec * 1000000LL + (long long)tv.tv_usec / 1LL; + + depth++; + maxdepth++; + } + + ~_ElapsedTime(void) + { + long long end_time; + struct timeval tv; + gettimeofday(&tv, null); + end_time = (long long)tv.tv_sec * 1000000LL + (long long)tv.tv_usec / 1LL; + + depth--; + if (count < 500) + snprintf(logs[count++], 256, "%*s -->[%s]=%lld us\n", depth * 3, " ", tagName, end_time - start_time); + + if (depth == 0) + { + for (int i = 0; i < count; i++) + printf("%s", logs[i]); + + maxdepth = 0; + count = 0; + } + } + + +public: + static char logs[500][256]; + static int depth; + static int count; + static int maxdepth; + long long start_time; + const char* tagName; +}; // _ElapsedTime +#endif + +#define VeLog(UID, ...) \ + SysLogInternal(UID, 0, 0, __VA_ARGS__); +#define VELOG(...) \ + do \ + { \ + if (_VeDebug::IsDebugEnabled()) \ + { \ + _VeDebug::DumpVisualElement(this, __func__, __LINE__, __VA_ARGS__); \ + } \ + } while (0) + +#define VELOGEX(_ELEMENT_, ...) \ + do \ + { \ + if (_VeDebug::IsDebugEnabled()) \ + { \ + _VeDebug::DumpVisualElement(_ELEMENT_, __func__, __LINE__, __VA_ARGS__); \ + } \ + } while (0) + +#define VELOGEX_NOFUNCTION(_ELEMENT_, ...) \ + do \ + { \ + if (_VeDebug::IsDebugEnabled()) \ + { \ + _VeDebug::DumpVisualElement(_ELEMENT_, null, 0, __VA_ARGS__); \ + } \ + } while (0) + +#define VEDUMPTREE(_ELEMENT_, _INDENT_) \ + do \ + { \ + if (_VeDebug::IsDebugEnabled()) \ + { \ + _VeDebug::DumpVeTree(_ELEMENT_, _INDENT_); \ + } \ + } while (0) + +#define VELOGRECTTAG "[%.1f:%.1f ~ %.1f:%.1f]" +#define VELOGRECT(r) (r).x, (r).y, (r).GetBottomRight().x, (r).GetBottomRight().y + +class _VisualElementImpl; + +class _VeDebug +{ +public: + static void DumpVisualElement(_VisualElementImpl* pElement, const char* func, int line, const char* fmt, ...); + static void PrintVeTree(_VisualElementImpl* pElement = 0, int depth = 0, unsigned int remainedChild = 0); + static void DumpVeTree(_VisualElementImpl* pElement = 0, int indent = 0); + static void DumpVeImage(_VisualElementImpl* pElement = 0, const char* pathPrefix = 0); + static void DumpAllVeImages(_VisualElementImpl* pElement = 0, const char* pathPrefix = 0); + static void ReflushAll(_VisualElementImpl* pElement, int depth = 0); + static void SetDebugEnabled(bool enable); + static bool IsDebugEnabled(void); + + static void DumpEvasTree(_VisualElementImpl* pElement, int indent); + static void DumpAllEvas(Evas* pEvas); + static void DumpAllEvasImages(Evas* pEvas); + +#ifdef UI_ANIM_DEBUG + static void DumpVisualElementLayout(_VisualElementImpl* pElement, FILE* pFile); + static void DumpVeLayout(_VisualElementImpl* pElement, int indent, FILE* pFile); + + static void DumpEvasObjectForGraphI(FILE* pFile, Evas_Object* pEvasObject, int depth, int pos); + static void DumpEvasTreeGraphI(FILE* pFile, Evas_Object* pObject, int depth, int pos); + static void DumpVeObjectForGraphI(FILE* pFile, _VisualElementImpl* pVisualElementImpl, int depth, int pos); + static void DumpVeTreeGraphI(FILE* pFile, _VisualElementImpl* pVisualElementImpl, int depth, int pos); + + static void DumpEvasTreeGraph(const char* pFilePath, VisualElement* pVisualElement); +#endif + + +private: + _VeDebug(void); + _VeDebug(const _VeDebug& rhs); + ~_VeDebug(void); + + _VeDebug& operator =(const _VeDebug& rhs); + +private: + static void DumpEvasTreeI(Evas_Object* pParent, int indent); + +private: + static bool __veDebugEnabled; +}; //_VeDebug + +#else +#define VELOG(...) +#define VELOGEX(_Element_, ...) +#define VELOGEX_NOFUNCTION(_ELEMENT_, ...) +#define VEDUMPTREE(_ELEMENT_, _INDENT_) +#define VELOGRECTTAG +#define VELOGRECT(r) +#endif + +}}} // Tizen::Ui::Animations + +#endif //_FUI_ANIM_INTERNAL_DEBUG_H_ + diff --git a/src/ui/animations/FUiAnim_DimensionAnimationImpl.cpp b/src/ui/animations/FUiAnim_DimensionAnimationImpl.cpp new file mode 100644 index 0000000..7904b9f --- /dev/null +++ b/src/ui/animations/FUiAnim_DimensionAnimationImpl.cpp @@ -0,0 +1,129 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_DimensionAnimationImpl.cpp + * @brief This file contains implementation of _DimensionAnimationImpl class + * + * This file contains implementation _DimensionAnimationImpl class. + */ + +#include +#include + +#include + +#include "FUiAnim_VisualElementAnimationVariantInterpolator.h" +#include "FUiAnim_AnimationBaseImpl.h" +#include "FUiAnim_DimensionAnimationImpl.h" + + +using namespace Tizen::Base; +using namespace Tizen::Ui::Animations; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; + + +namespace Tizen { namespace Ui { namespace Animations +{ + +_DimensionAnimationImpl::~_DimensionAnimationImpl(void) +{ +} + +_DimensionAnimationImpl::_DimensionAnimationImpl(DimensionAnimation* pDimensionAnimation) + : anchorX(0.0f) + , anchorY(0.0f) + , startValue(Dimension(0, 0)) + , endValue(Dimension(0, 0)) + , __pDimensionAnimation(pDimensionAnimation) +{ +} + +result +_DimensionAnimationImpl::CopyDimensionAnimationValue(const DimensionAnimation& dimensionAnimation) +{ + result r = E_SUCCESS; + + _AnimationBaseImpl* pAnimationBaseImpl = __pDimensionAnimation->_pAnimationBaseImpl; + + // Deleting the contents of existing keyframe + r = pAnimationBaseImpl->RemoveAllKeyFrames(); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), r, "Propagating."); + + // Copying the contents + startValue = dimensionAnimation._pDimensionAnimationImpl->startValue; + endValue = dimensionAnimation._pDimensionAnimationImpl->endValue; + + if (dimensionAnimation._pAnimationBaseImpl->keyFrameList.GetCount() == 0) + { + return E_SUCCESS; + } + + IMapEnumeratorT< long, Object* >* pMapEnum = null; + MapEntryT< long, Object* > value; + Dimension* pDimensionObj = null; + + pMapEnum = dimensionAnimation._pAnimationBaseImpl->keyFrameList.GetMapEnumeratorN(); + r = GetLastResult(); + SysTryReturnResult(NID_UI_ANIM, (pMapEnum), r, "Failed to GetMapEnumeratorN()"); + + while (pMapEnum->MoveNext() == E_SUCCESS) + { + r = pMapEnum->GetCurrent(value); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + Dimension* pDimValue = dynamic_cast< Dimension* >(value.GetValue()); + SysTryCatch(NID_UI_ANIM, (pDimValue), r = E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. KeyFrame value is invalid."); + + pDimensionObj = new (std::nothrow) Dimension(*pDimValue); + SysTryCatch(NID_UI_ANIM, (pDimensionObj), r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = pAnimationBaseImpl->keyFrameList.Add(value.GetKey(), pDimensionObj); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + delete pMapEnum; + + return E_SUCCESS; + +CATCH: + delete pDimensionObj; + delete pMapEnum; + + return r; +} + +result +_DimensionAnimationImpl::GetAnimatedValue(float actualProgress, Tizen::Graphics::Dimension& animatedValue) const +{ + Variant startDimension(startValue); + Variant endDimension(endValue); + Variant value(Dimension(0, 0)); + + _VisualElementAnimationVariantInterpolator variantInterpolator; + result r = variantInterpolator.Interpolate(actualProgress, startDimension, endDimension, value); + + animatedValue = value.ToDimension(); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to get the animated value."); + + return r; +} + + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnim_DimensionAnimationImpl.h b/src/ui/animations/FUiAnim_DimensionAnimationImpl.h new file mode 100644 index 0000000..286569b --- /dev/null +++ b/src/ui/animations/FUiAnim_DimensionAnimationImpl.h @@ -0,0 +1,58 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_DimensionAnimationImpl.h + * @brief This is the header file for the _DimensionAnimationImpl class. + * + * This header file contains the declarations of the _DimensionAnimationImpl class. + */ + +#ifndef _FUI_ANIM_INTERNAL_DIMENSION_ANIMATION_IMPL_H_ +#define _FUI_ANIM_INTERNAL_DIMENSION_ANIMATION_IMPL_H_ + +#include + +namespace Tizen { namespace Ui { namespace Animations +{ + +class _DimensionAnimationImpl + : public Tizen::Base::Object +{ +public: + _DimensionAnimationImpl(DimensionAnimation* pDimensionAnimation); + ~_DimensionAnimationImpl(void); + + result CopyDimensionAnimationValue(const DimensionAnimation& dimensionAnimation); + + result GetAnimatedValue(float actualProgress, Tizen::Graphics::Dimension& animatedValue) const; + + float anchorX; + float anchorY; + + Tizen::Graphics::Dimension startValue; + Tizen::Graphics::Dimension endValue; + +private: + _DimensionAnimationImpl(const DimensionAnimation& rhs); + _DimensionAnimationImpl& operator =(const _DimensionAnimationImpl& rhs); + DimensionAnimation* __pDimensionAnimation; +}; // _DimensionAnimationImpl + +}}} // Tizen::Ui::Animations + +#endif //_FUI_ANIM_INTERNAL_DIMENSION_ANIMATION_IMPL_H_ diff --git a/src/ui/animations/FUiAnim_DisplayContextImpl.cpp b/src/ui/animations/FUiAnim_DisplayContextImpl.cpp new file mode 100644 index 0000000..daec28c --- /dev/null +++ b/src/ui/animations/FUiAnim_DisplayContextImpl.cpp @@ -0,0 +1,101 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_DisplayContextImpl.cpp + * @brief This is the implementation file for DisplayContext class. + * + * This file contains implementation DisplayContext class. + */ + +#include +#include "FUiAnim_NativeLayer.h" +#include "FUiAnim_VisualElementImpl.h" +#include "FUiAnimDisplayContext.h" +#include "FUiAnim_DisplayContextImpl.h" + +using namespace Tizen::Base; + +namespace Tizen { namespace Ui { namespace Animations +{ + +_DisplayContextImpl::_DisplayContextImpl(const _NativeLayer& layer) + : _pPublicInstance(null) +{ + __pLayer = const_cast<_NativeLayer*>(&layer); +} + +_DisplayContextImpl::~_DisplayContextImpl(void) +{ + _pPublicInstance = null; + __pLayer = null; +} + +result +_DisplayContextImpl::SetPublicInstance(DisplayContext* pInstance) +{ + _pPublicInstance = pInstance; + return E_SUCCESS; +} + +DisplayContext* +_DisplayContextImpl::GetPublicInstance(void) +{ + return _pPublicInstance; +} + +result +_DisplayContextImpl::SetNativeLayer(const _NativeLayer& layer) +{ + __pLayer = const_cast<_NativeLayer*>(&layer); + + return E_SUCCESS; +} + +_DisplayContextImpl* +_DisplayContextImpl::GetInstance(DisplayContext& displayContext) +{ + return displayContext._pDisplayContextImpl; +} + +const _DisplayContextImpl* +_DisplayContextImpl::GetInstance(const DisplayContext& displayContext) +{ + return displayContext._pDisplayContextImpl; +} + +DisplayContext* +_DisplayContextImpl::CreatePublicInstance(const _NativeLayer& layer) +{ + DisplayContext* pContext = new (std::nothrow) DisplayContext(); + + SysTryReturn(NID_UI_ANIM, pContext, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pContext->_pDisplayContextImpl = new (std::nothrow) _DisplayContextImpl(layer); + + return pContext; +} + +result +_DisplayContextImpl::DestroyPublicInstance(const DisplayContext& displayContext) +{ + delete &displayContext; + return E_SUCCESS; +} + + +}}} diff --git a/src/ui/animations/FUiAnim_DisplayManager.cpp b/src/ui/animations/FUiAnim_DisplayManager.cpp new file mode 100644 index 0000000..5f36a04 --- /dev/null +++ b/src/ui/animations/FUiAnim_DisplayManager.cpp @@ -0,0 +1,338 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_DisplayManager.cpp + * @brief This file contains implementation of _DisplayManager class + * + * This file contains implementation _DisplayManager class. + */ +#include +#include +#include +#include "FUiAnim_NativeLayer.h" +#include "FUiAnim_RootVisualElement.h" +#include "FUiAnim_VisualElementImpl.h" +#include "FUiAnim_VisualElementEnvironment.h" +#include "FUiAnim_AnimationManager.h" +#include "FUiAnim_DisplayManager.h" + +using namespace Tizen; +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Ui::Animations; + + +namespace +{ +Eina_Bool +WakeupEventCallback(void* pData, int type, void* pEvent) +{ + _DisplayManager::__wakeUpEventAdded = false; + + return ECORE_CALLBACK_PASS_ON; +} + +} + +namespace Tizen { namespace Ui { namespace Animations +{ +int _DisplayManager::__eventType = 0; +void* _DisplayManager::__pWakeUpEventHandler = null; +bool _DisplayManager::__wakeUpEventAdded = false; +_DisplayManager* _DisplayManager::__pInstance = null; +_DisplayManager::RestoreContextCallback _DisplayManager::__pRestoreContextCallback = null; + +_DisplayManager::_DisplayManager(void) + : __roots() +{ + __roots.Construct(); +} + +_DisplayManager::~_DisplayManager(void) +{ +// while (__roots.GetCount() > 0) +// { +// _RootVisualElement* pRoot = static_cast< _RootVisualElement* >(__roots.GetAt(0)); + +// pRoot->Destroy(); +// __roots.RemoveAt(0); +// } + __pInstance = null; +} + +result +_DisplayManager::CreateInstance(void) +{ + SysTryReturnResult(NID_UI_ANIM, !__pInstance, E_OBJ_ALREADY_EXIST, "The display manager is already created."); + + __pInstance = new (std::nothrow) _DisplayManager(); + if (!__pInstance) + { + return E_OUT_OF_MEMORY; + } + + _VisualElementEnvironment::Initialize(); + + // for wake up event + __eventType = ecore_event_type_new(); + __pWakeUpEventHandler = (void*)ecore_event_handler_add(__eventType, WakeupEventCallback, null); + + return E_SUCCESS; +} + +result +_DisplayManager::ReleaseInstance(void) +{ + SysTryReturnResult(NID_UI_ANIM, __pInstance, E_INVALID_STATE, "The display manager is not created."); + + if (__pWakeUpEventHandler) + { + ecore_event_handler_del((Ecore_Event_Handler*)__pWakeUpEventHandler); + } + + delete __pInstance; + __pInstance = null; + + return E_SUCCESS; +} + +_RootVisualElement* +_DisplayManager::CreateRoot(void) +{ + _RootVisualElement* pRoot = new (std::nothrow) _RootVisualElement(); + if (!pRoot) + { + return null; + } + + pRoot->Construct(); + pRoot->SetImplicitAnimationEnabled(false); + pRoot->SetShowState(true); + + RegisterRoot(*pRoot); + + return pRoot; +} + +result +_DisplayManager::DestroyRoot(_RootVisualElement& root) +{ + result r = UnregisterRoot(root); + + if (r != E_SUCCESS) + { + SysLogException(NID_UI_ANIM, E_INVALID_ARG, "[E_INVALID_ARG] root is not managed in the DisplayManager" ); + } + + root.Destroy(); + + return E_SUCCESS; +} + +result +_DisplayManager::RegisterRoot(_RootVisualElement& root) +{ + return __roots.Add(root); +} + +result +_DisplayManager::UnregisterRoot(_RootVisualElement& root) +{ + return __roots.Remove(root); +} + +int +_DisplayManager::GetRootCount(void) const +{ + return __roots.GetCount(); +} + +_RootVisualElement* +_DisplayManager::GetRoot(int index) const +{ + const _RootVisualElement* pRoot = static_cast< const _RootVisualElement* >(__roots.GetAt(index)); + return const_cast< _RootVisualElement* >(pRoot); +} + +void +_DisplayManager::AddWakeUpEvent(void) +{ + if (!__wakeUpEventAdded) + { + ecore_event_add(__eventType, NULL, NULL, NULL); + __wakeUpEventAdded = true; + } +} + +bool +_DisplayManager::RenderAll(void) +{ + bool needUpdate = false; + int count = __roots.GetCount(); + if (count > 0) + { + for (int i = 0; i < count; i++) + { + _RootVisualElement* pRoot = static_cast< _RootVisualElement* >(__roots.GetAt(i)); + if (likely(pRoot)) + { + bool updated = Render(*pRoot); + + needUpdate |= updated; + + if (updated) + { + _NativeLayer* pLayer = pRoot->GetNativeLayer(); + if (likely(pLayer)) + { + pLayer->SetFlushNeeded(); + } + } + + PostRender(*pRoot); + } + } + } + + return needUpdate; +} + +bool +_DisplayManager::Render(_RootVisualElement& root) +{ + // VisualElement Rendering + // Fill contents + + // Prevent recursion for rendering ! + + // WARNING: + // EFL BUG !!!!! + // if the contents of evas object image is changed with geometry change, + // damage area is not calculated correctly !!! when event freeze/thaw enabled. + // --> artifact occurs + + //evas_event_freeze(__pEvas); + + bool updated = false; + + _RootVisualElement* pPresentationRoot = static_cast< _RootVisualElement* >(const_cast(root.AcquirePresentationInstance())); + if (pPresentationRoot) + { + _VisualElementImpl* pRootModelImpl = _VisualElementImpl::GetInstance(root); + _VisualElementImpl* pRootPresentationImpl = _VisualElementImpl::GetInstance(*pPresentationRoot); + + if (likely(pRootModelImpl) && likely(pRootPresentationImpl)) + { + //-------------------; + // + if (//likely((pRootModelImpl->__childrenNeedsUpdateProps) != 0) || + likely(pRootPresentationImpl->__childrenNeedsUpdateProps != 0) || + likely(pRootPresentationImpl->__pSharedData->NeedNativeReconfigure()) || + unlikely(root.GetNeedsContentUpdate()) || + unlikely(pPresentationRoot->GetNeedsContentUpdate())) + { + root.SetNeedsContentUpdate(false); + pRootModelImpl->Draw(); + + pPresentationRoot->SetNeedsContentUpdate(false); + pRootPresentationImpl->Draw(); + + updated = true; + } + } + } + root.ReleasePresentationInstance(); + + + //evas_event_thaw(__pEvas); + //evas_event_thaw_eval(__pEvas); // CHECKME: needed ??? + + return updated; +} + +result +_DisplayManager::PostRender(_RootVisualElement& root) +{ +// _ElapsedTime foo("PostRender"); + + + _RootVisualElement* pPresentationRoot = static_cast< _RootVisualElement* >(const_cast(root.AcquirePresentationInstance())); + if (likely(pPresentationRoot)) + { + _VisualElementImpl* pRootPresentationImpl = _VisualElementImpl::GetInstance(*pPresentationRoot); + + if (likely(pRootPresentationImpl->__childrenNeedsUpdateProps) || + likely(pRootPresentationImpl->__pSharedData->NeedNativeReconfigure()) || + unlikely(root.GetNeedsContentUpdate()) || + unlikely(pPresentationRoot->GetNeedsContentUpdate())) + { + // CHECKME: + // We need wake-up main-loop for VE to be validated(draw) on next loop iteration. + // Is there another good method for this??? + + AddWakeUpEvent(); + } + } + root.ReleasePresentationInstance(); + + return E_SUCCESS; +} + +result +_DisplayManager::Flush(void) +{ + int count = __roots.GetCount(); + if (count > 0) + { + for (int i = 0; i < count; i++) + { + _RootVisualElement* pRoot = static_cast< _RootVisualElement* >(__roots.GetAt(i)); + if (likely(pRoot)) + { + _NativeLayer* pLayer = pRoot->GetNativeLayer(); + +//CHECK ME : when evas marked update flag. +// if (pLayer && pLayer->IsFlushNeeded()) + { + pLayer->Flush(); + pLayer->ResetFlushNeeded(); + } + } + } + } + + return E_SUCCESS; +} + +void +_DisplayManager::SetRestoreContextCallback(RestoreContextCallback pRestoreContextCallback) +{ + __pRestoreContextCallback = pRestoreContextCallback; +} + +void +_DisplayManager::RestoreContext(void) +{ + if (__pRestoreContextCallback) + { + (*__pRestoreContextCallback)(); + } +} + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnim_EflLayer.cpp b/src/ui/animations/FUiAnim_EflLayer.cpp new file mode 100644 index 0000000..c85af49 --- /dev/null +++ b/src/ui/animations/FUiAnim_EflLayer.cpp @@ -0,0 +1,831 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_EflLayer.cpp + * @brief This file contains implementation of _EflLayer class + * + * This file contains implementation _EflLayer class. + */ + +#include +#include +#include + +#include +#include + +#include +#include "FUiAnim_NativeLayer.h" +#include "FUiAnim_EflLayer.h" +#include "FUiAnim_EflNode.h" +#include "FUiAnim_RootVisualElement.h" +#include "FUiAnim_AnimationManager.h" +#include "FUiAnim_DisplayManager.h" +#include "FBaseColIList.h" +#include "FUi_Math.h" +#include "FUiAnim_EflLayerConfiguration.h" + +using namespace Tizen; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Animations; + +//#define PRINT(fmt, ...) fprintf(stderr, fmt, __VA_ARGS__) +//#define PRINT(...) SysLog(NID_UI_ANIM, __VA_ARGS__) +#define PRINT(...) + + +namespace +{ +#define __UNUSED__ +#ifdef VE_VSYNC_UPDATE + +Ecore_Idle_Enterer* __pOnIdleLoopIterator = null; + +#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 orientation = ecore_evas_rotation_get(pLayer->GetEcoreEvas()); + PRINT("[%#x] OnRenderFlushPost size(%d,%d) orientation(%d)\n", (unsigned int)pData, w, h, orientation); +} + +Eina_Bool +OnXWindowDamaged(void* pData __UNUSED__, int type __UNUSED__, void* pEventInfo) +{ + _Ecore_X_Event_Window_Damage* pEvent = (_Ecore_X_Event_Window_Damage*)pEventInfo; + + if (pData) + { + _EflLayer* pLayer = (_EflLayer*)pData; + + if (pLayer->GetEvas() && pLayer->GetEcoreEvas() && pEvent->win == ecore_evas_window_get(pLayer->GetEcoreEvas())) + { + 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) +{ + _Ecore_X_Event_Window_Configure* pEvent = (_Ecore_X_Event_Window_Configure*)pEventInfo; + + if (pData) + { + _EflLayer* pLayer = (_EflLayer*)pData; + + if (pLayer->GetEvas() && pLayer->GetEcoreEvas() && pEvent->win == ecore_evas_window_get(pLayer->GetEcoreEvas())) + { + 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); + + 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; +} + +Eina_Bool +OnXWindowHidden(void* pData, int type, void* pEventInfo) +{ + _Ecore_X_Event_Window_Hide* pEvent = (_Ecore_X_Event_Window_Hide*)pEventInfo; + + if (!pData) + { + return EINA_TRUE; + } + + _EflLayer* pLayer = (_EflLayer*)pData; + if (pLayer->GetEvas() && pLayer->GetEcoreEvas() && pEvent->win == ecore_evas_window_get(pLayer->GetEcoreEvas())) + { + pLayer->SetMapped(false); + pLayer->SetConfigured(false); + PRINT("[%#x | %#x] ############ Hidden -> EventDone()\n", (unsigned int)pData, pEvent->win); + } + + return EINA_TRUE; +} + +Eina_Bool +OnXWindowShown(void* pData, int type, void* pEventInfo) +{ + _Ecore_X_Event_Window_Show* pEvent = (_Ecore_X_Event_Window_Show*)pEventInfo; + + if (!pData) + { + return EINA_TRUE; + } + + _EflLayer* pLayer = (_EflLayer*)pData; + if (pLayer->GetEvas() && pLayer->GetEcoreEvas() && pEvent->win == ecore_evas_window_get(pLayer->GetEcoreEvas())) + { + pLayer->SetMapped(true); + +// FloatRectangle bounds = pLayer->GetBounds(); +// evas_damage_rectangle_add(pLayer->GetEvas(),0,0,(int)bounds.width, (int)bounds.height); +// //ecore_evas_rotation_set(pLayer->GetEcoreEvas(), 270); + PRINT("[%#x | %#x] ############ Shown -> EventDone()\n", (unsigned int)pData, pEvent->win); +// _DisplayManager* pDisplayManager = _DisplayManager::GetInstance(); +// if (pDisplayManager) +// { +// pDisplayManager->AddWakeUpEvent(); +// } + } + + return EINA_TRUE; +} + + +//static const double fpsLimitInterval = 1.0 / 55.0; +static bool __needPreRender = false; +Eina_Bool +OnIdleLoopIterate(void* pData) +{ + _DisplayManager* pDisplayManager = _DisplayManager::GetInstance(); + + // PRINT("OnIdleLoopIterate()\n"); + + + if (!pDisplayManager) + { + return ECORE_CALLBACK_CANCEL; // for remove callback + } + + Tizen::Ui::Animations::_AnimationManager* pAnimationManager = Tizen::Ui::Animations::_AnimationManager::GetInstance(); + + if (!pAnimationManager) + { + return ECORE_CALLBACK_CANCEL; // for remove callback + } + + //CHECK ME : how about the performance? + // double currentTime = ecore_time_get(); + // static double prevFlushTime = 0; + + // if (currentTime - prevFlushTime >= fpsLimitInterval * 0.99) + { + pAnimationManager->ProcessAnimationTick(); + + // prevFlushTime = currentTime; + + pDisplayManager->RenderAll(); + + pDisplayManager->Flush(); + } + + return ECORE_CALLBACK_RENEW; +} + +// WARNING: Without this, idle-enterer will be called after evas destroyed which may cause crash while accessing ecore-evas. +void +OnEcoreEvasFree(Ecore_Evas* pEcoreEvas) +{ + ecore_evas_manual_render_set(pEcoreEvas, EINA_FALSE); +} +#endif + + +void +PreRenderCallback(Ecore_Evas* ee) +{ + if(!__needPreRender) + return ; + + _EflLayer* pEflLayer = (_EflLayer*)ecore_evas_data_get(ee, "EflLayer"); + + if (pEflLayer && pEflLayer->GetRootVisualElement()) + { +#ifndef VE_VSYNC_UPDATE + static double loopTime = 0; + double prevLoopTime = loopTime; + loopTime = ecore_loop_time_get(); + if (loopTime != prevLoopTime) + { + _AnimationManager::GetInstance()->ProcessAnimationTick(); + } +#endif + + _DisplayManager* pDisplayManager = _DisplayManager::GetInstance(); + if (pDisplayManager) + { + pDisplayManager->Render(*pEflLayer->GetRootVisualElement()); + } + } +} + +void +PostRenderCallback(Ecore_Evas* ee) +{ + _EflLayer* pEflLayer = (_EflLayer*)ecore_evas_data_get(ee, "EflLayer"); + + if (pEflLayer && pEflLayer->GetRootVisualElement()) + { + _DisplayManager* pDisplayManager = _DisplayManager::GetInstance(); + if (pDisplayManager) + { + pDisplayManager->PostRender(*pEflLayer->GetRootVisualElement()); + } + } +} + +} + +namespace Tizen { namespace Ui { namespace Animations +{ + +int _EflLayer::_countOfLayer = 0; + +_EflLayer::_EflLayer(void) + : _pRootVisualElement(null) + , _pEvas(null) + , _pEcoreEvas(null) + , _pWindow(null) + , _needBoundsChangeRequest(false) + , _needShowStateChangeRequest(false) + , _isShow(false) + , _needAsyncVisibilityChangeRequest(true) + , _isMainType(true) + , _needRender(true) + , _isMapped(false) + , _isConfigured(false) + , _needForceManualRender(false) + , _pOnWindowDamagedHandler(null) + , _pOnWindowConfiguredHandler(null) + , _pOnWindowHideHandler(null) + , _pOnWindowShowHandler(null) + , __isWinObject(true) + , __bounds() + , _pConfiguration(null) + , __orientation(0) +{ + _countOfLayer++; + _pConfiguration = _EflLayerConfiguration::GetInstance(); +} + +_EflLayer::_EflLayer(bool isMainType) + : _pRootVisualElement(null) + , _pEvas(null) + , _pEcoreEvas(null) + , _pWindow(null) + , _needBoundsChangeRequest(false) + , _needShowStateChangeRequest(false) + , _isShow(false) + , _needAsyncVisibilityChangeRequest(true) + , _isMainType(isMainType) + , _needRender(true) + , _isMapped(false) + , _isConfigured(false) + , _needForceManualRender(false) + , _pOnWindowDamagedHandler(null) + , _pOnWindowConfiguredHandler(null) + , _pOnWindowHideHandler(null) + , _pOnWindowShowHandler(null) + , __isWinObject(true) + , __bounds() + , _pConfiguration(null) + , __orientation(0) +{ + _countOfLayer++; + _pConfiguration = _EflLayerConfiguration::GetInstance(); +} + +_EflLayer::~_EflLayer(void) +{ + _countOfLayer--; + if (_pConfiguration) + { + _pConfiguration->ReleaseInstance(); + _pConfiguration = null; + } +#ifdef VE_VSYNC_UPDATE + if (_pEcoreEvas) + { + ecore_evas_manual_render_set(_pEcoreEvas, EINA_FALSE); + } + + if(_countOfLayer <= 0) + { + ecore_idle_enterer_del(__pOnIdleLoopIterator); + __pOnIdleLoopIterator = null; + + } + +#if defined(USE_WORKAROUND) || defined(XWINDOW_DEBUG) + if (_pOnWindowDamagedHandler) + { + ecore_event_handler_del(_pOnWindowDamagedHandler); + _pOnWindowDamagedHandler = null; + } + + if (_pEvas) + { + evas_event_callback_del(_pEvas, EVAS_CALLBACK_RENDER_FLUSH_POST, OnRenderFlushPost); + } + +#endif // USE_WORKAROUND || XWINDOW_DEBUG + + if (_pOnWindowConfiguredHandler) + { + ecore_event_handler_del(_pOnWindowConfiguredHandler); + _pOnWindowConfiguredHandler = null; + } + + if (_pOnWindowHideHandler) + { + ecore_event_handler_del(_pOnWindowHideHandler); + _pOnWindowHideHandler = null; + } + + if (_pOnWindowShowHandler) + { + ecore_event_handler_del(_pOnWindowShowHandler); + _pOnWindowShowHandler = null; + } + + +#endif + + + if (_pEcoreEvas) + { + ecore_evas_callback_pre_render_set(_pEcoreEvas, null); + ecore_evas_callback_post_render_set(_pEcoreEvas, null); + _pEcoreEvas = null; + } + + if (_pWindow) + { + evas_object_del(_pWindow); + } + _pWindow = null; + _pEvas = null; + +} + +result +_EflLayer::OnConstructed(void) +{ + //Ecore_X_Window window = 0; + + if (_pWindow) + { + return E_OBJ_ALREADY_EXIST; + } + + if(_isMainType) + { + _pWindow = elm_win_add(NULL, NULL, ELM_WIN_BASIC); + } + else + { + _pWindow = elm_win_add(NULL, NULL, ELM_WIN_UTILITY); + } + + SysTryReturnResult(NID_UI, _pWindow, E_SYSTEM, "A system error has been occurred."); + + result r = Initialize(_pWindow); + if (r != E_SUCCESS) + { + evas_object_del(_pWindow); + return E_SYSTEM; + } + Ecore_X_Window window = (Ecore_X_Window) ecore_evas_window_get(_pEcoreEvas); + SysTryReturnResult(NID_UI, window != 0,E_SYSTEM, "A system error has been occurred."); + + PRINT("[%#x | %#x] CREATE WINDOW [%s]\n", (unsigned int)this, ecore_evas_window_get(_pEcoreEvas), (_isMainType)?"ELM_WIN_BASIC":"ELM_WIN_UTILITY"); + + if (_pConfiguration) + { + _pConfiguration->ApplyCustomizedConfig(_pWindow); + } + +#ifdef VE_VSYNC_UPDATE + ecore_x_vsync_animator_tick_source_set(window); + ecore_evas_manual_render_set(_pEcoreEvas, EINA_TRUE); + ecore_evas_callback_pre_free_set(_pEcoreEvas, OnEcoreEvasFree); +#endif + + ecore_x_netwm_window_type_set(window, ECORE_X_WINDOW_TYPE_NORMAL); + ecore_x_e_virtual_keyboard_state_set(window, (Ecore_X_Virtual_Keyboard_State)ELM_WIN_KEYBOARD_UNKNOWN); + + return E_SUCCESS; +} + + +result +_EflLayer::Initialize(Evas_Object* pWindow) +{ + const char* pType = null; + + _pWindow = pWindow; + SysTryCatch(NID_UI, _pWindow, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred."); + _pEvas = evas_object_evas_get(_pWindow); + SysTryCatch(NID_UI, _pEvas, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred."); + _pEcoreEvas = ecore_evas_ecore_evas_get(_pEvas); + SysTryCatch(NID_UI, _pEcoreEvas, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred."); + + pType = evas_object_type_get(_pWindow); + if (strcmp("elm_win", pType)) + { + __isWinObject = false; + } + + // CHECK ME: Is this needed for GL mode? + +#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); + } + + if (_pOnWindowHideHandler == null) + { + _pOnWindowHideHandler = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_HIDE, OnXWindowHidden, this); + } + + if (_pOnWindowShowHandler == null) + { + _pOnWindowShowHandler = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_SHOW, OnXWindowShown, this); + } + + +#ifdef VE_VSYNC_UPDATE + if(__pOnIdleLoopIterator == null) + { + __pOnIdleLoopIterator = ecore_idle_enterer_add(OnIdleLoopIterate, null); + } + ecore_evas_callback_pre_render_set(_pEcoreEvas, PreRenderCallback); +#else + + ecore_evas_callback_post_render_set(_pEcoreEvas, PostRenderCallback); +#endif + + ecore_evas_data_set(_pEcoreEvas, "EflLayer", this); + + return E_SUCCESS; + +CATCH: + _pWindow = null; + _pEcoreEvas = null; + _pEvas = null; + _pRootVisualElement = null; + return E_SYSTEM; +} + +result +_EflLayer::SetOrientationChanged(int orientation) +{ + 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; +} + +result +_EflLayer::Configure(_RootVisualElement& rootElement) +{ + _EflNode* pNode = dynamic_cast<_EflNode*>(rootElement.GetNativeNode()); + if (pNode) + { + _pRootVisualElement = &rootElement; + return pNode->ReConstruct(*this); + } + + return E_SYSTEM; +} + +result +_EflLayer::SetBounds(const FloatRectangle& bounds) +{ + 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.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 +{ + if (_pWindow) + { + return __bounds; + } + + return FloatRectangle(); +} + +result +_EflLayer::SetShowState(bool show) +{ + if (_isShow == show) + { + PRINT("[%#x | %#x] Cancel SetShowState request (%d)\n", (unsigned int)this, ecore_evas_window_get(_pEcoreEvas), show); + return E_SUCCESS; + } + + if (_needShowStateChangeRequest) + { + // Show State is not applied yet. Need cancel the visibility change request. + _needShowStateChangeRequest = false; + PRINT("[%#x | %#x] Cancel SetShowState request (%d)\n", (unsigned int)this, ecore_evas_window_get(_pEcoreEvas), show); + } + else + { + _needShowStateChangeRequest = true; + + _DisplayManager* pDisplayManager = _DisplayManager::GetInstance(); + if (pDisplayManager) + { + pDisplayManager->AddWakeUpEvent(); + } + PRINT("[%#x | %#x] SetShowState request (%d)\n", (unsigned int)this, ecore_evas_window_get(_pEcoreEvas), show); + } + + _isShow = show; + + return E_SUCCESS; +} + +bool +_EflLayer::GetShowState(void) const +{ + return _isShow; +} + +void +_EflLayer::SetOpacity(float opacity) +{ + if (!_pWindow) + return; + + if (opacity > 1.0f) + { + opacity = 1.0f; + } + else if(opacity < 0.0f) + { + opacity = 0.0f; + } + + if (_FloatCompare(opacity, 1.0f)) + { + if (__isWinObject == true) + { + elm_win_alpha_set(_pWindow, EINA_FALSE); + if (_pConfiguration) + { + _pConfiguration->ApplyCustomizedConfig(_pWindow); + } + } + + int r,g,b,a; + evas_object_color_get(_pWindow, &r, &g, &b, &a); + evas_object_color_set(_pWindow, r, g, b, 255); + + } + else if (opacity < 1.0f) + { + if (__isWinObject == true) + { + elm_win_alpha_set(_pWindow, EINA_TRUE); + if (_pConfiguration) + { + _pConfiguration->ApplyCustomizedConfig(_pWindow); + } + } + + int r,g,b,a; + evas_object_color_get(_pWindow, &r, &g, &b, &a); + a = opacity*255; + evas_object_color_set(_pWindow, r, g, b, a); + } + PRINT("[%#x | %#x] ALPHA SET(opacity=%f)\n", (unsigned int)this,ecore_evas_window_get(_pEcoreEvas), opacity); +} + +float +_EflLayer::GetOpacity(void) +{ + if (!_pWindow) + { + return 0.0f; + } + + int r,g,b,a; + evas_object_color_get(_pWindow, &r, &g, &b, &a); + if (a > 255) + { + return 1.0f; + } + + return a / 255.0f; + +} + + +static int __GetChildrenCount(VisualElement* pVe) +{ + if(pVe == null) + return 0; + + int count = pVe->GetChildrenCount(); + if(count > 0) + { + IList* pList = pVe->GetChildrenN(); + for(int i = 0;iGetAt(i) ); + } + delete pList; + } + return count; +} + +void +_EflLayer::Flush(void) +{ + if (_pEcoreEvas) + { + if (_needShowStateChangeRequest) + { + if (_isShow) + { + evas_object_show(_pWindow); + PRINT("[%#x | %#x] evas_object_show \n", (unsigned int)this ,ecore_evas_window_get(_pEcoreEvas)); + } + else + { + evas_object_hide(_pWindow); + PRINT("[%#x | %#x] evas_object_hide \n", (unsigned int)this ,ecore_evas_window_get(_pEcoreEvas)); + } + _needShowStateChangeRequest = false; + } + + 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); + return; + } + + if(__isWinObject) + { + if (_isMapped && _isConfigured) + { + //PRINT("[%#x | %#x] ecore_evas_manual_render -- mapped \n", (unsigned int)this ,ecore_evas_window_get(_pEcoreEvas)); + __needPreRender = false; + 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 \n", (unsigned int)this , ecore_evas_window_get(_pEcoreEvas)); + __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(map:%d configure:%d) - not called\n", (unsigned int)this , ecore_evas_window_get(_pEcoreEvas), _isMapped, _isConfigured); + } + } + else // not window type + { + PRINT("[%#x | %#x] ecore_evas_manual_render -- unknown type\n", (unsigned int)this , ecore_evas_window_get(_pEcoreEvas)); + __needPreRender = false; + ecore_evas_manual_render(_pEcoreEvas); + __needPreRender = true; + + // For restoring GL context + _DisplayManager::RestoreContext(); + } + } + +} + + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnim_EflLayerConfiguration.cpp b/src/ui/animations/FUiAnim_EflLayerConfiguration.cpp new file mode 100644 index 0000000..c946abe --- /dev/null +++ b/src/ui/animations/FUiAnim_EflLayerConfiguration.cpp @@ -0,0 +1,73 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_EflLayerConfiguration.cpp + * @brief This file contains implementation of _EflLayer class + * + * This file contains implementation _EflLayer class. + */ + +#include "FUiAnim_EflLayerConfiguration.h" + +#define null 0 + +namespace Tizen { namespace Ui { namespace Animations +{ +_EflLayerConfiguration* pEflLayerConfiguration = null; +_EflLayerConfiguration* +_EflLayerConfiguration::GetInstance(void) +{ + if (pEflLayerConfiguration == null) + { + pEflLayerConfiguration = new _EflLayerConfiguration(); + } + else + { + pEflLayerConfiguration->__refCount++; + } + return pEflLayerConfiguration; +} + +void +_EflLayerConfiguration::ReleaseInstance(void) +{ + if (pEflLayerConfiguration->__refCount > 1) + { + pEflLayerConfiguration->__refCount--; + } + else + { + delete pEflLayerConfiguration; + pEflLayerConfiguration = null; + } +} + +void +_EflLayerConfiguration::ApplyCustomizedConfig(void* pWin) +{ +} + +_EflLayerConfiguration::_EflLayerConfiguration(void) + : __refCount(1) +{ +} + +_EflLayerConfiguration::~_EflLayerConfiguration(void) +{ +} +}}}//namespace Tizen { namespace Ui { namespace Animations \ No newline at end of file diff --git a/src/ui/animations/FUiAnim_EflNode.cpp b/src/ui/animations/FUiAnim_EflNode.cpp new file mode 100644 index 0000000..37bd806 --- /dev/null +++ b/src/ui/animations/FUiAnim_EflNode.cpp @@ -0,0 +1,1589 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_EflNode.cpp + * @brief This file contains implementation of _EflNode class + * + * This file contains implementation _EflNode class. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_EcoreEvas.h" +#include "FUi_EcoreEvasMgr.h" +#include "FUiAnim_EflLayer.h" +#include "FUiAnim_EflNode.h" +#include "FUiAnim_MatrixUtil.h" +#include "FUiAnim_VisualElementImpl.h" +#include "FUiAnim_VisualElementSurfaceImpl.h" +#include "FUiAnim_RootVisualElement.h" + +#include "FUiAnim_EflVisualElementSurfaceImpl.h" + +// for capture +#include +#include + +using namespace std; +using namespace Tizen; +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace +{ + +void EvasSmartObjectShowChildren(Evas_Object* pSmartObject); +void EvasSmartObjectHideChildren(Evas_Object* pSmartObject); +void EvasSmartObjectHideAllChildren(Evas_Object* pSmartObject); + +Evas_Smart_Class smartClassForVisualElement = +{ + "visual_element", // name + 4, // version + null, // add + null, // del + null, // move + null, // resize + EvasSmartObjectShowChildren, // show + EvasSmartObjectHideChildren, // hide + null, // color_set + null, // clip_set + null, // clip_unset + null, // calculate + null, // member_add + null, // member_del + null, // parent + null, // call-backs + null, // interfaces + null, // data +}; + +Evas_Smart_Class smartClassForImageHolder = +{ + "image_holder", // name + 4, // version + null, // add + null, // del + null, // move + null, // resize + EvasSmartObjectShowChildren, // show + EvasSmartObjectHideChildren, // hide + null, // color_set + null, // clip_set + null, // clip_unset + null, // calculate + null, // member_add + null, // member_del + null, // parent + null, // call-backs + null, // interfaces + null, // data +}; + +void +EvasSmartObjectShowChildren(Evas_Object* pSmartObject) +{ + Eina_List* pChildrenList = evas_object_smart_members_get(pSmartObject); + if (likely(pChildrenList)) + { + void* pEvasObject = null; + EINA_LIST_FREE(pChildrenList, pEvasObject) + { + if (likely(pEvasObject) && unlikely(evas_object_type_get((Evas_Object*)pEvasObject) != smartClassForVisualElement.name)) + { + evas_object_show((Evas_Object*)pEvasObject); + + } + } + } +} + +void +EvasSmartObjectHideChildren(Evas_Object* pSmartObject) +{ + // hide objects only for this node + Eina_List* pChildrenList = evas_object_smart_members_get(pSmartObject); + if (likely(pChildrenList)) + { + void* pEvasObject = null; + EINA_LIST_FREE(pChildrenList, pEvasObject) + { + if (likely(pEvasObject) && unlikely(evas_object_type_get((Evas_Object*)pEvasObject) != smartClassForVisualElement.name)) + { + evas_object_hide((Evas_Object*)pEvasObject); + } + } + } +} + +void +EvasSmartObjectHideAllChildren(Evas_Object* pSmartObject) +{ + // hide all descendants + Eina_List* pChildrenList = evas_object_smart_members_get(pSmartObject); + if (likely(pChildrenList)) + { + void* pEvasObject = null; + EINA_LIST_FREE(pChildrenList, pEvasObject) + { + if (likely(pEvasObject)) + { + evas_object_hide((Evas_Object*)pEvasObject); + } + } + } +} + +inline void +NormalizeUniformRectangle(Rectangle& rectangle, int width, int height) +{ + if (unlikely(width <= 0) || unlikely(height <= 0)) + { + return; + } + + if (unlikely(rectangle.x < 0)) + { + rectangle.x = width - ((-rectangle.x) % width); + } + + if (unlikely(rectangle.y < 0)) + { + rectangle.y = height - ((-rectangle.y) % height); + } +} + +inline Evas_Render_Op +GetRenderOperation(Tizen::Ui::Animations::VisualElement::RenderOperation renderOperation) +{ + switch (renderOperation) + { + default: + case Tizen::Ui::Animations::VisualElement::RENDER_OPERATION_BLEND: + return EVAS_RENDER_BLEND; + + case Tizen::Ui::Animations::VisualElement::RENDER_OPERATION_COPY: + return EVAS_RENDER_COPY; + } +} + +//Evas* __pEvas = null; +}; + + +namespace Tizen { namespace Ui { namespace Animations +{ + +Evas_Smart* _EflNode::__pStaticSmartClass = null; +Evas_Smart* _EflNode::__pStaticSmartClassForImageHolder = null; + +_EflNode::_EflNode(void) + : __pSurface(null) + , __pSharedSurface(null) + , __pEvas(null) + , __pSmartObject(null) + , __pClipObject(null) + , __pRectangleObject(null) + , __pImageHolder(null) + , __pNativeSmartObject(null) + , __pMap(null) + , __mapUsed(false) + , __renderOperation(VisualElement::RENDER_OPERATION_BLEND) + , __needEvasObjectSync(false) + , __realBounds(0.0f, 0.0f, 0.0f, 0.0f) + , __backgroundColor(0.0f, 0.0f, 0.0f, 0.0f) // fully transparent rectangle object by default + , __pLayer(null) +{ +} + +_EflNode::~_EflNode(void) +{ + Destruct(); +} + +result +_EflNode::Construct(void) +{ +#if 0 + if (__pSmartObject || __pMap) + { + return E_INVALID_STATE; + } + + if (!__pEvas) + { + // todo: need refactoring ! + Tizen::Ui::_EcoreEvasMgr* pMgr = Tizen::Ui::GetEcoreEvasMgr(); + + if (pMgr && pMgr->GetEcoreEvas()) + { + __pEvas = pMgr->GetEcoreEvas()->GetEvas(); + } + + if (!__pEvas) + { + return E_SYSTEM; + } + } + + + if (!__pStaticSmartClass) + { + __pStaticSmartClass = evas_smart_class_new(&smartClassForVisualElement); // TODO: no need to delete ??? + } + + __pSmartObject = evas_object_smart_add(__pEvas, __pStaticSmartClass); + if (!__pSmartObject) + { + goto failure; + } + + //evas_object_pass_events_set(__pSmartObject, EINA_TRUE); + evas_object_propagate_events_set(__pSmartObject, EINA_TRUE); + //evas_object_propagate_events_set(__pSmartObject, EINA_FALSE); + + evas_object_show(__pSmartObject); + +// __pClipObject = evas_object_rectangle_add(__pEvas); +// if (!__pClipObject) +// goto failure; +// +// +// evas_object_smart_member_add(__pClipObject,__pSmartObject); +// evas_object_lower(__pClipObject); +// +// evas_object_pass_events_set(__pClipObject, EINA_TRUE); + + // Create map for 3D + __pMap = evas_map_new(4); + if (!__pMap) + { + goto failure; + } + + evas_map_alpha_set(__pMap, EINA_TRUE); + evas_map_smooth_set(__pMap, EINA_TRUE); + + return E_SUCCESS; + +failure: + if (__pSmartObject) + { + evas_object_del(__pSmartObject); + } + + __pSmartObject = null; + +// if (__pClipObject) +// evas_object_del(__pClipObject); +// +// __pClipObject = null; + + if (__pMap) + { + evas_map_free(__pMap); + } + + __pMap = null; + + return E_SYSTEM; +#else + return E_SUCCESS; +#endif +} + +result +_EflNode::RebuildIfNeeded(const _INativeNode& parent) +{ + _EflNode* pParent = dynamic_cast<_EflNode*>(const_cast<_INativeNode*>(&parent)); + if (!pParent) + { + return E_INVALID_ARG; + } + if (pParent->__pLayer) + { + return ReConstruct(*pParent->__pLayer); + } + return E_INVALID_STATE; +// __pLayer = pParent->pLayer; + //return ReConstruct(pParent->__pEvas); +} + +result +_EflNode::ReConstruct(const _NativeLayer& layer) +{ + if (__pLayer == &layer) + { + return E_SUCCESS; + } + + _EflLayer* pLayer = dynamic_cast<_EflLayer*>(const_cast<_NativeLayer*>(&layer)); + if (!pLayer) + { + return E_INVALID_ARG; + } + __pLayer = pLayer; + return ReConstruct(pLayer->GetEvas()); +} + +result +_EflNode::ReConstruct(const Evas* pEvas) +{ + if (pEvas == null) + { + return E_INVALID_ARG; + } + + Destruct(); + + __pEvas = const_cast(pEvas); + + + if (!__pStaticSmartClass) + { + __pStaticSmartClass = evas_smart_class_new(&smartClassForVisualElement); // TODO: no need to delete ??? + } + + __pSmartObject = evas_object_smart_add(__pEvas, __pStaticSmartClass); + if (!__pSmartObject) + { + goto failure; + } + + if (!__pStaticSmartClassForImageHolder) + { + __pStaticSmartClassForImageHolder = evas_smart_class_new(&smartClassForImageHolder); // TODO: no need to delete ??? + } + + //evas_object_pass_events_set(__pSmartObject, EINA_TRUE); + evas_object_propagate_events_set(__pSmartObject, EINA_TRUE); + //evas_object_propagate_events_set(__pSmartObject, EINA_FALSE); + + if (__pNativeSmartObject) + { + evas_object_smart_member_add(__pNativeSmartObject, __pSmartObject); + AdjustEvasObjectOrder(); + } + + evas_object_show(__pSmartObject); + +// __pClipObject = evas_object_rectangle_add(pEvas); +// if (!__pClipObject) +// goto failure; +// +// +// evas_object_smart_member_add(__pClipObject,__pSmartObject); +// evas_object_lower(__pClipObject); +// +// evas_object_pass_events_set(__pClipObject, EINA_TRUE); + + // Create map for 3D + if (__pMap) + { + evas_map_free(__pMap); + } + __pMap = evas_map_new(4); + if (!__pMap) + { + goto failure; + } + + evas_map_alpha_set(__pMap, EINA_TRUE); + evas_map_smooth_set(__pMap, EINA_TRUE); + + return E_SUCCESS; + +failure: + __pEvas = null; + + if (__pSmartObject) + { + evas_object_del(__pSmartObject); + } + + __pSmartObject = null; + +// if (__pClipObject) +// evas_object_del(__pClipObject); +// +// __pClipObject = null; + + if (__pMap) + { + evas_map_free(__pMap); + } + + __pMap = null; + + return E_SYSTEM; +} + +result +_EflNode::Destruct(void) +{ + __pEvas = null; + if (__pSmartObject) + { + evas_object_del(__pSmartObject); + __pSmartObject = null; + } + + if (__pClipObject) + { + evas_object_del(__pClipObject); + __pClipObject = null; + } + + if (__pRectangleObject) + { + evas_object_del(__pRectangleObject); + __pRectangleObject = null; + } + + if (__pMap) + { + evas_map_free(__pMap); + __pMap = null; + } + + if (__pSurface) + { + delete __pSurface; + __pSurface = null; + } + + if (__pSharedSurface) + { + delete __pSharedSurface; + __pSharedSurface = null; + } + + if (__pImageHolder) + { + evas_object_del(__pImageHolder); + } + + if (unlikely(__pNativeSmartObject)) + { + evas_object_smart_member_del(__pNativeSmartObject); + //__pNativeSmartObject = null; + } + + return E_SUCCESS; +} + +Evas* +_EflNode::GetEvas(void) const +{ + return __pEvas; +} + +Handle +_EflNode::GetGroupContainer(void) const +{ + return reinterpret_cast< Handle >(__pSmartObject); +} + +void +_EflNode::AdjustEvasObjectOrder(void) +{ + + if (__pNativeSmartObject) + evas_object_lower(__pNativeSmartObject); +// evas_object_raise(__pNativeSmartObject); + +} + +void +_EflNode::SetNativeObject(VisualElement& element, Evas_Object* pNativeObject) +{ + if (unlikely(__pNativeSmartObject != pNativeObject)) + { + if (unlikely(__pNativeSmartObject)) + { + evas_object_smart_member_del(__pNativeSmartObject); + } + + __pNativeSmartObject = pNativeObject; + + if (__pNativeSmartObject) + { + evas_object_smart_member_add(__pNativeSmartObject, __pSmartObject); + } + } + + AdjustEvasObjectOrder(); + + + const int nativeProps = _VisualElementImpl::HIERARCHY_PROPERTY_COORDINATES + | _VisualElementImpl::HIERARCHY_PROPERTY_OPACITY + | _VisualElementImpl::HIERARCHY_PROPERTY_CONTENTOPACITY + | _VisualElementImpl::HIERARCHY_PROPERTY_CONTENTBOUNDS; + + _VisualElementImpl* pElementImpl = _VisualElementImpl::GetInstance(element); + if (likely(pElementImpl)) + { + pElementImpl->InvalidateHierarchyProps(nativeProps, false, false); + } +} + +void +_EflNode::AddNativeSmartObject(VisualElement& element, Evas_Object* pSmartObject) +{ + SetNativeObject(element, pSmartObject); +} + +void +_EflNode::RemoveNativeObject(void) +{ + __pNativeSmartObject = null; +} + +Evas_Object* +_EflNode::GetNativeObject(void) const +{ + return __pNativeSmartObject; +} + +result +_EflNode::InsertChild(_INativeNode& child, const _INativeNode* pReference, bool above) +{ + _EflNode& nativeChild = dynamic_cast< _EflNode& >(child); + const _EflNode* pNativeReference = dynamic_cast< const _EflNode* >(pReference); + + RemoveChild(nativeChild); + + if (!__pSmartObject) + { + return E_INVALID_STATE; + } + + evas_object_smart_member_add(nativeChild.__pSmartObject, __pSmartObject); + + // The order of evas objects should be as follows: + // [native smart object] [image/image-holder/rectangle/clipper] [child smart object]* + + if (likely(pNativeReference)) + { + if (likely(above)) + { + evas_object_stack_above(nativeChild.__pSmartObject, pNativeReference->__pSmartObject); + } + else + { + evas_object_stack_below(nativeChild.__pSmartObject, pNativeReference->__pSmartObject); + } + } + else + { + if (likely(above)) + { + evas_object_raise(nativeChild.__pSmartObject); + } + else + { + Evas_Object* pRefObject = null; + + + if (likely(__pSurface) && likely(_VisualElementSurfaceImpl::GetInstance(*__pSurface))) + { + pRefObject = reinterpret_cast< Evas_Object* >(_VisualElementSurfaceImpl::GetInstance(*__pSurface)->GetNativeHandle()); + } + else if (likely(__pRectangleObject)) + { + pRefObject = __pRectangleObject; + } + else if (likely(__pImageHolder)) + { + pRefObject = __pImageHolder; + } + + if (likely(pRefObject)) + { + evas_object_stack_above(nativeChild.__pSmartObject, pRefObject); + } + else + { + evas_object_lower(nativeChild.__pSmartObject); + } + } + } + + AdjustEvasObjectOrder(); + + return E_SUCCESS; +} + +result +_EflNode::RemoveChild(_INativeNode& child) +{ + _EflNode& nativeChild = dynamic_cast< _EflNode& >(child); + + // WARNING: + // Perform recursive hiding evas objects ! + // After removing a child, it is not managed by visual element. + // Hence, because all descendants of it will not be hided automatically, it is needed to + // hide all descendants of it (or need adding damage region) + smartClassForVisualElement.hide = EvasSmartObjectHideAllChildren; + evas_object_hide(nativeChild.__pSmartObject); + smartClassForVisualElement.hide = EvasSmartObjectHideChildren; + + evas_object_smart_member_del(nativeChild.__pSmartObject); + +#if 0 + if (nativeChild.__pClipObject) + evas_object_hide((Evas_Object*)nativeChild.__pClipObject); + + if (nativeChild.__pRectangleObject) + evas_object_hide((Evas_Object*)nativeChild.__pRectangleObject); + + if (nativeChild.__pSurface && nativeChild.__pSurface->GetNativeHandle()) + evas_object_hide((Evas_Object*)nativeChild.__pSurface->GetNativeHandle()); +#endif + + return E_SUCCESS; +} + +result +_EflNode::SetFlushNeeded(void) +{ + _EflVisualElementSurfaceImpl* pSurfaceImpl = null; + _EflVisualElementSurfaceImpl* pSharedSurfaceImpl = null; + if (!__pSurface) + { + return E_INVALID_STATE; + } + pSurfaceImpl = dynamic_cast<_EflVisualElementSurfaceImpl*>(_VisualElementSurfaceImpl::GetInstance(*__pSurface)); + pSharedSurfaceImpl = dynamic_cast<_EflVisualElementSurfaceImpl*>(_VisualElementSurfaceImpl::GetInstance(*__pSharedSurface)); + if (!pSurfaceImpl || !pSharedSurfaceImpl) + { + return E_INVALID_STATE; + } + + Evas_Object* pImageObject = reinterpret_cast< Evas_Object* >(pSharedSurfaceImpl->GetNativeHandle()); + + if (pImageObject) + { + int imageWidth = 0; + int imageHeight = 0; + + if (pSharedSurfaceImpl->__isImageObject) + { + if (pSharedSurfaceImpl->GetImage().IsEmpty()) + { + evas_object_image_size_get(pImageObject, &imageWidth, &imageHeight); + evas_object_image_data_update_add(pImageObject, 0, 0, imageWidth, imageHeight); + } + } + } + + if(__pLayer) + { + __pLayer->SetFlushNeeded(); + } + + return E_SUCCESS; +} + +result +_EflNode::Flush(void) +{ +#ifndef VE_VSYNC_UPDATE + if(__pLayer) + { + __pLayer->Flush(); + } +// ecore_evas_manual_render(ecore_evas_ecore_evas_get(__pEvas)); +#endif + + return E_SUCCESS; +} + +_Colorf +_EflNode::GetBackgroundColor(void) const +{ + return __backgroundColor; +} + +result +_EflNode::SetBackgroundColor(const _Colorf& backgroundColor) +{ + __backgroundColor = backgroundColor; + + return E_SUCCESS; +} + +bool +_EflNode::AdjustImageHolder(bool useHolder) +{ + if (unlikely(!__pSurface)) + { + return false; + } + + Evas_Object* pImageObject = reinterpret_cast< Evas_Object* >(_VisualElementSurfaceImpl::GetInstance(*__pSurface)->GetNativeHandle()); + if (unlikely(!pImageObject)) + { + return false; + } + + if (unlikely(useHolder)) + { + if (likely(!__pImageHolder)) + { + __pImageHolder = evas_object_smart_add(__pEvas, __pStaticSmartClassForImageHolder); + if (unlikely(!__pSmartObject)) + { + SysLog(NID_UI_ANIM, "Smart object cannot be created."); + return false; + } + + evas_object_propagate_events_set(__pImageHolder, EINA_TRUE); + evas_object_smart_member_add(pImageObject, __pImageHolder); + + evas_object_smart_member_add(__pImageHolder, __pSmartObject); + evas_object_lower(__pImageHolder); + AdjustEvasObjectOrder(); + + if (evas_object_visible_get(__pSmartObject)) + { + evas_object_show(__pImageHolder); + } + else + { + evas_object_hide(__pImageHolder); + } + + return true; + } + } + else + { + if (likely(__pImageHolder)) + { + evas_object_smart_member_add(pImageObject, __pSmartObject); + evas_object_lower(pImageObject); + AdjustEvasObjectOrder(); + + evas_object_del(__pImageHolder); + __pImageHolder = null; + + return true; + } + } + + return false; +} + +result +_EflNode::Reconfigure(VisualElementSurface* pSurface, _VisualElementImpl& element, bool surfaceOnly) +{ + Evas_Object* pImageObjectOrg = null; + Evas_Object* pImageObjectNew = null; + + const int nativeProps = _VisualElementImpl::HIERARCHY_PROPERTY_COORDINATES + | _VisualElementImpl::HIERARCHY_PROPERTY_OPACITY + | _VisualElementImpl::HIERARCHY_PROPERTY_CONTENTOPACITY + | _VisualElementImpl::HIERARCHY_PROPERTY_CONTENTBOUNDS; + int& invalidatedNativeProps = element.__pSharedData->invalidatedNativeProps; + + invalidatedNativeProps &= nativeProps; + + + _EflVisualElementSurfaceImpl* pSurfaceImpl = null; + + if (likely(pSurface) && likely(_VisualElementSurfaceImpl::GetInstance(*pSurface))) + { + pImageObjectNew = reinterpret_cast< Evas_Object* >(_VisualElementSurfaceImpl::GetInstance(*pSurface)->GetNativeHandle()); + pSurfaceImpl = dynamic_cast<_EflVisualElementSurfaceImpl*>(_VisualElementSurfaceImpl::GetInstance(*pSurface)); + } + + if (likely(__pSharedSurface) && likely(_VisualElementSurfaceImpl::GetInstance(*__pSharedSurface))) + { + pImageObjectOrg = reinterpret_cast< Evas_Object* >(_VisualElementSurfaceImpl::GetInstance(*__pSharedSurface)->GetNativeHandle()); + } + + + if (likely(pImageObjectNew)) + { + bool createNewObject = true; + + if (likely(__pSurface)) + { + // if the surfaces are same, change the size + if (likely(pImageObjectNew == pImageObjectOrg)) + { + createNewObject = false; + } + // if the surface is changed, delete old surface + else + { + delete __pSharedSurface; + __pSharedSurface = null; + } + } + + // create new surface + if (unlikely(createNewObject)) + { + __renderOperation = element.__renderOperation; + evas_object_render_op_set(pImageObjectNew, GetRenderOperation(__renderOperation)); + + + unique_ptr pNewSharedSurface(new (std::nothrow) VisualElementSurface(*pSurface)); + SysTryReturnResult(NID_UI_ANIM, pNewSharedSurface, E_OUT_OF_MEMORY, "Memory allocation failed."); + + _EflVisualElementSurfaceImpl* pEflVisualElementSurfaceImpl = dynamic_cast<_EflVisualElementSurfaceImpl*>(_VisualElementSurfaceImpl::GetInstance(*pSurface)); + if (pEflVisualElementSurfaceImpl && pEflVisualElementSurfaceImpl->__pBuffer == null) + { + unique_ptr pNewSurface(new (std::nothrow) VisualElementSurface(*pSurface)); + SysTryReturnResult(NID_UI_ANIM, pNewSurface, E_OUT_OF_MEMORY, "Memory allocation failed."); + + if (__pSurface) + { + delete __pSurface; + __pSurface = null; + } + __pSurface = pNewSurface.release(); + } + else + { + unique_ptr pNewSurface(_VisualElementSurfaceImpl::CreateSurfaceN((Handle)__pLayer, FloatDimension(1.0f, 1.0f))); + SysTryReturnResult(NID_UI_ANIM, pNewSurface, E_OUT_OF_MEMORY, "Memory allocation failed."); + + if (__pSurface) + { + delete __pSurface; + __pSurface = null; + } + __pSurface = pNewSurface.release(); + + if (!element.GetModel()->__imageFilePath.IsEmpty() && _VisualElementSurfaceImpl::GetInstance(*__pSurface)) + { + _VisualElementSurfaceImpl::GetInstance(*__pSurface)->SetImage(element.GetModel()->__imageFilePath); + } + } + + if (__pSharedSurface) + { + delete __pSharedSurface; + __pSharedSurface = null; + } + __pSharedSurface = pNewSharedSurface.release(); + + Evas_Object* pImageObject = null; + if (_VisualElementSurfaceImpl::GetInstance(*__pSurface)) + { + pImageObject = (Evas_Object*)_VisualElementSurfaceImpl::GetInstance(*__pSurface)->GetNativeHandle(); + + if (likely(pImageObject)) + { + evas_object_anti_alias_set(pImageObject, EINA_TRUE); + + evas_object_smart_member_add(pImageObject, __pSmartObject); + evas_object_lower(pImageObject); + AdjustEvasObjectOrder(); + + if (evas_object_visible_get(__pSmartObject)) + { + evas_object_show(pImageObject); + } + else + { + evas_object_hide(pImageObject); + } + + if (pSurfaceImpl && pSurfaceImpl->__pBuffer != null) + { + evas_object_image_source_set(pImageObject, pImageObjectNew); +#if 0 // needed if evas_object_show() has not been called in ctor of _EflVisualElementSurfaceImpl + evas_object_show(pImageObjectNew); + evas_object_image_source_visible_set(pImageObject, EINA_FALSE); +#endif + } + + //evas_object_pass_events_set(pImageObject, EINA_TRUE); + + __needEvasObjectSync = true; + invalidatedNativeProps |= nativeProps; + } + } + } + // TODO : Have surface, but not newly created + + } + else + { + // delete old surface + delete __pSurface; + __pSurface = null; + + // delete shared surface + delete __pSharedSurface; + __pSharedSurface = null; + } + + + if (likely(__pSurface && _VisualElementSurfaceImpl::GetInstance(*__pSurface))) + { + pImageObjectNew = reinterpret_cast< Evas_Object* >(_VisualElementSurfaceImpl::GetInstance(*__pSurface)->GetNativeHandle()); + + if (unlikely(__pRectangleObject)) + { + evas_object_del(__pRectangleObject); + __pRectangleObject = null; + } + } + else + { + pImageObjectNew = null; + + // WARNING: + // Newly created rectangle object must be reconfigured by VE!!! (size/pos/visibility/etc) + // + if (likely(!__pRectangleObject) && likely(element.__pSharedData->needSurface)) + { + __pRectangleObject = evas_object_rectangle_add(__pEvas); + if (likely(__pRectangleObject)) + { + __renderOperation = element.__renderOperation; + evas_object_render_op_set(__pRectangleObject, GetRenderOperation(__renderOperation)); + + //evas_object_pass_events_set(__pRectangleObject, EINA_TRUE); + evas_object_smart_member_add(__pRectangleObject, __pSmartObject); + evas_object_lower(__pRectangleObject); + AdjustEvasObjectOrder(); + + if (evas_object_visible_get(__pSmartObject)) + { + evas_object_show(__pRectangleObject); + } + else + { + evas_object_hide(__pRectangleObject); + } + + __needEvasObjectSync = true; + invalidatedNativeProps |= nativeProps; + } + } + } + + element.__pSharedData->surfaceChanged = false; + + if (surfaceOnly) + { + return E_SUCCESS; + } + + + const bool isVeVisible = element.IsVisibleI(); + const bool isEvasVisible = evas_object_visible_get(__pSmartObject); + + + // WARNING: Adjust properties after creating objects such as surface(image object), rectangle and clip object + if (unlikely(!isVeVisible)) + { + if (isEvasVisible) + { + evas_object_hide(__pSmartObject); + } + + invalidatedNativeProps = 0; + + goto finished; + } + else + { + if (!isEvasVisible) + { + // WARNING: + // When visibility of VE is changed into 'visible' and evas object is invisible, + // it is needed to set all evas object properties because not all properties were applied due to short-circuit optimization + // (When VE is invisible, bounds and colors are not set for optimization) + invalidatedNativeProps = nativeProps; + } + } + + // Change hierarchy properties such as bounds, clipping and map + if (likely(invalidatedNativeProps & (_VisualElementImpl::HIERARCHY_PROPERTY_COORDINATES | _VisualElementImpl::HIERARCHY_PROPERTY_CONTENTBOUNDS)) || unlikely(__needEvasObjectSync)) + { + bool needResize = false; + bool needMove = false; + bool clipChanged = false; + bool needMap = false; + + Evas_Coord newX = 0; + Evas_Coord newY = 0; + Evas_Coord newW = 0; + Evas_Coord newH = 0; + + __realBounds.width = element.__alignedSize.width; + __realBounds.height = element.__alignedSize.height; + + //_VisualElementImpl::AdjustSizeForSurface(__realBounds.width, __realBounds.height); + _VisualElementCoordinateSystem::ConvertDimensionToPhysical(__realBounds.width, __realBounds.height); + + // WARNING: + // Do not use to MakeIntegralDimension. All information about coordinates(position/size) are calculated with same(point) way. + _VisualElementCoordinateSystem::MakeIntegralPoint(__realBounds.width, __realBounds.height, newW, newH); + + float clipX = 0.0f; + float clipY = 0.0f; + float clipW = 0.0f; + float clipH = 0.0f; + Evas_Object* pParentClipper = null; + + if (unlikely(element.__needTransform) || likely(element.__needClipForUntransformed)) + { + const _VisualElementImpl* pClipSource = element.GetClipSource(); + + if (likely(pClipSource)) + { + _EflNode* pParentClipNode = static_cast< _EflNode* >(pClipSource->GetNativeNode()); + if (likely(pParentClipNode)) + { + clipX = pParentClipNode->__realBounds.x; + clipY = pParentClipNode->__realBounds.y; + clipW = pParentClipNode->__realBounds.width; + clipH = pParentClipNode->__realBounds.height; + + pParentClipper = pParentClipNode->__pClipObject; + } + } + } + + + // Coordinates(including __needTransform flag) are validated by getting clip-source above + + if (likely(!element.__needTransform)) + { + __realBounds.x = element.__boundingBoxToClipSource.x; + __realBounds.y = element.__boundingBoxToClipSource.y; + _VisualElementCoordinateSystem::ConvertPointToPhysical(__realBounds.x, __realBounds.y); + + __realBounds.x += clipX; + __realBounds.y += clipY; + _VisualElementCoordinateSystem::MakeIntegralPoint(__realBounds.x, __realBounds.y, newX, newY); + } + else + { + float x[4]; + float y[4]; + float z[4]; + int intX[4]; + int intY[4]; + const Tizen::Graphics::FloatMatrix4& xform = element.GetMatrixToClipSource(); + + x[0] = 0.0f; + y[0] = 0.0f; + z[0] = 0.0f; + x[1] = element.__alignedSize.width; + y[1] = 0.0f; + z[1] = 0.0f; + x[2] = element.__alignedSize.width; + y[2] = element.__alignedSize.height; + z[2] = 0.0f; + x[3] = 0.0f; + y[3] = element.__alignedSize.height; + z[3] = 0.0f; + + for (int i = 0; i < 4; i++) + { + _MatrixUtilTransform(xform, &x[i], &y[i], &z[i]); + _VisualElementCoordinateSystem::ConvertPointToPhysical(x[i], y[i]); + + x[i] += clipX; + y[i] += clipY; + } + + // WARNING: + // Use surface size for UV-mapping *ONLY FOR* direct-map-on-image-object, not map-on-smart-object !!! + if (unlikely(!__pSharedSurface) || unlikely(element.__useContentBounds) || likely(__pClipObject)) + { + evas_map_point_image_uv_set(__pMap, 0, 0.0, 0.0); + evas_map_point_image_uv_set(__pMap, 1, (double)newW, 0.0); + evas_map_point_image_uv_set(__pMap, 2, (double)newW, (double)newH); + evas_map_point_image_uv_set(__pMap, 3, 0.0, (double)newH); + } + else + { + const Dimension surfaceSize(_VisualElementSurfaceImpl::GetInstance(*__pSharedSurface)->GetPhysicalSize()); + + evas_map_point_image_uv_set(__pMap, 0, 0.0, 0.0); + evas_map_point_image_uv_set(__pMap, 1, (double)surfaceSize.width, 0.0); + evas_map_point_image_uv_set(__pMap, 2, (double)surfaceSize.width, (double)surfaceSize.height); + evas_map_point_image_uv_set(__pMap, 3, 0.0, (double)surfaceSize.height); + } + + for (int i = 0; i < 4; i++) + { + // WARNING: Do not need integral Z ?? + _VisualElementCoordinateSystem::MakeIntegralPoint(x[i], y[i], intX[i], intY[i]); + evas_map_point_coord_set(__pMap, i, intX[i], intY[i], static_cast< int >(z[i])); + } + + + __realBounds.x = x[0]; + __realBounds.y = y[0]; + newX = intX[0]; + newY = intY[0]; + + needMap = true; + } + + // Adjust flag for bounds changing + if (unlikely(__needEvasObjectSync)) + { + needMove = true; + needResize = true; + } + else + { + Evas_Coord objX; + Evas_Coord objY; + Evas_Coord objW; + Evas_Coord objH; + + evas_object_geometry_get(__pSmartObject, &objX, &objY, &objW, &objH); + + if (likely(!needMove)) + { + needMove = (newX != objX || newY != objY); + } + + if (likely(!needResize)) + { + needResize = (newW != objW || newH != objH); + } + } + + + if (unlikely(element.__isClipChildren)) + { + if (unlikely(!__pClipObject) && likely(element.__pSharedData->needSurface)) + { + __pClipObject = evas_object_rectangle_add(__pEvas); + if (likely(__pClipObject)) + { + evas_object_smart_member_add(__pClipObject, __pSmartObject); + evas_object_lower(__pClipObject); + AdjustEvasObjectOrder(); + + evas_object_pass_events_set(__pClipObject, EINA_TRUE); + evas_object_static_clip_set(__pClipObject, 0); // CHECKME: What does this mean by ? + + if (evas_object_visible_get(__pSmartObject)) + { + evas_object_show(__pClipObject); + } + else + { + evas_object_hide(__pClipObject); + } + + needMove = true; + needResize = true; + clipChanged = true; + } + } + } + else + { + if (unlikely(__pClipObject)) + { + evas_object_del(__pClipObject); + __pClipObject = null; + clipChanged = true; + } + } + + + // WARNING: + // Update image-holder information before using it ! + // Image-Holder is needed only when using content-bounds and maps on image-object, not smart-object. + if (unlikely(AdjustImageHolder(element.__useContentBounds && !__pClipObject && needMap))) + { + needMove = true; + needResize = true; + clipChanged = true; + __needEvasObjectSync = true; + } + + + // WARNING: + // In general, changing size/position before mapping/clipping *may* improve performance, because calculating map and clip + // needs bounds information. + + // Set-up Position + if (likely(needMove)) + { + evas_object_move(__pSmartObject, newX, newY); + + if (likely(__pClipObject)) + { + evas_object_move(__pClipObject, newX, newY); + } + + if (likely(__pImageHolder)) + { + evas_object_move(__pImageHolder, newX, newY); + } + + if (likely(pImageObjectNew)) + { + evas_object_move(pImageObjectNew, newX, newY); + } + + if (unlikely(__pRectangleObject)) + { + evas_object_move(__pRectangleObject, newX, newY); + } + + if (unlikely(__pNativeSmartObject)) + { + evas_object_move(__pNativeSmartObject, newX, newY); + } + } + + // Set-up Size + if (unlikely(needResize)) + { + evas_object_resize(__pSmartObject, newW, newH); + + if (likely(__pClipObject)) + { + evas_object_resize(__pClipObject, newW, newH); + } + + if (likely(__pImageHolder)) + { + evas_object_resize(__pImageHolder, newW, newH); + } + + if (likely(pImageObjectNew)) + { + evas_object_resize(pImageObjectNew, newW, newH); + } + + if (unlikely(__pRectangleObject)) + { + evas_object_resize(__pRectangleObject, newW, newH); + } + + if (unlikely(__pNativeSmartObject)) + { + evas_object_resize(__pNativeSmartObject, newW, newH); + } + + } + + + // Set-up Clipping + if (unlikely(__needEvasObjectSync) || unlikely(clipChanged) || unlikely(evas_object_clip_get(__pSmartObject) != pParentClipper)) + { + evas_object_clip_set(__pSmartObject, pParentClipper); + + // CHECKME: + // Is it needed to set clipper for image-holder smart object ? + + if (likely(__pClipObject)) + { + evas_object_clip_set(__pClipObject, pParentClipper); + + if (unlikely(__pImageHolder)) + { + evas_object_clip_set(__pImageHolder, __pClipObject); + } + + if (likely(pImageObjectNew)) + { + evas_object_clip_set(pImageObjectNew, __pClipObject); + } + + if (unlikely(__pRectangleObject)) + { + evas_object_clip_set(__pRectangleObject, __pClipObject); + } + + if (unlikely(__pNativeSmartObject)) + { + evas_object_clip_set(__pNativeSmartObject, __pClipObject); + } + } + else + { + if (unlikely(__pImageHolder)) + { + evas_object_clip_set(__pImageHolder, pParentClipper); + } + + if (likely(pImageObjectNew)) + { + evas_object_clip_set(pImageObjectNew, pParentClipper); + } + + if (unlikely(__pRectangleObject)) + { + evas_object_clip_set(__pRectangleObject, pParentClipper); + } + + if (unlikely(__pNativeSmartObject)) + { + evas_object_clip_set(__pNativeSmartObject, pParentClipper); + } + + } + } + + + // Set-up Maps + if (unlikely(__needEvasObjectSync) || unlikely(__mapUsed != needMap) || unlikely(needMap) || unlikely(clipChanged)) + { + const bool needClipSmartMap = (__pClipObject && needMap); + const bool needClipObjectMap = (!__pClipObject && needMap); + + evas_object_map_enable_set(__pSmartObject, needClipSmartMap); + evas_object_map_set(__pSmartObject, (needClipSmartMap ? __pMap : null)); + + if (unlikely(__pImageHolder)) + { + evas_object_map_enable_set(__pImageHolder, needClipObjectMap); + evas_object_map_set(__pImageHolder, (needClipObjectMap ? __pMap : null)); + + if (likely(pImageObjectNew)) + { + evas_object_map_enable_set(pImageObjectNew, EINA_FALSE); + evas_object_map_set(pImageObjectNew, null); + } + } + else if (likely(pImageObjectNew)) + { + evas_object_map_enable_set(pImageObjectNew, needClipObjectMap); + evas_object_map_set(pImageObjectNew, (needClipObjectMap ? __pMap : null)); + } + + if (unlikely(__pRectangleObject)) + { + evas_object_map_enable_set(__pRectangleObject, needClipObjectMap); + evas_object_map_set(__pRectangleObject, (needClipObjectMap ? __pMap : null)); + } + + if (unlikely(__pNativeSmartObject)) + { + evas_object_map_enable_set(__pNativeSmartObject, needClipObjectMap); + evas_object_map_set(__pNativeSmartObject, (needClipObjectMap ? __pMap : null)); + } + __mapUsed = needMap; + } + + + // Set-up Content Bounds + // WARNING: + // EFL Bug! - evas_object_fill_set should be invoked only *AFTER* adjusting maps !!!!! + // If contents bounds are modifed before adjusting maps, it will not be applied !!! + if (likely(pImageObjectNew) && likely(__pSharedSurface)) + { + bool needDefaultFillSet = true; + + if (unlikely(element.__useContentBounds)) + { + const Dimension surfaceSize(_VisualElementSurfaceImpl::GetInstance(*__pSharedSurface)->GetPhysicalSize()); + const FloatRectangle& contentBounds = element.__contentBounds; + Rectangle contentBoundsAdjusted; + + // Formula: + // + // content bounds(px) = content bounds(uniform) * surface size(px) + // + // surface size(px) 1 + // mapped content size(px) = bounds size(px) * ------------------ = bounds size(px) * ----------------------- + // content size(px) content size(uniform) + // + // mapped content size(px) : surface size(px) = mapped content pos(px) : content pos(px) + // + // mapped content size(px) content pos(uniform) * bounds size(px) + // mapped content pos(px) = content pos(px) * ------------------------- = ----------------------------------------- + // surface size(px) content size(uniform) + + _VisualElementCoordinateSystem::MakeIntegralPoint( + -contentBounds.x * static_cast< float >(newW) / contentBounds.width, + -contentBounds.y * static_cast< float >(newH) / contentBounds.height, + contentBoundsAdjusted.x, + contentBoundsAdjusted.y + ); + _VisualElementCoordinateSystem::MakeIntegralPoint( + static_cast< float >(newW) / contentBounds.width, // WARNING: No use of __realBounds. new[WH] is the real displaying value which is integral. + static_cast< float >(newH) / contentBounds.height, + contentBoundsAdjusted.width, + contentBoundsAdjusted.height + ); + + // Added to resolve the problem that the left edge part is shown repeatedly to the right edge. + contentBoundsAdjusted.width += ceil(static_cast< float >(newW) / contentBounds.width - contentBoundsAdjusted.width); + contentBoundsAdjusted.height += ceil(static_cast< float >(newH) / contentBounds.height - contentBoundsAdjusted.height); + + if (likely(contentBoundsAdjusted.width > 0) && likely(contentBoundsAdjusted.height > 0)) + { + + if (pSurfaceImpl && pSurfaceImpl->__isImageObject) + { + evas_object_image_fill_set( + pImageObjectNew, + contentBoundsAdjusted.x, + contentBoundsAdjusted.y, + contentBoundsAdjusted.width, + contentBoundsAdjusted.height + ); + } + + needDefaultFillSet = false; + } + } + + if (likely(needDefaultFillSet)) + { + if (pSurfaceImpl && pSurfaceImpl->__isImageObject) + { + evas_object_image_fill_set(pImageObjectNew, 0, 0, newW, newH); + } + } + } + + + invalidatedNativeProps &= ~(_VisualElementImpl::HIERARCHY_PROPERTY_COORDINATES | _VisualElementImpl::HIERARCHY_PROPERTY_CONTENTBOUNDS); + } + + + if ((invalidatedNativeProps & (_VisualElementImpl::HIERARCHY_PROPERTY_OPACITY | _VisualElementImpl::HIERARCHY_PROPERTY_CONTENTOPACITY)) || unlikely(__needEvasObjectSync)) + { + float alpha = element.GetOpacityFromRoot(); + bool renderOperationChanged = false; + + if (unlikely(__renderOperation != element.__renderOperation)) + { + renderOperationChanged = true; + __renderOperation = element.__renderOperation; + } + + + // pImageObjectNew does exist. + if (likely(pImageObjectNew)) + { + if (unlikely(renderOperationChanged)) + { + evas_object_render_op_set(pImageObjectNew, GetRenderOperation(element.__renderOperation)); + } + + int premultipliedColor = static_cast< int >(255.0f * alpha); // white color + evas_object_color_set(pImageObjectNew, premultipliedColor, premultipliedColor, premultipliedColor, premultipliedColor); + } + + + // rectangle setting + if (unlikely(__pRectangleObject)) + { + if (unlikely(renderOperationChanged)) + { + evas_object_render_op_set(__pRectangleObject, GetRenderOperation(element.__renderOperation)); + } + + float alphaRect = alpha * __backgroundColor.Alpha() * 255.0f; + + evas_object_color_set( + __pRectangleObject, + static_cast< int >(__backgroundColor.Red() * alphaRect), + static_cast< int >(__backgroundColor.Green() * alphaRect), + static_cast< int >(__backgroundColor.Blue() * alphaRect), + static_cast< int >(alphaRect) + ); + } + + // WARNING: CHECKME: TODO: + // How can we native smart object + + // Native Smart Object does exist. + if (unlikely(__pNativeSmartObject)) + { + + if (unlikely(renderOperationChanged)) + { + evas_object_render_op_set(__pNativeSmartObject, GetRenderOperation(element.__renderOperation)); + } + + if (unlikely(element.__renderOperation == VisualElement::RENDER_OPERATION_COPY)) + { + evas_object_color_set(__pNativeSmartObject, 0, 0, 0, 0); // for smart +// evas_object_color_set(__pNativeSmartObject, 255, 255, 255, 255);// for image + } + else + { + int premultipliedColor = static_cast< int >(255.0f * alpha); // white color + evas_object_color_set(__pNativeSmartObject, premultipliedColor, premultipliedColor, premultipliedColor, premultipliedColor); + } + + } + + invalidatedNativeProps &= ~(_VisualElementImpl::HIERARCHY_PROPERTY_OPACITY | _VisualElementImpl::HIERARCHY_PROPERTY_CONTENTOPACITY); + } + + + // WARNING: Adjust properties after creating objects such as surface(image object), rectangle and clip object + if (likely(isVeVisible)) + { + if (unlikely(!isEvasVisible)) + { + evas_object_show(__pSmartObject); // Children of smart-object such as rectangle and clip-object may be invisible here. + } + } + else + { + if (unlikely(isEvasVisible)) + { + evas_object_hide(__pSmartObject); + } + } + + + // WARNING: + // Only after setting all invalidated properties, need-sync flag can be cleared + __needEvasObjectSync = false; + +finished: + + return E_SUCCESS; +} + +VisualElementSurface* +_EflNode::GetSurface(void) const +{ + return __pSurface; +} + + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnim_EflVisualElementSurfaceImpl.cpp b/src/ui/animations/FUiAnim_EflVisualElementSurfaceImpl.cpp new file mode 100644 index 0000000..ccc9805 --- /dev/null +++ b/src/ui/animations/FUiAnim_EflVisualElementSurfaceImpl.cpp @@ -0,0 +1,321 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_EflVisualElementSurfaceImpl.cpp + * @brief This file contains implementation of _EflVisualElementSurfaceImpl class + * + * This file contains implementation _EflVisualElementSurfaceImpl class. + */ + +#include +#include +#include +#include +#include +#include +#include + +#include "FUiAnim_VisualElementCoordinateSystem.h" +#include "FUi_EcoreEvas.h" +#include "FUi_EcoreEvasMgr.h" +#include "FUiAnim_EflNode.h" +#include "FUiAnim_EflLayer.h" +#include "FUiAnim_EflVisualElementSurfaceImpl.h" +#include "FUiAnim_DisplayManager.h" + +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 +{ + +_EflVisualElementSurfaceImpl::_EflVisualElementSurfaceImpl(const Handle layer, const FloatDimension& size) + : _VisualElementSurfaceImpl(size) + , __pEvasImage(null) + , __pBuffer(null) + , __fromOutside(false) + , __isImageObject(true) + , __imageName() +{ + ClearLastResult(); + + int stride = 0; + _EflLayer* pLayer = reinterpret_cast<_EflLayer*>(layer); + __pEvasImage = evas_object_image_filled_add(pLayer->GetEvas()); + SysTryReturnVoidResult(NID_UI_ANIM, __pEvasImage, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to create a new surface."); + + evas_object_image_alpha_set(__pEvasImage, EINA_TRUE); + + Dimension outputSize; + _VisualElementCoordinateSystem::ConvertDimensionToPhysicalIntegral(size.width, size.height, outputSize.width, outputSize.height); + + if (size.width > 0.0f && outputSize.width == 0) + { + outputSize.width = 1; + } + + if (size.height > 0.0f && outputSize.height == 0) + { + outputSize.height = 1; + } + + int maxW = 0; + 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); + + SysTryCatch(NID_UI_ANIM, outputSize.width <= maxW && outputSize.height <= maxH, , E_OUT_OF_MEMORY, + "[E_INVALID_ARG] Invalid argument(s) is used. size(%d:%d), Surface size has to be smaller than (%d,%d)", outputSize.width, outputSize.height, maxW, maxH); + + evas_object_image_size_set(__pEvasImage, outputSize.width, outputSize.height); + + stride = evas_object_image_stride_get(__pEvasImage); + __pBuffer = new (std::nothrow) unsigned char[stride * outputSize.height]; + SysTryCatch(NID_UI_ANIM, __pBuffer, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed. size(%d,%d)" + , outputSize.width, outputSize.height); + + evas_object_resize(__pEvasImage, outputSize.width, outputSize.height); + evas_object_image_data_set(__pEvasImage, reinterpret_cast(__pBuffer)); + +#if 1 // Todo : Temporary code(regarding the visibility of evas source object) + evas_object_show(__pEvasImage); + evas_object_move(__pEvasImage, -999999, -999999); +#endif + + _DisplayManager::RestoreContext(); + return; + +CATCH: + evas_object_del(__pEvasImage); + __pEvasImage = null; + _DisplayManager::RestoreContext(); +} + +_EflVisualElementSurfaceImpl::_EflVisualElementSurfaceImpl(const Handle layer, const Handle object, const Dimension& size) + : _VisualElementSurfaceImpl(size) + , __pEvasImage(null) + , __pBuffer(null) + , __fromOutside(true) + , __isImageObject(true) + , __imageName() +{ + ClearLastResult(); + + _EflLayer* pLayer = reinterpret_cast<_EflLayer*>(layer); + Evas* pEvas = evas_object_evas_get(reinterpret_cast(object)); + if (pLayer->GetEvas() == pEvas) + { + __pEvasImage = reinterpret_cast(object); + } + SysTryReturnVoidResult(NID_UI_ANIM, __pEvasImage, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to create a new surface."); + + // type check + const char* pType = evas_object_type_get(__pEvasImage); + if (strcmp("image", pType)) + { + __isImageObject = false; + } + +#if 1 // Todo : Temporary code(regarding the visibility of evas source object) + evas_object_show(__pEvasImage); + evas_object_move(__pEvasImage, -999999, -999999); +#endif + _DisplayManager::RestoreContext(); +} + +_EflVisualElementSurfaceImpl::~_EflVisualElementSurfaceImpl(void) +{ + if (__pEvasImage != null) + { + evas_object_hide(__pEvasImage); + + // * DO NOT delete object which has been created from other modules. + if (!__fromOutside) + { + evas_object_del(__pEvasImage); + } + evas_object_smart_member_del(__pEvasImage); + _DisplayManager::RestoreContext(); + } + + if (__pBuffer != null) + { + delete []__pBuffer; + } + + __pBuffer = null; + __pEvasImage = null; +} + +result +_EflVisualElementSurfaceImpl::SetImage(const String& fileName) +{ + SysTryReturnResult(NID_UI_ANIM, __pEvasImage, E_SYSTEM, "A system error has been occurred. Surface is null."); + + unique_ptr pBuffer(Tizen::Base::Utility::StringUtil::StringToUtf8N(fileName)); + SysTryReturnResult(NID_UI_ANIM, pBuffer, E_SYSTEM, "A system error has been occurred. Can not convert the file name."); + + Evas_Object* pSource = evas_object_image_source_get(__pEvasImage); + pSource = pSource ? pSource : __pEvasImage; + + evas_object_image_file_set(pSource, (const char*)(pBuffer->GetPointer()), null); + + Evas_Load_Error err = evas_object_image_load_error_get(__pEvasImage); + SysTryReturnResult(NID_UI_ANIM, err == EVAS_LOAD_ERROR_NONE, E_SYSTEM, "A system error has been occurred. Image file(%s) load failed . MSG = %s", + (const char*)(pBuffer->GetPointer()), evas_load_error_str(err)); + + __imageName = fileName; + + if (__pBuffer != null) + { + delete []__pBuffer; + } + + __pBuffer = null; + _DisplayManager::RestoreContext(); + + return E_SUCCESS; +} + +String +_EflVisualElementSurfaceImpl::GetImage(void) const +{ + return __imageName; +} + +Handle +_EflVisualElementSurfaceImpl::GetNativeHandle(void) const +{ + return (Handle)__pEvasImage; +} + +result +_EflVisualElementSurfaceImpl::GetBufferInfo(BufferInfo& bufferInfo) const +{ + Evas_Object* pSource = evas_object_image_source_get(__pEvasImage); + pSource = pSource ? pSource : __pEvasImage; + + int w = 0; + int h = 0; + evas_object_image_size_get(pSource, &w, &h); + bufferInfo.width = w; + bufferInfo.height = h; + bufferInfo.pitch = evas_object_image_stride_get(__pEvasImage); + + Evas_Colorspace colorspace = evas_object_image_colorspace_get(__pEvasImage); + bufferInfo.bitsPerPixel = GetBytePerPixel(colorspace) * 8; + bufferInfo.pixelFormat = GetPixelFormat(colorspace); + + _BufferInfoImpl* pBufferInfoImpl = _BufferInfoImpl::GetInstance(bufferInfo); + SysTryReturnResult(NID_UI_ANIM, pBufferInfoImpl, E_OUT_OF_MEMORY, "Memory allocation failed."); + pBufferInfoImpl->SetHandle(_BufferInfoImpl::HANDLE_TYPE_VE_SURFACE, reinterpret_cast(__pEvasImage)); + pBufferInfoImpl->SetBounds(Rectangle(0, 0, w, h)); + + return E_SUCCESS; +} + +Dimension +_EflVisualElementSurfaceImpl::GetPhysicalSize(void) const +{ + SysTryReturn(NID_UI_ANIM, __pEvasImage, Dimension(-1, -1), E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Surface is null."); + + int w = 0; + int h = 0; + Evas_Object* pSource = evas_object_image_source_get(__pEvasImage); + if (unlikely(!pSource)) + { + pSource = __pEvasImage; + } + + evas_object_image_size_get(pSource, &w, &h); + + return Tizen::Graphics::Dimension(w, h); +} + +PixelFormat +_EflVisualElementSurfaceImpl::GetPixelFormat(Evas_Colorspace colorspace) const +{ + switch (colorspace) + { + case EVAS_COLORSPACE_ARGB8888: + return PIXEL_FORMAT_ARGB8888; + + case EVAS_COLORSPACE_YCBCR422P601_PL: + // fall through + case EVAS_COLORSPACE_YCBCR422P709_PL: + // fall through + case EVAS_COLORSPACE_RGB565_A5P: + // fall through + case EVAS_COLORSPACE_GRY8: + // fall through + case EVAS_COLORSPACE_YCBCR422601_PL: + // fall through + case EVAS_COLORSPACE_YCBCR420NV12601_PL: + // fall through + case EVAS_COLORSPACE_YCBCR420TM12601_PL: + // fall through + default: + return PIXEL_FORMAT_MIN; + } +} + +int +_EflVisualElementSurfaceImpl::GetBytePerPixel(Evas_Colorspace colorspace) const +{ + switch (colorspace) + { + case EVAS_COLORSPACE_ARGB8888: + return 4; + + case EVAS_COLORSPACE_YCBCR422P601_PL: + // fall through + case EVAS_COLORSPACE_YCBCR422P709_PL: + // fall through + case EVAS_COLORSPACE_RGB565_A5P: + // fall through + case EVAS_COLORSPACE_GRY8: + // fall through + case EVAS_COLORSPACE_YCBCR422601_PL: + // fall through + case EVAS_COLORSPACE_YCBCR420NV12601_PL: + // fall through + case EVAS_COLORSPACE_YCBCR420TM12601_PL: + // fall through + default: + return 0; + } +} + +}}} + diff --git a/src/ui/animations/FUiAnim_EflVisualElementSurfaceImpl.h b/src/ui/animations/FUiAnim_EflVisualElementSurfaceImpl.h new file mode 100644 index 0000000..0df5701 --- /dev/null +++ b/src/ui/animations/FUiAnim_EflVisualElementSurfaceImpl.h @@ -0,0 +1,78 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_EflVisualElementSurfaceImpl.h + * @brief This is the header file for the %_EflVisualElementSurfaceImpl class. + * + * This file contains declarations _EflVisualElementSurfaceImpl class. + */ + +#ifndef _FUI_ANIM_INTERNAL_EFL_VISUAL_ELEMENT_SURFACE_IMPL_H_ +#define _FUI_ANIM_INTERNAL_EFL_VISUAL_ELEMENT_SURFACE_IMPL_H_ + +#include +#include + +#include "FUiAnim_VisualElementSurfaceImpl.h" + +namespace Tizen { namespace Graphics +{ + enum PixelFormat; +}} + +namespace Tizen { namespace Ui { namespace Animations +{ + +class _EflVisualElementSurfaceImpl + : public _VisualElementSurfaceImpl +{ +public: + _EflVisualElementSurfaceImpl(const Handle layer, const Tizen::Graphics::FloatDimension& size); + _EflVisualElementSurfaceImpl(const Handle layer, const Handle object, const Tizen::Graphics::Dimension& size); + virtual ~_EflVisualElementSurfaceImpl(void); + +public: + virtual Handle GetNativeHandle(void) const; + virtual result SetImage(const Tizen::Base::String& fileName); + virtual Tizen::Base::String GetImage(void) const; + virtual result GetBufferInfo(Tizen::Graphics::BufferInfo& bufferInfo) const; + virtual Tizen::Graphics::Dimension GetPhysicalSize(void) const; + +private: + _EflVisualElementSurfaceImpl(void); // no implementation + _EflVisualElementSurfaceImpl(const _EflVisualElementSurfaceImpl& rhs); + _EflVisualElementSurfaceImpl& operator =(const _EflVisualElementSurfaceImpl& rhs); + + Tizen::Graphics::PixelFormat GetPixelFormat(Evas_Colorspace colorspace) const; + int GetBytePerPixel(Evas_Colorspace colorspace) const; + +private: + Evas_Object* __pEvasImage; + unsigned char* __pBuffer; + bool __fromOutside; + bool __isImageObject; + Tizen::Base::String __imageName; + + friend class _VisualElementSurfaceImpl; + friend class _VisualElementImpl; + friend class _EflNode; +}; // _EflVisualElementSurfaceImpl + +}}} // Tizen::Ui::Animations + +#endif //_FUI_ANIM_INTERNAL_EFL_VISUAL_ELEMENT_SURFACE_IMPL_H_ diff --git a/src/ui/animations/FUiAnim_FloatAnimationImpl.cpp b/src/ui/animations/FUiAnim_FloatAnimationImpl.cpp new file mode 100644 index 0000000..7bdcb29 --- /dev/null +++ b/src/ui/animations/FUiAnim_FloatAnimationImpl.cpp @@ -0,0 +1,127 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_FloatAnimationImpl.cpp + * @brief This file contains implementation of _FloatAnimationImpl class + * + * This file contains implementation _FloatAnimationImpl class. + */ + +#include +#include + +#include + + +#include "FUiAnim_VisualElementAnimationVariantInterpolator.h" +#include "FUiAnim_AnimationBaseImpl.h" +#include "FUiAnim_FloatAnimationImpl.h" + + +using namespace Tizen::Base; +using namespace Tizen::Ui::Animations; +using namespace Tizen::Base::Collection; + + +namespace Tizen { namespace Ui { namespace Animations +{ + +_FloatAnimationImpl::~_FloatAnimationImpl(void) +{ +} + +_FloatAnimationImpl::_FloatAnimationImpl(FloatAnimation* pFloat) + : startValue(Float(0.0f)) + , endValue(Float(0.0f)) + , __pFloatAnimation(pFloat) +{ +} + +result +_FloatAnimationImpl::CopyFloatAnimationValue(const FloatAnimation& floatAnimation) +{ + result r = E_SUCCESS; + + _AnimationBaseImpl* pAnimationBaseImpl = __pFloatAnimation->_pAnimationBaseImpl; + + // Deleting the contents of existing keyframe + r = pAnimationBaseImpl->RemoveAllKeyFrames(); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), r, "Propagating."); + + // Copying the contents + startValue = floatAnimation._pFloatAnimationImpl->startValue; + endValue = floatAnimation._pFloatAnimationImpl->endValue; + + if (floatAnimation._pAnimationBaseImpl->keyFrameList.GetCount() == 0) + { + return E_SUCCESS; + } + + IMapEnumeratorT< long, Object* >* pMapEnum = null; + MapEntryT< long, Object* > value; + Float* pFloatObj = null; + + pMapEnum = floatAnimation._pAnimationBaseImpl->keyFrameList.GetMapEnumeratorN(); + r = GetLastResult(); + SysTryReturnResult(NID_UI_ANIM, (pMapEnum), r, "Failed to get the enumerator."); + + while (pMapEnum->MoveNext() == E_SUCCESS) + { + r = pMapEnum->GetCurrent(value); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + Float* pFloatValue = dynamic_cast< Float* >(value.GetValue()); + SysTryCatch(NID_UI_ANIM, (pFloatValue), r = E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. Key frame is invalid."); + + pFloatObj = new (std::nothrow) Float(*pFloatValue); + SysTryCatch(NID_UI_ANIM, (pFloatObj), r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = pAnimationBaseImpl->keyFrameList.Add(value.GetKey(), pFloatObj); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + delete pMapEnum; + + return E_SUCCESS; + +CATCH: + delete pFloatObj; + delete pMapEnum; + + return r; +} + +result +_FloatAnimationImpl::GetAnimatedValue(float actualProgress, float& animatedValue) const +{ + Variant startFloatValue(startValue.ToFloat()); + Variant endFloatValue(endValue.ToFloat()); + Variant value(0.0f); + + _VisualElementAnimationVariantInterpolator variantInterpolator; + result r = variantInterpolator.Interpolate(actualProgress, startFloatValue, endFloatValue, value); + + animatedValue = value.ToFloat(); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to get the animated value."); + + return r; +} + + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnim_FloatAnimationImpl.h b/src/ui/animations/FUiAnim_FloatAnimationImpl.h new file mode 100644 index 0000000..ebd087e --- /dev/null +++ b/src/ui/animations/FUiAnim_FloatAnimationImpl.h @@ -0,0 +1,57 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_FloatAnimationImpl.h + * @brief This is the header file for the _FloatAnimationImpl class. + * + * This header file contains the declarations of the _FloatAnimationImpl class. + */ + +#ifndef _FUI_ANIM_INTERNAL_FLOAT_ANIMATION_IMPL_H_ +#define _FUI_ANIM_INTERNAL_FLOAT_ANIMATION_IMPL_H_ + +#include + +namespace Tizen { namespace Ui { namespace Animations +{ + +class _FloatAnimationImpl + : public Tizen::Base::Object +{ + +public: + _FloatAnimationImpl(FloatAnimation* pFloat); + ~_FloatAnimationImpl(void); + + result CopyFloatAnimationValue(const FloatAnimation& floatAnimation); + + result GetAnimatedValue(float actualProgress, float& animatedValue) const; + + Tizen::Base::Float startValue; + Tizen::Base::Float endValue; + +private: + _FloatAnimationImpl(const _FloatAnimationImpl& rhs); + _FloatAnimationImpl& operator =(const _FloatAnimationImpl& rhs); + FloatAnimation* __pFloatAnimation; + +}; //_FloatAnimationImpl + +}}} // Tizen::Ui::Animations + +#endif //_FUI_ANIM_INTERNAL_FLOAT_ANIMATION_IMPL_H_ diff --git a/src/ui/animations/FUiAnim_FrameAnimatorImpl.cpp b/src/ui/animations/FUiAnim_FrameAnimatorImpl.cpp new file mode 100644 index 0000000..8ec500a --- /dev/null +++ b/src/ui/animations/FUiAnim_FrameAnimatorImpl.cpp @@ -0,0 +1,1169 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_FrameAnimatorImpl.cpp + * @brief This file contains implementation of _FrameAnimatorImpl class + * + * This file contains implementation of _FrameAnimatorImpl class. + */ + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "FUi_ControlImpl.h" +#include "FUi_Matrix3Df.h" +#include "FUiAnim_FrameAnimatorImpl.h" +#include "FUiAnim_VisualElementAnimationImpl.h" + +#include "FUiAnim_VisualElementImpl.h" +#include "FUiAnim_ControlVisualElement.h" +#include "FUiAnim_MatrixUtil.h" + + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; + + +namespace Tizen { namespace Ui { namespace Animations +{ + + +_FrameAnimatorImpl::_FrameAnimatorImpl(FrameAnimator* pFrameAnimator) + : __pFrame(null) + , __pFrameAnimator(pFrameAnimator) + , __transactionId(-1) + , __frameAnimatorStatus(ANIMATOR_STATUS_STOPPED) + , __pCurrentForm(null) + , __pNextForm(null) + , __pCurrentFormVisualElement(null) + , __pNextFormVisualElement(null) + , __animationEffectType(FRAME_ANIMATOR_FORM_TRANSITION_ANIMATION_FADE_IN_OUT) + , __animInterpolatorType(ANIMATION_INTERPOLATOR_LINEAR) + , __duration(400) + , __firstBezierControlPointsTime(0.0f) + , __firstBezierControlPointsValue(0.0f) + , __secondBezierControlPointsTime(0.0f) + , __secondBezierControlPointsValue(0.0f) + , __veDefaultMatrix() + , __veDefaultBounds(0, 0, 0, 0) + , __veDefaultOpacity(0) + , __pBgElement(null) + , __pCurrentCaptureVisualElement(null) + , __pNextCaptureVisualElement(null) + , __pDummySurface(null) +{ +} + +result +_FrameAnimatorImpl::Construct(const Frame& source) +{ + SysAssertf((__pFrame == null), "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class."); + + result r = E_SUCCESS; + + __pFrame = const_cast< Frame* >(&source); + + r = __frameActiveAnimationList.Construct(); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), , r,"[%s] Failed to construct FrameActiveAnimationList.", GetErrorMessage(r)); + + __pBgElement = new (std::nothrow) _ControlVisualElement(); + SysTryCatch(NID_UI_ANIM, (__pBgElement != null), r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = __pBgElement->ConstructControlVisualElement(); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), , r, "[%s] Failed to construct ControlVisualElement.", GetErrorMessage(r)); + + __pBgElement->SetName("FrameAnimatorBG"); + __pBgElement->SetShowState(true); + __pBgElement->SetImplicitAnimationEnabled(false); + + __pCurrentCaptureVisualElement = new (std::nothrow) _VisualElement(); + SysTryCatch(NID_UI_ANIM, (__pCurrentCaptureVisualElement != null), r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = __pCurrentCaptureVisualElement->Construct(); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), , r, "[%s] Failed to construct VisualElement.", GetErrorMessage(r)); + + __pCurrentCaptureVisualElement->SetName("FrameAnimatorCurrentCapture"); + __pCurrentCaptureVisualElement->SetShowState(false); + __pCurrentCaptureVisualElement->SetImplicitAnimationEnabled(false); + + __pNextCaptureVisualElement = new (std::nothrow) _VisualElement(); + SysTryCatch(NID_UI_ANIM, (__pNextCaptureVisualElement != null), r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = __pNextCaptureVisualElement->Construct(); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), , r, "[%s] Failed to construct VisualElement.", GetErrorMessage(r)); + + __pNextCaptureVisualElement->SetName("FrameAnimatorNextCapture"); + __pNextCaptureVisualElement->SetShowState(false); + __pNextCaptureVisualElement->SetImplicitAnimationEnabled(false); + + __pBgElement->AttachChild(*__pCurrentCaptureVisualElement); + __pBgElement->AttachChild(*__pNextCaptureVisualElement); + + __pDummySurface = new (std::nothrow) VisualElementSurface(); + SysTryCatch(NID_UI_ANIM, (__pDummySurface != null), r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = __pDummySurface->Construct(*__pFrame->GetDisplayContext(), Dimension(1,1)); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), , r, "[%s] Failed to construct VisualElementSurface.", GetErrorMessage(r)); + + return r; + +CATCH: + Dispose(); + + return r; +} + +_FrameAnimatorImpl::~_FrameAnimatorImpl(void) +{ + Dispose(); +} + +result +_FrameAnimatorImpl::Dispose(void) +{ + if (__transactionId) + { + AnimationTransaction::Stop(__transactionId); + __transactionId = -1; + } + + if (__pDummySurface) + { + delete __pDummySurface; + __pDummySurface = null; + } + + // delete with children + if (__pBgElement) + { + __pBgElement->Destroy(); + __pBgElement = null; + } + + __frameActiveAnimationList.RemoveAll(); + __frameAnimStatusEventListener.RemoveAll(); + + return E_SUCCESS; +} + +bool +_FrameAnimatorImpl::FrameActiveAnimation::operator ==(const FrameActiveAnimation& frameActiveAnim) const +{ + if ((formTransitionAnimationType == frameActiveAnim.formTransitionAnimationType) && (pPropertyAnimation == frameActiveAnim.pPropertyAnimation)) + { + return true; + } + + return false; +} + +bool +_FrameAnimatorImpl::FrameActiveAnimation::operator !=(const FrameActiveAnimation& frameActiveAnim) const +{ + if ((formTransitionAnimationType != frameActiveAnim.formTransitionAnimationType) || (pPropertyAnimation != frameActiveAnim.pPropertyAnimation)) + { + return true; + } + + return false; +} + +result +_FrameAnimatorImpl::AddFrameAnimatorEventListener(IFrameAnimatorEventListener& listener) +{ + IFrameAnimatorEventListener* pStatusListener = &listener; + + if (__frameAnimStatusEventListener.Contains(pStatusListener) == true) + { + return E_OBJ_ALREADY_EXIST; + } + + result r = __frameAnimStatusEventListener.Add(pStatusListener); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to add frame animator event listener."); + + return r; +} + +result +_FrameAnimatorImpl::RemoveFrameAnimatorEventListener(IFrameAnimatorEventListener& listener) +{ + IFrameAnimatorEventListener* pStatusListener = &listener; + + result r = __frameAnimStatusEventListener.Remove(pStatusListener); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_OBJ_NOT_FOUND, "Propagating."); + + return r; +} + +result +_FrameAnimatorImpl::StopAllAnimations(void) +{ + if (__transactionId != -1) + { + result r = AnimationTransaction::Stop(__transactionId); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), r, "Propagating."); + } + + return E_SUCCESS; +} + +result +_FrameAnimatorImpl::AddControl(const Control& control) +{ + Form* pCurrentForm = __pFrame->GetCurrentForm(); + + Form* pNextForm = dynamic_cast< Form* >(const_cast< Control* >(&control)); + SysTryReturnResult(NID_UI_ANIM, (pNextForm), E_INVALID_ARG, "Invalid argument(s) is used. Control is not Form."); + SysTryReturnResult(NID_UI_ANIM, (pCurrentForm != pNextForm), E_SUCCESS, "Current form is same as the new form."); + + result r = __pFrame->AddControl(control); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), r, "Propagating."); + + r = ChangeCurrentForm(pCurrentForm, *pNextForm); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), r, "Propagating."); + + return E_SUCCESS; +} + +result +_FrameAnimatorImpl::SetCurrentForm(const Form& form) +{ + Form* pCurrentForm = __pFrame->GetCurrentForm(); + + Form* pNextForm = const_cast< Form* >(&form); + SysTryReturnResult(NID_UI_ANIM, (pCurrentForm != pNextForm), E_SUCCESS, "Current form is same as the new form."); + + result r = ChangeCurrentForm(pCurrentForm, *pNextForm); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), r, "Propagating."); + + return E_SUCCESS; +} + +result +_FrameAnimatorImpl::ChangeCurrentForm(Form* pCurrentForm, Form& nextForm) +{ + SysTryReturnResult(NID_UI_ANIM, __transactionId == -1, E_INVALID_OPERATION, "Last frame animation was not completed."); + + result r = E_SUCCESS; + + if (IsAnimationSupported() == false || pCurrentForm == null) + { + r = __pFrame->SetCurrentForm(nextForm); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), r, "Propagating."); + + __pNextForm->Draw(); + + return E_SUCCESS; + } + + __pCurrentForm = pCurrentForm; + __pNextForm = &nextForm; + + _ControlImpl* pControlImpl = null; + + pControlImpl = _ControlImpl::GetInstance(*__pCurrentForm); + __pCurrentFormVisualElement = pControlImpl->GetCore().GetVisualElement(); + + r = __pFrame->SetCurrentForm(*__pNextForm); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), r, "Propagating."); + + pControlImpl = _ControlImpl::GetInstance(*__pNextForm); + __pNextFormVisualElement = pControlImpl->GetCore().GetVisualElement(); + + // for Layout + pControlImpl->SetBoundsAndUpdateLayout(pControlImpl->GetBoundsF()); + + __veDefaultMatrix = __pCurrentFormVisualElement->GetTransformMatrix(); + __veDefaultBounds = _VisualElementImpl::GetInstance(*__pCurrentFormVisualElement)->GetBoundingBox(); + __veDefaultOpacity = 1.0f; //TODO: check__pCurrentFormVisualElement->GetOpacity(); + __pCurrentFormVisualElement->SetShowState(true); + + // prepare background + FloatRectangle bgBounds = __pCurrentFormVisualElement->GetBounds(); + + if (__animationEffectType == FRAME_ANIMATOR_FORM_TRANSITION_ANIMATION_TRANSLATE_LEFT + || __animationEffectType == FRAME_ANIMATOR_FORM_TRANSITION_ANIMATION_TRANSLATE_RIGHT) + { + if (bgBounds.width <= bgBounds.height) + { + bgBounds.width = bgBounds.height; + } + else + { + bgBounds.height = bgBounds.width; + } + } + + __pBgElement->SetBounds(bgBounds); + + Color bgColor = pCurrentForm->GetBackgroundColor(); + __pBgElement->SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255, (float)bgColor.GetGreen() / 255, (float)bgColor.GetBlue() / 255, (float)bgColor.GetAlpha() / 255)); + + VisualElement* pParentVisualElement = __pCurrentFormVisualElement->GetParent(); + SysTryReturnResult(NID_UI_ANIM, (pParentVisualElement), E_SYSTEM, "A system error has been occurred. Failed to get visual element's parent."); + + pParentVisualElement->InsertChild(*__pBgElement, __pCurrentFormVisualElement, false); + + AnimationTransaction::Begin(__transactionId); + AnimationTransaction::SetCurrentTransactionEventListener(this); + + r = SetAnimations(); + + if (r != E_SUCCESS) + { + AnimationTransaction::Discard(); + RemoveAllAnimations(true); + + return r; + } + + r = AnimationTransaction::Commit(); + 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) +{ + result r = E_SUCCESS; + + 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 * (nextSize.width)), 0); + + Point nextFormStartPoint = Point((nextSize.width), 0); + Point nextFormEndPoint = Point(0, 0); + + if (unlikely(angle != 0.0f)) + { + 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"), 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"), 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 nextFormStartPoint = Point(-1 * (nextSize.width), 0); + Point nextFormEndPoint = Point(0, 0); + + if (unlikely(angle != 0.0f)) + { + 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"), 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"), 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, "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"), 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"), 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; + + 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(__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(__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, "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); + + 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"), 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"), 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, "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; + + 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"), 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"), 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"), 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; + + 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(__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(__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(__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; + + default: + SysLogException(NID_UI_ANIM, E_SYSTEM, "A system error has been occurred. FrameAnimatorFormTransitionAnimation is invalid."); + return E_SYSTEM; + } + + return E_SUCCESS; +} + +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); + __pNextCaptureVisualElement->SetSurface(null); + + // set default value + __pCurrentCaptureVisualElement->SetOpacity(1.0f); + __pNextCaptureVisualElement->SetOpacity(1.0f); + + __pCurrentCaptureVisualElement->SetTransformMatrix(__pCurrentFormVisualElement->GetTransformMatrix()); + __pNextCaptureVisualElement->SetTransformMatrix(__pNextFormVisualElement->GetTransformMatrix()); + + __pCurrentCaptureVisualElement->SetShowState(true); + __pNextCaptureVisualElement->SetShowState(true); + + FloatRectangle currentBounds = __pCurrentFormVisualElement->GetBounds(); + __pCurrentCaptureVisualElement->SetBounds(currentBounds); + + FloatRectangle nextBounds = __pNextFormVisualElement->GetBounds(); + __pNextCaptureVisualElement->SetBounds(nextBounds); + + // drawing + __pCurrentFormVisualElement->Draw(); + __pNextFormVisualElement->Draw(); + + Canvas* pCanvas = null; + + pCanvas = __pCurrentCaptureVisualElement->GetCanvasN(); + SysTryReturnResult(NID_UI_ANIM, (pCanvas), E_SYSTEM, "A system error has been occurred. Failed to get canvas."); + + currentBounds.SetPosition(0, 0); + _VisualElementImpl::GetInstance(*__pCurrentFormVisualElement)->Capture(*pCanvas, currentBounds, currentBounds, true); + delete pCanvas; + + pCanvas = __pNextCaptureVisualElement->GetCanvasN(); + SysTryReturnResult(NID_UI_ANIM, (pCanvas), E_SYSTEM, "A system error has been occurred. Failed to get canvas."); + + nextBounds.SetPosition(0, 0); + _VisualElementImpl::GetInstance(*__pNextFormVisualElement)->Capture(*pCanvas, nextBounds, nextBounds, true); + delete pCanvas; + + return E_SUCCESS; +} + +result +_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(); + SysTryReturnResult(NID_UI_ANIM, (propAnimation), E_OUT_OF_MEMORY, "Memory allocation failed."); + + propAnimation->SetDuration(__duration); + + const IVisualElementAnimationTimingFunction* pTimingFunction = null; + const wchar_t* pVePropType = null; + Rectangle rect = __pCurrentForm->GetBounds(); + + switch (__animInterpolatorType) + { + case ANIMATION_INTERPOLATOR_LINEAR: + pTimingFunction = VisualElementAnimation::GetTimingFunctionByName(L"Linear"); //INTERPOLATION_LINEAR + break; + + case ANIMATION_INTERPOLATOR_EASE_IN: + pTimingFunction = VisualElementAnimation::GetTimingFunctionByName(L"EaseIn"); //INTERPOLATION_EASE_IN + break; + + case ANIMATION_INTERPOLATOR_EASE_OUT: + pTimingFunction = VisualElementAnimation::GetTimingFunctionByName(L"EaseOut"); //INTERPOLATION_EASE_OUT + break; + + case ANIMATION_INTERPOLATOR_EASE_IN_OUT: + pTimingFunction = VisualElementAnimation::GetTimingFunctionByName(L"EaseInOut"); //INTERPOLATION_EASE_INOUT + break; + + case ANIMATION_INTERPOLATOR_DISCRETE: + pTimingFunction = VisualElementAnimation::GetTimingFunctionByName(L"Discrete"); //INTERPOLATION_DISCRETE + break; + + 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] Memory allocation failed."); + + ((BezierTimingFunction*) pTimingFunction)->SetControlPoints(__firstBezierControlPointsTime, __firstBezierControlPointsValue, __secondBezierControlPointsTime, __secondBezierControlPointsValue); + } + break; + + default: + SysTryCatch(NID_UI_ANIM, false, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Animation interpolator is invalid. "); + break; + } + + SysTryCatch(NID_UI_ANIM, (pTimingFunction), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to get TimingFunction."); + propAnimation->SetTimingFunction(pTimingFunction); + + switch(startValue.GetType()) + { + case VARIANT_TYPE_POINT: + startPoint = startValue.ToPoint(); + endPoint = endValue.ToPoint(); + break; + case VARIANT_TYPE_DIMENSION: + startSize = startValue.ToDimension(); + endSize = endValue.ToDimension(); + break; + default: break; + } + + switch (animTarget) + { + case ANIMATION_TARGET_SIZE: + { + float anchorX = 0.0f; + float anchorY = 0.0f; + float anchorZ = 0.0f; + + float scaleX = 1.0f; + float scaleY = 1.0f; + float scaleZ = 1.0f; + + pVePropType = VePropTransform; + + anchorX = (float) rect.width * anchorX; + anchorY = (float) rect.height * anchorY; + + scaleX = (float) startSize.width / (float) rect.width; + scaleY = (float) startSize.height / (float) rect.height; + + Tizen::Graphics::FloatMatrix4 startMatrix = Tizen::Graphics::FloatMatrix4(); + 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; + + _MatrixUtilScale(endMatrix, scaleX, scaleY, scaleZ); + _MatrixUtilAtAnchor(endMatrix, anchorX, anchorY, anchorZ); + + propAnimation->SetStartValue(Variant(startMatrix)); + propAnimation->SetEndValue(Variant(endMatrix)); + } + break; + + 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; + + rect = pLayer->GetBounds(); + rect.x = startPoint.x; + rect.y = startPoint.y; + propAnimation->SetStartValue(Variant(rect)); + + rect.x = endPoint.x; + rect.y = endPoint.y; + propAnimation->SetEndValue(Variant(rect)); + } + break; + + 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); + } + break; + + case ANIMATION_TARGET_ROTATION: + { + float anchorX = 0.0f; + float anchorY = 0.0f; + + pVePropType = VeSubPropTransformRotationZ; + _VisualElementImpl::GetInstance(*pLayer)->SetAnchor(FloatPoint(anchorX, anchorY)); + + propAnimation->SetStartValue(startValue); + propAnimation->SetEndValue(endValue); + } + break; + + default: + { + SysTryCatch(NID_UI_ANIM, false, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] animTarget is invalid."); + } + break; + } + + 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."); + + r = AddFrameActiveAnimation(pLayer, __animationEffectType, propAnimation, const_cast < IVisualElementAnimationTimingFunction* >(pTimingFunction), animName); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), r = E_SYSTEM, r, "[E_SYSTEM] A system error has been occurred. Failed to add frame active animation to the playing list."); + + return E_SUCCESS; + +CATCH: + delete propAnimation; + + SysLogException(NID_UI_ANIM, E_SYSTEM, "A system error has been occurred. Failed to start frame animation."); + return E_SYSTEM; +} + +result +_FrameAnimatorImpl::AddFrameActiveAnimation(VisualElement* _pVisualElement, FrameAnimatorFormTransitionAnimation _formAnimation, + VisualElementPropertyAnimation* _pPropertyAnimation, IVisualElementAnimationTimingFunction* _pTimingFunction, + String _animName) +{ + SysTryReturnResult(NID_UI_ANIM + , (_formAnimation >= FRAME_ANIMATOR_FORM_TRANSITION_ANIMATION_TRANSLATE_LEFT + && _formAnimation < FRAME_ANIMATOR_FORM_TRANSITION_ANIMATION_MAX) + , E_INVALID_ARG, "Invalid argument(s) is used. FormTransitionType argument is invalid."); + + result r = E_SUCCESS; + FrameActiveAnimation frameActiveAnim; + + frameActiveAnim.pVisualElement = _pVisualElement; + frameActiveAnim.formTransitionAnimationType = _formAnimation; + frameActiveAnim.pPropertyAnimation = _pPropertyAnimation; + frameActiveAnim.pTimingFunction = _pTimingFunction; + frameActiveAnim.animName = _animName; + + r = __frameActiveAnimationList.Add(frameActiveAnim); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), r, "Propagating."); + + return r; +} + +Tizen::Ui::Animations::VisualElementPropertyAnimation* +_FrameAnimatorImpl::GetFrameActiveAnimationAt(int index) +{ + SysTryReturn(NID_UI_ANIM, (index >= 0 && index < __frameActiveAnimationList.GetCount()), + null, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. Index (%d) is out of range."); + + FrameActiveAnimation frameActiveAnim; + result r = __frameActiveAnimationList.GetAt(index, frameActiveAnim); + + SysTryReturn(NID_UI_ANIM, (r == E_SUCCESS), null, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to retrieve FrameActiveAnimation."); + return frameActiveAnim.pPropertyAnimation; +} + +result +_FrameAnimatorImpl::RemoveAnimationAt(int index) +{ + result r = E_SUCCESS; + SysTryReturnResult(NID_UI_ANIM, (index >= 0 && index < __frameActiveAnimationList.GetCount()), + E_OUT_OF_RANGE, "Index (%d) is out of range.", index); + + FrameActiveAnimation frameActiveAnim; + + r = __frameActiveAnimationList.GetAt(index, frameActiveAnim); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to retrieve FrameActiveAnimation."); + + r = __frameActiveAnimationList.RemoveAt(index); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to remove animation from play list."); + + if (__animInterpolatorType == ANIMATION_INTERPOLATOR_BEZIER) + { + frameActiveAnim.pPropertyAnimation->SetTimingFunction(null); + delete frameActiveAnim.pTimingFunction; + frameActiveAnim.pTimingFunction = null; + } + + delete frameActiveAnim.pPropertyAnimation; + frameActiveAnim.pPropertyAnimation = null; + + return r; +} + +result +_FrameAnimatorImpl::RemoveAllAnimations(bool deleteAnimation) +{ + VisualElement* pParentVisualElement = __pBgElement->GetParent(); + if (pParentVisualElement) + { + pParentVisualElement->DetachChild(*__pBgElement); + + __pCurrentCaptureVisualElement->SetShowState(false); + __pNextCaptureVisualElement->SetShowState(false); + + __pCurrentCaptureVisualElement->SetSurface(__pDummySurface); + __pNextCaptureVisualElement->SetSurface(__pDummySurface); + } + + if (deleteAnimation) + { + __pNextFormVisualElement->RemoveAllAnimations(); + __pCurrentFormVisualElement->RemoveAllAnimations(); + } + + __transactionId = -1; + + result r = E_SUCCESS; + + for (int index = __frameActiveAnimationList.GetCount() - 1; index >= 0; index--) + { + r = RemoveAnimationAt(index); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), r, "Propagating."); + } + + return r; +} + +bool +_FrameAnimatorImpl::IsAnimationSupported(void) const +{ + return _VisualElementAnimationImpl::IsAnimationSupported(); +} + +bool +_FrameAnimatorImpl::IsFormPresent(Tizen::Ui::Controls::Form& pPrevForm) const +{ + LinkedList* pLinkedList = null; + + pLinkedList = dynamic_cast< LinkedList* >(__pFrame->GetControls()); + SysTryReturn(NID_UI_ANIM, (pLinkedList), false, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to get control list."); + + bool isPresent = pLinkedList->Contains(pPrevForm); + + if (isPresent) + { + return true; + } + else + { + return false; + } +} + +void +_FrameAnimatorImpl::OnAnimationTransactionStarted(int transactionId) +{ + OnFrameAnimationStarted(); +} + + +void +_FrameAnimatorImpl::OnAnimationTransactionStopped(int transactionId) +{ + __pNextFormVisualElement->SetTransformMatrix(__pNextFormVisualElement->GetTransformMatrix()); + __pNextFormVisualElement->SetBounds(__pNextFormVisualElement->GetBounds()); + __pNextFormVisualElement->SetOpacity(__pNextFormVisualElement->GetOpacity()); + + OnFrameAnimationStopped(false); +} + +void +_FrameAnimatorImpl::OnAnimationTransactionFinished(int transactionId) +{ + OnFrameAnimationStopped(true); +} + +void +_FrameAnimatorImpl::OnFrameAnimationStarted(void) +{ + result r = E_SUCCESS; + + for (int index = __frameAnimStatusEventListener.GetCount() - 1; index >= 0; index--) + { + IFrameAnimatorEventListener* pStatusListener = null; + + r = __frameAnimStatusEventListener.GetAt(index, pStatusListener); + SysTryReturnVoidResult(NID_UI_ANIM, (r == E_SUCCESS), E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] Index (%d) is out of range.", index); + + pStatusListener->OnFormTransitionAnimationStarted(*__pFrameAnimator, *__pFrame, *__pCurrentForm, *__pNextForm); + } +} + +void +_FrameAnimatorImpl::OnFrameAnimationStopped(bool completed) +{ + result r = E_SUCCESS; + + if (IsFormPresent(*__pCurrentForm)) + { + __pCurrentFormVisualElement->SetTransformMatrix(__veDefaultMatrix); + __pCurrentFormVisualElement->SetBounds(__veDefaultBounds); + __pCurrentFormVisualElement->SetOpacity(__veDefaultOpacity); + __pCurrentFormVisualElement->SetShowState(false); + } + + RemoveAllAnimations(false); + + for (int index = __frameAnimStatusEventListener.GetCount() - 1; index >= 0; index--) + { + IFrameAnimatorEventListener* pStatusListener = null; + + r = __frameAnimStatusEventListener.GetAt(index, pStatusListener); + SysTryReturnVoidResult(NID_UI_ANIM, (r == E_SUCCESS), E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] Index (%d) is out of range.", index); + + if (!completed) + { + pStatusListener->OnFormTransitionAnimationStopped(*__pFrameAnimator, *__pFrame, *__pCurrentForm, *__pNextForm); + } + else + { + pStatusListener->OnFormTransitionAnimationFinished(*__pFrameAnimator, *__pFrame, *__pCurrentForm, *__pNextForm); + } + } + + __frameAnimatorStatus = ANIMATOR_STATUS_STOPPED; +} + +_FrameAnimatorImpl* +_FrameAnimatorImpl::GetInstance(FrameAnimator& frameAnimator) +{ + return frameAnimator._pFrameAnimatorImpl; +} + +const _FrameAnimatorImpl* +_FrameAnimatorImpl::GetInstance(const FrameAnimator& frameAnimator) +{ + return frameAnimator._pFrameAnimatorImpl; +} + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnim_FrameAnimatorImpl.h b/src/ui/animations/FUiAnim_FrameAnimatorImpl.h new file mode 100644 index 0000000..5909cbd --- /dev/null +++ b/src/ui/animations/FUiAnim_FrameAnimatorImpl.h @@ -0,0 +1,337 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_FrameAnimatorImpl.h + * @brief This is the header file for the _FrameAnimatorImpl class. + * + * This header file contains the declarations of the _FrameAnimatorImpl class. @n + */ + +#ifndef _FUI_ANIM_INTERNAL_FRAME_ANIMATOR_IMPL_H_ +#define _FUI_ANIM_INTERNAL_FRAME_ANIMATOR_IMPL_H_ + +#include +#include +#include + +#include "FUiAnim_ControlVisualElement.h" + + +namespace Tizen { namespace Ui { namespace Animations +{ + +class _FrameAnimatorImpl + : public Tizen::Base::Object + , public IAnimationTransactionEventListener + , virtual public Tizen::Base::Runtime::IEventListener +{ +public: + _FrameAnimatorImpl(FrameAnimator* pFrameAnimator); + ~_FrameAnimatorImpl(void); + + result Construct(const Tizen::Ui::Controls::Frame& source); + + result AddFrameAnimatorEventListener(IFrameAnimatorEventListener& listener); + result RemoveFrameAnimatorEventListener(IFrameAnimatorEventListener& listener); + + result StopAllAnimations(void); + + result AddControl(const Tizen::Ui::Control& control); + result SetCurrentForm(const Tizen::Ui::Controls::Form& form); + + bool IsAnimationSupported(void) const; + + virtual void OnAnimationTransactionStarted(int transactionId); + virtual void OnAnimationTransactionStopped(int transactionId); + virtual void OnAnimationTransactionFinished(int transactionId); + + void OnFrameAnimationStarted(void); + void OnFrameAnimationStopped(bool completed); + + AnimatorStatus + GetFrameAnimatorStatus(void) const + { + return __frameAnimatorStatus; + } + + FrameAnimatorFormTransitionAnimation + GetAnimationEffectType(void) const + { + return __animationEffectType; + } + + void + SetAnimationEffectType(FrameAnimatorFormTransitionAnimation animationEffectType) + { + __animationEffectType = animationEffectType; + } + + long + GetDuration(void) const + { + return __duration; + } + + void + SetDuration(long duration) + { + __duration = duration; + } + + AnimationInterpolatorType + GetAnimInterpolatorType(void) const + { + return __animInterpolatorType; + } + + void + SetAnimInterpolatorType(AnimationInterpolatorType animInterpolatorType) + { + __animInterpolatorType = animInterpolatorType; + } + + void + GetFormTransitionBezierControlPoints(float& firstTime, float& firstValue, float& secondTime, float& secondValue) const + { + firstTime = __firstBezierControlPointsTime; + firstValue = __firstBezierControlPointsValue; + secondTime = __secondBezierControlPointsTime; + secondValue = __secondBezierControlPointsValue; + } + + void + SetFormTransitionBezierControlPoints(float firstTime, float firstValue, float secondTime, float secondValue) + { + __firstBezierControlPointsTime = firstTime; + __firstBezierControlPointsValue = firstValue; + __secondBezierControlPointsTime = secondTime; + __secondBezierControlPointsValue = secondValue; + } + + static _FrameAnimatorImpl* GetInstance(FrameAnimator& frameAnimator); + static const _FrameAnimatorImpl* GetInstance(const FrameAnimator& frameAnimator); + +private: + _FrameAnimatorImpl(const _FrameAnimatorImpl& rhs); + _FrameAnimatorImpl& operator =(const _FrameAnimatorImpl& rhs); + + result Dispose(void); + + 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); + + VisualElementPropertyAnimation* GetFrameActiveAnimationAt(int index); + result RemoveAnimationAt(int index); + result RemoveAllAnimations(bool deleteAnimation); + + bool IsFormPresent(Tizen::Ui::Controls::Form& pPrevForm) const; + + result ChangeCurrentForm(Tizen::Ui::Controls::Form* pCurrentForm, Tizen::Ui::Controls::Form& nextForm); + + float CalculateChangedAngle(void); + result SetAnimations(void); + + result PrepareCapture(void); + +private: + /** + * Structure used for storing Frame Active Animations + * + * @since 2.0 + */ + struct FrameActiveAnimation + { + VisualElement* pVisualElement; + FrameAnimatorFormTransitionAnimation formTransitionAnimationType; + VisualElementPropertyAnimation* pPropertyAnimation; + IVisualElementAnimationTimingFunction* pTimingFunction; + Tizen::Base::String animName; + FrameActiveAnimation(void) + { + pVisualElement = null; + formTransitionAnimationType = FRAME_ANIMATOR_FORM_TRANSITION_ANIMATION_MAX; + pPropertyAnimation = null; + pTimingFunction = null; + animName = ""; + } + ~FrameActiveAnimation(void) + { + } + bool operator ==(const FrameActiveAnimation& frameActiveAnim) const; + bool operator !=(const FrameActiveAnimation& frameActiveAnim) const; + }; // FrameActiveAnimation + +private: + /** + * This is the object of Frame. + * + * @since 2.0 + * @remark: This object need not be deleted in FrameAnimator scope + */ + Tizen::Ui::Controls::Frame* __pFrame; + + /** + * This is object of FrameAnimator class. + * + * @since 2.0 + */ + FrameAnimator* __pFrameAnimator; + + /** + * The List maintaining the Frame Active Animations. + * + * @since 2.0 + */ + Tizen::Base::Collection::ArrayListT< FrameActiveAnimation > __frameActiveAnimationList; + + /** + * This Callback is called when an animation is repeated. + * + * @since 2.0 + */ + Tizen::Base::Collection::LinkedListT< IFrameAnimatorEventListener* > __frameAnimStatusEventListener; + + /** + * This is transactionID for the Form Transition animation + * + * @since 2.0 + */ + int __transactionId; + + /** + * The animation status (play / stopped) + * + * @since 2.0 + */ + AnimatorStatus __frameAnimatorStatus; + + /** + * CurrentForm object pointer. + * + * @since 2.0 + */ + Tizen::Ui::Controls::Form* __pCurrentForm; + + /** + * NextForm object pointer. + * + * @since 2.0 + */ + Tizen::Ui::Controls::Form* __pNextForm; + + /** + * The VisualElement of CurrentForm. + * + * @since 2.0 + */ + VisualElement* __pCurrentFormVisualElement; + + /** + * The VisualElement of NextForm. + * + * @since 2.0 + */ + VisualElement* __pNextFormVisualElement; + + /** + * This is the AnimationFormTransitionEffect used in animation. + * + * @since 2.0 + */ + FrameAnimatorFormTransitionAnimation __animationEffectType; + + /** + * This is the AnimationInterpolatorType used in animation. + * + * @since 2.0 + */ + AnimationInterpolatorType __animInterpolatorType; + + /** + * This is the duration of animation. + * + * @since 2.0 + */ + long __duration; + + /** + * This is input time1 of Bezier Control point. + * + * @since 2.0 + */ + float __firstBezierControlPointsTime; + + /** + * This is input value1 of Bezier Control point. + * + * @since 2.0 + */ + float __firstBezierControlPointsValue; + + /** + * This is input time2 of Bezier Control point. + * + * @since 2.0 + */ + float __secondBezierControlPointsTime; + + /** + * This is input value2 of Bezier Control point. + * + * @since 2.0 + */ + float __secondBezierControlPointsValue; + + /** + * This Tizen::Graphics::FloatMatrix4 object to set default transform matrix to current form after animation. + * + * @since 2.0 + */ + Tizen::Graphics::FloatMatrix4 __veDefaultMatrix; + + /** + * This Tizen::Graphics::FloatRectangle object to set default bounds to forms after animation. + * + * @since 2.0 + */ + Tizen::Graphics::FloatRectangle __veDefaultBounds; + + /** + * This float value to set default opacity to forms after animation. + * + * @since 2.0 + */ + float __veDefaultOpacity; + + /** + * Background ControlVisualElement to give a backgroud to Animating forms, so that background forms aren't visible + * in case of alpha animation. + * + * @since 2.0 + */ + _ControlVisualElement* __pBgElement; + VisualElement* __pCurrentCaptureVisualElement; + VisualElement* __pNextCaptureVisualElement; + VisualElementSurface* __pDummySurface; + +}; // _FrameAnimatorImpl + +}}} // Tizen::Ui::Animations + +#endif //_FUI_ANIM_INTERNAL_FRAME_ANIMATOR_IMPL_H_ diff --git a/src/ui/animations/FUiAnim_INativeNode.cpp b/src/ui/animations/FUiAnim_INativeNode.cpp new file mode 100644 index 0000000..d953ab7 --- /dev/null +++ b/src/ui/animations/FUiAnim_INativeNode.cpp @@ -0,0 +1,72 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_INativeNode.cpp + * @brief This file contains implementation of _INativeNode class + * + * This file contains implementation _INativeNode class. + */ + +#include +#include +#include "FUiAnim_INativeNode.h" +#include "FUiAnim_DisplayManager.h" +#include "FUiAnim_EflNode.h" + +namespace Tizen { namespace Ui { namespace Animations +{ + + +_INativeNode::_INativeNode(void) +{ +} + +_INativeNode::~_INativeNode(void) +{ +} + +_INativeNode* +_INativeNode::CreateInstanceN(void) +{ +#if defined(VE_EFL)// EFL version + _EflNode* pNode = new (std::nothrow) _EflNode; +#if 0 + if (pNode) + { + result r = pNode->Construct(); + SysTryCatch(NID_UI, + pNode->Construct() == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Failed to construct the NativeNode(internal module)."); + +CATCH: + delete pNode; + return null; + } +#endif + return pNode; + +// return static_cast< _INativeNode* >(new (std::nothrow) _EflNode); + +#else ////#elif defined(VE_OPENGL) + + return null; + +#endif +} + +}}} + diff --git a/src/ui/animations/FUiAnim_IntegerAnimationImpl.cpp b/src/ui/animations/FUiAnim_IntegerAnimationImpl.cpp new file mode 100644 index 0000000..e818ad6 --- /dev/null +++ b/src/ui/animations/FUiAnim_IntegerAnimationImpl.cpp @@ -0,0 +1,125 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_IntegerAnimationImpl.cpp + * @brief This file contains implementation of _IntegerAnimationImpl class + * + * This file contains implementation _IntegerAnimationImpl class. + */ + +#include +#include +#include + +#include "FUiAnim_VisualElementAnimationVariantInterpolator.h" +#include "FUiAnim_AnimationBaseImpl.h" +#include "FUiAnim_IntegerAnimationImpl.h" + + +using namespace Tizen::Base; +using namespace Tizen::Ui::Animations; +using namespace Tizen::Base::Collection; + + +namespace Tizen { namespace Ui { namespace Animations +{ + +_IntegerAnimationImpl::~_IntegerAnimationImpl(void) +{ +} + +_IntegerAnimationImpl::_IntegerAnimationImpl(IntegerAnimation* pInt) + : startValue(Integer(0)) + , endValue(Integer(0)) + , __pIntegerAnimation(pInt) +{ +} + +result +_IntegerAnimationImpl::CopyIntegerAnimationValue(const IntegerAnimation& integerAnimation) +{ + result r = E_SUCCESS; + + _AnimationBaseImpl* pAnimationBaseImpl = __pIntegerAnimation->_pAnimationBaseImpl; + + // Deleting the contents of existing keyframe + r = pAnimationBaseImpl->RemoveAllKeyFrames(); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), r, "Propagating."); + + // Copying the contents + startValue = integerAnimation._pIntegerAnimationImpl->startValue; + endValue = integerAnimation._pIntegerAnimationImpl->endValue; + + if (integerAnimation._pAnimationBaseImpl->keyFrameList.GetCount() == 0) + { + return E_SUCCESS; + } + + IMapEnumeratorT< long, Object* >* pMapEnum = null; + MapEntryT< long, Object* > value; + Integer* pIntegerObj = null; + + pMapEnum = integerAnimation._pAnimationBaseImpl->keyFrameList.GetMapEnumeratorN(); + r = GetLastResult(); + SysTryReturnResult(NID_UI_ANIM, (pMapEnum), r, "Failed to get enumerator."); + + while (pMapEnum->MoveNext() == E_SUCCESS) + { + r = pMapEnum->GetCurrent(value); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + Integer* pIntValue = dynamic_cast< Integer* >(value.GetValue()); + SysTryCatch(NID_UI_ANIM, (pIntValue), r = E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. KeyFrame value is invalid."); + + pIntegerObj = new (std::nothrow) Integer(*pIntValue); + SysTryCatch(NID_UI_ANIM, (pIntegerObj), r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = pAnimationBaseImpl->keyFrameList.Add(value.GetKey(), pIntegerObj); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + delete pMapEnum; + + return E_SUCCESS; + +CATCH: + delete pIntegerObj; + delete pMapEnum; + + return r; +} + +result +_IntegerAnimationImpl::GetAnimatedValue(float actualProgress, int& animatedValue) const +{ + Variant startIntValue(startValue.ToInt()); + Variant endIntValue(endValue.ToInt()); + Variant value(0); + + _VisualElementAnimationVariantInterpolator variantInterpolator; + result r = variantInterpolator.Interpolate(actualProgress, startIntValue, endIntValue, value); + + animatedValue = value.ToInt(); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to get the animated value."); + + return r; +} + + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnim_IntegerAnimationImpl.h b/src/ui/animations/FUiAnim_IntegerAnimationImpl.h new file mode 100644 index 0000000..fdf9afd --- /dev/null +++ b/src/ui/animations/FUiAnim_IntegerAnimationImpl.h @@ -0,0 +1,56 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_IntegerAnimationImpl.h + * @brief This is the header file for the _IntegerAnimationImpl class. + * + * This header file contains the declarations of the _IntegerAnimationImpl class. + */ + +#ifndef _FUI_ANIM_INTERNAL_INTEGER_ANIMATION_IMPL_H_ +#define _FUI_ANIM_INTERNAL_INTEGER_ANIMATION_IMPL_H_ + +#include + + +namespace Tizen { namespace Ui { namespace Animations +{ + +class _IntegerAnimationImpl + : public Tizen::Base::Object +{ +public: + _IntegerAnimationImpl(IntegerAnimation* pInt); + ~_IntegerAnimationImpl(void); + + result CopyIntegerAnimationValue(const IntegerAnimation& integerAnimation); + + result GetAnimatedValue(float actualProgress, int& animatedValue) const; + + Tizen::Base::Integer startValue; + Tizen::Base::Integer endValue; + +private: + _IntegerAnimationImpl(const _IntegerAnimationImpl& rhs); + _IntegerAnimationImpl& operator =(const _IntegerAnimationImpl& rhs); + IntegerAnimation* __pIntegerAnimation; +}; //_IntegerAnimationImpl + +}}} // Tizen::Ui::Animations + +#endif //_FUI_ANIM_INTERNAL_INTEGER_ANIMATION_IMPL_H_ diff --git a/src/ui/animations/FUiAnim_MatrixUtil.cpp b/src/ui/animations/FUiAnim_MatrixUtil.cpp new file mode 100644 index 0000000..5435a8f --- /dev/null +++ b/src/ui/animations/FUiAnim_MatrixUtil.cpp @@ -0,0 +1,337 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_MatrixUtil.cpp + * @brief This file contains implementation of _MatrixUtil module + * + * This file contains implementation _MatrixUtil module. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "FUi_Math.h" +#include "FUiAnim_MatrixUtil.h" + + +using namespace Tizen; +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Animations +{ + +static const float _IDENTITY_MATRIX[4][4] = +{ + { 1.0f, 0.0f, 0.0f, 0.0f }, + { 0.0f, 1.0f, 0.0f, 0.0f }, + { 0.0f, 0.0f, 1.0f, 0.0f }, + { 0.0f, 0.0f, 0.0f, 1.0f } +}; + + +Matrix4Type +_GetMatrix4Type(const Tizen::Graphics::FloatMatrix4& floatMatrix) +{ + if (floatMatrix.matrix[3][3] != 1.0f) + { + return MATRIX4_Generic; + } + + if (floatMatrix.matrix[1][0] != 0.0f || floatMatrix.matrix[2][0] != 0.0f || floatMatrix.matrix[2][1] != 0.0f) + { + return MATRIX4_Generic; + } + + if (floatMatrix.matrix[0][1] != 0.0f || floatMatrix.matrix[0][2] != 0.0f || floatMatrix.matrix[0][3] != 0.0f || + floatMatrix.matrix[1][2] != 0.0f || floatMatrix.matrix[1][3] != 0.0f || floatMatrix.matrix[2][3] != 0.0f) + { + return MATRIX4_Generic; + } + + bool isTranslate = (floatMatrix.matrix[3][0] != 0.0f || floatMatrix.matrix[3][1] != 0.0f || floatMatrix.matrix[3][2] != 0.0f); + bool isDiagonal = (floatMatrix.matrix[0][0] == 1.0f && floatMatrix.matrix[1][1] == 1.0f && floatMatrix.matrix[2][2] == 1.0f); + + if (isTranslate && isDiagonal) + { + return MATRIX4_Translation; + } + + if (isTranslate) + { + return MATRIX4_Generic; + } + + if (isDiagonal) + { + return MATRIX4_Identity; + } + + return MATRIX4_Scale; +} + +bool +_MatrixUtilIsEqual(const Tizen::Graphics::FloatMatrix4& m1, const Tizen::Graphics::FloatMatrix4& m2) +{ + return (memcmp(m1.matrix, m2.matrix, sizeof(m1.matrix)) == 0); +} + +void +_MatrixUtilSetIdentity(Tizen::Graphics::FloatMatrix4& m) +{ + memcpy(m.matrix, _IDENTITY_MATRIX, sizeof(_IDENTITY_MATRIX)); +} + +void +_MatrixUtilSetTranslation(Tizen::Graphics::FloatMatrix4& m, float tx, float ty, float tz) +{ + memcpy(m.matrix, _IDENTITY_MATRIX, sizeof(_IDENTITY_MATRIX)); + m.matrix[3][0] = tx; + m.matrix[3][1] = ty; + m.matrix[3][2] = tz; + m.matrix[3][3] = 1.0f; +} + +void +_MatrixUtilTransform(const Tizen::Graphics::FloatMatrix4& m, float* pX, float* pY, float* pZ) +{ + FloatVector4 vec4(*pX, *pY, *pZ, 1.0f); + vec4 = m * vec4; + *pX = vec4.x; + *pY = vec4.y; + *pZ = vec4.z; + + if (vec4.w != 1.0f && vec4.w != 0.0f) + { + *pX /= vec4.w; + *pY /= vec4.w; + *pZ /= vec4.w; + } +} + +void +_MatrixUtilTranslate(Tizen::Graphics::FloatMatrix4& m, float tx, float ty, float tz) +{ + m.matrix[3][0] += (m.matrix[0][0] * tx + m.matrix[1][0] * ty + m.matrix[2][0] * tz); + m.matrix[3][1] += (m.matrix[0][1] * tx + m.matrix[1][1] * ty + m.matrix[2][1] * tz); + m.matrix[3][2] += (m.matrix[0][2] * tx + m.matrix[1][2] * ty + m.matrix[2][2] * tz); + m.matrix[3][3] += (m.matrix[0][3] * tx + m.matrix[1][3] * ty + m.matrix[2][3] * tz); +} + +bool +_MatrixUtilIsTranslation(const Tizen::Graphics::FloatMatrix4& m) +{ + if(_GetMatrix4Type(m) == MATRIX4_Translation) + { + return true; + } + else + { + return false; + } +} + +void +_MatrixUtilScale(Tizen::Graphics::FloatMatrix4& m, float sx, float sy, float sz) +{ + if (sx != 1.0f) + { + m.matrix[0][0] *= sx; + m.matrix[0][1] *= sx; + m.matrix[0][2] *= sx; + m.matrix[0][3] *= sx; + } + + if (sy != 1.0f) + { + m.matrix[1][0] *= sy; + m.matrix[1][1] *= sy; + m.matrix[1][2] *= sy; + m.matrix[1][3] *= sy; + } + + if (sz != 1.0f) + { + m.matrix[2][0] *= sz; + m.matrix[2][1] *= sz; + m.matrix[2][2] *= sz; + m.matrix[2][3] *= sz; + } +} + +void +_MatrixUtilAtAnchor(Tizen::Graphics::FloatMatrix4& m, float x, float y, float z) +{ + Tizen::Graphics::FloatMatrix4 tr; + Tizen::Graphics::FloatMatrix4 trInv; + + tr.matrix[3][0] = x; + tr.matrix[3][1] = y; + tr.matrix[3][2] = z; + + trInv.matrix[3][0] = -x; + trInv.matrix[3][1] = -y; + trInv.matrix[3][2] = -z; + + m = tr * m * trInv; +} + +void +_MatrixUtilRotate(Tizen::Graphics::FloatMatrix4& m, float angle, float x, float y, float z) +{ + if (angle == 0.0f) + { + return; + } + + // Rotation using quaternion + angle = angle * M_PI / 180.0f; + + angle /= 2.0f; + float sinA = sinf(angle); + float cosA = cosf(angle); + float sinA2 = sinA * sinA; + + // normalize + float length = sqrtf(x * x + y * y + z * z); + if (length == 0.0f) + { + // bad vector, just use something reasonable + return; + } + else if (length != 1.0f) + { + x /= length; + y /= length; + z /= length; + } + + + float mat[4][4] = { {0.0f, }, }; + + // optimize case where axis is along major axis + if (x == 1.0f && y == 0.0f && z == 0.0f) + { + mat[0][0] = 1.0f; + mat[0][1] = 0.0f; + mat[0][2] = 0.0f; + mat[1][0] = 0.0f; + mat[1][1] = 1.0f - 2.0f * sinA2; + mat[1][2] = 2.0f * sinA * cosA; + mat[2][0] = 0.0f; + mat[2][1] = -2.0f * sinA * cosA; + mat[2][2] = 1.0f - 2.0f * sinA2; + mat[0][3] = mat[1][3] = mat[2][3] = 0.0f; + mat[3][0] = mat[3][1] = mat[3][2] = 0.0f; + mat[3][3] = 1.0f; + } + else if (x == 0.0f && y == 1.0f && z == 0.0f) + { + mat[0][0] = 1.0f - 2.0f * sinA2; + mat[0][1] = 0.0f; + mat[0][2] = -2.0f * sinA * cosA; + mat[1][0] = 0.0f; + mat[1][1] = 1.0f; + mat[1][2] = 0.0f; + mat[2][0] = 2.0f * sinA * cosA; + mat[2][1] = 0.0f; + mat[2][2] = 1.0f - 2.0f * sinA2; + mat[0][3] = mat[1][3] = mat[2][3] = 0.0f; + mat[3][0] = mat[3][1] = mat[3][2] = 0.0f; + mat[3][3] = 1.0f; + } + else if (x == 0.0f && y == 0.0f && z == 1.0f) + { + mat[0][0] = 1.0f - 2.0f * sinA2; + mat[0][1] = 2.0f * sinA * cosA; + mat[0][2] = 0.0f; + mat[1][0] = -2.0f * sinA * cosA; + mat[1][1] = 1.0f - 2.0f * sinA2; + mat[1][2] = 0.0f; + mat[2][0] = 0.0f; + mat[2][1] = 0.0f; + mat[2][2] = 1.0f; + mat[0][3] = mat[1][3] = mat[2][3] = 0.0f; + mat[3][0] = mat[3][1] = mat[3][2] = 0.0f; + mat[3][3] = 1.0f; + } + else + { + float x2 = x * x; + float y2 = y * y; + float z2 = z * z; + + mat[0][0] = 1.0f - 2.0f * (y2 + z2) * sinA2; + mat[0][1] = 2.0f * (x * y * sinA2 + z * sinA * cosA); + mat[0][2] = 2.0f * (x * z * sinA2 - y * sinA * cosA); + mat[1][0] = 2.0f * (y * x * sinA2 - z * sinA * cosA); + mat[1][1] = 1.0f - 2.0f * (z2 + x2) * sinA2; + mat[1][2] = 2.0f * (y * z * sinA2 + x * sinA * cosA); + mat[2][0] = 2.0f * (z * x * sinA2 + y * sinA * cosA); + mat[2][1] = 2.0f * (z * y * sinA2 - x * sinA * cosA); + mat[2][2] = 1.0f - 2.0f * (x2 + y2) * sinA2; + mat[0][3] = mat[1][3] = mat[2][3] = 0.0f; + mat[3][0] = mat[3][1] = mat[3][2] = 0.0f; + mat[3][3] = 1.0f; + } + + m *= Tizen::Graphics::FloatMatrix4(mat); +} + +bool +_MatrixUtilInvert(Tizen::Graphics::FloatMatrix4& 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; + } + else if(matrixType == MATRIX4_Identity) + { + return true; + } + + if(m.Invert() == E_SUCCESS) + { + return true; + } + else + { + return false; + } +} + +void +_MatrixUtilMultiply(Tizen::Graphics::FloatMatrix4& d, const Tizen::Graphics::FloatMatrix4& m1, const Tizen::Graphics::FloatMatrix4& m2) +{ + d = m1 * m2; +} + +}}} diff --git a/src/ui/animations/FUiAnim_MatrixUtil.h b/src/ui/animations/FUiAnim_MatrixUtil.h new file mode 100644 index 0000000..9f9b43d --- /dev/null +++ b/src/ui/animations/FUiAnim_MatrixUtil.h @@ -0,0 +1,144 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_MatrixUtil.h + * @brief Header file of _MatrixUtil module + * + * This file contains declarations _MatrixUtil module. + */ + +#ifndef _FUI_ANIM_INTERNAL_MATRIX_UTIL_H_ +#define _FUI_ANIM_INTERNAL_MATRIX_UTIL_H_ + +#include +#include +#include +#include "FUi_Math.h" +#include "FUiAnim_TransformMatrix3Df.h" + + +namespace Tizen { namespace Ui { namespace Animations +{ + +inline bool +RectUtilIsEqual(const Tizen::Graphics::FloatRectangle& r1, const Tizen::Graphics::FloatRectangle& r2) +{ + return (memcmp(&r1.x, &r2.x, sizeof(r1.x) * 4) == 0); +} + +inline void +RectUtilCopy(Tizen::Graphics::FloatRectangle& d, const Tizen::Graphics::FloatRectangle& s) +{ + memcpy(&d.x, &s.x, sizeof(d.x) * 4); +} + +inline void +RectUtilMakeIntegral(Tizen::Graphics::FloatRectangle& rectangle) +{ + if (unlikely(rectangle.IsEmpty())) + return; + + rectangle.width = ceilf(rectangle.x + rectangle.width); + rectangle.height = ceilf(rectangle.y + rectangle.height); + + rectangle.x = floorf(rectangle.x); + rectangle.y = floorf(rectangle.y); + + rectangle.width -= rectangle.x; + rectangle.height -= rectangle.y; +} + +inline void +RectUtilIntersect(Tizen::Graphics::FloatRectangle& rectangle, const Tizen::Graphics::FloatRectangle& mask) +{ + if (unlikely(rectangle.IsEmpty()) || unlikely(mask.IsEmpty())) + return; + + if (unlikely(rectangle.x >= mask.x + mask.width)) + return; + + if (unlikely(rectangle.y >= mask.y + mask.height)) + return; + + if (unlikely(rectangle.x + rectangle.width <= mask.x)) + return; + + if (unlikely(rectangle.y + rectangle.height <= mask.y)) + return; + + + // intersected + + rectangle.x = _Max(rectangle.x, mask.x); + rectangle.y = _Max(rectangle.y, mask.y); + rectangle.width = _Min(rectangle.x + rectangle.width, mask.x + mask.width) - rectangle.x; + rectangle.height = _Min(rectangle.y + rectangle.height, mask.y + mask.height) - rectangle.y; +} + +inline void +RectUtilUnion(Tizen::Graphics::FloatRectangle& rectangle, const Tizen::Graphics::FloatRectangle& source) +{ + if (rectangle.IsEmpty()) + { + if (source.IsEmpty()) + return; + + rectangle = source; + return; + } + else + { + if (source.IsEmpty()) + return; + } + + + // intersected + float x = _Min(rectangle.x, source.x); + float y = _Min(rectangle.y, source.y); + float width = _Max(rectangle.x + rectangle.width, source.x + source.width) - x; + float height = _Max(rectangle.y + rectangle.height, source.y + source.height) - y; + + rectangle.SetBounds(x, y, width, height); +} + + +inline void +MatrixUtilCopy(Tizen::Graphics::FloatMatrix4& d, const Tizen::Graphics::FloatMatrix4& s) +{ + memcpy(d.matrix, s.matrix, sizeof(d.matrix)); +} + +Matrix4Type _GetMatrix4Type(const Tizen::Graphics::FloatMatrix4& floatMatrix); +void _MatrixUtilSetIdentity(Tizen::Graphics::FloatMatrix4& m); +bool _MatrixUtilIsEqual(const Tizen::Graphics::FloatMatrix4& m1, const Tizen::Graphics::FloatMatrix4& m2); +void _MatrixUtilSetTranslation(Tizen::Graphics::FloatMatrix4& m, float tx, float ty, float tz); +void _MatrixUtilTransform(const Tizen::Graphics::FloatMatrix4& m, float* pX, float* pY, float* pZ); +void _MatrixUtilTranslate(Tizen::Graphics::FloatMatrix4& m, float tx, float ty, float tz); +bool _MatrixUtilIsTranslation(const Tizen::Graphics::FloatMatrix4& m); +void _MatrixUtilScale(Tizen::Graphics::FloatMatrix4& m, float sx, float sy, float sz); +void _MatrixUtilAtAnchor(Tizen::Graphics::FloatMatrix4& m, float x, float y, float z); +void _MatrixUtilRotate(Tizen::Graphics::FloatMatrix4& m, float angle, float x, float y, float z); +bool _MatrixUtilInvert(Tizen::Graphics::FloatMatrix4& m); +void _MatrixUtilMultiply(Tizen::Graphics::FloatMatrix4& d, const Tizen::Graphics::FloatMatrix4& m1, const Tizen::Graphics::FloatMatrix4& m2); + + +}}} // Tizen::Ui::Animations + +#endif //_FUI_ANIM_INTERNAL_MATRIX_UTIL_H_ + diff --git a/src/ui/animations/FUiAnim_NativeLayer.cpp b/src/ui/animations/FUiAnim_NativeLayer.cpp new file mode 100644 index 0000000..881b253 --- /dev/null +++ b/src/ui/animations/FUiAnim_NativeLayer.cpp @@ -0,0 +1,128 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_NativeLayer.cpp + * @brief This file contains implementation of _NativeLayer class + * + * This file contains implementation _NativeLayer class. + */ + +#include +#include + +#include "FUiAnim_RootVisualElement.h" +#include "FUiAnim_NativeLayer.h" +#include "FUiAnim_DisplayManager.h" +#include "FUiAnim_EflLayer.h" + +namespace Tizen { namespace Ui { namespace Animations +{ + +_NativeLayer::_NativeLayer(void) + : _pRootVisualElement(null) +{ + +} +_NativeLayer::~_NativeLayer(void) +{ + if(_pRootVisualElement) + { + _DisplayManager* pDisplayManager = _DisplayManager::GetInstance(); + if(pDisplayManager) + { + pDisplayManager->UnregisterRoot(*_pRootVisualElement); + } + _pRootVisualElement->SetNativeLayer(null); + _pRootVisualElement->Destroy(); + _pRootVisualElement = null; + } +} + +_NativeLayer* +_NativeLayer::CreateInstanceN(bool isMainType) +{ +#if defined(VE_EFL) + _EflLayer* pLayer = new (std::nothrow) _EflLayer(isMainType); + + if (pLayer) + { + pLayer->Construct(); + } + return pLayer; + +#else ////#elif defined(VE_OPENGL) + + return null; + +#endif +} + +_NativeLayer* +_NativeLayer::CreateInstanceN(void) +{ +#if defined(VE_EFL) + _EflLayer* pLayer = new (std::nothrow) _EflLayer; + + if (pLayer) + { + pLayer->Construct(); + } + return pLayer; + +#else ////#elif defined(VE_OPENGL) + + return null; + +#endif + +} + +result +_NativeLayer::Construct(void) +{ + SysAssertf(_pRootVisualElement == null, "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class."); + + _pRootVisualElement = new _RootVisualElement(); + result r = _pRootVisualElement->Construct(); + SysTryReturnResult(NID_UI_ANIM, r == E_SUCCESS, r, "Propagating."); + _pRootVisualElement->SetShowState(true); + + _DisplayManager* pDisplayManager = _DisplayManager::GetInstance(); + if(pDisplayManager) + { + pDisplayManager->RegisterRoot(*_pRootVisualElement); + } + + r = OnConstructed(); + SysTryReturnResult(NID_UI_ANIM, r == E_SUCCESS, r, "Constructing failed."); + + _pRootVisualElement->SetNativeLayer(this); + + r = Configure(*_pRootVisualElement); + SysTryReturnResult(NID_UI_ANIM, r == E_SUCCESS, r, "Configuring failed."); + + return E_SUCCESS; +} + +_RootVisualElement* +_NativeLayer::GetRootVisualElement(void) const +{ + return _pRootVisualElement; +} + +}}} diff --git a/src/ui/animations/FUiAnim_PointAnimationImpl.cpp b/src/ui/animations/FUiAnim_PointAnimationImpl.cpp new file mode 100644 index 0000000..8f4539b --- /dev/null +++ b/src/ui/animations/FUiAnim_PointAnimationImpl.cpp @@ -0,0 +1,127 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_PointAnimationImpl.cpp + * @brief This file contains implementation of _PointAnimationImpl class + * + * This file contains implementation _PointAnimationImpl class. + */ + +#include +#include + +#include +#include +#include +#include + +#include "FUiAnim_AnimationBaseImpl.h" +#include "FUiAnim_PointAnimationImpl.h" +#include "FUiAnim_VisualElementAnimationVariantInterpolator.h" + + +using namespace Tizen::Base; +using namespace Tizen::Ui::Animations; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; + + +namespace Tizen { namespace Ui { namespace Animations +{ + +_PointAnimationImpl::~_PointAnimationImpl(void) +{ +} + +_PointAnimationImpl::_PointAnimationImpl(PointAnimation* pPoint) + : startValue(Point(0, 0)) + , endValue(Point(0, 0)) + , __pPointAnimation(pPoint) +{ +} + +result +_PointAnimationImpl::CopyPointAnimationValue(const PointAnimation& pointAnimation) +{ + result r = E_SUCCESS; + + _AnimationBaseImpl* pAnimationBaseImpl = __pPointAnimation->_pAnimationBaseImpl; + + // Deleting the contents of existing keyframe + r = pAnimationBaseImpl->RemoveAllKeyFrames(); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), r, "Propagating."); + + // Copying the contents + startValue = pointAnimation._pPointAnimationImpl->startValue; + endValue = pointAnimation._pPointAnimationImpl->endValue; + + if (pointAnimation._pAnimationBaseImpl->keyFrameList.GetCount() == 0) + { + return E_SUCCESS; + } + + IMapEnumeratorT< long, Object* >* pMapEnum = null; + MapEntryT< long, Object* > value; + Point* pPointObj = null; + + pMapEnum = pointAnimation._pAnimationBaseImpl->keyFrameList.GetMapEnumeratorN(); + r = GetLastResult(); + SysTryReturnResult(NID_UI_ANIM, (pMapEnum), r, "Failed to get enumerator."); + + while (pMapEnum->MoveNext() == E_SUCCESS) + { + r = pMapEnum->GetCurrent(value); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + Point* pPointValue = dynamic_cast< Point* >(value.GetValue()); + SysTryCatch(NID_UI_ANIM, (pPointValue), r = E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. KeyFrame value is invalid."); + + pPointObj = new (std::nothrow) Point(*pPointValue); + SysTryCatch(NID_UI_ANIM, (pPointObj), r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = pAnimationBaseImpl->keyFrameList.Add(value.GetKey(), pPointObj); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + delete pMapEnum; + + return E_SUCCESS; + +CATCH: + delete pPointObj; + delete pMapEnum; + + return r; +} + +result +_PointAnimationImpl::GetAnimatedValue(float actualProgress, Tizen::Graphics::Point& animatedValue) const +{ + Variant startPoint(startValue); + Variant endPoint(endValue); + Variant value(Point(0,0)); + + _VisualElementAnimationVariantInterpolator variantInterpolator; + result r = variantInterpolator.Interpolate(actualProgress, startPoint, endPoint, value); + + animatedValue = value.ToPoint(); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, "A system error has been occurred. Failed to get the animated value."); + return r; +} + +}}} //Tizen::Ui::Animations diff --git a/src/ui/animations/FUiAnim_PointAnimationImpl.h b/src/ui/animations/FUiAnim_PointAnimationImpl.h new file mode 100644 index 0000000..4a5bb80 --- /dev/null +++ b/src/ui/animations/FUiAnim_PointAnimationImpl.h @@ -0,0 +1,57 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_PointAnimationImpl.h + * @brief This is the header file for the _PointAnimationImpl class. + * + * This header file contains the declarations of the _PointAnimationImpl class. + */ + +#ifndef _FUI_ANIM_INTERNAL_POINT_ANIMATION_IMPL_H_ +#define _FUI_ANIM_INTERNAL_POINT_ANIMATION_IMPL_H_ + +#include + + +namespace Tizen { namespace Ui { namespace Animations +{ + +class _PointAnimationImpl + : public Tizen::Base::Object +{ + +public: + _PointAnimationImpl(PointAnimation* pPoint); + ~_PointAnimationImpl(void); + + result CopyPointAnimationValue(const PointAnimation& pointAnimation); + + result GetAnimatedValue(float actualProgress, Tizen::Graphics::Point& animatedValue) const; + + Tizen::Graphics::Point startValue; + Tizen::Graphics::Point endValue; + +private: + _PointAnimationImpl(const _PointAnimationImpl& rhs); + _PointAnimationImpl& operator =(const _PointAnimationImpl& rhs); + PointAnimation* __pPointAnimation; +}; // _PointAnimationImpl + +}}} // Tizen::Ui::Animations + +#endif //_FUI_ANIM_INTERNAL_POINT_ANIMATION_IMPL_H_ diff --git a/src/ui/animations/FUiAnim_RectangleAnimationImpl.cpp b/src/ui/animations/FUiAnim_RectangleAnimationImpl.cpp new file mode 100644 index 0000000..10b2a13 --- /dev/null +++ b/src/ui/animations/FUiAnim_RectangleAnimationImpl.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 FUiAnim_RectangleAnimationImpl.cpp + * @brief This file contains implementation of _RectangleAnimationImpl class + * + * This file contains implementation _RectanngleAnimationImpl class. + */ + +#include +#include + +#include + +#include "FUiAnim_VisualElementAnimationVariantInterpolator.h" +#include "FUiAnim_AnimationBaseImpl.h" +#include "FUiAnim_RectangleAnimationImpl.h" + + +using namespace Tizen::Base; +using namespace Tizen::Ui::Animations; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; + + +namespace Tizen { namespace Ui { namespace Animations +{ + +_RectangleAnimationImpl::~_RectangleAnimationImpl(void) +{ + +} + +_RectangleAnimationImpl::_RectangleAnimationImpl(RectangleAnimation* pRectangle) + : anchorX(0.0) + , anchorY(0.0) + , startValue(Rectangle(0, 0, 0, 0)) + , endValue(Rectangle(0, 0, 0, 0)) + , __pRectangleAnimation(pRectangle) +{ + +} + +result +_RectangleAnimationImpl::CopyRectangleAnimationValue(const RectangleAnimation& rectangleAnimation) +{ + result r = E_SUCCESS; + + _AnimationBaseImpl* pAnimationBaseImpl = __pRectangleAnimation->_pAnimationBaseImpl; + + // Deleting the contents of existing keyframe + r = pAnimationBaseImpl->RemoveAllKeyFrames(); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), r, "Propagating."); + + // Copying the contents + startValue = rectangleAnimation._pRectangleAnimationImpl->startValue; + endValue = rectangleAnimation._pRectangleAnimationImpl->endValue; + + if (rectangleAnimation._pAnimationBaseImpl->keyFrameList.GetCount() == 0) + { + return E_SUCCESS; + } + + IMapEnumeratorT< long, Object* >* pMapEnum = null; + MapEntryT< long, Object* > value; + Rectangle* pRectObj = null; + + pMapEnum = rectangleAnimation._pAnimationBaseImpl->keyFrameList.GetMapEnumeratorN(); + r = GetLastResult(); + SysTryReturnResult(NID_UI_ANIM, (pMapEnum), r, "Failed to get enumerator."); + + + while (pMapEnum->MoveNext() == E_SUCCESS) + { + r = pMapEnum->GetCurrent(value); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + Rectangle* pRectValue = dynamic_cast< Rectangle* >(value.GetValue()); + SysTryCatch(NID_UI_ANIM, (pRectValue), r = E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. KeyFrame value is invalid."); + + pRectObj = new (std::nothrow) Rectangle(*pRectValue); + SysTryCatch(NID_UI_ANIM, (pRectObj), r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = pAnimationBaseImpl->keyFrameList.Add(value.GetKey(), pRectObj); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + delete pMapEnum; + + return E_SUCCESS; + +CATCH: + delete pRectObj; + delete pMapEnum; + + return r; +} + +result +_RectangleAnimationImpl::GetAnimatedValue(float actualProgress, Tizen::Graphics::Rectangle& animatedValue) const +{ + Variant startRect(startValue); + Variant endRect(endValue); + Variant value(Rectangle(0, 0, 0, 0)); + + _VisualElementAnimationVariantInterpolator variantInterpolator; + result r = variantInterpolator.Interpolate(actualProgress, startRect, endRect, value); + + animatedValue = value.ToRectangle(); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), E_SYSTEM, " A system error has been occurred. Failed to get the animated value."); + + return r; +} + + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnim_RectangleAnimationImpl.h b/src/ui/animations/FUiAnim_RectangleAnimationImpl.h new file mode 100644 index 0000000..9a6f7d4 --- /dev/null +++ b/src/ui/animations/FUiAnim_RectangleAnimationImpl.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 FUiAnim_RectangleAnimationImpl.h + * @brief This is the header file for the _RectangleAnimationImpl class. + * + * This header file contains the declarations of the _RectangleAnimationImpl class. + */ + +#ifndef _FUI_ANIM_INTERNAL_RECTANGLE_ANIMATION_IMPL_H_ +#define _FUI_ANIM_INTERNAL_RECTANGLE_ANIMATION_IMPL_H_ + +#include + + +namespace Tizen { namespace Ui { namespace Animations +{ + +class _RectangleAnimationImpl + : public Tizen::Base::Object +{ + +public: + _RectangleAnimationImpl(RectangleAnimation* pRectangle); + ~_RectangleAnimationImpl(void); + + result CopyRectangleAnimationValue(const RectangleAnimation& rectangleAnimation); + + result GetAnimatedValue(float actualProgress, Tizen::Graphics::Rectangle& animatedValue) const; + + float anchorX; + float anchorY; + + Tizen::Graphics::Rectangle startValue; + Tizen::Graphics::Rectangle endValue; + +private: + _RectangleAnimationImpl(const _RectangleAnimationImpl& rhs); + _RectangleAnimationImpl& operator =(const _RectangleAnimationImpl& rhs); + RectangleAnimation* __pRectangleAnimation; +}; // _RectangleAnimationImpl + +}}} // Tizen::Ui::Animations + +#endif //_FUI_ANIM_INTERNAL_RECTANGLE_ANIMATION_IMPL_H_ diff --git a/src/ui/animations/FUiAnim_RootVisualElement.cpp b/src/ui/animations/FUiAnim_RootVisualElement.cpp new file mode 100644 index 0000000..b347142 --- /dev/null +++ b/src/ui/animations/FUiAnim_RootVisualElement.cpp @@ -0,0 +1,97 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_RootVisualElement.cpp + * @brief This is the implementation file for the _RootVisualElement class. + * + * This file contains implementation _RootVisualElement class. + */ + +#include +#include +#include "FUiAnim_DisplayManager.h" +#include "FUiAnim_RootVisualElement.h" +#include "FUiAnim_NativeLayer.h" +#include "FUiAnim_VisualElementImpl.h" + +namespace Tizen { namespace Ui { namespace Animations +{ + +// Root Element implementation +_RootVisualElement::_RootVisualElement(void) + : __needsUpdateFromRoot(false) + , __isModel(true) + , __pLayer(null) +{ + _pVisualElementImpl->__isRoot = true; + _pVisualElementImpl->__isInternal = true; + _pVisualElementImpl->__isImplicitAnimationEnabled = false; +} + +_RootVisualElement::_RootVisualElement(const _RootVisualElement& rhs) + : _VisualElement(rhs) + , __needsUpdateFromRoot(false) + , __isModel(false) + , __pLayer(rhs.__pLayer) +{ + +} + +_RootVisualElement::~_RootVisualElement(void) +{ + + if(__pLayer) + { + SysLogException(NID_UI_ANIM, E_INVALID_STATE,"[E_INVALID_STATE] The RootVisualElement instance has been destroyed, but the layer information was not cleaned."); +// __pLayer->_pRootVisualElement = NULL; + } + __pLayer = NULL; +} + + +VisualElement* +_RootVisualElement::CloneN(void) const +{ + return new (std::nothrow) _RootVisualElement(*this); +} + +result +_RootVisualElement::SetNativeLayer(_NativeLayer* pLayer) +{ + if (__pLayer == pLayer) + { + return E_SUCCESS; + } + + SysTryReturnResult(NID_UI_ANIM, !__pLayer || (__pLayer && pLayer == null), E_INVALID_STATE, "The layer is already assigned to another RootVisualElement instance."); + __pLayer = pLayer; + + _RootVisualElement* pPresentation = null; + if (_pVisualElementImpl && _pVisualElementImpl->__pPresentation) + { + pPresentation = dynamic_cast<_RootVisualElement*>(_pVisualElementImpl->__pPresentation->__pPublicInstance); + } + SysTryReturnResult(NID_UI_ANIM, pPresentation, E_INVALID_STATE, "The presentation instance is not available."); + + pPresentation->__pLayer = pLayer; + + return E_SUCCESS; +} + +}}} //namespace Tizen { namespace Ui { namespace Animations { + diff --git a/src/ui/animations/FUiAnim_RotateAnimationImpl.cpp b/src/ui/animations/FUiAnim_RotateAnimationImpl.cpp new file mode 100644 index 0000000..005614f --- /dev/null +++ b/src/ui/animations/FUiAnim_RotateAnimationImpl.cpp @@ -0,0 +1,46 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_RotateAnimationImpl.cpp + * @brief This file contains implementation of _RotateAnimationImpl class + * + * This file contains implementation _RotateAnimationImpl class. + */ + + +#include "FUiAnim_RotateAnimationImpl.h" + + +using namespace Tizen::Ui::Animations; + + +namespace Tizen { namespace Ui { namespace Animations +{ + +_RotateAnimationImpl::~_RotateAnimationImpl(void) +{ +} + +_RotateAnimationImpl::_RotateAnimationImpl(RotateAnimation* pRotate) + : anchorX(0.5f) + , anchorY(0.5f) + , __pRotateAnimation(pRotate) +{ +} + +}}} //Tizen::Ui::Animations diff --git a/src/ui/animations/FUiAnim_RotateAnimationImpl.h b/src/ui/animations/FUiAnim_RotateAnimationImpl.h new file mode 100644 index 0000000..48d832e --- /dev/null +++ b/src/ui/animations/FUiAnim_RotateAnimationImpl.h @@ -0,0 +1,53 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_RotateAnimationImpl.h + * @brief This is the header file for the _RotateAnimationImpl class. + * + * This header file contains the declarations of the _RotateAnimationImpl class. + */ + +#ifndef _FUI_ANIM_INTERNAL_ROTATE_ANIMATION_IMPL_H_ +#define _FUI_ANIM_INTERNAL_ROTATE_ANIMATION_IMPL_H_ + +#include + + +namespace Tizen { namespace Ui { namespace Animations +{ + +class _RotateAnimationImpl + : public Tizen::Base::Object +{ + +public: + _RotateAnimationImpl(RotateAnimation* pRotate); + ~_RotateAnimationImpl(void); + + float anchorX; + float anchorY; + +private: + _RotateAnimationImpl(const _RotateAnimationImpl& rhs); + _RotateAnimationImpl& operator =(const _RotateAnimationImpl& rhs); + Tizen::Ui::Animations::RotateAnimation* __pRotateAnimation; +}; // _RotateAnimationImpl + +}}} // Tizen::Ui::Animations + +#endif //_FUI_ANIM_INTERNAL_ROTATE_ANIMATION_IMPL_H_ diff --git a/src/ui/animations/FUiAnim_TimingFunction.h b/src/ui/animations/FUiAnim_TimingFunction.h new file mode 100644 index 0000000..e367984 --- /dev/null +++ b/src/ui/animations/FUiAnim_TimingFunction.h @@ -0,0 +1,40 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_TimingFunction.h + * @brief This is the header file for the TimingFunction classes. + * + * This header file contains the declarations of the TimingFunction classes. + */ + +#ifndef _FUI_ANIM_INTERNAL_TIMING_FUNCTION_H_ +#define _FUI_ANIM_INTERNAL_TIMING_FUNCTION_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif //_FUI_ANIM_INTERNAL_TIMING_FUNCTION_H_ diff --git a/src/ui/animations/FUiAnim_TransactionNode.cpp b/src/ui/animations/FUiAnim_TransactionNode.cpp new file mode 100644 index 0000000..9333314 --- /dev/null +++ b/src/ui/animations/FUiAnim_TransactionNode.cpp @@ -0,0 +1,1713 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_TransactionNode.cpp + * @brief This file contains implementation of _TransactionNode class + * + * This file contains implementation _TransactionNode class. + */ + +#include + +#include +#include +#include +#include +#include +#include + +#include "FUi_Math.h" +#include "FUi_EcoreEvas.h" + +#include "FUiAnim_VisualElementImpl.h" + +#include "FUiAnim_VisualElementValueAnimationImpl.h" +#include "FUiAnim_VisualElementAnimationKeyFrame.h" +#include "FUiAnim_TransactionNode.h" +#include "FUiAnim_AnimationGroupNode.h" + + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; + +//#define VE_DEBUG_ANIMATION + +namespace Tizen { namespace Ui { namespace Animations +{ + +unsigned int +_AnimationTime::GetTime(bool loopTime) +{ +#ifdef VE_DEBUG_ANIMATION + static unsigned int debug_time = 0; + + debug_time += 20; + return debug_time; +#else + if (likely(loopTime)) + { + return (unsigned int) (ecore_loop_time_get() * 1000.0f); // ecore_loop_time_get() returns a value in seconds. + } + + return (unsigned int) (ecore_time_get() * 1000.0f); // ecore_loop_time_get() returns a value in seconds. +#endif +} + +_AnimationData::_AnimationData(VisualElement& target, const Tizen::Base::String* pName, VisualElementAnimation& animation) + : __target(target) + , __animation(animation) + , __startValue() + , __endValue() + , __totalDuration(0) + , __baseTime(0) + , __currentRepeatCount(1) + , __keyFrameIndex(0) + , __forward(true) + , __progress(0.0f) + , __status(_STATUS_READY) + , __pendingMode(_PENDING_MODE_NONE) +{ + if (pName != null) + { + __name = *pName; + } + + VisualElementValueAnimation* pValueAnimation = dynamic_cast< VisualElementValueAnimation* >(&__animation); + if (pValueAnimation) + { + __startValue = pValueAnimation->GetStartValue(); + __endValue = pValueAnimation->GetEndValue(); + } + + long repeatCount = __animation.IsAutoReverseEnabled() ? __animation.GetRepeatCount() * 2 : __animation.GetRepeatCount(); + + __totalDuration = __animation.GetDelay() + (__animation.GetDuration() * repeatCount - __animation.GetOffset()); +} + +_AnimationData::~_AnimationData(void) +{ + delete &__animation; +} + +VisualElementAnimation& +_AnimationData::GetAnimation(void) const +{ + return __animation; +} + +String +_AnimationData::GetName(void) const +{ + return __name; +} + +VisualElement& +_AnimationData::GetTarget(void) const +{ + return __target; +} + +bool +_AnimationData::IsRemoved(void) const +{ + return (__pendingMode == _PENDING_MODE_REMOVING || __pendingMode == _PENDING_MODE_REMOVE); +} + +result +_AnimationData::SetBaseTime(unsigned int baseTime) +{ + __baseTime = baseTime; + + // reset for group repeat + __status = _STATUS_READY; + __keyFrameIndex = 0; + __forward = true; + + return E_SUCCESS; +} + +void +_AnimationData::FillValueForProperty(void) +{ + if (__startValue.IsEmpty() || __endValue.IsEmpty()) + { + VisualElementPropertyAnimation* pPropertyAnimation = dynamic_cast< VisualElementPropertyAnimation* >(&__animation); + if (pPropertyAnimation) + { + Variant currentValue = __target.GetProperty(pPropertyAnimation->GetPropertyName()); + + if (__startValue.IsEmpty()) + { + __startValue = currentValue; + } + else + { + __endValue = currentValue; + } + } + } +} + +Variant +_AnimationData::CalculateValueByTime(unsigned int currentTime) +{ + long currentRepeatCount = 0; + long oldRepeatCount = 0; + long repeatCount = 0; + long delay = 0; + long duration = 0; + long offset = 0; + + switch(__status) + { + case _STATUS_FINISHING: + __status = _STATUS_FINISH; + return Variant(); + + case _STATUS_FINISH: + __status = _STATUS_END; + return Variant(); + + case _STATUS_END: + return Variant(); + + default: + // nothing to do + break; + } + + // Clac progress + if (__animation.GetScaleRatio() > 0.f) + { + currentTime = (unsigned int) ((currentTime - __baseTime) / __animation.GetScaleRatio()); // Apply time scale value + } + + delay = __animation.GetDelay(); + + if (currentTime < (unsigned int)(delay)) + { + // Not started + __currentRepeatCount = 1; + __forward = true; + __progress = -1.0f; + + return CalculateValue(); + } + + offset = __animation.GetOffset(); + repeatCount = __animation.GetRepeatCount(); + duration = __animation.GetDuration(); + if (duration == 0) + { + duration = 1; + repeatCount = 1; + } + + oldRepeatCount = __currentRepeatCount; + currentRepeatCount = ((currentTime - delay + offset) / duration) + 1; + + if (__animation.IsAutoReverseEnabled()) + { + __currentRepeatCount = (currentRepeatCount + 1) >> 1; + + __progress = static_cast< float >(currentTime - (delay + duration * (currentRepeatCount - 1) - offset)) / static_cast< float >(duration); + + if (currentRepeatCount & 0x1) + { + // forward + if (!__forward) + { + __progress = 0.0f; + __forward = true; + } + } + else + { + // backward + if (__forward) + { + __progress = 1.0f; + __forward = false; + } + else + { + __progress = 1.0f - __progress; + } + + } + } + else + { + __currentRepeatCount = currentRepeatCount; + __forward = true; + + __progress = static_cast< float >(currentTime - (delay + duration * (currentRepeatCount - 1) - offset)) / static_cast< float >(duration); + } + + if (__status == _STATUS_READY) + { + __status = _STATUS_START; + + FillValueForProperty(); + } + else if (repeatCount > 0 && currentTime >= __totalDuration) // infinite loop if repeatCount == 0 + { + // Finished + __currentRepeatCount = repeatCount; + __forward = true; + __progress = (__animation.IsAutoReverseEnabled() ? 0.0f : 1.0f); + + __status = _STATUS_FINISHING; + } + else if (__currentRepeatCount > oldRepeatCount) + { + __status = _STATUS_REPEAT; + + __progress = (__animation.IsAutoReverseEnabled() ? 0.0f : 1.0f); + } + else + { + __status = _STATUS_RUNNING; + } + + return CalculateValue(); +} + +Variant +_AnimationData::CalculateValue(void) +{ + float calcProgress = 0.0f; + Variant current; + + if (__progress < 0.0f || __progress > 1.0f) + { + return current; + } + + VisualElementValueAnimation* pValueAnimation = dynamic_cast< VisualElementValueAnimation* >(&__animation); + + // In case of VisualElementAnimation + if (pValueAnimation == null) + { + return current; + } + + const IVisualElementAnimationTimingFunction* pTimingFunction = __animation.GetTimingFunction(); + SysAssertf(pTimingFunction, "Timing function is null."); + + const IVisualElementAnimationValueInterpolator* pInterpolator = __animation.GetValueInterpolator(); + SysAssertf(pInterpolator, "Interpolotor is null."); + + _VisualElementAnimationKeyFrame* pKeyFrame = _VisualElementValueAnimationImpl::GetInstance(*pValueAnimation)->GetKeyFrame(); + + if (pKeyFrame != null) + { + _VariantEx start; + _VariantEx end; + + int keyFrameCount = pKeyFrame->GetCount(); + SysAssertf(keyFrameCount > 0, "The count of key frames is zero."); + + if (__forward) + { + if (__keyFrameIndex == keyFrameCount) // last section + { + _VisualElementAnimationKeyFrameInfo* pFromInfo = pKeyFrame->GetKeyFrameInfoAt(__keyFrameIndex - 1); + SysAssertf(pFromInfo, "Index (%d) of key frame is invalid.", __keyFrameIndex - 1); + + start = pFromInfo->GetValueEx(); + end = __endValue; + + calcProgress = pTimingFunction->CalculateProgress((__progress - pFromInfo->GetTime()) / (1.0f - pFromInfo->GetTime())); + + if (_FloatCompare(__progress, 1.0f)) + { + __keyFrameIndex = 0; + } + } + else + { + _VisualElementAnimationKeyFrameInfo* pToInfo = pKeyFrame->GetKeyFrameInfoAt(__keyFrameIndex); + SysAssertf(pToInfo, "Index (%d) of key frame is invalid.", __keyFrameIndex); + + while (__progress > pToInfo->GetTime()) + { + __keyFrameIndex++; + if (__keyFrameIndex == keyFrameCount) + { + break; + } + + pToInfo = pKeyFrame->GetKeyFrameInfoAt(__keyFrameIndex); + SysAssertf(pToInfo, "Index (%d) of key frame is invalid.", __keyFrameIndex); + } + + const IVisualElementAnimationTimingFunction* pToTimingFunction = pToInfo->GetTimingFunction(); + if (pToTimingFunction == null) + { + pToTimingFunction = pTimingFunction; + } + + if (__keyFrameIndex == 0) //first section + { + start = __startValue; + end = pToInfo->GetValueEx(); + + calcProgress = pToTimingFunction->CalculateProgress(__progress / pToInfo->GetTime()); + } + else if (__keyFrameIndex == keyFrameCount) //last section + { + // pToInfo means pFromInfo in last section + start = pToInfo->GetValueEx(); + end = __endValue; + + calcProgress = pTimingFunction->CalculateProgress((__progress - pToInfo->GetTime()) / (1.0f - pToInfo->GetTime())); + } + else + { + _VisualElementAnimationKeyFrameInfo* pFromInfo = pKeyFrame->GetKeyFrameInfoAt(__keyFrameIndex - 1); + SysAssertf(pFromInfo, "Index (%d) of key frame is invalid.", __keyFrameIndex - 1); + + start = pFromInfo->GetValueEx(); + end = pToInfo->GetValueEx(); + + calcProgress = pToTimingFunction->CalculateProgress((__progress - pFromInfo->GetTime()) / (pToInfo->GetTime() - pFromInfo->GetTime())); + } + } + } + else //backward + { + if (__keyFrameIndex == 0) //last section in backward (= first section in forward) + { + _VisualElementAnimationKeyFrameInfo* pFromInfo = pKeyFrame->GetKeyFrameInfoAt(__keyFrameIndex); + SysAssertf(pFromInfo, "Index (%d) of key frame is invalid.", __keyFrameIndex); + + const IVisualElementAnimationTimingFunction* pFromTimingFunction = pFromInfo->GetTimingFunction(); + if (pFromTimingFunction == null) + { + pFromTimingFunction = pTimingFunction; + } + + start = __startValue; + end = pFromInfo->GetValueEx(); + + calcProgress = pFromTimingFunction->CalculateProgress(__progress / pFromInfo->GetTime()); + } + else + { + _VisualElementAnimationKeyFrameInfo* pToInfo = pKeyFrame->GetKeyFrameInfoAt(__keyFrameIndex - 1); + SysAssertf(pToInfo, "Index (%d) of key frame is invalid.", __keyFrameIndex - 1); + + while (__progress < pToInfo->GetTime()) + { + __keyFrameIndex--; + if (__keyFrameIndex == 0) + { + break; + } + + pToInfo = pKeyFrame->GetKeyFrameInfoAt(__keyFrameIndex - 1); + SysAssertf(pToInfo, "Index (%d) of key frame is invalid", __keyFrameIndex - 1); + } + + const IVisualElementAnimationTimingFunction* pToTimingFunction = pToInfo->GetTimingFunction(); + if (pToTimingFunction == null) + { + pToTimingFunction = pTimingFunction; + } + + if (__keyFrameIndex == 0) //last section in backward + { + start = __startValue; + end = pToInfo->GetValueEx(); + + calcProgress = pToTimingFunction->CalculateProgress(__progress / pToInfo->GetTime()); + } + else if (__keyFrameIndex == keyFrameCount) //first section in backward (= last section in forward) + { + start = pToInfo->GetValueEx(); + end = __endValue; + + calcProgress = pTimingFunction->CalculateProgress((__progress - pToInfo->GetTime()) / (1.0f - pToInfo->GetTime())); + } + else + { + _VisualElementAnimationKeyFrameInfo* pFromInfo = pKeyFrame->GetKeyFrameInfoAt(__keyFrameIndex); + SysAssertf(pFromInfo, "Index (%d) of key frame is invalid.", __keyFrameIndex); + + const IVisualElementAnimationTimingFunction* pFromTimingFunction = pFromInfo->GetTimingFunction(); + if (pFromTimingFunction == null) + { + pFromTimingFunction = pTimingFunction; + } + + start = pToInfo->GetValueEx(); + end = pFromInfo->GetValueEx(); + + calcProgress = pFromTimingFunction->CalculateProgress((__progress - pToInfo->GetTime()) / (pFromInfo->GetTime() - pToInfo->GetTime())); + } + } + } + + if (pInterpolator->Interpolate(calcProgress, start, end, current) != E_SUCCESS) + { + return start; + } + } + else // no keyframe + { + calcProgress = pTimingFunction->CalculateProgress(__progress); + + if (pInterpolator->Interpolate(calcProgress, __startValue, __endValue, current) != E_SUCCESS) + { + return __startValue; + } + } + + return current; +} + +void +_AnimationData::NotifyAnimationStarted(void) +{ + if (__status != _STATUS_START && __status != _STATUS_REPEAT) + { + return; + } + + _VisualElementAnimationImpl* pAnimationImpl = _VisualElementAnimationImpl::GetInstance(__animation); + + IVisualElementAnimationStatusEventListener* pListener = pAnimationImpl->GetStatusEventListener(); + if (pListener == null) + { + return; + } + + switch (__status) + { + case _AnimationData::_STATUS_START: + pListener->OnVisualElementAnimationStarted(__animation, __name, pAnimationImpl->GetEventTarget()); + break; + + case _AnimationData::_STATUS_REPEAT: + pListener->OnVisualElementAnimationRepeated(__animation, __name, pAnimationImpl->GetEventTarget(), __currentRepeatCount); + break; + + default: + break; + } +} + +void +_AnimationData::NotifyAnimationFinished(bool completed) +{ + if (__status == _STATUS_END) + { + return; + } + + if (__status != _STATUS_FINISH) + { + __status = _STATUS_FINISH; + } + + _VisualElementAnimationImpl* pAnimationImpl = _VisualElementAnimationImpl::GetInstance(__animation); + + IVisualElementAnimationStatusEventListener* pListener = pAnimationImpl->GetStatusEventListener(); + if (pListener == null) + { + return; + } + + pListener->OnVisualElementAnimationFinished(__animation, __name, pAnimationImpl->GetEventTarget(), completed); +} + +void +_AnimationData::OnTickOccurred(VisualElement& target, const Tizen::Ui::Variant& currentValue) +{ + if (currentValue.IsEmpty() == true) + { + return; + } + + VisualElementValueAnimation* pValueAnimation = dynamic_cast< VisualElementValueAnimation* >(&__animation); + + if (pValueAnimation != null) + { + _VisualElementValueAnimationImpl* pValueAnimationImpl = _VisualElementValueAnimationImpl::GetInstance(*pValueAnimation); + + pValueAnimationImpl->OnTickOccurred(target, currentValue); + + IVisualElementAnimationTickEventListener *pTickListener = pValueAnimationImpl->GetTickEventListener(); + + if (pTickListener != null) + { + pTickListener->OnTickOccurred(*pValueAnimation, __name, pValueAnimationImpl->GetEventTarget(), currentValue); + } + } +} + +static int id = -1; + +// class _TransactionNode +_TransactionNode::_TransactionNode(void) + : __id(-1) + , __pParent(null) + , __pRoot(this) + , __pDefaultListener(null) + , __pListener(null) + , __isImplicitAnimationEnabled(true) + , __isCommitted(false) + , __isReservedRemove(false) + , __isInAnimationTick(false) + , __status(_STATUS_READY) +{ + ClearLastResult(); + + __id = id = (id >= 0xFFFFFF ? 0 : id + 1); + + result r = __children.Construct(); + SysTryReturnVoidResult(NID_UI_ANIM, r == E_SUCCESS, r, "[%s] Failed to construct children list.", GetErrorMessage(r)); + + r = __animations.Construct(); + SysTryReturnVoidResult(NID_UI_ANIM, r == E_SUCCESS, r, "[%s] Failed to construct animations map.", GetErrorMessage(r)); + + r = __pendingAnimations.Construct(); + SysTryReturnVoidResult(NID_UI_ANIM, r == E_SUCCESS, r, "[%s] Failed to construct pending list.", GetErrorMessage(r)); +} + +_TransactionNode::_TransactionNode(const _TransactionNode& node) + : __id(-1) + , __pParent(null) + , __pRoot(node.__pRoot) + , __pDefaultListener(null) + , __pListener(null) + , __isImplicitAnimationEnabled(node.__isImplicitAnimationEnabled) + , __isCommitted(false) + , __isReservedRemove(false) + , __isInAnimationTick(false) + , __status(_STATUS_READY) +{ + ClearLastResult(); + + __id = id = (id >= 0xFFFFFF ? 0 : id + 1); + + result r = __children.Construct(); + SysTryReturnVoidResult(NID_UI_ANIM, r == E_SUCCESS, r, "[%s] Failed to construct children list.", GetErrorMessage(r)); + + r = __animations.Construct(); + SysTryReturnVoidResult(NID_UI_ANIM, r == E_SUCCESS, r, "[%s] Failed to construct animations map.", GetErrorMessage(r)); + + r = __pendingAnimations.Construct(); + SysTryReturnVoidResult(NID_UI_ANIM, r == E_SUCCESS, r, "[%s] Failed to construct pending list.", GetErrorMessage(r)); + + r = CopyAnimationValue(node); + SysTryReturnVoidResult(NID_UI_ANIM, r == E_SUCCESS, r, "[%s] Failed to copy the animation value.", GetErrorMessage(r)); +} + +_TransactionNode::~_TransactionNode(void) +{ + __children.RemoveAllChildren(); + + __pendingAnimations.RemoveAllItems(); + + RemoveAllAnimations(); +} + +bool +_TransactionNode::Equals(const Object& obj) const +{ + if (this == &obj) + { + return true; + } + + return false; +} + +int +_TransactionNode::GetId(void) const +{ + return __id; +} + +_TransactionNode* +_TransactionNode::GetParent(void) const +{ + return __pParent; +} + +result +_TransactionNode::SetParent(_TransactionNode& parent) +{ + __pParent = &parent; + + return E_SUCCESS; +} + +result +_TransactionNode::SetDefaultEventListener(const IAnimationTransactionEventListener* pListener) +{ + __pDefaultListener = const_cast< IAnimationTransactionEventListener* >(pListener); + + return E_SUCCESS; +} + +IAnimationTransactionEventListener* +_TransactionNode::GetEventListener(void) const +{ + return __pListener; +} + +result +_TransactionNode::SetEventListener(const IAnimationTransactionEventListener* pListener) +{ + __pListener = const_cast< IAnimationTransactionEventListener* >(pListener); + + return E_SUCCESS; +} + +bool +_TransactionNode::IsImplicitAnimationEnabled(void) const +{ + return __isImplicitAnimationEnabled; +} + +result +_TransactionNode::SetImplicitAnimationEnabled(bool enable) +{ + __isImplicitAnimationEnabled = enable; + + return E_SUCCESS; +} + +int +_TransactionNode::GetChildrenCount(void) const +{ + return __children.GetCount(); +} + +_TransactionNode* +_TransactionNode::GetChild(int transactionId) const +{ + SysTryReturn(NID_UI_ANIM, transactionId > 0, null, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. transactionId = %d", transactionId); + + int childrenCount = GetChildrenCount(); + + if (childrenCount <= 0) + { + return null; + } + + _TransactionNode* pChild = null; + + for (int index = 0; index < childrenCount; index++) + { + pChild = __children.GetChildAt(index); + + if (pChild->GetId() == transactionId) + { + return pChild; + } + + pChild = pChild->GetChild(transactionId); + + if (pChild != null) + { + return pChild; + } + } + + return null; +} + +result +_TransactionNode::AddChild(_TransactionNode& child) +{ + result r = __children.Add(&child); + SysTryReturnResult(NID_UI_ANIM, r == E_SUCCESS, r, "Propagating."); + + child.SetParent(*this); + + return E_SUCCESS; +} + +void +_TransactionNode::RemoveChild(int transactionId) +{ + SysTryReturnVoidResult(NID_UI_ANIM, transactionId > 0, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. transactionId = %d", transactionId); + + int childrenCount = GetChildrenCount(); + + if (childrenCount <= 0) + { + return; + } + + _TransactionNode* pChild = null; + + for (int index = 0; index < childrenCount; index++) + { + pChild = __children.GetChildAt(index); + + if (pChild->GetId() == transactionId) + { + if (pChild->IsReservedRemove() == false) + { + pChild->RemoveAll(); + + RemoveChild(*pChild); + } + break; + } + + pChild->RemoveChild(transactionId); + } +} + +bool +_TransactionNode::RemoveChild(_TransactionNode& child) +{ + if (child.IsInAnimationTick()) + { + child.ReservedRemove(); + + return false; + } + else + { + __children.Remove(&child); + delete &child; + + return true; + } +} + +void +_TransactionNode::RemoveAll(void) +{ + ReservedRemove(); + + _TransactionNode* pChild = null; + + int childrenCount = GetChildrenCount(); + + for (int index = childrenCount-1; index >= 0; index--) + { + pChild = __children.GetChildAt(index); + + if (pChild->IsReservedRemove() == false) + { + pChild->RemoveAll(); + + RemoveChild(*pChild); + } + } + + RemoveAllAnimations(); + + NotifyTransactionFinished(false); +} + +int +_TransactionNode::GetAnimationCount(void) const +{ + return __animations.GetCount(); +} + +result +_TransactionNode::AddAnimation(VisualElement& target, const String* pKeyName, VisualElementAnimation& animation) +{ + result r = E_SUCCESS; + + ArrayList* pAnimationList = __animations.GetList(&target); + + if (pAnimationList == null) + { + pAnimationList = new (std::nothrow) ArrayList(); + SysTryReturnResult(NID_UI_ANIM, pAnimationList != null, E_OUT_OF_MEMORY, "Memory allocation failed."); + + r = pAnimationList->Construct(); + SysTryReturnResult(NID_UI_ANIM, r == E_SUCCESS, r, "Failed to construct animation list."); + + __animations.Add(&target, pAnimationList); + } + + _AnimationData* pAnimationData = new (std::nothrow) _AnimationData(target, pKeyName, animation); + SysTryReturnResult(NID_UI_ANIM, pAnimationData != null, E_OUT_OF_MEMORY, "Memory allocation failed."); + + r = pAnimationList->Add(*pAnimationData); + + if (r != E_SUCCESS) + { + delete pAnimationData; + + return r; + } + + return E_SUCCESS; +} + +result +_TransactionNode::RemoveAnimation(VisualElement& target, const String& keyName) +{ + if (GetAnimationCount() <= 0) + { + return E_OBJ_NOT_FOUND; + } + + result r = E_OBJ_NOT_FOUND; + + ArrayList* pAnimationList = __animations.GetList(&target); + + if (pAnimationList == null) + { + return E_OBJ_NOT_FOUND; + } + + _AnimationData* pAnimationData = null; + + for (int index = 0; index < pAnimationList->GetCount(); index++) + { + pAnimationData = static_cast< _AnimationData* >(pAnimationList->GetAt(index)); + + if (pAnimationData->GetName() == keyName) + { + if (pAnimationData->IsRemoved() == false) + { + r = AddAnimationDataInPending(*pAnimationData, false); + SysTryReturnResult(NID_UI_ANIM, r == E_SUCCESS, r, "Failed to add to pending list."); + } + + break; + } + } + + ProcessPendingAnimations(); + + return r; +} + +result +_TransactionNode::RemoveChildrenAnimation(VisualElement& target, const String& keyName) +{ + SysTryReturnResult(NID_UI_ANIM, keyName.IsEmpty() == false, E_OBJ_NOT_FOUND, "keyName is empty."); + + if (RemoveAnimation(target, keyName) == E_SUCCESS) + { + return E_SUCCESS; + } + + int childrenCount = GetChildrenCount(); + + if (childrenCount <= 0) + { + return E_OBJ_NOT_FOUND; + } + + _TransactionNode* pChild = null; + _AnimationGroupNode* pGroup = null; + + for (int index = 0; index < childrenCount; index++) + { + pChild = __children.GetChildAt(index); + pGroup = dynamic_cast< _AnimationGroupNode* >(pChild); + + if (pGroup != null && pGroup->IsEqual(target, keyName)) + { + if (pChild->IsReservedRemove() == false) + { + pChild->RemoveAll(); + + RemoveChild(*pChild); + return E_SUCCESS; + } + else + { + return E_OBJ_NOT_FOUND; + } + } + + if (pChild->RemoveChildrenAnimation(target, keyName) == E_SUCCESS) + { + return E_SUCCESS; + } + } + + return E_OBJ_NOT_FOUND; +} + +void +_TransactionNode::RemoveAnimationByProperty(VisualElement& target, const String& property) +{ + if (GetAnimationCount() <= 0) + { + return; + } + + ArrayList* pAnimationList = __animations.GetList(&target); + + if (pAnimationList == null) + { + return; + } + + result r = E_SUCCESS; + + VisualElementPropertyAnimation* pPropertyAnimation = null; + _AnimationData* pAnimationData = null; + + for (int index = 0; index < pAnimationList->GetCount(); index++) + { + pAnimationData = static_cast< _AnimationData* >(pAnimationList->GetAt(index)); + pPropertyAnimation = dynamic_cast< VisualElementPropertyAnimation* >(&(pAnimationData->GetAnimation())); + + if (pPropertyAnimation != null && pPropertyAnimation->GetPropertyName() == property) + { + if (pAnimationData->IsRemoved() == false) + { + r = AddAnimationDataInPending(*pAnimationData, false); + SysTryReturnVoidResult(NID_UI_ANIM, r == E_SUCCESS, r, "[%s] Failed to add to pending list.", GetErrorMessage(r)); + } + } + } + + ProcessPendingAnimations(); +} + +void +_TransactionNode::RemoveChildrenAnimationByProperty(VisualElement& target, const String& property) +{ + RemoveAnimationByProperty(target, property); + + int childrenCount = GetChildrenCount(); + + if (childrenCount <= 0) + { + return; + } + + _TransactionNode* pChild = null; + + for (int index = 0; index < childrenCount; index++) + { + pChild = __children.GetChildAt(index); + + pChild->RemoveChildrenAnimationByProperty(target, property); + } +} + +void +_TransactionNode::RemoveAllAnimations(void) +{ + if (GetAnimationCount() <= 0) + { + return; + } + + // use key list because map item would be removed + IListT* pKeyList = __animations.GetKeysN(); + SysTryReturnVoidResult(NID_UI_ANIM, pKeyList != null, E_SYSTEM, "[E_SYSTEM] Failed to add to animation."); + + VisualElement* pTarget = null; + + for (int index = 0; index < pKeyList->GetCount(); index++) + { + pKeyList->GetAt(index, pTarget); + + if (pTarget != null) + { + RemoveAllAnimations(*pTarget); + } + } + + delete pKeyList; +} + +void +_TransactionNode::RemoveAllAnimations(VisualElement& target) +{ + if (GetAnimationCount() <= 0) + { + return; + } + + ArrayList* pAnimationList = __animations.GetList(&target); + + if (pAnimationList == null) + { + return; + } + + result r = E_SUCCESS; + _AnimationData* pAnimationData = null; + + for (int index = 0; index < pAnimationList->GetCount(); index++) + { + pAnimationData = static_cast< _AnimationData* >(pAnimationList->GetAt(index)); + + r = AddAnimationDataInPending(*pAnimationData, false); + SysTryReturnVoidResult(NID_UI_ANIM, r == E_SUCCESS, r, "[%s] Failed to add to pending list.", GetErrorMessage(r)); + } + + ProcessPendingAnimations(); +} + +void +_TransactionNode::RemoveChildrenAllAnimations(VisualElement& target) +{ + RemoveAllAnimations(target); + + if (GetChildrenCount() <= 0) + { + return; + } + + _TransactionNode* pChild = null; + + for (int index = 0; index < GetChildrenCount(); index++) + { + pChild = __children.GetChildAt(index); + + pChild->RemoveChildrenAllAnimations(target); + + if (pChild->IsReservedRemove() == false && pChild->IsCommitted() == true && pChild->IsEmpty() == true) + { + pChild->ReservedRemove(); + + pChild->NotifyTransactionFinished(false); + + if (RemoveChild(*pChild)) + { + index--; + } + } + } +} + +const VisualElementAnimation* +_TransactionNode::GetAnimation(VisualElement& target, const String& keyName) const +{ + if (GetAnimationCount() <= 0) + { + return null; + } + + ArrayList* pAnimationList = __animations.GetList(&target); + + if (pAnimationList == null) + { + return null; + } + + _AnimationData* pAnimationData = null; + + int animationCount = pAnimationList->GetCount(); + + for (int index = 0; index < animationCount; index++) + { + pAnimationData = static_cast< _AnimationData* >(pAnimationList->GetAt(index)); + + if (pAnimationData->GetName() == keyName) + { + if (pAnimationData->IsRemoved() == false) + { + return &(pAnimationData->GetAnimation()); + } + + return null; + } + } + + return null; +} + +const VisualElementAnimation* +_TransactionNode::GetChildrenAnimation(VisualElement& target, const String& keyName) const +{ + SysTryReturn(NID_UI_ANIM, keyName.IsEmpty() == false, null, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] keyName is empty."); + + const VisualElementAnimation* pAnimation = GetAnimation(target, keyName); + + if (pAnimation != null) + { + return pAnimation; + } + + int childrenCount = GetChildrenCount(); + + if (childrenCount <= 0) + { + return null; + } + + _TransactionNode* pChild = null; + _AnimationGroupNode* pGroup = null; + + for (int index = 0; index < childrenCount; index++) + { + pChild = __children.GetChildAt(index); + pGroup = dynamic_cast< _AnimationGroupNode* >(pChild); + + if (pGroup != null && pGroup->IsEqual(target, keyName)) + { + pAnimation = &(pGroup->GetAnimation()); + } + else + { + pAnimation = pChild->GetChildrenAnimation(target, keyName); + } + + if (pAnimation != null) + { + return pAnimation; + } + } + + return null; +} + +result +_TransactionNode::AddAnimationDataInPending(_AnimationData& animationData, bool completed) +{ + result r = E_SUCCESS; + + if (animationData.IsRemoved()) + { + return E_SUCCESS; + } + + r = __pendingAnimations.Add(&animationData); + + animationData.SetPendingMode(_AnimationData::_PENDING_MODE_REMOVING); + + animationData.NotifyAnimationFinished(completed); + + animationData.SetPendingMode(_AnimationData::_PENDING_MODE_REMOVE); + + return r; +} + +void +_TransactionNode::RemoveAnimationDataInPending(_AnimationData& animationData) +{ + animationData.SetStatus(_AnimationData::_STATUS_END); + + animationData.SetPendingMode(_AnimationData::_PENDING_MODE_NONE); + + __pendingAnimations.Remove(&animationData); +} + +void +_TransactionNode::DrawTargets(void) +{ + IMapEnumeratorT* pMapEnum = __animations.GetMapEnumeratorN(); + + VisualElement* pTarget = null; + ArrayList* pAnimationList = null; + + while (pMapEnum->MoveNext() == E_SUCCESS) + { + pMapEnum->GetKey(pTarget); + pMapEnum->GetValue(pAnimationList); + + if (pAnimationList == null) + { + continue; + } + + _VisualElementImpl* pPresentationImpl = _VisualElementImpl::GetInstance(*pTarget); + + if (pPresentationImpl) + { + _VisualElementImpl* pModelImpl = pPresentationImpl->__pModel; + + if (pModelImpl) + { + pModelImpl->DrawForAnimation(); + } + } + } + + delete pMapEnum; +} + +void +_TransactionNode::SetBaseTime(unsigned int baseTime) +{ +} + +void +_TransactionNode::SetChildrenBaseTime(unsigned int baseTime, bool self) +{ + if (self == true) + { + SetBaseTime(baseTime); + } + + // Animations + if (GetAnimationCount() > 0) + { + IMapEnumeratorT* pMapEnum = __animations.GetMapEnumeratorN(); + + ArrayList* pAnimationList = null; + _AnimationData* pAnimationData = null; + + while (pMapEnum->MoveNext() == E_SUCCESS) + { + pMapEnum->GetValue(pAnimationList); + + if (pAnimationList == null) + { + continue; + } + + int animationCount = pAnimationList->GetCount(); + + for (int index = 0; index < animationCount; index++) + { + pAnimationData = static_cast< _AnimationData* >(pAnimationList->GetAt(index)); + + pAnimationData->SetBaseTime(baseTime); + } + } + + delete pMapEnum; + } + + // Children + int childrenCount = GetChildrenCount(); + + if (childrenCount <= 0) + { + return; + } + + _TransactionNode* pChild = null; + + for (int index = 0; index < childrenCount; index++) + { + pChild = __children.GetChildAt(index); + + pChild->SetChildrenBaseTime(baseTime, true); + } +} + +void +_TransactionNode::Commit(void) +{ + __isCommitted = true; +} + +bool +_TransactionNode::IsCommitted(bool ancestors) const +{ + if (ancestors == true) + { + if (__isCommitted == false) + { + return __isCommitted; + } + + bool isCommitted = true; + + if (__pParent != null) + { + isCommitted = __pParent->IsCommitted(); + } + + return (isCommitted && __isCommitted); + } + + return __isCommitted; +} + +bool +_TransactionNode::IsEmpty(void) const +{ + return (GetAnimationCount() <= 0 && GetChildrenCount() <= 0); +} + +bool +_TransactionNode::IsRunning(void) const +{ + return (__status > _STATUS_READY && __status < _STATUS_FINISH); +} + +void +_TransactionNode::ReservedRemove(bool remove) +{ + __isReservedRemove = remove; +} + +bool +_TransactionNode::IsReservedRemove(void) const +{ + return __isReservedRemove; +} + +bool +_TransactionNode::IsRemovable(void) const +{ + return true; +} + +bool +_TransactionNode::IsInAnimationTick(void) +{ + if (__isInAnimationTick == true) + { + return true; + } + + int childrenCount = GetChildrenCount(); + + if (childrenCount <= 0) + { + return false; + } + + _TransactionNode* pChild = null; + + for (int index = 0; index < childrenCount; index++) + { + pChild = __children.GetChildAt(index); + + if (pChild->IsInAnimationTick() == true) + { + return true; + } + } + + return false; +} + +void +_TransactionNode::CalculateProgress(unsigned int currentTime) +{ + if (__status == _STATUS_READY) + { + __status = _STATUS_START; + } + else + { + __status = _STATUS_RUNNING; + } + + if (IsEmpty() == true) + { + __status = _STATUS_FINISH; + } +} + +void +_TransactionNode::NotifyTransactionStarted(void) +{ + if (__isCommitted == false || __status != _STATUS_START) + { + return; + } + + IAnimationTransactionEventListener* pListener = null; + + pListener = (__pListener != null) ? __pListener : __pDefaultListener; + + // root transaction doesn't has default listener + if (pListener == null) + { + return; + } + + pListener->OnAnimationTransactionStarted(__id); +} + +void +_TransactionNode::NotifyTransactionRepeated(void) +{ +} + +void +_TransactionNode::NotifyTransactionFinished(bool completed) +{ + if (__isCommitted == false) + { + return; + } + + IAnimationTransactionEventListener* pListener = null; + + pListener = (__pListener != null) ? __pListener : __pDefaultListener; + + // root transaction doesn't has default listener + if (pListener == null) + { + return; + } + + if (completed == false) + { + pListener->OnAnimationTransactionStopped(__id); + } + else + { + pListener->OnAnimationTransactionFinished(__id); + } +} + +bool +_TransactionNode::RemoveAnimationByDuplicatedProperty(_AnimationData& animationData) +{ + VisualElementPropertyAnimation* pPropertyAnimation = dynamic_cast< VisualElementPropertyAnimation* >(&(animationData.GetAnimation())); + + if (pPropertyAnimation == null) + { + return true; + } + + VisualElement* pTarget = &(animationData.GetTarget()); + + ArrayList* pAnimationList = __animations.GetList(pTarget); + + if (pAnimationList != null) + { + _AnimationData* pRemoveAnimationData = null; + VisualElementPropertyAnimation* pRemovePropertyAnimation = null; + + int animationCount = pAnimationList->GetCount(); + + for (int index = 0; index < animationCount; index++) + { + pRemoveAnimationData = static_cast< _AnimationData* >(pAnimationList->GetAt(index)); + + if (&animationData == pRemoveAnimationData) + { + return true; + } + + pRemovePropertyAnimation = dynamic_cast< VisualElementPropertyAnimation* >(&(pRemoveAnimationData->GetAnimation())); + + if (pRemovePropertyAnimation && pRemovePropertyAnimation->GetPropertyName() == pPropertyAnimation->GetPropertyName()) + { + result r = AddAnimationDataInPending(*pRemoveAnimationData, false); + SysTryReturn(NID_UI_ANIM, r == E_SUCCESS, r, false, "[%s] Failed to add to pending list.", GetErrorMessage(r)); + + if (IsRemovable() == false && pRemoveAnimationData->GetStatus() != _AnimationData::_STATUS_READY) + { + RemoveAnimationDataInPending(*pRemoveAnimationData); + } + } + } + } + + int childrenCount = GetChildrenCount(); + + if (childrenCount <= 0) + { + return false; + } + + _TransactionNode* pChild = null; + + for (int index = 0; index < childrenCount; index++) + { + pChild = __children.GetChildAt(index); + + if (pChild->RemoveAnimationByDuplicatedProperty(animationData)) + { + return true; + } + } + + return false; +} + +void +_TransactionNode::ProcessPendingAnimations(void) +{ + if (__isInAnimationTick == true || __pendingAnimations.GetCount() <= 0) + { + return; + } + + _AnimationData* pAnimationData = null; + + int pendingAnimationCount = __pendingAnimations.GetCount(); + + for (int index = pendingAnimationCount - 1; index >= 0; index--) + { + pAnimationData = __pendingAnimations.GetItemAt(index); + + if (pAnimationData->GetPendingMode() == _AnimationData::_PENDING_MODE_REMOVE) + { + VisualElement* pTarget = &(pAnimationData->GetTarget()); + + ArrayList* pAnimationList = __animations.GetList(pTarget); + SysAssertf(pAnimationList, "AnimationList is null!"); + + pAnimationList->Remove(*pAnimationData, true); + + if (pAnimationList->GetCount() <= 0) + { + __animations.Remove(pTarget); + + delete pAnimationList; + } + + __pendingAnimations.RemoveAt(index); + } + } +} + +void +_TransactionNode::ProcessAnimationTick(unsigned int tick) +{ + if (__isCommitted == false) + { + return; + } + + CalculateProgress(tick); + + if (__status == _STATUS_READY) + { + return; + } + + NotifyTransactionStarted(); + + if (IsReservedRemove() == true) + { + return; + } + + OnAnimationTick(tick); + ProcessPendingAnimations(); + + _TransactionNode* pChild = null; + + for (int index = 0; index < GetChildrenCount(); index++) + { + pChild = __children.GetChildAt(index); + + if (pChild->IsReservedRemove()) + { + RemoveChild(*pChild); + index--; + + continue; + } + + pChild->ProcessAnimationTick(tick); + + if (__status == _STATUS_REPEAT || __status == _STATUS_FINISH || pChild->__status == _STATUS_FINISH) + { + pChild->ReservedRemove(); + + pChild->NotifyTransactionFinished(true); + + if (pChild->IsRemovable()) // only nested group + { + RemoveChild(*pChild); + index--; + } + else + { + pChild->ReservedRemove(false); + } + } + } + + NotifyTransactionRepeated(); +} + +void +_TransactionNode::OnAnimationTick(unsigned int tick) +{ + if (GetAnimationCount() <= 0) + { + return; + } + + __isInAnimationTick = true; + + IMapEnumeratorT* pMapEnum = __animations.GetMapEnumeratorN(); + SysTryReturnVoidResult(NID_UI_ANIM, (pMapEnum != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + VisualElement* pTarget = null; + ArrayList* pAnimationList = null; + _AnimationData* pAnimationData = null; + + while (pMapEnum->MoveNext() == E_SUCCESS) + { + pMapEnum->GetKey(pTarget); //TODO: remove + pMapEnum->GetValue(pAnimationList); + + if (pTarget == null || pAnimationList == null) + { + continue; + } + + int animationCount = pAnimationList->GetCount(); + + for (int index = 0; index < animationCount; index++) + { + pAnimationData = static_cast< _AnimationData* >(pAnimationList->GetAt(index)); + + if (pAnimationData->IsRemoved()) + { + continue; + } + + Variant currentValue = pAnimationData->CalculateValueByTime(tick); + + // check same property animation + if (pAnimationData->GetStatus() == _AnimationData::_STATUS_START) + { + __pRoot->RemoveAnimationByDuplicatedProperty(*pAnimationData); + } + + // 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) + { + AddAnimationDataInPending(*pAnimationData, true); + + if (IsRemovable() == false) + { + RemoveAnimationDataInPending(*pAnimationData); + } + } + } + } + + delete pMapEnum; + + __isInAnimationTick = false; +} + + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnim_TransactionNode.h b/src/ui/animations/FUiAnim_TransactionNode.h new file mode 100644 index 0000000..90dbc6f --- /dev/null +++ b/src/ui/animations/FUiAnim_TransactionNode.h @@ -0,0 +1,323 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_TransactionNode.h + * @brief This is the header file for the _TransactionNode class. + * + * This header file contains the declarations of the _TransactionNode class. + */ + +#ifndef _FUI_ANIM_INTERNAL_TRANSACTION_NODE_H_ +#define _FUI_ANIM_INTERNAL_TRANSACTION_NODE_H_ + +#include +#include +#include + +#include "FUiAnim_VisualElementAnimationImpl.h" +#include "FUiAnim_VariantEx.h" + +namespace Tizen { namespace Ui { namespace Animations +{ + +class IAnimationTransactionEventListener; + +class _AnimationTime +{ +public: + static unsigned int GetTime(bool loopTime = false); +}; // _AnimationTime + +class _AnimationData + : public Tizen::Base::Object +{ +public: + enum _AnimationStatus + { + _STATUS_READY, + _STATUS_START, + _STATUS_RUNNING, + _STATUS_REPEAT, + _STATUS_FINISHING, + _STATUS_FINISH, + _STATUS_END + }; + + enum _PendingMode + { + _PENDING_MODE_NONE, + _PENDING_MODE_REMOVING, + _PENDING_MODE_REMOVE + }; + + _AnimationData(VisualElement& target, const Tizen::Base::String* pName, VisualElementAnimation& animation); + virtual ~_AnimationData(void); + +public: + VisualElementAnimation& GetAnimation(void) const; + Tizen::Base::String GetName(void) const; + VisualElement& GetTarget(void) const; + + result SetBaseTime(unsigned int baseTime); + + void SetStatus(_AnimationStatus status) { __status = status; } + _AnimationStatus GetStatus(void) const { return __status; } + + void SetPendingMode(_PendingMode mode) { __pendingMode = mode; } + _PendingMode GetPendingMode(void) const { return __pendingMode; } + + bool IsRemoved(void) const; + + void FillValueForProperty(void); + + Variant CalculateValueByTime(unsigned int currentTime); + + void NotifyAnimationStarted(void); + void NotifyAnimationFinished(bool completed); + + void OnTickOccurred(VisualElement& target, const Tizen::Ui::Variant& currentValue); + +private: + _AnimationData(void); + _AnimationData(const _AnimationData&); + _AnimationData& operator =(const _AnimationData&); + + Variant CalculateValue(void); + +private: + VisualElement& __target; + Tizen::Base::String __name; + VisualElementAnimation& __animation; + + _VariantEx __startValue; + _VariantEx __endValue; + + unsigned int __totalDuration; + unsigned int __baseTime; + long __currentRepeatCount; + int __keyFrameIndex; + + bool __forward; + float __progress; + + _AnimationStatus __status; + + _PendingMode __pendingMode; +}; // _AnimationData + +class _TransactionNode + : public _VisualElementAnimationImpl +{ +public: + enum _TransactionStatus + { + _STATUS_READY, + _STATUS_START, + _STATUS_RUNNING, + _STATUS_REPEAT, + _STATUS_FINISHING, + _STATUS_FINISH, + _STATUS_END + }; + + _TransactionNode(void); + _TransactionNode(const _TransactionNode& node); + virtual ~_TransactionNode(void); + + virtual bool Equals(const Object& obj) const; + + int GetId(void) const; + + _TransactionNode* GetParent(void) const; + result SetParent(_TransactionNode& parent); + + result SetDefaultEventListener(const IAnimationTransactionEventListener* pListener); + + IAnimationTransactionEventListener* GetEventListener(void) const; + result SetEventListener(const IAnimationTransactionEventListener* pListener); + + bool IsImplicitAnimationEnabled(void) const; + result SetImplicitAnimationEnabled(bool enable); + + int GetChildrenCount(void) const; + _TransactionNode* GetChild(int transactionId) const; + + result AddChild(_TransactionNode& child); + void RemoveChild(int transactionId); + bool RemoveChild(_TransactionNode& child); + + void RemoveAll(void); + + int GetAnimationCount(void) const; + result AddAnimation(VisualElement& target, const Tizen::Base::String* pKeyName, VisualElementAnimation& animation); + result RemoveChildrenAnimation(VisualElement& target, const Tizen::Base::String& keyName); + void RemoveChildrenAnimationByProperty(VisualElement& target, const Tizen::Base::String& property); + void RemoveChildrenAllAnimations(VisualElement& target); + + const VisualElementAnimation* GetChildrenAnimation(VisualElement& target, const Tizen::Base::String& keyName) const; + + void DrawTargets(void); + + void SetChildrenBaseTime(unsigned int baseTime, bool self = true); + virtual void SetBaseTime(unsigned int baseTime); + + virtual void Commit(void); + bool IsCommitted(bool ancestors = false) const; + + bool IsEmpty(void) const; + + _TransactionStatus GetStatus(void) const { return __status; } + + bool IsRunning(void) const; + virtual bool IsRemovable(void) const; + + virtual void NotifyTransactionStarted(void); + virtual void NotifyTransactionRepeated(void); + virtual void NotifyTransactionFinished(bool completed); + + void ProcessAnimationTick(unsigned int tick); + +private: + _TransactionNode& operator =(const _TransactionNode& rhs); + + result RemoveAnimation(VisualElement& target, const Tizen::Base::String& keyName); + void RemoveAnimationByProperty(VisualElement& target, const Tizen::Base::String& property); + void RemoveAllAnimations(void); + void RemoveAllAnimations(VisualElement& target); + + const VisualElementAnimation* GetAnimation(VisualElement& target, const Tizen::Base::String& property) const; + + result AddAnimationDataInPending(_AnimationData& animationData, bool completed); + void RemoveAnimationDataInPending(_AnimationData& animationData); + + void ReservedRemove(bool remove = true); + bool IsReservedRemove(void) const; + + virtual void CalculateProgress(unsigned int currentTime); + + bool RemoveAnimationByDuplicatedProperty(_AnimationData& animationData); + + bool IsInAnimationTick(void); + void ProcessPendingAnimations(void); + void OnAnimationTick(unsigned int tick); + +protected: + int __id; + + _TransactionNode* __pParent; + _TransactionNode* __pRoot; + + IAnimationTransactionEventListener* __pDefaultListener; + IAnimationTransactionEventListener* __pListener; + + bool __isImplicitAnimationEnabled; + + bool __isCommitted; + bool __isReservedRemove; + bool __isInAnimationTick; + + _TransactionStatus __status; + + class ChildrenListT : public Tizen::Base::Collection::ArrayListT<_TransactionNode*> + { + public: + _TransactionNode* GetChildAt(int index) const + { + _TransactionNode* pChild = null; + + if (likely(GetAt(index, pChild) == E_SUCCESS)) + { + return pChild; + } + + return null; + } + + void RemoveAllChildren(void) + { + _TransactionNode* pChild = null; + + int childrenCount = GetCount(); + + for (int index = 0; index < childrenCount; index++) + { + if (likely(GetAt(index, pChild) == E_SUCCESS)) + { + delete pChild; + } + } + + RemoveAll(); + } + }; + + class AnimationDataListT : public Tizen::Base::Collection::ArrayListT<_AnimationData*> + { + public: + _AnimationData* GetItemAt(int index) const + { + _AnimationData* pData = null; + + if (likely(GetAt(index, pData) == E_SUCCESS)) + { + return pData; + } + + return null; + } + + void RemoveAllItems(void) + { + _AnimationData* pData = null; + + int itemCount = GetCount(); + + for (int index = 0; index < itemCount; index++) + { + if (likely(GetAt(index, pData) == E_SUCCESS)) + { + delete pData; + } + } + + RemoveAll(); + } + }; + + class AnimationHashMapT : public Tizen::Base::Collection::HashMapT + { + public: + Tizen::Base::Collection::ArrayList* GetList(VisualElement* pTarget) const + { + Tizen::Base::Collection::ArrayList* pAnimationList = null; + + GetValue(pTarget, pAnimationList); + + return pAnimationList; + } + }; + + ChildrenListT __children; + AnimationHashMapT __animations; + AnimationDataListT __pendingAnimations; +}; // _TransactionNode + +}}} // Tizen::Ui::Animations + +#endif // _FUI_ANIM_INTERNAL_TRANSACTION_NODE_H_ + diff --git a/src/ui/animations/FUiAnim_TransformMatrix3Df.cpp b/src/ui/animations/FUiAnim_TransformMatrix3Df.cpp new file mode 100644 index 0000000..ad60fe2 --- /dev/null +++ b/src/ui/animations/FUiAnim_TransformMatrix3Df.cpp @@ -0,0 +1,782 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_TransformMatrix3Df.cpp + * @brief This file contains implementation of _TransformMatrix3Df class + * + * This file contains implementation _TransformMatrix3Df class. + */ + +#include +#include + +#include "FUiAnim_MatrixUtil.h" +#include "FUiAnim_TransformMatrix3Df.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Animations; + +#define DEGTORAD(d) ((d) * M_PI / 180.0f) +#define RADTODEG(r) ((r) * 180.0f / M_PI) + +namespace { + +FloatMatrix4 +GetTranslationMatrix(float tx, float ty, float tz) +{ + FloatMatrix4 tm; + tm.matrix[0][3] = tx; + tm.matrix[1][3] = ty; + tm.matrix[2][3] = tz; + return tm; +} + +} + +namespace Tizen { namespace Ui { namespace Animations { + +_TransformMatrix3Df::_TransformMatrix3Df(void) + : __transformType(MATRIX4_Identity) + , __usePerspective(false) + , __useScale(false) + , __useShear(false) + , __useRotation(false) + , __useTranslation(false) + , __scaleX(1.0f) + , __scaleY(1.0f) + , __scaleZ(1.0f) + , __shearXY(0.0f) + , __shearXZ(0.0f) + , __shearYZ(0.0f) + , __quatX(0.0f) + , __quatY(0.0f) + , __quatZ(0.0f) + , __quatW(1.0f) + , __translationX(0.0f) + , __translationY(0.0f) + , __translationZ(0.0f) + , __perspectiveX(0.0f) + , __perspectiveY(0.0f) + , __perspectiveZ(0.0f) + , __perspectiveW(1.0f) + , __rotAnchorX(0.0f) + , __rotAnchorY(0.0f) + , __rotAnchorZ(0.0f) + , __scaleAnchorX(0.0f) + , __scaleAnchorY(0.0f) + , __scaleAnchorZ(0.0f) + , __rotX(0.0f) + , __rotY(0.0f) + , __rotZ(0.0f) +{ +} + +_TransformMatrix3Df::~_TransformMatrix3Df(void) +{ +} + +void +_TransformMatrix3Df::Clear(void) +{ + __rotX = __rotY = __rotZ = 0.0f; + __scaleX = __scaleY = __scaleZ = 1.0f; + __shearXY = __shearXZ = __shearYZ = 0.0f; + __quatX = __quatY = __quatZ = 0.0f; __quatW = 1.0f; + __translationX = __translationY = __translationZ = 0.0f; + __perspectiveX = __perspectiveY = __perspectiveZ = 0.0f; __perspectiveW = 1.0f; + + __usePerspective = false; + __useScale = false; + __useRotation = false; + __useTranslation = false; + __transformType = MATRIX4_Identity; +} + +bool +_TransformMatrix3Df::SetTransformMatrix(const FloatMatrix4& transformMatrix) +{ + // Normalize the matrix. + float mw = transformMatrix.matrix[3][3]; + if (unlikely(mw == 0.0f)) + { + return false; + } + + FloatMatrix4 locmat; + for (int i = 0; i < 4; i++) + { + for (int j = 0; j < 4; j++) + { + locmat.matrix[j][i] = transformMatrix.matrix[i][j] / mw; + } + } + + // pmat is used to solve for perspective, but it also provides + // an easy way to test for singularity of the upper 3x3 component. + // + FloatMatrix4 pmat(locmat); + for (int i = 0; i < 3; i++) + { + pmat.matrix[3][i] = 0.0f; + } + + pmat.matrix[3][3] = 1.0f; + + FloatMatrix4 pmatInverseTranspose(pmat); + if (pmatInverseTranspose.Invert() != E_SUCCESS) + { + return false; + } + + + // First, isolate perspective. This is the messiest. + if (unlikely(locmat.matrix[3][0] != 0.0f) || unlikely(locmat.matrix[3][1] != 0.0f) || unlikely(locmat.matrix[3][2] != 0.0f)) + { + // prhs is the right hand side of the equation. + Vector4Df prhs, psol; + + prhs.x = locmat.matrix[3][0]; + prhs.y = locmat.matrix[3][1]; + prhs.z = locmat.matrix[3][2]; + prhs.w = locmat.matrix[3][3]; + + + pmatInverseTranspose.Transpose(); + + // Solve the equation by inverting pmat and multiplying + // prhs by the inverse. (This is the easiest way, not necessarily the best.) + // inverse function (and det4x4, above) from the Matrix Inversion gem in the first volume. + // + psol = prhs.Transform(pmatInverseTranspose); + + + // Stuff the answer away. + __perspectiveX = psol.x; + __perspectiveY = psol.y; + __perspectiveZ = psol.z; + __perspectiveW = psol.w; + + // Clear the perspective partition. + locmat.matrix[3][0] = (0.0f); + locmat.matrix[3][1] = (0.0f); + locmat.matrix[3][2] = (0.0f); + locmat.matrix[3][3] = (1.0f); + } + else + { + // No perspective. + __perspectiveX = 0.0f; + __perspectiveY = 0.0f; + __perspectiveZ = 0.0f; + __perspectiveW = 1.0f; // CHECKME: W of perspective is 1, right ? (or 0 ?) + } + + // Next take care of translation (easy). + __translationX = locmat.matrix[0][3]; + __translationY = locmat.matrix[1][3]; + __translationZ = locmat.matrix[2][3]; + + for (int i = 0; i < 3; i++) + { + locmat.matrix[i][3] = 0.0f; + } + + + // Now get scale and shear. + Vector3Df row[3]; + for (int i = 0; i < 3; i++) + { + row[i].x = locmat.matrix[0][i]; + row[i].y = locmat.matrix[1][i]; + row[i].z = locmat.matrix[2][i]; + } + + // Compute X scale factor and normalize first row. + __scaleX = row[0].GetLength(); + row[0].Scale(1.0f); + + // Compute XY shear factor and make 2nd row orthogonal to 1st. + __shearXY = row[0].Dot(row[1]); + Vector3Df::Combine(row[1], row[1], row[0], 1.0f, -__shearXY); + + // Now, compute Y scale and normalize 2nd row. + __scaleY = row[1].GetLength(); + row[1].Scale(1.0f); + __shearXY /= __scaleY; + + // Compute XZ and YZ shears, orthogonalize 3rd row. + __shearXZ = row[0].Dot(row[2]); + Vector3Df::Combine(row[2], row[2], row[0], 1.0f, -__shearXZ); + __shearYZ = row[1].Dot(row[2]); + Vector3Df::Combine(row[2], row[2], row[1], 1.0f, -__shearYZ); + + // Next, get Z scale and normalize 3rd row. + __scaleZ = row[2].GetLength(); + row[2].Scale(1.0f); + __shearXZ /= __scaleZ; + __shearYZ /= __scaleZ; + + // At this point, the matrix (in rows[]) is orthonormal. + // Check for a coordinate system flip. If the determinant + // is -1, then negate the matrix and the scaling factors. + // + Vector3Df pdum3 = row[1].Cross(row[2]); + if (row[0].Dot(pdum3) < 0.0f) + { + for (int i = 0; i < 3; i++) + { + row[i].x *= -1.0f; + row[i].y *= -1.0f; + row[i].z *= -1.0f; + } + + __scaleX *= -1.0f; + __scaleY *= -1.0f; + __scaleZ *= -1.0f; + } + + // Now, get the rotations out + // For correctness, we use quaternions + float s, t, x, y, z, w; + + t = row[0].x + row[1].y + row[2].z + 1.0f; + + if (t > 1e-4f) + { + s = 0.5f / sqrtf(t); + w = 0.25f / s; + x = (row[2].y - row[1].z) * s; + y = (row[0].z - row[2].x) * s; + z = (row[1].x - row[0].y) * s; + } + else if (row[0].x > row[1].y && row[0].x > row[2].z) + { + s = sqrtf(1.0f + row[0].x - row[1].y - row[2].z) * 2.0f; // S = 4 * qx + x = 0.25f * s; + y = (row[0].y + row[1].x) / s; + z = (row[0].z + row[2].x) / s; + w = (row[2].y - row[1].z) / s; + } + else if (row[1].y > row[2].z) + { + s = sqrtf(1.0f + row[1].y - row[0].x - row[2].z) * 2.0f; // S = 4 * qy + x = (row[0].y + row[1].x) / s; + y = 0.25f * s; + z = (row[1].z + row[2].y) / s; + w = (row[0].z - row[2].x) / s; + } + else + { + s = sqrtf(1.0f + row[2].z - row[0].x - row[1].y) * 2.0f; // S = 4 * qz + x = (row[0].z + row[2].x) / s; + y = (row[1].z + row[2].y) / s; + z = 0.25f * s; + w = (row[1].x - row[0].y) / s; + } + + __quatX = -x; + __quatY = -y; + __quatZ = -z; + __quatW = w; + + + __rotY = asinf(-row[0].z); + if (cosf(__rotY) != 0.0f) + { + __rotX = RADTODEG(atan2f(row[1].z, row[2].z)); + __rotZ = RADTODEG(atan2f(row[0].y, row[0].x)); + } + else + { + __rotX = RADTODEG(atan2f(-row[2].x, row[1].y)); + __rotZ = 0.0f; + } + + __rotY = RADTODEG(__rotY); + + + + // Clear anchor information + __rotAnchorX = 0.0f; + __rotAnchorY = 0.0f; + __rotAnchorZ = 0.0f; + __scaleAnchorX = 0.0f; + __scaleAnchorY = 0.0f; + __scaleAnchorZ = 0.0f; + + UpdateMatrixType(true); + + return true; +} + +FloatMatrix4 +_TransformMatrix3Df::Interpolate(const _TransformMatrix3Df& transformMatrixFrom, float progress) const +{ +#define FLOAT_INTP(v, c, f, t, p) do { if (likely((f.v) != (t.v))) c.v = (f.v) + ((t.v) - (f.v)) * (p); else c.v = f.v; } while (0) + + const _TransformMatrix3Df& fromTransform = transformMatrixFrom; + const _TransformMatrix3Df& toTransform = *this; + _TransformMatrix3Df currentTransform; + + FLOAT_INTP(__scaleX, currentTransform, fromTransform, toTransform, progress); + FLOAT_INTP(__scaleY, currentTransform, fromTransform, toTransform, progress); + FLOAT_INTP(__scaleZ, currentTransform, fromTransform, toTransform, progress); + FLOAT_INTP(__shearXY, currentTransform, fromTransform, toTransform, progress); + FLOAT_INTP(__shearXZ, currentTransform, fromTransform, toTransform, progress); + FLOAT_INTP(__shearYZ, currentTransform, fromTransform, toTransform, progress); + FLOAT_INTP(__translationX, currentTransform, fromTransform, toTransform, progress); + FLOAT_INTP(__translationY, currentTransform, fromTransform, toTransform, progress); + FLOAT_INTP(__translationZ, currentTransform, fromTransform, toTransform, progress); + FLOAT_INTP(__perspectiveX, currentTransform, fromTransform, toTransform, progress); + FLOAT_INTP(__perspectiveY, currentTransform, fromTransform, toTransform, progress); + FLOAT_INTP(__perspectiveZ, currentTransform, fromTransform, toTransform, progress); + FLOAT_INTP(__perspectiveW, currentTransform, fromTransform, toTransform, progress); + + // Interpolate anchor points + FLOAT_INTP(__rotAnchorX, currentTransform, fromTransform, toTransform, progress); + FLOAT_INTP(__rotAnchorY, currentTransform, fromTransform, toTransform, progress); + FLOAT_INTP(__rotAnchorZ, currentTransform, fromTransform, toTransform, progress); + FLOAT_INTP(__scaleAnchorX, currentTransform, fromTransform, toTransform, progress); + FLOAT_INTP(__scaleAnchorY, currentTransform, fromTransform, toTransform, progress); + FLOAT_INTP(__scaleAnchorZ, currentTransform, fromTransform, toTransform, progress); + + // rotation component + // WARNING: + // It is not needed to update __rotX/Y/Z because the calculating interpolated matrix would not use those values + DoSlerp(¤tTransform.__quatX, &fromTransform.__quatX, &toTransform.__quatX, progress); + + // WARNING: + // 'GetTransformMatrix' will use matrix type + currentTransform.UpdateMatrixType(true); + +#undef FLOAT_INTP + + return currentTransform.GetTransformMatrix(); +} + +void +_TransformMatrix3Df::UpdateMatrixType(bool needFullCheck) +{ + if (unlikely(needFullCheck)) + { + __useRotation = (unlikely(!_FloatCompare(__quatX, 0.0f)) || unlikely(!_FloatCompare(__quatY, 0.0f)) || unlikely(!_FloatCompare(__quatZ, 0.0f)) || unlikely(!_FloatCompare(__quatW, 1.0f))); + __useShear = (unlikely(!_FloatCompare(__shearXY, 0.0f)) || unlikely(!_FloatCompare(__shearXZ, 0.0f)) || unlikely(!_FloatCompare(__shearYZ, 0.0f))); + __useScale = (unlikely(!_FloatCompare(__scaleX, 1.0f)) || unlikely(!_FloatCompare(__scaleY, 1.0f)) || unlikely(!_FloatCompare(__scaleZ, 1.0f))); + __useTranslation = (unlikely(!_FloatCompare(__translationX, 0.0f)) || unlikely(!_FloatCompare(__translationY, 0.0f)) || unlikely(!_FloatCompare(__translationZ, 0.0f))); + __usePerspective = (unlikely(!_FloatCompare(__perspectiveX, 0.0f)) || unlikely(!_FloatCompare(__perspectiveY, 0.0f)) || unlikely(!_FloatCompare(__perspectiveZ, 0.0f)) || unlikely(!_FloatCompare(__perspectiveW, 1.0f))); + } + + + if (unlikely(__usePerspective) || unlikely(__useRotation) || unlikely(__useShear)) + { + __transformType = MATRIX4_Generic; + } + else if (unlikely(__useScale)) + { + __transformType = MATRIX4_Scale; + } + else if (likely(__useTranslation)) + { + __transformType = MATRIX4_Translation; + } + else + { + __transformType = MATRIX4_Identity; + } +} + +FloatMatrix4 +_TransformMatrix3Df::GetTransformMatrix(void) const +{ + FloatMatrix4 m; + + if (likely(__transformType == MATRIX4_Translation)) + { + m.matrix[3][0] = __translationX; + m.matrix[3][1] = __translationY; + m.matrix[3][2] = __translationZ; + m.matrix[3][3] = 1.0f; + return m; + } + else if (unlikely(__transformType == MATRIX4_Identity)) + { + _MatrixUtilSetIdentity(m); + return m; + } + + + + // apply perspective + m.matrix[3][0] = __perspectiveX; + m.matrix[3][1] = __perspectiveY; + m.matrix[3][2] = __perspectiveZ; + m.matrix[3][3] = __perspectiveW; + + + // apply translation + m.matrix[0][3] = __translationX; + m.matrix[1][3] = __translationY; + m.matrix[2][3] = __translationZ; + m.matrix[3][3] = __perspectiveW + (__perspectiveX * __translationX) + (__perspectiveY * __translationY) + (__perspectiveZ * __translationZ); + + + // apply rotation + if (unlikely(__quatX != 0.0f) || unlikely(__quatY != 0.0f) || unlikely(__quatZ != 0.0f)) + { + float xx = __quatX * __quatX; + float xy = __quatX * __quatY; + float xz = __quatX * __quatZ; + float xw = __quatX * __quatW; + float yy = __quatY * __quatY; + float yz = __quatY * __quatZ; + float yw = __quatY * __quatW; + float zz = __quatZ * __quatZ; + float zw = __quatZ * __quatW; + + // Construct a composite rotation matrix from the quaternion values + const float rotM[4][4] = { // WARNING: C++ array is row-major order ! + { 1 - 2 * (yy + zz), 2 * (xy - zw), 2 * (xz + yw), 0 }, + { 2 * (xy + zw), 1 - 2 * (xx + zz), 2 * (yz - xw), 0 }, + { 2 * (xz - yw), 2 * (yz + xw), 1 - 2 * (xx + yy), 0 }, + { 0, 0, 0, 1 } + }; + + if (__rotAnchorX != 0.0f || __rotAnchorY != 0.0f || __rotAnchorZ != 0.0f) + { + const FloatMatrix4& back = GetTranslationMatrix(-__rotAnchorX, -__rotAnchorY, -__rotAnchorZ); + const FloatMatrix4& move = GetTranslationMatrix(__rotAnchorX, __rotAnchorY, __rotAnchorZ); + FloatMatrix4 intm; + intm = back * FloatMatrix4(rotM); + intm = intm * move; + m = intm * m; + } + else + { + m = FloatMatrix4(rotM) * m; + } + } + + + // apply shear + + if (__shearYZ) + { + FloatMatrix4 sh; + sh.matrix[1][2] = __shearYZ; + m = sh * m; + } + + if (__shearXZ) + { + FloatMatrix4 sh; + sh.matrix[0][2] = __shearXZ; + m = sh * m; + } + + if (__shearXY) + { + FloatMatrix4 sh; + sh.matrix[0][1] = __shearXY; + m = sh * m; + } + + // apply scale + if (__scaleAnchorX != 0.0f || __scaleAnchorY != 0.0f || __scaleAnchorZ != 0.0f) + { + FloatMatrix4 sc; + _MatrixUtilScale(sc, __scaleX, __scaleY, __scaleZ); + + const FloatMatrix4& back = GetTranslationMatrix(-__scaleAnchorX, -__scaleAnchorY, -__scaleAnchorZ); + const FloatMatrix4& move = GetTranslationMatrix(__scaleAnchorX, __scaleAnchorY, __scaleAnchorZ); + FloatMatrix4 intm; + intm = back * sc; + intm = intm * move; + m = intm * m; + } + else + { + if (__scaleX != 1.0f) + { + m.matrix[0][0] = m.matrix[0][0] * __scaleX; + m.matrix[1][0] = m.matrix[1][0] * __scaleX; + m.matrix[2][0] = m.matrix[2][0] * __scaleX; + m.matrix[3][0] = m.matrix[3][0] * __scaleX; + } + + if (__scaleY != 1.0f) + { + m.matrix[0][1] = m.matrix[0][1] * __scaleY; + m.matrix[1][1] = m.matrix[1][1] * __scaleY; + m.matrix[2][1] = m.matrix[2][1] * __scaleY; + m.matrix[3][1] = m.matrix[3][1] * __scaleY; + } + + if (__scaleZ != 1.0f) + { + m.matrix[0][2] = m.matrix[0][2] * __scaleZ; + m.matrix[1][2] = m.matrix[1][2] * __scaleZ; + m.matrix[2][2] = m.matrix[2][2] * __scaleZ; + m.matrix[3][2] = m.matrix[3][2] * __scaleZ; + } + } + + m.Transpose(); + + return m; +} + +void +_TransformMatrix3Df::UpdateRotationFromEulerAngles(float x, float y, float z) +{ + // WARNING: + // Internal quaternion complies with left-hand system. + // + float hx = 0.5f * DEGTORAD(x); + float hy = 0.5f * DEGTORAD(y); + float hz = 0.5f * DEGTORAD(z); + float xcosh = cosf(hx); + float ycosh = cosf(hy); + float zcosh = cosf(hz); + float xsinh = sinf(hx); + float ysinh = sinf(hy); + float zsinh = sinf(hz); + + __quatW = zcosh * ycosh * xcosh + zsinh * ysinh * xsinh; + __quatX = zcosh * ycosh * xsinh - zsinh * ysinh * xcosh; + __quatY = zcosh * ysinh * xcosh + zsinh * ycosh * xsinh; + __quatZ = zsinh * ycosh * xcosh - zcosh * ysinh * xsinh; + + __rotX = x; + __rotY = y; + __rotZ = z; + + + __useRotation = (unlikely(!_FloatCompare(__quatX, 0.0f)) || unlikely(!_FloatCompare(__quatY, 0.0f)) || unlikely(!_FloatCompare(__quatZ, 0.0f)) || unlikely(!_FloatCompare(__quatW, 1.0f))); + UpdateMatrixType(false); +} + +void +_TransformMatrix3Df::GetEulerAngles(float& x, float& y, float& z) const +{ + x = __rotX; + y = __rotY; + z = __rotZ; +} + +void +_TransformMatrix3Df::GetQuaternion(float& x, float& y, float& z, float& w) const +{ + x = __quatX; + y = __quatY; + z = __quatZ; + w = __quatW; +} + +void +_TransformMatrix3Df::GetRotationAnchor(float& x, float& y, float& z) const +{ + x = __rotAnchorX; + y = __rotAnchorY; + z = __rotAnchorZ; +} + +void +_TransformMatrix3Df::SetRotationAnchor(float x, float y, float z) +{ + __rotAnchorX = x; + __rotAnchorY = y; + __rotAnchorZ = z; +} + +void +_TransformMatrix3Df::GetScaleFactors(float& x, float& y, float& z) const +{ + x = __scaleX; + y = __scaleY; + z = __scaleZ; +} + +void +_TransformMatrix3Df::SetScaleFactors(float x, float y, float z) +{ + __scaleX = x; + __scaleY = y; + __scaleZ = z; + + __useScale = (unlikely(!_FloatCompare(x, 1.0f)) || unlikely(!_FloatCompare(y, 1.0f)) || unlikely(!_FloatCompare(z, 1.0f))); + UpdateMatrixType(false); +} + +void +_TransformMatrix3Df::GetScaleAnchor(float& x, float& y, float& z) const +{ + x = __scaleAnchorX; + y = __scaleAnchorY; + z = __scaleAnchorZ; +} + +void +_TransformMatrix3Df::SetScaleAnchor(float x, float y, float z) +{ + __scaleAnchorX = x; + __scaleAnchorY = y; + __scaleAnchorZ = z; +} + +void +_TransformMatrix3Df::GetShearFactors(float& xy, float& xz, float& yz) const +{ + xy = __shearXY; + xz = __shearXZ; + yz = __shearYZ; +} + +void +_TransformMatrix3Df::SetShearFactors(float xy, float xz, float yz) +{ + __shearXY = xy; + __shearXZ = xz; + __shearYZ = yz; + + __useShear = (unlikely(!_FloatCompare(xy, 0.0f)) || unlikely(!_FloatCompare(xz, 0.0f)) || unlikely(!_FloatCompare(yz, 0.0f))); + UpdateMatrixType(false); +} + +void +_TransformMatrix3Df::GetTranslationFactors(float& x, float& y, float& z) const +{ + x = __translationX; + y = __translationY; + z = __translationZ; +} + +void +_TransformMatrix3Df::SetTranslationFactors(float x, float y, float z) +{ + __translationX = x; + __translationY = y; + __translationZ = z; + + __useTranslation = (unlikely(!_FloatCompare(x, 0.0f)) || unlikely(!_FloatCompare(y, 0.0f)) || unlikely(!_FloatCompare(z, 0.0f))); + UpdateMatrixType(false); +} + +void +_TransformMatrix3Df::GetPerspectiveFactors(float& x, float& y, float& z, float& w) const +{ + x = __perspectiveX; + y = __perspectiveY; + z = __perspectiveZ; + w = __perspectiveW; +} + +void +_TransformMatrix3Df::SetPerspectiveFactors(float x, float y, float z, float w) +{ + __perspectiveX = x; + __perspectiveY = y; + __perspectiveZ = z; + __perspectiveW = w; + + __usePerspective = (unlikely(!_FloatCompare(x, 0.0f)) || !unlikely(_FloatCompare(y, 0.0f)) || !unlikely(_FloatCompare(z, 0.0f)) || unlikely(!_FloatCompare(w, 1.0f))); + UpdateMatrixType(false); +} + +// Perform a spherical linear interpolation between the two +// passed quaternions with 0 <= t <= 1 +void +_TransformMatrix3Df::DoSlerp(float* result, const float* src1, const float* src2, float t) const +{ + float ax, ay, az, aw; + float bx, by, bz, bw; + float cx, cy, cz, cw; + float angle; + float th, invth, scale, invscale; + + if (unlikely(t == 0.0f)) + { + result[0] = src1[0]; + result[1] = src1[1]; + result[2] = src1[2]; + result[3] = src1[3]; + return; + } + + if (unlikely(t == 1.0f)) + { + result[0] = src2[0]; + result[1] = src2[1]; + result[2] = src2[2]; + result[3] = src2[3]; + return; + } + + + ax = src1[0]; ay = src1[1]; az = src1[2]; aw = src1[3]; + bx = src2[0]; by = src2[1]; bz = src2[2]; bw = src2[3]; + + angle = ax * bx + ay * by + az * bz + aw * bw; + + if (angle < 0.0f) + { + ax = -ax; ay = -ay; + az = -az; aw = -aw; + angle = -angle; + } + + if (angle + 1.0f > 0.05f) + { + if (1.0f - angle >= 0.05f) + { + th = acosf(angle); + invth = 1.0f / sinf(th); + scale = sinf(th * (1.0f - t)) * invth; + invscale = sinf(th * t) * invth; + } + else + { + scale = 1.0f - t; + invscale = t; + } + } + else + { + bx = -ay; + by = ax; + bz = -aw; + bw = az; + scale = sinf(M_PI * (0.5f - t)); + invscale = sinf(M_PI * t); + } + + cx = ax * scale + bx * invscale; + cy = ay * scale + by * invscale; + cz = az * scale + bz * invscale; + cw = aw * scale + bw * invscale; + + result[0] = cx; + result[1] = cy; + result[2] = cz; + result[3] = cw; +} + + +}}} // Tizen::Ui::Animations + + diff --git a/src/ui/animations/FUiAnim_VariantEx.cpp b/src/ui/animations/FUiAnim_VariantEx.cpp new file mode 100644 index 0000000..cdd622f --- /dev/null +++ b/src/ui/animations/FUiAnim_VariantEx.cpp @@ -0,0 +1,79 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_VariantEx.cpp + * @brief This file contains implementation of _VariantEx class + * + * This file contains implementation _VariantEx class. + */ + +#include "FUiAnim_VariantEx.h" +#include "FUiAnim_TransformMatrix3Df.h" + +using namespace Tizen::Ui; + +namespace Tizen { namespace Ui { namespace Animations { + +_VariantEx::_VariantEx(void) + : Variant() + , __transformMatrix() + , __isValidTransformMatrix(false) +{ +} + +_VariantEx::_VariantEx(const Variant& v) + : Variant(v) + , __transformMatrix() + , __isValidTransformMatrix(false) +{ + UpdateVariant(v); +} + +_VariantEx::~_VariantEx(void) +{ +} + +void +_VariantEx::UpdateVariant(const Variant& v) +{ + Variant::operator= (v); + + __isValidTransformMatrix = false; + + if (v.GetType() == VARIANT_TYPE_FLOAT_MATRIX4) + __isValidTransformMatrix = __transformMatrix.SetTransformMatrix(v.ToFloatMatrix4()); + + if (!__isValidTransformMatrix) + __transformMatrix.Clear(); +} + +bool +_VariantEx::IsValidTransformMatrix(void) const +{ + return __isValidTransformMatrix; +} + +const _TransformMatrix3Df& +_VariantEx::GetTransformMatrix(void) const +{ + return __transformMatrix; +} + +}}} // Tizen::Ui::Animations + + diff --git a/src/ui/animations/FUiAnim_VariantEx.h b/src/ui/animations/FUiAnim_VariantEx.h new file mode 100644 index 0000000..d45d73c --- /dev/null +++ b/src/ui/animations/FUiAnim_VariantEx.h @@ -0,0 +1,79 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_VariantEx.h + * @brief Header file of _VariantEx class + * + * This file contains declarations _VariantEx class. + */ + +#ifndef _FUI_ANIM_INTERNAL_VARIANTEX_H_ +#define _FUI_ANIM_INTERNAL_VARIANTEX_H_ + +#include +#include +#include "FUiAnim_TransformMatrix3Df.h" + +namespace Tizen { namespace Ui { namespace Animations { + +class _VariantEx : + public Tizen::Ui::Variant +{ +public: + _VariantEx(void); + _VariantEx(const Variant& v); + virtual ~_VariantEx(void); + +public: + bool IsValidTransformMatrix(void) const; + const _TransformMatrix3Df& GetTransformMatrix(void) const; + +#if 0 + _VariantEx& operator= (const Variant& v) + { + if (&v != this) + UpdateVariant(v); + + return *this; + } +#endif + + _VariantEx& operator= (const _VariantEx& v) + { + if (&v != this) + { + __transformMatrix = v.__transformMatrix; + __isValidTransformMatrix = v.__isValidTransformMatrix; + + Variant::operator= (v); + } + + return *this; + } + +private: + void UpdateVariant(const Variant& v); + + _TransformMatrix3Df __transformMatrix; + bool __isValidTransformMatrix; +}; // _VariantEx + +}}} // Tizen::Ui::Animations + +#endif // _FUI_ANIM_INTERNAL_VARIANTEX_H_ + diff --git a/src/ui/animations/FUiAnim_VisualElement.cpp b/src/ui/animations/FUiAnim_VisualElement.cpp new file mode 100644 index 0000000..0fa4344 --- /dev/null +++ b/src/ui/animations/FUiAnim_VisualElement.cpp @@ -0,0 +1,224 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_VisualElement.cpp + * @brief This file contains implementation of _VisualElement class + * + * This file contains implementation _VisualElement class. + */ + +#include + +#include "FUiAnim_EflNode.h" +#include "FUiAnim_VisualElement.h" +#include "FUiAnim_VisualElementImpl.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Animations +{ + + +//IMPLEMENT_PROPERTY(_VisualElement); + +_VisualElement::_VisualElement(void) + : __pUserData(null) +{ + +} + +_VisualElement::~_VisualElement(void) +{ +} + +VisualElement* +_VisualElement::CloneN(void) const +{ + return new (std::nothrow) _VisualElement(*this); +} + +_VisualElement::_VisualElement(const _VisualElement& rhs) + : VisualElement(rhs) + , __pUserData(null) +{ +} + +_Colorf +_VisualElement::GetBackgroundColor(void) const +{ + _EflNode* pNativeNode = dynamic_cast< _EflNode* >(_pVisualElementImpl->GetNativeNode()); + + SysTryReturn(NID_UI, pNativeNode, _Colorf(0.0f, 0.0f, 0.0f, 1.0f), E_INVALID_STATE, "[E_INVALID_STATE] No object for background."); // CHECKME: Default BG? + + return pNativeNode->GetBackgroundColor(); +} + +result +_VisualElement::SetBackgroundColor(const _Colorf& color) +{ + result r = E_SUCCESS; + _EflNode* pNativeNode = dynamic_cast< _EflNode* >(_pVisualElementImpl->GetNativeNode()); + + SysTryReturnResult(NID_UI, pNativeNode, E_INVALID_STATE, "No object for background."); // CHECKME: Default BG? + + r = pNativeNode->SetBackgroundColor(color); + if (_pVisualElementImpl->GetPresentation()) (_pVisualElementImpl->GetPresentation())->InvalidateHierarchyProps((int)_VisualElementImpl::HIERARCHY_PROPERTY_NATIVENODE, false, false); + + return r; +} + +FloatRectangle +_VisualElement::GetBoundingBox(void) +{ + return _pVisualElementImpl->GetBoundingBox(); +} + +result +_VisualElement::SetZOrder(const VisualElement* pReference, bool above) +{ + const _VisualElementImpl* pImpl = null; + if (pReference) + { + pImpl = _VisualElementImpl::GetInstance(*pReference); + } + + return _pVisualElementImpl->SetZOrder(pImpl , above); +} + +result +_VisualElement::SetImageSource(const String& fileName) +{ + return _pVisualElementImpl->SetImageSource(fileName); +} + +String +_VisualElement::GetImageSource(void) const +{ + return _pVisualElementImpl->GetImageSource(); +} + +result +_VisualElement::SetContentOpacity(float contentOpacity) +{ + return _pVisualElementImpl->SetContentOpacity(contentOpacity); +} + +result +_VisualElement::Capture(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& boundsToDraw, bool withChilren) +{ + FloatRectangle captureBounds(0,0, boundsToDraw.width, boundsToDraw.height); + return _pVisualElementImpl->Capture(canvas, boundsToDraw, captureBounds, withChilren); +} + +_INativeNode* +_VisualElement::GetNativeNode(void) const +{ + return _pVisualElementImpl->GetNativeNode(); +} + +_VisualElement* _VisualElement::GetPresentation(void) +{ + return dynamic_cast< _VisualElement* >(_pVisualElementImpl->__pPresentation->__pPublicInstance); +} + +_VisualElement* _VisualElement::GetModel(void) +{ + return dynamic_cast< _VisualElement* >(_pVisualElementImpl->__pPresentation->__pPublicInstance); +} + +void +_VisualElement::SetControlUserData(void* pUserData) +{ + ClearLastResult(); + __pUserData = pUserData; +} + +void* +_VisualElement::GetControlUserData(void) const +{ + ClearLastResult(); + return __pUserData; +} + + +bool +_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) +{ + return _pVisualElementImpl->SetClipToParent(clipToParent); +} + +result +_VisualElement::SetBackBufferEnabled(bool enable) +{ + return _pVisualElementImpl->SetBackBufferEnabled(enable); +} + +result +_VisualElement::SetSurfaceOpaque(bool isSurfaceOpaque) +{ + return _pVisualElementImpl->SetSurfaceOpaque(isSurfaceOpaque); +} + +result +_VisualElement::ScrollByPoint(const FloatPoint& pointOffset, bool scrollSelf) +{ + return _pVisualElementImpl->ScrollByPoint(pointOffset, scrollSelf); +} + +IVisualElementAnimationProvider* +_VisualElement::GetAnimationProvider(void) const +{ + return _pVisualElementImpl->GetAnimationProvider(); +} + +IVisualElementContentProvider* +_VisualElement::GetContentProvider(void) const +{ + return _pVisualElementImpl->GetContentProvider(); +} + + +IVisualElementEventListener* +_VisualElement::GetVisualElementEventListener(void) const +{ + return _pVisualElementImpl->GetVisualElementEventListener(); +} + + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnim_VisualElementAnimationGroupImpl.cpp b/src/ui/animations/FUiAnim_VisualElementAnimationGroupImpl.cpp new file mode 100644 index 0000000..0c6d946 --- /dev/null +++ b/src/ui/animations/FUiAnim_VisualElementAnimationGroupImpl.cpp @@ -0,0 +1,198 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_VisualElementAnimationGroupImpl.cpp + * @brief This file contains implementation of _VisualElementAnimationGroupImpl class + * + * This file contains implementation _VisualElementAnimationGroupImpl class. + */ + +#include + +#include +#include + +#include "FUiAnim_VisualElementAnimationGroupImpl.h" + +namespace Tizen { namespace Ui { namespace Animations +{ + + +_VisualElementAnimationGroupImpl::_VisualElementAnimationGroupImpl(void) + : __animationList(Tizen::Base::Collection::SingleObjectDeleter) +{ + result r = __animationList.Construct(); + + SysTryReturnVoidResult(NID_UI_ANIM, r == E_SUCCESS, r, "[%s] Failed to construct the animation list.", GetErrorMessage(r)); +} + +_VisualElementAnimationGroupImpl::_VisualElementAnimationGroupImpl(const _VisualElementAnimationGroupImpl& animationGroupImpl) + : __animationList(Tizen::Base::Collection::SingleObjectDeleter) +{ + __animationList.Construct(); + + result r = CopyAnimationValue(animationGroupImpl); + + SysTryReturnVoidResult(NID_UI_ANIM, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +_VisualElementAnimationGroupImpl::~_VisualElementAnimationGroupImpl(void) +{ + __animationList.RemoveAll(true); +} + +bool +_VisualElementAnimationGroupImpl::Equals(const Tizen::Base::Object& obj) const +{ + if (this == &obj) + { + return true; + } + + if (_VisualElementAnimationImpl::Equals(obj) == false) + { + return false; + } + + const _VisualElementAnimationGroupImpl* pAnimationGroupImpl = dynamic_cast< const _VisualElementAnimationGroupImpl* >(&obj); + + if (pAnimationGroupImpl == null || GetAnimationCount() != pAnimationGroupImpl->GetAnimationCount()) + { + return false; + } + + for (int index = 0; index < GetAnimationCount(); index++) + { + if ((__animationList.GetAt(index))->Equals(*(pAnimationGroupImpl->__animationList.GetAt(index))) == false) + { + return false; + } + } + + return true; +} + +int +_VisualElementAnimationGroupImpl::GetHashCode(void) const +{ + return (_VisualElementAnimationImpl::GetHashCode() + __animationList.GetHashCode()); +} + +result +_VisualElementAnimationGroupImpl::CopyAnimationValue(const _VisualElementAnimationGroupImpl& animationGroupImpl) +{ + result r = E_SUCCESS; + + r = _VisualElementAnimationImpl::CopyAnimationValue(animationGroupImpl); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), r, "Propagating."); + + const VisualElementAnimation* pAnimation = null; + VisualElementAnimation* pCloned = null; + + for (int index = 0; index < animationGroupImpl.GetAnimationCount(); index++) + { + pAnimation = dynamic_cast< const VisualElementAnimation* >(animationGroupImpl.__animationList.GetAt(index)); + + if (pAnimation != null) + { + pCloned = const_cast< VisualElementAnimation* >(pAnimation)->CloneN(); + + if (pCloned == null) + { + __animationList.RemoveAll(true); + + SysLogException(NID_UI_ANIM, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + return E_OUT_OF_MEMORY; + } + + __animationList.Add(*pCloned); + } + } + + return E_SUCCESS; +} + +int +_VisualElementAnimationGroupImpl::GetAnimationCount(void) const +{ + return __animationList.GetCount(); +} + +result +_VisualElementAnimationGroupImpl::AddAnimation(const VisualElementAnimation& animation) +{ + VisualElementAnimation* pCloned = const_cast< VisualElementAnimation& >(animation).CloneN(); + SysTryReturnResult(NID_UI_ANIM, pCloned != null, E_OUT_OF_MEMORY, "Memory allocation failed."); + + result r = __animationList.Add(*pCloned); + + if (r != E_SUCCESS) + { + delete pCloned; + } + + return r; +} + +result +_VisualElementAnimationGroupImpl::RemoveAnimationAt(int index) +{ + return __animationList.RemoveAt(index); +} + +void +_VisualElementAnimationGroupImpl::RemoveAllAnimations(void) +{ + __animationList.RemoveAll(true); +} + +VisualElementAnimation* +_VisualElementAnimationGroupImpl::GetAnimationAtN(int index) const +{ + const VisualElementAnimation* pAnimation = dynamic_cast< const VisualElementAnimation* >(__animationList.GetAt(index)); + + if (pAnimation) + { + SetLastResult(E_SUCCESS); + return const_cast< VisualElementAnimation* >(pAnimation)->CloneN(); + } + + SetLastResult(E_OBJ_NOT_FOUND); + return null; +} + +VisualElementAnimation* +_VisualElementAnimationGroupImpl::GetAnimation(int index) const +{ + return dynamic_cast< VisualElementAnimation* >(const_cast< Tizen::Base::Object* >(__animationList.GetAt(index))); +} + +_VisualElementAnimationGroupImpl* +_VisualElementAnimationGroupImpl::GetInstance(VisualElementAnimationGroup& animation) +{ + return dynamic_cast<_VisualElementAnimationGroupImpl*>(animation._pAnimationImpl); +} + +const _VisualElementAnimationGroupImpl* +_VisualElementAnimationGroupImpl::GetInstance(const VisualElementAnimationGroup& animation) +{ + return dynamic_cast(animation._pAnimationImpl); +} + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnim_VisualElementAnimationGroupImpl.h b/src/ui/animations/FUiAnim_VisualElementAnimationGroupImpl.h new file mode 100644 index 0000000..731055e --- /dev/null +++ b/src/ui/animations/FUiAnim_VisualElementAnimationGroupImpl.h @@ -0,0 +1,77 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_VisualElementAnimationGroupImpl.h + * @brief This is the header file for the _VisualElementAnimationGroupImpl class. + * + * This header file contains the declarations of the _VisualElementAnimationGroupImpl class. + */ + +#ifndef _FUI_ANIM_INTERNAL_VISUAL_ELEMENT_ANIMATION_GROUP_IMPL_H_ +#define _FUI_ANIM_INTERNAL_VISUAL_ELEMENT_ANIMATION_GROUP_IMPL_H_ + +#include +#include +#include + +#include "FUiAnim_VisualElementAnimationImpl.h" + + +namespace Tizen { namespace Ui { namespace Animations +{ + + +class VisualElementAnimation; +class VisualElementAnimationGroup; + +class _VisualElementAnimationGroupImpl + : public _VisualElementAnimationImpl +{ +public: + _VisualElementAnimationGroupImpl(void); + _VisualElementAnimationGroupImpl(const _VisualElementAnimationGroupImpl& animationImpl); + virtual ~_VisualElementAnimationGroupImpl(void); + + virtual bool Equals(const Tizen::Base::Object& obj) const; + virtual int GetHashCode(void) const; + + result CopyAnimationValue(const _VisualElementAnimationGroupImpl& animationGroupImpl); + + int GetAnimationCount(void) const; + result AddAnimation(const VisualElementAnimation& animation); + result RemoveAnimationAt(int index); + void RemoveAllAnimations(void); + VisualElementAnimation* GetAnimationAtN(int index) const; + + // for internal + VisualElementAnimation* GetAnimation(int index) const; + + static _VisualElementAnimationGroupImpl* GetInstance(VisualElementAnimationGroup& pAnimation); + static const _VisualElementAnimationGroupImpl* GetInstance(const VisualElementAnimationGroup& pAnimation); + +private: + _VisualElementAnimationGroupImpl& operator =(const _VisualElementAnimationGroupImpl& rhs); + +private: + Tizen::Base::Collection::ArrayList __animationList; +}; // _VisualElementAnimationGroupImpl + + +}}} // Tizen::Ui::Animations + +#endif // _FUI_ANIM_INTERNAL_VISUAL_ELEMENT_ANIMATION_GROUP_IMPL_H_ diff --git a/src/ui/animations/FUiAnim_VisualElementAnimationImpl.cpp b/src/ui/animations/FUiAnim_VisualElementAnimationImpl.cpp new file mode 100644 index 0000000..e8e8145 --- /dev/null +++ b/src/ui/animations/FUiAnim_VisualElementAnimationImpl.cpp @@ -0,0 +1,213 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_VisualElementAnimationImpl.cpp + * @brief This file contains implementation of _VisualElementAnimationImpl class + * + * This file contains implementation _VisualElementAnimationImpl class. + */ + +#include + +#include +#include +#include +#include + +#include "FUiAnim_VisualElementAnimationImpl.h" +#include "FUiAnim_AnimationManager.h" +#include "FUiAnim_TransactionNode.h" + +namespace Tizen { namespace Ui { namespace Animations +{ + + +_VisualElementAnimationImpl::_VisualElementAnimationImpl(void) + : __pStatusListener(null) + , __pTimingFunction(null) + , __pInterpolator(null) + , __pUserData(null) + , __pEventTarget(null) +{ + _TransactionNode* pNode = null; + _AnimationManager* pAnimationManager = _AnimationManager::GetInstance(); + if (pAnimationManager) + { + pNode = pAnimationManager->GetCurrentTransaction(false); + } + + if (pNode) + { + result r = CopyAnimationValue(*pNode); + + SysTryReturnVoidResult(NID_UI_ANIM, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } +} + +_VisualElementAnimationImpl::_VisualElementAnimationImpl(const _VisualElementAnimationImpl& animationImpl) + : __pStatusListener(null) + , __pTimingFunction(null) + , __pInterpolator(null) + , __pUserData(null) + , __pEventTarget(null) +{ + result r = CopyAnimationValue(animationImpl); + + SysTryReturnVoidResult(NID_UI_ANIM, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +_VisualElementAnimationImpl::~_VisualElementAnimationImpl(void) +{ + +} + +bool +_VisualElementAnimationImpl::Equals(const Tizen::Base::Object& obj) const +{ + if (this == &obj) + { + return true; + } + + const _VisualElementAnimationImpl* pAnimationImpl = dynamic_cast< const _VisualElementAnimationImpl* >(&obj); + + if (pAnimationImpl == null) + { + return false; + } + + return ((GetDuration() == pAnimationImpl->GetDuration()) + && (GetDelay() == pAnimationImpl->GetDelay()) + && (GetOffset() == pAnimationImpl->GetOffset()) + && (GetRepeatCount() == pAnimationImpl->GetRepeatCount()) + && (GetScaleRatio() == pAnimationImpl->GetScaleRatio()) + && (IsAutoReverseEnabled() == pAnimationImpl->IsAutoReverseEnabled()) + && (__pStatusListener == pAnimationImpl->__pStatusListener) + && (__pTimingFunction == pAnimationImpl->__pTimingFunction) + && (__pInterpolator == pAnimationImpl->__pInterpolator) + && (__pUserData == pAnimationImpl->__pUserData)); +} + +int +_VisualElementAnimationImpl::GetHashCode(void) const +{ + return (GetDuration() + GetOffset() + GetDelay() + GetRepeatCount() + GetScaleRatio() + IsAutoReverseEnabled()); +} + +result +_VisualElementAnimationImpl::CopyAnimationValue(const _VisualElementAnimationImpl& animationImpl) +{ + SetDuration(animationImpl.GetDuration()); + SetDelay(animationImpl.GetDelay()); + SetOffset(animationImpl.GetOffset()); + SetRepeatCount(animationImpl.GetRepeatCount()); + SetScaleRatio(animationImpl.GetScaleRatio()); + SetAutoReverseEnabled(animationImpl.IsAutoReverseEnabled()); + + __pStatusListener = animationImpl.__pStatusListener; + __pTimingFunction = animationImpl.__pTimingFunction; + __pInterpolator = animationImpl.__pInterpolator; + __pUserData = animationImpl.__pUserData; + __pEventTarget = animationImpl.__pEventTarget; + + return E_SUCCESS; +} + +bool +_VisualElementAnimationImpl::IsAnimationSupported(void) +{ + static bool isAnimationSupported = true; + + return isAnimationSupported; +} + +void +_VisualElementAnimationImpl::SetStatusEventListener(IVisualElementAnimationStatusEventListener* pListener) +{ + __pStatusListener = pListener; +} + +IVisualElementAnimationStatusEventListener* +_VisualElementAnimationImpl::GetStatusEventListener(void) const +{ + return __pStatusListener; +} + +void +_VisualElementAnimationImpl::SetTimingFunction(const IVisualElementAnimationTimingFunction* pTimingFunction) +{ + __pTimingFunction = pTimingFunction; +} + +const IVisualElementAnimationTimingFunction* +_VisualElementAnimationImpl::GetTimingFunction(void) const +{ + return __pTimingFunction; +} + +void +_VisualElementAnimationImpl::SetValueInterpolator(const IVisualElementAnimationValueInterpolator* pInterpolator) +{ + __pInterpolator = pInterpolator; +} + +const IVisualElementAnimationValueInterpolator* +_VisualElementAnimationImpl::GetValueInterpolator(void) const +{ + return __pInterpolator; +} + +void +_VisualElementAnimationImpl::SetUserData(void* pUserData) +{ + __pUserData = pUserData; +} + +void* +_VisualElementAnimationImpl::GetUserData(void) const +{ + return __pUserData; +} + +void +_VisualElementAnimationImpl::SetEventTarget(VisualElement& target) +{ + __pEventTarget = ⌖ +} + +VisualElement& +_VisualElementAnimationImpl::GetEventTarget(void) const +{ + return *__pEventTarget; +} + +_VisualElementAnimationImpl* +_VisualElementAnimationImpl::GetInstance(VisualElementAnimation& animation) +{ + return animation._pAnimationImpl; +} + +const _VisualElementAnimationImpl* +_VisualElementAnimationImpl::GetInstance(const VisualElementAnimation& animation) +{ + return static_cast(animation._pAnimationImpl); +} + + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnim_VisualElementAnimationImpl.h b/src/ui/animations/FUiAnim_VisualElementAnimationImpl.h new file mode 100644 index 0000000..e1ffc5b --- /dev/null +++ b/src/ui/animations/FUiAnim_VisualElementAnimationImpl.h @@ -0,0 +1,91 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_VisualElementAnimationImpl.h + * @brief This is the header file for the _VisualElementAnimationImpl class. + * + * This header file contains the declarations of the _VisualElementAnimationImpl class. + */ + +#ifndef _FUI_ANIM_INTERNAL_VISUAL_ELEMENT_ANIMATION_IMPL_H_ +#define _FUI_ANIM_INTERNAL_VISUAL_ELEMENT_ANIMATION_IMPL_H_ + +#include +#include +#include + +#include "FUiAnim_VisualElementAnimationTiming.h" + + +namespace Tizen { namespace Ui { namespace Animations +{ + +class VisualElement; +class IVisualElementAnimationStatusEventListener; +class IVisualElementAnimationTimingFunction; +class IVisualElementAnimationValueInterpolator; +class VisualElementAnimation; + +class _VisualElementAnimationImpl + : public _VisualElementAnimationTiming +{ +public: + _VisualElementAnimationImpl(void); + _VisualElementAnimationImpl(const _VisualElementAnimationImpl& animationImpl); + virtual ~_VisualElementAnimationImpl(void); + + virtual bool Equals(const Tizen::Base::Object& obj) const; + virtual int GetHashCode(void) const; + + result CopyAnimationValue(const _VisualElementAnimationImpl& animationImpl); + + void SetStatusEventListener(IVisualElementAnimationStatusEventListener* pListener); + IVisualElementAnimationStatusEventListener* GetStatusEventListener(void) const; + + void SetTimingFunction(const IVisualElementAnimationTimingFunction* pTimingFunction); + const IVisualElementAnimationTimingFunction* GetTimingFunction(void) const; + + void SetValueInterpolator(const IVisualElementAnimationValueInterpolator* pInterpolator); + const IVisualElementAnimationValueInterpolator* GetValueInterpolator(void) const; + + void SetUserData(void* pUserData); + void* GetUserData(void) const; + + void SetEventTarget(VisualElement& target); + VisualElement& GetEventTarget(void) const; + + static bool IsAnimationSupported(void); + + static _VisualElementAnimationImpl* GetInstance(VisualElementAnimation& animation); + static const _VisualElementAnimationImpl* GetInstance(const VisualElementAnimation& animation); + +private: + _VisualElementAnimationImpl& operator =(const _VisualElementAnimationImpl& rhs); + +private: + IVisualElementAnimationStatusEventListener* __pStatusListener; + const IVisualElementAnimationTimingFunction* __pTimingFunction; + const IVisualElementAnimationValueInterpolator* __pInterpolator; + void* __pUserData; + VisualElement* __pEventTarget; +}; // _VisualElementAnimationImpl + + +}}} // Tizen::Ui::Animations + +#endif // _FUI_ANIM_INTERNAL_VISUAL_ELEMENT_ANIMATION_IMPL_H_ diff --git a/src/ui/animations/FUiAnim_VisualElementAnimationKeyFrame.cpp b/src/ui/animations/FUiAnim_VisualElementAnimationKeyFrame.cpp new file mode 100644 index 0000000..fb0cd85 --- /dev/null +++ b/src/ui/animations/FUiAnim_VisualElementAnimationKeyFrame.cpp @@ -0,0 +1,242 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_VisualElementAnimationKeyFrame.cpp + * @brief This file contains implementation of _VisualElementAnimationKeyFrame class + * + * This file contains implementation _VisualElementAnimationKeyFrame class. + */ + +#include +#include + +#include "FUi_Math.h" +#include "FUiAnim_VariantEx.h" +#include "FUiAnim_VisualElementAnimationKeyFrame.h" + +namespace Tizen { namespace Ui { namespace Animations +{ + +class _KeyFrameComparer + : public Tizen::Base::Collection::IComparer +{ +public: + _KeyFrameComparer(void) + { + } + + virtual ~_KeyFrameComparer(void) + { + } + + virtual result Compare(const Tizen::Base::Object& obj1, const Tizen::Base::Object& obj2, int& cmp) const + { + const _VisualElementAnimationKeyFrameInfo* pInfo1 = dynamic_cast (&obj1); + const _VisualElementAnimationKeyFrameInfo* pInfo2 = dynamic_cast (&obj2); + + SysTryReturnResult(NID_BASE, (pInfo1 != null && pInfo2 != null), E_INVALID_ARG, "Invalid argument(s) is used. Both of the obj1 and obj2 MUST be _VisualElementAnimationKeyFrameInfo."); + + cmp = Tizen::Base::Float::Compare(pInfo1->GetTime(), pInfo2->GetTime()); + + return E_SUCCESS; + } +}; + +_VisualElementAnimationKeyFrameInfo::_VisualElementAnimationKeyFrameInfo(float time, const Variant& value, const IVisualElementAnimationTimingFunction* pTimingFunction) + : __time(time) + , __value(value) + , __valueEx(value) + , __pTimingFunction(pTimingFunction) +{ +} + +_VisualElementAnimationKeyFrameInfo::~_VisualElementAnimationKeyFrameInfo(void) +{ +} + +bool +_VisualElementAnimationKeyFrameInfo::Equals(const Tizen::Base::Object& obj) const +{ + const _VisualElementAnimationKeyFrameInfo* pKeyFrameInfo = dynamic_cast< const _VisualElementAnimationKeyFrameInfo* >(&obj); + + if (pKeyFrameInfo == null) + { + return false; + } + + return ( + (_FloatCompare(__time, pKeyFrameInfo->__time)) + && (__valueEx == pKeyFrameInfo->__valueEx) + && (__pTimingFunction == pKeyFrameInfo->__pTimingFunction) + ); +} + +float +_VisualElementAnimationKeyFrameInfo::GetTime(void) const +{ + return __time; +} + +Variant +_VisualElementAnimationKeyFrameInfo::GetValue(void) const +{ + return __value; +} + +_VariantEx +_VisualElementAnimationKeyFrameInfo::GetValueEx(void) const +{ + return __valueEx; +} + +const IVisualElementAnimationTimingFunction* +_VisualElementAnimationKeyFrameInfo::GetTimingFunction(void) const +{ + return __pTimingFunction; +} + +_VisualElementAnimationKeyFrame::_VisualElementAnimationKeyFrame(void) +{ + __keyFrameList.Construct(); +} + +_VisualElementAnimationKeyFrame::~_VisualElementAnimationKeyFrame(void) +{ + __keyFrameList.RemoveAll(true); +} + +bool +_VisualElementAnimationKeyFrame::Equals(const Tizen::Base::Object& obj) const +{ + const _VisualElementAnimationKeyFrame* pKeyFrame = dynamic_cast< const _VisualElementAnimationKeyFrame* >(&obj); + + if (pKeyFrame == null) + { + return false; + } + + return __keyFrameList.Equals(pKeyFrame->__keyFrameList); +} + +_VisualElementAnimationKeyFrame* +_VisualElementAnimationKeyFrame::CloneN(void) const +{ + int i = 0; + int count = __keyFrameList.GetCount(); + SysAssertf(count > 0, "The count of key frames is 0."); + + _VisualElementAnimationKeyFrame* pCloned = new (std::nothrow) _VisualElementAnimationKeyFrame(); + SysTryReturn(NID_UI_ANIM, pCloned, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + const _VisualElementAnimationKeyFrameInfo* pInfo = null; + + for (i = 0; i < count; i++) + { + pInfo = static_cast< const _VisualElementAnimationKeyFrameInfo* >(__keyFrameList.GetAt(i)); + SysAssertf(pInfo != null, "Key frame is null. index = %d", i); + + if (pCloned->AddKeyFrame(pInfo->GetTime(), pInfo->GetValue(), pInfo->GetTimingFunction()) != E_SUCCESS) + { + delete pCloned; + return null; + } + } + + return pCloned; +} + +int +_VisualElementAnimationKeyFrame::GetCount(void) const +{ + return __keyFrameList.GetCount(); +} + +result +_VisualElementAnimationKeyFrame::AddKeyFrame(float time, const Variant& value, const IVisualElementAnimationTimingFunction* pTimingFunction) +{ + _VisualElementAnimationKeyFrameInfo* pInfo = new (std::nothrow) _VisualElementAnimationKeyFrameInfo(time, value, pTimingFunction); + SysTryReturnResult(NID_UI_ANIM, pInfo, E_OUT_OF_MEMORY, "Memory allocation failed."); + + int index = GetKeyFrameIndex(time); + + if (index >= 0) + { + __keyFrameList.SetAt(*pInfo, index, true); + } + else + { + __keyFrameList.Add(*pInfo); + } + + _KeyFrameComparer comparer; + + __keyFrameList.Sort(comparer); + + return E_SUCCESS; +} + +result +_VisualElementAnimationKeyFrame::RemoveKeyFrame(float time) +{ + int index = GetKeyFrameIndex(time); + SysTryReturnResult(NID_UI_ANIM, index >= 0, E_OBJ_NOT_FOUND, "Key frame is not found. time = %f", time); + + return __keyFrameList.RemoveAt(index, true); +} + +void +_VisualElementAnimationKeyFrame::RemoveAllKeyFrames(void) +{ + __keyFrameList.RemoveAll(true); +} + +_VisualElementAnimationKeyFrameInfo* +_VisualElementAnimationKeyFrame::GetKeyFrameInfoAt(int index) const +{ + SysTryReturn(NID_UI_ANIM, index >= 0, null, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] Key frame is not found. index = %d"); + + return static_cast< _VisualElementAnimationKeyFrameInfo* >(const_cast< Tizen::Base::Object* >(__keyFrameList.GetAt(index))); +} + +int +_VisualElementAnimationKeyFrame::GetKeyFrameIndex(float time) const +{ + int i = 0; + int index = -1; + int count = 0; + + count = __keyFrameList.GetCount(); + + const _VisualElementAnimationKeyFrameInfo* pInfo = null; + for (i = 0; i < count ; i++) + { + pInfo = static_cast< const _VisualElementAnimationKeyFrameInfo* >(__keyFrameList.GetAt(i)); + SysAssertf(pInfo != null, "Key frame is null."); + + if (_FloatCompare(time, pInfo->GetTime())) + { + index = i; + break; + } + } + + return index; +} + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnim_VisualElementAnimationKeyFrame.h b/src/ui/animations/FUiAnim_VisualElementAnimationKeyFrame.h new file mode 100644 index 0000000..d471e15 --- /dev/null +++ b/src/ui/animations/FUiAnim_VisualElementAnimationKeyFrame.h @@ -0,0 +1,104 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_VisualElementAnimationKeyFrame.h + * @brief This is the header file for the _VisualElementAnimationKeyFrame class. + * + * This header file contains the declarations of the _VisualElementAnimationKeyFrame class. + */ + +#ifndef _FUI_ANIM_INTERNAL_VISUAL_ELEMENT_ANIMATION_KEY_FRAME_H_ +#define _FUI_ANIM_INTERNAL_VISUAL_ELEMENT_ANIMATION_KEY_FRAME_H_ + +#include +#include +#include +#include + +#include "FUiAnim_VariantEx.h" + + +namespace Tizen { namespace Ui { namespace Animations +{ + +class VisualElementAnimation; + +class _VisualElementAnimationKeyFrameInfo + : public Tizen::Base::Object +{ +public: + _VisualElementAnimationKeyFrameInfo(float time, const Variant& value, const IVisualElementAnimationTimingFunction* pTimingFunction); + virtual ~_VisualElementAnimationKeyFrameInfo(void); + virtual bool Equals(const Tizen::Base::Object& obj) const; + + float GetTime(void) const; + Variant GetValue(void) const; + _VariantEx GetValueEx(void) const; + const IVisualElementAnimationTimingFunction* GetTimingFunction(void) const; + +private: + _VisualElementAnimationKeyFrameInfo(void); + _VisualElementAnimationKeyFrameInfo& operator= (const _VisualElementAnimationKeyFrameInfo&); + +private: + float __time; + Variant __value; + _VariantEx __valueEx; + const IVisualElementAnimationTimingFunction* __pTimingFunction; +}; // _VisualElementAnimationKeyFrameInfo + +/** + * @class _VisualElementAnimationKeyFrame + * @brief This is the header file for the _VisualElementAnimationKeyFrame class + * @since 2.0 + * + * This header file contains the declarations of the _VisualElementAnimationKeyFrame class. + */ + +class _VisualElementAnimationKeyFrame + : public Tizen::Base::Object +{ +public: + _VisualElementAnimationKeyFrame(void); + virtual ~_VisualElementAnimationKeyFrame(void); + virtual bool Equals(const Tizen::Base::Object& obj) const; + + _VisualElementAnimationKeyFrame* CloneN(void) const; + + int GetCount(void) const; + + result AddKeyFrame(float time, const Tizen::Ui::Variant& value, const IVisualElementAnimationTimingFunction* pTimingFunction); + result RemoveKeyFrame(float time); + void RemoveAllKeyFrames(void); + _VisualElementAnimationKeyFrameInfo* GetKeyFrameInfoAt(int index) const; + +private: + _VisualElementAnimationKeyFrame(const _VisualElementAnimationKeyFrame& rhs); + _VisualElementAnimationKeyFrame& operator =(const _VisualElementAnimationKeyFrame& rhs); + + int GetKeyFrameIndex(float time) const; + +private: + Tizen::Base::Collection::ArrayList __keyFrameList; +}; // _VisualElementAnimationKeyFrame + + +}}} // Tizen::Ui::Animations + +#endif // _FUI_ANIM_INTERNAL_VISUAL_ELEMENT_ANIMATION_KEY_FRAME_H_ + diff --git a/src/ui/animations/FUiAnim_VisualElementAnimationTiming.cpp b/src/ui/animations/FUiAnim_VisualElementAnimationTiming.cpp new file mode 100644 index 0000000..668fddb --- /dev/null +++ b/src/ui/animations/FUiAnim_VisualElementAnimationTiming.cpp @@ -0,0 +1,133 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_VisualElementAnimationTiming.cpp + * @brief This file contains implementation of _VisualElementAnimationTiming class + * + * This file contains implementation _VisualElementAnimationTiming class. + */ + +#include +#include + +#include "FUiAnim_VisualElementAnimationTiming.h" + +namespace Tizen { namespace Ui { namespace Animations +{ + +_VisualElementAnimationTiming::_VisualElementAnimationTiming(void) + : __duration(250) + , __offset(0) + , __delay(0) + , __repeatCount(1) + , __scale(1.0f) + , __autoReverse(false) +{ + +} + +_VisualElementAnimationTiming::_VisualElementAnimationTiming(const _VisualElementAnimationTiming& rhs) + : __duration(rhs.__duration) + , __offset(rhs.__offset) + , __delay(rhs.__delay) + , __repeatCount(rhs.__repeatCount) + , __scale(rhs.__scale) + , __autoReverse(rhs.__autoReverse) +{ + +} + +_VisualElementAnimationTiming::~_VisualElementAnimationTiming(void) +{ + +} + +long +_VisualElementAnimationTiming::GetDuration(void) const +{ + return __duration; +} + +void +_VisualElementAnimationTiming::SetDuration(long duration) +{ + __duration = duration; +} + +long +_VisualElementAnimationTiming::GetDelay(void) const +{ + return __delay; +} + +void +_VisualElementAnimationTiming::SetDelay(long delay) +{ + __delay = delay; +} + +long +_VisualElementAnimationTiming::GetOffset(void) const +{ + return __offset; +} + +void +_VisualElementAnimationTiming::SetOffset(long offset) +{ + __offset = offset; +} + +long +_VisualElementAnimationTiming::GetRepeatCount(void) const +{ + return __repeatCount; +} + +void +_VisualElementAnimationTiming::SetRepeatCount(long repeatCount) +{ + __repeatCount = repeatCount; +} + +float +_VisualElementAnimationTiming::GetScaleRatio(void) const +{ + return __scale; +} + +void +_VisualElementAnimationTiming::SetScaleRatio(float scale) +{ + __scale = scale; +} + +bool +_VisualElementAnimationTiming::IsAutoReverseEnabled(void) const +{ + return __autoReverse; +} + +void +_VisualElementAnimationTiming::SetAutoReverseEnabled(bool enable) +{ + __autoReverse = enable; +} + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnim_VisualElementAnimationTiming.h b/src/ui/animations/FUiAnim_VisualElementAnimationTiming.h new file mode 100644 index 0000000..028a321 --- /dev/null +++ b/src/ui/animations/FUiAnim_VisualElementAnimationTiming.h @@ -0,0 +1,85 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_VisualElementAnimationTiming.h + * @brief This is the header file for the _VisualElementAnimationTiming class. + * + * This header file contains the declarations of the _VisualElementAnimationTiming class. + */ + +#ifndef _FUI_ANIM_INTERNAL_VISUAL_ELEMENT_ANIMATION_TIMING_H_ +#define _FUI_ANIM_INTERNAL_VISUAL_ELEMENT_ANIMATION_TIMING_H_ + +#include +#include + +namespace Tizen { namespace Ui { namespace Animations +{ + +/** + * @class _VisualElementAnimationTiming + * @brief This class stores the information of a animation timing. + * @since 2.0 + * + * This class provides animation timing related information. + */ +class _VisualElementAnimationTiming + : public Tizen::Base::Object +{ +public: + _VisualElementAnimationTiming(void); + virtual ~_VisualElementAnimationTiming(void); + + long GetDuration(void) const; + void SetDuration(long duration); + + long GetOffset(void) const; + void SetOffset(long offset); + + long GetDelay(void) const; + void SetDelay(long delay); + + long GetRepeatCount(void) const; + void SetRepeatCount(long repeatCount); + + float GetScaleRatio(void) const; + void SetScaleRatio(float scale); + + bool IsAutoReverseEnabled(void) const; + void SetAutoReverseEnabled(bool enable); + +private: + _VisualElementAnimationTiming(const _VisualElementAnimationTiming& rhs); + _VisualElementAnimationTiming& operator =(const _VisualElementAnimationTiming& rhs); + +private: + long __duration; + long __offset; + long __delay; + + long __repeatCount; + + float __scale; + + bool __autoReverse; +}; // _VisualElementAnimationTiming + +}}} // Tizen::Ui::Animations + +#endif // _FUI_ANIM_INTERNAL_VISUAL_ELEMENT_ANIMATION_TIMING_H_ + diff --git a/src/ui/animations/FUiAnim_VisualElementAnimationVariantInterpolator.cpp b/src/ui/animations/FUiAnim_VisualElementAnimationVariantInterpolator.cpp new file mode 100644 index 0000000..8d49b3f --- /dev/null +++ b/src/ui/animations/FUiAnim_VisualElementAnimationVariantInterpolator.cpp @@ -0,0 +1,338 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_VisualElementAnimationVariantInterpolator.cpp + * @brief This file contains implementation of _VisualElementAnimationVariantInterpolator class + * + * This file contains implementation _VisualElementAnimationVariantInterpolator class. + */ + +#include +#include + +#include +#include + +#include +#include + +#include +#include + +#include +#include +#include + +#include + + +#include "FUiAnim_VariantEx.h" +#include "FUiAnim_VisualElementAnimationVariantInterpolator.h" + +using namespace Tizen; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Animations +{ + +_VisualElementAnimationVariantInterpolator::_VisualElementAnimationVariantInterpolator(void) +{ +} + +_VisualElementAnimationVariantInterpolator::~_VisualElementAnimationVariantInterpolator(void) +{ +} + + +result +_VisualElementAnimationVariantInterpolator::Interpolate(float progress, const Tizen::Ui::Variant& startValue, const Tizen::Ui::Variant& endValue, Tizen::Ui::Variant& value) const +{ + SysTryReturnResult(NID_UI_ANIM, startValue.GetType() == endValue.GetType(), E_INVALID_ARG, "Invalid argument(s) is used. Variant types are not matched."); + + const _VariantEx* pStartValueEx = dynamic_cast< const _VariantEx* >(&startValue); + const _VariantEx* pEndValueEx = dynamic_cast< const _VariantEx* >(&endValue); + + if (pStartValueEx && pEndValueEx) + { + if (pStartValueEx->IsValidTransformMatrix() && pEndValueEx->IsValidTransformMatrix()) + { + value = pEndValueEx->GetTransformMatrix().Interpolate( + pStartValueEx->GetTransformMatrix(), + progress + ); + return E_SUCCESS; + } + } + + switch (startValue.GetType()) + { + case VARIANT_TYPE_INT: + { + int start = startValue.ToInt(); + int end = endValue.ToInt(); + + value = static_cast< int >(static_cast< float >(start) * (1.0f - progress) + static_cast< float >(end) * progress); + } + break; + + case VARIANT_TYPE_UINT: + { + unsigned int start = startValue.ToUInt(); + unsigned int end = endValue.ToUInt(); + + value = static_cast< unsigned int >(static_cast< float >(start) * (1.0f - progress) + static_cast< float >(end) * progress); + } + break; + + case VARIANT_TYPE_BOOL: + { + bool start = startValue.ToBool(); + bool end = endValue.ToBool(); + + if (progress > 0.0f) + { + value = end; + } + else + { + value = start; + } + } + break; + + case VARIANT_TYPE_FLOAT: + { + float start = startValue.ToFloat(); + float end = endValue.ToFloat(); + + value = start * (1.0f - progress) + end * progress; + } + break; + + case VARIANT_TYPE_DOUBLE: + { + double start = startValue.ToDouble(); + double end = endValue.ToDouble(); + + value = static_cast< double >(static_cast< double >(start) * (1.0 - static_cast< double >(progress)) + static_cast< double >(end) * static_cast< double >(progress)); + } + break; + + case VARIANT_TYPE_LONG: + { + long start = startValue.ToLong(); + long end = endValue.ToLong(); + + + value = static_cast< long >(static_cast< float >(start) * (1.0f - progress) + static_cast< float >(end) * progress); + } + break; + + case VARIANT_TYPE_ULONG: + { + unsigned long start = startValue.ToULong(); + unsigned long end = endValue.ToULong(); + + value = static_cast< unsigned long >(static_cast< float >(start) * (1.0f - progress) + static_cast< float >(end) * progress); + } + break; + + case VARIANT_TYPE_LONGLONG: + { + long long start = startValue.ToLongLong(); + long long end = endValue.ToLongLong(); + + value = static_cast< long long >(static_cast< float >(start) * (1.0f - progress) + static_cast< float >(end) * progress); + } + break; + + case VARIANT_TYPE_ULONGLONG: + { + long long start = startValue.ToULongLong(); + long long end = endValue.ToULongLong(); + + value = static_cast< unsigned long long >(static_cast< float >(start) * (1.0f - progress) + static_cast< float >(end) * progress); + } + break; + + case VARIANT_TYPE_COLOR: + { + const Tizen::Graphics::Color& start = startValue.ToColor(); + const Tizen::Graphics::Color& end = endValue.ToColor(); + + byte r = static_cast< byte >(static_cast< float >(start.GetRed()) * (1.0f - progress) + static_cast< float >(end.GetRed()) * progress); + byte g = static_cast< byte >(static_cast< float >(start.GetGreen()) * (1.0f - progress) + static_cast< float >(end.GetGreen()) * progress); + byte b = static_cast< byte >(static_cast< float >(start.GetBlue()) * (1.0f - progress) + static_cast< float >(end.GetBlue()) * progress); + byte a = static_cast< byte >(static_cast< float >(start.GetAlpha()) * (1.0f - progress) + static_cast< float >(end.GetAlpha()) * progress); + + value = Variant(Tizen::Graphics::Color(r, g, b, a)); + } + break; + +#if 0 + case VARIANT_TYPE_FLOAT_COLOR: + { + const _Colorf& startValue = start.ToColorf(); + const _Colorf& endValue = end.ToColorf(); + + float r = startValue.Red() * (1.0f - progress) + endValue.Red() * progress; + float g = startValue.Green() * (1.0f - progress) + endValue.Green() * progress; + float b = startValue.Blue() * (1.0f - progress) + endValue.Blue() * progress; + float a = startValue.Alpha() * (1.0f - progress) + endValue.Alpha() * progress; + + value = Variant(_Colorf(r, g, b, a)); + } + break; +#endif + + case VARIANT_TYPE_POINT: + { + const Tizen::Graphics::Point& start = startValue.ToPoint(); + const Tizen::Graphics::Point& end = endValue.ToPoint(); + Tizen::Graphics::Point point; + + point.x = static_cast< int >(static_cast< float >(start.x) * (1.0f - progress) + static_cast< float >(end.x) * progress); + point.y = static_cast< int >(static_cast< float >(start.y) * (1.0f - progress) + static_cast< float >(end.y) * progress); + + value = point; + } + break; + + case VARIANT_TYPE_FLOAT_POINT: + { + const Tizen::Graphics::FloatPoint& start = startValue.ToFloatPoint(); + const Tizen::Graphics::FloatPoint& end = endValue.ToFloatPoint(); + + float x = start.x * (1.0f - progress) + end.x * progress; + float y = start.y * (1.0f - progress) + end.y * progress; + + value = Variant(Tizen::Graphics::FloatPoint(x, y)); + } + break; + + case VARIANT_TYPE_RECTANGLE: + { + const Tizen::Graphics::Rectangle& start = startValue.ToRectangle(); + const Tizen::Graphics::Rectangle& end = endValue.ToRectangle(); + Tizen::Graphics::Rectangle rect; + + rect.x = static_cast< int >(static_cast< float >(start.x) * (1.0f - progress) + static_cast< float >(end.x) * progress); + rect.y = static_cast< int >(static_cast< float >(start.y) * (1.0f - progress) + static_cast< float >(end.y) * progress); + rect.width = static_cast< int >(static_cast< float >(start.width) * (1.0f - progress) + static_cast< float >(end.width) * progress); + rect.height = static_cast< int >(static_cast< float >(start.height) * (1.0f - progress) + static_cast< float >(end.height) * progress); + + value = rect; + } + break; + + case VARIANT_TYPE_FLOAT_RECTANGLE: + { + const Tizen::Graphics::FloatRectangle& start = startValue.ToFloatRectangle(); + const Tizen::Graphics::FloatRectangle& end = endValue.ToFloatRectangle(); + + float left = start.x * (1.0f - progress) + end.x * progress; + float top = start.y * (1.0f - progress) + end.y * progress; + float width = start.width * (1.0f - progress) + end.width * progress; + float height = start.height * (1.0f - progress) + end.height * progress; + + value = Variant(Tizen::Graphics::FloatRectangle(left, top, width, height)); + } + break; + + case VARIANT_TYPE_DIMENSION: + { + const Tizen::Graphics::Dimension& start = startValue.ToDimension(); + const Tizen::Graphics::Dimension& end = endValue.ToDimension(); + Tizen::Graphics::Dimension size; + + size.width = static_cast< int >(static_cast< float >(start.width) * (1.0f - progress) + static_cast< float >(end.width) * progress); + size.height = static_cast< int >(static_cast< float >(start.height) * (1.0f - progress) + static_cast< float >(end.height) * progress); + + value = size; + } + break; + + case VARIANT_TYPE_FLOAT_DIMENSION: + { + const Tizen::Graphics::FloatDimension& start = startValue.ToFloatDimension(); + const Tizen::Graphics::FloatDimension& end = endValue.ToFloatDimension(); + Tizen::Graphics::FloatDimension size; + + size.width = start.width * (1.0f - progress) + end.width * progress; + size.height = start.height * (1.0f - progress) + end.height * progress; + + value = size; + } + break; + + case VARIANT_TYPE_FLOAT_MATRIX4: + { + const Tizen::Graphics::FloatMatrix4& start = startValue.ToFloatMatrix4(); + const Tizen::Graphics::FloatMatrix4& end = endValue.ToFloatMatrix4(); + float m[4][4] = {{0.0f}, }; + + for (int i = 0; i < 4; i++) + { + for (int j = 0; j < 4; j++) + { +// m[j][i] = start(i, j) * (1.0f - progress) + end(i, j) * progress; + m[j][i] = start.matrix[j][i] * (1.0f - progress) + end.matrix[j][i] * progress; + } + } + + value = Variant(Tizen::Graphics::FloatMatrix4(m)); + } + break; + + case VARIANT_TYPE_FLOAT_POINT3: + { + const Tizen::Graphics::FloatPoint3& start = startValue.ToFloatPoint3(); + const Tizen::Graphics::FloatPoint3& end = endValue.ToFloatPoint3(); + + float x = start.x * (1.0f - progress) + end.x * progress; + float y = start.y * (1.0f - progress) + end.y * progress; + float z = start.z * (1.0f - progress) + end.z * progress; + + value = Variant(Tizen::Graphics::FloatPoint3(x, y, z)); + } + break; + + case VARIANT_TYPE_FLOAT_VECTOR4: + { + const Tizen::Graphics::FloatVector4& start = startValue.ToFloatVector4(); + const Tizen::Graphics::FloatVector4& end = endValue.ToFloatVector4(); + + float x = start.x * (1.0f - progress) + end.x * progress; + float y = start.y * (1.0f - progress) + end.y * progress; + float z = start.z * (1.0f - progress) + end.z * progress; + float w = start.w * (1.0f - progress) + end.w * progress; + + value = Variant(Tizen::Graphics::FloatVector4(x, y, z, w)); + } + break; + + default: + SysLogException(NID_UI_ANIM, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. Variant type is invalid."); + return E_INVALID_ARG; + } + + return E_SUCCESS; +} + +}}} //Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnim_VisualElementAnimationVariantInterpolator.h b/src/ui/animations/FUiAnim_VisualElementAnimationVariantInterpolator.h new file mode 100644 index 0000000..9f6c931 --- /dev/null +++ b/src/ui/animations/FUiAnim_VisualElementAnimationVariantInterpolator.h @@ -0,0 +1,56 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_VisualElementAnimationVariantInterpolator.h + * @brief This is the header file for the _VisualElementAnimationVariantInterpolator class. + * + * This header file contains the declarations of the _VisualElementAnimationVariantInterpolator class. + */ + +#ifndef _FUI_ANIM_INTERNAL_VISUAL_ELEMENT_ANIMATION_VARIANT_INTERPOLATOR_H_ +#define _FUI_ANIM_INTERNAL_VISUAL_ELEMENT_ANIMATION_VARIANT_INTERPOLATOR_H_ + +#include + + +namespace Tizen { namespace Ui { namespace Animations +{ + +/** + * @class _VisualElementAnimationVariantInterpolator + * @brief This class stores the information of an interpolator of varitant type. + * @since 2.0 + * + * This class provides varitant type interpolator related information. + */ +class _VisualElementAnimationVariantInterpolator + : public Tizen::Base::Object + , public IVisualElementAnimationValueInterpolator +{ +public: + _VisualElementAnimationVariantInterpolator(void); + virtual ~_VisualElementAnimationVariantInterpolator(void); + +public: + virtual result Interpolate(float progress, const Tizen::Ui::Variant& startValue, const Tizen::Ui::Variant& endValue, Tizen::Ui::Variant& value) const; +}; // _VisualElementAnimationVariantInterpolator + + +}}} // Tizen::Ui::Animations + +#endif // _FUI_ANIM_INTERNAL_VISUAL_ELEMENT_ANIMATION_VARIANT_INTERPOLATOR_H_ diff --git a/src/ui/animations/FUiAnim_VisualElementCanvas.cpp b/src/ui/animations/FUiAnim_VisualElementCanvas.cpp new file mode 100644 index 0000000..3929a4d --- /dev/null +++ b/src/ui/animations/FUiAnim_VisualElementCanvas.cpp @@ -0,0 +1,113 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_VisualElementCanvas.cpp + * @brief This file contains implementation of _VisualElementCanvas class + * + * This file contains implementation _VisualElementCanvas class. + */ + +#include +#include +#include +#include +#include +#include +#include + +#include "FUi_CoordinateSystemUtils.h" +#include "FUiAnim_VisualElementCoordinateSystem.h" +#include "FUiAnim_VisualElementCanvas.h" +#include "FUiAnim_VisualElementSurfaceImpl.h" +#include "FUiAnim_DisplayManager.h" + +namespace Tizen { namespace Ui { namespace Animations +{ + +// TBD: from WinCanvas...... new class really needed??? +//class _VisualElementCanvas : +// public Tizen::Ui::__WinCanvas +//{ +//}; + +_VisualElementCanvas::_VisualElementCanvas(void) +{ +} + +_VisualElementCanvas::~_VisualElementCanvas(void) +{ +} + +// TODO: +// need to convert rectangle into physical coordinates internally... +// +result +_VisualElementCanvas::Construct(const VisualElementSurface& surface, const Tizen::Graphics::Rectangle& rectangle) +{ + ClearLastResult(); + result r = E_SUCCESS; + + Tizen::Graphics::_CanvasImpl* pCanvasImpl = Tizen::Graphics::_CanvasImpl::GetInstance(*this); + Tizen::Graphics::_Canvas* pNativeCanvas = (pCanvasImpl) ? pCanvasImpl->_pNativeCanvas : 0; + + SysTryReturnResult(NID_UI, pCanvasImpl && pNativeCanvas, E_OUT_OF_MEMORY, "Memory allocation failed."); + SysTryReturnResult(NID_UI, _VisualElementSurfaceImpl::GetInstance(surface), E_SYSTEM, "A system error has been occurred. Invalid surface."); + + Handle window = _VisualElementSurfaceImpl::GetInstance(surface)->GetNativeHandle(); + r = pNativeCanvas->Construct(window, _CoordinateSystemUtils::Transform(rectangle)); + SysTryReturnResult(NID_UI, r == E_SUCCESS, r, "Failed to construct Canvas with the size (%d:%d).", rectangle.width, rectangle.height); + + pNativeCanvas->__windowHandle = static_cast< Handle >(window); + + Tizen::Graphics::Rectangle realBounds = pNativeCanvas->GetBounds(); + + Tizen::Graphics::Dimension adoptedSize; + + Tizen::Graphics::Dimension revisedSize = _CoordinateSystemUtils::InverseTransform(Tizen::Graphics::Dimension(realBounds.width, realBounds.height)); + Tizen::Graphics::Rectangle physicalGivenBounds = _CoordinateSystemUtils::Transform(rectangle); + + adoptedSize.width = (physicalGivenBounds.width == realBounds.width) ? rectangle.width : revisedSize.width; + adoptedSize.height = (physicalGivenBounds.height == realBounds.height) ? rectangle.height : revisedSize.height; + + Tizen::Graphics::Rectangle revisedBounds(rectangle.x, rectangle.y, adoptedSize.width, adoptedSize.height); + + if (pCanvasImpl->_pCoordHolder) + { + pCanvasImpl->_pCoordHolder->Init(revisedBounds); + } + + _DisplayManager::RestoreContext(); + return r; +} + +result +_VisualElementCanvas::Construct(const VisualElementSurface& surface, const Tizen::Graphics::FloatRectangle& rectangle) +{ + Tizen::Graphics::_CanvasImpl* pCanvasImpl = Tizen::Graphics::_CanvasImpl::GetInstance(*this); + + SysTryReturnResult(NID_UI, pCanvasImpl, E_OUT_OF_MEMORY, "Memory allocation failed."); + SysTryReturnResult(NID_UI, _VisualElementSurfaceImpl::GetInstance(surface), E_SYSTEM, "A system error has been occurred. Invalid surface."); + + Handle window = _VisualElementSurfaceImpl::GetInstance(surface)->GetNativeHandle(); + + result r = pCanvasImpl->Construct(window, rectangle); + _DisplayManager::RestoreContext(); + return r; +} + +}}} diff --git a/src/ui/animations/FUiAnim_VisualElementCoordinateSystem.cpp b/src/ui/animations/FUiAnim_VisualElementCoordinateSystem.cpp new file mode 100644 index 0000000..c2bde50 --- /dev/null +++ b/src/ui/animations/FUiAnim_VisualElementCoordinateSystem.cpp @@ -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 FUiAnim_VisualElementCoordinateSystem.cpp + * @brief This file contains implementation of _VisualElementCoordinateSystem class + * + * This file contains implementation _VisualElementCoordinateSystem class. + */ + +#include +#include +#include +#include + +#include "FUi_CoordinateSystemUtils.h" +#include "FUiAnim_VisualElementCoordinateSystem.h" + +namespace Tizen { namespace Ui { namespace Animations +{ + +float _VisualElementCoordinateSystem::scaleFactorX = 1.0f; +float _VisualElementCoordinateSystem::scaleFactorY = 1.0f; +int _VisualElementCoordinateSystem::logScreenWidth = 0; +int _VisualElementCoordinateSystem::logScreenHeight = 0; +bool _VisualElementCoordinateSystem::needScale = false; + +void +_VisualElementCoordinateSystem::Initialize(void) +{ + needScale = false; + + // Initialize auto-scale factors + Tizen::Graphics::_CoordinateSystem* pCoordSys = Tizen::Graphics::_CoordinateSystem::GetInstance(); + + if (pCoordSys->IsTransformEnabled() == true) + { + scaleFactorX = pCoordSys->GetTransformer()->GetHorizontalScaleFactor(); + scaleFactorY = pCoordSys->GetTransformer()->GetVerticalScaleFactor(); + + needScale = true; + } + + int physScreenWidth = Tizen::Graphics::_Screen::GetWidth(); + int physScreenHeight = Tizen::Graphics::_Screen::GetHeight(); + float sWidth = static_cast< float >(physScreenWidth); + float sHeight = static_cast< float >(physScreenHeight); + + ConvertDimensionToLogicalIntegral(sWidth, sHeight); + logScreenWidth = static_cast< int >(sWidth); + logScreenHeight = static_cast< int >(sHeight); + + ConvertDimensionToPhysicalIntegral(sWidth, sHeight); + + SysAssert(static_cast< int >(sWidth) <= physScreenWidth); + SysAssert(static_cast< int >(sHeight) <= physScreenHeight); +} + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnim_VisualElementEnvironment.cpp b/src/ui/animations/FUiAnim_VisualElementEnvironment.cpp new file mode 100644 index 0000000..63ae1c1 --- /dev/null +++ b/src/ui/animations/FUiAnim_VisualElementEnvironment.cpp @@ -0,0 +1,376 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_VisualElementEnvironment.cpp + * @brief This file contains implementation of _VisualElementEnvironment class + * + * This file contains implementation _VisualElementEnvironment class. + */ +#include +#include +#include + + +#include "FUiAnim_VisualElementCoordinateSystem.h" +#include "FUiAnim_VisualElementImpl.h" +#include "FUiAnim_VisualElementEnvironment.h" + + +using namespace Tizen::Base; + + +namespace Tizen { namespace Ui { namespace Animations +{ + + + + +const wchar_t* VePropBounds = L"bounds"; +const wchar_t* VePropContentBounds = L"contentBounds"; +const wchar_t* VePropContentOpacity = L"contentOpacity"; +const wchar_t* VePropRenderOperation = L"renderOperation"; +const wchar_t* VePropOpacity = L"opacity"; +const wchar_t* VePropShowState = L"showState"; +const wchar_t* VePropAnchor = L"anchor"; +const wchar_t* VePropAnchorZ = L"anchorZ"; +const wchar_t* VePropTransform = L"transform"; +const wchar_t* VePropChildrenTransform = L"childrenTransform"; +const wchar_t* VePropZPosition = L"zPosition"; +const wchar_t* VePropZOrderGroup = L"zOrderGroup"; +const wchar_t* VePropClipToParent = L"clipToParent"; +const wchar_t* VePropClipChildren = L"clipChildren"; +const wchar_t* VePropSurfaceOpaque = L"surfaceOpaque"; +const wchar_t* VePropName = L"name"; +const wchar_t* VePropPropertyPropagationEnabled = L"propertyPropagation"; +const wchar_t* VePropImplicitAnimationEnabled = L"implicitAnimation"; + +#if defined(SUPPORT_CUSTOMIZING_ATTACH_DETACH_ANIMATION) +const wchar_t* VePropActionDetach = L"detach"; +const wchar_t* VePropActionAttach = L"attach"; +#endif +const wchar_t* VeSubPropBounds = L"bounds."; +const wchar_t* VeSubPropBoundsPosition = L"bounds.position"; +const wchar_t* VeSubPropBoundsSize = L"bounds.size"; + +const wchar_t* VeSubPropTransform = L"transform."; +const wchar_t* VeSubPropTransformRotationX = L"transform.rotation.x"; +const wchar_t* VeSubPropTransformRotationY = L"transform.rotation.y"; +const wchar_t* VeSubPropTransformRotationZ = L"transform.rotation.z"; +const wchar_t* VeSubPropTransformScaleX = L"transform.scale.x"; +const wchar_t* VeSubPropTransformScaleY = L"transform.scale.y"; +const wchar_t* VeSubPropTransformScaleZ = L"transform.scale.z"; +const wchar_t* VeSubPropTransformTranslationX = L"transform.translation.x"; +const wchar_t* VeSubPropTransformTranslationY = L"transform.translation.y"; +const wchar_t* VeSubPropTransformTranslationZ = L"transform.translation.z"; +const wchar_t* VeSubPropTransformRotationAnchorX = L"transform.rotation.anchor.x"; +const wchar_t* VeSubPropTransformRotationAnchorY = L"transform.rotation.anchor.y"; +const wchar_t* VeSubPropTransformRotationAnchorZ = L"transform.rotation.anchor.z"; +const wchar_t* VeSubPropTransformScaleAnchorX = L"transform.scale.anchor.x"; +const wchar_t* VeSubPropTransformScaleAnchorY = L"transform.scale.anchor.y"; +const wchar_t* VeSubPropTransformScaleAnchorZ = L"transform.scale.anchor.z"; + +const wchar_t* VeSubPropTransformRotationXY = L"transform.rotation.xy"; +const wchar_t* VeSubPropTransformScaleXY = L"transform.scale.xy"; +const wchar_t* VeSubPropTransformTranslationXY = L"transform.translation.xy"; +const wchar_t* VeSubPropTransformRotationAnchorXY = L"transform.rotation.anchor.xy"; +const wchar_t* VeSubPropTransformScaleAnchorXY = L"transform.scale.anchor.xy"; + + +const wchar_t* VeSubPropChildrenTransform = L"childrenTransform."; +const wchar_t* VeSubPropChildrenTransformRotationX = L"childrenTransform.rotation.x"; +const wchar_t* VeSubPropChildrenTransformRotationY = L"childrenTransform.rotation.y"; +const wchar_t* VeSubPropChildrenTransformRotationZ = L"childrenTransform.rotation.z"; +const wchar_t* VeSubPropChildrenTransformScaleX = L"childrenTransform.scale.x"; +const wchar_t* VeSubPropChildrenTransformScaleY = L"childrenTransform.scale.y"; +const wchar_t* VeSubPropChildrenTransformScaleZ = L"childrenTransform.scale.z"; +const wchar_t* VeSubPropChildrenTransformTranslationX = L"childrenTransform.translation.x"; +const wchar_t* VeSubPropChildrenTransformTranslationY = L"childrenTransform.translation.y"; +const wchar_t* VeSubPropChildrenTransformTranslationZ = L"childrenTransform.translation.z"; +const wchar_t* VeSubPropChildrenTransformRotationAnchorX = L"childrenTransform.rotation.anchor.x"; +const wchar_t* VeSubPropChildrenTransformRotationAnchorY = L"childrenTransform.rotation.anchor.y"; +const wchar_t* VeSubPropChildrenTransformRotationAnchorZ = L"childrenTransform.rotation.anchor.z"; +const wchar_t* VeSubPropChildrenTransformScaleAnchorX = L"childrenTransform.scale.anchor.x"; +const wchar_t* VeSubPropChildrenTransformScaleAnchorY = L"childrenTransform.scale.anchor.y"; +const wchar_t* VeSubPropChildrenTransformScaleAnchorZ = L"childrenTransform.scale.anchor.z"; + +const wchar_t* VeSubPropChildrenTransformRotationXY = L"childrenTransform.rotation.xy"; +const wchar_t* VeSubPropChildrenTransformScaleXY = L"childrenTransform.scale.xy"; +const wchar_t* VeSubPropChildrenTransformTranslationXY = L"childrenTransform.translation.xy"; +const wchar_t* VeSubPropChildrenTransformRotationAnchorXY = L"childrenTransform.rotation.anchor.xy"; +const wchar_t* VeSubPropChildrenTransformScaleAnchorXY = L"childrenTransform.scale.anchor.xy"; + +const wchar_t* VePrivPropShowOpacity = L"__showOpacity"; + +String* pVePropBounds = null; +String* pVePropContentBounds = null; +String* pVePropContentOpacity = null; +String* pVePropRenderOperation = null; +String* pVePropOpacity = null; +String* pVePropShowState = null; +String* pVePropAnchor = null; +String* pVePropAnchorZ = null; +String* pVePropTransform = null; +String* pVePropChildrenTransform = null; +String* pVePropZPosition = null; +String* pVePropZOrderGroup = null; +String* pVePropClipToParent = null; +String* pVePropClipChildren = null; +String* pVePropSurfaceOpaque = null; +String* pVePropName = null; +String* pVePropPropertyPropagationEnabled = null; +String* pVePropImplicitAnimationEnabled = null; + +#if defined(SUPPORT_CUSTOMIZING_ATTACH_DETACH_ANIMATION) +String* pVePropActionDetach = null; +String* pVePropActionAttach = null; +#endif +String* pVeSubPropBounds = null; +String* pVeSubPropBoundsPosition = null; +String* pVeSubPropBoundsSize = null; + +String* pVeSubPropTransform = null; +String* pVeSubPropTransformRotationX = null; +String* pVeSubPropTransformRotationY = null; +String* pVeSubPropTransformRotationZ = null; +String* pVeSubPropTransformScaleX = null; +String* pVeSubPropTransformScaleY = null; +String* pVeSubPropTransformScaleZ = null; +String* pVeSubPropTransformTranslationX = null; +String* pVeSubPropTransformTranslationY = null; +String* pVeSubPropTransformTranslationZ = null; +String* pVeSubPropTransformRotationAnchorX = null; +String* pVeSubPropTransformRotationAnchorY = null; +String* pVeSubPropTransformRotationAnchorZ = null; +String* pVeSubPropTransformScaleAnchorX = null; +String* pVeSubPropTransformScaleAnchorY = null; +String* pVeSubPropTransformScaleAnchorZ = null; + +String* pVeSubPropTransformRotationXY = null; +String* pVeSubPropTransformScaleXY = null; +String* pVeSubPropTransformTranslationXY = null; +String* pVeSubPropTransformRotationAnchorXY = null; +String* pVeSubPropTransformScaleAnchorXY = null; + + +String* pVeSubPropChildrenTransform = null; +String* pVeSubPropChildrenTransformRotationX = null; +String* pVeSubPropChildrenTransformRotationY = null; +String* pVeSubPropChildrenTransformRotationZ = null; +String* pVeSubPropChildrenTransformScaleX = null; +String* pVeSubPropChildrenTransformScaleY = null; +String* pVeSubPropChildrenTransformScaleZ = null; +String* pVeSubPropChildrenTransformTranslationX = null; +String* pVeSubPropChildrenTransformTranslationY = null; +String* pVeSubPropChildrenTransformTranslationZ = null; +String* pVeSubPropChildrenTransformRotationAnchorX = null; +String* pVeSubPropChildrenTransformRotationAnchorY = null; +String* pVeSubPropChildrenTransformRotationAnchorZ = null; +String* pVeSubPropChildrenTransformScaleAnchorX = null; +String* pVeSubPropChildrenTransformScaleAnchorY = null; +String* pVeSubPropChildrenTransformScaleAnchorZ = null; + +String* pVeSubPropChildrenTransformRotationXY = null; +String* pVeSubPropChildrenTransformScaleXY = null; +String* pVeSubPropChildrenTransformTranslationXY = null; +String* pVeSubPropChildrenTransformRotationAnchorXY = null; +String* pVeSubPropChildrenTransformScaleAnchorXY = null; + +String* pVePrivPropShowOpacity = null; + +_VisualElementEnvironment* _VisualElementEnvironment::__pInstance= NULL; + +_VisualElementEnvironment::_VisualElementEnvironment(void) +{ + +} +void +_VisualElementEnvironment::Initialize(void) +{ + if(!_VisualElementEnvironment::__pInstance) + { + static _VisualElementEnvironment instance; + _VisualElementEnvironment::__pInstance = &instance; + _VisualElementEnvironment::__pInstance->InitializeEnvironment(); + } +} + +void +_VisualElementEnvironment::InitializeEnvironment(void) +{ + pVePropBounds = new (std::nothrow) String(VePropBounds); + pVePropContentBounds = new (std::nothrow) String(VePropContentBounds); + pVePropContentOpacity = new (std::nothrow) String(VePropContentOpacity); + pVePropRenderOperation = new (std::nothrow) String(VePropRenderOperation); + pVePropOpacity = new (std::nothrow) String(VePropOpacity); + pVePropShowState = new (std::nothrow) String(VePropShowState); + pVePropAnchor = new (std::nothrow) String(VePropAnchor); + pVePropAnchorZ = new (std::nothrow) String(VePropAnchorZ); + pVePropTransform = new (std::nothrow) String(VePropTransform); + pVePropChildrenTransform = new (std::nothrow) String(VePropChildrenTransform); + pVePropZPosition = new (std::nothrow) String(VePropZPosition); + pVePropZOrderGroup = new (std::nothrow) String(VePropZOrderGroup); + pVePropClipToParent = new (std::nothrow) String(VePropClipToParent); + pVePropClipChildren = new (std::nothrow) String(VePropClipChildren); + pVePropSurfaceOpaque = new (std::nothrow) String(VePropSurfaceOpaque); + pVePropName = new (std::nothrow) String(VePropName); + pVePropPropertyPropagationEnabled = new (std::nothrow) String(VePropPropertyPropagationEnabled); + pVePropImplicitAnimationEnabled = new (std::nothrow) String(VePropImplicitAnimationEnabled); +#if defined(SUPPORT_CUSTOMIZING_ATTACH_DETACH_ANIMATION) + pVePropActionDetach = new (std::nothrow) String(VePropActionDetach); + pVePropActionAttach = new (std::nothrow) String(VePropActionAttach); +#endif + pVeSubPropBounds = new (std::nothrow) String(VeSubPropBounds); + pVeSubPropBoundsPosition = new (std::nothrow) String(VeSubPropBoundsPosition); + pVeSubPropBoundsSize = new (std::nothrow) String(VeSubPropBoundsSize); + + pVeSubPropTransform = new (std::nothrow) String(VeSubPropTransform); + pVeSubPropTransformRotationX = new (std::nothrow) String(VeSubPropTransformRotationX); + pVeSubPropTransformRotationY = new (std::nothrow) String(VeSubPropTransformRotationY); + pVeSubPropTransformRotationZ = new (std::nothrow) String(VeSubPropTransformRotationZ); + pVeSubPropTransformScaleX = new (std::nothrow) String(VeSubPropTransformScaleX); + pVeSubPropTransformScaleY = new (std::nothrow) String(VeSubPropTransformScaleY); + pVeSubPropTransformScaleZ = new (std::nothrow) String(VeSubPropTransformScaleZ); + pVeSubPropTransformTranslationX = new (std::nothrow) String(VeSubPropTransformTranslationX); + pVeSubPropTransformTranslationY = new (std::nothrow) String(VeSubPropTransformTranslationY); + pVeSubPropTransformTranslationZ = new (std::nothrow) String(VeSubPropTransformTranslationZ); + pVeSubPropTransformRotationAnchorX = new (std::nothrow) String(VeSubPropTransformRotationAnchorX); + pVeSubPropTransformRotationAnchorY = new (std::nothrow) String(VeSubPropTransformRotationAnchorY); + pVeSubPropTransformRotationAnchorZ = new (std::nothrow) String(VeSubPropTransformRotationAnchorZ); + pVeSubPropTransformScaleAnchorX = new (std::nothrow) String(VeSubPropTransformScaleAnchorX); + pVeSubPropTransformScaleAnchorY = new (std::nothrow) String(VeSubPropTransformScaleAnchorY); + pVeSubPropTransformScaleAnchorZ = new (std::nothrow) String(VeSubPropTransformScaleAnchorZ); + + pVeSubPropTransformRotationXY = new (std::nothrow) String(VeSubPropTransformRotationXY); + pVeSubPropTransformScaleXY = new (std::nothrow) String(VeSubPropTransformScaleXY); + pVeSubPropTransformTranslationXY = new (std::nothrow) String(VeSubPropTransformTranslationXY); + pVeSubPropTransformRotationAnchorXY = new (std::nothrow) String(VeSubPropTransformRotationAnchorXY); + pVeSubPropTransformScaleAnchorXY = new (std::nothrow) String(VeSubPropTransformScaleAnchorXY); + + + pVeSubPropChildrenTransform = new (std::nothrow) String(VeSubPropChildrenTransform); + pVeSubPropChildrenTransformRotationX = new (std::nothrow) String(VeSubPropChildrenTransformRotationX); + pVeSubPropChildrenTransformRotationY = new (std::nothrow) String(VeSubPropChildrenTransformRotationY); + pVeSubPropChildrenTransformRotationZ = new (std::nothrow) String(VeSubPropChildrenTransformRotationZ); + pVeSubPropChildrenTransformScaleX = new (std::nothrow) String(VeSubPropChildrenTransformScaleX); + pVeSubPropChildrenTransformScaleY = new (std::nothrow) String(VeSubPropChildrenTransformScaleY); + pVeSubPropChildrenTransformScaleZ = new (std::nothrow) String(VeSubPropChildrenTransformScaleZ); + pVeSubPropChildrenTransformTranslationX = new (std::nothrow) String(VeSubPropChildrenTransformTranslationX); + pVeSubPropChildrenTransformTranslationY = new (std::nothrow) String(VeSubPropChildrenTransformTranslationY); + pVeSubPropChildrenTransformTranslationZ = new (std::nothrow) String(VeSubPropChildrenTransformTranslationZ); + pVeSubPropChildrenTransformRotationAnchorX = new (std::nothrow) String(VeSubPropChildrenTransformRotationAnchorX); + pVeSubPropChildrenTransformRotationAnchorY = new (std::nothrow) String(VeSubPropChildrenTransformRotationAnchorY); + pVeSubPropChildrenTransformRotationAnchorZ = new (std::nothrow) String(VeSubPropChildrenTransformRotationAnchorZ); + pVeSubPropChildrenTransformScaleAnchorX = new (std::nothrow) String(VeSubPropChildrenTransformScaleAnchorX); + pVeSubPropChildrenTransformScaleAnchorY = new (std::nothrow) String(VeSubPropChildrenTransformScaleAnchorY); + pVeSubPropChildrenTransformScaleAnchorZ = new (std::nothrow) String(VeSubPropChildrenTransformScaleAnchorZ); + + pVeSubPropChildrenTransformRotationXY = new (std::nothrow) String(VeSubPropChildrenTransformRotationXY); + pVeSubPropChildrenTransformScaleXY = new (std::nothrow) String(VeSubPropChildrenTransformScaleXY); + pVeSubPropChildrenTransformTranslationXY = new (std::nothrow) String(VeSubPropChildrenTransformTranslationXY); + pVeSubPropChildrenTransformRotationAnchorXY = new (std::nothrow) String(VeSubPropChildrenTransformRotationAnchorXY); + pVeSubPropChildrenTransformScaleAnchorXY = new (std::nothrow) String(VeSubPropChildrenTransformScaleAnchorXY); + + pVePrivPropShowOpacity = new (std::nothrow) String(VePrivPropShowOpacity); + + + _VisualElementCoordinateSystem::Initialize(); +} + + + + +_VisualElementEnvironment::~_VisualElementEnvironment(void) +{ + delete pVePropBounds; + delete pVePropContentBounds; + delete pVePropContentOpacity; + delete pVePropRenderOperation; + delete pVePropOpacity; + delete pVePropShowState; + delete pVePropAnchor; + delete pVePropAnchorZ; + delete pVePropTransform; + delete pVePropChildrenTransform; + delete pVePropZPosition; + delete pVePropZOrderGroup; + delete pVePropClipToParent; + delete pVePropClipChildren; + delete pVePropSurfaceOpaque; + delete pVePropName; + delete pVePropPropertyPropagationEnabled; + delete pVePropImplicitAnimationEnabled; + +#if defined(SUPPORT_CUSTOMIZING_ATTACH_DETACH_ANIMATION) + delete pVePropActionDetach; + delete pVePropActionAttach; +#endif + + delete pVeSubPropBounds; + delete pVeSubPropBoundsPosition; + delete pVeSubPropBoundsSize; + + delete pVeSubPropTransform; + delete pVeSubPropTransformRotationX; + delete pVeSubPropTransformRotationY; + delete pVeSubPropTransformRotationZ; + delete pVeSubPropTransformScaleX; + delete pVeSubPropTransformScaleY; + delete pVeSubPropTransformScaleZ; + delete pVeSubPropTransformTranslationX; + delete pVeSubPropTransformTranslationY; + delete pVeSubPropTransformTranslationZ; + delete pVeSubPropTransformRotationAnchorX; + delete pVeSubPropTransformRotationAnchorY; + delete pVeSubPropTransformRotationAnchorZ; + delete pVeSubPropTransformScaleAnchorX; + delete pVeSubPropTransformScaleAnchorY; + delete pVeSubPropTransformScaleAnchorZ; + + delete pVeSubPropTransformRotationXY; + delete pVeSubPropTransformScaleXY; + delete pVeSubPropTransformTranslationXY; + delete pVeSubPropTransformRotationAnchorXY; + delete pVeSubPropTransformScaleAnchorXY; + + delete pVeSubPropChildrenTransform; + delete pVeSubPropChildrenTransformRotationX; + delete pVeSubPropChildrenTransformRotationY; + delete pVeSubPropChildrenTransformRotationZ; + delete pVeSubPropChildrenTransformScaleX; + delete pVeSubPropChildrenTransformScaleY; + delete pVeSubPropChildrenTransformScaleZ; + delete pVeSubPropChildrenTransformTranslationX; + delete pVeSubPropChildrenTransformTranslationY; + delete pVeSubPropChildrenTransformTranslationZ; + delete pVeSubPropChildrenTransformRotationAnchorX; + delete pVeSubPropChildrenTransformRotationAnchorY; + delete pVeSubPropChildrenTransformRotationAnchorZ; + delete pVeSubPropChildrenTransformScaleAnchorX; + delete pVeSubPropChildrenTransformScaleAnchorY; + delete pVeSubPropChildrenTransformScaleAnchorZ; + + delete pVeSubPropChildrenTransformRotationXY; + delete pVeSubPropChildrenTransformScaleXY; + delete pVeSubPropChildrenTransformTranslationXY; + delete pVeSubPropChildrenTransformRotationAnchorXY; + delete pVeSubPropChildrenTransformScaleAnchorXY; + + delete pVePrivPropShowOpacity; +} + +}}} //namespace Tizen { namespace Ui { namespace Animations diff --git a/src/ui/animations/FUiAnim_VisualElementEnvironment.h b/src/ui/animations/FUiAnim_VisualElementEnvironment.h new file mode 100644 index 0000000..db62eb8 --- /dev/null +++ b/src/ui/animations/FUiAnim_VisualElementEnvironment.h @@ -0,0 +1,48 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_VisualElementEnvironment.h + * @brief This is the header file for the _VisualElementEnvironment class. + * + * This header file contains the declarations of the _VisualElementEnvironment class. + */ + +#ifndef FUIANIM_VISUAL_ELEMENT_ENVIRONMENT_H_ +#define FUIANIM_VISUAL_ELEMENT_ENVIRONMENT_H_ + +namespace Tizen { namespace Ui { namespace Animations +{ + + +class _VisualElementEnvironment +{ +private: + _VisualElementEnvironment(void); + ~_VisualElementEnvironment(void); + +public: + static void Initialize(void); + +private: + void InitializeEnvironment(void); +private: + static _VisualElementEnvironment* __pInstance; +}; + +}}} //namespace Tizen { namespace Ui { namespace Animations +#endif /* FUIANIM_VISUAL_ELEMENT_ENVIRONMENT_H_ */ diff --git a/src/ui/animations/FUiAnim_VisualElementImpl.cpp b/src/ui/animations/FUiAnim_VisualElementImpl.cpp new file mode 100644 index 0000000..5464fb7 --- /dev/null +++ b/src/ui/animations/FUiAnim_VisualElementImpl.cpp @@ -0,0 +1,8193 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_VisualElementImpl.cpp + * @brief This file contains implementation of _VisualElementImpl class + * + * This file contains implementation _VisualElementImpl class. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "FUi_Rectanglef.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUiAnim_IVisualElementCaptureProvider.h" +#include "FUiAnim_VisualElementImpl.h" +#include "FUiAnim_VisualElementCanvas.h" + +#include "FUiAnim_VisualElementAnimationImpl.h" +#include "FUiAnim_VisualElementAnimationGroupImpl.h" +#include "FUiAnim_VisualElementValueAnimationImpl.h" +#include "FUiAnim_VisualElementPropertyAnimationImpl.h" +#include "FUiAnim_AnimationManager.h" +#include "FUiAnim_VisualElementSharedData.h" +#include "FUiAnim_RootVisualElement.h" +#include "FUiAnim_ControlVisualElement.h" +#include "FUiAnim_MatrixUtil.h" +#include "FUiAnim_EflNode.h" +#include "FUiAnim_EflLayer.h" +#include "FUiAnim_VisualElementSurfaceImpl.h" +#include "FUiAnim_EflVisualElementSurfaceImpl.h" +#include "FUiAnim_DisplayManager.h" + + +using namespace std; +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; + +#define LAZY_EVALUATION // lazy updating and reconfiguring. +#define IMPLICIT_ANIMATION_IMPL //prototyping implicit animation. +//#define MANUAL_PROPERTY_CHANGE_NOTIFICATION + +#define IS_INTERNAL_CLASS(_PUBLIC) (likely(typeid(*(_PUBLIC)) == VeTypeId) || likely(typeid(*(_PUBLIC)) == internalVeTypeId) || likely(typeid(*(_PUBLIC)) == controlVeTypeId) || likely(typeid(*(_PUBLIC)) == rootVeTypeId)) +#define IS_NEEDED_UPDATE_PRESENTATION(__MODEL) (((__MODEL)->__isPropertyPropagationEnabled) && ((__MODEL)->__pPresentation)) +namespace { + +static const char* STR_ERROR_INVALID_VARIANT_ARG_TYPE = "[E_INVALID_ARG] Invalid argument(s) is used. Variant type is invalid."; + +void +CalculateBoundingBox(const float x[4], const float y[4], Tizen::Graphics::FloatRectangle& rectangle) +{ + float minX = x[0]; + float minY = y[0]; + float maxX = minX; + float maxY = minY; + for (int i = 1; i < 4; i++) + { + if (x[i] < minX) + minX = x[i]; + + if (y[i] < minY) + minY = y[i]; + + if (x[i] > maxX) + maxX = x[i]; + + if (y[i] > maxY) + maxY = y[i]; + } + + rectangle.x = minX; + rectangle.y = minY; + rectangle.width = maxX - minX; + rectangle.height = maxY - minY; +} + + +} + +namespace Tizen { namespace Ui { namespace Animations +{ +// rules of visual element. +// +// 1. almost controlling pSharedData occurred in the PRESENTATION layer. +// 2. almost Delegate's methods occurred in the MODEL layer. +// + +#define SHOWOPACITY_VISIBLE(so) \ + (so != 0.0f) + +#define VE_VISIBLE(o) \ + SHOWOPACITY_VISIBLE((o)->__showOpacity) + +#define HAVE_SURFACE(o) \ + (likely((o)->GetSharedData().pSurface)) + +//TODO: require further examination : __NeedSurface() instead of NEED_SURFACE() macro +#define NEED_SURFACE(o) \ + (likely((o)->GetSharedData().needSurface)) + +#define IS_ATTACHED(o) \ + ((o)->GetRoot() != null) + +#define IS_PRESENTATION(o) \ + ((o)->__pPresentation == (o)) + +#define IS_MODEL(o) \ + ((o)->__pModel == (o)) + +#define VE_DELEGATE(target, func, ...) \ + (target)->func(__VA_ARGS__) + + + +static const std::type_info& VeTypeId = typeid(VisualElement); +static const std::type_info& rootVeTypeId = typeid(_RootVisualElement); +static const std::type_info& internalVeTypeId = typeid(_VisualElement); +static const std::type_info& controlVeTypeId = typeid(_ControlVisualElement); + +// declared AnimationEventListener for implicit animation +class _VisualElementImplicitAnimationEventListener + : public IVisualElementAnimationStatusEventListener + , virtual public Tizen::Base::Runtime::IEventListener +{ +public: + _VisualElementImplicitAnimationEventListener(void) {} + virtual ~_VisualElementImplicitAnimationEventListener(void) {} + + virtual void OnVisualElementAnimationStarted(const VisualElementAnimation& animation, const String& keyName, VisualElement& target) {} + virtual void OnVisualElementAnimationRepeated(const VisualElementAnimation& animation, const String& keyName, VisualElement& target, long currentRepeatCount) {} + virtual void OnVisualElementAnimationFinished(const VisualElementAnimation& animation, const String& keyName, VisualElement& target, bool completedNormally) + { + target.Destroy(); + delete this; + } +}; + +IMPLEMENT_PROPERTY(_VisualElementImpl); + +_VisualElementImpl::_VisualElementImpl(VisualElement& element) + : _zOrderGroup(Z_ORDER_GROUP_NORMAL) + , __pSharedData(null) + , __pParent(null) + , __pModel(null) + , __pPresentation(null) + , __pRoot(null) + , __isRoot(false) + , __isVisible(false) + , __showOpacity(0.0f) + , __needRecreateSurface(false) + , __bounds(0.0f, 0.0f, 0.0f, 0.0f) + , __alignedSize(0.0f, 0.0f) + , __contentBounds(0.0f, 0.0f, 1.0f, 1.0f) + , __useContentBounds(false) + , __zPosition(0.0f) + , __contentOpacity(1.0f) + , __opacity(1.0f) + , __anchor(0.5f, 0.5f) + , __anchorZ(0.0f) + , __transform() + , __decomposedTransform() + , __childrenTransform() + , __decomposedChildrenTransform() + , __childrenNeedsUpdateProps(HIERARCHY_PROPERTY_MASK) + , __invalidatedProps(HIERARCHY_PROPERTY_MASK) + , __matrixFromTopValid(false) + , __matrixFromTopInvertible(true) + , __matrixToSuperValid(false) + , __matrixToTopValid(false) + , __matrixToClipSourceValid(false) + , __boundingBoxValid(false) + , __visibleRectValid(false) + , __needTransform(false) + , __needClipForUntransformed(false) + , __isImplicitAnimationEnabled(true) + , __isClipChildren(false) + , __boundingBox(0.0f, 0.0f, 0.0f, 0.0f) + , __pClipSource(null) + , __visibleRect(0.0f, 0.0f, 0.0f, 0.0f) + , __isPropertyPropagationEnabled(true) + , __isDestroying(false) + , __isHidingParent(false) + , __isInternal(false) + , __isAllowedTreeModification(true) + , __pPublicInstance(&element) + , __imageFilePath() + , __renderOperation(VisualElement::RENDER_OPERATION_BLEND) + , __pBoundsChangedCallback(null) + , __pBoundsChangedCallbackData(null) + , __pDestroyedCallback(null) + , __pDestroyedCallbackData(null) + , __pCaptureProvider(null) +{ + ClearLastResult(); + + __children.Construct(); +} + +_VisualElementImpl::_VisualElementImpl(VisualElement& presentation, _VisualElementImpl& modelImpl) + : _zOrderGroup(modelImpl._zOrderGroup) + , __pSharedData(null) + , __pParent(null) + , __pModel(null) + , __pPresentation(null) + , __pRoot(null) + , __isRoot(modelImpl.__isRoot) + , __isVisible(modelImpl.__isVisible) + , __showOpacity(modelImpl.__showOpacity) + , __needRecreateSurface(false) + , __bounds(modelImpl.__bounds) + , __alignedSize(modelImpl.__alignedSize) + , __contentBounds(modelImpl.__contentBounds) + , __useContentBounds(modelImpl.__useContentBounds) + , __zPosition(modelImpl.__zPosition) + , __contentOpacity(modelImpl.__contentOpacity) + , __opacity(modelImpl.__opacity) + , __anchor(modelImpl.__anchor) + , __anchorZ(modelImpl.__anchorZ) + , __transform(modelImpl.__transform) + , __decomposedTransform(modelImpl.__decomposedTransform) + , __childrenTransform(modelImpl.__childrenTransform) + , __decomposedChildrenTransform(modelImpl.__decomposedChildrenTransform) + , __childrenNeedsUpdateProps(HIERARCHY_PROPERTY_MASK) + , __invalidatedProps(HIERARCHY_PROPERTY_MASK) + , __matrixFromTopValid(false) + , __matrixFromTopInvertible(true) + , __matrixToSuperValid(false) + , __matrixToTopValid(false) + , __matrixToClipSourceValid(false) + , __boundingBoxValid(false) + , __visibleRectValid(false) + , __needTransform(modelImpl.__needTransform) + , __needClipForUntransformed(modelImpl.__needClipForUntransformed) + , __isImplicitAnimationEnabled(modelImpl.__isImplicitAnimationEnabled) + , __isClipChildren(modelImpl.__isClipChildren) + , __boundingBox(0.0f, 0.0f, 0.0f, 0.0f) + , __pClipSource(null) + , __visibleRect(0.0f, 0.0f, 0.0f, 0.0f) + , __isPropertyPropagationEnabled(false) // it differs from the property of MODEL object + , __isDestroying(false) + , __isHidingParent(modelImpl.__isHidingParent) + , __isInternal(modelImpl.__isInternal) + , __isAllowedTreeModification(true) + , __pPublicInstance(&presentation) + , __imageFilePath(modelImpl.__imageFilePath) + , __renderOperation(modelImpl.__renderOperation) + , __pBoundsChangedCallback(modelImpl.__pBoundsChangedCallback) + , __pBoundsChangedCallbackData(modelImpl.__pBoundsChangedCallbackData) + , __pDestroyedCallback(modelImpl.__pDestroyedCallback) + , __pDestroyedCallbackData(modelImpl.__pDestroyedCallbackData) + , __pCaptureProvider(null) +{ + ClearLastResult(); + + __children.Construct(); +} + +_VisualElementImpl::~_VisualElementImpl(void) +{ + ClearLastResult(); + // clear data after detaching children + if (likely(__pSharedData)) + { + __pSharedData->Release(); + __pSharedData = null; + } + + // remove public instance + __pPublicInstance = null; + + if (__pDestroyedCallback != null) + { + __pDestroyedCallback(__pDestroyedCallbackData); + } +} + +void +_VisualElementImpl::Destroy(void) +{ + //SysLog(NID_UI_ANIM, "destruct[%x]-->begin", this); + + if (unlikely(__isDestroying)) + { + return; + } + + __isDestroying = true; + + + // WARNING: + // Destroy and its callback will be called from the leaf of hiearchy tree first. + // That is, this method first destroys children(Destroy and OnDestructing), and it destroys itself later. + + while (__children.GetCount() > 0) + { + _VisualElementImpl* pChild = __children.GetChildAt(0); + if (likely(pChild)) + { + //pChild->RemoveFromParent(); + //or + if (likely(pChild->__pPublicInstance)) + { + pChild->__pPublicInstance->Destroy(); + } + else + { + SysAssertf(false, "VisualElement does not have public instance."); + } + + } + else + { + SysAssertf(false, "VisualElement has no child."); + } + + } + + + // CHECKME: + // Is this right place for invoking 'OnDestructing' ? + // OnConstructed will be called from public instance. + + if (!IS_PRESENTATION(this)) + { + VE_DELEGATE(this, InvokeOnDestructing); + } + + + RemoveFromParent(); + + + if (IS_MODEL(this)) + { + if (likely(__pPresentation)) + { + __pPresentation->__pPublicInstance->Destroy(); + } + __pPresentation = null; + } + else + { + _AnimationManager* pAnimationManager = _AnimationManager::GetInstance(); + if (pAnimationManager) + { + pAnimationManager->RemoveAllAnimations(*__pPublicInstance); + } + + __pModel = null; + } + + delete this; +} + +result +_VisualElementImpl::Construct(void) +{ + result r = E_SUCCESS; + __pSharedData = new (std::nothrow) _VisualElementSharedData; + SysTryCatch(NID_UI_ANIM, __pSharedData, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI_ANIM, GetSharedData().Construct() == E_SUCCESS, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] failed in shared data constructing."); + + __pModel = this; + __pPresentation = null; + //SysLog(NID_UI_ANIM, "Created(efl=%p)", GetSharedData().pNativeNode); + +#if 0 // REMOVED : We should invoke property observer method manually. + if (__isPropertyPropagationEnabled) + { + AddPropertyChangeEventListener(_VisualElementModelObserver::GetInstance()); + } +#endif + + //VE_DELEGATE(this, InvokeOnConstructed); + + return E_SUCCESS; + + +CATCH: + if (likely(__pSharedData)) + { + GetSharedData().Release(); + __pSharedData = null; + } + + return r; +} + +IVisualElementAnimationProvider* +_VisualElementImpl::GetAnimationProvider(void) const +{ + ClearLastResult(); + SysTryReturn(NID_UI_ANIM, IS_MODEL(this), null, E_INVALID_OPERATION, "[E_INVALID_OPERATION] VisualElement is not Model object."); + + return GetSharedData().pAnimationProvider; +} + +result +_VisualElementImpl::SetAnimationProvider(IVisualElementAnimationProvider* pProvider) +{ + SysTryReturnResult(NID_UI_ANIM, IS_MODEL(this), E_INVALID_OPERATION, "VisualElement is not Model object."); + + GetSharedData().pAnimationProvider = pProvider; + + return E_SUCCESS; +} + +IVisualElementContentProvider* +_VisualElementImpl::GetContentProvider(void) const +{ + ClearLastResult(); + SysTryReturn(NID_UI_ANIM, IS_MODEL(this), null, E_INVALID_OPERATION, "[E_INVALID_OPERATION] VisualElement is not Model object."); + + return GetSharedData().pContentProvider; +} + +result +_VisualElementImpl::SetContentProvider(IVisualElementContentProvider* pProvider) +{ + SysTryReturnResult(NID_UI_ANIM, IS_MODEL(this), E_INVALID_OPERATION, "VisualElement is not Model object."); + + GetSharedData().pContentProvider = pProvider; + + return E_SUCCESS; +} + +IVisualElementEventListener* +_VisualElementImpl::GetVisualElementEventListener(void) const +{ + ClearLastResult(); + SysTryReturn(NID_UI_ANIM, IS_MODEL(this), null, E_INVALID_OPERATION, "[E_INVALID_OPERATION] VisualElement is not Model object."); + + return GetSharedData().pEventListener; +} + +result +_VisualElementImpl::SetVisualElementEventListener(IVisualElementEventListener* pListener) +{ + SysTryReturnResult(NID_UI_ANIM, IS_MODEL(this), E_INVALID_OPERATION, "VisualElement is not Model object."); + + GetSharedData().pEventListener = pListener; + + return E_SUCCESS; +} + +result +_VisualElementImpl::FlushI(void) +{ + _DisplayManager* pDisplayManager = _DisplayManager::GetInstance(); +#ifdef VE_VSYNC_UPDATE + if (pDisplayManager) + { + pDisplayManager->RenderAll(); + } +#endif + + result r = E_SUCCESS; + if (pDisplayManager) + { + r = pDisplayManager->Flush(); + } + return r; +} + +bool +_VisualElementImpl::CreateImplicitAnimationIfNeeded( const String& property, + const Variant& newValue, const Variant& currentPresentationValue, const String** pSubProperties) +{ + bool r = true; + + _AnimationManager* pAnimationManager = _AnimationManager::GetInstance(); + if (!pAnimationManager) + { + return r; + } + + if (likely(GetRoot()) + && likely(GetSharedData().needSurface) + && (unlikely(pAnimationManager->IsImplicitAnimationEnabled() && __isImplicitAnimationEnabled)) ) + { + // WARNING: + // For performance, following must be done only when oldValue != newValue. + VisualElementAnimation* pAnimation = InvokeCreateAnimationForProperty(property); + + // user can make other type animation like aAnimationGroup or ValueAnimation + // in this case pPropertyAnimation will have a null value. + VisualElementPropertyAnimation* pPropertyAnimation = dynamic_cast< VisualElementPropertyAnimation* >(pAnimation); + if (likely(pPropertyAnimation)) + { + if (pPropertyAnimation->GetEndValue().IsEmpty()) + { + pPropertyAnimation->SetEndValue(newValue); + } + + if (pPropertyAnimation->GetStartValue().IsEmpty()) + { + pPropertyAnimation->SetStartValue(currentPresentationValue); + } + } + + if(pSubProperties) + { // remove sub property + for(int i = 0 ; pSubProperties[i] != NULL ; i++) + { + pAnimationManager->RemoveAnimationByProperty(*__pPresentation->__pPublicInstance, *pSubProperties[i]); + } + } + if (unlikely(pAnimation)) + { + /// WARNING: + // 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); + r = false; + } + + delete pAnimation; + } + else + { + // WARNING: + // Remove previous animation even when trying to change the property without animation. + pAnimationManager->RemoveAnimationByProperty(*__pPresentation->__pPublicInstance, property); + r = false; + } + } + 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; + } + return r; +} + + +result +_VisualElementImpl::SetRenderOperation(VisualElement::RenderOperation renderOperation) +{ + SysTryReturnResult(NID_UI_ANIM, IS_MODEL(this), E_INVALID_OPERATION, "VisualElement is not Model object."); + + result r = InvokeOnSetPropertyRequested(*pVePropRenderOperation, Variant(static_cast< int >(renderOperation))); + SysTryLog(NID_UI_ANIM, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +VisualElement::RenderOperation +_VisualElementImpl::GetRenderOperation(void) const +{ + ClearLastResult(); + +#if 0 + int renderOperation = InvokeOnGetPropertyRequested(*pVePropRenderOperation).ToInt(); + if (GetLastResult() != E_SUCCESS) + { + return VisualElement::RENDER_OPERATION_BLEND; + } + + return static_cast< VisualElement::RenderOperation >(renderOperation); +#else + return __renderOperation; +#endif +} + +Variant +_VisualElementImpl::GetRenderOperationProperty(void) const +{ + ClearLastResult(); + + return Variant(static_cast< int >(__renderOperation)); +} + +result +_VisualElementImpl::SetRenderOperationProperty(const Variant& v) +{ + SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_INT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + + VisualElement::RenderOperation renderOperation = static_cast< VisualElement::RenderOperation >(v.ToInt()); + if (likely(__renderOperation != renderOperation)) + { + SysTryReturnResult( + NID_UI_ANIM, + renderOperation >= VisualElement::RENDER_OPERATION_BLEND && renderOperation <= VisualElement::RENDER_OPERATION_COPY, + E_INVALID_ARG, + "Invalid argument(s) is used. The given render operation is out of range." + ); + + __renderOperation = renderOperation; + InvalidateHierarchyProps(HIERARCHY_PROPERTY_OPACITY, false, false); + } + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + __pPresentation->SetRenderOperationProperty(__renderOperation); + } + + return E_SUCCESS; +} + +bool +_VisualElementImpl::GetBackBufferEnabled(void) const +{ + ClearLastResult(); + + return GetSharedData().needSurface; +} + +result +_VisualElementImpl::SetBackBufferEnabled(bool enabled) +{ + SysTryReturnResult(NID_UI_ANIM, IS_MODEL(this), E_INVALID_OPERATION, "VisualElement is not Model object."); + + if (likely(GetSharedData().needSurface != enabled)) + { + /// WARNING: + // Need to check transform matrix if the transform matrix is complex(generic). In this case, disabling Backing-Buffer + // should not be allowed ! + // + if (likely(NEED_SURFACE(this))) // may be redundant checking.... (or using !enabled). Check if this needs surface currently. + { +// _Matrix3Df; +// __transform.Optimize(); +// SysTryReturnResult(NID_UI_ANIM, !__transform.IsGeneric(), E_INVALID_STATE, "VisualElement cannot release back-buffer if transform isn't identity or translation."); + + Matrix4Type matrixType = _GetMatrix4Type(__transform); + SysTryReturnResult( + NID_UI_ANIM, + matrixType == MATRIX4_Identity || matrixType == MATRIX4_Translation, + E_INVALID_STATE, + "VisualElement cannot release back-buffer if transform isn't identity nor translation." + ); + } + + GetSharedData().needSurface = enabled; + + if (NEED_SURFACE(this)) + { + ExposeRectangle(null, true); + } + else + { + InvalidateVisibleRectToRenderTarget(null); + } + + SetSurfaceChanged(); + } + + return E_SUCCESS; +} + +bool +_VisualElementImpl::GetRedrawOnResizeEnabled(void) const +{ + ClearLastResult(); + + return GetSharedData().redrawOnResize; +} + +result +_VisualElementImpl::SetRedrawOnResizeEnabled(bool enabled) +{ + SysTryReturnResult(NID_UI_ANIM, IS_MODEL(this), E_INVALID_OPERATION, "VisualElement is not Model object."); + + GetSharedData().redrawOnResize = enabled; + + return E_SUCCESS; +} + +bool +_VisualElementImpl::GetPropertyPropagationEnabled(void) const +{ + ClearLastResult(); + + // TBD: forward using property or direct return ? +#if 0 + bool isPropertyPropagationEnabled = InvokeOnGetPropertyRequested(*pVePropPropertyPropagationEnabled).ToBool(); + if (GetLastResult() != E_SUCCESS) + { + return false; + } + + return isPropertyPropagationEnabled; +#else + return __isPropertyPropagationEnabled; +#endif +} + +result +_VisualElementImpl::SetPropertyPropagationEnabledI(bool enable) +{ + if (unlikely(enable == __isPropertyPropagationEnabled)) + { + return E_SUCCESS; + } + + __isPropertyPropagationEnabled = enable; + +// if (IS_MODEL(this)) +// { +// if (__isPropertyPropagationEnabled) +// { +// AddPropertyChangeEventListener(_VisualElementModelObserver::GetInstance()); +// } +// else +// { +// RemovePropertyChangeEventListener(_VisualElementModelObserver::GetInstance()); +// } +// } + + return E_SUCCESS; +} + +result +_VisualElementImpl::SetPropertyPropagationEnabled(bool enable) +{ + SysTryReturnResult(NID_UI_ANIM, IS_MODEL(this), E_INVALID_OPERATION, "VisualElement is not Model object."); + if (enable == __isPropertyPropagationEnabled) + return E_SUCCESS; + + result r = InvokeOnSetPropertyRequested(*pVePropPropertyPropagationEnabled, Variant(enable)); + SysTryLog(NID_UI_ANIM, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +Variant +_VisualElementImpl::GetPropertyPropagationProperty(void) const +{ + ClearLastResult(); + + return Variant(__isPropertyPropagationEnabled); +} + +result +_VisualElementImpl::SetPropertyPropagationProperty(const Variant& v) +{ + // TODO: + // Remove this from property. It is used as a property because of _ControlVisualElement when a control was made up of three VEs. + if (IS_PRESENTATION(this)) + return E_SUCCESS; + + SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_BOOL, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + + return SetPropertyPropagationEnabledI(v.ToBool()); +} + +bool +_VisualElementImpl::IsSurfaceNeeded(void) const +{ +// TBD: root VE must have surface always... + if (unlikely(!__pParent)) + { + return true; + } + +#if 0 + const _VisualElementImpl* pCurrent; + + pCurrent = this; + while (pCurrent) + { + if (!pCurrent->__pSharedData) + { + return false; + } + + if (!pCurrent->GetSharedData().needSurface) + { + return true; + } + + pCurrent = pCurrent->__pParent; + } + + return false; +#else + return GetSharedData().needSurface; +#endif +} + +void +_VisualElementImpl::RebuildSurfaces(void) +{ + if (unlikely(!IS_PRESENTATION(this)) || unlikely(!IS_ATTACHED(this))) + { + return; + } + + ResetSurfaceIfNeeded(); + + int count = __children.GetCount(); + for (int i = 0; i < count; i++) + { + __children.GetChildAt(i)->RebuildSurfaces(); + } +} + +void +_VisualElementImpl::ResetSurfaceIfNeeded(void) +{ + if (unlikely(!__needRecreateSurface)) + { + return; + } + + __needRecreateSurface = false; + + if (unlikely(HAVE_SURFACE(this)) && unlikely(GetSharedData().fixedSurfaceSize)) + { + return; + } + + + _VisualElementImpl* pPresentation = null; + + if (likely(__pPresentation)) + { + pPresentation = __pPresentation; + } + else + { + pPresentation = this; + } + + if (likely(IsSurfaceNeeded())) + { + if (GetRoot()) + { + _RootVisualElement* pRoot = dynamic_cast<_RootVisualElement*>(GetRoot()->GetPublic()); + + if (pRoot && pRoot->GetNativeLayer()) + { + GetSharedData().fixedSurfaceSize = false; + + float surfaceWidth = __bounds.width; + float surfaceHeight = __bounds.height; + + if (likely(GetSharedData().CreateSurface(FloatDimension(surfaceWidth, surfaceHeight), *pRoot->GetNativeLayer()) == E_SUCCESS)) + { + if (unlikely(!HAVE_SURFACE(this))) + { + pPresentation->InvalidateVisibleRectToRenderTarget(null); + } + + SetSurfaceChanged(); + } + } + } + } + else // surface not needed, so remove Surface + { + if (unlikely(HAVE_SURFACE(this))) + { + GetSharedData().RemoveSurface(*pPresentation); + SetSurfaceChanged(); + } + } +} + +_VisualElementImpl* +_VisualElementImpl::GetRenderTarget(void) const +{ + _VisualElementImpl* pRenderTarget = const_cast< _VisualElementImpl* >(this); + + while (likely(pRenderTarget)) + { + if (likely(NEED_SURFACE(pRenderTarget))) + { + return pRenderTarget; + } + + pRenderTarget = pRenderTarget->__pParent; + } + + return null; +} + +VisualElementSurface* +_VisualElementImpl::GetSurfaceN(void) const +{ + _VisualElementImpl* pThis = const_cast< _VisualElementImpl* >(this); + pThis->RebuildHierarchyProps(0, true, true); + + SysTryReturn(NID_UI_ANIM, pThis->IsSurfaceNeeded() && HAVE_SURFACE(pThis), null, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Realizing back-buffer surface failed."); + + VisualElementSurface* pSurface = new (std::nothrow) VisualElementSurface(*pThis->GetSharedData().pSurface); + SysTryReturn(NID_UI_ANIM, pSurface, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + ClearLastResult(); + + return pSurface; +} + +result +_VisualElementImpl::SetSurface(const VisualElementSurface* pSurface) +{ + SysTryReturnResult(NID_UI_ANIM, IS_MODEL(this), E_INVALID_OPERATION, "VisualElement is not Model object."); + SysTryReturnResult(NID_UI_ANIM, NEED_SURFACE(this), E_INVALID_OPERATION, "A surface cannot be set if VisualElement need no back-buffer."); + + if (unlikely(pSurface == GetSharedData().pSurface)) + { + return E_SUCCESS; + } + + if (likely(pSurface) && likely(GetSharedData().pSurface)) + { + if (unlikely(pSurface->Equals(*GetSharedData().pSurface))) + return E_SUCCESS; + } + + if (likely(pSurface)) + { + unique_ptr pTempSurface(new (std::nothrow) VisualElementSurface(*pSurface)); + SysTryReturnResult(NID_UI_ANIM, pTempSurface, E_OUT_OF_MEMORY, "Memory allocation failed."); + + // Delete the old surface + if (GetSharedData().pSurface) + { + delete GetSharedData().pSurface; + } + + GetSharedData().pSurface = pTempSurface.release(); + GetSharedData().fixedSurfaceSize = true; + + // Clear invalidated region if newly fixed-size surface is attached which do not need(inhibit) redrawing + GetSharedData().invalidatedRegion.SetBounds(0.0f, 0.0f, __bounds.width, __bounds.height); + } + else + { + // Delete the old surface + if (GetSharedData().pSurface) + { + delete GetSharedData().pSurface; + } + + __needRecreateSurface = true; + + GetSharedData().pSurface = null; + GetSharedData().fixedSurfaceSize = false; + + // Fully invalidate because new surface should be allocated and redrawn + GetSharedData().invalidatedRegion.SetBounds(0.0f, 0.0f, __bounds.width, __bounds.height); + } + + + SetSurfaceChanged(); + + return E_SUCCESS; +} + +result +_VisualElementImpl::SetImageSource(const String& filePath) +{ + result r = E_SUCCESS; + + // Delete the old surface + if (GetSharedData().pSurface) + { + delete GetSharedData().pSurface; + } + + __needRecreateSurface = true; + + GetSharedData().pSurface = null; + GetSharedData().fixedSurfaceSize = false; + + // Fully invalidate because new surface should be allocated and redrawn + GetSharedData().invalidatedRegion.SetBounds(0.0f, 0.0f, __bounds.width, __bounds.height); + + + RebuildHierarchyProps(0, true, true); + + SysTryReturnResult(NID_UI_ANIM, HAVE_SURFACE(this), E_SYSTEM, "Realizing back-buffer surface failed."); + + if (!filePath.IsEmpty()) + { + r = GetSharedData().SetImage(filePath); + SysTryLog(NID_UI_ANIM, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + } + + __imageFilePath = filePath; + + return r; +} + +String +_VisualElementImpl::GetImageSource(void) const +{ + return GetSharedData().GetImage(); +} + +void +_VisualElementImpl::SetSurfaceChanged(void) +{ + GetSharedData().surfaceChanged = true; + + if (likely(!IS_PRESENTATION(this))) + { + if(__pPresentation) + { + _VisualElementImpl* pElement = __pPresentation; + while (pElement) + { + pElement->GetSharedData().childrenSurfaceChanged = true; + pElement = pElement->__pParent; + } + } + } + else + { + _VisualElementImpl* pElement = this; + while (pElement) + { + pElement->GetSharedData().childrenSurfaceChanged = true; + pElement = pElement->__pParent; + } + } +} + +result +_VisualElementImpl::SetContentBoundsI(const FloatRectangle& contentBounds) +{ +// const Dimension& surfaceSize = GetSharedData().pSurface->GetSize(); +// SysTryReturn(NID_UI_ANIM, +// contentBounds.x >= 0 && contentBounds.y >= 0 && contentBounds.width >= 0 && contentBounds.height >= 0 && +// contentBounds.x + contentBounds.width <= surfaceSize.width && contentBounds.y + contentBounds.height <= surfaceSize.height, +// E_INVALID_ARG, +// E_INVALID_ARG, +// "[E_INVALID_ARG] Invalid content bounds.(%f,%f,%f,%f)", contentBounds.x, contentBounds.y, contentBounds.width, contentBounds.height +// ); + + if (unlikely(RectUtilIsEqual(__contentBounds, contentBounds))) + return E_SUCCESS; + + SysTryReturnResult(NID_UI_ANIM, contentBounds.width > 0.0f && contentBounds.height > 0.0f, E_INVALID_ARG, "Invalid argument(s) is used. The size of contents bounds must be greater than or equal to 0.0f."); + + __contentBounds = contentBounds; + __useContentBounds = (__contentBounds.x != 0.0f || __contentBounds.y != 0.0f || __contentBounds.width != 1.0f || __contentBounds.height != 1.0f); + + InvalidateHierarchyProps(HIERARCHY_PROPERTY_CONTENTBOUNDS, false, false); + + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + FloatRectangle currentValue = __pPresentation->__contentBounds; + + if(CreateImplicitAnimationIfNeeded(*pVePropContentBounds, __contentBounds, currentValue, NULL) == false) + { + __pPresentation->SetContentBoundsProperty(__contentBounds); + } + } + + return E_SUCCESS; +} + +result +_VisualElementImpl::SetContentBounds(const FloatRectangle& contentBounds) +{ + SysTryReturnResult(NID_UI_ANIM, IS_MODEL(this), E_INVALID_OPERATION, "VisualElement is not Model object."); + result r = InvokeOnSetPropertyRequested(*pVePropContentBounds, Variant(contentBounds)); + SysTryLog(NID_UI_ANIM, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +FloatRectangle +_VisualElementImpl::GetContentBounds(void) const +{ + ClearLastResult(); + + return __contentBounds; +} + +Variant +_VisualElementImpl::GetContentBoundsProperty(void) const +{ + ClearLastResult(); + + return Variant(__contentBounds); +} + +result +_VisualElementImpl::SetContentBoundsProperty(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 SetContentBoundsI(v.ToFloatRectangle()); +} + + +bool +_VisualElementImpl::GetImplicitAnimationEnabled(void) const +{ + ClearLastResult(); + + return __isImplicitAnimationEnabled; +} + +result +_VisualElementImpl::SetImplicitAnimationEnabled(bool enable) +{ + SysTryReturnResult(NID_UI_ANIM, IS_MODEL(this), E_INVALID_OPERATION, "VisualElement is not Model object."); + result r = InvokeOnSetPropertyRequested(*pVePropImplicitAnimationEnabled, Variant(enable)); + SysTryLog(NID_UI_ANIM, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +Variant +_VisualElementImpl::GetImplicitAnimationProperty(void) const +{ + ClearLastResult(); + + return Variant(__isImplicitAnimationEnabled); +} + +result +_VisualElementImpl::SetImplicitAnimationProperty(const Variant& v) +{ + SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_BOOL, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + + bool isImplicitAnimationEnabled = v.ToBool(); + if (isImplicitAnimationEnabled != __isImplicitAnimationEnabled) + { + __isImplicitAnimationEnabled = isImplicitAnimationEnabled; + } + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + __pPresentation->SetImplicitAnimationProperty(__isImplicitAnimationEnabled); + } + + return E_SUCCESS; +} + +FloatRectangle +_VisualElementImpl::GetBoundingBox(void) const +{ + ClearLastResult(); + + return GetBoundingBoxI(); +} + +FloatRectangle +_VisualElementImpl::GetBounds(void) const +{ + ClearLastResult(); + + return __bounds; +} + +result +_VisualElementImpl::SetBoundsI(const FloatRectangle& bounds, bool& sizeChanged) +{ + _Rectanglef boundsAdjusted(bounds); + + result r = E_SUCCESS; + sizeChanged = false; + + if (unlikely(GetSharedData().pEventListener != null)) + { + if (IS_MODEL(this)) // CHECKME: checking need?? + { + FloatRectangle tmpBounds(bounds); + r = VE_DELEGATE(this, InvokeOnBoundsChanging, tmpBounds); + + boundsAdjusted = tmpBounds; + } + } + + if (likely(boundsAdjusted != __bounds)) + { + float newWidth = boundsAdjusted.Width(); + if (unlikely(newWidth < 0.0f)) + { + newWidth = 0.0f; + } + + float newHeight = boundsAdjusted.Height(); + if (unlikely(newHeight < 0.0f)) + { + newHeight = 0.0f; + } + + if (unlikely(newWidth != __bounds.width) || unlikely(newHeight != __bounds.height)) + { + sizeChanged = true; + + // WARNING: + // Adjust logical bounds(size) to sync. with that of surface(physical) + + float alignedWidth = newWidth; + float alignedHeight = newHeight; + + __needRecreateSurface = true; + + _VisualElementCoordinateSystem::ConvertDimensionToPhysicalIntegral(alignedWidth, alignedHeight); + + if (likely(GetSharedData().pSurface)) + { + FloatDimension surfaceSize(GetSharedData().pSurface->GetSizeF()); + + _VisualElementCoordinateSystem::ConvertDimensionToPhysicalIntegral(surfaceSize.width, surfaceSize.height); + if (likely(alignedWidth == surfaceSize.width) && likely(alignedHeight == surfaceSize.height)) + { + __needRecreateSurface = false; + } + } + + _VisualElementCoordinateSystem::ConvertDimensionToLogical(alignedWidth, alignedHeight); + + if (newWidth > 0.0f && alignedWidth == 0.0f) + { + _VisualElementCoordinateSystem::MakeLogicalWidthForPhysicalOne(alignedWidth); + } + + if (newHeight > 0.0f && alignedHeight == 0.0f) + { + _VisualElementCoordinateSystem::MakeLogicalHeightForPhysicalOne(alignedHeight); + } + + __alignedSize.width = alignedWidth; + __alignedSize.height = alignedHeight; + } + + // TODO: Need to optimize dirty rectangle. + + // invalidate with previous bounds + if (unlikely(!NEED_SURFACE(this))) + InvalidateVisibleRectToRenderTarget(null); + + __bounds.x = boundsAdjusted.Left(); + __bounds.y = boundsAdjusted.Top(); + __bounds.width = newWidth; + __bounds.height = newHeight; + + InvalidateHierarchyProps(HIERARCHY_PROPERTY_COORDINATES, true, false); + + // TBD: Recreating surface may have to be done in presentation layer (thread!) + + // WARNING: + // Even when 'no redrawOnResize', it is needed to invalidate for redrawing if surface is not created yet. + // + if (unlikely(sizeChanged)) + { + if (unlikely(!NEED_SURFACE(this)) || unlikely(GetSharedData().redrawOnResize)) + ExposeRectangle(null, true); + + // WARNING: + // Shrink invalidated region to bounds + RectUtilIntersect(GetSharedData().invalidatedRegion, FloatRectangle(0.0f, 0.0f, __bounds.width, __bounds.height)); + } + else + { + if (unlikely(!NEED_SURFACE(this))) + ExposeRectangle(null, true); + } + } + + 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, 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 + { + r = InvokeOnSetPropertyRequested(*pVePropBounds, Variant(bounds)); + } + SysTryLog(NID_UI_ANIM, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +Variant +_VisualElementImpl::GetBoundsProperty(void) const +{ + ClearLastResult(); + + return Variant(__bounds); +} + +result +_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); + + 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 +_VisualElementImpl::GetBoundsPositionSubProperty(void) const +{ + ClearLastResult(); + + return Variant(__bounds.GetTopLeft()); +} + +result +_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(); + 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 +_VisualElementImpl::GetBoundsSizeSubProperty(void) const +{ + ClearLastResult(); + + return Variant(FloatDimension(__bounds.width, __bounds.height)); +} + +result +_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(); + 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 +_VisualElementImpl::GetZPosition(void) const +{ + ClearLastResult(); + + return __zPosition; +} + +result +_VisualElementImpl::SetZPositionI(float zPosition) +{ + if (likely(zPosition != __zPosition)) + { + __zPosition = zPosition; + InvalidateHierarchyProps(HIERARCHY_PROPERTY_COORDINATES, true, false); // lazy evaluation: property changed flag + } + + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + float currentValue = __pPresentation->__zPosition; + + if(CreateImplicitAnimationIfNeeded(*pVePropZPosition, __zPosition, currentValue, NULL) == false) + { + __pPresentation->SetZPositionProperty(__zPosition); + } + } + + return E_SUCCESS; +} + + +result +_VisualElementImpl::SetZPosition(float zPosition) +{ + SysTryReturnResult(NID_UI_ANIM, IS_MODEL(this), E_INVALID_OPERATION, "VisualElement is not Model object."); + result r = E_SUCCESS; + + if (IS_INTERNAL_CLASS(__pPublicInstance)) + { + r = SetZPositionI(zPosition); + } + else + { + r = InvokeOnSetPropertyRequested(*pVePropZPosition, Variant(zPosition)); + } + + SysTryLog(NID_UI_ANIM, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + + + +Variant +_VisualElementImpl::GetZPositionProperty(void) const +{ + ClearLastResult(); + + return Variant(__zPosition); +} + +result +_VisualElementImpl::SetZPositionProperty(const Variant& v) +{ + SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + + return SetZPositionI(v.ToFloat()); +} + +result +_VisualElementImpl::SetZOrderGroupI(int zOrderGroup) +{ + result r = E_SUCCESS; + + if (likely(__pParent)) + { + r= __pParent->ChangeZOrder(*this, null, true, zOrderGroup); + } + else + { + _zOrderGroup = zOrderGroup; + } + + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + __pPresentation->SetZOrderGroupProperty(_zOrderGroup); + } + return r; +} + +result +_VisualElementImpl::SetZOrderGroup(int zOrderGroup) +{ + SysTryReturnResult(NID_UI_ANIM, IS_MODEL(this), E_INVALID_OPERATION, "VisualElement is not Model object."); + result r = E_SUCCESS; + + if (IS_INTERNAL_CLASS(__pPublicInstance)) + { + r = SetZOrderGroupI(zOrderGroup); + } + else + { + r = InvokeOnSetPropertyRequested(*pVePropZOrderGroup, Variant(zOrderGroup)); + } + + SysTryLog(NID_UI_ANIM, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +int +_VisualElementImpl::GetZOrderGroup(void) const +{ + ClearLastResult(); + + return _zOrderGroup; +} + +Variant +_VisualElementImpl::GetZOrderGroupProperty(void) const +{ + ClearLastResult(); + + return Variant(_zOrderGroup); +} + +result +_VisualElementImpl::SetZOrderGroupProperty(const Variant& v) +{ + SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_INT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + + return SetZOrderGroupI(v.ToInt()); +} + +bool +_VisualElementImpl::IsVisible(void) const +{ + ClearLastResult(); + + return IsVisibleI(); +} + +bool +_VisualElementImpl::GetShowState(void) const +{ + ClearLastResult(); + + return VE_VISIBLE(this); +} + +result +_VisualElementImpl::SetShowOpacityI(float showOpacity) +{ + bool oldShowState = SHOWOPACITY_VISIBLE(__showOpacity); + + if (unlikely(showOpacity < 0.0f)) + { + showOpacity = 0.0f; + } + else if (unlikely(showOpacity > 1.0f)) + { + showOpacity = 1.0f; + } + + if (likely(__showOpacity != showOpacity)) + { + + bool showStateChanged = (oldShowState != SHOWOPACITY_VISIBLE(showOpacity)); + + __showOpacity = showOpacity; + + if (likely(showStateChanged)) + { + if (!oldShowState) + { + // WARNING: + // Coordinates are calculated using visibleRect which is empty when invisible state. + // Show-Recalculation is needed when being visible ! + InvalidateHierarchyProps(HIERARCHY_PROPERTY_COORDINATES | HIERARCHY_PROPERTY_SHOWSTATE | HIERARCHY_PROPERTY_OPACITY, true, false); + + if (unlikely(!NEED_SURFACE(this))) + { + ExposeRectangle(null, true); + } + } + else + { + InvalidateHierarchyProps(HIERARCHY_PROPERTY_SHOWSTATE | HIERARCHY_PROPERTY_OPACITY, true, false); + + if (unlikely(!NEED_SURFACE(this))) + { + InvalidateVisibleRectToRenderTarget(null); + } + } + } + else + { + // WARNING: + // showOpacity is applicable only for surfaces + if (likely(NEED_SURFACE(this))) + { + InvalidateHierarchyProps(HIERARCHY_PROPERTY_OPACITY, true, false); + } + } + } + //Observer + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + bool needPresentationUpdate = true; + const String& property = *pVePropShowState; + _AnimationManager* pAnimationManager = _AnimationManager::GetInstance(); + + if (pAnimationManager) + { + if (likely(GetRoot()) && (unlikely(pAnimationManager->IsImplicitAnimationEnabled() && __isImplicitAnimationEnabled))) + { + // WARNING: + // For performance, following must be done only when oldValue != newValue. + VisualElementAnimation* pAnimation = InvokeCreateAnimationForProperty(property); + VisualElementPropertyAnimation* pPropertyAnimation = NULL; + if(!pAnimation) + { + pPropertyAnimation = new (std::nothrow) VisualElementPropertyAnimation(); + if(pPropertyAnimation) + { + pPropertyAnimation->SetPropertyName(*pVePrivPropShowOpacity); + needPresentationUpdate = true; + } + } + else + { + pPropertyAnimation = dynamic_cast< VisualElementPropertyAnimation* >(pAnimation); + } + + if (likely(pPropertyAnimation)) + { + if (pPropertyAnimation->GetEndValue().IsEmpty()) + { + pPropertyAnimation->SetEndValue(__showOpacity); + } + + if (pPropertyAnimation->GetStartValue().IsEmpty()) + { + pPropertyAnimation->SetStartValue(__pPresentation->__showOpacity); + } + } + + if (unlikely(pPropertyAnimation)) + { + /// WARNING: + // Adding property animation causes previous animation for same property to be removed in Animation Manager. + if (unlikely(IsFailed(AddAnimation(null, *pPropertyAnimation)))) + { + needPresentationUpdate = true; + //pAnimationManager->RemoveAnimationByProperty(*presentation.GetPublic(), property); + } + + delete pPropertyAnimation; + } + else + { + // WARNING: + // Remove previous animation even when trying to change the property without animation. + pAnimationManager->RemoveAnimationByProperty(*__pPresentation->__pPublicInstance, property); + pAnimationManager->RemoveAnimationByProperty(*__pPresentation->__pPublicInstance, *pVePrivPropShowOpacity); + needPresentationUpdate = true; + } + } + else + { + pAnimationManager->RemoveAnimationByProperty(*__pPresentation->__pPublicInstance, property); + pAnimationManager->RemoveAnimationByProperty(*__pPresentation->__pPublicInstance, *pVePrivPropShowOpacity); + needPresentationUpdate = true; + + } + if(needPresentationUpdate) + { + __pPresentation->SetShowStateProperty(SHOWOPACITY_VISIBLE(__showOpacity)); + } + InvokeOnShowStateChanged(oldShowState); + } + } + + return E_SUCCESS; +} + +result +_VisualElementImpl::SetShowStateI(bool show) +{ + return SetShowOpacityI(show ? 1.0f : 0.0f); +} + +result +_VisualElementImpl::SetShowState(bool show) +{ + SysTryReturnResult(NID_UI_ANIM, IS_MODEL(this), E_INVALID_OPERATION, "VisualElement is not Model object."); + result r = E_SUCCESS; + + if (IS_INTERNAL_CLASS(__pPublicInstance)) + { + r = SetShowOpacityI(show ? 1.0f : 0.0f); + } + else + { + r = InvokeOnSetPropertyRequested(*pVePropShowState, Variant(show)); + } + + SysTryLog(NID_UI_ANIM, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +Variant +_VisualElementImpl::GetShowStateProperty(void) const +{ + ClearLastResult(); + + return Variant(VE_VISIBLE(this)); +} + +result +_VisualElementImpl::SetShowStateProperty(const Variant& v) +{ + SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_BOOL, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + + bool showState = v.ToBool(); + + return SetShowOpacityI(showState ? 1.0f : 0.0f); +} + +Variant +_VisualElementImpl::GetShowOpacityPrivateProperty(void) const +{ + ClearLastResult(); + + return Variant(__showOpacity); +} + +result +_VisualElementImpl::SetShowOpacityPrivateProperty(const Variant& v) +{ + SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + + return SetShowOpacityI(v.ToFloat()); +} + +float +_VisualElementImpl::GetContentOpacity(void) const +{ + ClearLastResult(); + + return __contentOpacity; +} + +result +_VisualElementImpl::SetContentOpacityI(float contentOpacity) +{ + if (unlikely(contentOpacity == __contentOpacity)) // do not take care of float-error !! + { + return E_SUCCESS; + } + + SysTryReturnResult(NID_UI_ANIM, contentOpacity >= 0.0f && contentOpacity <= 1.0f, E_INVALID_ARG, "Invalid argument(s) is used. Invalid opacity range."); + + __contentOpacity = contentOpacity; + + InvalidateHierarchyProps(HIERARCHY_PROPERTY_CONTENTOPACITY, false, false); //don't have to apply the changed opacity to children. + +#ifndef LAZY_EVALUATION + if (IS_PRESENTATION(this) && likely(__pSharedData) && likely(GetSharedData().pNativeNode)) + { + GetSharedData().NodeReconfigure(*this); + } +#endif + + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + float currentValue = __pPresentation->__contentOpacity; + + if(CreateImplicitAnimationIfNeeded(*pVePropContentOpacity, __contentOpacity, currentValue, NULL) == false) + { + __pPresentation->SetContentOpacityProperty(__contentOpacity); + } + } + return E_SUCCESS; +} + + +result +_VisualElementImpl::SetContentOpacity(float contentOpacity) +{ + SysTryReturnResult(NID_UI_ANIM, IS_MODEL(this), E_INVALID_OPERATION, "VisualElement is not Model object."); + result r = E_SUCCESS; + +// PROPERTY_PROCESS(SetContentOpacityI, GetContentOpacityProperty, SetContentOpacityProperty, pVePropContentOpacity, __contentOpacity, contentOpacity); + if (IS_INTERNAL_CLASS(__pPublicInstance)) + { + r = SetContentOpacityI(contentOpacity); + } + else + { + r = InvokeOnSetPropertyRequested(*pVePropContentOpacity, Variant(contentOpacity)); + } + + SysTryLog(NID_UI_ANIM, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + + +Variant +_VisualElementImpl::GetContentOpacityProperty(void) const +{ + ClearLastResult(); + + return Variant(__contentOpacity); +} + +result +_VisualElementImpl::SetContentOpacityProperty(const Variant& v) +{ + SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + + return SetContentOpacityI(v.ToFloat()); +} + +float +_VisualElementImpl::GetOpacity(void) const +{ + ClearLastResult(); + + return __opacity; +} + +result +_VisualElementImpl::SetOpacityI(float opacity) +{ + if (likely(opacity != __opacity)) // do not take care of float-error !! + { + if (unlikely(opacity > 1.0f)) + { + opacity = 1.0f; + } + else if (unlikely(opacity < 0.0f)) + { + opacity = 0.0f; + } + + __opacity = opacity; + + InvalidateHierarchyProps(HIERARCHY_PROPERTY_OPACITY, true, false); + } + + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + float currentValue = __pPresentation->__opacity; + + if(CreateImplicitAnimationIfNeeded(*pVePropOpacity, __opacity, currentValue, NULL) == false) + { + __pPresentation->SetOpacityProperty(__opacity); + } + } + return E_SUCCESS; +} + +result +_VisualElementImpl::SetOpacity(float opacity) +{ + SysTryReturnResult(NID_UI_ANIM, IS_MODEL(this), E_INVALID_OPERATION, "VisualElement is not Model object."); + result r = E_SUCCESS; + +// PROPERTY_PROCESS(SetOpacityI, GetOpacityProperty, SetOpacityProperty, pVePropOpacity, __opacity, opacity); + if (IS_INTERNAL_CLASS(__pPublicInstance)) + { + r = SetOpacityI(opacity); + } + else + { + r = InvokeOnSetPropertyRequested(*pVePropOpacity, Variant(opacity)); + } + + SysTryLog(NID_UI_ANIM, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +Variant +_VisualElementImpl::GetOpacityProperty(void) const +{ + ClearLastResult(); + + return Variant(__opacity); +} + +result +_VisualElementImpl::SetOpacityProperty(const Variant& v) +{ + SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + + return SetOpacityI(v.ToFloat()); +} + +FloatPoint +_VisualElementImpl::GetAnchor(void) const +{ + ClearLastResult(); + + return __anchor; +} + +result +_VisualElementImpl::SetAnchorI(const FloatPoint& anchor) +{ + if (likely(anchor != __anchor)) + { + + __anchor = anchor; + + InvalidateHierarchyProps(HIERARCHY_PROPERTY_COORDINATES, true, false); + + // VE with surface will be exposed automatically on rebuilding coordinates... + if (unlikely(!HAVE_SURFACE(this))) + { + ExposeRectangle(null, true); // CHECKME: needed ??? + } + } + + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + FloatPoint currentValue = __pPresentation->__anchor; + + if(CreateImplicitAnimationIfNeeded(*pVePropAnchor, __anchor, currentValue, NULL) == false) + { + __pPresentation->SetAnchorProperty(__anchor); + } + } + return E_SUCCESS; +} + + +result +_VisualElementImpl::SetAnchor(const FloatPoint& anchor) +{ + SysTryReturnResult(NID_UI_ANIM, IS_MODEL(this), E_INVALID_OPERATION, "VisualElement is not Model object."); + result r = E_SUCCESS; + +// PROPERTY_PROCESS(SetAnchorI, GetAnchorProperty, SetAnchorProperty, pVePropAnchor, __anchor, anchor); + if (IS_INTERNAL_CLASS(__pPublicInstance)) + { + r = SetAnchorI(anchor); + } + else + { + r = InvokeOnSetPropertyRequested(*pVePropAnchor, Variant(anchor)); + } + + SysTryLog(NID_UI_ANIM, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + + +Variant +_VisualElementImpl::GetAnchorProperty(void) const +{ + ClearLastResult(); + + return Variant(__anchor); +} + +result +_VisualElementImpl::SetAnchorProperty(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); + + return SetAnchorI(v.ToFloatPoint()); +} + +float +_VisualElementImpl::GetAnchorZ(void) const +{ + ClearLastResult(); + + return __anchorZ; +} + +result +_VisualElementImpl::SetAnchorZI(float anchorZ) +{ + if (likely(anchorZ != __anchorZ)) + { + __anchorZ = anchorZ; + + InvalidateHierarchyProps(HIERARCHY_PROPERTY_COORDINATES, true, false); + + // VE with surface will be exposed automatically on rebuilding coordinates... + if (unlikely(!HAVE_SURFACE(this))) + { + ExposeRectangle(null, true); // CHECKME: needed ??? + } + } + + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + float currentValue = __pPresentation->__anchorZ; + + if(CreateImplicitAnimationIfNeeded(*pVePropAnchorZ, __anchorZ, currentValue, NULL) == false) + { + __pPresentation->SetAnchorZProperty(__anchorZ); + } + } + return E_SUCCESS; +} + + +result +_VisualElementImpl::SetAnchorZ(float anchorZ) +{ + SysTryReturnResult(NID_UI_ANIM, IS_MODEL(this), E_INVALID_OPERATION, "VisualElement is not Model object."); + result r = E_SUCCESS; + +// PROPERTY_PROCESS(SetAnchorZI, GetAnchorZProperty, SetAnchorZProperty, pVePropAnchorZ, __anchorZ, anchorZ); + if (IS_INTERNAL_CLASS(__pPublicInstance)) + { + r = SetAnchorZI(anchorZ); + } + else + { + r = InvokeOnSetPropertyRequested(*pVePropAnchorZ, Variant(anchorZ)); + } + + SysTryLog(NID_UI_ANIM, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + + + +Variant +_VisualElementImpl::GetAnchorZProperty(void) const +{ + ClearLastResult(); + + return Variant(__anchorZ); +} + +result +_VisualElementImpl::SetAnchorZProperty(const Variant& v) +{ + SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_FLOAT, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + + return SetAnchorZI(v.ToFloat()); +} + +FloatMatrix4 +_VisualElementImpl::GetTransformMatrix(void) const +{ + ClearLastResult(); + + return __transform; +} + +result +_VisualElementImpl::SetTransformMatrixI(const FloatMatrix4& xform, bool updateDecomposed) +{ + + result r = E_SUCCESS; + + FloatMatrix4 matrixAdjusted(xform); + + if (unlikely(GetSharedData().pEventListener != null)) + { + if (IS_MODEL(this)) // CHECKME: checking need?? + { + r = VE_DELEGATE(this, InvokeOnTransformMatrixChanging, matrixAdjusted); + } + } + + if (r == E_SUCCESS && likely(matrixAdjusted != __transform)) // check again because delegate may change the transform matrix + { + // render target updates for previous bounds + if (unlikely(!NEED_SURFACE(this))) + { + InvalidateVisibleRectToRenderTarget(null); + } + + + MatrixUtilCopy(__transform, matrixAdjusted); + + if (unlikely(updateDecomposed)) + { + __decomposedTransform.SetTransformMatrix(__transform); + } + + InvalidateHierarchyProps(HIERARCHY_PROPERTY_COORDINATES, true, false); + + // VE with surface will be exposed automatically on rebuilding coordinates... + if (unlikely(!NEED_SURFACE(this))) + { + ExposeRectangle(null, true); // CHECKME: needed ??? + } + } + + return E_SUCCESS; +} + +result +_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 + { + r = InvokeOnSetPropertyRequested(*pVePropTransform, Variant(xform)); + } + + SysTryLog(NID_UI_ANIM, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + + + +Variant +_VisualElementImpl::GetTransformMatrixProperty(void) const +{ + ClearLastResult(); + + return Variant(__transform); +} + + +result +_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); + + 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 +_VisualElementImpl::GetTransformRotationXSubProperty(void) const +{ + ClearLastResult(); + + float angleX = 0.0f; + float angleY = 0.0f; + float angleZ = 0.0f; + __decomposedTransform.GetEulerAngles(angleX, angleY, angleZ); + + return Variant(angleX); +} + +result +_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); + + 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 +_VisualElementImpl::GetTransformRotationYSubProperty(void) const +{ + ClearLastResult(); + + float angleX = 0.0f; + float angleY = 0.0f; + float angleZ = 0.0f; + __decomposedTransform.GetEulerAngles(angleX, angleY, angleZ); + + return Variant(angleY); +} + +result +_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); + + 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 +_VisualElementImpl::GetTransformRotationZSubProperty(void) const +{ + ClearLastResult(); + + float angleX = 0.0f; + float angleY = 0.0f; + float angleZ = 0.0f; + __decomposedTransform.GetEulerAngles(angleX, angleY, angleZ); + + return Variant(angleZ); +} + +result +_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()); + + 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 +_VisualElementImpl::GetTransformRotationXYSubProperty(void) const +{ + ClearLastResult(); + + float angleX = 0.0f; + float angleY = 0.0f; + float angleZ = 0.0f; + __decomposedTransform.GetEulerAngles(angleX, angleY, angleZ); + + return Variant(FloatPoint(angleX, angleY)); +} + +result +_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; + float angleY = 0.0f; + float angleZ = 0.0f; + __decomposedTransform.GetEulerAngles(angleX, angleY, angleZ); + __decomposedTransform.UpdateRotationFromEulerAngles(point.x, point.y, angleZ); + + 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 +_VisualElementImpl::GetTransformRotationAnchorXSubProperty(void) const +{ + ClearLastResult(); + + float anchorX = 0.0f; + float anchorY = 0.0f; + float anchorZ = 0.0f; + __decomposedTransform.GetRotationAnchor(anchorX, anchorY, anchorZ); + + return Variant(anchorX); +} + +result +_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); + + 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 +_VisualElementImpl::GetTransformRotationAnchorYSubProperty(void) const +{ + ClearLastResult(); + + float anchorX = 0.0f; + float anchorY = 0.0f; + float anchorZ = 0.0f; + __decomposedTransform.GetRotationAnchor(anchorX, anchorY, anchorZ); + + return Variant(anchorY); +} + +result +_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); + + 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 +_VisualElementImpl::GetTransformRotationAnchorZSubProperty(void) const +{ + ClearLastResult(); + + float anchorX = 0.0f; + float anchorY = 0.0f; + float anchorZ = 0.0f; + __decomposedTransform.GetRotationAnchor(anchorX, anchorY, anchorZ); + + return Variant(anchorZ); +} + +result +_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()); + + 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 +_VisualElementImpl::GetTransformRotationAnchorXYSubProperty(void) const +{ + ClearLastResult(); + + float anchorX = 0.0f; + float anchorY = 0.0f; + float anchorZ = 0.0f; + __decomposedTransform.GetRotationAnchor(anchorX, anchorY, anchorZ); + + return Variant(FloatPoint(anchorX, anchorY)); +} + +result +_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; + float anchorY = 0.0f; + float anchorZ = 0.0f; + __decomposedTransform.GetRotationAnchor(anchorX, anchorY, anchorZ); + __decomposedTransform.SetRotationAnchor(point.x, point.y, anchorZ); + + 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 +_VisualElementImpl::GetTransformScaleXSubProperty(void) const +{ + ClearLastResult(); + + float scaleX = 1.0f; + float scaleY = 1.0f; + float scaleZ = 1.0f; + __decomposedTransform.GetScaleFactors(scaleX, scaleY, scaleZ); + + return Variant(scaleX); +} + +result +_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); + + 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 +_VisualElementImpl::GetTransformScaleYSubProperty(void) const +{ + ClearLastResult(); + + float scaleX = 1.0f; + float scaleY = 1.0f; + float scaleZ = 1.0f; + __decomposedTransform.GetScaleFactors(scaleX, scaleY, scaleZ); + + return Variant(scaleY); +} + +result +_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); + + 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 +_VisualElementImpl::GetTransformScaleZSubProperty(void) const +{ + ClearLastResult(); + + float scaleX = 1.0f; + float scaleY = 1.0f; + float scaleZ = 1.0f; + __decomposedTransform.GetScaleFactors(scaleX, scaleY, scaleZ); + + return Variant(scaleZ); +} + +result +_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()); + + 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 +_VisualElementImpl::GetTransformScaleXYSubProperty(void) const +{ + ClearLastResult(); + + float scaleX = 1.0f; + float scaleY = 1.0f; + float scaleZ = 1.0f; + __decomposedTransform.GetScaleFactors(scaleX, scaleY, scaleZ); + + return Variant(FloatPoint(scaleX, scaleY)); +} + +result +_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); + + FloatMatrix4 oldValue(__transform); + + const FloatPoint& point = v.ToFloatPoint(); + float scaleX = 1.0f; + float scaleY = 1.0f; + float scaleZ = 1.0f; + __decomposedTransform.GetScaleFactors(scaleX, scaleY, scaleZ); + if (unlikely(scaleX == point.x) && unlikely(scaleY == point.y)) + { + return E_SUCCESS; + } + + __decomposedTransform.SetScaleFactors(point.x, point.y, scaleZ); + + 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 +_VisualElementImpl::GetTransformScaleAnchorXSubProperty(void) const +{ + ClearLastResult(); + + float anchorX = 0.0f; + float anchorY = 0.0f; + float anchorZ = 0.0f; + __decomposedTransform.GetScaleAnchor(anchorX, anchorY, anchorZ); + + return Variant(anchorX); +} + +result +_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); + + 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 +_VisualElementImpl::GetTransformScaleAnchorYSubProperty(void) const +{ + ClearLastResult(); + + float anchorX = 0.0f; + float anchorY = 0.0f; + float anchorZ = 0.0f; + __decomposedTransform.GetScaleAnchor(anchorX, anchorY, anchorZ); + + return Variant(anchorY); +} + +result +_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); + + 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 +_VisualElementImpl::GetTransformScaleAnchorZSubProperty(void) const +{ + ClearLastResult(); + + float anchorX = 0.0f; + float anchorY = 0.0f; + float anchorZ = 0.0f; + __decomposedTransform.GetScaleAnchor(anchorX, anchorY, anchorZ); + + return Variant(anchorZ); +} + +result +_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()); + + 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 +_VisualElementImpl::GetTransformScaleAnchorXYSubProperty(void) const +{ + ClearLastResult(); + + float anchorX = 0.0f; + float anchorY = 0.0f; + float anchorZ = 0.0f; + __decomposedTransform.GetScaleAnchor(anchorX, anchorY, anchorZ); + + return Variant(FloatPoint(anchorX, anchorY)); +} + +result +_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); + + 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 +_VisualElementImpl::GetTransformTranslationXSubProperty(void) const +{ + ClearLastResult(); + + float translateX = 0.0f; + float translateY = 0.0f; + float translateZ = 0.0f; + __decomposedTransform.GetTranslationFactors(translateX, translateY, translateZ); + + return Variant(translateX); +} + +result +_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); + + 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 +_VisualElementImpl::GetTransformTranslationYSubProperty(void) const +{ + ClearLastResult(); + + float translateX = 0.0f; + float translateY = 0.0f; + float translateZ = 0.0f; + __decomposedTransform.GetTranslationFactors(translateX, translateY, translateZ); + + return Variant(translateY); +} + +result +_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); + + 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 +_VisualElementImpl::GetTransformTranslationZSubProperty(void) const +{ + ClearLastResult(); + + float translateX = 0.0f; + float translateY = 0.0f; + float translateZ = 0.0f; + __decomposedTransform.GetTranslationFactors(translateX, translateY, translateZ); + + return Variant(translateZ); +} + +result +_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()); + + 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 +_VisualElementImpl::GetTransformTranslationXYSubProperty(void) const +{ + ClearLastResult(); + + float translateX = 0.0f; + float translateY = 0.0f; + float translateZ = 0.0f; + __decomposedTransform.GetTranslationFactors(translateX, translateY, translateZ); + + return Variant(FloatPoint(translateX, translateY)); +} + +result +_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); + + 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 +_VisualElementImpl::GetChildrenTransformMatrix(void) const +{ + ClearLastResult(); + + return __childrenTransform; +} + + +result +_VisualElementImpl::SetChildrenTransformMatrixI(const FloatMatrix4& xform, bool updateDecomposed) +{ + FloatMatrix4 matrixAdjusted(xform); + result r = E_SUCCESS; + + if (unlikely(GetSharedData().pEventListener != null)) + { + if (IS_MODEL(this)) // CHECKME: checking need?? + { + r = VE_DELEGATE(this, InvokeOnChildrenTransformMatrixChanging, matrixAdjusted); + } + } + + + if (r == E_SUCCESS && likely(matrixAdjusted != __childrenTransform)) // check again because delegate may change the transform matrix + { + + // May be un-needed from now...... (no support for VE without surface or shared-canvas) + if (!IS_PRESENTATION(this)) + { + int count = __children.GetCount(); + for (int i = 0; i < count; i++) + { + // VE with surface will be exposed automatically on rebuilding coordinates... + _VisualElementImpl* pVe = __children.GetChildAt(i); + if (pVe && !NEED_SURFACE(pVe)) + { + pVe->ExposeRectangle(null, true); + + // render target update for previous bounds + pVe->InvalidateVisibleRectToRenderTarget(null); + } + } + } + + MatrixUtilCopy(__childrenTransform, matrixAdjusted); + + if (unlikely(updateDecomposed)) + { + __decomposedChildrenTransform.SetTransformMatrix(__childrenTransform); + } + + InvalidateHierarchyProps(HIERARCHY_PROPERTY_COORDINATES, true, false); + } + + return E_SUCCESS; +} + + +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 + { + r = InvokeOnSetPropertyRequested(*pVePropChildrenTransform, Variant(xform)); + } + + SysTryLog(NID_UI_ANIM, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + return r; +} + +Variant +_VisualElementImpl::GetChildrenTransformMatrixProperty(void) const +{ + ClearLastResult(); + + return Variant(__childrenTransform); +} + + +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}; + + if(CreateImplicitAnimationIfNeeded(*pVePropChildrenTransform, __childrenTransform, currentValue, subProperties ) == false) + { + __pPresentation->SetChildrenTransformMatrixProperty(__childrenTransform); + } + + VE_DELEGATE(this, InvokeOnChildrenTransformMatrixChanged, oldValue); + } + return r; +} + +Variant +_VisualElementImpl::GetChildrenTransformRotationXSubProperty(void) const +{ + ClearLastResult(); + + float angleX = 0.0f; + float angleY = 0.0f; + float angleZ = 0.0f; + __decomposedChildrenTransform.GetEulerAngles(angleX, angleY, angleZ); + + return Variant(angleX); +} + +result +_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); + + 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 +_VisualElementImpl::GetChildrenTransformRotationYSubProperty(void) const +{ + ClearLastResult(); + + float angleX = 0.0f; + float angleY = 0.0f; + float angleZ = 0.0f; + __decomposedChildrenTransform.GetEulerAngles(angleX, angleY, angleZ); + + return Variant(angleY); +} + +result +_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); + + 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 +_VisualElementImpl::GetChildrenTransformRotationZSubProperty(void) const +{ + ClearLastResult(); + + float angleX = 0.0f; + float angleY = 0.0f; + float angleZ = 0.0f; + __decomposedChildrenTransform.GetEulerAngles(angleX, angleY, angleZ); + + return Variant(angleZ); +} + +result +_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()); + + 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 +_VisualElementImpl::GetChildrenTransformRotationXYSubProperty(void) const +{ + ClearLastResult(); + + float angleX = 0.0f; + float angleY = 0.0f; + float angleZ = 0.0f; + __decomposedChildrenTransform.GetEulerAngles(angleX, angleY, angleZ); + + return Variant(FloatPoint(angleX, angleY)); +} + +result +_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; + float angleY = 0.0f; + float angleZ = 0.0f; + __decomposedChildrenTransform.GetEulerAngles(angleX, angleY, angleZ); + __decomposedChildrenTransform.UpdateRotationFromEulerAngles(point.x, point.y, angleZ); + + 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 +_VisualElementImpl::GetChildrenTransformRotationAnchorXSubProperty(void) const +{ + ClearLastResult(); + + float anchorX = 0.0f; + float anchorY = 0.0f; + float anchorZ = 0.0f; + __decomposedChildrenTransform.GetRotationAnchor(anchorX, anchorY, anchorZ); + + return Variant(anchorX); +} + +result +_VisualElementImpl::SetChildrenTransformRotationAnchorXSubProperty(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.GetRotationAnchor(anchorX, anchorY, anchorZ); + __decomposedChildrenTransform.SetRotationAnchor(v.ToFloat(), anchorY, anchorZ); + + 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 +_VisualElementImpl::GetChildrenTransformRotationAnchorYSubProperty(void) const +{ + ClearLastResult(); + + float anchorX = 0.0f; + float anchorY = 0.0f; + float anchorZ = 0.0f; + __decomposedChildrenTransform.GetRotationAnchor(anchorX, anchorY, anchorZ); + + return Variant(anchorY); +} + +result +_VisualElementImpl::SetChildrenTransformRotationAnchorYSubProperty(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.GetRotationAnchor(anchorX, anchorY, anchorZ); + __decomposedChildrenTransform.SetRotationAnchor(anchorX, v.ToFloat(), anchorZ); + + 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 +_VisualElementImpl::GetChildrenTransformRotationAnchorZSubProperty(void) const +{ + ClearLastResult(); + + float anchorX = 0.0f; + float anchorY = 0.0f; + float anchorZ = 0.0f; + __decomposedChildrenTransform.GetRotationAnchor(anchorX, anchorY, anchorZ); + + return Variant(anchorZ); +} + +result +_VisualElementImpl::SetChildrenTransformRotationAnchorZSubProperty(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.GetRotationAnchor(anchorX, anchorY, anchorZ); + __decomposedChildrenTransform.SetRotationAnchor(anchorX, anchorY, v.ToFloat()); + + 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 +_VisualElementImpl::GetChildrenTransformRotationAnchorXYSubProperty(void) const +{ + ClearLastResult(); + + float anchorX = 0.0f; + float anchorY = 0.0f; + float anchorZ = 0.0f; + __decomposedChildrenTransform.GetRotationAnchor(anchorX, anchorY, anchorZ); + + return Variant(FloatPoint(anchorX, anchorY)); +} + +result +_VisualElementImpl::SetChildrenTransformRotationAnchorXYSubProperty(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 anchorX = 0.0f; + float anchorY = 0.0f; + float anchorZ = 0.0f; + __decomposedChildrenTransform.GetRotationAnchor(anchorX, anchorY, anchorZ); + __decomposedChildrenTransform.SetRotationAnchor(point.x, point.y, anchorZ); + + 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 +_VisualElementImpl::GetChildrenTransformScaleXSubProperty(void) const +{ + ClearLastResult(); + + float scaleX = 1.0f; + float scaleY = 1.0f; + float scaleZ = 1.0f; + __decomposedChildrenTransform.GetScaleFactors(scaleX, scaleY, scaleZ); + + return Variant(scaleX); +} + +result +_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); + + 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 +_VisualElementImpl::GetChildrenTransformScaleYSubProperty(void) const +{ + ClearLastResult(); + + float scaleX = 1.0f; + float scaleY = 1.0f; + float scaleZ = 1.0f; + __decomposedChildrenTransform.GetScaleFactors(scaleX, scaleY, scaleZ); + + return Variant(scaleY); +} + +result +_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); + + 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 +_VisualElementImpl::GetChildrenTransformScaleZSubProperty(void) const +{ + ClearLastResult(); + + float scaleX = 1.0f; + float scaleY = 1.0f; + float scaleZ = 1.0f; + __decomposedChildrenTransform.GetScaleFactors(scaleX, scaleY, scaleZ); + + return Variant(scaleZ); +} + +result +_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()); + + 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 +_VisualElementImpl::GetChildrenTransformScaleXYSubProperty(void) const +{ + ClearLastResult(); + + float scaleX = 1.0f; + float scaleY = 1.0f; + float scaleZ = 1.0f; + __decomposedChildrenTransform.GetScaleFactors(scaleX, scaleY, scaleZ); + + return Variant(FloatPoint(scaleX, scaleY)); +} + +result +_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; + float scaleY = 1.0f; + float scaleZ = 1.0f; + __decomposedChildrenTransform.GetScaleFactors(scaleX, scaleY, scaleZ); + __decomposedChildrenTransform.SetScaleFactors(point.x, point.y, scaleZ); + + 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 +_VisualElementImpl::GetChildrenTransformScaleAnchorXSubProperty(void) const +{ + ClearLastResult(); + + float anchorX = 0.0f; + float anchorY = 0.0f; + float anchorZ = 0.0f; + __decomposedChildrenTransform.GetScaleAnchor(anchorX, anchorY, anchorZ); + + return Variant(anchorX); +} + +result +_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); + + 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 +_VisualElementImpl::GetChildrenTransformScaleAnchorYSubProperty(void) const +{ + ClearLastResult(); + + float anchorX = 0.0f; + float anchorY = 0.0f; + float anchorZ = 0.0f; + __decomposedChildrenTransform.GetScaleAnchor(anchorX, anchorY, anchorZ); + + return Variant(anchorY); +} + +result +_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); + + 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 +_VisualElementImpl::GetChildrenTransformScaleAnchorZSubProperty(void) const +{ + ClearLastResult(); + + float anchorX = 0.0f; + float anchorY = 0.0f; + float anchorZ = 0.0f; + __decomposedChildrenTransform.GetScaleAnchor(anchorX, anchorY, anchorZ); + + return Variant(anchorZ); +} + +result +_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()); + + 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 +_VisualElementImpl::GetChildrenTransformScaleAnchorXYSubProperty(void) const +{ + ClearLastResult(); + + float anchorX = 0.0f; + float anchorY = 0.0f; + float anchorZ = 0.0f; + __decomposedChildrenTransform.GetScaleAnchor(anchorX, anchorY, anchorZ); + + return Variant(FloatPoint(anchorX, anchorY)); +} + +result +_VisualElementImpl::SetChildrenTransformScaleAnchorXYSubProperty(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(__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); + + 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 +_VisualElementImpl::GetChildrenTransformTranslationXSubProperty(void) const +{ + ClearLastResult(); + + float translateX = 0.0f; + float translateY = 0.0f; + float translateZ = 0.0f; + __decomposedChildrenTransform.GetTranslationFactors(translateX, translateY, translateZ); + + return Variant(translateX); +} + +result +_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); + + 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 +_VisualElementImpl::GetChildrenTransformTranslationYSubProperty(void) const +{ + ClearLastResult(); + + float translateX = 0.0f; + float translateY = 0.0f; + float translateZ = 0.0f; + __decomposedChildrenTransform.GetTranslationFactors(translateX, translateY, translateZ); + + return Variant(translateY); +} + +result +_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); + + 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 +_VisualElementImpl::GetChildrenTransformTranslationZSubProperty(void) const +{ + ClearLastResult(); + + float translateX = 0.0f; + float translateY = 0.0f; + float translateZ = 0.0f; + __decomposedChildrenTransform.GetTranslationFactors(translateX, translateY, translateZ); + + return Variant(translateZ); +} + +result +_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()); + + 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 +_VisualElementImpl::GetChildrenTransformTranslationXYSubProperty(void) const +{ + ClearLastResult(); + + float translateX = 0.0f; + float translateY = 0.0f; + float translateZ = 0.0f; + __decomposedChildrenTransform.GetTranslationFactors(translateX, translateY, translateZ); + + return Variant(FloatPoint(translateX, translateY)); +} + +result +_VisualElementImpl::SetChildrenTransformTranslationXYSubProperty(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 translateX = 0.0f; + float translateY = 0.0f; + float translateZ = 0.0f; + __decomposedChildrenTransform.GetTranslationFactors(translateX, translateY, translateZ); + __decomposedChildrenTransform.SetTranslationFactors(point.x, point.y, translateZ); + + 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 +_VisualElementImpl::IsClipToParent(void) const +{ + ClearLastResult(); + + return false; +} + +// TBD: clipToParent is not animatable, right?? +result +_VisualElementImpl::SetClipToParent(bool clipToParent) +{ + SysTryReturnResult(NID_UI_ANIM, IS_MODEL(this), E_INVALID_OPERATION, "VisualElement is not Model object."); + + return InvokeOnSetPropertyRequested(*pVePropClipToParent, Variant(clipToParent)); +} + +Variant +_VisualElementImpl::GetClipToParentProperty(void) const +{ + ClearLastResult(); + //SysLog(NID_UI_ANIM, "WARNING: ClipToParent is deprecated."); + + return Variant(false); +} + +result +_VisualElementImpl::SetClipToParentProperty(const Variant& v) +{ + SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_BOOL, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + + //SysLog(NID_UI_ANIM, "WARNING: ClipToParent is deprecated."); + + return E_SUCCESS; +} + +bool +_VisualElementImpl::IsClipChildrenEnabled(void) const +{ + ClearLastResult(); + + return __isClipChildren; +} + +result +_VisualElementImpl::SetClipChildrenEnabled(bool clipChildren) +{ + SysTryReturnResult(NID_UI_ANIM, IS_MODEL(this), E_INVALID_OPERATION, "VisualElement is not Model object."); + result r = E_SUCCESS; + + if (IS_INTERNAL_CLASS(__pPublicInstance)) + { + r = SetClipChildrenProperty(Variant(clipChildren)); + } + else + { + r = InvokeOnSetPropertyRequested(*pVePropClipChildren, Variant(clipChildren)); + } + SysTryLog(NID_UI_ANIM, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +Variant +_VisualElementImpl::GetClipChildrenProperty(void) const +{ + ClearLastResult(); + + return Variant(__isClipChildren); +} + +result +_VisualElementImpl::SetClipChildrenProperty(const Variant& v) +{ + SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_BOOL, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + + bool clipChildren = v.ToBool(); + if (likely(clipChildren != __isClipChildren)) + { + + //SysLog(NID_UI_ANIM, "%p ClipChildren = %d", this, clipChildren); + + __isClipChildren = clipChildren; + InvalidateHierarchyProps(HIERARCHY_PROPERTY_COORDINATES, true, false); + + } + + if(IS_MODEL(this) && IS_NEEDED_UPDATE_PRESENTATION(this)) + { + __pPresentation->SetClipChildrenProperty(__isClipChildren); + } + + return E_SUCCESS; +} + +bool +_VisualElementImpl::IsSurfaceOpaque(void) const +{ + ClearLastResult(); + + return GetSharedData().isSurfaceOpaque; +} + +result +_VisualElementImpl::SetSurfaceOpaque(bool isSurfaceOpaque) +{ + SysTryReturnResult(NID_UI_ANIM, IS_MODEL(this), E_INVALID_OPERATION, "VisualElement is not Model object."); + result r = E_SUCCESS; + + if (IS_INTERNAL_CLASS(__pPublicInstance)) + { + r = SetSurfaceOpaqueProperty(Variant(isSurfaceOpaque)); + } + else + { + r = InvokeOnSetPropertyRequested(*pVePropSurfaceOpaque, Variant(isSurfaceOpaque)); + } + SysTryLog(NID_UI_ANIM, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +Variant +_VisualElementImpl::GetSurfaceOpaqueProperty(void) const +{ + ClearLastResult(); + + return Variant(GetSharedData().isSurfaceOpaque); +} + +result +_VisualElementImpl::SetSurfaceOpaqueProperty(const Variant& v) +{ + SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_BOOL, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + + bool isSurfaceOpaque = v.ToBool(); + if (isSurfaceOpaque == GetSharedData().isSurfaceOpaque) + return E_SUCCESS; + + InvalidateHierarchyProps(HIERARCHY_PROPERTY_CONTENTOPACITY, false, false); //don't have to apply the changed opacity to children. + + if (IS_PRESENTATION(this)) + { + GetSharedData().isSurfaceOpaque = isSurfaceOpaque; + +#ifndef LAZY_EVALUATION + // not needed when no surface + if (HAVE_SURFACE(this)) + GetSharedData().NodeReconfigure(*this); +#endif + } + else + { + if(IS_NEEDED_UPDATE_PRESENTATION(this)) + { + __pPresentation->SetSurfaceOpaqueProperty(isSurfaceOpaque); + } + } + + return E_SUCCESS; +} + +Canvas* +_VisualElementImpl::GetCanvasN(void) +{ + return GetCanvasN(FloatRectangle(0.0f, 0.0f, __bounds.width, __bounds.height)); +} + +Canvas* +_VisualElementImpl::GetCanvasN(const Rectangle& bounds) +{ + return GetCanvasN(FloatRectangle(bounds.x, bounds.y, bounds.width, bounds.height)); +} + +Canvas* +_VisualElementImpl::GetCanvasN(const FloatRectangle& bounds) +{ + SysTryReturn(NID_UI_ANIM, !GetSharedData().fixedSurfaceSize, null, E_INVALID_OPERATION, "[E_INVALID_OPERATION] Canvas can't be instantiated for fixed-size user surface."); + SysTryReturn(NID_UI_ANIM, bounds.width >= 0.0f && bounds.height >= 0.0f, null, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] Canvas size is out of range. size = (%f, %f)", bounds.width, bounds.height); + SysTryReturn(NID_UI_ANIM, __imageFilePath.IsEmpty(), null, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Can't get canvas for surface which is from image file."); + SysTryReturn(NID_UI_ANIM, GetRoot(), null, E_INVALID_STATE, "[E_INVALID_STATE] VisualElement is not attached to main tree."); + SysTryReturn(NID_UI_ANIM, IS_MODEL(this), null, E_INVALID_OPERATION, "VisualElement is not Model object."); + + // WARNING: WARNING: WARNING: + // If need-redraw and surface is set by user, VE do *NOT* allow GetCanvasN + // because 'bounds' is for the VE does not comply with size of surface. + // (in which case the surface will be displayed scaled) + + _VisualElementImpl* pRenderTarget = GetRenderTarget(); + 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."); + + FloatRectangle canvasBounds; + FloatRectangle clipBounds; + + // TODO: FIXME: + // Use surface size, not bounds !!! + + float canvasX, canvasY, canvasW, canvasH; + + if (bounds.width == 0.0f || bounds.height == 0.0f) + { + float surfaceWidth = __bounds.width; + float surfaceHeight = __bounds.height; + + SysTryReturn(NID_UI_ANIM, bounds.x >= 0.0f && bounds.y >= 0.0f && bounds.x <= surfaceWidth && bounds.y <= surfaceHeight, null, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] Bounds is out of range."); + + canvasX = bounds.x; + canvasY = bounds.y; + canvasW = 0.0f; + canvasH = 0.0f; + } + else + { + clipBounds.x = 0.0f; + clipBounds.y = 0.0f; + clipBounds.width = __bounds.width; + clipBounds.height = __bounds.height; + + canvasBounds.x = bounds.x; + canvasBounds.y = bounds.y; + canvasBounds.width = bounds.width; + canvasBounds.height = bounds.height; + + canvasBounds = canvasBounds.GetIntersection(clipBounds); + pRenderTarget->__pPresentation->ConvertCoordinates(canvasBounds, this->__pPresentation); + canvasBounds = canvasBounds.GetIntersection(pRenderTarget->GetDrawableRect()); + + SysTryReturn(NID_UI_ANIM, canvasBounds.width > 0.0f && canvasBounds.height > 0.0f, null, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] Bounds is out of range."); + + canvasX = canvasBounds.x; + canvasY = canvasBounds.y; + canvasW = canvasBounds.width; + canvasH = canvasBounds.height; + } + + // 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 ! + + unique_ptr<_VisualElementCanvas> pCanvas(new (std::nothrow) _VisualElementCanvas); + + result r = pCanvas->Construct(*pRenderTarget->GetSharedData().pNativeNode->GetSurface(), FloatRectangle(canvasX, canvasY, canvasW, canvasH)); + SysTryReturn(NID_UI_ANIM, r == E_SUCCESS, null, E_SYSTEM, "[E_SYSTEM] VisualElement is not constructed."); + + pRenderTarget->SetFlushNeeded(); + + ClearLastResult(); + + return pCanvas.release(); +} + +_VisualElementImpl* +_VisualElementImpl::GetRoot(void) const +{ + ClearLastResult(); + + if (IsPropsInvalidated(HIERARCHY_PROPERTY_COORDINATES)) + { + const_cast< _VisualElementImpl* >(this)->RebuildCoordinates(); + } + + return __pRoot; +} + +_VisualElementImpl* +_VisualElementImpl::GetParent(void) const +{ + ClearLastResult(); + + return __pParent; +} + +int +_VisualElementImpl::GetChildrenCount(void) const +{ + ClearLastResult(); + + return __children.GetCount(); +} + +Tizen::Base::Collection::IList* +_VisualElementImpl::GetPublicChildrenN(void) const +{ + unique_ptr pArrayList(new (std::nothrow) Tizen::Base::Collection::ArrayList()); + SysTryReturn(NID_UI_ANIM, pArrayList, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + int count = __children.GetCount(); + SysTryReturn(NID_UI_ANIM, !IsFailed(pArrayList->Construct(count)), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + for (int i = 0; i < count; i++) + { + const _VisualElementImpl* pChild = __children.GetChildAt(i); + + if (likely(pChild) && likely(pChild->__pPublicInstance)) + { + SysTryReturn(NID_UI_ANIM, !IsFailed(pArrayList->Add(*pChild->__pPublicInstance)), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + } + } + + ClearLastResult(); + + return pArrayList.release(); +} + +bool +_VisualElementImpl::IsChildOf(const _VisualElementImpl& element) const +{ + ClearLastResult(); + + if (unlikely(this == &element)) + { + return false; + } + + if (unlikely(!__pParent)) + { + return false; + } + + if (likely(__pParent == &element)) + { + return true; + } + + return __pParent->IsChildOf(element); +} + +result +_VisualElementImpl::SetZOrder(const _VisualElementImpl* pReference, bool above) +{ + SysTryReturnResult(NID_UI_ANIM, IS_MODEL(this), E_INVALID_OPERATION, "VisualElement is not Model object."); + SysTryReturnResult(NID_UI_ANIM, !pReference || pReference->__pParent, E_INVALID_ARG, "pReference doesn't have parent."); + SysTryReturnResult(NID_UI_ANIM, __pParent, E_INVALID_ARG, "Invalid argument(s) is used. This VisualElement doesn't have a parent."); + SysTryReturnResult(NID_UI_ANIM, __isAllowedTreeModification == true, E_INVALID_OPERATION, "Z-order cannot be modified inside the OnAttached() or OnDetached() method of VisualElementEventListener."); + + return __pParent->InsertChild(*this, pReference, above); +} + +void +_VisualElementImpl::RemoveFromParent(void) +{ + if (likely(__pParent)) + { + __pParent->RemoveChild(*this); + } +} + +result +_VisualElementImpl::AddChild(_VisualElementImpl& child) +{ + //SysTryReturnResult(NID_UI_ANIM, IS_MODEL(this), E_INVALID_OPERATION, "VisualElement is not Model object."); + SysTryReturnResult(NID_UI_ANIM, child.__pSharedData, E_INVALID_ARG, "Child VisualElement is not constructed."); + SysTryReturnResult(NID_UI_ANIM, child.__isAllowedTreeModification == true, E_INVALID_OPERATION, "Z-order cannot be modified inside the OnAttached() or OnDetached() method of VisualElementEventListener."); + + return ChangeZOrder(child, null, true, child._zOrderGroup); +} + +int +_VisualElementImpl::GetChildIndex(const _VisualElementImpl& child) const +{ + int index = 0; + result r = __children.IndexOf(const_cast< _VisualElementImpl* >(&child), index); + + if (r == E_SUCCESS) + { + return index; + } + + // r == E_OUT_OF_RANGE or E_OBJ_NOT_FOUND + return -1; +} + +/** + * @param[in] group will be changed group of the visualemenet. + * @param[out] belowIndex the index of last item of below group's item. + * @param[out] aboveIndex the index of first item of above group's item. + * + * if group is lower than __children's lowest item, belowIndex = -1 , aboveIndex = 0 + * if group is higher than __children's highest item, belowIndex is last index of children, aboveIndex is 1 bigger than belowIndex. + * + *(ex) + * B = Z_ORDER_GROUP_ALWAYS_BELOW_BOTTOM // lowest drawing gadget.(Background) + * N = Z_ORDER_GROUP_NORMAL; // level of the default group. + * T = Z_ORDER_GROUP_ALWAYS_ON_TOP; // highest drawing gadget. + * 0 1 2 3 4 5 6 7 8 9 + * [B][B][B][N][N][N][N][T][T][T] + * __GetZOrderGroupIndex(Z_ORDER_GROUP_NORMAL, below, above); + * below = 2 + * above = 7 + * __GetZOrderGroupIndex(Z_ORDER_GROUP_ALWAYS_ON_TOP, below, above); + * below = 6 + * above = 10 + * __GetZOrderGroupIndex(Z_ORDER_GROUP_ALWAYS_BELOW_BOTTOM, below, above); + * below = -1 + * above = 3 + * 0 1 2 3 4 5 6 7 8 9 + * [B][B][B][B][B][T][T][T][T][T] + * __GetZOrderGroupIndex(Z_ORDER_GROUP_NORMAL, below, above); + * below = 4 + * above = 5 + * __GetZOrderGroupIndex(Z_ORDER_GROUP_ALWAYS_ON_TOP, below, above); + * below = 4 + * above = 10 + * __GetZOrderGroupIndex(Z_ORDER_GROUP_ALWAYS_BELOW_BOTTOM, below, above); + * below = -1 + * above = 5 + * + */ + +int +_VisualElementImpl::GetZOrderGroupIndex(int group, int& belowIndex, int& aboveIndex) const +{ + int lastIndex = __children.GetCount() - 1; + if (lastIndex < 0) // _children is empty. + { + belowIndex = -1; + aboveIndex = 0; + return 0; + } + + if (group < (__children.GetChildAt(0))->_zOrderGroup) // group is lower than __children's lowest item. + { + belowIndex = -1; + aboveIndex = 0; + return -1; + } + + if (group > (__children.GetChildAt(lastIndex))->_zOrderGroup) // group is higher than __children's highest item. + { + belowIndex = lastIndex; + aboveIndex = lastIndex + 1; + return 1; + } + + int i = lastIndex; + + for (; i >= 0; i--) + { + if (group >= __children.GetChildAt(i)->_zOrderGroup) + { + break; + } + } + + aboveIndex = i + 1; + + for (; i >= 0; i--) + { + if (group > __children.GetChildAt(i)->_zOrderGroup) + { + break; + } + } + + belowIndex = i; + + return 0; +} + +result +_VisualElementImpl::InsertChild(_VisualElementImpl& child, const _VisualElementImpl* pReference, bool above) +{ + //SysTryReturnResult(NID_UI_ANIM, IS_MODEL(this), E_INVALID_OPERATION, "VisualElement is not Model object."); + SysTryReturnResult(NID_UI_ANIM, child.__pSharedData, E_INVALID_ARG, "Child VisualElement is not constructed."); + SysTryReturnResult(NID_UI_ANIM, child.__isAllowedTreeModification == true, E_INVALID_OPERATION, "Z-order cannot be modified inside the OnAttached() or OnDetached() method of VisualElementEventListener."); + + int zOrderGroup = child._zOrderGroup; + + if (unlikely(pReference)) + { + zOrderGroup = pReference->_zOrderGroup; + } + + return ChangeZOrder(child, pReference, above, zOrderGroup); +} + +result +_VisualElementImpl::ChangeZOrder(_VisualElementImpl& child, const _VisualElementImpl* pReference, bool above, int group) +{ + int indexChild; + int indexReference = -1; + int indexInsert = -1; + + bool sameParent = false; + + // If not constructed well, disallow attaching ! + + if (IsChildOf(child) || this == &child || &child == pReference || (pReference && pReference->__pParent != this)) + { + return E_INVALID_ARG; + } + + // TBD: check ownership!!! + if (IS_PRESENTATION(this)) + { + _RootVisualElement* pChildRoot = child.GetRootPublic(); + + if (GetRootPublic() != null && pChildRoot != GetRootPublic()) + { + child.RebuildNativeNodeTree(*this); + } + } + + if (pReference) + { + indexReference = GetChildIndex(*pReference); + SysTryReturnResult(NID_UI_ANIM, indexReference >= 0, E_INVALID_ARG, "Invalid argument(s) is used. pReference is not a child of this instance."); + + if (above) + { + indexReference++; + } + } + else + { + if (above) + { + indexReference = __children.GetCount(); + } + else + { + indexReference = 0; + } + } + + int belowIndex, aboveIndex, indexRange; + + indexRange = GetZOrderGroupIndex(group, belowIndex, aboveIndex); + + if (indexRange < 0) + { + indexInsert = 0; + } + else if (indexRange > 0) + { + indexInsert = __children.GetCount(); + } + else + { + if (indexReference <= belowIndex + 1) + { + indexInsert = belowIndex + 1; + } + else if (indexReference >= aboveIndex) + { + indexInsert = aboveIndex; + } + else + { + indexInsert = indexReference; + } + + if (indexInsert < 0) + { + indexInsert = 0; + } + } + + if (child.__pParent == this) //case 1: move to the same parent. (just changed order ) + { + sameParent = true; + + indexChild = GetChildIndex(child); + SysTryReturn(NID_UI_ANIM, indexChild >= 0, + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. The child(%p) isn't managed by this instance.", &child); + + if (indexChild < indexInsert) + { + indexInsert--; // one of child item is removed so total item index is decreased. + } + + if (indexChild == indexInsert) //same position. don't have to do any action. + { + child._zOrderGroup = group; + + //update presentation zorder group + if (!IS_PRESENTATION(this)) + { + child.UpdatePresentationWhenZOrderChanged(pReference, above); + } + return E_SUCCESS; + } + + SysTryReturn(NID_UI_ANIM, RemoveChildWithoutReconfiguring(indexChild, true) == E_SUCCESS, + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. Failed to remove a child(%p) from this instance.", &child); + + } + else //case 2: move to the other parent. + { //case 3: child never been attached to the any parent. + if (child.__pParent) + { + child.__pParent->RemoveChild(child); + } + + // Setting implicit animation to the child. + if (!IS_PRESENTATION(this) && _AnimationManager::GetInstance() + && _AnimationManager::GetInstance()->IsImplicitAnimationEnabled() && child.__isImplicitAnimationEnabled) + { + child.RemoveAnimation(*pVePropActionAttach); + +#if defined(SUPPORT_CUSTOMIZING_ATTACH_DETACH_ANIMATION) + VisualElementAnimation* pAnimation = child.InvokeCreateAnimationForProperty(*pVePropActionAttach); +#else + VisualElementPropertyAnimation* pAnimation = new (std::nothrow) VisualElementPropertyAnimation(); + SysTryReturn(NID_UI_ANIM, pAnimation != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + pAnimation->SetPropertyName(*pVePropOpacity); + pAnimation->SetStartValue(Variant(0.0f)); +#endif + if (pAnimation != null) + { + pAnimation->SetVisualElementAnimationStatusEventListener(null); + (child.GetPublic())->AddAnimation(*pVePropActionAttach, *pAnimation); + } + delete pAnimation; + } + } + + // set ZOrder group + child._zOrderGroup = group; + + //SysLog(NID_UI_ANIM, "Insert child %p(%d)", &child, indexInsert); + + if (!IS_PRESENTATION(this)) + { + if(!sameParent) + { + VE_DELEGATE(this, InvokeOnChildAttaching, child); + VE_DELEGATE(&child, InvokeOnAttaching, *this); + } + } + + __children.InsertAt(&child, indexInsert); // need addref -> jobs -> release ... + child.__pParent = this; + + child.InvalidateHierarchyProps(HIERARCHY_PROPERTY_COORDINATES | HIERARCHY_PROPERTY_OPACITY | HIERARCHY_PROPERTY_SHOWSTATE, true, false); + + // propagate child's prop. status to parents + //__InvalidateHierarchyProps(child.__childrenNeedsUpdateProps, false, true); + InvalidateHierarchyProps(child.__childrenNeedsUpdateProps, true, false); + + // WARNING: + // When no surface, it is needed to invalidated. + // + if (unlikely(!NEED_SURFACE(&child))) + { + child.ExposeRectangle(null, true); + } + + // + // Because tree hierarchy is not a property, VE hierarchy tree changes are not + // notified by property observer. So, we invoke method in presentation VE directly. + // + + if (!IS_PRESENTATION(this)) + { + child.UpdatePresentationWhenZOrderChanged(pReference, above); + + if(!sameParent) // when child was moved to same parent, don't have to detach and attach to parent. + { + if (child.GetSharedData().pEventListener != null) + { + child.InvokeOnAttached(); + } + + if (GetSharedData().pEventListener != null) + { + InvokeOnChildAttached(child); + } + } + } + else + { + if (likely(GetSharedData().pNativeNode) && likely(child.GetSharedData().pNativeNode)) + { + _VisualElementImpl* pReferenceNode = null; + + if (indexInsert > 0) + { + pReferenceNode = __children.GetChildAt(indexInsert - 1); + } + + // exceptional case: the pRefenreceNode is null and indexInsert are more than __children.count() + 1, then this case is something wrong. + // normal case : when pReferenceNode is null , indexInsert has 0 or more small value. + + GetSharedData().pNativeNode->InsertChild( + *child.GetSharedData().pNativeNode, + (pReferenceNode ? pReferenceNode->GetSharedData().pNativeNode : null), + (pReferenceNode ? true : false) + ); + } + } + + return E_SUCCESS; +} + +result +_VisualElementImpl::UpdatePresentationWhenCustomPropertyChanged(const String& property, const Variant& value) +{ + SysTryReturnResult(NID_UI_ANIM, IS_MODEL(this), E_INVALID_OPERATION, "VisualElement is not Model object."); + result r = E_SUCCESS; + + if (IS_NEEDED_UPDATE_PRESENTATION(this)) + { + + Variant oldV = __pPresentation->InvokeOnGetPropertyRequested(property); + + if(CreateImplicitAnimationIfNeeded(property,value,oldV, NULL) == false) + { + r = __pPresentation->InvokeOnSetPropertyRequested(property, value); + } + } + return r; +} + +void +_VisualElementImpl::UpdatePresentationWhenZOrderChanged(const _VisualElementImpl* pReferenceModel, bool above) +{ + if(!IS_MODEL(this) || !__pParent) + { + return; + } + + _VisualElementImpl* pReferencePresenter = (pReferenceModel ? (pReferenceModel->__pPresentation ? pReferenceModel->__pPresentation : null) : null); + + if (likely(__pParent->__pPresentation) && likely(__pPresentation)) + { + __pParent->__pPresentation->ChangeZOrder(*__pPresentation, pReferencePresenter, above, _zOrderGroup); + } +} + + + +result +_VisualElementImpl::RemoveChildWithoutReconfiguring(int indexChild, bool invalidate) +{ + SysTryReturnResult(NID_UI_ANIM, indexChild >= 0 && indexChild < __children.GetCount(), E_OBJ_NOT_FOUND, "There is no VisualElement at %d th index.", indexChild); + + _VisualElementImpl* pChild = __children.GetChildAt(indexChild); + SysTryReturnResult(NID_UI_ANIM, pChild, E_OBJ_NOT_FOUND, "There is no VisualElement at %d th index.", indexChild); + + + //SysLog(NID_UI_ANIM, "Remove child %p(%d)", pChild, indexChild); + __children.RemoveAt(indexChild); + pChild->__pParent = null; +// pChild->__ClearHierarchyInfo(); + + + if (!IS_PRESENTATION(this)) + { + // removed element need not invalidation ! + if (invalidate) + { + if (NEED_SURFACE(pChild)) + { + pChild->ExposeRectangle(null, false); + } + else + { + pChild->InvalidateVisibleRectToRenderTarget(null); + } + } + } + else + { + if (GetSharedData().pNativeNode && pChild->GetSharedData().pNativeNode) + { + GetSharedData().pNativeNode->RemoveChild(*pChild->GetSharedData().pNativeNode); + } + } + + // WARNING: + // Because some properties such as root, visible rect and etc. can be accessed detached, invalidating is needed here ! + // (Will be invalidated again on attaching) + // + pChild->InvalidateHierarchyProps(HIERARCHY_PROPERTY_COORDINATES, true, false); + + return E_SUCCESS; +} + +result +_VisualElementImpl::CreateElementTreeForDetachImplicitAnimation(_VisualElementImpl& child) +{ + result r = E_SYSTEM; + + VisualElement* pRoot = child.CreateElementForImplicitAnimationN(); + if (pRoot == null) + { + return r; + } + + pRoot->_pVisualElementImpl->SetInternal(true); + +#if defined(SUPPORT_CUSTOMIZING_ATTACH_DETACH_ANIMATION) + VisualElementAnimation* pAnimation = child.InvokeCreateAnimationForProperty(*pVePropActionDetach); +#else + VisualElementPropertyAnimation* pAnimation = new (std::nothrow) VisualElementPropertyAnimation(); + pAnimation->SetPropertyName(*pVePropOpacity); + pAnimation->SetEndValue(Variant(0.0f)); +#endif + if (pAnimation) + { + _VisualElementImplicitAnimationEventListener* pListener = new (std::nothrow) _VisualElementImplicitAnimationEventListener(); + if (pListener) + { + pAnimation->SetVisualElementAnimationStatusEventListener(pListener); + + r = pRoot->AddAnimation(*pVePropActionDetach, *pAnimation); + if (r == E_SUCCESS) + { + if (!GetPublic()) + { + return E_SYSTEM; + } + + r = GetPublic()->AttachChild(*pRoot); + if (r == E_SUCCESS) + { + delete pAnimation; + + return r; + } + } + + delete pListener; + } + + delete pAnimation; + } + + return r; +} + +VisualElement* +_VisualElementImpl::CreateElementForImplicitAnimationN(void) const +{ + VisualElement* pElement = new (std::nothrow) VisualElement(*GetPublic()); + if (pElement == null) + { + return null; + } + + result r = pElement->Construct(); + if (r != E_SUCCESS) + { + pElement->Destroy(); + return null; + } + + pElement->SetImplicitAnimationEnabled(false); + + if (HAVE_SURFACE(this)) + { + VisualElementSurface* pSurface = GetSurfaceN(); + if (pSurface) + { + pElement->SetSurface(pSurface); + delete pSurface; + } + } + + int count = __children.GetCount(); + for (int i = 0; i < count; i++) + { + _VisualElementImpl* pVisualElementImpl = __children.GetChildAt(i); + if (likely(pVisualElementImpl)) + { + r = pElement->AttachChild(*pVisualElementImpl->CreateElementForImplicitAnimationN()); + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + + return pElement; + +CATCH: + delete pElement; + return null; +} + + +result +_VisualElementImpl::RemoveChild(_VisualElementImpl& child, bool deallocate) +{ + //SysTryReturnResult(NID_UI_ANIM, IS_MODEL(this), E_INVALID_OPERATION, "VisualElement is not Model object."); + SysTryReturnResult(NID_UI_ANIM, child.__isAllowedTreeModification == true, E_INVALID_OPERATION, "Z-order cannot be modified inside the OnAttached() or OnDetached() method of VisualElementEventListener."); + + int indexChild = GetChildIndex(child); + SysTryReturnResult(NID_UI_ANIM, indexChild >= 0, E_OBJ_NOT_FOUND, "child is not a child of this instance."); + + if (!IS_PRESENTATION(this)) + { + + VE_DELEGATE(this, InvokeOnChildDetaching, child); + + // IMPORTANT! When destroying, don't have to invoke OnDetached and OnDetaching after invoked OnDestructing. + // call OnDestructing -> call OnDetaching it is ambiguous operation + // it is called by RemoveFromParent() method, so pChild is destroying currently. + if (!child.__isDestroying) + { + VE_DELEGATE(&child, InvokeOnDetaching); + } + } + + result r = RemoveChildWithoutReconfiguring(indexChild, true); + if (unlikely(r != E_SUCCESS)) + { + return E_OBJ_NOT_FOUND; + } + + if (!IS_PRESENTATION(this) && (_AnimationManager::GetInstance() && _AnimationManager::GetInstance()->IsImplicitAnimationEnabled() + && child.__isImplicitAnimationEnabled) && child.IsAncestorDestroying() == false) + { + r = CreateElementTreeForDetachImplicitAnimation(child); + if (unlikely(r != E_SUCCESS)) + { + SysLogException(NID_UI_ANIM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Dummy VisualElement cannot be attached."); + } + } + + // + // Because tree hierarchy is not a property, VE hierarchy tree changes are not + // notified by property observer. So, we invoke method in presentation VE directly. + // + if (!IS_PRESENTATION(this)) + { + + if (likely(__pPresentation) && likely(child.GetPresentation())) + { + __pPresentation->RemoveChild(*child.GetPresentation(), deallocate); + } + + // IMPORTANT! When destroying, don't have to invoke OnDetached and OnDetaching after invoked OnDestructing. + // call OnDestructing -> call OnDetaching it is ambiguous operation + // it is called by RemoveFromParent() method, so pChild is destroying currently. + if (!child.__isDestroying && child.GetSharedData().pEventListener != null) + { + child.InvokeOnDetached(*this); + } + + if (GetSharedData().pEventListener != null) + { + InvokeOnChildDetached(child); + } + } + + // TODO: + // DEALLOCATE !!! + // + + return E_SUCCESS; +} + +result +_VisualElementImpl::RemoveAllChild(void) +{ + SysTryReturnResult(NID_UI_ANIM, IS_MODEL(this), E_INVALID_OPERATION, "VisualElement is not Model object."); + return E_SUCCESS; +} + + +void +_VisualElementImpl::RebuildNativeNodeTree(_VisualElementImpl& parent) +{ + if (!IS_PRESENTATION(this)) + { + return; + } + + _INativeNode* pNode = GetNativeNode(); + _INativeNode* pParentNode = parent.GetNativeNode(); + + if (!pNode || !pParentNode) + { + return; + } + + pNode->RebuildIfNeeded(*pParentNode); + +//TODO : must check ,don't you need to rebuild??? +// RebuildCoordinates(); + + const int nativeProps = _VisualElementImpl::HIERARCHY_PROPERTY_COORDINATES + | _VisualElementImpl::HIERARCHY_PROPERTY_OPACITY + | _VisualElementImpl::HIERARCHY_PROPERTY_CONTENTOPACITY + | _VisualElementImpl::HIERARCHY_PROPERTY_CONTENTBOUNDS; + + + InvalidateHierarchyProps(nativeProps, false, false); + + int count = __children.GetCount(); + for ( int i = 0 ; i < count ; i++ ) + { + _VisualElementImpl* pVe = __children.GetChildAt(i); + if (pVe) + { + pVe->RebuildNativeNodeTree(*this); + _INativeNode* pChildNode = pVe->GetNativeNode(); + pNode->InsertChild(*pChildNode,null, true); + } + } + +} + + +Tizen::Base::String +_VisualElementImpl::GetName(void) const +{ + ClearLastResult(); + + return GetSharedData().name; +} + +result +_VisualElementImpl::SetName(const Tizen::Base::String& name) +{ + SysTryReturnResult(NID_UI_ANIM, IS_MODEL(this), E_INVALID_OPERATION, "VisualElement is not Model object."); + result r = InvokeOnSetPropertyRequested(*pVePropName, Variant(name)); + SysTryLog(NID_UI_ANIM, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +Variant +_VisualElementImpl::GetNameProperty(void) const +{ + ClearLastResult(); + + return Variant(GetSharedData().name); +} + +result +_VisualElementImpl::SetNameProperty(const Variant& v) +{ + SysTryReturn(NID_UI_ANIM, v.GetType() == VARIANT_TYPE_STRING, E_INVALID_ARG, E_INVALID_ARG, STR_ERROR_INVALID_VARIANT_ARG_TYPE); + + const Tizen::Base::String& name = v.ToString(); + if (name == GetSharedData().name) + { + return E_SUCCESS; + } + + GetSharedData().name = name; + + return E_SUCCESS; +} + +result +_VisualElementImpl::SetUserData(void* pUserData) +{ + SysTryReturnResult(NID_UI_ANIM, IS_MODEL(this), E_INVALID_OPERATION, "VisualElement is not Model object."); + + GetSharedData().pUserData = pUserData; + + return E_SUCCESS; +} + +void* +_VisualElementImpl::GetUserData(void) const +{ + ClearLastResult(); + + return GetSharedData().pUserData; +} + +_VisualElementImpl* +_VisualElementImpl::GetChild(const Tizen::Base::String& name, bool searchAllDescendants) const +{ + ClearLastResult(); + + int count = __children.GetCount(); + + // for performance, look children directly + for (int i = 0; i < count; i++) + { + const _VisualElementImpl* pChild = __children.GetChildAt(i); + if (unlikely(pChild->GetSharedData().name == name)) + { + return const_cast< _VisualElementImpl* >(pChild); + } + } + + if (searchAllDescendants) + { + for (int i = 0; i < count; i++) + { + const _VisualElementImpl* pChild = __children.GetChildAt(i)->GetChild(name, true); + if (likely(pChild)) + { + return const_cast< _VisualElementImpl* >(pChild); + } + } + } + + SetLastResult(E_OBJ_NOT_FOUND); + + return null; +} + +FloatRectangle +_VisualElementImpl::GetVisibleRect(void) const +{ + _VisualElementImpl* pThis = const_cast< _VisualElementImpl* >(this); + + if (unlikely(IsPropsInvalidated(HIERARCHY_PROPERTY_COORDINATES))) + pThis->RebuildCoordinates(); + + if (!IsVisibleI()) + return FloatRectangle(); + + if (likely(__visibleRectValid)) + return __visibleRect; + + if (__pClipSource) + { + FloatRectangle parentVisibleRect(__pClipSource->GetVisibleRect()); + ConvertCoordinates(parentVisibleRect, __pClipSource); + pThis->__visibleRect = parentVisibleRect.GetIntersection(__visibleRect); + } + + pThis->__visibleRectValid = true; + + return __visibleRect; +} + +FloatRectangle +_VisualElementImpl::GetDrawableRect(void) const +{ + // If VE has backing-buffer, visible status is not important for drawing... + bool needSurface = NEED_SURFACE(this); + + if (unlikely(!needSurface)) + { + return FloatRectangle(); + } + + if (unlikely(IsPropsInvalidated(HIERARCHY_PROPERTY_COORDINATES))) + { + _VisualElementImpl* pThis = const_cast< _VisualElementImpl* >(this); + pThis->RebuildCoordinates(); + } + + // WARNING: + // Even when surface exists, the size might be invalidated by changing bounds. + // + if (HAVE_SURFACE(this) && GetSharedData().fixedSurfaceSize) + { + return FloatRectangle(0.0f, 0.0f, GetSharedData().pSurface->GetSizeF().width, GetSharedData().pSurface->GetSizeF().height); + } + + return FloatRectangle(0.0f, 0.0f, __bounds.width, __bounds.height); +} + +float +_VisualElementImpl::GetOpacityFromRoot(void) const +{ + float opacity = __contentOpacity * __opacity * __showOpacity; + const _VisualElementImpl* pElement = __pParent; + while (pElement) + { + if (!VE_VISIBLE(pElement)) + { + return 0.0f; + } + + opacity *= pElement->__opacity * pElement->__showOpacity; + pElement = pElement->__pParent; + } + + return opacity; +} + +const FloatRectangle& +_VisualElementImpl::GetBoundingBoxI(void) const +{ + _VisualElementImpl* pThis = const_cast< _VisualElementImpl* >(this); + + if (unlikely(IsPropsInvalidated(HIERARCHY_PROPERTY_COORDINATES))) + { + pThis->RebuildCoordinates(); + } + + if (unlikely(!__boundingBoxValid)) + { + float x[4] = { 0.0f, __bounds.width, 0.0f, __bounds.width }; + float y[4] = { 0.0f, 0.0f, __bounds.height, __bounds.height }; + CalculateBoundingBox(x, y, pThis->__boundingBox); + + pThis->__boundingBoxValid = true; + } + + return __boundingBox; +} + +const FloatMatrix4& +_VisualElementImpl::GetMatrixToSuper(void) const +{ + if (unlikely(__matrixToSuperValid)) + return __matrixToSuper; + + _VisualElementImpl* pThis = const_cast< _VisualElementImpl* >(this); + + pThis->__matrixToSuperValid = true; + + if (unlikely(__pParent == null)) + { + _MatrixUtilSetIdentity(pThis->__matrixToSuper); + return __matrixToSuper; + } + + const bool needSurface = NEED_SURFACE(this); + + // apply subprojection && translation + if (likely(needSurface)) + { + MatrixUtilCopy(pThis->__matrixToSuper, __pParent->__childrenTransform); + _MatrixUtilTranslate(pThis->__matrixToSuper, __bounds.x, __bounds.y, __zPosition); + } + else + { + _MatrixUtilSetTranslation(pThis->__matrixToSuper, __bounds.x, __bounds.y, __zPosition); + } + + + // apply transform + if (likely(needSurface)) + { + if (likely(__decomposedTransform.GetMatrixType() != MATRIX4_Identity)) + { + bool needAnchor = (unlikely(__anchorZ != 0.0f) || unlikely(__anchor.x != 0.0f) || unlikely(__anchor.y != 0.0f)); + if (unlikely(needAnchor)) + _MatrixUtilTranslate(pThis->__matrixToSuper, __anchor.x * __bounds.width, __anchor.y * __bounds.height, __anchorZ); + + _MatrixUtilMultiply(pThis->__matrixToSuper, __matrixToSuper, __transform); + + if (unlikely(needAnchor)) + _MatrixUtilTranslate(pThis->__matrixToSuper, -__anchor.x * __bounds.width, -__anchor.y * __bounds.height, -__anchorZ); + } + } + + return __matrixToSuper; +} + +const FloatMatrix4& +_VisualElementImpl::GetMatrixToTop(void) const +{ + _VisualElementImpl* pThis = const_cast< _VisualElementImpl* >(this); + + if (unlikely(IsPropsInvalidated(HIERARCHY_PROPERTY_COORDINATES))) + { + pThis->RebuildCoordinates(); + } + + + if (unlikely(!__matrixToTopValid)) + { + _MatrixUtilMultiply(pThis->__matrixToTop, __pParent->GetMatrixToTop(), GetMatrixToSuper()); + pThis->__matrixToTopValid = true; + } + + return __matrixToTop; +} + +const FloatMatrix4& +_VisualElementImpl::GetMatrixFromTop(void) const +{ + _VisualElementImpl* pThis = const_cast< _VisualElementImpl* >(this); + + if (IsPropsInvalidated(HIERARCHY_PROPERTY_COORDINATES)) + { + pThis->RebuildCoordinates(); + } + + if (!__matrixFromTopValid) + { + MatrixUtilCopy(pThis->__matrixFromTop, GetMatrixToTop()); + pThis->__matrixFromTopInvertible = _MatrixUtilInvert(pThis->__matrixFromTop); + pThis->__matrixFromTopValid = true; + } + + return __matrixFromTop; +} + +FloatMatrix4 +_VisualElementImpl::CalcMatrixToBase(const _VisualElementImpl& base) const +{ + if (this == &base) + return FloatMatrix4(); + + FloatMatrix4 matrixToBase(GetMatrixToSuper()); + + const _VisualElementImpl* pParent = GetParent(); + if (pParent) + { + pParent = pParent->GetParent(); + while (pParent) + { + _MatrixUtilMultiply(matrixToBase, pParent->GetMatrixToSuper(), matrixToBase); + pParent = pParent->GetParent(); + } + } + + return matrixToBase; +} + +const FloatMatrix4& +_VisualElementImpl::GetMatrixToClipSource(void) const +{ + _VisualElementImpl* pThis = const_cast< _VisualElementImpl* >(this); + + if (IsPropsInvalidated(HIERARCHY_PROPERTY_COORDINATES)) + { + pThis->RebuildCoordinates(); + } + + + if (unlikely(!__matrixToClipSourceValid)) + { + if (likely(__pParent)) + { + if (__pParent->__isClipChildren) + { + MatrixUtilCopy(pThis->__matrixToClipSource, GetMatrixToSuper()); + } + else + { + _MatrixUtilMultiply(pThis->__matrixToClipSource, __pParent->GetMatrixToClipSource(), GetMatrixToSuper()); + } + } + else + { + _MatrixUtilSetIdentity(pThis->__matrixToClipSource); + } + + pThis->__matrixToClipSourceValid = true; + } + + return __matrixToClipSource; +} + +void +_VisualElementImpl::InvalidateVisibleRectToRenderTarget(const FloatRectangle* pDirtyRectangle) +{ + if (unlikely(GetSharedData().invalidationLockCount > 0)) + return; + + if (!IsDrawingObject()) + return; + + FloatRectangle bounds; + + bounds = __pPresentation->GetVisibleRect(); + if (pDirtyRectangle) + { + bounds = bounds.GetIntersection(*pDirtyRectangle); + } + + if (!bounds.IsEmpty()) + { + _VisualElementImpl* pRenderTarget = __pPresentation->GetRenderTarget(); + if (pRenderTarget) + { + pRenderTarget->ConvertCoordinates(bounds, this); + pRenderTarget->InvalidateRectangleI(&bounds); + } + } +} + +void +_VisualElementImpl::RebuildCoordinates(void) +{ + if (unlikely(!IsPropsInvalidated(HIERARCHY_PROPERTY_COORDINATES))) + { + return; + } + + SetPropsValidaty(HIERARCHY_PROPERTY_COORDINATES, 0); + + __visibleRect.x = 0.0f; + __visibleRect.y = 0.0f; + __visibleRect.width = __bounds.width; + __visibleRect.height = __bounds.height; + + + if (unlikely(!__pParent)) + { + // FIXME: + // Need to allowing transform to root element ! + + _MatrixUtilSetIdentity(__matrixToTop); + _MatrixUtilSetIdentity(__matrixFromTop); + _MatrixUtilSetIdentity(__matrixToClipSource); + __pClipSource = null; + + GetMatrixToSuper(); + + RectUtilCopy(__boundingBox, __bounds); + RectUtilCopy(__boundingBoxToClipSource, __bounds); + + _RootVisualElement* pRoot = dynamic_cast< _RootVisualElement* >(__pPublicInstance); + + if (likely(pRoot)) + { + __pRoot = pRoot->_pVisualElementImpl; + } + else + { + __pRoot = null; + } + + __needTransform = false; + __needClipForUntransformed = false; + + + __matrixFromTopValid = true; + __matrixToTopValid = true; + __matrixToClipSourceValid = true; + __matrixToSuperValid = true; + + __boundingBoxValid = true; + __visibleRectValid = true; + } + else + { + if (unlikely(__pParent->IsPropsInvalidated(HIERARCHY_PROPERTY_COORDINATES))) + { + __pParent->RebuildCoordinates(); + } + + __pRoot = __pParent->__pRoot; + + Matrix4Type transformType = __decomposedTransform.GetMatrixType(); + const Matrix4Type parentChildrenTransformType = __pParent->__decomposedChildrenTransform.GetMatrixType(); + + if (parentChildrenTransformType > MATRIX4_Translation) + transformType = MATRIX4_Generic; + + + if (unlikely(__pParent->__isClipChildren)) + { + __pClipSource = __pParent; + + __needTransform = (transformType > MATRIX4_Translation); + if (likely(!__needTransform)) + { + __boundingBoxToClipSource.x = __bounds.x + __transform.matrix[3][0]; + __boundingBoxToClipSource.y = __bounds.y + __transform.matrix[3][1]; + __boundingBoxToClipSource.width = __bounds.width; + __boundingBoxToClipSource.height = __bounds.height; + } + } + else + { + __pClipSource = __pParent->__pClipSource; + + if (unlikely(transformType > MATRIX4_Translation)) + __needTransform = true; + else + __needTransform = __pParent->__needTransform; + + if (likely(!__needTransform)) + { + __boundingBoxToClipSource.x = __pParent->__boundingBoxToClipSource.x + __bounds.x + __transform.matrix[3][0]; + __boundingBoxToClipSource.y = __pParent->__boundingBoxToClipSource.y + __bounds.y + __transform.matrix[3][1]; + __boundingBoxToClipSource.width = __bounds.width; + __boundingBoxToClipSource.height = __bounds.height; +#if 0 + if (unlikely(parentChildrenTransformType == MATRIX4_Translation)) + { + __boundingBoxToClipSource.x += __pParent->__childrenTransform.matrix[3][0]; + __boundingBoxToClipSource.y += __pParent->__childrenTransform.matrix[3][1]; + } +#endif + } + } + + if (likely(!__needTransform)) + { + if (unlikely(parentChildrenTransformType == MATRIX4_Translation)) + { + __boundingBoxToClipSource.x += __pParent->__childrenTransform.matrix[3][0]; + __boundingBoxToClipSource.y += __pParent->__childrenTransform.matrix[3][1]; + } + } + + __needClipForUntransformed = __pParent->__needClipForUntransformed; + if (likely(!__needClipForUntransformed) && likely(__pClipSource)) + { + if (likely(__boundingBoxToClipSource.x >= 0.0f) && + likely(__boundingBoxToClipSource.y >= 0.0f) && + likely(__boundingBoxToClipSource.x + __boundingBoxToClipSource.width <= __pClipSource->__bounds.width) && + likely(__boundingBoxToClipSource.y + __boundingBoxToClipSource.height <= __pClipSource->__bounds.height)) + __needClipForUntransformed = false; + else + __needClipForUntransformed = true; + } + else + { + __needClipForUntransformed = true; + } + + + __matrixFromTopValid = false; + __matrixToTopValid = false; + __matrixToClipSourceValid = false; + __matrixToSuperValid = false; + + __boundingBoxValid = false; + __visibleRectValid = false; + } +} + +void +_VisualElementImpl::RebuildVisibility(void) +{ + const int mask = HIERARCHY_PROPERTY_COORDINATES | HIERARCHY_PROPERTY_SHOWSTATE | HIERARCHY_PROPERTY_OPACITY | HIERARCHY_PROPERTY_CONTENTOPACITY; + + if (unlikely(!IsPropsInvalidated(mask))) + { + return; + } + + if (unlikely(IsPropsInvalidated(HIERARCHY_PROPERTY_COORDINATES))) + { + RebuildCoordinates(); + } + + + SetPropsValidaty(mask, 0); + + if (unlikely(!__pParent)) + { + // FIXME: + // Need to allowing transform to root element ! + + if(!__isRoot) + __isVisible = false; + else + __isVisible = VE_VISIBLE(this); + } + else + { + if (unlikely(__pParent->IsPropsInvalidated(mask))) + { + __pParent->RebuildVisibility(); + } + + if (likely(__pParent->__isVisible)) + __isVisible = VE_VISIBLE(this); + else + __isVisible = false; + } +} + +void +_VisualElementImpl::LockInvalidate(bool lock) +{ + GetSharedData().LockInvalidate(lock); +} + +void +_VisualElementImpl::InvalidateHierarchyPropsDownward(int invalidProps, bool broadcastToChildren, bool propagateToParentsOnly) +{ + invalidProps &= HIERARCHY_PROPERTY_MASK; + + __childrenNeedsUpdateProps |= invalidProps; + + if (likely(!propagateToParentsOnly)) + { + SetPropsValidaty(0, invalidProps); + + if (likely(invalidProps & HIERARCHY_PROPERTY_COORDINATES)) + { + __matrixFromTopValid = false; + __matrixToSuperValid = false; + __boundingBoxValid = false; + } + } + + if (unlikely(!broadcastToChildren)) + { + return; + } + + int count = __children.GetCount(); + for (int i = 0; i < count; i++) + { + __children.GetChildAt(i)->InvalidateHierarchyPropsDownward(invalidProps, broadcastToChildren, propagateToParentsOnly); + } + + // may need update some attribute variables for other hierarchy properties +} + + +void +_VisualElementImpl::InvalidateHierarchyProps(int invalidProps, bool broadcastToChildren, bool propagateToParentsOnly) +{ + invalidProps &= HIERARCHY_PROPERTY_MASK; + +// // For model tree, it is not needed to invalidate children-opacity and show-state +// if (!IS_PRESENTATION(this)) +// { +// invalidProps &= ~(HIERARCHY_PROPERTY_OPACITY | HIERARCHY_PROPERTY_SHOWSTATE); +// } + + if (unlikely(!invalidProps)) + { + return; + } + + InvalidateHierarchyPropsDownward(invalidProps, broadcastToChildren, propagateToParentsOnly); + + _VisualElementImpl* pElement = __pParent; // WARNING: 'this' is updated in '__InvalidateHierarchyPropsDownward' + while (pElement) + { + pElement->__childrenNeedsUpdateProps |= invalidProps; + pElement = pElement->__pParent; + } +} + +// HIERARCHY_PROPERTY_CONTENT is not handled here, but in drawing logic +void +_VisualElementImpl::RebuildHierarchyProps(int props, bool checkSurface, bool reconfSurfaceOnly) +{ + if (likely(__pParent) && (unlikely(__pParent->IsPropsInvalidated(props)) || unlikely(__pParent->GetSharedData().NeedNativeReconfigure()))) + { + // WARNING: + // 'checkSurface' for parent will make surface ! + __pParent->RebuildHierarchyProps(props, false, false); + } + + + // TBD: Recreating surface may have to be done in presentation layer (thread!) + if (unlikely(checkSurface)) + { + if (likely(IsDrawingObject())) + { + ResetSurfaceIfNeeded(); // may invalidate GetSharedData().surfaceChanged + } + } + + const bool needApplyNatives = GetSharedData().NeedNativeReconfigure(); + + props &= HIERARCHY_PROPERTY_MASK; + if (unlikely(!IsPropsInvalidated(props)) && likely(!checkSurface) && unlikely(needApplyNatives == 0)) + { + return; + } + + if (likely(props & HIERARCHY_PROPERTY_CONTENTBOUNDS) && likely(IsPropsInvalidated(HIERARCHY_PROPERTY_CONTENTBOUNDS))) + { + SetPropsValidaty(HIERARCHY_PROPERTY_CONTENTBOUNDS, 0); + } + + if (likely(props & HIERARCHY_PROPERTY_COORDINATES) && likely(IsPropsInvalidated(HIERARCHY_PROPERTY_COORDINATES))) + { + RebuildCoordinates(); + //__SetPropsValidaty(HIERARCHY_PROPERTY_COORDINATES, 0); --> need not. __RebuildCoordinates will validate. + } + + // WARNING: + // 'Visibility' should be checked after validating tree-hierarchy information. + // (For example, attaching/detaching may affect visibility.) + const int mask = HIERARCHY_PROPERTY_OPACITY | HIERARCHY_PROPERTY_SHOWSTATE | HIERARCHY_PROPERTY_CONTENTOPACITY; + if (unlikely((props & mask) != 0) && unlikely(IsPropsInvalidated(props & mask))) + { + RebuildVisibility(); + } + + if (likely(__pPresentation) && likely(needApplyNatives)) + { + if (unlikely(!IS_PRESENTATION(this))) + { + // WARNING: + // In model, native nodes are updated only when the surface was changed. + //if (unlikely(GetSharedData().surfaceChanged)) + { + __pPresentation->FlushNativeChanges(); + } + } + else + { + GetSharedData().NodeReconfigure(*__pPresentation, false); + } + } +} + +void +_VisualElementImpl::FlushNativeChanges(void) +{ + if (unlikely(!IS_PRESENTATION(this))) + return; + + if (likely(__pPresentation)) + GetSharedData().NodeReconfigure(*__pPresentation, false); +} + +void +_VisualElementImpl::UpdateHierarchyProps(void) +{ + // WARNING: + // HIERARCHY_PROPERTY_CONTENT is not handled here, but in drawing logic. + const int mask = HIERARCHY_PROPERTY_MASK; + + if (unlikely((__childrenNeedsUpdateProps & mask) == 0 && GetSharedData().childrenSurfaceChanged == false)) + return; + + // Node will be reconfigured later(before OnDraw, or DrawRectangle, ...) + if (likely(IsPropsInvalidated(mask)) || likely(GetSharedData().NeedNativeReconfigure())) + RebuildHierarchyProps(mask, false, false); + + // WARNING: + // __childrenNeedsUpdateProps should be cleared *ONLY AFTER* flushing native nodes ! + __childrenNeedsUpdateProps &= ~mask; + GetSharedData().childrenSurfaceChanged = false; + + int count = __children.GetCount(); + for (int i = 0; i < count; i++) + { + _VisualElementImpl* pChild = __children.GetChildAt(i); + if (likely((pChild->__childrenNeedsUpdateProps & mask) != 0 || pChild->GetSharedData().childrenSurfaceChanged == true)) + pChild->UpdateHierarchyProps(); + } +} + +void +_VisualElementImpl::ExposeRectangle(const FloatRectangle* pDirtyRectangle, bool invalidate) +{ + if (unlikely(!IsDrawingObject())) + return; + + if (unlikely(invalidate)) + { + InvalidateRectangleI(pDirtyRectangle); + } +} + +result +_VisualElementImpl::SetFlushNeeded(void) +{ + FloatRectangle rect; + + if (!IS_PRESENTATION(this)) + { + return __pPresentation->SetFlushNeeded(); + } + + rect = __bounds; + rect.SetPosition(0.0f, 0.0f); + + if (likely(HAVE_SURFACE(this))) + { + GetSharedData().pNativeNode->SetFlushNeeded(); + } + else + { + _VisualElementImpl* pRenderTarget = GetRenderTarget(); + + if (likely(pRenderTarget && pRenderTarget->GetSharedData().pNativeNode)) + { + pRenderTarget->ConvertCoordinates(rect, this); + pRenderTarget->GetSharedData().pNativeNode->SetFlushNeeded(); + } + } + + return E_SUCCESS; +} + +result +_VisualElementImpl::Flush(void) +{ + if (likely(GetSharedData().pNativeNode)) + { + GetSharedData().pNativeNode->Flush(); + } + + return E_SUCCESS; +} + +result +_VisualElementImpl::InvalidateRectangle(const FloatRectangle* pRectangle) +{ + return InvalidateRectangleI(pRectangle); +} + +result +_VisualElementImpl::InvalidateRectangleI(const FloatRectangle* pRectangle) +{ + SysTryReturnResult(NID_UI_ANIM, !GetSharedData().fixedSurfaceSize, E_INVALID_OPERATION, "VisualElement with User-Surface do not allow invalidating and redrawing."); + SysTryReturnResult(NID_UI_ANIM, IS_MODEL(this), E_INVALID_OPERATION, "Invalidating VisualElement should be performed on a model layer."); + + if (unlikely(GetSharedData().invalidationLockCount > 0)) + { + return E_SUCCESS; + } + + FloatRectangle invRect; + + if (unlikely(pRectangle)) + { + if (unlikely(pRectangle->IsEmpty())) + { + return E_SUCCESS; + } + + invRect = *pRectangle; + } + else + { + invRect = __bounds; + invRect.SetPosition(0.0f, 0.0f); + } + + if (unlikely(invRect.IsEmpty())) + { + return E_SUCCESS; + } + + + // WARNING: + // 'GetUnion' method will not behave as our intention. + // If the parameter or self is empty, the union of rectangle should ignore it ! + //invRect = GetSharedData().invalidatedRegion.GetUnion(invRect); + RectUtilUnion(invRect, GetSharedData().invalidatedRegion); + + + // TODO: + // If new requested invalidate region is already included currently, + // we can skip the following calculations (but invalidating flags are STILL needed !) + + _VisualElementImpl* pRenderTarget = GetRenderTarget(); + + if (likely(pRenderTarget == this)) + { + // Make invalidated area a bit larger to be aligned on the render target + RectUtilMakeIntegral(invRect); + } + + GetSharedData().invalidatedRegion = invRect; + + _VisualElementImpl* pElement = this; + while (pElement) + { + pElement->GetSharedData().childrenInvalidated = true; + pElement = pElement->GetParent(); + } + SetRootNeedsContentUpdate(); + + return E_SUCCESS; +} + +FloatRectangle +_VisualElementImpl::GetInvalidatedRectangle(void) const +{ + ClearLastResult(); + + if (IS_PRESENTATION(this)) + { + if (__pModel) + { + return __pModel->GetInvalidatedRectangle(); + } + } + + return GetSharedData().invalidatedRegion; +} + +FloatRectangle +_VisualElementImpl::GetUpdateRectangle(void) const +{ + ClearLastResult(); + + return GetSharedData().updateRegion; +} + +bool +_VisualElementImpl::IsOpaque(void) const +{ + ClearLastResult(); + + if (HAVE_SURFACE(this)) + { + return IsSurfaceOpaque(); + } + + return true; +} + +result +_VisualElementImpl::Draw(void) +{ + SysTryReturnResult(NID_UI_ANIM, IS_ATTACHED(this), E_INVALID_STATE, "Drawing VisualElement should be attached to the root tree."); + if (!IS_MODEL(this)) + { + //SysTryReturnResult(NID_UI_ANIM, IS_MODEL(this), E_INVALID_OPERATION, "VisualElement is not Model object."); + } + + // WARNING: + // Not a good position to apply property changes into native(EFL) system. + // Because of no-compositor in VE, we cannot control each element's + // visibilities (show-state, bounds, opacity, etc.) ! + // Is there any good idea ? + // +// if (IS_PRESENTATION(this)) +// __UpdateHierarchyProps(); + + if (unlikely(GetSharedData().childrenInvalidated)) + { +// if (unlikely(!IS_PRESENTATION(this))) +// __UpdateHierarchyProps(); + + // + // Drawing must be done from first opaque. + // But, because we assume all VE's are transparent, all drawings are done from root !!! + + _VisualElementImpl* pRenderTarget = GetRenderTarget(); + bool needFullScreenDraw = __isRoot; + + if (unlikely(!pRenderTarget)) + { + // On no render target, flush invalidated area from root + pRenderTarget = GetRoot(); + SysTryReturnResult(NID_UI_ANIM, pRenderTarget, E_SYSTEM, "A system error has been occurred. This VisualElement doesn't have rendering target."); + needFullScreenDraw = true; + } + + + // WARNING + // To minimize drawing area(with clip), use '__DrawRectangleIfNeeded' + // To reduce drawing calls such as 'OnDraw', use '__DrawRectangle' directly + // + int maxScreenSize = _Max(_VisualElementCoordinateSystem::logScreenWidth, _VisualElementCoordinateSystem::logScreenHeight); + pRenderTarget->DrawRectangleIfNeeded( + needFullScreenDraw ? FloatRectangle(0.0f, 0.0f, maxScreenSize, maxScreenSize) : GetDrawableRect() + ); + } + + if (IS_PRESENTATION(this)) + UpdateHierarchyProps(); + + return E_SUCCESS; +} + +result +_VisualElementImpl::DrawForAnimation(void) +{ + if (!IS_ATTACHED(this)) + { + return E_SUCCESS; + } + + if (unlikely(GetSharedData().childrenInvalidated)) + { + _VisualElementImpl* pRenderTarget = GetRenderTarget(); + pRenderTarget->DrawRectangle(GetSharedData().invalidatedRegion); + + if (likely(GetSharedData().childrenInvalidated == false)) + { + return E_SUCCESS; + } + + _VisualElementImpl* pChild = null; + bool childrenNeedUpdate = false; + int count = __children.GetCount(); + for (int i = 0; i < count; i++) + { + pChild = __children.GetChildAt(i); + if (!pChild || (pChild->GetSharedData().childrenInvalidated == false)) + { + continue; + } + + pChild->DrawForAnimation(); + + if ((pChild->GetSharedData().childrenInvalidated)) + { + childrenNeedUpdate = true; + } + } + + // update 'needUpdate' flag regarding children only if no invalidated-region + if (GetSharedData().invalidatedRegion.IsEmpty()) + { + if (childrenNeedUpdate) + { + GetSharedData().childrenInvalidated = true; + } + } + } + + return E_SUCCESS; +} + +void +_VisualElementImpl::DrawRectangleIfNeeded(const FloatRectangle& drawRect) +{ + if (unlikely(!IsVisibleI()) || GetSharedData().childrenInvalidated == false) + { + return; + } + + // WARNING: + // VE with surface redraws *ALL INVALIDATED* region !! --> TBD: make an option/flags for this??? + // + FloatRectangle drawableRect; + + if (NEED_SURFACE(this)) + { + // WARNING: + // Redraw only if the request has some valid region to draw. + drawableRect = GetDrawableRect(); + if (!drawRect.IsIntersected(drawableRect)) + drawableRect.SetSize(0.0f, 0.0f); // Make empty + } + else + { + drawableRect = drawRect; + } + + DrawRectangle(drawableRect.GetIntersection(GetSharedData().invalidatedRegion)); + + // + // needUpdate flag may be 'true' after drawring invalidated region. + // This means that some children still need to be updated ! + // + if (likely(GetSharedData().childrenInvalidated == false)) + { + return; + } + + // + // Some children still need to update in case that invalidated rect of this + // is smaller than 'drawRect' which can overlap the invalid rect of children + // + + // + // Because user can do anything in drawing logic, + // adding-reference may be safe....... + // + _VisualElementImpl* pChild = null; + FloatRectangle updateRect, childBounds; + bool childrenNeedUpdate = false; + int count = __children.GetCount(); + for (int i = 0; i < count; i++) + { + pChild = __children.GetChildAt(i); + if (!pChild || pChild->GetSharedData().childrenInvalidated == false) + { + continue; + } + + + // WARNING: + // Draw all children with surface. + // Children with empty invalidated region will ignore re-drawing. + + updateRect = drawRect; + pChild->ConvertCoordinates(updateRect, this); + + if (likely(NEED_SURFACE(pChild))) + { + pChild->DrawRectangleIfNeeded(updateRect); + } + else + { + childBounds = pChild->__pPresentation->__bounds; + childBounds.SetPosition(0.0f, 0.0f); + updateRect = updateRect.GetIntersection(childBounds); + if (unlikely(!updateRect.IsEmpty())) + pChild->DrawRectangleIfNeeded(updateRect); + } + + if (pChild->GetSharedData().childrenInvalidated) + { + childrenNeedUpdate = true; + } + } + + // update 'needUpdate' flag regarding children only if no invalidated-region + if (GetSharedData().invalidatedRegion.IsEmpty()) + { + if (childrenNeedUpdate) + { + GetSharedData().childrenInvalidated = true; + } + } +} + +// TODO: change name(remove 'rectangle') +void +_VisualElementImpl::DrawRectangle(const FloatRectangle& drawRect) +{ + if (unlikely(!GetRootPublic()) || unlikely(drawRect.IsEmpty())) + { + return; + } + + //SysLog(NID_UI_ANIM, "DrawRectangle"); + + bool needDraw = false; + bool fullValidated = false; + FloatRectangle drawableRect(GetDrawableRect()); + FloatRectangle drawRectVisible(drawRect.GetIntersection(drawableRect)); + FloatRectangle invalidatedRectVisible(GetSharedData().invalidatedRegion.GetIntersection(drawableRect)); + + if (unlikely(!drawRectVisible.IsEmpty())) + { +#if 0 + // Draw full-invalidated-content (not partial) if VE has surface. + if (likely(NEED_SURFACE(this))) + drawRectVisible = drawableRect; +#endif + + needDraw = true; + } + + // WARNING: + // Make dirty/draw area a bit larger to be pixel-aligned and prevent drawing-artifacts caused by float-error. + RectUtilMakeIntegral(drawRectVisible); + RectUtilMakeIntegral(invalidatedRectVisible); + + // DO NOT USE drawRectVisible.Contains(invalidatedRectVisible)) + if (invalidatedRectVisible.IsEmpty() || (drawRectVisible.x <= invalidatedRectVisible.x && + drawRectVisible.y <= invalidatedRectVisible.y && + drawRectVisible.x + drawRectVisible.width >= invalidatedRectVisible.x + invalidatedRectVisible.width && + drawRectVisible.y + drawRectVisible.height >= invalidatedRectVisible.y + invalidatedRectVisible.height)) + { + fullValidated = true; + } + + + + // WARNING: + // VisualElement with User-Set surface does not allow invalidating and redrawing. + // Because there should be no invalidated region in this case, checking User-Surface may redundant. + // + if (GetSharedData().fixedSurfaceSize) + { + needDraw = false; + fullValidated = true; + drawRectVisible = GetSharedData().invalidatedRegion; + } + + + // WARNING: + // Set update region before 'CanDraw' and 'OnDraw' delegations to check real-update region + // + GetSharedData().updateRegion = drawRectVisible; + + if (fullValidated) + { + // WARNING: + // Clear *BEFORE* drawing because 'OnDraw' may add invalidated regions... + // + GetSharedData().invalidatedRegion.SetBounds(0.0f, 0.0f, 0.0f, 0.0f); // SetEmpty() + GetSharedData().childrenInvalidated = false; + } + + + if (needDraw) + { + if (!VE_DELEGATE(this, InvokePrepareDraw)) + { + needDraw = false; + } + } + + if (needDraw) + { + Canvas* pCanvas = GetCanvasN(); + + if (pCanvas) + { + result r = pCanvas->SetClipBounds(FloatRectangle(drawRectVisible.x, + drawRectVisible.y, + drawRectVisible.width, + drawRectVisible.height)); + if (IsFailed(r)) + { + SysLogException(NID_UI_ANIM, r, "[%s] Failed to set clip-bounds on canvas", GetErrorMessage(r)); + } + + VE_DELEGATE(this, InvokeOnDraw, *pCanvas); + delete pCanvas; + } + + // WARNING: + // Flushing canvas is done at GetCanvasN. + // + //SetFlushNeeded(); + } + + + // Clear update region after drawing + GetSharedData().updateRegion.SetBounds(0.0f, 0.0f, 0.0f, 0.0f); + + + // + // Because user can do anything in drawing logic, + // adding-reference/copying-list may be safe....... + // + _VisualElementImpl* pChild = null; + int count = __children.GetCount(); + bool childrenNeedUpdate = false; + FloatRectangle childBounds; + for (int i = 0; i < count; i++) + { + pChild = __children.GetChildAt(i); + if (likely(!NEED_SURFACE(pChild))) + { + drawRectVisible = drawRect; + pChild->ConvertCoordinates(drawRectVisible, this); + childBounds = pChild->__pPresentation->__bounds; + + childBounds.SetPosition(0.0f, 0.0f); + + drawRectVisible = drawRectVisible.GetIntersection(childBounds); + if (likely(!drawRectVisible.IsEmpty())) + pChild->DrawRectangle(drawRectVisible); + } + + if (pChild->GetSharedData().childrenInvalidated) + { + childrenNeedUpdate = true; + } + } + + // + // If not all children have been validated during update, + // we should not clear update flag to flush them later. + // + if (childrenNeedUpdate) + { + GetSharedData().childrenInvalidated = true; + } +} + +// for a cumstom property animation +result +_VisualElementImpl::SetPropertyI(const String& property, const Variant& value) +{ + result r = E_SUCCESS; + + if (likely(__pPublicInstance)) + { + r = __pPublicInstance->OnSetPropertyRequested(property, value); + SysTryLog(NID_UI_ANIM, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + } + + return r; +} + +result +_VisualElementImpl::InvokeOnSetPropertyRequested(const String& property, const Variant& value) +{ + SysTryReturnResult(NID_UI_ANIM, IS_MODEL(this), E_INVALID_OPERATION, "VisualElement is not Model object."); + result r = E_SUCCESS; + + if (likely(__pPublicInstance)) + { + r = __pPublicInstance->OnSetPropertyRequested(property, value); + SysTryLog(NID_UI_ANIM, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + } + + return r; +} + +int +_VisualElementImpl::HitTestI(const FloatPoint& point) +{ + if (!IsVisibleI()) + { + return HITTEST_NOWHERE; + } + + if (//NEED_SURFACE(&target) && + !GetSharedData().isSurfaceOpaque && + _FloatHardCompare(GetOpacityFromRoot(), 0.0f)) + { + return HITTEST_NOWHERE; + } + + if (!GetVisibleRect().Contains(point)) + { + return HITTEST_NOWHERE; + } + + _VisualElementImpl* pClipSource = GetClipSource(); + while (pClipSource) + { + FloatPoint pt = point; + pClipSource->ConvertCoordinates(pt, this); + + if (!pClipSource->GetVisibleRect().Contains(pt)) + { + return HITTEST_NOWHERE; + } + else + { + pClipSource = pClipSource->GetClipSource(); + } + } + + return HITTEST_MATCH; +} + +_VisualElementImpl* +_VisualElementImpl::GetChildAtPointI(const FloatPoint& point, int parentHitTest) +{ + _VisualElementImpl* pHitTarget = null; + FloatPoint hitPoint = point; + int hitTest; + + hitTest = VE_DELEGATE(this, InvokeHitTest, point); + if ((hitTest & HITTEST_MATCH) != 0) + { + // passed hittest + pHitTarget = this; + } + + if ((hitTest & HITTEST_NOMORECHILDREN) == 0) + { + int count = __children.GetCount(); + for (int i = count - 1; i >= 0; i--) // from top to bottom + { + _VisualElementImpl* pChild = __children.GetChildAt(i); + if (!pChild) + { + continue; + } + + FloatPoint childHitPoint = point; + pChild->ConvertCoordinates(childHitPoint, this); + + _VisualElementImpl* pChildHitTarget = pChild->GetChildAtPointI(childHitPoint, hitTest); + if (pChildHitTarget) + { + pHitTarget = pChildHitTarget; + hitPoint = childHitPoint; + break; + } + } + } + + + if (pHitTarget) + { +// point = hitPoint; + return pHitTarget; + } + + return null; +} + +// WARNING: +// Because Hit-Testing from self, clipping flags of self will be ignored. +// +_VisualElementImpl* +_VisualElementImpl::GetChildAt(const FloatPoint& point) +{ + _VisualElementImpl* pHitTarget = GetChildAtPointI(point, HITTEST_MATCH); + if (unlikely(!pHitTarget)) + { + SetLastResult(E_OBJ_NOT_FOUND); + } + else + { + ClearLastResult(); + } + + return pHitTarget; +} + +result +_VisualElementImpl::ScrollByPoint(const FloatPoint& pointOffset, bool scrollSelf) +{ + if (_FloatCompare(pointOffset.x, 0.0f) && _FloatCompare(pointOffset.y, 0.0f)) + { + return E_SUCCESS; + } + + result r; + FloatMatrix4 xform = __childrenTransform; + FloatMatrix4 xformOrg = xform; + FloatRectangle rectInvalidated; + + _MatrixUtilTranslate(xform, pointOffset.x, pointOffset.y, 0.0f); + + if (HAVE_SURFACE(this)) + { + int count = __children.GetCount(); + + LockInvalidate(true); + for (int i = 0; i < count; i++) + { + __children.GetChildAt(i)->LockInvalidate(true); + } + + r = SetChildrenTransformMatrix(xform); + + LockInvalidate(false); + for (int i = 0; i < count; i++) + { + __children.GetChildAt(i)->LockInvalidate(false); + } + } + else + { + r = SetChildrenTransformMatrix(xform); + } + + SysTryReturnResult(NID_UI_ANIM, r == E_SUCCESS, E_SYSTEM, "Failed to translate matrix for scrolling "); + + if (!NEED_SURFACE(this)) + { + InvalidateVisibleRectToRenderTarget(null); + } + else if (scrollSelf) + { + Canvas* pCanvas = GetCanvasN(); // TODO: clip rect...... + + if (pCanvas) + { + _CanvasImpl* pCanvasImpl = _CanvasImpl::GetInstance(*pCanvas); + if (pCanvasImpl) + { + Point pointDest; + Rectangle rectSource; + + rectSource.SetBounds(0, 0, __bounds.width, __bounds.height); + + rectInvalidated = __bounds; + rectInvalidated.SetPosition(0.0f, 0.0f); + if (pointOffset.x > 0) + { + rectSource.width -= pointOffset.x; + pointDest.x = pointOffset.x; + rectInvalidated.width = pointOffset.x; + } + else + { + rectSource.x += -pointOffset.x; + rectSource.width -= -pointOffset.x; + pointDest.x = 0; + rectInvalidated.x = rectSource.width; + rectInvalidated.width = -pointOffset.x; + } + + InvalidateVisibleRectToRenderTarget(&rectInvalidated); + + + rectInvalidated = __bounds; + rectInvalidated.SetPosition(0.0f, 0.0f); + if (pointOffset.y > 0) + { + rectSource.height -= pointOffset.y; + pointDest.y = pointOffset.y; + rectInvalidated.height = pointOffset.y; + } + else + { + rectSource.y += -pointOffset.y; + rectSource.height -= -pointOffset.y; + pointDest.y = 0; + rectInvalidated.y = rectSource.height; + rectInvalidated.height = -pointOffset.y; + } + + InvalidateVisibleRectToRenderTarget(&rectInvalidated); + + + r = pCanvasImpl->CopyEx(pointDest, *pCanvasImpl, rectSource); + if (r != E_SUCCESS) + { + // revert... + SysLogException(NID_UI_ANIM, r, "[%s] Can't copy area.", GetErrorMessage(r)); + SetChildrenTransformMatrix(xformOrg); // ??????????????????? + } + else + { + SetFlushNeeded(); + } + } + + delete pCanvas; + } + } + + return r; +} + +result +_VisualElementImpl::ConvertCoordinates(FloatPoint& point, const _VisualElementImpl* pFromElement) const +{ + if (unlikely(this == pFromElement)) + { + return E_SUCCESS; + } + + _VisualElementImpl* pFromRoot = null; + float x = point.x; + float y = point.y; + float z = 0.0f; + + if (likely(pFromElement)) + { + pFromRoot = pFromElement->GetRoot(); + SysTryReturnResult(NID_UI_ANIM, GetRoot() == pFromRoot, E_INVALID_ARG, "Invalid argument(s) is used. This VisualElement and pFromElement is not belong to the same tree."); + SysTryReturnResult(NID_UI_ANIM, pFromRoot || pFromElement->IsChildOf(*this) || IsChildOf(*pFromElement), + E_INVALID_ARG, "Invalid argument(s) is used. This VisualElement(%p) and pFromElement(%p) is not related.", this, pFromElement); + } + else + { + pFromRoot = GetRoot(); + SysTryReturnResult(NID_UI_ANIM, pFromRoot, E_INVALID_ARG, "Invalid argument(s) is used. This VisualElement is not attached to main tree."); + } + + const FloatMatrix4& toTopMatrix = (pFromElement ? pFromElement->GetMatrixToTop() : pFromRoot->GetMatrixToTop()); + _MatrixUtilTransform(toTopMatrix, &x, &y, &z); + + if (this != pFromRoot) + { + const FloatMatrix4& fromTopMatrix = GetMatrixFromTop(); + + SysTryReturnResult(NID_UI_ANIM, __matrixFromTopInvertible, E_INVALID_OPERATION, "The matrix for this conversion is singular which has zero determinant."); + SysTryReturnResult(NID_UI_ANIM, fromTopMatrix.matrix[2][2] != 0, E_INVALID_OPERATION, "It is failed to calculate z of world-coordinate mapped x-y plane of depth==0"); + + // WARNING: + // We should calculate z of world-coordinate mapped x-y plane of depth==0 in VE coordinate ! + z = -(fromTopMatrix.matrix[0][2] * x + fromTopMatrix.matrix[1][2] * y + fromTopMatrix.matrix[3][2]) / fromTopMatrix.matrix[2][2]; + + _MatrixUtilTransform(fromTopMatrix, &x, &y, &z); + } + + point.SetPosition(x, y); // z is omitted + + return E_SUCCESS; +} + +result +_VisualElementImpl::ConvertCoordinates(FloatRectangle& rectangle, const _VisualElementImpl* pFromElement) const +{ + if (unlikely(this == pFromElement)) + { + return E_SUCCESS; + } + + _VisualElementImpl* pFromRoot = null; + float x[4] = { rectangle.x, rectangle.x + rectangle.width, rectangle.x, rectangle.x + rectangle.width }; + float y[4] = { rectangle.y, rectangle.y, rectangle.y + rectangle.height, rectangle.y + rectangle.height }; + float z[4] = { 0.0f, 0.0f, 0.0f, 0.0f }; + + if (likely(pFromElement)) + { + pFromRoot = pFromElement->GetRoot(); + SysTryReturnResult(NID_UI_ANIM, GetRoot() == pFromRoot, E_INVALID_ARG, "Invalid argument(s) is used. This VisualElement and pFromElement is not belong to the same main tree."); + SysTryReturnResult(NID_UI_ANIM, pFromRoot || pFromElement->IsChildOf(*this) || IsChildOf(*pFromElement), + E_INVALID_ARG, "Invalid argument(s) is used. This VisualElement(%p) and pFromElement(%p) is not related.", this, pFromElement); + } + else + { + pFromRoot = GetRoot(); + SysTryReturnResult(NID_UI_ANIM, pFromRoot, E_INVALID_ARG, "Invalid argument(s) is used. This VisualElement is not attached to main tree."); + } + + const FloatMatrix4& toTopMatrix = (pFromElement ? pFromElement->GetMatrixToTop() : pFromRoot->GetMatrixToTop()); + + for (int i = 0; i < 4; i++) + { + _MatrixUtilTransform(toTopMatrix, &x[i], &y[i], &z[i]); + } + + if (this != pFromRoot) + { + const FloatMatrix4& fromTopMatrix = GetMatrixFromTop(); + + SysTryReturnResult(NID_UI_ANIM, __matrixFromTopInvertible, E_INVALID_OPERATION, "The matrix for this conversion is singular which has zero determinant."); + SysTryReturnResult(NID_UI_ANIM, fromTopMatrix.matrix[2][2] != 0, E_INVALID_OPERATION, "It is failed to calculate z of world-coordinate mapped x-y plane of depth==0"); + + for (int i = 0; i < 4; i++) + { + // WARNING: + // We should calculate z of world-coordinate mapped x-y plane of depth==0 in VE coordinate ! + z[i] = -(fromTopMatrix.matrix[0][2] * x[i] + fromTopMatrix.matrix[1][2] * y[i] + fromTopMatrix.matrix[3][2]) / fromTopMatrix.matrix[2][2]; + _MatrixUtilTransform(fromTopMatrix, &x[i], &y[i], &z[i]); + } + + } + + CalculateBoundingBox(x, y, rectangle); + + return E_SUCCESS; +} + +result +_VisualElementImpl::ConvertCoordinates(float* x, float* y, float* z, int count, const _VisualElementImpl* pFromElement) const +{ + if (unlikely(this == pFromElement) || unlikely(count <= 0)) + { + return E_SUCCESS; + } + + _VisualElementImpl* pFromRoot = null; + + if (likely(pFromElement)) + { + pFromRoot = pFromElement->GetRoot(); + SysTryReturnResult(NID_UI_ANIM, GetRoot() == pFromRoot, E_INVALID_ARG, "Invalid argument(s) is used. This VisualElement and pFromElement is not belong to the same main tree."); + SysTryReturnResult(NID_UI_ANIM, pFromRoot || pFromElement->IsChildOf(*this) || IsChildOf(*pFromElement), + E_INVALID_ARG, "Invalid argument(s) is used. This VisualElement(%p) and pFromElement(%p) is not related.", this, pFromElement); + } + else + { + pFromRoot = GetRoot(); + SysTryReturnResult(NID_UI_ANIM, pFromRoot, E_INVALID_ARG, "Invalid argument(s) is used. This VisualElement is not attached to main tree."); + } + + bool isUpwardConvertOnly = (pFromElement && pFromElement->IsChildOf(*this)); + const FloatMatrix4& toTopMatrix = (isUpwardConvertOnly ? pFromElement->CalcMatrixToBase(*this) : + pFromElement ? pFromElement->GetMatrixToTop() : pFromRoot->GetMatrixToTop()); + + for (int i = 0; i < count; i++) + { + _MatrixUtilTransform(toTopMatrix, &x[i], &y[i], &z[i]); + } + + if (!isUpwardConvertOnly) + { + const FloatMatrix4& fromTopMatrix = GetMatrixFromTop(); + + SysTryReturnResult(NID_UI_ANIM, __matrixFromTopInvertible, E_INVALID_OPERATION, "The matrix for this conversion is singular which has zero determinant."); + SysTryReturnResult(NID_UI_ANIM, fromTopMatrix.matrix[2][2] != 0, E_INVALID_OPERATION, "It is failed to calculate z of world-coordinate mapped x-y plane of depth==0"); + + for (int i = 0; i < count; i++) + { + // WARNING: + // We should calculate z of world-coordinate mapped x-y plane of depth==0 in VE coordinate ! + z[i] = -(fromTopMatrix.matrix[0][2] * x[i] + fromTopMatrix.matrix[1][2] * y[i] + fromTopMatrix.matrix[3][2]) / fromTopMatrix.matrix[2][2]; + _MatrixUtilTransform(fromTopMatrix, &x[i], &y[i], &z[i]); + } + } + + return E_SUCCESS; +} + +FloatPoint3 +_VisualElementImpl::TransformVectorFromOrigin(const Tizen::Graphics::FloatPoint3& originPoint, const _VisualElementImpl* pOriginVisualElement) const +{ + ClearLastResult(); + + if (unlikely(this == pOriginVisualElement)) + { + return FloatPoint3(originPoint); + } + + float x = originPoint.x; + float y = originPoint.y; + float z = originPoint.z; + + _VisualElementImpl* pOriginRoot = pOriginVisualElement->GetRoot(); + + SysTryReturn(NID_UI_ANIM, GetRoot() == pOriginRoot, FloatPoint3(), E_INVALID_ARG, "Invalid argument(s) is used. This VisualElement and originVisualElement is not belong to the same tree."); + SysTryReturn(NID_UI_ANIM, pOriginRoot || pOriginVisualElement->IsChildOf(*this) || IsChildOf(*pOriginVisualElement), + FloatPoint3(), E_INVALID_ARG, "Invalid argument(s) is used. This VisualElement(%p) and originVisualElement(%p) is not related.", this, pOriginVisualElement); + + const FloatMatrix4& toTopMatrix = pOriginVisualElement->GetMatrixToTop(); + _MatrixUtilTransform(toTopMatrix, &x, &y, &z); + + if (this != pOriginRoot) + { + const FloatMatrix4& fromTopMatrix = GetMatrixFromTop(); + + SysTryReturn(NID_UI_ANIM, __matrixFromTopInvertible, FloatPoint3(), E_INVALID_OPERATION, "The matrix for this conversion is singular which has zero determinant."); + + _MatrixUtilTransform(fromTopMatrix, &x, &y, &z); + } + + return FloatPoint3(x, y, z); +} + +/* + * VE ------------------------------------- surface + * <----40---> <------- 80 -------> + * +---------+ +------------------+ + * | | scaleX = 2.0f | (pStart) | + * +---------+ +------------------+ + * when capture (0,0,20,20) + * pCopy: width = 20 * scaleX = 40 + * +---------+ + * | pCopy | + * +---------+ + */ + + +result +_VisualElementImpl::CaptureI(Canvas& outputCanvas, const FloatRectangle& rectDest, _VisualElementImpl& reference, const FloatRectangle& rectRef, const FloatRectangle& clipRect, bool withChilren, int depth) +{ + _CanvasImpl* pOutput = _CanvasImpl::GetInstance(outputCanvas); + + SysTryReturnResult(NID_UI_ANIM, pOutput, E_INVALID_ARG, "Invalid argument(s) is used. Output canvas is invalid."); + SysTryReturnResult(NID_UI_ANIM, GetRoot(), E_INVALID_STATE, "Invalid argument(s) is used. VisualElement is not attached to main tree."); + + FloatRectangle bounds = __bounds;//GetDrawableRect(); + + bounds.x = 0.0f; + bounds.y = 0.0f; + + reference.ConvertCoordinates(bounds, this); + FloatRectangle drawRect = bounds; + + _VisualElementImpl* pRenderTarget = this->GetRenderTarget(); + drawRect = rectRef.GetIntersection(bounds); + drawRect = drawRect.GetIntersection(clipRect); + + FloatRectangle tempRect = drawRect; + + + ConvertCoordinates(drawRect, &reference); + + bounds = tempRect; + + 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 + { + //Canvas* pCanvas = GetCanvasN(elementbounds); +#ifdef USE_CANVAS_FOR_CAPTURE + Canvas* pCanvas = GetCanvasN(); + if (pCanvas) + { + Bitmap bitmap; + bitmap.Construct(*pCanvas, Rectangle(drawRect.x, drawRect.y, drawRect.width, drawRect.height)); + bitmap.SetAlphaConstant((int)(pRenderTarget->GetOpacityFromRoot()*255)); + + Point point; + point.x = rectDest.x + bounds.x; + point.y = rectDest.y + bounds.y; + outputCanvas.DrawBitmap(point, bitmap); + delete pCanvas; + } + +#else + if (__pSharedData->pSurface ) + { + _EflVisualElementSurfaceImpl* pSurfImpl = dynamic_cast<_EflVisualElementSurfaceImpl*>(_VisualElementSurfaceImpl::GetInstance(*__pSharedData->pSurface)); + + bool validContentsBounds = true; + + if(__useContentBounds) + { + if(__contentBounds.x < 0.0f || __contentBounds.y < 0.0f || __contentBounds.width > 1.0f || __contentBounds.height > 1.0f ) + { + validContentsBounds = false; + } + } + + if(likely(validContentsBounds) && pSurfImpl && pSurfImpl->GetNativeHandle() ) + { + BufferInfo info; + byte* pStart = null; + bool isCaptured = false; + + if(pSurfImpl->__isImageObject) + { + __pSharedData->pSurface->GetBufferInfo(info); + + pStart = (byte*)evas_object_image_data_get((Evas_Object*)pSurfImpl->GetNativeHandle(), false); + _DisplayManager::RestoreContext(); + } + else + { + if(__pCaptureProvider) + { + isCaptured = true; + if(__pCaptureProvider->OnCaptureAcquire(info)) + { + pStart = (byte*)info.pPixels; + } + _DisplayManager::RestoreContext(); + } + } + + if(pStart) + { + float scaleX = 1.0f; + float scaleY = 1.0f; + + if(!__useContentBounds) + { + scaleX = (float)info.width/(float)__bounds.width; + scaleY = (float)info.height/(float)__bounds.height; + } + else + { + scaleX = ((float)info.width * __contentBounds.width)/(float)__bounds.width; + scaleY = ((float)info.height * __contentBounds.height)/(float)__bounds.height; + } + + +// _VisualElementCoordinateSystem::ConvertRectangleToPhysicalIntegral(drawRect.x, drawRect.y, drawRect.width, drawRect.height); + + BufferInfo copyInfo; + copyInfo.bitsPerPixel = info.bitsPerPixel; + copyInfo.width = drawRect.width*scaleX; + copyInfo.height = drawRect.height*scaleY; + copyInfo.pitch = (info.pitch/info.width)*copyInfo.width; + + byte* pCopy = new (std::nothrow) byte[copyInfo.height*(copyInfo.pitch)]; + + if (pCopy) + { + pStart += info.pitch * int(drawRect.y*scaleY) + int(drawRect.x*scaleX) * info.bitsPerPixel/8; + for (int y = 0; y < copyInfo.height; y++) + { + unsigned int* pSrc = (unsigned int*)(pStart + info.pitch * y); + unsigned int* pAddr = (unsigned int*)(pCopy + copyInfo.pitch * y); + for (int x = 0; x < copyInfo.width; x++) + { + + *pAddr = *pSrc; + + pSrc++; + pAddr++; + } + } + +// _VisualElementCoordinateSystem::ConvertRectangleToLogical(drawRect.x, drawRect.y, drawRect.width, drawRect.height); + + + + ByteBuffer buffer; + result r = buffer.Construct(pCopy, 0, copyInfo.height*(copyInfo.pitch), copyInfo.height*(copyInfo.pitch)); + + if (r == E_SUCCESS) + { + Bitmap* pBitmap = Bitmap::GetNonScaledBitmapN(buffer, Dimension(copyInfo.width, copyInfo.height), BITMAP_PIXEL_FORMAT_ARGB8888); + if (pBitmap) + { + _BitmapImpl::GetInstance(*pBitmap)->SetAsPremultiplied(); + pBitmap->SetAlphaConstant((int)(pRenderTarget->GetOpacityFromRoot() * 255.0f)); + if(!_FloatCompare(scaleX , 1.0f) && !_FloatCompare(scaleY,1.0f)) + { + pBitmap->Scale(FloatDimension(drawRect.width,drawRect.height)); + } + + FloatRectangle outputRect(rectDest.x + bounds.x - rectRef.x, rectDest.y + bounds.y - rectRef.y, drawRect.width, drawRect.height); + FloatRectangle srcRect = outputRect; + srcRect.x = 0; + srcRect.y = 0; + outputCanvas.DrawBitmap(outputRect, *pBitmap, srcRect); + + delete pBitmap; + } + } + delete [] pCopy; + } + if(isCaptured && __pCaptureProvider) + { + __pCaptureProvider->OnCaptureReleased(); + } + + } + + } + } +#endif + } + else + { + _EflNode* pNativeNode = dynamic_cast< _EflNode* >(GetNativeNode()); + + SysTryReturnResult(NID_UI_ANIM, pNativeNode, E_INVALID_STATE, "No object for background"); // CHECKME: Default BG? + _Colorf bgcolorf = pNativeNode->GetBackgroundColor(); + Color color(bgcolorf.Red()*255, bgcolorf.Green()*255, bgcolorf.Blue()*255, bgcolorf.Alpha()*255); + + FloatPoint point; + point.x = rectDest.x + bounds.x - rectRef.x; + point.y = rectDest.y + bounds.y - rectRef.y; + + //pOutput->FillRectangle(color, Rectangle(drawRect.x + bounds.x, drawRect.y + bounds.y, drawRect.width, drawRect.height)); + pOutput->FillRectangle(color, FloatRectangle(point.x, point.y, drawRect.width, drawRect.height)); + } + } + + if (withChilren) // child draw + { + _VisualElementImpl* pChild = null; + + FloatRectangle clipBounds = clipRect; + + int count = __children.GetCount(); + + if(count > 0 && __isClipChildren) + { + clipBounds = clipRect.GetIntersection(bounds); + } + + 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)) ) + { + continue; + } + pChild->CaptureI(outputCanvas, rectDest, reference, rectRef, clipBounds, true, depth + 1); + } + } + + return E_SUCCESS; +} + +result +_VisualElementImpl::CaptureI(Canvas& outputCanvas, const FloatRectangle& rectDest, _VisualElementImpl& reference, const FloatRectangle& clipRect, bool withChilren, int depth) +{ + _CanvasImpl* pOutput = _CanvasImpl::GetInstance(outputCanvas); + + SysTryReturnResult(NID_UI_ANIM, pOutput, E_INVALID_ARG, "Invalid argument(s) is used. Output canvas is invalid."); + SysTryReturnResult(NID_UI_ANIM, GetRoot(), E_INVALID_STATE, "Invalid argument(s) is used. VisualElement is not attached to main tree."); + + FloatRectangle bounds = __bounds;//GetDrawableRect(); + + bounds.x = 0.0f; + bounds.y = 0.0f; + + reference.ConvertCoordinates(bounds, this); + FloatRectangle drawRect = bounds; + + _VisualElementImpl* pRenderTarget = this->GetRenderTarget(); + drawRect = bounds.GetIntersection(clipRect); + + FloatRectangle tempRect = drawRect; + + drawRect.x -= bounds.x; + drawRect.y -= bounds.y; //--> 0 - -20 = 20 : 20 - 20 = 0 + + bounds = tempRect; + + if (!drawRect.IsEmpty()) + { + if (pRenderTarget && HAVE_SURFACE(pRenderTarget)) // If element have surface , justly draw to the canvas + { + //Canvas* pCanvas = GetCanvasN(elementbounds); +#ifdef USE_CANVAS_FOR_CAPTURE + Canvas* pCanvas = GetCanvasN(); + if (pCanvas) + { + Bitmap bitmap; + bitmap.Construct(*pCanvas, Rectangle(drawRect.x, drawRect.y, drawRect.width, drawRect.height)); + bitmap.SetAlphaConstant((int)(pRenderTarget->GetOpacityFromRoot()*255)); + + Point point; + point.x = rectDest.x + bounds.x; + point.y = rectDest.y + bounds.y; + outputCanvas.DrawBitmap(point, bitmap); + delete pCanvas; + +#else + if (__pSharedData->pSurface) + { + + _EflVisualElementSurfaceImpl* pSurfImpl = dynamic_cast<_EflVisualElementSurfaceImpl*>(_VisualElementSurfaceImpl::GetInstance(*__pSharedData->pSurface)); + + if(pSurfImpl && pSurfImpl->GetNativeHandle() && pSurfImpl->__isImageObject) + { + BufferInfo info; + byte* pStart = null; + bool isCaptured = false; + if(pSurfImpl->__isImageObject) + { + __pSharedData->pSurface->GetBufferInfo(info); + + pStart = (byte*)evas_object_image_data_get((Evas_Object*)pSurfImpl->GetNativeHandle(), false); + _DisplayManager::RestoreContext(); + } + else + { + if(__pCaptureProvider) + { + isCaptured = true; + if(__pCaptureProvider->OnCaptureAcquire(info)) + { + pStart = (byte*)info.pPixels; + } + _DisplayManager::RestoreContext(); + } + } + + if(pStart) + { + ByteBuffer buffer; + result r = buffer.Construct(pStart, 0, info.height*(info.pitch), info.height*(info.pitch)); + + if (r == E_SUCCESS) + { + Bitmap* pBitmap = Bitmap::GetNonScaledBitmapN(buffer, Dimension(info.width, info.height), BITMAP_PIXEL_FORMAT_ARGB8888); + if (pBitmap) + { + _BitmapImpl::GetInstance(*pBitmap)->SetAsPremultiplied(); + pBitmap->SetAlphaConstant((int)(pRenderTarget->GetOpacityFromRoot() * 255.0f)); + + FloatRectangle outputRect(rectDest.x + bounds.x, rectDest.y + bounds.y, drawRect.width, drawRect.height); + + _VisualElementCoordinateSystem::ConvertRectangleToPhysicalIntegral(drawRect.x, drawRect.y, drawRect.width, drawRect.height); + _VisualElementCoordinateSystem::ConvertRectangleToLogical(drawRect.x, drawRect.y, drawRect.width, drawRect.height); + + outputCanvas.DrawBitmap(outputRect, *pBitmap, drawRect); + + delete pBitmap; + } + } + if(isCaptured && __pCaptureProvider) + { + __pCaptureProvider->OnCaptureReleased(); + } + } + } +#endif + } + } + else + { + _EflNode* pNativeNode = dynamic_cast< _EflNode* >(GetNativeNode()); + + SysTryReturnResult(NID_UI_ANIM, pNativeNode, E_INVALID_STATE, "No object for background"); // CHECKME: Default BG? + _Colorf bgcolorf = pNativeNode->GetBackgroundColor(); + Color color(bgcolorf.Red()*255, bgcolorf.Green()*255, bgcolorf.Blue()*255, bgcolorf.Alpha()*255); + + FloatPoint point; + point.x = rectDest.x + bounds.x; + point.y = rectDest.y + bounds.y; + + //pOutput->FillRectangle(color, Rectangle(drawRect.x + bounds.x, drawRect.y + bounds.y, drawRect.width, drawRect.height)); + pOutput->FillRectangle(color, FloatRectangle(point.x, point.y, drawRect.width, drawRect.height)); + } + } + + if (withChilren) // child draw + { + _VisualElementImpl* pChild = null; + + FloatRectangle clipBounds = clipRect; + + int count = __children.GetCount(); + + if(count > 0 && __isClipChildren) + { + clipBounds = clipRect.GetIntersection(bounds); + } + + for (int i = 0; i < count; i++) + { + pChild = __children.GetChildAt(i); + if (unlikely(!pChild) || unlikely(!VE_VISIBLE(pChild))) + { + continue; + } + pChild->CaptureI(outputCanvas, rectDest, reference, clipBounds, true, depth + 1); + } + } + + return E_SUCCESS; +} + +result +_VisualElementImpl::Capture(Canvas& outputCanvas, const FloatRectangle& rectDest,const FloatRectangle& rectSrc, bool withChildren) +{ + FloatRectangle tempSrcRect = rectSrc; + FloatRectangle tempDestRect = rectDest; +// tempSrcRect.x = rectDest.x; +// tempSrcRect.y = rectDest.y; + + float diff = 0; + if(rectDest.x < 0) + { + diff = -rectDest.x; + tempDestRect.width -= diff; + tempDestRect.x = 0; + + tempSrcRect.x += diff; + tempSrcRect.width -= diff; + } + if(rectDest.y < 0) + { + diff = -rectDest.y; + tempDestRect.height -= diff; + tempDestRect.y = 0; + + tempSrcRect.y += diff; + tempSrcRect.height -= diff; + } + + FloatRectangle clipBounds = tempDestRect; + clipBounds.x = tempSrcRect.x; + clipBounds.y = tempSrcRect.y; + + clipBounds = clipBounds.GetIntersection(tempSrcRect); + tempSrcRect = clipBounds; + + if(!VE_VISIBLE(this)) + return E_SUCCESS; + + return CaptureI(outputCanvas, tempDestRect, *this, tempSrcRect, clipBounds, withChildren, 0); +} + +result +_VisualElementImpl::Capture(Canvas& outputCanvas, const FloatRectangle& rectDest, bool withChildren) +{ + FloatRectangle tempDestRect = rectDest; + tempDestRect.x = __bounds.x; + tempDestRect.y = __bounds.y; + FloatRectangle clipBounds = __bounds; + + clipBounds = tempDestRect.GetIntersection(__bounds); + clipBounds.x = 0; + clipBounds.y = 0; + + if(!VE_VISIBLE(this)) + return E_SUCCESS; + + return CaptureI(outputCanvas, rectDest, *this, clipBounds, withChildren, 0); +// test boundray +// Rectangle cBounds = outputCanvas.GetBounds(); +// outputCanvas.SetForegroundColor(Color(10,110,20)); +// outputCanvas.DrawRectangle(Rectangle(cBounds.x+1,cBounds.y+1,cBounds.width-2,cBounds.height-2)); +// outputCanvas.SetForegroundColor(Color(10,20,20)); +// outputCanvas.DrawRectangle(Rectangle(rectDest.x+1,rectDest.y+1,rectDest.width-2,rectDest.height-2)); +// return E_SUCCESS; +} +#if 0 +result +_VisualElementImpl::Capture(Canvas& outputCanvas, const FloatRectangle& rectDest, bool withChildren) +{ + result r = E_SUCCESS; + + Rectangle rect; + + rect.x = rectDest.x; + rect.y = rectDest.y; + rect.width = rectDest.width; + rect.height = rectDest.height; + + if (!withChildren) + { + Canvas* pCanvas = GetCanvasN(); + if (pCanvas) + { + r = outputCanvas.Copy(Point(0,0), *pCanvas, rect); + delete pCanvas; + return r; + } + + return GetLastResult(); + } + else + { + _EflNode* pNode = dynamic_cast<_EflNode*>(GetNativeNode()); + SysTryReturnResult(pNode, E_INVALID_STATE, "VisualElement is invalid."); + if (pNode) + { + r = pNode->Capture(outputCanvas, Point(0,0), rect); + } + + SysTryReturn(r == E_SUCCESS, r, r,"[%s] Propagating.", GetErrorMessage(r)); + } + + return r; +} +#endif +result +_VisualElementImpl::AddAnimation(const Tizen::Base::String* pKeyName, VisualElementAnimation& animation) +{ + SysTryReturnResult(NID_UI_ANIM, !IS_PRESENTATION(this), E_INVALID_OPERATION, "This is not model."); + + result r = E_SUCCESS; + + bool isPropertyPropagationEnabled = __isPropertyPropagationEnabled; + + __isPropertyPropagationEnabled = false; + + if (dynamic_cast< VisualElementAnimationGroup* >(&animation) != null) + { + VisualElementAnimation* pCloned = animation.CloneN(); + SysTryReturnResult(NID_UI_ANIM, pCloned != null, E_OUT_OF_MEMORY, "Memory allocation failed."); + + r = AddAnimationGroupI(pKeyName, *pCloned); + SysTryLog(NID_UI_ANIM, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + if (r != E_SUCCESS) + { + delete pCloned; + } + } + else + { + r = AddAnimationI(pKeyName, animation); + SysTryLog(NID_UI_ANIM, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + } + + __isPropertyPropagationEnabled = isPropertyPropagationEnabled; + + return r; +} + +result +_VisualElementImpl::AddAnimationI(const Tizen::Base::String* pKeyName, VisualElementAnimation& animation) +{ + result r = E_SUCCESS; + + IVisualElementAnimationTickEventListener* pTickListener = null; + + // Validate + VisualElementValueAnimation* pValueAnimation = dynamic_cast< VisualElementValueAnimation* >(&animation); + if (pValueAnimation != null) + { + _VisualElementValueAnimationImpl* pValueAnimationImpl = _VisualElementValueAnimationImpl::GetInstance(*pValueAnimation); + SysTryReturnResult(NID_UI_ANIM, (pValueAnimationImpl->IsValid()), E_INVALID_ARG, "Invalid argument(s) is used. Animation value is invalid."); + + pTickListener = pValueAnimationImpl->GetTickEventListener(); + } + + // Copy animation + VisualElementAnimation* pCloned = animation.CloneN(); + SysTryReturnResult(NID_UI_ANIM, (pCloned != null), E_OUT_OF_MEMORY, "Memory allocation failed."); + + _VisualElementAnimationImpl* pAnimationImpl = _VisualElementAnimationImpl::GetInstance(*pCloned); + + if (pAnimationImpl->GetStatusEventListener() != null || pTickListener != null) + { + pAnimationImpl->SetEventTarget(*GetPublic()); + } + + // Use presentation tree for animation + VisualElement* pPresentation = __pPresentation->__pPublicInstance; + + _AnimationManager* pAnimationManager = _AnimationManager::GetInstance(); + if (!pAnimationManager) + { + SysLog(NID_UI_ANIM, "Failed to add animation."); + + delete pCloned; + return E_SUCCESS; + } + + r = pAnimationManager->AddAnimation(*pPresentation, pKeyName, *pCloned); + if (r != E_SUCCESS) + { + SysTryLog(NID_UI_ANIM, "[%s] Failed to add animation.", GetErrorMessage(r)); + + delete pCloned; + return r; + } + + // Change model tree value if endValueApplied is true + VisualElementPropertyAnimation* pPropertyAnimation = dynamic_cast< VisualElementPropertyAnimation* >(pCloned); + + if (pPropertyAnimation + && pPropertyAnimation->IsEndValueApplied() + && !pPropertyAnimation->IsAutoReverseEnabled() + && pPropertyAnimation->GetRepeatCount() != 0) + { + const String& propertyName = pPropertyAnimation->GetPropertyName(); + const Variant& endValue = pPropertyAnimation->GetEndValue(); + + if (endValue.IsEmpty() == false && InvokeOnGetPropertyRequested(propertyName) != endValue) + { + (void) InvokeOnSetPropertyRequested(propertyName, endValue); + } + } + + return E_SUCCESS; +} + +result +_VisualElementImpl::AddAnimationGroupI(const Tizen::Base::String* pKeyName, VisualElementAnimation& animation) +{ + _AnimationManager* pAnimationManager = _AnimationManager::GetInstance(); + + if (!pAnimationManager) + { + return E_SUCCESS; + } + + // Get presentation tree + VisualElement* pPresentation = __pPresentation->__pPublicInstance; + + VisualElementAnimationGroup* pAnimationGroup = dynamic_cast< VisualElementAnimationGroup* >(&animation); + + SysTryReturnResult(NID_UI_ANIM, (pAnimationGroup != null), E_INVALID_ARG, "Invalid argument(s) is used. Failed to add animation group."); + SysTryReturnResult(NID_UI_ANIM, (pAnimationGroup->GetAnimationCount() > 0), E_INVALID_ARG, "Invalid argument(s) is used. Animation group has no animation."); + + _VisualElementAnimationGroupImpl* pAnimationGroupImpl = _VisualElementAnimationGroupImpl::GetInstance(*pAnimationGroup); + + if (pAnimationGroupImpl->GetStatusEventListener() != null) + { + pAnimationGroupImpl->SetEventTarget(*GetPublic()); + } + + result r = E_SUCCESS; + + VisualElementAnimation* pAnimation = null; + Tizen::Base::String name; + int animationCount = 0; + + int transactionID = pAnimationManager->BeginGroupTransaction(*pPresentation, pKeyName, *pAnimationGroup); + + r = GetLastResult(); + SysTryCatch(NID_UI_ANIM, (transactionID > 0), , r, "[%s] Transaction is not created.", GetErrorMessage(r)); + + animationCount = pAnimationGroupImpl->GetAnimationCount(); + + for (int index = 0; index < animationCount; index++) + { + pAnimation = pAnimationGroupImpl->GetAnimation(index); + + if (pAnimation == null) + { + continue; + } + + if (dynamic_cast< VisualElementAnimationGroup* >(pAnimation) != null) + { + r = AddAnimationGroupI(&name, *pAnimation); + } + else + { + r = AddAnimationI(&name, *pAnimation); + } + + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , r, "[%s] animation manager is null.", GetErrorMessage(r)); + } + + pAnimationManager->CommitTransaction(); + + return E_SUCCESS; + +CATCH: + + if (transactionID > 0) + { + pAnimationManager->DiscardTransaction(transactionID); + } + + return r; +} + +result +_VisualElementImpl::RemoveAnimation(const Tizen::Base::String& keyName) +{ + VisualElement* pPresentation = __pPresentation->__pPublicInstance; + result r = E_SUCCESS; + _AnimationManager* pAnimationManager = _AnimationManager::GetInstance(); + + if (pAnimationManager) + { + r = pAnimationManager->RemoveAnimation(*pPresentation, keyName); + } + return r; +} + +result +_VisualElementImpl::RemoveAllAnimations(void) +{ + VisualElement* pPresentation = __pPresentation->__pPublicInstance; + _AnimationManager* pAnimationManager = _AnimationManager::GetInstance(); + + if (pAnimationManager) + { + pAnimationManager->RemoveAllAnimations(*pPresentation); + } + return E_SUCCESS; +} + +VisualElementAnimation* +_VisualElementImpl::GetAnimationN(const Tizen::Base::String& keyName) const +{ + VisualElement* pPresentation = __pPresentation->__pPublicInstance; + + ClearLastResult(); + + _AnimationManager* pAnimationManager = _AnimationManager::GetInstance(); + + if (pAnimationManager) + { + return pAnimationManager->GetAnimationN(*pPresentation, keyName); + } + return null; +} + +bool +_VisualElementImpl::CheckIfAnimatable(const String& property) const +{ + // TODO: + // Optimize using map or other algorithms ! + // + +#if 0 + static const wchar_t* supportedProperties[] = { + VeSubPropTransformScaleXY, + + VePropBounds, + VePropContentOpacity, + VePropOpacity, + VePropTransform, + VePropChildrenTransform, + VePropZPosition, // TBD: + VeSubPropBoundsPosition, + VeSubPropBoundsSize, + + VeSubPropTransformRotationX, + VeSubPropTransformRotationY, + VeSubPropTransformRotationZ, + VeSubPropTransformRotationXY, + VeSubPropTransformScaleX, + VeSubPropTransformScaleY, + VeSubPropTransformScaleZ, + + VeSubPropTransformTranslationX, + VeSubPropTransformTranslationY, + VeSubPropTransformTranslationZ, + VeSubPropTransformTranslationXY, + VeSubPropChildrenTransformRotationX, + VeSubPropChildrenTransformRotationY, + VeSubPropChildrenTransformRotationZ, + VeSubPropChildrenTransformRotationXY, + VeSubPropChildrenTransformScaleX, + VeSubPropChildrenTransformScaleY, + VeSubPropChildrenTransformScaleZ, + VeSubPropChildrenTransformScaleXY, + VeSubPropChildrenTransformTranslationX, + VeSubPropChildrenTransformTranslationY, + VeSubPropChildrenTransformTranslationZ, + VeSubPropChildrenTransformTranslationXY + }; +#else + static String* const* supportedProperties[] = { + &pVePropBounds, + &pVePropContentOpacity, + &pVePropOpacity, + &pVePropTransform, + &pVePropChildrenTransform, + &pVePropZPosition, // TBD: + &pVeSubPropBoundsPosition, + &pVeSubPropBoundsSize, + + &pVePropContentBounds, +#if defined(SUPPORT_CUSTOMIZING_ATTACH_DETACH_ANIMATION) + &pVePropActionDetach, + &pVePropActionAttach, +#endif + &pVeSubPropTransformRotationX, + &pVeSubPropTransformRotationY, + &pVeSubPropTransformRotationZ, + &pVeSubPropTransformRotationXY, + &pVeSubPropTransformScaleX, + &pVeSubPropTransformScaleY, + &pVeSubPropTransformScaleZ, + &pVeSubPropTransformScaleXY, + &pVeSubPropTransformTranslationX, + &pVeSubPropTransformTranslationY, + &pVeSubPropTransformTranslationZ, + &pVeSubPropTransformTranslationXY, + &pVeSubPropChildrenTransformRotationX, + &pVeSubPropChildrenTransformRotationY, + &pVeSubPropChildrenTransformRotationZ, + &pVeSubPropChildrenTransformRotationXY, + &pVeSubPropChildrenTransformScaleX, + &pVeSubPropChildrenTransformScaleY, + &pVeSubPropChildrenTransformScaleZ, + &pVeSubPropChildrenTransformScaleXY, + &pVeSubPropChildrenTransformTranslationX, + &pVeSubPropChildrenTransformTranslationY, + &pVeSubPropChildrenTransformTranslationZ, + &pVeSubPropChildrenTransformTranslationXY + }; +#endif + + for (int i = 0; i < static_cast< int >(sizeof(supportedProperties) / sizeof(supportedProperties[0])); i++) + { + //if (wcscmp(property.GetPointer(), supportedProperties[i]) == 0) + if (property.GetPointer() == (*supportedProperties[i])->GetPointer() || property == **supportedProperties[i]) + { + return true; + } + } + + return false; +} + +VisualElementAnimation* +_VisualElementImpl::CreateAnimationForPropertyI(const Tizen::Base::String& property) +{ + if (IS_PRESENTATION(this) || !CheckIfAnimatable(property)) + { + return null; + } + +#if 0 + if (property.CompareTo(String(VePropBounds)) == 0) + { + //ToDo: default implementation + } + else if (property.CompareTo(String(VePropOpacity)) == 0) + { + //ToDo: default implementation + } + else if (property.CompareTo(String(VePropChildrenOpacity)) == 0) + { + //ToDo: default implementation + } + else if (property.CompareTo(String(VePropShowState)) == 0) + { + //ToDo: default implementation + } + else if (property.CompareTo(String(VePropTransform)) == 0) + { + //ToDo: default implementation + } + else if (property.CompareTo(String(VePropChildrenTransform)) == 0) + { + //ToDo: default implementation + } + else if (property.CompareTo(String(VePropZPosition)) == 0) + { + //ToDo: default implementation + } + else + return null; +#endif + VisualElementPropertyAnimation* pAnimation = new (std::nothrow) VisualElementPropertyAnimation(); + SysTryReturn(NID_UI_ANIM, pAnimation != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + +#if defined(SUPPORT_CUSTOMIZING_ATTACH_DETACH_ANIMATION) + if (unlikely(property == *pVePropActionAttach)) + { + pAnimation->SetPropertyName(*pVePropOpacity); + pAnimation->SetStartValue(Variant(0.0f)); + } + else if (unlikely(property == *pVePropActionDetach)) + { + pAnimation->SetPropertyName(*pVePropOpacity); + pAnimation->SetEndValue(Variant(0.0f)); + } + else +#endif + { + _VisualElementImpl* pPresentation = GetPresentation(); + + const Variant& curValue = pPresentation->InvokeOnGetPropertyRequested(property); + result r = GetLastResult(); + SysTryCatch(NID_UI_ANIM, !IsFailed(r), , r, "[%s] No property for animation exists.", GetErrorMessage(r)); + + pAnimation->SetPropertyName(property); + pAnimation->SetStartValue(curValue); + } + + return pAnimation; + + +CATCH: + delete pAnimation; + + return null; +} + +void +_VisualElementImpl::SetBoundsChangedCallback(BoundsChangedCallback pCallback, void* pData) +{ + __pBoundsChangedCallback = pCallback; + __pBoundsChangedCallbackData = pData; +} + +void +_VisualElementImpl::SetDestroyedCallback(DestroyedCallback pCallback, void* pData) +{ + __pDestroyedCallback = pCallback; + __pDestroyedCallbackData = pData; +} + +void +_VisualElementImpl::SetCaptureProvider(_IVisualElementCaptureProvider* pProvider) +{ + __pCaptureProvider = pProvider; +} + +_IVisualElementCaptureProvider* +_VisualElementImpl::GetCaptureProvider(void) const +{ + return __pCaptureProvider; +} + +// delegate--------------------------------------------------------------------------------- + +void +_VisualElementImpl::InvokeOnConstructed(void) +{ + if (__pPublicInstance) + { + if (IS_MODEL(this)) + { + __pPublicInstance->OnConstructed(); + } + } + + ClearLastResult(); +} + +void +_VisualElementImpl::InvokeOnDestructing(void) +{ + if (__pPublicInstance) + { + if (IS_MODEL(this)) + { + __pPublicInstance->OnDestructing(); + } + } + + ClearLastResult(); +} + +int +_VisualElementImpl::InvokeHitTest(const Tizen::Graphics::FloatPoint& point) +{ + int hitTest = _VisualElementImpl::HITTEST_NOWHERE; + + if (__pPublicInstance && !__isInternal) + { + HitTestResult hitResult = HIT_TEST_NOWHERE; + + if (GetSharedData().pContentProvider) + { + hitResult = GetSharedData().pContentProvider->HitTest(*__pPublicInstance, point); + } + else + { + hitResult = __pPublicInstance->OnHitTest(point); + } + + if (hitResult == HIT_TEST_NOWHERE) + { + hitTest = _VisualElementImpl::HITTEST_NOWHERE; + } + else + { + hitTest = _VisualElementImpl::HITTEST_MATCH; + } + } + else + { + return HitTestI(point); + } + + ClearLastResult(); + + return hitTest; +} + +bool +_VisualElementImpl::InvokePrepareDraw(void) +{ + bool result = true; + + if (__pPublicInstance) + { + if (GetSharedData().pContentProvider) + { + result = GetSharedData().pContentProvider->PrepareDraw(*__pPublicInstance); + } + else + { + result = __pPublicInstance->OnPrepareDraw(); + } + } + + ClearLastResult(); + + return result; +} + +void +_VisualElementImpl::InvokeOnDraw(Tizen::Graphics::Canvas& canvas) +{ + if (__pPublicInstance) + { + if (GetSharedData().pContentProvider) + { + GetSharedData().pContentProvider->DrawContent(*__pPublicInstance, canvas); + } + else + { + __pPublicInstance->OnDraw(canvas); + } + } + + ClearLastResult(); +} + +VisualElementAnimation* +_VisualElementImpl::InvokeCreateAnimationForProperty(const Tizen::Base::String& property) +{ + VisualElementAnimation* pAnimation = null; + + if (__pPublicInstance) + { + if (GetSharedData().pAnimationProvider) + { + pAnimation = GetSharedData().pAnimationProvider->CreateAnimationForProperty(*__pPublicInstance, property); + } + else + { + pAnimation = __pPublicInstance->OnCreateAnimationForProperty(property); + } + } + + ClearLastResult(); + + return pAnimation; +} + +result +_VisualElementImpl::InvokeOnChildAttaching(_VisualElementImpl& child) +{ + ClearLastResult(); + return E_SUCCESS; +} + +void +_VisualElementImpl::InvokeOnChildAttached(_VisualElementImpl& child) +{ + if (__pPublicInstance && !__isInternal) + { + VisualElement* pChild = child.__pPublicInstance; + + if (GetSharedData().pEventListener) + { + GetSharedData().pEventListener->OnChildAttached(*__pPublicInstance, *pChild); + } + } + + ClearLastResult(); +} + +result +_VisualElementImpl::InvokeOnChildDetaching(_VisualElementImpl& child) +{ + ClearLastResult(); + return E_SUCCESS; +} + +void +_VisualElementImpl::InvokeOnChildDetached(_VisualElementImpl& child) +{ + if (__pPublicInstance && !__isInternal) + { + VisualElement* pChild = child.__pPublicInstance; + + if (GetSharedData().pEventListener) + { + GetSharedData().pEventListener->OnChildDetached(*__pPublicInstance, *pChild); + } + } + + ClearLastResult(); +} + +result +_VisualElementImpl::InvokeOnAttaching(_VisualElementImpl& parent) +{ + ClearLastResult(); + return E_SUCCESS; +} + +void +_VisualElementImpl::InvokeOnAttached(void) +{ + if (__pPublicInstance && !__isInternal) + { + _VisualElementImpl* pParentInternal = GetParent(); + if (pParentInternal) + { + VisualElement* pParent = pParentInternal->__pPublicInstance; + + if (GetSharedData().pEventListener) + { + __isAllowedTreeModification = false; + GetSharedData().pEventListener->OnAttached(*__pPublicInstance, *pParent); + __isAllowedTreeModification = true; + } + } + } + + ClearLastResult(); +} + +result +_VisualElementImpl::InvokeOnDetaching(void) +{ + ClearLastResult(); + return E_SUCCESS; +} + +void +_VisualElementImpl::InvokeOnDetached(_VisualElementImpl& parent) +{ + if (__pPublicInstance && !__isInternal) + { + VisualElement* pParent = parent.__pPublicInstance; + + if (GetSharedData().pEventListener) + { + __isAllowedTreeModification = false; + GetSharedData().pEventListener->OnDetached(*__pPublicInstance, *pParent); + __isAllowedTreeModification = true; + } + } +} + +result +_VisualElementImpl::InvokeOnAnimationAdded(const VisualElementAnimation* pAnimation) +{ + //TODO: Implementation + ClearLastResult(); + return E_SUCCESS; +} + +result +_VisualElementImpl::InvokeOnAnimationRemoved(const VisualElementAnimation* pAnimation) +{ + //TODO: Implementation + ClearLastResult(); + return E_SUCCESS; +} + +void +_VisualElementImpl::InvokeOnShowStateChanged(bool showState) +{ + if (__pPublicInstance && !__isInternal) + { + if (GetSharedData().pEventListener) + { + GetSharedData().pEventListener->OnShowStateChanged(*__pPublicInstance, showState); + } + } + + ClearLastResult(); +} + +result +_VisualElementImpl::InvokeOnTransformMatrixChanging(FloatMatrix4& newTransform) +{ + if (__pPublicInstance && !__isInternal) + { + if (GetSharedData().pEventListener) + { + return GetSharedData().pEventListener->OnTransformChanging(*__pPublicInstance, newTransform); + } + + return E_SUCCESS; + } + + return E_INVALID_STATE; +} + +void +_VisualElementImpl::InvokeOnTransformMatrixChanged(const FloatMatrix4& oldTransform) +{ + if (__pPublicInstance && !__isInternal) + { + if (GetSharedData().pEventListener) + { + GetSharedData().pEventListener->OnTransformChanged(*__pPublicInstance, oldTransform); + } + } + + ClearLastResult(); +} + +result +_VisualElementImpl::InvokeOnChildrenTransformMatrixChanging(FloatMatrix4& newTransform) +{ + if (__pPublicInstance && !__isInternal) + { + if (GetSharedData().pEventListener) + { + return GetSharedData().pEventListener->OnChildrenTransformChanging(*__pPublicInstance, newTransform); + } + + return E_SUCCESS; + } + + return E_INVALID_STATE; +} + +void +_VisualElementImpl::InvokeOnChildrenTransformMatrixChanged(const FloatMatrix4& oldTransform) +{ + if (__pPublicInstance && !__isInternal) + { + if (GetSharedData().pEventListener) + { + GetSharedData().pEventListener->OnChildrenTransformChanged(*__pPublicInstance, oldTransform); + } + } + + ClearLastResult(); +} + +result +_VisualElementImpl::InvokeOnBoundsChanging(FloatRectangle& newBounds) +{ + if (__pPublicInstance && !__isInternal) + { + if (GetSharedData().pEventListener) + { + return GetSharedData().pEventListener->OnBoundsChanging(*__pPublicInstance, newBounds); + } + + return E_SUCCESS; + } + + return E_INVALID_STATE; +} + +void +_VisualElementImpl::InvokeOnBoundsChanged(const FloatRectangle& oldBounds) +{ + if (__pPublicInstance && !__isInternal) + { + if (GetSharedData().pEventListener) + { + GetSharedData().pEventListener->OnBoundsChanged(*__pPublicInstance, oldBounds); + } + } + + ClearLastResult(); +} + +}}} + diff --git a/src/ui/animations/FUiAnim_VisualElementPropertyAnimationImpl.cpp b/src/ui/animations/FUiAnim_VisualElementPropertyAnimationImpl.cpp new file mode 100644 index 0000000..d40f5c7 --- /dev/null +++ b/src/ui/animations/FUiAnim_VisualElementPropertyAnimationImpl.cpp @@ -0,0 +1,134 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_VisualElementPropertyAnimationImpl.cpp + * @brief This file contains implementation of _VisualElementPropertyAnimationImpl class + * + * This file contains implementation _VisualElementValueAnimationImpl class. + */ + +#include + +#include +#include +#include + +#include "FUiAnim_VisualElementPropertyAnimationImpl.h" + +namespace Tizen { namespace Ui { namespace Animations +{ + + +_VisualElementPropertyAnimationImpl::_VisualElementPropertyAnimationImpl(void) +{ + +} + +_VisualElementPropertyAnimationImpl::_VisualElementPropertyAnimationImpl(const _VisualElementPropertyAnimationImpl& animationImpl) +{ + result r = CopyAnimationValue(animationImpl); + + SysTryReturnVoidResult(NID_UI_ANIM, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +_VisualElementPropertyAnimationImpl::~_VisualElementPropertyAnimationImpl(void) +{ + +} + +bool +_VisualElementPropertyAnimationImpl::Equals(const Tizen::Base::Object& obj) const +{ + if (this == &obj) + { + return true; + } + + const _VisualElementPropertyAnimationImpl* pAnimationImpl = dynamic_cast< const _VisualElementPropertyAnimationImpl* >(&obj); + + if (pAnimationImpl == null) + { + return false; + } + + return (_VisualElementValueAnimationImpl::Equals(obj) && __property == pAnimationImpl->__property); +} + +int +_VisualElementPropertyAnimationImpl::GetHashCode(void) const +{ + return (_VisualElementValueAnimationImpl::GetHashCode() + __property.GetHashCode()); +} + +result +_VisualElementPropertyAnimationImpl::CopyAnimationValue(const _VisualElementPropertyAnimationImpl& animationImpl) +{ + result r = _VisualElementValueAnimationImpl::CopyAnimationValue(animationImpl); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), r, "Propagating."); + + __property = animationImpl.__property; + + return E_SUCCESS; +} + +void +_VisualElementPropertyAnimationImpl::SetPropertyName(const Tizen::Base::String& property) +{ + __property = property; +} + +Tizen::Base::String +_VisualElementPropertyAnimationImpl::GetPropertyName(void) const +{ + return __property; +} + +_VisualElementPropertyAnimationImpl* +_VisualElementPropertyAnimationImpl::GetInstance(VisualElementPropertyAnimation& animation) +{ + return dynamic_cast<_VisualElementPropertyAnimationImpl*>(animation._pAnimationImpl); +} + +const _VisualElementPropertyAnimationImpl* +_VisualElementPropertyAnimationImpl::GetInstance(const VisualElementPropertyAnimation& animation) +{ + return dynamic_cast(animation._pAnimationImpl); +} + +bool +_VisualElementPropertyAnimationImpl::IsValidValues(void) const +{ + SysTryReturn(NID_UI_ANIM, (__property.IsEmpty() == false), false, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. The property name is not set."); + SysTryReturn(NID_UI_ANIM, (__start.IsEmpty() == false || __end.IsEmpty() == false), false, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. The start value and end value is invalid."); + + if (__start.IsEmpty() == false && __end.IsEmpty() == false) + { + SysTryReturn(NID_UI_ANIM, (__start.GetType() == __end.GetType()), false, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. The types of variant are different."); + } + + return true; +} + +void +_VisualElementPropertyAnimationImpl::OnTickOccurred(VisualElement& target, const Tizen::Ui::Variant& currentValue) +{ + _VisualElementImpl::GetInstance(target)->SetPropertyI(__property, currentValue); +} + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnim_VisualElementPropertyAnimationImpl.h b/src/ui/animations/FUiAnim_VisualElementPropertyAnimationImpl.h new file mode 100644 index 0000000..c8c36b2 --- /dev/null +++ b/src/ui/animations/FUiAnim_VisualElementPropertyAnimationImpl.h @@ -0,0 +1,73 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_VisualElementPropertyAnimationImpl.h + * @brief This is the header file for the _VisualElementPropertyAnimationImpl class. + * + * This header file contains the declarations of the _VisualElementPropertyAnimationImpl class. + */ + +#ifndef _FUI_ANIM_INTERNAL_VISUAL_ELEMENT_PROPERTY_ANIMATION_IMPL_H_ +#define _FUI_ANIM_INTERNAL_VISUAL_ELEMENT_PROPERTY_ANIMATION_IMPL_H_ + +#include +#include +#include + +#include "FUiAnim_VisualElementValueAnimationImpl.h" + + +namespace Tizen { namespace Ui { namespace Animations +{ + +class VisualElement; +class VisualElementPropertyAnimation; + +class _VisualElementPropertyAnimationImpl + : public _VisualElementValueAnimationImpl +{ +public: + _VisualElementPropertyAnimationImpl(void); + _VisualElementPropertyAnimationImpl(const _VisualElementPropertyAnimationImpl& animationImpl); + virtual ~_VisualElementPropertyAnimationImpl(void); + + virtual bool Equals(const Tizen::Base::Object& obj) const; + virtual int GetHashCode(void) const; + + result CopyAnimationValue(const _VisualElementPropertyAnimationImpl& animationImpl); + + void SetPropertyName(const Tizen::Base::String& property); + Tizen::Base::String GetPropertyName(void) const; + + static _VisualElementPropertyAnimationImpl* GetInstance(VisualElementPropertyAnimation& animation); + static const _VisualElementPropertyAnimationImpl* GetInstance(const VisualElementPropertyAnimation& animation); + + virtual bool IsValidValues(void) const; + virtual void OnTickOccurred(VisualElement& target, const Tizen::Ui::Variant& currentValue); + +private: + _VisualElementPropertyAnimationImpl& operator =(const _VisualElementPropertyAnimationImpl& rhs); + +private: + Tizen::Base::String __property; +}; // _VisualElementPropertyAnimationImpl + + +}}} // Tizen::Ui::Animations + +#endif // _FUI_ANIM_INTERNAL_VISUAL_ELEMENT_PROPERTY_ANIMATION_IMPL_H_ diff --git a/src/ui/animations/FUiAnim_VisualElementSharedData.cpp b/src/ui/animations/FUiAnim_VisualElementSharedData.cpp new file mode 100644 index 0000000..c3726c5 --- /dev/null +++ b/src/ui/animations/FUiAnim_VisualElementSharedData.cpp @@ -0,0 +1,186 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_VisualElementSharedData.cpp + * @brief This file contains implementation of _VisualElementSharedData class + * + * This file contains implementation _VisualElementSharedData class. + */ + +#include +#include +#include +#include + +#include "FUiAnim_VisualElement.h" +#include "FUiAnim_VisualElementSharedData.h" +#include "FUiAnim_VisualElementSurfaceImpl.h" +#include "FUiAnim_INativeNode.h" +#include "FUiAnim_NativeLayer.h" + +using namespace std; +using namespace Tizen::Base; + +namespace Tizen { namespace Ui { namespace Animations +{ + +_VisualElementSharedData::_VisualElementSharedData(void) + : invalidatedNativeProps(-1) + , childrenInvalidated(false) + , childrenSurfaceChanged(false) + , surfaceChanged(false) + , pNativeNode(null) + , pSurface(null) + , invalidatedRegion(0.0f, 0.0f, 0.0f, 0.0f) + , needSurface(true) + , redrawOnResize(false) + , isSurfaceOpaque(true) + , fixedSurfaceSize(false) + , invalidationLockCount(0) + , updateRegion(0.0f, 0.0f, 0.0f, 0.0f) + , pAnimationProvider(null) + , pContentProvider(null) + , pEventListener(null) + , name("") + , pUserData(null) + , __refCount(1) +{ +} + +_VisualElementSharedData::~_VisualElementSharedData(void) +{ + if (pSurface) + { + delete pSurface; + pSurface = null; + } + + if (pNativeNode) + { + delete pNativeNode; + } +} + +result +_VisualElementSharedData::Construct(void) +{ + ClearLastResult(); + SysAssert(pNativeNode == null); + + pNativeNode = _INativeNode::CreateInstanceN(); + SysTryReturnResult(NID_UI, pNativeNode, E_OUT_OF_MEMORY, "Memory allocation failed."); + + return E_SUCCESS; +} + +void +_VisualElementSharedData::AddRef(void) +{ + __refCount++; +} + +void +_VisualElementSharedData::Release(void) +{ + if (__refCount >= 1) + { + __refCount--; + if (__refCount == 0) + { + delete this; + } + + return; + } + + // error reference counting......... +} + +int +_VisualElementSharedData::GetReferenceCount(void) const +{ + return __refCount; +} + +void +_VisualElementSharedData::LockInvalidate(bool lock) +{ + if (lock) + { + invalidationLockCount++; + } + else if (invalidationLockCount >= 1) + { + invalidationLockCount--; + } +} + +result +_VisualElementSharedData::CreateSurface(const Tizen::Graphics::FloatDimension& size, _NativeLayer& layer) +{ + unique_ptr pNewSurface(_VisualElementSurfaceImpl::CreateSurfaceN((const Handle)&layer, size)); + SysTryReturnResult(NID_UI, pNewSurface, E_OUT_OF_MEMORY, "Memory allocation failed."); + + if (pSurface) + { + delete pSurface; + pSurface = null; + } + + pSurface = pNewSurface.release(); + return E_SUCCESS; +} + +result +_VisualElementSharedData::SetImage(const String& fileName) +{ + SysTryReturnResult(NID_UI, pNativeNode, E_INVALID_STATE, "The Native Node is invalid."); + SysTryReturnResult(NID_UI, pSurface, E_INVALID_STATE, "The Native Node is invalid."); + + _VisualElementSurfaceImpl* pImpl = _VisualElementSurfaceImpl::GetInstance(*pSurface); + SysTryReturnResult(NID_UI, pImpl, E_SYSTEM, "A system error has been occurred."); + SysTryReturnResult(NID_UI, pImpl->SetImage(fileName) == E_SUCCESS, E_SYSTEM, "A system error has been occurred."); + + return E_SUCCESS; +} + +String +_VisualElementSharedData::GetImage(void) +{ + SysTryReturn(NID_UI, pNativeNode, String(), E_INVALID_STATE, "The Native Node is invalid."); + SysTryReturn(NID_UI, pSurface, String(), E_INVALID_STATE, "The Native Node is invalid."); + + _VisualElementSurfaceImpl* pImpl = _VisualElementSurfaceImpl::GetInstance(*pSurface); + SysTryReturn(NID_UI, pImpl, String(), E_SYSTEM, "A system error has been occurred."); + return pImpl->GetImage(); +} + +void +_VisualElementSharedData::RemoveSurface(_VisualElementImpl& presentation) +{ + if (likely(pNativeNode)) + { + pNativeNode->Reconfigure(null, presentation, true); + } + + delete pSurface; + pSurface = null; +} + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnim_VisualElementSurfaceImpl.cpp b/src/ui/animations/FUiAnim_VisualElementSurfaceImpl.cpp new file mode 100644 index 0000000..b86fb83 --- /dev/null +++ b/src/ui/animations/FUiAnim_VisualElementSurfaceImpl.cpp @@ -0,0 +1,178 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_VisualElementSurfaceImpl.cpp + * @brief This file contains implementation of _VisualElementSurfaceImpl class + * + * This file contains implementation _VisualElementSurfaceImpl class. + */ + +#include +#include +#include +#include +#include + +#include "FUiAnim_VisualElementCoordinateSystem.h" +#include "FUiAnim_EflVisualElementSurfaceImpl.h" +#include "FUiAnim_VisualElementSurfaceImpl.h" +#include "FUiAnim_DisplayContextImpl.h" +#include "FUiAnim_EflLayer.h" + +using namespace std; +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Animations +{ + +VisualElementSurface* +_VisualElementSurfaceImpl::CreateSurfaceN(const Handle handle, const FloatDimension& size) +{ + SysTryReturn(NID_UI_ANIM, size.width >= 0 && size.height >= 0, null, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] Surface size is out of range. size = (%d, %d)", size.width, size.height); + SysTryReturn(NID_UI_ANIM, handle != 0, null, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. The handle is invalid."); + + unique_ptr pSurface(new(std::nothrow) VisualElementSurface()); + SysTryReturn(NID_UI_ANIM, pSurface , null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + unique_ptr<_EflVisualElementSurfaceImpl> pImpl(new (std::nothrow) _EflVisualElementSurfaceImpl(handle, size)); + SysTryReturn(NID_UI_ANIM, pImpl, null, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. The handle is invalid."); + pSurface->__pVisualElementSurfaceImpl = pImpl.release(); + + return pSurface.release(); +} + +VisualElementSurface* +_VisualElementSurfaceImpl::CreateSurfaceUsingExistingObjectN(const DisplayContext& displayContext, const Handle handle, const Dimension& size) +{ + SysTryReturn(NID_UI_ANIM, size.width >= 0 && size.height >= 0, null, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] Surface size is out of range. size = (%d, %d)", size.width, size.height); + SysTryReturn(NID_UI_ANIM, handle != 0, null, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. The handle is invalid."); + + unique_ptr pSurface(new(std::nothrow) VisualElementSurface()); + SysTryReturn(NID_UI_ANIM, pSurface , null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + _DisplayContextImpl* pDisplayContext = const_cast<_DisplayContextImpl*>(_DisplayContextImpl::GetInstance(displayContext)); + SysTryReturn(NID_UI_ANIM, pDisplayContext != null, null, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. DisplayContext is invalid."); + + _EflLayer* pLayer = dynamic_cast<_EflLayer*>(pDisplayContext->GetNativeLayer()); + SysTryReturn(NID_UI_ANIM, pLayer != null, null, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. DisplayContext is invalid."); + + unique_ptr<_EflVisualElementSurfaceImpl> pImpl(new (std::nothrow) _EflVisualElementSurfaceImpl(reinterpret_cast(pLayer), handle, size)); + SysTryReturn(NID_UI_ANIM, pImpl, null, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. The handle is invalid."); + result r = GetLastResult(); + SysTryReturn(NID_UI_ANIM, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + pSurface->__pVisualElementSurfaceImpl = pImpl.release(); + + return pSurface.release(); +} + +_VisualElementSurfaceImpl* +_VisualElementSurfaceImpl::CreateInstanceN(const DisplayContext& displayContext, const FloatDimension& size) +{ + SysTryReturn(NID_UI_ANIM, size.width >= 0 && size.height >= 0, null, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] Surface size is out of range. size = (%d, %d)", size.width, size.height); + + _DisplayContextImpl* pDisplayContext = const_cast<_DisplayContextImpl*>(_DisplayContextImpl::GetInstance(displayContext)); + SysTryReturn(NID_UI_ANIM, pDisplayContext != null, null, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. DisplayContext is invalid."); + + _EflLayer* pLayer = dynamic_cast<_EflLayer*>(pDisplayContext->GetNativeLayer()); + SysTryReturn(NID_UI_ANIM, pLayer != null, null, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. DisplayContext is invalid."); + + _VisualElementSurfaceImpl* pVisualElementSurfaceImpl = new (std::nothrow) _EflVisualElementSurfaceImpl(reinterpret_cast(pLayer), size); + result r = GetLastResult(); + SysTryReturn(NID_UI_ANIM, pVisualElementSurfaceImpl != null, null, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryCatch(NID_UI_ANIM, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return pVisualElementSurfaceImpl; + +CATCH: + delete pVisualElementSurfaceImpl; + return null; +} + +_VisualElementSurfaceImpl::_VisualElementSurfaceImpl(const Dimension& size) + : __refCount(1) + , __logicalSize(size) +{ + +} + +_VisualElementSurfaceImpl::_VisualElementSurfaceImpl(const FloatDimension& size) + : __refCount(1) + , __logicalSizeF(size) +{ +} + +_VisualElementSurfaceImpl::~_VisualElementSurfaceImpl(void) +{ +} + +void +_VisualElementSurfaceImpl::AddRef(void) +{ + __refCount++; +} + +bool +_VisualElementSurfaceImpl::Release(void) +{ + if (likely(__refCount >= 1)) + { + __refCount--; + if (likely(__refCount == 0)) + { + delete this; + return true; + } + } + + return false; +} + +int +_VisualElementSurfaceImpl::GetReferenceCount(void) const +{ + return __refCount; +} + +bool +_VisualElementSurfaceImpl::Equals(const Tizen::Base::Object& obj) const +{ + const VisualElementSurface* pSurface = dynamic_cast< const VisualElementSurface* >(&obj); + if (pSurface == null) + { + return false; + } + + const _VisualElementSurfaceImpl* pSurfaceImpl = _VisualElementSurfaceImpl::GetInstance(*pSurface); + if (pSurfaceImpl == this) + { + return true; + } + + return (this == pSurfaceImpl); +} + +int +_VisualElementSurfaceImpl::GetHashCode(void) const +{ + return reinterpret_cast< int >(this); +} + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnim_VisualElementValueAnimationImpl.cpp b/src/ui/animations/FUiAnim_VisualElementValueAnimationImpl.cpp new file mode 100644 index 0000000..d60ea84 --- /dev/null +++ b/src/ui/animations/FUiAnim_VisualElementValueAnimationImpl.cpp @@ -0,0 +1,288 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_VisualElementValueAnimationImpl.cpp + * @brief This file contains implementation of _VisualElementValueAnimationImpl class + * + * This file contains implementation _VisualElementValueAnimationImpl class. + */ + +#include + +#include +#include + +#include "FUiAnim_VisualElementAnimationKeyFrame.h" +#include "FUiAnim_VisualElementValueAnimationImpl.h" + +namespace Tizen { namespace Ui { namespace Animations +{ + + +_VisualElementValueAnimationImpl::_VisualElementValueAnimationImpl(void) + : __pTickListener(null) + , __applyEndValue(true) + , __pKeyFrame(null) +{ + +} + +_VisualElementValueAnimationImpl::_VisualElementValueAnimationImpl(const _VisualElementValueAnimationImpl& animationImpl) + : __pTickListener(null) + , __applyEndValue(true) + , __pKeyFrame(null) +{ + result r = CopyAnimationValue(animationImpl); + + SysTryReturnVoidResult(NID_UI_ANIM, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +_VisualElementValueAnimationImpl::~_VisualElementValueAnimationImpl(void) +{ + if (__pKeyFrame) + { + delete __pKeyFrame; + __pKeyFrame = null; + } +} + +bool +_VisualElementValueAnimationImpl::Equals(const Tizen::Base::Object& obj) const +{ + if (this == &obj) + { + return true; + } + + const _VisualElementValueAnimationImpl* pAnimationImpl = dynamic_cast< const _VisualElementValueAnimationImpl* >(&obj); + + if (pAnimationImpl == null) + { + return false; + } + + bool isKeyFrameEqual = false; + + if (__pKeyFrame != null && pAnimationImpl->__pKeyFrame != null) + { + isKeyFrameEqual = __pKeyFrame->Equals(*(pAnimationImpl->__pKeyFrame)); + } + else if (__pKeyFrame == null && pAnimationImpl->__pKeyFrame == null) + { + isKeyFrameEqual = true; + } + + return (_VisualElementAnimationImpl::Equals(obj) + && (__pTickListener == pAnimationImpl->__pTickListener) + && (__start == pAnimationImpl->__start) + && (__end == pAnimationImpl->__end) + && (__applyEndValue == pAnimationImpl->__applyEndValue) + && (isKeyFrameEqual)); +} + +int +_VisualElementValueAnimationImpl::GetHashCode(void) const +{ + return (_VisualElementAnimationImpl::GetHashCode() + __start.GetHashCode() + __end.GetHashCode() + __applyEndValue); +} + +result +_VisualElementValueAnimationImpl::CopyAnimationValue(const _VisualElementValueAnimationImpl& animationImpl) +{ + result r = _VisualElementAnimationImpl::CopyAnimationValue(animationImpl); + SysTryReturnResult(NID_UI_ANIM, (r == E_SUCCESS), r, "Propagating."); + + __pTickListener = animationImpl.__pTickListener; + __start = animationImpl.__start; + __end = animationImpl.__end; + __applyEndValue = animationImpl.__applyEndValue; + + if (animationImpl.__pKeyFrame != null) + { + __pKeyFrame = animationImpl.__pKeyFrame->CloneN(); + SysTryReturnResult(NID_UI_ANIM, (__pKeyFrame != null), E_OUT_OF_MEMORY, "Memory allocation failed."); + } + + return E_SUCCESS; +} + +void +_VisualElementValueAnimationImpl::SetTickEventListener(IVisualElementAnimationTickEventListener* pListener) +{ + __pTickListener = pListener; +} + +IVisualElementAnimationTickEventListener* +_VisualElementValueAnimationImpl::GetTickEventListener(void) const +{ + return __pTickListener; +} + +void +_VisualElementValueAnimationImpl::SetStartValue(const Variant& startValue) +{ + __start = startValue; +} + +Tizen::Ui::Variant +_VisualElementValueAnimationImpl::GetStartValue(void) const +{ + return __start; +} + +void +_VisualElementValueAnimationImpl::SetEndValue(const Variant& endValue) +{ + __end = endValue; +} + +Tizen::Ui::Variant +_VisualElementValueAnimationImpl::GetEndValue(void) const +{ + return __end; +} + +void +_VisualElementValueAnimationImpl::SetEndValueApplied(bool apply) +{ + __applyEndValue = apply; +} + +bool +_VisualElementValueAnimationImpl::IsEndValueApplied(void) const +{ + return __applyEndValue; +} + +result +_VisualElementValueAnimationImpl::AddKeyFrame(float timeProgress, const Tizen::Ui::Variant& value, const IVisualElementAnimationTimingFunction* pTimingFunction) +{ + if (__pKeyFrame == null) + { + __pKeyFrame = new (std::nothrow) _VisualElementAnimationKeyFrame(); + SysTryReturnResult(NID_UI_ANIM, (__pKeyFrame != null), E_OUT_OF_MEMORY, "Memory allocation failed."); + } + else + { + _VisualElementAnimationKeyFrameInfo* pInfo = __pKeyFrame->GetKeyFrameInfoAt(0); + SysAssertf(pInfo != null, "Key frame with index 0 is null."); + + SysTryReturnResult(NID_UI_ANIM, (pInfo->GetValue().GetType() == value.GetType()), E_INVALID_ARG, "Invalid argument(s) is used. The value type is different from another"); + } + + return __pKeyFrame->AddKeyFrame(timeProgress, value, pTimingFunction); +} + +result +_VisualElementValueAnimationImpl::RemoveKeyFrame(float timeProgress) +{ + if (__pKeyFrame == null) + { + return E_OBJ_NOT_FOUND; + } + + result r = __pKeyFrame->RemoveKeyFrame(timeProgress); + + if (__pKeyFrame->GetCount() == 0) + { + delete __pKeyFrame; + __pKeyFrame = null; + } + + return r; +} + +void +_VisualElementValueAnimationImpl::RemoveAllKeyFrames(void) +{ + if (__pKeyFrame != null) + { + __pKeyFrame->RemoveAllKeyFrames(); + + delete __pKeyFrame; + __pKeyFrame = null; + } +} + +_VisualElementValueAnimationImpl* +_VisualElementValueAnimationImpl::GetInstance(VisualElementValueAnimation& animation) +{ + return dynamic_cast<_VisualElementValueAnimationImpl*>(animation._pAnimationImpl); +} + +const _VisualElementValueAnimationImpl* +_VisualElementValueAnimationImpl::GetInstance(const VisualElementValueAnimation& animation) +{ + return dynamic_cast(animation._pAnimationImpl); +} + +_VisualElementAnimationKeyFrame* +_VisualElementValueAnimationImpl::GetKeyFrame(void) const +{ + return __pKeyFrame; +} + +bool +_VisualElementValueAnimationImpl::IsValid(void) const +{ + return (IsValidValues() && IsValidKeyFrameType()); +} + +bool +_VisualElementValueAnimationImpl::IsValidKeyFrameType(void) const +{ + if (__pKeyFrame != null) + { + VariantType type; + + if (__start.IsEmpty() == false) + { + type = __start.GetType(); + } + else + { + type = __end.GetType(); + } + + _VisualElementAnimationKeyFrameInfo* pInfo = __pKeyFrame->GetKeyFrameInfoAt(0); + SysAssertf(pInfo != null, "Key frame with index 0 is null."); + + SysTryReturn(NID_UI_ANIM, (pInfo->GetValue().GetType() == type), false, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. The types of variant are different."); + } + + return true; +} + +bool +_VisualElementValueAnimationImpl::IsValidValues(void) const +{ + SysTryReturn(NID_UI_ANIM, (__start.IsEmpty() == false && __end.IsEmpty() == false), false, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. The start value or end value is invalid."); + SysTryReturn(NID_UI_ANIM, (__start.GetType() == __end.GetType()), false, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. The types of variant are different."); + + return true; +} + +void +_VisualElementValueAnimationImpl::OnTickOccurred(VisualElement& target, const Tizen::Ui::Variant& currentValue) +{ + +} + + +}}} // Tizen::Ui::Animations + diff --git a/src/ui/animations/FUiAnim_VisualElementValueAnimationImpl.h b/src/ui/animations/FUiAnim_VisualElementValueAnimationImpl.h new file mode 100644 index 0000000..73712cf --- /dev/null +++ b/src/ui/animations/FUiAnim_VisualElementValueAnimationImpl.h @@ -0,0 +1,101 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_VisualElementValueAnimationImpl.h + * @brief This is the header file for the _VisualElementAnimationImpl class. + * + * This header file contains the declarations of the _VisualElementAnimationImpl class. + */ + +#ifndef _FUI_ANIM_INTERNAL_VISUAL_ELEMENT_VALUE_ANIMATION_IMPL_H_ +#define _FUI_ANIM_INTERNAL_VISUAL_ELEMENT_VALUE_ANIMATION_IMPL_H_ + +#include +#include +#include + +#include "FUiAnim_VisualElementAnimationImpl.h" + + +namespace Tizen { namespace Ui { namespace Animations +{ + +class IVisualElementAnimationTickEventListener; +class _VisualElementAnimationKeyFrame; +class VisualElementValueAnimation; + +class _VisualElementValueAnimationImpl + : public _VisualElementAnimationImpl +{ +public: + _VisualElementValueAnimationImpl(void); + _VisualElementValueAnimationImpl(const _VisualElementValueAnimationImpl& animationImpl); + virtual ~_VisualElementValueAnimationImpl(void); + + virtual bool Equals(const Tizen::Base::Object& obj) const; + virtual int GetHashCode(void) const; + + result CopyAnimationValue(const _VisualElementValueAnimationImpl& animationImpl); + + void SetTickEventListener(IVisualElementAnimationTickEventListener* pListener); + IVisualElementAnimationTickEventListener* GetTickEventListener(void) const; + + void SetStartValue(const Tizen::Ui::Variant& startValue); + Tizen::Ui::Variant GetStartValue(void) const; + + void SetEndValue(const Tizen::Ui::Variant& endValue); + Tizen::Ui::Variant GetEndValue(void) const; + + void SetEndValueApplied(bool apply); + bool IsEndValueApplied(void) const; + + result AddKeyFrame(float timeProgress, const Tizen::Ui::Variant& value, const IVisualElementAnimationTimingFunction* pTimingFunction); + result RemoveKeyFrame(float timeProgress); + void RemoveAllKeyFrames(void); + + static _VisualElementValueAnimationImpl* GetInstance(VisualElementValueAnimation& animation); + static const _VisualElementValueAnimationImpl* GetInstance(const VisualElementValueAnimation& animation); + + _VisualElementAnimationKeyFrame* GetKeyFrame(void) const; + + bool IsValid(void) const; + bool IsValidKeyFrameType(void) const; + + virtual bool IsValidValues(void) const; + virtual void OnTickOccurred(VisualElement& target, const Tizen::Ui::Variant& currentValue); + +private: + _VisualElementValueAnimationImpl& operator =(const _VisualElementValueAnimationImpl& rhs); + +protected: + Variant __start; + Variant __end; + +private: + IVisualElementAnimationTickEventListener* __pTickListener; + + bool __applyEndValue; + + _VisualElementAnimationKeyFrame* __pKeyFrame; + +}; // _VisualElementValueAnimationImpl + + +}}} // Tizen::Ui::Animations + +#endif // _FUI_ANIM_INTERNAL_VISUAL_ELEMENT_VALUE_ANIMATION_IMPL_H_ diff --git a/src/ui/controls/FUiCtrlAnimation.cpp b/src/ui/controls/FUiCtrlAnimation.cpp new file mode 100644 index 0000000..73ca57e --- /dev/null +++ b/src/ui/controls/FUiCtrlAnimation.cpp @@ -0,0 +1,223 @@ +// +// 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 FUiCtrlAnimation.cpp + * @brief This is the implementation file for Animation class. + */ + +#include +#include +#include "FUiCtrl_AnimationImpl.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Base::Collection; + +namespace Tizen { namespace Ui { namespace Controls +{ + +Animation::Animation(void) +{ +} + +Animation::~Animation(void) +{ +} + +result +Animation::Construct(const Rectangle& rectangle, const IList& animationFrames) +{ + result r = E_SUCCESS; + + _AnimationImpl* pAnimationImpl = _AnimationImpl::GetInstance(*this); + + SysAssertf((pAnimationImpl == null), "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class."); + + pAnimationImpl = _AnimationImpl::CreateAnimationImplN(this); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pAnimationImpl != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlImpl = pAnimationImpl; + + r = Control::SetBounds(rectangle.x, rectangle.y, rectangle.width, rectangle.height); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pAnimationImpl->SetAnimationFrames(animationFrames); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pAnimationImpl->SetImageCount(animationFrames.GetCount()); + + return E_SUCCESS; + +CATCH: + delete pAnimationImpl; + pAnimationImpl = null; + + _pControlImpl = null; + + return r; +} + +result +Animation::Construct(const FloatRectangle& rectangle, const IList& animationFrames) +{ + result r = E_SUCCESS; + + _AnimationImpl* pAnimationImpl = _AnimationImpl::GetInstance(*this); + + SysAssertf((pAnimationImpl == null), "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class."); + + pAnimationImpl = _AnimationImpl::CreateAnimationImplN(this); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pAnimationImpl != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlImpl = pAnimationImpl; + + r = Control::SetBounds(rectangle.x, rectangle.y, rectangle.width, rectangle.height); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pAnimationImpl->SetAnimationFrames(animationFrames); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pAnimationImpl->SetImageCount(animationFrames.GetCount()); + + return E_SUCCESS; + +CATCH: + delete pAnimationImpl; + pAnimationImpl = null; + + _pControlImpl = null; + + return r; +} + +void +Animation::AddAnimationEventListener(IAnimationEventListener& listener) +{ + _AnimationImpl* pAnimationImpl = _AnimationImpl::GetInstance(*this); + SysAssertf(pAnimationImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pAnimationImpl->AddAnimationEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + SetLastResult(E_SUCCESS); + return; +} + +void +Animation::RemoveAnimationEventListener(IAnimationEventListener& listener) +{ + _AnimationImpl* pAnimationImpl = _AnimationImpl::GetInstance(*this); + SysAssertf(pAnimationImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pAnimationImpl->RemoveAnimationEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + SetLastResult(E_SUCCESS); + return; +} + +void +Animation::SetRepeatCount(int count) +{ + _AnimationImpl* pAnimationImpl = _AnimationImpl::GetInstance(*this); + SysAssertf(pAnimationImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pAnimationImpl->SetRepeatCount(count); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + SetLastResult(E_SUCCESS); + return; +} + +int +Animation::GetRepeatCount(void) const +{ + const _AnimationImpl* pAnimationImpl = _AnimationImpl::GetInstance(*this); + SysAssertf(pAnimationImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pAnimationImpl->GetRepeatCount(); +} + +int +Animation::GetCurrentRepeatedCount(void) const +{ + const _AnimationImpl* pAnimationImpl = _AnimationImpl::GetInstance(*this); + SysAssertf(pAnimationImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pAnimationImpl->GetCurrentRepeatedCount(); +} + +int +Animation::GetImageCount(void) const +{ + const _AnimationImpl* pAnimationImpl = _AnimationImpl::GetInstance(*this); + SysAssertf(pAnimationImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pAnimationImpl->GetImageCount(); +} + +void +Animation::Play(void) +{ + _AnimationImpl* pAnimationImpl = _AnimationImpl::GetInstance(*this); + SysAssertf(pAnimationImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pAnimationImpl->Play(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + SetLastResult(E_SUCCESS); + return; +} + +void +Animation::Stop(void) +{ + _AnimationImpl* pAnimationImpl = _AnimationImpl::GetInstance(*this); + SysAssertf(pAnimationImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pAnimationImpl->Stop(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + SetLastResult(E_SUCCESS); + return; +} + +void +Animation::Pause(void) +{ + _AnimationImpl* pAnimationImpl = _AnimationImpl::GetInstance(*this); + SysAssertf(pAnimationImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pAnimationImpl->Pause(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + SetLastResult(E_SUCCESS); + return; +} + +AnimationStatus +Animation::GetStatus(void) const +{ + const _AnimationImpl* pAnimationImpl = _AnimationImpl::GetInstance(*this); + SysAssertf(pAnimationImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pAnimationImpl->GetStatus(); +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlAnimationFrame.cpp b/src/ui/controls/FUiCtrlAnimationFrame.cpp new file mode 100644 index 0000000..350c599 --- /dev/null +++ b/src/ui/controls/FUiCtrlAnimationFrame.cpp @@ -0,0 +1,100 @@ +// +// 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 FUiCtrlAnimationFrame.cpp + * @brief This is the implementation file for AnimationFrame class. + */ + +#include +#include +#include "FUiCtrl_AnimationFrameImpl.h" + +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +AnimationFrame::AnimationFrame(void) + : __pAnimationFrameImpl(null) +{ + ClearLastResult(); + + __pAnimationFrameImpl = new (std::nothrow) _AnimationFrameImpl(); + SysTryReturnVoidResult(NID_UI_CTRL, __pAnimationFrameImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); +} + +AnimationFrame::AnimationFrame(const Bitmap& frame, long duration) + : __pAnimationFrameImpl(null) +{ + ClearLastResult(); + + __pAnimationFrameImpl = new (std::nothrow) _AnimationFrameImpl(frame, duration); + SysTryReturnVoidResult(NID_UI_CTRL, __pAnimationFrameImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); +} + +AnimationFrame::~AnimationFrame(void) +{ + delete __pAnimationFrameImpl; + __pAnimationFrameImpl = null; +} + +void +AnimationFrame::SetFrame(const Bitmap& frame) +{ + SysAssertf(__pAnimationFrameImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = __pAnimationFrameImpl->SetFrame(frame); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + SetLastResult(E_SUCCESS); + return; +} + +const Bitmap* +AnimationFrame::GetFrame(void) const +{ + ClearLastResult(); + + SysAssertf(__pAnimationFrameImpl != null, "Not yet constructed. Construct() should be called before use."); + + return __pAnimationFrameImpl->GetFrame(); +} + +void +AnimationFrame::SetDuration(long duration) +{ + SysAssertf(__pAnimationFrameImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = __pAnimationFrameImpl->SetDuration(duration); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + SetLastResult(E_SUCCESS); + return; +} + +long +AnimationFrame::GetDuration(void) const +{ + ClearLastResult(); + + SysAssertf(__pAnimationFrameImpl != null, "Not yet constructed. Construct() should be called before use."); + + return __pAnimationFrameImpl->GetDuration(); +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlButton.cpp b/src/ui/controls/FUiCtrlButton.cpp new file mode 100644 index 0000000..18b9e69 --- /dev/null +++ b/src/ui/controls/FUiCtrlButton.cpp @@ -0,0 +1,499 @@ +// +// 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 FUiCtrlButton.cpp +* @brief This file contains implementation of Button class +*/ + +#include +#include +#include "FUiCtrl_ButtonImpl.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +Button::Button(void) +{ + +} + +Button::~Button(void) +{ + +} + +result +Button::Construct(const Rectangle& rect, const String& text) +{ + result r = E_SUCCESS; + _ButtonImpl* pButtonImpl = _ButtonImpl::GetInstance(*this); + + SysAssertf(pButtonImpl == null, + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pButtonImpl = _ButtonImpl::CreateButtonImplN(this, rect); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pButtonImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pButtonImpl->SetText(text); + SysAssert(r == E_SUCCESS); // [ToDo] Exception. Which exception can occur? + + _pControlImpl = pButtonImpl; + + return E_SUCCESS; +} + +result +Button::Construct(const FloatRectangle& rect, const String& text) +{ + result r = E_SUCCESS; + _ButtonImpl* pButtonImpl = _ButtonImpl::GetInstance(*this); + + SysAssertf(pButtonImpl == null, + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pButtonImpl = _ButtonImpl::CreateButtonImplN(this, rect); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pButtonImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pButtonImpl->SetText(text); + SysAssert(r == E_SUCCESS); // [ToDo] Exception. Which exception can occur? + + _pControlImpl = pButtonImpl; + + return E_SUCCESS; +} + +void +Button::AddActionEventListener(IActionEventListener& listener) +{ + _ButtonImpl* pButtonImpl = _ButtonImpl::GetInstance(*this); + SysAssertf(pButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + result r = pButtonImpl->AddActionEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + return; +} + +void +Button::RemoveActionEventListener(IActionEventListener& listener) +{ + _ButtonImpl* pButtonImpl = _ButtonImpl::GetInstance(*this); + SysAssertf(pButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + result r = pButtonImpl->RemoveActionEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + return; +} + +void +Button::SetActionId(int actionId) +{ + _ButtonImpl* pButtonImpl = _ButtonImpl::GetInstance(*this); + SysAssertf(pButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pButtonImpl->SetActionId(actionId); + + return; +} + +int +Button::GetActionId(void) const +{ + const _ButtonImpl* pButtonImpl = _ButtonImpl::GetInstance(*this); + SysAssertf(pButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pButtonImpl->GetActionId(); +} + +void +Button::SetText(const String& text) +{ + _ButtonImpl* pButtonImpl = _ButtonImpl::GetInstance(*this); + SysAssertf(pButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pButtonImpl->SetText(text); + + return; +} + +void +Button::SetTextHorizontalAlignment(HorizontalAlignment alignment) +{ + _ButtonImpl* pButtonImpl = _ButtonImpl::GetInstance(*this); + SysAssertf(pButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pButtonImpl->SetTextHorizontalAlignment(alignment); + + return; +} + +void +Button::SetTextVerticalAlignment(VerticalAlignment alignment) +{ + _ButtonImpl* pButtonImpl = _ButtonImpl::GetInstance(*this); + SysAssertf(pButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pButtonImpl->SetTextVerticalAlignment(alignment); + + return; +} + +String +Button::GetText(void) const +{ + const _ButtonImpl* pButtonImpl = _ButtonImpl::GetInstance(*this); + SysAssertf(pButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pButtonImpl->GetText(); +} + +HorizontalAlignment +Button::GetTextHorizontalAlignment(void) const +{ + const _ButtonImpl* pButtonImpl = _ButtonImpl::GetInstance(*this); + SysAssertf(pButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pButtonImpl->GetTextHorizontalAlignment(); +} + +VerticalAlignment +Button::GetTextVerticalAlignment(void) const +{ + const _ButtonImpl* pButtonImpl = _ButtonImpl::GetInstance(*this); + SysAssertf(pButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pButtonImpl->GetTextVerticalAlignment(); +} + +void +Button::SetTextColor(const Color& color) +{ + _ButtonImpl* pButtonImpl = _ButtonImpl::GetInstance(*this); + SysAssertf(pButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pButtonImpl->SetTextColor(color); + + return; +} + +Color +Button::GetTextColor(void) const +{ + const _ButtonImpl* pButtonImpl = _ButtonImpl::GetInstance(*this); + SysAssertf(pButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pButtonImpl->GetTextColor(); +} + +void +Button::SetPressedTextColor(const Color& color) +{ + _ButtonImpl* pButtonImpl = _ButtonImpl::GetInstance(*this); + SysAssertf(pButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pButtonImpl->SetPressedTextColor(color); + + return; +} + +Color +Button::GetPressedTextColor(void) const +{ + const _ButtonImpl* pButtonImpl = _ButtonImpl::GetInstance(*this); + SysAssertf(pButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pButtonImpl->GetPressedTextColor(); +} + +void +Button::SetDisabledTextColor(const Color& color) +{ + _ButtonImpl* pButtonImpl = _ButtonImpl::GetInstance(*this); + SysAssertf(pButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pButtonImpl->SetDisabledTextColor(color); + + return; +} + +Color +Button::GetDisabledTextColor(void) const +{ + const _ButtonImpl* pButtonImpl = _ButtonImpl::GetInstance(*this); + SysAssertf(pButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pButtonImpl->GetDisabledTextColor(); +} + +void +Button::SetHighlightedTextColor(const Color& color) +{ + _ButtonImpl* pButtonImpl = _ButtonImpl::GetInstance(*this); + SysAssertf(pButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pButtonImpl->SetHighlightedTextColor(color); + + return; +} + +Color +Button::GetHighlightedTextColor(void) const +{ + const _ButtonImpl* pButtonImpl = _ButtonImpl::GetInstance(*this); + SysAssertf(pButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pButtonImpl->GetHighlightedTextColor(); +} + +void +Button::SetNormalBitmap(const Point& position, const Bitmap& bitmap) +{ + _ButtonImpl* pButtonImpl = _ButtonImpl::GetInstance(*this); + SysAssertf(pButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pButtonImpl->SetNormalBitmap(position, bitmap); + + return; +} + +void +Button::SetNormalBitmap(const FloatPoint& position, const Bitmap& bitmap) +{ + _ButtonImpl* pButtonImpl = _ButtonImpl::GetInstance(*this); + SysAssertf(pButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pButtonImpl->SetNormalBitmap(position, bitmap); + + return; +} + +void +Button::SetDisabledBitmap(const Point& position, const Bitmap& bitmap) +{ + _ButtonImpl* pButtonImpl = _ButtonImpl::GetInstance(*this); + SysAssertf(pButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pButtonImpl->SetDisabledBitmap(position, bitmap); + + return; +} + +void +Button::SetDisabledBitmap(const FloatPoint& position, const Bitmap& bitmap) +{ + _ButtonImpl* pButtonImpl = _ButtonImpl::GetInstance(*this); + SysAssertf(pButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pButtonImpl->SetDisabledBitmap(position, bitmap); + + return; +} + +void +Button::SetPressedBitmap(const Point& position, const Bitmap& bitmap) +{ + _ButtonImpl* pButtonImpl = _ButtonImpl::GetInstance(*this); + SysAssertf(pButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pButtonImpl->SetPressedBitmap(position, bitmap); + + return; +} + +void +Button::SetPressedBitmap(const FloatPoint& position, const Bitmap& bitmap) +{ + _ButtonImpl* pButtonImpl = _ButtonImpl::GetInstance(*this); + SysAssertf(pButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pButtonImpl->SetPressedBitmap(position, bitmap); + + return; +} + +void +Button::SetHighlightedBitmap(const Point& position, const Bitmap& bitmap) +{ + _ButtonImpl* pButtonImpl = _ButtonImpl::GetInstance(*this); + SysAssertf(pButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pButtonImpl->SetHighlightedBitmap(position, bitmap); + + return; +} + +void +Button::SetHighlightedBitmap(const FloatPoint& position, const Bitmap& bitmap) +{ + _ButtonImpl* pButtonImpl = _ButtonImpl::GetInstance(*this); + SysAssertf(pButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pButtonImpl->SetHighlightedBitmap(position, bitmap); + + return; +} + +void +Button::SetNormalBackgroundBitmap(const Bitmap& bitmap) +{ + _ButtonImpl* pButtonImpl = _ButtonImpl::GetInstance(*this); + SysAssertf(pButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pButtonImpl->SetNormalBackgroundBitmap(bitmap); + + return; +} + +void +Button::SetDisabledBackgroundBitmap(const Bitmap& bitmap) +{ + _ButtonImpl* pButtonImpl = _ButtonImpl::GetInstance(*this); + SysAssertf(pButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pButtonImpl->SetDisabledBackgroundBitmap(bitmap); + + return; +} + +void +Button::SetPressedBackgroundBitmap(const Bitmap& bitmap) +{ + _ButtonImpl* pButtonImpl = _ButtonImpl::GetInstance(*this); + SysAssertf(pButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pButtonImpl->SetPressedBackgroundBitmap(bitmap); + + return; +} + +void +Button::SetHighlightedBackgroundBitmap(const Bitmap& bitmap) +{ + _ButtonImpl* pButtonImpl = _ButtonImpl::GetInstance(*this); + SysAssertf(pButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pButtonImpl->SetHighlightedBackgroundBitmap(bitmap); + + return; +} + +Color +Button::GetColor(ButtonStatus status) const +{ + const _ButtonImpl* pButtonImpl = _ButtonImpl::GetInstance(*this); + SysAssertf(pButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pButtonImpl->GetColor(status); +} + +result +Button::SetColor(ButtonStatus status, const Color& color) +{ + _ButtonImpl* pButtonImpl = _ButtonImpl::GetInstance(*this); + SysAssertf(pButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + result r = pButtonImpl->SetColor(status, color); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +int +Button::GetTextSize(void) const +{ + const _ButtonImpl* pButtonImpl = _ButtonImpl::GetInstance(*this); + SysAssertf(pButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pButtonImpl->GetTextSize(); +} + +float +Button::GetTextSizeF(void) const +{ + const _ButtonImpl* pButtonImpl = _ButtonImpl::GetInstance(*this); + SysAssertf(pButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pButtonImpl->GetTextSizeF(); +} + +result +Button::SetTextSize(int size) +{ + _ButtonImpl* pButtonImpl = _ButtonImpl::GetInstance(*this); + SysAssertf(pButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + result r = pButtonImpl->SetTextSize(size); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +Button::SetTextSize(float size) +{ + _ButtonImpl* pButtonImpl = _ButtonImpl::GetInstance(*this); + SysAssertf(pButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + result r = pButtonImpl->SetTextSize(size); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlButtonItem.cpp b/src/ui/controls/FUiCtrlButtonItem.cpp new file mode 100644 index 0000000..2caeba4 --- /dev/null +++ b/src/ui/controls/FUiCtrlButtonItem.cpp @@ -0,0 +1,126 @@ +// +// 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 FUiCtrlButtonItem.cpp +* @brief This is the implementation file for ButtonItem class. +*/ + +#include +#include +#include +#include "FUiCtrl_ButtonItemImpl.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +ButtonItem::ButtonItem(void) + : __pImpl(null) +{ +} + +ButtonItem::~ButtonItem(void) +{ + if (__pImpl) + { + delete __pImpl; + __pImpl = null; + } +} + +result +ButtonItem::Construct(ButtonItemStyle style, int actionId) +{ + result r = E_SUCCESS; + + 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); + SysAssertf(pImpl == null, + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + __pImpl = new (std::nothrow) _ButtonItemImpl(this); + SysTryReturnResult(NID_UI_CTRL, __pImpl, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Impl instance is not constructed"); + + r = __pImpl->Construct(style, actionId); + + if (IsFailed(r)) + { + delete __pImpl; + __pImpl = null; + SysLog(NID_UI_CTRL, "[%s] Propagated.", GetErrorMessage(r)); + return r; + } + + return r; +} + +int +ButtonItem::GetActionId(void) const +{ + SysAssertf(__pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return __pImpl->GetActionId(); +} + +Tizen::Base::String +ButtonItem::GetText(void) const +{ + SysAssertf(__pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return __pImpl->GetText(); +} + +result +ButtonItem::SetActionId(int actionId) +{ + SysAssertf(__pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return __pImpl->SetActionId(actionId); +} + +result +ButtonItem::SetBackgroundBitmap(ButtonItemStatus status, const Tizen::Graphics::Bitmap* pBitmap) +{ + SysAssertf(__pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return __pImpl->SetBackgroundBitmap(status, pBitmap); +} + +result +ButtonItem::SetIcon(ButtonItemStatus status, const Tizen::Graphics::Bitmap* pIcon) +{ + SysAssertf(__pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return __pImpl->SetIcon(status, pIcon); +} + +result +ButtonItem::SetText(const Tizen::Base::String& text) +{ + SysAssertf(__pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return __pImpl->SetText(text); +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlCheckButton.cpp b/src/ui/controls/FUiCtrlCheckButton.cpp new file mode 100644 index 0000000..6b9aae3 --- /dev/null +++ b/src/ui/controls/FUiCtrlCheckButton.cpp @@ -0,0 +1,483 @@ +// +// 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 FUiCtrlCheckButton.cpp +* @brief This file contains implementation of CheckButton class +*/ + +#include +#include +#include "FUiCtrl_CheckButtonImpl.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +CheckButton::CheckButton(void) +{ + +} + +CheckButton::~CheckButton(void) +{ + +} + +result +CheckButton::Construct(const Rectangle& rect, CheckButtonStyle style, BackgroundStyle backgroundStyle, + bool showTitle, const String& text, GroupStyle groupStyle) +{ + result r = E_SUCCESS; + _CheckButtonImpl* pCheckButtonImpl = _CheckButtonImpl::GetInstance(*this); + + SysAssertf(pCheckButtonImpl == null, + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + SysTryReturn(NID_UI_CTRL, !(backgroundStyle == BACKGROUND_STYLE_NONE && groupStyle != GROUP_STYLE_NONE), + E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] Unable to set group style."); + + pCheckButtonImpl = _CheckButtonImpl::CreateCheckButtonImplN(this, rect); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pCheckButtonImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pCheckButtonImpl->SetStyle(style, backgroundStyle, showTitle, groupStyle); + SysAssert(r == E_SUCCESS); // [ToDo] Exception. Which exception can occur? + + r = pCheckButtonImpl->SetText(text); + SysAssert(r == E_SUCCESS); // [ToDo] Exception. Which exception can occur? + + _pControlImpl = pCheckButtonImpl; + + return E_SUCCESS; +} + +result +CheckButton::Construct(const FloatRectangle& rect, CheckButtonStyle style, BackgroundStyle backgroundStyle, + bool showTitle, const String& text, GroupStyle groupStyle) +{ + result r = E_SUCCESS; + _CheckButtonImpl* pCheckButtonImpl = _CheckButtonImpl::GetInstance(*this); + + SysAssertf(pCheckButtonImpl == null, + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + SysTryReturn(NID_UI_CTRL, !(backgroundStyle == BACKGROUND_STYLE_NONE && groupStyle != GROUP_STYLE_NONE), + E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] Unable to set group style."); + + pCheckButtonImpl = _CheckButtonImpl::CreateCheckButtonImplN(this, rect); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pCheckButtonImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pCheckButtonImpl->SetStyle(style, backgroundStyle, showTitle, groupStyle); + SysAssert(r == E_SUCCESS); // [ToDo] Exception. Which exception can occur? + + r = pCheckButtonImpl->SetText(text); + SysAssert(r == E_SUCCESS); // [ToDo] Exception. Which exception can occur? + + _pControlImpl = pCheckButtonImpl; + + return E_SUCCESS; +} + + +void +CheckButton::SetSelected(bool select) +{ + _CheckButtonImpl* pCheckButtonImpl = _CheckButtonImpl::GetInstance(*this); + SysAssertf(pCheckButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pCheckButtonImpl->SetSelected(select); + + return; +} + +bool +CheckButton::IsSelected(void) const +{ + const _CheckButtonImpl* pCheckButtonImpl = _CheckButtonImpl::GetInstance(*this); + SysAssertf(pCheckButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pCheckButtonImpl->IsSelected(); +} + +void +CheckButton::AddActionEventListener(IActionEventListener& listener) +{ + _CheckButtonImpl* pCheckButtonImpl = _CheckButtonImpl::GetInstance(*this); + SysAssertf(pCheckButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + result r = pCheckButtonImpl->AddActionEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + return; +} + +void +CheckButton::RemoveActionEventListener(IActionEventListener& listener) +{ + _CheckButtonImpl* pCheckButtonImpl = _CheckButtonImpl::GetInstance(*this); + SysAssertf(pCheckButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + result r = pCheckButtonImpl->RemoveActionEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + return; +} + +void +CheckButton::SetActionId(int checkedActionId, int uncheckedActionId, int selectedActionId) +{ + _CheckButtonImpl* pCheckButtonImpl = _CheckButtonImpl::GetInstance(*this); + SysAssertf(pCheckButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pCheckButtonImpl->SetActionId(checkedActionId, uncheckedActionId, selectedActionId); + + return; +} + +int +CheckButton::GetCheckedActionId(void) const +{ + const _CheckButtonImpl* pCheckButtonImpl = _CheckButtonImpl::GetInstance(*this); + SysAssertf(pCheckButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pCheckButtonImpl->GetCheckedActionId(); +} + +int +CheckButton::GetUncheckedActionId(void) const +{ + const _CheckButtonImpl* pCheckButtonImpl = _CheckButtonImpl::GetInstance(*this); + SysAssertf(pCheckButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pCheckButtonImpl->GetUncheckedActionId(); +} + +int +CheckButton::GetSelectedActionId(void) const +{ + const _CheckButtonImpl* pCheckButtonImpl = _CheckButtonImpl::GetInstance(*this); + SysAssertf(pCheckButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pCheckButtonImpl->GetSelectedActionId(); +} + +void +CheckButton::SetText(const String& text) +{ + _CheckButtonImpl* pCheckButtonImpl = _CheckButtonImpl::GetInstance(*this); + SysAssertf(pCheckButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pCheckButtonImpl->SetText(text); + + return; +} + +String +CheckButton::GetText(void) const +{ + const _CheckButtonImpl* pCheckButtonImpl = _CheckButtonImpl::GetInstance(*this); + SysAssertf(pCheckButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pCheckButtonImpl->GetText(); +} + +result +CheckButton::SetTitleText(const String& title) +{ + _CheckButtonImpl* pCheckButtonImpl = _CheckButtonImpl::GetInstance(*this); + SysAssertf(pCheckButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + result r = pCheckButtonImpl->SetTitleText(title); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +String +CheckButton::GetTitleText(void) const +{ + const _CheckButtonImpl* pCheckButtonImpl = _CheckButtonImpl::GetInstance(*this); + SysAssertf(pCheckButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pCheckButtonImpl->GetTitleText(); +} + +void +CheckButton::SetTextHorizontalAlignment(HorizontalAlignment alignment) +{ + _CheckButtonImpl* pCheckButtonImpl = _CheckButtonImpl::GetInstance(*this); + SysAssertf(pCheckButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pCheckButtonImpl->SetTextHorizontalAlignment(alignment); + + return; +} + +HorizontalAlignment +CheckButton::GetTextHorizontalAlignment(void) const +{ + const _CheckButtonImpl* pCheckButtonImpl = _CheckButtonImpl::GetInstance(*this); + SysAssertf(pCheckButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pCheckButtonImpl->GetTextHorizontalAlignment(); +} + +void +CheckButton::SetTextVerticalAlignment(VerticalAlignment alignment) +{ + _CheckButtonImpl* pCheckButtonImpl = _CheckButtonImpl::GetInstance(*this); + SysAssertf(pCheckButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pCheckButtonImpl->SetTextVerticalAlignment(alignment); + + return; +} + +VerticalAlignment +CheckButton::GetTextVerticalAlignment(void) const +{ + const _CheckButtonImpl* pCheckButtonImpl = _CheckButtonImpl::GetInstance(*this); + SysAssertf(pCheckButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pCheckButtonImpl->GetTextVerticalAlignment(); +} + +void +CheckButton::SetTextColor(const Color& color) +{ + _CheckButtonImpl* pCheckButtonImpl = _CheckButtonImpl::GetInstance(*this); + SysAssertf(pCheckButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pCheckButtonImpl->SetTextColor(color); + + return; +} + +Color +CheckButton::GetTextColor(void) const +{ + const _CheckButtonImpl* pCheckButtonImpl = _CheckButtonImpl::GetInstance(*this); + SysAssertf(pCheckButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pCheckButtonImpl->GetTextColor(); +} + +result +CheckButton::SetDisabledTextColor(const Color& color) +{ + _CheckButtonImpl* pCheckButtonImpl = _CheckButtonImpl::GetInstance(*this); + SysAssertf(pCheckButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + result r = pCheckButtonImpl->SetDisabledTextColor(color); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +Color +CheckButton::GetDisabledTextColor(void) const +{ + const _CheckButtonImpl* pCheckButtonImpl = _CheckButtonImpl::GetInstance(*this); + SysAssertf(pCheckButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pCheckButtonImpl->GetDisabledTextColor(); +} + +result +CheckButton::SetPressedTextColor(const Color& color) +{ + _CheckButtonImpl* pCheckButtonImpl = _CheckButtonImpl::GetInstance(*this); + SysAssertf(pCheckButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + result r = pCheckButtonImpl->SetPressedTextColor(color); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +Color +CheckButton::GetPressedTextColor(void) const +{ + const _CheckButtonImpl* pCheckButtonImpl = _CheckButtonImpl::GetInstance(*this); + SysAssertf(pCheckButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pCheckButtonImpl->GetPressedTextColor(); +} + +result +CheckButton::SetHighlightedTextColor(const Color& color) +{ + _CheckButtonImpl* pCheckButtonImpl = _CheckButtonImpl::GetInstance(*this); + SysAssertf(pCheckButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + result r = pCheckButtonImpl->SetHighlightedTextColor(color); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +Color +CheckButton::GetHighlightedTextColor(void) const +{ + const _CheckButtonImpl* pCheckButtonImpl = _CheckButtonImpl::GetInstance(*this); + SysAssertf(pCheckButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pCheckButtonImpl->GetHighlightedTextColor(); +} + +void +CheckButton::SetTitleTextColor(const Color& color) +{ + _CheckButtonImpl* pCheckButtonImpl = _CheckButtonImpl::GetInstance(*this); + SysAssertf(pCheckButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pCheckButtonImpl->SetTitleTextColor(color); + + return; +} + +Color +CheckButton::GetTitleTextColor(void) const +{ + const _CheckButtonImpl* pCheckButtonImpl = _CheckButtonImpl::GetInstance(*this); + SysAssertf(pCheckButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pCheckButtonImpl->GetTitleTextColor(); +} + +result +CheckButton::SetDisabledTitleTextColor(const Color& color) +{ + _CheckButtonImpl* pCheckButtonImpl = _CheckButtonImpl::GetInstance(*this); + SysAssertf(pCheckButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + result r = pCheckButtonImpl->SetDisabledTitleTextColor(color); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +Color +CheckButton::GetDisabledTitleTextColor(void) const +{ + const _CheckButtonImpl* pCheckButtonImpl = _CheckButtonImpl::GetInstance(*this); + SysAssertf(pCheckButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pCheckButtonImpl->GetDisabledTitleTextColor(); +} + +result +CheckButton::SetPressedTitleTextColor(const Color& color) +{ + _CheckButtonImpl* pCheckButtonImpl = _CheckButtonImpl::GetInstance(*this); + SysAssertf(pCheckButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + result r = pCheckButtonImpl->SetPressedTitleTextColor(color); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +Color +CheckButton::GetPressedTitleTextColor(void) const +{ + const _CheckButtonImpl* pCheckButtonImpl = _CheckButtonImpl::GetInstance(*this); + SysAssertf(pCheckButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pCheckButtonImpl->GetPressedTitleTextColor(); +} + +result +CheckButton::SetHighlightedTitleTextColor(const Color& color) +{ + _CheckButtonImpl* pCheckButtonImpl = _CheckButtonImpl::GetInstance(*this); + SysAssertf(pCheckButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + result r = pCheckButtonImpl->SetHighlightedTitleTextColor(color); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +Color +CheckButton::GetHighlightedTitleTextColor(void) const +{ + const _CheckButtonImpl* pCheckButtonImpl = _CheckButtonImpl::GetInstance(*this); + SysAssertf(pCheckButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pCheckButtonImpl->GetHighlightedTitleTextColor(); +} + +result +CheckButton::SetColor(CheckButtonStatus status, const Color& color) +{ + _CheckButtonImpl* pCheckButtonImpl = _CheckButtonImpl::GetInstance(*this); + SysAssertf(pCheckButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + result r = pCheckButtonImpl->SetColor(status, color); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS;; +} + +Color +CheckButton::GetColor(CheckButtonStatus status) const +{ + const _CheckButtonImpl* pCheckButtonImpl = _CheckButtonImpl::GetInstance(*this); + SysAssertf(pCheckButtonImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pCheckButtonImpl->GetColor(status); +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlColorPicker.cpp b/src/ui/controls/FUiCtrlColorPicker.cpp new file mode 100644 index 0000000..5eb685f --- /dev/null +++ b/src/ui/controls/FUiCtrlColorPicker.cpp @@ -0,0 +1,199 @@ +// +// 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 FUiCtrlColorPicker.cpp + * @brief This is the implementation file for the %ColorPicker class. + */ + +#include +#include +#include "FUiCtrl_ColorPickerImpl.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Ui; + +namespace Tizen { namespace Ui { namespace Controls +{ + +ColorPicker::ColorPicker(void) +{ +} + +ColorPicker::~ColorPicker(void) +{ +} + +result +ColorPicker::Construct(const Point& point) +{ + SysAssertf((_ColorPickerImpl::GetInstance(*this) == null), + "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class"); + + _ColorPickerImpl* pImpl = _ColorPickerImpl::CreateColorPickerImplN(*this); + result r = GetLastResult(); + 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)); + + return E_SUCCESS; + +CATCH: + delete pImpl; + pImpl = null; + + return r; +} + +result +ColorPicker::Construct(const FloatPoint& point) +{ + SysAssertf((_ColorPickerImpl::GetInstance(*this) == null), + "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class"); + + _ColorPickerImpl* pImpl = _ColorPickerImpl::CreateColorPickerImplN(*this); + result r = GetLastResult(); + 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)); + + return E_SUCCESS; + +CATCH: + delete pImpl; + pImpl = null; + + return r; +} + +Color +ColorPicker::GetColor(void) const +{ + const _ColorPickerImpl* pImpl = _ColorPickerImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + Color color = pImpl->GetColor(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, color, r, "[%s] Propagating.", GetErrorMessage(r)); + + return color; +} + +int +ColorPicker::GetHue(void) const +{ + const _ColorPickerImpl* pImpl = _ColorPickerImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + int hue = pImpl->GetHue(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, hue, r, "[%s] Propagating.", GetErrorMessage(r)); + + return hue; +} + +int +ColorPicker::GetSaturation(void) const +{ + const _ColorPickerImpl* pImpl = _ColorPickerImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + int sat = pImpl->GetSaturation(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, sat, r, "[%s] Propagating.", GetErrorMessage(r)); + + return sat; +} + +int +ColorPicker::GetLuminance(void) const +{ + const _ColorPickerImpl* pImpl = _ColorPickerImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + int lum = pImpl->GetLuminance(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, lum, r, "[%s] Propagating.", GetErrorMessage(r)); + + return lum; +} + +void +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)); +} + +void +ColorPicker::SetHue(int hue) +{ + _ColorPickerImpl* pImpl = _ColorPickerImpl::GetInstance(*this); + 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)); +} + +void +ColorPicker::SetSaturation(int saturation) +{ + _ColorPickerImpl* pImpl = _ColorPickerImpl::GetInstance(*this); + 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)); +} + +void +ColorPicker::SetLuminance(int luminance) +{ + _ColorPickerImpl* pImpl = _ColorPickerImpl::GetInstance(*this); + 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)); +} + +void +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)); +} + +void +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)); +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlContextMenu.cpp b/src/ui/controls/FUiCtrlContextMenu.cpp new file mode 100644 index 0000000..3a9c9e2 --- /dev/null +++ b/src/ui/controls/FUiCtrlContextMenu.cpp @@ -0,0 +1,602 @@ +// +// 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 FUiCtrlContextMenu.cpp + * @brief This file contains implementation of ContextMenu class + */ + +#include +#include +#include +#include +#include "FUi_CoordinateSystemUtils.h" +#include "FUiCtrl_ContextMenuImpl.h" + +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 +{ + +ContextMenu::ContextMenu(void) +{ +} + +ContextMenu::~ContextMenu(void) +{ +} + +result +ContextMenu::Construct(const Point& point, ContextMenuStyle style) +{ + result r = E_SUCCESS; + + r = Construct(point, style, CONTEXT_MENU_ANCHOR_DIRECTION_AUTO); + + return r; +} + +result +ContextMenu::Construct(const FloatPoint& point, ContextMenuStyle style) +{ + result r = E_SUCCESS; + + r = Construct(point, style, CONTEXT_MENU_ANCHOR_DIRECTION_AUTO); + + return r; +} + +result +ContextMenu::Construct(const Point& point, ContextMenuStyle style, ContextMenuAnchorDirection direction) +{ + _ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this); + SysAssertf(pImpl == null, + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + result r = E_SUCCESS; + + // Create a ContextMenu Impl + FloatPoint floatPoint = _CoordinateSystemUtils::ConvertToFloat(point); + pImpl = _ContextMenuImpl::CreateContextMenuImplN(this, floatPoint, style, direction); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + _pControlImpl = pImpl; + + return r; +} + +result +ContextMenu::Construct(const FloatPoint& point, ContextMenuStyle style, ContextMenuAnchorDirection direction) +{ + _ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this); + SysAssertf(pImpl == null, + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + result r = E_SUCCESS; + + // Create a ContextMenu Impl + pImpl = _ContextMenuImpl::CreateContextMenuImplN(this, point, style, direction); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + _pControlImpl = pImpl; + + return r; +} + +void +ContextMenu::AddActionEventListener(IActionEventListener& listener) +{ + _ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = E_SUCCESS; + + r = pImpl->AddActionEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +ContextMenu::RemoveActionEventListener(IActionEventListener& listener) +{ + _ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = E_SUCCESS; + + r = pImpl->RemoveActionEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +result +ContextMenu::AddItem(const String& text, int actionId) +{ + // check whether the ContextMenu was created. + _ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = E_SUCCESS; + r = pImpl->AddItem(text, actionId, null, null, null); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +result +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); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = E_SUCCESS; + ContextMenuStyle style = pImpl->GetPublicStyle(); + + 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); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +result +ContextMenu::AddItem(const Bitmap& normalBitmap, const Bitmap* pPressedBitmap, int actionId) +{ + // check whether the ContextMenu was created. + _ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = E_SUCCESS; + ContextMenuStyle style = pImpl->GetPublicStyle(); + + 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(String(""), actionId, &normalBitmap, pPressedBitmap, null); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +result +ContextMenu::AddItem(const Bitmap& normalBitmap, const Bitmap* pPressedBitmap, + const Bitmap* pHighlightedBitmap, + int actionId) +{ + // check whether the ContextMenu was created. + _ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = E_SUCCESS; + ContextMenuStyle style = pImpl->GetPublicStyle(); + + 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(String(""), actionId, &normalBitmap, pPressedBitmap, pHighlightedBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +result +ContextMenu::InsertItemAt(int index, const String& text, int actionId) +{ + // check whether the ContextMenu was created. + _ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = E_SUCCESS; + + 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); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +result +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); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = E_SUCCESS; + ContextMenuStyle style = pImpl->GetPublicStyle(); + + 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."); + + 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); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +result +ContextMenu::InsertItemAt(int index, const Bitmap& normalBitmap, const Bitmap* pPressedBitmap, + int actionId) +{ + // check whether the ContextMenu was created. + _ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = E_SUCCESS; + ContextMenuStyle style = pImpl->GetPublicStyle(); + + 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."); + + 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, String(""), actionId, &normalBitmap, pPressedBitmap, null); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +result +ContextMenu::InsertItemAt(int index, const Bitmap& normalBitmap, const Bitmap* pPressedBitmap, + const Bitmap* pHighlightedBitmap, + int actionId) +{ + // check whether the ContextMenu was created. + _ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = E_SUCCESS; + ContextMenuStyle style = pImpl->GetPublicStyle(); + + 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."); + + 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, String(""), actionId, &normalBitmap, pPressedBitmap, pHighlightedBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +result +ContextMenu::SetItemAt(int index, const String& text, int actionId) +{ + // check whether the ContextMenu was created. + _ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = E_SUCCESS; + + 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); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +result +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); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = E_SUCCESS; + ContextMenuStyle style = pImpl->GetPublicStyle(); + + 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."); + + 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); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +result +ContextMenu::SetItemAt(int index, const Bitmap& normalBitmap, const Bitmap* pPressedBitmap, + int actionId) +{ + // check whether the ContextMenu was created. + _ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = E_SUCCESS; + ContextMenuStyle style = pImpl->GetPublicStyle(); + + 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."); + + 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, String(""), actionId, &normalBitmap, pPressedBitmap, null); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +result +ContextMenu::SetItemAt(int index, const Bitmap& normalBitmap, const Bitmap* pPressedBitmap, + const Bitmap* pHighlightedBitmap, + int actionId) +{ + // check whether the ContextMenu was created. + _ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = E_SUCCESS; + ContextMenuStyle style = pImpl->GetPublicStyle(); + + 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."); + + 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, String(""), actionId, &normalBitmap, pPressedBitmap, pHighlightedBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +result +ContextMenu::RemoveItemAt(int index) +{ + // check whether the ContextMenu was created. + _ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = E_SUCCESS; + + r = pImpl->RemoveItemAt(index); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +result +ContextMenu::RemoveAllItems(void) +{ + // check whether the ContextMenu was created. + _ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = E_SUCCESS; + + r = pImpl->RemoveAllItems(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +int +ContextMenu::GetItemCount(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."); + + return pImpl->GetItemCount(); +} + +int +ContextMenu::GetItemIndexFromActionId(int actionId) 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."); + + return pImpl->GetItemIndexFromActionId(actionId); +} + +int +ContextMenu::GetItemActionIdAt(int index) 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."); + + 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); +} + +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."); + + Color color = pImpl->GetItemTextColor(status); + result r = GetLastResult(); + 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 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."); + + result r = E_SUCCESS; + + r = pImpl->SetItemTextColor(status, color); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +result +ContextMenu::SetAnchorPosition(const Point& position) +{ + _ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = E_SUCCESS; + FloatPoint floatPosition = _CoordinateSystemUtils::ConvertToFloat(position); + r = pImpl->SetAnchorPosition(floatPosition.x, floatPosition.y); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +result +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); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +Point +ContextMenu::GetAnchorPosition(void) const +{ + const _ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + FloatPoint position = pImpl->GetAnchorPosition(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, Point(0, 0), r, "[%s] Propagating.", GetErrorMessage(r)); + + return _CoordinateSystemUtils::ConvertToInteger(position); +} + +FloatPoint +ContextMenu::GetAnchorPositionF(void) const +{ + const _ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + FloatPoint position = pImpl->GetAnchorPosition(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, FloatPoint(0.0f, 0.0f), r, "[%s] Propagating.", GetErrorMessage(r)); + + return position; +} + +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."); + + Color color = pImpl->GetColor(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, Color(0, 0, 0, 0), r, "[%s] Propagating.", GetErrorMessage(r)); + + return color; +} + +result +ContextMenu::SetColor(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."); + + result r = E_SUCCESS; + + r = pImpl->SetColor(color); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +Color +ContextMenu::GetItemColor(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."); + + SysTryReturn(NID_UI_CTRL, (status != CONTEXT_MENU_ITEM_STATUS_NORMAL), Color(0, 0, 0, 0), E_INVALID_STATE, + "[%s] Invalid argument is used. CONTEXT_MENU_ITEM_STATUS_NORMAL is not supported.", GetErrorMessage(E_INVALID_ARG)); + + Color color = pImpl->GetItemColor(status); + result r = GetLastResult(); + 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 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."); + + 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); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +int +ContextMenu::GetMaxVisibleItemsCount(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."); + + return pImpl->GetMaxVisibleItemsCount(); +} + +result +ContextMenu::SetMaxVisibleItemsCount(int maxItemsCount) +{ + // check whether the ContextMenu was created. + _ContextMenuImpl* pImpl = _ContextMenuImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + // check count + SysTryReturnResult(NID_UI_CTRL, ((maxItemsCount > 0) && (maxItemsCount < 8)), E_OUT_OF_RANGE, + "Maximum should be greater than 0 and less than 8."); + + result r = E_SUCCESS; + + r = pImpl->SetMaxVisibleItemsCount(maxItemsCount); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +}}} // Tizen::Ui: Control diff --git a/src/ui/controls/FUiCtrlCustomItem.cpp b/src/ui/controls/FUiCtrlCustomItem.cpp new file mode 100644 index 0000000..999f96c --- /dev/null +++ b/src/ui/controls/FUiCtrlCustomItem.cpp @@ -0,0 +1,228 @@ +// +// 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 FUiCtrlCustomItem.cpp + * @brief This is the implementation file for CustomItem class. + * + * This file contains the implementation of CustomItem class. + */ + +#include +#include +#include "FUiCtrl_CustomItemImpl.h" +#include "FUi_CoordinateSystemUtils.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +CustomItem::CustomItem(void) +{ +} + +CustomItem::~CustomItem(void) +{ +} + +result +CustomItem::Construct(const Dimension& itemSize, ListAnnexStyle style) +{ + return Construct(_CoordinateSystemUtils::ConvertToFloat(itemSize), style); +} + +result +CustomItem::Construct(const FloatDimension& itemSize, ListAnnexStyle style) +{ + result r = E_SUCCESS; + + _CustomItemImpl* pCustomImpl = static_cast<_CustomItemImpl*>(_ListItemBaseImpl::GetInstance(*this)); + SysAssertf(pCustomImpl == null, + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pCustomImpl = _CustomItemImpl::CreateCustomItemImplN(this, itemSize, style); + SysTryReturn(NID_UI_CTRL, pCustomImpl != null, GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _pImpl = pCustomImpl; + + return r; + +} + +result +CustomItem::AddElement(const Rectangle& rect, int elementId, const EnrichedText& text) +{ + _CustomItemImpl* pImpl = static_cast<_CustomItemImpl*>(_ListItemBaseImpl::GetInstance(*this)); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->AddElement(_CoordinateSystemUtils::ConvertToFloat(rect), elementId, text); +} + +result +CustomItem::AddElement(const FloatRectangle& rect, int elementId, const EnrichedText& text) +{ + _CustomItemImpl* pImpl = static_cast<_CustomItemImpl*>(_ListItemBaseImpl::GetInstance(*this)); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->AddElement(rect, elementId, text); + +} + +result +CustomItem::AddElement(const Rectangle& rect, int elementId, const String& text, bool textSliding) +{ + _CustomItemImpl* pImpl = static_cast<_CustomItemImpl*>(_ListItemBaseImpl::GetInstance(*this)); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->AddElement(_CoordinateSystemUtils::ConvertToFloat(rect), elementId, text, textSliding); +} + +result +CustomItem::AddElement(const FloatRectangle& rect, int elementId, const String& text, bool textSliding) +{ + _CustomItemImpl* pImpl = static_cast<_CustomItemImpl*>(_ListItemBaseImpl::GetInstance(*this)); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->AddElement(rect, elementId, text, textSliding); +} + +result +CustomItem::AddElement(const Rectangle& rect, int elementId, const String& text, int textSize, const Color& normalTextColor, + const Color& pressedTextColor, const Color& highlightedTextColor, bool textSliding) +{ + _CustomItemImpl* pImpl = static_cast<_CustomItemImpl*>(_ListItemBaseImpl::GetInstance(*this)); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->AddElement(_CoordinateSystemUtils::ConvertToFloat(rect), elementId, text, textSize, normalTextColor, + pressedTextColor, highlightedTextColor, textSliding); +} + +result +CustomItem::AddElement(const FloatRectangle& rect, int elementId, const String& text, float textSize, + const Color& normalTextColor, const Color& pressedTextColor, const Color& highlightedTextColor, bool textSliding) +{ + _CustomItemImpl* pImpl = static_cast<_CustomItemImpl*>(_ListItemBaseImpl::GetInstance(*this)); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->AddElement(rect, elementId, text, textSize, normalTextColor, + pressedTextColor, highlightedTextColor, textSliding); +} + +result +CustomItem::AddElement(const Rectangle& rect, int elementId, const Bitmap& normalBitmap, const Bitmap* pPressedBitmap, + const Bitmap* pHighlightedbitmap) +{ + _CustomItemImpl* pImpl = static_cast<_CustomItemImpl*>(_ListItemBaseImpl::GetInstance(*this)); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->AddElement(_CoordinateSystemUtils::ConvertToFloat(rect), elementId, normalBitmap, pPressedBitmap, pHighlightedbitmap); +} + +result +CustomItem::AddElement(const FloatRectangle& rect, int elementId, const Bitmap& normalBitmap, const Bitmap* pPressedBitmap, + const Bitmap* pHighlightedbitmap) +{ + _CustomItemImpl* pImpl = static_cast<_CustomItemImpl*>(_ListItemBaseImpl::GetInstance(*this)); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->AddElement(rect, elementId, normalBitmap, pPressedBitmap, pHighlightedbitmap); +} + +result +CustomItem::AddElement(const Rectangle& rect, int elementId, const ICustomElement& element) +{ + _CustomItemImpl* pImpl = static_cast<_CustomItemImpl*>(_ListItemBaseImpl::GetInstance(*this)); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->AddElement(_CoordinateSystemUtils::ConvertToFloat(rect), elementId, element); +} + +result +CustomItem::AddElement(const Rectangle& rect, int elementId, ICustomElement& element) +{ + _CustomItemImpl* pImpl = static_cast<_CustomItemImpl*>(_ListItemBaseImpl::GetInstance(*this)); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->AddElement(_CoordinateSystemUtils::ConvertToFloat(rect), elementId, element); +} + +result +CustomItem::AddElement(const FloatRectangle& rect, int elementId, ICustomElementF& element) +{ + _CustomItemImpl* pImpl = static_cast<_CustomItemImpl*>(_ListItemBaseImpl::GetInstance(*this)); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->AddElement(rect, elementId, element); +} + +result +CustomItem::RemoveAllElements(void) +{ + _CustomItemImpl* pImpl = static_cast<_CustomItemImpl*>(_ListItemBaseImpl::GetInstance(*this)); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->RemoveAllElements(); +} + +result +CustomItem::RemoveElement(int elementId) +{ + _CustomItemImpl* pImpl = static_cast<_CustomItemImpl*>(_ListItemBaseImpl::GetInstance(*this)); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->RemoveElement(elementId); +} + +result +CustomItem::SetElementSelectionEnabled(int elementId, bool enable) +{ + _CustomItemImpl* pImpl = static_cast<_CustomItemImpl*>(_ListItemBaseImpl::GetInstance(*this)); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetElementSelectionEnabled(elementId, enable); +} + +result +CustomItem::SetElementTextHorizontalAlignment(int elementId, HorizontalAlignment alignment) +{ + _CustomItemImpl* pImpl = static_cast<_CustomItemImpl*>(_ListItemBaseImpl::GetInstance(*this)); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetElementTextHorizontalAlignment(elementId, alignment); +} + +result +CustomItem::SetElementTextVerticalAlignment(int elementId, VerticalAlignment alignment) +{ + _CustomItemImpl* pImpl = static_cast<_CustomItemImpl*>(_ListItemBaseImpl::GetInstance(*this)); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetElementTextVerticalAlignment(elementId, alignment); +} + +result +CustomItem::SetElementAutoLinkMask(int elementId, unsigned long mask) +{ + _CustomItemImpl* pImpl = static_cast<_CustomItemImpl*>(_ListItemBaseImpl::GetInstance(*this)); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetElementAutoLinkMask(elementId, mask); +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlCustomList.cpp b/src/ui/controls/FUiCtrlCustomList.cpp new file mode 100644 index 0000000..d40103a --- /dev/null +++ b/src/ui/controls/FUiCtrlCustomList.cpp @@ -0,0 +1,424 @@ +// +// 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 FUiCtrlCustomList.cpp +* @brief This file contains implementation of CustomList class +*/ + + +#include +#include +#include "FUiCtrl_CustomListImpl.h" + +using namespace Tizen::Ui; +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +CustomList::CustomList(void) +{ +} + +CustomList::~CustomList(void) +{ +} + +result +CustomList::Construct(const Rectangle& rect, CustomListStyle style, bool itemDivider) +{ + result r = E_SUCCESS; + + _CustomListImpl* pCustomListImpl = _CustomListImpl::GetInstance(*this); + SysAssertf((pCustomListImpl == null), "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pCustomListImpl = _CustomListImpl::CreateCustomListImplN(this, rect, itemDivider); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pCustomListImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlImpl = pCustomListImpl; + + r = pCustomListImpl->InitializeBounds(rect); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pCustomListImpl->SetListStyle(style); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + r = pCustomListImpl->Initialize(); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + r = pCustomListImpl->LoadDefaultBitmap(); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + return E_SUCCESS; + +CATCH: + Dispose(); + return E_SYSTEM; +} + +void +CustomList::AddCustomItemEventListener(ICustomItemEventListener& listener) +{ + _CustomListImpl* pImpl = _CustomListImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->AddCustomItemEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +CustomList::RemoveCustomItemEventListener(ICustomItemEventListener& listener) +{ + _CustomListImpl* pImpl = _CustomListImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->RemoveCustomItemEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +result +CustomList::AddItem(const CustomListItem& item, int itemId) +{ + _CustomListImpl* pImpl = _CustomListImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->AddItem(item, itemId); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Failed to add an item.", GetErrorMessage(r)); + + return r; +} + +result +CustomList::InsertItemAt(int index, const CustomListItem& item, int itemId) +{ + _CustomListImpl* pImpl = _CustomListImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->InsertItemAt(index, item, itemId); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Failed to insert an item.", GetErrorMessage(r)); + + return r; +} + +result +CustomList::SetItemAt(int index, const CustomListItem& item, int itemId) +{ + _CustomListImpl* pImpl = _CustomListImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->SetItemAt(index, item, itemId); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Failed to set an item.", GetErrorMessage(r)); + + return r; +} + +result +CustomList::RemoveItemAt(int index) +{ + _CustomListImpl* pImpl = _CustomListImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->RemoveItemAt(index); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Failed to remove an item.", GetErrorMessage(r)); + + return r; +} + +result +CustomList::RemoveAllItems(void) +{ + _CustomListImpl* pImpl = _CustomListImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->RemoveAllItems(); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Failed to remove all items.", GetErrorMessage(r)); + + return r; +} + +const CustomListItem* +CustomList::GetItemAt(int index) const +{ + const _CustomListImpl* pImpl = _CustomListImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + const CustomListItem* pItem = pImpl->GetCustomListItemAt(-1, index); + return pItem; +} + +int +CustomList::GetItemCount(void) const +{ + const _CustomListImpl* pImpl = _CustomListImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetItemCount(); +} + +result +CustomList::SetItemEnabled(int index, bool enable) +{ + _CustomListImpl* pImpl = _CustomListImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->SetItemEnabled(index, enable); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Failed to SetItemEnabled.", GetErrorMessage(r)); + + return r; +} + +bool +CustomList::IsItemEnabled(int index) const +{ + const _CustomListImpl* pImpl = _CustomListImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsItemEnabled(index); +} + +result +CustomList::SetItemChecked(int index, bool check) +{ + _CustomListImpl* pImpl = _CustomListImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->SetItemChecked(index, check); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Failed to SetItemChecked.", GetErrorMessage(r)); + + return r; +} + +bool +CustomList::IsItemChecked(int index) const +{ + const _CustomListImpl* pImpl = _CustomListImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsItemChecked(index); +} + +result +CustomList::SetAllItemsChecked(bool check) +{ + _CustomListImpl* pImpl = _CustomListImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->SetAllItemsChecked(check); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Failed to SetAllItemsChecked.", GetErrorMessage(r)); + + return r; +} + +result +CustomList::RemoveAllCheckedItems(void) +{ + _CustomListImpl* pImpl = _CustomListImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->RemoveAllCheckedItems(); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Failed to SetAllItemsChecked.", GetErrorMessage(r)); + + return r; +} + +int +CustomList::GetFirstCheckedItemIndex(void) const +{ + const _CustomListImpl* pImpl = _CustomListImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetFirstCheckedItemIndex(); +} + +int +CustomList::GetLastCheckedItemIndex(void) const +{ + const _CustomListImpl* pImpl = _CustomListImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetLastCheckedItemIndex(); +} + +int +CustomList::GetNextCheckedItemIndexAfter(int index) const +{ + const _CustomListImpl* pImpl = _CustomListImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetNextCheckedItemIndexAfter(index); +} + +int +CustomList::GetItemIndexFromPosition(int x, int y) const +{ + const _CustomListImpl* pImpl = _CustomListImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + int groupIndex = -1; + int itemIndex = -1; + + result r = pImpl->GetItemIndexFromPosition(Point(x, y), groupIndex, itemIndex); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), -1, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + return itemIndex; +} + +int +CustomList::GetItemIndexFromPosition(const Point& position) const +{ + const _CustomListImpl* pImpl = _CustomListImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + int groupIndex = -1; + int itemIndex = -1; + + result r = pImpl->GetItemIndexFromPosition(position, groupIndex, itemIndex); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), -1, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + return itemIndex; +} + +int +CustomList::GetTopDrawnItemIndex(void) const +{ + const _CustomListImpl* pImpl = _CustomListImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + int groupIndex = -1; + int itemIndex = -1; + + result r = pImpl->GetTopDrawnItemIndex(groupIndex, itemIndex); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), -1, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + return itemIndex; +} + +int +CustomList::GetBottomDrawnItemIndex(void) const +{ + const _CustomListImpl* pImpl = _CustomListImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + int groupIndex = -1; + int itemIndex = -1; + + result r = pImpl->GetBottomDrawnItemIndex(groupIndex, itemIndex); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), -1, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + return itemIndex; +} + +void +CustomList::SetBackgroundColor(const Color& color) +{ + _CustomListImpl* pImpl = _CustomListImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + pImpl->SetBackgroundColor(color); +} + +void +CustomList::SetTextOfEmptyList(const String& text) +{ + _CustomListImpl* pImpl = _CustomListImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + pImpl->SetTextOfEmptyList(text); +} + +void +CustomList::SetTextColorOfEmptyList(const Color& color) +{ + _CustomListImpl* pImpl = _CustomListImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + pImpl->SetTextColorOfEmptyList(color); +} + +Color +CustomList::GetTextColorOfEmptyList(void) const +{ + const _CustomListImpl* pImpl = _CustomListImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetTextColorOfEmptyList(); +} + +int +CustomList::GetItemIndexFromItemId(int itemId) const +{ + const _CustomListImpl* pImpl = _CustomListImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetItemIndexFromItemId(itemId); +} + +int +CustomList::GetItemIdAt(int index) const +{ + const _CustomListImpl* pImpl = _CustomListImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetItemIdAt(index); +} + +void +CustomList::ScrollToBottom(void) +{ + _CustomListImpl* pImpl = _CustomListImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + pImpl->ScrollToBottom(); +} + +void +CustomList::ScrollToTop(void) +{ + _CustomListImpl* pImpl = _CustomListImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + pImpl->ScrollToTop(); +} + +result +CustomList::ScrollToTop(int index) +{ + _CustomListImpl* pImpl = _CustomListImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->ScrollToTop(index); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Failed to ScrollToTop.", GetErrorMessage(r)); + + return r; +} + +result +CustomList::RefreshItem(int index) +{ + _CustomListImpl* pImpl = _CustomListImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->RefreshItem(index); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Failed to Refresh an item.", GetErrorMessage(r)); + + return r; +} + +}}} // Tizen::Controls::Ui diff --git a/src/ui/controls/FUiCtrlCustomListItem.cpp b/src/ui/controls/FUiCtrlCustomListItem.cpp new file mode 100644 index 0000000..0096b93 --- /dev/null +++ b/src/ui/controls/FUiCtrlCustomListItem.cpp @@ -0,0 +1,164 @@ +// +// 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 FUiCtrlCustomListItem.cpp +* @brief This file contains implementation of CustomListItem class +*/ + +#include +#include +#include +#include +#include +#include "FUiCtrl_CustomListItemImpl.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +CustomListItem::CustomListItem(void) + : __pCustomListItemFormat(null) + , __pCustomListItemImpl(null) +{ +} + +CustomListItem::~CustomListItem(void) +{ + delete __pCustomListItemImpl; + __pCustomListItemImpl = null; +} + +result +CustomListItem::Construct(int itemHeight) +{ + result r = E_SUCCESS; + + SysAssertf((__pCustomListItemImpl == null), + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for thisclass."); + + __pCustomListItemImpl = _CustomListItemImpl::CreateInstanceN(itemHeight); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, __pCustomListItemImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +void +CustomListItem::SetItemFormat(const CustomListItemFormat& itemFormat) +{ + SysAssertf((__pCustomListItemImpl != null), "Not yet constructed. Construct() should be called before use."); + __pCustomListItemFormat = const_cast< CustomListItemFormat* >(&itemFormat); +} + +const CustomListItemFormat* +CustomListItem::GetItemFormat(void) const +{ + return __pCustomListItemFormat; +} + +void +CustomListItem::SetFocusedItemBackgroundBitmap(const Bitmap& bitmap) +{ + SysAssertf((__pCustomListItemImpl != null), "Not yet constructed. Construct() should be called before use."); + __pCustomListItemImpl->SetFocusedItemBackgroundBitmap(bitmap); +} + +void +CustomListItem::SetNormalItemBackgroundBitmap(const Bitmap& bitmap) +{ + SysAssertf((__pCustomListItemImpl != null), "Not yet constructed. Construct() should be called before use."); + __pCustomListItemImpl->SetNormalItemBackgroundBitmap(bitmap); +} + +void +CustomListItem::SetHighlightedItemBackgroundBitmap(const Bitmap& bitmap) +{ + SysAssertf((__pCustomListItemImpl != null), "Not yet constructed. Construct() should be called before use."); + __pCustomListItemImpl->SetHighlightedItemBackgroundBitmap(bitmap); +} + +result +CustomListItem::SetElement(int elementId, const String& text) +{ + SysAssertf((__pCustomListItemImpl != null), "Not yet constructed. Construct() should be called before use."); + result r = __pCustomListItemImpl->SetElement(elementId, text); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Failed to Set an Element.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +CustomListItem::SetElement(int elementId, const Bitmap& normalBitmap, const Bitmap* pFocusedBitmap) +{ + SysAssertf((__pCustomListItemImpl != null), "Not yet constructed. Construct() should be called before use."); + + result r = __pCustomListItemImpl->SetElement(elementId, normalBitmap, pFocusedBitmap); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Failed to Set an Element.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +CustomListItem::SetElement(int elementId, const Bitmap& normalBitmap, const Bitmap* pFocusedBitmap, const Bitmap* pHighlightedBitmap) +{ + SysAssertf((__pCustomListItemImpl != null), "Not yet constructed. Construct() should be called before use."); + + result r = __pCustomListItemImpl->SetElement(elementId, normalBitmap, pFocusedBitmap, pHighlightedBitmap); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Failed to Set an Element.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +CustomListItem::SetElement(int elementId, const ICustomListElement& element) +{ + SysAssertf((__pCustomListItemImpl != null), "Not yet constructed. Construct() should be called before use."); + + result r = __pCustomListItemImpl->SetElement(elementId, element); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Failed to Set an Element.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +CustomListItem::SetCheckBox(int elementId) +{ + SysAssertf((__pCustomListItemImpl != null), "Not yet constructed. Construct() should be called before use."); + + SysTryReturnResult(NID_UI_CTRL, __pCustomListItemFormat, E_SYSTEM, "The CustomListItemFormat is not constructed."); + + if (__pCustomListItemFormat->GetElement(elementId) == Rectangle(0, 0, -1, -1)) + { + return E_SYSTEM; + } + + __pCustomListItemImpl->SetCheckBox(elementId); + + return E_SUCCESS; +} + +int +CustomListItem::GetValue(void) const +{ + SysAssertf((__pCustomListItemImpl != null), "Not yet constructed. Construct() should be called before use."); + return -1; +} + +}}} //Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlCustomListItemFormat.cpp b/src/ui/controls/FUiCtrlCustomListItemFormat.cpp new file mode 100644 index 0000000..78b98a5 --- /dev/null +++ b/src/ui/controls/FUiCtrlCustomListItemFormat.cpp @@ -0,0 +1,175 @@ +// +// 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 FUiCtrlCustomListItemFormat.cpp +* @brief This file contains implementation of CustomListItemFormat class +*/ + +#include +#include +#include +#include +#include "FUiCtrl_CustomListItemFormatImpl.h" + +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +CustomListItemFormat::CustomListItemFormat(void) + :__pCustomListItemFormatImpl(null) +{ +} + +CustomListItemFormat::~CustomListItemFormat(void) +{ + delete __pCustomListItemFormatImpl; + __pCustomListItemFormatImpl = null; +} + +result +CustomListItemFormat::Construct(void) +{ + SysAssertf((__pCustomListItemFormatImpl == null), + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + __pCustomListItemFormatImpl = _CustomListItemFormatImpl::CreateInstanceN(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, __pCustomListItemFormatImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +CustomListItemFormat::AddElement(int elementId, const Rectangle& rect) +{ + SysAssertf((__pCustomListItemFormatImpl != null), "Not yet constructed. Construct() should be called before use."); + + SysTryReturnResult(NID_UI_CTRL, (rect.width > 0 && rect.height >0), E_INVALID_ARG, "The width and height should be greater than 0."); + + result r = __pCustomListItemFormatImpl->AddElement(elementId, rect); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] A System error occurred.", GetErrorMessage(r)); + + return r; + +} + +result +CustomListItemFormat::AddElement(int elementId, const Rectangle& rect, int textSize) +{ + SysAssertf((__pCustomListItemFormatImpl != null), "Not yet constructed. Construct() should be called before use."); + + SysTryReturnResult(NID_UI_CTRL, (rect.width > 0 && rect.height >0), E_INVALID_ARG, "The width and height should be greater than 0."); + + result r = __pCustomListItemFormatImpl->AddElement(elementId, rect, textSize); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] A System error occurred.", GetErrorMessage(r)); + + return r; +} + +result +CustomListItemFormat::AddElement(int elementId, const Rectangle& rect, int textSize, const Color& normalTextColor, const Color& focusedTextColor) +{ + SysAssertf((__pCustomListItemFormatImpl != null), "Not yet constructed. Construct() should be called before use."); + + SysTryReturnResult(NID_UI_CTRL, (rect.width > 0 && rect.height >0), E_INVALID_ARG, "The width and height should be greater than 0."); + + result r = __pCustomListItemFormatImpl->AddElement(elementId, rect, textSize, normalTextColor, focusedTextColor); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] A System error occurred.", GetErrorMessage(r)); + + return r; +} + +result +CustomListItemFormat::AddElement(int elementId, const Rectangle& rect, int textSize, const Color& normalTextColor, const Color& focusedTextColor, const Color& highlightedTextColor) +{ + SysAssertf((__pCustomListItemFormatImpl != null), "Not yet constructed. Construct() should be called before use."); + + SysTryReturnResult(NID_UI_CTRL, (rect.width > 0 && rect.height >0), E_INVALID_ARG, "The width and height should be greater than 0."); + + result r = __pCustomListItemFormatImpl->AddElement(elementId, rect, textSize, normalTextColor, focusedTextColor, highlightedTextColor); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] A System error occurred.", GetErrorMessage(r)); + + return r; +} + +Rectangle +CustomListItemFormat::GetElement(int elementId) const +{ + SysAssertf((__pCustomListItemFormatImpl != null), "Not yet constructed. Construct() should be called before use."); + SetLastResult(E_SUCCESS); + return __pCustomListItemFormatImpl->GetElement(elementId); +} + +int +CustomListItemFormat::GetFirstElementId(void) const +{ + SysAssertf((__pCustomListItemFormatImpl != null), "Not yet constructed. Construct() should be called before use."); + SetLastResult(E_SUCCESS); + return __pCustomListItemFormatImpl->GetFirstElementId(); +} + +int +CustomListItemFormat::GetNextElementId(int elementId) const +{ + SysAssertf((__pCustomListItemFormatImpl != null), "Not yet constructed. Construct() should be called before use."); + SetLastResult(E_SUCCESS); + return __pCustomListItemFormatImpl->GetNextElementId(elementId); +} + +int +CustomListItemFormat::GetFirstEnabledElementId(void) const +{ + SysAssertf((__pCustomListItemFormatImpl != null), "Not yet constructed. Construct() should be called before use."); + SetLastResult(E_SUCCESS); + return __pCustomListItemFormatImpl->GetFirstEnabledElementId(); +} + +int +CustomListItemFormat::GetNextEnabledElementId(int elementId) const +{ + SysAssertf((__pCustomListItemFormatImpl != null), "Not yet constructed. Construct() should be called before use."); + SetLastResult(E_SUCCESS); + return __pCustomListItemFormatImpl->GetNextEnabledElementId(elementId); +} + +int +CustomListItemFormat::GetPreviousEnabledElementId(int elementId) const +{ + SysAssertf((__pCustomListItemFormatImpl != null), "Not yet constructed. Construct() should be called before use."); + SetLastResult(E_SUCCESS); + return __pCustomListItemFormatImpl->GetPreviousEnabledElementId(elementId); +} + +void +CustomListItemFormat::SetElementEventEnabled(int elementId, bool enable) +{ + SysAssertf((__pCustomListItemFormatImpl != null), "Not yet constructed. Construct() should be called before use."); + SetLastResult(E_SUCCESS); + __pCustomListItemFormatImpl->SetElementEventEnabled(elementId, enable); +} + +bool +CustomListItemFormat::IsElementEventEnabled(int elementId) +{ + SysAssertf((__pCustomListItemFormatImpl != null), "Not yet constructed. Construct() should be called before use."); + SetLastResult(E_SUCCESS); + return __pCustomListItemFormatImpl->IsElementEventEnabled(elementId); +} + +}}} //Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlDatePicker.cpp b/src/ui/controls/FUiCtrlDatePicker.cpp new file mode 100644 index 0000000..7fdc6a7 --- /dev/null +++ b/src/ui/controls/FUiCtrlDatePicker.cpp @@ -0,0 +1,220 @@ +// +// 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 FUiCtrlDatePicker.cpp + * @brief This is the implementation file for the DatePicker class. + */ + +#include +#include +#include +#include "FUiCtrl_DatePickerImpl.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::System; + +namespace Tizen { namespace Ui { namespace Controls +{ + +DatePicker::DatePicker(void) +{ +} + +DatePicker::~DatePicker(void) +{ +} + +result +DatePicker::Construct(const Tizen::Base::String& title) +{ + _DatePickerImpl* pImpl = _DatePickerImpl::GetInstance(*this); + SysAssertf((pImpl == null), + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pImpl = _DatePickerImpl::CreateDatePickerImplN(this, title); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, (pImpl != null), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlImpl = pImpl; + + pImpl->GetCore().SetResizable(false); + pImpl->GetCore().SetMovable(false); + + return r; +} + +void +DatePicker::AddDateChangeEventListener(Tizen::Ui::IDateChangeEventListener& listener) +{ + _DatePickerImpl* pImpl = _DatePickerImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->AddDateChangeEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +DatePicker::RemoveDateChangeEventListener(Tizen::Ui::IDateChangeEventListener& listener) +{ + _DatePickerImpl* pImpl = _DatePickerImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->RemoveDateChangeEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +Tizen::Base::DateTime +DatePicker::GetDate(void) const +{ + result r = E_SUCCESS; + Tizen::Base::DateTime dateTime; + const _DatePickerImpl* pImpl = _DatePickerImpl::GetInstance(*this); + if (pImpl == null) + { + r = SystemTime::GetCurrentTime(TIME_MODE_WALL, dateTime); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, dateTime, r, "[%s] Propagating.", GetErrorMessage(r)); + return dateTime; + } + + dateTime = pImpl->GetDate(); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, dateTime, r, "[%s] Propagating.", GetErrorMessage(r)); + + return dateTime; +} + +int +DatePicker::GetDay(void) const +{ + const _DatePickerImpl* pImpl = _DatePickerImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + int day = pImpl->GetDay(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, day, r, "[%s] Propagating.", GetErrorMessage(r)); + + return day; +} + +int +DatePicker::GetMonth(void) const +{ + const _DatePickerImpl* pImpl = _DatePickerImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + int month = pImpl->GetMonth(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, month, r, "[%s] Propagating.", GetErrorMessage(r)); + + return month; +} + +int +DatePicker::GetYear(void) const +{ + const _DatePickerImpl* pImpl = _DatePickerImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + int year = pImpl->GetYear(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, year, r, "[%s] Propagating.", GetErrorMessage(r)); + + return year; +} + +void +DatePicker::SetDate(const Tizen::Base::DateTime& date) +{ + _DatePickerImpl* pImpl = _DatePickerImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + pImpl->SetDate(date); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +DatePicker::SetCurrentDate(void) +{ + _DatePickerImpl* pImpl = _DatePickerImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + pImpl->SetCurrentDate(); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +result +DatePicker::SetYear(int year) +{ + _DatePickerImpl* pImpl = _DatePickerImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->SetYear(year); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +DatePicker::SetMonth(int month) +{ + _DatePickerImpl* pImpl = _DatePickerImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->SetMonth(month); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +DatePicker::SetDay(int day) +{ + _DatePickerImpl* pImpl = _DatePickerImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->SetDay(day); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +DatePicker::SetYearRange(int minYear, int maxYear) +{ + _DatePickerImpl* pImpl = _DatePickerImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->SetYearRange(minYear, maxYear); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +DatePicker::GetYearRange(int& minYear, int& maxYear) const +{ + const _DatePickerImpl* pImpl = _DatePickerImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetYearRange(minYear, maxYear); +} + +}}} //Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlDateTimePicker.cpp b/src/ui/controls/FUiCtrlDateTimePicker.cpp new file mode 100644 index 0000000..f53e22c --- /dev/null +++ b/src/ui/controls/FUiCtrlDateTimePicker.cpp @@ -0,0 +1,288 @@ +// +// 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 FUiCtrlDateTimePicker.cpp + * @brief This is the implementation file for the DateTimePicker class. + */ + +#include +#include +#include +#include +#include "FUiCtrl_DateTimePickerImpl.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::System; + +namespace Tizen { namespace Ui { namespace Controls +{ + +DateTimePicker::DateTimePicker(void) +{ +} + +DateTimePicker::~DateTimePicker(void) +{ +} + +result +DateTimePicker::Construct(const Tizen::Base::String& title) +{ + _DateTimePickerImpl* pImpl = _DateTimePickerImpl::GetInstance(*this); + SysAssertf((pImpl == null), + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pImpl = _DateTimePickerImpl::CreateDateTimePickerImplN(this, title); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, (pImpl != null), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlImpl = pImpl; + + pImpl->GetCore().SetResizable(false); + pImpl->GetCore().SetMovable(false); + + return r; +} + +void +DateTimePicker::AddDateTimeChangeEventListener(Tizen::Ui::IDateTimeChangeEventListener& listener) +{ + _DateTimePickerImpl* pImpl = _DateTimePickerImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->AddDateTimeChangeEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +DateTimePicker::RemoveDateTimeChangeEventListener(Tizen::Ui::IDateTimeChangeEventListener& listener) +{ + _DateTimePickerImpl* pImpl = _DateTimePickerImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->RemoveDateTimeChangeEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +DateTimePicker::SetDateTime(const Tizen::Base::DateTime& dateTime) +{ + _DateTimePickerImpl* pImpl = _DateTimePickerImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + pImpl->SetDateTime(dateTime); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +DateTimePicker::SetCurrentDateTime(void) +{ + _DateTimePickerImpl* pImpl = _DateTimePickerImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + pImpl->SetCurrentDateTime(); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +result +DateTimePicker::SetYear(int year) +{ + _DateTimePickerImpl* pImpl = _DateTimePickerImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->SetYear(year); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +DateTimePicker::SetMonth(int month) +{ + _DateTimePickerImpl* pImpl = _DateTimePickerImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->SetMonth(month); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +DateTimePicker::SetDay(int day) +{ + _DateTimePickerImpl* pImpl = _DateTimePickerImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->SetDay(day); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +DateTimePicker::SetHour(int hour) +{ + _DateTimePickerImpl* pImpl = _DateTimePickerImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->SetHour(hour); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +DateTimePicker::SetMinute(int minute) +{ + _DateTimePickerImpl* pImpl = _DateTimePickerImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->SetMinute(minute); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +Tizen::Base::DateTime +DateTimePicker::GetDateTime(void) const +{ + const _DateTimePickerImpl* pImpl = _DateTimePickerImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + DateTime dateTime = pImpl->GetDateTime(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, dateTime, r, "[%s] Propagating.", GetErrorMessage(r)); + + return dateTime; +} + +int +DateTimePicker::GetYear(void) const +{ + const _DateTimePickerImpl* pImpl = _DateTimePickerImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + int year = pImpl->GetYear(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, year, r, "[%s] Propagating.", GetErrorMessage(r)); + + return year; +} + +int +DateTimePicker::GetMonth(void) const +{ + const _DateTimePickerImpl* pImpl = _DateTimePickerImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + int month = pImpl->GetMonth(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, month, r, "[%s] Propagating.", GetErrorMessage(r)); + + return month; +} + +int +DateTimePicker::GetDay(void) const +{ + const _DateTimePickerImpl* pImpl = _DateTimePickerImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + int day = pImpl->GetDay(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, day, r, "[%s] Propagating.", GetErrorMessage(r)); + + return day; +} + +int +DateTimePicker::GetHour(void) const +{ + const _DateTimePickerImpl* pImpl = _DateTimePickerImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + int hour = pImpl->GetHour(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, hour, r, "[%s] Propagating.", GetErrorMessage(r)); + + return hour; +} + +int +DateTimePicker::GetMinute(void) const +{ + const _DateTimePickerImpl* pImpl = _DateTimePickerImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + int minute = pImpl->GetMinute(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, minute, r, "[%s] Propagating.", GetErrorMessage(r)); + + return minute; +} + +void +DateTimePicker::Set24HourNotationEnabled(bool enable) +{ + _DateTimePickerImpl* pImpl = _DateTimePickerImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + pImpl->Set24HourNotationEnabled(enable); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +bool +DateTimePicker::Is24HourNotationEnabled(void) const +{ + const _DateTimePickerImpl* pImpl = _DateTimePickerImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + bool enabled = pImpl->Is24HourNotationEnabled(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, enabled, r, "[%s] Propagating.", GetErrorMessage(r)); + + return enabled; +} + +result +DateTimePicker::SetYearRange(int minYear, int maxYear) +{ + _DateTimePickerImpl* pImpl = _DateTimePickerImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->SetYearRange(minYear, maxYear); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +DateTimePicker::GetYearRange(int& minYear, int& maxYear) const +{ + const _DateTimePickerImpl* pImpl = _DateTimePickerImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetYearRange(minYear, maxYear); +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlEditArea.cpp b/src/ui/controls/FUiCtrlEditArea.cpp new file mode 100644 index 0000000..a658e13 --- /dev/null +++ b/src/ui/controls/FUiCtrlEditArea.cpp @@ -0,0 +1,963 @@ +// +// 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 FUiCtrlEditArea.cpp + * @brief This is the implementation file for EditArea class. + */ + +#include +#include +#include "FUiCtrl_EditAreaImpl.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Utility; +using namespace Tizen::Graphics; +using namespace Tizen::Locales; +using namespace Tizen::Security; +using namespace Tizen::Ui; + +namespace Tizen { namespace Ui { namespace Controls +{ + +EditArea::EditArea(void) +{ +} + +EditArea::~EditArea(void) +{ + +} + +result +EditArea::Construct(const Rectangle& rect, InputStyle inputStyle, int limitLength) +{ + result r = E_SUCCESS; + + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pEditAreaImpl = _EditAreaImpl::CreateEditAreaImplN(this, rect); + SysTryReturn(NID_UI_CTRL, pEditAreaImpl != null, GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _pControlImpl = pEditAreaImpl; + + r = SetBounds(rect.x, rect.y, rect.width, rect.height); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pEditAreaImpl->Initialize(inputStyle, limitLength); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + +CATCH: + delete pEditAreaImpl; + _pControlImpl = null; + + return r; +} + +result +EditArea::Construct(const FloatRectangle& rect, InputStyle inputStyle, int limitLength) +{ + result r = E_SUCCESS; + + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pEditAreaImpl = _EditAreaImpl::CreateEditAreaImplN(this, rect); + SysTryReturn(NID_UI_CTRL, pEditAreaImpl != null, GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _pControlImpl = pEditAreaImpl; + + r = SetBounds(rect.x, rect.y, rect.width, rect.height); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pEditAreaImpl->Initialize(inputStyle, limitLength); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + +CATCH: + delete pEditAreaImpl; + _pControlImpl = null; + + return r; +} + +HorizontalAlignment +EditArea::GetTextAlignment(void) const +{ + const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->GetTextAlignment(); +} + +result +EditArea::SetTextAlignment(HorizontalAlignment alignment) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->SetTextAlignment(alignment); +} + +bool +EditArea::IsViewModeEnabled(void) const +{ + const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->IsViewModeEnabled(); +} + +result +EditArea::SetViewModeEnabled(bool enable) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->SetViewModeEnabled(enable); +} + +result +EditArea::SetAutoLinkMask(unsigned long autoLinks) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->SetAutoLinkMask(autoLinks); +} + +unsigned long +EditArea::GetAutoLinkMask(void) const +{ + const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->GetAutoLinkMask(); +} + +int +EditArea::GetLineSpacing(void) const +{ + const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->GetLineSpacing(); +} + +float +EditArea::GetLineSpacingF(void) const +{ + const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->GetLineSpacingF(); +} + +result +EditArea::SetLineSpacing(int multiplier, int extra) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->SetLineSpacing(multiplier, extra); +} + +result +EditArea::SetLineSpacing(int multiplier, float extra) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->SetLineSpacing(multiplier, extra); +} + +int +EditArea::GetMargin(EditMarginType marginType) const +{ + const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->GetMargin(marginType); +} + +float +EditArea::GetMarginF(EditMarginType marginType) const +{ + const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->GetMarginF(marginType); +} + +result +EditArea::SetMargin(EditMarginType marginType, int margin) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->SetMargin(marginType, margin); +} + +result +EditArea::SetMargin(EditMarginType marginType, float margin) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->SetMargin(marginType, margin); +} + +result +EditArea::SetKeypadActionEnabled(bool enable) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->SetKeypadActionEnabled(enable); +} + +bool +EditArea::IsKeypadActionEnabled(void) const +{ + const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->IsKeypadActionEnabled(); +} + + +KeypadAction +EditArea::GetKeypadAction(void) const +{ + const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->GetKeypadAction(); +} + +result +EditArea::SetKeypadAction(KeypadAction keypadAction) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->SetKeypadAction(keypadAction); +} + +KeypadStyle +EditArea::GetKeypadStyle(void) const +{ + const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->GetKeypadStyle(); +} + +result +EditArea::SetKeypadStyle(KeypadStyle keypadStyle) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->SetKeypadStyle(keypadStyle); +} + +bool +EditArea::IsTextPredictionEnabled(void) const +{ + const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->IsTextPredictionEnabled(); +} + +result +EditArea::SetTextPredictionEnabled(bool enable) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->SetTextPredictionEnabled(enable); +} + +result +EditArea::SetOverlayKeypadCommandButtonVisible(bool visible) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->SetOverlayKeypadCommandButtonVisible(visible); +} + +bool +EditArea::IsOverlayCommandButtonVisible(void) const +{ + const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->IsOverlayCommandButtonVisible(); +} + +result +EditArea::HideKeypad(void) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->HideKeypad(); +} + +int +EditArea::GetTextSize(void) const +{ + const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->GetTextSize(); +} + +float +EditArea::GetTextSizeF(void) const +{ + const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->GetTextSizeF(); +} + +result +EditArea::SetTextSize(int size) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->SetTextSize(size); +} + +result +EditArea::SetTextSize(float size) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->SetTextSize(size); +} + +Color +EditArea::GetColor(EditStatus status) const +{ + const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->GetColor(status); +} + +Color +EditArea::GetTextColor(EditTextColor type) const +{ + const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->GetTextColor(type); +} + +result +EditArea::SetBackgroundBitmap(EditStatus status, const Bitmap& bitmap) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->SetBackgroundBitmap(status, bitmap); +} + +result +EditArea::SetColor(EditStatus status, const Color& color) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->SetColor(status, color); +} + +result +EditArea::SetTextColor(EditTextColor type, const Color& color) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->SetTextColor(type, color); +} + +String +EditArea::GetText(int start, int end) const +{ + const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->GetText(start, end); +} + +void +EditArea::AddUiLinkEventListener(IUiLinkEventListener& listener) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pEditAreaImpl->AddUiLinkEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +EditArea::RemoveUiLinkEventListener(IUiLinkEventListener& listener) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pEditAreaImpl->RemoveUiLinkEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +EditArea::AddKeypadEventListener(IKeypadEventListener& listener) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pEditAreaImpl->AddKeypadEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +EditArea::RemoveKeypadEventListener(IKeypadEventListener& listener) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pEditAreaImpl->RemoveKeypadEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +EditArea::AddTextBlockEventListener(ITextBlockEventListener& listener) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pEditAreaImpl->AddTextBlockEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +EditArea::RemoveTextBlockEventListener(ITextBlockEventListener& listener) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pEditAreaImpl->RemoveTextBlockEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +EditArea::AddTextEventListener(ITextEventListener& listener) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pEditAreaImpl->AddTextEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +EditArea::RemoveTextEventListener(ITextEventListener& listener) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pEditAreaImpl->RemoveTextEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +EditArea::AddScrollPanelEventListener(IScrollPanelEventListener& listener) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pEditAreaImpl->AddScrollPanelEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +EditArea::RemoveScrollPanelEventListener(IScrollPanelEventListener& listener) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pEditAreaImpl->RemoveScrollPanelEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +EditArea::AddActionEventListener(IActionEventListener& listener) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pEditAreaImpl->AddActionEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +EditArea::RemoveActionEventListener(IActionEventListener& listener) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pEditAreaImpl->RemoveActionEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +EditArea::AddLanguageEventListener(ILanguageEventListener& listener) +{ + result r = E_SUCCESS; + + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + r = pEditAreaImpl->AddLanguageEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +EditArea::RemoveLanguageEventListener(ILanguageEventListener& listener) +{ + result r = E_SUCCESS; + + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + r = pEditAreaImpl->RemoveLanguageEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +int +EditArea::GetRemainingLength(void) const +{ + const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->GetRemainingLength(); +} + +void +EditArea::SetLowerCaseModeEnabled(bool enable) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + pEditAreaImpl->SetLowerCaseModeEnabled(enable); +} + +bool +EditArea::IsLowerCaseModeEnabled(void) const +{ + const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->IsLowerCaseModeEnabled(); +} + +result +EditArea::SetInputModeCategory(unsigned long categories, bool enable) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->SetInputModeCategory(categories, enable); +} + +result +EditArea::SetCurrentInputModeCategory(EditInputModeCategory inputModeCategory) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->SetCurrentInputModeCategory(inputModeCategory); +} + +unsigned long +EditArea::GetInputModeCategory(void) const +{ + const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->GetInputModeCategory(); +} + +EditInputModeCategory +EditArea::GetCurrentInputModeCategory(void) const +{ + const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->GetCurrentInputModeCategory(); +} + +result +EditArea::SetCursorPosition(int position) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->SetCursorPosition(position); +} + +int +EditArea::GetCursorPosition(void) const +{ + const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->GetCursorPosition(); +} + +String +EditArea::GetText(void) const +{ + const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->GetText(); +} + +int +EditArea::GetTextLength(void) const +{ + const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->GetTextLength(); +} + +result +EditArea::SetText(const String& text) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->SetText(text); +} + +result +EditArea::InsertTextAtCursorPosition(const String& text) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->InsertTextAtCursorPosition(text); +} + +result +EditArea::AppendText(const String& text) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->AppendText(text); +} + +result +EditArea::AppendCharacter(const Character& character) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->AppendCharacter(character); +} + +result +EditArea::InsertTextAt(int position, const String& text, const Bitmap& textImage) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->InsertTextAt(position, text, textImage); +} + +result +EditArea::AppendText(const String& text, const Bitmap& textImage) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->AppendText(text, textImage); +} + +result +EditArea::Clear(void) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->Clear(); +} + +result +EditArea::DeleteCharacterAtCursorPosition(void) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->DeleteCharacterAtCursorPosition(); +} + +void +EditArea::GetCurrentTextRange(int& start, int& end) const +{ + const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->GetCurrentTextRange(start, end); +} + +void +EditArea::SetGuideText(const String& guideText) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->SetGuideText(guideText); +} + +String +EditArea::GetGuideText(void) const +{ + const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->GetGuideText(); +} + +Color +EditArea::GetGuideTextColor(void) const +{ + const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->GetGuideTextColor(); +} + +result +EditArea::SetGuideTextColor(const Color& color) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->SetGuideTextColor(color); +} + +void +EditArea::SetKeypadEnabled(bool enable) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + pEditAreaImpl->SetKeypadEnabled(enable); + + return; +} + +bool +EditArea::IsKeypadEnabled(void) const +{ + const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->IsKeypadEnabled(); +} + +result +EditArea::ShowKeypad(void) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->ShowKeypad(); +} + +int +EditArea::GetTextLineCount(void) const +{ + const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->GetTextLineCount(); +} + +void +EditArea::GetBlockRange(int& start, int& end) const +{ + const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + pEditAreaImpl->GetBlockRange(start, end); +} + +result +EditArea::BeginBlock(void) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->BeginBlock(); +} + +result +EditArea::ReleaseBlock(void) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->ReleaseBlock(); +} + +bool +EditArea::IsBlocked(void) const +{ + const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->IsBlocked(); +} + +result +EditArea::Copy(void) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->Copy(); +} + +result +EditArea::Cut(void) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->Cut(); +} + +result +EditArea::Paste(void) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->Paste(); +} + +result +EditArea::Remove(void) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->Remove(); +} + +bool +EditArea::IsClipped(void) const +{ + const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->IsClipped(); +} + +result +EditArea::SetOverlayKeypadCommandButton(CommandButtonPosition position, const String& text, int actionId) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->SetOverlayKeypadCommandButton(position, text, actionId); +} + +String +EditArea::GetOverlayKeypadCommandButtonText(CommandButtonPosition position) const +{ + const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->GetOverlayKeypadCommandButtonText(position); +} + +int +EditArea::GetOverlayKeypadCommandButtonActionId(CommandButtonPosition position) const +{ + const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->GetOverlayKeypadCommandButtonActionId(position); +} + +result +EditArea::SetCurrentLanguage(LanguageCode languageCode) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->SetCurrentLanguage(languageCode); +} + +result +EditArea::GetCurrentLanguage(LanguageCode& language) const +{ + const _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditAreaImpl->GetCurrentLanguage(language); +} + +void +EditArea::SetEditTextFilter(IEditTextFilter* pFilter) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + pEditAreaImpl->SetEditTextFilter(pFilter); + return; +} + +void +EditArea::SendOpaqueCommand (const String& command) +{ + _EditAreaImpl* pEditAreaImpl = _EditAreaImpl::GetInstance(*this); + SysAssertf(pEditAreaImpl != null, "Not yet constructed. Construct() should be called before use."); + + pEditAreaImpl->SendOpaqueCommand(command); + + return; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlEditDate.cpp b/src/ui/controls/FUiCtrlEditDate.cpp new file mode 100644 index 0000000..58d4a14 --- /dev/null +++ b/src/ui/controls/FUiCtrlEditDate.cpp @@ -0,0 +1,216 @@ +// +// 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 FUiCtrlEditDate.cpp +* @brief This file contains implementation of EditDate class +*/ + +#include +#include +#include "FUiCtrl_EditDateImpl.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Base; +using namespace Tizen::Ui; + +namespace Tizen { namespace Ui { namespace Controls +{ + +EditDate::EditDate(void) +{ +} + +EditDate::~EditDate(void) +{ +} + +result +EditDate::Construct(const Point& point, const String& title) +{ + _EditDateImpl* pEditDateImpl = _EditDateImpl::GetInstance(*this); + SysAssertf((pEditDateImpl == null), + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pEditDateImpl = _EditDateImpl::CreateEditDateImplN(this, point, title); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pEditDateImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlImpl = pEditDateImpl; + + return r; +} + +result +EditDate::Construct(const FloatPoint& point, const String& title) +{ + _EditDateImpl* pEditDateImpl = _EditDateImpl::GetInstance(*this); + SysAssertf((pEditDateImpl == null), + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pEditDateImpl = _EditDateImpl::CreateEditDateImplFN(this, point, title); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pEditDateImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlImpl = pEditDateImpl; + + return r; +} + +void +EditDate::AddDateChangeEventListener(IDateChangeEventListener& listener) +{ + _EditDateImpl* pEditDateImpl = _EditDateImpl::GetInstance(*this); + SysAssertf((pEditDateImpl != null), "Not yet constructed. Construct() should be called before use."); + + result r = pEditDateImpl->AddDateChangeEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + return; +} + +void +EditDate::RemoveDateChangeEventListener(IDateChangeEventListener& listener) +{ + _EditDateImpl* pEditDateImpl = _EditDateImpl::GetInstance(*this); + SysAssertf((pEditDateImpl != null), "Not yet constructed. Construct() should be called before use."); + + result r = pEditDateImpl->RemoveDateChangeEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + return; +} + +DateTime +EditDate::GetDate(void) const +{ + const _EditDateImpl* pEditDateImpl = _EditDateImpl::GetInstance(*this); + SysAssertf((pEditDateImpl != null), "Not yet constructed. Construct() should be called before use."); + + return pEditDateImpl->GetDate(); +} + +int +EditDate::GetDay(void) const +{ + const _EditDateImpl* pEditDateImpl = _EditDateImpl::GetInstance(*this); + SysAssertf((pEditDateImpl != null), "Not yet constructed. Construct() should be called before use."); + + return pEditDateImpl->GetDay(); +} + +int +EditDate::GetMonth(void) const +{ + const _EditDateImpl* pEditDateImpl = _EditDateImpl::GetInstance(*this); + SysAssertf((pEditDateImpl != null), "Not yet constructed. Construct() should be called before use."); + + return pEditDateImpl->GetMonth(); +} + +int +EditDate::GetYear(void) const +{ + const _EditDateImpl* pEditDateImpl = _EditDateImpl::GetInstance(*this); + SysAssertf((pEditDateImpl != null), "Not yet constructed. Construct() should be called before use."); + + return pEditDateImpl->GetYear(); +} + +void +EditDate::SetDate(const DateTime& date) +{ + _EditDateImpl* pEditDateImpl = _EditDateImpl::GetInstance(*this); + SysAssertf((pEditDateImpl != null), "Not yet constructed. Construct() should be called before use."); + + pEditDateImpl->SetDate(date); + return; +} + +void +EditDate::SetCurrentDate(void) +{ + _EditDateImpl* pEditDateImpl = _EditDateImpl::GetInstance(*this); + SysAssertf((pEditDateImpl != null), "Not yet constructed. Construct() should be called before use."); + + pEditDateImpl->SetCurrentDate(); + return; +} + +result +EditDate::SetYear(int year) +{ + _EditDateImpl* pEditDateImpl = _EditDateImpl::GetInstance(*this); + SysAssertf((pEditDateImpl != null), "Not yet constructed. Construct() should be called before use."); + + return pEditDateImpl->SetYear(year); +} + +result +EditDate::SetMonth(int month) +{ + _EditDateImpl* pEditDateImpl = _EditDateImpl::GetInstance(*this); + SysAssertf((pEditDateImpl != null), "Not yet constructed. Construct() should be called before use."); + + return pEditDateImpl->SetMonth(month); +} + +result +EditDate::SetDay(int day) +{ + _EditDateImpl* pEditDateImpl = _EditDateImpl::GetInstance(*this); + SysAssertf((pEditDateImpl != null), "Not yet constructed. Construct() should be called before use."); + + return pEditDateImpl->SetDay(day); +} + +void +EditDate::SetDatePickerEnabled(bool enable) +{ + _EditDateImpl* pEditDateImpl = _EditDateImpl::GetInstance(*this); + SysAssertf((pEditDateImpl != null), "Not yet constructed. Construct() should be called before use."); + + pEditDateImpl->SetDatePickerEnabled(enable); + return; +} + +bool +EditDate::IsDatePickerEnabled(void) const +{ + const _EditDateImpl* pEditDateImpl = _EditDateImpl::GetInstance(*this); + SysAssertf((pEditDateImpl != null), "Not yet constructed. Construct() should be called before use."); + + return pEditDateImpl->IsDatePickerEnabled(); +} + +result +EditDate::SetYearRange(int minYear, int maxYear) +{ + _EditDateImpl* pEditDateImpl = _EditDateImpl::GetInstance(*this); + SysAssertf((pEditDateImpl != null), "Not yet constructed. Construct() should be called before use."); + + return pEditDateImpl->SetYearRange(minYear, maxYear); +} + +result +EditDate::GetYearRange(int& minYear, int& maxYear) const +{ + const _EditDateImpl* pEditDateImpl = _EditDateImpl::GetInstance(*this); + SysAssertf((pEditDateImpl != null), "Not yet constructed. Construct() should be called before use."); + + return pEditDateImpl->GetYearRange(minYear, maxYear); +} + +}}} //Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlEditField.cpp b/src/ui/controls/FUiCtrlEditField.cpp new file mode 100644 index 0000000..4636ede --- /dev/null +++ b/src/ui/controls/FUiCtrlEditField.cpp @@ -0,0 +1,1058 @@ +// +// 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 FUiCtrlEditField.cpp + * @brief This file contains implementation of EditField class + */ + +#include +#include +#include "FUiCtrl_EditFieldImpl.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Utility; +using namespace Tizen::Graphics; +using namespace Tizen::Locales; +using namespace Tizen::Security; +using namespace Tizen::Ui; + +namespace Tizen { namespace Ui { namespace Controls +{ + +EditField::EditField(void) +{ +} + +EditField::~EditField(void) +{ +} + +result +EditField::Construct(const Rectangle& rect, EditFieldStyle style, InputStyle inputStyle, bool showTitle, + int limitLength, + GroupStyle groupStyle) +{ + result r = E_SUCCESS; + + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + EditFieldTitleStyle titleStyle = EDIT_FIELD_TITLE_STYLE_NONE; + bool enableClear = false; + + if (showTitle == true) + { + titleStyle = EDIT_FIELD_TITLE_STYLE_TOP; + } + + pEditFieldImpl = _EditFieldImpl::CreateEditFieldImplN(this, rect, style, titleStyle); + if (pEditFieldImpl == null) + { + r = GetLastResult(); + return r; + } + + _pControlImpl = pEditFieldImpl; + + r = pEditFieldImpl->Initialize(style, inputStyle, titleStyle, enableClear, limitLength, groupStyle); + if (r != E_SUCCESS) + { + goto CATCH; + } + + SetBounds(rect.x, rect.y, rect.width, rect.height); + + return r; + +CATCH: + delete pEditFieldImpl; + _pControlImpl = null; + + return r; +} + +result +EditField::Construct(const FloatRectangle& rect, EditFieldStyle style, InputStyle inputStyle, bool showTitle, + int limitLength, + GroupStyle groupStyle) +{ + result r = E_SUCCESS; + + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + EditFieldTitleStyle titleStyle = EDIT_FIELD_TITLE_STYLE_NONE; + bool enableClear = false; + + if (showTitle == true) + { + titleStyle = EDIT_FIELD_TITLE_STYLE_TOP; + } + + pEditFieldImpl = _EditFieldImpl::CreateEditFieldImplN(this, rect, style, titleStyle); + if (pEditFieldImpl == null) + { + r = GetLastResult(); + return r; + } + + _pControlImpl = pEditFieldImpl; + + r = pEditFieldImpl->Initialize(style, inputStyle, titleStyle, enableClear, limitLength, groupStyle); + if (r != E_SUCCESS) + { + goto CATCH; + } + + SetBounds(rect.x, rect.y, rect.width, rect.height); + + return r; + +CATCH: + delete pEditFieldImpl; + _pControlImpl = null; + + return r; +} + +result +EditField::Construct(const Rectangle& rect, EditFieldStyle style, InputStyle inputStyle, + EditFieldTitleStyle titleStyle, bool enableClear, int limitLength, + GroupStyle groupStyle) +{ + result r = E_SUCCESS; + + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pEditFieldImpl = _EditFieldImpl::CreateEditFieldImplN(this, rect, style, titleStyle); + if (pEditFieldImpl == null) + { + r = GetLastResult(); + return r; + } + + _pControlImpl = pEditFieldImpl; + + r = pEditFieldImpl->Initialize(style, inputStyle, titleStyle, enableClear, limitLength, groupStyle); + if (r != E_SUCCESS) + { + goto CATCH; + } + + r = SetBounds(rect.x, rect.y, rect.width, rect.height); + if (r != E_SUCCESS) + { + goto CATCH; + } + + return r; + +CATCH: + delete pEditFieldImpl; + _pControlImpl = null; + + return r; +} + +result +EditField::Construct(const FloatRectangle& rect, EditFieldStyle style, InputStyle inputStyle, + EditFieldTitleStyle titleStyle, bool enableClear, int limitLength, + GroupStyle groupStyle) +{ + result r = E_SUCCESS; + + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pEditFieldImpl = _EditFieldImpl::CreateEditFieldImplN(this, rect, style, titleStyle); + if (pEditFieldImpl == null) + { + r = GetLastResult(); + return r; + } + + _pControlImpl = pEditFieldImpl; + + r = pEditFieldImpl->Initialize(style, inputStyle, titleStyle, enableClear, limitLength, groupStyle); + if (r != E_SUCCESS) + { + goto CATCH; + } + + r = SetBounds(rect.x, rect.y, rect.width, rect.height); + if (r != E_SUCCESS) + { + goto CATCH; + } + + return r; + +CATCH: + delete pEditFieldImpl; + _pControlImpl = null; + + return r; +} + +HorizontalAlignment +EditField::GetTextAlignment(void) const +{ + const _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->GetTextAlignment(); +} + +result +EditField::SetTextAlignment(HorizontalAlignment alignment) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->SetTextAlignment(alignment); +} + +bool +EditField::IsViewModeEnabled(void) const +{ + const _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->IsViewModeEnabled(); +} + +result +EditField::SetViewModeEnabled(bool enable) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->SetViewModeEnabled(enable); +} + +result +EditField::SetAutoLinkMask(unsigned long autoLinks) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->SetAutoLinkMask(autoLinks); +} + +unsigned long +EditField::GetAutoLinkMask(void) const +{ + const _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->GetAutoLinkMask(); +} + +int +EditField::GetMargin(EditMarginType marginType) const +{ + const _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->GetMargin(marginType); +} + +float +EditField::GetMarginF(EditMarginType marginType) const +{ + const _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->GetMarginF(marginType); +} + +result +EditField::SetMargin(EditMarginType marginType, int margin) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->SetMargin(marginType, margin); +} + +result +EditField::SetMargin(EditMarginType marginType, float margin) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->SetMargin(marginType, margin); +} + +result +EditField::SetKeypadActionEnabled(bool enable) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->SetKeypadActionEnabled(enable); +} + +bool +EditField::IsKeypadActionEnabled(void) const +{ + const _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->IsKeypadActionEnabled(); +} + +KeypadAction +EditField::GetKeypadAction(void) const +{ + const _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->GetKeypadAction(); +} + +result +EditField::SetKeypadAction(KeypadAction keypadAction) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->SetKeypadAction(keypadAction); +} + +result +EditField::SetOverlayKeypadCommandButtonVisible(bool visible) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->SetOverlayKeypadCommandButtonVisible(visible); +} + +bool +EditField::IsOverlayCommandButtonVisible(void) const +{ + const _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->IsOverlayCommandButtonVisible(); +} + +result +EditField::HideKeypad(void) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->HideKeypad(); +} + +EllipsisPosition +EditField::GetEllipsisPosition(void) const +{ + const _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->GetEllipsisPosition(); +} + +result +EditField::SetEllipsisPosition(EllipsisPosition position) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->SetEllipsisPosition(position); +} + +int +EditField::GetTextSize(void) const +{ + const _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->GetTextSize(); +} + +float +EditField::GetTextSizeF(void) const +{ + const _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->GetTextSizeF(); +} + +result +EditField::SetTextSize(int size) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->SetTextSize(size); +} + +result +EditField::SetTextSize(float size) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->SetTextSize(size); +} + +Color +EditField::GetColor(EditStatus status) const +{ + const _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->GetColor(status); +} + +Color +EditField::GetTextColor(EditTextColor type) const +{ + const _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->GetTextColor(type); +} + +result +EditField::SetBackgroundBitmap(EditStatus status, const Bitmap& bitmap) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->SetBackgroundBitmap(status, bitmap); +} + +result +EditField::SetColor(EditStatus status, const Color& color) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->SetColor(status, color); +} + +result +EditField::SetTextColor(EditTextColor type, const Color& color) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->SetTextColor(type, color); +} + +String +EditField::GetText(int start, int end) const +{ + const _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->GetText(start, end); +} + +void +EditField::AddUiLinkEventListener(IUiLinkEventListener& listener) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pEditFieldImpl->AddUiLinkEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +EditField::RemoveUiLinkEventListener(IUiLinkEventListener& listener) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pEditFieldImpl->RemoveUiLinkEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +EditField::AddKeypadEventListener(IKeypadEventListener& listener) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pEditFieldImpl->AddKeypadEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +EditField::RemoveKeypadEventListener(IKeypadEventListener& listener) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pEditFieldImpl->RemoveKeypadEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +EditField::AddTextBlockEventListener(ITextBlockEventListener& listener) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pEditFieldImpl->AddTextBlockEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +EditField::RemoveTextBlockEventListener(ITextBlockEventListener& listener) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pEditFieldImpl->RemoveTextBlockEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +EditField::AddTextEventListener(ITextEventListener& listener) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + pEditFieldImpl->AddTextEventListener(listener); +} + +void +EditField::RemoveTextEventListener(ITextEventListener& listener) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + pEditFieldImpl->RemoveTextEventListener(listener); +} + +void +EditField::AddScrollPanelEventListener(IScrollPanelEventListener& listener) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pEditFieldImpl->AddScrollPanelEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +EditField::RemoveScrollPanelEventListener(IScrollPanelEventListener& listener) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pEditFieldImpl->RemoveScrollPanelEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +EditField::AddActionEventListener(IActionEventListener& listener) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pEditFieldImpl->AddActionEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +EditField::RemoveActionEventListener(IActionEventListener& listener) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pEditFieldImpl->RemoveActionEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +EditField::AddLanguageEventListener(ILanguageEventListener& listener) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + pEditFieldImpl->AddLanguageEventListener(listener); +} + +void +EditField::RemoveLanguageEventListener(ILanguageEventListener& listener) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + pEditFieldImpl->RemoveLanguageEventListener(listener); +} + +int +EditField::GetRemainingLength(void) const +{ + const _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->GetRemainingLength(); +} + +void +EditField::SetLowerCaseModeEnabled(bool enable) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + pEditFieldImpl->SetLowerCaseModeEnabled(enable); +} + +bool +EditField::IsLowerCaseModeEnabled(void) const +{ + const _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->IsLowerCaseModeEnabled(); +} + +result +EditField::SetInputModeCategory(unsigned long categories, bool enable) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->SetInputModeCategory(categories, enable); +} + +result +EditField::SetCurrentInputModeCategory(EditInputModeCategory inputModeCategory) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->SetCurrentInputModeCategory(inputModeCategory); +} + +unsigned long +EditField::GetInputModeCategory(void) const +{ + const _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->GetInputModeCategory(); +} + +EditInputModeCategory +EditField::GetCurrentInputModeCategory(void) const +{ + const _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->GetCurrentInputModeCategory(); +} + +result +EditField::SetCursorPosition(int position) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->SetCursorPosition(position); +} + +int +EditField::GetCursorPosition(void) const +{ + const _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->GetCursorPosition(); +} + +String +EditField::GetText(void) const +{ + const _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->GetText(); +} + +int +EditField::GetTextLength(void) const +{ + const _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->GetTextLength(); +} + +result +EditField::SetText(const String& text) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->SetText(text); +} + +result +EditField::InsertTextAtCursorPosition(const String& text) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->InsertTextAtCursorPosition(text); +} + +result +EditField::AppendText(const String& text) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->AppendText(text); +} + +result +EditField::AppendCharacter(const Character& character) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->AppendCharacter(character); +} + +result +EditField::Clear(void) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->Clear(); +} + +result +EditField::DeleteCharacterAtCursorPosition(void) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->DeleteCharacterAtCursorPosition(); +} + +void +EditField::GetCurrentTextRange(int& start, int& end) const +{ + const _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->GetCurrentTextRange(start, end); +} + +void +EditField::SetGuideText(const String& guideText) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->SetGuideText(guideText); +} + +String +EditField::GetGuideText(void) const +{ + const _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->GetGuideText(); +} + +Color +EditField::GetGuideTextColor(void) const +{ + const _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->GetGuideTextColor(); +} + +result +EditField::SetGuideTextColor(const Color& color) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->SetGuideTextColor(color); +} + +void +EditField::SetKeypadEnabled(bool enable) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + pEditFieldImpl->SetKeypadEnabled(enable); + + return; +} + +bool +EditField::IsKeypadEnabled(void) const +{ + const _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->IsKeypadEnabled(); +} + +bool +EditField::IsTextPredictionEnabled(void) const +{ + const _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->IsTextPredictionEnabled(); +} + +result +EditField::SetTextPredictionEnabled(bool enable) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->SetTextPredictionEnabled(enable); +} + +result +EditField::ShowKeypad(void) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->ShowKeypad(); +} + +void +EditField::GetBlockRange(int& start, int& end) const +{ + const _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + pEditFieldImpl->GetBlockRange(start, end); +} + +result +EditField::BeginBlock(void) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->BeginBlock(); +} + +result +EditField::ReleaseBlock(void) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->ReleaseBlock(); +} + +bool +EditField::IsBlocked(void) const +{ + const _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->IsBlocked(); +} + +result +EditField::Copy(void) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->Copy(); +} + +result +EditField::Cut(void) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->Cut(); +} + +result +EditField::Paste(void) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->Paste(); +} + +result +EditField::Remove(void) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->Remove(); +} + +bool +EditField::IsClipped(void) const +{ + const _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->IsClipped(); +} + +result +EditField::SetTitleText(const String& title) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->SetTitleText(title); +} + +String +EditField::GetTitleText(void) const +{ + const _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->GetTitleText(); +} + +result +EditField::SetTitleTextColor(EditStatus status, const Color& color) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->SetTitleTextColor(status, color); +} + +Color +EditField::GetTitleTextColor(EditStatus status) const +{ + const _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->GetTitleTextColor(status); +} + +result +EditField::SetOverlayKeypadCommandButton(CommandButtonPosition position, const String& text, int actionId) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->SetOverlayKeypadCommandButton(position, text, actionId); +} + +String +EditField::GetOverlayKeypadCommandButtonText(CommandButtonPosition position) const +{ + const _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->GetOverlayKeypadCommandButtonText(position); +} + +int +EditField::GetOverlayKeypadCommandButtonActionId(CommandButtonPosition position) const +{ + const _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->GetOverlayKeypadCommandButtonActionId(position); +} + +result +EditField::SetCurrentLanguage(LanguageCode languageCode) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->SetCurrentLanguage(languageCode); +} + +result +EditField::GetCurrentLanguage(LanguageCode& language) const +{ + const _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->GetCurrentLanguage(language); +} + +void +EditField::SetEditTextFilter(IEditTextFilter* pFilter) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + pEditFieldImpl->SetEditTextFilter(pFilter); + + return; +} + +void +EditField::SendOpaqueCommand (const String& command) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + pEditFieldImpl->SendOpaqueCommand(command); + + return; +} + +result +EditField::SetPasswordVisible(bool visible) +{ + _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->SetPasswordVisible(visible); +} + +bool +EditField::IsPasswordVisible(void) const +{ + const _EditFieldImpl* pEditFieldImpl = _EditFieldImpl::GetInstance(*this); + SysAssertf(pEditFieldImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pEditFieldImpl->IsPasswordVisible(); +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlEditTime.cpp b/src/ui/controls/FUiCtrlEditTime.cpp new file mode 100644 index 0000000..4660730 --- /dev/null +++ b/src/ui/controls/FUiCtrlEditTime.cpp @@ -0,0 +1,188 @@ +// +// 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 FUiCtrlEditTime.cpp +* @brief This file contains implementation of EditTime class +*/ + +#include +#include +#include "FUiCtrl_EditTimeImpl.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Base; +using namespace Tizen::Ui; + +namespace Tizen { namespace Ui { namespace Controls +{ + +EditTime::EditTime(void) +{ +} + +EditTime::~EditTime(void) +{ +} + +result +EditTime::Construct(const Point& point, const String& title) +{ + _EditTimeImpl* pEditTimeImpl = _EditTimeImpl::GetInstance(*this); + SysAssertf((pEditTimeImpl == null), + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pEditTimeImpl = _EditTimeImpl::CreateEditTimeImplN(this, point, title); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pEditTimeImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlImpl = pEditTimeImpl; + + return r; +} + +result +EditTime::Construct(const FloatPoint& point, const String& title) +{ + _EditTimeImpl* pEditTimeImpl = _EditTimeImpl::GetInstance(*this); + SysAssertf((pEditTimeImpl == null), + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pEditTimeImpl = _EditTimeImpl::CreateEditTimeImplFN(this, point, title); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pEditTimeImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlImpl = pEditTimeImpl; + + return r; +} + +void +EditTime::AddTimeChangeEventListener(ITimeChangeEventListener& listener) +{ + _EditTimeImpl* pEditTimeImpl = _EditTimeImpl::GetInstance(*this); + SysAssertf((pEditTimeImpl != null), "Not yet constructed. Construct() should be called before use."); + + result r = pEditTimeImpl->AddTimeChangeEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +EditTime::RemoveTimeChangeEventListener(ITimeChangeEventListener& listener) +{ + _EditTimeImpl* pEditTimeImpl = _EditTimeImpl::GetInstance(*this); + SysAssertf((pEditTimeImpl != null), "Not yet constructed. Construct() should be called before use."); + + result r = pEditTimeImpl->RemoveTimeChangeEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + return; +} + +DateTime +EditTime::GetTime(void) const +{ + const _EditTimeImpl* pEditTimeImpl = _EditTimeImpl::GetInstance(*this); + SysAssertf((pEditTimeImpl != null), "Not yet constructed. Construct() should be called before use."); + + return pEditTimeImpl->GetTime(); +} + +int +EditTime::GetHour(void) const +{ + const _EditTimeImpl* pEditTimeImpl = _EditTimeImpl::GetInstance(*this); + SysAssertf((pEditTimeImpl != null), "Not yet constructed. Construct() should be called before use."); + + return pEditTimeImpl->GetHour(); +} + +int +EditTime::GetMinute(void) const +{ + const _EditTimeImpl* pEditTimeImpl = _EditTimeImpl::GetInstance(*this); + SysAssertf((pEditTimeImpl != null), "Not yet constructed. Construct() should be called before use."); + + return pEditTimeImpl->GetMinute(); +} + +void +EditTime::SetTime(const DateTime& time) +{ + _EditTimeImpl* pEditTimeImpl = _EditTimeImpl::GetInstance(*this); + SysAssertf((pEditTimeImpl != null), "Not yet constructed. Construct() should be called before use."); + + pEditTimeImpl->SetTime(time); + return; +} + +void +EditTime::SetCurrentTime(void) +{ + _EditTimeImpl* pEditTimeImpl = _EditTimeImpl::GetInstance(*this); + SysAssertf((pEditTimeImpl != null), "Not yet constructed. Construct() should be called before use."); + + pEditTimeImpl->SetCurrentTime(); + return; +} + +result +EditTime::SetHour(int hour) +{ + _EditTimeImpl* pEditTimeImpl = _EditTimeImpl::GetInstance(*this); + SysAssertf((pEditTimeImpl != null), "Not yet constructed. Construct() should be called before use."); + + return pEditTimeImpl->SetHour(hour); +} + +result +EditTime::SetMinute(int minute) +{ + _EditTimeImpl* pEditTimeImpl = _EditTimeImpl::GetInstance(*this); + SysAssertf((pEditTimeImpl != null), "Not yet constructed. Construct() should be called before use."); + + return pEditTimeImpl->SetMinute(minute); +} + +void +EditTime::SetTimePickerEnabled(bool enable) +{ + _EditTimeImpl* pEditTimeImpl = _EditTimeImpl::GetInstance(*this); + SysAssertf((pEditTimeImpl != null), "Not yet constructed. Construct() should be called before use."); + + pEditTimeImpl->SetTimePickerEnabled(enable); + return; +} + +bool +EditTime::IsTimePickerEnabled(void) const +{ + const _EditTimeImpl* pEditTimeImpl = _EditTimeImpl::GetInstance(*this); + SysAssertf((pEditTimeImpl != null), "Not yet constructed. Construct() should be called before use."); + + return pEditTimeImpl->IsTimePickerEnabled(); +} + +void +EditTime::Set24HourNotationEnabled(bool enable) +{ + _EditTimeImpl* pEditTimeImpl = _EditTimeImpl::GetInstance(*this); + SysAssertf((pEditTimeImpl != null), "Not yet constructed. Construct() should be called before use."); + + return pEditTimeImpl->Set24HourNotationEnabled(enable); +} + +}}} //Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlExpandableEditArea.cpp b/src/ui/controls/FUiCtrlExpandableEditArea.cpp new file mode 100644 index 0000000..c743c08 --- /dev/null +++ b/src/ui/controls/FUiCtrlExpandableEditArea.cpp @@ -0,0 +1,993 @@ +// +// 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 FUiCtrlExpandableEditArea.cpp + * @brief This file contains implementation of ExpandableEditArea class + */ + +#include +#include +#include "FUiCtrl_ExpandableEditAreaImpl.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Graphics; +using namespace Tizen::Locales; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; + +static const int MINIMUM_SIZE_VALUE = 0; +static const int MAXIMUM_SIZE_VALUE = 65535; +static const int MAX_EXPANDABLE_LINES = 100; + +namespace Tizen { namespace Ui { namespace Controls +{ + +ExpandableEditArea::ExpandableEditArea(void) +{ + // Nothing. +} + +ExpandableEditArea::~ExpandableEditArea(void) +{ + // Nothing. +} + +result +ExpandableEditArea::Construct(const Rectangle& rect, ExpandableEditAreaStyle style, + ExpandableEditAreaTitleStyle titleStyle, + int maxExpandableLines) +{ + result r = E_SUCCESS; + + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + SysTryReturnResult(NID_UI_CTRL, (maxExpandableLines > 0), E_INVALID_ARG, "Invalid argument is used. maxExpandableLines is less than zero"); + SysTryReturnResult(NID_UI_CTRL, (maxExpandableLines <= MAX_EXPANDABLE_LINES), E_MAX_EXCEEDED, "maxExpandableLines exceeds the maximum limit."); + + SysTryReturnResult(NID_UI_CTRL, !(style == EXPANDABLE_EDIT_AREA_STYLE_TOKEN && titleStyle == EXPANDABLE_EDIT_AREA_TITLE_STYLE_TOP), + 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." + , rect.width, rect.height, MINIMUM_SIZE_VALUE, MINIMUM_SIZE_VALUE, MAXIMUM_SIZE_VALUE, MAXIMUM_SIZE_VALUE); + + pImpl = _ExpandableEditAreaImpl::CreateExpandableEditAreaImplN(this, rect, style, titleStyle); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, pImpl != null, , r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlImpl = pImpl; + + r = SetBounds(rect); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pImpl->Construct(rect, style, titleStyle, maxExpandableLines); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + +CATCH: + Control::Dispose(); + return r; +} + + +result +ExpandableEditArea::Construct(const FloatRectangle& rect, ExpandableEditAreaStyle style, + ExpandableEditAreaTitleStyle titleStyle, + int maxExpandableLines) +{ + + result r = E_SUCCESS; + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + + SysAssertf(pImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + SysTryReturnResult(NID_UI_CTRL, (maxExpandableLines > 0), E_INVALID_ARG, "Invalid argument is used. maxExpandableLines is less than zero"); + SysTryReturnResult(NID_UI_CTRL, (maxExpandableLines <= MAX_EXPANDABLE_LINES), E_MAX_EXCEEDED, "maxExpandableLines exceeds the maximum limit."); + SysTryReturnResult(NID_UI_CTRL, !(style == EXPANDABLE_EDIT_AREA_STYLE_TOKEN && titleStyle == EXPANDABLE_EDIT_AREA_TITLE_STYLE_TOP), + 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(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); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, pImpl != null, , r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlImpl = pImpl; + + r = SetBounds(rect); + + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + r = pImpl->Construct(rect, style, titleStyle, maxExpandableLines); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + +CATCH: + Control::Dispose(); + return r; +} + +result +ExpandableEditArea::AppendCharacter(const Character& character) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->AppendCharacter(character); +} + +result +ExpandableEditArea::AppendText(const String& text) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->AppendText(text); +} + +result +ExpandableEditArea::AppendText(const String& text, const Bitmap& textImage) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->AppendText(text, textImage); +} + +result +ExpandableEditArea::DeleteCharacterAt(int index) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->DeleteCharacterAt(index); +} + +result +ExpandableEditArea::InsertCharacterAt(int index, const Character& character) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->InsertCharacterAt(index, character); +} + +result +ExpandableEditArea::InsertTextAt(int index, const String& text) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->InsertTextAt(index, text); +} + +result +ExpandableEditArea::InsertTextAt(int position, const String& text, const Bitmap& textImage) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->InsertTextAt(position, text, textImage); +} + +String +ExpandableEditArea::GetText(int start, int end) const +{ + const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetText(start, end); +} + +String +ExpandableEditArea::GetText(void) const +{ + const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetText(); +} + +int +ExpandableEditArea::GetTextLength(void) const +{ + const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetTextLength(); +} + +result +ExpandableEditArea::SetText(const String& text) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetText(text); +} + +result +ExpandableEditArea::Clear(void) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->Clear(); +} + +result +ExpandableEditArea::SetTitleText(const String& title) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetTitleText(title); +} + +String +ExpandableEditArea::GetTitleText(void) const +{ + const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetTitleText(); +} + +String +ExpandableEditArea::GetGuideText(void) const +{ + const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetGuideText(); +} + +result +ExpandableEditArea::SetGuideText(const String& guideText) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetGuideText(guideText); +} + +int +ExpandableEditArea::GetLineSpacing (void) const +{ + const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetLineSpacing(); +} + +float +ExpandableEditArea::GetLineSpacingF(void) const +{ + + const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetLineSpacingF(); +} + +result +ExpandableEditArea::SetLineSpacing (int multiplier, int extra) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetLineSpacing(multiplier, extra); +} + +result +ExpandableEditArea::SetLineSpacing(int multiplier, float extra) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetLineSpacing(multiplier, extra); +} +int +ExpandableEditArea::GetMaxLineCount(void) const +{ + const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetMaxLineCount(); +} + +int +ExpandableEditArea::GetTextLineCount(void) const +{ + const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetTextLineCount(); +} + +int +ExpandableEditArea::GetTextSize(void) const +{ + const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetTextSize(); +} + +float +ExpandableEditArea::GetTextSizeF(void) const +{ + const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetTextSizeF(); +} + +result +ExpandableEditArea::SetTextSize(int size) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetTextSize(size); +} + +result +ExpandableEditArea::SetTextSize(float size) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetTextSize(size); +} + +int +ExpandableEditArea::GetMargin(EditMarginType marginType) const +{ + const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetMargin(marginType); +} + +float +ExpandableEditArea::GetMarginF(EditMarginType marginType) const +{ + const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetMarginF(marginType); +} + +result +ExpandableEditArea::SetMargin(EditMarginType marginType, int margin) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetMargin(marginType, margin); +} + +result +ExpandableEditArea::SetMargin(EditMarginType marginType, float margin) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetMargin(marginType, margin); +} + +result +ExpandableEditArea::SetLowerCaseModeEnabled(bool enable) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetLowerCaseModeEnabled(enable); +} + +bool +ExpandableEditArea::IsLowerCaseModeEnabled(void) const +{ + const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsLowerCaseModeEnabled(); +} + +int +ExpandableEditArea::GetCursorPosition(void) const +{ + const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetCursorPosition(); +} + +result +ExpandableEditArea::SetCursorPosition(int position) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetCursorPosition(position); +} + +result +ExpandableEditArea::GetBlockRange(int& start, int& end) const +{ + const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetBlockRange(start, end); +} + +result +ExpandableEditArea::ReleaseBlock(void) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->ReleaseBlock(); +} + +result +ExpandableEditArea::RemoveTextBlock(void) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->RemoveTextBlock(); +} + +result +ExpandableEditArea::SetBlockRange(int start, int end) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetBlockRange(start, end); +} + +KeypadAction +ExpandableEditArea::GetKeypadAction(void) const +{ + const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetKeypadAction(); +} + +KeypadStyle +ExpandableEditArea::GetKeypadStyle(void) const +{ + const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetKeypadStyle(); +} + +result +ExpandableEditArea::HideKeypad(void) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->HideKeypad(); +} + +bool +ExpandableEditArea::IsKeypadEnabled(void) const +{ + const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsKeypadEnabled(); +} + +result +ExpandableEditArea::SetKeypadAction(KeypadAction keypadAction) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetKeypadAction(keypadAction); +} + +result +ExpandableEditArea::SetKeypadStyle(KeypadStyle keypadStyle) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetKeypadStyle(keypadStyle); +} + +bool +ExpandableEditArea::IsTextPredictionEnabled(void) const +{ + const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsTextPredictionEnabled(); +} + +result +ExpandableEditArea::SetTextPredictionEnabled(bool enable) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetTextPredictionEnabled(enable); +} + +result +ExpandableEditArea::SetKeypadEnabled(bool enable) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetKeypadEnabled(enable); + + return E_SUCCESS; +} + +result +ExpandableEditArea::ShowKeypad(void) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->ShowKeypad(); +} + +result +ExpandableEditArea::SetTokenFilter(const ITokenFilter* pFilter) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetTokenFilter(pFilter); +} + +ITokenFilter* +ExpandableEditArea::GetTokenFilter(void) const +{ + const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetTokenFilter(); +} + +result +ExpandableEditArea::AppendToken(const String& token) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->AppendToken(token); +} + +result +ExpandableEditArea::InsertTokenAt(int index, const String& token) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->InsertTokenAt(index, token); +} + +String +ExpandableEditArea::GetTokenAt(int index) const +{ + const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetTokenAt(index); +} + +int +ExpandableEditArea::GetTokenCount(void) const +{ + const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetTokenCount(); +} + +int +ExpandableEditArea::GetSelectedTokenIndex(void) const +{ + const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetSelectedTokenIndex(); +} + +bool +ExpandableEditArea::IsTokenEditModeEnabled(void) const +{ + const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsTokenEditModeEnabled(); +} + +result +ExpandableEditArea::RemoveTokenAt(int index) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->RemoveTokenAt(index); +} + +result +ExpandableEditArea::SetTokenSelected(int index, bool selected) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetTokenSelected(index, selected); +} + +result +ExpandableEditArea::SetTokenEditModeEnabled(bool enable) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetTokenEditModeEnabled(enable); +} + +int +ExpandableEditArea::GetLimitLength(void) const +{ + const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetLimitLength(); +} + +result +ExpandableEditArea::SetLimitLength(int limitLength) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetLimitLength(limitLength); +} + +Color +ExpandableEditArea::GetColor(EditStatus status) const +{ + const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetColor(status); +} + +Color +ExpandableEditArea::GetTextColor(EditTextColor type) const +{ + const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetTextColor(type); +} + +Color +ExpandableEditArea::GetGuideTextColor(void) const +{ + const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetGuideTextColor(); +} + +Color +ExpandableEditArea::GetTitleTextColor(EditStatus status) const +{ + const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetTitleTextColor(status); +} + +Color +ExpandableEditArea::GetTokenColor(ExpandableEditAreaTokenStatus status) const +{ + const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetTokenColor(status); +} + +Color +ExpandableEditArea::GetTokenTextColor(void) const +{ + const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetTokenTextColor(); +} + +Color +ExpandableEditArea::GetSelectedTokenTextColor(void) const +{ + const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetSelectedTokenTextColor(); +} + +result +ExpandableEditArea::SetBackgroundBitmap(EditStatus status, const Bitmap& bitmap) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetBackgroundBitmap(status, bitmap); +} + +result +ExpandableEditArea::SetColor(EditStatus status, const Color& color) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetColor(status, color); +} + +result +ExpandableEditArea::SetGuideTextColor(const Color& color) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetGuideTextColor(color); +} + +result +ExpandableEditArea::SetTitleTextColor(EditStatus status, const Color& color) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetTitleTextColor(status, color); +} + +result +ExpandableEditArea::SetTextColor(EditTextColor type, const Color& color) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetTextColor(type, color); +} + +result +ExpandableEditArea::SetSelectedTokenTextColor(const Color& color) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetSelectedTokenTextColor(color); +} + +result +ExpandableEditArea::SetTokenColor(ExpandableEditAreaTokenStatus status, const Color& color) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetTokenColor(status, color); +} + +result +ExpandableEditArea::SetTokenTextColor(const Color& color) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetTokenTextColor(color); +} + +result +ExpandableEditArea::SetAutoResizingEnabled(bool enable) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetAutoResizingEnabled(enable); +} + +bool +ExpandableEditArea::IsAutoResizingEnabled(void) const +{ + const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsAutoResizingEnabled(); +} + +result +ExpandableEditArea::SetCurrentLanguage(LanguageCode languageCode) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetCurrentLanguage(languageCode); +} + +result +ExpandableEditArea::GetCurrentLanguage(LanguageCode& language) const +{ + const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetCurrentLanguage(language); +} + +void +ExpandableEditArea::AddExpandableEditAreaEventListener(IExpandableEditAreaEventListener& listener) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->AddExpandableEditAreaEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +ExpandableEditArea::AddKeypadEventListener(IKeypadEventListener& listener) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->AddKeypadEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +ExpandableEditArea::AddTextBlockEventListener(ITextBlockEventListener& listener) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->AddTextBlockEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +ExpandableEditArea::AddTextEventListener(ITextEventListener& listener) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->AddTextEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +ExpandableEditArea::RemoveExpandableEditAreaEventListener(IExpandableEditAreaEventListener& listener) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->RemoveExpandableEditAreaEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +ExpandableEditArea::RemoveKeypadEventListener(IKeypadEventListener& listener) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->RemoveKeypadEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +ExpandableEditArea::RemoveTextBlockEventListener(ITextBlockEventListener& listener) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->RemoveTextBlockEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +ExpandableEditArea::RemoveTextEventListener(ITextEventListener& listener) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->RemoveTextEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +ExpandableEditArea::AddLanguageEventListener(ILanguageEventListener& listener) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->AddLanguageEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +ExpandableEditArea::RemoveLanguageEventListener(ILanguageEventListener& listener) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->RemoveLanguageEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +ExpandableEditArea::SetAutoShrinkModeEnabled(bool enable) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetAutoShrinkModeEnabled(enable); +} + +bool +ExpandableEditArea::IsAutoShrinkModeEnabled(void) const +{ + const _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsAutoShrinkModeEnabled(); +} + +void +ExpandableEditArea::SetEditTextFilter(IEditTextFilter* pFilter) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetEditTextFilter(pFilter); + + return; +} + +void +ExpandableEditArea::SendOpaqueCommand(const String& command) +{ + _ExpandableEditAreaImpl* pImpl = _ExpandableEditAreaImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->SendOpaqueCommand(command); + + return; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlExpandableList.cpp b/src/ui/controls/FUiCtrlExpandableList.cpp new file mode 100644 index 0000000..460b77c --- /dev/null +++ b/src/ui/controls/FUiCtrlExpandableList.cpp @@ -0,0 +1,651 @@ +// +// 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 FUiCtrlExpandableList.cpp +* @brief This is the implementation file for FUiCtrlExpandableList class. +* +*/ + +#include +#include +#include "FUiCtrl_CustomListImpl.h" +#include "FUiCtrl_ExpandableListImpl.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; + + +namespace Tizen { namespace Ui { namespace Controls +{ + +ExpandableList::ExpandableList(void) +{ +} + +ExpandableList::~ExpandableList(void) +{ +} + +result +ExpandableList::Construct(const Rectangle& rect, CustomListStyle style, bool itemDivider) +{ + result r = E_SUCCESS; + + _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl == null, "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class"); + + pImpl = _ExpandableListImpl::CreateExpandableListImplN(this, rect, itemDivider); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlImpl = pImpl; + + r = pImpl->UpdateBounds(rect); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pImpl->SetListStyle(style); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[E_SYSTEM] A system error occurred."); + + r = pImpl->Initialize(); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + r = pImpl->LoadDefaultBitmap(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[E_SYSTEM] A system error occurred."); + + ClearLastResult(); + + return E_SUCCESS; + +CATCH: + Dispose(); + return E_SYSTEM; +} + +void +ExpandableList::AddExpandableItemEventListener(IExpandableItemEventListener& listener) +{ + _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->AddExpandableItemEventListener(listener); + + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + SetLastResult(E_SUCCESS); + + return; +} + +void +ExpandableList::RemoveExpandableItemEventListener(IExpandableItemEventListener& listener) +{ + _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->RemoveExpandableItemEventListener(listener); + + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + SetLastResult(E_SUCCESS); + + return; +} + +result +ExpandableList::AddItem(const CustomListItem& item, int itemId) +{ + _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->AddItem(item, itemId); +} + +result +ExpandableList::InsertItemAt(int index, const CustomListItem& item, int itemId) +{ + _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->InsertItemAt(index, item, itemId); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +ExpandableList::SetItemAt(int index, const CustomListItem& item, int itemId) +{ + _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + SetLastResult(E_SUCCESS); + + result r = pImpl->SetItemAt(index, item, itemId); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +ExpandableList::RemoveItemAt(int mainIndex) +{ + _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->RemoveItemAt(mainIndex); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +ExpandableList::RemoveAllItems(void) +{ + _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->RemoveAllItems(); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +const CustomListItem* +ExpandableList::GetItemAt(int index) const +{ + const _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + const CustomListItem* pItem = pImpl->GetCustomListItemAt(index, -1); + return pItem; +} + +result +ExpandableList::AddSubItem(int mainIndex, const CustomListItem& item, int itemId) +{ + _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->AddSubItem(mainIndex, item, itemId); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +ExpandableList::InsertSubItemAt(int mainIndex, int subIndex, const CustomListItem& item, int itemId) +{ + _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->InsertSubItemAt(mainIndex, subIndex, item, itemId); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +ExpandableList::SetSubItemAt(int mainIndex, int subIndex, const CustomListItem& item, int itemId) +{ + _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->SetSubItemAt(mainIndex, subIndex, item, itemId); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +ExpandableList::RemoveSubItemAt(int mainIndex, int subIndex) +{ + _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->RemoveSubItemAt(mainIndex, subIndex); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +ExpandableList::RemoveAllSubItemsAt(int mainIndex) +{ + _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->RemoveAllSubItemsAt(mainIndex); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +int +ExpandableList::GetItemCount(void) const +{ + const _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + SetLastResult(E_SUCCESS); + + return pImpl->GetItemCount(); +} + +int +ExpandableList::GetSubItemCount(int mainIndex) const +{ + const _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + SetLastResult(E_SUCCESS); + + return pImpl->GetSubItemCount(mainIndex); +} + +const CustomListItem* +ExpandableList::GetSubItemAt(int mainIndex, int subIndex) const +{ + const _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + SysTryReturn(NID_UI_CTRL, (mainIndex >= 0 && subIndex >= 0), null, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. mainIndex = %d subIndex = %d", mainIndex, subIndex); + + const CustomListItem* pItem = pImpl->GetCustomListItemAt(mainIndex, subIndex); + return pItem; +} + +int +ExpandableList::GetFirstCheckedItemIndex(void) const +{ + const _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + SetLastResult(E_SUCCESS); + + return pImpl->GetFirstCheckedItemIndex(); +} + +int +ExpandableList::GetItemIdAt(int mainIndex) const +{ + const _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + SetLastResult(E_SUCCESS); + + return pImpl->GetItemIdAt(mainIndex); +} + +int +ExpandableList::GetItemIndexFromItemId(int itemId) const +{ + const _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + SetLastResult(E_SUCCESS); + + return pImpl->GetItemIndexFromItemId(itemId); +} + +int +ExpandableList::GetSubItemIdAt(int mainIndex, int subIndex) const +{ + const _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + SetLastResult(E_SUCCESS); + + return pImpl->GetSubItemIdAt(mainIndex, subIndex); +} + +result +ExpandableList::SetItemExpanded(int mainIndex, bool expand) +{ + _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetItemExpanded(mainIndex, expand); +} + +bool +ExpandableList::IsItemExpanded(int mainIndex) const +{ + const _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + SetLastResult(E_SUCCESS); + + return pImpl->IsItemExpanded(mainIndex); +} + +result +ExpandableList::SetItemEnabled(int mainIndex, bool enable) +{ + _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->SetItemEnabled(mainIndex, enable); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +bool +ExpandableList::IsItemEnabled(int index) const +{ + const _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + SetLastResult(E_SUCCESS); + + return pImpl->IsItemEnabled(index); +} + +result +ExpandableList::SetSubItemEnabled(int mainIndex, int subIndex, bool enable) +{ + _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->SetSubItemEnabled(mainIndex, subIndex, enable); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +bool +ExpandableList::IsSubItemEnabled(int mainIndex, int subIndex) const +{ + const _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + SetLastResult(E_SUCCESS); + + return pImpl->IsSubItemEnabled(mainIndex, subIndex); +} + +result +ExpandableList::SetItemChecked(int mainIndex, bool check) +{ + _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->SetItemChecked(mainIndex, check); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +bool +ExpandableList::IsItemChecked(int mainIndex) const +{ + const _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsItemChecked(mainIndex); +} + +result +ExpandableList::SetSubItemChecked(int mainIndex, int subIndex, bool check) +{ + _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->SetSubItemChecked(mainIndex, subIndex, check); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +bool +ExpandableList::IsSubItemChecked(int mainIndex, int subIndex) const +{ + const _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + SetLastResult(E_SUCCESS); + + return pImpl->IsSubItemChecked(mainIndex, subIndex); +} + +result +ExpandableList::SetAllSubItemsChecked(int mainIndex, bool check) +{ + _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->SetAllSubItemsChecked(mainIndex, check); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +ExpandableList::RemoveAllCheckedSubItemsAt(int mainIndex) +{ + _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->RemoveAllCheckedSubItemsAt(mainIndex); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +int +ExpandableList::GetFirstCheckedSubItemIndex(int mainIndex) const +{ + const _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + SetLastResult(E_SUCCESS); + + return pImpl->GetFirstCheckedSubItemIndex(mainIndex); +} + +int +ExpandableList::GetLastCheckedItemIndex(void) const +{ + const _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + SetLastResult(E_SUCCESS); + + return pImpl->GetLastCheckedItemIndex(); +} + +int +ExpandableList::GetLastCheckedSubItemIndex(int mainIndex) const +{ + const _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + SetLastResult(E_SUCCESS); + + return pImpl->GetLastCheckedSubItemIndex(mainIndex); +} + +int +ExpandableList::GetNextCheckedItemIndexAfter(int index) const +{ + const _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + SetLastResult(E_SUCCESS); + + return pImpl->GetNextCheckedItemIndexAfter(index); +} + +int +ExpandableList::GetNextCheckedSubItemIndexAfter(int mainIndex, int subIndex) const +{ + const _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + SetLastResult(E_SUCCESS); + + return pImpl->GetNextCheckedSubItemIndexAfter(mainIndex, subIndex); +} + +result +ExpandableList::GetSubItemIndexFromItemId(int itemId, int& mainIndex, int& subIndex) const +{ + const _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetSubItemIndexFromItemId(itemId, mainIndex, subIndex); +} + +result +ExpandableList::GetItemIndexFromPosition(int x, int y, int& mainIndex, int& subIndex) const +{ + const _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetItemIndexFromPosition(Point(x, y), mainIndex, subIndex); +} + +result +ExpandableList::GetItemIndexFromPosition(const Point& position, int& mainIndex, int& subIndex) const +{ + const _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetItemIndexFromPosition(position, mainIndex, subIndex); +} + +result +ExpandableList::GetTopDrawnItemIndex(int& mainIndex, int& subIndex) const +{ + const _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetTopDrawnItemIndex(mainIndex, subIndex); +} + +result +ExpandableList::GetBottomDrawnItemIndex(int& mainIndex, int& subIndex) const +{ + const _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetBottomDrawnItemIndex(mainIndex, subIndex); +} + +void +ExpandableList::SetBackgroundColor(const Color& color) +{ + _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + SetLastResult(E_SUCCESS); + + pImpl->SetBgColor(color); + return; +} + +void +ExpandableList::SetTextOfEmptyList(const String& text) +{ + _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + SetLastResult(E_SUCCESS); + + pImpl->SetTextOfEmptyList(text); + return; +} + +void +ExpandableList::SetTextColorOfEmptyList(const Color& color) +{ + _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetTextColorOfEmptyList(color); + SetLastResult(E_SUCCESS); + + return; +} + +Color +ExpandableList::GetTextColorOfEmptyList(void) const +{ + const _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + SetLastResult(E_SUCCESS); + + return pImpl->GetTextColorOfEmptyList(); +} + +void +ExpandableList::ScrollToBottom(void) +{ + _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->ScrollToBottom(); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + SetLastResult(E_SUCCESS); + + return; +} + +void +ExpandableList::ScrollToTop(void) +{ + _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + SetLastResult(E_SUCCESS); + + result r = pImpl->ScrollToTop(); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + + return; +} + +result +ExpandableList::ScrollToTop(int mainIndex, int subIndex) +{ + _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->ScrollToTop(mainIndex, subIndex); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +ExpandableList::ScrollToTop(int mainIndex) +{ + _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->ScrollToTop(mainIndex); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +ExpandableList::RefreshSubItem(int mainIndex, int subIndex) +{ + _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->RefreshSubItem(mainIndex, subIndex); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +ExpandableList::RefreshItem(int mainIndex) +{ + _ExpandableListImpl* pImpl = _ExpandableListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->RefreshItem(mainIndex); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +}}} //Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlFooter.cpp b/src/ui/controls/FUiCtrlFooter.cpp new file mode 100644 index 0000000..2eff980 --- /dev/null +++ b/src/ui/controls/FUiCtrlFooter.cpp @@ -0,0 +1,574 @@ +// +// 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 FUiCtrlFooter.cpp +* @brief This is the implementation file for Footer class. +*/ + +#include +#include +#include "FUiCtrl_FooterImpl.h" + +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +result +Footer::AddItem(const FooterItem& item) +{ + _FooterImpl* pFooterImpl = _FooterImpl::GetInstance(*this); + + SysAssertf(pFooterImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pFooterImpl->AddItem(item); +} + +result +Footer::InsertItemAt(int itemIndex, const FooterItem& item) +{ + _FooterImpl* pFooterImpl = _FooterImpl::GetInstance(*this); + + SysAssertf(pFooterImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pFooterImpl->InsertItemAt(itemIndex, item); +} + +bool +Footer::IsButtonSet(ButtonPosition position) const +{ + ClearLastResult(); + + const _FooterImpl* pFooterImpl = _FooterImpl::GetInstance(*this); + + SysAssertf(pFooterImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pFooterImpl->IsButtonSet(position); +} + +bool +Footer::IsBackButtonSet(void) const +{ + ClearLastResult(); + + const _FooterImpl* pFooterImpl = _FooterImpl::GetInstance(*this); + + SysAssertf(pFooterImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pFooterImpl->IsBackButtonSet(); +} + +bool +Footer::IsTabEditModeEnabled(void) const +{ + ClearLastResult(); + + const _FooterImpl* pFooterImpl = _FooterImpl::GetInstance(*this); + + SysAssertf(pFooterImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pFooterImpl->IsTabEditModeEnabled(); +} + +Color +Footer::GetButtonColor(ButtonItemStatus status) const +{ + ClearLastResult(); + + const _FooterImpl* pFooterImpl = _FooterImpl::GetInstance(*this); + + SysAssertf(pFooterImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pFooterImpl->GetButtonColor(status); +} + +Color +Footer::GetButtonTextColor(ButtonItemStatus status) const +{ + ClearLastResult(); + + const _FooterImpl* pFooterImpl = _FooterImpl::GetInstance(*this); + + SysAssertf(pFooterImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pFooterImpl->GetButtonTextColor(status); +} + +ButtonItemStatus +Footer::GetButtonStatus(ButtonPosition position) const +{ + ClearLastResult(); + + const _FooterImpl* pFooterImpl = _FooterImpl::GetInstance(*this); + + SysAssertf(pFooterImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pFooterImpl->GetButtonStatus(position); +} + +ButtonItemStatus +Footer::GetBackButtonStatus(void) const +{ + ClearLastResult(); + + const _FooterImpl* pFooterImpl = _FooterImpl::GetInstance(*this); + + SysAssertf(pFooterImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pFooterImpl->GetBackButtonStatus(); +} + +Color +Footer::GetItemColor(FooterItemStatus status) const +{ + ClearLastResult(); + + const _FooterImpl* pFooterImpl = _FooterImpl::GetInstance(*this); + + SysAssertf(pFooterImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pFooterImpl->GetItemColor(status); +} + +int +Footer::GetItemCount(void) const +{ + ClearLastResult(); + + const _FooterImpl* pFooterImpl = _FooterImpl::GetInstance(*this); + + SysAssertf(pFooterImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pFooterImpl->GetItemCount(); +} + +result +Footer::GetItemStatus(int itemIndex, FooterItemStatus& status) const +{ + const _FooterImpl* pFooterImpl = _FooterImpl::GetInstance(*this); + + SysAssertf(pFooterImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pFooterImpl->GetItemStatus(itemIndex, status); +} + +Color +Footer::GetItemTextColor(FooterItemStatus status) const +{ + ClearLastResult(); + + const _FooterImpl* pFooterImpl = _FooterImpl::GetInstance(*this); + + SysAssertf(pFooterImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pFooterImpl->GetItemTextColor(status); +} + +FooterStyle +Footer::GetStyle(void) const +{ + ClearLastResult(); + + const _FooterImpl* pFooterImpl = _FooterImpl::GetInstance(*this); + + SysAssertf(pFooterImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pFooterImpl->GetStyle(); +} + +int +Footer::GetSelectedItemIndex(void) const +{ + ClearLastResult(); + + const _FooterImpl* pFooterImpl = _FooterImpl::GetInstance(*this); + + SysAssertf(pFooterImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pFooterImpl->GetSelectedItemIndex(); +} + +Color +Footer::GetColor(void) const +{ + ClearLastResult(); + + const _FooterImpl* pFooterImpl = _FooterImpl::GetInstance(*this); + + SysAssertf(pFooterImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pFooterImpl->GetColor(); +} + +result +Footer::RemoveAllButtons(void) +{ + _FooterImpl* pFooterImpl = _FooterImpl::GetInstance(*this); + + SysAssertf(pFooterImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pFooterImpl->RemoveAllButtons(); +} + +result +Footer::RemoveButtonAt(ButtonPosition position) +{ + _FooterImpl* pFooterImpl = _FooterImpl::GetInstance(*this); + + SysAssertf(pFooterImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pFooterImpl->RemoveButtonAt(position); +} + +result +Footer::RemoveBackButton(void) +{ + _FooterImpl* pFooterImpl = _FooterImpl::GetInstance(*this); + + SysAssertf(pFooterImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pFooterImpl->RemoveBackButton(); +} + +result +Footer::RemoveAllItems(void) +{ + _FooterImpl* pFooterImpl = _FooterImpl::GetInstance(*this); + + SysAssertf(pFooterImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pFooterImpl->RemoveAllItems(); +} + +result +Footer::RemoveItemAt(int itemIndex) +{ + _FooterImpl* pFooterImpl = _FooterImpl::GetInstance(*this); + + SysAssertf(pFooterImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pFooterImpl->RemoveItemAt(itemIndex); +} + +result +Footer::SetBackgroundBitmap(const Bitmap* pBitmap) +{ + _FooterImpl* pFooterImpl = _FooterImpl::GetInstance(*this); + + SysAssertf(pFooterImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pFooterImpl->SetBackgroundBitmap(pBitmap); +} + +result +Footer::SetButton(ButtonPosition position, const ButtonItem& button) +{ + _FooterImpl* pFooterImpl = _FooterImpl::GetInstance(*this); + + SysAssertf(pFooterImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pFooterImpl->SetButton(position, button); +} + +result +Footer::SetButtonColor(ButtonItemStatus status, const Color& color) +{ + _FooterImpl* pFooterImpl = _FooterImpl::GetInstance(*this); + + SysAssertf(pFooterImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pFooterImpl->SetButtonColor(status, color); +} + +result +Footer::SetButtonTextColor(ButtonItemStatus status, const Color& color) +{ + _FooterImpl* pFooterImpl = _FooterImpl::GetInstance(*this); + + SysAssertf(pFooterImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pFooterImpl->SetButtonTextColor(status, color); +} + +result +Footer::SetButtonEnabled(ButtonPosition position, bool enable) +{ + _FooterImpl* pFooterImpl = _FooterImpl::GetInstance(*this); + + SysAssertf(pFooterImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pFooterImpl->SetButtonEnabled(position, enable); +} + +result +Footer::SetBackButtonEnabled(bool enable) +{ + _FooterImpl* pFooterImpl = _FooterImpl::GetInstance(*this); + + SysAssertf(pFooterImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pFooterImpl->SetBackButtonEnabled(enable); +} + +result +Footer::SetBackButton(void) +{ + _FooterImpl* pFooterImpl = _FooterImpl::GetInstance(*this); + + SysAssertf(pFooterImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pFooterImpl->SetBackButton(); +} + +result +Footer::SetItemAt(int itemIndex, const FooterItem& item) +{ + _FooterImpl* pFooterImpl = _FooterImpl::GetInstance(*this); + + SysAssertf(pFooterImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pFooterImpl->SetItemAt(itemIndex, item); +} + +result +Footer::SetItemColor(FooterItemStatus status, const Color& color) +{ + _FooterImpl* pFooterImpl = _FooterImpl::GetInstance(*this); + + SysAssertf(pFooterImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pFooterImpl->SetItemColor(status, color); +} + +result +Footer::SetItemEnabled(int itemIndex, bool enabled) +{ + _FooterImpl* pFooterImpl = _FooterImpl::GetInstance(*this); + + SysAssertf(pFooterImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pFooterImpl->SetItemEnabled(itemIndex, enabled); +} + +result +Footer::SetItemBadgeIcon(int itemIndex, const Bitmap* pBadgeIcon) +{ + _FooterImpl* pFooterImpl = _FooterImpl::GetInstance(*this); + + SysAssertf(pFooterImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pFooterImpl->SetItemBadgeIcon(itemIndex, pBadgeIcon); +} + +result +Footer::SetItemTextColor(FooterItemStatus status, const Color& color) +{ + _FooterImpl* pFooterImpl = _FooterImpl::GetInstance(*this); + + SysAssertf(pFooterImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pFooterImpl->SetItemTextColor(status, color); +} + +result +Footer::SetItemSelected(int itemIndex) +{ + _FooterImpl* pFooterImpl = _FooterImpl::GetInstance(*this); + + SysAssertf(pFooterImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pFooterImpl->SetItemSelected(itemIndex); +} + +result +Footer::SetItemNumberedBadgeIcon(int itemIndex, int number) +{ + _FooterImpl* pFooterImpl = _FooterImpl::GetInstance(*this); + + SysAssertf(pFooterImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pFooterImpl->SetItemNumberedBadgeIcon(itemIndex, number); +} + +result +Footer::SetColor(const Color& color) +{ + _FooterImpl* pFooterImpl = _FooterImpl::GetInstance(*this); + + SysAssertf(pFooterImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pFooterImpl->SetColor(color); +} + +result +Footer::SetStyle(FooterStyle style) +{ + _FooterImpl* pFooterImpl = _FooterImpl::GetInstance(*this); + + SysAssertf(pFooterImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pFooterImpl->SetStyle(style); +} + +result +Footer::SetTabEditModeEnabled(bool enable) +{ + _FooterImpl* pFooterImpl = _FooterImpl::GetInstance(*this); + + SysAssertf(pFooterImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pFooterImpl->SetTabEditModeEnabled(enable); +} + +void +Footer::AddActionEventListener(IActionEventListener& listener) +{ + _FooterImpl* pFooterImpl = _FooterImpl::GetInstance(*this); + + SysAssertf(pFooterImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pFooterImpl->AddActionEventListener(listener); + + return; +} + +void +Footer::RemoveActionEventListener(IActionEventListener& listener) +{ + _FooterImpl* pFooterImpl = _FooterImpl::GetInstance(*this); + + SysAssertf(pFooterImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pFooterImpl->RemoveActionEventListener(listener); + + return; +} + +Footer::Footer(void) +{ +} + +Footer::~Footer(void) +{ +} + +result +Footer::Construct(void) +{ + SysAssertf(_pControlImpl == null, + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + result r = E_SUCCESS; + + _FooterImpl* pImpl = _FooterImpl::CreateFooterImplN(this); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlImpl = pImpl; + + return r; +} + +Rectangle +Footer::GetButtonBounds(ButtonPosition position) const +{ + ClearLastResult(); + + const _FooterImpl* pFooterImpl = _FooterImpl::GetInstance(*this); + + SysAssertf(pFooterImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pFooterImpl->GetButtonBounds(position); +} + +FloatRectangle +Footer::GetButtonBoundsF(ButtonPosition position) const +{ + ClearLastResult(); + + const _FooterImpl* pFooterImpl = _FooterImpl::GetInstance(*this); + + SysAssertf(pFooterImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pFooterImpl->GetButtonBoundsF(position); +} + +result +Footer::SetButtonBadgeIcon(ButtonPosition position, const Bitmap* pBadgeIcon) +{ + _FooterImpl* pFooterImpl = _FooterImpl::GetInstance(*this); + + SysAssertf(pFooterImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pFooterImpl->SetButtonBadgeIcon(position, pBadgeIcon); +} + +result +Footer::SetButtonNumberedBadgeIcon(ButtonPosition position, int number) +{ + _FooterImpl* pFooterImpl = _FooterImpl::GetInstance(*this); + + SysAssertf(pFooterImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pFooterImpl->SetButtonNumberedBadgeIcon(position, number); +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlFooterItem.cpp b/src/ui/controls/FUiCtrlFooterItem.cpp new file mode 100644 index 0000000..c5d54cf --- /dev/null +++ b/src/ui/controls/FUiCtrlFooterItem.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 FUiCtrlFooterItem.cpp +* @brief This is the implementation file for FooterItem class. +*/ + +#include +#include +#include +#include "FUiCtrl_FooterItemImpl.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +FooterItem::FooterItem(void) + : __pImpl(null) +{ +} + +FooterItem::~FooterItem(void) +{ + if (__pImpl) + { + delete __pImpl; + __pImpl = null; + } +} + +result +FooterItem::Construct(int actionId) +{ + result r = E_SUCCESS; + + 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); + + SysAssertf(pImpl == null, + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + __pImpl = new (std::nothrow) _FooterItemImpl(this); + SysTryReturnResult(NID_UI_CTRL, __pImpl, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Impl instance is not constructed"); + + r = __pImpl->Construct(actionId); + + if (IsFailed(r)) + { + delete __pImpl; + __pImpl = null; + SysLog(NID_UI_CTRL, "[%s] Propagated.", GetErrorMessage(r)); + return r; + } + + return r; +} + +int +FooterItem::GetActionId(void) const +{ + SysAssertf(__pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return __pImpl->GetActionId(); +} + +String +FooterItem::GetText(void) const +{ + SysAssertf(__pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return __pImpl->GetText(); +} + +result +FooterItem::SetActionId(int actionId) +{ + SysAssertf(__pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return __pImpl->SetActionId(actionId); +} + +result +FooterItem::SetBackgroundBitmap(FooterItemStatus status, const Bitmap* pBitmap) +{ + SysAssertf(__pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return __pImpl->SetBackgroundBitmap(status, pBitmap); +} + +result +FooterItem::SetIcon(FooterItemStatus status, const Bitmap* pIcon) +{ + SysTryReturnResult(NID_UI_CTRL, pIcon, E_INVALID_ARG, "[E_INVALID_ARG] pIcon is invalid."); + + SysAssertf(__pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return __pImpl->SetIcon(status, pIcon); +} + +result +FooterItem::SetText(const String& text) +{ + SysAssertf(__pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return __pImpl->SetText(text); +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlForm.cpp b/src/ui/controls/FUiCtrlForm.cpp new file mode 100644 index 0000000..c782383 --- /dev/null +++ b/src/ui/controls/FUiCtrlForm.cpp @@ -0,0 +1,712 @@ +// +// 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 FUiCtrlForm.cpp + * @brief This is the implementation file for Form class. + */ + +// Includes +#include +#include +#include +#include "FUi_UiBuilder.h" +#include "FUiCtrl_FormImpl.h" +#include "FUiCtrl_HeaderImpl.h" +#include "FUiCtrl_FooterImpl.h" +#include "FUiCtrl_TabImpl.h" + +using namespace std; +using namespace Tizen::Ui; +using namespace Tizen::Graphics; +using namespace Tizen::Base; + +namespace Tizen { namespace Ui { namespace Controls +{ + +Form::Form(void) +{ +} + +Form::~Form(void) +{ +} + +result +Form::Construct(unsigned long formStyle) +{ + result r = E_SUCCESS; + + SysAssertf(_FormImpl::GetInstance(*this) == null, + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + _FormImpl* pImpl = _FormImpl::CreateFormImplN(this); + SysTryReturn(NID_UI_CTRL, pImpl, GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _pControlImpl = pImpl; + + pImpl->SetFormStyle(formStyle); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +Form::Construct(const Tizen::Base::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, "[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)); + r = pBuilder->Parse(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +Form::Construct(const Layout& layout, unsigned long formStyle) +{ + result r = E_SUCCESS; + + SysAssertf(_FormImpl::GetInstance(*this) == null, + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + r = Construct(layout, layout, formStyle); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +Form::Construct(const Layout& portraitLayout, const Layout& landscapeLayout, unsigned long formStyle) +{ + result r = E_SUCCESS; + + SysAssertf(_FormImpl::GetInstance(*this) == null, + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + Layout* pPortraitLayout = const_cast (&portraitLayout); + Layout* pLandscapeLayout = const_cast (&landscapeLayout); + + _FormImpl* pImpl = _FormImpl::CreateFormImplN(this, pPortraitLayout, pLandscapeLayout); + SysTryReturn(NID_UI_CTRL, pImpl, GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _pControlImpl = pImpl; + + pImpl->SetFormStyle(formStyle); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +void +Form::AddOrientationEventListener(IOrientationEventListener& listener) +{ + _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pImpl->AddOrientationEventListener(listener); +} + +void +Form::AddOptionkeyActionListener(IActionEventListener& listener) +{ + _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pImpl->AddOptionkeyActionListener(listener); +} + +void +Form::AddSoftkeyActionListener(Softkey softkey, IActionEventListener& listener) +{ + _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pImpl->AddSoftkeyActionListener(softkey, listener); +} + +void +Form::RemoveOptionkeyActionListener(IActionEventListener& listener) +{ + _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pImpl->RemoveOptionkeyActionListener(listener); +} + +void +Form::RemoveOrientationEventListener(IOrientationEventListener& listener) +{ + _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pImpl->RemoveOrientationEventListener(listener); +} + +void +Form::RemoveSoftkeyActionListener(Softkey softkey, IActionEventListener& listener) +{ + _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pImpl->RemoveSoftkeyActionListener(softkey, listener); +} + +Color +Form::GetBackgroundColor(void) const +{ + const _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetBackgroundColor(); +} + +Rectangle +Form::GetClientAreaBounds(void) const +{ + const _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetClientBounds(); +} + +FloatRectangle +Form::GetClientAreaBoundsF(void) const +{ + const _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetClientBoundsF(); +} + +unsigned long +Form::GetFormStyle(void) const +{ + const _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetFormStyle(); +} + +Orientation +Form::GetOrientation(void) const +{ + const _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetOrientation(); +} + +OrientationStatus +Form::GetOrientationStatus(void) const +{ + const _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetOrientationStatus(); +} + +int +Form::GetSoftkeyActionId(Softkey softkey) const +{ + const _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetSoftkeyActionId(softkey); +} + +String +Form::GetSoftkeyText(Softkey softkey) const +{ + const _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetSoftkeyText(softkey); +} + +Tab* +Form::GetTab(void) const +{ + _FormImpl* pImpl = const_cast <_FormImpl*>(_FormImpl::GetInstance(*this)); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + _TabImpl* pTabImpl = pImpl->GetTabImpl(); + if (!pTabImpl) + { + return null; + } + + return pTabImpl->GetTab(); +} + + +String +Form::GetTitleText(void) const +{ + const _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetTitleText(); +} + +HorizontalAlignment +Form::GetTitleTextHorizontalAlignment(void) const +{ + const _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetTitleTextHorizontalAlignment(); +} + +bool +Form::HasIndicator(void) const +{ + const _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pImpl->HasIndicator(); +} + +bool +Form::HasOptionkey(void) const +{ + const _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pImpl->HasOptionkey(); +} + +bool +Form::HasSoftkey(Softkey softkey) const +{ + const _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pImpl->HasSoftkey(softkey); +} + +bool +Form::HasTab(void) const +{ + const _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pImpl->HasTab(); +} + +bool +Form::HasTitle(void) const +{ + const _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pImpl->HasTitle(); +} + +bool +Form::IsSoftkeyEnabled(Softkey softkey) const +{ + const _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsSoftkeyEnabled(softkey); +} + +void +Form::SetBackgroundColor(const Color& color) +{ + _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pImpl->SetBackgroundColor(color); +} + +void +Form::SetFormStyle(unsigned long formStyle) +{ + _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pImpl->SetFormStyle(formStyle); +} + +void +Form::SetOptionkeyActionId(int actionId) +{ + _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pImpl->SetOptionkeyActionId(actionId); +} + +void +Form::SetOrientation(Orientation orientation) +{ + _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pImpl->SetOrientation(orientation); +} + +void +Form::SetSoftkeyActionId(Softkey softkey, int actionId) +{ + _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pImpl->SetSoftkeyActionId(softkey, actionId); +} + +void +Form::SetSoftkeyEnabled(Softkey softkey, bool enable) +{ + _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pImpl->SetSoftkeyEnabled(softkey, enable); +} + +result +Form::SetTitleIcon(const Bitmap* pTitleBitmap) +{ + _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetTitleIcon(pTitleBitmap); +} + +result +Form::SetTitleText(const String& title, HorizontalAlignment alignment) +{ + _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetTitleText(title, alignment); +} + +void +Form::SetSoftkeyIcon(Softkey softkey, const Bitmap& normalBitmap, const Bitmap* pPressedBitmap) +{ + _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pImpl->SetSoftkeyIcon(softkey, normalBitmap, pPressedBitmap); +} + +void +Form::SetSoftkeyText(Softkey softkey, const String& text) +{ + _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pImpl->SetSoftkeyText(softkey, text); +} + +Footer* +Form::GetFooter(void) const +{ + const _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + _FooterImpl* pFooterImpl = pImpl->GetFooter(); + if (!pFooterImpl) + { + return null; + } + + return pFooterImpl->GetFooter(); +} + +Header* +Form::GetHeader(void) const +{ + const _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + _HeaderImpl* pHeaderImpl = pImpl->GetHeader(); + if (!pHeaderImpl) + { + return null; + } + + return pHeaderImpl->GetHeader(); +} + +bool +Form::HasFooter(void) const +{ + const _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pImpl->HasFooter(); +} + +bool +Form::HasHeader(void) const +{ + const _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pImpl->HasHeader(); +} + +bool +Form::IsIndicatorVisible(void) const +{ + const _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsIndicatorVisible(); +} + +bool +Form::IsHeaderVisible(void) const +{ + const _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsHeaderVisible(); +} + +bool +Form::IsFooterVisible(void) const +{ + const _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsFooterVisible(); +} + +bool +Form::IsIndicatorTranslucent(void) const +{ + const _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsIndicatorTranslucent(); +} + +bool +Form::IsHeaderTranslucent(void) const +{ + const _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsHeaderTranslucent(); +} + +bool +Form::IsFooterTranslucent(void) const +{ + const _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsFooterTranslucent(); +} + +result +Form::SetActionBarsTranslucent(unsigned long actionBars, bool translucent) +{ + _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetActionBarsTranslucent(actionBars, translucent); +} + +result +Form::SetActionBarsVisible(unsigned long actionBars, bool visible) +{ + _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetActionBarsVisible(actionBars, visible); +} + +OverlayRegion* +Form::GetOverlayRegionN(const Rectangle& rect, OverlayRegionType regionType) +{ + _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetOverlayRegionN(rect, regionType); +} + +OverlayRegion* +Form::GetOverlayRegionN(const FloatRectangle& rect, OverlayRegionType regionType) +{ + _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetOverlayRegionN(rect, regionType); +} + +Canvas* +Form::GetClientAreaCanvasN(void) const +{ + const _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetClientAreaCanvasN(); +} + +Point +Form::TranslateToClientAreaPosition(const Point& position) const +{ + const _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pImpl->TranslateToClientAreaPosition(position); +} + +FloatPoint +Form::TranslateToClientAreaPosition(const FloatPoint& position) const +{ + const _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pImpl->TranslateToClientAreaPosition(position); +} + + +Point +Form::TranslateFromClientAreaPosition(const Point& clientPosition) const +{ + const _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pImpl->TranslateFromClientAreaPosition(clientPosition); +} + +FloatPoint +Form::TranslateFromClientAreaPosition(const FloatPoint& clientPosition) const +{ + const _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pImpl->TranslateFromClientAreaPosition(clientPosition); +} + +void +Form::SetFormBackEventListener(IFormBackEventListener* pFormBackEventListener) +{ + _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetFormBackEventListener(pFormBackEventListener); +} + +void +Form::SetFormMenuEventListener(IFormMenuEventListener* pFormMenuEventListener) +{ + _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetFormMenuEventListener(pFormMenuEventListener); +} + +DataBindingContext* +Form::GetDataBindingContextN(void) const +{ + const _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetDataBindingContextN(); +} + +result +Form::SetNotificationTrayOpenEnabled(bool enable) +{ + _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetNotificationTrayOpenEnabled(enable); +} + +bool +Form::IsNotificationTrayOpenEnabled(void) const +{ + const _FormImpl* pImpl = _FormImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsNotificationTrayOpenEnabled(); +} + + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlFrame.cpp b/src/ui/controls/FUiCtrlFrame.cpp new file mode 100644 index 0000000..7f83f98 --- /dev/null +++ b/src/ui/controls/FUiCtrlFrame.cpp @@ -0,0 +1,260 @@ +// +// 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 FUiCtrlFrame.cpp + * @brief This is the implementation for the Frame class. + */ + +// Includes +#include +#include +#include "FUiCtrl_FrameImpl.h" +#include "FUiCtrl_FormImpl.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Animations; + +namespace Tizen { namespace Ui { namespace Controls +{ + +Frame::Frame(void) +{ +} + +Frame::~Frame(void) +{ +} + +result +Frame::Construct(void) +{ + SysAssertf(_FrameImpl::GetInstance(*this) == null, + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + result r = E_SUCCESS; + + _FrameImpl* pImpl = _FrameImpl::CreateFrameImplN(this); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlImpl = pImpl; + + return r; +} + +result +Frame::Construct(const Rectangle& rect) +{ + SysAssertf(_FrameImpl::GetInstance(*this) == null, + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + result r = E_SUCCESS; + + _FrameImpl* pImpl = _FrameImpl::CreateFrameImplN(this); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlImpl = pImpl; + + pImpl->SetFloatingBounds(rect); + + return r; +} + +result +Frame::Construct(const FloatRectangle& rect) +{ + SysAssertf(_FrameImpl::GetInstance(*this) == null, + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + result r = E_SUCCESS; + + _FrameImpl* pImpl = _FrameImpl::CreateFrameImplN(this); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlImpl = pImpl; + + pImpl->SetFloatingBounds(rect); + + return r; +} + +void +Frame::AddOrientationEventListener(IOrientationEventListener& listener) +{ + _FrameImpl* pImpl = _FrameImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pImpl->AddOrientationEventListener(listener); +} + +void +Frame::AddFrameEventListener(IFrameEventListener& listener) +{ + _FrameImpl* pImpl = _FrameImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pImpl->AddFrameEventListener(listener); +} + +void +Frame::RemoveOrientationEventListener(IOrientationEventListener& listener) +{ + _FrameImpl* pImpl = _FrameImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pImpl->RemoveOrientationEventListener(listener); +} + +void +Frame::RemoveFrameEventListener(IFrameEventListener& listener) +{ + _FrameImpl* pImpl = _FrameImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pImpl->RemoveFrameEventListener(listener); + + return; +} + +Form* +Frame::GetCurrentForm(void) const +{ + const _FrameImpl* pImpl = _FrameImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + _FormImpl* pFormImpl = pImpl->GetCurrentForm(); + SysTryReturn(NID_UI_CTRL, pFormImpl, null, E_INVALID_STATE, "[E_INVALID_STATE] The current Form does not exist."); + + return &pFormImpl->GetPublic(); +} + +result +Frame::SetCurrentForm(const Form& form) +{ + _FrameImpl* pImpl = _FrameImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->SetCurrentForm(*_FormImpl::GetInstance(form)); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Frame::SetCurrentForm(Form* pForm) +{ + _FrameImpl* pImpl = _FrameImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->SetCurrentForm(_FormImpl::GetInstance(*pForm)); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + + +Color +Frame::GetBackgroundColor(void) const +{ + const _FrameImpl* pImpl = _FrameImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetBackgroundColor(); +} + +void +Frame::SetBackgroundColor(const Color& color) +{ + _FrameImpl* pImpl = _FrameImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pImpl->SetBackgroundColor(color); +} + +void +Frame::SetOrientation(Orientation orientation) +{ + _FrameImpl* pImpl = _FrameImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pImpl->SetOrientation(orientation); +} + +Orientation +Frame::GetOrientation(void) const +{ + const _FrameImpl* pImpl = _FrameImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetOrientation(); +} + +OrientationStatus +Frame::GetOrientationStatus(void) const +{ + const _FrameImpl* pImpl = _FrameImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetOrientationStatus(); +} + +FrameAnimator* +Frame::GetFrameAnimator(void) const +{ + const _FrameImpl* pImpl = _FrameImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetFrameAnimator(); +} + +result +Frame::SetShowMode(FrameShowMode mode) +{ + _FrameImpl* pImpl = _FrameImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetShowMode(mode); +} + +FrameShowMode +Frame::GetShowMode(void) const +{ + const _FrameImpl* pImpl = _FrameImpl::GetInstance(*this); + SysAssertf(pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetShowMode(); +} + +}}} // Tizen::Ui::Constrols diff --git a/src/ui/controls/FUiCtrlGallery.cpp b/src/ui/controls/FUiCtrlGallery.cpp new file mode 100644 index 0000000..c756750 --- /dev/null +++ b/src/ui/controls/FUiCtrlGallery.cpp @@ -0,0 +1,388 @@ +// +// 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 FUiCtrlGallery.cpp + * @brief This file contains implementation of Gallery class. + */ + +//Includes +#include +#include "FUiCtrl_GalleryImpl.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Base; +using namespace Tizen::Ui::Effects; + +namespace Tizen { namespace Ui { namespace Controls { + +Gallery::Gallery(void) +{ + // Do nothing +} + +Gallery::~Gallery(void) +{ +} + +result +Gallery::Construct(const Rectangle& rect) +{ + SysAssertf(_GalleryImpl::GetInstance(*this) == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + _GalleryImpl* pGalleryImpl = _GalleryImpl::CreateGalleryImplN(this); + result r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r != E_OUT_OF_MEMORY, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has occurred."); + + _pControlImpl = pGalleryImpl; + + r = Control::SetBounds(rect); + SysTryCatch(NID_UI_CTRL, r != E_INVALID_ARG, , E_INVALID_ARG, "[E_INVALID_ARG] The specified input parameter is invalid."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has occurred."); + + return r; + +CATCH: + delete pGalleryImpl; + _pControlImpl = null; + return r; +} + +result +Gallery::Construct(const FloatRectangle& rect) +{ + SysAssertf(_GalleryImpl::GetInstance(*this) == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + _GalleryImpl* pGalleryImpl = _GalleryImpl::CreateGalleryImplN(this); + result r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r != E_OUT_OF_MEMORY, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has occurred."); + + _pControlImpl = pGalleryImpl; + + r = Control::SetBounds(rect); + SysTryCatch(NID_UI_CTRL, r != E_INVALID_ARG, , E_INVALID_ARG, "[E_INVALID_ARG] The specified input parameter is invalid."); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has occurred."); + + return r; + +CATCH: + delete pGalleryImpl; + _pControlImpl = null; + return r; +} + +result +Gallery::SetItemProvider(IGalleryItemProvider &provider) +{ + _GalleryImpl* pGalleryImpl = _GalleryImpl::GetInstance(*this); + SysAssertf(pGalleryImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pGalleryImpl->SetItemProvider(provider); + + return r; +} + +void +Gallery::AddGalleryEventListener(IGalleryEventListener &listener) +{ + _GalleryImpl* pGalleryImpl = _GalleryImpl::GetInstance(*this); + SysAssertf(pGalleryImpl != null, "Not yet constructed. Construct() should be called before use."); + + pGalleryImpl->AddGalleryEventListener(listener); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +Gallery::RemoveGalleryEventListener(IGalleryEventListener &listener) +{ + _GalleryImpl* pGalleryImpl = _GalleryImpl::GetInstance(*this); + SysAssertf(pGalleryImpl != null, "Not yet constructed. Construct() should be called before use."); + + pGalleryImpl->RemoveGalleryEventListener(listener); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +int +Gallery::GetCurrentItemIndex(void) const +{ + const _GalleryImpl* pGalleryImpl = _GalleryImpl::GetInstance(*this); + SysAssertf(pGalleryImpl != null, "Not yet constructed. Construct() should be called before use."); + + int currentItemIndex = pGalleryImpl->GetCurrentItemIndex(); + + return currentItemIndex; +} + +result +Gallery::SetCurrentItemIndex(int index) +{ + _GalleryImpl* pGalleryImpl = _GalleryImpl::GetInstance(*this); + SysAssertf(pGalleryImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pGalleryImpl->SetCurrentItemIndex(index); + SysTryReturn(NID_UI_CTRL, r != E_OUT_OF_RANGE, r, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The specified %d index is out of range.", index); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, E_SYSTEM, "[E_SYSTEM] A system error has occurred."); + + return r; +} + +int +Gallery::GetItemCount(void) const +{ + const _GalleryImpl* pGalleryImpl = _GalleryImpl::GetInstance(*this); + SysAssertf(pGalleryImpl != null, "Not yet constructed. Construct() should be called before use."); + + int itemCount = pGalleryImpl->GetItemCount(); + return itemCount; +} + +result +Gallery::RefreshGallery(int itemIndex, GalleryRefreshType type) +{ + _GalleryImpl* pGalleryImpl = _GalleryImpl::GetInstance(*this); + SysAssertf(pGalleryImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pGalleryImpl->RefreshGallery(itemIndex, type); + SysTryReturn(NID_UI_CTRL, r != E_OUT_OF_RANGE, r, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The specified %d index is out of range.", itemIndex); + SysTryReturn(NID_UI_CTRL, r != E_INVALID_OPERATION, r, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The current state of the instance prohibits the execution of the specified operation."); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, E_SYSTEM, "[E_SYSTEM] A system error has occurred."); + + return r; +} + +result +Gallery::UpdateGallery(void) +{ + _GalleryImpl* pGalleryImpl = _GalleryImpl::GetInstance(*this); + SysAssertf(pGalleryImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pGalleryImpl->UpdateGallery(); + SysTryReturn(NID_UI_CTRL, r != E_INVALID_OPERATION, r, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The current state of the instance prohibits the execution of the specified operation."); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, E_SYSTEM, "[E_SYSTEM] A system error has occurred."); + + return r; +} + +result +Gallery::SetTextOfEmptyGallery(const String &text) +{ + _GalleryImpl* pGalleryImpl = _GalleryImpl::GetInstance(*this); + SysAssertf(pGalleryImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pGalleryImpl->SetTextOfEmptyGallery(text); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, E_SYSTEM, "[E_SYSTEM] A system error has occurred."); + + return r; +} + +String +Gallery::GetTextOfEmptyGallery(void) const +{ + const _GalleryImpl* pGalleryImpl = _GalleryImpl::GetInstance(*this); + SysAssertf(pGalleryImpl != null, "Not yet constructed. Construct() should be called before use."); + + String textOfEmptyGallery = pGalleryImpl->GetTextOfEmptyGallery(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, textOfEmptyGallery, E_SYSTEM, "[E_SYSTEM] A system error has occurred."); + + return textOfEmptyGallery; +} + +result +Gallery::SetBitmapOfEmptyGallery(const Bitmap* pBitmap) +{ + _GalleryImpl* pGalleryImpl = _GalleryImpl::GetInstance(*this); + SysAssertf(pGalleryImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pGalleryImpl->SetBitmapOfEmptyGallery(pBitmap); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, E_SYSTEM, "[E_SYSTEM] A system error has occurred."); + + return r; +} + +result +Gallery::SetSlideShowAnimation(GalleryAnimation animation) +{ + _GalleryImpl* pGalleryImpl = _GalleryImpl::GetInstance(*this); + SysAssertf(pGalleryImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pGalleryImpl->SetSlideShowAnimation(animation); + SysTryReturn(NID_UI_CTRL, r != E_UNSUPPORTED_OPERATION, r, E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] This operation is not supported."); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, E_SYSTEM, "[E_SYSTEM] A system error has occurred."); + + return r; +} + +GalleryAnimation +Gallery::GetSlideShowAnimation(void) const +{ + const _GalleryImpl* pGalleryImpl = _GalleryImpl::GetInstance(*this); + SysAssertf(pGalleryImpl != null, "Not yet constructed. Construct() should be called before use."); + + GalleryAnimation slideShowAnimation = pGalleryImpl->GetSlideShowAnimation(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r != E_UNSUPPORTED_OPERATION, slideShowAnimation, E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] This operation is not supported."); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, slideShowAnimation, E_SYSTEM, "[E_SYSTEM] A system error has occurred."); + + return slideShowAnimation; +} + +result +Gallery::SetSlideShowAnimationDuration(int duration) +{ + _GalleryImpl* pGalleryImpl = _GalleryImpl::GetInstance(*this); + SysAssertf(pGalleryImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pGalleryImpl->SetSlideShowAnimationDuration(duration); + SysTryReturn(NID_UI_CTRL, r != E_OUT_OF_RANGE, r, E_OUT_OF_RANGE, "The specified %d duration is out of the possible duration range.", duration); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, E_SYSTEM, "[E_SYSTEM] A system error has occurred."); + + return r; +} + +int +Gallery::GetSlideShowAnimationDuration(void) const +{ + const _GalleryImpl* pGalleryImpl = _GalleryImpl::GetInstance(*this); + SysAssertf(pGalleryImpl != null, "Not yet constructed. Construct() should be called before use."); + + int slideShowAnimationDuration = pGalleryImpl->GetSlideShowAnimationDuration(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, slideShowAnimationDuration, E_SYSTEM, "[E_SYSTEM] A system error has occurred."); + + return slideShowAnimationDuration; +} + +result +Gallery::SetSlideShowViewDuration(int duration) +{ + _GalleryImpl* pGalleryImpl = _GalleryImpl::GetInstance(*this); + SysAssertf(pGalleryImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pGalleryImpl->SetSlideShowViewDuration(duration); + SysTryReturn(NID_UI_CTRL, r != E_OUT_OF_RANGE, r, E_OUT_OF_RANGE, "The specified %d duration is out of the possible duration range.", duration); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, E_SYSTEM, "[E_SYSTEM] A system error has occurred."); + + return r; +} + +int +Gallery::GetSlideShowViewDuration(void) const +{ + const _GalleryImpl* pGalleryImpl = _GalleryImpl::GetInstance(*this); + SysAssertf(pGalleryImpl != null, "Not yet constructed. Construct() should be called before use."); + + int slideShowViewDuration = pGalleryImpl->GetSlideShowViewDuration(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, slideShowViewDuration, E_SYSTEM, "[E_SYSTEM] A system error has occurred."); + + return slideShowViewDuration; +} + +result +Gallery::StartSlideShow(bool repeat) +{ + _GalleryImpl* pGalleryImpl = _GalleryImpl::GetInstance(*this); + SysAssertf(pGalleryImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pGalleryImpl->StartSlideShow(repeat); + SysTryReturn(NID_UI_CTRL, r != E_INVALID_OPERATION, r, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The current state of the instance prohibits the execution of the specified operation."); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, E_SYSTEM, "[E_SYSTEM] A system error has occurred."); + + return r; +} + +result +Gallery::StopSlideShow(void) const +{ + const _GalleryImpl* pGalleryImpl = _GalleryImpl::GetInstance(*this); + SysAssertf(pGalleryImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pGalleryImpl->StopSlideShow(); + SysTryReturn(NID_UI_CTRL, r != E_INVALID_OPERATION, r, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The current state of the instance prohibits the execution of the specified operation."); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, E_SYSTEM, "[E_SYSTEM] A system error has occurred."); + + return r; +} + +bool +Gallery::IsSlideShowStarted(void) const +{ + const _GalleryImpl* pGalleryImpl = _GalleryImpl::GetInstance(*this); + SysAssertf(pGalleryImpl != null, "Not yet constructed. Construct() should be called before use."); + + bool slideShowStarted = pGalleryImpl->IsSlideShowStarted(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, slideShowStarted, E_SYSTEM, "[E_SYSTEM] A system error has occurred."); + + return slideShowStarted; +} + +result +Gallery::SetZoomingEnabled(bool enable) +{ + _GalleryImpl* pGalleryImpl = _GalleryImpl::GetInstance(*this); + SysAssertf(pGalleryImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pGalleryImpl->SetZoomingEnabled(enable); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, E_SYSTEM, "[E_SYSTEM] A system error has occurred."); + + return r; +} + +bool +Gallery::IsZoomingEnabled(void) const +{ + const _GalleryImpl* pGalleryImpl = _GalleryImpl::GetInstance(*this); + SysAssertf(pGalleryImpl != null, "Not yet constructed. Construct() should be called before use."); + + bool zoomingEnable = pGalleryImpl->IsZoomingEnabled(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, zoomingEnable, E_SYSTEM, "[E_SYSTEM] A system error has occurred."); + + return zoomingEnable; +} + +result +Gallery::SetBackgroundColor(const Color& color) +{ + _GalleryImpl* pGalleryImpl = _GalleryImpl::GetInstance(*this); + SysAssertf(pGalleryImpl != null, "Not yet constructed. Construct() should be called before use."); + + Color tempColor = color; + tempColor.SetAlpha(255); + pGalleryImpl->SetBackgroundColor(tempColor); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, E_SYSTEM, "[E_SYSTEM] A system error has occurred."); + + return r; +} + +Color +Gallery::GetBackgroundColor(void) const +{ + const _GalleryImpl* pGalleryImpl = _GalleryImpl::GetInstance(*this); + SysAssertf(pGalleryImpl != null, "Not yet constructed. Construct() should be called before use."); + + Color backgroundColor = pGalleryImpl->GetBackgroundColor(); + return backgroundColor; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlGalleryItem.cpp b/src/ui/controls/FUiCtrlGalleryItem.cpp new file mode 100644 index 0000000..d6dfa19 --- /dev/null +++ b/src/ui/controls/FUiCtrlGalleryItem.cpp @@ -0,0 +1,81 @@ +// +// 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 FUiCtrlGalleryItem.cpp + * @brief This file contains implementation of GalleryItem class. + */ + +//includes +#include +#include +#include +#include "FUiCtrl_GalleryItemImpl.h" + + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Io; + +namespace Tizen { namespace Ui { namespace Controls +{ + +GalleryItem::GalleryItem(void) + : __pImpl(null) +{ + // Do nothing +} + +GalleryItem::~GalleryItem(void) +{ + delete __pImpl; +} + +result +GalleryItem::Construct(const Bitmap& bitmap, GalleryImageRotation rotation) +{ + return Construct(bitmap, L"", rotation); +} + +result +GalleryItem::Construct(const Bitmap& bitmap, const String& filePath, GalleryImageRotation rotation) +{ + _GalleryItemImpl* pImpl = _GalleryItemImpl::GetInstance(*this); + SysAssertf(pImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + result r = E_SUCCESS; + if (filePath != L"") + { + SysTryReturn(NID_UI_CTRL, File::IsFileExist(filePath), E_FILE_NOT_FOUND, E_FILE_NOT_FOUND, "[E_FILE_NOT_FOUND] File does not exist."); + } + + String imagefilePath(filePath); + + pImpl = _GalleryItemImpl::CreateGalleryItemImplN(this, bitmap, rotation, imagefilePath); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pImpl = pImpl; + + return E_SUCCESS; + +CATCH: + delete pImpl; + + return r; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlGroupContainer.cpp b/src/ui/controls/FUiCtrlGroupContainer.cpp new file mode 100644 index 0000000..e3c6999 --- /dev/null +++ b/src/ui/controls/FUiCtrlGroupContainer.cpp @@ -0,0 +1,328 @@ +// +// 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 FUiCtrlGroupContainer.cpp + * @brief This is the implementation file for GroupContainer class. + */ + +#include +#include +#include +#include "FUiCtrl_GroupContainerImpl.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Ui; + +namespace Tizen { namespace Ui { namespace Controls +{ + +GroupContainer::GroupContainer(void) +{ + +} + +GroupContainer::~GroupContainer(void) +{ + +} + +result +GroupContainer::Construct(const Rectangle& rect, int rowCount, int columnCount, int lineWidth) +{ + result r = E_SUCCESS; + _GroupContainerImpl* pGroupContainerImpl = _GroupContainerImpl::GetInstance(*this); + SysAssertf(pGroupContainerImpl == null, "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class."); + + pGroupContainerImpl = _GroupContainerImpl::CreateGroupContainerImplN(this, rect, rowCount, columnCount, lineWidth); + + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, pGroupContainerImpl != null, r, "Propagating."); + + pGroupContainerImpl->Initialize(); + _pControlImpl = pGroupContainerImpl; + + return E_SUCCESS; +} + +result +GroupContainer::Construct(const FloatRectangle& rect, int rowCount, int columnCount, float lineWidth) +{ + result r = E_SUCCESS; + _GroupContainerImpl* pGroupContainerImpl = _GroupContainerImpl::GetInstance(*this); + SysAssertf(pGroupContainerImpl == null, "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class."); + + pGroupContainerImpl = _GroupContainerImpl::CreateGroupContainerImplFN(this, rect, rowCount, columnCount, lineWidth); + + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, pGroupContainerImpl != null, r, "Propagating."); + + pGroupContainerImpl->Initialize(); + _pControlImpl = pGroupContainerImpl; + + return E_SUCCESS; +} + +result +GroupContainer::AddControlAt(Control& control, int rowIndex, int columnIndex) +{ + _GroupContainerImpl* pGroupContainerImpl = _GroupContainerImpl::GetInstance(*this); + SysAssertf(pGroupContainerImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pGroupContainerImpl->AddControlAt(control, rowIndex, columnIndex); +} + +const Control* +GroupContainer::GetControlAt(int rowIndex, int columnIndex) const +{ + _GroupContainerImpl* pGroupContainerImpl = const_cast<_GroupContainerImpl*>(_GroupContainerImpl::GetInstance(*this)); + SysAssertf(pGroupContainerImpl != null, "Not yet constructed! Construct() should be called before use."); + + return pGroupContainerImpl->GetControlAt(rowIndex, columnIndex); +} + +Control* +GroupContainer::GetControlAt(int rowIndex, int columnIndex) +{ + _GroupContainerImpl* pGroupContainerImpl = _GroupContainerImpl::GetInstance(*this); + SysAssertf(pGroupContainerImpl != null, "Not yet constructed! Construct() should be called before use."); + + return pGroupContainerImpl->GetControlAt(rowIndex, columnIndex); +} + +result +GroupContainer::RemoveControlAt(int rowIndex, int columnIndex) +{ + _GroupContainerImpl* pGroupContainerImpl = _GroupContainerImpl::GetInstance(*this); + SysAssertf(pGroupContainerImpl != null, "Not yet constructed! Construct() should be called before use."); + + return pGroupContainerImpl->RemoveControlAt(rowIndex, columnIndex); +} + +result +GroupContainer::SetColumnWidth(int columnIndex, int width) +{ + _GroupContainerImpl* pGroupContainerImpl = _GroupContainerImpl::GetInstance(*this); + SysAssertf(pGroupContainerImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pGroupContainerImpl->SetColumnWidth(columnIndex, width); +} + +result +GroupContainer::SetColumnWidth(int columnIndex, float width) +{ + _GroupContainerImpl* pGroupContainerImpl = _GroupContainerImpl::GetInstance(*this); + SysAssertf(pGroupContainerImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pGroupContainerImpl->SetColumnWidth(columnIndex, width); +} + +int +GroupContainer::GetColumnWidth(int columnIndex) const +{ + _GroupContainerImpl* pGroupContainerImpl = const_cast<_GroupContainerImpl*>(_GroupContainerImpl::GetInstance(*this)); + SysAssertf(pGroupContainerImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pGroupContainerImpl->GetColumnWidth(columnIndex); +} + +float +GroupContainer::GetColumnWidthF(int columnIndex) const +{ + _GroupContainerImpl* pGroupContainerImpl = const_cast<_GroupContainerImpl*>(_GroupContainerImpl::GetInstance(*this)); + SysAssertf(pGroupContainerImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pGroupContainerImpl->GetColumnWidthF(columnIndex); +} + +result +GroupContainer::SetRowHeight(int rowIndex, int height) +{ + _GroupContainerImpl* pGroupContainerImpl = _GroupContainerImpl::GetInstance(*this); + SysAssertf(pGroupContainerImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pGroupContainerImpl->SetRowHeight(rowIndex, height); +} + +result +GroupContainer::SetRowHeight(int rowIndex, float height) +{ + _GroupContainerImpl* pGroupContainerImpl = _GroupContainerImpl::GetInstance(*this); + SysAssertf(pGroupContainerImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pGroupContainerImpl->SetRowHeight(rowIndex, height); +} + +int +GroupContainer::GetRowHeight(int rowIndex) const +{ + _GroupContainerImpl* pGroupContainerImpl = const_cast<_GroupContainerImpl*>(_GroupContainerImpl::GetInstance(*this)); + SysAssertf(pGroupContainerImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pGroupContainerImpl->GetRowHeight(rowIndex); +} + +float +GroupContainer::GetRowHeightF(int rowIndex) const +{ + _GroupContainerImpl* pGroupContainerImpl = const_cast<_GroupContainerImpl*>(_GroupContainerImpl::GetInstance(*this)); + SysAssertf(pGroupContainerImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pGroupContainerImpl->GetRowHeightF(rowIndex); +} + +result +GroupContainer::Merge(int rowStartIndex, int columnStartIndex, int rowCount, int columnCount) +{ + _GroupContainerImpl* pGroupContainerImpl = _GroupContainerImpl::GetInstance(*this); + SysAssertf(pGroupContainerImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pGroupContainerImpl->Merge(rowStartIndex, columnStartIndex, rowCount, columnCount); +} + +result +GroupContainer::SetChildResizingEnabled(int rowIndex, int columnIndex, bool enable) +{ + _GroupContainerImpl* pGroupContainerImpl = _GroupContainerImpl::GetInstance(*this); + SysAssertf(pGroupContainerImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pGroupContainerImpl->SetChildResizingEnabled(rowIndex, columnIndex, enable); +} + +result +GroupContainer::SetMargin(int rowIndex, int columnIndex, int leftMargin, int topMargin, int rightMargin, int bottomMargin) +{ + _GroupContainerImpl* pGroupContainerImpl = _GroupContainerImpl::GetInstance(*this); + SysAssertf(pGroupContainerImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pGroupContainerImpl->SetMargin(rowIndex, columnIndex, leftMargin, topMargin, rightMargin, bottomMargin); +} + +result +GroupContainer::SetMargin(int rowIndex, int columnIndex, float leftMargin, float topMargin, float rightMargin, float bottomMargin) +{ + _GroupContainerImpl* pGroupContainerImpl = _GroupContainerImpl::GetInstance(*this); + SysAssertf(pGroupContainerImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pGroupContainerImpl->SetMargin(rowIndex, columnIndex, leftMargin, topMargin, rightMargin, bottomMargin); +} + +result +GroupContainer::Split(int rowIndex, int columnIndex) +{ + _GroupContainerImpl* pGroupContainerImpl = _GroupContainerImpl::GetInstance(*this); + SysAssertf(pGroupContainerImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pGroupContainerImpl->Split(rowIndex, columnIndex); +} + +Rectangle +GroupContainer::GetBoundsAt(int rowIndex, int columnIndex) const +{ + const _GroupContainerImpl* pGroupContainerImpl = _GroupContainerImpl::GetInstance(*this); + SysAssertf(pGroupContainerImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pGroupContainerImpl->GetBoundsAt(rowIndex, columnIndex); +} + +FloatRectangle +GroupContainer::GetBoundsAtF(int rowIndex, int columnIndex) const +{ + const _GroupContainerImpl* pGroupContainerImpl = _GroupContainerImpl::GetInstance(*this); + SysAssertf(pGroupContainerImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pGroupContainerImpl->GetBoundsAtF(rowIndex, columnIndex); +} + +result +GroupContainer::SetColumnStretchable(int columnIndex, bool stretchable) +{ + _GroupContainerImpl* pGroupContainerImpl = _GroupContainerImpl::GetInstance(*this); + SysAssertf(pGroupContainerImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pGroupContainerImpl->SetColumnStretchable(columnIndex, stretchable); +} + +bool +GroupContainer::IsColumnStretchable(int columnIndex) const +{ + _GroupContainerImpl* pGroupContainerImpl = const_cast<_GroupContainerImpl*>(_GroupContainerImpl::GetInstance(*this)); + SysAssertf(pGroupContainerImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pGroupContainerImpl->IsColumnStretchable(columnIndex); +} + +result +GroupContainer::SetRowStretchable(int rowIndex, bool stretchable) +{ + _GroupContainerImpl* pGroupContainerImpl = _GroupContainerImpl::GetInstance(*this); + SysAssertf(pGroupContainerImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pGroupContainerImpl->SetRowStretchable(rowIndex, stretchable); +} + +bool +GroupContainer::IsRowStretchable(int rowIndex) const +{ + _GroupContainerImpl* pGroupContainerImpl = const_cast<_GroupContainerImpl*>(_GroupContainerImpl::GetInstance(*this)); + SysAssertf(pGroupContainerImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pGroupContainerImpl->IsRowStretchable(rowIndex); +} + +Color +GroupContainer::GetBackgroundColor(void) const +{ + const _GroupContainerImpl* pGroupContainerImpl = _GroupContainerImpl::GetInstance(*this); + SysAssertf(pGroupContainerImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pGroupContainerImpl->GetBackgroundColor(); +} + +void +GroupContainer::SetBackgroundColor(const Color& color) +{ + _GroupContainerImpl* pGroupContainerImpl = _GroupContainerImpl::GetInstance(*this); + SysAssertf(pGroupContainerImpl != null, "Not yet constructed! Construct() should be called before use."); + + pGroupContainerImpl->SetBackgroundColor(color); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to set the background color."); +} + +Color +GroupContainer::GetLineColor(void) const +{ + _GroupContainerImpl* pGroupContainerImpl = const_cast<_GroupContainerImpl*>(_GroupContainerImpl::GetInstance(*this)); + SysAssertf(pGroupContainerImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pGroupContainerImpl->GetLineColor(); +} + +void +GroupContainer::SetLineColor(const Color& color) +{ + _GroupContainerImpl* pGroupContainerImpl = _GroupContainerImpl::GetInstance(*this); + SysAssertf(pGroupContainerImpl != null, "Not yet constructed! Construct() should be called before use."); + + pGroupContainerImpl->SetLineColor(color); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Unable to set the line color."); +} + +}}} //Tizen::Ui::Controls + diff --git a/src/ui/controls/FUiCtrlGroupItem.cpp b/src/ui/controls/FUiCtrlGroupItem.cpp new file mode 100644 index 0000000..b5b6f51 --- /dev/null +++ b/src/ui/controls/FUiCtrlGroupItem.cpp @@ -0,0 +1,147 @@ +// +// 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 FUiCtrlGroupItem.cpp + * @brief This is the implementation file for GroupItem class. + * + * This header file contains the implementation of GroupItem class. + */ + +#include +#include +#include "FUiCtrl_GroupItemImpl.h" +#include "FUi_CoordinateSystemUtils.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +GroupItem::GroupItem(void) + : _pImpl(null) +{ +} + +GroupItem::~GroupItem(void) +{ + delete _pImpl; + _pImpl = null; +} + +result +GroupItem::Construct(const Dimension& itemSize) +{ + return Construct(_CoordinateSystemUtils::ConvertToFloat(itemSize)); +} + +result +GroupItem::Construct(const FloatDimension& itemSize) +{ + result r = E_SUCCESS; + + _GroupItemImpl* pGroupItemImpl = _GroupItemImpl::GetInstance(*this); + SysAssertf((pGroupItemImpl == null), + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pGroupItemImpl = _GroupItemImpl::CreateGroupItemImpN(this, itemSize); + SysTryReturn(NID_UI_CTRL, (pGroupItemImpl != null), GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _pImpl = pGroupItemImpl; + + return r; +} + +result +GroupItem::SetBackgroundBitmap(const Bitmap* pBitmap) +{ + SysAssertf(_pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return _pImpl->SetBackgroundBitmap(pBitmap); +} + +result +GroupItem::SetBackgroundColor(const Color& color) +{ + SysAssertf(_pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return _pImpl->SetBackgroundColor(color); +} + +Color +GroupItem::GetBackgroundColor(void) const +{ + SysAssertf(_pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return _pImpl->GetBackgroundColor(); +} + +result +GroupItem::SetTextColor(const Color& color) +{ + SysAssertf(_pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return _pImpl->SetTextColor(color); +} + +Color +GroupItem::GetTextColor(void) const +{ + SysAssertf(_pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return _pImpl->GetTextColor(); +} + +result +GroupItem::SetTextSize(int size) +{ + return SetTextSize(_CoordinateSystemUtils::ConvertToFloat(size)); +} + +result +GroupItem::SetTextSize(float size) +{ + SysAssertf(_pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return _pImpl->SetTextSize(size); +} + +int +GroupItem::GetTextSize(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetTextSizeF()); +} + +float +GroupItem::GetTextSizeF(void) const +{ + SysAssertf(_pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return _pImpl->GetTextSize(); +} + + +result +GroupItem::SetElement(const String& text, const Bitmap* pBitmap) +{ + SysAssertf(_pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return _pImpl->SetElement(text, pBitmap); +} + +}}} //Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlGroupedList.cpp b/src/ui/controls/FUiCtrlGroupedList.cpp new file mode 100644 index 0000000..1e9504f --- /dev/null +++ b/src/ui/controls/FUiCtrlGroupedList.cpp @@ -0,0 +1,624 @@ +// +// 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 FUiCtrlGroupedList.cpp +* @brief This file contains implementation of GroupedList class +*/ + + +#include +#include +#include "FUiCtrl_GroupedListImpl.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls { + +GroupedList::GroupedList(void) +{ + +} + +GroupedList::~GroupedList(void) +{ + +} + +result +GroupedList::Construct(const Rectangle& rect, CustomListStyle style, bool itemDivider, bool fastScroll) +{ + result r = E_SUCCESS; + _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pImpl = _GroupedListImpl::CreateGroupedListImplN(this, rect, itemDivider, fastScroll); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlImpl = pImpl; + + r = pImpl->SetListStyle(style); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "Internal Error"); + + r = pImpl->Initialize(); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "Internal Error"); + + r = pImpl->LoadDefaultBitmap(); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "Internal Error"); + + ClearLastResult(); + + return E_SUCCESS; + +CATCH: + Dispose(); + return E_SYSTEM; +} + +result +GroupedList::AddGroup(const String& text, const Bitmap* pBackgroundBitmap, int groupId) +{ + _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->AddGroup(text, pBackgroundBitmap, groupId); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +GroupedList::InsertGroupAt(int groupIndex, const String& text, const Bitmap* pBackgroundBitmap, int groupId) +{ + _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->InsertGroupAt(groupIndex, text, pBackgroundBitmap, groupId); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +GroupedList::SetGroupAt(int groupIndex, const String& text, const Bitmap* pBackgroundBitmap, int groupId) +{ + _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->SetGroupAt(groupIndex, text, pBackgroundBitmap, groupId); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +GroupedList::RemoveAllGroups(void) +{ + _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->RemoveAllGroups(); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +int +GroupedList::GetGroupCount(void) const +{ + const _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + SetLastResult(E_SUCCESS); + return pImpl->GetGroupCount(); +} + +void +GroupedList::AddFastScrollEventListener(IFastScrollEventListener& listener) +{ + _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->AddFastScrollEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + SetLastResult(E_SUCCESS); + + return; +} + +void +GroupedList::RemoveFastScrollEventListener(IFastScrollEventListener& listener) +{ + _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->RemoveFastScrollEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + SetLastResult(E_SUCCESS); + + return; +} + +void +GroupedList::AddGroupedItemEventListener(IGroupedItemEventListener& listener) +{ + _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->AddGroupedItemEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + SetLastResult(E_SUCCESS); + + return; +} + +void +GroupedList::RemoveGroupedItemEventListener(IGroupedItemEventListener& listener) +{ + _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->RemoveGroupedItemEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + SetLastResult(E_SUCCESS); + + return; +} + +result +GroupedList::AddItem(int groupIndex, const CustomListItem& item, int itemId) +{ + _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->AddItem(groupIndex, item, itemId); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +GroupedList::InsertItemAt(int groupIndex, int itemIndex, const CustomListItem& item, int itemId) +{ + _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->InsertItemAt(groupIndex, itemIndex, item, itemId); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +GroupedList::SetItemAt(int groupIndex, int itemIndex, const CustomListItem& item, int itemId) +{ + _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->SetItemAt(groupIndex, itemIndex, item, itemId); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +GroupedList::RemoveItemAt(int groupIndex, int itemIndex) +{ + _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->RemoveItemAt(groupIndex, itemIndex); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +GroupedList::RemoveGroupAt(int groupIndex) +{ + _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->RemoveGroupAt(groupIndex); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +GroupedList::RemoveAllItems(void) +{ + _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->RemoveAllItems(); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +GroupedList::RemoveAllItemsAt(int groupIndex) +{ + _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->RemoveAllItemsAt(groupIndex); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +GroupedList::RemoveAllCheckedItemsAt(int groupIndex) +{ + _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->RemoveAllCheckedItemsAt(groupIndex); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +int +GroupedList::GetItemCountAt(int groupIndex) const +{ + const _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetSubItemCountAt(groupIndex); +} + +const CustomListItem* +GroupedList::GetItemAt(int groupIndex, int itemIndex) const +{ + const _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + SysTryReturn(NID_UI_CTRL, (groupIndex >= 0 && itemIndex >= 0), null, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. groupIndex(%d) itemIndex(%d)", groupIndex, itemIndex); + + const CustomListItem* pItem = pImpl->GetCustomListItemAt(groupIndex, itemIndex); + return pItem; +} + +result +GroupedList::SetItemEnabled(int groupIndex, int itemIndex, bool enable) +{ + _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->SetItemEnabled(groupIndex, itemIndex, enable); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +bool +GroupedList::IsItemEnabled(int groupIndex, int itemIndex) const +{ + const _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + SetLastResult(E_SUCCESS); + return pImpl->IsItemEnabled(groupIndex, itemIndex); +} + +result +GroupedList::SetItemChecked(int groupIndex, int itemIndex, bool check) +{ + _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->SetItemChecked(groupIndex, itemIndex, check); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +bool +GroupedList::IsItemChecked(int groupIndex, int itemIndex) const +{ + const _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + SetLastResult(E_SUCCESS); + return pImpl->IsItemChecked(groupIndex, itemIndex); +} + +result +GroupedList::SetAllItemsChecked(int groupIndex, bool check) +{ + _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->SetAllItemsChecked(groupIndex, check); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +GroupedList::RemoveAllCheckedItems(void) +{ + _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->RemoveAllCheckedItems(); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +GroupedList::GetFirstCheckedItemIndex(int& groupIndex, int& itemIndex) const +{ + const _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->GetFirstCheckedItemIndex(groupIndex, itemIndex); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +GroupedList::GetLastCheckedItemIndex(int& groupIndex, int& itemIndex) const +{ + const _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->GetLastCheckedItemIndex(groupIndex, itemIndex); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +GroupedList::GetNextCheckedItemIndexAfter(int& groupIndex, int& itemIndex) const +{ + const _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->GetNextCheckedItemIndexAfter(groupIndex, itemIndex); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +GroupedList::GetItemIndexFromPosition(int x, int y, int& groupIndex, int& itemIndex) const +{ + const _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->GetItemIndexFromPosition(Point(x, y), groupIndex, itemIndex); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +GroupedList::GetItemIndexFromPosition(const Point& position, int& groupIndex, int& itemIndex) const +{ + const _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->GetItemIndexFromPosition(position, groupIndex, itemIndex); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +GroupedList::GetTopDrawnItemIndex(int& groupIndex, int& itemIndex) const +{ + const _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->GetTopDrawnItemIndex(groupIndex, itemIndex); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +GroupedList::GetBottomDrawnItemIndex(int& groupIndex, int& itemIndex) const +{ + const _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->GetBottomDrawnItemIndex(groupIndex, itemIndex); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +void +GroupedList::SetBackgroundColor(const Color& color) +{ + _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetListBackgroundColor(color); + SetLastResult(E_SUCCESS); + return; +} + +void +GroupedList::SetTextOfEmptyList(const String& text) +{ + _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetTextOfEmptyList(text); + SetLastResult(E_SUCCESS); + return; +} + +void +GroupedList::SetTextColorOfEmptyList(const Color& color) +{ + _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetTextColorOfEmptyList(color); + SetLastResult(E_SUCCESS); + return; +} + +Color +GroupedList::GetTextColorOfEmptyList(void) const +{ + const _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + SetLastResult(E_SUCCESS); + return pImpl->GetTextColorOfEmptyList(); +} + +int +GroupedList::GetGroupIndexFromGroupId(int groupId) const +{ + const _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + SetLastResult(E_SUCCESS); + return pImpl->GetGroupIndexFromGroupId(groupId); +} + + +result +GroupedList::GetItemIndexFromItemId(int itemId, int& groupIndex, int& itemIndex) const +{ + const _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->GetItemIndexFromItemId(itemId, groupIndex, itemIndex); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +int +GroupedList::GetItemIdAt(int groupIndex, int itemIndex) const +{ + const _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + SetLastResult(E_SUCCESS); + return pImpl->GetItemIdAt(groupIndex, itemIndex); +} + +int +GroupedList::GetGroupIdAt(int groupIndex) const +{ + const _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + SetLastResult(E_SUCCESS); + return pImpl->GetGroupIdAt(groupIndex); +} + +void +GroupedList::ScrollToBottom(void) +{ + _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + SetLastResult(E_SUCCESS); + pImpl->ScrollToBottom(); +} + +void +GroupedList::ScrollToTop(void) +{ + _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + SetLastResult(E_SUCCESS); + pImpl->ScrollToTop(); +} + +result +GroupedList::ScrollToTop(int groupIndex, int itemIndex) +{ + _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->ScrollToTop(groupIndex, itemIndex); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +GroupedList::ScrollToTop(int groupIndex) +{ + _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->ScrollToTop(groupIndex); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +GroupedList::SetFastScrollMainIndex(const String& text) +{ + _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->SetFastScrollMainIndex(text); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +GroupedList::RefreshItem(int groupIndex, int itemIndex) +{ + _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->RefreshItem(groupIndex, itemIndex); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +GroupedList::RefreshGroup(int groupIndex) +{ + _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->RefreshGroup(groupIndex); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +}}} //Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlGroupedListView.cpp b/src/ui/controls/FUiCtrlGroupedListView.cpp new file mode 100644 index 0000000..e9f2722 --- /dev/null +++ b/src/ui/controls/FUiCtrlGroupedListView.cpp @@ -0,0 +1,676 @@ +// +// 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 FUiCtrlGroupedListView.cpp + * @brief This is the implementation file for GroupedListView class. + * + * This header file contains the implementation of GroupedListView class. + */ + +#include +#include +#include "FUiCtrl_GroupedListViewImpl.h" +#include "FUi_CoordinateSystemUtils.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +GroupedListView::GroupedListView(void) +{ +} + +GroupedListView::~GroupedListView(void) +{ +} + +result +GroupedListView::Construct(const Rectangle& rect, GroupedListViewStyle style, bool itemDivider, bool fastScroll) +{ + result r = E_SUCCESS; + + _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl == null, + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + if (fastScroll == true) + { + pImpl = _GroupedListViewImpl::CreateGroupedListViewImplN(this, style, itemDivider, SCROLL_STYLE_FAST_SCROLL); + } + else + { + 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] Memory allocation failed."); + + _pControlImpl = pImpl; + + r = Control::SetBounds(_CoordinateSystemUtils::ConvertToFloat(rect)); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; + +CATCH: + Control::Dispose(); + return r; +} + +result +GroupedListView::Construct(const Rectangle& rect, GroupedListViewStyle style, bool itemDivider, ListScrollStyle scrollStyle) +{ + result r = E_SUCCESS; + + SysAssertf((_GroupedListViewImpl::GetInstance(*this) == null), + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + _GroupedListViewImpl* pImpl = _GroupedListViewImpl::CreateGroupedListViewImplN(this, style, itemDivider, scrollStyle); + SysTryReturn(NID_UI_CTRL, (pImpl != null), GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _pControlImpl = pImpl; + + r = Control::SetBounds(_CoordinateSystemUtils::ConvertToFloat(rect)); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + +CATCH: + Control::Dispose(); + return r; +} + +result +GroupedListView::Construct(const FloatRectangle& rect, GroupedListViewStyle style, bool itemDivider, ListScrollStyle scrollStyle) +{ + result r = E_SUCCESS; + + SysAssertf((_GroupedListViewImpl::GetInstance(*this) == null), + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + _GroupedListViewImpl* pImpl = _GroupedListViewImpl::CreateGroupedListViewImplN(this, style, itemDivider, scrollStyle); + SysTryReturn(NID_UI_CTRL, (pImpl != null), GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _pControlImpl = pImpl; + + r = Control::SetBounds(rect); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + +CATCH: + Control::Dispose(); + return r; +} + +result +GroupedListView::SetItemProvider(IGroupedListViewItemProvider& provider) +{ + _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetItemProvider(provider); +} + +result +GroupedListView::SetItemProvider(IGroupedListViewItemProviderF& provider) +{ + _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetItemProvider(provider); +} + +void +GroupedListView::AddGroupedListViewItemEventListener(IGroupedListViewItemEventListener& listener) +{ + _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->AddGroupedListViewItemEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); +} + +void +GroupedListView::RemoveGroupedListViewItemEventListener(IGroupedListViewItemEventListener& listener) +{ + _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->RemoveGroupedListViewItemEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); +} + +void +GroupedListView::AddFastScrollListener(IFastScrollListener& listener) +{ + _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->AddFastScrollListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); +} + +void +GroupedListView::RemoveFastScrollListener(IFastScrollListener& listener) +{ + _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->RemoveFastScrollListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); +} + +void +GroupedListView::AddScrollEventListener(IScrollEventListener& listener) +{ + _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->AddScrollEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); +} + +void +GroupedListView::AddScrollEventListener(IScrollEventListenerF& listener) +{ + _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->AddScrollEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); +} + +void +GroupedListView::RemoveScrollEventListener(IScrollEventListener& listener) +{ + _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->RemoveScrollEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); +} + +void +GroupedListView::RemoveScrollEventListener(IScrollEventListenerF& listener) +{ + _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->RemoveScrollEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); +} + +void +GroupedListView::AddUiLinkEventListener(IUiLinkEventListener& listener) +{ + _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->AddUiLinkEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); +} + +void +GroupedListView::RemoveUiLinkEventListener(IUiLinkEventListener& listener) +{ + _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->RemoveUiLinkEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); +} + +result +GroupedListView::SetSweepEnabled(bool enable) +{ + _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetSweepEnabled(enable); +} + +result +GroupedListView::SetFastScrollIndex(const String& text, bool useSearchIcon) +{ + _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetFastScrollIndex(text, useSearchIcon); +} + +result +GroupedListView::GetTopDrawnItemIndex(int& groupIndex, int& itemIndex) const +{ + const _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetTopDrawnItemIndex(groupIndex, itemIndex); +} + +result +GroupedListView::GetBottomDrawnItemIndex(int& groupIndex, int& itemIndex) const +{ + const _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetBottomDrawnItemIndex(groupIndex, itemIndex); +} + +result +GroupedListView::ScrollToItem(int groupIndex, int itemIndex) +{ + return ScrollToItem(groupIndex, itemIndex, LIST_SCROLL_ITEM_ALIGNMENT_TOP); +} + +result +GroupedListView::ScrollToItem(int groupIndex, int itemIndex, ListScrollItemAlignment itemAlignment) +{ + _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->ScrollToItem(groupIndex, itemIndex, itemAlignment); +} + +result +GroupedListView::SetItemChecked(int groupIndex, int itemIndex, bool check) +{ + _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetItemChecked(groupIndex, itemIndex, check); +} + +bool +GroupedListView::IsItemChecked(int groupIndex, int itemIndex) const +{ + const _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsItemChecked(groupIndex, itemIndex); +} + +result +GroupedListView::SetItemEnabled(int groupIndex, int itemIndex, bool enable) +{ + _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetItemEnabled(groupIndex, itemIndex, enable); +} + +bool +GroupedListView::IsItemEnabled(int groupIndex, int itemIndex) const +{ + const _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsItemEnabled(groupIndex, itemIndex); +} + +int +GroupedListView::GetGroupCount(void) const +{ + const _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetGroupCount(); +} + +int +GroupedListView::GetItemCountAt(int groupIndex) const +{ + const _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetItemCountAt(groupIndex); +} + +result +GroupedListView::ShowItemDescriptionText(int groupIndex, int itemIndex) +{ + _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->ShowItemDescriptionText(groupIndex, itemIndex); +} + +result +GroupedListView::HideItemDescriptionText(int groupIndex, int itemIndex) +{ + _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->HideItemDescriptionText(groupIndex, itemIndex); +} + +result +GroupedListView::RefreshList(int groupIndex, int itemIndex, ListRefreshType type) +{ + _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->RefreshList(groupIndex, itemIndex, type); +} + +result +GroupedListView::RefreshList(int groupIndex, int itemIndex, int elementId) +{ + _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->RefreshList(groupIndex, itemIndex, elementId); +} + +result +GroupedListView::UpdateList(void) +{ + _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->UpdateList(); +} + +result +GroupedListView::GetItemIndexFromPosition(int x, int y, int& groupIndex, int& itemIndex) const +{ + return GetItemIndexFromPosition(Point(x, y), groupIndex, itemIndex); +} + +result +GroupedListView::GetItemIndexFromPosition(float x, float y, int& groupIndex, int& itemIndex) const +{ + return GetItemIndexFromPosition(FloatPoint(x, y), groupIndex, itemIndex); +} + +result +GroupedListView::GetItemIndexFromPosition(const Point& position, int& groupIndex, int& itemIndex) const +{ + const _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetItemIndexFromPosition(_CoordinateSystemUtils::ConvertToFloat(position), groupIndex, itemIndex); +} + +result +GroupedListView::GetItemIndexFromPosition(const FloatPoint& position, int& groupIndex, int& itemIndex) const +{ + const _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetItemIndexFromPosition(position, groupIndex, itemIndex); +} + +result +GroupedListView::GetItemIndexFromPosition(int x, int y, int& groupIndex, int& itemIndex, int& elementId) const +{ + return GetItemIndexFromPosition(Point(x, y), groupIndex, itemIndex, elementId); +} + +result +GroupedListView::GetItemIndexFromPosition(float x, float y, int& groupIndex, int& itemIndex, int& elementId) const +{ + return GetItemIndexFromPosition(FloatPoint(x, y), groupIndex, itemIndex, elementId); +} + +result +GroupedListView::GetItemIndexFromPosition(const Point& position, int& groupIndex, int& itemIndex, int& elementId) const +{ + const _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetItemIndexFromPosition(_CoordinateSystemUtils::ConvertToFloat(position), groupIndex, itemIndex, elementId); +} + +result +GroupedListView::GetItemIndexFromPosition(const FloatPoint& position, int& groupIndex, int& itemIndex, int& elementId) const +{ + const _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetItemIndexFromPosition(position, groupIndex, itemIndex, elementId); +} + +result +GroupedListView::SetSectionColor(const Color& color) +{ + _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetSectionColor(color); +} + +Color +GroupedListView::GetSectionColor(void) const +{ + const _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetSectionColor(); +} + +result +GroupedListView::SetItemDividerColor(const Color& color) +{ + _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetItemDividerColor(color); +} + +Color +GroupedListView::GetItemDividerColor(void) const +{ + const _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetItemDividerColor(); +} + +result +GroupedListView::SetBackgroundColor(const Color& color) +{ + _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetListBackgroundColor(color); + + return E_SUCCESS; +} + +Color +GroupedListView::GetBackgroundColor(void) const +{ + const _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetBackgroundColor(); +} + +result +GroupedListView::SetBackgroundBitmap(const Bitmap* pBitmap) +{ + _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetBackgroundBitmap(pBitmap); +} + +result +GroupedListView::SetBitmapOfEmptyList(const Bitmap* pBitmap) +{ + _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetBitmapOfEmptyList(pBitmap); +} + +result +GroupedListView::SetTextOfEmptyList(const String& text) +{ + _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetTextOfEmptyList(text); +} + +String +GroupedListView::GetTextOfEmptyList(void) const +{ + const _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetTextOfEmptyList(); +} + +result +GroupedListView::SetTextColorOfEmptyList(const Color& color) +{ + _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetTextColorOfEmptyList(color); +} + +Color +GroupedListView::GetTextColorOfEmptyList(void) const +{ + const _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetTextColorOfEmptyList(); +} + +result +GroupedListView::ExpandGroup(int groupIndex) +{ + _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->ExpandGroup(groupIndex); +} + +result +GroupedListView::CollapseGroup(int groupIndex) +{ + _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->CollapseGroup(groupIndex); +} + +bool +GroupedListView::IsGroupExpanded(int groupIndex) const +{ + const _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsGroupExpanded(groupIndex); +} + +result +GroupedListView::ExpandAllGroups(void) +{ + _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->ExpandAllGroups(); +} + +result +GroupedListView::CollapseAllGroups(void) +{ + _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->CollapseAllGroups(); +} + +result +GroupedListView::BeginReorderingMode(void) +{ + _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->BeginReorderingMode(); +} + +result +GroupedListView::EndReorderingMode(void) +{ + _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->EndReorderingMode(); +} + +bool +GroupedListView::IsInReorderingMode(void) const +{ + const _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsInReorderingMode(); +} + +void +GroupedListView::SetScrollInputMode(ScrollInputMode mode) +{ + _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetScrollInputMode(mode); +} + +ScrollInputMode +GroupedListView::GetScrollInputMode(void) const +{ + const _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetScrollInputMode(); +} + +result +GroupedListView::OpenContextItem(int groupIndex, int itemIndex) +{ + _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->OpenContextItem(groupIndex, itemIndex); +} + +result +GroupedListView::CloseContextItem(int groupIndex, int itemIndex) +{ + _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->CloseContextItem(groupIndex, itemIndex); +} + +bool +GroupedListView::IsContextItemOpened(int groupIndex, int itemIndex) const +{ + const _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsContextItemOpened(groupIndex, itemIndex); +} + +}}} //Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlGroupedTableView.cpp b/src/ui/controls/FUiCtrlGroupedTableView.cpp new file mode 100644 index 0000000..1167643 --- /dev/null +++ b/src/ui/controls/FUiCtrlGroupedTableView.cpp @@ -0,0 +1,605 @@ +// +// 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 FUiCtrlGroupedTableView.cpp +* @brief This is the implementation file for GroupedTableView class. +* +* This header file contains the implementation of GroupedTableView class. +*/ + +#include +#include +#include +#include +#include +#include "FUiCtrl_TableViewImpl.h" +#include "FUi_CoordinateSystemUtils.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +//////////////////////////////////////////////////////////////////////////////// +/// GroupedTableView class + +GroupedTableView::GroupedTableView(void) +{ +} + +GroupedTableView::~GroupedTableView(void) +{ +} + +result +GroupedTableView::Construct(const Tizen::Graphics::Rectangle& rect, bool itemDivider, TableViewScrollBarStyle scrollStyle) +{ + result r = E_SUCCESS; + + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pImpl = _TableViewImpl::CreateTableViewImplN(this, _CoordinateSystemUtils::ConvertToFloat(rect), TABLE_VIEW_STYLE_GROUPED, itemDivider, scrollStyle); + + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pImpl != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlImpl = pImpl; + + r = SetBounds(rect); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating", GetErrorMessage(r)); + + return E_SUCCESS; + +CATCH: + Control::Dispose(); + + return r; +} + +result +GroupedTableView::Construct(const Tizen::Graphics::FloatRectangle& rect, bool itemDivider, TableViewScrollBarStyle scrollStyle) +{ + result r = E_SUCCESS; + + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pImpl = _TableViewImpl::CreateTableViewImplN(this, rect, TABLE_VIEW_STYLE_GROUPED, itemDivider, scrollStyle); + + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pImpl != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlImpl = pImpl; + + r = SetBounds(rect); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating", GetErrorMessage(r)); + + return E_SUCCESS; + +CATCH: + Control::Dispose(); + + return r; +} + +void +GroupedTableView::SetItemProvider(IGroupedTableViewItemProvider* pProvider) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetGroupedStyleItemProvider(pProvider); +} + +void +GroupedTableView::SetItemProviderF(IGroupedTableViewItemProviderF* pProvider) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetGroupedStyleItemProviderF(pProvider); +} + +result +GroupedTableView::AddGroupedTableViewItemEventListener(IGroupedTableViewItemEventListener& listener) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->AddGroupedTableViewItemEventListener(listener); +} + +result +GroupedTableView::RemoveGroupedTableViewItemEventListener(IGroupedTableViewItemEventListener& listener) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->RemoveGroupedTableViewItemEventListener(listener); +} + +result +GroupedTableView::AddFastScrollListener(IFastScrollListener& listener) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->AddFastScrollListener(listener); +} + +result +GroupedTableView::RemoveFastScrollListener(IFastScrollListener& listener) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->RemoveFastScrollListener(listener); +} + +result +GroupedTableView::AddScrollEventListener(IScrollEventListener& listener) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->AddScrollEventListener(listener); +} + +result +GroupedTableView::RemoveScrollEventListener(IScrollEventListener& listener) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->RemoveScrollEventListener(listener); +} + +result +GroupedTableView::AddScrollEventListener(IScrollEventListenerF& listener) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->AddScrollEventListener(listener); +} + +result +GroupedTableView::RemoveScrollEventListener(IScrollEventListenerF& listener) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->RemoveScrollEventListener(listener); +} + +void +GroupedTableView::SetCollapseByPinchGestureEnabled(bool enable) +{ + + //TODO : seperate +} + +bool +GroupedTableView::IsCollapseByPinchGestureEnabled(void) const +{ + //TODO : seperate + return false; +} + +result +GroupedTableView::SetFastScrollIndex(const String& text, bool useSearchIcon) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetFastScrollIndex(text, useSearchIcon); +} + +result +GroupedTableView::GetTopDrawnItemIndex(int& groupIndex, int& itemIndex) const +{ + const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetTopDrawnItemIndex(groupIndex, itemIndex); +} + +result +GroupedTableView::GetBottomDrawnItemIndex(int& groupIndex, int& itemIndex) const +{ + const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + + return pImpl->GetBottomDrawnItemIndex(groupIndex, itemIndex); +} + +result +GroupedTableView::SetItemChecked(int groupIndex, int itemIndex, bool check) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetItemChecked(groupIndex, itemIndex, check); +} + +bool +GroupedTableView::IsItemChecked(int groupIndex, int itemIndex) const +{ + const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsItemChecked(groupIndex, itemIndex); +} + +result +GroupedTableView::SetItemEnabled(int groupIndex, int itemIndex, bool enable) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetItemEnabled(groupIndex, itemIndex, enable); +} + +bool +GroupedTableView::IsItemEnabled(int groupIndex, int itemIndex) const +{ + const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsItemEnabled(groupIndex, itemIndex); +} + +int +GroupedTableView::GetGroupCount(void) const +{ + const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetGroupCount(); +} + +int +GroupedTableView::GetItemCountAt(int groupIndex) const +{ + const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetItemCountAt(groupIndex); +} + +result +GroupedTableView::RefreshItem(int groupIndex, int itemIndex, TableViewRefreshType type) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->RefreshTableView(groupIndex, itemIndex, type); +} + +result +GroupedTableView::RefreshAllItems(void) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->RefreshAllItems(); +} + +void +GroupedTableView::UpdateTableView(void) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->UpdateTableView(); +} + +void +GroupedTableView::GetItemIndexFromPosition(const Tizen::Graphics::Point& position, int& groupIndex, int& itemIndex) const +{ + const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->GetItemIndexFromPosition(position, groupIndex, itemIndex); +} + +void +GroupedTableView::GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& position, int& groupIndex, int& itemIndex) const +{ + const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->GetItemIndexFromPosition(position, groupIndex, itemIndex); +} + +void +GroupedTableView::SetItemDividerColor(const Color& color) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetItemDividerColor(color); +} + +Color +GroupedTableView::GetItemDividerColor(void) const +{ + const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetItemDividerColor(); +} + +void +GroupedTableView::SetBackgroundColor(const Color& color) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetBackgroundColor(color); + + return; +} + +Color +GroupedTableView::GetBackgroundColor(void) const +{ + const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetBackgroundColor(); +} + +result +GroupedTableView::ExpandGroup(int groupIndex) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->ExpandGroup(groupIndex); +} + +result +GroupedTableView::CollapseGroup(int groupIndex) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->CollapseGroup(groupIndex); +} + +result +GroupedTableView::ExpandAllGroups(void) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->ExpandAllGroup(); +} + +result +GroupedTableView::CollapseAllGroups(void) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->CollapseAllGroup(); +} + +bool +GroupedTableView::IsGroupExpanded(int groupIndex) const +{ + const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsGroupExpanded(groupIndex); +} + +void +GroupedTableView::SetGroupedLookEnabled(bool enable) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetGroupedLookEnabled(enable); +} + +bool +GroupedTableView::IsGroupedLookEnabled(void) const +{ + const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsGroupedLookEnabled(); +} + +result +GroupedTableView::ScrollToItem(int groupIndex, int itemIndex, TableViewScrollItemAlignment itemAlignment) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->ScrollToItem(groupIndex, itemIndex, itemAlignment); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +GroupedTableView::ScrollByPixel(int pixel) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->ScrollByPixel(_CoordinateSystemUtils::ConvertToFloat(pixel)); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +GroupedTableView::ScrollByPixel(float pixel) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->ScrollByPixel(pixel); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +int +GroupedTableView::GetCurrentScrollPosition(void) const +{ + const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return _CoordinateSystemUtils::ConvertToInteger(pImpl->GetCurrentScrollPosition()); +} + +float +GroupedTableView::GetCurrentScrollPositionF(void) const +{ + const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetCurrentScrollPosition(); +} + +void +GroupedTableView::SetScrollInputMode(ScrollInputMode mode) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + pImpl->SetScrollInputMode(mode); +} + +ScrollInputMode +GroupedTableView::GetScrollInputMode(void) const +{ + const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + return pImpl->GetScrollInputMode(); +} + +//void +//GroupedTableView::BeginReorderingMode(void) +//{ +// _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); +// SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); +// +// pImpl->BeginReorderingMode(); +//} +// +//void +//GroupedTableView::EndReorderingMode(void) +//{ +// _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); +// SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); +// +// pImpl->EndReorderingMode(); +//} +// +//bool +//GroupedTableView::IsInReorderingMode(void) const +//{ +// const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); +// SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); +// +// return pImpl->IsInReorderingMode(); +//} + +void +GroupedTableView::SetScrollEnabled(bool enable) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetScrollEnabled(enable); +} + +bool +GroupedTableView::IsScrollEnabled(void) const +{ + const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsScrollEnabled(); +} + +void +GroupedTableView::BeginReorderingMode(void) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->BeginReorderingMode(); +} + +void +GroupedTableView::EndReorderingMode(void) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->EndReorderingMode(); +} + +bool +GroupedTableView::IsInReorderingMode(void) const +{ + const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsInReorderingMode(); +} + +result +GroupedTableView::OpenContextItem(int groupIndex, int itemIndex) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + return pImpl->OpenContextItem(groupIndex, itemIndex); +} + +result +GroupedTableView::CloseContextItem(int groupIndex, int itemIndex) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + return pImpl->CloseContextItem(groupIndex, itemIndex); +} + +bool +GroupedTableView::IsContextItemOpened(int groupIndex, int itemIndex) const +{ + const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + return pImpl->IsContextItemOpened(groupIndex, itemIndex); +} + +}}} //Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlHeader.cpp b/src/ui/controls/FUiCtrlHeader.cpp new file mode 100644 index 0000000..02d0828 --- /dev/null +++ b/src/ui/controls/FUiCtrlHeader.cpp @@ -0,0 +1,753 @@ +// +// 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 FUiCtrlHeader.cpp + * @brief This is the implementation file for Header class. + */ + +#include +#include +#include "FUiCtrl_HeaderImpl.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +result +Header::Construct(void) +{ + SysAssertf(_pControlImpl == null, + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + result r = E_SUCCESS; + + _HeaderImpl* pImpl = _HeaderImpl::CreateHeaderImplN(this); + + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlImpl = pImpl; + + return r; +} + +result +Header::AddItem(const HeaderItem& item) +{ + _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->AddItem(item); +} + +ButtonItemStatus +Header::GetButtonStatus(ButtonPosition position) const +{ + ClearLastResult(); + + const _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->GetButtonStatus(position); +} + +Color +Header::GetButtonColor(ButtonItemStatus status) const +{ + ClearLastResult(); + + const _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->GetButtonColor(status); +} + +Color +Header::GetButtonTextColor(ButtonItemStatus status) const +{ + ClearLastResult(); + + const _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->GetButtonTextColor(status); +} + +String +Header::GetDescriptionText(void) const +{ + ClearLastResult(); + + const _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->GetDescriptionText(); +} + +Color +Header::GetDescriptionTextColor(void) const +{ + ClearLastResult(); + + const _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->GetDescriptionTextColor(); +} + +Color +Header::GetItemColor(HeaderItemStatus status) const +{ + ClearLastResult(); + + const _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->GetItemColor(status); +} + +int +Header::GetItemCount(void) const +{ + ClearLastResult(); + + const _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->GetItemCount(); +} + +result +Header::GetItemStatus(int itemIndex, HeaderItemStatus& status) const +{ + const _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->GetItemStatus(itemIndex, status); +} + +Color +Header::GetItemTextColor(HeaderItemStatus status) const +{ + ClearLastResult(); + + const _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->GetItemTextColor(status); +} + +HeaderStyle +Header::GetStyle(void) const +{ + ClearLastResult(); + + const _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->GetStyle(); +} + +int +Header::GetSelectedItemIndex(void) const +{ + ClearLastResult(); + + const _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->GetSelectedItemIndex(); +} + +String +Header::GetTitleText(void) const +{ + ClearLastResult(); + + const _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->GetTitleText(); +} + +Color +Header::GetTitleTextColor(void) const +{ + ClearLastResult(); + + const _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->GetTitleTextColor(); +} + +Color +Header::GetColor(void) const +{ + ClearLastResult(); + + const _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->GetColor(); +} + +AnimationStatus +Header::GetWaitingAnimationStatus(HeaderAnimationPosition animationPos) const +{ + ClearLastResult(); + + const _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->GetWaitingAnimationStatus(animationPos); +} + +result +Header::InsertItemAt(int itemIndex, const HeaderItem& item) +{ + _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->InsertItemAt(itemIndex, item); +} + +bool +Header::IsButtonSet(ButtonPosition position) const +{ + ClearLastResult(); + + const _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->IsButtonSet(position); +} + +result +Header::PauseWaitingAnimation(HeaderAnimationPosition animationPos) +{ + _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->PauseWaitingAnimation(animationPos); +} + +result +Header::PlayWaitingAnimation(HeaderAnimationPosition animationPos) +{ + _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->PlayWaitingAnimation(animationPos); +} + +result +Header::RemoveAllButtons(void) +{ + _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->RemoveAllButtons(); +} + +result +Header::RemoveAllItems(void) +{ + _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->RemoveAllItems(); +} + +result +Header::RemoveItemAt(int itemIndex) +{ + _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->RemoveItemAt(itemIndex); +} + +result +Header::RemoveButtonAt(ButtonPosition position) +{ + _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->RemoveButtonAt(position); +} + +result +Header::SetBackgroundBitmap(const Bitmap* pBitmap) +{ + _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->SetBackgroundBitmap(pBitmap); +} + +result +Header::SetButton(ButtonPosition position, const ButtonItem& button) +{ + _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->SetButton(position, button); +} + +result +Header::SetButtonColor(ButtonItemStatus status, const Color& color) +{ + _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->SetButtonColor(status, color); +} + +result +Header::SetButtonEnabled(ButtonPosition position, bool enable) +{ + _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->SetButtonEnabled(position, enable); +} + +result +Header::SetButtonTextColor(ButtonItemStatus status, const Color& color) +{ + _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->SetButtonTextColor(status, color); +} + +result +Header::SetButtonBadgeIcon(ButtonPosition position, const Bitmap* pBadgeIcon) +{ + _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->SetButtonBadgeIcon(position, pBadgeIcon); +} + +result +Header::SetButtonNumberedBadgeIcon(ButtonPosition position, int number) +{ + _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->SetButtonNumberedBadgeIcon(position, number); +} + +result +Header::SetItemAt(int itemIndex, const HeaderItem& item) +{ + _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->SetItemAt(itemIndex, item); +} + +result +Header::SetItemBadgeIcon(int itemIndex, const Bitmap* pBadgeIcon) +{ + _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->SetItemBadgeIcon(itemIndex, pBadgeIcon); +} + +result +Header::SetItemNumberedBadgeIcon(int itemIndex, int number) +{ + _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->SetItemNumberedBadgeIcon(itemIndex, number); +} + +result +Header::SetItemColor(HeaderItemStatus status, const Color& color) +{ + _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->SetItemColor(status, color); +} + +result +Header::SetItemEnabled(int itemIndex, bool enable) +{ + _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->SetItemEnabled(itemIndex, enable); +} + +result +Header::SetItemTextColor(HeaderItemStatus status, const Color& color) +{ + _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->SetItemTextColor(status, color); +} + +result +Header::SetItemSelected(int itemIndex) +{ + _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->SetItemSelected(itemIndex); +} + +result +Header::SetColor(const Color& color) +{ + _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->SetColor(color); +} + +result +Header::SetStyle(HeaderStyle style) +{ + _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->SetStyle(style); +} + +result +Header::SetTitleIcon(const Bitmap* pIcon) +{ + _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->SetTitleIcon(pIcon); +} + +result +Header::SetTitleText(const String& text) +{ + _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->SetTitleText(text); +} + +result +Header::SetTitleTextColor(const Color& color) +{ + _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->SetTitleTextColor(color); +} + +result +Header::SetDescriptionText(const String& text) +{ + _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->SetDescriptionText(text); +} + +result +Header::SetDescriptionTextColor(const Color& color) +{ + _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->SetDescriptionTextColor(color); +} + +result +Header::StopWaitingAnimation(HeaderAnimationPosition animationPos) +{ + _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->StopWaitingAnimation(animationPos); +} + +void +Header::AddActionEventListener(IActionEventListener& listener) +{ + _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pHeaderImpl->AddActionEventListener(listener); + + return; +} + +void +Header::RemoveActionEventListener(IActionEventListener& listener) +{ + _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pHeaderImpl->RemoveActionEventListener(listener); + + return; +} + +bool +Header::IsTabEditModeEnabled(void) const +{ + ClearLastResult(); + + const _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->IsTabEditModeEnabled(); +} + +result +Header::SetTabEditModeEnabled(bool enable) +{ + _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->SetTabEditModeEnabled(enable); +} + +result +Header::SetBackButton(void) +{ + _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->SetBackButton(); +} + +bool +Header::IsBackButtonSet(void) const +{ + ClearLastResult(); + + const _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->IsBackButtonSet(); +} + +void +Header::RemoveBackButton(void) +{ + _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pHeaderImpl->RemoveBackButton(); + + return; +} + +result +Header::SetBackButtonEnabled(bool enable) +{ + _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->SetBackButtonEnabled(enable); +} + +ButtonItemStatus +Header::GetBackButtonStatus(void) const +{ + ClearLastResult(); + + const _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->GetBackButtonStatus(); +} + +Rectangle +Header::GetButtonBounds(ButtonPosition position) const +{ + ClearLastResult(); + + const _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->GetButtonBounds(position); +} + +FloatRectangle +Header::GetButtonBoundsF(ButtonPosition position) const +{ + ClearLastResult(); + + const _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->GetButtonBoundsF(position); +} + +result +Header::SetTitleBadgeIcon(const Bitmap* pBadgeIcon) +{ + _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->SetTitleBadgeIcon(pBadgeIcon); +} + +result +Header::SetTitleNumberedBadgeIcon(int number) +{ + _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*this); + + SysAssertf(pHeaderImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pHeaderImpl->SetTitleNumberedBadgeIcon(number); +} + +Header::Header(void) +{ +} + +Header::~Header(void) +{ +} + +}}} //Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlHeaderItem.cpp b/src/ui/controls/FUiCtrlHeaderItem.cpp new file mode 100644 index 0000000..3219955 --- /dev/null +++ b/src/ui/controls/FUiCtrlHeaderItem.cpp @@ -0,0 +1,129 @@ +// +// 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 FUiCtrlHeaderItem.cpp +* @brief This is the implementation file for HeaderItem class. +*/ + +#include +#include +#include +#include "FUiCtrl_HeaderItemImpl.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +HeaderItem::HeaderItem(void) + : __pImpl(null) +{ +} + +HeaderItem::~HeaderItem(void) +{ + if (__pImpl) + { + delete __pImpl; + __pImpl = null; + } +} + +result +HeaderItem::Construct(int actionId) +{ + result r = E_SUCCESS; + + 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); + SysAssertf(pImpl == null, + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + __pImpl = new (std::nothrow) _HeaderItemImpl(this); + SysTryReturnResult(NID_UI_CTRL, __pImpl, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Impl instance is not constructed"); + + r = __pImpl->Construct(actionId); + + if (IsFailed(r)) + { + delete __pImpl; + __pImpl = null; + SysLog(NID_UI_CTRL, "[%s] Propagated.", GetErrorMessage(r)); + return r; + } + + return r; +} + +int +HeaderItem::GetActionId(void) const +{ + SysAssertf(__pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return __pImpl->GetActionId(); +} + +String +HeaderItem::GetText(void) const +{ + SysAssertf(__pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return __pImpl->GetText(); +} + +result +HeaderItem::SetActionId(int actionId) +{ + SysAssertf(__pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return __pImpl->SetActionId(actionId); +} + +result +HeaderItem::SetBackgroundBitmap(HeaderItemStatus status, const Bitmap* pBitmap) +{ + SysAssertf(__pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return __pImpl->SetBackgroundBitmap(status, pBitmap); +} + +result +HeaderItem::SetIcon(HeaderItemStatus status, const Bitmap* pIcon) +{ + SysAssertf(__pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return __pImpl->SetIcon(status, pIcon); +} + +result +HeaderItem::SetText(const String& text) +{ + SysAssertf(__pImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return __pImpl->SetText(text); +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlIGroupedListViewItemEventListener.cpp b/src/ui/controls/FUiCtrlIGroupedListViewItemEventListener.cpp new file mode 100644 index 0000000..6b92bb9 --- /dev/null +++ b/src/ui/controls/FUiCtrlIGroupedListViewItemEventListener.cpp @@ -0,0 +1,47 @@ +// +// 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 FUiCtrlIGroupedListViewItemEventListener.cpp + * @brief This is the implementation file for IGroupedListViewItemEventListener class. + * + * This header file contains the implementation of IGroupedListViewItemEventListener class. + */ + +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +void +IGroupedListViewItemEventListener::OnGroupedListViewItemLongPressed(GroupedListView& listView, int groupIndex, int itemIndex, + int elementId, bool& invokeListViewItemCallback) +{ +} + +void +IGroupedListViewItemEventListener::OnGroupedListViewGroupItemSelected(GroupedListView& listView, int groupIndex) +{ +} + +void +IGroupedListViewItemEventListener::OnGroupedListViewItemReordered(GroupedListView& listView, + int groupIndexFrom, int itemIndexFrom, int groupIndexTo, int itemIndexTo) +{ +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlIGroupedListViewItemProvider.cpp b/src/ui/controls/FUiCtrlIGroupedListViewItemProvider.cpp new file mode 100644 index 0000000..4ea3017 --- /dev/null +++ b/src/ui/controls/FUiCtrlIGroupedListViewItemProvider.cpp @@ -0,0 +1,36 @@ +// +// 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 FUiCtrlIGroupedListViewItemProvider.cpp + * @brief This is the implementation file for IGroupedListViewItemProvider class. + * + * This header file contains the implementation of IGroupedListViewItemProvider class. + */ + +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +bool +IGroupedListViewItemProvider::IsReorderable(int groupIndexFrom, int groupIndexTo) +{ + return true; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlIGroupedListViewItemProviderF.cpp b/src/ui/controls/FUiCtrlIGroupedListViewItemProviderF.cpp new file mode 100644 index 0000000..b874679 --- /dev/null +++ b/src/ui/controls/FUiCtrlIGroupedListViewItemProviderF.cpp @@ -0,0 +1,36 @@ +// +// 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 FUiCtrlIGroupedListViewItemProviderF.cpp + * @brief This is the implementation file for IGroupedListViewItemProviderF class. + * + * This header file contains the implementation of IGroupedListViewItemProviderF class. + */ + +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +bool +IGroupedListViewItemProviderF::IsReorderable(int groupIndexFrom, int groupIndexTo) +{ + return true; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlIListViewItemEventListener.cpp b/src/ui/controls/FUiCtrlIListViewItemEventListener.cpp new file mode 100644 index 0000000..2eb4868 --- /dev/null +++ b/src/ui/controls/FUiCtrlIListViewItemEventListener.cpp @@ -0,0 +1,41 @@ +// +// 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 FUiCtrlIListViewItemEventListener.cpp + * @brief This is the implementation file for IListViewItemEventListener class. + * + * This header file contains the implementation of IListViewItemEventListener class. + */ + +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +void +IListViewItemEventListener::OnListViewItemLongPressed(ListView& listView, int index, int elementId, + bool& invokeListViewItemCallback) +{ +} + +void +IListViewItemEventListener::OnListViewItemReordered(ListView& listView, int indexFrom, int indexTo) +{ +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlIconList.cpp b/src/ui/controls/FUiCtrlIconList.cpp new file mode 100644 index 0000000..58ee3d7 --- /dev/null +++ b/src/ui/controls/FUiCtrlIconList.cpp @@ -0,0 +1,474 @@ +// +// 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 FUiCtrlIconList.cpp + * @brief This is the implementation file for FUiCtrlIconList class + * + * This file contains the implementation of FUiCtrlIconList class + */ + +#include +#include +#include "FUiCtrl_IconListImpl.h" + +using namespace Tizen::Base; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +IconList::IconList(void) +{ +} + +IconList::~IconList(void) +{ +} + +result +IconList::Construct(const Rectangle& rect, IconListStyle style, int itemWidth, int itemHeight) +{ + result r = E_SUCCESS; + + SysAssertf((_IconListImpl::GetInstance(*this) == null), + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + _IconListImpl* pImpl = _IconListImpl::CreateIconListImplN(this); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlImpl = pImpl; + + r = Control::SetBounds(rect.x, rect.y, rect.width, rect.height); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "Internal Error"); + + // Set Initial Parameters + + r = pImpl->SetIconListStyle(style); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "Internal Error"); + + r = pImpl->InitializeIconList(itemWidth, itemHeight); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "Internal Error"); + + r = pImpl->SetItemProvider(); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "Internal Error"); + + r = pImpl->SetListener(); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "Internal Error"); + + r = pImpl->SetNonSlidable(); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "Internal Error"); + + return E_SUCCESS; + +CATCH: + Dispose(); + return r; +} + +void +IconList::AddItemEventListener(IItemEventListener& listener) +{ + _IconListImpl* pImpl = _IconListImpl::GetInstance(*this); + SysAssertf(pImpl, "Not yet constructed. Construct() should be called before use."); + + pImpl->AddItemEventListener(listener); +} + +void +IconList::RemoveItemEventListener(IItemEventListener& listener) +{ + _IconListImpl* pImpl = _IconListImpl::GetInstance(*this); + SysAssertf(pImpl, "Not yet constructed. Construct() should be called before use."); + + pImpl->RemoveItemEventListener(listener); +} + +void +IconList::SetBackgroundBitmap(const Bitmap& bitmap) +{ + _IconListImpl* pImpl = _IconListImpl::GetInstance(*this); + SysAssertf(pImpl, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetBackgroundBitmap(bitmap); + +} + +result +IconList::SetMargin(int topMargin, int leftMargin) +{ + _IconListImpl* pImpl = _IconListImpl::GetInstance(*this); + SysAssertf(pImpl, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetMargin(topMargin, leftMargin); +} + +int +IconList::GetTopMargin(void) const +{ + const _IconListImpl* pImpl = _IconListImpl::GetInstance(*this); + SysAssertf(pImpl, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetTopMargin(); +} + +int +IconList::GetLeftMargin(void) const +{ + const _IconListImpl* pImpl = _IconListImpl::GetInstance(*this); + SysAssertf(pImpl, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetLeftMargin(); +} + +result +IconList::AddItem(const String* pText, const Bitmap* pNormalBitmap, const Bitmap* pFocusedBitmap, int itemId) +{ + _IconListImpl* pImpl = _IconListImpl::GetInstance(*this); + SysAssertf(pImpl, "Not yet constructed. Construct() should be called before use."); + + return pImpl->AddItem(pText, pNormalBitmap, pFocusedBitmap, itemId); +} + +result +IconList::InsertItemAt(int index, const String* pText, const Bitmap* pNormalBitmap, const Bitmap* pFocusedBitmap, int itemId) +{ + _IconListImpl* pImpl = _IconListImpl::GetInstance(*this); + SysAssertf(pImpl, "Not yet constructed. Construct() should be called before use."); + + return pImpl->InsertItemAt(index, pText, pNormalBitmap, pFocusedBitmap, itemId); +} + +result +IconList::SetItemAt(int index, const String* pText, const Bitmap* pNormalBitmap, const Bitmap* pFocusedBitmap, int itemId) +{ + _IconListImpl* pImpl = _IconListImpl::GetInstance(*this); + SysAssertf(pImpl, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetItemAt(index, pText, pNormalBitmap, pFocusedBitmap, itemId); +} + +result +IconList::RemoveItemAt(int index) +{ + _IconListImpl* pImpl = _IconListImpl::GetInstance(*this); + SysAssertf(pImpl, "Not yet constructed. Construct() should be called before use."); + + return pImpl->RemoveItemAt(index); +} + +result +IconList::RemoveAllItems(void) +{ + _IconListImpl* pImpl = _IconListImpl::GetInstance(*this); + SysAssertf(pImpl, "Not yet constructed. Construct() should be called before use."); + + return pImpl->RemoveAllItems(); +} + +int +IconList::GetColumnCount(void) const +{ + const _IconListImpl* pImpl = _IconListImpl::GetInstance(*this); + SysAssertf(pImpl, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetColumnCount(); +} + +int +IconList::GetItemCount(void) const +{ + const _IconListImpl* pImpl = _IconListImpl::GetInstance(*this); + SysAssertf(pImpl, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetItemCount(); +} + +result +IconList::SetItemChecked(int index, bool check) +{ + _IconListImpl* pImpl = _IconListImpl::GetInstance(*this); + SysAssertf(pImpl, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetItemChecked(index, check); +} + +bool +IconList::IsItemChecked(int index) const +{ + const _IconListImpl* pImpl = _IconListImpl::GetInstance(*this); + SysAssertf(pImpl, "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsItemChecked(index); +} + +result +IconList::SetAllItemsChecked(bool check) +{ + _IconListImpl* pImpl = _IconListImpl::GetInstance(*this); + SysAssertf(pImpl, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetAllItemsChecked(check); +} + +result +IconList::RemoveAllCheckedItems(void) +{ + _IconListImpl* pImpl = _IconListImpl::GetInstance(*this); + SysAssertf(pImpl, "Not yet constructed. Construct() should be called before use."); + + return pImpl->RemoveAllCheckedItems(); +} + +int +IconList::GetFirstCheckedItemIndex(void) const +{ + const _IconListImpl* pImpl = _IconListImpl::GetInstance(*this); + SysAssertf(pImpl, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetFirstCheckedItemIndex(); +} + +int +IconList::GetLastCheckedItemIndex(void) const +{ + const _IconListImpl* pImpl = _IconListImpl::GetInstance(*this); + SysAssertf(pImpl, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetLastCheckedItemIndex(); +} + +int +IconList::GetNextCheckedItemIndexAfter(int index) const +{ + const _IconListImpl* pImpl = _IconListImpl::GetInstance(*this); + SysAssertf(pImpl, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetNextCheckedItemIndexAfter(index); +} + +int +IconList::GetItemIndexFromPosition(int x, int y) const +{ + const _IconListImpl* pImpl = _IconListImpl::GetInstance(*this); + SysAssertf(pImpl, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetItemIndexFromPosition(Point(x, y)); +} + +int +IconList::GetItemIndexFromPosition(const Point& position) const +{ + const _IconListImpl* pImpl = _IconListImpl::GetInstance(*this); + SysAssertf(pImpl, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetItemIndexFromPosition(position); +} + +void +IconList::SetTextHorizontalAlignment(HorizontalAlignment alignment) +{ + _IconListImpl* pImpl = _IconListImpl::GetInstance(*this); + SysAssertf(pImpl, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetTextHorizontalAlignment(alignment); +} + +void +IconList::SetTextVerticalAlignment(VerticalAlignment alignment) +{ + _IconListImpl* pImpl = _IconListImpl::GetInstance(*this); + SysAssertf(pImpl, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetTextVerticalAlignment(alignment); +} + +HorizontalAlignment +IconList::GetTextHorizontalAlignment(void) const +{ + const _IconListImpl* pImpl = _IconListImpl::GetInstance(*this); + SysAssertf(pImpl, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetTextHorizontalAlignment(); +} + +VerticalAlignment +IconList::GetTextVerticalAlignment(void) const +{ + const _IconListImpl* pImpl = _IconListImpl::GetInstance(*this); + SysAssertf(pImpl, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetTextVerticalAlignment(); +} + +void +IconList::SetBackgroundColor(const Color& color) +{ + _IconListImpl* pImpl = _IconListImpl::GetInstance(*this); + SysAssertf(pImpl, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetBackgroundColor(color); +} + +void +IconList::SetTextOfEmptyList(const String& text) +{ + _IconListImpl* pImpl = _IconListImpl::GetInstance(*this); + SysAssertf(pImpl, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetTextOfEmptyList(text); +} + +void +IconList::SetTextColorOfEmptyList(const Color& color) +{ + _IconListImpl* pImpl = _IconListImpl::GetInstance(*this); + SysAssertf(pImpl, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetTextColorOfEmptyList(color); +} + +Color +IconList::GetTextColorOfEmptyList(void) const +{ + const _IconListImpl* pImpl = _IconListImpl::GetInstance(*this); + SysAssertf(pImpl, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetTextColorOfEmptyList(); +} + +void +IconList::SetItemTextColor(const Color& textColor) +{ + _IconListImpl* pImpl = _IconListImpl::GetInstance(*this); + SysAssertf(pImpl, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetItemTextColor(textColor); +} + +Color +IconList::GetItemTextColor(void) const +{ + const _IconListImpl* pImpl = _IconListImpl::GetInstance(*this); + SysAssertf(pImpl, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetItemTextColor(); + +} + +void +IconList::SetTextSize(int size) +{ + _IconListImpl* pImpl = _IconListImpl::GetInstance(*this); + SysAssertf(pImpl, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetTextSize(size); +} + +int +IconList::GetTextSize(void) const +{ + const _IconListImpl* pImpl = _IconListImpl::GetInstance(*this); + SysAssertf(pImpl, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetTextSize(); +} + +int +IconList::GetItemIndexFromItemId(int itemId) const +{ + const _IconListImpl* pImpl = _IconListImpl::GetInstance(*this); + SysAssertf(pImpl, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetItemIndexFromItemId(itemId); +} + +int +IconList::GetItemIdAt(int index) const +{ + const _IconListImpl* pImpl = _IconListImpl::GetInstance(*this); + SysAssertf(pImpl, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetItemIdAt(index); +} + +void +IconList::SetCheckBoxPosition(IconListCheckBoxPosition position) +{ + _IconListImpl* pImpl = _IconListImpl::GetInstance(*this); + SysAssertf(pImpl, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetCheckBoxPosition(position); +} + +IconListCheckBoxPosition +IconList::GetCheckBoxPosition(void) const +{ + const _IconListImpl* pImpl = _IconListImpl::GetInstance(*this); + SysAssertf(pImpl, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetCheckBoxPosition(); +} + +void +IconList::SetFocusAnimationEnabled(bool enable) +{ + _IconListImpl* pImpl = _IconListImpl::GetInstance(*this); + SysAssertf(pImpl, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetFocusAnimationEnabled(enable); +} + +void +IconList::ScrollToBottom(void) +{ + _IconListImpl* pImpl = _IconListImpl::GetInstance(*this); + SysAssertf(pImpl, "Not yet constructed. Construct() should be called before use."); + + return pImpl->ScrollToBottom(); +} + +void +IconList::ScrollToTop(void) +{ + _IconListImpl* pImpl = _IconListImpl::GetInstance(*this); + SysAssertf(pImpl, "Not yet constructed. Construct() should be called before use."); + + return pImpl->ScrollToTop(); +} + +result +IconList::ScrollToTop(int itemIndex) +{ + _IconListImpl* pImpl = _IconListImpl::GetInstance(*this); + SysAssertf(pImpl, "Not yet constructed. Construct() should be called before use."); + + return pImpl->ScrollToTop(itemIndex); +} + +result +IconList::RefreshItem(int index) +{ + _IconListImpl* pImpl = _IconListImpl::GetInstance(*this); + SysAssertf(pImpl, "Not yet constructed. Construct() should be called before use."); + + return pImpl->RefreshItem(index); +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlIconListView.cpp b/src/ui/controls/FUiCtrlIconListView.cpp new file mode 100644 index 0000000..b706220 --- /dev/null +++ b/src/ui/controls/FUiCtrlIconListView.cpp @@ -0,0 +1,797 @@ +// +// 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 FUiCtrlIconListView.cpp + * @brief This is the implementation file for the IconListView class. + */ + +//Includes +#include +#include +#include + +#include "FUi_CoordinateSystemUtils.h" +#include "FUiCtrl_IconListViewImpl.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @class IconListView + * @brief This class defines common behavior for a %IconListView control. + * @since 2.0 + * + * Details.... + * + * Example: + * + * @image html GUI_IconListView.png + * + * This is the simple UI application which uses a IconListView control. + * + * @code + + * @endcode + * + */ + +IconListView::IconListView(void) +{ + // Do nothing +} + +IconListView::~IconListView(void) +{ + // Do nothing +} + +result +IconListView::Construct(const Rectangle& rect, const Dimension& itemBitmapSize, IconListViewStyle style, + IconListViewScrollDirection scrollDirection, IconListViewScrollStyle scrollStyle) +{ + return Construct(_CoordinateSystemUtils::ConvertToFloat(rect), _CoordinateSystemUtils::ConvertToFloat(itemBitmapSize), style, + scrollDirection, scrollStyle); +} + +result +IconListView::Construct(const FloatRectangle& rect, const FloatDimension& itemBitmapSize, IconListViewStyle style, + IconListViewScrollDirection scrollDirection, IconListViewScrollStyle scrollStyle) +{ + // Check whether _pControlImpl has been set, that is, "already constructed" condition. + SysAssertf(_pControlImpl == null, + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + // Create _IconListViewImpl + _IconListViewImpl* pImpl = _IconListViewImpl::CreateIconListViewImplN(this); + SysTryReturn(NID_UI_CTRL, (pImpl != null), GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + // Set _IconListViewImpl + _pControlImpl = pImpl; + + // Set Bounds + result r = Control::SetBounds(rect.x, rect.y, rect.width, rect.height); + if (r != E_SUCCESS) + { + Dispose(); + Control::Dispose(); + return r; + } + + // Set Initial Parameters + r = pImpl->Initialize(this, itemBitmapSize, style, scrollDirection, scrollStyle); + if (r != E_SUCCESS) + { + Dispose(); + Control::Dispose(); + } + + return r; +} + +result +IconListView::SetItemProvider(IIconListViewItemProvider& provider) +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->SetItemProvider(provider); +} + +void +IconListView::AddIconListViewItemEventListener(IIconListViewItemEventListener& listener) +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + pImpl->AddIconListViewItemEventListener(listener); +} + +void +IconListView::RemoveIconListViewItemEventListener(IIconListViewItemEventListener& listener) +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + pImpl->RemoveIconListViewItemEventListener(listener); +} + +void +IconListView::AddScrollEventListener(IScrollEventListener& listener) +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + pImpl->AddScrollEventListener(listener); +} + +void +IconListView::AddScrollEventListener(IScrollEventListenerF& listener) +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + pImpl->AddScrollEventListener(listener); +} + +void +IconListView::RemoveScrollEventListener(IScrollEventListener& listener) +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + pImpl->RemoveScrollEventListener(listener); +} + +void +IconListView::RemoveScrollEventListener(IScrollEventListenerF& listener) +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + pImpl->RemoveScrollEventListener(listener); +} + +result +IconListView::SetBackgroundBitmap(const Bitmap* pBitmap) +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->SetBackgroundBitmap(pBitmap); +} + +result +IconListView::SetBackgroundColor(const Color& color) +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + pImpl->SetBackgroundColor(color); + + result r = GetLastResult(); + if (r != E_SUCCESS) + { + SysLogException(NID_UI_CTRL, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + return r; +} + +Color +IconListView::GetBackgroundColor(void) const +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + const _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->GetBackgroundColor(); +} + +result +IconListView::SetMargin(MarginType type, int value) +{ + return SetMargin(type, _CoordinateSystemUtils::ConvertToFloat(value)); +} + +result +IconListView::SetMargin(MarginType type, float value) +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->SetMargin(type, value); +} + +int +IconListView::GetMargin(MarginType type) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetMarginF(type)); +} + +float +IconListView::GetMarginF(MarginType type) const +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + const _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->GetMargin(type); +} + +result +IconListView::SetItemSpacing(int horizontalSpacing, int verticalSpacing) +{ + return SetItemSpacing(_CoordinateSystemUtils::ConvertToFloat(horizontalSpacing), _CoordinateSystemUtils::ConvertToFloat(verticalSpacing)); +} + +result +IconListView::SetItemSpacing(float horizontalSpacing, float verticalSpacing) +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->SetItemSpacing(horizontalSpacing, verticalSpacing); +} + +int +IconListView::GetItemHorizontalSpacing(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetItemHorizontalSpacingF()); +} + +float +IconListView::GetItemHorizontalSpacingF(void) const +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + const _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->GetItemHorizontalSpacing(); +} + +int +IconListView::GetItemVerticalSpacing(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetItemVerticalSpacingF()); +} + +float +IconListView::GetItemVerticalSpacingF(void) const +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + const _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->GetItemVerticalSpacing(); +} + +result +IconListView::SetItemChecked(int index, bool check) +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->SetItemChecked(index, check); +} + +bool +IconListView::IsItemChecked(int index) const +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + const _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->IsItemChecked(index); +} + +int +IconListView::GetItemIndexFromPosition(int x, int y) const +{ + return GetItemIndexFromPosition(_CoordinateSystemUtils::ConvertToFloat(x), _CoordinateSystemUtils::ConvertToFloat(y)); +} + +int +IconListView::GetItemIndexFromPosition(float x, float y) const +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + const _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->GetItemIndexFromPosition(x, y); +} + +int +IconListView::GetItemIndexFromPosition(const Point& position) const +{ + return GetItemIndexFromPosition(_CoordinateSystemUtils::ConvertToFloat(position)); +} + +int +IconListView::GetItemIndexFromPosition(const FloatPoint& position) const +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + const _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->GetItemIndexFromPosition(position); +} + +result +IconListView::SetTextHorizontalAlignment(HorizontalAlignment alignment) +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->SetTextHorizontalAlignment(alignment); +} + +result +IconListView::SetTextVerticalAlignment(IconListViewItemTextVerticalAlignment alignment) +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->SetTextVerticalAlignment(alignment); +} + +HorizontalAlignment +IconListView::GetTextHorizontalAlignment(void) const +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + const _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->GetTextHorizontalAlignment(); +} + +IconListViewItemTextVerticalAlignment +IconListView::GetTextVerticalAlignment(void) const +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + const _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->GetTextVerticalAlignment(); +} + +result +IconListView::SetTextOfEmptyList(const String& text) +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->SetTextOfEmptyList(text); +} + +String +IconListView::GetTextOfEmptyList(void) const +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + const _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->GetTextOfEmptyList(); +} + +result +IconListView::SetTextColorOfEmptyList(const Color& color) +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->SetTextColorOfEmptyList(color); +} + +Color +IconListView::GetTextColorOfEmptyList(void) const +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + const _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->GetTextColorOfEmptyList(); +} + +result +IconListView::SetItemTextColor(IconListViewItemDrawingStatus status, const Color& color) +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->SetItemTextColor(status, color); +} + +Color +IconListView::GetItemTextColor(IconListViewItemDrawingStatus status) const +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + const _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->GetItemTextColor(status); +} + +result +IconListView::SetItemTextSize(int size) +{ + return SetItemTextSize(_CoordinateSystemUtils::ConvertToFloat(size)); +} + +result +IconListView::SetItemTextSize(float size) +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->SetItemTextSize(size); +} + +int +IconListView::GetItemTextSize(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetItemTextSizeF()); +} + +float +IconListView::GetItemTextSizeF(void) const +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + const _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->GetItemTextSize(); +} + + +result +IconListView::SetCheckBoxPosition(IconListViewCheckBoxPosition position) +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->SetCheckBoxPosition(position); +} + +IconListViewCheckBoxPosition +IconListView::GetCheckBoxPosition(void) const +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + const _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->GetCheckBoxPosition(); +} + +result +IconListView::SetTouchAnimationEnabled(bool enable) +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->SetTouchAnimationEnabled(enable); +} + +bool +IconListView::IsTouchAnimationEnabled(void) const +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + const _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->IsTouchAnimationEnabled(); +} + +result +IconListView::ScrollToItem(int index) +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->ScrollToItem(index); +} + +result +IconListView::RefreshList(int index, ListRefreshType type) +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->RefreshList(index, type); +} + +result +IconListView::UpdateList(void) +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->UpdateList(); +} + +result +IconListView::GetItemBitmapSize(int& width, int& height) const +{ + float floatWidth = 0.0f; + float floatHeight = 0.0f; + + result r = GetItemBitmapSize(floatWidth, floatHeight); + + width = _CoordinateSystemUtils::ConvertToInteger(floatWidth); + height = _CoordinateSystemUtils::ConvertToInteger(floatHeight); + + return r; +} + +result +IconListView::GetItemBitmapSize(float& width, float& height) const +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + const _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->GetItemBitmapSize(width, height); +} + +Dimension +IconListView::GetItemBitmapSize(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetItemBitmapSizeF()); +} + +FloatDimension +IconListView::GetItemBitmapSizeF(void) const +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + const _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->GetItemBitmapSize(); +} + +result +IconListView::GetItemSize(int& width, int& height) const +{ + float floatWidth = 0.0f; + float floatHeight = 0.0f; + + result r = GetItemSize(floatWidth, floatHeight); + + width = _CoordinateSystemUtils::ConvertToInteger(floatWidth); + height = _CoordinateSystemUtils::ConvertToInteger(floatHeight); + + return r; +} + +result +IconListView::GetItemSize(float& width, float& height) const +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + const _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->GetItemSize(width, height); +} + +Dimension +IconListView::GetItemSize(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetItemSizeF()); +} + +FloatDimension +IconListView::GetItemSizeF(void) const +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + const _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->GetItemSize(); +} + +result +IconListView::SetMagneticScrollSize(int scrollSize) +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->SetMagneticScrollSize(scrollSize); +} + +int +IconListView::GetMagneticScrollSize(void) const +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + const _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->GetMagneticScrollSize(); +} + +int +IconListView::GetItemCountPerAxis(void) const +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + const _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->GetItemCountPerAxis(); +} + +result +IconListView::SetItemLayoutHorizontalAlignment(HorizontalAlignment alignment) +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->SetItemLayoutHorizontalAlignment(alignment); +} + +result +IconListView::SetItemLayoutVerticalAlignment(VerticalAlignment alignment) +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->SetItemLayoutVerticalAlignment(alignment); +} + +HorizontalAlignment +IconListView::GetItemLayoutHorizontalAlignment(void) const +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + const _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->GetItemLayoutHorizontalAlignment(); +} + +VerticalAlignment +IconListView::GetItemLayoutVerticalAlignment(void) const +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + const _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->GetItemLayoutVerticalAlignment(); +} + +result +IconListView::SetItemBorderStyle(IconListViewItemBorderStyle borderStyle) +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->SetItemBorderStyle(borderStyle); +} + +IconListViewItemBorderStyle +IconListView::GetItemBorderStyle(void) const +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + const _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->GetItemBorderStyle(); +} + +result +IconListView::SetBitmapOfEmptyList(const Bitmap* pBitmap) +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->SetBitmapOfEmptyList(pBitmap); +} + +result +IconListView::BeginReorderingMode(void) +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->BeginReorderingMode(); +} + +result +IconListView::EndReorderingMode(void) +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->EndReorderingMode(); +} + +bool +IconListView::IsInReorderingMode(void) const +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + const _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->IsInReorderingMode(); +} + +void +IconListView::SetScrollInputMode(ScrollInputMode mode) +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + pImpl->SetScrollInputMode(mode); +} + +ScrollInputMode +IconListView::GetScrollInputMode(void) const +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + const _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->GetScrollInputMode(); +} +result +IconListView::ScrollByPixel(int pixel) +{ + return ScrollByPixel(_CoordinateSystemUtils::ConvertToFloat(pixel)); +} + +result +IconListView::ScrollByPixel(float pixel) +{ + // Check whether _pControlImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(_pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + _IconListViewImpl* pImpl = _IconListViewImpl::GetInstance(*this); + return pImpl->ScrollByPixel(pixel); +} + +}}} //Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlIconListViewItem.cpp b/src/ui/controls/FUiCtrlIconListViewItem.cpp new file mode 100644 index 0000000..b977902 --- /dev/null +++ b/src/ui/controls/FUiCtrlIconListViewItem.cpp @@ -0,0 +1,80 @@ +// +// 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 FUiCtrlIconListViewItem.cpp + * @brief This is the implementation file for the IconListViewItem class. + */ + +// Includes +#include +#include + +#include "FUiCtrl_IconListViewItemImpl.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +IconListViewItem::IconListViewItem(void) + : __pImpl(null) +{ + // nothing +} + +IconListViewItem::~IconListViewItem(void) +{ + delete __pImpl; + __pImpl = null; +} + +result +IconListViewItem::Construct(const Bitmap& bitmap, const String* pText, const Bitmap* pSelectedBitmap, + const Bitmap* pHighlightedBitmap) +{ + // Check whether __pImpl has been set, that is, "already constructed" condition. + SysAssertf(__pImpl == null, + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + __pImpl = _IconListViewItemImpl::CreateIconListViewItemImplN(*this, bitmap, pText, pSelectedBitmap, pHighlightedBitmap); + + result r = GetLastResult(); + if (__pImpl == null) + { + SysLogException(NID_UI_CTRL, r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + r = E_SUCCESS; + } + + return r; +} + +result +IconListViewItem::SetOverlayBitmap(int overlayBitmapId, const Bitmap* pOverlayBitmap, + HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment) +{ + // Check whether __pImpl has not been set as a precondition of this method, that is, "not-yet constructed" condition. + SysAssertf(__pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return __pImpl->SetOverlayBitmap(overlayBitmapId, pOverlayBitmap, horizontalAlignment, verticalAlignment); +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlKeypad.cpp b/src/ui/controls/FUiCtrlKeypad.cpp new file mode 100644 index 0000000..388bb0f --- /dev/null +++ b/src/ui/controls/FUiCtrlKeypad.cpp @@ -0,0 +1,172 @@ +// +// 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 FUiCtrlKeypad.cpp +* @brief This file contains implementation of Keypad class +* +* This file contains implementation of Keypad class. +*/ + +#include +#include +#include "FUiCtrl_KeypadImpl.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; + +namespace Tizen { namespace Ui { namespace Controls +{ + +Keypad::Keypad(void) +{ + +} + +Keypad::~Keypad(void) +{ + +} + +result +Keypad::Construct(KeypadStyle keypadStyle, int limitLength) +{ + return Construct(keypadStyle, KEYPAD_MODE_ALPHA, limitLength); +} + +result +Keypad::Construct(KeypadStyle keypadStyle, KeypadInputModeCategory category, int limitLength) +{ + result r = E_SUCCESS; + + _KeypadImpl* pImpl = _KeypadImpl::GetInstance(*this); + SysAssertf(pImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + SysTryReturn(NID_UI_CTRL, limitLength > 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The invalid argument is given."); + + pImpl = _KeypadImpl::CreateKeypadImplN(this); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlImpl = pImpl; + + r = pImpl->Initialize(keypadStyle, category, limitLength); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + +CATCH: + delete pImpl; + _pControlImpl = null; + + return r; +} + +bool +Keypad::IsTextPredictionEnabled(void) const +{ + const _KeypadImpl* pKeypadImpl = _KeypadImpl::GetInstance(*this); + SysAssertf(pKeypadImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pKeypadImpl->IsTextPredictionEnabled(); +} + +result +Keypad::SetTextPredictionEnabled(bool enable) +{ + _KeypadImpl* pKeypadImpl = _KeypadImpl::GetInstance(*this); + SysAssertf(pKeypadImpl != null, "Not yet constructed. Construct() should be called before use."); + + pKeypadImpl->SetTextPredictionEnabled(enable); + + return E_SUCCESS; +} + +result +Keypad::SetSingleLineEnabled(bool enabled) +{ + _KeypadImpl* pKeypadImpl = _KeypadImpl::GetInstance(*this); + SysAssertf(pKeypadImpl != null, "Not yet constructed. Construct() should be called before use."); + return pKeypadImpl->SetSingleLineEnabled(enabled); +} + +bool +Keypad::IsSingleLineEnabled(void) const +{ + const _KeypadImpl* pKeypadImpl = _KeypadImpl::GetInstance(*this); + SysAssertf(pKeypadImpl != null, "Not yet constructed. Construct() should be called before use."); + return pKeypadImpl->IsSingleLineEnabled(); +} + +void +Keypad::AddTextEventListener(ITextEventListener& listener) +{ + _KeypadImpl* pKeypadImpl = _KeypadImpl::GetInstance(*this); + SysAssertf(pKeypadImpl != null, "Not yet constructed. Construct() should be called before use."); + pKeypadImpl->AddTextEventListener(listener); + + return; +} + +void +Keypad::RemoveTextEventListener(ITextEventListener& listener) +{ + _KeypadImpl* pKeypadImpl = _KeypadImpl::GetInstance(*this); + SysAssertf(pKeypadImpl != null, "Not yet constructed. Construct() should be called before use."); + pKeypadImpl->RemoveTextEventListener(listener); + + return; +} + +String +Keypad::GetText(void) const +{ + const _KeypadImpl* pKeypadImpl = _KeypadImpl::GetInstance(*this); + SysAssertf(pKeypadImpl != null, "Not yet constructed. Construct() should be called before use."); + return pKeypadImpl->GetText(); +} + +void +Keypad::SetText(String text) +{ + _KeypadImpl* pKeypadImpl = _KeypadImpl::GetInstance(*this); + SysAssertf(pKeypadImpl != null, "Not yet constructed. Construct() should be called before use."); + return pKeypadImpl->SetText(text); +} + +void +Keypad::SetEditTextFilter(IEditTextFilter* pFilter) +{ + _KeypadImpl* pKeypadImpl = _KeypadImpl::GetInstance(*this); + SysAssertf(pKeypadImpl != null, "Not yet constructed. Construct() should be called before use."); + + pKeypadImpl->SetEditTextFilter(pFilter); + + return; +} + +void +Keypad::SendOpaqueCommand (const Tizen::Base::String& command) +{ + _KeypadImpl* pKeypadImpl = _KeypadImpl::GetInstance(*this); + SysAssertf(pKeypadImpl != null, "Not yet constructed. Construct() should be called before use."); + + pKeypadImpl->SendOpaqueCommand(command); + + return; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlLabel.cpp b/src/ui/controls/FUiCtrlLabel.cpp new file mode 100644 index 0000000..cb12a28 --- /dev/null +++ b/src/ui/controls/FUiCtrlLabel.cpp @@ -0,0 +1,341 @@ +// +// 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 FUiCtrlLabel.cpp +* @brief This is the implementation file for Label class. +*/ + +#include +#include +#include "FUiCtrl_LabelImpl.h" + +#define MINIMUM_VALUE 0 +#define MAXIMUM_VALUE 65535 + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +Label::Label(void) +{ + +} + +Label::~Label(void) +{ + +} + +result +Label::Construct(const Rectangle& rect, const String& text) +{ + SysTryReturn(NID_UI_CTRL, (rect.width >= MINIMUM_VALUE && rect.width <= MAXIMUM_VALUE), E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] The width error occurred"); + + SysTryReturn(NID_UI_CTRL, (rect.height >= MINIMUM_VALUE && rect.height <= MAXIMUM_VALUE), E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] The height error occurred"); + + result r = E_SUCCESS; + _LabelImpl* pLabelImpl = _LabelImpl::GetInstance(*this); + + SysAssertf(pLabelImpl == null, + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pLabelImpl = _LabelImpl::CreateLabelImplN(this, rect); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pLabelImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pLabelImpl->SetText(text); + SysAssert(r == E_SUCCESS); // [ToDo] Exception. Which exception can occur? + + _pControlImpl = pLabelImpl; + + return E_SUCCESS; +} + +result +Label::Construct(const FloatRectangle& rect, const String& text) +{ + SysTryReturn(NID_UI_CTRL, (rect.width >= MINIMUM_VALUE && rect.width <= MAXIMUM_VALUE), E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] The width error occurred"); + + SysTryReturn(NID_UI_CTRL, (rect.height >= MINIMUM_VALUE && rect.height <= MAXIMUM_VALUE), E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] The height error occurred"); + + result r = E_SUCCESS; + _LabelImpl* pLabelImpl = _LabelImpl::GetInstance(*this); + + SysAssertf(pLabelImpl == null, + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pLabelImpl = _LabelImpl::CreateLabelImplN(this, rect); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pLabelImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pLabelImpl->SetText(text); + SysAssert(r == E_SUCCESS); // [ToDo] Exception. Which exception can occur? + + _pControlImpl = pLabelImpl; + + return E_SUCCESS; +} + +void +Label::SetText(const String& text) +{ + _LabelImpl* pLabelImpl = _LabelImpl::GetInstance(*this); + SysAssertf(pLabelImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pLabelImpl->SetText(text); + + return; +} + +String +Label::GetText(void) const +{ + const _LabelImpl* pLabelImpl = _LabelImpl::GetInstance(*this); + SysAssertf(pLabelImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pLabelImpl->GetText(); +} + +void +Label::SetBackgroundBitmap(const Bitmap& bitmap) +{ + _LabelImpl* pLabelImpl = _LabelImpl::GetInstance(*this); + SysAssertf(pLabelImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pLabelImpl->SetBackgroundBitmap(bitmap); + + return; +} + +void +Label::SetTextHorizontalAlignment(HorizontalAlignment alignment) +{ + _LabelImpl* pLabelImpl = _LabelImpl::GetInstance(*this); + SysAssertf(pLabelImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pLabelImpl->SetTextHorizontalAlignment(alignment); + + return; +} + +void +Label::SetTextVerticalAlignment(VerticalAlignment alignment) +{ + _LabelImpl* pLabelImpl = _LabelImpl::GetInstance(*this); + SysAssertf(pLabelImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pLabelImpl->SetTextVerticalAlignment(alignment); + + return; +} + +HorizontalAlignment +Label::GetTextHorizontalAlignment(void) const +{ + const _LabelImpl* pLabelImpl = _LabelImpl::GetInstance(*this); + SysAssertf(pLabelImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pLabelImpl->GetTextHorizontalAlignment(); +} + +VerticalAlignment +Label::GetTextVerticalAlignment(void) const +{ + const _LabelImpl* pLabelImpl = _LabelImpl::GetInstance(*this); + SysAssertf(pLabelImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pLabelImpl->GetTextVerticalAlignment(); +} + +void +Label::SetBackgroundColor(const Color& color) +{ + _LabelImpl* pLabelImpl = _LabelImpl::GetInstance(*this); + SysAssertf(pLabelImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pLabelImpl->SetBackgroundColor(color); + + return; +} + +Color +Label::GetBackgroundColor(void) const +{ + const _LabelImpl* pLabelImpl = _LabelImpl::GetInstance(*this); + SysAssertf(pLabelImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pLabelImpl->GetBackgroundColor(); +} + +void +Label::SetTextColor(const Color& color) +{ + _LabelImpl* pLabelImpl = _LabelImpl::GetInstance(*this); + SysAssertf(pLabelImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pLabelImpl->SetTextColor(color); + + return; +} + +Color +Label::GetTextColor(void) const +{ + const _LabelImpl* pLabelImpl = _LabelImpl::GetInstance(*this); + SysAssertf(pLabelImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pLabelImpl->GetTextColor(); +} + +void +Label::SetTextConfig(int size, LabelTextStyle style) +{ + _LabelImpl* pLabelImpl = _LabelImpl::GetInstance(*this); + SysAssertf(pLabelImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pLabelImpl->SetTextConfig(size, style); + + return; +} + +void +Label::SetTextConfig(float size, LabelTextStyle style) +{ + _LabelImpl* pLabelImpl = _LabelImpl::GetInstance(*this); + SysAssertf(pLabelImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pLabelImpl->SetTextConfig(size, style); + + return; +} + +int +Label::GetTextSize(void) const +{ + const _LabelImpl* pLabelImpl = _LabelImpl::GetInstance(*this); + SysAssertf(pLabelImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pLabelImpl->GetTextSize(); +} + +float +Label::GetTextSizeF(void) const +{ + const _LabelImpl* pLabelImpl = _LabelImpl::GetInstance(*this); + SysAssertf(pLabelImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pLabelImpl->GetTextSizeF(); +} + +LabelTextStyle +Label::GetTextStyle(void) const +{ + const _LabelImpl* pLabelImpl = _LabelImpl::GetInstance(*this); + SysAssertf(pLabelImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pLabelImpl->GetTextStyle(); +} + +result +Label::SetMargin(int topMargin, int leftMargin) +{ + _LabelImpl* pLabelImpl = _LabelImpl::GetInstance(*this); + SysAssertf(pLabelImpl != null, + "Not yet constructed. Construct() should be called before use."); + + result r = pLabelImpl->SetMargin(topMargin, leftMargin); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +Label::SetMargin(float topMargin, float leftMargin) +{ + _LabelImpl* pLabelImpl = _LabelImpl::GetInstance(*this); + SysAssertf(pLabelImpl != null, + "Not yet constructed. Construct() should be called before use."); + + result r = pLabelImpl->SetMargin(topMargin, leftMargin); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +int +Label::GetTopMargin(void) const +{ + const _LabelImpl* pLabelImpl = _LabelImpl::GetInstance(*this); + SysAssertf(pLabelImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pLabelImpl->GetTopMargin(); +} + +float +Label::GetTopMarginF(void) const +{ + const _LabelImpl* pLabelImpl = _LabelImpl::GetInstance(*this); + SysAssertf(pLabelImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pLabelImpl->GetTopMarginF(); +} + +int +Label::GetLeftMargin(void) const +{ + const _LabelImpl* pLabelImpl = _LabelImpl::GetInstance(*this); + SysAssertf(pLabelImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pLabelImpl->GetLeftMargin(); +} + +float +Label::GetLeftMarginF(void) const +{ + const _LabelImpl* pLabelImpl = _LabelImpl::GetInstance(*this); + SysAssertf(pLabelImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pLabelImpl->GetLeftMarginF(); +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlList.cpp b/src/ui/controls/FUiCtrlList.cpp new file mode 100644 index 0000000..b788fe3 --- /dev/null +++ b/src/ui/controls/FUiCtrlList.cpp @@ -0,0 +1,655 @@ +// +// 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 FUiCtrlList.cpp + * @brief This is the implementation file for List class. + * + * This file contains the implementation of List class. + */ + +#include +#include +#include "FUiCtrl_ListViewImpl.h" +#include "FUiCtrl_ListImpl.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Base; + +namespace Tizen { namespace Ui { namespace Controls +{ + +List::List(void) +{ + +} + +List::~List(void) +{ + +} + +result +List::Construct(const Rectangle& rect, ListStyle style, ListItemFormat itemFormat, int row1Height, int row2Height, int column1Width, int column2Width) +{ + result r = E_SUCCESS; + _ListImpl* pImpl = _ListImpl::GetInstance(*this); + + SysAssertf((pImpl == null), + "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class"); + + SysTryReturn(NID_UI_CTRL, (row1Height > 0 && row2Height >= 0), + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] row1Height must be greater than %d and row2Height must be greater than or equal to %d.", 0, 0); + + SysTryReturn(NID_UI_CTRL, (column1Width > 0 && column2Width >= 0), + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] column1Width must be greater than %d and column2Width must be greater than or equal to %d.", 0, 0); + + pImpl = _ListImpl::CreateListImplN(this, rect); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlImpl = pImpl; + + r = pImpl->UpdateBounds(rect); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pImpl->SetStyle(style); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] The current value of list style is invalid.", GetErrorMessage(r)); + + r = pImpl->Initialize(itemFormat, row1Height, row2Height, column1Width, column2Width); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pImpl->LoadDefaultBitmap(); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + ClearLastResult(); + + return r; + +CATCH: + Dispose(); + return r; + +} + +void +List::AddItemEventListener(IItemEventListener& listener) +{ + _ListImpl* pImpl = _ListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->AddItemEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + SetLastResult(E_SUCCESS); + + return; +} + +void +List::RemoveItemEventListener(IItemEventListener& listener) +{ + _ListImpl* pImpl = _ListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->RemoveItemEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + SetLastResult(E_SUCCESS); + + return; +} + +result +List::AddItem(const String* pText1, const String* pText2, + const Bitmap* pBitmap1, const Bitmap* pBitmap2, int itemId) +{ + _ListImpl* pImpl = _ListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->AddItem(pText1, pText2, pBitmap1, pBitmap2, itemId); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +List::InsertItemAt(int index, const String* pText1, const String* pText2, + const Bitmap* pBitmap1, const Bitmap* pBitmap2, int itemId) +{ + _ListImpl* pImpl = _ListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->InsertItemAt(index, pText1, pText2, pBitmap1, pBitmap2, itemId); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +List::SetItemAt(int index, const String* pText1, const String* pText2, + const Bitmap* pBitmap1, const Bitmap* pBitmap2, int itemId) +{ + _ListImpl* pImpl = _ListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->SetItemAt(index, pText1, pText2, pBitmap1, pBitmap2, itemId); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +List::RemoveItemAt(int index) +{ + _ListImpl* pImpl = _ListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->RemoveItemAt(index); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +List::RemoveAllItems(void) +{ + _ListImpl* pImpl = _ListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->RemoveAllItems(); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +int +List::GetItemCount(void) const +{ + const _ListImpl* pImpl = _ListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + SetLastResult(E_SUCCESS); + + return pImpl->GetItemCount(); +} + +result +List::SetItemEnabled(int index, bool enable) +{ + _ListImpl* pImpl = _ListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->SetItemEnabled(index, enable); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +bool +List::IsItemEnabled(int index) const +{ + const _ListImpl* pImpl = _ListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + SetLastResult(E_SUCCESS); + return pImpl->IsItemEnabled(index); +} + +void +List::SetFocusedItemBackgroundBitmap(const Bitmap& bitmap) +{ + _ListImpl* pImpl = _ListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetFocusedItemBackgroundBitmap(bitmap); + SetLastResult(E_SUCCESS); + + return; +} + +void +List::SetHighlightedItemBackgroundBitmap(const Bitmap& bitmap) +{ + _ListImpl* pImpl = _ListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetHighlightedItemBackgroundBitmap(bitmap); + SetLastResult(E_SUCCESS); + + return; +} + +void +List::SetNormalItemBackgroundBitmap(const Bitmap& bitmap) +{ + _ListImpl* pImpl = _ListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetNormalItemBackgroundBitmap(bitmap); + SetLastResult(E_SUCCESS); + + return; +} + +int +List::GetTopDrawnItemIndex(void) const +{ + const _ListImpl* pImpl = _ListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + int groupIndex = -1; + int itemIndex = -1; + + result r = pImpl->GetTopDrawnItemIndex(groupIndex, itemIndex); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + return itemIndex; +} + +int +List::GetBottomDrawnItemIndex(void) const +{ + const _ListImpl* pImpl = _ListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + int groupIndex = -1; + int itemIndex = -1; + + result r = pImpl->GetBottomDrawnItemIndex(groupIndex, itemIndex); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + return itemIndex; +} + +void +List::SetTextOfEmptyList(const String& text) +{ + _ListImpl* pImpl = _ListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetTextOfEmptyList(text); + SetLastResult(E_SUCCESS); + + return; +} + +void +List::SetTextColorOfEmptyList(const Color& color) +{ + _ListImpl* pImpl = _ListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetTextColorOfEmptyList(color); + SetLastResult(E_SUCCESS); + + return; +} + +Color +List::GetTextColorOfEmptyList(void) const +{ + const _ListImpl* pImpl = _ListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + SetLastResult(E_SUCCESS); + + return pImpl->GetTextColorOfEmptyList(); +} + +void +List::SetBackgroundColor(const Color& color) +{ + _ListImpl* pImpl = _ListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetBackgroundColor(color); + SetLastResult(E_SUCCESS); + + return; +} + +void +List::SetItemTextColor(ListItemText textIndex, const Color& textColor) +{ + _ListImpl* pImpl = _ListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetItemTextColor(textIndex, textColor); + SetLastResult(E_SUCCESS); + + return; +} + +Color +List::GetItemTextColor(ListItemText textIndex) const +{ + const _ListImpl* pImpl = _ListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + SetLastResult(E_SUCCESS); + + return pImpl->GetItemTextColor(textIndex); +} + +void +List::EnableTextSlide(ListItemText textIndex) +{ + _ListImpl* pImpl = _ListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->EnableTextSlide(textIndex); + SetLastResult(E_SUCCESS); + + return; +} + +void +List::DisableTextSlide(void) +{ + _ListImpl* pImpl = _ListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->DisableTextSlide(); + SetLastResult(E_SUCCESS); + + return; +} + +int +List::GetItemHeight(void) const +{ + const _ListImpl* pImpl = _ListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + SetLastResult(E_SUCCESS); + + return pImpl->GetItemHeight(); +} + +int +List::GetRow1Height(void) const +{ + const _ListImpl* pImpl = _ListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + SetLastResult(E_SUCCESS); + + return pImpl->GetRow1Height(); +} + +int +List::GetRow2Height(void) const +{ + const _ListImpl* pImpl = _ListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + SetLastResult(E_SUCCESS); + + return pImpl->GetRow2Height(); +} + +int +List::GetColumn1Width(void) const +{ + const _ListImpl* pImpl = _ListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + SetLastResult(E_SUCCESS); + + return pImpl->GetColumn1Width(); +} + +int +List::GetColumn2Width(void) const +{ + const _ListImpl* pImpl = _ListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + SetLastResult(E_SUCCESS); + + return pImpl->GetColumn2Width(); +} + +result +List::SetRow1Height(int row1Height) +{ + _ListImpl* pImpl = _ListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + SysTryReturn(NID_UI_CTRL, row1Height > 0, + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] row1Height must be greater than 0."); + + result r = pImpl->SetRow1Height(row1Height); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +List::SetRow2Height(int row2Height) +{ + _ListImpl* pImpl = _ListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + SysTryReturn(NID_UI_CTRL, row2Height >= 0, + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] row2Height must be greater than or equal to 0."); + + result r = pImpl->SetRow2Height(row2Height); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +List::SetColumn1Width(int column1Width) +{ + _ListImpl* pImpl = _ListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + SysTryReturn(NID_UI_CTRL, column1Width > 0, + E_SYSTEM, E_SYSTEM, "[E_SYSTEM] column1Width must be greater than 0."); + + result r = pImpl->SetColumn1Width(column1Width); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +List::SetColumn2Width(int column2Width) +{ + _ListImpl* pImpl = _ListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + SysTryReturn(NID_UI_CTRL, column2Width >= 0, + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] column2Width must be greater than or equal to 0."); + + result r = pImpl->SetColumn2Width(column2Width); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +List::SetItemChecked(int index, bool check) +{ + _ListImpl* pImpl = _ListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->SetItemChecked(index, check); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +bool +List::IsItemChecked(int index) const +{ + const _ListImpl* pImpl = _ListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + SetLastResult(E_SUCCESS); + + return pImpl->IsItemChecked(index); +} + +result +List::SetAllItemsChecked(bool check) +{ + _ListImpl* pImpl = _ListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->SetAllItemsChecked(check); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +List::RemoveAllCheckedItems(void) +{ + _ListImpl* pImpl = _ListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->RemoveAllCheckedItems(); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +int +List::GetFirstCheckedItemIndex(void) const +{ + const _ListImpl* pImpl = _ListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + SetLastResult(E_SUCCESS); + + return pImpl->GetFirstCheckedItemIndex(); +} + +int +List::GetLastCheckedItemIndex(void) const +{ + const _ListImpl* pImpl = _ListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + SetLastResult(E_SUCCESS); + + return pImpl->GetLastCheckedItemIndex(); +} + +int +List::GetNextCheckedItemIndexAfter(int index) const +{ + const _ListImpl* pImpl = _ListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + SetLastResult(E_SUCCESS); + + return pImpl->GetNextCheckedItemIndexAfter(index); +} + +int +List::GetItemIndexFromItemId(int itemId) const +{ + const _ListImpl* pImpl = _ListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + SetLastResult(E_SUCCESS); + + return pImpl->GetItemIndexFromItemId(itemId); +} + +int +List::GetItemIndexFromPosition(int x, int y) const +{ + const _ListImpl* pImpl = _ListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + int groupIndex = -1; + int itemIndex = -1; + + result r = pImpl->GetItemIndexFromPosition(Point(x, y), groupIndex, itemIndex); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), -1, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + return itemIndex; +} + +int +List::GetItemIndexFromPosition(const Point& position) const +{ + const _ListImpl* pImpl = _ListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + int groupIndex = -1; + int itemIndex = -1; + + result r = pImpl->GetItemIndexFromPosition(position, groupIndex, itemIndex); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), -1, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + return itemIndex; +} + +int +List::GetItemIdAt(int index) const +{ + const _ListImpl* pImpl = _ListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + SetLastResult(E_SUCCESS); + + return pImpl->GetItemIdAt(index); +} + +void +List::ScrollToBottom(void) +{ + _ListImpl* pImpl = _ListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->ScrollToBottom(); + SetLastResult(E_SUCCESS); + + return; +} + +void +List::ScrollToTop(void) +{ + _ListImpl* pImpl = _ListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->ScrollToTop(); + SetLastResult(E_SUCCESS); + + return; +} + +result +List::ScrollToTop(int index) +{ + _ListImpl* pImpl = _ListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->ScrollToTop(index); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +List::RefreshItem(int index) +{ + _ListImpl* pImpl = _ListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->RefreshItem(index); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +}}} //Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlListContextItem.cpp b/src/ui/controls/FUiCtrlListContextItem.cpp new file mode 100644 index 0000000..35397ca --- /dev/null +++ b/src/ui/controls/FUiCtrlListContextItem.cpp @@ -0,0 +1,146 @@ +// +// 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 FUiCtrlListContextItem.cpp + * @brief This is the implementation file for ListContextItem class. + * + * This file contains the implementation of ListContextItem class. + */ + +#include +#include +#include "FUiCtrl_ListContextItemImpl.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +ListContextItem::ListContextItem(void) + : __pImpl(null) +{ +} + +ListContextItem::~ListContextItem(void) +{ + delete __pImpl; + __pImpl = null; +} + +result +ListContextItem::Construct(void) +{ + _ListContextItemImpl* pImpl = _ListContextItemImpl::GetInstance(*this); + SysAssertf(pImpl == null, + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pImpl = _ListContextItemImpl::CreateListContextItemImplN(this); + SysTryReturn(NID_UI_CTRL, pImpl != null, GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + __pImpl = pImpl; + + return E_SUCCESS; +} + +result +ListContextItem::AddElement(int elementId, const String& text, bool enable) +{ + SysAssertf(__pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return __pImpl->AddElement(elementId, text, enable); +} + +result +ListContextItem::AddElement(int elementId, const Bitmap& normalBitmap, const Bitmap& pressedBitmap, + const Bitmap* pHighlightedBitmap, bool enable) +{ + SysAssertf(__pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return __pImpl->AddElement(elementId, normalBitmap, pressedBitmap, pHighlightedBitmap, enable); +} + +result +ListContextItem::AddElement(int elementId, const String& text, const Bitmap& normalBitmap, + const Bitmap& pressedBitmap, const Bitmap* pHighlightedBitmap, bool enable) +{ + SysAssertf(__pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return __pImpl->AddElement(elementId, text, normalBitmap, pressedBitmap, pHighlightedBitmap, enable); + +} + +result +ListContextItem::SetBackgroundBitmap(const Bitmap* pBitmap) +{ + SysAssertf(__pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return __pImpl->SetBackgroundBitmap(pBitmap); + +} + +result +ListContextItem::SetBackgroundColor(const Color& color) +{ + SysAssertf(__pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return __pImpl->SetBackgroundColor(color); + +} + +Color +ListContextItem::GetBackgroundColor(void) const +{ + SysAssertf(__pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return __pImpl->GetBackgroundColor(); +} + +result +ListContextItem::SetElementBackgroundColor(int elementId, ListContextItemElementStatus status, const Color& backgroundColor) +{ + SysAssertf(__pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return __pImpl->SetElementBackgroundColor(elementId, status, backgroundColor); +} + +Color +ListContextItem::GetElementBackgroundColor(int elementId, ListContextItemElementStatus status) const +{ + SysAssertf(__pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return __pImpl->GetElementBackgroundColor(elementId, status); +} + +result +ListContextItem::SetElementTextColor(int elementId, ListContextItemElementStatus status, const Color& textColor) +{ + SysAssertf(__pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return __pImpl->SetElementTextColor(elementId, status, textColor); +} + +Color +ListContextItem::GetElementTextColor(int elementId, ListContextItemElementStatus status) const +{ + SysAssertf(__pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return __pImpl->GetElementTextColor(elementId, status); +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlListItemBase.cpp b/src/ui/controls/FUiCtrlListItemBase.cpp new file mode 100644 index 0000000..34cee36 --- /dev/null +++ b/src/ui/controls/FUiCtrlListItemBase.cpp @@ -0,0 +1,131 @@ +// +// 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 FUiCtrlListItemBase.cpp + * @brief This is the implementation file for ListItemBase class. + * + * This file contains the implementation of ListItemBase class. + */ + +#include +#include +#include "FUiCtrl_ListContextItemImpl.h" +#include "FUiCtrl_ListItemBaseImpl.h" +#include "FUi_CoordinateSystemUtils.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +ListItemBase::ListItemBase(void) + : _pImpl(null) +{ +} + +ListItemBase::~ListItemBase(void) +{ + delete _pImpl; + _pImpl = null; +} + +result +ListItemBase::Construct(const Dimension& itemSize, ListAnnexStyle style) +{ + return Construct(_CoordinateSystemUtils::ConvertToFloat(itemSize), style); +} + +result +ListItemBase::Construct(const FloatDimension& itemSize, ListAnnexStyle style) +{ + result r = E_SUCCESS; + + _ListItemBaseImpl* pImpl = _ListItemBaseImpl::GetInstance(*this); + SysAssertf(pImpl == null, + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pImpl = _ListItemBaseImpl::CreateListItemBaseImplN(this, itemSize, style); + SysTryReturn(NID_UI_CTRL, pImpl != null, GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _pImpl = pImpl; + + return r; +} + +result +ListItemBase::SetBackgroundBitmap(ListItemDrawingStatus status, const Bitmap* pBitmap) +{ + SysAssertf(_pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return _pImpl->SetBackgroundBitmap(status, pBitmap); +} + +result +ListItemBase::SetBackgroundColor(ListItemDrawingStatus status, const Color& color) +{ + SysAssertf(_pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return _pImpl->SetBackgroundColor(status, color); +} + +Color +ListItemBase::GetBackgroundColor(ListItemDrawingStatus status) const +{ + SysAssertf(_pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return _pImpl->GetBackgroundColor(status); +} + +result +ListItemBase::SetContextItem(const ListContextItem* pItem) +{ + SysAssertf(_pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return _pImpl->SetContextItem(_ListContextItemImpl::GetInstance(*pItem)); +} + +result +ListItemBase::SetDescriptionText(const String& text) +{ + SysAssertf(_pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return _pImpl->SetDescriptionText(text); +} + +result +ListItemBase::SetDescriptionTextColor(const Color& color) +{ + SysAssertf(_pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return _pImpl->SetDescriptionTextColor(color); +} + +int +ListItemBase::GetAnnexWidth(ListAnnexStyle style) +{ + return _CoordinateSystemUtils::ConvertToInteger(GetAnnexWidthF(style)); +} + +float +ListItemBase::GetAnnexWidthF(ListAnnexStyle style) +{ + return _ListItemBaseImpl::GetAnnexWidth(style); +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlListView.cpp b/src/ui/controls/FUiCtrlListView.cpp new file mode 100644 index 0000000..6d8ad2e --- /dev/null +++ b/src/ui/controls/FUiCtrlListView.cpp @@ -0,0 +1,606 @@ +// +// 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 FUiCtrlListView.cpp + * @brief This is the implementation file for ListView class. + * + * This file contains the implementation of ListView class. + */ + +#include +#include +#include "FUiCtrl_ListViewImpl.h" +#include "FUi_CoordinateSystemUtils.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +ListView::ListView(void) +{ +} + +ListView::~ListView(void) +{ +} + +result +ListView::Construct(const Rectangle& rect, bool itemDivider, bool fastScroll) +{ + result r = E_SUCCESS; + + _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl == null, + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + if (fastScroll == true) + { + pImpl = _ListViewImpl::CreateListViewImplN(this, itemDivider, SCROLL_STYLE_FAST_SCROLL); + } + else + { + 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] Memory allocation failed."); + + _pControlImpl = pImpl; + r = Control::SetBounds(_CoordinateSystemUtils::ConvertToFloat(rect)); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; + +CATCH: + Control::Dispose(); + + return r; +} + +result +ListView::Construct(const Rectangle& rect, bool itemDivider, ListScrollStyle scrollStyle) +{ + result r = E_SUCCESS; + + _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl == null, + "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] Memory allocation failed."); + + _pControlImpl = pImpl; + r = Control::SetBounds(_CoordinateSystemUtils::ConvertToFloat(rect)); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; + +CATCH: + Control::Dispose(); + + return r; +} + +result +ListView::Construct(const FloatRectangle& rect, bool itemDivider, ListScrollStyle scrollStyle) +{ + result r = E_SUCCESS; + + _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl == null, + "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] Memory allocation failed."); + + _pControlImpl = pImpl; + r = Control::SetBounds(rect); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; + +CATCH: + Control::Dispose(); + + return r; +} + +result +ListView::SetItemProvider(IListViewItemProvider& provider) +{ + _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetItemProvider(provider); +} + +result +ListView::SetItemProvider(IListViewItemProviderF& provider) +{ + _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetItemProvider(provider); +} + +void +ListView::AddListViewItemEventListener(IListViewItemEventListener& listener) +{ + _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->AddListViewItemEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); +} + +void +ListView::RemoveListViewItemEventListener(IListViewItemEventListener& listener) +{ + _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->RemoveListViewItemEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); +} + +void +ListView::AddFastScrollListener(IFastScrollListener& listener) +{ + _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->AddFastScrollListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); +} + +void +ListView::RemoveFastScrollListener(IFastScrollListener& listener) +{ + _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->RemoveFastScrollListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); +} + +void +ListView::AddScrollEventListener(IScrollEventListener& listener) +{ + _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->AddScrollEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); +} + +void +ListView::AddScrollEventListener(IScrollEventListenerF& listener) +{ + _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->AddScrollEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); +} + +void +ListView::RemoveScrollEventListener(IScrollEventListener& listener) +{ + _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->RemoveScrollEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); +} + +void +ListView::RemoveScrollEventListener(IScrollEventListenerF& listener) +{ + _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->RemoveScrollEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); +} + +void +ListView::AddUiLinkEventListener(IUiLinkEventListener& listener) +{ + _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->AddUiLinkEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); +} + +void +ListView::RemoveUiLinkEventListener(IUiLinkEventListener& listener) +{ + _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->RemoveUiLinkEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); +} + +result +ListView::SetSweepEnabled(bool enable) +{ + _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetSweepEnabled(enable); +} + +result +ListView::SetFastScrollIndex(const String& text, bool useSearchIcon) +{ + _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetFastScrollIndex(text, useSearchIcon); +} + +int +ListView::GetTopDrawnItemIndex(void) const +{ + const _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetTopDrawnItemIndex(); +} + +int +ListView::GetBottomDrawnItemIndex(void) const +{ + const _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetBottomDrawnItemIndex(); +} + +result +ListView::ScrollToItem(int index) +{ + return ScrollToItem(index, LIST_SCROLL_ITEM_ALIGNMENT_TOP); +} + +result +ListView::ScrollToItem(int index, ListScrollItemAlignment itemAlignment) +{ + _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->ScrollToItem(index, itemAlignment); +} + +result +ListView::SetItemChecked(int index, bool check) +{ + _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetItemChecked(index, check); +} + +bool +ListView::IsItemChecked(int index) const +{ + const _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsItemChecked(index); +} + +result +ListView::SetItemEnabled(int index, bool enable) +{ + _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetItemEnabled(index, enable); +} + +bool +ListView::IsItemEnabled(int index) const +{ + const _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsItemEnabled(index); +} + +int +ListView::GetItemCount(void) const +{ + const _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetItemCount(); +} + +result +ListView::ShowItemDescriptionText(int index) +{ + _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->ShowItemDescriptionText(index); +} + +result +ListView::HideItemDescriptionText(int index) +{ + _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->HideItemDescriptionText(index); +} + +result +ListView::RefreshList(int index, ListRefreshType type) +{ + _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->RefreshList(index, type); +} + +result +ListView::RefreshList(int index, int elementId) +{ + _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->RefreshList(index, elementId); +} + +result +ListView::UpdateList(void) +{ + _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->UpdateList(); +} + +int +ListView::GetItemIndexFromPosition(int x, int y) const +{ + return GetItemIndexFromPosition(Point(x, y)); +} + +int +ListView::GetItemIndexFromPosition(float x, float y) const +{ + return GetItemIndexFromPosition(FloatPoint(x, y)); +} + +int +ListView::GetItemIndexFromPosition(const Point& position) const +{ + const _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetItemIndexFromPosition(_CoordinateSystemUtils::ConvertToFloat(position)); +} + +int +ListView::GetItemIndexFromPosition(const FloatPoint& position) const +{ + const _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetItemIndexFromPosition(position); +} + +result +ListView::GetItemIndexFromPosition(int x, int y, int& itemIndex, int& elementId) const +{ + return GetItemIndexFromPosition(Point(x, y), itemIndex, elementId); +} + +result +ListView::GetItemIndexFromPosition(float x, float y, int& itemIndex, int& elementId) const +{ + return GetItemIndexFromPosition(FloatPoint(x, y), itemIndex, elementId); +} + +result +ListView::GetItemIndexFromPosition(const Point& position, int& itemIndex, int& elementId) const +{ + const _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetItemIndexFromPosition(_CoordinateSystemUtils::ConvertToFloat(position), itemIndex, elementId); +} + +result +ListView::GetItemIndexFromPosition(const FloatPoint& position, int& itemIndex, int& elementId) const +{ + const _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetItemIndexFromPosition(position, itemIndex, elementId); +} + +result +ListView::SetItemDividerColor(const Color& color) +{ + _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetItemDividerColor(color); +} + +Color +ListView::GetItemDividerColor(void) const +{ + const _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetItemDividerColor(); +} + +result +ListView::SetBackgroundColor(const Color& color) +{ + _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetListBackgroundColor(color); + + return E_SUCCESS; +} + +Color +ListView::GetBackgroundColor(void) const +{ + const _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetBackgroundColor(); +} + +result +ListView::SetBackgroundBitmap(const Bitmap* pBitmap) +{ + _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetBackgroundBitmap(pBitmap); +} + +result +ListView::SetBitmapOfEmptyList(const Bitmap* pBitmap) +{ + _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetBitmapOfEmptyList(pBitmap); +} + +result +ListView::SetTextOfEmptyList(const String& text) +{ + _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetTextOfEmptyList(text); +} + +String +ListView::GetTextOfEmptyList(void) const +{ + const _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetTextOfEmptyList(); +} + +result +ListView::SetTextColorOfEmptyList(const Color& color) +{ + _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetTextColorOfEmptyList(color); +} + +Color +ListView::GetTextColorOfEmptyList(void) const +{ + const _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetTextColorOfEmptyList(); +} + +result +ListView::BeginReorderingMode(void) +{ + _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->BeginReorderingMode(); +} + +result +ListView::EndReorderingMode(void) +{ + _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->EndReorderingMode(); +} + +bool +ListView::IsInReorderingMode(void) const +{ + const _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsInReorderingMode(); +} + +void +ListView::SetScrollInputMode(ScrollInputMode mode) +{ + _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetScrollInputMode(mode); +} + +ScrollInputMode +ListView::GetScrollInputMode(void) const +{ + const _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetScrollInputMode(); +} + +result +ListView::OpenContextItem(int itemIndex) +{ + _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->OpenContextItem(itemIndex); +} + +result +ListView::CloseContextItem(int itemIndex) +{ + _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->CloseContextItem(itemIndex); +} + +bool +ListView::IsContextItemOpened(int itemIndex) const +{ + const _ListViewImpl* pImpl = _ListViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsContextItemOpened(itemIndex); +} + +}}} // Controls diff --git a/src/ui/controls/FUiCtrlMessageBox.cpp b/src/ui/controls/FUiCtrlMessageBox.cpp new file mode 100644 index 0000000..d242473 --- /dev/null +++ b/src/ui/controls/FUiCtrlMessageBox.cpp @@ -0,0 +1,182 @@ +// +// 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 FUiCtrlMessageBox.cpp + * @brief This file contains implementation of MessageBox class + */ + +#include +#include +#include "FUiCtrl_MessageBoxImpl.h" + + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::App; + + +namespace Tizen { namespace Ui { namespace Controls +{ + + +MessageBox::MessageBox(void) +{ + //empty statement +} + +MessageBox::~MessageBox(void) +{ + //empty statement +} + +result +MessageBox::Construct(const String& title, const String& text, MessageBoxStyle style, unsigned long timeout) +{ + result r = E_SUCCESS; + int maxLength = 0; + + _MessageBoxImpl* pMessageBoxImpl = _MessageBoxImpl::GetInstance(*this); + SysAssertf(pMessageBoxImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pMessageBoxImpl = _MessageBoxImpl::CreateMessageBoxImplN(this); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pMessageBoxImpl != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + maxLength = pMessageBoxImpl->GetMaxTextLength(); + SysTryCatch(NID_UI_CTRL, text.GetLength() <= maxLength, + r = E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Text length is too long to create MessageBox."); + + //Set _MessageBoxImpl + _pControlImpl = pMessageBoxImpl; + + r = pMessageBoxImpl->Initialize(title, text, style, timeout); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + +CATCH: + delete pMessageBoxImpl; + + _pControlImpl = null; + + return r; +} + +result +MessageBox::ShowAndWait(int& modalResult) +{ + _MessageBoxImpl* pMessageBoxImpl = _MessageBoxImpl::GetInstance(*this); + SysAssertf(pMessageBoxImpl != null, "Not-yet constructed. Construct() should be called before use."); + + result r = pMessageBoxImpl->ShowAndWait(modalResult); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +String +MessageBox::GetTitleText(void) const +{ + const _MessageBoxImpl* pMessageBoxImpl = _MessageBoxImpl::GetInstance(*this); + SysAssertf(pMessageBoxImpl != null, "Not-yet constructed. Construct() should be called before use."); + + return pMessageBoxImpl->GetTitleText(); +} + +String +MessageBox::GetText(void) const +{ + const _MessageBoxImpl* pMessageBoxImpl = _MessageBoxImpl::GetInstance(*this); + SysAssertf(pMessageBoxImpl != null, "Not-yet constructed. Construct() should be called before use."); + + return pMessageBoxImpl->GetText(); +} + +MessageBoxStyle +MessageBox::GetMessageBoxStyle(void) const +{ + const _MessageBoxImpl* pMessageBoxImpl = _MessageBoxImpl::GetInstance(*this); + SysAssertf(pMessageBoxImpl != null, "Not-yet constructed. Construct() should be called before use."); + + return pMessageBoxImpl->GetMessageBoxStyle(); +} + +unsigned long +MessageBox::GetTimeout(void) const +{ + const _MessageBoxImpl* pMessageBoxImpl = _MessageBoxImpl::GetInstance(*this); + SysAssertf(pMessageBoxImpl != null, "Not-yet constructed. Construct() should be called before use."); + + return pMessageBoxImpl->GetTimeout(); +} + +void +MessageBox::SetColor(const Color& color) +{ + _MessageBoxImpl* pMessageBoxImpl = _MessageBoxImpl::GetInstance(*this); + SysAssertf(pMessageBoxImpl != null, "Not-yet constructed. Construct() should be called before use."); + + pMessageBoxImpl->SetColor(color); +} + +Color +MessageBox::GetColor(void) const +{ + const _MessageBoxImpl* pMessageBoxImpl = _MessageBoxImpl::GetInstance(*this); + SysAssertf(pMessageBoxImpl != null, "Not-yet constructed. Construct() should be called before use."); + + return pMessageBoxImpl->GetColor(); +} + +void +MessageBox::SetTitleTextColor(const Color& color) +{ + _MessageBoxImpl* pMessageBoxImpl = _MessageBoxImpl::GetInstance(*this); + SysAssertf(pMessageBoxImpl != null, "Not-yet constructed. Construct() should be called before use."); + + pMessageBoxImpl->SetTitleTextColor(color); +} + +Color +MessageBox::GetTitleTextColor(void) const +{ + const _MessageBoxImpl* pMessageBoxImpl = _MessageBoxImpl::GetInstance(*this); + SysAssertf(pMessageBoxImpl != null, "Not-yet constructed. Construct() should be called before use."); + + return pMessageBoxImpl->GetTitleTextColor(); +} + +void +MessageBox::SetTextColor(const Color& color) +{ + _MessageBoxImpl* pMessageBoxImpl = _MessageBoxImpl::GetInstance(*this); + SysAssertf(pMessageBoxImpl != null, "Not-yet constructed. Construct() should be called before use."); + + pMessageBoxImpl->SetTextColor(color); +} + +Color +MessageBox::GetTextColor(void) const +{ + const _MessageBoxImpl* pMessageBoxImpl = _MessageBoxImpl::GetInstance(*this); + SysAssertf(pMessageBoxImpl != null, "Not-yet constructed. Construct() should be called before use."); + + return pMessageBoxImpl->GetTextColor(); +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlOptionMenu.cpp b/src/ui/controls/FUiCtrlOptionMenu.cpp new file mode 100644 index 0000000..4b39689 --- /dev/null +++ b/src/ui/controls/FUiCtrlOptionMenu.cpp @@ -0,0 +1,504 @@ +// +// 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 FUiCtrlOptionMenu.cpp + * @brief This is the implementation file for the OptionMenu class. + */ + +#include +#include + +#include "FUiCtrl_OptionMenuImpl.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +OptionMenu::OptionMenu(void) +{ +} + +OptionMenu::~OptionMenu(void) +{ +} + +result +OptionMenu::Construct(void) +{ + ClearLastResult(); + SysAssertf((_OptionMenuImpl::GetInstance(*this) == null), + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + // Create _OptionMenuImpl + _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::CreateOptionMenuImplN(*this); + result r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, pOptionMenuImpl != null, r, "Propagating."); + + // Set _OptionMenuImpl + _pControlImpl = pOptionMenuImpl; + + return E_SUCCESS; +} + +void +OptionMenu::AddActionEventListener(IActionEventListener& listener) +{ + ClearLastResult(); + + _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); + 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)); +} + +void +OptionMenu::RemoveActionEventListener(IActionEventListener& listener) +{ + ClearLastResult(); + + _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); + 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)); +} + +result +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."); + + result r = pOptionMenuImpl->AddItem(text, actionId, null, null, null); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +result +OptionMenu::AddItem(const Bitmap& normalBitmap, const Bitmap* pPressedBitmap, const Bitmap* pHighlightedBitmap, int actionId) +{ + ClearLastResult(); + + _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); + SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pOptionMenuImpl->AddItem(String(""), actionId, &normalBitmap, pPressedBitmap, pHighlightedBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +result +OptionMenu::AddItem(const String& text, int actionId, const Bitmap& normalBitmap, const Bitmap* pPressedBitmap, const Bitmap* pHighlightedBitmap) +{ + ClearLastResult(); + + _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); + SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pOptionMenuImpl->AddItem(text, actionId, &normalBitmap, pPressedBitmap, pHighlightedBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +result +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."); + + result r = pOptionMenuImpl->InsertItemAt(mainIndex, text, actionId, null, null, null); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +result +OptionMenu::InsertItemAt(int mainIndex, const Bitmap& normalBitmap, const Bitmap* pPressedBitmap, const Bitmap* pHighlightedBitmap, int actionId) +{ + ClearLastResult(); + + _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); + SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pOptionMenuImpl->InsertItemAt(mainIndex, String(""), actionId, &normalBitmap, pPressedBitmap, pHighlightedBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +result +OptionMenu::InsertItemAt(int mainIndex, const String& text, int actionId, const Bitmap& normalBitmap, const Bitmap* pPressedBitmap, const Bitmap* pHighlightedBitmap) +{ + ClearLastResult(); + + _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); + SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pOptionMenuImpl->InsertItemAt(mainIndex, text, actionId, &normalBitmap, pPressedBitmap, pHighlightedBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +result +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."); + + result r = pOptionMenuImpl->SetItemAt(mainIndex, text, actionId, null, null, null); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +result +OptionMenu::SetItemAt(int mainIndex, const Bitmap& normalBitmap, const Bitmap* pPressedBitmap, const Bitmap* pHighlightedBitmap, int actionId) +{ + ClearLastResult(); + + _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); + SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pOptionMenuImpl->SetItemAt(mainIndex, String(""), actionId, &normalBitmap, pPressedBitmap, pHighlightedBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +result +OptionMenu::SetItemAt(int mainIndex, const String &text, int actionId, const Bitmap& normalBitmap, const Bitmap* pPressedBitmap, const Bitmap* pHighlightedBitmap) +{ + ClearLastResult(); + + _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); + SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pOptionMenuImpl->SetItemAt(mainIndex, text, actionId, &normalBitmap, pPressedBitmap, pHighlightedBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +result +OptionMenu::RemoveItemAt(int mainIndex) +{ + ClearLastResult(); + + _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); + SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pOptionMenuImpl->RemoveItemAt(mainIndex); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating."); + + return r; +} + +void +OptionMenu::RemoveAllItems(void) +{ + ClearLastResult(); + + _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); + 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)); + + return; +} + +int +OptionMenu::GetItemCount(void) const +{ + ClearLastResult(); + + const _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); + SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use."); + + int count = pOptionMenuImpl->GetItemCount(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, (count >= 0), -1, r, "[%s] Propagating.", GetErrorMessage(r)); + + return count; +} + +int +OptionMenu::GetItemIndexFromActionId(int actionId) const +{ + ClearLastResult(); + + const _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); + SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use."); + + int index = pOptionMenuImpl->GetItemIndexFromActionId(actionId); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, (index >= 0), -1, r, "[%s] Propagating.", GetErrorMessage(r)); + + return index; +} + +int +OptionMenu::GetItemActionIdAt(int mainIndex) const +{ + ClearLastResult(); + + const _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); + 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)); + + return actionId; +} + +result +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."); + + result r = pOptionMenuImpl->AddSubItem(mainIndex, text, actionId); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +result +OptionMenu::InsertSubItemAt(int mainIndex, int subIndex, const String& text, int actionId) +{ + ClearLastResult(); + + _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); + SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pOptionMenuImpl->InsertSubItemAt(mainIndex, subIndex, text, actionId); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +result +OptionMenu::SetSubItemAt(int mainIndex, int subIndex, const String& text, int actionId) +{ + ClearLastResult(); + + _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); + SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pOptionMenuImpl->SetSubItemAt(mainIndex, subIndex, text, actionId); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +result +OptionMenu::RemoveSubItemAt(int mainIndex, int subIndex) +{ + ClearLastResult(); + + _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); + SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pOptionMenuImpl->RemoveSubItemAt(mainIndex, subIndex); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +int +OptionMenu::GetSubItemCount(int mainIndex) const +{ + ClearLastResult(); + + const _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); + SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use."); + + int count = pOptionMenuImpl->GetSubItemCount(mainIndex); + + SysTryReturn(NID_UI_CTRL, (count >= 0), -1, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + return count; +} + +int +OptionMenu::GetSubItemIndexFromActionId(int actionId) const +{ + ClearLastResult(); + + const _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); + SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use."); + + int index = pOptionMenuImpl->GetSubItemIndexFromActionId(actionId); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, (index >= 0), -1, r, "[%s] Propagating.", GetErrorMessage(r)); + + return index; +} + +int +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."); + + int actionId = pOptionMenuImpl->GetSubItemActionIdAt(mainIndex, subIndex); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, -1, r, "[%s] Propagating.", GetErrorMessage(r)); + + return actionId; +} + +result +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."); + + result r = pOptionMenuImpl->SetItemTextColor(status, color); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +Color +OptionMenu::GetItemTextColor(OptionMenuItemStatus status) const +{ + ClearLastResult(); + + const _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); + 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)); + + return color; +} + +result +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."); + + result r = pOptionMenuImpl->SetItemColor(status, color); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +Color +OptionMenu::GetItemColor(OptionMenuItemStatus status) const +{ + ClearLastResult(); + + const _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); + 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, + "[%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)); + + return color; +} + +result +OptionMenu::SetColor(const Color& color) +{ + ClearLastResult(); + + _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); + SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pOptionMenuImpl->SetColor(color); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +Color +OptionMenu::GetColor(void) const +{ + ClearLastResult(); + + const _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); + 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)); + + return color; +} + +result +OptionMenu::SetMaxVisibleItemsCount(int maxItemsCount) +{ + ClearLastResult(); + + _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); + SysAssertf(pOptionMenuImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pOptionMenuImpl->SetMaxVisibleItemsCount(maxItemsCount); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +int +OptionMenu::GetMaxVisibleItemsCount(void) const +{ + ClearLastResult(); + + const _OptionMenuImpl* pOptionMenuImpl = _OptionMenuImpl::GetInstance(*this); + 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)); + + return count; +} + +}}} //Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlOverlayPanel.cpp b/src/ui/controls/FUiCtrlOverlayPanel.cpp new file mode 100644 index 0000000..bdef433 --- /dev/null +++ b/src/ui/controls/FUiCtrlOverlayPanel.cpp @@ -0,0 +1,225 @@ +// +// 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 FUiCtrlOverlayPanel.cpp +* @brief This is the implementation file for OverlayPanel class. +* +* This cpp file contains the implementation of OverlayPanel class. @n +*/ + +#include +#include + +#include "FUi_CoordinateSystemUtils.h" +#include "FUiCtrl_OverlayPanelImpl.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; + +namespace Tizen { namespace Ui { namespace Controls +{ + +OverlayPanel::OverlayPanel(void) +{ +} + +OverlayPanel::~OverlayPanel(void) +{ +} + +result +OverlayPanel::Construct(const Rectangle& rect) +{ + _OverlayPanelImpl* pOverlayPanelImpl = _OverlayPanelImpl::GetInstance(*this); + SysAssertf(pOverlayPanelImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pOverlayPanelImpl = _OverlayPanelImpl::CreateOverlayPanelImplN(this, rect); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pOverlayPanelImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlImpl = pOverlayPanelImpl; + + return r; +} + +result +OverlayPanel::Construct(const FloatRectangle& rect) +{ + _OverlayPanelImpl* pOverlayPanelImpl = _OverlayPanelImpl::GetInstance(*this); + SysAssertf(pOverlayPanelImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pOverlayPanelImpl = _OverlayPanelImpl::CreateOverlayPanelImplN(this, rect); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pOverlayPanelImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlImpl = pOverlayPanelImpl; + + return r; +} + +void +OverlayPanel::SetRendererRotation(OverlayPanel::Rotation rotation) +{ + _OverlayPanelImpl* pOverlayPanelImpl = _OverlayPanelImpl::GetInstance(*this); + SysAssertf(pOverlayPanelImpl != null, "Not yet constructed. Construct() should be called before use."); + + pOverlayPanelImpl->SetRendererRotation(rotation); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +OverlayPanel::SetRendererSize(Dimension& dim) +{ + result r = SetRenderSize(static_cast(dim)); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +result +OverlayPanel::SetRenderSize(const Dimension& dim) +{ + _OverlayPanelImpl* pOverlayPanelImpl = _OverlayPanelImpl::GetInstance(*this); + SysAssertf(pOverlayPanelImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r =pOverlayPanelImpl->SetRenderSize(dim); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +OverlayPanel::SetRenderSize(const FloatDimension& dim) +{ + _OverlayPanelImpl* pOverlayPanelImpl = _OverlayPanelImpl::GetInstance(*this); + SysAssertf(pOverlayPanelImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pOverlayPanelImpl->SetRenderSize(dim); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +result +OverlayPanel::SetInputBuffer(const Dimension& destDim, const ByteBuffer& srcBuffer, const Dimension& srcDim, BufferPixelFormat srcFormat) +{ + _OverlayPanelImpl* pOverlayPanelImpl = _OverlayPanelImpl::GetInstance(*this); + SysAssertf(pOverlayPanelImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pOverlayPanelImpl->SetInputBuffer(destDim, srcBuffer, srcDim, srcFormat); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +result +OverlayPanel::SetInputBuffer(const FloatDimension& destDim, const ByteBuffer& srcBuffer, const Dimension& srcDim, BufferPixelFormat srcFormat) +{ + _OverlayPanelImpl* pOverlayPanelImpl = _OverlayPanelImpl::GetInstance(*this); + SysAssertf(pOverlayPanelImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pOverlayPanelImpl->SetInputBuffer(destDim, srcBuffer, srcDim, srcFormat); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +result +OverlayPanel::GetBackgroundBufferInfo(BufferInfo& info) const +{ + const _OverlayPanelImpl* pOverlayPanelImpl = _OverlayPanelImpl::GetInstance(*this); + SysAssertf(pOverlayPanelImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pOverlayPanelImpl->GetBackgroundBufferInfo(info); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +void +OverlayPanel::SetRendererAspectRatio(bool fix) +{ + _OverlayPanelImpl* pOverlayPanelImpl = _OverlayPanelImpl::GetInstance(*this); + SysAssertf(pOverlayPanelImpl != null, "Not yet constructed. Construct() should be called before use."); + + pOverlayPanelImpl->SetRendererAspectRatio(fix); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +Color +OverlayPanel::GetMaskingColor(void) const +{ + const _OverlayPanelImpl* pOverlayPanelImpl = _OverlayPanelImpl::GetInstance(*this); + SysAssertf(pOverlayPanelImpl != null, "Not yet constructed. Construct() should be called before use."); + + Color maskingColor = pOverlayPanelImpl->GetMaskingColor(); + + SetLastResult(E_SUCCESS); + return maskingColor; +} + +result +OverlayPanel::EvaluateBounds(OverlayPanelEvaluationOption option, Rectangle& rect, bool& modified) +{ + FloatRectangle convetedRect = _CoordinateSystemUtils::ConvertToFloat(rect); + + result r = _OverlayPanelImpl::EvaluateBounds(option, convetedRect, modified); + + if(r == E_SUCCESS && modified) + { + rect = _CoordinateSystemUtils::ConvertToInteger(convetedRect); + } + + return r; +} + +result +OverlayPanel::EvaluateBounds(OverlayPanelEvaluationOption option, FloatRectangle& rect, bool& modified) +{ + return _OverlayPanelImpl::EvaluateBounds(option, rect, modified); +} + +IListT* +OverlayPanel::GetSupportedBufferPixelFormatListN(void) +{ + return _OverlayPanelImpl::GetSupportedBufferPixelFormatListN(); +} + +int +OverlayPanel::GetWidthUnit(void) +{ + return _OverlayPanelImpl::GetWidthUnit(); +} + +int +OverlayPanel::GetHeightUnit(void) +{ + return _OverlayPanelImpl::GetHeightUnit(); +} + +int +OverlayPanel::GetMaxCount(void) +{ + return _OverlayPanelImpl::GetMaxCount(); +} + +}}} // Tizen::Ui::Controls + + diff --git a/src/ui/controls/FUiCtrlOverlayRegion.cpp b/src/ui/controls/FUiCtrlOverlayRegion.cpp new file mode 100644 index 0000000..217aa9f --- /dev/null +++ b/src/ui/controls/FUiCtrlOverlayRegion.cpp @@ -0,0 +1,194 @@ +// +// 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 FUiCtrlOverlayRegion.cpp + * @brief This is the implementation file for OverlayRegion class. + */ + +#include +#include +#include "FUi_Control.h" +#include "FUiCtrl_OverlayAgent.h" +#include "FUi_ResourceManager.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUiCtrl_OverlayRegionImpl.h" + + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; + +namespace Tizen { namespace Ui { namespace Controls +{ + +OverlayRegion::OverlayRegion(void) + : __pOverlayRegionImpl(null) +{ +} + +OverlayRegion::~OverlayRegion(void) +{ + delete __pOverlayRegionImpl; + __pOverlayRegionImpl = null; +} + +Rectangle +OverlayRegion::GetBounds(void) const +{ + SysAssertf(__pOverlayRegionImpl != null, "Not yet constructed. Construct() should be called before use."); + + return _CoordinateSystemUtils::ConvertToInteger(__pOverlayRegionImpl->GetBounds()); +} + +FloatRectangle +OverlayRegion::GetBoundsF(void) const +{ + SysAssertf(__pOverlayRegionImpl != null, "Not yet constructed. Construct() should be called before use."); + + return __pOverlayRegionImpl->GetBounds(); +} + +void +OverlayRegion::GetBounds(int& x, int& y, int& width, int& height) const +{ + SysAssertf(__pOverlayRegionImpl != null, "Not yet constructed. Construct() should be called before use."); + Rectangle rect = _CoordinateSystemUtils::ConvertToInteger(__pOverlayRegionImpl->GetBounds()); + + x = rect.x; + y = rect.y; + width = rect.width; + height = rect.height; +} + +void +OverlayRegion::GetBounds(float& x, float& y, float& width, float& height) const +{ + SysAssertf(__pOverlayRegionImpl != null, "Not yet constructed. Construct() should be called before use."); + + __pOverlayRegionImpl->GetBounds(x, y, width, height); + + return; +} + +result +OverlayRegion::SetInputBuffer(const ByteBuffer& srcBuffer, const Dimension& sourceDim, OverlayRegionBufferPixelFormat srcFormat) +{ + SysAssertf(__pOverlayRegionImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = __pOverlayRegionImpl->SetInputBuffer(srcBuffer, sourceDim, srcFormat); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +OverlayRegion::GetBackgroundBufferInfo(BufferInfo& info) const +{ + SysAssertf(__pOverlayRegionImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = __pOverlayRegionImpl->GetBackgroundBufferInfo(info); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +OverlayRegion::Show(void) +{ + SysAssertf(__pOverlayRegionImpl != null, "Not yet constructed. Construct() should be called before use."); + + return E_SUCCESS; +} + +bool +OverlayRegion::EvaluateBounds(OverlayRegionEvaluationOption option, Rectangle& rect, bool& modified) +{ + FloatRectangle convertedRect = _CoordinateSystemUtils::ConvertToFloat(rect); + bool ret = EvaluateBounds(option, convertedRect, modified); + + if(ret && modified) + { + rect = _CoordinateSystemUtils::ConvertToInteger(convertedRect); + } + + return ret; +} + +bool +OverlayRegion::EvaluateBounds(OverlayRegionEvaluationOption option, FloatRectangle& rect, bool& modified) +{ + result r = E_SUCCESS; + + switch (option) + { + case OVERLAY_REGION_EVALUATION_OPTION_GREATER_THAN: + { + r = _OverlayAgent::EvaluateBounds(OVERLAY_AGENT_EVALUATION_OPTION_GREATER_THAN, rect, modified); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, r, "[%s] Propagating.", GetErrorMessage(r)); + return true; + } + case OVERLAY_REGION_EVALUATION_OPTION_LESS_THAN: + { + r = _OverlayAgent::EvaluateBounds(OVERLAY_AGENT_EVALUATION_OPTION_LESS_THAN, rect, modified); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, r, "[%s] Propagating.", GetErrorMessage(r)); + return true; + } + default: + break; + } + + SysLogException(NID_UI_CTRL, E_INVALID_ARG, "[E_INVALID_ARG] The input OverlayRegionEvaluationOption is invalid."); + return false; +} + +int +OverlayRegion::GetWidthUnit(void) +{ + int widthUnit = _OverlayAgent::GetWidthUnit(); + SysTryReturn(NID_UI_CTRL, widthUnit != -1, -1, E_SYSTEM, "[E_SYSTEM] Failed to get width unit of OverlayRegion."); + + return widthUnit; +} + +int +OverlayRegion::GetHeightUnit(void) +{ + int heightUnit = _OverlayAgent::GetHeightUnit(); + SysTryReturn(NID_UI_CTRL, heightUnit != -1, -1, E_SYSTEM, "[E_SYSTEM] Failed to get height unit of OverlayRegion."); + + return heightUnit; +} + +int +OverlayRegion::GetMaxCount(void) +{ + int maxCount = _OverlayAgent::GetMaxCount(); + SysTryReturn(NID_UI_CTRL, maxCount != -1, -1, E_SYSTEM, "[E_SYSTEM]Failed to get maximum count of OverlayRegion."); + + return maxCount; +} + +IListT* +OverlayRegion::GetSupportedBufferPixelFormatListN(void) +{ + return _OverlayRegionImpl::GetSupportedBufferPixelFormatListN(); +} + +} } } // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlPanel.cpp b/src/ui/controls/FUiCtrlPanel.cpp new file mode 100644 index 0000000..b40890f --- /dev/null +++ b/src/ui/controls/FUiCtrlPanel.cpp @@ -0,0 +1,227 @@ +// +// 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 FUiCtrlPanel.cpp +* @brief This is the implementation file for %Panel class. +* +*/ + +#include +#include +#include +#include +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_UiBuilder.h" +#include "FUiCtrl_PanelImpl.h" +#include "FUiCtrl_Panel.h" + +using namespace std; +using namespace Tizen::Graphics; +using namespace Tizen::Base; + +namespace Tizen { namespace Ui { namespace Controls +{ + +Panel::Panel(void) +{ + // Nothing +} + + +Panel::~Panel(void) +{ + // Nothing +} + +result +Panel::Construct(const Rectangle& rect, GroupStyle groupStyle) +{ + _PanelImpl* pImpl = _PanelImpl::GetInstance(*this); + SysAssertf(pImpl == null, "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class."); + + FloatRectangle floatRect = _CoordinateSystemUtils::ConvertToFloat(rect); + pImpl = _PanelImpl::CreatePanelImplN(this, floatRect, groupStyle); + result r = GetLastResult(); + 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 E_SUCCESS; + +CATCH: + delete pImpl; + + return r; + +} + +result +Panel::Construct(const FloatRectangle& rect, GroupStyle groupStyle) +{ + _PanelImpl* pImpl = _PanelImpl::GetInstance(*this); + SysAssertf(pImpl == null, "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class."); + + pImpl = _PanelImpl::CreatePanelImplN(this, rect, groupStyle); + result r = GetLastResult(); + 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 E_SUCCESS; + +CATCH: + delete pImpl; + + return r; + +} + +result +Panel::Construct(const String& resourceId) +{ + ClearLastResult(); + + // Parse UiBuilder XML file + 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); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + r = pBuilder->Parse(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return E_SUCCESS; +} + +result +Panel::Construct(const Layout& layout, const Rectangle& rect, GroupStyle groupStyle) +{ + return Construct(layout, layout, rect, groupStyle); +} + +result +Panel::Construct(const Layout& portraitLayout, const Layout& landscapeLayout, const Rectangle& rect, GroupStyle groupStyle) +{ + _PanelImpl* pImpl = _PanelImpl::GetInstance(*this); + SysAssertf(pImpl == null, "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class."); + + 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] 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 E_SUCCESS; + +CATCH: + delete pImpl; + + return r; +} + +result +Panel::Construct(const Layout& layout, const FloatRectangle& rect, GroupStyle groupStyle) +{ + return Construct(layout, layout, rect, groupStyle); +} + +result +Panel::Construct(const Layout& portraitLayout, const Layout& landscapeLayout, const FloatRectangle& rect, GroupStyle groupStyle) +{ + _PanelImpl* pImpl = _PanelImpl::GetInstance(*this); + SysAssertf(pImpl == null, "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class."); + + 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] 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 E_SUCCESS; + +CATCH: + delete pImpl; + + return r; +} + +Color +Panel::GetBackgroundColor(void) const +{ + const _PanelImpl* pImpl = _PanelImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + Color color = pImpl->GetBackgroundColor(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, Color(0, 0, 0, 0), E_SYSTEM, "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM)); + + return color; +} + +void +Panel::SetBackgroundColor(const Color& color) +{ + _PanelImpl* pImpl = _PanelImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + pImpl->SetBackgroundColor(color); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[%s] A system error has occurred.", GetErrorMessage(E_SYSTEM)); +} + +result +Panel::SetCompositeEnabled(bool composite) +{ + _PanelImpl* pImpl = _PanelImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + result r = pImpl->SetCompositeEnabled(composite); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "A system error has occurred."); + + return E_SUCCESS; +} + +bool +Panel::IsCompositeEnabled(void) const +{ + const _PanelImpl* pImpl = _PanelImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + return pImpl->IsCompositeEnabled(); +} + +DataBindingContext* +Panel::GetDataBindingContextN(void) const +{ + const _PanelImpl* pImpl = _PanelImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + return pImpl->GetDataBindingContextN(); +} + + +}}} //Tizen::Ui::Controls + diff --git a/src/ui/controls/FUiCtrlPopup.cpp b/src/ui/controls/FUiCtrlPopup.cpp new file mode 100644 index 0000000..824169e --- /dev/null +++ b/src/ui/controls/FUiCtrlPopup.cpp @@ -0,0 +1,338 @@ +// +// 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 FUiCtrlPopup.cpp + * @brief This is the implementation file for Popup class. + */ + +#include +#include +#include +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_UiBuilder.h" +#include "FUiCtrl_PopupImpl.h" + +using namespace std; + +namespace Tizen { namespace Ui { namespace Controls +{ + + +Popup::Popup(void) +{ + //empty statement +} + +Popup::~Popup(void) +{ + //empty statement +} + +result +Popup::Construct(bool hasTitle, const Tizen::Graphics::Dimension& dim) +{ + result r = E_SUCCESS; + + _PopupImpl* pPopupImpl = _PopupImpl::GetInstance(*this); + SysAssertf(pPopupImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pPopupImpl = _PopupImpl::CreatePopupImplN(this, _CoordinateSystemUtils::ConvertToFloat(dim)); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pPopupImpl != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + // Set _PopupImpl + _pControlImpl = pPopupImpl; + + r = pPopupImpl->Initialize(hasTitle, _CoordinateSystemUtils::ConvertToFloat(dim)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + +CATCH: + delete pPopupImpl; + + _pControlImpl = null; + + return r; +} + +result +Popup::Construct(bool hasTitle, const Tizen::Graphics::FloatDimension& dim) +{ + result r = E_SUCCESS; + + _PopupImpl* pPopupImpl = _PopupImpl::GetInstance(*this); + SysAssertf(pPopupImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pPopupImpl = _PopupImpl::CreatePopupImplN(this, dim); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pPopupImpl != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + // Set _PopupImpl + _pControlImpl = pPopupImpl; + + r = pPopupImpl->Initialize(hasTitle, dim); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + +CATCH: + delete pPopupImpl; + + _pControlImpl = null; + + return r; +} + +result +Popup::Construct(const Tizen::Base::String& resourceId) +{ + ClearLastResult(); + + // Parse UiBuilder XML file + 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)); + r = pBuilder->Parse(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +Popup::Construct(const Tizen::Ui::Layout& layout, bool hasTitle, const Tizen::Graphics::Dimension& dim) +{ + return Construct(layout, layout, hasTitle, dim); +} + +result +Popup::Construct(const Tizen::Ui::Layout& layout, bool hasTitle, const Tizen::Graphics::FloatDimension& dim) +{ + return Construct(layout, layout, hasTitle, dim); +} + +result +Popup::Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, + bool hasTitle, const Tizen::Graphics::Dimension& dim) +{ + result r = E_SUCCESS; + + _PopupImpl* pPopupImpl = _PopupImpl::GetInstance(*this); + SysAssertf(pPopupImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pPopupImpl = _PopupImpl::CreatePopupImplN(this, _CoordinateSystemUtils::ConvertToFloat(dim), + &(const_cast (portraitLayout)), + &(const_cast (landscapeLayout))); + + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pPopupImpl != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + // Set _PopupImpl + _pControlImpl = pPopupImpl; + + r = pPopupImpl->Initialize(hasTitle, _CoordinateSystemUtils::ConvertToFloat(dim)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + +CATCH: + delete pPopupImpl; + + return r; +} + +result +Popup::Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, + bool hasTitle, const Tizen::Graphics::FloatDimension& dim) +{ + result r = E_SUCCESS; + + _PopupImpl* pPopupImpl = _PopupImpl::GetInstance(*this); + SysAssertf(pPopupImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pPopupImpl = _PopupImpl::CreatePopupImplN(this, dim, + &(const_cast (portraitLayout)), + &(const_cast (landscapeLayout))); + + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pPopupImpl != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + // Set _PopupImpl + _pControlImpl = pPopupImpl; + + r = pPopupImpl->Initialize(hasTitle, dim); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + +CATCH: + delete pPopupImpl; + + return r; +} + +result +Popup::DoModal(int& modalResult) +{ + _PopupImpl* pPopupImpl = _PopupImpl::GetInstance(*this); + SysAssertf(pPopupImpl != null, "Not-yet constructed. Construct() should be called before use."); + + return pPopupImpl->DoModal(modalResult); +} + +result +Popup::EndModal(int modalResult) +{ + _PopupImpl* pPopupImpl = _PopupImpl::GetInstance(*this); + SysAssertf(pPopupImpl != null, "Not-yet constructed. Construct() should be called before use."); + + return pPopupImpl->EndModal(modalResult); +} + +Tizen::Graphics::Rectangle +Popup::GetClientAreaBounds(void) const +{ + const _PopupImpl* pPopupImpl = _PopupImpl::GetInstance(*this); + SysAssertf(pPopupImpl != null, "Not-yet constructed. Construct() should be called before use."); + + return _CoordinateSystemUtils::ConvertToInteger(pPopupImpl->GetClientAreaBounds()); +} + +Tizen::Graphics::FloatRectangle +Popup::GetClientAreaBoundsF(void) const +{ + const _PopupImpl* pPopupImpl = _PopupImpl::GetInstance(*this); + SysAssertf(pPopupImpl != null, "Not-yet constructed. Construct() should be called before use."); + + return pPopupImpl->GetClientAreaBounds(); +} + +Tizen::Graphics::Canvas* +Popup::GetClientAreaCanvasN(void) const +{ + const _PopupImpl* pPopupImpl = _PopupImpl::GetInstance(*this); + SysAssertf(pPopupImpl != null, "Not-yet constructed. Construct() should be called before use."); + + return pPopupImpl->GetClientAreaCanvasN(); +} + +Tizen::Graphics::Point +Popup::TranslateToClientAreaPosition(const Tizen::Graphics::Point& position) const +{ + const _PopupImpl* pPopupImpl = _PopupImpl::GetInstance(*this); + SysAssertf(pPopupImpl != null, "Not-yet constructed. Construct() should be called before use."); + + return _CoordinateSystemUtils::ConvertToInteger(pPopupImpl->TranslateToClientAreaPosition(_CoordinateSystemUtils::ConvertToFloat(position))); +} + +Tizen::Graphics::FloatPoint +Popup::TranslateToClientAreaPosition(const Tizen::Graphics::FloatPoint& position) const +{ + const _PopupImpl* pPopupImpl = _PopupImpl::GetInstance(*this); + SysAssertf(pPopupImpl != null, "Not-yet constructed. Construct() should be called before use."); + + return pPopupImpl->TranslateToClientAreaPosition(position); +} + +Tizen::Graphics::Point +Popup::TranslateFromClientAreaPosition(const Tizen::Graphics::Point& clientPosition) const +{ + const _PopupImpl* pPopupImpl = _PopupImpl::GetInstance(*this); + SysAssertf(pPopupImpl != null, "Not-yet constructed. Construct() should be called before use."); + + return _CoordinateSystemUtils::ConvertToInteger(pPopupImpl->TranslateFromClientAreaPosition(_CoordinateSystemUtils::ConvertToFloat(clientPosition))); +} + +Tizen::Graphics::FloatPoint +Popup::TranslateFromClientAreaPosition(const Tizen::Graphics::FloatPoint& clientPosition) const +{ + const _PopupImpl* pPopupImpl = _PopupImpl::GetInstance(*this); + SysAssertf(pPopupImpl != null, "Not-yet constructed. Construct() should be called before use."); + + return pPopupImpl->TranslateFromClientAreaPosition(clientPosition); +} + +Tizen::Graphics::Color +Popup::GetColor(void) const +{ + const _PopupImpl* pPopupImpl = _PopupImpl::GetInstance(*this); + SysAssertf(pPopupImpl != null, "Not-yet constructed. Construct() should be called before use."); + + return pPopupImpl->GetColor(); +} + +result +Popup::SetColor(const Tizen::Graphics::Color& color) +{ + _PopupImpl* pPopupImpl = _PopupImpl::GetInstance(*this); + SysAssertf(pPopupImpl != null, "Not-yet constructed. Construct() should be called before use."); + + return pPopupImpl->SetColor(color); +} + +Tizen::Base::String +Popup::GetTitleText(void) const +{ + const _PopupImpl* pPopupImpl = _PopupImpl::GetInstance(*this); + SysAssertf(pPopupImpl != null, "Not-yet constructed. Construct() should be called before use."); + + return pPopupImpl->GetTitleText(); +} + +result +Popup::SetTitleText(const Tizen::Base::String& title) +{ + _PopupImpl* pPopupImpl = _PopupImpl::GetInstance(*this); + SysAssertf(pPopupImpl != null, "Not-yet constructed. Construct() should be called before use."); + + result r = pPopupImpl->SetTitleText(title); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[E_SYSTEM] A system error occurred."); + + return E_SUCCESS; +} + +Tizen::Graphics::Color +Popup::GetTitleTextColor(void) const +{ + const _PopupImpl* pPopupImpl = _PopupImpl::GetInstance(*this); + SysAssertf(pPopupImpl != null, "Not-yet constructed. Construct() should be called before use."); + + return pPopupImpl->GetTitleTextColor(); +} + +result +Popup::SetTitleTextColor(const Tizen::Graphics::Color& color) +{ + _PopupImpl* pPopupImpl = _PopupImpl::GetInstance(*this); + SysAssertf(pPopupImpl != null, "Not-yet constructed. Construct() should be called before use."); + + return pPopupImpl->SetTitleTextColor(color); +} + +DataBindingContext* +Popup::GetDataBindingContextN(void) const +{ + const _PopupImpl* pPopupImpl = _PopupImpl::GetInstance(*this); + SysAssertf(pPopupImpl != null, "Not-yet constructed. Construct() should be called before use."); + + return pPopupImpl->GetDataBindingContextN(); +} + + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlProgress.cpp b/src/ui/controls/FUiCtrlProgress.cpp new file mode 100644 index 0000000..97d16bd --- /dev/null +++ b/src/ui/controls/FUiCtrlProgress.cpp @@ -0,0 +1,191 @@ +// +// 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 FUiCtrlProgress.cpp + * @brief This is the implementation file for Progress class. + */ + +#include +#include +#include "FUiCtrl_ProgressImpl.h" + +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +Progress::Progress(void) +{ +} + +Progress::~Progress(void) +{ +} + +result +Progress::Construct(const Rectangle& rect, int minValue, int maxValue) +{ + result r = E_SUCCESS; + + _ProgressImpl* pProgressImpl = _ProgressImpl::GetInstance(*this); + SysAssertf((pProgressImpl == null), "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class."); + + pProgressImpl = _ProgressImpl::CreateProgressImplN(this, rect); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, pProgressImpl != null, r, "Propagating."); + + _pControlImpl = pProgressImpl; + + r = pProgressImpl->SetRange(minValue, maxValue); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pProgressImpl->SetValue(minValue); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; + +CATCH: + delete pProgressImpl; + pProgressImpl = null; + + _pControlImpl = null; + + return r; +} + +result +Progress::Construct(const FloatRectangle& rect, int minValue, int maxValue) +{ + result r = E_SUCCESS; + + _ProgressImpl* pProgressImpl = _ProgressImpl::GetInstance(*this); + SysAssertf((pProgressImpl == null), "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class."); + + pProgressImpl = _ProgressImpl::CreateProgressImplFN(this, rect); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, pProgressImpl != null, r, "Propagating."); + + _pControlImpl = pProgressImpl; + + r = pProgressImpl->SetRange(minValue, maxValue); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pProgressImpl->SetValue(minValue); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; + +CATCH: + delete pProgressImpl; + pProgressImpl = null; + + _pControlImpl = null; + + return r; +} + +void +Progress::SetValue(int value) +{ + _ProgressImpl* pProgressImpl = _ProgressImpl::GetInstance(*this); + SysAssertf(pProgressImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pProgressImpl->SetValue(value); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + return; +} + +result +Progress::SetRange(int minValue, int maxValue) +{ + _ProgressImpl* pProgressImpl = _ProgressImpl::GetInstance(*this); + SysAssertf(pProgressImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pProgressImpl->SetRange(minValue, maxValue); +} + +int +Progress::GetValue(void) const +{ + const _ProgressImpl* pProgressImpl = _ProgressImpl::GetInstance(*this); + SysAssertf(pProgressImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pProgressImpl->GetValue(); +} + +void +Progress::GetRange(int& minValue, int& maxValue) const +{ + const _ProgressImpl* pProgressImpl = _ProgressImpl::GetInstance(*this); + SysAssertf(pProgressImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pProgressImpl->GetRange(minValue, maxValue); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + return; +} + +int +Progress::GetPercentComplete(void) const +{ + const _ProgressImpl* pProgressImpl = _ProgressImpl::GetInstance(*this); + SysAssertf(pProgressImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pProgressImpl->GetPercentComplete(); +} + +result +Progress::SetBarColor(const Color& color) +{ + _ProgressImpl* pProgressImpl = _ProgressImpl::GetInstance(*this); + SysAssertf(pProgressImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pProgressImpl->SetBarColor(color); +} + +Color +Progress::GetBarColor(void) const +{ + const _ProgressImpl* pProgressImpl = _ProgressImpl::GetInstance(*this); + SysAssertf(pProgressImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pProgressImpl->GetBarColor(); +} + +void +Progress::SetBarBackgroundColor(const Color& color) +{ + _ProgressImpl* pProgressImpl = _ProgressImpl::GetInstance(*this); + SysAssertf(pProgressImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pProgressImpl->SetBarBackgroundColor(color); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + return; +} + +Color +Progress::GetBarBackgroundColor(void) const +{ + const _ProgressImpl* pProgressImpl = _ProgressImpl::GetInstance(*this); + SysAssertf(pProgressImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pProgressImpl->GetBarBackgroundColor(); +} +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlProgressPopup.cpp b/src/ui/controls/FUiCtrlProgressPopup.cpp new file mode 100644 index 0000000..c2f8b6f --- /dev/null +++ b/src/ui/controls/FUiCtrlProgressPopup.cpp @@ -0,0 +1,140 @@ +// +// 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 FUiCtrlProgressPopup.cpp + * @brief This file contains implementation of ProgressPopup class + */ + +#include +#include +#include "FUiCtrl_ProgressPopupImpl.h" + + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::App; + + +namespace Tizen { namespace Ui { namespace Controls +{ + + +ProgressPopup::ProgressPopup(void) +{ + //empty statement +} + +ProgressPopup::~ProgressPopup(void) +{ + //empty statement +} + +result +ProgressPopup::Construct(bool cancelButton, bool transparent) +{ + result r = E_SUCCESS; + + _ProgressPopupImpl* pProgressPopupImpl = _ProgressPopupImpl::GetInstance(*this); + SysAssertf(pProgressPopupImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pProgressPopupImpl = _ProgressPopupImpl::CreateProgressPopupImplN(this); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pProgressPopupImpl != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + //Set _ProgressPopupImpl + _pControlImpl = pProgressPopupImpl; + + r = pProgressPopupImpl->Initialize(cancelButton, transparent); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + +CATCH: + delete pProgressPopupImpl; + + _pControlImpl = null; + + return r; +} + +result +ProgressPopup::AddProgressPopupEventListener(Tizen::Ui::IProgressPopupEventListener& listener) +{ + _ProgressPopupImpl* pProgressPopupImpl = _ProgressPopupImpl::GetInstance(*this); + SysAssertf(pProgressPopupImpl != null, "Not-yet constructed. Construct() should be called before use."); + + result r = pProgressPopupImpl->AddProgressPopupEventListener(listener); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +ProgressPopup::RemoveProgressPopupEventListener(Tizen::Ui::IProgressPopupEventListener& listener) +{ + _ProgressPopupImpl* pProgressPopupImpl = _ProgressPopupImpl::GetInstance(*this); + SysAssertf(pProgressPopupImpl != null, "Not-yet constructed. Construct() should be called before use."); + + result r = pProgressPopupImpl->RemoveProgressPopupEventListener(listener); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +ProgressPopup::SetText(const String& text) +{ + _ProgressPopupImpl* pProgressPopupImpl = _ProgressPopupImpl::GetInstance(*this); + SysAssertf(pProgressPopupImpl != null, "Not-yet constructed. Construct() should be called before use."); + + result r = pProgressPopupImpl->SetText(text); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +String +ProgressPopup::GetText(void) const +{ + const _ProgressPopupImpl* pProgressPopupImpl = _ProgressPopupImpl::GetInstance(*this); + SysAssertf(pProgressPopupImpl != null, "Not-yet constructed. Construct() should be called before use."); + + return pProgressPopupImpl->GetText(); +} + +void +ProgressPopup::SetTextColor(const Color& color) +{ + _ProgressPopupImpl* pProgressPopupImpl = _ProgressPopupImpl::GetInstance(*this); + SysAssertf(pProgressPopupImpl != null, "Not-yet constructed. Construct() should be called before use."); + + pProgressPopupImpl->SetTextColor(color); +} + +Color +ProgressPopup::GetTextColor(void) const +{ + const _ProgressPopupImpl* pProgressPopupImpl = _ProgressPopupImpl::GetInstance(*this); + SysAssertf(pProgressPopupImpl != null, "Not-yet constructed. Construct() should be called before use."); + + return pProgressPopupImpl->GetTextColor(); +} + + +}}} // Tizen::Ui::Controls + diff --git a/src/ui/controls/FUiCtrlRadioGroup.cpp b/src/ui/controls/FUiCtrlRadioGroup.cpp new file mode 100644 index 0000000..224c734 --- /dev/null +++ b/src/ui/controls/FUiCtrlRadioGroup.cpp @@ -0,0 +1,140 @@ +// +// 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 FUiCtrlRadioGroup.cpp +* @brief This file contains implementation of RadioGroup class +*/ + +#include +#include +#include "FUiCtrl_RadioGroupImpl.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +RadioGroup::RadioGroup(void) +{ + +} + +RadioGroup::~RadioGroup(void) +{ + +} + +result +RadioGroup::Construct(void) +{ + result r = E_SUCCESS; + _RadioGroupImpl* pRadioGroupImpl = _RadioGroupImpl::GetInstance(*this); + + SysAssertf(pRadioGroupImpl == null, + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pRadioGroupImpl = _RadioGroupImpl::CreateRadioGroupImplN(this); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pRadioGroupImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlImpl = pRadioGroupImpl; + + return E_SUCCESS; +} + +result +RadioGroup::Add(const CheckButton& checkButton) +{ + _RadioGroupImpl* pRadioGroupImpl = _RadioGroupImpl::GetInstance(*this); + SysTryReturn(NID_UI_CTRL, pRadioGroupImpl, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] This instance isn't constructed."); + + result r = pRadioGroupImpl->Add(checkButton); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +RadioGroup::Add(CheckButton* pCheckButton) +{ + SysTryReturn(NID_UI_CTRL, pCheckButton, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The specified input parameter is invalid."); + + return Add(*pCheckButton); +} + +result +RadioGroup::Remove(const CheckButton& checkButton) +{ + _RadioGroupImpl* pRadioGroupImpl = _RadioGroupImpl::GetInstance(*this); + SysTryReturn(NID_UI_CTRL, pRadioGroupImpl, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] This instance isn't constructed.\n"); + + result r = pRadioGroupImpl->Remove(checkButton); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +RadioGroup::Remove(CheckButton* pCheckButton) +{ + SysTryReturn(NID_UI_CTRL, pCheckButton, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The specified input parameter is invalid."); + + return Remove(*pCheckButton); +} + +int +RadioGroup::GetItemCount(void) const +{ + const _RadioGroupImpl* pRadioGroupImpl = _RadioGroupImpl::GetInstance(*this); + SysAssertf(pRadioGroupImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pRadioGroupImpl->GetItemCount(); +} + +void +RadioGroup::SetSelectedItem(const CheckButton& checkButton) +{ + _RadioGroupImpl* pRadioGroupImpl = _RadioGroupImpl::GetInstance(*this); + SysAssertf(pRadioGroupImpl != null, + "Not yet constructed. Construct() should be called before use."); + + pRadioGroupImpl->SetSelectedItem(checkButton); + + return; +} + +void +RadioGroup::SetSelectedItem(CheckButton* pCheckButton) +{ + SysTryReturnVoidResult(NID_UI_CTRL, pCheckButton, E_INVALID_ARG, "[E_INVALID_ARG] The specified input parameter is invalid."); + + return SetSelectedItem(*pCheckButton); +} + +const CheckButton* +RadioGroup::GetSelectedItem(void) const +{ + const _RadioGroupImpl* pRadioGroupImpl = _RadioGroupImpl::GetInstance(*this); + SysAssertf(pRadioGroupImpl != null, + "Not yet constructed. Construct() should be called before use."); + + return pRadioGroupImpl->GetSelectedItem(); +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlScrollPanel.cpp b/src/ui/controls/FUiCtrlScrollPanel.cpp new file mode 100644 index 0000000..9110790 --- /dev/null +++ b/src/ui/controls/FUiCtrlScrollPanel.cpp @@ -0,0 +1,487 @@ +// +// 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 FUiCtrlScrollPanel.cpp +* @brief This is the implementation for the %ScrollPanel class. + * + */ + +#include +#include +#include +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_UiBuilder.h" +#include "FUiCtrl_ScrollPanelImpl.h" + +using namespace std; +using namespace Tizen::Graphics; +using namespace Tizen::Base; +using namespace Tizen::Ui; + +namespace Tizen { namespace Ui { namespace Controls +{ + +ScrollPanel::ScrollPanel(void) +{ + // Nothing +} + + +ScrollPanel::~ScrollPanel(void) +{ + // Nothing +} + +result +ScrollPanel::Construct(const Rectangle& rect) +{ + result r = Construct(rect, SCROLL_PANEL_SCROLL_DIRECTION_VERTICAL, true); + + return r; +} + +result +ScrollPanel::Construct(const FloatRectangle& rect) +{ + result r = Construct(rect, SCROLL_PANEL_SCROLL_DIRECTION_VERTICAL, true); + + return r; +} + +result +ScrollPanel::Construct(const String& resourceId) +{ + ClearLastResult(); + + // Parse UiBuilder XML file + 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); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = pBuilder->Parse(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return E_SUCCESS; +} + +result +ScrollPanel::Construct(const Rectangle& 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."); + + FloatRectangle floatRect = _CoordinateSystemUtils::ConvertToFloat(rect); + pImpl = _ScrollPanelImpl::CreateScrollPanelImplN(this, floatRect, scrollDirection, autoResizingEnable); + result r = GetLastResult(); + 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 E_SUCCESS; + +CATCH: + delete pImpl; + + return r; +} + +result +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] 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 E_SUCCESS; + +CATCH: + delete pImpl; + + return r; +} + +result +ScrollPanel::Construct(const Layout& layout, const Rectangle& rect) +{ + result r = Construct(layout, layout, rect, SCROLL_PANEL_SCROLL_DIRECTION_VERTICAL, true); + + return r; +} + +result +ScrollPanel::Construct(const Layout& layout, const FloatRectangle& rect) +{ + result r = Construct(layout, layout, rect, SCROLL_PANEL_SCROLL_DIRECTION_VERTICAL, true); + + return r; +} + +result +ScrollPanel::Construct(const Layout& layout, const Rectangle& rect, ScrollPanelScrollDirection scrollDirection, bool autoResizingEnable) +{ + result r = Construct(layout, layout, rect, scrollDirection, autoResizingEnable); + + return r; +} + +result +ScrollPanel::Construct(const Layout& layout, const FloatRectangle& rect, ScrollPanelScrollDirection scrollDirection, bool autoResizingEnable) +{ + result r = Construct(layout, layout, rect, scrollDirection, autoResizingEnable); + + return r; +} + +result +ScrollPanel::Construct(const Layout& portraitLayout, const Layout& landscapeLayout, const Rectangle& rect) +{ + result r = Construct(portraitLayout, landscapeLayout, rect, SCROLL_PANEL_SCROLL_DIRECTION_VERTICAL, true); + + return r; +} + +result +ScrollPanel::Construct(const Layout& portraitLayout, const Layout& landscapeLayout, const FloatRectangle& rect) +{ + result r = Construct(portraitLayout, landscapeLayout, rect, SCROLL_PANEL_SCROLL_DIRECTION_VERTICAL, true); + + return r; +} + + +result +ScrollPanel::Construct(const Layout& portraitLayout, const Layout& landscapeLayout, const Rectangle& 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."); + + 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] 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 E_SUCCESS; + +CATCH: + delete pImpl; + + return r; +} + +result +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] 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 E_SUCCESS; + +CATCH: + delete pImpl; + + return r; +} + +void +ScrollPanel::AddScrollEventListener(IScrollEventListener& listener) +{ + _ScrollPanelImpl* pImpl = _ScrollPanelImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + pImpl->AddScrollEventListener(listener); +} + +void +ScrollPanel::AddScrollEventListener(IScrollEventListenerF& listener) +{ + _ScrollPanelImpl* pImpl = _ScrollPanelImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + pImpl->AddScrollEventListener(listener); +} + +void +ScrollPanel::RemoveScrollEventListener(IScrollEventListener& listener) +{ + _ScrollPanelImpl* pImpl = _ScrollPanelImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + pImpl->RemoveScrollEventListener(listener); +} + +void +ScrollPanel::RemoveScrollEventListener(IScrollEventListenerF& listener) +{ + _ScrollPanelImpl* pImpl = _ScrollPanelImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + pImpl->RemoveScrollEventListener(listener); +} + +int +ScrollPanel::GetScrollPosition(void) const +{ + const _ScrollPanelImpl* pImpl = _ScrollPanelImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + float position = pImpl->GetScrollPosition(); + return _CoordinateSystemUtils::ConvertToInteger(position); +} + +float +ScrollPanel::GetScrollPositionF(void) const +{ + const _ScrollPanelImpl* pImpl = _ScrollPanelImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + return pImpl->GetScrollPosition(); +} + +void +ScrollPanel::SetScrollPosition(int position) +{ + _ScrollPanelImpl* pImpl = _ScrollPanelImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + float floatPosition = _CoordinateSystemUtils::ConvertToFloat(position); + pImpl->SetScrollPosition(floatPosition, false); +} + +void +ScrollPanel::SetScrollPosition(int position, bool withAnimation) +{ + _ScrollPanelImpl* pImpl = _ScrollPanelImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + float floatPosition = _CoordinateSystemUtils::ConvertToFloat(position); + pImpl->SetScrollPosition(floatPosition, withAnimation); +} + +void +ScrollPanel::SetScrollPosition(float position, bool withAnimation) +{ + _ScrollPanelImpl* pImpl = _ScrollPanelImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + pImpl->SetScrollPosition(position, withAnimation); +} + +void +ScrollPanel::ScrollToBottom(void) const +{ + const _ScrollPanelImpl* pImpl = _ScrollPanelImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + pImpl->ScrollToBottom(); +} + +void +ScrollPanel::ScrollToTop(void) const +{ + const _ScrollPanelImpl* pImpl = _ScrollPanelImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + pImpl->ScrollToTop(); +} + +result +ScrollPanel::CloseOverlayWindow(void) +{ + _ScrollPanelImpl* pImpl = _ScrollPanelImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + 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 E_SUCCESS; +} + +Rectangle +ScrollPanel::GetClientAreaBounds(void) const +{ + const _ScrollPanelImpl* pImpl = _ScrollPanelImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + FloatRectangle floatRect = pImpl->GetClientAreaBounds(); + return _CoordinateSystemUtils::ConvertToInteger(floatRect); +} + +FloatRectangle +ScrollPanel::GetClientAreaBoundsF(void) const +{ + const _ScrollPanelImpl* pImpl = _ScrollPanelImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + return pImpl->GetClientAreaBounds(); +} + +result +ScrollPanel::SetClientAreaWidth(int width) +{ + _ScrollPanelImpl* pImpl = _ScrollPanelImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + float floatWidth = _CoordinateSystemUtils::ConvertToFloat(width); + result r = pImpl->SetClientAreaWidth(floatWidth); + 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 E_SUCCESS; +} + +result +ScrollPanel::SetClientAreaWidth(float width) +{ + _ScrollPanelImpl* pImpl = _ScrollPanelImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + result r = pImpl->SetClientAreaWidth(width); + 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 E_SUCCESS; +} + +result +ScrollPanel::SetClientAreaHeight(int height) +{ + _ScrollPanelImpl* pImpl = _ScrollPanelImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + float floatHeight = _CoordinateSystemUtils::ConvertToFloat(height); + result r = pImpl->SetClientAreaHeight(floatHeight); + 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 E_SUCCESS; +} + +result +ScrollPanel::SetClientAreaHeight(float height) +{ + _ScrollPanelImpl* pImpl = _ScrollPanelImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + result r = pImpl->SetClientAreaHeight(height); + 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 E_SUCCESS; +} + +ScrollPanelScrollDirection +ScrollPanel::GetScrollDirection(void) const +{ + const _ScrollPanelImpl* pImpl = _ScrollPanelImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + return pImpl->GetScrollDirection(); +} + +bool +ScrollPanel::IsScrollAreaAutoResizingEnabled(void) const +{ + const _ScrollPanelImpl* pImpl = _ScrollPanelImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + return pImpl->IsScrollAreaAutoResizingEnabled(); +} + +void +ScrollPanel::SetPageScrollEnabled(bool enable) +{ + _ScrollPanelImpl* pImpl = _ScrollPanelImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + pImpl->SetPageScrollEnabled(enable); +} + +bool +ScrollPanel::IsPageScrollEnabled(void) const +{ + const _ScrollPanelImpl* pImpl = _ScrollPanelImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + return pImpl->IsPageScrollEnabled(); +} + +void +ScrollPanel::SetScrollBarVisible(bool visible) +{ + _ScrollPanelImpl* pImpl = _ScrollPanelImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + pImpl->SetScrollBarVisible(visible); +} + +bool +ScrollPanel::IsScrollBarVisible(void) const +{ + const _ScrollPanelImpl* pImpl = _ScrollPanelImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + return pImpl->IsScrollBarVisible(); +} + +void +ScrollPanel::SetScrollInputMode(ScrollInputMode mode) +{ + _ScrollPanelImpl* pImpl = _ScrollPanelImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + pImpl->SetScrollInputMode(mode); +} + +ScrollInputMode +ScrollPanel::GetScrollInputMode(void) const +{ + const _ScrollPanelImpl* pImpl = _ScrollPanelImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + return pImpl->GetScrollInputMode(); +} + +}}} // Tizen::Ui::Controls + diff --git a/src/ui/controls/FUiCtrlSearchBar.cpp b/src/ui/controls/FUiCtrlSearchBar.cpp new file mode 100644 index 0000000..a6c8c95 --- /dev/null +++ b/src/ui/controls/FUiCtrlSearchBar.cpp @@ -0,0 +1,830 @@ +// +// 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 FUiCtrlSearchBar.cpp +* @brief This is the implementation file for SearchBar class. +*/ + +#include +#include +#include +#include "FUiCtrl_SearchBarImpl.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Locales; +using namespace Tizen::Ui; + +namespace Tizen { namespace Ui { namespace Controls { + +SearchBar::SearchBar(void) +{ +} + +SearchBar::~SearchBar(void) +{ +} + +result +SearchBar::Construct(const Rectangle& rect, bool searchBarButton, KeypadAction keypadAction) +{ + result r = E_SUCCESS; + + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pSearchBarImpl = _SearchBarImpl::CreateSearchBarImplN(this, rect, searchBarButton, keypadAction); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pSearchBarImpl != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlImpl = pSearchBarImpl; + + return r; +} + +result +SearchBar::Construct(const FloatRectangle& rect, bool searchBarButton, KeypadAction keypadAction) +{ + result r = E_SUCCESS; + + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pSearchBarImpl = _SearchBarImpl::CreateSearchBarImplFN(this, rect, searchBarButton, keypadAction); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pSearchBarImpl != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlImpl = pSearchBarImpl; + + return r; +} + +Control* +SearchBar::GetContent(void) const +{ + const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->GetContent(); +} + +result +SearchBar::SetContent(const Control* pContent) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->SetContent(pContent); +} + +result +SearchBar::UpdateContentArea(bool invalidate) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->UpdateContentArea(invalidate); +} + +result +SearchBar::SetContentAreaVisible(bool visible) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->SetContentAreaVisible(visible); +} + +bool +SearchBar::IsContentAreaVisible(void) const +{ + const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->IsContentAreaVisible(); +} + +result +SearchBar::SetContentAreaSize(const Dimension& size) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->SetContentAreaSize(size); +} + +result +SearchBar::SetContentAreaSize(const FloatDimension& size) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->SetContentAreaSize(size); +} + +Dimension +SearchBar::GetContentAreaSize(void) const +{ + const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->GetContentAreaSize(); +} + +FloatDimension +SearchBar::GetContentAreaSizeF(void) const +{ + const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->GetContentAreaSizeF(); +} + +SearchBarMode +SearchBar::GetMode(void) const +{ + const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->GetMode(); +} + +bool +SearchBar::IsModeLocked(void) const +{ + const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->IsModeLocked(); +} + +result +SearchBar::SetMode(SearchBarMode mode) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->SetMode(mode); +} + +result +SearchBar::SetModeLocked(bool modeLocked) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->SetModeLocked(modeLocked); +} + +int +SearchBar::GetButtonActionId(void) const +{ + const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->GetButtonActionId(); +} + +Color +SearchBar::GetButtonColor(SearchBarButtonStatus status) const +{ + const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->GetButtonColor(status); +} + +Color +SearchBar::GetButtonTextColor(SearchBarButtonStatus status) const +{ + const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->GetButtonTextColor(status); +} + +SearchBarButtonStatus +SearchBar::GetButtonStatus(void) const +{ + const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->GetButtonStatus(); +} + +result +SearchBar::SetButton(const String& text, int actionId) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->SetButton(text, actionId); +} + +result +SearchBar::SetButtonEnabled(bool enabled) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->SetButtonEnabled(enabled); +} + +result +SearchBar::SetButtonColor(SearchBarButtonStatus status, const Color& color) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->SetButtonColor(status, color); +} + +result +SearchBar::SetButtonTextColor(SearchBarButtonStatus status, const Color& color) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->SetButtonTextColor(status, color); +} + +result +SearchBar::AppendCharacter(const Character& character) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->AppendCharacter(character); +} + +result +SearchBar::AppendText(const String& text) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->AppendText(text); +} + +result +SearchBar::SetText(const String& text) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->SetText(text); +} + +result +SearchBar::InsertCharacterAt(int index, const Character& character) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->InsertCharacterAt(index, character); +} + +result +SearchBar::InsertTextAt(int index, const String& text) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->InsertTextAt(index, text); +} + +result +SearchBar::DeleteCharacterAt(int index) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->DeleteCharacterAt(index); +} + +result +SearchBar::Clear(void) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->Clear(); +} + +int +SearchBar::GetTextLength(void) const +{ + const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->GetTextLength(); +} + +String +SearchBar::GetText(void) const +{ + const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->GetText(); +} + +String +SearchBar::GetText(int start, int end) const +{ + const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->GetText(start, end); +} + +int +SearchBar::GetLimitLength(void) const +{ + const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->GetLimitLength(); +} + +result +SearchBar::SetLimitLength(int limitLength) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->SetLimitLength(limitLength); +} + +result +SearchBar::ShowKeypad(void) const +{ + const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->ShowKeypad(); +} + +result +SearchBar::HideKeypad(void) const +{ + const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->HideKeypad(); +} + +int +SearchBar::GetSearchFieldTextSize(void) const +{ + const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->GetSearchFieldTextSize(); +} + +float +SearchBar::GetSearchFieldTextSizeF(void) const +{ + const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->GetSearchFieldTextSizeF(); +} + +result +SearchBar::SetSearchFieldTextSize(int size) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->SetSearchFieldTextSize(size); +} + +result +SearchBar::SetSearchFieldTextSize(float size) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->SetSearchFieldTextSize(size); +} + +result +SearchBar::GetBlockRange(int& start, int& end) const +{ + const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->GetBlockRange(start, end); +} + +result +SearchBar::ReleaseBlock(void) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->ReleaseBlock(); +} + +result +SearchBar::SetBlockRange(int start, int end) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->SetBlockRange(start, end); +} + +result +SearchBar::RemoveTextBlock(void) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->RemoveTextBlock(); +} + +Color +SearchBar::GetColor(void) const +{ + const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->GetColor(); +} + +Color +SearchBar::GetSearchFieldColor(SearchFieldStatus status) const +{ + const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->GetSearchFieldColor(status); +} + +Color +SearchBar::GetSearchFieldTextColor(SearchFieldStatus status) const +{ + const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->GetSearchFieldTextColor(status); +} + +result +SearchBar::SetBackgroundBitmap(const Bitmap& bitmap) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->SetBackgroundBitmap(bitmap); +} + +result +SearchBar::SetColor(const Color& color) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->SetColor(color); +} + +result +SearchBar::SetSearchFieldColor(SearchFieldStatus status, const Color& color) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->SetSearchFieldColor(status, color); +} + +result +SearchBar::SetSearchFieldTextColor(SearchFieldStatus status, const Color& color) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->SetSearchFieldTextColor(status, color); +} + +String +SearchBar::GetGuideText(void) const +{ + const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->GetGuideText(); +} + +result +SearchBar::SetGuideText(const String& guideText) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->SetGuideText(guideText); +} + +Color +SearchBar::GetGuideTextColor(void) const +{ + const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->GetGuideTextColor(); +} + +result +SearchBar::SetGuideTextColor(const Color& color) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->SetGuideTextColor(color); +} + +int +SearchBar::GetCursorPosition(void) const +{ + const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->GetCursorPosition(); +} + +result +SearchBar::SetCursorPosition(int index) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->SetCursorPosition(index); +} + +bool +SearchBar::IsLowerCaseModeEnabled(void) const +{ + const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->IsLowerCaseModeEnabled(); +} + +void +SearchBar::SetLowerCaseModeEnabled(bool enable) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + pSearchBarImpl->SetLowerCaseModeEnabled(enable); + + return; +} + +EllipsisPosition +SearchBar::GetEllipsisPosition(void) const +{ + const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->GetEllipsisPosition(); +} + +result +SearchBar::SetEllipsisPosition(EllipsisPosition position) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->SetEllipsisPosition(position); +} + +KeypadAction +SearchBar::GetKeypadAction(void) const +{ + const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->GetKeypadAction(); +} + +bool +SearchBar::IsTextPredictionEnabled(void) const +{ + const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->IsTextPredictionEnabled(); +} + +result +SearchBar::SetTextPredictionEnabled(bool enable) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->SetTextPredictionEnabled(enable); +} + +result +SearchBar::SetCurrentLanguage(LanguageCode languageCode) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->SetCurrentLanguage(languageCode); +} + +result +SearchBar::GetCurrentLanguage(LanguageCode& language) const +{ + const _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pSearchBarImpl->GetCurrentLanguage(language); +} + +void +SearchBar::AddActionEventListener(IActionEventListener& listener) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + result r = pSearchBarImpl->AddActionEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + return; +} + +void +SearchBar::RemoveActionEventListener(IActionEventListener& listener) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + result r = pSearchBarImpl->RemoveActionEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + return; +} + +void +SearchBar::AddTextEventListener(ITextEventListener& listener) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + result r = pSearchBarImpl->AddTextEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + return; +} + +void +SearchBar::RemoveTextEventListener(ITextEventListener& listener) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + result r = pSearchBarImpl->RemoveTextEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + return; +} + +void +SearchBar::AddSearchBarEventListener(ISearchBarEventListener& listener) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + result r = pSearchBarImpl->AddSearchBarEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + return; +} + +void +SearchBar::RemoveSearchBarEventListener(ISearchBarEventListener& listener) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + result r = pSearchBarImpl->RemoveSearchBarEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + return; +} + +void +SearchBar::AddTextBlockEventListener(ITextBlockEventListener& listener) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + result r = pSearchBarImpl->AddTextBlockEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + return; +} + +void +SearchBar::RemoveTextBlockEventListener(ITextBlockEventListener& listener) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + result r = pSearchBarImpl->RemoveTextBlockEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + return; +} + +void +SearchBar::AddKeypadEventListener(IKeypadEventListener& listener) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + result r = pSearchBarImpl->AddKeypadEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + return; +} + +void +SearchBar::RemoveKeypadEventListener(IKeypadEventListener& listener) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl, "Not yet constructed. Construct() should be called before use."); + + result r = pSearchBarImpl->RemoveKeypadEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + return; +} + +void +SearchBar::AddLanguageEventListener(ILanguageEventListener& listener) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pSearchBarImpl->AddLanguageEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + return; +} + +void +SearchBar::RemoveLanguageEventListener(ILanguageEventListener& listener) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pSearchBarImpl->RemoveLanguageEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + return; +} + +void +SearchBar::SetEditTextFilter(IEditTextFilter* pFilter) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl != null, "Not yet constructed. Construct() should be called before use."); + + pSearchBarImpl->SetEditTextFilter(pFilter); + + return; +} + +void +SearchBar::SendOpaqueCommand (const String& command) +{ + _SearchBarImpl* pSearchBarImpl = _SearchBarImpl::GetInstance(*this); + SysAssertf(pSearchBarImpl != null, "Not yet constructed. Construct() should be called before use."); + + pSearchBarImpl->SendOpaqueCommand(command); + + return; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlSectionTableView.cpp b/src/ui/controls/FUiCtrlSectionTableView.cpp new file mode 100644 index 0000000..add6acc --- /dev/null +++ b/src/ui/controls/FUiCtrlSectionTableView.cpp @@ -0,0 +1,548 @@ +// +// 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 FUiCtrlSectionTableView.cpp +* @brief This is the implementation file for SectionTableView class. +* +* This header file contains the implementation of SectionTableView class. +*/ + +#include +#include +#include +#include +#include +#include "FUiCtrl_TableViewImpl.h" +#include "FUi_CoordinateSystemUtils.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +//////////////////////////////////////////////////////////////////////////////// +/// SectionTableView class + +SectionTableView::SectionTableView(void) +{ +} + +SectionTableView::~SectionTableView(void) +{ +} + +result +SectionTableView::Construct(const Tizen::Graphics::Rectangle& rect, bool itemDivider, TableViewScrollBarStyle scrollStyle) +{ + result r = E_SUCCESS; + + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pImpl = _TableViewImpl::CreateTableViewImplN(this, _CoordinateSystemUtils::ConvertToFloat(rect), TABLE_VIEW_STYLE_SECTION, itemDivider, scrollStyle); + + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pImpl != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlImpl = pImpl; + + r = SetBounds(rect); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating", GetErrorMessage(r)); + + return E_SUCCESS; + +CATCH: + Control::Dispose(); + + return r; +} + +result +SectionTableView::Construct(const Tizen::Graphics::FloatRectangle& rect, bool itemDivider, TableViewScrollBarStyle scrollStyle) +{ + result r = E_SUCCESS; + + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pImpl = _TableViewImpl::CreateTableViewImplN(this, rect, TABLE_VIEW_STYLE_SECTION, itemDivider, scrollStyle); + + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pImpl != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlImpl = pImpl; + + r = SetBounds(rect); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating", GetErrorMessage(r)); + + return E_SUCCESS; + +CATCH: + Control::Dispose(); + + return r; +} + +void +SectionTableView::SetItemProvider(ISectionTableViewItemProvider* pProvider) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetSectionStyleItemProvider(pProvider); +} + +void +SectionTableView::SetItemProviderF(ISectionTableViewItemProviderF* pProvider) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetSectionStyleItemProviderF(pProvider); +} + +result +SectionTableView::AddSectionTableViewItemEventListener(ISectionTableViewItemEventListener& listener) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->AddSectionTableViewItemEventListener(listener); +} + +result +SectionTableView::RemoveSectionTableViewItemEventListener(ISectionTableViewItemEventListener& listener) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->RemoveSectionTableViewItemEventListener(listener); +} + +result +SectionTableView::AddFastScrollListener(IFastScrollListener& listener) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->AddFastScrollListener(listener); +} + +result +SectionTableView::RemoveFastScrollListener(IFastScrollListener& listener) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->RemoveFastScrollListener(listener); +} + +result +SectionTableView::AddScrollEventListener(IScrollEventListener& listener) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->AddScrollEventListener(listener); +} + +result +SectionTableView::RemoveScrollEventListener(IScrollEventListener& listener) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->RemoveScrollEventListener(listener); +} + +result +SectionTableView::AddScrollEventListener(IScrollEventListenerF& listener) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->AddScrollEventListener(listener); +} + +result +SectionTableView::RemoveScrollEventListener(IScrollEventListenerF& listener) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->RemoveScrollEventListener(listener); +} + +result +SectionTableView::SetFastScrollIndex(const String& text, bool useSearchIcon) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetFastScrollIndex(text, useSearchIcon); +} + +result +SectionTableView::GetTopDrawnItemIndex(int& sectionIndex, int& itemIndex) const +{ + const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetTopDrawnItemIndex(sectionIndex, itemIndex); +} + +result +SectionTableView::GetBottomDrawnItemIndex(int& sectionIndex, int& itemIndex) const +{ + const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + + return pImpl->GetBottomDrawnItemIndex(sectionIndex, itemIndex); +} + +result +SectionTableView::SetItemChecked(int sectionIndex, int itemIndex, bool check) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetItemChecked(sectionIndex, itemIndex, check); +} + +bool +SectionTableView::IsItemChecked(int sectionIndex, int itemIndex) const +{ + const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsItemChecked(sectionIndex, itemIndex); +} + +result +SectionTableView::SetItemEnabled(int sectionIndex, int itemIndex, bool enable) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetItemEnabled(sectionIndex, itemIndex, enable); +} + +bool +SectionTableView::IsItemEnabled(int sectionIndex, int itemIndex) const +{ + const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsItemEnabled(sectionIndex, itemIndex); +} + +int +SectionTableView::GetSectionCount(void) const +{ + const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetGroupCount(); +} + +int +SectionTableView::GetItemCountAt(int sectionIndex) const +{ + const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetItemCountAt(sectionIndex); +} + +result +SectionTableView::RefreshItem(int sectionIndex, int itemIndex, TableViewRefreshType type) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->RefreshTableView(sectionIndex, itemIndex, type); +} + +result +SectionTableView::RefreshAllItems(void) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->RefreshAllItems(); +} + +void +SectionTableView::UpdateTableView(void) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->UpdateTableView(); +} + +result +SectionTableView::GetItemIndexFromPosition(const Tizen::Graphics::Point& position, int& sectionIndex, int& itemIndex) const +{ + const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetItemIndexFromPosition(position, sectionIndex, itemIndex); +} + +result +SectionTableView::GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& position, int& sectionIndex, int& itemIndex) const +{ + const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetItemIndexFromPosition(position, sectionIndex, itemIndex); +} + +void +SectionTableView::SetSectionColor(const Color& color) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetSectionColor(color); +} + +Color +SectionTableView::GetSectionColor(void) const +{ + const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetSectionColor(); +} + +void +SectionTableView::SetItemDividerColor(const Color& color) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetItemDividerColor(color); +} + +Color +SectionTableView::GetItemDividerColor(void) const +{ + const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetItemDividerColor(); +} + +void +SectionTableView::SetBackgroundColor(const Color& color) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetBackgroundColor(color); + + return; +} + +Color +SectionTableView::GetBackgroundColor(void) const +{ + const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetBackgroundColor(); +} + +void +SectionTableView::SetGroupedLookEnabled(bool enable) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetGroupedLookEnabled(enable); +} + +bool +SectionTableView::IsGroupedLookEnabled(void) const +{ + const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsGroupedLookEnabled(); +} + +result +SectionTableView::ScrollToItem(int sectionIndex, int itemIndex, TableViewScrollItemAlignment itemAlignment) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->ScrollToItem(sectionIndex, itemIndex, itemAlignment); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +SectionTableView::ScrollByPixel(int pixel) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->ScrollByPixel(_CoordinateSystemUtils::ConvertToFloat(pixel)); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +SectionTableView::ScrollByPixel(float pixel) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->ScrollByPixel(pixel); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +int +SectionTableView::GetCurrentScrollPosition(void) const +{ + const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return _CoordinateSystemUtils::ConvertToInteger(pImpl->GetCurrentScrollPosition()); +} + +float +SectionTableView::GetCurrentScrollPositionF(void) const +{ + const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetCurrentScrollPosition(); +} + +void +SectionTableView::SetScrollEnabled(bool enable) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetScrollEnabled(enable); + + return; +} + +bool +SectionTableView::IsScrollEnabled(void) const +{ + const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsScrollEnabled(); +} + +void +SectionTableView::SetScrollInputMode(ScrollInputMode mode) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + pImpl->SetScrollInputMode(mode); +} + +ScrollInputMode +SectionTableView::GetScrollInputMode(void) const +{ + const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + return pImpl->GetScrollInputMode(); +} + +result +SectionTableView::OpenContextItem(int sectionIndex, int itemIndex) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + return pImpl->OpenContextItem(sectionIndex, itemIndex); +} + +result +SectionTableView::CloseContextItem(int sectionIndex, int itemIndex) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + return pImpl->CloseContextItem(sectionIndex, itemIndex); +} + +bool +SectionTableView::IsContextItemOpened(int sectionIndex, int itemIndex) const +{ + const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + return pImpl->IsContextItemOpened(sectionIndex, itemIndex); +} + +result +SectionTableView::SetSectionHeaderTextHorizontalAlignment(int sectionIndex, HorizontalAlignment alignment) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + return pImpl->SetSectionHeaderTextHorizontalAlignment(sectionIndex, alignment); +} + +HorizontalAlignment +SectionTableView::GetSectionHeaderTextHorizontalAlignment(int sectionIndex) const +{ + const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + return pImpl->GetSectionHeaderTextHorizontalAlignment(sectionIndex); +} + +result +SectionTableView::SetSectionFooterTextHorizontalAlignment(int sectionIndex, HorizontalAlignment alignment) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + return pImpl->SetSectionFooterTextHorizontalAlignment(sectionIndex, alignment); +} + +HorizontalAlignment +SectionTableView::GetSectionFooterTextHorizontalAlignment(int sectionIndex) const +{ + const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + return pImpl->GetSectionFooterTextHorizontalAlignment(sectionIndex); +} + +}}} //Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlSimpleItem.cpp b/src/ui/controls/FUiCtrlSimpleItem.cpp new file mode 100644 index 0000000..baf0f93 --- /dev/null +++ b/src/ui/controls/FUiCtrlSimpleItem.cpp @@ -0,0 +1,76 @@ +// +// 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 FUiCtrlSimpleItem.cpp + * @brief This is the implementation file for SimpleItem class. + * + * This file contains the implementation of SimpleItem class. + */ + +#include +#include +#include "FUiCtrl_SimpleItemImpl.h" +#include "FUi_CoordinateSystemUtils.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +SimpleItem::SimpleItem(void) +{ +} + +SimpleItem::~SimpleItem(void) +{ +} + +result +SimpleItem::Construct(const Dimension& itemSize, ListAnnexStyle style) +{ + return Construct(_CoordinateSystemUtils::ConvertToFloat(itemSize), style); +} + +result +SimpleItem::Construct(const FloatDimension& itemSize, ListAnnexStyle style) +{ + result r = E_SUCCESS; + + _SimpleItemImpl* pSimpleImpl = static_cast<_SimpleItemImpl*>(_ListItemBaseImpl::GetInstance(*this)); + SysAssertf(pSimpleImpl == null, + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pSimpleImpl = _SimpleItemImpl::CreateSimpleItemImplN(this, itemSize, style); + SysTryReturn(NID_UI_CTRL, pSimpleImpl != null, GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _pImpl = pSimpleImpl; + + return r; +} + +result +SimpleItem::SetElement(const String& text, const Bitmap* pBitmap) +{ + _SimpleItemImpl* pImpl = static_cast<_SimpleItemImpl*>(_ListItemBaseImpl::GetInstance(*this)); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetElement(text, pBitmap); +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlSlidableGroupedList.cpp b/src/ui/controls/FUiCtrlSlidableGroupedList.cpp new file mode 100644 index 0000000..8f132b7 --- /dev/null +++ b/src/ui/controls/FUiCtrlSlidableGroupedList.cpp @@ -0,0 +1,636 @@ +// +// 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 FUiCtrlSlidableGroupedList.cpp + * @brief This is the implementation file for SlidableGroupedList class. + * + * This file contains the implementation of SlidableGroupedList class. + */ + +#include +#include +#include "FUiCtrl_SlidableGroupedListImpl.h" +#include "FUiCtrl_CustomListImpl.h" + +using namespace Tizen::Base; +using namespace Tizen::App; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Graphics; +using namespace Tizen::Media; +using namespace Tizen::Base::Collection; + + +namespace Tizen { namespace Ui { namespace Controls +{ + +SlidableGroupedList::SlidableGroupedList(void) +{ +} + +SlidableGroupedList::~SlidableGroupedList(void) +{ +} + +result +SlidableGroupedList::Construct(const Rectangle& rect, CustomListStyle style, bool itemDivider, bool bFastScroll) +{ + result r = E_SUCCESS; + + SysAssertf((_SlidableGroupedListImpl::GetInstance(*this) == null), "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::CreateSlidableGroupedListImplN(this, rect, itemDivider, bFastScroll); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlImpl = pImpl; + + r = pImpl->SetListStyle(style); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pImpl->LoadDefaultBitmap(); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + pImpl->Initialize(); + + return E_SUCCESS; + +CATCH: + Dispose(); + return r; + +} + +void +SlidableGroupedList::AddSlidableGroupedListEventListener(ISlidableGroupedListEventListener& listener) +{ + _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->AddSlidableGroupedListEventListener(listener); +} + +void +SlidableGroupedList::RemoveSlidableGroupedListEventListener(ISlidableGroupedListEventListener& listener) +{ + _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->RemoveSlidableGroupedListEventListener(listener); +} + +result +SlidableGroupedList::LoadItemToTop(const CustomListItem& item, int itemId) +{ + _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->LoadItemToTop(item, itemId); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +SlidableGroupedList::LoadItemToBottom(const CustomListItem& item, int itemId) +{ + _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->LoadItemToBottom(item, itemId); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +SlidableGroupedList::UnloadAllItems(void) +{ + _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->UnloadAllItems(); +} + +result +SlidableGroupedList::RemoveAllItemsAt(int groupIndex) +{ + _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->RemoveAllItemsAt(groupIndex); +} + +result +SlidableGroupedList::RemoveAllItems(void) +{ + _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->RemoveAllItems(); +} + +void +SlidableGroupedList::RemoveFastScrollEventListener(IFastScrollEventListener& listener) +{ + _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->RemoveFastScrollEventListener(listener); +} + +void +SlidableGroupedList::RemoveGroupedItemEventListener(IGroupedItemEventListener& listener) +{ + _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->RemoveGroupedItemEventListener(listener); +} + +void +SlidableGroupedList::ScrollToBottom(void) +{ + _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->ScrollToBottom(); +} + +void +SlidableGroupedList::ScrollToTop(void) +{ + _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->ScrollToTop(); +} + +result +SlidableGroupedList::ScrollToTop(int groupIndex, int itemIndex) +{ + _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->ScrollToTop(groupIndex, itemIndex); +} + +result +SlidableGroupedList::ScrollToTop(int groupIndex) +{ + _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->ScrollToTop(groupIndex); +} + +result +SlidableGroupedList::SetAllItemsChecked(int groupIndex, bool check) +{ + _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetAllItemsChecked(groupIndex, check); +} + +result +SlidableGroupedList::SetGroupAt(int groupIndex, const String& text, const Bitmap* pBackgroundBitmap, int groupId) +{ + _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetGroupAt(groupIndex, text, pBackgroundBitmap, groupId); + +} + +result +SlidableGroupedList::SetItemChecked(int groupIndex, int index, bool check) +{ + _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetItemChecked(groupIndex, index, check); +} + +result +SlidableGroupedList::SetLoadedItemEnabled(int groupIndex, int index, bool enable) +{ + _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetLoadedItemEnabled(groupIndex, index, enable); +} + +result +SlidableGroupedList::RemoveAllCheckedItemsAt(int groupIndex, int itemHeight) +{ + _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->RemoveAllCheckedItemsAt(groupIndex, itemHeight); +} + + +result +SlidableGroupedList::RemoveItemAt(int groupIndex, int index, int itemHeight) +{ + _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->RemoveItemAt(groupIndex, index, itemHeight); +} + +result +SlidableGroupedList::RemoveGroupAt(int groupIndex) +{ + _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->RemoveGroupAt(groupIndex); +} + +const CustomListItem* +SlidableGroupedList::GetLoadedItemAt(int groupIndex, int index) const +{ + const _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetLoadedItemAt(groupIndex, index); +} + +int +SlidableGroupedList::GetLoadedItemIdAt(int groupIndex, int index) const +{ + const _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetLoadedItemIdAt(groupIndex, index); +} + +result +SlidableGroupedList::GetLoadedItemIndexFromItemId(int itemId, int& groupIndex, int& itemIndex) const +{ + const _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetLoadedItemIndexFromItemId(itemId, groupIndex, itemIndex); +} + +result +SlidableGroupedList::RemoveAllCheckedItems(int height) +{ + _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->RemoveAllCheckedItems(height); +} + +result +SlidableGroupedList::GetFirstLoadedItemIndex(int& groupIndex, int& itemIndex) const +{ + const _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetFirstLoadedItemIndex(groupIndex, itemIndex); +} + +result +SlidableGroupedList::GetLastLoadedItemIndex(int& groupIndex, int& itemIndex) const +{ + const _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetLastLoadedItemIndex(groupIndex, itemIndex); +} + +result +SlidableGroupedList::SetFastScrollMainIndex(const String& text) +{ + _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetFastScrollMainIndex(text); +} + +void +SlidableGroupedList::SetBackgroundColor(const Color& color) +{ + _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetBackgroundColor(color); +} + +void +SlidableGroupedList::SetTextOfEmptyList(const String& text) +{ + _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetTextOfEmptyList(text); +} + +void +SlidableGroupedList::SetTextColorOfEmptyList(const Color& color) +{ + _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetTextColorOfEmptyList(color); +} + +Color +SlidableGroupedList::GetTextColorOfEmptyList(void) const +{ + const _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetTextColorOfEmptyList(); +} + +result +SlidableGroupedList::SetItemAt(int groupIndex, int itemIndex, const CustomListItem& item, int itemId) +{ + _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetItemAt(groupIndex, itemIndex, item, itemId); +} + +void +SlidableGroupedList::AddFastScrollEventListener(IFastScrollEventListener& listener) +{ + _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->AddFastScrollEventListener(listener); +} + +result +SlidableGroupedList::AddGroup(const String& text, const Bitmap* pBackgroundBitmap, int itemCount, int groupHeight, int groupId) +{ + _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->AddGroup(text, pBackgroundBitmap, itemCount, groupHeight, groupId); +} + +void +SlidableGroupedList::AddGroupedItemEventListener(IGroupedItemEventListener& listener) +{ + _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->AddGroupedItemEventListener(listener); +} + +result +SlidableGroupedList::AddItem(int groupIndex, const CustomListItem& item, int itemId) +{ + _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->AddItem(groupIndex, item, itemId); +} + +result +SlidableGroupedList::GetBottomDrawnItemIndex(int& groupIndex, int& itemIndex) const +{ + const _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetBottomDrawnItemIndex(groupIndex, itemIndex); +} + +result +SlidableGroupedList::GetFirstCheckedItemIndex(int& groupIndex, int& itemIndex) const +{ + const _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetFirstCheckedItemIndex(groupIndex, itemIndex); +} + +int +SlidableGroupedList::GetGroupIdAt(int groupIndex) const +{ + const _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetGroupIdAt(groupIndex); +} + +int +SlidableGroupedList::GetGroupIndexFromGroupId(int groupId) const +{ + const _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetGroupIndexFromGroupId(groupId); +} + +result +SlidableGroupedList::GetLastCheckedItemIndex(int& groupIndex, int& itemIndex) const +{ + const _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetLastCheckedItemIndex(groupIndex, itemIndex); +} + +result +SlidableGroupedList::GetNextCheckedItemIndexAfter(int& groupIndex, int& index) const +{ + const _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetNextCheckedItemIndexAfter(groupIndex, index); +} + +result +SlidableGroupedList::GetTopDrawnItemIndex(int& groupIndex, int& itemIndex) const +{ + const _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetTopDrawnItemIndex(groupIndex, itemIndex); +} + +result +SlidableGroupedList::GetItemIndexFromPosition(int x, int y, int& groupIndex, int& itemIndex) const +{ + const _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetItemIndexFromPosition(x, y, groupIndex, itemIndex); +} + +result +SlidableGroupedList::GetItemIndexFromPosition(const Point& position, int& groupIndex, int& itemIndex) const +{ + const _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetItemIndexFromPosition(position, groupIndex, itemIndex); +} + +result +SlidableGroupedList::InsertGroupAt(int groupIndex, const String& text, const Bitmap* pBackgroundBitmap, int itemCount, int groupHeight, int groupId) +{ + _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->InsertGroupAt(groupIndex, text, pBackgroundBitmap, itemCount, groupHeight, groupId); +} + +bool +SlidableGroupedList::IsItemChecked(int groupIndex, int index) const +{ + const _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsItemChecked(groupIndex, index); +} + +bool +SlidableGroupedList::IsLoadedItemEnabled(int groupIndex, int index) const +{ + const _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsLoadedItemEnabled(groupIndex, index); +} + +bool +SlidableGroupedList::IsItemLoaded(int groupIndex, int itemIndex) const +{ + const _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsItemLoaded(groupIndex, itemIndex); +} + +result +SlidableGroupedList::RemoveAllGroups(void) +{ + _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->RemoveAllGroups(); +} + +int +SlidableGroupedList::GetGroupCount(void) const +{ + const _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetGroupCount(); +} + +result +SlidableGroupedList::InsertItemAt(int groupIndex, int index, const CustomListItem& item, int itemId) +{ + _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->InsertItemAt(groupIndex, index, item, itemId); +} + +int +SlidableGroupedList::GetItemCountAt(int groupIndex) const +{ + const _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetItemCountAt(groupIndex); +} + +result +SlidableGroupedList::RefreshItem(int groupIndex, int index) +{ + _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->RefreshItem(groupIndex, index); +} + +result +SlidableGroupedList::RefreshGroup(int groupIndex) +{ + _SlidableGroupedListImpl* pImpl = _SlidableGroupedListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->RefreshGroup(groupIndex); +} + +}}} //Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlSlidableList.cpp b/src/ui/controls/FUiCtrlSlidableList.cpp new file mode 100644 index 0000000..88fe073 --- /dev/null +++ b/src/ui/controls/FUiCtrlSlidableList.cpp @@ -0,0 +1,489 @@ +// +// 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 FUiCtrlSlidableList.cpp + * @brief This is the implementation file for SlidableList class. + */ + +#include +#include +#include "FUiCtrl_SlidableListImpl.h" + +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +SlidableList::SlidableList(void) +{ +} + +SlidableList::~SlidableList(void) +{ +} + +result +SlidableList::Construct(const Tizen::Graphics::Rectangle& rect, CustomListStyle style, bool itemDivider) +{ + result r = E_SUCCESS; + + SysAssertf((_SlidableListImpl::GetInstance(*this) == null), "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + _SlidableListImpl* pImpl = _SlidableListImpl::CreateSlidableListImplN(this, rect, itemDivider); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlImpl = pImpl; + + r = pImpl->UpdateBounds(rect); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pImpl->SetListStyle(style); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pImpl->Initalize(); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pImpl->LoadDefaultBitmap(); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; + +CATCH: + Dispose(); + return r; + +} + +void +SlidableList::AddSlidableListEventListener(Tizen::Ui::ISlidableListEventListener& listener) +{ + _SlidableListImpl* pImpl = _SlidableListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->AddSlidableListEventListener(listener); +} + +void +SlidableList::RemoveSlidableListEventListener(Tizen::Ui::ISlidableListEventListener& listener) +{ + _SlidableListImpl* pImpl = _SlidableListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->RemoveSlidableListEventListener(listener); +} + +void +SlidableList::AddCustomItemEventListener(Tizen::Ui::ICustomItemEventListener& listener) +{ + _SlidableListImpl* pImpl = _SlidableListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->AddCustomItemEventListener(listener); +} + +result +SlidableList::AddItem(const CustomListItem& item, int itemId) +{ + _SlidableListImpl* pImpl = _SlidableListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->AddItem(item, itemId); +} + +int +SlidableList::GetBottomDrawnItemIndex(void) const +{ + const _SlidableListImpl* pImpl = _SlidableListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetBottomDrawnItemIndex(); +} + +int +SlidableList::GetFirstCheckedItemIndex(void) const +{ + const _SlidableListImpl* pImpl = _SlidableListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetFirstCheckedItemIndex(); +} + +int +SlidableList::GetItemCount(void) const +{ + const _SlidableListImpl* pImpl = _SlidableListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetItemCount(); +} + +int +SlidableList::GetLastCheckedItemIndex(void) const +{ + const _SlidableListImpl* pImpl = _SlidableListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetLastCheckedItemIndex(); +} + +int +SlidableList::GetNextCheckedItemIndexAfter(int index) const +{ + const _SlidableListImpl* pImpl = _SlidableListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetNextCheckedItemIndexAfter(index); +} + +int +SlidableList::GetTopDrawnItemIndex(void) const +{ + const _SlidableListImpl* pImpl = _SlidableListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetTopDrawnItemIndex(); +} + +result +SlidableList::InsertItemAt(int index, const CustomListItem& item, int itemId) +{ + _SlidableListImpl* pImpl = _SlidableListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->InsertItemAt(index, item, itemId); +} + +result +SlidableList::RemoveAllItems(void) +{ + _SlidableListImpl* pImpl = _SlidableListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->RemoveAllItems(); +} + +void +SlidableList::RemoveCustomItemEventListener(Tizen::Ui::ICustomItemEventListener& listener) +{ + _SlidableListImpl* pImpl = _SlidableListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->RemoveCustomItemEventListener(listener); +} + +void +SlidableList::ScrollToBottom(void) +{ + _SlidableListImpl* pImpl = _SlidableListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->ScrollToBottom(); +} + +void +SlidableList::ScrollToTop(void) +{ + _SlidableListImpl* pImpl = _SlidableListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->ScrollToTop(); +} + +result +SlidableList::ScrollToTop(int index) +{ + _SlidableListImpl* pImpl = _SlidableListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->ScrollToTop(index); +} + +result +SlidableList::SetAllItemsChecked(bool check) +{ + _SlidableListImpl* pImpl = _SlidableListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetAllItemsChecked(check); +} + +result +SlidableList::SetItemChecked(int index, bool check) +{ + _SlidableListImpl* pImpl = _SlidableListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetItemChecked(index, check); +} + +result +SlidableList::SetLoadedItemEnabled(int index, bool enable) +{ + _SlidableListImpl* pImpl = _SlidableListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetLoadedItemEnabled(index, enable); +} + +void +SlidableList::SetBackgroundColor(const Tizen::Graphics::Color& color) +{ + _SlidableListImpl* pImpl = _SlidableListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetBackgroundColor(color); +} + +void +SlidableList::SetTextOfEmptyList(const Tizen::Base::String& text) +{ + _SlidableListImpl* pImpl = _SlidableListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetTextOfEmptyList(text); +} + +void +SlidableList::SetTextColorOfEmptyList(const Tizen::Graphics::Color& color) +{ + _SlidableListImpl* pImpl = _SlidableListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetTextColorOfEmptyList(color); +} + +Tizen::Graphics::Color +SlidableList::GetTextColorOfEmptyList(void) const +{ + const _SlidableListImpl* pImpl = _SlidableListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetTextColorOfEmptyList(); +} + +const CustomListItem* +SlidableList::GetLoadedItemAt(int index) const +{ + const _SlidableListImpl* pImpl = _SlidableListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetLoadedItemAt(index); +} + +int +SlidableList::GetLoadedItemIdAt(int index) const +{ + const _SlidableListImpl* pImpl = _SlidableListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetLoadedItemIdAt(index); +} + +bool +SlidableList::IsItemChecked(int index) const +{ + const _SlidableListImpl* pImpl = _SlidableListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsItemChecked(index); +} + +bool +SlidableList::IsLoadedItemEnabled(int index) const +{ + const _SlidableListImpl* pImpl = _SlidableListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsLoadedItemEnabled(index); +} + +int +SlidableList::GetLoadedItemIndexFromItemId(int itemId) const +{ + const _SlidableListImpl* pImpl = _SlidableListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetLoadedItemIndexFromItemId(itemId); +} + +result +SlidableList::LoadItemToTop(const CustomListItem& item, int itemId) +{ + _SlidableListImpl* pImpl = _SlidableListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->LoadItemToTop(item, itemId); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Failed to load item at top", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +SlidableList::LoadItemToBottom(const CustomListItem& item, int itemId) +{ + _SlidableListImpl* pImpl = _SlidableListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->LoadItemToBottom(item, itemId); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Failed to load item at bottom", GetErrorMessage(r)); + + return E_SUCCESS; +} + +void +SlidableList::SetItemCountAndHeight(int count, int listHeight) +{ + _SlidableListImpl* pImpl = _SlidableListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetItemCountAndHeight(count, listHeight); +} + +result +SlidableList::UnloadAllItems(void) +{ + _SlidableListImpl* pImpl = _SlidableListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->UnloadAllItems(); +} + +result +SlidableList::SetItemAt(int index, const CustomListItem& item, int itemId) +{ + _SlidableListImpl* pImpl = _SlidableListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetItemAt(index, item, itemId); +} + +result +SlidableList::RemoveItemAt(int index, int itemHeight) +{ + _SlidableListImpl* pImpl = _SlidableListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->RemoveItemAt(index, itemHeight); +} + +result +SlidableList::RemoveAllCheckedItems(int itemHeight) +{ + _SlidableListImpl* pImpl = _SlidableListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->RemoveAllCheckedItems(itemHeight); +} + +bool +SlidableList::IsItemLoaded(int index) const +{ + const _SlidableListImpl* pImpl = _SlidableListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsItemLoaded(index); +} + +int +SlidableList::GetFirstLoadedItemIndex(void) const +{ + const _SlidableListImpl* pImpl = _SlidableListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetFirstLoadedItemIndex(); +} + +int +SlidableList::GetLastLoadedItemIndex(void) const +{ + const _SlidableListImpl* pImpl = _SlidableListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetLastLoadedItemIndex(); +} + +int +SlidableList::GetItemIndexFromPosition(int x, int y) const +{ + const _SlidableListImpl* pImpl = _SlidableListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetItemIndexFromPosition(x, y); +} + +int +SlidableList::GetItemIndexFromPosition(const Tizen::Graphics::Point& position) const +{ + const _SlidableListImpl* pImpl = _SlidableListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetItemIndexFromPosition(position); +} + +result +SlidableList::RefreshItem(int index) +{ + _SlidableListImpl* pImpl = _SlidableListImpl::GetInstance(*this); + + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->RefreshItem(index); +} + +}}} //Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlSlider.cpp b/src/ui/controls/FUiCtrlSlider.cpp new file mode 100644 index 0000000..3110c3a --- /dev/null +++ b/src/ui/controls/FUiCtrlSlider.cpp @@ -0,0 +1,417 @@ +// +// 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 FUiCtrlSlider.cpp + * @brief This is the implementation file for Slider class. + */ + +#include +#include +#include "FUiCtrl_SliderImpl.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Base; +using namespace Tizen::Ui; + +namespace Tizen { namespace Ui { namespace Controls +{ + +Slider::Slider(void) +{ +} + +Slider::~Slider(void) +{ +} + +result +Slider::Construct(const Rectangle& rect, BackgroundStyle backgroundStyle, bool showTitle, int minValue, int maxValue, GroupStyle groupStyle) +{ + result r = E_SUCCESS; + + _SliderImpl* pSliderImpl = _SliderImpl::GetInstance(*this); + SysAssertf((pSliderImpl == null), "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class."); + + int sliderStyle = 0; + if (showTitle) + { + sliderStyle |= SLIDER_STYLE_TITLE; + } + sliderStyle |= SLIDER_STYLE_BUBBLE; + + pSliderImpl = _SliderImpl::CreateSliderImplN(this, rect, sliderStyle); + r = GetLastResult(); + 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)); + + _pControlImpl = pSliderImpl; + + return r; + +CATCH: + delete pSliderImpl; + pSliderImpl = null; + + return r; +} + +result +Slider::Construct(const FloatRectangle& rect, BackgroundStyle backgroundStyle, bool showTitle, int minValue, int maxValue, GroupStyle groupStyle) +{ + result r = E_SUCCESS; + + _SliderImpl* pSliderImpl = _SliderImpl::GetInstance(*this); + SysAssertf((pSliderImpl == null), "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class."); + + int sliderStyle = 0; + if (showTitle) + { + sliderStyle |= SLIDER_STYLE_TITLE; + } + sliderStyle |= SLIDER_STYLE_BUBBLE; + + pSliderImpl = _SliderImpl::CreateSliderImplFN(this, rect, sliderStyle); + r = GetLastResult(); + 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)); + + _pControlImpl = pSliderImpl; + + return r; + +CATCH: + delete pSliderImpl; + pSliderImpl = null; + + return r; +} + +result +Slider::Construct(const Rectangle& rect, unsigned long sliderStyle, int minValue, int maxValue) +{ + result r = E_SUCCESS; + + _SliderImpl* pSliderImpl = _SliderImpl::GetInstance(*this); + SysAssertf((pSliderImpl == null), "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class."); + + pSliderImpl = _SliderImpl::CreateSliderImplN(this, rect, sliderStyle); + r = GetLastResult(); + 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)); + + _pControlImpl = pSliderImpl; + + return r; + +CATCH: + delete pSliderImpl; + pSliderImpl = null; + + return r; +} + +result +Slider::Construct(const FloatRectangle& rect, unsigned long sliderStyle, int minValue, int maxValue) +{ + result r = E_SUCCESS; + + _SliderImpl* pSliderImpl = _SliderImpl::GetInstance(*this); + SysAssertf((pSliderImpl == null), "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class."); + + pSliderImpl = _SliderImpl::CreateSliderImplFN(this, rect, sliderStyle); + r = GetLastResult(); + 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)); + + _pControlImpl = pSliderImpl; + + return r; + +CATCH: + delete pSliderImpl; + pSliderImpl = null; + + return r; +} + +result +Slider::SetRange(int minValue, int maxValue) +{ + _SliderImpl* pSliderImpl = _SliderImpl::GetInstance(*this); + SysAssertf(pSliderImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pSliderImpl->SetRange(minValue, maxValue); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +void +Slider::GetRange(int& minValue, int& maxValue) const +{ + const _SliderImpl* pSliderImpl = _SliderImpl::GetInstance(*this); + SysAssertf(pSliderImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pSliderImpl->GetRange(minValue, maxValue); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + return; +} + +void +Slider::SetValue(int value) +{ + _SliderImpl* pSliderImpl = _SliderImpl::GetInstance(*this); + SysAssertf(pSliderImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pSliderImpl->SetValue(value); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + return; +} + +int +Slider::GetValue(void) const +{ + const _SliderImpl* pSliderImpl = _SliderImpl::GetInstance(*this); + SysAssertf(pSliderImpl != null, "Not yet constructed. Construct() should be called before use."); + + int value = pSliderImpl->GetValue(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, -1, r, "[%s] Propagating.", GetErrorMessage(r)); + + return value; +} + +void +Slider::SetIcon(IconPosition position, const Bitmap& icon) +{ + _SliderImpl* pSliderImpl = _SliderImpl::GetInstance(*this); + SysAssertf(pSliderImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pSliderImpl->SetIcon(position, icon); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + return; +} + +void +Slider::AddAdjustmentEventListener(IAdjustmentEventListener& listener) +{ + _SliderImpl* pSliderImpl = _SliderImpl::GetInstance(*this); + SysAssertf(pSliderImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pSliderImpl->AddAdjustmentEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + return; +} + +void +Slider::RemoveAdjustmentEventListener(IAdjustmentEventListener& listener) +{ + _SliderImpl* pSliderImpl = _SliderImpl::GetInstance(*this); + SysAssertf(pSliderImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pSliderImpl->RemoveAdjustmentEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + return; +} + +result +Slider::SetTitleText(const String& title) +{ + _SliderImpl* pSliderImpl = _SliderImpl::GetInstance(*this); + SysAssertf(pSliderImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pSliderImpl->SetTitleText(title); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +String +Slider::GetTitleText(void) const +{ + const _SliderImpl* pSliderImpl = _SliderImpl::GetInstance(*this); + SysAssertf(pSliderImpl != null, "Not yet constructed. Construct() should be called before use."); + + String string = pSliderImpl->GetTitleText(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, String(), r, "[%s] Propagating.", GetErrorMessage(r)); + + return string; +} + +void +Slider::SetTitleTextColor(const Color& color) +{ + _SliderImpl* pSliderImpl = _SliderImpl::GetInstance(*this); + SysAssertf(pSliderImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pSliderImpl->SetTitleTextColor(color); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + return; +} + +Color +Slider::GetTitleTextColor(void) const +{ + const _SliderImpl* pSliderImpl = _SliderImpl::GetInstance(*this); + SysAssertf(pSliderImpl != null, "Not yet constructed. Construct() should be called before use."); + + Color color = pSliderImpl->GetTitleTextColor(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, Color(), r, "[%s] Propagating.", GetErrorMessage(r)); + + return color; +} + +void +Slider::AddSliderEventListener(ISliderEventListener& listener) +{ + _SliderImpl* pSliderImpl = _SliderImpl::GetInstance(*this); + SysAssertf(pSliderImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pSliderImpl->AddSliderEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + return; +} + +void +Slider::RemoveSliderEventListener(ISliderEventListener& listener) +{ + _SliderImpl* pSliderImpl = _SliderImpl::GetInstance(*this); + SysAssertf(pSliderImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pSliderImpl->RemoveSliderEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + return; +} + +result +Slider::SetBarColor(const Color& color) +{ + _SliderImpl* pSliderImpl = _SliderImpl::GetInstance(*this); + SysAssertf(pSliderImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pSliderImpl->SetBarColor(color); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +Color +Slider::GetBarColor(void) const +{ + const _SliderImpl* pSliderImpl = _SliderImpl::GetInstance(*this); + SysAssertf(pSliderImpl != null, "Not yet constructed. Construct() should be called before use."); + + Color color = pSliderImpl->GetBarColor(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, Color(), r, "[%s] Propagating.", GetErrorMessage(r)); + + return color; +} + +void +Slider::SetBarBackgroundColor(const Color& color) +{ + _SliderImpl* pSliderImpl = _SliderImpl::GetInstance(*this); + SysAssertf(pSliderImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pSliderImpl->SetBarBackgroundColor(color); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + return; +} + +Color +Slider::GetBarBackgroundColor(void) const +{ + const _SliderImpl* pSliderImpl = _SliderImpl::GetInstance(*this); + SysAssertf(pSliderImpl != null, "Not yet constructed. Construct() should be called before use."); + + Color color = pSliderImpl->GetBarBackgroundColor(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, Color(), r, "[%s] Propagating.", GetErrorMessage(r)); + + return color; +} + +result +Slider::SetColor(const Color& color) +{ + _SliderImpl* pSliderImpl = _SliderImpl::GetInstance(*this); + SysAssertf(pSliderImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pSliderImpl->SetColor(color); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +Color +Slider::GetColor(void) const +{ + const _SliderImpl* pSliderImpl = _SliderImpl::GetInstance(*this); + SysAssertf(pSliderImpl != null, "Not yet constructed. Construct() should be called before use."); + + Color color = pSliderImpl->GetColor(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, Color(), r, "[%s] Propagating.", GetErrorMessage(r)); + + return color; +} + +result +Slider::SetThumbBitmap(SliderThumbStatus status, const Bitmap& bitmap) +{ + _SliderImpl* pSliderImpl = _SliderImpl::GetInstance(*this); + SysAssertf(pSliderImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pSliderImpl->SetThumbBitmap(status, bitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +void +Slider::SetThumbTextColor(SliderThumbStatus status, const Color& color) +{ + _SliderImpl* pSliderImpl = _SliderImpl::GetInstance(*this); + SysAssertf(pSliderImpl != null, "Not yet constructed. Construct() should be called before use."); + + pSliderImpl->SetThumbTextColor(status, color); + + return; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlSplitPanel.cpp b/src/ui/controls/FUiCtrlSplitPanel.cpp new file mode 100644 index 0000000..6397970 --- /dev/null +++ b/src/ui/controls/FUiCtrlSplitPanel.cpp @@ -0,0 +1,295 @@ +// +// 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 FUiCtrlSplitPanel.cpp +* @brief This file contains implementation of SplitPanel class +*/ + +// Includes +#include +#include +#include "FUiCtrl_SplitPanelImpl.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +SplitPanel::SplitPanel(void) +{ + +} + +SplitPanel::~SplitPanel(void) +{ + +} + +result +SplitPanel::Construct(const Tizen::Graphics::Rectangle& rect, SplitPanelDividerStyle splitPanelDividerStyle, SplitPanelDividerDirection splitPanelDividerDirection) +{ + result r = E_SUCCESS; + _SplitPanelImpl* pSplitPanelImpl = _SplitPanelImpl::GetInstance(*this); + + SysAssertf(pSplitPanelImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pSplitPanelImpl = _SplitPanelImpl::CreateSplitPanelImplN(this, rect, splitPanelDividerStyle, splitPanelDividerDirection); + SysTryReturnResult(NID_UI_CTRL, pSplitPanelImpl, GetLastResult(), "Propagating."); + + _pControlImpl = pSplitPanelImpl; + + r = pSplitPanelImpl->Initialize(rect); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + +CATCH: + delete pSplitPanelImpl; + _pControlImpl = null; + + return r; +} + +result +SplitPanel::Construct(const Tizen::Graphics::FloatRectangle& rect, SplitPanelDividerStyle splitPanelDividerStyle, SplitPanelDividerDirection splitPanelDividerDirection) +{ + result r = E_SUCCESS; + _SplitPanelImpl* pSplitPanelImpl = _SplitPanelImpl::GetInstance(*this); + + SysAssertf(pSplitPanelImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pSplitPanelImpl = _SplitPanelImpl::CreateSplitPanelImplFN(this, rect, splitPanelDividerStyle, splitPanelDividerDirection); + SysTryReturnResult(NID_UI_CTRL, pSplitPanelImpl, GetLastResult(), "Propagating."); + + _pControlImpl = pSplitPanelImpl; + + r = pSplitPanelImpl->InitializeF(rect); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + +CATCH: + delete pSplitPanelImpl; + _pControlImpl = null; + + return r; +} + +result +SplitPanel::SetPane(Control* pControl, SplitPanelPaneOrder paneOrder) +{ + _SplitPanelImpl* pSplitPanelImpl = _SplitPanelImpl::GetInstance(*this); + SysAssertf(pSplitPanelImpl != null, "Not yet constructed. Construct() should be called before use."); + + if (pControl == null) + { + return pSplitPanelImpl->SetPane(null, paneOrder); + } + + _ControlImpl* pImpl = _ControlImpl::GetInstance(*pControl); + SysAssertf(pImpl != null, "Parameter pControl is not yet constructed. Construct() should be called before use."); + + return pSplitPanelImpl->SetPane(pImpl, paneOrder); +} + +Control* +SplitPanel::GetPane(SplitPanelPaneOrder paneOrder) const +{ + const _SplitPanelImpl* pSplitPanelImpl = _SplitPanelImpl::GetInstance(*this); + SysAssertf(pSplitPanelImpl != null, "Not yet constructed. Construct() should be called before use."); + + _ControlImpl* pSplitPaneImpl = pSplitPanelImpl->GetPane(paneOrder); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pSplitPaneImpl, null, r, "[%s] Propagating.", GetErrorMessage(r)); + return &(pSplitPaneImpl->GetPublic()); +} + +result +SplitPanel::SetDividerPosition(int position) +{ + _SplitPanelImpl* pSplitPanelImpl = _SplitPanelImpl::GetInstance(*this); + SysAssertf(pSplitPanelImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pSplitPanelImpl->SetDividerPosition(position); +} + +result +SplitPanel::SetDividerPosition(float position) +{ + _SplitPanelImpl* pSplitPanelImpl = _SplitPanelImpl::GetInstance(*this); + SysAssertf(pSplitPanelImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pSplitPanelImpl->SetDividerPosition(position); +} + +int +SplitPanel::GetDividerPosition(void) const +{ + const _SplitPanelImpl* pSplitPanelImpl = _SplitPanelImpl::GetInstance(*this); + SysAssertf(pSplitPanelImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pSplitPanelImpl->GetDividerPosition(); +} + +float +SplitPanel::GetDividerPositionF(void) const +{ + const _SplitPanelImpl* pSplitPanelImpl = _SplitPanelImpl::GetInstance(*this); + SysAssertf(pSplitPanelImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pSplitPanelImpl->GetDividerPositionF(); +} + +result +SplitPanel::SetMaximumDividerPosition(int position) +{ + _SplitPanelImpl* pSplitPanelImpl = _SplitPanelImpl::GetInstance(*this); + SysAssertf(pSplitPanelImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pSplitPanelImpl->SetMaximumDividerPosition(position); +} + +result +SplitPanel::SetMaximumDividerPosition(float position) +{ + _SplitPanelImpl* pSplitPanelImpl = _SplitPanelImpl::GetInstance(*this); + SysAssertf(pSplitPanelImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pSplitPanelImpl->SetMaximumDividerPosition(position); +} + +int +SplitPanel::GetMaximumDividerPosition(void) const +{ + const _SplitPanelImpl* pSplitPanelImpl = _SplitPanelImpl::GetInstance(*this); + SysAssertf(pSplitPanelImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pSplitPanelImpl->GetMaximumDividerPosition(); +} + +float +SplitPanel::GetMaximumDividerPositionF(void) const +{ + const _SplitPanelImpl* pSplitPanelImpl = _SplitPanelImpl::GetInstance(*this); + SysAssertf(pSplitPanelImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pSplitPanelImpl->GetMaximumDividerPositionF(); +} + +result +SplitPanel::SetMinimumDividerPosition(int position) +{ + _SplitPanelImpl* pSplitPanelImpl = _SplitPanelImpl::GetInstance(*this); + SysAssertf(pSplitPanelImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pSplitPanelImpl->SetMinimumDividerPosition(position); +} + +result +SplitPanel::SetMinimumDividerPosition(float position) +{ + _SplitPanelImpl* pSplitPanelImpl = _SplitPanelImpl::GetInstance(*this); + SysAssertf(pSplitPanelImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pSplitPanelImpl->SetMinimumDividerPosition(position); +} + +int +SplitPanel::GetMinimumDividerPosition(void) const +{ + const _SplitPanelImpl* pSplitPanelImpl = _SplitPanelImpl::GetInstance(*this); + SysAssertf(pSplitPanelImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pSplitPanelImpl->GetMinimumDividerPosition(); +} + +float +SplitPanel::GetMinimumDividerPositionF(void) const +{ + const _SplitPanelImpl* pSplitPanelImpl = _SplitPanelImpl::GetInstance(*this); + SysAssertf(pSplitPanelImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pSplitPanelImpl->GetMinimumDividerPositionF(); +} + +result +SplitPanel::MaximizePane(SplitPanelPaneOrder paneOrder) +{ + _SplitPanelImpl* pSplitPanelImpl = _SplitPanelImpl::GetInstance(*this); + SysAssertf(pSplitPanelImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pSplitPanelImpl->MaximizePane(paneOrder); +} + +bool +SplitPanel::IsPaneMaximized(SplitPanelPaneOrder paneOrder) const +{ + const _SplitPanelImpl* pSplitPanelImpl = _SplitPanelImpl::GetInstance(*this); + SysAssertf(pSplitPanelImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pSplitPanelImpl->IsPaneMaximized(paneOrder); +} + +result +SplitPanel::RestorePane(void) +{ + _SplitPanelImpl* pSplitPanelImpl = _SplitPanelImpl::GetInstance(*this); + SysAssertf(pSplitPanelImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pSplitPanelImpl->RestorePane(); +} + +result +SplitPanel::AddSplitPanelEventListener(ISplitPanelEventListener& listener) +{ + _SplitPanelImpl* pSplitPanelImpl = _SplitPanelImpl::GetInstance(*this); + SysAssertf(pSplitPanelImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pSplitPanelImpl->AddSplitPanelEventListener(listener); +} + +result +SplitPanel::AddSplitPanelEventListener(ISplitPanelEventListenerF& listener) +{ + _SplitPanelImpl* pSplitPanelImpl = _SplitPanelImpl::GetInstance(*this); + SysAssertf(pSplitPanelImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pSplitPanelImpl->AddSplitPanelEventListener(listener); +} + +result +SplitPanel::RemoveSplitPanelEventListener(ISplitPanelEventListener& listener) +{ + _SplitPanelImpl* pSplitPanelImpl = _SplitPanelImpl::GetInstance(*this); + SysAssertf(pSplitPanelImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pSplitPanelImpl->RemoveSplitPanelEventListener(listener); +} + +result +SplitPanel::RemoveSplitPanelEventListener(ISplitPanelEventListenerF& listener) +{ + _SplitPanelImpl* pSplitPanelImpl = _SplitPanelImpl::GetInstance(*this); + SysAssertf(pSplitPanelImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pSplitPanelImpl->RemoveSplitPanelEventListener(listener); +} + +}}} // Tizen::Ui::Controls + diff --git a/src/ui/controls/FUiCtrlTab.cpp b/src/ui/controls/FUiCtrlTab.cpp new file mode 100644 index 0000000..62fd91d --- /dev/null +++ b/src/ui/controls/FUiCtrlTab.cpp @@ -0,0 +1,349 @@ +// +// 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 FUiCtrlTab.cpp + * @brief This is the implementation file for Tab class. + * + * This file contains the implementation of Tab class. + */ + +#include +#include "FUiCtrl_TabImpl.h" + +// using namespaces +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; + + +namespace Tizen { namespace Ui { namespace Controls +{ +//////////////////////////////////////////////////////////////////////////////// +/// Tab class Lifecycle + +Tab::Tab(void) +{ + +} + +Tab::~Tab(void) +{ + +} + + +result +Tab::Construct(void) +{ + result r = E_SUCCESS; + + _TabImpl* pTabImpl = _TabImpl::GetInstance(*this); + + SysAssertf(pTabImpl == null, + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pTabImpl = _TabImpl::CreateTabImplN(this); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pTabImpl != null, r, r, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _pControlImpl = pTabImpl; + + return E_SUCCESS; +} + +//////////////////////////////////////////////////////////////////////////////// +/// Tab class Operation +void +Tab::AddActionEventListener(IActionEventListener& listener) +{ + _TabImpl* pTabImpl = _TabImpl::GetInstance(*this); + + SysAssertf(pTabImpl != null, "Not yet constructed. Construct() should be called before use."); + + pTabImpl->AddActionEventListener(listener); +} + + +void +Tab::RemoveActionEventListener(IActionEventListener& listener) +{ + _TabImpl* pTabImpl = _TabImpl::GetInstance(*this); + + SysAssertf(pTabImpl != null, "Not yet constructed. Construct() should be called before use."); + + pTabImpl->RemoveActionEventListener(listener); +} + +result +Tab::AddItem(const String& text, int actionId) +{ + _TabImpl* pTabImpl = _TabImpl::GetInstance(*this); + SysAssertf(pTabImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTabImpl->AddItem(text, actionId); +} + +result +Tab::AddItem(const Bitmap& titleIcon, const String& text, int actionId) +{ + _TabImpl* pTabImpl = _TabImpl::GetInstance(*this); + SysAssertf(pTabImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTabImpl->AddItem(titleIcon, text, actionId); +} + +result +Tab::AddItem(const Bitmap& icon, int actionId) +{ + _TabImpl* pTabImpl = _TabImpl::GetInstance(*this); + SysAssertf(pTabImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTabImpl->AddItem(icon, actionId); +} + +result +Tab::InsertItemAt(int index, const String& text, int actionId) +{ + _TabImpl* pTabImpl = _TabImpl::GetInstance(*this); + SysAssertf(pTabImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTabImpl->InsertItemAt(index, text, actionId); +} + +result +Tab::InsertItemAt(int index, const Bitmap& titleIcon, const String& text, int actionId) +{ + _TabImpl* pTabImpl = _TabImpl::GetInstance(*this); + SysAssertf(pTabImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTabImpl->InsertItemAt(index, titleIcon, text, actionId); +} + +result +Tab::InsertItemAt(int index, const Bitmap& icon, int actionId) +{ + _TabImpl* pTabImpl = _TabImpl::GetInstance(*this); + SysAssertf(pTabImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTabImpl->InsertItemAt(index, icon, actionId); +} + +result +Tab::SetItemAt(int index, const String& text, int actionId) +{ + _TabImpl* pTabImpl = _TabImpl::GetInstance(*this); + SysAssertf(pTabImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTabImpl->SetItemAt(index, text, actionId); +} + +result +Tab::SetItemAt(int index, const Bitmap& titleIcon, const String& text, int actionId) +{ + _TabImpl* pTabImpl = _TabImpl::GetInstance(*this); + SysAssertf(pTabImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTabImpl->SetItemAt(index, titleIcon, text, actionId); +} + +result +Tab::SetItemAt(int index, const Bitmap& icon, int actionId) +{ + _TabImpl* pTabImpl = _TabImpl::GetInstance(*this); + SysAssertf(pTabImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTabImpl->SetItemAt(index, icon, actionId); +} + +result +Tab::RemoveItemAt(int index) +{ + _TabImpl* pTabImpl = _TabImpl::GetInstance(*this); + SysAssertf(pTabImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTabImpl->RemoveItemAt(index); +} + + +result +Tab::RemoveAllItems(void) +{ + _TabImpl* pTabImpl = _TabImpl::GetInstance(*this); + SysAssertf(pTabImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTabImpl->RemoveAllItems(); +} + + +result +Tab::SetBadgeIcon(int actionId, const Tizen::Graphics::Bitmap* pBadgeIcon) +{ + _TabImpl* pTabImpl = _TabImpl::GetInstance(*this); + SysAssertf(pTabImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTabImpl->SetBadgeIcon(actionId, pBadgeIcon); +} + +int +Tab::GetItemCount(void) const +{ + const _TabImpl* pTabImpl = _TabImpl::GetInstance(*this); + SysAssertf(pTabImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTabImpl->GetItemCount(); +} + +int +Tab::GetItemIndexFromActionId(int actionId) const +{ + const _TabImpl* pTabImpl = _TabImpl::GetInstance(*this); + SysAssertf(pTabImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTabImpl->GetItemIndexFromActionId(actionId); +} + +int +Tab::GetItemActionIdAt(int index) const +{ + const _TabImpl* pTabImpl = _TabImpl::GetInstance(*this); + SysAssertf(pTabImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTabImpl->GetItemActionIdAt(index); +} + +void +Tab::SetSelectedItem(int index) +{ + _TabImpl* pTabImpl = _TabImpl::GetInstance(*this); + SysAssertf(pTabImpl != null, "Not yet constructed. Construct() should be called before use."); + + pTabImpl->SetSelectedItem(index); +} + +int +Tab::GetSelectedItemIndex(void) const +{ + const _TabImpl* pTabImpl = _TabImpl::GetInstance(*this); + SysAssertf(pTabImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTabImpl->GetSelectedItemIndex(); +} + +void +Tab::SetEditModeEnabled(bool enable) +{ + _TabImpl* pTabImpl = _TabImpl::GetInstance(*this); + SysAssertf(pTabImpl != null, "Not yet constructed. Construct() should be called before use."); + + pTabImpl->SetEditModeEnabled(enable); +} + +bool +Tab::IsEditModeEnabled(void) const +{ + const _TabImpl* pTabImpl = _TabImpl::GetInstance(*this); + SysAssertf(pTabImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTabImpl->IsEditModeEnabled(); +} + +result +Tab::SetBackgroundBitmap(const Bitmap& bitmap) +{ + _TabImpl* pTabImpl = _TabImpl::GetInstance(*this); + SysAssertf(pTabImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTabImpl->SetBackgroundBitmap(bitmap); +} + +result +Tab::SetFocusedItemBackgroundBitmap(const Bitmap& bitmap) +{ + _TabImpl* pTabImpl = _TabImpl::GetInstance(*this); + SysAssertf(pTabImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTabImpl->SetFocusedItemBackgroundBitmap(bitmap); +} + +void +Tab::SetTextColor(const Color& color) +{ + _TabImpl* pTabImpl = _TabImpl::GetInstance(*this); + SysAssertf(pTabImpl != null, "Not yet constructed. Construct() should be called before use."); + + pTabImpl->SetTextColor(color); +} + +Color +Tab::GetTextColor(void) const +{ + const _TabImpl* pTabImpl = _TabImpl::GetInstance(*this); + SysAssertf(pTabImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTabImpl->GetTextColor(); +} + +void +Tab::SetSelectedTextColor(const Color& color) +{ + _TabImpl* pTabImpl = _TabImpl::GetInstance(*this); + SysAssertf(pTabImpl != null, "Not yet constructed. Construct() should be called before use."); + + pTabImpl->SetSelectedTextColor(color); +} + +Color +Tab::GetSelectedTextColor(void) const +{ + const _TabImpl* pTabImpl = _TabImpl::GetInstance(*this); + SysAssertf(pTabImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTabImpl->GetSelectedTextColor(); +} + +void +Tab::SetHighlightedTextColor(const Color& color) +{ + _TabImpl* pTabImpl = _TabImpl::GetInstance(*this); + SysAssertf(pTabImpl != null, "Not yet constructed. Construct() should be called before use."); + + pTabImpl->SetHighlightedTextColor(color); +} + +Color +Tab::GetHighlightedTextColor(void) const +{ + const _TabImpl* pTabImpl = _TabImpl::GetInstance(*this); + SysAssertf(pTabImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTabImpl->GetHighlightedTextColor(); +} + +result +Tab::SetHighlightedItemBackgroundBitmap (const Bitmap& bitmap) +{ + _TabImpl* pTabImpl = _TabImpl::GetInstance(*this); + SysAssertf(pTabImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTabImpl->SetHighlightedItemBackgroundBitmap(bitmap); +} + +}}} //Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlTabBar.cpp b/src/ui/controls/FUiCtrlTabBar.cpp new file mode 100644 index 0000000..e4da941 --- /dev/null +++ b/src/ui/controls/FUiCtrlTabBar.cpp @@ -0,0 +1,250 @@ +// +// 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 FUiCtrlTabBar.cpp +* @brief This file contains implementation of TabBar class +*/ + +#include +#include +#include +#include "FUi_CoordinateSystemUtils.h" +#include "FUiCtrl_TabBarItemImpl.h" +#include "FUiCtrl_TabBarImpl.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Ui; + +namespace Tizen { namespace Ui { namespace Controls +{ + +TabBar::TabBar(void) +{ +} + + +TabBar::~TabBar(void) +{ +} + + +result +TabBar::Construct(int x, int y, int width) +{ + _TabBarImpl* pImpl = _TabBarImpl::GetInstance(*this); + SysAssertf(pImpl == null, + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + float floatX = _CoordinateSystemUtils::ConvertToFloat(x); + float floatY = _CoordinateSystemUtils::ConvertToFloat(y); + float floatWidth = _CoordinateSystemUtils::ConvertToFloat(width); + pImpl = _TabBarImpl::CreateTabBarImplN(this, FloatRectangle(floatX, floatY, floatWidth, 0.0f)); + result r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, pImpl, r, "Propagating."); + + _pControlImpl = pImpl; + + return r; +} + +result +TabBar::Construct(float x, float y, float width) +{ + _TabBarImpl* pImpl = _TabBarImpl::GetInstance(*this); + SysAssertf(pImpl == null, + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pImpl = _TabBarImpl::CreateTabBarImplN(this, FloatRectangle(x, y, width, 0.0f)); + result r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, pImpl, r, "Propagating."); + + _pControlImpl = pImpl; + + return r; +} + +result +TabBar::AddItem(const TabBarItem& item) +{ + _TabBarImpl* pImpl = _TabBarImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + 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()); +} + +result +TabBar::InsertItemAt(int index, const TabBarItem& item) +{ + _TabBarImpl* pImpl = _TabBarImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + 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()); +} + +Color +TabBar::GetColor(void) const +{ + const _TabBarImpl* pImpl = _TabBarImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetColor(); +} + +int +TabBar::GetItemCount(void) const +{ + const _TabBarImpl* pImpl = _TabBarImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetItemCount(); +} + +Color +TabBar::GetSelectedItemColor(void) const +{ + const _TabBarImpl* pImpl = _TabBarImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetSelectedItemColor(); +} + +Color +TabBar::GetItemTextColor(TabBarItemStatus status) const +{ + const _TabBarImpl* pImpl = _TabBarImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetItemTextColor(status); +} + +int +TabBar::GetSelectedItemIndex(void) const +{ + const _TabBarImpl* pImpl = _TabBarImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetSelectedItemIndex(); +} + +result +TabBar::RemoveItemAt(int index) +{ + _TabBarImpl* pImpl = _TabBarImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->RemoveItemAt(index); +} + +result +TabBar::RemoveAllItems(void) +{ + _TabBarImpl* pImpl = _TabBarImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->RemoveAllItems(); +} + +result +TabBar::SetColor(const Color& color) +{ + _TabBarImpl* pImpl = _TabBarImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetColor(color); +} + +result +TabBar::SetItemAt(int index, const TabBarItem& item) +{ + _TabBarImpl* pImpl = _TabBarImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + 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()); +} + +result +TabBar::SetItemSelected(int index) +{ + _TabBarImpl* pImpl = _TabBarImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetItemSelected(index); +} + +result +TabBar::SetItemTextColor(TabBarItemStatus status, const Color& color) +{ + _TabBarImpl* pImpl = _TabBarImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetItemTextColor(status, color); +} + +result +TabBar::SetSelectedItemColor(const Color& color) +{ + _TabBarImpl* pImpl = _TabBarImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetSelectedItemColor(color); +} + +result +TabBar::SetWidth(int width) +{ + _TabBarImpl* pImpl = _TabBarImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetWidth(_CoordinateSystemUtils::ConvertToFloat(width)); +} + +result +TabBar::SetWidth(float width) +{ + _TabBarImpl* pImpl = _TabBarImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetWidth(width); +} + +void +TabBar::AddActionEventListener(IActionEventListener& listener) +{ + _TabBarImpl* pImpl = _TabBarImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->AddActionEventListener(listener); +} + + +void +TabBar::RemoveActionEventListener(IActionEventListener& listener) +{ + _TabBarImpl* pImpl = _TabBarImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->RemoveActionEventListener(listener); +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlTabBarItem.cpp b/src/ui/controls/FUiCtrlTabBarItem.cpp new file mode 100644 index 0000000..7ee91f2 --- /dev/null +++ b/src/ui/controls/FUiCtrlTabBarItem.cpp @@ -0,0 +1,103 @@ +// +// 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 FUiCtrlTabBarItem.cpp +* @brief This file contains implementation of TabBarItem class +*/ + +#include +#include +#include +#include +#include "FUiCtrl_TabBarItemImpl.h" + +using namespace Tizen::Ui::Controls; +using namespace Tizen::Base; + +namespace Tizen { namespace Ui { namespace Controls +{ + +TabBarItem::TabBarItem(void) + : __pTabBarItemImpl(null) +{ +} + +TabBarItem::~TabBarItem(void) +{ + delete __pTabBarItemImpl; + __pTabBarItemImpl = null; +} + +result +TabBarItem::Construct(const String& text, int actionId) +{ + 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(); + SysTryReturnResult(NID_UI_CTRL, __pTabBarItemImpl != null, E_OUT_OF_MEMORY, "Memory allocation failed."); + + __pTabBarItemImpl->SetText(text); + __pTabBarItemImpl->SetActionId(actionId); + + return E_SUCCESS; +} + +result +TabBarItem::SetActionId(int actionId) +{ + 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; +} + +int +TabBarItem::GetActionId(void) const +{ + 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(); +} + +String +TabBarItem::GetText(void) const +{ + ClearLastResult(); + + 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 String& text) +{ + SysTryReturnResult(NID_UI_CTRL, __pTabBarItemImpl != null, E_INVALID_STATE, "__pTabBarItemImpl must not be null"); + + __pTabBarItemImpl->SetText(text); + + return E_SUCCESS; +} + +} } } // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlTableView.cpp b/src/ui/controls/FUiCtrlTableView.cpp new file mode 100644 index 0000000..1693fa2 --- /dev/null +++ b/src/ui/controls/FUiCtrlTableView.cpp @@ -0,0 +1,517 @@ +// +// 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 FUiCtrlTableView.cpp +* @brief This is the implementation file for TableView class. +* +* This header file contains the implementation of TableView class. +*/ + +#include +#include +#include +#include +#include +#include "FUiCtrl_TableViewImpl.h" +#include "FUi_CoordinateSystemUtils.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +//////////////////////////////////////////////////////////////////////////////// +/// TableView class + +TableView::TableView(void) +{ +} + +TableView::~TableView(void) +{ +} + +result +TableView::Construct(const Tizen::Graphics::Rectangle& rect, bool itemDivider, TableViewScrollBarStyle scrollStyle) +{ + result r = E_SUCCESS; + + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pImpl = _TableViewImpl::CreateTableViewImplN(this, _CoordinateSystemUtils::ConvertToFloat(rect), TABLE_VIEW_STYLE_SIMPLE, itemDivider, scrollStyle); + + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pImpl != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlImpl = pImpl; + + r = SetBounds(rect); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating", GetErrorMessage(r)); + + return E_SUCCESS; + +CATCH: + Control::Dispose(); + + return r; +} + +result +TableView::Construct(const Tizen::Graphics::FloatRectangle& rect, bool itemDivider, TableViewScrollBarStyle scrollStyle) +{ + result r = E_SUCCESS; + + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pImpl = _TableViewImpl::CreateTableViewImplN(this, rect, TABLE_VIEW_STYLE_SIMPLE, itemDivider, scrollStyle); + + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pImpl != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlImpl = pImpl; + + r = SetBounds(rect); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating", GetErrorMessage(r)); + + return E_SUCCESS; + +CATCH: + Control::Dispose(); + + return r; +} + +void +TableView::SetItemProvider(ITableViewItemProvider* pProvider) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetSimpleStyleItemProvider(pProvider); +} + +void +TableView::SetItemProviderF(ITableViewItemProviderF* pProvider) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetSimpleStyleItemProviderF(pProvider); +} + +result +TableView::AddTableViewItemEventListener(ITableViewItemEventListener& listener) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->AddTableViewItemEventListener(listener); +} + +result +TableView::RemoveTableViewItemEventListener(ITableViewItemEventListener& listener) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->RemoveTableViewItemEventListener(listener); +} + +result +TableView::AddFastScrollListener(IFastScrollListener& listener) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->AddFastScrollListener(listener); +} + +result +TableView::RemoveFastScrollListener(IFastScrollListener& listener) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->RemoveFastScrollListener(listener); +} + +result +TableView::AddScrollEventListener(IScrollEventListener& listener) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->AddScrollEventListener(listener); +} + +result +TableView::RemoveScrollEventListener(IScrollEventListener& listener) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->RemoveScrollEventListener(listener); +} + +result +TableView::AddScrollEventListener(IScrollEventListenerF& listener) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->AddScrollEventListener(listener); +} + +result +TableView::RemoveScrollEventListener(IScrollEventListenerF& listener) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->RemoveScrollEventListener(listener); +} + +result +TableView::SetFastScrollIndex(const String& text, bool useSearchIcon) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetFastScrollIndex(text, 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; + r = pImpl->GetTopDrawnItemIndex(groupIndex, itemIndex); + SetLastResult(r); + + return itemIndex; +} + +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; + r = pImpl->GetBottomDrawnItemIndex(groupIndex, itemIndex); + SetLastResult(r); + + return itemIndex; +} + +result +TableView::ScrollToItem(int itemIndex, TableViewScrollItemAlignment itemAlignment) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->ScrollToItem(0, itemIndex, itemAlignment); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +TableView::SetItemChecked(int itemIndex, bool check) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetItemChecked(0, itemIndex, check); +} + +bool +TableView::IsItemChecked(int itemIndex) const +{ + const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsItemChecked(0, itemIndex); +} + +result +TableView::SetItemEnabled(int itemIndex, bool enable) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetItemEnabled(0, itemIndex, enable); +} + +bool +TableView::IsItemEnabled(int itemIndex) const +{ + const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsItemEnabled(0, itemIndex); +} + +int +TableView::GetItemCount(void) const +{ + const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetItemCountAt(0); +} + +result +TableView::RefreshItem(int itemIndex, TableViewRefreshType type) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->RefreshTableView(0, itemIndex, type); +} + +result +TableView::RefreshAllItems(void) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->RefreshAllItems(); +} + +void +TableView::UpdateTableView(void) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->UpdateTableView(); +} + +int +TableView::GetItemIndexFromPosition(const Point& position) const +{ + 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->GetItemIndexFromPosition(position, groupIndex, itemIndex); + + return itemIndex; +} + +int +TableView::GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& position) const +{ + 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->GetItemIndexFromPosition(position, groupIndex, itemIndex); + + return itemIndex; +} + + +void +TableView::SetItemDividerColor(const Color& color) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetItemDividerColor(color); +} + +Color +TableView::GetItemDividerColor(void) const +{ + const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetItemDividerColor(); +} + +void +TableView::SetBackgroundColor(const Color& color) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetBackgroundColor(color); + + return; +} + +Color +TableView::GetBackgroundColor(void) const +{ + const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetBackgroundColor(); +} + +void +TableView::BeginReorderingMode(void) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->BeginReorderingMode(); +} + +void +TableView::EndReorderingMode(void) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->EndReorderingMode(); +} + +bool +TableView::IsInReorderingMode(void) const +{ + const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsInReorderingMode(); +} + +result +TableView::ScrollByPixel(int pixel) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->ScrollByPixel(_CoordinateSystemUtils::ConvertToFloat(pixel)); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +TableView::ScrollByPixel(float pixel) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->ScrollByPixel(pixel); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +int +TableView::GetCurrentScrollPosition(void) const +{ + const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return _CoordinateSystemUtils::ConvertToInteger(pImpl->GetCurrentScrollPosition()); +} + +float +TableView::GetCurrentScrollPositionF(void) const +{ + const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetCurrentScrollPosition(); +} + + +void +TableView::SetScrollEnabled(bool enable) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetScrollEnabled(enable); + + return; +} + +bool +TableView::IsScrollEnabled(void) const +{ + const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsScrollEnabled(); +} + +void +TableView::SetScrollInputMode(ScrollInputMode mode) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + pImpl->SetScrollInputMode(mode); +} + +ScrollInputMode +TableView::GetScrollInputMode(void) const +{ + const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + return pImpl->GetScrollInputMode(); +} + +result +TableView::OpenContextItem(int itemIndex) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + return pImpl->OpenContextItem(0, itemIndex); +} + +result +TableView::CloseContextItem(int itemIndex) +{ + _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + return pImpl->CloseContextItem(0, itemIndex); +} + +bool +TableView::IsContextItemOpened(int itemIndex) const +{ + const _TableViewImpl* pImpl = _TableViewImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not-yet constructed! Construct() should be called before use."); + + return pImpl->IsContextItemOpened(0, itemIndex); +} + +}}} //Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlTableViewContextItem.cpp b/src/ui/controls/FUiCtrlTableViewContextItem.cpp new file mode 100644 index 0000000..d4456fe --- /dev/null +++ b/src/ui/controls/FUiCtrlTableViewContextItem.cpp @@ -0,0 +1,63 @@ +// +// 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 FUiCtrlTableViewContextItem.cpp + * @brief This is the implementation file for TableViewContextItem class. + * + * This file contains the implementation of TableViewContextItem class. + */ + +#include +#include "FUiCtrl_TableViewItemImpl.h" +#include "FUi_CoordinateSystemUtils.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +TableViewContextItem::TableViewContextItem(void) +{ +} + +TableViewContextItem::~TableViewContextItem(void) +{ +} + +result +TableViewContextItem::Construct(const Tizen::Graphics::Dimension& itemSize) +{ + return Construct(_CoordinateSystemUtils::ConvertToFloat(itemSize)); +} + +result +TableViewContextItem::Construct(const Tizen::Graphics::FloatDimension& itemSize) +{ + result r = E_SUCCESS; + + _TableViewItemImpl* pImpl = _TableViewItemImpl::GetInstance(*this); + SysAssertf(pImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + _pControlImpl = _TableViewItemImpl::CreateTableViewItemImplN(this, itemSize); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, _pControlImpl != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + + return r; +} + + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlTableViewGroupItem.cpp b/src/ui/controls/FUiCtrlTableViewGroupItem.cpp new file mode 100644 index 0000000..dab9453 --- /dev/null +++ b/src/ui/controls/FUiCtrlTableViewGroupItem.cpp @@ -0,0 +1,104 @@ +// +// 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 FUiCtrlTableViewGroupItem.cpp +* @brief This is the implementation file for TableViewGroupItem class. +* +* This header file contains the implementation of TableViewGroupItem class. +*/ + +#include +#include "FUiCtrl_TableViewItemImpl.h" +#include "FUi_CoordinateSystemUtils.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +TableViewGroupItem::TableViewGroupItem(void) +{ +} + +TableViewGroupItem::~TableViewGroupItem(void) +{ +} + +result +TableViewGroupItem::Construct(const Dimension& itemSize) +{ + return Construct(_CoordinateSystemUtils::ConvertToFloat(itemSize)); +} + +result +TableViewGroupItem::Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::Dimension& itemSize) +{ + return Construct(layout, layout, _CoordinateSystemUtils::ConvertToFloat(itemSize)); +} + +result +TableViewGroupItem::Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, const Tizen::Graphics::Dimension& itemSize) +{ + return Construct(portraitLayout, landscapeLayout, _CoordinateSystemUtils::ConvertToFloat(itemSize)); +} + +result +TableViewGroupItem::Construct(const FloatDimension& itemSize) +{ + result r = E_SUCCESS; + + _TableViewItemImpl* pImpl = _TableViewItemImpl::GetInstance(*this); + SysAssertf(pImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pImpl = _TableViewItemImpl::CreateTableViewItemImplN(this, itemSize); + + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pImpl != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlImpl = pImpl; + + return r; +} + +result +TableViewGroupItem::Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::FloatDimension& itemSize) +{ + return Construct(layout, layout, itemSize); +} + +result +TableViewGroupItem::Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, const Tizen::Graphics::FloatDimension& itemSize) +{ + result r = E_SUCCESS; + + _TableViewItemImpl* pImpl = _TableViewItemImpl::GetInstance(*this); + SysAssertf(pImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pImpl = _TableViewItemImpl::CreateTableViewItemImplN(this, itemSize, TABLE_VIEW_ANNEX_STYLE_NORMAL, &(const_cast (portraitLayout)), &(const_cast (landscapeLayout))); + + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pImpl != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlImpl = pImpl; + + return r; +} + + +}}} //Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlTableViewItem.cpp b/src/ui/controls/FUiCtrlTableViewItem.cpp new file mode 100644 index 0000000..3382698 --- /dev/null +++ b/src/ui/controls/FUiCtrlTableViewItem.cpp @@ -0,0 +1,128 @@ +// +// 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 FUiCtrlTableViewItem.cpp +* @brief This file contains implementation of TableViewItem class +*/ + + +//includes +#include +#include +#include "FUiCtrl_TableViewItemImpl.h" +#include "FUiCtrl_ListItemBaseImpl.h" +#include "FUi_CoordinateSystemUtils.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +TableViewItem::TableViewItem(void) + : TableViewItemBase() +{ + // empty statement +} + +TableViewItem::~TableViewItem(void) +{ + // empty statement +} + +result +TableViewItem::Construct(const Tizen::Graphics::Dimension& itemSize, TableViewAnnexStyle style) +{ + return Construct(_CoordinateSystemUtils::ConvertToFloat(itemSize), style); +} + +result +TableViewItem::Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::Dimension& itemSize, TableViewAnnexStyle style) +{ + return Construct(layout, layout, _CoordinateSystemUtils::ConvertToFloat(itemSize), style); +} + +result +TableViewItem::Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, const Tizen::Graphics::Dimension& itemSize, TableViewAnnexStyle style) +{ + return Construct(portraitLayout, landscapeLayout, _CoordinateSystemUtils::ConvertToFloat(itemSize), style); +} + +result +TableViewItem::Construct(const Tizen::Graphics::FloatDimension& itemSize, TableViewAnnexStyle style) +{ + result r = E_SUCCESS; + _TableViewItemImpl* pImpl = _TableViewItemImpl::GetInstance(*this); + SysAssertf(pImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pImpl = _TableViewItemImpl::CreateTableViewItemImplN(this, itemSize, style); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pImpl != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlImpl = pImpl; + + return r; +} + +result +TableViewItem::Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::FloatDimension& itemSize, TableViewAnnexStyle style) +{ + return Construct(layout, layout, itemSize, style); +} + +result +TableViewItem::Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, const Tizen::Graphics::FloatDimension& itemSize, TableViewAnnexStyle style) +{ + result r = E_SUCCESS; + _TableViewItemImpl* pImpl = _TableViewItemImpl::GetInstance(*this); + SysAssertf(pImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pImpl = _TableViewItemImpl::CreateTableViewItemImplN(this, itemSize, style, &(const_cast (portraitLayout)), &(const_cast (landscapeLayout))); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pImpl != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlImpl = pImpl; + + return r; +} + +void +TableViewItem::SetContextItem(const TableViewContextItem* pItem) +{ + _TableViewItemImpl* pImpl = _TableViewItemImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + _TableViewItemImpl* pItemImpl = null; + if (pItem != null) + { + pItemImpl = const_cast<_TableViewItemImpl*>(_TableViewItemImpl::GetInstance(*pItem)); + } + + pImpl->SetContextItem(pItemImpl); +} + +int +TableViewItem::GetAnnexWidth(TableViewAnnexStyle style) +{ + return _CoordinateSystemUtils::ConvertToInteger(_TableViewItemImpl::GetAnnexWidth(style)); +} + +float +TableViewItem::GetAnnexWidthF(TableViewAnnexStyle style) +{ + return _TableViewItemImpl::GetAnnexWidth(style); +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlTableViewItemBase.cpp b/src/ui/controls/FUiCtrlTableViewItemBase.cpp new file mode 100644 index 0000000..034c91f --- /dev/null +++ b/src/ui/controls/FUiCtrlTableViewItemBase.cpp @@ -0,0 +1,93 @@ +// +// 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 FUiCtrlTableViewItemBase.cpp +* @brief This file contains implementation of TableViewItemBase class +*/ + +//includes +#include +#include "FUiCtrl_TableViewItemImpl.h" + + +namespace Tizen { namespace Ui { namespace Controls +{ + +TableViewItemBase::TableViewItemBase(void) +{ + // empty statement +} + +TableViewItemBase::~TableViewItemBase(void) +{ + // empty statement +} + +result +TableViewItemBase::SetBackgroundBitmap(const Tizen::Graphics::Bitmap* pBitmap, TableViewItemDrawingStatus status) +{ + _TableViewItemImpl* pImpl = _TableViewItemImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetBackgroundBitmap(status, pBitmap); +} + +void +TableViewItemBase::SetBackgroundColor(const Tizen::Graphics::Color& color, TableViewItemDrawingStatus status) +{ + _TableViewItemImpl* pImpl = _TableViewItemImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetBackgroundColor(status, color); +} + +Tizen::Graphics::Color +TableViewItemBase::GetBackgroundColor(TableViewItemDrawingStatus status) const +{ + const _TableViewItemImpl* pImpl = _TableViewItemImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetBackgroundColor(status); +} + +result +TableViewItemBase::SetIndividualSelectionEnabled(const Tizen::Ui::Control* pControl, bool enable) +{ + _TableViewItemImpl* pImpl = _TableViewItemImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*pControl); + SysTryReturnResult(NID_UI_CTRL, pControlImpl != null, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + return pImpl->SetIndividualSelectionEnabled(*pControlImpl, enable); +} + +bool +TableViewItemBase::IsIndividualSelectionEnabled(const Tizen::Ui::Control* pControl) +{ + _TableViewItemImpl* pImpl = _TableViewItemImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*pControl); + SysTryReturnResult(NID_UI_CTRL, pControlImpl != null, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + return pImpl->IsIndividualSelectionEnabled(*pControlImpl); +} + +}}} // Tizen::Ui::Controls + diff --git a/src/ui/controls/FUiCtrlTableViewSimpleGroupItem.cpp b/src/ui/controls/FUiCtrlTableViewSimpleGroupItem.cpp new file mode 100644 index 0000000..601e409 --- /dev/null +++ b/src/ui/controls/FUiCtrlTableViewSimpleGroupItem.cpp @@ -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 FUiCtrlTableViewSimpleGroupItem.cpp +* @brief This is the implementation file for TableViewSimpleGroupItem class. +* +* This header file contains the implementation of TableViewSimpleGroupItem class. +*/ + +#include +#include "FUiCtrl_TableViewItemImpl.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +TableViewSimpleGroupItem::TableViewSimpleGroupItem(void) +{ +} + +TableViewSimpleGroupItem::~TableViewSimpleGroupItem(void) +{ +} + +result +TableViewSimpleGroupItem::Construct(const Dimension& itemSize) +{ + return TableViewGroupItem::Construct(itemSize); +} + +result +TableViewSimpleGroupItem::Construct(const FloatDimension& itemSize) +{ + return TableViewGroupItem::Construct(itemSize); +} + +result +TableViewSimpleGroupItem::Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::Dimension& itemSize) +{ + return TableViewGroupItem::Construct(layout, itemSize); +} + +result +TableViewSimpleGroupItem::Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::FloatDimension& itemSize) +{ + return TableViewGroupItem::Construct(layout, itemSize); +} + +result +TableViewSimpleGroupItem::SetItemContents(const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBitmap) +{ + _TableViewItemImpl* pImpl = _TableViewItemImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetSimpleItemContents(text, pBitmap, true); +} + +result +TableViewSimpleGroupItem::SetTextColor(const Tizen::Graphics::Color& color, TableViewItemDrawingStatus status) +{ + _TableViewItemImpl* pImpl = _TableViewItemImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetSimpleGroupItemTextColor(color, status); +} + +Tizen::Graphics::Color +TableViewSimpleGroupItem::GetTextColor(TableViewItemDrawingStatus status) const +{ + const _TableViewItemImpl* pImpl = _TableViewItemImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetSimpleGroupItemTextColor(status); +} + +result +TableViewSimpleGroupItem::SetTextSize(int size) +{ + _TableViewItemImpl* pImpl = _TableViewItemImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetSimpleItemTextSize(size); +} + +int +TableViewSimpleGroupItem::GetTextSize(void) const +{ + const _TableViewItemImpl* pImpl = _TableViewItemImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetSimpleItemTextSize(); +} + +}}} //Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlTableViewSimpleItem.cpp b/src/ui/controls/FUiCtrlTableViewSimpleItem.cpp new file mode 100644 index 0000000..803f56f --- /dev/null +++ b/src/ui/controls/FUiCtrlTableViewSimpleItem.cpp @@ -0,0 +1,116 @@ +// +// 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 FUiCtrlTableViewSimpleItem.cpp +* @brief This file contains implementation of TableViewSimpleItem class +*/ + + +//includes +#include +#include +#include "FUiCtrl_TableViewItemImpl.h" + + +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +TableViewSimpleItem::TableViewSimpleItem(void) + : TableViewItem() +{ + // empty statement +} + +TableViewSimpleItem::~TableViewSimpleItem(void) +{ + // empty statement +} + +result +TableViewSimpleItem::Construct(const Tizen::Graphics::Dimension& itemSize, TableViewAnnexStyle style) +{ + return TableViewItem::Construct(itemSize, style); +} + +result +TableViewSimpleItem::Construct(const Tizen::Graphics::FloatDimension& itemSize, TableViewAnnexStyle style) +{ + return TableViewItem::Construct(itemSize, style); +} + +result +TableViewSimpleItem::Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::Dimension& itemSize, TableViewAnnexStyle style) +{ + return TableViewItem::Construct(layout, itemSize, style); +} + +result +TableViewSimpleItem::Construct(const Tizen::Ui::Layout& layout, const Tizen::Graphics::FloatDimension& itemSize, TableViewAnnexStyle style) +{ + return TableViewItem::Construct(layout, itemSize, style); +} + +result +TableViewSimpleItem::SetItemContents(const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBitmap) +{ + _TableViewItemImpl* pImpl = _TableViewItemImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetSimpleItemContents(text, pBitmap); +} + +void +TableViewSimpleItem::SetTextColor(const Tizen::Graphics::Color& color, TableViewItemDrawingStatus status) +{ + _TableViewItemImpl* pImpl = _TableViewItemImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetSimpleItemTextColor(color, status); +} + +Tizen::Graphics::Color +TableViewSimpleItem::GetTextColor(TableViewItemDrawingStatus status) const +{ + const _TableViewItemImpl* pImpl = _TableViewItemImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetSimpleItemTextColor(status); +} + +result +TableViewSimpleItem::SetTextSize(int size) +{ + _TableViewItemImpl* pImpl = _TableViewItemImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetSimpleItemTextSize(size); +} + +int +TableViewSimpleItem::GetTextSize(void) const +{ + const _TableViewItemImpl* pImpl = _TableViewItemImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetSimpleItemTextSize(); +} + +}}} + diff --git a/src/ui/controls/FUiCtrlTextBox.cpp b/src/ui/controls/FUiCtrlTextBox.cpp new file mode 100644 index 0000000..3cd160b --- /dev/null +++ b/src/ui/controls/FUiCtrlTextBox.cpp @@ -0,0 +1,441 @@ +// +// 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 FUiCtrlTextBox.cpp +* @brief This is the implementation file for TextBox class. +*/ + +#include +#include +#include "FUiCtrl_TextBoxImpl.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; + +namespace Tizen { namespace Ui { namespace Controls +{ + +TextBox::TextBox(void) +{ +} + +TextBox::~TextBox(void) +{ +} + +result +TextBox::Construct(const Rectangle& rect, TextBoxBorder border) +{ + _TextBoxImpl* pTextBoxImpl = _TextBoxImpl::GetInstance(*this); + SysAssertf(pTextBoxImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pTextBoxImpl = _TextBoxImpl::CreateTextBoxImplN(this); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pTextBoxImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlImpl = pTextBoxImpl; + + r = SetBounds(rect.x, rect.y, rect.width, rect.height); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pTextBoxImpl->Initialize(border); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + +} + +result +TextBox::Construct(const FloatRectangle& rect, TextBoxBorder border) +{ + _TextBoxImpl* pTextBoxImpl = _TextBoxImpl::GetInstance(*this); + SysAssertf(pTextBoxImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pTextBoxImpl = _TextBoxImpl::CreateTextBoxImplN(this); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pTextBoxImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlImpl = pTextBoxImpl; + + r = SetBounds(rect.x, rect.y, rect.width, rect.height); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pTextBoxImpl->Initialize(border); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +TextBox::SetAutoLinkMask(unsigned long autoLinks) +{ + _TextBoxImpl* pTextBoxImpl = _TextBoxImpl::GetInstance(*this); + SysAssertf(pTextBoxImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTextBoxImpl->SetAutoLinkMask(autoLinks); +} + +unsigned long +TextBox::GetAutoLinkMask(void) const +{ + const _TextBoxImpl* pTextBoxImpl = _TextBoxImpl::GetInstance(*this); + SysAssertf(pTextBoxImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTextBoxImpl->GetAutoLinkMask(); +} + +void +TextBox::AddUiLinkEventListener(IUiLinkEventListener& listener) +{ + _TextBoxImpl* pTextBoxImpl = _TextBoxImpl::GetInstance(*this); + SysAssertf(pTextBoxImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pTextBoxImpl->AddUiLinkEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +TextBox::RemoveUiLinkEventListener(IUiLinkEventListener& listener) +{ + _TextBoxImpl* pTextBoxImpl = _TextBoxImpl::GetInstance(*this); + SysAssertf(pTextBoxImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pTextBoxImpl->RemoveUiLinkEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +result +TextBox::AppendCharacter(const Character& character) +{ + _TextBoxImpl* pTextBoxImpl = _TextBoxImpl::GetInstance(*this); + SysAssertf(pTextBoxImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTextBoxImpl->AppendCharacter(character); +} + +result +TextBox::AppendText(const String& text) +{ + _TextBoxImpl* pTextBoxImpl = _TextBoxImpl::GetInstance(*this); + SysAssertf(pTextBoxImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTextBoxImpl->AppendText(text); +} + +result +TextBox::Clear(void) +{ + _TextBoxImpl* pTextBoxImpl = _TextBoxImpl::GetInstance(*this); + SysAssertf(pTextBoxImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTextBoxImpl->Clear(); +} + +int +TextBox::GetLineCount(void) const +{ + const _TextBoxImpl* pTextBoxImpl = _TextBoxImpl::GetInstance(*this); + SysAssertf(pTextBoxImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTextBoxImpl->GetLineCount(); +} + +String +TextBox::GetText(void) const +{ + const _TextBoxImpl* pTextBoxImpl = _TextBoxImpl::GetInstance(*this); + SysAssertf(pTextBoxImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTextBoxImpl->GetText(); +} + +String +TextBox::GetText(int start, int end) const +{ + const _TextBoxImpl* pTextBoxImpl = _TextBoxImpl::GetInstance(*this); + SysAssertf(pTextBoxImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTextBoxImpl->GetText(start, end); +} + +int +TextBox::GetTextLength(void) const +{ + const _TextBoxImpl* pTextBoxImpl = _TextBoxImpl::GetInstance(*this); + SysAssertf(pTextBoxImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTextBoxImpl->GetTextLength(); +} + +result +TextBox::InsertCharacterAt(int index, const Character& character) +{ + _TextBoxImpl* pTextBoxImpl = _TextBoxImpl::GetInstance(*this); + SysAssertf(pTextBoxImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTextBoxImpl->InsertCharacterAt(index, character); +} + +result +TextBox::InsertTextAt(int index, const String& text) +{ + _TextBoxImpl* pTextBoxImpl = _TextBoxImpl::GetInstance(*this); + SysAssertf(pTextBoxImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTextBoxImpl->InsertTextAt(index, text); +} + +result +TextBox::SetText(const String& text) +{ + _TextBoxImpl* pTextBoxImpl = _TextBoxImpl::GetInstance(*this); + SysAssertf(pTextBoxImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTextBoxImpl->SetText(text); +} + +int +TextBox::GetLineSpacing(void) const +{ + const _TextBoxImpl* pTextBoxImpl = _TextBoxImpl::GetInstance(*this); + SysAssertf(pTextBoxImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTextBoxImpl->GetLineSpacing(); +} + +float +TextBox::GetLineSpacingF(void) const +{ + const _TextBoxImpl* pTextBoxImpl = _TextBoxImpl::GetInstance(*this); + SysAssertf(pTextBoxImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTextBoxImpl->GetLineSpacingF(); +} + +result +TextBox::SetLineSpacing(int multiplier, int extra) +{ + _TextBoxImpl* pTextBoxImpl = _TextBoxImpl::GetInstance(*this); + SysAssertf(pTextBoxImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTextBoxImpl->SetLineSpacing(multiplier, extra); +} + +result +TextBox::SetLineSpacing(int multiplier, float extra) +{ + _TextBoxImpl* pTextBoxImpl = _TextBoxImpl::GetInstance(*this); + SysAssertf(pTextBoxImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTextBoxImpl->SetLineSpacing(multiplier, extra); +} + +HorizontalAlignment +TextBox::GetTextAlignment(void) const +{ + const _TextBoxImpl* pTextBoxImpl = _TextBoxImpl::GetInstance(*this); + SysAssertf(pTextBoxImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTextBoxImpl->GetTextAlignment(); +} + +result +TextBox::SetTextAlignment(HorizontalAlignment alignment) +{ + _TextBoxImpl* pTextBoxImpl = _TextBoxImpl::GetInstance(*this); + SysAssertf(pTextBoxImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTextBoxImpl->SetTextAlignment(alignment); +} + +int +TextBox::GetTextSize(void) const +{ + const _TextBoxImpl* pTextBoxImpl = _TextBoxImpl::GetInstance(*this); + SysAssertf(pTextBoxImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTextBoxImpl->GetTextSize(); +} + +float +TextBox::GetTextSizeF(void) const +{ + const _TextBoxImpl* pTextBoxImpl = _TextBoxImpl::GetInstance(*this); + SysAssertf(pTextBoxImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTextBoxImpl->GetTextSizeF(); +} + +result +TextBox::SetTextSize(int size) +{ + _TextBoxImpl* pTextBoxImpl = _TextBoxImpl::GetInstance(*this); + SysAssertf(pTextBoxImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTextBoxImpl->SetTextSize(size); +} + +result +TextBox::SetTextSize(float size) +{ + _TextBoxImpl* pTextBoxImpl = _TextBoxImpl::GetInstance(*this); + SysAssertf(pTextBoxImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTextBoxImpl->SetTextSize(size); +} + +result +TextBox::GetFontType(String& typefaceName, unsigned long& styleMask) const +{ + const _TextBoxImpl* pTextBoxImpl = _TextBoxImpl::GetInstance(*this); + SysAssertf(pTextBoxImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTextBoxImpl->GetFontType(typefaceName, styleMask); +} + +result +TextBox::SetFontType(const String& typefaceName, unsigned long styleMask) +{ + _TextBoxImpl* pTextBoxImpl = _TextBoxImpl::GetInstance(*this); + SysAssertf(pTextBoxImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTextBoxImpl->SetFontType(typefaceName, styleMask); +} + +unsigned long +TextBox::GetTextStyle(void) const +{ + const _TextBoxImpl* pTextBoxImpl = _TextBoxImpl::GetInstance(*this); + SysAssertf(pTextBoxImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTextBoxImpl->GetTextStyle(); +} + +result +TextBox::SetTextStyle(unsigned long style) +{ + _TextBoxImpl* pTextBoxImpl = _TextBoxImpl::GetInstance(*this); + SysAssertf(pTextBoxImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTextBoxImpl->SetTextStyle(style); +} + +result +TextBox::SetFont(const Font& font) +{ + _TextBoxImpl* pTextBoxImpl = _TextBoxImpl::GetInstance(*this); + SysAssertf(pTextBoxImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTextBoxImpl->SetFont(font); +} + +result +TextBox::ReleaseBlock(void) +{ + _TextBoxImpl* pTextBoxImpl = _TextBoxImpl::GetInstance(*this); + SysAssertf(pTextBoxImpl != null, "Not yet constructed. Construct() should be called before use."); + + + return pTextBoxImpl->ReleaseBlock(); +} + +result +TextBox::GetBlockRange(int& start, int& end) const +{ + const _TextBoxImpl* pTextBoxImpl = _TextBoxImpl::GetInstance(*this); + SysAssertf(pTextBoxImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTextBoxImpl->GetBlockRange(start, end); +} + +result +TextBox::SetBlockRange(int start, int end) +{ + _TextBoxImpl* pTextBoxImpl = _TextBoxImpl::GetInstance(*this); + SysAssertf(pTextBoxImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTextBoxImpl->SetBlockRange(start, end); +} + +void +TextBox::AddTextBlockEventListener(ITextBlockEventListener& listener) +{ + _TextBoxImpl* pTextBoxImpl = _TextBoxImpl::GetInstance(*this); + SysAssertf(pTextBoxImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pTextBoxImpl->AddTextBlockEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +TextBox::RemoveTextBlockEventListener(ITextBlockEventListener& listener) +{ + _TextBoxImpl* pTextBoxImpl = _TextBoxImpl::GetInstance(*this); + SysAssertf(pTextBoxImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pTextBoxImpl->RemoveTextBlockEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +Color +TextBox::GetColor(TextBoxStatus status) const +{ + const _TextBoxImpl* pTextBoxImpl = _TextBoxImpl::GetInstance(*this); + SysAssertf(pTextBoxImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTextBoxImpl->GetColor(status); +} + +Color +TextBox::GetTextColor(TextBoxTextColor type) const +{ + const _TextBoxImpl* pTextBoxImpl = _TextBoxImpl::GetInstance(*this); + SysAssertf(pTextBoxImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTextBoxImpl->GetTextColor(type); +} + +result +TextBox::SetColor(TextBoxStatus status, const Color& color) +{ + _TextBoxImpl* pTextBoxImpl = _TextBoxImpl::GetInstance(*this); + SysAssertf(pTextBoxImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTextBoxImpl->SetColor(status, color); +} + +result +TextBox::SetTextColor(TextBoxTextColor type, const Color& color) +{ + _TextBoxImpl* pTextBoxImpl = _TextBoxImpl::GetInstance(*this); + SysAssertf(pTextBoxImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTextBoxImpl->SetTextColor(type, color); +} + +result +TextBox::SetBackgroundBitmap(TextBoxStatus status, const Bitmap& bitmap) +{ + _TextBoxImpl* pTextBoxImpl = _TextBoxImpl::GetInstance(*this); + SysAssertf(pTextBoxImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pTextBoxImpl->SetBackgroundBitmap(status, bitmap); +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrlTimePicker.cpp b/src/ui/controls/FUiCtrlTimePicker.cpp new file mode 100644 index 0000000..3dd192d --- /dev/null +++ b/src/ui/controls/FUiCtrlTimePicker.cpp @@ -0,0 +1,187 @@ +// +// 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 FUiCtrlTimePicker.cpp + * @brief This is the implementation file for the TimePicker class. + */ + +// Includes +#include +#include +#include +#include "FUiCtrl_TimePickerImpl.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::System; + +namespace Tizen { namespace Ui { namespace Controls +{ + +TimePicker::TimePicker(void) +{ +} + +TimePicker::~TimePicker(void) +{ +} + +result +TimePicker::Construct(const Tizen::Base::String& title) +{ + _TimePickerImpl* pImpl = null; + pImpl = _TimePickerImpl::GetInstance(*this); + SysAssertf((pImpl == null), + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pImpl = _TimePickerImpl::CreateTimePickerImplN(this, title); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, (pImpl != null), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlImpl = pImpl; + + pImpl->GetCore().SetResizable(false); + pImpl->GetCore().SetMovable(false); + + return r; +} + +void +TimePicker::AddTimeChangeEventListener(Tizen::Ui::ITimeChangeEventListener& listener) +{ + _TimePickerImpl* pImpl = _TimePickerImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->AddTimeChangeEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +TimePicker::RemoveTimeChangeEventListener(Tizen::Ui::ITimeChangeEventListener& listener) +{ + _TimePickerImpl* pImpl = _TimePickerImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->RemoveTimeChangeEventListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +int +TimePicker::GetHour(void) const +{ + const _TimePickerImpl* pImpl = _TimePickerImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + int hour = pImpl->GetHour(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, hour, r, "[%s] Propagating.", GetErrorMessage(r)); + + return hour; +} + +int +TimePicker::GetMinute(void) const +{ + const _TimePickerImpl* pImpl = _TimePickerImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + int minute = pImpl->GetMinute(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, minute, r, "[%s] Propagating.", GetErrorMessage(r)); + + return minute; +} + +Tizen::Base::DateTime +TimePicker::GetTime(void) const +{ + result r = E_SUCCESS; + Tizen::Base::DateTime dateTime; + const _TimePickerImpl* pImpl = _TimePickerImpl::GetInstance(*this); + if (pImpl == null) + { + r = SystemTime::GetCurrentTime(TIME_MODE_WALL, dateTime); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, dateTime, r, "[%s] Propagating.", GetErrorMessage(r)); + return dateTime; + } + + dateTime = pImpl->GetTime(); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, dateTime, r, "[%s] Propagating.", GetErrorMessage(r)); + + return dateTime; +} + +void +TimePicker::Set24HourNotationEnabled(bool enable) +{ + _TimePickerImpl* pImpl = _TimePickerImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + pImpl->Set24HourNotationEnabled(enable); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +result +TimePicker::SetHour(int hour) +{ + _TimePickerImpl* pImpl = _TimePickerImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->SetHour(hour); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +TimePicker::SetMinute(int minute) +{ + _TimePickerImpl* pImpl = _TimePickerImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->SetMinute(minute); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +void +TimePicker::SetTime(const Tizen::Base::DateTime& time) +{ + _TimePickerImpl* pImpl = _TimePickerImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + pImpl->SetTime(time); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +TimePicker::SetCurrentTime(void) +{ + _TimePickerImpl* pImpl = _TimePickerImpl::GetInstance(*this); + SysAssertf((pImpl != null), "Not yet constructed. Construct() should be called before use."); + + pImpl->SetCurrentTime(); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_ActionEvent.cpp b/src/ui/controls/FUiCtrl_ActionEvent.cpp new file mode 100644 index 0000000..f255cfd --- /dev/null +++ b/src/ui/controls/FUiCtrl_ActionEvent.cpp @@ -0,0 +1,166 @@ +// +// 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_ActionEvent.cpp +* @brief This is the implementation for the ActionEvent class. +*/ + +#include +#include +#include +#include "FUiCtrl_IActionEventListener.h" +#include "FUiCtrl_ActionEvent.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @class _ActionEventArg + * @brief This class is used as the argument to action event listener. + * + * This class is used as the argument to action event listener. When an action event is generated + * (such as when a button is pressed) the ActionEvent calls ActionEventListener's OnActionPerformed + * with an instance of this class as an argument. + * + * From this class, one can find out, the (event) source object and the action ID. + */ +class _OSP_EXPORT_ _ActionEventArg + : public IEventArg + , public Object +{ +public: + /** + * This is the default class constructor. + * + * @param[in] source A pointer to the Object instance which contains this instance. + * @param[in] actionId Action Id. + */ + _ActionEventArg(int actionId); + + /** + * This is the class destructor. + * + */ + virtual ~_ActionEventArg(void); + +public: + /** + * This method returns the actionId which the event initially occurred. + * + * @return See the comment above. + */ + int GetActionId(void) const; + +private: + /** + * Action Id. + */ + int __actionId; +}; // _ActionEventArg + +_ActionEventArg::_ActionEventArg(int actionId) + : __actionId(actionId) +{ + // nothing +} + +_ActionEventArg::~_ActionEventArg(void) +{ + // nothing +} + +int +_ActionEventArg::GetActionId(void) const +{ + return __actionId; +} + +_ActionEvent::_ActionEvent(const _Control& source) + : __pSource(null) +{ + result r = _Event::Initialize(); + + // set event source + if (r == E_SUCCESS) + { + __pSource = &source; + SetLastResult(E_SUCCESS); + } +} + +_ActionEvent::~_ActionEvent(void) +{ + // nothing +} + +_ActionEvent* +_ActionEvent::CreateInstanceN(const _Control& source) +{ + _ActionEvent* pActionEvent = new (std::nothrow) _ActionEvent(source); + SysTryReturn(NID_UI_CTRL, pActionEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + if (IsFailed(GetLastResult())) + { + goto CATCH; + } + + return pActionEvent; + +CATCH: + delete pActionEvent; + return null; +} + +const _Control* +_ActionEvent::GetSource(void) const +{ + return __pSource; +} + +void +_ActionEvent::FireImpl(IEventListener& listener, const IEventArg& arg) +{ + // cast to _IActionEventListener + _IActionEventListener* pActionListener = dynamic_cast <_IActionEventListener*>(&listener); + SysTryReturnVoidResult(NID_UI_CTRL, pActionListener != null, E_INVALID_ARG, + "[E_INVALID_ARG] The invalid listener was given.\n"); + + // cast to _ActionEventArg + const _ActionEventArg* pArg = dynamic_cast (&arg); + SysTryReturnVoidResult(NID_UI_CTRL, pArg != null, E_INVALID_ARG, "[E_INVALID_ARG] The invalid Event Argument was given.\n"); + + // call cursor change event listener method + pActionListener->OnActionPerformed(*__pSource, pArg->GetActionId()); + + SetLastResult(E_SUCCESS); + + return; +} + +IEventArg* +_ActionEvent::CreateActionEventArgN(int actionId) +{ + _ActionEventArg* pEventArg = new (std::nothrow) _ActionEventArg(actionId); + SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + return pEventArg; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_AdjustmentEvent.cpp b/src/ui/controls/FUiCtrl_AdjustmentEvent.cpp new file mode 100644 index 0000000..6960189 --- /dev/null +++ b/src/ui/controls/FUiCtrl_AdjustmentEvent.cpp @@ -0,0 +1,143 @@ +// +// 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_AdjustmentEvent.cpp + * @brief This is the implementation for the _AdjustmentEvent class. + * + * This file contains the implementation of _AdjustmentEvent class. @n + */ + +#include +#include +#include +#include "FUiCtrl_IAdjustmentEventListener.h" +#include "FUiCtrl_AdjustmentEvent.h" + +using namespace Tizen::Ui; +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _OSP_EXPORT_ _AdjustmentEventArg + : public IEventArg + , public Object +{ +// Lifecycle +public: + _AdjustmentEventArg(int adjustment); + virtual ~_AdjustmentEventArg(void); + +// Access +public: + int GetAdjustment(void) const; + +// Attribute +private: + int __adjustment; + +}; // _AdjustmentEventArg + +_AdjustmentEventArg::_AdjustmentEventArg(int adjustment) + : __adjustment(adjustment) +{ +} + +_AdjustmentEventArg::~_AdjustmentEventArg(void) +{ +} + +int +_AdjustmentEventArg::GetAdjustment(void) const +{ + return __adjustment; +} + + +_AdjustmentEvent::_AdjustmentEvent(const _Control& source) + : __pSource(null) +{ + result r = _Event::Initialize(); + + // set event source + if (r == E_SUCCESS) + { + __pSource = &source; + } +} + +_AdjustmentEvent::~_AdjustmentEvent(void) +{ +} + +_AdjustmentEvent* +_AdjustmentEvent::CreateInstanceN(const _Control& source) +{ + _AdjustmentEvent* pAdjustmentEvent = new (std::nothrow) _AdjustmentEvent(source); + SysTryReturn(NID_UI_CTRL, pAdjustmentEvent != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + if (IsFailed(GetLastResult())) + { + goto CATCH; + } + + return pAdjustmentEvent; + +CATCH: + delete pAdjustmentEvent; + pAdjustmentEvent = null; + + return null; +} + +const _Control* +_AdjustmentEvent::GetSource(void) const +{ + return __pSource; +} + +void +_AdjustmentEvent::FireImpl(IEventListener& listener, const IEventArg& arg) +{ + // cast to _IAdjustmentEventListener + _IAdjustmentEventListener* pAdjustmentListener = dynamic_cast <_IAdjustmentEventListener*>(&listener); + SysTryReturnVoidResult(NID_UI_CTRL, pAdjustmentListener != null, E_INVALID_ARG, + "[E_INVALID_ARG] The invalid listener was given.\n"); + + // cast to _AdjustmentEventArg + const _AdjustmentEventArg* pAdjustmentEventArg = dynamic_cast (&arg); + SysTryReturnVoidResult(NID_UI_CTRL, pAdjustmentEventArg != null, E_INVALID_ARG, + "[E_INVALID_ARG] The invalid Event Argument was given.\n"); + + // call cursor change event listener method + pAdjustmentListener->OnAdjustmentValueChanged(*__pSource, pAdjustmentEventArg->GetAdjustment()); + SetLastResult(E_SUCCESS); + return; +} + +IEventArg* +_AdjustmentEvent::CreateAdjustmentEventArgN(int adjustment) +{ + _AdjustmentEventArg* pEventArg = new (std::nothrow) _AdjustmentEventArg(adjustment); + SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + return pEventArg; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_Animation.cpp b/src/ui/controls/FUiCtrl_Animation.cpp new file mode 100644 index 0000000..df10fd9 --- /dev/null +++ b/src/ui/controls/FUiCtrl_Animation.cpp @@ -0,0 +1,347 @@ +// +// 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_Animation.cpp + * @brief This is the implementation file for the _Animation class. + */ + +#include +#include +#include "FUi_AccessibilityContainer.h" +#include "FUi_AccessibilityElement.h" +#include "FUiAnim_VisualElement.h" +#include "FUiCtrl_Animation.h" +#include "FUiCtrl_AnimationPresenter.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Base::Collection; +using namespace Tizen::Ui::Animations; + +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(); + + if (pBase != null) + { + pBase->SetSurfaceOpaque(false); + } + + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + if (pContainer != null) + { + pContainer->Activate(true); + } +} + +_Animation::~_Animation(void) +{ + delete __pAnimationEvent; + __pAnimationEvent = null; + + if (__pAnimationFrames != null) + { + __pAnimationFrames->RemoveAll(false); + delete __pAnimationFrames; + __pAnimationFrames = null; + } + + delete __pAnimationPresenter; + __pAnimationPresenter = null; + + if (__pAccessibilityElement != null) + { + __pAccessibilityElement->Activate(false); + __pAccessibilityElement = null; + } +} + +_Animation* +_Animation::CreateAnimationN(bool isFramework) +{ + result r = E_SUCCESS; + + _Animation* pAnimation = new (std::nothrow) _Animation(); + SysTryReturn(NID_UI_CTRL, pAnimation != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pAnimation->__pAnimationPresenter = _AnimationPresenter::CreateInstanceN(*pAnimation); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, pAnimation->__pAnimationPresenter, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pAnimation->__pAnimationEvent = _AnimationEvent::CreateInstanceN(*pAnimation); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, pAnimation->__pAnimationEvent, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pAnimation->AcquireHandle(); + pAnimation->SetFocusable(false); + + _Animation::__isInternalAnimation = isFramework; + + SetLastResult(E_SUCCESS); + + return pAnimation; + +CATCH: + delete pAnimation; + pAnimation = null; + + return null; +} + +void +_Animation::OnTimerExpired(Timer& timer) +{ + if (__pAnimationPresenter->IsTimerExpired(timer)) + { + IEventArg* pEventArg = _AnimationEvent::CreateAnimationEventArgN(); + if (pEventArg != null) + { + __pAnimationEvent->Fire(*pEventArg); + } + } + + return; +} + +bool +_Animation::IsAttachedToMainTree(void) +{ + return __isAttachedToMainTree; +} + +result +_Animation::OnAttachedToMainTree(void) +{ + if (__pAccessibilityElement != null) + { + return E_SUCCESS; + } + + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + + if (pContainer != null) + { + __pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true); + if (__pAccessibilityElement != null) + { + __pAccessibilityElement->SetBounds(FloatRectangle(0, 0, GetBounds().width, GetBounds().height)); + __pAccessibilityElement->SetName(L"Animation"); + //__pAccessibilityElement->SetLabel(L"Processing"); + __pAccessibilityElement->SetTrait(L"Animation"); + pContainer->AddElement(*__pAccessibilityElement); + } + } + + __isAttachedToMainTree = true; + return E_SUCCESS; +} + +void +_Animation::OnBoundsChanged(void) +{ + if (likely(!(_AccessibilityManager::IsActivated()))) + { + return; + } + + if (__pAccessibilityElement != null) + { + __pAccessibilityElement->SetBounds(FloatRectangle(0, 0, GetBounds().width, GetBounds().height)); + } + + return; +} + +Canvas* +_Animation::OnCanvasRequestedN(const FloatRectangle& bounds) +{ + return __pAnimationPresenter->OnCanvasRequestedN(bounds); +} + +void +_Animation::SetImageCount(int imageCount) +{ + __pAnimationPresenter->SetImageCount(imageCount); + + return; +} + +result +_Animation::SetAnimationFrames(const IList& animationFrames) +{ + int frameCount = 0; + + ArrayList* pTempList = new (std::nothrow) ArrayList(); + SysTryReturnResult(NID_UI_CTRL, pTempList != null, E_OUT_OF_MEMORY, "Memory allocation failed."); + + result r = pTempList->Construct(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + frameCount = animationFrames.GetCount(); + + for (int index = 0; index < frameCount; index++) + { + AnimationFrame* pInputAnimationFrame = dynamic_cast (const_cast (animationFrames.GetAt(index))); + SysTryCatch(NID_UI_CTRL, pInputAnimationFrame != null, pTempList->RemoveAll(true), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get the AnimationFrame at index %d", index); + + r = pTempList->Add(*pInputAnimationFrame); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, pTempList->RemoveAll(true), r, "[%s] Propagating.", GetErrorMessage(r)); + } + + if (__pAnimationFrames != null) + { + __pAnimationFrames->RemoveAll(true); + delete __pAnimationFrames; + } + __pAnimationFrames = pTempList; + + r = __pAnimationPresenter->SetAnimationFrames(__pAnimationFrames); + if (r != E_SUCCESS) + { + __pAnimationFrames->RemoveAll(true); + __pAnimationFrames = null; + goto CATCH; + } + + return r; + +CATCH: + delete pTempList; + pTempList = null; + + return r; +} + +IList* +_Animation::GetAnimationFrames(void) const +{ + return __pAnimationFrames; +} + +result +_Animation::AddAnimationEventListener(const _IAnimationEventListener& listener) +{ + return __pAnimationEvent->AddListener(listener); +} + +result +_Animation::RemoveAnimationEventListener(const _IAnimationEventListener& listener) +{ + return __pAnimationEvent->RemoveListener(listener); +} + +result +_Animation::SetPropertyRepeatCount(const Variant& repeatCount) +{ + SysTryReturnResult(NID_UI_CTRL, __pAnimationPresenter->GetStatus() == ANIMATION_STOPPED, E_SYSTEM, + "A system error has occurred. Repeat count cannot be set during animation play."); + + SysTryReturnResult(NID_UI_CTRL, repeatCount.ToInt() >= 0, E_INVALID_ARG, "Invalid argument(s) is used. Repeat count must be a positive integer."); + + __pAnimationPresenter->SetRepeatCount(repeatCount.ToInt()); + + return E_SUCCESS; +} + +result +_Animation::SetRepeatCount(int count) +{ + return SetProperty("repeatCount", Variant(count)); +} + +Variant +_Animation::GetPropertyRepeatCount(void) const +{ + return Variant(__pAnimationPresenter->GetRepeatCount()); +} + +int +_Animation::GetRepeatCount(void) const +{ + Variant repeatCount = GetProperty("repeatCount"); + + return repeatCount.ToInt(); +} + +int +_Animation::GetCurrentRepeatedCount(void) const +{ + return __pAnimationPresenter->GetCurrentRepeatedCount(); +} + +int +_Animation::GetImageCount(void) const +{ + return __pAnimationPresenter->GetImageCount(); +} + +result +_Animation::Play(void) +{ + return __pAnimationPresenter->Play(); +} + +result +_Animation::Stop(void) +{ + return __pAnimationPresenter->Stop(); +} + +result +_Animation::Pause(void) +{ + return __pAnimationPresenter->Pause(); +} + +AnimationStatus +_Animation::GetStatus(void) const +{ + return __pAnimationPresenter->GetStatus(); +} + +bool +_Animation::IsInternalAnimation() +{ + return _Animation::__isInternalAnimation; +} + +void +_Animation::OnDraw(void) +{ + result r = __pAnimationPresenter->Draw(); + + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + SetLastResult(E_SUCCESS); + return; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_AnimationEvent.cpp b/src/ui/controls/FUiCtrl_AnimationEvent.cpp new file mode 100644 index 0000000..d162f01 --- /dev/null +++ b/src/ui/controls/FUiCtrl_AnimationEvent.cpp @@ -0,0 +1,115 @@ +// +// 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_AnimationEvent.cpp +* @brief This is the implementation for the AnimationEvent class. +*/ + +#include +#include +#include +#include "FUiCtrl_IAnimationEventListener.h" +#include "FUiCtrl_AnimationEvent.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _OSP_EXPORT_ _AnimationEventArg + : public IEventArg + , public Object +{ +public: + _AnimationEventArg(void); + virtual ~_AnimationEventArg(void); + +}; // _AnimationEventArg + +_AnimationEventArg::_AnimationEventArg(void) +{ +} + +_AnimationEventArg::~_AnimationEventArg(void) +{ +} + + +_AnimationEvent::_AnimationEvent(const _Control& source) + : __pSource(null) +{ + result r = _Event::Initialize(); + + if (r == E_SUCCESS) + { + __pSource = &source; + } +} + +_AnimationEvent::~_AnimationEvent(void) +{ +} + +_AnimationEvent* +_AnimationEvent::CreateInstanceN(const _Control& source) +{ + _AnimationEvent* pAnimationEvent = new (std::nothrow) _AnimationEvent(source); + SysTryReturn(NID_UI_CTRL, pAnimationEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + if (IsFailed(GetLastResult())) + { + delete pAnimationEvent; + pAnimationEvent = null; + + return null; + } + + return pAnimationEvent; +} + +const _Control* +_AnimationEvent::GetSource(void) const +{ + return __pSource; +} + +void +_AnimationEvent::FireImpl(IEventListener& listener, const IEventArg& arg) +{ + _IAnimationEventListener* pAnimationListener = dynamic_cast <_IAnimationEventListener*>(&listener); + SysTryReturnVoidResult(NID_UI_CTRL, pAnimationListener != null, E_INVALID_ARG, + "[E_INVALID_ARG] Invalid argument(s) is used. The _IAnimationEventListener instance is null."); + + pAnimationListener->OnAnimationStopped(*__pSource); + + SetLastResult(E_SUCCESS); + return; +} + +IEventArg* +_AnimationEvent::CreateAnimationEventArgN(void) +{ + _AnimationEventArg* pEventArg = new (std::nothrow) _AnimationEventArg(); + SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + SetLastResult(E_SUCCESS); + return pEventArg; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_AnimationFrameImpl.cpp b/src/ui/controls/FUiCtrl_AnimationFrameImpl.cpp new file mode 100644 index 0000000..e19486d --- /dev/null +++ b/src/ui/controls/FUiCtrl_AnimationFrameImpl.cpp @@ -0,0 +1,101 @@ +// +// 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_AnimationFrameImpl.cpp + * @brief This is the implementation file for the _AnimationFrameImpl class. + */ + +#include +#include +#include +#include "FUiCtrl_AnimationFrameImpl.h" + +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_AnimationFrameImpl::_AnimationFrameImpl(void) + : __pFrame(null) + , __duration(0) +{ +} + +_AnimationFrameImpl::_AnimationFrameImpl(const Bitmap& frame, long duration) + : __pFrame(null) + , __duration(0) +{ + result r = E_SUCCESS; + + r = SetFrame(frame); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + r = SetDuration(duration); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return; + +CATCH: + delete __pFrame; + __pFrame = null; + + return; +} + +_AnimationFrameImpl::~_AnimationFrameImpl(void) +{ + delete __pFrame; + __pFrame = null; +} + +result +_AnimationFrameImpl::SetFrame(const Bitmap& frame) +{ + Bitmap* pNewFrame = _BitmapImpl::CloneN(frame); + result r = GetLastResult(); + + SysTryReturn(NID_UI_CTRL, pNewFrame != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + delete __pFrame; + __pFrame = pNewFrame; + + return r; +} + +const Bitmap* +_AnimationFrameImpl::GetFrame(void) const +{ + return __pFrame; +} + +result +_AnimationFrameImpl::SetDuration(long duration) +{ + SysTryReturnResult(NID_UI_CTRL, duration > 0, E_INVALID_ARG, "Invalid argument(s) is used. Duration must be a positive integer."); + + __duration = duration; + + return E_SUCCESS; +} + +long +_AnimationFrameImpl::GetDuration(void) const +{ + return __duration; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_AnimationImpl.cpp b/src/ui/controls/FUiCtrl_AnimationImpl.cpp new file mode 100644 index 0000000..b6db77c --- /dev/null +++ b/src/ui/controls/FUiCtrl_AnimationImpl.cpp @@ -0,0 +1,242 @@ +// +// 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_AnimationImpl.cpp + * @brief This is the implementation file for the _AnimationImpl class. + */ + +#include +#include +#include "FUiCtrl_AnimationImpl.h" +#include "FUiCtrl_Animation.h" + +using namespace Tizen::Base::Collection; +using namespace Tizen::Base::Runtime; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_AnimationImpl* +_AnimationImpl::GetInstance(Animation& animation) +{ + return static_cast<_AnimationImpl*> (animation._pControlImpl); +} + +const _AnimationImpl* +_AnimationImpl::GetInstance(const Animation& animation) +{ + return static_cast (animation._pControlImpl); +} + +_AnimationImpl::_AnimationImpl(Animation* pPublic, _Animation* pCore) + : _ControlImpl(pPublic, pCore) + , __pPublicAnimationEvent(null) +{ + SetFocusableChangable(false); +} + +_AnimationImpl::~_AnimationImpl(void) +{ + delete __pPublicAnimationEvent; + __pPublicAnimationEvent = null; +} + +_AnimationImpl* +_AnimationImpl::CreateAnimationImplN(Animation* pControl) +{ + ClearLastResult(); + + result r = E_SUCCESS; + + _Animation* pCore = _Animation::CreateAnimationN(); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pCore != null, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + _AnimationImpl* pImpl = new (std::nothrow) _AnimationImpl(pControl, pCore); + + r = CheckConstruction(pCore, pImpl); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + pImpl->__pPublicAnimationEvent = _PublicAnimationEvent::CreateInstanceN(*pControl); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, pImpl->__pPublicAnimationEvent != null, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pCore->AddAnimationEventListener(*pImpl); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return pImpl; + +CATCH: + delete pImpl; + pImpl = null; + + return null; +} + +result +_AnimationImpl::SetAnimationFrames(const IList& animationFrames) +{ + ClearLastResult(); + + return GetCore().SetAnimationFrames(animationFrames); +} + +void +_AnimationImpl::SetImageCount(int imageCount) +{ + GetCore().SetImageCount(imageCount); + + return; +} + +result +_AnimationImpl::AddAnimationEventListener(IAnimationEventListener& listener) +{ + ClearLastResult(); + + SysTryReturnResult(NID_UI_CTRL, __pPublicAnimationEvent, E_SYSTEM, "A system error has occurred. The _PublicAnimationEvent instance is null"); + + result r = __pPublicAnimationEvent->AddListener(listener); + SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_ALREADY_EXIST, E_SYSTEM, "A system error has occurred. The IAnimationEventListener instance already exists in the event listener list."); + + return r; +} + +result +_AnimationImpl::RemoveAnimationEventListener(IAnimationEventListener& listener) +{ + ClearLastResult(); + + SysTryReturnResult(NID_UI_CTRL, __pPublicAnimationEvent, E_SYSTEM, "A system error has occurred. The _PublicAnimationEvent instance is null"); + + result r = __pPublicAnimationEvent->RemoveListener(listener); + SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_NOT_FOUND, E_SYSTEM, "A system error has occurred. The IAnimationEventListener instance does not exist in the event listener list."); + + return r; +} + +result +_AnimationImpl::SetRepeatCount(int count) +{ + ClearLastResult(); + + Variant repeatCount(count); + + return GetCore().SetPropertyRepeatCount(repeatCount); +} + +int +_AnimationImpl::GetRepeatCount(void) const +{ + ClearLastResult(); + + return GetCore().GetPropertyRepeatCount().ToInt(); +} + +int +_AnimationImpl::GetCurrentRepeatedCount(void) const +{ + ClearLastResult(); + + return GetCore().GetCurrentRepeatedCount(); +} + +int +_AnimationImpl::GetImageCount(void) const +{ + ClearLastResult(); + + return GetCore().GetImageCount(); +} + +result +_AnimationImpl::Play(void) +{ + ClearLastResult(); + + return GetCore().Play(); +} + +result +_AnimationImpl::Stop(void) +{ + ClearLastResult(); + + return GetCore().Stop(); +} + +result +_AnimationImpl::Pause(void) +{ + ClearLastResult(); + + return GetCore().Pause(); +} + +AnimationStatus +_AnimationImpl::GetStatus(void) const +{ + return GetCore().GetStatus(); +} + +void +_AnimationImpl::OnAnimationStopped(const _Control& source) +{ + IEventArg* pEventArg = _PublicAnimationEvent::CreateAnimationEventArgN(); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __pPublicAnimationEvent->Fire(*pEventArg); + + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + SetLastResult(E_SUCCESS); + return; +} + +const char* +_AnimationImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Controls::Animation"; +} + +const Animation& +_AnimationImpl::GetPublic(void) const +{ + return static_cast (_ControlImpl::GetPublic()); +} + +Animation& +_AnimationImpl::GetPublic(void) +{ + return static_cast (_ControlImpl::GetPublic()); +} + +const _Animation& +_AnimationImpl::GetCore(void) const +{ + return static_cast (_ControlImpl::GetCore()); +} + +_Animation& +_AnimationImpl::GetCore(void) +{ + return static_cast <_Animation&>(_ControlImpl::GetCore()); +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_AnimationModel.cpp b/src/ui/controls/FUiCtrl_AnimationModel.cpp new file mode 100644 index 0000000..c716dab --- /dev/null +++ b/src/ui/controls/FUiCtrl_AnimationModel.cpp @@ -0,0 +1,97 @@ +// +// 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_AnimationModel.cpp + * @brief This is the implementation file for the _AnimationModel class. + */ + +#include "FUiCtrl_AnimationModel.h" + + +namespace Tizen { namespace Ui { namespace Controls +{ + +_AnimationModel::_AnimationModel(void) + : __animationStatus(ANIMATION_STOPPED) + , __imageCount(0) + , __repeatCount(1) + , __currentRepeatedCount(0) +{ +} + +_AnimationModel::~_AnimationModel(void) +{ +} + +void +_AnimationModel::SetAnimationStatus(AnimationStatus status) +{ + __animationStatus = status; + + return; +} + +AnimationStatus +_AnimationModel::GetAnimationStatus(void) const +{ + return __animationStatus; +} + +void +_AnimationModel::SetImageCount(int imageCount) +{ + __imageCount = imageCount; + + return; +} + +int +_AnimationModel::GetImageCount(void) const +{ + return __imageCount; +} + +void +_AnimationModel::SetRepeatCount(int repeatCount) +{ + __repeatCount = repeatCount; + + return; +} + +int +_AnimationModel::GetRepeatCount(void) const +{ + return __repeatCount; +} + +void +_AnimationModel::SetCurrentRepeatedCount(int currentRepeatCount) +{ + __currentRepeatedCount = currentRepeatCount; + + return; +} + +int +_AnimationModel::GetCurrentRepeatedCount(void) const +{ + return __currentRepeatedCount; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_AnimationPresenter.cpp b/src/ui/controls/FUiCtrl_AnimationPresenter.cpp new file mode 100644 index 0000000..e3db9be --- /dev/null +++ b/src/ui/controls/FUiCtrl_AnimationPresenter.cpp @@ -0,0 +1,460 @@ +// +// 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_AnimationPresenter.cpp + * @brief This is the implementation file for the _AnimationPresenter class. + */ + +#include +#include +#include +#include "FUiCtrl_AnimationPresenter.h" +#include "FUiCtrl_Animation.h" +#include "FUiCtrl_AnimationModel.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Base::Collection; +using namespace Tizen::Base; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_AnimationPresenter::_AnimationPresenter(void) + : __pAnimation(null) + , __pAnimationModel(null) + , __pTimer(null) + , __pCurrentFrame(null) + , __isTimerRunning(false) + , __pVisualElement(null) + , __lazyDecode(false) + , __isPlayCalledBeforeAttach(false) +{ +} + +_AnimationPresenter::~_AnimationPresenter(void) +{ + Dispose(); +} + +_AnimationPresenter* +_AnimationPresenter::CreateInstanceN(const _Animation& animation) +{ + result r = E_SUCCESS; + + _AnimationPresenter* pAnimationPresenter = new (std::nothrow) _AnimationPresenter(); + SysTryReturn(NID_UI_CTRL, pAnimationPresenter != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = pAnimationPresenter->Initialize(animation); + + if (r != E_SUCCESS) + { + SysLogException(NID_UI_CTRL, r, "Failed to initialize the Animation Presenter."); + + delete pAnimationPresenter; + pAnimationPresenter = null; + + return null; + } + + return pAnimationPresenter; +} + +result +_AnimationPresenter::Initialize(const _Animation& animation) +{ + result r = E_SUCCESS; + + __pAnimation = const_cast <_Animation*>(&animation); + SysTryReturnResult(NID_UI_CTRL, __pAnimation != null, E_SYSTEM, "A system error has occurred. Animation control core is null."); + + __pAnimationModel = new (std::nothrow) _AnimationModel(); + SysTryCatch(NID_UI_CTRL, __pAnimationModel != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + __pTimer = new (std::nothrow) Timer(); + SysTryCatch(NID_UI_CTRL, __pTimer != null, , E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to create a new timer."); + + r = __pTimer->Construct(*__pAnimation); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[E_SYSTEM] A system error has occurred. Failed to construct the timer."); + + __pVisualElement = __pAnimation->GetVisualElement(); + SysTryCatch(NID_UI_CTRL, __pVisualElement != null, , E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get the root visual element"); + + return r; + +CATCH: + Dispose(); + return r; +} + +bool +_AnimationPresenter::IsTimerExpired(Timer& timer) +{ + bool isTimerExpired = false; + + __isTimerRunning = false; + SysTryReturn(NID_UI_CTRL, __pAnimationModel->GetAnimationStatus() == ANIMATION_PLAYING, false, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Animation is in ANIMATION_PLAYING state."); + + AnimationFrame* pNextFrame = GetNextFrame(); + SysTryReturn(NID_UI_CTRL, pNextFrame != null, false, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get the next animation frame."); + + if (__pAnimationModel->GetCurrentRepeatedCount() < __pAnimationModel->GetRepeatCount()) + { + if (timer.Start(pNextFrame->GetDuration()) == E_SUCCESS) + { + __isTimerRunning = true; + } + else + { + __pAnimationModel->SetAnimationStatus(ANIMATION_PAUSED); + } + isTimerExpired = false; + } + else + { + __pAnimationModel->SetCurrentRepeatedCount(0); + + __pAnimationModel->SetAnimationStatus(ANIMATION_STOPPED); + isTimerExpired = true; + } + + result r = Draw(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, r, "[%s] Propagating.", GetErrorMessage(r)); + + return isTimerExpired; +} + +void +_AnimationPresenter::SetImageCount(int imageCount) +{ + __pAnimationModel->SetImageCount(imageCount); + + return; +} + +result +_AnimationPresenter::SetAnimationFrames(const IList* pAnimationFrames) +{ + SysTryReturnResult(NID_UI_CTRL, pAnimationFrames != null, E_SYSTEM, "A system error has occurred. AnimationFrame list is null"); + + __pCurrentFrame = pAnimationFrames->GetEnumeratorN(); + SysTryReturnResult(NID_UI_CTRL, __pCurrentFrame != null, E_SYSTEM, "A system error has occurred. Failed to get the AnimationFrame list."); + + return E_SUCCESS; +} + +void +_AnimationPresenter::SetRepeatCount(int count) +{ + __pAnimationModel->SetRepeatCount(count); + + return; +} + +int +_AnimationPresenter::GetRepeatCount(void) const +{ + return __pAnimationModel->GetRepeatCount(); +} + +int +_AnimationPresenter::GetCurrentRepeatedCount(void) const +{ + return __pAnimationModel->GetCurrentRepeatedCount(); +} + +int +_AnimationPresenter::GetImageCount(void) const +{ + return __pAnimationModel->GetImageCount(); +} + +result +_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; + } + + if (__pAnimationModel->GetAnimationStatus() != ANIMATION_PAUSED) + { + __pAnimationModel->SetCurrentRepeatedCount(0); + } + + AnimationFrame* pFrame = dynamic_cast (__pCurrentFrame->GetCurrent()); + + if (pFrame == null) + { + pFrame = GetNextFrame(); + SysTryReturnResult(NID_UI_CTRL, pFrame != null, E_SYSTEM, "A system error has occurred. Failed to get the next AnimationFrame."); + + r = Draw(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + r = __pTimer->Start(pFrame->GetDuration()); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "A system error has occurred. Failed to start the timer"); + + __isTimerRunning = true; + __pAnimationModel->SetAnimationStatus(ANIMATION_PLAYING); + + return r; +} + +result +_AnimationPresenter::Stop(void) +{ + if (__isTimerRunning) + { + if (__pTimer != null) + { + __pTimer->Cancel(); + } + __isTimerRunning = false; + } + + __pAnimationModel->SetCurrentRepeatedCount(0); + __pCurrentFrame->Reset(); + __pAnimationModel->SetAnimationStatus(ANIMATION_STOPPED); + + result r = Draw(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +_AnimationPresenter::Pause(void) +{ + SysTryReturnResult(NID_UI_CTRL, __isTimerRunning == true, E_SYSTEM, "A system error has occurred. Timer is not in running state."); + + if (__pTimer != null) + { + __pTimer->Cancel(); + } + __isTimerRunning = false; + + __pAnimationModel->SetAnimationStatus(ANIMATION_PAUSED); + + return E_SUCCESS; +} + +AnimationStatus +_AnimationPresenter::GetStatus(void) const +{ + return __pAnimationModel->GetAnimationStatus(); +} + +Canvas* +_AnimationPresenter::OnCanvasRequestedN(const FloatRectangle& bounds) +{ + result r = E_SUCCESS; + Canvas* pCanvas = null; + AnimationFrame* pFrame = null; + + if (__lazyDecode) + { + Bitmap* pBitmap = null; + pFrame = GetCurrentFrame(); + SysTryReturn(NID_UI_CTRL, pFrame != null, null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get the current animation frame."); + + pBitmap = const_cast (pFrame->GetFrame()); + SysTryReturn(NID_UI_CTRL, pBitmap != null, null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get the bitmap from animation frame."); + + //Decode the bitmap explicitly + pBitmap->IsNinePatchedBitmap(); + r = Draw(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + pCanvas = __pAnimation->GetCanvasN(); + } + + return pCanvas; +} + +AnimationFrame* +_AnimationPresenter::GetCurrentFrame(void) const +{ + AnimationFrame* pFrame = dynamic_cast (__pCurrentFrame->GetCurrent()); + + if (pFrame != null) + { + return pFrame; + } + + int imageCount = __pAnimationModel->GetImageCount(); + for (int index = 0; index < imageCount; index++) + { + if (__pCurrentFrame->MoveNext() == E_OUT_OF_RANGE) + { + __pCurrentFrame->Reset(); + } + + pFrame = dynamic_cast (__pCurrentFrame->GetCurrent()); + + if (pFrame != null) + { + break; + } + } + + return pFrame; +} + +AnimationFrame* +_AnimationPresenter::GetNextFrame(void) const +{ + AnimationFrame* pNextFrame = null; + + int imageCount = __pAnimationModel->GetImageCount(); + for (int index = 0; index < imageCount; index++) + { + if (__pCurrentFrame->MoveNext() == E_SUCCESS) + { + pNextFrame = dynamic_cast (__pCurrentFrame->GetCurrent()); + + if (pNextFrame != null) + { + break; + } + } + else + { + __pCurrentFrame->Reset(); + int currentRepeatedCount = __pAnimationModel->GetCurrentRepeatedCount(); + __pAnimationModel->SetCurrentRepeatedCount(++currentRepeatedCount); + } + } + + return pNextFrame; +} + +result +_AnimationPresenter::Dispose(void) +{ + __pAnimation = null; + + delete __pCurrentFrame; + __pCurrentFrame = null; + + if (__pTimer != null && __isTimerRunning) + { + __pTimer->Cancel(); + } + + delete __pTimer; + __pTimer = null; + + delete __pAnimationModel; + __pAnimationModel = null; + + __pVisualElement = null; + + return E_SUCCESS; +} + +result +_AnimationPresenter::Draw(void) +{ + result r = E_SUCCESS; + + if (__isPlayCalledBeforeAttach) + { + Play(); + __isPlayCalledBeforeAttach = false; + } + + FloatRectangle bounds = __pAnimation->GetBoundsF(); + Color bgColor = __pAnimation->GetBackgroundColor(); + Canvas* pCanvas = null; + AnimationFrame* pFrame = null; + Bitmap* pBitmap = null; + String imagePath = L""; + + pFrame = GetCurrentFrame(); + SysTryCatch(NID_UI_CTRL, pFrame != null, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get the current animation frame."); + + pBitmap = const_cast (pFrame->GetFrame()); + + if (pBitmap != null) + { + if (!_BitmapImpl::CheckNinePatchedBitmapStrictly(*pBitmap)) + { + imagePath = _BitmapImpl::GetInstance(*pBitmap)->GetFileName(); + } + + if(!imagePath.IsEmpty()) + { + __pVisualElement->SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255, (float)bgColor.GetGreen() / 255, (float)bgColor.GetBlue() / 255, (float)bgColor.GetAlpha() / 255)); + __pVisualElement->SetImageSource(imagePath); + __lazyDecode = true; + } + else + { + __pVisualElement->SetImageSource(L""); + __lazyDecode = false; + pCanvas = __pAnimation->GetCanvasN(); + + SysTryReturnResult(NID_UI_CTRL, pCanvas != null, E_SYSTEM, "A system error has occurred. Failed to get the animation canvas."); + + pCanvas->SetBackgroundColor(Color()); + pCanvas->Clear(); + + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pBitmap)) + { + r = pCanvas->DrawNinePatchedBitmap(FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height), *pBitmap); + } + else + { + 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)); + } + } + +CATCH: + delete pCanvas; + pCanvas = null; + + return r; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_Button.cpp b/src/ui/controls/FUiCtrl_Button.cpp new file mode 100644 index 0000000..1a1daec --- /dev/null +++ b/src/ui/controls/FUiCtrl_Button.cpp @@ -0,0 +1,1677 @@ +// +// 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_Button.cpp + * @brief This is the implementation file for the _Button class. + */ + +#include +#include +#include +#include "FUi_AccessibilityContainer.h" +#include "FUi_AccessibilityElement.h" +#include "FUi_AccessibilityManager.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_ResourceManager.h" +#include "FUi_UiTouchEvent.h" +#include "FUiCtrl_Button.h" +#include "FUiCtrl_ButtonPresenter.h" + + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Graphics; +using namespace Tizen::Graphics::_Text; + +namespace Tizen { namespace Ui { namespace Controls +{ + +IMPLEMENT_PROPERTY(_Button); + +_Button::_Button() + : __pButtonPresenter(null) + , __pActionEvent(null) + , __actionId(0) + , __text(L"") + , __horizontalAlignment(ALIGNMENT_CENTER) + , __verticalAlignment(ALIGNMENT_MIDDLE) + , __buttonStatus(_BUTTON_STATUS_NORMAL) + , __buttonStyle(_BUTTON_STYLE_NORMAL) + , __textSize(0.0f) + , __multilineFontSize(0.0f) + , __textMaxLine(2) + , __isSettingMultilineFontSize(false) + , __previousTouchArea(false) + , __userDefinedText(false) + , __tabTextSlide(false) + , __leftMargin(0.0f) + , __topMargin(0.0f) + , __rightMargin(0.0f) + , __bottomMargin(0.0f) + , __userDefinedTextArea(0.0f, 0.0f, 0.0f, 0.0f) + , __pTextElement(null) +{ + result r = E_SUCCESS; + + _AccessibilityContainer* pContainer = null; + + GET_SHAPE_CONFIG(BUTTON::DEFAULT_FONT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, __textSize); + GET_SHAPE_CONFIG(BUTTON::MULTILINE_FONT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, __multilineFontSize); + + _ButtonPresenter* pPresenter = new (std::nothrow) _ButtonPresenter(); + SysTryReturnVoidResult(NID_UI_CTRL, pPresenter, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + + r = SetPresenter(*pPresenter); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + r = pPresenter->Construct(*this); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + r = pPresenter->Install(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + for (int i = 0; i < NUMBER_OF_BUTTON_STATUS; i++) + { + __pBitmap[i] = null; + __pEffectBitmap[i] = null; + __pToolbarItemBackgroundBitmap[i] = null; + __pBackgroundBitmap[i] = null; + __pBackgroundEffectBitmap[i] = null; + __isUserBackgroundBitmap[i] = false; + __isUserBackgroundEffectBitmap[i] = false; + } + + __pUnderlineBitmap = null; + __pTabTextDimLeftBitmap = null; + __pTabTextDimRightBitmap = null; + __pSubTitleEffectBitmap = null; + + GET_COLOR_CONFIG(BUTTON::BG_NORMAL, __color[_BUTTON_STATUS_NORMAL]); + GET_COLOR_CONFIG(BUTTON::BG_DISABLED, __color[_BUTTON_STATUS_DISABLED]); + GET_COLOR_CONFIG(BUTTON::BG_PRESSED, __color[_BUTTON_STATUS_PRESSED]); + GET_COLOR_CONFIG(BUTTON::BG_HIGHLIGHTED, __color[_BUTTON_STATUS_HIGHLIGHTED]); + GET_COLOR_CONFIG(BUTTON::BG_PRESSED, __color[_BUTTON_STATUS_SELECTED]); + + GET_COLOR_CONFIG(BUTTON::TEXT_NORMAL, __textColor[_BUTTON_STATUS_NORMAL]); + GET_COLOR_CONFIG(BUTTON::TEXT_DISABLED, __textColor[_BUTTON_STATUS_DISABLED]); + GET_COLOR_CONFIG(BUTTON::TEXT_PRESSED, __textColor[_BUTTON_STATUS_PRESSED]); + GET_COLOR_CONFIG(BUTTON::TEXT_HIGHLIGHTED, __textColor[_BUTTON_STATUS_HIGHLIGHTED]); + GET_COLOR_CONFIG(BUTTON::TEXT_PRESSED, __textColor[_BUTTON_STATUS_SELECTED]); + + GET_SHAPE_CONFIG(BUTTON::LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __leftMargin); + GET_SHAPE_CONFIG(BUTTON::TOP_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __topMargin); + GET_SHAPE_CONFIG(BUTTON::RIGHT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __rightMargin); + GET_SHAPE_CONFIG(BUTTON::BOTTOM_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __bottomMargin); + + AddPropertyChangeEventListener(*this); + + pContainer = GetAccessibilityContainer(); + + if(pContainer) + { + pContainer->Activate(true); + InitializeAccessibilityElement(); + } + + ClearLastResult(); + + return; + +CATCH: + delete pPresenter; +} + +_Button* +_Button::CreateButtonN(void) +{ + _Button* pButton = new (std::nothrow) _Button(); + SysTryReturn(NID_UI_CTRL, pButton, 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."); + + pButton->AcquireHandle(); + + pButton->SetTouchPressThreshold(SENSITIVE); + + return pButton; + +CATCH: + delete pButton; + return null; +} + +_Button::~_Button(void) +{ + if (__pButtonPresenter) + { + delete __pButtonPresenter; + __pButtonPresenter = null; + } + + if (__pActionEvent) + { + delete __pActionEvent; + __pActionEvent = null; + } + + for (int i = 0; i < NUMBER_OF_BUTTON_STATUS; i++) + { + if (__pBitmap[i]) + { + delete __pBitmap[i]; + __pBitmap[i] = null; + } + + if (__pEffectBitmap[i]) + { + delete __pEffectBitmap[i]; + __pEffectBitmap[i] = null; + } + + if (__pToolbarItemBackgroundBitmap[i]) + { + delete __pToolbarItemBackgroundBitmap[i]; + __pToolbarItemBackgroundBitmap[i] = null; + } + + if (__pBackgroundBitmap[i]) + { + delete __pBackgroundBitmap[i]; + __pBackgroundBitmap[i] = null; + } + + if (__pBackgroundEffectBitmap[i]) + { + delete __pBackgroundEffectBitmap[i]; + __pBackgroundEffectBitmap[i] = null; + } + } + + if (__pUnderlineBitmap) + { + delete __pUnderlineBitmap; + __pUnderlineBitmap = null; + } + + if (__pTabTextDimLeftBitmap) + { + delete __pTabTextDimLeftBitmap; + __pTabTextDimLeftBitmap = null; + } + + if (__pTabTextDimRightBitmap) + { + delete __pTabTextDimRightBitmap; + __pTabTextDimRightBitmap = null; + } + + if (__pSubTitleEffectBitmap) + { + delete __pSubTitleEffectBitmap; + __pSubTitleEffectBitmap = null; + } + + if (__pTextElement) + { + __pTextElement->Activate(false); + __pTextElement = null; + } + + ClearLastResult(); +} + +result +_Button::SetPresenter(const _ButtonPresenter& buttonPresenter) +{ + __pButtonPresenter = const_cast<_ButtonPresenter*>(&buttonPresenter); + + return E_SUCCESS; +} + +void +_Button::OnDraw(void) +{ + __pButtonPresenter->Draw(); + + return; +} + +result +_Button::OnAttachedToMainTree(void) +{ + if(__pTextElement) + { + __pTextElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height)); + } + return E_SUCCESS; +} + +void +_Button::InitializeAccessibilityElement(void) +{ + if(__pTextElement) + { + return; + } + + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + + if(pContainer) + { + __pTextElement = new (std::nothrow) _AccessibilityElement(true); + SysTryReturnVoidResult(NID_UI_CTRL, __pTextElement, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + __pTextElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height)); + __pTextElement->SetLabel(GetText()); + __pTextElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_BUTTON_T_TTS"); + __pTextElement->SetName(L"ButtonText"); + + pContainer->AddElement(*__pTextElement); + } + + return; +} + +void +_Button::OnPropertyChanging(_PropertyBase& source, const String& name, const Variant& oldValue, const Variant& newValue) +{ + return; +} + +void +_Button::OnPropertyChanged(_PropertyBase& source, const String& name, const Variant& oldValue, const Variant& newValue) +{ + return; +} + +bool +_Button::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pButtonPresenter->OnTouchPressed(source, touchinfo); +} + +bool +_Button::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pButtonPresenter->OnTouchReleased(source, touchinfo); +} + +bool +_Button::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pButtonPresenter->OnTouchMoved(source, touchinfo); +} + +bool +_Button::OnTouchCanceled(const _Control & source, const _TouchInfo & touchinfo) +{ + return __pButtonPresenter->OnTouchCanceled(source, touchinfo); +} + +void +_Button::OnTouchMoveHandled(const _Control& control) +{ + __pButtonPresenter->OnTouchMoveHandled(control); + + return; +} + +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); +} + +void +_Button::OnBoundsChanged(void) +{ + if(__pTextElement) + { + __pTextElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height)); + } + + return; +} + +void +_Button::OnFontChanged(Font* pFont) +{ + __pButtonPresenter->OnFontChanged(pFont); + + _Control::OnFontChanged(pFont); + + return; +} + +void +_Button::OnFontInfoRequested(unsigned long& style, int& size) +{ + __pButtonPresenter->OnFontInfoRequested(style, size); + + return; +} + +void +_Button::OnFontInfoRequested(unsigned long& style, float& size) +{ + __pButtonPresenter->OnFontInfoRequested(style, size); + + return; +} + +void +_Button::OnAncestorEnableStateChanged(const _Control& control) +{ + __pButtonPresenter->OnAncestorEnableStateChanged(control); + + return; +} + +void +_Button::OnDrawFocus(void) +{ + __pButtonPresenter->OnDrawFocus(); + + return; +} + +void +_Button::OnChildControlFocusMoved(const _Control& control) +{ + __pButtonPresenter->OnChildControlFocusMoved(control); + + return; +} + +bool +_Button::IsChildControlFocusManage(void) const +{ + __pButtonPresenter->IsChildControlFocusManage(); + + return true; +} + +void +_Button::OnFocusableStateChanged(bool focusalbeState) +{ + __pButtonPresenter->OnFocusableStateChanged(focusalbeState); + + return; +} + +void +_Button::OnFocusModeStateChanged(void) +{ + __pButtonPresenter->OnFocusModeStateChanged(); + + return; +} + +bool +_Button::OnFocusGained(const _Control& source) +{ + __pButtonPresenter->OnFocusGained(source); + + return false; +} + +bool +_Button::OnFocusLost(const _Control& source) +{ + __pButtonPresenter->OnFocusLost(source); + + return true; +} + +Canvas* +_Button::OnCanvasRequestedN(const FloatRectangle& bounds) +{ + return __pButtonPresenter->OnCanvasRequestedN(bounds); +} + +result +_Button::SetText(const String& text) +{ + return SetProperty(L"text", Variant(text)); +} + +result +_Button::SetPropertyText(const Variant& text) +{ + __text = text.ToString(); + + if(__pTextElement) + { + __pTextElement->SetLabel(__text); + } + + result r = __pButtonPresenter->InitTextObject(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +String +_Button::GetText(void) const +{ + Variant text = GetProperty(L"text"); + + return text.ToString(); +} + +Variant +_Button::GetPropertyText(void) const +{ + return Variant(__text); +} + +result +_Button::SetColor(_ButtonStatus status, const Color& color) +{ + result r = E_SUCCESS; + + switch (status) + { + case _BUTTON_STATUS_NORMAL: + r = SetProperty(L"normalColor", Variant(color)); + break; + case _BUTTON_STATUS_DISABLED: + r = SetProperty(L"disabledColor", Variant(color)); + break; + case _BUTTON_STATUS_PRESSED: + r = SetProperty(L"pressedColor", Variant(color)); + break; + case _BUTTON_STATUS_HIGHLIGHTED: + r = SetProperty(L"highlightedColor", Variant(color)); + break; + default: + r = SetProperty(L"selectedColor", Variant(color)); + } + + return r; +} + +result +_Button::SetPropertyNormalColor(const Variant& color) +{ + __color[_BUTTON_STATUS_NORMAL] = color.ToColor(); + + return E_SUCCESS; +} + +result +_Button::SetPropertyDisabledColor(const Variant& color) +{ + __color[_BUTTON_STATUS_DISABLED] = color.ToColor(); + + return E_SUCCESS; +} + +result +_Button::SetPropertyPressedColor(const Variant& color) +{ + __color[_BUTTON_STATUS_PRESSED] = color.ToColor(); + + return E_SUCCESS; +} + +result +_Button::SetPropertyHighlightedColor(const Variant& color) +{ + __color[_BUTTON_STATUS_HIGHLIGHTED] = color.ToColor(); + + return E_SUCCESS; +} + +result +_Button::SetPropertySelectedColor(const Variant& color) +{ + __color[_BUTTON_STATUS_SELECTED] = color.ToColor(); + + return E_SUCCESS; +} + +Color +_Button::GetColor(_ButtonStatus status) const +{ + Variant color; + + switch (status) + { + case _BUTTON_STATUS_NORMAL: + color = GetProperty(L"normalColor"); + break; + case _BUTTON_STATUS_DISABLED: + color = GetProperty(L"disabledColor"); + break; + case _BUTTON_STATUS_PRESSED: + color = GetProperty(L"pressedColor"); + break; + case _BUTTON_STATUS_HIGHLIGHTED: + color = GetProperty(L"highlightedColor"); + break; + default: + color = GetProperty(L"selectedColor"); + } + + return color.ToColor(); +} + +Variant +_Button::GetPropertyNormalColor(void) const +{ + return Variant(__color[_BUTTON_STATUS_NORMAL]); +} + +Variant +_Button::GetPropertyDisabledColor(void) const +{ + return Variant(__color[_BUTTON_STATUS_DISABLED]); +} + +Variant +_Button::GetPropertyPressedColor(void) const +{ + return Variant(__color[_BUTTON_STATUS_PRESSED]); +} + +Variant +_Button::GetPropertyHighlightedColor(void) const +{ + return Variant(__color[_BUTTON_STATUS_HIGHLIGHTED]); +} + +Variant +_Button::GetPropertySelectedColor(void) const +{ + return Variant(__color[_BUTTON_STATUS_SELECTED]); +} + +result +_Button::AddActionEventListener(const _IActionEventListener& listener) +{ + if (__pActionEvent == null) + { + __pActionEvent = _ActionEvent::CreateInstanceN(*this); + SysTryReturn(NID_UI_CTRL, __pActionEvent, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + } + + result r = __pActionEvent->AddListener(listener); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +_Button::RemoveActionEventListener(const _IActionEventListener& listener) +{ + result r = E_OBJ_NOT_FOUND; + + if (__pActionEvent) + { + r = __pActionEvent->RemoveListener(listener); + } + + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +_Button::SetActionId(int actionId) +{ + return SetProperty(L"actionId", Variant(actionId)); +} + +result +_Button::SetPropertyActionId(const Variant& actionId) +{ + __actionId = actionId.ToInt(); + + return E_SUCCESS; +} + +int +_Button::GetActionId(void) const +{ + Variant actionId = GetProperty(L"actionId"); + + return actionId.ToInt(); +} + +Variant +_Button::GetPropertyActionId(void) const +{ + return Variant(__actionId); +} + +result +_Button::SetTextHorizontalAlignment(HorizontalAlignment alignment) +{ + __horizontalAlignment = alignment; + + return E_SUCCESS; +} + +HorizontalAlignment +_Button::GetTextHorizontalAlignment(void) const +{ + return __horizontalAlignment; +} + +result +_Button::SetTextVerticalAlignment(VerticalAlignment alignment) +{ + __verticalAlignment = alignment; + + return E_SUCCESS; +} + +VerticalAlignment +_Button::GetTextVerticalAlignment(void) const +{ + return __verticalAlignment; +} + +result +_Button::SetTextColor(_ButtonStatus status, const Color& color) +{ + result r = E_SUCCESS; + + switch (status) + { + case _BUTTON_STATUS_NORMAL: + r = SetProperty(L"normalTextColor", Variant(color)); + break; + case _BUTTON_STATUS_DISABLED: + r = SetProperty(L"disabledTextColor", Variant(color)); + break; + case _BUTTON_STATUS_PRESSED: + r = SetProperty(L"pressedTextColor", Variant(color)); + break; + case _BUTTON_STATUS_HIGHLIGHTED: + r = SetProperty(L"highlightedTextColor", Variant(color)); + break; + default: + r = SetProperty(L"selectedTextColor", Variant(color)); + } + + return r; +} + +result +_Button::SetPropertyNormalTextColor(const Variant& color) +{ + __textColor[_BUTTON_STATUS_NORMAL] = color.ToColor(); + + return E_SUCCESS; +} + +result +_Button::SetPropertyDisabledTextColor(const Variant& color) +{ + __textColor[_BUTTON_STATUS_DISABLED] = color.ToColor(); + + return E_SUCCESS; +} + +result +_Button::SetPropertyPressedTextColor(const Variant& color) +{ + __textColor[_BUTTON_STATUS_PRESSED] = color.ToColor(); + + return E_SUCCESS; +} + +result +_Button::SetPropertyHighlightedTextColor(const Variant& color) +{ + __textColor[_BUTTON_STATUS_HIGHLIGHTED] = color.ToColor(); + + return E_SUCCESS; +} + +result +_Button::SetPropertySelectedTextColor(const Variant& color) +{ + __textColor[_BUTTON_STATUS_SELECTED] = color.ToColor(); + + return E_SUCCESS; +} + +Color +_Button::GetTextColor(_ButtonStatus status) const +{ + Variant color; + + switch (status) + { + case _BUTTON_STATUS_NORMAL: + color = GetProperty(L"normalTextColor"); + break; + case _BUTTON_STATUS_DISABLED: + color = GetProperty(L"disabledTextColor"); + break; + case _BUTTON_STATUS_PRESSED: + color = GetProperty(L"pressedTextColor"); + break; + case _BUTTON_STATUS_HIGHLIGHTED: + color = GetProperty(L"highlightedTextColor"); + break; + default: + color = GetProperty(L"selectedTextColor"); + } + + return color.ToColor(); +} + +Variant +_Button::GetPropertyNormalTextColor(void) const +{ + return Variant(__textColor[_BUTTON_STATUS_NORMAL]); +} + +Variant +_Button::GetPropertyDisabledTextColor(void) const +{ + return Variant(__textColor[_BUTTON_STATUS_DISABLED]); +} + +Variant +_Button::GetPropertyPressedTextColor(void) const +{ + return Variant(__textColor[_BUTTON_STATUS_PRESSED]); +} + +Variant +_Button::GetPropertyHighlightedTextColor(void) const +{ + return Variant(__textColor[_BUTTON_STATUS_HIGHLIGHTED]); +} + +Variant +_Button::GetPropertySelectedTextColor(void) const +{ + return Variant(__textColor[_BUTTON_STATUS_SELECTED]); +} + +result +_Button::SetBitmap(_ButtonStatus status, const Point& position, const Bitmap& bitmap) +{ + FloatPoint floatPosition = _CoordinateSystemUtils::ConvertToFloat(position); + + return SetBitmap(status, floatPosition, bitmap); +} + +result +_Button::SetBitmap(_ButtonStatus status, const FloatPoint& position, const Bitmap& bitmap) +{ + result r = E_SYSTEM; + + Bitmap* pClonedBitmap = _BitmapImpl::CloneN(bitmap); + + if (pClonedBitmap) + { + __bitmapPosition[status] = position; + + if (__pBitmap[status] != null) + { + delete __pBitmap[status]; + } + + __pBitmap[status] = pClonedBitmap; + + r = E_SUCCESS; + } + + return r; +} + +Bitmap* +_Button::GetBitmap(_ButtonStatus status) const +{ + return __pBitmap[status]; +} + +Point +_Button::GetBitmapPosition(_ButtonStatus status) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetBitmapPositionF(status)); +} + +FloatPoint +_Button::GetBitmapPositionF(_ButtonStatus status) const +{ + return FloatPoint(__bitmapPosition[status].x, __bitmapPosition[status].y); +} + +result +_Button::SetEffectBitmap(_ButtonStatus status, const Point& position, const Bitmap& bitmap) +{ + FloatPoint floatPosition = _CoordinateSystemUtils::ConvertToFloat(position); + + return SetEffectBitmap(status, floatPosition, bitmap); +} + +result +_Button::SetEffectBitmap(_ButtonStatus status, const FloatPoint& position, const Bitmap& bitmap) +{ + result r = E_SYSTEM; + + Bitmap* pClonedBitmap = _BitmapImpl::CloneN(bitmap); + + if (pClonedBitmap) + { + __effectBitmapPosition[status] = position; + + if (__pEffectBitmap[status] != null) + { + delete __pEffectBitmap[status]; + } + + __pEffectBitmap[status] = pClonedBitmap; + + r = E_SUCCESS; + } + + return r; +} + +Bitmap* +_Button::GetEffectBitmap(_ButtonStatus status) const +{ + return __pEffectBitmap[status]; +} + +Point +_Button::GetEffectBitmapPosition(_ButtonStatus status) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetEffectBitmapPositionF(status)); +} + +FloatPoint +_Button::GetEffectBitmapPositionF(_ButtonStatus status) const +{ + return FloatPoint(__effectBitmapPosition[status].x, __effectBitmapPosition[status].y); +} + +result +_Button::SetToolbarItemBackgroundBitmap(_ButtonStatus status, const Bitmap& bitmap) +{ + result r = E_SYSTEM; + + Bitmap* pClonedBitmap = _BitmapImpl::CloneN(bitmap); + + if (pClonedBitmap) + { + if (__pToolbarItemBackgroundBitmap[status] != null) + { + delete __pToolbarItemBackgroundBitmap[status]; + } + + __pToolbarItemBackgroundBitmap[status] = pClonedBitmap; + + r = E_SUCCESS; + } + + return r; +} + +Bitmap* +_Button::GetToolbarItemBackgroundBitmap(_ButtonStatus status) const +{ + return __pToolbarItemBackgroundBitmap[status]; +} + +result +_Button::SetUnderlineBitmap(const Bitmap& bitmap) +{ + result r = E_SYSTEM; + + Bitmap* pClonedBitmap = _BitmapImpl::CloneN(bitmap); + + if (pClonedBitmap) + { + if (__pUnderlineBitmap != null) + { + delete __pUnderlineBitmap; + } + + __pUnderlineBitmap = pClonedBitmap; + + r = E_SUCCESS; + } + + return r; +} + +result +_Button::ShowUnderlineBitmap(bool show) +{ + return __pButtonPresenter->ShowUnderlineBitmap(show); +} + +Bitmap* +_Button::GetUnderlineBitmap(void) const +{ + return __pUnderlineBitmap; +} + +result +_Button::SetTabTextDimLeftBitmap(const Bitmap& bitmap) +{ + result r = E_SYSTEM; + + Bitmap* pClonedBitmap = _BitmapImpl::CloneN(bitmap); + + if (pClonedBitmap) + { + if (__pTabTextDimLeftBitmap != null) + { + delete __pTabTextDimLeftBitmap; + } + + __pTabTextDimLeftBitmap = pClonedBitmap; + + r = E_SUCCESS; + } + + return r; +} + +Bitmap* +_Button::GetTabTextDimLeftBitmap(void) const +{ + return __pTabTextDimLeftBitmap; +} + +result +_Button::SetTabTextDimRightBitmap(const Bitmap& bitmap) +{ + result r = E_SYSTEM; + + Bitmap* pClonedBitmap = _BitmapImpl::CloneN(bitmap); + + if (pClonedBitmap) + { + if (__pTabTextDimRightBitmap != null) + { + delete __pTabTextDimRightBitmap; + } + + __pTabTextDimRightBitmap = pClonedBitmap; + + r = E_SUCCESS; + } + + return r; +} + +Bitmap* +_Button::GetTabTextDimRightBitmap(void) const +{ + return __pTabTextDimRightBitmap; +} + +result +_Button::SetSubTitleEffectBitmap(const Bitmap& bitmap) +{ + result r = E_SYSTEM; + + Bitmap* pClonedBitmap = _BitmapImpl::CloneN(bitmap); + + if (pClonedBitmap) + { + if (__pSubTitleEffectBitmap != null) + { + delete __pSubTitleEffectBitmap; + } + + __pSubTitleEffectBitmap = pClonedBitmap; + + r = E_SUCCESS; + } + + return r; +} + +Bitmap* +_Button::GetSubTitleEffectBitmap(void) const +{ + return __pSubTitleEffectBitmap; +} + +result +_Button::SetBackgroundBitmap(_ButtonStatus status, const Bitmap& bitmap) +{ + result r = E_SYSTEM; + + Bitmap* pClonedBitmap = _BitmapImpl::CloneN(bitmap); + + if (pClonedBitmap) + { + if (__pBackgroundBitmap[status] != null) + { + delete __pBackgroundBitmap[status]; + } + + __pBackgroundBitmap[status] = pClonedBitmap; + __isUserBackgroundBitmap[status] = true; + + r = E_SUCCESS; + } + + return r; +} + +Bitmap* +_Button::GetBackgroundBitmap(_ButtonStatus status) const +{ + result r = E_SYSTEM; + + _Button* pButton = const_cast<_Button*>(this); + + if (!pButton->__pBackgroundBitmap[status]) + { + switch(status) + { + case _BUTTON_STATUS_NORMAL: + r = GET_BITMAP_CONFIG_N(BUTTON::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pButton->__pBackgroundBitmap[_BUTTON_STATUS_NORMAL]); + break; + case _BUTTON_STATUS_DISABLED: + r = GET_BITMAP_CONFIG_N(BUTTON::BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pButton->__pBackgroundBitmap[_BUTTON_STATUS_DISABLED]); + break; + case _BUTTON_STATUS_PRESSED: + r = GET_BITMAP_CONFIG_N(BUTTON::BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pButton->__pBackgroundBitmap[_BUTTON_STATUS_PRESSED]); + break; + case _BUTTON_STATUS_HIGHLIGHTED: + r = GET_BITMAP_CONFIG_N(BUTTON::BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pButton->__pBackgroundBitmap[_BUTTON_STATUS_HIGHLIGHTED]); + break; + default: + r = GET_BITMAP_CONFIG_N(BUTTON::BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pButton->__pBackgroundBitmap[_BUTTON_STATUS_SELECTED]); + break; + } + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + return pButton->__pBackgroundBitmap[status]; +} + +result +_Button::SetBackgroundEffectBitmap(_ButtonStatus status, const Bitmap& bitmap) +{ + result r = E_SYSTEM; + + Bitmap* pClonedBitmap = _BitmapImpl::CloneN(bitmap); + + if (pClonedBitmap) + { + if (__pBackgroundEffectBitmap[status] != null) + { + delete __pBackgroundEffectBitmap[status]; + } + + __pBackgroundEffectBitmap[status] = pClonedBitmap; + __isUserBackgroundEffectBitmap[status] = true; + + r= E_SUCCESS; + } + + return r; +} + +Bitmap* +_Button::GetBackgroundEffectBitmap(_ButtonStatus status) const +{ + result r = E_SYSTEM; + bool themeBackgroundBitmap = false; + + _Button* pButton = const_cast<_Button*>(this); + + if (!pButton->__pBackgroundEffectBitmap[status]) + { + switch(status) + { + case _BUTTON_STATUS_NORMAL: + themeBackgroundBitmap = IS_CUSTOM_BITMAP(BUTTON::BG_NORMAL); + if (!themeBackgroundBitmap) + { + r = GET_BITMAP_CONFIG_N(BUTTON::BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pButton->__pBackgroundEffectBitmap[_BUTTON_STATUS_NORMAL]); + } + break; + case _BUTTON_STATUS_DISABLED: + themeBackgroundBitmap = IS_CUSTOM_BITMAP(BUTTON::BG_DISABLED); + if (!themeBackgroundBitmap) + { + r = GET_BITMAP_CONFIG_N(BUTTON::BG_EFFECT_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pButton->__pBackgroundEffectBitmap[_BUTTON_STATUS_DISABLED]); + } + break; + case _BUTTON_STATUS_PRESSED: + themeBackgroundBitmap = IS_CUSTOM_BITMAP(BUTTON::BG_PRESSED); + if (!themeBackgroundBitmap) + { + r = GET_BITMAP_CONFIG_N(BUTTON::BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pButton->__pBackgroundEffectBitmap[_BUTTON_STATUS_PRESSED]); + } + break; + case _BUTTON_STATUS_HIGHLIGHTED: + themeBackgroundBitmap = IS_CUSTOM_BITMAP(BUTTON::BG_HIGHLIGHTED); + if (!themeBackgroundBitmap) + { + r = GET_BITMAP_CONFIG_N(BUTTON::BG_EFFECT_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pButton->__pBackgroundEffectBitmap[_BUTTON_STATUS_HIGHLIGHTED]); + } + break; + default: + themeBackgroundBitmap = IS_CUSTOM_BITMAP(BUTTON::BG_PRESSED); + if (!themeBackgroundBitmap) + { + r = GET_BITMAP_CONFIG_N(BUTTON::BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pButton->__pBackgroundEffectBitmap[_BUTTON_STATUS_SELECTED]); + } + break; + } + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + return pButton->__pBackgroundEffectBitmap[status]; +} + +result +_Button::SetTextSize(int size, unsigned long fontStyle) +{ + float floatSize = _CoordinateSystemUtils::ConvertToFloat(size); + + __pButtonPresenter->SetTextSize(floatSize, fontStyle); + + return SetProperty(L"textSize", Variant(floatSize)); +} + +result +_Button::SetTextSize(float size, unsigned long fontStyle) +{ + __pButtonPresenter->SetTextSize(size, fontStyle); + + return SetProperty(L"textSize", Variant(size)); +} + +result +_Button::SetPropertyTextSize(const Variant& textSize) +{ + result r = E_SUCCESS; + + if (textSize.ToFloat() > 0.0f) + { + __textSize = textSize.ToFloat(); + __multilineFontSize = textSize.ToFloat(); + } + else + { + r = E_INVALID_ARG; + SysLogException(NID_UI_CTRL, r, "[E_INVALID_ARG] Text size is no greater than 0."); + } + + return r; +} + +int +_Button::GetTextSize(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetTextSizeF()); +} + +float +_Button::GetTextSizeF(void) const +{ + Variant size = GetProperty(L"textSize"); + + return size.ToFloat(); +} + +Variant +_Button::GetPropertyTextSize(void) const +{ + return Variant(__textSize); +} + +result +_Button::SetButtonStyle(_ButtonStyle buttonStyle) +{ + __buttonStyle = buttonStyle; + + return E_SUCCESS; +} + +_ButtonStyle +_Button::GetButtonStyle(void) const +{ + return __buttonStyle; +} + +result +_Button::SetButtonStatus(_ButtonStatus buttonStatus, bool fire) +{ + result r = E_SUCCESS; + + __buttonStatus = buttonStatus; + + if (_BUTTON_STATUS_DISABLED == __buttonStatus) + { + SetEnableState(false); + } + else + { + SetEnableState(true); + } + + if ((_BUTTON_STATUS_SELECTED == __buttonStatus || _BUTTON_STATUS_HIGHLIGHTED == __buttonStatus) && fire) + { + r = FireActionEvent(); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + } + + return r; +} + +_ButtonStatus +_Button::GetButtonStatus(void) const +{ + if (IsEnabled()) + { + return __buttonStatus; + } + else + { + return _BUTTON_STATUS_DISABLED; + } +} + +result +_Button::SetTextMaxLine(int textMaxLine) +{ + __textMaxLine = textMaxLine; + + return E_SUCCESS; +} + +int +_Button::GetTextMaxLine(void) const +{ + return __textMaxLine; +} + +result +_Button::UnloadBackgroundBitmap(_ButtonStatus status) +{ + if (__pBackgroundBitmap[status] != null) + { + delete __pBackgroundBitmap[status]; + __pBackgroundBitmap[status] = null; + } + return E_SUCCESS; +} + +result +_Button::UnloadBackgroundEffectBitmap(_ButtonStatus status) +{ + if (__pBackgroundEffectBitmap[status] != null) + { + delete __pBackgroundEffectBitmap[status]; + __pBackgroundEffectBitmap[status] = null; + } + return E_SUCCESS; +} + +bool +_Button::IsUserBackgroundBitmap(_ButtonStatus status) const +{ + return __isUserBackgroundBitmap[status]; +} + +bool +_Button::IsUserBackgroundEffectBitmap(_ButtonStatus status) const +{ + return __isUserBackgroundEffectBitmap[status]; +} + +bool +_Button::IsTouchAreaChanged(bool currentButtonArea) +{ + if (__previousTouchArea != currentButtonArea) + { + __previousTouchArea = currentButtonArea; + + return true; + } + else + { + return false; + } +} + +result +_Button::FireActionEvent(void) +{ + result r = E_SUCCESS; + + if (__pActionEvent) + { + IEventArg* pEventArg = _ActionEvent::CreateActionEventArgN(__actionId); + SysTryReturn(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + + __pActionEvent->Fire(*pEventArg); + } + + return r; +} + +result +_Button::SetUserDefinedTextArea(const Rectangle& bounds) +{ + FloatRectangle floatBounds = _CoordinateSystemUtils::ConvertToFloat(bounds); + + return SetUserDefinedTextArea(floatBounds); +} + +result +_Button::SetUserDefinedTextArea(const FloatRectangle& bounds) +{ + __userDefinedText = true; + + __userDefinedTextArea = bounds; + + return E_SUCCESS; +} + +Rectangle +_Button::GetUserDefinedTextArea(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetUserDefinedTextAreaF()); +} + +FloatRectangle +_Button::GetUserDefinedTextAreaF(void) const +{ + return __userDefinedTextArea; +} + +bool +_Button::UserDefinedText(void) const +{ + return __userDefinedText; +} + +result +_Button::SetTabTextSlide(bool tabTextSlide) +{ + __tabTextSlide = tabTextSlide; + + return E_SUCCESS; +} + +bool +_Button::IsTabTextSlide(void) const +{ + return __tabTextSlide; +} + +result +_Button::SetMargin(int leftMargin, int topMargin, int rightMargin, int bottomMargin) +{ + float floatLeftMargin = _CoordinateSystemUtils::ConvertToFloat(leftMargin); + float floatTopMargin = _CoordinateSystemUtils::ConvertToFloat(topMargin); + float floatRightMargin = _CoordinateSystemUtils::ConvertToFloat(rightMargin); + float floatBottomMargin = _CoordinateSystemUtils::ConvertToFloat(bottomMargin); + + return SetMargin(floatLeftMargin, floatTopMargin, floatRightMargin, floatBottomMargin); +} + +result +_Button::SetMargin(float leftMargin, float topMargin, float rightMargin, float bottomMargin) +{ + __leftMargin = leftMargin; + __topMargin = topMargin; + __rightMargin = rightMargin; + __bottomMargin = bottomMargin; + + return E_SUCCESS; +} + +int +_Button::GetLeftMargin(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetLeftMarginF()); +} + +float +_Button::GetLeftMarginF(void) const +{ + return __leftMargin; +} + +int +_Button::GetTopMargin(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetTopMarginF()); +} + +float +_Button::GetTopMarginF(void) const +{ + return __topMargin; +} +int +_Button::GetRightMargin(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetRightMarginF()); +} + +float +_Button::GetRightMarginF(void) const +{ + return __rightMargin; +} + +int +_Button::GetBottomMargin(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetBottomMarginF()); +} + +float +_Button::GetBottomMarginF(void) const +{ + return __bottomMargin; +} + +FloatDimension +_Button::GetContentSizeF(bool horizontalMode, bool verticalMode) const +{ + return GetContentSizeInternalF(horizontalMode, verticalMode); +} + +FloatDimension +_Button::GetContentSizeInternalF(bool horizontalMode, bool verticalMode) const +{ + for (int i = 0; i < NUMBER_OF_BUTTON_STATUS; i++) + { + if (__text.IsEmpty() && __pBitmap[i] == null && __isUserBackgroundBitmap[i] == false) + { + return FloatDimension(GetBoundsF().width, GetBoundsF().height); + } + } + + FloatDimension textSize(0.0f, 0.0f); + FloatDimension dimension(0.0f, 0.0f); + FloatRectangle contentRect(0.0f, 0.0f, 0.0f, 0.0f); + + TextObject* pTextObject = __pButtonPresenter->GetTextObject(); + Font* pFont = __pButtonPresenter->GetFont(); + + FloatRectangle previousRect = pTextObject->GetBoundsF(); + TextObjectActionType previousActionType = pTextObject->GetAction(); + + dimension.width = GetBoundsF().width - (__leftMargin + __rightMargin); + dimension.height = GetBoundsF().height - (__topMargin + __bottomMargin); + + _ControlOrientation orientation = GetOrientation(); + if (orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + contentRect.width = _ControlManager::GetInstance()->GetScreenSizeF().width; + contentRect.height = _ControlManager::GetInstance()->GetScreenSizeF().height; + } + else + { + contentRect.width = _ControlManager::GetInstance()->GetScreenSizeF().height; + contentRect.height = _ControlManager::GetInstance()->GetScreenSizeF().width; + } + + if (horizontalMode == true) + { + 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(); + + 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; + } + + if (verticalMode == true) + { + FloatRectangle bounds(0.0f, 0.0f, dimension.width, dimension.height); + pTextObject->SetBounds(bounds); + pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_NONE); + pTextObject->SetFont(pFont, 0, pTextObject->GetTextLength()); + pTextObject->Compose(); + + textSize = pTextObject->GetTextExtentF(); + + dimension.height = textSize.height; + } + + pTextObject->SetBounds(previousRect); + pTextObject->SetAction(previousActionType); + + dimension.width += (__leftMargin + __rightMargin); + dimension.height += (__topMargin + __bottomMargin); + + for (int i = 0; i < NUMBER_OF_BUTTON_STATUS; i++) + { + if (__pBitmap[i] != null || __isUserBackgroundBitmap[i] == true) + { + dimension.width = GetBoundsF().width; + dimension.height = GetBoundsF().height; + } + } + + return dimension; +} + +int +_Button::GetTextExtentSize(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetTextExtentSizeF()); +} + +float +_Button::GetTextExtentSizeF(void) const +{ + float textExtentSize = 0.0f; + + TextObject* pTextObject = __pButtonPresenter->GetTextObject(); + Font* pFont = __pButtonPresenter->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; +} + +result +_Button::SetMultilineTextSize(const Variant& textSize) +{ + result r = E_SUCCESS; + + if (textSize.ToFloat() > 0.0f) + { + __multilineFontSize = textSize.ToFloat(); + __isSettingMultilineFontSize = true; + } + else + { + r = E_INVALID_ARG; + SysLogException(NID_UI_CTRL, r, "[E_INVALID_ARG] Text size is no greater than 0."); + } + + return r; +} + +float +_Button::GetMultilineTextSizeF(void) const +{ + return __multilineFontSize; +} + +bool +_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_ButtonImpl.cpp b/src/ui/controls/FUiCtrl_ButtonImpl.cpp new file mode 100644 index 0000000..2c85ab9 --- /dev/null +++ b/src/ui/controls/FUiCtrl_ButtonImpl.cpp @@ -0,0 +1,949 @@ +// +// 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_ButtonImpl.cpp + * @brief This is the implementation file for the _ButtonImpl class. + */ + +#include +#include +#include +#include +#include +#include +#include +#include "FUi_ResourceSizeInfo.h" +#include "FUi_ResourceManager.h" +#include "FUi_UiBuilder.h" +#include "FUiCtrl_ButtonImpl.h" +#include "FUiCtrl_Button.h" +#include "FUi_CoordinateSystemUtils.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +Dimension +_ButtonImpl::ButtonSizeInfo::GetDefaultMinimumSize(_ControlOrientation orientation) const +{ + result r = E_SUCCESS; + Dimension dimension(0, 0); + + r = GET_DIMENSION_CONFIG(BUTTON::MIN_SIZE, orientation, dimension); + SysTryReturn(NID_UI, r == E_SUCCESS, dimension, r, "[%s] A system error occurred.", GetErrorMessage(r)); + + SetLastResult(r); + + return dimension; +} + +FloatDimension +_ButtonImpl::ButtonSizeInfo::GetDefaultMinimumSizeF(_ControlOrientation orientation) const +{ + result r = E_SUCCESS; + FloatDimension dimension(0.0f, 0.0f); + + r = GET_DIMENSION_CONFIG(BUTTON::MIN_SIZE, orientation, dimension); + SysTryReturn(NID_UI, r == E_SUCCESS, dimension, r, "[%s] A system error occurred.", GetErrorMessage(r)); + + SetLastResult(r); + + return dimension; +} + +_ButtonImpl* +_ButtonImpl::GetInstance(Button& button) +{ + return static_cast<_ButtonImpl*> (button._pControlImpl); +} + +const _ButtonImpl* +_ButtonImpl::GetInstance(const Button& button) +{ + return static_cast (button._pControlImpl); +} + +_ButtonImpl::_ButtonImpl(Button* pPublic, _Button* pCore) + : _ControlImpl(pPublic, pCore) + , __pPublicActionEvent(null) +{ + ClearLastResult(); +} + +_ButtonImpl::~_ButtonImpl(void) +{ + _ButtonImpl::GetCore().RemoveActionEventListener(*this); + + if (__pPublicActionEvent) + { + delete __pPublicActionEvent; + __pPublicActionEvent = null; + } + + ClearLastResult(); +} + +_ButtonImpl* +_ButtonImpl::CreateButtonImplN(Button* pControl, const Rectangle& bounds) +{ + result r = E_SUCCESS; + r = GET_SIZE_INFO(Button).CheckInitialSizeValid(Dimension(bounds.width, bounds.height), _CONTROL_ORIENTATION_PORTRAIT); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, E_INVALID_ARG, "[E_INVALID_ARG] The given size is not valid."); + + _Button* pCore = _Button::CreateButtonN(); + SysTryReturn(NID_UI_CTRL, pCore, null, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _ButtonImpl* pImpl = new (std::nothrow) _ButtonImpl(pControl, pCore); + r = _ControlImpl::CheckConstruction(pCore, pImpl); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pImpl->InitializeBoundsProperties(GET_SIZE_INFO(Button), bounds, pCore->GetOrientation()); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pCore->AddActionEventListener(*pImpl); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + ClearLastResult(); + + return pImpl; + +CATCH: + delete pImpl; + return null; +} + +_ButtonImpl* +_ButtonImpl::CreateButtonImplN(Button* pControl, const FloatRectangle& bounds) +{ + result r = E_SUCCESS; + r = GET_SIZE_INFO(Button).CheckInitialSizeValidF(FloatDimension(bounds.width, bounds.height), _CONTROL_ORIENTATION_PORTRAIT); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, E_INVALID_ARG, "[E_INVALID_ARG] The given size is not valid."); + + _Button* pCore = _Button::CreateButtonN(); + SysTryReturn(NID_UI_CTRL, pCore, null, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _ButtonImpl* pImpl = new (std::nothrow) _ButtonImpl(pControl, pCore); + r = _ControlImpl::CheckConstruction(pCore, pImpl); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pImpl->InitializeBoundsPropertiesF(GET_SIZE_INFO(Button), bounds, pCore->GetOrientation()); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pCore->AddActionEventListener(*pImpl); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + ClearLastResult(); + + return pImpl; + +CATCH: + delete pImpl; + return null; +} + +const Color +_ButtonImpl::GetColorOnError(void) +{ + return Color(0xFFFFFFFF); +} + +const char* +_ButtonImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Controls::Button"; +} + +const Button& +_ButtonImpl::GetPublic(void) const +{ + return static_cast (_ControlImpl::GetPublic()); +} + +Button& +_ButtonImpl::GetPublic(void) +{ + return static_cast (_ControlImpl::GetPublic()); +} + +const _Button& +_ButtonImpl::GetCore(void) const +{ + return static_cast (_ControlImpl::GetCore()); +} + +_Button& +_ButtonImpl::GetCore(void) +{ + return static_cast <_Button&>(_ControlImpl::GetCore()); +} + +result +_ButtonImpl::SetText(const String& text) +{ + int textLength = text.GetLength(); + int buttonTextMaxLength = 0; + GET_FIXED_VALUE_CONFIG(BUTTON::TEXT_MAX_LENGTH, _CONTROL_ORIENTATION_PORTRAIT, buttonTextMaxLength); + String tempText = String(text); + + if (textLength >= buttonTextMaxLength) + { + tempText.Remove(buttonTextMaxLength - 1, textLength - buttonTextMaxLength + 1); + } + + Variant var(tempText); + result r = GetCore().SetPropertyText(var); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +String +_ButtonImpl::GetText(void) const +{ + ClearLastResult(); + + return GetCore().GetPropertyText().ToString(); +} + +result +_ButtonImpl::SetColor(ButtonStatus status, const Color& color) +{ + _ButtonStatus coreStatus = ConvertStatus(status); + result r = GetCore().SetColor(coreStatus, color); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +Color +_ButtonImpl::GetColor(ButtonStatus status) const +{ + ClearLastResult(); + _ButtonStatus coreStatus = ConvertStatus(status); + + return GetCore().GetColor(coreStatus); +} + +result +_ButtonImpl::AddActionEventListener(IActionEventListener& listener) +{ + if (__pPublicActionEvent == null) + { + __pPublicActionEvent = _PublicActionEvent::CreateInstanceN(GetPublic()); + SysTryReturn(NID_UI_CTRL, __pPublicActionEvent, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + } + + result r = __pPublicActionEvent->AddListener(listener); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + return E_SUCCESS; +} + +result +_ButtonImpl::RemoveActionEventListener(IActionEventListener& listener) +{ + result r = E_OBJ_NOT_FOUND; + + if (__pPublicActionEvent) + { + r = __pPublicActionEvent->RemoveListener(listener); + } + + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + return E_SUCCESS; +} + +result +_ButtonImpl::SetActionId(int actionId) +{ + result r = GetCore().SetActionId(actionId); + + SetLastResultReturn(r); +} + +int +_ButtonImpl::GetActionId(void) const +{ + ClearLastResult(); + + return GetCore().GetActionId(); +} + +result +_ButtonImpl::SetTextHorizontalAlignment(HorizontalAlignment alignment) +{ + result r = GetCore().SetTextHorizontalAlignment(alignment); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +HorizontalAlignment +_ButtonImpl::GetTextHorizontalAlignment(void) const +{ + ClearLastResult(); + + return GetCore().GetTextHorizontalAlignment(); +} + +result +_ButtonImpl::SetTextVerticalAlignment(VerticalAlignment alignment) +{ + result r = GetCore().SetTextVerticalAlignment(alignment); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +VerticalAlignment +_ButtonImpl::GetTextVerticalAlignment(void) const +{ + ClearLastResult(); + + return GetCore().GetTextVerticalAlignment(); +} + +result +_ButtonImpl::SetTextColor(const Color& color) +{ + result r = GetCore().SetTextColor(_BUTTON_STATUS_NORMAL, color); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +Color +_ButtonImpl::GetTextColor(void) const +{ + ClearLastResult(); + + return GetCore().GetTextColor(_BUTTON_STATUS_NORMAL); +} + +result +_ButtonImpl::SetDisabledTextColor(const Color& color) +{ + result r = GetCore().SetTextColor(_BUTTON_STATUS_DISABLED, color); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +Color +_ButtonImpl::GetDisabledTextColor(void) const +{ + ClearLastResult(); + + return GetCore().GetTextColor(_BUTTON_STATUS_DISABLED); +} + +result +_ButtonImpl::SetPressedTextColor(const Color& color) +{ + result r = GetCore().SetTextColor(_BUTTON_STATUS_PRESSED, color); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +Color +_ButtonImpl::GetPressedTextColor(void) const +{ + ClearLastResult(); + + return GetCore().GetTextColor(_BUTTON_STATUS_PRESSED); +} + +result +_ButtonImpl::SetHighlightedTextColor(const Color& color) +{ + result r = GetCore().SetTextColor(_BUTTON_STATUS_HIGHLIGHTED, color); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +Color +_ButtonImpl::GetHighlightedTextColor(void) const +{ + ClearLastResult(); + + return GetCore().GetTextColor(_BUTTON_STATUS_HIGHLIGHTED); +} + +result +_ButtonImpl::SetNormalBitmap(const Point& position, const Bitmap& bitmap) +{ + result r = GetCore().SetBitmap(_BUTTON_STATUS_NORMAL, position, bitmap); + SetLastResultReturn(r); +} + +result +_ButtonImpl::SetNormalBitmap(const FloatPoint& position, const Bitmap& bitmap) +{ + result r = GetCore().SetBitmap(_BUTTON_STATUS_NORMAL, position, bitmap); + SetLastResultReturn(r); +} + +result +_ButtonImpl::SetDisabledBitmap(const Point& position, const Bitmap& bitmap) +{ + result r = GetCore().SetBitmap(_BUTTON_STATUS_DISABLED, position, bitmap); + SetLastResultReturn(r); +} + +result +_ButtonImpl::SetDisabledBitmap(const FloatPoint& position, const Bitmap& bitmap) +{ + result r = GetCore().SetBitmap(_BUTTON_STATUS_DISABLED, position, bitmap); + SetLastResultReturn(r); +} + +result +_ButtonImpl::SetPressedBitmap(const Point& position, const Bitmap& bitmap) +{ + result r = GetCore().SetBitmap(_BUTTON_STATUS_PRESSED, position, bitmap); + SetLastResultReturn(r); +} + +result +_ButtonImpl::SetPressedBitmap(const FloatPoint& position, const Bitmap& bitmap) +{ + result r = GetCore().SetBitmap(_BUTTON_STATUS_PRESSED, position, bitmap); + SetLastResultReturn(r); +} + +result +_ButtonImpl::SetHighlightedBitmap(const Point& position, const Bitmap& bitmap) +{ + result r = GetCore().SetBitmap(_BUTTON_STATUS_HIGHLIGHTED, position, bitmap); + SetLastResultReturn(r); +} + +result +_ButtonImpl::SetHighlightedBitmap(const FloatPoint& position, const Bitmap& bitmap) +{ + result r = GetCore().SetBitmap(_BUTTON_STATUS_HIGHLIGHTED, position, bitmap); + SetLastResultReturn(r); +} + +result +_ButtonImpl::SetNormalBackgroundBitmap(const Bitmap& bitmap) +{ + result r = GetCore().SetBackgroundBitmap(_BUTTON_STATUS_NORMAL, bitmap); + SetLastResultReturn(r); +} + +result +_ButtonImpl::SetDisabledBackgroundBitmap(const Bitmap& bitmap) +{ + result r = GetCore().SetBackgroundBitmap(_BUTTON_STATUS_DISABLED, bitmap); + SetLastResultReturn(r); +} + +result +_ButtonImpl::SetPressedBackgroundBitmap(const Bitmap& bitmap) +{ + result r = GetCore().SetBackgroundBitmap(_BUTTON_STATUS_PRESSED, bitmap); + SetLastResultReturn(r); +} + +result +_ButtonImpl::SetHighlightedBackgroundBitmap(const Bitmap& bitmap) +{ + result r = GetCore().SetBackgroundBitmap(_BUTTON_STATUS_HIGHLIGHTED, bitmap); + SetLastResultReturn(r); +} + +result +_ButtonImpl::SetTextSize(int size) +{ + result r = GetCore().SetTextSize(size); + SetLastResultReturn(r); +} + +result +_ButtonImpl::SetTextSize(float size) +{ + result r = GetCore().SetTextSize(size); + SetLastResultReturn(r); +} + +int +_ButtonImpl::GetTextSize(void) const +{ + ClearLastResult(); + + return GetCore().GetTextSize(); +} + +float +_ButtonImpl::GetTextSizeF(void) const +{ + ClearLastResult(); + + return GetCore().GetTextSizeF(); +} + +void +_ButtonImpl::OnActionPerformed(const _Control& source, int actionId) +{ + if (__pPublicActionEvent != null) + { + __pPublicActionEvent->Fire(*_PublicActionEvent::CreateActionEventArgN(actionId)); + } + + return; +} + +result +_ButtonImpl::OnAttachedToMainTree(void) +{ + //SetFocusable(true); // for TDIS-6998 + + _ControlImpl::OnAttachedToMainTree(); + + return E_SUCCESS; +} + +bool +_ButtonImpl::OnTouchPressed(const _ControlImpl& source, const _TouchInfo& touchinfo) +{ + if ((_AppInfo::GetApiVersion() == _API_VERSION_2_0 && _AppInfo::IsOspCompat()) && (!source.IsEnabled() || !source.GetEnableState())) + { + return true; + } + + return false; +} + +bool +_ButtonImpl::OnTouchReleased(const _ControlImpl& source, const _TouchInfo& touchinfo) +{ + if ((_AppInfo::GetApiVersion() == _API_VERSION_2_0 && _AppInfo::IsOspCompat()) && (!source.IsEnabled() || !source.GetEnableState())) + { + return true; + } + + return false; +} + +bool +_ButtonImpl::OnTouchMoved(const _ControlImpl& source, const _TouchInfo& touchinfo) +{ + if ((_AppInfo::GetApiVersion() == _API_VERSION_2_0 && _AppInfo::IsOspCompat()) && (!source.IsEnabled() || !source.GetEnableState())) + { + return true; + } + + return false; +} + +bool +_ButtonImpl::OnTouchCanceled(const _ControlImpl& source, const _TouchInfo& touchinfo) +{ + if ((_AppInfo::GetApiVersion() == _API_VERSION_2_0 && _AppInfo::IsOspCompat()) && (!source.IsEnabled() || !source.GetEnableState())) + { + return true; + } + + return false; +} + +Tizen::Graphics::FloatDimension +_ButtonImpl::GetContentSizeF(bool horizontalMode, bool verticalMode) const +{ + return GetCore().GetContentSizeF(horizontalMode, verticalMode); +} + +_ButtonStatus +_ButtonImpl::ConvertStatus(ButtonStatus status) const +{ + _ButtonStatus coreStatus = _BUTTON_STATUS_HIGHLIGHTED; + switch (status) + { + case BUTTON_STATUS_NORMAL: + coreStatus = _BUTTON_STATUS_NORMAL; + break; + case BUTTON_STATUS_DISABLED: + coreStatus = _BUTTON_STATUS_DISABLED; + break; + case BUTTON_STATUS_PRESSED: + coreStatus = _BUTTON_STATUS_PRESSED; + break; + default: + coreStatus = _BUTTON_STATUS_HIGHLIGHTED; + } + + return coreStatus; +} + +class _ButtonMaker + : public _UiBuilderControlMaker +{ +public: + _ButtonMaker(_UiBuilder* uibuilder) + : _UiBuilderControlMaker(uibuilder){}; + _ButtonMaker(){}; + virtual ~_ButtonMaker(){}; + static _UiBuilderControlMaker* GetInstance(_UiBuilder* uibuilder) + { + _ButtonMaker* pButtonMaker = new (std::nothrow) _ButtonMaker(uibuilder); + return static_cast<_UiBuilderControlMaker*>(pButtonMaker); + }; +protected: + virtual Control* Make(_UiBuilderControl* pControl) + { + result r = E_SYSTEM; + _UiBuilderControlLayout* pControlProperty = null; + Button* pButton = null; + HorizontalAlignment horizontalAlignment; + VerticalAlignment verticalAlignment; + Color color; + float size = 0; + int opacity = 0; + FloatRectangle buttonRect(0.0f, 0.0f, 0.0f, 0.0f); + Tizen::Base::String elementString; + + GetProperty(pControl, &pControlProperty); + + if (pControlProperty == null) + { + return null; + } + + pButton = new (std::nothrow) Button(); + if (pButton == null) + { + return null; + } + + buttonRect = pControlProperty->GetRectF(); + + if (pControl->GetElement(L"text", elementString)) + { + r = pButton->Construct(buttonRect, elementString); + } + else + { + r = pButton->Construct(buttonRect); + } + + if (r != E_SUCCESS) + { + delete pButton; + return null; + } + + if (pControl->GetElement(L"horizontalAlign", elementString) || pControl->GetElement(L"hAlign", elementString)) + { + if (ConvertHAlignToHorizontalAlignment(elementString, horizontalAlignment)) + { + pButton->SetTextHorizontalAlignment(horizontalAlignment); + } + } + + if (pControl->GetElement(L"verticalAlign", elementString) || pControl->GetElement(L"vAlign", elementString)) + { + if (ConvertVAlignToVerticalAlignment(elementString, verticalAlignment)) + { + pButton->SetTextVerticalAlignment(verticalAlignment); + } + } + + if (pControl->GetElement(L"normalTextColor", elementString)) + { + ConvertStringToColor(elementString, color); + pButton->SetTextColor(color); + } + + if (pControl->GetElement(L"pressedTextColor", elementString)) + { + ConvertStringToColor(elementString, color); + pButton->SetPressedTextColor(color); + } + + if (pControl->GetElement(L"disableTextColor", elementString)) + { + ConvertStringToColor(elementString, color); + pButton->SetDisabledTextColor(color); + } + + if (pControl->GetElement(L"normalBitmapPath", elementString) || pControl->GetElement(L"NormalBitmapPath", elementString)) + { + Bitmap* pNormalBitmap = null; + FloatPoint position; + pNormalBitmap = LoadBitmapN(elementString); + + if (pControl->GetElement(L"NormalBitmapX", elementString)) + { + position.x = _LocalizedNumParser::ToDouble(elementString, "C"); + if ((position.x < 0.0f) || (position.x > ((Control*) (GetContainer()))->GetBoundsF().width - ((Control*) (GetContainer()))->GetBoundsF().x)) + { + position.x = 0.0f; + } + } + + if (pControl->GetElement(L"NormalBitmapY", elementString)) + { + position.y = _LocalizedNumParser::ToDouble(elementString, "C"); + if (position.y < 0.0f || (position.y > ((Control*) (GetContainer()))->GetBoundsF().height - ((Control*) (GetContainer()))->GetBoundsF().y)) + { + position.y = 0.0f; + } + } + + if (pNormalBitmap != null) + { + pButton->SetNormalBitmap(position, *pNormalBitmap); + delete pNormalBitmap; + } + } + + if (pControl->GetElement(L"PressedBitmapPath", elementString)) + { + Bitmap* pPressedBitmap = null; + FloatPoint position; + + pPressedBitmap = LoadBitmapN(elementString); + if (pControl->GetElement(L"PressedBitmapX", elementString)) + { + position.x = _LocalizedNumParser::ToDouble(elementString, "C"); + if ((position.x < 0.0f) || (position.x > ((Control*) (GetContainer()))->GetBoundsF().width - ((Control*) (GetContainer()))->GetBoundsF().x)) + { + position.x = 0.0f; + } + } + + if (pControl->GetElement(L"PressedBitmapY", elementString)) + { + position.y =_LocalizedNumParser::ToDouble(elementString, "C"); + if (position.y < 0.0f || (position.y > ((Control*) (GetContainer()))->GetBoundsF().height - ((Control*) (GetContainer()))->GetBoundsF().y)) + { + position.y = 0.0f; + } + } + + if (pPressedBitmap != null) + { + pButton->SetPressedBitmap(position, *pPressedBitmap); + delete pPressedBitmap; + } + } + + if (pControl->GetElement(L"DisabledBitmapPath", elementString)) + { + Bitmap* pDisabledBitmap = null; + FloatPoint position; + pDisabledBitmap = LoadBitmapN(elementString); + if (pControl->GetElement(L"DisabledBitmapX", elementString)) + { + position.x = _LocalizedNumParser::ToDouble(elementString, "C"); + if ((position.x < 0.0f) || (position.x > ((Control*) (GetContainer()))->GetBoundsF().width - ((Control*) (GetContainer()))->GetBoundsF().x)) + { + position.x = 0.0f; + } + } + + if (pControl->GetElement(L"DisabledBitmapY", elementString)) + { + position.y = _LocalizedNumParser::ToDouble(elementString, "C"); + if (position.y < 0.0f || (position.y > ((Control*) (GetContainer()))->GetBoundsF().height - ((Control*) (GetContainer()))->GetBoundsF().y)) + { + position.y = 0.0f; + } + } + + if (pDisabledBitmap != null) + { + pButton->SetDisabledBitmap(position, *pDisabledBitmap); + delete pDisabledBitmap; + } + } + + if (pControl->GetElement(L"HighlightedBitmapPath", elementString)) + { + Bitmap* pHighlightedBitmap = null; + FloatPoint position; + pHighlightedBitmap = LoadBitmapN(elementString); + if (pControl->GetElement(L"HighlightedBitmapX", elementString)) + { + position.x = _LocalizedNumParser::ToDouble(elementString, "C"); + if ((position.x < 0.0f) || (position.x > ((Control*) (GetContainer()))->GetBoundsF().width - ((Control*) (GetContainer()))->GetBoundsF().x)) + { + position.x = 0.0f; + } + } + + if (pControl->GetElement(L"HighlightedBitmapY", elementString)) + { + position.y = _LocalizedNumParser::ToDouble(elementString, "C"); + if (position.y < 0.0f || (position.y > ((Control*) (GetContainer()))->GetBoundsF().height - ((Control*) (GetContainer()))->GetBoundsF().y)) + { + position.y = 0.0f; + } + } + + if (pHighlightedBitmap != null) + { + pButton->SetHighlightedBitmap(position, *pHighlightedBitmap); + delete pHighlightedBitmap; + } + } + + if (pControl->GetElement(L"NormalBGBitmapPath", elementString)) + { + Bitmap* pNormalBGBitmap = null; + pNormalBGBitmap = LoadBitmapN(elementString); + if (pNormalBGBitmap != null) + { + pButton->SetNormalBackgroundBitmap(*pNormalBGBitmap); + delete pNormalBGBitmap; + } + } + + if (pControl->GetElement(L"PressedBGBitmapPath", elementString)) + { + Bitmap* pPressedBGBitmap = null; + pPressedBGBitmap = LoadBitmapN(elementString); + if (pPressedBGBitmap != null) + { + pButton->SetPressedBackgroundBitmap(*pPressedBGBitmap); + delete pPressedBGBitmap; + } + } + + if (pControl->GetElement(L"HighlightedBGBitmapPath", elementString)) + { + Bitmap* pHighlightedBGBitmap = null; + pHighlightedBGBitmap = LoadBitmapN(elementString); + if (pHighlightedBGBitmap != null) + { + pButton->SetHighlightedBackgroundBitmap(*pHighlightedBGBitmap); + delete pHighlightedBGBitmap; + } + } + + if (pControl->GetElement(L"DisabledBGBitmapPath", elementString)) + { + Bitmap* pDisabledBGBitmap = null; + pDisabledBGBitmap = LoadBitmapN(elementString); + if (pDisabledBGBitmap != null) + { + pButton->SetDisabledBackgroundBitmap(*pDisabledBGBitmap); + delete pDisabledBGBitmap; + } + } + + if (pControl->GetElement(L"highlightedTextColor", elementString)) + { + ConvertStringToColor(elementString, color); + pButton->SetHighlightedTextColor(color); + } + + if (pControl->GetElement(L"normalColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + + if (pControl->GetElement(L"normalColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + pButton->SetColor(BUTTON_STATUS_NORMAL, color); + } + + if (pControl->GetElement(L"pressedColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + + if (pControl->GetElement(L"pressedColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + pButton->SetColor(BUTTON_STATUS_PRESSED, color); + } + + if (pControl->GetElement(L"disabledColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + + if (pControl->GetElement(L"disabledColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + pButton->SetColor(BUTTON_STATUS_DISABLED, color); + } + + if (pControl->GetElement(L"highlightedColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + + if (pControl->GetElement(L"highlightedColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + pButton->SetColor(BUTTON_STATUS_HIGHLIGHTED, color); + } + + if (pControl->GetElement(L"textSize", elementString)) + { + _ICoordinateSystemTransformer* pTransform = GetTransformer(); + + size = _LocalizedNumParser::ToDouble(elementString, "C"); + + if (pTransform) + { + size = pTransform->Transform(size); + } + + pButton->SetTextSize(size); + } + + if (pControl->GetElement(L"accessibilityHint", elementString)) + { + AccessibilityContainer* pContainer = pButton->GetAccessibilityContainer(); + if (pContainer) + { + AccessibilityElement* pElement = pContainer->GetElement(L"ButtonText"); + if (pElement) + { + pElement->SetHint(elementString); + } + } + } + + return pButton; + } +private: +}; // _ButtonMaker + +_ButtonRegister::_ButtonRegister() +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->RegisterControl(L"Button", _ButtonMaker::GetInstance); +} +_ButtonRegister::~_ButtonRegister() +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->UnregisterControl(L"Button"); +} +static _ButtonRegister ButtonRegisterToUiBuilder; +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_ButtonItemImpl.cpp b/src/ui/controls/FUiCtrl_ButtonItemImpl.cpp new file mode 100644 index 0000000..2c05c76 --- /dev/null +++ b/src/ui/controls/FUiCtrl_ButtonItemImpl.cpp @@ -0,0 +1,173 @@ +// +// 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_ButtonItemImpl.cpp +* @brief This is the implementation file for _ButtonItemImpl class. +*/ + +#include +#include "FUiCtrl_ButtonItemImpl.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +_ButtonItemImpl::_ButtonItemImpl(ButtonItem* pPublic) + : __actionId(-1) + , __itemStyle(BUTTON_ITEM_STYLE_TEXT) + , __itemText(L"") + , __accessibilityHint(L"") +{ + for (int i = 0; i < BUTTON_ITEM_MAX_STATE_COUNT; i++) + { + __pIconBitmap[i] = null; + __pButtonItemBackgroundBitmap[i] = null; + } +} + +_ButtonItemImpl::~_ButtonItemImpl(void) +{ + for (int i = 0; i < BUTTON_ITEM_MAX_STATE_COUNT; i++) + { + __pIconBitmap[i] = null; + __pButtonItemBackgroundBitmap[i] = null; + } +} + +const _ButtonItemImpl* +_ButtonItemImpl::GetInstance(const ButtonItem& buttonItem) +{ + return static_cast (buttonItem.__pImpl); +} + +_ButtonItemImpl* +_ButtonItemImpl::GetInstance(ButtonItem& buttonItem) +{ + return static_cast<_ButtonItemImpl*> (buttonItem.__pImpl); +} + +result +_ButtonItemImpl::Construct(ButtonItemStyle style, int actionId) +{ + SysTryReturnResult(NID_UI_CTRL, actionId >= BUTTON_ITEM_ACTION_ID_MIN, + E_INVALID_ARG, "[E_INVALID_ARG] The actionId is invalid."); + + __actionId = actionId; + __itemText = Tizen::Base::String(L""); + + __itemStyle = style; + + for (int i = 0; i < BUTTON_ITEM_MAX_STATE_COUNT; i++) + { + __pIconBitmap[i] = null; + __pButtonItemBackgroundBitmap[i] = null; + } + + return E_SUCCESS; +} + +int +_ButtonItemImpl::GetActionId(void) const +{ + ClearLastResult(); + + return __actionId; +} + +const Tizen::Graphics::Bitmap* +_ButtonItemImpl::GetBackgroundBitmap(ButtonItemStatus status) const +{ + ClearLastResult(); + + SysTryReturn(NID_UI_CTRL, (status >= 0 && status < BUTTON_ITEM_MAX_STATE_COUNT), null, E_INVALID_ARG, + "[E_INVALID_ARG] status is invalid."); + + return __pButtonItemBackgroundBitmap[status]; +} + +const Tizen::Graphics::Bitmap* +_ButtonItemImpl::GetIcon(ButtonItemStatus status) const +{ + ClearLastResult(); + + SysTryReturn(NID_UI_CTRL, (status >= 0 && status < BUTTON_ITEM_MAX_STATE_COUNT), null, E_INVALID_ARG, + "[E_INVALID_ARG] status is invalid."); + + return __pIconBitmap[status]; +} + +Tizen::Base::String +_ButtonItemImpl::GetText(void) const +{ + ClearLastResult(); + + return __itemText; +} + +result +_ButtonItemImpl::SetActionId(int actionId) +{ + SysTryReturnResult(NID_UI_CTRL, actionId > BUTTON_ITEM_ACTION_ID_MIN, + E_INVALID_ARG, "[E_INVALID_ARG] The actionId is invalid."); + + __actionId = actionId; + + return E_SUCCESS; +} + +result +_ButtonItemImpl::SetBackgroundBitmap(ButtonItemStatus status, const Tizen::Graphics::Bitmap* pBitmap) +{ + SysTryReturnResult(NID_UI_CTRL, (status >= 0 && status < BUTTON_ITEM_MAX_STATE_COUNT), E_INVALID_ARG, + "[E_INVALID_ARG] status is invalid."); + + __pButtonItemBackgroundBitmap[status] = pBitmap; + + return E_SUCCESS; +} + +result +_ButtonItemImpl::SetIcon(ButtonItemStatus status, const Tizen::Graphics::Bitmap* pIcon) +{ + SysTryReturnResult(NID_UI_CTRL, __itemStyle == BUTTON_ITEM_STYLE_ICON, E_INVALID_OPERATION, + "[E_INVALID_OPERATION] Unable to set the icon because the BUTTON_ITEM_STYLE_TEXT style does not support it."); + + SysTryReturnResult(NID_UI_CTRL, (status >= 0 && status < BUTTON_ITEM_MAX_STATE_COUNT), E_INVALID_ARG, + "[E_INVALID_ARG] status is invalid."); + + __pIconBitmap[status] = pIcon; + + return E_SUCCESS; +} + +result +_ButtonItemImpl::SetText(const Tizen::Base::String& text) +{ + SysTryReturnResult(NID_UI_CTRL, __itemStyle == BUTTON_ITEM_STYLE_TEXT, E_INVALID_OPERATION, + "[E_INVALID_OPERATION] Unable to set the text because the BUTTON_ITEM_STYLE_ICON style does not support it."); + + __itemText = text; + + return E_SUCCESS; +} + +void +_ButtonItemImpl::SetAccessibilityHint(const Tizen::Base::String& hint) +{ + __accessibilityHint = hint; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_ButtonModel.cpp b/src/ui/controls/FUiCtrl_ButtonModel.cpp new file mode 100644 index 0000000..1f711da --- /dev/null +++ b/src/ui/controls/FUiCtrl_ButtonModel.cpp @@ -0,0 +1,47 @@ +// +// 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_ButtonModel.cpp + * @brief This is the implementation file for the _ButtonModel class. + */ + +#include +#include +#include "FUiCtrl_ButtonModel.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +_ButtonModel::_ButtonModel(void) +{ + +} + +_ButtonModel::~_ButtonModel(void) +{ + +} + +result +_ButtonModel::Construct(void) +{ + result r = E_SUCCESS; + + return r; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_ButtonPresenter.cpp b/src/ui/controls/FUiCtrl_ButtonPresenter.cpp new file mode 100644 index 0000000..808b634 --- /dev/null +++ b/src/ui/controls/FUiCtrl_ButtonPresenter.cpp @@ -0,0 +1,1561 @@ +// +// 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_ButtonPresenter.cpp + * @brief This is the implementation file for the _ButtonPresenter class. + */ + +#include +#include +#include +#include +#include +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_ResourceManager.h" +#include "FUi_UiTouchEvent.h" +#include "FUiAnim_VisualElement.h" +#include "FUiCtrl_ButtonPresenter.h" +#include "FUiCtrl_ButtonModel.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Graphics; +using namespace Tizen::Graphics::_Text; +using namespace Tizen::App; + +namespace Tizen { namespace Ui { namespace Controls +{ +_ButtonPresenter::_ButtonPresenter(void) + : __pButton(null) + , __pButtonModel(null) + , __previousEnabledState(false) + , __touchMoveHandled(false) + , __lazyDecode(false) + , __showUnderlineBitmap(false) + , __isKeyPressed(false) + , __pFont(null) + , __pTextObject(null) + , __pBase(null) + , __fontStyle(0) + , __fontSize(0.0f) + , __pTextSlideTimer(null) + , __textRect(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f)) + , __pTextSlideClippedBitmap(null) +{ + +} + +_ButtonPresenter::~_ButtonPresenter(void) +{ + if (__pButtonModel) + { + delete __pButtonModel; + __pButtonModel = null; + } + + if (__pTextObject) + { + delete __pTextObject; + __pTextObject = null; + } + + if (__pTextSlideTimer) + { + delete __pTextSlideTimer; + __pTextSlideTimer = null; + } + + if (__pTextSlideClippedBitmap) + { + delete __pTextSlideClippedBitmap; + __pTextSlideClippedBitmap = null; + } +} + +result +_ButtonPresenter::Construct(const _Button& button) +{ + result r = E_SUCCESS; + + __pButton = const_cast <_Button*>(&button); + __fontStyle = FONT_STYLE_PLAIN; + + GET_SHAPE_CONFIG(BUTTON::DEFAULT_FONT_SIZE, __pButton->GetOrientation(), __fontSize); + + __pFont = __pButton->GetFallbackFont(); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, __pFont, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __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 is insufficient."); + + __pTextObject->Construct(); + + return E_SUCCESS; + +CATCH: + + delete __pTextObject; + __pTextObject = null; + + return r; +} + +result +_ButtonPresenter::Install(void) +{ + result r = E_SUCCESS; + + __pBase = __pButton->GetVisualElement(); + + _ButtonModel* pModel = new (std::nothrow) _ButtonModel(); + SysTryReturn(NID_UI_CTRL, pModel, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + + r = SetModel(*pModel); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + r = pModel->Construct(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + return E_SUCCESS; + +CATCH: + delete pModel; + return r; +} + +result +_ButtonPresenter::SetModel(const _ButtonModel& buttonModel) +{ + __pButtonModel = const_cast <_ButtonModel*>(&buttonModel); + + return E_SUCCESS; +} + +result +_ButtonPresenter::InitTextObject(void) +{ + TextSimple* pSimpleText = null; + + float leftMargin = __pButton->GetLeftMarginF(); + float topMargin = __pButton->GetTopMarginF(); + float rightMargin = __pButton->GetRightMarginF(); + float bottomMargin = __pButton->GetBottomMarginF(); + + __pTextObject->RemoveAll(true); + + 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); + SetTextSize(__pButton->GetTextSizeF()); + __pTextObject->SetFont(__pFont, 0, __pTextObject->GetTextLength()); + __pTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_CENTER | TEXT_OBJECT_ALIGNMENT_MIDDLE); + __pTextObject->SetBounds(FloatRectangle(leftMargin, topMargin, + __pButton->GetBoundsF().width - (leftMargin + rightMargin), + __pButton->GetBoundsF().height - (topMargin + bottomMargin))); + __pTextObject->Compose(); + + return E_SUCCESS; +} + +void +_ButtonPresenter::OnFontChanged(Font* pFont) +{ + __pFont = pFont; + + return; +} + +void +_ButtonPresenter::OnFontInfoRequested(unsigned long& style, int& size) +{ + style = __fontStyle; + size = _CoordinateSystemUtils::ConvertToInteger(__fontSize); + + return; +} + +void +_ButtonPresenter::OnFontInfoRequested(unsigned long& style, float& size) +{ + style = __fontStyle; + size = __fontSize; + + return; +} + +void +_ButtonPresenter::SetTextSize(int size, unsigned long fontStyle) +{ + float floatSize = _CoordinateSystemUtils::ConvertToFloat(size); + + return SetTextSize(floatSize, fontStyle); +} + +void +_ButtonPresenter::SetTextSize(float size, unsigned long fontStyle) +{ + result r = E_SUCCESS; + + if (__pFont == null) + { + return; + } + + bool isStrikeOut = __pFont->IsStrikeOut(); + bool isUnderLine = __pFont->IsUnderlined(); + + if (__pFont->IsItalic()) + { + fontStyle |= FONT_STYLE_ITALIC; + } + + if (__pFont->IsBold()) + { + fontStyle |= FONT_STYLE_BOLD; + } + + __fontStyle = fontStyle; + __fontSize = size; + + __pFont = __pButton->GetFallbackFont(); + + r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, __pFont, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pFont->SetStrikeOut(isStrikeOut); + __pFont->SetUnderline(isUnderLine); + + return; +} + +void +_ButtonPresenter::SetFontInfo(unsigned long style, int size) +{ + float floatSize = _CoordinateSystemUtils::ConvertToFloat(size); + + return SetFontInfo(style, floatSize); +} + +void +_ButtonPresenter::SetFontInfo(unsigned long style, float size) +{ + __fontStyle = style; + __fontSize = size; + + return; +} + +TextObject* +_ButtonPresenter::GetTextObject(void) const +{ + return __pTextObject; +} + +Font* +_ButtonPresenter::GetFont(void) const +{ + return __pFont; +} + +void +_ButtonPresenter::Draw(void) +{ + _ButtonStatus status = __pButton->GetButtonStatus(); + + Bitmap* pToolbarItemBackgroundBitmap = __pButton->GetToolbarItemBackgroundBitmap(status); + + if (pToolbarItemBackgroundBitmap) + { + DrawToolbarItemBackground(); + } + else + { + DrawBackground(); + } + + if (__pButton->GetSubTitleEffectBitmap() != null) + { + DrawSubTitleEffectBitmap(); + } + + DrawBitmap(); + + if (!__pButton->GetText().IsEmpty()) + { + DrawText(); + } + + if (__showUnderlineBitmap && __pButton->GetToolbarItemBackgroundBitmap(status) == null && status != _BUTTON_STATUS_PRESSED) + { + DrawUnderlineBitmap(); + } + + return; +} + +void +_ButtonPresenter::DrawBackground(void) +{ + Canvas* pCanvas = null; + + Bitmap* pBackgroundBitmap = null; + Bitmap* pReplacementColorBackgroundBitmap = null; + Bitmap* pBackgroundEffectBitmap = null; + Bitmap* pHighlightedBackgroundBitmap = null; + Bitmap* pHighlightedReplacementColorBackgroundBitmap = null; + Color bgColor = __pButton->GetBackgroundColor(); + String imagePath = L""; + + FloatRectangle bounds(0, 0, __pButton->GetBoundsF().width, + __pButton->GetBoundsF().height); + + _ButtonStatus status = __pButton->GetButtonStatus(); + + if (__pButton->IsUserBackgroundBitmap(status)) + { + if (status == _BUTTON_STATUS_HIGHLIGHTED) + { + pBackgroundBitmap = __pButton->GetBackgroundBitmap(_BUTTON_STATUS_NORMAL); + pBackgroundEffectBitmap = __pButton->GetBackgroundEffectBitmap(_BUTTON_STATUS_NORMAL); + + pHighlightedBackgroundBitmap = __pButton->GetBackgroundBitmap(_BUTTON_STATUS_HIGHLIGHTED); + } + else + { + pBackgroundBitmap = __pButton->GetBackgroundBitmap(status); + pBackgroundEffectBitmap = __pButton->GetBackgroundEffectBitmap(status); + } + + if (pBackgroundBitmap) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pBackgroundBitmap) == false) + { + imagePath = _BitmapImpl::GetInstance(*pBackgroundBitmap)->GetFileName(); + } + + if (imagePath.IsEmpty() == false && __pButton->GetText() == L"" + && __pButton->GetBitmap(_BUTTON_STATUS_NORMAL) == null && __pButton->GetBitmap(_BUTTON_STATUS_DISABLED) == null + && __pButton->GetBitmap(_BUTTON_STATUS_PRESSED) == null && __pButton->GetBitmap(_BUTTON_STATUS_HIGHLIGHTED) == null) + { + __pBase->SetBackgroundColor(_Colorf( + (float)bgColor.GetRed() / 255, (float)bgColor.GetGreen() / 255, (float)bgColor.GetBlue() / 255, (float)bgColor.GetAlpha() / 255)); + __pBase->SetImageSource(imagePath); + + __lazyDecode = true; + } + else + { + __pBase->SetImageSource(L""); + + __lazyDecode = false; + + pCanvas = __pButton->GetCanvasN(); + if (pCanvas == null) + { + SysLog(NID_UI_CTRL, "Cannot get a canvas."); + return; + } + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pBackgroundBitmap))// pBackgroundBitmap is 9 + { + if (pBackgroundEffectBitmap) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pBackgroundEffectBitmap)) // 9,9 + { + pCanvas->DrawNinePatchedBitmap(bounds, *pBackgroundBitmap); + if (__pButton->IsUserBackgroundEffectBitmap(status)) + { + pCanvas->DrawNinePatchedBitmap(bounds, *pBackgroundEffectBitmap); + } + } + else // 9,0 + { + pCanvas->DrawNinePatchedBitmap(bounds, *pBackgroundBitmap); + if (__pButton->IsUserBackgroundEffectBitmap(status)) + { + pCanvas->DrawBitmap(bounds, *pBackgroundEffectBitmap, FloatRectangle(0.0f, 0.0f, pBackgroundEffectBitmap->GetWidthF(), pBackgroundEffectBitmap->GetHeightF())); + } + } + } + else // 9, X + { + pCanvas->DrawNinePatchedBitmap(bounds, *pBackgroundBitmap); + } + } + else // pBackgroundBitmap is not 9 + { + if (pBackgroundEffectBitmap) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pBackgroundEffectBitmap)) // 0, 9 + { + pCanvas->DrawBitmap(bounds, *pBackgroundBitmap, FloatRectangle(0.0f, 0.0f, pBackgroundBitmap->GetWidthF(), pBackgroundBitmap->GetHeightF())); + if (__pButton->IsUserBackgroundEffectBitmap(status)) + { + pCanvas->DrawNinePatchedBitmap(bounds, *pBackgroundEffectBitmap); + } + } + else // 0, 0 + { + pCanvas->DrawBitmap(bounds, *pBackgroundBitmap, FloatRectangle(0.0f, 0.0f, pBackgroundBitmap->GetWidthF(), pBackgroundBitmap->GetHeightF())); + if (__pButton->IsUserBackgroundEffectBitmap(status)) + { + pCanvas->DrawBitmap(bounds, *pBackgroundEffectBitmap, FloatRectangle(0.0f, 0.0f, pBackgroundEffectBitmap->GetWidthF(), pBackgroundEffectBitmap->GetHeightF())); + } + } + } + else // 0, X + { + pCanvas->DrawBitmap(bounds, *pBackgroundBitmap, FloatRectangle(0.0f, 0.0f, pBackgroundBitmap->GetWidthF(), pBackgroundBitmap->GetHeightF())); + } + } + + if (pHighlightedBackgroundBitmap) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pHighlightedBackgroundBitmap)) + { + pCanvas->DrawNinePatchedBitmap(bounds, *pHighlightedBackgroundBitmap); + } + else + { + pCanvas->DrawBitmap(bounds, *pHighlightedBackgroundBitmap, + FloatRectangle(0.0f, 0.0f, pHighlightedBackgroundBitmap->GetWidthF(), pHighlightedBackgroundBitmap->GetHeightF())); + } + } + } + } + else // pBackgroundBitmap is null + { + pCanvas = __pButton->GetCanvasN(); + if (pCanvas == null) + { + SysLog(NID_UI_CTRL, "Cannot get a canvas."); + return; + } + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + + if (pBackgroundEffectBitmap) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pBackgroundEffectBitmap)) // X, 9 + { + if (__pButton->IsUserBackgroundEffectBitmap(status)) + { + pCanvas->DrawNinePatchedBitmap(bounds, *pBackgroundEffectBitmap); + } + } + else // X, 0 + { + if (__pButton->IsUserBackgroundEffectBitmap(status)) + { + pCanvas->DrawBitmap(bounds, *pBackgroundEffectBitmap, + FloatRectangle(0.0f, 0.0f, pBackgroundEffectBitmap->GetWidthF(), pBackgroundEffectBitmap->GetHeightF())); + } + } + } + else + { + pCanvas->FillRectangle(__pButton->GetColor(status), bounds); + } + } + } + else // nobody set bitmap (default bitmap draw) // if (__pButton->IsUserBackgroundBitmap(status)) + { + __pBase->SetImageSource(L""); + + __lazyDecode = false; + + pCanvas = __pButton->GetCanvasN(); + if (pCanvas == null) + { + SysLog(NID_UI_CTRL, "Cannot get a canvas."); + return; + } + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + + if (status == _BUTTON_STATUS_DISABLED) + { + pBackgroundBitmap = __pButton->GetBackgroundBitmap(_BUTTON_STATUS_NORMAL); + + if(!__pButton->IsUserBackgroundBitmap(_BUTTON_STATUS_NORMAL)) + { + pBackgroundEffectBitmap = __pButton->GetBackgroundEffectBitmap(_BUTTON_STATUS_NORMAL); + } + + pReplacementColorBackgroundBitmap = + _BitmapImpl::GetColorReplacedBitmapN(*pBackgroundBitmap, Color::GetColor(COLOR_ID_MAGENTA), __pButton->GetColor(_BUTTON_STATUS_DISABLED)); + } + else if (status == _BUTTON_STATUS_HIGHLIGHTED) + { + pBackgroundBitmap = __pButton->GetBackgroundBitmap(_BUTTON_STATUS_NORMAL); + + if(!__pButton->IsUserBackgroundBitmap(_BUTTON_STATUS_NORMAL)) + { + pBackgroundEffectBitmap = __pButton->GetBackgroundEffectBitmap(_BUTTON_STATUS_NORMAL); + } + + pReplacementColorBackgroundBitmap = + _BitmapImpl::GetColorReplacedBitmapN(*pBackgroundBitmap, Color::GetColor(COLOR_ID_MAGENTA), __pButton->GetColor(_BUTTON_STATUS_NORMAL)); + + pHighlightedBackgroundBitmap = __pButton->GetBackgroundBitmap(_BUTTON_STATUS_HIGHLIGHTED); + + pHighlightedReplacementColorBackgroundBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pHighlightedBackgroundBitmap, + Color::GetColor(COLOR_ID_MAGENTA), __pButton->GetColor(_BUTTON_STATUS_HIGHLIGHTED)); + } + else + { + pBackgroundBitmap = __pButton->GetBackgroundBitmap(status); + pBackgroundEffectBitmap = __pButton->GetBackgroundEffectBitmap(status); + pReplacementColorBackgroundBitmap = + _BitmapImpl::GetColorReplacedBitmapN(*pBackgroundBitmap, Color::GetColor(COLOR_ID_MAGENTA), __pButton->GetColor(status)); + } + + if (pReplacementColorBackgroundBitmap) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pReplacementColorBackgroundBitmap)) + { + if (pBackgroundEffectBitmap) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pBackgroundEffectBitmap)) + { + pCanvas->DrawNinePatchedBitmap(bounds, *pReplacementColorBackgroundBitmap); + pCanvas->DrawNinePatchedBitmap(bounds, *pBackgroundEffectBitmap); + } + else + { + pCanvas->DrawNinePatchedBitmap(bounds, *pReplacementColorBackgroundBitmap); + pCanvas->DrawBitmap(bounds, *pBackgroundEffectBitmap, + FloatRectangle(0.0f, 0.0f, pBackgroundEffectBitmap->GetWidthF(), pBackgroundEffectBitmap->GetHeightF())); + } + } + else + { + pCanvas->DrawNinePatchedBitmap(bounds, *pReplacementColorBackgroundBitmap); + } + } + else + { + if (pBackgroundEffectBitmap) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pBackgroundEffectBitmap)) + { + pCanvas->DrawBitmap(bounds, *pReplacementColorBackgroundBitmap, + FloatRectangle(0.0f, 0.0f, pReplacementColorBackgroundBitmap->GetWidthF(), pReplacementColorBackgroundBitmap->GetHeightF())); + pCanvas->DrawNinePatchedBitmap(bounds, *pBackgroundEffectBitmap); + } + else + { + pCanvas->DrawBitmap(bounds, *pReplacementColorBackgroundBitmap, + FloatRectangle(0.0f, 0.0f, pReplacementColorBackgroundBitmap->GetWidthF(), pReplacementColorBackgroundBitmap->GetHeightF())); + pCanvas->DrawBitmap(bounds, *pBackgroundEffectBitmap, + FloatRectangle(0.0f, 0.0f, pBackgroundEffectBitmap->GetWidthF(), pBackgroundEffectBitmap->GetHeightF())); + } + } + else + { + pCanvas->DrawBitmap(bounds, *pReplacementColorBackgroundBitmap, + FloatRectangle(0.0f, 0.0f, pReplacementColorBackgroundBitmap->GetWidthF(), pReplacementColorBackgroundBitmap->GetHeightF())); + } + } + } + else + { + if (pBackgroundEffectBitmap) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pBackgroundEffectBitmap)) + { + pCanvas->DrawNinePatchedBitmap(bounds, *pBackgroundEffectBitmap); + } + else + { + pCanvas->DrawBitmap(bounds, *pBackgroundEffectBitmap, + FloatRectangle(0.0f, 0.0f, pBackgroundEffectBitmap->GetWidthF(), pBackgroundEffectBitmap->GetHeightF())); + } + } + else + { + if (status == _BUTTON_STATUS_DISABLED) + { + pCanvas->FillRectangle(__pButton->GetColor(_BUTTON_STATUS_NORMAL), bounds); + } + else + { + pCanvas->FillRectangle(__pButton->GetColor(status), bounds); + } + } + } + + if (pHighlightedReplacementColorBackgroundBitmap) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pHighlightedReplacementColorBackgroundBitmap)) + { + pCanvas->DrawNinePatchedBitmap(bounds, *pHighlightedReplacementColorBackgroundBitmap); + } + else + { + pCanvas->DrawBitmap(bounds, *pHighlightedReplacementColorBackgroundBitmap, + FloatRectangle(0.0f, 0.0f, pHighlightedReplacementColorBackgroundBitmap->GetWidthF(), pHighlightedReplacementColorBackgroundBitmap->GetHeightF())); + } + } + } + + if (!__pButton->IsUserBackgroundBitmap(status)) + { + __pButton->UnloadBackgroundBitmap(status); + } + + if (!__pButton->IsUserBackgroundEffectBitmap(status)) + { + __pButton->UnloadBackgroundEffectBitmap(status); + } + + if (pCanvas) + { + delete pCanvas; + } + + delete pReplacementColorBackgroundBitmap; + delete pHighlightedReplacementColorBackgroundBitmap; + + return; +} + +void +_ButtonPresenter::DrawToolbarItemBackground(void) +{ + Canvas* pCanvas = __pButton->GetCanvasN(); + + if (pCanvas == null) + { + SysLog(NID_UI_CTRL, "Cannot get a canvas."); + return; + } + + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + + _ButtonStatus status = __pButton->GetButtonStatus(); + Bitmap* pToolbarItemBackgroundBitmap = __pButton->GetToolbarItemBackgroundBitmap(status); + + if (pToolbarItemBackgroundBitmap) + { + FloatRectangle bounds(0, 0, __pButton->GetBoundsF().width, __pButton->GetBoundsF().height); + + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pToolbarItemBackgroundBitmap)) + { + pCanvas->DrawNinePatchedBitmap(bounds, *pToolbarItemBackgroundBitmap); + } + else + { + pCanvas->DrawBitmap(bounds, *pToolbarItemBackgroundBitmap, + FloatRectangle(0.0f, 0.0f, pToolbarItemBackgroundBitmap->GetWidthF(), pToolbarItemBackgroundBitmap->GetHeightF())); + } + } + + delete pCanvas; + + return; +} + +void +_ButtonPresenter::DrawBitmap(void) +{ + Canvas* pCanvas = null; + + _ButtonStatus status = __pButton->GetButtonStatus(); + + Bitmap* pBitmap = __pButton->GetBitmap(status); + Bitmap* pNormalBitmap = __pButton->GetBitmap(_BUTTON_STATUS_NORMAL); + + Bitmap* pEffectBitmap = __pButton->GetEffectBitmap(status); + Bitmap* pNormalEffectBitmap = __pButton->GetEffectBitmap(_BUTTON_STATUS_NORMAL); + + FloatRectangle bounds(0, 0, __pButton->GetBoundsF().width, __pButton->GetBoundsF().height); + + if (pBitmap) + { + pCanvas = __pButton->GetCanvasN(); + + if (pCanvas == null) + { + SysLog(NID_UI_CTRL, "Cannot get a canvas."); + return; + } + + if (__pButton->GetSizeF().width - __pButton->GetBitmapPositionF(status).x < pBitmap->GetWidthF() + || __pButton->GetSizeF().height - __pButton->GetBitmapPositionF(status).y < pBitmap->GetHeightF()) + { + pCanvas->DrawBitmap(bounds, *pBitmap, FloatRectangle(0.0f, 0.0f, pBitmap->GetWidthF(), pBitmap->GetHeightF())); + + if (pEffectBitmap) + { + pCanvas->DrawBitmap(bounds, *pEffectBitmap, + FloatRectangle(0.0f, 0.0f, pEffectBitmap->GetWidthF(), pEffectBitmap->GetHeightF())); + } + } + else + { + pCanvas->DrawBitmap(__pButton->GetBitmapPositionF(status), *pBitmap); + + if (pEffectBitmap) + { + pCanvas->DrawBitmap(__pButton->GetEffectBitmapPositionF(status), *pEffectBitmap); + } + } + } + else if (pNormalBitmap) + { + pCanvas = __pButton->GetCanvasN(); + + if (pCanvas == null) + { + SysLog(NID_UI_CTRL, "Cannot get a canvas."); + return; + } + + if (__pButton->GetSizeF().width - __pButton->GetBitmapPositionF(_BUTTON_STATUS_NORMAL).x < pNormalBitmap->GetWidthF() + || __pButton->GetSizeF().height - __pButton->GetBitmapPositionF(_BUTTON_STATUS_NORMAL).y < pNormalBitmap->GetHeightF()) + { + pCanvas->DrawBitmap(bounds, *pNormalBitmap, FloatRectangle(0.0f, 0.0f, pNormalBitmap->GetWidthF(), pNormalBitmap->GetHeightF())); + + if (pNormalEffectBitmap) + { + pCanvas->DrawBitmap(bounds, *pNormalEffectBitmap, FloatRectangle(0.0f, 0.0f, pNormalEffectBitmap->GetWidthF(), pNormalEffectBitmap->GetHeightF())); + } + } + else + { + pCanvas->DrawBitmap(__pButton->GetBitmapPositionF(_BUTTON_STATUS_NORMAL), *pNormalBitmap); + + if (pNormalEffectBitmap) + { + pCanvas->DrawBitmap(__pButton->GetEffectBitmapPositionF(_BUTTON_STATUS_NORMAL), *pNormalEffectBitmap); + } + } + } + + delete pCanvas; + + return; +} + +void +_ButtonPresenter::DrawText(void) +{ + TimerForTextSlideInit(); + //TextSimple* pSimpleText = null; + TextObjectAlignment horizontalAlign = TEXT_OBJECT_ALIGNMENT_CENTER; + TextObjectAlignment verticalAlign = TEXT_OBJECT_ALIGNMENT_MIDDLE; + + float leftMargin = __pButton->GetLeftMarginF(); + float topMargin = __pButton->GetTopMarginF(); + float rightMargin = __pButton->GetRightMarginF(); + float bottomMargin = __pButton->GetBottomMarginF(); + + Canvas* pCanvas = __pButton->GetCanvasN(); + if (pCanvas == null) + { + SysLog(NID_UI_CTRL, "Cannot get a canvas."); + return; + } + + switch (__pButton->GetTextHorizontalAlignment()) + { + case ALIGNMENT_LEFT: + horizontalAlign = TEXT_OBJECT_ALIGNMENT_LEFT; + break; + case ALIGNMENT_CENTER: + horizontalAlign = TEXT_OBJECT_ALIGNMENT_CENTER; + break; + default: + horizontalAlign = TEXT_OBJECT_ALIGNMENT_RIGHT; + } + + switch (__pButton->GetTextVerticalAlignment()) + { + case ALIGNMENT_TOP: + verticalAlign = TEXT_OBJECT_ALIGNMENT_TOP; + break; + case ALIGNMENT_MIDDLE: + verticalAlign = TEXT_OBJECT_ALIGNMENT_MIDDLE; + break; + default: + verticalAlign = TEXT_OBJECT_ALIGNMENT_BOTTOM; + } + + //__pTextObject->RemoveAll(true); + //pSimpleText = new (std::nothrow) TextSimple(const_cast(__pButton->GetText().GetPointer()), __pButton->GetText().GetLength()); + //__pTextObject->AppendElement(*pSimpleText); + + __textRect = FloatRectangle(leftMargin, topMargin, + __pButton->GetBoundsF().width - (leftMargin + rightMargin), + __pButton->GetBoundsF().height - (topMargin + bottomMargin)); + + if (__pButton->UserDefinedText()) + { + __pTextObject->SetBounds(__pButton->GetUserDefinedTextAreaF()); + } + else + { + __pTextObject->SetBounds(__textRect); + } + + if (__pTextSlideClippedBitmap) + { + delete __pTextSlideClippedBitmap; + __pTextSlideClippedBitmap = null; + } + + __pTextSlideClippedBitmap = new (std::nothrow) Bitmap(); + + if (__pButton->UserDefinedText()) + { + __pTextSlideClippedBitmap->Construct(*pCanvas, __pButton->GetUserDefinedTextAreaF()); + } + else + { + __pTextSlideClippedBitmap->Construct(*pCanvas, __textRect); + } + + __pTextObject->SetAlignment(horizontalAlign | verticalAlign); + + if (__pButton->GetButtonStatus() == _BUTTON_STATUS_SELECTED && __pButton->IsTabTextSlide()) + { + __pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_SLIDE_LEFT); + } + else + { + __pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); + } + + SetTextSize(__pButton->GetTextSizeF()); + __pTextObject->SetFont(__pFont, 0, __pTextObject->GetTextLength()); + __pTextObject->Compose(); + + float fontSize = 0.0f; + + if (__pTextObject->GetTotalLineCount() >= 2) + { + fontSize = __pButton->GetMultilineTextSizeF(); + SetTextSize(fontSize); + + __pTextObject->SetFont(__pFont, 0, __pTextObject->GetTextLength()); + __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) + { + __pTextObject->DrawWithOffset(*_CanvasImpl::GetInstance(*pCanvas)); + + DrawTabTextDimBitmap(); + + TimerForTextSlideStart(); + } + else + { + __pTextObject->Draw(*_CanvasImpl::GetInstance(*pCanvas)); + } + + + delete pCanvas; + + return; +} + +void +_ButtonPresenter::DrawUnderlineBitmap(void) +{ + float selectedBitmapMargin = 0.0f; + float selectedBitmapHeight = 0.0f; + float segmentedHeight = 0.0f; + + GET_SHAPE_CONFIG(HEADER::HEADER_ITEM_SELECTED_BITMAP_MARGIN, __pButton->GetOrientation(), selectedBitmapMargin); + GET_SHAPE_CONFIG(HEADER::HEADER_ITEM_SELECTED_BITMAP_HEIGHT, __pButton->GetOrientation(), selectedBitmapHeight); + GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_HEIGHT, __pButton->GetOrientation(), segmentedHeight); + + Bitmap* pUnderlineBitmap = __pButton->GetUnderlineBitmap(); + + if (pUnderlineBitmap) + { + Canvas* pCanvas = __pButton->GetCanvasN(); + + if (pCanvas == null) + { + SysLog(NID_UI_CTRL, "Cannot get a canvas."); + return; + } + + FloatRectangle bounds(selectedBitmapMargin, + __pButton->GetBoundsF().height - selectedBitmapHeight, + __pButton->GetBoundsF().width - selectedBitmapMargin * 2, selectedBitmapHeight + 1); + + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pUnderlineBitmap)) + { + pCanvas->DrawNinePatchedBitmap(bounds, *pUnderlineBitmap); + } + else + { + pCanvas->DrawBitmap(bounds, *pUnderlineBitmap, + FloatRectangle(0.0f, 0.0f, pUnderlineBitmap->GetWidthF(), pUnderlineBitmap->GetHeightF())); + } + + delete pCanvas; + } + + return; +} + +void +_ButtonPresenter::DrawSubTitleEffectBitmap(void) +{ + Bitmap* pSubTitleEffectBitmap = __pButton->GetSubTitleEffectBitmap(); + + if (pSubTitleEffectBitmap) + { + Canvas* pCanvas = __pButton->GetCanvasN(); + + if (pCanvas == null) + { + SysLog(NID_UI_CTRL, "Cannot get a canvas."); + return; + } + + FloatRectangle bounds(0, 0, __pButton->GetBoundsF().width, __pButton->GetBoundsF().height); + + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pSubTitleEffectBitmap)) + { + pCanvas->DrawNinePatchedBitmap(bounds, *pSubTitleEffectBitmap); + } + else + { + pCanvas->DrawBitmap(bounds, *pSubTitleEffectBitmap, + FloatRectangle(0.0f, 0.0f, pSubTitleEffectBitmap->GetWidthF(), pSubTitleEffectBitmap->GetHeightF())); + } + + delete pCanvas; + } + + return; +} + +bool +_ButtonPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + if (&source != __pButton) + { + return false; + } + + if (!__pButton->IsEnabled()) + { + return true; + } + + if (__pButton->GetButtonStyle() == _BUTTON_STYLE_SEGMENT) + { + return false; + } + + __touchMoveHandled = false; + //_ButtonStatus status = __pButton->GetButtonStatus(); + + //if (status != _BUTTON_STATUS_SELECTED) + //{ + __pButton->SetButtonStatus(_BUTTON_STATUS_PRESSED); + //} + + __pButton->Draw(); + __pButton->Show(); + + return true; +} + +bool +_ButtonPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + if (&source != __pButton) + { + return false; + } + + if (!__pButton->IsEnabled()) + { + return true; + } + + if (__pButton->GetButtonStyle() == _BUTTON_STYLE_SEGMENT) + { + return false; + } + + _ButtonStatus status = __pButton->GetButtonStatus(); + + if (status == _BUTTON_STATUS_NORMAL) + { + return true; + } + + FloatPoint touchPoint = touchinfo.GetCurrentPosition(); + + touchPoint.x += source.GetClientBoundsF().x; + touchPoint.y += source.GetClientBoundsF().y; + + FloatRectangle bounds = __pButton->GetClientBoundsF(); + + __pButton->SetButtonStatus(_BUTTON_STATUS_NORMAL); + __pButton->Invalidate(); + + if (bounds.Contains(touchPoint)) + { + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pButton); + + __pButton->FireActionEvent(); + } + + return true; +} + +bool +_ButtonPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + if (&source != __pButton) + { + return false; + } + + if (!__pButton->IsEnabled()) + { + return true; + } + + if (__pButton->GetButtonStyle() == _BUTTON_STYLE_SEGMENT) + { + return false; + } + + FloatPoint touchPoint = touchinfo.GetCurrentPosition(); + + touchPoint.x += source.GetClientBoundsF().x; + touchPoint.y += source.GetClientBoundsF().y; + + FloatRectangle bounds = __pButton->GetClientBoundsF(); + bool isInButtonArea = bounds.Contains(touchPoint); + _ButtonStatus oldStatus = __pButton->GetButtonStatus(); + + if (isInButtonArea && (__touchMoveHandled != true)) + { + __pButton->SetButtonStatus(_BUTTON_STATUS_PRESSED); + } + else + { + __pButton->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + + if (__pButton->GetButtonStatus() != oldStatus) + { + __pButton->Invalidate(); + } + + return false; +} + +bool +_ButtonPresenter::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + if (&source != __pButton) + { + return false; + } + + if (!__pButton->IsEnabled()) + { + return true; + } + + if (__pButton->GetButtonStyle() == _BUTTON_STYLE_SEGMENT) + { + return false; + } + + __pButton->SetButtonStatus(_BUTTON_STATUS_NORMAL); + __pButton->Invalidate(); + + return true; +} + +void +_ButtonPresenter::OnTouchMoveHandled(const _Control& control) +{ + if (__touchMoveHandled == false) + { + __touchMoveHandled = true; + __pButton->SetButtonStatus(_BUTTON_STATUS_NORMAL); + __pButton->Invalidate(); + } + + return; +} + +bool +_ButtonPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) +{ + _KeyCode keyCode = keyInfo.GetKeyCode(); + + if (__pButton->IsFocusModeStateEnabled() == true && keyCode == _KEY_ENTER) + { + if (__pButton->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButton->SetButtonStatus(_BUTTON_STATUS_PRESSED); + } + if (!__isKeyPressed) + { + __isKeyPressed = true; + __pButton->Draw(); + __pButton->Show(); + } + } + + + return false; +} + +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) + { + __pButton->SetButtonStatus(_BUTTON_STATUS_NORMAL); + __pButton->Invalidate(); + + __pButton->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED); + } + } + + return false; +} + +void +_ButtonPresenter::OnAncestorEnableStateChanged(const _Control& control) +{ + if (__pButton->IsButtonStatusSelected()) + { + return; + } + + if (__pButton->GetEnableState()) + { + 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; +} + +void +_ButtonPresenter::OnDrawFocus(void) +{ + if (__pButton->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButton->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + __pButton->Invalidate(); + } + + return; +} + +void +_ButtonPresenter::OnChildControlFocusMoved(const _Control& control) +{ + return; +} + +bool +_ButtonPresenter::IsChildControlFocusManage(void) const +{ + return true; +} + +void +_ButtonPresenter::OnFocusableStateChanged(bool focusalbeState) +{ + return; +} + +void +_ButtonPresenter::OnFocusModeStateChanged(void) +{ + if (__pButton->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButton->SetButtonStatus(_BUTTON_STATUS_NORMAL); + __pButton->Invalidate(); + } + + return; +} + +bool +_ButtonPresenter::OnFocusGained(const _Control& source) +{ + if (__pButton->IsFocusModeStateEnabled() == true) + { + if (__pButton->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButton->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + __pButton->Invalidate(); + } + } + + return true; +} + +bool +_ButtonPresenter::OnFocusLost(const _Control& source) +{ + if (__pButton->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButton->SetButtonStatus(_BUTTON_STATUS_NORMAL); + __pButton->Invalidate(); + } + + return true; +} + +bool +_ButtonPresenter::IsEnabledStateChanged(void) +{ + bool __currentEnabledState = __pButton->GetEnableState(); + bool ret = false; + + if (__currentEnabledState != __previousEnabledState) + { + __previousEnabledState = __currentEnabledState; + ret = true; + } + + return ret; +} + +Canvas* +_ButtonPresenter::OnCanvasRequestedN(const FloatRectangle& bounds) +{ + Canvas* pCanvas = null; + + if (__lazyDecode == true) + { + Bitmap* pBackgroundBitmap = null; + _ButtonStatus status = __pButton->GetButtonStatus(); + + if (__pButton->IsUserBackgroundBitmap(status)) + { + if (status == _BUTTON_STATUS_HIGHLIGHTED) + { + pBackgroundBitmap = __pButton->GetBackgroundBitmap(_BUTTON_STATUS_NORMAL); + } + else + { + pBackgroundBitmap = __pButton->GetBackgroundBitmap(status); + } + } + + if (pBackgroundBitmap != null) + { + if (pBackgroundBitmap->IsNinePatchedBitmap()) // just decode // fix prevent CHECKED_RETURN + { + // empty + } + } + + __lazyDecode = false; + + Draw(); + + pCanvas = __pButton->GetCanvasN(); + } + + return pCanvas; +} + +result +_ButtonPresenter::ShowUnderlineBitmap(bool show) +{ + __showUnderlineBitmap = show; + + return E_SUCCESS; +} + +void +_ButtonPresenter::OnTimerExpired(Timer& timer) +{ + Timer* onTimer = &timer; + + if (onTimer == __pTextSlideTimer) + { + TimerForTextSlideTimeout(); + } + + return; +} + +result +_ButtonPresenter::TimerForTextSlideInit(void) +{ + result r = E_SUCCESS; + + if (__pTextSlideTimer != null) + { + delete __pTextSlideTimer; + __pTextSlideTimer = null; + } + + return r; +} + +result +_ButtonPresenter::TimerForTextSlideStart(void) +{ + result r = E_SUCCESS; + + if (__pTextSlideTimer == null) + { + __pTextSlideTimer = new (std::nothrow) Timer(); + if (__pTextSlideTimer == null) + { + r = E_OUT_OF_MEMORY; + goto CATCH; + } + + r = __pTextSlideTimer->Construct(*this); + + if (IsFailed(r)) + { + delete __pTextSlideTimer; + goto CATCH; + } + } + + r = __pTextSlideTimer->Start(100); + + if (IsFailed(r)) + { + goto CATCH; + } + +CATCH: + return r; +} + +result +_ButtonPresenter::TimerForTextSlideTimeout(void) +{ + Canvas* pCanvas = __pButton->GetCanvasN(); + SysTryReturnResult(NID_UI_CTRL, pCanvas, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] pCanvas is invalid!"); + + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + + if (__pButton->UserDefinedText()) + { + pCanvas->Clear(__pButton->GetUserDefinedTextAreaF()); + + if (__pTextSlideClippedBitmap) + { + pCanvas->DrawBitmap(CoordinateSystem::AlignToDevice(__pButton->GetUserDefinedTextAreaF()), *__pTextSlideClippedBitmap); + } + } + else + { + pCanvas->Clear(__textRect); + + if (__pTextSlideClippedBitmap) + { + pCanvas->DrawBitmap(CoordinateSystem::AlignToDevice(__textRect), *__pTextSlideClippedBitmap); + } + } + + if (__pTextObject->IsChanged()) + { + if (!__pButton->GetText().IsEmpty()) + { + DrawText(); + } + } + + if (__pTextObject->IsActionOn() == true) + { + __pTextObject->DrawWithOffset(*_CanvasImpl::GetInstance(*pCanvas)); + + DrawTabTextDimBitmap(); + + if (__pTextObject->GetRepeatCount() < 3) + { + TimerForTextSlideStart(); + } + } + else + { + __pTextObject->Draw(*_CanvasImpl::GetInstance(*pCanvas)); + } + + delete pCanvas; + + return E_SUCCESS; +} + +void +_ButtonPresenter::DrawTabTextDimBitmap(void) +{ + _ButtonStatus status = __pButton->GetButtonStatus(); + Bitmap* pToolbarItemBackgroundBitmap = __pButton->GetToolbarItemBackgroundBitmap(status); + + if (pToolbarItemBackgroundBitmap) + { + return; + } + + float textDimWidth = 0.0f; + float textDimHeight = 0.0f; + + GET_SHAPE_CONFIG(HEADER::TAB_TEXT_DIM_WIDTH, __pButton->GetOrientation(), textDimWidth); + GET_SHAPE_CONFIG(HEADER::TAB_LARGE_TEXT_HEIGHT, __pButton->GetOrientation(), textDimHeight); + + Bitmap* pTabTextDimLeftBitmap = __pButton->GetTabTextDimLeftBitmap(); + + if (pTabTextDimLeftBitmap) + { + Canvas* pCanvas = __pButton->GetCanvasN(); + FloatRectangle bounds = FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); + + if (pCanvas == null) + { + SysLog(NID_UI_CTRL, "Cannot get a canvas."); + return; + } + + if (__pButton->UserDefinedText() && (__pButton->GetBitmap(_BUTTON_STATUS_NORMAL) || __pButton->GetBitmap(_BUTTON_STATUS_DISABLED) + || __pButton->GetBitmap(_BUTTON_STATUS_PRESSED) || __pButton->GetBitmap(_BUTTON_STATUS_HIGHLIGHTED))) + { + bounds.x = __pButton->GetUserDefinedTextAreaF().x; + bounds.y = __pButton->GetUserDefinedTextAreaF().y; + bounds.width = textDimWidth; + bounds.height = textDimHeight; + } + else + { + bounds.x = 0.0f; + bounds.y = (__pButton->GetSizeF().height - textDimHeight) / 2.0f; + bounds.width = textDimWidth; + bounds.height = textDimHeight; + } + + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pTabTextDimLeftBitmap)) + { + pCanvas->DrawNinePatchedBitmap(bounds, *pTabTextDimLeftBitmap); + } + else + { + pCanvas->DrawBitmap(bounds, *pTabTextDimLeftBitmap, + FloatRectangle(0.0f, 0.0f, pTabTextDimLeftBitmap->GetWidthF(), pTabTextDimLeftBitmap->GetHeightF())); + } + + delete pCanvas; + } + + Bitmap* pTabTextDimRightBitmap = __pButton->GetTabTextDimRightBitmap(); + + if (pTabTextDimRightBitmap) + { + Canvas* pCanvas = __pButton->GetCanvasN(); + FloatRectangle bounds = FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); + + if (pCanvas == null) + { + SysLog(NID_UI_CTRL, "Cannot get a canvas."); + return; + } + + if (__pButton->UserDefinedText() && (__pButton->GetBitmap(_BUTTON_STATUS_NORMAL) || __pButton->GetBitmap(_BUTTON_STATUS_DISABLED) + || __pButton->GetBitmap(_BUTTON_STATUS_PRESSED) || __pButton->GetBitmap(_BUTTON_STATUS_HIGHLIGHTED))) + { + bounds.x = __pButton->GetSizeF().width - textDimWidth; + bounds.y = __pButton->GetUserDefinedTextAreaF().y; + bounds.width = textDimWidth; + bounds.height = textDimHeight; + } + else + { + bounds.x = __pButton->GetSizeF().width - textDimWidth; + bounds.y = (__pButton->GetSizeF().height - textDimHeight) / 2.0f; + bounds.width = textDimWidth; + bounds.height = textDimHeight; + } + + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pTabTextDimRightBitmap)) + { + pCanvas->DrawNinePatchedBitmap(bounds, *pTabTextDimRightBitmap); + } + else + { + pCanvas->DrawBitmap(bounds, *pTabTextDimRightBitmap, + FloatRectangle(0.0f, 0.0f, pTabTextDimRightBitmap->GetWidthF(), pTabTextDimRightBitmap->GetHeightF())); + } + + delete pCanvas; + } + + return; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_CheckButton.cpp b/src/ui/controls/FUiCtrl_CheckButton.cpp new file mode 100644 index 0000000..ea9171c --- /dev/null +++ b/src/ui/controls/FUiCtrl_CheckButton.cpp @@ -0,0 +1,1906 @@ +// +// 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_CheckButton.cpp + * @brief This is the implementation file for the _CheckButton class. + */ + +#include +#include +#include "FUi_AccessibilityContainer.h" +#include "FUi_AccessibilityElement.h" +#include "FUi_AccessibilityManager.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_ResourceManager.h" +#include "FUi_UiNotificationEvent.h" +#include "FUi_UiEventManager.h" +#include "FUiCtrl_ScrollPanel.h" +#include "FUiCtrl_CheckButton.h" +#include "FUiCtrl_CheckButtonPresenter.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; + +namespace Tizen { namespace Ui { namespace Controls +{ + +class CheckButtonAccessibilityListener + : public _IAccessibilityListener +{ +public: + CheckButtonAccessibilityListener(_CheckButton* pCheckButton) + : __pCheckButton(pCheckButton) + { + } + virtual bool OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element){return false;} + virtual bool OnAccessibilityFocusMovedPrevious(const _AccessibilityContainer& control, const _AccessibilityElement& element){return false;} + virtual bool OnAccessibilityReadingElement(const _AccessibilityContainer& control, const _AccessibilityElement& element){return false;} + virtual bool OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element){return false;} + virtual bool OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element){return false;} + virtual bool OnAccessibilityFocusOut(const _AccessibilityContainer& control, const _AccessibilityElement& element){return false;} + virtual bool OnAccessibilityValueIncreased(const _AccessibilityContainer& control, const _AccessibilityElement& element){return false;} + virtual bool OnAccessibilityValueDecreased(const _AccessibilityContainer& control, const _AccessibilityElement& element){return false;} + virtual bool OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element) + { + if (element.GetName() == L"MoreButtonText") + { + return true; + } + CheckButtonStyle style = __pCheckButton->GetCheckButtonStyle(); + if (style == CHECK_BUTTON_STYLE_MARK || style == CHECK_BUTTON_STYLE_MARK_WITH_DIVIDER || style == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON) + { + if(__pCheckButton->IsSelected()) + { + String string; + GET_STRING_CONFIG(IDS_TPLATFORM_BODY_TICK_T_TTS,string); + _AccessibilityManager::GetInstance()->ReadContent(string); + } + else + { + String string; + GET_STRING_CONFIG(IDS_TPLATFORM_BODY_UNTICK_T_TTS,string); + _AccessibilityManager::GetInstance()->ReadContent(string); + } + } + else if (style == CHECK_BUTTON_STYLE_RADIO || style == CHECK_BUTTON_STYLE_RADIO_WITH_DIVIDER || style == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON) + { + if(__pCheckButton->IsSelected()) + { + String string; + GET_STRING_CONFIG(IDS_TPLATFORM_OPT_SELECT,string); + _AccessibilityManager::GetInstance()->ReadContent(string); + } + else + { + String string; + GET_STRING_CONFIG(IDS_TPLATFORM_BODY_NOT_SELECTED_T_TTS,string); + _AccessibilityManager::GetInstance()->ReadContent(string); + } + } + else if (style == CHECK_BUTTON_STYLE_ONOFF || style == CHECK_BUTTON_STYLE_ONOFF_WITH_DIVIDER + || style == CHECK_BUTTON_STYLE_ONOFF_SLIDING || style == CHECK_BUTTON_STYLE_ONOFF_SLIDING_WITH_DIVIDER) + { + if(__pCheckButton->IsSelected()) + { + String string; + GET_STRING_CONFIG(IDS_TPLATFORM_BODY_ON,string); + _AccessibilityManager::GetInstance()->ReadContent(string); + } + else + { + String string; + GET_STRING_CONFIG(IDS_TPLATFORM_BODY_OFF,string); + _AccessibilityManager::GetInstance()->ReadContent(string); + } + } + return true; + } + + _CheckButton* __pCheckButton; +}; + +IMPLEMENT_PROPERTY(_CheckButton); + +_CheckButton::_CheckButton(void) + : __checkButtonStyle(CHECK_BUTTON_STYLE_MARK) + , __backgroundStyle(BACKGROUND_STYLE_DEFAULT) + , __showTitle(false) + , __groupStyle(GROUP_STYLE_NONE) + , __checkButtonStatus(_CHECK_BUTTON_STATUS_NORMAL) + , __pCheckButtonPresenter(null) + , __pActionEvent(null) + , __selected(false) + , __checkedActionId(0) + , __uncheckedActionId(0) + , __selectedActionId(-1) + , __text(L"") + , __titleText(L"") + , __pCircleNormalEffectBitmap(null) + , __pCirclePressedEffectBitmap(null) + , __pDetailedRightNormalEffectBitmap(null) + , __pDetailedRightPressedEffectBitmap(null) + , __pBackgroundNormalEffectBitmap(null) + , __pBackgroundPressedEffectBitmap(null) + , __pBackgroundTopNormalEffectBitmap(null) + , __pBackgroundTopPressedEffectBitmap(null) + , __pBackgroundMiddleNormalEffectBitmap(null) + , __pBackgroundMiddlePressedEffectBitmap(null) + , __pBackgroundBottomNormalEffectBitmap(null) + , __pBackgroundBottomPressedEffectBitmap(null) + , __horizontalAlignment(ALIGNMENT_LEFT) + , __verticalAlignment(ALIGNMENT_MIDDLE) + , __textSize(0.0f) + , __titleTextSize(0.0f) + , __previousTouchArea(false) + , __pRadioGroup(null) + , __pButtonElement(null) + , __pDetailButtonElement(null) + , __pAccessibilityListener(null) +{ + result r = E_SUCCESS; + + _AccessibilityContainer* pContainer = null; + + GET_SHAPE_CONFIG(CHECKBUTTON::TEXT_FONT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, __textSize); + GET_SHAPE_CONFIG(CHECKBUTTON::TITLE_TEXT_FONT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, __titleTextSize); + + _CheckButtonPresenter* pPresenter = new (std::nothrow) _CheckButtonPresenter(); + SysTryReturnVoidResult(NID_UI_CTRL, pPresenter, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + + r = SetPresenter(*pPresenter); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + r = pPresenter->Construct(*this); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + r = pPresenter->Install(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + for (int i = 0; i < NUMBER_OF_CHECK_BUTTON_STATUS; i++) + { + __pMarkBgBitmap[i] = null; + __pMarkBitmap[i] = null; + __pOnOffBgBitmap[i] = null; + __pOnOffBitmap[i] = null; + __pOnOffSlidingBgBitmap[i] = null; + __pOnOffSlidingOnHandlerBitmap[i] = null; + __pOnOffSlidingOffHandlerBitmap[i] = null; + __pCircleBitmap[i] = null; + __pDetailedRightBitmap[i] = null; + + __pBackgroundBitmap[i] = null; + __pBackgroundTopBitmap[i] = null; + __pBackgroundMiddleBitmap[i] = null; + __pBackgroundBottomBitmap[i] = null; + } + + GET_COLOR_CONFIG(CHECKBUTTON::TEXT_NORMAL, __normalTextColor); + GET_COLOR_CONFIG(CHECKBUTTON::TEXT_DISABLED, __disabledTextColor); + GET_COLOR_CONFIG(CHECKBUTTON::TEXT_PRESSED, __pressedTextColor); + GET_COLOR_CONFIG(CHECKBUTTON::TEXT_HIGHLIGHTED, __highlightedTextColor); + GET_COLOR_CONFIG(CHECKBUTTON::TEXT_SELECTED, __selectedTextColor); + + GET_COLOR_CONFIG(CHECKBUTTON::TITLE_TEXT_NORMAL, __normalTitleTextColor); + GET_COLOR_CONFIG(CHECKBUTTON::TITLE_TEXT_DISABLED, __disabledTitleTextColor); + GET_COLOR_CONFIG(CHECKBUTTON::TITLE_TEXT_PRESSED, __pressedTitleTextColor); + GET_COLOR_CONFIG(CHECKBUTTON::TITLE_TEXT_HIGHLIGHTED, __highlightedTitleTextColor); + GET_COLOR_CONFIG(CHECKBUTTON::TITLE_TEXT_SELECTED, __selectedTitleTextColor); + + GET_COLOR_CONFIG(CHECKBUTTON::BG_NORMAL, __normalColor); + GET_COLOR_CONFIG(CHECKBUTTON::BG_DISABLED, __disabledColor); + GET_COLOR_CONFIG(CHECKBUTTON::BG_PRESSED, __pressedColor); + GET_COLOR_CONFIG(CHECKBUTTON::BG_HIGHLIGHTED, __highlightedColor); + GET_COLOR_CONFIG(CHECKBUTTON::BG_SELECTED, __selectedColor); + + pContainer = GetAccessibilityContainer(); + + if(pContainer) + { + pContainer->Activate(true); + __pAccessibilityListener = new (std::nothrow) CheckButtonAccessibilityListener(this); + pContainer->AddListener(*__pAccessibilityListener); + UpdateAccessibilityElement(); + } + + ClearLastResult(); + + return; + +CATCH: + delete pPresenter; +} + +_CheckButton* +_CheckButton::CreateCheckButtonN(void) +{ + _CheckButton* pCheckButton = new (std::nothrow) _CheckButton(); + SysTryReturn(NID_UI_CTRL, pCheckButton, 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."); + + pCheckButton->AcquireHandle(); + + pCheckButton->SetTouchPressThreshold(SENSITIVE); + + return pCheckButton; + +CATCH: + delete pCheckButton; + return null; +} + +_CheckButton::~_CheckButton(void) +{ + if (__pCheckButtonPresenter) + { + delete __pCheckButtonPresenter; + __pCheckButtonPresenter = null; + } + + if (__pActionEvent) + { + delete __pActionEvent; + __pActionEvent = null; + } + + for (int i = 0; i < NUMBER_OF_CHECK_BUTTON_STATUS; i++) + { + if (__pMarkBgBitmap[i]) + { + delete __pMarkBgBitmap[i]; + __pMarkBgBitmap[i] = null; + } + + if (__pMarkBitmap[i]) + { + delete __pMarkBitmap[i]; + __pMarkBitmap[i] = null; + } + + if (__pOnOffBgBitmap[i]) + { + delete __pOnOffBgBitmap[i]; + __pOnOffBgBitmap[i] = null; + } + + if (__pOnOffBitmap[i]) + { + delete __pOnOffBitmap[i]; + __pOnOffBitmap[i] = null; + } + + if (__pOnOffSlidingBgBitmap[i]) + { + delete __pOnOffSlidingBgBitmap[i]; + __pOnOffSlidingBgBitmap[i] = null; + } + + if (__pOnOffSlidingOnHandlerBitmap[i]) + { + delete __pOnOffSlidingOnHandlerBitmap[i]; + __pOnOffSlidingOnHandlerBitmap[i] = null; + } + + if (__pOnOffSlidingOffHandlerBitmap[i]) + { + delete __pOnOffSlidingOffHandlerBitmap[i]; + __pOnOffSlidingOffHandlerBitmap[i] = null; + } + + if (__pCircleBitmap[i]) + { + delete __pCircleBitmap[i]; + __pCircleBitmap[i] = null; + } + + if (__pDetailedRightBitmap[i]) + { + delete __pDetailedRightBitmap[i]; + __pDetailedRightBitmap[i] = null; + } + + if (__pBackgroundBitmap[i]) + { + delete __pBackgroundBitmap[i]; + __pBackgroundBitmap[i] = null; + } + + if (__pBackgroundTopBitmap[i]) + { + delete __pBackgroundTopBitmap[i]; + __pBackgroundTopBitmap[i] = null; + } + + if (__pBackgroundMiddleBitmap[i]) + { + delete __pBackgroundMiddleBitmap[i]; + __pBackgroundMiddleBitmap[i] = null; + } + + if (__pBackgroundBottomBitmap[i]) + { + delete __pBackgroundBottomBitmap[i]; + __pBackgroundBottomBitmap[i] = null; + } + } + + if (__pCircleNormalEffectBitmap) + { + delete __pCircleNormalEffectBitmap; + __pCircleNormalEffectBitmap = null; + } + + if (__pCirclePressedEffectBitmap) + { + delete __pCirclePressedEffectBitmap; + __pCirclePressedEffectBitmap = null; + } + + if (__pDetailedRightNormalEffectBitmap) + { + delete __pDetailedRightNormalEffectBitmap; + __pDetailedRightNormalEffectBitmap = null; + } + + if (__pDetailedRightPressedEffectBitmap) + { + delete __pDetailedRightPressedEffectBitmap; + __pDetailedRightPressedEffectBitmap = null; + } + + if (__pBackgroundNormalEffectBitmap) + { + delete __pBackgroundNormalEffectBitmap; + __pBackgroundNormalEffectBitmap = null; + } + + if (__pBackgroundPressedEffectBitmap) + { + delete __pBackgroundPressedEffectBitmap; + __pBackgroundPressedEffectBitmap = null; + } + + if (__pBackgroundTopNormalEffectBitmap) + { + delete __pBackgroundTopNormalEffectBitmap; + __pBackgroundTopNormalEffectBitmap = null; + } + + if (__pBackgroundTopPressedEffectBitmap) + { + delete __pBackgroundTopPressedEffectBitmap; + __pBackgroundTopPressedEffectBitmap = null; + } + + if (__pBackgroundMiddleNormalEffectBitmap) + { + delete __pBackgroundMiddleNormalEffectBitmap; + __pBackgroundMiddleNormalEffectBitmap = null; + } + + if (__pBackgroundMiddlePressedEffectBitmap) + { + delete __pBackgroundMiddlePressedEffectBitmap; + __pBackgroundMiddlePressedEffectBitmap = null; + } + + if (__pBackgroundBottomNormalEffectBitmap) + { + delete __pBackgroundBottomNormalEffectBitmap; + __pBackgroundBottomNormalEffectBitmap = null; + } + + if (__pBackgroundBottomPressedEffectBitmap) + { + delete __pBackgroundBottomPressedEffectBitmap; + __pBackgroundBottomPressedEffectBitmap = null; + } + + if (__pButtonElement) + { + __pButtonElement->Activate(false); + __pButtonElement = null; + } + if (__pDetailButtonElement) + { + __pDetailButtonElement->Activate(false); + __pDetailButtonElement = null; + } + + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + + if(pContainer) + { + pContainer->RemoveListener(*__pAccessibilityListener); + } + delete __pAccessibilityListener; + __pAccessibilityListener = null; + + ClearLastResult(); +} + +result +_CheckButton::SetPresenter(const _CheckButtonPresenter& checkButtonPresenter) +{ + __pCheckButtonPresenter = const_cast <_CheckButtonPresenter*>(&checkButtonPresenter); + + return E_SUCCESS; +} + +void +_CheckButton::OnDraw(void) +{ + __pCheckButtonPresenter->Draw(); + UpdateAccessibilityElement(); + + return; +} + +result +_CheckButton::OnAttachedToMainTree(void) +{ + if(__pButtonElement) + { + __pButtonElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height)); + } + + if(__pDetailButtonElement) + { + __pDetailButtonElement->SetBounds(FloatRectangle(__pCheckButtonPresenter->GetDetailedButtonBoundsF())); + } + return E_SUCCESS; +} + +void +_CheckButton::UpdateAccessibilityElement(void) +{ + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + + if(pContainer) + { + String label = L""; + if(GetShowTitle()) + { + label = GetTitleText(); + label.Append(L", "); + } + + if (__checkButtonStyle == CHECK_BUTTON_STYLE_MARK || __checkButtonStyle == CHECK_BUTTON_STYLE_MARK_WITH_DIVIDER + || __checkButtonStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON) + { + if (__pButtonElement == null) + { + __pButtonElement = new (std::nothrow) _AccessibilityElement(true); + SysTryReturnVoidResult(NID_UI_CTRL, __pButtonElement, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + pContainer->AddElement(*__pButtonElement); + } + __pButtonElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height)); + __pButtonElement->SetLabel(label + GetText()); + __pButtonElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_TICKBOX_T_TTS"); + __pButtonElement->SetName(L"CheckButtonText"); + + if (__checkButtonStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON) + { + if (__pDetailButtonElement == null) + { + __pDetailButtonElement = new (std::nothrow) _AccessibilityElement(true); + SysTryReturnVoidResult(NID_UI_CTRL, __pDetailButtonElement, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + pContainer->AddElement(*__pDetailButtonElement); + } + __pDetailButtonElement->SetBounds(FloatRectangle(__pCheckButtonPresenter->GetDetailedButtonBoundsF())); + __pDetailButtonElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_BUTTON_T_TTS"); + __pDetailButtonElement->SetName(L"MoreButtonText"); + } + } + else if (__checkButtonStyle == CHECK_BUTTON_STYLE_RADIO || __checkButtonStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DIVIDER + || __checkButtonStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON) + { + if (__pButtonElement == null) + { + __pButtonElement = new (std::nothrow) _AccessibilityElement(true); + SysTryReturnVoidResult(NID_UI_CTRL, __pButtonElement, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + pContainer->AddElement(*__pButtonElement); + } + __pButtonElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height)); + __pButtonElement->SetLabel(label + GetText()); + __pButtonElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_RADIO_BUTTON_T_TTS"); + __pButtonElement->SetName(L"CheckButtonText"); + + if (__checkButtonStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON) + { + if (__pDetailButtonElement == null) + { + __pDetailButtonElement = new (std::nothrow) _AccessibilityElement(true); + SysTryReturnVoidResult(NID_UI_CTRL, __pDetailButtonElement, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + pContainer->AddElement(*__pDetailButtonElement); + } + __pDetailButtonElement->SetBounds(FloatRectangle(__pCheckButtonPresenter->GetDetailedButtonBoundsF())); + __pDetailButtonElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_BUTTON_T_TTS"); + __pDetailButtonElement->SetName(L"MoreButtonText"); + } + } + else if (__checkButtonStyle == CHECK_BUTTON_STYLE_ONOFF || __checkButtonStyle == CHECK_BUTTON_STYLE_ONOFF_WITH_DIVIDER + || __checkButtonStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING || __checkButtonStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING_WITH_DIVIDER) + { + if (__pButtonElement == null) + { + __pButtonElement = new (std::nothrow) _AccessibilityElement(true); + SysTryReturnVoidResult(NID_UI_CTRL, __pButtonElement, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + pContainer->AddElement(*__pButtonElement); + } + __pButtonElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height)); + __pButtonElement->SetLabel(label + GetText()); + __pButtonElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_ON_OFF_BUTTON_T_TTS"); + __pButtonElement->SetName(L"CheckButtonText"); + } + UpdateAccessibilityCheckStatus(); + } + + return; +} + +bool +_CheckButton::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pCheckButtonPresenter->OnTouchPressed(source, touchinfo); +} + +bool +_CheckButton::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pCheckButtonPresenter->OnTouchReleased(source, touchinfo); +} + +bool +_CheckButton::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pCheckButtonPresenter->OnTouchMoved(source, touchinfo); +} + +bool +_CheckButton::OnTouchCanceled(const _Control & source, const _TouchInfo & touchinfo) +{ + return __pCheckButtonPresenter->OnTouchCanceled(source, touchinfo); +} + +void +_CheckButton::OnTouchMoveHandled(const _Control& control) +{ + __pCheckButtonPresenter->OnTouchMoveHandled(control); + + return; +} + +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); +} + +void +_CheckButton::OnBoundsChanged(void) +{ + if(__pButtonElement) + { + __pButtonElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height)); + } + + if(__pDetailButtonElement) + { + __pDetailButtonElement->SetBounds(FloatRectangle(__pCheckButtonPresenter->GetDetailedButtonBoundsF())); + } + + if (__checkButtonStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING || __checkButtonStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING_WITH_DIVIDER) + { + __pCheckButtonPresenter->CalculateButtonBounds(); + __pCheckButtonPresenter->AdjustHandlerPosition(); + } + + return; +} + +void +_CheckButton::OnFontChanged(Font* pFont) +{ + __pCheckButtonPresenter->OnFontChanged(pFont); + + return; +} + +void +_CheckButton::OnFontInfoRequested(unsigned long& style, int& size) +{ + __pCheckButtonPresenter->OnFontInfoRequested(style, size); + + return; +} + +void +_CheckButton::OnDrawFocus(void) +{ + __pCheckButtonPresenter->OnDrawFocus(); + + return; +} + +void +_CheckButton::OnChildControlFocusMoved(const _Control& control) +{ + __pCheckButtonPresenter->OnChildControlFocusMoved(control); + + return; +} + +bool +_CheckButton::IsChildControlFocusManage(void) const +{ + __pCheckButtonPresenter->IsChildControlFocusManage(); + + return true; +} + +void +_CheckButton::OnFocusableStateChanged(bool focusalbeState) +{ + __pCheckButtonPresenter->OnFocusableStateChanged(focusalbeState); + + return; +} + +void +_CheckButton::OnFocusModeStateChanged(void) +{ + __pCheckButtonPresenter->OnFocusModeStateChanged(); + + return; +} + +bool +_CheckButton::OnFocusGained(const _Control& source) +{ + __pCheckButtonPresenter->OnFocusGained(source); + + return true; +} + +bool +_CheckButton::OnFocusLost(const _Control& source) +{ + __pCheckButtonPresenter->OnFocusLost(source); + + return true; +} + +void +_CheckButton::SendTouchReleasedEvent(const _Control& control) +{ + const _Control* pDestination = dynamic_cast (&control); + SysTryReturnVoidResult(NID_UI_CTRL, pDestination != null, E_SYSTEM, "[E_SYSTEM] pDestination is null."); + + ArrayList* pArgs = new (std::nothrow) ArrayList(); + SysTryReturnVoidResult(NID_UI_CTRL, pArgs != null, E_SYSTEM, "[E_SYSTEM] pArgs is null."); + + result r = E_SYSTEM; + r = pArgs->Construct(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] Unable to construct pArgs"); + + // Index 0 : Type + String type(L"CheckButtonReleasedEvent"); + r = pArgs->Add(type); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] Unable to add type to pArgs"); + + r = pArgs->Add(*this); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] Unable to add data to pArgs"); + + + _UiNotificationEvent event(__pRadioGroup->GetHandle(), pArgs); + + r = _UiEventManager::GetInstance()->SendEvent(event); + + return; +} + +result +_CheckButton::SetSelected(bool select) +{ + return SetProperty(L"selected", Variant(select)); +} + +result +_CheckButton::SetPropertySelected(const Variant& selected) +{ + __selected = selected.ToBool(); + + //if (__selected == true) + //{ + // SetCheckButtonStatus(_CHECK_BUTTON_STATUS_SELECTED); + //} + //else + //{ + // SetCheckButtonStatus(_CHECK_BUTTON_STATUS_NORMAL); + //} + + if (__checkButtonStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING || __checkButtonStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING_WITH_DIVIDER) + { + __pCheckButtonPresenter->CalculateButtonBounds(); + __pCheckButtonPresenter->InitOnOffHandlerMoved(); + __pCheckButtonPresenter->AdjustHandlerPosition(); + } + + __pCheckButtonPresenter->Draw(); + + return E_SUCCESS; +} + +bool +_CheckButton::IsSelected(void) const +{ + Variant selected = GetProperty(L"selected"); + + return selected.ToBool(); +} + +Variant +_CheckButton::GetPropertySelected(void) const +{ + return Variant(__selected); +} + +result +_CheckButton::AddActionEventListener(const Controls::_IActionEventListener& listener) +{ + if (__pActionEvent == null) + { + __pActionEvent = _ActionEvent::CreateInstanceN(*this); + SysTryReturn(NID_UI_CTRL, __pActionEvent, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred.\n"); + } + + result r = __pActionEvent->AddListener(listener); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +_CheckButton::RemoveActionEventListener(const Controls::_IActionEventListener& listener) +{ + result r = E_OBJ_NOT_FOUND; + + if (__pActionEvent) + { + r = __pActionEvent->RemoveListener(listener); + } + + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +_CheckButton::AddRadioGroup(const _Control& radioGroup) +{ + SysTryReturn(NID_UI_CTRL, __pRadioGroup == null, E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] The CheckButton is already belonged to a RadioGroup.\n"); + + __pRadioGroup = const_cast <_Control*>(&radioGroup); + + return E_SUCCESS; +} + +result +_CheckButton::RemoveRadioGroup(void) +{ + SysTryReturn(NID_UI_CTRL, __pRadioGroup, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, + "[E_OBJ_NOT_FOUND] Unable to find the CheckButton.\n"); + + __pRadioGroup = null; + + return E_SUCCESS; +} + +result +_CheckButton::SetActionId(int checkedActionId, int uncheckedActionId, int selectedActionId) +{ + result r = E_SUCCESS; + + r = SetProperty(L"checkedActionId", Variant(checkedActionId)); + r = SetProperty(L"uncheckedActionId", Variant(uncheckedActionId)); + r = SetProperty(L"selectedActionId", Variant(selectedActionId)); + + return r; +} + +result +_CheckButton::SetPropertyCheckedActionId(const Variant& checkedActionId) +{ + __checkedActionId = checkedActionId.ToInt(); + + return E_SUCCESS; +} + +int +_CheckButton::GetCheckedActionId(void) const +{ + Variant checkedActionId = GetProperty(L"checkedActionId"); + + return checkedActionId.ToInt(); +} + +Variant +_CheckButton::GetPropertyCheckedActionId(void) const +{ + return Variant(__checkedActionId); +} + +result +_CheckButton::SetPropertyUncheckedActionId(const Variant& uncheckedActionId) +{ + __uncheckedActionId = uncheckedActionId.ToInt(); + + return E_SUCCESS; +} + +int +_CheckButton::GetUncheckedActionId(void) const +{ + Variant uncheckedActionId = GetProperty(L"uncheckedActionId"); + + return uncheckedActionId.ToInt(); +} + +Variant +_CheckButton::GetPropertyUncheckedActionId(void) const +{ + return Variant(__uncheckedActionId); +} + +result +_CheckButton::SetPropertySelectedActionId(const Variant& selectedActionId) +{ + __selectedActionId = selectedActionId.ToInt(); + + return E_SUCCESS; +} + +int +_CheckButton::GetSelectedActionId(void) const +{ + Variant selectedActionId = GetProperty(L"selectedActionId"); + + return selectedActionId.ToInt(); +} + +Variant +_CheckButton::GetPropertySelectedActionId(void) const +{ + return Variant(__selectedActionId); +} + +result +_CheckButton::LoadDefaultBitmap(void) +{ + result r = E_SUCCESS; + + 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; +} + +result +_CheckButton::SetText(const String& text) +{ + return SetProperty(L"text", Variant(text)); +} + +result +_CheckButton::SetPropertyText(const Variant& text) +{ + __text = text.ToString(); + + if(__pButtonElement) + { + __pButtonElement->SetLabel(__text); + } + + return E_SUCCESS; +} + +String +_CheckButton::GetText(void) const +{ + Variant text = GetProperty(L"text"); + + return text.ToString(); +} + +Variant +_CheckButton::GetPropertyText(void) const +{ + return Variant(__text); +} + +result +_CheckButton::SetTitleText(const String& title) +{ + return SetProperty(L"titleText", Variant(title)); +} + +result +_CheckButton::SetPropertyTitleText(const Variant& title) +{ + __titleText = title.ToString(); + + if (__pButtonElement) + { + String label = __titleText; + label.Append(L", "); + + __pButtonElement->SetLabel(label + GetText()); + } + return E_SUCCESS; +} + +String +_CheckButton::GetTitleText(void) const +{ + Variant title = GetProperty(L"titleText"); + + return title.ToString(); +} + +Variant +_CheckButton::GetPropertyTitleText(void) const +{ + return Variant(__titleText); +} + +result +_CheckButton::SetTextHorizontalAlignment(HorizontalAlignment alignment) +{ + __horizontalAlignment = alignment; + return E_SUCCESS; +} + +HorizontalAlignment +_CheckButton::GetTextHorizontalAlignment(void) const +{ + return __horizontalAlignment; +} + +result +_CheckButton::SetTextVerticalAlignment(VerticalAlignment alignment) +{ + __verticalAlignment = alignment; + return E_SUCCESS; +} + +VerticalAlignment +_CheckButton::GetTextVerticalAlignment(void) const +{ + return __verticalAlignment; +} + +result +_CheckButton::SetTextColor(const Color& color) +{ + return SetProperty(L"normalTextColor", Variant(color)); +} + +Color +_CheckButton::GetTextColor(void) const +{ + Variant color = GetProperty(L"normalTextColor"); + + return color.ToColor(); +} + +result +_CheckButton::SetDisabledTextColor(const Color& color) +{ + return SetProperty(L"disabledTextColor", Variant(color)); +} + +Color +_CheckButton::GetDisabledTextColor(void) const +{ + Variant color = GetProperty(L"disabledTextColor"); + + return color.ToColor(); +} + +result +_CheckButton::SetPressedTextColor(const Color& color) +{ + return SetProperty(L"pressedTextColor", Variant(color)); +} + +Color +_CheckButton::GetPressedTextColor(void) const +{ + Variant color = GetProperty(L"pressedTextColor"); + + return color.ToColor(); +} + +result +_CheckButton::SetHighlightedTextColor(const Color& color) +{ + return SetProperty(L"highlightedTextColor", Variant(color)); +} + +Color +_CheckButton::GetHighlightedTextColor(void) const +{ + Variant color = GetProperty(L"highlightedTextColor"); + + return color.ToColor(); +} + +result +_CheckButton::SetSelectedTextColor(const Color& color) +{ + return SetProperty(L"selectedTextColor", Variant(color)); +} + +Color +_CheckButton::GetSelectedTextColor(void) const +{ + Variant color = GetProperty(L"selectedTextColor"); + + return color.ToColor(); +} + +result +_CheckButton::SetPropertyNormalTextColor(const Variant& color) +{ + __normalTextColor = color.ToColor(); + return E_SUCCESS; +} + +result +_CheckButton::SetPropertyDisabledTextColor(const Variant& color) +{ + __disabledTextColor = color.ToColor(); + return E_SUCCESS; +} + +result +_CheckButton::SetPropertyPressedTextColor(const Variant& color) +{ + __pressedTextColor = color.ToColor(); + return E_SUCCESS; +} + +result +_CheckButton::SetPropertyHighlightedTextColor(const Variant& color) +{ + __highlightedTextColor = color.ToColor(); + return E_SUCCESS; +} + +result +_CheckButton::SetPropertySelectedTextColor(const Variant& color) +{ + __selectedTextColor = color.ToColor(); + return E_SUCCESS; +} + +Variant +_CheckButton::GetPropertyNormalTextColor(void) const +{ + return Variant(__normalTextColor); +} + +Variant +_CheckButton::GetPropertyDisabledTextColor(void) const +{ + return Variant(__disabledTextColor); +} + +Variant +_CheckButton::GetPropertyPressedTextColor(void) const +{ + return Variant(__pressedTextColor); +} + +Variant +_CheckButton::GetPropertyHighlightedTextColor(void) const +{ + return Variant(__highlightedTextColor); +} + +Variant +_CheckButton::GetPropertySelectedTextColor(void) const +{ + return Variant(__selectedTextColor); +} + +result +_CheckButton::SetTitleTextColor(const Color& color) +{ + return SetProperty(L"normalTitleTextColor", Variant(color)); +} + +Color +_CheckButton::GetTitleTextColor(void) const +{ + Variant color = GetProperty(L"normalTitleTextColor"); + + return color.ToColor(); +} + +result +_CheckButton::SetDisabledTitleTextColor(const Color& color) +{ + return SetProperty(L"disabledTitleTextColor", Variant(color)); +} + +Color +_CheckButton::GetDisabledTitleTextColor(void) const +{ + Variant color = GetProperty(L"disabledTitleTextColor"); + + return color.ToColor(); +} + +result +_CheckButton::SetPressedTitleTextColor(const Color& color) +{ + return SetProperty(L"pressedTitleTextColor", Variant(color)); +} + +Color +_CheckButton::GetPressedTitleTextColor(void) const +{ + Variant color = GetProperty(L"pressedTitleTextColor"); + + return color.ToColor(); +} + +result +_CheckButton::SetHighlightedTitleTextColor(const Color& color) +{ + return SetProperty(L"highlightedTitleTextColor", Variant(color)); +} + +Color +_CheckButton::GetHighlightedTitleTextColor(void) const +{ + Variant color = GetProperty(L"highlightedTitleTextColor"); + + return color.ToColor(); +} + +result +_CheckButton::SetSelectedTitleTextColor(const Color& color) +{ + return SetProperty(L"selectedTitleTextColor", Variant(color)); +} + +Color +_CheckButton::GetSelectedTitleTextColor(void) const +{ + Variant color = GetProperty(L"selectedTitleTextColor"); + + return color.ToColor(); +} + +result +_CheckButton::SetPropertyNormalTitleTextColor(const Variant& color) +{ + __normalTitleTextColor = color.ToColor(); + return E_SUCCESS; +} + +result +_CheckButton::SetPropertyDisabledTitleTextColor(const Variant& color) +{ + __disabledTitleTextColor = color.ToColor(); + return E_SUCCESS; +} + +result +_CheckButton::SetPropertyPressedTitleTextColor(const Variant& color) +{ + __pressedTitleTextColor = color.ToColor(); + return E_SUCCESS; +} + +result +_CheckButton::SetPropertyHighlightedTitleTextColor(const Variant& color) +{ + __highlightedTitleTextColor = color.ToColor(); + return E_SUCCESS; +} + +result +_CheckButton::SetPropertySelectedTitleTextColor(const Variant& color) +{ + __selectedTitleTextColor = color.ToColor(); + return E_SUCCESS; +} + +Variant +_CheckButton::GetPropertyNormalTitleTextColor(void) const +{ + return Variant(__normalTitleTextColor); +} + +Variant +_CheckButton::GetPropertyDisabledTitleTextColor(void) const +{ + return Variant(__disabledTitleTextColor); +} + +Variant +_CheckButton::GetPropertyPressedTitleTextColor(void) const +{ + return Variant(__pressedTitleTextColor); +} + +Variant +_CheckButton::GetPropertyHighlightedTitleTextColor(void) const +{ + return Variant(__highlightedTitleTextColor); +} + +Variant +_CheckButton::GetPropertySelectedTitleTextColor(void) const +{ + return Variant(__selectedTitleTextColor); +} + +result +_CheckButton::SetColor(_CheckButtonStatus status, const Color& color) +{ + result r = E_SUCCESS; + + switch (status) + { + case _CHECK_BUTTON_STATUS_NORMAL: + r = SetProperty(L"normalColor", Variant(color)); + break; + case _CHECK_BUTTON_STATUS_DISABLED: + r = SetProperty(L"disabledColor", Variant(color)); + break; + case _CHECK_BUTTON_STATUS_PRESSED: + r = SetProperty(L"pressedColor", Variant(color)); + break; + case _CHECK_BUTTON_STATUS_HIGHLIGHTED: + r = SetProperty(L"highlightedColor", Variant(color)); + break; + default: + r = SetProperty(L"selectedColor", Variant(color)); + } + + return r; +} + +result +_CheckButton::SetPropertyNormalColor(const Variant& color) +{ + __normalColor = color.ToColor(); + return E_SUCCESS; +} + +result +_CheckButton::SetPropertyDisabledColor(const Variant& color) +{ + __disabledColor = color.ToColor(); + return E_SUCCESS; +} + +result +_CheckButton::SetPropertyPressedColor(const Variant& color) +{ + __pressedColor = color.ToColor(); + return E_SUCCESS; +} + +result +_CheckButton::SetPropertyHighlightedColor(const Variant& color) +{ + __highlightedColor = color.ToColor(); + return E_SUCCESS; +} + +result +_CheckButton::SetPropertySelectedColor(const Variant& color) +{ + __selectedColor = color.ToColor(); + return E_SUCCESS; +} + +Color +_CheckButton::GetColor(_CheckButtonStatus status) const +{ + Variant color; + + switch (status) + { + case _CHECK_BUTTON_STATUS_NORMAL: + color = GetProperty(L"normalColor"); + break; + case _CHECK_BUTTON_STATUS_DISABLED: + color = GetProperty(L"disabledColor"); + break; + case _CHECK_BUTTON_STATUS_PRESSED: + color = GetProperty(L"pressedColor"); + break; + case _CHECK_BUTTON_STATUS_HIGHLIGHTED: + color = GetProperty(L"highlightedColor"); + break; + default: + color = GetProperty(L"selectedColor"); + } + + return color.ToColor(); +} + +Variant +_CheckButton::GetPropertyNormalColor(void) const +{ + return Variant(__normalColor); +} + +Variant +_CheckButton::GetPropertyDisabledColor(void) const +{ + return Variant(__disabledColor); +} + +Variant +_CheckButton::GetPropertyPressedColor(void) const +{ + return Variant(__pressedColor); +} + +Variant +_CheckButton::GetPropertyHighlightedColor(void) const +{ + return Variant(__highlightedColor); +} + +Variant +_CheckButton::GetPropertySelectedColor(void) const +{ + return Variant(__selectedColor); +} + +int +_CheckButton::GetTextSize(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetTextSizeF()); +} + +float +_CheckButton::GetTextSizeF(void) const +{ + return __textSize; +} + +int +_CheckButton::GetTitleTextSize(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetTitleTextSizeF()); +} + +float +_CheckButton::GetTitleTextSizeF(void) const +{ + return __titleTextSize; +} + +result +_CheckButton::SetCheckButtonStyle(const CheckButtonStyle& checkButtonStyle) +{ + __checkButtonStyle = checkButtonStyle; + return E_SUCCESS; +} + +result +_CheckButton::SetBackgroundStyle(const BackgroundStyle& backgroundStyle) +{ + __backgroundStyle = backgroundStyle; + return E_SUCCESS; +} + +result +_CheckButton::SetShowTitle(bool showTitle) +{ + __showTitle = showTitle; + return E_SUCCESS; +} + +result +_CheckButton::SetGroupStyle(const GroupStyle& groupStyle) +{ + __groupStyle = groupStyle; + return E_SUCCESS; +} + +result +_CheckButton::SetCheckButtonStatus(_CheckButtonStatus checkButtonStatus) +{ + if (__checkButtonStatus != checkButtonStatus) + { + __checkButtonStatus = checkButtonStatus; + } + + if (_CHECK_BUTTON_STATUS_DISABLED == __checkButtonStatus) + { + SetEnableState(false); + } + else + { + SetEnableState(true); + } + + return E_SUCCESS; +} + +CheckButtonStyle +_CheckButton::GetCheckButtonStyle(void) const +{ + return __checkButtonStyle; +} + +BackgroundStyle +_CheckButton::GetBackgroundStyle(void) const +{ + return __backgroundStyle; +} + +bool +_CheckButton::GetShowTitle(void) const +{ + return __showTitle; +} + +GroupStyle +_CheckButton::GetGroupStyle(void) const +{ + return __groupStyle; +} + +_CheckButtonStatus +_CheckButton::GetCheckButtonStatus(void) const +{ + _CheckButtonStatus status = __checkButtonStatus; + + if (!IsEnabled()) + { + status = _CHECK_BUTTON_STATUS_DISABLED; + } + + return status; +} + +Bitmap* +_CheckButton::GetMarkBgBitmap(_CheckButtonStatus checkButtonStatus) const +{ + return __pMarkBgBitmap[checkButtonStatus]; +} + +Bitmap* +_CheckButton::GetMarkBitmap(_CheckButtonStatus checkButtonStatus) const +{ + return __pMarkBitmap[checkButtonStatus]; +} + +Bitmap* +_CheckButton::GetOnOffBgBitmap(_CheckButtonStatus checkButtonStatus) const +{ + return __pOnOffBgBitmap[checkButtonStatus]; +} + +Bitmap* +_CheckButton::GetOnOffBitmap(_CheckButtonStatus checkButtonStatus) const +{ + return __pOnOffBitmap[checkButtonStatus]; +} + +Bitmap* +_CheckButton::GetOnOffSlidingBgBitmap(_CheckButtonStatus checkButtonStatus) const +{ + return __pOnOffSlidingBgBitmap[checkButtonStatus]; +} + +Bitmap* +_CheckButton::GetOnOffSlidingOnHandlerBitmap(_CheckButtonStatus checkButtonStatus) const +{ + return __pOnOffSlidingOnHandlerBitmap[checkButtonStatus]; +} + +Bitmap* +_CheckButton::GetOnOffSlidingOffHandlerBitmap(_CheckButtonStatus checkButtonStatus) const +{ + return __pOnOffSlidingOffHandlerBitmap[checkButtonStatus]; +} + +Bitmap* +_CheckButton::GetCircleBitmap(_CheckButtonStatus checkButtonStatus) const +{ + return __pCircleBitmap[checkButtonStatus]; +} + +Bitmap* +_CheckButton::GetCircleNormalEffectBitmap(void) const +{ + return __pCircleNormalEffectBitmap; +} + +Bitmap* +_CheckButton::GetCirclePressedEffectBitmap(void) const +{ + return __pCirclePressedEffectBitmap; +} + +Bitmap* +_CheckButton::GetDetailedRightNormalEffectBitmap(void) const +{ + return __pDetailedRightNormalEffectBitmap; +} + +Bitmap* +_CheckButton::GetDetailedRightPressedEffectBitmap(void) const +{ + return __pDetailedRightPressedEffectBitmap; +} + +Bitmap* +_CheckButton::GetDetailedRightBitmap(_CheckButtonStatus checkButtonStatus) const +{ + return __pDetailedRightBitmap[checkButtonStatus]; +} + +Bitmap* +_CheckButton::GetBackgroundBitmap(GroupStyle groupStyle, _CheckButtonStatus checkButtonStatus) const +{ + switch(groupStyle) + { + case GROUP_STYLE_TOP: + return __pBackgroundTopBitmap[checkButtonStatus]; + break; + case GROUP_STYLE_MIDDLE: + return __pBackgroundMiddleBitmap[checkButtonStatus]; + break; + case GROUP_STYLE_BOTTOM: + return __pBackgroundBottomBitmap[checkButtonStatus]; + break; + default: + return __pBackgroundBitmap[checkButtonStatus]; + } +} + +Bitmap* +_CheckButton::GetBackgroundNormalEffectBitmap(GroupStyle groupStyle) const +{ + switch(groupStyle) + { + case GROUP_STYLE_TOP: + return __pBackgroundTopNormalEffectBitmap; + break; + case GROUP_STYLE_MIDDLE: + return __pBackgroundMiddleNormalEffectBitmap; + break; + case GROUP_STYLE_BOTTOM: + return __pBackgroundBottomNormalEffectBitmap; + break; + default: + return __pBackgroundNormalEffectBitmap; + } +} + +Bitmap* +_CheckButton::GetBackgroundPressedEffectBitmap(GroupStyle groupStyle) const +{ + switch(groupStyle) + { + case GROUP_STYLE_TOP: + return __pBackgroundTopPressedEffectBitmap; + break; + case GROUP_STYLE_MIDDLE: + return __pBackgroundMiddlePressedEffectBitmap; + break; + case GROUP_STYLE_BOTTOM: + return __pBackgroundBottomPressedEffectBitmap; + break; + default: + return __pBackgroundPressedEffectBitmap; + } +} + +bool +_CheckButton::IsTouchAreaChanged(bool currentButtonArea) +{ + if (__previousTouchArea != currentButtonArea) + { + __previousTouchArea = currentButtonArea; + return true; + } + else + { + return false; + } +} + +result +_CheckButton::FireActionEvent(void) +{ + result r = E_SUCCESS; + + if (__selected) + { + __selected = false; + + //SetCheckButtonStatus(_CHECK_BUTTON_STATUS_NORMAL); + + if (__pActionEvent) + { + IEventArg* pEventArg = _ActionEvent::CreateActionEventArgN(__uncheckedActionId); + SysTryReturn(NID_UI_CTRL, pEventArg, E_INVALID_STATE, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + __pActionEvent->Fire(*pEventArg); + } + } + else + { + __selected = true; + + //SetCheckButtonStatus(_CHECK_BUTTON_STATUS_SELECTED); + + if (__pActionEvent) + { + IEventArg* pEventArg = _ActionEvent::CreateActionEventArgN(__checkedActionId); + SysTryReturn(NID_UI_CTRL, pEventArg, E_INVALID_STATE, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + __pActionEvent->Fire(*pEventArg); + } + } + return r; +} + +_Control* +_CheckButton::GetRadioGroup(void) +{ + return __pRadioGroup; +} + +void +_CheckButton::UpdateAccessibilityCheckStatus(void) +{ + if(likely(!(_AccessibilityManager::IsActivated()))) + { + return; + } + + if (__checkButtonStyle == CHECK_BUTTON_STYLE_MARK || __checkButtonStyle == CHECK_BUTTON_STYLE_MARK_WITH_DIVIDER || __checkButtonStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON) + { + if (__pButtonElement != null) + { + if(__selected) + { + __pButtonElement->SetValueWithStringId("IDS_TPLATFORM_BODY_TICK_T_TTS"); + } + else + { + __pButtonElement->SetValueWithStringId("IDS_TPLATFORM_BODY_UNTICK_T_TTS"); + } + } + } + else if (__checkButtonStyle == CHECK_BUTTON_STYLE_RADIO || __checkButtonStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DIVIDER || __checkButtonStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON) + { + if (__pButtonElement != null) + { + if(__selected) + { + __pButtonElement->SetValueWithStringId("IDS_TPLATFORM_BODY_SELECTED_T_TTS"); + } + else + { + __pButtonElement->SetValueWithStringId("IDS_TPLATFORM_BODY_NOT_SELECTED_T_TTS"); + } + } + } + else if (__checkButtonStyle == CHECK_BUTTON_STYLE_ONOFF || __checkButtonStyle == CHECK_BUTTON_STYLE_ONOFF_WITH_DIVIDER + || __checkButtonStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING || __checkButtonStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING_WITH_DIVIDER) + { + if (__pButtonElement != null) + { + if(__selected) + { + __pButtonElement->SetValueWithStringId("IDS_TPLATFORM_BODY_ON"); + } + else + { + __pButtonElement->SetValueWithStringId("IDS_TPLATFORM_BODY_OFF"); + } + } + } + + return; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_CheckButtonImpl.cpp b/src/ui/controls/FUiCtrl_CheckButtonImpl.cpp new file mode 100644 index 0000000..e95d734 --- /dev/null +++ b/src/ui/controls/FUiCtrl_CheckButtonImpl.cpp @@ -0,0 +1,1054 @@ +// +// 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_CheckButtonImpl.cpp + * @brief This is the implementation file for the _CheckButtonImpl class. + */ + +#include +#include +#include +#include +#include +#include +#include "FUi_ResourceSizeInfo.h" +#include "FUi_ResourceManager.h" +#include "FUi_UiBuilder.h" +#include "FUiCtrl_CheckButtonImpl.h" +#include "FUiCtrl_CheckButton.h" + + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::App; + +namespace Tizen { namespace Ui { namespace Controls +{ + +Dimension +_CheckButtonImpl::CheckButtonSizeInfo::GetDefaultMinimumSize(_ControlOrientation orientation) const +{ + result r = E_SUCCESS; + Dimension dimension(0, 0); + + r = GET_DIMENSION_CONFIG(CHECKBUTTON::MIN_SIZE, orientation, dimension); + SysTryReturn(NID_UI, r == E_SUCCESS, dimension, r, "[%s] A system error occurred.", GetErrorMessage(r)); + + SetLastResult(r); + + return dimension; +} + +FloatDimension +_CheckButtonImpl::CheckButtonSizeInfo::GetDefaultMinimumSizeF(_ControlOrientation orientation) const +{ + result r = E_SUCCESS; + FloatDimension dimension(0.0f, 0.0f); + + r = GET_DIMENSION_CONFIG(CHECKBUTTON::MIN_SIZE, orientation, dimension); + SysTryReturn(NID_UI, r == E_SUCCESS, dimension, r, "[%s] A system error occurred.", GetErrorMessage(r)); + + SetLastResult(r); + + return dimension; +} + +_CheckButtonImpl* +_CheckButtonImpl::GetInstance(CheckButton& checkButton) +{ + return static_cast<_CheckButtonImpl*> (checkButton._pControlImpl); +} + +const _CheckButtonImpl* +_CheckButtonImpl::GetInstance(const CheckButton& checkButton) +{ + return static_cast (checkButton._pControlImpl); +} + +_CheckButtonImpl::_CheckButtonImpl(CheckButton* pPublic, _CheckButton* pCore) + : _ControlImpl(pPublic, pCore) + , __pPublicActionEvent(null) +{ + ClearLastResult(); +} + +_CheckButtonImpl::~_CheckButtonImpl(void) +{ + _CheckButtonImpl::GetCore().RemoveActionEventListener(*this); + + if (__pPublicActionEvent) + { + delete __pPublicActionEvent; + __pPublicActionEvent = null; + } + + ClearLastResult(); +} + +_CheckButtonImpl* +_CheckButtonImpl::CreateCheckButtonImplN(CheckButton* pControl, const Rectangle& bounds) +{ + result r = E_SUCCESS; + r = GET_SIZE_INFO(CheckButton).CheckInitialSizeValid(Dimension(bounds.width, bounds.height), _CONTROL_ORIENTATION_PORTRAIT); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, E_INVALID_ARG, "[E_INVALID_ARG] The given size is not valid."); + + _CheckButton* pCore = _CheckButton::CreateCheckButtonN(); + SysTryReturn(NID_UI_CTRL, pCore, null, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _CheckButtonImpl* pImpl = new (std::nothrow) _CheckButtonImpl(pControl, pCore); + r = _ControlImpl::CheckConstruction(pCore, pImpl); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pImpl->InitializeBoundsProperties(GET_SIZE_INFO(CheckButton), bounds, pCore->GetOrientation()); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pCore->AddActionEventListener(*pImpl); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + ClearLastResult(); + + return pImpl; + +CATCH: + delete pImpl; + return null; +} + +_CheckButtonImpl* +_CheckButtonImpl::CreateCheckButtonImplN(CheckButton* pControl, const FloatRectangle& bounds) +{ + result r = E_SUCCESS; + r = GET_SIZE_INFO(CheckButton).CheckInitialSizeValidF(FloatDimension(bounds.width, bounds.height), _CONTROL_ORIENTATION_PORTRAIT); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, E_INVALID_ARG, "[E_INVALID_ARG] The given size is not valid."); + + _CheckButton* pCore = _CheckButton::CreateCheckButtonN(); + SysTryReturn(NID_UI_CTRL, pCore, null, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _CheckButtonImpl* pImpl = new (std::nothrow) _CheckButtonImpl(pControl, pCore); + r = _ControlImpl::CheckConstruction(pCore, pImpl); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pImpl->InitializeBoundsPropertiesF(GET_SIZE_INFO(CheckButton), bounds, pCore->GetOrientation()); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pCore->AddActionEventListener(*pImpl); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + ClearLastResult(); + + return pImpl; + +CATCH: + delete pImpl; + return null; +} + +Color +_CheckButtonImpl::GetColorOnError(void) +{ + return Color(0XFFFFFFFF); +} + +const char* +_CheckButtonImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Controls::CheckButton"; +} + +const CheckButton& +_CheckButtonImpl::GetPublic(void) const +{ + return static_cast (_ControlImpl::GetPublic()); +} + +CheckButton& +_CheckButtonImpl::GetPublic(void) +{ + return static_cast (_ControlImpl::GetPublic()); +} + +const _CheckButton& +_CheckButtonImpl::GetCore(void) const +{ + return static_cast (_ControlImpl::GetCore()); +} + +_CheckButton& +_CheckButtonImpl::GetCore(void) +{ + return static_cast <_CheckButton&>(_ControlImpl::GetCore()); +} + +result +_CheckButtonImpl::SetSelected(bool select) +{ + result r = GetCore().SetSelected(select); + + SetLastResultReturn(r); +} + +bool +_CheckButtonImpl::IsSelected(void) const +{ + ClearLastResult(); + + return GetCore().IsSelected(); +} + +result +_CheckButtonImpl::AddActionEventListener(IActionEventListener& listener) +{ + if (__pPublicActionEvent == null) + { + __pPublicActionEvent = _PublicActionEvent::CreateInstanceN(GetPublic()); + SysTryReturn(NID_UI_CTRL, __pPublicActionEvent, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred.") + } + + result r = __pPublicActionEvent->AddListener(listener); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + return E_SUCCESS; +} + +result +_CheckButtonImpl::RemoveActionEventListener(IActionEventListener& listener) +{ + result r = E_OBJ_NOT_FOUND; + + if (__pPublicActionEvent) + { + r = __pPublicActionEvent->RemoveListener(listener); + } + + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + return E_SUCCESS; +} + +result +_CheckButtonImpl::SetActionId(int checkedActionId, int uncheckedActionId, int selectedActionId) +{ + result r = GetCore().SetActionId(checkedActionId, uncheckedActionId, selectedActionId); + + SetLastResultReturn(r); +} + +int +_CheckButtonImpl::GetCheckedActionId(void) const +{ + ClearLastResult(); + + return GetCore().GetCheckedActionId(); +} + +int +_CheckButtonImpl::GetUncheckedActionId(void) const +{ + ClearLastResult(); + + return GetCore().GetUncheckedActionId(); +} + +int +_CheckButtonImpl::GetSelectedActionId(void) const +{ + ClearLastResult(); + + return GetCore().GetSelectedActionId(); +} + +result +_CheckButtonImpl::SetText(const String& text) +{ + int textLength = text.GetLength(); + int checkButtonTextMaxLength = 0; + GET_FIXED_VALUE_CONFIG(CHECKBUTTON::TEXT_MAX_LENGTH, _CONTROL_ORIENTATION_PORTRAIT, checkButtonTextMaxLength); + String tempText = String(text); + + if (textLength >= checkButtonTextMaxLength) + { + tempText.Remove(checkButtonTextMaxLength - 1, textLength - checkButtonTextMaxLength + 1); + } + + Variant var(tempText); + result r = GetCore().SetPropertyText(var); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +String +_CheckButtonImpl::GetText(void) const +{ + ClearLastResult(); + + return GetCore().GetPropertyText().ToString(); +} + +result +_CheckButtonImpl::SetTitleText(const String& title) +{ + SysTryReturn(NID_UI_CTRL, GetCore().GetShowTitle() == true , E_INVALID_STATE, E_INVALID_STATE, + "[E_INVALID_STATE] The CheckButton has no title style.\n"); + + int titleLength = title.GetLength(); + int checkButtonTitleMaxLength = 0; + GET_FIXED_VALUE_CONFIG(CHECKBUTTON::TITLE_TEXT_MAX_LENGTH, _CONTROL_ORIENTATION_PORTRAIT, checkButtonTitleMaxLength); + String tempTitle = String(title); + + if (titleLength >= checkButtonTitleMaxLength) + { + tempTitle.Remove(checkButtonTitleMaxLength - 1, titleLength - checkButtonTitleMaxLength + 1); + } + + Variant var(tempTitle); + result r = GetCore().SetPropertyTitleText(var); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +String +_CheckButtonImpl::GetTitleText(void) const +{ + SysTryReturn(NID_UI_CTRL, GetCore().GetShowTitle() == true, L"", E_INVALID_STATE, + "[E_INVALID_STATE] The CheckButton has no title style.\n"); + + ClearLastResult(); + + return GetCore().GetPropertyTitleText().ToString(); +} + +result +_CheckButtonImpl::SetTextHorizontalAlignment(HorizontalAlignment alignment) +{ + result r = GetCore().SetTextHorizontalAlignment(alignment); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +HorizontalAlignment +_CheckButtonImpl::GetTextHorizontalAlignment(void) const +{ + ClearLastResult(); + + return GetCore().GetTextHorizontalAlignment(); +} + +result +_CheckButtonImpl::SetTextVerticalAlignment(VerticalAlignment alignment) +{ + result r = GetCore().SetTextVerticalAlignment(alignment); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +VerticalAlignment +_CheckButtonImpl::GetTextVerticalAlignment(void) const +{ + ClearLastResult(); + + return GetCore().GetTextVerticalAlignment(); +} + +result +_CheckButtonImpl::SetTextColor(const Color& color) +{ + result r = GetCore().SetTextColor(color); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +Color +_CheckButtonImpl::GetTextColor(void) const +{ + ClearLastResult(); + + return GetCore().GetTextColor(); +} + +result +_CheckButtonImpl::SetDisabledTextColor(const Color& color) +{ + result r = GetCore().SetDisabledTextColor(color); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +Color +_CheckButtonImpl::GetDisabledTextColor(void) const +{ + ClearLastResult(); + + return GetCore().GetDisabledTextColor(); +} + +result +_CheckButtonImpl::SetPressedTextColor(const Color& color) +{ + result r = GetCore().SetPressedTextColor(color); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +Color +_CheckButtonImpl::GetPressedTextColor(void) const +{ + ClearLastResult(); + + return GetCore().GetPressedTextColor(); +} + +result +_CheckButtonImpl::SetHighlightedTextColor(const Color& color) +{ + result r = GetCore().SetHighlightedTextColor(color); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +Color +_CheckButtonImpl::GetHighlightedTextColor(void) const +{ + ClearLastResult(); + + return GetCore().GetHighlightedTextColor(); +} + +result +_CheckButtonImpl::SetTitleTextColor(const Color& color) +{ + result r = GetCore().SetTitleTextColor(color); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +Color +_CheckButtonImpl::GetTitleTextColor(void) const +{ + ClearLastResult(); + + return GetCore().GetTitleTextColor(); +} + +result +_CheckButtonImpl::SetDisabledTitleTextColor(const Color& color) +{ + result r = GetCore().SetDisabledTitleTextColor(color); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +Color +_CheckButtonImpl::GetDisabledTitleTextColor(void) const +{ + ClearLastResult(); + + return GetCore().GetDisabledTitleTextColor(); +} + +result +_CheckButtonImpl::SetPressedTitleTextColor(const Color& color) +{ + result r = GetCore().SetPressedTitleTextColor(color); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +Color +_CheckButtonImpl::GetPressedTitleTextColor(void) const +{ + ClearLastResult(); + + return GetCore().GetPressedTitleTextColor(); +} + +result +_CheckButtonImpl::SetHighlightedTitleTextColor(const Color& color) +{ + result r = GetCore().SetHighlightedTitleTextColor(color); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +Color +_CheckButtonImpl::GetHighlightedTitleTextColor(void) const +{ + ClearLastResult(); + + return GetCore().GetHighlightedTitleTextColor(); +} + +result +_CheckButtonImpl::SetColor(CheckButtonStatus status, const Color& color) +{ + SysTryReturn(NID_UI_CTRL, GetCore().GetBackgroundStyle() != BACKGROUND_STYLE_NONE, E_INVALID_OPERATION, E_INVALID_OPERATION, + "[E_INVALID_OPERATION] Unable to set color.\n"); + + _CheckButtonStatus coreStatus = ConvertStatus(status); + + result r = GetCore().SetColor(coreStatus, color); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +Color +_CheckButtonImpl::GetColor(CheckButtonStatus status) const +{ + SysTryReturn(NID_UI_CTRL, GetCore().GetBackgroundStyle() != BACKGROUND_STYLE_NONE, + _CheckButtonImpl::GetColorOnError(), E_INVALID_OPERATION, "[E_INVALID_OPERATION] Unable to get color.\n"); + + _CheckButtonStatus coreStatus = ConvertStatus(status); + + ClearLastResult(); + + return GetCore().GetColor(coreStatus); +} + +result +_CheckButtonImpl::SetStyle(const CheckButtonStyle& checkButtonStyle, const BackgroundStyle& backgroundStyle, bool showTitle, const GroupStyle& groupStyle) +{ + result r = GetCore().SetCheckButtonStyle(checkButtonStyle); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + r = GetCore().SetBackgroundStyle(backgroundStyle); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + r = GetCore().SetShowTitle(showTitle); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + 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; +} + +bool +_CheckButtonImpl::IsLayoutable(void) const +{ + return true; +} + +void +_CheckButtonImpl::OnActionPerformed(const _Control& source, int actionId) +{ + if (__pPublicActionEvent != null) + { + __pPublicActionEvent->Fire(*_PublicActionEvent::CreateActionEventArgN(actionId)); + } + + return; +} + +_CheckButtonStatus +_CheckButtonImpl::ConvertStatus(CheckButtonStatus status) const +{ + _CheckButtonStatus coreStatus = _CHECK_BUTTON_STATUS_HIGHLIGHTED; + switch (status) + { + case CHECK_BUTTON_STATUS_NORMAL: + coreStatus = _CHECK_BUTTON_STATUS_NORMAL; + break; + case CHECK_BUTTON_STATUS_DISABLED: + coreStatus = _CHECK_BUTTON_STATUS_DISABLED; + break; + case CHECK_BUTTON_STATUS_PRESSED: + coreStatus = _CHECK_BUTTON_STATUS_PRESSED; + break; + default: + coreStatus = _CHECK_BUTTON_STATUS_HIGHLIGHTED; + } + + return coreStatus; +} + +class _CheckButtonMaker + : public _UiBuilderControlMaker +{ +public: + _CheckButtonMaker(_UiBuilder* uibuilder) + : _UiBuilderControlMaker(uibuilder){}; + virtual ~_CheckButtonMaker(){}; + static _UiBuilderControlMaker* GetInstance(_UiBuilder* uibuilder) + { + _CheckButtonMaker* pCheckButtonMaker = new (std::nothrow) _CheckButtonMaker(uibuilder); + return static_cast<_UiBuilderControlMaker*>(pCheckButtonMaker); + }; +protected: + virtual Control* Make(_UiBuilderControl* pControl) + { + bool isText = false; + bool isRadioStyle = false; + result r = E_SYSTEM; + _UiBuilderControlLayout* pControlProperty = null; + CheckButton* pCheck = null; + BackgroundStyle backgroundStyle = BACKGROUND_STYLE_DEFAULT; + FloatRectangle rect; + + Tizen::Base::String elementString; + String checkText; + HorizontalAlignment horizontalAlignment; + VerticalAlignment verticalAlignment; + GroupStyle groupStyle = GROUP_STYLE_NONE; + bool showTitle = false; + Color color; + int opacity = 0; + + GetProperty(pControl, &pControlProperty); + if (pControlProperty == null) + { + return null; + } + + pCheck = new (std::nothrow) CheckButton(); + rect = pControlProperty->GetRectF(); + + Tizen::Base::String styleString; + styleString = pControlProperty->GetStyle(); + + //Construct + if (pControl->GetElement("text", elementString)) + { + isText = true; + checkText = elementString; + } + + if (pControl->GetElement("backgroundStyle", elementString) || pControl->GetElement("BackgroundStyle", elementString)) + { + if (elementString.Equals(L"BACKGROUND_STYLE_NONE", false)) + { + backgroundStyle = BACKGROUND_STYLE_NONE; + } + } + + if (pControl->GetElement("showtitleText", elementString) || pControl->GetElement("bShowtitleText", elementString)) + { + if (elementString.Equals(L"true", false)) + { + showTitle = true; + } + } + + if (pControl->GetElement("groupStyle", elementString) || pControl->GetElement("GroupStyle", elementString)) + { + if (elementString.Equals(L"GROUP_STYLE_NONE", false)) + { + groupStyle = GROUP_STYLE_NONE; + } + + if (elementString.Equals(L"GROUP_STYLE_SINGLE", false)) + { + groupStyle = GROUP_STYLE_SINGLE; + } + + if (elementString.Equals(L"GROUP_STYLE_TOP", false)) + { + groupStyle = GROUP_STYLE_TOP; + } + + if (elementString.Equals(L"GROUP_STYLE_MIDDLE", false)) + { + groupStyle = GROUP_STYLE_MIDDLE; + } + + if (elementString.Equals(L"GROUP_STYLE_BOTTOM", false)) + { + groupStyle = GROUP_STYLE_BOTTOM; + } + } + + if (styleString.Equals(L"CHECK_BUTTON_STYLE_ONOFF", false)) + { + r = pCheck->Construct(rect, CHECK_BUTTON_STYLE_ONOFF, backgroundStyle, showTitle, checkText, groupStyle); + } + else if (styleString.Equals(L"CHECK_BUTTON_STYLE_ONOFF_WITH_DIVIDER", false)) + { + r = pCheck->Construct(rect, CHECK_BUTTON_STYLE_ONOFF_WITH_DIVIDER, backgroundStyle, showTitle, checkText, groupStyle); + } + else if (styleString.Equals(L"CHECK_BUTTON_STYLE_MARK_WITH_DIVIDER", false)) + { + r = pCheck->Construct(rect, CHECK_BUTTON_STYLE_MARK_WITH_DIVIDER, backgroundStyle, showTitle, checkText, groupStyle); + } + else if (styleString.Equals(L"CHECK_BUTTON_STYLE_RADIO_WITH_DIVIDER", false)) + { + r = pCheck->Construct(rect, CHECK_BUTTON_STYLE_RADIO_WITH_DIVIDER, backgroundStyle, showTitle, checkText, groupStyle); + isRadioStyle = true; + } + else if (styleString.Equals(L"CHECK_BUTTON_STYLE_RADIO", false)) + { + r = pCheck->Construct(rect, CHECK_BUTTON_STYLE_RADIO, backgroundStyle, showTitle, checkText, groupStyle); + isRadioStyle = true; + } + else if (styleString.Equals(L"CHECK_BUTTON_STYLE_ONOFF_SLIDING", false)) + { + r = pCheck->Construct(rect, CHECK_BUTTON_STYLE_ONOFF_SLIDING, backgroundStyle, showTitle, checkText, groupStyle); + } + else if (styleString.Equals(L"CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON", false)) + { + r = pCheck->Construct(rect, CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON, backgroundStyle, showTitle, checkText, groupStyle); + } + else if (styleString.Equals(L"CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON", false)) + { + r = pCheck->Construct(rect, CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON, backgroundStyle, showTitle, checkText, groupStyle); + isRadioStyle = true; + } + else if (styleString.Equals(L"CHECK_BUTTON_STYLE_ONOFF_SLIDING_WITH_DIVIDER", false)) + { + r = pCheck->Construct(rect, CHECK_BUTTON_STYLE_ONOFF_SLIDING_WITH_DIVIDER, backgroundStyle, showTitle, checkText, groupStyle); + } + else + { + r = pCheck->Construct(rect, CHECK_BUTTON_STYLE_MARK, backgroundStyle, showTitle, checkText, groupStyle); + } + + if (r != E_SUCCESS) + { + delete pCheck; + return null; + } + + if (showTitle) + { + if (pControl->GetElement("titleText", elementString)) + { + pCheck->SetTitleText(elementString); + } + + if (pControl->GetElement("colorOfTitleText", elementString)) + { + ConvertStringToColor(elementString, color); + pCheck->SetTitleTextColor(color); + } + + if (pControl->GetElement("pressedTitleTextColor", elementString)) + { + ConvertStringToColor(elementString, color); + pCheck->SetPressedTitleTextColor(color); + } + + if (pControl->GetElement("disabledTitleTextColor", elementString)) + { + ConvertStringToColor(elementString, color); + pCheck->SetDisabledTitleTextColor(color); + } + + if (pControl->GetElement("highlightedTitleTextColor", elementString)) + { + ConvertStringToColor(elementString, color); + pCheck->SetHighlightedTitleTextColor(color); + } + } + + if (isText) + { + if (pControl->GetElement("colorOfText", elementString)) + { + ConvertStringToColor(elementString, color); + pCheck->SetTextColor(color); + } + + if (pControl->GetElement("pressedTextColor", elementString)) + { + ConvertStringToColor(elementString, color); + pCheck->SetPressedTextColor(color); + } + + if (pControl->GetElement("disabledTextColor", elementString)) + { + ConvertStringToColor(elementString, color); + pCheck->SetDisabledTextColor(color); + } + + if (pControl->GetElement("highlightedTextColor", elementString)) + { + ConvertStringToColor(elementString, color); + pCheck->SetHighlightedTextColor(color); + } + } + + if (isRadioStyle && pControl->GetElement("GroupID", elementString)) + { + RadioGroup* pGroup = (RadioGroup*) ((GetContainer())->GetControl(elementString, true)); + + if (pGroup == null) + { + pGroup = new (std::nothrow) RadioGroup(); + r = pGroup->Construct(); + + if (r != E_SUCCESS) + { + delete pCheck; + delete pGroup; + return null; + } + pGroup->SetName(elementString); + GetContainer()->AddControl(*pGroup); + + r = pGroup->Add(*pCheck); + } + else + { + r = pGroup->Add(*pCheck); + } + } + + if (pControl->GetElement("horizontalAlign", elementString) || pControl->GetElement("hAlign", elementString)) + { + if (ConvertHAlignToHorizontalAlignment(elementString, horizontalAlignment)) + { + pCheck->SetTextHorizontalAlignment(horizontalAlignment); + } + } + + if (pControl->GetElement("verticalAlign", elementString) || pControl->GetElement("vAlign", elementString)) + { + if (ConvertVAlignToVerticalAlignment(elementString, verticalAlignment)) + { + pCheck->SetTextVerticalAlignment(verticalAlignment); + } + } + + if (pControl->GetElement("normalColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + + if (pControl->GetElement("normalColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + pCheck->SetColor(CHECK_BUTTON_STATUS_NORMAL, color); + } + + if (pControl->GetElement("pressedColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + + if (pControl->GetElement("pressedColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + pCheck->SetColor(CHECK_BUTTON_STATUS_PRESSED, color); + } + + if (pControl->GetElement("disabledColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + + if (pControl->GetElement("disabledColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + pCheck->SetColor(CHECK_BUTTON_STATUS_DISABLED, color); + } + + if (pControl->GetElement("highlightedColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + + if (pControl->GetElement("highlightedColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + pCheck->SetColor(CHECK_BUTTON_STATUS_HIGHLIGHTED, color); + } + if (pControl->GetElement(L"accessibilityHint1", elementString)) + { + AccessibilityContainer* pContainer = pCheck->GetAccessibilityContainer(); + if (pContainer) + { + AccessibilityElement* pElement = pContainer->GetElement(L"CheckButtonText"); + if (pElement) + { + pElement->SetHint(elementString); + } + } + } + if (pControl->GetElement(L"accessibilityHint2", elementString)) + { + AccessibilityContainer* pContainer = pCheck->GetAccessibilityContainer(); + if (pContainer) + { + AccessibilityElement* pElement = pContainer->GetElement(L"MoreButtonText"); + if (pElement) + { + pElement->SetHint(elementString); + } + } + } +#if 0 + //-------safety for Minimum size------------------- + tempRect = (pControl->GetAttribute(UIBUILDER_ATTRIBUTE_PORTRAIT))->GetRectF(); + if ((pStyleString != null) && + ((strcmp((const char*)pStyleString,"CHECK_BUTTON_STYLE_ONOFF_WITH_DIVIDER") == 0) + || (strcmp((const char*)pStyleString,"CHECK_BUTTON_STYLE_ONOFF_WITH_DIVIDER") == 0) + || (strcmp((const char*)pStyleString,"CHECK_BUTTON_STYLE_RADIO_WITH_DIVIDER") == 0))) + { + if (tempRect.w < __BaseProperty(PROPERTY_CHECKBUTTON_MIN_WIDTH_WITH_DIVIDER)) + { + tempRect.w = __BaseProperty(PROPERTY_CHECKBUTTON_MIN_WIDTH_WITH_DIVIDER); + } + } + else if ((pStyleString != null) && + ((strcmp((const char*)pStyleString,"CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON") == 0) + || (strcmp((const char*)pStyleString,"CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON") == 0))) + { + if (tempRect.w < __BaseProperty(PROPERTY_CHECKBUTTON_MIN_WIDTH_WITH_DETAILED)) + { + tempRect.w = __BaseProperty(PROPERTY_CHECKBUTTON_MIN_WIDTH_WITH_DETAILED); + } + } + else if ((pStyleString != null) && + (strcmp((const char*)pStyleString,"CHECK_BUTTON_STYLE_ONOFF_SLIDING") == 0)) + { + if (tempRect.w < __BaseProperty(PROPERTY_CHECKBUTTON_MIN_WIDTH_ONOFF_SLIDING)) + { + tempRect.w = __BaseProperty(PROPERTY_CHECKBUTTON_MIN_WIDTH_ONOFF_SLIDING); + } + } + else + { + if (showTitle) + { + if (tempRect.w < __BaseProperty(PROPERTY_CHECKBUTTON_MIN_WIDTH_WITH_TITLE)) + { + tempRect.w = __BaseProperty(PROPERTY_CHECKBUTTON_MIN_WIDTH_WITH_TITLE); + } + } + else + { + if (tempRect.w < __BaseProperty(PROPERTY_CHECKBUTTON_MIN_WIDTH)) + { + tempRect.w = __BaseProperty(PROPERTY_CHECKBUTTON_MIN_WIDTH); + } + } + } + + if (showTitle) + { + if (tempRect.h < __BaseProperty(PROPERTY_CHECKBUTTON_MIN_HEIGHT_WITH_TITLE)) + { + tempRect.h = __BaseProperty(PROPERTY_CHECKBUTTON_MIN_HEIGHT_WITH_TITLE); + } + } + else // no title + { + if (tempRect.h < __BaseProperty(PROPERTY_CHECKBUTTON_MIN_HEIGHT)) + { + tempRect.h = __BaseProperty(PROPERTY_CHECKBUTTON_MIN_HEIGHT); + } + } + + (pControl->GetAttribute(UIBUILDER_ATTRIBUTE_PORTRAIT))->SetRect(tempRect.x,tempRect.y,tempRect.w,tempRect.h); + + tempRect = (pControl->GetAttribute(UIBUILDER_ATTRIBUTE_LANDSCAPE))->GetRectF(); + if ((pStyleString != null) && + ((strcmp((const char*)pStyleString,"CHECK_BUTTON_STYLE_ONOFF_WITH_DIVIDER") == 0) + || (strcmp((const char*)pStyleString,"CHECK_BUTTON_STYLE_ONOFF_WITH_DIVIDER") == 0) + || (strcmp((const char*)pStyleString,"CHECK_BUTTON_STYLE_RADIO_WITH_DIVIDER") == 0))) + { + if (tempRect.w < __BaseProperty(PROPERTY_CHECKBUTTON_MIN_WIDTH_WITH_DIVIDER)) + { + tempRect.w = __BaseProperty(PROPERTY_CHECKBUTTON_MIN_WIDTH_WITH_DIVIDER); + } + } + else if ((pStyleString != null) && + ((strcmp((const char*)pStyleString,"CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON") == 0) + || (strcmp((const char*)pStyleString,"CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON") == 0))) + { + if (tempRect.w < __BaseProperty(PROPERTY_CHECKBUTTON_MIN_WIDTH_WITH_DETAILED)) + { + tempRect.w = __BaseProperty(PROPERTY_CHECKBUTTON_MIN_WIDTH_WITH_DETAILED); + } + } + else if ((pStyleString != null) && + (strcmp((const char*)pStyleString,"CHECK_BUTTON_STYLE_ONOFF_SLIDING") == 0)) + { + if (tempRect.w < __BaseProperty(PROPERTY_CHECKBUTTON_MIN_WIDTH_ONOFF_SLIDING)) + { + tempRect.w = __BaseProperty(PROPERTY_CHECKBUTTON_MIN_WIDTH_ONOFF_SLIDING); + } + } + else + { + if (showTitle) + { + if (tempRect.w < __BaseProperty(PROPERTY_CHECKBUTTON_MIN_WIDTH_WITH_TITLE)) + { + tempRect.w = __BaseProperty(PROPERTY_CHECKBUTTON_MIN_WIDTH_WITH_TITLE); + } + } + else + { + if (tempRect.w < __BaseProperty(PROPERTY_CHECKBUTTON_MIN_WIDTH)) + { + tempRect.w = __BaseProperty(PROPERTY_CHECKBUTTON_MIN_WIDTH); + } + } + } + + if (showTitle) + { + if (tempRect.h < __BaseProperty(PROPERTY_CHECKBUTTON_MIN_HEIGHT_WITH_TITLE)) + { + tempRect.h = __BaseProperty(PROPERTY_CHECKBUTTON_MIN_HEIGHT_WITH_TITLE); + } + } + else // no title + { + if (tempRect.h < __BaseProperty(PROPERTY_CHECKBUTTON_MIN_HEIGHT)) + { + tempRect.h = __BaseProperty(PROPERTY_CHECKBUTTON_MIN_HEIGHT); + } + } + + (pControl->GetAttribute(UIBUILDER_ATTRIBUTE_LANDSCAPE))->SetRect(tempRect.x,tempRect.y,tempRect.w,tempRect.h); + + //--------end safety code------------------------ + +#endif + return pCheck; + } + +private: +}; // _CheckButtonMaker + +_CheckButtonRegister::_CheckButtonRegister() +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->RegisterControl(L"CheckButton", _CheckButtonMaker::GetInstance); +} +_CheckButtonRegister::~_CheckButtonRegister() +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->UnregisterControl(L"CheckButton"); +} +static _CheckButtonRegister CheckButtonRegisterToUiBuilder; +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_CheckButtonModel.cpp b/src/ui/controls/FUiCtrl_CheckButtonModel.cpp new file mode 100644 index 0000000..6d78424 --- /dev/null +++ b/src/ui/controls/FUiCtrl_CheckButtonModel.cpp @@ -0,0 +1,48 @@ +// +// 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_CheckButtonModel.cpp + * @brief This is the implementation file for the _CheckButtonModel class. + */ + +#include +#include +#include "FUiCtrl_CheckButtonModel.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + + +_CheckButtonModel::_CheckButtonModel(void) +{ + +} + +_CheckButtonModel::~_CheckButtonModel(void) +{ + +} + +result +_CheckButtonModel::Construct(void) +{ + result r = E_SUCCESS; + + return r; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_CheckButtonPresenter.cpp b/src/ui/controls/FUiCtrl_CheckButtonPresenter.cpp new file mode 100644 index 0000000..c14c2bd --- /dev/null +++ b/src/ui/controls/FUiCtrl_CheckButtonPresenter.cpp @@ -0,0 +1,2942 @@ +// +// 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_CheckButtonPresenter.cpp + * @brief This is the implementation file for the _CheckButtonPresenter class. + */ + +#include +#include +#include +#include +#include +#include +#include +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_ResourceManager.h" +#include "FUi_UiTouchEvent.h" +#include "FUiAnim_VisualElement.h" +#include "FUiCtrl_CheckButtonPresenter.h" +#include "FUiCtrl_CheckButtonModel.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Graphics::_Text; +using namespace Tizen::Base::Runtime; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_CheckButtonPresenter::_CheckButtonPresenter(void) + : __pCheckButton(null) + , __pCheckButtonModel(null) + , __previousEnabledState(false) + , __touchMoveHandled(false) + , __pTextFont(null) + , __pTitleTextFont(null) + , __pTextObject(null) + , __pTitleTextObject(null) + , __titleTextBounds(FloatRectangle()) + , __textBounds(FloatRectangle()) + , __defaultButtonBounds(FloatRectangle()) + , __onOffSlidingButtonBounds(FloatRectangle()) + , __detailedButtonBounds(FloatRectangle()) + , __fontStyle(0) + , __fontSize(0.0f) + , __pCheckAnimationTimer(null) + , __ratio(10) + , __onOffHandlerPosition(0.0f) + , __onOffHandlerPressed(false) + , __onOffHandlerMoved(false) + , __highlightedIndex(0) + , __detailedPressed(false) +{ + +} + +_CheckButtonPresenter::~_CheckButtonPresenter(void) +{ + if (__pCheckButtonModel) + { + delete __pCheckButtonModel; + __pCheckButtonModel = null; + } + + if (__pTextObject) + { + delete __pTextObject; + __pTextObject = null; + } + + if (__pTitleTextObject) + { + delete __pTitleTextObject; + __pTitleTextObject = null; + } + + if (__pCheckAnimationTimer) + { + delete __pCheckAnimationTimer; + __pCheckAnimationTimer = null; + } +} + +result +_CheckButtonPresenter::Construct(const _CheckButton& checkButton) +{ + result r = E_SUCCESS; + + __pCheckButton = const_cast <_CheckButton*>(&checkButton); + + __fontStyle = FONT_STYLE_PLAIN; + + __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 is insufficient."); + + __pTitleTextObject = new (std::nothrow) TextObject(); + SysTryCatch(NID_UI_CTRL, __pTitleTextObject != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + + __pTextObject->Construct(); + __pTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_WORD); + __pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); + + __pTitleTextObject->Construct(); + __pTitleTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_WORD); + __pTitleTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); + + CalculateTextBounds(); + CalculateTitleTextBounds(); + CalculateButtonBounds(); + + return E_SUCCESS; + +CATCH: + + delete __pTextObject; + __pTextObject = null; + + delete __pTitleTextObject; + __pTitleTextObject = null; + + return r; +} + +result +_CheckButtonPresenter::Install(void) +{ + result r = E_SUCCESS; + + _CheckButtonModel* pModel = new (std::nothrow) _CheckButtonModel(); + SysTryReturn(NID_UI_CTRL, pModel, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + + r = SetModel(*pModel); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + r = pModel->Construct(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + return E_SUCCESS; + +CATCH: + delete pModel; + return r; +} + +result +_CheckButtonPresenter::SetModel(const _CheckButtonModel& checkButtonModel) +{ + __pCheckButtonModel = const_cast <_CheckButtonModel*>(&checkButtonModel); + + return E_SUCCESS; +} + +void +_CheckButtonPresenter::OnFontChanged(Font* pFont) +{ + __pTextFont = pFont; + __pTitleTextFont = pFont; + + return; +} + +void +_CheckButtonPresenter::OnFontInfoRequested(unsigned long& style, int& size) +{ + style = __fontStyle; + size = _CoordinateSystemUtils::ConvertToInteger(__fontSize); + + return; +} + +void +_CheckButtonPresenter::OnFontInfoRequested(unsigned long& style, float& size) +{ + style = __fontStyle; + size = __fontSize; + + return; +} + +void +_CheckButtonPresenter::SetFontInfo(unsigned long style, float size) +{ + __fontStyle = style; + __fontSize = size; + + return; +} + +void +_CheckButtonPresenter::Draw(void) +{ + DrawBackground(); + DrawCheckBitmap(); + DrawText(); + + return; +} + +void +_CheckButtonPresenter::DrawBackground(void) +{ + Canvas* pCanvas = __pCheckButton->GetCanvasN(); + if (pCanvas == null) + { + SysLog(NID_UI_CTRL, "Cannot get a canvas."); + + return; + } + + Bitmap* pBgBitmap = null; + Bitmap* pReColorBgBitmap = null; + + Bitmap* pHighlightedBgBitmap = null; + Bitmap* pHighlightedReColorBgBitmap = null; + + FloatDimension minDimension(0.0f, 0.0f); + FloatDimension minDimensionWithAnnex(0.0f, 0.0f); + + GET_DIMENSION_CONFIG(CHECKBUTTON::MIN_DIMENSION, __pCheckButton->GetOrientation(), minDimension); + GET_DIMENSION_CONFIG(CHECKBUTTON::MIN_DIMENSION_WITH_ANNEX, __pCheckButton->GetOrientation(), minDimensionWithAnnex); + + FloatRectangle bounds(0.0f, 0.0f, __pCheckButton->GetBoundsF().width, __pCheckButton->GetBoundsF().height); + + _CheckButtonStatus checkStatus = __pCheckButton->GetCheckButtonStatus(); + BackgroundStyle backgroundStyle = __pCheckButton->GetBackgroundStyle(); + CheckButtonStyle checkStyle = __pCheckButton->GetCheckButtonStyle(); + + 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) + { + bounds.width = minDimension.width; + } + + if (bounds.height < minDimension.height) + { + bounds.height = minDimension.height; + } + } + else + { + if (bounds.width < minDimensionWithAnnex.width) + { + bounds.width = minDimensionWithAnnex.width; + } + + if (bounds.height < minDimensionWithAnnex.height) + { + bounds.height = minDimensionWithAnnex.height; + } + } + + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + + if (checkStatus == _CHECK_BUTTON_STATUS_NORMAL) + { + if (backgroundStyle == BACKGROUND_STYLE_NONE) + { + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + } + else + { + pBgBitmap = __pCheckButton->GetBackgroundBitmap(__pCheckButton->GetGroupStyle(), _CHECK_BUTTON_STATUS_NORMAL); + + if (pBgBitmap && _BitmapImpl::CheckNinePatchedBitmapStrictly(*pBgBitmap)) + { + pReColorBgBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), + __pCheckButton->GetColor(_CHECK_BUTTON_STATUS_NORMAL)); + if (pReColorBgBitmap) + { + pCanvas->DrawNinePatchedBitmap(bounds, *pReColorBgBitmap); + } + + bool themeBgBitmap = false; + + if (__pCheckButton->GetGroupStyle() == GROUP_STYLE_SINGLE) + { + themeBgBitmap = IS_CUSTOM_BITMAP(PANEL::GROUPED_SINGLE_BG_NORMAL); + } + else if (__pCheckButton->GetGroupStyle() == GROUP_STYLE_TOP) + { + themeBgBitmap = IS_CUSTOM_BITMAP(PANEL::GROUPED_TOP_BG_NORMAL); + } + else if (__pCheckButton->GetGroupStyle() == GROUP_STYLE_MIDDLE) + { + themeBgBitmap = IS_CUSTOM_BITMAP(PANEL::GROUPED_MIDDLE_BG_NORMAL); + } + else if (__pCheckButton->GetGroupStyle() == GROUP_STYLE_BOTTOM) + { + themeBgBitmap = IS_CUSTOM_BITMAP(PANEL::GROUPED_BOTTOM_BG_NORMAL); + } + + if (themeBgBitmap == false) + { + Bitmap* pBgNormalEffectBitmap = __pCheckButton->GetBackgroundNormalEffectBitmap(__pCheckButton->GetGroupStyle()); + + if (pBgNormalEffectBitmap) + { + pCanvas->DrawNinePatchedBitmap(bounds, *pBgNormalEffectBitmap); + } + } + } + else + { + if (pBgBitmap) + { + pCanvas->DrawBitmap(FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height), *pBgBitmap); + } + } + } + } + else if (checkStatus == _CHECK_BUTTON_STATUS_DISABLED) + { + if (backgroundStyle == BACKGROUND_STYLE_NONE) + { + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + } + else + { + pBgBitmap = __pCheckButton->GetBackgroundBitmap(__pCheckButton->GetGroupStyle(), _CHECK_BUTTON_STATUS_DISABLED); + + if (pBgBitmap && _BitmapImpl::CheckNinePatchedBitmapStrictly(*pBgBitmap)) + { + pReColorBgBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), + __pCheckButton->GetColor(_CHECK_BUTTON_STATUS_DISABLED)); + if (pReColorBgBitmap) + { + pCanvas->DrawNinePatchedBitmap(bounds, *pReColorBgBitmap); + } + + bool themeBgBitmap = false; + + if (__pCheckButton->GetGroupStyle() == GROUP_STYLE_SINGLE) + { + themeBgBitmap = IS_CUSTOM_BITMAP(PANEL::GROUPED_SINGLE_BG_DISABLED); + } + else if (__pCheckButton->GetGroupStyle() == GROUP_STYLE_TOP) + { + themeBgBitmap = IS_CUSTOM_BITMAP(PANEL::GROUPED_TOP_BG_DISABLED); + } + else if (__pCheckButton->GetGroupStyle() == GROUP_STYLE_MIDDLE) + { + themeBgBitmap = IS_CUSTOM_BITMAP(PANEL::GROUPED_MIDDLE_BG_DISABLED); + } + else if (__pCheckButton->GetGroupStyle() == GROUP_STYLE_BOTTOM) + { + themeBgBitmap = IS_CUSTOM_BITMAP(PANEL::GROUPED_BOTTOM_BG_DISABLED); + } + + if (themeBgBitmap == false) + { + Bitmap* pBgNormalEffectBitmap = __pCheckButton->GetBackgroundNormalEffectBitmap(__pCheckButton->GetGroupStyle()); + + if (pBgNormalEffectBitmap) + { + pCanvas->DrawNinePatchedBitmap(bounds, *pBgNormalEffectBitmap); + } + } + } + else + { + if (pBgBitmap) + { + pCanvas->DrawBitmap(FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height), *pBgBitmap); + } + } + } + } + else if (checkStatus == _CHECK_BUTTON_STATUS_PRESSED) + { + if (backgroundStyle == BACKGROUND_STYLE_NONE) + { + pCanvas->SetBackgroundColor(__pCheckButton->GetColor(_CHECK_BUTTON_STATUS_PRESSED)); + pCanvas->Clear(); + } + else + { + pBgBitmap = __pCheckButton->GetBackgroundBitmap(__pCheckButton->GetGroupStyle(), _CHECK_BUTTON_STATUS_PRESSED); + + if (pBgBitmap && _BitmapImpl::CheckNinePatchedBitmapStrictly(*pBgBitmap)) + { + pReColorBgBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), + __pCheckButton->GetColor(_CHECK_BUTTON_STATUS_PRESSED)); + if (pReColorBgBitmap) + { + pCanvas->DrawNinePatchedBitmap(bounds, *pReColorBgBitmap); + } + + bool themeBgBitmap = false; + + if (__pCheckButton->GetGroupStyle() == GROUP_STYLE_SINGLE) + { + themeBgBitmap = IS_CUSTOM_BITMAP(PANEL::GROUPED_SINGLE_BG_PRESSED); + } + else if (__pCheckButton->GetGroupStyle() == GROUP_STYLE_TOP) + { + themeBgBitmap = IS_CUSTOM_BITMAP(PANEL::GROUPED_TOP_BG_PRESSED); + } + else if (__pCheckButton->GetGroupStyle() == GROUP_STYLE_MIDDLE) + { + themeBgBitmap = IS_CUSTOM_BITMAP(PANEL::GROUPED_MIDDLE_BG_PRESSED); + } + else if (__pCheckButton->GetGroupStyle() == GROUP_STYLE_BOTTOM) + { + themeBgBitmap = IS_CUSTOM_BITMAP(PANEL::GROUPED_BOTTOM_BG_PRESSED); + } + + if (themeBgBitmap == false) + { + Bitmap* pBgPressedEffectBitmap = __pCheckButton->GetBackgroundPressedEffectBitmap(__pCheckButton->GetGroupStyle()); + + if (pBgPressedEffectBitmap) + { + pCanvas->DrawNinePatchedBitmap(bounds, *pBgPressedEffectBitmap); + } + } + } + else + { + if (pBgBitmap) + { + pCanvas->DrawBitmap(FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height), *pBgBitmap); + } + } + } + } + else if (checkStatus == _CHECK_BUTTON_STATUS_HIGHLIGHTED) + { + if (backgroundStyle == BACKGROUND_STYLE_NONE) + { + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + + pHighlightedBgBitmap = __pCheckButton->GetBackgroundBitmap(__pCheckButton->GetGroupStyle(), _CHECK_BUTTON_STATUS_HIGHLIGHTED); + + pHighlightedReColorBgBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pHighlightedBgBitmap, + Color::GetColor(COLOR_ID_MAGENTA), __pCheckButton->GetColor(_CHECK_BUTTON_STATUS_HIGHLIGHTED)); + + if (pHighlightedReColorBgBitmap && __highlightedIndex == 0) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pHighlightedReColorBgBitmap)) + { + pCanvas->DrawNinePatchedBitmap(bounds, *pHighlightedReColorBgBitmap); + } + else + { + pCanvas->DrawBitmap(bounds, *pHighlightedReColorBgBitmap, + FloatRectangle(0.0f, 0.0f, pHighlightedReColorBgBitmap->GetWidthF(), pHighlightedReColorBgBitmap->GetHeightF())); + } + } + } + else + { + pBgBitmap = __pCheckButton->GetBackgroundBitmap(__pCheckButton->GetGroupStyle(), _CHECK_BUTTON_STATUS_NORMAL); + + if (pBgBitmap && _BitmapImpl::CheckNinePatchedBitmapStrictly(*pBgBitmap)) + { + pReColorBgBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), + __pCheckButton->GetColor(_CHECK_BUTTON_STATUS_NORMAL)); + if (pReColorBgBitmap) + { + pCanvas->DrawNinePatchedBitmap(bounds, *pReColorBgBitmap); + } + + bool themeBgBitmap = false; + + if (__pCheckButton->GetGroupStyle() == GROUP_STYLE_SINGLE) + { + themeBgBitmap = IS_CUSTOM_BITMAP(PANEL::GROUPED_SINGLE_BG_HIGHLIGHTED); + } + else if (__pCheckButton->GetGroupStyle() == GROUP_STYLE_TOP) + { + themeBgBitmap = IS_CUSTOM_BITMAP(PANEL::GROUPED_TOP_BG_HIGHLIGHTED); + } + else if (__pCheckButton->GetGroupStyle() == GROUP_STYLE_MIDDLE) + { + themeBgBitmap = IS_CUSTOM_BITMAP(PANEL::GROUPED_MIDDLE_BG_HIGHLIGHTED); + } + else if (__pCheckButton->GetGroupStyle() == GROUP_STYLE_BOTTOM) + { + themeBgBitmap = IS_CUSTOM_BITMAP(PANEL::GROUPED_BOTTOM_BG_HIGHLIGHTED); + } + + if (themeBgBitmap == false) + { + Bitmap* pBgPressedEffectBitmap = __pCheckButton->GetBackgroundPressedEffectBitmap(__pCheckButton->GetGroupStyle()); + + if (pBgPressedEffectBitmap) + { + pCanvas->DrawNinePatchedBitmap(bounds, *pBgPressedEffectBitmap); + } + } + } + else + { + if (pBgBitmap) + { + pCanvas->DrawBitmap(FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height), *pBgBitmap); + } + } + + pHighlightedBgBitmap = __pCheckButton->GetBackgroundBitmap(__pCheckButton->GetGroupStyle(), _CHECK_BUTTON_STATUS_HIGHLIGHTED); + + pHighlightedReColorBgBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pHighlightedBgBitmap, + Color::GetColor(COLOR_ID_MAGENTA), __pCheckButton->GetColor(_CHECK_BUTTON_STATUS_HIGHLIGHTED)); + + if (pHighlightedReColorBgBitmap && __highlightedIndex == 0) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pHighlightedReColorBgBitmap)) + { + pCanvas->DrawNinePatchedBitmap(bounds, *pHighlightedReColorBgBitmap); + } + else + { + pCanvas->DrawBitmap(bounds, *pHighlightedReColorBgBitmap, + FloatRectangle(0.0f, 0.0f, pHighlightedReColorBgBitmap->GetWidthF(), pHighlightedReColorBgBitmap->GetHeightF())); + } + } + } + } + else + { + if (backgroundStyle == BACKGROUND_STYLE_NONE) + { + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + } + else + { + pBgBitmap = __pCheckButton->GetBackgroundBitmap(__pCheckButton->GetGroupStyle(), __pCheckButton->GetCheckButtonStatus()); + + if (pBgBitmap && _BitmapImpl::CheckNinePatchedBitmapStrictly(*pBgBitmap)) + { + pReColorBgBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), + __pCheckButton->GetColor(_CHECK_BUTTON_STATUS_SELECTED)); + if (pReColorBgBitmap) + { + pCanvas->DrawNinePatchedBitmap(bounds, *pReColorBgBitmap); + } + + bool themeBgBitmap = false; + + if (__pCheckButton->GetGroupStyle() == GROUP_STYLE_SINGLE) + { + themeBgBitmap = IS_CUSTOM_BITMAP(PANEL::GROUPED_SINGLE_BG_SELECTED); + } + else if (__pCheckButton->GetGroupStyle() == GROUP_STYLE_TOP) + { + themeBgBitmap = IS_CUSTOM_BITMAP(PANEL::GROUPED_TOP_BG_SELECTED); + } + else if (__pCheckButton->GetGroupStyle() == GROUP_STYLE_MIDDLE) + { + themeBgBitmap = IS_CUSTOM_BITMAP(PANEL::GROUPED_MIDDLE_BG_SELECTED); + } + else if (__pCheckButton->GetGroupStyle() == GROUP_STYLE_BOTTOM) + { + themeBgBitmap = IS_CUSTOM_BITMAP(PANEL::GROUPED_BOTTOM_BG_SELECTED); + } + + if (themeBgBitmap == false) + { + Bitmap* pBgNormalEffectBitmap = __pCheckButton->GetBackgroundNormalEffectBitmap(__pCheckButton->GetGroupStyle()); + + if (pBgNormalEffectBitmap) + { + pCanvas->DrawNinePatchedBitmap(bounds, *pBgNormalEffectBitmap); + } + } + } + else + { + if (pBgBitmap) + { + pCanvas->DrawBitmap(FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height), *pBgBitmap); + } + } + } + } + + delete pCanvas; + delete pReColorBgBitmap; + delete pHighlightedReColorBgBitmap; + + return; +} + +void +_CheckButtonPresenter::DrawCheckBitmap(void) +{ + Canvas* pCanvas = __pCheckButton->GetCanvasN(); + if (pCanvas == null) + { + SysLog(NID_UI_CTRL, "Cannot get a canvas."); + + return; + } + + 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); + + _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) + { + Bitmap* pMarkBgNormalBitmap = __pCheckButton->GetMarkBgBitmap(_CHECK_BUTTON_STATUS_NORMAL); + + if (pMarkBgNormalBitmap) + { + pCanvas->DrawBitmap(FloatPoint(__defaultButtonBounds.x, __defaultButtonBounds.y), *pMarkBgNormalBitmap); + } + + if (checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON) + { + Bitmap* pCircleBitmap = null; + Bitmap* pDetailedRightBitmap = null; + Bitmap* pCircleEffectBitmap = null; + Bitmap* pDetailedRightEffectBitmap = null; + + if (__detailedPressed == true) + { + pCircleBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_PRESSED); + pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_PRESSED); + + pCircleEffectBitmap = __pCheckButton->GetCirclePressedEffectBitmap(); + pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightPressedEffectBitmap(); + } + else + { + pCircleBitmap = __pCheckButton->GetCircleBitmap(checkStatus); + pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(checkStatus); + + pCircleEffectBitmap = __pCheckButton->GetCircleNormalEffectBitmap(); + pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightNormalEffectBitmap(); + } + + if (pCircleBitmap) + { + 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); + + if (themeBgBitmap == false) + { + if (pCircleEffectBitmap) + { + pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pCircleEffectBitmap); + } + } + + if (pDetailedRightBitmap) + { + 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), *pDetailedRightBitmap); + } + + themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_ICON_NORMAL); + + if (themeBgBitmap == false) + { + if (pDetailedRightEffectBitmap) + { + float arrowWidth = pDetailedRightEffectBitmap->GetWidthF(); + float arrowHeight = pDetailedRightEffectBitmap->GetHeightF(); + + pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x + (__detailedButtonBounds.width - arrowWidth) / 2.0f + , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pDetailedRightEffectBitmap); + } + } + } + } + else if (checkStatus == _CHECK_BUTTON_STATUS_DISABLED) + { + Bitmap* pMarkBgDisabledBitmap = __pCheckButton->GetMarkBgBitmap(_CHECK_BUTTON_STATUS_DISABLED); + + if (pMarkBgDisabledBitmap) + { + pCanvas->DrawBitmap(FloatPoint(__defaultButtonBounds.x, __defaultButtonBounds.y), *pMarkBgDisabledBitmap); + } + + if (checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON) + { + Bitmap* pCircleBitmap = __pCheckButton->GetCircleBitmap(checkStatus); + Bitmap* pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(checkStatus); + Bitmap* pCircleEffectBitmap = __pCheckButton->GetCircleNormalEffectBitmap(); + Bitmap* pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightNormalEffectBitmap(); + + if (pCircleBitmap) + { + 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); + + if (themeBgBitmap == false) + { + if (pCircleEffectBitmap) + { + pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pCircleEffectBitmap); + } + } + + if (pDetailedRightBitmap) + { + 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), *pDetailedRightBitmap); + } + + themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_ICON_DISABLED); + + if (themeBgBitmap == false) + { + if (pDetailedRightEffectBitmap) + { + float arrowWidth = pDetailedRightEffectBitmap->GetWidthF(); + float arrowHeight = pDetailedRightEffectBitmap->GetHeightF(); + + pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x + (__detailedButtonBounds.width - arrowWidth) / 2.0f + , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pDetailedRightEffectBitmap); + } + } + } + } + else if (checkStatus == _CHECK_BUTTON_STATUS_PRESSED) + { + Bitmap* pMarkBgPressedBitmap = __pCheckButton->GetMarkBgBitmap(_CHECK_BUTTON_STATUS_PRESSED); + + if (pMarkBgPressedBitmap) + { + pCanvas->DrawBitmap(FloatPoint(__defaultButtonBounds.x, __defaultButtonBounds.y), *pMarkBgPressedBitmap); + } + + if (checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON) + { + Bitmap* pCircleBitmap = null; + Bitmap* pDetailedRightBitmap = null; + Bitmap* pCircleEffectBitmap = null; + Bitmap* pDetailedRightEffectBitmap = null; + + if (__detailedPressed == true) + { + pCircleBitmap = __pCheckButton->GetCircleBitmap(checkStatus); + pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(checkStatus); + + pCircleEffectBitmap = __pCheckButton->GetCirclePressedEffectBitmap(); + pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightPressedEffectBitmap(); + } + else + { + pCircleBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_NORMAL); + pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_NORMAL); + + pCircleEffectBitmap = __pCheckButton->GetCircleNormalEffectBitmap(); + pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightNormalEffectBitmap(); + } + + if (pCircleBitmap) + { + 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); + + if (themeBgBitmap == false) + { + if (pCircleEffectBitmap) + { + pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pCircleEffectBitmap); + } + } + + if (pDetailedRightBitmap) + { + 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), *pDetailedRightBitmap); + } + + themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_ICON_PRESSED); + + if (themeBgBitmap == false) + { + if (pDetailedRightEffectBitmap) + { + float arrowWidth = pDetailedRightEffectBitmap->GetWidthF(); + float arrowHeight = pDetailedRightEffectBitmap->GetHeightF(); + + pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x + (__detailedButtonBounds.width - arrowWidth) / 2.0f + , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pDetailedRightEffectBitmap); + } + } + } + } + else if (checkStatus == _CHECK_BUTTON_STATUS_HIGHLIGHTED) + { + Bitmap* pMarkBgNormalBitmap = __pCheckButton->GetMarkBgBitmap(_CHECK_BUTTON_STATUS_NORMAL); + Bitmap* pMarkBgHighlightedBitmap = __pCheckButton->GetMarkBgBitmap(_CHECK_BUTTON_STATUS_HIGHLIGHTED); + + if (pMarkBgNormalBitmap) + { + pCanvas->DrawBitmap(FloatPoint(__defaultButtonBounds.x, __defaultButtonBounds.y), *pMarkBgNormalBitmap); + } + + if (pMarkBgHighlightedBitmap && __highlightedIndex == 1) + { + pCanvas->DrawBitmap(FloatPoint(__defaultButtonBounds.x, __defaultButtonBounds.y), *pMarkBgHighlightedBitmap); + } + + if (checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON) + { + Bitmap* pCircleHighlightedBitmap = __pCheckButton->GetCircleBitmap(checkStatus); + + Bitmap* pCircleBitmap = null; + Bitmap* pDetailedRightBitmap = null; + Bitmap* pCircleEffectBitmap = null; + Bitmap* pDetailedRightEffectBitmap = null; + + if (__detailedPressed == true) + { + pCircleBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_PRESSED); + pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_PRESSED); + + pCircleEffectBitmap = __pCheckButton->GetCirclePressedEffectBitmap(); + pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightPressedEffectBitmap(); + } + else + { + pCircleBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_NORMAL); + pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_NORMAL); + + pCircleEffectBitmap = __pCheckButton->GetCircleNormalEffectBitmap(); + pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightNormalEffectBitmap(); + } + + if (pCircleBitmap) + { + 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); + + if (themeBgBitmap == false) + { + if (pCircleEffectBitmap) + { + pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pCircleEffectBitmap); + } + } + + if (pDetailedRightBitmap) + { + 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), *pDetailedRightBitmap); + } + + themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_ICON_HIGHLIGHTED); + + if (themeBgBitmap == false) + { + if (pDetailedRightEffectBitmap) + { + float arrowWidth = pDetailedRightEffectBitmap->GetWidthF(); + float arrowHeight = pDetailedRightEffectBitmap->GetHeightF(); + + pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x + (__detailedButtonBounds.width - arrowWidth) / 2.0f + , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pDetailedRightEffectBitmap); + } + } + + if (pCircleHighlightedBitmap && __highlightedIndex == 2) + { + pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pCircleHighlightedBitmap); + } + } + } + else if (checkStatus == _CHECK_BUTTON_STATUS_SELECTED) + { + Bitmap* pMarkBgSelectedBitmap = __pCheckButton->GetMarkBgBitmap(_CHECK_BUTTON_STATUS_SELECTED); + + if (pMarkBgSelectedBitmap) + { + pCanvas->DrawBitmap(FloatPoint(__defaultButtonBounds.x, __defaultButtonBounds.y), *pMarkBgSelectedBitmap); + } + + if (checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON) + { + Bitmap* pCircleBitmap = null; + Bitmap* pDetailedRightBitmap = null; + Bitmap* pCircleEffectBitmap = null; + Bitmap* pDetailedRightEffectBitmap = null; + + if (__detailedPressed == true) + { + pCircleBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_PRESSED); + pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_PRESSED); + + pCircleEffectBitmap = __pCheckButton->GetCirclePressedEffectBitmap(); + pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightPressedEffectBitmap(); + } + else + { + pCircleBitmap = __pCheckButton->GetCircleBitmap(checkStatus); + pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(checkStatus); + + pCircleEffectBitmap = __pCheckButton->GetCircleNormalEffectBitmap(); + pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightNormalEffectBitmap(); + } + + if (pCircleBitmap) + { + 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); + + if (themeBgBitmap == false) + { + if (pCircleEffectBitmap) + { + pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pCircleEffectBitmap); + } + } + + if (pDetailedRightBitmap) + { + 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), *pDetailedRightBitmap); + } + + themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_ICON_SELECTED); + + if (themeBgBitmap == false) + { + if (pDetailedRightEffectBitmap) + { + float arrowWidth = pDetailedRightEffectBitmap->GetWidthF(); + float arrowHeight = pDetailedRightEffectBitmap->GetHeightF(); + + pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x + (__detailedButtonBounds.width - arrowWidth) / 2.0f + , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pDetailedRightEffectBitmap); + } + } + } + } + + DrawMarkAnimation(); + } + else if (checkStyle == CHECK_BUTTON_STYLE_RADIO || checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DIVIDER || checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON) + { + if (checkStatus == _CHECK_BUTTON_STATUS_NORMAL) + { + if (checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON) + { + Bitmap* pCircleBitmap = null; + Bitmap* pDetailedRightBitmap = null; + Bitmap* pCircleEffectBitmap = null; + Bitmap* pDetailedRightEffectBitmap = null; + + if (__detailedPressed == true) + { + pCircleBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_PRESSED); + pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_PRESSED); + + pCircleEffectBitmap = __pCheckButton->GetCirclePressedEffectBitmap(); + pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightPressedEffectBitmap(); + } + else + { + pCircleBitmap = __pCheckButton->GetCircleBitmap(checkStatus); + pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(checkStatus); + + pCircleEffectBitmap = __pCheckButton->GetCircleNormalEffectBitmap(); + pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightNormalEffectBitmap(); + } + + if (pCircleBitmap) + { + 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); + + if (themeBgBitmap == false) + { + if (pCircleEffectBitmap) + { + pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pCircleEffectBitmap); + } + } + + if (pDetailedRightBitmap) + { + 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), *pDetailedRightBitmap); + } + + themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_ICON_NORMAL); + + if (themeBgBitmap == false) + { + if (pDetailedRightEffectBitmap) + { + float arrowWidth = pDetailedRightEffectBitmap->GetWidthF(); + float arrowHeight = pDetailedRightEffectBitmap->GetHeightF(); + + pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x + (__detailedButtonBounds.width - arrowWidth) / 2.0f + , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pDetailedRightEffectBitmap); + } + } + } + } + else if (checkStatus == _CHECK_BUTTON_STATUS_DISABLED) + { + if (checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON) + { + Bitmap* pCircleBitmap = __pCheckButton->GetCircleBitmap(checkStatus); + Bitmap* pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(checkStatus); + Bitmap* pCircleEffectBitmap = __pCheckButton->GetCircleNormalEffectBitmap(); + Bitmap* pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightNormalEffectBitmap(); + + if (pCircleBitmap) + { + 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); + + if (themeBgBitmap == false) + { + if (pCircleEffectBitmap) + { + pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pCircleEffectBitmap); + } + } + + if (pDetailedRightBitmap) + { + 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), *pDetailedRightBitmap); + } + + themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_ICON_DISABLED); + + if (themeBgBitmap == false) + { + if (pDetailedRightEffectBitmap) + { + float arrowWidth = pDetailedRightEffectBitmap->GetWidthF(); + float arrowHeight = pDetailedRightEffectBitmap->GetHeightF(); + + pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x + (__detailedButtonBounds.width - arrowWidth) / 2.0f + , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pDetailedRightEffectBitmap); + } + } + } + } + else if (checkStatus == _CHECK_BUTTON_STATUS_PRESSED) + { + if (checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON) + { + Bitmap* pCircleBitmap = null; + Bitmap* pDetailedRightBitmap = null; + Bitmap* pCircleEffectBitmap = null; + Bitmap* pDetailedRightEffectBitmap = null; + + if (__detailedPressed == true) + { + pCircleBitmap = __pCheckButton->GetCircleBitmap(checkStatus); + pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(checkStatus); + + pCircleEffectBitmap = __pCheckButton->GetCirclePressedEffectBitmap(); + pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightPressedEffectBitmap(); + } + else + { + pCircleBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_NORMAL); + pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_NORMAL); + + pCircleEffectBitmap = __pCheckButton->GetCircleNormalEffectBitmap(); + pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightNormalEffectBitmap(); + } + + if (pCircleBitmap) + { + 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); + + if (themeBgBitmap == false) + { + if (pCircleEffectBitmap) + { + pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pCircleEffectBitmap); + } + } + + if (pDetailedRightBitmap) + { + 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), *pDetailedRightBitmap); + } + + themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_ICON_PRESSED); + + if (themeBgBitmap == false) + { + if (pDetailedRightEffectBitmap) + { + float arrowWidth = pDetailedRightEffectBitmap->GetWidthF(); + float arrowHeight = pDetailedRightEffectBitmap->GetHeightF(); + + pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x + (__detailedButtonBounds.width - arrowWidth) / 2.0f + , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pDetailedRightEffectBitmap); + } + } + } + } + else if (checkStatus == _CHECK_BUTTON_STATUS_HIGHLIGHTED) + { + if (checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON) + { + Bitmap* pCircleHighlightedBitmap = __pCheckButton->GetCircleBitmap(checkStatus); + + Bitmap* pCircleBitmap = null; + Bitmap* pDetailedRightBitmap = null; + Bitmap* pCircleEffectBitmap = null; + Bitmap* pDetailedRightEffectBitmap = null; + + if (__detailedPressed == true) + { + pCircleBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_PRESSED); + pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_PRESSED); + + pCircleEffectBitmap = __pCheckButton->GetCirclePressedEffectBitmap(); + pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightPressedEffectBitmap(); + } + else + { + pCircleBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_NORMAL); + pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_NORMAL); + + pCircleEffectBitmap = __pCheckButton->GetCircleNormalEffectBitmap(); + pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightNormalEffectBitmap(); + } + + if (pCircleBitmap) + { + 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); + + if (themeBgBitmap == false) + { + if (pCircleEffectBitmap) + { + pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pCircleEffectBitmap); + } + } + + if (pDetailedRightBitmap) + { + 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), *pDetailedRightBitmap); + } + + themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_ICON_HIGHLIGHTED); + + if (themeBgBitmap == false) + { + if (pDetailedRightEffectBitmap) + { + float arrowWidth = pDetailedRightEffectBitmap->GetWidthF(); + float arrowHeight = pDetailedRightEffectBitmap->GetHeightF(); + + pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x + (__detailedButtonBounds.width - arrowWidth) / 2.0f + , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pDetailedRightEffectBitmap); + } + } + + if (pCircleHighlightedBitmap && __highlightedIndex == 1) + { + pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pCircleHighlightedBitmap); + } + } + } + else if (checkStatus == _CHECK_BUTTON_STATUS_SELECTED) + { + if (checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON) + { + Bitmap* pCircleBitmap = null; + Bitmap* pDetailedRightBitmap = null; + Bitmap* pCircleEffectBitmap = null; + Bitmap* pDetailedRightEffectBitmap = null; + + if (__detailedPressed == true) + { + pCircleBitmap = __pCheckButton->GetCircleBitmap(_CHECK_BUTTON_STATUS_PRESSED); + pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(_CHECK_BUTTON_STATUS_PRESSED); + + pCircleEffectBitmap = __pCheckButton->GetCirclePressedEffectBitmap(); + pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightPressedEffectBitmap(); + } + else + { + pCircleBitmap = __pCheckButton->GetCircleBitmap(checkStatus); + pDetailedRightBitmap = __pCheckButton->GetDetailedRightBitmap(checkStatus); + + pCircleEffectBitmap = __pCheckButton->GetCircleNormalEffectBitmap(); + pDetailedRightEffectBitmap = __pCheckButton->GetDetailedRightNormalEffectBitmap(); + } + + if (pCircleBitmap) + { + 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); + + if (themeBgBitmap == false) + { + if (pCircleEffectBitmap) + { + pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x, __detailedButtonBounds.y), *pCircleEffectBitmap); + } + } + + if (pDetailedRightBitmap) + { + 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), *pDetailedRightBitmap); + } + + themeBgBitmap = IS_CUSTOM_BITMAP(CHECKBUTTON::DETAILED_ICON_SELECTED); + + if (themeBgBitmap == false) + { + if (pDetailedRightEffectBitmap) + { + float arrowWidth = pDetailedRightEffectBitmap->GetWidthF(); + float arrowHeight = pDetailedRightEffectBitmap->GetHeightF(); + + pCanvas->DrawBitmap(FloatPoint(__detailedButtonBounds.x + (__detailedButtonBounds.width - arrowWidth) / 2.0f + , __detailedButtonBounds.y + (__detailedButtonBounds.height - arrowHeight) / 2.0f), *pDetailedRightEffectBitmap); + } + } + } + } + + DrawMarkAnimation(); + } + else if (checkStyle == CHECK_BUTTON_STYLE_ONOFF || checkStyle == CHECK_BUTTON_STYLE_ONOFF_WITH_DIVIDER) + { + if (checkStatus == _CHECK_BUTTON_STATUS_NORMAL) + { + Bitmap* pOnOffBgNormalBitmap = __pCheckButton->GetOnOffBgBitmap(_CHECK_BUTTON_STATUS_NORMAL); + + if (pOnOffBgNormalBitmap) + { + pCanvas->DrawBitmap(FloatPoint(__defaultButtonBounds.x, __defaultButtonBounds.y), *pOnOffBgNormalBitmap); + } + + Bitmap* pOnOffNormalBitmap = __pCheckButton->GetOnOffBitmap(_CHECK_BUTTON_STATUS_NORMAL); + + if (__pCheckButton->IsSelected() && pOnOffNormalBitmap) + { + pCanvas->DrawBitmap(FloatPoint(__defaultButtonBounds.x, __defaultButtonBounds.y), *pOnOffNormalBitmap); + } + } + else if (checkStatus == _CHECK_BUTTON_STATUS_DISABLED) + { + Bitmap* pOnOffBgDisabledBitmap = __pCheckButton->GetOnOffBgBitmap(_CHECK_BUTTON_STATUS_DISABLED); + + if (pOnOffBgDisabledBitmap) + { + pCanvas->DrawBitmap(FloatPoint(__defaultButtonBounds.x, __defaultButtonBounds.y), *pOnOffBgDisabledBitmap); + } + + Bitmap* pOnOffDisabledBitmap = __pCheckButton->GetOnOffBitmap(_CHECK_BUTTON_STATUS_DISABLED); + + if (__pCheckButton->IsSelected() && pOnOffDisabledBitmap) + { + pCanvas->DrawBitmap(FloatPoint(__defaultButtonBounds.x, __defaultButtonBounds.y), *pOnOffDisabledBitmap); + } + } + else if (checkStatus == _CHECK_BUTTON_STATUS_PRESSED) + { + Bitmap* pOnOffBgPressedBitmap = __pCheckButton->GetOnOffBgBitmap(_CHECK_BUTTON_STATUS_PRESSED); + + if (pOnOffBgPressedBitmap) + { + pCanvas->DrawBitmap(FloatPoint(__defaultButtonBounds.x, __defaultButtonBounds.y), *pOnOffBgPressedBitmap); + } + + Bitmap* pOnOffPressedBitmap = __pCheckButton->GetOnOffBitmap(_CHECK_BUTTON_STATUS_PRESSED); + + if (__pCheckButton->IsSelected() && pOnOffPressedBitmap) + { + pCanvas->DrawBitmap(FloatPoint(__defaultButtonBounds.x, __defaultButtonBounds.y), *pOnOffPressedBitmap); + } + } + else if (checkStatus == _CHECK_BUTTON_STATUS_HIGHLIGHTED) + { + Bitmap* pOnOffBgNormalBitmap = __pCheckButton->GetOnOffBgBitmap(_CHECK_BUTTON_STATUS_NORMAL); + Bitmap* pOnOffBgHighlightedBitmap = __pCheckButton->GetOnOffBgBitmap(_CHECK_BUTTON_STATUS_HIGHLIGHTED); + + if (pOnOffBgNormalBitmap) + { + pCanvas->DrawBitmap(FloatPoint(__defaultButtonBounds.x, __defaultButtonBounds.y), *pOnOffBgNormalBitmap); + } + + Bitmap* pOnOffHighlightedBitmap = __pCheckButton->GetOnOffBitmap(_CHECK_BUTTON_STATUS_HIGHLIGHTED); + + if (__pCheckButton->IsSelected() && pOnOffHighlightedBitmap) + { + pCanvas->DrawBitmap(FloatPoint(__defaultButtonBounds.x, __defaultButtonBounds.y), *pOnOffHighlightedBitmap); + } + + if (pOnOffBgHighlightedBitmap && __highlightedIndex == 1) + { + pCanvas->DrawBitmap(FloatPoint(__defaultButtonBounds.x, __defaultButtonBounds.y), *pOnOffBgHighlightedBitmap); + } + } + else if (checkStatus == _CHECK_BUTTON_STATUS_SELECTED) + { + Bitmap* pOnOffBgSelectedBitmap = __pCheckButton->GetOnOffBgBitmap(_CHECK_BUTTON_STATUS_SELECTED); + + if (pOnOffBgSelectedBitmap) + { + pCanvas->DrawBitmap(FloatPoint(__defaultButtonBounds.x, __defaultButtonBounds.y), *pOnOffBgSelectedBitmap); + } + + Bitmap* pOnOffSelectedBitmap = __pCheckButton->GetOnOffBitmap(_CHECK_BUTTON_STATUS_SELECTED); + + if (__pCheckButton->IsSelected() && pOnOffSelectedBitmap) + { + pCanvas->DrawBitmap(FloatPoint(__defaultButtonBounds.x, __defaultButtonBounds.y), *pOnOffSelectedBitmap); + } + } + } + else if (checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING || checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING_WITH_DIVIDER) + { + float handlerWidth = 0.0f; + GET_SHAPE_CONFIG(CHECKBUTTON::ONOFF_SLIDING_HANDLER_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, handlerWidth); + DrawOnOffSlidingHandler(__onOffHandlerPosition - (handlerWidth / 2.0f)); + + float dividerWidth = 0.0f; + float dividerTopMargin = 0.0f; + float dividerRightMargin = 0.0f; + + Color dividerLeftColor; + //Color dividerRightColor; + FloatDimension minDimension(0.0f, 0.0f); + + GET_SHAPE_CONFIG(CHECKBUTTON::DIVIDER_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, dividerWidth); + GET_SHAPE_CONFIG(CHECKBUTTON::DIVIDER_TOP_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, dividerTopMargin); + GET_SHAPE_CONFIG(CHECKBUTTON::DIVIDER_RIGHT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, dividerRightMargin); + GET_COLOR_CONFIG(HEADER::DIVIDER_LINE_LEFT_NORMAL, dividerLeftColor); + //GET_COLOR_CONFIG(HEADER::DIVIDER_LINE_RIGHT_NORMAL, dividerRightColor); + + GET_DIMENSION_CONFIG(CHECKBUTTON::MIN_DIMENSION, __pCheckButton->GetOrientation(), minDimension); + + FloatRectangle bounds(0.0f, 0.0f, __pCheckButton->GetBoundsF().width, __pCheckButton->GetBoundsF().height); + + if (bounds.height < minDimension.height) + { + bounds.height = minDimension.height; + } + + if (checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING_WITH_DIVIDER) + { + pCanvas->SetForegroundColor(dividerLeftColor); + pCanvas->SetLineWidth(dividerWidth); + pCanvas->DrawLine(FloatPoint(__onOffSlidingButtonBounds.x - dividerRightMargin + dividerWidth, dividerTopMargin), + FloatPoint(__onOffSlidingButtonBounds.x - dividerRightMargin + dividerWidth, dividerTopMargin + bounds.height - dividerTopMargin * 2)); + } + } + + delete pCanvas; + delete pCircleCanvas; + + return; +} + +void +_CheckButtonPresenter::DrawText(void) +{ + result r = E_SUCCESS; + + TextSimple* pSimpleText = null; + TextSimple* pSimpleTitleText = null; + TextObjectAlignment horizontalAlign = TEXT_OBJECT_ALIGNMENT_CENTER; + TextObjectAlignment verticalAlign = TEXT_OBJECT_ALIGNMENT_MIDDLE; + + _CheckButtonStatus checkStatus = __pCheckButton->GetCheckButtonStatus(); + bool showTitle = __pCheckButton->GetShowTitle(); + + Canvas* pCanvas = __pCheckButton->GetCanvasN(); + if (pCanvas == null) + { + SysLog(NID_UI_CTRL, "Cannot get a canvas."); + + return; + } + + __pTextObject->RemoveAll(true); + pSimpleText = new (std::nothrow) TextSimple(const_cast(__pCheckButton->GetText().GetPointer()), __pCheckButton->GetText().GetLength()); + __pTextObject->AppendElement(*pSimpleText); + + __pTitleTextObject->RemoveAll(true); + pSimpleTitleText = new (std::nothrow) TextSimple(const_cast(__pCheckButton->GetTitleText().GetPointer()), __pCheckButton->GetTitleText().GetLength()); + __pTitleTextObject->AppendElement(*pSimpleTitleText); + + if (checkStatus == _CHECK_BUTTON_STATUS_NORMAL) + { + __pTextObject->SetForegroundColor(__pCheckButton->GetTextColor(), 0, __pTextObject->GetTextLength()); + __pTitleTextObject->SetForegroundColor(__pCheckButton->GetTitleTextColor(), 0, __pTitleTextObject->GetTextLength()); + } + else if (checkStatus == _CHECK_BUTTON_STATUS_DISABLED) + { + __pTextObject->SetForegroundColor(__pCheckButton->GetDisabledTextColor(), 0, __pTextObject->GetTextLength()); + __pTitleTextObject->SetForegroundColor(__pCheckButton->GetDisabledTitleTextColor(), 0, __pTitleTextObject->GetTextLength()); + } + else if (checkStatus == _CHECK_BUTTON_STATUS_PRESSED) + { + __pTextObject->SetForegroundColor(__pCheckButton->GetPressedTextColor(), 0, __pTextObject->GetTextLength()); + __pTitleTextObject->SetForegroundColor(__pCheckButton->GetPressedTitleTextColor(), 0, __pTitleTextObject->GetTextLength()); + } + else if (checkStatus == _CHECK_BUTTON_STATUS_HIGHLIGHTED) + { + __pTextObject->SetForegroundColor(__pCheckButton->GetHighlightedTextColor(), 0, __pTextObject->GetTextLength()); + __pTitleTextObject->SetForegroundColor(__pCheckButton->GetHighlightedTitleTextColor(), 0, __pTitleTextObject->GetTextLength()); + } + else + { + __pTextObject->SetForegroundColor(__pCheckButton->GetSelectedTextColor(), 0, __pTextObject->GetTextLength()); + __pTitleTextObject->SetForegroundColor(__pCheckButton->GetSelectedTitleTextColor(), 0, __pTitleTextObject->GetTextLength()); + } + + CalculateTextBounds(); + CalculateTitleTextBounds(); + + __pTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE); + __pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); + __pTextObject->SetBounds(GetTextBoundsF()); + __pTextObject->Compose(); + + __pTitleTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE); + __pTitleTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); + __pTitleTextObject->SetBounds(GetTitleTextBoundsF()); + __pTitleTextObject->Compose(); + + switch (__pCheckButton->GetTextHorizontalAlignment()) + { + case ALIGNMENT_LEFT: + horizontalAlign = TEXT_OBJECT_ALIGNMENT_LEFT; + break; + case ALIGNMENT_CENTER: + horizontalAlign = TEXT_OBJECT_ALIGNMENT_CENTER; + break; + default: + horizontalAlign = TEXT_OBJECT_ALIGNMENT_RIGHT; + } + + switch (__pCheckButton->GetTextVerticalAlignment()) + { + case ALIGNMENT_TOP: + verticalAlign = TEXT_OBJECT_ALIGNMENT_TOP; + break; + case ALIGNMENT_MIDDLE: + verticalAlign = TEXT_OBJECT_ALIGNMENT_MIDDLE; + break; + default: + verticalAlign = TEXT_OBJECT_ALIGNMENT_BOTTOM; + } + + __fontSize = __pCheckButton->GetTextSizeF(); + __pTextFont = __pCheckButton->GetFallbackFont(); + r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, __pTextFont, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pTextObject->SetAlignment(horizontalAlign | verticalAlign); + __pTextObject->SetFont(__pTextFont, 0, __pTextObject->GetTextLength()); + __pTextObject->Draw(*_CanvasImpl::GetInstance(*pCanvas)); + + __fontSize = __pCheckButton->GetTitleTextSizeF(); + __pTitleTextFont = __pCheckButton->GetFallbackFont(); + r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, __pTitleTextFont, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pTitleTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT | TEXT_OBJECT_ALIGNMENT_MIDDLE); + __pTitleTextObject->SetFont(__pTitleTextFont, 0, __pTitleTextObject->GetTextLength()); + + if (showTitle) + { + __pTitleTextObject->Draw(*_CanvasImpl::GetInstance(*pCanvas)); + } + + delete pCanvas; + + return; +} + +bool +_CheckButtonPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + if (&source != __pCheckButton) + { + return false; + } + + if (!__pCheckButton->IsEnabled()) + { + return true; + } + + __touchMoveHandled = false; + + FloatPoint touchPoint = touchinfo.GetCurrentPosition(); + + touchPoint.x += source.GetClientBoundsF().x; + touchPoint.y += source.GetClientBoundsF().y; + + CheckButtonStyle checkStyle = __pCheckButton->GetCheckButtonStyle(); + + if (checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING || checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING_WITH_DIVIDER) + { + if (__onOffSlidingButtonBounds.Contains(touchPoint)) + { + __onOffHandlerPressed = true; + } + else + { + __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_PRESSED); + } + } + else if (checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON || checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON) + { + if (__detailedButtonBounds.Contains(touchPoint)) + { + __detailedPressed = true; + } + else + { + __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_PRESSED); + } + } + else + { + __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_PRESSED); + } + + __pCheckButton->Invalidate(); + + return true; +} + +bool +_CheckButtonPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + float checkButtonLeftMargin = 0.0f; + float checkButtonDetailedBitmapWidth = 0.0f; + float checkButtonOnOffSlidingBitmapWidth = 0.0f; + float dividerRightMargin = 0.0f; + + GET_SHAPE_CONFIG(CHECKBUTTON::LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, checkButtonLeftMargin); + GET_SHAPE_CONFIG(CHECKBUTTON::DETAILED_BITMAP_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, checkButtonDetailedBitmapWidth); + GET_SHAPE_CONFIG(CHECKBUTTON::ONOFF_SLIDING_BITMAP_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, checkButtonOnOffSlidingBitmapWidth); + GET_SHAPE_CONFIG(CHECKBUTTON::DIVIDER_RIGHT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, dividerRightMargin); + + if (&source != __pCheckButton) + { + return false; + } + + if (!__pCheckButton->IsEnabled()) + { + return true; + } + + _CheckButtonStatus status = __pCheckButton->GetCheckButtonStatus(); + CheckButtonStyle checkStyle = __pCheckButton->GetCheckButtonStyle(); + + if (checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING || checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING_WITH_DIVIDER) + { + if (status == _CHECK_BUTTON_STATUS_NORMAL && __onOffHandlerPressed == false) + { + __onOffHandlerMoved = false; + + return true; + } + } + else if (checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON || checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON) + { + if (status == _CHECK_BUTTON_STATUS_NORMAL && __detailedPressed == true) + { + __detailedPressed = false; + + __pCheckButton->Invalidate(); + + return true; + } + } + else + { + if (status == _CHECK_BUTTON_STATUS_NORMAL) + { + return true; + } + } + + if (checkStyle == CHECK_BUTTON_STYLE_MARK || checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DIVIDER || checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON + || checkStyle == CHECK_BUTTON_STYLE_RADIO || checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DIVIDER || checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON) + { + StartCheckAnimationTimer(); + __ratio = 0; + } + + FloatPoint touchPoint = touchinfo.GetCurrentPosition(); + + touchPoint.x += source.GetClientBoundsF().x; + touchPoint.y += source.GetClientBoundsF().y; + + FloatRectangle bounds = __pCheckButton->GetClientBoundsF(); + FloatRectangle detailedBounds = __pCheckButton->GetClientBoundsF(); + + __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_NORMAL); + __pCheckButton->Invalidate(); + + if (checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON || checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON) + { + if (bounds.Contains(touchPoint) && !__detailedButtonBounds.Contains(touchPoint)) + { + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pCheckButton); + + __pCheckButton->FireActionEvent(); + + if (__pCheckButton->GetRadioGroup() != null) + { + __pCheckButton->SendTouchReleasedEvent(*__pCheckButton); + } + } + } + else if (checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING_WITH_DIVIDER) + { + detailedBounds.width = detailedBounds.width - checkButtonLeftMargin - checkButtonOnOffSlidingBitmapWidth - dividerRightMargin; + + if (!detailedBounds.Contains(touchPoint)) + { + if (__onOffHandlerMoved == false) + { + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pCheckButton); + + __pCheckButton->FireActionEvent(); + + if (__pCheckButton->GetRadioGroup() != null) + { + __pCheckButton->SendTouchReleasedEvent(*__pCheckButton); + } + } + } + + AdjustHandlerPosition(); + + __onOffHandlerPressed = false; + __onOffHandlerMoved = false; + } + else if (checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING) + { + if (bounds.Contains(touchPoint)) + { + if (__onOffHandlerMoved == false) + { + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pCheckButton); + + __pCheckButton->FireActionEvent(); + + if (__pCheckButton->GetRadioGroup() != null) + { + __pCheckButton->SendTouchReleasedEvent(*__pCheckButton); + } + } + } + + AdjustHandlerPosition(); + + __onOffHandlerPressed = false; + __onOffHandlerMoved = false; + } + else + { + if (bounds.Contains(touchPoint)) + { + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pCheckButton); + + __pCheckButton->FireActionEvent(); + + if (__pCheckButton->GetRadioGroup() != null) + { + __pCheckButton->SendTouchReleasedEvent(*__pCheckButton); + } + } + } + + return true; +} + +result +_CheckButtonPresenter::InitOnOffHandlerMoved(void) +{ + __onOffHandlerMoved = false; + + return E_SUCCESS; +} + +result +_CheckButtonPresenter::AdjustHandlerPosition(void) +{ + float handlerWidth = 0.0f; + GET_SHAPE_CONFIG(CHECKBUTTON::ONOFF_SLIDING_HANDLER_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, handlerWidth); + + if (__onOffHandlerMoved == false) + { + if (!__pCheckButton->IsSelected()) + { + __onOffHandlerPosition = __onOffSlidingButtonBounds.x; + } + else + { + __onOffHandlerPosition = __onOffSlidingButtonBounds.x + __onOffSlidingButtonBounds.width - (handlerWidth / 2.0f); + } + } + else + { + if (!__pCheckButton->IsSelected()) + { + if (__onOffHandlerPosition < __onOffSlidingButtonBounds.x + (__onOffSlidingButtonBounds.width / 2.0f)) + { + __onOffHandlerPosition = __onOffSlidingButtonBounds.x; + } + else + { + __onOffHandlerPosition = __onOffSlidingButtonBounds.x + __onOffSlidingButtonBounds.width - (handlerWidth / 2.0f); + + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pCheckButton); + + __pCheckButton->FireActionEvent(); + + if (__pCheckButton->GetRadioGroup() != null) + { + __pCheckButton->SendTouchReleasedEvent(*__pCheckButton); + } + } + } + else + { + if (__onOffHandlerPosition < __onOffSlidingButtonBounds.x + (__onOffSlidingButtonBounds.width / 2.0f)) + { + __onOffHandlerPosition = __onOffSlidingButtonBounds.x; + + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pCheckButton); + + __pCheckButton->FireActionEvent(); + + if (__pCheckButton->GetRadioGroup() != null) + { + __pCheckButton->SendTouchReleasedEvent(*__pCheckButton); + } + } + else + { + __onOffHandlerPosition = __onOffSlidingButtonBounds.x + __onOffSlidingButtonBounds.width - (handlerWidth / 2.0f); + } + } + } + + __pCheckButton->Invalidate(); + + return E_SUCCESS; +} + +bool +_CheckButtonPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + if (&source != __pCheckButton) + { + return false; + } + + if (!__pCheckButton->IsEnabled()) + { + return true; + } + + FloatPoint touchPoint = touchinfo.GetCurrentPosition(); + + touchPoint.x += source.GetClientBoundsF().x; + touchPoint.y += source.GetClientBoundsF().y; + + FloatRectangle bounds = __pCheckButton->GetClientBoundsF(); + bool isInCheckButtonArea = bounds.Contains(touchPoint); + bool isInOnOffHandlerArea = __onOffSlidingButtonBounds.Contains(touchPoint); + bool isDetailedArea = __detailedButtonBounds.Contains(touchPoint); + + CheckButtonStyle checkStyle = __pCheckButton->GetCheckButtonStyle(); + + if (checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING || checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING_WITH_DIVIDER) + { + if (__onOffHandlerPressed == true) + { + __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_NORMAL); + } + else + { + if (isInCheckButtonArea == true && __touchMoveHandled == false && isInOnOffHandlerArea == false) + { + __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_PRESSED); + } + else + { + __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_NORMAL); + } + } + } + else if (checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON || checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON) + { + if (isDetailedArea == true && __touchMoveHandled == false) + { + __detailedPressed = true; + + __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_NORMAL); + } + else + { + __detailedPressed = false; + + if (isInCheckButtonArea == true && __touchMoveHandled == false && isDetailedArea == false) + { + __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_PRESSED); + } + else + { + __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_NORMAL); + } + } + } + else + { + if (isInCheckButtonArea == true && __touchMoveHandled == false) + { + __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_PRESSED); + } + else + { + __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_NORMAL); + } + } + + if (checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING || checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING_WITH_DIVIDER) + { + if (isInOnOffHandlerArea == true && __onOffHandlerPressed == true) + { + __onOffHandlerPosition = touchPoint.x; + + __onOffHandlerMoved = true; + } + } + + __pCheckButton->Invalidate(); + + if (__onOffHandlerMoved == true) + { + return true; + } + else + { + return false; + } +} + +void +_CheckButtonPresenter::DrawOnOffSlidingHandler(float handlerPosition) +{ + Canvas* pCanvas = __pCheckButton->GetCanvasN(); + if (pCanvas == null) + { + SysLog(NID_UI_CTRL, "Cannot get a canvas."); + + return; + } + + Color detailedHighlightedBgColor; + GET_COLOR_CONFIG(CHECKBUTTON::DETAILED_ICON_BG_HIGHLIGHTED, detailedHighlightedBgColor); + + float handlerMargin = 0.0f; + float handlerWidth = 0.0f; + + _CheckButtonStatus checkStatus = __pCheckButton->GetCheckButtonStatus(); + + GET_SHAPE_CONFIG(CHECKBUTTON::ONOFF_SLIDING_HANDLER_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, handlerMargin); + GET_SHAPE_CONFIG(CHECKBUTTON::ONOFF_SLIDING_HANDLER_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, handlerWidth); + + if (handlerPosition < __onOffSlidingButtonBounds.x) + { + handlerPosition = __onOffSlidingButtonBounds.x; + } + + if (handlerPosition > __onOffSlidingButtonBounds.x + __onOffSlidingButtonBounds.width - handlerWidth) + { + handlerPosition = __onOffSlidingButtonBounds.x + __onOffSlidingButtonBounds.width - handlerWidth; + } + + if (!__pCheckButton->IsSelected()) + { + if (checkStatus == _CHECK_BUTTON_STATUS_NORMAL) + { + Bitmap* pOnOffSlidingNormalBgBitmap = __pCheckButton->GetOnOffSlidingBgBitmap(_CHECK_BUTTON_STATUS_NORMAL); + + if (pOnOffSlidingNormalBgBitmap) + { + pCanvas->DrawBitmap(FloatPoint(__onOffSlidingButtonBounds.x, __onOffSlidingButtonBounds.y), *pOnOffSlidingNormalBgBitmap); + } + + Bitmap* pOnOffSlidingOffHandlerNormalBitmap = __pCheckButton->GetOnOffSlidingOffHandlerBitmap(_CHECK_BUTTON_STATUS_NORMAL); + + if (pOnOffSlidingOffHandlerNormalBitmap) + { + pCanvas->DrawBitmap(FloatPoint(handlerPosition, __onOffSlidingButtonBounds.y - handlerMargin), *pOnOffSlidingOffHandlerNormalBitmap); + } + } + else if (checkStatus == _CHECK_BUTTON_STATUS_DISABLED) + { + Bitmap* pOnOffSlidingDisabledBgBitmap = __pCheckButton->GetOnOffSlidingBgBitmap(_CHECK_BUTTON_STATUS_DISABLED); + + if (pOnOffSlidingDisabledBgBitmap) + { + pCanvas->DrawBitmap(FloatPoint(__onOffSlidingButtonBounds.x, __onOffSlidingButtonBounds.y), *pOnOffSlidingDisabledBgBitmap); + } + + Bitmap* pOnOffSlidingOffHandlerDisabledBitmap = __pCheckButton->GetOnOffSlidingOffHandlerBitmap(_CHECK_BUTTON_STATUS_DISABLED); + + if (pOnOffSlidingOffHandlerDisabledBitmap) + { + pCanvas->DrawBitmap(FloatPoint(handlerPosition, __onOffSlidingButtonBounds.y - handlerMargin), *pOnOffSlidingOffHandlerDisabledBitmap); + } + } + else if (checkStatus == _CHECK_BUTTON_STATUS_PRESSED) + { + Bitmap* pOnOffSlidingPressedBgBitmap = __pCheckButton->GetOnOffSlidingBgBitmap(_CHECK_BUTTON_STATUS_PRESSED); + + if (pOnOffSlidingPressedBgBitmap) + { + pCanvas->DrawBitmap(FloatPoint(__onOffSlidingButtonBounds.x, __onOffSlidingButtonBounds.y), *pOnOffSlidingPressedBgBitmap); + } + + Bitmap* pOnOffSlidingOffHandlerPressedBitmap = __pCheckButton->GetOnOffSlidingOffHandlerBitmap(_CHECK_BUTTON_STATUS_PRESSED); + + if (pOnOffSlidingOffHandlerPressedBitmap) + { + pCanvas->DrawBitmap(FloatPoint(handlerPosition, __onOffSlidingButtonBounds.y - handlerMargin), *pOnOffSlidingOffHandlerPressedBitmap); + } + } + else if (checkStatus == _CHECK_BUTTON_STATUS_HIGHLIGHTED) + { + Bitmap* pOnOffSlidingHighlightedBgBitmap = __pCheckButton->GetOnOffSlidingBgBitmap(_CHECK_BUTTON_STATUS_HIGHLIGHTED); + + if (pOnOffSlidingHighlightedBgBitmap) + { + pCanvas->DrawBitmap(FloatPoint(__onOffSlidingButtonBounds.x, __onOffSlidingButtonBounds.y), *pOnOffSlidingHighlightedBgBitmap); + } + + Bitmap* pOnOffSlidingOffHandlerNormalBitmap = __pCheckButton->GetOnOffSlidingOffHandlerBitmap(_CHECK_BUTTON_STATUS_NORMAL); + + if (pOnOffSlidingOffHandlerNormalBitmap) + { + pCanvas->DrawBitmap(FloatPoint(handlerPosition, __onOffSlidingButtonBounds.y - handlerMargin), *pOnOffSlidingOffHandlerNormalBitmap); + } + + Bitmap* pOnOffSlidingOffHandlerHighlightedBitmap = __pCheckButton->GetOnOffSlidingOffHandlerBitmap(_CHECK_BUTTON_STATUS_HIGHLIGHTED); + + if (pOnOffSlidingOffHandlerHighlightedBitmap && __highlightedIndex == 1) + { + pCanvas->DrawBitmap(FloatPoint(handlerPosition, __onOffSlidingButtonBounds.y - handlerMargin), *pOnOffSlidingOffHandlerHighlightedBitmap); + } + } + else if (checkStatus == _CHECK_BUTTON_STATUS_SELECTED) + { + Bitmap* pOnOffSlidingSelectedBgBitmap = __pCheckButton->GetOnOffSlidingBgBitmap(_CHECK_BUTTON_STATUS_SELECTED); + + if (pOnOffSlidingSelectedBgBitmap) + { + pCanvas->DrawBitmap(FloatPoint(__onOffSlidingButtonBounds.x, __onOffSlidingButtonBounds.y), *pOnOffSlidingSelectedBgBitmap); + } + + Bitmap* pOnOffSlidingOffHandlerSelectedBitmap = __pCheckButton->GetOnOffSlidingOffHandlerBitmap(_CHECK_BUTTON_STATUS_SELECTED); + + if (pOnOffSlidingOffHandlerSelectedBitmap) + { + pCanvas->DrawBitmap(FloatPoint(handlerPosition, __onOffSlidingButtonBounds.y - handlerMargin), *pOnOffSlidingOffHandlerSelectedBitmap); + } + } + } + else + { + if (checkStatus == _CHECK_BUTTON_STATUS_NORMAL) + { + Bitmap* pOnOffSlidingNormalBgBitmap = __pCheckButton->GetOnOffSlidingBgBitmap(_CHECK_BUTTON_STATUS_NORMAL); + + if (pOnOffSlidingNormalBgBitmap) + { + pCanvas->DrawBitmap(FloatPoint(__onOffSlidingButtonBounds.x, __onOffSlidingButtonBounds.y), *pOnOffSlidingNormalBgBitmap); + } + + Bitmap* pOnOffSlidingOnHandlerNormalBitmap = __pCheckButton->GetOnOffSlidingOnHandlerBitmap(_CHECK_BUTTON_STATUS_NORMAL); + + if (pOnOffSlidingOnHandlerNormalBitmap) + { + pCanvas->DrawBitmap(FloatPoint(handlerPosition, __onOffSlidingButtonBounds.y - handlerMargin), *pOnOffSlidingOnHandlerNormalBitmap); + } + } + else if (checkStatus == _CHECK_BUTTON_STATUS_DISABLED) + { + Bitmap* pOnOffSlidingDisabledBgBitmap = __pCheckButton->GetOnOffSlidingBgBitmap(_CHECK_BUTTON_STATUS_DISABLED); + + if (pOnOffSlidingDisabledBgBitmap) + { + pCanvas->DrawBitmap(FloatPoint(__onOffSlidingButtonBounds.x, __onOffSlidingButtonBounds.y), *pOnOffSlidingDisabledBgBitmap); + } + + Bitmap* pOnOffSlidingOnHandlerDisabledBitmap = __pCheckButton->GetOnOffSlidingOnHandlerBitmap(_CHECK_BUTTON_STATUS_DISABLED); + + if (pOnOffSlidingOnHandlerDisabledBitmap) + { + pCanvas->DrawBitmap(FloatPoint(handlerPosition, __onOffSlidingButtonBounds.y - handlerMargin), *pOnOffSlidingOnHandlerDisabledBitmap); + } + } + else if (checkStatus == _CHECK_BUTTON_STATUS_PRESSED) + { + Bitmap* pOnOffSlidingPressedBgBitmap = __pCheckButton->GetOnOffSlidingBgBitmap(_CHECK_BUTTON_STATUS_PRESSED); + + if (pOnOffSlidingPressedBgBitmap) + { + pCanvas->DrawBitmap(FloatPoint(__onOffSlidingButtonBounds.x, __onOffSlidingButtonBounds.y), *pOnOffSlidingPressedBgBitmap); + } + + Bitmap* pOnOffSlidingOnHandlerPressedBitmap = __pCheckButton->GetOnOffSlidingOnHandlerBitmap(_CHECK_BUTTON_STATUS_PRESSED); + + if (pOnOffSlidingOnHandlerPressedBitmap) + { + pCanvas->DrawBitmap(FloatPoint(handlerPosition, __onOffSlidingButtonBounds.y - handlerMargin), *pOnOffSlidingOnHandlerPressedBitmap); + } + } + else if (checkStatus == _CHECK_BUTTON_STATUS_HIGHLIGHTED) + { + Bitmap* pOnOffSlidingHighlightedBgBitmap = __pCheckButton->GetOnOffSlidingBgBitmap(_CHECK_BUTTON_STATUS_HIGHLIGHTED); + + if (pOnOffSlidingHighlightedBgBitmap) + { + pCanvas->DrawBitmap(FloatPoint(__onOffSlidingButtonBounds.x, __onOffSlidingButtonBounds.y), *pOnOffSlidingHighlightedBgBitmap); + } + + Bitmap* pOnOffSlidingOnHandlerNormalBitmap = __pCheckButton->GetOnOffSlidingOnHandlerBitmap(_CHECK_BUTTON_STATUS_NORMAL); + + if (pOnOffSlidingOnHandlerNormalBitmap) + { + pCanvas->DrawBitmap(FloatPoint(handlerPosition, __onOffSlidingButtonBounds.y - handlerMargin), *pOnOffSlidingOnHandlerNormalBitmap); + } + + Bitmap* pOnOffSlidingOnHandlerHighlightedBitmap = __pCheckButton->GetOnOffSlidingOnHandlerBitmap(_CHECK_BUTTON_STATUS_HIGHLIGHTED); + + if (pOnOffSlidingOnHandlerHighlightedBitmap && __highlightedIndex == 1) + { + pCanvas->DrawBitmap(FloatPoint(handlerPosition, __onOffSlidingButtonBounds.y - handlerMargin), *pOnOffSlidingOnHandlerHighlightedBitmap); + } + } + else if (checkStatus == _CHECK_BUTTON_STATUS_SELECTED) + { + Bitmap* pOnOffSlidingSelectedBgBitmap = __pCheckButton->GetOnOffSlidingBgBitmap(_CHECK_BUTTON_STATUS_SELECTED); + + if (pOnOffSlidingSelectedBgBitmap) + { + pCanvas->DrawBitmap(FloatPoint(__onOffSlidingButtonBounds.x, __onOffSlidingButtonBounds.y), *pOnOffSlidingSelectedBgBitmap); + } + + Bitmap* pOnOffSlidingOnHandlerSelectedBitmap = __pCheckButton->GetOnOffSlidingOnHandlerBitmap(_CHECK_BUTTON_STATUS_SELECTED); + + if (pOnOffSlidingOnHandlerSelectedBitmap) + { + pCanvas->DrawBitmap(FloatPoint(handlerPosition, __onOffSlidingButtonBounds.y - handlerMargin), *pOnOffSlidingOnHandlerSelectedBitmap); + } + } + } + + delete pCanvas; + + return; +} + +bool +_CheckButtonPresenter::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + if (&source != __pCheckButton) + { + return false; + } + + if (!__pCheckButton->IsEnabled()) + { + return true; + } + + __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_NORMAL); + __pCheckButton->Invalidate(); + + return true; +} + +void +_CheckButtonPresenter::OnTouchMoveHandled(const _Control& control) +{ + __touchMoveHandled = true; + __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_NORMAL); + __pCheckButton->Invalidate(); + + return; +} + +bool +_CheckButtonPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) +{ + _KeyCode keyCode = keyInfo.GetKeyCode(); + + CheckButtonStyle checkStyle = __pCheckButton->GetCheckButtonStyle(); + + if (__pCheckButton->IsFocusModeStateEnabled() == true && keyCode == _KEY_ENTER) + { + if (__pCheckButton->GetCheckButtonStatus() != _CHECK_BUTTON_STATUS_DISABLED) + { + if (checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING || checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING_WITH_DIVIDER) + { + if (__highlightedIndex == 1) + { + __onOffHandlerPressed = true; + } + else + { + __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_PRESSED); + } + } + else if (checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON) + { + if (__highlightedIndex == 2) + { + __detailedPressed = true; + } + else + { + __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_PRESSED); + } + } + else if (checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON) + { + if (__highlightedIndex == 1) + { + __detailedPressed = true; + } + else + { + __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_PRESSED); + } + } + else + { + __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_PRESSED); + } + } + } + + __pCheckButton->Invalidate(); + + return false; +} + +bool +_CheckButtonPresenter::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) +{ + _KeyCode keyCode = keyInfo.GetKeyCode(); + + CheckButtonStyle checkStyle = __pCheckButton->GetCheckButtonStyle(); + + if (__pCheckButton->IsFocusModeStateEnabled() == true && keyCode == _KEY_LEFT) + { + if (checkStyle == CHECK_BUTTON_STYLE_RADIO || checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DIVIDER) + { + __highlightedIndex = 0; + } + else if (checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON) + { + if (__highlightedIndex == 0) + { + __highlightedIndex = 1; + } + else if (__highlightedIndex == 1) + { + __highlightedIndex = 2; + } + else if (__highlightedIndex == 2) + { + __highlightedIndex = 0; + } + } + else + { + if (__highlightedIndex == 0) + { + __highlightedIndex = 1; + } + else if (__highlightedIndex == 1) + { + __highlightedIndex = 0; + } + } + + __pCheckButton->Invalidate(); + } + else if (__pCheckButton->IsFocusModeStateEnabled() == true && keyCode == _KEY_RIGHT) + { + if (checkStyle == CHECK_BUTTON_STYLE_RADIO || checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DIVIDER) + { + __highlightedIndex = 0; + } + else if (checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON) + { + if (__highlightedIndex == 0) + { + __highlightedIndex = 2; + } + else if (__highlightedIndex == 1) + { + __highlightedIndex = 0; + } + else if (__highlightedIndex == 2) + { + __highlightedIndex = 1; + } + } + else + { + if (__highlightedIndex == 0) + { + __highlightedIndex = 1; + } + else if (__highlightedIndex == 1) + { + __highlightedIndex = 0; + } + } + + __pCheckButton->Invalidate(); + } + else if (__pCheckButton->IsFocusModeStateEnabled() == true && keyCode == _KEY_ENTER) + { + if (checkStyle == CHECK_BUTTON_STYLE_MARK || checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DIVIDER || checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON + || checkStyle == CHECK_BUTTON_STYLE_RADIO || checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DIVIDER || checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON) + { + if (__detailedPressed == false) + { + StartCheckAnimationTimer(); + __ratio = 0; + } + } + + __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_NORMAL); + __pCheckButton->Invalidate(); + + __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_HIGHLIGHTED); + + if (checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON) + { + if (__highlightedIndex != 2) + { + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pCheckButton); + + __pCheckButton->FireActionEvent(); + + if (__pCheckButton->GetRadioGroup() != null) + { + __pCheckButton->SendTouchReleasedEvent(*__pCheckButton); + } + } + else + { + __detailedPressed = false; + } + } + else if (checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON) + { + if (__highlightedIndex != 1) + { + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pCheckButton); + + __pCheckButton->FireActionEvent(); + + if (__pCheckButton->GetRadioGroup() != null) + { + __pCheckButton->SendTouchReleasedEvent(*__pCheckButton); + } + } + else + { + __detailedPressed = false; + } + } + else if (checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING_WITH_DIVIDER || checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING) + { + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pCheckButton); + + __pCheckButton->FireActionEvent(); + + if (__pCheckButton->GetRadioGroup() != null) + { + __pCheckButton->SendTouchReleasedEvent(*__pCheckButton); + } + + AdjustHandlerPosition(); + + __onOffHandlerPressed = false; + __onOffHandlerMoved = false; + } + else + { + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pCheckButton); + + __pCheckButton->FireActionEvent(); + + if (__pCheckButton->GetRadioGroup() != null) + { + __pCheckButton->SendTouchReleasedEvent(*__pCheckButton); + } + } + } + + return false; +} + +bool +_CheckButtonPresenter::IsEnabledStateChanged(void) +{ + bool __currentEnabledState = __pCheckButton->GetEnableState(); + + if (__currentEnabledState != __previousEnabledState) + { + __previousEnabledState = __currentEnabledState; + return true; + } + else + { + return false; + } +} + +result +_CheckButtonPresenter::CalculateTitleTextBounds(void) +{ + float checkButtonLeftMargin = 0.0f; + float checkButtonTopMargin = 0.0f; + float checkButtonBitmapWidth = 0.0f; + float checkButtonOnOffSlidingBitmapWidth = 0.0f; + float checkButtonDetailedBitmapWidth = 0.0f; + float checkButtonTitleTextHeight = 0.0f; + float checkButtonTextHeight = 0.0f; + + FloatDimension minDimension(0.0f, 0.0f); + FloatDimension minDimensionWithAnnex(0.0f, 0.0f); + + GET_SHAPE_CONFIG(CHECKBUTTON::LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, checkButtonLeftMargin); + GET_SHAPE_CONFIG(CHECKBUTTON::TOP_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, checkButtonTopMargin); + GET_SHAPE_CONFIG(CHECKBUTTON::MARK_BITMAP_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, checkButtonBitmapWidth); + GET_SHAPE_CONFIG(CHECKBUTTON::ONOFF_SLIDING_BITMAP_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, checkButtonOnOffSlidingBitmapWidth); + GET_SHAPE_CONFIG(CHECKBUTTON::DETAILED_BITMAP_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, checkButtonDetailedBitmapWidth); + GET_SHAPE_CONFIG(CHECKBUTTON::TITLE_TEXT_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, checkButtonTitleTextHeight); + GET_SHAPE_CONFIG(CHECKBUTTON::TEXT_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, checkButtonTextHeight); + + GET_DIMENSION_CONFIG(CHECKBUTTON::MIN_DIMENSION, __pCheckButton->GetOrientation(), minDimension); + GET_DIMENSION_CONFIG(CHECKBUTTON::MIN_DIMENSION_WITH_ANNEX, __pCheckButton->GetOrientation(), minDimensionWithAnnex); + + FloatRectangle bounds(0.0f, 0.0f, __pCheckButton->GetBoundsF().width, __pCheckButton->GetBoundsF().height); + + CheckButtonStyle checkStyle = __pCheckButton->GetCheckButtonStyle(); + + 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) + { + bounds.width = minDimension.width; + } + + if (bounds.height < minDimension.height) + { + bounds.height = minDimension.height; + } + } + else + { + if (bounds.width < minDimensionWithAnnex.width) + { + bounds.width = minDimensionWithAnnex.width; + } + + if (bounds.height < minDimensionWithAnnex.height) + { + bounds.height = minDimensionWithAnnex.height; + } + } + + if (checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING || checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING_WITH_DIVIDER) + { + __titleTextBounds.x = checkButtonLeftMargin; + __titleTextBounds.y = checkButtonTopMargin; + __titleTextBounds.width = bounds.width - checkButtonLeftMargin * 3 - checkButtonOnOffSlidingBitmapWidth; + __titleTextBounds.height = bounds.height - checkButtonTopMargin * 2 - __textBounds.height; + } + else + { + if (checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON || checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON) + { + __titleTextBounds.x = checkButtonLeftMargin * 2 + checkButtonBitmapWidth; + __titleTextBounds.y = checkButtonTopMargin; + __titleTextBounds.width = bounds.width - checkButtonLeftMargin * 4 - checkButtonBitmapWidth - checkButtonDetailedBitmapWidth; + __titleTextBounds.height = bounds.height - checkButtonTopMargin * 2 - __textBounds.height; + } + else + { + __titleTextBounds.x = checkButtonLeftMargin * 2 + checkButtonBitmapWidth; + __titleTextBounds.y = checkButtonTopMargin; + __titleTextBounds.width = bounds.width - checkButtonLeftMargin * 3 - checkButtonBitmapWidth; + __titleTextBounds.height = bounds.height - checkButtonTopMargin * 2 - __textBounds.height; + } + } + + return E_SUCCESS; +} + +result +_CheckButtonPresenter::CalculateTextBounds(void) +{ + float checkButtonLeftMargin = 0.0f; + float checkButtonTopMargin = 0.0f; + float checkButtonBitmapWidth = 0.0f; + float checkButtonOnOffSlidingBitmapWidth = 0.0f; + float checkButtonDetailedBitmapWidth = 0.0f; + float checkButtonTitleTextHeight = 0.0f; + float checkButtonTextHeight = 0.0f; + + FloatDimension minDimension(0.0f, 0.0f); + FloatDimension minDimensionWithAnnex(0.0f, 0.0f); + + GET_SHAPE_CONFIG(CHECKBUTTON::LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, checkButtonLeftMargin); + GET_SHAPE_CONFIG(CHECKBUTTON::TOP_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, checkButtonTopMargin); + GET_SHAPE_CONFIG(CHECKBUTTON::MARK_BITMAP_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, checkButtonBitmapWidth); + GET_SHAPE_CONFIG(CHECKBUTTON::ONOFF_SLIDING_BITMAP_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, checkButtonOnOffSlidingBitmapWidth); + GET_SHAPE_CONFIG(CHECKBUTTON::DETAILED_BITMAP_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, checkButtonDetailedBitmapWidth); + GET_SHAPE_CONFIG(CHECKBUTTON::TITLE_TEXT_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, checkButtonTitleTextHeight); + GET_SHAPE_CONFIG(CHECKBUTTON::TEXT_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, checkButtonTextHeight); + + GET_DIMENSION_CONFIG(CHECKBUTTON::MIN_DIMENSION, __pCheckButton->GetOrientation(), minDimension); + GET_DIMENSION_CONFIG(CHECKBUTTON::MIN_DIMENSION_WITH_ANNEX, __pCheckButton->GetOrientation(), minDimensionWithAnnex); + + FloatRectangle bounds(0.0f, 0.0f, __pCheckButton->GetBoundsF().width, __pCheckButton->GetBoundsF().height); + + CheckButtonStyle checkStyle = __pCheckButton->GetCheckButtonStyle(); + bool showTitle = __pCheckButton->GetShowTitle(); + + 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) + { + bounds.width = minDimension.width; + } + + if (bounds.height < minDimension.height) + { + bounds.height = minDimension.height; + } + } + else + { + if (bounds.width < minDimensionWithAnnex.width) + { + bounds.width = minDimensionWithAnnex.width; + } + + if (bounds.height < minDimensionWithAnnex.height) + { + bounds.height = minDimensionWithAnnex.height; + } + } + + if (checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING || checkStyle == CHECK_BUTTON_STYLE_ONOFF_SLIDING_WITH_DIVIDER) + { + if (showTitle) + { + __textBounds.x = checkButtonLeftMargin; + __textBounds.y = checkButtonTopMargin + checkButtonTitleTextHeight; + __textBounds.width = bounds.width - checkButtonLeftMargin * 3 - checkButtonOnOffSlidingBitmapWidth; + __textBounds.height = bounds.height - checkButtonTopMargin * 2 - checkButtonTitleTextHeight; + } + else + { + __textBounds.x = checkButtonLeftMargin; + __textBounds.y = checkButtonTopMargin; + __textBounds.width = bounds.width - checkButtonLeftMargin * 3 - checkButtonOnOffSlidingBitmapWidth; + __textBounds.height = bounds.height - checkButtonTopMargin * 2; + } + } + else + { + if (checkStyle == CHECK_BUTTON_STYLE_MARK_WITH_DETAILED_BUTTON || checkStyle == CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON) + { + if (showTitle) + { + __textBounds.x = checkButtonLeftMargin * 2 + checkButtonBitmapWidth; + __textBounds.y = checkButtonTopMargin + checkButtonTitleTextHeight; + __textBounds.width = bounds.width - checkButtonLeftMargin * 4 - checkButtonBitmapWidth - checkButtonDetailedBitmapWidth; + __textBounds.height = bounds.height - checkButtonTopMargin * 2 - checkButtonTitleTextHeight; + } + else + { + __textBounds.x = checkButtonLeftMargin * 2 + checkButtonBitmapWidth; + __textBounds.y = checkButtonTopMargin; + __textBounds.width = bounds.width - checkButtonLeftMargin * 4 - checkButtonBitmapWidth - checkButtonDetailedBitmapWidth; + __textBounds.height = bounds.height - checkButtonTopMargin * 2; + } + } + else + { + if (showTitle) + { + __textBounds.x = checkButtonLeftMargin * 2 + checkButtonBitmapWidth; + __textBounds.y = checkButtonTopMargin + checkButtonTitleTextHeight; + __textBounds.width = bounds.width - checkButtonLeftMargin * 3 - checkButtonBitmapWidth; + __textBounds.height = bounds.height - checkButtonTopMargin * 2 - checkButtonTitleTextHeight; + } + else + { + __textBounds.x = checkButtonLeftMargin * 2 + checkButtonBitmapWidth; + __textBounds.y = checkButtonTopMargin; + __textBounds.width = bounds.width - checkButtonLeftMargin * 3 - checkButtonBitmapWidth; + __textBounds.height = bounds.height - checkButtonTopMargin * 2; + } + } + } + + return E_SUCCESS; +} + +result +_CheckButtonPresenter::CalculateButtonBounds(void) +{ + float checkButtonLeftMargin = 0.0f; + float checkButtonBitmapWidth = 0.0f; + float checkButtonBitmapHeight = 0.0f; + float checkButtonOnOffSlidingBitmapWidth = 0.0f; + float checkButtonOnOffSlidingBitmapHeight = 0.0f; + float checkButtonDetaieldBitmapWidth = 0.0f; + float checkButtonDetaieldBitmapHeight = 0.0f; + + FloatDimension minDimension(0.0f, 0.0f); + FloatDimension minDimensionWithAnnex(0.0f, 0.0f); + + GET_SHAPE_CONFIG(CHECKBUTTON::LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, checkButtonLeftMargin); + GET_SHAPE_CONFIG(CHECKBUTTON::MARK_BITMAP_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, checkButtonBitmapWidth); + GET_SHAPE_CONFIG(CHECKBUTTON::MARK_BITMAP_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, checkButtonBitmapHeight); + GET_SHAPE_CONFIG(CHECKBUTTON::ONOFF_SLIDING_BITMAP_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, checkButtonOnOffSlidingBitmapWidth); + GET_SHAPE_CONFIG(CHECKBUTTON::ONOFF_SLIDING_BITMAP_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, checkButtonOnOffSlidingBitmapHeight); + GET_SHAPE_CONFIG(CHECKBUTTON::DETAILED_BITMAP_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, checkButtonDetaieldBitmapWidth); + GET_SHAPE_CONFIG(CHECKBUTTON::DETAILED_BITMAP_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, checkButtonDetaieldBitmapHeight); + + GET_DIMENSION_CONFIG(CHECKBUTTON::MIN_DIMENSION, __pCheckButton->GetOrientation(), minDimension); + GET_DIMENSION_CONFIG(CHECKBUTTON::MIN_DIMENSION_WITH_ANNEX, __pCheckButton->GetOrientation(), minDimensionWithAnnex); + + FloatRectangle bounds(0.0f, 0.0f, __pCheckButton->GetBoundsF().width, __pCheckButton->GetBoundsF().height); + + CheckButtonStyle checkStyle = __pCheckButton->GetCheckButtonStyle(); + + 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) + { + bounds.width = minDimension.width; + } + + if (bounds.height < minDimension.height) + { + bounds.height = minDimension.height; + } + } + else + { + if (bounds.width < minDimensionWithAnnex.width) + { + bounds.width = minDimensionWithAnnex.width; + } + + if (bounds.height < minDimensionWithAnnex.height) + { + bounds.height = minDimensionWithAnnex.height; + } + } + + __defaultButtonBounds.x = checkButtonLeftMargin; + __defaultButtonBounds.y = (bounds.height - checkButtonBitmapHeight) / 2; + __defaultButtonBounds.width = checkButtonBitmapWidth; + __defaultButtonBounds.height = checkButtonBitmapHeight; + + __onOffSlidingButtonBounds.x = bounds.width - checkButtonLeftMargin - checkButtonOnOffSlidingBitmapWidth; + __onOffSlidingButtonBounds.y = (bounds.height - checkButtonOnOffSlidingBitmapHeight) / 2; + __onOffSlidingButtonBounds.width = checkButtonOnOffSlidingBitmapWidth; + __onOffSlidingButtonBounds.height = checkButtonOnOffSlidingBitmapHeight; + + __detailedButtonBounds.x = bounds.width - checkButtonLeftMargin - checkButtonDetaieldBitmapWidth; + __detailedButtonBounds.y = (bounds.height - checkButtonDetaieldBitmapHeight) / 2; + __detailedButtonBounds.width = checkButtonDetaieldBitmapWidth; + __detailedButtonBounds.height = checkButtonDetaieldBitmapHeight; + + return E_SUCCESS; +} + +FloatRectangle +_CheckButtonPresenter::GetTitleTextBoundsF(void) const +{ + return __titleTextBounds; +} + +FloatRectangle +_CheckButtonPresenter::GetTextBoundsF(void) const +{ + return __textBounds; +} + +FloatRectangle +_CheckButtonPresenter::GetDefaultButtonBoundsF(void) const +{ + return __defaultButtonBounds; +} + +FloatRectangle +_CheckButtonPresenter::GetOnOffSlidingButtonBoundsF(void) const +{ + return __onOffSlidingButtonBounds; +} + +FloatRectangle +_CheckButtonPresenter::GetDetailedButtonBoundsF(void) const +{ + return __detailedButtonBounds; +} + +result +_CheckButtonPresenter::StartCheckAnimationTimer(void) +{ + result r = E_SUCCESS; + if (__pCheckAnimationTimer == null) + { + __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); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + __pCheckAnimationTimer->Cancel(); + } + + __pCheckAnimationTimer->Start(CHECK_ACTION_TIMER_PERIOD); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +CATCH: + ResetCheckAnimationTimer(); + return r; +} + +result +_CheckButtonPresenter::ResetCheckAnimationTimer(void) +{ + delete __pCheckAnimationTimer; + __pCheckAnimationTimer = null; + + return E_SUCCESS; +} + +void +_CheckButtonPresenter::OnTimerExpired(Timer& timer) +{ + __ratio++; + + if (__ratio <= RATIO_MAX) + { + StartCheckAnimationTimer(); + DrawMarkAnimation(); + } + else + { + ResetCheckAnimationTimer(); + __ratio = 10; + } + + return; +} + +void +_CheckButtonPresenter::OnDrawFocus(void) +{ + if (__pCheckButton->GetCheckButtonStatus() != _CHECK_BUTTON_STATUS_DISABLED) + { + __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_HIGHLIGHTED); + __pCheckButton->Invalidate(); + } + + return; +} + +void +_CheckButtonPresenter::OnChildControlFocusMoved(const _Control& control) +{ + return; +} + +bool +_CheckButtonPresenter::IsChildControlFocusManage(void) const +{ + return true; +} + +void +_CheckButtonPresenter::OnFocusableStateChanged(bool focusalbeState) +{ + return; +} + +void +_CheckButtonPresenter::OnFocusModeStateChanged(void) +{ + if (__pCheckButton->GetCheckButtonStatus() != _CHECK_BUTTON_STATUS_DISABLED) + { + __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_NORMAL); + __pCheckButton->Invalidate(); + } + + return; +} + +bool +_CheckButtonPresenter::OnFocusGained(const _Control& source) +{ + __highlightedIndex = 0; + + if (__pCheckButton->IsFocusModeStateEnabled() == true) + { + if (__pCheckButton->GetCheckButtonStatus() != _CHECK_BUTTON_STATUS_DISABLED) + { + __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_HIGHLIGHTED); + __pCheckButton->Invalidate(); + } + } + + return true; +} + +bool +_CheckButtonPresenter::OnFocusLost(const _Control& source) +{ + if (__pCheckButton->GetCheckButtonStatus() != _CHECK_BUTTON_STATUS_DISABLED) + { + __pCheckButton->SetCheckButtonStatus(_CHECK_BUTTON_STATUS_NORMAL); + __pCheckButton->Invalidate(); + } + + return true; +} +void +_CheckButtonPresenter::DrawMarkAnimation(void) +{ + Canvas* pCanvas = __pCheckButton->GetCanvasN(); + if (pCanvas == null) + { + SysLog(NID_UI_CTRL, "Cannot get a canvas."); + + return; + } + + _CheckButtonStatus checkStatus = __pCheckButton->GetCheckButtonStatus(); + + if (checkStatus == _CHECK_BUTTON_STATUS_NORMAL) + { + Bitmap* pMarkNormalBitmap = __pCheckButton->GetMarkBitmap(_CHECK_BUTTON_STATUS_NORMAL); + + if (__pCheckButton->IsSelected() && pMarkNormalBitmap) + { + FloatRectangle sourceRect(0.0f, 0.0f, pMarkNormalBitmap->GetWidthF() * __ratio * 0.1, pMarkNormalBitmap->GetHeightF()); + FloatRectangle destRect(__defaultButtonBounds.x, __defaultButtonBounds.y, pMarkNormalBitmap->GetWidthF() * __ratio * 0.1, pMarkNormalBitmap->GetHeightF()); + + pCanvas->DrawBitmap(destRect, *pMarkNormalBitmap, sourceRect); + } + } + else if (checkStatus == _CHECK_BUTTON_STATUS_DISABLED) + { + Bitmap* pMarkDisabledBitmap = __pCheckButton->GetMarkBitmap(_CHECK_BUTTON_STATUS_DISABLED); + + if (__pCheckButton->IsSelected() && pMarkDisabledBitmap) + { + FloatRectangle sourceRect(0.0f, 0.0f, pMarkDisabledBitmap->GetWidthF() * __ratio * 0.1, pMarkDisabledBitmap->GetHeightF()); + FloatRectangle destRect(__defaultButtonBounds.x, __defaultButtonBounds.y, pMarkDisabledBitmap->GetWidthF() * __ratio * 0.1, pMarkDisabledBitmap->GetHeightF()); + + pCanvas->DrawBitmap(destRect, *pMarkDisabledBitmap, sourceRect); + } + } + else if (checkStatus == _CHECK_BUTTON_STATUS_PRESSED) + { + Bitmap* pMarkPressedBitmap = __pCheckButton->GetMarkBitmap(_CHECK_BUTTON_STATUS_PRESSED); + + if (__pCheckButton->IsSelected() && pMarkPressedBitmap) + { + FloatRectangle sourceRect(0.0f, 0.0f, pMarkPressedBitmap->GetWidthF() * __ratio * 0.1, pMarkPressedBitmap->GetHeightF()); + FloatRectangle destRect(__defaultButtonBounds.x, __defaultButtonBounds.y, pMarkPressedBitmap->GetWidthF() * __ratio * 0.1, pMarkPressedBitmap->GetHeightF()); + + pCanvas->DrawBitmap(destRect, *pMarkPressedBitmap, sourceRect); + } + } + else if (checkStatus == _CHECK_BUTTON_STATUS_HIGHLIGHTED) + { + Bitmap* pMarkHighlightedBitmap = __pCheckButton->GetMarkBitmap(_CHECK_BUTTON_STATUS_HIGHLIGHTED); + + if (__pCheckButton->IsSelected() && pMarkHighlightedBitmap) + { + FloatRectangle sourceRect(0.0f, 0.0f, pMarkHighlightedBitmap->GetWidthF() * __ratio * 0.1, pMarkHighlightedBitmap->GetHeightF()); + FloatRectangle destRect(__defaultButtonBounds.x, __defaultButtonBounds.y, pMarkHighlightedBitmap->GetWidthF() * __ratio * 0.1, pMarkHighlightedBitmap->GetHeightF()); + + pCanvas->DrawBitmap(destRect, *pMarkHighlightedBitmap, sourceRect); + } + } + else if (checkStatus == _CHECK_BUTTON_STATUS_SELECTED) + { + Bitmap* pMarkSelectedBitmap = __pCheckButton->GetMarkBitmap(_CHECK_BUTTON_STATUS_SELECTED); + + if (__pCheckButton->IsSelected() && pMarkSelectedBitmap) + { + FloatRectangle sourceRect(0.0f, 0.0f, pMarkSelectedBitmap->GetWidthF() * __ratio * 0.1, pMarkSelectedBitmap->GetHeightF()); + FloatRectangle destRect(__defaultButtonBounds.x, __defaultButtonBounds.y, pMarkSelectedBitmap->GetWidthF() * __ratio * 0.1, pMarkSelectedBitmap->GetHeightF()); + + pCanvas->DrawBitmap(destRect, *pMarkSelectedBitmap, sourceRect); + } + } + + delete pCanvas; + + return; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_ColorChangeEvent.cpp b/src/ui/controls/FUiCtrl_ColorChangeEvent.cpp new file mode 100644 index 0000000..5609be7 --- /dev/null +++ b/src/ui/controls/FUiCtrl_ColorChangeEvent.cpp @@ -0,0 +1,131 @@ +// +// 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_ColorChangeEvent.cpp +* @brief This is the implementation for the _ColorChangeEvent class. +*/ + +#include +#include +#include +#include +#include "FUiCtrl_ColorChangeEvent.h" +#include "FUiCtrl_IColorChangeEventListener.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _OSP_EXPORT_ _ColorChangeEventArg + : public IEventArg + , public Object +{ +public: + _ColorChangeEventArg(const Color& color) + : __color(color) + { + } + + virtual ~_ColorChangeEventArg(void) + { + } + + const Color + GetColor(void) const + { + return __color; + } + +private: + _ColorChangeEventArg(const _ColorChangeEventArg&); + + _ColorChangeEventArg& operator=(const _ColorChangeEventArg&); + +private: + Color __color; +}; // _ColorChangeEventArg + +_ColorChangeEvent::_ColorChangeEvent(const _Control& source) + : __pSource(null) +{ + result r = _Event::Initialize(); + + // set event source + if (r == E_SUCCESS) + { + __pSource = &source; + } +} + +_ColorChangeEvent::~_ColorChangeEvent(void) +{ +} + +const _Control* +_ColorChangeEvent::GetSource(void) const +{ + return (__pSource); +} + +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 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 is used. The _ColorChangeEventArg instance is null."); + + pColorChangeListener->OnColorChanged(*__pSource, Color(pArg->GetColor())); + + return; +} + +_ColorChangeEvent* +_ColorChangeEvent::CreateInstanceN(const _Control& source) +{ + _ColorChangeEvent* pColorChangeEvent = new (std::nothrow) _ColorChangeEvent(source); + SysTryReturn(NID_UI_CTRL, pColorChangeEvent != null, null, E_OUT_OF_MEMORY, + "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + if (IsFailed(GetLastResult())) + { + delete pColorChangeEvent; + return null; + } + + return pColorChangeEvent; +} + +IEventArg* +_ColorChangeEvent::CreateColorChangeEventArgN(const Color& color) +{ + _ColorChangeEventArg* pEventArg = new (std::nothrow) _ColorChangeEventArg(color); + SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, + "[$s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + return pEventArg; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_ColorPicker.cpp b/src/ui/controls/FUiCtrl_ColorPicker.cpp new file mode 100644 index 0000000..25ff65e --- /dev/null +++ b/src/ui/controls/FUiCtrl_ColorPicker.cpp @@ -0,0 +1,715 @@ +// +// 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_ColorPicker.cpp +* @brief This file contains implementation of _ColorPicker class +* +* This file contains implementation of _ColorPicker class. +*/ + +#include +#include +#include "FUiAnim_VisualElement.h" +#include "FUiCtrl_ColorPicker.h" +#include "FUiCtrl_ColorPickerPresenter.h" +#include "FUiCtrl_IColorChangeEventListener.h" +#include "FUi_AccessibilityContainer.h" +#include "FUi_AccessibilityElement.h" +#include "FUi_ResourceManager.h" +#include "FUi_ResourceSizeInfo.h" +#include "FUi_CoordinateSystemUtils.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Animations; + +namespace Tizen { namespace Ui { namespace Controls +{ + +IMPLEMENT_PROPERTY(_ColorPicker); + +_ColorPicker::_ColorPicker(void) + : __pColorPickerPresenter(null) + , __pColorChangeEvent(null) + , __pHueHandler(null) + , __pSaturationHandler(null) + , __pLuminanceHandler(null) + , __pHueBarElement(null) + , __pSaturationBarElement(null) + , __pLuminanceBarElement(null) + , __currentFocusedHandler(HUE_HANDLER) + , __previousFocusedHandler(HSL_NOT) + , __isInFocusMode(false) +{ +} + +_ColorPicker::~_ColorPicker(void) +{ + delete __pColorPickerPresenter; + __pColorPickerPresenter = null; + + delete __pColorChangeEvent; + __pColorChangeEvent = null; + + if (__pHueHandler != null) + { + __pHueHandler->Destroy(); + __pHueHandler = null; + } + + if (__pSaturationHandler != null) + { + __pSaturationHandler->Destroy(); + __pSaturationHandler = null; + } + + if (__pLuminanceHandler != null) + { + __pLuminanceHandler->Destroy(); + __pLuminanceHandler = null; + } + + if (__pHueBarElement != null) + { + __pHueBarElement->Activate(false); + __pHueBarElement = null; + } + if (__pSaturationBarElement != null) + { + __pSaturationBarElement->Activate(false); + __pSaturationBarElement = null; + } + if (__pLuminanceBarElement != null) + { + __pLuminanceBarElement->Activate(false); + __pLuminanceBarElement = null; + } +} + +_ColorPicker* +_ColorPicker::CreateColorPickerN(void) +{ + result r = E_SUCCESS; + Dimension colorPickerSize; + _VisualElement* pBase = null; + int leftRightMargin = 0; + + _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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + r = GetLastResult(); + 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, + "[%s] Propagating.", GetErrorMessage(r)); + + pColorPicker->__pColorChangeEvent = _ColorChangeEvent::CreateInstanceN(*pColorPicker); + r = GetLastResult(); + 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, + "[E_SYSTEM] A system error has occurred. Failed to get the ColorPicker visual element."); + + // Set alpha merge to VisualElement + pBase->SetSurfaceOpaque(false); + pColorPicker->SetBackgroundColor(Color()); + + r = pColorPicker->SetSize(colorPickerSize); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pColorPicker->SetResizable(false); + + if (pColorPicker->GetAccessibilityContainer() != null) + { + pColorPicker->GetAccessibilityContainer()->Activate(true); + pColorPicker->InitializeAccessibilityElement(); + } + + return pColorPicker; + +CATCH: + delete pColorPicker; + return null; +} + +Color +_ColorPicker::GetColor(void) const +{ + Variant color = GetProperty("color"); + + return color.ToColor(); +} + +Variant +_ColorPicker::GetPropertyColor(void) const +{ + return Variant(__pColorPickerPresenter->GetColor()); +} + +int +_ColorPicker::GetHue(void) const +{ + Variant varHue = GetProperty("hue"); + + return varHue.ToInt(); +} + +Variant +_ColorPicker::GetPropertyHue(void) const +{ + return Variant(__pColorPickerPresenter->GetHue()); +} + +int +_ColorPicker::GetSaturation(void) const +{ + Variant varSaturation = GetProperty("saturation"); + + return varSaturation.ToInt(); +} + +Variant +_ColorPicker::GetPropertySaturation(void) const +{ + return Variant(__pColorPickerPresenter->GetSaturation()); +} + +int +_ColorPicker::GetLuminance(void) const +{ + Variant varLuminance = GetProperty("luminance"); + + return varLuminance.ToInt(); +} + +Variant +_ColorPicker::GetPropertyLuminance(void) const +{ + return Variant(__pColorPickerPresenter->GetLuminance()); +} + +result +_ColorPicker::SetColor(const Color& color) +{ + return SetProperty("color", Variant(color)); +} + +result +_ColorPicker::SetPropertyColor(const Variant& color) +{ + __pColorPickerPresenter->SetColor(color.ToColor()); + + return GetLastResult(); +} + +result +_ColorPicker::SetHue(int hue) +{ + return SetProperty("hue", Variant(hue)); +} + +result +_ColorPicker::SetPropertyHue(const Variant& hue) +{ + __pColorPickerPresenter->SetHue(hue.ToInt()); + + if (__pHueBarElement != null) + { + String hueValue; + hueValue.Append(__pColorPickerPresenter->GetHue()); + __pHueBarElement->SetValue(hueValue); + } + + return GetLastResult(); +} + +result +_ColorPicker::SetSaturation(int saturation) +{ + return SetProperty("saturation", Variant(saturation)); +} + +result +_ColorPicker::SetPropertySaturation(const Variant& saturation) +{ + __pColorPickerPresenter->SetSaturation(saturation.ToInt()); + + if (__pSaturationBarElement != null) + { + String saturationValue; + saturationValue.Append(__pColorPickerPresenter->GetSaturation()); + __pSaturationBarElement->SetValue(saturationValue); + } + + return GetLastResult(); +} + +result +_ColorPicker::SetLuminance(int luminance) +{ + return SetProperty("luminance", Variant(luminance)); +} + +result +_ColorPicker::SetPropertyLuminance(const Variant& luminance) +{ + __pColorPickerPresenter->SetLuminance(luminance.ToInt()); + + if (__pLuminanceBarElement != null) + { + String luminanceValue; + luminanceValue.Append(__pColorPickerPresenter->GetLuminance()); + __pLuminanceBarElement->SetValue(luminanceValue); + } + + return GetLastResult(); +} + +bool +_ColorPicker::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + __pColorPickerPresenter->ClearFocus(__currentFocusedHandler); + + return __pColorPickerPresenter->OnTouchPressed(source, touchinfo); +} + +bool +_ColorPicker::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pColorPickerPresenter->OnTouchMoved(source, touchinfo); +} + +bool +_ColorPicker::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pColorPickerPresenter->OnTouchReleased(source, touchinfo); +} + +bool +_ColorPicker::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pColorPickerPresenter->OnTouchCanceled(source, touchinfo); +} + +result +_ColorPicker::OnAttachedToMainTree(void) +{ + __pColorPickerPresenter->LoadDrawingProperties(GetBoundsF()); + + _VisualElement* pBase = GetVisualElement(); + + // Create All Handler + _ColorPickerComponentType handlerType = HUE_HANDLER; + + if (__pHueHandler == null) + { + __pHueHandler = __pColorPickerPresenter->CreateHandlerN(*pBase, handlerType); + } + + SysTryReturnResult(NID_UI_CTRL, __pHueHandler != null, E_SYSTEM, + "A system error has occurred. Failed to create hue handler."); + + handlerType = SAT_HANDLER; + + if (__pSaturationHandler == null) + { + __pSaturationHandler = __pColorPickerPresenter->CreateHandlerN(*pBase, handlerType); + } + + SysTryReturnResult(NID_UI_CTRL, __pSaturationHandler != null, E_SYSTEM, + "A system error has occurred. Failed to create saturation handler."); + + handlerType = LUM_HANDLER; + + if (__pLuminanceHandler == null) + { + __pLuminanceHandler = __pColorPickerPresenter->CreateHandlerN(*pBase, handlerType); + } + + SysTryReturnResult(NID_UI_CTRL, __pLuminanceHandler != null, E_SYSTEM, + "A system error has occurred. Failed to create luminance handler."); + + return E_SUCCESS; +} + +void +_ColorPicker::InitializeAccessibilityElement(void) +{ + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); + FloatRectangle floatBounds = GetClientBoundsF(); + float blockHeight = 0.0f; + + GET_SHAPE_CONFIG(COLORPICKER::BLOCK_HEIGHT, orientation, blockHeight); + + if (pContainer != null) + { + __pHueBarElement = new (std::nothrow) _AccessibilityElement(true); + 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"); + __pHueBarElement->SetHintWithStringId("IDS_TPLATFORM_BODY_FLICK_UP_AND_DOWN_TO_ADJUST_THE_POSITION_T_TTS"); + __pHueBarElement->SetSupportOperatingGesture(false); + __pHueBarElement->SetBounds(FloatRectangle(floatBounds.x, floatBounds.y, floatBounds.width, blockHeight)); + pContainer->AddElement(*__pHueBarElement); + + String hueValue; + hueValue.Append(__pColorPickerPresenter->GetHue()); + __pHueBarElement->SetValue(hueValue); + + __pSaturationBarElement = new (std::nothrow) _AccessibilityElement(true); + SysTryReturnVoidResult(NID_UI_CTRL, __pSaturationBarElement != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + __pSaturationBarElement->SetName(L"ColorPickerSaturationSlider"); + __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)); + pContainer->AddElement(*__pSaturationBarElement); + + String saturationValue; + saturationValue.Append(__pColorPickerPresenter->GetSaturation()); + __pSaturationBarElement->SetValue(saturationValue); + + __pLuminanceBarElement = new (std::nothrow) _AccessibilityElement(true); + SysTryReturnVoidResult(NID_UI_CTRL, __pLuminanceBarElement != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + __pLuminanceBarElement->SetName(L"ColorPickerBrightnessSlider"); + __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)); + pContainer->AddElement(*__pLuminanceBarElement); + + String luminanceValue; + luminanceValue.Append(__pColorPickerPresenter->GetLuminance()); + __pLuminanceBarElement->SetValue(luminanceValue); + + pContainer->AddListener(*this); + } + return; +} + +void +_ColorPicker::OnBoundsChanged(void) +{ + __pColorPickerPresenter->LoadDrawingProperties(GetBoundsF()); + return; +} + +void +_ColorPicker::OnChangeLayout(_ControlOrientation orientation) +{ + __pColorPickerPresenter->OnChangeLayout(orientation); + return; +} + +void +_ColorPicker::OnDraw(void) +{ + __pColorPickerPresenter->Draw(); + return; +} + +result +_ColorPicker::AddColorChangeEventListener(const _IColorChangeEventListener& listener) +{ + result r = __pColorChangeEvent->AddListener(listener); + + 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 +_ColorPicker::RemoveColorChangeEventListener(const _IColorChangeEventListener& listener) +{ + result r = __pColorChangeEvent->RemoveListener(listener); + + 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; +} + +result +_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)); + + __pColorChangeEvent->Fire(*pEventArg); + + return E_SUCCESS; +} + +_VisualElement* +_ColorPicker::GetHueHandler(void) +{ + return __pHueHandler; +} + +_VisualElement* +_ColorPicker::GetSaturationHandler(void) +{ + return __pSaturationHandler; +} + +_VisualElement* +_ColorPicker::GetLuminanceHandler(void) +{ + return __pLuminanceHandler; +} + +_AccessibilityElement* +_ColorPicker::GetAccessibilityElement(int elementId) +{ + _AccessibilityElement* pAccessibilityElement = null; + + if (likely(!(_AccessibilityManager::IsActivated()))) + { + return null; + } + + switch (elementId) + { + case HUE_BAR: + pAccessibilityElement = __pHueBarElement; + break; + case SAT_BAR: + pAccessibilityElement = __pSaturationBarElement; + break; + case LUM_BAR: + pAccessibilityElement = __pLuminanceBarElement; + break; + } + + return pAccessibilityElement; +} + +result +_ColorPicker::UpdateView(void) +{ + if (GetVisualElement() == null) + { + return E_SYSTEM; + } + + return GetVisualElement()->SetFlushNeeded(); +} + +bool +_ColorPicker::OnAccessibilityValueIncreased(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + if (!GetEnableState()) + { + return true; + } + String elementLabel = element.GetLabel(); + String string; + + if (elementLabel.Equals(L"Hue Slider", false)) + { + SetHue(GetHue() + 1); + string.Append(GetHue()); + } + else if (elementLabel.Equals(L"Saturation Slider", false)) + { + SetSaturation(GetSaturation() - 1); + string.Append(GetSaturation()); + } + else if (elementLabel.Equals(L"Luminance Slider", false)) + { + SetLuminance(GetLuminance() + 1); + string.Append(GetLuminance()); + } + + Invalidate(); + _AccessibilityManager::GetInstance()->ReadContent(string); + FireColorChangeEvent(GetColor()); + + return true; +} + +bool +_ColorPicker::OnAccessibilityValueDecreased(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + if (!GetEnableState()) + { + return true; + } + String elementLabel = element.GetLabel(); + String string; + + if (elementLabel.Equals(L"Hue Slider", false)) + { + SetHue(GetHue() - 1); + string.Append(GetHue()); + } + else if (elementLabel.Equals(L"Saturation Slider", false)) + { + SetSaturation(GetSaturation() + 1); + string.Append(GetSaturation()); + } + else if (elementLabel.Equals(L"Luminance Slider", false)) + { + SetLuminance(GetLuminance() - 1); + string.Append(GetLuminance()); + } + + Invalidate(); + _AccessibilityManager::GetInstance()->ReadContent(string); + + FireColorChangeEvent(GetColor()); + + return true; +} + +bool +_ColorPicker::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) +{ + _KeyCode keyCode = keyInfo.GetKeyCode(); + + if (!__isInFocusMode) + { + return false; + } + + switch (keyCode) + { + case _KEY_RIGHT: + __pColorPickerPresenter->StepHandler(__currentFocusedHandler, true); + break; + + case _KEY_LEFT: + __pColorPickerPresenter->StepHandler(__currentFocusedHandler, false); + break; + + case _KEY_DOWN: + if (__currentFocusedHandler < LUM_HANDLER) + { + __previousFocusedHandler = __currentFocusedHandler; + __currentFocusedHandler = static_cast<_ColorPickerComponentType>(static_cast(__currentFocusedHandler) + 1); + __pColorPickerPresenter->DrawFocus(__currentFocusedHandler, __previousFocusedHandler); + } + else if (__currentFocusedHandler == LUM_HANDLER) + { + return false; + } + break; + + case _KEY_UP: + if (__currentFocusedHandler > HUE_HANDLER) + { + __previousFocusedHandler = __currentFocusedHandler; + __currentFocusedHandler = static_cast<_ColorPickerComponentType>(static_cast(__currentFocusedHandler) - 1); + __pColorPickerPresenter->DrawFocus(__currentFocusedHandler, __previousFocusedHandler); + } + else if (__currentFocusedHandler == HUE_HANDLER) + { + return false; + } + break; + + default: + return false; + } + + return true; +} + +bool +_ColorPicker::OnFocusLost(const _Control& source) +{ + result r = E_SUCCESS; + r = __pColorPickerPresenter->ClearFocus(__currentFocusedHandler); + __previousFocusedHandler = HSL_NOT; + __currentFocusedHandler = HUE_HANDLER; + + if (r != E_SUCCESS) + { + SysLogException(NID_UI_CTRL, r, "[%s] Propagating.", GetErrorMessage(r)); + } + r = __pColorPickerPresenter->Draw(); + + if (r != E_SUCCESS) + { + SysLogException(NID_UI_CTRL, r, "[%s] Propagating.", GetErrorMessage(r)); + } + _Control::OnFocusLost(source); + + return true; +} + +void +_ColorPicker::OnDrawFocus(void) +{ + __pColorPickerPresenter->DrawFocus(__currentFocusedHandler, __previousFocusedHandler); + __isInFocusMode = true; + + return; +} + +void +_ColorPicker::OnFocusModeStateChanged(void) +{ + result r = E_SUCCESS; + + r = __pColorPickerPresenter->ClearFocus(__currentFocusedHandler); + __previousFocusedHandler = HSL_NOT; + __currentFocusedHandler = HUE_HANDLER; + __isInFocusMode = false; + + if (r != E_SUCCESS) + { + SysLogException(NID_UI_CTRL, r, "[%s] Propagating.", GetErrorMessage(r)); + } + Invalidate(); + + return; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_ColorPickerImpl.cpp b/src/ui/controls/FUiCtrl_ColorPickerImpl.cpp new file mode 100644 index 0000000..3525025 --- /dev/null +++ b/src/ui/controls/FUiCtrl_ColorPickerImpl.cpp @@ -0,0 +1,365 @@ +// +// 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_ColorPickerImpl.cpp +* @brief This file contains implementation of _ColorPickerImpl class +* +* This file contains implementation of _ColorPickerImpl class. +*/ + +#include "FUi_ResourceManager.h" +#include "FUi_ResourceSizeInfo.h" +#include "FUi_UiBuilder.h" +#include "FUiCtrl_ColorPickerImpl.h" +#include "FUiCtrl_ColorPickerPresenter.h" +#include "FUiCtrl_PublicColorChangeEvent.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Ui; + +namespace Tizen { namespace Ui { namespace Controls +{ + +Dimension +_ColorPickerImpl::ColorPickerSizeInfo::GetDefaultMaximumSize(_ControlOrientation orientation) const +{ + result r = E_SUCCESS; + Dimension colorPickerMaxSize; + int leftRightMargin = 0; + + 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; +} + +Dimension +_ColorPickerImpl::ColorPickerSizeInfo::GetDefaultMinimumSize(_ControlOrientation orientation) const +{ + 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_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; +} + +_ColorPickerImpl* +_ColorPickerImpl::GetInstance(ColorPicker& colorPicker) +{ + return static_cast<_ColorPickerImpl*>(colorPicker._pControlImpl); +} + +const _ColorPickerImpl* +_ColorPickerImpl::GetInstance(const ColorPicker& colorPicker) +{ + return static_cast(colorPicker._pControlImpl); +} + +_ColorPickerImpl::_ColorPickerImpl(ColorPicker& pPublic, _ColorPicker& pCore) + : _ControlImpl(&pPublic, &pCore) + , __pPublicColorChangeEvent(null) +{ + __pPublicColorChangeEvent = _PublicColorChangeEvent::CreateInstanceN(pPublic); + pCore.AddColorChangeEventListener(*this); +} + +_ColorPickerImpl::~_ColorPickerImpl(void) +{ + delete __pPublicColorChangeEvent; + __pPublicColorChangeEvent = null; +} + +_ColorPickerImpl* +_ColorPickerImpl::CreateColorPickerImplN(ColorPicker& control) +{ + ClearLastResult(); + int leftRightMargin = 0; + _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); + + _ColorPicker* pCore = _ColorPicker::CreateColorPickerN(); + 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); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + Dimension defaultSize; + 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) + { + defaultSize.width = _ControlManager::GetInstance()->GetScreenSize().width - 2 * leftRightMargin; + } + else + { + 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 Color +_ColorPickerImpl::GetColor(void) const +{ + ClearLastResult(); + + return GetCore().GetPropertyColor().ToColor(); +} + +const int +_ColorPickerImpl::GetHue(void) const +{ + ClearLastResult(); + + return GetCore().GetPropertyHue().ToInt(); +} + +const int +_ColorPickerImpl::GetSaturation(void) const +{ + ClearLastResult(); + + return GetCore().GetPropertySaturation().ToInt(); +} + +const int +_ColorPickerImpl::GetLuminance(void) const +{ + ClearLastResult(); + + return GetCore().GetPropertyLuminance().ToInt(); +} + +result +_ColorPickerImpl::SetColor(const Color& color) +{ + ClearLastResult(); + Variant varColor(color); + + return GetCore().SetPropertyColor(varColor); +} + +result +_ColorPickerImpl::SetHue(int hue) +{ + ClearLastResult(); + Variant varHue(hue); + + return GetCore().SetPropertyHue(varHue); +} + +result +_ColorPickerImpl::SetSaturation(int saturation) +{ + ClearLastResult(); + Variant varSaturation(saturation); + + return GetCore().SetPropertySaturation(varSaturation); +} + +result +_ColorPickerImpl::SetLuminance(int luminance) +{ + ClearLastResult(); + Variant varLuminance(luminance); + + return GetCore().SetPropertyLuminance(varLuminance); +} + +result +_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."); + + r = __pPublicColorChangeEvent->AddListener(listener); + + 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(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."); + + r = __pPublicColorChangeEvent->RemoveListener(listener); + + 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; +} + +ColorPicker& +_ColorPickerImpl::GetPublic(void) +{ + return static_cast (_ControlImpl::GetPublic()); +} + +const ColorPicker& +_ColorPickerImpl::GetPublic(void) const +{ + return static_cast (_ControlImpl::GetPublic()); +} + +_ColorPicker& +_ColorPickerImpl::GetCore(void) +{ + return static_cast <_ColorPicker&>(_ControlImpl::GetCore()); +} + +const _ColorPicker& +_ColorPickerImpl::GetCore(void) const +{ + return static_cast (_ControlImpl::GetCore()); +} + +const char* +_ColorPickerImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Controls::ColorPicker"; +} + +void +_ColorPickerImpl::OnColorChanged(const _Control& source, const Color& color) +{ + IEventArg* pColorChangeEventArg = _PublicColorChangeEvent::CreateColorChangeEventArgN(color); + if (pColorChangeEventArg == null) + { + return; + } + + __pPublicColorChangeEvent->Fire(*pColorChangeEventArg); + + return; +} + +class _ColorPickerMaker + : public _UiBuilderControlMaker +{ +public: + _ColorPickerMaker(_UiBuilder* pUibuilder) + : _UiBuilderControlMaker(pUibuilder) + { + } + + virtual ~_ColorPickerMaker(void) + { + } + + static _UiBuilderControlMaker* + GetInstance(_UiBuilder* uibuilder) + { + _ColorPickerMaker* pColorPickerMaker = new (std::nothrow) _ColorPickerMaker(uibuilder); + return pColorPickerMaker; + } + +protected: + virtual Control* + Make(_UiBuilderControl* pControl) + { + result r = E_SUCCESS; + _UiBuilderControlLayout* pControlProperty = null; + ColorPicker* pColorPicker = null; + FloatPoint point; + FloatRectangle rect; + + GetProperty(pControl, &pControlProperty); + 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, + "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + rect = pControlProperty->GetRectF(); + + point.x = rect.x; + point.y = rect.y; + + r = pColorPicker->Construct(point); + if (r != E_SUCCESS) + { + delete pColorPicker; + return null; + } + + return pColorPicker; + } +}; + +_ColorPickerRegister::_ColorPickerRegister(void) +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->RegisterControl(L"ColorPicker", _ColorPickerMaker::GetInstance); +} + +_ColorPickerRegister::~_ColorPickerRegister(void) +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->UnregisterControl(L"ColorPicker"); +} + +static _ColorPickerRegister ColorPickerRegisterToUiBuilder; +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_ColorPickerModel.cpp b/src/ui/controls/FUiCtrl_ColorPickerModel.cpp new file mode 100644 index 0000000..224088c --- /dev/null +++ b/src/ui/controls/FUiCtrl_ColorPickerModel.cpp @@ -0,0 +1,342 @@ +// +// 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_ColorPickerModel.cpp +* @brief This file contains implementation of _ColorPickerModel class +* +* This file contains implementation of _ColorPickerModel class. +*/ + +#include +#include +#include "FUiCtrl_ColorPickerModel.h" +#include "FUiCtrl_ColorPickerPresenter.h" + +using namespace Tizen::Graphics; + +const double MAX_COLOR_DEGREE = 255.0; +const double MIN_VALUE = 0.0; +const double MAX_VALUE = 1.0; +const double MAX_HUE_VALUE = 0.999999; +const double STANDARD_SATURATION_VALUE = 1.0; +const double STANDARD_LUMINANCE_VALUE = 0.5; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_ColorPickerModel::_ColorPickerModel(void) + : __hue(MIN_VALUE) + , __sat(MIN_VALUE) + , __lum(MIN_VALUE) + , __color(Color::GetColor(COLOR_ID_BLACK)) +{ +} + +_ColorPickerModel::~_ColorPickerModel() +{ +} + +_ColorPickerModel* +_ColorPickerModel::CreateInstanceN(void) +{ + _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())) + { + delete pColorPickerModel; + return null; + } + + return pColorPickerModel; +} + +double +_ColorPickerModel::GetHue(void) const +{ + return __hue; +} + +double +_ColorPickerModel::GetSaturation(void) const +{ + return __sat; +} + +double +_ColorPickerModel::GetLuminance(void) const +{ + return __lum; +} + +void +_ColorPickerModel::SetHue(double hueValue) +{ + if (hueValue > MAX_HUE_VALUE) + { + __hue = MAX_VALUE; + } + else if (hueValue < MIN_VALUE) + { + __hue = MIN_VALUE; + } + else + { + __hue = hueValue; + } + CalulateColor(); + + return; +} + +void +_ColorPickerModel::SetSaturation(double saturationValue) +{ + if (saturationValue > MAX_VALUE) + { + __sat = MAX_VALUE; + } + else if (saturationValue < MIN_VALUE) + { + __sat = MIN_VALUE; + } + else + { + __sat = saturationValue; + } + CalulateColor(); + + return; +} + +void +_ColorPickerModel::SetLuminance(double luminanceValue) +{ + if (luminanceValue > MAX_VALUE) + { + __lum = MAX_VALUE; + } + else if (luminanceValue < MIN_VALUE) + { + __lum = MIN_VALUE; + } + else + { + __lum = luminanceValue; + } + CalulateColor(); + + return; +} + +Color +_ColorPickerModel::GetHueColor(void) const +{ + Color color; + + ConvertHSLToRGB(__hue, STANDARD_SATURATION_VALUE, STANDARD_LUMINANCE_VALUE, color); + + return color; +} + +Color +_ColorPickerModel::GetSaturationColor(void) const +{ + Color color; + + ConvertHSLToRGB(__hue, __sat, STANDARD_LUMINANCE_VALUE, color); + + return color; +} + +Color +_ColorPickerModel::GetColor(void) const +{ + return __color; +} + +void +_ColorPickerModel::SetColor(const Color& color) +{ + __color = color; + + ConvertRGBToHSL(__color, __hue, __sat, __lum); + + return; +} + +void +_ColorPickerModel::CalulateColor(void) +{ + ConvertHSLToRGB(__hue, __sat, __lum, __color); + + return; +} + +void +_ColorPickerModel::ConvertRGBToHSL(const Color& color, double& h, double& s, double& l) +{ + h = 0.0; + s = 0.0; + l = 0.0; + + double normalizeR = (double)color.GetRed() / MAX_COLOR_DEGREE; + double normalizeG = (double)color.GetGreen() / MAX_COLOR_DEGREE; + double normalizeB = (double)color.GetBlue() / MAX_COLOR_DEGREE; + double max = (normalizeR > normalizeG) ? ((normalizeR > normalizeB) ? normalizeR : normalizeB) + : ((normalizeG > normalizeB) ? normalizeG : normalizeB); + double min = (normalizeR > normalizeG) ? ((normalizeG > normalizeB) ? normalizeB : normalizeG) + : ((normalizeR > normalizeB) ? normalizeB : normalizeR); + double diff = max - min; + + l = (min + max) / 2.0; + + if (diff <= 0.0) + { + return; + } + + s = diff / ((l <= STANDARD_LUMINANCE_VALUE) ? (max + min) : (2.0 - max - min)); + + if (normalizeR >= max) + { + if (normalizeG <= min) + { + h = 5.0 + (max - normalizeB) / diff; + } + else + { + h = 1.0 - (max - normalizeG) / diff; + } + } + else if (normalizeG >= max) + { + if (normalizeB <= min) + { + h = 1.0 + (max - normalizeR) / diff; + } + else + { + h = 3.0 - (max - normalizeB) / diff; + } + } + else + { + if (normalizeR <= min) + { + h = 3.0 + (max - normalizeG) / diff; + } + else + { + h = 5.0 - (max - normalizeR) / diff; + } + } + + h /= 6.0; + + return; +} + +void +_ColorPickerModel::ConvertHSLToRGB(double h, double s, double l, Color& color) +{ + result r = E_SUCCESS; + double v = 0.0; + double normalizeR = 0.0; + double normalizeG = 0.0; + double normalizeB = 0.0; + + normalizeR = l; + normalizeG = l; + normalizeB = l; + + v = (l <= STANDARD_LUMINANCE_VALUE) ? (l + l * s) : (l + s - l * s); + + if (h > MAX_HUE_VALUE) + { + h = MAX_HUE_VALUE; + } + + if (v > 0) + { + double m = l + l - v; + + h *= 6.0; + + int sextant = (int) h; + double fract = h - sextant; + double vsf = (v - m) * fract; + double mid1 = m + vsf; + double mid2 = v - vsf; + + switch (sextant) + { + case 0: + normalizeR = v; + normalizeG = mid1; + normalizeB = m; + break; + + case 1: + normalizeR = mid2; + normalizeG = v; + normalizeB = m; + break; + + case 2: + normalizeR = m; + normalizeG = v; + normalizeB = mid1; + break; + + case 3: + normalizeR = m; + normalizeG = mid2; + normalizeB = v; + break; + + case 4: + normalizeR = mid1; + normalizeG = m; + normalizeB = v; + break; + + case 5: + normalizeR = v; + normalizeG = m; + normalizeB = mid2; + break; + + default: + r = E_SYSTEM; + break; + } + + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[E_SYSTEM] A system error has occurred. Hue value is out of range."); + } + + color.SetColorComponents((byte)(normalizeR * MAX_COLOR_DEGREE), // red + (byte)(normalizeG * MAX_COLOR_DEGREE), // green + (byte)(normalizeB * MAX_COLOR_DEGREE), // blue + (byte)(MAX_COLOR_DEGREE)); // alpha + + return; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_ColorPickerPresenter.cpp b/src/ui/controls/FUiCtrl_ColorPickerPresenter.cpp new file mode 100644 index 0000000..d0b57ae --- /dev/null +++ b/src/ui/controls/FUiCtrl_ColorPickerPresenter.cpp @@ -0,0 +1,1484 @@ +// +// 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_ColorPickerPresenter.cpp + * @brief This is the implementation file for the FUiCtrl_ColorPickerPresenter class. + */ + +#include +#include +#include +#include +#include "FUiAnim_VisualElement.h" +#include "FUiCtrl_ColorPickerPresenter.h" +#include "FUiCtrl_ColorPickerModel.h" +#include "FUiCtrl_ColorPicker.h" +#include "FUi_AccessibilityElement.h" +#include "FUi_UiTouchEvent.h" +#include "FUi_ResourceManager.h" +#include "FUi_CoordinateSystemUtils.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Animations; +using namespace Tizen::Base::Utility; + +const int ARROW_MOVE_STEP = 5; +const int SLIDE_ACTIVATION_TIME = 500; +const int SLIDE_MOVE_TIME = 60; +const double MAX_VALUE_DEGREE = 100.0; +const double MIN_VALUE = 0.0; +const double MAX_VALUE = 1.0; + +namespace Tizen { namespace Ui { namespace Controls +{ + +union _Color32 +{ + unsigned int color32; + struct + { + byte b; + byte g; + byte r; + byte a; + } colorArgb; +}; + +_ColorPickerPresenter::_ColorPickerPresenter(_ColorPicker& colorPicker) + : __pColorPicker(&colorPicker) + , __pColorPickerModel(null) + , __eventType(HSL_NOT) + , __topMargin(0.0f) + , __blockMargin(0.0f) + , __blockHeight(0.0f) + , __dividerMargin(0.0f) + , __dividerWidth(0.0f) + , __hueColor(0) + , __saturationColor(0) + , __pSlideTimer(null) + , __pHueSliderBgBitmap(null) + , __pCustomBitmap(null) + , __pLuminanceSliderBgBitmap(null) + , __pSaturationSliderBgBitmap(null) + , __pColorNormalReplacementBgBitmap(null) + , __pColorPressedReplacementBgBitmap(null) + , __pColorDisabledReplacementBgBitmap(null) + , __pNormalEffectBgBitmap(null) + , __pPressedEffectBgBitmap(null) + , __pDisabledEffectBgBitmap(null) + , __pLeftArrowNormalBitmap(null) + , __pLeftArrowPressedBitmap(null) + , __pLeftArrowDisabledBitmap(null) + , __pRightArrowNormalBitmap(null) + , __pRightArrowPressedBitmap(null) + , __pRightArrowDisabledBitmap(null) + , __pHandlerBitmap(null) + , __pLandscapeHueSliderBgBitmap(null) + , __pLandscapeCustomBitmap(null) + , __pLandscapeLuminanceSliderBgBitmap(null) + , __pLandscapeSaturationSliderBgBitmap(null) + , __pFocusBitmap(null) +{ +} + +_ColorPickerPresenter::~_ColorPickerPresenter(void) +{ + __pColorPicker = null; + + delete __pColorPickerModel; + __pColorPickerModel = null; + + if (__pSlideTimer != null) + { + __pSlideTimer->Cancel(); + delete __pSlideTimer; + __pSlideTimer = null; + } + + delete __pHueSliderBgBitmap; + __pHueSliderBgBitmap = null; + + delete __pCustomBitmap; + __pCustomBitmap = null; + + delete __pLuminanceSliderBgBitmap; + __pLuminanceSliderBgBitmap = null; + + delete __pSaturationSliderBgBitmap; + __pSaturationSliderBgBitmap = null; + + delete __pColorNormalReplacementBgBitmap; + __pColorNormalReplacementBgBitmap = null; + + delete __pColorPressedReplacementBgBitmap; + __pColorPressedReplacementBgBitmap = null; + + delete __pColorDisabledReplacementBgBitmap; + __pColorDisabledReplacementBgBitmap = null; + + delete __pNormalEffectBgBitmap; + __pNormalEffectBgBitmap = null; + + delete __pPressedEffectBgBitmap; + __pPressedEffectBgBitmap = null; + + delete __pDisabledEffectBgBitmap; + __pDisabledEffectBgBitmap = 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 __pHandlerBitmap; + __pHandlerBitmap = null; + + delete __pLandscapeHueSliderBgBitmap; + __pLandscapeHueSliderBgBitmap = null; + + delete __pLandscapeCustomBitmap; + __pLandscapeCustomBitmap = null; + + delete __pLandscapeLuminanceSliderBgBitmap; + __pLandscapeLuminanceSliderBgBitmap = null; + + delete __pLandscapeSaturationSliderBgBitmap; + __pLandscapeSaturationSliderBgBitmap = null; + + delete __pFocusBitmap; + __pFocusBitmap = null; +} + +_ColorPickerPresenter* +_ColorPickerPresenter::CreateInstanceN(_ColorPicker& colorPicker) +{ + _ColorPickerPresenter* pColorPickerPresenter = new (std::nothrow) _ColorPickerPresenter(colorPicker); + 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)); + + pColorPickerPresenter->__pColorPickerModel = _ColorPickerModel::CreateInstanceN(); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, pColorPickerPresenter->__pColorPickerModel != null, , r, + "[%s] Propagating.", GetErrorMessage(r)); + + // Set initial value. + pColorPickerPresenter->__pColorPickerModel->SetHue(MIN_VALUE); + pColorPickerPresenter->__pColorPickerModel->SetSaturation(MAX_VALUE); + pColorPickerPresenter->__pColorPickerModel->SetLuminance(MIN_VALUE); + + r = pColorPickerPresenter->LoadResource(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to load the ColorPicker resources."); + + return pColorPickerPresenter; +CATCH: + delete pColorPickerPresenter; + return null; +} + +_VisualElement* +_ColorPickerPresenter::CreateHandlerN(_VisualElement& rootElement, _ColorPickerComponentType handlerType) +{ + 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, + "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + r = pHandler->Construct(); + 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); + + pHandler->SetImplicitAnimationEnabled(false); + + pHandler->SetBounds(CoordinateSystem::AlignToDevice(FloatRectangle(bounds.x + handlerBounds.x, bounds.y + handlerBounds.y, handlerWidth, handlerHeight))); + pHandler->SetShowState(true); + pHandler->SetBackBufferEnabled(true); + + pHandler->SetRedrawOnResizeEnabled(true); + pHandler->SetSurfaceOpaque(false); + + r = rootElement.AttachChild(*pHandler); + 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)); + + pCanvas->SetBackgroundColor(Color()); + pCanvas->Clear(); + isCustomBitmap = IS_CUSTOM_BITMAP(COLORPICKER::HANDLER_NORMAL); + DrawResourceBitmap(*pCanvas, FloatRectangle(0, 0, handlerWidth, handlerHeight), __pHandlerBitmap, isCustomBitmap, true); + + delete pCanvas; + + return pHandler; +CATCH: + pHandler->Destroy(); + return null; +} + +result +_ColorPickerPresenter::Draw(void) +{ + Canvas* pCanvas = __pColorPicker->GetCanvasN(); + if (pCanvas == null) + { + SetLastResult(E_SYSTEM); + return E_SYSTEM; + } + + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + + DrawLine(*pCanvas); + DrawArrowButtons(*pCanvas); + + DrawHueSlider(*pCanvas); + MoveHandler(HUE_HANDLER); + + DrawSaturationSlider(*pCanvas); + MoveHandler(SAT_HANDLER); + + DrawLuminanceSlider(*pCanvas); + MoveHandler(LUM_HANDLER); + + delete pCanvas; + pCanvas = null; + + return E_SUCCESS; +} + +Color +_ColorPickerPresenter::GetColor(void) const +{ + return __pColorPickerModel->GetColor(); +} + +int +_ColorPickerPresenter::GetHue(void) const +{ + int hueValue = Math::Round((double) __pColorPickerModel->GetHue() * MAX_VALUE_DEGREE); + return hueValue; +} + +int +_ColorPickerPresenter::GetSaturation(void) const +{ + int saturationValue = Math::Round((double) __pColorPickerModel->GetSaturation() * MAX_VALUE_DEGREE); + return saturationValue; +} + +int +_ColorPickerPresenter::GetLuminance(void) const +{ + int luminanceValue = Math::Round((double) __pColorPickerModel->GetLuminance() * MAX_VALUE_DEGREE); + return luminanceValue; +} + +void +_ColorPickerPresenter::SetColor(const Color& color) +{ + __pColorPickerModel->SetColor(color); + SetHandlerPositionByRatio(HUE_HANDLER, __pColorPickerModel->GetHue()); + SetHandlerPositionByRatio(SAT_HANDLER, __pColorPickerModel->GetSaturation()); + SetHandlerPositionByRatio(LUM_HANDLER, __pColorPickerModel->GetLuminance()); + + return; +} + +result +_ColorPickerPresenter::SetHue(int hue) +{ + 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()); + + return E_SUCCESS; +} + +result +_ColorPickerPresenter::SetSaturation(int saturation) +{ + 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()); + + return E_SUCCESS; +} + +result +_ColorPickerPresenter::SetLuminance(int luminance) +{ + 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()); + + return E_SUCCESS; +} + +void +_ColorPickerPresenter::LoadDrawingProperties(const FloatRectangle& controlBounds) +{ + const int _BLOCK_COUNT = 3; + float arrowButtonTopMargin = 0.0f; + float barTopMargin = 0.0f; + float barLeftRightMargin = 0.0f; + float sliderHeight = 0.0f; + float sliderWidth = 0.0f; + + _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); + + 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); + GET_SHAPE_CONFIG(COLORPICKER::SLIDER_HEIGHT, orientation, sliderHeight); + 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); + + __blockMargin = CoordinateSystem::ConvertToLogicalY(__blockMargin); + __topMargin = (controlBounds.height - __blockHeight * _BLOCK_COUNT) / 2.0f; + + if (__topMargin < 0) + { + __topMargin = 0; + } + + float arrowButtonWidth = 0.0f; + float arrowButtonHeight = 0.0f; + + GET_SHAPE_CONFIG(COLORPICKER::ARROW_BUTTON_WIDTH, orientation, arrowButtonWidth); + GET_SHAPE_CONFIG(COLORPICKER::ARROW_BUTTON_HEIGHT, orientation, arrowButtonHeight); + + float handlerWidth = 0.0f; + float handlerHeight = 0.0f; + + GET_SHAPE_CONFIG(COLORPICKER::HANDLER_WIDTH, orientation, handlerWidth); + GET_SHAPE_CONFIG(COLORPICKER::HANDLER_HEIGHT, orientation, handlerHeight); + + float btnStartY = arrowButtonTopMargin + __topMargin; + float barStartY = barTopMargin + __topMargin; + + GET_SHAPE_CONFIG(COLORPICKER::BAR_WIDTH, orientation, sliderWidth); + + float colorpickerWidth = __pColorPicker->GetBoundsF().width; + __dividerWidth = colorpickerWidth - 2 * __dividerMargin; + + //Set contents position + __componentBounds[HUE_BAR].SetBounds((colorpickerWidth - sliderWidth) / 2, 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_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_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); + + float differentialY = (handlerHeight - sliderHeight) / 2.0f; + + __componentBounds[HUE_HANDLER].SetBounds( + __componentBounds[HUE_BAR].x + (__componentBounds[HUE_BAR].width - handlerWidth) * __pColorPickerModel->GetHue(), + __componentBounds[HUE_BAR].y - differentialY, + handlerWidth, + handlerHeight); + + __componentBounds[SAT_HANDLER].SetBounds( + __componentBounds[SAT_BAR].x + (__componentBounds[SAT_BAR].width - handlerWidth) * (MAX_VALUE - __pColorPickerModel->GetSaturation()), + __componentBounds[SAT_BAR].y - differentialY, + handlerWidth, + handlerHeight); + + __componentBounds[LUM_HANDLER].SetBounds( + __componentBounds[LUM_BAR].x + (__componentBounds[LUM_BAR].width - handlerWidth) * __pColorPickerModel->GetLuminance(), + __componentBounds[LUM_BAR].y - differentialY, + handlerWidth, + handlerHeight); + + return; +} + +void +_ColorPickerPresenter::OnChangeLayout(_ControlOrientation orientation) +{ + FloatDimension 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()) + { + __pColorPicker->SetResizable(true); + __pColorPicker->SetSize(colorPickerSize); + __pColorPicker->SetResizable(false); + } + return; +} + +bool +_ColorPickerPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + FloatPoint point = touchinfo.GetCurrentPosition(); + __eventType = GetTouchActionType(point); + + if (__eventType >= HUE_ARROWLEFT && __eventType <= LUM_ARROWRIGHT) + { + FloatRectangle buttonBounds = __componentBounds[__eventType]; + Canvas* pCanvas = __pColorPicker->GetCanvasN(); + if (pCanvas != null) + { + DrawArrowButton(*pCanvas, buttonBounds, true, IsLeftButton(__eventType)); + delete pCanvas; + __pColorPicker->UpdateView(); + } + TouchButton(); + + if (__pSlideTimer == null) + { + __pSlideTimer = new (std::nothrow) Timer(); + if (__pSlideTimer == null) + { + return false; + } + + result r = __pSlideTimer->Construct(*this); + if (r != E_SUCCESS) + { + delete __pSlideTimer; + __pSlideTimer = null; + + return false; + } + } + __pSlideTimer->Start(SLIDE_ACTIVATION_TIME); + } + else if (__eventType >= HUE_HANDLER && __eventType <= LUM_HANDLER) + { + TouchHandler(point.x); + } + + return false; +} + +bool +_ColorPickerPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + if (__eventType >= HUE_HANDLER && __eventType <= LUM_HANDLER) + { + TouchHandler(touchinfo.GetCurrentPosition().x); + } + + return false; +} + +bool +_ColorPickerPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + if (__pSlideTimer != null) + { + __pSlideTimer->Cancel(); + } + if(__eventType >= HUE_ARROWLEFT && __eventType <= LUM_ARROWRIGHT) + { + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pColorPicker); + } + + if (__eventType >= HUE_HANDLER && __eventType <= LUM_HANDLER) + { + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pColorPicker); + TouchHandler(touchinfo.GetCurrentPosition().x); + __eventType = HSL_NOT; + } + else + { + __eventType = HSL_NOT; + __pColorPicker->Draw(); + } + + return false; +} + +bool +_ColorPickerPresenter::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + return OnTouchReleased(source, touchinfo); +} + +void +_ColorPickerPresenter::OnTimerExpired(Timer& timer) +{ + if (__eventType >= HUE_ARROWLEFT && __eventType <= LUM_ARROWRIGHT) + { + TouchButton(); + } + + timer.Start(SLIDE_MOVE_TIME); +} + +result +_ColorPickerPresenter::LoadResource(void) +{ + result r = E_SUCCESS; + Color buttonNormalColor; + Color buttonPressedColor; + Color buttonDisabledColor; + Color buttonBgNormalColor; + Color buttonBgPressedColor; + Color buttonBgDisabledColor; + Color handlerHighlightedColor; + + r = GET_COLOR_CONFIG(COLORPICKER::ARROW_BUTTON_BG_NORMAL, buttonBgNormalColor); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GET_COLOR_CONFIG(COLORPICKER::ARROW_BUTTON_BG_PRESSED, buttonBgPressedColor); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GET_COLOR_CONFIG(COLORPICKER::ARROW_BUTTON_BG_DISABLED, buttonBgDisabledColor); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GET_COLOR_CONFIG(COLORPICKER::ARROW_BUTTON_NORMAL, buttonNormalColor); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GET_COLOR_CONFIG(COLORPICKER::ARROW_BUTTON_PRESSED, buttonPressedColor); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GET_COLOR_CONFIG(COLORPICKER::ARROW_BUTTON_DISABLED, buttonDisabledColor); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GET_COLOR_CONFIG(COLORPICKER::HANDLER_HIGHLIGHTED, handlerHighlightedColor); + 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)); + + 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)); + + 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)); + + 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)); + + 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)); + + 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)); + + 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)); + + 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_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pNormalEffectBgBitmap); + 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)); + + 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)); + + 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_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_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_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_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_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_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)); + + 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)); + + 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)); + + 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)); + + + return r; + +CATCH: + delete __pHueSliderBgBitmap; + __pHueSliderBgBitmap = null; + + delete __pCustomBitmap; + __pCustomBitmap = null; + + delete __pLuminanceSliderBgBitmap; + __pLuminanceSliderBgBitmap = null; + + delete __pSaturationSliderBgBitmap; + __pSaturationSliderBgBitmap = null; + + delete __pColorNormalReplacementBgBitmap; + __pColorNormalReplacementBgBitmap = null; + + delete __pColorPressedReplacementBgBitmap; + __pColorPressedReplacementBgBitmap = null; + + delete __pColorDisabledReplacementBgBitmap; + __pColorDisabledReplacementBgBitmap = null; + + delete __pNormalEffectBgBitmap; + __pNormalEffectBgBitmap = null; + + delete __pPressedEffectBgBitmap; + __pPressedEffectBgBitmap = null; + + delete __pDisabledEffectBgBitmap; + __pDisabledEffectBgBitmap = 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 __pFocusBitmap; + __pFocusBitmap = null; + + return r; +} + +void +_ColorPickerPresenter::StepHandler(_ColorPickerComponentType index, bool increase) +{ + if (increase) + { + SetHandlerPosition(index, __componentBounds[index].x + ARROW_MOVE_STEP); + } + else + { + SetHandlerPosition(index, __componentBounds[index].x - ARROW_MOVE_STEP); + } + + MoveHandler(index); + ChangeColorFromCurrentHandlerPosition(index); +} + +result +_ColorPickerPresenter::DrawFocus(_ColorPickerComponentType currentFocusedIndex, _ColorPickerComponentType prevFocusIndex) +{ + result r = E_SUCCESS; + bool isCustomBitmap = IS_CUSTOM_BITMAP(COLORPICKER::HANDLER_HIGHLIGHTED); + + if (prevFocusIndex != HSL_NOT) + { + ClearFocus(prevFocusIndex); + } + + switch (currentFocusedIndex) + { + case HUE_HANDLER: + { + 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, isCustomBitmap, true); + delete pCanvas; + } + break; + case SAT_HANDLER: + { + 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, isCustomBitmap, true); + delete pCanvas; + } + break; + case LUM_HANDLER: + { + 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, isCustomBitmap, true); + delete pCanvas; + } + break; + default: + break; + } + + return r; +} + +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(); + r = GetLastResult(); + 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, isCustomBitmap, true); + delete pCanvas; + } + break; + case SAT_HANDLER: + { + Canvas* pCanvas = __pColorPicker->GetSaturationHandler()->GetCanvasN(); + r = GetLastResult(); + 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, isCustomBitmap, true); + delete pCanvas; + } + break; + case LUM_HANDLER: + { + Canvas* pCanvas = __pColorPicker->GetLuminanceHandler()->GetCanvasN(); + r = GetLastResult(); + 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, isCustomBitmap, true); + delete pCanvas; + } + break; + default: + break; + } + + return r; +} + +result +_ColorPickerPresenter::DrawHueSlider(Canvas& canvas) +{ + result r = E_SUCCESS; + + _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); + + if (__pHueSliderBgBitmap != null && orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + r = DrawResourceBitmap(canvas, __componentBounds[HUE_BAR], __pHueSliderBgBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + else if (__pLandscapeHueSliderBgBitmap != null && orientation == _CONTROL_ORIENTATION_LANDSCAPE) + { + r = DrawResourceBitmap(canvas, __componentBounds[HUE_BAR], __pLandscapeHueSliderBgBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + + return r; +} + +result +_ColorPickerPresenter::DrawLuminanceSlider(Canvas& canvas) +{ + result r = E_SUCCESS; + Bitmap* pColorReplacementBitmap = null; + _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); + + canvas.SetBackgroundColor(Color(0, 0, 0, 0)); + canvas.Clear(__componentBounds[LUM_BAR]); + + if (__pCustomBitmap != null && __pLuminanceSliderBgBitmap != null && orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + pColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pCustomBitmap, Color::GetColor(COLOR_ID_MAGENTA), __pColorPickerModel->GetSaturationColor()); + r = GetLastResult(); + 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)); + + r = DrawResourceBitmap(canvas, __componentBounds[LUM_BAR], __pLuminanceSliderBgBitmap); + 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(); + 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)); + + r = DrawResourceBitmap(canvas, __componentBounds[LUM_BAR], __pLandscapeLuminanceSliderBgBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + __saturationColor = __pColorPickerModel->GetSaturationColor(); + + delete pColorReplacementBitmap; + pColorReplacementBitmap = null; + + return r; + +CATCH: + + delete pColorReplacementBitmap; + pColorReplacementBitmap = null; + + return r; +} + +result +_ColorPickerPresenter::DrawSaturationSlider(Canvas& canvas) +{ + result r = E_SUCCESS; + Bitmap* pColorReplacementBitmap = null; + _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); + + canvas.SetBackgroundColor(Color(0, 0, 0, 0)); + canvas.Clear(__componentBounds[SAT_BAR]); + + if (__pCustomBitmap != null && __pSaturationSliderBgBitmap != null && orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + pColorReplacementBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pCustomBitmap, Color::GetColor(COLOR_ID_MAGENTA), __pColorPickerModel->GetHueColor()); + r = GetLastResult(); + 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)); + + r = DrawResourceBitmap(canvas, __componentBounds[SAT_BAR], __pSaturationSliderBgBitmap); + 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(); + 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)); + + r = DrawResourceBitmap(canvas, __componentBounds[SAT_BAR], __pLandscapeSaturationSliderBgBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + __hueColor = __pColorPickerModel->GetHueColor(); + + delete pColorReplacementBitmap; + pColorReplacementBitmap = null; + + return r; + +CATCH: + + delete pColorReplacementBitmap; + pColorReplacementBitmap = null; + + return r; +} + +result +_ColorPickerPresenter::DrawLine(Canvas& canvas) +{ + if (__blockMargin <= 0) + { + return E_SUCCESS; + } + + result r = E_SUCCESS; + Color foregroundColor = canvas.GetForegroundColor(); + Color dividerTopHalfColor; + Color dividerBottomHalfColor; + + r = GET_COLOR_CONFIG(COLORPICKER::DIVIDER_TOP_HALF, dividerTopHalfColor); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = GET_COLOR_CONFIG(COLORPICKER::DIVIDER_BOTTOM_HALF, dividerBottomHalfColor); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + canvas.SetForegroundColor(dividerTopHalfColor); + canvas.SetLineStyle(LINE_STYLE_SOLID); + + FloatPoint startPoint = CoordinateSystem::AlignToDevice(FloatPoint(__dividerMargin, __topMargin + __blockHeight - __blockMargin)); + FloatPoint endPoint = CoordinateSystem::AlignToDevice(FloatPoint(__dividerMargin + __dividerWidth, __topMargin + __blockHeight - __blockMargin)); + + r = canvas.DrawLine(startPoint, endPoint); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + 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); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + canvas.SetForegroundColor(dividerBottomHalfColor); + + startPoint = CoordinateSystem::AlignToDevice(FloatPoint(__dividerMargin, __topMargin + __blockHeight)); + endPoint = CoordinateSystem::AlignToDevice(FloatPoint(__dividerMargin + __dividerWidth, __topMargin + __blockHeight)); + + r = canvas.DrawLine(startPoint, endPoint); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + startPoint = CoordinateSystem::AlignToDevice(FloatPoint(__dividerMargin, __topMargin + (__blockHeight * 2.0f))); + endPoint = CoordinateSystem::AlignToDevice(FloatPoint(__dividerMargin + __dividerWidth, __topMargin + (__blockHeight * 2.0f))); + + r = canvas.DrawLine(startPoint, endPoint); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + canvas.SetForegroundColor(foregroundColor); + + return r; +} + +result +_ColorPickerPresenter::DrawArrowButton(Canvas& canvas, const FloatRectangle& rcButton, bool isSelected, bool drawLeftButton) +{ + result r = E_SUCCESS; + bool isCustomBitmap = false; + _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); + + FloatDimension rightLeftArrowIconSize; + GET_DIMENSION_CONFIG(COLORPICKER::ARROW_BUTTON_ARROW_ICON_SIZE, orientation, rightLeftArrowIconSize); + + FloatRectangle rightLeftArrowIconBounds; + rightLeftArrowIconBounds.x = rcButton.x + (rcButton.width - rightLeftArrowIconSize.width) / 2.0f; + rightLeftArrowIconBounds.y = rcButton.y + (rcButton.height - rightLeftArrowIconSize.height) / 2.0f; + rightLeftArrowIconBounds.width = rightLeftArrowIconSize.width; + rightLeftArrowIconBounds.height = rightLeftArrowIconSize.height; + + + if (!__pColorPicker->IsEnabled()) + { + isCustomBitmap = IS_CUSTOM_BITMAP(COLORPICKER::ARROW_BUTTON_BG_DISABLED); + + r = DrawResourceBitmap(canvas, rcButton, __pColorDisabledReplacementBgBitmap, isCustomBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + if (!isCustomBitmap) + { + r = DrawResourceBitmap(canvas, rcButton, __pDisabledEffectBgBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + + if (drawLeftButton) + { + 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 + { + 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, isCustomBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + if (!isCustomBitmap) + { + r = DrawResourceBitmap(canvas, rcButton, __pPressedEffectBgBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + + if (drawLeftButton) + { + 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 + { + 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, isCustomBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + if (!isCustomBitmap) + { + r = DrawResourceBitmap(canvas, rcButton, __pNormalEffectBgBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + + if (drawLeftButton) + { + 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 + { + isCustomBitmap = IS_CUSTOM_BITMAP(COLORPICKER::RIGHT_ARROW_BUTTON_NORMAL); + r = DrawResourceBitmap(canvas, rightLeftArrowIconBounds, __pRightArrowNormalBitmap, isCustomBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + } + + return r; +} + +result +_ColorPickerPresenter::DrawArrowButtons(Canvas& canvas) +{ + DrawArrowButton(canvas, __componentBounds[HUE_ARROWLEFT], __eventType == HUE_ARROWLEFT, true); + DrawArrowButton(canvas, __componentBounds[HUE_ARROWRIGHT], __eventType == HUE_ARROWRIGHT, false); + DrawArrowButton(canvas, __componentBounds[SAT_ARROWLEFT], __eventType == SAT_ARROWLEFT, true); + DrawArrowButton(canvas, __componentBounds[SAT_ARROWRIGHT], __eventType == SAT_ARROWRIGHT, false); + DrawArrowButton(canvas, __componentBounds[LUM_ARROWLEFT], __eventType == LUM_ARROWLEFT, true); + DrawArrowButton(canvas, __componentBounds[LUM_ARROWRIGHT], __eventType == LUM_ARROWRIGHT, false); + + return E_SUCCESS; +} + +result +_ColorPickerPresenter::MoveHandler(_ColorPickerComponentType handlerType) +{ + _VisualElement* pHandler = null; + result r = E_SUCCESS; + + switch (handlerType) + { + case HUE_HANDLER: + pHandler = __pColorPicker->GetHueHandler(); + break; + case SAT_HANDLER: + pHandler = __pColorPicker->GetSaturationHandler(); + break; + case LUM_HANDLER: + pHandler = __pColorPicker->GetLuminanceHandler(); + break; + default: + r = E_INVALID_ARG; + break; + } + + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Handler event type is invalid."); + + SysTryReturnResult(NID_UI_CTRL, pHandler != null, E_SYSTEM, "A system error has occurred. Failed to get the handler."); + + FloatRectangle bounds = __pColorPicker->GetClientBoundsF(); + FloatRectangle& handlerBounds = __componentBounds[handlerType]; + pHandler->SetBounds(CoordinateSystem::AlignToDevice(FloatRectangle(bounds.x + handlerBounds.x, bounds.y + handlerBounds.y, handlerBounds.width, handlerBounds.height))); + + return r; +} + +result +_ColorPickerPresenter::TouchButton(void) +{ + result r = E_SUCCESS; + + switch (__eventType) + { + case HUE_ARROWLEFT: + SetHandlerPosition(HUE_HANDLER, __componentBounds[HUE_HANDLER].x - ARROW_MOVE_STEP); + MoveHandler(HUE_HANDLER); + ChangeColorFromCurrentHandlerPosition(HUE_HANDLER); + break; + case HUE_ARROWRIGHT: + SetHandlerPosition(HUE_HANDLER, __componentBounds[HUE_HANDLER].x + ARROW_MOVE_STEP); + MoveHandler(HUE_HANDLER); + ChangeColorFromCurrentHandlerPosition(HUE_HANDLER); + break; + case SAT_ARROWLEFT: + SetHandlerPosition(SAT_HANDLER, __componentBounds[SAT_HANDLER].x - ARROW_MOVE_STEP); + MoveHandler(SAT_HANDLER); + ChangeColorFromCurrentHandlerPosition(SAT_HANDLER); + break; + case SAT_ARROWRIGHT: + SetHandlerPosition(SAT_HANDLER, __componentBounds[SAT_HANDLER].x + ARROW_MOVE_STEP); + MoveHandler(SAT_HANDLER); + ChangeColorFromCurrentHandlerPosition(SAT_HANDLER); + break; + case LUM_ARROWLEFT: + SetHandlerPosition(LUM_HANDLER, __componentBounds[LUM_HANDLER].x - ARROW_MOVE_STEP); + MoveHandler(LUM_HANDLER); + ChangeColorFromCurrentHandlerPosition(LUM_HANDLER); + break; + case LUM_ARROWRIGHT: + SetHandlerPosition(LUM_HANDLER, __componentBounds[LUM_HANDLER].x + ARROW_MOVE_STEP); + MoveHandler(LUM_HANDLER); + ChangeColorFromCurrentHandlerPosition(LUM_HANDLER); + break; + default: + SysLogException(NID_UI_CTRL, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. Arrow button type is invalid."); + r = E_INVALID_ARG; + break; + } + + return r; +} + +result +_ColorPickerPresenter::TouchHandler(float position) +{ + result r = E_SUCCESS; + + switch (__eventType) + { + case HUE_HANDLER: + // fall through + case SAT_HANDLER: + // fall through + case LUM_HANDLER: + SetHandlerPosition(__eventType, position - __componentBounds[__eventType].width / 2); + MoveHandler(__eventType); + ChangeColorFromCurrentHandlerPosition(__eventType); + break; + default: + SysLogException(NID_UI_CTRL, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. Handler event type is invalid."); + r = E_INVALID_ARG; + break; + } + + return r; +} + +result +_ColorPickerPresenter::SetHandlerPosition(_ColorPickerComponentType handlerType, float position) +{ + result r = E_SUCCESS; + + switch (handlerType) + { + case HUE_HANDLER: + // fall through + case SAT_HANDLER: + // fall through + case LUM_HANDLER: + { + FloatRectangle& barBounds = GetBarBoundsFromHandler(handlerType); + if (position < barBounds.x) + { + position = barBounds.x; + } + else if (position > (barBounds.x + barBounds.width - __componentBounds[handlerType].width)) + { + position = barBounds.x + barBounds.width - __componentBounds[handlerType].width; + } + + __componentBounds[handlerType].x = position; + } + break; + default: + SysLogException(NID_UI_CTRL, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. Handler event type is invalid."); + r = E_SYSTEM; + break; + } + + return r; +} + +result +_ColorPickerPresenter::SetHandlerPositionByRatio(_ColorPickerComponentType handlerType, double ratio) +{ + result r = E_SUCCESS; + FloatRectangle& barBounds = GetBarBoundsFromHandler(handlerType); + switch (handlerType) + { + case HUE_HANDLER: + __componentBounds[handlerType].x = barBounds.x + (barBounds.width - __componentBounds[handlerType].width) * ratio; + break; + + case SAT_HANDLER: + __componentBounds[handlerType].x = barBounds.x + (barBounds.width - __componentBounds[handlerType].width) * (MAX_VALUE - ratio); + break; + + case LUM_HANDLER: + __componentBounds[handlerType].x = barBounds.x + (barBounds.width - __componentBounds[handlerType].width) * ratio; + break; + + default: + SysLogException(NID_UI_CTRL, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. Handler event type is invalid."); + r = E_SYSTEM; + break; + } + + return r; +} + +result +_ColorPickerPresenter::ChangeColorFromCurrentHandlerPosition(_ColorPickerComponentType handlerType) +{ + result r = E_SUCCESS; + _AccessibilityElement* pElement = null; + String value; + + switch (handlerType) + { + case HUE_HANDLER: + __pColorPickerModel->SetHue((double)(__componentBounds[HUE_HANDLER].x - __componentBounds[HUE_BAR].x) + / (double)(__componentBounds[HUE_BAR].width - __componentBounds[HUE_HANDLER].width)); + + pElement = __pColorPicker->GetAccessibilityElement(HUE_BAR); + value.Append(GetHue()); + break; + case SAT_HANDLER: + __pColorPickerModel->SetSaturation(MAX_VALUE - ((double)(__componentBounds[SAT_HANDLER].x - __componentBounds[SAT_BAR].x) + / (double)(__componentBounds[SAT_BAR].width - __componentBounds[SAT_HANDLER].width))); + + pElement = __pColorPicker->GetAccessibilityElement(SAT_BAR); + value.Append(GetSaturation()); + break; + case LUM_HANDLER: + __pColorPickerModel->SetLuminance((double)(__componentBounds[LUM_HANDLER].x - __componentBounds[LUM_BAR].x) + / (double)(__componentBounds[LUM_BAR].width - __componentBounds[LUM_HANDLER].width)); + + pElement = __pColorPicker->GetAccessibilityElement(LUM_BAR); + value.Append(GetLuminance()); + break; + default: + r = E_SYSTEM; + break; + } + + if (pElement != null) + { + pElement->SetValue(value); + } + + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Handler event type is invalid."); + + bool isHueChanged = __hueColor != __pColorPickerModel->GetHueColor(); + bool isSaturationChanged = __saturationColor != __pColorPickerModel->GetSaturationColor(); + if (isHueChanged || isSaturationChanged) + { + Canvas* pCanvas = __pColorPicker->GetCanvasN(); + if (pCanvas != null) + { + if (isHueChanged) + { + DrawSaturationSlider(*pCanvas); + } + if (isSaturationChanged) + { + DrawLuminanceSlider(*pCanvas); + } + delete pCanvas; + + __pColorPicker->UpdateView(); + } + } + + return __pColorPicker->FireColorChangeEvent(__pColorPickerModel->GetColor()); +} + +bool +_ColorPickerPresenter::IsLeftButton(_ColorPickerComponentType buttonType) +{ + return (buttonType == HUE_ARROWLEFT || buttonType == SAT_ARROWLEFT || buttonType == LUM_ARROWLEFT); +} + +FloatRectangle& +_ColorPickerPresenter::GetBarBoundsFromHandler(_ColorPickerComponentType handlerType) +{ + if (handlerType == HUE_HANDLER) + { + return __componentBounds[HUE_BAR]; + } + else if (handlerType == SAT_HANDLER) + { + return __componentBounds[SAT_BAR]; + } + else if (handlerType == LUM_HANDLER) + { + return __componentBounds[LUM_BAR]; + } + + return __componentBounds[HSL_NOT]; +} + +_ColorPickerComponentType +_ColorPickerPresenter::GetTouchActionType(const FloatPoint& position) const +{ + if (__componentBounds[HUE_BAR].Contains(position)) + { + return HUE_HANDLER; + } + else if (__componentBounds[SAT_BAR].Contains(position)) + { + return SAT_HANDLER; + } + else if (__componentBounds[LUM_BAR].Contains(position)) + { + return LUM_HANDLER; + } + + for (int type = HUE_ARROWLEFT; type < COMPONENT_TYPE_MAX; type++) + { + if (__componentBounds[type].Contains(position)) + { + return (_ColorPickerComponentType)type; + } + } + + return HSL_NOT; +} + +result +_ColorPickerPresenter::DrawResourceBitmap(Canvas& canvas, const FloatRectangle& bounds, Bitmap* pBitmap, bool isCustomBitmap, bool isHandlerBitmap) +{ + result r = E_SUCCESS; + Canvas *pCanvas = 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); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + else + { + 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 new file mode 100644 index 0000000..2e6f1d8 --- /dev/null +++ b/src/ui/controls/FUiCtrl_ContextMenu.cpp @@ -0,0 +1,1522 @@ +// +// 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_ContextMenu.cpp + * @brief This is the implementation file for the _ContextMenu class. + */ + +#include +#include +#include +#include +#include "FUi_ControlImplManager.h" +#include "FUi_EcoreEvasMgr.h" +#include "FUi_ResourceManager.h" +#include "FUi_KeyEventManager.h" +#include "FUiAnim_VisualElement.h" +#include "FUiAnim_AnimationManager.h" +#include "FUi_AccessibilityContainer.h" +#include "FUi_AccessibilityElement.h" +#include "FUiCtrl_Form.h" +#include "FUiCtrl_Frame.h" +#include "FUiCtrl_ContextMenu.h" +#include "FUiCtrl_Scroll.h" + +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; +} + +namespace Tizen { namespace Ui { namespace Controls +{ + +IMPLEMENT_PROPERTY(_ContextMenu); + +_ContextMenu::_ContextMenu(const FloatPoint& point, enum ContextMenuCoreStyle style, enum ContextMenuCoreAlign contextMenuAlign) + : __pContextMenuPresenter(null) + , __style(style) + , __align(contextMenuAlign) + , __showItemCount(MAX_CONTEXTMENU_LIST_SHOW_ITEM) + , __showItemMaxCount(0) + , __isAttachedToMainTree(false) + , __ownerInputEnableState(false) + , __anchorPoint(point) + , __windowRect(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f)) + , __bodyRect(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f)) + , __arrowRect(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f)) + , __itemRect(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f)) + , __pActionEvent(null) + , __pBackgroundNormalBitmap(null) + , __pBackgroundEffectBitmap(null) + , __pPressedBitmap(null) + , __dropPosition(CONTEXT_MENU_CORE_DROP_POSITION_INVALID) + , __pCurrentFrame(null) + , __layout(_CONTROL_ORIENTATION_PORTRAIT) + , __rotation(_CONTROL_ROTATION_0) + , __pScrollPanel(null) +{ + __backgroundColor = Color(255, 255, 255, 255); + + __textColor[CONTEXT_MENU_CORE_ITEM_STATUS_NORMAL] = Color(255, 255, 255, 255); + __textColor[CONTEXT_MENU_CORE_ITEM_STATUS_PRESSED] = Color(255, 255, 255, 255); + __textColor[CONTEXT_MENU_CORE_ITEM_STATUS_HIGHLIGHTED] = Color(255, 255, 255, 255); + + __itemColor[CONTEXT_MENU_CORE_ITEM_STATUS_NORMAL] = Color(255, 255, 255, 255); + __itemColor[CONTEXT_MENU_CORE_ITEM_STATUS_PRESSED] = Color(255, 255, 255, 255); + __itemColor[CONTEXT_MENU_CORE_ITEM_STATUS_HIGHLIGHTED] = Color(255, 255, 255, 255); + + for (int i = 0; i < CONTEXT_MENU_CORE_DROP_POSITION_MAX; i++) + { + __pArrowNormalBitmap[i] = null; + __pArrowEffectBitmap[i] = null; + } + + GET_SHAPE_CONFIG(CONTEXTMENU::ITEM_MAX_COUNT, __layout, __showItemMaxCount); +} + +_ContextMenu::~_ContextMenu(void) +{ + if (__isAttachedToMainTree && GetOwner() != null) + { + GetOwner()->UnlockInputEvent(); + } + + __pCurrentFrame = null; + + if (__pScrollPanel) + { + __pScrollPanel->DetachAllChildren(); + DetachChild(*__pScrollPanel); + delete __pScrollPanel; + __pScrollPanel = null; + } + + delete __pContextMenuPresenter; + __pContextMenuPresenter = null; + + if (__pBackgroundNormalBitmap != null) + { + delete __pBackgroundNormalBitmap; + __pBackgroundNormalBitmap = null; + } + + if (__pBackgroundEffectBitmap != null) + { + delete __pBackgroundEffectBitmap; + __pBackgroundEffectBitmap = null; + } + + if (__pPressedBitmap != null) + { + delete __pPressedBitmap; + __pPressedBitmap = null; + } + + if (__pActionEvent) + { + delete __pActionEvent; + __pActionEvent = null; + } + + for (int i = 0; i < CONTEXT_MENU_CORE_DROP_POSITION_MAX; i++) + { + delete __pArrowNormalBitmap[i]; + __pArrowNormalBitmap[i] = null; + + delete __pArrowEffectBitmap[i]; + __pArrowEffectBitmap[i] = null; + } + + __actionId.RemoveAll(); + + RemoveAllAccessibilityElement(); +} + +_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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + result r = E_SUCCESS; + + r = pContextMenu->CreateRootVisualElement(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pContextMenu->SetFocusable(false); + + r = pContextMenu->Initialize(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to Initialize.", GetErrorMessage(r)); + + r = pContextMenu->Install(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to Install.", GetErrorMessage(r)); + + pContextMenu->AcquireHandle(); + pContextMenu->SetTouchPressThreshold(TOUCH_PRESS_THRESHOLD_INSENSITIVE); + + if (pContextMenu->GetAccessibilityContainer() != null) + { + pContextMenu->GetAccessibilityContainer()->Activate(true); + pContextMenu->GetAccessibilityContainer()->AddListener(*pContextMenu); + } + + if (style == CONTEXT_MENU_CORE_STYLE_LIST) + { + float minWidth, minHeight; // for visible scrollbar when scrollable + GET_SHAPE_CONFIG(CONTEXTMENU::LIST_MIN_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, minWidth); + GET_SHAPE_CONFIG(CONTEXTMENU::LIST_ITEM_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, minHeight); + pContextMenu->__pScrollPanel = _ScrollPanel::CreateScrollPanelN(FloatRectangle(0.0f, 0.0f, minWidth, minHeight), SCROLL_PANEL_SCROLL_DIRECTION_VERTICAL, false, false); + pContextMenu->__pScrollPanel->SetTouchPressThreshold(TOUCH_PRESS_THRESHOLD_INSENSITIVE); + pContextMenu->__pScrollPanel->SetFocusable(false); + + _Scroll* pScroll = pContextMenu->__pScrollPanel->GetScrollBar(); + 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)); + } + + return pContextMenu; + +CATCH: + delete pContextMenu; + + return null; +} + +_ScrollPanel* +_ContextMenu::GetScrollPanel(void) +{ + return __pScrollPanel; +} + +result +_ContextMenu::Install(void) +{ + result r = E_SUCCESS; + + // load bitmap of a background and arrow + r = LoadBitmap(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to load bitmap."); + + r = __actionId.Construct(); + 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, "Memory allocation failed."); + + SetPresenter(*pPresenter); + + r = pPresenter->Install(); + } + else + { + _IContextMenuPresenter* pPresenter = new (std::nothrow) _ContextMenuGridPresenter(this); + SysTryReturnResult(NID_UI_CTRL, pPresenter != null, E_OUT_OF_MEMORY, "Memory allocation failed."); + + SetPresenter(*pPresenter); + + r = pPresenter->Install(); + } + + return r; +} + +result +_ContextMenu::Initialize(void) +{ + FloatDimension screen = _ControlManager::GetInstance()->GetScreenSizeF(); + result r = E_SUCCESS; + + Color backgroundColor; + Color backgroundSelectedColor; + Color itemTextColor; + Color itemTextSelectedColor; + + r = SetBounds(FloatRectangle(0.0f, 0.0f, screen.width, screen.height)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set bounds."); + + SetMovable(false); + SetResizable(false); + + GET_COLOR_CONFIG(CONTEXTMENU::BG_NORMAL, backgroundColor); + GET_COLOR_CONFIG(CONTEXTMENU::ITEM_BG_PRESSED, backgroundSelectedColor); + GET_COLOR_CONFIG(CONTEXTMENU::ITEM_TEXT_NORMAL, itemTextColor); + GET_COLOR_CONFIG(CONTEXTMENU::ITEM_TEXT_PRESSED, itemTextSelectedColor); + + __backgroundColor = backgroundColor; + __itemColor[CONTEXT_MENU_CORE_ITEM_STATUS_NORMAL] = backgroundColor; + __itemColor[CONTEXT_MENU_CORE_ITEM_STATUS_PRESSED] = backgroundSelectedColor; + __textColor[CONTEXT_MENU_CORE_ITEM_STATUS_NORMAL] = itemTextColor; + __textColor[CONTEXT_MENU_CORE_ITEM_STATUS_PRESSED] = itemTextSelectedColor; + + if (GetVisualElement() != null) + { + GetVisualElement()->SetSurfaceOpaque(false); + } + + return r; + +} + +result +_ContextMenu::SetPresenter(const _IContextMenuPresenter& ContextMenuPresenter) +{ + __pContextMenuPresenter = const_cast <_IContextMenuPresenter*>(&ContextMenuPresenter); + + return E_SUCCESS; +} + +void +_ContextMenu::OnDraw() +{ + __pContextMenuPresenter->Draw(); + + if(unlikely((_AccessibilityManager::IsActivated()))) + { + _AccessibilityManager::GetInstance()->RequestAutoReading(_ACCESSIBILITY_AUTO_READING_MODE_FIRST_ITEM); + } +} + +result +_ContextMenu::OnAttachedToMainTree(void) +{ + result r = E_SUCCESS; + + __isAttachedToMainTree = true; + + _Control* pOwner = GetOwner(); + if (pOwner == null) + { + __pCurrentFrame = dynamic_cast<_Frame*>(_ControlManager::GetInstance()->GetCurrentFrame()); + SysTryReturnResult(NID_UI_CTRL, __pCurrentFrame != null, E_SYSTEM, "Failed to get current frame instance."); + + _Form* pForm = __pCurrentFrame->GetCurrentForm(); + pForm != null ? SetOwner(pForm) : SetOwner(__pCurrentFrame); + + pOwner = GetOwner(); + + GET_SHAPE_CONFIG(CONTEXTMENU::ITEM_MAX_COUNT, __layout, __showItemMaxCount); + } + else + { + pOwner->LockInputEvent(); + } + + if (__pCurrentFrame != null) + { + __pCurrentFrame->AddFrameEventListener(*this); + } + + __layout = pOwner->GetOrientation(); + + _Window* pOwnerWindow = pOwner->GetRootWindow(); + + if (pOwnerWindow != null) + { + int ownerRotation = GetEcoreEvasMgr()->GetEcoreEvas()->GetWindowRotation(*pOwnerWindow); + switch (ownerRotation) + { + case 0: + __rotation = _CONTROL_ROTATION_0; + break; + + case 90: + __rotation = _CONTROL_ROTATION_90; + break; + + case 180: + __rotation = _CONTROL_ROTATION_180; + break; + + case 270: + __rotation = _CONTROL_ROTATION_270; + break; + + default: + __rotation = _CONTROL_ROTATION_0; + break; + } + } + + AdjustDropPosition(); + + if (GetItemCount() <= 0) + { + __pContextMenuPresenter->CalculateShowItemCount(); + } + + __pContextMenuPresenter->CalculateItemMaximumWidth(); + r = __pContextMenuPresenter->CalculateWindowRect(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "Propagating."); + + if (__pScrollPanel != null) + { + __pScrollPanel->SetScrollPosition(0.0f, false); + } + + r = Open(); + + SetVisibleState(true); + + if (__style == CONTEXT_MENU_CORE_STYLE_LIST) + { + SetTouchCapture(false, false); + } + else + { + SetTouchCapture(true, false); + } + + GetEcoreEvasMgr()->GetEcoreEvas()->SetWindowBounds(*this, GetBoundsF()); + + _VisualElement* pVisualElement = GetVisualElement(); + FloatRectangle pBounds = pVisualElement->GetBounds(); + float oldBoundsX = pBounds.x; + float oldBoundsY = pBounds.y; + float distanceX = 0.0f; + float distanceY = 0.0f; + + GET_SHAPE_CONFIG(CONTEXTMENU::APPEARING_ANIMATION_DISTANCE_X, __layout, distanceX); + GET_SHAPE_CONFIG(CONTEXTMENU::APPEARING_ANIMATION_DISTANCE_Y, __layout, distanceY); + + switch(GetDropPosition()) + { + case CONTEXT_MENU_CORE_DROP_POSITION_UP: + pBounds.y += distanceY; + break; + case CONTEXT_MENU_CORE_DROP_POSITION_DOWN: + pBounds.y -= distanceY; + break; + case CONTEXT_MENU_CORE_DROP_POSITION_LEFT: + pBounds.x += distanceX; + break; + case CONTEXT_MENU_CORE_DROP_POSITION_RIGHT: + pBounds.x -= distanceX; + break; + default: + break; + } + + pVisualElement->SetBounds(pBounds); + pVisualElement->SetOpacity(0.0f); + + bool enable = pVisualElement->IsImplicitAnimationEnabled(); + + pVisualElement->SetImplicitAnimationEnabled(true); + + pBounds.x = oldBoundsX; + pBounds.y = oldBoundsY; + pVisualElement->SetBounds(pBounds); + pVisualElement->SetOpacity(1.0f); + + pVisualElement->SetImplicitAnimationEnabled(enable); + + return r; +} + +result +_ContextMenu::OnDetachingFromMainTree(void) +{ + result r = E_SUCCESS; + + ReleaseTouchCapture(); + + if (__pCurrentFrame) + { + __pCurrentFrame->RemoveFrameEventListener(*this); + } + + _Control* pOwner = GetOwner(); + if (pOwner != null) + { + pOwner->UnlockInputEvent(); + } + + __isAttachedToMainTree = false; + + return r; +} + +void +_ContextMenu::OnFrameDeactivated(const _Frame& source) +{ + SetVisibleState(false); + return; +} + +void +_ContextMenu::OnFrameActivated(const _Frame& source) +{ + return; +} + +void +_ContextMenu::OnFrameMinimized(const _Frame& source) +{ + return; +} +void +_ContextMenu::OnFrameRestored(const _Frame& source) +{ + return; +} + +result +_ContextMenu::AddItem(const Base::String& text, int actionId, const Bitmap* pNormalBitmap, const Bitmap* pPressedBitmap, + const Bitmap* pHighlightedBitmap) +{ + result r = E_SUCCESS; + + r = __pContextMenuPresenter->AddItem(text, actionId, pNormalBitmap, pPressedBitmap, pHighlightedBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to add a item."); + + __actionId.Add(actionId); + + if (__isAttachedToMainTree) + { + __pContextMenuPresenter->CalculateShowItemCount(); + __pContextMenuPresenter->CalculateWindowRect(); + } + + return r; +} + +result +_ContextMenu::InsertItem(int index, const Base::String& text, int actionId, const Bitmap* pNormalBitmap, + const Bitmap* pPressedBitmap, + const Bitmap* pHighlightedBitmap) +{ + result r = E_SUCCESS; + + r = __pContextMenuPresenter->InsertItem(index, text, actionId, pNormalBitmap, pPressedBitmap, pHighlightedBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to insert a item."); + + __actionId.InsertAt(actionId, index); + + if (__isAttachedToMainTree) + { + __pContextMenuPresenter->CalculateShowItemCount(); + __pContextMenuPresenter->CalculateWindowRect(); + } + + return r; +} + +result +_ContextMenu::SetItem(int index, const Base::String& text, int actionId, const Bitmap* pNormalBitmap, + const Bitmap* pPressedBitmap, const Bitmap* pHighlightedBitmap) +{ + result r = E_SUCCESS; + + r = __pContextMenuPresenter->SetItem(index, text, actionId, pNormalBitmap, pPressedBitmap, pHighlightedBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set a item."); + + __actionId.SetAt(actionId, index); + + if (__isAttachedToMainTree) + { + __pContextMenuPresenter->CalculateWindowRect(); + } + + return r; +} + +result +_ContextMenu::RemoveItemAt(int index) +{ + result r = E_SUCCESS; + + r = __pContextMenuPresenter->DeleteItem(index); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to remove a item."); + + __actionId.RemoveAt(index); + + if (__isAttachedToMainTree) + { + __pContextMenuPresenter->CalculateShowItemCount(); + __pContextMenuPresenter->CalculateWindowRect(); + } + + return r; +} + +result +_ContextMenu::RemoveAllItems(void) +{ + result r = E_SUCCESS; + + r = __pContextMenuPresenter->DeleteItemAll(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to remove all items."); + + __actionId.RemoveAll(); + + if (__isAttachedToMainTree) + { + __pContextMenuPresenter->CalculateShowItemCount(); + __pContextMenuPresenter->CalculateWindowRect(); + } + + return r; +} + +int +_ContextMenu::GetItemCount(void) const +{ + return __actionId.GetCount(); +} + +int +_ContextMenu::GetItemIndexAt(int actionId) const +{ + int count = __actionId.GetCount(); + + for (int i = 0; i < count; i++) + { + int index = GetItemActionIdAt(i); + + if (actionId == index) + { + return i; + } + } + + return -1; +} + +int +_ContextMenu::GetItemActionIdAt(int index) const +{ + int count = __actionId.GetCount(); + int actionId = -1; + + result r = E_SUCCESS; + + if (count <= 0 || index >= count) + { + return -1; + } + + r = __actionId.GetAt(index, actionId); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, actionId, r, "[%s] Propagating.", GetErrorMessage(r)); + + return actionId; +} + +result +_ContextMenu::SetAnchorPosition(float x, float y) +{ + __anchorPoint.x = x; + __anchorPoint.y = y; + + if (__align == CONTEXT_MENU_CORE_ALIGN_AUTO) + { + AdjustDropPosition(); + } + + if (__isAttachedToMainTree) + { + __pContextMenuPresenter->CalculateWindowRect(); + } + return E_SUCCESS; +} + +FloatPoint +_ContextMenu::GetAnchorPosition(void) const +{ + return __anchorPoint; +} + +result +_ContextMenu::SetWindowRect(const FloatRectangle& rect) +{ + __windowRect = rect; + + return E_SUCCESS; +} + +FloatRectangle +_ContextMenu::GetWindowRect(void) const +{ + return __windowRect; +} + +result +_ContextMenu::SetBodyRect(const FloatRectangle& rect) +{ + __bodyRect = rect; + + return E_SUCCESS; +} + +FloatRectangle +_ContextMenu::GetBodyRect(void) const +{ + return __bodyRect; +} + +result +_ContextMenu::SetArrowRect(const FloatRectangle& rect) +{ + __arrowRect = rect; + + return E_SUCCESS; +} + +FloatRectangle +_ContextMenu::GetArrowRect(void) const +{ + return __arrowRect; +} + +result +_ContextMenu::SetItemRect(const FloatRectangle& rect) +{ + __itemRect = rect; + + return E_SUCCESS; +} + +FloatRectangle +_ContextMenu::GetItemRect(void) const +{ + return __itemRect; +} + +result +_ContextMenu::SetPropertyMaxVisibleItemsCount(const Variant& count) +{ + int showCount = count.ToInt(); + + SysTryReturnResult(NID_UI_CTRL, showCount > 0, E_INVALID_ARG, "Invalid argument is used. Count is invalid."); + + __showItemCount = showCount; + + return E_SUCCESS; +} + +Variant +_ContextMenu::GetPropertyMaxVisibleItemsCount(void) const +{ + return Variant(__showItemCount); +} + +int +_ContextMenu::GetShowItemCount(void) const +{ + Variant count = GetProperty("maxVisibleItemsCount"); + + return count.ToInt(); +} + +int +_ContextMenu::GetShowItemMaxCount(void) const +{ + return __showItemMaxCount; +} + +result +_ContextMenu::SetShowItemCount(int count) +{ + result r; + + r = SetProperty("maxVisibleItemsCount", Variant(count)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set show item count."); + + if (__style == CONTEXT_MENU_CORE_STYLE_LIST && __isAttachedToMainTree) + { + r = __pContextMenuPresenter->CalculateWindowRect(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to calculate window."); + } + + return E_SUCCESS; +} + +result +_ContextMenu::SetPropertyColor(const Variant& color) +{ + __backgroundColor = color.ToColor(); + + LoadColorReplacedBitmap(__backgroundColor); + + return E_SUCCESS; +} + +Variant +_ContextMenu::GetPropertyColor(void) const +{ + return Variant(__backgroundColor); +} + +result +_ContextMenu::SetColor(const Graphics::Color& color) +{ + return SetProperty("color", Variant(color)); +} + +Color +_ContextMenu::GetColor(void) const +{ + Variant color = GetProperty("color"); + + return color.ToColor(); +} + +result +_ContextMenu::SetPropertyNormalItemColor(const Variant& color) +{ + __itemColor[CONTEXT_MENU_CORE_ITEM_STATUS_NORMAL] = color.ToColor(); + + return __pContextMenuPresenter->ApplyColorProperty(); +} + +Variant +_ContextMenu::GetPropertyNormalItemColor(void) const +{ + return Variant(__itemColor[CONTEXT_MENU_CORE_ITEM_STATUS_NORMAL]); +} + +result +_ContextMenu::SetPropertyPressedItemColor(const Variant& color) +{ + __itemColor[CONTEXT_MENU_CORE_ITEM_STATUS_PRESSED] = color.ToColor(); + + return __pContextMenuPresenter->ApplyColorProperty(); +} + +Variant +_ContextMenu::GetPropertyPressedItemColor(void) const +{ + return Variant(__itemColor[CONTEXT_MENU_CORE_ITEM_STATUS_PRESSED]); +} + +result +_ContextMenu::SetPropertyHighlightedItemColor(const Variant & color) +{ + __itemColor[CONTEXT_MENU_CORE_ITEM_STATUS_HIGHLIGHTED] = color.ToColor(); + + return __pContextMenuPresenter->ApplyColorProperty(); +} + +Variant +_ContextMenu::GetPropertyHighlightedItemColor(void) const +{ + return Variant(__itemColor[CONTEXT_MENU_CORE_ITEM_STATUS_HIGHLIGHTED]); +} + +result +_ContextMenu::SetItemColor(enum ContextMenuCoreItemStatus status, const Graphics::Color& color) +{ + result r = E_SUCCESS; + + if (status == CONTEXT_MENU_CORE_ITEM_STATUS_NORMAL) + { + r = SetProperty("normalItemColor", Variant(color)); + } + else if (status == CONTEXT_MENU_CORE_ITEM_STATUS_PRESSED) + { + r = SetProperty("pressedItemColor", Variant(color)); + } + else + { + r = SetProperty("highlightedItemColor", Variant(color)); + } + + return r; +} + +Color +_ContextMenu::GetItemColor(enum ContextMenuCoreItemStatus status) const +{ + Color itemColor; + + if (status == CONTEXT_MENU_CORE_ITEM_STATUS_NORMAL) + { + Variant color = GetProperty("normalItemColor"); + itemColor = color.ToColor(); + + } + else if (status == CONTEXT_MENU_CORE_ITEM_STATUS_PRESSED) + { + Variant color = GetProperty("pressedItemColor"); + itemColor = color.ToColor(); + + } + else + { + Variant color = GetProperty("highlightedItemColor"); + itemColor = color.ToColor(); + } + + return itemColor; + +} + +result +_ContextMenu::SetPropertyNormalItemTextColor(const Variant& color) +{ + __textColor[CONTEXT_MENU_CORE_ITEM_STATUS_NORMAL] = color.ToColor(); + + return __pContextMenuPresenter->ApplyColorProperty(); +} + +Variant +_ContextMenu::GetPropertyNormalItemTextColor(void) const +{ + return Variant(__textColor[CONTEXT_MENU_CORE_ITEM_STATUS_NORMAL]); +} + +result +_ContextMenu::SetPropertyPressedItemTextColor(const Variant& color) +{ + __textColor[CONTEXT_MENU_CORE_ITEM_STATUS_PRESSED] = color.ToColor(); + + return __pContextMenuPresenter->ApplyColorProperty(); +} + +Variant +_ContextMenu::GetPropertyPressedItemTextColor(void) const +{ + return Variant(__textColor[CONTEXT_MENU_CORE_ITEM_STATUS_PRESSED]); +} + +result +_ContextMenu::SetPropertyHighlightedItemTextColor(const Variant & color) +{ + __textColor[CONTEXT_MENU_CORE_ITEM_STATUS_HIGHLIGHTED] = color.ToColor(); + + return __pContextMenuPresenter->ApplyColorProperty(); +} + +Variant +_ContextMenu::GetPropertyHighlightedItemTextColor(void) const +{ + return Variant(__textColor[CONTEXT_MENU_CORE_ITEM_STATUS_HIGHLIGHTED]); +} + +result +_ContextMenu::SetTextColor(enum ContextMenuCoreItemStatus status, const Graphics::Color& color) +{ + result r = E_SUCCESS; + + if (status == CONTEXT_MENU_CORE_ITEM_STATUS_NORMAL) + { + r = SetProperty("normalItemTextColor", Variant(color)); + } + else if (status == CONTEXT_MENU_CORE_ITEM_STATUS_PRESSED) + { + r = SetProperty("pressedItemTextColor", Variant(color)); + } + else + { + r = SetProperty("highlightedItemTextColor", Variant(color)); + } + + return r; + +} + +Color +_ContextMenu::GetTextColor(enum ContextMenuCoreItemStatus status) const +{ + Color textColor; + + if (status == CONTEXT_MENU_CORE_ITEM_STATUS_NORMAL) + { + Variant color = GetProperty("normalItemTextColor"); + textColor = color.ToColor(); + + } + else if (status == CONTEXT_MENU_CORE_ITEM_STATUS_PRESSED) + { + Variant color = GetProperty("pressedItemTextColor"); + textColor = color.ToColor(); + + } + else + { + Variant color = GetProperty("highlightedItemTextColor"); + textColor = color.ToColor(); + } + + return textColor; +} + +result +_ContextMenu::AddActionEventListener(const _IActionEventListener& listener) +{ + result r = E_SUCCESS; + + if (__pActionEvent == null) + { + __pActionEvent = _ActionEvent::CreateInstanceN(*this); + SysTryReturnResult(NID_UI_CTRL, __pActionEvent != null, GetLastResult(), "Propagating.") + + r = __pActionEvent->AddListener(listener); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to remove action event listener.") + } + + return r; + +CATCH: + delete __pActionEvent; + __pActionEvent = null; + return r; +} + +result +_ContextMenu::RemoveActionEventListener(const _IActionEventListener& listener) +{ + SysTryReturnResult(NID_UI_CTRL, __pActionEvent != null, E_INVALID_STATE, + "__pActionEvent must not be null.") + + result r = E_SUCCESS; + + r = __pActionEvent->RemoveListener(listener); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to remove action event listener.") + + return r; +} + +_ActionEvent* +_ContextMenu::GetActionEvent(void) const +{ + return __pActionEvent; +} + +result +_ContextMenu::LoadBitmap(void) +{ + Color backgroundColor; + + // Delete old bitmap + if (__pBackgroundEffectBitmap != null) + { + delete __pBackgroundEffectBitmap; + __pBackgroundEffectBitmap = null; + } + + for (int i = 0; i < CONTEXT_MENU_CORE_DROP_POSITION_MAX; i++) + { + if (__pArrowEffectBitmap[i] != null) + { + delete __pArrowEffectBitmap[i]; + __pArrowEffectBitmap[i] = null; + } + } + + backgroundColor = GetColor(); + + + result r; + r = GET_BITMAP_CONFIG_N(CONTEXTMENU::ANCHOR_EFFECT_UP, BITMAP_PIXEL_FORMAT_ARGB8888, + __pArrowEffectBitmap[CONTEXT_MENU_CORE_DROP_POSITION_UP]); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap."); + + r = GET_BITMAP_CONFIG_N(CONTEXTMENU::ANCHOR_EFFECT_DOWN, BITMAP_PIXEL_FORMAT_ARGB8888, + __pArrowEffectBitmap[CONTEXT_MENU_CORE_DROP_POSITION_DOWN]); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap."); + + r = GET_BITMAP_CONFIG_N(CONTEXTMENU::ANCHOR_EFFECT_LEFT, BITMAP_PIXEL_FORMAT_ARGB8888, + __pArrowEffectBitmap[CONTEXT_MENU_CORE_DROP_POSITION_LEFT]); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap."); + + r = GET_BITMAP_CONFIG_N(CONTEXTMENU::ANCHOR_EFFECT_RIGHT, BITMAP_PIXEL_FORMAT_ARGB8888, + __pArrowEffectBitmap[CONTEXT_MENU_CORE_DROP_POSITION_RIGHT]); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap."); + + r = GET_BITMAP_CONFIG_N(CONTEXTMENU::BG_OUTLINE_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundEffectBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap."); + + r = LoadColorReplacedBitmap(backgroundColor); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap."); + + return r; + +CATCH: + delete __pBackgroundEffectBitmap; + __pBackgroundEffectBitmap = null; + + for (int i = 0; i < CONTEXT_MENU_CORE_DROP_POSITION_MAX; i++) + { + + delete __pArrowEffectBitmap[i]; + __pArrowEffectBitmap[i] = null; + } + + return r; +} + +result +_ContextMenu::LoadColorReplacedBitmap(const Color& color) +{ + // Delete old bitmap + if (__pBackgroundNormalBitmap != null) + { + delete __pBackgroundNormalBitmap; + __pBackgroundNormalBitmap = null; + } + + for (int i = 0; i < CONTEXT_MENU_CORE_DROP_POSITION_MAX; i++) + { + if (__pArrowNormalBitmap[i] != null) + { + delete __pArrowNormalBitmap[i]; + __pArrowNormalBitmap[i] = null; + } + } + + result r; + + 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."); + + 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."); + + 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."); + + 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 __pBackgroundNormalBitmap; + __pBackgroundNormalBitmap = null; + + for (int i = 0; i < CONTEXT_MENU_CORE_DROP_POSITION_MAX; i++) + { + delete __pArrowNormalBitmap[i]; + __pArrowNormalBitmap[i] = null; + } + + return r; +} + +const Bitmap* +_ContextMenu::GetArrowNormalBitmap(ContextMenuCoreDropPosition dropPosition) const +{ + if (dropPosition == CONTEXT_MENU_CORE_DROP_POSITION_INVALID || dropPosition == CONTEXT_MENU_CORE_DROP_POSITION_MAX) + { + return null; + } + + return __pArrowNormalBitmap[dropPosition]; +} + +const Bitmap* +_ContextMenu::GetArrowEffectBitmap(ContextMenuCoreDropPosition dropPosition) const +{ + if (dropPosition == CONTEXT_MENU_CORE_DROP_POSITION_INVALID || dropPosition == CONTEXT_MENU_CORE_DROP_POSITION_MAX) + { + return null; + } + + 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 +{ + return __pBackgroundNormalBitmap; +} + +const Bitmap* +_ContextMenu::GetBackgroundEffectBitmap(void) const +{ + return __pBackgroundEffectBitmap; +} + +enum ContextMenuCoreDropPosition +_ContextMenu::GetDropPosition(void) const +{ + return __dropPosition; +} + +void +_ContextMenu::AdjustDropPosition(void) +{ + FloatDimension screen = _ControlManager::GetInstance()->GetScreenSizeF(); + + if (__align == CONTEXT_MENU_CORE_ALIGN_UP) + { + __dropPosition = CONTEXT_MENU_CORE_DROP_POSITION_UP; + } + else if (__align == CONTEXT_MENU_CORE_ALIGN_DOWN) + { + __dropPosition = CONTEXT_MENU_CORE_DROP_POSITION_DOWN; + } + else if (__align == CONTEXT_MENU_CORE_ALIGN_LEFT) + { + __dropPosition = CONTEXT_MENU_CORE_DROP_POSITION_LEFT; + } + else if (__align == CONTEXT_MENU_CORE_ALIGN_RIGHT) + { + __dropPosition = CONTEXT_MENU_CORE_DROP_POSITION_RIGHT; + } + else + { + if (__layout == _CONTROL_ORIENTATION_LANDSCAPE) + { + screen.SetSize(screen.height, screen.width); + } + + if (screen.height > screen.width) + { + if ((screen.height / 2.0f) > __anchorPoint.y) + { + __dropPosition = CONTEXT_MENU_CORE_DROP_POSITION_DOWN; + } + else + { + __dropPosition = CONTEXT_MENU_CORE_DROP_POSITION_UP; + } + } + else + { + if ((screen.width / 2.0f) > __anchorPoint.x) + { + __dropPosition = CONTEXT_MENU_CORE_DROP_POSITION_RIGHT; + } + else + { + __dropPosition = CONTEXT_MENU_CORE_DROP_POSITION_LEFT; + } + } + } +} + +_UiTouchEventDelivery +_ContextMenu::OnPreviewTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pContextMenuPresenter->OnPreviewTouchPressed(source, touchinfo); +} + +bool +_ContextMenu::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pContextMenuPresenter->OnTouchPressed(source, touchinfo); +} + +_UiTouchEventDelivery +_ContextMenu::OnPreviewTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pContextMenuPresenter->OnPreviewTouchMoved(source, touchinfo); +} + +bool +_ContextMenu::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pContextMenuPresenter->OnTouchMoved(source, touchinfo); +} + +_UiTouchEventDelivery +_ContextMenu::OnPreviewTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pContextMenuPresenter->OnPreviewTouchReleased(source, touchinfo); +} + +bool +_ContextMenu::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pContextMenuPresenter->OnTouchReleased(source, touchinfo); +} + +_UiTouchEventDelivery +_ContextMenu::OnPreviewTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pContextMenuPresenter->OnPreviewTouchCanceled(source, touchinfo); +} + +bool +_ContextMenu::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + __pContextMenuPresenter->OnTouchCanceled(source, touchinfo); + + SetVisibleState(false); + + return true; +} + +void +_ContextMenu::OnFontChanged(Font* pFont) +{ + return __pContextMenuPresenter->OnFontChanged(pFont); +} + +void +_ContextMenu::OnFontInfoRequested(unsigned long& style, float& size) +{ + return __pContextMenuPresenter->OnFontInfoRequested(style, size); +} + +void +_ContextMenu::OnVisibleStateChanged(void) +{ + _Window::OnVisibleStateChanged(); +} + +void +_ContextMenu::OnChangeLayout(_ControlRotation rotation) +{ + _ControlOrientation orientation; + + orientation = GetOwner()->GetOrientation(); + + GET_SHAPE_CONFIG(CONTEXTMENU::ITEM_MAX_COUNT, orientation, __showItemMaxCount); + + if (__isAttachedToMainTree == true) + { + if(__rotation != rotation) + { + SetVisibleState(false); + } + } + + __layout = orientation; + __rotation = rotation; +} +void +_ContextMenu::OnOwnerChanged(_Control* pOldOwner) +{ + if (!__isAttachedToMainTree) + { + return; + } + + _Control* pOwner = GetOwner(); + + if (pOldOwner != null) + { + pOldOwner->UnlockInputEvent(); + } + + if (pOwner != null) + { + pOwner->LockInputEvent(); + } +} + +void +_ContextMenu::OnTouchCaptureGained(void) +{ + if (__style == CONTEXT_MENU_CORE_STYLE_LIST) + { + SetTouchCapture(false, false); + } + else + { + SetTouchCapture(true, false); + } +} + +void +_ContextMenu::OnTouchCaptureLost(void) +{ +} + +bool +_ContextMenu::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) +{ + return __pContextMenuPresenter->OnKeyPressed(source, keyInfo); +} + +bool +_ContextMenu::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) +{ + return __pContextMenuPresenter->OnKeyReleased(source, keyInfo); +} + +bool +_ContextMenu::IsChildControlFocusManage(void) const +{ + return __pContextMenuPresenter->IsChildControlFocusManage(); +} + +void +_ContextMenu::OnDrawFocus(void) +{ + __pContextMenuPresenter->OnDrawFocus(); +} + +void +_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 +{ + _AccessibilityElement* pElement = null; + result r = __accessibilityElements.GetAt(mainIndex, pElement); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed at AccessibilityElement.", GetErrorMessage(r)); + + return pElement; + +CATCH: + delete pElement; + + return null; +} + +void +_ContextMenu::AddAccessibilityElement(const _AccessibilityElement& element) +{ + __accessibilityElements.Add(const_cast<_AccessibilityElement*>(&element)); +} + +void +_ContextMenu::SetAllAccessibilityElement(void) +{ + RemoveAllAccessibilityElement(); + __pContextMenuPresenter->SetAllAccessibilityElement(); +} + +bool +_ContextMenu::OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_ContextMenu::OnAccessibilityFocusMovedPrevious(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_ContextMenu::OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_ContextMenu::OnAccessibilityReadingElement(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_ContextMenu::OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_ContextMenu::OnAccessibilityFocusOut(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_ContextMenu::OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + SetVisibleState(false); + + return true; +} + +bool +_ContextMenu::OnAccessibilityValueIncreased(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_ContextMenu::OnAccessibilityValueDecreased(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +void +_ContextMenu::RemoveAllAccessibilityElement(void) +{ + _AccessibilityContainer* pAccessibilityContainer = GetAccessibilityContainer(); + if (pAccessibilityContainer && pAccessibilityContainer->IsActivated()) + { + pAccessibilityContainer->RemoveAllElement(); + } +} + +_ContextMenuItemInfo +_ContextMenu::GetItemFromPosition(const FloatPoint& position) const +{ + return __pContextMenuPresenter->GetItemFromPosition(position); +} + +_ContextMenuItemInfo +_ContextMenu::FindItem(int index) const +{ + return __pContextMenuPresenter->FindItem(index); +} + +result +_ContextMenu::SetTopDrawnItemIndex(int index) +{ + return __pContextMenuPresenter->SetTopDrawnItemIndex(index); +} + +_ControlOrientation +_ContextMenu::GetLayout(void) const +{ + return __layout; +} + +}}} // Tizen::Ui: Control diff --git a/src/ui/controls/FUiCtrl_ContextMenuGridPresenter.cpp b/src/ui/controls/FUiCtrl_ContextMenuGridPresenter.cpp new file mode 100644 index 0000000..991d43d --- /dev/null +++ b/src/ui/controls/FUiCtrl_ContextMenuGridPresenter.cpp @@ -0,0 +1,2001 @@ +// +// 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_ContextMenuGridPresenter.cpp + * @brief This is the implementation file for the _ContextMenuGridPresenter class. + */ + +#include +#include +#include +#include +#include +#include "FUi_AccessibilityContainer.h" +#include "FUi_AccessibilityElement.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_Math.h" +#include "FUi_ResourceManager.h" +#include "FUiCtrl_ActionEvent.h" +#include "FUiCtrl_IActionEventListener.h" +#include "FUiCtrl_ContextMenuGridPresenter.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Graphics::_Text; + +static const int MAX_LINE_COUNT = 32; // Only for index of array +static const int MAX_ITEM_COUNT = 35; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_ContextMenuGridPresenter::_ContextMenuGridPresenter(_ContextMenu* pContextMenu) + : __pContextMenu(pContextMenu) + , __pModel(null) + , __pTextObject(null) + , __pFont(null) + , __layoutSize(FloatDimension(0.0f, 0.0f)) + , __touchOutRect(false) + , __selectedIndex(-1) + , __pressedIndex(-1) + , __maxWidth(0.0f) + , __minWidth(0.0f) + , __topMargin(0.0f) + , __bottomMargin(0.0f) + , __leftMargin(0.0f) + , __rightMargin(0.0f) + , __screenTopMargin(0.0f) + , __screenBottomMargin(0.0f) + , __screenLeftMargin(0.0f) + , __screenRightMargin(0.0f) + , __arrowTopMargin(0.0f) + , __arrowBottomMargin(0.0f) + , __arrowRightMargin(0.0f) + , __arrowLeftMargin(0.0f) + , __arrowWidth(0.0f) + , __arrowHeight(0.0f) + , __itemWidth(0.0f) + , __itemHeight(0.0f) + , __itemMaxWidth(0.0f) + , __itemTextMargin(0.0f) + , __itemGap(0.0f) + , __itemBitmapWidth(0.0f) + , __itemBitmapHeight(0.0f) + , __itemFontSize(0.0f) + , __dividerHeight(0.0f) + , __bgPressedMargin(0.0f) + , __anchorPopupOverlap(0.0f) + , __enterKeyPressed(false) + , __backKeyPressed(false) + , __focusedIndex(-1) + , __focusLost(false) +{ + +} + +_ContextMenuGridPresenter::~_ContextMenuGridPresenter(void) +{ + __pContextMenu = null; + + delete __pModel; + __pModel = null; + + if (__pTextObject) + { + __pTextObject->RemoveAll(); + delete __pTextObject; + __pTextObject = null; + } + + __pFont = null; + +} + +result +_ContextMenuGridPresenter::Install(void) +{ + result r = E_SUCCESS; + + LoadShape(); + + __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, "[%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, "[%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; + +CATCH: + delete __pModel; + __pModel = null; + + __pFont = null; + + delete __pTextObject; + __pTextObject = null; + + return r; +} + + +void +_ContextMenuGridPresenter::LoadShape(void) +{ + GET_SHAPE_CONFIG(CONTEXTMENU::GRID_ITEM_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, __itemWidth); + GET_SHAPE_CONFIG(CONTEXTMENU::GRID_ITEM_MAX_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, __itemMaxWidth); + GET_SHAPE_CONFIG(CONTEXTMENU::GRID_ITEM_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, __itemHeight); + GET_SHAPE_CONFIG(CONTEXTMENU::GRID_TEXT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __itemTextMargin); + GET_FIXED_VALUE_CONFIG(CONTEXTMENU::GRID_ITEM_GAP, _CONTROL_ORIENTATION_PORTRAIT, __itemGap); + + GET_SHAPE_CONFIG(CONTEXTMENU::GRID_MIN_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, __minWidth); + GET_SHAPE_CONFIG(CONTEXTMENU::GRID_TOP_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __topMargin); + GET_SHAPE_CONFIG(CONTEXTMENU::GRID_BOTTOM_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __bottomMargin); + GET_SHAPE_CONFIG(CONTEXTMENU::GRID_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __leftMargin); + GET_SHAPE_CONFIG(CONTEXTMENU::GRID_RIGHT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __rightMargin); + + GET_SHAPE_CONFIG(CONTEXTMENU::GRID_ITEM_FONT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, __itemFontSize); + GET_SHAPE_CONFIG(CONTEXTMENU::SCREEN_TOP_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __screenTopMargin); + GET_SHAPE_CONFIG(CONTEXTMENU::SCREEN_BOTTOM_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __screenBottomMargin); + GET_SHAPE_CONFIG(CONTEXTMENU::SCREEN_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __screenLeftMargin); + GET_SHAPE_CONFIG(CONTEXTMENU::SCREEN_RIGHT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __screenRightMargin); + GET_SHAPE_CONFIG(CONTEXTMENU::ANCHOR_TOP_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __arrowTopMargin); + GET_SHAPE_CONFIG(CONTEXTMENU::ANCHOR_BOTTOM_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __arrowBottomMargin); + GET_SHAPE_CONFIG(CONTEXTMENU::ANCHOR_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __arrowLeftMargin); + GET_SHAPE_CONFIG(CONTEXTMENU::ANCHOR_RIGHT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __arrowRightMargin); + GET_SHAPE_CONFIG(CONTEXTMENU::ANCHOR_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, __arrowWidth); + GET_SHAPE_CONFIG(CONTEXTMENU::ANCHOR_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, __arrowHeight); + GET_SHAPE_CONFIG(CONTEXTMENU::GRID_ICON_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, __itemBitmapWidth); + GET_SHAPE_CONFIG(CONTEXTMENU::GRID_ICON_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, __itemBitmapHeight); + GET_SHAPE_CONFIG(CONTEXTMENU::GRID_DIVIDER_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, __dividerHeight); + GET_SHAPE_CONFIG(CONTEXTMENU::ITEM_BG_PRESSED_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __bgPressedMargin); + GET_SHAPE_CONFIG(CONTEXTMENU::ANCHOR_POPUP_OVERLAP, _CONTROL_ORIENTATION_PORTRAIT, __anchorPopupOverlap); +} + +_ContextMenuItem* +_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, GetLastResult(), "[%s] pItem must not be null.", GetErrorMessage(GetLastResult())); + + ContextMenuItemDrawingType itemType = CONTEXT_MENU_ITEM_DRAWING_TYPE_NONE; + result r = E_SUCCESS; + + if (text.GetLength() != 0) + { + r = pItem->SetText(text); + if (r != E_SUCCESS) + { + delete pItem; + return null; + } + + itemType = CONTEXT_MENU_ITEM_DRAWING_TYPE_TEXT; + } + else + { + if (pNormalBitmap == null && pPressedBitmap == null) + { + delete pItem; + return null; + } + + if (pNormalBitmap != null) + { + r = pItem->SetBitmap(CONTEXT_MENU_ITEM_DRAWING_STATUS_NORMAL, pNormalBitmap); + if (r != E_SUCCESS) + { + delete pItem; + return null; + } + } + + if (pPressedBitmap != null) + { + r = pItem->SetBitmap(CONTEXT_MENU_ITEM_DRAWING_STATUS_PRESSED, pPressedBitmap); + if (r != E_SUCCESS) + { + delete pItem; + return null; + } + } + + itemType = CONTEXT_MENU_ITEM_DRAWING_TYPE_BITMAP; + } + + pItem->SetType(itemType); + pItem->SetActionId(actionId); + + // calculate item size + SetItemSize(pItem); + + return pItem; +} + +result +_ContextMenuGridPresenter::AddItem(const Base::String& text, int actionId, const Bitmap* pNormalBitmap, + const Bitmap* pPressedBitmap, + const Bitmap* pHighlightedBitmap) +{ + _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."); + } + + r = AdjustItemLayout(); + if (r != E_SUCCESS) + { + result rt = __pModel->RemoveItem(__pModel->GetItemCount() - 1); + SysTryReturnResult(NID_UI_CTRL, rt == E_SUCCESS, rt, "Propagating."); + + SysTryReturnResult(NID_UI_CTRL, false, r, "Failed to adjust item layout."); + } + + return r; +} + +result +_ContextMenuGridPresenter::InsertItem(int index, const String& text, int actionId, + const Bitmap* pNormalBitmap, const Bitmap* pPressedBitmap, + const Bitmap* pHighlightedBitmap) +{ + 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 = 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; + SysTryReturnResult(NID_UI_CTRL, false, r, "Failed to insert item."); + } + + r = AdjustItemLayout(); + if (r != E_SUCCESS) + { + result rt = __pModel->RemoveItem(index); + SysTryReturnResult(NID_UI_CTRL, rt == E_SUCCESS, rt, "Propagating."); + + SysTryReturnResult(NID_UI_CTRL, false, r, "Failed to adjust item layout."); + } + + return E_SUCCESS; +} + +result +_ContextMenuGridPresenter::SetItem(int index, const String& text, int actionId, + const Bitmap* pNormalBitmap, const Bitmap* pPressedBitmap, + const Bitmap* pHighlightedBitmap) +{ + 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 = 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; + SysTryReturnResult(NID_UI_CTRL, false, r, "Failed to set item."); + } + + r = AdjustItemLayout(); + if (r != E_SUCCESS) + { + result rt = __pModel->RemoveItem(index); + SysTryReturnResult(NID_UI_CTRL, rt == E_SUCCESS, rt, "Propagating."); + + SysTryReturnResult(NID_UI_CTRL, false, r, "Failed to adjust item layout."); + } + + return E_SUCCESS; +} + +result +_ContextMenuGridPresenter::DeleteItem(int index) +{ + int itemCount = __pContextMenu->GetItemCount(); + + 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); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to delete item."); + + return r; +} + +result +_ContextMenuGridPresenter::DeleteItemAll(void) +{ + int itemCount = __pContextMenu->GetItemCount(); + + SysTryReturnResult(NID_UI_CTRL, itemCount > 0, E_INVALID_STATE, "__pContextMenu is in invalid state. Itemcount must be > 0."); + + result r = __pModel->RemoveAllItem(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to delete all items."); + + return r; +} + + +int +_ContextMenuGridPresenter::CalculateShowItemCount(void) +{ + return __pContextMenu->GetShowItemCount(); +} + +void +_ContextMenuGridPresenter::SetItemSize(_ContextMenuItem* pItem) +{ + ContextMenuItemDrawingType itemType = pItem->GetType(); + + if (itemType == CONTEXT_MENU_ITEM_DRAWING_TYPE_TEXT) + { + float textMargin = __itemTextMargin; + float minWidth = __itemWidth; + float maxWidth = __itemMaxWidth; + + String text = pItem->GetText(); + + textMargin = textMargin * 2.0f; + minWidth = minWidth - textMargin; + maxWidth = maxWidth - textMargin; + + FloatDimension textArea(0.0f, 0.0f); + FloatDimension itemSize(0.0f, 0.0f); + + __pFont->GetTextExtent(text, text.GetLength(), textArea); + + if (textArea.width < minWidth) + { + textArea.width = minWidth; + } + + if (textArea.width > maxWidth) + { + textArea.width = maxWidth; + } + + itemSize.width = textArea.width + textMargin; + itemSize.height = __itemHeight; + + pItem->SetSize(itemSize); + + } + else if (itemType == CONTEXT_MENU_ITEM_DRAWING_TYPE_BITMAP) + { + FloatDimension itemSize(__itemWidth, __itemHeight); + + pItem->SetSize(itemSize); + } +} + +result +_ContextMenuGridPresenter::CalculateWindowRect(void) +{ + result r = E_SUCCESS; + + r = AdjustItemLayout(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = CalculateRect(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + AdjustItemPosition(); + SetAllAccessibilityElement(); + + return r; +} + +result +_ContextMenuGridPresenter::ApplyColorProperty(void) +{ + return E_SUCCESS; +} + +result +_ContextMenuGridPresenter::CalculateRect(void) +{ + 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; + float bodyLeftMargin = __leftMargin; + float bodyRightMargin = __rightMargin; + + float screenTopMargin = __screenTopMargin; + float screenBottomMargin = __screenBottomMargin; + float screenLeftMargin = __screenLeftMargin; + float screenRightMargin = __screenRightMargin; + + FloatPoint anchorPosition = __pContextMenu->GetAnchorPosition(); + + FloatDimension screen = _ControlManager::GetInstance()->GetScreenSizeF(); + + if (__pContextMenu->GetLayout() == _CONTROL_ORIENTATION_LANDSCAPE) + { + screen.SetSize(screen.height, screen.width); + } + + // calculate arrow rect + enum ContextMenuCoreDropPosition dropPosition = __pContextMenu->GetDropPosition(); + if (dropPosition == CONTEXT_MENU_CORE_DROP_POSITION_UP || dropPosition == CONTEXT_MENU_CORE_DROP_POSITION_DOWN) // down, up Arrow + { + arrowRect.width = __arrowWidth; + arrowRect.height = __arrowHeight; + } + else // left, right Arrow + { + arrowRect.width = __arrowHeight; + arrowRect.height = __arrowWidth; + } + + // calculate body rect + // calculate drawable boundaries for contextmenu + float leftBoundary = screenLeftMargin; + float rightBoundary = screen.width - screenRightMargin; + float topBoundary = screenTopMargin; + float bottomBoundary = screen.height - screenBottomMargin; + + if (__pModel->GetItemCount() <= 0) + { + __layoutSize.width = __itemWidth; + __layoutSize.height = __itemHeight; + } + + bodyRect.width = __layoutSize.width + bodyLeftMargin + bodyRightMargin; + bodyRect.height = __layoutSize.height + bodyTopMargin + bodyBottomMargin; + + // calculate the position of the arrow and body rect. + if (dropPosition == CONTEXT_MENU_CORE_DROP_POSITION_UP) // down Arrow + { + // Check touch position + // - Check left margin + if (anchorPosition.x <= leftBoundary + arrowRect.width) + { + anchorPosition.x = leftBoundary + arrowRect.width; + } + // - check right margin + if (anchorPosition.x >= (rightBoundary - arrowRect.width)) + { + anchorPosition.x = rightBoundary - arrowRect.width; + } + // - check top margin + if (anchorPosition.y <= topBoundary) + { + anchorPosition.y = topBoundary + bodyRect.height; + } + // - check bottom margin + if (anchorPosition.y >= bottomBoundary) + { + anchorPosition.y = bottomBoundary; + } + + // Set body position x + bodyRect.x = anchorPosition.x - (bodyRect.width / 2.0f); + // - Check left margin + if (bodyRect.x <= leftBoundary) + { + bodyRect.x = leftBoundary; + } + // - check right margin + if ((bodyRect.x + bodyRect.width) >= rightBoundary) + { + bodyRect.x = rightBoundary - bodyRect.width; + } + // Set body position y + bodyRect.y = anchorPosition.y - arrowRect.height - bodyRect.height; + // - check top margin + if (bodyRect.y <= topBoundary) + { + bodyRect.y = topBoundary; + } + + float correctLength = __arrowTopMargin - __anchorPopupOverlap; + windowRect.x = bodyRect.x; + windowRect.y = bodyRect.y + correctLength; + windowRect.width = bodyRect.width; + windowRect.height = bodyRect.height + arrowRect.height - correctLength; + + bodyRect.x = 0.0f; + bodyRect.y = 0.0f; + + // Set arrow position + arrowRect.x = anchorPosition.x - (arrowRect.width / 2.0f) - windowRect.x; + arrowRect.y = bodyRect.height - correctLength; + } + else if (dropPosition == CONTEXT_MENU_CORE_DROP_POSITION_DOWN) // up Arrow + { + // Check touch position + // - Check left margin + if (anchorPosition.x <= leftBoundary + arrowRect.width) + { + anchorPosition.x = leftBoundary + arrowRect.width; + } + // - check right margin + if (anchorPosition.x >= (rightBoundary - arrowRect.width)) + { + anchorPosition.x = rightBoundary - arrowRect.width; + } + // - check top margin + if (anchorPosition.y <= topBoundary) + { + anchorPosition.y = topBoundary; + } + // - check bottom margin + if (anchorPosition.y >= bottomBoundary) + { + anchorPosition.y = bottomBoundary; + } + + // Set body position x + bodyRect.x = anchorPosition.x - (bodyRect.width / 2.0f); + // - Check left margin + if (bodyRect.x <= leftBoundary) + { + bodyRect.x = leftBoundary; + } + // - check right margin + if ((bodyRect.x + bodyRect.width) >= rightBoundary) + { + bodyRect.x = rightBoundary - bodyRect.width; + } + // Set body position y + bodyRect.y = anchorPosition.y + arrowRect.height; + // - Check bottom margin + if ((bodyRect.y + bodyRect.height) >= bottomBoundary) + { + bodyRect.y = bottomBoundary - bodyRect.height; + } + + float correctLength = __arrowBottomMargin - __anchorPopupOverlap; + windowRect.x = bodyRect.x; + windowRect.y = bodyRect.y - arrowRect.height; + windowRect.width = bodyRect.width; + windowRect.height = bodyRect.height + arrowRect.height - correctLength; + + bodyRect.x = 0.0f; + bodyRect.y = arrowRect.height - correctLength; + + // Set arrow position + arrowRect.x = anchorPosition.x - (arrowRect.width / 2.0f) - windowRect.x; + arrowRect.y = 0.0f; + } + else if (dropPosition == CONTEXT_MENU_CORE_DROP_POSITION_LEFT) // right Arrow + { + // Check touch position + // - Check left margin + if (anchorPosition.x <= leftBoundary) + { + anchorPosition.x = leftBoundary + bodyRect.width; + } + // - check right margin + if (anchorPosition.x >= rightBoundary) + { + anchorPosition.x = rightBoundary; + } + // - Check top margin + if (anchorPosition.y <= topBoundary + arrowRect.height) + { + anchorPosition.y = topBoundary + arrowRect.height; + } + // - check bottom margin + if (anchorPosition.y >= (bottomBoundary - arrowRect.height)) + { + anchorPosition.y = bottomBoundary - arrowRect.height; + } + + // Set body position x + bodyRect.x = anchorPosition.x - arrowRect.width - bodyRect.width; + // - Check left margin + if (bodyRect.x <= leftBoundary) + { + bodyRect.x = leftBoundary; + } + // - check right margin + if ((bodyRect.x + bodyRect.width + arrowRect.width) >= rightBoundary) + { + bodyRect.x = rightBoundary - bodyRect.width - arrowRect.width; + } + + // Set body position y + bodyRect.y = anchorPosition.y - (bodyRect.height / 2.0f); + // - check top margin + if (bodyRect.y <= topBoundary) + { + bodyRect.y = topBoundary; + } + // - check bottom margin + if ((bodyRect.y + bodyRect.height) >= bottomBoundary) + { + bodyRect.y = bottomBoundary - bodyRect.height; + } + + float correctLength = __arrowRightMargin - __anchorPopupOverlap; + windowRect.x = bodyRect.x + correctLength; + windowRect.y = bodyRect.y; + windowRect.width = bodyRect.width + arrowRect.width - correctLength; + windowRect.height = bodyRect.height; + + bodyRect.x = 0.0f; + bodyRect.y = 0.0f; + + // Set arrow position + arrowRect.x = bodyRect.width - correctLength; + arrowRect.y = anchorPosition.y - (arrowRect.height / 2.0f) - windowRect.y; + } + else // left Arrow + { + // Check touch position + // - Check top margin + if (anchorPosition.x <= leftBoundary) + { + anchorPosition.x = leftBoundary; + } + // - check right margin + if (anchorPosition.x >= rightBoundary) + { + anchorPosition.x = rightBoundary - bodyRect.width; + } + // - Check top margin + if (anchorPosition.y <= topBoundary + arrowRect.height) + { + anchorPosition.y = topBoundary + arrowRect.height; + } + // - check bottom margin + if (anchorPosition.y >= (bottomBoundary - arrowRect.height)) + { + anchorPosition.y = bottomBoundary - arrowRect.height; + } + + // Set body position x + bodyRect.x = anchorPosition.x; + // - Check left margin + if (bodyRect.x <= leftBoundary) + { + bodyRect.x = leftBoundary; + } + // - check right margin + if ((bodyRect.x + bodyRect.width + arrowRect.width) >= rightBoundary) + { + bodyRect.x = rightBoundary - bodyRect.width - arrowRect.width; + } + // Set body position y + bodyRect.y = anchorPosition.y - (bodyRect.height / 2); + // - check top margin + if (bodyRect.y <= topBoundary) + { + bodyRect.y = topBoundary; + } + // - check bottom margin + if ((bodyRect.y + bodyRect.height) >= bottomBoundary) + { + bodyRect.y = bottomBoundary - bodyRect.height; + } + + float correctLength = __arrowLeftMargin - __anchorPopupOverlap; + windowRect.x = bodyRect.x; + windowRect.y = bodyRect.y; + windowRect.width = bodyRect.width + arrowRect.width - correctLength; + windowRect.height = bodyRect.height; + + bodyRect.x = arrowRect.width - correctLength; + bodyRect.y = 0.0f; + + // Set arrow position + arrowRect.x = 0.0f; + arrowRect.y = anchorPosition.y - (arrowRect.height / 2.0f) - windowRect.y; + } + + itemRect.x = bodyRect.x + bodyLeftMargin; + itemRect.y = bodyRect.y + bodyTopMargin; + itemRect.width = __layoutSize.width; + itemRect.height = __layoutSize.height; + + __pContextMenu->SetWindowRect(windowRect); + __pContextMenu->SetBodyRect(bodyRect); + __pContextMenu->SetArrowRect(arrowRect); + __pContextMenu->SetItemRect(itemRect); + + __pContextMenu->SetMovable(true); + __pContextMenu->SetResizable(true); + + __pContextMenu->SetMinimumSize(FloatDimension(0.0f, 0.0f)); + __pContextMenu->SetMaximumSize(screen); + __pContextMenu->SetBounds(windowRect); + + __pContextMenu->SetMovable(false); + __pContextMenu->SetResizable(false); + + return E_SUCCESS; +} + +bool +_ContextMenuGridPresenter::IsLayoutBitmapOnly(void) +{ + int itemCount = __pModel->GetItemCount(); + + if (itemCount <= 0) + { + return false; + } + + _ContextMenuItem* pItem = null; + + for (int i = 0; i < itemCount; i++) + { + pItem = __pModel->GetItem(i); + if (pItem == null) + { + return false; + } + + if (pItem->GetType() == CONTEXT_MENU_ITEM_DRAWING_TYPE_TEXT) + { + return false; + } + } + + return true; +} + +result +_ContextMenuGridPresenter::AdjustItemLayout(void) +{ + int itemCount = __pModel->GetItemCount(); + FloatDimension layoutSize(0.0f, 0.0f); + + if (itemCount <= 0) + { + __layoutSize.width = __itemWidth; + __layoutSize.height = __itemHeight; + + return E_SUCCESS; + } + + // GUI guide word: 5x2 + bool bitmapOnly = IsLayoutBitmapOnly(); + + if (bitmapOnly == true) + { + layoutSize = AdjustItemLayoutIconStyle(); + } + else + { + layoutSize = AdjustItemLayoutTabStyle(); + } + + __layoutSize = layoutSize; + + return GetLastResult(); +} + +FloatDimension +_ContextMenuGridPresenter::AdjustItemLayoutIconStyle(void) +{ + ClearLastResult(); + + int countPerLine = 0; + int itemCount = __pModel->GetItemCount(); + float itemWidth = __itemWidth + __itemGap; + float itemHeight = __itemHeight + __itemGap; + FloatDimension layoutSize(0.0f, 0.0f); + + 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); + + int lineCount = itemCount / countPerLine; + if (itemCount % countPerLine != 0) + { + lineCount++; + } + + layoutSize.width = countPerLine * __itemWidth + (countPerLine - 1) * __itemGap; + int showLineCount = __pContextMenu->GetShowItemMaxCount(); + if (lineCount > showLineCount) + { + SetLastResult(E_MAX_EXCEEDED); + } + else + { + showLineCount = lineCount; + } + layoutSize.height = showLineCount * __itemHeight + (showLineCount - 1) *__itemGap; + + _ContextMenuItem* pItem = null; + + for (int line = 0; line < showLineCount; line++) + { + float pressedTopMargin = 0.0f, pressedBottomMargin = 0.0f; + if (line == 0) + { + pressedTopMargin = __bgPressedMargin; + } + + if (line == showLineCount - 1) + { + pressedBottomMargin = __bgPressedMargin; + } + + for (int i = 0; i < countPerLine; i++) + { + int index = (line * countPerLine) + i; + if (index >= itemCount) + { + break; + } + + pItem = __pModel->GetItem(index); + + if (pItem == null) + { + break; + } + + FloatRectangle drawRect(0.0f, 0.0f, __itemWidth, __itemHeight); + + drawRect.x = (i * itemWidth); + drawRect.y = (line * itemHeight); + + bool drawDivider = true; + if (i == countPerLine - 1) + { + drawDivider = false; + } + + pItem->SetDrawRect(drawRect); + pItem->SetLowerDivider(drawDivider); + + float pressedLeftMargin = 0.0f, pressedRightMargin = 0.0f; + if (i == 0) + { + pressedLeftMargin = __bgPressedMargin; + } + + if (i == countPerLine - 1) + { + pressedRightMargin = __bgPressedMargin; + } + + FloatRectangle pressedDrawRect = drawRect; + pressedDrawRect.x += pressedLeftMargin; + pressedDrawRect.y += pressedTopMargin; + pressedDrawRect.width -= pressedLeftMargin + pressedRightMargin; + pressedDrawRect.height -= pressedTopMargin + pressedBottomMargin; + pItem->SetPressedDrawRect(pressedDrawRect); + __showItemCount = index; + } + } + + __showItemCount++; + + return layoutSize; + +} + +FloatDimension +_ContextMenuGridPresenter::AdjustItemLayoutTabStyle(void) +{ + ClearLastResult(); + + int lineItemCountList[MAX_LINE_COUNT] = {0, }; + float lineWidthList[MAX_LINE_COUNT] = {0.0f, }; + + int itemCount = __pModel->GetItemCount(); + float maxWidth = __itemWidth; + float itemHeight = __itemHeight + __itemGap; + int lineCount = 1, showLineCount = 0; + float lineWidth = 0.0f; + int lineItemCount = 0; + float x = 0.0f; + float y = 0.0f; + float remainWidth = 0.0f; + FloatDimension screen = _ControlManager::GetInstance()->GetScreenSizeF(); + FloatPoint anchorPosition = __pContextMenu->GetAnchorPosition(); + ContextMenuCoreDropPosition dropPosition = __pContextMenu->GetDropPosition(); + + if (__pContextMenu->GetLayout() == _CONTROL_ORIENTATION_LANDSCAPE) + { + GET_SHAPE_CONFIG(CONTEXTMENU::GRID_MAX_WIDTH, _CONTROL_ORIENTATION_LANDSCAPE, __maxWidth); + screen.SetSize(screen.height, screen.width); + } + else + { + GET_SHAPE_CONFIG(CONTEXTMENU::GRID_MAX_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, __maxWidth); + } + + if (dropPosition == CONTEXT_MENU_CORE_DROP_POSITION_LEFT || dropPosition == CONTEXT_MENU_CORE_DROP_POSITION_RIGHT) + { + remainWidth = anchorPosition.x * 2 < screen.width ? screen.width - anchorPosition.x : anchorPosition.x; + remainWidth -= __screenLeftMargin + __leftMargin + __rightMargin + __screenRightMargin; + remainWidth -= __arrowHeight; + __maxWidth = __maxWidth < remainWidth ? __maxWidth : remainWidth; + } + + _ContextMenuItem* pItem = null; + for (int i = 0; i < itemCount; i++) + { + pItem = __pModel->GetItem(i); + if (pItem == null) + { + break; + } + + FloatDimension itemSize = pItem->GetSize(); + if (lineWidth + itemSize.width > __maxWidth) + { + _ContextMenuItem* pPreviousItem = __pModel->GetItem(i - 1); + if (pPreviousItem != null) + { + pPreviousItem->SetLowerDivider(false); + } + + x = 0.0f; + y = y + itemHeight; + + lineWidth = 0.0f; + lineItemCount = 0; + lineCount++; + } + + FloatRectangle drawRect(x, y, itemSize.width, itemSize.height); + pItem->SetDrawRect(drawRect); + pItem->SetLowerDivider(true); + + x = x + itemSize.width + __itemGap; + lineWidth = lineWidth + itemSize.width + __itemGap; + + if (lineWidth > maxWidth) + { + maxWidth = lineWidth; + } + + lineItemCount++; + if (lineItemCount > MAX_LINE_COUNT) + { + lineItemCount = MAX_LINE_COUNT; + break; + } + + lineWidthList[lineCount - 1] = lineWidth; + lineItemCountList[lineCount - 1] = lineItemCount; + } + + // last item + if (pItem != null) + { + pItem->SetLowerDivider(false); + } + + FloatDimension layoutSize(__itemWidth, __itemHeight); + layoutSize.width = maxWidth - __itemGap; + showLineCount = __pContextMenu->GetShowItemMaxCount(); + if (lineCount > showLineCount) + { + SetLastResult(E_MAX_EXCEEDED); + } + else + { + showLineCount = lineCount; + } + layoutSize.height = showLineCount * __itemHeight + (showLineCount - 1) *__itemGap; + + // divide margin + int itemIndex = 0; + for (int line = 0; line < showLineCount; line++) + { + FloatRectangle drawRect; + float width = lineWidthList[line]; + int count = lineItemCountList[line]; + float blank = maxWidth - width; + float addMargin = blank / count; + if (_FloatCompareGE(blank, 100.0f) && line == showLineCount - 1) + { + addMargin = 0.0f; + } + + float pressedTopMargin = 0.0f, pressedBottomMargin = 0.0f; + if (line == 0) + { + pressedTopMargin = __bgPressedMargin; + } + + if (line == showLineCount - 1) + { + pressedBottomMargin = __bgPressedMargin; + } + + for (int i = 0; i < count; i++) + { + int index = itemIndex + i; + pItem = __pModel->GetItem(index); + if (pItem == null) + { + break; + } + + drawRect = pItem->GetDrawRect(); + + drawRect.width = drawRect.width + addMargin; + drawRect.x = drawRect.x + (i * addMargin); + + pItem->SetDrawRect(drawRect); + + float pressedLeftMargin = 0.0f, pressedRightMargin = 0.0f; + if (i == 0) + { + pressedLeftMargin = __bgPressedMargin; + } + + if (i == count - 1) + { + pressedRightMargin = __bgPressedMargin; + } + + FloatRectangle pressedDrawRect = drawRect; + pressedDrawRect.x += pressedLeftMargin; + pressedDrawRect.y += pressedTopMargin; + pressedDrawRect.width -= pressedLeftMargin + pressedRightMargin; + pressedDrawRect.height -= pressedTopMargin + pressedBottomMargin; + pItem->SetPressedDrawRect(pressedDrawRect); + __showItemCount = index; + } + + itemIndex += count; + } + + __showItemCount++; + + return layoutSize; +} + +void +_ContextMenuGridPresenter::AdjustItemPosition(void) +{ + int itemCount = __pModel->GetItemCount(); + + if (itemCount <= 0) + { + return; + } + + int x = __pContextMenu->GetBodyRect().x + __leftMargin; + int y = __pContextMenu->GetBodyRect().y + __topMargin; + + _ContextMenuItem* pItem = null; + + for (int i = 0; i < itemCount; i++) + { + pItem = __pModel->GetItem(i); + + if (pItem == null) + { + break; + } + + FloatRectangle drawRect = pItem->GetDrawRect(); + drawRect.x += x; + drawRect.y += y; + pItem->SetDrawRect(drawRect); + + FloatRectangle pressedDrawRect = pItem->GetPressedDrawRect(); + pressedDrawRect.x += x; + pressedDrawRect.y += y; + pItem->SetPressedDrawRect(pressedDrawRect); + } +} + +int +_ContextMenuGridPresenter::GetCountPerLine(int count) const +{ + static const int countOfX[MAX_ITEM_COUNT + 1] = {0, // not used + 1, 2, 3, 4, 5, 3, 4, 4, 5, 5, + 4, 4, 5, 5, 5, 4, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, + }; + + return countOfX[count]; +} + +int +_ContextMenuGridPresenter::GetItemIndexFromPosition(const FloatPoint& point) const +{ + int index = -1; + int itemCount = __pModel->GetItemCount(); + + if (itemCount < 0) + { + return -1; + } + + _ContextMenuItem* pItem = null; + + for (int i = 0; i < itemCount; i++) + { + pItem = __pModel->GetItem(i); + + if (pItem == null) + { + break; + } + + FloatRectangle drawRect = pItem->GetDrawRect(); + + if (drawRect.Contains(point) == true) + { + index = i; + break; + } + } + + return index; +} + + +result +_ContextMenuGridPresenter::Draw(void) +{ + result r = E_SUCCESS; + + Canvas* pCanvas = __pContextMenu->GetCanvasN(); + + SysTryReturnResult(NID_UI_CTRL, pCanvas != null, GetLastResult(), "Propagating."); + + // Clear canvas for drawing area of the ContextMenu. + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + FloatRectangle bounds(__pContextMenu->GetWindowRect()); + pCanvas->Clear(FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height)); + + r = DrawBackground(pCanvas); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to draw background.", GetErrorMessage(r)); + + r = DrawArrow(pCanvas); + 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) +{ + SysTryReturnResult(NID_UI_CTRL, pCanvas != null, E_SYSTEM, "A system error occurred. pCanvas is null."); + + result r = E_SUCCESS; + + FloatRectangle bodyRect = __pContextMenu->GetBodyRect(); + + const Bitmap* pBackgroundNormalBitmap = __pContextMenu->GetBackgroundNormalBitmap(); + const Bitmap* pBackgroundEffectBitmap = __pContextMenu->GetBackgroundEffectBitmap(); + + if (pBackgroundNormalBitmap == null && pBackgroundEffectBitmap == null) + { + pCanvas->SetForegroundColor(__pContextMenu->GetColor()); + pCanvas->DrawRectangle(bodyRect); + } + else + { + if (pBackgroundNormalBitmap != null) + { + r = DrawBitmap(*pCanvas, bodyRect, *pBackgroundNormalBitmap); + } + + if (pBackgroundEffectBitmap != null) + { + r = DrawBitmap(*pCanvas, bodyRect, *pBackgroundEffectBitmap); + } + } + + return r; +} + +result +_ContextMenuGridPresenter::DrawArrow(Canvas* pCanvas) +{ + SysTryReturnResult(NID_UI_CTRL, pCanvas != null, E_SYSTEM, "A system error occurred. pCanvas is null."); + + result r = E_SUCCESS; + FloatRectangle arrowRect = __pContextMenu->GetArrowRect(); + ContextMenuCoreDropPosition dropPosition = __pContextMenu->GetDropPosition(); + + const Bitmap* pArrowNormalBitmap = __pContextMenu->GetArrowNormalBitmap(dropPosition); + const Bitmap* pEffectArrowBitmap = __pContextMenu->GetArrowEffectBitmap(dropPosition); + + if (pArrowNormalBitmap != null) + { + r = DrawBitmap(*pCanvas, arrowRect, *pArrowNormalBitmap); + } + + if (pEffectArrowBitmap != null) + { + r = DrawBitmap(*pCanvas, arrowRect, *pEffectArrowBitmap); + } + + return r; +} + +result +_ContextMenuGridPresenter::DrawItem(Canvas* pCanvas) +{ + SysTryReturnResult(NID_UI_CTRL, pCanvas != null, E_SYSTEM, "A system error occurred. pCanvas is null."); + + result r = E_SUCCESS; + TextSimple* pSimpleText = null; + + int itemCount = __showItemCount; + + if (itemCount <= 0) + { + return E_SUCCESS; + } + + FloatRectangle bodyRect = __pContextMenu->GetBodyRect(); + Color pressedColor = __pContextMenu->GetItemColor(CONTEXT_MENU_CORE_ITEM_STATUS_PRESSED); + + float bitmapLeftMargin = __itemBitmapWidth / 2.0f; + float bitmapTopMargin = __itemBitmapHeight / 2.0f; + float linePositionX = bodyRect.x + __leftMargin + __rightMargin; + float linePositionY = bodyRect.y + __topMargin; + + _ContextMenuItem* pItem = null; + + for (int i = 0; i < itemCount; i++) + { + pItem = __pModel->GetItem(i); + + if (pItem == null) + { + continue; + } + + FloatRectangle rect = pItem->GetDrawRect(); + // divder + bool drawDivider = pItem->HasLowerDivider(); + if (drawDivider == true) + { + float x = rect.x + rect.width; + float y = rect.y + __topMargin; + + FloatPoint point1(x, y); + FloatPoint point2(x, y + __dividerHeight); + + + DrawLine(pCanvas, point1, point2, true); + } + + // horizontal line +// TOCHK find out what makes SHAPE_CONFIG values * 2 / 3 if (!_FloatCompare(linePositionY, rect.y)) + if (linePositionY - rect.y > 1.0f || linePositionY - rect.y < -1.0f) + { + linePositionY = rect.y; + + float x = linePositionX + __layoutSize.width - __leftMargin - __rightMargin; + float y = linePositionY - __itemGap; + + FloatPoint point1(linePositionX, y); + FloatPoint point2(x, y); + + DrawLine(pCanvas, point1, point2, false); + } + + ContextMenuItemDrawingType itemType = pItem->GetType(); + + if (itemType == CONTEXT_MENU_ITEM_DRAWING_TYPE_TEXT) + { + FloatRectangle drawRect = rect; + drawRect.x = drawRect.x + __itemTextMargin; + drawRect.width = drawRect.width - (__itemTextMargin * 2.0f); + + ContextMenuCoreItemStatus itemStatus = CONTEXT_MENU_CORE_ITEM_STATUS_NORMAL; + + if (__selectedIndex == i) + { + FloatRectangle pressedDrawRect = pItem->GetPressedDrawRect(); + itemStatus = CONTEXT_MENU_CORE_ITEM_STATUS_PRESSED; + + Bitmap* bgBitmap = __pContextMenu->GetPressedBitmap(); + + if (bgBitmap != null) + { + DrawBitmap(*pCanvas, pressedDrawRect, *bgBitmap); + } + + bgBitmap = null; + } + + String text = pItem->GetText(); + + __pTextObject->RemoveAll(); + pSimpleText = new (std::nothrow)TextSimple(const_cast (text.GetPointer()), text.GetLength()); + SysTryReturnResult(NID_UI_CTRL, pSimpleText != null, E_OUT_OF_MEMORY, "Memory allocation failed."); + __pTextObject->AppendElement(*pSimpleText); + + __pTextObject->SetForegroundColor(__pContextMenu->GetTextColor(itemStatus), 0, __pTextObject->GetTextLength()); + __pTextObject->SetBounds(drawRect); + __pTextObject->SetFont(__pFont, 0, __pTextObject->GetTextLength()); + __pTextObject->Draw(*_CanvasImpl::GetInstance(*pCanvas)); + + } + else + { + FloatRectangle drawRect = rect; + + drawRect.x = drawRect.x + drawRect.width / 2.0f - bitmapLeftMargin; + drawRect.y = drawRect.y + drawRect.height / 2.0f - bitmapTopMargin; + drawRect.width = __itemBitmapWidth; + drawRect.height = __itemBitmapHeight; + + ContextMenuItemDrawingStatus itemStatus = CONTEXT_MENU_ITEM_DRAWING_STATUS_NORMAL; + + if (__selectedIndex == i) + { + FloatRectangle pressedDrawRect = pItem->GetPressedDrawRect(); + itemStatus = CONTEXT_MENU_ITEM_DRAWING_STATUS_PRESSED; + + 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, true); + } + } + + if (__focusedIndex == i) + { + FloatRectangle pressedDrawRect = pItem->GetPressedDrawRect(); + + Color contentHighlightedColor; + GET_COLOR_CONFIG(FOCUSUI::CONTENT_BG_HIGHLIGHTED, contentHighlightedColor); + + Bitmap* pBitmap = null; + 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) + { + DrawBitmap(*pCanvas, pressedDrawRect, *pBitmap); + } + + delete pBitmap; + pBitmap = null; + } + + } + + return r; +} + +result +_ContextMenuGridPresenter::DrawLine(Canvas* pCanvas, FloatPoint point1, FloatPoint point2, bool drawVLine) +{ + SysTryReturnResult(NID_UI_CTRL, pCanvas != null, E_SYSTEM, "A system error occurred. pCanvas is null."); + + result r = E_SUCCESS; + + Color colorGridItemDivider01; + Color colorGridItemDivider02; + + GET_COLOR_CONFIG(CONTEXTMENU::GRID_ITEM_DIVIDER_01_NORMAL, colorGridItemDivider01); + GET_COLOR_CONFIG(CONTEXTMENU::GRID_ITEM_DIVIDER_02_NORMAL, colorGridItemDivider02); + + if (drawVLine == true) + { + pCanvas->SetForegroundColor(colorGridItemDivider01); + pCanvas->DrawLine(point1, point2); + + point1.x++; + point2.x++; + + pCanvas->SetForegroundColor(colorGridItemDivider02); + pCanvas->DrawLine(point1, point2); + } + else + { + pCanvas->SetForegroundColor(colorGridItemDivider01); + pCanvas->DrawLine(point1, point2); + + point1.y++; + point2.y++; + + pCanvas->SetForegroundColor(colorGridItemDivider02); + pCanvas->DrawLine(point1, point2); + } + + return r; +} + +_UiTouchEventDelivery +_ContextMenuGridPresenter::OnPreviewTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + return _UI_TOUCH_EVENT_DELIVERY_FORCED_YES; +} + +bool +_ContextMenuGridPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + FloatPoint touchPosition = touchinfo.GetCurrentPosition(); + FloatRectangle itemRect = __pContextMenu->GetItemRect(); + + if (itemRect.Contains(touchPosition) == false) + { + __selectedIndex = -1; + __pressedIndex = -1; + __touchOutRect = true; + + return true; + } + + __selectedIndex = GetItemIndexFromPosition(touchPosition); + __pressedIndex = __selectedIndex; + __touchOutRect = false; + Draw(); + + return true; +} + +_UiTouchEventDelivery +_ContextMenuGridPresenter::OnPreviewTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + return _UI_TOUCH_EVENT_DELIVERY_FORCED_YES; +} + +bool +_ContextMenuGridPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + FloatPoint touchPosition = touchinfo.GetCurrentPosition(); + + if (__touchOutRect == true) + { + 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); + if (__selectedIndex != -1 && (__selectedIndex == currentSelectedIndex)) + { + _ActionEvent* pActionEvent = __pContextMenu->GetActionEvent(); + + if (pActionEvent == null) + { + __pContextMenu->SetFocused(false); + __pContextMenu->SetVisibleState(false); + return true; + } + + _ContextMenuItem* pItem = null; + pItem = __pModel->GetItem(__selectedIndex); + + if (pItem == null) + { + __selectedIndex = -1; + __pressedIndex = -1; + __focusedIndex = -1; + __pContextMenu->SetFocused(false); + __pContextMenu->SetVisibleState(false); + return true; + } + + __selectedIndex = -1; + __pressedIndex = -1; + __focusedIndex = -1; + + int actionId = pItem->GetActionId(); + + IEventArg* pEventArg = _ActionEvent::CreateActionEventArgN(actionId); + + if (pEventArg == null) + { + __pContextMenu->SetFocused(false); + __pContextMenu->SetVisibleState(false); + return true; + } + + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pContextMenu); + __pContextMenu->SetFocused(false); + __pContextMenu->SetVisibleState(false); + pActionEvent->Fire(*pEventArg); + } + else + { + __selectedIndex = -1; + Draw(); + } + + return true; +} + +_UiTouchEventDelivery +_ContextMenuGridPresenter::OnPreviewTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + return _UI_TOUCH_EVENT_DELIVERY_FORCED_YES; +} + +bool +_ContextMenuGridPresenter::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + __selectedIndex = -1; + __pressedIndex = -1; + + return true; +} + +_UiTouchEventDelivery +_ContextMenuGridPresenter::OnPreviewTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + return _UI_TOUCH_EVENT_DELIVERY_FORCED_YES; +} + +bool +_ContextMenuGridPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + FloatPoint touchPosition = touchinfo.GetCurrentPosition(); + + if (__selectedIndex != -1) + { + _ContextMenuItem* pItem = __pModel->GetItem(__selectedIndex); + + if (pItem == null) + { + __selectedIndex = -1; + __pressedIndex = -1; + return true; + } + + FloatRectangle drawRect = pItem->GetDrawRect(); + if (drawRect.Contains(touchPosition) == false) + { + __selectedIndex = -1; + Draw(); + } + } + else if (__pressedIndex != -1) + { + _ContextMenuItem* pItem = __pModel->GetItem(__pressedIndex); + if(pItem != null) + { + FloatRectangle drawRect = pItem->GetDrawRect(); + if(drawRect.Contains(touchPosition)) + { + __selectedIndex = __pressedIndex; + Draw(); + } + } + } + + return true; +} + +bool +_ContextMenuGridPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) +{ + _KeyCode keyCode = keyInfo.GetKeyCode(); + + switch (keyCode) + { + case _KEY_LEFT: + // fall through + case _KEY_UP: + { + if (__enterKeyPressed) + { + __enterKeyPressed = false; + __selectedIndex = -1; + } + + if (--__focusedIndex < 0) + { + __focusedIndex = 0; + } + + _ContextMenuItem* pItem = __pModel->GetItem(__focusedIndex); + if (pItem == null) + { + __focusedIndex = -1; + break; + } + pItem->SetFocused(true); + Draw(); + + break; + } + case _KEY_RIGHT: + // fall through + case _KEY_DOWN: + { + if (__enterKeyPressed) + { + __enterKeyPressed = false; + __selectedIndex = -1; + } + + _ContextMenuItem* pItem = __pModel->GetItem(++__focusedIndex); + if(pItem == null) + { + --__focusedIndex; + break; + } + pItem->SetFocused(true); + Draw(); + + break; + } + case _KEY_ENTER: + { + __enterKeyPressed = true; + + if (__focusedIndex == -1) + { + break; + } + + __selectedIndex = __focusedIndex; + _ContextMenuItem* pItem = __pModel->GetItem(__focusedIndex); + if (pItem != null) + { + pItem->SetFocused(true); + Draw(); + } + + break; + } + case _KEY_BACKSPACE: + { + _ContextMenuItem* pItem = __pModel->GetItem(__focusedIndex); + if (pItem != null) + { + pItem->SetFocused(false); + } + + __enterKeyPressed = false; + __backKeyPressed = false; + __pressedIndex = -1; + __selectedIndex = -1; + __focusedIndex = -1; + + __pContextMenu->SetFocused(false); + __pContextMenu->SetVisibleState(false); + + break; + } + case _KEY_ESC: + // fall through + case _KEY_MENU: + // fall through + case _KEY_CONTEXT_MENU: + // fall through + case _KEY_BACK: + __backKeyPressed = true; + break; + default: + return false; + } + + return true; +} + +bool +_ContextMenuGridPresenter::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) +{ + _KeyCode keyCode = keyInfo.GetKeyCode(); + + switch (keyCode) + { + case _KEY_LEFT: + // fall through + case _KEY_UP: + // fall through + case _KEY_RIGHT: + // fall through + case _KEY_DOWN: + // fall through + case _KEY_BACKSPACE: + break; + case _KEY_ENTER: + { + if (!__enterKeyPressed) + { + return true; + } + + __enterKeyPressed = false; + __backKeyPressed = false; + + _ContextMenuItem* pItem = __pModel->GetItem(__selectedIndex); + if (pItem == null) + { + __selectedIndex = -1; + __pressedIndex = -1; + __focusedIndex = -1; + __pContextMenu->SetFocused(false); + __pContextMenu->SetVisibleState(false); + + break; + } + + int actionId = pItem->GetActionId(); + + _ActionEvent* pActionEvent = __pContextMenu->GetActionEvent(); + if (pActionEvent == null) + { + break; + } + + IEventArg* pEventArg = _ActionEvent::CreateActionEventArgN(actionId); + if (pEventArg == null) + { + break; + } + + pActionEvent->Fire(*pEventArg); + + __selectedIndex = -1; + __pressedIndex = -1; + __focusedIndex = -1; + pItem->SetFocused(false); + __pContextMenu->SetFocused(false); + __pContextMenu->SetVisibleState(false); + + break; + } + case _KEY_ESC: + // fall through + case _KEY_MENU: + // fall through + case _KEY_CONTEXT_MENU: + // fall through + case _KEY_BACK: + { + if (!__backKeyPressed) + { + return true; + } + + _ContextMenuItem* pItem = __pModel->GetItem(__focusedIndex); + if (pItem != null) + { + pItem->SetFocused(false); + } + + __enterKeyPressed = false; + __backKeyPressed = false; + __selectedIndex = -1; + __pressedIndex = -1; + __focusedIndex = -1; + __pContextMenu->SetFocused(false); + __pContextMenu->SetVisibleState(false); + + break; + } + default: + return false; + } + + return true; +} + +bool +_ContextMenuGridPresenter::IsChildControlFocusManage(void) const +{ + return true; +} + +void +_ContextMenuGridPresenter::OnDrawFocus(void) +{ + if (__focusedIndex == -1) + { + __focusedIndex = 0; + } + __selectedIndex = -1; + + Draw(); +} + +void +_ContextMenuGridPresenter::OnFocusModeStateChanged(void) +{ + __focusedIndex = -1; + 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) +{ + __pFont = pFont; +} + +void +_ContextMenuGridPresenter::OnFontInfoRequested(unsigned long& style, float& size) +{ + style = FONT_STYLE_PLAIN; + size = __itemFontSize; +} + +void +_ContextMenuGridPresenter::SetAllAccessibilityElement(void) +{ + _AccessibilityContainer* pContainer = __pContextMenu->GetAccessibilityContainer(); + if (pContainer != null) + { + _AccessibilityElement* pElementContextMenu = new (std::nothrow) _AccessibilityElement(true); + 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->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); + + int itemCount = __pModel->GetItemCount(); + for (int i = 0; i < itemCount; i++) + { + _ContextMenuItem* pItem = __pModel->GetItem(i); + _AccessibilityElement* pElement = new (std::nothrow) _AccessibilityElement(true); + if (pItem != null && pElement != null) + { + pElement->SetName(L"ContextMenuItem" + Integer::ToString(i)); + if (pItem->GetType() == CONTEXT_MENU_ITEM_DRAWING_TYPE_BITMAP) + { + pElement->SetLabelWithStringId("IDS_TPLATFORM_BODY_ICON."); + } + else + { + pElement->SetLabel(pItem->GetText()); + } + + pElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_CONTEXTUAL_POP_UP_T_TTS."); + pElement->SetBounds(pItem->GetDrawRect()); + pContainer->AddElement(*pElement); + __pContextMenu->AddAccessibilityElement(*pElement); + } + else + { + delete pElement; + } + } + } + +} + +_ContextMenuItemInfo +_ContextMenuGridPresenter::GetItemFromPosition(const FloatPoint& position) +{ + _ContextMenuItemInfo itemInfo; + int index = GetItemIndexFromPosition(position); + itemInfo.pContextMenuItem = __pModel->GetItem(index); + + itemInfo.bListItem = false; + itemInfo.pListItem = null; + return itemInfo; +} + +_ContextMenuItemInfo +_ContextMenuGridPresenter::FindItem(int index) +{ + _ContextMenuItemInfo itemInfo; + itemInfo.bListItem = false; + itemInfo.pListItem = null; + itemInfo.pContextMenuItem = __pModel->GetItem(index); + return itemInfo; +} + +result +_ContextMenuGridPresenter::SetTopDrawnItemIndex(int index) +{ + return E_SUCCESS; +} + +result +_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, "Failed to draw ninepatched bitmap."); + } + else if (isAppBitmap) + { + r = canvas.DrawBitmap(bounds, 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; +} + +}}} // Tizen::Ui: Control diff --git a/src/ui/controls/FUiCtrl_ContextMenuImpl.cpp b/src/ui/controls/FUiCtrl_ContextMenuImpl.cpp new file mode 100644 index 0000000..595414b --- /dev/null +++ b/src/ui/controls/FUiCtrl_ContextMenuImpl.cpp @@ -0,0 +1,488 @@ +// +// 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_ContextMenuImpl.cpp + * @brief This is the implementation file for the _ContextMenuImpl class. + */ + +#include +#include +#include "FUi_ControlImplManager.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUiCtrl_ContextMenuImpl.h" +#include "FUiCtrl_FrameImpl.h" +#include "FUiCtrl_Form.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_ContextMenuImpl* +_ContextMenuImpl::GetInstance(ContextMenu& contextMenu) +{ + return static_cast<_ContextMenuImpl*> (contextMenu._pControlImpl); +} + +const _ContextMenuImpl* +_ContextMenuImpl::GetInstance(const ContextMenu& contextMenu) +{ + return static_cast (contextMenu._pControlImpl); +} + +_ContextMenuImpl::_ContextMenuImpl(ContextMenu* pPublic, _ContextMenu* pCore, ContextMenuStyle style) + : _WindowImpl(pPublic, pCore) + , __style(style) + , __pContextMenu(pCore) + , __pPublicActionEvent(null) +{ +} + +_ContextMenuImpl* +_ContextMenuImpl::CreateContextMenuImplN(ContextMenu* pPublic, const FloatPoint& point, ContextMenuStyle style, + ContextMenuAnchorDirection direction) +{ + + ClearLastResult(); + result r = E_SUCCESS; + + enum ContextMenuCoreStyle coreStyle = CONTEXT_MENU_CORE_STYLE_LIST; + switch (style) + { + case CONTEXT_MENU_STYLE_LIST: + coreStyle = CONTEXT_MENU_CORE_STYLE_LIST; + break; + + case CONTEXT_MENU_STYLE_GRID: + coreStyle = CONTEXT_MENU_CORE_STYLE_GRID; + break; + + case CONTEXT_MENU_STYLE_ICON: + coreStyle = CONTEXT_MENU_CORE_STYLE_GRID; + break; + + default: + SysLogException(NID_UI_CTRL, E_SYSTEM, "Unable to convert ContextMenu style."); + break; + } + + enum ContextMenuCoreAlign contextMenuAlign = CONTEXT_MENU_CORE_ALIGN_AUTO; + switch (direction) + { + case CONTEXT_MENU_ANCHOR_DIRECTION_LEFTWARD: + contextMenuAlign = CONTEXT_MENU_CORE_ALIGN_LEFT; + break; + + case CONTEXT_MENU_ANCHOR_DIRECTION_RIGHTWARD: + contextMenuAlign = CONTEXT_MENU_CORE_ALIGN_RIGHT; + break; + + case CONTEXT_MENU_ANCHOR_DIRECTION_UPWARD: + contextMenuAlign = CONTEXT_MENU_CORE_ALIGN_UP; + break; + + case CONTEXT_MENU_ANCHOR_DIRECTION_DOWNWARD: + contextMenuAlign = CONTEXT_MENU_CORE_ALIGN_DOWN; + break; + + default: + contextMenuAlign = CONTEXT_MENU_CORE_ALIGN_AUTO; + break; + } + + _ContextMenu* pCore = _ContextMenu::CreateContextMenuN(point, coreStyle, contextMenuAlign); + 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); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + return pImpl; +} + +_ContextMenuImpl::~_ContextMenuImpl(void) +{ + _Dispose(); +} + +result +_ContextMenuImpl::_Dispose(void) +{ + result r = E_SUCCESS; + + if (__pPublicActionEvent) + { + delete __pPublicActionEvent; + __pPublicActionEvent = null; + } + __pContextMenu = null; + + return r; +} + +result +_ContextMenuImpl::AddItem(const Base::String& text, int actionId, const Bitmap* pNormalBitmap, + const Bitmap* pPressedBitmap, const Bitmap* pHighlightedBitmap) +{ + ClearLastResult(); + + return __pContextMenu->AddItem(text, actionId, pNormalBitmap, pPressedBitmap, pHighlightedBitmap); +} + +result +_ContextMenuImpl::InsertItem(int index, const String& text, int actionId, const Bitmap* pNormalBitmap, + const Bitmap* pPressedBitmap, const Bitmap* pHighlightedBitmap) +{ + ClearLastResult(); + + return __pContextMenu->InsertItem(index, text, actionId, pNormalBitmap, pPressedBitmap, pHighlightedBitmap); +} + +result +_ContextMenuImpl::SetItem(int index, const String& text, int actionId, const Bitmap* pNormalBitmap, + const Bitmap* pPressedBitmap, const Bitmap* pHighlightedBitmap) +{ + ClearLastResult(); + + return __pContextMenu->SetItem(index, text, actionId, pNormalBitmap, pPressedBitmap, pHighlightedBitmap); +} + +result +_ContextMenuImpl::RemoveItemAt(int index) +{ + ClearLastResult(); + + if (index >= GetItemCount() || index < 0) + { + 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; + } + + return __pContextMenu->RemoveItemAt(index); +} + +result +_ContextMenuImpl::RemoveAllItems(void) +{ + ClearLastResult(); + + return __pContextMenu->RemoveAllItems(); +} + +result +_ContextMenuImpl::SetAnchorPosition(float x, float y) +{ + ClearLastResult(); + + return __pContextMenu->SetAnchorPosition(x, y); +} + +FloatPoint +_ContextMenuImpl::GetAnchorPosition(void) const +{ + ClearLastResult(); + + FloatPoint point; + point = __pContextMenu->GetAnchorPosition(); + + return point; +} + +int +_ContextMenuImpl::GetItemCount(void) const +{ + ClearLastResult(); + + return __pContextMenu->GetItemCount(); +} + +result +_ContextMenuImpl::SetMaxVisibleItemsCount(int maxItemsCount) +{ + ClearLastResult(); + + return __pContextMenu->SetShowItemCount(maxItemsCount); +} + +int +_ContextMenuImpl::GetMaxVisibleItemsCount(void) const +{ + ClearLastResult(); + + return __pContextMenu->GetShowItemCount(); +} + +int +_ContextMenuImpl::GetItemIndexFromActionId(int actionId) const +{ + ClearLastResult(); + + return __pContextMenu->GetItemIndexAt(actionId); +} + +int +_ContextMenuImpl::GetItemActionIdAt(int index) const +{ + ClearLastResult(); + + return __pContextMenu->GetItemActionIdAt(index); +} + +result +_ContextMenuImpl::SetColor(const Graphics::Color& color) +{ + ClearLastResult(); + + result r = E_SUCCESS; + + r = __pContextMenu->SetColor(color); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set color."); + + return r; +} + +Color +_ContextMenuImpl::GetColor(void) const +{ + ClearLastResult(); + + return __pContextMenu->GetColor(); + +} + +result +_ContextMenuImpl::SetItemTextColor(ContextMenuItemStatus status, const Color& color) +{ + ClearLastResult(); + + result r = E_SUCCESS; + + switch (status) + { + case CONTEXT_MENU_ITEM_STATUS_NORMAL: + r = __pContextMenu->SetTextColor(CONTEXT_MENU_CORE_ITEM_STATUS_NORMAL, color); + break; + + case CONTEXT_MENU_ITEM_STATUS_PRESSED: + r = __pContextMenu->SetTextColor(CONTEXT_MENU_CORE_ITEM_STATUS_PRESSED, color); + break; + + case CONTEXT_MENU_ITEM_STATUS_HIGHLIGHTED: + r = __pContextMenu->SetTextColor(CONTEXT_MENU_CORE_ITEM_STATUS_HIGHLIGHTED, color); + break; + + default: + SysLogException(NID_UI_CTRL, E_INVALID_ARG, "Invalid argument is used. ContextMenuItemStatus parameter is invalid."); + r = E_INVALID_ARG; + break; + } + + return r; + +} + +Color +_ContextMenuImpl::GetItemTextColor(ContextMenuItemStatus status) const +{ + ClearLastResult(); + + SysAssertf(__pContextMenu != null, "Not yet constructed. Construct() should be called before use."); + + Color color(0, 0, 0, 0); + + switch (status) + { + case CONTEXT_MENU_ITEM_STATUS_NORMAL: + color = __pContextMenu->GetTextColor(CONTEXT_MENU_CORE_ITEM_STATUS_NORMAL); + break; + + case CONTEXT_MENU_ITEM_STATUS_PRESSED: + color = __pContextMenu->GetTextColor(CONTEXT_MENU_CORE_ITEM_STATUS_PRESSED); + break; + + case CONTEXT_MENU_ITEM_STATUS_HIGHLIGHTED: + color = __pContextMenu->GetTextColor(CONTEXT_MENU_CORE_ITEM_STATUS_HIGHLIGHTED); + break; + + default: + SysLogException(NID_UI_CTRL, E_SYSTEM, "Invalid argument is used. ContextMenuItemStatus parameter is invalid."); + break; + } + return color; + +} + +result +_ContextMenuImpl::SetItemColor(ContextMenuItemStatus status, const Color& color) +{ + ClearLastResult(); + + SysAssertf(__pContextMenu != null, "Not yet constructed. Construct() should be called before use."); + + result r = E_SUCCESS; + + switch (status) + { + case CONTEXT_MENU_ITEM_STATUS_NORMAL: + r = __pContextMenu->SetItemColor(CONTEXT_MENU_CORE_ITEM_STATUS_NORMAL, color); + break; + + case CONTEXT_MENU_ITEM_STATUS_PRESSED: + r = __pContextMenu->SetItemColor(CONTEXT_MENU_CORE_ITEM_STATUS_PRESSED, color); + break; + + case CONTEXT_MENU_ITEM_STATUS_HIGHLIGHTED: + r = __pContextMenu->SetItemColor(CONTEXT_MENU_CORE_ITEM_STATUS_HIGHLIGHTED, color); + break; + + default: + SysLogException(NID_UI_CTRL, E_INVALID_ARG, "Invalid argument is used. ContextMenuItemStatus parameter is invalid."); + r = E_INVALID_ARG; + break; + } + + return r; + +} + +Color +_ContextMenuImpl::GetItemColor(ContextMenuItemStatus status) const +{ + ClearLastResult(); + + SysAssertf(__pContextMenu != null, "Not yet constructed. Construct() should be called before use."); + + Color color(0, 0, 0, 0); + + switch (status) + { + case CONTEXT_MENU_ITEM_STATUS_NORMAL: + color = __pContextMenu->GetItemColor(CONTEXT_MENU_CORE_ITEM_STATUS_NORMAL); + break; + + case CONTEXT_MENU_ITEM_STATUS_PRESSED: + color = __pContextMenu->GetItemColor(CONTEXT_MENU_CORE_ITEM_STATUS_PRESSED); + break; + + case CONTEXT_MENU_ITEM_STATUS_HIGHLIGHTED: + color = __pContextMenu->GetItemColor(CONTEXT_MENU_CORE_ITEM_STATUS_HIGHLIGHTED); + break; + + default: + SysLogException(NID_UI_CTRL, E_SYSTEM, "Invalid argument is used. ContextMenuItemStatus parameter is invalid."); + break; + } + + SetLastResult(E_SUCCESS); + return color; + +} + +ContextMenuStyle +_ContextMenuImpl::GetPublicStyle(void) const +{ + return __style; +} + +result +_ContextMenuImpl::AddActionEventListener(IActionEventListener& listener) +{ + ClearLastResult(); + + result r = E_SUCCESS; + + if (__pPublicActionEvent == null) + { + __pPublicActionEvent = _PublicActionEvent::CreateInstanceN(GetPublic()); + SysTryReturnResult(NID_UI_CTRL, __pPublicActionEvent != null, GetLastResult(),"Propagating."); + } + + r = __pPublicActionEvent->AddListener(listener); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to add action event listener."); + + r = __pContextMenu->AddActionEventListener(*this); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to add action event listener."); + + return r; +} + +result +_ContextMenuImpl::RemoveActionEventListener(IActionEventListener& listener) +{ + ClearLastResult(); + + SysTryReturnResult(NID_UI_CTRL, __pPublicActionEvent != null, E_INVALID_STATE, + "__pPublicActionEvent must not be null.") + + result r = E_SUCCESS; + + r = __pPublicActionEvent->RemoveListener(listener); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to remove action event listener."); + + r = __pContextMenu->RemoveActionEventListener(*this); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to remove action event listener."); + + return r; +} + +void +_ContextMenuImpl::OnActionPerformed(const _Control& source, int actionId) +{ + ClearLastResult(); + + if (__pPublicActionEvent != null) + { + __pPublicActionEvent->Fire(*_PublicActionEvent::CreateActionEventArgN(actionId)); + } +} + +const char* +_ContextMenuImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Controls::ContextMenu"; +} + +const ContextMenu& +_ContextMenuImpl::GetPublic(void) const +{ + return static_cast (_ControlImpl::GetPublic()); +} + +ContextMenu& +_ContextMenuImpl::GetPublic(void) +{ + return static_cast (_ControlImpl::GetPublic()); +} + +const _ContextMenu& +_ContextMenuImpl::GetCore(void) const +{ + return static_cast (_ControlImpl::GetCore()); +} + +_ContextMenu& +_ContextMenuImpl::GetCore(void) +{ + return static_cast <_ContextMenu&>(_ControlImpl::GetCore()); +} + +}}} // Tizen::Ui: Control diff --git a/src/ui/controls/FUiCtrl_ContextMenuItem.cpp b/src/ui/controls/FUiCtrl_ContextMenuItem.cpp new file mode 100644 index 0000000..0b16123 --- /dev/null +++ b/src/ui/controls/FUiCtrl_ContextMenuItem.cpp @@ -0,0 +1,654 @@ +// +// 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_ContextMenuItem.cpp + * @brief This is the implementation file for the _ContextMenuItem class. + */ + +#include +#include +#include "FUi_AccessibilityContainer.h" +#include "FUi_AccessibilityElement.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_Math.h" +#include "FUi_ResourceManager.h" + +#include "FUiCtrl_ScrollPanel.h" +#include "FUiCtrl_ContextMenuItem.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; + +namespace { +static const float TOUCH_PRESS_THRESHOLD_INSENSITIVE = 0.16f; +} + +namespace Tizen { namespace Ui { namespace Controls +{ + +_ContextMenuItem::_ContextMenuItem(void) + : __type(CONTEXT_MENU_ITEM_DRAWING_TYPE_NONE) + , __actionId(-1) + , __upperDividerLine(false) + , __lowerDividerLine(false) + , __selected(false) + , __parentScrollEnable(false) + , __leftMargin(0.0f) + , __rightMargin(0.0f) + , __dividerHeight(0.0f) + , __bgPressedMargin(0.0f) + , __textSize(0.0f) + , __text(L"") + , __pNormalBgBitmap(null) + , __pSelectedBgBitmap(null) + , __size(FloatDimension(0.0f, 0.0f)) + , __drawRect(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f)) + , __pBitmapLabel(null) + , __pTextLabel(null) + , __pUpperDividerLineLabel(null) + , __pBackgroundLabel(null) + , __pLowerDividerLineLabel(null) +{ + __pBitmap[CONTEXT_MENU_ITEM_DRAWING_STATUS_NORMAL] = null; + __pBitmap[CONTEXT_MENU_ITEM_DRAWING_STATUS_PRESSED] = null; + __pBitmap[CONTEXT_MENU_ITEM_DRAWING_STATUS_HIGHLIGHTED] = null; + + GET_SHAPE_CONFIG(CONTEXTMENU::LIST_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __leftMargin); + GET_SHAPE_CONFIG(CONTEXTMENU::LIST_RIGHT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __rightMargin); + GET_SHAPE_CONFIG(CONTEXTMENU::LIST_DIVIDER_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, __dividerHeight); + GET_SHAPE_CONFIG(CONTEXTMENU::ITEM_BG_PRESSED_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __bgPressedMargin); + + 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_REPLACED_BITMAP_CONFIG_N(CONTEXTMENU::ITEM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, Color(0, 0, 0, 0), __pNormalBgBitmap); + + InitializeAccessibilityElement(); +} + +_ContextMenuItem::~_ContextMenuItem(void) +{ + if (__pBitmap[CONTEXT_MENU_ITEM_DRAWING_STATUS_NORMAL] != null) + { + delete __pBitmap[CONTEXT_MENU_ITEM_DRAWING_STATUS_NORMAL]; + __pBitmap[CONTEXT_MENU_ITEM_DRAWING_STATUS_NORMAL] = null; + } + + if (__pBitmap[CONTEXT_MENU_ITEM_DRAWING_STATUS_PRESSED] != null) + { + delete __pBitmap[CONTEXT_MENU_ITEM_DRAWING_STATUS_PRESSED]; + __pBitmap[CONTEXT_MENU_ITEM_DRAWING_STATUS_PRESSED] = null; + } + + if (__pBitmap[CONTEXT_MENU_ITEM_DRAWING_STATUS_HIGHLIGHTED] != null) + { + delete __pBitmap[CONTEXT_MENU_ITEM_DRAWING_STATUS_HIGHLIGHTED]; + __pBitmap[CONTEXT_MENU_ITEM_DRAWING_STATUS_HIGHLIGHTED] = null; + } + + if (__pUpperDividerLineLabel != null) + { + DetachChild(*__pUpperDividerLineLabel); + delete __pUpperDividerLineLabel; + __pUpperDividerLineLabel = null; + } + + if (__pBackgroundLabel != null) + { + DetachChild(*__pBackgroundLabel); + delete __pBackgroundLabel; + __pBackgroundLabel = null; + } + + delete __pNormalBgBitmap; + __pNormalBgBitmap = null; + + delete __pSelectedBgBitmap; + __pSelectedBgBitmap = null; + + if (__pLowerDividerLineLabel != null) + { + DetachChild(*__pLowerDividerLineLabel); + delete __pLowerDividerLineLabel; + __pLowerDividerLineLabel = null; + } + + if (__pTextLabel != null) + { + DetachChild(*__pTextLabel); + delete __pTextLabel; + __pTextLabel = null; + } + + if (__pBitmapLabel != null) + { + DetachChild(*__pBitmapLabel); + delete __pBitmapLabel; + __pBitmapLabel = null; + } + + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + if (pContainer) + { + pContainer->RemoveAllElement(); + } +} + +_ContextMenuItem* +_ContextMenuItem::CreateContextMenuItemN(void) +{ + ClearLastResult(); + + _ContextMenuItem* pItem = null; + + pItem = new (std::nothrow) _ContextMenuItem(); + SysTryReturn(NID_UI_CTRL, pItem != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + pItem->AcquireHandle(); + + SetLastResult(E_SUCCESS); + return pItem; +} + +void +_ContextMenuItem::InitializeAccessibilityElement(void) +{ + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + if (pContainer) + { + pContainer->Activate(true); + _AccessibilityElement* pElement = new (std::nothrow) _AccessibilityElement(true); + 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)); + pContainer->AddElement(*pElement); + } + + return; +} + +void +_ContextMenuItem::SetBitmapLabel(_Label* pLabel) +{ + __pBitmapLabel = pLabel; +} + +void +_ContextMenuItem::SetTextLabel(_Label* pLabel) +{ + __pTextLabel = pLabel; +} + + +void +_ContextMenuItem::SetType(ContextMenuItemDrawingType type) +{ + __type = type; +} + +ContextMenuItemDrawingType +_ContextMenuItem::GetType(void) const +{ + return __type; +} + +void +_ContextMenuItem::SetActionId(int actionId) +{ + __actionId = actionId; +} + +int +_ContextMenuItem::GetActionId(void) const +{ + return __actionId; +} + +void +_ContextMenuItem::SetUpperDivider(bool drawDivider) +{ + __upperDividerLine = drawDivider; +} + +void +_ContextMenuItem::SetLowerDivider(bool drawDivider) +{ + __lowerDividerLine = drawDivider; +} + +bool +_ContextMenuItem::HasUpperDivider(void) const +{ + return __upperDividerLine; +} + +bool +_ContextMenuItem::HasLowerDivider(void) const +{ + return __lowerDividerLine; +} + +void +_ContextMenuItem::SetTextSize(float size) +{ + __textSize = size; +} + +result +_ContextMenuItem::SetText(const String& text) +{ + 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 String& +_ContextMenuItem::GetText(void) const +{ + return __text; +} + +result +_ContextMenuItem::SetBitmap(ContextMenuItemDrawingStatus status, const Bitmap* pBitmap) +{ + 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."); + + 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); + + // If bitmap is in _ContextMenuItem, delete old one. + if (__pBitmap[status] != null) + { + delete __pBitmap[status]; + __pBitmap[status] = null; + } + + __pBitmap[status] = pClonedBitmap; + + return E_SUCCESS; +} + +const Bitmap* +_ContextMenuItem::GetBitmap(ContextMenuItemDrawingStatus status) const +{ + if (status < CONTEXT_MENU_ITEM_DRAWING_STATUS_NORMAL || status > CONTEXT_MENU_ITEM_DRAWING_STATUS_HIGHLIGHTED) + { + return null; + } + + return __pBitmap[status]; +} + +void +_ContextMenuItem::SetSize(FloatDimension size) +{ + __size = size; +} + +FloatDimension +_ContextMenuItem::GetSize(void) const +{ + return __size; +} + +void +_ContextMenuItem::SetDrawRect(FloatRectangle rect) +{ + __drawRect = rect; + +} + +FloatRectangle +_ContextMenuItem::GetDrawRect(void) const +{ + return __drawRect; +} + +void +_ContextMenuItem::SetPressedDrawRect(FloatRectangle rect) +{ + __pressedDrawRect = rect; + +} + +FloatRectangle +_ContextMenuItem::GetPressedDrawRect(void) const +{ + return __pressedDrawRect; +} + +void +_ContextMenuItem::SetPressedItemColor(Color color) +{ + __selectedBgColor = color; +} + +int +_ContextMenuItem::Release(void) +{ + delete this; + + return 0; +} + +void +_ContextMenuItem::OnBoundsChanged(void) +{ + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + if (pContainer) + { + _AccessibilityElement* pElement = pContainer->GetChildElement(0); + if (pElement) + { + pElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height)); + } + } +} + +void +_ContextMenuItem::OnDraw(void) +{ + DrawItem(); +} + +void +_ContextMenuItem::DrawItem(void) +{ + if (__upperDividerLine) + { + DrawItemUpperDivider(); + } + + if (__lowerDividerLine) + { + DrawItemLowerDivider(); + } + + DrawItemBackground(); +} + +void +_ContextMenuItem::DrawItemUpperDivider(void) +{ + FloatRectangle bounds(0.0f, 0.0f, 0.0f, 0.0f); + Color dividerLineColor = Color(0, 0, 0, 0); + + if (__pUpperDividerLineLabel == null) + { + __pUpperDividerLineLabel = _Label::CreateLabelN(); + SysTryReturnVoidResult(NID_UI_CTRL, __pUpperDividerLineLabel, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + AttachChild(*__pUpperDividerLineLabel); + + _AccessibilityContainer* pContainer = __pUpperDividerLineLabel->GetAccessibilityContainer(); + if (pContainer) + { + pContainer->Activate(false); + } + } + + bounds = GetBoundsF(); + + dividerLineColor = __upperDividerLineColor; + + __pUpperDividerLineLabel->SetBounds(FloatRectangle(0.0f, 0.0f, bounds.width , __dividerHeight)); + __pUpperDividerLineLabel->SetBackgroundColor(dividerLineColor); + __pUpperDividerLineLabel->Invalidate(); +} + +void +_ContextMenuItem::DrawItemBackground(void) +{ + float topMargin = 0.0f, bottomMargin = 0.0f; + + SetBackgroundColor(Color(0, 0, 0, 0)); + + if (__pBackgroundLabel == null) + { + __pBackgroundLabel = _Label::CreateLabelN(); + SysTryReturnVoidResult(NID_UI_CTRL, __pBackgroundLabel, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + __pBackgroundLabel->SetTouchPressThreshold(TOUCH_PRESS_THRESHOLD_INSENSITIVE); + AttachChild(*__pBackgroundLabel); + MoveChildToBottom(*__pBackgroundLabel); + + _AccessibilityContainer* pContainer = __pBackgroundLabel->GetAccessibilityContainer(); + if (pContainer) + { + pContainer->Activate(false); + } + } + + FloatRectangle bounds = GetBoundsF(); + _ScrollPanel* pScrollPanel = static_cast<_ScrollPanel*>(GetParent()); + FloatRectangle boundsScrollPanel = pScrollPanel->GetBoundsF(); + + float topOverlap = pScrollPanel->GetScrollPosition() - bounds.y; + if (topOverlap >= 0.0f) + { + topMargin = topOverlap; + } + else + { + topMargin = __bgPressedMargin; + } + + float bottomOverlap = bounds.y + bounds.height - (pScrollPanel->GetScrollPosition() + boundsScrollPanel.height); + if (bottomOverlap >= 0.0f) + { + bottomMargin = bottomOverlap; + } + else + { + bottomMargin = __bgPressedMargin; + } + + __pBackgroundLabel->SetBounds(FloatRectangle(__bgPressedMargin, topMargin, bounds.width - __bgPressedMargin * 2.0f, bounds.height - topMargin - bottomMargin)); + + 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(); +} + +void +_ContextMenuItem::DrawItemLowerDivider(void) +{ + FloatRectangle bounds(0.0f, 0.0f, 0.0f, 0.0f); + Color dividerLineColor(0, 0, 0, 0); + + if (__pLowerDividerLineLabel == null) + { + __pLowerDividerLineLabel = _Label::CreateLabelN(); + SysTryReturnVoidResult(NID_UI_CTRL, __pLowerDividerLineLabel, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + AttachChild(*__pLowerDividerLineLabel); + + _AccessibilityContainer* pContainer = __pLowerDividerLineLabel->GetAccessibilityContainer(); + if (pContainer) + { + pContainer->Activate(false); + } + } + + bounds = GetBoundsF(); + + dividerLineColor = __lowerDividerLineColor; + + __pLowerDividerLineLabel->SetBounds(FloatRectangle(0.0f, bounds.height - __dividerHeight, bounds.width, __dividerHeight)); + __pLowerDividerLineLabel->SetBackgroundColor(dividerLineColor); + __pLowerDividerLineLabel->Invalidate(); +} + +_UiTouchEventDelivery +_ContextMenuItem::OnPreviewTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + SetAndInvalidate(true); + + return _UI_TOUCH_EVENT_DELIVERY_FORCED_YES; +} + +bool +_ContextMenuItem::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + SetAndInvalidate(true); + + return false; +} + +_UiTouchEventDelivery +_ContextMenuItem::OnPreviewTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + TouchMoved(source, touchinfo); + + return _UI_TOUCH_EVENT_DELIVERY_FORCED_YES; +} + +bool +_ContextMenuItem::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + TouchMoved(source, touchinfo); + + return false; +} + +_UiTouchEventDelivery +_ContextMenuItem::OnPreviewTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + SetAndInvalidate(false); + + return _UI_TOUCH_EVENT_DELIVERY_FORCED_YES; +} + +bool +_ContextMenuItem::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + SetAndInvalidate(false); + + return false; +} + +_UiTouchEventDelivery +_ContextMenuItem::OnPreviewTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + return _UI_TOUCH_EVENT_DELIVERY_FORCED_YES; +} + +bool +_ContextMenuItem::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + SetAndInvalidate(false); + + return false; +} + +void +_ContextMenuItem::TouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + FloatPoint touchPosition = touchinfo.GetCurrentPosition(); + + if (__pressed) + { + if (__parentScrollEnable) + { + if (__selected) + { + __selected = false; + Invalidate(); + } + } + else + { + int oldSelected = __selected; + + FloatRectangle bounds(0.0f, 0.0f, __size.width, __size.height); + if (bounds.Contains(touchPosition)) + { + __selected = true; + } + else + { + __selected = false; + } + + if (oldSelected != __selected) + { + Invalidate(); + } + } + } +} + +void +_ContextMenuItem::OnFontChanged(Font* pFont) +{ + String fontName = _Control::GetFont(); + + if (__pTextLabel != null) + { + __pTextLabel->SetFont(fontName); + } +} + +void +_ContextMenuItem::OnFontInfoRequested(unsigned long& style, float& size) +{ + style = FONT_STYLE_PLAIN; + size = __textSize; +} + +void +_ContextMenuItem::SetParentScrollEnable(bool enable) +{ + __parentScrollEnable = enable; +} + +bool +_ContextMenuItem::GetParentScrollEnable() const +{ + return __parentScrollEnable; +} + +bool +_ContextMenuItem::IsSelected() const +{ + return __selected; +} + +void +_ContextMenuItem::SetAndInvalidate(bool flag) +{ + __selected = flag; + __pressed = flag; + Invalidate(); +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_ContextMenuListPresenter.cpp b/src/ui/controls/FUiCtrl_ContextMenuListPresenter.cpp new file mode 100644 index 0000000..539fe01 --- /dev/null +++ b/src/ui/controls/FUiCtrl_ContextMenuListPresenter.cpp @@ -0,0 +1,1565 @@ +// +// 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_ContextMenuListPresenter.cpp + * @brief This is the implementation file for the _ContextMenuListPresenter class. + */ + +#include +#include +#include +#include +#include +#include "FUi_AccessibilityContainer.h" +#include "FUi_AccessibilityElement.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_Math.h" +#include "FUi_ResourceManager.h" +#include "FUiCtrl_ActionEvent.h" +#include "FUiCtrl_IActionEventListener.h" + +#include "FUiCtrl_ContextMenuListPresenter.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Graphics::_Text; + +namespace { +static const float TOUCH_PRESS_THRESHOLD_INSENSITIVE = 0.16f; +} + +namespace Tizen { namespace Ui { namespace Controls +{ + +_ContextMenuListPresenter::_ContextMenuListPresenter(_ContextMenu* pContextMenu) + : __pContextMenu(pContextMenu) + , __pModel(null) + , __pFont(null) + , __layoutSize(FloatDimension(0.0f, 0.0f)) + , __touchOutRect(false) + , __selectedIndex(-1) + , __scrollEnable(false) + , __maxWidth(0.0f) + , __minWidth(0.0f) + , __topMargin(0.0f) + , __bottomMargin(0.0f) + , __leftMargin(0.0f) + , __rightMargin(0.0f) + , __screenTopMargin(0.0f) + , __screenBottomMargin(0.0f) + , __screenLeftMargin(0.0f) + , __screenRightMargin(0.0f) + , __arrowTopMargin(0.0f) + , __arrowBottomMargin(0.0f) + , __arrowRightMargin(0.0f) + , __arrowLeftMargin(0.0f) + , __arrowWidth(0.0f) + , __arrowHeight(0.0f) + , __itemWidth(0.0f) + , __itemMinWidth(0.0f) + , __itemHeight(0.0f) + , __itemMaxWidth(0.0f) + , __itemGap(0.0f) + , __itemBitmapWidth(0.0f) + , __itemBitmapHeight(0.0f) + , __itemFontSize(0.0f) + , __dividerHeight(0.0f) + , __anchorPopupOverlap(0.0f) + , __enterKeyPressed(false) + , __backKeyPressed(false) + , __focusedIndex(-1) + , __focusLost(false) +{ + +} + +_ContextMenuListPresenter::~_ContextMenuListPresenter(void) +{ + __pContextMenu = null; + + delete __pModel; + __pModel = null; + + __pFont = null; + +} + +result +_ContextMenuListPresenter::Install(void) +{ + result r = E_SUCCESS; + + LoadShape(); + + __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 = GetLastResult(), GetLastResult(), "[%s] Memory allocation failed.", GetErrorMessage(GetLastResult())); + + __pFont = __pContextMenu->GetFallbackFont(); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, (__pFont != null), , r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + +CATCH: + delete __pModel; + __pModel = null; + + __pFont = null; + + return r; +} + + +void +_ContextMenuListPresenter::LoadShape(void) +{ + GET_SHAPE_CONFIG(CONTEXTMENU::LIST_MIN_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, __itemMinWidth); + GET_SHAPE_CONFIG(CONTEXTMENU::LIST_MAX_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, __itemMaxWidth); + GET_SHAPE_CONFIG(CONTEXTMENU::LIST_ITEM_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, __itemHeight); + GET_SHAPE_CONFIG(CONTEXTMENU::LIST_ITEM_GAP, _CONTROL_ORIENTATION_PORTRAIT, __itemGap); + + GET_SHAPE_CONFIG(CONTEXTMENU::LIST_TOP_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __topMargin); + GET_SHAPE_CONFIG(CONTEXTMENU::LIST_BOTTOM_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __bottomMargin); + GET_SHAPE_CONFIG(CONTEXTMENU::LIST_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __leftMargin); + GET_SHAPE_CONFIG(CONTEXTMENU::LIST_RIGHT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __rightMargin); + + GET_SHAPE_CONFIG(CONTEXTMENU::SCREEN_TOP_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __screenTopMargin); + GET_SHAPE_CONFIG(CONTEXTMENU::SCREEN_BOTTOM_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __screenBottomMargin); + GET_SHAPE_CONFIG(CONTEXTMENU::SCREEN_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __screenLeftMargin); + GET_SHAPE_CONFIG(CONTEXTMENU::SCREEN_RIGHT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __screenRightMargin); + GET_SHAPE_CONFIG(CONTEXTMENU::ANCHOR_TOP_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __arrowTopMargin); + GET_SHAPE_CONFIG(CONTEXTMENU::ANCHOR_BOTTOM_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __arrowBottomMargin); + GET_SHAPE_CONFIG(CONTEXTMENU::ANCHOR_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __arrowLeftMargin); + GET_SHAPE_CONFIG(CONTEXTMENU::ANCHOR_RIGHT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __arrowRightMargin); + GET_SHAPE_CONFIG(CONTEXTMENU::ANCHOR_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, __arrowWidth); + GET_SHAPE_CONFIG(CONTEXTMENU::ANCHOR_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, __arrowHeight); + GET_SHAPE_CONFIG(CONTEXTMENU::LIST_ICON_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, __itemBitmapWidth); + GET_SHAPE_CONFIG(CONTEXTMENU::LIST_ICON_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, __itemBitmapHeight); + + GET_SHAPE_CONFIG(CONTEXTMENU::LIST_ITEM_FONT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, __itemFontSize); + GET_SHAPE_CONFIG(CONTEXTMENU::LIST_DIVIDER_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, __dividerHeight); + GET_SHAPE_CONFIG(CONTEXTMENU::ANCHOR_POPUP_OVERLAP, _CONTROL_ORIENTATION_PORTRAIT, __anchorPopupOverlap); + + __itemWidth = __itemMinWidth; +} + +_ContextMenuItem* +_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, GetLastResult(), "[%s] pItem must not be null.", GetErrorMessage(GetLastResult())); + + ContextMenuItemDrawingType itemType = CONTEXT_MENU_ITEM_DRAWING_TYPE_TEXT; + _Label* pLabel = null; + result r = E_SUCCESS; + + if (pNormalBitmap != null) + { + r = pItem->SetBitmap(CONTEXT_MENU_ITEM_DRAWING_STATUS_NORMAL, pNormalBitmap); + if (r != E_SUCCESS) + { + delete pItem; + return null; + } + + // add bitmap label + pLabel = _Label::CreateLabelN(); + pLabel->SetBackgroundBitmap(*pNormalBitmap); + pLabel->SetBackgroundColor(Color(0, 0, 0, 0)); + + int bitmapY = (__itemHeight - __itemBitmapHeight) / 2; + pLabel->SetBounds(FloatRectangle(__leftMargin, bitmapY, __itemBitmapWidth, __itemBitmapHeight)); + pLabel->SetTouchPressThreshold(TOUCH_PRESS_THRESHOLD_INSENSITIVE); + pItem->AttachChild(*pLabel); + _AccessibilityContainer* pContainer = pLabel->GetAccessibilityContainer(); + if (pContainer) + { + pContainer->Activate(false); + } + pItem->SetBitmapLabel(pLabel); + + itemType = CONTEXT_MENU_ITEM_DRAWING_TYPE_BITMAP; + } + + if (pPressedBitmap != null) + { + r = pItem->SetBitmap(CONTEXT_MENU_ITEM_DRAWING_STATUS_PRESSED, pPressedBitmap); + if (r != E_SUCCESS) + { + delete pItem; + return null; + } + } + + pItem->SetType(itemType); + pItem->SetActionId(actionId); + + pItem->SetTextSize(__itemFontSize); + r = pItem->SetText(text); + if (r != E_SUCCESS) + { + delete pItem; + return null; + } + + FloatDimension textArea(0.0f, 0.0f); + FloatDimension itemSize(0.0f, 0.0f); + + CalculateItemSize(text, itemType, textArea, itemSize); + + pItem->SetSize(itemSize); + + float textLabelX = 0.0f; + if (itemType == CONTEXT_MENU_ITEM_DRAWING_TYPE_BITMAP) + { + textLabelX = __itemGap + __itemBitmapWidth; + } + + // add text label + pLabel = _Label::CreateLabelN(); + pLabel->SetText(text); + ContextMenuCoreItemStatus itemStatus = CONTEXT_MENU_CORE_ITEM_STATUS_NORMAL; + pLabel->SetTextColor(__pContextMenu->GetTextColor(itemStatus)); + pLabel->SetBackgroundColor(Color(0, 0, 0, 0)); + + itemSize = pItem->GetSize(); + pLabel->SetBounds(FloatRectangle(textLabelX, (itemSize.height - textArea.height) / 2.0f, textArea.width, textArea.height)); + pLabel->SetTextVerticalAlignment(ALIGNMENT_MIDDLE); + pLabel->SetTextHorizontalAlignment(ALIGNMENT_CENTER); + pLabel->SetTextConfig(__itemFontSize, LABEL_TEXT_STYLE_NORMAL); + + pLabel->SetTouchPressThreshold(TOUCH_PRESS_THRESHOLD_INSENSITIVE); + pItem->AttachChild(*pLabel); + _AccessibilityContainer* pContainer = pLabel->GetAccessibilityContainer(); + if (pContainer) + { + pContainer->Activate(false); + } + pItem->SetTextLabel(pLabel); + + __itemWidth = __itemWidth < itemSize.width ? itemSize.width : __itemWidth; + + pItem->SetTouchPressThreshold(TOUCH_PRESS_THRESHOLD_INSENSITIVE); + return pItem; +} + +void +_ContextMenuListPresenter::CalculateItemSize(const String &text, ContextMenuItemDrawingType itemType, FloatDimension &textArea, FloatDimension &itemSize) +{ + float bitmapWidth = (itemType == CONTEXT_MENU_ITEM_DRAWING_TYPE_BITMAP) ? __itemBitmapWidth : 0.0f; + + __pFont->GetTextExtent(text, text.GetLength(), textArea); + float labelTopMargin = 0.0f; + float iconGap = 0.0f; + float textGap = 0.0f; + GET_SHAPE_CONFIG(LABEL::TOP_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, labelTopMargin); + GET_SHAPE_CONFIG(CONTEXTMENU::LIST_TEXT_GAP, _CONTROL_ORIENTATION_PORTRAIT, textGap); + iconGap = __itemGap; + + if (itemType == CONTEXT_MENU_ITEM_DRAWING_TYPE_BITMAP) + { + textArea.width += 2.0 * iconGap; + itemSize.width = textArea.width + bitmapWidth + textGap; + } + else + { + textArea.width += 2.0f * textGap; + itemSize.width = textArea.width; + } + + textArea.height += 2.0f * labelTopMargin; + itemSize.height = __itemHeight + (__dividerHeight * 2.0f); + + itemSize.width = itemSize.width < __itemMinWidth ? __itemMinWidth : itemSize.width; + + if (itemSize.width > __itemMaxWidth) + { + textArea.width -= itemSize.width - __itemMaxWidth; + itemSize.width = __itemMaxWidth; + } + + return; +} + +result +_ContextMenuListPresenter::AddItem(const Base::String& text, int actionId, const Bitmap* pNormalBitmap, + const Bitmap* pPressedBitmap, + const Bitmap* pHighlightedBitmap) +{ + _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; + SysTryReturnResult(NID_UI_CTRL, false, r, "Failed to add item."); + } + + return r; +} + +result +_ContextMenuListPresenter::InsertItem(int index, const String& text, int actionId, + const Bitmap* pNormalBitmap, const Bitmap* pPressedBitmap, + const Bitmap* pHighlightedBitmap) +{ + + 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 = 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; + SysTryReturnResult(NID_UI_CTRL, false, r, "Failed to add item."); + } + + return E_SUCCESS; +} + +result +_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; + + 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(); + SysTryReturnResult(NID_UI_CTRL, pItem != null, r, "Failed to get the item."); + + if (pItem->HasParent()) + { + r = __pContextMenu->GetScrollPanel()->DetachChild(*pItem); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to detach item."); + } + + 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; + SysTryReturnResult(NID_UI_CTRL, false, r, "Failed to add item."); + } + + CalculateItemMaximumWidth(); + + return E_SUCCESS; +} + +result +_ContextMenuListPresenter::DeleteItem(int index) +{ + _ContextMenuItem* pItem = null; + result r = E_SUCCESS; + + 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(); + SysTryReturnResult(NID_UI_CTRL, pItem != null, r, "Failed to get the 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); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to delete item."); + + CalculateItemMaximumWidth(); + + return r; +} + +result +_ContextMenuListPresenter::DeleteItemAll(void) +{ + 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(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to delete item all."); + + return r; +} + + +int +_ContextMenuListPresenter::CalculateShowItemCount(void) +{ + int itemMaxCount = 0; + GET_SHAPE_CONFIG(CONTEXTMENU::ITEM_MAX_COUNT, _CONTROL_ORIENTATION_PORTRAIT, itemMaxCount); + + int maxVisibleCount = __pContextMenu->GetShowItemCount(); + + return maxVisibleCount > itemMaxCount ? itemMaxCount : maxVisibleCount; +} + +result +_ContextMenuListPresenter::CalculateWindowRect(void) +{ + result r = CalculateRect(); + AdjustItemPosition(); + SetAllAccessibilityElement(); + + return r; +} + +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; +} + + +result +_ContextMenuListPresenter::CalculateRect(void) +{ + 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; + float bodyLeftMargin = __leftMargin; + float bodyRightMargin = __rightMargin; + + float screenTopMargin = __screenTopMargin; + float screenBottomMargin = __screenBottomMargin; + float screenLeftMargin = __screenLeftMargin; + float screenRightMargin = __screenRightMargin; + + int scrollPanelMargin; + GET_SHAPE_CONFIG(CONTEXTMENU::SCROLL_PANEL_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, scrollPanelMargin); + + FloatPoint anchorPosition = __pContextMenu->GetAnchorPosition(); + FloatDimension screen = _ControlManager::GetInstance()->GetScreenSizeF(); + + if (__pContextMenu->GetLayout() == _CONTROL_ORIENTATION_LANDSCAPE) + { + screen.SetSize(screen.height, screen.width); + } + + // calculate arrow area + enum ContextMenuCoreDropPosition dropPosition = __pContextMenu->GetDropPosition(); + if (dropPosition == CONTEXT_MENU_CORE_DROP_POSITION_UP || dropPosition == CONTEXT_MENU_CORE_DROP_POSITION_DOWN) // down, up Arrow + { + arrowRect.width = __arrowWidth; + arrowRect.height = __arrowHeight; + } + else // left, right Arrow + { + arrowRect.width = __arrowHeight; + arrowRect.height = __arrowWidth; + } + + // calculate body rect + // calculate drawable boundaries for contextmenu + float leftBoundary = screenLeftMargin; + float rightBoundary = screen.width - screenRightMargin; + float topBoundary = screenTopMargin; + float bottomBoundary = screen.height - screenBottomMargin; + + // calculate layout size (__layoutSize) + AdjustItemLayout(); + + bodyRect.width = __layoutSize.width + bodyLeftMargin + bodyRightMargin; + bodyRect.height = __layoutSize.height + bodyTopMargin + bodyBottomMargin + 2 * scrollPanelMargin; + + // calculate the position of the arrow and body rect. + if (dropPosition == CONTEXT_MENU_CORE_DROP_POSITION_UP) // down Arrow + { + // Check touch position + // - Check left margin + if (anchorPosition.x <= leftBoundary + arrowRect.width) + { + anchorPosition.x = leftBoundary + arrowRect.width; + } + // - check right margin + if (anchorPosition.x >= (rightBoundary - arrowRect.width)) + { + anchorPosition.x = rightBoundary - arrowRect.width; + } + // - check top margin + if (anchorPosition.y <= topBoundary) + { + anchorPosition.y = topBoundary + bodyRect.height; + } + // - check bottom margin + if (anchorPosition.y >= bottomBoundary) + { + anchorPosition.y = bottomBoundary; + } + + // Set body position x + bodyRect.x = anchorPosition.x - (bodyRect.width / 2.0f); + // - Check left margin + if (bodyRect.x <= leftBoundary) + { + bodyRect.x = leftBoundary; + } + // - check right margin + if ((bodyRect.x + bodyRect.width) >= rightBoundary) + { + bodyRect.x = rightBoundary - bodyRect.width; + } + // Set body position y + bodyRect.y = anchorPosition.y - arrowRect.height - bodyRect.height; + // - check top margin + if (bodyRect.y <= topBoundary) + { + bodyRect.y = topBoundary; + } + + float correctLength = __arrowTopMargin - __anchorPopupOverlap; + windowRect.x = bodyRect.x; + windowRect.y = bodyRect.y + correctLength; + windowRect.width = bodyRect.width; + windowRect.height = bodyRect.height + arrowRect.height - correctLength; + + bodyRect.x = 0.0f; + bodyRect.y = 0.0f; + + // Set arrow position + arrowRect.x = anchorPosition.x - (arrowRect.width / 2.0f) - windowRect.x; + arrowRect.y = bodyRect.height - correctLength; + } + else if (dropPosition == CONTEXT_MENU_CORE_DROP_POSITION_DOWN) // up Arrow + { + // Check touch position + // - Check left margin + if (anchorPosition.x <= leftBoundary + arrowRect.width) + { + anchorPosition.x = leftBoundary + arrowRect.width; + } + // - check right margin + if (anchorPosition.x >= (rightBoundary - arrowRect.width)) + { + anchorPosition.x = rightBoundary - arrowRect.width; + } + // - check top margin + if (anchorPosition.y <= topBoundary) + { + anchorPosition.y = topBoundary; + } + // - check bottom margin + if (anchorPosition.y >= bottomBoundary) + { + anchorPosition.y = bottomBoundary; + } + + // Set body position x + bodyRect.x = anchorPosition.x - (bodyRect.width / 2.0f); + // - Check left margin + if (bodyRect.x <= leftBoundary) + { + bodyRect.x = leftBoundary; + } + // - check right margin + if ((bodyRect.x + bodyRect.width) >= rightBoundary) + { + bodyRect.x = rightBoundary - bodyRect.width; + } + // Set body position y + bodyRect.y = anchorPosition.y + arrowRect.height; + // - Check bottom margin + if ((bodyRect.y + bodyRect.height) >= bottomBoundary) + { + bodyRect.y = bottomBoundary - bodyRect.height; + } + + float correctLength = __arrowBottomMargin - __anchorPopupOverlap; + windowRect.x = bodyRect.x; + windowRect.y = bodyRect.y - arrowRect.height; + windowRect.width = bodyRect.width; + windowRect.height = bodyRect.height + arrowRect.height - correctLength; + + bodyRect.x = 0.0f; + bodyRect.y = arrowRect.height - correctLength; + + // Set arrow position + arrowRect.x = anchorPosition.x - (arrowRect.width / 2.0f) - windowRect.x; + arrowRect.y = 0.0f; + } + else if (dropPosition == CONTEXT_MENU_CORE_DROP_POSITION_LEFT) // right Arrow + { + // Check touch position + // - Check left margin + if (anchorPosition.x <= leftBoundary) + { + anchorPosition.x = leftBoundary + bodyRect.width; + } + // - check right margin + if (anchorPosition.x >= rightBoundary) + { + anchorPosition.x = rightBoundary; + } + // - Check top margin + if (anchorPosition.y <= topBoundary + arrowRect.height) + { + anchorPosition.y = topBoundary + arrowRect.height; + } + // - check bottom margin + if (anchorPosition.y >= (bottomBoundary - arrowRect.height)) + { + anchorPosition.y = bottomBoundary - arrowRect.height; + } + + // Set body position x + bodyRect.x = anchorPosition.x - arrowRect.width - bodyRect.width; + // - Check left margin + if (bodyRect.x <= leftBoundary) + { + bodyRect.x = leftBoundary; + } + // - check right margin + if ((bodyRect.x + bodyRect.width + arrowRect.width) >= rightBoundary) + { + bodyRect.x = rightBoundary - bodyRect.width - arrowRect.width; + } + + // Set body position y + bodyRect.y = anchorPosition.y - (bodyRect.height / 2.0f); + // - check top margin + if (bodyRect.y <= topBoundary) + { + bodyRect.y = topBoundary; + } + // - check bottom margin + if ((bodyRect.y + bodyRect.height) >= bottomBoundary) + { + bodyRect.y = bottomBoundary - bodyRect.height; + } + + float correctLength = __arrowRightMargin - __anchorPopupOverlap; + windowRect.x = bodyRect.x + correctLength; + windowRect.y = bodyRect.y; + windowRect.width = bodyRect.width + arrowRect.width - correctLength; + windowRect.height = bodyRect.height; + + bodyRect.x = 0.0f; + bodyRect.y = 0.0f; + + // Set arrow position + arrowRect.x = bodyRect.width - correctLength; + arrowRect.y = anchorPosition.y - (arrowRect.height / 2.0f) - windowRect.y; + } + else // left Arrow + { + // Check touch position + // - Check top margin + if (anchorPosition.x <= leftBoundary) + { + anchorPosition.x = leftBoundary; + } + // - check right margin + if (anchorPosition.x >= rightBoundary) + { + anchorPosition.x = rightBoundary - bodyRect.width; + } + // - Check top margin + if (anchorPosition.y <= topBoundary + arrowRect.height) + { + anchorPosition.y = topBoundary + arrowRect.height; + } + // - check bottom margin + if (anchorPosition.y >= (bottomBoundary - arrowRect.height)) + { + anchorPosition.y = bottomBoundary - arrowRect.height; + } + + // Set body position x + bodyRect.x = anchorPosition.x; + // - Check left margin + if (bodyRect.x <= leftBoundary) + { + bodyRect.x = leftBoundary; + } + // - check right margin + if ((bodyRect.x + bodyRect.width + arrowRect.width) >= rightBoundary) + { + bodyRect.x = rightBoundary - bodyRect.width - arrowRect.width; + } + // Set body position y + bodyRect.y = anchorPosition.y - (bodyRect.height / 2.0f); + // - check top margin + if (bodyRect.y <= topBoundary) + { + bodyRect.y = topBoundary; + } + // - check bottom margin + if ((bodyRect.y + bodyRect.height) >= bottomBoundary) + { + bodyRect.y = bottomBoundary - bodyRect.height; + } + + float correctLength = __arrowLeftMargin - __anchorPopupOverlap; + windowRect.x = bodyRect.x; + windowRect.y = bodyRect.y; + windowRect.width = bodyRect.width + arrowRect.width - correctLength; + windowRect.height = bodyRect.height; + + bodyRect.x = arrowRect.width - correctLength; + bodyRect.y = 0.0f; + + // Set arrow position + arrowRect.x = 0.0f; + arrowRect.y = anchorPosition.y - (arrowRect.height / 2.0f) - windowRect.y; + } + + itemRect.x = bodyRect.x + bodyLeftMargin; + itemRect.y = bodyRect.y + bodyTopMargin + scrollPanelMargin; + itemRect.width = __layoutSize.width; + itemRect.height = __layoutSize.height; + + __pContextMenu->SetWindowRect(windowRect); + __pContextMenu->SetBodyRect(bodyRect); + __pContextMenu->SetArrowRect(arrowRect); + __pContextMenu->SetItemRect(itemRect); + + // _ScrollPanel API call sequence: SetBounds() -> SetScrollAreaBounds() + // _Scroll visual interaction if Bounds < ScrollAreaBounds + if (__pContextMenu->IsVisible()) + { + __pContextMenu->GetScrollPanel()->SetBounds(FloatRectangle(bodyRect.x + bodyLeftMargin, bodyRect.y + bodyTopMargin + scrollPanelMargin, + __layoutSize.width, __layoutSize.height)); + int itemCount = __pModel->GetItemCount(); + float itemHeight = __itemHeight + (__dividerHeight * 2.0f); + float layoutClientHeight = itemCount * itemHeight - (__dividerHeight * 2.0f); + __pContextMenu->GetScrollPanel()->SetClientAreaHeight(layoutClientHeight); + } + + __pContextMenu->SetMovable(true); + __pContextMenu->SetResizable(true); + + __pContextMenu->SetMinimumSize(FloatDimension(0.0f, 0.0f)); + __pContextMenu->SetMaximumSize(screen); + __pContextMenu->SetBounds(windowRect); + + __pContextMenu->SetMovable(false); + __pContextMenu->SetResizable(false); + + return E_SUCCESS; +} + +void +_ContextMenuListPresenter::AdjustItemLayout(void) +{ + FloatDimension layoutSize(0.0f, 0.0f); + + int itemCount = __pModel->GetItemCount(); + if (itemCount <= 0) + { + __layoutSize.width = __itemWidth; + __layoutSize.height = __itemHeight; + return; + } + + layoutSize = AdjustItemLayoutStyle(); + + FloatDimension screen = _ControlManager::GetInstance()->GetScreenSizeF(); + if (__pContextMenu->GetLayout() == _CONTROL_ORIENTATION_LANDSCAPE) + { + screen.SetSize(screen.height, screen.width); + } + + int maxHeight = screen.height - __screenTopMargin - __screenBottomMargin - __arrowHeight; + if (layoutSize.height > maxHeight) + { + layoutSize.height = maxHeight; + } + + __layoutSize = layoutSize; +} + + +FloatDimension +_ContextMenuListPresenter::AdjustItemLayoutStyle(void) +{ + int itemMaxCount = CalculateShowItemCount(); + + int itemCount = __pModel->GetItemCount(); + float itemHeight = __itemHeight + (__dividerHeight * 2.0f); + + FloatDimension layoutSize(__itemWidth, 0.0f); + + float layoutClientHeight = itemCount * itemHeight - (__dividerHeight * 2.0f); + float layoutMaxHeight = itemMaxCount * itemHeight - (__dividerHeight * 2.0f); + if (layoutClientHeight > layoutMaxHeight) + { + __scrollEnable = true; + layoutSize.height = layoutMaxHeight; + } + else + { + __scrollEnable = false; + layoutSize.height = layoutClientHeight; + } + + return layoutSize; +} + +void +_ContextMenuListPresenter::AdjustItemPosition(void) +{ + int itemCount = __pModel->GetItemCount(); + if (itemCount <= 0) + { + return; + } + + float itemHeight = __itemHeight + (__dividerHeight * 2.0f); + float drawItemY = 0.0f; + + float x = __pContextMenu->GetBodyRect().x + __leftMargin; + float y = __pContextMenu->GetBodyRect().y + __topMargin; + + _ContextMenuItem* pItem = null; + + for (int i = 0; i < itemCount; i++) + { + pItem = __pModel->GetItem(i); + + if (pItem == null) + { + break; + } + + FloatRectangle drawRect(x, drawItemY + y, __itemWidth, itemHeight); + + pItem->SetDrawRect(drawRect); + pItem->SetUpperDivider(i > 0); + pItem->SetLowerDivider(i < itemCount - 1); + pItem->SetParentScrollEnable(__scrollEnable); + pItem->SetBounds(FloatRectangle(0.0f, drawItemY, drawRect.width, drawRect.height)); + + if (pItem->HasParent() == false) + { + __pContextMenu->GetScrollPanel()->AttachChild(*pItem); + } + + drawItemY += itemHeight; + } +} + +void +_ContextMenuListPresenter::CalculateItemMaximumWidth(void) +{ + FloatDimension itemSize(0.0f, 0.0f); + FloatDimension textArea(0.0f, 0.0f); + float maxItemWidth = __itemMinWidth; + + for (int i = 0; i < __pModel->GetItemCount(); i++) + { + _ContextMenuItem* pItem = null; + + pItem = __pModel->GetItem(i); + 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); + + if (maxItemWidth < itemSize.width) + { + maxItemWidth = itemSize.width; + } + } + __itemWidth = maxItemWidth; +} + +int +_ContextMenuListPresenter::GetItemIndexFromPosition(const FloatPoint& point) const +{ + int index = -1; + int itemCount = __pModel->GetItemCount(); + + if (itemCount < 0) + { + return -1; + } + + _ContextMenuItem* pItem = null; + + float scrollPosition = __pContextMenu->GetScrollPanel()->GetScrollPosition(); + FloatPoint position(point.x, point.y + scrollPosition); + + for (int i = 0; i < itemCount; i++) + { + pItem = __pModel->GetItem(i); + + if (pItem == null) + { + break; + } + + FloatRectangle drawRect = pItem->GetDrawRect(); + + if (drawRect.Contains(position) == true) + { + index = i; + break; + } + } + + return index; +} + + +result +_ContextMenuListPresenter::Draw(void) +{ + result r = E_SUCCESS; + + Canvas* pCanvas = __pContextMenu->GetCanvasN(); + SysTryReturnResult(NID_UI_CTRL, pCanvas != null, GetLastResult(), "Propagating."); + + // Clear canvas for drawing area of the ContextMenu. + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + FloatRectangle bounds(__pContextMenu->GetWindowRect()); + pCanvas->Clear(FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height)); + + r = DrawBackground(pCanvas); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to draw background.", GetErrorMessage(r)); + + r = DrawArrow(pCanvas); + 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) +{ + SysTryReturnResult(NID_UI_CTRL, pCanvas != null, E_SYSTEM, "A system error has occurred. pCanvas is null."); + + result r = E_SUCCESS; + + FloatRectangle bodyRect = __pContextMenu->GetBodyRect(); + + const Bitmap* pBackgroundNormalBitmap = __pContextMenu->GetBackgroundNormalBitmap(); + const Bitmap* pBackgroundEffectBitmap = __pContextMenu->GetBackgroundEffectBitmap(); + + if (pBackgroundNormalBitmap == null && pBackgroundEffectBitmap == null) + { + pCanvas->SetForegroundColor(__pContextMenu->GetColor()); + pCanvas->DrawRectangle(bodyRect); + } + else + { + if (pBackgroundNormalBitmap != null) + { + r = DrawBitmap(*pCanvas, bodyRect, *pBackgroundNormalBitmap); + } + + if (pBackgroundEffectBitmap != null) + { + r = DrawBitmap(*pCanvas, bodyRect, *pBackgroundEffectBitmap); + } + } + + return r; +} + + +result +_ContextMenuListPresenter::DrawArrow(Canvas* pCanvas) +{ + SysTryReturnResult(NID_UI_CTRL, pCanvas != null, E_SYSTEM, "A system error has occurred. pCanvas is null."); + + result r = E_SUCCESS; + FloatRectangle arrowRect = __pContextMenu->GetArrowRect(); + ContextMenuCoreDropPosition dropPosition = __pContextMenu->GetDropPosition(); + + const Bitmap* pArrowNormalBitmap = __pContextMenu->GetArrowNormalBitmap(dropPosition); + const Bitmap* pEffectArrowBitmap = __pContextMenu->GetArrowEffectBitmap(dropPosition); + + if (pArrowNormalBitmap != null) + { + r = DrawBitmap(*pCanvas, arrowRect, *pArrowNormalBitmap); + } + + if (pEffectArrowBitmap != null) + { + r = DrawBitmap(*pCanvas, arrowRect, *pEffectArrowBitmap); + } + + return r; +} + +_UiTouchEventDelivery +_ContextMenuListPresenter::OnPreviewTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + return _UI_TOUCH_EVENT_DELIVERY_FORCED_YES; +} + +bool +_ContextMenuListPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + if (__focusedIndex != -1) + { + ResetFocus(); + } + FloatPoint touchPosition = touchinfo.GetCurrentPosition(); + FloatRectangle itemRect = __pContextMenu->GetItemRect(); + + if (!itemRect.Contains(touchPosition)) + { + __selectedIndex = -1; + __touchOutRect = true; + return true; + } + + __selectedIndex = GetItemIndexFromPosition(touchPosition); + __touchOutRect = false; + return true; +} + +_UiTouchEventDelivery +_ContextMenuListPresenter::OnPreviewTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + return _UI_TOUCH_EVENT_DELIVERY_FORCED_YES; +} + +bool +_ContextMenuListPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + FloatPoint touchPosition = touchinfo.GetCurrentPosition(); + + if (__touchOutRect) + { + 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); + if (__selectedIndex != -1 && (__selectedIndex == currentSelectedIndex)) + { + _ContextMenuItem* pItem = null; + pItem = __pModel->GetItem(__selectedIndex); + if (pItem == null) + { + return true; + } + + __selectedIndex = -1; + __focusedIndex = -1; + __pContextMenu->SetFocused(false); + __pContextMenu->SetVisibleState(false); + + int actionId = pItem->GetActionId(); + + _ActionEvent* pActionEvent = __pContextMenu->GetActionEvent(); + if (pActionEvent == null) + { + return true; + } + + IEventArg* pEventArg = _ActionEvent::CreateActionEventArgN(actionId); + if (pEventArg == null) + { + return true; + } + + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pContextMenu); + pActionEvent->Fire(*pEventArg); + } + + return true; +} + +_UiTouchEventDelivery +_ContextMenuListPresenter::OnPreviewTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + return _UI_TOUCH_EVENT_DELIVERY_FORCED_YES; +} + +bool +_ContextMenuListPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + if (__scrollEnable) + { + __selectedIndex = -1; + } + + return true; +} + +_UiTouchEventDelivery +_ContextMenuListPresenter::OnPreviewTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + return _UI_TOUCH_EVENT_DELIVERY_FORCED_YES; +} + +bool +_ContextMenuListPresenter::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + __pModel->ResetAllItem(); + __selectedIndex = -1; + + return true; +} + +bool +_ContextMenuListPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) +{ + _KeyCode keyCode = keyInfo.GetKeyCode(); + + switch (keyCode) + { + case _KEY_UP: + { + if (__enterKeyPressed) + { + __enterKeyPressed = false; + _ContextMenuItem* pItem = __pModel->GetItem(__focusedIndex); + if (pItem != null) + { + pItem->SetAndInvalidate(false); + } + } + + if (--__focusedIndex < 0) + { + __focusedIndex = 0; + } + + _ContextMenuItem* pItem = __pModel->GetItem(__focusedIndex); + if(pItem == null) + { + __focusedIndex = -1; + break; + } + + pItem->SetFocused(true); + pItem->DrawFocus(); + __pContextMenu->GetScrollPanel()->OnChildControlFocusMoved(*pItem); + + break; + } + case _KEY_DOWN: + { + if (__enterKeyPressed) + { + __enterKeyPressed = false; + _ContextMenuItem* pItem = __pModel->GetItem(__focusedIndex); + if(pItem != null) + { + pItem->SetAndInvalidate(false); + } + } + + _ContextMenuItem* pItem = __pModel->GetItem(++__focusedIndex); + if(pItem == null) + { + --__focusedIndex; + break; + } + + pItem->SetFocused(true); + pItem->DrawFocus(); + __pContextMenu->GetScrollPanel()->OnChildControlFocusMoved(*pItem); + + break; + } + case _KEY_TAB: + { + if (__enterKeyPressed) + { + __enterKeyPressed = false; + _ContextMenuItem* pItem = __pModel->GetItem(__focusedIndex); + if (pItem != null) + { + pItem->SetAndInvalidate(false); + } + } + + __focusedIndex = 0; + + _ContextMenuItem* pItem = __pModel->GetItem(__focusedIndex); + if(pItem == null) + { + __focusedIndex = -1; + break; + } + + pItem->SetFocused(true); + pItem->DrawFocus(); + __pContextMenu->GetScrollPanel()->OnChildControlFocusMoved(*pItem); + + break; + } + case _KEY_ENTER: + { + __enterKeyPressed = true; + + _ContextMenuItem* pItem = __pModel->GetItem(__focusedIndex); + if(pItem != null) + { + pItem->SetAndInvalidate(true); + } + + break; + } + case _KEY_BACKSPACE: + { + _ContextMenuItem* pItem = __pModel->GetItem(__focusedIndex); + if (pItem != null) + { + pItem->SetFocused(false); + pItem->SetAndInvalidate(false); + } + + __enterKeyPressed = false; + __backKeyPressed = false; + __selectedIndex = -1; + __focusedIndex = -1; + __pContextMenu->SetFocused(false); + __pContextMenu->SetVisibleState(false); + + break; + } + case _KEY_ESC: + // fall through + case _KEY_MENU: + // fall through + case _KEY_CONTEXT_MENU: + // fall through + case _KEY_BACK: + __backKeyPressed = true; + break; + default: + return false; + } + + return true; +} + +bool +_ContextMenuListPresenter::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) +{ + _KeyCode keyCode = keyInfo.GetKeyCode(); + + switch (keyCode) + { + case _KEY_UP: + // fall through + case _KEY_DOWN: + // fall through + case _KEY_BACKSPACE: + // fall through + case _KEY_TAB: + break; + case _KEY_ENTER: + { + if (!__enterKeyPressed) + { + return true; + } + + __enterKeyPressed = false; + __backKeyPressed = false; + + _ContextMenuItem* pItem = __pModel->GetItem(__focusedIndex); + + if (pItem == null) + { + __selectedIndex = -1; + __focusedIndex = -1; + __pContextMenu->SetFocused(false); + __pContextMenu->SetVisibleState(false); + + break; + } + + int actionId = pItem->GetActionId(); + + _ActionEvent* pActionEvent = __pContextMenu->GetActionEvent(); + if (pActionEvent == null) + { + break; + } + + IEventArg* pEventArg = _ActionEvent::CreateActionEventArgN(actionId); + if (pEventArg == null) + { + break; + } + + pItem->SetFocused(false); + pItem->SetAndInvalidate(false); + + __selectedIndex = -1; + __focusedIndex = -1; + __pContextMenu->SetFocused(false); + __pContextMenu->SetVisibleState(false); + + pActionEvent->Fire(*pEventArg); + + break; + } + case _KEY_ESC: + // fall through + case _KEY_MENU: + // fall through + case _KEY_CONTEXT_MENU: + // fall through + case _KEY_BACK: + { + if (!__backKeyPressed) + { + return true; + } + + _ContextMenuItem* pItem = __pModel->GetItem(__focusedIndex); + if (pItem != null) + { + pItem->SetFocused(false); + pItem->SetAndInvalidate(false); + } + + __enterKeyPressed = false; + __backKeyPressed = false; + __selectedIndex = -1; + __focusedIndex = -1; + __pContextMenu->SetFocused(false); + __pContextMenu->SetVisibleState(false); + + break; + } + default: + return false; + } + + return true; +} + +bool +_ContextMenuListPresenter::IsChildControlFocusManage(void) const +{ + return true; + +} + +void +_ContextMenuListPresenter::ResetFocus(void) +{ + _Control* pFocusedControl = null; + _Window* pTop = __pContextMenu->GetRootWindow(); + if (pTop) + { + pFocusedControl = pTop->GetCurrentFocusControl(); + } + + if (pFocusedControl != null) + { + pFocusedControl->SetFocused(false); + } +} + +bool +_ContextMenuListPresenter::OnFocusGained(const _Control& source) +{ + __focusLost = false; + return true; +} + +bool +_ContextMenuListPresenter::OnFocusLost(const _Control& source) +{ + __focusLost = true; + return true; +} + +void +_ContextMenuListPresenter::OnFontChanged(Font* pFont) +{ + __pFont = pFont; + String fontName = __pContextMenu->GetFont(); + + int itemCount = __pModel->GetItemCount(); + for (int i = 0; i < itemCount; i++) + { + _ContextMenuItem* pItem = __pModel->GetItem(i); + if (pItem != null) + { + pItem->SetFont(fontName); + } + } +} + +void +_ContextMenuListPresenter::OnFontInfoRequested(unsigned long& style, float& size) +{ + style = FONT_STYLE_PLAIN; + size = __itemFontSize; +} + +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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + pElementContextMenu->SetSupportOperatingGesture(false); + pElementContextMenu->SetTraitWithStringId("IDS_TPLATFORM_BODY_CONTEXTUAL_POP_UP_T_TTS"); + 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); + + int itemCount = __pModel->GetItemCount(); + for (int i = 0; i < itemCount; i++) + { + _ContextMenuItem* pItem = __pModel->GetItem(i); + if (pItem) + { + _AccessibilityContainer* pContainer = pItem->GetAccessibilityContainer(); + if (pContainer != null) + { + LinkedListT<_AccessibilityElement*> accessibilityElements; + _AccessibilityElement* pElement = null; + + pContainer->GetElements(accessibilityElements); + if (accessibilityElements.GetAt(0, pElement) == E_SUCCESS) + { + pElement->SetName(L"ContextMenuItem" + Integer::ToString(i)); + if (pItem->GetType() == CONTEXT_MENU_ITEM_DRAWING_TYPE_BITMAP) + { + String string; + GET_STRING_CONFIG(IDS_TPLATFORM_BODY_ICON, string); + pElement->SetLabel(string + pItem->GetText()); + } + else + { + pElement->SetLabel(pItem->GetText()); + } + + pElement->SetBounds(FloatRectangle(0.0f, 0.0f, pItem->GetBoundsF().width, pItem->GetBoundsF().height)); + } + pContainerContextMenu->AddChildContainer(*pContainer); + } + } + } + } +} + +_ContextMenuItemInfo +_ContextMenuListPresenter::GetItemFromPosition(const FloatPoint& position) +{ + _ContextMenuItemInfo itemInfo; + int index = GetItemIndexFromPosition(position); + itemInfo.pContextMenuItem = __pModel->GetItem(index); + + itemInfo.bListItem = false; + itemInfo.pListItem = null; + return itemInfo; +} + +_ContextMenuItemInfo +_ContextMenuListPresenter::FindItem(int index) +{ + _ContextMenuItemInfo itemInfo; + itemInfo.bListItem = false; + itemInfo.pListItem = null; + itemInfo.pContextMenuItem = __pModel->GetItem(index); + return itemInfo; +} + +result +_ContextMenuListPresenter::SetTopDrawnItemIndex(int index) +{ + return E_SUCCESS; +} + +result +_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, "Failed to draw ninepatched bitmap."); + } + else if (isAppBitmap) + { + r = canvas.DrawBitmap(bounds, 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; +} + +}}} // Tizen::Ui: Control diff --git a/src/ui/controls/FUiCtrl_ContextMenuModel.cpp b/src/ui/controls/FUiCtrl_ContextMenuModel.cpp new file mode 100644 index 0000000..9145baf --- /dev/null +++ b/src/ui/controls/FUiCtrl_ContextMenuModel.cpp @@ -0,0 +1,162 @@ +// +// 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_ContextMenuModel.cpp + * @brief This is the implementation file for the _ContextMenuModel class. + */ + +#include +#include +#include "FUiCtrl_ContextMenuModel.h" + +static const int DEFAULT_ITEM_COUNT = 32; + +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_ContextMenuModel::_ContextMenuModel(void) +{ + +} + +_ContextMenuModel::~_ContextMenuModel(void) +{ + __items.RemoveAll(true); +} + + +result +_ContextMenuModel::Construct(void) +{ + + result r = __items.Construct(DEFAULT_ITEM_COUNT); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to construct ArrayList."); + + return r; +} + +bool +_ContextMenuModel::IsValidItem(_ContextMenuItem *pItem) +{ + if (pItem == null) + return false; + + int actionId = pItem->GetActionId(); + int itemCount = __items.GetCount(); + + for (int i = 0; i < itemCount; i++) + { + _ContextMenuItem* pTargetItem = GetItem(i); + + if (pTargetItem == null) + return false; + + if (pTargetItem->GetActionId() == actionId) + { + return false; + } + } + + return true; +} + +int +_ContextMenuModel::GetItemCount(void) const +{ + + return __items.GetCount(); +} + +result +_ContextMenuModel::AddItem(_ContextMenuItem* pItem) +{ + 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) +{ + SysTryReturnResult(NID_UI_CTRL, IsValidItem(pItem), E_SYSTEM, "A system error has occurred. pItem is not valid."); + + return __items.InsertAt(*pItem, index); +} + +result +_ContextMenuModel::SetItem(_ContextMenuItem* pItem, int index) +{ + // The same ActionId can be used in SetItem. + if (IsValidItem(pItem) == false) + { + _ContextMenuItem* pTargetItem = GetItem(index); + + 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); +} + +result +_ContextMenuModel::RemoveItem(int index) +{ + return __items.RemoveAt(index, true); +} + +result +_ContextMenuModel::RemoveAllItem(void) +{ + __items.RemoveAll(true); + + return E_SUCCESS; +} + +void +_ContextMenuModel::ResetAllItem(void) +{ + int count = __items.GetCount(); + + _ContextMenuItem* pItem; + for(int index = 0; index < count; index++) + { + pItem = static_cast <_ContextMenuItem*>(__items.GetAt(index)); + if (pItem) + { + pItem->SetAndInvalidate(false); + } + } +} + +_ContextMenuItem* +_ContextMenuModel::GetItem(int index) const +{ + int count = __items.GetCount(); + + if (index < 0 || index >= count) + { + return null; + } + + const _ContextMenuItem* pItem = static_cast (__items.GetAt(index)); + return const_cast<_ContextMenuItem*>(pItem); +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_CustomElement.cpp b/src/ui/controls/FUiCtrl_CustomElement.cpp new file mode 100644 index 0000000..91f4817 --- /dev/null +++ b/src/ui/controls/FUiCtrl_CustomElement.cpp @@ -0,0 +1,123 @@ +// +// 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_CustomElement.cpp + * @brief This is the implementation file for _CustomElement class. + * + * This file contains the implementation of _CustomElement class. + */ + +#include +#include +#include +#include "FUi_CoordinateSystemUtils.h" +#include "FUiCtrl_CustomElement.h" + +#ifdef MEMORY_LEAK_CHECK +#include "mem_leak_check.h" +#endif + +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_CustomElement::_CustomElement(int elementId) + : __pElement(null) + , __pElementF(null) + , __elementId(elementId) + , __usingFloatingPoint(false) +{ +} + +_CustomElement::~_CustomElement(void) +{ +} + +int +_CustomElement::GetElementId(void) const +{ + return __elementId; +} + +bool +_CustomElement::DrawElement(Canvas* pCanvas, FloatRectangle& rect, ListViewItemDrawingStatus status) +{ + bool result = true; + + if (__usingFloatingPoint) + { + switch (status) + { + case LISTVIEW_ITEM_STATUS_NORMAL: + result = __pElementF->OnDraw(*pCanvas, rect, LIST_ITEM_DRAWING_STATUS_NORMAL); + break; + + case LISTVIEW_ITEM_STATUS_PRESSED: + result = __pElementF->OnDraw(*pCanvas, rect, LIST_ITEM_DRAWING_STATUS_PRESSED); + break; + + case LISTVIEW_ITEM_STATUS_HIGHLIGHTED: + result = __pElementF->OnDraw(*pCanvas, rect, LIST_ITEM_DRAWING_STATUS_HIGHLIGHTED); + break; + + default: + result = __pElementF->OnDraw(*pCanvas, rect, LIST_ITEM_DRAWING_STATUS_NORMAL); + break; + } + } + else + { + switch (status) + { + case LISTVIEW_ITEM_STATUS_NORMAL: + result = __pElement->OnDraw(*pCanvas, _CoordinateSystemUtils::ConvertToInteger(rect), LIST_ITEM_DRAWING_STATUS_NORMAL); + break; + + case LISTVIEW_ITEM_STATUS_PRESSED: + result = __pElement->OnDraw(*pCanvas, _CoordinateSystemUtils::ConvertToInteger(rect), LIST_ITEM_DRAWING_STATUS_PRESSED); + break; + + case LISTVIEW_ITEM_STATUS_HIGHLIGHTED: + result = __pElement->OnDraw(*pCanvas, _CoordinateSystemUtils::ConvertToInteger(rect), LIST_ITEM_DRAWING_STATUS_HIGHLIGHTED); + break; + + default: + result = __pElement->OnDraw(*pCanvas, _CoordinateSystemUtils::ConvertToInteger(rect), LIST_ITEM_DRAWING_STATUS_NORMAL); + break; + } + } + + return result; +} + +void +_CustomElement::SetElement(const ICustomElement& element) +{ + __usingFloatingPoint = false; + __pElement = const_cast (&element); +} + +void +_CustomElement::SetElement(const ICustomElementF& element) +{ + __usingFloatingPoint = true; + __pElementF = const_cast (&element); +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_CustomItemImpl.cpp b/src/ui/controls/FUiCtrl_CustomItemImpl.cpp new file mode 100644 index 0000000..3dd3831 --- /dev/null +++ b/src/ui/controls/FUiCtrl_CustomItemImpl.cpp @@ -0,0 +1,470 @@ +// +// 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_CustomItemImpl.cpp + * @brief This is the implementation file for _CustomItemImpl class. + * + * This file contains the implementation of _CustomItemImpl class. + */ + +#include +#include +#include +#include +#include +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_ResourceManager.h" +#include "FUiCtrl_CustomElement.h" +#include "FUiCtrl_CustomItemImpl.h" +#include "FUiCtrl_ListViewItem.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Utility; +using namespace Tizen::Graphics; +using namespace Tizen::Graphics::_Text; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_CustomItemImpl::_CustomItemImpl(CustomItem* pPublic) + : _ListItemBaseImpl(pPublic) +{ + +} + +_CustomItemImpl::~_CustomItemImpl(void) +{ + +} + +CustomItem& +_CustomItemImpl::GetPublic(void) +{ + return static_cast (_ListItemBaseImpl::GetPublic()); +} + +const char* +_CustomItemImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Controls::CustomItem"; +} + +_CustomItemImpl* +_CustomItemImpl::CreateCustomItemImplN(CustomItem* pPublic, const FloatDimension& itemSize, ListAnnexStyle style) +{ + 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] Memory allocation failed."); + + r = pImpl->Construct(itemSize, style); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[E_SYSTEM] Unable to construct _CustomItemImpl."); + + return pImpl; + +CATCH: + delete pImpl; + pImpl = null; + + return null; +} + +result +_CustomItemImpl::Construct(const FloatDimension& itemSize, ListAnnexStyle style) +{ + result r = _ListItemBaseImpl::Construct(itemSize, style); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + GetListViewItem()->SetListViewItemType(LISTVIEW_ITEM_TYPE_CUSTOM); + + SetLastResultReturn(r); +} + +result +_CustomItemImpl::AddElement(const FloatRectangle& rect, int elementId, const EnrichedText& text) +{ + _ListViewItem* pItem = GetListViewItem(); + + 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, E_INVALID_ARG, E_INVALID_ARG, + ("[E_INVALID_ARG] The element ID should not be less than 0.")); + + FloatRectangle bounds = rect; + ListAnnexStyle style = GetListItemAnnexStyle(); + + if (style == LIST_ANNEX_STYLE_MARK || style == LIST_ANNEX_STYLE_RADIO) + { + float elementLeftMargin = 0.0f; + GET_SHAPE_CONFIG(LISTVIEW::ITEM_ELEMENT_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, elementLeftMargin); + + bounds.x += GetAnnexWidth(style) + elementLeftMargin; + } + + result r = pItem->AddElement(bounds, elementId, &text); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + pItem->SetTextCutlinkViewMode(elementId, true, false); + + return r; +} + +result +_CustomItemImpl::AddElement(const FloatRectangle& rect, int elementId, const String& text, bool textSliding) +{ + _ListViewItem* pItem = GetListViewItem(); + + 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, E_INVALID_ARG, E_INVALID_ARG, + ("[E_INVALID_ARG] The element ID should not be less than 0.")); + + FloatRectangle bounds = rect; + ListAnnexStyle style = GetListItemAnnexStyle(); + + if (style == LIST_ANNEX_STYLE_MARK || style == LIST_ANNEX_STYLE_RADIO) + { + float elementLeftMargin = 0.0f; + GET_SHAPE_CONFIG(LISTVIEW::ITEM_ELEMENT_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, elementLeftMargin); + + bounds.x += GetAnnexWidth(style) + elementLeftMargin; + } + + result r = pItem->AddElement(bounds, elementId, text, textSliding); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + if (textSliding) + { + pItem->SetTextWrapType(elementId, TEXT_OBJECT_WRAP_TYPE_NONE); + } + + return r; +} + +result +_CustomItemImpl::AddElement(const FloatRectangle& rect, int elementId, const String& text, float textSize, + const Color& normalTextColor, const Color& pressedTextColor, const Color& highlightedTextColor, bool textSliding) +{ + _ListViewItem* pItem = GetListViewItem(); + + 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, E_INVALID_ARG, E_INVALID_ARG, + ("[E_INVALID_ARG] The element ID should not be less than 0.")); + + FloatRectangle bounds = rect; + ListAnnexStyle style = GetListItemAnnexStyle(); + bool ret; + result r = E_SUCCESS; + + if (style == LIST_ANNEX_STYLE_MARK || style == LIST_ANNEX_STYLE_RADIO) + { + float elementLeftMargin = 0.0f; + GET_SHAPE_CONFIG(LISTVIEW::ITEM_ELEMENT_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, elementLeftMargin); + + bounds.x += GetAnnexWidth(style) + elementLeftMargin; + } + + r = pItem->AddElement(bounds, elementId, text, textSliding); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + ret = pItem->SetTextSize(elementId, textSize); + SysTryCatch(NID_UI_CTRL, (ret == true), (r = E_SYSTEM), E_SYSTEM, ("[E_SYSTEM] Unable to add element.")); + + ret = pItem->SetTextColor(elementId, normalTextColor, LISTVIEW_ITEM_STATUS_NORMAL); + SysTryCatch(NID_UI_CTRL, (ret == true), (r = E_SYSTEM), E_SYSTEM, ("[E_SYSTEM] Unable to add element.")); + + ret = pItem->SetTextColor(elementId, pressedTextColor, LISTVIEW_ITEM_STATUS_PRESSED); + SysTryCatch(NID_UI_CTRL, (ret == true), (r = E_SYSTEM), E_SYSTEM, ("[E_SYSTEM] Unable to add element.")); + + ret = pItem->SetTextColor(elementId, highlightedTextColor, LISTVIEW_ITEM_STATUS_HIGHLIGHTED); + SysTryCatch(NID_UI_CTRL, (ret == true), (r = E_SYSTEM), E_SYSTEM, ("[E_SYSTEM] Unable to add element.")); + + if (textSliding) + { + pItem->SetTextWrapType(elementId, TEXT_OBJECT_WRAP_TYPE_NONE); + } + + return E_SUCCESS; + +CATCH: + if (!pItem->DeleteElement(elementId)) + { + SysLogException(NID_UI_CTRL, r, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + } + + return r; +} + +result +_CustomItemImpl::AddElement(const FloatRectangle& rect, int elementId, const Bitmap& normalBitmap, const Bitmap* pPressedBitmap, + const Bitmap* pHighlightedBitmap) +{ + _ListViewItem* pItem = GetListViewItem(); + + 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, E_INVALID_ARG, E_INVALID_ARG, + ("[E_INVALID_ARG] The element ID should not be less than 0.")); + + FloatRectangle bounds = rect; + ListAnnexStyle style = GetListItemAnnexStyle(); + + if (style == LIST_ANNEX_STYLE_MARK || style == LIST_ANNEX_STYLE_RADIO) + { + float elementLeftMargin = 0.0f; + GET_SHAPE_CONFIG(LISTVIEW::ITEM_ELEMENT_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, elementLeftMargin); + + bounds.x += GetAnnexWidth(style) + elementLeftMargin; + } + + result r = pItem->AddElement(bounds, elementId, &normalBitmap, pPressedBitmap, pPressedBitmap); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + return r; +} + +result +_CustomItemImpl::AddElement(const FloatRectangle& rect, int elementId, const ICustomElement& element) +{ + _ListViewItem* pItem = GetListViewItem(); + + 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, E_INVALID_ARG, E_INVALID_ARG, + ("[E_INVALID_ARG] The element ID should not be less than 0.")); + + _CustomElement* pCustomElement = null; + FloatRectangle bounds = rect; + ListAnnexStyle style = GetListItemAnnexStyle(); + + if (style == LIST_ANNEX_STYLE_MARK || style == LIST_ANNEX_STYLE_RADIO) + { + float elementLeftMargin = 0.0f; + GET_SHAPE_CONFIG(LISTVIEW::ITEM_ELEMENT_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, elementLeftMargin); + + bounds.x += GetAnnexWidth(style) + elementLeftMargin; + } + + pCustomElement = new (std::nothrow) _CustomElement(elementId); + 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); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + return r; + +CATCH: + delete pCustomElement; + pCustomElement = null; + + return r; +} + +result +_CustomItemImpl::AddElement(const FloatRectangle& rect, int elementId, const ICustomElementF& element) +{ + _ListViewItem* pItem = GetListViewItem(); + + 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, E_INVALID_ARG, E_INVALID_ARG, + ("[E_INVALID_ARG] The element ID should not be less than 0.")); + + _CustomElement* pCustomElement = null; + FloatRectangle bounds = rect; + ListAnnexStyle style = GetListItemAnnexStyle(); + + if (style == LIST_ANNEX_STYLE_MARK || style == LIST_ANNEX_STYLE_RADIO) + { + float elementLeftMargin = 0.0f; + GET_SHAPE_CONFIG(LISTVIEW::ITEM_ELEMENT_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, elementLeftMargin); + + bounds.x += GetAnnexWidth(style) + elementLeftMargin; + } + + pCustomElement = new (std::nothrow) _CustomElement(elementId); + 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); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + return r; + +CATCH: + delete pCustomElement; + pCustomElement = null; + + return r; +} + +result +_CustomItemImpl::RemoveAllElements(void) +{ + GetListViewItem()->DeleteAllElement(); + + return E_SUCCESS; +} + +result +_CustomItemImpl::RemoveElement(int elementId) +{ + 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.")); + + return E_SUCCESS; +} + +result +_CustomItemImpl::SetElementSelectionEnabled(int elementId, bool enable) +{ + _ListViewItem* pItem = GetListViewItem(); + + 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.")); + + SysTryReturn(NID_UI_CTRL, (pItem->SetElementSelectionEnabled(elementId, enable) == true), E_SYSTEM, E_SYSTEM, + ("[E_SYSTEM] Unable to set selection type of element.")); + + return E_SUCCESS; +} + +result +_CustomItemImpl::SetElementTextHorizontalAlignment(int elementId, HorizontalAlignment alignment) +{ + _ListViewItem* pItem = GetListViewItem(); + + 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.")); + + TextObjectAlignment align = 0x0000; + switch (alignment) + { + case ALIGNMENT_LEFT: + align = TEXT_OBJECT_ALIGNMENT_LEFT; + break; + + case ALIGNMENT_RIGHT: + align = TEXT_OBJECT_ALIGNMENT_RIGHT; + break; + + case ALIGNMENT_CENTER: + align = TEXT_OBJECT_ALIGNMENT_CENTER; + break; + + default: + SysTryReturn(NID_UI_CTRL, false, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Unable to set TextAlignment."); + } + + SysTryReturn(NID_UI_CTRL, (pItem->SetTextAlignment(elementId, align) == true), E_SYSTEM, E_SYSTEM, + ("[E_SYSTEM] Unable to set TextAlignment.")); + + return E_SUCCESS; +} + +result +_CustomItemImpl::SetElementTextVerticalAlignment(int elementId, VerticalAlignment alignment) +{ + _ListViewItem* pItem = GetListViewItem(); + + 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.")); + + TextObjectAlignment align = 0x0000; + switch (alignment) + { + case ALIGNMENT_TOP: + align = TEXT_OBJECT_ALIGNMENT_TOP; + break; + + case ALIGNMENT_BOTTOM: + align = TEXT_OBJECT_ALIGNMENT_BOTTOM; + break; + + case ALIGNMENT_MIDDLE: + align = TEXT_OBJECT_ALIGNMENT_MIDDLE; + break; + + default: + SysTryReturn(NID_UI_CTRL, false, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Unable to set TextAlignment."); + } + + SysTryReturn(NID_UI_CTRL, (pItem->SetTextAlignment(elementId, align) == true), E_SYSTEM, E_SYSTEM, + ("[E_SYSTEM] Unable to set TextAlignment.")); + + return E_SUCCESS; +} + +result +_CustomItemImpl::SetElementAutoLinkMask(int elementId, unsigned long mask) +{ + _ListViewItem* pItem = GetListViewItem(); + + 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.")); + + SysTryReturn(NID_UI_CTRL, (pItem->SetTextCutlinkViewMode(elementId, true) == true), E_SYSTEM, E_SYSTEM, + ("[E_SYSTEM] Unable to set auto link.")); + + unsigned long linktype = 0x0; + + if (LINK_TYPE_URL & mask) + { + linktype |= TEXT_CUTLINK_TYPE_URL; + } + + if (LINK_TYPE_EMAIL & mask) + { + linktype |= TEXT_CUTLINK_TYPE_EMAIL; + } + + if (LINK_TYPE_TEL_NUM & mask) + { + linktype |= TEXT_CUTLINK_TYPE_PHONE_NUMBER; + } + + SysTryReturn(NID_UI_CTRL, (pItem->SetTextCutlinkMask(elementId, linktype) == true), E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] Unable to set auto link."); + + return E_SUCCESS; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_CustomListElements.cpp b/src/ui/controls/FUiCtrl_CustomListElements.cpp new file mode 100644 index 0000000..15b9def --- /dev/null +++ b/src/ui/controls/FUiCtrl_CustomListElements.cpp @@ -0,0 +1,771 @@ +// +// 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_CustomListElements.cpp +* @brief This is the header file for the classes related to implementing elements in CustomListItem. +*/ + +#include +#include +#include +#include +#include "FUiCtrl_CustomListItemImpl.h" +#include "FUiCtrl_CustomListItemFormatImpl.h" +#include "FUiCtrl_PanelImpl.h" +#include "FUi_ResourceManager.h" +#include "FUi_CoordinateSystemUtils.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; +using namespace Tizen::Graphics::_Text; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_ElementBaseModel::_ElementBaseModel(void) + : _elementId(-1) + , _itemStatus(CUSTOM_LIST_ITEM_STATUS_NORMAL) +{ +} + +_ElementBaseModel::~_ElementBaseModel(void) +{ +} + +int +_ElementBaseModel::GetElementId(void) +{ + return _elementId; +} + +CustomListItemStatus +_ElementBaseModel::GetItemStatus(void) +{ + return _itemStatus; +} + +void +_ElementBaseModel::HandleElementEvent(CustomListItemStatus itemStatus) +{ + _itemStatus = itemStatus; +} + +_TextElementModel::_TextElementModel(const String& text) + : __text(text) + , __textSize(0) + , __slidingEnabled(false) +{ +} + +_TextElementModel::~_TextElementModel(void) +{ +} + +void +_TextElementModel::SetTextSliding(bool enable) +{ + __slidingEnabled = enable; +} + +bool +_TextElementModel::GetTextSliding(void) +{ + return __slidingEnabled; +} + +void +_TextElementModel::GetData(String& text, Color& textColor, int& textSize) const +{ + text = __text; + textColor = __textColor[_itemStatus]; + textSize = __textSize; + + return; +} + +int +_TextElementModel::GetTextSize(void) const +{ + return __textSize; +} + +result +_TextElementModel::CreateElementView(_ElementViewParams& elementParams) +{ + _TextElementModel* pTextElementModel = dynamic_cast<_TextElementModel*>(elementParams.pElementModel); + SysTryReturn(NID_UI_CTRL, (pTextElementModel != null), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get element model"); + + SysTryReturn(NID_UI_CTRL, (elementParams.pElementFormatData != null), E_SYSTEM, E_SYSTEM, "[E_INVALID_ARG] Invalid argument is used. pElementFormatData must not be null"); + SysTryReturn(NID_UI_CTRL, (elementParams.pTableViewItemBase != null), E_SYSTEM, E_SYSTEM, "[E_INVALID_ARG] Invalid argument is used. pTableViewItemBase must not be null"); + SysTryReturn(NID_UI_CTRL, (elementParams.pCustomListItemImpl != null), E_SYSTEM, E_SYSTEM, "[E_INVALID_ARG] Invalid argument is used. pCustomListItemImpl must not be null"); + + pTextElementModel->__textSize = elementParams.pElementFormatData->textSize; + pTextElementModel->__textColor[CUSTOM_LIST_ITEM_STATUS_NORMAL] = elementParams.pElementFormatData->normalTextColor; + pTextElementModel->__textColor[CUSTOM_LIST_ITEM_STATUS_FOCUSED] = elementParams.pElementFormatData->focusedTextColor; + pTextElementModel->__textColor[CUSTOM_LIST_ITEM_STATUS_SELECTED] = elementParams.pElementFormatData->highlightedTextColor; + + TextObject* pText = new (std::nothrow) TextObject(); + SysTryReturn(NID_UI_CTRL, pText, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pText->Construct(); + + TextSimple* pSimpleText = new (std::nothrow) TextSimple(const_cast (pTextElementModel->__text.GetPointer()), pTextElementModel->__text.GetLength()); + SysTryReturn(NID_UI_CTRL, pSimpleText, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pText->AppendElement(*pSimpleText); + + pText->SetAction(TEXT_OBJECT_ACTION_TYPE_NONE); + pText->SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT | TEXT_OBJECT_ALIGNMENT_MIDDLE); + pText->SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE); + pText->Compose(); + + _TextElementView* pTextElementView = new (std::nothrow) _TextElementView(pText); + SysTryReturn(NID_UI_CTRL, (pTextElementView != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pTextElementView->Construct(_CoordinateSystemUtils::ConvertToFloat(elementParams.pElementFormatData->rect)); + pTextElementView->AddTouchEventListener(*elementParams.pCustomListItemImpl); + elementParams.pTableViewItemBase->AddControl(*pTextElementView); + pTextElementView->SetModel(pTextElementModel); + elementParams.pTableViewItemBase->SetIndividualSelectionEnabled(pTextElementView, true); + + return E_SUCCESS; +} + +_BitmapElementModel::_BitmapElementModel(void) +{ + for (int i = 0; i <= CUSTOM_LIST_ITEM_STATUS_FOCUSED; i++) + { + __pBitmap[i] = null; + } +} + +_BitmapElementModel::~_BitmapElementModel(void) +{ + for (int i = 0; i <= CUSTOM_LIST_ITEM_STATUS_FOCUSED; i++) + { + delete __pBitmap[i]; + } +} + +Bitmap* +_BitmapElementModel::GetData(void) const +{ + return __pBitmap[_itemStatus]; +} + +result +_BitmapElementModel::CreateElementView(_ElementViewParams& elementParams) +{ + _BitmapElementModel* pBitmapElementModel = dynamic_cast<_BitmapElementModel*>(elementParams.pElementModel); + SysTryReturn(NID_UI_CTRL, (pBitmapElementModel != null), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get element model"); + + SysTryReturn(NID_UI_CTRL, (elementParams.pElementFormatData != null), E_SYSTEM, E_SYSTEM, "[E_INVALID_ARG] Invalid argument is used. pElementFormatData must not be null"); + SysTryReturn(NID_UI_CTRL, (elementParams.pCustomListItemImpl != null), E_SYSTEM, E_SYSTEM, "[E_INVALID_ARG] Invalid argument is used. pCustomListItemImpl must not be null"); + SysTryReturn(NID_UI_CTRL, (elementParams.pTableViewItemBase != null), E_SYSTEM, E_SYSTEM, "[E_INVALID_ARG] Invalid argument is used. pTableViewItemBase must not be null"); + + _BitmapElementView* pBitmapElementView = new (std::nothrow) _BitmapElementView(); + SysTryReturn(NID_UI_CTRL, (pBitmapElementView != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pBitmapElementView->Construct(_CoordinateSystemUtils::ConvertToFloat(elementParams.pElementFormatData->rect)); + pBitmapElementView->AddTouchEventListener(*elementParams.pCustomListItemImpl); + elementParams.pTableViewItemBase->AddControl(*pBitmapElementView); + pBitmapElementView->SetModel(pBitmapElementModel); + elementParams.pTableViewItemBase->SetIndividualSelectionEnabled(pBitmapElementView, true); + + return E_SUCCESS; +} + +_CustomElementModel::_CustomElementModel(void) + : __pListElement(null) +{ +} + +_CustomElementModel::~_CustomElementModel(void) +{ +} + +ICustomListElement* +_CustomElementModel::GetData(void) const +{ + return __pListElement; +} + +result +_CustomElementModel::CreateElementView(_ElementViewParams& elementParams) +{ + _CustomElementModel* pCustomElementModel = dynamic_cast<_CustomElementModel*>(elementParams.pElementModel); + SysTryReturn(NID_UI_CTRL, (pCustomElementModel != null), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get element model"); + + SysTryReturn(NID_UI_CTRL, (elementParams.pElementFormatData != null), E_SYSTEM, E_SYSTEM, "[E_INVALID_ARG] Invalid argument is used. pElementFormatData must not be null"); + SysTryReturn(NID_UI_CTRL, (elementParams.pCustomListItemImpl != null), E_SYSTEM, E_SYSTEM, "[E_INVALID_ARG] Invalid argument is used. pCustomListItemImpl must not be null"); + SysTryReturn(NID_UI_CTRL, (elementParams.pTableViewItemBase != null), E_SYSTEM, E_SYSTEM, "[E_INVALID_ARG] Invalid argument is used. pTableViewItemBase must not be null"); + + _CustomElementView* pCustomElementView = new (std::nothrow) _CustomElementView(); + SysTryReturn(NID_UI_CTRL, (pCustomElementView != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pCustomElementView->Construct(_CoordinateSystemUtils::ConvertToFloat(elementParams.pElementFormatData->rect)); + pCustomElementView->AddTouchEventListener(*elementParams.pCustomListItemImpl); + elementParams.pTableViewItemBase->AddControl(*pCustomElementView); + pCustomElementView->SetModel(pCustomElementModel); + elementParams.pTableViewItemBase->SetIndividualSelectionEnabled(pCustomElementView, true); + + return E_SUCCESS; +} + +_CheckElementModel::_CheckElementModel(void) + : __checkBoxStatus(CHECK_BOX_UNCHECKED) + , __pCheckBitmaps(null) + , __isDividerEnabled(false) + , __rightDivider(false) + , __leftDivider(false) +{ +} + +_CheckElementModel::~_CheckElementModel(void) +{ +} + +void +_CheckElementModel::SetCheckBoxStatus(_CheckBoxBitmapType checkBoxStatus) +{ + __checkBoxStatus = checkBoxStatus; +} + +_CheckBoxBitmapType +_CheckElementModel::GetCheckBoxStatus(void) +{ + return __checkBoxStatus; +} + +const _CheckBoxBitmapType +_CheckElementModel::GetCheckBoxStatus(void) const +{ + return __checkBoxStatus; +} + +void +_CheckElementModel::GetData(Rectangle& bitmapBounds, bool& isDividerEnabled, bool& leftDivider, bool& rightDivider) const +{ + bitmapBounds = __bitmapBounds; + isDividerEnabled = __isDividerEnabled; + leftDivider = __leftDivider; + rightDivider = __rightDivider; + + return; +} + +Bitmap* +_CheckElementModel::GetCheckBitmap(_BitmapType checkBoxStatus) const +{ + return __pCheckBitmaps[checkBoxStatus]; +} + +result +_CheckElementModel::CreateElementView(_ElementViewParams& elementParams) +{ + SysTryReturn(NID_UI_CTRL, (elementParams.pElementFormatData != null), E_SYSTEM, E_SYSTEM, "[E_INVALID_ARG] Invalid argument is used. pElementFormatData must not be null"); + SysTryReturn(NID_UI_CTRL, (elementParams.pCustomListItemImpl != null), E_SYSTEM, E_SYSTEM, "[E_INVALID_ARG] Invalid argument is used. pCustomListItemImpl must not be null"); + SysTryReturn(NID_UI_CTRL, (elementParams.pTableViewItemBase != null), E_SYSTEM, E_SYSTEM, "[E_INVALID_ARG] Invalid argument is used. pTableViewItemBase must not be null"); + + if (elementParams.annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL) + { + Rectangle checkBoxBounds(elementParams.pElementFormatData->rect); + int dividerMargin = 0; + + GET_SHAPE_CONFIG(LIST::CHECK_ELEMENT_DIVIDER_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, dividerMargin); + + if (elementParams.isDividerEnabled) + { + checkBoxBounds.width += 2 * dividerMargin; + checkBoxBounds.y = 0; + checkBoxBounds.height = elementParams.pCustomListItemImpl->height; + } + + _CheckElementModel* pCheckElementModel = dynamic_cast<_CheckElementModel*>(elementParams.pElementModel); + SysTryReturn(NID_UI_CTRL, (pCheckElementModel != null), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get element model"); + + pCheckElementModel->__pCheckBitmaps = elementParams.pCheckBitmaps; + pCheckElementModel->__isDividerEnabled = elementParams.isDividerEnabled; + + pCheckElementModel->__bitmapBounds.width = elementParams.pElementFormatData->rect.width; + pCheckElementModel->__bitmapBounds.height = elementParams.pElementFormatData->rect.height; + + if (elementParams.isDividerEnabled) + { + pCheckElementModel->__bitmapBounds.x = ((checkBoxBounds.x + dividerMargin) > elementParams.pElementFormatData->rect.x) ? (dividerMargin) : (0); + pCheckElementModel->__bitmapBounds.y = elementParams.pElementFormatData->rect.y; + + _CustomListItemImpl::SetDividerRequired(*elementParams.pElementFormat, elementParams.pElementFormatData->rect, pCheckElementModel->__leftDivider, pCheckElementModel->__rightDivider); + } + else + { + pCheckElementModel->__bitmapBounds.x = 0; + pCheckElementModel->__bitmapBounds.y = 0; + } + + _CheckElementView* pCheckElementView = new (std::nothrow) _CheckElementView(); + SysTryReturn(NID_UI_CTRL, (pCheckElementView != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pCheckElementView->Construct(_CoordinateSystemUtils::ConvertToFloat(elementParams.pElementFormatData->rect)); + pCheckElementView->AddTouchEventListener(*elementParams.pCustomListItemImpl); + elementParams.pTableViewItemBase->AddControl(*pCheckElementView); + pCheckElementView->SetModel(pCheckElementModel); + elementParams.pTableViewItemBase->SetIndividualSelectionEnabled(pCheckElementView, true); + } + + return E_SUCCESS; +} + +_ElementBaseView::_ElementBaseView(void) + : __pElementBaseModel(null) +{ +} + +_ElementBaseView::~_ElementBaseView(void) +{ +} + +int +_ElementBaseView::GetElementId(void) const +{ + SysTryReturn(NID_UI_CTRL, (__pElementBaseModel != null), -1, E_SYSTEM, "Element model not set"); + + return __pElementBaseModel->GetElementId(); +} + +_TextElementView::_TextElementView(TextObject* pText) + : __pText(pText) +{ +} + +_TextElementView::~_TextElementView(void) +{ + __pText->RemoveAll(); + + delete __pText; + __pText = null; + +} + +result +_TextElementView::OnDraw(void) +{ + result r = E_SUCCESS; + + _TextElementModel* __pTextElementModel = dynamic_cast<_TextElementModel*>(__pElementBaseModel); + SysTryReturn(NID_UI_CTRL, (__pTextElementModel), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occured. Failed to get _TextElementModel."); + + Canvas* pCanvas = GetCanvasN(); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, (pCanvas), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + String text; + Color textColor; + int textSize = 0; + + __pTextElementModel->GetData(text, textColor, textSize); + + if (IsEnabled() == false) + { + GET_COLOR_CONFIG(LIST::ELEMENT_TEXT_DISABLED, textColor); + } + + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + + if (__pText) + { + FloatRectangle bounds = GetBoundsF(); + bounds.x = 0.0f; + bounds.y = 0.0f; + + _ListBaseImpl* pListBaseImpl = _CustomListItemImpl::GetListBaseImplFromElement(*this); + SysTryCatch(NID_UI_CTRL, (pListBaseImpl != null), , E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get _ListBaseImpl instance."); + + Font font; + r = font.Construct(pListBaseImpl->GetCore().GetFont(), FONT_STYLE_PLAIN, textSize); + if (r != E_SUCCESS) + { + font.Construct(FONT_STYLE_PLAIN, textSize); + } + + __pText->SetFont(&font, 0, __pText->GetTextLength()); + __pText->SetForegroundColor(textColor, 0, __pText->GetTextLength()); + __pText->SetBounds(bounds); + __pText->Draw(*_CanvasImpl::GetInstance(*pCanvas)); + } + + delete pCanvas; + return E_SUCCESS; + +CATCH: + delete pCanvas; + return E_SYSTEM; +} + +void +_TextElementView::SetModel(_TextElementModel* pTextElementModel) +{ + __pElementBaseModel = pTextElementModel; +} + +void +_TextElementView::StartTextSlide(void) +{ + if (IsEnabled() == false) + { + return; + } + + Canvas* pCanvas = GetCanvasN(); + SysTryReturnVoidResult(NID_UI_CTRL, (pCanvas != null), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + + if (__pText->GetTextLengthAt(0) < __pText->GetTextLength()) + { + __pText->SetAction(TEXT_OBJECT_ACTION_TYPE_SLIDE_LEFT); + __pText->Compose(); + __pText->DrawWithOffset(*_CanvasImpl::GetInstance(*pCanvas)); + } + else + { + __pText->Draw(*_CanvasImpl::GetInstance(*pCanvas)); + } + + delete pCanvas; +} + +void +_TextElementView::StopTextSlide(void) +{ + if (IsEnabled() == false) + { + return; + } + + Canvas* pCanvas = GetCanvasN(); + SysTryReturnVoidResult(NID_UI_CTRL, (pCanvas != null), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + + __pText->SetAction(TEXT_OBJECT_ACTION_TYPE_NONE); + __pText->SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT | TEXT_OBJECT_ALIGNMENT_MIDDLE); + __pText->SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE); + __pText->Compose(); + __pText->DrawWithOffset(*_CanvasImpl::GetInstance(*pCanvas)); + + delete pCanvas; +} + +_BitmapElementView::_BitmapElementView(void) +{ +} + +_BitmapElementView::~_BitmapElementView(void) +{ +} + +result +_BitmapElementView::OnDraw(void) +{ + result r = E_SUCCESS; + Canvas* pCanvas = GetCanvasN(); + + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, (pCanvas), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _BitmapElementModel* __pBitmapElementModel = dynamic_cast<_BitmapElementModel*>(__pElementBaseModel); + SysTryReturn(NID_UI_CTRL, (__pBitmapElementModel), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occured. Failed to get _BitmapElementModel."); + + Bitmap *pBitmap = __pBitmapElementModel->GetData(); + + if (pBitmap) + { + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pBitmap)) + { + pCanvas->DrawNinePatchedBitmap(FloatRectangle(0.0f, 0.0f, GetWidthF(), GetHeightF()), *pBitmap); + } + else + { + pCanvas->DrawBitmap(FloatRectangle(0.0f, 0.0f, GetWidthF(), GetHeightF()), *pBitmap); + } + } + + delete pCanvas; + + return E_SUCCESS; +} + +void +_BitmapElementView::SetModel(_BitmapElementModel* pBitmapElementModel) +{ + __pElementBaseModel = static_cast<_ElementBaseModel*>(pBitmapElementModel); +} + +_CustomElementView::_CustomElementView(void) +{ +} + +_CustomElementView::~_CustomElementView(void) +{ +} + +result +_CustomElementView::OnDraw(void) +{ + result r = E_SUCCESS; + Canvas* pCanvas = GetCanvasN(); + + CustomListItemStatus itemStatus; + ICustomListElement* pListElement; + + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, (pCanvas), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _CustomElementModel* __pCustomElementModel = dynamic_cast<_CustomElementModel*>(__pElementBaseModel); + SysTryCatch(NID_UI_CTRL, (__pCustomElementModel), , E_SYSTEM, "[E_SYSTEM] A system error has occured. Failed to get _CustomElementModel."); + + itemStatus = __pCustomElementModel->GetItemStatus(); + pListElement = __pCustomElementModel->GetData(); + + if (pListElement) + { + TableViewItemBase* pParentItem = dynamic_cast(GetParent()); + SysTryCatch(NID_UI_CTRL, pParentItem, , E_SYSTEM, "[E_SYSTEM] Failed to get parent item"); + + Color bgColor = pParentItem->GetBackgroundColor(TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL); + + pCanvas->SetBackgroundColor(bgColor); + pCanvas->Clear(); + pListElement->DrawElement(*pCanvas, Rectangle(0, 0, GetWidth(), GetHeight()), itemStatus); + } + + delete pCanvas; + return E_SUCCESS; + +CATCH: + delete pCanvas; + return E_SYSTEM; + +} + +void +_CustomElementView::SetModel(_CustomElementModel* pCustomElementModel) +{ + __pElementBaseModel = static_cast<_ElementBaseModel*>(pCustomElementModel); +} + +_CheckElementView::_CheckElementView(void) + : __pressedState(false) +{ + GET_COLOR_CONFIG(LIST::LISTITEM_DIVIDER_LEFT_HALF_COLOR, __leftHalfDividerColor); + GET_COLOR_CONFIG(LIST::LISTITEM_DIVIDER_RIGHT_HALF_COLOR, __rightHalfDividerColor); +} + +_CheckElementView::~_CheckElementView(void) +{ +} + +result +_CheckElementView::OnDraw(void) +{ + result r = E_SUCCESS; + Canvas* pCanvas = GetCanvasN(); + + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, (pCanvas), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + Rectangle bitmapBounds; + bool isDividerEnabled = false; + bool leftDivider = false; + bool rightDivider = false; + Bitmap* pCheckBitmap = null; + _CheckElementModel* pCheckElementModel = null; + + _ListBaseImpl* pListBaseImpl = _CustomListItemImpl::GetListBaseImplFromElement(*this); + SysTryCatch(NID_UI_CTRL, (pListBaseImpl), , E_SYSTEM, "[E_SYSTEM] A system error has occured. Failed to get _ListBaseImpl."); + + pCheckElementModel = dynamic_cast<_CheckElementModel*>(__pElementBaseModel); + SysTryCatch(NID_UI_CTRL, (pCheckElementModel), , E_SYSTEM, "[E_SYSTEM] A system error has occured. Failed to get _CheckElementModel."); + + pCheckElementModel->GetData(bitmapBounds, isDividerEnabled, leftDivider, rightDivider); + + if (isDividerEnabled) + { + Color bgColor(0, 0, 0, 0); + + if (__pressedState == true) + { + GET_COLOR_CONFIG(TABLEVIEW::ITEM_BG_PRESSED, bgColor); + } + else + { + bgColor = pListBaseImpl->GetBackgroundColor(); + } + + pCanvas->SetBackgroundColor(bgColor); + } + else + { + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + } + + if (__pressedState == true && pListBaseImpl->GetAnnexStyle() != TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING + && pListBaseImpl->GetAnnexStyle() != TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER) + { + if (pCheckElementModel->GetCheckBoxStatus() == CHECK_BOX_UNCHECKED) + { + pCheckBitmap = pCheckElementModel->GetCheckBitmap(BITMAP_UNCHECKED_PRESSED); + } + else + { + pCheckBitmap = pCheckElementModel->GetCheckBitmap(BITMAP_CHECKED_PRESSED); + } + } + else + { + if (pListBaseImpl->GetAnnexStyle() == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING || + pListBaseImpl->GetAnnexStyle() == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER) + { + if (IsEnabled() == true) + { + if (pCheckElementModel->GetCheckBoxStatus() == CHECK_BOX_CHECKED) + { + pCheckBitmap = pCheckElementModel->GetCheckBitmap(BITMAP_CHECKED); + } + else + { + pCheckBitmap = pCheckElementModel->GetCheckBitmap(BITMAP_UNCHECKED); + } + } + else + { + if (pCheckElementModel->GetCheckBoxStatus() == CHECK_BOX_CHECKED) + { + pCheckBitmap = pCheckElementModel->GetCheckBitmap(BITMAP_CHECKED_DISABLED); + } + else + { + pCheckBitmap = pCheckElementModel->GetCheckBitmap(BITMAP_UNCHECKED_DISABLED); + } + } + } + else + { + if (IsEnabled() == true) + { + if (pCheckElementModel->GetCheckBoxStatus() == CHECK_BOX_CHECKED) + { + pCheckBitmap = pCheckElementModel->GetCheckBitmap(BITMAP_CHECKED); + } + else + { + pCheckBitmap = pCheckElementModel->GetCheckBitmap(BITMAP_UNCHECKED); + } + } + else + { + if (pCheckElementModel->GetCheckBoxStatus() != CHECK_BOX_UNCHECKED) + { + pCheckBitmap = pCheckElementModel->GetCheckBitmap(BITMAP_CHECKED_DISABLED); + } + else + { + pCheckBitmap = pCheckElementModel->GetCheckBitmap(BITMAP_UNCHECKED); + } + } + } + } + + pCanvas->Clear(); + + if (bitmapBounds.width > pCheckBitmap->GetWidth()) + { + bitmapBounds.width = pCheckBitmap->GetWidth(); + } + + if (bitmapBounds.height > pCheckBitmap->GetHeight()) + { + bitmapBounds.height = pCheckBitmap->GetHeight(); + } + + pCanvas->DrawBitmap(bitmapBounds, *pCheckBitmap); + + if (isDividerEnabled) + { + float lineWidth = 0.0f; + + GET_SHAPE_CONFIG(LIST::CHECK_ELEMENT_DIVIDER_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, lineWidth); + + FloatRectangle bounds = GetBoundsF(); + float dividerHeight = 0.0f; + + dividerHeight = bounds.height / 2.0f; + bounds.y = bounds.y + ((bounds.height - dividerHeight) / 2.0f); + + if (leftDivider) + { + pCanvas->SetLineWidth(lineWidth / 2.0f); + pCanvas->SetForegroundColor(__leftHalfDividerColor); + pCanvas->DrawLine(FloatPoint(0.0f, bounds.y), FloatPoint(0.0f, dividerHeight + bounds.y)); + + pCanvas->SetLineWidth(lineWidth / 2.0f); + pCanvas->SetForegroundColor(__rightHalfDividerColor); + pCanvas->DrawLine(FloatPoint(1.0f, bounds.y), FloatPoint(1.0f, dividerHeight + bounds.y)); + } + + if (rightDivider) + { + pCanvas->SetLineWidth(lineWidth / 2.0f); + pCanvas->SetForegroundColor(__leftHalfDividerColor); + pCanvas->DrawLine(FloatPoint(bounds.width - lineWidth, bounds.y), FloatPoint(bounds.width - lineWidth, dividerHeight + bounds.y)); + + pCanvas->SetLineWidth(lineWidth / 2.0f); + pCanvas->SetForegroundColor(__rightHalfDividerColor); + pCanvas->DrawLine(FloatPoint(bounds.width - lineWidth + 1.0f, bounds.y), FloatPoint(bounds.width - lineWidth + 1.0f, dividerHeight + bounds.y)); + } + } + + delete pCanvas; + return E_SUCCESS; + +CATCH: + delete pCanvas; + return E_SYSTEM; +} + +void +_CheckElementView::SetModel(_CheckElementModel* pCheckElementModel) +{ + __pElementBaseModel = static_cast<_ElementBaseModel*>(pCheckElementModel); +} + +void +_CheckElementView::SetPressed(bool pressedState) +{ + __pressedState = pressedState; +} + +}}} //Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_CustomListImpl.cpp b/src/ui/controls/FUiCtrl_CustomListImpl.cpp new file mode 100644 index 0000000..ce601d0 --- /dev/null +++ b/src/ui/controls/FUiCtrl_CustomListImpl.cpp @@ -0,0 +1,988 @@ +// +// 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_CustomListImpl.cpp +* @brief This file contains implementation of _CustomListImpl class +*/ + +#include +#include +#include +#include "FUi_ResourceSizeInfo.h" +#include "FUi_UiBuilder.h" +#include "FUiCtrl_CustomListItemFormatImpl.h" +#include "FUiCtrl_CustomListItemImpl.h" +#include "FUiCtrl_CustomListImpl.h" +#include "FUiCtrl_ListListener.h" +#include "FUiCtrl_ListItemBaseImpl.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUiCtrl_TableViewItemProvider.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +extern const int INVALID_INDEX; + +_CustomListItemDataProvider::_CustomListItemDataProvider(_CustomListImpl* pList) + : __pList(pList) +{ +} + +_CustomListItemDataProvider::~_CustomListItemDataProvider(void) +{ +} + +int +_CustomListItemDataProvider::GetItemCount(void) +{ + SysTryReturn(NID_UI_CTRL, __pList, -1, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Item provider not constructed properly."); + return __pList->GetItemCount(); +} + +TableViewItem* +_CustomListItemDataProvider::CreateItem(int index, int itemWidth) +{ + SysTryReturn(NID_UI_CTRL, __pList, null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Item provider not constructed properly."); + + CustomListItem* pCustomListItem = __pList->GetCustomListItemAt(-1, index); + SysTryReturn(NID_UI_CTRL, pCustomListItem, null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get an item at index(%d).", index); + + _CustomListItemImpl* pCustomListItemImpl = null; + pCustomListItemImpl = pCustomListItem->__pCustomListItemImpl; + SysTryReturn(NID_UI_CTRL, pCustomListItemImpl, null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. CustomListItem not yet constructed."); + + _TableViewItemParams tableViewItemParams; + tableViewItemParams.pItem = pCustomListItem; + tableViewItemParams.width = itemWidth; + tableViewItemParams.itemId = pCustomListItemImpl->itemId; + tableViewItemParams.groupIndex = -1; + tableViewItemParams.itemIndex = index; + tableViewItemParams.isDividerEnabled = __pList->_isDividerEnabled; + tableViewItemParams.pCheckBitmaps = __pList->_pCheckBitmaps; + tableViewItemParams.annexStyle = __pList->_annexStyle; + + result r = _CustomListItemImpl::CreateTableViewItem(tableViewItemParams); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + pCustomListItemImpl->__pTableViewItemData->AddTouchEventListener(*__pList); + + return pCustomListItemImpl->__pTableViewItemData; +} + +bool +_CustomListItemDataProvider::DeleteItem(const int itemIndex, TableViewItem* pItem) +{ + delete pItem; + + if (__pList->__directDelete == false) + { + CustomListItem* pCustomListItem = __pList->GetCustomListItemAt(-1, itemIndex); + pCustomListItem->__pCustomListItemImpl->__pTableViewItemData = null; + } + + return true; +} + +void +_CustomListItemDataProvider::UpdateItem(int itemIndex, TableViewItem* pItem) +{ + //return true; +} + +int +_CustomListItemDataProvider::GetDefaultItemHeight(void) +{ + SysTryReturn(NID_UI_CTRL, __pList, 0, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Item provider not constructed properly."); + + CustomListItem* pCustomListItem = __pList->GetCustomListItemAt(-1, 0); + SysTryReturn(NID_UI_CTRL, pCustomListItem, 0, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get first item"); + + _CustomListItemImpl* pCustomListItemImpl = null; + pCustomListItemImpl = pCustomListItem->__pCustomListItemImpl; + SysTryReturn(NID_UI_CTRL, pCustomListItemImpl, 0, E_SYSTEM, "[E_SYSTEM] A system error has occurred. CustomListItem not yet constructed."); + + return pCustomListItemImpl->height; +} + +_CustomListImpl* +_CustomListImpl::GetInstance(CustomList& customList) +{ + return static_cast<_CustomListImpl*>(customList._pControlImpl); +} + +const _CustomListImpl* +_CustomListImpl::GetInstance(const CustomList& customList) +{ + return static_cast(customList._pControlImpl); +} + +_CustomListImpl::_CustomListImpl(Control* pList, _TableView* pCore) + : _ListBaseImpl(pList, pCore) + , __pItemProvider(null) + , __directDelete(false) + +{ +} + +_CustomListImpl::~_CustomListImpl(void) +{ + RemoveAllFromItemsList(); + + __itemListenersList.RemoveAll(true); + + delete __pItemProvider; +} + +const char* +_CustomListImpl::GetPublicClassName(void) const +{ + return "CustomList"; +} + +const CustomList& +_CustomListImpl::GetPublic(void) const +{ + return static_cast(_ControlImpl::GetPublic()); +} + +CustomList& +_CustomListImpl::GetPublic(void) +{ + return static_cast(_ControlImpl::GetPublic()); +} + +const _TableView& +_CustomListImpl::GetCore(void) const +{ + return static_cast(_ControlImpl::GetCore()); +} + +_TableView& +_CustomListImpl::GetCore(void) +{ + return static_cast<_TableView&>(_ControlImpl::GetCore()); +} + +_CustomListImpl* +_CustomListImpl::CreateCustomListImplN(CustomList* pControl, const Rectangle& bounds, bool itemDivider) +{ + result r = E_SUCCESS; + + r = GET_SIZE_INFO(CustomList).CheckInitialSizeValidF(FloatDimension(bounds.width, bounds.height), _CONTROL_ORIENTATION_PORTRAIT); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), null, r, "[%s] Propagating.", GetErrorMessage(r)); + + _TableView* pCore = null; + _CustomListImpl* pImpl = null; + + pCore = _TableView::CreateTableViewN(TABLE_VIEW_STYLE_SIMPLE, itemDivider, TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT); + + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pCore, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + pImpl = new (std::nothrow) _CustomListImpl(pControl, pCore); + SysTryCatch(NID_UI_CTRL, pImpl, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + ClearLastResult(); + + return pImpl; + +CATCH: + delete pCore; + return null; +} + +result +_CustomListImpl::InitializeBounds(const Rectangle& rect) +{ + result r = E_SUCCESS; + + r = InitializeBoundsPropertiesF(GET_SIZE_INFO(CustomList), _CoordinateSystemUtils::ConvertToFloat(rect), GetCore().GetOrientation()); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +_CustomListImpl::AddCustomItemEventListener(const ICustomItemEventListener& listener) +{ + _ListListener* pListenersList = new (std::nothrow) _ListListener(); + SysTryReturn(NID_UI_CTRL, pListenersList, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pListenersList->pListener = const_cast(&listener); + + __itemListenersList.Add(*pListenersList); + + return E_SUCCESS; +} + +result +_CustomListImpl::RemoveCustomItemEventListener(const ICustomItemEventListener& listener) +{ + _ListListener* pListenersList = null; + result r = E_SYSTEM; + + int count = __itemListenersList.GetCount(); + + for (int itemListenerCount = 0; itemListenerCount < count; itemListenerCount++) + { + pListenersList = dynamic_cast<_ListListener*>(__itemListenersList.GetAt(itemListenerCount)); + + if ((pListenersList != null) && (pListenersList->pListener == &listener)) + { + r = E_SUCCESS; + __itemListenersList.RemoveAt(itemListenerCount, true); + break; + } + } + + return r; +} + +result +_CustomListImpl::Initialize(void) +{ + result r = E_SUCCESS; + + __pItemProvider = new (std::nothrow) _CustomListItemDataProvider(this); + SysTryReturnResult(NID_UI_CTRL, __pItemProvider != null, E_OUT_OF_MEMORY, "Memory allocation failed."); + + 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"); + + _TableViewItemProvider* pItemProvider = _TableViewItemProvider::CreateTableViewItemProviderN(style); + SysTryReturn(NID_UI_CTRL, pItemProvider != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = pItemProvider->SetSimpleStyleItemProvider(__pItemProvider); + + if (r != E_SUCCESS) + { + delete pItemProvider; + SysTryReturn(NID_UI_CTRL, false, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + r = GetCore().SetItemProvider(pItemProvider); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GetCore().AddTableViewItemEventListener(*this); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +_CustomListImpl::AddItem(const CustomListItem& item, int itemId) +{ + return InsertItemAt(GetItemCount(), item, itemId); +} + +result +_CustomListImpl::InsertItemAt(int index, const CustomListItem& item, int itemId) +{ + result r = E_SUCCESS; + + SysTryReturnResult(NID_UI_CTRL, (index >= 0 && index <= GetItemCount()), + E_INVALID_ARG, "The index %d is invalid.", index); + + item.__pCustomListItemImpl->itemId = itemId; + + r = InsertIntoItemsList(item, -1, index); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to insert an item."); + + if (GetCore().GetFirstDrawnFlag() == false) + { + r = GetCore().RefreshTableView(0, index, TABLE_VIEW_REFRESH_TYPE_ITEM_ADD); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] Propagating.",GetErrorMessage(r)); + } + + return r; + +CATCH: + RemoveFromItemsList(-1, index); + return E_SYSTEM; +} + +result +_CustomListImpl::SetItemAt(int index, const CustomListItem& item, int itemId) +{ + SysTryReturnResult(NID_UI_CTRL, (index >= 0 && index < GetItemCount()), + E_INVALID_ARG, "The index %d is invalid.", index); + + SysTryReturnResult(NID_UI_CTRL, (IsItemNew(item) == true), E_SYSTEM, "A system error has occurred. The item already exists."); + + result r = E_SUCCESS; + + item.__pCustomListItemImpl->__pTableViewItemData = GetTableViewItemAt(-1, index); + + _CheckElementModel* pOldCheckElement = GetCheckElementAt(-1, index); + _CheckBoxBitmapType oldCheckStatus = (pOldCheckElement) ? (pOldCheckElement->GetCheckBoxStatus()) : CHECK_BOX_UNCHECKED; + + item.__pCustomListItemImpl->itemId = itemId; + + _CheckElementModel* pCheckElement = item.__pCustomListItemImpl->GetCheckElement(); + + if (pCheckElement) + { + pCheckElement->SetCheckBoxStatus(oldCheckStatus); + } + + r = SetInItemsList(item, -1, index); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "A system error has occurred. Failed to set an item."); + + _TableViewItemUpdateParams updateParams; + updateParams.pItem = const_cast(&item); + updateParams.isDividerEnabled = _isDividerEnabled; + updateParams.pCheckBitmaps = _pCheckBitmaps; + updateParams.annexStyle = _annexStyle; + + r = _CustomListItemImpl::UpdateTableViewItem(updateParams); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to refresh an item."); + + if (GetCore().GetFirstDrawnFlag() == false) + { + r = GetCore().RefreshTableView(0, index, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "Propagating."); + } + + return r; +} + +result +_CustomListImpl::RemoveItemAt(int index) +{ + result r = E_SUCCESS; + int groupIndex = 0; + + SysTryReturnResult(NID_UI_CTRL, (index >= 0 && index < GetItemCount()), + E_INVALID_ARG, "The index %d is invalid.", index); + + r = RemoveFromItemsList(-1, index); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "A system error has occurred. Failed to remove an item."); + + __directDelete = true; + + if (GetCore().GetFirstDrawnFlag() == false) + { + r = GetCore().RefreshTableView(groupIndex, index, TABLE_VIEW_REFRESH_TYPE_ITEM_REMOVE); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "Propagating."); + } + + __directDelete = false; + + return r; +} + +result +_CustomListImpl::RemoveAllItems(void) +{ + result r = E_SUCCESS; + result finalResult = E_SUCCESS; + + for (int index = GetItemCount() - 1; index >= 0; index--) + { + r = RemoveItemAt(index); + + if (r != E_SUCCESS) + { + finalResult = r; + SysLog(NID_UI_CTRL, "[E_SYSTEM] A system error has occurred. Item at %d index not removed successfully.", index); + } + } + + return finalResult; +} + +result +_CustomListImpl::SetItemEnabled(int index, bool enable) +{ + result r = E_SUCCESS; + + SysTryReturnResult(NID_UI_CTRL, (index >= 0 && index < GetItemCount()), + E_SYSTEM, "[E_SYSTEM] A system error has occurred. The index %d is invalid.", index); + + r = GetCore().SetItemEnabled(0, index, enable); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + DrawItem(-1, index); + + return r; +} + +bool +_CustomListImpl::IsItemEnabled(int index) const +{ + return GetCore().IsItemEnabled(0, index); +} + +result +_CustomListImpl::SetItemChecked(int groupIndex, int itemIndex, bool check) +{ + return SetItemChecked(itemIndex, check); +} + +result +_CustomListImpl::SetItemChecked(int index, bool check) +{ + SysTryReturnResult(NID_UI_CTRL, (index >= 0 && index < GetItemCount()), E_SYSTEM, "[E_SYSTEM] A system error has occurred. The index %d is invalid.", index); + + SysTryReturnResult(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL), E_SYSTEM, "[E_SYSTEM] A system error has occurred. List style should not be TABLE_VIEW_ANNEX_STYLE_NORMAL"); + + if (IsItemChecked(index) == check) + { + return E_SUCCESS; + } + + SysTryReturnResult(NID_UI_CTRL, (IsItemEnabled(index)), E_SYSTEM, "[E_SYSTEM] A system error has occurred. The List item is not enabled at index %d.", index); + + if (_annexStyle == TABLE_VIEW_ANNEX_STYLE_RADIO) + { + if (check) + { + if (_currentRadioIndex != -1) + { + _CheckElementModel* pOldCheckElementModel = GetCheckElementAt(-1, _currentRadioIndex); + SysTryReturnResult(NID_UI_CTRL, pOldCheckElementModel, E_SYSTEM, "A system error has occurred. tableViewItem is not constructed correctly."); + + pOldCheckElementModel->SetCheckBoxStatus(CHECK_BOX_UNCHECKED); + + _TableViewItemData* pOldRadioItem = GetTableViewItemAt(-1, _currentRadioIndex); + SysTryReturnResult(NID_UI_CTRL, pOldRadioItem, E_SYSTEM, "A system error has occurred. Failed to get item at %d index.", _currentRadioIndex); + + pOldRadioItem->Invalidate(true); + } + _currentRadioIndex = index; + } + else + { + _currentRadioIndex = -1; + } + } + + _CheckElementModel* pCheckElementModel = GetCheckElementAt(-1, index); + SysTryReturnResult(NID_UI_CTRL, pCheckElementModel, E_SYSTEM, "A system error has occurred. TableViewItem is not constructed correctly."); + + pCheckElementModel->SetCheckBoxStatus((_CheckBoxBitmapType)check); + + DrawItem(-1, index); + + return E_SUCCESS; +} + +bool +_CustomListImpl::IsItemChecked(int groupIndex, int subIndex) const +{ + return IsItemChecked(subIndex); +} + +bool +_CustomListImpl::IsItemChecked(int index) const +{ + SysTryReturn(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL), + false, E_SYSTEM, "[E_SYSTEM] A system error has occurred. list style should not be TABLE_VIEW_ANNEX_STYLE_NORMAL."); + + SysTryReturn(NID_UI_CTRL, (index >= 0 && index < GetItemCount()), + false, E_INVALID_ARG, "[E_INVALID_ARG] The index %d is invalid.", index); + + const _CheckElementModel* pCheckElement = GetCheckElementAt(-1, index); + SysTryReturn(NID_UI_CTRL, pCheckElement, false, E_SYSTEM, "[E_SYSTEM] A system error has occurred. CheckElement is not constructed properly."); + + return (bool)pCheckElement->GetCheckBoxStatus(); +} + +result +_CustomListImpl::SetAllItemsChecked(bool check) +{ + SysTryReturnResult(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL), E_SYSTEM, "[E_SYSTEM] A system error has occurred. List style should not be TABLE_VIEW_ANNEX_STYLE_NORMAL"); + SysTryReturnResult(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_RADIO), E_SYSTEM, "[E_SYSTEM] A system error has occurred. List style should not be TABLE_VIEW_ANNEX_STYLE_RADIO"); + + _CheckElementModel* pCheckElement = null; + + for (int index = 0; index < GetItemCount(); index++) + { + if (IsItemEnabled(index)) + { + pCheckElement = GetCheckElementAt(-1, index); + SysTryReturnResult(NID_UI_CTRL, (pCheckElement != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Checkbox element not created"); + + pCheckElement->SetCheckBoxStatus((_CheckBoxBitmapType)check); + } + } + + GetCore().Draw(); + + return E_SUCCESS; +} + +result +_CustomListImpl::RemoveAllCheckedItems(void) +{ + result r = E_SUCCESS; + result finalResult = E_SUCCESS; + + SysTryReturnResult(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL), E_SYSTEM, "[E_SYSTEM] A system error has occurred. List style should not be TABLE_VIEW_ANNEX_STYLE_NORMAL"); + SysTryReturnResult(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_RADIO), E_SYSTEM, "[E_SYSTEM] A system error has occurred. List style should not be TABLE_VIEW_ANNEX_STYLE_RADIO"); + + for (int index = GetItemCount() -1; index >= 0; index--) + { + if (IsItemChecked(index)) + { + r = RemoveItemAt(index); + + if (r != E_SUCCESS) + { + finalResult = r; + SysLog(NID_UI_CTRL, "Item at %d index not removed successfully.", index); + } + } + } + + return finalResult; +} + +int +_CustomListImpl::GetFirstCheckedItemIndex(void) const +{ + SysTryReturn(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL), INVALID_INDEX, E_SYSTEM, "[E_SYSTEM] A system error has occurred. List style should not be TABLE_VIEW_ANNEX_STYLE_NORMAL"); + + for (int index = 0; index < GetItemCount(); index++) + { + if (IsItemChecked(index)) + { + SetLastResult(E_SUCCESS); + return index; + } + } + SetLastResult(E_SUCCESS); + return INVALID_INDEX; +} + +int +_CustomListImpl::GetLastCheckedItemIndex(void) const +{ + SysTryReturn(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL), INVALID_INDEX, E_SYSTEM, "[E_SYSTEM] A system error has occurred. List style should not be TABLE_VIEW_ANNEX_STYLE_NORMAL"); + + for (int index = GetItemCount() - 1; index >= 0; index--) + { + if (IsItemChecked(index)) + { + SetLastResult(E_SUCCESS); + return index; + } + } + SetLastResult(E_SUCCESS); + return INVALID_INDEX; +} + +int +_CustomListImpl::GetNextCheckedItemIndexAfter(int index) const +{ + SysTryReturn(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL), INVALID_INDEX, E_SYSTEM, "[E_SYSTEM] A system error has occurred. List style should not be TABLE_VIEW_ANNEX_STYLE_NORMAL"); + + SysTryReturn(NID_UI_CTRL, (index >= 0 && index < GetItemCount()), + INVALID_INDEX, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The index %d is invalid.", index); + + for (int itemCount = index + 1; itemCount < GetItemCount(); itemCount++) + { + if (IsItemChecked(itemCount)) + { + SetLastResult(E_SUCCESS); + return itemCount; + } + } + SetLastResult(E_SUCCESS); + return INVALID_INDEX; +} + +int +_CustomListImpl::GetItemIndexFromItemId(int itemId) const +{ + for (int index = 0; index < GetItemCount(); index++) + { + const CustomListItem* pCustomListItem = GetCustomListItemAt(-1, index); + SysTryReturn(NID_UI_CTRL, pCustomListItem, INVALID_INDEX, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get an item at index(%d).", index); + + SysTryReturn(NID_UI_CTRL, pCustomListItem->__pCustomListItemImpl, INVALID_INDEX, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get an item at index(%d).", index); + + if (pCustomListItem->__pCustomListItemImpl->itemId == itemId) + { + SetLastResult(E_SUCCESS); + return index; + } + } + SetLastResult(E_SUCCESS); + return INVALID_INDEX; +} + +void +_CustomListImpl::ScrollToBottom(void) +{ + GetCore().SetBottomDrawnItemIndex(0 ,GetItemCount() - 1); + GetCore().Draw(); + return; +} +void +_CustomListImpl::ScrollToTop(void) +{ + GetCore().SetTopDrawnItemIndex(0,0); + GetCore().Draw(); + return; +} + +result +_CustomListImpl::ScrollToTop(int index) +{ + SysTryReturnResult(NID_UI_CTRL, (index >= 0 && index < GetItemCount()), E_INVALID_ARG, "Invalid index(%d).", index); + + result r = GetCore().SetTopDrawnItemIndex(0, index); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + GetCore().Draw(); + + return r; +} + +result +_CustomListImpl::RefreshItem(int index) +{ + SysTryReturnResult(NID_UI_CTRL, (index >= 0 && index < GetItemCount()), E_INVALID_ARG, "Invalid index(%d).", index); + + int topItemIndex = -1; + int bottomItemIndex = -1; + int groupIndex = -1; + + GetCore().GetTopDrawnItemIndex(groupIndex, topItemIndex); + GetCore().GetBottomDrawnItemIndex(groupIndex, bottomItemIndex); + + SysTryReturnResult(NID_UI_CTRL, (index >= topItemIndex && index <= bottomItemIndex), E_INVALID_OPERATION, + "Index should be within drawn item range %d.", index); + + result r = E_SUCCESS; + + _TableViewItemUpdateParams updateParams; + updateParams.pItem = GetCustomListItemAt(-1, index); + updateParams.isDividerEnabled = _isDividerEnabled; + updateParams.pCheckBitmaps = _pCheckBitmaps; + updateParams.annexStyle = _annexStyle; + + r = _CustomListItemImpl::UpdateTableViewItem(updateParams); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to refresh an item."); + + DrawItem(-1, index); + + return E_SUCCESS; +} + +int +_CustomListImpl::GetItemIdAt(int index) const +{ + SysTryReturn(NID_UI_CTRL, (index >= 0 && index < GetItemCount()), + -1, E_INVALID_ARG, "[E_INVALID_ARG] The index %d is invalid.", index); + + const CustomListItem* pCustomListItem = GetCustomListItemAt(-1, index); + SysTryReturn(NID_UI_CTRL, pCustomListItem, -1, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get an item at index(%d).", index); + + SysTryReturn(NID_UI_CTRL, pCustomListItem->__pCustomListItemImpl, -1, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get an item at index(%d).", index); + + SetLastResult(E_SUCCESS); + return pCustomListItem->__pCustomListItemImpl->itemId; +} + +void +_CustomListImpl::OnTableViewItemStateChanged(_TableView& tableView, int itemIndex, _TableViewItem* pItem, TableViewItemStatus status) +{ + ItemStatus itemStatus = ITEM_HIGHLIGHTED; + + switch (status) + { + case TABLE_VIEW_ITEM_STATUS_SELECTED: + itemStatus = ITEM_SELECTED; + break; + case TABLE_VIEW_ITEM_STATUS_HIGHLIGHTED: + itemStatus = ITEM_HIGHLIGHTED; + break; + case TABLE_VIEW_ITEM_STATUS_CHECKED: + itemStatus = ITEM_CHECKED; + break; + case TABLE_VIEW_ITEM_STATUS_UNCHECKED: + itemStatus = ITEM_UNCHECKED; + break; + default: + SetLastResult(E_SYSTEM); + break; + } + + if ((!_isDividerEnabled) && (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL)) + { + bool isChecked = IsItemChecked(itemIndex); + + if (isChecked) + { + itemStatus = ITEM_UNCHECKED; + } + else + { + itemStatus = ITEM_CHECKED; + } + + SetItemChecked(itemIndex, !isChecked); + } + + ProcessItemStateChange(-1, itemIndex, itemStatus); + return; +} + +void +_CustomListImpl::OnTableViewContextItemActivationStateChanged(_TableView& tableView, int itemIndex, _TableViewItem* pContextItem, bool activated) +{ + return; +} + +void +_CustomListImpl::OnTableViewItemReordered(_TableView& tableView, int itemIndexFrom, int itemIndexTo) +{ + return; +} + +void +_CustomListImpl::OnGroupedTableViewGroupItemStateChanged(_TableView& tableView, int groupIndex, _TableViewItem* pItem, TableViewItemStatus status) +{ + return; +} + +void +_CustomListImpl::OnGroupedTableViewItemStateChanged(_TableView& tableView, int groupIndex, int itemIndex, _TableViewItem* pItem, TableViewItemStatus status) +{ + return; +} + +void +_CustomListImpl::OnGroupedTableViewContextItemActivationStateChanged(_TableView& tableView, int groupIndex, int itemIndex, _TableViewItem* pContextItem, bool activated) +{ + return; +} + +void +_CustomListImpl::OnGroupedTableViewItemReordered(_TableView& tableView, int groupIndexFrom, int itemIndexFrom, int groupIndexTo, int itemIndexTo) +{ + return; +} + +void +_CustomListImpl::OnSectionTableViewItemStateChanged(_TableView& tableView, int sectionIndex, int itemIndex, _TableViewItem* pItem, TableViewItemStatus status) +{ + return; +} + +void +_CustomListImpl::OnSectionTableViewContextItemActivationStateChanged(_TableView& tableView, int sectionIndex, int itemIndex, _TableViewItem* pContextItem, bool activated) +{ + return; +} + +void +_CustomListImpl::OnTableViewItemSwept(_TableView& tableView, int groupIndex, int itemIndex, TableViewSweepDirection direction) +{ + return; +} + +void +_CustomListImpl::ProcessItemStateChange(int groupIndex, int index, int elementId, ItemStatus itemStatus) +{ + int itemId = GetItemIdAt(index); + + _ListListener* pListenerList = null; + ICustomItemEventListener* pEventListener = null; + + int count = __itemListenersList.GetCount(); + for (int listenerCount = 0; listenerCount < count; listenerCount++) + { + pListenerList = dynamic_cast<_ListListener*>(__itemListenersList.GetAt(listenerCount)); + SysTryReturnVoidResult(NID_UI_CTRL, (pListenerList != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get Listener."); + + pEventListener = dynamic_cast(pListenerList->pListener); + SysTryReturnVoidResult(NID_UI_CTRL, (pEventListener != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get Listener."); + + pEventListener->OnItemStateChanged(GetPublic(), index, itemId, elementId, itemStatus); + } + SetLastResult(E_SUCCESS); + + return; +} + +void +_CustomListImpl::ProcessItemStateChange(int groupIndex, int index, ItemStatus itemStatus) +{ + int itemId = GetItemIdAt(index); + + _ListListener* pListenerList = null; + ICustomItemEventListener* pEventListener = null; + + int count = __itemListenersList.GetCount(); + for (int listenerCount = 0; listenerCount < count; listenerCount++) + { + pListenerList = dynamic_cast<_ListListener*>(__itemListenersList.GetAt(listenerCount)); + SysTryReturnVoidResult(NID_UI_CTRL, (pListenerList != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get Listener."); + + pEventListener = dynamic_cast(pListenerList->pListener); + SysTryReturnVoidResult(NID_UI_CTRL, (pEventListener != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get Listener."); + + pEventListener->OnItemStateChanged(GetPublic(), index, itemId, itemStatus); + } + SetLastResult(E_SUCCESS); + + return; +} + +class _CustomListMaker + : public _UiBuilderControlMaker +{ +public: + _CustomListMaker(_UiBuilder* uibuilder) + : _UiBuilderControlMaker(uibuilder){}; + virtual ~_CustomListMaker(){}; + static _UiBuilderControlMaker* + GetInstance(_UiBuilder* uibuilder) + { + _CustomListMaker* pCustomListMaker = new (std::nothrow) _CustomListMaker(uibuilder); + return pCustomListMaker; + }; +protected: + virtual Control* + Make(_UiBuilderControl* pControl) + { + result r = E_SYSTEM; + _UiBuilderControlLayout* pControlProperty = null; + CustomList* pCustomList = null; + + Tizen::Base::String elementString; + Color color; + Rectangle rect; + + CustomListStyle style = CUSTOM_LIST_STYLE_NORMAL; + bool isItemDivider = true; + + GetProperty(pControl, &pControlProperty); + + if (pControlProperty == null) + { + return null; + } + + pCustomList = new (std::nothrow) CustomList(); + if (pCustomList == null) + { + return null; + } + + rect = pControlProperty->GetRect(); + + Tizen::Base::String styleString; + styleString = pControlProperty->GetStyle(); + + if (styleString.Equals(L"CUSTOM_LIST_STYLE_NORMAL", false)) + { + style = CUSTOM_LIST_STYLE_NORMAL; + } + else if (styleString.Equals(L"CUSTOM_LIST_STYLE_RADIO", false)) + { + style = CUSTOM_LIST_STYLE_RADIO; + } + else if (styleString.Equals(L"CUSTOM_LIST_STYLE_RADIO_WITH_DIVIDER", false)) + { + style = CUSTOM_LIST_STYLE_RADIO_WITH_DIVIDER; + } + else if (styleString.Equals(L"CUSTOM_LIST_STYLE_MARK", false)) + { + style = CUSTOM_LIST_STYLE_MARK; + } + else if (styleString.Equals(L"CUSTOM_LIST_STYLE_MARK_WITH_DIVIDER", false)) + { + style = CUSTOM_LIST_STYLE_MARK_WITH_DIVIDER; + } + else if (styleString.Equals(L"CUSTOM_LIST_STYLE_ONOFF", false)) + { + style = CUSTOM_LIST_STYLE_ONOFF; + } + else if (styleString.Equals(L"CUSTOM_LIST_STYLE_ONOFF_WITH_DIVIDER", false)) + { + style = CUSTOM_LIST_STYLE_ONOFF_WITH_DIVIDER; + } + else + { + style = CUSTOM_LIST_STYLE_NORMAL; + } + + //Construct + if (pControl->GetElement(L"itemDivider", elementString)) + { + if (elementString.Equals(L"true", false)) + { + isItemDivider = true; + } + else + { + isItemDivider = false; + } + } + + r = pCustomList->Construct(rect, style, isItemDivider); + if (r != E_SUCCESS) + { + delete pCustomList; + return null; + } + + if (pControl->GetElement(L"textOfEmptyList", elementString)) + { + pCustomList->SetTextOfEmptyList(elementString); + } + + if (pControl->GetElement(L"colorOfEmptyListText", elementString)) + { + ConvertStringToColor(elementString, color); + pCustomList->SetTextColorOfEmptyList(color); + } + + return pCustomList; + } + +};// _ButtonMaker + +_CustomListRegister::_CustomListRegister(void) +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + + if (pUiBuilderControlTableManager) + { + pUiBuilderControlTableManager->RegisterControl(L"CustomList", _CustomListMaker::GetInstance); + } +} +_CustomListRegister::~_CustomListRegister(void) +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + + if (pUiBuilderControlTableManager) + { + pUiBuilderControlTableManager->UnregisterControl(L"CustomList"); + } +} +static _CustomListRegister CustomListRegisterToUiBuilder; +}}} //Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_CustomListItemFormatImpl.cpp b/src/ui/controls/FUiCtrl_CustomListItemFormatImpl.cpp new file mode 100644 index 0000000..73c1d21 --- /dev/null +++ b/src/ui/controls/FUiCtrl_CustomListItemFormatImpl.cpp @@ -0,0 +1,356 @@ +// +// 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_CustomListItemFormatImpl.cpp +* @brief This file contains implementation of _CustomListItemFormatImpl class +*/ + +#include +#include "FUiCtrl_CustomListItemFormatImpl.h" +#include "FUi_ResourceManager.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Base::Collection; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_ElementFormatData::_ElementFormatData(void) + : elementId(-1) + , textSize(0) + , enable(false) +{ +} + +_ElementFormatData::~_ElementFormatData(void) +{ +} + +_CustomListItemFormatImpl::_CustomListItemFormatImpl(void) +{ +} + +_CustomListItemFormatImpl::~_CustomListItemFormatImpl(void) +{ + elementFormatDataList.RemoveAll(true); +} + +_CustomListItemFormatImpl* +_CustomListItemFormatImpl::CreateInstanceN(void) +{ + _CustomListItemFormatImpl* pImpl = new (std::nothrow) _CustomListItemFormatImpl(); + SysTryReturn(NID_UI_CTRL, pImpl, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + return pImpl; +} + +_ElementFormatData* +_CustomListItemFormatImpl::GetElementFormatById(int elementId) +{ + for (int elementCount = 0; elementCount < elementFormatDataList.GetCount(); elementCount++) + { + _ElementFormatData* pElementFormatData = dynamic_cast<_ElementFormatData*>(elementFormatDataList.GetAt(elementCount)); + SysTryReturn(NID_UI_CTRL, pElementFormatData, null, E_SYSTEM, "Invalid format data."); + + if (pElementFormatData->elementId == elementId) + { + return pElementFormatData; + } + } + + return null; +} + +_ElementFormatData* +_CustomListItemFormatImpl::CreateElementN(int elementId) +{ + _ElementFormatData* pElementFormatData = new (std::nothrow) _ElementFormatData(); + SysTryReturn(NID_UI_CTRL, pElementFormatData, null, E_OUT_OF_MEMORY, "Memory allocation failed."); + + pElementFormatData->elementId = elementId; + + GET_SHAPE_CONFIG(LIST::TEXT_ELEMENT_FONTSIZE_DEFAULT, _CONTROL_ORIENTATION_PORTRAIT, pElementFormatData->textSize); + + GET_COLOR_CONFIG(LIST::ELEMENT_TEXT_NORMAL, pElementFormatData->normalTextColor); + GET_COLOR_CONFIG(LIST::ELEMENT_TEXT_NORMAL, pElementFormatData->highlightedTextColor); + GET_COLOR_CONFIG(LIST::ELEMENT_TEXT_NORMAL, pElementFormatData->focusedTextColor); + + return pElementFormatData; +} + +result +_CustomListItemFormatImpl::AddElement(int elementId, const Rectangle& rect) +{ + _ElementFormatData* pElementFormatData = GetElementFormatById(elementId); + result r = E_SUCCESS; + + if (!pElementFormatData) + { + pElementFormatData = CreateElementN(elementId); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, pElementFormatData, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = elementFormatDataList.Add(*pElementFormatData); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + GET_SHAPE_CONFIG(LIST::TEXT_ELEMENT_FONTSIZE_DEFAULT, _CONTROL_ORIENTATION_PORTRAIT, pElementFormatData->textSize); + } + + pElementFormatData->rect = rect; + + return r; +} + +result +_CustomListItemFormatImpl::AddElement(int elementId, const Rectangle& rect, int textSize) +{ + _ElementFormatData* pElementFormatData = GetElementFormatById(elementId); + result r = E_SUCCESS; + + if (!pElementFormatData) + { + pElementFormatData = CreateElementN(elementId); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, pElementFormatData, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = elementFormatDataList.Add(*pElementFormatData); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + pElementFormatData->rect = rect; + pElementFormatData->textSize = textSize; + + return r; +} + +result +_CustomListItemFormatImpl::AddElement(int elementId, const Rectangle& rect, int textSize, const Color& normalTextColor, const Color& focusedTextColor) +{ + _ElementFormatData* pElementFormatData = GetElementFormatById(elementId); + result r = E_SUCCESS; + + if (!pElementFormatData) + { + pElementFormatData = CreateElementN(elementId); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, pElementFormatData, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = elementFormatDataList.Add(*pElementFormatData); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + pElementFormatData->rect = rect; + pElementFormatData->textSize = textSize; + + pElementFormatData->normalTextColor = normalTextColor; + pElementFormatData->focusedTextColor = focusedTextColor; + pElementFormatData->highlightedTextColor = normalTextColor; + + return r; +} + +result +_CustomListItemFormatImpl::AddElement(int elementId, const Rectangle& rect, int textSize, const Color& normalTextColor, const Color& focusedTextColor, const Color& highlightedTextColor) +{ + _ElementFormatData* pElementFormatData = GetElementFormatById(elementId); + result r = E_SUCCESS; + + if (!pElementFormatData) + { + pElementFormatData = CreateElementN(elementId); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, pElementFormatData, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = elementFormatDataList.Add(*pElementFormatData); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + pElementFormatData->rect = rect; + pElementFormatData->textSize = textSize; + + pElementFormatData->normalTextColor = normalTextColor; + pElementFormatData->focusedTextColor = focusedTextColor; + pElementFormatData->highlightedTextColor = highlightedTextColor; + + return r; +} + +Rectangle +_CustomListItemFormatImpl::GetElement(int elementId) const +{ + _ElementFormatData* pElementFormatData = null; + for (int count = 0; count < elementFormatDataList.GetCount(); count++) + { + pElementFormatData = dynamic_cast<_ElementFormatData*>(const_cast(elementFormatDataList.GetAt(count))); + + if (pElementFormatData != null && pElementFormatData->elementId == elementId) + { + return pElementFormatData->rect; + } + } + + return Rectangle(0, 0, -1, -1); +} + +int +_CustomListItemFormatImpl::GetFirstElementId(void) +{ + _ElementFormatData* pElementFormatData = null; + + for (int count = 0; count < elementFormatDataList.GetCount(); count++) + { + pElementFormatData = dynamic_cast<_ElementFormatData*>(const_cast(elementFormatDataList.GetAt(count))); + if (pElementFormatData != null) + { + return pElementFormatData->elementId; + } + } + + return -1; +} + +int +_CustomListItemFormatImpl::GetFirstEnabledElementId(void) +{ + _ElementFormatData* pElementFormatData = null; + + for (int count = 0; count < elementFormatDataList.GetCount(); count++) + { + pElementFormatData = dynamic_cast<_ElementFormatData*>(const_cast(elementFormatDataList.GetAt(count))); + if (pElementFormatData != null && pElementFormatData->enable) + { + return pElementFormatData->elementId; + } + } + + return -1; +} + +int +_CustomListItemFormatImpl::GetNextElementId(int elementId) +{ + _ElementFormatData* pElementFormatData = null; + int nextElementId = -1; + bool found = false; + + for (int count = 0; count < elementFormatDataList.GetCount(); count++) + { + pElementFormatData = dynamic_cast<_ElementFormatData*>(elementFormatDataList.GetAt(count)); + if (pElementFormatData != null) + { + if (elementId == pElementFormatData->elementId) + { + found = true; + } + else if (found == true) + { + nextElementId = pElementFormatData->elementId; + break; + } + } + } + return nextElementId; +} + +int +_CustomListItemFormatImpl::GetNextEnabledElementId(int elementId) +{ + _ElementFormatData* pElementFormatData = null; + int nextEnabledElementId = -1; + bool found = false; + + for (int count = 0; count < elementFormatDataList.GetCount(); count++) + { + pElementFormatData = dynamic_cast<_ElementFormatData*>(elementFormatDataList.GetAt(count)); + if (pElementFormatData != null) + { + if (pElementFormatData->elementId == elementId) + { + found = true; + } + else if (pElementFormatData->enable && found == true) + { + nextEnabledElementId = pElementFormatData->elementId; + break; + } + } + } + + return nextEnabledElementId; +} + +int +_CustomListItemFormatImpl::GetPreviousEnabledElementId(int elementId) +{ + _ElementFormatData* pElementFormatData = null; + int prevEnabledElementId = -1; + + for (int count = 0; count < elementFormatDataList.GetCount(); count++) + { + pElementFormatData = dynamic_cast<_ElementFormatData*>(elementFormatDataList.GetAt(count)); + if (pElementFormatData != null) + { + if (pElementFormatData->elementId != elementId) + { + prevEnabledElementId = pElementFormatData->elementId; + } + else if (pElementFormatData->enable && pElementFormatData->elementId == elementId) + { + break; + } + } + } + + return prevEnabledElementId; +} + +bool +_CustomListItemFormatImpl::IsElementEventEnabled(int elementId) +{ + _ElementFormatData* pElementFormatData = null; + + for (int count = 0; count < elementFormatDataList.GetCount(); count++) + { + pElementFormatData = dynamic_cast<_ElementFormatData*>(const_cast(elementFormatDataList.GetAt(count))); + if (pElementFormatData != null && pElementFormatData->elementId == elementId) + { + return pElementFormatData->enable; + } + } + + return false; +} + +void +_CustomListItemFormatImpl::SetElementEventEnabled(int elementId, bool enable) +{ + _ElementFormatData* pElementFormatData = null; + + for (int count = 0; count < elementFormatDataList.GetCount(); count++) + { + pElementFormatData = dynamic_cast<_ElementFormatData*>(const_cast(elementFormatDataList.GetAt(count))); + if (pElementFormatData != null && pElementFormatData->elementId == elementId) + { + pElementFormatData->enable = enable; + } + } + + return; +} + +}}} //Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_CustomListItemImpl.cpp b/src/ui/controls/FUiCtrl_CustomListItemImpl.cpp new file mode 100644 index 0000000..7f7ff02 --- /dev/null +++ b/src/ui/controls/FUiCtrl_CustomListItemImpl.cpp @@ -0,0 +1,1175 @@ +// +// 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_CustomListItemImpl.cpp + * @brief This file contains implementation of _CustomListItemImpl class + */ + +#include +#include +#include +#include "FUiCtrl_CustomListItemImpl.h" +#include "FUiCtrl_CustomListItemFormatImpl.h" +#include "FUiCtrl_PanelImpl.h" + + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Base::Collection; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Graphics::_Text; + +namespace Tizen { namespace Ui { namespace Controls +{ + +const int INVALID_INDEX = -1; + +_TableViewItemData::_TableViewItemData(void) + : itemIndex(-1) + , groupIndex(-1) +{ +} + +_TableViewItemData::~_TableViewItemData(void) +{ +} + +void +_TableViewItemData::GetIndex(int& mainIndex, int& subIndex) const +{ + mainIndex = groupIndex; + subIndex = itemIndex; +} + +result +_TableViewItemData::SetEnabled(bool enable) +{ + Control* pControl = null; + + for (int count = 0; count < GetControlCount(); count++) + { + pControl = GetControl(count); + + if (pControl) + { + pControl->SetEnabled(enable); + } + } + + return E_SUCCESS; +} + +_TableViewGroupItemData::_TableViewGroupItemData(void) + : groupIndex(-1) +{ +} + +_TableViewGroupItemData::~_TableViewGroupItemData(void) +{ +} + +void +_TableViewGroupItemData::GetIndex(int& mainIndex, int& subIndex) const +{ + mainIndex = groupIndex; + subIndex = -1; +} + +result +_TableViewGroupItemData::SetEnabled(bool enable) +{ + Control* pControl = null; + + for (int count = 0; count < GetControlCount(); count++) + { + pControl = GetControl(count); + + if (pControl) + { + pControl->SetEnabled(enable); + } + } + + return E_SUCCESS; +} + +_CustomListItemImpl::_CustomListItemImpl(int itemHeight) + : height(itemHeight) + , itemId(LIST_ITEM_UNSPECIFIED_ID) + , __pTableViewItemData(null) + , __pTableViewGroupItemData(null) + , __pSubItemsList(null) + , __pTextSlideTimer(null) + , __isMoved(false) +{ + for (int i = 0; i <= CUSTOM_LIST_ITEM_STATUS_FOCUSED; i++) + { + __pBitmaps[i] = null; + } +} + +_CustomListItemImpl::~_CustomListItemImpl(void) +{ + for (int i = 0; i <= CUSTOM_LIST_ITEM_STATUS_FOCUSED; i++) + { + delete __pBitmaps[i]; + } + + elements.RemoveAll(true); +} + +_CustomListItemImpl* +_CustomListItemImpl::CreateInstanceN(int itemHeight) +{ + _CustomListItemImpl* pImpl = new (std::nothrow) _CustomListItemImpl(itemHeight); + SysTryReturn(NID_UI_CTRL, pImpl, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + SetLastResult(E_SUCCESS); + return pImpl; +} + +void +_CustomListItemImpl::RemoveElement(int elementId) +{ + _ElementBaseModel* pBaseModel = GetElementModelById(elementId); + elements.Remove(*pBaseModel, true); +} + +result +_CustomListItemImpl::SetCheckBox(int elementId) +{ + _CheckElementModel* pCheckElement = null; + _ElementBaseModel* pBaseModel = GetElementModelById(elementId); + + if (pBaseModel && pBaseModel->_elementType != LIST_ITEM_ELEMENT_TYPE_CHECKBOX) + { + return E_SYSTEM; + } + + pCheckElement = new (std::nothrow) _CheckElementModel(); + SysTryReturn(NID_UI_CTRL, pCheckElement, E_SYSTEM, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pCheckElement->_elementId = elementId; + pCheckElement->_elementType = LIST_ITEM_ELEMENT_TYPE_CHECKBOX; + + elements.Add(*pCheckElement); + return E_SUCCESS; +} + +result +_CustomListItemImpl::SetElement(int elementId, const Bitmap& normalBitmap, const Bitmap* pFocusedBitmap, const Bitmap* pHighlightedBitmap) +{ + _ElementBaseModel* pBaseModel = GetElementModelById(elementId); + if (pBaseModel && pBaseModel->_elementType != LIST_ITEM_ELEMENT_TYPE_BITMAP) + { + RemoveElement(elementId); + } + + result r = E_SUCCESS; + _BitmapElementModel* pBitmapElement = dynamic_cast<_BitmapElementModel*>(pBaseModel); + + if (!pBitmapElement) + { + pBitmapElement = new (std::nothrow) _BitmapElementModel(); + SysTryReturnResult(NID_UI_CTRL, pBitmapElement, E_OUT_OF_MEMORY, "Memory allocation failed."); + + pBitmapElement->_elementId = elementId; + pBitmapElement->_elementType = LIST_ITEM_ELEMENT_TYPE_BITMAP; + elements.Add(*pBitmapElement); + } + else + { + delete pBitmapElement->__pBitmap[CUSTOM_LIST_ITEM_STATUS_NORMAL]; + delete pBitmapElement->__pBitmap[CUSTOM_LIST_ITEM_STATUS_SELECTED]; + delete pBitmapElement->__pBitmap[CUSTOM_LIST_ITEM_STATUS_FOCUSED]; + } + + pBitmapElement->__pBitmap[CUSTOM_LIST_ITEM_STATUS_NORMAL] = _BitmapImpl::CloneN(normalBitmap); + + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (pFocusedBitmap) + { + pBitmapElement->__pBitmap[CUSTOM_LIST_ITEM_STATUS_FOCUSED] = _BitmapImpl::CloneN(*pFocusedBitmap); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + pBitmapElement->__pBitmap[CUSTOM_LIST_ITEM_STATUS_FOCUSED] = null; + } + + if (pHighlightedBitmap) + { + pBitmapElement->__pBitmap[CUSTOM_LIST_ITEM_STATUS_SELECTED] = _BitmapImpl::CloneN(*pHighlightedBitmap); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + pBitmapElement->__pBitmap[CUSTOM_LIST_ITEM_STATUS_SELECTED] = null; + } + + return E_SUCCESS; +} + +result +_CustomListItemImpl::SetElement(int elementId, const String& text) +{ + _ElementBaseModel* pBaseModel = GetElementModelById(elementId); + if (pBaseModel && pBaseModel->_elementType != LIST_ITEM_ELEMENT_TYPE_TEXT) + { + RemoveElement(elementId); + } + + _TextElementModel* pTextElement = dynamic_cast<_TextElementModel*>(pBaseModel); + + if (!pTextElement) + { + pTextElement = new (std::nothrow) _TextElementModel(text); + SysTryReturnResult(NID_UI_CTRL, pTextElement, E_OUT_OF_MEMORY, "Memory allocation failed."); + + pTextElement->_elementType = LIST_ITEM_ELEMENT_TYPE_TEXT; + pTextElement->_elementId = elementId; + + elements.Add(*pTextElement); + } + else + { + pTextElement->__text = text; + } + + return E_SUCCESS; +} + +result +_CustomListItemImpl::SetElement(int elementId, const Bitmap& normalBitmap, const Bitmap* pFocusedBitmap) +{ + return SetElement(elementId, normalBitmap, pFocusedBitmap, &normalBitmap); +} + +result +_CustomListItemImpl::SetElement(int elementId, const ICustomListElement& element) +{ + _ElementBaseModel* pBaseModel = GetElementModelById(elementId); + if (pBaseModel && pBaseModel->_elementType != LIST_ITEM_ELEMENT_TYPE_CUSTOM) + { + RemoveElement(elementId); + } + + _CustomElementModel* pCustomListElement = dynamic_cast<_CustomElementModel*>(pBaseModel); + + if (!pCustomListElement) + { + pCustomListElement = new (std::nothrow) _CustomElementModel(); + SysTryReturnResult(NID_UI_CTRL, pCustomListElement, E_OUT_OF_MEMORY, "Memory allocation failed."); + + pCustomListElement->_elementId = elementId; + pCustomListElement->_elementType = LIST_ITEM_ELEMENT_TYPE_CUSTOM; + pCustomListElement->__pListElement = const_cast(&element); + + elements.Add(*pCustomListElement); + } + else + { + pCustomListElement->__pListElement = const_cast(&element); + } + + return E_SUCCESS; +} + +result +_CustomListItemImpl::SetTextSliding(int elementId, bool enable) +{ + _TextElementModel* pTextElementModel = dynamic_cast<_TextElementModel*>(GetElementModelById(elementId)); + SysTryReturn(NID_UI_CTRL, pTextElementModel, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get element data"); + + pTextElementModel->SetTextSliding(enable); + + return E_SUCCESS; +} + +void +_CustomListItemImpl::StartSliding(void) +{ + _TextElementModel* pTextElementModel = null; + + for (int i = 0; i < elements.GetCount(); i++) + { + pTextElementModel = dynamic_cast<_TextElementModel*>(const_cast(elements.GetAt(i))); + if (pTextElementModel && pTextElementModel->GetTextSliding()) + { + StartTextSlideTimer(); + break; + } + } +} + +void +_CustomListItemImpl::StopSliding(void) +{ + _TextElementModel* pTextElementModel = null; + + for (int i = 0; i < elements.GetCount(); i++) + { + pTextElementModel = dynamic_cast<_TextElementModel*>(const_cast(elements.GetAt(i))); + if (pTextElementModel && pTextElementModel->GetTextSliding()) + { + _TextElementView* pTextElementView = dynamic_cast<_TextElementView*>(GetElementViewById(pTextElementModel->_elementId)); + SysTryReturnVoidResult(NID_UI_CTRL, (pTextElementView != null), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + pTextElementView->StopTextSlide(); + } + } + + StopTextSlideTimer(); +} + +void +_CustomListItemImpl::StartTextSlideTimer(void) +{ + result r = E_SUCCESS; + + if (__pTextSlideTimer == null) + { + __pTextSlideTimer = new (std::nothrow) Timer(); + SysTryReturnVoidResult(NID_UI_CTRL, (__pTextSlideTimer != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = __pTextSlideTimer->Construct(*this); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), ,E_SYSTEM, "[E_SYSTEM] A system error has occured. Failed to construct sliding timer."); + } + else + { + __pTextSlideTimer->Cancel(); + } + + r = __pTextSlideTimer->Start(TEXT_SLIDING_TIMER_DURATION); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , E_SYSTEM, "[E_SYSTEM] A system error has occured. Failed to start sliding timer."); + + return; + +CATCH: + StopTextSlideTimer(); +} + +void +_CustomListItemImpl::StopTextSlideTimer(void) +{ + delete __pTextSlideTimer; + __pTextSlideTimer = null; +} + +void +_CustomListItemImpl::OnTimerExpired(Timer& timer) +{ + if (&timer == __pTextSlideTimer) + { + _TextElementModel* pTextElementModel = null; + bool timerRequired = false; + + for (int i = 0; i < elements.GetCount(); i++) + { + pTextElementModel = dynamic_cast<_TextElementModel*>(const_cast(elements.GetAt(i))); + if (pTextElementModel && pTextElementModel->GetTextSliding()) + { + _TextElementView* pTextElementView = dynamic_cast<_TextElementView*>(GetElementViewById(pTextElementModel->_elementId)); + SysTryReturnVoidResult(NID_UI_CTRL, (pTextElementView != null), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + pTextElementView->StartTextSlide(); + timerRequired = true; + } + } + + if (timerRequired) + { + StartTextSlideTimer(); + } + } +} + +_ElementBaseModel* +_CustomListItemImpl::GetElementModelById(int elementId) const +{ + _ElementBaseModel* pElementBaseModel = null; + + for (int i = 0; i < elements.GetCount(); i++) + { + pElementBaseModel = dynamic_cast<_ElementBaseModel*>(const_cast(elements.GetAt(i))); + SysTryReturn(NID_UI_CTRL, pElementBaseModel, null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get element data"); + + if (pElementBaseModel->_elementId == elementId) + { + return pElementBaseModel; + } + } + + return null; +} + +_ElementBaseView* +_CustomListItemImpl::GetElementViewById(int elementId) const +{ + TableViewItemBase* pTableViewItemBase = null; + + if (__pTableViewItemData) + { + pTableViewItemBase = __pTableViewItemData; + } + else if (__pTableViewGroupItemData) + { + pTableViewItemBase = __pTableViewGroupItemData; + } + else + { + return null; + } + + _ElementBaseView* pElementBaseView = null; + int controlCount = pTableViewItemBase->GetControlCount(); + + for (int count = 0; count < controlCount; count++) + { + pElementBaseView = dynamic_cast<_ElementBaseView*>(const_cast(pTableViewItemBase->GetControl(count))); + SysTryReturn(NID_UI_CTRL, pElementBaseView, null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get element data"); + + if (pElementBaseView->GetElementId() == elementId) + { + return pElementBaseView; + } + } + + return null; +} + +void +_CustomListItemImpl::SetNormalItemBackgroundBitmap(const Bitmap& bitmap) +{ + TableViewItemDrawingStatus status = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL; + + if (__pBitmaps[status]) + { + delete __pBitmaps[status]; + } + + __pBitmaps[status] = _BitmapImpl::CloneN(bitmap); + + SetBackgroundBitmap(bitmap, status); + return; +} + +void +_CustomListItemImpl::SetFocusedItemBackgroundBitmap(const Bitmap& bitmap) +{ + TableViewItemDrawingStatus status = TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED; + + if (__pBitmaps[status]) + { + delete __pBitmaps[status]; + } + + __pBitmaps[status] = _BitmapImpl::CloneN(bitmap); + + SetBackgroundBitmap(bitmap, status); + return; +} + +void +_CustomListItemImpl::SetHighlightedItemBackgroundBitmap(const Bitmap& bitmap) +{ + TableViewItemDrawingStatus status = TABLE_VIEW_ITEM_DRAWING_STATUS_HIGHLIGHTED; + + if (__pBitmaps[status]) + { + delete __pBitmaps[status]; + } + + __pBitmaps[status] = _BitmapImpl::CloneN(bitmap); + + SetBackgroundBitmap(bitmap, status); + return; +} + +void +_CustomListItemImpl::SetBackgroundBitmap(const Bitmap& bitmap, TableViewItemDrawingStatus status) +{ + if (__pTableViewItemData) + { + bool returnValue = __pTableViewItemData->SetBackgroundBitmap(__pBitmaps[status], status); + result r = GetLastResult(); + + SysTryReturnVoidResult(NID_UI_CTRL, returnValue == true, r, "[%s] Propagating.", GetErrorMessage(r)); + } + else if (__pTableViewGroupItemData) + { + bool returnValue = __pTableViewGroupItemData->SetBackgroundBitmap(__pBitmaps[status], status); + result r = GetLastResult(); + + SysTryReturnVoidResult(NID_UI_CTRL, returnValue == true, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + SetLastResult(E_SUCCESS); + return; +} + +void +_CustomListItemImpl::UpdateBitmaps(void) +{ + for (int i = 0; i <= CUSTOM_LIST_ITEM_STATUS_FOCUSED; i++) + { + if (__pBitmaps[i]) + { + SetBackgroundBitmap(*__pBitmaps[i], (TableViewItemDrawingStatus)i); + } + } + + return; +} + +_CheckElementModel* +_CustomListItemImpl::GetCheckElement(void) +{ + _ElementBaseModel* pElementBase = null; + _CheckElementModel* pCheckElement = null; + + for (int i = 0; i < elements.GetCount(); i++) + { + pElementBase = dynamic_cast<_ElementBaseModel*>(elements.GetAt(i)); + SysTryReturn(NID_UI_CTRL, (pElementBase != null), null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get element"); + + if (pElementBase->_elementType == LIST_ITEM_ELEMENT_TYPE_CHECKBOX) + { + pCheckElement = dynamic_cast<_CheckElementModel*>(pElementBase); + return pCheckElement; + } + } + + return null; +} + +result +_CustomListItemImpl::SetDividerRequired(LinkedList& elementFormatList, Rectangle& checkElementBounds, bool& leftDivider, bool& rightDivider) +{ + _ElementFormatData* pFormatData = null; + + for (int formatDataCount = elementFormatList.GetCount() - 1; formatDataCount >= 0; formatDataCount--) + { + pFormatData = dynamic_cast<_ElementFormatData*>(elementFormatList.GetAt(formatDataCount)); + SysTryReturnResult(NID_UI_CTRL, (pFormatData != null), E_SYSTEM, "A system error has occurred. Failed to get format data"); + + if (pFormatData->rect.x < checkElementBounds.x) + { + leftDivider = true; + } + else if (pFormatData->rect.x > checkElementBounds.x + checkElementBounds.width) + { + rightDivider = true; + } + } + + return E_SUCCESS; +} + +result +_CustomListItemImpl::CreateTableViewItem(_TableViewItemParams& tableViewItemParams) +{ + TableViewItemBase* pTableViewItemBase = null; + + if (tableViewItemParams.itemIndex == -1) + { + pTableViewItemBase = CreateTableViewGroupItemN(tableViewItemParams); + } + else + { + pTableViewItemBase = CreateTableViewItemN(tableViewItemParams); + } + + SysTryReturnResult(NID_UI_CTRL, (pTableViewItemBase != null), E_SYSTEM, "A system error has occurred. Failed to create tableViewItem"); + + _CustomListItemImpl* pCustomListItemImpl = GetItemImpl(tableViewItemParams.pItem); + SysTryReturnResult(NID_UI_CTRL, (pCustomListItemImpl != null), E_INVALID_ARG, "Invalid argument is used. CustomListItem is null"); + + _CustomListItemFormatImpl* pFormatImpl = GetFormatImpl(tableViewItemParams.pItem); + SysTryReturnResult(NID_UI_CTRL, (pFormatImpl != null), E_INVALID_ARG, "Invalid argument is used. CustomListItemFormat is null"); + + LinkedList* pElementFormat = &pFormatImpl->elementFormatDataList; + LinkedList* pElements = &pCustomListItemImpl->elements; + _ElementBaseModel* pElementBase = null; + + for (int elementCount = pElements->GetCount() - 1; elementCount >= 0; elementCount--) + { + pElementBase = dynamic_cast<_ElementBaseModel*>(pElements->GetAt(elementCount)); + SysTryCatch(NID_UI_CTRL, (pElementBase != null), , E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get element."); + + if (!pCustomListItemImpl->IsElementIdValid(pElementFormat, pElementBase->_elementId)) + { + pElements->RemoveAt(elementCount, true); + SysLog(NID_UI_CTRL, "The provided elementId is not present in CustomListItemFormat."); + continue; + } + + result r = E_SUCCESS; + + _ElementViewParams elementParams; + elementParams.pTableViewItemBase = pTableViewItemBase; + elementParams.pElementModel = pElementBase; + elementParams.pElementFormatData = pFormatImpl->GetElementFormatById(pElementBase->_elementId); + elementParams.isDividerEnabled = tableViewItemParams.isDividerEnabled; + elementParams.annexStyle = tableViewItemParams.annexStyle; + elementParams.pCustomListItemImpl = pCustomListItemImpl; + elementParams.pCheckBitmaps = tableViewItemParams.pCheckBitmaps; + elementParams.pElementFormat = pElementFormat; + + r = pElementBase->CreateElementView(elementParams); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to create element view."); + } + + return E_SUCCESS; + +CATCH: + if (tableViewItemParams.itemIndex == -1) + { + _TableViewGroupItemData* pTableViewGroupItemData = dynamic_cast<_TableViewGroupItemData*>(pTableViewItemBase); + delete pTableViewGroupItemData; + } + else + { + _TableViewItemData* pTableViewItemData = dynamic_cast<_TableViewItemData*>(pTableViewItemBase); + delete pTableViewItemData; + } + + return E_SYSTEM; +} + +TableViewItemBase* +_CustomListItemImpl::CreateTableViewGroupItemN(_TableViewItemParams& tableViewItemParams) +{ + result r = E_SUCCESS; + + _TableViewGroupItemData* pTableViewGroupItemData = null; + + pTableViewGroupItemData = new (std::nothrow) _TableViewGroupItemData(); + SysTryReturn(NID_UI_CTRL, pTableViewGroupItemData, null, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = pTableViewGroupItemData->Construct(FloatDimension(tableViewItemParams.width, tableViewItemParams.pItem->__pCustomListItemImpl->height)); + SysTryCatch(NID_UI_CTRL, pTableViewGroupItemData, , E_SYSTEM, "[%s] Failed to create an item.", GetErrorMessage(r)); + + pTableViewGroupItemData->groupIndex = tableViewItemParams.groupIndex; + tableViewItemParams.pItem->__pCustomListItemImpl->__pTableViewGroupItemData = pTableViewGroupItemData; + + tableViewItemParams.pItem->__pCustomListItemImpl->UpdateBitmaps(); + + return pTableViewGroupItemData; + +CATCH: + delete pTableViewGroupItemData; + return null; +} + +TableViewItemBase* +_CustomListItemImpl::CreateTableViewItemN(_TableViewItemParams& tableViewItemParams) +{ + result r = E_SUCCESS; + _TableViewItemData* pTableViewItemData = null; + + pTableViewItemData = new (std::nothrow) _TableViewItemData(); + SysTryReturn(NID_UI_CTRL, pTableViewItemData, null, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = pTableViewItemData->Construct(FloatDimension(tableViewItemParams.width, tableViewItemParams.pItem->__pCustomListItemImpl->height), TABLE_VIEW_ANNEX_STYLE_NORMAL); + SysTryCatch(NID_UI_CTRL, pTableViewItemData, , E_SYSTEM, "[%s] Failed to create an item.", GetErrorMessage(r)); + + pTableViewItemData->groupIndex = tableViewItemParams.groupIndex; + pTableViewItemData->itemIndex = tableViewItemParams.itemIndex; + tableViewItemParams.pItem->__pCustomListItemImpl->__pTableViewItemData = pTableViewItemData; + + tableViewItemParams.pItem->__pCustomListItemImpl->UpdateBitmaps(); + + return pTableViewItemData; + +CATCH: + delete pTableViewItemData; + return null; +} + +result +_CustomListItemImpl::SetElementData(_ElementBaseModel* pElement) +{ + SysTryReturnResult(NID_UI_CTRL, (pElement != null), E_INVALID_ARG, "Invalid argument used. pElement must not be null."); + + _ElementBaseModel* pTempElement = null; + int i = 0; + result r = E_SUCCESS; + + for (; i < elements.GetCount(); i++) + { + pTempElement = dynamic_cast<_ElementBaseModel*>(elements.GetAt(i)); + SysTryReturnResult(NID_UI_CTRL, pTempElement, E_SYSTEM, "A system error has occurred. Failed to get element"); + + if (pElement->_elementId == pTempElement->_elementId) + { + break; + } + } + + if (i != elements.GetCount()) + { + r = elements.SetAt(*pElement, i, true); + } + else + { + r = elements.Add(*pElement); + } + + return r; +} + +bool +_CustomListItemImpl::IsElementIdValid(LinkedList* pElementFormat, int elementId) const +{ + for (int elementFormatDataCount = pElementFormat->GetCount() - 1; elementFormatDataCount >= 0; elementFormatDataCount--) + { + _ElementFormatData* pElementFormatData = dynamic_cast<_ElementFormatData*>(const_cast(pElementFormat->GetAt(elementFormatDataCount))); + + if (pElementFormatData != null && pElementFormatData->elementId == elementId) + { + return true; + } + } + + return false; +} + +_CustomListItemFormatImpl* +_CustomListItemImpl::GetFormatImpl(CustomListItem* pItem) +{ + SysTryReturn(NID_UI_CTRL, (pItem != null), null, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. CustomListItem is null"); + + CustomListItemFormat* pFormat = pItem->__pCustomListItemFormat; + SysTryReturn(NID_UI_CTRL, (pFormat != null), null, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. CustomListItemFormat is null"); + + return pItem->__pCustomListItemFormat->__pCustomListItemFormatImpl; +} + +_CustomListItemImpl* +_CustomListItemImpl::GetItemImpl(CustomListItem* pItem) +{ + SysTryReturn(NID_UI_CTRL, (pItem != null), null, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. CustomListItem is null"); + + return pItem->__pCustomListItemImpl; +} + +result +_CustomListItemImpl::UpdateTableViewItem(_TableViewItemUpdateParams& updateParams) +{ + _CustomListItemImpl* pCustomListItemImpl = GetItemImpl(updateParams.pItem); + SysTryReturnResult(NID_UI_CTRL, (pCustomListItemImpl != null), E_SYSTEM, "Invalid argument used. __pCustomListItemImpl must not be null"); + + TableViewItemBase* pTableViewItemBase = null; + + if (pCustomListItemImpl->__pTableViewItemData) + { + pTableViewItemBase = pCustomListItemImpl->__pTableViewItemData; + } + else + { + pTableViewItemBase = pCustomListItemImpl->__pTableViewGroupItemData; + } + + SysTryReturnResult(NID_UI_CTRL, (pTableViewItemBase != null), E_SYSTEM, "A system error has occurred. Failed to create tableViewItem"); + + _CustomListItemFormatImpl* pFormatImpl = GetFormatImpl(updateParams.pItem); + SysTryReturnResult(NID_UI_CTRL, (pFormatImpl != null), E_SYSTEM, "Invalid argument used. Item format must not be null"); + + LinkedList* pElementFormat = &pFormatImpl->elementFormatDataList; + _ElementBaseModel* pElementBase = null; + bool isValidElementId = false; + + for (int i = 0; i < pTableViewItemBase->GetControlCount(); i++) + { + Control* pControl = dynamic_cast(pTableViewItemBase->GetControl(i)); + pTableViewItemBase->SetIndividualSelectionEnabled(pControl, false); + } + + pTableViewItemBase->RemoveAllControls(); + + for (int elementCount = pCustomListItemImpl->elements.GetCount() -1; elementCount >= 0; elementCount--) + { + isValidElementId = false; + + pElementBase = dynamic_cast<_ElementBaseModel*>(pCustomListItemImpl->elements.GetAt(elementCount)); + SysTryReturnResult(NID_UI_CTRL, (pElementBase != null), E_SYSTEM, "Invalid element."); + + if (!pCustomListItemImpl->IsElementIdValid(pElementFormat, pElementBase->_elementId)) + { + pCustomListItemImpl->elements.RemoveAt(elementCount, true); + SysLog(NID_UI_CTRL, "The provided elementId is not present in CustomListItemFormat."); + continue; + } + + result r = E_SUCCESS; + + _ElementViewParams elementParams; + elementParams.pTableViewItemBase = pTableViewItemBase; + elementParams.pElementModel = pElementBase; + elementParams.pElementFormatData = pFormatImpl->GetElementFormatById(pElementBase->_elementId); + elementParams.isDividerEnabled = updateParams.isDividerEnabled; + elementParams.annexStyle = updateParams.annexStyle; + elementParams.pCustomListItemImpl = pCustomListItemImpl; + elementParams.pCheckBitmaps = updateParams.pCheckBitmaps; + elementParams.pElementFormat = pElementFormat; + + r = pElementBase->CreateElementView(elementParams); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "A system error has occurred. Failed to create element view."); + } + + pCustomListItemImpl->UpdateBitmaps(); + + return E_SUCCESS; +} + +void +_CustomListItemImpl::OnTouchDoublePressed (const Control &source, const Point ¤tPosition, const TouchEventInfo &touchInfo) +{ + return; +} + +void +_CustomListItemImpl::OnTouchFocusIn (const Control &source, const Point ¤tPosition, const TouchEventInfo &touchInfo) +{ + return; +} + +void +_CustomListItemImpl::OnTouchFocusOut (const Control &source, const Point ¤tPosition, const TouchEventInfo &touchInfo) +{ + if (source.IsEnabled() == false || touchInfo.IsFlicked()) + { + return; + } + + _ElementBaseView* pCurrentElement = dynamic_cast<_ElementBaseView*>(const_cast(&source)); + SysTryReturnVoidResult(NID_UI_CTRL, (pCurrentElement != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get element"); + + _ListBaseImpl* pListBaseImpl = GetListBaseImplFromElement(source); + SysTryReturnVoidResult(NID_UI_CTRL, (pListBaseImpl != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get item."); + + UpdateElements(source, pCurrentElement->GetElementId(), false, pListBaseImpl->_isDividerEnabled); + + UpdateItemBackground(source, pListBaseImpl->_isDividerEnabled); + + return; +} + +void +_CustomListItemImpl::OnTouchLongPressed (const Control &source, const Point ¤tPosition, const TouchEventInfo &touchInfo) +{ + return; +} + +void +_CustomListItemImpl::OnTouchMoved (const Control &source, const Point ¤tPosition, const TouchEventInfo &touchInfo) +{ + __isMoved = true; + return; +} + +void +_CustomListItemImpl::OnTouchPressed (const Control &source, const Point ¤tPosition, const TouchEventInfo &touchInfo) +{ + if (source.IsEnabled() == false || touchInfo.IsFlicked()) + { + return; + } + _ElementBaseView* pCurrentElement = dynamic_cast<_ElementBaseView*>(const_cast(&source)); + SysTryReturnVoidResult(NID_UI_CTRL, (pCurrentElement != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get element"); + + _ListBaseImpl* pListBaseImpl = GetListBaseImplFromElement(source); + SysTryReturnVoidResult(NID_UI_CTRL, (pListBaseImpl != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get item."); + + int elementId = pCurrentElement->GetElementId(); + + UpdateElements(source, elementId, true, pListBaseImpl->_isDividerEnabled); + + UpdateItemBackground(source, pListBaseImpl->_isDividerEnabled); +} + +void +_CustomListItemImpl::OnTouchReleased (const Control &source, const Point ¤tPosition, const TouchEventInfo &touchInfo) +{ + if (source.IsEnabled() == false || touchInfo.IsFlicked()) + { + return; + } + _ElementBaseView* pCurrentElement = dynamic_cast<_ElementBaseView*>(const_cast(&source)); + SysTryReturnVoidResult(NID_UI_CTRL, (pCurrentElement != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get element"); + + _ListBaseImpl* pListBaseImpl = GetListBaseImplFromElement(source); + SysTryReturnVoidResult(NID_UI_CTRL, (pListBaseImpl != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get item."); + + _CheckElementView* pCheckElementView = dynamic_cast<_CheckElementView*>(const_cast(&source)); + + UpdateElements(source, pCurrentElement->GetElementId(), false, pListBaseImpl->_isDividerEnabled); + + if (__isMoved == false) + { + int groupIndex = -1; + int itemIndex = -1; + + GetIndexFromElement(source, groupIndex, itemIndex); + + if (((pListBaseImpl->_isDividerEnabled) && (pCheckElementView)) || (!pListBaseImpl->_isDividerEnabled)) + { + pListBaseImpl->SetItemChecked(groupIndex, itemIndex, !pListBaseImpl->IsItemChecked(groupIndex, itemIndex)); + } + + UpdateItemBackground(source, pListBaseImpl->_isDividerEnabled); + + bool elementIdEnabled = IsElementEventEnabled(source); + if (!elementIdEnabled) + { + pListBaseImpl->ProcessItemStateChange(groupIndex, itemIndex, ITEM_SELECTED); + } + else + { + pListBaseImpl->ProcessItemStateChange(groupIndex, itemIndex, pCurrentElement->GetElementId(), ITEM_SELECTED); + } + } + else + { + UpdateItemBackground(source, pListBaseImpl->_isDividerEnabled); + } + + __isMoved = false; + + return; +} + +_ElementBaseView* +_CustomListItemImpl::GetViewById(int elementId) const +{ + TableViewItemBase* pTableViewItemBase = null; + + if (__pTableViewItemData) + { + pTableViewItemBase = __pTableViewItemData; + } + else if (__pTableViewGroupItemData) + { + pTableViewItemBase = __pTableViewGroupItemData; + } + else + { + return null; + } + + _ElementBaseView* pElementBaseView = null; + + for (int controlIndex = 0; controlIndex < pTableViewItemBase->GetControlCount(); controlIndex++) + { + pElementBaseView = dynamic_cast<_ElementBaseView*>(pTableViewItemBase->GetControl(controlIndex)); + SysTryReturn(NID_UI_CTRL, (pElementBaseView != null), null, E_SYSTEM, "[E_SYSTEM] Invalid Element added to item"); + + if (pElementBaseView->GetElementId() == elementId) + { + SetLastResult(E_SUCCESS); + return pElementBaseView; + } + } + + SetLastResult(E_SYSTEM); + return null; +} + +_ListBaseImpl* +_CustomListItemImpl::GetListBaseImplFromElement(const Control& element) +{ + _ElementBaseView* pCurrentElement = dynamic_cast<_ElementBaseView*>(const_cast(&element)); + SysTryReturn(NID_UI_CTRL, (pCurrentElement != null), null, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. source is not an element"); + + TableViewItemBase* pTableViewItemBase = dynamic_cast(pCurrentElement->GetParent()); + SysTryReturn(NID_UI_CTRL, (pTableViewItemBase != null), null, E_SYSTEM, "[E_INVALID_ARG] Invalid argument is used. source is not an element"); + + Control* pControl = dynamic_cast(pTableViewItemBase->GetParent()); + SysTryReturn(NID_UI_CTRL, (pControl != null), null, E_SYSTEM, "[E_INVALID_ARG] Invalid argument is used. source is not an element"); + + _ListBaseImpl* pListBaseImpl = static_cast<_ListBaseImpl*>(_ControlImpl::GetInstance(*pControl)); + SysTryReturn(NID_UI_CTRL, (pListBaseImpl != null), null, E_SYSTEM, "[E_INVALID_ARG] Invalid argument is used. source is not an element"); + + return pListBaseImpl; +} + +CustomListItem* +_CustomListItemImpl::GetItemFromElement(const Control& source) const +{ + _ElementBaseView* pCurrentElement = dynamic_cast<_ElementBaseView*>(const_cast(&source)); + SysTryReturn(NID_UI_CTRL, (pCurrentElement != null), null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get element"); + + _ITableViewBaseItemData* pBaseData = dynamic_cast<_ITableViewBaseItemData*>(pCurrentElement->GetParent()); + SysTryReturn(NID_UI_CTRL, (pBaseData != null), null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get item."); + + _ListBaseImpl* pListBaseImpl = GetListBaseImplFromElement(source); + SysTryReturn(NID_UI_CTRL, (pListBaseImpl != null), null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get item."); + + int groupIndex = -1; + int itemIndex = -1; + + pBaseData->GetIndex(groupIndex, itemIndex); + + CustomListItem* pCustomListItem = pListBaseImpl->GetCustomListItemAt(groupIndex, itemIndex - pListBaseImpl->GetTopItemIndex(groupIndex)); + SysTryReturn(NID_UI_CTRL, (pCustomListItem != null), null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get item."); + + return pCustomListItem; +} + +void +_CustomListItemImpl::GetIndexFromElement(const Control& source, int& groupIndex, int& itemIndex) const +{ + _ElementBaseView* pCurrentElement = dynamic_cast<_ElementBaseView*>(const_cast(&source)); + SysTryReturnVoidResult(NID_UI_CTRL, (pCurrentElement != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get element"); + + _ITableViewBaseItemData* pBaseData = dynamic_cast<_ITableViewBaseItemData*>(pCurrentElement->GetParent()); + SysTryReturnVoidResult(NID_UI_CTRL, (pBaseData != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get item."); + + _ListBaseImpl* pListBaseImpl = GetListBaseImplFromElement(source); + SysTryReturnVoidResult(NID_UI_CTRL, (pListBaseImpl != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get item."); + + pBaseData->GetIndex(groupIndex, itemIndex); +} + +bool +_CustomListItemImpl::IsElementEventEnabled(const Control& element) +{ + CustomListItem* pCustomListItem = GetItemFromElement(element); + SysTryReturn(NID_UI_CTRL, (pCustomListItem != null), false, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get item."); + + CustomListItemFormat* pFormat = pCustomListItem->__pCustomListItemFormat; + SysTryReturn(NID_UI_CTRL, (pFormat != null), false, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get item."); + + _ElementBaseView* pCurrentElement = dynamic_cast<_ElementBaseView*>(const_cast(&element)); + SysTryReturn(NID_UI_CTRL, (pCurrentElement != null), false, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get element"); + + return pFormat->__pCustomListItemFormatImpl->IsElementEventEnabled(pCurrentElement->GetElementId()); +} + +void +_CustomListItemImpl::UpdateElements(const Control &source, int elementId, bool isPressed, bool isDividerEnabled) +{ + bool elementIdEnabled = IsElementEventEnabled(source); + CustomListItemStatus customListItemStatus; + + _CheckElementView* pCheckElementView = dynamic_cast<_CheckElementView*>(const_cast(&source)); + + if (isPressed == true) + { + customListItemStatus = CUSTOM_LIST_ITEM_STATUS_FOCUSED; + StartSliding(); + } + else + { + customListItemStatus = CUSTOM_LIST_ITEM_STATUS_NORMAL; + StopSliding(); + } + + int elementCount = elements.GetCount(); + + if (elementIdEnabled) + { + if (pCheckElementView) + { + GetCheckElement()->HandleElementEvent(customListItemStatus); + pCheckElementView->SetPressed(isPressed); + } + else + { + _ElementBaseModel* pElementBaseModel = GetElementModelById(elementId); + SysTryReturnVoidResult(NID_UI_CTRL, (pElementBaseModel != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get item."); + + pElementBaseModel->HandleElementEvent(customListItemStatus); + } + } + else + { + if (isDividerEnabled) + { + if (pCheckElementView) + { + GetCheckElement()->HandleElementEvent(customListItemStatus); + pCheckElementView->SetPressed(isPressed); + } + else + { + for (int i = 0; i < elementCount; i++) + { + _ElementBaseModel* pElementBase = dynamic_cast<_ElementBaseModel*>(elements.GetAt(i)); + SysTryReturnVoidResult(NID_UI_CTRL, (pElementBase != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get element"); + + if (pElementBase->_elementType != LIST_ITEM_ELEMENT_TYPE_CHECKBOX) + { + pElementBase->HandleElementEvent(customListItemStatus); + } + } + } + } + else + { + for (int i = 0; i < elementCount; i++) + { + _ElementBaseModel* pElementBase = dynamic_cast<_ElementBaseModel*>(elements.GetAt(i)); + SysTryReturnVoidResult(NID_UI_CTRL, (pElementBase != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get element"); + + pElementBase->HandleElementEvent(customListItemStatus); + } + } + } +} + +void +_CustomListItemImpl::UpdateItemBackground(const Control& element, bool isDividerEnabled) +{ + TableViewItemBase* pTableViewItemBase = dynamic_cast(element.GetParent()); + SysTryReturnVoidResult(NID_UI_CTRL, (pTableViewItemBase != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get item."); + + _CheckElementView* pCheckElementView = dynamic_cast<_CheckElementView*>(const_cast(&element)); + + bool elementIdEnabled = IsElementEventEnabled(element); + if (!elementIdEnabled) + { + if (isDividerEnabled) + { + if (!pCheckElementView) + { + pTableViewItemBase->SetBackgroundColor(Color(0, 0, 0, 0)); + } + } + else + { + pTableViewItemBase->SetBackgroundColor(Color(0, 0, 0, 0)); + } + } + + pTableViewItemBase->Invalidate(true); +} + +void +_CustomListItemImpl::DeleteCustomListItem(Tizen::Base::Object* pObj) +{ + CustomListItem* pCustomListItem = dynamic_cast(pObj); + delete pCustomListItem; +} + +}}} //Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_DatePickerImpl.cpp b/src/ui/controls/FUiCtrl_DatePickerImpl.cpp new file mode 100644 index 0000000..3f4195c --- /dev/null +++ b/src/ui/controls/FUiCtrl_DatePickerImpl.cpp @@ -0,0 +1,391 @@ +// +// 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_DatePickerImpl.cpp + * @brief This is the implementation file for the _DatePickerImpl class. + */ + +#include +#include +#include "FUiCtrl_DatePickerImpl.h" +#include "FUiCtrl_FrameImpl.h" +#include "FUiCtrl_DateTimePicker.h" +#include "FUi_ControlImplManager.h" +#include "FUi_ResourceSizeInfo.h" +#include "FUi_ResourceManager.h" +#include "FUiCtrl_Form.h" + +using namespace Tizen::Ui::Animations; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Base; +using namespace Tizen::System; +using namespace Tizen::Graphics; + + +namespace Tizen { namespace Ui { namespace Controls +{ + +FloatDimension +_DatePickerImpl::DatePickerSizeInfo::GetDefaultMinimumSizeF(_ControlOrientation orientation) const +{ + FloatDimension pickerSize(0.0f, 0.0f); + FloatDimension screenSize(0.0f, 0.0f); + + screenSize = _ControlManager::GetInstance()->GetScreenSizeF(); + pickerSize = screenSize; + if (orientation == _CONTROL_ORIENTATION_LANDSCAPE) + { + pickerSize.width = screenSize.height; + pickerSize.height = screenSize.width; + } + + return pickerSize; +} + +FloatDimension +_DatePickerImpl::DatePickerSizeInfo::GetDefaultMaximumSizeF(_ControlOrientation orientation) const +{ + FloatDimension pickerSize(0.0f, 0.0f); + FloatDimension screenSize(0.0f, 0.0f); + + screenSize = _ControlManager::GetInstance()->GetScreenSizeF(); + pickerSize = screenSize; + if (orientation == _CONTROL_ORIENTATION_LANDSCAPE) + { + pickerSize.width = screenSize.height; + pickerSize.height = screenSize.width; + } + + return pickerSize; +} + +_DatePickerImpl::_DatePickerImpl(DatePicker* pPublic, _DateTimePicker* pCore) + : _WindowImpl(pPublic, pCore) + , __pPublicDateTimeChangeEvent(null) +{ +} + +_DatePickerImpl::~_DatePickerImpl(void) +{ + delete __pPublicDateTimeChangeEvent; + __pPublicDateTimeChangeEvent = null; +} + +_DatePickerImpl* +_DatePickerImpl::CreateDatePickerImplN(DatePicker* pControl, const String& title) +{ + ClearLastResult(); + + result r = E_SUCCESS; + + _DateTimePicker* pCore = _DateTimePicker::CreateDateTimePickerN(DATETIME_OUTPUT_STYLE_DATE, title); + SysTryReturn(NID_UI_CTRL, (pCore != null), null, r, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _DatePickerImpl* pPickerImpl = new (std::nothrow) _DatePickerImpl(pControl, pCore); + r = CheckConstruction(pCore, pPickerImpl); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), null, r, "[%s] Propagating.", GetErrorMessage(r)); + + pPickerImpl->__pPublicDateTimeChangeEvent = new (std::nothrow) _PublicDateTimeChangeEvent(*pControl); + SysTryCatch(NID_UI_CTRL, (pPickerImpl->__pPublicDateTimeChangeEvent != null), , E_OUT_OF_MEMORY, + "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = pPickerImpl->InitializeBoundsProperties(GET_SIZE_INFO(DatePicker), pCore->GetOrientation()); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pCore->AddDateTimeChangeEventListener(*pPickerImpl); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return pPickerImpl; + +CATCH: + delete pPickerImpl; + + return null; +} + +const char* +_DatePickerImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Controls::DatePicker"; +} + +const DatePicker& +_DatePickerImpl::GetPublic(void) const +{ + return static_cast (_ControlImpl::GetPublic()); +} + +DatePicker& +_DatePickerImpl::GetPublic(void) +{ + return static_cast (_ControlImpl::GetPublic()); +} + +const _DateTimePicker& +_DatePickerImpl::GetCore(void) const +{ + return static_cast (_ControlImpl::GetCore()); +} + +_DateTimePicker& +_DatePickerImpl::GetCore(void) +{ + return static_cast <_DateTimePicker&>(_ControlImpl::GetCore()); +} + +_DatePickerImpl* +_DatePickerImpl::GetInstance(DatePicker& datePicker) +{ + return static_cast<_DatePickerImpl*> (_ControlImpl::GetInstance(datePicker)); +} + +const _DatePickerImpl* +_DatePickerImpl::GetInstance(const DatePicker& datePicker) +{ + return static_cast (_ControlImpl::GetInstance(datePicker)); +} + +result +_DatePickerImpl::AddDateChangeEventListener(Tizen::Ui::IDateChangeEventListener& listener) +{ + ClearLastResult(); + + SysTryReturnResult(NID_UI_CTRL, (__pPublicDateTimeChangeEvent != null), E_SYSTEM, + "A system error has occurred. The _PublicDateTimeChangeEvent instance is null."); + + result r = __pPublicDateTimeChangeEvent->AddListener(listener); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +result +_DatePickerImpl::RemoveDateChangeEventListener(Tizen::Ui::IDateChangeEventListener& listener) +{ + ClearLastResult(); + + SysTryReturnResult(NID_UI_CTRL, (__pPublicDateTimeChangeEvent != null), E_SYSTEM, + "A system error has occurred. The _PublicDateTimeChangeEvent instance is null."); + + result r = __pPublicDateTimeChangeEvent->RemoveListener(listener); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +DateTime +_DatePickerImpl::GetDate(void) const +{ + ClearLastResult(); + + DateTime dateTime; + dateTime.SetValue(GetYear(), GetMonth(), GetDay(), 0, 0, 0); + return dateTime; +} + +int +_DatePickerImpl::GetDay(void) const +{ + ClearLastResult(); + + Variant dayValue = GetCore().GetPropertyDay(); + + return dayValue.ToInt(); +} + +int +_DatePickerImpl::GetMonth(void) const +{ + ClearLastResult(); + + Variant monthValue = GetCore().GetPropertyMonth(); + + return monthValue.ToInt(); +} + +int +_DatePickerImpl::GetYear(void) const +{ + ClearLastResult(); + + Variant yearValue = GetCore().GetPropertyYear(); + + return yearValue.ToInt(); +} + +void +_DatePickerImpl::SetDate(const DateTime& date) +{ + ClearLastResult(); + + SetYear(date.GetYear()); + SetMonth(date.GetMonth()); + SetDay(date.GetDay()); +} + +void +_DatePickerImpl::SetCurrentDate(void) +{ + ClearLastResult(); + + DateTime dateTime; + SystemTime::GetCurrentTime(TIME_MODE_WALL, dateTime); + SetDate(dateTime); +} + +result +_DatePickerImpl::SetYear(int year) +{ + ClearLastResult(); + + Variant yearValue(year); + + return GetCore().SetPropertyYear(yearValue); +} + +result +_DatePickerImpl::SetMonth(int month) +{ + ClearLastResult(); + + Variant monthValue(month); + + return GetCore().SetPropertyMonth(monthValue); +} + +result +_DatePickerImpl::SetDay(int day) +{ + ClearLastResult(); + + Variant dayValue(day); + + return GetCore().SetPropertyDay(dayValue); +} + +result +_DatePickerImpl::SetYearRange(int minYear, int maxYear) +{ + ClearLastResult(); + + result r = E_SUCCESS; + + Variant currentMinYearValue = GetCore().GetPropertyMinYearRange(); + Variant minYearValue(minYear); + Variant maxYearValue(maxYear); + + r = GetCore().SetPropertyMinYearRange(minYearValue); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating.", GetErrorMessage(r)); + + r = GetCore().SetPropertyMaxYearRange(maxYearValue); + if (r != E_SUCCESS) + { + // rollback minYearValue + GetCore().SetPropertyMinYearRange(minYearValue); + SysLogException(NID_UI_CTRL, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + return r; +} + +result +_DatePickerImpl::GetYearRange(int& minYear, int& maxYear) const +{ + ClearLastResult(); + + Variant minYearValue = GetCore().GetPropertyMinYearRange(); + Variant maxYearValue = GetCore().GetPropertyMaxYearRange(); + + minYear = minYearValue.ToInt(); + maxYear = maxYearValue.ToInt(); + + return E_SUCCESS; +} + +void +_DatePickerImpl::OnDateTimeChanged(const Tizen::Ui::_Control& source, int year, int month, int day, int hour, int minute) +{ + ClearLastResult(); + + if (__pPublicDateTimeChangeEvent == null) + { + return; + } + + _PublicDateTimeChangeEventArg* pEventArg = new (std::nothrow) _PublicDateTimeChangeEventArg(DATE_PUBLIC_CHANGE_SAVED); + SysTryReturnVoidResult(NID_UI_CTRL, (pEventArg != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pEventArg->SetDate(year, month, day); + pEventArg->SetTime(hour, minute); + + __pPublicDateTimeChangeEvent->Fire(*pEventArg); +} + +void +_DatePickerImpl::OnDateTimeChangeCanceled(const Tizen::Ui::_Control& source) +{ + ClearLastResult(); + + if (__pPublicDateTimeChangeEvent == null) + { + return; + } + + _PublicDateTimeChangeEventArg* pEventArg = new (std::nothrow) _PublicDateTimeChangeEventArg(DATE_PUBLIC_CHANGE_CANCELED); + SysTryReturnVoidResult(NID_UI_CTRL, (pEventArg != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + __pPublicDateTimeChangeEvent->Fire(*pEventArg); +} + +void +_DatePickerImpl::OnChangeLayout(Tizen::Ui::_ControlOrientation orientation) +{ + ClearLastResult(); + + InitializeBoundsProperties(GET_SIZE_INFO(DatePicker), orientation); + _ControlImpl::OnChangeLayout(orientation); +} + +result +_DatePickerImpl::OnAttachedToMainTree(void) +{ + result r = E_SUCCESS; + + if (GetOwner() == null) + { + _FrameImpl* pFrameImpl = dynamic_cast <_FrameImpl*>(_ControlImplManager::GetInstance()->GetCurrentFrame()); + SysTryReturn(NID_UI_CTRL, pFrameImpl != null, E_SYSTEM, + E_SYSTEM, "[E_SYSTEM] This instance is not constructed."); + + _Form* pForm = pFrameImpl->GetCore().GetCurrentForm(); + if (pForm != null) + { + GetCore().SetOwner(pForm); + } + else + { + GetCore().SetOwner(&pFrameImpl->GetCore()); + } + } + SetVisibleState(true); + + _WindowImpl::OnAttachedToMainTree(); + return r; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_DateTimeBar.cpp b/src/ui/controls/FUiCtrl_DateTimeBar.cpp new file mode 100644 index 0000000..d9ed1a5 --- /dev/null +++ b/src/ui/controls/FUiCtrl_DateTimeBar.cpp @@ -0,0 +1,1026 @@ +// +// 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_DateTimeBar.cpp + * @brief This is the implementation file for the _DateTimeBar class. + */ + +#include +#include +#include "FUiAnim_VisualElement.h" +#include "FUi_AccessibilityContainer.h" +#include "FUi_AccessibilityElement.h" +#include "FUi_ResourceManager.h" +#include "FUiCtrl_DateTimeBar.h" +#include "FUiCtrl_DateTimeBarPresenter.h" +#include "FUiCtrl_ActionEvent.h" +#include "FUiCtrl_Frame.h" +#include "FUiCtrl_Form.h" +#include "FUi_CoordinateSystemUtils.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Media; +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Ui::Animations; + +namespace Tizen { namespace Ui { namespace Controls +{ +_DateTimeBar::_DateTimeBar(void) + : __pDateTimeBarPresenter(null) + , __pActionEvent(null) + , __selectedBoxId(DATETIME_ID_NONE) + , __alignment(DATETIME_BAR_ALIGN_DOWN) + , __pDateTimeChangeEvent(null) + , __pGestureFlick(null) + , __parentWindowBounds(0.0f, 0.0f, 0.0f, 0.0f) + , __pOwner(null) + , __accessibilityFocusOutIndex(-1) + , __isAnimating(false) +{ + +} + +_DateTimeBar::~_DateTimeBar(void) +{ + ReleaseTouchCapture(); + + if (GetVisualElement()) + { + GetVisualElement()->RemoveAllAnimations(); + } + + delete __pDateTimeChangeEvent; + __pDateTimeChangeEvent = null; + + delete __pActionEvent; + __pActionEvent = null; + + delete __pDateTimeBarPresenter; + __pDateTimeBarPresenter = null; + + delete __pGestureFlick; + __pGestureFlick = null; + + RemoveAllAccessibilityElement(); + + ClearLastResult(); +} + +_DateTimeBar* +_DateTimeBar::CreateDateTimeBarN(_Control& owner) +{ + result r = E_SUCCESS; + ClearLastResult(); + + _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(_WINDOW_TYPE_VE); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pDateTimeBar->__pOwner = &owner; + + pDateTimeBar->__pDateTimeBarPresenter = _DateTimeBarPresenter::CreateInstanceN(*pDateTimeBar); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, pDateTimeBar->__pDateTimeBarPresenter != null, , r, + "[%s] Propagating.", GetErrorMessage(r)); + + pDateTimeBar->__pDateTimeChangeEvent = new (std::nothrow) _DateTimeChangeEvent(*pDateTimeBar); + SysTryCatch(NID_UI_CTRL, (pDateTimeBar->__pDateTimeChangeEvent != null), , E_OUT_OF_MEMORY, + "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pDateTimeBar->AcquireHandle(); + + if (pDateTimeBar->GetVisualElement() != null) + { + pDateTimeBar->GetVisualElement()->SetSurfaceOpaque(false); + } + + pDateTimeBar->__pGestureFlick = new (std::nothrow) _TouchFlickGestureDetector(); + SysTryCatch(NID_UI_CTRL, (pDateTimeBar->__pGestureFlick != null), , E_OUT_OF_MEMORY, + "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pDateTimeBar->AddGestureDetector(*(pDateTimeBar->__pGestureFlick)); + SysTryCatch(NID_UI_CTRL, (GetLastResult() == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pDateTimeBar->__pGestureFlick->AddGestureListener(*pDateTimeBar); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + pDateTimeBar->InitializeAccessibilityElement(); + return pDateTimeBar; + +CATCH: + delete pDateTimeBar; + return null; +} + +result +_DateTimeBar::SetPositionAndAlignment(const FloatPoint& point, _DateTimeBarAlignment alignment) +{ + ClearLastResult(); + + result r = E_SUCCESS; + SetAlignment(alignment); + + r = __pDateTimeBarPresenter->LoadArrowBitmap(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + float height = 0.0f; + + r = GET_SHAPE_CONFIG(DATETIMEBAR::ITEM_HEIGHT, GetOrientation(), height); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + SetMovable(true); + SetResizable(true); + + if (alignment == DATETIME_BAR_ALIGN_DOWN) + { + SetPosition(FloatPoint(point.x, point.y)); + + } + else + { + SetPosition(FloatPoint(point.x, point.y - height)); + } + + __pDateTimeBarPresenter->CalculateWindowBounds(); + + return r; +} + +_DateTimeBarAlignment +_DateTimeBar::GetAlignment(void) const +{ + return __alignment; +} + +void +_DateTimeBar::SetAlignment(_DateTimeBarAlignment alignment) +{ + __alignment = alignment; + return; +} + +void +_DateTimeBar::OnDraw(void) +{ + ClearLastResult(); + + __pDateTimeBarPresenter->Draw(); + return; +} + +result +_DateTimeBar::RemoveAllItems(void) +{ + ClearLastResult(); + + result r = E_SUCCESS; + + r = __pDateTimeBarPresenter->RemoveAllItems(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +_DateTimeBar::SetInitialValue(int minValue, int maxValue, int displayValue, _DateTimeId boxId) +{ + ClearLastResult(); + + result r = E_SUCCESS; + + SetSelectedBoxId(boxId); + + __pDateTimeBarPresenter->SetMinimumValue(minValue); + __pDateTimeBarPresenter->SetMaximumValue(maxValue); + + r = __pDateTimeBarPresenter->AddItems(displayValue); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +_DateTimeId +_DateTimeBar::GetSelectedBoxId(void) const +{ + return __selectedBoxId; +} + +void +_DateTimeBar::SetSelectedBoxId(_DateTimeId boxId) +{ + __selectedBoxId = boxId; + return; +} + + +void +_DateTimeBar::InitializeAccessibilityElement(void) +{ + + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + + if (pContainer != null) + { + pContainer->Activate(true); + pContainer->AddListener(*this); + } + + return; +} + +int +_DateTimeBar::GetItemCount(void) const +{ + ClearLastResult(); + + return __pDateTimeBarPresenter->GetItemCount(); +} + +result +_DateTimeBar::AddActionEventListener(const _IActionEventListener& listener) +{ + ClearLastResult(); + + result r = E_SUCCESS; + + if (__pActionEvent == null) + { + __pActionEvent = _ActionEvent::CreateInstanceN(*this); + SysTryReturn(NID_UI_CTRL, __pActionEvent != null, E_SYSTEM, E_SYSTEM, + "[%s] Propagating.", GetErrorMessage(r)); + } + r = __pActionEvent->AddListener(listener); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +_DateTimeBar::RemoveActionEventListener(const _IActionEventListener& listener) +{ + ClearLastResult(); + + result r = E_OBJ_NOT_FOUND; + + if (__pActionEvent != null) + { + r = __pActionEvent->RemoveListener(listener); + } + + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +_DateTimeBar::AddDateTimeChangeEventListener(const _IDateTimeChangeEventListener& listener) +{ + ClearLastResult(); + + return __pDateTimeChangeEvent->AddListener(listener); +} + +result +_DateTimeBar::RemoveDateTimeChangeEventListener(const _IDateTimeChangeEventListener& listener) +{ + ClearLastResult(); + + return __pDateTimeChangeEvent->RemoveListener(listener); +} + +result +_DateTimeBar::FireDateTimeChangeEvent(_DateTimeChangeStatus status) +{ + ClearLastResult(); + + _DateTimeChangeEventArg* pDateTimeEventArg = new (std::nothrow) _DateTimeChangeEventArg(status); + SysTryReturn(NID_UI_CTRL, (pDateTimeEventArg != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, + "[E_OUT_OF_MEMORY] Memory allocation failed."); + + __pDateTimeChangeEvent->Fire(*pDateTimeEventArg); + + return E_SUCCESS; +} + +result +_DateTimeBar::FireActionEvent(int actionId) +{ + ClearLastResult(); + + if (__pActionEvent != null) + { + Tizen::Base::Runtime::IEventArg* pEventArg = _ActionEvent::CreateActionEventArgN(actionId); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pEventArg, false, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pActionEvent->Fire(*pEventArg); + } + + return E_SUCCESS; +} + +result +_DateTimeBar::CalculateArrowBounds(const FloatRectangle& bounds) +{ + ClearLastResult(); + + FloatRectangle arrowBounds(0.0f, 0.0f, 0.0f, 0.0f); + + arrowBounds = __pDateTimeBarPresenter->GetArrowBounds(); + arrowBounds.x = bounds.x + (bounds.width / 2.0f) - (arrowBounds.width / 2.0f); + arrowBounds.x -= __pDateTimeBarPresenter->GetWindowBounds().x; + + __pDateTimeBarPresenter->SetArrowBounds(arrowBounds); + + return E_SUCCESS; +} + +bool +_DateTimeBar::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + ClearLastResult(); + if (__isAnimating) + { + return true; + } + + return __pDateTimeBarPresenter->OnTouchPressed(source, touchinfo); +} + +bool +_DateTimeBar::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + ClearLastResult(); + if (__isAnimating) + { + return true; + } + + return __pDateTimeBarPresenter->OnTouchReleased(source, touchinfo); +} + +bool +_DateTimeBar::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + ClearLastResult(); + if (__isAnimating) + { + return true; + } + + return __pDateTimeBarPresenter->OnTouchMoved(source, touchinfo); +} + +bool +_DateTimeBar::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + ClearLastResult(); + + return __pDateTimeBarPresenter->OnTouchCanceled(source, touchinfo); +} + +bool +_DateTimeBar::OnFlickGestureDetected(_TouchFlickGestureDetector& gesture) +{ + int xDistance = 0; + int yDistance = 0; + gesture.GetDistance(xDistance, yDistance); + int duration = gesture.GetDuration(); + return __pDateTimeBarPresenter->OnFlickGestureDetected(xDistance, yDistance, duration); +} + +bool +_DateTimeBar::OnFlickGestureCanceled(_TouchFlickGestureDetector& gesture) +{ + return false; +} + +void +_DateTimeBar::OnTouchMoveHandled(const Tizen::Ui::_Control& control) +{ + ClearLastResult(); + + return __pDateTimeBarPresenter->OnTouchMoveHandled(control); +} + +result +_DateTimeBar::OnAttachedToMainTree(void) +{ + return _Window::OnAttachedToMainTree(); +} + +result +_DateTimeBar::OnDetachingFromMainTree(void) +{ + return _Window::OnDetachingFromMainTree(); +} + +void +_DateTimeBar::OnActivated(void) +{ + VisualElement* pVisualElement = 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); + SysTryReturnVoidResult(NID_UI_CTRL, pAnimation != null, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + pVisualElement->AddAnimation(L"BarOpenAnimation", *pAnimation); + delete pAnimation; + + _Window::OnActivated(); + + SetTouchCapture(true, true); + + return; +} + +void +_DateTimeBar::OnDeactivated(void) +{ + ReleaseTouchCapture(); + + return _Window::OnDeactivated(); +} + +void +_DateTimeBar::AddAccessibilityElement(const FloatRectangle& itemBounds, const String& itemText) +{ + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + SysTryReturnVoidResult(NID_UI_CTRL, (pContainer != null), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _AccessibilityElement* pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true); + SysTryReturnVoidResult(NID_UI_CTRL, pAccessibilityElement != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + String labelText = itemText; + pAccessibilityElement->SetBounds(itemBounds); + pAccessibilityElement->SetLabel(labelText); + pAccessibilityElement->SetTraitWithStringId(GetAccessibilityTraitValue()); + pContainer->AddElement(*pAccessibilityElement); + __accessibilityElements.Add(pAccessibilityElement); + + return; +} + +void +_DateTimeBar::InsertAccessibilityElementAt(int index, const FloatRectangle& itemBounds, const String& itemText) +{ + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + SysTryReturnVoidResult(NID_UI_CTRL, (pContainer != null), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _AccessibilityElement* pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true); + SysTryReturnVoidResult(NID_UI_CTRL, pAccessibilityElement != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + String labelText = itemText; + pAccessibilityElement->SetBounds(itemBounds); + pAccessibilityElement->SetLabel(labelText); + pAccessibilityElement->SetTraitWithStringId(GetAccessibilityTraitValue()); + pContainer->InsertElement(*pAccessibilityElement, index); + __accessibilityElements.InsertAt(pAccessibilityElement, index); + + return; +} + +void +_DateTimeBar::RemoveAccessibilityElementAt(int index) +{ + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + SysTryReturnVoidResult(NID_UI_CTRL, (pContainer != null), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _AccessibilityElement* pAccessibilityElement = null; + + if (__accessibilityElements.GetAt(index, pAccessibilityElement) == E_SUCCESS) + { + __accessibilityElements.RemoveAt(index); + pContainer->RemoveElement(*pAccessibilityElement); + } + + return; +} + +void +_DateTimeBar::RemoveAllAccessibilityElement(void) +{ + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + SysTryReturnVoidResult(NID_UI_CTRL, (pContainer != null), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _AccessibilityElement* pAccessibilityElement = null; + + while (__accessibilityElements.GetCount() > 0) + { + if ((__accessibilityElements.GetAt(0, pAccessibilityElement)) == E_SUCCESS) + { + __accessibilityElements.RemoveAt(0); + pContainer->RemoveElement(*pAccessibilityElement); + } + } + + return; +} + +const char* +_DateTimeBar::GetAccessibilityTraitValue() const +{ + const char* ACCESSIBILITY_TRAITS_DAY = "IDS_TPLATFORM_BODY_DAY_LC"; + const char* ACCESSIBILITY_TRAITS_MONTH = "IDS_TPLATFORM_BODY_MONTH_LC"; + const char* ACCESSIBILITY_TRAITS_YEAR = "IDS_TPLATFORM_BODY_YEAR_LC"; + const char* ACCESSIBILITY_TRAITS_HOUR = "IDS_TPLATFORM_BODY_HOUR_LC"; + const char* ACCESSIBILITY_TRAITS_MINUTE = "IDS_TPLATFORM_BODY_MINUTE_LC"; + char* traitsValue = null; + + if (GetSelectedBoxId() == DATETIME_ID_DAY) + { + traitsValue = const_cast(ACCESSIBILITY_TRAITS_DAY); + } + else if (GetSelectedBoxId() == DATETIME_ID_MONTH) + { + traitsValue = const_cast(ACCESSIBILITY_TRAITS_MONTH); + } + else if (GetSelectedBoxId() == DATETIME_ID_YEAR) + { + traitsValue = const_cast(ACCESSIBILITY_TRAITS_YEAR); + } + else if (GetSelectedBoxId() == DATETIME_ID_HOUR) + { + traitsValue = const_cast(ACCESSIBILITY_TRAITS_HOUR); + } + else if (GetSelectedBoxId() == DATETIME_ID_MINUTE) + { + traitsValue = const_cast(ACCESSIBILITY_TRAITS_MINUTE); + } + + return traitsValue; +} + +String +_DateTimeBar::GetMonthValue(int month) const +{ + String monthValue; + + switch (month) + { + case 1: + monthValue = L"January"; + break; + case 2: + monthValue = L"February"; + break; + case 3: + monthValue = L"March"; + break; + case 4: + monthValue = L"April"; + break; + case 5: + monthValue = L"May"; + break; + case 6: + monthValue = L"June"; + break; + case 7: + monthValue = L"July"; + break; + case 8: + monthValue = L"August"; + break; + case 9: + monthValue = L"September"; + break; + case 10: + monthValue = L"October"; + break; + case 11: + monthValue = L"November"; + break; + case 12: + monthValue = L"December"; + break; + default: + monthValue = L""; + } + + return monthValue; +} + +void +_DateTimeBar::SetFont(Font& pFont) +{ + __pDateTimeBarPresenter->SetFont(pFont); + + return; +} + +void +_DateTimeBar::SetParentWindowBounds(FloatRectangle& parentWindowBounds) +{ + __parentWindowBounds = parentWindowBounds; + return; +} + +FloatRectangle +_DateTimeBar::GetParentWindowBounds() const +{ + return __parentWindowBounds; +} + +void +_DateTimeBar::RefreshItems(void) +{ + float itemWidth = 0; + + if (GetSelectedBoxId() == DATETIME_ID_MONTH) + { + GET_SHAPE_CONFIG(DATETIMEBAR::MONTH_ITEM_WIDTH, _ControlManager::GetInstance()->GetOrientation(), itemWidth); + } + else if (GetSelectedBoxId() == DATETIME_ID_YEAR) + { + GET_SHAPE_CONFIG(DATETIMEBAR::YEAR_ITEM_WIDTH, _ControlManager::GetInstance()->GetOrientation(), itemWidth); + } + else + { + GET_SHAPE_CONFIG(DATETIMEBAR::DAY_ITEM_WIDTH, _ControlManager::GetInstance()->GetOrientation(), itemWidth); + } + + __pDateTimeBarPresenter->SetInitialAnimationValue(itemWidth); + + __pDateTimeBarPresenter->StartAnimationEffect(); + + if (unlikely((_AccessibilityManager::IsActivated()))) + { + _AccessibilityElement* pAccessibilityElement = GetAccessibilityElementAt(__pDateTimeBarPresenter->GetSelectedItemIndex() - 1); + + if (pAccessibilityElement != null) + { + _AccessibilityManager::GetInstance()->SetGlobalFocusedElement(*pAccessibilityElement); + } + } + + return; +} + +void +_DateTimeBar::RemoveAllAnimations(void) +{ + VisualElement* pDateTimeBarElement = GetVisualElement(); + + if (pDateTimeBarElement != null) + { + pDateTimeBarElement->RemoveAllAnimations(); + } +} + +bool +_DateTimeBar::OnFocusGained(const _Control& control) +{ + __pDateTimeBarPresenter->ChangeFocusStatus(); + __pDateTimeBarPresenter->SetFocusedItemBounds(); + __pDateTimeBarPresenter->SetItemFocused(true); + + return true; +} + +bool +_DateTimeBar::OnFocusLost(const _Control& control) +{ + __pDateTimeBarPresenter->SetItemFocused(false); + return true; +} + +void +_DateTimeBar::OnFocusModeStateChanged(void) +{ + __pDateTimeBarPresenter->FocusModeChanged(); + Invalidate(); + return; +} + +void +_DateTimeBar::OnDrawFocus(void) +{ + return; +} + +bool +_DateTimeBar::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) +{ + return __pDateTimeBarPresenter->OnKeyPressed(source,keyInfo); +} + +bool +_DateTimeBar::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) +{ + _KeyCode keyCode = keyInfo.GetKeyCode(); + + if (keyCode == _KEY_ENTER && __isAnimating) + { + if (GetSelectedBoxId() >= DATETIME_ID_YEAR && GetSelectedBoxId() <= DATETIME_ID_DAY) + { + FireDateTimeChangeEvent(DATE_INTERNAL_CHANGE_CANCELED); + } + else if (GetSelectedBoxId() >= DATETIME_ID_HOUR && GetSelectedBoxId() <= DATETIME_ID_MINUTE) + { + FireDateTimeChangeEvent(TIME_INTERNAL_CHANGE_CANCELED); + } + __isAnimating = false; + SetVisibleState(false); + __pDateTimeBarPresenter->ClearPreviousText(); + Close(); + return true; + } + + return __pDateTimeBarPresenter->OnKeyReleased(source,keyInfo); +} + +bool +_DateTimeBar::OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return __pDateTimeBarPresenter->OnAccessibilityFocusMovedNext(control, element); +} + +bool +_DateTimeBar::OnAccessibilityFocusMovedPrevious(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return __pDateTimeBarPresenter->OnAccessibilityFocusMovedPrevious(control, element); +} + +bool +_DateTimeBar::OnAccessibilityReadingElement(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_DateTimeBar::OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_DateTimeBar::OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + if (__accessibilityFocusOutIndex == -1) + { + return false; + } + + float itemWidth = 0; + + if (GetSelectedBoxId() == DATETIME_ID_MONTH) + { + GET_SHAPE_CONFIG(DATETIMEBAR::MONTH_ITEM_WIDTH, _ControlManager::GetInstance()->GetOrientation(), itemWidth); + } + else if (GetSelectedBoxId() == DATETIME_ID_YEAR) + { + GET_SHAPE_CONFIG(DATETIMEBAR::YEAR_ITEM_WIDTH, _ControlManager::GetInstance()->GetOrientation(), itemWidth); + } + else + { + GET_SHAPE_CONFIG(DATETIMEBAR::DAY_ITEM_WIDTH, _ControlManager::GetInstance()->GetOrientation(), itemWidth); + } + + _AccessibilityElement* pFocusInAccessibilityElement = null; + + int focusInIndex = GetIndexFromAccessibilityElementPoint(FloatPoint(element.GetBounds().x, element.GetBounds().y)); + + pFocusInAccessibilityElement = GetAccessibilityElementAt(focusInIndex); + + if (__accessibilityFocusOutIndex < focusInIndex) + { + if (pFocusInAccessibilityElement != null && (pFocusInAccessibilityElement->GetBounds().x + pFocusInAccessibilityElement->GetBounds().width > + __pDateTimeBarPresenter->GetWindowBounds().x + __pDateTimeBarPresenter->GetWindowBounds().width)) + { + __pDateTimeBarPresenter->MoveNext(); + + } + } + else if (__accessibilityFocusOutIndex > focusInIndex) + { + if (pFocusInAccessibilityElement != null && pFocusInAccessibilityElement->GetBounds().x < 0) + { + __pDateTimeBarPresenter->MovePrevious(); + } + } + + return false; +} + +bool +_DateTimeBar::OnAccessibilityFocusOut(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + __accessibilityFocusOutIndex = GetIndexFromAccessibilityElementPoint(FloatPoint(element.GetBounds().x, element.GetBounds().y)); + + return false; +} + +bool +_DateTimeBar::OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_DateTimeBar::OnAccessibilityValueIncreased(const Tizen::Ui::_AccessibilityContainer&, const Tizen::Ui::_AccessibilityElement&) +{ + return false; +} + +bool +_DateTimeBar::OnAccessibilityValueDecreased(const Tizen::Ui::_AccessibilityContainer&, const Tizen::Ui::_AccessibilityElement&) +{ + return false; +} + +_AccessibilityElement* +_DateTimeBar::GetAccessibilityElementAt(int index) const +{ + result r = E_SUCCESS; + _AccessibilityElement* pAccessibilityElement = null; + + r = __accessibilityElements.GetAt(index, pAccessibilityElement); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + return pAccessibilityElement; +} + +int +_DateTimeBar::GetIndexFromAccessibilityElementPoint(const FloatPoint& point) const +{ + _AccessibilityElement* pAccessibilityElement = null; + + for (int index = __accessibilityElements.GetCount() -1; index >= 0; index--) + { + if ((__accessibilityElements.GetAt(index, pAccessibilityElement)) == E_SUCCESS) + { + if (pAccessibilityElement->GetBounds().Contains(point)) + { + return index; + } + } + } + + return -1; +} + +VisualElementAnimationGroup* +_DateTimeBar::CreateAnimationN(VisualElement& source, bool open) +{ + FloatRectangle startValue = source.GetBounds(); + VisualElementAnimationGroup* pAnimationGroup = new (std::nothrow) VisualElementAnimationGroup(); + SysTryReturn(NID_UI_CTRL, pAnimationGroup, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + VisualElementPropertyAnimation* pOpacityAnimation = null; + VisualElementPropertyAnimation* pBoundsAnimation = null; + String* pUserData = null; + + pAnimationGroup->SetDuration(ANIMATION_DURATION); + + pOpacityAnimation = new (std::nothrow) VisualElementPropertyAnimation(); + SysTryCatch(NID_UI_CTRL, (pOpacityAnimation != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pOpacityAnimation->SetPropertyName("opacity"); + + if (open) + { + pUserData = new (std::nothrow) String(L"BarOpenAnimation"); + SysTryCatch(NID_UI_CTRL, pUserData, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pOpacityAnimation->SetStartValue(Variant(0.0f)); + pOpacityAnimation->SetEndValue(Variant(1.0f)); + } + else + { + pUserData = new (std::nothrow) String(L"BarCloseAnimation"); + SysTryCatch(NID_UI_CTRL, pUserData, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pOpacityAnimation->SetStartValue(Variant(1.0f)); + pOpacityAnimation->SetEndValue(Variant(0.0f)); + } + pOpacityAnimation->SetDuration(ANIMATION_DURATION); + pAnimationGroup->AddAnimation(*pOpacityAnimation); + delete pOpacityAnimation; + pOpacityAnimation = null; + + pBoundsAnimation = new (std::nothrow) VisualElementPropertyAnimation(); + SysTryCatch(NID_UI_CTRL, (pBoundsAnimation != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pBoundsAnimation->SetPropertyName(L"bounds.position"); + + if (GetAlignment() == DATETIME_BAR_ALIGN_DOWN) + { + startValue.y = startValue.y - POSITION_ANIMATION_VALUE; + } + else + { + startValue.y = startValue.y + POSITION_ANIMATION_VALUE; + } + + if (open) + { + pBoundsAnimation->SetStartValue(Variant(FloatPoint(startValue.x, startValue.y))); + pBoundsAnimation->SetEndValue(Variant(FloatPoint(source.GetBounds().x, source.GetBounds().y))); + pBoundsAnimation->SetUserData((void*)(pUserData)); + } + else + { + pBoundsAnimation->SetStartValue(Variant(FloatPoint(source.GetBounds().x, source.GetBounds().y))); + pBoundsAnimation->SetEndValue(Variant(FloatPoint(startValue.x, startValue.y))); + pBoundsAnimation->SetUserData((void*)(pUserData)); + } + pBoundsAnimation->SetDuration(ANIMATION_DURATION); + pBoundsAnimation->SetVisualElementAnimationStatusEventListener(this); + __isAnimating = true; + pAnimationGroup->AddAnimation(*pBoundsAnimation); + delete pBoundsAnimation; + pBoundsAnimation = null; + + return pAnimationGroup; + +CATCH: + delete pAnimationGroup; + delete pOpacityAnimation; + delete pUserData; + return null; +} + +void +_DateTimeBar::CloseDateTimeBar() +{ + VisualElement* pVisualElement = 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."); + pAnimation = CreateAnimationN(*pVisualElement, false); + SysTryReturnVoidResult(NID_UI_CTRL, pAnimation != null, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + pVisualElement->AddAnimation(L"BarCloseAnimation", *pAnimation); + + delete pAnimation; +} + +void +_DateTimeBar::OnVisualElementAnimationFinished (const VisualElementAnimation &animation, const String &keyName, VisualElement &target, bool completedNormally) +{ + String* pUserData = (String*) animation.GetUserData(); + + if ((pUserData != null) && (*pUserData == String(L"BarOpenAnimation"))) + { + RefreshItems(); + } + else if ((pUserData != null) && (*pUserData == String(L"BarCloseAnimation"))) + { + FloatRectangle bounds = target.GetBounds(); + + 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); + } + __isAnimating = false; + + delete pUserData; +} + +void +_DateTimeBar::ChangeLayout(void) +{ + __pDateTimeBarPresenter->ChangeLayout(); +} + +void +_DateTimeBar::ClearPreviousText(void) +{ + __pDateTimeBarPresenter->ClearPreviousText(); +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_DateTimeBarItem.cpp b/src/ui/controls/FUiCtrl_DateTimeBarItem.cpp new file mode 100644 index 0000000..3023ae2 --- /dev/null +++ b/src/ui/controls/FUiCtrl_DateTimeBarItem.cpp @@ -0,0 +1,121 @@ +// +// 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_DateTimeBarItem.cpp + * @brief This is the implementation file for the _DateTimeBarItem class. + */ + +#include "FUi_ResourceManager.h" +#include "FUiCtrl_DateTimeBarItem.h" + +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ +_DateTimeBarItem::_DateTimeBarItem(void) + : __actionId(-1) + , __text() + , __status(DATETIMEBAR_ITEM_STATUS_NORMAL) + , __bounds(FloatRectangle()) +{ + ClearLastResult(); +} + +_DateTimeBarItem::~_DateTimeBarItem(void) +{ +} + +_DateTimeBarItem* +_DateTimeBarItem::CreateInstanceN(_DateTimeBarAlignment alignment, float itemWidth) +{ + _DateTimeBarItem* pItem = new (std::nothrow) _DateTimeBarItem; + SysTryReturn(NID_UI_CTRL, pItem != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + result r = E_SUCCESS; + + if (alignment == DATETIME_BAR_ALIGN_DOWN) + { + r = GET_SHAPE_CONFIG(DATETIMEBAR::ARROW_HEIGHT, _ControlManager::GetInstance()->GetOrientation(), pItem->__bounds.y); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + pItem->__bounds.width = itemWidth; + + r = GET_SHAPE_CONFIG(DATETIMEBAR::ITEM_HEIGHT, _ControlManager::GetInstance()->GetOrientation(), pItem->__bounds.height); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return pItem; + +CATCH: + delete pItem; + return null; +} + +void +_DateTimeBarItem::SetActionId(int actionId) +{ + __actionId = actionId; + return; +} + +int +_DateTimeBarItem::GetActionId(void) const +{ + return __actionId; +} + +void +_DateTimeBarItem::SetText(const Tizen::Base::String& text) +{ + __text = text; + return; +} + +Tizen::Base::String +_DateTimeBarItem::GetText(void) const +{ + return __text; +} + +void +_DateTimeBarItem::SetStatus(_DateTimeBarItemStatus status) +{ + __status = status; + return; +} + +_DateTimeBarItemStatus +_DateTimeBarItem::GetStatus(void) const +{ + return __status; +} + +void +_DateTimeBarItem::SetBounds(const Tizen::Graphics::FloatRectangle& bounds) +{ + __bounds = bounds; + return; +} + +FloatRectangle +_DateTimeBarItem::GetBounds(void) const +{ + return __bounds; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_DateTimeBarModel.cpp b/src/ui/controls/FUiCtrl_DateTimeBarModel.cpp new file mode 100644 index 0000000..0c9fb9b --- /dev/null +++ b/src/ui/controls/FUiCtrl_DateTimeBarModel.cpp @@ -0,0 +1,233 @@ +// +// 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_DateTimeBarModel.cpp + * @brief This is the implementation file for the _DateTimeBarModel class. + */ + +#include "FUiCtrl_DateTimeBarModel.h" + +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ +const int CACHING_SIZE = 50; + +_DateTimeBarModel::_DateTimeBarModel(void) + : __selectedItemIndex(-1) + , __firstDrawnItemIndex(0) + , __minValue(-1) + , __maxValue(-1) + , __maxCachingSize(CACHING_SIZE) + , __itemStartPositionX(0) +{ +} + +_DateTimeBarModel::~_DateTimeBarModel(void) +{ + __dateTimeBarItems.RemoveAll(true); +} + +_DateTimeBarModel* +_DateTimeBarModel::CreateInstanceN(void) +{ + _DateTimeBarModel* pDateTimeBarModel = new (std::nothrow) _DateTimeBarModel; + SysTryReturn(NID_UI_CTRL, pDateTimeBarModel, null, E_OUT_OF_MEMORY, + "[E_OUT_OF_MEMORY] Memory allocation failed."); + + result r = E_SUCCESS; + r = pDateTimeBarModel->__dateTimeBarItems.Construct(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return pDateTimeBarModel; + +CATCH: + delete pDateTimeBarModel; + return null; +} + +void +_DateTimeBarModel::SetSelectedItemIndex(int index) +{ + __selectedItemIndex = index; + return; +} + +int +_DateTimeBarModel::GetSelectedItemIndex(void) const +{ + return __selectedItemIndex; +} + +void +_DateTimeBarModel::SetFirstDrawnItemIndex(int index) +{ + __firstDrawnItemIndex = index; + return; +} + +int +_DateTimeBarModel::GetFirstDrawnItemIndex(void) const +{ + return __firstDrawnItemIndex; +} + +int +_DateTimeBarModel::GetItemCount(void) const +{ + return __dateTimeBarItems.GetCount(); +} + +result +_DateTimeBarModel::AddItem(const Tizen::Base::String& text, int actionId, _DateTimeBarAlignment alignment, float itemWidth, float margin) +{ + _DateTimeBarItem* pItem = _DateTimeBarItem::CreateInstanceN(alignment, itemWidth); + + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pItem != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + pItem->SetText(text); + pItem->SetActionId(actionId); + + int itemCount = 0; + _DateTimeBarItem* pPrevItem = null; + + itemCount = GetItemCount(); + + if (itemCount > 0) + { + pPrevItem = GetItemAt(itemCount - 1); + } + else + { + FloatRectangle itemBounds = pItem->GetBounds(); + itemBounds.x = __itemStartPositionX; + + pItem->SetBounds(itemBounds); + } + + if (pPrevItem != null) + { + FloatRectangle prevItemBounds = pPrevItem->GetBounds(); + FloatRectangle itemBounds = pItem->GetBounds(); + itemBounds.x = prevItemBounds.x + prevItemBounds.width + margin; + + pItem->SetBounds(itemBounds); + } + + return __dateTimeBarItems.Add(*pItem); +} + +result +_DateTimeBarModel::InsertItemAt(int index, const Tizen::Base::String& text, int actionId, _DateTimeBarAlignment alignment, float itemWidth, float margin) +{ + _DateTimeBarItem* pItem = _DateTimeBarItem::CreateInstanceN(alignment, itemWidth); + + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pItem != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + pItem->SetText(text); + pItem->SetActionId(actionId); + + _DateTimeBarItem* pPrevItem = GetItemAt(index); + if (pPrevItem != null) + { + FloatRectangle prevItemBounds = pPrevItem->GetBounds(); + FloatRectangle itemBounds = pItem->GetBounds(); + itemBounds.x = prevItemBounds.x - itemBounds.width - margin; + + pItem->SetBounds(itemBounds); + } + + return __dateTimeBarItems.InsertAt(*pItem, index); +} + +result +_DateTimeBarModel::RemoveItemAt(int index) +{ + if (GetFirstDrawnItemIndex() == index) + { + if (GetItemAt(index + 1) == null) + { + SetFirstDrawnItemIndex(-1); + } + } + + return __dateTimeBarItems.RemoveAt(index, true); +} + +void +_DateTimeBarModel::RemoveAllItems() +{ + __dateTimeBarItems.RemoveAll(true); + SetFirstDrawnItemIndex(0); + SetSelectedItemIndex(-1); + return; +} + +const _DateTimeBarItem* +_DateTimeBarModel::GetItemAt(int index) const +{ + return dynamic_cast (__dateTimeBarItems.GetAt(index)); +} + +_DateTimeBarItem* +_DateTimeBarModel::GetItemAt(int index) +{ + return dynamic_cast <_DateTimeBarItem*>(__dateTimeBarItems.GetAt(index)); +} + +int +_DateTimeBarModel::GetMinimumValue(void) const +{ + return __minValue; +} + +void +_DateTimeBarModel::SetMinimumValue(int minValue) +{ + __minValue = minValue; + return; +} + +int +_DateTimeBarModel::GetMaximumValue(void) const +{ + return __maxValue; +} + +void +_DateTimeBarModel::SetMaximumValue(int maxValue) +{ + __maxValue = maxValue; + return; +} + +int +_DateTimeBarModel::GetMaxCachingSize(void) const +{ + return __maxCachingSize; +} + +result +_DateTimeBarModel::SetItemStartPosition(float positionX) +{ + __itemStartPositionX = positionX; + return E_SUCCESS; +} +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_DateTimeBarPresenter.cpp b/src/ui/controls/FUiCtrl_DateTimeBarPresenter.cpp new file mode 100644 index 0000000..449b687 --- /dev/null +++ b/src/ui/controls/FUiCtrl_DateTimeBarPresenter.cpp @@ -0,0 +1,1921 @@ +// +// 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_DateTimeBarPresenter.cpp + * @brief This is the implementation file for the _DateTimeBarPresenter class. + */ + +#include +#include +#include +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_ResourceManager.h" +#include "FUiAnim_VisualElement.h" +#include "FUiCtrl_DateTimeUtils.h" +#include "FUiCtrl_DateTimeBar.h" +#include "FUiCtrl_DateTimeBarPresenter.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Graphics::_Text; +using namespace Tizen::Ui::Animations; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_DateTimeBarPresenter::_DateTimeBarPresenter(_DateTimeBar* pDateTimeBar) + : __pDateTimeBar(pDateTimeBar) + , __pDateTimeBarModel(null) + , __currentPoint(FloatPoint(0.0f, 0.0f)) + , __isTouchMoved(false) + , __touchMoveHandled(false) + , __isFlickEnabled(true) + , __isFlickInProgress(false) + , __distance(0.0f) + , __pFlickAnimationTimer(null) + , __flickAnimation() + , __selectedText(L"") + , __focusedText(L"") + , __prevFocusedText(L"") + , __prevSelectedText(L"") + , __bodyAreaBounds(FloatRectangle()) + , __arrowAreaBounds(FloatRectangle()) + , __windowAreaBounds(FloatRectangle()) + , __pBgColorReplacementBitmap(null) + , __pFocusBitmap(null) + , __pArrowColorReplacementBitmap(null) + , __isInitialAnimation(false) + , __initialAnimationValue(0.0f) + , __pFont(null) + , __isFocused(false) + , __focusedIndex(-1) + , __focusBounds(FloatRectangle()) + , __isFlickCanceled(false) + , __isChangeLayout(false) +{ +} + +_DateTimeBarPresenter::~_DateTimeBarPresenter(void) +{ + delete __pDateTimeBarModel; + __pDateTimeBarModel = 0; + + delete __pBgColorReplacementBitmap; + __pBgColorReplacementBitmap = null; + + delete __pFocusBitmap; + __pFocusBitmap = null; + + delete __pArrowColorReplacementBitmap; + __pArrowColorReplacementBitmap = null; + + delete __pFlickAnimationTimer; + __pFlickAnimationTimer = null; + + delete __pFont; + __pFont = null; +} + +_DateTimeBarPresenter* +_DateTimeBarPresenter::CreateInstanceN(_DateTimeBar& dateTimeBar) +{ + result r = E_SUCCESS; + + _DateTimeBarPresenter* pDateTimeBarPresenter = new (std::nothrow) _DateTimeBarPresenter(&dateTimeBar); + SysTryReturn(NID_UI_CTRL, pDateTimeBarPresenter, null, E_OUT_OF_MEMORY, + "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pDateTimeBarPresenter->__pDateTimeBarModel = _DateTimeBarModel::CreateInstanceN(); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, pDateTimeBarPresenter->__pDateTimeBarModel, , r, + "[%s] Propagating.", GetErrorMessage(r)); + + r = GET_SHAPE_CONFIG(DATETIMEBAR::ARROW_WIDTH, dateTimeBar.GetOrientation(), pDateTimeBarPresenter->__arrowAreaBounds.width); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to get arrow width from resource.", GetErrorMessage(r)); + + r = GET_SHAPE_CONFIG(DATETIMEBAR::ARROW_HEIGHT, dateTimeBar.GetOrientation(), pDateTimeBarPresenter->__arrowAreaBounds.height); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to get arrow height from resource.", GetErrorMessage(r)); + + r = pDateTimeBarPresenter->LoadResource(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to load the resources.", GetErrorMessage(r)); + + return pDateTimeBarPresenter; + +CATCH: + delete pDateTimeBarPresenter; + + return null; +} + +void +_DateTimeBarPresenter::AddFlickAnimationInfo() +{ + __flickAnimation.SetSensitivity(FLICK_ANIMATION_FPS_DATE_TIME_BAR, FLICK_ANIMATION_SENSITIVITY_DATE_TIME_BAR); + __flickAnimation.SetDirection(FD_HORIZONTAL); +} + +result +_DateTimeBarPresenter::LoadResource(void) +{ + result r = E_SUCCESS; + Color bgBitmapColor; + + GET_COLOR_CONFIG(DATETIMEBAR::BG_NORMAL, bgBitmapColor); + + 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)); + + r = LoadArrowBitmap(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to load resources.", GetErrorMessage(r)); + + AddFlickAnimationInfo(); + + return r; + +CATCH: + + delete __pBgColorReplacementBitmap; + __pBgColorReplacementBitmap = null; + + delete __pFocusBitmap; + __pFocusBitmap = null; + + return r; +} + +result +_DateTimeBarPresenter::LoadArrowBitmap(void) +{ + result r = E_SUCCESS; + Color arrowColor; + + GET_COLOR_CONFIG(DATETIMEBAR::BG_NORMAL, arrowColor); + + if (__pArrowColorReplacementBitmap != null) + { + delete __pArrowColorReplacementBitmap; + __pArrowColorReplacementBitmap = null; + } + + if (__pDateTimeBar->GetAlignment() == DATETIME_BAR_ALIGN_DOWN) + { + 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_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)); + } + + return r; +} + +result +_DateTimeBarPresenter::Draw(void) +{ + result r = E_SUCCESS; + + Canvas* pCanvas = __pDateTimeBar->GetCanvasN(); + SysAssertf((pCanvas != null), "Failed to get canvas."); + + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + + r = pCanvas->Clear(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = DrawBackground(*pCanvas); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + if (__isFocused && !__isChangeLayout) + { + ChangeFocusStatus(); + } + + r = DrawItem(*pCanvas); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = DrawArrow(*pCanvas); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + +CATCH: + delete pCanvas; + return r; +} + +void +_DateTimeBarPresenter::ChangeFocusStatus(void) +{ + _DateTimeBarItem* pItem = null; + + if (__focusedIndex == -1) + { + __focusedIndex = GetSelectedItemIndex() - 1; + } + pItem = GetItemAt(__focusedIndex); + + if (pItem != null) + { + __focusedText.Clear(); + __focusedText.Append(pItem->GetText().GetPointer()); + } + SetItemStatus(__focusedIndex, DATETIMEBAR_ITEM_STATUS_HIGHLIGHTED); +} + +void +_DateTimeBarPresenter::SetItemFocused(bool isFocused) +{ + __isFocused = isFocused; + if (!__isFocused) + { + __focusedIndex = -1; + } + return; +} + +void +_DateTimeBarPresenter::SetFocusedItemBounds() +{ + _DateTimeBarItem* pItem = null; + + if (__focusedIndex > 0) + { + pItem = GetItemAt(__focusedIndex); + SysTryReturnVoidResult(NID_UI, pItem != null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + __focusBounds = pItem->GetBounds(); + } +} + +void +_DateTimeBarPresenter::FocusModeChanged(void) +{ + __isFocused = false; + SetItemStatus(__focusedIndex, DATETIMEBAR_ITEM_STATUS_NORMAL); + return; +} + +result +_DateTimeBarPresenter::DrawItem(Canvas& canvas) +{ + result r = E_SUCCESS; + + FloatRectangle clientBounds = canvas.GetBoundsF(); + + _DateTimeBarItem* pDrawItem = null; + FloatRectangle itemBounds(0.0f, 0.0f, 0.0f, 0.0f); + + String drawText; + + Color textColor; + GET_COLOR_CONFIG(DATETIMEBAR::TEXT_NORMAL, textColor); + + Color textPressedColor; + GET_COLOR_CONFIG(DATETIMEBAR::TEXT_PRESSED, textPressedColor); + + _DateTimeBarItemStatus itemStatus = DATETIMEBAR_ITEM_STATUS_NORMAL; + + int itemCount = GetItemCount(); + + for (int i = 0; i < itemCount; i++) + { + pDrawItem = __pDateTimeBarModel->GetItemAt(i); + if (pDrawItem == null) + { + break; + } + + itemBounds = pDrawItem->GetBounds(); + + if (itemBounds.x + itemBounds.width <= 0) + { + continue; + } + + drawText = pDrawItem->GetText(); + if (__isFocused) + { + if (drawText.CompareTo(__focusedText) == 0) + { + pDrawItem->SetStatus(DATETIMEBAR_ITEM_STATUS_HIGHLIGHTED); + __prevFocusedText = __focusedText; + } + else + { + pDrawItem->SetStatus(DATETIMEBAR_ITEM_STATUS_NORMAL); + } + } + else + { + if (drawText.CompareTo(__selectedText) == 0) + { + pDrawItem->SetStatus(DATETIMEBAR_ITEM_STATUS_SELECTED); + } + } + + itemStatus = pDrawItem->GetStatus(); + + float fontSize = GetFontSize(); + + TextSimple* pSimpleText = null; + 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(); + pSimpleText = new (std::nothrow)TextSimple((const_cast (drawText.GetPointer())), drawText.GetLength(), TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL); + pTextObject->AppendElement(*pSimpleText); + + pTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_CENTER | TEXT_OBJECT_ALIGNMENT_MIDDLE); + pTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE); + pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); + + SysAssertf(__pFont != null, "Font instance is null"); + + if (itemStatus == DATETIMEBAR_ITEM_STATUS_SELECTED || itemStatus == DATETIMEBAR_ITEM_STATUS_HIGHLIGHTED) + { + (_FontImpl::GetInstance(*__pFont))->SetSize(fontSize); + (_FontImpl::GetInstance(*__pFont))->SetStyle(FONT_STYLE_BOLD); + pTextObject->SetFont(__pFont, 0, pTextObject->GetTextLength()); + pTextObject->SetForegroundColor(textPressedColor, 0, pTextObject->GetTextLength()); + } + else + { + (_FontImpl::GetInstance(*__pFont))->SetSize(fontSize); + (_FontImpl::GetInstance(*__pFont))->SetStyle(FONT_STYLE_PLAIN); + pTextObject->SetFont(__pFont, 0, pTextObject->GetTextLength()); + pTextObject->SetForegroundColor(textColor, 0, pTextObject->GetTextLength()); + } + + pTextObject->SetBounds(itemBounds); + pTextObject->Draw(*_CanvasImpl::GetInstance(canvas)); + + delete pTextObject; + + if ((itemBounds.x + itemBounds.width + GetLeftRightMargin()) >= clientBounds.width) + { + break; + } + } + + return r; +} + +result +_DateTimeBarPresenter::DrawBackground(Canvas& canvas) +{ + result r = E_SUCCESS; + + FloatRectangle bodyAreaBounds = GetBodyBounds(); + + if (__pBgColorReplacementBitmap != null) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pBgColorReplacementBitmap)) + { + r = canvas.DrawNinePatchedBitmap(bodyAreaBounds, *__pBgColorReplacementBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + else + { + r = canvas.DrawBitmap(bodyAreaBounds, *__pBgColorReplacementBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + } + + else + { + r = canvas.DrawRectangle(bodyAreaBounds); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + + return r; +} + +result +_DateTimeBarPresenter::DrawArrow(Canvas& canvas) +{ + result r = E_SUCCESS; + FloatRectangle arrowAreaBounds = GetArrowBounds(); + + if (__pArrowColorReplacementBitmap != null) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pArrowColorReplacementBitmap)) + { + r = canvas.DrawNinePatchedBitmap(arrowAreaBounds, *__pArrowColorReplacementBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + else + { + r = canvas.DrawBitmap(arrowAreaBounds, *__pArrowColorReplacementBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + } + + return r; +} + +void +_DateTimeBarPresenter::SetItemSelected(int index) +{ + __pDateTimeBarModel->SetSelectedItemIndex(index); + return; +} + +int +_DateTimeBarPresenter::GetSelectedItemIndex(void) const +{ + return __pDateTimeBarModel->GetSelectedItemIndex(); +} + +int +_DateTimeBarPresenter::GetItemIndexFromPosition(const FloatPoint& point) const +{ + FloatRectangle clientBounds = __pDateTimeBar->GetBoundsF(); + + if (point.x > clientBounds.width + || point.y > clientBounds.height) + { + return -1; + } + + int itemIndex = __pDateTimeBarModel->GetFirstDrawnItemIndex(); + _DateTimeBarItem* pItem = __pDateTimeBarModel->GetItemAt(itemIndex); + float startX = 0.0f; + float itemMargin = 0.0f; + itemMargin = GetItemMargin(); + + while (pItem != null) + { + FloatRectangle itemBounds = pItem->GetBounds(); + + if (itemBounds.x > clientBounds.x) + { + if (itemIndex == __pDateTimeBarModel->GetFirstDrawnItemIndex()) + { + startX = itemBounds.x; + } + + itemBounds.x -= startX; + } + + itemBounds.x = itemBounds.x - (itemMargin / 2.0f); + itemBounds.width = itemBounds.width + itemMargin; + + if (itemBounds.Contains(point)) + { + return itemIndex; + } + + itemIndex++; + + if (itemIndex == GetItemCount()) + { + break; + } + + pItem = __pDateTimeBarModel->GetItemAt(itemIndex); + } + + return -1; +} + +result +_DateTimeBarPresenter::SetItemStatus(int index, _DateTimeBarItemStatus status) +{ + _DateTimeBarItem* pItem = __pDateTimeBarModel->GetItemAt(index); + SysTryReturn(NID_UI_CTRL, pItem, E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get _DateTimeBarItem at index (%d).", index); + + if (status == DATETIMEBAR_ITEM_STATUS_SELECTED) + { + __pDateTimeBarModel->SetSelectedItemIndex(index); + } + pItem->SetStatus(status); + + return E_SUCCESS; +} + +_DateTimeBarItemStatus +_DateTimeBarPresenter::GetItemStatus(int index) const +{ + _DateTimeBarItem* pItem = __pDateTimeBarModel->GetItemAt(index); + SysTryReturn(NID_UI_CTRL, pItem, DATETIMEBAR_ITEM_STATUS_NORMAL, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get _DateTimeBarItem at index (%d).", index); + + return pItem->GetStatus(); +} + +int +_DateTimeBarPresenter::GetFirstDrawnItemIndex(void) const +{ + return __pDateTimeBarModel->GetFirstDrawnItemIndex(); +} + +void +_DateTimeBarPresenter::SetFirstDrawnItemIndex(int index) +{ + __pDateTimeBarModel->SetFirstDrawnItemIndex(index); + return; +} + +int +_DateTimeBarPresenter::GetMinimumValue(void) const +{ + return __pDateTimeBarModel->GetMinimumValue(); +} + +void +_DateTimeBarPresenter::SetMinimumValue(int minValue) +{ + __pDateTimeBarModel->SetMinimumValue(minValue); + return; +} + +int +_DateTimeBarPresenter::GetMaximumValue(void) const +{ + return __pDateTimeBarModel->GetMaximumValue(); +} + +void +_DateTimeBarPresenter::SetMaximumValue(int maxValue) +{ + __pDateTimeBarModel->SetMaximumValue(maxValue); + return; +} + +float +_DateTimeBarPresenter::GetItemWidth(void) const +{ + result r = E_SUCCESS; + + _DateTimeId boxId = __pDateTimeBar->GetSelectedBoxId(); + + float itemWidth = 0.0f; + + if (boxId == DATETIME_ID_YEAR) + { + GET_SHAPE_CONFIG(DATETIMEBAR::YEAR_ITEM_WIDTH, _ControlManager::GetInstance()->GetOrientation(), itemWidth); + } + else if (boxId == DATETIME_ID_DAY || boxId == DATETIME_ID_HOUR || boxId == DATETIME_ID_MINUTE) + { + GET_SHAPE_CONFIG(DATETIMEBAR::DAY_ITEM_WIDTH, _ControlManager::GetInstance()->GetOrientation(), itemWidth); + } + else if (boxId == DATETIME_ID_MONTH) + { + GET_SHAPE_CONFIG(DATETIMEBAR::MONTH_ITEM_WIDTH, _ControlManager::GetInstance()->GetOrientation(), itemWidth); + + FloatDimension textArea; + + float fontSize = 0; + GET_SHAPE_CONFIG(DATETIMEBAR::MONTH_FONT_SIZE, __pDateTimeBar->GetOrientation(), fontSize); + + SysAssertf(__pFont != null, "Font instance is null"); + + (_FontImpl::GetInstance(*__pFont))->SetSize(fontSize); + (_FontImpl::GetInstance(*__pFont))->SetStyle(FONT_STYLE_PLAIN); + + for (int i = DATETIME_MONTH_MIN; i <= DATETIME_MONTH_MAX; i++) + { + String string; + _DateTimeUtils dateTimeUtils; + string = dateTimeUtils.GetMonthString(i); + + r = __pFont->GetTextExtent(string, string.GetLength(), textArea); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (textArea.width > itemWidth) + { + itemWidth = textArea.width; + } + } + } + + return itemWidth; +} + +float +_DateTimeBarPresenter::GetFontSize(void) const +{ + float fontSize = 0.0f; + _DateTimeId boxId = __pDateTimeBar->GetSelectedBoxId(); + + if (boxId == DATETIME_ID_YEAR) + { + GET_SHAPE_CONFIG(DATETIMEBAR::YEAR_FONT_SIZE, _ControlManager::GetInstance()->GetOrientation(), fontSize); + } + else if (boxId == DATETIME_ID_DAY || boxId == DATETIME_ID_HOUR || boxId == DATETIME_ID_MINUTE) + { + GET_SHAPE_CONFIG(DATETIMEBAR::DAY_FONT_SIZE, _ControlManager::GetInstance()->GetOrientation(), fontSize); + } + else if (boxId == DATETIME_ID_MONTH) + { + GET_SHAPE_CONFIG(DATETIMEBAR::MONTH_FONT_SIZE, _ControlManager::GetInstance()->GetOrientation(), fontSize); + } + + return fontSize; +} + +float +_DateTimeBarPresenter::GetLeftRightMargin(void) const +{ + float leftRightMargin = 0.0f; + _DateTimeId boxId = __pDateTimeBar->GetSelectedBoxId(); + + if (boxId == DATETIME_ID_YEAR) + { + GET_SHAPE_CONFIG(DATETIMEBAR::YEAR_LEFT_RIGHT_MARGIN, _ControlManager::GetInstance()->GetOrientation(), leftRightMargin); + } + else if (boxId == DATETIME_ID_DAY || boxId == DATETIME_ID_HOUR || boxId == DATETIME_ID_MINUTE) + { + GET_SHAPE_CONFIG(DATETIMEBAR::DAY_LEFT_RIGHT_MARGIN, _ControlManager::GetInstance()->GetOrientation(), leftRightMargin); + } + else if (boxId == DATETIME_ID_MONTH) + { + GET_SHAPE_CONFIG(DATETIMEBAR::MONTH_LEFT_RIGHT_MARGIN, _ControlManager::GetInstance()->GetOrientation(), leftRightMargin); + } + + return leftRightMargin; +} + +float +_DateTimeBarPresenter::GetItemMargin(void) const +{ + float margin = 0.0f; + _DateTimeId boxId = __pDateTimeBar->GetSelectedBoxId(); + + if (boxId == DATETIME_ID_YEAR) + { + GET_SHAPE_CONFIG(DATETIMEBAR::YEAR_ITEM_MARGIN, _ControlManager::GetInstance()->GetOrientation(), margin); + } + else if (boxId == DATETIME_ID_DAY || boxId == DATETIME_ID_HOUR || boxId == DATETIME_ID_MINUTE) + { + GET_SHAPE_CONFIG(DATETIMEBAR::DAY_ITEM_MARGIN, _ControlManager::GetInstance()->GetOrientation(), margin); + } + else if (boxId == DATETIME_ID_MONTH) + { + GET_SHAPE_CONFIG(DATETIMEBAR::MONTH_ITEM_MARGIN, _ControlManager::GetInstance()->GetOrientation(), margin); + } + + return margin; +} + +result +_DateTimeBarPresenter::AdjustItemPosition(float distance) +{ + int index = 0; + + _DateTimeBarItem* pItem = null; + + pItem = __pDateTimeBarModel->GetItemAt(index); + + while (pItem != null) + { + FloatRectangle bounds = pItem->GetBounds(); + bounds.x += distance; + pItem->SetBounds(bounds); + index++; + + if (index == GetItemCount()) + { + break; + } + + pItem = __pDateTimeBarModel->GetItemAt(index); + } + + return AdjustAccessibilityElementPosition(distance); +} + +result +_DateTimeBarPresenter::AdjustAccessibilityElementPosition(float distance) +{ + _AccessibilityElement* pAccessibilityElement = null; + + int index = 0; + + pAccessibilityElement = __pDateTimeBar->GetAccessibilityElementAt(index); + + while (pAccessibilityElement != null) + { + FloatRectangle bounds = pAccessibilityElement->GetBounds(); + bounds.x += distance; + pAccessibilityElement->SetBounds(bounds); + index++; + + if (index == GetItemCount()) + { + break; + } + + pAccessibilityElement = __pDateTimeBar->GetAccessibilityElementAt(index); + } + + return E_SUCCESS; +} + +String +_DateTimeBarPresenter::GetDisplayedText(int value) const +{ + String string; + + if (__pDateTimeBar->GetSelectedBoxId() == DATETIME_ID_MONTH) + { + String monthString; + _DateTimeUtils dateTimeUtils; + monthString = dateTimeUtils.GetMonthString(value); + string.Append(monthString); + } + else if (__pDateTimeBar->GetSelectedBoxId() == DATETIME_ID_YEAR) + { + string.Format(10, L"%04d", value); + } + else + { + string.Format(10, L"%02d", value); + } + + return string; +} + +result +_DateTimeBarPresenter::AddItems(int actionId) +{ + result r = E_SUCCESS; + int cachingSize = __pDateTimeBarModel->GetMaxCachingSize() / 2; + + int firstDrawItemIndex = cachingSize; + + int value = actionId; + float startPosition = 0.0f; + float itemWidth = GetItemWidth(); + float itemMargin = GetItemMargin(); + + startPosition = (GetWindowBounds().width) / 2.0f; + startPosition = startPosition + (itemWidth / 2.0f) + itemMargin; + __pDateTimeBarModel->SetItemStartPosition(startPosition); + + while (cachingSize > 0) + { + String string; + + string = GetDisplayedText(value); + + r = __pDateTimeBarModel->AddItem(string, value, __pDateTimeBar->GetAlignment(), itemWidth, itemMargin); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + AddAccessibilityElement(); + cachingSize--; + + value++; + + if (__pDateTimeBarModel->GetMaximumValue() < value) + { + value = __pDateTimeBarModel->GetMinimumValue(); + } + } + + r = InsertItems(actionId -1); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _DateTimeBarItem* pItem = null; + pItem = GetItemAt(firstDrawItemIndex); + + if (pItem != null) + { + __selectedText.Clear(); + __selectedText.Append(pItem->GetText().GetPointer()); + if (__prevSelectedText.IsEmpty()) + { + __prevSelectedText.Append(__selectedText); + } + __focusedIndex = (firstDrawItemIndex - 1); + __focusedValue = pItem->GetActionId(); + } + + SetItemStatus(firstDrawItemIndex, DATETIMEBAR_ITEM_STATUS_SELECTED); + + return r; +} + +result +_DateTimeBarPresenter::InsertItems(int actionId) +{ + result r = E_SUCCESS; + + int cachingSize = __pDateTimeBarModel->GetMaxCachingSize() / 2; + + int value = actionId; + float itemWidth = GetItemWidth(); + float itemMargin = GetItemMargin(); + + while (cachingSize > 0) + { + String string; + + if (value < __pDateTimeBarModel->GetMinimumValue()) + { + value = __pDateTimeBarModel->GetMaximumValue(); + } + + string = GetDisplayedText(value); + r = __pDateTimeBarModel->InsertItemAt(0, string, value, __pDateTimeBar->GetAlignment(), itemWidth, itemMargin); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + InsertAccessibilityElementAt(0); + cachingSize--; + + value--; + } + + return r; +} + +result +_DateTimeBarPresenter::InsertItem(int index, int actionId) +{ + result r = E_SUCCESS; + + String string; + + string = GetDisplayedText(actionId); + + r = __pDateTimeBarModel->InsertItemAt(index, string, actionId, __pDateTimeBar->GetAlignment(), GetItemWidth(), GetItemMargin()); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + InsertAccessibilityElementAt(index); + return r; +} + +result +_DateTimeBarPresenter::AddItem(int actionId) +{ + result r = E_SUCCESS; + + String string; + + string = GetDisplayedText(actionId); + + r = __pDateTimeBarModel->AddItem(string, actionId, __pDateTimeBar->GetAlignment(), GetItemWidth(), GetItemMargin()); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + AddAccessibilityElement(); + return r; +} + +result +_DateTimeBarPresenter::DeleteItem(int index) +{ + int itemCount = GetItemCount(); + + SysTryReturn(NID_UI_CTRL, itemCount > 0, E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] Invalid argument is used. index = %d", index); + + SysTryReturn(NID_UI_CTRL, index < itemCount, E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] Invalid argument is used. index = %d", index); + + SysTryReturn(NID_UI_CTRL, index >= 0, E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] Invalid argument is used. index = %d", index); + + result r = E_SUCCESS; + + r = __pDateTimeBarModel->RemoveItemAt(index); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pDateTimeBar->RemoveAccessibilityElementAt(index); + + return r; +} + +result +_DateTimeBarPresenter::RemoveAllItems(void) +{ + SysTryReturn(NID_UI_CTRL, GetItemCount() > 0, E_INVALID_OPERATION, E_INVALID_OPERATION, + "[E_INVALID_OPERATION] Items count is zero."); + + result r = E_SUCCESS; + + __pDateTimeBarModel->RemoveAllItems(); + + __pDateTimeBar->RemoveAllAccessibilityElement(); + + return r; +} + +int +_DateTimeBarPresenter::GetItemCount(void) const +{ + return __pDateTimeBarModel->GetItemCount(); +} + +_DateTimeBarItem* +_DateTimeBarPresenter::GetItemAt(int index) const +{ + return __pDateTimeBarModel->GetItemAt(index); +} + +result +_DateTimeBarPresenter::CalculateWindowBounds(void) +{ + _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); + FloatRectangle windowAreaBounds = FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle bodyAreaBounds = FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle arrowAreaBounds = FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); + + FloatRectangle parentWindowBounds = __pDateTimeBar->GetParentWindowBounds(); + + arrowAreaBounds = GetArrowBounds(); + + 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); + + bodyAreaBounds.width = parentWindowBounds.width; + + bodyAreaBounds.x = 0.0f; + FloatPoint tempPoint = __pDateTimeBar->GetPositionF(); + windowAreaBounds.x = tempPoint.x; + + if (__pDateTimeBar->GetAlignment() == DATETIME_BAR_ALIGN_DOWN) + { + bodyAreaBounds.y = arrowAreaBounds.height; + arrowAreaBounds.y = 0.0f; + windowAreaBounds.y = tempPoint.y - arrowAreaBounds.height; + } + else + { + arrowAreaBounds.y = bodyAreaBounds.height; + bodyAreaBounds.y = 0.0f; + windowAreaBounds.y = tempPoint.y; + } + + windowAreaBounds.width = bodyAreaBounds.width; + windowAreaBounds.height = bodyAreaBounds.height + arrowAreaBounds.height; + + SetBodyBounds(bodyAreaBounds); + SetArrowBounds(arrowAreaBounds); + SetWindowBounds(windowAreaBounds); + __pDateTimeBar->SetMovable(true); + __pDateTimeBar->SetResizable(true); + __pDateTimeBar->SetBounds(windowAreaBounds); + __pDateTimeBar->SetMovable(false); + __pDateTimeBar->SetResizable(false); + + return E_SUCCESS; +} + +void +_DateTimeBarPresenter::SetBodyBounds(const FloatRectangle& bounds) +{ + __bodyAreaBounds = bounds; + return; +} + +FloatRectangle +_DateTimeBarPresenter::GetBodyBounds(void) const +{ + return __bodyAreaBounds; +} + +void +_DateTimeBarPresenter::SetArrowBounds(const FloatRectangle& bounds) +{ + __arrowAreaBounds = bounds; + return; +} + +FloatRectangle +_DateTimeBarPresenter::GetArrowBounds(void) const +{ + return __arrowAreaBounds; +} + +void +_DateTimeBarPresenter::SetWindowBounds(const FloatRectangle& bounds) +{ + __windowAreaBounds = bounds; + return; +} + +FloatRectangle +_DateTimeBarPresenter::GetWindowBounds(void) const +{ + return __windowAreaBounds; +} + +bool +_DateTimeBarPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) +{ + _KeyCode keyCode = keyInfo.GetKeyCode(); + + if (!__isFocused && keyCode == _KEY_ENTER) + { + return true; + } + + if (!__isFocused && (keyCode == _KEY_LEFT || keyCode == _KEY_RIGHT)) + { + ResetFlickAnimationTimer(); + RemoveAllItems(); + __pDateTimeBar->SetInitialValue(GetMinimumValue(), GetMaximumValue(), __focusedValue, __pDateTimeBar->GetSelectedBoxId()); + __distance = (GetItemWidth() * (-1.0f)); + LoadItems(); + AdjustItemPosition(__distance); + ValidateAndAdjustStartPosition(); + SetFocusedItemBounds(); + __isFocused = true; + } + + if (__isChangeLayout) + { + __isChangeLayout = false; + } + + switch (keyCode) + { + case KEY_UP: + //fall through + case KEY_DOWN: + //fall through: + case KEY_TAB: + { + __pDateTimeBar->CloseDateTimeBar(); + ResetFlickAnimationTimer(); + + if (__pDateTimeBar->GetSelectedBoxId() >= DATETIME_ID_YEAR && __pDateTimeBar->GetSelectedBoxId() <= DATETIME_ID_DAY) + { + __pDateTimeBar->FireDateTimeChangeEvent(DATE_INTERNAL_CHANGE_CANCELED); + } + else if (__pDateTimeBar->GetSelectedBoxId() >= DATETIME_ID_HOUR && __pDateTimeBar->GetSelectedBoxId() <= DATETIME_ID_MINUTE) + { + __pDateTimeBar->FireDateTimeChangeEvent(TIME_INTERNAL_CHANGE_CANCELED); + } + + break; + } + case KEY_RIGHT: + { + if ((__focusBounds.x + __focusBounds.width) > (GetWindowBounds().width - __focusBounds.width)) + { + MoveNext(); + } + else + { + __focusBounds.x = __focusBounds.x + __focusBounds.width + GetItemMargin(); + } + __focusedIndex = GetItemIndexFromPosition(FloatPoint(__focusBounds.x, __focusBounds.y)); + __pDateTimeBar->Invalidate(); + + break; + } + case KEY_LEFT: + { + if ((__focusBounds.x - __focusBounds.width) < 0) + { + MovePrevious(); + } + else + { + __focusBounds.x = __focusBounds.x - __focusBounds.width - GetItemMargin(); + } + __focusedIndex = GetItemIndexFromPosition(FloatPoint(__focusBounds.x, __focusBounds.y)); + __pDateTimeBar->Invalidate(); + break; + } + default: + { + return false; + } + } + return true; +} + +bool +_DateTimeBarPresenter::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) +{ + _KeyCode keyCode = keyInfo.GetKeyCode(); + + if (!__isFocused && keyCode == _KEY_ENTER) + { + return true; + } + + switch (keyCode) + { + case KEY_ENTER: + { + if (__isInitialAnimation) + { + if (__pDateTimeBar->GetSelectedBoxId() >= DATETIME_ID_YEAR && __pDateTimeBar->GetSelectedBoxId() <= DATETIME_ID_DAY) + { + __pDateTimeBar->FireDateTimeChangeEvent(DATE_INTERNAL_CHANGE_CANCELED); + } + else if (__pDateTimeBar->GetSelectedBoxId() >= DATETIME_ID_HOUR && __pDateTimeBar->GetSelectedBoxId() <= DATETIME_ID_MINUTE) + { + __pDateTimeBar->FireDateTimeChangeEvent(TIME_INTERNAL_CHANGE_CANCELED); + } + __pDateTimeBar->CloseDateTimeBar(); + __isFocused = false; + return true; + } + + _DateTimeBarItem* pItem = null; + + SetItemSelected(__focusedIndex); + __pDateTimeBarModel->SetFirstDrawnItemIndex((__focusedIndex)); + + if (__focusedIndex >= 0) + { + pItem = GetItemAt(__focusedIndex); + } + + if (pItem != null) + { + __pDateTimeBar->CloseDateTimeBar(); + + __pDateTimeBar->FireActionEvent(pItem->GetActionId()); + + if (__pDateTimeBar->GetSelectedBoxId() >= DATETIME_ID_YEAR && __pDateTimeBar->GetSelectedBoxId() <= DATETIME_ID_DAY) + { + __pDateTimeBar->FireDateTimeChangeEvent(DATE_INTERNAL_CHANGE_SAVED); + } + else if (__pDateTimeBar->GetSelectedBoxId() >= DATETIME_ID_HOUR && __pDateTimeBar->GetSelectedBoxId() <= DATETIME_ID_MINUTE) + { + __pDateTimeBar->FireDateTimeChangeEvent(TIME_INTERNAL_CHANGE_SAVED); + } + } + __isFocused = false; + break; + } + case KEY_ESC: + //fall through + case KEY_BACK: + { + __pDateTimeBar->CloseDateTimeBar(); + ResetFlickAnimationTimer(); + + if (__pDateTimeBar->GetSelectedBoxId() >= DATETIME_ID_YEAR && __pDateTimeBar->GetSelectedBoxId() <= DATETIME_ID_DAY) + { + __pDateTimeBar->FireDateTimeChangeEvent(DATE_INTERNAL_CHANGE_CANCELED); + } + else if (__pDateTimeBar->GetSelectedBoxId() >= DATETIME_ID_HOUR && __pDateTimeBar->GetSelectedBoxId() <= DATETIME_ID_MINUTE) + { + __pDateTimeBar->FireDateTimeChangeEvent(TIME_INTERNAL_CHANGE_CANCELED); + } + break; + } + default: + { + return false; + } + } + return true; +} + +bool +_DateTimeBarPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& 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) + { + return false; + } + + __isFlickEnabled = true; + + if (GetBodyBounds().Contains(touchinfo.GetCurrentPosition()) == false) + { + __isFlickEnabled = false; + return true; + } + + if (__isFlickInProgress) + { + ResetFlickAnimationTimer(); + __isFlickCanceled = true; + __isInitialAnimation = false; + } + + __touchMoveHandled = false; + + __currentPoint = touchinfo.GetCurrentPosition(); + + int index = GetItemIndexFromPosition(touchinfo.GetCurrentPosition()); + + if (index == -1) + { + return true; + } + + __pDateTimeBar->Invalidate(); + + return true; +} + +bool +_DateTimeBarPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + if (&source != __pDateTimeBar) + { + return false; + } + + if (__isTouchMoved) + { + __pDateTimeBar->SetFocused(true); + } + + if (GetBodyBounds().Contains(touchinfo.GetCurrentPosition()) == false && !__isFlickInProgress && !__isTouchMoved) + { + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pDateTimeBar); + __pDateTimeBar->CloseDateTimeBar(); + ResetFlickAnimationTimer(); + + if (__pDateTimeBar->GetSelectedBoxId() >= DATETIME_ID_YEAR && __pDateTimeBar->GetSelectedBoxId() <= DATETIME_ID_DAY) + { + __pDateTimeBar->FireDateTimeChangeEvent(DATE_INTERNAL_CHANGE_CANCELED); + } + else if (__pDateTimeBar->GetSelectedBoxId() >= DATETIME_ID_HOUR && __pDateTimeBar->GetSelectedBoxId() <= DATETIME_ID_MINUTE) + { + __pDateTimeBar->FireDateTimeChangeEvent(TIME_INTERNAL_CHANGE_CANCELED); + } + + return true; + } + + int index = GetItemIndexFromPosition(touchinfo.GetCurrentPosition()); + bool isEventFire = true; + + if (index != -1 && !__isTouchMoved && !__isFlickInProgress && !__isFlickCanceled) + { + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pDateTimeBar); + SetItemStatus(index, DATETIMEBAR_ITEM_STATUS_SELECTED); + __pDateTimeBarModel->SetFirstDrawnItemIndex(index); + } + else + { + isEventFire = false; + __isFlickCanceled = false; + } + + __isTouchMoved = false; + __distance = 0.0f; + + __pDateTimeBar->Invalidate(); + + if (isEventFire == true) + { + int index = GetFirstDrawnItemIndex(); + + _DateTimeBarItem* pItem = null; + + if (index >= 0) + { + pItem = GetItemAt(index); + } + + if (pItem != null) + { + __pDateTimeBar->CloseDateTimeBar(); + __pDateTimeBar->FireActionEvent(pItem->GetActionId()); + + if (__pDateTimeBar->GetSelectedBoxId() >= DATETIME_ID_YEAR && __pDateTimeBar->GetSelectedBoxId() <= DATETIME_ID_DAY) + { + __pDateTimeBar->FireDateTimeChangeEvent(DATE_INTERNAL_CHANGE_SAVED); + } + else if (__pDateTimeBar->GetSelectedBoxId() >= DATETIME_ID_HOUR && __pDateTimeBar->GetSelectedBoxId() <= DATETIME_ID_MINUTE) + { + __pDateTimeBar->FireDateTimeChangeEvent(TIME_INTERNAL_CHANGE_SAVED); + } + } + } + + return true; +} + +bool +_DateTimeBarPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + if (&source != __pDateTimeBar) + { + return false; + } + + if (GetBodyBounds().Contains(touchinfo.GetCurrentPosition()) == false || __touchMoveHandled == true) + { + return true; + } + + _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); + + __isTouchMoved = true; + + FloatDimension screen(0.0f, 0.0f); + GET_DIMENSION_CONFIG(DATETIMEBAR::DEFAULT_SIZE, orientation, screen); + + const float _BOUNDARY_X_POSITION = screen.width * 2.0f; + float distance = touchinfo.GetCurrentPosition().x - __currentPoint.x; + + _DateTimeBarItem* pItem = null; + + FloatRectangle itemBounds; + + bool needItem = false; + int updateItemCount = 1; + + if (distance > 0.0f) + { + pItem = __pDateTimeBarModel->GetItemAt(GetFirstDrawnItemIndex()); + + if (pItem == null) + { + return true; + } + + itemBounds = pItem->GetBounds(); + + __distance += distance; + + if (__distance > itemBounds.width / 2.0f) + { + needItem = true; + if (__distance > itemBounds.width) + { + updateItemCount = UPDATE_ITEM_COUNT; + } + } + if (needItem == true) + { + while (updateItemCount > 0) + { + pItem = __pDateTimeBarModel->GetItemAt(GetFirstDrawnItemIndex()); + if (pItem == null) + { + break; + } + + int actionId = pItem->GetActionId() - 1; + + if (__pDateTimeBarModel->GetMinimumValue() > actionId) + { + actionId = __pDateTimeBarModel->GetMaximumValue(); + } + + if (pItem->GetBounds().x > _BOUNDARY_X_POSITION * -1.0f) + { + if (InsertItem(0, actionId) == E_SUCCESS) + { + SetFirstDrawnItemIndex(0); + } + } + + if (GetItemCount() >= __pDateTimeBarModel->GetMaxCachingSize()) + { + DeleteItem(GetItemCount() - 1); + } + + updateItemCount--; + } + __distance = 0.0f; + } + } + else + { + pItem = __pDateTimeBarModel->GetItemAt(GetItemCount() - 1); + if (pItem == null) + { + return true; + } + + itemBounds = pItem->GetBounds(); + + __distance += distance; + + if (__distance * -1.0f > itemBounds.width / 2.0f) + { + needItem = true; + if (__distance * -1.0f > itemBounds.width) + { + updateItemCount = UPDATE_ITEM_COUNT; + } + __distance = 0.0f; + } + + if (needItem == true) + { + while (updateItemCount > 0) + { + pItem = __pDateTimeBarModel->GetItemAt(GetItemCount() - 1); + if (pItem == null) + { + break; + } + + int actionId = pItem->GetActionId() + 1; + + if (__pDateTimeBarModel->GetMaximumValue() < actionId) + { + actionId = __pDateTimeBarModel->GetMinimumValue(); + } + + if (pItem->GetBounds().x < _BOUNDARY_X_POSITION) + { + AddItem(actionId); + } + + if (GetItemCount() >= __pDateTimeBarModel->GetMaxCachingSize()) + { + DeleteItem(0); + SetFirstDrawnItemIndex(0); + } + updateItemCount--; + } + } + } + + __currentPoint = touchinfo.GetCurrentPosition(); + + AdjustItemPosition(distance); + + __pDateTimeBar->Invalidate(); + + return true; +} + +bool +_DateTimeBarPresenter::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + if (&source != __pDateTimeBar) + { + return false; + } + + __isTouchMoved = false; + __distance = 0.0f; + + __pDateTimeBar->Invalidate(); + + return true; +} + +result +_DateTimeBarPresenter::LoadItems() +{ + _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); + + FloatDimension screen(0.0f, 0.0f); + GET_DIMENSION_CONFIG(DATETIMEBAR::DEFAULT_SIZE, orientation, screen); + + const float _BOUNDARY_X_POSITION = screen.width * 2.0f; + + _DateTimeBarItem* pItem = null; + + int updateItemCount = UPDATE_ITEM_COUNT; + + if (__distance > 0.0f) + { + pItem = __pDateTimeBarModel->GetItemAt(GetFirstDrawnItemIndex()); + + if (pItem == null) + { + return true; + } + + while (updateItemCount > 0) + { + pItem = __pDateTimeBarModel->GetItemAt(GetFirstDrawnItemIndex()); + if (pItem == null) + { + break; + } + + int actionId = pItem->GetActionId() - 1; + + if (__pDateTimeBarModel->GetMinimumValue() > actionId) + { + actionId = __pDateTimeBarModel->GetMaximumValue(); + } + + if (pItem->GetBounds().x > _BOUNDARY_X_POSITION * -1) + { + if (InsertItem(0, actionId) == E_SUCCESS) + { + SetFirstDrawnItemIndex(0); + } + } + + if (GetItemCount() >= __pDateTimeBarModel->GetMaxCachingSize()) + { + DeleteItem(GetItemCount() - 1); + } + updateItemCount--; + } + + } + else + { + pItem = __pDateTimeBarModel->GetItemAt(GetItemCount() - 1); + if (pItem == null) + { + return true; + } + + + while (updateItemCount > 0) + { + pItem = __pDateTimeBarModel->GetItemAt(GetItemCount() - 1); + if (pItem == null) + { + break; + } + + int actionId = pItem->GetActionId() + 1; + + if (__pDateTimeBarModel->GetMaximumValue() < actionId) + { + actionId = __pDateTimeBarModel->GetMinimumValue(); + } + + if (pItem->GetBounds().x < _BOUNDARY_X_POSITION) + { + AddItem(actionId); + } + + if (GetItemCount() >= __pDateTimeBarModel->GetMaxCachingSize()) + { + DeleteItem(0); + SetFirstDrawnItemIndex(0); + } + updateItemCount--; + } + } + + return true; +} + +bool +_DateTimeBarPresenter::OnFlickGestureDetected(int distanceX,int distanceY,int duration) +{ + if (!__isFlickEnabled) + { + return false; + } + + __isFlickInProgress = true; + __isInitialAnimation = false; + + int velX = 0; + int velY = 0; + + __flickAnimation.CalculateInitializeVelocity(distanceX, 0, duration, &velX, &velY); + __flickAnimation.InitializeFlickAmount(velX * FLICK_ANIMATION_VELOCITY_FACTOR_DATE_TIME_BAR); + + StartFlickAnimationTimer(); + return true; +} + +void +_DateTimeBarPresenter::StartFlickAnimation(void) +{ + int moveX = 0; + int moveY = 0; + + __flickAnimation.CalculateNextMove(&moveX, &moveY); + + __distance = _CoordinateSystemUtils::ConvertToFloat(moveX); + if (moveX != 0) + { + StartFlickAnimationTimer(); + } + + LoadItems(); + AdjustItemPosition(__distance); + Draw(); + return; +} + +void +_DateTimeBarPresenter::StartAnimationEffect(void) +{ + __isInitialAnimation = true; + __distance = -10.0f; + + if (__initialAnimationValue >= 0.0f) + { + __initialAnimationValue = __initialAnimationValue + __distance; + StartFlickAnimationTimer(); + + LoadItems(); + AdjustItemPosition(__distance); + Draw(); + } + else + { + __initialAnimationValue = 0.0f; + __isInitialAnimation = false; + ResetFlickAnimationTimer(); + ValidateAndAdjustStartPosition(); + } + + return; +} + +result +_DateTimeBarPresenter::StartFlickAnimationTimer(void) +{ + result r = E_SUCCESS; + __isFlickInProgress = true; + + if (__pFlickAnimationTimer == null) + { + __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); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + __pFlickAnimationTimer->Cancel(); + } + + r = __pFlickAnimationTimer->Start(FLICK_ANIMATION_TIMER_PERIOD); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + +CATCH: + ResetFlickAnimationTimer(); + return r; +} + +result +_DateTimeBarPresenter::ResetFlickAnimationTimer(void) +{ + if (__pFlickAnimationTimer) + { + delete __pFlickAnimationTimer; + __pFlickAnimationTimer = null; + } + + __isFlickInProgress = false; + return E_SUCCESS; +} + +void +_DateTimeBarPresenter::OnTimerExpired(Timer& timer) +{ + __isFlickInProgress = false; + if (&timer == __pFlickAnimationTimer) + { + if (__isInitialAnimation) + { + StartAnimationEffect(); + } + else + { + StartFlickAnimation(); + } + } + return; +} + +void +_DateTimeBarPresenter::ValidateAndAdjustStartPosition(void) +{ + int index = -1; + float adjustPosition = 0.0f; + float leftMargin = GetLeftRightMargin(); + FloatRectangle bodyBounds = GetBodyBounds(); + + index = GetItemIndexFromPosition(FloatPoint(GetLeftRightMargin() + GetItemMargin(), bodyBounds.y + (bodyBounds.height / 2.0f))); + + if (index == -1) + { + return; + } + + _DateTimeBarItem* pDrawItem = null; + pDrawItem = __pDateTimeBarModel->GetItemAt(index); + + if (pDrawItem == null) + { + return; + } + + if (pDrawItem->GetBounds().x > 0.0f && pDrawItem->GetBounds().x < leftMargin) + { + adjustPosition = leftMargin - pDrawItem->GetBounds().x; + } + else if (pDrawItem->GetBounds().x < 0.0f) + { + pDrawItem = __pDateTimeBarModel->GetItemAt(index + 1); + if (pDrawItem == null) + { + return; + } + adjustPosition = leftMargin - pDrawItem->GetBounds().x; + } + else if (pDrawItem->GetBounds().x > leftMargin) + { + adjustPosition = leftMargin - pDrawItem->GetBounds().x; + } + + AdjustItemPosition(adjustPosition); + Draw(); + return; +} + +void +_DateTimeBarPresenter::SetInitialAnimationValue(float animationValue) +{ + __initialAnimationValue = animationValue; + return; +} + +void +_DateTimeBarPresenter::SetFont(Font& pFont) +{ + delete __pFont; + __pFont = null; + + __pFont = _FontImpl::CloneN(pFont); + SysTryReturnVoidResult(NID_UI_CTRL, (__pFont != null), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + return; +} + +bool +_DateTimeBarPresenter::OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_DateTimeBarPresenter::OnAccessibilityFocusMovedPrevious(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +void +_DateTimeBarPresenter::OnTouchMoveHandled(const Tizen::Ui::_Control& control) +{ + __touchMoveHandled = true; + + __isTouchMoved = false; + __distance = 0.0f; + + __pDateTimeBar->Invalidate(); + + return; +} + +void +_DateTimeBarPresenter::AddAccessibilityElement(void) +{ + _DateTimeBarItem* pItem = null; + pItem = __pDateTimeBarModel->GetItemAt(__pDateTimeBarModel->GetItemCount() - 1); + + if (pItem == null) + { + return; + } + + if (__pDateTimeBar->GetSelectedBoxId() == DATETIME_ID_MONTH) + { + __pDateTimeBar->AddAccessibilityElement(pItem->GetBounds(), __pDateTimeBar->GetMonthValue(pItem->GetActionId())); + } + else + { + __pDateTimeBar->AddAccessibilityElement(pItem->GetBounds(), pItem->GetText()); + } + + return; +} + +void +_DateTimeBarPresenter::InsertAccessibilityElementAt(int index) +{ + _DateTimeBarItem* pItem = null; + pItem = __pDateTimeBarModel->GetItemAt(index); + + if (pItem == null) + { + return; + } + + if (__pDateTimeBar->GetSelectedBoxId() == DATETIME_ID_MONTH) + { + __pDateTimeBar->InsertAccessibilityElementAt(index, pItem->GetBounds(), __pDateTimeBar->GetMonthValue(pItem->GetActionId())); + } + else + { + __pDateTimeBar->InsertAccessibilityElementAt(index, pItem->GetBounds(), pItem->GetText()); + } + + return; +} + +void +_DateTimeBarPresenter::MoveNext(void) +{ + __distance = (GetItemWidth() + GetItemMargin()) * (-1.0f); + LoadItems(); + AdjustItemPosition(__distance); + Draw(); + return; +} + +void +_DateTimeBarPresenter::MovePrevious(void) +{ + __distance = (GetItemWidth() + GetItemMargin()); + LoadItems(); + AdjustItemPosition(__distance); + Draw(); + 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_DateTimeChangeEvent.cpp b/src/ui/controls/FUiCtrl_DateTimeChangeEvent.cpp new file mode 100644 index 0000000..7df0969 --- /dev/null +++ b/src/ui/controls/FUiCtrl_DateTimeChangeEvent.cpp @@ -0,0 +1,176 @@ +// +// 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_DateTimeChangeEvent.cpp + * @brief This is the implementation file for the _DateTimeChangeEvent and _DateTimeChangeEventArg classes. + */ + +#include +#include +#include +#include "FUiCtrl_DateTimeChangeEvent.h" +#include "FUiCtrl_IDateTimeChangeEventListener.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; +using namespace Tizen::System; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_DateTimeChangeEventArg::_DateTimeChangeEventArg(_DateTimeChangeStatus status) + : __status(status) + , __year(1) + , __month(1) + , __day(1) + , __hour(0) + , __minute(0) +{ + SystemTime::GetCurrentTime(TIME_MODE_WALL, __dateTime); +} + +_DateTimeChangeEventArg::~_DateTimeChangeEventArg(void) +{ + // Nothing. +} + +void +_DateTimeChangeEventArg::SetDateTime(const DateTime& dateTime) +{ + __dateTime = dateTime; + + return; +} + +int +_DateTimeChangeEventArg::GetYear(void) const +{ + return __year; +} + +int +_DateTimeChangeEventArg::GetMonth(void) const +{ + return __month; +} + +int +_DateTimeChangeEventArg::GetDay(void) const +{ + return __day; +} + +int +_DateTimeChangeEventArg::GetHour(void) const +{ + return __hour; +} + +int +_DateTimeChangeEventArg::GetMinute(void) const +{ + return __minute; +} + +DateTime +_DateTimeChangeEventArg::GetDateTime(void) const +{ + return __dateTime; +} + +_DateTimeChangeStatus +_DateTimeChangeEventArg::GetStatus(void) const +{ + return __status; +} + +void +_DateTimeChangeEventArg::SetTime(int hour, int minute) +{ + __hour = hour; + __minute = minute; + + return; +} + +void +_DateTimeChangeEventArg::SetDate(int year, int month, int day) +{ + __year = year; + __month = month; + __day = day; + + return; +} + +_DateTimeChangeEvent::_DateTimeChangeEvent(const Tizen::Ui::_Control& source) + : __pSource(null) +{ + result r = _Event::Initialize(); + if (r == E_SUCCESS) + { + __pSource = const_cast<_Control*>(&source); + } +} + +_DateTimeChangeEvent::~_DateTimeChangeEvent(void) +{ + // Nothing. +} + +void +_DateTimeChangeEvent::FireImpl(IEventListener& listener, const IEventArg& arg) +{ + // DateTimePicker + _IDateTimeChangeEventListener* pDateTimeChangeEventListener = dynamic_cast <_IDateTimeChangeEventListener*>(&listener); + SysTryReturnVoidResult(NID_UI_CTRL, (pDateTimeChangeEventListener != null), E_INVALID_ARG, + "[E_INVALID_ARG] Invalid argument(s) is used. The instance of _IDateTimeChangeEventListener is null."); + + // cast Argument + const _DateTimeChangeEventArg* pArg = dynamic_cast (&arg); + SysTryReturnVoidResult(NID_UI_CTRL, (pArg != null), E_INVALID_ARG, + "[E_INVALID_ARG] Invalid argument(s) is used. The instance of _DateTimeChangeEventArg is null."); + + switch (pArg->GetStatus()) + { + case DATE_INTERNAL_CHANGE_SAVED: + // fall through + case DATETIME_INTERNAL_CHANGE_SAVED: + // fall through + case TIME_INTERNAL_CHANGE_SAVED: + pDateTimeChangeEventListener->OnDateTimeChanged(*__pSource, pArg->GetYear(), pArg->GetMonth(), + pArg->GetDay(), pArg->GetHour(), pArg->GetMinute()); + break; + + case DATE_INTERNAL_CHANGE_CANCELED: + // fall through + case DATETIME_INTERNAL_CHANGE_CANCELED: + // fall through + case TIME_INTERNAL_CHANGE_CANCELED: + pDateTimeChangeEventListener->OnDateTimeChangeCanceled(*__pSource); + break; + + default: + break; + } + + SetLastResult(E_SUCCESS); + return; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_DateTimeDisplayBox.cpp b/src/ui/controls/FUiCtrl_DateTimeDisplayBox.cpp new file mode 100644 index 0000000..fe6552d --- /dev/null +++ b/src/ui/controls/FUiCtrl_DateTimeDisplayBox.cpp @@ -0,0 +1,286 @@ +// +// 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_DateTimeDisplayBox.cpp + * @brief This is the implementation file for the _DateTimeDisplayBox class. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "FUi_ResourceManager.h" +#include "FUiAnim_VisualElement.h" +#include "FUiCtrl_DateTimeDisplayBox.h" +#include "FUiCtrl_DateTimeDefine.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Graphics::_Text; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_DateTimeDisplayBox::_DateTimeDisplayBox(const FloatRectangle& bounds, int boxId) + : __windowBounds(bounds) + , __boxId(boxId) + , __pTextObject(null) + , __text() + , __focusable(true) + , __pFont(null) +{ + for (int i = 0; i < DATETIME_STATUS_MAX; i++) + { + __pBackgroundNormalBitmap[i] = null; + __pBackgroundEffectBitmap[i] = null; + } + + GET_COLOR_CONFIG(DATETIMEPICKER::TEXT_NORMAL, __textColor[DATETIME_STATUS_NORMAL]); + GET_COLOR_CONFIG(DATETIMEPICKER::TEXT_HIGHLIGHTED, __textColor[DATETIME_STATUS_HIGHLIGHTED]); + GET_COLOR_CONFIG(DATETIMEPICKER::TEXT_PRESSED, __textColor[DATETIME_STATUS_SELECTED]); + GET_COLOR_CONFIG(DATETIMEPICKER::TEXT_DISABLED, __textColor[DATETIME_STATUS_DISABLED]); +} + +_DateTimeDisplayBox::~_DateTimeDisplayBox(void) +{ + if (__pTextObject != null) + { + __pTextObject->RemoveAll(); + delete __pTextObject; + __pTextObject = null; + } +} + +FloatRectangle +_DateTimeDisplayBox::GetDisplayBoxBounds(void) const +{ + return __windowBounds; +} + +int +_DateTimeDisplayBox::GetDisplayBoxId(void) const +{ + return __boxId; +} + +bool +_DateTimeDisplayBox::SetText(const String& text) +{ + result r = E_SUCCESS; + TextSimple* pSimpleText = null; + + 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(); + __text = text; + wchar_t* pString = const_cast (__text.GetPointer()); + + 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); + 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)); + + r = pTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_CENTER | TEXT_OBJECT_ALIGNMENT_MIDDLE); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pTextObject->SetFont(__pFont, 0, pTextObject->GetTextLength()); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + if (__pTextObject != null) + { + r = __pTextObject->RemoveAll(); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + delete __pTextObject; + __pTextObject = null; + } + __pTextObject = pTextObject; + + return true; + +CATCH: + pTextObject->RemoveAll(); + + delete pTextObject; + delete pSimpleText; + + return false; +} + +const String& +_DateTimeDisplayBox::GetText(void) const +{ + return __text; +} + +void +_DateTimeDisplayBox::DrawDisplayBox(Canvas& canvas, DateTimePickerStatus status) +{ + if ((!__focusable) && (status == DATETIME_STATUS_HIGHLIGHTED)) + { + status = DATETIME_STATUS_NORMAL; + } + + DrawBackground(canvas, status); + DrawText(canvas, status); + + return; +} + +void +_DateTimeDisplayBox::DrawBackground(Canvas& canvas, DateTimePickerStatus status) +{ + result r = E_SUCCESS; + bool isCustomBitmap[DATETIME_STATUS_MAX]; + + if (__pBackgroundNormalBitmap[status] == null) + { + return; + } + + for (int i = 0; i < DATETIME_STATUS_MAX; i++) + { + isCustomBitmap[i] = false; + } + + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pBackgroundNormalBitmap[status])) + { + 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) + { + isCustomBitmap[DATETIME_STATUS_NORMAL] = IS_CUSTOM_BITMAP(DATETIMEPICKER::AMPM_BG_NORMAL); + isCustomBitmap[DATETIME_STATUS_SELECTED] = IS_CUSTOM_BITMAP(DATETIMEPICKER::AMPM_BG_PRESSED); + isCustomBitmap[DATETIME_STATUS_HIGHLIGHTED] = IS_CUSTOM_BITMAP(DATETIMEPICKER::AMPM_BG_HIGHLIGHTED); + isCustomBitmap[DATETIME_STATUS_DISABLED] = IS_CUSTOM_BITMAP(DATETIMEPICKER::AMPM_BG_DISABLED); + } + else + { + isCustomBitmap[DATETIME_STATUS_NORMAL] = IS_CUSTOM_BITMAP(DATETIMEPICKER::CONTENT_BG_NORMAL); + isCustomBitmap[DATETIME_STATUS_SELECTED] = IS_CUSTOM_BITMAP(DATETIMEPICKER::CONTENT_BG_PRESSED); + isCustomBitmap[DATETIME_STATUS_HIGHLIGHTED] = IS_CUSTOM_BITMAP(DATETIMEPICKER::CONTENT_BG_HIGHLIGHTED); + isCustomBitmap[DATETIME_STATUS_DISABLED] = IS_CUSTOM_BITMAP(DATETIMEPICKER::CONTENT_BG_DISABLED); + } + + if (!isCustomBitmap[status] && __pBackgroundEffectBitmap[status] != null) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__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(FloatPoint(0.0f, 0.0f), *__pBackgroundEffectBitmap[status]); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + + return; +} + +void +_DateTimeDisplayBox::DrawText(Canvas& canvas, DateTimePickerStatus status) +{ + SysTryReturnVoidResult(NID_UI_CTRL, (__pTextObject != null), E_SYSTEM, + "[E_SYSTEM] A system error has occurred. The instance of TextObject is null."); + + result r = E_SUCCESS; + + r = __pTextObject->SetForegroundColor(__textColor[status], 0, __pTextObject->GetTextLength()); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + + 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)); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + + return; +} + +void +_DateTimeDisplayBox::SetFocusable(bool focusable) +{ + __focusable = focusable; + + return; +} + +void +_DateTimeDisplayBox::SetBackgroundBitmap(Bitmap **pBackgroundNormalBitmap, Bitmap **pBackgroundEffectBitmap) +{ + GET_COLOR_CONFIG(DATETIMEPICKER::AMPM_TEXT_NORMAL, __textColor[DATETIME_STATUS_NORMAL]); + GET_COLOR_CONFIG(DATETIMEPICKER::AMPM_TEXT_PRESSED, __textColor[DATETIME_STATUS_SELECTED]); + GET_COLOR_CONFIG(DATETIMEPICKER::AMPM_TEXT_HIGHLIGHTED, __textColor[DATETIME_STATUS_HIGHLIGHTED]); + GET_COLOR_CONFIG(DATETIMEPICKER::AMPM_TEXT_DISABLED, __textColor[DATETIME_STATUS_DISABLED]); + + for (int i = 0; i < DATETIME_STATUS_MAX; i++) + { + __pBackgroundNormalBitmap[i] = pBackgroundNormalBitmap[i]; + __pBackgroundEffectBitmap[i] = pBackgroundEffectBitmap[i]; + } + + return; +} + +void +_DateTimeDisplayBox::UpdateDisplayBoxBounds(FloatRectangle& bounds) +{ + __windowBounds = bounds; + + return; +} + +void +_DateTimeDisplayBox::SetFont(Font* pFont) +{ + __pFont = pFont; + + return; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_DateTimeModel.cpp b/src/ui/controls/FUiCtrl_DateTimeModel.cpp new file mode 100644 index 0000000..08fa8f5 --- /dev/null +++ b/src/ui/controls/FUiCtrl_DateTimeModel.cpp @@ -0,0 +1,211 @@ +// +// 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_DateTimeModel.cpp + * @brief This is the implementation file for the _DateTimeModel class. + */ + +#include +#include +#include +#include "FUiCtrl_DateTimeModel.h" + +using namespace Tizen::Base; +using namespace Tizen::System; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_DateTimeModel::~_DateTimeModel(void) +{ +} + +_DateTimeModel::_DateTimeModel(void) + : __year(1) + , __month(1) + , __day(1) + , __maxYear(DATETIME_YEAR_MAX) + , __minYear(DATETIME_YEAR_MIN) + , __hour(0) + , __minute(0) + , __second(0) +{ + SetCurrentDateTime(); + SetSecond(0); +} + +void +_DateTimeModel::SetCurrentDateTime(void) +{ + DateTime dateTime; + SystemTime::GetCurrentTime(TIME_MODE_WALL, dateTime); + + SetYear(dateTime.GetYear()); + SetMonth(dateTime.GetMonth()); + SetDay(dateTime.GetDay()); + SetHour(dateTime.GetHour()); + SetMinute(dateTime.GetMinute()); + SetSecond(dateTime.GetSecond()); +} + +DateTime +_DateTimeModel::GetDateTime(void) const +{ + DateTime dateTime; + dateTime.SetValue(GetYear(), GetMonth(), GetDay(), GetHour(), GetMinute(), GetSecond()); + + return dateTime; +} + +void +_DateTimeModel::SetDateTime(const DateTime& dateTime) +{ + SetYear(dateTime.GetYear()); + SetMonth(dateTime.GetMonth()); + SetDay(dateTime.GetDay()); + SetHour(dateTime.GetHour()); + SetMinute(dateTime.GetMinute()); + SetSecond(dateTime.GetSecond()); +} + +result +_DateTimeModel::SetYear(int year) +{ + __year = year; + + return E_SUCCESS; +} + +result +_DateTimeModel::SetMonth(int month) +{ + __month = month; + + return E_SUCCESS; +} + +result +_DateTimeModel::SetDay(int day) +{ + __day = day; + + return E_SUCCESS; +} + +result +_DateTimeModel::SetHour(int hour) +{ + __hour = hour; + + return E_SUCCESS; +} + +result +_DateTimeModel::SetMinute(int minute) +{ + __minute = minute; + + return E_SUCCESS; +} + +void +_DateTimeModel::SetSecond(int second) +{ + if (second < DATETIME_SECOND_MIN) + { + second = 0; + } + else if (second > DATETIME_SECOND_MAX) + { + second = DATETIME_SECOND_MAX; + } + + __second = second; +} + +result +_DateTimeModel::SetMaxYear(int maxYear) +{ + __maxYear = maxYear; + + if (__maxYear < __year) + { + __year = __maxYear; + } + + return E_SUCCESS; +} + +result +_DateTimeModel::SetMinYear(int minYear) +{ + __minYear = minYear; + + if (__minYear > __year) + { + __year = __minYear; + } + + return E_SUCCESS; +} + +int +_DateTimeModel::GetYear(void) const +{ + return __year; +} + +int +_DateTimeModel::GetMonth(void) const +{ + return __month; +} + +int +_DateTimeModel::GetDay(void) const +{ + return __day; +} + +int +_DateTimeModel::GetHour(void) const +{ + return __hour; +} + +int +_DateTimeModel::GetMinute(void) const +{ + return __minute; +} + +int +_DateTimeModel::GetSecond(void) const +{ + return __second; +} + +result +_DateTimeModel::GetYearRange(int& minYear, int& maxYear) const +{ + minYear = __minYear; + maxYear = __maxYear; + return E_SUCCESS; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_DateTimePicker.cpp b/src/ui/controls/FUiCtrl_DateTimePicker.cpp new file mode 100644 index 0000000..97a7788 --- /dev/null +++ b/src/ui/controls/FUiCtrl_DateTimePicker.cpp @@ -0,0 +1,1208 @@ +// +// 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_DateTimePicker.cpp + * @brief This is the implementation file for the _DateTimePicker class. + */ + +#include +#include +#include +#include +#include + +#include "FUiCtrl_DateTimePicker.h" +#include "FUiAnim_VisualElement.h" +#include "FUiCtrl_DateTimeDefine.h" +#include "FUiCtrl_DateTimePresenter.h" +#include "FUiCtrl_DateTimeDisplayBox.h" +#include "FUiCtrl_Form.h" +#include "FUiCtrl_Frame.h" +#include "FUiCtrl_Button.h" +#include "FUiCtrl_Toolbar.h" +#include "FUiCtrl_DateTimeChangeEvent.h" +#include "FUiCtrl_IDateTimeChangeEventListener.h" +#include "FUiCtrl_DateTimeUtils.h" +#include "FUi_AccessibilityContainer.h" +#include "FUi_AccessibilityElement.h" +#include "FUi_AccessibilityManager.h" +#include "FUi_UiTouchEvent.h" +#include "FUi_ResourceManager.h" +#include "FUi_CoordinateSystemUtils.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Animations; +using namespace Tizen::System; + +namespace Tizen { namespace Ui { namespace Controls +{ + +IMPLEMENT_PROPERTY(_DateTimePicker); + +_DateTimePicker::_DateTimePicker(_DateTimePresenter* pPresenter, const String& title) + : __pPresenter(pPresenter) + , __pFooter(null) + , __title(title) + , __pDateTimeChangeEvent(null) + , __pFont(null) + , __pDisplayVisualElement(null) + , __isInFocusMode(false) +{ +} + +_DateTimePicker::~_DateTimePicker(void) +{ + SettingInfo::RemoveSettingEventListener(*this); + + delete __pDateTimeChangeEvent; + __pDateTimeChangeEvent = null; + + if (__pFooter != null) + { + DetachSystemChild(*__pFooter); + delete __pFooter; + __pFooter = null; + } + + if (__pDisplayVisualElement != null) + { + __pDisplayVisualElement->Destroy(); + __pDisplayVisualElement = null; + } + + delete __pPresenter; + __pPresenter = null; +} + +_DateTimePicker* +_DateTimePicker::CreateDateTimePickerN(int style, const String& title) +{ + result r = E_SUCCESS; + FloatDimension pickerSize(0.0f, 0.0f); + FloatDimension screenSize(0.0f, 0.0f); + _ControlOrientation orientation = _CONTROL_ORIENTATION_PORTRAIT; + _DateTimePresenter* pPresenter = null; + _DateTimePicker* pView = null; + + SysTryReturn(NID_UI_CTRL, ((style & DATETIME_OUTPUT_STYLE_DATETIME) != DATETIME_OUTPUT_STYLE_INVALID), null, E_INVALID_ARG, + "[E_INVALID_ARG] Invalid argument(s) is used. The style provided is not present in the _DateTimeOutputStyle list."); + + pPresenter = new (std::nothrow) _DateTimePresenter(style, title); + SysTryReturn(NID_UI_CTRL, (pPresenter != null), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pView = new (std::nothrow) _DateTimePicker(pPresenter, title); + SysTryCatch(NID_UI_CTRL, (pView != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = pView->InitializeFont(); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to set the Font."); + + r = pView->CreateRootVisualElement(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + orientation = pView->GetOrientation(); + screenSize = _ControlManager::GetInstance()->GetScreenSizeF(); + pickerSize = screenSize; + if (orientation == _CONTROL_ORIENTATION_LANDSCAPE) + { + pickerSize.width = screenSize.height; + pickerSize.height = screenSize.width; + } + + r = pView->SetSize(pickerSize); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to set the size for this control"); + + r = pView->CreateFooter(); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to create the footer for this control"); + + r = pView->CreateDisplayVisualElement(); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to create the display visual element for this control"); + + r = pPresenter->Construct(*pView); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to construct the presenter instance for this control"); + + pView->AcquireHandle(); + + pView->__pDateTimeChangeEvent = new (std::nothrow) _DateTimeChangeEvent(*pView); + SysTryCatch(NID_UI_CTRL, (pView->__pDateTimeChangeEvent != null), , E_OUT_OF_MEMORY, + "[E_OUT_OF_MEMORY] Memory allocation failed."); + + if (pView->GetAccessibilityContainer() != null) + { + pView->GetAccessibilityContainer()->Activate(true); + } + + r = SettingInfo::AddSettingEventListener(*pView); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return pView; + +CATCH: + delete pPresenter; + delete pView; + + return null; +} + +result +_DateTimePicker::CreateFooter(void) +{ + result r = E_SUCCESS; + _Button* pSaveButton = null; + _Button* pCancelButton = null; + FloatRectangle bounds; + String text; + _ControlOrientation orientation = GetOrientation(); + + _Toolbar* pFooter = _Toolbar::CreateToolbarN(false); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, (pFooter != null), r, "[%s] Propagating.", GetErrorMessage(r)); + + r = AttachSystemChild(*pFooter); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + GET_SHAPE_CONFIG(DATETIMEPICKER::FOOTER_HEIGHT, orientation, bounds.height); + GET_SHAPE_CONFIG(DATETIMEPICKER::INPUTPAD_HEIGHT, orientation, bounds.y); + + bounds.y = CoordinateSystem::AlignToDevice(FloatPoint(0.0f, bounds.y)).y; + bounds.height = CoordinateSystem::AlignToDevice(FloatDimension(0.0f, bounds.height)).height; + + bounds.x = 0.0f; + bounds.y = GetBoundsF().height - bounds.y - bounds.height; + bounds.width = GetBoundsF().width; + + pFooter->SetMovable(true); + pFooter->SetResizable(true); + + r = pFooter->SetBounds(bounds); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + pFooter->SetMovable(false); + pFooter->SetResizable(false); + + pFooter->AddActionEventListener(*this); + + r = pFooter->SetStyle(TOOLBAR_TEXT); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + // Create 'Save' button + pSaveButton = _Button::CreateButtonN(); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pSaveButton->SetActionId(DATETIME_EVENT_ID_SAVE); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_SAVE, text); + + r = pSaveButton->SetText(text); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + // Create 'Cancel' button + pCancelButton = _Button::CreateButtonN(); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pCancelButton->SetActionId(DATETIME_EVENT_ID_CANCEL); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_CANCEL_ABB, text); + + r = pCancelButton->SetText(text); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pFooter->AddItem(pCancelButton); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating."); + + r = pFooter->AddItem(pSaveButton); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + if (__pFooter != null) + { + DetachSystemChild(*__pFooter); + + delete __pFooter; + __pFooter = null; + } + + __pFooter = pFooter; + + return E_SUCCESS; +CATCH: + DetachSystemChild(*pFooter); + + delete pFooter; + delete pSaveButton; + delete pCancelButton; + + return r; +} + +result +_DateTimePicker::DestroyFooter(void) +{ + if (__pFooter != null) + { + DetachSystemChild(*__pFooter); + + delete __pFooter; + __pFooter = null; + } + + return E_SUCCESS; +} + +result +_DateTimePicker::CreateDisplayVisualElement(void) +{ + result r = E_SUCCESS; + + __pDisplayVisualElement = new (std::nothrow) _VisualElement(); + SysTryReturnResult(NID_UI_CTRL, __pDisplayVisualElement, E_OUT_OF_MEMORY, "Memory allocation failed."); + + r = __pDisplayVisualElement->Construct(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pDisplayVisualElement->SetShowState(true); + __pDisplayVisualElement->SetImplicitAnimationEnabled(false); + + r = GetVisualElement()->AttachChild(*__pDisplayVisualElement); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + +CATCH: + __pDisplayVisualElement->Destroy(); + __pDisplayVisualElement = null; + + return r; +} + +void +_DateTimePicker::SetDisplayVisualElementBounds(FloatRectangle bounds) +{ + if (__pDisplayVisualElement != null) + { + __pDisplayVisualElement->SetBounds(FloatRectangle(bounds.x, bounds.y, bounds.width, bounds.height)); + } + + return; +} + +_VisualElement* +_DateTimePicker::GetDisplayVisualElement(void) +{ + return __pDisplayVisualElement; +} + +result +_DateTimePicker::AddDateTimeChangeEventListener(const Controls::_IDateTimeChangeEventListener& listener) +{ + SysTryReturnResult(NID_UI_CTRL, (__pDateTimeChangeEvent != null), E_SYSTEM, + "A system error has occurred. The _DateTimeChangeEvent instance is null."); + + result r = __pDateTimeChangeEvent->AddListener(listener); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +result +_DateTimePicker::RemoveDateTimeChangeEventListener(const Controls::_IDateTimeChangeEventListener& listener) +{ + SysTryReturnResult(NID_UI_CTRL, (__pDateTimeChangeEvent != null), E_SYSTEM, + "A system error has occurred. The _DateTimeChangeEvent instance is null."); + + result r = __pDateTimeChangeEvent->RemoveListener(listener); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +result +_DateTimePicker::FireDateTimeChangeEvent(_DateTimeChangeStatus status, DateTime& dateTime) +{ + SysTryReturnResult(NID_UI_CTRL, (__pDateTimeChangeEvent != null), E_SYSTEM, + "A system error has occurred. The _DateTimeChangeEvent instance is null"); + + SysTryReturnResult(NID_UI_CTRL, (status >= DATE_INTERNAL_CHANGE_SAVED && status <= TIME_INTERNAL_CHANGE_CANCELED), E_INVALID_ARG, + "Invalid argument(s) is used. The status provided is not present in the _DateTimeChangeStatus list."); + + _DateTimeChangeEventArg* pDateTimeEventArg = new (std::nothrow) _DateTimeChangeEventArg(status); + SysTryReturnResult(NID_UI_CTRL, (pDateTimeEventArg != null), E_OUT_OF_MEMORY, "Memory allocation failed."); + + pDateTimeEventArg->SetDateTime(dateTime); + pDateTimeEventArg->SetDate(dateTime.GetYear(), dateTime.GetMonth(), dateTime.GetDay()); + pDateTimeEventArg->SetTime(dateTime.GetHour(), dateTime.GetMinute()); + __pDateTimeChangeEvent->Fire(*pDateTimeEventArg); + + return E_SUCCESS; +} + +result +_DateTimePicker::SetPropertyYear(const Variant& year) +{ + int yearValue = year.ToInt(); + + SysTryReturnResult(NID_UI_CTRL, (yearValue >= DATETIME_YEAR_MIN && yearValue <= DATETIME_YEAR_MAX), E_INVALID_ARG, + "Invalid argument(s) is used. The year (%d) must be greater than or equal to (%d) and less than or equal to (%d).", yearValue, DATETIME_YEAR_MIN, DATETIME_YEAR_MAX); + + int day; + int maxValue = -1; + + _DateTimeUtils dateTimeUtils; + + maxValue = dateTimeUtils.CalculateMaxDay(yearValue, GetMonth()); + day = __pPresenter->GetDay(); + + if (day > maxValue) + { + __pPresenter->SetDay(maxValue); + } + + return __pPresenter->SetYear(yearValue); +} + +result +_DateTimePicker::SetYear(int year) +{ + return SetProperty("year", Variant(year)); +} + +Variant +_DateTimePicker::GetPropertyYear(void) const +{ + int year = -1; + + year = __pPresenter->GetYear(); + + return Variant(year); +} + +int +_DateTimePicker::GetYear(void) const +{ + Variant year = GetProperty("year"); + + return year.ToInt(); +} + +result +_DateTimePicker::SetPropertyMonth(const Variant& month) +{ + int monthValue = month.ToInt(); + + SysTryReturnResult(NID_UI_CTRL, (monthValue >= DATETIME_MONTH_MIN && monthValue <= DATETIME_MONTH_MAX), E_INVALID_ARG, + "Invalid argument(s) is used. The month (%d) must be greater than or equal to (%d) and less than or equal to (%d).", monthValue, DATETIME_MONTH_MIN, DATETIME_MONTH_MAX); + + int day; + int maxValue = -1; + + _DateTimeUtils dateTimeUtils; + + maxValue = dateTimeUtils.CalculateMaxDay(GetYear(), monthValue); + day = __pPresenter->GetDay(); + + if (day > maxValue) + { + __pPresenter->SetDay(maxValue); + } + + return __pPresenter->SetMonth(monthValue); +} + +result +_DateTimePicker::SetMonth(int month) +{ + return SetProperty("month", Variant(month)); +} + +Variant +_DateTimePicker::GetPropertyMonth(void) const +{ + int month = -1; + + month = __pPresenter->GetMonth(); + + return Variant(month); +} + +int +_DateTimePicker::GetMonth(void) const +{ + Variant month = GetProperty("month"); + + return month.ToInt(); +} + +result +_DateTimePicker::SetPropertyDay(const Variant& day) +{ + int dayValue = day.ToInt(); + + SysTryReturnResult(NID_UI_CTRL, (dayValue >= DATETIME_DAY_MIN && dayValue <= DATETIME_DAY_MAX), E_INVALID_ARG, + "Invalid argument(s) is used. The day (%d) must be greater than or equal to (%d) and less than or equal to (%d).", dayValue, DATETIME_DAY_MIN, DATETIME_DAY_MAX); + + int maxValue = -1; + _DateTimeUtils dateTimeUtils; + maxValue = dateTimeUtils.CalculateMaxDay(GetYear(), GetMonth()); + + SysTryReturn(NID_UI_CTRL, (dayValue <= maxValue), E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] Invalid argument is used. day (%d), month (%d)", dayValue, GetMonth()); + + return __pPresenter->SetDay(dayValue); +} + +result +_DateTimePicker::SetDay(int day) +{ + return SetProperty("day", Variant(day)); +} + +Variant +_DateTimePicker::GetPropertyDay(void) const +{ + int day = -1; + + day = __pPresenter->GetDay(); + + return Variant(day); +} + +int +_DateTimePicker::GetDay(void) const +{ + Variant day = GetProperty("day"); + + return day.ToInt(); +} + +result +_DateTimePicker::SetPropertyHour(const Variant& hour) +{ + int hourValue = hour.ToInt(); + + SysTryReturnResult(NID_UI_CTRL, (hourValue >= DATETIME_HOUR_MIN && hourValue <= DATETIME_HOUR_MAX), E_INVALID_ARG, + "Invalid argument(s) is used. The hour (%d) must be greater than or equal to (%d) and less than or equal to (%d).", hourValue, DATETIME_HOUR_MIN, DATETIME_HOUR_MAX); + + return __pPresenter->SetHour(hourValue); + +} + +result +_DateTimePicker::SetHour(int hour) +{ + return SetProperty("hour", Variant(hour)); +} + +Variant +_DateTimePicker::GetPropertyHour(void) const +{ + int hour = -1; + + hour = __pPresenter->GetHour(); + + return Variant(hour); +} + +int +_DateTimePicker::GetHour(void) const +{ + Variant hour = GetProperty("hour"); + + return hour.ToInt(); +} + +result +_DateTimePicker::SetPropertyMinute(const Variant& minute) +{ + int minuteValue = minute.ToInt(); + + SysTryReturnResult(NID_UI_CTRL, (minuteValue >= DATETIME_MINUTE_MIN && minuteValue <= DATETIME_MINUTE_MAX), E_INVALID_ARG, + "Invalid argument(s) is used. The minute (%d) must be greater than or equal to (%d) and less than or equal to (%d).", minuteValue, DATETIME_MINUTE_MIN, DATETIME_MINUTE_MAX); + + return __pPresenter->SetMinute(minuteValue); + +} + +result +_DateTimePicker::SetMinute(int minute) +{ + return SetProperty("minute", Variant(minute)); +} + +Variant +_DateTimePicker::GetPropertyMinute(void) const +{ + int minute = -1; + + minute = __pPresenter->GetMinute(); + + return Variant(minute); +} + +int +_DateTimePicker::GetMinute(void) const +{ + Variant minute = GetProperty("minute"); + + return minute.ToInt(); +} + +result +_DateTimePicker::SetProperty24HourNotation(const Variant& enable) +{ + bool enableValue = enable.ToBool(); + + __pPresenter->Set24HourNotationEnabled(enableValue); + + return E_SUCCESS; +} + +void +_DateTimePicker::Set24HourNotationEnabled(bool enable) +{ + SetProperty("24hourNotation", Variant(enable)); + + return; +} + +Variant +_DateTimePicker::GetProperty24HourNotation(void) const +{ + bool is24HourNotation = false; + + is24HourNotation = __pPresenter->Is24HourNotationEnabled(); + + return Variant(is24HourNotation); +} + +bool +_DateTimePicker::Is24HourNotationEnabled(void) const +{ + Variant enable = GetProperty("24hourNotation"); + + return enable.ToBool(); +} + +result +_DateTimePicker::SetPropertyMinYearRange(const Variant& minYear) +{ + int minYearValue = minYear.ToInt(); + int currentMinYear = DATETIME_YEAR_MIN; + int currentMaxYear = DATETIME_YEAR_MAX; + + SysTryReturnResult(NID_UI_CTRL, (minYearValue >= DATETIME_YEAR_MIN && minYearValue <= DATETIME_YEAR_MAX), E_INVALID_ARG, + "Invalid argument(s) is used. The min year (%d) must be greater than or equal to (%d) and less than or equal to (%d).", minYearValue, DATETIME_YEAR_MIN, DATETIME_YEAR_MAX); + + __pPresenter->GetYearRange(currentMinYear, currentMaxYear); + + SysTryReturnResult(NID_UI_CTRL, (currentMaxYear >= minYearValue), E_INVALID_ARG, + "Invalid argument(s) is used. The year (%d) must be less than or equal to (%d).", minYearValue, currentMaxYear); + + return __pPresenter->SetYearRange(minYearValue, currentMaxYear); +} + +Variant +_DateTimePicker::GetPropertyMinYearRange(void) const +{ + int currentMinYear = DATETIME_YEAR_MIN; + int currentMaxYear = DATETIME_YEAR_MAX; + + __pPresenter->GetYearRange(currentMinYear, currentMaxYear); + + return Variant(currentMinYear); +} + +result +_DateTimePicker::SetPropertyMaxYearRange(const Variant& maxYear) +{ + int maxYearValue = maxYear.ToInt(); + int currentMinYear = DATETIME_YEAR_MIN; + int currentMaxYear = DATETIME_YEAR_MAX; + + SysTryReturnResult(NID_UI_CTRL, (maxYearValue >= DATETIME_YEAR_MIN && maxYearValue <= DATETIME_YEAR_MAX), E_INVALID_ARG, + "Invalid argument(s) is used. The year (%d) must be greater than or equal to (%d) and less than or equal to (%d).", maxYearValue, DATETIME_YEAR_MIN, DATETIME_YEAR_MAX); + + __pPresenter->GetYearRange(currentMinYear, currentMaxYear); + + SysTryReturnResult(NID_UI_CTRL, (maxYearValue >= currentMinYear), E_INVALID_ARG, + "Invalid argument(s) is used. The year (%d) must be greater than or equal to (%d).", maxYearValue, currentMinYear); + + return __pPresenter->SetYearRange(currentMinYear, maxYearValue); +} + +Variant +_DateTimePicker::GetPropertyMaxYearRange(void) const +{ + int currentMinYear = DATETIME_YEAR_MIN; + int currentMaxYear = DATETIME_YEAR_MAX; + + __pPresenter->GetYearRange(currentMinYear, currentMaxYear); + + return Variant(currentMaxYear); +} + +result +_DateTimePicker::SetYearRange(int minYear, int maxYear) +{ + result r = E_SUCCESS; + + SysTryReturnResult(NID_UI_CTRL, (minYear >= DATETIME_YEAR_MIN && minYear <= DATETIME_YEAR_MAX), E_INVALID_ARG, + "Invalid argument(s) is used. The minYear (%d) must be greater than or equal to (%d) and less than or equal to (%d).", minYear, DATETIME_YEAR_MIN, DATETIME_YEAR_MAX); + SysTryReturnResult(NID_UI_CTRL, (maxYear >= DATETIME_YEAR_MIN && maxYear <= DATETIME_YEAR_MAX), E_INVALID_ARG, + "Invalid argument(s) is used. The maxYear (%d) must be greater than or equal to (%d) and less than or equal to (%d).", maxYear, DATETIME_YEAR_MIN, DATETIME_YEAR_MAX); + SysTryReturnResult(NID_UI_CTRL, (maxYear >= minYear), E_INVALID_ARG, + "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) + { + return r; + } + + r = SetProperty("maxYearRange", Variant(maxYear)); + + return r; +} + +result +_DateTimePicker::GetYearRange(int& minYear, int& maxYear) const +{ + Variant currentMinYear = GetProperty("minYearRange"); + Variant currentMaxYear = GetProperty("maxYearRange"); + + minYear = currentMinYear.ToInt(); + maxYear = currentMaxYear.ToInt(); + + return E_SUCCESS; +} + +result +_DateTimePicker::SetPropertyDateTime(const Variant& varDateTime) +{ + DateTime dateTime = varDateTime.ToDateTime(); + + SysTryReturnResult(NID_UI_CTRL, (dateTime.GetYear() >= DATETIME_YEAR_MIN && dateTime.GetYear() <= DATETIME_YEAR_MAX), E_INVALID_ARG, + "[E_INVALID_ARG] Invalid argument is used. year (%d).", dateTime.GetYear()); + + int minYear = -1; + int maxYear = -1; + + GetYearRange(minYear, maxYear); + + DateTime date; + + if (dateTime.GetYear() < minYear) + { + date.SetValue(minYear, dateTime.GetMonth(), dateTime.GetDay(), dateTime.GetHour(), dateTime.GetMinute(), dateTime.GetSecond()); + } + else if (dateTime.GetYear() > maxYear) + { + date.SetValue(maxYear, dateTime.GetMonth(), dateTime.GetDay(), dateTime.GetHour(), dateTime.GetMinute(), dateTime.GetSecond()); + } + else + { + date.SetValue(dateTime); + } + + __pPresenter->SetDateTime(date); + + return E_SUCCESS; +} + +void +_DateTimePicker::SetDateTime(const DateTime& dateTime) +{ + SetProperty("dateTime", Variant(dateTime)); + + return; +} + +Variant +_DateTimePicker::GetPropertyDateTime(void) const +{ + DateTime dateTime = DateTime(); + + dateTime = __pPresenter->GetDateTime(); + + return Variant(dateTime); +} + +DateTime +_DateTimePicker::GetDateTime(void) const +{ + Variant dateTime = GetProperty("dateTime"); + + return dateTime.ToDateTime(); +} + +void +_DateTimePicker::SetCurrentDateTime(void) +{ + __pPresenter->SetCurrentDateTime(); + + return; +} + +void +_DateTimePicker::SetFocusBoxId(int boxId) +{ + __pPresenter->SetFocusBoxId(boxId); + + return; +} + +void +_DateTimePicker::SetAccessibilityElementText(int index, const String& text, bool isAmPm) +{ + _AccessibilityElement* pElement = null; + + if (__accessibilityElements.GetAt(index, pElement) == E_SUCCESS) + { + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, (pElement != null), r, "[%s] Propagating.", GetErrorMessage(r)); + + pElement->SetLabel(text); + + if (isAmPm) + { + String amText; + String pmText; + + _DateTimeUtils dateTimeUtils; + dateTimeUtils.GetAmPm(amText, AM_TYPE); + dateTimeUtils.GetAmPm(pmText, PM_TYPE); + + pElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_CHANGE_T_TTS"); + } + } + + SetLastResult(E_SUCCESS); + + return; +} + +bool +_DateTimePicker::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pPresenter->OnTouchPressed(source, touchinfo); +} + +bool +_DateTimePicker::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pPresenter->OnTouchMoved(source, touchinfo); +} + +bool +_DateTimePicker::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pPresenter->OnTouchReleased(source, touchinfo); +} + +bool +_DateTimePicker::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pPresenter->OnTouchCanceled(source, touchinfo); +} + +result +_DateTimePicker::OnAttachedToMainTree(void) +{ + return CreateAllAccessibilityElements(); +} + +result +_DateTimePicker::OnDetachingFromMainTree(void) +{ + RemoveAllAccessibilityElements(); + + return _Window::OnDetachingFromMainTree(); +} + +void +_DateTimePicker::OnChangeLayout(_ControlOrientation orientation) +{ + result r = E_SUCCESS; + FloatDimension pickerSize(0.0f, 0.0f); + FloatDimension screenSize(0.0f, 0.0f); + + screenSize = _ControlManager::GetInstance()->GetScreenSizeF(); + pickerSize = screenSize; + if (orientation == _CONTROL_ORIENTATION_LANDSCAPE) + { + pickerSize.width = screenSize.height; + pickerSize.height = screenSize.width; + } + + SetMovable(true); + SetResizable(true); + + SetSize(pickerSize); + + SetMovable(false); + SetResizable(false); + + r = DestroyFooter(); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to destroy the footer for this control."); + + r = CreateFooter(); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to create the footer for this control."); + + __pPresenter->OnChangeLayout(orientation); + + const _DateTimeDisplayBox* pBox = null; + IEnumeratorT<_AccessibilityElement*>* pEnumerator = __accessibilityElements.GetEnumeratorN(); + SysTryReturnVoidResult(NID_UI_CTRL, (pEnumerator != null), GetLastResult(), + "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _AccessibilityElement* pElement = null; + int index = 0; + while (pEnumerator->MoveNext() == E_SUCCESS) + { + if (pEnumerator->GetCurrent(pElement) == E_SUCCESS) + { + pBox = __pPresenter->GetDisplayBox(index); + if (pBox != null) + { + FloatRectangle displayBoxBounds = pBox->GetDisplayBoxBounds(); + + if (__pDisplayVisualElement != null) + { + displayBoxBounds.y += __pDisplayVisualElement->GetBounds().y; + } + + pElement->SetBounds(displayBoxBounds); + } + } + index++; + } + delete pEnumerator; + + return; +} + +void +_DateTimePicker::OnDraw(void) +{ + __pPresenter->Draw(); + + return; +} + +void +_DateTimePicker::OnActionPerformed(const _Control& source, int actionId) +{ + __pPresenter->OnActionPerformed(source, actionId); + + return; +} + +bool +_DateTimePicker::OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + String amString = L""; + String pmString = L""; + String label = L""; + + label = element.GetLabel(); + + _DateTimeUtils dateTimeUtils; + dateTimeUtils.GetAmPm(amString, AM_TYPE); + dateTimeUtils.GetAmPm(pmString, PM_TYPE); + + if (label == amString || label == pmString) + { + label.Append(L" Selected"); + _AccessibilityManager::GetInstance()->ReadContent(label); + } + + return true; +} + +void +_DateTimePicker::OnFontChanged(Font* pFont) +{ + result r = E_SUCCESS; + + if (pFont != null) + { + if (__pPresenter != null) + { + r = __pPresenter->SetFont(pFont); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating."); + } + + if (__pFooter != null) + { + for (int i=0; i < __pFooter->GetItemCount(); i++) + { + _Button* pButton = __pFooter->GetItem(i); + + if (pButton != null) + { + r = pButton->SetFont(pFont->GetFaceName()); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + } + + __pFont = pFont; + } + + return; +} + +void +_DateTimePicker::OnFontInfoRequested(unsigned long& style, float& size) +{ + style = FONT_STYLE_PLAIN; + + GET_SHAPE_CONFIG(DATETIMEPICKER::FONT_SIZE, GetOrientation(), size); + + return; +} + +bool +_DateTimePicker::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) +{ + if (&source != this && &source != __pFooter) + { + return false; + } + + return __pPresenter->OnKeyPressed(source, keyInfo); +} + +bool +_DateTimePicker::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) +{ + if (&source != this && &source != __pFooter) + { + return false; + } + + return __pPresenter->OnKeyReleased(source, keyInfo); +} + +void +_DateTimePicker::OnDrawFocus(void) +{ + __pPresenter->DrawFocus(); + __isInFocusMode = true; + return; +} + +bool +_DateTimePicker::OnFocusGained(const _Control& source) +{ + return _Control::OnFocusGained(source); +} + +bool +_DateTimePicker::OnFocusLost(const _Control& source) +{ + result r = __pPresenter->ReleaseFocus(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, r, "[%s] Propagating.", GetErrorMessage(r)); + + _Control::OnFocusLost(source); + __isInFocusMode = false; + return true; +} + +void +_DateTimePicker::OnFocusModeStateChanged(void) +{ + if (__isInFocusMode) + { + __pPresenter->ReleaseFocus(); + __isInFocusMode = false; + } + + return; +} + +void +_DateTimePicker::OnSettingChanged(Tizen::Base::String& key) +{ + if (key.Equals(L"http://tizen.org/setting/locale.date.format", false) + || key.Equals(L"http://tizen.org/setting/locale.time.format.24hour", false)) + { + __pPresenter->UpdateLocaleDateTimeFormat(); + Invalidate(); + RemoveAllAccessibilityElements(); + CreateAllAccessibilityElements(); + } + + return; +} + +Font* +_DateTimePicker::GetDateTimeFont(void) +{ + return __pFont; +} + +result +_DateTimePicker::InitializeFont(void) +{ + result r = E_SUCCESS; + + __pFont = GetFallbackFont(); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, (__pFont != null), r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +_DateTimePicker::CreateAllAccessibilityElements(void) +{ + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + if (pContainer != null) + { + float dateTimeDisplayBoxHeight = 0.0f; + float amPmDisplayBoxHeight = 0.0f; + float topMargin = 0.0f; + float leftMargin = 0.0f; + const _DateTimeDisplayBox* pBox = null; + const _DateTimeDisplayBox* pAmPmBox = null; + + GET_SHAPE_CONFIG(DATETIMEPICKER::LEFT_MARGIN, GetOrientation(), leftMargin); + + pContainer->AddListener(*this); + + // Display Box + for (int index = 0; index < DATETIME_ID_MAX; index++) + { + pBox = __pPresenter->GetDisplayBox(index); + if (pBox != null) + { + _AccessibilityElement* pElement = new (std::nothrow) _AccessibilityElement(true); + SysTryReturnResult(NID_UI_CTRL, (pElement != null), E_OUT_OF_MEMORY, "Memory allocation failed."); + + FloatRectangle displayBoxBounds = pBox->GetDisplayBoxBounds(); + int displayBoxId = pBox->GetDisplayBoxId(); + + switch (displayBoxId) + { + case DATETIME_ID_DAY: + pElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_DAY_LC"); + pElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_EDIT_T_TTS"); + break; + case DATETIME_ID_MONTH: + pElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_MONTH_LC"); + pElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_EDIT_T_TTS"); + break; + case DATETIME_ID_YEAR: + pElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_YEAR_LC"); + pElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_EDIT_T_TTS"); + break; + case DATETIME_ID_HOUR: + pElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_HOUR_LC"); + pElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_EDIT_T_TTS"); + break; + case DATETIME_ID_MINUTE: + pElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_MINUTE_LC"); + pElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_EDIT_T_TTS"); + break; + } + + GET_SHAPE_CONFIG(DATETIMEPICKER::DATETIME_DISPLAY_BOX_HEIGHT, GetOrientation(), dateTimeDisplayBoxHeight); + GET_SHAPE_CONFIG(DATETIMEPICKER::AMPM_DISPLAY_BOX_HEIGHT, GetOrientation(), amPmDisplayBoxHeight); + topMargin = (amPmDisplayBoxHeight - dateTimeDisplayBoxHeight) / 2.0f; + + displayBoxBounds.x += leftMargin; + displayBoxBounds.y -= topMargin; + displayBoxBounds.height += 2 * topMargin; + + if (__pDisplayVisualElement != null) + { + displayBoxBounds.y += __pDisplayVisualElement->GetBounds().y; + } + + pElement->SetLabel(pBox->GetText()); + pElement->SetBounds(displayBoxBounds); + pContainer->AddElement(*pElement); + } + } + + pAmPmBox = __pPresenter->GetAmPmBox(); + if (pAmPmBox != null) + { + _AccessibilityElement* pElement = new (std::nothrow) _AccessibilityElement(true); + SysTryReturnResult(NID_UI_CTRL, (pElement != null), E_OUT_OF_MEMORY, "Memory allocation failed."); + + FloatRectangle amPmBoxBounds = pAmPmBox->GetDisplayBoxBounds(); + + amPmBoxBounds.x += leftMargin; + + if (__pDisplayVisualElement != null) + { + amPmBoxBounds.y += __pDisplayVisualElement->GetBounds().y; + } + + pElement->SetLabel(pAmPmBox->GetText()); + pElement->SetBounds(amPmBoxBounds); + pElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_BUTTON_T_TTS"); + pElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_CHANGE_T_TTS"); + pContainer->AddElement(*pElement); + } + + pContainer->GetElements(__accessibilityElements); + _AccessibilityManager::GetInstance()->RequestAutoReading(_ACCESSIBILITY_AUTO_READING_MODE_FIRST_ITEM); + + } + + return E_SUCCESS; +} + +void +_DateTimePicker::RemoveAllAccessibilityElements(void) +{ + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + SysTryReturnVoidResult(NID_UI_CTRL, (pContainer != null), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _AccessibilityElement* pAccessibilityElement = null; + + pContainer->RemoveListener(*this); + + while (__accessibilityElements.GetCount() > 0) + { + if ((__accessibilityElements.GetAt(0, pAccessibilityElement)) == E_SUCCESS) + { + __accessibilityElements.RemoveAt(0); + pContainer->RemoveElement(*pAccessibilityElement); + } + else + { + __accessibilityElements.RemoveAt(0); + } + } +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_DateTimePickerImpl.cpp b/src/ui/controls/FUiCtrl_DateTimePickerImpl.cpp new file mode 100644 index 0000000..207eb60 --- /dev/null +++ b/src/ui/controls/FUiCtrl_DateTimePickerImpl.cpp @@ -0,0 +1,448 @@ +// +// 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_DateTimePickerImpl.cpp + * @brief This is the implementation file for the _DateTimePickerImpl class. + */ + +#include +#include +#include "FUiCtrl_DateTimePickerImpl.h" +#include "FUiCtrl_DateTimePicker.h" +#include "FUiCtrl_FrameImpl.h" +#include "FUi_ControlImplManager.h" +#include "FUi_ResourceSizeInfo.h" +#include "FUi_ResourceManager.h" +#include "FUiCtrl_Form.h" + +using namespace Tizen::Ui::Animations; + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + + +namespace Tizen { namespace Ui { namespace Controls +{ + +FloatDimension +_DateTimePickerImpl::DateTimePickerSizeInfo::GetDefaultMinimumSizeF(_ControlOrientation orientation) const +{ + FloatDimension pickerSize(0.0f, 0.0f); + FloatDimension screenSize(0.0f, 0.0f); + + screenSize = _ControlManager::GetInstance()->GetScreenSizeF(); + pickerSize = screenSize; + if (orientation == _CONTROL_ORIENTATION_LANDSCAPE) + { + pickerSize.width = screenSize.height; + pickerSize.height = screenSize.width; + } + + return pickerSize; +} + +FloatDimension +_DateTimePickerImpl::DateTimePickerSizeInfo::GetDefaultMaximumSizeF(_ControlOrientation orientation) const +{ + FloatDimension pickerSize(0, 0); + FloatDimension screenSize(0, 0); + + screenSize = _ControlManager::GetInstance()->GetScreenSizeF(); + pickerSize = screenSize; + if (orientation == _CONTROL_ORIENTATION_LANDSCAPE) + { + pickerSize.width = screenSize.height; + pickerSize.height = screenSize.width; + } + + return pickerSize; +} + +_DateTimePickerImpl::_DateTimePickerImpl(DateTimePicker* pPublic, _DateTimePicker* pCore) + : _WindowImpl(pPublic, pCore) + , __pPublicDateTimeChangeEvent(null) +{ +} + +_DateTimePickerImpl::~_DateTimePickerImpl(void) +{ + delete __pPublicDateTimeChangeEvent; + __pPublicDateTimeChangeEvent = null; +} + +_DateTimePickerImpl* +_DateTimePickerImpl::CreateDateTimePickerImplN(DateTimePicker* pControl, const String& title) +{ + ClearLastResult(); + + result r = E_SUCCESS; + + _DateTimePicker* pCore = _DateTimePicker::CreateDateTimePickerN(DATETIME_OUTPUT_STYLE_DATE | DATETIME_OUTPUT_STYLE_TIME, title); + SysTryReturn(NID_UI_CTRL, (pCore != null), null, r, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _DateTimePickerImpl* pDateTimePickerImpl = new (std::nothrow) _DateTimePickerImpl(pControl, pCore); + r = CheckConstruction(pCore, pDateTimePickerImpl); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), null, r, "[%s] Propagating.", GetErrorMessage(r)); + + pDateTimePickerImpl->__pPublicDateTimeChangeEvent = new (std::nothrow) _PublicDateTimeChangeEvent(*pControl); + SysTryCatch(NID_UI_CTRL, (pDateTimePickerImpl->__pPublicDateTimeChangeEvent != null), , E_OUT_OF_MEMORY, + "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = pDateTimePickerImpl->InitializeBoundsProperties(GET_SIZE_INFO(DateTimePicker), pCore->GetOrientation()); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pCore->AddDateTimeChangeEventListener(*pDateTimePickerImpl); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return pDateTimePickerImpl; + +CATCH: + delete pDateTimePickerImpl; + + return null; +} + +const char* +_DateTimePickerImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Controls::DateTimePicker"; +} + +const DateTimePicker& +_DateTimePickerImpl::GetPublic(void) const +{ + return static_cast (_ControlImpl::GetPublic()); +} + +DateTimePicker& +_DateTimePickerImpl::GetPublic(void) +{ + return static_cast (_ControlImpl::GetPublic()); +} + +const _DateTimePicker& +_DateTimePickerImpl::GetCore(void) const +{ + return static_cast (_ControlImpl::GetCore()); +} + +_DateTimePicker& +_DateTimePickerImpl::GetCore(void) +{ + return static_cast <_DateTimePicker&>(_ControlImpl::GetCore()); +} + +_DateTimePickerImpl* +_DateTimePickerImpl::GetInstance(DateTimePicker& dateTimePicker) +{ + return static_cast<_DateTimePickerImpl*> (_ControlImpl::GetInstance(dateTimePicker)); +} + +const _DateTimePickerImpl* +_DateTimePickerImpl::GetInstance(const DateTimePicker& dateTimePicker) +{ + return static_cast (_ControlImpl::GetInstance(dateTimePicker)); +} + +result +_DateTimePickerImpl::AddDateTimeChangeEventListener(Tizen::Ui::IDateTimeChangeEventListener& listener) +{ + ClearLastResult(); + + SysTryReturnResult(NID_UI_CTRL, (__pPublicDateTimeChangeEvent != null), E_SYSTEM, + "A system error has occurred. The _PublicDateTimeChangeEvent instance is null."); + + result r = __pPublicDateTimeChangeEvent->AddListener(listener); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +result +_DateTimePickerImpl::RemoveDateTimeChangeEventListener(Tizen::Ui::IDateTimeChangeEventListener& listener) +{ + ClearLastResult(); + + SysTryReturnResult(NID_UI_CTRL, (__pPublicDateTimeChangeEvent != null), E_SYSTEM, + "A system error has occurred. The _PublicDateTimeChangeEvent instance is null."); + + result r = __pPublicDateTimeChangeEvent->RemoveListener(listener); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +void +_DateTimePickerImpl::SetDateTime(const DateTime& dateTime) +{ + ClearLastResult(); + + Variant dateTimeValue(dateTime); + + GetCore().SetPropertyDateTime(dateTimeValue); +} + +void +_DateTimePickerImpl::SetCurrentDateTime(void) +{ + ClearLastResult(); + + GetCore().SetCurrentDateTime(); +} + +result +_DateTimePickerImpl::SetYear(int year) +{ + ClearLastResult(); + + Variant yearValue(year); + + return GetCore().SetPropertyYear(yearValue); +} + +result +_DateTimePickerImpl::SetMonth(int month) +{ + ClearLastResult(); + + Variant monthValue(month); + + return GetCore().SetPropertyMonth(monthValue); +} + +result +_DateTimePickerImpl::SetDay(int day) +{ + ClearLastResult(); + + Variant dayValue(day); + + return GetCore().SetPropertyDay(dayValue); +} + +result +_DateTimePickerImpl::SetHour(int hour) +{ + ClearLastResult(); + + Variant hourValue(hour); + + return GetCore().SetPropertyHour(hourValue); +} + +result +_DateTimePickerImpl::SetMinute(int minute) +{ + ClearLastResult(); + + Variant minuteValue(minute); + + return GetCore().SetPropertyMinute(minuteValue); +} + +DateTime +_DateTimePickerImpl::GetDateTime(void) const +{ + ClearLastResult(); + + Variant dateTimeValue = GetCore().GetPropertyDateTime(); + + return dateTimeValue.ToDateTime(); +} + +int +_DateTimePickerImpl::GetYear(void) const +{ + ClearLastResult(); + + Variant yearValue = GetCore().GetPropertyYear(); + + return yearValue.ToInt(); +} + +int +_DateTimePickerImpl::GetMonth(void) const +{ + ClearLastResult(); + + Variant monthValue = GetCore().GetPropertyMonth(); + + return monthValue.ToInt(); +} + +int +_DateTimePickerImpl::GetDay(void) const +{ + ClearLastResult(); + + Variant dayValue = GetCore().GetPropertyDay(); + + return dayValue.ToInt(); +} + +int +_DateTimePickerImpl::GetHour(void) const +{ + ClearLastResult(); + + Variant hourValue = GetCore().GetPropertyHour(); + + return hourValue.ToInt(); +} + +int +_DateTimePickerImpl::GetMinute(void) const +{ + ClearLastResult(); + + Variant minuteValue = GetCore().GetPropertyMinute(); + + return minuteValue.ToInt(); +} + +void +_DateTimePickerImpl::Set24HourNotationEnabled(bool enable) +{ + ClearLastResult(); + + Variant enabledValue(enable); + + GetCore().SetProperty24HourNotation(enabledValue); +} + +bool +_DateTimePickerImpl::Is24HourNotationEnabled(void) const +{ + ClearLastResult(); + + Variant enabledValue = GetCore().GetProperty24HourNotation(); + + return enabledValue.ToBool(); +} + +result +_DateTimePickerImpl::SetYearRange(int minYear, int maxYear) +{ + ClearLastResult(); + + result r = E_SUCCESS; + + Variant currentMinYearValue = GetCore().GetPropertyMinYearRange(); + Variant minYearValue(minYear); + Variant maxYearValue(maxYear); + + r = GetCore().SetPropertyMinYearRange(minYearValue); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = GetCore().SetPropertyMaxYearRange(maxYearValue); + if (r != E_SUCCESS) + { + // rollback minYearValue + GetCore().SetPropertyMinYearRange(minYearValue); + SysLogException(NID_UI_CTRL, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + return r; +} + +result +_DateTimePickerImpl::GetYearRange(int& minYear, int& maxYear) const +{ + ClearLastResult(); + + Variant minYearValue = GetCore().GetPropertyMinYearRange(); + Variant maxYearValue = GetCore().GetPropertyMaxYearRange(); + + minYear = minYearValue.ToInt(); + maxYear = maxYearValue.ToInt(); + + return E_SUCCESS; +} + +void +_DateTimePickerImpl::OnDateTimeChanged(const Tizen::Ui::_Control& source, int year, int month, int day, int hour, int minute) +{ + ClearLastResult(); + + if (__pPublicDateTimeChangeEvent == null) + { + return; + } + + _PublicDateTimeChangeEventArg* pEventArg = new (std::nothrow) _PublicDateTimeChangeEventArg(DATETIME_PUBLIC_CHANGE_SAVED); + SysTryReturnVoidResult(NID_UI_CTRL, (pEventArg != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pEventArg->SetDate(year, month, day); + pEventArg->SetTime(hour, minute); + + __pPublicDateTimeChangeEvent->Fire(*pEventArg); +} + +void +_DateTimePickerImpl::OnDateTimeChangeCanceled(const Tizen::Ui::_Control& source) +{ + ClearLastResult(); + + if (__pPublicDateTimeChangeEvent == null) + { + return; + } + + _PublicDateTimeChangeEventArg* pEventArg = new (std::nothrow) _PublicDateTimeChangeEventArg(DATETIME_PUBLIC_CHANGE_CANCELED); + SysTryReturnVoidResult(NID_UI_CTRL, (pEventArg != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + __pPublicDateTimeChangeEvent->Fire(*pEventArg); +} + +void +_DateTimePickerImpl::OnChangeLayout(Tizen::Ui::_ControlOrientation orientation) +{ + ClearLastResult(); + + InitializeBoundsProperties(GET_SIZE_INFO(DateTimePicker), orientation); + _ControlImpl::OnChangeLayout(orientation); +} + +result +_DateTimePickerImpl::OnAttachedToMainTree(void) +{ + result r = E_SUCCESS; + + if (GetOwner() == null) + { + _FrameImpl* pFrameImpl = dynamic_cast <_FrameImpl*>(_ControlImplManager::GetInstance()->GetCurrentFrame()); + SysTryReturn(NID_UI_CTRL, pFrameImpl != null, E_SYSTEM, + E_SYSTEM, "[E_SYSTEM] This instance is not constructed."); + + _Form* pForm = pFrameImpl->GetCore().GetCurrentForm(); + + if (pForm != null) + { + GetCore().SetOwner(pForm); + } + else + { + GetCore().SetOwner(&pFrameImpl->GetCore()); + } + } + SetVisibleState(true); + _WindowImpl::OnAttachedToMainTree(); + return r; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_DateTimePresenter.cpp b/src/ui/controls/FUiCtrl_DateTimePresenter.cpp new file mode 100644 index 0000000..50a2fe7 --- /dev/null +++ b/src/ui/controls/FUiCtrl_DateTimePresenter.cpp @@ -0,0 +1,2593 @@ +// +// 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_DateTimePresenter.cpp + * @brief This is the implementation file for the _DateTimePresenter class. + */ + +#include +#include +#include +#include +#include +#include +#include "FUi_ResourceManager.h" +#include "FUiAnim_VisualElement.h" +#include "FUiCtrl_DateTimePresenter.h" +#include "FUiCtrl_InputPad.h" +#include "FUiCtrl_DateTimeDefine.h" +#include "FUiCtrl_DateTimeModel.h" +#include "FUiCtrl_DateTimeDisplayBox.h" +#include "FUiCtrl_DateTimePicker.h" +#include "FUiCtrl_DateTimeUtils.h" +#include "FUi_AccessibilityManager.h" +#include "FUi_CoordinateSystemUtils.h" + +using namespace Tizen::Ui; +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Graphics::_Text; +using namespace Tizen::Ui::Animations; +using namespace Tizen::System; + +namespace Tizen { namespace Ui { namespace Controls +{ +const int DATETIME_DISPLAY_STRING_MAX_LENGTH = 10; + +_DateTimePresenter::_DateTimePresenter(int pickerStyle, const String& title) + : __pView(null) + , __pModel(null) + , __selectedBoxIndex(0) + , __focusedBoxIndex(0) + , __pInputPad(null) + , __inputPadType(INPUTPAD_STYLE_NORMAL) + , __pickerStyle(pickerStyle) + , __inputPadEnabled(true) + , __outputBoxMaxCount(0) + , __year(0) + , __month(0) + , __day(0) + , __hour(0) + , __minute(0) + , __is24HourNotation(false) + , __dtp24HourSet(false) + , __isPm(false) + , __isPmButtonPressed(false) + , __isFocusBoxChanged(false) + , __inputComposing(DATETIME_INPUT_END) + , __changeFocusCounter(DATE_TIME_CHANGE_FOCUS_COUNTER_MIN) + , __title(title) + , __pColonBitmap(null) + , __pColonDisabledBitmap(null) + , __pBgNormalBitmap(null) + , __pBgEffectBitmap(null) + , __pFont(null) + , __pPmBox(null) + , __keypadEnabled(false) +{ + for (int i = 0; i < DATETIME_ID_MAX; i++) + { + __pDisplayBox[i] = null; + } + + for (int i = 0; i < DATETIME_STATUS_MAX; i++) + { + __pDisplayBoxNormalBitmap[i] = null; + __pDisplayBoxEffectBitmap[i] = null; + + __pAmPmNormalBitmap[i] = null; + __pAmPmEffectBitmap[i] = null; + } +} + +_DateTimePresenter::~_DateTimePresenter(void) +{ + Dispose(); +} + +void +_DateTimePresenter::Dispose(void) +{ + for (int i = 0; i < DATETIME_STATUS_MAX; i++) + { + delete __pDisplayBoxNormalBitmap[i]; + __pDisplayBoxNormalBitmap[i] = null; + + delete __pDisplayBoxEffectBitmap[i]; + __pDisplayBoxEffectBitmap[i] = null; + + delete __pAmPmNormalBitmap[i]; + __pAmPmNormalBitmap[i] = null; + + delete __pAmPmEffectBitmap[i]; + __pAmPmEffectBitmap[i] = null; + } + + delete __pColonBitmap; + __pColonBitmap = null; + + delete __pColonDisabledBitmap; + __pColonDisabledBitmap = null; + + delete __pBgNormalBitmap; + __pBgNormalBitmap = null; + + delete __pBgEffectBitmap; + __pBgEffectBitmap = null; + + for (int i = 0; i < DATETIME_ID_MAX; i++) + { + delete __pDisplayBox[i]; + __pDisplayBox[i] = null; + } + + delete __pPmBox; + __pPmBox = null; + + if ((__inputPadEnabled) && (__pInputPad != null)) + { + __pView->DetachChild(*__pInputPad); + delete __pInputPad; + __pInputPad = null; + } + + delete __pModel; + __pModel = null; +} + +result +_DateTimePresenter::Construct(_DateTimePicker& view) +{ + result r = E_SUCCESS; + + __pView = &view; + _ControlOrientation orientation = __pView->GetOrientation(); + + __pFont = __pView->GetDateTimeFont(); + SysTryReturnResult(NID_UI_CTRL, (__pFont != null), E_SYSTEM, "A system error has occurred. Failed to get the font."); + + LoadResource(); + UpdateDateTimeOutputConfig(); + + FloatRectangle inputPadBounds(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle pickerBounds(0.0f, 0.0f, 0.0f, 0.0f); + + pickerBounds = __pView->GetBoundsF(); + + GET_SHAPE_CONFIG(DATETIMEPICKER::INPUTPAD_HEIGHT, orientation, inputPadBounds.height); + + FloatDimension dim; + dim = CoordinateSystem::AlignToDevice(FloatDimension(pickerBounds.width, inputPadBounds.height)); + inputPadBounds.height = dim.height; + + inputPadBounds.x = 0.0f; + inputPadBounds.width = pickerBounds.width; + inputPadBounds.y = pickerBounds.height - inputPadBounds.height; + + __pModel = new (std::nothrow) _DateTimeModel; + SysTryReturnResult(NID_UI_CTRL, (__pModel != null), E_OUT_OF_MEMORY, "Memory allocation failed."); + + // Load display data for sync with model data + UpdateTimeFormat(); + LoadPickerData(); + + if (__inputPadEnabled) + { + __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); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to construct the instance of Inputpad."); + + r = __pView->AttachChild(*__pInputPad); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __pInputPad->SetInputPadEventListener(*this); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to set InputPadEventListener to the Inputpad."); + + __pInputPad->SetInputPadStyle(INPUTPAD_STYLE_NORMAL); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to set InputPadStyle to the Inputpad."); + + __pInputPad->SetFont(__pFont); + + if (__pInputPad->IsFocusable()) + { + __pInputPad->SetFocusable(false); + } + + _DateTimeDisplayBox* pDisplayBox = __pDisplayBox[__selectedBoxIndex]; + SysTryCatch(NID_UI_CTRL, (pDisplayBox != null), , E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get Display box."); + + SetFocusBoxId(pDisplayBox->GetDisplayBoxId()); + } + + return r; + +CATCH: + Dispose(); + + return r; +} + +result +_DateTimePresenter::SetYear(int year) +{ + result r = E_SUCCESS; + int minYear = 0; + int maxYear = 0; + + GetYearRange(minYear, maxYear); + + if (year < minYear) + { + year = minYear; + } + else if (year > maxYear) + { + year = maxYear; + } + + r = __pModel->SetYear(year); + + if (r == E_SUCCESS) + { + UpdateDisplayData(DATETIME_ID_YEAR); + } + + return r; +} + +result +_DateTimePresenter::SetMonth(int month) +{ + result r = __pModel->SetMonth(month); + + if (r == E_SUCCESS) + { + UpdateDisplayData(DATETIME_ID_MONTH); + } + + return r; +} + +result +_DateTimePresenter::SetDay(int day) +{ + result r = __pModel->SetDay(day); + + if (r == E_SUCCESS) + { + UpdateDisplayData(DATETIME_ID_DAY); + } + + return r; +} + +result +_DateTimePresenter::SetHour(int hour) +{ + result r = __pModel->SetHour(hour); + + if (r == E_SUCCESS) + { + UpdateDisplayData(DATETIME_ID_HOUR); + } + + return r; +} + +result +_DateTimePresenter::SetMinute(int minute) +{ + result r = __pModel->SetMinute(minute); + + if (r == E_SUCCESS) + { + UpdateDisplayData(DATETIME_ID_MINUTE); + } + + return r; +} + +result +_DateTimePresenter::SetYearRange(int minYear, int maxYear) +{ + __pModel->SetMinYear(minYear); + __pModel->SetMaxYear(maxYear); + + return E_SUCCESS; +} + +int +_DateTimePresenter::GetYear(void) const +{ + return __pModel->GetYear(); +} + +int +_DateTimePresenter::GetMonth(void) const +{ + return __pModel->GetMonth(); +} + +int +_DateTimePresenter::GetDay(void) const +{ + return __pModel->GetDay(); +} + +int +_DateTimePresenter::GetHour(void) const +{ + return __pModel->GetHour(); +} + +int +_DateTimePresenter::GetMinute(void) const +{ + return __pModel->GetMinute(); +} + +result +_DateTimePresenter::GetYearRange(int& minYear, int& maxYear) const +{ + return __pModel->GetYearRange(minYear, maxYear); +} + +void +_DateTimePresenter::Set24HourNotationEnabled(bool enable) +{ + __is24HourNotation = enable; + __dtp24HourSet = true; + + UpdateDateTimeOutputConfig(); +} + +bool +_DateTimePresenter::Is24HourNotationEnabled(void) const +{ + return __is24HourNotation; +} + +void +_DateTimePresenter::SetCurrentDateTime(void) +{ + __pModel->SetCurrentDateTime(); + + UpdateDisplayData(DATETIME_ID_YEAR); + UpdateDisplayData(DATETIME_ID_MONTH); + UpdateDisplayData(DATETIME_ID_DAY); + UpdateDisplayData(DATETIME_ID_HOUR); + UpdateDisplayData(DATETIME_ID_MINUTE); +} + +void +_DateTimePresenter::SetDateTime(const DateTime& dateTime) +{ + __pModel->SetDateTime(dateTime); + + UpdateDisplayData(DATETIME_ID_YEAR); + UpdateDisplayData(DATETIME_ID_MONTH); + UpdateDisplayData(DATETIME_ID_DAY); + UpdateDisplayData(DATETIME_ID_HOUR); + UpdateDisplayData(DATETIME_ID_MINUTE); +} + +DateTime +_DateTimePresenter::GetDateTime(void) const +{ + return __pModel->GetDateTime(); +} + +void +_DateTimePresenter::SetFocusBoxId(int boxId) +{ + for (int i = 0; i < __outputBoxMaxCount; i++) + { + int displayBoxId = __pDisplayBox[i]->GetDisplayBoxId(); + + if (boxId == displayBoxId) + { + SetFocusBox(i); + return; + } + } +} + +const _DateTimeDisplayBox* +_DateTimePresenter::GetDisplayBox(int index) const +{ + return __pDisplayBox[index]; +} + +const _DateTimeDisplayBox* +_DateTimePresenter::GetAmPmBox(void) const +{ + return __pPmBox; +} + +bool +_DateTimePresenter::Draw(void) +{ + result r = E_SUCCESS; + + _VisualElement* pVisualElement = null; + Canvas* pCanvas = null; + Color backgroundColor; + + pVisualElement = __pView->GetDisplayVisualElement(); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, (pVisualElement != null), false, r, "[%s] Propagating.", GetErrorMessage(r)); + + pCanvas = pVisualElement->GetCanvasN(); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, (pCanvas != null), false, r, "[%s] Propagating.", GetErrorMessage(r)); + + // Draw Background + GET_COLOR_CONFIG(DATETIMEPICKER::BG_NORMAL, backgroundColor); + __pView->SetBackgroundColor(backgroundColor); + + // Draw DisplayBox Background + DrawBackground(*pCanvas); + + if (!__title.IsEmpty()) + { + DrawTitle(*pCanvas); + } + + for (int i = 0; i < __outputBoxMaxCount; 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(*pAmPmCanvas); + } + else if (__pickerStyle & DATETIME_OUTPUT_STYLE_TIME) + { + DrawColon(*pCanvas); + DrawPm(*pAmPmCanvas); + } + + delete pAmPmCanvas; + + if (unlikely(_AccessibilityManager::IsActivated())) + { + SetAccessibilityElementText(); + } + + delete pCanvas; + + return true; +} + +result +_DateTimePresenter::SetFont(Font* pFont) +{ + result r = E_SUCCESS; + float fontSize = 0; + + if (__pView == null) + { + return E_SUCCESS; + } + + GET_SHAPE_CONFIG(DATETIMEPICKER::FONT_SIZE, __pView->GetOrientation(), fontSize); + + r = _FontImpl::GetInstance(*pFont)->SetStyle(FONT_STYLE_PLAIN); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); + + r = _FontImpl::GetInstance(*pFont)->SetSize(fontSize); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); + + for (int i = 0; i < DATETIME_ID_MAX; i++) + { + if (__pDisplayBox[i] != null) + { + __pDisplayBox[i]->SetFont(pFont); + } + } + + if (__pPmBox != null) + { + __pPmBox->SetFont(pFont); + } + + if (__pInputPad != null) + { + __pInputPad->SetFont(pFont); + } + + __pFont = pFont; + + return E_SUCCESS; +} + +void +_DateTimePresenter::UpdateLocaleDateTimeFormat(void) +{ + UpdateTimeFormat(); + + UpdateDateTimeOutputConfig(); + + LoadPickerData(); + + for (int i = 0; i < __outputBoxMaxCount; i++) + { + AdjustDisplayValue(i); + } + + return; +} + +void +_DateTimePresenter::UpdateTimeFormat(void) +{ + if (!__dtp24HourSet) + { + String key(L"http://tizen.org/setting/locale.time.format.24hour"); + SettingInfo::GetValue(key , __is24HourNotation); + } + + return; +} + +void +_DateTimePresenter::OnChangeLayout(_ControlOrientation orientation) +{ + result r = E_SUCCESS; + FloatRectangle inputPadBounds(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle pickerBounds(0.0f, 0.0f, 0.0f, 0.0f); + + pickerBounds = __pView->GetBoundsF(); + + UpdateDateTimeOutputConfig(); + + inputPadBounds.x = 0; + + GET_SHAPE_CONFIG(DATETIMEPICKER::INPUTPAD_HEIGHT, orientation, inputPadBounds.height); + + inputPadBounds.height = CoordinateSystem::AlignToDevice(FloatDimension(pickerBounds.width, inputPadBounds.height)).height; + + inputPadBounds.width = pickerBounds.width; + inputPadBounds.y = pickerBounds.height - inputPadBounds.height; + + if (__pInputPad != null) + { + r = __pInputPad->SetBounds(inputPadBounds); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + } +} + +bool +_DateTimePresenter::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + if (__pView != &source) + { + return false; + } + + int touchedAreaId = CalculateTouchArea(touchinfo.GetCurrentPosition().x, touchinfo.GetCurrentPosition().y); + + if (touchedAreaId == DATETIME_AREA_OUTPUT_AMPM) + { + __isPmButtonPressed = true; + __pView->Invalidate(true); + return true; + } + + return true; +} + +bool +_DateTimePresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + if (__pView != &source) + { + return false; + } + + return true; +} + +bool +_DateTimePresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + result r = E_SUCCESS; + String text; + _DateTimeUtils dateTimeUtils; + + + if (__pView != &source) + { + return false; + } + + int touchedAreaId = CalculateTouchArea(touchinfo.GetCurrentPosition().x, touchinfo.GetCurrentPosition().y); + + if (__isPmButtonPressed) + { + if (touchedAreaId == DATETIME_AREA_OUTPUT_AMPM) + { + __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; + __changeFocusCounter = DATE_TIME_CHANGE_FOCUS_COUNTER_MIN; + __isPmButtonPressed = false; + AdjustDisplayValue(__selectedBoxIndex); + __pView->Invalidate(true); + + return true; + } + + if ((touchedAreaId == DATETIME_AREA_NONE) || (touchedAreaId == DATETIME_AREA_INPUT) || + (touchedAreaId == DATETIME_AREA_OUTPUT_AMPM)) + { + __isPmButtonPressed = false; + __pView->Invalidate(true); + + return true; + } + + int newOutputFocusedIndex = -1; + + if (touchedAreaId == DATETIME_AREA_OUTPUT) + { + newOutputFocusedIndex = CalculateTouchOutputArea(touchinfo.GetCurrentPosition().x, touchinfo.GetCurrentPosition().y); + + if (newOutputFocusedIndex == (-1)) + { + return true; + } + + for (int i = 0; i < __outputBoxMaxCount; i++) + { + AdjustDisplayValue(i); + } + + if (newOutputFocusedIndex != __selectedBoxIndex) + { + __selectedBoxIndex = newOutputFocusedIndex; + } + + _VisualElement* pVisualElement = null; + Canvas* pCanvas = null; + + pVisualElement = __pView->GetDisplayVisualElement(); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, (pVisualElement != null), false, r, "[%s] Propagating.", GetErrorMessage(r)); + + pCanvas = pVisualElement->GetCanvasN(); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, (pCanvas != null), false, r, "[%s] Propagating.", GetErrorMessage(r)); + + DrawDateTimeDisplayBox(*pCanvas, __selectedBoxIndex); + + delete pCanvas; + + __inputComposing = DATETIME_INPUT_END; + __changeFocusCounter = DATE_TIME_CHANGE_FOCUS_COUNTER_MIN; + + int boxId = __pDisplayBox[__selectedBoxIndex]->GetDisplayBoxId(); + ChangeInputPadStyle(boxId); + + __pView->Invalidate(true); + + return true; + } + + return true; +} + +bool +_DateTimePresenter::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + if (__pView != &source) + { + return false; + } + + __isPmButtonPressed = false; + __inputComposing = DATETIME_INPUT_END; + __changeFocusCounter = DATE_TIME_CHANGE_FOCUS_COUNTER_MIN; + + __pView->Invalidate(true); + + return true; +} + +void +_DateTimePresenter::OnInputPadValueChanged(const _Control& source, int inputPadReturnValue) +{ + HandleInputPadValueChange(inputPadReturnValue); +} + +void +_DateTimePresenter::OnActionPerformed(const _Control& source, int actionId) +{ + HandleSaveCancelAction(actionId); +} + +bool +_DateTimePresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) +{ + if (!__keypadEnabled) + { + return false; + } + + _KeyCode keyCode = keyInfo.GetKeyCode(); + + switch (keyCode) + { + case _KEY_RIGHT: + { + if (__pickerStyle != DATETIME_OUTPUT_STYLE_DATE && __focusedBoxIndex < __outputBoxMaxCount) + { + __focusedBoxIndex++; + SetFocusBox(__focusedBoxIndex); + } + else if (__pickerStyle == DATETIME_OUTPUT_STYLE_DATE && __focusedBoxIndex < __outputBoxMaxCount-1) + { + __focusedBoxIndex++; + SetFocusBox(__focusedBoxIndex); + } + else + { + return false; + } + } + break; + case _KEY_LEFT: + { + if (__focusedBoxIndex > 0) + { + __focusedBoxIndex--; + SetFocusBox(__focusedBoxIndex); + } + else + { + return false; + } + } + break; + case _KEY_ENTER: + { + if (__focusedBoxIndex == __outputBoxMaxCount) + { + __isPmButtonPressed = true; + } + } + break; + case _KEY_0: + case _KEY_NUMPAD_0: + HandleInputPadValueChange(0); + break; + case _KEY_1: + case _KEY_NUMPAD_1: + HandleInputPadValueChange(1); + break; + case _KEY_2: + case _KEY_NUMPAD_2: + HandleInputPadValueChange(2); + break; + case _KEY_3: + case _KEY_NUMPAD_3: + HandleInputPadValueChange(3); + break; + case _KEY_4: + case _KEY_NUMPAD_4: + HandleInputPadValueChange(4); + break; + case _KEY_5: + case _KEY_NUMPAD_5: + HandleInputPadValueChange(5); + break; + case _KEY_6: + case _KEY_NUMPAD_6: + HandleInputPadValueChange(6); + break; + case _KEY_7: + case _KEY_NUMPAD_7: + HandleInputPadValueChange(7); + break; + case _KEY_8: + case _KEY_NUMPAD_8: + HandleInputPadValueChange(8); + break; + case _KEY_9: + case _KEY_NUMPAD_9: + HandleInputPadValueChange(9); + break; + default: + return false; + } + + __pView->Invalidate(true); + return true; +} + +bool +_DateTimePresenter::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) +{ + _KeyCode keyCode = keyInfo.GetKeyCode(); + + if (keyCode == _KEY_ESC || keyCode == _KEY_BACK) + { + HandleSaveCancelAction(DATETIME_EVENT_ID_CANCEL); + return true; + } + + if (!__keypadEnabled) + { + return false; + } + + if (__isPmButtonPressed && keyCode == _KEY_ENTER) + { + __isPm = (!__isPm); + __isPmButtonPressed = false; + __pView->Invalidate(true); + } + + return true; +} + +result +_DateTimePresenter::DrawFocus(void) +{ + result r = E_SUCCESS; + __keypadEnabled = true; + SetFocusBox(0); + + __pView->Invalidate(true); + return r; +} + +result +_DateTimePresenter::ReleaseFocus(void) +{ + result r = E_SUCCESS; + __keypadEnabled = false; + + if (__pickerStyle != DATETIME_OUTPUT_STYLE_DATE && __focusedBoxIndex == __outputBoxMaxCount) + { + __selectedBoxIndex = __outputBoxMaxCount - 1; //minute + } + else + { + __selectedBoxIndex = __focusedBoxIndex; + } + __focusedBoxIndex = 0; + + if (__isPmButtonPressed) + { + __isPmButtonPressed = false; + } + __inputComposing = DATETIME_INPUT_END; + __changeFocusCounter = DATE_TIME_CHANGE_FOCUS_COUNTER_MIN; + AdjustDisplayValue(__selectedBoxIndex); + __pView->Invalidate(true); + + return r; +} + +void +_DateTimePresenter::HandleInputPadValueChange(int inputPadReturnValue) +{ + if ((!__inputPadEnabled) || (inputPadReturnValue == -1)) + { + return; + } + + if ((__keypadEnabled) && (__pickerStyle != DATETIME_OUTPUT_STYLE_DATE) && (__focusedBoxIndex == __outputBoxMaxCount)) + { + //in case of Am/Pm if keypad enabled, inputpad values need not be handled though in focus + return; + } + + int boxId = __pDisplayBox[__selectedBoxIndex]->GetDisplayBoxId(); + int currentNumber = GetNumberInBox(boxId); + int newNumber = 0; + + if (boxId == DATETIME_ID_YEAR) + { + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_SIP, __pView); + __changeFocusCounter++; + + if (__isFocusBoxChanged) + { + newNumber = inputPadReturnValue; + __isFocusBoxChanged = false; + } + else + { + newNumber = SetFourDigit(currentNumber, inputPadReturnValue); + } + + __inputComposing = DATETIME_INPUT_BEGIN; + SetNumberInBox(boxId, newNumber); + + int min = 0; + int max = 0; + + GetYearRange(min, max); + + if ((newNumber >= max) || (newNumber > DATETIME_THREE_DIGIT_MAX) || __changeFocusCounter == DATE_TIME_CHANGE_FOCUS_COUNTER_MAX) + { + ChangeFocusBox(); + } + } + else if (boxId == DATETIME_ID_MONTH) + { + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_SIP, __pView); + + if (__inputComposing == DATETIME_INPUT_BEGIN && __keypadEnabled) + { + currentNumber = GetNumberInBox(boxId); + newNumber = currentNumber * 10 + inputPadReturnValue; + + if (newNumber > 12) + { + newNumber = 12; + } + else if (newNumber < 1) + { + newNumber = 1; + } + + SetNumberInBox(boxId, newNumber); + + ChangeFocusBox(); + } + else + { + if (inputPadReturnValue == 0) + { + return; + } + newNumber = inputPadReturnValue; + __inputComposing = DATETIME_INPUT_BEGIN; + + SetNumberInBox(boxId, newNumber); + + if (!__keypadEnabled || newNumber > 1) + { + ChangeFocusBox(); + } + } + } + else + { + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_SIP, __pView); + __changeFocusCounter++; + + if (__isFocusBoxChanged) + { + newNumber = inputPadReturnValue; + __isFocusBoxChanged = false; + } + else + { + newNumber = SetTwoDigit(currentNumber, inputPadReturnValue); + } + + __inputComposing = DATETIME_INPUT_BEGIN; + + SetNumberInBox(boxId, newNumber); + + if (newNumber > DATETIME_ONE_DIGIT_MAX || __changeFocusCounter == DATE_TIME_CHANGE_FOCUS_COUNTER_MAX / 2) + { + ChangeFocusBox(); + } + } + + __pView->Invalidate(true); +} + +void +_DateTimePresenter::HandleSaveCancelAction(int actionId) +{ + result r = E_SUCCESS; + + if (__pView == null) + { + return; + } + + if (actionId != DATETIME_EVENT_ID_SAVE && actionId != DATETIME_EVENT_ID_CANCEL) + { + return; + } + + DateTime dateTime; + + __inputComposing = DATETIME_INPUT_END; + __changeFocusCounter = DATE_TIME_CHANGE_FOCUS_COUNTER_MIN; + __focusedBoxIndex = 0; + __selectedBoxIndex = 0; + + int boxId = __pDisplayBox[__selectedBoxIndex]->GetDisplayBoxId(); + + SetFocusBoxId(boxId); + __pView->Close(); + + if (actionId == DATETIME_EVENT_ID_SAVE) + { + for (int i = 0; i < __outputBoxMaxCount; i++) + { + AdjustDisplayValue(i); + } + + SavePickerData(); + + switch (__pickerStyle) + { + case DATETIME_OUTPUT_STYLE_DATE: + r = dateTime.SetValue(GetYear(), GetMonth(), GetDay(), dateTime.GetHour(), dateTime.GetMinute(), dateTime.GetSecond()); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __pView->FireDateTimeChangeEvent(DATE_INTERNAL_CHANGE_SAVED, dateTime); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to fire the event for DateTime change saved."); + break; + + case DATETIME_OUTPUT_STYLE_TIME: + r = dateTime.SetValue(dateTime.GetYear(), dateTime.GetMonth(), dateTime.GetDay(), GetHour(), GetMinute(), dateTime.GetSecond()); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __pView->FireDateTimeChangeEvent(TIME_INTERNAL_CHANGE_SAVED, dateTime); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to fire the event for DateTime change saved."); + break; + + case DATETIME_OUTPUT_STYLE_DATETIME: + r = dateTime.SetValue(GetYear(), GetMonth(), GetDay(), GetHour(), GetMinute(), dateTime.GetSecond()); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __pView->FireDateTimeChangeEvent(DATETIME_INTERNAL_CHANGE_SAVED, dateTime); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to fire the event for DateTime change saved."); + break; + + default: + break; + } + } + else if (actionId == DATETIME_EVENT_ID_CANCEL) + { + LoadPickerData(); + + switch (__pickerStyle) + { + case DATETIME_OUTPUT_STYLE_DATE: + r = dateTime.SetValue(GetYear(), GetMonth(), GetDay(), dateTime.GetHour(), dateTime.GetMinute(), dateTime.GetSecond()); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __pView->FireDateTimeChangeEvent(DATE_INTERNAL_CHANGE_CANCELED, dateTime); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to fire the event for DateTime change canceled."); + break; + + case DATETIME_OUTPUT_STYLE_TIME: + r = dateTime.SetValue(dateTime.GetYear(), dateTime.GetMonth(), dateTime.GetDay(), GetHour(), GetMinute(), dateTime.GetSecond()); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __pView->FireDateTimeChangeEvent(TIME_INTERNAL_CHANGE_CANCELED, dateTime); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to fire the event for DateTime change canceled."); + break; + + case DATETIME_OUTPUT_STYLE_DATETIME: + r = dateTime.SetValue(GetYear(), GetMonth(), GetDay(), GetHour(), GetMinute(), dateTime.GetSecond()); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __pView->FireDateTimeChangeEvent(DATETIME_INTERNAL_CHANGE_CANCELED, dateTime); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to fire the event for DateTime change canceled."); + break; + + default: + break; + } + } +} + +void +_DateTimePresenter::UpdateDateTimeOutputConfig(void) +{ + _ControlOrientation orientation = __pView->GetOrientation(); + _DateTimeDisplayBox* pPmBox = null; + _DateTimeDisplayBox* pDisplayBox[DATETIME_ID_MAX]; + + FloatRectangle outputAreaBounds(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle dateBounds(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle monthBounds(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle yearBounds(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle hourBounds(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle minuteBounds(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle amPmBounds(0.0f, 0.0f, 0.0f, 0.0f); + + int indexBox = 0; + int boxCount = 0; + + float dateTimeDisplayBoxHeight = 0.0f; + float amPmDisplayBoxHeight = 0.0f; + + float dateTimeElementY = 0.0f; + float amPmElementY = 0.0f; + float dateElementGapWidth = 0.0f; + float timeOutputMargin = 0.0f; + float timeElementWidth = 0.0f; + float colonWidth = 0.0f; + float colonMargin = 0.0f; + float amPmWidth = 0.0f; + float amPmMargin = 0.0f; + + float dividerWidth = 0.0f; + float dividerMargin = 0.0f; + + for (indexBox = 0; indexBox < DATETIME_ID_MAX; indexBox++) + { + pDisplayBox[indexBox] = null; + } + + outputAreaBounds = GetOutputArea(); + __pView->SetDisplayVisualElementBounds(outputAreaBounds); + + GET_SHAPE_CONFIG(DATETIMEPICKER::DATE_ELEMENT_GAP_WIDTH, orientation, dateElementGapWidth); + + GET_SHAPE_CONFIG(DATETIMEPICKER::DATE_ELEMENT_WIDTH, orientation, dateBounds.width); + GET_SHAPE_CONFIG(DATETIMEPICKER::MONTH_ELEMENT_WIDTH, orientation, monthBounds.width); + GET_SHAPE_CONFIG(DATETIMEPICKER::YEAR_ELEMENT_WIDTH, orientation, yearBounds.width); + + GET_SHAPE_CONFIG(DATETIMEPICKER::DATETIME_DISPLAY_BOX_HEIGHT, orientation, dateTimeDisplayBoxHeight); + GET_SHAPE_CONFIG(DATETIMEPICKER::AMPM_DISPLAY_BOX_HEIGHT, orientation, amPmDisplayBoxHeight); + + GET_SHAPE_CONFIG(DATETIMEPICKER::TIME_OUTPUT_MARGIN, orientation, timeOutputMargin); + GET_SHAPE_CONFIG(DATETIMEPICKER::TIME_ELEMENT_WIDTH, orientation, timeElementWidth); + + GET_SHAPE_CONFIG(DATETIMEPICKER::COLON_WIDTH, orientation, colonWidth); + GET_SHAPE_CONFIG(DATETIMEPICKER::COLON_MARGIN, orientation, colonMargin); + + GET_SHAPE_CONFIG(DATETIMEPICKER::AMPM_WIDTH, orientation, amPmWidth); + GET_SHAPE_CONFIG(DATETIMEPICKER::TIME_AMPM_MARGIN, orientation, amPmMargin); + + GET_FIXED_VALUE_CONFIG(DATETIMEPICKER::DIVIDER_WIDTH, orientation, dividerWidth); + GET_SHAPE_CONFIG(DATETIMEPICKER::DIVIDER_MARGIN, orientation, dividerMargin); + + hourBounds.width = minuteBounds.width = timeElementWidth; + amPmBounds.width = amPmWidth; + + dateBounds.height = monthBounds.height = yearBounds.height = hourBounds.height = minuteBounds.height = dateTimeDisplayBoxHeight; + amPmBounds.height = amPmDisplayBoxHeight; + + if (__title.IsEmpty()) + { + dateTimeElementY = (outputAreaBounds.height - dateTimeDisplayBoxHeight) / 2.0f; + amPmElementY = (outputAreaBounds.height - amPmDisplayBoxHeight) / 2.0f; + } + else + { + float topMargin = 0.0f; + float bottomMargin = 0.0f; + float titleHeight = 0.0f; + + GET_SHAPE_CONFIG(DATETIMEPICKER::TITLE_TOP_MARGIN, orientation, topMargin); + GET_SHAPE_CONFIG(DATETIMEPICKER::TITLE_BOTTOM_MARGIN, orientation, bottomMargin); + GET_SHAPE_CONFIG(DATETIMEPICKER::TITLE_HEIGHT, orientation, titleHeight); + + dateTimeElementY = topMargin + titleHeight + bottomMargin; + amPmElementY = topMargin + titleHeight; + } + + dateBounds.y = monthBounds.y = yearBounds.y = hourBounds.y = minuteBounds.y = dateTimeElementY; + amPmBounds.y = amPmElementY; + + if (__pickerStyle == DATETIME_OUTPUT_STYLE_DATE || __pickerStyle == DATETIME_OUTPUT_STYLE_DATETIME) + { + float leftMargin = 0.0f; + GET_SHAPE_CONFIG(DATETIMEPICKER::DATETIME_OUTPUT_LEFT_MARGIN, orientation, leftMargin); + + _DateTimeUtils dateTimeUtils; + int localeDateFormat = dateTimeUtils.GetLocaleDateFormat(); + + switch (localeDateFormat) + { + case DATE_FORMAT_DDMMYYYY: + { + dateBounds.x = leftMargin; + monthBounds.x = dateBounds.x + dateBounds.width + dateElementGapWidth; + yearBounds.x = monthBounds.x + monthBounds.width + dateElementGapWidth; + hourBounds.x = yearBounds.x + yearBounds.width + (2 * dividerMargin + dividerWidth); + + // Date + pDisplayBox[boxCount] = new (std::nothrow) _DateTimeDisplayBox(dateBounds, DATETIME_ID_DAY); + SysTryReturnVoidResult(NID_UI_CTRL, (pDisplayBox[boxCount] != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + boxCount++; + + // Month + pDisplayBox[boxCount] = new (std::nothrow) _DateTimeDisplayBox(monthBounds, DATETIME_ID_MONTH); + SysTryCatch(NID_UI_CTRL, (pDisplayBox[boxCount] != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + boxCount++; + + // Year + pDisplayBox[boxCount] = new (std::nothrow) _DateTimeDisplayBox(yearBounds, DATETIME_ID_YEAR); + SysTryCatch(NID_UI_CTRL, (pDisplayBox[boxCount] != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + boxCount++; + } + break; + case DATE_FORMAT_MMDDYYYY: + { + monthBounds.x = leftMargin; + dateBounds.x = monthBounds.x + monthBounds.width + dateElementGapWidth; + yearBounds.x = dateBounds.x + dateBounds.width + dateElementGapWidth; + hourBounds.x = yearBounds.x + yearBounds.width + (2 * dividerMargin + dividerWidth); + + // Month + pDisplayBox[boxCount] = new (std::nothrow) _DateTimeDisplayBox(monthBounds, DATETIME_ID_MONTH); + SysTryCatch(NID_UI_CTRL, (pDisplayBox[boxCount] != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + boxCount++; + + // Date + pDisplayBox[boxCount] = new (std::nothrow) _DateTimeDisplayBox(dateBounds, DATETIME_ID_DAY); + SysTryReturnVoidResult(NID_UI_CTRL, (pDisplayBox[boxCount] != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + boxCount++; + + // Year + pDisplayBox[boxCount] = new (std::nothrow) _DateTimeDisplayBox(yearBounds, DATETIME_ID_YEAR); + SysTryCatch(NID_UI_CTRL, (pDisplayBox[boxCount] != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + boxCount++; + } + break; + case DATE_FORMAT_YYYYMMDD: + { + yearBounds.x = leftMargin; + monthBounds.x = yearBounds.x + yearBounds.width + dateElementGapWidth; + dateBounds.x = monthBounds.x + monthBounds.width + dateElementGapWidth; + hourBounds.x = dateBounds.x + dateBounds.width + (2 * dividerMargin + dividerWidth); + + // Year + pDisplayBox[boxCount] = new (std::nothrow) _DateTimeDisplayBox(yearBounds, DATETIME_ID_YEAR); + SysTryCatch(NID_UI_CTRL, (pDisplayBox[boxCount] != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + boxCount++; + + // Month + pDisplayBox[boxCount] = new (std::nothrow) _DateTimeDisplayBox(monthBounds, DATETIME_ID_MONTH); + SysTryCatch(NID_UI_CTRL, (pDisplayBox[boxCount] != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + boxCount++; + + // Date + pDisplayBox[boxCount] = new (std::nothrow) _DateTimeDisplayBox(dateBounds, DATETIME_ID_DAY); + SysTryReturnVoidResult(NID_UI_CTRL, (pDisplayBox[boxCount] != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + boxCount++; + } + break; + case DATE_FORMAT_YYYYDDMM: + { + yearBounds.x = leftMargin; + dateBounds.x = yearBounds.x + yearBounds.width + dateElementGapWidth; + monthBounds.x = dateBounds.x + dateBounds.width + dateElementGapWidth; + hourBounds.x = monthBounds.x + monthBounds.width + (2 * dividerMargin + dividerWidth); + + // Year + pDisplayBox[boxCount] = new (std::nothrow) _DateTimeDisplayBox(yearBounds, DATETIME_ID_YEAR); + SysTryCatch(NID_UI_CTRL, (pDisplayBox[boxCount] != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + boxCount++; + + // Date + pDisplayBox[boxCount] = new (std::nothrow) _DateTimeDisplayBox(dateBounds, DATETIME_ID_DAY); + SysTryReturnVoidResult(NID_UI_CTRL, (pDisplayBox[boxCount] != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + boxCount++; + + // Month + pDisplayBox[boxCount] = new (std::nothrow) _DateTimeDisplayBox(monthBounds, DATETIME_ID_MONTH); + SysTryCatch(NID_UI_CTRL, (pDisplayBox[boxCount] != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + boxCount++; + } + break; + } + } + + if (__pickerStyle == DATETIME_OUTPUT_STYLE_TIME || __pickerStyle == DATETIME_OUTPUT_STYLE_DATETIME) + { + if (__pickerStyle == DATETIME_OUTPUT_STYLE_DATETIME) + { + minuteBounds.x = hourBounds.x + hourBounds.width + colonWidth + 2 * colonMargin; + amPmBounds.x = minuteBounds.x + minuteBounds.width + amPmMargin; + } + else + { + hourBounds.x = timeOutputMargin; + minuteBounds.x = hourBounds.x + hourBounds.width + colonWidth + 2 * colonMargin; + amPmBounds.x = minuteBounds.x + minuteBounds.width + amPmMargin; + } + + // Hour + pDisplayBox[boxCount] = new (std::nothrow) _DateTimeDisplayBox(hourBounds, DATETIME_ID_HOUR); + SysTryCatch(NID_UI_CTRL, (pDisplayBox[boxCount] != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + boxCount++; + + // Minute + pDisplayBox[boxCount] = new (std::nothrow) _DateTimeDisplayBox(minuteBounds, DATETIME_ID_MINUTE); + SysTryCatch(NID_UI_CTRL, (pDisplayBox[boxCount] != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + boxCount++; + + // AmPm Button + if (!__is24HourNotation) + { + pPmBox = new (std::nothrow) _DateTimeDisplayBox(amPmBounds, DATETIME_ID_AMPM); + SysTryCatch(NID_UI_CTRL, (pPmBox != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pPmBox->SetBackgroundBitmap(__pAmPmNormalBitmap, __pAmPmEffectBitmap); + + delete __pPmBox; + __pPmBox = pPmBox; + } + } + + __outputBoxMaxCount = boxCount; + + for (indexBox = 0; indexBox < DATETIME_ID_MAX; indexBox++) + { + delete __pDisplayBox[indexBox]; + + if (pDisplayBox[indexBox] != null) + { + pDisplayBox[indexBox]->SetBackgroundBitmap(__pDisplayBoxNormalBitmap, __pDisplayBoxEffectBitmap); + } + + __pDisplayBox[indexBox] = pDisplayBox[indexBox]; + } + + SetFont(__pFont); + + return; + +CATCH: + for (int i = 0; i < DATETIME_ID_MAX; i++) + { + delete pDisplayBox[i]; + pDisplayBox[i] = null; + } + + return; +} + +void +_DateTimePresenter::LoadResource(void) +{ + result r = E_SUCCESS; + Color color; + Color replacementColor = Color::GetColor(COLOR_ID_MAGENTA); + Color backgroundColor[DATETIME_STATUS_MAX]; + bool isDisplayBoxCustomBitmap[DATETIME_STATUS_MAX]; + bool isAmPmCustomBitmap[DATETIME_STATUS_MAX]; + + Bitmap* pColonBitmap = null; + + for (int i = 0; i < DATETIME_STATUS_MAX; i++) + { + backgroundColor[i] = Color(); + isDisplayBoxCustomBitmap[i] = false; + isAmPmCustomBitmap[i] = false; + } + + GET_COLOR_CONFIG(DATETIMEPICKER::AMPM_BG_NORMAL, backgroundColor[DATETIME_STATUS_NORMAL]); + GET_COLOR_CONFIG(DATETIMEPICKER::AMPM_BG_PRESSED, backgroundColor[DATETIME_STATUS_SELECTED]); + GET_COLOR_CONFIG(DATETIMEPICKER::AMPM_BG_HIGHLIGHTED, backgroundColor[DATETIME_STATUS_HIGHLIGHTED]); + GET_COLOR_CONFIG(DATETIMEPICKER::AMPM_BG_DISABLED, backgroundColor[DATETIME_STATUS_DISABLED]); + + //display area bg + GET_COLOR_CONFIG(DATETIMEPICKER::DISPLAY_BG_NORMAL, color); + + 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)); + + GET_COLOR_CONFIG(DATETIMEPICKER::TEXT_NORMAL, color); + __pColonBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pColonBitmap, replacementColor, color); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, (__pColonBitmap != null), , r, "[%s] Propagating.", GetErrorMessage(r)); + + GET_COLOR_CONFIG(DATETIMEPICKER::TEXT_DISABLED, color); + __pColonDisabledBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pColonBitmap, replacementColor, color); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, (__pColonDisabledBitmap != null), , r, "[%s] Propagating.", GetErrorMessage(r)); + + //display area bg effect + if (!IS_CUSTOM_BITMAP(DATETIMEPICKER::BG_NORMAL)) + { + r = GET_BITMAP_CONFIG_N(DATETIMEPICKER::BG_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pBgEffectBitmap); + 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); + isDisplayBoxCustomBitmap[DATETIME_STATUS_DISABLED] = IS_CUSTOM_BITMAP(DATETIMEPICKER::CONTENT_BG_DISABLED); + + isAmPmCustomBitmap[DATETIME_STATUS_NORMAL] = IS_CUSTOM_BITMAP(DATETIMEPICKER::AMPM_BG_NORMAL); + isAmPmCustomBitmap[DATETIME_STATUS_SELECTED] = IS_CUSTOM_BITMAP(DATETIMEPICKER::AMPM_BG_PRESSED); + isAmPmCustomBitmap[DATETIME_STATUS_HIGHLIGHTED] = IS_CUSTOM_BITMAP(DATETIMEPICKER::AMPM_BG_HIGHLIGHTED); + isAmPmCustomBitmap[DATETIME_STATUS_DISABLED] = IS_CUSTOM_BITMAP(DATETIMEPICKER::AMPM_BG_DISABLED); + + //display box + + 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]) + { + 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]) + { + 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)); + + } + 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 + + if (isAmPmCustomBitmap[DATETIME_STATUS_NORMAL]) + { + 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)); + } + 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]) + { + 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]) + { + 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]) + { + 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; + + + return; + +CATCH: + delete pColonBitmap; + + delete __pColonBitmap; + __pColonBitmap = null; + + delete __pColonDisabledBitmap; + __pColonDisabledBitmap = null; + + delete __pBgNormalBitmap; + __pBgNormalBitmap = null; + + delete __pBgEffectBitmap; + __pBgEffectBitmap = null; + + for (int i = 0; i < DATETIME_STATUS_MAX; i++) + { + + delete __pDisplayBoxNormalBitmap[i]; + __pDisplayBoxNormalBitmap[i] = null; + + delete __pDisplayBoxEffectBitmap[i]; + __pDisplayBoxEffectBitmap[i] = null; + + + delete __pAmPmNormalBitmap[i]; + __pAmPmNormalBitmap[i] = null; + + delete __pAmPmEffectBitmap[i]; + __pAmPmEffectBitmap[i] = null; + } + + return; +} + +void +_DateTimePresenter::DrawColon(Canvas& canvas) +{ + result r = E_SUCCESS; + _ControlOrientation orientation = __pView->GetOrientation(); + + FloatRectangle hourBounds(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle colonBounds(0.0f, 0.0f, 0.0f, 0.0f); + + float colonWidth = 0.0f; + float colonMargin = 0.0f; + + GET_SHAPE_CONFIG(DATETIMEPICKER::COLON_WIDTH, orientation, colonWidth); + GET_SHAPE_CONFIG(DATETIMEPICKER::COLON_MARGIN, orientation, colonMargin); + + for (int i = 0; i < __outputBoxMaxCount; i++) + { + if (__pDisplayBox[i]->GetDisplayBoxId() == DATETIME_ID_HOUR) + { + hourBounds = __pDisplayBox[i]->GetDisplayBoxBounds(); + } + } + + colonBounds.x = hourBounds.x + hourBounds.width + colonMargin; + colonBounds.y = hourBounds.y; + colonBounds.width = colonWidth; + colonBounds.height = hourBounds.height; + + if (__pView->IsEnabled() && __pColonBitmap != null) + { + r = canvas.DrawBitmap(colonBounds, *__pColonBitmap); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + } + else if (!__pView->IsEnabled() && __pColonDisabledBitmap != null) + { + r = canvas.DrawBitmap(colonBounds, *__pColonDisabledBitmap); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + } +} + +void +_DateTimePresenter::DrawDateTimeDisplayBox(Canvas& canvas, int index) +{ + result r = E_SUCCESS; + String text; + int fontSize = 0; + int number = 0; + int boxId = __pDisplayBox[index]->GetDisplayBoxId(); + number = GetNumberInBox(boxId); + DateTimePickerStatus status = DATETIME_STATUS_NORMAL; + + GET_SHAPE_CONFIG(DATETIMEPICKER::FONT_SIZE, __pView->GetOrientation(), fontSize); + + r = _FontImpl::GetInstance(*__pFont)->SetSize(fontSize); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + + if (!__pView->IsEnabled()) + { + status = DATETIME_STATUS_DISABLED; + } + else + { + if (__keypadEnabled) + { + if (index == __focusedBoxIndex) + { + status = DATETIME_STATUS_HIGHLIGHTED; + } + + if ((__focusedBoxIndex == __outputBoxMaxCount) && ((index + 1) == __focusedBoxIndex)) + { + status = DATETIME_STATUS_SELECTED; + } + } + else + { + if (index == __selectedBoxIndex) + { + status = DATETIME_STATUS_SELECTED; + } + } + } + + if (boxId == DATETIME_ID_YEAR) + { + if ((__inputComposing == DATETIME_INPUT_BEGIN) && ((__keypadEnabled && status == DATETIME_STATUS_HIGHLIGHTED) + || (!__keypadEnabled && status == DATETIME_STATUS_SELECTED))) + { + String length = L"%0d"; + + 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); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + r = text.Format(DATETIME_DISPLAY_STRING_MAX_LENGTH, L"%04d", number); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + else if (boxId == DATETIME_ID_MONTH) + { + if (__pInputPad != null) + { + text.Clear(); + _DateTimeUtils dateTimeUtils; + text = dateTimeUtils.GetMonthString(number); + } + else + { + r = text.Format(DATETIME_DISPLAY_STRING_MAX_LENGTH, L"%02d", number); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + else + { + if ((__inputComposing == DATETIME_INPUT_BEGIN) && ((__keypadEnabled && status == DATETIME_STATUS_HIGHLIGHTED) + || (!__keypadEnabled && status == DATETIME_STATUS_SELECTED))) + { + r = text.Format(DATETIME_DISPLAY_STRING_MAX_LENGTH, L"%d", number); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + r = text.Format(DATETIME_DISPLAY_STRING_MAX_LENGTH, L"%02d", number); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + + __pDisplayBox[index]->SetText(text); + __pDisplayBox[index]->DrawDisplayBox(canvas, status); + + return; +} + +void +_DateTimePresenter::DrawPm(Canvas& canvas) +{ + String text; + + if ((__is24HourNotation) || (__pPmBox == null)) + { + return; + } + + _DateTimeUtils dateTimeUtils; + + if (!__isPm) + { + dateTimeUtils.GetAmPm(text, AM_TYPE); + } + else + { + dateTimeUtils.GetAmPm(text, PM_TYPE); + } + + __pPmBox->SetText(text); + + if (!__pView->IsEnabled()) + { + __pPmBox->DrawDisplayBox(canvas, DATETIME_STATUS_DISABLED); + } + else if (__isPmButtonPressed) + { + __pPmBox->DrawDisplayBox(canvas, DATETIME_STATUS_SELECTED); + } + else + { + if (__keypadEnabled && __focusedBoxIndex == __outputBoxMaxCount) + { + __pPmBox->DrawDisplayBox(canvas, DATETIME_STATUS_HIGHLIGHTED); + } + else + { + __pPmBox->DrawDisplayBox(canvas, DATETIME_STATUS_NORMAL); + } + } +} + +void +_DateTimePresenter::DrawBackground(Canvas& canvas) +{ + result r = E_SUCCESS; + FloatRectangle bounds = canvas.GetBoundsF(); + Color backgroundColor(0, 0, 0, 0); + + GET_COLOR_CONFIG(DATETIMEPICKER::BG_NORMAL, backgroundColor); + canvas.SetBackgroundColor(backgroundColor); + canvas.Clear(); + + if (__pBgNormalBitmap != null) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pBgNormalBitmap)) + { + canvas.DrawNinePatchedBitmap(bounds, *__pBgNormalBitmap); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + canvas.DrawBitmap(FloatPoint(bounds.x, bounds.y), *__pBgNormalBitmap); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + + if (__pBgEffectBitmap != null) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pBgEffectBitmap)) + { + canvas.DrawNinePatchedBitmap(bounds, *__pBgEffectBitmap); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + canvas.DrawBitmap(FloatPoint(bounds.x, bounds.y), *__pBgEffectBitmap); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + + return; +} + +void +_DateTimePresenter::DrawTitle(Canvas& canvas) +{ + result r = E_SUCCESS; + float marginX = 0.0f; + float marginY = 0.0f; + int fontSize = 0; + Color color(0, 0, 0, 0); + _ControlOrientation orientation = __pView->GetOrientation(); + + GET_SHAPE_CONFIG(DATETIMEPICKER::TITLE_LEFT_MARGIN, orientation, marginX); + GET_SHAPE_CONFIG(DATETIMEPICKER::TITLE_TOP_MARGIN, orientation, marginY); + + GET_SHAPE_CONFIG(DATETIMEPICKER::TITLE_FONT_SIZE, orientation, fontSize); + + r = _FontImpl::GetInstance(*__pFont)->SetSize(fontSize); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + + if (__pView->IsEnabled()) + { + GET_COLOR_CONFIG(DATETIMEPICKER::TITLE_NORMAL, color); + } + else + { + GET_COLOR_CONFIG(DATETIMEPICKER::TITLE_DISABLED, color); + } + + canvas.SetForegroundColor(color); + canvas.SetFont(*__pFont); + canvas.DrawText(FloatPoint(marginX, marginY), __title); + + return; +} + +void +_DateTimePresenter::DrawDividers(Canvas& canvas) +{ + result r = E_SUCCESS; + float dividerWidth = 0.0f; + float dividerHeight = 0.0f; + float dividerMargin = 0.0f; + float displayBoxheight = 0.0f; + FloatPoint lineStart(0.0f,0.0f); + FloatPoint lineEnd(0.0f,0.0f); + Color colorHalfLeft; + Color colorHalfRight; + + _ControlOrientation orientation = __pView->GetOrientation(); + + GET_FIXED_VALUE_CONFIG(DATETIMEPICKER::DIVIDER_WIDTH, orientation, dividerWidth); + GET_SHAPE_CONFIG(DATETIMEPICKER::DIVIDER_HEIGHT, orientation, dividerHeight); + GET_SHAPE_CONFIG(DATETIMEPICKER::DIVIDER_MARGIN, orientation, dividerMargin); + GET_SHAPE_CONFIG(DATETIMEPICKER::DATETIME_DISPLAY_BOX_HEIGHT, orientation, displayBoxheight); + + GET_COLOR_CONFIG(DATETIMEPICKER::DIVIDER_LEFT_HALF, colorHalfLeft); + GET_COLOR_CONFIG(DATETIMEPICKER::DIVIDER_RIGHT_HALF, colorHalfRight); + + if (__title.IsEmpty()) + { + lineStart.y = (GetOutputArea().height - dividerHeight) / 2.0f; + lineEnd.y = lineStart.y + dividerHeight; + } + else + { + float topMargin = 0.0f; + float bottomMargin = 0.0f; + float titleHeight = 0.0f; + + GET_SHAPE_CONFIG(DATETIMEPICKER::TITLE_TOP_MARGIN, orientation, topMargin); + GET_SHAPE_CONFIG(DATETIMEPICKER::TITLE_BOTTOM_MARGIN, orientation, bottomMargin); + GET_SHAPE_CONFIG(DATETIMEPICKER::TITLE_HEIGHT, orientation, titleHeight); + + lineStart.y = topMargin + titleHeight + bottomMargin + ((displayBoxheight - dividerHeight) / 2.0f); + lineEnd.y = lineStart.y + dividerHeight; + } + + canvas.SetLineWidth(dividerWidth/2.0f); + + FloatRectangle lastDateDisplayBoxBounds(0.0f, 0.0f, 0.0f, 0.0f); + + _DateTimeUtils dateTimeUtils; + int localeDateFormat = dateTimeUtils.GetLocaleDateFormat(); + + for (int i = 0; i < __outputBoxMaxCount; i++) + { + switch (localeDateFormat) + { + case DATE_FORMAT_DDMMYYYY: + case DATE_FORMAT_MMDDYYYY: + { + if (__pDisplayBox[i]->GetDisplayBoxId() == DATETIME_ID_YEAR) + { + lastDateDisplayBoxBounds = __pDisplayBox[i]->GetDisplayBoxBounds(); + } + } + break; + case DATE_FORMAT_YYYYMMDD: + { + if (__pDisplayBox[i]->GetDisplayBoxId() == DATETIME_ID_DAY) + { + lastDateDisplayBoxBounds = __pDisplayBox[i]->GetDisplayBoxBounds(); + } + } + break; + case DATE_FORMAT_YYYYDDMM: + { + if (__pDisplayBox[i]->GetDisplayBoxId() == DATETIME_ID_MONTH) + { + lastDateDisplayBoxBounds = __pDisplayBox[i]->GetDisplayBoxBounds(); + } + } + break; + } + } + + lineStart.x = lastDateDisplayBoxBounds.x + lastDateDisplayBoxBounds.width + dividerMargin; + lineEnd.x = lineStart.x; + + canvas.SetForegroundColor(colorHalfLeft); + r = canvas.DrawLine(lineStart, lineEnd); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + + lineStart.x += dividerWidth/2; + lineEnd.x = lineStart.x; + + canvas.SetForegroundColor(colorHalfRight); + r = canvas.DrawLine(lineStart, lineEnd); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + + return; +} + +FloatRectangle +_DateTimePresenter::GetOutputArea(void) +{ + _ControlOrientation orientation = __pView->GetOrientation(); + + FloatRectangle outputArea(0.0f, 0.0f, 0.0f, 0.0f); + + GET_SHAPE_CONFIG(DATETIMEPICKER::LEFT_MARGIN, orientation, outputArea.x); + GET_SHAPE_CONFIG(DATETIMEPICKER::TOP_MARGIN, orientation, outputArea.y); + + if (orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + float headerHeight = 0.0f; + + GET_SHAPE_CONFIG(HEADER::HEIGHT, orientation, headerHeight); + outputArea.y += headerHeight; + } + + outputArea.width = __pView->GetBounds().width - 2 * outputArea.x; + + GET_SHAPE_CONFIG(DATETIMEPICKER::OUTPUT_AREA_HEIGHT, orientation, outputArea.height); + + return outputArea; +} + +void +_DateTimePresenter::ChangeInputPadStyle(int boxId) +{ + if (!__inputPadEnabled) + { + return; + } + + SysTryReturnVoidResult(NID_UI_CTRL, __pInputPad != null, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. The instance of Inputpad is null."); + + _InputPadStyle inputPadType = INPUTPAD_STYLE_NORMAL; + switch (boxId) + { + case DATETIME_ID_MONTH: + inputPadType = INPUTPAD_STYLE_ALPHA; + break; + + case DATETIME_ID_YEAR: + // fall through intentional + case DATETIME_ID_DAY: + // fall through intentional + case DATETIME_ID_HOUR: + // fall through intentional + case DATETIME_ID_MINUTE: + // fall through intentional + default: + inputPadType = INPUTPAD_STYLE_NORMAL; + break; + } + + if (__inputPadType == inputPadType) + { + return; + } + __inputPadType = inputPadType; + + __pInputPad->SetInputPadStyle(inputPadType); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); +} + +int +_DateTimePresenter::CalculateTouchArea(float posX, float posY) +{ + _ControlOrientation orientation = __pView->GetOrientation(); + FloatRectangle outputArea = GetOutputArea(); + + float margin = 0.0f; + + GET_SHAPE_CONFIG(DATETIMEPICKER::TOP_MARGIN, orientation, margin); + + if ((posX < outputArea.x) || (posY < outputArea.y)) + { + return DATETIME_AREA_NONE; + } + + int touched = DATETIME_AREA_NONE; + + if (posY < outputArea.y + outputArea.height) + { + float displayBoxHeight = 0.0f; + float amPmBoxHeight = 0.0f; + + GET_SHAPE_CONFIG(DATETIMEPICKER::DATETIME_DISPLAY_BOX_HEIGHT, orientation, displayBoxHeight); + GET_SHAPE_CONFIG(DATETIMEPICKER::AMPM_DISPLAY_BOX_HEIGHT, orientation, amPmBoxHeight); + + float displayBoxPosY = outputArea.y + ((outputArea.height - displayBoxHeight) / 2.0f); + float amPmBoxPosY = outputArea.y + ((outputArea.height - amPmBoxHeight) / 2.0f); + + if (__title.IsEmpty()) + { + displayBoxPosY = outputArea.y + ((outputArea.height - displayBoxHeight) / 2.0f); + amPmBoxPosY = outputArea.y + ((outputArea.height - amPmBoxHeight) / 2.0f); + } + else + { + float topMargin = 0.0f; + float bottomMargin = 0.0f; + float titleHeight = 0.0f; + + GET_SHAPE_CONFIG(DATETIMEPICKER::TITLE_TOP_MARGIN, orientation, topMargin); + GET_SHAPE_CONFIG(DATETIMEPICKER::TITLE_BOTTOM_MARGIN, orientation, bottomMargin); + GET_SHAPE_CONFIG(DATETIMEPICKER::TITLE_HEIGHT, orientation, titleHeight); + + displayBoxPosY = outputArea.y + topMargin + bottomMargin + titleHeight; + amPmBoxPosY = outputArea.y + topMargin + titleHeight; + } + + if ((posY >= amPmBoxPosY) && (posY <= amPmBoxPosY + amPmBoxHeight)) + { + if ((posY >= displayBoxPosY) && (posY <= displayBoxPosY + displayBoxHeight)) + { + // output area + touched = DATETIME_AREA_OUTPUT; + } + + if (__pPmBox != null) + { + //am pm area + FloatRectangle boxBounds = __pPmBox->GetDisplayBoxBounds(); + boxBounds.x = boxBounds.x + outputArea.x; + + if ((posX >= boxBounds.x) && (posX < boxBounds.x + boxBounds.width)) + { + touched = DATETIME_AREA_OUTPUT_AMPM; + } + } + + } + } + else + { + touched = DATETIME_AREA_INPUT; + } + + return touched; +} + +int +_DateTimePresenter::CalculateTouchOutputArea(float posX, float posY) +{ + FloatRectangle outputArea = GetOutputArea(); + _ControlOrientation orientation = __pView->GetOrientation(); + + for (int i = 0; i < __outputBoxMaxCount; i++) + { + FloatRectangle boxBounds = __pDisplayBox[i]->GetDisplayBoxBounds(); + + boxBounds.x = outputArea.x + boxBounds.x; + + if (__title.IsEmpty()) + { + boxBounds.y = outputArea.y + ((outputArea.height - boxBounds.height) / 2.0f); + } + else + { + float topMargin = 0.0f; + float bottomMargin = 0.0f; + float titleHeight = 0.0f; + + GET_SHAPE_CONFIG(DATETIMEPICKER::TITLE_TOP_MARGIN, orientation, topMargin); + GET_SHAPE_CONFIG(DATETIMEPICKER::TITLE_BOTTOM_MARGIN, orientation, bottomMargin); + GET_SHAPE_CONFIG(DATETIMEPICKER::TITLE_HEIGHT, orientation, titleHeight); + + boxBounds.y = outputArea.y + topMargin + titleHeight + bottomMargin; + } + + if ((posX >= boxBounds.x) && (posX < boxBounds.x + boxBounds.width) + && (posY >= boxBounds.y) && (posY < boxBounds.y + boxBounds.height)) + { + return i; + } + } + + return -1; +} + +int +_DateTimePresenter::CalculateTwoDigit(int originalNumber, int number) +{ + int twoDigit = (originalNumber * 10) + number; + + if (twoDigit == 0) + { + return twoDigit; + } + + if ((twoDigit > 0) && (twoDigit > DATETIME_TWO_DIGIT_MAX)) + { + twoDigit = twoDigit % (DATETIME_TWO_DIGIT_MAX + 1); + } + + return twoDigit; +} + +int +_DateTimePresenter::CalculateFourDigit(int originalNumber, int number) +{ + int fourDigit = (originalNumber * 10) + number; + + if (fourDigit == 0) + { + return fourDigit; + } + + if ((fourDigit > 0) && (fourDigit > DATETIME_FOUR_DIGIT_MAX)) + { + fourDigit = fourDigit % (DATETIME_FOUR_DIGIT_MAX + 1); + } + return fourDigit; +} + +int +_DateTimePresenter::SetTwoDigit(int originalNumber, int number) +{ + int twoDigit = 0; + + if ((originalNumber <= DATETIME_ONE_DIGIT_MAX) && (__inputComposing == DATETIME_INPUT_BEGIN)) + { + twoDigit = (originalNumber * 10) + number; + } + else + { + twoDigit = number; + } + return twoDigit; +} + +int +_DateTimePresenter::SetFourDigit(int originalNumber, int number) +{ + int fourDigit = 0; + int minYear = 0; + int maxYear = 0; + + GetYearRange(minYear, maxYear); + if ((originalNumber <= DATETIME_THREE_DIGIT_MAX) && (__inputComposing == DATETIME_INPUT_BEGIN)) + { + fourDigit = (originalNumber * 10) + number; + if (fourDigit > maxYear) + { + fourDigit = maxYear; + } + } + else + { + fourDigit = number; + } + + return fourDigit; +} + +void +_DateTimePresenter::SetNumberInBox(int boxId, int number) +{ + switch (boxId) + { + case DATETIME_ID_YEAR: + __year = number; + break; + + case DATETIME_ID_MONTH: + __month = number; + break; + + case DATETIME_ID_DAY: + __day = number; + break; + + case DATETIME_ID_HOUR: + __hour = number; + break; + + case DATETIME_ID_MINUTE: + __minute = number; + break; + + default: + break; + } +} + +int +_DateTimePresenter::GetNumberInBox(int boxId) const +{ + int number = 0; + + switch (boxId) + { + case DATETIME_ID_YEAR: + number = __year; + break; + + case DATETIME_ID_MONTH: + number = __month; + break; + + case DATETIME_ID_DAY: + number = __day; + break; + + case DATETIME_ID_HOUR: + number = __hour; + break; + + case DATETIME_ID_MINUTE: + number = __minute; + break; + + default: + break; + } + + return number; +} + +void +_DateTimePresenter::SetFocusBox(int index) +{ + if (__keypadEnabled) + { + __focusedBoxIndex = index; + + if (__focusedBoxIndex < __outputBoxMaxCount) + { + __selectedBoxIndex = __focusedBoxIndex; + } + } + + __isFocusBoxChanged = true; + __inputComposing = DATETIME_INPUT_END; + __changeFocusCounter = DATE_TIME_CHANGE_FOCUS_COUNTER_MIN; + + int boxId = __pDisplayBox[__selectedBoxIndex]->GetDisplayBoxId(); + + ChangeInputPadStyle(boxId); +} + +void +_DateTimePresenter::LoadPickerData(void) +{ + _DateTimeUtils dateTimeUtils; + + __year = GetYear(); + __month = GetMonth(); + __day = GetDay(); + __hour = GetHour(); + + if (!__is24HourNotation) + { + int max = DATETIME_HOUR_MAX_FOR_24NOTATION; + + if (__hour == DATETIME_HOUR_MIN) + { + __hour = __hour + max; + __isPm = false; + } + else if (__hour < max && __hour != DATETIME_HOUR_MIN) + { + __isPm = false; + } + else if (__hour == max) + { + __isPm = true; + } + else if (__hour > max && __hour <= DATETIME_HOUR_MAX) + { + __hour = __hour - max; + __isPm = true; + } + else if (__hour == DATETIME_HOUR_MAX + 1) + { + __hour = max; + __isPm = false; + } + } + + __minute = GetMinute(); + +} + +void +_DateTimePresenter::SavePickerData(void) +{ + SetYear(__year); + SetMonth(__month); + SetDay(__day); + + if (!__is24HourNotation) + { + int maxHour = DATETIME_HOUR_MAX_FOR_24NOTATION; + + if (__isPm) + { + if (__hour < maxHour) + { + SetHour(__hour + maxHour); + } + else + { + SetHour(__hour); + } + } + else + { + if (__hour < maxHour) + { + SetHour(__hour); + } + else + { + SetHour(__hour - maxHour); + } + } + } + else + { + SetHour(__hour); + } + + SetMinute(__minute); +} + +void +_DateTimePresenter::UpdateDisplayData(int boxId) +{ + switch (boxId) + { + case DATETIME_ID_YEAR: + __year = GetYear(); + break; + + case DATETIME_ID_MONTH: + __month = GetMonth(); + break; + + case DATETIME_ID_DAY: + __day = GetDay(); + break; + + case DATETIME_ID_HOUR: + __hour = GetHour(); + + if (!__is24HourNotation) + { + int maxHour = DATETIME_HOUR_MAX_FOR_24NOTATION; + + if (__hour == DATETIME_HOUR_MIN) + { + __hour = maxHour; + __isPm = false; + } + else if (__hour < maxHour && __hour != DATETIME_HOUR_MIN) + { + __isPm = false; + } + else if (__hour == maxHour) + { + __isPm = true; + } + else if (__hour > maxHour && __hour <= DATETIME_HOUR_MAX) + { + __hour = __hour - maxHour; + __isPm = true; + } + else if (__hour == DATETIME_HOUR_MAX + 1) + { + __hour = __hour - maxHour; + __isPm = false; + } + } + break; + + case DATETIME_ID_MINUTE: + __minute = GetMinute(); + break; + + default: + break; + } +} + +void +_DateTimePresenter::AdjustValue(int& value, int minValue, int maxValue) +{ + if (value < minValue) + { + value = minValue; + } + else if (maxValue < value) + { + value = maxValue; + } +} + +void +_DateTimePresenter::AdjustDisplayValue(int index) +{ + int boxId = __pDisplayBox[index]->GetDisplayBoxId(); + _DateTimeUtils dateTimeUtils; + int minValue = 0; + int maxValue = 0; + + switch (boxId) + { + case DATETIME_ID_YEAR: + minValue = 0; + maxValue = 0; + GetYearRange(minValue, maxValue); + AdjustValue(__year, minValue, maxValue); + break; + + case DATETIME_ID_MONTH: + minValue = DATETIME_MONTH_MIN; + maxValue = DATETIME_MONTH_MAX; + AdjustValue(__month, minValue, maxValue); + break; + + case DATETIME_ID_DAY: + minValue = 1; + maxValue = dateTimeUtils.CalculateMaxDay(__year, __month); + AdjustValue(__day, minValue, maxValue); + break; + + case DATETIME_ID_HOUR: + minValue = DATETIME_HOUR_MIN; + maxValue = DATETIME_HOUR_MAX; + if (!__is24HourNotation) + { + maxValue = DATETIME_HOUR_MAX_FOR_24NOTATION; + + if (__hour == DATETIME_HOUR_MIN) + { + minValue = DATETIME_HOUR_MAX_FOR_24NOTATION; + } + } + AdjustValue(__hour, minValue, maxValue); + break; + + case DATETIME_ID_MINUTE: + minValue = DATETIME_MINUTE_MIN; + maxValue = DATETIME_MINUTE_MAX; + AdjustValue(__minute, minValue, maxValue); + break; + + default: + break; + } +} + +void +_DateTimePresenter::ChangeFocusBox(void) +{ + if (__keypadEnabled) + { + if (__focusedBoxIndex < __outputBoxMaxCount - 1) + { + __focusedBoxIndex++; + __selectedBoxIndex = __focusedBoxIndex; + int boxId = __pDisplayBox[__focusedBoxIndex]->GetDisplayBoxId(); + ChangeInputPadStyle(boxId); + __isFocusBoxChanged = true; + } + } + else + { + if (__selectedBoxIndex < (__outputBoxMaxCount - 1)) + { + __selectedBoxIndex++; + __focusedBoxIndex = __selectedBoxIndex; + int boxId = __pDisplayBox[__selectedBoxIndex]->GetDisplayBoxId(); + ChangeInputPadStyle(boxId); + __isFocusBoxChanged = true; + } + } + + for (int i = 0; i < __outputBoxMaxCount; i++) + { + AdjustDisplayValue(i); + } + + __inputComposing = DATETIME_INPUT_END; + __changeFocusCounter = DATE_TIME_CHANGE_FOCUS_COUNTER_MIN; +} + +void +_DateTimePresenter::SetAccessibilityElementText(void) +{ + + for (int index = 0; index < __outputBoxMaxCount; ++index) + { + if (__pDisplayBox[index]->GetDisplayBoxId() == DATETIME_ID_MONTH) + { + int number = GetNumberInBox(__pDisplayBox[index]->GetDisplayBoxId()); + __pView->SetAccessibilityElementText(index, __pInputPad->GetAccessibilityElementMonthName(number-1), false); + } + else + { + __pView->SetAccessibilityElementText(index, __pDisplayBox[index]->GetText(), false); + } + } + + if (__pPmBox) + { + __pView->SetAccessibilityElementText(__outputBoxMaxCount, __pPmBox->GetText(), true); + } +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_DateTimeUtils.cpp b/src/ui/controls/FUiCtrl_DateTimeUtils.cpp new file mode 100644 index 0000000..838bdb6 --- /dev/null +++ b/src/ui/controls/FUiCtrl_DateTimeUtils.cpp @@ -0,0 +1,356 @@ +// +// 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_DateTimeUtils.cpp + * @brief This is the implementation file for the _DateTimeUtils class. + */ + +#include +#include +#include +#include +#include +#include "FUiCtrl_DateTimeUtils.h" +#include "FUiCtrl_DateTimeDefine.h" +#include "FUi_ResourceManager.h" + +using namespace Tizen::Base; +using namespace Tizen::Locales; +using namespace Tizen::Base::Collection; +using namespace Tizen::System; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_DateTimeUtils::~_DateTimeUtils(void) +{ +} + +_DateTimeUtils::_DateTimeUtils(void) +{ +} + +const String +_DateTimeUtils::GetMonthString(int month) const +{ + result r = E_SUCCESS; + String text; + text.Clear(); + + DateTimeSymbols dateSymbols; + r = dateSymbols.Construct(CALENDAR_GREGORIAN); + + if (r != E_SUCCESS) + { + text.Append(GetEnglishMonthString(month)); + return text; + } + + const IList* pListOfShortMonths = dateSymbols.GetShortMonths(); + SysTryReturn(NID_UI_CTRL, (pListOfShortMonths != null), text, E_SYSTEM, "[E_SYSTEM] A system error has occurred. pListOfShortMonths is null."); + + 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); + } + + return text; +} + +const String +_DateTimeUtils::GetEnglishMonthString(int month) const +{ + String text; + text.Clear(); + switch (month) + { + case 1: + text.Append("Jan"); + break; + + case 2: + text.Append("Feb"); + break; + + case 3: + text.Append("Mar"); + break; + + case 4: + text.Append("Apr"); + break; + + case 5: + text.Append("May"); + break; + + case 6: + text.Append("Jun"); + break; + + case 7: + text.Append("Jul"); + break; + + case 8: + text.Append("Aug"); + break; + + case 9: + text.Append("Sep"); + break; + + case 10: + text.Append("Oct"); + break; + + case 11: + text.Append("Nov"); + break; + + case 12: + text.Append("Dec"); + break; + + default: + break; + } + return text; +} + +int +_DateTimeUtils::CalculateMaxDay(int displayYear, int month) const +{ + int maxDay = 0; + switch (month) + { + case 1: + // fall through + case 3: + // fall through + case 5: + // fall through + case 7: + // fall through + case 8: + // fall through + case 10: + // fall through + case 12: + maxDay = 31; + break; + + case 2: + if (IsLeapYear(displayYear)) + { + maxDay = 29; + } + else + { + maxDay = 28; + } + break; + + default: + maxDay = 30; + break; + } + return maxDay; +} + +bool +_DateTimeUtils::IsLeapYear(int year) const +{ + return DateTime::IsLeapYear(year); +} + +void +_DateTimeUtils::GetAmPm(String& timeFormat, _AmPmType amPmType) const +{ + result r = E_SUCCESS; + DateTimeSymbols dateSymbols; + + r = dateSymbols.Construct(CALENDAR_GREGORIAN); + + if (r != E_SUCCESS) + { + if (amPmType == AM_TYPE) + { + timeFormat.Append("AM"); + } + else + { + timeFormat.Append("PM"); + } + return; + } + + const IList* pListOfAmPm = dateSymbols.GetAmPm(); + SysTryReturnVoidResult(NID_UI_CTRL, (pListOfAmPm != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. pListOfAmPm is null."); + + String* pObj = null; + pObj = static_cast(const_cast(pListOfAmPm->GetAt(amPmType))); + + if (pObj) + { + timeFormat.Append(*pObj); + } + + return; +} + +const String +_DateTimeUtils::GetFullMonthString(int month) const +{ + String text; + text.Clear(); + + DateTimeSymbols dateSymbols; + dateSymbols.Construct(CALENDAR_GREGORIAN); + + const IList* pListOfFullMonths = dateSymbols.GetMonths(); + SysTryReturn(NID_LCL, (pListOfFullMonths != null), text, E_SYSTEM, "[E_SYSTEM] A system error has occurred. pListOfFullMonths is null."); + + String* pObj = null; + pObj = static_cast(const_cast(pListOfFullMonths->GetAt(month - 1))); + + if (pObj) + { + text.Append(*pObj); + } + return text; +} + +int +_DateTimeUtils::GetLocaleDateFormat(void) const +{ + result r = E_SUCCESS; + + LocaleManager localeManager; + int localeDateFormat = 0; + + r = localeManager.Construct(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, localeDateFormat, E_SYSTEM, "[E_SYSTEM] A system error has occurred."); + + Locale systemLocale = localeManager.GetSystemLocale(); + + DateTimeFormatter* pDateFormatter = DateTimeFormatter::CreateDateFormatterN(systemLocale, DATE_TIME_STYLE_LONG); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pDateFormatter != null, localeDateFormat, r, "[%s] Propagating.", GetErrorMessage(r)); + + String formatString = pDateFormatter->GetPattern(); + formatString.ToLowerCase(); + + delete pDateFormatter; + pDateFormatter = null; + + int stringLength = formatString.GetLength(); + String parsedString = L""; + + for (int i = 0; i < stringLength; i++) + { + wchar_t ch = '\0'; + r = formatString.GetCharAt(i, ch); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, localeDateFormat, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (ch == 'd' && !parsedString.Contains(L"DD")) + { + parsedString.Append(L"DD"); + } + else if (ch == 'm' && !parsedString.Contains(L"MM")) + { + parsedString.Append(L"MM"); + } + else if (ch == 'y' && !parsedString.Contains(L"YYYY")) + { + parsedString.Append(L"YYYY"); + } + + if (parsedString.GetLength() == LOCALE_DATE_FORMAT_STRING_LENGTH) + { + break; + } + } + + if (parsedString.Equals(L"DDMMYYYY", false)) + { + localeDateFormat = DATE_FORMAT_DDMMYYYY; + } + else if (parsedString.Equals(L"MMDDYYYY", false)) + { + localeDateFormat = DATE_FORMAT_MMDDYYYY; + } + else if (parsedString.Equals(L"YYYYMMDD", false)) + { + localeDateFormat = DATE_FORMAT_YYYYMMDD; + } + else if (parsedString.Equals(L"YYYYDDMM", false)) + { + localeDateFormat = DATE_FORMAT_YYYYDDMM; + } + + return localeDateFormat; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_Edit.cpp b/src/ui/controls/FUiCtrl_Edit.cpp new file mode 100644 index 0000000..130a54f --- /dev/null +++ b/src/ui/controls/FUiCtrl_Edit.cpp @@ -0,0 +1,3564 @@ +// +// 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_Edit.cpp + * @brief This is the implementation file for the _Edit class. + */ + +#include +#include +#include +#include +#include +#include +#include "FUi_AccessibilityContainer.h" +#include "FUi_AccessibilityElement.h" +#include "FUi_CoordinateSystemUtils.h" +#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" + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Base::Utility; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Animations; +using namespace Tizen::Locales; +using namespace Tizen::Graphics::_Text; +using namespace Tizen::Base::Collection; +using namespace Tizen::System; + +namespace Tizen { namespace Ui { namespace Controls +{ +const int EDIT_GESTURE_TAP_INTERVAL = 400; +const int EDIT_GESTURE_TAP_MOVE_ALLOWANCE = 50; + +class _EditInternalTouchEventListener + : public _ITouchEventListener + , virtual public _IUiEventListener + , virtual public Tizen::Base::Runtime::IEventListener +{ +// Operation +public: + _EditInternalTouchEventListener(const _Edit& edit); + /** + * This is the destructor for this class. + */ + virtual ~_EditInternalTouchEventListener(void) {} + + /** + * Notifies when an entity is touch pressed. + * + * @param[in] source The source of the event + * @param[in] currentPosition The current position + * @param[in] touchInfo The touch event information + */ + virtual bool OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo); + + /** + * Notifies when an entity is touch released. + * + * @param[in] source The source of the event + * @param[in] currentPosition The current position + * @param[in] touchInfo The touch event information + */ + virtual bool OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo); + + /** + * Notifies when an entity is touch moved. + * + * @param[in] source The source of the event + * @param[in] currentPosition The current position + * @param[in] touchInfo The touch event information + */ + virtual bool OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo); + + /** + * Notifies when an entity is touch cancelled. + * + * @param[in] source The source of the event + * @param[in] currentPosition The current position + * @param[in] touchInfo The touch event information + */ + virtual bool OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo){return false;}; + +private: + _Edit* __pEdit; +}; // _ITouchEventListener + +_EditInternalTouchEventListener::_EditInternalTouchEventListener(const _Edit& edit) +{ + __pEdit = const_cast< _Edit* >(&edit); +} + +bool +_EditInternalTouchEventListener::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + _EditPresenter* pEditPresenter = __pEdit->GetPresenter(); + SysTryReturn(NID_UI_CTRL, pEditPresenter, false, E_INVALID_STATE, "[E_INVALID_STATE] pEditPresenter is null."); + + if (pEditPresenter->IsCopyPasteManagerExist()) + { + pEditPresenter->FinishTextComposition(); + if (pEditPresenter->IsCopyPastePopup(source)) + { + return false; // CopyPastePopup is touched + } + else if (pEditPresenter->IsCopyPasteHandle(source)) + { + return false; + } + else if (pEditPresenter->IsCopyPastePopupExist()) + { + return true; + } + } + return false; +} + +bool +_EditInternalTouchEventListener::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + _EditPresenter* pEditPresenter = __pEdit->GetPresenter(); + SysTryReturn(NID_UI_CTRL, pEditPresenter, false, E_INVALID_STATE, "[E_INVALID_STATE] pEditPresenter is null."); + + if (pEditPresenter->IsCopyPasteManagerExist()) + { + if (!pEditPresenter->IsCopyPastePopup(source) && !pEditPresenter->IsCopyPasteHandle(source)) + { + if (pEditPresenter->IsCopyPastePopupExist()) + { + return true; + } + } + } + return false; +} + +bool +_EditInternalTouchEventListener::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + _EditPresenter* pEditPresenter = __pEdit->GetPresenter(); + SysTryReturn(NID_UI_CTRL, pEditPresenter, false, E_INVALID_STATE, "[E_INVALID_STATE] pEditPresenter is null."); + + if (pEditPresenter->IsCopyPasteManagerExist()) + { + if (!pEditPresenter->IsCopyPastePopup(source) && !pEditPresenter->IsCopyPasteHandle(source)) + { + if (pEditPresenter->IsCopyPastePopupExist()) + { + if (pEditPresenter->IsCopyPasteHandleExist()) + { + if (pEditPresenter->IsViewModeEnabled(true) && !pEditPresenter->IsBlocked()) + { + pEditPresenter->InitializeCopyPasteManager(); + } + else + { + pEditPresenter->ReleaseCopyPastePopup(); + } + return true; + } + else + { + pEditPresenter->InitializeCopyPasteManager(); + return false; + } + } + } + } + + return false; +} + +IMPLEMENT_PROPERTY(_Edit); + +_Edit::_Edit(void) + : _pEditPresenter(null) + , __bottomMargin(-1.0f) + , __leftMargin(-1.0f) + , __lineSpacing(-1.0f) + , __rightMargin(-1.0f) + , __textSize(-1.0f) + , __topMargin(-1.0f) + , __editStyle(EDIT_STYLE_NORMAL) + , __borderRoundStyle(false) + , __ellipsisPosition(ELLIPSIS_POSITION_END) + , __inputStyle(INPUT_STYLE_OVERLAY) + , __isConstructed(false) + , __guideTextColor(Color()) + , __pressedGuideTextColor(Color()) + , __isSettingGuideTextColor(false) + , __pDefaultBackgroundEffectBitmap(null) + , __pGestureFlick(null) + , __pGestureLongPress(null) + , __pGestureTap(null) + , __pEditInternalTouchEventListener(null) + , __pExpandableEditAreaEvent(null) + , __pKeypadEvent(null) + , __pLanguageEvent(null) + , __pLinkEvent(null) + , __pScrollPanelEvent(null) + , __pTextBlockEvent(null) + , __pTextEvent(null) + , __pTextAccessibilityElement(null) + , __pClearButtonTextAccessibilityElement(null) + , __pToolbarAccessibilityElement(null) + , __isAccessibilityCreated(false) + , __isFullScreenKeypadEdit(false) + , __internalFocus(false) + , __pCurrentFrame(null) + , __isDestroyed(false) + , __pTextFilter(null) + , __previousBounds() + , __isTouchMoving(false) + , __isTextEventEnabled(true) +{ + for (int status = 0; status < EDIT_COLOR_MAX; status++) + { + __pBackgroundBitmap[status] = null; + } + + for (int status = 0; status < EDIT_COLOR_MAX; status++) + { + __pDefaultBackgroundBitmap[status] = null; + } + + __blockTextColor.used = false; + __blockTextColor.blockTextColor = Color(); +} + +_Edit::~_Edit(void) +{ + delete _pEditPresenter; + _pEditPresenter = null; + + for (int status = 0; status < EDIT_COLOR_MAX; status++) + { + if (__pBackgroundBitmap[status]) + { + delete __pBackgroundBitmap[status]; + __pBackgroundBitmap[status] = null; + } + + if (__pDefaultBackgroundBitmap[status]) + { + delete __pDefaultBackgroundBitmap[status]; + __pDefaultBackgroundBitmap[status] = null; + } + } + + if (__pDefaultBackgroundEffectBitmap) + { + delete __pDefaultBackgroundEffectBitmap; + __pDefaultBackgroundEffectBitmap = null; + } + + if (__pTextBlockEvent) + { + delete __pTextBlockEvent; + __pTextBlockEvent = null; + } + + if (__pLinkEvent) + { + delete __pLinkEvent; + __pLinkEvent = null; + } + + if (__pKeypadEvent) + { + delete __pKeypadEvent; + __pKeypadEvent = null; + } + + if (__pScrollPanelEvent) + { + DetachScrollPanelEvent(); + + delete __pScrollPanelEvent; + __pScrollPanelEvent = null; + } + + if (__pLanguageEvent) + { + delete __pLanguageEvent; + __pLanguageEvent = null; + } + + if (__pGestureFlick) + { + _ITouchFlickGestureEventListener* pListener = dynamic_cast< _ITouchFlickGestureEventListener* >(this); + __pGestureFlick->RemoveGestureListener(*pListener); + RemoveGestureDetector(*__pGestureFlick); + delete __pGestureFlick; + __pGestureFlick = null; + } + + if (__pGestureLongPress) + { + _ITouchLongPressGestureEventListener* pListener = dynamic_cast< _ITouchLongPressGestureEventListener* >(this); + __pGestureLongPress->RemoveGestureListener(*pListener); + RemoveGestureDetector(*__pGestureLongPress); + delete __pGestureLongPress; + __pGestureLongPress = null; + } + + if (__pGestureTap) + { + _ITouchTapGestureEventListener* pListener = dynamic_cast< _ITouchTapGestureEventListener* >(this); + __pGestureTap->RemoveGestureListener(*pListener); + RemoveGestureDetector(*__pGestureTap); + delete __pGestureTap; + __pGestureTap = null; + } + + if (__pEditInternalTouchEventListener) + { + _UiEventManager::GetInstance()->RemoveTouchEventListener(*__pEditInternalTouchEventListener); + delete __pEditInternalTouchEventListener; + __pEditInternalTouchEventListener = null; + } + + if (__pTextEvent) + { + delete __pTextEvent; + __pTextEvent = null; + } + + if (__pExpandableEditAreaEvent) + { + delete __pExpandableEditAreaEvent; + __pExpandableEditAreaEvent = null; + } + + if (__pTextAccessibilityElement) + { + __pTextAccessibilityElement->Activate(false); + __pTextAccessibilityElement = null; + } + if (__pClearButtonTextAccessibilityElement) + { + __pClearButtonTextAccessibilityElement->Activate(false); + __pClearButtonTextAccessibilityElement = null; + } + if (__pToolbarAccessibilityElement) + { + __pToolbarAccessibilityElement->Activate(false); + __pToolbarAccessibilityElement = null; + } + + _SettingInfoImpl::RemoveSettingEventListenerForInternal(*this); +} + +_Edit* +_Edit::CreateEditN(void) +{ + _EditPresenter* pPresenter = _EditPresenter::CreateInstanceN(); + if (pPresenter == null) + { + SetLastResult(E_OUT_OF_MEMORY); + + return null; + } + + 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] Memory allocation failed."); + + pBaseVisualElement = pEdit->GetVisualElement(); + if (pBaseVisualElement) + { + r = pBaseVisualElement->SetSurfaceOpaque(false); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + pEdit->AcquireHandle(); + + r = pEdit->SetPresenter(*pPresenter); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return pEdit; + +CATCH: + delete pPresenter; + delete pEdit; + + return null; +} + +result +_Edit::Initialize(int editStyle, InputStyle inputStyle, int limitLength, GroupStyle groupStyle) +{ + result r = E_SUCCESS; + + SetEditStyle(editStyle); + + r = LoadDefaultBackgroundBitmap(groupStyle); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Failed to load Bitmaps", GetErrorMessage(r)); + + InitializeColorInformation(); + + __inputStyle = inputStyle; + + r = _pEditPresenter->Initialize(*this); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Failed to construct", GetErrorMessage(r)); + + r = _pEditPresenter->SetTextLimitLength(limitLength); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Failed to set limit length", GetErrorMessage(r)); + + if (inputStyle == INPUT_STYLE_OVERLAY) + { + if (!(editStyle & EDIT_STYLE_FLEXIBLE) && !(editStyle & EDIT_STYLE_VIEWER)) + { + _pEditPresenter->SetKeypadCommandButtonVisible(true); + } + } + + _pEditPresenter->SetEditGroupStyle(groupStyle); + + __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] 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] 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] 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)); + + r = __pGestureTap->SetMoveAllowance(EDIT_GESTURE_TAP_MOVE_ALLOWANCE); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Failed to set TapMoveAllowance", GetErrorMessage(r)); + + r = AddGestureDetector(*__pGestureTap); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Failed to add gesture detector", GetErrorMessage(r)); + r = __pGestureTap->AddGestureListener(*this); + 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] 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)); + + __isConstructed = true; + + _AccessibilityContainer* pEditAccessibilityContainer = GetAccessibilityContainer(); + if (pEditAccessibilityContainer) + { + pEditAccessibilityContainer->Activate(true); + } + if (pEditAccessibilityContainer) + { + __pTextAccessibilityElement = new _AccessibilityElement(true); + __pTextAccessibilityElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height)); + + if ((GetEditStyle() & EDIT_STYLE_TITLE_TOP) || (GetEditStyle() & EDIT_STYLE_TITLE_LEFT)) + { + __pTextAccessibilityElement->SetLabel(GetTitleText() + GetGuideText() + GetText()); + } + else + { + __pTextAccessibilityElement->SetLabel(GetGuideText() + GetText()); + } + + __pTextAccessibilityElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_EDIT_FIELD_M_NOUN_T_TTS"); + __pTextAccessibilityElement->SetName(L"EditText"); + pEditAccessibilityContainer->AddElement(*__pTextAccessibilityElement); + + if (__editStyle & EDIT_STYLE_CLEAR && GetTextLength()) + { + __pClearButtonTextAccessibilityElement = new _AccessibilityElement(true); + __pClearButtonTextAccessibilityElement->SetBounds(_pEditPresenter->GetClearIconBoundsF()); + __pClearButtonTextAccessibilityElement->SetLabel(L"clear all"); + __pClearButtonTextAccessibilityElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_BUTTON_T_TTS"); + __pClearButtonTextAccessibilityElement->SetName(L"EditFieldClearButton"); + pEditAccessibilityContainer->AddElement(*__pClearButtonTextAccessibilityElement); + } + + __isAccessibilityCreated = true; + } + + r = _SettingInfoImpl::AddSettingEventListenerForInternal(*this); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +void +_Edit::InitializeColorInformation(void) +{ + GET_COLOR_CONFIG(EDIT::BG_NORMAL, __color[EDIT_STATUS_NORMAL].backgroundColor); + GET_COLOR_CONFIG(EDIT::BG_PRESSED, __color[EDIT_STATUS_PRESSED].backgroundColor); + GET_COLOR_CONFIG(EDIT::BG_HIGHLIGHTED, __color[EDIT_STATUS_HIGHLIGHTED].backgroundColor); + GET_COLOR_CONFIG(EDIT::BG_DISABLED, __color[EDIT_STATUS_DISABLED].backgroundColor); + + GET_COLOR_CONFIG(EDIT::TITLE_TEXT_NORMAL, __color[EDIT_STATUS_NORMAL].titleTextColor); + GET_COLOR_CONFIG(EDIT::TITLE_TEXT_PRESSED, __color[EDIT_STATUS_PRESSED].titleTextColor); + GET_COLOR_CONFIG(EDIT::TITLE_TEXT_HIGHLIGHTED, __color[EDIT_STATUS_HIGHLIGHTED].titleTextColor); + GET_COLOR_CONFIG(EDIT::TITLE_TEXT_DISABLED, __color[EDIT_STATUS_DISABLED].titleTextColor); + + GET_COLOR_CONFIG(EDIT::TEXT_NORMAL, __color[EDIT_STATUS_NORMAL].textColor); + GET_COLOR_CONFIG(EDIT::TEXT_PRESSED, __color[EDIT_STATUS_PRESSED].textColor); + GET_COLOR_CONFIG(EDIT::TEXT_HIGHLIGHTED, __color[EDIT_STATUS_HIGHLIGHTED].textColor); + GET_COLOR_CONFIG(EDIT::TEXT_DISABLED, __color[EDIT_STATUS_DISABLED].textColor); + + GET_COLOR_CONFIG(EDIT::GUIDE_TEXT_NORMAL, __guideTextColor); + + memset(__cutlinkColor, 0, sizeof(EditCutlinkColor) * EDIT_LINK_TYPE_MAX); + for (int i = 0; i < EDIT_LINK_TYPE_MAX; i++) + { + EditCutLinkType type = (EditCutLinkType) i; + GET_COLOR_CONFIG(EDIT::CUT_LINK_TEXT_NORMAL, __cutlinkColor[type].cutlinkFgColor); + GET_COLOR_CONFIG(EDIT::CUT_LINK_BG_NORMAL, __cutlinkColor[type].cutlinkBgColor); + } + + return; +} + +result +_Edit::SetPresenter(const _EditPresenter& pPresenter) +{ + result r = E_SUCCESS; + + _pEditPresenter = const_cast< _EditPresenter* >(&pPresenter); + + return r; +} + +_EditPresenter* +_Edit::GetPresenter(void) const +{ + return _pEditPresenter; +} + +FloatDimension +_Edit::GetContentSizeInternalF(bool horizontalMode, bool verticalMode) const +{ + if (!GetTextLength()) + { + return FloatDimension(GetBoundsF().width, GetBoundsF().height); + } + + FloatDimension dimension(0.0f, 0.0f); + float textLeftMargin = 0.0f; + float textRightMargin = 0.0f; + float textTopMargin = 0.0f; + float textBottomMargin = 0.0f; + + _ControlOrientation orientation = GetOrientation(); + GET_SHAPE_CONFIG(EDIT::AREA_TEXT_LEFT_MARGIN, orientation, textLeftMargin); + GET_SHAPE_CONFIG(EDIT::AREA_TEXT_RIGHT_MARGIN, orientation, textRightMargin); + GET_SHAPE_CONFIG(EDIT::AREA_TEXT_TOP_MARGIN, orientation, textTopMargin); + GET_SHAPE_CONFIG(EDIT::AREA_TEXT_BOTTOM_MARGIN, orientation, textBottomMargin); + + TextObject* pTextObject = _pEditPresenter->GetTextObject(); + + if (!pTextObject) + { + return FloatDimension(GetBoundsF().width, GetBoundsF().height); + } + + // store + TextObjectActionType previousActionType = pTextObject->GetAction(); + TextObjectWrapType previousWrapType = pTextObject->GetWrap(); + FloatRectangle previousRect = pTextObject->GetBoundsF(); + FloatRectangle newRect = previousRect; + + bool fitToHorizontal = horizontalMode; + bool fitToVertical = verticalMode; + bool checkExtent = false; + if (fitToHorizontal) + { + if (orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + newRect.width = _ControlManager::GetInstance()->GetScreenSizeF().width; + } + else + { + newRect.width = _ControlManager::GetInstance()->GetScreenSizeF().height; + } + newRect.width -= (GetBoundsF().x + textLeftMargin + textRightMargin); + } + if (fitToVertical) + { + if (orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + newRect.height = _ControlManager::GetInstance()->GetScreenSizeF().height; + } + else + { + newRect.height = _ControlManager::GetInstance()->GetScreenSizeF().width; + } + newRect.height -= (GetBoundsF().y + textTopMargin + textBottomMargin); + } + + pTextObject->SetBounds(newRect); + pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_NONE); + pTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_WORD); + pTextObject->Compose(); + + if (fitToHorizontal && fitToVertical) + { + dimension = pTextObject->GetTextExtentF(0, pTextObject->GetTextLength()); + if (dimension.width > newRect.width) + { + dimension.width = newRect.width; + checkExtent = true; + } + float height = pTextObject->GetTotalHeightF(); + if (height <= newRect.height) + { + dimension.height = height; + } + else + { + dimension.height = newRect.height; + } + } + else if (fitToHorizontal) + { + dimension = pTextObject->GetTextExtentF(0, pTextObject->GetTextLength()); + if (dimension.width > newRect.width) + { + dimension.width = newRect.width; + checkExtent = true; + } + dimension.height = GetBoundsF().height; + } + else if (fitToVertical) + { + float height = pTextObject->GetTotalHeightF(); + if (height <= newRect.height) + { + dimension.height = height; + } + else + { + dimension.height = newRect.height; + } + dimension.width = GetBoundsF().width; + } + + // restore + pTextObject->SetBounds(previousRect); + pTextObject->SetAction(previousActionType); + 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; + } + if (fitToVertical) + { + dimension.height += textTopMargin + textBottomMargin; + } + + return dimension; +} + +bool +_Edit::IsInternalFocused(void) const +{ + return __internalFocus; +} + +HorizontalAlignment +_Edit::GetTextAlignment(void) const +{ + return _pEditPresenter->GetTextAlignment(); +} + +result +_Edit::SetTextAlignment(HorizontalAlignment alignment) +{ + return _pEditPresenter->SetTextAlignment(alignment); +} + +bool +_Edit::IsViewModeEnabled(void) const +{ + Variant var = GetProperty("viewModeEnabled"); + + return var.ToBool(); +} + +result +_Edit::SetViewModeEnabled(bool enable) +{ + Variant var(enable); + + return SetProperty("viewModeEnabled", var); +} + +result +_Edit::SetAutoLinkMask(unsigned long autoLinks) +{ + SysTryReturn(NID_UI_CTRL, (__inputStyle == INPUT_STYLE_OVERLAY), E_UNSUPPORTED_OPERATION, E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] The current state unable to this operation."); + Variant var(autoLinks); + + return SetProperty("autoLinkMask", var); +} + +unsigned long +_Edit::GetAutoLinkMask(void) const +{ + SysTryReturn(NID_UI_CTRL, (__inputStyle == INPUT_STYLE_OVERLAY), LINK_TYPE_NONE, E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] The current state unable to this operation."); + Variant var = GetProperty("autoLinkMask"); + + return var.ToULong(); +} + +int +_Edit::GetLineSpacing(void) const +{ + return _pEditPresenter->GetLineSpacing(); +} + +float +_Edit::GetLineSpacingF(void) const +{ + return _pEditPresenter->GetLineSpacingF(); +} + +result +_Edit::SetLineSpacing(int linePixelGap) +{ + return _pEditPresenter->SetLineSpacing(linePixelGap); +} + +result +_Edit::SetLineSpacing(float linePixelGap) +{ + return _pEditPresenter->SetLineSpacing(linePixelGap); +} + +void +_Edit::SetMaxLineCount(int maxLineCount) +{ + _pEditPresenter->SetMaxLineCount(maxLineCount); + + return; +} + +int +_Edit::GetMaxLineCount(void) const +{ + return _pEditPresenter->GetMaxLineCount(); +} + +int +_Edit::GetHorizontalMargin(EditTextHorizontalMargin marginType) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetHorizontalMarginF(marginType)); +} + +float +_Edit::GetHorizontalMarginF(EditTextHorizontalMargin marginType) const +{ + Variant var; + + switch (marginType) + { + case EDIT_TEXT_LEFT_MARGIN: + var = GetProperty("leftMargin"); + break; + + case EDIT_TEXT_RIGHT_MARGIN: + var = GetProperty("rightMargin"); + break; + + case EDIT_TEXT_HORIZONTAL_MARGIN: + var = GetProperty("leftMargin"); + break; + + default: + break; + } + + return var.ToFloat(); +} + + +int +_Edit::GetVerticalMargin(EditTextVerticalMargin marginType) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetVerticalMarginF(marginType)); +} + +float +_Edit::GetVerticalMarginF(EditTextVerticalMargin marginType) const +{ + Variant var; + + switch (marginType) + { + case EDIT_TEXT_TOP_MARGIN: + var = GetProperty("topMargin"); + break; + + case EDIT_TEXT_BOTTOM_MARGIN: + var = GetProperty("bottomMargin"); + break; + + case EDIT_TEXT_VERTICAL_MARGIN: + var = GetProperty("topMargin"); + break; + + default: + break; + } + + return var.ToFloat(); +} + +result +_Edit::SetHorizontalMargin(int margin, EditTextHorizontalMargin marginType) +{ + float floatMargin = _CoordinateSystemUtils::ConvertToFloat(margin); + + return SetHorizontalMargin(floatMargin, marginType); +} + +result +_Edit::SetHorizontalMargin(float margin, EditTextHorizontalMargin marginType) +{ + result r = E_SUCCESS; + Variant var(margin); + + SysTryReturn(NID_UI_CTRL, margin > 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The invalid argument is given."); + + switch (marginType) + { + case EDIT_TEXT_LEFT_MARGIN: + r = SetProperty("leftMargin", var); + break; + + case EDIT_TEXT_RIGHT_MARGIN: + r = SetProperty("rightMargin", var); + break; + + case EDIT_TEXT_HORIZONTAL_MARGIN: + r = SetProperty("leftMargin", var); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Faild to set margin."); + r = SetProperty("rightMargin", var); + break; + + default: + break; + } + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Faild to set margin."); + + _pEditPresenter->SetClientBounds(); + r = _pEditPresenter->SetInitialBounds(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Faild to set margin."); + + return r; +} + +result +_Edit::SetVerticalMargin(int margin, EditTextVerticalMargin marginType) +{ + float floatMargin = _CoordinateSystemUtils::ConvertToFloat(margin); + return SetVerticalMargin(floatMargin, marginType); +} + +result +_Edit::SetVerticalMargin(float margin, EditTextVerticalMargin marginType) +{ + result r = E_SUCCESS; + Variant var(margin); + + SysTryReturn(NID_UI_CTRL, margin > 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The invalid argument is given."); + + switch (marginType) + { + case EDIT_TEXT_TOP_MARGIN: + r = SetProperty("topMargin", var); + break; + + case EDIT_TEXT_BOTTOM_MARGIN: + r = SetProperty("bottomMargin", var); + break; + + case EDIT_TEXT_VERTICAL_MARGIN: + r = SetProperty("topMargin", var); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Faild to set margin."); + r = SetProperty("bottomMargin", var); + break; + + default: + break; + } + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Faild to set margin."); + + _pEditPresenter->SetClientBounds(); + r = _pEditPresenter->SetInitialBounds(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Faild to set margin."); + + return r; +} + +int +_Edit::GetTextLimitLength(void) const +{ + return _pEditPresenter->GetTextLimitLength(); +} + +result +_Edit::SetLimitLength(int limitLength) +{ + return _pEditPresenter->SetTextLimitLength(limitLength); +} + +result +_Edit::SetAutoResizingEnabled(bool enable) +{ + Variant var(enable); + + return SetProperty("autoResizingEnabled", var); +} + +bool +_Edit::IsAutoResizingEnabled(void) const +{ + Variant var = GetProperty("autoResizingEnabled"); + + return var.ToBool(); +} + +CoreKeypadAction +_Edit::GetKeypadAction(void) const +{ + Variant var = GetProperty("keypadAction"); + + return (CoreKeypadAction) var.ToInt(); +} + +result +_Edit::SetKeypadAction(CoreKeypadAction keypadAction) +{ + SysTryReturn(NID_UI_CTRL, (__inputStyle == INPUT_STYLE_OVERLAY), E_UNSUPPORTED_OPERATION, E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] The current state unable to this operation."); + Variant var((int) keypadAction); + + return SetProperty("keypadAction", var); +} + +result +_Edit::SetKeypadActionEnabled(bool enabled) +{ + Variant var(enabled); + + return SetProperty("keypadActionEnabled", var); +} + +bool +_Edit::GetKeypadActionEnabled(void) const +{ + Variant var = GetProperty("keypadActionEnabled"); + + return var.ToBool(); +} + +KeypadStyle +_Edit::GetKeypadStyle(void) const +{ + Variant var = GetProperty("keypadStyle"); + + return (KeypadStyle) var.ToInt(); +} + +result +_Edit::SetKeypadStyle(KeypadStyle keypadStyle) +{ + SysTryReturn(NID_UI_CTRL, (KEYPAD_STYLE_PASSWORD != keypadStyle), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The invalid argument is given."); + Variant var((int) keypadStyle); + + return SetProperty("keypadStyle", var); +} + +result +_Edit::SetKeypadNormalNumberStyle(bool enable) +{ + return _pEditPresenter->SetKeypadNormalNumberStyle(enable); +} + +bool +_Edit::IsTextPredictionEnabled(void) const +{ + return _pEditPresenter->IsTextPredictionEnabled(); +} + +result +_Edit::SetTextPredictionEnabled(bool enable) +{ + return _pEditPresenter->SetTextPredictionEnabled(enable); +} + +void +_Edit::UpdateAccessibilityElement(EditAccessibilityElementType type) +{ + _AccessibilityManager* pAccessibilityManager = null; + pAccessibilityManager = _AccessibilityManager::GetInstance(); + if (!pAccessibilityManager) + { + return; + } + + if (!__isAccessibilityCreated) + { + return; + } + + if (__editStyle & EDIT_STYLE_CLEAR) + { + _AccessibilityContainer* pEditAccessibilityContainer = GetAccessibilityContainer(); + if (pEditAccessibilityContainer) + { + if (!GetTextLength()) + { + if (__pClearButtonTextAccessibilityElement) + { + __pClearButtonTextAccessibilityElement->Activate(false); + pAccessibilityManager->SetGlobalFocusedElement(*__pTextAccessibilityElement); + } + } + else + { + if (__pClearButtonTextAccessibilityElement && !__pClearButtonTextAccessibilityElement->IsActivated()) + { + __pClearButtonTextAccessibilityElement->Activate(true); + } + else if (!__pClearButtonTextAccessibilityElement) + { + __pClearButtonTextAccessibilityElement = new _AccessibilityElement(true); + __pClearButtonTextAccessibilityElement->SetBounds(_pEditPresenter->GetClearIconBoundsF()); + __pClearButtonTextAccessibilityElement->SetLabel(L"clear all"); + __pClearButtonTextAccessibilityElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_BUTTON_T_TTS"); + __pClearButtonTextAccessibilityElement->SetName(L"EditFieldClearButton"); + pEditAccessibilityContainer->AddElement(*__pClearButtonTextAccessibilityElement); + } + } + } + } + + switch (type) + { + case EDIT_ACCESSIBILITY_ELEMENT_TYPE_TEXT: + if (__pTextAccessibilityElement) + { + __pTextAccessibilityElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height)); + if ((GetEditStyle() & EDIT_STYLE_TITLE_TOP) || (GetEditStyle() & EDIT_STYLE_TITLE_LEFT)) + { + __pTextAccessibilityElement->SetLabel(GetTitleText() + GetGuideText() + GetText()); + } + else + { + __pTextAccessibilityElement->SetLabel(GetGuideText() + GetText()); + } + } + break; + + case EDIT_ACCESSIBILITY_ELEMENT_TYPE_CLEAR_ICON: + if (__pClearButtonTextAccessibilityElement) + { + __pClearButtonTextAccessibilityElement->SetBounds(_pEditPresenter->GetClearIconBoundsF()); + } + break; + + default: + break; + } + + return; +} + +void +_Edit::SetFullScreenKeypadEdit(bool enabled) +{ + __isFullScreenKeypadEdit = enabled; + + return; +} + +bool +_Edit::IsFullScreenKeypadEdit(void) +{ + return __isFullScreenKeypadEdit; +} + +result +_Edit::HideKeypad(void) +{ + return _pEditPresenter->HideKeypad(true); +} + +int +_Edit::GetTextSize(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetTextSizeF()); +} + +float +_Edit::GetTextSizeF(void) const +{ + Variant size = GetProperty("textSize"); + + return size.ToFloat(); +} + +result +_Edit::SetTextSize(int size) +{ + return SetTextSize(_CoordinateSystemUtils::ConvertToFloat(size)); +} + +result +_Edit::SetTextSize(float size) +{ + Variant var(size); + + return SetProperty("textSize", Variant(size)); +} + +Color +_Edit::GetColor(EditStatus status) const +{ + Variant color; + switch (status) + { + case EDIT_STATUS_NORMAL: + color = GetProperty("normalColor"); + break; + + case EDIT_STATUS_DISABLED: + color = GetProperty("disabledColor"); + break; + + case EDIT_STATUS_HIGHLIGHTED: + color = GetProperty("highlightedColor"); + break; + + case EDIT_STATUS_PRESSED: + color = GetProperty("pressedColor"); + break; + + default: + break; + } + + return color.ToColor(); +} + +Color +_Edit::GetTextColor(EditTextColor type) const +{ + Variant variantColor; + Color color; + switch (type) + { + case EDIT_TEXT_COLOR_NORMAL: + variantColor = GetProperty("normalTextColor"); + color = variantColor.ToColor(); + break; + + case EDIT_TEXT_COLOR_DISABLED: + variantColor = GetProperty("disabledTextColor"); + color = variantColor.ToColor(); + break; + + case EDIT_TEXT_COLOR_HIGHLIGHTED: + variantColor = GetProperty("highlightedTextColor"); + color = variantColor.ToColor(); + break; + + case EDIT_TEXT_COLOR_LINK: + color = __cutlinkColor[EDIT_LINK_TYPE_URL].cutlinkFgColor; + break; + + default: + break; + } + + return color; +} + +Color +_Edit::GetTextColor(EditStatus status) const +{ + Variant variantColor; + Color color; + + switch (status) + { + case EDIT_STATUS_NORMAL: + variantColor = GetProperty("normalTextColor"); + color = variantColor.ToColor(); + break; + + case EDIT_STATUS_DISABLED: + variantColor = GetProperty("disabledTextColor"); + color = variantColor.ToColor(); + break; + + case EDIT_STATUS_HIGHLIGHTED: + variantColor = GetProperty("highlightedTextColor"); + color = variantColor.ToColor(); + break; + + case EDIT_STATUS_PRESSED: + variantColor = GetProperty("pressedTextColor"); + color = variantColor.ToColor(); + break; + + default: + break; + } + + return color; +} + +result +_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 allocation failed."); + + delete __pBackgroundBitmap[status]; + __pBackgroundBitmap[status] = pNewBitmap; + + return r; +} + +result +_Edit::SetColor(EditStatus status, const Color& color) +{ + result r = E_SUCCESS; + + switch (status) + { + case EDIT_STATUS_NORMAL: + r = SetProperty("normalColor", Variant(color)); + break; + + case EDIT_STATUS_DISABLED: + r = SetProperty("disabledColor", Variant(color)); + break; + + case EDIT_STATUS_HIGHLIGHTED: + r = SetProperty("highlightedColor", Variant(color)); + break; + + case EDIT_STATUS_PRESSED: + r = SetProperty("pressedColor", Variant(color)); + break; + + default: + r = E_INVALID_ARG; + break; + } + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Unable to set color.", GetErrorMessage(r)); + + return r; +} + +result +_Edit::SetTextColor(EditTextColor type, const Color& color) +{ + result r = E_SUCCESS; + EditCutlinkColor autoLinkColorInfo; + + switch (type) + { + case EDIT_TEXT_COLOR_NORMAL: + r = SetProperty("normalTextColor", Variant(color)); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] System error occurred.", GetErrorMessage(r)); + break; + + case EDIT_TEXT_COLOR_DISABLED: + r = SetProperty("disabledTextColor", Variant(color)); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] System error occurred.", GetErrorMessage(r)); + break; + + case EDIT_TEXT_COLOR_HIGHLIGHTED: + r = SetProperty("highlightedTextColor", Variant(color)); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] System error occurred.", GetErrorMessage(r)); + + r = SetProperty("pressedTextColor", Variant(color)); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] System error occurred.", GetErrorMessage(r)); + break; + + case EDIT_TEXT_COLOR_LINK: + GetCutlinkColorInfo(EDIT_LINK_TYPE_URL, &autoLinkColorInfo); + autoLinkColorInfo.cutlinkFgColor = color; + SetCutlinkColorInfo(EDIT_LINK_TYPE_URL, autoLinkColorInfo); + SetCutlinkColorInfo(EDIT_LINK_TYPE_EMAIL, autoLinkColorInfo); + SetCutlinkColorInfo(EDIT_LINK_TYPE_PHONE_NUM, autoLinkColorInfo); + break; + + default: + r = E_INVALID_ARG; + break; + } + + return r; +} + +String +_Edit::GetText(int start, int end) const +{ + SysTryReturn(NID_UI_CTRL, (start > -1 && end > -1), String(), E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The invalid argument(start = %d, end = %d) is given."); + + return _pEditPresenter->GetText(start, end); +} + +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) + { + __pExpandableEditAreaEvent = _ExpandableEditAreaEvent::CreateInstanceN(*this); + SysTryReturn(NID_UI_CTRL, __pExpandableEditAreaEvent, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + } + + return __pExpandableEditAreaEvent->AddListener(listener); +} + +result +_Edit::RemoveExpandableEditAreaEventListener(const _IExpandableEditAreaEventListener& listener) +{ + SysTryReturn(NID_UI_CTRL, __pExpandableEditAreaEvent, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] This instance isn't constructed."); + + return __pExpandableEditAreaEvent->RemoveListener(listener); +} + +result +_Edit::AddUiLinkEventListener(const _IUiLinkEventListener& listener) +{ + if (__pLinkEvent == null) + { + __pLinkEvent = _LinkEvent::CreateInstanceN(*this); + SysTryReturn(NID_UI_CTRL, __pLinkEvent, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + } + + return __pLinkEvent->AddListener(listener); +} + +result +_Edit::RemoveUiLinkEventListener(const _IUiLinkEventListener& listener) +{ + SysTryReturn(NID_UI_CTRL, __pLinkEvent, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] This instance isn't constructed."); + + return __pLinkEvent->RemoveListener(listener); +} + +result +_Edit::AddTextBlockEventListener(const _ITextBlockEventListener& listener) +{ + if (__pTextBlockEvent == null) + { + __pTextBlockEvent = _TextBlockEvent::CreateInstanceN(*this); + SysTryReturn(NID_UI_CTRL, __pTextBlockEvent, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + } + + return __pTextBlockEvent->AddListener(listener); +} + +result +_Edit::RemoveTextBlockEventListener(const _ITextBlockEventListener& listener) +{ + SysTryReturn(NID_UI_CTRL, __pTextBlockEvent, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] This instance isn't constructed."); + + __pTextBlockEvent->RemoveListener(listener); + + return E_SUCCESS; +} + +result +_Edit::AddKeypadEventListener(const _IKeypadEventListener& listener) +{ + if (__pKeypadEvent == null) + { + __pKeypadEvent = _KeypadEvent::CreateInstanceN(*this); + SysTryReturn(NID_UI_CTRL, __pKeypadEvent, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + } + + return __pKeypadEvent->AddListener(listener); +} + +result +_Edit::RemoveKeypadEventListener(const _IKeypadEventListener& listener) +{ + SysTryReturn(NID_UI_CTRL, __pKeypadEvent, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] This instance isn't constructed."); + + __pKeypadEvent->RemoveListener(listener); + + return E_SUCCESS; +} + +result +_Edit::AddTextEventListener(const _ITextEventListener& listener) +{ + if (__pTextEvent == null) + { + __pTextEvent = _TextEvent::CreateInstanceN(*this); + SysTryReturn(NID_UI_CTRL, __pTextEvent, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + } + + return __pTextEvent->AddListener(listener); +} + +result +_Edit::RemoveTextEventListener(const _ITextEventListener& listener) +{ + SysTryReturn(NID_UI_CTRL, __pTextEvent, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] This instance isn't constructed."); + __pTextEvent->RemoveListener(listener); + + return E_SUCCESS; +} + +result +_Edit::AddScrollPanelEventListener(const _IScrollPanelEventListener& listener) +{ + if (__pScrollPanelEvent == null) + { + if (__inputStyle != INPUT_STYLE_OVERLAY) + { + SysLogException(NID_UI_CTRL, E_SYSTEM, "[E_SYSTEM] System error occurred."); + return E_SYSTEM; + } + else + { + __pScrollPanelEvent = _ScrollPanelEvent::CreateScrollPanelEventN(*this); + SysTryReturn(NID_UI_CTRL, __pScrollPanelEvent, + E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + } + } + + return __pScrollPanelEvent->AddListener(listener); +} + +result +_Edit::RemoveScrollPanelEventListener(const _IScrollPanelEventListener& listener) +{ + SysTryReturn(NID_UI_CTRL, __pScrollPanelEvent, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] This instance isn't constructed."); + __pScrollPanelEvent->RemoveListener(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) +{ + _pEditPresenter->AddActionEventListener(listener); + + return E_SUCCESS; +} + +result +_Edit::RemoveActionEventListener(const _IActionEventListener& listener) +{ + _pEditPresenter->RemoveActionEventListener(listener); + + return E_SUCCESS; +} + +result +_Edit::AddLanguageEventListener(const _ILanguageEventListener& listener) +{ + if (__pLanguageEvent == null) + { + __pLanguageEvent = _LanguageEvent::CreateInstanceN(*this); + + SysTryReturn(NID_UI_CTRL, __pLanguageEvent, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] This instance isn't constructed.") + + __pLanguageEvent->AddListener(listener); + } + + return E_SUCCESS; +} + +result +_Edit::RemoveLanguageEventListener(const _ILanguageEventListener& listener) +{ + SysTryReturn(NID_UI_CTRL, __pLanguageEvent, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] This instance isn't constructed."); + + __pLanguageEvent->RemoveListener(listener); + + return E_SUCCESS; +} + +int +_Edit::GetRemainingLength(void) const +{ + return _pEditPresenter->GetRemainingLength(); +} + +void +_Edit::SetLowerCaseModeEnabled(bool enable) +{ + Variant var(enable); + + SetProperty("lowerCaseModeEnabled", var); + + return; +} + +bool +_Edit::IsLowerCaseModeEnabled(void) const +{ + Variant var = GetProperty("lowerCaseModeEnabled"); + + return var.ToBool(); +} + +result +_Edit::SetCursorPosition(int position) +{ + int textLength = GetTextLength(); + SysTryReturn(NID_UI_CTRL, (position >= 0 && position <= textLength), E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] This position is out of range."); + + Variant var(position); + + return SetProperty("cursorPosition", var); +} + +int +_Edit::GetCursorPosition(void) const +{ + Variant var = GetProperty("cursorPosition"); + + return var.ToInt(); +} + +String +_Edit::GetText(void) const +{ + Variant var = GetProperty("text"); + + return var.ToString(); +} + +int +_Edit::GetTextLength(void) const +{ + return _pEditPresenter->GetTextLength(); +} + +result +_Edit::SetText(const String& text) +{ + Variant var(text); + + return SetProperty("text", var); +} + +result +_Edit::InsertTextAtCursorPosition(const String& text) +{ + return _pEditPresenter->InsertTextAtCursorPosition(text); +} + +result +_Edit::InsertCharacterAt(int index, const Character& character) +{ + return _pEditPresenter->InsertCharacterAt(index, character); +} + +result +_Edit::InsertTextAt(int index, const String& text) +{ + return _pEditPresenter->InsertTextAt(index, text); +} + +result +_Edit::AppendText(const String& text) +{ + return _pEditPresenter->AppendText(text); +} + +result +_Edit::AppendCharacter(const Character& character) +{ + return _pEditPresenter->AppendCharacter(character); +} + +result +_Edit::InsertTextAt(int position, const String& text, const Bitmap& textImage) +{ + return _pEditPresenter->InsertTextAt(position, text, textImage); +} + +result +_Edit::AppendText(const String& text, const Bitmap& textImage) +{ + return _pEditPresenter->InsertTextAt(_pEditPresenter->GetTextLength(), text, textImage); +} + +result +_Edit::ClearText(void) +{ + return _pEditPresenter->ClearText(); +} + +result +_Edit::DeleteCharacterAt(int index) +{ + return _pEditPresenter->DeleteCharacterAt(index); +} + +result +_Edit::DeleteCharacterAtCursorPosition(void) +{ + return _pEditPresenter->DeleteCharacterAtCursorPosition(); +} + +void +_Edit::GetCurrentTextRange(int& start, int& end) const +{ + _pEditPresenter->GetCurrentTextRange(start, end); + + return; +} + +void +_Edit::SetGuideText(const String& guideText) +{ + Variant var(guideText); + + SetProperty("guideText", var); + + return; +} + +String +_Edit::GetGuideText(void) const +{ + Variant var = GetProperty("guideText"); + + return var.ToString(); +} + +Color +_Edit::GetGuideTextColor(void) const +{ + Variant color = GetProperty("guideTextColor"); + + return color.ToColor(); +} + +result +_Edit::SetGuideTextColor(const Color& color) +{ + __isSettingGuideTextColor = true; + + return SetProperty("guideTextColor", Variant(color)); +} + +void +_Edit::SetKeypadEnabled(bool enable) +{ + Variant var(enable); + + SetProperty("keypadEnabled", var); + + return; +} + +bool +_Edit::IsKeypadEnabled(void) const +{ + Variant var = GetProperty("keypadEnabled"); + + return var.ToBool(); +} + +result +_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 (_pEditPresenter->IsCurrentFocused()) + { + return _pEditPresenter->ShowKeypad(false); + } + else + { + return _pEditPresenter->ShowKeypad(); + } +} + +int +_Edit::GetTextLineCount(void) const +{ + return _pEditPresenter->GetTextLineCount(); +} + +int +_Edit::GetTextTotalHeight(void) const +{ + return _pEditPresenter->GetTextTotalHeight(); +} + +float +_Edit::GetTextTotalHeightF(void) const +{ + return _pEditPresenter->GetTextTotalHeightF(); +} + +result +_Edit::SetBlockTextColor(const Color& color) +{ + Variant var(color); + + return SetProperty("blockedTextColor", var); +} + +Color +_Edit::GetBlockTextColor(void) const +{ + Variant var; + + if (__blockTextColor.used) + { + var = GetProperty("blockedTextColor"); + } + else + { + var = GetProperty("highlightedColor"); + } + + return var.ToColor(); +} + +void +_Edit::GetBlockRange(int& start, int& end) const +{ + _pEditPresenter->GetBlockRange(start, end); + + return; +} + +result +_Edit::SetBlockRange(int start, int end) +{ + return _pEditPresenter->SetBlockRange(start, end); +} + +void +_Edit::GetWordPosition(int cursorPos, int& startPos, int& endPos) const +{ + _pEditPresenter->GetWordPosition(cursorPos, startPos, endPos); + + return; +} + +result +_Edit::GetTextImageRangeAt(int postion, int& startPosition, int& endPosition) const +{ + return _pEditPresenter->GetTextImageRangeAt(postion, startPosition, endPosition); +} + +result +_Edit::BeginTextBlock(void) +{ + return _pEditPresenter->BeginTextBlock(); +} + +result +_Edit::ReleaseTextBlock(void) +{ + return _pEditPresenter->ReleaseTextBlock(); +} + +bool +_Edit::IsBlocked(void) const +{ + return _pEditPresenter->IsBlocked(); +} + +result +_Edit::CopyText(void) +{ + return _pEditPresenter->CopyText(); +} + +result +_Edit::CutText(void) +{ + return _pEditPresenter->CutText(); +} + +result +_Edit::PasteText(void) +{ + return _pEditPresenter->PasteText(); +} + +result +_Edit::RemoveTextBlock(void) +{ + return _pEditPresenter->RemoveTextBlock(); +} + +bool +_Edit::IsClipped(void) const +{ + return _pEditPresenter->IsClipped(); +} + +result +_Edit::SetCurrentLanguage(LanguageCode languageCode) +{ + return _pEditPresenter->SetCurrentLanguage(languageCode); +} + +result +_Edit::GetCurrentLanguage(LanguageCode& language) const +{ + return _pEditPresenter->GetCurrentLanguage(language); +} + +bool +_Edit::CalculateAbsoluteCursorBounds(int index, FloatRectangle& absCursorRect) +{ + return _pEditPresenter->CalculateAbsoluteCursorBounds(index, absCursorRect); +} + +void +_Edit::OnDraw(void) +{ + _pEditPresenter->Draw(); + + return; +} + +bool +_Edit::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + return _pEditPresenter->OnTouchPressed(source, touchinfo); +} + +bool +_Edit::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + __isTouchMoving = false; + + return _pEditPresenter->OnTouchCanceled(source, touchinfo); +} + +bool +_Edit::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + if ((__editStyle ^ EDIT_STYLE_VIEWER) && !__isTouchMoving) + { + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, this); + } + + bool result = _pEditPresenter->OnTouchReleased(source, touchinfo); + + __isTouchMoving = false; + + return result; +} + +bool +_Edit::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + __isTouchMoving = true; + + return _pEditPresenter->OnTouchMoved(source, touchinfo); +} + +bool +_Edit::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) +{ + return _pEditPresenter->OnKeyPressed(source, keyInfo); +} + +bool +_Edit::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) +{ + return _pEditPresenter->OnKeyReleased(source, keyInfo); +} + +bool +_Edit::OnNotifiedN(const _Control& source, IList* pArgs) +{ + return _pEditPresenter->OnNotifiedN(pArgs); +} + + +bool +_Edit::OnFlickGestureDetected(_TouchFlickGestureDetector& gesture) +{ + float xDistance = 0.0f; + float yDistance = 0.0f; + if (gesture.GetDirection() == _FLICK_DIRECTION_UP || gesture.GetDirection() == _FLICK_DIRECTION_DOWN) + { + gesture.GetDistance(xDistance, yDistance); + FloatPoint flickPoint(xDistance, yDistance); + + _pEditPresenter->InitializeCopyPasteManager(); + + _pEditPresenter->StartFlickAnimation(flickPoint, gesture.GetDuration()); + } + else + { + return false; + } + + return true; +} + +bool +_Edit::OnFlickGestureCanceled(_TouchFlickGestureDetector& gesture) +{ + return false; +} + +bool +_Edit::OnLongPressGestureDetected(_TouchLongPressGestureDetector& gesture) +{ + _pEditPresenter->OnLongPressGestureDetected(); + + return true; +} + +bool +_Edit::OnLongPressGestureCanceled(_TouchLongPressGestureDetector& gesture) +{ + return false; +} + +bool +_Edit::OnTapGestureDetected(_TouchTapGestureDetector& gesture) +{ + _pEditPresenter->OnTapGestureDetected(); + + return true; +} + +bool +_Edit::OnTapGestureCanceled(_TouchTapGestureDetector& gesture) +{ + return false; +} + +void +_Edit::OnClipboardPopupClosed(const ClipboardItem* pClipboardItem) +{ + _pEditPresenter->OnClipboardPopupClosed(pClipboardItem); + + return; +} + +bool +_Edit::OnFocusGained(const _Control& source) +{ + __internalFocus = true; + return _pEditPresenter->OnFocusGained(); +} + +bool +_Edit::OnFocusLost(const _Control& source) +{ + __isTouchMoving = false; + __internalFocus = false; + _pEditPresenter->OnFocusLost(); + _Control::OnFocusLost(source); + + return true; +} + +result +_Edit::OnAttachingToMainTree(const _Control* pParent) +{ + __isDestroyed = false; + + return E_SUCCESS; +} + +result +_Edit::OnAttachedToMainTree(void) +{ + if (__isAccessibilityCreated) + { + return E_SUCCESS; + } + + if (__pTextAccessibilityElement) + { + __pTextAccessibilityElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height)); + } + if (__pClearButtonTextAccessibilityElement) + { + __pClearButtonTextAccessibilityElement->SetBounds(_pEditPresenter->GetClearIconBoundsF()); + } + + return E_SUCCESS; +} + +void +_Edit::OnBoundsChanged(void) +{ + if (__isConstructed) + { + SysAssertf(_pEditPresenter != null, "_pEditPresenter is null"); + + if (!((GetEditStyle() & EDIT_STYLE_FLEXIBLE) == false)) + { + if (_pEditPresenter->IsUpdateInitialBounds()) + { + FloatRectangle editBounds = GetBoundsF(); + if (__previousBounds.height != editBounds.height || __previousBounds.width != editBounds.width) + { + _pEditPresenter->SetControlInitialBounds(editBounds); + } + else + { + _pEditPresenter->SetControlInitialPosition(FloatPoint(editBounds.x, editBounds.y)); + } + __previousBounds = editBounds; + } + else + { + __previousBounds = GetBoundsF(); + } + } + + _pEditPresenter->Resize(); + + if (__isAccessibilityCreated) + { + if (__pTextAccessibilityElement) + { + __pTextAccessibilityElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height)); + } + + if (__pClearButtonTextAccessibilityElement) + { + __pClearButtonTextAccessibilityElement->SetBounds(_pEditPresenter->GetClearIconBoundsF()); + } + } + } + + return; +} + +void +_Edit::OnChangeLayout(_ControlRotation rotation) +{ + result r = _pEditPresenter->ChangeLayout(rotation); + SetLastResult(r); + + return; +} + +void +_Edit::OnScrollPanelBoundsChanged(void) +{ + _pEditPresenter->OnScrollPanelBoundsChanged(); + + return; +} + +void +_Edit::OnFontChanged(Font* pFont) +{ + _pEditPresenter->OnFontChanged(pFont); + + _Control::OnFontChanged(pFont); + + return; +} + +void +_Edit::OnFontInfoRequested(unsigned long& style, float& size) +{ + _pEditPresenter->OnFontInfoRequested(style, size); + + return; +} + +result +_Edit::OnDetachingFromMainTree(void) +{ + __isDestroyed = true; + if (_pEditPresenter->IsBounded()) + { + DetachScrollPanelEvent(); + } + return E_SUCCESS; +} + +void +_Edit::OnVisibleStateChanged(void) +{ + if (GetVisibleState() == false) + { + if (_pEditPresenter->IsCopyPasteManagerExist()) + { + _pEditPresenter->InitializeCopyPasteManager(); + } + } + + return; +} + +void +_Edit::OnAncestorEnableStateChanged(const _Control& control) +{ + bool enableState = false; + enableState = control.GetEnableState(); + + if (!enableState) + { + _pEditPresenter->ChangeToUnbindState(false); + } + else + { + if (_pEditPresenter->IsCurrentFocused()) + { + _pEditPresenter->InitializeFocusedCondition(); + } + } + + _pEditPresenter->SetKeypadEventSkipped(!enableState); + + if (__inputStyle != INPUT_STYLE_FULLSCREEN && !IsViewModeEnabled()) + { + _pEditPresenter->SetCursorDisabled(!enableState); + } + + Invalidate(); + + return; +} + +void +_Edit::OnAncestorVisibleStateChanged(const _Control& control) +{ + bool visibleState = false; + visibleState = control.GetVisibleState(); + + if (!visibleState) + { + _pEditPresenter->ChangeToUnbindState(false); + } + + Invalidate(); + + return; +} + +bool +_Edit::IsDestroyed(void) const +{ + return __isDestroyed; +} + +unsigned long +_Edit::GetEditStyle(void) const +{ + return __editStyle; +} + +void +_Edit::SetEditStyle(unsigned long style) +{ + __editStyle = style; + + return; +} + +void +_Edit::SetBorderRoundStyleEnabled(bool enable) +{ + __borderRoundStyle = enable; + + return; +} + +bool +_Edit::IsBorderRoundStyleEnabled(void) const +{ + return __borderRoundStyle; +} + +bool +_Edit::IsUsbKeyboardConnected(void) const +{ + return _pEditPresenter->IsUsbKeyboardConnected(); +} + +bool +_Edit::IsKeypadExist(void) const +{ + return _pEditPresenter->IsKeypadExist(); +} + +bool +_Edit::IsClipboardExist(void) const +{ + return _pEditPresenter->IsClipboardExist(); +} + +bool +_Edit::CheckKeypadExist(_ControlOrientation orientation) +{ + return _pEditPresenter->CheckKeypadExist(orientation); +} + +void +_Edit::SetAutoShrinkModeEnabled(bool enable) +{ + _pEditPresenter->SetAutoShrinkModeEnabled(enable); + + return; +} + +bool +_Edit::IsAutoShrinkModeEnabled(void) const +{ + return _pEditPresenter->IsAutoShrinkModeEnabled(); +} + +EllipsisPosition +_Edit::GetEllipsisPosition(void) const +{ + return __ellipsisPosition; +} + +void +_Edit::SetEllipsisPosition(EllipsisPosition position) +{ + __ellipsisPosition = position; + _pEditPresenter->SetEllipsisPosition(position); + + return; +} + +void +_Edit::GetCutlinkColorInfo(EditCutLinkType type, EditCutlinkColor* colorInfo) const +{ + *colorInfo = __cutlinkColor[type]; + + return; +} + +void +_Edit::SetCutlinkColorInfo(EditCutLinkType type, EditCutlinkColor colorInfo) +{ + __cutlinkColor[type] = colorInfo; + + return; +} + +Bitmap* +_Edit::GetBackgroundBitmap(EditStatus status) const +{ + return __pBackgroundBitmap[status]; +} + +result +_Edit::LoadDefaultBackgroundBitmap(GroupStyle groupStyle) +{ + result r = E_SUCCESS; + + switch (groupStyle) + { + case GROUP_STYLE_NONE: + r = GET_BITMAP_CONFIG_N(EDIT::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_NORMAL]); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap"); + r = GET_BITMAP_CONFIG_N(EDIT::BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_DISABLED]); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap"); + r = GET_BITMAP_CONFIG_N(EDIT::BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_HIGHLIGHTED]); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap"); + r = GET_BITMAP_CONFIG_N(EDIT::BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_PRESSED]); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap"); + r = GET_BITMAP_CONFIG_N(EDIT::BG_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundEffectBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap"); + break; + + case GROUP_STYLE_SINGLE: + r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_SINGLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_NORMAL]); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap"); + r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_SINGLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_DISABLED]); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap"); + r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_SINGLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_HIGHLIGHTED]); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap"); + r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_SINGLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_PRESSED]); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap"); + r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_SINGLE_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundEffectBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap"); + break; + + case GROUP_STYLE_TOP: + r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_TOP_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_NORMAL]); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap"); + r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_TOP_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_DISABLED]); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap"); + r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_TOP_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_HIGHLIGHTED]); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap"); + r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_TOP_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_PRESSED]); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap"); + r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_TOP_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundEffectBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap"); + break; + + case GROUP_STYLE_MIDDLE: + r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_MIDDLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_NORMAL]); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap"); + r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_MIDDLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_DISABLED]); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap"); + r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_MIDDLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_HIGHLIGHTED]); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap"); + r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_MIDDLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_PRESSED]); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap"); + r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_MIDDLE_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundEffectBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap"); + break; + + case GROUP_STYLE_BOTTOM: + r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_BOTTOM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_NORMAL]); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap"); + r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_BOTTOM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_DISABLED]); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap"); + r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_BOTTOM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_HIGHLIGHTED]); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap"); + r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_BOTTOM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_PRESSED]); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap"); + r = GET_BITMAP_CONFIG_N(EDIT::GROUPED_BOTTOM_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundEffectBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap"); + break; + + default: + r = GET_BITMAP_CONFIG_N(EDIT::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_NORMAL]); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap"); + r = GET_BITMAP_CONFIG_N(EDIT::BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_DISABLED]); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap"); + r = GET_BITMAP_CONFIG_N(EDIT::BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_HIGHLIGHTED]); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap"); + r = GET_BITMAP_CONFIG_N(EDIT::BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_PRESSED]); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap"); + r = GET_BITMAP_CONFIG_N(EDIT::BG_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundEffectBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap"); + break; + } + + return r; + +CATCH: + for (int status = 0; status < EDIT_COLOR_MAX; status++) + { + if (__pDefaultBackgroundBitmap[status]) + { + delete __pDefaultBackgroundBitmap[status]; + __pDefaultBackgroundBitmap[status] = null; + } + } + + delete __pDefaultBackgroundEffectBitmap; + __pDefaultBackgroundEffectBitmap = null; + + return r; +} + +result +_Edit::ReplaceDefaultBackgroundBitmapForSearchBar(void) +{ + result r = E_SUCCESS; + + for (int status = 0; status < EDIT_COLOR_MAX; status++) + { + if (__pDefaultBackgroundBitmap[status]) + { + delete __pDefaultBackgroundBitmap[status]; + __pDefaultBackgroundBitmap[status] = null; + } + } + + if (__pDefaultBackgroundEffectBitmap) + { + delete __pDefaultBackgroundEffectBitmap; + __pDefaultBackgroundEffectBitmap = null; + } + + r = GET_BITMAP_CONFIG_N(SEARCHBAR::EDIT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_NORMAL]); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap"); + r = GET_BITMAP_CONFIG_N(SEARCHBAR::EDIT_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_DISABLED]); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap"); + r = GET_BITMAP_CONFIG_N(SEARCHBAR::EDIT_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_HIGHLIGHTED]); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap"); + r = GET_BITMAP_CONFIG_N(SEARCHBAR::EDIT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pDefaultBackgroundBitmap[EDIT_STATUS_PRESSED]); + 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"); + + _pEditPresenter->SetSearchBarFlag(true); + + return r; + +CATCH: + for (int status = 0; status < EDIT_COLOR_MAX; status++) + { + if (__pDefaultBackgroundBitmap[status]) + { + delete __pDefaultBackgroundBitmap[status]; + __pDefaultBackgroundBitmap[status] = null; + } + } + + delete __pDefaultBackgroundEffectBitmap; + __pDefaultBackgroundEffectBitmap = null; + + return r; +} + +Bitmap* +_Edit::GetDefaultBackgroundBitmap(EditStatus status) const +{ + return __pDefaultBackgroundBitmap[status]; +} + +bool +_Edit::IsCustomDefaultBackgroundBitmap(EditStatus status) const +{ + bool isCustomBitmap = false; + + switch (status) + { + case EDIT_STATUS_NORMAL: + isCustomBitmap = IS_CUSTOM_BITMAP(EDIT::BG_NORMAL); + break; + + case EDIT_STATUS_DISABLED: + isCustomBitmap = IS_CUSTOM_BITMAP(EDIT::BG_DISABLED); + break; + + case EDIT_STATUS_HIGHLIGHTED: + isCustomBitmap = IS_CUSTOM_BITMAP(EDIT::BG_HIGHLIGHTED); + break; + + case EDIT_STATUS_PRESSED: + isCustomBitmap = IS_CUSTOM_BITMAP(EDIT::BG_PRESSED); + break; + + default: + isCustomBitmap = false; + break; + } + + return isCustomBitmap; +} + +Bitmap* +_Edit::GetDefaultBackgroundEffectBitmap(void) const +{ + return __pDefaultBackgroundEffectBitmap; +} + +bool +_Edit::IsSettingGuideTextColor(void) const +{ + return __isSettingGuideTextColor; +} + +result +_Edit::SetFont(const Font& font) +{ + return _pEditPresenter->SetFont(font); +} + +void +_Edit::GetFontType(String& typefaceName, unsigned long& styleMask) const +{ + _pEditPresenter->GetFontType(typefaceName, styleMask); +} + +result +_Edit::SetFontType(const String& typefaceName, unsigned long styleMask) +{ + return _pEditPresenter->SetFontType(typefaceName, styleMask); +} + +unsigned long +_Edit::GetTextStyle(void) const +{ + return _pEditPresenter->GetTextStyle(); +} + +result +_Edit::SetTextStyle(unsigned long style) +{ + return _pEditPresenter->SetTextStyle(style); +} + +String +_Edit::GetTitleText(void) const +{ + SysTryReturn(NID_UI_CTRL, (GetEditStyle() & EDIT_STYLE_TITLE_TOP) || (GetEditStyle() & EDIT_STYLE_TITLE_LEFT), String(), E_SYSTEM, "[E_SYSTEM] The EditField has no title style.\n"); + + Variant var = GetProperty("titleText"); + + return var.ToString(); +} + +result +_Edit::SetTitleText(const String& title) +{ + SysTryReturn(NID_UI_CTRL, (GetEditStyle() & EDIT_STYLE_TITLE_TOP) || (GetEditStyle() & EDIT_STYLE_TITLE_LEFT), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] The EditField has no title style.\n"); + Variant var(title); + + return SetProperty("titleText", var); +} + +Color +_Edit::GetTitleTextColor(EditStatus status) const +{ + Variant var; + switch (status) + { + case EDIT_STATUS_NORMAL: + var = GetProperty("normalTitleTextColor"); + break; + + case EDIT_STATUS_DISABLED: + var = GetProperty("disabledTitleTextColor"); + break; + + case EDIT_STATUS_HIGHLIGHTED: + var = GetProperty("highlightedTitleTextColor"); + break; + + case EDIT_STATUS_PRESSED: + var = GetProperty("pressedTitleTextColor"); + break; + + default: + break; + } + + return var.ToColor(); +} + +result +_Edit::SetTitleTextColor(EditStatus status, const Color& color) +{ + result r = E_SUCCESS; + + Variant var(color); + + switch (status) + { + case EDIT_STATUS_NORMAL: + r = SetProperty("normalTitleTextColor", var); + break; + + case EDIT_STATUS_DISABLED: + r = SetProperty("disabledTitleTextColor", var); + break; + + case EDIT_STATUS_HIGHLIGHTED: + r = SetProperty("highlightedTitleTextColor", var); + break; + + case EDIT_STATUS_PRESSED: + r = SetProperty("pressedTitleTextColor", var); + break; + + default: + r = E_INVALID_ARG; + break; + } + + return r; +} + +InputStyle +_Edit::GetInputStyle(void) const +{ + return __inputStyle; +} + +result +_Edit::SetKeypadCommandButtonVisible(bool visible) +{ + Variant var(visible); + + return SetProperty("overlayKeypadCommandButtonVisible", var); +} + +_Toolbar* +_Edit::GetKeypadCommandButton(void) const +{ + return _pEditPresenter->GetKeypadCommandButton(); +} + + +result +_Edit::SetKeypadCommandButton(CommandButtonPosition position, const String& text, int actionId) +{ + SysTryReturn(NID_UI_CTRL, (__inputStyle != INPUT_STYLE_FULLSCREEN), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Unable to show the keypad due to a wrong input style."); + + return _pEditPresenter->SetKeypadCommandButton(position, text, actionId); +} + +result +_Edit::GetKeypadBounds(FloatRectangle& rect) const +{ + return _pEditPresenter->GetKeypadBounds(rect); +} + +float +_Edit::GetClipboardHeight(void) const +{ + return _pEditPresenter->GetClipboardHeight(); +} + +result +_Edit::SendExpandableEditAreaEvent(_ExpandableEditAreaEventStatus status, int newLineCount) +{ + 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 allocation failed."); + + __pExpandableEditAreaEvent->Fire(*pEventArg); + } + + return E_SUCCESS; +} + +result +_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] Memory allocation failed."); + + __pScrollPanelEvent->Fire(*pEventArg); + } + + return E_SUCCESS; +} + +result +_Edit::SendKeypadEvent(CoreKeypadAction keypadAction, CoreKeypadEventStatus eventstatus) +{ + 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] Memory allocation failed."); + + _pEditPresenter->SetSentKeypadEvent(eventstatus); + + __pKeypadEvent->Fire(*pEventArg); + } + + return E_SUCCESS; +} + +result +_Edit::SendTextEvent(CoreTextEventStatus textEventStatus) +{ + if (__inputStyle == INPUT_STYLE_FULLSCREEN) + { + _pEditPresenter->DeleteFullscreenKeypad(); + } + + 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 allocation failed."); + + __pTextEvent->Fire(*pEventArg); + } + + return E_SUCCESS; +} + +result +_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] Memory allocation failed."); + + __pTextBlockEvent->Fire(*pTextBlockEventArg); + } + + return E_SUCCESS; +} + +result +_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] Memory allocation failed."); + + __pLinkEvent->Fire(*pLinkEventArg); + } + + return E_SUCCESS; +} + +result +_Edit::SendLanguageEvent(LanguageCode prevLanguageCode, LanguageCode currentLanguageCode) +{ + 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 allocation failed."); + + __pLanguageEvent->Fire(*pLanguageEventArg); + } + + return E_SUCCESS; +} + +result +_Edit::AttachScrollPanelEvent(void) +{ + _ScrollPanel* pScrollPanelCore = dynamic_cast< _ScrollPanel* >(GetParent()); + if (pScrollPanelCore) + { + if (__pScrollPanelEvent) + { + pScrollPanelCore->SetScrollPanelEvent(__pScrollPanelEvent); + } + pScrollPanelCore->SetControlKeypadBinding(this); + } + + return E_SUCCESS; +} + +result +_Edit::DetachScrollPanelEvent(void) +{ + _ScrollPanel* pScrollPanelCore = dynamic_cast< _ScrollPanel* >(GetParent()); + if (pScrollPanelCore) + { + if (__pScrollPanelEvent && (pScrollPanelCore->GetScrollPanelEvent() == __pScrollPanelEvent)) + { + pScrollPanelCore->SetScrollPanelEvent(null); + } + pScrollPanelCore->SetControlKeypadBinding(null); + } + + return E_SUCCESS; +} + +bool +_Edit::IsKeypadCommandButtonVisible(void) const +{ + Variant var = GetProperty("overlayKeypadCommandButtonVisible"); + + return var.ToBool(); +} + +String +_Edit::GetKeypadCommandButtonText(CommandButtonPosition position) const +{ + SysTryReturn(NID_UI_CTRL, (__inputStyle != INPUT_STYLE_FULLSCREEN), String(), E_SYSTEM, "[E_SYSTEM] Unable to show the keypad due to a wrong input style."); + + return _pEditPresenter->GetKeypadCommandButtonText(position); +} + +int +_Edit::GetKeypadCommandButtonActionId(CommandButtonPosition position) const +{ + SysTryReturn(NID_UI_CTRL, (__inputStyle != INPUT_STYLE_FULLSCREEN), -1, E_SYSTEM, "[E_SYSTEM] Unable to show the keypad due to a wrong input style."); + + return _pEditPresenter->GetKeypadCommandButtonActionId(position); +} + +result +_Edit::GetCursorBounds(bool isAbsRect, FloatRectangle& cursorBounds) const +{ + return _pEditPresenter->GetCursorBounds(isAbsRect, cursorBounds); +} + +int +_Edit::GetCursorPositionAt(const FloatPoint& touchPoint) const +{ + return _pEditPresenter->GetCursorPositionAt(touchPoint); +} + +void +_Edit::SetCursorDisabled(bool disabled) +{ + _pEditPresenter->SetCursorDisabled(disabled); + + return; +} + +result +_Edit::SetPropertyAutoResizingEnabled(const Variant& enable) +{ + result r = E_SUCCESS; + + r = _pEditPresenter->SetAutoResizingEnabled(enable.ToBool()); + + return r; +} + +Variant +_Edit::GetPropertyAutoResizingEnabled(void) const +{ + return Variant(_pEditPresenter->IsAutoResizingEnabled()); +} + +result +_Edit::SetPropertyCursorPosition(const Variant& position) +{ + result r = E_SUCCESS; + int textLength = GetTextLength(); + int cursorPos = position.ToInt(); + + SysTryReturn(NID_UI_CTRL, (cursorPos >= 0 && cursorPos <= textLength), E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] This position is out of range."); + + r = _pEditPresenter->SetCursorPosition(cursorPos); + + return r; +} + +Variant +_Edit::GetPropertyCursorPosition(void) const +{ + return Variant(_pEditPresenter->GetCursorPosition()); +} + +result +_Edit::SetPropertyDisabledColor(const Variant& color) +{ + __color[EDIT_STATUS_DISABLED].backgroundColor = color.ToColor(); + + return E_SUCCESS; +} + +Variant +_Edit::GetPropertyDisabledColor(void) const +{ + return Variant(__color[EDIT_STATUS_DISABLED].backgroundColor); +} + +result +_Edit::SetPropertyDisabledTextColor(const Variant& color) +{ + __color[EDIT_STATUS_DISABLED].textColor = color.ToColor(); + + return E_SUCCESS; +} + +Variant +_Edit::GetPropertyDisabledTextColor(void) const +{ + return Variant(__color[EDIT_STATUS_DISABLED].textColor); +} + +result +_Edit::SetPropertyGuideText(const Variant& guideText) +{ + if (__pTextAccessibilityElement) + { + __pTextAccessibilityElement->SetLabel(guideText.ToString()); + } + + return _pEditPresenter->SetGuideText(guideText.ToString()); +} + +Variant +_Edit::GetPropertyGuideText(void) const +{ + return Variant(_pEditPresenter->GetGuideText()); +} + +result +_Edit::SetPropertyGuideTextColor(const Variant& color) +{ + __guideTextColor = color.ToColor(); + + return E_SUCCESS; +} + +Variant +_Edit::GetPropertyGuideTextColor(void) const +{ + return Variant(__guideTextColor); +} + +result +_Edit::SetPropertyKeypadActionEnabled(const Variant& enabled) +{ + return _pEditPresenter->SetKeypadActionEnabled(enabled.ToBool()); +} + +Variant +_Edit::GetPropertyKeypadActionEnabled(void) const +{ + return Variant(_pEditPresenter->IsKeypadActionEnabled()); +} + +result +_Edit::SetPropertyKeypadAction(const Variant& action) +{ + SysTryReturn(NID_UI_CTRL, (__inputStyle == INPUT_STYLE_OVERLAY), E_UNSUPPORTED_OPERATION, E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] The current state unable to this operation."); + + result r = E_SUCCESS; + + r = _pEditPresenter->SetKeypadAction((CoreKeypadAction) action.ToInt()); + + return r; +} + +Variant +_Edit::GetPropertyKeypadAction(void) const +{ + return Variant((int) _pEditPresenter->GetKeypadAction()); +} + +result +_Edit::SetPropertyLineSpacing(const Variant& lineSpacing) +{ + __lineSpacing = lineSpacing.ToFloat(); + + return E_SUCCESS; +} + +Variant +_Edit::GetPropertyLineSpacing(void) const +{ + return Variant(__lineSpacing); +} + +result +_Edit::SetPropertyNormalColor(const Variant& color) +{ + __color[EDIT_STATUS_NORMAL].backgroundColor = color.ToColor(); + + return E_SUCCESS; +} + +Variant +_Edit::GetPropertyNormalColor(void) const +{ + return Variant(__color[EDIT_STATUS_NORMAL].backgroundColor); +} + +result +_Edit::SetPropertyPressedColor(const Variant& color) +{ + __color[EDIT_STATUS_PRESSED].backgroundColor = color.ToColor(); + + return E_SUCCESS; +} + +Variant +_Edit::GetPropertyPressedColor(void) const +{ + return Variant(__color[EDIT_STATUS_PRESSED].backgroundColor); +} + +result +_Edit::SetPropertyHighlightedColor(const Variant& color) +{ + __color[EDIT_STATUS_HIGHLIGHTED].backgroundColor = color.ToColor(); + + return E_SUCCESS; +} + +Variant +_Edit::GetPropertyHighlightedColor(void) const +{ + return Variant(__color[EDIT_STATUS_HIGHLIGHTED].backgroundColor); +} + +result +_Edit::SetPropertyTextSize(const Variant& textSize) +{ + int fontMinSize = 0; + float size = textSize.ToFloat(); + result r = E_SUCCESS; + + GET_FIXED_VALUE_CONFIG(EDIT::FONT_MIN_SIZE, _CONTROL_ORIENTATION_PORTRAIT, fontMinSize); + int floatFontMinSize = _CoordinateSystemUtils::ConvertToFloat(fontMinSize); + SysTryReturn(NID_UI_CTRL, size >= floatFontMinSize, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The invalid size is given."); + + r = _pEditPresenter->SetTextSize(size); + + __textSize = size; + + return r; +} + +Variant +_Edit::GetPropertyTextSize(void) const +{ + return Variant(__textSize); +} + +result +_Edit::SetPropertyNormalTextColor(const Variant& color) +{ + __color[EDIT_STATUS_NORMAL].textColor = color.ToColor(); + + return E_SUCCESS; +} + +Variant +_Edit::GetPropertyNormalTextColor(void) const +{ + return Variant(__color[EDIT_STATUS_NORMAL].textColor); +} + +result +_Edit::SetPropertyHighlightedTextColor(const Variant& color) +{ + __color[EDIT_STATUS_HIGHLIGHTED].textColor = color.ToColor(); + + return E_SUCCESS; +} + +Variant +_Edit::GetPropertyHighlightedTextColor(void) const +{ + return Variant(__color[EDIT_STATUS_HIGHLIGHTED].textColor); +} + +result +_Edit::SetPropertyPressedTextColor(const Variant& color) +{ + __color[EDIT_STATUS_PRESSED].textColor = color.ToColor(); + + return E_SUCCESS; +} + +Variant +_Edit::GetPropertyPressedTextColor(void) const +{ + return Variant(__color[EDIT_STATUS_PRESSED].textColor); +} + +result +_Edit::SetPropertyKeypadEnabled(const Variant& enabled) +{ + _pEditPresenter->SetKeypadEnabled(enabled.ToBool()); + + return E_SUCCESS; +} + +Variant +_Edit::GetPropertyKeypadEnabled(void) const +{ + return Variant(_pEditPresenter->IsKeypadEnabled()); +} + +result +_Edit::SetPropertyKeypadStyle(const Variant& style) +{ + if (!(GetEditStyle() & EDIT_STYLE_SINGLE_LINE)) + { + SysTryReturn(NID_UI_CTRL, (KEYPAD_STYLE_PASSWORD != (KeypadStyle) style.ToInt()), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The invalid argument is given."); + } + + return _pEditPresenter->SetKeypadStyle((KeypadStyle) style.ToInt()); +} + +Variant +_Edit::GetPropertyKeypadStyle(void) const +{ + return Variant((int) _pEditPresenter->GetKeypadStyle()); +} + +result +_Edit::SetPropertyLowerCaseModeEnabled(const Variant& enabled) +{ + _pEditPresenter->SetLowerCaseModeEnabled(enabled.ToBool()); + + return E_SUCCESS; +} + +Variant +_Edit::GetPropertyLowerCaseModeEnabled(void) const +{ + return Variant(_pEditPresenter->IsLowerCaseModeEnabled()); +} + +result +_Edit::SetPropertyOverlayKeypadCommandButtonVisible(const Variant& visible) +{ + return _pEditPresenter->SetKeypadCommandButtonVisible(visible.ToBool()); +} + +Variant +_Edit::GetPropertyOverlayKeypadCommandButtonVisible(void) const +{ + return Variant(_pEditPresenter->IsKeypadCommandButtonVisible()); +} + +result +_Edit::SetPropertyText(const Variant& text) +{ + return _pEditPresenter->SetText(text.ToString()); +} + +Variant +_Edit::GetPropertyText(void) const +{ + return Variant(_pEditPresenter->GetText()); +} + +result +_Edit::SetPropertyViewModeEnabled(const Variant& enabled) +{ + return _pEditPresenter->SetViewModeEnabled(enabled.ToBool()); +} + +Variant +_Edit::GetPropertyViewModeEnabled(void) const +{ + return Variant(_pEditPresenter->IsViewModeEnabled(false)); +} + +result +_Edit::SetPropertyAutoLinkMask(const Variant& autoLinks) +{ + SysTryReturn(NID_UI_CTRL, (__inputStyle == INPUT_STYLE_OVERLAY), E_UNSUPPORTED_OPERATION, E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] The current state unable to this operation."); + + return _pEditPresenter->SetAutoLinkMask(autoLinks.ToULong()); +} + +Variant +_Edit::GetPropertyAutoLinkMask(void) const +{ + SysTryReturn(NID_UI_CTRL, (__inputStyle == INPUT_STYLE_OVERLAY), Variant((unsigned long) LINK_TYPE_NONE), E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] The current state unable to this operation."); + + return Variant(_pEditPresenter->GetAutoLinkMask()); +} + +result +_Edit::SetPropertyTitleText(const Variant& titleText) +{ + return _pEditPresenter->SetTitleText(titleText.ToString()); +} + +Variant +_Edit::GetPropertyTitleText(void) const +{ + return Variant(_pEditPresenter->GetTitleText()); +} + +result +_Edit::SetPropertyNormalTitleTextColor(const Variant& color) +{ + __color[EDIT_STATUS_NORMAL].titleTextColor = color.ToColor(); + + return E_SUCCESS; +} + +Variant +_Edit::GetPropertyNormalTitleTextColor(void) const +{ + return Variant(__color[EDIT_STATUS_NORMAL].titleTextColor); +} + +result +_Edit::SetPropertyDisabledTitleTextColor(const Variant& color) +{ + __color[EDIT_STATUS_DISABLED].titleTextColor = color.ToColor(); + + return E_SUCCESS; +} + +Variant +_Edit::GetPropertyDisabledTitleTextColor(void) const +{ + return Variant(__color[EDIT_STATUS_DISABLED].titleTextColor); +} + +result +_Edit::SetPropertyHighlightedTitleTextColor(const Variant& color) +{ + __color[EDIT_STATUS_HIGHLIGHTED].titleTextColor = color.ToColor(); + + return E_SUCCESS; +} + +Variant +_Edit::GetPropertyHighlightedTitleTextColor(void) const +{ + return Variant(__color[EDIT_STATUS_HIGHLIGHTED].titleTextColor); +} + +result +_Edit::SetPropertyPressedTitleTextColor(const Variant& color) +{ + __color[EDIT_STATUS_PRESSED].titleTextColor = color.ToColor(); + + return E_SUCCESS; +} + +Variant +_Edit::GetPropertyPressedTitleTextColor(void) const +{ + return Variant(__color[EDIT_STATUS_PRESSED].titleTextColor); +} + +result +_Edit::SetPropertyBlockedTextColor(const Variant& color) +{ + __blockTextColor.blockTextColor = color.ToColor(); + __blockTextColor.used = true; + + return E_SUCCESS; +} + +Variant +_Edit::GetPropertyBlockedTextColor(void) const +{ + return Variant(__blockTextColor.blockTextColor); +} + +result +_Edit::SetPropertyTopMargin(const Variant& margin) +{ + SysTryReturn(NID_UI_CTRL, margin.ToFloat() > 0.0f, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The invalid argument is given."); + + __topMargin = margin.ToFloat(); + + return E_SUCCESS; +} + +Variant +_Edit::GetPropertyTopMargin(void) const +{ + return Variant(__topMargin); +} + +result +_Edit::SetPropertyBottomMargin(const Variant& margin) +{ + SysTryReturn(NID_UI_CTRL, margin.ToFloat() > 0.0f, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The invalid argument is given."); + + __bottomMargin = margin.ToFloat(); + + return E_SUCCESS; +} + +Variant +_Edit::GetPropertyBottomMargin(void) const +{ + return Variant(__bottomMargin); +} + +result +_Edit::SetPropertyLeftMargin(const Variant& margin) +{ + SysTryReturn(NID_UI_CTRL, margin.ToFloat() > 0.0f, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The invalid argument is given."); + + __leftMargin = margin.ToFloat(); + + return E_SUCCESS; +} + +Variant +_Edit::GetPropertyLeftMargin(void) const +{ + return Variant(__leftMargin); +} + +result +_Edit::SetPropertyRightMargin(const Variant& margin) +{ + SysTryReturn(NID_UI_CTRL, margin.ToFloat() > 0.0f, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The invalid argument is given."); + + __rightMargin = margin.ToFloat(); + + return E_SUCCESS; +} + +Variant +_Edit::GetPropertyRightMargin(void) const +{ + return Variant(__rightMargin); +} + +bool +_Edit::ValidatePastedText(const String& pastedText, String& replacedText) +{ + bool enable = false; + if (__pTextFilter) + { + enable = __pTextFilter->ValidatePastedText(pastedText, replacedText); + } + + return enable; +} + +void +_Edit::SetEditTextFilter(IEditTextFilter* pFilter) +{ + __pTextFilter = pFilter; + _pEditPresenter->SetEditTextFilter(this); + + return; +} + +void +_Edit::SendOpaqueCommand(const String& command) +{ + _pEditPresenter->SendOpaqueCommand(command); + + return; +} + +void +_Edit::OnSettingChanged(String& key) +{ + const wchar_t* LOCALE_LANGUAGE = L"http://tizen.org/setting/locale.language"; + if (key == LOCALE_LANGUAGE) + { + _pEditPresenter->UpdateKeypadCommandString(); + } +} + +void +_Edit::OnDrawFocus(void) +{ + Invalidate(); + + return; +} + +_Window* +_Edit::OnDragAndDropBeginning(void) +{ + return _pEditPresenter->OnDragAndDropBeginning(); +} +void +_Edit::OnDragAndDropDropping(void) +{ + return _pEditPresenter->OnDragAndDropDropping(); +} + +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* +_Edit::GetTextAccessibilityElement(void) const +{ + return __pTextAccessibilityElement; +} + +result +_Edit::SetPasswordVisible(bool visible) +{ + return _pEditPresenter->SetPasswordVisible(visible); +} + +bool +_Edit::IsPasswordVisible(void) const +{ + return _pEditPresenter->IsPasswordVisible(); +} + +bool +_Edit::IsClearIconPressed(void) const +{ + return _pEditPresenter->IsClearIconPressed(); +} + +void +_Edit::SetTextEventEnabled(bool enable) +{ + __isTextEventEnabled = enable; + return; +} + +bool +_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 new file mode 100644 index 0000000..c0f1d31 --- /dev/null +++ b/src/ui/controls/FUiCtrl_EditAreaImpl.cpp @@ -0,0 +1,1940 @@ +// +// 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_EditAreaImpl.cpp + * @brief This is the implementation file for _EditAreaImpl class. + */ + +#include +#include +#include +#include +#include +#include +#include +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_ResourceSizeInfo.h" +#include "FUi_ResourceManager.h" +#include "FUi_UiBuilder.h" +#include "FUiCtrl_EditAreaImpl.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Base::Utility; +using namespace Tizen::Graphics; +using namespace Tizen::Locales; + +namespace Tizen { namespace Ui { namespace Controls +{ + +Dimension +_EditAreaImpl::EditAreaSizeInfo::GetDefaultMinimumSize(_ControlOrientation orientation) const +{ + result r = E_SUCCESS; + Dimension editAreaMinimumSize(0, 0); + + r = GET_DIMENSION_CONFIG(EDIT::MIN_SIZE, orientation, editAreaMinimumSize); + SysTryReturn(NID_UI, r == E_SUCCESS, editAreaMinimumSize, r, "System Error occurred."); + + return editAreaMinimumSize; +} + +FloatDimension +_EditAreaImpl::EditAreaSizeInfo::GetDefaultMinimumSizeF(_ControlOrientation orientation) const +{ + result r = E_SUCCESS; + FloatDimension editAreaMinimumSize(0.0f, 0.0f); + + r = GET_DIMENSION_CONFIG(EDIT::MIN_SIZE, orientation, editAreaMinimumSize); + SysTryReturn(NID_UI, r == E_SUCCESS, editAreaMinimumSize, r, "System Error occurred."); + + return editAreaMinimumSize; +} + +_EditAreaImpl* +_EditAreaImpl::GetInstance(EditArea& editArea) +{ + return (static_cast<_EditAreaImpl*> (editArea._pControlImpl)); +} + +const _EditAreaImpl* +_EditAreaImpl::GetInstance(const EditArea& editArea) +{ + return (static_cast (editArea._pControlImpl)); +} + +_EditAreaImpl::_EditAreaImpl(EditArea* pPublic, _Edit* pCore) + : _ControlImpl(pPublic, pCore) + , __pEdit(pCore) + , __inputModeCategory(EDIT_INPUTMODE_ALPHA | EDIT_INPUTMODE_PREDICTIVE | EDIT_INPUTMODE_NUMERIC | EDIT_INPUTMODE_SYMBOL) + , __currentInputMode(EDIT_INPUTMODE_ALPHA) + , __pPublicActionEvent(null) + , __pPublicKeypadEvent(null) + , __pPublicLanguageEvent(null) + , __pPublicLinkEvent(null) + , __pPublicScrollPanelEvent(null) + , __pPublicTextBlockEvent(null) + , __pPublicTextEvent(null) + , __autoLinkMask(LINK_TYPE_NONE) +{ +} + +_EditAreaImpl::~_EditAreaImpl(void) +{ + if (__pEdit) + { + __pEdit->RemoveActionEventListener(*this); + __pEdit->RemoveLanguageEventListener(*this); + __pEdit->RemoveKeypadEventListener(*this); + __pEdit->RemoveTextBlockEventListener(*this); + __pEdit->RemoveTextEventListener(*this); + __pEdit->RemoveUiLinkEventListener(*this); + if (__pEdit->GetInputStyle() == INPUT_STYLE_OVERLAY) + { + __pEdit->RemoveScrollPanelEventListener(*this); + } + } + + if (__pPublicActionEvent) + { + delete __pPublicActionEvent; + __pPublicActionEvent = null; + } + + if (__pPublicKeypadEvent) + { + delete __pPublicKeypadEvent; + __pPublicKeypadEvent = null; + } + + if (__pPublicTextBlockEvent) + { + delete __pPublicTextBlockEvent; + __pPublicTextBlockEvent = null; + } + + if (__pPublicLinkEvent) + { + delete __pPublicLinkEvent; + __pPublicLinkEvent = null; + } + + if (__pPublicLanguageEvent) + { + delete __pPublicLanguageEvent; + __pPublicLanguageEvent = null; + } + + if (__pPublicScrollPanelEvent) + { + delete __pPublicScrollPanelEvent; + __pPublicScrollPanelEvent = null; + } + + if (__pPublicTextEvent) + { + delete __pPublicTextEvent; + __pPublicTextEvent = null; + } +} + +_EditAreaImpl* +_EditAreaImpl::CreateEditAreaImplN(EditArea* pControl, const Rectangle& rect) +{ + ClearLastResult(); + result r = E_SUCCESS; + + _Edit* pCore = null; + + pCore = _Edit::CreateEditN(); + SysTryReturn(NID_UI_CTRL, pCore, null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _EditAreaImpl* pImpl = new (std::nothrow) _EditAreaImpl(pControl, pCore); + + r = CheckConstruction(pCore, pImpl); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + return pImpl; +} + +_EditAreaImpl* +_EditAreaImpl::CreateEditAreaImplN(EditArea* pControl, const Tizen::Graphics::FloatRectangle& rect) +{ + // To do: Check if it can be removed, Now it's almost same as CreateEditAreaImplN + ClearLastResult(); + result r = E_SUCCESS; + + _Edit* pCore = null; + + pCore = _Edit::CreateEditN(); + SysTryReturn(NID_UI_CTRL, pCore, null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _EditAreaImpl* pImpl = new (std::nothrow) _EditAreaImpl(pControl, pCore); + + r = CheckConstruction(pCore, pImpl); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + return pImpl; +} + +const char* +_EditAreaImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Controls::EditArea"; +} + +const EditArea& +_EditAreaImpl::GetPublic(void) const +{ + return static_cast (_ControlImpl::GetPublic()); +} + +EditArea& +_EditAreaImpl::GetPublic(void) +{ + return static_cast (_ControlImpl::GetPublic()); +} + +const _Edit& +_EditAreaImpl::GetCore(void) const +{ + return static_cast (_ControlImpl::GetCore()); +} + +_Edit& +_EditAreaImpl::GetCore(void) +{ + return static_cast <_Edit&>(_ControlImpl::GetCore()); +} + +result +_EditAreaImpl::Initialize(InputStyle inputStyle, int limitLength) +{ + 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())); + + if (!_AppInfo::IsOspCompat()) + { + __pEdit->SetKeypadCommandButtonVisible(false); + } + + __pPublicActionEvent = _PublicActionEvent::CreateInstanceN(GetPublic()); + 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] 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] 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] 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] 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] Memory allocation failed."); + + if (inputStyle == INPUT_STYLE_OVERLAY) + { + r = __pEdit->AddScrollPanelEventListener(*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] Memory allocation failed."); + + r = __pEdit->AddUiLinkEventListener(*this); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (inputStyle == INPUT_STYLE_OVERLAY) + { + __pEdit->SetAutoLinkMask(LINK_TYPE_URL | LINK_TYPE_EMAIL | LINK_TYPE_TEL_NUM); + } + + return r; +} + +HorizontalAlignment +_EditAreaImpl::GetTextAlignment(void) const +{ + return __pEdit->GetTextAlignment(); +} + +result +_EditAreaImpl::SetTextAlignment(HorizontalAlignment alignment) +{ + return __pEdit->SetTextAlignment(alignment); +} + +bool +_EditAreaImpl::IsViewModeEnabled(void) const +{ + return __pEdit->GetPropertyViewModeEnabled().ToBool(); +} + +result +_EditAreaImpl::SetViewModeEnabled(bool enable) +{ + Variant variantEnable(enable); + + return __pEdit->SetPropertyViewModeEnabled(variantEnable); +} + +result +_EditAreaImpl::SetAutoLinkMask(unsigned long autoLinks) +{ + result r = E_SUCCESS; + Variant variantAutoLinks(autoLinks); + + r = __pEdit->SetPropertyAutoLinkMask(variantAutoLinks); + + if (r == E_SUCCESS) + { + __autoLinkMask = autoLinks; + } + + return r; + +} + +unsigned long +_EditAreaImpl::GetAutoLinkMask(void) const +{ + SysTryReturn(NID_UI_CTRL, (__pEdit->GetInputStyle() == INPUT_STYLE_OVERLAY), LINK_TYPE_NONE, E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] The current state unable to this operation."); + return __autoLinkMask; +} + +int +_EditAreaImpl::GetLineSpacing(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetLineSpacingF()); +} + +float +_EditAreaImpl::GetLineSpacingF(void) const +{ + return __pEdit->GetLineSpacingF(); +} + +result +_EditAreaImpl::SetLineSpacing(int multiplier, int extra) +{ + return SetLineSpacing(multiplier, _CoordinateSystemUtils::ConvertToFloat(extra)); +} + +result +_EditAreaImpl::SetLineSpacing(int multiplier, float extra) +{ + SysTryReturn(NID_UI_CTRL, multiplier >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The invalid argument is given."); + SysTryReturn(NID_UI_CTRL, extra >= 0.0f, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The invalid argument is given."); + + return __pEdit->SetLineSpacing(DEFAULT_LINE_SPACE * multiplier + extra); +} + +int +_EditAreaImpl::GetMargin(EditMarginType marginType) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetMarginF(marginType)); +} + +float +_EditAreaImpl::GetMarginF(EditMarginType marginType) const +{ + if (marginType == EDIT_MARGIN_TYPE_VERTICAL) + { + return __pEdit->GetVerticalMarginF(EDIT_TEXT_TOP_MARGIN); + } + else + { + return __pEdit->GetHorizontalMarginF(EDIT_TEXT_LEFT_MARGIN); + } +} + +result +_EditAreaImpl::SetMargin(EditMarginType marginType, int margin) +{ + return SetMargin(marginType, _CoordinateSystemUtils::ConvertToFloat(margin)); +} + +result +_EditAreaImpl::SetMargin(EditMarginType marginType, float margin) +{ + result r = E_SUCCESS; + Variant varMargin(margin); + + if (marginType == EDIT_MARGIN_TYPE_HORIZONTAL) + { + r = __pEdit->SetHorizontalMargin(margin, EDIT_TEXT_LEFT_MARGIN); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + r = __pEdit->SetHorizontalMargin(margin, EDIT_TEXT_RIGHT_MARGIN); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + r = __pEdit->SetVerticalMargin(margin, EDIT_TEXT_TOP_MARGIN); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + r = __pEdit->SetVerticalMargin(margin, EDIT_TEXT_BOTTOM_MARGIN); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + return r; +} + +result +_EditAreaImpl::SetKeypadActionEnabled(bool enable) +{ + Variant variantEnable(enable); + + return __pEdit->SetPropertyKeypadActionEnabled(variantEnable); +} + +bool +_EditAreaImpl::IsKeypadActionEnabled(void) const +{ + return __pEdit->GetPropertyKeypadActionEnabled().ToBool(); +} + +KeypadAction +_EditAreaImpl::GetKeypadAction(void) const +{ + int coreKeypadAction = __pEdit->GetPropertyKeypadAction().ToInt(); + KeypadAction publicKeypadAction = KEYPAD_ACTION_ENTER; + + switch (coreKeypadAction) + { + case CORE_KEYPAD_ACTION_ENTER: + publicKeypadAction = KEYPAD_ACTION_ENTER; + break; + + case CORE_KEYPAD_ACTION_GO: + publicKeypadAction = KEYPAD_ACTION_GO; + break; + + case CORE_KEYPAD_ACTION_NEXT: + publicKeypadAction = KEYPAD_ACTION_NEXT; + break; + + case CORE_KEYPAD_ACTION_SEND: + publicKeypadAction = KEYPAD_ACTION_SEND; + break; + + case CORE_KEYPAD_ACTION_SEARCH: + publicKeypadAction = KEYPAD_ACTION_SEARCH; + break; + + case CORE_KEYPAD_ACTION_LOGIN: + publicKeypadAction = KEYPAD_ACTION_LOGIN; + break; + + case CORE_KEYPAD_ACTION_SIGN_IN: + publicKeypadAction = KEYPAD_ACTION_SIGN_IN; + break; + + case CORE_KEYPAD_ACTION_JOIN: + publicKeypadAction = KEYPAD_ACTION_JOIN; + break; + + case CORE_KEYPAD_ACTION_DONE: + publicKeypadAction = KEYPAD_ACTION_DONE; + break; + + default: + break; + } + + return publicKeypadAction; +} + +result +_EditAreaImpl::SetKeypadAction(KeypadAction keypadAction) +{ + CoreKeypadAction coreKeypadAction = CORE_KEYPAD_ACTION_ENTER; + + switch (keypadAction) + { + case KEYPAD_ACTION_ENTER: + coreKeypadAction = CORE_KEYPAD_ACTION_ENTER; + break; + + case KEYPAD_ACTION_GO: + coreKeypadAction = CORE_KEYPAD_ACTION_GO; + break; + + case KEYPAD_ACTION_NEXT: + coreKeypadAction = CORE_KEYPAD_ACTION_NEXT; + break; + + case KEYPAD_ACTION_SEND: + coreKeypadAction = CORE_KEYPAD_ACTION_SEND; + break; + + case KEYPAD_ACTION_SEARCH: + coreKeypadAction = CORE_KEYPAD_ACTION_SEARCH; + break; + + case KEYPAD_ACTION_LOGIN: + coreKeypadAction = CORE_KEYPAD_ACTION_LOGIN; + break; + + case KEYPAD_ACTION_SIGN_IN: + coreKeypadAction = CORE_KEYPAD_ACTION_SIGN_IN; + break; + + case KEYPAD_ACTION_JOIN: + coreKeypadAction = CORE_KEYPAD_ACTION_JOIN; + break; + + case KEYPAD_ACTION_DONE: + coreKeypadAction = CORE_KEYPAD_ACTION_DONE; + break; + + default: + break; + } + + Variant variantKeypadAction((int)coreKeypadAction); + + return __pEdit->SetPropertyKeypadAction(variantKeypadAction); +} + +KeypadStyle +_EditAreaImpl::GetKeypadStyle(void) const +{ + return (KeypadStyle)__pEdit->GetPropertyKeypadStyle().ToInt(); +} + +result +_EditAreaImpl::SetKeypadStyle(KeypadStyle keypadStyle) +{ + Variant variantKeypadStyle((int)keypadStyle); + + return __pEdit->SetPropertyKeypadStyle(variantKeypadStyle); +} + +result +_EditAreaImpl::SetOverlayKeypadCommandButtonVisible(bool visible) +{ + Variant variantVisible(visible); + + return __pEdit->SetPropertyOverlayKeypadCommandButtonVisible(variantVisible); +} + +bool +_EditAreaImpl::IsOverlayCommandButtonVisible(void) const +{ + return __pEdit->GetPropertyOverlayKeypadCommandButtonVisible().ToBool(); +} + +result +_EditAreaImpl::HideKeypad(void) +{ + return __pEdit->HideKeypad(); +} + +int +_EditAreaImpl::GetTextSize(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetTextSizeF()); +} + +float +_EditAreaImpl::GetTextSizeF(void) const +{ + return __pEdit->GetPropertyTextSize().ToFloat(); +} + +result +_EditAreaImpl::SetTextSize(int size) +{ + return SetTextSize(_CoordinateSystemUtils::ConvertToFloat(size)); +} + +result +_EditAreaImpl::SetTextSize(float size) +{ + Variant variantSize(size); + + return __pEdit->SetPropertyTextSize(variantSize); +} + +Color +_EditAreaImpl::GetColor(EditStatus status) const +{ + Color color; + + switch (status) + { + case EDIT_STATUS_NORMAL: + color = __pEdit->GetPropertyNormalColor().ToColor(); + break; + + case EDIT_STATUS_DISABLED: + color = __pEdit->GetPropertyDisabledColor().ToColor(); + break; + + case EDIT_STATUS_HIGHLIGHTED: + color = __pEdit->GetPropertyHighlightedColor().ToColor(); + break; + + case EDIT_STATUS_PRESSED: + color = __pEdit->GetPropertyPressedColor().ToColor(); + break; + + default: + break; + } + + return color; +} + +Color +_EditAreaImpl::GetTextColor(EditTextColor type) const +{ + return __pEdit->GetTextColor(type); +} + +result +_EditAreaImpl::SetBackgroundBitmap(EditStatus status, const Bitmap& bitmap) +{ + return __pEdit->SetBackgroundBitmap(status, bitmap); +} + +result +_EditAreaImpl::SetColor(EditStatus status, const Color& color) +{ + result r = E_SUCCESS; + Variant variantColor(color); + + switch (status) + { + case EDIT_STATUS_NORMAL: + r = __pEdit->SetPropertyNormalColor(variantColor); + break; + + case EDIT_STATUS_DISABLED: + r = __pEdit->SetPropertyDisabledColor(variantColor); + break; + + case EDIT_STATUS_HIGHLIGHTED: + r = __pEdit->SetPropertyHighlightedColor(variantColor); + break; + + case EDIT_STATUS_PRESSED: + r = __pEdit->SetPropertyPressedColor(variantColor); + break; + + default: + r = E_INVALID_ARG; + break; + } + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Unable to set color.", GetErrorMessage(r)); + + return r; +} + +result +_EditAreaImpl::SetTextColor(EditTextColor type, const Color& color) +{ + return __pEdit->SetTextColor(type, color); +} + +String +_EditAreaImpl::GetText(int start, int end) const +{ + return __pEdit->GetText(start, end); +} + +result +_EditAreaImpl::AddUiLinkEventListener(IUiLinkEventListener& listener) +{ + ClearLastResult(); + SysAssertf(__pPublicLinkEvent != null, "Not yet constructed. Construct() should be called before use."); + + return __pPublicLinkEvent->AddListener(listener); +} + +result +_EditAreaImpl::RemoveUiLinkEventListener(IUiLinkEventListener& listener) +{ + ClearLastResult(); + SysAssertf(__pPublicLinkEvent != null, "Not yet constructed. Construct() should be called before use."); + + return __pPublicLinkEvent->RemoveListener(listener); +} + +result +_EditAreaImpl::AddKeypadEventListener(IKeypadEventListener& listener) +{ + ClearLastResult(); + SysAssertf(__pPublicKeypadEvent != null, "Not yet constructed. Construct() should be called before use."); + + return __pPublicKeypadEvent->AddListener(listener); +} + +result +_EditAreaImpl::RemoveKeypadEventListener(IKeypadEventListener& listener) +{ + ClearLastResult(); + SysAssertf(__pPublicKeypadEvent != null, "Not yet constructed. Construct() should be called before use."); + + return __pPublicKeypadEvent->RemoveListener(listener); +} + +result +_EditAreaImpl::AddTextBlockEventListener(ITextBlockEventListener& listener) +{ + ClearLastResult(); + SysAssertf(__pPublicTextBlockEvent != null, "Not yet constructed. Construct() should be called before use."); + + return __pPublicTextBlockEvent->AddListener(listener); +} + +result +_EditAreaImpl::RemoveTextBlockEventListener(ITextBlockEventListener& listener) +{ + ClearLastResult(); + SysAssertf(__pPublicTextBlockEvent != null, "Not yet constructed. Construct() should be called before use."); + + return __pPublicTextBlockEvent->RemoveListener(listener); +} + +result +_EditAreaImpl::AddTextEventListener(ITextEventListener& listener) +{ + ClearLastResult(); + SysAssertf(__pPublicTextEvent != null, "Not yet constructed. Construct() should be called before use."); + + return __pPublicTextEvent->AddListener(listener); +} + +result +_EditAreaImpl::RemoveTextEventListener(ITextEventListener& listener) +{ + ClearLastResult(); + SysAssertf(__pPublicTextEvent != null, "Not yet constructed. Construct() should be called before use."); + + return __pPublicTextEvent->RemoveListener(listener); +} + +result +_EditAreaImpl::AddScrollPanelEventListener(IScrollPanelEventListener& listener) +{ + ClearLastResult(); + SysTryReturn(NID_UI_CTRL, (__pEdit->GetInputStyle() == INPUT_STYLE_OVERLAY), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred.") + SysAssertf(__pPublicScrollPanelEvent != null, "Not yet constructed. Construct() should be called before use."); + + return __pPublicScrollPanelEvent->AddListener(listener); +} + +result +_EditAreaImpl::RemoveScrollPanelEventListener(IScrollPanelEventListener& listener) +{ + ClearLastResult(); + SysAssertf(__pPublicScrollPanelEvent != null, "Not yet constructed. Construct() should be called before use."); + + return __pPublicScrollPanelEvent->RemoveListener(listener); +} + +result +_EditAreaImpl::AddActionEventListener(IActionEventListener& listener) +{ + ClearLastResult(); + SysAssertf(__pPublicActionEvent != null, "Not yet constructed. Construct() should be called before use."); + + return __pPublicActionEvent->AddListener(listener); +} + +result +_EditAreaImpl::RemoveActionEventListener(IActionEventListener& listener) +{ + ClearLastResult(); + SysAssertf(__pPublicActionEvent != null, "Not yet constructed. Construct() should be called before use."); + + return __pPublicActionEvent->RemoveListener(listener); +} + +result +_EditAreaImpl::AddLanguageEventListener(ILanguageEventListener& listener) +{ + ClearLastResult(); + SysAssertf(__pPublicLanguageEvent != null, "Not yet constructed. Construct() should be called before use."); + + return __pPublicLanguageEvent->AddListener(listener); +} + +result +_EditAreaImpl::RemoveLanguageEventListener(ILanguageEventListener& listener) +{ + ClearLastResult(); + SysAssertf(__pPublicLanguageEvent != null, "Not yet constructed. Construct() should be called before use."); + + return __pPublicLanguageEvent->RemoveListener(listener); +} + +int +_EditAreaImpl::GetRemainingLength(void) const +{ + return __pEdit->GetRemainingLength(); +} + +void +_EditAreaImpl::SetLowerCaseModeEnabled(bool enable) +{ + Variant variantEnable(enable); + + __pEdit->SetPropertyLowerCaseModeEnabled(variantEnable); +} + +bool +_EditAreaImpl::IsLowerCaseModeEnabled(void) const +{ + return __pEdit->GetPropertyLowerCaseModeEnabled().ToBool(); +} + +result +_EditAreaImpl::SetInputModeCategory(unsigned long categories, bool enable) +{ + result r = E_SUCCESS; + const unsigned long INPUT_MODE_ALL_MASK = EDIT_INPUTMODE_ALPHA | EDIT_INPUTMODE_PREDICTIVE | EDIT_INPUTMODE_NUMERIC| EDIT_INPUTMODE_SYMBOL; + KeypadStyle keypadStyle = GetKeypadStyle(); + + switch (keypadStyle) + { + case KEYPAD_STYLE_NUMBER: + // fall through + case KEYPAD_STYLE_IP_V4: + if (enable) + { + if (categories & (EDIT_INPUTMODE_ALPHA | EDIT_INPUTMODE_PREDICTIVE | EDIT_INPUTMODE_SYMBOL)) + { + SysLogException(NID_UI_CTRL, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The current keypad style can not support given categories."); + + return E_INVALID_OPERATION; + } + } + else + { + if (categories & EDIT_INPUTMODE_NUMERIC) + { + SysLogException(NID_UI_CTRL, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The current keypad style can not support given categories."); + + return E_INVALID_OPERATION; + } + } + break; + + case KEYPAD_STYLE_PHONE_NUMBER: + if (enable) + { + if (categories & (EDIT_INPUTMODE_ALPHA | EDIT_INPUTMODE_PREDICTIVE)) + { + SysLogException(NID_UI_CTRL, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The current keypad style can not support given categories."); + + return E_INVALID_OPERATION; + } + + if (!((categories & EDIT_INPUTMODE_NUMERIC) && (categories & EDIT_INPUTMODE_SYMBOL))) + { + SysLogException(NID_UI_CTRL, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The current keypad style can not support given categories."); + + return E_INVALID_OPERATION; + } + } + else + { + if (categories & (EDIT_INPUTMODE_NUMERIC | EDIT_INPUTMODE_SYMBOL)) + { + SysLogException(NID_UI_CTRL, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The current keypad style can not support given categories."); + + return E_INVALID_OPERATION; + } + } + break; + + default: + break; + } + + if (((enable == true) && (categories == 0)) || ((enable == false) && (categories == INPUT_MODE_ALL_MASK))) + { + SysLogException(NID_UI_CTRL, E_INVALID_ARG, "[E_INVALID_ARG] All input modes cannot be disabled."); + + return E_INVALID_ARG; + } + + if ((enable == false) && (categories & __currentInputMode)) + { + SysLogException(NID_UI_CTRL, E_INVALID_ARG, "[E_INVALID_ARG] The current input modes cannot be disabled."); + + return E_INVALID_ARG; + } + + if (enable) + { + __inputModeCategory = categories; + if ((~categories) & EDIT_INPUTMODE_PREDICTIVE) + { + __pEdit->SetTextPredictionEnabled(false); + } + } + else + { + __inputModeCategory = (~categories & INPUT_MODE_ALL_MASK); + if (categories == EDIT_INPUTMODE_PREDICTIVE) + { + __pEdit->SetTextPredictionEnabled(false); + } + } + + // if currentInputModeCategory doesn't exist in categories, then set tempInputMode. + if (!(categories & __currentInputMode)) + { + const int INPUT_MODE_CATEGORY_MAX = 4; + EditInputModeCategory newInputMode = __currentInputMode; + EditInputModeCategory tempInputMode = EDIT_INPUTMODE_ALPHA; + for (int i = 0; i < INPUT_MODE_CATEGORY_MAX; i++) + { + if ((categories & tempInputMode) && (tempInputMode != EDIT_INPUTMODE_PREDICTIVE)) + { + newInputMode = tempInputMode; + break; + } + + switch (tempInputMode) + { + case EDIT_INPUTMODE_ALPHA: + tempInputMode = EDIT_INPUTMODE_PREDICTIVE; + break; + + case EDIT_INPUTMODE_PREDICTIVE: + tempInputMode = EDIT_INPUTMODE_NUMERIC; + break; + + case EDIT_INPUTMODE_NUMERIC: + tempInputMode = EDIT_INPUTMODE_SYMBOL; + break; + + default: + break; + } + } + + if (__currentInputMode != newInputMode) + { + r = SetCurrentInputModeCategory(newInputMode); + } + } + + return r; +} + +result +_EditAreaImpl::SetCurrentInputModeCategory(EditInputModeCategory inputModeCategory) +{ + KeypadStyle currentKeypadStyle = GetKeypadStyle(); + KeypadStyle keypadStyle = KEYPAD_STYLE_NORMAL; + + if (inputModeCategory == EDIT_INPUTMODE_NUMERIC) + { + if (currentKeypadStyle == KEYPAD_STYLE_NORMAL) + { + __pEdit->SetKeypadNormalNumberStyle(true); + } + else + { + keypadStyle = KEYPAD_STYLE_NUMBER; + Variant variantKeypadStyle((int)keypadStyle); + + __pEdit->SetPropertyKeypadStyle(variantKeypadStyle); + } + } + else if (inputModeCategory == EDIT_INPUTMODE_SYMBOL) + { + if (currentKeypadStyle == KEYPAD_STYLE_NORMAL) + { + __pEdit->SetKeypadNormalNumberStyle(true); + } + } + else if (inputModeCategory == EDIT_INPUTMODE_PREDICTIVE) + { + __pEdit->SetTextPredictionEnabled(true); + } + + __currentInputMode = inputModeCategory; + + return E_SUCCESS; +} + +unsigned long +_EditAreaImpl::GetInputModeCategory(void) const +{ + return __inputModeCategory; +} + +EditInputModeCategory +_EditAreaImpl::GetCurrentInputModeCategory(void) const +{ + return __currentInputMode; +} + +bool +_EditAreaImpl::IsTextPredictionEnabled(void) const +{ + return __pEdit->IsTextPredictionEnabled(); +} + +result +_EditAreaImpl::SetTextPredictionEnabled(bool enable) +{ + return __pEdit->SetTextPredictionEnabled(enable); +} + +result +_EditAreaImpl::SetCursorPosition(int position) +{ + Variant variantPosition(position); + + return __pEdit->SetPropertyCursorPosition(variantPosition); +} + +int +_EditAreaImpl::GetCursorPosition(void) const +{ + return __pEdit->GetPropertyCursorPosition().ToInt(); +} + +String +_EditAreaImpl::GetText(void) const +{ + return __pEdit->GetPropertyText().ToString(); +} + +int +_EditAreaImpl::GetTextLength(void) const +{ + return __pEdit->GetTextLength(); +} + +result +_EditAreaImpl::SetText(const String& text) +{ + Variant variantText(text); + + return __pEdit->SetPropertyText(variantText); +} + +result +_EditAreaImpl::InsertTextAtCursorPosition(const String& text) +{ + return __pEdit->InsertTextAtCursorPosition(text); +} + +result +_EditAreaImpl::AppendText(const String& text) +{ + return __pEdit->AppendText(text); +} + +result +_EditAreaImpl::AppendCharacter(const Character& character) +{ + return __pEdit->AppendCharacter(character); +} + +result +_EditAreaImpl::InsertTextAt(int position, const String& text, const Bitmap& textImage) +{ + return __pEdit->InsertTextAt(position, text, textImage); +} + +result +_EditAreaImpl::AppendText(const String& text, const Bitmap& textImage) +{ + return __pEdit->AppendText(text, textImage); +} + +result +_EditAreaImpl::Clear(void) +{ + return __pEdit->ClearText(); +} + +result +_EditAreaImpl::DeleteCharacterAtCursorPosition(void) +{ + return __pEdit->DeleteCharacterAtCursorPosition(); +} + +void +_EditAreaImpl::GetCurrentTextRange(int& start, int& end) const +{ + return __pEdit->GetCurrentTextRange(start, end); +} + +void +_EditAreaImpl::SetGuideText(const String& guideText) +{ + Variant variantGuideText(guideText); + + __pEdit->SetPropertyGuideText(variantGuideText); +} + +String +_EditAreaImpl::GetGuideText(void) const +{ + return __pEdit->GetPropertyGuideText().ToString(); +} + +Color +_EditAreaImpl::GetGuideTextColor(void) const +{ + return __pEdit->GetPropertyGuideTextColor().ToColor(); +} + +result +_EditAreaImpl::SetGuideTextColor(const Color& color) +{ + Variant variantColor(color); + + return __pEdit->SetPropertyGuideTextColor(variantColor); +} + +void +_EditAreaImpl::SetKeypadEnabled(bool enable) +{ + Variant variantEnable(enable); + + __pEdit->SetPropertyKeypadEnabled(variantEnable); + + return; +} + +bool +_EditAreaImpl::IsKeypadEnabled(void) const +{ + return __pEdit->GetPropertyKeypadEnabled().ToBool(); +} + +result +_EditAreaImpl::ShowKeypad(void) +{ + return __pEdit->ShowKeypad(); +} + +int +_EditAreaImpl::GetTextLineCount(void) const +{ + return __pEdit->GetTextLineCount(); +} + +void +_EditAreaImpl::GetBlockRange(int& start, int& end) const +{ + __pEdit->GetBlockRange(start, end); +} + +result +_EditAreaImpl::BeginBlock(void) +{ + return __pEdit->BeginTextBlock(); +} + +result +_EditAreaImpl::ReleaseBlock(void) +{ + return __pEdit->ReleaseTextBlock(); +} + +bool +_EditAreaImpl::IsBlocked(void) const +{ + return __pEdit->IsBlocked(); +} + +result +_EditAreaImpl::Copy(void) +{ + return __pEdit->CopyText(); +} + +result +_EditAreaImpl::Cut(void) +{ + return __pEdit->CutText(); +} + +result +_EditAreaImpl::Paste(void) +{ + return __pEdit->PasteText(); +} + +result +_EditAreaImpl::Remove(void) +{ + SysTryReturnResult(NID_UI_CTRL, (__pEdit->RemoveTextBlock() == E_SUCCESS), E_SYSTEM, "A system error has occurred"); + + return E_SUCCESS; +} + +bool +_EditAreaImpl::IsClipped(void) const +{ + return __pEdit->IsClipped(); +} + +result +_EditAreaImpl::SetOverlayKeypadCommandButton(CommandButtonPosition position, const String& text, int actionId) +{ + return __pEdit->SetKeypadCommandButton(position, text, actionId); +} + +String +_EditAreaImpl::GetOverlayKeypadCommandButtonText(CommandButtonPosition position) const +{ + return __pEdit->GetKeypadCommandButtonText(position); +} + +int +_EditAreaImpl::GetOverlayKeypadCommandButtonActionId(CommandButtonPosition position) const +{ + return __pEdit->GetKeypadCommandButtonActionId(position); +} + +result +_EditAreaImpl::SetCurrentLanguage(LanguageCode languageCode) +{ + return __pEdit->SetCurrentLanguage(languageCode); +} + +result +_EditAreaImpl::GetCurrentLanguage(LanguageCode& language) const +{ + return __pEdit->GetCurrentLanguage(language); +} + +result +_EditAreaImpl::OnBoundsChanged(const Rectangle& oldRect, const Rectangle& newRect) +{ + return E_SUCCESS; +} + +void +_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 allocation failed."); + + __pPublicTextEvent->Fire(*pEventArg); + } + else + { + SysLog(NID_UI_CTRL, "Event is not created."); + } +} + +void +_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 allocation failed."); + + __pPublicTextEvent->Fire(*pEventArg); + } + else + { + SysLog(NID_UI_CTRL, "Event is not created."); + } +} + +void +_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] Memory allocation failed."); + + __pPublicActionEvent->Fire(*pActionEventArg); + } + else + { + SysLog(NID_UI_CTRL, "Event is not created."); + } +} + +void +_EditAreaImpl::OnLinkClicked(_Control& source, const String& text, Utility::LinkType linkType, const String& link) +{ + if (__pPublicLinkEvent != null) + { + IEventArg* pLinkEventArg = _PublicLinkEvent::CreateLinkEventArgN(text, linkType, link); + SysTryReturnVoidResult(NID_UI_CTRL, pLinkEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + __pPublicLinkEvent->Fire(*pLinkEventArg); + } + else + { + SysLog(NID_UI_CTRL, "Event is not created."); + } +} + +void +_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] Memory allocation failed."); + + __pPublicTextBlockEvent->Fire(*pTextBlockEventArg); + } + else + { + SysLog(NID_UI_CTRL, "Event is not created."); + } +} + +void +_EditAreaImpl::OnKeypadWillOpen(void) +{ + if (__pPublicKeypadEvent) + { + 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] Memory allocation failed."); + + __pPublicKeypadEvent->Fire(*pKeypadEventArg); + } + else + { + SysLog(NID_UI_CTRL, "Event is not created."); + } +} + +void +_EditAreaImpl::OnKeypadOpened(void) +{ + if (__pPublicKeypadEvent) + { + 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] Memory allocation failed."); + + __pPublicKeypadEvent->Fire(*pKeypadEventArg); + } + else + { + SysLog(NID_UI_CTRL, "Event is not created."); + } +} + +void +_EditAreaImpl::OnKeypadClosed(void) +{ + if (__pPublicKeypadEvent) + { + 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] Memory allocation failed."); + + __pPublicKeypadEvent->Fire(*pKeypadEventArg); + } + else + { + SysLog(NID_UI_CTRL, "Event is not created."); + } +} + +void +_EditAreaImpl::OnKeypadBoundsChanged(void) +{ + if (__pPublicKeypadEvent) + { + 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] Memory allocation failed."); + + __pPublicKeypadEvent->Fire(*pKeypadEventArg); + } + else + { + SysLog(NID_UI_CTRL, "Event is not created."); + } +} + +void +_EditAreaImpl::OnKeypadActionPerformed(CoreKeypadAction keypadAction) +{ + if (__pPublicKeypadEvent) + { + KeypadAction onKeypadAction = KEYPAD_ACTION_ENTER; + switch (keypadAction) + { + case CORE_KEYPAD_ACTION_ENTER: + onKeypadAction = KEYPAD_ACTION_ENTER; + break; + + case CORE_KEYPAD_ACTION_GO: + onKeypadAction = KEYPAD_ACTION_GO; + break; + + case CORE_KEYPAD_ACTION_NEXT: + onKeypadAction = KEYPAD_ACTION_NEXT; + break; + + case CORE_KEYPAD_ACTION_SEND: + onKeypadAction = KEYPAD_ACTION_SEND; + break; + + case CORE_KEYPAD_ACTION_SEARCH: + onKeypadAction = KEYPAD_ACTION_SEARCH; + break; + + case CORE_KEYPAD_ACTION_LOGIN: + onKeypadAction = KEYPAD_ACTION_LOGIN; + break; + + case CORE_KEYPAD_ACTION_SIGN_IN: + onKeypadAction = KEYPAD_ACTION_SIGN_IN; + break; + + case CORE_KEYPAD_ACTION_JOIN: + onKeypadAction = KEYPAD_ACTION_JOIN; + break; + + case CORE_KEYPAD_ACTION_DONE: + onKeypadAction = KEYPAD_ACTION_DONE; + break; + + default: + break; + } + + IEventArg* pKeypadEventArg = _PublicKeypadEvent::CreateKeypadEventArgN( + GetPublic(), onKeypadAction, KEYPAD_EVENT_STATUS_ENTERACTION); + SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + __pPublicKeypadEvent->Fire(*pKeypadEventArg); + } + else + { + SysLog(NID_UI_CTRL, "Event is not created."); + } +} + +void +_EditAreaImpl::OnLanguageChanged(LanguageCode oldLanguage, LanguageCode newLanguage) +{ + if (__pPublicLanguageEvent) + { + IEventArg* pKLanguageEventArg = _PublicLanguageEvent::CreateLanguageEventArgN(GetPublic(), oldLanguage, newLanguage); + SysTryReturnVoidResult(NID_UI_CTRL, pKLanguageEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + __pPublicLanguageEvent->Fire(*pKLanguageEventArg); + } + else + { + SysLog(NID_UI_CTRL, "Event is not created."); + } +} + +void +_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] Memory allocation failed."); + + __pPublicScrollPanelEvent->Fire(*pEventArg); + } + else + { + SysLog(NID_UI_CTRL, "Event is not created."); + } +} + +void +_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] Memory allocation failed."); + + __pPublicScrollPanelEvent->Fire(*pEventArg); + } + else + { + SysLog(NID_UI_CTRL, "Event is not created."); + } +} + +void +_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] Memory allocation failed."); + + __pPublicScrollPanelEvent->Fire(*pEventArg); + } + else + { + SysLog(NID_UI_CTRL, "Event is not created."); + } +} + +void +_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] Memory allocation failed."); + + __pPublicScrollPanelEvent->Fire(*pEventArg); + } + else + { + SysLog(NID_UI_CTRL, "Event is not created."); + } +} + +void +_EditAreaImpl::SetEditTextFilter(IEditTextFilter* pFilter) +{ + __pEdit->SetEditTextFilter(pFilter); + + return; +} + +void +_EditAreaImpl::SendOpaqueCommand(const String& command) +{ + __pEdit->SendOpaqueCommand(command); + + return; +} + + +class _EditAreaMaker + : public _UiBuilderControlMaker +{ +public: + _EditAreaMaker(_UiBuilder* pUiBuilder) + : _UiBuilderControlMaker(pUiBuilder){}; + virtual ~_EditAreaMaker(){}; + static _UiBuilderControlMaker* GetInstance(_UiBuilder* pUiBuilder) + { + _EditAreaMaker* pEditAreaMaker = new (std::nothrow) _EditAreaMaker(pUiBuilder); + return pEditAreaMaker; + }; +protected: + virtual Control* Make(_UiBuilderControl* pControl) + { + result r = E_SYSTEM; + _UiBuilderControlLayout* pControlProperty = null; + EditArea* pEditArea = null; + FloatRectangle rect; + String elementString; + InputStyle inputStyle = INPUT_STYLE_FULLSCREEN; + int limitLength = EDIT_AREA_DEFAULT_LIMIT_LENGTH; + + KeypadStyle keypadStyle = KEYPAD_STYLE_NORMAL; + KeypadAction keypadAction = KEYPAD_ACTION_ENTER; + bool lowerCaseMode = false; + HorizontalAlignment horizontalAlignment = ALIGNMENT_LEFT; + bool viewModeEnable = false; + float fontSize = 0.0f; + Color color; + int opacity = EDIT_COLOR_OPACITY; + float horizontalMargin = 0.0f; + float verticalMargin = 0.0f; + + GetProperty(pControl, &pControlProperty); + if (pControlProperty == null) + { + return null; + } + + pEditArea = new (std::nothrow) EditArea(); + if (pEditArea == null) + { + return null; + } + + rect = pControlProperty->GetRectF(); + + if (pControl->GetElement(L"inputStyle", elementString) || pControl->GetElement(L"InputStyle", elementString)) + { + if (elementString.Equals(L"INPUT_STYLE_OVERLAY", false)) + { + inputStyle = INPUT_STYLE_OVERLAY; + } + else + { + inputStyle = INPUT_STYLE_FULLSCREEN; + } + } + + if (pControl->GetElement(L"limitLength", elementString)) + { + Base::Integer::Parse(elementString, limitLength); + } + + r = pEditArea->Construct(rect, inputStyle, limitLength); + if (r != E_SUCCESS) + { + delete pEditArea; + return null; + } + + if (pControl->GetElement(L"commandButtonVisible", elementString)) + { + if (elementString.Equals(L"true", false)) + { + pEditArea->SetOverlayKeypadCommandButtonVisible(true); + } + else + { + pEditArea->SetOverlayKeypadCommandButtonVisible(false); + } + } + + if (pControl->GetElement(L"text", elementString)) + { + r = pEditArea->SetText(elementString); + } + if (pControl->GetElement(L"guideText", elementString)) + { + pEditArea->SetGuideText(elementString); + } + + if (pControl->GetElement(L"keypadStyle", elementString)) + { + if (elementString.Equals(L"KEYPAD_STYLE_NORMAL", false)) + { + keypadStyle = KEYPAD_STYLE_NORMAL; + } + else if (elementString.Equals(L"KEYPAD_STYLE_PASSWORD", false)) + { + keypadStyle = KEYPAD_STYLE_PASSWORD; + } + else if (elementString.Equals(L"KEYPAD_STYLE_EMAIL", false)) + { + keypadStyle = KEYPAD_STYLE_EMAIL; + } + else if (elementString.Equals(L"KEYPAD_STYLE_URL", false)) + { + keypadStyle = KEYPAD_STYLE_URL; + } + else if (elementString.Equals(L"KEYPAD_STYLE_NUMBER", false)) + { + keypadStyle = KEYPAD_STYLE_NUMBER; + } + else if (elementString.Equals(L"KEYPAD_STYLE_PHONE_NUMBER", false)) + { + keypadStyle = KEYPAD_STYLE_PHONE_NUMBER; + } + else if (elementString.Equals(L"KEYPAD_STYLE_IP_V4", false)) + { + keypadStyle = KEYPAD_STYLE_IP_V4; + } + + r = pEditArea->SetKeypadStyle(keypadStyle); + } + + if (pControl->GetElement(L"keypadAction", elementString)) + { + if (elementString.Equals(L"KEYPAD_ACTION_ENTER", false)) + { + keypadAction = KEYPAD_ACTION_ENTER; + } + else if (elementString.Equals(L"KEYPAD_ACTION_GO", false)) + { + keypadAction = KEYPAD_ACTION_GO; + } + else if (elementString.Equals(L"KEYPAD_ACTION_NEXT", false)) + { + keypadAction = KEYPAD_ACTION_NEXT; + } + else if (elementString.Equals(L"KEYPAD_ACTION_SEND", false)) + { + keypadAction = KEYPAD_ACTION_SEND; + } + else if (elementString.Equals(L"KEYPAD_ACTION_SEARCH", false)) + { + keypadAction = KEYPAD_ACTION_SEARCH; + } + else if (elementString.Equals(L"KEYPAD_ACTION_LOGIN", false)) + { + keypadAction = KEYPAD_ACTION_LOGIN; + } + else if (elementString.Equals(L"KEYPAD_ACTION_SIGN_IN", false)) + { + keypadAction = KEYPAD_ACTION_SIGN_IN; + } + else if (elementString.Equals(L"KEYPAD_ACTION_JOIN", false)) + { + keypadAction = KEYPAD_ACTION_JOIN; + } + else if (elementString.Equals(L"KEYPAD_ACTION_DONE", false)) + { + keypadAction = KEYPAD_ACTION_DONE; + } + + r = pEditArea->SetKeypadAction(keypadAction); + } + + if (pControl->GetElement(L"textHorizontalAlignment", elementString)) + { + if (elementString.Equals(L"ALIGNMENT_LEFT", false)) + { + horizontalAlignment = ALIGNMENT_LEFT; + } + else if (elementString.Equals(L"ALIGNMENT_CENTER", false)) + { + horizontalAlignment = ALIGNMENT_CENTER; + } + else if (elementString.Equals(L"ALIGNMENT_RIGHT", false)) + { + horizontalAlignment = ALIGNMENT_RIGHT; + } + + r = pEditArea->SetTextAlignment(horizontalAlignment); + } + + if (pControl->GetElement(L"lowerCaseMode", elementString)) + { + if (elementString.Equals(L"true", false)) + { + lowerCaseMode = true; + } + else + { + lowerCaseMode = false; + } + + pEditArea->SetLowerCaseModeEnabled(lowerCaseMode); + } + + if (pControl->GetElement(L"textSize", elementString)) + { + fontSize = _LocalizedNumParser::ToDouble(elementString, "C"); + _ICoordinateSystemTransformer* pTransform = GetTransformer(); + if (pTransform) + { + fontSize = pTransform->Transform(fontSize); + } + + r = pEditArea->SetTextSize(fontSize); + } + + if (pControl->GetElement(L"viewMode", elementString)) + { + if (elementString.Equals(L"true", false)) + { + viewModeEnable = true; + r = pEditArea->SetViewModeEnabled(viewModeEnable); + } + } + + if (pControl->GetElement(L"normalBGBitmapPath", elementString)) + { + Bitmap* pressedBGBitmap = null; + pressedBGBitmap = LoadBitmapN(elementString); + if (pressedBGBitmap != null) + { + r = pEditArea->SetBackgroundBitmap(EDIT_STATUS_NORMAL, *pressedBGBitmap); + delete pressedBGBitmap; + } + } + + if (pControl->GetElement(L"disabledBGBitmapPath", elementString)) + { + Bitmap* disalbedBGBitmap = null; + disalbedBGBitmap = LoadBitmapN(elementString); + if (disalbedBGBitmap != null) + { + r = pEditArea->SetBackgroundBitmap(EDIT_STATUS_DISABLED, *disalbedBGBitmap); + delete disalbedBGBitmap; + } + } + + if (pControl->GetElement(L"highlightedBGBitmapPath", elementString)) + { + Bitmap* highlightedBGBitmap = null; + highlightedBGBitmap = LoadBitmapN(elementString); + if (highlightedBGBitmap != null) + { + r = pEditArea->SetBackgroundBitmap(EDIT_STATUS_HIGHLIGHTED, *highlightedBGBitmap); + delete highlightedBGBitmap; + } + } + + if (pControl->GetElement(L"pressedBGBitmapPath", elementString)) + { + Bitmap* pressedBGBitmap = null; + pressedBGBitmap = LoadBitmapN(elementString); + if (pressedBGBitmap != null) + { + r = pEditArea->SetBackgroundBitmap(EDIT_STATUS_PRESSED, *pressedBGBitmap); + delete pressedBGBitmap; + } + } + + if (pControl->GetElement(L"normalColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + if (pControl->GetElement(L"normalColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + r = pEditArea->SetColor(EDIT_STATUS_NORMAL, color); + } + + if (pControl->GetElement(L"pressedColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + if (pControl->GetElement(L"pressedColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + r = pEditArea->SetColor(EDIT_STATUS_PRESSED, color); + } + + if (pControl->GetElement(L"highlightedColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + if (pControl->GetElement(L"highlightedColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + r = pEditArea->SetColor(EDIT_STATUS_HIGHLIGHTED, color); + } + + if (pControl->GetElement(L"disabledColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + if (pControl->GetElement(L"disabledColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + r = pEditArea->SetColor(EDIT_STATUS_DISABLED, color); + } + + opacity = EDIT_COLOR_OPACITY; + if (pControl->GetElement(L"guideTextColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + r = pEditArea->SetGuideTextColor(color); + } + + if (pControl->GetElement(L"normalTextColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + r = pEditArea->SetTextColor(EDIT_TEXT_COLOR_NORMAL, color); + } + + if (pControl->GetElement(L"disabledTextColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + pEditArea->SetTextColor(EDIT_TEXT_COLOR_DISABLED, color); + } + + if (pControl->GetElement(L"highlightedTextColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + r = pEditArea->SetTextColor(EDIT_TEXT_COLOR_HIGHLIGHTED, color); + } + + if (pControl->GetElement(L"linkTextColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + r = pEditArea->SetTextColor(EDIT_TEXT_COLOR_LINK, color); + } + + if (pControl->GetElement(L"horizontalMargin", elementString)) + { + horizontalMargin= _LocalizedNumParser::ToDouble(elementString, "C"); + r = pEditArea->SetMargin(EDIT_MARGIN_TYPE_HORIZONTAL, horizontalMargin); + } + + if (pControl->GetElement(L"verticalMargin", elementString)) + { + verticalMargin= _LocalizedNumParser::ToDouble(elementString, "C"); + r = pEditArea->SetMargin(EDIT_MARGIN_TYPE_VERTICAL, verticalMargin); + } + + if (pControl->GetElement(L"accessibilityHint", elementString)) + { + AccessibilityContainer* pContainer = pEditArea->GetAccessibilityContainer(); + if (pContainer) + { + AccessibilityElement* pElement = pContainer->GetElement(L"EditText"); + if (pElement) + { + pElement->SetHint(elementString); + } + } + } + + return pEditArea; + } +private: +}; // _EditAreaMaker + +_EditAreaRegister::_EditAreaRegister(void) +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->RegisterControl(L"EditArea", _EditAreaMaker::GetInstance); +} +_EditAreaRegister::~_EditAreaRegister(void) +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->UnregisterControl(L"EditArea"); +} +static _EditAreaRegister EditAreaRegisterToUiBuilder; +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_EditCopyPasteEvent.cpp b/src/ui/controls/FUiCtrl_EditCopyPasteEvent.cpp new file mode 100644 index 0000000..19a111d --- /dev/null +++ b/src/ui/controls/FUiCtrl_EditCopyPasteEvent.cpp @@ -0,0 +1,171 @@ +// +// 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_EditCopyPasteEvent.cpp + * @brief This is the implementation file for the _EditCopyPasteEvent class. + */ + + +// Includes +#include +#include +#include +#include "FUiCtrl_EditCopyPasteEvent.h" + + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; + +namespace Tizen {namespace Ui {namespace Controls +{ +/** + * @class + * @brief This class is used as the argument to change event listener. + * + * This class is used as the argument to change event listener. When an change event is generated + * (such as when a button is pressed) the TextSelectionEvent calls TextSelectionEventListener's OnTextd + * with an instance of this class as an argument. + * + * From this class, one can find out, the (event) source object and the change ID. + */ +class _OSP_EXPORT_ _EditCopyPasteEventArg + : public IEventArg + , public Object +{ +// Lifecycle +public: + /** + * This is the default class constructor. + * + * @param[in] source A pointer to the Object instance which contains this instance. + */ + _EditCopyPasteEventArg(CoreCopyPasteStatus status, CoreCopyPasteAction action); + + /** + * This is the class destructor. + * + */ + virtual ~_EditCopyPasteEventArg(void); + +// Access + CoreCopyPasteStatus GetStatus(void) const; + CoreCopyPasteAction GetAction(void) const; + + +// Attribute +private: + CoreCopyPasteStatus __status; + CoreCopyPasteAction __action; +}; // _EditCopyPasteEventArg + +_EditCopyPasteEventArg::_EditCopyPasteEventArg(CoreCopyPasteStatus status, CoreCopyPasteAction action) + : __status(status) + , __action(action) +{ + // Nothing. +} + +_EditCopyPasteEventArg::~_EditCopyPasteEventArg(void) +{ + // Nothing. +} + +CoreCopyPasteStatus +_EditCopyPasteEventArg::GetStatus(void) const +{ + return __status; +} + +CoreCopyPasteAction +_EditCopyPasteEventArg::GetAction(void) const +{ + return __action; +} + +//////////////////////////////////////////////////////////////////////////////// +/// _EditCopyPasteEvent class Lifecycle +_EditCopyPasteEvent::_EditCopyPasteEvent(const _EditCopyPasteManager& source) + : __pSource(null) +{ + result r = _Event::Initialize(); + + // Set event source + if (r == E_SUCCESS) + { + __pSource = &source; + } +} + +_EditCopyPasteEvent::~_EditCopyPasteEvent(void) +{ + // Nothing. +} + +_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 allocation failed."); + + if (IsFailed(GetLastResult())) + { + goto CATCH; + } + + return pCoreCopyPasteEvent; + +CATCH: + delete pCoreCopyPasteEvent; + return null; +} + +const _EditCopyPasteManager* +_EditCopyPasteEvent::GetSource(void) const +{ + return __pSource; +} + +void +_EditCopyPasteEvent::FireImpl(IEventListener& listener, const IEventArg& arg) +{ + _IEditCopyPasteEventListener* pCopyPasteEventListener = dynamic_cast <_IEditCopyPasteEventListener*>(&listener); + 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, "[E_INVALID_ARG] The Invalid Event Argument is given."); + + CoreCopyPasteStatus status = pCopyPasteEventArg->GetStatus(); + CoreCopyPasteAction action = pCopyPasteEventArg->GetAction(); + + pCopyPasteEventListener->OnEditCopyPasteStatusChanged(status, action); + + SetLastResult(E_SUCCESS); + + return; +} + +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 allocation failed."); + + return pEventArg; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_EditCopyPasteManager.cpp b/src/ui/controls/FUiCtrl_EditCopyPasteManager.cpp new file mode 100644 index 0000000..0595b99 --- /dev/null +++ b/src/ui/controls/FUiCtrl_EditCopyPasteManager.cpp @@ -0,0 +1,2920 @@ +// +// 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_EditCopyPasteManager.cpp + * @brief This is the implementation file for the _EditCopyPasteManager class. + */ + +#include "FUiAnim_ControlVisualElement.h" +#include "FUiAnim_VisualElementImpl.h" +#include +#include +#include +#include +#include +#include "FUi_Clipboard.h" +#include "FUi_ClipboardItem.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_EcoreEvasMgr.h" +#include "FUiCtrl_EditCopyPasteManager.h" +#include "FUiCtrl_EditCopyPasteEvent.h" +#include "FUiCtrl_EditPresenter.h" +#include "FUiCtrl_Form.h" +#include "FUiCtrl_Frame.h" +#include "FUi_EcoreEvas.h" +#include "FUi_Math.h" +#include "FUi_Window.h" + +#define EDIT_COPY_PASTE_MAGNIFIER 1 + +using namespace Tizen::Ui; +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Base::Utility; +using namespace Tizen::Graphics; +using namespace Tizen::Graphics::_Text; +using namespace Tizen::Ui::Animations; + +namespace Tizen { namespace Ui { namespace Controls +{ + +const int COPY_PASTE_SELECT_ID = 231; +const int COPY_PASTE_SELECT_ALL_ID = 232; +const int COPY_PASTE_COPY_ID = 233; +const int COPY_PASTE_CUT_ID = 234; +const int COPY_PASTE_PASTE_ID = 235; +const int COPY_PASTE_CLIPBOARD_ID = 236; +const int COPY_PASTE_SEARCH_ID = 237; + +class _EditCopyPasteMagnifier + : public _Window +{ +public: + _EditCopyPasteMagnifier(_EditCopyPasteManager* pCopyPasteManager, int handlerCursorPos); + virtual ~_EditCopyPasteMagnifier(void); + 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: + _EditCopyPasteMagnifier(const _EditCopyPasteMagnifier& value); + _EditCopyPasteMagnifier& operator =(const _EditCopyPasteMagnifier& value); + +private: + _EditCopyPasteManager* __pCopyPasteManager; + Bitmap* __pMagnifierBitmap; + Bitmap* __pMagnifierMaskBitmap; + _VisualElement* __pRoot; + int __handlerCursorPos; + int __rowIndex; + int __columnIndex; +}; + +_EditCopyPasteMagnifier::_EditCopyPasteMagnifier(_EditCopyPasteManager* pCopyPasteManager, int handlerCursorPos) + : __pCopyPasteManager(pCopyPasteManager) + , __pMagnifierBitmap(null) + , __pMagnifierMaskBitmap(null) + , __pRoot(null) + , __handlerCursorPos(handlerCursorPos) + , __rowIndex(-1) + , __columnIndex(-1) +{ + 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); +} + +_EditCopyPasteMagnifier::~_EditCopyPasteMagnifier(void) +{ + if (__pMagnifierBitmap) + { + delete __pMagnifierBitmap; + __pMagnifierBitmap = null; + } + if (__pMagnifierMaskBitmap) + { + delete __pMagnifierMaskBitmap; + __pMagnifierMaskBitmap = null; + } +} + +Bitmap* +_EditCopyPasteMagnifier::GetMagnifierBitmap(void) const +{ + return __pMagnifierBitmap; +} + +_EditCopyPasteMagnifier* +_EditCopyPasteMagnifier::CreateInstanceN(const FloatPoint& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager) +{ + _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); + float width = 0.0f; + float height = 0.0f; + _Edit* pEdit = pCopyPasteManager->GetEdit(); + _ControlOrientation orientation = pEdit->GetOrientation(); + + Bitmap* pMagnifierBitmap = pCopyPasteMagnifier->GetMagnifierBitmap(); + 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); + + bounds = FloatRectangle(cursorPoint.x - width/2.0f, cursorPoint.y - height, width, height); + if (bounds.y < 0.0f) + { + bounds.y = 0.0f; + } + 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 +_EditCopyPasteMagnifier::OnDraw(void) +{ + Canvas* pCanvas = GetCanvasN(); + if (pCanvas == null) + { + return; + } + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pMagnifierBitmap)) + { + pCanvas->DrawNinePatchedBitmap(pCanvas->GetBoundsF(), *__pMagnifierBitmap); + } + else + { + pCanvas->DrawBitmap(pCanvas->GetBoundsF(), *__pMagnifierBitmap); + } + + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pMagnifierMaskBitmap)) + { + Color editColor = __pCopyPasteManager->GetEdit()->GetColor(EDIT_STATUS_HIGHLIGHTED); + if (editColor.GetAlpha() == 0x00) + { + byte r,g,b,a; + editColor = __pCopyPasteManager->GetEdit()->GetTextColor(EDIT_STATUS_HIGHLIGHTED); + editColor.GetColorComponents(r,g,b,a); + byte max = (r >= g) ? r:g; + max = (max >= b) ? max:b; + if (max >= 255/2) + { + editColor = Color::GetColor(COLOR_ID_BLACK); + } + else + { + editColor = Color::GetColor(COLOR_ID_WHITE); + } + } + + Bitmap* pReplacedMaskBitmap = _BitmapImpl::GetColorReplacedBitmapN(*__pMagnifierMaskBitmap, Color::GetColor(COLOR_ID_MAGENTA), editColor); + SysTryCatch(NID_UI_CTRL, pReplacedMaskBitmap, , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + pCanvas->DrawNinePatchedBitmap(pCanvas->GetBoundsF(), *pReplacedMaskBitmap); + + delete pReplacedMaskBitmap; + } + else + { + pCanvas->DrawBitmap(pCanvas->GetBoundsF(), *__pMagnifierMaskBitmap); + } + + CaptureTextArea(*pCanvas); + + delete pCanvas; + + return; + +CATCH: + delete pCanvas; + + return; +} + +void +_EditCopyPasteMagnifier::CaptureTextArea(Canvas& canvas) +{ + result r = E_SUCCESS; + float captureWidth = 0.0f; + float captureHeight = 0.0f; + float capturePosX = 0.0f; + float capturePosY = 0.0f; + float adjustPosX = 0.0f; + float adjustPosY = 0.0f; + FloatRectangle cursorBounds(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle captureBounds(0.0f, 0.0f, 0.0f, 0.0f); + _VisualElementImpl* pEditVisualElementImpl = null; + + _Edit* pEdit = __pCopyPasteManager->GetEdit(); + SysTryReturnVoidResult(NID_UI_CTRL, pEdit, E_INVALID_STATE, "[E_INVALID_STATE] pEdit is null."); + + _VisualElement* pEditVisualElement = pEdit->GetVisualElement(); + 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, "[E_INVALID_STATE] pEditPresenter is null."); + + 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); + GET_SHAPE_CONFIG(EDIT::COPYPASTE_MAGNIFIER_CAPTURE_POSITION_X, pEdit->GetOrientation(), capturePosX); + GET_SHAPE_CONFIG(EDIT::COPYPASTE_MAGNIFIER_CAPTURE_POSITION_Y, pEdit->GetOrientation(), capturePosY); + + FloatRectangle textObjectBounds = pEditPresenter->GetTextBoundsF(); + + // textobject minimum width/height + if (pEdit->GetBoundsF().width < textObjectBounds.width) + { + textObjectBounds.width = pEdit->GetBoundsF().width - pEdit->GetHorizontalMarginF(EDIT_TEXT_LEFT_MARGIN) - pEdit->GetHorizontalMarginF(EDIT_TEXT_RIGHT_MARGIN); + } + + captureBounds.x = cursorBounds.x + cursorBounds.width/2.0f - captureWidth/2.0f; + captureBounds.y = cursorBounds.y + cursorBounds.height/2.0f - captureHeight/2.0f; + captureBounds.width = captureWidth; + captureBounds.height = captureHeight; + + if ((cursorBounds.x + cursorBounds.width/2.0f) - captureBounds.x < captureWidth/2.0f) + { + adjustPosX = captureWidth/2.0f - (cursorBounds.x + cursorBounds.width/2.0f - captureBounds.x); + } + + if (captureBounds.height < captureHeight && captureBounds.y < captureHeight) + { + adjustPosY = captureHeight - captureBounds.height; + } + + Bitmap* pOriginalBitmp = 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); + + 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 allocation failed."); + + r = pOriginalBitmp->Construct(*pCanvas, CoordinateSystem::AlignToDevice(FloatRectangle(0, 0, captureBounds.width, captureBounds.height))); + + r = pOriginalBitmp->SetScalingQuality(BITMAP_SCALING_QUALITY_HIGH); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pOriginalBitmp->Scale(CoordinateSystem::AlignToDevice(FloatDimension(pOriginalBitmp->GetActualWidth()*1.5f, pOriginalBitmp->GetActualHeight()*1.5f))); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + canvas.DrawBitmap(CoordinateSystem::AlignToDevice(FloatPoint(capturePosX + adjustPosX*1.5f, capturePosY + adjustPosY*1.5f)), *pOriginalBitmp); + + delete pCanvas; + delete pOriginalBitmp; + + return; + +CATCH: + delete pCanvas; + delete pOriginalBitmp; + + return; +} + +void +_EditCopyPasteMagnifier::MoveMagnifier(const FloatPoint& point, int handlerCursorPos) +{ + FloatRectangle bounds = FloatRectangle(point.x - GetBoundsF().width/2.0f, point.y - GetBoundsF().height, GetBoundsF().width, GetBoundsF().height); + __handlerCursorPos = handlerCursorPos; + if (bounds.y < 0.0f) + { + bounds.y = 0.0f; + } + SetBounds(bounds); + Invalidate(); +} + +void +_EditCopyPasteMagnifier::SetRowColumnIndex(int rowIndex, int columnIndex) +{ + __rowIndex = rowIndex; + __columnIndex = columnIndex; +} + +/** +* @class _EditCopyPasteHandler +* @brief This class defines the common behavior for the %_EditCopyPasteHandler. +* +*/ +class _EditCopyPasteHandler + : public _Window + , virtual public IEventListener + , virtual public _IUiEventListener + , virtual public _IUiEventPreviewer +{ + +// Lifecycle +public: + /** + * This is the default class constructor. + * + */ + _EditCopyPasteHandler(const Point& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, bool singleHandler, bool leftHandler); + _EditCopyPasteHandler(const FloatPoint& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, bool singleHandler, bool leftHandler); + + /** + * This is the default class destructor. + * + */ + virtual ~_EditCopyPasteHandler(void); + +// Operations +public: + enum HandlerDirection + { + HANDLER_DIRECTION_NONE = 0, + HANDLER_DIRECTION_REVERSE_1,//horizontal reverse + HANDLER_DIRECTION_REVERSE_2,//vertical reverse + HANDLER_DIRECTION_REVERSE_3,//horizontal vertical reverse + }; + + static _EditCopyPasteHandler* CreateInstanceN(const Point& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, bool singleHandler, bool leftHandler = true); + static _EditCopyPasteHandler* CreateInstanceN(const FloatPoint& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, bool singleHandler, bool leftHandler = true); + int GetHandlerCursorPosition(void) const; + void SetHandlerRowColumnIndex(int rowIndex, int columnIndex); + void GetHandlerRowColumnIndex(int& rowIndex, int& columnIndex) const; + void SetHandlerCursorPosition(int handlerCursorPos); + void AdjustBounds(void); + void CheckReverseStatus(void); + void ChangeHandlerBitmap(void); + Bitmap* GetHandlerBitmap(void) const; + bool CreateCopyPasteMagnifier(void); + void DestroyCopyPasteMagnifier(void); + void MoveCopyPasteMagnifier(void); + void UpdateCopyPasteMagnifier(void); + +// virtual function + virtual void OnDraw(void); + virtual bool OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo); + virtual bool OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo); + virtual bool OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo); + virtual bool IsActivatedOnOpen(void) const; + virtual void OnChangeLayout(_ControlOrientation orientation); + virtual result OnAttachedToMainTree(void); + + +private: + _EditCopyPasteHandler(const _EditCopyPasteHandler& value); + _EditCopyPasteHandler& operator =(const _EditCopyPasteHandler& value); + +// Attribute +private: + _VisualElement* __pRoot; + Bitmap* __pHandlerBitmap; + FloatPoint __touchPressedPoint; + FloatPoint __absoluteTouchPressedPoint; + _EditCopyPasteManager* __pCopyPasteManager; + bool __leftHandler; + bool __reverseCheck; + int __handlerCursorPos; + bool __isTouchPressed; + HandlerDirection __handlerDirection; + bool __singleHandler; + _EditCopyPasteMagnifier* __pCopyPasteMagnifier; + bool __isTouchMoving; + int __rowIndex; + int __columnIndex; +}; // _EditCopyPasteHandler + +Bitmap* +_EditCopyPasteHandler::GetHandlerBitmap(void) const +{ + return __pHandlerBitmap; +} + +bool +_EditCopyPasteHandler::CreateCopyPasteMagnifier(void) +{ + if (!__pCopyPasteMagnifier) + { + _Edit* pEdit = __pCopyPasteManager->GetEdit(); + SysTryReturn(NID_UI_CTRL, pEdit, false, E_INVALID_STATE, "[E_INVALID_STATE] pEdit is null.\n"); + + _EditPresenter* pEditPresenter = pEdit->GetPresenter(); + 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 >= 0 && __columnIndex >= 0) + { + pEditPresenter->CalculateAbsoluteCursorBounds(__rowIndex, __columnIndex, cursorBounds); + } + else + { + pEditPresenter->CalculateAbsoluteCursorBounds(__handlerCursorPos, cursorBounds); + } + __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); + } + return true; +} + +void +_EditCopyPasteHandler::DestroyCopyPasteMagnifier(void) +{ + if (__pCopyPasteMagnifier) + { + __pCopyPasteMagnifier->Close(); + delete __pCopyPasteMagnifier; + __pCopyPasteMagnifier = null; + } +} + +void +_EditCopyPasteHandler::MoveCopyPasteMagnifier(void) +{ + if (__pCopyPasteMagnifier) + { + _Edit* pEdit = __pCopyPasteManager->GetEdit(); + 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, "[E_INVALID_STATE] pEditPresenter is null."); + + FloatRectangle cursorBounds(0.0f, 0.0f, 0.0f, 0.0f); + if (__rowIndex >= 0 && __columnIndex >= 0) + { + pEditPresenter->CalculateAbsoluteCursorBounds(__rowIndex, __columnIndex, cursorBounds); + } + else + { + pEditPresenter->CalculateAbsoluteCursorBounds(__handlerCursorPos, cursorBounds); + } + __pCopyPasteMagnifier->SetRowColumnIndex(__rowIndex, __columnIndex); + __pCopyPasteMagnifier->MoveMagnifier(FloatPoint(cursorBounds.x, cursorBounds.y), __handlerCursorPos); + } +} + +void +_EditCopyPasteHandler::UpdateCopyPasteMagnifier(void) +{ + if (__pCopyPasteMagnifier) + { + __pCopyPasteMagnifier->Invalidate(); + } +} + +void +_EditCopyPasteHandler::ChangeHandlerBitmap(void) +{ + if (__pHandlerBitmap) + { + delete __pHandlerBitmap; + __pHandlerBitmap = null; + } + if (__singleHandler) + { + if (__handlerDirection == HANDLER_DIRECTION_NONE) + { + GET_BITMAP_CONFIG_N(EDIT::COPY_PASTE_ICON_CENTER_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pHandlerBitmap); + } + else + { + GET_BITMAP_CONFIG_N(EDIT::COPY_PASTE_ICON_REVERSE_CENTER_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pHandlerBitmap); + } + return; + } + if (__leftHandler) + { + switch(__handlerDirection) + { + case HANDLER_DIRECTION_REVERSE_1: + GET_BITMAP_CONFIG_N(EDIT::COPY_PASTE_ICON_RIGHT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pHandlerBitmap); + break; + case HANDLER_DIRECTION_REVERSE_2: + GET_BITMAP_CONFIG_N(EDIT::COPY_PASTE_ICON_REVERSE_LEFT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pHandlerBitmap); + break; + case HANDLER_DIRECTION_REVERSE_3: + GET_BITMAP_CONFIG_N(EDIT::COPY_PASTE_ICON_REVERSE_RIGHT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pHandlerBitmap); + break; + case HANDLER_DIRECTION_NONE: + //fall through + default: + GET_BITMAP_CONFIG_N(EDIT::COPY_PASTE_ICON_LEFT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pHandlerBitmap); + break; + } + } + else + { + switch(__handlerDirection) + { + case HANDLER_DIRECTION_REVERSE_1: + GET_BITMAP_CONFIG_N(EDIT::COPY_PASTE_ICON_LEFT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pHandlerBitmap); + break; + case HANDLER_DIRECTION_REVERSE_2: + GET_BITMAP_CONFIG_N(EDIT::COPY_PASTE_ICON_REVERSE_RIGHT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pHandlerBitmap); + break; + case HANDLER_DIRECTION_REVERSE_3: + GET_BITMAP_CONFIG_N(EDIT::COPY_PASTE_ICON_REVERSE_LEFT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pHandlerBitmap); + break; + case HANDLER_DIRECTION_NONE: + //fall through + default: + GET_BITMAP_CONFIG_N(EDIT::COPY_PASTE_ICON_RIGHT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pHandlerBitmap); + break; + } + } +} + +_EditCopyPasteHandler::_EditCopyPasteHandler(const Point& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, bool singleHandler, bool leftHandler) + : __pRoot(null) + , __pHandlerBitmap(null) + , __touchPressedPoint(0.0f, 0.0f) + , __absoluteTouchPressedPoint(0.0f, 0.0f) + , __pCopyPasteManager(pCopyPasteManager) + , __leftHandler(leftHandler) + , __reverseCheck(false) + , __handlerCursorPos(handlerCursorPos) + , __isTouchPressed(false) + , __handlerDirection(HANDLER_DIRECTION_NONE) + , __singleHandler(false) + , __pCopyPasteMagnifier(null) + , __isTouchMoving(false) + , __rowIndex(-1) + , __columnIndex(-1) +{ + AcquireHandle(); + + __pRoot = GetVisualElement(); + __pRoot->SetSurfaceOpaque(false); + + Point handlerPoint(point); + + if (singleHandler) + { + GET_BITMAP_CONFIG_N(EDIT::COPY_PASTE_ICON_CENTER_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pHandlerBitmap); + handlerPoint.x = handlerPoint.x - (__pHandlerBitmap->GetWidth() / 2); + __singleHandler = true; + } + else + { + if (leftHandler) + { + GET_BITMAP_CONFIG_N(EDIT::COPY_PASTE_ICON_LEFT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pHandlerBitmap); + handlerPoint.x = handlerPoint.x - __pHandlerBitmap->GetWidth(); + } + else + { + GET_BITMAP_CONFIG_N(EDIT::COPY_PASTE_ICON_RIGHT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pHandlerBitmap); + } + } + + FloatRectangle bounds(handlerPoint.x, handlerPoint.y, __pHandlerBitmap->GetWidth(), __pHandlerBitmap->GetHeight()); +} + +_EditCopyPasteHandler::_EditCopyPasteHandler(const FloatPoint& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, bool singleHandler, bool leftHandler) + : __pRoot(null) + , __pHandlerBitmap(null) + , __touchPressedPoint(0.0f, 0.0f) + , __absoluteTouchPressedPoint(0.0f, 0.0f) + , __pCopyPasteManager(pCopyPasteManager) + , __leftHandler(leftHandler) + , __reverseCheck(false) + , __handlerCursorPos(handlerCursorPos) + , __isTouchPressed(false) + , __handlerDirection(HANDLER_DIRECTION_NONE) + , __singleHandler(false) + , __pCopyPasteMagnifier(null) + , __isTouchMoving(false) + , __rowIndex(-1) + , __columnIndex(-1) +{ + AcquireHandle(); + +//To do ..... + + //Point handlerPoint(_CoordinateSystemUtils::ConvertToInteger(point)); + FloatPoint handlerPoint(point); + if (singleHandler) + { + GET_BITMAP_CONFIG_N(EDIT::COPY_PASTE_ICON_CENTER_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pHandlerBitmap); + handlerPoint.x = handlerPoint.x - (__pHandlerBitmap->GetWidthF() / 2.0f); + __singleHandler = true; + } + else + { + if (leftHandler) + { + GET_BITMAP_CONFIG_N(EDIT::COPY_PASTE_ICON_LEFT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pHandlerBitmap); + handlerPoint.x = handlerPoint.x - __pHandlerBitmap->GetWidthF(); + } + else + { + GET_BITMAP_CONFIG_N(EDIT::COPY_PASTE_ICON_RIGHT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pHandlerBitmap); + } + } + + FloatRectangle bounds(handlerPoint.x, handlerPoint.y, _CoordinateSystemUtils::ConvertToFloat(__pHandlerBitmap->GetWidth()), _CoordinateSystemUtils::ConvertToFloat(__pHandlerBitmap->GetHeight())); +} + +_EditCopyPasteHandler::~_EditCopyPasteHandler(void) +{ + DestroyCopyPasteMagnifier(); + + if (__pHandlerBitmap) + { + delete __pHandlerBitmap; + __pHandlerBitmap = null; + } +} + +_EditCopyPasteHandler* +_EditCopyPasteHandler::CreateInstanceN(const Point& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, bool singleHandler, bool leftHandler) +{ + _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); + } + else + { + if (leftHandler) + { + handlerPoint.x = handlerPoint.x - pHandlerBitmap->GetWidth(); + } + } + + bounds.x = handlerPoint.x; + bounds.y = handlerPoint.y; + bounds.width = pHandlerBitmap->GetWidth(); + bounds.height = pHandlerBitmap->GetHeight(); + + pCopyPasteHandler->Open(false); + pCopyPasteHandler->SetBounds(bounds); + pCopyPasteHandler->CheckReverseStatus(); + pCopyPasteHandler->AdjustBounds(); + + return pCopyPasteHandler; + +CATCH: + pCopyPasteHandler->Close(); + delete pCopyPasteHandler; + + return null; +} + +_EditCopyPasteHandler* +_EditCopyPasteHandler::CreateInstanceN(const FloatPoint& point, int handlerCursorPos, _EditCopyPasteManager* pCopyPasteManager, bool singleHandler, bool leftHandler) +{ + _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); + } + else + { + if (leftHandler) + { + handlerPoint.x = handlerPoint.x - pHandlerBitmap->GetWidthF(); + } + } + + bounds.x = handlerPoint.x; + bounds.y = handlerPoint.y; + bounds.width = pHandlerBitmap->GetWidthF(); + bounds.height = pHandlerBitmap->GetHeightF(); + + pCopyPasteHandler->Open(false); + pCopyPasteHandler->SetBounds(bounds); + pCopyPasteHandler->CheckReverseStatus(); + pCopyPasteHandler->AdjustBounds(); + + return pCopyPasteHandler; + +CATCH: + pCopyPasteHandler->Close(); + delete pCopyPasteHandler; + + return null; +} + +int +_EditCopyPasteHandler::GetHandlerCursorPosition(void) const +{ + return __handlerCursorPos; +} + +void +_EditCopyPasteHandler::SetHandlerRowColumnIndex(int rowIndex, int columnIndex) +{ + __rowIndex = rowIndex; + __columnIndex = columnIndex; +} + +void +_EditCopyPasteHandler::GetHandlerRowColumnIndex(int& rowIndex, int& columnIndex) const +{ + rowIndex = __rowIndex; + columnIndex = __columnIndex; +} + +void +_EditCopyPasteHandler::SetHandlerCursorPosition(int handlerCursorPos) +{ + __handlerCursorPos = handlerCursorPos; + __rowIndex = -1; + __columnIndex = -1; +} + +void +_EditCopyPasteHandler::AdjustBounds(void) +{ + FloatRectangle cursorRect; + FloatRectangle rect = GetBoundsF(); + FloatPoint checkPoint(0.0f, 0.0f); + _Edit* pEdit = __pCopyPasteManager->GetEdit(); + _EditPresenter* pEditPresenter = pEdit->GetPresenter(); + + if (__singleHandler) + { + if (__rowIndex >= 0 && __columnIndex >= 0) + { + pEditPresenter->CalculateAbsoluteCursorBounds(__rowIndex, __columnIndex, cursorRect, false); + } + else + { + 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); + + if (__handlerDirection == HANDLER_DIRECTION_REVERSE_2) + { + rect.y -= (cursorRect.height + __pHandlerBitmap->GetHeightF()); + } + } + else + { + if (__rowIndex >= 0 && __columnIndex >= 0) + { + pEditPresenter->CalculateAbsoluteCursorBounds(__rowIndex, __columnIndex, cursorRect, false); + } + else + { + pEditPresenter->CalculateAbsoluteCursorBounds(__handlerCursorPos, cursorRect, false); + } + + rect.x = cursorRect.x; + rect.y = cursorRect.y + cursorRect.height; + + checkPoint = FloatPoint(cursorRect.x, cursorRect.y + cursorRect.height); + + if (__leftHandler) + { + if (__handlerDirection == HANDLER_DIRECTION_NONE) + { + rect.x = rect.x - __pHandlerBitmap->GetWidthF(); + } + else if (__handlerDirection == HANDLER_DIRECTION_REVERSE_2) + { + rect.x = rect.x - __pHandlerBitmap->GetWidthF(); + rect.y -= (rect.height + cursorRect.height); + } + else if (__handlerDirection == HANDLER_DIRECTION_REVERSE_3) + { + rect.y -= (rect.height + cursorRect.height); + } + } + else + { + if (__handlerDirection == HANDLER_DIRECTION_REVERSE_1) + { + rect.x = rect.x - __pHandlerBitmap->GetWidthF(); + } + else if (__handlerDirection == HANDLER_DIRECTION_REVERSE_2) + { + rect.y -= (rect.height + cursorRect.height); + } + else if (__handlerDirection == HANDLER_DIRECTION_REVERSE_3) + { + rect.x = rect.x - __pHandlerBitmap->GetWidthF(); + rect.y -= (rect.height + cursorRect.height); + } + } + } + + if (!__isTouchMoving) + { + bool visibleState = __pCopyPasteManager->CheckHandleBounds(checkPoint); + if (visibleState && !GetVisibleState()) + { + SetVisibleState(true); + Open(); + } + else if (!visibleState && GetVisibleState()) + { + SetVisibleState(false); + Close(); + } + } + + if (__singleHandler && pEditPresenter->IsViewModeEnabled()) + { + SetVisibleState(false); + } + + SetBounds(rect); + return; +} + +void +_EditCopyPasteHandler::OnDraw(void) +{ + Canvas* pCanvas = GetCanvasN(); + if (pCanvas == null) + { + return; + } + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pHandlerBitmap)) + { + pCanvas->DrawNinePatchedBitmap(pCanvas->GetBoundsF(), *__pHandlerBitmap); + } + else + { + pCanvas->DrawBitmap(pCanvas->GetBoundsF(), *__pHandlerBitmap); + } + + delete pCanvas; +} + +bool +_EditCopyPasteHandler::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + _ContextMenu* pCopyPastePopup = __pCopyPasteManager->GetCopyPastePopup(); + if (pCopyPastePopup) + { + pCopyPastePopup->SetVisibleState(false); + pCopyPastePopup->Close(); + } + +#if EDIT_COPY_PASTE_MAGNIFIER + if (!__pCopyPasteMagnifier) + { + CreateCopyPasteMagnifier(); + } + else + { + __pCopyPasteMagnifier->SetVisibleState(true); + __pCopyPasteMagnifier->Open(); + } +#endif + __touchPressedPoint = touchinfo.GetCurrentPosition(); + __absoluteTouchPressedPoint = FloatPoint(GetBoundsF().x + __touchPressedPoint.x, GetBoundsF().y + __touchPressedPoint.y); + __isTouchPressed = true; + Invalidate(); + return true; +} + +void +_EditCopyPasteHandler::CheckReverseStatus(void) +{ + FloatDimension screenSize; + _ControlManager* pControlManager = _ControlManager::GetInstance(); + _Edit* pEdit = __pCopyPasteManager->GetEdit(); + _ControlOrientation orientation = pEdit->GetOrientation(); + 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, "[E_INVALID_STATE] pEditPresenter is null.\n"); + + clipboardHeight = pEditPresenter->GetClipboardHeight(); + pEditPresenter->GetKeypadBoundsEx(keypadBounds); + if (clipboardHeight > keypadBounds.height) + { + adjustHeight = clipboardHeight; + } + else + { + adjustHeight = keypadBounds.height; + } + + if (orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + screenSize = pControlManager->GetScreenSizeF(); + } + else + { + screenSize.width = pControlManager->GetScreenSizeF().height; + screenSize.height = pControlManager->GetScreenSizeF().width; + } + if (adjustHeight > 0.0f) + { + screenSize.height -= adjustHeight; + } + + if (__singleHandler) + { + if ((__handlerDirection == HANDLER_DIRECTION_NONE) && ((cursorAbsBounds.y + cursorAbsBounds.height + rect.height) > screenSize.height)) + { + __handlerDirection = HANDLER_DIRECTION_REVERSE_2; + rect.y -= (cursorAbsBounds.height + rect.height); + __reverseCheck = true; + ChangeHandlerBitmap(); + SetBounds(rect); + } + else if ((__handlerDirection == HANDLER_DIRECTION_REVERSE_2) && ((cursorAbsBounds.y + cursorAbsBounds.height + rect.height) <= screenSize.height)) + { + __handlerDirection = HANDLER_DIRECTION_NONE; + rect.y += (cursorAbsBounds.height + rect.height); + __reverseCheck = true; + ChangeHandlerBitmap(); + SetBounds(rect); + } + return; + } + + if (__leftHandler) + { + if (((__handlerDirection == HANDLER_DIRECTION_NONE) || (__handlerDirection == HANDLER_DIRECTION_REVERSE_2)) && rect.x < 0.0f) + { + if ((__handlerDirection == HANDLER_DIRECTION_NONE) && ((rect.y + rect.height) > screenSize.height)) + { + __handlerDirection = HANDLER_DIRECTION_REVERSE_3; + rect.y -= (rect.height + cursorAbsBounds.height); + } + else if ((__handlerDirection == HANDLER_DIRECTION_NONE) && ((rect.y + rect.height) <= screenSize.height)) + { + __handlerDirection = HANDLER_DIRECTION_REVERSE_1; + } + else if ((__handlerDirection == HANDLER_DIRECTION_REVERSE_2) && ((rect.y + 2*rect.height) > screenSize.height)) + { + __handlerDirection = HANDLER_DIRECTION_REVERSE_3; + } + else if ((__handlerDirection == HANDLER_DIRECTION_REVERSE_2) && ((rect.y + 2*rect.height) <= screenSize.height)) + { + __handlerDirection = HANDLER_DIRECTION_REVERSE_1; + rect.y += (rect.height + cursorAbsBounds.height); + } + ChangeHandlerBitmap(); + rect.x += rect.width; + __reverseCheck = true; + } + else if (((__handlerDirection == HANDLER_DIRECTION_REVERSE_1) || (__handlerDirection == HANDLER_DIRECTION_REVERSE_3)) && rect.x >= rect.width) + { + if ((__handlerDirection == HANDLER_DIRECTION_REVERSE_1) && ((rect.y + rect.height) > screenSize.height)) + { + __handlerDirection = HANDLER_DIRECTION_REVERSE_2; + rect.y -= (rect.height + cursorAbsBounds.height); + } + else if ((__handlerDirection == HANDLER_DIRECTION_REVERSE_1) && ((rect.y + rect.height) <= screenSize.height)) + { + __handlerDirection = HANDLER_DIRECTION_NONE; + } + else if ((__handlerDirection == HANDLER_DIRECTION_REVERSE_3) && ((rect.y + 2*rect.height) > screenSize.height)) + { + __handlerDirection = HANDLER_DIRECTION_REVERSE_2; + } + else if ((__handlerDirection == HANDLER_DIRECTION_REVERSE_3) && ((rect.y + 2*rect.height) <= screenSize.height)) + { + __handlerDirection = HANDLER_DIRECTION_NONE; + rect.y += (rect.height + cursorAbsBounds.height); + } + ChangeHandlerBitmap(); + rect.x -= rect.width; + __reverseCheck = true; + } + else if (((__handlerDirection == HANDLER_DIRECTION_NONE) || (__handlerDirection == HANDLER_DIRECTION_REVERSE_1)) && ((rect.y + rect.height) > screenSize.height)) + { + if ((__handlerDirection == HANDLER_DIRECTION_NONE) && rect.x < rect.width) + { + __handlerDirection = HANDLER_DIRECTION_REVERSE_3; + rect.x += rect.width; + } + else if ((__handlerDirection == HANDLER_DIRECTION_NONE) && rect.x >= rect.width) + { + __handlerDirection = HANDLER_DIRECTION_REVERSE_2; + } + else if ((__handlerDirection == HANDLER_DIRECTION_REVERSE_1) && ((rect.x - rect.width) >= 0.0f)) + { + __handlerDirection = HANDLER_DIRECTION_REVERSE_2; + rect.x -= rect.width; + } + else if ((__handlerDirection == HANDLER_DIRECTION_REVERSE_1) && ((rect.x - rect.width) < 0.0f)) + { + __handlerDirection = HANDLER_DIRECTION_REVERSE_3; + } + rect.y -= (rect.height + cursorAbsBounds.height); + ChangeHandlerBitmap(); + __reverseCheck = true; + } + else if (((__handlerDirection == HANDLER_DIRECTION_REVERSE_2) || (__handlerDirection == HANDLER_DIRECTION_REVERSE_3)) && ((rect.y + 2*rect.height + cursorAbsBounds.height) <= screenSize.height)) + { + if ((__handlerDirection == HANDLER_DIRECTION_REVERSE_2) && rect.x < 0.0f) + { + __handlerDirection = HANDLER_DIRECTION_REVERSE_1; + rect.x += rect.width; + } + else if ((__handlerDirection == HANDLER_DIRECTION_REVERSE_2) && rect.x >= rect.width) + { + __handlerDirection = HANDLER_DIRECTION_NONE; + } + else if ((__handlerDirection == HANDLER_DIRECTION_REVERSE_3) && ((rect.x - rect.width) >= 0.0f)) + { + __handlerDirection = HANDLER_DIRECTION_NONE; + rect.x -= rect.width; + } + else if ((__handlerDirection == HANDLER_DIRECTION_REVERSE_3) && ((rect.x - rect.width) < 0.0f)) + { + __handlerDirection = HANDLER_DIRECTION_REVERSE_1; + } + rect.y += (rect.height + cursorAbsBounds.height); + ChangeHandlerBitmap(); + __reverseCheck = true; + } + } + else + { + if (((__handlerDirection == HANDLER_DIRECTION_NONE) || (__handlerDirection == HANDLER_DIRECTION_REVERSE_2)) && (rect.x + rect.width) > screenSize.width) + { + if ((__handlerDirection == HANDLER_DIRECTION_NONE) && ((rect.y + rect.height) > screenSize.height)) + { + __handlerDirection = HANDLER_DIRECTION_REVERSE_3; + rect.y -= (rect.height + cursorAbsBounds.height); + } + else if ((__handlerDirection == HANDLER_DIRECTION_NONE) && ((rect.y + rect.height) <= screenSize.height)) + { + __handlerDirection = HANDLER_DIRECTION_REVERSE_1; + } + else if ((__handlerDirection == HANDLER_DIRECTION_REVERSE_2) && ((rect.y + 2*rect.height) > screenSize.height)) + { + __handlerDirection = HANDLER_DIRECTION_REVERSE_3; + } + else if ((__handlerDirection == HANDLER_DIRECTION_REVERSE_2) && ((rect.y + 2*rect.height) <= screenSize.height)) + { + __handlerDirection = HANDLER_DIRECTION_REVERSE_1; + rect.y += (rect.height + cursorAbsBounds.height); + } + ChangeHandlerBitmap(); + rect.x -= rect.width; + __reverseCheck = true; + } + else if (((__handlerDirection == HANDLER_DIRECTION_REVERSE_1) || (__handlerDirection == HANDLER_DIRECTION_REVERSE_3)) && (rect.x + 2*rect.width) <= screenSize.width) + { + if ((__handlerDirection == HANDLER_DIRECTION_REVERSE_1) && ((rect.y + rect.height) > screenSize.height)) + { + __handlerDirection = HANDLER_DIRECTION_REVERSE_2; + rect.y -= (rect.height + cursorAbsBounds.height); + } + else if ((__handlerDirection == HANDLER_DIRECTION_REVERSE_1) && ((rect.y + rect.height) <= screenSize.height)) + { + __handlerDirection = HANDLER_DIRECTION_NONE; + } + else if ((__handlerDirection == HANDLER_DIRECTION_REVERSE_3) && ((rect.y + 2*rect.height) > screenSize.height)) + { + __handlerDirection = HANDLER_DIRECTION_REVERSE_2; + } + else if ((__handlerDirection == HANDLER_DIRECTION_REVERSE_3) && ((rect.y + 2*rect.height) <= screenSize.height)) + { + __handlerDirection = HANDLER_DIRECTION_NONE; + rect.y += (rect.height + cursorAbsBounds.height); + } + ChangeHandlerBitmap(); + rect.x += rect.width; + __reverseCheck = true; + } + else if (((__handlerDirection == HANDLER_DIRECTION_NONE) || (__handlerDirection == HANDLER_DIRECTION_REVERSE_1)) && ((rect.y + rect.height) > screenSize.height)) + { + if ((__handlerDirection == HANDLER_DIRECTION_NONE) && (rect.x + rect.width) > screenSize.width) + { + __handlerDirection = HANDLER_DIRECTION_REVERSE_3; + rect.x -= rect.width; + } + else if ((__handlerDirection == HANDLER_DIRECTION_NONE) && (rect.x + rect.width) <= screenSize.width) + { + __handlerDirection = HANDLER_DIRECTION_REVERSE_2; + } + else if ((__handlerDirection == HANDLER_DIRECTION_REVERSE_1) && (rect.x + 2*rect.width) <= screenSize.width) + { + __handlerDirection = HANDLER_DIRECTION_REVERSE_2; + rect.x += rect.width; + } + else if ((__handlerDirection == HANDLER_DIRECTION_REVERSE_1) && (rect.x + 2*rect.width) > screenSize.width) + { + __handlerDirection = HANDLER_DIRECTION_REVERSE_3; + } + rect.y -= (rect.height + cursorAbsBounds.height); + ChangeHandlerBitmap(); + __reverseCheck = true; + } + else if (((__handlerDirection == HANDLER_DIRECTION_REVERSE_2) || (__handlerDirection == HANDLER_DIRECTION_REVERSE_3)) && ((rect.y + 2*rect.height + cursorAbsBounds.height) <= screenSize.height)) + { + if ((__handlerDirection == HANDLER_DIRECTION_REVERSE_2) && ((rect.x + rect.width) <= screenSize.width)) + { + __handlerDirection = HANDLER_DIRECTION_NONE; + } + else if ((__handlerDirection == HANDLER_DIRECTION_REVERSE_2) && ((rect.x + rect.width) > screenSize.width)) + { + __handlerDirection = HANDLER_DIRECTION_REVERSE_1; + rect.x -= rect.width; + } + else if ((__handlerDirection == HANDLER_DIRECTION_REVERSE_3) && ((rect.x + 2*rect.width) <= screenSize.width)) + { + __handlerDirection = HANDLER_DIRECTION_NONE; + rect.x += rect.width; + } + else if ((__handlerDirection == HANDLER_DIRECTION_REVERSE_3) && ((rect.x + 2*rect.width) > screenSize.width)) + { + __handlerDirection = HANDLER_DIRECTION_REVERSE_1; + } + rect.y += (rect.height + cursorAbsBounds.height); + ChangeHandlerBitmap(); + __reverseCheck = true; + } + } + + SetBounds(rect); +} + +bool +_EditCopyPasteHandler::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + CheckReverseStatus(); + __isTouchPressed = false; + __absoluteTouchPressedPoint = FloatPoint(0.0f, 0.0f); + if (__pCopyPasteMagnifier) + { + __pCopyPasteMagnifier->SetVisibleState(false); + __pCopyPasteMagnifier->Close(); + } + _ContextMenu* pCopyPastePopup = __pCopyPasteManager->GetCopyPastePopup(); + if (pCopyPastePopup && !__isTouchMoving) + { + pCopyPastePopup->SetVisibleState(true); + pCopyPastePopup->Open(); + } + else + { + __pCopyPasteManager->CreateCopyPastePopup(); + } + __pCopyPasteManager->Show(); + __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; +} + +bool +_EditCopyPasteHandler::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + int cursorPos = -1; + FloatRectangle cursorRect(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle absCursorRect(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle rect = GetBoundsF(); + FloatPoint point = touchinfo.GetCurrentPosition(); + FloatPoint touchPoint(0.0f, 0.0f); + FloatPoint checkPoint(0.0f, 0.0f); + __isTouchMoving = true; + + _Edit* pEdit = __pCopyPasteManager->GetEdit(); + SysTryReturn(NID_UI_CTRL, pEdit, false, E_INVALID_STATE, "[E_INVALID_STATE] pEdit is null.\n"); + + _EditPresenter* pEditPresenter = pEdit->GetPresenter(); + SysTryReturn(NID_UI_CTRL, pEditPresenter, false, E_INVALID_STATE, "[E_INVALID_STATE] pEditPresenter is null.\n"); + + TextObject* pTextObject = pEditPresenter->GetTextObject(); + SysTryReturn(NID_UI_CTRL, pTextObject, false, E_INVALID_STATE, "[E_INVALID_STATE] pEditPresenter is null.\n"); + + int curCursorLine = pTextObject->GetLineIndexAtTextIndex(__handlerCursorPos); + int totalLine = pTextObject->GetTotalLineCount(); + + float totalHeight = pTextObject->GetTotalHeightF(); + float firstDisplayY = pTextObject->GetFirstDisplayPositionYF(); + FloatRectangle absTextObjectBounds(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle textObjectBounds = pEditPresenter->GetTextBoundsF(); + FloatRectangle absEditBounds = pEdit->GetAbsoluteBoundsF(true); + absTextObjectBounds.x = absEditBounds.x + textObjectBounds.x; + absTextObjectBounds.y = absEditBounds.y + textObjectBounds.y; + absTextObjectBounds.width = textObjectBounds.width; + absTextObjectBounds.height = textObjectBounds.height; + if (__touchPressedPoint.x == point.x && __touchPressedPoint.y == point.y) + { + return true; + } + + if (__rowIndex >= 0 && __columnIndex >= 0) + { + pEditPresenter->CalculateCursorBounds(pEditPresenter->GetTextBoundsF(), cursorRect, __rowIndex, __columnIndex); + pEditPresenter->CalculateAbsoluteCursorBounds(__rowIndex, __columnIndex, absCursorRect); + } + else + { + pEditPresenter->CalculateCursorBounds(pEditPresenter->GetTextBoundsF(), cursorRect,__handlerCursorPos); + pEditPresenter->CalculateAbsoluteCursorBounds(__handlerCursorPos, absCursorRect); + } + + FloatPoint absoluteTouchMovedPoint = FloatPoint(GetBoundsF().x + point.x, GetBoundsF().y + point.y); + //Calculate handler's position + if (__singleHandler) + { + touchPoint.x = absoluteTouchMovedPoint.x; + if (__handlerDirection == HANDLER_DIRECTION_NONE) + { + touchPoint.y = absoluteTouchMovedPoint.y - GetBoundsF().height/2.0f; + } + else // HANDLER_DIRECTION_REVERSE_2 + { + touchPoint.y = absoluteTouchMovedPoint.y + GetBoundsF().height/2.0f; + } + } + else + { + if (__leftHandler) + { + if (__handlerDirection == HANDLER_DIRECTION_NONE) + { + touchPoint.x = absoluteTouchMovedPoint.x + GetBoundsF().width/2.0f; + touchPoint.y = absoluteTouchMovedPoint.y - GetBoundsF().height/2.0f; + } + else if (__handlerDirection == HANDLER_DIRECTION_REVERSE_1) + { + touchPoint.x = absoluteTouchMovedPoint.x - GetBoundsF().width/2.0f; + touchPoint.y = absoluteTouchMovedPoint.y - GetBoundsF().height/2.0f; + } + else if (__handlerDirection == HANDLER_DIRECTION_REVERSE_2) + { + touchPoint.x = absoluteTouchMovedPoint.x + GetBoundsF().width/2.0f; + touchPoint.y = absoluteTouchMovedPoint.y + GetBoundsF().height/2.0f; + } + else if (__handlerDirection == HANDLER_DIRECTION_REVERSE_3) + { + touchPoint.x = absoluteTouchMovedPoint.x - GetBoundsF().width/2.0f; + touchPoint.y = absoluteTouchMovedPoint.y + GetBoundsF().height/2.0f; + } + } + else + { + if (__handlerDirection == HANDLER_DIRECTION_NONE) + { + touchPoint.x = absoluteTouchMovedPoint.x - GetBoundsF().width/2.0f; + touchPoint.y = absoluteTouchMovedPoint.y - GetBoundsF().height/2.0f; + } + else if (__handlerDirection == HANDLER_DIRECTION_REVERSE_1) + { + touchPoint.x = absoluteTouchMovedPoint.x + GetBoundsF().width/2.0f; + touchPoint.y = absoluteTouchMovedPoint.y - GetBoundsF().height/2.0f; + } + else if (__handlerDirection == HANDLER_DIRECTION_REVERSE_2) + { + touchPoint.x = absoluteTouchMovedPoint.x - GetBoundsF().width/2.0f; + touchPoint.y = absoluteTouchMovedPoint.y + GetBoundsF().height/2.0f; + } + else if (__handlerDirection == HANDLER_DIRECTION_REVERSE_3) + { + touchPoint.x = absoluteTouchMovedPoint.x + GetBoundsF().width/2.0f; + touchPoint.y = absoluteTouchMovedPoint.y + GetBoundsF().height/2.0f; + } + } + } + if (totalHeight - firstDisplayY < absTextObjectBounds.height) + { + absTextObjectBounds.height = totalHeight - firstDisplayY - 1.0f; // check TextObject + } + + if (totalLine != 1) //single line edit doesn't need to adjust horizontal value. + { + if (absTextObjectBounds.x > touchPoint.x) + { + touchPoint.x = absTextObjectBounds.x; + } + if (absTextObjectBounds.x + absTextObjectBounds.width <= touchPoint.x) // check FloatRectangle Contains? + { + touchPoint.x = absTextObjectBounds.x + absTextObjectBounds.width - 1.0f; + } + } + if (absTextObjectBounds.y > touchPoint.y) + { + if (totalLine == 1 || firstDisplayY == 0.0f) // whether need to scroll the text or not + { + touchPoint.y = absTextObjectBounds.y; //not need to scroll the text. + } + } + if (absTextObjectBounds.y + absTextObjectBounds.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 = absTextObjectBounds.y + absTextObjectBounds.height - 1.0f; // check TextObject + } + } + + touchPoint.x = touchPoint.x - absEditBounds.x - textObjectBounds.x; + touchPoint.y = touchPoint.y - absEditBounds.y - textObjectBounds.y; + + if (Math::Abs(touchPoint.y) < 1) + { + touchPoint.y = 0.0f; + } + + int rowIndex = -1; + int columnIndex = -1; + cursorPos = pTextObject->GetTextIndexFromPosition(touchPoint.x, touchPoint.y, rowIndex, columnIndex, true); + + if (__handlerCursorPos == cursorPos) + { + return true; + } + + if (cursorPos == -1) + { + //To get cursorPos + if (totalLine != 1) + { + if (absoluteTouchMovedPoint.y > (absCursorRect.y + absCursorRect.height)) + { + if (curCursorLine < totalLine - 1) + { + int offset = __handlerCursorPos - 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 (__rowIndex == 0) + { + return true; + } + int offset = __handlerCursorPos - 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; + } + } + + if (__handlerCursorPos == cursorPos) + { + return true; + } + + if (!__singleHandler) + { + _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 (Math::Abs(nextHandler - cursorPos) == 1) + { + pTextObject->SetFirstDisplayLineIndexFromTextIndex(nextHandler); + } + } + if (nextHandler == cursorPos) + { + return true; + } + } + + if (rowIndex > -1 && columnIndex > -1) + { + __rowIndex = rowIndex; + __columnIndex = columnIndex; + } + else + { + __rowIndex = -1; + __columnIndex = -1; + } + + pTextObject->SetFirstDisplayLineIndexFromTextIndex(cursorPos); + + __handlerCursorPos = cursorPos; + + if (__rowIndex >= 0 && __columnIndex >= 0) + { + pEditPresenter->SetCursorPosition(cursorPos, __rowIndex, __columnIndex); + } + else + { + __pCopyPasteManager->SetCursorPosition(cursorPos); + } + + pEditPresenter->ScrollPanelToCursorPosition(true); + + if (!__singleHandler) + { + __pCopyPasteManager->RefreshBlock(__leftHandler); + } + else + { + pEditPresenter->DrawText(); + AdjustBounds(); + } + CheckReverseStatus(); + Invalidate(); + MoveCopyPasteMagnifier(); + + return true; +} + +bool +_EditCopyPasteHandler::IsActivatedOnOpen(void) const +{ + return false; +} + +void +_EditCopyPasteHandler::OnChangeLayout(_ControlOrientation orientation) +{ + AdjustBounds(); + 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) + , __pCoreCopyPasteEvent(null) + , __pEdit(&parenEdit) + , __pEditPresenter(null) + , __contextMenuHeight(0.0f) + , __needToReleaseBlock(true) + , __isHandlerMoving(false) + , __editVisibleArea(0.0f, 0.0f, 0.0f, 0.0f) +{ + __pEditPresenter = __pEdit->GetPresenter(); + __pHandle[HANDLER_TYPE_CENTER] = null; + __pHandle[HANDLER_TYPE_LEFT] = null; + __pHandle[HANDLER_TYPE_RIGHT] = null; + + CreateHandle(); +} + +_EditCopyPasteManager::~_EditCopyPasteManager(void) +{ + ReleaseCopyPastePopup(); + ReleaseHandle(); + + if (__pCoreCopyPasteEvent) + { + delete __pCoreCopyPasteEvent; + __pCoreCopyPasteEvent = null; + } +} + +void +_EditCopyPasteManager::ReleaseHandle(void) +{ + if (__pHandle[HANDLER_TYPE_CENTER]) + { + __pHandle[HANDLER_TYPE_CENTER]->Close(); + delete __pHandle[HANDLER_TYPE_CENTER]; + __pHandle[HANDLER_TYPE_CENTER] = null; + } + + if (__pHandle[HANDLER_TYPE_LEFT]) + { + __pHandle[HANDLER_TYPE_LEFT]->Close(); + delete __pHandle[HANDLER_TYPE_LEFT]; + __pHandle[HANDLER_TYPE_LEFT] = null; + } + + if (__pHandle[HANDLER_TYPE_RIGHT]) + { + __pHandle[HANDLER_TYPE_RIGHT]->Close(); + delete __pHandle[HANDLER_TYPE_RIGHT]; + __pHandle[HANDLER_TYPE_RIGHT] = null; + } +} + +void +_EditCopyPasteManager::ReleaseCopyPastePopup(void) +{ + if (__pCopyPastePopup) + { + __pCopyPastePopup->Close(); + delete __pCopyPastePopup; + __pCopyPastePopup = null; + } +} + +bool +_EditCopyPasteManager::IsCopyPastePopup(const _Control& control) const +{ + if (__pCopyPastePopup == &control) + { + return true; + } + + return false; +} + +bool +_EditCopyPasteManager::IsCopyPasteHandle(const _Control& control) const +{ + if (__pHandle[HANDLER_TYPE_CENTER] == &control) + { + return true; + } + + if (__pHandle[HANDLER_TYPE_LEFT] == &control) + { + return true; + } + + if (__pHandle[HANDLER_TYPE_RIGHT] == &control) + { + return true; + } + + return false; +} + +result +_EditCopyPasteManager::AddCopyPasteEventListener(const _IEditCopyPasteEventListener& listener) +{ + ClearLastResult(); + + if (__pCoreCopyPasteEvent == null) + { + __pCoreCopyPasteEvent = _EditCopyPasteEvent::CreateInstanceN(*this); + SysTryReturn(NID_UI_CTRL, __pCoreCopyPasteEvent, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred.\n"); + } + + return __pCoreCopyPasteEvent->AddListener(listener); +} + +result +_EditCopyPasteManager::SendCopyPasteEvent(CoreCopyPasteStatus status, CoreCopyPasteAction action) +{ + 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] Memory allocation failed."); + + __pCoreCopyPasteEvent->Fire(*pCopyPasteEventArg); + } + + return E_SUCCESS; +} + +void +_EditCopyPasteManager::CreateCopyPastePopup(void) +{ + if (__pHandle[HANDLER_TYPE_CENTER]) + { + __pHandle[HANDLER_TYPE_CENTER]->DestroyCopyPasteMagnifier(); + } + if (__pCopyPastePopup) + { + __pCopyPastePopup->Close(); + delete __pCopyPastePopup; + __pCopyPastePopup = null; + } + + FloatRectangle startRect; + FloatRectangle endRect; + FloatRectangle editAbsRect; + FloatRectangle editShowAreaAbsRect; + FloatRectangle commandButtonBounds; + FloatRectangle keypadBounds(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle formClientBounds(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle panelAbsoulteBounds(0.0f, 0.0f, 0.0f, 0.0f); + bool commandButtonExist = false; + bool formExist = false; + bool panelExist = false; + FloatRectangle cursorRect = GetCursorBoundsF(true); + + float contextMenuHeight = 0.0f; + float contextMenuTopMargin = 0.0f; + float contextMenuBottomMargin = 0.0f; + float contextMenuArrowHeight = 0.0f; + float handlerHeight = 0.0f; + bool isPasswordStyle = false; + bool isClipped = false; + if (__pEdit->GetEditStyle() & EDIT_STYLE_PASSWORD) + { + isPasswordStyle = true; + } + + _ControlOrientation orientation = __pEdit->GetOrientation(); + + FloatDimension screenSize; + _ControlManager* pControlManager = _ControlManager::GetInstance(); + if (orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + screenSize = pControlManager->GetScreenSizeF(); + } + else + { + screenSize.width = pControlManager->GetScreenSizeF().height; + screenSize.height = pControlManager->GetScreenSizeF().width; + } + + 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); + GET_SHAPE_CONFIG(CONTEXTMENU::ANCHOR_HEIGHT, orientation, contextMenuArrowHeight); + + isClipped = __pEdit->IsClipped(); + if ((__pEdit->GetTextLength() == 0 || __pEdit->GetEditStyle() & EDIT_STYLE_PASSWORD) && !isClipped) + { + return; + } + + if (__pEdit->GetTextLength() == 0 && (__pEditPresenter->IsViewModeEnabled())) + { + return; + } + + __contextMenuHeight = contextMenuHeight + contextMenuTopMargin + contextMenuBottomMargin + contextMenuArrowHeight; + if (isClipped && __pEditPresenter->IsViewModeEnabled() == false && __pEdit->GetTextLength() > 0 && orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + __contextMenuHeight = __contextMenuHeight + contextMenuHeight; + } + + editAbsRect = __pEdit->GetAbsoluteBoundsF(true); + + _Toolbar* pCommandButton = __pEditPresenter->GetKeypadCommandButton(); + if (pCommandButton) + { + commandButtonBounds = pCommandButton->GetAbsoluteBoundsF(true); + commandButtonExist = true; + } + _Form* pForm = __pEditPresenter->GetParentForm(); + if (pForm) + { + formClientBounds = pForm->GetClientBoundsF(); + formExist = true; + } + _ScrollPanel* pPanel = __pEditPresenter->GetParentPanel(); + if (pPanel) + { + panelAbsoulteBounds = pPanel->GetAbsoluteBoundsF(true); + panelExist = true; + } + __pEdit->GetKeypadBounds(keypadBounds); + + // Edit Show Area + { + editShowAreaAbsRect = editAbsRect; + FloatRectangle textObjectBounds = __pEditPresenter->GetTextBoundsF(); + + if (!(__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN)) + { + editShowAreaAbsRect.x += textObjectBounds.x; + editShowAreaAbsRect.y += textObjectBounds.y; + editShowAreaAbsRect.width = textObjectBounds.width; + + if (!(__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE)) + { + editShowAreaAbsRect.height = textObjectBounds.height; + } + } + if (editShowAreaAbsRect.y < 0.0f) + { + editShowAreaAbsRect.height += editShowAreaAbsRect.y; + editShowAreaAbsRect.y = 0.0f; + } + + if (commandButtonExist) + { + if (editShowAreaAbsRect.y + editShowAreaAbsRect.height > commandButtonBounds.y) + { + editShowAreaAbsRect.height -= (editShowAreaAbsRect.y + editShowAreaAbsRect.height - commandButtonBounds.y); + } + } + else + { + if (editShowAreaAbsRect.y + editShowAreaAbsRect.height > keypadBounds.y) + { + editShowAreaAbsRect.height -= (editShowAreaAbsRect.y + editShowAreaAbsRect.height - keypadBounds.y); + } + } + if (formExist) + { + if (editShowAreaAbsRect.y < formClientBounds.y) + { + editShowAreaAbsRect.y = formClientBounds.y; + editShowAreaAbsRect.height -= formClientBounds.y; + } + } + if (panelExist) + { + if (editShowAreaAbsRect.y < panelAbsoulteBounds.y) + { + editShowAreaAbsRect.height -= (panelAbsoulteBounds.y - editShowAreaAbsRect.y); + editShowAreaAbsRect.y = panelAbsoulteBounds.y; + } + } + __editVisibleArea = CoordinateSystem::AlignToDevice(editShowAreaAbsRect); + } + FloatPoint copyPastePoint(0.0f, 0.0f); + __contextMenuAlign = CONTEXT_MENU_CORE_ALIGN_UP; + + if (__pEdit->IsBlocked()) + { + int start = -1; + int end = -1; + __pEdit->GetBlockRange(start, end); + if (start == -1 || end == -1) + { + SysLog(NID_UI_CTRL, "[EditCopyPasteManager] There is no blocked Range"); + return; + } + + __pEdit->CalculateAbsoluteCursorBounds(start, startRect); + __pEdit->CalculateAbsoluteCursorBounds(end, endRect); + if (startRect.x > endRect.x) + { + copyPastePoint.x = endRect.x + (startRect.x - endRect.x)/2; + } + else if (startRect.x < endRect.x) + { + copyPastePoint.x = startRect.x + (endRect.x - startRect.x)/2; + } + else + { + copyPastePoint.x = startRect.x; + } + + if (copyPastePoint.x < editShowAreaAbsRect.x) + { + copyPastePoint.x = editShowAreaAbsRect.x; + } + else if (copyPastePoint.x > (editShowAreaAbsRect.x + editShowAreaAbsRect.width)) + { + copyPastePoint.x = editShowAreaAbsRect.x + editShowAreaAbsRect.width; + } + + //Both of handlers are located on the top of the Editor. + 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)) + { + 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))) + { + copyPastePoint.y = editShowAreaAbsRect.y + editShowAreaAbsRect.height/2; + + if (copyPastePoint.y < __contextMenuHeight) + { + __contextMenuAlign = CONTEXT_MENU_CORE_ALIGN_DOWN; + } + + } + // 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))) + { + if ((endRect.y + endRect.height + handlerHeight + __contextMenuHeight) < keypadBounds.y) + { + __contextMenuAlign = CONTEXT_MENU_CORE_ALIGN_DOWN; + copyPastePoint.y = endRect.y + endRect.height + handlerHeight; + } + else if (endRect.y - editShowAreaAbsRect.y > __contextMenuHeight) + { + copyPastePoint.y = editShowAreaAbsRect.y + __contextMenuHeight; + } + else if (endRect.y > __contextMenuHeight) + { + copyPastePoint.y = endRect.y; + } + else + { + SysLog(NID_UI_CTRL, "There is no space to draw the copy&paste popup\n"); + return; + } + } + // 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))) + { + if (__contextMenuHeight < startRect.y) + { + copyPastePoint.y = startRect.y; + } + else + { + copyPastePoint.y = startRect.y + (editShowAreaAbsRect.y + editShowAreaAbsRect.height - startRect.y)/2; + } + } + // There is a space on the top of the Editor. + else if (__contextMenuHeight < startRect.y) + { + copyPastePoint.y = startRect.y; + } + // There is a space on the bottom of the Editor. + else if (screenSize.height > (endRect.y + endRect.height + handlerHeight + __contextMenuHeight)) + { + __contextMenuAlign = CONTEXT_MENU_CORE_ALIGN_DOWN; + + copyPastePoint.y = endRect.y + endRect.height + handlerHeight; + } + // There is no space on the top and bottom of the Editor. The Popup should be drawn on the center of the Editor. + else + { + if (endRect.y - startRect.y < __contextMenuHeight) + { + SysLog(NID_UI_CTRL, "There is no space to draw the copy&paste popup\n"); + return; + } + copyPastePoint.y = startRect.y + __contextMenuHeight; + } + } + + else + { + if (editShowAreaAbsRect.height <= 0) + { + return; + } + FloatRectangle cursorRect; + bool reverseHandler = false; + int cursorPosition = GetCursorPosition(); + __pEdit->CalculateAbsoluteCursorBounds(cursorPosition, cursorRect); + copyPastePoint.x = cursorRect.x; + copyPastePoint.y = cursorRect.y; + + if (!_FloatCompare(__editVisibleArea.y + __editVisibleArea.height, copyPastePoint.y) && __editVisibleArea.y + __editVisibleArea.height < copyPastePoint.y) + { + return; + } + + 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); + + copyPastePoint.y += cursorRect.height; + __contextMenuAlign = CONTEXT_MENU_CORE_ALIGN_DOWN; + if (__pHandle[HANDLER_TYPE_CENTER]) + { + copyPastePoint.y += __pHandle[HANDLER_TYPE_CENTER]->GetBounds().height; + } + } + } + + //Todo: Create API ex)CreateContrexMenuFN + __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->IsBlocked()) + { + String copyText; + String cutText; + + GET_STRING_CONFIG(IDS_TPLATFORM_OPT_COPY, copyText); + GET_STRING_CONFIG(IDS_TPLATFORM_OPT_CUT, cutText); + + __pCopyPastePopup->AddItem(copyText, COPY_PASTE_COPY_ID, null, null, null); + if (!__pEditPresenter->IsViewModeEnabled()) + { + __pCopyPastePopup->AddItem(cutText, COPY_PASTE_CUT_ID, null, null, null); + } + } + else + { + String selectText; + String selectAllText; + + GET_STRING_CONFIG(IDS_TPLATFORM_OPT_SELECT, selectText); + GET_STRING_CONFIG(IDS_TPLATFORM_OPT_SELECT_ALL, selectAllText); + + __pCopyPastePopup->AddItem(selectText, COPY_PASTE_SELECT_ID, null, null, null); + __pCopyPastePopup->AddItem(selectAllText, COPY_PASTE_SELECT_ALL_ID, null, null, null); + } + } + + if (isClipped) + { + if (!__pEditPresenter->IsViewModeEnabled()) + { + String pasteText; + String clipboardText; + + GET_STRING_CONFIG(IDS_TPLATFORM_OPT_PASTE, pasteText); + GET_STRING_CONFIG(IDS_TPLATFORM_OPT_CLIPBOARD, clipboardText); + + __pCopyPastePopup->AddItem(pasteText, COPY_PASTE_PASTE_ID, null, null, null); + if (!isPasswordStyle && __pEdit->IsKeypadEnabled()) + { + __pCopyPastePopup->AddItem(clipboardText, COPY_PASTE_CLIPBOARD_ID, null, null, null); + } + } + } + + __pCopyPastePopup->AddActionEventListener(*this); + return; +/* + Bitmap* pSearchNormalBitmap = null; + Bitmap* pSearchPressedBitmap = null; + + Color searchColor; + Color searchPressedColor; + result r = E_SUCCESS; + + if (__pEdit->IsBlocked() && !isPasswordStyle) + { + GET_COLOR_CONFIG(CONTEXTMENU::ITEM_TEXT_NORMAL, searchColor); + GET_COLOR_CONFIG(CONTEXTMENU::ITEM_TEXT_PRESSED, searchPressedColor); + + 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)); + + 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, pSearchNormalBitmap, pSearchPressedBitmap, null); + } + + if (pSearchNormalBitmap) + { + delete pSearchNormalBitmap; + pSearchNormalBitmap = null; + } + if (pSearchPressedBitmap) + { + delete pSearchPressedBitmap; + pSearchPressedBitmap = null; + } + __pCopyPastePopup->AddActionEventListener(*this); + + return; + +CATCH: + delete pSearchNormalBitmap; + pSearchNormalBitmap = null; + + delete pSearchPressedBitmap; + pSearchPressedBitmap = null; + + return; +*/ +} + +void +_EditCopyPasteManager::CreateHandle(void) +{ + ReleaseHandle(); + + if (__pEdit->IsBlocked()) + { + int start = -1; + int end = -1; + FloatRectangle startRect; + FloatRectangle endRect; + + __pEdit->GetBlockRange(start, end); + + __pEdit->CalculateAbsoluteCursorBounds(start, startRect); + __pEdit->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); + } + else + { + FloatRectangle centerRect; + __pEdit->CalculateAbsoluteCursorBounds(__pEdit->GetCursorPosition(), centerRect); + FloatPoint centerHandler(centerRect.x, centerRect.y + centerRect.height); + + __pHandle[HANDLER_TYPE_CENTER] = _EditCopyPasteHandler::CreateInstanceN(centerHandler, __pEdit->GetCursorPosition(), this, true, true); +#if EDIT_COPY_PASTE_MAGNIFIER + __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]) + { + if (__pEdit->GetCursorPosition() != __pHandle[HANDLER_TYPE_CENTER]->GetHandlerCursorPosition()) + { + __pHandle[HANDLER_TYPE_CENTER]->SetHandlerCursorPosition(__pEdit->GetCursorPosition()); + } + __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]) + { + AdjustBounds(); + __pHandle[HANDLER_TYPE_LEFT]->CheckReverseStatus(); + __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(); + __pCopyPastePopup->ReleaseTouchCapture(); + + _Control* pControl = __pCopyPastePopup->GetOwner(); + if (pControl) + { + pControl->UnlockInputEvent(); + } + } +} + +bool +_EditCopyPasteManager::CheckHandleBounds(const FloatPoint& point) +{ + bool hasCommandButton = false; + bool hasParentForm = false; + bool hasParentPanel = false; + bool showCheck = true; + FloatRectangle commandButtonBounds(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle formClientBounds(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle panelAbsoulteBounds(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle editAbsBounds = __pEdit->GetAbsoluteBoundsF(true); + FloatRectangle textObjectBounds = __pEditPresenter->GetTextBoundsF(); + + if (!(__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN)) + { + editAbsBounds.x += textObjectBounds.x; + editAbsBounds.y += textObjectBounds.y; + editAbsBounds.width = textObjectBounds.width; + + if (!(__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE)) + { + editAbsBounds.height = textObjectBounds.height; + } + } + + _Toolbar* pCommandButton = __pEditPresenter->GetKeypadCommandButton(); + if (pCommandButton) + { + commandButtonBounds = pCommandButton->GetAbsoluteBoundsF(true); + hasCommandButton = true; + } + _Form* pForm = __pEditPresenter->GetParentForm(); + if (pForm) + { + formClientBounds = pForm->GetClientBoundsF(); + hasParentForm = true; + } + + _ScrollPanel* pPanel = __pEditPresenter->GetParentPanel(); + if (pPanel) + { + panelAbsoulteBounds = pPanel->GetAbsoluteBoundsF(true); + hasParentPanel = true; + } + + if ((!_FloatCompare(editAbsBounds.x, point.x) && (editAbsBounds.x > point.x)) || (!_FloatCompare(point.x, editAbsBounds.x + editAbsBounds.width) && point.x > (editAbsBounds.x + editAbsBounds.width))) + { + showCheck = false; + } + + if ((!_FloatCompare(editAbsBounds.y, point.y) && (editAbsBounds.y > point.y)) || (!_FloatCompare(point.y, editAbsBounds.y + editAbsBounds.height) && point.y > (editAbsBounds.y + editAbsBounds.height))) + { + showCheck = false; + } + if (hasParentForm && ((!_FloatCompare(formClientBounds.y, point.y) && formClientBounds.y > point.y) || (!_FloatCompare(point.y, formClientBounds.y + formClientBounds.height) && point.y > (formClientBounds.y + formClientBounds.height)))) + { + showCheck = false; + } + if (hasParentPanel && ((!_FloatCompare(panelAbsoulteBounds.y, point.y) && panelAbsoulteBounds.y > point.y) || (!_FloatCompare(point.y, panelAbsoulteBounds.y + panelAbsoulteBounds.height) && point.y > (panelAbsoulteBounds.y + panelAbsoulteBounds.height)))) + { + showCheck = false; + } + if (hasCommandButton && commandButtonBounds.Contains(point)) + { + showCheck = false; + } + return showCheck; +} + +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_LEFT]->GetHandlerRowColumnIndex(leftRowIndex, leftColumnIndex); + __pHandle[HANDLER_TYPE_RIGHT]->GetHandlerRowColumnIndex(rightRowIndex, rightColumnIndex); + + if (leftHandlerPos <= rightHandlerPos) + { + if (leftRowIndex != -1 && leftColumnIndex != -1 && rightRowIndex != -1 && rightColumnIndex != -1) + { + __pEditPresenter->SetBlockRange(leftHandlerPos, rightHandlerPos, leftRowIndex, leftColumnIndex, rightRowIndex, rightColumnIndex); + } + else + { + __pEditPresenter->SetBlockRange(leftHandlerPos, rightHandlerPos); + } + __pEditPresenter->SetCursorChangedFlag(!isLeftHandle); + } + else + { + if (leftRowIndex != -1 && leftColumnIndex != -1 && rightRowIndex != -1 && rightColumnIndex != -1) + { + __pEditPresenter->SetBlockRange(rightHandlerPos, leftHandlerPos, rightRowIndex, rightColumnIndex, leftRowIndex, leftColumnIndex); + } + else + { + __pEditPresenter->SetBlockRange(rightHandlerPos, leftHandlerPos); + } + __pEditPresenter->SetCursorChangedFlag(isLeftHandle); + } + __pEditPresenter->DrawText(); + AdjustBounds(); +} + +FloatRectangle +_EditCopyPasteManager::GetCursorBoundsF(bool isAbsRect) const +{ + FloatRectangle cursorBounds; + + __pEdit->GetCursorBounds(isAbsRect, cursorBounds); + + return cursorBounds; +} + +int +_EditCopyPasteManager::GetCursorPositionAt(const FloatPoint& touchPoint) const +{ + return __pEdit->GetCursorPositionAt(touchPoint); +} + +result +_EditCopyPasteManager::SetCursorPosition(int position) +{ + return __pEdit->SetCursorPosition(position); +} + +int +_EditCopyPasteManager::GetCursorPosition(void) const +{ + return __pEdit->GetCursorPosition(); +} + +int +_EditCopyPasteManager::GetHandlerCursorPosition(HandlerType handlerType) const +{ + if (__pHandle[handlerType]) + { + return __pHandle[handlerType]->GetHandlerCursorPosition(); + } + else + { + return -1; + } +} + +void +_EditCopyPasteManager::SendTextBlockEvent(void) +{ + int start = -1; + int end = -1; + result r = E_SUCCESS; + + __pEdit->GetBlockRange(start, end); + if (start != -1 && end != -1) + { + r = __pEdit->SendTextBlockEvent(start, end); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } +} + +void +_EditCopyPasteManager::OnActionPerformed(const _Control& source, int actionId) +{ + _Clipboard* pClipBoard = _Clipboard::GetInstance(); + SysTryReturnVoidResult(NID_UI_CTRL, pClipBoard, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + ReleaseCopyPastePopup(); + + switch (actionId) + { + case COPY_PASTE_SELECT_ID: + { + int cursorPos = GetCursorPosition(); + int start, end; + + __pEdit->GetWordPosition(cursorPos, start, end); + __pEdit->SetBlockRange(start, end); + SendTextBlockEvent(); + __pEditPresenter->UpdateComponentInformation(); + CreateHandle(); + CreateCopyPastePopup(); + Show(); + + __pEdit->Draw(); + } + break; + + case COPY_PASTE_SELECT_ALL_ID: + { + int textLength = __pEdit->GetTextLength(); + __pEdit->SetBlockRange(0, textLength); + SendTextBlockEvent(); + __pEditPresenter->UpdateComponentInformation(); + CreateHandle(); + CreateCopyPastePopup(); + Show(); + + __pEdit->Draw(); + } + break; + + case COPY_PASTE_COPY_ID: + ReleaseCopyPastePopup(); + SendCopyPasteEvent(CORE_COPY_PASTE_STATUS_HIDE, CORE_COPY_PASTE_ACTION_COPY); + break; + + case COPY_PASTE_CUT_ID: + SendCopyPasteEvent(CORE_COPY_PASTE_STATUS_HIDE, CORE_COPY_PASTE_ACTION_CUT); + break; + + case COPY_PASTE_PASTE_ID: + SendCopyPasteEvent(CORE_COPY_PASTE_STATUS_HIDE, CORE_COPY_PASTE_ACTION_PASTE); + break; + + case COPY_PASTE_CLIPBOARD_ID: + 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(); + SendCopyPasteEvent(CORE_COPY_PASTE_STATUS_HIDE, CORE_COPY_PASTE_ACTION_SEARCH); + break; + default: + break; + } + + return; +} + +void +_EditCopyPasteManager::AdjustBounds(void) +{ + if (__pHandle[HANDLER_TYPE_CENTER]) + { + __pHandle[HANDLER_TYPE_CENTER]->AdjustBounds(); + } + if (__pHandle[HANDLER_TYPE_LEFT]) + { + __pHandle[HANDLER_TYPE_LEFT]->AdjustBounds(); + } + if (__pHandle[HANDLER_TYPE_RIGHT]) + { + __pHandle[HANDLER_TYPE_RIGHT]->AdjustBounds(); + } +} + +void +_EditCopyPasteManager::LaunchSearch(void) +{ + result r = E_SUCCESS; + int start = -1; + int end = -1; + __pEdit->GetBlockRange(start, end); + String blockText = __pEditPresenter->GetText(start, end-1); + + _AppMessageImpl msg; + + msg.AddData(APPSVC_DATA_KEYWORD, blockText); + r = _AppControlManager::GetInstance()->LaunchPkg(msg, null, APPSVC_OPERATION_SEARCH, null, null, 0, 0); +} + +bool +_EditCopyPasteManager::GetTextBlockReleaseFlag(void) const +{ + return __needToReleaseBlock; +} + +void +_EditCopyPasteManager::SetTextBlockReleaseFlag(bool enabled) +{ + __needToReleaseBlock = enabled; +} + +bool +_EditCopyPasteManager::IsCopyPasteHandleExist(void) const +{ + if (__pHandle[HANDLER_TYPE_CENTER] || (__pHandle[HANDLER_TYPE_LEFT] && __pHandle[HANDLER_TYPE_RIGHT])) + { + return true; + } + else + { + return false; + } +} + +bool +_EditCopyPasteManager::IsCopyPasteSingleHandleExist(void) const +{ + if (__pHandle[HANDLER_TYPE_CENTER]) + { + return true; + } + else + { + return false; + } +} + +void +_EditCopyPasteManager::UpdateCopyPasteMagnifier(void) +{ + for (int i = 0; i < HANDLER_TYPE_MAX; i++) + { + if (__pHandle[i]) + { + __pHandle[i]->UpdateCopyPasteMagnifier(); + } + } +} + +_Edit* +_EditCopyPasteManager::GetEdit(void) const +{ + return __pEdit; +} + +void +_EditCopyPasteManager::MoveHandler(HandlerMoveType moveType) +{ + if (!__pHandle[HANDLER_TYPE_RIGHT] || !__pHandle[HANDLER_TYPE_LEFT]) + { + return; + } + + int leftHandlerPosition = __pHandle[HANDLER_TYPE_LEFT]->GetHandlerCursorPosition(); + int rightHandlerPosition = __pHandle[HANDLER_TYPE_RIGHT]->GetHandlerCursorPosition(); + int textLength = __pEdit->GetTextLength(); + FloatRectangle rightHandlerCursorBounds; + int newCursorPosition; + __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 == 0) + { + return; + } + --rightHandlerPosition; + } + 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 -= rightHandlerCursorBounds.height/2.0f; + newCursorPosition = GetCursorPositionAt(cursorPoint); + + if (newCursorPosition <= 0) + { + int curCursorLine = pTextObject->GetLineIndexAtTextIndex(pTextObject->GetCursorIndex()); + + if (curCursorLine !=0) + { + int offset = rightHandlerPosition - pTextObject->GetFirstTextIndexAt(curCursorLine); + int firstTextIndex = pTextObject->GetFirstTextIndexAt(curCursorLine-1); + newCursorPosition = offset + firstTextIndex; + int textLength = pTextObject->GetTextLengthAt(curCursorLine-1); + if (offset > textLength) + { + newCursorPosition = firstTextIndex+textLength; + } + } + } + + 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(); + } + else + { + return; + } + break; + case HANDLER_MOVE_TYPE_DOWN: + cursorPoint.y += rightHandlerCursorBounds.height + rightHandlerCursorBounds.height/2.0f; + newCursorPosition = GetCursorPositionAt(cursorPoint); + + if (newCursorPosition < 0) + { + int curCursorLine = pTextObject->GetLineIndexAtTextIndex(pTextObject->GetCursorIndex()); + int totalLine = pTextObject->GetTotalLineCount(); + if (curCursorLine < totalLine - 1) + { + int offset = rightHandlerPosition - pTextObject->GetFirstTextIndexAt(curCursorLine); + int firstTextIndex = pTextObject->GetFirstTextIndexAt(curCursorLine+1); + newCursorPosition = offset + firstTextIndex; + int textLength = pTextObject->GetTextLengthAt(curCursorLine+1); + if (offset > textLength) + { + newCursorPosition = firstTextIndex+textLength; + + } + } + else if (curCursorLine == totalLine - 1) + { + int firstTextIndex = pTextObject->GetFirstTextIndexAt(curCursorLine); + int textLength = pTextObject->GetTextLengthAt(curCursorLine); + newCursorPosition = firstTextIndex + textLength; + } + } + + 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(); + } + else + { + return; + } + break; + case HANDLER_MOVE_TYPE_RIGHT: + if (textLength >= rightHandlerPosition+1) + { + 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(); + } + else + { + return; + } + break; + default: + break; + } + + ReleaseCopyPastePopup(); + __isHandlerMoving = true; + return; +} + +bool +_EditCopyPasteManager::IsHandlerMovingEnabled(void) const +{ + return __isHandlerMoving; +} + +void +_EditCopyPasteManager::SetHandlerMovingEnabled(bool enabled) +{ + __isHandlerMoving = enabled; +} + +Rectangle +_EditCopyPasteManager::GetEditVisibleArea(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetEditVisibleAreaF()); +} + +FloatRectangle +_EditCopyPasteManager::GetEditVisibleAreaF(void) const +{ + return __editVisibleArea; +} + +_ContextMenu* +_EditCopyPasteManager::GetCopyPastePopup(void) const +{ + return __pCopyPastePopup; +} + +void +_EditCopyPasteManager::GetHandlerRowColumnIndex(bool singleHandler, bool leftHandler, int& rowIndex, int& columnIndex) const +{ + HandlerType handlerType = HANDLER_TYPE_MAX; + if (singleHandler) + { + handlerType = HANDLER_TYPE_CENTER; + } + else if (leftHandler) + { + handlerType = HANDLER_TYPE_LEFT; + } + else + { + handlerType = HANDLER_TYPE_RIGHT; + } + + if (__pHandle[handlerType]) + { + __pHandle[handlerType]->GetHandlerRowColumnIndex(rowIndex, columnIndex); + } + else + { + rowIndex = -1; + columnIndex = -1; + } + + 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 new file mode 100644 index 0000000..02f4807 --- /dev/null +++ b/src/ui/controls/FUiCtrl_EditDate.cpp @@ -0,0 +1,1312 @@ +// +// 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_EditDate.cpp + * @brief This is the implementation file for the _EditDate class. + */ + +#include +#include "FUi_AccessibilityContainer.h" +#include "FUi_AccessibilityElement.h" +#include "FUi_ResourceManager.h" +#include "FUiAnim_VisualElement.h" +#include "FUiCtrl_EditDate.h" +#include "FUiCtrl_EditDatePresenter.h" +#include "FUiCtrl_Form.h" +#include "FUiCtrl_Frame.h" +#include "FUiCtrl_DateTimeUtils.h" +#include "FUi_CoordinateSystemUtils.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Ui; +using namespace Tizen::System; + +namespace Tizen { namespace Ui { namespace Controls +{ + +IMPLEMENT_PROPERTY(_EditDate); + +_EditDate::_EditDate(void) + : __pEditDatePresenter(null) + , __pDateChangeEvent(null) + , __pDateTimeBar(null) + , __absoluteBounds(FloatRectangle()) + , __previousSize(0.0f, 0.0f) + , __title() + , __pAccessibilityEditDateElement(null) + , __pAccessibilityYearElement(null) + , __pAccessibilityMonthElement(null) + , __pAccessibilityDayElement(null) + , __isCalledBoundsChanged(false) + , __isXmlBoundsExist(false) + , __pParentPanel(null) + , __isEnterKeyPressed(false) +{ +} + +_EditDate::~_EditDate(void) +{ + SettingInfo::RemoveSettingEventListener(*this); + + delete __pDateTimeBar; + __pDateTimeBar = null; + + delete __pEditDatePresenter; + __pEditDatePresenter = null; + + delete __pDateChangeEvent; + __pDateChangeEvent = null; + + if (__pAccessibilityEditDateElement != null) + { + __pAccessibilityEditDateElement->Activate(false); + __pAccessibilityEditDateElement = null; + } + if (__pAccessibilityYearElement != null) + { + __pAccessibilityYearElement->Activate(false); + __pAccessibilityYearElement = null; + } + if (__pAccessibilityMonthElement != null) + { + __pAccessibilityMonthElement->Activate(false); + __pAccessibilityMonthElement = null; + } + if (__pAccessibilityDayElement != null) + { + __pAccessibilityDayElement->Activate(false); + __pAccessibilityDayElement = null; + } + if (__pParentPanel != null) + { + __pParentPanel->RemoveScrollEventListener(*this); + } +} + +_EditDate* +_EditDate::CreateEditDateN(const String& title) +{ + result r = E_SUCCESS; + + _AccessibilityContainer* pContainer = null; + + _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); + + pEditDate->__pEditDatePresenter = _EditDatePresenter::CreateInstanceN(*pEditDate, title); + + r = pEditDate->CreateDateTimeBar(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pEditDate->__pEditDatePresenter->Initialize(); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, pEditDate->__pEditDatePresenter, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pEditDate->__pEditDatePresenter->SetCurrentDate(); + + if (!title.IsEmpty()) + { + pEditDate->__title = title; + } + + pContainer = pEditDate->GetAccessibilityContainer(); + + if (pContainer != null) + { + pContainer->Activate(true); + pEditDate->CreateAccessibilityElement(); + } + + pEditDate->AcquireHandle(); + pEditDate->SetTouchPressThreshold(_TOUCH_PRESS_THRESHOLD_INSENSITIVE); + + return pEditDate; + +CATCH: + delete pEditDate; + return null; +} + +result +_EditDate::CreateDateTimeBar(void) +{ + result r = E_SUCCESS; + + __pDateTimeBar = _DateTimeBar::CreateDateTimeBarN(*this); + 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)); + + r = __pDateTimeBar->AddDateTimeChangeEventListener(*this); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = SettingInfo::AddSettingEventListener(*this); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + GET_SHAPE_CONFIG(EDITDATE::WIDTH, GetOrientation(), __previousSize.width); + GET_SHAPE_CONFIG(EDITDATE::HEIGHT, GetOrientation(), __previousSize.height); + + return r; + +CATCH: + delete __pDateTimeBar; + return r; +} + +result +_EditDate::AddDateChangeEventListener(const _IDateTimeChangeEventListener& listener) +{ + if (__pDateChangeEvent == null) + { + __pDateChangeEvent = new (std::nothrow) _DateTimeChangeEvent(*this); + SysTryReturn(NID_UI_CTRL, (__pDateChangeEvent != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, + "[E_OUT_OF_MEMORY] Memory allocation failed."); + } + + result r = __pDateChangeEvent->AddListener(listener); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +_EditDate::RemoveDateChangeEventListener(const _IDateTimeChangeEventListener& listener) +{ + result r = E_OBJ_NOT_FOUND; + + if (__pDateChangeEvent != null) + { + r = __pDateChangeEvent->RemoveListener(listener); + } + + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +void +_EditDate::SetDate(const DateTime& date) +{ + SetProperty("date", Variant(date)); + return; +} + +result +_EditDate::SetPropertyDate(const Variant& date) +{ + SysTryReturn(NID_UI_CTRL, (__pEditDatePresenter != null), E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. The _EditDatePresenter instance is null."); + + __pEditDatePresenter->SetDate(date.ToDateTime()); + + UpdateAccessibilityElement(); + return E_SUCCESS; +} + +DateTime +_EditDate::GetDate(void) const +{ + Variant date = GetProperty("date"); + + return date.ToDateTime(); +} + +Variant +_EditDate::GetPropertyDate(void) const +{ + DateTime date; + + SysTryReturn(NID_UI_CTRL, (__pEditDatePresenter != null), Variant(), E_SYSTEM, + "[E_SYSTEM] A system error has occurred. The _EditDatePresenter instance is null."); + + date = __pEditDatePresenter->GetDate(); + + return Variant(date); +} + +result +_EditDate::SetDay(int day) +{ + result r = E_SUCCESS; + + SetProperty("day", Variant(day)); + + r = GetLastResult(); + + return r; +} + +result +_EditDate::SetPropertyDay(const Variant& day) +{ + result r = E_SUCCESS; + + SysTryReturn(NID_UI_CTRL, (__pEditDatePresenter != null), E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. The _EditDatePresenter instance is null."); + + r = __pEditDatePresenter->SetDay(day.ToInt()); + + if (r == E_SUCCESS) + { + UpdateAccessibilityElement(); + } + + return r; +} + +int +_EditDate::GetDay(void) const +{ + Variant day = GetProperty("day"); + + return day.ToInt(); +} + +Variant +_EditDate::GetPropertyDay(void) const +{ + int day = -1; + + SysTryReturn(NID_UI_CTRL, (__pEditDatePresenter != null), Variant(), E_SYSTEM, + "[E_SYSTEM] A system error has occurred. The _EditDatePresenter instance is null."); + + day = __pEditDatePresenter->GetDay(); + + return Variant(day); +} + +result +_EditDate::SetMonth(int month) +{ + result r = E_SUCCESS; + + SetProperty("month", Variant(month)); + + r = GetLastResult(); + + return r; +} + +result +_EditDate::SetPropertyMonth(const Variant& month) +{ + result r = E_SUCCESS; + + SysTryReturn(NID_UI_CTRL, (__pEditDatePresenter != null), E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. The _EditDatePresenter instance is null."); + + int day; + int maxValue = -1; + + _DateTimeUtils dateTimeUtils; + + maxValue = dateTimeUtils.CalculateMaxDay(GetYear(), month.ToInt()); + day = __pEditDatePresenter->GetDay(); + + if (day > maxValue) + { + __pEditDatePresenter->SetDay(maxValue); + } + + r = __pEditDatePresenter->SetMonth(month.ToInt()); + + if (r == E_SUCCESS) + { + UpdateAccessibilityElement(); + } + + return r; +} + +int +_EditDate::GetMonth(void) const +{ + Variant month = GetProperty("month"); + + return month.ToInt(); +} + +Variant +_EditDate::GetPropertyMonth(void) const +{ + int month = -1; + + SysTryReturn(NID_UI_CTRL, (__pEditDatePresenter != null), Variant(), E_SYSTEM, + "[E_SYSTEM] A system error has occurred. The _EditDatePresenter instance is null."); + + month = __pEditDatePresenter->GetMonth(); + + return Variant(month); +} + +result +_EditDate::SetYear(int year) +{ + result r = E_SUCCESS; + + SetProperty("year", Variant(year)); + + r = GetLastResult(); + + return r; +} + +result +_EditDate::SetPropertyYear(const Variant& year) +{ + result r = E_SUCCESS; + + SysTryReturn(NID_UI_CTRL, (__pEditDatePresenter != null), E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. The _EditDatePresenter instance is null."); + + int day; + int maxValue = -1; + _DateTimeUtils dateTimeUtils; + + maxValue = dateTimeUtils.CalculateMaxDay(year.ToInt(), GetMonth()); + day = __pEditDatePresenter->GetDay(); + + if (day > maxValue) + { + __pEditDatePresenter->SetDay(maxValue); + } + + r = __pEditDatePresenter->SetYear(year.ToInt()); + + if (r == E_SUCCESS) + { + UpdateAccessibilityElement(); + } + + return r; +} + +int +_EditDate::GetYear(void) const +{ + Variant year = GetProperty("year"); + + return year.ToInt(); +} + +Variant +_EditDate::GetPropertyYear(void) const +{ + int year = -1; + + SysTryReturn(NID_UI_CTRL, (__pEditDatePresenter != null), Variant(), E_SYSTEM, + "[E_SYSTEM] A system error has occurred. The _EditDatePresenter instance is null."); + + year = __pEditDatePresenter->GetYear(); + + return Variant(year); +} + +void +_EditDate::SetCurrentDate(void) +{ + SysTryReturnVoidResult(NID_UI_CTRL, (__pEditDatePresenter != null), E_SYSTEM, + "[E_SYSTEM] A system error has occurred. The _EditDatePresenter instance is null."); + + __pEditDatePresenter->SetCurrentDate(); + + UpdateAccessibilityElement(); + + return; +} + +void +_EditDate::SetDatePickerEnabled(bool enable) +{ + SetProperty("datePickerEnabled", Variant(enable)); + return; +} + +result +_EditDate::SetPropertyDatePickerEnabled(const Variant& enable) +{ + SysTryReturn(NID_UI_CTRL, (__pEditDatePresenter != null), E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. The _EditDatePresenter instance is null."); + + __pEditDatePresenter->SetDatePickerEnabled(enable.ToBool()); + + return E_SUCCESS; +} + +bool +_EditDate::IsDatePickerEnabled(void) const +{ + Variant enable = GetProperty("datePickerEnabled"); + + return enable.ToBool(); +} + +Variant +_EditDate::GetPropertyDatePickerEnabled(void) const +{ + bool enable = false; + + SysTryReturn(NID_UI_CTRL, (__pEditDatePresenter != null), Variant(), E_SYSTEM, + "[E_SYSTEM] A system error has occurred. The _EditDatePresenter instance is null."); + + enable = __pEditDatePresenter->IsDatePickerEnabled(); + + return Variant(enable); +} + +result +_EditDate::SetYearRange(int minYear, int maxYear) +{ + result r = E_SUCCESS; + + SysTryReturn(NID_UI_CTRL, (maxYear >= DATETIME_YEAR_MIN && maxYear <= DATETIME_YEAR_MAX), E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] maxYear(%d) must be greater than or equal to %d and less than or equal to %d.", + maxYear, DATETIME_YEAR_MIN, DATETIME_YEAR_MAX); + + SysTryReturn(NID_UI_CTRL, (minYear >= DATETIME_YEAR_MIN && minYear <= DATETIME_YEAR_MAX), E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] minYear(%d) must be greater than or equal to %d and less than or equal to %d.", + minYear, DATETIME_YEAR_MIN, DATETIME_YEAR_MAX); + + SysTryReturn(NID_UI_CTRL, (maxYear >= minYear), E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] maxYear(%d) must be greater than or equal to minYear(%d).", maxYear, minYear); + + Variant oldMinYear = GetPropertyMinYearRange(); + + r = SetPropertyMinYearRange(Variant(minYear)); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = SetPropertyMaxYearRange(Variant(maxYear)); + + if (IsFailed(r)) + { + SetPropertyMinYearRange(oldMinYear); + } + + return r; +} + +result +_EditDate::SetMinYearRange(int minYear) +{ + result r = E_SUCCESS; + + r = SetProperty("minYearRange", Variant(minYear)); + + return r; +} + +result +_EditDate::SetMaxYearRange(int maxYear) +{ + result r = E_SUCCESS; + + r = SetProperty("maxYearRange", Variant(maxYear)); + + return r; +} + +result +_EditDate::SetPropertyMinYearRange(const Variant& minYear) +{ + SysTryReturn(NID_UI_CTRL, (__pEditDatePresenter != null), E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. The _EditDatePresenter instance is null."); + + return __pEditDatePresenter->SetMinYear(minYear.ToInt()); +} + +result +_EditDate::SetPropertyMaxYearRange(const Variant& maxYear) +{ + SysTryReturn(NID_UI_CTRL, (__pEditDatePresenter != null), E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. The _EditDatePresenter instance is null."); + + return __pEditDatePresenter->SetMaxYear(maxYear.ToInt()); +} + +result +_EditDate::GetYearRange(int& minYear, int& maxYear) const +{ + result r = E_SUCCESS; + + minYear = GetMinYearRange(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + maxYear = GetMaxYearRange(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +int +_EditDate::GetMinYearRange(void) const +{ + Variant minYear = GetProperty("minYearRange"); + + return minYear.ToInt(); +} + +int +_EditDate::GetMaxYearRange(void) const +{ + Variant maxYear = GetProperty("maxYearRange"); + + return maxYear.ToInt(); +} + +Variant +_EditDate::GetPropertyMinYearRange(void) const +{ + SysTryReturn(NID_UI_CTRL, (__pEditDatePresenter != null), Variant(), E_SYSTEM, + "[E_SYSTEM] A system error has occurred. The _EditDatePresenter instance is null."); + + int minYear = 0; + + minYear = __pEditDatePresenter->GetMinYear(); + + return Variant(minYear); +} + +Variant +_EditDate::GetPropertyMaxYearRange(void) const +{ + SysTryReturn(NID_UI_CTRL, (__pEditDatePresenter != null), Variant(), E_SYSTEM, + "[E_SYSTEM] A system error has occurred. The _EditDatePresenter instance is null."); + + int maxYear = 0; + + maxYear = __pEditDatePresenter->GetMaxYear(); + + return Variant(maxYear); +} + +result +_EditDate::CalculateDateTimeBarPosition(void) +{ + result r = E_SUCCESS; + + float dateTimeBarHeight = 0.0f; + float arrowHeight = 0.0f; + float dateHeight = 0.0f; + float dateBarMargin = 0.0f; + float textHeight = 0.0f; + float titleDateMargin = 0.0f; + float bottomPosition = 0.0f; + float dateY = 0.0f; + + FloatRectangle absoluteBounds; + FloatRectangle frameBounds; + FloatRectangle parentWindowBounds; + FloatRectangle titleBounds; + + _Frame* pFrame = dynamic_cast<_Frame*>(_ControlManager::GetInstance()->GetCurrentFrame()); + SysTryReturn(NID_UI_CTRL, pFrame != null, E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get frame instance."); + + absoluteBounds = GetAbsoluteBoundsF(true); + frameBounds = pFrame->GetAbsoluteBoundsF(true); + parentWindowBounds = GetParentWindowBounds(); + titleBounds = __pEditDatePresenter->GetTitleBounds(); + + GET_SHAPE_CONFIG(DATETIMEBAR::ITEM_HEIGHT, GetOrientation(), dateTimeBarHeight); + GET_SHAPE_CONFIG(DATETIMEBAR::ARROW_HEIGHT, GetOrientation(), arrowHeight); + GET_SHAPE_CONFIG(EDITDATE::DATE_HEIGHT, GetOrientation(), dateHeight); + GET_SHAPE_CONFIG(EDITDATE::DATE_BAR_MARGIN, GetOrientation(), dateBarMargin); + GET_SHAPE_CONFIG(EDITDATE::TITLE_HEIGHT, GetOrientation(), textHeight); + GET_SHAPE_CONFIG(EDITDATE::TITLE_DATE_MARGIN, GetOrientation(), titleDateMargin); + + if (!__title.IsEmpty()) //with title + { + dateY = titleBounds.y + textHeight + titleDateMargin ; + } + else //without title + { + dateY = (absoluteBounds.height - dateHeight) / 2.0f ; + } + + bottomPosition = absoluteBounds.y + dateY + dateHeight + dateBarMargin + arrowHeight + dateTimeBarHeight; + + GetDateTimeBar()->SetParentWindowBounds(parentWindowBounds); + + if (bottomPosition > frameBounds.y + parentWindowBounds.y + parentWindowBounds.height) + { + r = GetDateTimeBar()->SetPositionAndAlignment(FloatPoint(parentWindowBounds.x, absoluteBounds.y + dateY - dateBarMargin - arrowHeight), DATETIME_BAR_ALIGN_UP); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + r = GetDateTimeBar()->SetPositionAndAlignment(FloatPoint(parentWindowBounds.x, absoluteBounds.y + dateY + dateHeight + dateBarMargin + arrowHeight), DATETIME_BAR_ALIGN_DOWN); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + __absoluteBounds = absoluteBounds; + + return r; +} + +void +_EditDate::OnDraw(void) +{ + if (GetDateTimeBar() != null) + { + FloatRectangle absoluteBounds = GetAbsoluteBoundsF(true); + + if (absoluteBounds.y != __absoluteBounds.y || absoluteBounds.height != __absoluteBounds.height) + { + CalculateDateTimeBarPosition(); + } + } + + __pEditDatePresenter->Draw(); + return; +} + +void +_EditDate::CreateAccessibilityElement(void) +{ + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + + FloatRectangle dayBounds = __pEditDatePresenter->GetDateAreaBounds(DATETIME_ID_DAY); + 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 (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"); + pContainer->AddElement(*__pAccessibilityEditDateElement); + } + + if (__pAccessibilityYearElement == null && __pAccessibilityMonthElement == null && __pAccessibilityDayElement == null) + { + __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->SetBounds(yearBounds); + __pAccessibilityYearElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_YEAR_LC"); + __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->SetBounds(monthBounds); + __pAccessibilityMonthElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_MONTH_LC"); + __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->SetBounds(dayBounds); + __pAccessibilityDayElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_DAY_LC"); + __pAccessibilityDayElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_EDIT_T_TTS"); + + switch (localeDateFormat) + { + case DATE_FORMAT_DDMMYYYY: + pContainer->AddElement(*__pAccessibilityDayElement); + pContainer->AddElement(*__pAccessibilityMonthElement); + pContainer->AddElement(*__pAccessibilityYearElement); + break; + case DATE_FORMAT_MMDDYYYY: + pContainer->AddElement(*__pAccessibilityMonthElement); + pContainer->AddElement(*__pAccessibilityDayElement); + pContainer->AddElement(*__pAccessibilityYearElement); + break; + case DATE_FORMAT_YYYYMMDD: + pContainer->AddElement(*__pAccessibilityYearElement); + pContainer->AddElement(*__pAccessibilityMonthElement); + pContainer->AddElement(*__pAccessibilityDayElement); + break; + case DATE_FORMAT_YYYYDDMM: + pContainer->AddElement(*__pAccessibilityYearElement); + pContainer->AddElement(*__pAccessibilityDayElement); + pContainer->AddElement(*__pAccessibilityMonthElement); + break; + default: + break; + } + UpdateAccessibilityElement(); + } + + return; + +CATCH: + delete __pAccessibilityYearElement; + __pAccessibilityYearElement = null; + + delete __pAccessibilityMonthElement; + __pAccessibilityMonthElement = null; + + return; +} + +void +_EditDate::OnBoundsChanged(void) +{ + FloatDimension newSize = GetSizeF(); + + if (newSize.width != __previousSize.width || newSize.height != __previousSize.height) + { + __isCalledBoundsChanged = true; + } + + __pEditDatePresenter->Initialize(); + + if (__pAccessibilityEditDateElement != null) + { + __pAccessibilityEditDateElement->SetBounds(GetClientBoundsF()); + } + if (__pAccessibilityYearElement != null) + { + __pAccessibilityYearElement->SetBounds(__pEditDatePresenter->GetDateAreaBounds(DATETIME_ID_YEAR)); + } + if (__pAccessibilityMonthElement != null) + { + __pAccessibilityMonthElement->SetBounds(__pEditDatePresenter->GetDateAreaBounds(DATETIME_ID_MONTH)); + } + if (__pAccessibilityDayElement != null) + { + __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; +} + +void +_EditDate::OnChangeLayout(_ControlRotation rotation) +{ + if (!__isCalledBoundsChanged && !__isXmlBoundsExist) + { + FloatRectangle bounds = GetBoundsF(); + + GET_SHAPE_CONFIG(EDITDATE::WIDTH, GetOrientation(), bounds.width); + GET_SHAPE_CONFIG(EDITDATE::HEIGHT, GetOrientation(), bounds.height); + + SetBounds(bounds, false); + } + + __pEditDatePresenter->Initialize(); + + 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; +} + +bool +_EditDate::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + FloatRectangle absoluteBounds = GetAbsoluteBoundsF(true); + + if (absoluteBounds.y != __absoluteBounds.y || absoluteBounds.height != __absoluteBounds.height) + { + CalculateDateTimeBarPosition(); + } + + return __pEditDatePresenter->OnTouchPressed(source, touchinfo); +} + +bool +_EditDate::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pEditDatePresenter->OnTouchReleased(source, touchinfo); +} + +bool +_EditDate::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pEditDatePresenter->OnTouchCanceled(source, touchinfo); +} + +bool +_EditDate::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pEditDatePresenter->OnTouchMoved(source, touchinfo); +} + +void +_EditDate::OnTouchMoveHandled(const _Control& control) +{ + __pEditDatePresenter->OnTouchMoveHandled(control); + return; +} + +result +_EditDate::FireDateChangeEvent(_DateTimeChangeStatus status) +{ + SysTryReturn(NID_UI_CTRL, (__pDateChangeEvent != null), E_INVALID_STATE, E_INVALID_STATE, + "[E_INVALID_STATE] The _DateChangeEvent instance is null."); + + _DateTimeChangeEventArg* pDateTimeEventArg = new (std::nothrow) _DateTimeChangeEventArg(status); + SysTryReturn(NID_UI_CTRL, pDateTimeEventArg, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pDateTimeEventArg->SetDate(GetYear(), GetMonth(), GetDay()); + + __pDateChangeEvent->Fire(*pDateTimeEventArg); + + return E_SUCCESS; +} + +void +_EditDate::OnDateTimeChanged(const _Control& source, int year, int month, int day, int hour, int minute) +{ + __pEditDatePresenter->Animate(); + __pEditDatePresenter->SetLastSelectedId(DATETIME_ID_NONE); + Invalidate(); + FireDateChangeEvent(DATE_INTERNAL_CHANGE_SAVED); + return; +} + +void +_EditDate::OnDateTimeChangeCanceled(const _Control& source) +{ + __pEditDatePresenter->SetLastSelectedId(DATETIME_ID_NONE); + Invalidate(); + FireDateChangeEvent(DATE_INTERNAL_CHANGE_CANCELED); + return; +} + +void +_EditDate::OnActionPerformed(const Ui::_Control& source, int actionId) +{ + _DateTimeId boxId = __pEditDatePresenter->GetLastSelectedId(); + + if (boxId == DATETIME_ID_YEAR) + { + SetYear(actionId); + AdjustDay(actionId, GetMonth()); + } + else if (boxId == DATETIME_ID_MONTH) + { + SetMonth(actionId); + AdjustDay(GetYear(), actionId); + } + else if (boxId == DATETIME_ID_DAY) + { + SetDay(actionId); + } + + Invalidate(); + + return; +} + +void +_EditDate::AdjustDay(int year, int month) +{ + _DateTimeUtils dateTimeUtils; + int maxValue = dateTimeUtils.CalculateMaxDay(year, month); + + if (GetDay() > maxValue) + { + SetDay(maxValue); + } + + return; +} + +_DateTimeBar* +_EditDate::GetDateTimeBar(void) const +{ + return __pDateTimeBar; +} + +void +_EditDate::OnFontChanged(Font* pFont) +{ + __pEditDatePresenter->OnFontChanged(pFont); + + return; +} + +void +_EditDate::OnFontInfoRequested(unsigned long& style, float& size) +{ + __pEditDatePresenter->OnFontInfoRequested(style, size); + + return; +} + +void +_EditDate::OnSettingChanged(String& key) +{ + if (key.Equals(L"http://tizen.org/setting/locale.date.format", false)) + { + __pEditDatePresenter->Initialize(); + __pEditDatePresenter->SetLastSelectedId(DATETIME_ID_NONE); + + if (GetDateTimeBar() != null) + { + GetDateTimeBar()->SetVisibleState(false); + GetDateTimeBar()->ClearPreviousText(); + GetDateTimeBar()->Close(); + } + + UpdateAccessibilityElement(); + + Invalidate(); + } + + return; +} + +bool +_EditDate::OnKeyPressed(const _Control &source, const _KeyInfo &keyInfo) +{ + return __pEditDatePresenter->OnKeyPressed(source, keyInfo); +} + +bool +_EditDate::OnKeyReleased(const _Control &source, const _KeyInfo &keyInfo) +{ + _KeyCode keyCode = keyInfo.GetKeyCode(); + + switch (keyCode) + { + case _KEY_ENTER: + { + FloatRectangle absoluteBounds = GetAbsoluteBoundsF(true); + + if (__pParentPanel != null && __pParentPanel->IsScrollAnimationRunning()) + { + __isEnterKeyPressed = true; + return true; + } + + if (absoluteBounds.y != __absoluteBounds.y || absoluteBounds.height != __absoluteBounds.height) + { + CalculateDateTimeBarPosition(); + } + break; + } + default: + { + break; + } + } + + return __pEditDatePresenter->OnKeyReleased(source, keyCode); +} + +bool +_EditDate::OnFocusGained(const _Control &source) +{ + __pEditDatePresenter->SetFocusedElement(); + Invalidate(); + return true; +} + +bool +_EditDate::OnFocusLost(const _Control &source) +{ + __pEditDatePresenter->OnFocusLost(source); + return true; +} + +void +_EditDate::OnFocusModeStateChanged(void) +{ + __pEditDatePresenter->OnFocusModeStateChanged(); + return; +} + +void +_EditDate::OnDrawFocus(void) +{ + __pEditDatePresenter->SetFocusedElement(); + __pEditDatePresenter->SetFocusState(true); + Invalidate(); + return; +} + +FloatRectangle +_EditDate::GetParentWindowBounds(void) const +{ + _Form* pForm = null; + _Window* pwindow = null; + _Control* pControlCore = GetParent(); + + FloatDimension dateTimeBarSize(0.0f, 0.0f); + GET_DIMENSION_CONFIG(DATETIMEBAR::DEFAULT_SIZE, GetOrientation(), dateTimeBarSize); + FloatRectangle parentWindowBounds(0.0f, 0.0f, dateTimeBarSize.width, dateTimeBarSize.height); + + while (true) + { + if (pControlCore == null) + { + SysLog(NID_UI_CTRL,"[E_SYSTEM] Parent window not found."); + + return parentWindowBounds; + } + + // If the parent is a Frame, then return the Form's bounds. + pForm = dynamic_cast<_Form*>(pControlCore); + if (pForm != null) + { + parentWindowBounds = pForm->GetBoundsF(); + break; + } + + pwindow = dynamic_cast<_Window*>(pControlCore); + + if (pwindow != null) + { + parentWindowBounds = pwindow->GetBoundsF(); + break; + } + + pControlCore = pControlCore->GetParent(); + } + + return parentWindowBounds; +} + +void +_EditDate::UpdateAccessibilityElement(void) +{ + String string; + String yearString; + String dayString; + String space(L" "); + + if (__pAccessibilityEditDateElement == null) + { + return; + } + + if (!__title.IsEmpty()) + { + string.Append(__title); + string.Append(L", "); + } + + yearString.Append(GetYear()); + dayString.Append(GetDay()); + String monthString = GetDateTimeBar()->GetMonthValue(GetMonth()).GetPointer(); + + _DateTimeUtils dateTimeUtils; + int localeDateFormat = dateTimeUtils.GetLocaleDateFormat(); + + switch (localeDateFormat) + { + case DATE_FORMAT_DDMMYYYY: + string.Append(dayString.GetPointer()); + string.Append(space.GetPointer()); + string.Append(monthString.GetPointer()); + string.Append(space.GetPointer()); + string.Append(yearString.GetPointer()); + break; + case DATE_FORMAT_MMDDYYYY: + string.Append(monthString.GetPointer()); + string.Append(space.GetPointer()); + string.Append(dayString.GetPointer()); + string.Append(space.GetPointer()); + string.Append(yearString.GetPointer()); + break; + case DATE_FORMAT_YYYYMMDD: + string.Append(yearString.GetPointer()); + string.Append(space.GetPointer()); + string.Append(monthString.GetPointer()); + string.Append(space.GetPointer()); + string.Append(dayString.GetPointer()); + break; + case DATE_FORMAT_YYYYDDMM: + string.Append(yearString.GetPointer()); + string.Append(space.GetPointer()); + string.Append(dayString.GetPointer()); + string.Append(space.GetPointer()); + string.Append(monthString.GetPointer()); + break; + default: + break; + } + + __pAccessibilityEditDateElement->SetLabel(string); + __pAccessibilityDayElement->SetLabel(dayString); + __pAccessibilityMonthElement->SetLabel(monthString); + __pAccessibilityYearElement->SetLabel(yearString); + + FloatRectangle dayBounds = __pEditDatePresenter->GetDateAreaBounds(DATETIME_ID_DAY); + FloatRectangle monthBounds = __pEditDatePresenter->GetDateAreaBounds(DATETIME_ID_MONTH); + FloatRectangle yearBounds = __pEditDatePresenter->GetDateAreaBounds(DATETIME_ID_YEAR); + + __pAccessibilityDayElement->SetBounds(dayBounds); + __pAccessibilityMonthElement->SetBounds(monthBounds); + __pAccessibilityYearElement->SetBounds(yearBounds); + + return; +} + +void +_EditDate::SetXmlBoundsExist(bool isXmlBoundsExist) +{ + __isXmlBoundsExist = isXmlBoundsExist; +} + +void +_EditDate::OnVisibleStateChanged(void) +{ + if (__pEditDatePresenter->GetLastSelectedId() != DATETIME_ID_NONE) + { + __pEditDatePresenter->SetLastSelectedId(DATETIME_ID_NONE); + Invalidate(); + } +} + +void +_EditDate::OnAncestorVisibleStateChanged(const _Control& control) +{ + if (GetDateTimeBar() != null && GetDateTimeBar()->IsActivated()) + { + GetDateTimeBar()->ClearPreviousText(); + GetDateTimeBar()->Close(); + __pEditDatePresenter->SetLastSelectedId(DATETIME_ID_NONE); + Invalidate(); + } +} + +void +_EditDate::OnAncestorEnableStateChanged(const _Control& control) +{ + if (!IsEnabled()) + { + if (GetDateTimeBar() != null && GetDateTimeBar()->IsActivated()) + { + GetDateTimeBar()->ClearPreviousText(); + GetDateTimeBar()->Close(); + __pEditDatePresenter->SetLastSelectedId(DATETIME_ID_NONE); + Invalidate(); + } + } +} + +// 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 new file mode 100644 index 0000000..63ed018 --- /dev/null +++ b/src/ui/controls/FUiCtrl_EditDateImpl.cpp @@ -0,0 +1,571 @@ +// +// 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_EditDateImpl.cpp + * @brief This is the implementation file for the _EditDateImpl class. + */ + +#include +#include +#include +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_UiBuilder.h" +#include "FUi_ResourceManager.h" +#include "FUi_ResourceSizeInfo.h" +#include "FUiCtrl_EditDateImpl.h" +#include "FUiCtrl_DateTimeDefine.h" +#include "FUiCtrl_DateTimeUtils.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Ui; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_EditDateImpl::_EditDateImpl(EditDate* pPublic, _EditDate* pCore) + : _ControlImpl(pPublic, pCore) + , __pPublicDateChangeEvent(null) +{ + ClearLastResult(); +} + +_EditDateImpl::~_EditDateImpl(void) +{ + delete __pPublicDateChangeEvent; + __pPublicDateChangeEvent = null; + + ClearLastResult(); +} + +_EditDateImpl* +_EditDateImpl::GetInstance(EditDate& editDate) +{ + return static_cast<_EditDateImpl*>(editDate._pControlImpl); +} + +const _EditDateImpl* +_EditDateImpl::GetInstance(const EditDate& editDate) +{ + return static_cast(editDate._pControlImpl); +} + +_EditDateImpl* +_EditDateImpl::CreateEditDateImplN(EditDate* pControl, const Point& point, const String& title) +{ + return CreateEditDateImplFN(pControl, _CoordinateSystemUtils::ConvertToFloat(point), title); +} + +_EditDateImpl* +_EditDateImpl::CreateEditDateImplFN(EditDate* pControl, const FloatPoint& point, const String& title) +{ + result r = E_SUCCESS; + FloatDimension dim; + + _EditDate* pCore = _EditDate::CreateEditDateN(title); + SysTryReturn(NID_UI_CTRL, pCore, null, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _EditDateImpl* pImpl = new (std::nothrow) _EditDateImpl(pControl, pCore); + + r = CheckConstruction(pCore, pImpl); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pCore->AddDateChangeEventListener(*pImpl); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + GET_SHAPE_CONFIG(EDITDATE::WIDTH, pCore->GetOrientation(), dim.width); + GET_SHAPE_CONFIG(EDITDATE::HEIGHT, pCore->GetOrientation(), dim.height); + + r = pImpl->InitializeBoundsPropertiesF(GET_SIZE_INFO(EditDate), FloatRectangle(point.x, point.y, dim.width, dim.height), pCore->GetOrientation()); + + ClearLastResult(); + + return pImpl; + +CATCH: + delete pImpl; + return null; +} + +const char* +_EditDateImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Controls::EditDate"; +} + +const EditDate& +_EditDateImpl::GetPublic(void) const +{ + return static_cast (_ControlImpl::GetPublic()); +} + +EditDate& +_EditDateImpl::GetPublic(void) +{ + return static_cast (_ControlImpl::GetPublic()); +} + +const _EditDate& +_EditDateImpl::GetCore(void) const +{ + return static_cast (_ControlImpl::GetCore()); +} + +_EditDate& +_EditDateImpl::GetCore(void) +{ + return static_cast <_EditDate&>(_ControlImpl::GetCore()); +} + +result +_EditDateImpl::OnAttachedToMainTree(void) +{ + GetCore().InitializeParentPanel(); + return _ControlImpl::OnAttachedToMainTree(); +} + +result +_EditDateImpl::AddDateChangeEventListener(IDateChangeEventListener& listener) +{ + ClearLastResult(); + + if (__pPublicDateChangeEvent == null) + { + __pPublicDateChangeEvent = new (std::nothrow) _PublicDateTimeChangeEvent(GetPublic()); + + SysTryReturn(NID_UI_CTRL, __pPublicDateChangeEvent, + E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + } + + result r = __pPublicDateChangeEvent->AddListener(listener); + SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_ALREADY_EXIST, E_SYSTEM, "The IDateChangeEventListener instance already exists."); + + return r; +} + +result +_EditDateImpl::RemoveDateChangeEventListener(IDateChangeEventListener& listener) +{ + ClearLastResult(); + + result r = E_OBJ_NOT_FOUND; + + if (__pPublicDateChangeEvent != null) + { + r = __pPublicDateChangeEvent->RemoveListener(listener); + } + + SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_NOT_FOUND, E_SYSTEM, "IDateChangeEventListener instance is not found."); + + return r; +} + +DateTime +_EditDateImpl::GetDate(void) const +{ + ClearLastResult(); + + Variant date = GetCore().GetPropertyDate(); + + return date.ToDateTime(); +} + +int +_EditDateImpl::GetDay(void) const +{ + ClearLastResult(); + + Variant day = GetCore().GetPropertyDay(); + + return day.ToInt(); +} + +int +_EditDateImpl::GetMonth(void) const +{ + ClearLastResult(); + + Variant month = GetCore().GetPropertyMonth(); + + return month.ToInt(); +} + +int +_EditDateImpl::GetYear(void) const +{ + ClearLastResult(); + + Variant year = GetCore().GetPropertyYear(); + + return year.ToInt(); +} + +void +_EditDateImpl::SetDate(const DateTime& date) +{ + ClearLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, (date.GetYear() >= DATETIME_YEAR_MIN && date.GetYear() <= DATETIME_YEAR_MAX), E_INVALID_ARG, + "[E_INVALID_ARG] Invalid argument is used. year (%d).", date.GetYear()); + + int minYear = -1; + int maxYear = -1; + + GetYearRange(minYear, maxYear); + + DateTime dateTime; + + if (date.GetYear() < minYear) + { + dateTime.SetValue(minYear, date.GetMonth(), date.GetDay(), date.GetHour(), date.GetMinute(), date.GetSecond()); + } + else if (date.GetYear() > maxYear) + { + dateTime.SetValue(maxYear, date.GetMonth(), date.GetDay(), date.GetHour(), date.GetMinute(), date.GetSecond()); + } + else + { + dateTime.SetValue(date); + } + + GetCore().SetPropertyDate(Variant(dateTime)); + return; +} + +void +_EditDateImpl::SetCurrentDate(void) +{ + ClearLastResult(); + + GetCore().SetCurrentDate(); + return; +} + +result +_EditDateImpl::SetYear(int year) +{ + result r = ValidateYear(year); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, + "[E_INVALID_ARG] Invalid argument is used. year (%d).", year); + + r = GetCore().SetPropertyYear(Variant(year)); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +_EditDateImpl::ValidateYear(int year) +{ + ClearLastResult(); + SysTryReturn(NID_UI_CTRL, (year >= DATETIME_YEAR_MIN && year <= DATETIME_YEAR_MAX), E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] Invalid argument is used. year (%d).", year); + + int minYear = -1; + int maxYear = -1; + + GetYearRange(minYear,maxYear); + + SysTryReturn(NID_UI_CTRL, (year >= minYear && year <= maxYear), E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] Invalid argument is used. year (%d).", year); + + return E_SUCCESS; +} + +result +_EditDateImpl::SetMonth(int month) +{ + ClearLastResult(); + SysTryReturn(NID_UI_CTRL, (month >= DATETIME_MONTH_MIN && month <= DATETIME_MONTH_MAX), E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] Invalid argument is used. month (%d).", month); + + result r = GetCore().SetPropertyMonth(Variant(month)); + + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +_EditDateImpl::SetDay(int day) +{ + ClearLastResult(); + SysTryReturn(NID_UI_CTRL, (day >= DATETIME_DAY_MIN && day <= DATETIME_DAY_MAX), E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] Invalid argument is used. day (%d).", day); + + int maxValue = -1; + _DateTimeUtils dateTimeUtils; + maxValue = dateTimeUtils.CalculateMaxDay(GetYear(), GetMonth()); + + SysTryReturn(NID_UI_CTRL, (day <= maxValue), E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] Invalid argument is used. day (%d), month (%d)", day, GetMonth()); + + result r = GetCore().SetPropertyDay(Variant(day)); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +void +_EditDateImpl::SetDatePickerEnabled(bool enable) +{ + ClearLastResult(); + + GetCore().SetPropertyDatePickerEnabled(Variant(enable)); + return; +} + +bool +_EditDateImpl::IsDatePickerEnabled(void) const +{ + ClearLastResult(); + + Variant enable = GetCore().GetPropertyDatePickerEnabled(); + + return enable.ToBool(); +} + +result +_EditDateImpl::SetYearRange(int minYear, int maxYear) +{ + ClearLastResult(); + + result r = E_SUCCESS; + + SysTryReturn(NID_UI_CTRL, (maxYear >= DATETIME_YEAR_MIN && maxYear <= DATETIME_YEAR_MAX), E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] maxYear (%d) must be greater than or equal to %d and less than or equal to %d.", + maxYear, DATETIME_YEAR_MIN, DATETIME_YEAR_MAX); + + SysTryReturn(NID_UI_CTRL, (minYear >= DATETIME_YEAR_MIN && minYear <= DATETIME_YEAR_MAX), E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] minYear (%d) must be greater than or equal to %d and less than or equal to %d.", + minYear, DATETIME_YEAR_MIN, DATETIME_YEAR_MAX); + + SysTryReturn(NID_UI_CTRL, (maxYear >= minYear), E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] maxYear (%d) must be greater than or equal to minYear (%d).", maxYear, minYear); + + Variant oldMinYear = GetCore().GetPropertyMinYearRange(); + + r = GetCore().SetPropertyMinYearRange(Variant(minYear)); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GetCore().SetPropertyMaxYearRange(Variant(maxYear)); + if (r != E_SUCCESS) + { + GetCore().SetPropertyMinYearRange(oldMinYear); + SysLogException(NID_UI_CTRL, r, "[%s] Propagating", GetErrorMessage(r)); + } + + return r; +} + +result +_EditDateImpl::GetYearRange(int& minYear, int& maxYear) const +{ + ClearLastResult(); + + Variant tempMinYear = GetCore().GetPropertyMinYearRange(); + Variant tempMaxYear = GetCore().GetPropertyMaxYearRange(); + + minYear = tempMinYear.ToInt(); + maxYear = tempMaxYear.ToInt(); + + return GetLastResult(); +} + +void +_EditDateImpl::OnDateTimeChanged(const _Control& source, int year, int month, int day, int hour, int minute) +{ + ClearLastResult(); + + if (__pPublicDateChangeEvent == null) + { + return; + } + + _PublicDateTimeChangeEventArg* pEventArg = new (std::nothrow) _PublicDateTimeChangeEventArg(DATE_PUBLIC_CHANGE_SAVED); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pEventArg->SetDate(year, month, day); + pEventArg->SetTime(hour, minute); + __pPublicDateChangeEvent->Fire(*pEventArg); + + return; +} + +void +_EditDateImpl::OnDateTimeChangeCanceled(const _Control& source) +{ + ClearLastResult(); + + if (__pPublicDateChangeEvent == null) + { + return; + } + + _PublicDateTimeChangeEventArg* pEventArg = new (std::nothrow) _PublicDateTimeChangeEventArg(DATE_PUBLIC_CHANGE_CANCELED); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + __pPublicDateChangeEvent->Fire(*pEventArg); + + return; +} + +bool +_EditDateImpl::IsXmlBoundsExist(void) +{ + FloatRectangle builderBounds; + _ControlOrientation controlOrientation = _CONTROL_ORIENTATION_PORTRAIT; + bool exist = GetBuilderBoundsF(controlOrientation, builderBounds); + if(!exist) + { + return false; + } + + controlOrientation = GetCore().GetOrientation(); + + if (controlOrientation == _CONTROL_ORIENTATION_LANDSCAPE) + { + exist = GetBuilderBoundsF(controlOrientation, builderBounds); + } + + if(!exist) + { + return false; + } + + return true; +} + +void +_EditDateImpl::OnChangeLayout(_ControlOrientation orientation) +{ + GetCore().SetXmlBoundsExist(IsXmlBoundsExist()); + + return _ControlImpl::OnChangeLayout(orientation); +} + +class _EditDateMaker + : public _UiBuilderControlMaker +{ +public: + _EditDateMaker(_UiBuilder* uibuilder) + : _UiBuilderControlMaker(uibuilder){} + virtual ~_EditDateMaker(void){} + static _UiBuilderControlMaker* GetInstance(_UiBuilder* pUiBuilder) + { + _EditDateMaker* pEditDateMaker = new (std::nothrow) _EditDateMaker(pUiBuilder); + return pEditDateMaker; + } + +protected: + virtual Control* Make(_UiBuilderControl* pControl) + { + result r = E_SUCCESS; + FloatPoint point; + FloatRectangle rect; + Tizen::Base::String elementStringOne; + Tizen::Base::String elementStringTwo; + bool titleEnable = false; + + _UiBuilderControlLayout* pControlProperty = null; + EditDate* pEditDate = null; + + int tempMin = 0; + int tempMax = 0; + int temp = 0; + + GetProperty(pControl, &pControlProperty); + if (pControlProperty == null) + { + return null; + } + + rect = pControlProperty->GetRectF(); + point.x = rect.x; + point.y = rect.y; + if (pControl->GetElement(L"titleText", elementStringOne)) + { + titleEnable = true; + } + + 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) + { + r = pEditDate->Construct(point, elementStringOne); + } + else + { + r = pEditDate->Construct(point); + } + + if (r != E_SUCCESS) + { + delete pEditDate; + pEditDate = null; + return null; + } + + pEditDate->SetBounds(rect); + + if (pControl->GetElement(L"minYearRange", elementStringOne) && pControl->GetElement(L"maxYearRange", elementStringTwo)) + { + Base::Integer::Parse(elementStringOne, tempMin); + Base::Integer::Parse(elementStringTwo, tempMax); + + if (tempMin > tempMax) + { + temp = tempMin; + tempMin = tempMax; + tempMax = tempMin; + } + + r = pEditDate->SetYearRange(tempMin, tempMax); + } + + if (pControl->GetElement(L"accessibilityHint", elementStringOne)) + { + AccessibilityContainer* pContainer = pEditDate->GetAccessibilityContainer(); + if (pContainer != null) + { + AccessibilityElement* pElement = pContainer->GetElement("EditDateText"); + if (pElement != null) + { + pElement->SetHint(elementStringOne); + } + } + } + + return pEditDate; + } +}; // _EditDateMaker + +_EditDateRegister::_EditDateRegister(void) +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->RegisterControl(L"EditDate", _EditDateMaker::GetInstance); +} + +_EditDateRegister::~_EditDateRegister(void) +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->UnregisterControl(L"EditDate"); +} +static _EditDateRegister EditDateRegisterToUiBuilder; +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_EditDatePresenter.cpp b/src/ui/controls/FUiCtrl_EditDatePresenter.cpp new file mode 100644 index 0000000..6b5cab8 --- /dev/null +++ b/src/ui/controls/FUiCtrl_EditDatePresenter.cpp @@ -0,0 +1,1681 @@ +// +// 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_EditDatePresenter.cpp + * @brief This is the implementation file for the _EditDatePresenter class. + */ + +#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" + +using namespace Tizen::Graphics; +using namespace Tizen::Base; +using namespace Tizen::Graphics::_Text; +using namespace Tizen::Ui::Animations; + + +namespace Tizen { namespace Ui { namespace Controls +{ +_EditDatePresenter::_EditDatePresenter(void) + : __pEditDateTimeModel(null) + , __pEditDate(null) + , __dayBounds(FloatRectangle()) + , __monthBounds(FloatRectangle()) + , __yearBounds(FloatRectangle()) + , __dayTouchBounds(FloatRectangle()) + , __monthTouchBounds(FloatRectangle()) + , __yearTouchBounds(FloatRectangle()) + , __titleBounds(FloatRectangle()) + , __pContentBgNormalColorReplacementBitmap(null) + , __pContentBgDisabledColorReplacementBitmap(null) + , __pContentBgPressedColorReplacementBitmap(null) + , __pContentBgHighlightedColorReplacementBitmap(null) + , __pContentBgEffectNormalBitmap(null) + , __pContentBgEffectPressedBitmap(null) + , __pContentBgEffectDisabledBitmap(null) + , __datePickerEnabled(true) + , __selectedId(DATETIME_ID_NONE) + , __lastSelectedId(DATETIME_ID_NONE) + , __focusId(DATETIME_ID_NONE) + , __touchMoveHandled(false) + , __titleObject() + , __textObject() + , __pFont(null) + , __elementMargin(0.0f) + , __dividerLineHeight(0.0f) + , __titleFontSize(0.0f) + , __dateFontSize(0.0f) + , __pContentProvider(null) + , __isAnimating(false) + , __isEditDateInitialized(false) + , __elementWidth(0.0f) + , __isEnterKeyPressed(false) + , __isFocused(false) + , __transactionId(0) +{ +} + +_EditDatePresenter::~_EditDatePresenter(void) +{ + __titleObject.RemoveAll(); + __textObject.RemoveAll(); + + delete __pEditDateTimeModel; + __pEditDateTimeModel = null; + + delete __pContentBgNormalColorReplacementBitmap; + __pContentBgNormalColorReplacementBitmap = null; + + delete __pContentBgDisabledColorReplacementBitmap; + __pContentBgDisabledColorReplacementBitmap = null; + + delete __pContentBgPressedColorReplacementBitmap; + __pContentBgPressedColorReplacementBitmap = null; + + delete __pContentBgHighlightedColorReplacementBitmap; + __pContentBgHighlightedColorReplacementBitmap = null; + + delete __pContentBgEffectNormalBitmap; + __pContentBgEffectNormalBitmap = null; + + delete __pContentBgEffectPressedBitmap; + __pContentBgEffectPressedBitmap = null; + + delete __pContentBgEffectDisabledBitmap; + __pContentBgEffectDisabledBitmap = null; + + if (__transactionId != 0) + { + AnimationTransaction::Stop(__transactionId); + } + + if (__pContentProvider != null) + { + __pEditDate->GetVisualElement()->DetachChild(__pContentProvider); + __pContentProvider->Destroy(); + __pContentProvider = null; + } +} + +_EditDatePresenter* +_EditDatePresenter::CreateInstanceN(const _EditDate& editDate, const String& title) +{ + _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(); + SysTryCatch(NID_UI_CTRL, pEditDatePresenter->__pEditDateTimeModel, , E_OUT_OF_MEMORY, + "[E_OUT_OF_MEMORY] Memory allocation failed."); + pEditDatePresenter->SetTitle(title); + + return pEditDatePresenter; + +CATCH: + delete pEditDatePresenter; + return null; +} + +void +_EditDatePresenter::SetTitle(const String& title) +{ + __title = title; +} + +result +_EditDatePresenter::Initialize(void) +{ + result r = E_SUCCESS; + float editDateHeight = 0.0f; + float dateLeftMargin = 0.0f; + float titleLeftMargin = 0.0f; + float titledateMargin = 0.0f; + float dateHeight = 0.0f; + float monthYearMinWidth = 0.0f; + float dayElementWidth = 0.0f; + float dayElementMinWidth = 0.0f; + FloatRectangle bounds(0.0f, 0.0f, 0.0f, 0.0f); + + GET_SHAPE_CONFIG(EDITDATE::HEIGHT, __pEditDate->GetOrientation(), editDateHeight); + GET_SHAPE_CONFIG(EDITDATE::TITLE_TEXT_LEFT_MARGIN, __pEditDate->GetOrientation(), titleLeftMargin); + GET_SHAPE_CONFIG(EDITDATE::ITEM_DIVIDER_HEIGHT, __pEditDate->GetOrientation(), __dividerLineHeight); + GET_SHAPE_CONFIG(EDITDATE::TEXT_FONT_SIZE, __pEditDate->GetOrientation(), __titleFontSize); + GET_SHAPE_CONFIG(EDITDATE::DATE_FONT_SIZE, __pEditDate->GetOrientation(), __dateFontSize); + GET_SHAPE_CONFIG(EDITDATE::TITLE_DATE_MARGIN, __pEditDate->GetOrientation(), titledateMargin); + GET_SHAPE_CONFIG(EDITDATE::DATE_HEIGHT, __pEditDate->GetOrientation(), dateHeight); + GET_SHAPE_CONFIG(EDITDATE::TITLE_HEIGHT, __pEditDate->GetOrientation(), __titleBounds.height); + GET_SHAPE_CONFIG(EDITDATE::MONTH_YEAR_ELEMENT_WIDTH, __pEditDate->GetOrientation(), __elementWidth); + GET_SHAPE_CONFIG(EDITDATE::DAY_ELEMENT_WIDTH, __pEditDate->GetOrientation(), dayElementWidth); + GET_SHAPE_CONFIG(EDITDATE::ELEMENT_MARGIN, __pEditDate->GetOrientation(), __elementMargin); + GET_SHAPE_CONFIG(EDITDATE::DATE_TEXT_LEFT_MARGIN, __pEditDate->GetOrientation(), dateLeftMargin); + + GET_SHAPE_CONFIG(EDITDATE::MONTH_YEAR_ELEMENT_MIN_WIDTH, __pEditDate->GetOrientation(), monthYearMinWidth); + GET_SHAPE_CONFIG(EDITDATE::DAY_ELEMENT_MIN_WIDTH, __pEditDate->GetOrientation(), dayElementMinWidth); + + if (__pEditDate->GetBoundsF().height > editDateHeight) + { + editDateHeight = __pEditDate->GetBoundsF().height; + } + + __pFont = __pEditDate->GetFallbackFont(); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, __pFont != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (!__title.IsEmpty()) + { + __titleBounds.x = titleLeftMargin; + __titleBounds.y = (editDateHeight - (__titleBounds.height + titledateMargin + dateHeight)) / 2.0f; + __titleBounds.width = __pEditDate->GetBoundsF().width - __titleBounds.x; + + bounds.y = __titleBounds.y + __titleBounds.height + titledateMargin; + + if (!__isEditDateInitialized) + { + r = InitializeTitleObject(); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + __titleObject.SetBounds(__titleBounds); + } + else + { + bounds.y = (editDateHeight - dateHeight) / 2.0f; + + } + + dayElementWidth = GetElementWidth(dayElementMinWidth, dayElementWidth); + __elementWidth = GetElementWidth(monthYearMinWidth, __elementWidth); + + __dayBounds.height = dateHeight; + __monthBounds.height = dateHeight; + __yearBounds.height = dateHeight; + + __dayBounds.width = dayElementWidth; + __monthBounds.width = __elementWidth; + __yearBounds.width = __elementWidth; + + __dayBounds.x = dateLeftMargin; + __monthBounds.x = dateLeftMargin; + __yearBounds.x = dateLeftMargin; + + __dayBounds.y = bounds.y; + __monthBounds.y = bounds.y; + __yearBounds.y = bounds.y; + + if (!__isEditDateInitialized) + { + r = LoadResource(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = InitializeTextObject(); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + __isEditDateInitialized = true; + + CalculateAreaBounds(); + return r; +} + +result +_EditDatePresenter::InitializeTitleObject(void) +{ + result r = E_SUCCESS; + + Color titleNormalColor; + + GET_COLOR_CONFIG(EDITDATE::TITLE_TEXT_NORMAL, titleNormalColor); + + r = __titleObject.Construct(); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + TextSimple* pSimpleText = null; + + pSimpleText = new (std::nothrow)TextSimple((const_cast (__title.GetPointer())), __title.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."); + + __titleObject.AppendElement(*pSimpleText); + + __titleObject.SetForegroundColor(titleNormalColor, 0, __titleObject.GetTextLength()); + __titleObject.SetFont(__pFont, 0, __titleObject.GetTextLength()); + __titleObject.SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT | TEXT_OBJECT_ALIGNMENT_MIDDLE); + __titleObject.SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE); + __titleObject.SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); + __titleObject.SetTextObjectEllipsisType(TEXT_OBJECT_ELLIPSIS_TYPE_TAIL); + + return r; +} + +result +_EditDatePresenter::InitializeTextObject(void) +{ + result r = E_SUCCESS; + + r = __textObject.Construct(); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + TextSimple* pSimpleText = null; + + 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()); + __textObject.SetAlignment(TEXT_OBJECT_ALIGNMENT_CENTER | TEXT_OBJECT_ALIGNMENT_MIDDLE); + __textObject.SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE); + __textObject.SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); + + return r; +} + +float +_EditDatePresenter::GetElementWidth(const float minWidth, const float maxWidth) const +{ + FloatRectangle bounds; + FloatDimension minSize; + bounds = __pEditDate->GetBoundsF(); + + float elementWidth = 0.0f; + float editDateWidth = 0.0f; + + GET_SHAPE_CONFIG(EDITDATE::WIDTH, __pEditDate->GetOrientation(), editDateWidth); + GET_DIMENSION_CONFIG(EDITDATE::MIN_SIZE, __pEditDate->GetOrientation(), minSize); + + if (bounds.width >= editDateWidth) + { + return maxWidth; + } + + if (bounds.width <= minSize.width) + { + elementWidth = minWidth; + } + else if (bounds.width < editDateWidth && bounds.width > minSize.width) + { + elementWidth = maxWidth - + ((maxWidth - minWidth) / (editDateWidth - minSize.width)) * (editDateWidth - bounds.width); + } + + return elementWidth; +} + +result +_EditDatePresenter::LoadResource(void) +{ + result r = E_SUCCESS; + + Color contentNormalBgColor; + Color contentDisabledBgColor; + Color contentPressedColor; + Color contentHighlightedColor; + + 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_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)); + + 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)); + + 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)); + + 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)); + + 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)); + + r = GET_BITMAP_CONFIG_N(EDITDATE::CONTENT_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pContentBgEffectPressedBitmap); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + 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)); + + return r; + +CATCH: + + delete __pContentBgNormalColorReplacementBitmap; + __pContentBgNormalColorReplacementBitmap = null; + + delete __pContentBgPressedColorReplacementBitmap; + __pContentBgPressedColorReplacementBitmap = null; + + delete __pContentBgDisabledColorReplacementBitmap; + __pContentBgDisabledColorReplacementBitmap = null; + + delete __pContentBgHighlightedColorReplacementBitmap; + __pContentBgHighlightedColorReplacementBitmap = null; + + delete __pContentBgEffectNormalBitmap; + __pContentBgEffectNormalBitmap = null; + + delete __pContentBgEffectPressedBitmap; + __pContentBgEffectPressedBitmap = null; + + delete __pContentBgEffectDisabledBitmap; + __pContentBgEffectDisabledBitmap = null; + + return r; +} + +DateTime +_EditDatePresenter::GetDate(void) const +{ + SysAssertf((__pEditDateTimeModel != null), "The _EditDateTimeModel instance is null."); + + DateTime date; + date.SetValue(GetYear(), GetMonth(), GetDay(), DATETIME_HOUR_MIN, DATETIME_MINUTE_MIN); + + return date; +} + +int +_EditDatePresenter::GetDay(void) const +{ + SysAssertf((__pEditDateTimeModel != null), "The _EditDateTimeModel instance is null."); + + return __pEditDateTimeModel->GetDay(); +} + +int +_EditDatePresenter::GetMonth(void) const +{ + SysAssertf((__pEditDateTimeModel != null), "The _EditDateTimeModel instance is null."); + + return __pEditDateTimeModel->GetMonth(); +} + +int +_EditDatePresenter::GetYear(void) const +{ + SysAssertf((__pEditDateTimeModel != null), "The _EditDateTimeModel instance is null."); + + return __pEditDateTimeModel->GetYear(); +} + +void +_EditDatePresenter::SetDate(const DateTime& date) +{ + SysAssertf((__pEditDateTimeModel != null), "The _EditDateTimeModel instance is null."); + + __pEditDateTimeModel->SetDateTime(date); + return; +} + +void +_EditDatePresenter::SetCurrentDate(void) +{ + SysAssertf((__pEditDateTimeModel != null), "The _EditDateTimeModel instance is null."); + + __pEditDateTimeModel->SetCurrentDateTime(); + return; +} + +result +_EditDatePresenter::SetYear(int year) +{ + SysAssertf((__pEditDateTimeModel != null), "The _EditDateTimeModel instance is null."); + + return __pEditDateTimeModel->SetYear(year); +} + +result +_EditDatePresenter::SetMonth(int month) +{ + SysAssertf((__pEditDateTimeModel != null), "The _EditDateTimeModel instance is null."); + + return __pEditDateTimeModel->SetMonth(month); +} + +result +_EditDatePresenter::SetDay(int day) +{ + SysAssertf((__pEditDateTimeModel != null), "The _EditDateTimeModel instance is null."); + + return __pEditDateTimeModel->SetDay(day); +} + +void +_EditDatePresenter::SetDatePickerEnabled(bool enable) +{ + __datePickerEnabled = enable; + return; +} + +bool +_EditDatePresenter::IsDatePickerEnabled(void) const +{ + return __datePickerEnabled; +} + +result +_EditDatePresenter::SetMinYear(int minYear) +{ + return __pEditDateTimeModel->SetMinYear(minYear); +} + +result +_EditDatePresenter::SetMaxYear(int maxYear) +{ + return __pEditDateTimeModel->SetMaxYear(maxYear); +} + +int +_EditDatePresenter::GetMinYear(void) const +{ + int minYear = 0; + int maxYear = 0; + + __pEditDateTimeModel->GetYearRange(minYear, maxYear); + + return minYear; +} + +int +_EditDatePresenter::GetMaxYear(void) const +{ + int minYear = 0; + int maxYear = 0; + + __pEditDateTimeModel->GetYearRange(minYear, maxYear); + + return maxYear; +} + +result +_EditDatePresenter::Draw(void) +{ + result r = E_SUCCESS; + if (__isAnimating) + { + return E_SUCCESS; + } + + Canvas* pCanvas = __pEditDate->GetCanvasN(); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, (pCanvas != null), r, r, "[%s] Propagating. Failed to get canvas.", GetErrorMessage(r)); + + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + + if (!__title.IsEmpty()) + { + DrawTitle(*pCanvas); + } + + String monthString; + String yearString; + String dayString; + + _DateTimeUtils dateTimeUtils; + monthString = dateTimeUtils.GetMonthString(GetMonth()); + yearString.Format(10, L"%04d", GetYear()); + dayString.Format(10, L"%02d", GetDay()); + + CalculateAreaBounds(); + + r = DrawText(*pCanvas, GetDateAreaBounds(DATETIME_ID_DAY), dayString, DATETIME_ID_DAY); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + r = DrawText(*pCanvas, GetDateAreaBounds(DATETIME_ID_MONTH), monthString, DATETIME_ID_MONTH); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + r = DrawText(*pCanvas, GetDateAreaBounds(DATETIME_ID_YEAR), yearString, DATETIME_ID_YEAR); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + +CATCH: + delete pCanvas; + return r; +} + +result +_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), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + if (__focusId == DATETIME_ID_DAY) + { + bounds = GetDateAreaBounds(DATETIME_ID_DAY); + } + else if (__focusId == DATETIME_ID_MONTH) + { + bounds = GetDateAreaBounds(DATETIME_ID_MONTH); + } + else if (__focusId == DATETIME_ID_YEAR) + { + bounds = GetDateAreaBounds(DATETIME_ID_YEAR); + } + + result r = E_SUCCESS; + + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pContentBgHighlightedColorReplacementBitmap)) + { + r = pCanvas->DrawNinePatchedBitmap(bounds, *__pContentBgHighlightedColorReplacementBitmap); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + 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; + return r; + +CATCH: + delete pCanvas; + delete pContentCanvas; + return r; +} + +void +_EditDatePresenter::UpdateLastSelectedValue(_DateTimeId id, bool isTouchPressed) +{ + __selectedId = id; + SetLastSelectedId(id); + __lastSelectedValue = ""; + _DateTimeUtils dateTimeUtils; + + if (GetLastSelectedId() == DATETIME_ID_YEAR) + { + __lastSelectedValue.Format(10, L"%04d", GetYear()); + if (isTouchPressed) + { + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pEditDate); + } + } + else if (GetLastSelectedId() == DATETIME_ID_MONTH) + { + __lastSelectedValue = dateTimeUtils.GetMonthString(GetMonth()); + if (isTouchPressed) + { + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pEditDate); + } + } + else if (GetLastSelectedId() == DATETIME_ID_DAY) + { + __lastSelectedValue.Format(10, L"%02d", GetDay()); + if (isTouchPressed) + { + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pEditDate); + } + } + + __pEditDate->Invalidate(); + return; +} + +result +_EditDatePresenter::CalculateAreaBounds(void) +{ + result r = E_SUCCESS; + + _DateTimeUtils dateTimeUtils; + int localeDateFormat = dateTimeUtils.GetLocaleDateFormat(); + + if (localeDateFormat == DATE_FORMAT_DDMMYYYY) + { + __monthBounds.x = __dayBounds.x + __dayBounds.width + __elementMargin; + __yearBounds.x = __monthBounds.x + __monthBounds.width + __elementMargin; + } + else if (localeDateFormat == DATE_FORMAT_MMDDYYYY) + { + __dayBounds.x = __monthBounds.x + __monthBounds.width + __elementMargin; + __yearBounds.x = __dayBounds.x + __dayBounds.width + __elementMargin; + } + else if (localeDateFormat == DATE_FORMAT_YYYYMMDD) + { + __monthBounds.x = __yearBounds.x + __yearBounds.width + __elementMargin; + __dayBounds.x = __monthBounds.x + __monthBounds.width + __elementMargin; + } + else if (localeDateFormat == DATE_FORMAT_YYYYDDMM) + { + __dayBounds.x = __yearBounds.x + __yearBounds.width + __elementMargin; + __monthBounds.x = __dayBounds.x + __dayBounds.width + __elementMargin; + } + + return r; +} + +result +_EditDatePresenter::DrawTitle(Canvas& canvas) +{ + if (!__pEditDate->IsEnabled()) + { + Color titleDisabledColor; + GET_COLOR_CONFIG(EDITDATE::TITLE_TEXT_DISABLED, titleDisabledColor); + __titleObject.SetForegroundColor(titleDisabledColor, 0, __titleObject.GetTextLength()); + } + + (_FontImpl::GetInstance(*__pFont))->SetSize(__titleFontSize); + (_FontImpl::GetInstance(*__pFont))->SetStyle(FONT_STYLE_BOLD); + __titleObject.SetFont(__pFont, 0, __titleObject.GetTextLength()); + __titleObject.Draw(*_CanvasImpl::GetInstance(canvas)); + + return E_SUCCESS; +} + +result +_EditDatePresenter::DrawText(Canvas& canvas, const FloatRectangle& bounds, const String& text, _DateTimeId boxId) +{ + Color textColor; + float contentTextMargin; + + GET_SHAPE_CONFIG(EDITDATE::CONTENT_TEXT_MARGIN, __pEditDate->GetOrientation(), contentTextMargin); + + if (!__pEditDate->IsEnabled()) + { + GET_COLOR_CONFIG(EDITDATE::TEXT_DISABLED, textColor); + } + else + { + GET_COLOR_CONFIG(EDITDATE::TEXT_NORMAL, textColor); + } + + (_FontImpl::GetInstance(*__pFont))->SetStyle(FONT_STYLE_PLAIN); + + if (boxId == GetLastSelectedId() && boxId != DATETIME_ID_NONE) + { + (_FontImpl::GetInstance(*__pFont))->SetStyle(FONT_STYLE_BOLD); + GET_COLOR_CONFIG(EDITDATE::TEXT_PRESSED, textColor); + } + + DrawContentBitmap(canvas, bounds, boxId); + + FloatRectangle drawAreaBounds(0.0f, 0.0f, 0.0f, 0.0f); + drawAreaBounds.x = bounds.x + contentTextMargin; + drawAreaBounds.y = bounds.y + contentTextMargin; + drawAreaBounds.width = bounds.width - (contentTextMargin * 2.0f); + drawAreaBounds.height = bounds.height - (contentTextMargin * 2.0f); + + TextSimple* pSimpleText = null; + 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) + { + GET_COLOR_CONFIG(EDITDATE::TEXT_HIGHLIGHTED, textColor); + DrawFocus(); + } + + (_FontImpl::GetInstance(*__pFont))->SetSize(__dateFontSize); + __textObject.AppendElement(*pSimpleText); + + __textObject.SetFont(__pFont, 0, __textObject.GetTextLength()); + __textObject.SetForegroundColor(textColor, 0, __textObject.GetTextLength()); + __textObject.SetBounds(drawAreaBounds); + __textObject.Draw(*_CanvasImpl::GetInstance(canvas)); + + return E_SUCCESS; +} + +result +_EditDatePresenter::DrawContentBitmap(Canvas& canvas, const FloatRectangle& bounds, _DateTimeId boxId) +{ + result r = E_SUCCESS; + + bool isCustomBitmap = false; + Bitmap* pReplacementBitmap = null; + Bitmap* pEffectBitmap = null; + + if (!__pEditDate->IsEnabled()) + { + isCustomBitmap = IS_CUSTOM_BITMAP(EDITDATE::CONTENT_BG_DISABLED); + pReplacementBitmap = __pContentBgDisabledColorReplacementBitmap; + pEffectBitmap = __pContentBgEffectDisabledBitmap; + } + else if (GetLastSelectedId() != boxId) + { + isCustomBitmap = IS_CUSTOM_BITMAP(EDITDATE::CONTENT_BG_NORMAL); + pReplacementBitmap = __pContentBgNormalColorReplacementBitmap; + pEffectBitmap = __pContentBgEffectNormalBitmap; + } + else + { + isCustomBitmap = IS_CUSTOM_BITMAP(EDITDATE::CONTENT_BG_PRESSED); + pReplacementBitmap = __pContentBgPressedColorReplacementBitmap; + pEffectBitmap = __pContentBgEffectPressedBitmap; + } + + r = DrawResourceBitmap(canvas, bounds, pReplacementBitmap, isCustomBitmap); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (!isCustomBitmap) + { + r = DrawResourceBitmap(canvas, bounds, pEffectBitmap); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + return r; +} + +result +_EditDatePresenter::DrawResourceBitmap(Canvas& canvas, const FloatRectangle& bounds, Bitmap* pBitmap, bool isCustomBitmap) +{ + result r = E_SUCCESS; + + if (pBitmap == null) + { + return r; + } + + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pBitmap)) + { + r = canvas.DrawNinePatchedBitmap(bounds, *pBitmap); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + 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)); + } + + return r; +} + +_DateTimeId +_EditDatePresenter::GetBoxIdFromPosition(const FloatPoint& point) const +{ + _DateTimeId displayBoxId = DATETIME_ID_NONE; + + if (point.y < __dayBounds.y || point.y > __dayBounds.y + __dayBounds.height) + { + return displayBoxId; + } + + if (__dayBounds.Contains(point)) + { + displayBoxId = DATETIME_ID_DAY; + } + else if (__monthBounds.Contains(point)) + { + displayBoxId = DATETIME_ID_MONTH; + } + else if (__yearBounds.Contains(point)) + { + displayBoxId = DATETIME_ID_YEAR; + } + + return displayBoxId; +} + +FloatRectangle +_EditDatePresenter::GetDateAreaBounds(_DateTimeId id) const +{ + if (id == DATETIME_ID_DAY) + { + return __dayBounds; + } + else if (id == DATETIME_ID_MONTH) + { + return __monthBounds; + } + else if (id == DATETIME_ID_YEAR) + { + return __yearBounds; + } + else + { + return FloatRectangle(); + } +} + +FloatRectangle +_EditDatePresenter::GetTitleBounds(void) const +{ + return __titleBounds; +} + +void +_EditDatePresenter::SetLastSelectedId(_DateTimeId boxId) +{ + __lastSelectedId = boxId; + return; +} + +_DateTimeId +_EditDatePresenter::GetLastSelectedId(void) const +{ + return __lastSelectedId; +} + +void +_EditDatePresenter::OnFontChanged(Font* pFont) +{ + __pFont = pFont; + + if (__pEditDate->GetDateTimeBar() != null) + { + __pEditDate->GetDateTimeBar()->SetFont(*pFont); + } + + return; +} + +void +_EditDatePresenter::OnFontInfoRequested(unsigned long& style, float& size) +{ + style = FONT_STYLE_PLAIN; + size = __dateFontSize; + + return; +} + +void +_EditDatePresenter::SetFocusState(bool isFocused) +{ + __isFocused = isFocused; +} + +void +_EditDatePresenter::SetFocusedElement(void) +{ + _DateTimeUtils dateTimeUtils; + if (__isEnterKeyPressed) + { + __isEnterKeyPressed = false; + + if (__pEditDate->IsFocusModeStateEnabled()) + { + __isFocused = true; + } + } + + int localeDateFormat = dateTimeUtils.GetLocaleDateFormat(); + if (__focusId == DATETIME_ID_NONE) + { + if (localeDateFormat == DATE_FORMAT_DDMMYYYY) + { + __focusId = DATETIME_ID_DAY; + } + else if (localeDateFormat == DATE_FORMAT_MMDDYYYY) + { + __focusId = DATETIME_ID_MONTH; + } + else if (localeDateFormat == DATE_FORMAT_YYYYMMDD) + { + __focusId = DATETIME_ID_YEAR; + } + else if (localeDateFormat == DATE_FORMAT_YYYYDDMM) + { + __focusId = DATETIME_ID_YEAR; + } + } + return; +} + +bool +_EditDatePresenter::OnFocusLost(const _Control &source) +{ + if (!__isEnterKeyPressed) + { + __focusId = DATETIME_ID_NONE; + } + __isFocused = false; + __pEditDate->Invalidate(); + return true; +} + +void +_EditDatePresenter::OnFocusModeStateChanged(void) +{ + __isFocused = false; + __isEnterKeyPressed = false; + __focusId = DATETIME_ID_NONE; + __pEditDate->Invalidate(); + return; +} + +bool +_EditDatePresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) +{ + if (!__isFocused) + { + return false; + } + + _KeyCode keyCode = keyInfo.GetKeyCode(); + _DateTimeUtils dateTimeUtils; + int localeDateFormat = dateTimeUtils.GetLocaleDateFormat(); + + switch (keyCode) + { + case _KEY_RIGHT: + { + if (__focusId == DATETIME_ID_DAY) + { + if (localeDateFormat == DATE_FORMAT_DDMMYYYY || localeDateFormat == DATE_FORMAT_YYYYDDMM) + { + __focusId = DATETIME_ID_MONTH; + } + else if (localeDateFormat == DATE_FORMAT_MMDDYYYY) + { + __focusId = DATETIME_ID_YEAR; + } + else + { + return false; + } + } + else if (__focusId == DATETIME_ID_MONTH) + { + if (localeDateFormat == DATE_FORMAT_DDMMYYYY) + { + __focusId = DATETIME_ID_YEAR; + } + else if (localeDateFormat == DATE_FORMAT_MMDDYYYY || localeDateFormat == DATE_FORMAT_YYYYMMDD) + { + __focusId = DATETIME_ID_DAY; + } + else + { + return false; + } + } + else if (__focusId == DATETIME_ID_YEAR) + { + if (localeDateFormat == DATE_FORMAT_YYYYMMDD) + { + __focusId = DATETIME_ID_MONTH; + } + else if (localeDateFormat == DATE_FORMAT_YYYYDDMM) + { + __focusId = DATETIME_ID_DAY; + } + else + { + return false; + } + } + __pEditDate->Invalidate(); + break; + } + case _KEY_LEFT: + { + if (__focusId == DATETIME_ID_DAY) + { + if (localeDateFormat == DATE_FORMAT_YYYYDDMM) + { + __focusId = DATETIME_ID_YEAR; + } + else if (localeDateFormat == DATE_FORMAT_MMDDYYYY || localeDateFormat == DATE_FORMAT_YYYYMMDD) + { + __focusId = DATETIME_ID_MONTH; + } + else + { + return false; + } + } + else if (__focusId == DATETIME_ID_MONTH) + { + if (localeDateFormat == DATE_FORMAT_YYYYMMDD) + { + __focusId = DATETIME_ID_YEAR; + } + else if (localeDateFormat == DATE_FORMAT_DDMMYYYY || localeDateFormat == DATE_FORMAT_YYYYDDMM) + { + __focusId = DATETIME_ID_DAY; + } + else + { + return false; + } + } + else if (__focusId == DATETIME_ID_YEAR) + { + if (localeDateFormat == DATE_FORMAT_DDMMYYYY) + { + __focusId = DATETIME_ID_MONTH; + } + else if (localeDateFormat == DATE_FORMAT_MMDDYYYY) + { + __focusId = DATETIME_ID_DAY; + } + else + { + return false; + } + } + __pEditDate->Invalidate(); + break; + } + default: + { + return false; + } + } + return true; +} + +bool +_EditDatePresenter::OnKeyReleased(const _Control& source, const _KeyCode& keyCode) +{ + if (!__isFocused) + { + return false; + } + + if (__isAnimating) + { + VisualElement *pEditDateElement = __pEditDate->GetVisualElement(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, (pEditDateElement != null), false, r, "[%s] Propagating.", GetErrorMessage(r)); + pEditDateElement->RemoveAllAnimations(); + } + + int minValue = -1; + int maxValue = -1; + int displayValue = -1; + + _DateTimeId boxId = DATETIME_ID_NONE; + + switch (keyCode) + { + case _KEY_ENTER: + { + __isEnterKeyPressed = true; + if (__focusId == DATETIME_ID_DAY) + { + _DateTimeUtils dateTimeUtils; + maxValue = dateTimeUtils.CalculateMaxDay(GetYear(), GetMonth()); + minValue = DATETIME_DAY_MIN; + displayValue = GetDay(); + boxId = DATETIME_ID_DAY; + + if (__pEditDate->GetDateTimeBar()->GetItemCount() > 0) + { + __pEditDate->GetDateTimeBar()->RemoveAllItems(); + } + } + + else if (__focusId == DATETIME_ID_MONTH) + { + minValue = DATETIME_MONTH_MIN; + maxValue = DATETIME_MONTH_MAX; + displayValue = GetMonth(); + boxId = DATETIME_ID_MONTH; + + if (__pEditDate->GetDateTimeBar()->GetItemCount() > 0) + { + __pEditDate->GetDateTimeBar()->RemoveAllItems(); + } + } + else if (__focusId == DATETIME_ID_YEAR) + { + minValue = GetMinYear(); + maxValue = GetMaxYear(); + displayValue = GetYear(); + boxId = DATETIME_ID_YEAR; + + if (__pEditDate->GetDateTimeBar()->GetItemCount() > 0) + { + __pEditDate->GetDateTimeBar()->RemoveAllItems(); + } + } + FloatRectangle absoluteBounds = __pEditDate->GetAbsoluteBoundsF(); + + FloatRectangle bounds(0.0f, 0.0f, 0.0f, 0.0f); + bounds = GetDateAreaBounds(boxId); + bounds.x += absoluteBounds.x; + __pEditDate->GetDateTimeBar()->CalculateArrowBounds(bounds); + __pEditDate->GetDateTimeBar()->SetInitialValue(minValue, maxValue, displayValue, boxId); + __pEditDate->GetDateTimeBar()->SetVisibleState(true); + __pEditDate->GetDateTimeBar()->Open(); + + UpdateLastSelectedValue(boxId, false); + break; + } + default: + { + return false; + } + } + return true; +} + +bool +_EditDatePresenter::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + SysTryReturn(NID_UI_CTRL, IsDatePickerEnabled() == true, true, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. EditDate instance is disabled."); + + if (&source != __pEditDate) + { + return false; + } + + __touchMoveHandled = false; + + FloatPoint point = touchinfo.GetCurrentPosition(); + + _DateTimeId boxId = DATETIME_ID_NONE; + boxId = GetBoxIdFromPosition(point); + + if (boxId < DATETIME_ID_YEAR || boxId > DATETIME_ID_DAY) + { + __selectedId = DATETIME_ID_NONE; + return true; + } + + int minValue = -1; + int maxValue = -1; + int displayValue = -1; + + if (boxId == DATETIME_ID_DAY) + { + if (__pEditDate->GetDateTimeBar() != null) + { + _DateTimeUtils dateTimeUtils; + maxValue = dateTimeUtils.CalculateMaxDay(GetYear(), GetMonth()); + minValue = DATETIME_DAY_MIN; + displayValue = GetDay(); + } + } + else if (boxId == DATETIME_ID_MONTH) + { + minValue = DATETIME_MONTH_MIN; + maxValue = DATETIME_MONTH_MAX; + displayValue = GetMonth(); + } + else if (boxId == DATETIME_ID_YEAR) + { + minValue = GetMinYear(); + maxValue = GetMaxYear(); + displayValue = GetYear(); + } + + if (__pEditDate->GetDateTimeBar() != null) + { + if (__pEditDate->GetDateTimeBar()->GetItemCount() > 0) + { + __pEditDate->GetDateTimeBar()->RemoveAllItems(); + } + + result r = __pEditDate->GetDateTimeBar()->SetInitialValue(minValue, maxValue, displayValue, boxId); + if (r != E_SUCCESS) + { + __selectedId = DATETIME_ID_NONE; + return true; + } + } + + __selectedId = boxId; + + return true; +} + +bool +_EditDatePresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + SysTryReturn(NID_UI_CTRL, IsDatePickerEnabled() == true, true, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. EditDate instance is disabled."); + + if (&source != __pEditDate) + { + return false; + } + + FloatPoint point = touchinfo.GetCurrentPosition(); + + _DateTimeId boxId = DATETIME_ID_NONE; + boxId = GetBoxIdFromPosition(point); + + if (boxId == GetLastSelectedId() || boxId != __selectedId || boxId == DATETIME_ID_NONE) + { + if (__pEditDate->GetDateTimeBar() != null && __pEditDate->GetDateTimeBar()->IsActivated()) + { + __pEditDate->GetDateTimeBar()->CloseDateTimeBar(); + } + + __selectedId = DATETIME_ID_NONE; + SetLastSelectedId(__selectedId); + + Draw(); + + return true; + } + + UpdateLastSelectedValue(__selectedId, true); + + if ((__pEditDate->GetDateTimeBar() != null) && (GetLastSelectedId() != DATETIME_ID_NONE)) + { + __pEditDate->SetFocused(true); + FloatRectangle bounds(0.0f, 0.0f, 0.0f, 0.0f); + bounds = GetDateAreaBounds(GetLastSelectedId()); + FloatRectangle absoluteBounds(0.0f, 0.0f, 0.0f, 0.0f); + absoluteBounds = __pEditDate->GetAbsoluteBoundsF(); + bounds.x += absoluteBounds.x; + + __pEditDate->GetDateTimeBar()->CalculateArrowBounds(bounds); + + if (__pEditDate->GetDateTimeBar()->IsActivated()) + { + __pEditDate->GetDateTimeBar()->ClearPreviousText(); + __pEditDate->GetDateTimeBar()->RemoveAllAnimations(); + __pEditDate->GetDateTimeBar()->Close(); + __pEditDate->GetDateTimeBar()->SetVisibleState(true); + __pEditDate->GetDateTimeBar()->Open(); + } + else + { + __pEditDate->GetDateTimeBar()->SetVisibleState(true); + __pEditDate->GetDateTimeBar()->Open(); + } + } + + __selectedId = DATETIME_ID_NONE; + return true; +} + +bool +_EditDatePresenter::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + if (&source != __pEditDate) + { + return false; + } + + __selectedId = DATETIME_ID_NONE; + __pEditDate->Invalidate(); + + return true; +} + +bool +_EditDatePresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + if (&source != __pEditDate) + { + return false; + } + + if (__pEditDate->GetDateTimeBar() != null && __pEditDate->GetDateTimeBar()->IsActivated()) + { + return true; + } + + return false; +} + +void +_EditDatePresenter::OnTouchMoveHandled(const _Control& control) +{ + __touchMoveHandled = true; + __selectedId = DATETIME_ID_NONE; + + return; +} + +void +_EditDatePresenter::Animate(void) +{ + SysTryReturnVoidResult(NID_UI_CTRL, !__isAnimating, E_SUCCESS, "Rolling animation is in progress."); + SysAssertf((__pFont != null), "Font instance must not be null."); + + result r = E_SUCCESS; + FloatRectangle rect; + String monthString; + String yearString; + String dayString; + String newValue; + FloatPoint textPoint; + TextSimple* pOldSimpleText = null; + TextSimple* pNewSimpleText = null; + bool isCustomBitmap = false; + + _DateTimeUtils dateTimeUtils; + monthString = dateTimeUtils.GetMonthString(GetMonth()); + yearString.Format(10, L"%04d", GetYear()); + dayString.Format(10, L"%02d", GetDay()); + + if (GetLastSelectedId() == DATETIME_ID_DAY) + { + SysTryReturnVoidResult(NID_UI_CTRL, (__lastSelectedValue.Equals(dayString) == false), E_SUCCESS, "Day string matched."); + + newValue = dayString; + rect = GetDateAreaBounds(DATETIME_ID_DAY); + } + else if (GetLastSelectedId() == DATETIME_ID_MONTH) + { + SysTryReturnVoidResult(NID_UI_CTRL, (__lastSelectedValue.Equals(monthString) == false), E_SUCCESS, "Month string matched."); + + newValue = monthString; + rect = GetDateAreaBounds(DATETIME_ID_MONTH); + } + else if (GetLastSelectedId() == DATETIME_ID_YEAR) + { + SysTryReturnVoidResult(NID_UI_CTRL, (__lastSelectedValue.Equals(yearString) == false), E_SUCCESS, "Year string matched."); + + newValue = yearString; + rect = GetDateAreaBounds(DATETIME_ID_YEAR); + } + + FloatDimension newTextDim; + FloatDimension oldTextDim; + VisualElement* pNewVisualElement = null; + VisualElement* pOldVisualElement = null; + VisualElement* pEditDateElement = null; + VisualElementPropertyAnimation* pNewBoundsAnimation = null; + VisualElementPropertyAnimation* pOldBoundsAnimation = null; + Canvas *pCanvas = null; + Canvas *pContentCanvas = null; + Color contentBgColor; + Color textPressedColor; + float contentTextMargin; + + GET_COLOR_CONFIG(EDITTIME::CONTENT_BG_PRESSED, contentBgColor); + GET_COLOR_CONFIG(EDITTIME::TEXT_PRESSED, textPressedColor); + GET_SHAPE_CONFIG(EDITDATE::CONTENT_TEXT_MARGIN, __pEditDate->GetOrientation(), contentTextMargin); + + __pFont->GetTextExtent(newValue, newValue.GetLength(), newTextDim); + __pFont->GetTextExtent(__lastSelectedValue, __lastSelectedValue.GetLength(), oldTextDim); + + if (newTextDim.width > oldTextDim.width) + { + textPoint.x = (rect.width - newTextDim.width) / 2.0f; + } + else + { + textPoint.x = (rect.width - oldTextDim.width) / 2.0f; + } + + SysTryReturnVoidResult(NID_UI_CTRL, (rect.x + textPoint.x < __pEditDate->GetBoundsF().width), E_SUCCESS, "Rolling animation can't be played."); + + __isAnimating = true; + + __pContentProvider = new (std::nothrow) VisualElement(); + SysTryReturnVoidResult(NID_UI_CTRL, (__pContentProvider != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = __pContentProvider->Construct(); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pContentProvider->SetShowState(true); + __pContentProvider->SetClipChildrenEnabled(true); + __pContentProvider->SetImplicitAnimationEnabled(false); + + pEditDateElement = __pEditDate->GetVisualElement(); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, (pEditDateElement != null), , r, "[%s] Propagating.", GetErrorMessage(r)); + + pNewVisualElement = new (std::nothrow) VisualElement(); + SysTryCatch(NID_UI_CTRL, (pNewVisualElement != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = pNewVisualElement->Construct(); + if (r != E_SUCCESS) + { + pNewVisualElement->Destroy(); + pNewVisualElement = null; + } + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + pOldVisualElement = new (std::nothrow) VisualElement(); + if (pOldVisualElement == null) + { + pNewVisualElement->Destroy(); + pNewVisualElement = null; + } + SysTryCatch(NID_UI_CTRL, (pOldVisualElement != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = pOldVisualElement->Construct(); + if (r != E_SUCCESS) + { + pNewVisualElement->Destroy(); + pOldVisualElement->Destroy(); + pNewVisualElement = null; + pOldVisualElement = null; + } + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + pNewVisualElement->SetShowState(true); + pOldVisualElement->SetShowState(true); + + __pContentProvider->SetBounds(FloatRectangle((rect.x + contentTextMargin), (rect.y + (contentTextMargin * 2.0f)), (rect.width - (contentTextMargin * 2.0f)), (rect.height - (contentTextMargin * 4.0f)))); + + pNewVisualElement->SetBounds(FloatRectangle(0, 0, __pContentProvider->GetBounds().width, __pContentProvider->GetBounds().height)); + pOldVisualElement->SetBounds(FloatRectangle(0, 0, __pContentProvider->GetBounds().width, __pContentProvider->GetBounds().height)); + + pContentCanvas = pEditDateElement->GetCanvasN(__pContentProvider->GetBounds()); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, (pContentCanvas != null), , r, "[%s] Propagating.", GetErrorMessage(r)); + + pContentCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pContentCanvas->Clear(); + + pCanvas = pEditDateElement->GetCanvasN(rect); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, (pCanvas != null), , r, "[%s] Propagating.", GetErrorMessage(r)); + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + rect.x = 0.0f; + rect.y = 0.0f; + isCustomBitmap = IS_CUSTOM_BITMAP(EDITDATE::CONTENT_BG_PRESSED); + r = DrawResourceBitmap(*pCanvas, rect, __pContentBgPressedColorReplacementBitmap, isCustomBitmap); + + if (!isCustomBitmap) + { + result res = DrawResourceBitmap(*pCanvas, rect, __pContentBgEffectPressedBitmap); + + if (res != E_SUCCESS) + { + SysLog(NID_UI_CTRL, "[%s] Propagating.", GetErrorMessage(res)); + } + } + + delete pCanvas; + pCanvas = null; + + if (r != E_SUCCESS) + { + pContentCanvas->SetBackgroundColor(contentBgColor); + pContentCanvas->Clear(); + } + + delete pContentCanvas; + pContentCanvas = null; + + pEditDateElement->AttachChild(*__pContentProvider); + __pContentProvider->AttachChild(*pOldVisualElement); + __pContentProvider->AttachChild(*pNewVisualElement); + + pNewBoundsAnimation = new (std::nothrow) VisualElementPropertyAnimation(); + SysTryCatch(NID_UI_CTRL, (pNewBoundsAnimation != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pNewBoundsAnimation->SetDuration(300); + pNewBoundsAnimation->SetPropertyName("bounds.position"); + pNewBoundsAnimation->SetStartValue(Variant(FloatPoint(pNewVisualElement->GetBounds().x, oldTextDim.height))); + pNewBoundsAnimation->SetEndValue(Variant(FloatPoint(pNewVisualElement->GetBounds().x, 0.0f))); + + pOldBoundsAnimation = new (std::nothrow) VisualElementPropertyAnimation(); + SysTryCatch(NID_UI_CTRL, (pOldBoundsAnimation != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pOldBoundsAnimation->SetDuration(300); + pOldBoundsAnimation->SetPropertyName("bounds.position"); + pOldBoundsAnimation->SetStartValue(Variant(FloatPoint(pOldVisualElement->GetBounds().x, 0.0f))); + pOldBoundsAnimation->SetEndValue(Variant(FloatPoint(pOldVisualElement->GetBounds().x, oldTextDim.height * -1.0f))); + + 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)); + + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + pCanvas->SetForegroundColor(textPressedColor); + + (_FontImpl::GetInstance(*__pFont))->SetSize(__dateFontSize); + (_FontImpl::GetInstance(*__pFont))->SetStyle(FONT_STYLE_PLAIN); + __textObject.RemoveAll(); + __textObject.AppendElement(*pOldSimpleText); + + __textObject.SetFont(__pFont, 0, __textObject.GetTextLength()); + __textObject.SetForegroundColor(textPressedColor, 0, __textObject.GetTextLength()); + __textObject.SetBounds(FloatRectangle(0, 0, pCanvas->GetBounds().width, pCanvas->GetBounds().height)); + __textObject.Draw(*_CanvasImpl::GetInstance(*pCanvas)); + + delete pCanvas; + pCanvas = null; + + pNewSimpleText = new (std::nothrow)TextSimple((const_cast (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)); + + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + pCanvas->SetForegroundColor(textPressedColor); + + (_FontImpl::GetInstance(*__pFont))->SetSize(__dateFontSize); + (_FontImpl::GetInstance(*__pFont))->SetStyle(FONT_STYLE_PLAIN); + __textObject.RemoveAll(); + __textObject.AppendElement(*pNewSimpleText); + + __textObject.SetFont(__pFont, 0, __textObject.GetTextLength()); + __textObject.SetForegroundColor(textPressedColor, 0, __textObject.GetTextLength()); + __textObject.SetBounds(FloatRectangle(0, 0, pCanvas->GetBounds().width, pCanvas->GetBounds().height)); + __textObject.Draw(*_CanvasImpl::GetInstance(*pCanvas)); + + delete pCanvas; + pCanvas = null; + + pOldVisualElement->SetImplicitAnimationEnabled(false); + pNewVisualElement->SetImplicitAnimationEnabled(false); + + AnimationTransaction::Begin(__transactionId); + pOldVisualElement->AddAnimation(*pOldBoundsAnimation); + pNewVisualElement->AddAnimation(*pNewBoundsAnimation); + AnimationTransaction::SetCurrentTransactionEventListener(__pEditDate); + AnimationTransaction::Commit(); + + delete pOldBoundsAnimation; + delete pNewBoundsAnimation; + + return; + +CATCH: + __isAnimating = false; + __pContentProvider->Destroy(); + __pContentProvider = null; + + delete pNewBoundsAnimation; + pNewBoundsAnimation = null; + + delete pOldBoundsAnimation; + pOldBoundsAnimation = null; + + delete pOldSimpleText; + pOldSimpleText = null; + + delete pNewSimpleText; + pNewSimpleText = null; + + delete pContentCanvas; + pContentCanvas = null; + + return; +} + +void +_EditDatePresenter::EndTransaction(void) +{ + result r = E_SUCCESS; + + __isAnimating = false; + VisualElement* pEditDateElement = __pEditDate->GetVisualElement(); + r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, (pEditDateElement != null), r, "[%s] Propagating.", GetErrorMessage(r)); + + //__pContentProvider will be destroyed in destructor when OnFormBackRequested() callback is received + if (__pContentProvider != null) + { + pEditDateElement->DetachChild(*__pContentProvider); + __pContentProvider->Destroy(); + __pContentProvider = null; + } + + Draw(); + __transactionId = 0; + return; +} +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_EditFieldImpl.cpp b/src/ui/controls/FUiCtrl_EditFieldImpl.cpp new file mode 100644 index 0000000..3e214ce --- /dev/null +++ b/src/ui/controls/FUiCtrl_EditFieldImpl.cpp @@ -0,0 +1,2354 @@ +// +// 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_EditFieldImpl.cpp + * @brief This file contains implementation of _EditFieldImpl class + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "FUi_ControlImpl.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_IFocusEventListener.h" +#include "FUi_ResourceSizeInfo.h" +#include "FUi_UiBuilder.h" +#include "FUiCtrl_Edit.h" +#include "FUiCtrl_EditFieldImpl.h" +#include "FUiCtrl_PublicActionEvent.h" +#include "FUiCtrl_PublicKeypadEvent.h" +#include "FUiCtrl_PublicLanguageEvent.h" +#include "FUiCtrl_PublicLinkEvent.h" +#include "FUiCtrl_PublicScrollPanelEvent.h" +#include "FUiCtrl_PublicTextBlockEvent.h" +#include "FUiCtrl_PublicTextEvent.h" +#include "FUi_CoordinateSystemUtils.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Base::Utility; +using namespace Tizen::Graphics; +using namespace Tizen::Locales; +using namespace Tizen::Ui; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_EditFieldImpl::EditFieldSizeInfo::EditFieldSizeInfo(void) + :__titleStyle(EDIT_FIELD_TITLE_STYLE_NONE) + , __smallStyle(false) +{ +} + +Dimension +_EditFieldImpl::EditFieldSizeInfo::GetDefaultMinimumSize(_ControlOrientation orientation) const +{ + result r = E_SUCCESS; + Dimension editFieldMinimumSize(0, 0); + + if (__smallStyle) + { + r = GET_DIMENSION_CONFIG(EDIT::SMALL_STYLE_MIN_SIZE, orientation, editFieldMinimumSize); + SysTryReturn(NID_UI, r == E_SUCCESS, editFieldMinimumSize, r, "System Error occurred."); + } + else if (__titleStyle == EDIT_FIELD_TITLE_STYLE_TOP) + { + r = GET_DIMENSION_CONFIG(EDIT::TITLE_STYLE_MIN_SIZE, orientation, editFieldMinimumSize); + SysTryReturn(NID_UI, r == E_SUCCESS, editFieldMinimumSize, r, "System Error occurred."); + } + else + { + r = GET_DIMENSION_CONFIG(EDIT::MIN_SIZE, orientation, editFieldMinimumSize); + SysTryReturn(NID_UI, r == E_SUCCESS, editFieldMinimumSize, r, "System Error occurred."); + } + + return editFieldMinimumSize; +} + +FloatDimension +_EditFieldImpl::EditFieldSizeInfo::GetDefaultMinimumSizeF(_ControlOrientation orientation) const +{ + result r = E_SUCCESS; + FloatDimension editFieldMinimumSize(0.0f, 0.0f); + + if (__smallStyle) + { + r = GET_DIMENSION_CONFIG(EDIT::SMALL_STYLE_MIN_SIZE, orientation, editFieldMinimumSize); + SysTryReturn(NID_UI, r == E_SUCCESS, editFieldMinimumSize, r, "System Error occurred."); + } + else if (__titleStyle == EDIT_FIELD_TITLE_STYLE_TOP) + { + r = GET_DIMENSION_CONFIG(EDIT::TITLE_STYLE_MIN_SIZE, orientation, editFieldMinimumSize); + SysTryReturn(NID_UI, r == E_SUCCESS, editFieldMinimumSize, r, "System Error occurred."); + } + else + { + r = GET_DIMENSION_CONFIG(EDIT::MIN_SIZE, orientation, editFieldMinimumSize); + SysTryReturn(NID_UI, r == E_SUCCESS, editFieldMinimumSize, r, "System Error occurred."); + } + + return editFieldMinimumSize; +} + +void +_EditFieldImpl::EditFieldSizeInfo::SetTitleStyle(EditFieldTitleStyle titleStyle) +{ + __titleStyle = titleStyle; +} + +void +_EditFieldImpl::EditFieldSizeInfo::SetSmallStyle(bool isSmallStyle) +{ + __smallStyle = isSmallStyle; +} + + +_EditFieldImpl* +_EditFieldImpl::GetInstance(EditField& editField) +{ + return (static_cast<_EditFieldImpl*> (editField._pControlImpl)); +} + +const _EditFieldImpl* +_EditFieldImpl::GetInstance(const EditField& editField) +{ + return (static_cast (editField._pControlImpl)); +} + +_EditFieldImpl::_EditFieldImpl(EditField* pPublic, _Edit* pCore) + : _ControlImpl(pPublic, pCore) + , __pEdit(pCore) + , __editFieldStyle(EDIT_FIELD_STYLE_NORMAL) + , __inputStyle(INPUT_STYLE_OVERLAY) + , __inputModeCategory(EDIT_INPUTMODE_ALPHA | EDIT_INPUTMODE_PREDICTIVE | EDIT_INPUTMODE_NUMERIC | EDIT_INPUTMODE_SYMBOL) + , __currentInputMode(EDIT_INPUTMODE_ALPHA) + , __pPublicActionEvent(null) + , __pPublicKeypadEvent(null) + , __pPublicLanguageEvent(null) + , __pPublicLinkEvent(null) + , __pPublicScrollPanelEvent(null) + , __pPublicTextBlockEvent(null) + , __pPublicTextEvent(null) + , __autoLinkMask(LINK_TYPE_NONE) +{ +} + +_EditFieldImpl::~_EditFieldImpl(void) +{ + if (__pEdit) + { + __pEdit->RemoveTextEventListener(*this); + __pEdit->RemoveActionEventListener(*this); + __pEdit->RemoveTextBlockEventListener(*this); + __pEdit->RemoveUiLinkEventListener(*this); + __pEdit->RemoveKeypadEventListener(*this); + __pEdit->RemoveActionEventListener(*this); + if (__pEdit->GetInputStyle() == INPUT_STYLE_OVERLAY) + { + __pEdit->RemoveScrollPanelEventListener(*this); + } + } + + if (__pPublicTextEvent) + { + delete __pPublicTextEvent; + __pPublicTextEvent = null; + } + + if (__pPublicActionEvent) + { + delete __pPublicActionEvent; + __pPublicActionEvent = null; + } + + if (__pPublicTextBlockEvent) + { + delete __pPublicTextBlockEvent; + __pPublicTextBlockEvent = null; + } + + if (__pPublicLinkEvent) + { + delete __pPublicLinkEvent; + __pPublicLinkEvent = null; + } + + if (__pPublicKeypadEvent) + { + delete __pPublicKeypadEvent; + __pPublicKeypadEvent = null; + } + + if (__pPublicLanguageEvent) + { + delete __pPublicLanguageEvent; + __pPublicLanguageEvent = null; + } + + if (__pPublicScrollPanelEvent) + { + delete __pPublicScrollPanelEvent; + __pPublicScrollPanelEvent = null; + } +} + +_EditFieldImpl* +_EditFieldImpl::CreateEditFieldImplN(EditField* pControl, const Rectangle& rect, EditFieldStyle style, EditFieldTitleStyle titleStyle) +{ + ClearLastResult(); + + result r = E_SUCCESS; + + bool isSmallStyle = false; + + if (style == EDIT_FIELD_STYLE_NORMAL_SMALL || style == EDIT_FIELD_STYLE_PASSWORD_SMALL + || style == EDIT_FIELD_STYLE_EMAIL_SMALL || style == EDIT_FIELD_STYLE_URL_SMALL + || style == EDIT_FIELD_STYLE_IP_V4_SMALL || style == EDIT_FIELD_STYLE_PHONE_NUMBER_SMALL + || style == EDIT_FIELD_STYLE_NUMBER_SMALL || style == EDIT_FIELD_STYLE_PASSWORD_NUMBER_SMALL) + { + isSmallStyle = true; + } + + _Edit* pCore = _Edit::CreateEditN(); + SysTryReturn(NID_UI_CTRL, pCore, null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _EditFieldImpl* pImpl = new (std::nothrow) _EditFieldImpl(pControl, pCore); + r = _ControlImpl::CheckConstruction(pCore, pImpl); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + return pImpl; +} + +_EditFieldImpl* +_EditFieldImpl::CreateEditFieldImplN(EditField* pControl, const FloatRectangle& rect, EditFieldStyle style, EditFieldTitleStyle titleStyle) +{ + ClearLastResult(); + + result r = E_SUCCESS; + + bool isSmallStyle = false; + + if (style == EDIT_FIELD_STYLE_NORMAL_SMALL || style == EDIT_FIELD_STYLE_PASSWORD_SMALL + || style == EDIT_FIELD_STYLE_EMAIL_SMALL || style == EDIT_FIELD_STYLE_URL_SMALL + || style == EDIT_FIELD_STYLE_IP_V4_SMALL || style == EDIT_FIELD_STYLE_PHONE_NUMBER_SMALL + || style == EDIT_FIELD_STYLE_NUMBER_SMALL || style == EDIT_FIELD_STYLE_PASSWORD_NUMBER_SMALL) + { + isSmallStyle = true; + } + + _Edit* pCore = _Edit::CreateEditN(); + SysTryReturn(NID_UI_CTRL, pCore, null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _EditFieldImpl* pImpl = new (std::nothrow) _EditFieldImpl(pControl, pCore); + r = _ControlImpl::CheckConstruction(pCore, pImpl); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + return pImpl; +} + +const char* +_EditFieldImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Controls::EditField"; +} + +const EditField& +_EditFieldImpl::GetPublic(void) const +{ + return static_cast (_ControlImpl::GetPublic()); +} + +EditField& +_EditFieldImpl::GetPublic(void) +{ + return static_cast (_ControlImpl::GetPublic()); +} + +const _Edit& +_EditFieldImpl::GetCore(void) const +{ + return static_cast (_ControlImpl::GetCore()); +} + +_Edit& +_EditFieldImpl::GetCore(void) +{ + return static_cast <_Edit&>(_ControlImpl::GetCore()); +} + +result +_EditFieldImpl::Initialize(EditFieldStyle style, InputStyle inputStyle, + EditFieldTitleStyle titleStlye, bool enableClear, int limitLength, + GroupStyle groupStyle) +{ + result r = E_SUCCESS; + + int editfieldStyle = EDIT_STYLE_NORMAL | EDIT_STYLE_SINGLE_LINE | EDIT_STYLE_NOSCROLL; + bool isSmallStyle = false; + EditFieldStyle tempStyle = style; + KeypadStyle keypadStyle = KEYPAD_STYLE_NORMAL; + Variant variantKeypadStyle = (int)KEYPAD_STYLE_NORMAL; + + if (style == EDIT_FIELD_STYLE_NORMAL_SMALL || style == EDIT_FIELD_STYLE_PASSWORD_SMALL + || style == EDIT_FIELD_STYLE_EMAIL_SMALL || style == EDIT_FIELD_STYLE_URL_SMALL + || style == EDIT_FIELD_STYLE_IP_V4_SMALL || style == EDIT_FIELD_STYLE_PHONE_NUMBER_SMALL + || style == EDIT_FIELD_STYLE_NUMBER_SMALL || style == EDIT_FIELD_STYLE_PASSWORD_NUMBER_SMALL) + { + isSmallStyle = true; + switch (style) + { + case EDIT_FIELD_STYLE_EMAIL_SMALL: + tempStyle = EDIT_FIELD_STYLE_EMAIL; + break; + + case EDIT_FIELD_STYLE_PASSWORD_SMALL: + tempStyle = EDIT_FIELD_STYLE_PASSWORD; + break; + + case EDIT_FIELD_STYLE_URL_SMALL: + tempStyle = EDIT_FIELD_STYLE_URL; + break; + + case EDIT_FIELD_STYLE_NUMBER_SMALL: + tempStyle = EDIT_FIELD_STYLE_NUMBER; + break; + + case EDIT_FIELD_STYLE_PHONE_NUMBER_SMALL: + tempStyle = EDIT_FIELD_STYLE_PHONE_NUMBER; + break; + + case EDIT_FIELD_STYLE_PASSWORD_NUMBER_SMALL: + tempStyle = EDIT_FIELD_STYLE_PASSWORD_NUMBER; + break; + + case EDIT_FIELD_STYLE_IP_V4_SMALL: + tempStyle = EDIT_FIELD_STYLE_IP_V4; + break; + + default: + break; + } + } + + + + if (tempStyle == EDIT_FIELD_STYLE_PASSWORD || tempStyle == EDIT_FIELD_STYLE_PASSWORD_NUMBER) + { + editfieldStyle |= EDIT_STYLE_PASSWORD; + } + + if (isSmallStyle && (titleStlye != EDIT_FIELD_TITLE_STYLE_NONE)) + { + r = E_UNSUPPORTED_OPTION; + SysLogException(NID_UI_CTRL, E_UNSUPPORTED_OPTION, "[E_UNSUPPORTED_OPTION] Unsupported operation."); + return r; + } + + if (titleStlye == EDIT_FIELD_TITLE_STYLE_INNER) + { + editfieldStyle |= EDIT_STYLE_TITLE_LEFT; + } + else if (titleStlye == EDIT_FIELD_TITLE_STYLE_TOP) + { + editfieldStyle |= EDIT_STYLE_TITLE_TOP; + } + + if (enableClear) + { + editfieldStyle |= EDIT_STYLE_CLEAR; + } + + __inputStyle = inputStyle; + __editFieldStyle = tempStyle; + + r = __pEdit->Initialize(editfieldStyle, inputStyle, limitLength, groupStyle); + if (r != E_SUCCESS) + { + return r; + } + + if (!_AppInfo::IsOspCompat()) + { + __pEdit->SetKeypadCommandButtonVisible(false); + } + + switch (tempStyle) + { + case EDIT_FIELD_STYLE_EMAIL : + keypadStyle = KEYPAD_STYLE_EMAIL; + break; + + case EDIT_FIELD_STYLE_URL : + keypadStyle = KEYPAD_STYLE_URL; + break; + + case EDIT_FIELD_STYLE_NUMBER : + keypadStyle = KEYPAD_STYLE_NUMBER; + break; + + case EDIT_FIELD_STYLE_PHONE_NUMBER : + keypadStyle = KEYPAD_STYLE_PHONE_NUMBER; + break; + + case EDIT_FIELD_STYLE_PASSWORD_NUMBER : + keypadStyle = KEYPAD_STYLE_NUMBER; + break; + + case EDIT_FIELD_STYLE_IP_V4 : + keypadStyle = KEYPAD_STYLE_IP_V4; + break; + + case EDIT_FIELD_STYLE_PASSWORD : + keypadStyle = KEYPAD_STYLE_PASSWORD; + break; + + default: + break; + } + + variantKeypadStyle = (int) keypadStyle; + __pEdit->SetPropertyKeypadStyle(variantKeypadStyle); + + __pPublicActionEvent = _PublicActionEvent::CreateInstanceN(GetPublic()); + 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] 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] 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] 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] 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] Memory allocation failed."); + + if (inputStyle == INPUT_STYLE_OVERLAY) + { + r = __pEdit->AddScrollPanelEventListener(*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] Memory allocation failed."); + + r = __pEdit->AddLanguageEventListener(*this); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (inputStyle == INPUT_STYLE_OVERLAY) + { + __pEdit->SetAutoLinkMask(LINK_TYPE_URL | LINK_TYPE_EMAIL | LINK_TYPE_TEL_NUM); + } + + return r; +} + +result +_EditFieldImpl::Dispose(void) +{ + result r = E_SUCCESS; + + if (__pEdit) + { + delete __pEdit; + __pEdit = null; + } + + return r; +} + +HorizontalAlignment +_EditFieldImpl::GetTextAlignment(void) const +{ + return __pEdit->GetTextAlignment(); +} + +result +_EditFieldImpl::SetTextAlignment(HorizontalAlignment alignment) +{ + return __pEdit->SetTextAlignment(alignment); +} + +bool +_EditFieldImpl::IsViewModeEnabled(void) const +{ + return __pEdit->GetPropertyViewModeEnabled().ToBool(); +} + +result +_EditFieldImpl::SetViewModeEnabled(bool enable) +{ + Variant variantEnable(enable); + + return __pEdit->SetPropertyViewModeEnabled(variantEnable); +} + +result +_EditFieldImpl::SetAutoLinkMask(unsigned long autoLinks) +{ + result r = E_SUCCESS; + Variant variantAutoLinks(autoLinks); + + r = __pEdit->SetPropertyAutoLinkMask(variantAutoLinks); + + if (r == E_SUCCESS) + { + __autoLinkMask = autoLinks; + } + + return r; +} + +unsigned long +_EditFieldImpl::GetAutoLinkMask(void) const +{ + SysTryReturn(NID_UI_CTRL, (__inputStyle == INPUT_STYLE_OVERLAY), LINK_TYPE_NONE, E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] The current state unable to this operation."); + return __autoLinkMask; +} + +int +_EditFieldImpl::GetMargin(EditMarginType marginType) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetMarginF(marginType)); +} + +float +_EditFieldImpl::GetMarginF(EditMarginType marginType) const +{ + if (marginType == EDIT_MARGIN_TYPE_VERTICAL) + { + return __pEdit->GetVerticalMarginF(EDIT_TEXT_TOP_MARGIN); + } + else + { + return __pEdit->GetHorizontalMarginF(EDIT_TEXT_LEFT_MARGIN); + } +} + +result +_EditFieldImpl::SetMargin(EditMarginType marginType, int margin) +{ + return SetMargin(marginType, _CoordinateSystemUtils::ConvertToFloat(margin)); +} + +result +_EditFieldImpl::SetMargin(EditMarginType marginType, float margin) +{ + result r = E_SUCCESS; + Variant varMargin(margin); + + if (marginType == EDIT_MARGIN_TYPE_HORIZONTAL) + { + r = __pEdit->SetHorizontalMargin(margin, EDIT_TEXT_LEFT_MARGIN); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + r = __pEdit->SetHorizontalMargin(margin, EDIT_TEXT_RIGHT_MARGIN); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + r = __pEdit->SetVerticalMargin(margin, EDIT_TEXT_TOP_MARGIN); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + r = __pEdit->SetVerticalMargin(margin, EDIT_TEXT_BOTTOM_MARGIN); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + return r; +} + +result +_EditFieldImpl::SetKeypadActionEnabled(bool enable) +{ + Variant variantEnable(enable); + + return __pEdit->SetPropertyKeypadActionEnabled(variantEnable); +} + +bool +_EditFieldImpl::IsKeypadActionEnabled(void) const +{ + return __pEdit->GetPropertyKeypadActionEnabled().ToBool(); +} + +KeypadAction +_EditFieldImpl::GetKeypadAction(void) const +{ + CoreKeypadAction coreKeypadAction = (CoreKeypadAction)__pEdit->GetPropertyKeypadAction().ToInt(); + KeypadAction publicKeypadAction = KEYPAD_ACTION_ENTER; + + switch (coreKeypadAction) + { + case CORE_KEYPAD_ACTION_ENTER: + publicKeypadAction = KEYPAD_ACTION_ENTER; + break; + + case CORE_KEYPAD_ACTION_GO: + publicKeypadAction = KEYPAD_ACTION_GO; + break; + + case CORE_KEYPAD_ACTION_NEXT: + publicKeypadAction = KEYPAD_ACTION_NEXT; + break; + + case CORE_KEYPAD_ACTION_SEND: + publicKeypadAction = KEYPAD_ACTION_SEND; + break; + + case CORE_KEYPAD_ACTION_SEARCH: + publicKeypadAction = KEYPAD_ACTION_SEARCH; + break; + + case CORE_KEYPAD_ACTION_LOGIN: + publicKeypadAction = KEYPAD_ACTION_LOGIN; + break; + + case CORE_KEYPAD_ACTION_SIGN_IN: + publicKeypadAction = KEYPAD_ACTION_SIGN_IN; + break; + + case CORE_KEYPAD_ACTION_JOIN: + publicKeypadAction = KEYPAD_ACTION_JOIN; + break; + + case CORE_KEYPAD_ACTION_DONE: + publicKeypadAction = KEYPAD_ACTION_DONE; + break; + + default: + break; + } + + return publicKeypadAction; +} + +result +_EditFieldImpl::SetKeypadAction(KeypadAction keypadAction) +{ + CoreKeypadAction coreKeypadAction = CORE_KEYPAD_ACTION_ENTER; + + switch (keypadAction) + { + case KEYPAD_ACTION_ENTER: + coreKeypadAction = CORE_KEYPAD_ACTION_ENTER; + break; + + case KEYPAD_ACTION_GO: + coreKeypadAction = CORE_KEYPAD_ACTION_GO; + break; + + case KEYPAD_ACTION_NEXT: + coreKeypadAction = CORE_KEYPAD_ACTION_NEXT; + break; + + case KEYPAD_ACTION_SEND: + coreKeypadAction = CORE_KEYPAD_ACTION_SEND; + break; + + case KEYPAD_ACTION_SEARCH: + coreKeypadAction = CORE_KEYPAD_ACTION_SEARCH; + break; + + case KEYPAD_ACTION_LOGIN: + coreKeypadAction = CORE_KEYPAD_ACTION_LOGIN; + break; + + case KEYPAD_ACTION_SIGN_IN: + coreKeypadAction = CORE_KEYPAD_ACTION_SIGN_IN; + break; + + case KEYPAD_ACTION_JOIN: + coreKeypadAction = CORE_KEYPAD_ACTION_JOIN; + break; + + case KEYPAD_ACTION_DONE: + coreKeypadAction = CORE_KEYPAD_ACTION_DONE; + break; + + default: + break; + } + + Variant variantKeypadAction((int)coreKeypadAction); + + return __pEdit->SetPropertyKeypadAction(variantKeypadAction); +} + +KeypadStyle +_EditFieldImpl::GetKeypadStyle(void) const +{ + return (KeypadStyle)__pEdit->GetPropertyKeypadStyle().ToInt(); +} + +result +_EditFieldImpl::SetOverlayKeypadCommandButtonVisible(bool visible) +{ + Variant variantVisible(visible); + + return __pEdit->SetPropertyOverlayKeypadCommandButtonVisible(variantVisible); +} + +bool +_EditFieldImpl::IsOverlayCommandButtonVisible(void) const +{ + return __pEdit->GetPropertyOverlayKeypadCommandButtonVisible().ToBool(); +} + +result +_EditFieldImpl::HideKeypad(void) +{ + return __pEdit->HideKeypad(); +} + +EllipsisPosition +_EditFieldImpl::GetEllipsisPosition(void) const +{ + return __pEdit->GetEllipsisPosition(); +} + +result +_EditFieldImpl::SetEllipsisPosition(EllipsisPosition position) +{ + __pEdit->SetEllipsisPosition(position); + + return E_SUCCESS; +} + +int +_EditFieldImpl::GetTextSize(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetTextSizeF()); +} + +float +_EditFieldImpl::GetTextSizeF(void) const +{ + return __pEdit->GetPropertyTextSize().ToFloat(); +} + +result +_EditFieldImpl::SetTextSize(int size) +{ + return SetTextSize(_CoordinateSystemUtils::ConvertToFloat(size)); +} + +result +_EditFieldImpl::SetTextSize(float size) +{ + Variant variantSize(size); + + return __pEdit->SetPropertyTextSize(variantSize); +} + +Color +_EditFieldImpl::GetColor(EditStatus status) const +{ + Color color; + + switch (status) + { + case EDIT_STATUS_NORMAL: + color = __pEdit->GetPropertyNormalColor().ToColor(); + break; + + case EDIT_STATUS_DISABLED: + color = __pEdit->GetPropertyDisabledColor().ToColor(); + break; + + case EDIT_STATUS_HIGHLIGHTED: + color = __pEdit->GetPropertyHighlightedColor().ToColor(); + break; + + case EDIT_STATUS_PRESSED: + color = __pEdit->GetPropertyPressedColor().ToColor(); + break; + + default: + break; + } + + return color; +} + +Color +_EditFieldImpl::GetTextColor(EditTextColor type) const +{ + return __pEdit->GetTextColor(type); +} + +result +_EditFieldImpl::SetBackgroundBitmap(EditStatus status, const Bitmap& bitmap) +{ + return __pEdit->SetBackgroundBitmap(status, bitmap); +} + +result +_EditFieldImpl::SetColor(EditStatus status, const Color& color) +{ + result r = E_SUCCESS; + Variant variantColor(color); + + switch (status) + { + case EDIT_STATUS_NORMAL: + r = __pEdit->SetPropertyNormalColor(variantColor); + break; + + case EDIT_STATUS_DISABLED: + r = __pEdit->SetPropertyDisabledColor(variantColor); + break; + + case EDIT_STATUS_HIGHLIGHTED: + r = __pEdit->SetPropertyHighlightedColor(variantColor); + break; + + case EDIT_STATUS_PRESSED: + r = __pEdit->SetPropertyPressedColor(variantColor); + break; + + default: + r = E_INVALID_ARG; + break; + } + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Unable to set color.", GetErrorMessage(r)); + + return r; +} + +result +_EditFieldImpl::SetTextColor(EditTextColor type, const Color& color) +{ + result r = E_SUCCESS; + + r = __pEdit->SetTextColor(type, color); + + return r; +} + +String +_EditFieldImpl::GetText(int start, int end) const +{ + return __pEdit->GetText(start, end); +} + +result +_EditFieldImpl::AddUiLinkEventListener(IUiLinkEventListener& listener) +{ + ClearLastResult(); + SysTryReturn(NID_UI_CTRL, __pPublicLinkEvent, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] This instance isn't constructed.") + + return __pPublicLinkEvent->AddListener(listener); +} + +result +_EditFieldImpl::RemoveUiLinkEventListener(IUiLinkEventListener& listener) +{ + ClearLastResult(); + SysTryReturn(NID_UI_CTRL, __pPublicLinkEvent, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] This instance isn't constructed.") + + return __pPublicLinkEvent->RemoveListener(listener); +} + +result +_EditFieldImpl::AddTextBlockEventListener(ITextBlockEventListener& listener) +{ + ClearLastResult(); + SysTryReturn(NID_UI_CTRL, __pPublicTextBlockEvent, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] This instance isn't constructed."); + + return __pPublicTextBlockEvent->AddListener(listener); +} + +result +_EditFieldImpl::RemoveTextBlockEventListener(ITextBlockEventListener& listener) +{ + ClearLastResult(); + SysTryReturn(NID_UI_CTRL, __pPublicTextBlockEvent, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] This instance isn't constructed."); + + return __pPublicTextBlockEvent->RemoveListener(listener); +} + +result +_EditFieldImpl::AddKeypadEventListener(IKeypadEventListener& listener) +{ + ClearLastResult(); + SysTryReturn(NID_UI_CTRL, __pPublicKeypadEvent, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] This instance isn't constructed."); + + return __pPublicKeypadEvent->AddListener(listener); +} + +result +_EditFieldImpl::RemoveKeypadEventListener(IKeypadEventListener& listener) +{ + ClearLastResult(); + SysTryReturn(NID_UI_CTRL, __pPublicKeypadEvent, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] This instance isn't constructed."); + + return __pPublicKeypadEvent->RemoveListener(listener); +} + +result +_EditFieldImpl::AddTextEventListener(ITextEventListener& listener) +{ + ClearLastResult(); + SysTryReturn(NID_UI_CTRL, __pPublicTextEvent, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] This instance isn't constructed.") + + return __pPublicTextEvent->AddListener(listener); +} + +result +_EditFieldImpl::RemoveTextEventListener(ITextEventListener& listener) +{ + ClearLastResult(); + SysTryReturn(NID_UI_CTRL, __pPublicTextEvent, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] This instance isn't constructed."); + + return __pPublicTextEvent->RemoveListener(listener); +} + +result +_EditFieldImpl::AddScrollPanelEventListener(IScrollPanelEventListener& listener) +{ + ClearLastResult(); + SysTryReturn(NID_UI_CTRL, (__pEdit->GetInputStyle() == INPUT_STYLE_OVERLAY), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred.") + SysTryReturn(NID_UI_CTRL, __pPublicScrollPanelEvent, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] This instance isn't constructed."); + + return __pPublicScrollPanelEvent->AddListener(listener); +} + +result +_EditFieldImpl::RemoveScrollPanelEventListener(IScrollPanelEventListener& listener) +{ + ClearLastResult(); + SysTryReturn(NID_UI_CTRL, __pPublicScrollPanelEvent, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] This instance isn't constructed."); + + return __pPublicScrollPanelEvent->RemoveListener(listener); +} + +result +_EditFieldImpl::AddActionEventListener(IActionEventListener& listener) +{ + ClearLastResult(); + SysTryReturn(NID_UI_CTRL, __pPublicActionEvent, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] This instance isn't constructed."); + + return __pPublicActionEvent->AddListener(listener); +} + +result +_EditFieldImpl::RemoveActionEventListener(IActionEventListener& listener) +{ + ClearLastResult(); + SysTryReturn(NID_UI_CTRL, __pPublicActionEvent, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] This instance isn't constructed.") + + return __pPublicActionEvent->RemoveListener(listener); +} + +result +_EditFieldImpl::AddLanguageEventListener(ILanguageEventListener& listener) +{ + ClearLastResult(); + SysTryReturn(NID_UI_CTRL, __pPublicLanguageEvent, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] This instance isn't constructed."); + + return __pPublicLanguageEvent->AddListener(listener); +} + +result +_EditFieldImpl::RemoveLanguageEventListener(ILanguageEventListener& listener) +{ + ClearLastResult(); + SysTryReturn(NID_UI_CTRL, __pPublicLanguageEvent, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] This instance isn't constructed.") + + return __pPublicLanguageEvent->RemoveListener(listener); +} + +int +_EditFieldImpl::GetRemainingLength(void) const +{ + return __pEdit->GetRemainingLength(); +} + +void +_EditFieldImpl::SetLowerCaseModeEnabled(bool enable) +{ + Variant variantEnable(enable); + + __pEdit->SetPropertyLowerCaseModeEnabled(variantEnable); +} + +bool +_EditFieldImpl::IsLowerCaseModeEnabled(void) const +{ + return __pEdit->GetPropertyLowerCaseModeEnabled().ToBool(); +} + +result +_EditFieldImpl::SetInputModeCategory(unsigned long categories, bool enable) +{ + result r = E_SUCCESS; + const unsigned long INPUT_MODE_ALL_MASK = EDIT_INPUTMODE_ALPHA | EDIT_INPUTMODE_PREDICTIVE | EDIT_INPUTMODE_NUMERIC| EDIT_INPUTMODE_SYMBOL; + KeypadStyle keypadStyle = GetKeypadStyle(); + + switch (keypadStyle) + { + case KEYPAD_STYLE_NUMBER: + // fall through + case KEYPAD_STYLE_IP_V4: + if (enable) + { + if (categories & (EDIT_INPUTMODE_ALPHA | EDIT_INPUTMODE_PREDICTIVE | EDIT_INPUTMODE_SYMBOL)) + { + SysLogException(NID_UI_CTRL, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The current keypad style can not support given categories."); + + return E_INVALID_OPERATION; + } + } + else + { + if (categories & EDIT_INPUTMODE_NUMERIC) + { + SysLogException(NID_UI_CTRL, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The current keypad style can not support given categories."); + + return E_INVALID_OPERATION; + } + } + break; + + case KEYPAD_STYLE_PHONE_NUMBER: + if (enable) + { + if (categories & (EDIT_INPUTMODE_ALPHA | EDIT_INPUTMODE_PREDICTIVE)) + { + SysLogException(NID_UI_CTRL, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The current keypad style can not support given categories."); + + return E_INVALID_OPERATION; + } + + if (!((categories & EDIT_INPUTMODE_NUMERIC) && (categories & EDIT_INPUTMODE_SYMBOL))) + { + SysLogException(NID_UI_CTRL, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The current keypad style can not support given categories."); + + return E_INVALID_OPERATION; + } + else + { + if (categories & (EDIT_INPUTMODE_NUMERIC | EDIT_INPUTMODE_SYMBOL)) + { + SysLogException(NID_UI_CTRL, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The current keypad style cna not support given categories."); + + return E_INVALID_OPERATION; + } + } + } + break; + + default: + break; + } + + if (((enable == true) && (categories == 0)) || ((enable == false) && (categories == INPUT_MODE_ALL_MASK))) + { + SysLogException(NID_UI_CTRL, E_INVALID_ARG, "[E_INVALID_ARG] All input modes cannot be disabled."); + + return E_INVALID_ARG; + } + + if ((enable == false) && (categories & __currentInputMode)) + { + SysLogException(NID_UI_CTRL, E_INVALID_ARG, "[E_INVALID_ARG] The current input modes cannot be disabled."); + + return E_INVALID_ARG; + } + + if (enable) + { + __inputModeCategory = categories; + if ((~categories) & EDIT_INPUTMODE_PREDICTIVE) + { + __pEdit->SetTextPredictionEnabled(false); + } + } + else + { + __inputModeCategory = (~categories & INPUT_MODE_ALL_MASK); + if (categories == EDIT_INPUTMODE_PREDICTIVE) + { + __pEdit->SetTextPredictionEnabled(false); + } + } + + // if currentInputModeCategory doesn't exist in categories, then set tempInputMode + if (!(categories & __currentInputMode)) + { + const int INPUT_MODE_CATEGORY_MAX = 4; + EditInputModeCategory newInputMode = __currentInputMode; + EditInputModeCategory tempInputMode = EDIT_INPUTMODE_ALPHA; + for (int i = 0; i < INPUT_MODE_CATEGORY_MAX; i++) + { + if ((categories & tempInputMode) && (tempInputMode != EDIT_INPUTMODE_PREDICTIVE)) + { + newInputMode = tempInputMode; + break; + } + + switch (tempInputMode) + { + case EDIT_INPUTMODE_ALPHA: + tempInputMode = EDIT_INPUTMODE_PREDICTIVE; + break; + + case EDIT_INPUTMODE_PREDICTIVE: + tempInputMode = EDIT_INPUTMODE_NUMERIC; + break; + + case EDIT_INPUTMODE_NUMERIC: + tempInputMode = EDIT_INPUTMODE_SYMBOL; + break; + + default: + break; + } + } + + if (__currentInputMode != newInputMode) + { + r = SetCurrentInputModeCategory(newInputMode); + } + } + + return r; +} + +result +_EditFieldImpl::SetCurrentInputModeCategory(EditInputModeCategory inputModeCategory) +{ + KeypadStyle currentKeypadStyle = GetKeypadStyle(); + KeypadStyle keypadStyle = KEYPAD_STYLE_NORMAL; + + if (inputModeCategory == EDIT_INPUTMODE_NUMERIC) + { + if (currentKeypadStyle == KEYPAD_STYLE_NORMAL) + { + __pEdit->SetKeypadNormalNumberStyle(true); + } + else + { + keypadStyle = KEYPAD_STYLE_NUMBER; + Variant variantKeypadStyle((int)keypadStyle); + + __pEdit->SetPropertyKeypadStyle(variantKeypadStyle); + } + } + else if (inputModeCategory == EDIT_INPUTMODE_SYMBOL) + { + if (currentKeypadStyle == KEYPAD_STYLE_NORMAL) + { + __pEdit->SetKeypadNormalNumberStyle(true); + } + } + else if (inputModeCategory == EDIT_INPUTMODE_PREDICTIVE) + { + __pEdit->SetTextPredictionEnabled(true); + } + + __currentInputMode = inputModeCategory; + return E_SUCCESS; +} + +unsigned long +_EditFieldImpl::GetInputModeCategory(void) const +{ + return __inputModeCategory; +} + +EditInputModeCategory +_EditFieldImpl::GetCurrentInputModeCategory(void) const +{ + return __currentInputMode; +} + +bool +_EditFieldImpl::IsTextPredictionEnabled(void) const +{ + return __pEdit->IsTextPredictionEnabled(); +} + +result +_EditFieldImpl::SetTextPredictionEnabled(bool enable) +{ + return __pEdit->SetTextPredictionEnabled(enable); +} + +result +_EditFieldImpl::SetCursorPosition(int position) +{ + Variant variantPosition(position); + + return __pEdit->SetPropertyCursorPosition(variantPosition); +} + +int +_EditFieldImpl::GetCursorPosition(void) const +{ + return __pEdit->GetPropertyCursorPosition().ToInt(); +} + +String +_EditFieldImpl::GetText(void) const +{ + return __pEdit->GetPropertyText().ToString(); +} + +int +_EditFieldImpl::GetTextLength(void) const +{ + return __pEdit->GetTextLength(); +} + +result +_EditFieldImpl::SetText(const String& text) +{ + Variant variantText(text); + + return __pEdit->SetPropertyText(variantText); +} + +result +_EditFieldImpl::InsertTextAtCursorPosition(const String& text) +{ + return __pEdit->InsertTextAtCursorPosition(text); +} + +result +_EditFieldImpl::AppendText(const String& text) +{ + return __pEdit->AppendText(text); +} + +result +_EditFieldImpl::AppendCharacter(const Character& character) +{ + return __pEdit->AppendCharacter(character); +} + +result +_EditFieldImpl::Clear(void) +{ + return __pEdit->ClearText(); +} + +result +_EditFieldImpl::DeleteCharacterAtCursorPosition(void) +{ + return __pEdit->DeleteCharacterAtCursorPosition(); +} + +void +_EditFieldImpl::GetCurrentTextRange(int& start, int& end) const +{ + return __pEdit->GetCurrentTextRange(start, end); +} + +void +_EditFieldImpl::SetGuideText(const String& guideText) +{ + Variant variantGuideText(guideText); + + __pEdit->SetPropertyGuideText(variantGuideText); +} + +String +_EditFieldImpl::GetGuideText(void) const +{ + return __pEdit->GetPropertyGuideText().ToString(); +} + +Color +_EditFieldImpl::GetGuideTextColor(void) const +{ + return __pEdit->GetPropertyGuideTextColor().ToColor(); +} + +result +_EditFieldImpl::SetGuideTextColor(const Color& color) +{ + Variant variantColor(color); + + return __pEdit->SetPropertyGuideTextColor(variantColor); +} + +void +_EditFieldImpl::SetKeypadEnabled(bool enable) +{ + Variant variantEnable(enable); + + __pEdit->SetPropertyKeypadEnabled(variantEnable); + + return; +} + +bool +_EditFieldImpl::IsKeypadEnabled(void) const +{ + return __pEdit->GetPropertyKeypadEnabled().ToBool(); +} + +result +_EditFieldImpl::ShowKeypad(void) +{ + return __pEdit->ShowKeypad(); +} + +void +_EditFieldImpl::GetBlockRange(int& start, int& end) const +{ + __pEdit->GetBlockRange(start, end); +} + +result +_EditFieldImpl::BeginBlock(void) +{ + return __pEdit->BeginTextBlock(); +} + +result +_EditFieldImpl::ReleaseBlock(void) +{ + return __pEdit->ReleaseTextBlock(); +} + +bool +_EditFieldImpl::IsBlocked(void) const +{ + return __pEdit->IsBlocked(); +} + +result +_EditFieldImpl::Copy(void) +{ + return __pEdit->CopyText(); +} + +result +_EditFieldImpl::Cut(void) +{ + return __pEdit->CutText(); +} + +result +_EditFieldImpl::Paste(void) +{ + return __pEdit->PasteText(); +} + +result +_EditFieldImpl::Remove(void) +{ + SysTryReturnResult(NID_UI_CTRL, (__pEdit->RemoveTextBlock() == E_SUCCESS), E_SYSTEM, "A system error has occurred"); + + return E_SUCCESS; +} + +bool +_EditFieldImpl::IsClipped(void) const +{ + return __pEdit->IsClipped(); +} + +result +_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."); + + Variant variantTitle(title); + + return __pEdit->SetPropertyTitleText(variantTitle); +} + +String +_EditFieldImpl::GetTitleText(void) const +{ + return __pEdit->GetPropertyTitleText().ToString(); +} + +result +_EditFieldImpl::SetTitleTextColor(EditStatus status, const Color& color) +{ + result r = E_SUCCESS; + Variant variantColor(color); + + switch (status) + { + case EDIT_STATUS_NORMAL: + r = __pEdit->SetPropertyNormalTitleTextColor(variantColor); + break; + + case EDIT_STATUS_DISABLED: + r = __pEdit->SetPropertyDisabledTitleTextColor(variantColor); + break; + + case EDIT_STATUS_HIGHLIGHTED: + r = __pEdit->SetPropertyHighlightedTitleTextColor(variantColor); + break; + + case EDIT_STATUS_PRESSED: + r = __pEdit->SetPropertyPressedTitleTextColor(variantColor); + break; + + default: + r = E_INVALID_ARG; + break; + } + + return r; +} + +Color +_EditFieldImpl::GetTitleTextColor(EditStatus status) const +{ + Color color; + + switch (status) + { + case EDIT_STATUS_NORMAL: + color = __pEdit->GetPropertyNormalTitleTextColor().ToColor(); + break; + + case EDIT_STATUS_DISABLED: + color = __pEdit->GetPropertyDisabledTitleTextColor().ToColor(); + break; + + case EDIT_STATUS_HIGHLIGHTED: + color = __pEdit->GetPropertyHighlightedTitleTextColor().ToColor(); + break; + + case EDIT_STATUS_PRESSED: + color = __pEdit->GetPropertyPressedTitleTextColor().ToColor(); + break; + + default: + break; + } + + return color; +} + +result +_EditFieldImpl::SetOverlayKeypadCommandButton(CommandButtonPosition position, const String& text, int actionId) +{ + return __pEdit->SetKeypadCommandButton(position, text, actionId); +} + +String +_EditFieldImpl::GetOverlayKeypadCommandButtonText(CommandButtonPosition position) const +{ + return __pEdit->GetKeypadCommandButtonText(position); +} + +int +_EditFieldImpl::GetOverlayKeypadCommandButtonActionId(CommandButtonPosition position) const +{ + return __pEdit->GetKeypadCommandButtonActionId(position); +} + +result +_EditFieldImpl::SetCurrentLanguage(LanguageCode languageCode) +{ + return __pEdit->SetCurrentLanguage(languageCode); +} + +result +_EditFieldImpl::GetCurrentLanguage(LanguageCode& language) const +{ + return __pEdit->GetCurrentLanguage(language); +} + +result +_EditFieldImpl::SetPasswordVisible(bool visible) +{ + SysTryReturnResult(NID_UI_CTRL, (__pEdit->GetEditStyle() & EDIT_STYLE_PASSWORD), E_INVALID_OPERATION, + "Edit Style is not EDIT_STYLE_PASSWORD."); + + return __pEdit->SetPasswordVisible(visible); +} + +bool +_EditFieldImpl::IsPasswordVisible(void) const +{ + ClearLastResult(); + + SysTryReturn(NID_UI_CTRL, (__pEdit->GetEditStyle() & EDIT_STYLE_PASSWORD), false, E_INVALID_OPERATION, "Edit Style is not EDIT_STYLE_PASSWORD.\n"); + + return __pEdit->IsPasswordVisible(); +} + +result +_EditFieldImpl::OnBoundsChanged(const Rectangle& oldRect, const Rectangle& newRect) +{ + return E_SUCCESS; +} + +void +_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 allocation failed."); + + __pPublicTextEvent->Fire(*pEventArg); + } + else + { + SysLog(NID_UI_CTRL, "Event is not created."); + } +} + +void +_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 allocation failed."); + + __pPublicTextEvent->Fire(*pEventArg); + } + else + { + SysLog(NID_UI_CTRL, "Event is not created."); + } +} + +void +_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] Memory allocation failed."); + + __pPublicActionEvent->Fire(*pActionEventArg); + } + else + { + SysLog(NID_UI_CTRL, "Event is not created."); + } +} + +void +_EditFieldImpl::OnLinkClicked(_Control& source, const String& text, Utility::LinkType linkType, + const String& link) +{ + if (__pPublicLinkEvent != null) + { + IEventArg* pLinkEventArg = _PublicLinkEvent::CreateLinkEventArgN(text, linkType, link); + SysTryReturnVoidResult(NID_UI_CTRL, pLinkEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + __pPublicLinkEvent->Fire(*pLinkEventArg); + } + else + { + SysLog(NID_UI_CTRL, "Event is not created."); + } +} + +void +_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] Memory allocation failed."); + + __pPublicTextBlockEvent->Fire(*pTextBlockEventArg); + } + else + { + SysLog(NID_UI_CTRL, "Event is not created."); + } +} + +void +_EditFieldImpl::OnKeypadWillOpen(void) +{ + if (__pPublicKeypadEvent) + { + 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] Memory allocation failed."); + + __pPublicKeypadEvent->Fire(*pKeypadEventArg); + } + else + { + SysLog(NID_UI_CTRL, "Event is not created."); + } +} + +void +_EditFieldImpl::OnKeypadOpened(void) +{ + if (__pPublicKeypadEvent) + { + 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] Memory allocation failed."); + + __pPublicKeypadEvent->Fire(*pKeypadEventArg); + } + else + { + SysLog(NID_UI_CTRL, "Event is not created."); + } +} + +void +_EditFieldImpl::OnKeypadClosed(void) +{ + if (__pPublicKeypadEvent) + { + 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] Memory allocation failed."); + + __pPublicKeypadEvent->Fire(*pKeypadEventArg); + } + else + { + SysLog(NID_UI_CTRL, "Event is not created."); + } +} + +void +_EditFieldImpl::OnKeypadBoundsChanged(void) +{ + if (__pPublicKeypadEvent) + { + 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] Memory allocation failed."); + + __pPublicKeypadEvent->Fire(*pKeypadEventArg); + } + else + { + SysLog(NID_UI_CTRL, "Event is not created."); + } +} + +void +_EditFieldImpl::OnKeypadActionPerformed(CoreKeypadAction keypadAction) +{ + if (__pPublicKeypadEvent) + { + KeypadAction onKeypadAction = KEYPAD_ACTION_ENTER; + switch (keypadAction) + { + case CORE_KEYPAD_ACTION_ENTER: + onKeypadAction = KEYPAD_ACTION_ENTER; + break; + + case CORE_KEYPAD_ACTION_GO: + onKeypadAction = KEYPAD_ACTION_GO; + break; + + case CORE_KEYPAD_ACTION_NEXT: + onKeypadAction = KEYPAD_ACTION_NEXT; + break; + + case CORE_KEYPAD_ACTION_SEND: + onKeypadAction = KEYPAD_ACTION_SEND; + break; + + case CORE_KEYPAD_ACTION_SEARCH: + onKeypadAction = KEYPAD_ACTION_SEARCH; + break; + + case CORE_KEYPAD_ACTION_LOGIN: + onKeypadAction = KEYPAD_ACTION_LOGIN; + break; + + case CORE_KEYPAD_ACTION_SIGN_IN: + onKeypadAction = KEYPAD_ACTION_SIGN_IN; + break; + + case CORE_KEYPAD_ACTION_JOIN: + onKeypadAction = KEYPAD_ACTION_JOIN; + break; + + case CORE_KEYPAD_ACTION_DONE: + onKeypadAction = KEYPAD_ACTION_DONE; + break; + + default: + break; + } + + IEventArg* pKeypadEventArg = _PublicKeypadEvent::CreateKeypadEventArgN( + GetPublic(), onKeypadAction, KEYPAD_EVENT_STATUS_ENTERACTION); + SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + __pPublicKeypadEvent->Fire(*pKeypadEventArg); + } + else + { + SysLog(NID_UI_CTRL, "Event is not created."); + } +} + +void +_EditFieldImpl::OnLanguageChanged(LanguageCode oldLanguage, LanguageCode newLanguage) +{ + if (__pPublicLanguageEvent) + { + IEventArg* pKLanguageEventArg = _PublicLanguageEvent::CreateLanguageEventArgN(GetPublic(), oldLanguage, newLanguage); + SysTryReturnVoidResult(NID_UI_CTRL, pKLanguageEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + __pPublicLanguageEvent->Fire(*pKLanguageEventArg); + } + else + { + SysLog(NID_UI_CTRL, "Event is not created."); + } +} + +void +_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] Memory allocation failed."); + + __pPublicScrollPanelEvent->Fire(*pEventArg); + } + else + { + SysLog(NID_UI_CTRL, "Event is not created."); + } +} + +void +_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] Memory allocation failed."); + + __pPublicScrollPanelEvent->Fire(*pEventArg); + } + else + { + SysLog(NID_UI_CTRL, "Event is not created."); + } +} + +void +_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] Memory allocation failed."); + + __pPublicScrollPanelEvent->Fire(*pEventArg); + } + else + { + SysLog(NID_UI_CTRL, "Event is not created."); + } +} + +void +_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] Memory allocation failed."); + + __pPublicScrollPanelEvent->Fire(*pEventArg); + } + else + { + SysLog(NID_UI_CTRL, "Event is not created."); + } +} + +void +_EditFieldImpl::SetEditTextFilter(IEditTextFilter* pFilter) +{ + __pEdit->SetEditTextFilter(pFilter); + + return; +} + +void +_EditFieldImpl::SendOpaqueCommand(const String& command) +{ + __pEdit->SendOpaqueCommand(command); + + return; +} + +class _EditFieldMaker + : public _UiBuilderControlMaker +{ +public: + _EditFieldMaker(_UiBuilder* pUiBuilder) + : _UiBuilderControlMaker(pUiBuilder){}; + virtual ~_EditFieldMaker(){}; + static _UiBuilderControlMaker* GetInstance(_UiBuilder* pUiBuilder) + { + _EditFieldMaker* pEditFieldMaker = new (std::nothrow) _EditFieldMaker(pUiBuilder); + return pEditFieldMaker; + }; +protected: + virtual Control* Make(_UiBuilderControl* pControl) + { + result r = E_SYSTEM; + _UiBuilderControlLayout* pControlProperty = null; + EditField* pEditField = null; + FloatRectangle rect; + + String elementString; + bool showTitle = false; + GroupStyle groupStyle = GROUP_STYLE_NONE; + InputStyle inputStyle = INPUT_STYLE_FULLSCREEN; + int limitLength = EDIT_FIELD_DEFAULT_LIMIT_LENGTH; + KeypadAction keypadAction = KEYPAD_ACTION_ENTER; + bool lowerCaseMode = false; + HorizontalAlignment horizontalAlignment = ALIGNMENT_LEFT; + bool viewModeEnable = false; + float fontSize = 0.0f; + Color color; + int opacity = EDIT_COLOR_OPACITY; + EditFieldStyle editFieldStyle = EDIT_FIELD_STYLE_NORMAL; + EditFieldTitleStyle editFieldTitleStyle = EDIT_FIELD_TITLE_STYLE_NONE; + bool clearButtonEnable = false; + bool newConstructEnable = false; + float horizontalMargin = 0.0f; + float verticalMargin = 0.0f; + EllipsisPosition ellipsisPosition = ELLIPSIS_POSITION_END; + + GetProperty(pControl, &pControlProperty); + if (pControlProperty == null) + { + return null; + } + + pEditField = new (std::nothrow) EditField(); + if (pEditField == null) + { + return null; + } + + rect = pControlProperty->GetRectF(); + String styleString; + styleString = pControlProperty->GetStyle(); + + if (pControl->GetElement(L"inputStyle", elementString)) + { + if (elementString.Equals(L"INPUT_STYLE_OVERLAY", false)) + { + inputStyle = INPUT_STYLE_OVERLAY; + } + else + { + inputStyle = INPUT_STYLE_FULLSCREEN; + } + } + + if (pControl->GetElement(L"limitLength", elementString)) + { + Base::Integer::Parse(elementString, limitLength); + } + if (pControl->GetElement(L"GroupStyle", elementString)) + { + if (elementString.Equals(L"GROUP_STYLE_NONE", false)) + { + groupStyle = GROUP_STYLE_NONE; + } + if (elementString.Equals(L"GROUP_STYLE_SINGLE", false)) + { + groupStyle = GROUP_STYLE_SINGLE; + } + if (elementString.Equals(L"GROUP_STYLE_TOP", false)) + { + groupStyle = GROUP_STYLE_TOP; + } + if (elementString.Equals(L"GROUP_STYLE_MIDDLE", false)) + { + groupStyle = GROUP_STYLE_MIDDLE; + } + if (elementString.Equals(L"GROUP_STYLE_BOTTOM", false)) + { + groupStyle = GROUP_STYLE_BOTTOM; + } + } + + if (pControl->GetElement(L"titleStyle", elementString)) + { + newConstructEnable = true; + + if (elementString.Equals(L"EDIT_FIELD_TITLE_STYLE_NONE", false)) + { + editFieldTitleStyle = EDIT_FIELD_TITLE_STYLE_NONE; + } + else if (elementString.Equals(L"EDIT_FIELD_TITLE_STYLE_INNER", false)) + { + editFieldTitleStyle = EDIT_FIELD_TITLE_STYLE_INNER; + } + else if (elementString.Equals(L"EDIT_FIELD_TITLE_STYLE_TOP", false)) + { + editFieldTitleStyle = EDIT_FIELD_TITLE_STYLE_TOP; + } + } + + if (pControl->GetElement(L"enableClear", elementString)) + { + if (elementString.Equals(L"true", false)) + { + clearButtonEnable = true; + } + } + + if (styleString.Equals(L"EDIT_FIELD_STYLE_PASSWORD", false)) + { + editFieldStyle = EDIT_FIELD_STYLE_PASSWORD; + } + else if (styleString.Equals(L"EDIT_FIELD_STYLE_NORMAL_SMALL", false)) + { + editFieldStyle = EDIT_FIELD_STYLE_NORMAL_SMALL; + } + else if (styleString.Equals(L"EDIT_FIELD_STYLE_PASSWORD_SMALL", false)) + { + editFieldStyle = EDIT_FIELD_STYLE_PASSWORD_SMALL; + } + else if (styleString.Equals(L"EDIT_FIELD_STYLE_EMAIL", false)) + { + editFieldStyle = EDIT_FIELD_STYLE_EMAIL; + } + else if (styleString.Equals(L"EDIT_FIELD_STYLE_URL", false)) + { + editFieldStyle = EDIT_FIELD_STYLE_URL; + } + else if (styleString.Equals(L"EDIT_FIELD_STYLE_EMAIL_SMALL", false)) + { + editFieldStyle = EDIT_FIELD_STYLE_EMAIL_SMALL; + } + else if (styleString.Equals(L"EDIT_FIELD_STYLE_URL_SMALL", false)) + { + editFieldStyle = EDIT_FIELD_STYLE_URL_SMALL; + } + else + { + editFieldStyle = EDIT_FIELD_STYLE_NORMAL; + } + + if (styleString.Equals(L"EDIT_FIELD_STYLE_NUMBER", false)) + { + editFieldStyle = EDIT_FIELD_STYLE_NUMBER; + } + else if (styleString.Equals(L"EDIT_FIELD_STYLE_NUMBER_SMALL", false)) + { + editFieldStyle = EDIT_FIELD_STYLE_NUMBER_SMALL; + } + else if (styleString.Equals(L"EDIT_FIELD_STYLE_PHONE_NUMBER", false)) + { + editFieldStyle = EDIT_FIELD_STYLE_PHONE_NUMBER; + } + else if (styleString.Equals(L"EDIT_FIELD_STYLE_PHONE_NUMBER_SMALL", false)) + { + editFieldStyle = EDIT_FIELD_STYLE_PHONE_NUMBER_SMALL; + } + else if (styleString.Equals(L"EDIT_FIELD_STYLE_PASSWORD_NUMBER", false)) + { + editFieldStyle = EDIT_FIELD_STYLE_PASSWORD_NUMBER; + } + else if (styleString.Equals(L"EDIT_FIELD_STYLE_PASSWORD_NUMBER_SMALL", false)) + { + editFieldStyle = EDIT_FIELD_STYLE_PASSWORD_NUMBER_SMALL; + } + else if (styleString.Equals(L"EDIT_FIELD_STYLE_IP_V4", false)) + { + editFieldStyle = EDIT_FIELD_STYLE_IP_V4; + } + else if (styleString.Equals(L"EDIT_FIELD_STYLE_IP_V4_SMALL", false)) + { + editFieldStyle = EDIT_FIELD_STYLE_IP_V4_SMALL; + } + + if (newConstructEnable) + { + r = pEditField->Construct(rect, editFieldStyle, inputStyle, editFieldTitleStyle, clearButtonEnable, limitLength, groupStyle); + } + else + { + r = pEditField->Construct(rect, editFieldStyle, inputStyle, showTitle, limitLength, groupStyle); + } + + if (r != E_SUCCESS) + { + delete pEditField; + pEditField = null; + + return null; + } + + if (pControl->GetElement(L"commandButtonVisible", elementString)) + { + if (elementString.Equals(L"true", false)) + { + pEditField->SetOverlayKeypadCommandButtonVisible(true); + } + else + { + pEditField->SetOverlayKeypadCommandButtonVisible(false); + } + } + + if (pControl->GetElement(L"text", elementString)) + { + r = pEditField->SetText(elementString); + } + if (pControl->GetElement(L"guideText", elementString)) + { + pEditField->SetGuideText(elementString); + } + if (pControl->GetElement(L"titleText", elementString)) + { + r = pEditField->SetTitleText(elementString); + } + if (pControl->GetElement(L"keypadEnabled", elementString) || pControl->GetElement(L"KeypadEnabled", elementString)) + { + if (elementString.Equals(L"true", false)) + { + pEditField->SetKeypadEnabled(true); + } + else + { + pEditField->SetKeypadEnabled(false); + } + } + else + pEditField->SetKeypadEnabled(true); + + if (pControl->GetElement(L"keypadAction", elementString)) + { + if (elementString.Equals(L"KEYPAD_ACTION_ENTER", false)) + { + keypadAction = KEYPAD_ACTION_ENTER; + } + else if (elementString.Equals(L"KEYPAD_ACTION_GO", false)) + { + keypadAction = KEYPAD_ACTION_GO; + } + else if (elementString.Equals(L"KEYPAD_ACTION_NEXT", false)) + { + keypadAction = KEYPAD_ACTION_NEXT; + } + else if (elementString.Equals(L"KEYPAD_ACTION_SEND", false)) + { + keypadAction = KEYPAD_ACTION_SEND; + } + else if (elementString.Equals(L"KEYPAD_ACTION_SEARCH", false)) + { + keypadAction = KEYPAD_ACTION_SEARCH; + } + else if (elementString.Equals(L"KEYPAD_ACTION_LOGIN", false)) + { + keypadAction = KEYPAD_ACTION_LOGIN; + } + else if (elementString.Equals(L"KEYPAD_ACTION_SIGN_IN", false)) + { + keypadAction = KEYPAD_ACTION_SIGN_IN; + } + else if (elementString.Equals(L"KEYPAD_ACTION_JOIN", false)) + { + keypadAction = KEYPAD_ACTION_JOIN; + } + else if (elementString.Equals(L"KEYPAD_ACTION_DONE", false)) + { + keypadAction = KEYPAD_ACTION_DONE; + } + + r = pEditField->SetKeypadAction(keypadAction); + } + + if (pControl->GetElement(L"textHorizontalAlignment", elementString)) + { + if (elementString.Equals(L"ALIGNMENT_LEFT", false)) + { + horizontalAlignment = ALIGNMENT_LEFT; + } + else if (elementString.Equals(L"ALIGNMENT_CENTER", false)) + { + horizontalAlignment = ALIGNMENT_CENTER; + } + else if (elementString.Equals(L"ALIGNMENT_RIGHT", false)) + { + horizontalAlignment = ALIGNMENT_RIGHT; + } + + r = pEditField->SetTextAlignment(horizontalAlignment); + } + + if (pControl->GetElement(L"lowerCaseMode", elementString)) + { + if (elementString.Equals(L"true", false)) + { + lowerCaseMode = true; + } + else + { + lowerCaseMode = false; + } + + pEditField->SetLowerCaseModeEnabled(lowerCaseMode); + } + + if (pControl->GetElement(L"textSize", elementString)) + { + fontSize = _LocalizedNumParser::ToDouble(elementString, "C"); + _ICoordinateSystemTransformer* pTransform = GetTransformer(); + if (pTransform) + { + fontSize = pTransform->Transform(fontSize); + } + r = pEditField->SetTextSize(fontSize); + } + + if (pControl->GetElement(L"viewMode", elementString)) + { + if (elementString.Equals(L"true", false)) + { + viewModeEnable = true; + r = pEditField->SetViewModeEnabled(viewModeEnable); + } + } + + if (pControl->GetElement(L"normalBGBitmapPath", elementString)) + { + Bitmap* pressedBGBitmap = null; + pressedBGBitmap = LoadBitmapN(elementString); + if (pressedBGBitmap != null) + { + r = pEditField->SetBackgroundBitmap(EDIT_STATUS_NORMAL, *pressedBGBitmap); + delete pressedBGBitmap; + pressedBGBitmap = null; + } + } + + if (pControl->GetElement(L"disabledBGBitmapPath", elementString)) + { + Bitmap* disalbedBGBitmap = null; + disalbedBGBitmap = LoadBitmapN(elementString); + if (disalbedBGBitmap != null) + { + r = pEditField->SetBackgroundBitmap(EDIT_STATUS_DISABLED, *disalbedBGBitmap); + delete disalbedBGBitmap; + disalbedBGBitmap = null; + } + } + + if (pControl->GetElement(L"highlightedBGBitmapPath", elementString)) + { + Bitmap* highlightedBGBitmap = null; + highlightedBGBitmap = LoadBitmapN(elementString); + if (highlightedBGBitmap != null) + { + r = pEditField->SetBackgroundBitmap(EDIT_STATUS_HIGHLIGHTED, *highlightedBGBitmap); + delete highlightedBGBitmap; + highlightedBGBitmap = null; + } + } + + if (pControl->GetElement(L"pressedBGBitmapPath", elementString)) + { + Bitmap* pressedBGBitmap = null; + pressedBGBitmap = LoadBitmapN(elementString); + if (pressedBGBitmap != null) + { + r = pEditField->SetBackgroundBitmap(EDIT_STATUS_PRESSED, *pressedBGBitmap); + delete pressedBGBitmap; + pressedBGBitmap = null; + } + } + + if (pControl->GetElement(L"normalColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + if (pControl->GetElement(L"normalColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + r = pEditField->SetColor(EDIT_STATUS_NORMAL, color); + } + + if (pControl->GetElement(L"pressedColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + if (pControl->GetElement(L"pressedColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + r = pEditField->SetColor(EDIT_STATUS_PRESSED, color); + } + + if (pControl->GetElement(L"highlightedColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + if (pControl->GetElement(L"highlightedColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + r = pEditField->SetColor(EDIT_STATUS_HIGHLIGHTED, color); + } + + if (pControl->GetElement(L"disabledColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + if (pControl->GetElement(L"disabledColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + r = pEditField->SetColor(EDIT_STATUS_DISABLED, color); + } + + opacity = 100; + if (pControl->GetElement(L"guideTextColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + r = pEditField->SetGuideTextColor(color); + } + + if (pControl->GetElement(L"normalTextColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + r = pEditField->SetTextColor(EDIT_TEXT_COLOR_NORMAL, color); + } + + if (pControl->GetElement(L"disabledTextColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + r = pEditField->SetTextColor(EDIT_TEXT_COLOR_DISABLED, color); + } + + if (pControl->GetElement(L"highlightedTextColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + r = pEditField->SetTextColor(EDIT_TEXT_COLOR_HIGHLIGHTED, color); + } + + if (pControl->GetElement(L"linkTextColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + r = pEditField->SetTextColor(EDIT_TEXT_COLOR_LINK, color); + } + + if (pControl->GetElement(L"horizontalMargin", elementString)) + { + horizontalMargin = _LocalizedNumParser::ToDouble(elementString, "C"); + r = pEditField->SetMargin(EDIT_MARGIN_TYPE_HORIZONTAL, horizontalMargin); + } + + if (pControl->GetElement(L"verticalMargin", elementString)) + { + verticalMargin = _LocalizedNumParser::ToDouble(elementString, "C"); + r = pEditField->SetMargin(EDIT_MARGIN_TYPE_VERTICAL, verticalMargin); + } + + if (pControl->GetElement(L"titleTextColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + r = pEditField->SetTitleTextColor(EDIT_STATUS_NORMAL, color); + } + + if (pControl->GetElement(L"ellipsisPosition", elementString)) + { + if (elementString.Equals(L"ELLIPSIS_POSITION_START", false)) + { + ellipsisPosition = ELLIPSIS_POSITION_START; + } + else if (elementString.Equals(L"ELLIPSIS_POSITION_MIDDLE", false)) + { + ellipsisPosition = ELLIPSIS_POSITION_MIDDLE; + } + else + { + ellipsisPosition = ELLIPSIS_POSITION_END; + } + + r = pEditField->SetEllipsisPosition(ellipsisPosition); + } + + if (pControl->GetElement(L"accessibilityHint", elementString)) + { + AccessibilityContainer* pContainer = pEditField->GetAccessibilityContainer(); + if (pContainer) + { + AccessibilityElement* pElement = pContainer->GetElement(L"EditText"); + if (pElement) + { + pElement->SetHint(elementString); + } + } + } + + return pEditField; + } +}; // _EditFieldMaker + +_EditFieldRegister::_EditFieldRegister(void) +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->RegisterControl(L"EditField", _EditFieldMaker::GetInstance); +} + +_EditFieldRegister::~_EditFieldRegister(void) +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->UnregisterControl(L"EditField"); +} +static _EditFieldRegister EditFieldRegisterToUiBuilder; +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_EditModel.cpp b/src/ui/controls/FUiCtrl_EditModel.cpp new file mode 100644 index 0000000..7820e3b --- /dev/null +++ b/src/ui/controls/FUiCtrl_EditModel.cpp @@ -0,0 +1,300 @@ +// +// 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_EditModel.cpp + * @brief This is the implementation file for the _EditModel class. + */ + +#include +#include +#include +#include +#include "FUi_ResourceManager.h" +#include "FUiCtrl_EditModel.h" + +using namespace Tizen::Base; +using namespace Tizen::Locales; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_EditModel::_EditModel(void) + : __autoLinkMask(Utility::LINK_TYPE_NONE) + , __keypadActionEnabled(true) + , __viewModeEnabled(false) + , __keypadStyle(KEYPAD_STYLE_NORMAL) + , __keypadEnabled(true) + , __isLowerCase(false) + , __isTextPredictionEnabled(true) + , __keypadAction(CORE_KEYPAD_ACTION_ENTER) + , __enablePredictiveAutoResizing(false) + , __maxLineCount(-1) + , __languageCode(LANGUAGE_ENG) + , __initialKeypadLanguageCode(LANGUAGE_INVALID) + , __leftCommandButtonActionId(100) + , __rightCommandButtonActionId(101) + , __leftCommandButtonText() + , __rightCommandButtonText() +{ + GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_DONE, __leftCommandButtonText); + GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_CANCEL_ABB, __rightCommandButtonText); +} + +_EditModel::~_EditModel(void) +{ +} + +result +_EditModel::SetAutoLinkMask(unsigned long autoLinks) +{ + result r = E_SUCCESS; + + __autoLinkMask = autoLinks; + + return r; +} + +unsigned long +_EditModel::GetAutoLinkMask(void) const +{ + return __autoLinkMask; +} + +bool +_EditModel::IsViewModeEnabled(void) const +{ + return __viewModeEnabled; +} + +result +_EditModel::SetViewModeEnabled(bool enable) +{ + result r = E_SUCCESS; + + __viewModeEnabled = enable; + + return r; +} + +result +_EditModel::SetKeypadActionEnabled(bool enable) +{ + result r = E_SUCCESS; + + __keypadActionEnabled = enable; + + return r; +} + +bool +_EditModel::IsKeypadActionEnabled(void) const +{ + return __keypadActionEnabled; +} + +CoreKeypadAction +_EditModel::GetKeypadAction(void) const +{ + return __keypadAction; +} + +result +_EditModel::SetKeypadAction(CoreKeypadAction keypadAction) +{ + result r = E_SUCCESS; + + __keypadAction = keypadAction; + + return r; +} + +result +_EditModel::SetCurrentLanguage(LanguageCode languageCode) +{ + result r = E_SUCCESS; + + __languageCode = languageCode; + + return r; +} + +result +_EditModel::GetCurrentLanguage(LanguageCode& language) const +{ + result r = E_SUCCESS; + + language = __languageCode; + + return r; +} + +result +_EditModel::SetInitialKeypadLanguage(LanguageCode languageCode) +{ + result r = E_SUCCESS; + + __initialKeypadLanguageCode = languageCode; + + return r; +} + +result +_EditModel::GetInitialKeypadLanguage(LanguageCode& language) const +{ + result r = E_SUCCESS; + + language = __initialKeypadLanguageCode; + + return r; +} + +result +_EditModel::SetTextPredictionEnabled(bool enable) +{ + __isTextPredictionEnabled = enable; + + return E_SUCCESS; +} + +bool +_EditModel::IsTextPredictionEnabled(void) const +{ + return __isTextPredictionEnabled; +} + +void +_EditModel::SetKeypadEnabled(bool enable) +{ + __keypadEnabled = enable; + + return; +} + +bool +_EditModel::IsKeypadEnabled(void) const +{ + return __keypadEnabled; +} + +void +_EditModel::SetLowerCaseModeEnabled(bool enable) +{ + __isLowerCase = enable; + + return; +} + +bool +_EditModel::IsLowerCaseModeEnabled(void) const +{ + return __isLowerCase; +} + +KeypadStyle +_EditModel::GetKeypadStyle(void) const +{ + return __keypadStyle; +} + +result +_EditModel::SetKeypadStyle(KeypadStyle keypadStyle) +{ + __keypadStyle = keypadStyle; + return E_SUCCESS; +} + +result +_EditModel::SetAutoResizingEnabled(bool enable) +{ + __enablePredictiveAutoResizing = enable; + return E_SUCCESS; +} + +bool +_EditModel::IsAutoResizingEnabled(void) const +{ + return __enablePredictiveAutoResizing; +} + +void +_EditModel::SetMaxLineCount(int maxLineCount) +{ + __maxLineCount = maxLineCount; + + return; +} + + +int +_EditModel::GetMaxLineCount(void) const +{ + return __maxLineCount; +} + +result +_EditModel::SetCommandButtonItem(CommandButtonPosition buttonPosition, int actionId, const String& text) +{ + result r = E_SUCCESS; + if (buttonPosition == COMMAND_BUTTON_POSITION_LEFT) + { + __leftCommandButtonActionId = actionId; + __leftCommandButtonText = text; + } + else + { + __rightCommandButtonActionId = actionId; + __rightCommandButtonText = text; + } + + return r; +} + +String +_EditModel::GetKeypadCommandButtonText(CommandButtonPosition position) const +{ + if (position == COMMAND_BUTTON_POSITION_LEFT) + { + return __leftCommandButtonText; + } + else + { + return __rightCommandButtonText; + } +} + +int +_EditModel::GetKeypadCommandButtonActionId(CommandButtonPosition position) const +{ + if (position == COMMAND_BUTTON_POSITION_LEFT) + { + return __leftCommandButtonActionId; + } + else + { + return __rightCommandButtonActionId; + } +} + +void +_EditModel::UpdateKeypadCommandButtonText(void) +{ + GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_DONE, __leftCommandButtonText); + GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_CANCEL_ABB, __rightCommandButtonText); +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_EditPresenter.cpp b/src/ui/controls/FUiCtrl_EditPresenter.cpp new file mode 100644 index 0000000..154527f --- /dev/null +++ b/src/ui/controls/FUiCtrl_EditPresenter.cpp @@ -0,0 +1,12681 @@ +// +// 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_EditPresenter.cpp + * @brief This is the implementation file for the _EditPresenter class. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "FUi_Clipboard.h" +#include "FUi_ClipboardItem.h" +#include "FUi_Control.h" +#include "FUi_ControlManager.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_EcoreEvasMgr.h" +#include "FUi_ResourceManager.h" +#include "FUi_BidiUtils.h" +#include "FUi_UiEventManager.h" +#include "FUi_UiNotificationEvent.h" +#include "FUiAnim_VisualElement.h" +#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" +#include "FUiCtrl_TokenEditPresenter.h" +#include "FUiCtrl_FlickAnimation.h" +#include "FUiCtrl_Frame.h" +#include "FUiCtrl_Form.h" +#include "FUiCtrl_Scroll.h" +#include "FUiCtrl_ScrollPanel.h" +#include "FUiCtrl_Toolbar.h" +#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; +using namespace Tizen::Media; +using namespace Tizen::Ui::Animations; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Base; +using namespace Tizen::Base::Utility; +using namespace Tizen::Base::Collection; +using namespace Tizen::Locales; +using namespace Tizen::Graphics::_Text; + +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 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 MOVE_SKIP_DECISION_RANGE = 5.0f; +const int TITLE_SLIDING_TIME = 800; + +bool _EditPresenter::__isKeypadExist = false; +bool _EditPresenter::__isClipboardExist = false; +float _EditPresenter::__initialParentHeight = 0.0f; +float _EditPresenter::__clipboardHeight = 0.0f; +_EditFooterVisibleStatus _EditPresenter::__initialFooterVisibleStatus = EDIT_FOOTER_VISIBLE_STATUS_NONE; +bool _EditPresenter::__footerVisibleChanged = false; +unsigned int _EditPresenter::__latestBoundedContext = null; +const float _EditPresenter::TOUCH_PRESS_THRESHOLD_IN_CLEAR_AREA = 0.04f; +_ScrollPanel* _EditPresenter::__pResizedPanel = null; + + +class _EditDragAndDropWindow + : public Tizen::Ui::_Window +{ +public: + _EditDragAndDropWindow(void); + virtual ~_EditDragAndDropWindow(void); + + virtual result OnAttachedToMainTree(void); + void SetLabel(_Label* pLabel); +private: + _Label* __pLabel; +}; // _EditDragAndDropWindow + +_EditDragAndDropWindow::_EditDragAndDropWindow(void) +: __pLabel(null) +{ +} + +_EditDragAndDropWindow::~_EditDragAndDropWindow(void) +{ + if (__pLabel) + { + DetachChild(*__pLabel); + delete __pLabel; + __pLabel = null; + } +} + +result +_EditDragAndDropWindow::OnAttachedToMainTree(void) +{ + AcquireHandle(); + + return E_SUCCESS; +} + +void +_EditDragAndDropWindow::SetLabel(_Label* pLabel) +{ + __pLabel = pLabel; +} + +_EditPresenter::_EditPresenter(void) + : __pTitleSlidingTimer(null) + , __pEdit(null) + , __pTextBuffer(null) + , __pTextString(null) + , __pEditModel(null) + , __pScrollBar(null) + , __pScrollEffect(null) + , __limitLength(0) + , __horizontalAlignment(ALIGNMENT_LEFT) + , __horizontalAlignmentForBidi(ALIGNMENT_LEFT) + , __isScrollBarVisible(false) + , __scrollBarBounds() + , __initialBounds() + , __previousScrollBarPos(0.0f) + , __previousScrollBarMaxPos(0.0f) + , __pActionEventListener(null) + , __pCursorTimer(null) + , __pFlickAnimationTimer(null) + , __pPasswordTimer(null) + , __pFont(null) + , __pCursorVisualElement(null) + , __pDragAndDropCueVisualElement(null) + , __pTextVisualElement(null) + , __pTitleTextVisualElement(null) + , __pCopyPasteManager(null) + , __pFlickAnimation(null) + , __pParentForm(null) + , __pFullscreenKeypad(null) + , __pParentPanel(null) + , __pCommandButton(null) + , __pInputConnection(null) + , __isInputConnectionBound(false) + , __sentKeypadEvent(CORE_KEYPAD_EVENT_STATUS_CLOSE) + , __pClipboard(null) + , __guideText() + , __titleText() + , __pressedPoint() + , __isCopyPastePopupMoving(false) + , __pressedAbsolutePoint() + , __clearIconBounds() + , __textBoxBounds() + , __textObjectBounds() + , __titleBounds() + , __clientBounds() + , __previousCursorBounds() + , __keypadBounds(0.0f, 0.0f, 0.0f,0.0f) + , __pTextObject(null) + , __pGuideTextObject(null) + , __pTitleTextObject(null) + , __titleSlidingAction(TEXT_OBJECT_ACTION_TYPE_SLIDE_LEFT) + , __textObjectWrap(TEXT_OBJECT_WRAP_TYPE_WORD) + , __isTextBlocked(false) + , __isGuideTextColorChanged(false) + , __isKeypadCommandButtonVisible(false) + , __isKeypadCommandButtonUserSetting(false) + , __isTextComposing(false) + , __isCopyPasteManagerExist(false) + , __isCursorChanged(false) + , __isCursorInitialized(false) + , __isCursorDisabled(false) + , __isInitialized(false) + , __isMovingCursorByTouchMove(false) + , __isTouchMoving(false) + , __isTouchPressed(false) + , __isClearIconPressed(false) + , __isClearIconVisible(false) + , __isCursorOpaque(false) + , __isTouchReleaseSkipped(false) + , __isViewerModeEnabled(false) + , __isKeypadNormalNumberStyleEnabled(false) + , __isTextCompositionFinished(false) + , __isFlexibleHeightFrozen(false) + , __isKeypadShowing(false) + , __isKeypadHiding(false) + , __resizedByKeypadHide(false) + , __blockStartPos(0) + , __cursorPos(0) + , __prevTotalTextHeight(-1.0f) + , __textLength(0) + , __composingTextLength(0) + , __titleWidth(-1.0f) + , __verticalMargin(-1.0f) + , __isUSBKeyboardConnected(false) + , __rotated(false) + , __isCutLinkParserEnabled(false) + , __echoChar('*') + , __ContentTextStatus(EDIT_TEXT_STATUS_COMPOSE_NON) + , __isAutoShrinkEnabled(false) + , __groupStyle(GROUP_STYLE_NONE) + , __isFontInitialized(false) + , __contentFontSize(0.0f) + , __titleFontSize(0.0f) + , __defaultTouchMoveThreshold(0.16f) + , __contentFontStyle(FONT_STYLE_PLAIN) + , __contentTextStyle(TEXT_BOX_TEXT_STYLE_NORMAL) + , __titleFontFaceName("") + , __isSearchBar(false) + , __pCurrentFrame(null) + , __pTextFilter(null) + , __textBlockMoveLeft(false) + , __textBlockMoving(false) + , __clipboardConnected(false) + , __updateInitialBounds(true) + , __blockTextColor(Color(0, 0, 0)) + , __rowCursorIndex(-1) + , __columnCursorIndex(-1) + , __isPasswordVisible(false) + , __needToCreateCopyPastePopup(false) + , __calculatedCursorBounds(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f)) + , __dragAndDropStarted(false) + , __dragAndDropString("") + , __isTouchLongPressed(false) +{ +} + +void +_EditPresenter::OnInputConnectionPanelShowStateChanged(InputConnection& source, InputPanelShowState showState) + { + if (showState == INPUT_PANEL_SHOW_STATE_SHOW)// 1. keypad show 2.usb on&predictive window show + { + __isKeypadHiding = false; + __isKeypadShowing = false; + __isKeypadExist = true; + + CheckUSBKeyboardStatus(); + + SysLog(NID_UI_CTRL, "INPUT_PANEL_SHOW_STATE_SHOW[Target:%x][Bound:%d][Usb mode:%d]", this, __isInputConnectionBound, __isUSBKeyboardConnected); + + if (__isInputConnectionBound) + { + if (__isKeypadCommandButtonVisible && __pCommandButton) + { + SetFooterVisible(false); + } + + ChangeLayoutInternal(__pEdit->GetOrientation()); + AdjustParentPanelHeight(false); + + ScrollPanelToCursorPosition(); + + if (__isCopyPasteManagerExist) + { + __pCopyPasteManager->CreateCopyPastePopup(); + __pCopyPasteManager->Show(); + } + } + + if (!__pEdit->IsFullScreenKeypadEdit()) + { + if (__pParentForm) + { + __pParentForm->Draw(); + } + } + + if (__isUSBKeyboardConnected && (__isKeypadCommandButtonVisible && __pCommandButton)) + { + __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_BOUNDS_CHANGED); + } + else if (__isKeypadCommandButtonVisible && __pCommandButton && __pCommandButton->GetVisibleState())//already command exist in usb mode + { + __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_BOUNDS_CHANGED); + } + else + { + if (GetLastSentKeypadEvent() != CORE_KEYPAD_EVENT_STATUS_OPEN) + { + if (!__isClipboardExist) + { + __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_OPEN); + } + __pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_OPENED); + } + } + } + else if (showState == INPUT_PANEL_SHOW_STATE_HIDE)// 1.unbound 2.bounded&usb off -> usb on 3.Flick keypad hide + { + __isKeypadHiding = false; + + CheckUSBKeyboardStatus(); + SysLog(NID_UI_CTRL, "INPUT_PANEL_SHOW_STATE_HIDE[Target:%x][Bound:%d][Usb mode:%d]", this, __isInputConnectionBound, __isUSBKeyboardConnected); + + __isKeypadExist = false; + + if (__resizedByKeypadHide) + { + __resizedByKeypadHide = false; + return; + } + + if (__isCopyPasteManagerExist) + { + InitializeCopyPasteManager(); + __pTextObject->SetBlock(false); + __isTextBlocked = false; + } + + if (__isInputConnectionBound && __isUSBKeyboardConnected) // hide callback from external condition(usb mode off->on), focus remaining + { + if (!__isKeypadCommandButtonVisible && !__isClipboardExist) + { + if (__footerVisibleChanged) + { + SetFooterVisible(true);// must be called ahead of DeflateClientRectHeight + } + } + + ChangeLayoutInternal(__pEdit->GetOrientation()); + + if (__isClipboardExist) + { + AdjustParentPanelHeight(false); + } + else + { + AdjustParentPanelHeight(true); + } + + if (!__pEdit->IsFullScreenKeypadEdit()) + { + if (__pParentForm) + { + __pParentForm->Draw(); + } + } + } + else + { + if (__isInputConnectionBound)// keypad hided by back key or prediction hided by usb mode changed(on -> off) + { + if (!__isKeypadCommandButtonVisible && !__isClipboardExist) + { + if (__footerVisibleChanged) + { + SetFooterVisible(true);// must be called ahead of DeflateClientRectHeight + } + } + + FinishTextComposition(); + + ChangeLayoutInternal(__pEdit->GetOrientation()); + + if (__isClipboardExist) + { + AdjustParentPanelHeight(false); + } + else + { + AdjustParentPanelHeight(true); + } + + if (!__pEdit->IsFullScreenKeypadEdit()) + { + if (__pParentForm) + { + __pParentForm->Draw(); + } + } + } + else// called by focus move or HideKeypad() api call + { + if (__pCommandButton && __isKeypadCommandButtonVisible) + { + SetFooterVisible(true);// must be called ahead of DeflateClientRectHeight + __pCommandButton->SetVisibleState(false); + __pCommandButton->Invalidate(); + } + + __isInputConnectionBound = false; + + AdjustParentPanelHeight(true); + + if (__pParentForm) + { + SysLog(NID_UI_CTRL, "Form deflate RESET!!!"); + __pParentForm->DeflateClientRectHeight(0.0f); + } + + if (!__pEdit->IsFullScreenKeypadEdit()) + { + if (__pParentForm) + { + __pParentForm->Draw(); + } + } + } + } + + if ((__isKeypadCommandButtonVisible && __pCommandButton) && __isInputConnectionBound) + { + __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_BOUNDS_CHANGED); + } + else if((__isUSBKeyboardConnected && (__isKeypadCommandButtonVisible &&__pCommandButton) && !__isInputConnectionBound) || + (__isUSBKeyboardConnected && __isClipboardExist)) + { + //do nothing + } + else + { + __pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_CLOSED); + __pEdit->DetachScrollPanelEvent(); + + if (!__isClipboardExist) + { + __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_CLOSE); + } + } + } + + return; + } + +void +_EditPresenter::OnInputConnectionPanelLanguageChanged(InputConnection& source, LanguageCode language) +{ + LanguageCode oldLanguageCode; + __pEditModel->GetCurrentLanguage(oldLanguageCode); + + __pEditModel->SetCurrentLanguage(language); + __pEdit->SendLanguageEvent(oldLanguageCode, language); + + return; +} + +void +_EditPresenter::OnInputConnectionPanelBoundsChanged(InputConnection& source, const Rectangle& bounds) +{ + float previousHeight = __keypadBounds.height; + + CheckUSBKeyboardStatus(); + + if ((__isUSBKeyboardConnected == false) && __isKeypadExist == false) + { + SysLog(NID_UI_CTRL, "OnInputConnectionPanelBoundsChanged skipped - __isUSBKeyboardConnected:(%), __isKeypadExist:(%d)", __isUSBKeyboardConnected, __isKeypadExist); + return; + } + + if (CheckKeypadExist(__pEdit->GetOrientation()) == false)//double check keypad Exist + { + SysLog(NID_UI_CTRL, "OnInputConnectionPanelBoundsChanged skipped - Keypad doesn't exist!!"); + return; + } + else + { + if (IsKeypadRotating(__pEdit->GetOrientation())) + { + SysLog(NID_UI_CTRL, "OnInputConnectionPanelBoundsChanged skipped - Keypad is rotating!!"); + AdjustParentPanelHeight(true); + return; + } + } + + SysLog(NID_UI_CTRL, "OnInputConnectionPanelBoundsChanged"); + ChangeLayoutInternal(__pEdit->GetOrientation()); + AdjustParentPanelHeight(false); + ScrollPanelToCursorPosition(); + + if (__pParentForm) + { + __pParentForm->Draw(); + } + + __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_BOUNDS_CHANGED); + + if (__isCopyPasteManagerExist) + { + DrawText(); + if (__pCopyPasteManager->GetCopyPastePopup()) + { + if (previousHeight != bounds.height) + { + __pCopyPasteManager->CreateCopyPastePopup(); + } + } + __pCopyPasteManager->Show(); + } + + return; +} + +void +_EditPresenter::OnInputConnectionTextPredictionShowStateChanged(InputConnection& source, bool isShown) +{ + return; +} + +void +_EditPresenter::OnInputConnectionTextPredictionBoundsChanged(InputConnection& source, const Rectangle& bounds) +{ + return; +} + +void +_EditPresenter::OnInputConnectionTextCommitted(InputConnection& source, const String& committedText) +{ + OnTextCommitted(committedText); + + return; +} + +void +_EditPresenter::OnTextCommitted(const String& commitText) +{ + bool isTextComposingFinished = false; + bool isDeletedBlockTextByEnter = false; + char enterText1[2] = {'\n', }; + char enterText2[2] = {'\r', }; + + if (IsViewModeEnabled() == true) + { + return; + } + + if (IsBlocked() == true) + { + CoreKeypadAction keypadaction = GetKeypadAction(); + if (keypadaction == CORE_KEYPAD_ACTION_ENTER || !(commitText == enterText1 || commitText == enterText2)) + { + int start = 0; + int end = 0; + GetBlockRange(start, end); + __isFlexibleHeightFrozen = true; + if (DeleteText(start, end) == E_SUCCESS) + { + isDeletedBlockTextByEnter = true; + } + __isFlexibleHeightFrozen = false; + ReleaseTextBlock(); + } + } + + if (__isCopyPasteManagerExist) + { + InitializeCopyPasteManager(); + } + + int textLength = commitText.GetLength(); + int compositionStart = __cursorPos - textLength; + + if (__isTextComposing == true) + { + __isFlexibleHeightFrozen = true; + DeleteText(__cursorPos-__composingTextLength, __cursorPos); + __isFlexibleHeightFrozen = false; + + __isTextComposing = false; + __composingTextLength = 0; + isTextComposingFinished = true; + } + + if (__ContentTextStatus != EDIT_TEXT_STATUS_COMPOSE_NON) + { + __pTextObject->SetFont(__pFont, __cursorPos, __cursorPos+textLength); + __ContentTextStatus = EDIT_TEXT_STATUS_COMPOSE_NON; + } + + if (__pPasswordTimer) + { + ChangePasswordToEchoCharacter(__pTextBuffer, __echoChar); + StopPasswordTimer(); + } + + if (commitText == enterText1 || commitText == enterText2) + { + CoreKeypadAction keypadaction = GetKeypadAction(); + + __pEdit->SendKeypadEvent(keypadaction, CORE_KEYPAD_EVENT_STATUS_ENTERACTION); + if (keypadaction != CORE_KEYPAD_ACTION_ENTER) + { + return; + } + + if(__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE) + { + DrawText(); + if (isDeletedBlockTextByEnter) + { + __pEdit->SendTextEvent(CORE_TEXT_EVENT_CHANGED); + } + return; + } + } + + char tapText[2] = {'\t', }; + if (commitText == tapText) + { + return; + } + + // Limitation Protect + String insetText = commitText; + int currentLength = GetTextLength(); + int totalLength = currentLength + textLength; + int excessCharacterLength = totalLength - __limitLength; + + if (excessCharacterLength >= 0) + { + textLength -= excessCharacterLength; + if (textLength > 0) + { + insetText.Remove(textLength, excessCharacterLength); + } + else + { + textLength = 0; + } + } + + InsertTextAt(__cursorPos, insetText); + + ScrollPanelToCursorPosition(); + + if ((__pEdit->GetEditStyle() & EDIT_STYLE_PASSWORD) && isTextComposingFinished) + { + ReplaceTextIntoPasswordHyphenString(); + } + + if ((__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN) == false) + { + DrawText(); + } + + ChangePasswordToEchoCharacter((compositionStart + textLength), textLength); + + __pEdit->SendTextEvent(CORE_TEXT_EVENT_CHANGED); + + return; +} + +void +_EditPresenter::OnInputConnectionComposingTextChanged(InputConnection& source, const String& composingText, int cursorPosition) +{ + OnComposingTextChanged(composingText, cursorPosition); + + return; +} + +void +_EditPresenter::OnComposingTextChanged(const String& composingText, int cursorPosition) +{ + if (IsViewModeEnabled() == true) + { + return; + } + + if (IsBlocked() == true) + { + int start = 0; + int end = 0; + GetBlockRange(start, end); + __isFlexibleHeightFrozen = true; + DeleteText(start, end); + __isFlexibleHeightFrozen = false; + ReleaseTextBlock(); + } + + if (__isCopyPasteManagerExist) + { + InitializeCopyPasteManager(); + } + + int textLength = composingText.GetLength(); + + if (__isTextComposing == false) + { + if (textLength == 0) + { + return; + } + } + else + { + int compositionStart = GetCursorPosition(); + + if (textLength == 0) + { + __isTextComposing = false; + + // FirstText Check Logic + int curCursorLine = __pTextObject->GetLineIndexAtTextIndex(__pTextObject->GetCursorIndex()); + int firstTextIndex = __pTextObject->GetFirstTextIndexAt(curCursorLine); + bool isFirstText = false; + if (firstTextIndex + 1 == __pTextObject->GetCursorIndex()) + { + isFirstText = true; + } + + DeleteText(compositionStart-__composingTextLength, compositionStart); + + if (isFirstText) + { + __isCursorChanged = false; + AdjustRTLTextAlignment(EDIT_TEXT_TYPE_INPUT); + } + + __composingTextLength = 0; + + DrawText(); + + if (!__isCursorChanged) + { + __isCursorChanged = true; + } + __pEdit->SendTextEvent(CORE_TEXT_EVENT_CHANGED); + + return; + } + else + { + __isFlexibleHeightFrozen = true; + DeleteText(compositionStart-__composingTextLength, compositionStart); + __isFlexibleHeightFrozen = false; + } + } + + __composingTextLength = textLength; + if (__composingTextLength > 0) + { + __isTextComposing = true; + } + + if (__pPasswordTimer) + { + ChangePasswordToEchoCharacter(__pTextBuffer, __echoChar); + StopPasswordTimer(); + } + + // Limitation Protect + String insetText = composingText; + int currentLength = GetTextLength(); + int totalLength = currentLength + textLength; + int excessCharacterLength = totalLength - __limitLength; + + if (excessCharacterLength >= 0) + { + __composingTextLength -= excessCharacterLength; + if (__composingTextLength > 0) + { + insetText.Remove(__composingTextLength, excessCharacterLength); + } + else + { + __composingTextLength = 0; + } + } + + _FontImpl* fontImpl = _FontImpl::GetInstance(*__pFont); + SysTryReturnVoidResult(NID_UI_CTRL, fontImpl != null, E_SYSTEM, "[E_SYSTEM] fontImpl is null."); + fontImpl->SetUnderline(true); + __pTextObject->SetFont(__pFont, 0, 0); + + if (__composingTextLength > 0) + { + __ContentTextStatus = EDIT_TEXT_STATUS_COMPOSE; + } + + InsertTextAt(GetCursorPosition(), insetText); + + fontImpl->SetUnderline(false);// rollback to default content font + __pTextObject->SetFont(__pFont, 0, 0); + + ScrollPanelToCursorPosition(); + + DrawText(); + if (__composingTextLength > 0) + { + ChangePasswordToEchoCharacter((GetCursorPosition() - __composingTextLength), __composingTextLength); + } + + __pEdit->SendTextEvent(CORE_TEXT_EVENT_CHANGED); + + return; +} + +void +_EditPresenter::DeleteSurroundingText(InputConnection& source, int offset, int charCount) +{ + OnSurroundingTextDeleted(offset, charCount); + + return; +} + +void +_EditPresenter::OnSurroundingTextDeleted(int offset, int charCount) +{ + int start = 0; + int end = 0; + + if (IsBlocked() == true) + { + GetBlockRange(start, end); + } + else + { + start = __cursorPos + offset; + if (start < 0) + { + return; + } + end = start + charCount; + if (end > __cursorPos) + { + return; + } + } + + DeleteText(start, end); + + if (__isCopyPasteManagerExist) + { + InitializeCopyPasteManager(); + } + + if (IsBlocked() == true) + { + ReleaseTextBlock(); + } + + DrawText(); + + __pEdit->SendTextEvent(CORE_TEXT_EVENT_CHANGED); + + return; +} + +void +_EditPresenter::GetPreviousText(InputConnection& source, String& text, int& cursorPosition) +{ + const int SURROUNDING_PREVIOUS_TEXT_SIZE = 128; + const int SURROUNDING_NEXT_TEXT_SIZE = 32; + int inputTextLength = GetTextLength(); + + if (inputTextLength < 1) + { + text = null; + cursorPosition = 0; + } + else + { + int start = __cursorPos - SURROUNDING_PREVIOUS_TEXT_SIZE; + int end = __cursorPos + SURROUNDING_NEXT_TEXT_SIZE -1; + + if (start < 0) + { + start = 0; + } + + if (end > inputTextLength -1) + { + end = inputTextLength -1; + } + + text = GetText(start, end); + cursorPosition = __cursorPos - start; + } + + return; +} + +void +_EditPresenter::OnClipboardPopupOpened(Tizen::Graphics::Dimension& clipboardPopupSize) +{ + FloatDimension floatClipboardPopupSize = _CoordinateSystemUtils::ConvertToFloat(clipboardPopupSize); + + if (__clipboardConnected) + { + __isClipboardExist = true; + FloatRectangle absKeypadBounds; + GetKeypadBounds(absKeypadBounds); + CheckUSBKeyboardStatus(); + + __clipboardHeight = floatClipboardPopupSize.height; + + 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) + { + ChangeLayoutInternal(__pEdit->GetOrientation()); + AdjustParentPanelHeight(false); + ScrollPanelToCursorPosition(); + + if (__pParentForm) + { + __pParentForm->Draw(); + } + + __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_BOUNDS_CHANGED); + } + } + else + { + if (!__isKeypadCommandButtonVisible) + { + __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_CREATED); + + ChangeLayoutInternal(__pEdit->GetOrientation()); + AdjustParentPanelHeight(false); + ScrollPanelToCursorPosition(); + + if (__pParentForm) + { + __pParentForm->Draw(); + } + + __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_OPEN); + } + else + { + ChangeLayoutInternal(__pEdit->GetOrientation()); + AdjustParentPanelHeight(false); + ScrollPanelToCursorPosition(); + + if (__pParentForm) + { + __pParentForm->Draw(); + } + + __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_BOUNDS_CHANGED); + } + } + if (__isCopyPasteManagerExist) + { + UpdateComponentInformation(); + __pCopyPasteManager->Show(); + } + } + + return; +} + +void +_EditPresenter::OnClipboardPopupBoundsChanged(Tizen::Graphics::Dimension& clipboardPopupSize) +{ + FloatDimension floatClipboardPopupSize = _CoordinateSystemUtils::ConvertToFloat(clipboardPopupSize); + + if (__clipboardConnected) + { + FloatRectangle absKeypadBounds; + GetKeypadBounds(absKeypadBounds); + CheckUSBKeyboardStatus(); + + __clipboardHeight = floatClipboardPopupSize.height; + + SysLog(NID_UI_CTRL, "clipboard height = %f, [KeypadExist:%d]keypad height = %f", floatClipboardPopupSize.height, __isKeypadExist, absKeypadBounds.height); + + if (__isKeypadExist) + { + if (floatClipboardPopupSize.height >= absKeypadBounds.height) + { + ChangeLayoutInternal(__pEdit->GetOrientation()); + AdjustParentPanelHeight(false); + ScrollPanelToCursorPosition(); + + if (__pParentForm) + { + __pParentForm->Draw(); + } + + __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_BOUNDS_CHANGED); + } + else + { + ChangeLayoutInternal(__pEdit->GetOrientation()); + AdjustParentPanelHeight(false); + ScrollPanelToCursorPosition(); + + if (__pParentForm) + { + __pParentForm->Draw(); + } + + __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_BOUNDS_CHANGED); + } + } + else + { + ChangeLayoutInternal(__pEdit->GetOrientation()); + AdjustParentPanelHeight(false); + ScrollPanelToCursorPosition(); + + if (__pParentForm) + { + __pParentForm->Draw(); + } + + __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_BOUNDS_CHANGED); + } + + if (__rotated) // Command button should be relocated after rotation in case of no keypad. + { + if (__isCopyPasteManagerExist) + { + PostInternalEvent(String(L"ShowCopyPaste")); + } + __rotated = false; + } + else if (__isCopyPasteManagerExist) + { + __pCopyPasteManager->AdjustBounds(); + } + } + + return; +} + +void +_EditPresenter::OnClipboardPopupClosed(void) +{ + if (__clipboardConnected) + { + if (__isCopyPasteManagerExist) + { + InitializeCopyPasteManager(); + __pTextObject->SetBlock(false); + __isTextBlocked = false; + } + + __isClipboardExist = false; + FloatRectangle absKeypadBounds; + GetKeypadBounds(absKeypadBounds); + CheckUSBKeyboardStatus(); + + __clipboardHeight = 0.0f; + + SysLog(NID_UI_CTRL, "clipboard closed! [KeypadExist:%d]keypad height = %f", __isKeypadExist, absKeypadBounds.height); + + 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(); + } + } + + } + else + { + if (__footerVisibleChanged) + { + SetFooterVisible(true); + } + + AdjustParentPanelHeight(true); + if (__pParentForm) + { + SysLog(NID_UI_CTRL, "Form deflate RESET!!!"); + __pParentForm->DeflateClientRectHeight(0.0f); + } + + if (!__isKeypadCommandButtonVisible) + { + __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_CLOSE); + } + else + { + __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; + } + + return; +} + +_EditPresenter::~_EditPresenter(void) +{ + Dispose(); +} + +result +_EditPresenter::Dispose(void) +{ + if (__pCurrentFrame) + { + __pCurrentFrame->RemoveFrameEventListener(*this); + __pCurrentFrame = null; + } + + CheckUSBKeyboardStatus(); + + if(__latestBoundedContext != (unsigned int)this)//context is already chagned. + { + __isKeypadHiding = false; + } + + if (__isInputConnectionBound || __isKeypadHiding || __clipboardConnected) //Edit control removed without FocusLost callback or HideKeypad. + { + if (__clipboardConnected) //Edit control removed after FocusLost or without FocusLost callback. + { + __pEdit->RemoveClipboardShowTriggerEventListener(); + __pClipboard->HidePopup(); + __isClipboardExist = false; + } + + if (__pCommandButton && __isKeypadCommandButtonVisible) + { + __pCommandButton->SetVisibleState(false); + + SetFooterVisible(true); + + delete __pCommandButton; + __pCommandButton = null; + } + + if (__pParentForm) + { + SysLog(NID_UI_CTRL, "Form deflate RESET!!!"); + __pParentForm->DeflateClientRectHeight(0.0f); + } + + AdjustParentPanelHeight(true); + + __isKeypadExist = false; + + __latestBoundedContext = null; + + __pEdit->DetachScrollPanelEvent(); + } + + __initialFooterVisibleStatus = EDIT_FOOTER_VISIBLE_STATUS_NONE; + __footerVisibleChanged = false; + + if (__pParentPanel) + { + __pParentPanel->RemoveScrollEventListener(*__pEdit); + } + + if (__pClipboard) + { + __pClipboard->RemoveClipboardPopupEventListener(*this); + } + + if (__pFullscreenKeypad) + { + __pFullscreenKeypad->Close(); + delete __pFullscreenKeypad; + __pFullscreenKeypad = null; + } + + delete __pScrollEffect; + __pScrollEffect = null; + + if (__pTextBuffer) + { + delete[] __pTextBuffer; + __pTextBuffer = null; + } + + delete __pTextString; + __pTextString = null; + + delete __pEditModel; + __pEditModel = null; + + if (__pCursorTimer) + { + __pCursorTimer->Cancel(); + delete __pCursorTimer; + __pCursorTimer = null; + } + + if (__pInputConnection) + { + delete __pInputConnection; + __pInputConnection = null; + } + + delete __pTextObject; + __pTextObject = null; + + delete __pGuideTextObject; + __pGuideTextObject = null; + + delete __pTitleTextObject; + __pTitleTextObject = null; + + if (__pPasswordTimer) + { + __pPasswordTimer->Cancel(); + delete __pPasswordTimer; + __pPasswordTimer = null; + } + + if (__pScrollBar != null && __pEdit != null) + { + __pEdit->DetachSystemChild(*__pScrollBar); + delete __pScrollBar; + __pScrollBar = null; + } + + if (__pFlickAnimationTimer) + { + __pFlickAnimationTimer->Cancel(); + delete __pFlickAnimationTimer; + __pFlickAnimationTimer = null; + } + + if (__pTitleSlidingTimer) + { + __pTitleSlidingTimer->Cancel(); + delete __pTitleSlidingTimer; + __pTitleSlidingTimer = null; + } + + delete __pFlickAnimation; + __pFlickAnimation = null; + + if (__pCopyPasteManager != null) + { + delete __pCopyPasteManager; + __pCopyPasteManager = null; + } + + if (__pTextVisualElement) + { + __pTextVisualElement->Destroy(); + __pTextVisualElement = null; + } + + if (__pCursorVisualElement) + { + __pCursorVisualElement->Destroy(); + __pCursorVisualElement = null; + } + + if (__pDragAndDropCueVisualElement) + { + __pDragAndDropCueVisualElement->Destroy(); + __pDragAndDropCueVisualElement = null; + } + + if (__pTitleTextVisualElement) + { + __pTitleTextVisualElement->Destroy(); + __pTitleTextVisualElement = null; + } + + return E_SUCCESS; +} + +bool +_EditPresenter::IsKeypadExist(void) const +{ + return __isKeypadExist; +} + +bool +_EditPresenter::IsClipboardExist(void) const +{ + return __isClipboardExist; +} + +void +_EditPresenter::CheckUSBKeyboardStatus(void) +{ + if (__pInputConnection->CheckUSBKeyboardStatus()) + { + __isUSBKeyboardConnected = true; + } + else + { + __isUSBKeyboardConnected = false; + } + + return; +} + +bool +_EditPresenter::IsUsbKeyboardConnected(void) const +{ + if (__pInputConnection->CheckUSBKeyboardStatus()) + { + return true; + } + else + { + return false; + } +} + +bool +_EditPresenter::IsCurrentFocused(void) +{ + _ControlManager* pControlManager = _ControlManager::GetInstance(); + + if (pControlManager) + { + _Control* pControl = pControlManager->GetFocusControl(); + if (pControl != __pEdit) + { + return false; + } + else + { + return true; + } + } + else + { + return __pEdit->IsInternalFocused(); + } +} + +bool +_EditPresenter::InitializeFocusedCondition(void) +{ + if (!__pParentForm) + { + __pParentForm = GetParentForm(); + + if (!__pParentForm && __isKeypadCommandButtonVisible) + { + __isKeypadCommandButtonVisible = false; + } + } + + if (!__pTextVisualElement) + { + result r = E_SUCCESS; + __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)); + + __pTextVisualElement->SetSurfaceOpaque(false); + __pTextVisualElement->SetImplicitAnimationEnabled(false); + + __pTextVisualElement->SetShowState(true); + + _VisualElement* pEditVisualElement = __pEdit->GetVisualElement(); + SysTryCatch(NID_UI_CTRL, pEditVisualElement, , r = E_SYSTEM, "[E_SYSTEM] Unable to get root visual element."); + + pEditVisualElement->AttachChild(*__pTextVisualElement); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to add child", GetErrorMessage(r)); + } + + __isCursorOpaque = true; + + return true; + +CATCH: + __pTextVisualElement->Destroy(); + __pTextVisualElement = null; + + return false; +} + +void +_EditPresenter::SetSentKeypadEvent(CoreKeypadEventStatus sentKeypadEvent) +{ + __sentKeypadEvent = sentKeypadEvent; +} + +CoreKeypadEventStatus +_EditPresenter::GetLastSentKeypadEvent(void) +{ + return __sentKeypadEvent; +} + + +_EditPresenter* +_EditPresenter::CreateInstanceN(void) +{ + _EditPresenter* pPresenter = new (std::nothrow) _EditPresenter; + if (pPresenter == null) + { + SetLastResult(E_OUT_OF_MEMORY); + return null; + } + + return pPresenter; +} + +result +_EditPresenter::Initialize(const _Control& control) +{ + result r = E_SUCCESS; + _EditModel* pEditModel = null; + _VisualElement* pEditVisualElement = null; + TextSimple* pSimpleText = null; + _ControlManager* pControlManager = _ControlManager::GetInstance(); + _Window* pWindow = null; + + __pEdit = dynamic_cast<_Edit*>(const_cast<_Control*>(&control)); + SysAssertf(__pEdit != null, "__pEdit is null"); + + __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); + 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) + { + 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); + } + else + { + __pTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT | TEXT_OBJECT_ALIGNMENT_MIDDLE); + } + __pTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE); + __textObjectWrap = TEXT_OBJECT_WRAP_TYPE_NONE; + } + else + { + __pTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT | TEXT_OBJECT_ALIGNMENT_TOP); + __pTextObject->SetWrap(__textObjectWrap); + } + + __pTextString = new (std::nothrow) String(); + SysTryCatch(NID_UI_CTRL, __pTextString, , r = E_OUT_OF_MEMORY, "Memory allocation failed."); + __limitLength = 0; + + if (__pFont == null) + { + _ControlOrientation orientation = __pEdit->GetOrientation(); + float defaultFontSize = 0.0f; + GET_SHAPE_CONFIG(EDIT::DEFAULT_FONT_SIZE, orientation, defaultFontSize); + + __contentFontSize = defaultFontSize; + __contentFontStyle = FONT_STYLE_PLAIN; + + __pFont = __pEdit->GetFallbackFont(); + + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, __pFont, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __titleFontFaceName = __pFont->GetFaceName(); + + __isFontInitialized = true; + __pTextObject->SetFont(__pFont, 0, __pTextObject->GetTextLength()); + __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] Memory allocation failed."); + + for (int i = 0; i < EDIT_SCROLLFRAME_MAX; i++) + { + __pScrollEffect->touchScrollFrameLevel[i] = 2 + i; + } + + __pScrollEffect->previousY = -1.0f; + __pScrollEffect->currentY = -1.0f; + __pScrollEffect->previousX = -1.0f; + __pScrollEffect->currentX = -1.0f; + __pScrollEffect->previousAbsX = -1.0f; + __pScrollEffect->currentAbsX = -1.0f; + __pScrollEffect->previousAbsY = -1.0f; + __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] Memory allocation failed."); + + SetModel(*pEditModel); + + SetClientBounds(); + SetInitialBounds(); + + if (__pEdit->GetEditStyle() & EDIT_STYLE_VIEWER) + { + SetViewModeEnabled(true); + __isCutLinkParserEnabled = true; + } + else + { + SetKeypadEnabled(true); + __isCutLinkParserEnabled = false; + } + + if (__pEdit->GetInputStyle() == INPUT_STYLE_FULLSCREEN) + { + SetCursorDisabled(true); + } + + __initialBounds = __pEdit->GetBoundsF(); + + __pEdit->SetTouchPressThreshold(__defaultTouchMoveThreshold); + + __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)); + + __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 ."); + + __pInputConnection->Initialize(*__pEdit, *this, *this); + + __pTextObject->SetBounds(__textObjectBounds); + __pTextObject->HideRearSpace(TEXT_OBJECT_SPACE_HIDE_TYPE_NONE); + + pWindow = pControlManager->GetCurrentFrame(); + if (pWindow) + { + __pCurrentFrame = dynamic_cast<_Frame*>(pWindow); + if (__pCurrentFrame) + { + __pCurrentFrame->AddFrameEventListener(*this); + } + } + + __pClipboard = _Clipboard::GetInstance(); + + if (__pClipboard) + { + __pClipboard->AddClipboardPopupEventListener(*this); + } + + __pEdit->SetMaximumSize(FloatDimension(EDIT_MAXIMUM_WIDTH, EDIT_MAXIMUM_HEIGHT)); + + return r; + +CATCH: + Dispose(); + return r; +} + +result +_EditPresenter::InitializeAtFirstDrawing(void) +{ + result r = E_SUCCESS; + + Resize(); + + InitializeParentPanel(); + + AdjustRTLTextAlignment(EDIT_TEXT_TYPE_INPUT); + + if ((__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN) == false && (__pEdit->GetEditStyle() & EDIT_STYLE_FLEXIBLE)) + { + AdjustFlexibleHeight(); + } + + ReplaceTextIntoPasswordHyphenString(); + + if (__pEdit->IsViewModeEnabled()) + { + __pEdit->SetCursorPosition(0); + } + + __isInitialized = true; + + return r; +} + +result +_EditPresenter::DrawBackgroundBitmap(Canvas& canvas, bool focused) +{ + if (!DrawChangeableBackground(canvas, focused, 0, 0)) + { + return E_SYSTEM; + } + + return E_SUCCESS; +} + +result +_EditPresenter::DrawChangeableBackground(Canvas& canvas, bool focused, int bitmapId, int effectBitmapId, bool outLine, int outlineBitmapId) +{ + result r = E_SUCCESS; + FloatRectangle editRect(0.0f, 0.0f, __pEdit->GetBoundsF().width, __pEdit->GetBoundsF().height); + Color bitmapColor; + Bitmap* pEditBgBitmap = null; + Bitmap* pEditBgEffectBitmap = null; + Bitmap* pReplacementColorBackgroundBitmap = null; + bool borderRoundEnable = __pEdit->IsBorderRoundStyleEnabled(); + EditStatus editStatus = GetCurrentStatus(); + + pEditBgBitmap = __pEdit->GetDefaultBackgroundBitmap(editStatus); + + if (borderRoundEnable) + { + pEditBgBitmap = null; + r = GET_BITMAP_CONFIG_N(EDIT::BG_ROUND_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pEditBgBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap"); + } + + bitmapColor = __pEdit->GetColor(editStatus); + if (__groupStyle != GROUP_STYLE_NONE) + { + GET_COLOR_CONFIG(PANEL::GROUPED_STYLE_BG_NORMAL, bitmapColor); + } + + pReplacementColorBackgroundBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pEditBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), bitmapColor); + if (pReplacementColorBackgroundBitmap) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pReplacementColorBackgroundBitmap)) + { + canvas.DrawNinePatchedBitmap(editRect, *pReplacementColorBackgroundBitmap); + } + else + { + canvas.DrawBitmap(editRect, *pReplacementColorBackgroundBitmap); + } + } + + if ((!__pEdit->IsFullScreenKeypadEdit() && __groupStyle != GROUP_STYLE_NONE) || GetSearchBarFlag()) + { + pEditBgEffectBitmap = __pEdit->GetDefaultBackgroundEffectBitmap(); + + if (pEditBgEffectBitmap) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pEditBgEffectBitmap)) + { + canvas.DrawNinePatchedBitmap(editRect, *pEditBgEffectBitmap); + } + else + { + canvas.DrawBitmap(editRect, *pEditBgEffectBitmap); + } + } + } + + if (borderRoundEnable) + { + if (pEditBgBitmap) + { + delete pEditBgBitmap; + pEditBgBitmap = null; + } + + if (pEditBgEffectBitmap) + { + delete pEditBgEffectBitmap; + pEditBgEffectBitmap = null; + } + } + delete pReplacementColorBackgroundBitmap; + pReplacementColorBackgroundBitmap = null; + + return E_SUCCESS; +CATCH: + delete pEditBgBitmap; + + return r; +} + +result +_EditPresenter::DrawBackground(Canvas& canvas, bool drawTitleText) +{ + if (__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE) + { + return DrawSingleLineBackground(canvas, drawTitleText); + } + + FloatRectangle editRect(0.0f, 0.0f, __pEdit->GetBoundsF().width, __pEdit->GetBoundsF().height); + + EditStatus editStatus = GetCurrentStatus(); + + Bitmap* pEditBgBitmap = __pEdit->GetBackgroundBitmap(editStatus); + + if (pEditBgBitmap) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pEditBgBitmap)) + { + canvas.DrawNinePatchedBitmap(editRect, *pEditBgBitmap); + } + else + { + canvas.DrawBitmap(editRect, *pEditBgBitmap); + } + } + else + { + DrawBackgroundBitmap(canvas, IsCurrentFocused()); + } + + DrawFocusRing(canvas); + + if (drawTitleText) + { + if ((__pEdit->GetEditStyle() & EDIT_STYLE_TITLE_TOP) || (__pEdit->GetEditStyle() & EDIT_STYLE_TITLE_LEFT)) + { + DrawTitleText(); + } + } + + return E_SUCCESS; +} + +result +_EditPresenter::DrawTitleText() +{ + result r = E_SUCCESS; + if (__titleText == -1) + { + return E_SYSTEM; + } + + Variant value; + TextObjectActionType titleAction; + Canvas* pTitleTextCanvas = null; + _VisualElement* pRootElement = __pEdit->GetVisualElement(); + SysTryReturn(NID_UI_CTRL, pRootElement, false, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get root visual element."); + + if (!__pTitleTextVisualElement) + { + __pTitleTextVisualElement = new (std::nothrow) _VisualElement(); + SysTryReturnResult(NID_UI_CTRL, __pTitleTextVisualElement, E_OUT_OF_MEMORY, "Memory allocation failed."); + + r = __pTitleTextVisualElement->Construct(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r = E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to construct _VisualElement."); + + __pTitleTextVisualElement->SetImplicitAnimationEnabled(false); + __pTitleTextVisualElement->SetShowState(true); + + r = pRootElement->AttachChild(*__pTitleTextVisualElement); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + __pTitleTextVisualElement->SetBounds(__titleBounds); + + pTitleTextCanvas = __pTitleTextVisualElement->GetCanvasN(); + SysTryCatch(NID_UI_CTRL, pTitleTextCanvas, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pTitleTextCanvas->SetBackgroundColor(Color(0)); + pTitleTextCanvas->Clear(); + + titleAction = __pTitleTextObject->GetAction(); + if (IsCurrentFocused() == true) + { + __pTitleTextObject->SetForegroundColor(__pEdit->GetTitleTextColor(EDIT_STATUS_HIGHLIGHTED), 0, __pTitleTextObject->GetTextLength()); + + if (titleAction != __titleSlidingAction) + { + __pTitleTextObject->SetAction(__titleSlidingAction); + __pTitleTextObject->Compose(); + } + + __pTitleTextObject->SetBounds(FloatRectangle(0.0f, 0.0f, __titleBounds.width, __titleBounds.height)); + __pTitleTextObject->Draw(*_CanvasImpl::GetInstance(*pTitleTextCanvas)); + + StopTitleSlidingTimer(); + if (__pTitleTextObject->IsActionOn() == true) + { + StartTitleSlidingTimer(); + } + } + else + { + __pTitleTextObject->SetForegroundColor(__pEdit->GetTitleTextColor(GetCurrentStatus()), 0, __pTitleTextObject->GetTextLength()); + + if (titleAction != TEXT_OBJECT_ACTION_TYPE_ABBREV) + { + __pTitleTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); + } + // Draw title text + __pTitleTextObject->SetBounds(FloatRectangle(0.0f, 0.0f, __titleBounds.width, __titleBounds.height)); + __pTitleTextObject->Draw(*_CanvasImpl::GetInstance(*pTitleTextCanvas)); + } + + delete pTitleTextCanvas; + + return E_SUCCESS; + +CATCH: + __pTitleTextVisualElement->Destroy(); + __pTitleTextVisualElement = null; + + return r; +} + +void +_EditPresenter::DrawText(void) +{ + Canvas* pCanvas = null; + + // In case of unfocused and touch moving + 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] Memory allocation failed."); + + r = __pTextVisualElement->Construct(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to construct", GetErrorMessage(r)); + + __pTextVisualElement->SetSurfaceOpaque(false); + __pTextVisualElement->SetImplicitAnimationEnabled(false); + + __pTextVisualElement->SetShowState(true); + + _VisualElement* pEditVisualElement = __pEdit->GetVisualElement(); + SysTryCatch(NID_UI_CTRL, pEditVisualElement, , r = E_SYSTEM, "[E_SYSTEM] Unable to get root visual element."); + + pEditVisualElement->AttachChild(*__pTextVisualElement); + 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] Memory allocation failed."); + + pCanvas->SetBackgroundColor(Color(0)); + r = pCanvas->Clear(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + DrawBackground(*pCanvas); + + delete pCanvas; + pCanvas = null; + } + + if (__pTextVisualElement) + { + FloatRectangle editBounds = __pEdit->GetBoundsF(); + __pTextVisualElement->SetOpacity(1.0f); + __pTextVisualElement->SetBounds(FloatRectangle(0.0f, 0.0f, editBounds.width, editBounds.height)); + pCanvas = __pTextVisualElement->GetCanvasN(); + if (pCanvas == null) + { + return; + } + pCanvas->SetBackgroundColor(Color(0)); + pCanvas->Clear(); + + if (__pEdit->GetEditStyle() & EDIT_STYLE_CLEAR) + { + 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; + } + + return; + +CATCH: + __pTextVisualElement->Destroy(); + __pTextVisualElement = null; + + if (pCanvas) + { + delete pCanvas; + pCanvas = null; + } + + return; +} + +result +_EditPresenter::DrawText(Canvas& canvas) +{ + result r = E_SUCCESS; + + if (__pEdit->GetEnableState() == false) + { + __pTextObject->SetAlternateLookEnabled(true); + Color tempColor = __pEdit->GetTextColor(EDIT_STATUS_DISABLED); + __pTextObject->SetAlternativeForegroundColor(tempColor); + } + else + { + __pTextObject->SetAlternateLookEnabled(false); + } + + + if (__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE) + { + return DrawTextForEntireFontSetting(canvas); + } + + // initital guide text + if (IsGuideTextActivated()) + { + __pGuideTextObject->SetForegroundColor(__pEdit->GetGuideTextColor(), 0, __pGuideTextObject->GetTextLength()); + + if (__isGuideTextColorChanged == true && __pEdit->IsSettingGuideTextColor() == false) + { + __pGuideTextObject->SetForegroundColor(__pEdit->GetTextColor(EDIT_STATUS_NORMAL), 0, __pGuideTextObject->GetTextLength()); + __pGuideTextObject->SetBounds(__textObjectBounds); + __pGuideTextObject->Draw(*_CanvasImpl::GetInstance(canvas)); + __pGuideTextObject->SetForegroundColor(__pEdit->GetTextColor(EDIT_STATUS_DISABLED), 0, __pGuideTextObject->GetTextLength()); + __isGuideTextColorChanged = false; + } + else + { + __pGuideTextObject->SetBounds(__textObjectBounds); + __pGuideTextObject->Draw(*_CanvasImpl::GetInstance(canvas)); + } + } + + if (GetTextLength() <= 0) + { + return E_SUCCESS; + } + ConvertLinkType(); + + EditStatus editStatus = GetCurrentStatus(); + + __pTextObject->SetForegroundColor(__pEdit->GetTextColor(editStatus), 0, __pTextObject->GetTextLength()); + if (__isTextBlocked) + { + __pTextObject->SetForegroundColor(__blockTextColor, __blockStartPos, __cursorPos - __blockStartPos); + } + + if (__isTextBlocked == true && editStatus == EDIT_STATUS_HIGHLIGHTED) + { + __pTextObject->SetBackgroundColor(__pEdit->GetColor(EDIT_STATUS_HIGHLIGHTED), 0, __pTextObject->GetTextLength()); + __pTextObject->SetBlock(true); + __pTextObject->SetBlockRange(__blockStartPos, __cursorPos - __blockStartPos); + } + else if (__isTextBlocked == true && editStatus == EDIT_STATUS_PRESSED) + { + __pTextObject->SetBackgroundColor(__pEdit->GetColor(EDIT_STATUS_PRESSED), 0, __pTextObject->GetTextLength()); + __pTextObject->SetBlock(true); + __pTextObject->SetBlockRange(__blockStartPos, __cursorPos - __blockStartPos); + } + else if (__isTextBlocked == true && editStatus == EDIT_STATUS_NORMAL) + { + __pTextObject->SetBackgroundColor(__pEdit->GetColor(EDIT_STATUS_NORMAL), 0, __pTextObject->GetTextLength()); + __pTextObject->SetBlock(true); + __pTextObject->SetBlockRange(__blockStartPos, __cursorPos - __blockStartPos); + } + else + { + __pTextObject->SetBlock(false); + __isTextBlocked = false; + } + + UpdateComponentInformation(); + + __pTextObject->SetBounds(__textObjectBounds); + __pTextObject->Draw(*_CanvasImpl::GetInstance(canvas)); + + if (__isTextBlocked == true && editStatus == EDIT_STATUS_HIGHLIGHTED) + { + __pTextObject->SetBackgroundColor(Color::GetColor(COLOR_ID_BLACK), 0, __pTextObject->GetTextLength()); + } + + DrawTextBlockLine(canvas); + + __pEdit->UpdateAccessibilityElement(EDIT_ACCESSIBILITY_ELEMENT_TYPE_TEXT); + + return r; +} + +void +_EditPresenter::DrawTextBlockLine(Canvas& canvas) +{ + if (!__isTextBlocked) + { + return; + } + 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); + + FloatRectangle cursorBounds; + FloatRectangle textObjectBounds = __textObjectBounds; + textObjectBounds.x -= 1; + textObjectBounds.width = textObjectBounds.width + 2; + + if (__pCopyPasteManager) + { + __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 (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); + } + } +} + +result +_EditPresenter::DrawTextForEntireFontSetting(Canvas& canvas) +{ + result r = E_SUCCESS; + + if (!(__pEdit->GetEditStyle() & EDIT_STYLE_PASSWORD) && IsCurrentFocused() == false && __pEdit->GetInputStyle() == INPUT_STYLE_OVERLAY) + { + __pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); + } + else + { + if (__pTextObject->GetAction() != TEXT_OBJECT_ACTION_TYPE_NONE) + { + __pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_NONE); + __isCursorChanged = true; + } + } + + // initital guide text + if (IsGuideTextActivated()) + { + __pGuideTextObject->SetForegroundColor(__pEdit->GetGuideTextColor(), 0, __pGuideTextObject->GetTextLength()); + + if (__isGuideTextColorChanged == true && __pEdit->IsSettingGuideTextColor() == false) + { + __pGuideTextObject->SetForegroundColor(__pEdit->GetTextColor(EDIT_STATUS_NORMAL), 0, __pGuideTextObject->GetTextLength()); + __pGuideTextObject->SetBounds(__textObjectBounds); + __pGuideTextObject->Draw(*_CanvasImpl::GetInstance(canvas)); + __pGuideTextObject->SetForegroundColor(__pEdit->GetTextColor(EDIT_STATUS_DISABLED), 0, __pGuideTextObject->GetTextLength()); + __isGuideTextColorChanged = false; + } + else + { + __pGuideTextObject->SetBounds(__textObjectBounds); + __pGuideTextObject->Draw(*_CanvasImpl::GetInstance(canvas)); + } + } + + if (GetTextLength() <= 0) + { + return E_SUCCESS; + } + ConvertLinkType(); + + EditStatus editStatus = GetCurrentStatus(); + + if (IsCurrentFocused() == false) + { + if (__isCursorChanged == true) + { + if (AdjustRTLTextAlignment(EDIT_TEXT_TYPE_INPUT) == true) + { + __pTextObject->Compose(); + } + } + 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 + { + int startRange = 0; + int lengthRange = 0; + + __pTextObject->GetRange(startRange, lengthRange); + __pTextObject->SetRange(0, GetTextLength()); + __pTextObject->SetForegroundColor(__pEdit->GetTextColor(editStatus), 0, __pTextObject->GetTextLength()); + if (__isTextBlocked) + { + __pTextObject->SetForegroundColor(__blockTextColor, __blockStartPos, __cursorPos - __blockStartPos); + } + + if (IsBlocked() == true && editStatus == EDIT_STATUS_HIGHLIGHTED) + { + __pTextObject->SetBackgroundColor(__pEdit->GetColor(EDIT_STATUS_HIGHLIGHTED), 0, __pTextObject->GetTextLength()); + __pTextObject->SetBlock(true); + __pTextObject->SetRange(__blockStartPos, __cursorPos - __blockStartPos); + } + else if (__isTextBlocked == true && editStatus == EDIT_STATUS_PRESSED) + { + __pTextObject->SetBackgroundColor(__pEdit->GetColor(EDIT_STATUS_PRESSED), 0, __pTextObject->GetTextLength()); + __pTextObject->SetBlock(true); + __pTextObject->SetBlockRange(__blockStartPos, __cursorPos - __blockStartPos); + } + else if (__isTextBlocked == true && editStatus == EDIT_STATUS_NORMAL) + { + __pTextObject->SetBackgroundColor(__pEdit->GetColor(EDIT_STATUS_NORMAL), 0, __pTextObject->GetTextLength()); + __pTextObject->SetBlock(true); + __pTextObject->SetBlockRange(__blockStartPos, __cursorPos - __blockStartPos); + } + else + { + __pTextObject->SetBlock(false); + __isTextBlocked = false; + } + UpdateComponentInformation(); + } + + __pTextObject->SetBounds(__textObjectBounds); + __pTextObject->Draw(*_CanvasImpl::GetInstance(canvas)); + + DrawTextBlockLine(canvas); + + return r; +} + +result +_EditPresenter::DrawSingleLineBackground(Canvas& canvas, bool drawTitleText) +{ + FloatRectangle editField(0.0f, 0.0f, __pEdit->GetBoundsF().width, __pEdit->GetBoundsF().height); + EditStatus editStatus = GetCurrentStatus(); + + Bitmap* pEditBgBitmap = __pEdit->GetBackgroundBitmap(editStatus); + + if (pEditBgBitmap) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pEditBgBitmap)) + { + canvas.DrawNinePatchedBitmap(editField, *pEditBgBitmap); + } + else + { + canvas.DrawBitmap(editField, *pEditBgBitmap); + } + } + else + { + DrawSingleLineBackgroundBitmap(canvas, IsCurrentFocused()); + } + + DrawFocusRing(canvas); + + if (drawTitleText) + { + if (((__pEdit->GetEditStyle() & EDIT_STYLE_TITLE_LEFT) && !(__titleText.GetLength() == 0)) || (__pEdit->GetEditStyle() & EDIT_STYLE_TITLE_TOP)) + { + DrawTitleText(); + } + } + + return E_SUCCESS; +} + + +result +_EditPresenter::DrawSingleLineBackgroundBitmap(Canvas& canvas, bool focused) +{ + if (__isTouchPressed) + { + DrawChangeableBackground(canvas, focused, 0, 0); + } + else + { + if (focused) + { + DrawChangeableBackground(canvas, focused, 0, 0, true, 0); + } + else + { + bool tmpFocused = focused; + DrawChangeableBackground(canvas, tmpFocused, 0, 0); + } + } + + return true; +} + +result +_EditPresenter::DrawClearIcon(Canvas& canvas) +{ + result r = E_SUCCESS; + + 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) + { + return E_SUCCESS; + } + + Bitmap* pEditBitmapClear = null; + Color editClearIconColor; + + if (!__pEdit->IsEnabled()) + { + 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; + } + } + else if (__isClearIconPressed) + { + 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; + } + } + else + { + 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; + } + } + + FloatRectangle textRect = __textObjectBounds; + FloatRectangle afterClearIconRect(textRect.x + textRect.width + cursorWidth, textRect.y + (textRect.height - clearIconHeight) / 2.0f, clearIconWidth, clearIconHeight); + FloatRectangle editBounds = __pEdit->GetBoundsF(); + + if (__clearIconBounds != afterClearIconRect) + { + __clearIconBounds = afterClearIconRect; + __pEdit->UpdateAccessibilityElement(EDIT_ACCESSIBILITY_ELEMENT_TYPE_CLEAR_ICON); + } + + if (editBounds.height < clearIconHeight) + { + __clearIconBounds.y = textRect.y; + } + + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pEditBitmapClear)) + { + r = canvas.DrawNinePatchedBitmap(__clearIconBounds, *pEditBitmapClear); + } + else + { + r = canvas.DrawBitmap(__clearIconBounds, *pEditBitmapClear); + } + + if (pEditBitmapClear) + { + delete pEditBitmapClear; + pEditBitmapClear = null; + } + + return r; +} + +result +_EditPresenter::Draw(void) +{ + result r = E_SUCCESS; + + if (__isInitialized == false) + { + r = InitializeAtFirstDrawing(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Faild to initialize."); + + if (IsCurrentFocused() == true && __isInputConnectionBound == false) + { + if (IsViewModeEnabled() == false) + { + if (__pEdit->GetInputStyle() == INPUT_STYLE_OVERLAY) + { + ShowKeypad(false); + } + else + { + ShowFullscreenKeypad(); + } + } + } + } + + //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; + + pCanvas->SetBackgroundColor(Color(0)); + r = pCanvas->Clear(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + DrawBackground(*pCanvas); + + if (__pTextVisualElement) + { + DrawText(); + } + else + { + + if (__pEdit->GetEditStyle() & EDIT_STYLE_CLEAR) + { + 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); + } + + RestoreCopyPasteManager(); + + if (__isCopyPasteManagerExist) + { + __pCopyPasteManager->Show(); + } + + InitializeCursor(); + + // Set scroll bar + DrawScrollBar(); + + //To avoid resizing to Flexible bounds on User SetBounds in Non-focussed mode + if (IsFocused() || (!__isAutoShrinkEnabled)) + { + if (__pEdit->GetEditStyle() & EDIT_STYLE_FLEXIBLE) + { + AdjustFlexibleHeight(); + } + } + + //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) +{ + if (__isCutLinkParserEnabled == false || IsViewModeEnabled() == false) + { + return E_SUCCESS; + } + + unsigned long autoLinkMask = GetAutoLinkMask(); + bool isChangingCutLink = false; + EditCutLinkType editLinkType = EDIT_LINK_TYPE_INVALID; + TextCutLinkParser cutlinkParser; + cutlinkParser.SetCutLinkMask(autoLinkMask); + TextLinkInfo* pLinkInfo = cutlinkParser.Parse(__pTextBuffer, wcslen(__pTextBuffer), 0); + TextLinkInfo* pNextLinkInfo = null; + int cursorPos = __cursorPos; + + __isCutLinkParserEnabled = false; + + while (pLinkInfo != null) + { + if (IsViewModeEnabled() == true) + { + switch (pLinkInfo->linkType) + { + case LINK_TYPE_URL: + if (autoLinkMask & LINK_TYPE_URL) + { + isChangingCutLink = true; + editLinkType = EDIT_LINK_TYPE_URL; + } + break; + + case LINK_TYPE_EMAIL: + if (autoLinkMask & LINK_TYPE_EMAIL) + { + isChangingCutLink = true; + editLinkType = EDIT_LINK_TYPE_URL; + } + break; + + case LINK_TYPE_TEL_NUM: + if (autoLinkMask & LINK_TYPE_TEL_NUM) + { + isChangingCutLink = true; + editLinkType = EDIT_LINK_TYPE_PHONE_NUM; + } + break; + + default: + editLinkType = EDIT_LINK_TYPE_INVALID; + break; + } + } + else + { + _Text::TextElement* pTextElement = __pTextObject->GetElementAtTextIndex(pLinkInfo->srcOffset); + if (pTextElement != null && pTextElement->GetType() != TEXT_ELEMENT_TYPE_CUTLINK) + { + pNextLinkInfo = pLinkInfo->pNextLinkInfo; + delete pLinkInfo; + pLinkInfo = pNextLinkInfo; + continue; + } + } + + wchar_t* pCutLinkString = null; + result r = E_SUCCESS; + + pCutLinkString = new(std::nothrow) wchar_t[(pLinkInfo->length + 1) * sizeof(wchar_t)]; + + if (!pCutLinkString) + { + while (pLinkInfo != null) + { + pNextLinkInfo = pLinkInfo->pNextLinkInfo; + delete pLinkInfo; + pLinkInfo = pNextLinkInfo; + } + SysLog(NID_UI_CTRL, "[E_SYSTEM] Unable to allocate cutlink text buffer."); + return E_SYSTEM; + } + + for (int i = 0; i < pLinkInfo->length; i++) + { + pCutLinkString[i] = __pTextBuffer[pLinkInfo->srcOffset + i]; + } + pCutLinkString[pLinkInfo->length] = null; + + r = DeleteText(pLinkInfo->srcOffset, pLinkInfo->srcOffset + pLinkInfo->length); + + if (r == E_SUCCESS) + { + int currentLength = __pTextString->GetLength(); + int fullLength = currentLength + pLinkInfo->length; + + r = __pTextString->Insert(String(pCutLinkString), pLinkInfo->srcOffset); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + wchar_t pOriginalString[currentLength - pLinkInfo->srcOffset]; + + // Save original text. + for (int i = 0; i < currentLength - pLinkInfo->srcOffset; i++) + { + pOriginalString[i] = __pTextBuffer[pLinkInfo->srcOffset + i]; + } + pOriginalString[currentLength - pLinkInfo->srcOffset] = 0; + + // Insert text. + for (int i = 0; i < pLinkInfo->length; i++) + { + __pTextBuffer[i + pLinkInfo->srcOffset] = pCutLinkString[i]; + } + + // Append origianal text. + for (int i = 0; i < currentLength - pLinkInfo->srcOffset; i++) + { + __pTextBuffer[i + pLinkInfo->srcOffset + pLinkInfo->length] = pOriginalString[i]; + } + __pTextBuffer[fullLength] = 0; + } + + if (isChangingCutLink) + { + TextCutLink* pCutLinkObject = null; + EditCutlinkColor cutlinkColor; + + Font* pFont = _FontImpl::CloneN(const_cast (*__pFont)); + SysTryReturnResult(NID_UI_CTRL, pFont, GetLastResult(), "Unable to get font."); + + _FontImpl* fontImpl = _FontImpl::GetInstance(*pFont); + SysTryReturnResult(NID_UI_CTRL, fontImpl, GetLastResult(), "fontImpl is null."); + fontImpl->SetUnderline(true); + + __pEdit->GetCutlinkColorInfo(editLinkType, &cutlinkColor); + pCutLinkObject = new (std::nothrow) TextCutLink(false, pLinkInfo->linkType, pCutLinkString, pLinkInfo->length, TEXT_ELEMENT_SOURCE_TYPE_INTERNAL, pFont, + cutlinkColor.cutlinkFgColor, cutlinkColor.cutlinkBgColor, 0); + + delete pFont; + + if (pCutLinkObject == null) + { + SysLog(NID_UI_CTRL, "Unable to allocate cutlink object."); + } + else + { + pCutLinkObject->SetEditModeEnable(true); + __pTextObject->InsertElementAt(pLinkInfo->srcOffset, *pCutLinkObject); + __pTextObject->ChangeTextOffset(__pTextBuffer, pLinkInfo->srcOffset, pLinkInfo->length); + } + } + else + { + TextSimple* pSimpleText = null; + pSimpleText = new (std::nothrow) TextSimple(pCutLinkString, pLinkInfo->length, TEXT_ELEMENT_SOURCE_TYPE_INTERNAL, GetFont()); + + if (pSimpleText == null) + { + SysLog(NID_UI_CTRL, "Unable to allocate text object."); + + } + else + { + __pTextObject->InsertElementAt(pLinkInfo->srcOffset, *pSimpleText); + __pTextObject->ChangeTextOffset(__pTextBuffer, pLinkInfo->srcOffset, pSimpleText->GetTextLength()); + } + } + + pNextLinkInfo = pLinkInfo->pNextLinkInfo; + delete pLinkInfo; + pLinkInfo = pNextLinkInfo; + + if (pCutLinkString != null) + { + delete[] pCutLinkString; + pCutLinkString = null; + } + } + + __pTextObject->Compose(); + + bool isCursorChanged = __isCursorChanged; + SetCursorPosition(cursorPos); + __isCursorChanged = isCursorChanged; + + return E_SUCCESS; +} + +int +_EditPresenter::GetLinkElementOffsetInTextBuffer(int elementIndex) const +{ + const int textElementCount = __pTextObject->GetElementCount(); + SysTryReturn(NID_UI_CTRL, elementIndex >= 0 && elementIndex <= textElementCount, -1, E_OUT_OF_RANGE, "The Invalid argument is given."); + + _Text::TextElement* pTextElement = null; + int elementOffset = -1; + int elementLength = 0; + int prevOffset = 0; + int prevLength = 0; + + for (int index = 0; index <= elementIndex; index++) + { + pTextElement = __pTextObject->GetElementAtElementIndex(index); + if (pTextElement == null) + { + return -1; + } + + elementOffset = static_cast(pTextElement->GetValue(SET_TEXT_OFFSET)); + elementLength = pTextElement->GetTextLength(); + + if (pTextElement->GetType() == TEXT_ELEMENT_TYPE_CUTLINK) + { + elementOffset = prevOffset + prevLength; + } + + prevOffset = elementOffset; + prevLength = elementLength; + pTextElement = null; + } + + return elementOffset; +} + +bool +_EditPresenter::IsTextBlockedInTokenEdit(void) const +{ + return false; +} + +int +_EditPresenter::GetCursorPositionAt(const FloatPoint& touchPoint) const +{ + FloatPoint cursorPoint; + int cursorPos = -1; + + FloatRectangle textObjectBounds = __textObjectBounds; + + if (!(__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN) == false) + { + if (IsTextBlockedInTokenEdit()) + { + textObjectBounds = GetTextBoundsF(); + } + } + + if (textObjectBounds.Contains(touchPoint)) + { + cursorPoint.x = touchPoint.x - textObjectBounds.x; + cursorPoint.y = touchPoint.y - textObjectBounds.y; + } + else if (__textBoxBounds.Contains(touchPoint)) + { + if (touchPoint.y <= textObjectBounds.y) + { + cursorPoint.y = textObjectBounds.y + 1.0f; + } + else if (touchPoint.y >= (textObjectBounds.y + textObjectBounds.height)) + { + cursorPoint.y = textObjectBounds.y + textObjectBounds.height - 1.0f; + } + else + { + cursorPoint.y = touchPoint.y; + } + + if (touchPoint.x <= textObjectBounds.x) + { + cursorPoint.x = textObjectBounds.x + 1.0f; + } + else if (touchPoint.x >= (textObjectBounds.x + textObjectBounds.width)) + { + cursorPoint.x = textObjectBounds.x + textObjectBounds.width - 1.0f; + } + else + { + cursorPoint.x = touchPoint.x; + } + cursorPoint.y -= textObjectBounds.y; + cursorPoint.x -= textObjectBounds.x; + } + else + { + return cursorPos; + } + + cursorPos = __pTextObject->GetTextIndexFromPosition(cursorPoint.x, cursorPoint.y); + + return cursorPos; +} +int +_EditPresenter::GetCursorPositionAt(const FloatPoint& touchPoint, int& rowIndex, int& columnIndex, bool isMoving) +{ + FloatPoint cursorPoint; + int cursorPos = -1; + + FloatRectangle textObjectBounds = __textObjectBounds; + + if (!(__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN) == false) + { + if (IsTextBlockedInTokenEdit()) + { + textObjectBounds = GetTextBoundsF(); + } + } + + if (textObjectBounds.Contains(touchPoint)) + { + cursorPoint.x = touchPoint.x - textObjectBounds.x; + cursorPoint.y = touchPoint.y - textObjectBounds.y; + } + else if (__textBoxBounds.Contains(touchPoint) && !isMoving) + { + if (touchPoint.y <= textObjectBounds.y) + { + cursorPoint.y = textObjectBounds.y + 1.0f; + } + else if (touchPoint.y >= (textObjectBounds.y + textObjectBounds.height)) + { + cursorPoint.y = textObjectBounds.y + textObjectBounds.height - 1.0f; + } + else + { + cursorPoint.y = touchPoint.y; + } + + if (touchPoint.x <= textObjectBounds.x) + { + cursorPoint.x = textObjectBounds.x + 1.0f; + } + else if (touchPoint.x >= (textObjectBounds.x + textObjectBounds.width)) + { + cursorPoint.x = textObjectBounds.x + textObjectBounds.width - 1.0f; + } + else + { + cursorPoint.x = touchPoint.x; + } + cursorPoint.y -= textObjectBounds.y; + cursorPoint.x -= textObjectBounds.x; + } + else + { + return cursorPos; + } + + cursorPos = __pTextObject->GetTextIndexFromPosition(cursorPoint.x, cursorPoint.y, rowIndex, columnIndex, true); + + return cursorPos; +} + +bool +_EditPresenter::IsHorizontalDirection(const _TouchInfo& touchInfo) +{ + if (touchInfo.GetTouchStatus() != _TOUCH_MOVED) + { + return false; + } + + if (__isMovingCursorByTouchMove) + { + return true; + } + + FloatRectangle absoluteEditRect = __pEdit->GetAbsoluteBoundsF(true); + FloatPoint touchStartPoint = __pressedAbsolutePoint; + //After internal touch core complete the float conversion, we need to change the code here + FloatPoint touchPoint = touchInfo.GetCurrentPosition(); + + float movedWidth = touchStartPoint.x - touchPoint.x - absoluteEditRect.x; + float movedHeight = touchStartPoint.y - touchPoint.y - absoluteEditRect.y; + movedWidth = (movedWidth >= 0.0f) ? movedWidth : -(movedWidth); + movedHeight = (movedHeight >= 0.0f) ? movedHeight : -(movedHeight); + + if (movedWidth >= movedHeight * DIRECTION_DECISION_RATIO) + { + return true; + } + + return false; +} + +bool +_EditPresenter::IsInitialized(void) const +{ + return __isInitialized; +} + +result +_EditPresenter::CalculateCursorBounds(const FloatRectangle& textBounds, FloatRectangle& cursorBounds, int cursorPos) +{ + float cursorWidth = 0.0f; + float cursorHeight = 0.0f; + float cursorAbsX = 0.0f; + float cursorAbsY = 0.0f; + float cursorRelativeX = 0.0f; + float cursorRelativeY = 0.0f; + + __pTextObject->SetBounds(textBounds); + + if (cursorPos == -1) + { + cursorPos = __pTextObject->GetCursorIndex(); + } + + if (cursorPos != __cursorPos) + { + if (__pTextObject->GetTextPositionInfoAt(cursorPos, cursorWidth, cursorHeight, cursorAbsX, cursorAbsY, cursorRelativeX, cursorRelativeY) != E_SUCCESS) + { + return E_SYSTEM; + } + } + else + { + if (__pTextObject->GetTextPositionInfoAt(__rowCursorIndex, __columnCursorIndex, cursorWidth, cursorHeight, cursorAbsX, cursorAbsY, cursorRelativeX, cursorRelativeY) != E_SUCCESS) + { + return E_SYSTEM; + } + } + + cursorBounds.x = cursorRelativeX; + cursorBounds.y = cursorRelativeY; + float cursorWidthValue = 0.0f; + GET_SHAPE_CONFIG(EDIT::CURSOR_WIDTH, __pEdit->GetOrientation(), cursorWidthValue); + cursorBounds.width = cursorWidthValue; + cursorBounds.height = cursorHeight; + + if (cursorBounds.y == 0.0f) + { + cursorBounds.y = __textObjectBounds.y; + } + + if (cursorBounds.height == 0.0f) + { + cursorBounds.height = __textObjectBounds.height; + } + + if (cursorBounds.height == 0.0f) + { + return E_SYSTEM; + } + + if (cursorBounds.y < textBounds.y) + { + float cursorHeightDiff = textBounds.y - cursorBounds.y; + cursorBounds.y = textBounds.y; + cursorBounds.height -= cursorHeightDiff; + } + + 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; + if (cursorHeightDiff > 0.0f) + { + cursorBounds.height -= cursorHeightDiff; + } + else + { + cursorBounds.height += cursorHeightDiff; + } + } + + if (__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE) + { + if (__pTextObject->GetBlock() == false) + { + cursorBounds.x -= 1.0f; + } + + if (cursorBounds.x > textBounds.x + textBounds.width) + { + if (cursorBounds.x <= textBounds.x + textBounds.width + cursorBounds.width) + { + cursorBounds.x = textBounds.x + textBounds.width; + } + else + { + return E_SYSTEM; + } + } + + if (cursorBounds.x < textBounds.x) + { + if (cursorBounds.x > textBounds.x - cursorBounds.width) + { + cursorBounds.x = textBounds.x; + } + else + { + return E_SYSTEM; + } + } + } + else + { + if (cursorBounds.x == textBounds.x + textBounds.width) + { + cursorBounds.x -= 1.0f; + } + else if (cursorBounds.x > textBounds.x + textBounds.width) + { + cursorBounds.x = textBounds.x + textBounds.width; + return E_SYSTEM; + } + + if (__pTextObject->GetBlock() == false) + { + cursorBounds.x -= 1.0f; + if (cursorBounds.x < textBounds.x) + { + cursorBounds.x = textBounds.x; + } + } + } + __calculatedCursorBounds = cursorBounds; + return E_SUCCESS; +} + +result +_EditPresenter::CalculateCursorBounds(const FloatRectangle& textBounds, FloatRectangle& cursorBounds, int rowIndex, int columnIndex) +{ + float cursorWidth = 0.0f; + float cursorHeight = 0.0f; + float cursorAbsX = 0.0f; + float cursorAbsY = 0.0f; + float cursorRelativeX = 0.0f; + float cursorRelativeY = 0.0f; + + __pTextObject->SetBounds(textBounds); + + if (__pTextObject->GetTextPositionInfoAt(rowIndex, columnIndex, cursorWidth, cursorHeight, cursorAbsX, cursorAbsY, cursorRelativeX, cursorRelativeY) != E_SUCCESS) + { + return E_SYSTEM; + } + + cursorBounds.x = cursorRelativeX; + cursorBounds.y = cursorRelativeY; + float cursorWidthValue = 0.0f; + GET_SHAPE_CONFIG(EDIT::CURSOR_WIDTH, __pEdit->GetOrientation(), cursorWidthValue); + cursorBounds.width = cursorWidthValue; + cursorBounds.height = cursorHeight; + + if (cursorBounds.y == 0.0f) + { + cursorBounds.y = __textObjectBounds.y; + } + + if (cursorBounds.height == 0.0f) + { + cursorBounds.height = __textObjectBounds.height; + } + + if (cursorBounds.height == 0.0f) + { + return E_SYSTEM; + } + + if (cursorBounds.y < textBounds.y) + { + float cursorHeightDiff = textBounds.y - cursorBounds.y; + cursorBounds.y = textBounds.y; + cursorBounds.height -= cursorHeightDiff; + } + + 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; + if (cursorHeightDiff > 0.0f) + { + cursorBounds.height -= cursorHeightDiff; + } + else + { + cursorBounds.height += cursorHeightDiff; + } + } + + if (__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE) + { + if (__pTextObject->GetBlock() == false) + { + cursorBounds.x -= 1.0f; + } + + if (cursorBounds.x > textBounds.x + textBounds.width) + { + if (cursorBounds.x <= textBounds.x + textBounds.width + cursorBounds.width) + { + cursorBounds.x = textBounds.x + textBounds.width; + } + else + { + return E_SYSTEM; + } + } + + if (cursorBounds.x < textBounds.x) + { + if (cursorBounds.x > textBounds.x - cursorBounds.width) + { + cursorBounds.x = textBounds.x; + } + else + { + return E_SYSTEM; + } + } + } + else + { + if (cursorBounds.x == textBounds.x + textBounds.width) + { + cursorBounds.x -= 1.0f; + } + else if (cursorBounds.x > textBounds.x + textBounds.width) + { + cursorBounds.x = textBounds.x + textBounds.width; + return E_SYSTEM; + } + + if (__pTextObject->GetBlock() == false) + { + cursorBounds.x -= 1.0f; + if (cursorBounds.x < textBounds.x) + { + cursorBounds.x = textBounds.x; + } + } + } + __calculatedCursorBounds = cursorBounds; + return E_SUCCESS; +} + +result +_EditPresenter::ScrollContents(float moveY) +{ + int moveLine = 0; + float firstDisplayY = 0.0f; + float effectDistance = moveY; + + float totalHeight = __pTextObject->GetTotalHeightF(); + float newFirstDisplayY = firstDisplayY = __pTextObject->GetFirstDisplayPositionYF(); + int currentCursorLine = 0; + + if (__pTextObject->GetTextLength() < 1) + { + return E_SYSTEM; + } + + if (__pScrollBar && __pScrollBar->GetScrollPosition() == 0 && effectDistance < 0.0f) + { + if (__pFlickAnimationTimer) + { + StopFlickTimer(); + } + + __pScrollBar->SetScrollVisibility(false); + + return E_SYSTEM; + } + else if (__pScrollBar && __pScrollBar->GetScrollPosition() != 0 && __pScrollBar->GetScrollPosition() == __previousScrollBarMaxPos && effectDistance > 0.0f) + { + if (__pFlickAnimationTimer) + { + StopFlickTimer(); + } + + __pScrollBar->SetScrollVisibility(false); + + return E_SYSTEM; + } + + if (__pTextObject->GetCursorIndex() == __pTextObject->GetTextLength()) + { + currentCursorLine = __pTextObject->GetTotalLineCount() - 1; + } + else + { + currentCursorLine = __pTextObject->GetLineIndexAtTextIndex(__pTextObject->GetCursorIndex()); + } + + if (currentCursorLine == -1) + { + return E_SYSTEM; + } + + if (currentCursorLine < 0) + { + currentCursorLine = 0; + } + + newFirstDisplayY += moveY; + + if (newFirstDisplayY > (totalHeight - __textObjectBounds.height)) + { + newFirstDisplayY = totalHeight - __textObjectBounds.height; + } + + if (newFirstDisplayY < 0.0f) + { + newFirstDisplayY = 0.0f; + } + + moveLine = __pTextObject->GetLineIndexAtPositionY(newFirstDisplayY); + + __pTextObject->SetFirstDisplayLineIndex(moveLine); + __pTextObject->SetFirstDisplayPositionY(newFirstDisplayY); + + __isCursorOpaque = false; + if (__isCopyPasteManagerExist) + { + __pCopyPasteManager->AdjustBounds(); + } + + return E_SUCCESS; +} + +result +_EditPresenter::ScrollContentsOnKey(const Tizen::Ui::_KeyCode keyCode) +{ + 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; + } + + if (__isCopyPasteManagerExist) + { + __pCopyPasteManager->ReleaseCopyPastePopup(); + } + + __isTouchPressed = true; + __isTouchReleaseSkipped = false; + + __pScrollEffect->previousY = _CoordinateSystemUtils::ConvertToFloat(touchInfo.GetCurrentPosition().y); + __pScrollEffect->currentY = _CoordinateSystemUtils::ConvertToFloat(touchInfo.GetCurrentPosition().y); + __pScrollEffect->previousX = _CoordinateSystemUtils::ConvertToFloat(touchInfo.GetCurrentPosition().x); + __pScrollEffect->currentX = _CoordinateSystemUtils::ConvertToFloat(touchInfo.GetCurrentPosition().x); + + __pScrollEffect->previousAbsX = _CoordinateSystemUtils::ConvertToFloat(__pEdit->GetAbsoluteBoundsF(true).x + touchInfo.GetCurrentPosition().x); + __pScrollEffect->currentAbsX = _CoordinateSystemUtils::ConvertToFloat(__pEdit->GetAbsoluteBoundsF(true).x + touchInfo.GetCurrentPosition().x); + __pScrollEffect->previousAbsY = _CoordinateSystemUtils::ConvertToFloat(__pEdit->GetAbsoluteBoundsF(true).y + touchInfo.GetCurrentPosition().y); + __pScrollEffect->currentAbsY = _CoordinateSystemUtils::ConvertToFloat(__pEdit->GetAbsoluteBoundsF(true).y + touchInfo.GetCurrentPosition().y); + + __pScrollEffect->cursorPosition = GetCursorPosition(); + + FloatRectangle absoluteEditRect = __pEdit->GetAbsoluteBoundsF(true); + + __pressedPoint = touchInfo.GetCurrentPosition(); + __pressedAbsolutePoint.x = __pressedPoint.x + absoluteEditRect.x; + __pressedAbsolutePoint.y = __pressedPoint.y + absoluteEditRect.y; + + if (IsViewModeEnabled()) + { + int cutLinkIndex = -1; + + __pTextObject->ResetAllCutLinkElementsState(); + + cutLinkIndex = __pTextObject->GetCutLinkIndexFromPositionData(__pressedPoint.x - __textObjectBounds.x, __pressedPoint.y - __textObjectBounds.y); + + if (cutLinkIndex != -1) + { + __pTextObject->ChangeCutLinkState(cutLinkIndex, true); + } + } + + 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 + { + __isClearIconPressed = true; + __pEdit->SetTouchPressThreshold(TOUCH_PRESS_THRESHOLD_IN_CLEAR_AREA); + } + } + StopFlickTimer(); + + __pEdit->Invalidate(); + + return true; +} + +bool +_EditPresenter::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + InitializeCopyPasteManager(); + + if ((&source != __pEdit) || (__pEdit->GetEnableState() == false)) + { + return false; + } + + if (__isClearIconPressed) + { + __isClearIconPressed = false; + __pEdit->SetTouchPressThreshold(__defaultTouchMoveThreshold); + } + + __isTouchPressed = false; + __isMovingCursorByTouchMove = false; + + if (__isTouchReleaseSkipped || __isTouchMoving) + { + __isTouchReleaseSkipped = false; + FadeOutScrollBar(); + __isTouchMoving = false; + } + + if (__isScrollBarVisible && __pScrollBar) + { + if (__pScrollBar->IsVisible()) + { + __pScrollBar->SetScrollVisibility(false); + } + __isScrollBarVisible = false; + } + + __isTouchMoving = false; + __pEdit->Invalidate(); + + return true; +} + +bool +_EditPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchInfo) +{ + if (__dragAndDropStarted) + { + ResetDragAndDrop(); + return true; + } + + __isTouchLongPressed = false; + + if (__isCopyPasteManagerExist) + { + if (__isTouchPressed && !__isCopyPastePopupMoving) + { + InitializeCopyPasteManager(); + if (__isClearIconPressed) + { + FloatPoint touchPoint = touchInfo.GetCurrentPosition(); + __isClearIconPressed = false; + __pEdit->SetTouchPressThreshold(__defaultTouchMoveThreshold); + 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 + { + if (!IsCurrentFocused()) + { + __pEdit->SetFocused(); + } + + FadeOutScrollBar(); // Fade out scrollbar when copypaste popup is moving. + if (__needToCreateCopyPastePopup) + { + __pCopyPasteManager->CreateCopyPastePopup(); + } + __needToCreateCopyPastePopup = false; + __pCopyPasteManager->Show(); + + __isTouchPressed = false; + __isCopyPastePopupMoving = false; + + return true; + } + } + + if ((&source != __pEdit) || (__pEdit->GetEnableState() == false)) + { + return false; + } + + int cutLinkIndex = -1; + FloatRectangle clientBounds; + FloatPoint touchPoint = touchInfo.GetCurrentPosition(); + + if (__isClearIconPressed) + { + __isClearIconPressed = false; + __pEdit->SetTouchPressThreshold(__defaultTouchMoveThreshold); + + 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(); + + __isTouchMoving = false; + if (IsCurrentFocused() || GetSearchBarFlag()) + { + return true; + } + } + } + + if (!__isCopyPasteManagerExist) + { + __isTextBlocked = false; + } + __isTouchPressed = false; + __isMovingCursorByTouchMove = false; + + if (__isTouchReleaseSkipped) + { + __isTouchReleaseSkipped = false; + FadeOutScrollBar(); + __isTouchMoving = false; + __pEdit->Invalidate(); + + return true; + } + + if (__isTouchMoving && __isInputConnectionBound == false) + { + FadeOutScrollBar(); + __isTouchMoving = false; + __isTouchReleaseSkipped = false; + __pEdit->Invalidate(); + + return true; + } + + if (IsViewModeEnabled()) + { + __pEdit->SetFocused(); + + __pTextObject->ResetAllCutLinkElementsState(); + + cutLinkIndex = __pTextObject->GetCutLinkIndexFromPositionData(touchPoint.x - __textObjectBounds.x, touchPoint.y - __textObjectBounds.y); + + if (cutLinkIndex != -1) + { + TextCutLink* pCutLinkObject = dynamic_cast(__pTextObject->GetCutLinkElementAtCutLinkElementIndex(cutLinkIndex)); + if (pCutLinkObject == null) + { + return true; + } + + String cutLinkString(pCutLinkObject->GetText()); + LinkType baseLinkType = pCutLinkObject->GetCutLinkType(); + + // Send Ui Link Event + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pEdit); + __pEdit->SendLinkEvent(cutLinkString, baseLinkType, cutLinkString); + } + } + + clientBounds = __pEdit->GetBoundsF(); + clientBounds.x = 0.0f; + clientBounds.y = 0.0f; + touchPoint = touchInfo.GetCurrentPosition(); + if (clientBounds.Contains(touchPoint)) + { + int rowIndex; + int columnIndex; + int cursorPos = GetCursorPositionAt(touchPoint, rowIndex,columnIndex); + if (cursorPos != -1) + { + if (__isInputConnectionBound == true && __isTextComposing == true) + { + __pInputConnection->FinishTextComposition(); + } + if (!__isCopyPasteManagerExist) // Copy&Paste + { + if ((__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE) == true && IsCurrentFocused() == false) + { + __isCursorChanged = true; + } + else + { + SetCursorPosition(cursorPos, rowIndex, columnIndex); + } + } + } + else + { + if ((__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE) == false) + { + if (__isInputConnectionBound == true && __isTextComposing == true) + { + __pInputConnection->FinishTextComposition(); + } + SetCursorPosition(GetTextLength()); + } + } + + FadeOutScrollBar(); + if (!__isCopyPasteManagerExist && !__pFlickAnimationTimer) + { + bool tokenEditting = false; + bool needToCreatePopup = true; + if (__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN) + { + _TokenEditPresenter* pTokenEditPresenter = dynamic_cast < _TokenEditPresenter* >(this); + if (pTokenEditPresenter) + { + if (pTokenEditPresenter->GetSelectedTokenIndex() != -1) + { + tokenEditting = true; + } + } + } + + if (!__isUSBKeyboardConnected && !__isKeypadExist && !IsViewModeEnabled() && IsKeypadEnabled()) + { + needToCreatePopup = false; + } + + if (GetTextLength() == 0 && !IsClipped()) + { + needToCreatePopup = false; + } + + if (IsViewModeEnabled()) + { + needToCreatePopup = false; + } + _AccessibilityManager* pAccessibilityManager = _AccessibilityManager::GetInstance(); + SysTryReturn(NID_UI_CTRL, pAccessibilityManager, false, E_SYSTEM, "pAccessibilityManager is null"); + if (pAccessibilityManager->IsActivated()) + { + needToCreatePopup = false; + } + + if (IsCurrentFocused() && !tokenEditting && needToCreatePopup) + { + if (__pPasswordTimer) + { + ChangePasswordToEchoCharacter(__pTextBuffer, __echoChar); + StopPasswordTimer(); + } + __pCopyPasteManager = new (std::nothrow) _EditCopyPasteManager(*__pEdit); + SysTryReturn(NID_UI_CTRL, __pCopyPasteManager != null, false, E_SYSTEM, "Unable to create _EditCopyPasteManager instance."); + __pCopyPasteManager->AddCopyPasteEventListener(*this); + UpdateComponentInformation(); + __pCopyPasteManager->DestroyCopyPasteMagnifier(); + __pCopyPasteManager->Show(); + __isCopyPasteManagerExist = true; + } + } + + if (!__isKeypadExist) + { + __isKeypadExist = CheckKeypadExist(__pEdit->GetOrientation());//double check + } + + if (cutLinkIndex < 0) + { + CheckUSBKeyboardStatus(); + + if (__isUSBKeyboardConnected) + { + if (!__isInputConnectionBound) + { + if (__pEdit->GetInputStyle() == INPUT_STYLE_OVERLAY) + { + if (IsViewModeEnabled() == false) + { + if (IsCurrentFocused()) + { + ShowKeypad(false); + } + else + { + __pEdit->SetFocused(); + } + } + } + else + { + if (__pEditModel->IsViewModeEnabled() == false) //in case of fullscreen style, should check editModel's viewMode + { + ShowFullscreenKeypad(); + } + } + } + } + else + { + if (!__isKeypadExist || !__isInputConnectionBound) + { + if (__pEdit->GetInputStyle() == INPUT_STYLE_OVERLAY) + { + if (IsViewModeEnabled() == false) + { + if (IsCurrentFocused()) + { + ShowKeypad(false); + } + else + { + __pEdit->SetFocused(); + } + } + } + else + { + if (__pEditModel->IsViewModeEnabled() == false) //in case of fullscreen style, should check editModel's viewMode + { + ShowFullscreenKeypad(); + } + } + } + else + { + SysLog(NID_UI_CTRL, "ShowKeypad is skipped[Target:%x][KeypadExist:%d][Bound:%d][Usb mode:%d]", this, __isKeypadExist, __isInputConnectionBound, __isUSBKeyboardConnected); + } + } + } + } + + if (__isScrollBarVisible && __pScrollBar) + { + if (__pScrollBar->IsVisible()) + { + __pScrollBar->SetScrollVisibility(false); + } + __isScrollBarVisible = false; + } + + __isTouchMoving = false; + __pEdit->Invalidate(); + + if (GetSearchBarFlag()) + { + return false; + } + + return true; +} + +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; + } + + FloatPoint touchPoint = touchInfo.GetCurrentPosition(); + + if (__isClearIconPressed) + { + if ((touchPoint.x < __clearIconBounds.x) || (touchPoint.x > __clearIconBounds.x + __clearIconBounds.width) + || (touchPoint.y < __clearIconBounds.y) || (touchPoint.y > __clearIconBounds.y + __clearIconBounds.height)) + { + __isClearIconPressed = false; + __pEdit->SetTouchPressThreshold(__defaultTouchMoveThreshold); + __pEdit->Invalidate(); + } + } + + if (__isCopyPasteManagerExist) + { + 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 + { + __pCopyPasteManager->Show(); + if (!__isClearIconPressed) + { + __isCopyPastePopupMoving = true; + } + } + } + + if (__isTouchMoving == false && IsHorizontalDirection(touchInfo)) + { + if (__isCopyPasteManagerExist && IsBlocked()) + { + return true; + } + + if (__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE || __pEdit->GetEditStyle() & EDIT_STYLE_TOKEN) + { + float horizontalGap = touchInfo.GetCurrentPosition().x - __pScrollEffect->currentX; + FloatRectangle lineBounds = __pTextObject->GetBoundsAtLineF(0); + float textDisplayPositionX = __pTextObject->GetFirstDisplayPositionXF(); + float newTextDisplayPositionX = 0; + + 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) + { + newTextDisplayPositionX = lineBounds.width - __textObjectBounds.width; + } + + __pScrollEffect->previousX = __pScrollEffect->currentX; + __pScrollEffect->currentX = touchInfo.GetCurrentPosition().x; + __isMovingCursorByTouchMove = true; + __isTouchReleaseSkipped = true; + StopCursorTimer(); + + __pTextObject->SetFirstDisplayPositionX(newTextDisplayPositionX); + __pEdit->Invalidate(); + return true; + } + if (horizontalGap > 0.0f && textDisplayPositionX > 0) + { + if (__pTextObject->GetAction() == TEXT_OBJECT_ACTION_TYPE_ABBREV) + { + return true; + } + + newTextDisplayPositionX = textDisplayPositionX - horizontalGap; + if (newTextDisplayPositionX < 0) + { + newTextDisplayPositionX = 0; + } + + __pScrollEffect->previousX = __pScrollEffect->currentX; + __pScrollEffect->currentX = touchInfo.GetCurrentPosition().x; + __isMovingCursorByTouchMove = true; + __isTouchReleaseSkipped = true; + StopCursorTimer(); + + __pTextObject->SetFirstDisplayPositionX(newTextDisplayPositionX); + __pEdit->Invalidate(); + return true; + } + } + else + { + int newIndex = -1; + FloatRectangle fromBounds; + FloatRectangle toBounds; + CalculateCursorBounds(__textObjectBounds, fromBounds); + newIndex = GetCursorPositionAt(touchInfo.GetCurrentPosition()); + if (newIndex != -1) + { + if (Math::Abs(newIndex - __cursorPos) > 3) + { + return true; + } + + CalculateCursorBounds(__textObjectBounds, toBounds, newIndex); + __isCursorChanged = true; + SetCursorPosition(newIndex); + + __isMovingCursorByTouchMove = true; + __isTouchReleaseSkipped = true; + + StopCursorTimer(); + MoveCursor(fromBounds, toBounds); + __pEdit->Invalidate(); + + return true; + } + } + if (__isMovingCursorByTouchMove) + { + return true; + } + } + + float totalHeight = __pTextObject->GetTotalHeightF(); + + if (__textObjectBounds.height >= totalHeight) + { + __isTouchMoving = true; + __isTouchReleaseSkipped = true; + return false; + } + + if ((touchInfo.GetCurrentPosition().y == __pScrollEffect->currentY) || + (Math::Abs(touchInfo.GetCurrentPosition().y - __pScrollEffect->previousY) < MOVE_SKIP_DECISION_RANGE)) + { + return true; + } + + __pScrollEffect->previousY = __pScrollEffect->currentY; + __pScrollEffect->currentY = touchInfo.GetCurrentPosition().y; + + __pScrollEffect->previousAbsY = __pScrollEffect->currentAbsY; + __pScrollEffect->currentAbsY = _CoordinateSystemUtils::ConvertToFloat(__pEdit->GetAbsoluteBoundsF(true).y + touchInfo.GetCurrentPosition().y); + + float moveGap = __pScrollEffect->previousAbsY - __pScrollEffect->currentAbsY; + + if (__isMovingCursorByTouchMove) + { + __isMovingCursorByTouchMove = false; + } + + if (!(__pEdit->GetEditStyle() & EDIT_STYLE_NOSCROLL) && !(__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN)) + { + if (__pScrollBar) + { + if (totalHeight > __textObjectBounds.height) + { + __pScrollBar->SetScrollVisibility(true); + } + else + { + __pScrollBar->SetScrollVisibility(false); + } + } + } + + result returnResult = ScrollContents(moveGap); + + __isCursorChanged = false; + __isTouchMoving = true; + DrawText(); + DrawScrollBar(); + + if (returnResult == E_SUCCESS) + { + return true; + } + else + { + __isTouchReleaseSkipped = true; + return false; + } +} + +bool +_EditPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) +{ + result r = E_SUCCESS; + _KeyCode keyCode = keyInfo.GetKeyCode(); + int textLength = 0; + int start = 0; + int end = 0; + 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"); + + if (__pEditModel->IsViewModeEnabled() == false) + { + if (__pEdit->GetInputStyle() == INPUT_STYLE_FULLSCREEN) + { + if (_KEY_ENTER == keyCode) + { + CheckUSBKeyboardStatus(); + if (__isUSBKeyboardConnected) + { + ShowFullscreenKeypad(); + return true; + } + } + return false; + } + } + else + { + // 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)) + { + if ((keyCode == _KEY_LEFT) || (keyCode == _KEY_RIGHT)) + { + if (!__isCopyPasteManagerExist) + { + if (__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN) + { + _TokenEditPresenter* pTokenEditPresenter = dynamic_cast < _TokenEditPresenter* >(this); + if (pTokenEditPresenter) + { + if (pTokenEditPresenter->GetSelectedTokenIndex() != -1) + { + return true; + } + } + } + SetBlockRangeWithCtrlShiftArrowkey(keyCode); + return true; + } + else + { + if (__pCopyPasteManager->IsCopyPasteSingleHandleExist()) + { + InitializeCopyPasteManager(); + SetBlockRangeWithShiftArrowkey(keyCode); + } + return true; + } + } + } + else if (__isUSBKeyboardConnected && (keyInfo.GetKeyModifier() & _KEY_MODIFIER_CTRL)) + { + switch (keyCode) + { + case _KEY_A: + FinishTextComposition(); + + if (__isCopyPasteManagerExist) + { + InitializeCopyPasteManager(); + } + + textLength = __pEdit->GetTextLength(); + if (!textLength) + { + return true; + } + __pEdit->SetBlockRange(0, textLength); + r = __pEdit->SendTextBlockEvent(0, textLength); + UpdateComponentInformation(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, true, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (!pAccessibilityManager->IsActivated()) + { + __pCopyPasteManager = new (std::nothrow) _EditCopyPasteManager(*__pEdit); + SysTryReturn(NID_UI_CTRL, __pCopyPasteManager != null, true, E_OUT_OF_MEMORY, "Memory allocation failed."); + __pCopyPasteManager->AddCopyPasteEventListener(*this); + __pCopyPasteManager->CreateCopyPastePopup(); + __pCopyPasteManager->Show(); + __isCopyPasteManagerExist = true; + } + + break; + case _KEY_C: + textLength = __pEdit->GetTextLength(); + if (!textLength) + { + return true; + } + CopyText(); + if (__isCopyPasteManagerExist) + { + InitializeCopyPasteManager(); + } + break; + case _KEY_X: + textLength = __pEdit->GetTextLength(); + if (!textLength) + { + return true; + } + CutText(); + if (__isCopyPasteManagerExist) + { + InitializeCopyPasteManager(); + } + break; + case _KEY_V: + PasteText(); + if (__isCopyPasteManagerExist) + { + InitializeCopyPasteManager(); + } + break; + case _KEY_HOME_BUTTON: + if (__isCopyPasteManagerExist) + { + InitializeCopyPasteManager(); + } + if (__cursorPos != 0) + { + SetCursorPosition(0); + } + else + { + return true; + } + break; + case _KEY_END_BUTTON: + if (__isCopyPasteManagerExist) + { + InitializeCopyPasteManager(); + } + if (__cursorPos != GetTextLength()) + { + SetCursorPosition(GetTextLength()); + } + else + { + return true; + } + break; + case _KEY_LEFT: + if (__isCopyPasteManagerExist) + { + InitializeCopyPasteManager(); + } + if (__cursorPos == 0) + { + return true; + } + GetWordPosition(__cursorPos, start, end); + if (__cursorPos != start) + { + SetCursorPosition(start); + } + else + { + GetWordPosition(start-1, start, end); + SetCursorPosition(start); + } + break; + case _KEY_RIGHT: + if (__isCopyPasteManagerExist) + { + InitializeCopyPasteManager(); + } + if (__cursorPos == GetTextLength()) + { + return true; + } + GetWordPosition(__cursorPos, start, end); + if (__cursorPos != end) + { + SetCursorPosition(end); + } + else + { + GetWordPosition(end+1, start, end); + SetCursorPosition(end); + } + break; + default: + return true; + } + if ((__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN) == false) + { + DrawText(); + } + else + { + __pEdit->Invalidate(); + } + + return true; + } + else if (__isUSBKeyboardConnected && keyInfo.GetKeyModifier() & _KEY_MODIFIER_SHIFT) + { + if (!__isCopyPasteManagerExist) + { + if ((keyCode == _KEY_LEFT) || (keyCode == _KEY_UP) || (keyCode == _KEY_DOWN) || (keyCode == _KEY_RIGHT)) + { + if (__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN) + { + _TokenEditPresenter* pTokenEditPresenter = dynamic_cast < _TokenEditPresenter* >(this); + if (pTokenEditPresenter) + { + if (pTokenEditPresenter->GetSelectedTokenIndex() != -1) + { + return true; + } + } + } + SetBlockRangeWithShiftArrowkey(keyCode); + return true; + } + else + { + return false; + } + } + else + { + if (__pCopyPasteManager->IsCopyPasteSingleHandleExist()) + { + InitializeCopyPasteManager(); + SetBlockRangeWithShiftArrowkey(keyCode); + return true; + } + } + + switch (keyCode) + { + case _KEY_LEFT: + __pCopyPasteManager->MoveHandler(_EditCopyPasteManager::HANDLER_MOVE_TYPE_LEFT); + break; + case _KEY_UP: + __pCopyPasteManager->MoveHandler(_EditCopyPasteManager::HANDLER_MOVE_TYPE_UP); + break; + case _KEY_DOWN: + __pCopyPasteManager->MoveHandler(_EditCopyPasteManager::HANDLER_MOVE_TYPE_DOWN); + break; + case _KEY_RIGHT: + __pCopyPasteManager->MoveHandler(_EditCopyPasteManager::HANDLER_MOVE_TYPE_RIGHT); + break; + default: + return false; + } + return true; + } + else if (_KEY_END_BUTTON == keyCode || _KEY_HOME_BUTTON == keyCode) + { + if (__isCopyPasteManagerExist) + { + InitializeCopyPasteManager(); + } + + FinishTextComposition(); + + int curCursorLine = __pTextObject->GetLineIndexAtTextIndex(__pTextObject->GetCursorIndex()); + int firstTextIndex = __pTextObject->GetFirstTextIndexAt(curCursorLine); + + if (_KEY_HOME_BUTTON == keyCode) + { + if(__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE) + { + if (__cursorPos != 0) + { + SetCursorPosition(0); + } + else + { + return true; + } + } + else + { + SetCursorPosition(firstTextIndex); + } + } + else if (_KEY_END_BUTTON == keyCode) + { + if(__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE) + { + if (__cursorPos != GetTextLength()) + { + SetCursorPosition(GetTextLength()); + } + else + { + return true; + } + } + else + { + int totalLine = __pTextObject->GetTotalLineCount(); + if (curCursorLine < totalLine - 1) + { + int nextLinefirstTextIndex = __pTextObject->GetFirstTextIndexAt(curCursorLine+1); + SetCursorPosition(nextLinefirstTextIndex-1); + } + else + { + if (__cursorPos != GetTextLength()) + { + SetCursorPosition(GetTextLength()); + } + else + { + return true; + } + } + } + } + DrawText(); + } + else if (_KEY_ENTER == keyCode || _KEY_NUMPAD_ENTER == keyCode) + { + if (__isInputConnectionBound != false && __isTextComposing != false) + { + return false; + } + else + { + if (IsKeypadActionEnabled()) + { + char enterText[2] = {'\n', }; + OnTextCommitted(String(enterText)); + } + + return true; + } + } + else if (_KEY_BACKSPACE == keyCode) + { + if (__isTextComposing == false) + { + if (__isCopyPasteManagerExist) + { + if (IsBlocked()) + { + __pCopyPasteManager->SetTextBlockReleaseFlag(false); + } + InitializeCopyPasteManager(); + } + + OnSurroundingTextDeleted(-1, 1); + if (AdjustRTLTextAlignment(EDIT_TEXT_TYPE_INPUT) == true) + { + __pTextObject->Compose(); + __pEdit->Invalidate(); + } + ScrollPanelToCursorPosition(); + return true; + } + } + else if ((keyInfo.GetKeyModifier() & _KEY_LOCK_NUM) && (_KEY_NUMPAD_4 == keyCode || _KEY_NUMPAD_6 == keyCode || _KEY_NUMPAD_8 == keyCode || _KEY_NUMPAD_2 == keyCode)) + { + return false; + } + else if (_KEY_LEFT == keyCode || _KEY_NUMPAD_4 == keyCode) + { + if (__isCopyPasteManagerExist) + { + InitializeCopyPasteManager(); + } + + FinishTextComposition(); + + if (__cursorPos != 0) + { + int startPosition = -1; + int endPosition = -1; + GetTextImageRangeAt(__cursorPos-1, startPosition, endPosition); + if (endPosition > -1 && startPosition >= 0 && startPosition < __cursorPos-1) + { + SetCursorPosition(startPosition); + } + else + { + SetCursorPosition(__cursorPos-1); + } + + if (__pParentPanel) + { + panelAbsBounds = __pParentPanel->GetAbsoluteBoundsF(true); + GetCursorBounds(true, absCursorBounds); + + if (!panelAbsBounds.Contains(FloatPoint(absCursorBounds.x, absCursorBounds.y + absCursorBounds.height))) + { + ScrollPanelToCursorPosition(); + } + } + + if ((__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN) == false) + { + DrawText(); + } + else + { + __pEdit->Invalidate(); + } + } + else + { + return false; + } + return true; + } + else if (_KEY_UP == keyCode || _KEY_NUMPAD_8 == keyCode) + { + if (__isCopyPasteManagerExist) + { + InitializeCopyPasteManager(); + } + + FinishTextComposition(); + + if (GetTextLength() == 0) + { + 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) + { + int offset = __cursorPos - __pTextObject->GetFirstTextIndexAt(curCursorLine); + int firstTextIndex = __pTextObject->GetFirstTextIndexAt(curCursorLine-1); + int newCursorPosition = offset + firstTextIndex; + int textLength = __pTextObject->GetTextLengthAt(curCursorLine-1); + if (offset newCursorPosition && startPosition < newCursorPosition) + { + newCursorPosition = endPosition; + } + SetCursorPosition(newCursorPosition); + } + else + { + wchar_t ch = '\0'; + __pTextString->GetCharAt(firstTextIndex+textLength - 1, ch); + if (ch == L'\n') + { + SetCursorPosition(firstTextIndex+textLength - 1); + } + else + { + SetCursorPosition(firstTextIndex+textLength); + } + } + + if (__pParentPanel) + { + panelAbsBounds = __pParentPanel->GetAbsoluteBoundsF(true); + GetCursorBounds(true, absCursorBounds); + if (!panelAbsBounds.Contains(FloatPoint(absCursorBounds.x, absCursorBounds.y))) + { + ScrollPanelToCursorPosition(); + } + } + if ((__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN) == false) + { + DrawText(); + } + } + else + { + return false; + } + return true; + } + else if (_KEY_DOWN == keyCode || _KEY_NUMPAD_2 == keyCode) + { + if (__isCopyPasteManagerExist) + { + InitializeCopyPasteManager(); + } + + 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) + { + int offset = __cursorPos - __pTextObject->GetFirstTextIndexAt(curCursorLine); + int firstTextIndex = __pTextObject->GetFirstTextIndexAt(curCursorLine+1); + int newCursorPosition = offset + firstTextIndex; + int textLength = __pTextObject->GetTextLengthAt(curCursorLine+1); + + if (offset newCursorPosition && startPosition < newCursorPosition) + { + newCursorPosition = endPosition; + } + SetCursorPosition(newCursorPosition); + } + else + { + wchar_t ch = '\0'; + __pTextString->GetCharAt(firstTextIndex+textLength - 1, ch); + if (ch == L'\n') + { + if (textLength == 0) + { + SetCursorPosition(firstTextIndex); + } + else + { + SetCursorPosition(firstTextIndex+textLength - 1); + } + } + else + { + SetCursorPosition(firstTextIndex+textLength); + } + } + + if (__pParentPanel) + { + panelAbsBounds = __pParentPanel->GetAbsoluteBoundsF(true); + GetCursorBounds(true, absCursorBounds); + + if (!panelAbsBounds.Contains(FloatPoint(absCursorBounds.x, absCursorBounds.y + absCursorBounds.height))) + { + ScrollPanelToCursorPosition(); + } + } + if ((__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN) == false) + { + DrawText(); + } + } + else + { + return false; + } + return true; + } + else if (_KEY_RIGHT == keyCode || _KEY_NUMPAD_6 == keyCode) + { + if (__isCopyPasteManagerExist) + { + InitializeCopyPasteManager(); + } + + FinishTextComposition(); + + if (__cursorPos == GetTextLength()) + { + return false; + } + + if (__cursorPos < GetTextLength()) + { + int startPosition = -1; + int endPosition = -1; + GetTextImageRangeAt(__cursorPos, startPosition, endPosition); + + if (endPosition > __cursorPos+1 && startPosition > -1) + { + SetCursorPosition(endPosition); + } + else + { + SetCursorPosition(__cursorPos+1); + } + + if (__pParentPanel) + { + panelAbsBounds = __pParentPanel->GetAbsoluteBoundsF(true); + GetCursorBounds(true, absCursorBounds); + + if (!panelAbsBounds.Contains(FloatPoint(absCursorBounds.x, absCursorBounds.y + absCursorBounds.height))) + { + ScrollPanelToCursorPosition(); + } + } + + if ((__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN) == false) + { + DrawText(); + } + else + { + __pEdit->Invalidate(); + } + } + return true; + } + else if (_KEY_DELETE == keyCode) + { + if ((__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN) == false) + { + if (!GetTextLength()) + { + return true; + } + } + + if (__isCopyPasteManagerExist) + { + if (IsBlocked() == true) + { + int start = 0; + int end = 0; + GetBlockRange(start, end); + DeleteText(start, end); + ReleaseTextBlock(); + } + else + { + int cursorPosition = GetCursorPosition(); + DeleteText(cursorPosition, cursorPosition+1); + } + + InitializeCopyPasteManager(); + } + else + { + FinishTextComposition(); + + int cursorPosition = GetCursorPosition(); + if ((__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN) == false) + { + DeleteText(cursorPosition, cursorPosition+1); + } + else + { + 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_CLIPBOARD== keyCode) + { + __pClipboard->ShowPopup(CLIPBOARD_DATA_TYPE_TEXT, *__pEdit, true); + __clipboardConnected = true; + __pEdit->AddClipboardShowTriggerEventListener(); + return true; + } + else if (_KEY_TAB == keyCode) + { + if (__isCopyPasteManagerExist) + { + InitializeCopyPasteManager(); + if ((__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN) == false) + { + DrawText(); + } + else + { + __pEdit->Invalidate(); + } + } + return false; + } + else if (__composingTextLength > 0 && GetTextLength() >= __limitLength) + { + return true; + } + + return false; +} + +bool +_EditPresenter::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) +{ + _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(); + } + else if (__textBlockMoving) + { + _AccessibilityManager* pAccessibilityManager = _AccessibilityManager::GetInstance(); + SysTryReturn(NID_UI_CTRL, pAccessibilityManager, false, E_SYSTEM, "pAccessibilityManager is null"); + if (!pAccessibilityManager->IsActivated()) + { + __pCopyPasteManager = new (std::nothrow) _EditCopyPasteManager(*__pEdit); + SysTryReturn(NID_UI_CTRL, __pCopyPasteManager != null, true, E_OUT_OF_MEMORY, "Memory allocation failed."); + __pCopyPasteManager->AddCopyPasteEventListener(*this); + __pCopyPasteManager->CreateCopyPastePopup(); + __pCopyPasteManager->Show(); + __isCopyPasteManagerExist = true; + } + __textBlockMoving = false; + } + return true; + } + + return false; +} + +void +_EditPresenter::OnClipboardPopupClosed(const ClipboardItem* pClipboardItem) +{ + int start = 0; + int end = 0; + int total = 0; + String userString; + String filteredString; + + if (!pClipboardItem && IsBlocked()) + { + ReleaseTextBlock(); + } + + if (__isCopyPasteManagerExist) + { + if (IsBlocked()) + { + __pCopyPasteManager->SetTextBlockReleaseFlag(false); + } + InitializeCopyPasteManager(); + } + + 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] Unable to get the clipboarditem instance."); + + String str; + if (pClipboardItem->GetDataType() == CLIPBOARD_DATA_TYPE_HTML) + { + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + if (pEcoreEvas) + { + str = pEcoreEvas->ConvertMarkupToUtf8(*pClipString); + pClipString = &str; + } + if (str.IsEmpty()) + { + if (IsBlocked()) + { + ReleaseTextBlock(); + } + delete pClipboardItem; + return; + } + } + + int currentLength = GetTextLength(); + String* pSubString = null; + result r = E_SUCCESS; + + filteredString = *pClipString; + + if (__pTextFilter) + { + if(__pTextFilter->ValidatePastedText(*pClipString, userString)) + { + filteredString = userString; + SysLog(NID_UI_CTRL, "ClipString was changed by User"); + } + } + else if (IsUnsupportedChracterExist(GetKeypadStyle(), *pClipString) == true) + { + return; + } + + if (IsBlocked()) + { + GetBlockRange(start, end); + total = currentLength - (end - start) + filteredString.GetLength(); + if (total > __limitLength) + { + DeleteText(start, end); + ReleaseTextBlock(); + pSubString = new String(__limitLength - currentLength + (end - start)); + 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()); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + delete pSubString; + } + else + { + DeleteText(start, end); + ReleaseTextBlock(); + r = InsertTextAt(__cursorPos, filteredString.GetPointer()); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + else if (currentLength + filteredString.GetLength() > __limitLength) + { + if (__limitLength == currentLength) + { + 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, "Memory allocation failed."); + + filteredString.SubString(0, __limitLength - currentLength, *pSubString); + r = InsertTextAt(__cursorPos, pSubString->GetPointer()); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + delete pSubString; + } + else + { + r = InsertTextAt(__cursorPos, filteredString.GetPointer()); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + ScrollPanelToCursorPosition(); + + __pEdit->SendTextEvent(CORE_TEXT_EVENT_CHANGED); + + __pEdit->Invalidate(); + + delete pClipboardItem; + + return; + +CATCH: + delete pClipboardItem; + delete pSubString; + return; +} + +bool +_EditPresenter::OnLongPressGestureDetected(void) +{ + SysLog(NID_UI_CTRL, "OnLongPressGestureDetected"); + + if (__isClearIconPressed) + { + return true; + } + + __isTouchPressed = false; + + _AccessibilityManager* pAccessibilityManager = _AccessibilityManager::GetInstance(); + SysTryReturn(NID_UI_CTRL, pAccessibilityManager, false, E_SYSTEM, "pAccessibilityManager is null"); + if (pAccessibilityManager->IsActivated()) + { + SysLog(NID_UI_CTRL, "Copy&Paste is not created (ScreenReader is activated)"); + 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) + { + if (IsViewModeEnabled()) + { + __pEdit->SetFocused(); + } + else + { + return true; + } + } + + FloatRectangle cursorBounds; + InitializeCopyPasteManager(); + bool isClipped = IsClipped(); + if (isClipped || GetTextLength()) + { + if (!GetTextLength() && IsViewModeEnabled()) + { + return true; + } + + if (!isClipped && (__pEdit->GetEditStyle() & EDIT_STYLE_PASSWORD)) + { + return true; + } + + FinishTextComposition(); + + if (__pPasswordTimer) + { + ChangePasswordToEchoCharacter(__pTextBuffer, __echoChar); + StopPasswordTimer(); + } + + cursorPos = GetCursorPositionAt(__pressedPoint, rowIndex, columnIndex); + if (cursorPos != -1) + { + SetCursorPosition(cursorPos); + } + else + { + cursorPos = GetTextLength(); + SetCursorPosition(cursorPos); + } + ScrollPanelToCursorPosition(); + GetCursorBounds(true, cursorBounds); + + __pCopyPasteManager = new (std::nothrow) _EditCopyPasteManager(*__pEdit); + SysTryReturn(NID_UI_CTRL, __pCopyPasteManager != null, false, E_SYSTEM, "Unable to create _EditCopyPasteManager instance."); + __pCopyPasteManager->AddCopyPasteEventListener(*this); + __pCopyPasteManager->Show(); + __isCopyPasteManagerExist = true; + __isTouchLongPressed = true; + __needToCreateCopyPastePopup = true; + + } + + return true; +} + +bool +_EditPresenter::OnTapGestureDetected(void) +{ + SysLog(NID_UI_CTRL, "OnTapGestureDetected"); + + _AccessibilityManager* pAccessibilityManager = _AccessibilityManager::GetInstance(); + SysTryReturn(NID_UI_CTRL, pAccessibilityManager, false, E_SYSTEM, "pAccessibilityManager is null"); + if (pAccessibilityManager->IsActivated()) + { + SysLog(NID_UI_CTRL, "Copy&Paste is not created (ScreenReader is activated)"); + return false; + } + + if (IsCurrentFocused() == false) + { + return true; + } + + if (!__isUSBKeyboardConnected) + { + if (__isKeypadShowing) + return true; + } + + __isTouchPressed = false; + InitializeCopyPasteManager(); + + if (GetTextLength() > 0) + { + FloatRectangle cursorBounds; + int start = -1; + int end = -1; + int cursorPos = GetCursorPositionAt(__pressedPoint); + + if (cursorPos == -1) + { + cursorPos = GetTextLength(); + } + else + { + int curCursorLine = __pTextObject->GetLineIndexAtTextIndex(cursorPos); + int firstTextIndex = __pTextObject->GetFirstTextIndexAt(curCursorLine); + if (cursorPos != 0 && cursorPos == firstTextIndex && __rowCursorIndex != curCursorLine) + { + cursorPos--; + } + } + + FinishTextComposition(); + + GetWordPosition(cursorPos, start, end); + SetBlockRange(start, end); + ScrollPanelToCursorPosition(); + GetCursorBounds(true, cursorBounds); + + __pCopyPasteManager = new (std::nothrow) _EditCopyPasteManager(*__pEdit); + SysTryReturn(NID_UI_CTRL, __pCopyPasteManager != null, false, E_SYSTEM, "Unable to create _EditCopyPasteManager instance."); + __pCopyPasteManager->AddCopyPasteEventListener(*this); + __pCopyPasteManager->Show(); + __isCopyPasteManagerExist = true; + __needToCreateCopyPastePopup = true; + + __pEdit->Draw(); + } + + return true; +} + +HorizontalAlignment +_EditPresenter::GetTextAlignment(void) const +{ + return __horizontalAlignment; +} + +int +_EditPresenter::GetLineSpacing(void) const +{ + int linePixelGap = -1; + + linePixelGap = __pTextObject->GetLineSpace(); + + return linePixelGap; +} + +float +_EditPresenter::GetLineSpacingF(void) const +{ + float linePixelGap = -1.0; + + linePixelGap = __pTextObject->GetLineSpaceF(); + + return linePixelGap; +} + +void +_EditPresenter::GetBlockRange(int& start, int& end) const +{ + if (__isTextBlocked == false || __cursorPos == __blockStartPos) + { + return; + } + + if (__cursorPos > __blockStartPos) + { + start = __blockStartPos; + end = __cursorPos; + } + else + { + start = __cursorPos; + end = __blockStartPos; + } + + return; +} + +result +_EditPresenter::SetBlockRange(int start, int end) +{ + result r = E_SUCCESS; + + r = SetCursorPosition(start); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = BeginTextBlock(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = SetCursorPosition(end); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +_EditPresenter::SetBlockRange(int start, int end, int leftRowIndex, int leftColumnIndex, int rightRowIndex, int rightColumnIndex) +{ + result r = E_SUCCESS; + + if (leftRowIndex == -1 && leftColumnIndex == -1) + { + r = SetCursorPosition(start); + } + else + { + r = SetCursorPosition(start, leftRowIndex, leftColumnIndex); + } + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = BeginTextBlock(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (rightRowIndex == -1 && rightColumnIndex == -1) + { + r = SetCursorPosition(end); + } + else + { + r = SetCursorPosition(end, rightRowIndex, rightColumnIndex); + } + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +_EditPresenter::BeginTextBlock(void) +{ + if (__pEdit->GetEditStyle() & EDIT_STYLE_PASSWORD) + return E_SYSTEM; + + __isTextBlocked = true; + __blockStartPos = __cursorPos; + + return E_SUCCESS; +} + +result +_EditPresenter::ReleaseTextBlock(void) +{ + if (__pEdit->GetEditStyle() & EDIT_STYLE_PASSWORD) + return E_SYSTEM; + + + if (__isTextBlocked == false) + { + return E_SYSTEM; + } + + __isTextBlocked = false; + + return E_SUCCESS; +} + +bool +_EditPresenter::IsBlocked(void) const +{ + return __isTextBlocked; +} + +result +_EditPresenter::CopyText(void) +{ + if (__pEdit->GetEditStyle() & EDIT_STYLE_PASSWORD) + return E_SYSTEM; + + result r = E_SUCCESS; + + _Clipboard* pClipBoard = _Clipboard::GetInstance(); + SysTryReturnResult(NID_UI_CTRL, pClipBoard != null, E_SYSTEM, "Unable to get the clipboard instance."); + + int start = 0; + int end = 0; + GetBlockRange(start, end); + + String blockString(GetText(start, end - 1)); + + _ClipboardItem* pClipboardItem = _ClipboardItem::CreateInstanceN(CLIPBOARD_DATA_TYPE_TEXT, blockString); + SysTryReturnResult(NID_UI_CTRL, pClipboardItem != null, E_SYSTEM, "Unable to get the clipboarditem instance."); + + r = pClipBoard->CopyItem(*pClipboardItem); + + delete pClipboardItem; + + _Text::TextElement* pStartTextElement = __pTextObject->GetElementAtTextIndex(start); + _Text::TextElement* pEndTextElement = __pTextObject->GetElementAtTextIndex(end-1); + + if (pStartTextElement == null || pEndTextElement == null) + { + return r; + } + + const int startIndex = __pTextObject->GetElementIndexOf(*pStartTextElement); + const int endIndex = __pTextObject->GetElementIndexOf(*pEndTextElement); + + for (int index = startIndex; index <= endIndex; index++) + { + _Text::TextElement* pTextElement = __pTextObject->GetElementAtElementIndex(index); + TextElementType objectType = pTextElement->GetType(); + if (objectType != TEXT_ELEMENT_TYPE_IMAGE) + { + continue; + } + TextImage* pImageText = null; + pImageText = dynamic_cast < TextImage* >(pTextElement); + if (pImageText == null) + { + continue; + } + const Bitmap * pImage = pImageText->GetBitmap(); + SysTryReturnResult(NID_UI_CTRL, pImage != null, E_SYSTEM, "Unable to get the bitmap from textobject."); + + _ClipboardItem* pClipboardImageItem = _ClipboardItem::CreateInstanceN(CLIPBOARD_DATA_TYPE_IMAGE, *pImage); + SysTryReturnResult(NID_UI_CTRL, pClipboardImageItem != null, E_SYSTEM, "Unable to get the clipboardImageitem instance."); + + r = pClipBoard->CopyItem(*pClipboardImageItem); + + delete pClipboardImageItem; + } + + return r; +} + +result +_EditPresenter::CutText(void) +{ + if (__pEdit->GetEditStyle() & EDIT_STYLE_PASSWORD) + return E_SYSTEM; + + result r = E_SUCCESS; + + r = CopyText(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + int start = 0; + int end = 0; + GetBlockRange(start, end); + DeleteText(start, end); + ReleaseTextBlock(); + + __pEdit->SendTextEvent(CORE_TEXT_EVENT_CHANGED); + + return r; +} + +result +_EditPresenter::PasteText(void) +{ + result r = E_SUCCESS; + int currentLength = GetTextLength(); + String* pSubString = null; + int start = 0; + int end = 0; + 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|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) + { + if(__pTextFilter->ValidatePastedText(*pClipString, userString)) + { + filteredString = userString; + SysLog(NID_UI_CTRL, "ClipString was changed by User"); + } + } + else if (IsUnsupportedChracterExist(GetKeypadStyle(), *pClipString) == true) + { + return E_SYSTEM; + } + + if (IsBlocked()) + { + GetBlockRange(start, end); + total = currentLength - (end - start) + filteredString.GetLength(); + if (total > __limitLength) + { + DeleteText(start, end); + ReleaseTextBlock(); + pSubString = new String(__limitLength - currentLength + (end - start)); + 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()); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + delete pSubString; + } + else + { + DeleteText(start, end); + ReleaseTextBlock(); + r = InsertTextAt(__cursorPos, filteredString.GetPointer()); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + else if (currentLength + filteredString.GetLength() > __limitLength) + { + if (__limitLength == currentLength) + { + 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, "Memory allocation failed."); + + filteredString.SubString(0, __limitLength - currentLength, *pSubString); + r = InsertTextAt(__cursorPos, pSubString->GetPointer()); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + delete pSubString; + } + else + { + r = InsertTextAt(__cursorPos, filteredString.GetPointer()); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + delete pClipboardItem; + + ReplaceTextIntoPasswordHyphenString(); + if (__pEdit->GetEditStyle() & EDIT_STYLE_PASSWORD) + { + __pTextObject->NotifyTextChanged(__pTextBuffer, 0, __pTextString->GetLength(), 0); + } + + ScrollPanelToCursorPosition(); + + __pEdit->SendTextEvent(CORE_TEXT_EVENT_CHANGED); + + return r; + +CATCH: + delete pClipboardItem; + delete pSubString; + return r; +} + +result +_EditPresenter::RemoveTextBlock(void) +{ + if (__pEdit->GetEditStyle() & EDIT_STYLE_PASSWORD) + return E_SYSTEM; + + + if (!__isTextBlocked) + { + return E_OBJ_NOT_FOUND; + } + + int start = 0; + int end = 0; + + GetBlockRange(start, end); + if (start == end) + { + return E_OBJ_NOT_FOUND; + } + + result r = DeleteText(start, end); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __isTextBlocked = false; + + InitializeCopyPasteManager(); + + return r; +} + +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|CLIPBOARD_DATA_TYPE_HTML); + if (pClipboardItem == null) + { + SetLastResult(E_SUCCESS); + return false; + } + + 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 +_EditPresenter::SetTextAlignment(HorizontalAlignment alignment) +{ + result r = E_SUCCESS; + + int textAlign = TEXT_OBJECT_ALIGNMENT_LEFT; + + if (alignment == ALIGNMENT_CENTER) + { + textAlign = TEXT_OBJECT_ALIGNMENT_CENTER; + } + else if (alignment == ALIGNMENT_RIGHT) + { + textAlign = TEXT_OBJECT_ALIGNMENT_RIGHT; + } + + if (__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE) + { + r = __pTextObject->SetAlignment(textAlign | TEXT_OBJECT_ALIGNMENT_MIDDLE); + } + else + { + r = __pTextObject->SetAlignment(textAlign | TEXT_OBJECT_ALIGNMENT_TOP); + } + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "Unable to set text alignment."); + __horizontalAlignment = alignment; + + return r; +} + +result +_EditPresenter::SetLineSpacing(int linePixelGap) +{ + result r = E_SUCCESS; + + __pTextObject->SetLineSpace(linePixelGap); + + return r; +} + +result +_EditPresenter::SetLineSpacing(float linePixelGap) +{ + result r = E_SUCCESS; + + __pTextObject->SetLineSpace(linePixelGap); + + return r; +} + +String +_EditPresenter::GetText(int start, int end) const +{ + String tempString; + + if (start != 0 && end != -1) + { + SysTryReturn(NID_UI_CTRL, (start <= end), tempString, E_SYSTEM, "[E_SYSTEM] The invalid argument(start = %d, end = %d) is given.", start, end); + int textLength = GetTextLength(); + SysTryReturn(NID_UI_CTRL, (start < textLength && end < textLength), tempString, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The invalid argument(start = %d, end = %d) is given.", start, end); + } + + if (__pEdit->GetEditStyle() & EDIT_STYLE_PASSWORD) + { + int length = end - start + 1; + __pTextString->SubString(start, length, tempString); + + return tempString; + } + + 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++) + { + _Text::TextElement* pTextElement = __pTextObject->GetElementAtElementIndex(index); + TextSimple* pSimpleText = null; + if (pTextElement == null) + { + break; + } + + TextElementType objectType = pTextElement->GetType(); + if (objectType == TEXT_ELEMENT_TYPE_TEXT || objectType == TEXT_ELEMENT_TYPE_CUTLINK) + { + pSimpleText = dynamic_cast < TextSimple* >(pTextElement); + if (pSimpleText == null) + { + continue; + } + + } + else + { + continue; + } + + int elementOffset = static_cast < int >(pTextElement->GetValue(SET_TEXT_OFFSET)); + int elementLength = pTextElement->GetTextLength(); + + if (objectType == TEXT_ELEMENT_TYPE_CUTLINK) + { + elementOffset = GetLinkElementOffsetInTextBuffer(index); + if (elementOffset < 0) + { + continue; + } + } + + if (end < elementOffset) + { + break; + } + if (start >= elementOffset + elementLength) + { + continue; + } + + if (elementLength == 0) + { + continue; + } + elementString.Clear(); + elementString.Append(pSimpleText->GetText()); + elementString.SetLength(elementLength); + if (end < elementOffset + elementLength - 1) + { + int removingStartIndex = end + 1; + elementString.Remove(removingStartIndex - elementOffset, elementOffset + elementLength - removingStartIndex); + } + if (start > elementOffset) + { + elementString.Remove(0, start - elementOffset); + } + resultString.Append(elementString); + } + + return resultString; +} + +String +_EditPresenter::GetText(void) const +{ + return GetText(0, GetTextLength()-1); +} + +result +_EditPresenter::SetText(const String& text) +{ + result r = E_SUCCESS; + + InitializeCopyPasteManager(); + + int length = text.GetLength(); + + if (__pEdit->IsViewModeEnabled()) + { + if (__limitLength <= length) + { + String tempString = GetText(); + SetTextLimitLength(length * 2); + } + } + else + { + SysTryReturnResult(NID_UI_CTRL, length <= __limitLength, E_INVALID_ARG, "The Invalid argument is given."); + } + + FinishTextComposition(); + + __pTextString->Clear(); + __pTextString->Append(text); + + wchar_t* tempString = const_cast(text.GetPointer()); + for (int i = 0; i < length; i++) + { + __pTextBuffer[i] = tempString[i]; + } + __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->Compose(); + + ReplaceTextIntoPasswordHyphenString(); + + __pTextObject->NotifyTextChanged(__pTextBuffer, 0, __pTextString->GetLength(), 0); + + SetCursorPosition(length); + + if (__pEdit->GetEditStyle() & EDIT_STYLE_FLEXIBLE) + { + AdjustFlexibleHeight(); + } + + if (__pEdit->IsViewModeEnabled()) + { + __isCutLinkParserEnabled = true; + } + + __pEdit->UpdateAccessibilityElement(EDIT_ACCESSIBILITY_ELEMENT_TYPE_TEXT); + + return r; +} + +int +_EditPresenter::GetRemainingLength(void) const +{ + return __limitLength - __pTextObject->GetTextLength(); +} + +result +_EditPresenter::SetCursorPosition(int position) +{ + result r = E_SUCCESS; + int length = GetTextLength(); + + SysTryReturnResult(NID_UI_CTRL, -1 < position && position <= length, E_INVALID_ARG, "Invalid argument is given."); + + if (__isTouchMoving == false) + { + __isCursorChanged = true; + } + + r = __pTextObject->SetCursorIndex(position); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "Failed to set cursor position"); + + if (__cursorPos != position) + { + __pTextObject->ConvertToRowColumn(position, __rowCursorIndex, __columnCursorIndex); + __cursorPos = position; + } + + return r; +} + +result +_EditPresenter::SetCursorPosition(int position,int rowIndex, int columnIndex) +{ + result r = E_SUCCESS; + int length = GetTextLength(); + + SysTryReturnResult(NID_UI_CTRL, -1 < position && position <= length, E_INVALID_ARG, "Invalid argument is given."); + + if (__isTouchMoving == false) + { + __isCursorChanged = true; + } + + r = __pTextObject->SetCursorIndex(position); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "Failed to set cursor position"); + + __rowCursorIndex = rowIndex; + __columnCursorIndex = columnIndex; + + __cursorPos = position; + + return r; +} + +int +_EditPresenter::GetCursorPosition(void) const +{ + return __cursorPos; +} + +int +_EditPresenter::GetTextLength(void) const +{ + return __pTextObject->GetTextLength(); +} + +result +_EditPresenter::InsertTextAt(int index, const String& text) +{ + result r = E_SUCCESS; + + int currentLength = GetTextLength(); + int length = text.GetLength(); + int totalLength = currentLength + length; + String insertText = text; + int i = 0; + + SysTryReturnResult(NID_UI_CTRL, index >= 0 && index <= currentLength, E_OUT_OF_RANGE, "The Invalid argument is given."); + + if (__pEdit->IsViewModeEnabled()) + { + if (__limitLength <= totalLength) + { + String tempString = GetText(); + SetTextLimitLength(totalLength * 2); + SetText(tempString); + } + } + else + { + SysTryReturnResult(NID_UI_CTRL, totalLength <= __limitLength, E_MAX_EXCEEDED, "The Invalid argument is given."); + } + + if (__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN) + { + while (insertText.Contains(String(L"\n"))) + { + for (i = 0; i < length; i++) + { + wchar_t ch; + insertText.GetCharAt(i, ch); + if (ch == '\n') + { + insertText.Remove(i, 1); + length = insertText.GetLength(); + + if (length == 0) + { + return E_SUCCESS; + } + break; + } + } + } + } + + + r = __pTextString->Insert(insertText, index); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + wchar_t* pTempString = const_cast(insertText.GetPointer()); + wchar_t pOriginalString[currentLength - index]; + + for (int i = 0; i < currentLength - index; i++) + { + pOriginalString[i] = __pTextBuffer[index + i]; + } + pOriginalString[currentLength - index] = 0; + + for (int i = 0; i < length; i++) + { + __pTextBuffer[i + index] = pTempString[i]; + } + + for (int i = 0; i < currentLength - index; i++) + { + __pTextBuffer[i + index + length] = pOriginalString[i]; + } + __pTextBuffer[totalLength] = 0; + + __pTextObject->InputText(index); + __pTextObject->SetRange(index, length); + r = __pTextObject->NotifyTextChanged(__pTextBuffer, 0, __pTextString->GetLength(), length); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "Failed to set length"); + + __pTextObject->Compose(); + + if (__isTextBlocked == true) + { + DeleteText(__blockStartPos, __cursorPos); + ReleaseTextBlock(); + + SetCursorPosition(__cursorPos + length); + } + else + { + SetCursorPosition(index + length); + } + + if (__pEdit->GetEditStyle() & EDIT_STYLE_FLEXIBLE) + { + AdjustFlexibleHeight(); + } + + __isCursorChanged = true; + + if (__pEdit->IsViewModeEnabled()) + { + __isCutLinkParserEnabled = true; + } + + __pEdit->UpdateAccessibilityElement(EDIT_ACCESSIBILITY_ELEMENT_TYPE_TEXT); + + return r; +} + +result +_EditPresenter::AppendText(const String& text) +{ + result r = E_SUCCESS; + + int currentLength = GetTextLength(); + int length = text.GetLength(); + int totalLength = currentLength + length; + + if (__pEdit->IsViewModeEnabled()) + { + if (__limitLength <= totalLength) + { + String tempString = GetText(); + SetTextLimitLength(totalLength * 2); + SetText(tempString); + } + } + else + { + SysTryReturnResult(NID_UI_CTRL, totalLength <= __limitLength, E_MAX_EXCEEDED, "The Invalid argument is given."); + } + + r = __pTextString->Append(text); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + wchar_t* pTempString = const_cast(text.GetPointer()); + + for (int i = 0; i < length; i++) + { + __pTextBuffer[i + currentLength] = pTempString[i]; + } + __pTextBuffer[totalLength] = 0; + + __pTextObject->SetRange(currentLength, length); + r = __pTextObject->NotifyTextChanged(__pTextBuffer, 0, __pTextString->GetLength(), length); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "Failed to set length"); + + __pTextObject->Compose(); + + if (!__isTextBlocked) + { + SetCursorPosition(totalLength); + } + + if (__pEdit->GetEditStyle() & EDIT_STYLE_FLEXIBLE) + { + AdjustFlexibleHeight(); + } + + if (__pEdit->IsViewModeEnabled()) + { + __isCutLinkParserEnabled = true; + } + + __pEdit->UpdateAccessibilityElement(EDIT_ACCESSIBILITY_ELEMENT_TYPE_TEXT); + + return r; +} + +result +_EditPresenter::AppendCharacter(const Character& character) +{ + result r = E_SUCCESS; + + r = AppendText(character.ToString()); + + return r; +} + +result +_EditPresenter::ClearText(void) +{ + InitializeCopyPasteManager(); + + result r = E_SUCCESS; + + FinishTextComposition(); + + int textLength = GetTextLength(); + + if (textLength == 0) + { + return r; + } + + r = DeleteText(0, textLength); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pEdit->UpdateAccessibilityElement(EDIT_ACCESSIBILITY_ELEMENT_TYPE_CLEAR_ICON); + + return r; +} + +result +_EditPresenter::DeleteCharacterAt(int index) +{ + result r = E_SUCCESS; + + int length = -1; + length = GetTextLength(); + + SysTryReturnResult(NID_UI_CTRL, index >= 0, E_INVALID_ARG, "Specified index is negative."); + SysTryReturnResult(NID_UI_CTRL, index < length, E_OUT_OF_RANGE, "Specified index is outside the range."); + + r = DeleteText(index, index+1); + return r; +} + +result +_EditPresenter::DeleteText(int startCursorPosition, int endCursorPosition) +{ + result r = E_SUCCESS; + + int length = GetTextLength(); + + SysTryReturnResult(NID_UI_CTRL, -1 < startCursorPosition && startCursorPosition < endCursorPosition, E_INVALID_ARG, "Invalid argument is given."); + SysTryReturnResult(NID_UI_CTRL, startCursorPosition < endCursorPosition && endCursorPosition <= length, E_INVALID_ARG, "Invalid argument is given."); + + _Text::TextElement* pFirstTextElement = __pTextObject->GetElementAtTextIndex(startCursorPosition); + const TextSimple* pFirstSimpleText = dynamic_cast (pFirstTextElement); + if (pFirstSimpleText != null && pFirstSimpleText->GetBitmap() != null) + { + if (pFirstSimpleText->GetTextOffset() < startCursorPosition) + { + startCursorPosition = pFirstSimpleText->GetTextOffset(); + } + } + _Text::TextElement* pLastTextElement = __pTextObject->GetElementAtTextIndex(endCursorPosition - 1); + const TextSimple* pLastSimpleText = dynamic_cast (pLastTextElement); + if (pLastSimpleText != null && pLastSimpleText->GetBitmap() != null) + { + if ((pLastSimpleText->GetTextOffset() + pLastSimpleText->GetTextLength()) > endCursorPosition) + { + endCursorPosition = pLastSimpleText->GetTextOffset() + pLastSimpleText->GetTextLength(); + } + } + + r = __pTextString->Remove(startCursorPosition, endCursorPosition - startCursorPosition); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + int currentLength = __pTextString->GetLength(); + + for (int i = startCursorPosition; i < length; i++) + { + if ((i + length - currentLength) >= length) + { + break; + } + __pTextBuffer[i] = __pTextBuffer[i + (length - currentLength)]; + } + + for (int i = currentLength; i < length; i++) + { + __pTextBuffer[i] = 0; + } + + AdjustRTLTextAlignment(EDIT_TEXT_TYPE_INPUT); + + __pTextObject->RemoveText(startCursorPosition); + __pTextObject->SetRange(startCursorPosition, endCursorPosition - startCursorPosition); + r = __pTextObject->NotifyTextChanged(__pTextBuffer, 0, currentLength, -(endCursorPosition - startCursorPosition)); + r = __pTextObject->Compose(); + + SetCursorPosition(startCursorPosition); + + if (__pEdit->GetEditStyle() & EDIT_STYLE_FLEXIBLE) + { + AdjustFlexibleHeight(); + } + + __pEdit->UpdateAccessibilityElement(EDIT_ACCESSIBILITY_ELEMENT_TYPE_TEXT); + + return r; +} + +void +_EditPresenter::GetCurrentTextRange(int& start, int& end) const +{ + int currentLength = __pTextString->GetLength(); + + start = __cursorPos; + while (start > 0) + { + if (__pTextBuffer[--start] == TEXT_OBJ_CHARACTER) + { + start++; + break; + } + } + + end = __cursorPos; + while (end < currentLength && __pTextBuffer[end] != TEXT_OBJ_CHARACTER) + { + end++; + } + + return; +} + +int +_EditPresenter::GetTextLimitLength(void) const +{ + return __limitLength; +} + +result +_EditPresenter::SetTextLimitLength(int limitLength) +{ + result r = E_SUCCESS; + + SysTryReturnResult(NID_UI_CTRL, (limitLength > 0), E_INVALID_ARG, "The invalid limit length is given."); + + String tempString = GetText(); + + int textLength = tempString.GetLength(); + SysTryReturnResult(NID_UI_CTRL, (limitLength >= textLength), E_INVALID_ARG, "The invalid argument is given."); + + TextSimple* pSimpleText = null; + + if (limitLength == GetTextLimitLength()) + { + return E_SUCCESS; + } + + wchar_t* pTempBuffer = new (std::nothrow) wchar_t[limitLength + 1]; + SysTryReturnResult(NID_UI_CTRL, pTempBuffer, E_OUT_OF_MEMORY, "Memory allocation failed."); + + for (int i = 0; i < textLength; i++) + { + pTempBuffer[i] = __pTextBuffer[i]; + } + + for (int i = textLength; i < limitLength; i++) + { + pTempBuffer[i] = 0; + } + + pTempBuffer[limitLength] = '\0'; + + __pTextString->Clear(); + __pTextString->Append(tempString); + if (__pTextBuffer) + { + delete[] __pTextBuffer; + __pTextBuffer = null; + } + __pTextBuffer = pTempBuffer; + + __pTextObject->RemoveAll(); + pSimpleText = new (std::nothrow)TextSimple(__pTextBuffer, textLength, TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL, __pFont); + 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)); + + SetCursorPosition(textLength); + + __limitLength = limitLength; + + return r; + +CATCH: + delete pSimpleText; + pSimpleText = null; + return r; +} + +result +_EditPresenter::InsertCharacterAt(int index, const Character& character) +{ + result r = E_SUCCESS; + + r = InsertTextAt(index, character.ToString()); + + return r; +} + +result +_EditPresenter::SetModel(const _EditModel& editModel) +{ + if (__pEditModel) + { + delete __pEditModel; + __pEditModel = null; + } + + __pEditModel = const_cast<_EditModel*>(&editModel); + + return E_SUCCESS; +} + +result +_EditPresenter::SetAutoLinkMask(unsigned long autoLinks) +{ + __isCutLinkParserEnabled = true; + return __pEditModel->SetAutoLinkMask(autoLinks); +} + +unsigned long +_EditPresenter::GetAutoLinkMask(void) const +{ + return __pEditModel->GetAutoLinkMask(); +} + +bool +_EditPresenter::IsViewModeEnabled(bool internal) const +{ + if (__pEdit->GetInputStyle() == INPUT_STYLE_OVERLAY) + { + return __pEditModel->IsViewModeEnabled(); + } + else + { + if (internal) + { + return true; + } + else + { + return __pEditModel->IsViewModeEnabled(); + } + } +} + +result +_EditPresenter::SetViewModeEnabled(bool enable) +{ + if (!enable && __pEditModel->IsViewModeEnabled() && IsCurrentFocused() && (__pEdit->GetInputStyle() == INPUT_STYLE_OVERLAY)) + { + __pEdit->SetFocused(false); + } + + int editStyle = __pEdit->GetEditStyle(); + + if (enable) + { + editStyle = editStyle | EDIT_STYLE_VIEWER; + } + else + { + editStyle = editStyle & (~EDIT_STYLE_VIEWER); + } + __pEdit->SetEditStyle(editStyle); + + if (enable) + { + __pEdit->SetCursorPosition(0); + + if (__pInputConnection && __isInputConnectionBound) + { + HideKeypad(true); + } + } + + if (__pEdit->GetInputStyle() == INPUT_STYLE_OVERLAY) + { + __isCursorDisabled = enable; + __pTextObject->SetCutLinkViewMode(enable); + } + + if (__pInputConnection) + { + if (enable) + { + __pInputConnection->SetKeyEventSkipped(true); + } + else + { + if (IsKeypadEnabled()) + { + __pInputConnection->SetKeyEventSkipped(false); + } + } + } + + return __pEditModel->SetViewModeEnabled(enable); +} + +result +_EditPresenter::SetKeypadActionEnabled(bool enable) +{ + + result r = E_SUCCESS; + + r = __pInputConnection->SetInputPanelActionEnabled(enable); + + if (r == E_SUCCESS) + __pEditModel->SetKeypadActionEnabled(enable); + + return r; +} + +bool +_EditPresenter::IsKeypadActionEnabled(void) +{ + bool enable = true; + bool enableIc = true; + + enable = __pEditModel->IsKeypadActionEnabled(); + enableIc = __pInputConnection->IsInputPanelActionEnabled(); + + return enable; +} + +CoreKeypadAction +_EditPresenter::GetKeypadAction(void) const +{ + return __pEditModel->GetKeypadAction(); +} + +InputPanelAction +_EditPresenter::ConvertKeypadAction(CoreKeypadAction keypadAction) +{ + InputPanelAction inputPanelAction = INPUT_PANEL_ACTION_ENTER; + + switch (keypadAction) + { + case CORE_KEYPAD_ACTION_ENTER: + inputPanelAction = INPUT_PANEL_ACTION_ENTER; + break; + case CORE_KEYPAD_ACTION_GO: + inputPanelAction = INPUT_PANEL_ACTION_GO; + break; + case CORE_KEYPAD_ACTION_NEXT: + inputPanelAction = INPUT_PANEL_ACTION_NEXT; + break; + case CORE_KEYPAD_ACTION_SEND: + inputPanelAction = INPUT_PANEL_ACTION_SEND; + break; + case CORE_KEYPAD_ACTION_SEARCH: + inputPanelAction = INPUT_PANEL_ACTION_SEARCH; + break; + case CORE_KEYPAD_ACTION_LOGIN: + inputPanelAction = INPUT_PANEL_ACTION_LOGIN; + break; + case CORE_KEYPAD_ACTION_SIGN_IN: + inputPanelAction = INPUT_PANEL_ACTION_SIGN_IN; + break; + case CORE_KEYPAD_ACTION_JOIN: + inputPanelAction = INPUT_PANEL_ACTION_JOIN; + break; + case CORE_KEYPAD_ACTION_DONE: + inputPanelAction = INPUT_PANEL_ACTION_DONE; + break; + default: + break; + } + + return inputPanelAction; +} + + +result +_EditPresenter::SetKeypadAction(CoreKeypadAction keypadAction) +{ + return __pEditModel->SetKeypadAction(keypadAction); +} + +void +_EditPresenter::SetKeypadEnabled(bool enable) +{ + if (!enable && IsKeypadEnabled()) + { + CheckUSBKeyboardStatus(); + //hide keypad + if (!__isUSBKeyboardConnected && __isInputConnectionBound) + { + HideKeypad(false); + } + } + + __pEditModel->SetKeypadEnabled(enable); + + if (__pInputConnection) + { + if (!enable) + { + __pInputConnection->SetKeyEventSkipped(true); + } + else + { + if (!__pEditModel->IsViewModeEnabled()) + { + __pInputConnection->SetKeyEventSkipped(false); + } + } + } + + return; +} + +void +_EditPresenter::SetKeypadEventSkipped(bool skip) +{ + if (skip) + { + __pInputConnection->SetKeyEventSkipped(true); + } + else + { + if (__pEdit->IsEnabled() && !__pEditModel->IsViewModeEnabled() && IsKeypadEnabled()) + { + __pInputConnection->SetKeyEventSkipped(false); + } + } +} + +bool +_EditPresenter::IsKeypadEnabled(void) +{ + bool enable = true; + + if (__pEdit->IsEnabled()) + { + enable = __pEditModel->IsKeypadEnabled(); + } + else + { + enable = false; + } + + return enable; +} + +result +_EditPresenter::SetCurrentLanguage(LanguageCode languageCode) +{ + result r = E_SUCCESS; + + if (__pInputConnection && __isInputConnectionBound) + { + r = __pInputConnection->SetInputPanelLanguage(languageCode); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + r = __pEditModel->SetInitialKeypadLanguage(LANGUAGE_INVALID); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + r = __pEditModel->SetInitialKeypadLanguage(languageCode); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + r = __pEditModel->SetCurrentLanguage(languageCode); + + return r; +} + +result +_EditPresenter::GetCurrentLanguage(LanguageCode& language) const +{ + result r = E_SUCCESS; + if (__pInputConnection && __isInputConnectionBound) + { + language = __pInputConnection->GetInputPanelLanguage(); + r = __pEditModel->SetCurrentLanguage(language); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + return r; + } + return __pEditModel->GetCurrentLanguage(language); +} + +void +_EditPresenter::SetLowerCaseModeEnabled(bool enable) +{ + __pEditModel->SetLowerCaseModeEnabled(enable); + + return; +} + +bool +_EditPresenter::IsLowerCaseModeEnabled(void) const +{ + return __pEditModel->IsLowerCaseModeEnabled(); +} + +KeypadStyle +_EditPresenter::GetKeypadStyle(void) const +{ + return __pEditModel->GetKeypadStyle(); +} + +result +_EditPresenter::SetKeypadStyle(KeypadStyle keypadStyle) +{ + + bool textPredictionEnabled = __pEditModel->IsTextPredictionEnabled(); + + InputPanelStyle inputPanelStyle = INPUT_PANEL_STYLE_NORMAL; + + switch (keypadStyle) + { + case KEYPAD_STYLE_NORMAL: + if (__isKeypadNormalNumberStyleEnabled) + { + inputPanelStyle = INPUT_PANEL_STYLE_NUMBER; + } + else + { + inputPanelStyle = INPUT_PANEL_STYLE_NORMAL; + } + break; + case KEYPAD_STYLE_PASSWORD: + inputPanelStyle = INPUT_PANEL_STYLE_NORMAL; + if (__pInputConnection) + { + __pInputConnection->SetPasswordMode(true); + } + break; + case KEYPAD_STYLE_EMAIL: + inputPanelStyle = INPUT_PANEL_STYLE_EMAIL; + break; + case KEYPAD_STYLE_URL: + inputPanelStyle = INPUT_PANEL_STYLE_URL; + break; + case KEYPAD_STYLE_NUMBER: + inputPanelStyle = INPUT_PANEL_STYLE_NUMBER_ONLY; + textPredictionEnabled = false; + break; + case KEYPAD_STYLE_PHONE_NUMBER: + inputPanelStyle = INPUT_PANEL_STYLE_PHONE_NUMBER; + textPredictionEnabled = false; + break; + case KEYPAD_STYLE_IP_V4: + inputPanelStyle = INPUT_PANEL_STYLE_IP; + textPredictionEnabled = false; + break; + default: + break; + } + + if (__pInputConnection && __isInputConnectionBound) + { + __pInputConnection->SetTextPredictionEnabled(textPredictionEnabled); + __pInputConnection->SetInputPanelStyle(inputPanelStyle); + } + + __pEditModel->SetTextPredictionEnabled(textPredictionEnabled); + + return __pEditModel->SetKeypadStyle(keypadStyle); +} + +result +_EditPresenter::SetKeypadNormalNumberStyle(bool enable) +{ + __isKeypadNormalNumberStyleEnabled = enable; + return SetKeypadStyle(__pEditModel->GetKeypadStyle()); +} + +bool +_EditPresenter::IsTextPredictionEnabled(void) const +{ + return __pEditModel->IsTextPredictionEnabled(); +} + +result +_EditPresenter::SetTextPredictionEnabled(bool enable) +{ + KeypadStyle keypadStyle = __pEditModel->GetKeypadStyle(); + + if (keypadStyle == KEYPAD_STYLE_NUMBER ||keypadStyle == KEYPAD_STYLE_PHONE_NUMBER || + keypadStyle == KEYPAD_STYLE_IP_V4) + return E_UNSUPPORTED_OPERATION; + + if (__pInputConnection && __isInputConnectionBound) + { + __pInputConnection->SetTextPredictionEnabled(enable); + } + + return __pEditModel->SetTextPredictionEnabled(enable); +} + +result +_EditPresenter::InsertTextAtCursorPosition(const String& text) +{ + return InsertTextAt(__cursorPos, text); +} + +result +_EditPresenter::InsertTextAt(int position, const String& text, const Bitmap& textImage) +{ + result r = E_SUCCESS; + + int currentLength = GetTextLength(); + int length = text.GetLength(); + int totalLength = currentLength + length; + + SysTryReturnResult(NID_UI_CTRL, position >= 0 && position <= currentLength, E_OUT_OF_RANGE, "The given position is out-of-range."); + + if ((__pEdit->GetEditStyle() & EDIT_STYLE_FLEXIBLE) || (__pEdit->IsViewModeEnabled())) + { + if (__limitLength <= totalLength) + { + String backupString = GetText(); + SetTextLimitLength(totalLength * 2); + SetText(backupString); + } + } + else + { + SysTryReturnResult(NID_UI_CTRL, totalLength <= __limitLength, E_MAX_EXCEEDED, "The text exceeds the limitation length."); + } + + FinishTextComposition(); + + r = __pTextString->Insert(text, position); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + wchar_t* pInsertString = const_cast(text.GetPointer()); + + if (currentLength > position) + { + wchar_t pOriginalString[currentLength - position]; + + for (int i = 0; i < currentLength - position; i++) + { + pOriginalString[i] = __pTextBuffer[position + i]; + } + pOriginalString[currentLength - position] = 0; + + for (int i = 0; i < length; i++) + { + __pTextBuffer[i + position] = pInsertString[i]; + } + + for (int i = 0; i < currentLength - position; i++) + { + __pTextBuffer[i + position + length] = pOriginalString[i]; + } + } + else + { + for (int i = 0; i < length; i++) + { + __pTextBuffer[i + position] = pInsertString[i]; + } + } + + __pTextBuffer[totalLength] = 0; + + 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, "Memory allocation failed."); + + pSimpleText->ChangeTextOffset(__pTextBuffer, position); + pSimpleText->SetBitmap((Bitmap&)textImage); + __pTextObject->InsertElementAt(position, *pSimpleText); + __pTextObject->ChangeTextOffset(__pTextBuffer, position+pSimpleText->GetTextLength(), pSimpleText->GetTextLength()); + __pTextObject->Compose(); + + if (__isTextBlocked == true) + { + DeleteText(__blockStartPos, __cursorPos); + ReleaseTextBlock(); + + SetCursorPosition(__cursorPos + length); + } + else + { + SetCursorPosition(position + length); + } + + if (__pEdit->GetEditStyle() & EDIT_STYLE_FLEXIBLE) + { + AdjustFlexibleHeight(); + } + + __isCursorChanged = true; + __pEdit->UpdateAccessibilityElement(EDIT_ACCESSIBILITY_ELEMENT_TYPE_TEXT); + return r; +} + +result +_EditPresenter::DeleteCharacterAtCursorPosition(void) +{ + return DeleteCharacterAt(__cursorPos); +} + +bool +_EditPresenter::IsFocused(void) const +{ + return __pEdit->IsFocused(); +} + +bool +_EditPresenter::IsInternalFocused(void) const +{ + return __pEdit->IsInternalFocused(); +} + +_VisualElement* +_EditPresenter::GetTextVisualElement(void) +{ + return __pTextVisualElement; +} + +void +_EditPresenter::SetControlInitialBounds(FloatRectangle initBounds) +{ + __initialBounds = initBounds; +} + +void +_EditPresenter::SetControlInitialPosition(FloatPoint initPosition) +{ + __initialBounds.x = initPosition.x; + __initialBounds.y = initPosition.y; +} + +bool +_EditPresenter::IsUpdateInitialBounds(void) +{ + return __updateInitialBounds; +} + +bool +_EditPresenter::OnFocusGained(void) +{ + __pEdit->SetTouchPressThreshold(__defaultTouchMoveThreshold); + + if (!__pParentForm) + { + __pParentForm = GetParentForm(); + + if (!__pParentForm && __isKeypadCommandButtonVisible) + { + __isKeypadCommandButtonVisible = false; + } + } + + if (__isAutoShrinkEnabled) + { + float flexibleHeight = CalculateFlexibleHeightF(); + FloatRectangle initialRect = GetInitialBoundsF(); + initialRect.height = flexibleHeight; + + SetFlexBounds(initialRect); + } + + if (!__pTextVisualElement) + { + result r = E_SUCCESS; + __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)); + + __pTextVisualElement->SetSurfaceOpaque(false); + __pTextVisualElement->SetImplicitAnimationEnabled(false); + + __pTextVisualElement->SetShowState(true); + + _VisualElement* pEditVisualElement = __pEdit->GetVisualElement(); + SysTryCatch(NID_UI_CTRL, pEditVisualElement, , r = E_SYSTEM, "[E_SYSTEM] Unable to get root visual element."); + + pEditVisualElement->AttachChild(*__pTextVisualElement); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to add child", GetErrorMessage(r)); + } + + if (__pEdit->GetEnableState() == false) + { + return false; + } + + __isCursorOpaque = true; + + if (__isInputConnectionBound == false && __isInitialized) + { + if (IsViewModeEnabled() == false) + { + if (__pEdit->GetInputStyle() == INPUT_STYLE_OVERLAY) + { + ShowKeypad(false); + } + else + { + ShowFullscreenKeypad(); + } + } + + __pEdit->Invalidate(); + } + + return true; +CATCH: + __pTextVisualElement->Destroy(); + __pTextVisualElement = null; + + return false; +} + +bool +_EditPresenter::OnNotifiedN(IList* pArgs) +{ + String showKeypad(L"ShowKeypad"); + String showCopyPaste(L"ShowCopyPaste"); + + String* pType = dynamic_cast (pArgs->GetAt(0)); + + if (pType) + { + if (*pType == showKeypad) + { + if (__pEdit->GetInputStyle() == INPUT_STYLE_OVERLAY) + { + ShowKeypad(false); + } + else + { + ShowFullscreenKeypad(); + } + } + else if (*pType == showCopyPaste) + { + if (__pCopyPasteManager) + { + __pCopyPasteManager->CreateHandle(); + __pCopyPasteManager->DestroyCopyPasteMagnifier(); + if (__needToCreateCopyPastePopup) + { + if (__pParentPanel) + { + if (!__pParentPanel->IsScrollAnimationRunning()) + { + __pCopyPasteManager->CreateCopyPastePopup(); + if (__pCopyPasteManager->GetCopyPastePopup()) + { + __needToCreateCopyPastePopup = false; + } + } + } + else + { + __pCopyPasteManager->CreateCopyPastePopup(); + if (__pCopyPasteManager->GetCopyPastePopup()) + { + __needToCreateCopyPastePopup = false; + } + } + } + __pCopyPasteManager->Show(); + } + } + pArgs->RemoveAll(true); + delete pArgs; + + return true; + } + + return false; +} + +void +_EditPresenter::OnFrameActivated(const _Frame& source) +{ + _ControlManager* pControlManager = _ControlManager::GetInstance(); + if (pControlManager) + { + _Control* pControl = pControlManager->GetFocusControl(); + if (pControl != __pEdit) + { + return; + } + } + + if (__isInputConnectionBound == false && __isInitialized) + { + if (IsViewModeEnabled() == false) + { + CheckUSBKeyboardStatus(); + + if (__pEdit->GetInputStyle() == INPUT_STYLE_OVERLAY) + { + ShowKeypad(false); + } + } + } + + return; +} + +void +_EditPresenter::OnFrameDeactivated(const _Frame& source) +{ + return; +} + +void +_EditPresenter::OnFrameMinimized(const _Frame& source) +{ + return; +} + +void +_EditPresenter::OnFrameRestored(const _Frame& source) +{ + return; +} + +void +_EditPresenter::ChangeToUnbindState(bool removeFocus) +{ + if(__latestBoundedContext != (unsigned int)this)//context is already changed. + { + __isKeypadHiding = false; + } + + if (IsCopyPasteManagerExist()) + { + InitializeCopyPasteManager(); + } + + if (__isInputConnectionBound) + { + SysLog(NID_UI_CTRL, "keypad & clipboard is closed by external request!!"); + HideKeypad(removeFocus); + + if (__isClipboardExist) + { + if (__pClipboard) + { + OnClipboardPopupClosed(); + __pClipboard->HidePopup(); + } + } + } + + if (__isKeypadHiding) + { + if (__pParentForm && !__pParentForm->IsVisible()) //Unbind by Scene Change + { + if (__isCopyPasteManagerExist) + { + InitializeCopyPasteManager(); + __pTextObject->SetBlock(false); + __isTextBlocked = false; + } + + if (__pCommandButton && __isKeypadCommandButtonVisible) + { + SetFooterVisible(true); + __pCommandButton->SetVisibleState(false); + __pCommandButton->Invalidate(); + } + + __isInputConnectionBound = false; + + AdjustParentPanelHeight(true); + SysLog(NID_UI_CTRL, "Form deflate RESET!!!"); + __pParentForm->DeflateClientRectHeight(0); + + if (!__pEdit->IsFullScreenKeypadEdit()) + { + if (__pParentForm) + { + __pParentForm->Draw(); + } + } + + __pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_CLOSED); + __pEdit->DetachScrollPanelEvent(); + + __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_CLOSE); + __resizedByKeypadHide = true; + __latestBoundedContext = null; + } + } + + return; +} + +bool +_EditPresenter::OnFocusLost(void) +{ + + if (__dragAndDropStarted) + { + ResetDragAndDrop(); + } + + if (!__pEdit->IsDestroyed()) + { + InitializeCopyPasteManager(); + __pEdit->SetTouchPressThreshold(__defaultTouchMoveThreshold); + } + + if (__isAutoShrinkEnabled) + { + FloatRectangle intialWindowBounds = GetInitialBoundsF(); + SetFlexBounds(intialWindowBounds); + } + + if (__pTextVisualElement) + { + __pTextVisualElement->Destroy(); + __pTextVisualElement = null; + } + + if (__pEdit == null) + { + return false; + } + + if (__isClipboardExist) + { + if (__pClipboard) + { + OnClipboardPopupClosed(); + __pClipboard->HidePopup(); + } + } + + if (__isInputConnectionBound) + { + + if (__pScrollBar && !(__pEdit->GetEditStyle() & EDIT_STYLE_NOSCROLL)) + { + __pScrollBar->SetScrollVisibility(false); + } + + __isCursorOpaque = false; + __isTouchMoving = false; + __isTouchReleaseSkipped = false; + + HideKeypad(); + } + + ReplaceTextIntoPasswordHyphenString(); + + if (__pCursorTimer) + { + __pCursorTimer->Cancel(); + delete __pCursorTimer; + __pCursorTimer = null; + } + + __pEdit->Invalidate(); + + return true; +} + +EditStatus +_EditPresenter::GetCurrentStatus(void) +{ + EditStatus editState = EDIT_STATUS_NORMAL; + + if (__pEdit->IsEnabled()) + { + if (IsCurrentFocused()) + { + editState = EDIT_STATUS_HIGHLIGHTED; + } + else if (__isTouchPressed) + { + editState = EDIT_STATUS_PRESSED; + } + } + else + { + editState = EDIT_STATUS_DISABLED; + } + + return editState; +} + +_VisualElement* +_EditPresenter::GetCursorVisualElement(void) const +{ + return __pCursorVisualElement; +} + +void +_EditPresenter::SetMaxLineCount(int maxLineCount) +{ + __pEditModel->SetMaxLineCount(maxLineCount); + + return; +} + +int +_EditPresenter::GetMaxLineCount(void) const +{ + return __pEditModel->GetMaxLineCount(); +} + +result +_EditPresenter::UpdateComponentInformation(void) +{ + result r = E_SUCCESS; + + if (__isCursorChanged == false) + { + return r; + } + + bool IsTextAlignmentChanged = AdjustRTLTextAlignment(EDIT_TEXT_TYPE_INPUT); + bool setFirstDisplayLine = true; + if (!((__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE) || (__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN))) + { + float firstDisplayY = __pTextObject->GetFirstDisplayPositionYF(); + float totalHeight = __pTextObject->GetTotalHeightF(); + FloatRectangle displayBounds = __pTextObject->GetBoundsF(); + if (totalHeight >= displayBounds.height) + { + float textGapFromBottom = displayBounds.height - (totalHeight - firstDisplayY); + if (textGapFromBottom > 0) + { + ScrollText(-textGapFromBottom); + } + } + else + { + if (firstDisplayY > 0) + { + ScrollText(-firstDisplayY); + } + } + + FloatRectangle absCursorBounds(0.0f, 0.0f, 0.0f, 0.0f); + CalculateAbsoluteCursorBounds(__cursorPos, absCursorBounds); + setFirstDisplayLine = (IsContained(absCursorBounds) == false); + } + + if (setFirstDisplayLine || IsTextAlignmentChanged) + { + if (__pTextObject->IsChanged()) + { + __pTextObject->Compose(); + } + __pTextObject->SetFirstDisplayLineIndexFromTextIndex(__cursorPos); + } + + __pTextObject->SetCursorIndex(__cursorPos); + + __isCursorChanged = false; + + return r; +} + +void +_EditPresenter::ScrollText(float distance) +{ + float newFirstDisplayY = __pTextObject->GetFirstDisplayPositionYF(); + newFirstDisplayY += distance; + + int moveLine = __pTextObject->GetLineIndexAtPositionY(newFirstDisplayY); + + __pTextObject->SetFirstDisplayLineIndex(moveLine); + __pTextObject->SetFirstDisplayPositionY(newFirstDisplayY); + + return; +} + +bool +_EditPresenter::IsContained(FloatRectangle& paramRect) const +{ + FloatRectangle absBounds = __pEdit->GetAbsoluteBoundsF(true); + + if ((paramRect.x < absBounds.x) || + (paramRect.y < absBounds.y) || + ((paramRect.x + paramRect.width) > (absBounds.x + absBounds.width)) || + ((paramRect.y + paramRect.height) > (absBounds.y + absBounds.height))) + { + return false; + } + + return true; +} + +result +_EditPresenter::CalculateAbsoluteCursorBounds(int index, FloatRectangle& absCursorBounds, bool clipCursorHeight) +{ + float cursorAbsX = 0.0f; + float cursorAbsY = 0.0f; + float cursorWidth = 0.0f; + float cursorHeight = 0.0f; + float cursorRelativeX = 0.0f; + float cursorRelativeY = 0.0f; + float cursorHeightDiff = 0.0f; + + FloatRectangle absBounds = __pEdit->GetAbsoluteBoundsF(true); + + __pTextObject->SetBounds(GetTextBoundsF()); + if (index != __cursorPos) + { + if (__pTextObject->GetTextPositionInfoAt(index, cursorWidth, cursorHeight, cursorAbsX, cursorAbsY, cursorRelativeX, cursorRelativeY) != E_SUCCESS) + { + return E_SYSTEM; + } + } + else + { + if (__pTextObject->GetTextPositionInfoAt(__rowCursorIndex, __columnCursorIndex, cursorWidth, cursorHeight, cursorAbsX, cursorAbsY, cursorRelativeX, cursorRelativeY) != E_SUCCESS) + { + return E_SYSTEM; + } + } + + absCursorBounds.x = absBounds.x + cursorRelativeX; + + if (__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE) + { + FloatRectangle tempBounds; + GetCursorBounds(true, tempBounds); + absCursorBounds.y = tempBounds.y; + } + else + { + absCursorBounds.y = absBounds.y + cursorRelativeY; + } + + GET_SHAPE_CONFIG(EDIT::CURSOR_WIDTH, __pEdit->GetOrientation(), cursorWidth); + + absCursorBounds.width = cursorWidth; + + cursorHeightDiff = cursorHeight - __calculatedCursorBounds.height; + + if (cursorHeight > 0.0f) + { + 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 + { + if (__calculatedCursorBounds.height > 0) + { + absCursorBounds.height = __calculatedCursorBounds.height; + } + else + { + absCursorBounds.height = cursorHeight; + } + } + } + else + { + absCursorBounds.height = __pTextObject->GetLineHeightAtF(0); + } + + return E_SUCCESS; +} + +result +_EditPresenter::CalculateAbsoluteCursorBounds(int rowIndex, int columnIndex, FloatRectangle& absCursorBounds, bool clipCursorHeight) +{ + float cursorAbsX = 0.0f; + float cursorAbsY = 0.0f; + float cursorWidth = 0.0f; + float cursorHeight = 0.0f; + float cursorRelativeX = 0.0f; + float cursorRelativeY = 0.0f; + float cursorHeightDiff = 0.0f; + + FloatRectangle absBounds = __pEdit->GetAbsoluteBoundsF(true); + + __pTextObject->SetBounds(GetTextBoundsF()); + + if (__pTextObject->GetTextPositionInfoAt(rowIndex, columnIndex, cursorWidth, cursorHeight, cursorAbsX, cursorAbsY, cursorRelativeX, cursorRelativeY) != E_SUCCESS) + { + return E_SYSTEM; + } + + absCursorBounds.x = absBounds.x + cursorRelativeX; + + if (__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE) + { + FloatRectangle tempBounds; + GetCursorBounds(true, tempBounds); + absCursorBounds.y = tempBounds.y; + } + else + { + absCursorBounds.y = absBounds.y + cursorRelativeY; + } + + GET_SHAPE_CONFIG(EDIT::CURSOR_WIDTH, __pEdit->GetOrientation(), cursorWidth); + + absCursorBounds.width = cursorWidth; + + cursorHeightDiff = cursorHeight - __calculatedCursorBounds.height; + + if (cursorHeight > 0.0f) + { + 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 + { + if (__calculatedCursorBounds.height > 0) + { + absCursorBounds.height = __calculatedCursorBounds.height; + } + else + { + absCursorBounds.height = cursorHeight; + } + } + } + else + { + absCursorBounds.height = __pTextObject->GetLineHeightAtF(0); + } + + return E_SUCCESS; +} + +result +_EditPresenter::GetCursorBounds(bool isAbsRect, FloatRectangle& cursorBounds) +{ + if (__isInitialized == false) + { + return E_SYSTEM; + } + + CalculateCursorBounds(GetTextBoundsF(), cursorBounds); + + if (isAbsRect) + { + FloatRectangle absBounds = __pEdit->GetAbsoluteBoundsF(true); + cursorBounds.x += absBounds.x; + cursorBounds.y += absBounds.y; + } + + return E_SUCCESS; +} + + +void +_EditPresenter::SetCursorDisabled(bool disabled) +{ + __isCursorDisabled = disabled; + + return; +} + +bool +_EditPresenter::IsGuideTextActivated(void) const +{ + if (__pGuideTextObject == null) + { + return false; + } + + if (GetGuideText().IsEmpty()) + { + return false; + } + + if (__pTextObject && GetTextLength() > 0) + { + return false; + } + + return true; +} + +_Button* +_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] Memory allocation failed."); + + float textSize = 0.0f; + + r = pButton->SetActionId(actionId); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pButton->SetText(text); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GET_SHAPE_CONFIG(FOOTER::FOOTER_ITEM_FONT_SIZE, __pEdit->GetOrientation(), textSize); + if (!IsFailed(r)) + { + r = pButton->SetTextSize(textSize); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + return pButton; + +CATCH: + delete pButton; + + return null; +} + +result +_EditPresenter::SetKeypadCommandButton(const FloatRectangle& bounds) +{ + // This function must be changed after _ toolbar completes their float conversion works + result r = E_SUCCESS; + Bitmap* pNormalBackgroundBitmap = null; + Bitmap* pReplacementColorBackgroundBitmap = null; + String leftButtonText; + String rightButtonText; + _Control* pParent = null; + Color commandBackgroundColor; + + if (__pCommandButton) + { + __pCommandButton->SetResizable(true); + __pCommandButton->SetMovable(true); + SysLog(NID_UI_CTRL, "Command position changed!!! bounds(%f, %f, %f, %f)", bounds.x, bounds.y, bounds.width, bounds.height); + r = __pCommandButton->SetBounds(bounds); + + __pCommandButton->SetResizable(false); + __pCommandButton->SetMovable(false); + + return r; + } + + if (__pParentForm == false) + { + __isKeypadCommandButtonVisible = false; + return r; + } + + __pCommandButton = _Toolbar::CreateToolbarN(false); + 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)); + + GET_BITMAP_CONFIG_N(FOOTER::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pNormalBackgroundBitmap); + if (pNormalBackgroundBitmap) + { + GET_COLOR_CONFIG(FOOTER::BG_NORMAL, commandBackgroundColor); + pReplacementColorBackgroundBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pNormalBackgroundBitmap, Color::GetColor(COLOR_ID_MAGENTA), commandBackgroundColor); + + if (pReplacementColorBackgroundBitmap) + { + r = __pCommandButton->SetBackgroundBitmap(*pReplacementColorBackgroundBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + delete pReplacementColorBackgroundBitmap; + pReplacementColorBackgroundBitmap = null; + } + delete pNormalBackgroundBitmap; + pNormalBackgroundBitmap = null; + } + + r = __pCommandButton->SetStyle(TOOLBAR_COMMAND); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pCommandButton->SetResizable(true); + __pCommandButton->SetMovable(true); + SysLog(NID_UI_CTRL, "Command created!!! bounds(%f, %f, %f, %f)", bounds.x, bounds.y, bounds.width, bounds.height); + r = __pCommandButton->SetBounds(bounds); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pCommandButton->SetResizable(false); + __pCommandButton->SetMovable(false); + + leftButtonText = __pEditModel->GetKeypadCommandButtonText(COMMAND_BUTTON_POSITION_LEFT); + r = __pCommandButton->AddItem(CreateCommandButtonItemN(__pEditModel->GetKeypadCommandButtonActionId(COMMAND_BUTTON_POSITION_LEFT), leftButtonText)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + rightButtonText = __pEditModel->GetKeypadCommandButtonText(COMMAND_BUTTON_POSITION_RIGHT); + r = __pCommandButton->AddItem(CreateCommandButtonItemN(__pEditModel->GetKeypadCommandButtonActionId(COMMAND_BUTTON_POSITION_RIGHT), rightButtonText)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + if (__pActionEventListener) + { + __pCommandButton->AddActionEventListener(*__pActionEventListener); + } + + if (__pParentForm) + { + r = __pParentForm->AttachChild(*__pCommandButton); + __pParentForm->MoveChildToTop(*__pCommandButton); + } + else + { + pParent = __pEdit->GetParent(); + SysTryCatch(NID_UI_CTRL, pParent, r = E_SYSTEM, r, "[%s] Propagating.", GetErrorMessage(r)); + r = pParent->AttachChild(*__pCommandButton); + } + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + +CATCH: + delete pNormalBackgroundBitmap; + + delete __pCommandButton; + __pCommandButton = null; + + delete pReplacementColorBackgroundBitmap; + + return r; +} + +void +_EditPresenter::CheckInitialFooterVisibleState(void) +{ + if (__pParentForm == null) + { + return; + } + + _Toolbar* pFooter = __pParentForm->GetFooter(); + if (pFooter) + { + if (pFooter->GetVisibleState() == false) + { + __initialFooterVisibleStatus = EDIT_FOOTER_VISIBLE_STATUS_HIDE; + SysLog(NID_UI_CTRL, "EDIT_FOOTER_VISIBLE_STATUS_HIDE"); + } + else + { + __initialFooterVisibleStatus = EDIT_FOOTER_VISIBLE_STATUS_SHOW; + SysLog(NID_UI_CTRL, "EDIT_FOOTER_VISIBLE_STATUS_SHOW"); + } + } + else + { + __initialFooterVisibleStatus = EDIT_FOOTER_VISIBLE_STATUS_NONE; + SysLog(NID_UI_CTRL, "EDIT_FOOTER_VISIBLE_STATUS_NONE"); + } + + return; +} + +void +_EditPresenter::SetFooterVisible(bool isVisible) +{ + if (__pParentForm == null) + { + return; + } + + _Toolbar* pFooter = __pParentForm->GetFooter(); + if (pFooter && __initialFooterVisibleStatus == EDIT_FOOTER_VISIBLE_STATUS_SHOW) + { + if ((isVisible == true && pFooter->GetVisibleState() == false) || + (isVisible == false && pFooter->GetVisibleState() == true)) + { + if (isVisible) + { + SysLog(NID_UI_CTRL, "SetFooterVisible TRUE!!!"); + } + else + { + SysLog(NID_UI_CTRL, "SetFooterVisible FALSE!!!"); + } + + __footerVisibleChanged = true; + pFooter->SetVisibleState(isVisible); + pFooter->Invalidate(); + + if (isVisible) + { + __initialFooterVisibleStatus = EDIT_FOOTER_VISIBLE_STATUS_NONE; + } + } + } + + return; +} + +result +_EditPresenter::ShowFullscreenKeypad(void) +{ + result r = E_SUCCESS; + + if (__isCopyPasteManagerExist) + { + InitializeCopyPasteManager(); + } + + if (IsKeypadEnabled() == false) + { + __pEdit->SetFocused(); + return E_SUCCESS; + } + + if (__pFullscreenKeypad) + { + __pFullscreenKeypad->Close(); + delete __pFullscreenKeypad; + __pFullscreenKeypad = null; + } + + __isKeypadExist = CheckKeypadExist(__pEdit->GetOrientation()); + if (__isKeypadExist) //overlay style keypad exist before create fullscreen edit. + { + 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->Invalidate(true); + } + } + + int editStyle = __pEdit->GetEditStyle(); + + _KeypadStyleInfo keypadStyleInfo; + keypadStyleInfo.keypadStyle = __pEditModel->GetKeypadStyle(); + keypadStyleInfo.textPredictionEnabled = __pEditModel->IsTextPredictionEnabled(); + keypadStyleInfo.isNormalNumberStyle = __isKeypadNormalNumberStyleEnabled; + keypadStyleInfo.enterActionEnabled = true; + keypadStyleInfo.isLowerCaseModeEnabled = __pEditModel->IsLowerCaseModeEnabled(); + + bool inputConnectionBoundState = __isInputConnectionBound; + __isInputConnectionBound = true; + SetKeypadStyle(__pEditModel->GetKeypadStyle()); + __isInputConnectionBound = inputConnectionBoundState; + + if (editStyle & EDIT_STYLE_SINGLE_LINE) + { + keypadStyleInfo.enterActionEnabled = false; + } + + if (editStyle & EDIT_STYLE_PASSWORD) + { + editStyle = EDIT_STYLE_NORMAL | EDIT_STYLE_SINGLE_LINE | EDIT_STYLE_PASSWORD; + } + else + { + editStyle = EDIT_STYLE_NORMAL; + } + + __pFullscreenKeypad = _Keypad::CreateKeypadN(); + 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)); + + __pFullscreenKeypad->SetText(GetText()); + + r = __pFullscreenKeypad->Open(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (__pEdit->IsInputEventEnabled()) + { + __pEdit->LockInputEvent(); + } + + if (__pTextFilter) + { + __pFullscreenKeypad->SetEditTextFilter(this); + } + return r; +} + +void +_EditPresenter::DeleteFullscreenKeypad(void) +{ + if (__pFullscreenKeypad) + { + __pFullscreenKeypad->Close(); + delete __pFullscreenKeypad; + __pFullscreenKeypad = null; + } + + return; +} + +result +_EditPresenter::GetKeypadBounds(FloatRectangle& bounds) +{ + if (__pInputConnection == null) + { + return E_SYSTEM; + } + + bounds = __pInputConnection->GetInputPanelBoundsF(); + + __keypadBounds = bounds; + + return E_SUCCESS; +} + +float +_EditPresenter::GetClipboardHeight(void) const +{ + return __clipboardHeight; +} + +bool +_EditPresenter::IsKeypadRotating(_ControlOrientation orientation) +{ + FloatDimension screenSize; + FloatRectangle absKeypadBounds(0.0f, 0.0f, 0.0f, 0.0f); + _ControlManager* pControlManager = _ControlManager::GetInstance(); + + GetKeypadBounds(absKeypadBounds); + + if (orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + screenSize.height = pControlManager->GetScreenSizeF().height; + screenSize.width = pControlManager->GetScreenSizeF().width; + } + else + { + screenSize.height = pControlManager->GetScreenSizeF().width; + screenSize.width = pControlManager->GetScreenSizeF().height; + } + + if (absKeypadBounds.width == screenSize.width) + { + return false; + } + else + { + return true; + } +} + +bool +_EditPresenter::CheckKeypadExist(_ControlOrientation orientation) +{ + FloatDimension screenSize; + FloatRectangle absKeypadBounds(0.0f, 0.0f, 0.0f, 0.0f); + _ControlManager* pControlManager = _ControlManager::GetInstance(); + + GetKeypadBounds(absKeypadBounds); + + if (orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + screenSize.height = pControlManager->GetScreenSizeF().height; + screenSize.width = pControlManager->GetScreenSizeF().width; + } + else + { + screenSize.height = pControlManager->GetScreenSizeF().width; + screenSize.width = pControlManager->GetScreenSizeF().height; + } + + if (absKeypadBounds.width != 0 && absKeypadBounds.height != 0) + { + if ((absKeypadBounds.y != screenSize.height)) + { + SysLog(NID_UI_CTRL, "KEYPAD EXIST!!!Keypad(y: %f, w: %f, h: %f)", absKeypadBounds.y, absKeypadBounds.width, absKeypadBounds.height); + return true; + } + else + { + SysLog(NID_UI_CTRL, "NO KEYPAD!!!Keypad(y: %f, w: %f, h: %f)", absKeypadBounds.y, absKeypadBounds.width, absKeypadBounds.height); + return false; + } + } + else + { + SysLog(NID_UI_CTRL, "NO KEYPAD!!!Keypad(y: %f, w: %f, h: %f)", absKeypadBounds.y, absKeypadBounds.width, absKeypadBounds.height); + return false; + } +} + +result +_EditPresenter::ShowKeypad(bool focus) +{ + if (!__pEdit->IsVisible()) + { + return E_SUCCESS; + } + + if (IsKeypadEnabled() == false) + { + return E_SUCCESS; + } + + if (focus) + { + __pEdit->SetFocused(); + return E_SUCCESS; + } + + if (!__isInitialized) + { + return E_SUCCESS; + } + + _ControlManager* pControlManager = _ControlManager::GetInstance(); + + if (!pControlManager->IsFrameActivated()) + { + return E_SUCCESS; + } + + bool sendKeypadEventForcely = false; + + CheckUSBKeyboardStatus(); + + __isInputConnectionBound = true; + + SetKeypadStyle(__pEditModel->GetKeypadStyle()); + + if (__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE && GetKeypadAction() == CORE_KEYPAD_ACTION_ENTER) + { + __pInputConnection->SetInputPanelActionEnabled(false); + } + else + { + __pInputConnection->SetInputPanelAction(ConvertKeypadAction(GetKeypadAction())); + } + + //Need to complete AutoCapitalization functionality + if (__pEditModel->IsLowerCaseModeEnabled()) + { + __pInputConnection->SetAutoCapitalizationMode(AUTO_CAPITALIZATION_MODE_NONE); + } + else + { + __pInputConnection->SetAutoCapitalizationMode(AUTO_CAPITALIZATION_MODE_SENTENCE); + } + + __pInputConnection->BindInputMethod(); + __isKeypadShowing = true; + __isKeypadHiding = false; + __resizedByKeypadHide = false; + __latestBoundedContext = (unsigned int)this; + + LanguageCode initialKeypadLanguage = LANGUAGE_INVALID; + __pEditModel->GetInitialKeypadLanguage(initialKeypadLanguage); + if (initialKeypadLanguage != LANGUAGE_INVALID) + { + SetCurrentLanguage(initialKeypadLanguage); + } + + __pEdit->AttachScrollPanelEvent(); + + //layout rearrange + if (__isUSBKeyboardConnected) + { + SysLog(NID_UI_CTRL, "ShowKeypad called in USB ON mode!!!"); + + __isKeypadExist = CheckKeypadExist(__pEdit->GetOrientation()); //prediction alreaedy exists + + if (__isKeypadCommandButtonVisible) + { + __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_CREATED); + __pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_CREATED); + + if (__initialFooterVisibleStatus == EDIT_FOOTER_VISIBLE_STATUS_NONE) + { + CheckInitialFooterVisibleState(); + } + + SetFooterVisible(false); + ChangeLayoutInternal(__pEdit->GetOrientation()); + AdjustParentPanelHeight(false); + ScrollPanelToCursorPosition(); + + __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->Invalidate(true); + } + } + else + { + if (__initialFooterVisibleStatus == EDIT_FOOTER_VISIBLE_STATUS_NONE) + { + CheckInitialFooterVisibleState(); + } + + if (__isKeypadExist) + { + if (__pParentForm) + { + sendKeypadEventForcely = !__pParentForm->IsDeflated(); + } + + if (sendKeypadEventForcely) + { + __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_CREATED); + __pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_CREATED); + } + + ChangeLayoutInternal(__pEdit->GetOrientation()); + 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->Invalidate(true); + } + + if (sendKeypadEventForcely) + { + __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_OPEN); + __pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_OPENED); + } + } + else + { + ScrollPanelToCursorPosition(); + } + } + } + else + { + SysLog(NID_UI_CTRL, "ShowKeypad called in USB OFF mode!!!"); + + __isKeypadExist = CheckKeypadExist(__pEdit->GetOrientation()); //call once only from here. + + if (!__isKeypadExist) + { + if (__isKeypadCommandButtonVisible) + { + if (!__pCommandButton || (__pCommandButton && !__pCommandButton->GetVisibleState())) + { + __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_CREATED); + __pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_CREATED); + __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_OPEN); + __pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_OPENED); + } + } + else + { + if (!__isClipboardExist) + { + __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_CREATED); + } + __pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_CREATED); + } + + if (__initialFooterVisibleStatus == EDIT_FOOTER_VISIBLE_STATUS_NONE) + { + CheckInitialFooterVisibleState(); + } + } + else + { + if (__footerVisibleChanged) + { + SetFooterVisible(true); + } + + if (__initialFooterVisibleStatus == EDIT_FOOTER_VISIBLE_STATUS_NONE) + { + CheckInitialFooterVisibleState(); + } + } + + if (__isKeypadCommandButtonVisible) + { + SetFooterVisible(false); + } + + if (__isKeypadExist) //edit switiching + { + if (__pParentForm) + { + sendKeypadEventForcely = !__pParentForm->IsDeflated(); + } + + if (sendKeypadEventForcely) + { + __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_CREATED); + __pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_CREATED); + } + + ChangeLayoutInternal(__pEdit->GetOrientation()); + 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->Invalidate(true); + } + __isKeypadShowing = false; + + if (sendKeypadEventForcely) + { + __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_OPEN); + __pEdit->SendScrollPanelEvent(CORE_OVERLAY_CONTROL_OPENED); + } + } + else + { + if(!__isClipboardExist && __pParentPanel) + { + if (__initialParentHeight) + { + AdjustParentPanelHeight(true); + } + } + ScrollPanelToCursorPosition(); + } + + __pInputConnection->ShowInputPanel(); + } + + return E_SUCCESS; +} + +result +_EditPresenter::ChangeLayout(_ControlOrientation orientation) +{ + result r = E_SUCCESS; + + //for Target DND + __pDragAndDropCueVisualElement->SetShowState(false); + + if (__dragAndDropStarted) + { + ResetDragAndDrop(); + } + + if (__pCopyPasteManager) + { + if (__pCopyPasteManager->GetCopyPastePopup()) + { + __needToCreateCopyPastePopup = true; + } + else if (!IsBlocked() && __pEditModel->IsViewModeEnabled()) + { + SetCursorPosition(0); + } + __pCopyPasteManager->ReleaseCopyPastePopup(); + __pCopyPasteManager->ReleaseHandle(); + } + else + { + if (__pEditModel->IsViewModeEnabled()) + { + SetCursorPosition(0); + } + } + + bool isScrollPanelBoundsReloaded = false; + + if (__pParentPanel) + { + _ControlImpl* pParentPanelImpl = static_cast <_ControlImpl* >(__pParentPanel->GetUserData()); + Rectangle builderBounds; + isScrollPanelBoundsReloaded= pParentPanelImpl->GetBuilderBounds(orientation, builderBounds); + } + + __rotated = true; + + CheckUSBKeyboardStatus(); + + if (__isInputConnectionBound || __clipboardConnected) + { + SysLog(NID_UI_CTRL, "-------------------ChangeLayout------------------------"); + + if (!isScrollPanelBoundsReloaded) + { + SysLog(NID_UI_CTRL, "ScrollPanel bounds is not changed by UIBuilder, so forcely reset ScrollPanel's height"); + AdjustParentPanelHeight(true); + } + else + { + SysLog(NID_UI_CTRL, "ScrollPanel bounds is changed by UIBuilder"); + } + + if (__pParentForm) + { + SysLog(NID_UI_CTRL, "Form deflate RESET!!!"); + __pParentForm->DeflateClientRectHeight(0.0f); + } + + if (__pCommandButton && __isKeypadCommandButtonVisible) + { + __pCommandButton->SetVisibleState(false); + } + + if (__isKeypadExist && ! __isClipboardExist) //only keypad exists, already get keypadbounds before callback [Causion]this timing clipboard height is still previous height + { + if (isScrollPanelBoundsReloaded) + { + __initialParentHeight = 0.0f; + } + + ChangeLayoutInternal(orientation); + AdjustParentPanelHeight(false); + ScrollPanelToCursorPosition(); + } + else // if clipboard exists, boundsChanged callback will delivered after rotate callback + { + /* + if (__isClipboardExist) + { + __initialParentHeight = 0.0f; + } + else //no keypad, no clipboard + { + if (__isKeypadCommandButtonVisible) + { + __initialParentHeight = 0.0f; + ChangeLayoutInternal(orientation); + AdjustParentPanelHeight(false); + ScrollPanelToCursorPosition(); + } + }*/ + + if (!__isClipboardExist) + { + if (__isKeypadCommandButtonVisible) + { + __initialParentHeight = 0.0f; + ChangeLayoutInternal(orientation); + AdjustParentPanelHeight(false); + } + ScrollPanelToCursorPosition(); + } + } + } + + if ((__pEdit->GetEditStyle() & EDIT_STYLE_FLEXIBLE) == false) + { + __initialBounds = __pEdit->GetBoundsF(); + } + + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Failed to change layout.", GetErrorMessage(r)); + + return r; +} + +result +_EditPresenter::ChangeLayout(_ControlRotation rotation) +{ + _ControlOrientation orientation = _CONTROL_ORIENTATION_PORTRAIT; + + if (rotation == _CONTROL_ROTATION_0 || rotation == _CONTROL_ROTATION_180) + { + orientation = _CONTROL_ORIENTATION_PORTRAIT; + } + else + { + orientation = _CONTROL_ORIENTATION_LANDSCAPE; + } + + return ChangeLayout(orientation); +} + +result +_EditPresenter::ChangeLayoutInternal(_ControlOrientation orientation, bool deflateForm) +{ + result r = E_SUCCESS; + + FloatRectangle keypadBounds(0.0f, 0.0f, 0.0f, 0.0f); + + _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); + + float formDeflateHeight = 0.0f; + float shrinkedHeight = 0.0f; + + if (orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + screenSize.width = pControlManager->GetScreenSizeF().width; + screenSize.height = pControlManager->GetScreenSizeF().height; + } + else + { + screenSize.width = pControlManager->GetScreenSizeF().height; + screenSize.height = pControlManager->GetScreenSizeF().width; + } + + if (__isInputConnectionBound || __clipboardConnected) + { + GetKeypadBounds(keypadBounds); + + if (__isKeypadExist) + { + if (__isClipboardExist) + { + if (__clipboardHeight > keypadBounds.height) + { + shrinkedHeight = __clipboardHeight; + } + else + { + shrinkedHeight = keypadBounds.height; + } + } + else + { + shrinkedHeight = keypadBounds.height; + } + } + else + { + if (__isClipboardExist) + { + shrinkedHeight = __clipboardHeight; + } + } + + if (__isKeypadCommandButtonVisible) + { + commandButtonBounds.width = screenSize.width; + float commandButtonHeight = 0.0f; + + if (__pParentForm) + { + GET_SHAPE_CONFIG(FOOTER::HEIGHT, orientation, commandButtonHeight); + commandButtonBounds.height = commandButtonHeight; + formDeflateHeight += commandButtonBounds.height; + + if (__isKeypadExist || __isClipboardExist) + { + formDeflateHeight += shrinkedHeight; + commandButtonBounds.y = screenSize.height - shrinkedHeight - commandButtonBounds.height - __pParentForm->GetClientBoundsF().y; + } + else + { + commandButtonBounds.y = screenSize.height - commandButtonBounds.height - __pParentForm->GetClientBoundsF().y; + } + + SetKeypadCommandButton(commandButtonBounds); + + if (__pCommandButton) + { + __pCommandButton->SetVisibleState(true); + __pCommandButton->Invalidate(); + } + } + } + else + { + if (__pParentForm) + { + if (__isKeypadExist || __isClipboardExist) + { + formDeflateHeight += shrinkedHeight; + } + } + } + } + + if (__pParentForm && deflateForm) + { + SysLog(NID_UI_CTRL, "FormDeflateHeight:%f, KeypadExist(%d), ClipboardExist(%d), CommandButtonVisible(%d)", + formDeflateHeight, __isKeypadExist, __isClipboardExist, __isKeypadCommandButtonVisible); + __pParentForm->DeflateClientRectHeight(formDeflateHeight); + } + + return r; +} + +void +_EditPresenter::OnScrollPanelBoundsChanged(void) +{ + return; +} + +void +_EditPresenter::AdjustParentPanelHeight(bool restore) +{ + if (__pParentPanel == null) + { + SysLog(NID_UI_CTRL, "__pParentPanel is NULL!!!, so skip resizing scrollpanel"); + 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) + { + initialParentHeight = 0.0f; + } + + _ControlOrientation orientation; + float commandButtonHeight = 0.0f; + + FloatRectangle absKeypadBounds(0.0f, 0.0f, 0.0f, 0.0f); + + _Toolbar* pFooter = null; + + if (__pParentForm) + { + pFooter = __pParentForm->GetFooter(); + } + + FloatRectangle absScrollPanelBounds(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle scrollPanelBounds = __pParentPanel->GetBoundsF(); + float gapY = 0.0f; + + float displayedPanelHeight = 0.0f; + FloatDimension screenSize; + + if (__pEdit->GetOrientation()== _CONTROL_ORIENTATION_PORTRAIT) + { + screenSize.width = pControlManager->GetScreenSizeF().width; + screenSize.height = pControlManager->GetScreenSizeF().height; + } + else + { + screenSize.width = pControlManager->GetScreenSizeF().height; + screenSize.height = pControlManager->GetScreenSizeF().width; + } + + if (restore) + { + if (initialParentHeight) + { + scrollPanelBounds.height = __initialParentHeight; + SysLog(NID_UI_CTRL, "Rollback ScrollPanel's height to %f and Set __initialParentHeight to 'Zero' ", __initialParentHeight); + __initialParentHeight = 0.0f; + __pResizedPanel = null; + __pParentPanel->SetBounds(scrollPanelBounds); + __pParentPanel->Invalidate(); + } + else + { + SysLog(NID_UI_CTRL, "initialParentHeight is ZERO!!!, so skip scrollPanel height recovery!!!"); + } + } + else + { + if (__isKeypadExist) + { + GetKeypadBounds(absKeypadBounds); + + if (__isClipboardExist) + { + if (__clipboardHeight > absKeypadBounds.height) + { + absKeypadBounds.y = screenSize.height - __clipboardHeight; + } + } + else + { + if (__isUSBKeyboardConnected)//predictive window shown + { + absKeypadBounds.y = screenSize.height - absKeypadBounds.height;//only absKeypadBounds.height is meaningful in USB on. + } + } + } + else + { + if (__isClipboardExist) + { + absKeypadBounds.y = screenSize.height - __clipboardHeight; + } + else + { + absKeypadBounds.y = screenSize.height; + } + } + + if ((__pParentForm && __isKeypadCommandButtonVisible) || (pFooter && (pFooter->GetVisibleState() == true))) + { + orientation = __pEdit->GetOrientation(); + GET_SHAPE_CONFIG(FOOTER::HEIGHT, orientation, commandButtonHeight); + } + + absScrollPanelBounds = __pParentPanel->GetAbsoluteBoundsF(true); + displayedPanelHeight = screenSize.height - commandButtonHeight - absScrollPanelBounds.y; + gapY = (absKeypadBounds.y - commandButtonHeight)- absScrollPanelBounds.y; + + bool isOverlapped = true; + + if (((absKeypadBounds.y - commandButtonHeight) >= (absScrollPanelBounds.y + absScrollPanelBounds.height)) || ( absScrollPanelBounds.y > absKeypadBounds.y)) + { + isOverlapped = false; + } + + SysLog(NID_UI_CTRL, "IsOverlapped:(%d), __initialParentHeight:(%f), gapY:(%f)", isOverlapped, __initialParentHeight, gapY); + + if (!initialParentHeight) + { + if (!isOverlapped) + { + return; + } + + if (gapY > 0.0f) + { + initialParentHeight = scrollPanelBounds.height; + __initialParentHeight = initialParentHeight; + __pResizedPanel = __pParentPanel; + + SysLog(NID_UI_CTRL, "Set ScrollPanel's height to %f and Set __initialParentHeight:(%f)", gapY, __initialParentHeight); + + scrollPanelBounds.height = gapY; + __pParentPanel->SetBounds(scrollPanelBounds); + __pParentPanel->Invalidate(); + } + } + else + { + if (!isOverlapped) + { + if ((gapY < initialParentHeight) && (gapY > 0.0f)) + { + SysLog(NID_UI_CTRL, "Set ScrollPanel's height to %f", gapY); + + scrollPanelBounds.height = gapY; + __pParentPanel->SetBounds(scrollPanelBounds); + __pParentPanel->Invalidate(); + return; + } + else + { + if (gapY > initialParentHeight) + { + if (scrollPanelBounds.height > initialParentHeight) + { + __initialParentHeight = scrollPanelBounds.height ; + return; + } + + SysLog(NID_UI_CTRL, "Set ScrollPanel's height to %f", __initialParentHeight); + + scrollPanelBounds.height = initialParentHeight; + __pParentPanel->SetBounds(scrollPanelBounds); + __pParentPanel->Invalidate(); + } + return; + } + } + + if (gapY > 0.0f) + { + if (scrollPanelBounds.height > initialParentHeight) + { + __initialParentHeight = scrollPanelBounds.height ; + } + + SysLog(NID_UI_CTRL, "Set ScrollPanel's height to %f", gapY); + scrollPanelBounds.height = gapY; + __pParentPanel->SetBounds(scrollPanelBounds); + __pParentPanel->Invalidate(); + } + } + } +} + +result +_EditPresenter::HideKeypad(bool focus) +{ + InitializeCopyPasteManager(); + + __isKeypadShowing = false; + __resizedByKeypadHide = false; + + if (__isInitialized == false || !__isInputConnectionBound) + { + return E_SUCCESS; + } + + CheckUSBKeyboardStatus(); + + if (__isUSBKeyboardConnected) + { + SysLog(NID_UI_CTRL, "HideKeypad called in USB ON mode!!!"); + if (__pCommandButton && __isKeypadCommandButtonVisible) + { + SetFooterVisible(true); + + __pCommandButton->SetVisibleState(false); + + if (__pParentForm) + { + SysLog(NID_UI_CTRL, "Form deflate RESET!!!"); + __pParentForm->DeflateClientRectHeight(0.0f); + } + + AdjustParentPanelHeight(true); + + __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_CLOSE); + } + } + else + { + SysLog(NID_UI_CTRL, "HideKeypad called in USB OFF mode!!!"); + if (__pCommandButton && __isKeypadCommandButtonVisible) + { + if (!__isKeypadExist) + { + SetFooterVisible(true);//must be called ahead of DeflateClientRectHeights + + if (__pParentForm) + { + SysLog(NID_UI_CTRL, "Form deflate RESET!!!"); + __pParentForm->DeflateClientRectHeight(0.0f); + } + __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_CLOSE); + } + __pCommandButton->SetVisibleState(false); + } + } + + FinishTextComposition(); + __pInputConnection->HideInputPanel(); + __pInputConnection->UnbindInputMethod(); + + if (__isKeypadExist) + { + __isKeypadHiding = true; + } + + __isInputConnectionBound = false; + + if (focus && __pEdit->IsFocused()) + { + __pEdit->SetFocused(false); + } + + return E_SUCCESS; +} + +void +_EditPresenter::ChangeKeypadStatus(void) +{ + InitializeCopyPasteManager(); + + if (__isInputConnectionBound) + { + __isInputConnectionBound = false; + } + + return; +} + +void +_EditPresenter::OnTimerExpired(Timer& timer) +{ + Timer* onTimer = &timer; + + if (onTimer == __pCursorTimer) + { + OnCursorTimerExpired(); + } + else if (onTimer == __pTitleSlidingTimer) + { + OnTitleSlidingTimerExpired(); + } + else if (onTimer == __pPasswordTimer) + { + OnPasswordTimerExpired(); + } + else if (onTimer == __pFlickAnimationTimer) + { + OnFlickTimerExpired(); + } + + return; +} + +void +_EditPresenter::OnEditCopyPasteStatusChanged(CoreCopyPasteStatus status, CoreCopyPasteAction action) +{ + switch (action) + { + case CORE_COPY_PASTE_ACTION_COPY: + __pEdit->CopyText(); + InitializeCopyPasteManager(); + break; + case CORE_COPY_PASTE_ACTION_CUT: + __pEdit->CutText(); + InitializeCopyPasteManager(); + break; + case CORE_COPY_PASTE_ACTION_PASTE: + __pEdit->PasteText(); + InitializeCopyPasteManager(); + break; + case CORE_COPY_PASTE_ACTION_SEARCH: + InitializeCopyPasteManager(); + break; + case CORE_COPY_PASTE_ACTION_CLIPBOARD: + __clipboardConnected = true; + break; + default: + break; + } + __pEdit->Invalidate(); + + return; +} + +result +_EditPresenter::InitializeCursor(void) +{ + StopCursorTimer(); + + if (__isCursorDisabled == false && IsCurrentFocused() && __isTextBlocked == false) + { + bool outOfRangeInSignleLine = false; + FloatRectangle cursorBounds; + if (CalculateCursorBounds(__textObjectBounds, cursorBounds) != E_SUCCESS) + { + if (__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE) + { + outOfRangeInSignleLine = true; + } + } + + __pCursorVisualElement->SetOpacity(1.0f); + __pCursorVisualElement->SetBounds(cursorBounds); + + Canvas* pCanvas = __pCursorVisualElement->GetCanvasN(); + if (pCanvas == null) + { + return E_SYSTEM; + } + + if (outOfRangeInSignleLine) + { + __isCursorOpaque = false; + } + else + { + __isCursorInitialized = false; + } + + DrawCursor(*pCanvas, cursorBounds, __isCursorOpaque); + + if (__pInputConnection) + { + FloatRectangle absoluteEditRectangle; + if (GetCursorBounds(false, absoluteEditRectangle) == E_SUCCESS) + { + __pInputConnection->SetCursorBounds(absoluteEditRectangle); + } + } + __isCursorOpaque = __isCursorOpaque ? false : true; + + delete pCanvas; + + __previousCursorBounds = cursorBounds; + StartCursorTimer(); + } + else + { + __pCursorVisualElement->SetOpacity(0); + } + + if (__pInputConnection != null && __isInputConnectionBound == true && !__isCopyPasteManagerExist) + { + __pInputConnection->SetCursorPosition(__cursorPos); + } + + return E_SUCCESS; +} + +void +_EditPresenter::StopCursorTimer(void) +{ + if (__pCursorTimer) + { + __pCursorTimer->Cancel(); + } + return; +} + +result +_EditPresenter::StartCursorTimer(void) +{ + result r = E_SUCCESS; + + if (__pCursorTimer == null) + { + __pCursorTimer = new (std::nothrow) Timer(); + SysTryReturnResult(NID_UI_CTRL, __pCursorTimer, E_OUT_OF_MEMORY, "Memory allocation failed."); + + r = __pCursorTimer->Construct(*this); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to construct the cursor timer.", GetErrorMessage(r)); + } + + r = __pCursorTimer->Start(EDIT_CURSOR_TIMER_PERIOD); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to start timer.", GetErrorMessage(r)); + + return r; + +CATCH: + StopCursorTimer(); + + delete __pCursorTimer; + __pCursorTimer = null; + + return r; +} + +result +_EditPresenter::DrawCursor(Canvas& canvas, FloatRectangle& cursorBounds, bool isCursorOpaque) +{ + result r = E_SUCCESS; + + if (__isCursorDisabled == false) + { + Color cursorColor; + GET_COLOR_CONFIG(EDIT::CURSOR_NORMAL, cursorColor); + + if (__isCursorInitialized) + { + cursorBounds.SetPosition(0.0f, 0.0f); + + if (canvas.GetBackgroundColor() != cursorColor) + { + canvas.FillRectangle(cursorColor, cursorBounds); + } + + if (isCursorOpaque) + { + __pCursorVisualElement->SetOpacity(1.0f); + } + else + { + __pCursorVisualElement->SetOpacity(0); + } + } + else + { + cursorBounds.SetPosition(0.0f, 0.0f); + + canvas.FillRectangle(cursorColor, cursorBounds); + __isCursorInitialized = true; + + } + } + else + { + __pCursorVisualElement->SetOpacity(0); + } + + return r; +} + +result +_EditPresenter::MoveCursor(const FloatRectangle& fromRect, const FloatRectangle& toRect) +{ + if ((__previousCursorBounds.x != fromRect.x) || (__previousCursorBounds.y != fromRect.y) || (__previousCursorBounds.width != fromRect.width) || (__previousCursorBounds.height != fromRect.height)) + { + return E_SYSTEM; + } + + __pCursorVisualElement->SetOpacity(0); + + __pCursorVisualElement->SetBounds(toRect); + Canvas* pCanvas = __pCursorVisualElement->GetCanvasN(); + + if (pCanvas == null) + { + return E_SYSTEM; + } + + if (toRect.y < 0.0f || toRect.y >= __clientBounds.height || + toRect.x < 0.0f || toRect.x >= __clientBounds.width) + { + delete pCanvas; + return E_SYSTEM; + } + + __pCursorVisualElement->SetOpacity(1.0f); + + Color cursorColor; + + GET_COLOR_CONFIG(EDIT::CURSOR_NORMAL, cursorColor); + + pCanvas->FillRectangle(cursorColor, toRect); + + __previousCursorBounds = toRect; + delete pCanvas; + + return E_SUCCESS; +} + +void +_EditPresenter::OnCursorTimerExpired(void) +{ + if (!IsCurrentFocused() || __isCursorDisabled) + { + if (__pCursorTimer) + { + __pCursorTimer->Cancel(); + delete __pCursorTimer; + __pCursorTimer = null; + } + + return; + } + + FloatRectangle cursorBounds; + + if (CalculateCursorBounds(__textObjectBounds, cursorBounds) != E_SUCCESS) + { + return; + } + + if ((__previousCursorBounds.x != cursorBounds.x) || (__previousCursorBounds.y != cursorBounds.y) || (__previousCursorBounds.width != cursorBounds.width) || (__previousCursorBounds.height != cursorBounds.height)) + { + __previousCursorBounds = cursorBounds; + } + + if (__pCursorVisualElement) + { + __pCursorVisualElement->SetBounds(cursorBounds); + Canvas* pCanvas = __pCursorVisualElement->GetCanvasN(); + if (pCanvas == null) + { + return; + } + + DrawCursor(*pCanvas, cursorBounds, __isCursorOpaque); + + delete pCanvas; + } + + __isCursorOpaque = __isCursorOpaque ? false : true; + StartCursorTimer(); + + if (__pCopyPasteManager) + { + __pCopyPasteManager->UpdateCopyPasteMagnifier(); + } + + return; +} + +EllipsisPosition +_EditPresenter::GetEllipsisPosition(void) const +{ + return __pEdit->GetEllipsisPosition(); +} + +result +_EditPresenter::SetEllipsisPosition(EllipsisPosition position) +{ + result r = E_SUCCESS; + TextObjectEllipsisType ellipsisType = TEXT_OBJECT_ELLIPSIS_TYPE_TAIL; + if (position == ELLIPSIS_POSITION_START) + { + ellipsisType = TEXT_OBJECT_ELLIPSIS_TYPE_HEAD; + } + else if (position == ELLIPSIS_POSITION_MIDDLE) + { + ellipsisType = TEXT_OBJECT_ELLIPSIS_TYPE_MIDDLE; + } + + __pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); + + r = __pTextObject->SetTextObjectEllipsisType(ellipsisType); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "Unable to Set ellipsis position."); + + return r; +} + +void +_EditPresenter::OnFontInfoRequested(unsigned long& style, float& size) +{ + style = __contentFontStyle; + size = __contentFontSize; + + return; +} + +void +_EditPresenter::OnFontChanged(Font* pFont) +{ + if (!__isFontInitialized) + { + return; + } + + result r = E_SUCCESS; + + r = AdjustFont(*pFont, EDIT_FONT_CHANGE_ALL); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + __titleFontFaceName = pFont->GetFaceName(); + + return; +} + +Font* +_EditPresenter::GetFont(void) const +{ + return __pFont; +} + +int +_EditPresenter::GetTextSize(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(__contentFontSize); +} + +float +_EditPresenter::GetTextSizeF(void) const +{ + return __contentFontSize; +} + +unsigned int +_EditPresenter::GetFontStyle(const Font* pBaseFont) const +{ + unsigned long style = FONT_STYLE_MIN; + + if (pBaseFont->IsPlain()) + { + style |= FONT_STYLE_PLAIN; + } + if (pBaseFont->IsItalic()) + { + style |= FONT_STYLE_ITALIC; + } + if (pBaseFont->IsBold()) + { + style |= FONT_STYLE_BOLD; + } + + return style; +} + +result +_EditPresenter::SetTextSize(const int size) +{ + result r = E_SUCCESS; + _FontImpl* fontImpl = _FontImpl::GetInstance(*__pFont); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, fontImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = fontImpl->SetSize(size); + SysTryReturn(NID_UI_CTRL, !(IsFailed(r)), r, r, "SetSize is failed."); + + if (__pTextObject) + { + 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 (__pGuideTextObject) + { + r = __pGuideTextObject->SetFont(__pFont, 0, __pGuideTextObject->GetTextLength()); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Unable to set font."); + } + + __contentFontSize = _CoordinateSystemUtils::ConvertToFloat(size); + return r; +} + +result +_EditPresenter::SetTextSize(const float size) +{ + result r = E_SUCCESS; + _FontImpl* fontImpl = _FontImpl::GetInstance(*__pFont); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, fontImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = fontImpl->SetSize(size); + SysTryReturn(NID_UI_CTRL, !(IsFailed(r)), r, r, "SetSize is failed."); + + if (__pTextObject) + { + 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 (__pGuideTextObject) + { + r = __pGuideTextObject->SetFont(__pFont, 0, __pGuideTextObject->GetTextLength()); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Unable to set font."); + } + + __contentFontSize = size; + return r; +} + +result +_EditPresenter::SetFont(const Font& font) +{ + result r = E_SUCCESS; + + Font* pFont = _FontImpl::CloneN(const_cast (font)); + SysTryReturnResult(NID_UI_CTRL, pFont, GetLastResult(), "Unable to create font."); + + __pFont = pFont; + + if (__pTextObject) + { + r = __pTextObject->SetFont(__pFont, 0, __pTextObject->GetTextLength()); + __ContentTextStatus = EDIT_TEXT_STATUS_COMPOSE_NON; + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, GetLastResult(), "Unable to set font."); + } + + if (__pGuideTextObject) + { + r = __pGuideTextObject->SetFont(__pFont, 0, __pGuideTextObject->GetTextLength()); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, GetLastResult(), "Unable to set font."); + } + + return r; +} + +result +_EditPresenter::AdjustFont(Font& font, _EditFontChange fontChange) +{ + result r = E_SUCCESS; + Font* pFont = &font; + + _FontImpl* fontImpl = _FontImpl::GetInstance(*pFont); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, fontImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (fontChange == EDIT_FONT_CHANGE_TITLE || fontChange == EDIT_FONT_CHANGE_ALL) + { + if (__pTitleTextObject) + { + r = fontImpl->SetSize(__titleFontSize); + SysTryReturn(NID_UI_CTRL, !(IsFailed(r)), r, r, "SetSize is failed."); + + r = __pTitleTextObject->SetFont(pFont, 0, __pTitleTextObject->GetTextLength()); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Unable to set font."); + } + } + + if (fontChange == EDIT_FONT_CHANGE_CONTENT || fontChange == EDIT_FONT_CHANGE_ALL) + { + r = fontImpl->SetSize(__contentFontSize); + SysTryReturn(NID_UI_CTRL, !(IsFailed(r)), r, r, "SetSize is failed."); + + unsigned long style = FONT_STYLE_PLAIN; + + if (__contentTextStyle & TEXT_BOX_TEXT_STYLE_BOLD) + { + style |= FONT_STYLE_BOLD; + } + if (__contentTextStyle & TEXT_BOX_TEXT_STYLE_ITALIC) + { + style |= FONT_STYLE_ITALIC; + } + + fontImpl->SetStyle(style); + + if (__contentTextStyle & TEXT_BOX_TEXT_STYLE_UNDERLINE) + { + fontImpl->SetUnderline(true); + } + if (__contentTextStyle & TEXT_BOX_TEXT_STYLE_STRIKEOUT) + { + fontImpl->SetStrikeOut(true); + } + + if (__pTextObject) + { + 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 (__pGuideTextObject) + { + r = __pGuideTextObject->SetFont(pFont, 0, __pGuideTextObject->GetTextLength()); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Unable to set font."); + } + } + + __pFont = pFont; + + if (__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN) + { + ResetTextBounds(); + } + + return r; +} + +String +_EditPresenter::GetTitleFontFaceName(void) +{ + return __titleFontFaceName; +} + +result +_EditPresenter::GetFontType(String& typefaceName, unsigned long& styleMask) const +{ + result r = E_SUCCESS; + + if (__pFont) + { + typefaceName = __pFont->GetFaceName(); + } + + styleMask = __contentTextStyle; + + return r; +} + +result +_EditPresenter::SetFontType(const String& typefaceName, unsigned long styleMask) +{ + result r = E_SUCCESS; + + Font* pFont = null; + IList* systemFontList = Font::GetSystemFontListN(); + SysTryReturnResult(NID_UI_CTRL, systemFontList, E_SYSTEM, "Unable to get system font list.\n"); + + int fontListCount = systemFontList->GetCount(); + String tempFontFaceName; + bool isFaceNameAvailable = false; + + float textSize = __pFont->GetSizeF(); + unsigned long fontStyle = FONT_STYLE_PLAIN; + + if (styleMask & TEXT_BOX_TEXT_STYLE_ITALIC) + { + fontStyle |= FONT_STYLE_ITALIC; + } + if (styleMask & TEXT_BOX_TEXT_STYLE_BOLD) + { + fontStyle |= FONT_STYLE_BOLD; + } + + for (int i = 0; i < fontListCount; i++) + { + tempFontFaceName = *static_cast(systemFontList->GetAt(i)); + + 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"); + + // check font face name. + if (typefaceName.Equals(pFont->GetFaceName(), true)) + { + isFaceNameAvailable = true; + break; + } + + delete pFont; + pFont = null; + } + + SysTryCatch(NID_UI_CTRL, isFaceNameAvailable, , r = E_INVALID_ARG, "The unsupported font face name is given.\n"); + + if (styleMask & TEXT_BOX_TEXT_STYLE_UNDERLINE) + { + pFont->SetUnderline(true); + } + if (styleMask & TEXT_BOX_TEXT_STYLE_STRIKEOUT) + { + pFont->SetStrikeOut(true); + } + + __contentFontStyle = fontStyle; + __contentTextStyle = styleMask; + + __pFont = pFont; + + systemFontList->RemoveAll(true); + delete systemFontList; + systemFontList = null; + + if (__pTextObject) + { + r = __pTextObject->SetFont(__pFont, 0, __pTextObject->GetTextLength()); + __ContentTextStatus = EDIT_TEXT_STATUS_COMPOSE_NON; + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, GetLastResult(), "Unable to set font."); + } + + return r; +CATCH: + if (pFont) + { + delete pFont; + pFont = null; + } + + systemFontList->RemoveAll(true); + delete systemFontList; + systemFontList = null; + + return r; +} + +unsigned long +_EditPresenter::GetTextStyle(void) const +{ + return __contentTextStyle; +} + +result +_EditPresenter::SetTextStyle(unsigned long textStyle) +{ + result r = E_SUCCESS; + + _FontImpl* fontImpl = _FontImpl::GetInstance(*__pFont); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, fontImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + unsigned long style = FONT_STYLE_PLAIN; + + if (textStyle & TEXT_BOX_TEXT_STYLE_BOLD) + { + style |= FONT_STYLE_BOLD; + } + if (textStyle & TEXT_BOX_TEXT_STYLE_ITALIC) + { + style |= FONT_STYLE_ITALIC; + } + + fontImpl->SetStyle(style); + + if (textStyle & TEXT_BOX_TEXT_STYLE_UNDERLINE) + { + fontImpl->SetUnderline(true); + } + else + { + fontImpl->SetUnderline(false); + } + + if (textStyle & TEXT_BOX_TEXT_STYLE_STRIKEOUT) + { + fontImpl->SetStrikeOut(true); + } + else + { + fontImpl->SetStrikeOut(false); + } + + if (__pTextObject) + { + 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 (__pGuideTextObject) + { + r = __pGuideTextObject->SetFont(__pFont, 0, __pGuideTextObject->GetTextLength()); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Unable to set font."); + } + + __contentTextStyle = textStyle; + + return r; +} + +String +_EditPresenter::GetGuideText(void) const +{ + return __guideText; +} + +result +_EditPresenter::SetGuideText(const String& guideText) +{ + result r = E_SUCCESS; + + int length = guideText.GetLength(); + + __guideText = String(guideText); + wchar_t* tempString = const_cast(__guideText.GetPointer()); + + // guide text + if (__pGuideTextObject != null) + { + delete __pGuideTextObject; + __pGuideTextObject = null; + } + + __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); + + __pGuideTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); + __pGuideTextObject->SetFont(__pFont, 0, __pGuideTextObject->GetTextLength()); + + AdjustRTLTextAlignment(EDIT_TEXT_TYPE_GUIDE); + + if (!(__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE)) + { + __pGuideTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_WORD); + } + else + { + __pGuideTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE); + } + + __pEdit->UpdateAccessibilityElement(EDIT_ACCESSIBILITY_ELEMENT_TYPE_TEXT); + + return r; +} + +String +_EditPresenter::GetTitleText(void) const +{ + return __titleText; +} + +result +_EditPresenter::SetTitleText(const String& title) +{ + result r = E_SUCCESS; + + int length = title.GetLength(); + + __titleText = String(title); + wchar_t* tempString = const_cast(__titleText.GetPointer()); + + if (__pTitleTextObject != null) + { + delete __pTitleTextObject; + __pTitleTextObject = null; + } + + __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); + + AdjustRTLTextAlignment(EDIT_TEXT_TYPE_TITLE); + __pTitleTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE); + __pTitleTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); + __pTitleTextObject->Compose(); + + float titleFontSize = 0.0f; + GET_SHAPE_CONFIG(EDIT::DEFAULT_TITLE_FONT_SIZE, __pEdit->GetOrientation(), titleFontSize); + + __titleFontSize = titleFontSize; + + _FontImpl* fontImpl = _FontImpl::GetInstance(*__pFont); + 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()); + + r = fontImpl->SetSize(__contentFontSize); + SysTryReturn(NID_UI_CTRL, !(IsFailed(r)), r, r, "SetSize is failed."); + + __pEdit->UpdateAccessibilityElement(EDIT_ACCESSIBILITY_ELEMENT_TYPE_TEXT); + + return r; +} + +int +_EditPresenter::GetTextLineCount(void) const +{ + if (GetTextLength() == 0) + { + return 0; + } + + if (__isInitialized == false) + { + __pTextObject->SetBounds(__textObjectBounds); + __pTextObject->Compose(); + } + + return __pTextObject->GetTotalLineCount(); +} + +int +_EditPresenter::GetTextTotalHeight(void) const +{ + if (GetTextLength() == 0) + { + return 0; + } + + if (__isInitialized == false) + { + __pTextObject->SetBounds(__textObjectBounds); + __pTextObject->Compose(); + } + + return __pTextObject->GetTotalHeight(); +} + +float +_EditPresenter::GetTextTotalHeightF(void) const +{ + if (GetTextLength() == 0) + { + return 0; + } + + if (__isInitialized == false) + { + __pTextObject->SetBounds(__textObjectBounds); + __pTextObject->Compose(); + } + + return __pTextObject->GetTotalHeightF(); +} + +result +_EditPresenter::Resize(void) +{ + SetClientBounds(); + SetInitialBounds(); + + __pTextObject->SetBounds(__textObjectBounds); + __pTextObject->Compose(); + __isCursorChanged = true; + __pTextObject->ConvertToRowColumn(__cursorPos, __rowCursorIndex, __columnCursorIndex); + + __pTextObject->SetFirstDisplayLineIndex(0); + __pTextObject->SetFirstDisplayPositionY(0); + + if (!(__pEdit->GetEditStyle() & EDIT_STYLE_NOSCROLL)) + { + if (__pScrollBar == null) + { + __pScrollBar = _Scroll::CreateScrollN(*__pEdit, + SCROLL_DIRECTION_VERTICAL, + true, + false, + false, + false, + 1, + 1, + 0); + SysTryReturn(NID_UI_CTRL, __pScrollBar != null, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Failed to create the scroll."); + __pEdit->AttachSystemChild(*__pScrollBar); + } + __pScrollBar->SetScrollVisibility(false); + __pScrollBar->OnParentBoundsChanged(); + } + + __verticalMargin = __pEdit->GetBoundsF().height - __textObjectBounds.height; + + if (__pEdit->GetEditStyle() & EDIT_STYLE_FLEXIBLE) + { + if (__initialBounds.height > __verticalMargin) + { + if (__initialBounds.height > __pEdit->GetBoundsF().height) + { + __prevTotalTextHeight = __initialBounds.height - __verticalMargin; + } + else + { + __prevTotalTextHeight = __pEdit->GetBoundsF().height - __verticalMargin; + } + } + } + + if (__isInputConnectionBound) + { + SysLog(NID_UI_CTRL, "Edit's bounds chagned, scroll position should be recalculated."); + ScrollPanelToCursorPosition(); + } + + return E_SUCCESS; +} + + +void +_EditPresenter::SetClientBounds(void) +{ + int editStyle = __pEdit->GetEditStyle(); + + __clientBounds = __pEdit->GetBoundsF(); + __clientBounds.x = 0.0f; + __clientBounds.y = 0.0f; + + if (!(editStyle & EDIT_STYLE_SINGLE_LINE)) + { + return; + } + + float leftBorder = 0.0f; + float rightBorder = 0.0f; + float topBorder = 0.0f; + float bottomBorder = 0.0f; + float leftMargin = 0.0f; + float rightMargin = 0.0f; + float topMargin = 0.0f; + float bottomMargin = 0.0f; + _ControlOrientation orientation = __pEdit->GetOrientation(); + + GET_SHAPE_CONFIG(EDIT::FIELD_LEFT_MARGIN, orientation, leftMargin); + GET_SHAPE_CONFIG(EDIT::FIELD_RIGHT_MARGIN, orientation, rightMargin); + GET_SHAPE_CONFIG(EDIT::FIELD_TOP_MARGIN, orientation, topMargin); + GET_SHAPE_CONFIG(EDIT::FIELD_BOTTOM_MARGIN, orientation, bottomMargin); + + if (editStyle & EDIT_STYLE_TITLE_LEFT) + { + float titleWidth = 0.0f; + if (__titleWidth != -1.0f) + { + titleWidth = __titleWidth; + } + else + { + GET_SHAPE_CONFIG(EDIT::FIELD_TITLE_RECT_WIDTH, orientation, titleWidth); + } + + leftBorder = titleWidth; + rightBorder = rightMargin; + topBorder = topMargin; + bottomBorder = bottomMargin; + } + else if (editStyle & EDIT_STYLE_TITLE_TOP) + { + result r = E_SUCCESS; + float titletHeight = 0.0f; + float titleTextTopMargin = 0.0f; + GET_SHAPE_CONFIG(EDIT::FIELD_TITLE_RECT_HEIGHT, orientation, titletHeight); + GET_SHAPE_CONFIG(EDIT::FIELD_TITLE_TEXT_TOP_MARGIN, orientation, titleTextTopMargin); + + _FontImpl* fontImpl = _FontImpl::GetInstance(*__pFont); + SysTryReturnVoidResult(NID_UI_CTRL, fontImpl != null, E_SYSTEM, "[E_SYSTEM] fontImpl is null."); + + float originalSize = fontImpl->GetSizeF(); + float titleFontSize = 0.0f; + GET_SHAPE_CONFIG(EDIT::DEFAULT_TITLE_FONT_SIZE, __pEdit->GetOrientation(), titleFontSize); + + r = fontImpl->SetSize(titleFontSize); + SysTryReturnVoidResult(NID_UI_CTRL, !(IsFailed(r)), r, "[%s] Propagating.", GetErrorMessage(r)); + + if (titletHeight < fontImpl->GetMaxHeightF()) + { + titleTextTopMargin -= (fontImpl->GetMaxHeightF()-titletHeight); + titletHeight = fontImpl->GetMaxHeightF(); + } + + r = fontImpl->SetSize(originalSize); + SysTryReturnVoidResult(NID_UI_CTRL, !(IsFailed(r)), r, "[%s] Propagating.", GetErrorMessage(r)); + + leftBorder = leftMargin; + rightBorder = rightMargin; + topBorder = titletHeight + titleTextTopMargin; + bottomBorder = bottomMargin; + } + + __clientBounds.x = leftBorder; + __clientBounds.y = topBorder; + __clientBounds.width -= leftBorder + rightBorder; + __clientBounds.height -= topBorder + bottomBorder; + + return; +} + +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; + int editStyle = __pEdit->GetEditStyle(); + float bottomMargin = 0.0f; + float textLeftMargin = 0.0f; + float textRightMargin =0.0f; + float textTopMargin = 0.0f; + float textBottomMargin = 0.0f; + float titleTextLeftMargin = 0.0f; + float titleTextRightMargin =0.0f; + float titleTextTopMargin = 0.0f; + float titleTextBottomMargin = 0.0f; + float titletHeight = 0.0f; + _ControlOrientation orientation = __pEdit->GetOrientation(); + + GET_SHAPE_CONFIG(EDIT::FIELD_BOTTOM_MARGIN, orientation, bottomMargin); + GET_SHAPE_CONFIG(EDIT::FIELD_TEXT_LEFT_MARGIN, orientation, textLeftMargin); + GET_SHAPE_CONFIG(EDIT::FIELD_TEXT_RIGHT_MARGIN, orientation, textRightMargin); + GET_SHAPE_CONFIG(EDIT::FIELD_TEXT_TOP_MARGIN, orientation, textTopMargin); + GET_SHAPE_CONFIG(EDIT::FIELD_TEXT_BOTTOM_MARGIN, orientation, textBottomMargin); + GET_SHAPE_CONFIG(EDIT::FIELD_TITLE_TEXT_LEFT_MARGIN, orientation, titleTextLeftMargin); + 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::FIELD_TITLE_RECT_HEIGHT, orientation, titletHeight); + + if (!(editStyle & EDIT_STYLE_SINGLE_LINE)) + { + return E_SYSTEM; + } + + if (editStyle & EDIT_STYLE_CLEAR) + { + __isClearIconVisible = false; + } + + FloatRectangle bounds = __pEdit->GetBoundsF(); + if (editStyle & EDIT_STYLE_TITLE_LEFT) + { + __textObjectBounds.x = __clientBounds.x + textLeftMargin; + __textObjectBounds.y = __clientBounds.y + textTopMargin; + __textObjectBounds.width = __clientBounds.width - textLeftMargin + - textRightMargin; + __textObjectBounds.height = __clientBounds.height - textTopMargin + - textBottomMargin; + + __titleBounds.x = titleTextLeftMargin; + __titleBounds.y = titleTextTopMargin; + __titleBounds.width = bounds.width - __clientBounds.width - __titleBounds.x; + __titleBounds.height = __clientBounds.height - titleTextTopMargin - titleTextBottomMargin; + } + else if (editStyle & EDIT_STYLE_TITLE_TOP) + { + __textObjectBounds.x = __clientBounds.x + textLeftMargin; + __textObjectBounds.y = __clientBounds.y; + __textObjectBounds.width = __clientBounds.width - textLeftMargin + - textRightMargin; + __textObjectBounds.height = __clientBounds.height - textBottomMargin; + + __titleBounds.x = titleTextLeftMargin; + + _FontImpl* fontImpl = _FontImpl::GetInstance(*__pFont); + SysTryReturnResult(NID_UI_CTRL, fontImpl != null, E_SYSTEM, "fontImpl is null."); + + float originalSize = fontImpl->GetSizeF(); + float titleFontSize = 0.0f; + GET_SHAPE_CONFIG(EDIT::DEFAULT_TITLE_FONT_SIZE, __pEdit->GetOrientation(), titleFontSize); + + r = fontImpl->SetSize(titleFontSize); + SysTryReturnResult(NID_UI_CTRL, !(IsFailed(r)), r, "SetSize is failed."); + + if (titletHeight < fontImpl->GetMaxHeightF()) + { + titleTextTopMargin -= (fontImpl->GetMaxHeightF()-titletHeight); + } + + r = fontImpl->SetSize(originalSize); + SysTryReturnResult(NID_UI_CTRL, !(IsFailed(r)), r, "SetSize is failed."); + + __titleBounds.y = titleTextTopMargin; + __titleBounds.width = bounds.width - __titleBounds.x - titleTextRightMargin; + __titleBounds.height = bounds.height - __titleBounds.y - __clientBounds.height - bottomMargin; + } + else if ((editStyle & EDIT_STYLE_NORMAL) || (editStyle & EDIT_STYLE_CLEAR)) + { + __textObjectBounds = __clientBounds; + float tempLeftMargin = __pEdit->GetHorizontalMarginF(EDIT_TEXT_LEFT_MARGIN); + float tempRightMargin = __pEdit->GetHorizontalMarginF(EDIT_TEXT_RIGHT_MARGIN); + + if (tempLeftMargin != -1.0f) + { + __textObjectBounds.x = __clientBounds.x + tempLeftMargin; + __textObjectBounds.width = __clientBounds.width - tempLeftMargin; + } + else + { + __textObjectBounds.x = __clientBounds.x + textLeftMargin; + __textObjectBounds.width = __clientBounds.width - textLeftMargin; + } + + if (tempRightMargin != -1.0f) + { + __textObjectBounds.width -= tempRightMargin; + } + else + { + __textObjectBounds.width -= textRightMargin; + } + + __textObjectBounds.y = __clientBounds.y + textTopMargin; + __textObjectBounds.height = __clientBounds.height - textTopMargin - textBottomMargin; + } + else + { + float tempLeftMargin = __pEdit->GetHorizontalMarginF(EDIT_TEXT_LEFT_MARGIN); + float tempRightMargin = __pEdit->GetHorizontalMarginF(EDIT_TEXT_RIGHT_MARGIN); + if (tempLeftMargin != -1.0f) + { + __textObjectBounds.x = __clientBounds.x + tempLeftMargin; + __textObjectBounds.width = __clientBounds.width - tempLeftMargin; + } + else + { + __textObjectBounds.x = __clientBounds.x + textLeftMargin; + __textObjectBounds.width = __clientBounds.width - textLeftMargin; + } + + if (tempRightMargin != -1.0f) + { + __textObjectBounds.width -= tempRightMargin; + } + else + { + __textObjectBounds.width -= textRightMargin; + } + __textObjectBounds.y = __clientBounds.y + textTopMargin; + __textObjectBounds.height = __clientBounds.height - textTopMargin - textBottomMargin; + } + + 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; + } + + if (__textObjectBounds.height <= textObjectMinimumHeight) + { + __textObjectBounds.height = __contentFontSize; + } + else if (__textObjectBounds.height < __contentFontSize) + { + __textObjectBounds.y -= (__contentFontSize - __textObjectBounds.height)/2.0f; + __textObjectBounds.height = __contentFontSize; + } + + if (editStyle & EDIT_STYLE_TITLE_LEFT) + { + float gap = 0.0f; + if (__titleBounds.width < textObectMinimumWidth) + { + gap = textObectMinimumWidth - __titleBounds.width; + __titleBounds.width = textObectMinimumWidth; + __textObjectBounds.x += gap; + } + if (__titleBounds.height < __titleFontSize) + { + __titleBounds.height = __titleFontSize; + } + } + + return r; +} + +result +_EditPresenter::SetInitialBounds(void) +{ + result r = E_SUCCESS; + FloatRectangle bounds = __pEdit->GetBoundsF(); + int editStyle = __pEdit->GetEditStyle(); + + if (editStyle & EDIT_STYLE_SINGLE_LINE) + { + r = SetInitialEditFieldBounds(); + __textBoxBounds.x = 0.0f; + __textBoxBounds.y = 0.0f; + __textBoxBounds.width = bounds.width; + __textBoxBounds.height = bounds.height; + + return r; + } + + float leftMargin = 0.0f; + float rightMargin = 0.0f; + float topMargin = 0.0f; + float bottomMargin = 0.0f; + float textLeftMargin = 0.0f; + float textRightMargin =0.0f; + float textTopMargin = 0.0f; + float textBottomMargin = 0.0f; + float titleRectWidth = 0.0f; + float titleRectHeight = 0.0f; + float titleTextLeftMargin = 0.0f; + float titleTextRightMargin = 0.0f; + float titleTextTopMargin = 0.0f; + float titleTextBottomMargin = 0.0f; + float scrollWidth = 0.0f; + _ControlOrientation orientation = __pEdit->GetOrientation(); + + GET_SHAPE_CONFIG(EDIT::AREA_LEFT_MARGIN, orientation, leftMargin); + GET_SHAPE_CONFIG(EDIT::AREA_RIGHT_MARGIN, orientation, rightMargin); + GET_SHAPE_CONFIG(EDIT::AREA_TOP_MARGIN, orientation, topMargin); + GET_SHAPE_CONFIG(EDIT::AREA_BOTTOM_MARGIN, orientation, bottomMargin); + GET_SHAPE_CONFIG(EDIT::AREA_TEXT_LEFT_MARGIN, orientation, textLeftMargin); + GET_SHAPE_CONFIG(EDIT::AREA_TEXT_RIGHT_MARGIN, orientation, textRightMargin); + GET_SHAPE_CONFIG(EDIT::AREA_TEXT_TOP_MARGIN, orientation, textTopMargin); + GET_SHAPE_CONFIG(EDIT::AREA_TEXT_BOTTOM_MARGIN, orientation, textBottomMargin); + GET_SHAPE_CONFIG(EDIT::AREA_TITLE_RECT_WIDTH, orientation, titleRectWidth); + GET_SHAPE_CONFIG(EDIT::AREA_TITLE_RECT_HEIGHT, orientation, titleRectHeight); + GET_SHAPE_CONFIG(EDIT::AREA_TITLE_TEXT_LEFT_MARGIN, orientation, titleTextLeftMargin); + GET_SHAPE_CONFIG(EDIT::AREA_TITLE_TEXT_RIGHT_MARGIN, orientation, titleTextRightMargin); + GET_SHAPE_CONFIG(EDIT::AREA_TITLE_TEXT_TOP_MARGIN, orientation, titleTextTopMargin); + GET_SHAPE_CONFIG(EDIT::AREA_TITLE_TEXT_BOTTOM_MARGIN, orientation, titleTextBottomMargin); + GET_SHAPE_CONFIG(EDIT::AREA_SCROLL_WIDTH, orientation, scrollWidth); + + if (editStyle & EDIT_STYLE_TITLE_TOP) + { + __textBoxBounds.x = leftMargin; + __textBoxBounds.y = titleRectHeight + titleTextTopMargin; + __textBoxBounds.width = bounds.width - leftMargin - rightMargin; + __textBoxBounds.height = bounds.height - titleRectHeight - titleTextTopMargin - bottomMargin; + } + else if (editStyle & EDIT_STYLE_TITLE_LEFT) + { + float titleWidth = 0.0f; + + if (__titleWidth != -1.0f) + { + titleWidth = __titleWidth; + } + else + { + titleWidth = titleRectWidth; + } + __textBoxBounds.x = titleWidth; + __textBoxBounds.y = topMargin; + __textBoxBounds.width = bounds.width - titleWidth - leftMargin; + __textBoxBounds.height = bounds.height - topMargin - bottomMargin; + } + else + { + __textBoxBounds.x = 0.0f; + __textBoxBounds.y = 0.0f; + __textBoxBounds.width = bounds.width; + __textBoxBounds.height = bounds.height; + } + + // setting textBounds + if (editStyle & EDIT_STYLE_TITLE_TOP) + { + if (__pEdit->GetHorizontalMarginF(EDIT_TEXT_LEFT_MARGIN) != -1.0f) + { + __textObjectBounds.x = __textBoxBounds.x + __pEdit->GetHorizontalMarginF(EDIT_TEXT_LEFT_MARGIN); + __textObjectBounds.width = __textBoxBounds.width - __pEdit->GetHorizontalMarginF(EDIT_TEXT_LEFT_MARGIN); + } + else + { + __textObjectBounds.x = __textBoxBounds.x + textLeftMargin; + __textObjectBounds.width = __textBoxBounds.width - textLeftMargin; + } + + if (__pEdit->GetHorizontalMarginF(EDIT_TEXT_RIGHT_MARGIN) != -1.0f) + { + __textObjectBounds.width -= __pEdit->GetHorizontalMarginF(EDIT_TEXT_RIGHT_MARGIN); + } + else + { + __textObjectBounds.width -= textRightMargin; + + } + + __textObjectBounds.y = __textBoxBounds.y; + __textObjectBounds.height = __textBoxBounds.height - textBottomMargin; + } + else + { + if (__pEdit->GetHorizontalMarginF(EDIT_TEXT_LEFT_MARGIN) != -1.0f) + { + __textObjectBounds.x = __textBoxBounds.x + __pEdit->GetHorizontalMarginF(EDIT_TEXT_LEFT_MARGIN); + __textObjectBounds.width = __textBoxBounds.width - __pEdit->GetHorizontalMarginF(EDIT_TEXT_LEFT_MARGIN); + } + else + { + __textObjectBounds.x = __textBoxBounds.x + textLeftMargin; + __textObjectBounds.width = __textBoxBounds.width - textLeftMargin; + } + + if (__pEdit->GetHorizontalMarginF(EDIT_TEXT_RIGHT_MARGIN) != -1.0f) + { + __textObjectBounds.width -= __pEdit->GetHorizontalMarginF(EDIT_TEXT_RIGHT_MARGIN); + } + else + { + __textObjectBounds.width -= textRightMargin; + + } + + if (__pEdit->GetVerticalMarginF(EDIT_TEXT_TOP_MARGIN) != -1.0f) + { + __textObjectBounds.y = __textBoxBounds.y + __pEdit->GetVerticalMarginF(EDIT_TEXT_TOP_MARGIN); + __textObjectBounds.height = __textBoxBounds.height - __pEdit->GetVerticalMarginF(EDIT_TEXT_TOP_MARGIN); + } + else + { + __textObjectBounds.y = __textBoxBounds.y + textTopMargin; + __textObjectBounds.height = __textBoxBounds.height - textTopMargin; + } + + if (__pEdit->GetVerticalMarginF(EDIT_TEXT_BOTTOM_MARGIN) != -1.0f) + { + __textObjectBounds.height -= __pEdit->GetVerticalMarginF(EDIT_TEXT_BOTTOM_MARGIN); + } + else + { + __textObjectBounds.height -= textBottomMargin; + } + } + + if (editStyle & EDIT_STYLE_TITLE_TOP) + { + __titleBounds.x = titleTextLeftMargin; + __titleBounds.y = titleTextTopMargin; + __titleBounds.width = bounds.width - titleTextLeftMargin + - titleTextRightMargin; + __titleBounds.height = bounds.height - __textBoxBounds.height - __titleBounds.y + - bottomMargin; + + } + else if (editStyle & EDIT_STYLE_TITLE_LEFT) + { + __titleBounds.x = titleTextLeftMargin; + __titleBounds.y = titleTextTopMargin; + __titleBounds.width = bounds.width - __textBoxBounds.width - __titleBounds.x + - titleTextRightMargin; + __titleBounds.height = __textBoxBounds.height - titleTextTopMargin + - titleTextBottomMargin; + } + + if (editStyle & EDIT_STYLE_NOSCROLL) + { + __isScrollBarVisible = false; + __scrollBarBounds.x = 0.0f; + __scrollBarBounds.y = 0.0f; + __scrollBarBounds.width = 0.0f; + __scrollBarBounds.height = 0.0f; + } + else + { + __scrollBarBounds.width = scrollWidth; + + __scrollBarBounds.x = bounds.width - __scrollBarBounds.width; + __scrollBarBounds.y = __textBoxBounds.y + textTopMargin; + __scrollBarBounds.height = __textBoxBounds.height - textTopMargin - textBottomMargin; + if (__scrollBarBounds.height < 0.0f) + { + __scrollBarBounds.height = 0.0f; + } + + __isScrollBarVisible = true; + + if (editStyle & EDIT_STYLE_TITLE_TOP) + { + __titleBounds.width -= __scrollBarBounds.width; + } + } + + float textObectMinimumWidth = 0.0f; + GET_SHAPE_CONFIG(EDIT::TEXT_OBJECT_MININMUM_WIDTH, orientation, textObectMinimumWidth); + + if (__textObjectBounds.width < textObectMinimumWidth) + { + __textObjectBounds.width = textObectMinimumWidth; + } + + if (__textObjectBounds.height < __contentFontSize) + { + __textObjectBounds.height = __contentFontSize; + } + + return r; +} + +void +_EditPresenter::StopTitleSlidingTimer(void) +{ + if (__pTitleSlidingTimer) + { + __pTitleSlidingTimer->Cancel(); + delete __pTitleSlidingTimer; + __pTitleSlidingTimer = null; + } + + return; +} + +result +_EditPresenter::StartTitleSlidingTimer(void) +{ + result r = E_SUCCESS; + + if (__pTitleSlidingTimer == null) + { + __pTitleSlidingTimer = new (std::nothrow) Timer(); + SysTryReturnResult(NID_UI_CTRL, __pTitleSlidingTimer, E_OUT_OF_MEMORY, "Memory allocation failed."); + + r = __pTitleSlidingTimer->Construct(*this); + if (IsFailed(r)) + { + goto CATCH; + } + } + r = __pTitleSlidingTimer->Start(TITLE_SLIDING_TIME); + if (IsFailed(r)) + { + goto CATCH; + } + return r; + +CATCH: + StopTitleSlidingTimer(); + return r; +} + +result +_EditPresenter::OnTitleSlidingTimerExpired(void) +{ + result r = E_SUCCESS; + + if (!IsCurrentFocused()) + { + StopTitleSlidingTimer(); + return r; + } + + if (__pTitleTextObject->IsChanged()) + { + r = DrawTitleText(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "A system error has occurred. Failed to draw title text"); + } + + Canvas* pTitleTextCanvas = __pTitleTextVisualElement->GetCanvasN(); + SysTryReturnResult(NID_UI_CTRL, pTitleTextCanvas, E_SYSTEM, "A system error has occurred. Failed to get canvas of VisualElement"); + + if (__isTouchPressed) + { + pTitleTextCanvas->SetBackgroundColor(__pEdit->GetColor(EDIT_STATUS_PRESSED)); + } + else + { + pTitleTextCanvas->SetBackgroundColor(__pEdit->GetColor(EDIT_STATUS_HIGHLIGHTED)); + } + + pTitleTextCanvas->Clear(); + __pTitleTextObject->DrawWithOffset(*_CanvasImpl::GetInstance(*pTitleTextCanvas)); + r = pTitleTextCanvas->Show(); + + delete pTitleTextCanvas; + + r = StartTitleSlidingTimer(); + + return r; +} + +result +_EditPresenter::ChangePasswordToEchoCharacter(int cursorPos, int textLength) +{ + result r = E_SUCCESS; + + if (!(__pEdit->GetEditStyle() & EDIT_STYLE_PASSWORD)) + { + return E_SYSTEM; + } + + if (__isPasswordVisible) + { + return r; + } + + StartPasswordTimer(); + if (IsBlocked() == true) + { + __pTextObject->SetRange(cursorPos, textLength); + } + else + { + __pTextObject->NotifyTextChanged(__pTextBuffer, 0, __pTextString->GetLength(), 0); + } + + return r; +} + +void +_EditPresenter::StopPasswordTimer(void) +{ + if (__pPasswordTimer) + { + __pPasswordTimer->Cancel(); + delete __pPasswordTimer; + __pPasswordTimer = null; + } + + return; +} + +result +_EditPresenter::StartPasswordTimer(void) +{ + result r = E_SUCCESS; + + if (__isPasswordVisible) + { + return r; + } + + if (__pPasswordTimer == null) + { + __pPasswordTimer = new (std::nothrow) Timer(); + SysTryReturnResult(NID_UI_CTRL, __pPasswordTimer, E_OUT_OF_MEMORY, "Memory allocation failed."); + + r = __pPasswordTimer->Construct(*this); + if (IsFailed(r)) + { + StopPasswordTimer(); + return r; + } + } + + r = __pPasswordTimer->Start(EDIT_PASSWORD_TIMER_PERIOD); + if (IsFailed(r)) + { + StopPasswordTimer(); + } + + return r; +} + +result +_EditPresenter::OnPasswordTimerExpired(void) +{ + result r = E_SUCCESS; + + if (!IsCurrentFocused()) + { + return E_SYSTEM; + } + + ReplaceTextIntoPasswordHyphenString(); + if (__composingTextLength > 0) + { + _FontImpl* fontImpl = _FontImpl::GetInstance(*__pFont); + SysTryReturnResult(NID_UI_CTRL, fontImpl != null, E_SYSTEM, "fontImpl is null."); + fontImpl->SetUnderline(false); + int composingStartPosition = GetCursorPosition()-__composingTextLength; + __pTextObject->SetFont(__pFont, composingStartPosition, composingStartPosition+__composingTextLength); + } + + __isCursorChanged = true; + + __pEdit->Invalidate(); + + return r; +} + +result +_EditPresenter::ReplaceTextIntoPasswordHyphenString(void) +{ + result r = E_SUCCESS; + + if (__isPasswordVisible) + { + return r; + } + + if (__pEdit->GetEditStyle() & EDIT_STYLE_PASSWORD) + { + if (GetTextLength() > 0) + { + ChangePasswordToEchoCharacter(__pTextBuffer, __echoChar); + __isCursorChanged = true; + } + } + + return r; +} + +result +_EditPresenter::ChangePasswordToEchoCharacter(wchar_t* dspStrBuffer, wchar_t echoChar) +{ + result r = E_SUCCESS; + + if (__isPasswordVisible) + { + return r; + } + + int bufferLength = GetTextLength(); + + for (int i = 0; i < bufferLength && i < EDIT_PASSWORD_BUFFER_MAX - 1; i++) + { + dspStrBuffer[i] = echoChar; + } + dspStrBuffer[bufferLength] = null; + __isCursorChanged = true; + + __pTextObject->NotifyTextChanged(__pTextBuffer, 0, __pTextString->GetLength(), 0); + UpdateComponentInformation(); + + return r; +} + +result +_EditPresenter::ChangePasswordToPlainText(void) +{ + result r = E_SUCCESS; + + if (__isPasswordVisible == false) + { + return r; + } + + if (__pEdit->GetEditStyle() & EDIT_STYLE_PASSWORD) + { + int textLength = GetTextLength(); + if ((textLength > 0) && (textLength <= __limitLength)) + { + wchar_t* tempString = const_cast(__pTextString->GetPointer()); + for (int i = 0; i < textLength; i++) + { + __pTextBuffer[i] = tempString[i]; + } + __pTextBuffer[textLength] = 0; + __pTextObject->RemoveAll(); + TextSimple* pSimpleText = new (std::nothrow)TextSimple(__pTextBuffer, textLength,TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL, __pFont); + __pTextObject->AppendElement(*pSimpleText); + __pTextObject->Compose(); + __isCursorChanged = true; + } + } + + return r; +} + +result +_EditPresenter::SetAutoResizingEnabled(bool enable) +{ + return __pEditModel->SetAutoResizingEnabled(enable); +} + +bool +_EditPresenter::IsAutoResizingEnabled(void) const +{ + return __pEditModel->IsAutoResizingEnabled(); +} + +float +_EditPresenter::CalculateFlexibleHeightF(void) +{ + float height = 0.0f; + float expectedEditHeight = __pTextObject->GetTotalHeightF() + __verticalMargin; + int lineCount = __pTextObject->GetTotalLineCount(); + + if (__pTextObject->GetTotalHeight()) + { + if ((lineCount >= MAX_LINE_NUMBER) && (GetMaxLineCount() > MAX_LINE_NUMBER)) + { + height = MAX_LINE_NUMBER * __pTextObject->GetLineHeightAtF(0) + __verticalMargin; + return height; + } + + float maxHeight = CalculateMaximumFlexibleHeight(); + + //If InitialBounds is more than expectedEdit height, set flexible height as initial height + if (expectedEditHeight < __initialBounds.height) + { + height = __initialBounds.height; + } + else if (expectedEditHeight >= maxHeight) + { + height = maxHeight; + } + else + { + height = expectedEditHeight; + } + } + else + { + height = __initialBounds.height; + } + + FloatDimension flexHeightDim = CoordinateSystem::AlignToDevice(FloatDimension(0, height)); + return flexHeightDim.height; +} + +result +_EditPresenter::AdjustFlexibleHeight(void) +{ + result r = E_SUCCESS; + + if (__isFlexibleHeightFrozen == true) + { + return E_SYSTEM; + } + + __pTextObject->Compose(); + + if (__prevTotalTextHeight == __pTextObject->GetTotalHeightF()) // if text height has not changed. + { + __prevTotalTextHeight = __pTextObject->GetTotalHeightF(); + return E_SYSTEM; + } + + // get edit height + FloatRectangle bounds = __pEdit->GetBoundsF(); + float calculateHeight = CalculateFlexibleHeightF(); + + //calculateHeight is being calculated based on AlignToDevice only + if (bounds.height != calculateHeight) + { + bounds.height = calculateHeight; + __prevTotalTextHeight = __pTextObject->GetTotalHeightF(); + + return SetFlexBounds(bounds); + } + __prevTotalTextHeight = __pTextObject->GetTotalHeight(); + return r; +} + +result +_EditPresenter::SetFlexBounds(const FloatRectangle& bounds) +{ + result r = E_SUCCESS; + + _ExpandableEditAreaEventStatus expandableEditAreaStatus = _EXPANDABLE_EDITAREA_EVENT_ADDED; + if (__pEdit->GetBoundsF().height > bounds.height) + { + expandableEditAreaStatus = _EXPANDABLE_EDITAREA_EVENT_REMOVED; + } + else if (__pEdit->GetBoundsF().height < bounds.height) + { + expandableEditAreaStatus = _EXPANDABLE_EDITAREA_EVENT_ADDED; + } + + _VisualElement* pVisualElement = __pEdit->GetVisualElement(); + SysTryReturnResult(NID_UI_CTRL, pVisualElement, E_SYSTEM, "A system error has occurred. Unable to get root visual element."); + + //Modify InitialBounds only on User calls and on Orientation change + if (!((__pEdit->GetEditStyle() & EDIT_STYLE_FLEXIBLE) == false)) + { + __updateInitialBounds = false; + } + + __pEdit->SetBounds(bounds); + __updateInitialBounds = true; + + Resize(); + + __pEdit->Invalidate(); + + __prevTotalTextHeight = __pTextObject->GetTotalHeightF(); + __pEdit->SendExpandableEditAreaEvent(expandableEditAreaStatus, __pTextObject->GetTotalLineCount()); + + return r; +} + +float +_EditPresenter::CalculateMaximumFlexibleHeight(void) +{ + float maxHeight = 0.0f; + int maximumFlexibleLineNumber = GetMaxLineCount(); + + if (maximumFlexibleLineNumber > 0) // if max line number is set. + { + maxHeight = maximumFlexibleLineNumber * __pTextObject->GetLineHeightAtF(0) + __verticalMargin; + + FloatDimension dim = __pEdit->GetMaximumSizeF(); + if (maxHeight > dim.height) + { + maxHeight = dim.height; + } + } + + return maxHeight; +} + +void +_EditPresenter::GetKeypadBoundsEx(Tizen::Graphics::FloatRectangle& bounds) const +{ + bounds.x = __keypadBounds.x; + bounds.y = __keypadBounds.y; + bounds.width = __keypadBounds.width; + bounds.height = __keypadBounds.height; + return; +} + +_Form* +_EditPresenter::GetParentForm(void) +{ + if (!__pEdit) + { + return null; + } + + if (__pParentForm == null) + { + result r = E_SUCCESS; + + _Form* pForm = null; + _Control* pControlCore = null; + + for (pControlCore = __pEdit->GetParent(); pForm == null; pControlCore = pControlCore->GetParent()) + { + if (pControlCore == null) + { + r = E_SYSTEM; + goto CATCH; + } + + pForm = dynamic_cast<_Form*>(pControlCore); + } + return pForm; + } + else + { + return __pParentForm; + } + +CATCH: + return null; +} + +_ScrollPanel* +_EditPresenter::GetParentPanel(void) const +{ + return __pParentPanel; +} + +result +_EditPresenter::SetKeypadCommandButtonVisible(bool visible) +{ + __isKeypadCommandButtonVisible = visible; + return E_SUCCESS; +} + +result +_EditPresenter::SetKeypadCommandButton(CommandButtonPosition position, const String& text, int actionId) +{ + result r = E_SUCCESS; + FooterItem footerItem; + footerItem.Construct(actionId); + footerItem.SetText(text); + __isKeypadCommandButtonUserSetting = true; + + __pEditModel->SetCommandButtonItem(position, actionId, text); + if (__pCommandButton) + { + _Button* pButton = __pCommandButton->GetItem(static_cast(position)); + if (pButton) + { + pButton->SetActionId(actionId); + pButton->SetText(text); + } + } + + return r; +} + +_Toolbar* +_EditPresenter::GetKeypadCommandButton(void) const +{ + return __pCommandButton; +} + +result +_EditPresenter::AddActionEventListener(const _IActionEventListener& listener) +{ + ClearLastResult(); + + if (__pCommandButton) + { + __pCommandButton->AddActionEventListener(listener); + } + + __pActionEventListener = const_cast<_IActionEventListener*>(&listener); + + return E_SUCCESS; +} + +result +_EditPresenter::RemoveActionEventListener(const _IActionEventListener& listener) +{ + ClearLastResult(); + + if (__pCommandButton) + { + __pCommandButton->RemoveActionEventListener(listener); + } + + __pActionEventListener = null; + + return E_SUCCESS; +} + +result +_EditPresenter::SetTextBounds(Rectangle& bounds) +{ + FloatRectangle floatBounds = _CoordinateSystemUtils::ConvertToFloat(bounds); + if (__textObjectBounds != floatBounds) + { + __textObjectBounds = floatBounds; + if (__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN) + { + __pTextObject->SetBounds(__textObjectBounds); + __pTextObject->Compose(); + __isCursorChanged = true; + } + } + return E_SUCCESS; +} + +result +_EditPresenter::SetTextBounds(FloatRectangle& bounds) +{ + if (__textObjectBounds != bounds) + { + __textObjectBounds = bounds; + if (__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN) + { + __pTextObject->SetBounds(__textObjectBounds); + __pTextObject->Compose(); + __isCursorChanged = true; + } + } + return E_SUCCESS; +} + +FloatRectangle +_EditPresenter::GetTextBoundsF(void) const +{ + return __textObjectBounds; +} + +Rectangle +_EditPresenter::GetTextBounds(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(__textObjectBounds); +} + +bool +_EditPresenter::IsKeypadCommandButtonVisible(void) const +{ + return __isKeypadCommandButtonVisible; +} + +String +_EditPresenter::GetKeypadCommandButtonText(CommandButtonPosition position) const +{ + return __pEditModel->GetKeypadCommandButtonText(position); +} + +int +_EditPresenter::GetKeypadCommandButtonActionId(CommandButtonPosition position) const +{ + return __pEditModel->GetKeypadCommandButtonActionId(position); +} + +result +_EditPresenter::DrawScrollBar(void) +{ + result r = E_SUCCESS; + + if (__pScrollBar == null) + { + return E_SYSTEM; + } + + float totalHeight = __pTextObject->GetTotalHeightF(); + float dspHeight = __textObjectBounds.height; + float firstDisplayY = __pTextObject->GetFirstDisplayPositionYF(); + + if (totalHeight <= dspHeight) + { + if (__prevTotalTextHeight != 0.0f && __prevTotalTextHeight == totalHeight) // flexible edit's case + { + return E_SUCCESS; + } + + __pScrollBar->SetScrollRange(1, 1); + __pScrollBar->SetScrollPosition(0.0f); + + __isScrollBarVisible = false; + __previousScrollBarPos = 0.0f; + __previousScrollBarMaxPos = 0.0f; + } + else + { + if (firstDisplayY > 0) + { + __pScrollBar->SetScrollRange(dspHeight, totalHeight); + __pScrollBar->SetScrollPosition(firstDisplayY); + __previousScrollBarMaxPos = totalHeight - dspHeight; + } + else + { + __pScrollBar->SetScrollRange(dspHeight, totalHeight); + __pScrollBar->SetScrollPosition(0.0f); + __previousScrollBarMaxPos = 0.0f; + } + + if (__pScrollBar->GetScrollVisibility()) + { + __isScrollBarVisible = true; + } + + __previousScrollBarPos = firstDisplayY; + } + + return r; +} + +void +_EditPresenter::FadeOutScrollBar(void) +{ + if (__pScrollBar) + { + __pScrollBar->SetScrollVisibility(false); + } + __isScrollBarVisible = false; + + return; +} + +result +_EditPresenter::InitializeFlickAnimation(void) +{ + result r = E_SUCCESS; + + if (__pFlickAnimation == null) + { + __pFlickAnimation = new (std::nothrow) _FlickAnimation(); + SysTryReturnResult(NID_UI_CTRL, __pFlickAnimation, E_OUT_OF_MEMORY, "Memory allocation failed."); + } + + // Init Flick Animation Config + + 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(); + SysTryReturnResult(NID_UI_CTRL, __pFlickAnimationTimer, E_OUT_OF_MEMORY, "Memory allocation failed."); + + r = __pFlickAnimationTimer->Construct(*this); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to construct FlickAnimationTimer.", GetErrorMessage(r)); + + } + + return r; + +CATCH: + delete __pFlickAnimationTimer; + __pFlickAnimationTimer = null; + + return r; +} + +result +_EditPresenter::StartFlickAnimation(const FloatPoint& flickPosition, int flickTime) +{ + // delete Scroll Fadeout Timer + if (!__pScrollBar) + { + return E_SUCCESS; + } + + if (__textObjectBounds.height >= __pTextObject->GetTotalHeightF()) + { + return E_SUCCESS; + } + + if (InitializeFlickAnimation() != E_SUCCESS) + { + return E_SYSTEM; + } + + //We must check the flick animation about float conversion work at later + + // Initialize flick animation + int velocityX = 0; + int velocityY = 0; + + __pFlickAnimation->CalculateInitializeVelocity(_CoordinateSystemUtils::ConvertToInteger(flickPosition.x), _CoordinateSystemUtils::ConvertToInteger(flickPosition.y), flickTime, &velocityX, &velocityY); + + if (Math::Abs(flickPosition.x) > Math::Abs(flickPosition.y)) + { + __pFlickAnimation->InitializeFlickAmount(velocityX); + } + else + { + __pFlickAnimation->InitializeFlickAmount(velocityY); + } + + return StartFlickTimer(velocityY, velocityX); +} + +result +_EditPresenter::StartFlickTimer(int flickVelocityX, int flickVelocityY) +{ + if (__pFlickAnimation) + { + if (ScrollContentsOnFlick() != E_SUCCESS) + { + // Stop Timer + StopFlickTimer(); + + return E_SYSTEM; + } + + // Operate timer + if (__pFlickAnimationTimer) + { + if (__pFlickAnimationTimer->Start(EDIT_FLICK_SCROLL_TIMER_INTERVAL) != E_SUCCESS) + { + StopFlickTimer(); + return E_SYSTEM; + } + } + + return E_SUCCESS; + } + else + { + return E_SYSTEM; + } +} + +result +_EditPresenter::ScrollContentsOnFlick(void) +{ + //We must check the flick animation about float conversion work at later + + if (__pFlickAnimation) + { + int moveAmountX = 0; + int moveAmountY = 0; + __pFlickAnimation->CalculateNextMove(&moveAmountX, &moveAmountY); + + // Scroll process + if (ScrollOnFlick(_CoordinateSystemUtils::ConvertToFloat(-moveAmountY*EDIT_FLICK_SCROLL_MOVE_AMOUNT_MULTIPLIER))) + { + DrawText(); + DrawScrollBar(); + return E_SUCCESS; + } + } + + return E_SYSTEM; +} + +bool +_EditPresenter::ScrollOnFlick(float moveDistanceY) +{ + if (moveDistanceY == 0) + { + FadeOutScrollBar(); + return false; + } + + if (!__pScrollBar->GetScrollVisibility()) + { + __pScrollBar->SetScrollVisibility(true); + } + + ScrollContents(moveDistanceY); + + return true; +} + +void +_EditPresenter::SetCursorEnabled(bool enable) +{ + __isCursorOpaque = enable; + + return; +} + +bool +_EditPresenter::IsCursorEnabled(void) const +{ + return __isCursorOpaque; +} + +void +_EditPresenter::StopFlickTimer(void) +{ + if (__pFlickAnimationTimer != null) + { + __pFlickAnimationTimer->Cancel(); + delete __pFlickAnimationTimer; + __pFlickAnimationTimer = null; + } + + return; +} + +result +_EditPresenter::OnFlickTimerExpired(void) +{ + result r = E_SUCCESS; + + if (__pFlickAnimationTimer) + { + // Start Timer + if (__pFlickAnimationTimer->Start(EDIT_FLICK_SCROLL_TIMER_INTERVAL) != E_SUCCESS) + { + StopFlickTimer(); + return E_SYSTEM; + } + + // Scroll DRAW + if (ScrollContentsOnFlick() != E_SUCCESS) + { + StopFlickTimer(); + + // Fade Out + FadeOutScrollBar(); + } + + r = E_SUCCESS; + } + else + { + r = E_SYSTEM; + } + + return r; +} + +void +_EditPresenter::SetScrollBarVisible(bool enable) +{ + __isScrollBarVisible = enable; + + return; +} + +void +_EditPresenter::SetScrollBarBounds(const FloatRectangle& bounds) +{ + __scrollBarBounds = bounds; + + return; +} + +FloatRectangle +_EditPresenter::GetDisplayScrollBoundsF(void) const +{ + return __scrollBarBounds; +} + +FloatRectangle +_EditPresenter::GetInitialBoundsF(void) const +{ + return __initialBounds; +} + +void +_EditPresenter::SetPreviousScrollBarPosition(int position) +{ + __previousScrollBarPos = _CoordinateSystemUtils::ConvertToFloat(position); + + return; +} + +void +_EditPresenter::SetPreviousScrollBarPosition(float position) +{ + __previousScrollBarPos = position; + + return; +} + +int +_EditPresenter::GetPreviousScrollPosition(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(__previousScrollBarPos); +} + +float +_EditPresenter::GetPreviousScrollPositionF(void) const +{ + return __previousScrollBarPos; +} + +void +_EditPresenter::SetMaximumPreviousScrollBarPosition(int position) +{ + __previousScrollBarMaxPos = _CoordinateSystemUtils::ConvertToFloat(position); + + return; +} + +void +_EditPresenter::SetMaximumPreviousScrollBarPosition(float position) +{ + __previousScrollBarMaxPos = position; + + return; +} + +_Scroll* +_EditPresenter::GetScrollBar(void) const +{ + return __pScrollBar; +} + +TextObject* +_EditPresenter::GetTextObject(void) const +{ + return __pTextObject; +} + +void +_EditPresenter::SetAutoShrinkModeEnabled(bool enable) +{ + __isAutoShrinkEnabled = enable; + + return; +} + +bool +_EditPresenter::IsAutoShrinkModeEnabled(void) const +{ + return __isAutoShrinkEnabled; +} + +_Edit* +_EditPresenter::GetEditView(void) const +{ + return __pEdit; +} + +void +_EditPresenter::InitializeParentPanel(void) +{ + if (__pParentPanel == null) + { + _ScrollPanel* pScrollPanel = null; + _Control* pControlCore = null; + + for (pControlCore = __pEdit->GetParent(); pScrollPanel == null; pControlCore = pControlCore->GetParent()) + { + if (pControlCore == null) + { + return; + } + + pScrollPanel = dynamic_cast<_ScrollPanel*>(pControlCore); + if (pScrollPanel) + { + __pParentPanel = pScrollPanel; + __pParentPanel->AddScrollEventListener(*__pEdit); + break; + } + } + } + + return; +} + +void +_EditPresenter::ScrollPanelToTop(bool show) +{ + if (!__pParentPanel) + return; + + FloatRectangle editAbsoluteBounds = __pEdit->GetAbsoluteBoundsF(true); + FloatRectangle panelAbsoluteBounds = __pParentPanel->GetAbsoluteBoundsF(true); + float scrollPosition = __pParentPanel->GetScrollPosition() + (editAbsoluteBounds.y - panelAbsoluteBounds.y); + + __pParentPanel->SetScrollPosition(scrollPosition); + + if (show) + { + __pParentPanel->Invalidate(); + } + + return; +} + +void +_EditPresenter::ScrollPanelToCursorPosition(bool show) +{ + if (!__pParentPanel) + { + return; + } + + UpdateComponentInformation(); + + FloatRectangle absCursorBounds(0.0f, 0.0f, 0.0f, 0.0f); + result r = CalculateAbsoluteCursorBounds(__cursorPos, absCursorBounds); + + if (r != E_SUCCESS) + { + return; + } + + //SysLog(NID_UI_CTRL, "------------------------ScrollPosition recalculation starts~!!!!--------------------------."); + + FloatRectangle absPanelRect = __pParentPanel->GetAbsoluteBoundsF(true); + FloatRectangle absEditRect = __pEdit->GetAbsoluteBoundsF(true); + + float scrollPosition = __pParentPanel->GetScrollPosition(); + + float upSideGap = 0.0f; + float newScrollPosition = 0.0f; + + if (__textObjectBounds.height < absCursorBounds.height) + { + absCursorBounds.height = __textObjectBounds.height; + } + + if (__pEdit->GetEditStyle() & EDIT_STYLE_TOKEN && (!IsInternalFocused())) + { + 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) + { + newScrollPosition = scrollPosition -(absPanelRect.y -absEditRect.y); + //SysLog(NID_UI_CTRL, "[single line edit] Move up till top boundary of edit."); + } + else + { + newScrollPosition = scrollPosition - upSideGap; + //SysLog(NID_UI_CTRL, "[multi-line edit] Move up till up position of cursor."); + } + + //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) + { + 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 + { + if ((absCursorBounds.y + absCursorBounds.height) < (absPanelRect.y + absPanelRect.height)) + { + //SysLog(NID_UI_CTRL, "[multi-line edit]Cursor already exist in exposed region."); + + return; + } + + 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; +} + +void +_EditPresenter::SetSearchBarFlag(bool enabled) +{ + __isSearchBar = enabled; + + return; +} + +bool +_EditPresenter::GetSearchBarFlag(void) const +{ + return __isSearchBar; +} + +result +_EditPresenter::SetFocused(void) +{ + bool focused = true; + if (__pParentPanel) + { + _Window* pTop = __pParentPanel->GetRootWindow(); + if (pTop) + { + if ((pTop->GetFocusControl(__pEdit) != __pEdit) && __pEdit->IsFocused() == false) + { + focused = false; + } + } + } + else if (__pEdit->IsFocused() == false) + { + focused = false; + } + + if (focused == false) + { + __pEdit->SetFocused(); + } + + return E_SUCCESS; +} + +void +_EditPresenter::GetWordPosition(int cursorPos, int& startPos, int& endPos) const +{ + int textLength = GetTextLength(); + bool isDetected = false; + + if (cursorPos >= textLength && cursorPos > 0) + { + cursorPos--; + } + else + { + if (IsDelimiter(__pTextBuffer[cursorPos]) && cursorPos > 0) + { + cursorPos--; + } + } + + for (int i = cursorPos; i >= 0; i--) + { + if (IsDelimiter(__pTextBuffer[i])) + { + startPos = i + 1; + isDetected = true; + break; + } + } + + if (isDetected == false) + { + startPos = 0; + } + else + { + isDetected = false; + } + + for (int i = cursorPos; i < textLength; i++) + { + if (IsDelimiter(__pTextBuffer[i])) + { + endPos = i; + isDetected = true; + break; + } + } + + if (isDetected == false) + { + endPos = textLength; + } + + if (startPos > endPos) + { + int temp = startPos; + startPos = endPos; + endPos = temp; + } + return; +} + +result +_EditPresenter::GetTextImageRangeAt(int postion, int& startPosition, int& endPosition) const +{ + int length = GetTextLength(); + startPosition = -1; + endPosition = -1; + + SysTryReturnResult(NID_UI_CTRL, postion >= 0 && postion <= length, E_OUT_OF_RANGE, "The given index is out-of-range."); + + _Text::TextElement* pTextElement = __pTextObject->GetElementAtTextIndex(postion); + const TextSimple* pSimpleText = dynamic_cast (pTextElement); + if (pSimpleText != null && pSimpleText->GetBitmap() != null) + { + startPosition = pSimpleText->GetTextOffset(); + endPosition = startPosition + pSimpleText->GetTextLength(); + return E_SUCCESS; + } + + return E_OBJ_NOT_FOUND; +} + +bool +_EditPresenter::IsDelimiter(wchar_t character) const +{ + bool ret = false; + + switch (character) + { + case 0x0A: // NLine Feed + ret = true; + break; + case 0x0D: // Carriage Return + ret = true; + break; + case 0x20: // Space + ret = true; + break; + default: + break; + } + + return ret; +} + +void +_EditPresenter::InitializeCopyPasteManager(void) +{ + bool releaseBlock = true; + + if (__pCopyPasteManager) + { + releaseBlock = __pCopyPasteManager->GetTextBlockReleaseFlag(); + delete __pCopyPasteManager; + __pCopyPasteManager = null; + } + + if (IsBlocked() == true && releaseBlock) + { + ReleaseTextBlock(); + __pEdit->Invalidate(); + } + + __isCopyPasteManagerExist = false; + __isCopyPastePopupMoving = false; + + return; +} + +bool +_EditPresenter::IsCopyPasteManagerExist(void) const +{ + return __isCopyPasteManagerExist; +} + +FloatRectangle +_EditPresenter::GetTextAreaBoundsF(void) const +{ + return __textObjectBounds; +} + +FloatRectangle +_EditPresenter::GetTitleBoundsF(void) const +{ + return __titleBounds; +} + +FloatRectangle +_EditPresenter::GetClearIconBoundsF(void) const +{ + return __clearIconBounds; +} + +void +_EditPresenter::FinishTextComposition(void) +{ + if (__isInputConnectionBound && __isTextComposing) + { + __pEdit->SetTextEventEnabled(false); + __pInputConnection->FinishTextComposition(); + __isTextComposing = false; + __composingTextLength = 0; + __pEdit->SetTextEventEnabled(true); + } + + return; +} + +bool +_EditPresenter::GetTextCompositionState(void) const +{ + return __isTextComposing; +} + +bool +_EditPresenter::IsCopyPastePopup(const _Control& control) const +{ + if (__pCopyPasteManager) + { + return __pCopyPasteManager->IsCopyPastePopup(control); + } + + return false; +} + +bool +_EditPresenter::IsCopyPasteHandle(const _Control& control) const +{ + if (__pCopyPasteManager) + { + return __pCopyPasteManager->IsCopyPasteHandle(control); + } + + return false; +} + +void +_EditPresenter::SetCursorChangedFlag(bool enabled) +{ + __isCursorChanged = enabled; + + return; +} + +bool +_EditPresenter::GetCursorChangedFlag(void) const +{ + return __isCursorChanged; +} + +void +_EditPresenter::SetEditGroupStyle(GroupStyle groupStyle) +{ + __groupStyle = groupStyle; + + return; +} + +void +_EditPresenter::PostInternalEvent(const Tizen::Base::String& type) +{ + ClearLastResult(); + + ArrayList* pArgs = new (std::nothrow) ArrayList(); + 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 allocation failed."); + + r = pArgs->Add(*pType); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] Unable to add type to pArgs"); + + _UiNotificationEvent event(__pEdit->GetHandle(), pArgs); + r = _UiEventManager::GetInstance()->PostEvent(event); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] Unable to send event"); + + return; +} + +void +_EditPresenter::ReleaseCopyPastePopup(void) +{ + if (__pCopyPasteManager) + { + return __pCopyPasteManager->ReleaseCopyPastePopup(); + } +} + +bool +_EditPresenter::IsCopyPastePopupExist(void) const +{ + if (__pCopyPasteManager) + { + if (__pCopyPasteManager->GetCopyPastePopup()) + { + return true; + } + else + { + return false; + } + } + return false; +} + +bool +_EditPresenter::IsCopyPasteHandleExist(void) const +{ + if (__pCopyPasteManager) + { + return __pCopyPasteManager->IsCopyPasteHandleExist(); + } + return false; +} + +bool +_EditPresenter::IsUnsupportedChracterExist(const KeypadStyle keypadStyle, const Tizen::Base::String& text) +{ + const int numberOfCharOnNumOnlyStyle = 10; + 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/*#*/, 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; + int supportedCharacterCount = 0; + + switch (keypadStyle) + { + case KEYPAD_STYLE_NUMBER: + supportedCharacterCount = numberOfCharOnNumOnlyStyle; + TempKey = characterOnNumOnlyStyle; + break; + case KEYPAD_STYLE_PHONE_NUMBER: + supportedCharacterCount = numberOfCharOnPhoneNumStyle; + TempKey = characterOnPhoneNumStyle; + break; + case KEYPAD_STYLE_IP_V4: + supportedCharacterCount = numberOfCharOnIpStyle; + TempKey = characterOnIPStyle; + break; + default: + return false; + } + + if (text.GetLength() < 1) + { + return false; + } + + for (int i = 0; i < text.GetLength(); i++) + { + isSupportedCharacterExist = false; + wchar_t checkChar =0; + if (text.GetCharAt(i, checkChar) != E_SUCCESS) + { + break; + } + for (int j = 0; j < supportedCharacterCount ; j++) + { + if (TempKey[j] == checkChar) + { + isSupportedCharacterExist = true; + break; + } + } + if (!isSupportedCharacterExist) + { + return true; + } + } + + return false; +} + +void +_EditPresenter::SetBlockRangeWithShiftArrowkey(_KeyCode keyCode) +{ + int start = 0; + int end = 0; + if (IsBlocked() == true) + { + GetBlockRange(start, end); + switch(keyCode) + { + case _KEY_LEFT: + if (__textBlockMoveLeft) + { + if (start > 0) + { + SetBlockRange(--start, end); + } + } + else + { + if (start < end - 1) + { + SetBlockRange(start, --end); + } + else if (start == end - 1) + { + ReleaseTextBlock(); + SetCursorPosition(start); + } + } + break; + case _KEY_UP: + if (__textBlockMoveLeft) + { + int curCursorLine = __pTextObject->GetLineIndexAtTextIndex(start); + + if (curCursorLine > 0) + { + int offset = start - __pTextObject->GetFirstTextIndexAt(curCursorLine); + int firstTextIndex = __pTextObject->GetFirstTextIndexAt(curCursorLine-1); + start = offset + firstTextIndex; + int textLength = __pTextObject->GetTextLengthAt(curCursorLine-1); + if (offset > textLength) + { + start = firstTextIndex+textLength-1; + } + SetBlockRange(start, end); + } + } + else + { + int curCursorLine = __pTextObject->GetLineIndexAtTextIndex(end); + + if (curCursorLine > 0) + { + int offset = end - __pTextObject->GetFirstTextIndexAt(curCursorLine); + int firstTextIndex = __pTextObject->GetFirstTextIndexAt(curCursorLine-1); + end = offset + firstTextIndex; + int textLength = __pTextObject->GetTextLengthAt(curCursorLine-1); + if (offset > textLength) + { + end = firstTextIndex+textLength; + } + if (start > end) + { + int temp = start; + start = end; + end = temp; + __textBlockMoveLeft = true; + SetBlockRange(start, end); + } + else if (start == end) + { + ReleaseTextBlock(); + SetCursorPosition(end); + } + else + { + SetBlockRange(start, end); + } + } + } + break; + case _KEY_DOWN: + if (__textBlockMoveLeft) + { + int curCursorLine = __pTextObject->GetLineIndexAtTextIndex(start); + int totalLine = __pTextObject->GetTotalLineCount(); + if (curCursorLine < totalLine - 1) + { + int offset = start - __pTextObject->GetFirstTextIndexAt(curCursorLine); + int firstTextIndex = __pTextObject->GetFirstTextIndexAt(curCursorLine+1); + start = offset + firstTextIndex; + int textLength = __pTextObject->GetTextLengthAt(curCursorLine+1); + if (offset > textLength) + { + start = firstTextIndex+textLength; + } + + if (start > end) + { + int temp = start; + start = end; + end = temp; + __textBlockMoveLeft = false; + SetBlockRange(start, end); + } + else if (start == end) + { + ReleaseTextBlock(); + SetCursorPosition(end); + } + else + { + SetBlockRange(start, end); + } + } + } + else + { + int curCursorLine = __pTextObject->GetLineIndexAtTextIndex(end); + int totalLine = __pTextObject->GetTotalLineCount(); + if (curCursorLine < totalLine - 1) + { + int offset = end - __pTextObject->GetFirstTextIndexAt(curCursorLine); + int firstTextIndex = __pTextObject->GetFirstTextIndexAt(curCursorLine+1); + end = offset + firstTextIndex; + int textLength = __pTextObject->GetTextLengthAt(curCursorLine+1); + if (offset > textLength) + { + end = firstTextIndex+textLength; + } + SetBlockRange(start, end); + } + } + break; + case _KEY_RIGHT: + if (__textBlockMoveLeft) + { + if (start + 1 < end) + { + SetBlockRange(++start, end); + } + else if (start + 1 == end) + { + ReleaseTextBlock(); + SetCursorPosition(end); + } + } + else + { + if (end + 1 <= GetTextLength()) + { + SetBlockRange(start, ++end); + } + } + break; + default: + break; + } + + if (IsBlocked()) + { + if (__textBlockMoveLeft) + { + __pTextObject->SetFirstDisplayLineIndexFromTextIndex(start); + } + SetCursorChangedFlag(!__textBlockMoveLeft); + } + DrawText(); + } + else + { + switch(keyCode) + { + case _KEY_LEFT: + if (__cursorPos > 0) + { + start = __cursorPos - 1; + end = __cursorPos; + SetBlockRange(start, end); + __textBlockMoveLeft = true; + } + break; + case _KEY_UP: + { + int curCursorLine = __pTextObject->GetLineIndexAtTextIndex(__pTextObject->GetCursorIndex()); + + if (curCursorLine > 0) + { + int offset = __cursorPos - __pTextObject->GetFirstTextIndexAt(curCursorLine); + int firstTextIndex = __pTextObject->GetFirstTextIndexAt(curCursorLine-1); + start = offset + firstTextIndex; + int textLength = __pTextObject->GetTextLengthAt(curCursorLine-1); + if (offset > textLength) + { + start = firstTextIndex+textLength -1; + } + end = __cursorPos; + SetBlockRange(start, end); + __textBlockMoveLeft = true; + } + } + break; + case _KEY_DOWN: + if (GetTextLength() >= __cursorPos + 1) + { + int curCursorLine = __pTextObject->GetLineIndexAtTextIndex(__pTextObject->GetCursorIndex()); + int totalLine = __pTextObject->GetTotalLineCount(); + if (curCursorLine < totalLine - 1) + { + int offset = __cursorPos - __pTextObject->GetFirstTextIndexAt(curCursorLine); + int firstTextIndex = __pTextObject->GetFirstTextIndexAt(curCursorLine+1); + end = offset + firstTextIndex; + int textLength = __pTextObject->GetTextLengthAt(curCursorLine+1); + if (offset > textLength) + { + end = firstTextIndex+textLength; + } + } + else if (curCursorLine == totalLine - 1) + { + int firstTextIndex = __pTextObject->GetFirstTextIndexAt(curCursorLine); + int textLength = __pTextObject->GetTextLengthAt(curCursorLine); + end = firstTextIndex + textLength; + } + start = __cursorPos; + SetBlockRange(start, end); + __textBlockMoveLeft = false; + } + break; + case _KEY_RIGHT: + if (GetTextLength() >= __cursorPos + 1) + { + start = __cursorPos; + end = __cursorPos + 1; + SetBlockRange(start, end); + __textBlockMoveLeft = false; + } + break; + default: + break; + } + DrawText(); + } + if (IsBlocked()) + { + __textBlockMoving = true; + } +} + +void +_EditPresenter::SetBlockRangeWithCtrlShiftArrowkey(_KeyCode keyCode) +{ + int start = 0; + int end = 0; + int originalStart = 0; + int originalEnd = 0; + if (IsBlocked() == true) + { + GetBlockRange(start, end); + switch(keyCode) + { + case _KEY_LEFT: + if (__textBlockMoveLeft) + { + if (start > 0) + { + originalStart = start; + originalEnd = end; + GetWordPosition(start-1, start, end); + SetBlockRange(start, originalEnd); + } + } + else + { + originalStart = start; + originalEnd = end; + GetWordPosition(end, start, end); + if (originalEnd == start) + { + GetWordPosition(start-1, start, end); + } + + if (originalStart < start) + { + SetBlockRange(originalStart, start); + } + else if (originalStart > start) + { + SetBlockRange(start, originalStart); + __textBlockMoveLeft = true; + } + else if (originalStart == start) + { + ReleaseTextBlock(); + SetCursorPosition(start); + __textBlockMoveLeft = true; + } + } + break; + case _KEY_RIGHT: + if (__textBlockMoveLeft) + { + originalStart = start; + originalEnd = end; + GetWordPosition(start, start, end); + if (originalStart == end) + { + GetWordPosition(end+1, start, end); + } + if (originalEnd > end) + { + SetBlockRange(end, originalEnd); + } + else if (originalEnd < end) + { + SetBlockRange(originalEnd, end); + __textBlockMoveLeft = false; + } + else if (originalEnd == end) + { + ReleaseTextBlock(); + SetCursorPosition(end); + __textBlockMoveLeft = false; + } + } + else + { + if (end < GetTextLength()) + { + originalStart = start; + originalEnd = end; + GetWordPosition(end+1, start, end); + SetBlockRange(originalStart, end); + } + } + break; + default: + break; + } + + if (IsBlocked()) + { + if (__textBlockMoveLeft) + { + __pTextObject->SetFirstDisplayLineIndexFromTextIndex(start); + } + SetCursorChangedFlag(!__textBlockMoveLeft); + } + DrawText(); + } + else + { + switch(keyCode) + { + case _KEY_LEFT: + if (__cursorPos > 0) + { + GetWordPosition(__cursorPos, start, end); + if (__cursorPos != start) + { + SetBlockRange(start, __cursorPos); + } + else + { + GetWordPosition(start-1, start, end); + SetBlockRange(start, __cursorPos); + } + __textBlockMoveLeft = true; + } + break; + case _KEY_RIGHT: + if (GetTextLength() >= __cursorPos + 1) + { + GetWordPosition(__cursorPos, start, end); + if (__cursorPos != end) + { + SetBlockRange(__cursorPos, end); + } + else + { + GetWordPosition(end+1, start, end); + SetBlockRange(__cursorPos, end); + } + __textBlockMoveLeft = false; + } + break; + default: + break; + } + DrawText(); + } + if (IsBlocked()) + { + __textBlockMoving = true; + } +} + +void +_EditPresenter::SetEditTextFilter(_IEditTextFilter* pFilter) +{ + __pTextFilter = pFilter; + + return; +} + +bool +_EditPresenter::ValidatePastedText(const String& pastedText, String& replacedText) +{ + bool enable = false; + if (__pTextFilter) + { + enable = __pTextFilter->ValidatePastedText(pastedText, replacedText); + } + + return enable; +} + +void +_EditPresenter::SendOpaqueCommand (const String& command) +{ + if (command.Equals(L"KEYPAD_STYLE: PASSWORD", true)) + { + if (__pInputConnection) + { + __pInputConnection->SetPasswordMode(true); + } + return; + } + if (__pInputConnection) + { + __pInputConnection->SendOpaqueCommand(command); + } + + return; +} + +bool +_EditPresenter::IsBounded(void) const +{ + return __isInputConnectionBound; +} + +bool +_EditPresenter::AdjustRTLTextAlignment(const _EditTextType textType) +{ + result r = E_SUCCESS; + + switch (textType) + { + case EDIT_TEXT_TYPE_INPUT: + if (GetTextAlignment() != ALIGNMENT_LEFT) + { + if (_BidiUtils::IsRTL(GetText()) == true) + { + __pTextObject->SetTextBidiHint(TEXT_BIDI_HINT_RTL); + } + else + { + __pTextObject->SetTextBidiHint(TEXT_BIDI_HINT_LTR); + } + return false; + } + if (_BidiUtils::IsRTL(GetText()) == true) + { + if (__horizontalAlignmentForBidi == ALIGNMENT_LEFT) + { + if (__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE) + { + r = __pTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_RIGHT | TEXT_OBJECT_ALIGNMENT_MIDDLE); + } + else + { + r = __pTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_RIGHT | TEXT_OBJECT_ALIGNMENT_TOP); + } + __horizontalAlignmentForBidi = ALIGNMENT_RIGHT; + __pTextObject->SetTextBidiHint(TEXT_BIDI_HINT_RTL); + if (r == E_SUCCESS) + { + return true; + } + } + } + else + { + if (__horizontalAlignmentForBidi == ALIGNMENT_RIGHT) + { + if (__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE) + { + r = __pTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT | TEXT_OBJECT_ALIGNMENT_MIDDLE); + } + else + { + r = __pTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT | TEXT_OBJECT_ALIGNMENT_TOP); + } + __horizontalAlignmentForBidi = ALIGNMENT_LEFT; + __pTextObject->SetTextBidiHint(TEXT_BIDI_HINT_LTR); + if (r == E_SUCCESS) + { + return true; + } + } + } + break; + case EDIT_TEXT_TYPE_GUIDE: + if (__pGuideTextObject == null) + { + return false; + } + if (_BidiUtils::IsRTL(__guideText) == true) + { + if (__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE) + { + r = __pGuideTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_RIGHT | TEXT_OBJECT_ALIGNMENT_MIDDLE); + } + else + { + r = __pGuideTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_RIGHT | TEXT_OBJECT_ALIGNMENT_TOP); + } + __pGuideTextObject->SetTextBidiHint(TEXT_BIDI_HINT_RTL); + if (r == E_SUCCESS) + { + return true; + } + } + else + { + if (__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE) + { + r = __pGuideTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT | TEXT_OBJECT_ALIGNMENT_MIDDLE); + } + else + { + r = __pGuideTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT | TEXT_OBJECT_ALIGNMENT_TOP); + } + __pGuideTextObject->SetTextBidiHint(TEXT_BIDI_HINT_LTR); + if (r == E_SUCCESS) + { + return true; + } + } + break; + case EDIT_TEXT_TYPE_TITLE: + if (__pTitleTextObject == null) + { + return false; + } + if (_BidiUtils::IsRTL(__titleText) == true) + { + r = __pTitleTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_RIGHT | TEXT_OBJECT_ALIGNMENT_MIDDLE); + if (r == E_SUCCESS) + { + return true; + } + } + else + { + r = __pTitleTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT | TEXT_OBJECT_ALIGNMENT_MIDDLE); + if (r == E_SUCCESS) + { + return true; + } + } + break; + default: + break; + } + + return false; +} + +void +_EditPresenter::UpdateKeypadCommandString(void) +{ + if (!__isKeypadCommandButtonUserSetting) + { + __pEditModel->UpdateKeypadCommandButtonText(); + if (__pCommandButton) + { + _Button* pLeftButton = __pCommandButton->GetItem(COMMAND_BUTTON_POSITION_LEFT); + if (pLeftButton) + { + pLeftButton->SetText(__pEditModel->GetKeypadCommandButtonText(COMMAND_BUTTON_POSITION_LEFT)); + } + _Button* pRightButton = __pCommandButton->GetItem(COMMAND_BUTTON_POSITION_RIGHT); + if (pRightButton) + { + pRightButton->SetText(__pEditModel->GetKeypadCommandButtonText(COMMAND_BUTTON_POSITION_RIGHT)); + } + } + } +} + +result +_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.") + + + if (__isPasswordVisible == visible) + { + return r; + } + + __isPasswordVisible = visible; + + if (GetTextLength()== 0) + { + return r; + } + + InitializeCopyPasteManager(); + + FinishTextComposition(); + + if (__isPasswordVisible) + { + StopPasswordTimer(); + ChangePasswordToPlainText(); + } + else + { + ReplaceTextIntoPasswordHyphenString(); + __pTextObject->NotifyTextChanged(__pTextBuffer, 0, __pTextString->GetLength(), 0); + } + + return r; +} + +bool +_EditPresenter::IsPasswordVisible(void) const +{ + return __isPasswordVisible; +} + +bool +_EditPresenter::IsClearIconPressed(void) const +{ + return __isClearIconPressed; +} + +result +_EditPresenter::DrawFocusRing(Tizen::Graphics::Canvas& canvas) +{ + if ((!__pEdit->IsFocusModeStateEnabled() && IsViewModeEnabled()) || !__pEdit->IsEnabled()) + { + return E_SUCCESS; + } + + result r = E_SUCCESS; + Bitmap* pFocusRing = null; + Color color = __pEdit->GetColor(EDIT_STATUS_HIGHLIGHTED); + + if (IsCurrentFocused() && color.GetAlpha()) + { + Color focusColor; + GET_COLOR_CONFIG(FOCUSUI::CONTENT_BG_HIGHLIGHTED, focusColor); + focusColor.SetAlpha(color.GetAlpha()); + + r = GET_BITMAP_CONFIG_N(EDIT::BG_RING_FOCUSED, BITMAP_PIXEL_FORMAT_ARGB8888, pFocusRing); + 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."); + + if (pReplacementFocusRing) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pReplacementFocusRing)) + { + canvas.DrawNinePatchedBitmap(editRect, *pReplacementFocusRing); + } + } + delete pFocusRing; + delete pReplacementFocusRing; + } + + return r; + +CATCH: + delete pFocusRing; + + 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 new file mode 100644 index 0000000..d6cd978 --- /dev/null +++ b/src/ui/controls/FUiCtrl_EditTime.cpp @@ -0,0 +1,1195 @@ +// +// 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_EditTime.cpp + * @brief This is the implementation file for the _EditTime class. + */ + +#include +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_AccessibilityContainer.h" +#include "FUi_AccessibilityElement.h" +#include "FUi_ResourceManager.h" +#include "FUiAnim_VisualElement.h" +#include "FUiCtrl_EditTime.h" +#include "FUiCtrl_EditTimePresenter.h" +#include "FUiCtrl_Form.h" +#include "FUiCtrl_Frame.h" +#include "FUiCtrl_DateTimeUtils.h" +#include "FUiCtrl_DateTimeDefine.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Base; +using namespace Tizen::System; + +namespace Tizen { namespace Ui { namespace Controls +{ + +IMPLEMENT_PROPERTY(_EditTime); + +_EditTime::_EditTime(void) + : __pEditTimePresenter(null) + , __pTimeChangeEvent(null) + , __pDateTimeBar(null) + , __absoluteBounds(FloatRectangle()) + , __previousSize(0.0f, 0.0f) + , __title() + , __pAccessibilityEditTimeElement(null) + , __pAccessibilityHourElement(null) + , __pAccessibilityMinuteElement(null) + , __pAccessibilityAmPmElement(null) + , __isCalledBoundsChanged(false) + , __isXmlBoundsExist(false) + , __pParentPanel(null) + , __isEnterKeyPressed(false) +{ +} + +_EditTime::~_EditTime(void) +{ + SettingInfo::RemoveSettingEventListener(*this); + + delete __pDateTimeBar; + __pDateTimeBar = null; + + delete __pEditTimePresenter; + __pEditTimePresenter = null; + + delete __pTimeChangeEvent; + __pTimeChangeEvent = null; + + if (__pAccessibilityEditTimeElement != null) + { + __pAccessibilityEditTimeElement->Activate(false); + __pAccessibilityEditTimeElement = null; + } + if (__pAccessibilityHourElement != null) + { + __pAccessibilityHourElement->Activate(false); + __pAccessibilityHourElement = null; + } + if (__pAccessibilityMinuteElement != null) + { + __pAccessibilityMinuteElement->Activate(false); + __pAccessibilityMinuteElement = null; + } + if (__pAccessibilityAmPmElement != null) + { + __pAccessibilityAmPmElement->Activate(false); + __pAccessibilityAmPmElement = null; + } + + if (__pParentPanel != null) + { + __pParentPanel->RemoveScrollEventListener(*this); + } +} + +_EditTime* +_EditTime::CreateEditTimeN(const String& title) +{ + result r = E_SUCCESS; + + _AccessibilityContainer* pContainer = null; + + _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); + + pEditTime->__pEditTimePresenter = _EditTimePresenter::CreateInstanceN(*pEditTime, title); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, pEditTime->__pEditTimePresenter, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pEditTime->CreateDateTimeBar(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pEditTime->__pEditTimePresenter->Initialize(); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, pEditTime->__pEditTimePresenter, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pEditTime->__pEditTimePresenter->SetCurrentTime(); + + if (!title.IsEmpty()) + { + pEditTime->__title = title; + } + + pContainer = pEditTime->GetAccessibilityContainer(); + if (pContainer != null) + { + pContainer->Activate(true); + pEditTime->CreateAccessibilityElement(); + } + + pEditTime->AcquireHandle(); + pEditTime->SetTouchPressThreshold(_TOUCH_PRESS_THRESHOLD_INSENSITIVE); + + return pEditTime; + +CATCH: + delete pEditTime; + return null; +} + +result +_EditTime::CreateDateTimeBar(void) +{ + result r = E_SUCCESS; + + __pDateTimeBar = _DateTimeBar::CreateDateTimeBarN(*this); + 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)); + + r = __pDateTimeBar->AddDateTimeChangeEventListener(*this); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = SettingInfo::AddSettingEventListener(*this); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + GET_SHAPE_CONFIG(EDITTIME::WIDTH, GetOrientation(), __previousSize.width); + GET_SHAPE_CONFIG(EDITTIME::HEIGHT, GetOrientation(), __previousSize.height); + + return r; + +CATCH: + delete __pDateTimeBar; + return r; +} + +result +_EditTime::AddTimeChangeEventListener(const _IDateTimeChangeEventListener& listener) +{ + if (__pTimeChangeEvent == null) + { + __pTimeChangeEvent = new (std::nothrow) _DateTimeChangeEvent(*this); + SysTryReturn(NID_UI_CTRL, (__pTimeChangeEvent != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, + "[E_OUT_OF_MEMORY] Memory allocation failed."); + } + + result r = __pTimeChangeEvent->AddListener(listener); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +_EditTime::RemoveTimeChangeEventListener(const _IDateTimeChangeEventListener& listener) +{ + result r = E_OBJ_NOT_FOUND; + + if (__pTimeChangeEvent != null) + { + r = __pTimeChangeEvent->RemoveListener(listener); + } + + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +void +_EditTime::SetTime(const DateTime& time) +{ + SetProperty("time", Variant(time)); + return; +} + +result +_EditTime::SetPropertyTime(const Variant& time) +{ + SysTryReturn(NID_UI_CTRL, (__pEditTimePresenter != null), E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. The _EditDatePresenter instance is null."); + + __pEditTimePresenter->SetTime(time.ToDateTime()); + + UpdateAccessibilityElement(); + return E_SUCCESS; +} + +DateTime +_EditTime::GetTime(void) const +{ + Variant time = GetProperty("time"); + + return time.ToDateTime(); +} + +Variant +_EditTime::GetPropertyTime(void) const +{ + DateTime time; + + SysTryReturn(NID_UI_CTRL, (__pEditTimePresenter != null), Variant(), E_SYSTEM, + "[E_SYSTEM] A system error has occurred. The _EditDatePresenter instance is null."); + + time = __pEditTimePresenter->GetTime(); + + return Variant(time); +} + +result +_EditTime::SetHour(int hour) +{ + result r = E_SUCCESS; + + SetProperty("hour", Variant(hour)); + + r = GetLastResult(); + + return r; +} + +result +_EditTime::SetPropertyHour(const Variant& hour) +{ + SysTryReturn(NID_UI_CTRL, (__pEditTimePresenter != null), E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. The _EditDatePresenter instance is null."); + + result r = E_SUCCESS; + + r = __pEditTimePresenter->SetHour(hour.ToInt()); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + UpdateAccessibilityElement(); + + return r; +} + +int +_EditTime::GetHour(void) const +{ + Variant hour = GetProperty("hour"); + + return hour.ToInt(); +} + +Variant +_EditTime::GetPropertyHour(void) const +{ + int hour = -1; + + SysTryReturn(NID_UI_CTRL, (__pEditTimePresenter != null), Variant(), E_SYSTEM, + "[E_SYSTEM] A system error has occurred. The _EditDatePresenter instance is null."); + + hour = __pEditTimePresenter->GetHour(); + + return Variant(hour); +} + +result +_EditTime::SetMinute(int minute) +{ + result r = E_SUCCESS; + + SetProperty("minute", Variant(minute)); + + r = GetLastResult(); + + return r; +} + +result +_EditTime::SetPropertyMinute(const Variant& minute) +{ + SysTryReturn(NID_UI_CTRL, (__pEditTimePresenter != null), E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. The _EditDatePresenter instance is null."); + + result r = E_SUCCESS; + + r = __pEditTimePresenter->SetMinute(minute.ToInt()); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + UpdateAccessibilityElement(); + + return r; +} + +int +_EditTime::GetMinute(void) const +{ + Variant minute = GetProperty("minute"); + + return minute.ToInt(); +} + +Variant +_EditTime::GetPropertyMinute(void) const +{ + int minute = -1; + + SysTryReturn(NID_UI_CTRL, (__pEditTimePresenter != null), Variant(), E_SYSTEM, + "[E_SYSTEM] A system error has occurred. The _EditDatePresenter instance is null."); + + minute = __pEditTimePresenter->GetMinute(); + + return Variant(minute); +} + +void +_EditTime::SetCurrentTime(void) +{ + SysTryReturnVoidResult(NID_UI_CTRL, (__pEditTimePresenter != null), E_SYSTEM, + "[E_SYSTEM] A system error has occurred. The _EditDatePresenter instance is null."); + + __pEditTimePresenter->SetCurrentTime(); + + UpdateAccessibilityElement(); + + return; +} + +void +_EditTime::SetTimePickerEnabled(bool enable) +{ + SetProperty("timePickerEnabled", Variant(enable)); + return; +} + +result +_EditTime::SetPropertyTimePickerEnabled(const Variant& enable) +{ + SysTryReturn(NID_UI_CTRL, (__pEditTimePresenter != null), E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. The _EditDatePresenter instance is null."); + + __pEditTimePresenter->SetTimePickerEnabled(enable.ToBool()); + + return E_SUCCESS; +} + +bool +_EditTime::IsTimePickerEnabled(void) const +{ + Variant enable = GetProperty("timePickerEnabled"); + + return enable.ToBool(); +} + +Variant +_EditTime::GetPropertyTimePickerEnabled(void) const +{ + bool enable = false; + + SysTryReturn(NID_UI_CTRL, (__pEditTimePresenter != null), Variant(), E_SYSTEM, + "[E_SYSTEM] A system error has occurred. The _EditDatePresenter instance is null."); + + enable = __pEditTimePresenter->IsTimePickerEnabled(); + + return Variant(enable); +} + +void +_EditTime::Set24HourNotationEnabled(bool enable) +{ + SysTryReturnVoidResult(NID_UI_CTRL, (__pEditTimePresenter != null), E_SYSTEM, + "[E_SYSTEM] A system error has occurred. The _EditDatePresenter instance is null."); + + __pEditTimePresenter->Set24HourNotationEnabled(enable); + return; +} + +bool +_EditTime::Is24HourNotationEnabled(void) const +{ + SysAssertf((__pEditTimePresenter != null), "The _EditDatePresenter instance is null."); + + return __pEditTimePresenter->Is24HourNotationEnabled(); +} + +result +_EditTime::CalculateDateTimeBarPosition(void) +{ + result r = E_SUCCESS; + + float dateTimeBarHeight = 0.0f; + float arrowHeight = 0.0f; + float timeHeight = 0.0f; + float timeBarMargin = 0.0f; + float textHeight = 0.0f; + float titleTimeMargin = 0.0f; + float bottomPosition = 0.0f; + float timeY = 0.0f; + + FloatRectangle absoluteBounds; + FloatRectangle frameBounds; + FloatRectangle parentWindowBounds; + FloatRectangle titleBounds; + + _Frame* pFrame = dynamic_cast<_Frame*>(_ControlManager::GetInstance()->GetCurrentFrame()); + 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(true); + absoluteBounds = GetAbsoluteBoundsF(true); + parentWindowBounds = GetParentWindowBounds(); + titleBounds = __pEditTimePresenter->GetTitleBounds(); + + GET_SHAPE_CONFIG(DATETIMEBAR::ITEM_HEIGHT, GetOrientation(), dateTimeBarHeight); + GET_SHAPE_CONFIG(DATETIMEBAR::ARROW_HEIGHT, GetOrientation(), arrowHeight); + GET_SHAPE_CONFIG(EDITTIME::TIME_HEIGHT, GetOrientation(), timeHeight); + GET_SHAPE_CONFIG(EDITTIME::TIME_BAR_MARGIN, GetOrientation(), timeBarMargin); + GET_SHAPE_CONFIG(EDITTIME::TITLE_HEIGHT, GetOrientation(), textHeight); + GET_SHAPE_CONFIG(EDITTIME::TITLE_TIME_MARGIN, GetOrientation(), titleTimeMargin); + + if (!__title.IsEmpty()) //with title + { + timeY = titleBounds.y + textHeight + titleTimeMargin ; + } + else //without title + { + timeY = (absoluteBounds.height - timeHeight) / 2.0f ; + } + + bottomPosition = absoluteBounds.y + timeY + timeHeight + timeBarMargin + arrowHeight + dateTimeBarHeight; + + GetDateTimeBar()->SetParentWindowBounds(parentWindowBounds); + + if (bottomPosition > frameBounds.y + parentWindowBounds.y + parentWindowBounds.height) //ALIGN_UP + { + r = GetDateTimeBar()->SetPositionAndAlignment(FloatPoint(parentWindowBounds.x, absoluteBounds.y + timeY - timeBarMargin - arrowHeight), DATETIME_BAR_ALIGN_UP); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + else //ALIGN_DOWN + { + r = GetDateTimeBar()->SetPositionAndAlignment(FloatPoint(parentWindowBounds.x, absoluteBounds.y + timeY + timeHeight + timeBarMargin + arrowHeight), DATETIME_BAR_ALIGN_DOWN); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + __absoluteBounds = absoluteBounds; + + return r; +} + +void +_EditTime::OnDraw(void) +{ + if (GetDateTimeBar() != null) + { + FloatRectangle absoluteBounds = GetAbsoluteBoundsF(true); + + if (absoluteBounds.y != __absoluteBounds.y || absoluteBounds.height != __absoluteBounds.height) + { + CalculateDateTimeBarPosition(); + } + } + + __pEditTimePresenter->Draw(); + + if (unlikely((_AccessibilityManager::IsActivated()))) + { + UpdateAccessibilityElement(); + } + + return; +} + +void +_EditTime::CreateAccessibilityElement(void) +{ + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + FloatRectangle hourBounds = __pEditTimePresenter->GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_HOUR); + FloatRectangle minuteBounds = __pEditTimePresenter->GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_MINUTE); + FloatRectangle ampmBounds = __pEditTimePresenter->GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_AMPM); + + pContainer->AddListener(*this); + if (__pAccessibilityEditTimeElement == null) + { + __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"); + pContainer->AddElement(*__pAccessibilityEditTimeElement); + } + + if (__pAccessibilityHourElement == null && __pAccessibilityMinuteElement == null) + { + __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->SetBounds(hourBounds); + __pAccessibilityHourElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_HOUR_LC"); + __pAccessibilityHourElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_EDIT_T_TTS"); + pContainer->AddElement(*__pAccessibilityHourElement); + + __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->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_EDIT_T_TTS"); + pContainer->AddElement(*__pAccessibilityMinuteElement); + + if (!Is24HourNotationEnabled()) + { + __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); + + __pAccessibilityHourElement->SetBounds(FloatRectangle(hourBounds.x, ampmBounds.y, hourBounds.width, ampmBounds.height)); + __pAccessibilityMinuteElement->SetBounds(FloatRectangle(minuteBounds.x, ampmBounds.y, minuteBounds.width, ampmBounds.height)); + } + } +} + +void +_EditTime::OnBoundsChanged(void) +{ + FloatDimension newSize = GetSizeF(); + + if (newSize.width != __previousSize.width || newSize.height != __previousSize.height) + { + __isCalledBoundsChanged = true; + } + + __pEditTimePresenter->Initialize(); + + SysTryReturnVoidResult(NID_UI_CTRL, (__pAccessibilityEditTimeElement != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. EditTime accessibility element must not be null."); + SysTryReturnVoidResult(NID_UI_CTRL, (__pAccessibilityHourElement != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Hour accessibility element must not be null."); + SysTryReturnVoidResult(NID_UI_CTRL, (__pAccessibilityMinuteElement != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Minute accessibility element must not be null."); + + __pAccessibilityEditTimeElement->SetBounds(GetClientBoundsF()); + + FloatRectangle hourBounds = __pEditTimePresenter->GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_HOUR); + FloatRectangle minuteBounds = __pEditTimePresenter->GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_MINUTE); + FloatRectangle ampmBounds = __pEditTimePresenter->GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_AMPM); + + __pAccessibilityHourElement->SetBounds(hourBounds); + __pAccessibilityMinuteElement->SetBounds(minuteBounds); + + if (__pAccessibilityAmPmElement != null) + { + __pAccessibilityHourElement->SetBounds(FloatRectangle(hourBounds.x, ampmBounds.y, hourBounds.width, ampmBounds.height)); + __pAccessibilityMinuteElement->SetBounds(FloatRectangle(minuteBounds.x, ampmBounds.y, minuteBounds.width, ampmBounds.height)); + __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; +} + +void +_EditTime::OnChangeLayout(_ControlRotation rotation) +{ + if (!__isCalledBoundsChanged && !__isXmlBoundsExist) + { + FloatRectangle bounds = GetBoundsF(); + + GET_SHAPE_CONFIG(EDITTIME::WIDTH, GetOrientation(), bounds.width); + GET_SHAPE_CONFIG(EDITTIME::HEIGHT, GetOrientation(), bounds.height); + + SetBounds(bounds, false); + } + + __pEditTimePresenter->Initialize(); + + 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; +} + +bool +_EditTime::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + FloatRectangle absoluteBounds = GetAbsoluteBoundsF(true); + if (absoluteBounds.y != __absoluteBounds.y || absoluteBounds.height != __absoluteBounds.height) + { + CalculateDateTimeBarPosition(); + } + + return __pEditTimePresenter->OnTouchPressed(source, touchinfo); +} + +bool +_EditTime::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pEditTimePresenter->OnTouchReleased(source, touchinfo); +} + +bool +_EditTime::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pEditTimePresenter->OnTouchCanceled(source, touchinfo); +} + +bool +_EditTime::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pEditTimePresenter->OnTouchMoved(source, touchinfo); +} + +void +_EditTime::OnTouchMoveHandled(const _Control& control) +{ + __pEditTimePresenter->OnTouchMoveHandled(control); + return; +} + +result +_EditTime::FireTimeChangeEvent(_DateTimeChangeStatus status) +{ + SysTryReturn(NID_UI_CTRL, (__pTimeChangeEvent != null), E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. The _DateTimeChangeEvent instance is null."); + + _DateTimeChangeEventArg* pDateTimeEventArg = new (std::nothrow) _DateTimeChangeEventArg(status); + SysTryReturn(NID_UI_CTRL, pDateTimeEventArg, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, + "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pDateTimeEventArg->SetTime(GetHour(), GetMinute()); + + __pTimeChangeEvent->Fire(*pDateTimeEventArg); + + return E_SUCCESS; +} + +void +_EditTime::OnDateTimeChanged(const _Control& source, int year, int month, int day, int hour, int minute) +{ + __pEditTimePresenter->Animate(); + __pEditTimePresenter->SetLastSelectedId(DATETIME_ID_NONE); + Invalidate(); + FireTimeChangeEvent(TIME_INTERNAL_CHANGE_SAVED); + return; +} + +void +_EditTime::OnDateTimeChangeCanceled(const _Control& source) +{ + __pEditTimePresenter->SetLastSelectedId(DATETIME_ID_NONE); + Invalidate(); + FireTimeChangeEvent(TIME_INTERNAL_CHANGE_CANCELED); + return; +} + +void +_EditTime::OnActionPerformed(const Ui::_Control& source, int actionId) +{ + _DateTimeId boxId = __pEditTimePresenter->GetLastSelectedId(); + + if (boxId == DATETIME_ID_HOUR) + { + bool amEnable = true; + amEnable = __pEditTimePresenter->GetAmEnabled(); + + int hour = 0; + hour = actionId; + if (!amEnable && !Is24HourNotationEnabled()) + { + if (hour < DATETIME_HOUR_MAX_FOR_24NOTATION) + { + hour += DATETIME_HOUR_MAX_FOR_24NOTATION; + } + } + else if (amEnable && !Is24HourNotationEnabled()) + { + if (hour == DATETIME_HOUR_MAX_FOR_24NOTATION) + { + hour = DATETIME_HOUR_MIN; + } + } + SetHour(hour); + } + else if (boxId == DATETIME_ID_MINUTE) + { + SetMinute(actionId); + } + + Invalidate(); + return; +} + +_DateTimeBar* +_EditTime::GetDateTimeBar(void) const +{ + return __pDateTimeBar; +} + +void +_EditTime::OnFontChanged(Font* pFont) +{ + __pEditTimePresenter->OnFontChanged(pFont); + + return; +} + +void +_EditTime::OnFontInfoRequested(unsigned long& style, float& size) +{ + __pEditTimePresenter->OnFontInfoRequested(style, size); + + return; +} + +void +_EditTime::OnSettingChanged(String& key) +{ + if (key.Equals(L"http://tizen.org/setting/locale.time.format.24hour", false)) + { + __pEditTimePresenter->UpdateTimeFormat(); + __pEditTimePresenter->SetLastSelectedId(DATETIME_ID_NONE); + + if (GetDateTimeBar() != null) + { + GetDateTimeBar()->SetVisibleState(false); + GetDateTimeBar()->ClearPreviousText(); + GetDateTimeBar()->Close(); + } + + Invalidate(); + } + + return; +} + +void +_EditTime::OnDrawFocus(void) +{ + __pEditTimePresenter->SetFocusState(true); + __pEditTimePresenter->SetFocusedElement(); + Invalidate(); + return; +} + +bool +_EditTime::OnKeyPressed(const _Control &source, const _KeyInfo &keyInfo) +{ + return __pEditTimePresenter->OnKeyPressed(source, keyInfo); +} + +bool +_EditTime::OnKeyReleased(const _Control &source, const _KeyInfo &keyInfo) +{ + _KeyCode keyCode = keyInfo.GetKeyCode(); + + switch (keyCode) + { + case _KEY_ENTER: + { + FloatRectangle absoluteBounds = GetAbsoluteBoundsF(true); + + if (__pParentPanel != null && __pParentPanel->IsScrollAnimationRunning()) + { + __isEnterKeyPressed = true; + return true; + } + + if (absoluteBounds.y != __absoluteBounds.y || absoluteBounds.height != __absoluteBounds.height) + { + CalculateDateTimeBarPosition(); + } + break; + } + default: + { + break; + } + } + + return __pEditTimePresenter->OnKeyReleased(source, keyCode); +} + +bool +_EditTime::OnFocusGained(const _Control &source) +{ + __pEditTimePresenter->SetFocusedElement(); + Invalidate(); + return true; +} + +bool +_EditTime::OnFocusLost(const _Control &source) +{ + return __pEditTimePresenter->OnFocusLost(source); +} + +void +_EditTime::OnFocusModeStateChanged(void) +{ + __pEditTimePresenter->OnFocusModeStateChanged(); + return; +} + +FloatRectangle +_EditTime::GetParentWindowBounds(void) const +{ + _Form* pForm = null; + _Window* pwindow = null; + _Control* pControlCore = GetParent(); + + FloatDimension dateTimeBarSize(0.0f, 0.0f); + + GET_DIMENSION_CONFIG(DATETIMEBAR::DEFAULT_SIZE, GetOrientation(), dateTimeBarSize); + + FloatRectangle parentWindowBounds(0.0f, 0.0f, dateTimeBarSize.width, dateTimeBarSize.height); + + while (true) + { + if (pControlCore == null) + { + SysLog(NID_UI_CTRL,"[E_SYSTEM] Parent window not found."); + + return parentWindowBounds; + } + + // If the parent is a Frame, then return the Form's bounds. + pForm = dynamic_cast<_Form*>(pControlCore); + if (pForm != null) + { + parentWindowBounds = pForm->GetBoundsF(); + break; + } + + pwindow = dynamic_cast<_Window*>(pControlCore); + + if (pwindow != null) + { + parentWindowBounds = pwindow->GetBoundsF(); + break; + } + + pControlCore = pControlCore->GetParent(); + } + + return parentWindowBounds; +} + +void +_EditTime::SetXmlBoundsExist(bool isXmlBoundsExist) +{ + __isXmlBoundsExist = isXmlBoundsExist; +} + +void +_EditTime::OnVisibleStateChanged(void) +{ + if(__pEditTimePresenter->GetLastSelectedId() != DATETIME_ID_NONE) + { + __pEditTimePresenter->SetLastSelectedId(DATETIME_ID_NONE); + Invalidate(); + } +} + +void +_EditTime::OnAncestorVisibleStateChanged(const _Control& control) +{ + if(GetDateTimeBar() != null && GetDateTimeBar()->IsActivated()) + { + GetDateTimeBar()->ClearPreviousText(); + GetDateTimeBar()->Close(); + __pEditTimePresenter->SetLastSelectedId(DATETIME_ID_NONE); + Invalidate(); + } + +} + +void +_EditTime::OnAncestorEnableStateChanged(const _Control& control) +{ + if(!IsEnabled()) + { + if(GetDateTimeBar() != null && GetDateTimeBar()->IsActivated()) + { + GetDateTimeBar()->ClearPreviousText(); + GetDateTimeBar()->Close(); + __pEditTimePresenter->SetLastSelectedId(DATETIME_ID_NONE); + Invalidate(); + } + } +} + +void +_EditTime::UpdateAccessibilityElement(void) +{ + + String string; + + SysTryReturnVoidResult(NID_UI_CTRL, (__pAccessibilityEditTimeElement != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. EditTime accessibility element must not be null."); + SysTryReturnVoidResult(NID_UI_CTRL, (__pAccessibilityHourElement != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Hour accessibility element must not be null."); + SysTryReturnVoidResult(NID_UI_CTRL, (__pAccessibilityMinuteElement != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Minute accessibility element must not be null."); + + if (!__title.IsEmpty()) + { + string.Append(__title); + string.Append(L", "); + } + + String hourString; + int hour = GetHour(); + int maxHour = DATETIME_HOUR_MAX_FOR_24NOTATION; + + if (!Is24HourNotationEnabled() && (hour > maxHour)) + { + hourString.Format(10, L"%02d", hour - DATETIME_HOUR_MAX_FOR_24NOTATION); + } + else + { + hourString.Format(10, L"%02d", hour); + } + + string.Append(hourString.GetPointer()); + string.Append(L":"); + string.Append(GetMinute()); + string.Append(L" "); + + FloatRectangle hourBounds = __pEditTimePresenter->GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_HOUR); + FloatRectangle minuteBounds = __pEditTimePresenter->GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_MINUTE); + FloatRectangle ampmBounds = __pEditTimePresenter->GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_AMPM); + + if (!Is24HourNotationEnabled()) + { + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + SysTryReturnVoidResult(NID_UI_CTRL, (pContainer != null), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + if (__pAccessibilityAmPmElement == null) + { + __pAccessibilityAmPmElement = new (std::nothrow) _AccessibilityElement(true); + SysTryReturnVoidResult(NID_UI_CTRL, (__pAccessibilityAmPmElement != null), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + __pAccessibilityAmPmElement->SetBounds(ampmBounds); + __pAccessibilityAmPmElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_BUTTON_T_TTS"); + pContainer->AddElement(*__pAccessibilityAmPmElement); + + __pAccessibilityHourElement->SetBounds(FloatRectangle(hourBounds.x, ampmBounds.y, hourBounds.width, ampmBounds.height)); + __pAccessibilityMinuteElement->SetBounds(FloatRectangle(minuteBounds.x, ampmBounds.y, minuteBounds.width, ampmBounds.height)); + } + else + { + __pAccessibilityAmPmElement->Activate(true); + } + + String hintAmPmText(L"Double tap to edit"); + + String amString; + String pmString; + _DateTimeUtils dateTimeUtils; + dateTimeUtils.GetAmPm(amString, AM_TYPE); + dateTimeUtils.GetAmPm(pmString, PM_TYPE); + + if (__pEditTimePresenter->GetAmEnabled()) + { + __pAccessibilityAmPmElement->SetLabel(amString); + string.Append(amString.GetPointer()); + } + else + { + __pAccessibilityAmPmElement->SetLabel(pmString); + string.Append(pmString.GetPointer()); + } + + __pAccessibilityAmPmElement->SetHint(hintAmPmText); + } + else if (__pAccessibilityAmPmElement != null) + { + __pAccessibilityAmPmElement->Activate(false); + } + + __pAccessibilityEditTimeElement->SetLabel(string); + + __pAccessibilityHourElement->SetLabel(hourString); + + string.Clear(); + string.Format(10, L"%02d", GetMinute()); + __pAccessibilityMinuteElement->SetLabel(string); + + return; +} + +bool +_EditTime::OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_EditTime::OnAccessibilityFocusMovedPrevious(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_EditTime::OnAccessibilityReadingElement(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_EditTime::OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + + +bool +_EditTime::OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_EditTime::OnAccessibilityFocusOut(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_EditTime::OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + String amString; + String pmString; + String labelText; + + labelText = element.GetLabel(); + + _DateTimeUtils dateTimeUtils; + dateTimeUtils.GetAmPm(amString, AM_TYPE); + dateTimeUtils.GetAmPm(pmString, PM_TYPE); + + if (labelText == amString || labelText == pmString) + { + labelText.Append(L" Selected"); + _AccessibilityManager::GetInstance()->ReadContent(labelText); + } + + return true; +} + +bool +_EditTime::OnAccessibilityValueIncreased(const _AccessibilityContainer&, const _AccessibilityElement&) +{ + return false; +} + +bool +_EditTime::OnAccessibilityValueDecreased(const _AccessibilityContainer&, const _AccessibilityElement&) +{ + 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 new file mode 100644 index 0000000..2705965 --- /dev/null +++ b/src/ui/controls/FUiCtrl_EditTimeImpl.cpp @@ -0,0 +1,456 @@ +// +// 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_EditTimeImpl.cpp + * @brief This is the implementation file for the _EditTimeImpl class. + */ + +#include +#include +#include +#include +#include +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_UiBuilder.h" +#include "FUi_ResourceManager.h" +#include "FUi_ResourceSizeInfo.h" +#include "FUiCtrl_EditTimeImpl.h" +#include "FUiCtrl_DateTimeDefine.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Base; +using namespace Tizen::App; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_EditTimeImpl::_EditTimeImpl(EditTime* pPublic, _EditTime* pCore) + : _ControlImpl(pPublic, pCore) + , __pPublicTimeChangeEvent(null) +{ + ClearLastResult(); +} + +_EditTimeImpl::~_EditTimeImpl(void) +{ + delete __pPublicTimeChangeEvent; + __pPublicTimeChangeEvent = null; + + ClearLastResult(); +} + +_EditTimeImpl* +_EditTimeImpl::GetInstance(EditTime& editTime) +{ + return static_cast<_EditTimeImpl*> (editTime._pControlImpl); +} + +const _EditTimeImpl* +_EditTimeImpl::GetInstance(const EditTime& editTime) +{ + return static_cast (editTime._pControlImpl); +} + +_EditTimeImpl* +_EditTimeImpl::CreateEditTimeImplN(EditTime* pControl, const Point& point, const String& title) +{ + return CreateEditTimeImplFN(pControl, _CoordinateSystemUtils::ConvertToFloat(point), title); +} + +_EditTimeImpl* +_EditTimeImpl::CreateEditTimeImplFN(EditTime* pControl, const FloatPoint& point, const String& title) +{ + result r = E_SUCCESS; + FloatDimension dim; + + _EditTime* pCore = _EditTime::CreateEditTimeN(title); + SysTryReturn(NID_UI_CTRL, pCore, null, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _EditTimeImpl* pImpl = new (std::nothrow) _EditTimeImpl(pControl, pCore); + + r = CheckConstruction(pCore, pImpl); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pCore->AddTimeChangeEventListener(*pImpl); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + GET_SHAPE_CONFIG(EDITTIME::WIDTH, pCore->GetOrientation(), dim.width); + GET_SHAPE_CONFIG(EDITTIME::HEIGHT, pCore->GetOrientation(), dim.height); + + r = pImpl->InitializeBoundsPropertiesF(GET_SIZE_INFO(EditTime), FloatRectangle(point.x, point.y, dim.width, dim.height), pCore->GetOrientation()); + + ClearLastResult(); + + return pImpl; + +CATCH: + delete pImpl; + return null; +} + +const char* +_EditTimeImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Controls::EditTime"; +} + +const EditTime& +_EditTimeImpl::GetPublic(void) const +{ + return static_cast (_ControlImpl::GetPublic()); +} + +EditTime& +_EditTimeImpl::GetPublic(void) +{ + return static_cast (_ControlImpl::GetPublic()); +} + +const _EditTime& +_EditTimeImpl::GetCore(void) const +{ + return static_cast (_ControlImpl::GetCore()); +} + +_EditTime& +_EditTimeImpl::GetCore(void) +{ + return static_cast <_EditTime&>(_ControlImpl::GetCore()); +} + +result +_EditTimeImpl::OnAttachedToMainTree(void) +{ + GetCore().InitializeParentPanel(); + return _ControlImpl::OnAttachedToMainTree(); +} + +result +_EditTimeImpl::AddTimeChangeEventListener(ITimeChangeEventListener& listener) +{ + ClearLastResult(); + + if (__pPublicTimeChangeEvent == null) + { + __pPublicTimeChangeEvent = new (std::nothrow) _PublicDateTimeChangeEvent(GetPublic()); + + SysTryReturn(NID_UI_CTRL, __pPublicTimeChangeEvent, + E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + } + + result r = __pPublicTimeChangeEvent->AddListener(listener); + SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_ALREADY_EXIST, E_SYSTEM, "The ITimeChangeEventListener instance already exists."); + + return r; +} + +result +_EditTimeImpl::RemoveTimeChangeEventListener(ITimeChangeEventListener& listener) +{ + ClearLastResult(); + + result r = E_OBJ_NOT_FOUND; + + if (__pPublicTimeChangeEvent != null) + { + r = __pPublicTimeChangeEvent->RemoveListener(listener); + } + + SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_NOT_FOUND, E_SYSTEM, "ITimeChangeEventListener instance is not found."); + + return r; +} + +DateTime +_EditTimeImpl::GetTime(void) const +{ + ClearLastResult(); + + Variant time = GetCore().GetPropertyTime(); + + return time.ToDateTime(); +} + +int +_EditTimeImpl::GetHour(void) const +{ + ClearLastResult(); + + Variant hour = GetCore().GetPropertyHour(); + + return hour.ToInt(); +} + +int +_EditTimeImpl::GetMinute(void) const +{ + ClearLastResult(); + + Variant minute = GetCore().GetPropertyMinute(); + + return minute.ToInt(); +} + +void +_EditTimeImpl::SetTime(const DateTime& time) +{ + ClearLastResult(); + + GetCore().SetPropertyTime(Variant(time)); + return; +} + +void +_EditTimeImpl::SetCurrentTime(void) +{ + ClearLastResult(); + + GetCore().SetCurrentTime(); + return; +} + +result +_EditTimeImpl::SetHour(int hour) +{ + ClearLastResult(); + SysTryReturn(NID_UI_CTRL, (hour >= DATETIME_HOUR_MIN && hour <= DATETIME_HOUR_MAX), E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] Invalid argument is used. hour (%d).", hour); + + result r = GetCore().SetPropertyHour(Variant(hour)); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +_EditTimeImpl::SetMinute(int minute) +{ + ClearLastResult(); + SysTryReturn(NID_UI_CTRL, (minute >= DATETIME_MINUTE_MIN && minute <= DATETIME_MINUTE_MAX), E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] Invalid argument is used. minute (%d).", minute); + + result r = GetCore().SetPropertyMinute(Variant(minute)); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +void +_EditTimeImpl::SetTimePickerEnabled(bool enable) +{ + ClearLastResult(); + + GetCore().SetPropertyTimePickerEnabled(Variant(enable)); + return; +} + +bool +_EditTimeImpl::IsTimePickerEnabled(void) const +{ + ClearLastResult(); + + Variant enable = GetCore().GetPropertyTimePickerEnabled(); + + return enable.ToBool(); +} + +void +_EditTimeImpl::Set24HourNotationEnabled(bool enable) +{ + ClearLastResult(); + + GetCore().Set24HourNotationEnabled(enable); + return; +} + +void +_EditTimeImpl::OnDateTimeChanged(const _Control& source, int year, int month, int day, int hour, int minute) +{ + ClearLastResult(); + + if (__pPublicTimeChangeEvent == null) + { + return; + } + + _PublicDateTimeChangeEventArg* pEventArg = new (std::nothrow) _PublicDateTimeChangeEventArg(TIME_PUBLIC_CHANGE_SAVED); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pEventArg->SetDate(year, month, day); + pEventArg->SetTime(hour, minute); + __pPublicTimeChangeEvent->Fire(*pEventArg); + + return; +} + +void +_EditTimeImpl::OnDateTimeChangeCanceled(const _Control& source) +{ + ClearLastResult(); + + if (__pPublicTimeChangeEvent == null) + { + return; + } + + _PublicDateTimeChangeEventArg* pEventArg = new (std::nothrow) _PublicDateTimeChangeEventArg(TIME_PUBLIC_CHANGE_CANCELED); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + __pPublicTimeChangeEvent->Fire(*pEventArg); + + return; +} + +bool +_EditTimeImpl::IsXmlBoundsExist(void) +{ + FloatRectangle builderBounds; + _ControlOrientation controlOrientation = _CONTROL_ORIENTATION_PORTRAIT; + bool exist = GetBuilderBoundsF(controlOrientation, builderBounds); + if(!exist) + { + return false; + } + + controlOrientation = GetCore().GetOrientation(); + + if (controlOrientation == _CONTROL_ORIENTATION_LANDSCAPE) + { + exist = GetBuilderBoundsF(controlOrientation, builderBounds); + } + + if(!exist) + { + return false; + } + + return true; +} + +void +_EditTimeImpl::OnChangeLayout(_ControlOrientation orientation) +{ + GetCore().SetXmlBoundsExist(IsXmlBoundsExist()); + + return _ControlImpl::OnChangeLayout(orientation); +} + +class _EditTimeMaker + : public _UiBuilderControlMaker +{ +public: + _EditTimeMaker(_UiBuilder* uibuilder) + : _UiBuilderControlMaker(uibuilder){} + virtual ~_EditTimeMaker(void){} + static _UiBuilderControlMaker* GetInstance(_UiBuilder* pUiBuilder) + { + _EditTimeMaker* pEditTimeMaker = new (std::nothrow) _EditTimeMaker(pUiBuilder); + return pEditTimeMaker; + } + +protected: + virtual Control* Make(_UiBuilderControl* pControl) + { + result r = E_SUCCESS; + + _UiBuilderControlLayout* pControlProperty = null; + EditTime* pEditTime = null; + + FloatPoint point; + Tizen::Base::String elementString; + bool titleEnable = false; + bool hourNotationEnable = false; + FloatRectangle rect; + + GetProperty(pControl, &pControlProperty); + if (pControlProperty == null) + { + return null; + } + + rect = pControlProperty->GetRectF(); + point.x = rect.x; + point.y = rect.y; + + if (pControl->GetElement(L"titleText", elementString)) + { + titleEnable = true; + } + + 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) + { + r = pEditTime->Construct(point, elementString); + } + else + { + r = pEditTime->Construct(point); + } + + if (r != E_SUCCESS) + { + delete pEditTime; + pEditTime = null; + return null; + } + + pEditTime->SetBounds(rect); + + if (pControl->GetElement(L"b24HourNotationEnabled", elementString)) + { + if (elementString.Equals(L"true", false)) + { + hourNotationEnable = true; + pEditTime->Set24HourNotationEnabled(hourNotationEnable); + } + } + + if (pControl->GetElement(L"accessibilityHint", elementString)) + { + AccessibilityContainer* pContainer = pEditTime->GetAccessibilityContainer(); + if (pContainer != null) + { + AccessibilityElement* pElement = pContainer->GetElement(L"EditTimeText"); + if (pElement != null) + { + pElement->SetHint(elementString); + } + } + } + + return pEditTime; + } + +}; // _EditTimeMaker + +_EditTimeRegister::_EditTimeRegister(void) +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->RegisterControl(L"EditTime", _EditTimeMaker::GetInstance); +} + +_EditTimeRegister::~_EditTimeRegister(void) +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->UnregisterControl(L"EditTime"); +} +static _EditTimeRegister EditTimeRegisterToUiBuilder; +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_EditTimePresenter.cpp b/src/ui/controls/FUiCtrl_EditTimePresenter.cpp new file mode 100644 index 0000000..cbb3ee9 --- /dev/null +++ b/src/ui/controls/FUiCtrl_EditTimePresenter.cpp @@ -0,0 +1,2033 @@ +// +// 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_EditTimePresenter.cpp + * @brief This is the implementation file for the _EditTimePresenter class. + */ + +#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" + + +using namespace Tizen::Graphics; +using namespace Tizen::Base; +using namespace Tizen::Graphics::_Text; +using namespace Tizen::Ui::Animations; +using namespace Tizen::System; + +namespace Tizen { namespace Ui { namespace Controls +{ +_EditTimePresenter::_EditTimePresenter(const String& title) + : __pEditDateTimeModel(null) + , __pEditTime(null) + , __bounds(FloatRectangle()) + , __titleBounds(FloatRectangle()) + , __ampmString(String()) + , __hourString(String()) + , __minuteString(String()) + , __title(title) + , __24hours(false) + , __is24hoursSet(false) + , __amEnable(true) + , __timePickerEnabled(true) + , __selectedId(DATETIME_ID_NONE) + , __lastSelectedId(DATETIME_ID_NONE) + , __focusId(DATETIME_ID_NONE) + , __touchMoveHandled(false) + , __pAmPmBgNormalColorReplacementBitmap(null) + , __pAmPmBgDisabledColorReplacementBitmap(null) + , __pAmPmBgPressedColorReplacementBitmap(null) + , __pAmPmBgHighlightedColorReplacementBitmap(null) + , __pAmPmBgEffectNomralBitmap(null) + , __pAmPmBgEffectPressedBitmap(null) + , __pAmPmBgEffectDisabledBitmap(null) + , __pColonColorReplacementBitmap(null) + , __pColonDisabledColorReplacementBitmap(null) + , __pContentBgNormalColorReplacementBitmap(null) + , __pContentBgDisabledColorReplacementBitmap(null) + , __pContentBgPressedColorReplacementBitmap(null) + , __pContentBgHighlightedColorReplacementBitmap(null) + , __pContentBgEffectNormalBitmap(null) + , __pContentBgEffectPressedBitmap(null) + , __pContentBgEffectDisabledBitmap(null) + , __pContentProvider(null) + , __textObject() + , __pFont(null) + , __titleObject() + , __amPmTextSize(0.0f) + , __titleFontSize(0.0f) + , __timeFontSize(0.0f) + , __isAnimating(false) + , __isEditTimeInitialized(false) + , __isEnterKeyPressed(false) + , __isFocused(false) + , __transactionId(0) +{ +} + +_EditTimePresenter::~_EditTimePresenter(void) +{ + __textObject.RemoveAll(); + __titleObject.RemoveAll(); + + delete __pEditDateTimeModel; + __pEditDateTimeModel = null; + + delete __pAmPmBgNormalColorReplacementBitmap; + __pAmPmBgNormalColorReplacementBitmap = null; + + delete __pAmPmBgDisabledColorReplacementBitmap; + __pAmPmBgDisabledColorReplacementBitmap = null; + + delete __pAmPmBgPressedColorReplacementBitmap; + __pAmPmBgPressedColorReplacementBitmap = null; + + delete __pAmPmBgHighlightedColorReplacementBitmap; + __pAmPmBgHighlightedColorReplacementBitmap = null; + + delete __pAmPmBgEffectNomralBitmap; + __pAmPmBgEffectNomralBitmap = null; + + delete __pAmPmBgEffectPressedBitmap; + __pAmPmBgEffectPressedBitmap = null; + + delete __pAmPmBgEffectDisabledBitmap; + __pAmPmBgEffectDisabledBitmap = null; + + delete __pColonColorReplacementBitmap; + __pColonColorReplacementBitmap = null; + + delete __pColonDisabledColorReplacementBitmap; + __pColonDisabledColorReplacementBitmap = null; + + delete __pContentBgNormalColorReplacementBitmap; + __pContentBgNormalColorReplacementBitmap = null; + + delete __pContentBgDisabledColorReplacementBitmap; + __pContentBgDisabledColorReplacementBitmap = null; + + delete __pContentBgPressedColorReplacementBitmap; + __pContentBgPressedColorReplacementBitmap = null; + + delete __pContentBgHighlightedColorReplacementBitmap; + __pContentBgHighlightedColorReplacementBitmap = null; + + delete __pContentBgEffectNormalBitmap; + __pContentBgEffectNormalBitmap = null; + + delete __pContentBgEffectPressedBitmap; + __pContentBgEffectPressedBitmap = null; + + delete __pContentBgEffectDisabledBitmap; + __pContentBgEffectDisabledBitmap = null; + + if (__transactionId != 0) + { + AnimationTransaction::Stop(__transactionId); + } + + if (__pContentProvider != null) + { + __pEditTime->GetVisualElement()->DetachChild(__pContentProvider); + __pContentProvider->Destroy(); + __pContentProvider = null; + } +} + +_EditTimePresenter* +_EditTimePresenter::CreateInstanceN(const _EditTime& editTime, const String& title) +{ + _EditTimePresenter* pEditTimePresenter = new (std::nothrow) _EditTimePresenter(title); + SysTryReturn(NID_UI_CTRL, pEditTimePresenter, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pEditTimePresenter->__pEditTime = const_cast <_EditTime*>(&editTime); + + pEditTimePresenter->__pEditDateTimeModel = new (std::nothrow) _DateTimeModel(); + SysTryCatch(NID_UI_CTRL, pEditTimePresenter->__pEditDateTimeModel, , E_OUT_OF_MEMORY, + "[E_OUT_OF_MEMORY] Memory allocation failed."); + + return pEditTimePresenter; + +CATCH: + delete pEditTimePresenter; + return null; +} + +DateTime +_EditTimePresenter::GetTime(void) const +{ + DateTime time; + time.SetValue(DATETIME_YEAR_MIN, DATETIME_MONTH_MIN, DATETIME_DAY_MIN, GetHour(), GetMinute(), 0); + + return time; +} + +int +_EditTimePresenter::GetHour(void) const +{ + return __pEditDateTimeModel->GetHour(); +} + +int +_EditTimePresenter::GetMinute(void) const +{ + return __pEditDateTimeModel->GetMinute(); +} + +void +_EditTimePresenter::SetTime(const DateTime& time) +{ + __pEditDateTimeModel->SetDateTime(time); +} + +void +_EditTimePresenter::SetCurrentTime(void) +{ + __pEditDateTimeModel->SetCurrentDateTime(); + return; +} + +result +_EditTimePresenter::SetHour(int hour) +{ + return __pEditDateTimeModel->SetHour(hour); +} + +result +_EditTimePresenter::SetMinute(int minute) +{ + return __pEditDateTimeModel->SetMinute(minute); +} + +void +_EditTimePresenter::SetTimePickerEnabled(bool enable) +{ + __timePickerEnabled = enable; + return; +} + +bool +_EditTimePresenter::IsTimePickerEnabled(void) const +{ + return __timePickerEnabled; +} + +void +_EditTimePresenter::Set24HourNotationEnabled(bool enable) +{ + __24hours = enable; + __is24hoursSet = true; + return; +} + +bool +_EditTimePresenter::Is24HourNotationEnabled(void) const +{ + return __24hours; +} + +void +_EditTimePresenter::SetTimeConversion(void) +{ + int hour = GetHour(); + int minute = GetMinute(); + + if (!__24hours) + { + int max = DATETIME_HOUR_MAX_FOR_24NOTATION; + + if (hour > max) + { + __hourString.Format(10, L"%02d", hour - max); + } + else if (hour == DATETIME_HOUR_MIN) + { + __hourString.Format(10, L"%02d", hour + DATETIME_HOUR_MAX_FOR_24NOTATION); + } + else + { + __hourString.Format(10, L"%02d", hour); + } + + __minuteString.Format(10, L"%02d", minute); + } + else + { + __hourString.Format(10, L"%02d", hour); + __minuteString.Format(10, L"%02d", minute); + } + + return; +} + +void +_EditTimePresenter::SetAmEnabled(bool amEnable) +{ + String textAm; + String textPm; + + _DateTimeUtils dateTimeUtils; + dateTimeUtils.GetAmPm(textAm, AM_TYPE); + dateTimeUtils.GetAmPm(textPm, PM_TYPE); + + __amEnable = amEnable; + int hour = GetHour(); + + if (__amEnable) + { + __ampmString = textAm; + if (hour >= DATETIME_HOUR_MAX_FOR_24NOTATION) + { + SetHour(hour - DATETIME_HOUR_MAX_FOR_24NOTATION); + } + } + else + { + __ampmString = textPm; + if (hour < DATETIME_HOUR_MAX_FOR_24NOTATION) + { + SetHour(hour + DATETIME_HOUR_MAX_FOR_24NOTATION); + } + } + + return; +} + +bool +_EditTimePresenter::GetAmEnabled(void) const +{ + return __amEnable; +} + +FloatRectangle +_EditTimePresenter::GetDisplayAreaBoundsFromHoursStyle(_DateTimeId displayBoxId) const +{ + SysTryReturn(NID_UI_CTRL, displayBoxId >= DATETIME_ID_HOUR && displayBoxId <= DATETIME_ID_AMPM, FloatRectangle(), + E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] displayBoxId is out of range."); + + FloatRectangle bounds(0.0f, 0.0f, 0.0f, 0.0f); + + float editTimeHeight = 0.0f; + float colonWidth = 0.0f; + float timeAmPmMargin = 0.0f; + float colonMargin = 0.0f; + float timeElementWidth = 0.0f; + float amPmHeight = 0.0f; + float timeHeight = 0.0f; + float titleTimeMargin = 0.0f; + float leftMargin = 0.0f; + + GET_SHAPE_CONFIG(EDITTIME::HEIGHT, __pEditTime->GetOrientation(), editTimeHeight); + GET_SHAPE_CONFIG(EDITTIME::COLON_WIDTH, __pEditTime->GetOrientation(), colonWidth); + GET_SHAPE_CONFIG(EDITTIME::TIME_AMPM_MARGIN, __pEditTime->GetOrientation(), timeAmPmMargin); + GET_SHAPE_CONFIG(EDITTIME::COLON_MARGIN, __pEditTime->GetOrientation(), colonMargin); + GET_SHAPE_CONFIG(EDITTIME::AMPM_HEIGHT, __pEditTime->GetOrientation(), amPmHeight); + GET_SHAPE_CONFIG(EDITTIME::TITLE_TIME_MARGIN, __pEditTime->GetOrientation(), titleTimeMargin); + GET_SHAPE_CONFIG(EDITTIME::TIME_HEIGHT, __pEditTime->GetOrientation(), timeHeight); + + GET_SHAPE_CONFIG(EDITTIME::TIME_TEXT_LEFT_MARGIN, __pEditTime->GetOrientation(), leftMargin); + + if (__pEditTime->GetBoundsF().height > editTimeHeight) + { + editTimeHeight = __pEditTime->GetBoundsF().height; + } + + bounds.y = (editTimeHeight - timeHeight) / 2.0f; + + if (!__title.IsEmpty()) + { + if (displayBoxId == DATETIME_ID_AMPM) + { + bounds.y = __titleBounds.y + __titleBounds.height; + } + else + { + bounds.y = __titleBounds.y + __titleBounds.height + titleTimeMargin; + } + } + + bounds.x = leftMargin; + bounds.height = timeHeight; + + timeElementWidth = GetTimeElementWidth(); + + if (displayBoxId == DATETIME_ID_HOUR) + { + bounds.width = timeElementWidth; + } + else if (displayBoxId == DATETIME_ID_MINUTE) + { + bounds.x = bounds.x + timeElementWidth + colonWidth + (2.0f * colonMargin); + bounds.width = timeElementWidth; + } + else if (displayBoxId == DATETIME_ID_AMPM) + { + bounds.x = leftMargin + (2.0f * timeElementWidth) + colonWidth + (2.0f * colonMargin) + timeAmPmMargin; + + if (__title.IsEmpty()) + { + bounds.y = (editTimeHeight - amPmHeight) / 2.0f; + } + + GET_SHAPE_CONFIG(EDITTIME::AMPM_WIDTH, __pEditTime->GetOrientation(), bounds.width); + bounds.height = amPmHeight; + } + + return bounds; +} + +float +_EditTimePresenter::GetTextWidth(_DateTimeId boxId) const +{ + result r = E_SUCCESS; + FloatDimension dim; + TextObject dateObject; + String hourString; + String minuteString; + + hourString.Format(10, L"%02d", GetHour()); + minuteString.Format(10, L"%02d", GetMinute()); + + r = dateObject.Construct(); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + TextSimple* pSimpleText = null; + + if (boxId == DATETIME_ID_HOUR) + { + pSimpleText = new (std::nothrow)TextSimple((const_cast (hourString.GetPointer())), hourString.GetLength(), TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL); + } + else if (boxId == DATETIME_ID_MINUTE) + { + pSimpleText = new (std::nothrow)TextSimple((const_cast (minuteString.GetPointer())), minuteString.GetLength(), TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL); + } + + SysTryReturn(NID_UI_CTRL, (pSimpleText != null), dim.width, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + (_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()); + + dateObject.RemoveAll(); + return dim.width; +} + +void +_EditTimePresenter::SetTitleBounds(void) +{ + GET_SHAPE_CONFIG(EDITTIME::TITLE_TEXT_LEFT_MARGIN, __pEditTime->GetOrientation(), __titleBounds.x); + GET_SHAPE_CONFIG(EDITTIME::TITLE_HEIGHT, __pEditTime->GetOrientation(), __titleBounds.height); + + __titleBounds.width = __pEditTime->GetBoundsF().width - __titleBounds.x; + return; +} + +FloatRectangle +_EditTimePresenter::GetTitleBounds(void) const +{ + return __titleBounds; +} + +result +_EditTimePresenter::LoadResource(void) +{ + result r = E_SUCCESS; + + Color buttonNormalBgColor; + Color buttonDisabledBgColor; + Color buttonPressedColor; + Color buttonHighlightedColor; + Color contentNormalBgColor; + Color contentDisabledBgColor; + Color contentPressedColor; + Color contentHighlightedColor; + Color colonTextColor; + Color colonTextDisabledColor; + + + GET_COLOR_CONFIG(EDITTIME::BUTTON_BG_NORMAL, buttonNormalBgColor); + GET_COLOR_CONFIG(EDITTIME::BUTTON_BG_PRESSED, buttonPressedColor); + GET_COLOR_CONFIG(EDITTIME::BUTTON_BG_DISABLED, buttonDisabledBgColor); + GET_COLOR_CONFIG(EDITTIME::BUTTON_BG_HIGHLIGHTED, buttonHighlightedColor); + + GET_COLOR_CONFIG(EDITTIME::CONTENT_BG_NORMAL, contentNormalBgColor); + GET_COLOR_CONFIG(EDITTIME::CONTENT_BG_DISABLED, contentDisabledBgColor); + GET_COLOR_CONFIG(EDITTIME::CONTENT_BG_PRESSED, contentPressedColor); + GET_COLOR_CONFIG(EDITTIME::CONTENT_BG_HIGHLIGHTED, contentHighlightedColor); + + GET_COLOR_CONFIG(EDITTIME::TEXT_NORMAL, colonTextColor); + GET_COLOR_CONFIG(EDITTIME::TEXT_DISABLED, colonTextDisabledColor); + + GET_SHAPE_CONFIG(EDITTIME::AMPM_FONT_SIZE, __pEditTime->GetOrientation(), __amPmTextSize); + + 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)); + + 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)); + + + 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)); + + 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)); + + 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)); + + 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)); + + 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)); + + 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)); + + 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)); + + 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)); + + r = GET_BITMAP_CONFIG_N(EDITTIME::BUTTON_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pAmPmBgEffectPressedBitmap); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GET_BITMAP_CONFIG_N(EDITTIME::BUTTON_BG_EFFECT_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pAmPmBgEffectDisabledBitmap); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GET_BITMAP_CONFIG_N(EDITTIME::CONTENT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pContentBgEffectNormalBitmap); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GET_BITMAP_CONFIG_N(EDITTIME::CONTENT_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pContentBgEffectPressedBitmap); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + 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)); + + return r; + +CATCH: + + delete __pColonColorReplacementBitmap; + __pColonColorReplacementBitmap = null; + + delete __pColonDisabledColorReplacementBitmap; + __pColonDisabledColorReplacementBitmap = null; + + delete __pAmPmBgNormalColorReplacementBitmap; + __pAmPmBgNormalColorReplacementBitmap = null; + + delete __pAmPmBgPressedColorReplacementBitmap; + __pAmPmBgPressedColorReplacementBitmap = null; + + delete __pAmPmBgDisabledColorReplacementBitmap; + __pAmPmBgDisabledColorReplacementBitmap = null; + + delete __pAmPmBgHighlightedColorReplacementBitmap; + __pAmPmBgHighlightedColorReplacementBitmap = null; + + delete __pContentBgNormalColorReplacementBitmap; + __pContentBgNormalColorReplacementBitmap = null; + + delete __pContentBgPressedColorReplacementBitmap; + __pContentBgPressedColorReplacementBitmap = null; + + delete __pContentBgDisabledColorReplacementBitmap; + __pContentBgDisabledColorReplacementBitmap = null; + + delete __pContentBgHighlightedColorReplacementBitmap; + __pContentBgHighlightedColorReplacementBitmap = null; + + delete __pAmPmBgEffectNomralBitmap; + __pAmPmBgEffectNomralBitmap = null; + + delete __pAmPmBgEffectPressedBitmap; + __pAmPmBgEffectPressedBitmap = null; + + delete __pAmPmBgEffectDisabledBitmap; + __pAmPmBgEffectDisabledBitmap = null; + + delete __pContentBgEffectNormalBitmap; + __pContentBgEffectNormalBitmap = null; + + delete __pContentBgEffectPressedBitmap; + __pContentBgEffectPressedBitmap = null; + + delete __pContentBgEffectDisabledBitmap; + __pContentBgEffectDisabledBitmap = null; + + delete __pColonColorReplacementBitmap; + __pColonColorReplacementBitmap = null; + + delete __pColonDisabledColorReplacementBitmap; + __pColonDisabledColorReplacementBitmap = null; + + return r; +} + +result +_EditTimePresenter::DrawResourceBitmap(Canvas& canvas, const FloatRectangle& bounds, Bitmap* pBitmap, bool isCustomBitmap) +{ + result r = E_SUCCESS; + + if (pBitmap == null) + { + return r; + } + + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pBitmap)) + { + r = canvas.DrawNinePatchedBitmap(bounds, *pBitmap); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + 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)); + } + + return r; +} + +float +_EditTimePresenter::GetTimeElementWidth(void) const +{ + FloatRectangle bounds; + FloatDimension minSize; + bounds = __pEditTime->GetBoundsF(); + + float timeElementWidth = 0.0f; + float timeElementMinWidth = 0.0f; + float editTimeWidth = 0.0f; + + GET_SHAPE_CONFIG(EDITTIME::HOUR_MINUTE_WIDTH, __pEditTime->GetOrientation(), timeElementWidth); + GET_SHAPE_CONFIG(EDITTIME::HOUR_MINUTE_MIN_WIDTH, __pEditTime->GetOrientation(), timeElementMinWidth); + GET_SHAPE_CONFIG(EDITTIME::WIDTH, __pEditTime->GetOrientation(), editTimeWidth); + + GET_DIMENSION_CONFIG(EDITTIME::MIN_SIZE, __pEditTime->GetOrientation(), minSize); + + if (bounds.width >= editTimeWidth) + { + return timeElementWidth; + } + + if (bounds.width <= minSize.width) + { + timeElementWidth = timeElementMinWidth; + } + else if (bounds.width < editTimeWidth && bounds.width > minSize.width) + { + timeElementWidth = timeElementWidth - + ((timeElementWidth - timeElementMinWidth) / (editTimeWidth - minSize.width)) * (editTimeWidth - bounds.width); + } + + return timeElementWidth; +} + +result +_EditTimePresenter::InitializeTitleObject(void) +{ + result r = E_SUCCESS; + + Color titleNormalColor; + + GET_COLOR_CONFIG(EDITTIME::TITLE_TEXT_NORMAL, titleNormalColor); + + r = __titleObject.Construct(); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + TextSimple* pSimpleText = null; + + pSimpleText = new (std::nothrow)TextSimple((const_cast (__title.GetPointer())), __title.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."); + + __titleObject.AppendElement(*pSimpleText); + + __titleObject.SetForegroundColor(titleNormalColor, 0, __titleObject.GetTextLength()); + __titleObject.SetFont(__pFont, 0, __titleObject.GetTextLength()); + __titleObject.SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT | TEXT_OBJECT_ALIGNMENT_MIDDLE); + __titleObject.SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE); + __titleObject.SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); + __titleObject.SetTextObjectEllipsisType(TEXT_OBJECT_ELLIPSIS_TYPE_TAIL); + + return r; +} + +result +_EditTimePresenter::InitializeTextObject(void) +{ + result r = E_SUCCESS; + + r = __textObject.Construct(); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + TextSimple* 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()); + __textObject.SetAlignment(TEXT_OBJECT_ALIGNMENT_CENTER | TEXT_OBJECT_ALIGNMENT_MIDDLE); + __textObject.SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE); + __textObject.SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); + + return r; +} + +result +_EditTimePresenter::Draw(void) +{ + result r = E_SUCCESS; + + if (__isAnimating) + { + return E_SUCCESS; + } + + Canvas* pCanvas = __pEditTime->GetCanvasN(); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, (pCanvas != null), r, "Failed to get canvas."); + + FloatRectangle colonBounds(0.0f, 0.0f, 0.0f, 0.0f); + + float colonMargin = 0.0f; + + Dimension textArea; + + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + + FloatRectangle hourBounds(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle minuteBounds(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle ampmBounds(0.0f, 0.0f, 0.0f, 0.0f); + bool isCustomBitmap = false; + Bitmap* pReplacementBitmap = null; + Bitmap* pEffectBitmap = null; + + hourBounds = GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_HOUR); + minuteBounds = GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_MINUTE); + + if (!__24hours) + { + ampmBounds = GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_AMPM); + + if (!__pEditTime->IsEnabled()) + { + isCustomBitmap = IS_CUSTOM_BITMAP(EDITTIME::BUTTON_BG_DISABLED); + pReplacementBitmap = __pAmPmBgDisabledColorReplacementBitmap; + pEffectBitmap = __pAmPmBgEffectDisabledBitmap; + } + else if (__selectedId != DATETIME_ID_AMPM) + { + isCustomBitmap = IS_CUSTOM_BITMAP(EDITTIME::BUTTON_BG_NORMAL); + pReplacementBitmap = __pAmPmBgNormalColorReplacementBitmap; + pEffectBitmap = __pAmPmBgEffectNomralBitmap; + } + else + { + isCustomBitmap = IS_CUSTOM_BITMAP(EDITTIME::BUTTON_BG_PRESSED); + pReplacementBitmap = __pAmPmBgPressedColorReplacementBitmap; + pEffectBitmap = __pAmPmBgEffectPressedBitmap; + } + } + + if (GetHour() >= DATETIME_HOUR_MAX_FOR_24NOTATION) + { + SetAmEnabled(false); + } + else + { + SetAmEnabled(true); + } + + SetTimeConversion(); + + GET_SHAPE_CONFIG(EDITTIME::COLON_WIDTH, __pEditTime->GetOrientation(), colonBounds.width); + GET_SHAPE_CONFIG(EDITTIME::COLON_MARGIN, __pEditTime->GetOrientation(), colonMargin); + GET_SHAPE_CONFIG(EDITTIME::AMPM_HEIGHT, __pEditTime->GetOrientation(), colonBounds.height); + + colonBounds.x = hourBounds.x + hourBounds.width + colonMargin; + colonBounds.y = hourBounds.y + (hourBounds.height - colonBounds.height) / 2.0f; + + if (!__title.IsEmpty()) + { + r = DrawTitle(*pCanvas); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + r = DrawText(*pCanvas, hourBounds, __hourString, DATETIME_ID_HOUR); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = DrawText(*pCanvas, minuteBounds, __minuteString, DATETIME_ID_MINUTE); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = DrawColon(*pCanvas, colonBounds); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + if (!__24hours) + { + r = DrawResourceBitmap(*pCanvas, ampmBounds, pReplacementBitmap, isCustomBitmap); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + if (!isCustomBitmap) + { + r = DrawResourceBitmap(*pCanvas, ampmBounds, pEffectBitmap); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + r = DrawText(*pCanvas, ampmBounds, __ampmString, DATETIME_ID_AMPM, __amPmTextSize); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + +CATCH: + delete pCanvas; + return r; +} + +result +_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), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + if (__focusId == DATETIME_ID_HOUR) + { + bounds = GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_HOUR); + } + else if (__focusId == DATETIME_ID_MINUTE) + { + bounds = GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_MINUTE); + } + else if (__focusId == DATETIME_ID_AMPM) + { + bounds = GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_AMPM); + } + result r = E_SUCCESS; + + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pContentBgHighlightedColorReplacementBitmap)) + { + r = pCanvas->DrawNinePatchedBitmap(bounds, *__pContentBgHighlightedColorReplacementBitmap); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + 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; + return r; + +CATCH: + delete pCanvas; + delete pContentCanvas; + return r; +} + +result +_EditTimePresenter::DrawColon(Canvas& canvas, const FloatRectangle& bounds) +{ + result r = E_SUCCESS; + + if (!__pEditTime->IsEnabled()) + { + r = canvas.DrawBitmap(bounds, *__pColonDisabledColorReplacementBitmap); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + r = canvas.DrawBitmap(bounds, *__pColonColorReplacementBitmap); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + return r; +} + +result +_EditTimePresenter::DrawTitle(Canvas& canvas) +{ + if (!__pEditTime->IsEnabled()) + { + Color titleDisabledColor; + GET_COLOR_CONFIG(EDITTIME::TITLE_TEXT_DISABLED, titleDisabledColor); + __titleObject.SetForegroundColor(titleDisabledColor, 0, __titleObject.GetTextLength()); + } + + (_FontImpl::GetInstance(*__pFont))->SetSize(__titleFontSize); + (_FontImpl::GetInstance(*__pFont))->SetStyle(FONT_STYLE_BOLD); + __titleObject.SetFont(__pFont, 0, __titleObject.GetTextLength()); + + __titleObject.Draw(*_CanvasImpl::GetInstance(canvas)); + + return E_SUCCESS; +} + +result +_EditTimePresenter::DrawContentBitmap(Canvas& canvas, const FloatRectangle& bounds, _DateTimeId boxId) +{ + result r = E_SUCCESS; + + bool isCustomBitmap = false; + Bitmap* pReplacementBitmap = null; + Bitmap* pEffectBitmap = null; + + if (!__pEditTime->IsEnabled()) + { + isCustomBitmap = IS_CUSTOM_BITMAP(EDITTIME::CONTENT_BG_DISABLED); + pReplacementBitmap = __pContentBgDisabledColorReplacementBitmap; + pEffectBitmap = __pContentBgEffectDisabledBitmap; + } + else if (GetLastSelectedId() != boxId) + { + isCustomBitmap = IS_CUSTOM_BITMAP(EDITTIME::CONTENT_BG_NORMAL); + pReplacementBitmap = __pContentBgNormalColorReplacementBitmap; + pEffectBitmap = __pContentBgEffectNormalBitmap; + } + else + { + isCustomBitmap = IS_CUSTOM_BITMAP(EDITTIME::CONTENT_BG_PRESSED); + pReplacementBitmap = __pContentBgPressedColorReplacementBitmap; + pEffectBitmap = __pContentBgEffectPressedBitmap; + } + + r = DrawResourceBitmap(canvas, bounds, pReplacementBitmap, isCustomBitmap); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (!isCustomBitmap) + { + r = DrawResourceBitmap(canvas, bounds, pEffectBitmap); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + return r; +} + +result +_EditTimePresenter::DrawText(Canvas& canvas, const FloatRectangle& bounds, const String& text, _DateTimeId boxId, float textSize) +{ + result r = E_SUCCESS; + + Color textColor; + (_FontImpl::GetInstance(*__pFont))->SetStyle(FONT_STYLE_PLAIN); + + if (!__pEditTime->IsEnabled()) + { + if (boxId == DATETIME_ID_AMPM) + { + GET_COLOR_CONFIG(EDITTIME::BUTTON_TEXT_DISABLED, textColor); + } + else + { + GET_COLOR_CONFIG(EDITTIME::TEXT_DISABLED, textColor); + } + } + else + { + GET_COLOR_CONFIG(EDITTIME::TEXT_NORMAL, textColor); + + if (boxId == DATETIME_ID_AMPM) + { + if (boxId == __selectedId) + { + GET_COLOR_CONFIG(EDITTIME::BUTTON_TEXT_PRESSED, textColor); + } + else + { + 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) + { + DrawContentBitmap(canvas, bounds, boxId); + } + + FloatRectangle drawAreaBounds(0.0f, 0.0f, 0.0f, 0.0f); + drawAreaBounds = bounds; + + TextSimple* pSimpleText = null; + 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."); + + __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) + { + (_FontImpl::GetInstance(*__pFont))->SetSize(textSize); + } + if (__isFocused && __focusId == boxId) + { + if (boxId != __selectedId) + { + if (boxId == DATETIME_ID_AMPM) + { + GET_COLOR_CONFIG(EDITTIME::BUTTON_TEXT_HIGHLIGHTED, textColor); + } + else + { + GET_COLOR_CONFIG(EDITTIME::TEXT_HIGHLIGHTED, textColor); + } + } + + DrawFocus(); + } + + __textObject.SetFont(__pFont, 0, __textObject.GetTextLength()); + + __textObject.SetForegroundColor(textColor, 0, __textObject.GetTextLength()); + __textObject.SetBounds(drawAreaBounds); + __textObject.Draw(*_CanvasImpl::GetInstance(canvas)); + + return r; +} + +_DateTimeId +_EditTimePresenter::GetBoxIdFromPosition(const FloatPoint& point) const +{ + _DateTimeId displayBoxId = DATETIME_ID_NONE; + + FloatRectangle ampmBounds(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle hoursBounds(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle minutesBounds(0.0f, 0.0f, 0.0f, 0.0f); + + if (!__24hours) + { + ampmBounds = GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_AMPM); + } + + hoursBounds = GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_HOUR); + minutesBounds = GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_MINUTE); + + if (point.y < hoursBounds.y || point.y > hoursBounds.y + hoursBounds.height) + { + return displayBoxId; + } + + if (hoursBounds.Contains(point)) + { + displayBoxId = DATETIME_ID_HOUR; + } + else if (minutesBounds.Contains(point)) + { + displayBoxId = DATETIME_ID_MINUTE; + } + else if (ampmBounds.Contains(point)) + { + displayBoxId = DATETIME_ID_AMPM; + } + + return displayBoxId; +} + +void +_EditTimePresenter::SetLastSelectedId(_DateTimeId boxId) +{ + __lastSelectedId = boxId; + return; +} + +_DateTimeId +_EditTimePresenter::GetLastSelectedId(void) const +{ + return __lastSelectedId; +} + +void +_EditTimePresenter::SetFocusedElement() +{ + if (__isEnterKeyPressed) + { + __isEnterKeyPressed = false; + + if (__pEditTime->IsFocusModeStateEnabled()) + { + __isFocused = true; + } + } + + if (__focusId == DATETIME_ID_NONE || __focusId == DATETIME_ID_AMPM) + { + __focusId = DATETIME_ID_HOUR; + } + + return; +} + +void +_EditTimePresenter::SetFocusState(bool isFocused) +{ + __isFocused = isFocused; + return; +} + +bool +_EditTimePresenter::OnFocusLost(const _Control &source) +{ + if (!__isEnterKeyPressed || __focusId == DATETIME_ID_AMPM) + { + __focusId = DATETIME_ID_NONE; + __selectedId = DATETIME_ID_NONE; + } + __isFocused = false; + __pEditTime->Invalidate(); + return true; +} + +void +_EditTimePresenter::OnFocusModeStateChanged(void) +{ + __isFocused = false; + __focusId = DATETIME_ID_NONE; + __isEnterKeyPressed = false; + __selectedId = DATETIME_ID_NONE; + __pEditTime->Invalidate(); + return; +} + +bool +_EditTimePresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) +{ + if (!__isFocused) + { + return false; + } + _KeyCode keyCode = keyInfo.GetKeyCode(); + + switch (keyCode) + { + case _KEY_RIGHT: + { + __isEnterKeyPressed = false; + if (__focusId == DATETIME_ID_HOUR) + { + __focusId = DATETIME_ID_MINUTE; + } + else if (__focusId == DATETIME_ID_MINUTE) + { + if (!Is24HourNotationEnabled()) + { + __focusId = DATETIME_ID_AMPM; + } + } + else if (__focusId == DATETIME_ID_AMPM) + { + return false; + } + + __pEditTime->Invalidate(); + break; + } + case _KEY_LEFT: + { + __isEnterKeyPressed = false; + if (__focusId == DATETIME_ID_MINUTE) + { + __focusId = DATETIME_ID_HOUR; + } + else if (__focusId == DATETIME_ID_AMPM) + { + __focusId = DATETIME_ID_MINUTE; + } + else if (__focusId == DATETIME_ID_HOUR) + { + return false; + } + __pEditTime->Invalidate(); + break; + } + case _KEY_ENTER: + { + if (__focusId == DATETIME_ID_AMPM) + { + __selectedId = DATETIME_ID_AMPM; + __pEditTime->Invalidate(); + } + else + { + return false; + } + break; + } + + default: + { + return false; + } + } + return true; +} + +bool +_EditTimePresenter::OnKeyReleased(const _Control& source, const _KeyCode& keyCode) +{ + if (!__isFocused) + { + return false; + } + + if (__isAnimating) + { + VisualElement* pEditTimeElement = __pEditTime->GetVisualElement(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, (pEditTimeElement != null), false, r, "[%s] Propagating.", GetErrorMessage(r)); + pEditTimeElement->RemoveAllAnimations(); + } + + int minValue = -1; + int maxValue = -1; + int displayValue = -1; + + _DateTimeId boxId = DATETIME_ID_HOUR; + + switch (keyCode) + { + case _KEY_ENTER: + { + __isEnterKeyPressed = true; + if (__focusId == DATETIME_ID_HOUR) + { + boxId = DATETIME_ID_HOUR; + if (__pEditTime->GetDateTimeBar() != null) + { + if (!Is24HourNotationEnabled()) + { + if (GetHour() == 0) + { + minValue = DATETIME_HOUR_MIN + 1; + maxValue = DATETIME_HOUR_MAX_FOR_24NOTATION; + displayValue = DATETIME_HOUR_MAX_FOR_24NOTATION; + } + else if (GetHour() > DATETIME_HOUR_MAX_FOR_24NOTATION) + { + minValue = DATETIME_HOUR_MIN + 1; + maxValue = DATETIME_HOUR_MAX_FOR_24NOTATION; + displayValue = __pEditTime->GetHour() - DATETIME_HOUR_MAX_FOR_24NOTATION; + } + else + { + minValue = DATETIME_HOUR_MIN + 1; + maxValue = DATETIME_HOUR_MAX_FOR_24NOTATION; + displayValue = __pEditTime->GetHour(); + } + } + else + { + minValue = DATETIME_HOUR_MIN; + maxValue = DATETIME_HOUR_MAX; + displayValue = __pEditTime->GetHour(); + } + + if (__pEditTime->GetDateTimeBar()->GetItemCount() > 0) + { + __pEditTime->GetDateTimeBar()->RemoveAllItems(); + } + } + } + else if (__focusId == DATETIME_ID_MINUTE) + { + if (__pEditTime->GetDateTimeBar() != null) + { + minValue = DATETIME_MINUTE_MIN; + maxValue = DATETIME_MINUTE_MAX; + displayValue = __pEditTime->GetMinute(); + + if (__pEditTime->GetDateTimeBar()->GetItemCount() > 0) + { + __pEditTime->GetDateTimeBar()->RemoveAllItems(); + } + } + boxId = DATETIME_ID_MINUTE; + } + else if (__focusId == DATETIME_ID_AMPM) + { + SetAmEnabled(!GetAmEnabled()); + __pEditTime->FireTimeChangeEvent(TIME_INTERNAL_CHANGE_SAVED); + boxId = DATETIME_ID_AMPM; + __selectedId = DATETIME_ID_NONE; + + __pEditTime->Invalidate(); + } + + if ((__pEditTime->GetDateTimeBar() != null) && (boxId != DATETIME_ID_AMPM)) + { + FloatRectangle absoluteBounds = __pEditTime->GetAbsoluteBoundsF(); + + FloatRectangle bounds(0.0f, 0.0f, 0.0f, 0.0f); + bounds = GetDisplayAreaBoundsFromHoursStyle(boxId); + bounds.x += absoluteBounds.x; + + __pEditTime->GetDateTimeBar()->SetInitialValue(minValue, maxValue, displayValue, boxId); + __pEditTime->GetDateTimeBar()->CalculateArrowBounds(bounds); + __pEditTime->GetDateTimeBar()->SetVisibleState(true); + __pEditTime->GetDateTimeBar()->Open(); + UpdateLastSelectedValue(boxId, false); + } + break; + } + + default: + { + return false; + } + } + return true; +} + +bool +_EditTimePresenter::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + SysTryReturn(NID_UI_CTRL, IsTimePickerEnabled() == true, true, E_SYSTEM, "[E_SYSTEM] A system error has occurred. EditTime instance is disabled."); + + if (&source != __pEditTime) + { + return false; + } + + __touchMoveHandled = false; + + FloatRectangle hourBounds(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle minuteBounds(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle ampmBounds(0.0f, 0.0f, 0.0f, 0.0f); + + hourBounds = GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_HOUR); + minuteBounds = GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_MINUTE); + + if (!__24hours) + { + ampmBounds = GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_AMPM); + } + + FloatPoint point = touchinfo.GetCurrentPosition(); + + _DateTimeId boxId = GetBoxIdFromPosition(point); + + int minValue = -1; + int maxValue = -1; + int displayValue = -1; + + if (boxId == DATETIME_ID_HOUR) + { + if (__pEditTime->GetDateTimeBar() != null) + { + if (!__24hours) + { + if (GetHour() == 0) + { + minValue = DATETIME_HOUR_MIN + 1; + maxValue = DATETIME_HOUR_MAX_FOR_24NOTATION; + displayValue = DATETIME_HOUR_MAX_FOR_24NOTATION; + } + else if (GetHour() > DATETIME_HOUR_MAX_FOR_24NOTATION) + { + minValue = DATETIME_HOUR_MIN + 1; + maxValue = DATETIME_HOUR_MAX_FOR_24NOTATION; + displayValue = GetHour() - DATETIME_HOUR_MAX_FOR_24NOTATION; + } + else + { + minValue = DATETIME_HOUR_MIN + 1; + maxValue = DATETIME_HOUR_MAX_FOR_24NOTATION; + displayValue = GetHour(); + } + } + else + { + minValue = DATETIME_HOUR_MIN; + maxValue = DATETIME_HOUR_MAX; + displayValue = GetHour(); + } + + if (__pEditTime->GetDateTimeBar()->GetItemCount() > 0) + { + __pEditTime->GetDateTimeBar()->RemoveAllItems(); + } + + __pEditTime->GetDateTimeBar()->SetInitialValue(minValue, maxValue, displayValue, boxId); + } + + __bounds = hourBounds; + } + else if (boxId == DATETIME_ID_MINUTE) + { + if (__pEditTime->GetDateTimeBar() != null) + { + minValue = DATETIME_MINUTE_MIN; + maxValue = DATETIME_MINUTE_MAX; + displayValue = GetMinute(); + + if (__pEditTime->GetDateTimeBar()->GetItemCount() > 0) + { + __pEditTime->GetDateTimeBar()->RemoveAllItems(); + } + + __pEditTime->GetDateTimeBar()->SetInitialValue(minValue, maxValue, displayValue, boxId); + } + + __bounds = minuteBounds; + } + else if (boxId == DATETIME_ID_AMPM) + { + __selectedId = boxId; + __bounds = ampmBounds; + Draw(); + } + else + { + __selectedId = DATETIME_ID_NONE; + return false; + } + + __selectedId = boxId; + + return true; +} + +bool +_EditTimePresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + SysTryReturn(NID_UI_CTRL, IsTimePickerEnabled() == true, true, E_SYSTEM, "[E_SYSTEM] A system error has occurred. EditTime instance is disabled."); + + if (&source != __pEditTime) + { + return false; + } + + FloatRectangle bounds = __pEditTime->GetBoundsF(); + + FloatPoint startPoint(0.0f, 0.0f); + + float titleHeight = 0; + GET_SHAPE_CONFIG(EDITTIME::TITLE_HEIGHT, __pEditTime->GetOrientation(), titleHeight); + + __bounds = FloatRectangle(0.0f, titleHeight, bounds.width, bounds.height); + + FloatPoint point = touchinfo.GetCurrentPosition(); + + _DateTimeId boxId = GetBoxIdFromPosition(point); + + if ((boxId == GetLastSelectedId() && boxId != DATETIME_ID_AMPM) || boxId != __selectedId || boxId == DATETIME_ID_NONE) + { + if (__pEditTime->GetDateTimeBar() != null && __pEditTime->GetDateTimeBar()->IsActivated()) + { + __pEditTime->GetDateTimeBar()->ClearPreviousText(); + __pEditTime->GetDateTimeBar()->CloseDateTimeBar(); + } + + __selectedId = DATETIME_ID_NONE; + SetLastSelectedId(__selectedId); + + Draw(); + + return true; + } + UpdateLastSelectedValue(__selectedId, true); + if (GetLastSelectedId() == DATETIME_ID_AMPM) + { + return true; + } + + Draw(); + + if ((__pEditTime->GetDateTimeBar() != null) && (boxId != DATETIME_ID_AMPM) && (GetLastSelectedId() != DATETIME_ID_NONE)) + { + __pEditTime->SetFocused(true); + + FloatRectangle bounds(0.0f, 0.0f, 0.0f, 0.0f); + bounds = GetDisplayAreaBoundsFromHoursStyle(GetLastSelectedId()); + FloatRectangle absoluteBounds(0.0f, 0.0f, 0.0f, 0.0f); + absoluteBounds = __pEditTime->GetAbsoluteBoundsF(); + bounds.x += absoluteBounds.x; + + __pEditTime->GetDateTimeBar()->CalculateArrowBounds(bounds); + + if (__pEditTime->GetDateTimeBar()->IsActivated()) + { + __pEditTime->GetDateTimeBar()->RemoveAllAnimations(); + __pEditTime->GetDateTimeBar()->ClearPreviousText(); + __pEditTime->GetDateTimeBar()->Close(); + __pEditTime->GetDateTimeBar()->SetVisibleState(true); + __pEditTime->GetDateTimeBar()->Open(); + } + else + { + __pEditTime->GetDateTimeBar()->SetVisibleState(true); + __pEditTime->GetDateTimeBar()->Open(); + } + } + + __selectedId = DATETIME_ID_NONE; + return true; +} + +void +_EditTimePresenter::UpdateLastSelectedValue(_DateTimeId boxId, bool isTouchPressed) +{ + __selectedId = boxId; + SetLastSelectedId(boxId); + + __lastSelectedValue = ""; + + if (GetLastSelectedId() == DATETIME_ID_HOUR) + { + int hours = GetHour(); + + if (!Is24HourNotationEnabled()) + { + hours = hours % 12; + + if (hours == DATETIME_HOUR_MIN) + { + hours = hours + DATETIME_HOUR_MAX_FOR_24NOTATION; + } + } + __lastSelectedValue.Format(10, L"%02d", hours); + if (isTouchPressed) + { + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pEditTime); + } + } + else if (GetLastSelectedId() == DATETIME_ID_MINUTE) + { + __lastSelectedValue.Format(10, L"%02d", GetMinute()); + if (isTouchPressed) + { + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pEditTime); + } + } + else if (GetLastSelectedId() == DATETIME_ID_AMPM) + { + SetAmEnabled(!GetAmEnabled()); + __pEditTime->FireTimeChangeEvent(TIME_INTERNAL_CHANGE_SAVED); + if (isTouchPressed) + { + __pEditTime->UpdateAccessibilityElement(); + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pEditTime); + } + __selectedId = DATETIME_ID_NONE; + + if (__pEditTime->GetDateTimeBar() != null && __pEditTime->GetDateTimeBar()->IsActivated()) + { + __pEditTime->GetDateTimeBar()->SetVisibleState(false); + __pEditTime->GetDateTimeBar()->ClearPreviousText(); + __pEditTime->GetDateTimeBar()->Close(); + } + } + + __selectedId = DATETIME_ID_NONE; + __pEditTime->Invalidate(); + return; +} + +bool +_EditTimePresenter::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + if (&source != __pEditTime) + { + return false; + } + + __selectedId = DATETIME_ID_NONE; + __pEditTime->Invalidate(); + + return true; +} + +bool +_EditTimePresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + if (&source != __pEditTime) + { + return false; + } + + if (__pEditTime->GetDateTimeBar() != null && __pEditTime->GetDateTimeBar()->IsActivated()) + { + return true; + } + + return false; +} + +void +_EditTimePresenter::OnTouchMoveHandled(const _Control& control) +{ + __touchMoveHandled = true; + __selectedId = DATETIME_ID_NONE; + + return; +} + +void +_EditTimePresenter::OnFontChanged(Font* pFont) +{ + __pFont = pFont; + + if (__pEditTime->GetDateTimeBar() != null) + { + __pEditTime->GetDateTimeBar()->SetFont(*pFont); + } + + return; +} + +void +_EditTimePresenter::OnFontInfoRequested(unsigned long& style, float& size) +{ + style = FONT_STYLE_PLAIN; + size = __timeFontSize; + + return; +} + +result +_EditTimePresenter::Initialize(void) +{ + result r = E_SUCCESS; + + float titleTimeMargin = 0; + float timeHeight = 0; + float editTimeHeight = 0; + + GET_SHAPE_CONFIG(EDITTIME::TEXT_FONT_SIZE, __pEditTime->GetOrientation(), __titleFontSize); + GET_SHAPE_CONFIG(EDITTIME::TIME_FONT_SIZE, __pEditTime->GetOrientation(), __timeFontSize); + GET_SHAPE_CONFIG(EDITTIME::TITLE_TIME_MARGIN, __pEditTime->GetOrientation(), titleTimeMargin); + GET_SHAPE_CONFIG(EDITTIME::TIME_HEIGHT, __pEditTime->GetOrientation(), timeHeight); + GET_SHAPE_CONFIG(EDITTIME::HEIGHT, __pEditTime->GetOrientation(), editTimeHeight); + + if (__pEditTime->GetBoundsF().height > editTimeHeight) + { + editTimeHeight = __pEditTime->GetBoundsF().height; + } + + if (!__title.IsEmpty()) + { + SetTitleBounds(); + if (!__isEditTimeInitialized) + { + r = InitializeTitleObject(); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + __titleBounds.y = (editTimeHeight - (__titleBounds.height + titleTimeMargin + timeHeight)) / 2.0f; + __titleObject.SetBounds(__titleBounds); + } + + __pFont = __pEditTime->GetFallbackFont(); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, __pFont != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (!__isEditTimeInitialized) + { + r = LoadResource(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = InitializeTextObject(); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + __isEditTimeInitialized = true; + + UpdateTimeFormat(); + return r; +} + +void +_EditTimePresenter::UpdateTimeFormat(void) +{ + if (!__is24hoursSet) + { + String key(L"http://tizen.org/setting/locale.time.format.24hour"); + SettingInfo::GetValue(key , __24hours); + } + + return; +} + +void +_EditTimePresenter::Animate(void) +{ + SysTryReturnVoidResult(NID_UI_CTRL, !__isAnimating, E_SUCCESS, "Rolling animation is in progress."); + SysAssertf((__pFont != null), "Font instance must not be null."); + + (_FontImpl::GetInstance(*__pFont))->SetSize(__timeFontSize); + + result r = E_SUCCESS; + FloatRectangle rect; + String hourString; + String minuteString; + String newValue; + TextSimple* pOldSimpleText = null; + TextSimple* pNewSimpleText = null; + bool isCustomBitmap = false; + + _DateTimeUtils dateTimeUtils; + int hours = GetHour(); + if (!Is24HourNotationEnabled()) + { + hours = hours % 12; + + if (hours == DATETIME_HOUR_MIN) + { + hours = hours + DATETIME_HOUR_MAX_FOR_24NOTATION; + } + } + hourString.Format(10, L"%02d", hours); + minuteString.Format(10, L"%02d", GetMinute()); + + if (GetLastSelectedId() == DATETIME_ID_HOUR) + { + SysTryReturnVoidResult(NID_UI_CTRL, (__lastSelectedValue.Equals(hourString) == false), E_SUCCESS, "[E_SUCCESS] Hour string matched."); + + newValue = hourString; + rect = GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_HOUR); + } + else if (GetLastSelectedId() == DATETIME_ID_MINUTE) + { + SysTryReturnVoidResult(NID_UI_CTRL, (__lastSelectedValue.Equals(minuteString) == false), E_SUCCESS, "[E_SUCCESS] Minute string matched."); + + newValue = minuteString; + rect = GetDisplayAreaBoundsFromHoursStyle(DATETIME_ID_MINUTE); + } + + FloatDimension newTextDim; + FloatDimension oldTextDim; + FloatPoint textPoint; + VisualElement* pNewVisualElement = null; + VisualElement* pOldVisualElement = null; + VisualElement* pEditTimeElement = null; + VisualElementPropertyAnimation* pNewBoundsAnimation = null; + VisualElementPropertyAnimation* pOldBoundsAnimation = null; + Canvas* pCanvas = null; + Canvas* pContentCanvas = null; + Color contentBgColor; + Color textNormalColor; + Color textPressedColor; + float contentTextMargin; + + GET_COLOR_CONFIG(EDITTIME::CONTENT_BG_PRESSED, contentBgColor); + GET_COLOR_CONFIG(EDITTIME::TEXT_PRESSED, textPressedColor); + GET_SHAPE_CONFIG(EDITDATE::CONTENT_TEXT_MARGIN, __pEditTime->GetOrientation(), contentTextMargin); + + __pFont->GetTextExtent(newValue, newValue.GetLength(), newTextDim); + __pFont->GetTextExtent(__lastSelectedValue, __lastSelectedValue.GetLength(), oldTextDim); + + if (newTextDim.width > oldTextDim.width) + { + textPoint.x = (rect.width - newTextDim.width) / 2.0f; + } + else + { + textPoint.x = (rect.width - oldTextDim.width) / 2.0f; + } + + SysTryReturnVoidResult(NID_UI_CTRL, (rect.x + textPoint.x < __pEditTime->GetBounds().width), E_SUCCESS, "Rolling animation cann't be played."); + + __isAnimating = true; + + __pContentProvider = new (std::nothrow) VisualElement(); + SysTryReturnVoidResult(NID_UI_CTRL, (__pContentProvider != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = __pContentProvider->Construct(); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pContentProvider->SetShowState(true); + __pContentProvider->SetClipChildrenEnabled(true); + __pContentProvider->SetImplicitAnimationEnabled(false); + + pEditTimeElement = __pEditTime->GetVisualElement(); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, (pEditTimeElement != null), , r, "[%s] Propagating.", GetErrorMessage(r)); + + pNewVisualElement = new (std::nothrow) VisualElement(); + SysTryCatch(NID_UI_CTRL, (pNewVisualElement != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = pNewVisualElement->Construct(); + if (r != E_SUCCESS) + { + pNewVisualElement->Destroy(); + pNewVisualElement = null; + } + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + pNewVisualElement->SetShowState(true); + + pOldVisualElement = new (std::nothrow) VisualElement(); + if (pOldVisualElement == null) + { + pNewVisualElement->Destroy(); + pNewVisualElement = null; + } + SysTryCatch(NID_UI_CTRL, (pOldVisualElement != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = pOldVisualElement->Construct(); + if (r != E_SUCCESS) + { + pNewVisualElement->Destroy(); + pOldVisualElement->Destroy(); + pNewVisualElement = null; + pOldVisualElement = null; + } + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + pOldVisualElement->SetShowState(true); + + __pContentProvider->SetBounds(FloatRectangle((rect.x + contentTextMargin), (rect.y + (contentTextMargin * 2.0f)), (rect.width - (contentTextMargin * 2.0f)), (rect.height - (contentTextMargin * 4.0f)))); + + pNewVisualElement->SetBounds(FloatRectangle(0, 0, __pContentProvider->GetBounds().width, __pContentProvider->GetBounds().height)); + pOldVisualElement->SetBounds(FloatRectangle(0, 0, __pContentProvider->GetBounds().width, __pContentProvider->GetBounds().height)); + + pContentCanvas = pEditTimeElement->GetCanvasN(__pContentProvider->GetBounds()); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, (pContentCanvas != null), , r, "[%s] Propagating.", GetErrorMessage(r)); + pContentCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pContentCanvas->Clear(); + + pCanvas = pEditTimeElement->GetCanvasN(rect); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, (pCanvas != null), , r, "[%s] Propagating.", GetErrorMessage(r)); + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + rect.x = 0.0f; + rect.y = 0.0f; + isCustomBitmap = IS_CUSTOM_BITMAP(EDITTIME::CONTENT_BG_PRESSED); + r = DrawResourceBitmap(*pCanvas, rect, __pContentBgPressedColorReplacementBitmap, isCustomBitmap); + + if (!isCustomBitmap) + { + result res = DrawResourceBitmap(*pCanvas, rect, __pContentBgEffectPressedBitmap); + + if (res != E_SUCCESS) + { + SysLog(NID_UI_CTRL, "[%s] Propagating.", GetErrorMessage(res)); + } + } + + delete pCanvas; + pCanvas = null; + + if (r != E_SUCCESS) + { + pContentCanvas->SetBackgroundColor(contentBgColor); + pContentCanvas->Clear(); + } + + delete pContentCanvas; + pContentCanvas = null; + + pEditTimeElement->AttachChild(*__pContentProvider); + + __pContentProvider->AttachChild(*pOldVisualElement); + __pContentProvider->AttachChild(*pNewVisualElement); + + pNewBoundsAnimation = new (std::nothrow) VisualElementPropertyAnimation(); + SysTryCatch(NID_UI_CTRL, (pNewBoundsAnimation != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pNewBoundsAnimation->SetDuration(300); + pNewBoundsAnimation->SetPropertyName("bounds.position"); + pNewBoundsAnimation->SetStartValue(Variant(FloatPoint(pNewVisualElement->GetBounds().x, oldTextDim.height))); + pNewBoundsAnimation->SetEndValue(Variant(FloatPoint(pNewVisualElement->GetBounds().x, 0.0f))); + + pOldBoundsAnimation = new (std::nothrow) VisualElementPropertyAnimation(); + SysTryCatch(NID_UI_CTRL, (pOldBoundsAnimation != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pOldBoundsAnimation->SetDuration(300); + pOldBoundsAnimation->SetPropertyName("bounds.position"); + pOldBoundsAnimation->SetStartValue(Variant(FloatPoint(pOldVisualElement->GetBounds().x, 0.0f))); + pOldBoundsAnimation->SetEndValue(Variant(FloatPoint(pOldVisualElement->GetBounds().x, oldTextDim.height * -1.0f))); + + 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)); + + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + pCanvas->SetForegroundColor(textPressedColor); + + (_FontImpl::GetInstance(*__pFont))->SetSize(__timeFontSize); + (_FontImpl::GetInstance(*__pFont))->SetStyle(FONT_STYLE_PLAIN); + __textObject.RemoveAll(); + __textObject.AppendElement(*pOldSimpleText); + + __textObject.SetFont(__pFont, 0, __textObject.GetTextLength()); + __textObject.SetForegroundColor(textPressedColor, 0, __textObject.GetTextLength()); + __textObject.SetBounds(FloatRectangle(0, 0, pCanvas->GetBounds().width, pCanvas->GetBounds().height)); + __textObject.Draw(*_CanvasImpl::GetInstance(*pCanvas)); + + delete pCanvas; + pCanvas = null; + + pNewSimpleText = new (std::nothrow)TextSimple((const_cast (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)); + + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + pCanvas->SetForegroundColor(textPressedColor); + + (_FontImpl::GetInstance(*__pFont))->SetSize(__timeFontSize); + (_FontImpl::GetInstance(*__pFont))->SetStyle(FONT_STYLE_PLAIN); + __textObject.RemoveAll(); + __textObject.AppendElement(*pNewSimpleText); + + __textObject.SetFont(__pFont, 0, __textObject.GetTextLength()); + __textObject.SetForegroundColor(textPressedColor, 0, __textObject.GetTextLength()); + __textObject.SetBounds(FloatRectangle(0, 0, pCanvas->GetBounds().width, pCanvas->GetBounds().height)); + __textObject.Draw(*_CanvasImpl::GetInstance(*pCanvas)); + + delete pCanvas; + pCanvas = null; + + pOldVisualElement->SetImplicitAnimationEnabled(false); + pNewVisualElement->SetImplicitAnimationEnabled(false); + + AnimationTransaction::Begin(__transactionId); + pOldVisualElement->AddAnimation(*pOldBoundsAnimation); + pNewVisualElement->AddAnimation(*pNewBoundsAnimation); + AnimationTransaction::SetCurrentTransactionEventListener(__pEditTime); + AnimationTransaction::Commit(); + + delete pOldBoundsAnimation; + delete pNewBoundsAnimation; + + return; + +CATCH: + __isAnimating = false; + __pContentProvider->Destroy(); + __pContentProvider = null; + + delete pNewBoundsAnimation; + pNewBoundsAnimation = null; + + delete pOldBoundsAnimation; + pOldBoundsAnimation = null; + + delete pOldSimpleText; + pOldSimpleText = null; + + delete pNewSimpleText; + pNewSimpleText = null; + + delete pContentCanvas; + pContentCanvas = null; + + return; +} + +void +_EditTimePresenter::EndTransaction(void) +{ + result r = E_SUCCESS; + + __isAnimating = false; + VisualElement* pEditTimeElement = __pEditTime->GetVisualElement(); + r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, (pEditTimeElement != null), r, "[%s] Propagating.", GetErrorMessage(r)); + + 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 new file mode 100644 index 0000000..be76edb --- /dev/null +++ b/src/ui/controls/FUiCtrl_ExpandableEditAreaEvent.cpp @@ -0,0 +1,204 @@ +// +// 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_ExpandableEditAreaEvent.cpp +* @brief This is the implementation for the _ExpandableEditAreaEvent class. +* @version 1.0 +*/ + +// includes +#include +#include +#include +#include "FUiCtrl_ExpandableEditAreaEvent.h" +#include "FUiCtrl_IExpandableEditAreaEventListener.h" + +// using namespace +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; + +namespace Tizen {namespace Ui {namespace Controls +{ + +/** + * @class _CoreExpandableEditAreaEventArg + * @brief This class is used as the argument to action event listener. + * + * This class is used as the argument to action event listener. When an action event is generated + * (such as when a button is pressed) the TextEvent calls TextEventListener's OnActionPerformed + * with an instance of this class as an argument. + * + * From this class, one can find out, the (event) source object and the action ID. + */ +class _OSP_EXPORT_ _CoreExpandableEditAreaEventArg + : public IEventArg + , public Object +{ +// Lifecycle +public: + /** + * This is the default class constructor. + * + * @param[in] source A pointer to the Object instance which contains this instance. + * @param[in] actionId Action Id. + */ + _CoreExpandableEditAreaEventArg(_ExpandableEditAreaEventStatus status, int tokenIndex = -1); + + /** + * This is the class destructor. + * + */ + virtual ~_CoreExpandableEditAreaEventArg(void); + + +// Access +public: + /** + * This method returns the TextEventStatus which the event initially occurred. + * + * @return See the comment above. + */ + _ExpandableEditAreaEventStatus GetStatus(void) const; + + int GetNewLineCount(void) const; + + +// Attribute +private: + /** + * Action Id. + */ + _ExpandableEditAreaEventStatus __status; + + int __newLineCount; +}; // _CoreExpandableEditAreaEventArg + +_CoreExpandableEditAreaEventArg::_CoreExpandableEditAreaEventArg(_ExpandableEditAreaEventStatus status, int newLineCount) + : __status(status) + , __newLineCount(newLineCount) +{ + // nothing +} + +_CoreExpandableEditAreaEventArg::~_CoreExpandableEditAreaEventArg(void) +{ + // nothing +} + +//////////////////////////////////////////////////////////////////////////////// +/// _CoreExpandableEditAreaEventArg class Access + +_ExpandableEditAreaEventStatus +_CoreExpandableEditAreaEventArg::GetStatus(void) const +{ + return __status; +} + +int +_CoreExpandableEditAreaEventArg::GetNewLineCount(void) const +{ + return __newLineCount; +} + +//////////////////////////////////////////////////////////////////////////////// +/// _CoreExpandableEditAreaEvent class Lifecycle + +_ExpandableEditAreaEvent::_ExpandableEditAreaEvent(const _Control& source) + : __pSource(null) +{ + result r = _Event::Initialize(); + + // set event source + if (r == E_SUCCESS) + { + __pSource = &source; + } +} + +_ExpandableEditAreaEvent::~_ExpandableEditAreaEvent(void) +{ + // nothing +} + +_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 allocation failed."); + + if (IsFailed(GetLastResult())) + { + goto CATCH; + } + + return pCoreTextEvent; + +CATCH: + delete pCoreTextEvent; + return null; +} + +//////////////////////////////////////////////////////////////////////////////// +/// _WindowEvent class Accessor + +const _Control* +_ExpandableEditAreaEvent::GetSource(void) const +{ + return __pSource; +} + +//////////////////////////////////////////////////////////////////////////////// +/// _CoreExpandableEditAreaEvent class Operation + +void +_ExpandableEditAreaEvent::FireImpl(IEventListener& listener, const IEventArg& arg) +{ + // cast to _ITextEventListener + _IExpandableEditAreaEventListener* pExpandableEditAreaEventListener = + dynamic_cast <_IExpandableEditAreaEventListener*>(&listener); + SysTryReturnVoidResult(NID_UI_CTRL, pExpandableEditAreaEventListener != null, E_INVALID_ARG, + "[E_INVALID_ARG] The invalid listener was given.\n"); + + // cast to _CoreExpandableEditAreaEventArg + const _CoreExpandableEditAreaEventArg* pArg = dynamic_cast (&arg); + 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) + { + pExpandableEditAreaEventListener->OnExpandableEditAreaLineAdded(*__pSource, pArg->GetNewLineCount()); + } + else if (status == _EXPANDABLE_EDITAREA_EVENT_REMOVED) + { + pExpandableEditAreaEventListener->OnExpandableEditAreaLineRemoved(*__pSource, pArg->GetNewLineCount()); + } + + SetLastResult(E_SUCCESS); + + return; +} + +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 allocation failed."); + + return pEventArg; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_ExpandableEditAreaImpl.cpp b/src/ui/controls/FUiCtrl_ExpandableEditAreaImpl.cpp new file mode 100644 index 0000000..3b82c85 --- /dev/null +++ b/src/ui/controls/FUiCtrl_ExpandableEditAreaImpl.cpp @@ -0,0 +1,2062 @@ +// +// 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_ExpandableEditAreaImpl.cpp +* @brief This is the implementation for the _ExpandableEditAreaImpl class. +* @version 3.0 +*/ + +#include +#include +#include +#include +#include +#include +#include "FUi_UiBuilder.h" +#include "FUi_ResourceSizeInfo.h" +#include "FUiCtrl_Edit.h" +#include "FUiCtrl_ExpandableEditAreaImpl.h" +#include "FUiCtrl_TokenEdit.h" +#include "FUi_CoordinateSystemUtils.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Locales; +using namespace Tizen::Base::Runtime; + +namespace Tizen { namespace Ui { namespace Controls +{ +_ExpandableEditAreaImpl* +_ExpandableEditAreaImpl::GetInstance(ExpandableEditArea& expandableEditArea) +{ + return (static_cast<_ExpandableEditAreaImpl*> (expandableEditArea._pControlImpl)); +} + +const _ExpandableEditAreaImpl* +_ExpandableEditAreaImpl::GetInstance(const ExpandableEditArea& expandableEditArea) +{ + return (static_cast (expandableEditArea._pControlImpl)); +} + +_ExpandableEditAreaImpl::_ExpandableEditAreaImpl(ExpandableEditArea* pPublic, _Edit* pCore) + : _ControlImpl(pPublic, pCore) + , __pExpandableEditArea(pCore) + , __expandableEditAreaStyle(EXPANDABLE_EDIT_AREA_STYLE_NORMAL) + , __expandableEditAreaTitleStyle(EXPANDABLE_EDIT_AREA_TITLE_STYLE_NONE) + , __maxLineCount(EXPANDABLE_EDIT_AREA_DEFAULT_MAX_LINE_COUNT) + , __pPublicTextEvent(null) + , __pPublicExpandableEditAreaEvent(null) + , __pPublicTextBlockEvent(null) + , __pPublicKeypadEvent(null) + , __pPublicLanguageEvent(null) + , __pTokenFilter(null) +{ +} + +_ExpandableEditAreaImpl::~_ExpandableEditAreaImpl(void) +{ + if (__pExpandableEditArea != null) + { + __pExpandableEditArea->RemoveTextEventListener(*this); + __pExpandableEditArea->RemoveExpandableEditAreaEventListener(*this); + __pExpandableEditArea->RemoveTextBlockEventListener(*this); + __pExpandableEditArea->RemoveKeypadEventListener(*this); + } + + delete __pPublicTextEvent; + __pPublicTextEvent = null; + + delete __pPublicExpandableEditAreaEvent; + __pPublicExpandableEditAreaEvent = null; + + delete __pPublicTextBlockEvent; + __pPublicTextBlockEvent = null; + + delete __pPublicKeypadEvent; + __pPublicKeypadEvent = null; + +} + +_ExpandableEditAreaImpl* +_ExpandableEditAreaImpl::CreateExpandableEditAreaImplN(ExpandableEditArea* pControl, const Rectangle& rect, + ExpandableEditAreaStyle style, ExpandableEditAreaTitleStyle titleStyle) +{ + ClearLastResult(); + + result r = E_SUCCESS; + + FloatRectangle fRect = _CoordinateSystemUtils::ConvertToFloat(rect); + + _ExpandableEditAreaImpl* pImpl = CreateExpandableEditAreaImplFN(pControl, fRect, style, titleStyle); + r = GetLastResult(); + + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + return pImpl; +} + +_ExpandableEditAreaImpl* +_ExpandableEditAreaImpl::CreateExpandableEditAreaImplFN(ExpandableEditArea* pControl, const FloatRectangle& fRect, + ExpandableEditAreaStyle style, ExpandableEditAreaTitleStyle titleStyle) +{ + ClearLastResult(); + + 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, "[%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) + { + pCore = _Edit::CreateEditN(); + } + else + { + pCore = _TokenEdit::CreateTokenEditN(); + } + SysTryReturn(NID_UI_CTRL, pCore != null, null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _ExpandableEditAreaImpl* pImpl = new (std::nothrow) _ExpandableEditAreaImpl(pControl, pCore); + r = CheckConstruction(pCore, pImpl); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pImpl->InitializeBoundsPropertiesF(FUNC_SIZE_INFO(ExpandableEditArea)(), fRect, _CONTROL_ORIENTATION_PORTRAIT); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pCore->AddExpandableEditAreaEventListener(*pImpl); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pCore->AddKeypadEventListener(*pImpl); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pCore->AddTextBlockEventListener(*pImpl); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pCore->AddTextEventListener(*pImpl); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pCore->AddLanguageEventListener(*pImpl); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return pImpl; + +CATCH: + delete pImpl; + return null; +} + +const char* +_ExpandableEditAreaImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Controls::ExpandableEditArea"; +} + +const ExpandableEditArea& +_ExpandableEditAreaImpl::GetPublic(void) const +{ + return static_cast (_ControlImpl::GetPublic()); +} + +ExpandableEditArea& +_ExpandableEditAreaImpl::GetPublic(void) +{ + return static_cast (_ControlImpl::GetPublic()); +} + +const _Edit& +_ExpandableEditAreaImpl::GetCore(void) const +{ + return static_cast (_ControlImpl::GetCore()); +} + +_Edit& +_ExpandableEditAreaImpl::GetCore(void) +{ + return static_cast <_Edit&>(_ControlImpl::GetCore()); +} + +result +_ExpandableEditAreaImpl::Construct(const Rectangle& rect, ExpandableEditAreaStyle style, + ExpandableEditAreaTitleStyle titleStyle, int maxExpandableLines) +{ + ClearLastResult(); + + result r = E_SUCCESS; + + FloatRectangle fRect = _CoordinateSystemUtils::ConvertToFloat(rect); + + r = CreateExpandableEditArea(fRect, style, titleStyle, maxExpandableLines); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +result +_ExpandableEditAreaImpl::Construct(const FloatRectangle& fRect, ExpandableEditAreaStyle style, + ExpandableEditAreaTitleStyle titleStyle, int maxExpandableLines) +{ + ClearLastResult(); + + result r = E_SUCCESS; + + r = CreateExpandableEditArea(fRect, style, titleStyle, maxExpandableLines); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +result +_ExpandableEditAreaImpl::Dispose(void) +{ + ClearLastResult(); + + result r = E_SUCCESS; + + if (__pExpandableEditArea != null) + { + delete __pExpandableEditArea; + __pExpandableEditArea = null; + } + + return r; +} + +result +_ExpandableEditAreaImpl::CreateExpandableEditArea(const FloatRectangle& fRect, ExpandableEditAreaStyle style, + ExpandableEditAreaTitleStyle titleStyle, int maxExpandableLines) +{ + ClearLastResult(); + + result r = E_SUCCESS; + + int editStyle = EDIT_STYLE_NORMAL | EDIT_STYLE_FLEXIBLE; + if (style & EXPANDABLE_EDIT_AREA_STYLE_TOKEN) + { + editStyle |= EDIT_STYLE_TOKEN; + } + + if (titleStyle == EXPANDABLE_EDIT_AREA_TITLE_STYLE_INNER) + { + editStyle |= EDIT_STYLE_TITLE_LEFT; + } + else if (titleStyle == EXPANDABLE_EDIT_AREA_TITLE_STYLE_TOP) + { + editStyle |= EDIT_STYLE_TITLE_TOP; + } + + r = __pExpandableEditArea->Initialize(editStyle, INPUT_STYLE_OVERLAY, EXPANDABLE_EDIT_AREA_TEXT_LENGTH_MAX); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + __pExpandableEditArea->SetMaxLineCount(maxExpandableLines); + + return r; +} + +int +_ExpandableEditAreaImpl::GetMargin(EditMarginType marginType) const +{ + ClearLastResult(); + + if (marginType == EDIT_MARGIN_TYPE_VERTICAL) + { + return __pExpandableEditArea->GetVerticalMargin(EDIT_TEXT_TOP_MARGIN); + } + else + { + return __pExpandableEditArea->GetHorizontalMargin(EDIT_TEXT_LEFT_MARGIN); + } +} + +float +_ExpandableEditAreaImpl::GetMarginF(EditMarginType marginType) const +{ + ClearLastResult(); + + if (marginType == EDIT_MARGIN_TYPE_VERTICAL) + { + return __pExpandableEditArea->GetVerticalMarginF(EDIT_TEXT_TOP_MARGIN); + } + else + { + return __pExpandableEditArea->GetHorizontalMarginF(EDIT_TEXT_LEFT_MARGIN); + } +} +result +_ExpandableEditAreaImpl::SetMargin(EditMarginType marginType, int margin) +{ + ClearLastResult(); + + result r = E_SUCCESS; + + if (marginType == EDIT_MARGIN_TYPE_HORIZONTAL) + { + r = __pExpandableEditArea->SetHorizontalMargin(margin, EDIT_TEXT_LEFT_MARGIN); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + r = __pExpandableEditArea->SetHorizontalMargin(margin, EDIT_TEXT_RIGHT_MARGIN); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + r = __pExpandableEditArea->SetVerticalMargin(margin, EDIT_TEXT_TOP_MARGIN); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + r = __pExpandableEditArea->SetVerticalMargin(margin, EDIT_TEXT_BOTTOM_MARGIN); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + return r; +} + +result +_ExpandableEditAreaImpl::SetMargin(EditMarginType marginType, float margin) +{ + ClearLastResult(); + + result r = E_SUCCESS; + + if (marginType == EDIT_MARGIN_TYPE_HORIZONTAL) + { + r = __pExpandableEditArea->SetHorizontalMargin(margin, EDIT_TEXT_LEFT_MARGIN); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + r = __pExpandableEditArea->SetHorizontalMargin(margin, EDIT_TEXT_RIGHT_MARGIN); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + r = __pExpandableEditArea->SetVerticalMargin(margin, EDIT_TEXT_TOP_MARGIN); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + r = __pExpandableEditArea->SetVerticalMargin(margin, EDIT_TEXT_BOTTOM_MARGIN); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + return r; +} + +KeypadAction +_ExpandableEditAreaImpl::GetKeypadAction(void) const +{ + ClearLastResult(); + + CoreKeypadAction coreKeypadAction = __pExpandableEditArea->GetKeypadAction(); + KeypadAction publicKeypadAction = KEYPAD_ACTION_ENTER; + + switch (coreKeypadAction) + { + case CORE_KEYPAD_ACTION_ENTER: + publicKeypadAction = KEYPAD_ACTION_ENTER; + break; + + case CORE_KEYPAD_ACTION_GO: + publicKeypadAction = KEYPAD_ACTION_GO; + break; + + case CORE_KEYPAD_ACTION_NEXT: + publicKeypadAction = KEYPAD_ACTION_NEXT; + break; + + case CORE_KEYPAD_ACTION_SEND: + publicKeypadAction = KEYPAD_ACTION_SEND; + break; + + case CORE_KEYPAD_ACTION_SEARCH: + publicKeypadAction = KEYPAD_ACTION_SEARCH; + break; + + case CORE_KEYPAD_ACTION_LOGIN: + publicKeypadAction = KEYPAD_ACTION_LOGIN; + break; + + case CORE_KEYPAD_ACTION_SIGN_IN: + publicKeypadAction = KEYPAD_ACTION_SIGN_IN; + break; + + case CORE_KEYPAD_ACTION_JOIN: + publicKeypadAction = KEYPAD_ACTION_JOIN; + break; + + case CORE_KEYPAD_ACTION_DONE: + publicKeypadAction = KEYPAD_ACTION_DONE; + break; + + default: + break; + } + + return publicKeypadAction; +} + +result +_ExpandableEditAreaImpl::SetKeypadAction(KeypadAction keypadAction) +{ + ClearLastResult(); + + CoreKeypadAction coreKeypadAction = CORE_KEYPAD_ACTION_ENTER; + + switch (keypadAction) + { + case KEYPAD_ACTION_ENTER: + coreKeypadAction = CORE_KEYPAD_ACTION_ENTER; + break; + + case KEYPAD_ACTION_GO: + coreKeypadAction = CORE_KEYPAD_ACTION_GO; + break; + + case KEYPAD_ACTION_NEXT: + coreKeypadAction = CORE_KEYPAD_ACTION_NEXT; + break; + + case KEYPAD_ACTION_SEND: + coreKeypadAction = CORE_KEYPAD_ACTION_SEND; + break; + + case KEYPAD_ACTION_SEARCH: + coreKeypadAction = CORE_KEYPAD_ACTION_SEARCH; + break; + + case KEYPAD_ACTION_LOGIN: + coreKeypadAction = CORE_KEYPAD_ACTION_LOGIN; + break; + + case KEYPAD_ACTION_SIGN_IN: + coreKeypadAction = CORE_KEYPAD_ACTION_SIGN_IN; + break; + + case KEYPAD_ACTION_JOIN: + coreKeypadAction = CORE_KEYPAD_ACTION_JOIN; + break; + + case KEYPAD_ACTION_DONE: + coreKeypadAction = CORE_KEYPAD_ACTION_DONE; + break; + + default: + break; + } + + return __pExpandableEditArea->SetKeypadAction(coreKeypadAction); +} + +KeypadStyle +_ExpandableEditAreaImpl::GetKeypadStyle(void) const +{ + ClearLastResult(); + + return __pExpandableEditArea->GetKeypadStyle(); +} + +result +_ExpandableEditAreaImpl::SetKeypadStyle(KeypadStyle keypadStyle) +{ + ClearLastResult(); + + return __pExpandableEditArea->SetKeypadStyle(keypadStyle); +} + +bool +_ExpandableEditAreaImpl::IsTextPredictionEnabled(void) const +{ + return __pExpandableEditArea->IsTextPredictionEnabled(); +} + +result +_ExpandableEditAreaImpl::SetTextPredictionEnabled(bool enable) +{ + return __pExpandableEditArea->SetTextPredictionEnabled(enable); +} + +result +_ExpandableEditAreaImpl::HideKeypad(void) +{ + ClearLastResult(); + + return __pExpandableEditArea->HideKeypad(); +} + +int +_ExpandableEditAreaImpl::GetTextSize(void) const +{ + ClearLastResult(); + + return __pExpandableEditArea->GetTextSize(); +} + +float +_ExpandableEditAreaImpl::GetTextSizeF(void) const +{ + ClearLastResult(); + + return __pExpandableEditArea->GetTextSizeF(); +} + +result +_ExpandableEditAreaImpl::SetTextSize(int size) +{ + ClearLastResult(); + + return __pExpandableEditArea->SetTextSize(size); +} + +result +_ExpandableEditAreaImpl::SetTextSize(float size) +{ + ClearLastResult(); + + return __pExpandableEditArea->SetTextSize(size); +} + +Color +_ExpandableEditAreaImpl::GetColor(EditStatus status) const +{ + ClearLastResult(); + + return __pExpandableEditArea->GetColor(status); +} + +Color +_ExpandableEditAreaImpl::GetTextColor(EditTextColor type) const +{ + ClearLastResult(); + 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); +} + +result +_ExpandableEditAreaImpl::SetBackgroundBitmap(EditStatus status, const Bitmap& bitmap) +{ + ClearLastResult(); + + return __pExpandableEditArea->SetBackgroundBitmap(status, bitmap); +} + +result +_ExpandableEditAreaImpl::SetColor(EditStatus status, const Color& color) +{ + ClearLastResult(); + + return __pExpandableEditArea->SetColor(status, color); +} + +result +_ExpandableEditAreaImpl::SetTextColor(EditTextColor type, const Color& color) +{ + ClearLastResult(); + + return __pExpandableEditArea->SetTextColor(type, color); +} + +String +_ExpandableEditAreaImpl::GetText(int start, int end) const +{ + ClearLastResult(); + + return __pExpandableEditArea->GetText(start, end); +} + +result +_ExpandableEditAreaImpl::AddExpandableEditAreaEventListener(IExpandableEditAreaEventListener& listener) +{ + result r = E_SUCCESS; + ClearLastResult(); + + if (__pPublicExpandableEditAreaEvent == null) + { + __pPublicExpandableEditAreaEvent = _PublicExpandableEditAreaEvent::CreateInstanceN(GetPublic()); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, __pPublicExpandableEditAreaEvent != null, r, "Propagating."); + } + + r = __pPublicExpandableEditAreaEvent->AddListener(listener); + SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_ALREADY_EXIST, E_SYSTEM, "A system error has occurred. The IExpandableEditAreaEventListener instance already exists in the event listener list."); + + return r; +} + +result +_ExpandableEditAreaImpl::RemoveExpandableEditAreaEventListener(IExpandableEditAreaEventListener& listener) +{ + ClearLastResult(); + + SysTryReturnResult(NID_UI_CTRL, __pPublicExpandableEditAreaEvent != null, E_SYSTEM, "A system error has occurred. The _PublicExpandableEditAreaEvent instance is null"); + + result r = __pPublicExpandableEditAreaEvent->RemoveListener(listener); + SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_NOT_FOUND, E_SYSTEM, "A system error has occurred. The IExpandableEditAreaEventListener instance does not exist in the event listener list."); + + return r; + +} + +result +_ExpandableEditAreaImpl::AddKeypadEventListener(IKeypadEventListener& listener) +{ + result r = E_SUCCESS; + ClearLastResult(); + + if (__pPublicKeypadEvent == null) + { + __pPublicKeypadEvent = _PublicKeypadEvent::CreateInstanceN(GetPublic()); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, __pPublicKeypadEvent != null, r, "Propagating."); + } + + r = __pPublicKeypadEvent->AddListener(listener); + SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_ALREADY_EXIST, E_SYSTEM, "A system error has occurred. The IKeypadEventListener instance already exists in the event listener list."); + + return r; +} + +result +_ExpandableEditAreaImpl::RemoveKeypadEventListener(IKeypadEventListener& listener) +{ + ClearLastResult(); + + SysTryReturnResult(NID_UI_CTRL, __pPublicKeypadEvent != null, E_SYSTEM, "A system error has occurred. The _PublicKeypadEvent instance is null."); + + result r = __pPublicKeypadEvent->RemoveListener(listener); + SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_NOT_FOUND, E_SYSTEM, "A system error has occurred. The IKeypadEventListener instance does not exist in the event listener list."); + + return r; + +} + +result +_ExpandableEditAreaImpl::AddTextBlockEventListener(ITextBlockEventListener& listener) +{ + result r = E_SUCCESS; + ClearLastResult(); + + if (__pPublicTextBlockEvent == null) + { + __pPublicTextBlockEvent = _PublicTextBlockEvent::CreateInstanceN(GetPublic()); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, __pPublicTextBlockEvent != null, r, "Propagating."); + } + + r = __pPublicTextBlockEvent->AddListener(listener); + SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_ALREADY_EXIST, E_SYSTEM, "A system error has occurred. The ITextBlockEventListener instance already exists in the event listener list."); + + return r; +} + +result +_ExpandableEditAreaImpl::RemoveTextBlockEventListener(ITextBlockEventListener& listener) +{ + ClearLastResult(); + + SysTryReturnResult(NID_UI_CTRL, __pPublicTextBlockEvent, E_SYSTEM, "A system error has occurred. The _PublicTextBlockEvent instance is null."); + + result r = __pPublicTextBlockEvent->RemoveListener(listener); + SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_NOT_FOUND, E_SYSTEM, "A system error has occurred. The ITextBlockEventListener instance does not exist in the event listener list."); + + return r; +} + +result +_ExpandableEditAreaImpl::AddTextEventListener(ITextEventListener& listener) +{ + result r = E_SUCCESS; + ClearLastResult(); + + if (__pPublicTextEvent == null) + { + __pPublicTextEvent = _PublicTextEvent::CreateInstanceN(GetPublic()); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + + r = __pPublicTextEvent->AddListener(listener); + SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_ALREADY_EXIST, E_SYSTEM, "A system error has occurred. The ITextEventListener instance already exists in the event listener list."); + + return r; +} + +result +_ExpandableEditAreaImpl::RemoveTextEventListener(ITextEventListener& listener) +{ + ClearLastResult(); + + SysTryReturnResult(NID_UI_CTRL, __pPublicTextEvent, E_SYSTEM, "A system error has occurred. The _PublicTextEvent instance is null."); + + result r = __pPublicTextEvent->RemoveListener(listener); + SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_NOT_FOUND, E_SYSTEM, "A system error has occurred. The ITextEventListener instance does not exist in the event listener list."); + + return r; +} + +result +_ExpandableEditAreaImpl::AddLanguageEventListener(ILanguageEventListener& listener) +{ + result r = E_SUCCESS; + ClearLastResult(); + + if (__pPublicLanguageEvent == null) + { + __pPublicLanguageEvent = _PublicLanguageEvent::CreateInstanceN(GetPublic()); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + + SysAssertf(__pPublicLanguageEvent != null, "Not yet constructed. Construct() should be called before use."); + + r = __pPublicLanguageEvent->AddListener(listener); + + return r; +} + +result +_ExpandableEditAreaImpl::RemoveLanguageEventListener(ILanguageEventListener& listener) +{ + ClearLastResult(); + + SysAssertf(__pPublicLanguageEvent != null, "Not yet constructed. Construct() should be called before use."); + + return __pPublicLanguageEvent->RemoveListener(listener); +} + +result +_ExpandableEditAreaImpl::SetLowerCaseModeEnabled(bool enable) +{ + ClearLastResult(); + + __pExpandableEditArea->SetLowerCaseModeEnabled(enable); + + return E_SUCCESS; +} + +bool +_ExpandableEditAreaImpl::IsLowerCaseModeEnabled(void) const +{ + ClearLastResult(); + + return __pExpandableEditArea->IsLowerCaseModeEnabled(); +} + +result +_ExpandableEditAreaImpl::SetCursorPosition(int position) +{ + ClearLastResult(); + + return __pExpandableEditArea->SetCursorPosition(position); +} + +int +_ExpandableEditAreaImpl::GetCursorPosition(void) const +{ + ClearLastResult(); + + return __pExpandableEditArea->GetCursorPosition(); +} + +String +_ExpandableEditAreaImpl::GetText(void) const +{ + ClearLastResult(); + + return __pExpandableEditArea->GetText(); +} + +int +_ExpandableEditAreaImpl::GetTextLength(void) const +{ + ClearLastResult(); + + return __pExpandableEditArea->GetTextLength(); +} + +result +_ExpandableEditAreaImpl::SetText(const String& text) +{ + ClearLastResult(); + + return __pExpandableEditArea->SetText(text); +} + +result +_ExpandableEditAreaImpl::InsertTextAt(int index, const String& text) +{ + ClearLastResult(); + + return __pExpandableEditArea->InsertTextAt(index, text); +} + +result +_ExpandableEditAreaImpl::AppendText(const String& text) +{ + ClearLastResult(); + + return __pExpandableEditArea->AppendText(text); +} + +result +_ExpandableEditAreaImpl::AppendCharacter(const Character& character) +{ + ClearLastResult(); + + return __pExpandableEditArea->AppendCharacter(character); +} + +result +_ExpandableEditAreaImpl::InsertTextAt(int position, const String& text, const Bitmap& textImage) +{ + ClearLastResult(); + + _TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea); + SysTryReturnResult(NID_UI_CTRL, pTokenEdit == null, E_UNSUPPORTED_OPERATION, + "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_STYLE_TOKEN is not supported."); + + return __pExpandableEditArea->InsertTextAt(position, text, textImage); +} + +result +_ExpandableEditAreaImpl::AppendText(const String& text, const Bitmap& textImage) +{ + ClearLastResult(); + + _TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea); + SysTryReturnResult(NID_UI_CTRL, pTokenEdit == null, E_UNSUPPORTED_OPERATION, + "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_STYLE_TOKEN is not supported."); + + return __pExpandableEditArea->AppendText(text, textImage); +} + +result +_ExpandableEditAreaImpl::Clear(void) +{ + ClearLastResult(); + + return __pExpandableEditArea->ClearText(); +} + +result +_ExpandableEditAreaImpl::DeleteCharacterAt(int index) +{ + ClearLastResult(); + + return __pExpandableEditArea->DeleteCharacterAt(index); +} + +result +_ExpandableEditAreaImpl::InsertCharacterAt(int index, const Character& character) +{ + ClearLastResult(); + + return __pExpandableEditArea->InsertCharacterAt(index, character); +} + +result +_ExpandableEditAreaImpl::SetGuideText(const String& guideText) +{ + ClearLastResult(); + + __pExpandableEditArea->SetGuideText(guideText); + + return E_SUCCESS; +} + +String +_ExpandableEditAreaImpl::GetGuideText(void) const +{ + ClearLastResult(); + + return __pExpandableEditArea->GetGuideText(); +} + +Color +_ExpandableEditAreaImpl::GetGuideTextColor(void) const +{ + ClearLastResult(); + + return __pExpandableEditArea->GetGuideTextColor(); +} + +result +_ExpandableEditAreaImpl::SetGuideTextColor(const Color& color) +{ + ClearLastResult(); + + return __pExpandableEditArea->SetGuideTextColor(color); +} + +int +_ExpandableEditAreaImpl::GetLineSpacing(void) const +{ + ClearLastResult(); + + return __pExpandableEditArea->GetLineSpacing(); +} + +float +_ExpandableEditAreaImpl::GetLineSpacingF(void) const +{ + ClearLastResult(); + + return __pExpandableEditArea->GetLineSpacingF(); +} + +result +_ExpandableEditAreaImpl::SetLineSpacing(int multiplier, int extra) +{ + ClearLastResult(); + + 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); +} + +result +_ExpandableEditAreaImpl::SetLineSpacing(int multiplier, float extra) +{ + ClearLastResult(); + + 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); +} + +Color +_ExpandableEditAreaImpl::GetTitleTextColor(EditStatus status) const +{ + ClearLastResult(); + + return __pExpandableEditArea->GetTitleTextColor(status); +} + +result +_ExpandableEditAreaImpl::SetTitleTextColor(EditStatus status, const Color& color) +{ + ClearLastResult(); + + return __pExpandableEditArea->SetTitleTextColor(status, color); +} + +Color +_ExpandableEditAreaImpl::GetTokenColor(ExpandableEditAreaTokenStatus status) const +{ + ClearLastResult(); + + _TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea); + SysTryReturn(NID_UI_CTRL, pTokenEdit != null, Color(), E_UNSUPPORTED_OPERATION, + "[%s] ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported.", GetErrorMessage(E_UNSUPPORTED_OPERATION)); + + Variant var; + switch (status) + { + case EXPANDABLE_EDIT_AREA_TOKEN_STATUS_NORMAL : + var = pTokenEdit->GetPropertyNormalTokenColor(); + break; + + case EXPANDABLE_EDIT_AREA_TOKEN_STATUS_SELECTED : + var = pTokenEdit->GetPropertySelectedTokenColor(); + break; + + default : + break; + } + + return var.ToColor(); +} + +result +_ExpandableEditAreaImpl::SetTokenColor(ExpandableEditAreaTokenStatus status, const Color& color) +{ + ClearLastResult(); + + _TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea); + SysTryReturnResult(NID_UI_CTRL, pTokenEdit != null, E_UNSUPPORTED_OPERATION, + "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported."); + + Variant var(color); + + switch (status) + { + case EXPANDABLE_EDIT_AREA_TOKEN_STATUS_NORMAL : + pTokenEdit->SetPropertyNormalTokenColor(var); + break; + + case EXPANDABLE_EDIT_AREA_TOKEN_STATUS_SELECTED : + pTokenEdit->SetPropertySelectedTokenColor(var); + break; + + default : + break; + } + + return E_SUCCESS; +} + +Color +_ExpandableEditAreaImpl::GetTokenTextColor(void) const +{ + ClearLastResult(); + + _TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea); + SysTryReturn(NID_UI_CTRL, pTokenEdit != null, Color(), E_UNSUPPORTED_OPERATION, + "[%s] ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported.", GetErrorMessage(E_UNSUPPORTED_OPERATION)); + + Variant var = pTokenEdit->GetPropertyTokenTextColor(); + + return var.ToColor(); +} + +Color +_ExpandableEditAreaImpl::GetSelectedTokenTextColor(void) const +{ + ClearLastResult(); + + _TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea); + SysTryReturn(NID_UI_CTRL, pTokenEdit != null, Color(), E_UNSUPPORTED_OPERATION, + "[%s] ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported.", GetErrorMessage(E_UNSUPPORTED_OPERATION)); + + return pTokenEdit->GetSelectedTokenTextColor(); +} + +result +_ExpandableEditAreaImpl::SetTokenTextColor(const Color& color) +{ + ClearLastResult(); + + _TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea); + SysTryReturnResult(NID_UI_CTRL, pTokenEdit != null, E_UNSUPPORTED_OPERATION, + "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported."); + + Variant var(color); + + return pTokenEdit->SetPropertyTokenTextColor(var); +} + +result +_ExpandableEditAreaImpl::SetSelectedTokenTextColor(const Color& color) +{ + ClearLastResult(); + + _TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea); + SysTryReturnResult(NID_UI_CTRL, pTokenEdit != null, E_UNSUPPORTED_OPERATION, + "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported."); + + return pTokenEdit->SetSelectedTokenTextColor(color); +} + +result +_ExpandableEditAreaImpl::SetCurrentLanguage(LanguageCode languageCode) +{ + ClearLastResult(); + + return __pExpandableEditArea->SetCurrentLanguage(languageCode); +} + +result +_ExpandableEditAreaImpl::GetCurrentLanguage(LanguageCode& language) const +{ + ClearLastResult(); + + return __pExpandableEditArea->GetCurrentLanguage(language); +} + +void +_ExpandableEditAreaImpl::SetEditTextFilter(IEditTextFilter* pFilter) +{ + ClearLastResult(); + + __pExpandableEditArea->SetEditTextFilter(pFilter); + + return; +} + +void +_ExpandableEditAreaImpl::SendOpaqueCommand (const String& command) +{ + ClearLastResult(); + + __pExpandableEditArea->SendOpaqueCommand(command); + + return; +} + +void +_ExpandableEditAreaImpl::SetKeypadEnabled(bool enable) +{ + ClearLastResult(); + + __pExpandableEditArea->SetKeypadEnabled(enable); + + return; +} + +bool +_ExpandableEditAreaImpl::IsKeypadEnabled(void) const +{ + ClearLastResult(); + + return __pExpandableEditArea->IsKeypadEnabled(); +} + +result +_ExpandableEditAreaImpl::ShowKeypad(void) +{ + ClearLastResult(); + + return __pExpandableEditArea->ShowKeypad(); +} + +int +_ExpandableEditAreaImpl::GetTextLineCount(void) const +{ + ClearLastResult(); + + return __pExpandableEditArea->GetTextLineCount(); +} + +result +_ExpandableEditAreaImpl::GetBlockRange(int& start, int& end) const +{ + ClearLastResult(); + + __pExpandableEditArea->GetBlockRange(start, end); + + if (!((start == 0) && (end == 0))) + { + end -= 1; + } + + return E_SUCCESS; +} + +result +_ExpandableEditAreaImpl::ReleaseBlock(void) +{ + ClearLastResult(); + + return __pExpandableEditArea->ReleaseTextBlock(); +} + +result +_ExpandableEditAreaImpl::RemoveTextBlock(void) +{ + ClearLastResult(); + + return __pExpandableEditArea->RemoveTextBlock(); +} + +result +_ExpandableEditAreaImpl::SetBlockRange(int start, int end) +{ + ClearLastResult(); + + int tempTextLength = __pExpandableEditArea->GetTextLength(); + SysTryReturnResult(NID_UI_CTRL, ((start > -1) && (end > -1) && (end >= start) && (end < tempTextLength)), E_OUT_OF_RANGE, + "start (%d) and end (%d) is out of range.", start, end); + + return __pExpandableEditArea->SetBlockRange(start, end + 1); +} + +result +_ExpandableEditAreaImpl::OnBoundsChanged(const Rectangle& oldRect, const Rectangle& newRect) +{ + ClearLastResult(); + + return E_SUCCESS; +} + +void +_ExpandableEditAreaImpl::SetMaxLineCount(int maxLineCount) +{ + ClearLastResult(); + + __pExpandableEditArea->SetMaxLineCount(maxLineCount); +} + +int +_ExpandableEditAreaImpl::GetMaxLineCount(void) const +{ + ClearLastResult(); + + return __pExpandableEditArea->GetMaxLineCount(); +} + +String +_ExpandableEditAreaImpl::GetTitleText(void) const +{ + ClearLastResult(); + + return __pExpandableEditArea->GetTitleText(); +} + +result +_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 is not supported."); + + return __pExpandableEditArea->SetTitleText(title); +} + +int +_ExpandableEditAreaImpl::GetLimitLength(void) const +{ + ClearLastResult(); + + return __pExpandableEditArea->GetTextLimitLength(); +} + +result +_ExpandableEditAreaImpl::SetLimitLength(int limitLength) +{ + ClearLastResult(); + + return __pExpandableEditArea->SetLimitLength(limitLength); +} + +result +_ExpandableEditAreaImpl::SetAutoResizingEnabled(bool enable) +{ + ClearLastResult(); + + Variant var(enable); + + return __pExpandableEditArea->SetPropertyAutoResizingEnabled(var); +} + +bool +_ExpandableEditAreaImpl::IsAutoResizingEnabled(void) const +{ + ClearLastResult(); + + Variant var = __pExpandableEditArea->GetPropertyAutoResizingEnabled(); + + return var.ToBool(); +} + +void +_ExpandableEditAreaImpl::SetAutoShrinkModeEnabled(bool enable) +{ + ClearLastResult(); + + __pExpandableEditArea->SetAutoShrinkModeEnabled(enable); +} + +bool +_ExpandableEditAreaImpl::IsAutoShrinkModeEnabled(void) const +{ + ClearLastResult(); + + return __pExpandableEditArea->IsAutoShrinkModeEnabled(); +} + +ITokenFilter* +_ExpandableEditAreaImpl::GetTokenFilter(void) const +{ + ClearLastResult(); + + _TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea); + SysTryReturn(NID_UI_CTRL, pTokenEdit != null, null, E_UNSUPPORTED_OPERATION, + "[%s] ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported.", GetErrorMessage(E_UNSUPPORTED_OPERATION)); + + return __pTokenFilter; +} + +result +_ExpandableEditAreaImpl::SetTokenFilter(const ITokenFilter* pFilter) +{ + ClearLastResult(); + + _TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea); + SysTryReturnResult(NID_UI_CTRL, pTokenEdit != null, E_UNSUPPORTED_OPERATION, + "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported."); + + __pTokenFilter = const_cast (pFilter); + + return pTokenEdit->SetTokenFilter(this); +} + +result +_ExpandableEditAreaImpl::AppendToken(const String& token) +{ + ClearLastResult(); + + _TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea); + SysTryReturnResult(NID_UI_CTRL, pTokenEdit != null, E_UNSUPPORTED_OPERATION, + "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported."); + + return pTokenEdit->AppendToken(token); +} + +result +_ExpandableEditAreaImpl::InsertTokenAt(int index, const String& token) +{ + ClearLastResult(); + + _TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea); + SysTryReturnResult(NID_UI_CTRL, pTokenEdit != null, E_UNSUPPORTED_OPERATION, + "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported."); + + return pTokenEdit->InsertTokenAt(index, token); +} + +String +_ExpandableEditAreaImpl::GetTokenAt(int index) const +{ + ClearLastResult(); + + _TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea); + SysTryReturn(NID_UI_CTRL, pTokenEdit != null, String(), E_UNSUPPORTED_OPERATION, + "[%s] ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported.", GetErrorMessage(E_UNSUPPORTED_OPERATION)); + + return pTokenEdit->GetTokenAt(index); +} + +int +_ExpandableEditAreaImpl::GetTokenCount(void) const +{ + ClearLastResult(); + + _TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea); + SysTryReturn(NID_UI_CTRL, pTokenEdit != null, -1, E_UNSUPPORTED_OPERATION, + "[%s] ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported.", GetErrorMessage(E_UNSUPPORTED_OPERATION)); + + return pTokenEdit->GetTokenCount(); +} + +int +_ExpandableEditAreaImpl::GetSelectedTokenIndex(void) const +{ + ClearLastResult(); + + _TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea); + SysTryReturn(NID_UI_CTRL, pTokenEdit != null, -1, E_UNSUPPORTED_OPERATION, + "[%s] ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported.", GetErrorMessage(E_UNSUPPORTED_OPERATION)); + + return pTokenEdit->GetSelectedTokenIndex(); +} + +bool +_ExpandableEditAreaImpl::IsTokenEditModeEnabled(void) const +{ + ClearLastResult(); + + _TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea); + SysTryReturn(NID_UI_CTRL, pTokenEdit != null, false, E_UNSUPPORTED_OPERATION, + "[%s] ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported.", GetErrorMessage(E_UNSUPPORTED_OPERATION)); + + Variant var = pTokenEdit->GetPropertyTokenEditModeEnabled(); + + return var.ToBool(); +} + +result +_ExpandableEditAreaImpl::RemoveTokenAt(int index) +{ + ClearLastResult(); + + _TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea); + SysTryReturnResult(NID_UI_CTRL, pTokenEdit != null, E_UNSUPPORTED_OPERATION, + "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported."); + + return pTokenEdit->RemoveTokenAt(index); +} + +result +_ExpandableEditAreaImpl::SetTokenSelected(int index, bool selected) +{ + ClearLastResult(); + + _TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea); + SysTryReturnResult(NID_UI_CTRL, pTokenEdit != null, E_UNSUPPORTED_OPERATION, + "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported."); + + return pTokenEdit->SetTokenSelected(index, selected); +} + +result +_ExpandableEditAreaImpl::SetTokenEditModeEnabled(bool enable) +{ + ClearLastResult(); + + _TokenEdit* pTokenEdit = dynamic_cast <_TokenEdit*>(__pExpandableEditArea); + SysTryReturnResult(NID_UI_CTRL, pTokenEdit != null, E_UNSUPPORTED_OPERATION, + "ExpandableEditArea of style EXPANDABLE_EDIT_AREA_NORMAL is not supported."); + + Variant var(enable); + return pTokenEdit->SetPropertyTokenEditModeEnabled(var); +} + +void +_ExpandableEditAreaImpl::OnTextValueChanged(const _Control& source) +{ + if (__pPublicTextEvent != null) + { + IEventArg* pEventArg = _PublicTextEvent::CreateTextEventArgN(TEXT_EVENT_CHANGED); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pPublicTextEvent->Fire(*pEventArg); + } +} + +void +_ExpandableEditAreaImpl::OnTextValueChangeCanceled(const _Control& source) +{ + if (__pPublicTextEvent != null) + { + IEventArg* pEventArg = _PublicTextEvent::CreateTextEventArgN(TEXT_EVENT_CANCELED); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pPublicTextEvent->Fire(*pEventArg); + } +} + +void +_ExpandableEditAreaImpl::OnExpandableEditAreaLineAdded(const _Control& source, int newLineCount) +{ + if (__pPublicExpandableEditAreaEvent != null) + { + IEventArg* pEventArg = _PublicExpandableEditAreaEvent::CreateExpandableEditAreaEventArgN( + EXPANDABLE_EDITAREA_EVENT_ADDED, newLineCount); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pPublicExpandableEditAreaEvent->Fire(*pEventArg); + } +} + +void +_ExpandableEditAreaImpl::OnExpandableEditAreaLineRemoved(const _Control& source, int newLineCount) +{ + if (__pPublicExpandableEditAreaEvent != null) + { + IEventArg* pEventArg = _PublicExpandableEditAreaEvent::CreateExpandableEditAreaEventArgN( + EXPANDABLE_EDITAREA_EVENT_REMOVED, newLineCount); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pPublicExpandableEditAreaEvent->Fire(*pEventArg); + } +} + +void +_ExpandableEditAreaImpl::OnTextBlockSelected(_Control& source, int start, int end) +{ + if (__pPublicTextBlockEvent != null) + { + IEventArg* pTextBlockEventArg = _PublicTextBlockEvent::CreateTextBlockEventArgN(start, end); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, pTextBlockEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pPublicTextBlockEvent->Fire(*pTextBlockEventArg); + } +} + +void +_ExpandableEditAreaImpl::OnKeypadWillOpen(void) +{ + if (__pPublicKeypadEvent != null) + { + IEventArg* pKeypadEventArg = _PublicKeypadEvent::CreateKeypadEventArgN( + GetPublic(), KEYPAD_ACTION_ENTER, KEYPAD_EVENT_STATUS_CREATED); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pPublicKeypadEvent->Fire(*pKeypadEventArg); + } +} + +void +_ExpandableEditAreaImpl::OnKeypadOpened(void) +{ + if (__pPublicKeypadEvent != null) + { + IEventArg* pKeypadEventArg = _PublicKeypadEvent::CreateKeypadEventArgN( + GetPublic(), KEYPAD_ACTION_ENTER, KEYPAD_EVENT_STATUS_OPEN); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pPublicKeypadEvent->Fire(*pKeypadEventArg); + } +} + +void +_ExpandableEditAreaImpl::OnKeypadClosed(void) +{ + if (__pPublicKeypadEvent != null) + { + IEventArg* pKeypadEventArg = _PublicKeypadEvent::CreateKeypadEventArgN( + GetPublic(), KEYPAD_ACTION_ENTER, KEYPAD_EVENT_STATUS_CLOSE); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pPublicKeypadEvent->Fire(*pKeypadEventArg); + } +} + +void +_ExpandableEditAreaImpl::OnKeypadBoundsChanged(void) +{ + if (__pPublicKeypadEvent != null) + { + IEventArg* pKeypadEventArg = _PublicKeypadEvent::CreateKeypadEventArgN( + GetPublic(), KEYPAD_ACTION_ENTER, KEYPAD_EVENT_STATUS_BOUNDS_CHANGED); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pPublicKeypadEvent->Fire(*pKeypadEventArg); + } +} + +void +_ExpandableEditAreaImpl::OnLanguageChanged(LanguageCode oldLanguage, LanguageCode newLanguage) +{ + if (__pPublicLanguageEvent != null) + { + IEventArg* pKLanguageEventArg = _PublicLanguageEvent::CreateLanguageEventArgN(GetPublic(), oldLanguage, newLanguage); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, pKLanguageEventArg, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pPublicLanguageEvent->Fire(*pKLanguageEventArg); + } + else + { + SysLog(NID_UI_CTRL, "Event is not created."); + } +} + +void +_ExpandableEditAreaImpl::OnKeypadActionPerformed(CoreKeypadAction keypadAction) +{ + if (__pPublicKeypadEvent != null) + { + KeypadAction onKeypadAction = KEYPAD_ACTION_ENTER; + switch (keypadAction) + { + case CORE_KEYPAD_ACTION_ENTER: + onKeypadAction = KEYPAD_ACTION_ENTER; + break; + + case CORE_KEYPAD_ACTION_GO: + onKeypadAction = KEYPAD_ACTION_GO; + break; + + case CORE_KEYPAD_ACTION_NEXT: + onKeypadAction = KEYPAD_ACTION_NEXT; + break; + + case CORE_KEYPAD_ACTION_SEND: + onKeypadAction = KEYPAD_ACTION_SEND; + break; + + case CORE_KEYPAD_ACTION_SEARCH: + onKeypadAction = KEYPAD_ACTION_SEARCH; + break; + + case CORE_KEYPAD_ACTION_LOGIN: + onKeypadAction = KEYPAD_ACTION_LOGIN; + break; + + case CORE_KEYPAD_ACTION_SIGN_IN: + onKeypadAction = KEYPAD_ACTION_SIGN_IN; + break; + + case CORE_KEYPAD_ACTION_JOIN: + onKeypadAction = KEYPAD_ACTION_JOIN; + break; + + case CORE_KEYPAD_ACTION_DONE: + onKeypadAction = KEYPAD_ACTION_DONE; + break; + + default: + break; + } + + IEventArg* pKeypadEventArg = _PublicKeypadEvent::CreateKeypadEventArgN( + GetPublic(), onKeypadAction, KEYPAD_EVENT_STATUS_ENTERACTION); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pPublicKeypadEvent->Fire(*pKeypadEventArg); + } +} + +bool +_ExpandableEditAreaImpl::ReplaceToken(const String& token, String& replacement) +{ + bool enable = false; + if (__pTokenFilter != null) + { + enable = __pTokenFilter->ReplaceToken(token, replacement); + } + + return enable; +} + + +class _ExpandableEditAreaMaker + : public _UiBuilderControlMaker +{ +public: + _ExpandableEditAreaMaker(_UiBuilder* uibuilder) + : _UiBuilderControlMaker(uibuilder){}; + virtual ~_ExpandableEditAreaMaker(){}; + static _UiBuilderControlMaker* GetInstance(_UiBuilder* uibuilder) + { + _ExpandableEditAreaMaker* pExpandableEditAreaMaker = new (std::nothrow) _ExpandableEditAreaMaker(uibuilder); + return pExpandableEditAreaMaker; + }; + +protected: + virtual Control* Make(_UiBuilderControl* pControl) + { + result r = E_SUCCESS; + + FloatRectangle rect; + ExpandableEditArea* pExpandableEditArea = null; + _UiBuilderControlLayout* pControlProperty = null; + ExpandableEditAreaStyle style = EXPANDABLE_EDIT_AREA_STYLE_NORMAL; + ExpandableEditAreaTitleStyle titleStyle = EXPANDABLE_EDIT_AREA_TITLE_STYLE_NONE; + bool lowerCaseMode = false; + KeypadAction keypadAction = KEYPAD_ACTION_ENTER; + KeypadStyle keypadStyle = KEYPAD_STYLE_NORMAL; + int maxLines = 10; + String guideText; + float verticalMarin = 0.0f; + float horizontalMargin = 0.0f; + String text; + float textSize = 6.0f; + String titleText; + int limitLength = 0; + int opacity = 100; + Color color; + bool autoResizing = false; + bool autoShrink = false; + String elementString; + + GetProperty(pControl, &pControlProperty); + if (pControlProperty == null) + { + return null; + } + + pExpandableEditArea = new (std::nothrow) ExpandableEditArea(); + if (pExpandableEditArea == null) + { + return null; + } + + rect = pControlProperty->GetRectF(); + + if (pControl->GetElement(L"style", elementString)) + { + if (elementString.Equals(L"EXPANDABLE_EDIT_AREA_STYLE_NORMAL", false)) + { + style = EXPANDABLE_EDIT_AREA_STYLE_NORMAL; + } + else + { + style = EXPANDABLE_EDIT_AREA_STYLE_TOKEN; + } + } + + if (pControl->GetElement(L"titleStyle", elementString)) + { + if (elementString.Equals(L"EXPANDABLE_EDIT_AREA_TITLE_STYLE_NONE", false)) + { + titleStyle = EXPANDABLE_EDIT_AREA_TITLE_STYLE_NONE; + } + else if (elementString.Equals(L"EXPANDABLE_EDIT_AREA_TITLE_STYLE_TOP", false)) + { + titleStyle = EXPANDABLE_EDIT_AREA_TITLE_STYLE_TOP; + } + else + { + titleStyle = EXPANDABLE_EDIT_AREA_TITLE_STYLE_INNER; + } + } + + if (pControl->GetElement(L"maxLines", elementString)) + { + Base::Integer::Parse(elementString, maxLines); + } + + r = pExpandableEditArea->Construct(rect, style, titleStyle, maxLines); + if (r != E_SUCCESS) + { + return null; + } + + if (pControl->GetElement(L"text", elementString)) + { + r = pExpandableEditArea->SetText(elementString); + } + + if (pControl->GetElement(L"guideText", elementString)) + { + r = pExpandableEditArea->SetGuideText(elementString); + } + + if (pControl->GetElement(L"keypadStyle", elementString)) + { + if (elementString.Equals(L"KEYPAD_STYLE_NORMAL", false)) + { + keypadStyle = KEYPAD_STYLE_NORMAL; + } + else if (elementString.Equals(L"KEYPAD_STYLE_PASSWORD", false)) + { + keypadStyle = KEYPAD_STYLE_PASSWORD; + } + else if (elementString.Equals(L"KEYPAD_STYLE_EMAIL", false)) + { + keypadStyle = KEYPAD_STYLE_EMAIL; + } + else if (elementString.Equals(L"KEYPAD_STYLE_URL", false)) + { + keypadStyle = KEYPAD_STYLE_URL; + } + else if (elementString.Equals(L"KEYPAD_STYLE_NUMBER", false)) + { + keypadStyle = KEYPAD_STYLE_NUMBER; + } + else if (elementString.Equals(L"KEYPAD_STYLE_PHONE_NUMBER", false)) + { + keypadStyle = KEYPAD_STYLE_PHONE_NUMBER; + } + else if (elementString.Equals(L"KEYPAD_STYLE_IP_V4", false)) + { + keypadStyle = KEYPAD_STYLE_IP_V4; + } + + r = pExpandableEditArea->SetKeypadStyle(keypadStyle); + } + + if (pControl->GetElement(L"keypadAction", elementString)) + { + if (elementString.Equals(L"KEYPAD_ACTION_ENTER", false)) + { + keypadAction = KEYPAD_ACTION_ENTER; + } + else if (elementString.Equals(L"KEYPAD_ACTION_GO", false)) + { + keypadAction = KEYPAD_ACTION_GO; + } + else if (elementString.Equals(L"KEYPAD_ACTION_NEXT", false)) + { + keypadAction = KEYPAD_ACTION_NEXT; + } + else if (elementString.Equals(L"KEYPAD_ACTION_SEND", false)) + { + keypadAction = KEYPAD_ACTION_SEND; + } + else if (elementString.Equals(L"KEYPAD_ACTION_SEARCH", false)) + { + keypadAction = KEYPAD_ACTION_SEARCH; + } + else if (elementString.Equals(L"KEYPAD_ACTION_LOGIN", false)) + { + keypadAction = KEYPAD_ACTION_LOGIN; + } + else if (elementString.Equals(L"KEYPAD_ACTION_SIGN_IN", false)) + { + keypadAction = KEYPAD_ACTION_SIGN_IN; + } + else if (elementString.Equals(L"KEYPAD_ACTION_JOIN", false)) + { + keypadAction = KEYPAD_ACTION_JOIN; + } + else if (elementString.Equals(L"KEYPAD_ACTION_DONE", false)) + { + keypadAction = KEYPAD_ACTION_DONE; + } + + r = pExpandableEditArea->SetKeypadAction(keypadAction); + } + + if (pControl->GetElement(L"lowerCaseMode", elementString)) + { + if (elementString.Equals(L"true", false)) + { + lowerCaseMode = true; + } + else + { + lowerCaseMode = false; + } + + r = pExpandableEditArea->SetLowerCaseModeEnabled(lowerCaseMode); + } + + if (pControl->GetElement(L"textSize", elementString)) + { + textSize = _LocalizedNumParser::ToDouble(elementString, "C"); + _ICoordinateSystemTransformer* pTransform = GetTransformer(); + if (pTransform != null) + { + textSize = pTransform->Transform(textSize); + } + r = pExpandableEditArea->SetTextSize(textSize); + } + + if (pControl->GetElement(L"verticalMargin", elementString)) + { + verticalMarin = _LocalizedNumParser::ToDouble(elementString, "C"); + r = pExpandableEditArea->SetMargin(EDIT_MARGIN_TYPE_VERTICAL, verticalMarin); + } + + if (pControl->GetElement(L"horizontalMargin", elementString)) + { + horizontalMargin = _LocalizedNumParser::ToDouble(elementString, "C"); + r = pExpandableEditArea->SetMargin(EDIT_MARGIN_TYPE_HORIZONTAL, horizontalMargin); + } + + if (pControl->GetElement(L"limitLength", elementString)) + { + Base::Integer::Parse(elementString, limitLength); + r = pExpandableEditArea->SetLimitLength(limitLength); + } + + if (pControl->GetElement(L"titleText", elementString)) + { + r = pExpandableEditArea->SetTitleText(elementString); + } + + if (pControl->GetElement(L"normalBGBitmapPath", elementString)) + { + Bitmap* pNormalBGBitmap = null; + pNormalBGBitmap = LoadBitmapN(elementString); + if (pNormalBGBitmap != null) + { + r = pExpandableEditArea->SetBackgroundBitmap(EDIT_STATUS_NORMAL, *pNormalBGBitmap); + delete pNormalBGBitmap; + } + } + + if (pControl->GetElement(L"disabledBGBitmapPath", elementString)) + { + Bitmap* pNormalBGBitmap = null; + pNormalBGBitmap = LoadBitmapN(elementString); + if (pNormalBGBitmap != null) + { + r = pExpandableEditArea->SetBackgroundBitmap(EDIT_STATUS_DISABLED, *pNormalBGBitmap); + delete pNormalBGBitmap; + } + } + + if (pControl->GetElement(L"highlightedBGBitmapPath", elementString)) + { + Bitmap* pNormalBGBitmap = null; + pNormalBGBitmap = LoadBitmapN(elementString); + if (pNormalBGBitmap != null) + { + r = pExpandableEditArea->SetBackgroundBitmap(EDIT_STATUS_HIGHLIGHTED, *pNormalBGBitmap); + delete pNormalBGBitmap; + } + } + + if (pControl->GetElement(L"pressedBGBitmapPath", elementString)) + { + Bitmap* pNormalBGBitmap = null; + pNormalBGBitmap = LoadBitmapN(elementString); + if (pNormalBGBitmap != null) + { + r = pExpandableEditArea->SetBackgroundBitmap(EDIT_STATUS_PRESSED, *pNormalBGBitmap); + delete pNormalBGBitmap; + } + } + + if (pControl->GetElement(L"normalColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + if (pControl->GetElement(L"normalColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + r = pExpandableEditArea->SetColor(EDIT_STATUS_NORMAL, color); + } + + if (pControl->GetElement(L"disabledColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + if (pControl->GetElement(L"disabledColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + r = pExpandableEditArea->SetColor(EDIT_STATUS_DISABLED, color); + } + + if (pControl->GetElement(L"highlightedColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + if (pControl->GetElement(L"highlightedColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + r = pExpandableEditArea->SetColor(EDIT_STATUS_HIGHLIGHTED, color); + } + + if (pControl->GetElement(L"pressedColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + if (pControl->GetElement(L"pressedColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + r = pExpandableEditArea->SetColor(EDIT_STATUS_PRESSED, color); + } + + if (pControl->GetElement(L"guideTextColor", elementString)) + { + opacity = 100; + ConvertStringToColor32(elementString, opacity, color); + r = pExpandableEditArea->SetGuideTextColor(color); + } + + if (pControl->GetElement(L"normalTitleTextColor", elementString)) + { + opacity = 100; + ConvertStringToColor32(elementString, opacity, color); + r = pExpandableEditArea->SetTitleTextColor(EDIT_STATUS_NORMAL, color); + } + + if (pControl->GetElement(L"disabledTitleTextColor", elementString)) + { + opacity = 100; + ConvertStringToColor32(elementString, opacity, color); + r = pExpandableEditArea->SetTitleTextColor(EDIT_STATUS_DISABLED, color); + } + + if (pControl->GetElement(L"highlightedTitleTextColor", elementString)) + { + opacity = 100; + ConvertStringToColor32(elementString, opacity, color); + r = pExpandableEditArea->SetTitleTextColor(EDIT_STATUS_HIGHLIGHTED, color); + } + + if (pControl->GetElement(L"pressedTitleTextColor", elementString)) + { + opacity = 100; + ConvertStringToColor32(elementString, opacity, color); + r = pExpandableEditArea->SetTitleTextColor(EDIT_STATUS_PRESSED, color); + } + + if (pControl->GetElement(L"normalTextColor", elementString)) + { + opacity = 100; + ConvertStringToColor32(elementString, opacity, color); + r = pExpandableEditArea->SetTextColor(EDIT_TEXT_COLOR_NORMAL, color); + } + + if (pControl->GetElement(L"disabledTextColor", elementString)) + { + opacity = 100; + ConvertStringToColor32(elementString, opacity, color); + r = pExpandableEditArea->SetTextColor(EDIT_TEXT_COLOR_DISABLED, color); + } + + if (pControl->GetElement(L"highlightedTextColor", elementString)) + { + opacity = 100; + ConvertStringToColor32(elementString, opacity, color); + r = pExpandableEditArea->SetTextColor(EDIT_TEXT_COLOR_HIGHLIGHTED, color); + } + + if (pControl->GetElement(L"normalTokenColor", elementString)) + { + opacity = 100; + ConvertStringToColor32(elementString, opacity, color); + r = pExpandableEditArea->SetTokenColor(EXPANDABLE_EDIT_AREA_TOKEN_STATUS_NORMAL, color); + } + + if (pControl->GetElement(L"selectedTokenColor", elementString)) + { + opacity = 100; + ConvertStringToColor32(elementString, opacity, color); + r = pExpandableEditArea->SetTokenColor(EXPANDABLE_EDIT_AREA_TOKEN_STATUS_SELECTED, color); + } + + if (pControl->GetElement(L"selectedTokenTextColor", elementString)) + { + opacity = 100; + ConvertStringToColor32(elementString, opacity, color); + r = pExpandableEditArea->SetSelectedTokenTextColor(color); + } + + if (pControl->GetElement(L"tokenTextColor", elementString)) + { + opacity = 100; + ConvertStringToColor32(elementString, opacity, color); + r = pExpandableEditArea->SetTokenTextColor(color); + } + + if (pControl->GetElement(L"autoResizing", elementString)) + { + if (elementString.Equals(L"true", false)) + { + autoResizing = true; + } + else + { + autoResizing = false; + } + + r = pExpandableEditArea->SetAutoResizingEnabled(autoResizing); + } + + if (pControl->GetElement(L"autoShrinkModeEnabled", elementString)) + { + if (elementString.Equals(L"true", false)) + { + autoShrink = true; + } + else + { + autoShrink = false; + } + + pExpandableEditArea->SetAutoShrinkModeEnabled(autoShrink); + } + + if (pControl->GetElement(L"accessibilityHint", elementString)) + { + AccessibilityContainer* pContainer = pExpandableEditArea->GetAccessibilityContainer(); + if (pContainer != null) + { + AccessibilityElement* pElement = pContainer->GetElement(L"EditText"); + if (pElement != null) + { + pElement->SetHint(elementString); + } + } + } + + return pExpandableEditArea; + } +}; + +_ExpandableEditAreaRegister::_ExpandableEditAreaRegister(void) +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->RegisterControl(L"ExpandableEditArea", _ExpandableEditAreaMaker::GetInstance); +} +_ExpandableEditAreaRegister::~_ExpandableEditAreaRegister(void) +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->UnregisterControl(L"ExpandableEditArea"); +} +static _ExpandableEditAreaRegister ExpandableEditAreaRegisterToUIbuilder; +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_ExpandableListImpl.cpp b/src/ui/controls/FUiCtrl_ExpandableListImpl.cpp new file mode 100644 index 0000000..b110b04 --- /dev/null +++ b/src/ui/controls/FUiCtrl_ExpandableListImpl.cpp @@ -0,0 +1,2206 @@ +// +// 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_ExpandableListImpl.cpp + * @brief This file contains implementation of _ExpandableListImpl class + */ + +#include +#include +#include "FUiCtrl_CustomListItemImpl.h" +#include "FUiCtrl_CustomListItemFormatImpl.h" +#include "FUiCtrl_ExpandableListImpl.h" +#include "FUiCtrl_ListListener.h" +#include "FUi_ResourceSizeInfo.h" +#include "FUi_ResourceManager.h" +#include "FUiCtrl_ListItemBaseImpl.h" +#include "FUiCtrl_CustomListImpl.h" +#include "FUi_UiBuilder.h" +#include "FUi_CoordinateSystemUtils.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Graphics; +using namespace Tizen::Base::Collection; + +namespace Tizen { namespace Ui { namespace Controls +{ + +extern const int INVALID_INDEX; + +static const char* ARROW_ELEMENT_NAME = "Arrow"; + +_ExpandableListItemDataProvider::_ExpandableListItemDataProvider(_ExpandableListImpl* pList) + : __pListImpl(pList) +{ +} + +_ExpandableListItemDataProvider::~_ExpandableListItemDataProvider(void) +{ + +} + +int +_ExpandableListItemDataProvider::GetGroupCount(void) +{ + SysTryReturn(NID_UI_CTRL, __pListImpl, 0, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Item provider not constructed properly."); + return __pListImpl->GetGroupCount(); +} + +int +_ExpandableListItemDataProvider::GetItemCount(int groupIndex) +{ + SysTryReturn(NID_UI_CTRL, __pListImpl, 0, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Item provider not constructed properly."); + + return __pListImpl->GetSubItemCountAt(groupIndex); +} + +TableViewGroupItem* +_ExpandableListItemDataProvider::CreateGroupItem(int groupIndex, int itemWidth) +{ + SysTryReturn(NID_UI_CTRL, __pListImpl, null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Item provider not constructed properly."); + + CustomListItem* pCustomListItem = __pListImpl->GetCustomListItemAt(groupIndex, -1); + SysTryReturn(NID_UI_CTRL, pCustomListItem, null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get an item at index(%d).", groupIndex); + + SysTryReturn(NID_UI_CTRL, pCustomListItem->__pCustomListItemImpl, null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get an item at index(%d).", groupIndex); + + _TableViewItemParams tableViewItemParams; + tableViewItemParams.pItem = pCustomListItem; + tableViewItemParams.width = itemWidth; + tableViewItemParams.itemId = pCustomListItem->__pCustomListItemImpl->itemId; + tableViewItemParams.groupIndex = groupIndex; + tableViewItemParams.itemIndex = -1; + tableViewItemParams.isDividerEnabled = __pListImpl->_isDividerEnabled; + tableViewItemParams.pCheckBitmaps = __pListImpl->_pCheckBitmaps; + tableViewItemParams.annexStyle = __pListImpl->_annexStyle; + + result r = _CustomListItemImpl::CreateTableViewItem(tableViewItemParams); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + pCustomListItem->__pCustomListItemImpl->__pTableViewGroupItemData->AddTouchEventListener(*__pListImpl); + + if (__pListImpl->GetSubItemCountAt(groupIndex) > 0) + { + r = __pListImpl->CreateArrowIcon(groupIndex); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + return pCustomListItem->__pCustomListItemImpl->__pTableViewGroupItemData; +} + +TableViewItem* +_ExpandableListItemDataProvider::CreateItem(int groupIndex, int itemIndex, int itemWidth) +{ + SysTryReturn(NID_UI_CTRL, __pListImpl, null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Invalid data structure."); + + CustomListItem* pCustomListItem = __pListImpl->GetCustomListItemAt(groupIndex, itemIndex); + SysTryReturn(NID_UI_CTRL, pCustomListItem, null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get an item at index(%d).", groupIndex); + + _TableViewItemParams tableViewItemParams; + tableViewItemParams.pItem = pCustomListItem; + tableViewItemParams.width = itemWidth; + tableViewItemParams.itemId = pCustomListItem->__pCustomListItemImpl->itemId; + tableViewItemParams.groupIndex = groupIndex; + tableViewItemParams.itemIndex = itemIndex; + tableViewItemParams.isDividerEnabled = __pListImpl->_isDividerEnabled; + tableViewItemParams.pCheckBitmaps = __pListImpl->_pCheckBitmaps; + tableViewItemParams.annexStyle = __pListImpl->_annexStyle; + + result r = _CustomListItemImpl::CreateTableViewItem(tableViewItemParams); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + pCustomListItem->__pCustomListItemImpl->__pTableViewItemData->AddTouchEventListener(*__pListImpl); + + if (__pListImpl->GetSubItemCountAt(groupIndex) == 1) + { + r = __pListImpl->CreateArrowIcon(groupIndex); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + return pCustomListItem->__pCustomListItemImpl->__pTableViewItemData; +} + +int +_ExpandableListItemDataProvider::GetDefaultGroupItemHeight(void) +{ + CustomListItem* pCustomListItem = __pListImpl->GetCustomListItemAt(0, -1); + SysTryReturn(NID_UI_CTRL, pCustomListItem, __pListImpl->_defaultItemHeight, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get first item"); + + SysTryReturn(NID_UI_CTRL, pCustomListItem->__pCustomListItemImpl, __pListImpl->_defaultItemHeight, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get first item"); + + return pCustomListItem->__pCustomListItemImpl->height; +} + +int +_ExpandableListItemDataProvider::GetDefaultItemHeight(void) +{ + CustomListItem* pCustomListItem = __pListImpl->GetCustomListItemAt(0, 0); + + if (!pCustomListItem) + { + return __pListImpl->_defaultItemHeight; + } + else + { + return pCustomListItem->__pCustomListItemImpl->height; + } +} + +bool +_ExpandableListItemDataProvider::DeleteItem(int groupIndex, int itemIndex, TableViewItem* pItem) +{ + delete pItem; + + if (__pListImpl->__directDelete == false) + { + CustomListItem* pCustomListItem = __pListImpl->GetCustomListItemAt(groupIndex, itemIndex); + pCustomListItem->__pCustomListItemImpl->__pTableViewItemData = null; + } + + return true; +} + +bool +_ExpandableListItemDataProvider::DeleteGroupItem(int groupIndex, TableViewGroupItem* pItem) +{ + delete pItem; + + if (__pListImpl->__directDelete == false) + { + CustomListItem* pCustomListItem = __pListImpl->GetCustomListItemAt(groupIndex, -1); + pCustomListItem->__pCustomListItemImpl->__pTableViewGroupItemData = null; + } + + return true; +} + +bool +_ExpandableListItemDataProvider::IsReorderable(int groupIndexFrom, int groupIndexTo) +{ + return false; +} + +void +_ExpandableListItemDataProvider::UpdateGroupItem(int groupIndex, TableViewGroupItem* pItem) +{ + CustomListItem* pGroupCustomListItem = __pListImpl->GetCustomListItemAt(groupIndex, -1); + SysTryReturnVoidResult(NID_UI_CTRL, pGroupCustomListItem, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get an item at index(%d).", groupIndex); + + _TableViewItemUpdateParams updateParams; + updateParams.pItem = pGroupCustomListItem; + updateParams.isDividerEnabled = __pListImpl->_isDividerEnabled; + updateParams.pCheckBitmaps = __pListImpl->_pCheckBitmaps; + updateParams.annexStyle = __pListImpl->_annexStyle; + + result r = E_SUCCESS; + + r = _CustomListItemImpl::UpdateTableViewItem(updateParams); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to refresh an item."); + + SysTryReturnVoidResult(NID_UI_CTRL, pGroupCustomListItem->__pCustomListItemImpl, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get an item at index(%d).", groupIndex); + + _TableViewItemData* pTableViewItemData = pGroupCustomListItem->__pCustomListItemImpl->__pTableViewItemData; + SysTryReturnVoidResult(NID_UI_CTRL, pTableViewItemData, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get an item at groupIndex(%d)", groupIndex); + + pTableViewItemData->SetEnabled(true); + return; +} + +void +_ExpandableListItemDataProvider::UpdateItem(int groupIndex, int itemIndex, TableViewItem* pItem) +{ + CustomListItem* pCustomListItem = __pListImpl->GetCustomListItemAt(groupIndex, itemIndex); + SysTryReturnVoidResult(NID_UI_CTRL, pCustomListItem, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get an item at groupIndex(%d) itemIndex(%d)", groupIndex, itemIndex); + + _TableViewItemUpdateParams updateParams; + updateParams.pItem = pCustomListItem; + updateParams.isDividerEnabled = __pListImpl->_isDividerEnabled; + updateParams.pCheckBitmaps = __pListImpl->_pCheckBitmaps; + updateParams.annexStyle = __pListImpl->_annexStyle; + + result r = E_SUCCESS; + + r = _CustomListItemImpl::UpdateTableViewItem(updateParams); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to refresh an item."); + + _TableViewItemData* pTableViewItemData = pCustomListItem->__pCustomListItemImpl->__pTableViewItemData; + SysTryReturnVoidResult(NID_UI_CTRL, pTableViewItemData, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get an item at groupIndex(%d) itemIndex(%d)", groupIndex, itemIndex); + + pTableViewItemData->SetEnabled(true); + + return; +} + +_ExpandableListArrowBitmap::_ExpandableListArrowBitmap(void) + : __pNormalBitmap(null) + , __pEffectBitmap(null) +{ +} + +_ExpandableListArrowBitmap::~_ExpandableListArrowBitmap(void) +{ +} + +void +_ExpandableListArrowBitmap::SetBitmap(const Bitmap &pNormalBitmap, const Bitmap *pEffectBitmap) +{ + __pNormalBitmap = &pNormalBitmap; + __pEffectBitmap = pEffectBitmap; + + return; +} + +result +_ExpandableListArrowBitmap::OnDraw(void) +{ + SysTryReturn(NID_UI_CTRL, (__pNormalBitmap), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Normal Arrow bitmap is null."); + + result r = E_SUCCESS; + + Canvas* pCanvas = null; + pCanvas = GetCanvasN(); + + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, (pCanvas != null), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + const FloatRectangle bounds = GetBoundsF(); + + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pNormalBitmap)) + { + r = pCanvas->DrawNinePatchedBitmap(FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height), *__pNormalBitmap); + } + else + { + r = pCanvas->DrawBitmap(FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height), *__pNormalBitmap); + } + + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + if (__pEffectBitmap != null) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pEffectBitmap)) + { + r = pCanvas->DrawNinePatchedBitmap(FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height), *__pEffectBitmap); + } + + else + { + r = pCanvas->DrawBitmap(FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height), *__pEffectBitmap); + } + + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + delete pCanvas; + return E_SUCCESS; + +CATCH: + delete pCanvas; + return E_SYSTEM; +} + +_ExpandableListImpl* +_ExpandableListImpl::GetInstance(ExpandableList& expandableList) +{ + return static_cast<_ExpandableListImpl*>(expandableList._pControlImpl); +} + +const _ExpandableListImpl* +_ExpandableListImpl::GetInstance(const ExpandableList& expandableList) +{ + return static_cast(expandableList._pControlImpl); +} + +_ExpandableListImpl::_ExpandableListImpl(Control* pList, _TableView* pCore) + : _ListBaseImpl(pList, pCore) + , __pOpenedImage(null) + , __pClosedImage(null) + , __pEffectClosedImage(null) + , __pEffectOpenedImage(null) + , __pOpenedDisabledImage(null) + , __pClosedDisabledImage(null) + , __pOpenedPressedImage(null) + , __pClosedPressedImage(null) + , __pItemProvider(null) + , __directDelete(false) + , __groupExpandStateList(DeleteExpandStateFlag) +{ +} + +_ExpandableListImpl::~_ExpandableListImpl(void) +{ + GetCore().SetItemProvider(null); + + int count = GetItemCount(); + + for (int index = 0; index < count; index++) + { + RemoveFromSubItemsList(index); + } + + RemoveAllFromItemsList(); + + __groupExpandStateList.RemoveAll(true); + + __itemListenersList.RemoveAll(true); + + delete __pOpenedImage; + __pOpenedImage = null; + + delete __pClosedImage; + __pClosedImage = null; + + delete __pItemProvider; + __pItemProvider = null; + + delete __pEffectOpenedImage; + __pEffectOpenedImage = null; + + delete __pEffectClosedImage; + __pEffectClosedImage = null; + + delete __pOpenedDisabledImage; + __pOpenedDisabledImage = null; + + delete __pOpenedPressedImage; + __pOpenedPressedImage = null; + + delete __pClosedDisabledImage; + __pClosedDisabledImage = null; + + delete __pClosedPressedImage; + __pClosedPressedImage = null; + +} + +const char* +_ExpandableListImpl::GetPublicClassName(void) const +{ + return "ExpandableList"; +} + +const ExpandableList& +_ExpandableListImpl::GetPublic(void) const +{ + return static_cast(_ControlImpl::GetPublic()); +} + +ExpandableList& +_ExpandableListImpl::GetPublic(void) +{ + return static_cast(_ControlImpl::GetPublic()); +} + +const _TableView& +_ExpandableListImpl::GetCore(void) const +{ + return static_cast(_ControlImpl::GetCore()); +} + +_TableView& +_ExpandableListImpl::GetCore(void) +{ + return static_cast<_TableView&>(_ControlImpl::GetCore()); +} + +_ExpandableListImpl* +_ExpandableListImpl::CreateExpandableListImplN(ExpandableList* pControl, const Rectangle& bounds, bool itemDivider) +{ + result r = E_SUCCESS; + + r = GET_SIZE_INFO(ExpandableList).CheckInitialSizeValidF(FloatDimension(bounds.width, bounds.height), _CONTROL_ORIENTATION_PORTRAIT); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + _TableView* pCore = _TableView::CreateTableViewN(TABLE_VIEW_STYLE_GROUPED, true, TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT); + + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pCore, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + _ExpandableListImpl* pImpl = new (std::nothrow) _ExpandableListImpl(pControl, pCore); + SysTryCatch(NID_UI_CTRL, pImpl, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pCore->SetItemDividerEnabled(itemDivider); + + r = pCore->SetScrollStyle(TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + ClearLastResult(); + + return pImpl; + +CATCH: + delete pCore; + delete pImpl; + return null; +} + +result +_ExpandableListImpl::UpdateBounds(const Rectangle& rect) +{ + result r = E_SUCCESS; + + r = InitializeBoundsPropertiesF(GET_SIZE_INFO(CustomList), _CoordinateSystemUtils::ConvertToFloat(rect), GetCore().GetOrientation()); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +_ExpandableListImpl::Initialize(void) +{ + result r = E_SUCCESS; + + __pItemProvider = new (std::nothrow) _ExpandableListItemDataProvider(this); + SysTryReturnResult(NID_UI_CTRL, (__pItemProvider != null), E_OUT_OF_MEMORY, "Memory allocation failed."); + + TableViewStyle style = GetCore().GetTableViewStyle(); + SysTryReturnResult(NID_UI_CTRL, style == TABLE_VIEW_STYLE_GROUPED, E_INVALID_OPERATION, "The style of TableView is not TABLE_VIEW_STYLE_GROUPED"); + + _TableViewItemProvider* pItemProvider = _TableViewItemProvider::CreateTableViewItemProviderN(style); + SysTryReturnResult(NID_UI_CTRL, pItemProvider != null, E_OUT_OF_MEMORY, "Memory allocation failed."); + + r = pItemProvider->SetGroupedStyleItemProvider(__pItemProvider); + + if (r != E_SUCCESS) + { + delete pItemProvider; + SysTryReturn(NID_UI_CTRL, false, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + r = GetCore().SetItemProvider(pItemProvider); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GetCore().AddGroupedTableViewItemEventListener(*this); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = LoadArrowBitmap(); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + GET_COLOR_CONFIG(LIST::EXPANDABLELIST_SUB_ITEM_BG_COLOR, __subItemBgColor); + + return r; +} + +result +_ExpandableListImpl::CreateArrowIcon(int groupIndex) +{ + int size = __pOpenedImage->GetWidth(); + result r = E_SUCCESS; + bool isEnabled = true; + + isEnabled = IsItemEnabled(groupIndex); + + _TableViewGroupItemData* pTableViewGroupItemData = GetTableViewGroupItemAt(groupIndex); + SysTryReturnResult(NID_UI_CTRL, pTableViewGroupItemData, E_SYSTEM, "A system error has occurred. Failed to get GroupItemData at %d index.", groupIndex); + + _ExpandableListArrowBitmap* pArrowIcon = null; + pArrowIcon = dynamic_cast<_ExpandableListArrowBitmap*>(pTableViewGroupItemData->GetControl(ARROW_ELEMENT_NAME)); + + if (pArrowIcon == null) + { + _ExpandableListArrowBitmap* pArrowIcon = new (std::nothrow) _ExpandableListArrowBitmap(); + SysTryReturn(NID_UI_CTRL, pArrowIcon, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + float xPosition = 0.0f; + float yPosition = 0.0f; + + GET_SHAPE_CONFIG(LIST::EXPANDABLE_ARROW_X_POSITION, GetCore().GetOrientation(), xPosition); + yPosition = (pTableViewGroupItemData->GetHeight() - __pClosedImage->GetHeight())/2.0f; + + r = pArrowIcon->Construct(FloatRectangle((GetCore().GetBoundsF().width - (size + xPosition)), yPosition, size, size), GROUP_STYLE_NONE); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + pArrowIcon->SetName(ARROW_ELEMENT_NAME); + + Boolean* pIsExpanded = dynamic_cast(const_cast(__groupExpandStateList.GetAt(groupIndex))); + bool isCustomBitmap = false; + if (isEnabled) + { + if (pIsExpanded && pIsExpanded->ToBool()) + { + isCustomBitmap = IS_CUSTOM_BITMAP(LIST::BUTTON_EXPAND_GROUP); + if (isCustomBitmap) + { + pArrowIcon->SetBitmap(*__pClosedImage); + } + else + { + pArrowIcon->SetBitmap(*__pClosedImage, __pEffectClosedImage); + } + } + else + { + isCustomBitmap = IS_CUSTOM_BITMAP(LIST::BUTTON_COLLAPSE_GROUP); + + if (isCustomBitmap) + { + pArrowIcon->SetBitmap(*__pOpenedImage); + } + else + { + pArrowIcon->SetBitmap(*__pOpenedImage, __pEffectOpenedImage); + } + + } + } + else + { + if (pIsExpanded && pIsExpanded->ToBool()) + { + isCustomBitmap = IS_CUSTOM_BITMAP(LIST::BUTTON_EXPAND_GROUP); + if (isCustomBitmap) + { + pArrowIcon->SetBitmap(*__pClosedDisabledImage); + } + else + { + pArrowIcon->SetBitmap(*__pClosedDisabledImage, __pEffectClosedImage); + } + } + else + { + isCustomBitmap = IS_CUSTOM_BITMAP(LIST::BUTTON_COLLAPSE_GROUP); + + if (isCustomBitmap) + { + pArrowIcon->SetBitmap(*__pOpenedDisabledImage); + } + else + { + pArrowIcon->SetBitmap(*__pOpenedDisabledImage, __pEffectOpenedImage); + } + } + } + + pArrowIcon->AddTouchEventListener(*this); + + pTableViewGroupItemData->AddControl(*pArrowIcon); + pTableViewGroupItemData->SetIndividualSelectionEnabled(pArrowIcon, true); + } + + return E_SUCCESS; +} + +result +_ExpandableListImpl::LoadArrowBitmap(void) +{ + result r = E_SUCCESS; + Color normalColor; + Color disabledColor; + Color pressedColor; + + GET_COLOR_CONFIG(LIST::EXPANDABLE_ARROW_NORMAL, normalColor); + GET_COLOR_CONFIG(LIST::EXPANDABLE_ARROW_DISABLED, disabledColor); + GET_COLOR_CONFIG(LIST::EXPANDABLE_ARROW_PRESSED, 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)); + + 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_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)); + + 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); + 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); + 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 +_ExpandableListImpl::AddExpandableItemEventListener(const IExpandableItemEventListener& listener) +{ + _ListListener* pListenersList = new (std::nothrow) _ListListener(); + + SysTryReturn(NID_UI_CTRL, pListenersList, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pListenersList->pListener = const_cast(&listener); + __itemListenersList.Add(*pListenersList); + + return E_SUCCESS; +} + +result +_ExpandableListImpl::RemoveExpandableItemEventListener(const IExpandableItemEventListener& listener) +{ + _ListListener* pListenersList = null; + result r = E_SYSTEM; + int count = __itemListenersList.GetCount(); + + for (int listenerCount = 0; listenerCount < count; listenerCount++) + { + pListenersList = dynamic_cast<_ListListener*>(__itemListenersList.GetAt(listenerCount)); + + if ((pListenersList != null) && (pListenersList->pListener == &listener)) + { + r = E_SUCCESS; + __itemListenersList.RemoveAt(listenerCount, true); + break; + } + } + + return r; +} + +result +_ExpandableListImpl::AddItem(const CustomListItem& item, int itemId) +{ + return InsertItemAt(GetGroupCount(), item, itemId); +} + +result +_ExpandableListImpl::InsertItemAt(int mainIndex, const CustomListItem& item, int itemId) +{ + result r = E_SUCCESS; + + SysTryReturnResult(NID_UI_CTRL, (mainIndex >= 0 && mainIndex <= GetGroupCount()), E_INVALID_ARG, "Invalid argument used. mainIndex = %d", mainIndex); + + item.__pCustomListItemImpl->itemId = itemId; + + 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); + + r = InsertIntoItemsList(item, mainIndex, -1); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to insert an item."); + + r = GetCore().RefreshTableView(mainIndex, -1, TABLE_VIEW_REFRESH_TYPE_ITEM_ADD); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + if (GetCore().GetFirstDrawnFlag() == false) + { + SetItemExpanded(mainIndex, false); + } + + return E_SUCCESS; + +CATCH: + RemoveFromItemsList(mainIndex, -1); + __groupExpandStateList.RemoveAt(mainIndex, true); + + return E_SYSTEM; +} + +result +_ExpandableListImpl::AddSubItem(int mainIndex, const CustomListItem& item, int itemId) +{ + SysTryReturnResult(NID_UI_CTRL, (mainIndex >= 0 && mainIndex <= GetGroupCount()), E_INVALID_ARG, "Invalid argument used. mainIndex = %d", mainIndex); + + return InsertSubItemAt(mainIndex, GetSubItemCountAt(mainIndex), item, itemId); +} + +result +_ExpandableListImpl::InsertSubItemAt(int mainIndex, int subIndex, const CustomListItem& item, int itemId) +{ + SysTryReturnResult(NID_UI_CTRL, (mainIndex >= 0 && mainIndex <= GetGroupCount()), E_INVALID_ARG, "Invalid argument used. mainIndex = %d.", mainIndex); + + SysTryReturnResult(NID_UI_CTRL, (subIndex >= 0 && subIndex <= GetSubItemCount(mainIndex)), E_INVALID_ARG, "Invalid argument used. subIndex = %d.", subIndex); + + item.__pCustomListItemImpl->itemId = itemId; + + result r = E_SUCCESS; + + r = InsertIntoItemsList(item, mainIndex, subIndex); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "A system error has occurred. Failed to insert item"); + + r = GetCore().RefreshTableView(mainIndex, subIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_ADD); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; + +CATCH: + RemoveFromItemsList(mainIndex, subIndex); + return E_SYSTEM; +} + +int +_ExpandableListImpl::GetItemCount(void) const +{ + return GetGroupCount(); +} + +int +_ExpandableListImpl::GetSubItemCount(int mainIndex) const +{ + SysTryReturn(NID_UI_CTRL, (mainIndex >= 0 && mainIndex < GetGroupCount()), INVALID_INDEX, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. mainIndex = %d.", mainIndex); + + return GetSubItemCountAt(mainIndex); +} + +result +_ExpandableListImpl::SetItemAt(int mainIndex, const CustomListItem& item, int itemId) +{ + SysTryReturnResult(NID_UI_CTRL, (mainIndex >= 0 && mainIndex < GetGroupCount()), E_INVALID_ARG, "Invalid argument used. mainIndex = %d", mainIndex); + + SysTryReturnResult(NID_UI_CTRL, (IsItemNew(item) == true), E_SYSTEM, "[E_SYSTEM] A system error has occurred. The item already exists."); + + result r = E_SUCCESS; + item.__pCustomListItemImpl->itemId = itemId; + + r = SetInItemsList(item, mainIndex, -1); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _TableViewItemUpdateParams updateParams; + updateParams.pItem = const_cast(&item); + updateParams.isDividerEnabled = _isDividerEnabled; + updateParams.pCheckBitmaps = _pCheckBitmaps; + updateParams.annexStyle = _annexStyle; + + r = _CustomListItemImpl::UpdateTableViewItem(updateParams); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, "A system error has occurred. Failed to refresh an item."); + + return E_SUCCESS; +} + +result +_ExpandableListImpl::RemoveItemAt(int mainIndex) +{ + result r = E_SUCCESS; + + SysTryReturnResult(NID_UI_CTRL, (mainIndex >= 0 && mainIndex < GetGroupCount()), E_INVALID_ARG, "Invalid argument used. mainIndex = %d.", mainIndex); + + r = RemoveFromSubItemsList(mainIndex); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = RemoveFromItemsList(mainIndex, -1); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __groupExpandStateList.RemoveAt(mainIndex, true); + + __directDelete = true; + + r = GetCore().RefreshTableView(mainIndex, -1, TABLE_VIEW_REFRESH_TYPE_ITEM_REMOVE); + + __directDelete = false; + + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +_ExpandableListImpl::SetSubItemAt(int mainIndex, int subIndex, const CustomListItem& item, int itemId) +{ + result r = E_SUCCESS; + + SysTryReturn(NID_UI_CTRL, ((mainIndex >= 0) && (mainIndex < GetGroupCount())), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. mainIndex = %d", mainIndex); + + _TableViewGroupItemData* pGroupItem = GetTableViewGroupItemAt(mainIndex); + SysTryReturn(NID_UI_CTRL, pGroupItem, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get GroupItem at %d index.", mainIndex); + + SysTryReturn(NID_UI_CTRL, ((subIndex >= 0) && (subIndex < GetSubItemCountAt(mainIndex))), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. subIndex = %d", subIndex); + + item.__pCustomListItemImpl->itemId = itemId; + + CustomListItem* pOldItem = GetCustomListItemAt(mainIndex, subIndex); + SysTryReturnResult(NID_UI_CTRL, pOldItem, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get an item at mainIndex(%d), subIndex(%d).", mainIndex, subIndex); + SysTryReturnResult(NID_UI_CTRL, pOldItem->__pCustomListItemImpl, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get an item at mainIndex(%d), subIndex(%d).", mainIndex, subIndex); + + item.__pCustomListItemImpl->__pTableViewItemData = pOldItem->__pCustomListItemImpl->__pTableViewItemData; + + r = SetInItemsList(item, mainIndex, subIndex); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to update an item."); + + _TableViewItemUpdateParams updateParams; + updateParams.pItem = const_cast(&item); + updateParams.isDividerEnabled = _isDividerEnabled; + updateParams.pCheckBitmaps = _pCheckBitmaps; + updateParams.annexStyle = _annexStyle; + + r = _CustomListItemImpl::UpdateTableViewItem(updateParams); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to refresh an item."); + + r = GetCore().RefreshTableView(mainIndex, subIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, E_SYSTEM, "Item not inserted successFully."); + + return r; +} + +result +_ExpandableListImpl::RemoveSubItemAt(int mainIndex, int subIndex) +{ + result r = E_SUCCESS; + + SysTryReturn(NID_UI_CTRL, ((mainIndex >= 0) && (mainIndex < GetGroupCount())), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. mainIndex = %d", mainIndex); + + SysTryReturn(NID_UI_CTRL, ((subIndex >= 0) && (subIndex < GetSubItemCount(mainIndex))), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. subIndex = %d", subIndex); + + r = RemoveFromItemsList(mainIndex, subIndex); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to remove item."); + + __directDelete = true; + + r = GetCore().RefreshTableView(mainIndex, subIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_REMOVE); + + __directDelete = false; + + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to remove item."); + + if (_annexStyle == TABLE_VIEW_ANNEX_STYLE_MARK || _annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING) + { + int checkedCount = GetCheckedItemCount(mainIndex); + + if (checkedCount == 0) + { + _CheckElementModel* pGroupCheckElement = GetCheckElementAt(mainIndex, -1); + SysTryReturnResult(NID_UI_CTRL, pGroupCheckElement, E_SYSTEM, "A system error has occurred. Failed to get checkElement at %d index.", mainIndex); + + pGroupCheckElement->SetCheckBoxStatus(CHECK_BOX_UNCHECKED); + + DrawItem(mainIndex, -1); + } + } + + return E_SUCCESS; +} + +result +_ExpandableListImpl::RemoveAllSubItemsAt(int mainIndex) +{ + result r = E_SUCCESS; + + SysTryReturnResult(NID_UI_CTRL, (mainIndex >= 0 && mainIndex < GetGroupCount()), E_INVALID_ARG, "Invalid argument used. mainIndex = %d.", mainIndex); + + int count = GetSubItemCountAt(mainIndex); + for (int index = 0; index < count; index++) + { + r = RemoveSubItemAt(mainIndex, 0); + } + + return r; +} + +result +_ExpandableListImpl::RemoveAllItems(void) +{ + result r = E_SUCCESS; + result finalResult = E_SUCCESS; + + int count = GetGroupCount(); + for (int index = count - 1; index >= 0; index--) + { + r = RemoveItemAt(index); + + if (r != E_SUCCESS) + { + finalResult = r; + SysLog(NID_UI_CTRL, "[E_SYSTEM] A system error has occurred. Item at %d index not removed successfully", index); + index++; + } + } + return finalResult; +} + +bool +_ExpandableListImpl::IsItemChecked(int groupIndex, int subIndex) const +{ + if (subIndex == -1) + { + return IsItemChecked(groupIndex); + } + else + { + return IsSubItemChecked(groupIndex, subIndex); + } +} + +bool +_ExpandableListImpl::IsItemChecked(int mainIndex) const +{ + SysTryReturn(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL), false, E_SYSTEM, "[E_SYSTEM] A system error has occurred. list style should not be TABLE_VIEW_ANNEX_STYLE_NORMAL."); + + SysTryReturn(NID_UI_CTRL, (mainIndex >= 0 && mainIndex < GetGroupCount()), + false, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. mainIndex = %d", mainIndex); + + const _CheckElementModel* pCheckElement = GetCheckElementAt(mainIndex, -1); + SysTryReturn(NID_UI_CTRL, pCheckElement, false, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get checkElement at mainIndex(%d).", mainIndex); + + return (bool)pCheckElement->GetCheckBoxStatus(); +} + +int +_ExpandableListImpl::GetFirstCheckedItemIndex(void) const +{ + SysTryReturn(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL), INVALID_INDEX, INVALID_INDEX, "[INVALID_INDEX] List style should not be TABLE_VIEW_ANNEX_STYLE_NORMAL"); + + int count = GetGroupCount(); + for (int index = 0; index < count; index++) + { + if (IsItemChecked(index)) + return index; + } + return INVALID_INDEX; +} + +int +_ExpandableListImpl::GetItemIdAt(int mainIndex) const +{ + SysTryReturn(NID_UI_CTRL, (mainIndex >= 0 && mainIndex < GetGroupCount()), INVALID_INDEX, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. mainIndex = %d", mainIndex); + + const CustomListItem* pCustomListItem = GetCustomListItemAt(mainIndex, -1); + SysTryReturn(NID_UI_CTRL, pCustomListItem, -1, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get an item at mainIndex(%d).", mainIndex); + + return pCustomListItem->__pCustomListItemImpl->itemId; +} + +int +_ExpandableListImpl::GetItemIndexFromItemId(int itemId) const +{ + int count = GetGroupCount(); + for (int index = 0; index < count; index++) + { + const CustomListItem* pCustomListItem = GetCustomListItemAt(index, -1); + SysTryReturn(NID_UI_CTRL, pCustomListItem, INVALID_INDEX, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get an item at index(%d).", index); + + if (itemId == pCustomListItem->__pCustomListItemImpl->itemId) + return index; + } + return INVALID_INDEX; +} + +int +_ExpandableListImpl::GetSubItemIdAt(int mainIndex, int subIndex) const +{ + SysTryReturn(NID_UI_CTRL, (mainIndex >= 0 && mainIndex < GetGroupCount()), INVALID_INDEX, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. mainIndex = %d", mainIndex); + + SysTryReturn(NID_UI_CTRL, (subIndex >= 0 && subIndex < GetSubItemCount(mainIndex)), INVALID_INDEX, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. subIndex = %d", subIndex); + + const CustomListItem* pCustomListItem = GetCustomListItemAt(mainIndex, subIndex); + SysTryReturn(NID_UI_CTRL, pCustomListItem, INVALID_INDEX, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get an item at mainIndex(%d), subIndex(%d).", mainIndex, subIndex); + + return pCustomListItem->__pCustomListItemImpl->itemId; +} + +result +_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 (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); + + if (GetCore().GetFirstDrawnFlag() || (GetCore().IsGroupExpanded(mainIndex) == expand)) + { + return E_SUCCESS; + } + + result r = E_SUCCESS; + + _TableViewGroupItemData* pTableViewGroupItemData = GetTableViewGroupItemAt(mainIndex); + SysTryReturn(NID_UI_CTRL, pTableViewGroupItemData, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get item at %d mainIndex.", mainIndex); + + _ExpandableListArrowBitmap* pArrowIcon = dynamic_cast<_ExpandableListArrowBitmap*>(pTableViewGroupItemData->GetControl(ARROW_ELEMENT_NAME)); + SysTryReturn(NID_UI_CTRL, pArrowIcon, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get arrow icon."); + + bool isCustomBitmap = false; + + if (expand) + { + r = GetCore().ExpandGroup(mainIndex); + + isCustomBitmap = IS_CUSTOM_BITMAP(LIST::BUTTON_EXPAND_GROUP); + + if (isCustomBitmap) + { + pArrowIcon->SetBitmap(*__pClosedImage); + } + else + { + pArrowIcon->SetBitmap(*__pClosedImage, __pEffectClosedImage); + } + } + else + { + r = GetCore().CollapseGroup(mainIndex); + + isCustomBitmap = IS_CUSTOM_BITMAP(LIST::BUTTON_COLLAPSE_GROUP); + + if (isCustomBitmap) + { + pArrowIcon->SetBitmap(*__pOpenedImage); + } + else + { + pArrowIcon->SetBitmap(*__pOpenedImage, __pEffectOpenedImage); + } + } + + pArrowIcon->Invalidate(true); + + return r; +} + +result +_ExpandableListImpl::SetItemEnabled(int mainIndex, bool enable) +{ + result r = E_SUCCESS; + + SysTryReturnResult(NID_UI_CTRL, (mainIndex >= 0 && mainIndex < GetGroupCount()), E_INVALID_ARG, "Invalid argument used. mainIndex = %d", mainIndex); + + r = GetCore().SetItemEnabled(mainIndex, -1, enable); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + DrawItem(mainIndex, -1); + return r; +} + +bool +_ExpandableListImpl::IsItemEnabled(int mainIndex) const +{ + SysTryReturn(NID_UI_CTRL, (mainIndex >= 0 && mainIndex < GetGroupCount()), false, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. mainIndex = %d", mainIndex); + + return GetCore().IsItemEnabled(mainIndex, -1); +} + +result +_ExpandableListImpl::SetSubItemEnabled(int mainIndex, int subIndex, bool enable) +{ + SysTryReturnResult(NID_UI_CTRL, (mainIndex >= 0 && mainIndex < GetGroupCount()), E_INVALID_ARG, "Invalid argument used. mainIndex(%d)", mainIndex); + SysTryReturnResult(NID_UI_CTRL, (subIndex >= 0 && subIndex < GetSubItemCount(mainIndex)), E_INVALID_ARG, "Invalid argument used. subIndex(%d)", subIndex); + + result r = E_SUCCESS; + + r = GetCore().SetItemEnabled(mainIndex, subIndex, enable); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + DrawItem(mainIndex, subIndex); + return r; +} + +bool +_ExpandableListImpl::IsSubItemEnabled(int mainIndex, int subIndex) const +{ + SysTryReturn(NID_UI_CTRL, (mainIndex >= 0 && mainIndex < GetGroupCount()), false, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. mainIndex = %d", mainIndex); + + SysTryReturn(NID_UI_CTRL, (subIndex >= 0 && subIndex < GetSubItemCount(mainIndex)), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. subIndex = %d", subIndex); + + return GetCore().IsItemEnabled(mainIndex, subIndex); +} + +result +_ExpandableListImpl::SetItemChecked(int groupIndex, int itemIndex, bool check) +{ + if (itemIndex == -1) + { + return SetItemChecked(groupIndex, check); + } + else + { + return SetSubItemChecked(groupIndex, itemIndex, check); + } +} + +result +_ExpandableListImpl::SetItemChecked(int mainIndex, bool check) +{ + SysTryReturnResult(NID_UI_CTRL, (mainIndex >= 0 && mainIndex < GetGroupCount()), E_INVALID_ARG, "Invalid argument used. mainIndex = %d", mainIndex); + + SysTryReturnResult(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL), E_SYSTEM, "A system error has occurred. The List Style should not be TABLE_VIEW_ANNEX_STYLE_NORMAL"); + + SysTryReturnResult(NID_UI_CTRL, (IsItemEnabled(mainIndex)), E_SYSTEM, "A system error has occurred. The item is not enabled at mainIndex %d.", mainIndex); + + if (IsItemChecked(mainIndex) == check) + { + return E_SUCCESS; + } + + _CheckElementModel* pCheckElement = GetCheckElementAt(mainIndex, -1); + SysTryReturnResult(NID_UI_CTRL, pCheckElement, E_SYSTEM, "A system error has occurred. Failed to get checkElement at mainIndex(%d)", mainIndex); + + if (_annexStyle == TABLE_VIEW_ANNEX_STYLE_RADIO) + { + if (_currentRadioGroupIndex != -1) + { + _CheckElementModel* pOldSubCheckElement = GetCheckElementAt(_currentRadioGroupIndex, _currentRadioIndex); + SysTryReturnResult(NID_UI_CTRL, pOldSubCheckElement, E_SYSTEM, "A system error has occurred. Failed to get checkElement at mainIndex(%d) subIndex(%d).", _currentRadioGroupIndex, _currentRadioIndex); + + pOldSubCheckElement->SetCheckBoxStatus(CHECK_BOX_UNCHECKED); + + DrawItem(_currentRadioGroupIndex, _currentRadioIndex); + } + + _currentRadioGroupIndex = (check == true) ? mainIndex : -1; + pCheckElement->SetCheckBoxStatus((_CheckBoxBitmapType)check); + _currentRadioIndex = -1; + + return E_SUCCESS; + } + + int subCount = GetSubItemCountAt(mainIndex); + + if (subCount == 0) + { + pCheckElement->SetCheckBoxStatus((_CheckBoxBitmapType)check); + } + else + { + for (int subItemCount = 0; subItemCount < subCount; subItemCount++) + { + SetSubItemChecked(mainIndex, subItemCount, check); + } + } + + return E_SUCCESS; +} + +result +_ExpandableListImpl::SetSubItemCheckedRadio(int mainIndex, int subIndex, bool check) +{ + if (_currentRadioGroupIndex != -1) + { + _CheckElementModel* pOldSubCheckElement = GetCheckElementAt(_currentRadioGroupIndex, _currentRadioIndex); + SysTryReturnResult(NID_UI_CTRL, pOldSubCheckElement, E_SYSTEM, "A system error has occurred. Failed to get checkElement at mainIndex(%d) subIndex(%d).", _currentRadioGroupIndex, _currentRadioIndex); + + pOldSubCheckElement->SetCheckBoxStatus(CHECK_BOX_UNCHECKED); + + DrawItem(_currentRadioGroupIndex, _currentRadioIndex); + } + + if (check) + { + _currentRadioGroupIndex = mainIndex; + _currentRadioIndex = subIndex; + } + else + { + _currentRadioGroupIndex = -1; + _currentRadioIndex = -1; + } + + _CheckElementModel* pSubCheckElement = GetCheckElementAt(mainIndex, subIndex); + SysTryReturnResult(NID_UI_CTRL, pSubCheckElement, E_SYSTEM, "A system error has occurred. Failed to get checkElement at mainIndex(%d) subIndex(%d).", mainIndex, subIndex); + + pSubCheckElement->SetCheckBoxStatus((_CheckBoxBitmapType)check); + + DrawItem(mainIndex, subIndex); + + return E_SUCCESS; +} + +result +_ExpandableListImpl::SetSubItemCheckedMarkOnOff(int mainIndex, int subIndex, bool check) +{ + _CheckElementModel* pCheckElement = GetCheckElementAt(mainIndex, subIndex); + SysTryReturnResult(NID_UI_CTRL, pCheckElement, E_SYSTEM, "A system error has occurred. Failed to get checkElement at mainIndex(%d) subIndex(%d).", mainIndex, subIndex); + + pCheckElement->SetCheckBoxStatus((_CheckBoxBitmapType)check); + + _CheckElementModel* pGroupCheckElement = GetCheckElementAt(mainIndex, -1); + SysTryReturnResult(NID_UI_CTRL, pGroupCheckElement, E_SYSTEM, "A system error has occurred. Failed to get checkElement at mainIndex(%d).", mainIndex); + + if ((check) || (GetCheckedItemCountAt(mainIndex) > 0)) + { + pGroupCheckElement->SetCheckBoxStatus(CHECK_BOX_CHECKED); + } + else + { + pGroupCheckElement->SetCheckBoxStatus(CHECK_BOX_UNCHECKED); + } + + DrawItem(mainIndex, -1); + DrawItem(mainIndex, subIndex); + + return E_SUCCESS; +} + +result +_ExpandableListImpl::SetSubItemChecked(int mainIndex, int subIndex, bool check) +{ + SysTryReturnResult(NID_UI_CTRL, (mainIndex >= 0 && mainIndex < GetGroupCount()), E_INVALID_ARG, "Invalid argument used. mainIndex = %d", mainIndex); + + SysTryReturnResult(NID_UI_CTRL, (subIndex >= 0 && subIndex < GetSubItemCount(mainIndex)), E_INVALID_ARG, "Invalid argument used. subIndex = %d", subIndex); + + SysTryReturnResult(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL), E_SYSTEM, "A system error has occurred. The List Style should not be TABLE_VIEW_ANNEX_STYLE_NORMAL"); + + if (IsSubItemChecked(mainIndex, subIndex) == check) + { + return E_SUCCESS; + } + + if (_annexStyle == TABLE_VIEW_ANNEX_STYLE_RADIO) + { + return SetSubItemCheckedRadio(mainIndex, subIndex, check); + } + else + { + return SetSubItemCheckedMarkOnOff(mainIndex, subIndex, check); + } +} + +int +_ExpandableListImpl::GetCheckedItemCountAt(int mainIndex) const +{ + int totalSubItemCount = GetSubItemCountAt(mainIndex); + int count = 0; + + for (int index = 0; index < totalSubItemCount; index++) + { + if (IsSubItemChecked(mainIndex, index) == true) + { + count++; + } + } + + return count; +} + +bool +_ExpandableListImpl::IsSubItemChecked(int mainIndex, int subIndex) const +{ + SysTryReturn(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL), false, E_SYSTEM, "[E_SYSTEM] A system error has occurred. list style should not be TABLE_VIEW_ANNEX_STYLE_NORMAL."); + + SysTryReturn(NID_UI_CTRL, (mainIndex >= 0 && mainIndex < GetGroupCount()), false, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. mainIndex = %d", mainIndex); + + SysTryReturn(NID_UI_CTRL, (subIndex >= 0 && subIndex < GetSubItemCount(mainIndex)), false, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. subIndex = %d", subIndex); + + const _CheckElementModel* pCheckElement = GetCheckElementAt(mainIndex, subIndex); + SysTryReturn(NID_UI_CTRL, pCheckElement, false, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get checkElement at mainIndex(%d) subIndex(%d).", mainIndex, subIndex); + + return (bool)pCheckElement->GetCheckBoxStatus(); +} + +result +_ExpandableListImpl::SetAllSubItemsChecked(int mainIndex, bool check) +{ + SysTryReturnResult(NID_UI_CTRL, (mainIndex >= 0 && mainIndex < GetGroupCount()), E_INVALID_ARG, "Invalid argument used. mainIndex = %d", mainIndex); + + SysTryReturnResult(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL), E_SYSTEM, "A system error has occurred. The List Style should not be TABLE_VIEW_ANNEX_STYLE_NORMAL"); + SysTryReturnResult(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_RADIO), E_SYSTEM, "A system error has occurred. The List Style should not be TABLE_VIEW_ANNEX_STYLE_RADIO"); + + int totalSubItemCount = GetSubItemCountAt(mainIndex); + result r = E_SUCCESS; + + for (int subItemCount = 0; subItemCount < totalSubItemCount; subItemCount++) + { + r = SetSubItemChecked(mainIndex, subItemCount, check); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + } + + return E_SUCCESS; +} + +result +_ExpandableListImpl::RemoveAllCheckedSubItemsAt(int mainIndex) +{ + SysTryReturnResult(NID_UI_CTRL, (mainIndex >= 0 && mainIndex < GetGroupCount()), E_INVALID_ARG, "Invalid argument used. mainIndex = %d", mainIndex); + + SysTryReturnResult(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL), E_SYSTEM, "A system error has occurred. The List Style should not be TABLE_VIEW_ANNEX_STYLE_NORMAL"); + + SysTryReturnResult(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_RADIO), E_SYSTEM, "A system error has occurred. The List Style should not be TABLE_VIEW_ANNEX_STYLE_RADIO"); + + result r = E_SUCCESS; + int totalSubItemCount = GetSubItemCountAt(mainIndex); + + for (int subItemCount = 0; subItemCount < totalSubItemCount; subItemCount++) + { + bool isChecked = IsSubItemChecked(mainIndex, subItemCount); + + if (isChecked) + { + r = RemoveSubItemAt(mainIndex, subItemCount); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "A system error has occurred. Failed to remove item"); + } + } + + return E_SUCCESS; +} + +int +_ExpandableListImpl::GetFirstCheckedSubItemIndex(int mainIndex) const +{ + SysTryReturn(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL), INVALID_INDEX, E_SYSTEM, "[E_SYSTEM] A system error has occurred. List style should not be TABLE_VIEW_ANNEX_STYLE_NORMAL"); + + SysTryReturn(NID_UI_CTRL, (mainIndex >= 0 && mainIndex < GetGroupCount()), INVALID_INDEX, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. mainIndex = %d", mainIndex); + + int totalSubItemCount = GetSubItemCountAt(mainIndex); + + for (int subItemCount = 0; subItemCount < totalSubItemCount; subItemCount++) + { + if (IsSubItemChecked(mainIndex, subItemCount)) + { + return subItemCount; + } + } + + return INVALID_INDEX; +} + +int +_ExpandableListImpl::GetLastCheckedItemIndex(void) const +{ + SysTryReturn(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL), INVALID_INDEX, E_SYSTEM, "[E_SYSTEM] A system error has occurred. List style should not be TABLE_VIEW_ANNEX_STYLE_NORMAL"); + + int count = GetGroupCount(); + + for (int index = count - 1; index >= 0; index--) + { + if (IsItemChecked(index)) + { + return index; + } + } + + return INVALID_INDEX; +} + +int +_ExpandableListImpl::GetLastCheckedSubItemIndex(int mainIndex) const +{ + SysTryReturn(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL), INVALID_INDEX, E_SYSTEM, "[E_SYSTEM] A system error has occurred. List style should not be TABLE_VIEW_ANNEX_STYLE_NORMAL"); + + SysTryReturn(NID_UI_CTRL, (mainIndex >= 0 && mainIndex < GetGroupCount()), INVALID_INDEX, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. mainIndex = %d", mainIndex); + + int count = GetSubItemCountAt(mainIndex); + + for (int index = count - 1; index >= 0; index--) + { + if (IsSubItemChecked(mainIndex, index)) + { + return index; + } + } + return INVALID_INDEX; +} + +int +_ExpandableListImpl::GetNextCheckedItemIndexAfter(int mainIndex) const +{ + SysTryReturn(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL), INVALID_INDEX, E_SYSTEM, "[E_SYSTEM] A system error has occurred. List style should not be TABLE_VIEW_ANNEX_STYLE_NORMAL"); + + SysTryReturn(NID_UI_CTRL, (mainIndex >= 0 && mainIndex < GetGroupCount()), INVALID_INDEX, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. mainIndex = %d", mainIndex); + + for (int index = mainIndex+1; index < GetGroupCount(); index++) + { + if (IsItemChecked(index)) + { + return index; + } + } + + return INVALID_INDEX; +} + +int +_ExpandableListImpl::GetNextCheckedSubItemIndexAfter(int mainIndex, int subIndex) const +{ + SysTryReturn(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL), INVALID_INDEX, E_SYSTEM, "[E_SYSTEM] A system error has occurred. List style should not be TABLE_VIEW_ANNEX_STYLE_NORMAL"); + + SysTryReturn(NID_UI_CTRL, (mainIndex >= 0 && mainIndex < GetGroupCount()), INVALID_INDEX, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. mainIndex = %d", mainIndex); + SysTryReturn(NID_UI_CTRL, (subIndex >= 0 && subIndex < GetSubItemCount(mainIndex)), INVALID_INDEX, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. subIndex = %d", subIndex); + + int count = GetSubItemCountAt(mainIndex); + + for (int index = subIndex + 1; index < count; index++) + { + if (IsSubItemChecked(mainIndex, index)) + { + return index; + } + } + + return INVALID_INDEX; +} + +result +_ExpandableListImpl::GetSubItemIndexFromItemId(int itemId, int& mainIndex, int& subIndex) const +{ + mainIndex = INVALID_INDEX; + subIndex = INVALID_INDEX; + + for (int index = 0; index < GetGroupCount(); index++) + { + for (int count = 0; count < GetSubItemCountAt(index); count++) + { + const CustomListItem* pCustomListItem = GetCustomListItemAt(index, count); + SysTryReturnResult(NID_UI_CTRL, pCustomListItem, E_SYSTEM, "A system error has occurred. Failed to get an item at mainIndex(%d) subIndex(%d).", index, count); + + SysTryReturnResult(NID_UI_CTRL, pCustomListItem->__pCustomListItemImpl, E_SYSTEM, "A system error has occurred. Failed to get an item at mainIndex(%d) subIndex(%d).", index, count); + + if (itemId == pCustomListItem->__pCustomListItemImpl->itemId) + { + mainIndex = index; + subIndex = count; + return E_SUCCESS; + } + } + } + + return E_OBJ_NOT_FOUND; +} + +result +_ExpandableListImpl::ScrollToBottom(void) +{ + result r = E_SUCCESS; + + int lastGroupIndex = GetGroupCount() - 1; + int lastItemIndex = GetSubItemCountAt(lastGroupIndex) - 1; + + r = GetCore().SetBottomDrawnItemIndex(lastGroupIndex, lastItemIndex); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + GetCore().Draw(); + + return E_SUCCESS; +} +result +_ExpandableListImpl::ScrollToTop(void) +{ + result r = E_SUCCESS; + + r = GetCore().SetTopDrawnItemIndex(0, -1); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SetLastResult(E_SUCCESS); + + GetCore().Draw(); + + return r; +} + +result +_ExpandableListImpl::ScrollToTop(int mainIndex, int subIndex) +{ + SysTryReturnResult(NID_UI_CTRL, (mainIndex >= 0 && mainIndex < GetGroupCount()), E_INVALID_ARG, "Invalid argument used. mainIndex = %d", mainIndex); + SysTryReturnResult(NID_UI_CTRL, (subIndex >= 0 && subIndex < GetSubItemCount(mainIndex)), E_INVALID_ARG, "Invalid argument used. subIndex = %d", subIndex); + result r = E_SUCCESS; + + r = GetCore().SetTopDrawnItemIndex(mainIndex, subIndex); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + GetCore().Draw(); + + return r; +} + +result +_ExpandableListImpl::ScrollToTop(int mainIndex) +{ + SysTryReturn(NID_UI_CTRL, ((mainIndex < GetGroupCount()) && (mainIndex >= 0)), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. mainIndex = %d.", mainIndex); + + result r = E_SUCCESS; + + r = GetCore().SetTopDrawnItemIndex(mainIndex, -1); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + GetCore().Draw(); + + return r; +} + +void +_ExpandableListImpl::SetBgColor(const Color& color) +{ + GetCore().SetBackgroundColor(color); + return; +} + +result +_ExpandableListImpl::RefreshItem(int mainIndex) +{ + SysTryReturnResult(NID_UI_CTRL, (mainIndex >= 0 && mainIndex < GetGroupCount()), E_INVALID_ARG, "Invalid argument used. mainIndex = %d.", mainIndex); + + int topGroupIndex = -1; + int bottomGroupIndex = -1; + int itemIndex = -1; + + GetCore().GetTopDrawnItemIndex(topGroupIndex, itemIndex); + GetCore().GetBottomDrawnItemIndex(bottomGroupIndex, itemIndex); + + SysTryReturnResult(NID_UI_CTRL, (mainIndex >= topGroupIndex && mainIndex <= bottomGroupIndex), E_INVALID_OPERATION, "Index should be within drawn item range %d.", mainIndex); + + result r = E_SUCCESS; + + int count = GetSubItemCountAt(mainIndex); + for (int indexItem = 0; indexItem < count; indexItem++) + { + r = RefreshSubItem(mainIndex, indexItem); + if (r != E_SUCCESS) + { + SysLog(NID_UI_CTRL, "Not able to refresh item with index %d %d.", mainIndex, indexItem); + } + } + + return E_SUCCESS; +} + +result +_ExpandableListImpl::RefreshSubItem(int mainIndex, int subIndex) +{ + SysTryReturnResult(NID_UI_CTRL, (mainIndex >= 0 && mainIndex < GetGroupCount()), E_INVALID_ARG, "Invalid argument used. mainIndex = %d", mainIndex); + SysTryReturnResult(NID_UI_CTRL, (subIndex >= 0 && subIndex < GetSubItemCount(mainIndex)), E_INVALID_ARG, "Invalid argument used. subIndex = %d", subIndex); + + int topItemIndex = -1; + int bottomItemIndex = -1; + int groupItemIndex = -1; + + GetCore().GetTopDrawnItemIndex(groupItemIndex, topItemIndex); + GetCore().GetBottomDrawnItemIndex(groupItemIndex, bottomItemIndex); + + SysTryReturnResult(NID_UI_CTRL, (subIndex >= topItemIndex && subIndex <= bottomItemIndex), E_INVALID_OPERATION, + "Index should be within drawn item range %d.", subIndex); + + result r = E_SUCCESS; + + CustomListItem* pCustomListItem = GetCustomListItemAt(mainIndex, subIndex); + SysTryReturn(NID_UI_CTRL, pCustomListItem, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get an item at mainIndex(%d) subIndex(%d).", mainIndex, subIndex); + + _TableViewItemUpdateParams updateParams; + updateParams.pItem = pCustomListItem; + updateParams.isDividerEnabled = _isDividerEnabled; + updateParams.pCheckBitmaps = _pCheckBitmaps; + updateParams.annexStyle = _annexStyle; + + r = _CustomListItemImpl::UpdateTableViewItem(updateParams); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, "A system error has occurred. Failed to refresh an item."); + + _TableViewItemData* pTableViewItemData = pCustomListItem->__pCustomListItemImpl->__pTableViewItemData; + SysTryReturn(NID_UI_CTRL, pTableViewItemData, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get an item at mainIndex(%d) subIndex(%d).", mainIndex, subIndex); + + pTableViewItemData->Invalidate(true); + + return E_SUCCESS; +} + +int +_ExpandableListImpl::GetCheckedItemCount(int mainIndex) +{ + SysTryReturn(NID_UI_CTRL, (mainIndex >= 0 && mainIndex < GetGroupCount()), 0, E_INVALID_ARG, "[E_INVALID_ARG] The groupIndex %d is invalid", mainIndex); + + _TableViewGroupItemData* pGroupItem = GetTableViewGroupItemAt(mainIndex); + SysTryReturn(NID_UI_CTRL, pGroupItem, 0, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get GroupItem at %d index.", mainIndex); + + int checkedCount = 0; + int subItemCount = GetSubItemCountAt(mainIndex); + + for (int itemCount = 0; itemCount < subItemCount; itemCount++) + { + if (IsSubItemChecked(mainIndex, itemCount) == true) + { + checkedCount++; + } + } + + return checkedCount; +} + +bool +_ExpandableListImpl::IsItemExpanded(int mainIndex) const +{ + SysTryReturn(NID_UI_CTRL, (mainIndex >= 0 && mainIndex < GetGroupCount()), false, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. mainIndex = %d", mainIndex); + + if (GetCore().GetFirstDrawnFlag()) + { + Boolean* pIsExpanded = dynamic_cast(const_cast(__groupExpandStateList.GetAt(mainIndex))); + SysTryReturn(NID_UI_CTRL, pIsExpanded, false, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get expanded state at index(%d).", mainIndex); + + return pIsExpanded->ToBool(); + } + + return (GetCore().IsGroupExpanded(mainIndex)); +} + +void +_ExpandableListImpl::OnTableViewItemStateChanged(_TableView& tableView, int itemIndex, _TableViewItem* pItem, TableViewItemStatus status) +{ + return; +} + +void +_ExpandableListImpl::OnTableViewContextItemActivationStateChanged(_TableView& tableView, int itemIndex, _TableViewItem* pContextItem, bool activated) +{ + return; +} + +void +_ExpandableListImpl::OnTableViewItemReordered(_TableView& tableView, int itemIndexFrom, int itemIndexTo) +{ + return; +} + +void +_ExpandableListImpl::OnGroupedTableViewGroupItemStateChanged(_TableView& tableView, int groupIndex, _TableViewItem* pItem, TableViewItemStatus status) +{ + CustomListItem* pCustomListItem = GetCustomListItemAt(groupIndex, -1); + SysTryReturnVoidResult(NID_UI_CTRL, pCustomListItem, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get an item at index(%d).", groupIndex); + + CustomListItemStatus customListItemStatus = CUSTOM_LIST_ITEM_STATUS_NORMAL; + ItemStatus itemStatus = ITEM_HIGHLIGHTED; + + switch (status) + { + case TABLE_VIEW_ITEM_STATUS_SELECTED: + itemStatus = ITEM_SELECTED; + customListItemStatus = CUSTOM_LIST_ITEM_STATUS_SELECTED; + break; + case TABLE_VIEW_ITEM_STATUS_HIGHLIGHTED: + itemStatus = ITEM_HIGHLIGHTED; + customListItemStatus = CUSTOM_LIST_ITEM_STATUS_FOCUSED; + break; + case TABLE_VIEW_ITEM_STATUS_CHECKED: + itemStatus = ITEM_CHECKED; + break; + case TABLE_VIEW_ITEM_STATUS_UNCHECKED: + itemStatus = ITEM_UNCHECKED; + break; + default: + SetLastResult(E_SYSTEM); + return; + } + + LinkedList* pElements = &pCustomListItem->__pCustomListItemImpl->elements; + _ElementBaseModel* pElementBase = null; + + for (int i = 0; i < pElements->GetCount(); i++) + { + pElementBase = dynamic_cast<_ElementBaseModel*>(pElements->GetAt(i)); + SysTryReturnVoidResult(NID_UI_CTRL, (pElementBase != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get valid element at index %d.", i); + + if (pElementBase->_elementType != LIST_ITEM_ELEMENT_TYPE_CHECKBOX) + { + pElementBase->HandleElementEvent(customListItemStatus); + } + } + + if ((!_isDividerEnabled) && (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL)) + { + bool isChecked = false; + isChecked = IsItemChecked(groupIndex); + + if (isChecked) + { + itemStatus = ITEM_UNCHECKED; + } + else + { + itemStatus = ITEM_CHECKED; + } + + SetItemChecked(groupIndex, !isChecked); + } + + ProcessItemStateChange(groupIndex, -1, itemStatus); + + return; +} + + +void +_ExpandableListImpl::OnGroupedTableViewItemStateChanged(_TableView& tableView, int groupIndex, int itemIndex, _TableViewItem* pItem, TableViewItemStatus status) +{ + CustomListItem* pCustomListItem = GetCustomListItemAt(groupIndex, itemIndex); + SysTryReturnVoidResult(NID_UI_CTRL, pCustomListItem, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get an item at groupIndex(%d), itemIndex(%d).", groupIndex, itemIndex); + + CustomListItemStatus customListItemStatus = CUSTOM_LIST_ITEM_STATUS_NORMAL; + ItemStatus itemStatus = ITEM_HIGHLIGHTED; + result r = E_SUCCESS; + + switch (status) + { + case TABLE_VIEW_ITEM_STATUS_SELECTED: + itemStatus = ITEM_SELECTED; + customListItemStatus = CUSTOM_LIST_ITEM_STATUS_SELECTED; + break; + case TABLE_VIEW_ITEM_STATUS_HIGHLIGHTED: + itemStatus = ITEM_HIGHLIGHTED; + customListItemStatus = CUSTOM_LIST_ITEM_STATUS_FOCUSED; + break; + case TABLE_VIEW_ITEM_STATUS_CHECKED: + itemStatus = ITEM_CHECKED; + break; + case TABLE_VIEW_ITEM_STATUS_UNCHECKED: + itemStatus = ITEM_UNCHECKED; + break; + default: + SetLastResult(E_SYSTEM); + break; + } + + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[E_SYSTEM] A system error has occurred. ListItemStatus is invalid"); + + LinkedList* pElements = &pCustomListItem->__pCustomListItemImpl->elements; + _ElementBaseModel* pElementBase = null; + + for (int i = 0; i < pElements->GetCount(); i++) + { + pElementBase = dynamic_cast<_ElementBaseModel*>(pElements->GetAt(i)); + SysTryReturnVoidResult(NID_UI_CTRL, (pElementBase != null), E_SYSTEM, "Invalid element."); + + if (pElementBase->_elementType != LIST_ITEM_ELEMENT_TYPE_CHECKBOX) + { + pElementBase->HandleElementEvent(customListItemStatus); + } + } + + if ((!_isDividerEnabled) && (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL)) + { + bool isChecked = false; + isChecked = IsSubItemChecked(groupIndex, itemIndex); + + if (isChecked) + { + itemStatus = ITEM_UNCHECKED; + } + else + { + itemStatus = ITEM_CHECKED; + } + + SetSubItemChecked(groupIndex, itemIndex, !isChecked); + } + + ProcessItemStateChange(groupIndex, itemIndex, itemStatus); + + return; +} + +void +_ExpandableListImpl::OnGroupedTableViewContextItemActivationStateChanged(_TableView& tableView, int groupIndex, int itemIndex, _TableViewItem* pContextItem, bool activated) +{ + return; +} + +void +_ExpandableListImpl::OnGroupedTableViewItemReordered(_TableView& tableView, int groupIndexFrom, int itemIndexFrom, int groupIndexTo, int itemIndexTo) +{ + return; +} + +void +_ExpandableListImpl::OnSectionTableViewItemStateChanged(_TableView& tableView, int sectionIndex, int itemIndex, _TableViewItem* pItem, TableViewItemStatus status) +{ + return; +} + +void +_ExpandableListImpl::OnSectionTableViewContextItemActivationStateChanged(_TableView& tableView, int sectionIndex, int itemIndex, _TableViewItem* pContextItem, bool activated) +{ + return; +} + +void +_ExpandableListImpl::OnTableViewItemSwept(_TableView& tableView, int groupIndex, int itemIndex, TableViewSweepDirection direction) +{ + return; +} + +void +_ExpandableListImpl::OnTouchPressed (const Control &source, const Point ¤tPosition, const TouchEventInfo &touchInfo) +{ + _ExpandableListArrowBitmap* pArrowIcon = dynamic_cast<_ExpandableListArrowBitmap*>(const_cast(&source)); + + if (pArrowIcon != null) + { + _TableViewGroupItemData* pTableViewGroupItemData = dynamic_cast<_TableViewGroupItemData*>(pArrowIcon->GetParent()); + SysTryReturnVoidResult(NID_UI_CTRL, (pTableViewGroupItemData != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get arrow icon."); + + bool isCustomBitmap = false; + + if (GetCore().IsGroupExpanded(pTableViewGroupItemData->groupIndex)) + { + GetCore().CollapseGroup(pTableViewGroupItemData->groupIndex); + + isCustomBitmap = IS_CUSTOM_BITMAP(LIST::BUTTON_COLLAPSE_GROUP); + if (isCustomBitmap) + { + pArrowIcon->SetBitmap(*__pOpenedPressedImage); + } + else + { + pArrowIcon->SetBitmap(*__pOpenedPressedImage, __pEffectOpenedImage); + } + } + else + { + GetCore().ExpandGroup(pTableViewGroupItemData->groupIndex); + + isCustomBitmap = IS_CUSTOM_BITMAP(LIST::BUTTON_EXPAND_GROUP); + + if (isCustomBitmap) + { + pArrowIcon->SetBitmap(*__pClosedPressedImage); + } + else + { + pArrowIcon->SetBitmap(*__pClosedPressedImage, __pEffectClosedImage); + } + } + + pArrowIcon->Invalidate(true); + } + else + { + _ListBaseImpl::OnTouchPressed(source, currentPosition, touchInfo); + } + return; +} + +void +_ExpandableListImpl::OnTouchReleased (const Control &source, const Point ¤tPosition, const TouchEventInfo &touchInfo) +{ + _ExpandableListArrowBitmap* pArrowIcon = dynamic_cast<_ExpandableListArrowBitmap*>(const_cast(&source)); + + if (pArrowIcon != null) + { + _TableViewGroupItemData* pTableViewGroupItemData = dynamic_cast<_TableViewGroupItemData*>(pArrowIcon->GetParent()); + SysTryReturnVoidResult(NID_UI_CTRL, (pTableViewGroupItemData != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get arrow icon."); + + bool isCustomBitmap = false; + + if (GetCore().IsGroupExpanded(pTableViewGroupItemData->groupIndex)) + { + isCustomBitmap = IS_CUSTOM_BITMAP(LIST::BUTTON_COLLAPSE_GROUP); + if (isCustomBitmap) + { + pArrowIcon->SetBitmap(*__pClosedImage); + } + else + { + pArrowIcon->SetBitmap(*__pClosedImage, __pEffectClosedImage); + } + } + else + { + isCustomBitmap = IS_CUSTOM_BITMAP(LIST::BUTTON_EXPAND_GROUP); + + if (isCustomBitmap) + { + pArrowIcon->SetBitmap(*__pOpenedImage); + } + else + { + pArrowIcon->SetBitmap(*__pOpenedImage, __pEffectOpenedImage); + } + } + + pArrowIcon->Invalidate(true); + } + else + { + _ListBaseImpl::OnTouchReleased(source, currentPosition, touchInfo); + } + return; +} + +void +_ExpandableListImpl::ProcessItemStateChange(int mainIndex, int subIndex, int elementId, ItemStatus itemStatus) +{ + int itemId = -1; + if (subIndex == -1) + { + itemId = GetItemIdAt(mainIndex); + } + else + { + itemId = GetSubItemIdAt(mainIndex, subIndex); + } + + _ListListener* pListenerList = null; + IExpandableItemEventListener* pEventListener = null; + + for (int listenerCount = 0; listenerCount < __itemListenersList.GetCount(); listenerCount++) + { + pListenerList = dynamic_cast<_ListListener*>(__itemListenersList.GetAt(listenerCount)); + SysTryReturnVoidResult(NID_UI_CTRL, (pListenerList != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get ListListener"); + + pEventListener = dynamic_cast(pListenerList->pListener); + SysTryReturnVoidResult(NID_UI_CTRL, (pEventListener != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get EventListener"); + + pEventListener->OnItemStateChanged(GetPublic(), mainIndex, subIndex, itemId, elementId, itemStatus); + } + SetLastResult(E_SUCCESS); + return; +} + +void +_ExpandableListImpl::ProcessItemStateChange(int mainIndex, int subIndex, ItemStatus itemStatus) +{ + int itemId = -1; + if (subIndex == -1) + { + itemId = GetItemIdAt(mainIndex); + } + else + { + itemId = GetSubItemIdAt(mainIndex, subIndex); + } + + _ListListener* pListenerList = null; + IExpandableItemEventListener* pEventListener = null; + + for (int listenerCount = 0; listenerCount < __itemListenersList.GetCount(); listenerCount++) + { + pListenerList = dynamic_cast<_ListListener*>(__itemListenersList.GetAt(listenerCount)); + SysTryReturnVoidResult(NID_UI_CTRL, (pListenerList != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get ListListener"); + + pEventListener = dynamic_cast(pListenerList->pListener); + SysTryReturnVoidResult(NID_UI_CTRL, (pEventListener != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get EventListener"); + + pEventListener->OnItemStateChanged(GetPublic(), mainIndex, subIndex, itemId, itemStatus); + } + SetLastResult(E_SUCCESS); + return; +} + +void +_ExpandableListImpl::OnDraw(void) +{ + if (GetCore().GetFirstDrawnFlag()) + { + _ListBaseImpl::OnDraw(); + + int mainItemCount = GetGroupCount(); + + for (int mainIndex = 0; mainIndex < mainItemCount; mainIndex++) + { + Boolean* pIsExpanded = dynamic_cast(__groupExpandStateList.GetAt(mainIndex)); + SysTryReturnVoidResult(NID_UI_CTRL, pIsExpanded, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get expanded state at index(%d).", mainIndex); + + if (!pIsExpanded->ToBool()) + { + SetItemExpanded(mainIndex, false); + } + } + + GetCore().UpdateTableView(); + } + else + { + _ListBaseImpl::OnDraw(); + } + + return; +} + +void +_ExpandableListImpl::DeleteExpandStateFlag(Object* pObj) +{ + Boolean* pExpanded = null; + pExpanded = dynamic_cast(pObj); + delete pExpanded; + return; +} + +void +_ExpandableListImpl::OnBoundsChanged(void) +{ + int mainCount = GetGroupCount(); + result r = E_SUCCESS; + + for (int mainIndex = 0; mainIndex < mainCount; mainIndex++) + { + _TableViewGroupItemData* pTableViewGroupItemData = GetTableViewGroupItemAt(mainIndex); + SysTryReturnVoidResult(NID_UI_CTRL, pTableViewGroupItemData, E_SYSTEM, "A system error has occurred. Failed to get GroupItemData at %d index.", mainIndex); + + _ExpandableListArrowBitmap* pArrowLabel = dynamic_cast<_ExpandableListArrowBitmap*>(pTableViewGroupItemData->GetControl(ARROW_ELEMENT_NAME)); + + if (pArrowLabel) + { + pTableViewGroupItemData->RemoveControl(*pArrowLabel); + } + + r = CreateArrowIcon(mainIndex); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "A system error has occurred. Failed to Create Arrow Icon at %d index.", mainIndex); + } + + _ListBaseImpl::OnBoundsChanged(); +} + +class _ExpandableListMaker + : public _UiBuilderControlMaker +{ +public: + _ExpandableListMaker(_UiBuilder* uibuilder) + : _UiBuilderControlMaker(uibuilder){}; + virtual ~_ExpandableListMaker(){}; + static _UiBuilderControlMaker* + GetInstance(_UiBuilder* uibuilder) + { + _ExpandableListMaker* pExpandableListMaker = new (std::nothrow) _ExpandableListMaker(uibuilder); + + return pExpandableListMaker; + }; +protected: + virtual Control* + Make(_UiBuilderControl* pControl) + { + result r = E_SYSTEM; + _UiBuilderControlLayout* pControlProperty = null; + ExpandableList* pExpandableList = null; + Rectangle rect; + Rectangle rectMin; + Dimension dimMin; + CustomListStyle style = CUSTOM_LIST_STYLE_NORMAL; + Tizen::Base::String elementString; + bool isItemDivider = true; + Color color; + + GetProperty(pControl, &pControlProperty); + if (pControlProperty == null) + { + return null; + } + + pExpandableList = new (std::nothrow) ExpandableList(); + if (pExpandableList == null) + { + return null; + } + + rect = pControlProperty->GetRect(); + Tizen::Base::String styleString; + styleString = pControlProperty->GetStyle(); + + if (styleString.Equals(L"CUSTOM_LIST_STYLE_NORMAL", false)) + { + style = CUSTOM_LIST_STYLE_NORMAL; + } + else if (styleString.Equals(L"CUSTOM_LIST_STYLE_RADIO", false)) + { + style = CUSTOM_LIST_STYLE_RADIO; + } + else if (styleString.Equals(L"CUSTOM_LIST_STYLE_RADIO_WITH_DIVIDER", false)) + { + style = CUSTOM_LIST_STYLE_RADIO_WITH_DIVIDER; + } + else if (styleString.Equals(L"CUSTOM_LIST_STYLE_MARK", false)) + { + style = CUSTOM_LIST_STYLE_MARK; + } + else if (styleString.Equals(L"CUSTOM_LIST_STYLE_MARK_WITH_DIVIDER", false)) + { + style = CUSTOM_LIST_STYLE_MARK_WITH_DIVIDER; + } + else if (styleString.Equals(L"CUSTOM_LIST_STYLE_ONOFF", false)) + { + style = CUSTOM_LIST_STYLE_ONOFF; + } + else if (styleString.Equals(L"CUSTOM_LIST_STYLE_ONOFF_WITH_DIVIDER", false)) + { + style = CUSTOM_LIST_STYLE_ONOFF_WITH_DIVIDER; + } + else + { + style = CUSTOM_LIST_STYLE_NORMAL; + } + + if (pControl->GetElement(L"itemDivider", elementString)) + { + if (elementString.Equals(L"true", false)) + { + isItemDivider = true; + } + else + { + isItemDivider = false; + } + } + + r = pExpandableList->Construct(rect, style, isItemDivider); + if (r != E_SUCCESS) + { + delete pExpandableList; + return null; + } + + if (pControl->GetElement(L"textOfEmptyList", elementString)) + { + pExpandableList->SetTextOfEmptyList(elementString); + } + + if (pControl->GetElement(L"colorOfEmptyListText", elementString)) + { + ConvertStringToColor(elementString, color); + pExpandableList->SetTextColorOfEmptyList(color); + } + GET_DIMENSION_CONFIG(LIST::LIST_MIN_SIZE, _CONTROL_ORIENTATION_PORTRAIT, dimMin); + rectMin = (pControl->GetAttribute(0))->GetRect(); + (pControl->GetAttribute(0))->SetRect(rectMin.x, rectMin.y, dimMin.width, dimMin.height); + + GET_DIMENSION_CONFIG(LIST::LIST_MIN_SIZE, _CONTROL_ORIENTATION_LANDSCAPE, dimMin); + rectMin = (pControl->GetAttribute(1))->GetRect(); + (pControl->GetAttribute(1))->SetRect(rectMin.x, rectMin.y, dimMin.width, dimMin.height); + + return pExpandableList; + } + +private: +}; + +_ExpandableListRegister::_ExpandableListRegister() +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + + if (pUiBuilderControlTableManager) + { + pUiBuilderControlTableManager->RegisterControl(L"ExpandableList", _ExpandableListMaker::GetInstance); + } +} +_ExpandableListRegister::~_ExpandableListRegister() +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + + if (pUiBuilderControlTableManager) + { + pUiBuilderControlTableManager->UnregisterControl(L"ExpandableList"); + } +} +static _ExpandableListRegister ExpandableListRegisterToUiBuilder; +}}} //Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_FastScroll.cpp b/src/ui/controls/FUiCtrl_FastScroll.cpp new file mode 100644 index 0000000..7eb2b8a --- /dev/null +++ b/src/ui/controls/FUiCtrl_FastScroll.cpp @@ -0,0 +1,341 @@ +// +// 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_FastScroll.cpp + * @brief This is the implementation file for the _FastScroll class. + */ + +#include +#include "FUiCtrl_FastScroll.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Ui::Animations; + +namespace Tizen { namespace Ui { namespace Controls +{ + + +class _FastScrollAccessibilityListener + : public _IAccessibilityListener +{ +public: + _FastScrollAccessibilityListener(_FastScroll* pFastScroll) + : __pFastScroll(pFastScroll) + , __onAccessibility(false) + { + } + + virtual bool OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element){return true;} + virtual bool OnAccessibilityFocusMovedPrevious(const _AccessibilityContainer& control, const _AccessibilityElement& element){return true;} + virtual bool OnAccessibilityReadingElement(const _AccessibilityContainer& control, const _AccessibilityElement& element){return true;} + virtual bool OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element){return true;} + virtual bool OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element){return true;} + virtual bool OnAccessibilityFocusOut(const _AccessibilityContainer& control, const _AccessibilityElement& element){return true;} + virtual bool OnAccessibilityValueIncreased(const _AccessibilityContainer& control, const _AccessibilityElement& element){return true;} + virtual bool OnAccessibilityValueDecreased(const _AccessibilityContainer& control, const _AccessibilityElement& element){return true;} + virtual bool OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element) + { + if (__onAccessibility) + { + __onAccessibility = false; + __pFastScroll->ReleaseTouchCapture(); + } + else + { + __onAccessibility = true; + __pFastScroll->SetTouchCapture(true, false); + } + + _AccessibilityContainer* pAccessibilityContainer = __pFastScroll->GetAccessibilityContainer(); + __pFastScroll->AddAccessibilityElement(*pAccessibilityContainer, __onAccessibility); + + return true; + } + + _FastScroll* __pFastScroll; + bool __onAccessibility; +}; + +_FastScroll::_FastScroll(void) + : __pPresenter(null) + , __pAccessibilityListener(null) +{ +} + +_FastScroll::~_FastScroll(void) +{ + _AccessibilityContainer* pAccessibilityContainer = GetAccessibilityContainer(); + if (pAccessibilityContainer && pAccessibilityContainer->IsActivated()) + { + pAccessibilityContainer->RemoveAllElement(); + } + + delete __pPresenter; + __pPresenter = null; + + delete __pAccessibilityListener; + __pAccessibilityListener = null; +} + +_FastScroll* +_FastScroll::CreateFastScrollN(Tizen::Ui::_Control& parentCtrl, bool enableFadeEffect) +{ + result r = E_SUCCESS; + ClearLastResult(); + + _FastScroll* pFastScroll = new (std::nothrow) _FastScroll(); + 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)); + + return pFastScroll; + +CATCH: + delete pFastScroll; + return null; +} + +result +_FastScroll::SetIndex(_FastScrollIndex* pIndex) +{ + return GetPresenter().SetRootIndex(pIndex); +} + +_FastScrollIndex* +_FastScroll::GetIndex(void) const +{ + return GetPresenter().GetRootIndex(); +} + +result +_FastScroll::UpdateIndex(void) +{ + _AccessibilityContainer* pAccessibilityContainer = GetAccessibilityContainer(); + if (pAccessibilityContainer && pAccessibilityContainer->IsActivated()) + { + GetPresenter().AddAccessibilityElement(*pAccessibilityContainer, false); + } + return GetPresenter().UpdateIndex(); +} + +void +_FastScroll::EnableFadeEffect(bool enable) +{ + if (GetPresenter().IsEnabledFadeEffect() == enable) + { + return; + } + + GetPresenter().EnableFadeEffect(enable); + if (enable) + { + _AccessibilityContainer* pAccessibilityContainer = GetAccessibilityContainer(); + if (pAccessibilityContainer && pAccessibilityContainer->IsActivated()) + { + pAccessibilityContainer->RemoveAllElement(); + } + + delete __pAccessibilityListener; + __pAccessibilityListener = null; + } + else + { + InitializeAccessibility(); + } + +} + +bool +_FastScroll::IsEnabledFadeEffect(void) const +{ + return GetPresenter().IsEnabledFadeEffect(); +} + +bool +_FastScroll::IsOnFadeEffect(void) const +{ + return GetPresenter().IsOnFadeEffect(); +} + +result +_FastScroll::SetScrollVisibility(bool visibility) +{ + return GetPresenter().SetScrollVisibility(visibility); +} + +bool +_FastScroll::GetScrollVisibility(void) const +{ + return GetPresenter().GetScrollVisibility(); +} + +void +_FastScroll::CancelFadeEffect(void) +{ + GetPresenter().CancelFadeEffect(); +} + +result +_FastScroll::InitializeAccessibility(void) +{ + if (unlikely(!(_AccessibilityManager::IsActivated()))) + { + return E_SUCCESS; + } + + if (GetPresenter().IsEnabledFadeEffect()) + { + return E_SUCCESS; + } + + _AccessibilityContainer* pAccessibilityContainer = GetAccessibilityContainer(); + if (pAccessibilityContainer) + { + pAccessibilityContainer->Activate(true); + __pAccessibilityListener = new (std::nothrow) _FastScrollAccessibilityListener(this); + SysTryReturnResult(NID_UI_CTRL, __pAccessibilityListener, E_OUT_OF_MEMORY, "Memory allocation failed."); + + pAccessibilityContainer->AddListener(*__pAccessibilityListener); + } + return E_SUCCESS; +} + +result +_FastScroll::AddAccessibilityElement(const _AccessibilityContainer& control, bool onAccessibility) +{ + return GetPresenter().AddAccessibilityElement(control, onAccessibility); +} + +void +_FastScroll::AddFastScrollEventListener(const Tizen::Ui::Controls::_IUiFastScrollListener& listener) +{ + GetPresenter().AddFastScrollEventListener(listener); +} + +void +_FastScroll::RemoveFastScrollEventListener(const Tizen::Ui::Controls::_IUiFastScrollListener& listener) +{ + GetPresenter().RemoveFastScrollEventListener(listener); +} + +result +_FastScroll::OnAttachedToMainTree(void) +{ + return InitializeAccessibility(); +} + +void +_FastScroll::OnParentBoundsChanged(void) +{ + GetPresenter().OnParentBoundsChanged(); +} + +void +_FastScroll::OnDraw(void) +{ + GetPresenter().OnDraw(); +} + +bool +_FastScroll::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + return GetPresenter().OnTouchPressed(source, touchinfo); +} + +bool +_FastScroll::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + return GetPresenter().OnTouchReleased(source, touchinfo); +} + +bool +_FastScroll::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + return GetPresenter().OnTouchMoved(source, touchinfo); +} + +bool +_FastScroll::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + return GetPresenter().OnTouchCanceled(source, touchinfo); +} + +void +_FastScroll::OnAncestorVisibleStateChanged(const _Control& control) +{ + GetPresenter().OnAncestorVisibleStateChanged(control); +} + +void +_FastScroll::OnAncestorEnableStateChanged(const _Control& control) +{ + GetPresenter().OnAncestorEnableStateChanged(control); +} + +void +_FastScroll::OnAncestorInputEnableStateChanged(const _Control& control) +{ + GetPresenter().OnAncestorInputEnableStateChanged(control); +} + +void +_FastScroll::OnFontChanged(Font* pFont) +{ + GetPresenter().OnFontChanged(pFont); +} + +void +_FastScroll::OnFontInfoRequested(unsigned long& style, float& size) +{ + GetPresenter().OnFontInfoRequested(style, size); +} + +HitTestResult +_FastScroll::HitTest(const Tizen::Graphics::FloatPoint& point) +{ + return GetPresenter().HitTest(point); +} + +result +_FastScroll::Construct(Tizen::Ui::_Control& parentCtrl, bool enableFadeEffect) +{ + _FastScrollPresenter* pPresenter = _FastScrollPresenter::CreateFastScrollPresenterN(parentCtrl, *this, enableFadeEffect); + SysTryReturnResult(NID_UI_CTRL, pPresenter, GetLastResult(), "Propagating."); + + SetPresenter(*pPresenter); + + AcquireHandle(); + + return E_SUCCESS; +} + +void +_FastScroll::SetPresenter(_FastScrollPresenter& fastScrollPresenter) +{ + __pPresenter = &fastScrollPresenter; +} + +_FastScrollPresenter& +_FastScroll::GetPresenter(void) const +{ + return *__pPresenter; +} + +} } } // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_FastScrollEvent.cpp b/src/ui/controls/FUiCtrl_FastScrollEvent.cpp new file mode 100644 index 0000000..30ef661 --- /dev/null +++ b/src/ui/controls/FUiCtrl_FastScrollEvent.cpp @@ -0,0 +1,93 @@ +// +// 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_FastScrollEvent.cpp +* @brief This is the implementation for the _FastScrollEvent class. +*/ + +// includes +#include +#include +#include +#include "FUiCtrl_FastScrollEvent.h" +#include "FUiCtrl_FastScrollEventArg.h" + +// using namespace +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; + +namespace Tizen { namespace Ui { namespace Controls +{ + +const wchar_t* const FAST_SCROLL_SEARCH_ICON_INDEX_STRING = L"[SEARCH_ICON_INDEX]"; + +//////////////////////////////////////////////////////////////////////////////// +/// __ExpandableItemEvent class Lifecycle + +_FastScrollEvent::_FastScrollEvent(void) + : __pSource(null) +{ + // nothing +} + +_FastScrollEvent::~_FastScrollEvent(void) +{ + // nothing +} + +result +_FastScrollEvent::Construct(const Tizen::Ui::Control& source) +{ + result r = _Event::Initialize(); + + // set event source + if (r == E_SUCCESS) + { + __pSource = const_cast (&source); + } + + return r; +} + + +//////////////////////////////////////////////////////////////////////////////// +/// __WindowEvent class Accessor + +const Tizen::Ui::Control* +_FastScrollEvent::GetSource(void) const +{ + return __pSource; +} + +//////////////////////////////////////////////////////////////////////////////// +/// __ExpandableItemEvent class Operation + +void +_FastScrollEvent::FireImpl(IEventListener& listener, const IEventArg& arg) +{ + // cast to IFastScrollListener + IFastScrollListener* pFastScrollListener = dynamic_cast (&listener); + 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, "[%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); +} +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_FastScrollEventArg.cpp b/src/ui/controls/FUiCtrl_FastScrollEventArg.cpp new file mode 100644 index 0000000..55b899d --- /dev/null +++ b/src/ui/controls/FUiCtrl_FastScrollEventArg.cpp @@ -0,0 +1,62 @@ +// +// 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_FastScrollEventArg.cpp +* @brief This is the implementation for the _FastScrollEventArg class. +*/ + +// includes +#include "FUiCtrl_FastScrollEventArg.h" + +// using namespace +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; + +namespace Tizen { namespace Ui { namespace Controls +{ + +//////////////////////////////////////////////////////////////////////////////// +/// __FastScrollEventArg class Lifecycle + +_FastScrollEventArg::_FastScrollEventArg(const Tizen::Ui::Control& source, Tizen::Base::String& index) + : __pSource(const_cast (&source)) + , __index(index) +{ + // nothing +} + +_FastScrollEventArg::~_FastScrollEventArg(void) +{ + // nothing +} + +//////////////////////////////////////////////////////////////////////////////// +/// __ExpandableItemEventArg class Access + +Control* +_FastScrollEventArg::GetSource(void) +{ + return __pSource; +} + +Tizen::Base::String +_FastScrollEventArg::GetIndex(void) +{ + return Tizen::Base::String(__index); +} +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_FastScrollIndex.cpp b/src/ui/controls/FUiCtrl_FastScrollIndex.cpp new file mode 100644 index 0000000..fe7eacf --- /dev/null +++ b/src/ui/controls/FUiCtrl_FastScrollIndex.cpp @@ -0,0 +1,784 @@ +// +// 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_FastScrollIndex.cpp + * @brief This is the implementation file for the _FastScrollIndex class. + */ + +#include +#include +#include +#include "FUiCtrl_FastScrollIndex.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; + +namespace +{ + const char* _DELIMITER = "\n"; +} + +namespace Tizen { namespace Ui { namespace Controls +{ + +_FastScrollIndex::_FastScrollIndex(void) + : __pImage(null) + , __pText(null) + , __pParentIndex(null) + , __pChildIndexList(null) + , __pChildNextIndexList(null) + , __pChildPreviousIndexList(null) + , __pIndexObserver(null) + , __omitted(false) + , __indexType(FAST_SCROLL_INDEX_TYPE_NORMAL) +{ +} + +_FastScrollIndex::~_FastScrollIndex(void) +{ + if (__pIndexObserver) + { + __pIndexObserver->OnIndexDeleted(*this); + } + + if (__pParentIndex) + { + __pParentIndex->RemoveChildIndex(this, false); + __pParentIndex = null; + } + + RemoveChildren(true); + + delete __pImage; + __pImage = null; + + delete __pText; + __pText = null; +} + + +_FastScrollIndex* +_FastScrollIndex::CreateFastScrollIndexN(void) +{ + _FastScrollIndex* pIndex = new (std::nothrow) _FastScrollIndex(); + 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)); + + SetLastResult(E_SUCCESS); + return pIndex; + +CATCH: + delete pIndex; + + return null; +} + +result +_FastScrollIndex::SetIndexText(String* pText) +{ + delete __pText; + __pText = null; + + if (pText) + { + __pText = new (std::nothrow) String(*pText); + SysTryReturnResult(NID_UI_CTRL, __pText, E_OUT_OF_MEMORY, "Memory allocation failed."); + } + + // send the action to _IFastScrollIndexObserver + if (__pIndexObserver) + { + __pIndexObserver->OnIndexDataUpdated(*this); + } + + return E_SUCCESS; +} + +String* +_FastScrollIndex::GetIndexText(void) const +{ + return __pText; +} + +result +_FastScrollIndex::SetIndexImage(Bitmap* pImage) +{ + delete __pImage; + __pImage = null; + + if (pImage) + { + __pImage = _BitmapImpl::CloneN(*pImage); + } + + // send the action to _IFastScrollIndexObserver + if (__pIndexObserver) + { + __pIndexObserver->OnIndexDataUpdated(*this); + } + + return E_SUCCESS; +} + +Bitmap* +_FastScrollIndex::GetIndexImage(void) const +{ + return __pImage; +} + +void +_FastScrollIndex::SetIndexObserver(_IFastScrollIndexObserver* pIndexListener) +{ + __pIndexObserver = pIndexListener; +} + +_IFastScrollIndexObserver* +_FastScrollIndex::GetIndexObserver(void) const +{ + return __pIndexObserver; +} + +result +_FastScrollIndex::SetOmissionIndex(int indexCountMax) +{ + int childCount = GetChildCount(); + _FastScrollIndex* pIndex = null; + + int maxOmissionSlot = (indexCountMax - 1) / 2; + if (maxOmissionSlot < 0) + { + maxOmissionSlot = 0; + } + else if (maxOmissionSlot == 0) + { + maxOmissionSlot = 1; + } + + int omissionCount = childCount - indexCountMax; + int omittedNum = childCount - indexCountMax; + int additionalOmittedNum = 0; + int additionalOmissionStartIndex = 0; + int indexCountMin = 3; + + if (maxOmissionSlot > 0) + { + omittedNum = (omissionCount / maxOmissionSlot) + 1; + additionalOmittedNum = (omissionCount % maxOmissionSlot); + additionalOmissionStartIndex = ((maxOmissionSlot - additionalOmittedNum) / 2); + } + + int i = 0; + int j = 0; + result r = E_SUCCESS; + String omissionText(L"."); + + if ((indexCountMax > indexCountMin) && (indexCountMax % 2) == 0) + { + pIndex = AddChildIndex(GetChildIndex(i), &__childOmittedIndexList); + SysTryReturnResult(NID_UI_CTRL, pIndex, GetLastResult(), "Failed to add child index."); + i++; + j++; + } + + while (i < childCount) + { + if (j < indexCountMax) + { + pIndex = AddChildIndex(GetChildIndex(i), &__childOmittedIndexList); + SysTryReturnResult(NID_UI_CTRL, pIndex, GetLastResult(), "Failed to add child index."); + + i++; + j++; + } + + if (i >= childCount) + { + break; + } + + int omittedCount = omittedNum; + if ((additionalOmissionStartIndex < 0) && (additionalOmittedNum > 0)) + { + omittedCount += 1; + additionalOmittedNum--; + } + + if (omittedCount < 2) + { + if ((i % 2) > 0) + { + additionalOmissionStartIndex--; + } + continue; + } + + pIndex = AddChildIndex(&omissionText, null, &__childOmittedIndexList); + SysTryReturnResult(NID_UI_CTRL, pIndex, GetLastResult(), "Failed to add child index."); + + pIndex->SetOmitted(true); + ArrayList* pList = new (std::nothrow) ArrayList(); + SysTryReturnResult(NID_UI_CTRL, pList, E_OUT_OF_MEMORY, "Memory allocation failed."); + pIndex->SetCurrentIndexList(pList); + + j++; + additionalOmissionStartIndex--; + + for (int k = 0; k < omittedCount; k++) + { + pIndex->AddOmissionChildIndex(GetChildIndex(i + k)); + } + i += omittedCount; + } + SetIndexType(FAST_SCROLL_INDEX_TYPE_OMISSION); + + return r; +} + +_FastScrollIndex* +_FastScrollIndex::AddChildIndex(String* pText, Bitmap* pImage, ArrayList* pIndexList) +{ + _FastScrollIndex* pNewIndex = _FastScrollIndex::CreateFastScrollIndexN(); + SysTryReturn(NID_UI_CTRL, pNewIndex, null, GetLastResult(), + "[%s] Failed to create _FastScrollIndex.", GetErrorMessage(GetLastResult())); + + result r = pNewIndex->SetIndexText(pText); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to set text.", GetErrorMessage(r)); + + pNewIndex->SetIndexImage(pImage); + + return AddChildIndex(pNewIndex, pIndexList); + +CATCH: + delete pNewIndex; + + return null; +} + +_FastScrollIndex* +_FastScrollIndex::AddChildIndex(_FastScrollIndex* pChildIndex, ArrayList* pIndexList) +{ + return AddChildIndex(GetChildCount(pIndexList), pChildIndex, pIndexList); +} + +_FastScrollIndex* +_FastScrollIndex::AddChildIndex(int childOrder, String* pText, Bitmap* pImage, ArrayList* pIndexList) +{ + _FastScrollIndex* pNewIndex = _FastScrollIndex::CreateFastScrollIndexN(); + SysTryReturn(NID_UI_CTRL, pNewIndex, null, GetLastResult(), + "[%s] Failed to create _FastScrollIndex.", GetErrorMessage(GetLastResult())); + + result r = pNewIndex->SetIndexText(pText); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to set text.", GetErrorMessage(r)); + + pNewIndex->SetIndexImage(pImage); + + return AddChildIndex(childOrder, pNewIndex, pIndexList); + +CATCH: + delete pNewIndex; + + return null; +} + +_FastScrollIndex* +_FastScrollIndex::AddChildIndex(int childOrder, _FastScrollIndex* pChildIndex, ArrayList* pIndexList) +{ + 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) + { + pList = pIndexList; + } + else + { + if (__pChildIndexList == null) + { + __pChildIndexList = new (std::nothrow) ArrayList(); + SysTryReturn(NID_UI_CTRL, __pChildIndexList, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + } + + pList = __pChildIndexList; + } + + if (pList->GetCount() <= childOrder) + { + childOrder = GetChildCount(pList); + } + + pList->InsertAt(*pChildIndex, childOrder); + pChildIndex->SetParentIndex(this); + + if (__pIndexObserver) + { + __pIndexObserver->OnChildIndexAttached(*this, childOrder, *pChildIndex); + } + + return pChildIndex; +} + +void +_FastScrollIndex::AddOmissionChildIndex(_FastScrollIndex* pChildIndex) +{ + if (GetOmitted() == false) + { + return; + } + + SysTryReturnVoidResult(NID_UI_CTRL, pChildIndex, E_INVALID_ARG, + "[%s] Invalid argument is used. pChildIndex is null.", GetErrorMessage(E_INVALID_ARG)); + SysTryReturnVoidResult(NID_UI_CTRL, __pChildIndexList, E_INVALID_ARG, + "[%s] Invalid argument is used. pChildIndexList is null.", GetErrorMessage(E_INVALID_ARG)); + + __pChildIndexList->InsertAt(*pChildIndex, GetChildCount()); +} + +result +_FastScrollIndex::AddChildTextIndexArray(int childOrder, const wchar_t* pTextIndexArray, int textLenth, int indexCount) +{ + result r = E_SUCCESS; + + String* pIndexText = null; + + 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; + int j = 0; + int k = childOrder; + + _FastScrollIndex* pIndex = null; + ArrayList* pChildIndexList = null; + ArrayList* pFormerList = null; + ArrayList* pFirstIndexList = GetCurrentIndexList(); + if (pFirstIndexList == null) + { + pFirstIndexList = new (std::nothrow) ArrayList(); + SysTryCatch(NID_UI_CTRL, pFirstIndexList, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + SetCurrentIndexList(pFirstIndexList); + } + pChildIndexList = pFirstIndexList; + + for (i = 0; i < indexCount; i++) + { + for (j = 0; j < textLenth; j++) + { + pTempChar[j] = pTextIndexArray[(i * textLenth) + j]; + } + pTempChar[j] = 0; + + 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 pIndexText; + pIndexText = null; + + pFormerList = pChildIndexList; + _FastScrollIndex* pFormerIndex = null; + + pChildIndexList = new (std::nothrow) ArrayList(); + 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); + SysTryCatchLabel(NID_UI_CTRL, pFormerIndex, , CATCH1, GetLastResult(), "[%s] Failed to get the child index.", GetErrorMessage(GetLastResult())); + pFormerIndex->SetNextIndexList(pChildIndexList); + continue; + } + + pIndex = AddChildIndex(k, pIndexText, null, pChildIndexList); + SysTryCatch(NID_UI_CTRL, pIndex, , GetLastResult(), "[%s] Failed to add child index.", GetErrorMessage(GetLastResult())); + + if (k == 0 && pFormerList) + { + pIndex->SetPreviousIndexList(pFormerList); + pFormerList = null; + } + k++; + + delete pIndexText; + pIndexText = null; + } + + if (pChildIndexList) + { + pChildIndexList = pFirstIndexList; + int childCount = GetChildCount(pChildIndexList); + pIndex = GetChildIndex(childCount - 1, pChildIndexList); + SysTryCatch(NID_UI_CTRL, pIndex, , GetLastResult(), + "[%s] Failed to get the child index.", GetErrorMessage(GetLastResult())); + ArrayList* pNextIndexList = pIndex->GetNextIndexList(); + int i = 0; + while(pNextIndexList) + { + //next last index to previous last index + pIndex->SetNextIndexList(null); + pIndex = GetChildIndex(GetChildCount(pNextIndexList) - 1, pNextIndexList); + SysTryCatch(NID_UI_CTRL, pIndex, , GetLastResult(), + "[%s] Failed to get the child index.", GetErrorMessage(GetLastResult())); + pIndex = AddChildIndex(childCount, pIndex->GetIndexText(), null, pChildIndexList); + SysTryCatch(NID_UI_CTRL, pIndex, , GetLastResult(), "[%s] Failed to add child index.", GetErrorMessage(GetLastResult())); + pIndex->SetNextIndexList(pNextIndexList); + + //next first index to previous first index + pIndex = GetChildIndex(0, pNextIndexList); + SysTryCatch(NID_UI_CTRL, pIndex, , GetLastResult(), + "[%s] Failed to get the child index.", GetErrorMessage(GetLastResult())); + pIndex->SetPreviousIndexList(null); + + pIndex = GetChildIndex(i, pChildIndexList); + SysTryCatch(NID_UI_CTRL, pIndex, , GetLastResult(), + "[%s] Failed to get the child index.", GetErrorMessage(GetLastResult())); + pIndex = AddChildIndex(0, pIndex->GetIndexText(), null, pNextIndexList); + SysTryCatch(NID_UI_CTRL, pIndex, , GetLastResult(), "[%s] Failed to add child index.", GetErrorMessage(GetLastResult())); + pIndex->SetPreviousIndexList(pChildIndexList); + if (i == 0) + { + i++; + } + + //NEXT language set + pChildIndexList = pNextIndexList; + childCount = GetChildCount(pChildIndexList); + pIndex = GetChildIndex(childCount - 1, pChildIndexList); + SysTryCatch(NID_UI_CTRL, pIndex, , GetLastResult(), + "[%s] Failed to get the child index.", GetErrorMessage(GetLastResult())); + pNextIndexList = pIndex->GetNextIndexList(); + } + } + + delete[] pTempChar; + return E_SUCCESS; + +CATCH1: + delete pChildIndexList; + pChildIndexList = null; + +CATCH: + delete pIndexText; + pIndexText = null; + delete[] pTempChar; + + return r; +} + +result +_FastScrollIndex::RemoveChildIndex(int childOrder, bool destroy, ArrayList* pIndexList) +{ + _FastScrollIndex* pIndex = GetChildIndex(childOrder, pIndexList); + SysTryReturnResult(NID_UI_CTRL, pIndex, GetLastResult(), "Failed to get the child index."); + + return RemoveChildIndex(pIndex, destroy, pIndexList); +} + +result +_FastScrollIndex::RemoveChildIndex(_FastScrollIndex* pChildIndex, bool destroy, ArrayList* pIndexList) +{ + int detachedOrder = 0; + ArrayList* pList = __pChildIndexList; + + if (pIndexList) + { + pList = pIndexList; + } + + if (pList == null) + { + return E_SUCCESS; + } + + pList->IndexOf(*pChildIndex, detachedOrder); + + if (destroy == true) + { + pList->Remove(*pChildIndex, true); + } + else + { + pList->Remove(*pChildIndex, false); + pChildIndex->SetParentIndex(null); + } + + if (__pIndexObserver) + { + __pIndexObserver->OnChildIndexDetached(*this, detachedOrder, *pChildIndex); + } + + return E_SUCCESS; +} + +void +_FastScrollIndex::RemoveChildren(bool destroy, ArrayList* pIndexList) +{ + RemoveOmissionChildren(destroy); + ArrayList* pList = __pChildIndexList; + + if (pIndexList) + { + pList = pIndexList; + } + + if (pList == null) + { + return; + } + + int childrenCount = pList->GetCount(); + _FastScrollIndex* pIndex = (GetChildIndex(childrenCount - 1)); + if (pIndex) + { + ArrayList* nextIndexList = pIndex->GetNextIndexList(); + if (GetOmitted() == false && nextIndexList) + { + RemoveChildren(destroy, nextIndexList); + pIndex->SetNextIndexList(null); + } + } + + for (int i = childrenCount-1; i >= 0; i--) + { + pList->RemoveAt(i, destroy); + } + + delete pList; + if (pIndexList) + { + pIndexList = null; + } + else + { + __pChildIndexList = null; + } +} + +result +_FastScrollIndex::RemoveOmissionChildren(bool destroy) +{ + int childrenCount = __childOmittedIndexList.GetCount(); + + if (childrenCount <= 0) + { + return E_SUCCESS; + } + + for (int i = childrenCount-1; i >= 0; i--) + { + _FastScrollIndex* pIndex = GetChildIndex(i, &__childOmittedIndexList); + SysTryReturnResult(NID_UI_CTRL, pIndex, GetLastResult(), "Failed to get the child index."); + + if (pIndex->GetOmitted()) + { + pIndex->RemoveChildren(false); + + __childOmittedIndexList.RemoveAt(i, true); + } + else + { + __childOmittedIndexList.RemoveAt(i, false); + } + } + SetIndexType(FAST_SCROLL_INDEX_TYPE_NORMAL); + + return E_SUCCESS; +} + +void +_FastScrollIndex::SetParentIndex(_FastScrollIndex* pParent) +{ + __pParentIndex = pParent; +} + +_FastScrollIndex* +_FastScrollIndex::GetParentIndex(void) const +{ + return __pParentIndex; +} + +_FastScrollIndex* +_FastScrollIndex::GetChildIndex(int childOrder, bool omitted) const +{ + ArrayList* pIndexList = __pChildIndexList; + if (omitted && __childOmittedIndexList.GetCount() > 0) + { + pIndexList = const_cast (&__childOmittedIndexList); + } + + return GetChildIndex(childOrder, pIndexList); +} + +_FastScrollIndex* +_FastScrollIndex::GetChildIndex(int childOrder, ArrayList* pIndexList) const +{ + if (pIndexList == null) + { + return null; + } + + Object* pChildIndex = const_cast (pIndexList->GetAt(childOrder)); + SysTryReturn(NID_UI_CTRL, pChildIndex, null, GetLastResult(), "[%s] Failed to get the child index.", + GetErrorMessage(GetLastResult())); + + return dynamic_cast <_FastScrollIndex*>(pChildIndex); +} + +int +_FastScrollIndex::GetChildOrder(const _FastScrollIndex* pChildIndex, bool omitted) const +{ + ArrayList* pIndexList = __pChildIndexList; + if (omitted && __childOmittedIndexList.GetCount() > 0) + { + pIndexList = const_cast (&__childOmittedIndexList); + } + + return GetChildOrder(pChildIndex, pIndexList); +} + +int +_FastScrollIndex::GetChildOrder(const _FastScrollIndex* pChildIndex, ArrayList* pIndexList) const +{ + if (pIndexList == null) + { + return 0; + } + + int childIndex = -1; + pIndexList->IndexOf(*pChildIndex, childIndex); + + return childIndex; +} + +int +_FastScrollIndex::GetChildCount(bool omitted) const +{ + ArrayList* pIndexList = __pChildIndexList; + if (omitted) + { + pIndexList = const_cast (&__childOmittedIndexList); + } + + return GetChildCount(pIndexList); +} + +int +_FastScrollIndex::GetChildCount(ArrayList* pIndexList) const +{ + if (pIndexList == null) + { + return 0; + } + + return pIndexList->GetCount(); +} + +int +_FastScrollIndex::GetIndexOrder(bool omitted) const +{ + if (__pParentIndex) + { + return __pParentIndex->GetChildOrder(this, omitted); + } + else + { + return -1; + } +} + +int +_FastScrollIndex::GetIndexOrder(ArrayList* pIndexList) const +{ + if (__pParentIndex) + { + return __pParentIndex->GetChildOrder(this, pIndexList); + } + else + { + return -1; + } +} + +void +_FastScrollIndex::SetIndexType(_FastScrollIndexType type) +{ + __indexType = type; +} + +_FastScrollIndexType +_FastScrollIndex::GetIndexType(void) const +{ + return __indexType; +} + +void +_FastScrollIndex::SetCurrentIndexList(ArrayList* pList) +{ + __pChildIndexList = pList; +} + +ArrayList* +_FastScrollIndex::GetCurrentIndexList(void) const +{ + return __pChildIndexList; +} + +void +_FastScrollIndex::SetNextIndexList(ArrayList* pList) +{ + __pChildNextIndexList = pList; +} + +ArrayList* +_FastScrollIndex::GetNextIndexList(void) const +{ + return __pChildNextIndexList; +} + +void +_FastScrollIndex::SetPreviousIndexList(ArrayList* pList) +{ + __pChildPreviousIndexList = pList; +} + +ArrayList* +_FastScrollIndex::GetPreviousIndexList(void) const +{ + return __pChildPreviousIndexList; +} + +void +_FastScrollIndex::SetOmitted(bool omitted) +{ + __omitted = omitted; +} + +bool +_FastScrollIndex::GetOmitted(void) const +{ + return __omitted; +} + +result +_FastScrollIndex::Construct(void) +{ + return E_SUCCESS; +} + +} } } // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_FastScrollIndexNode.cpp b/src/ui/controls/FUiCtrl_FastScrollIndexNode.cpp new file mode 100644 index 0000000..70bc3a2 --- /dev/null +++ b/src/ui/controls/FUiCtrl_FastScrollIndexNode.cpp @@ -0,0 +1,110 @@ +// +// 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_FastScrollIndexNode.cpp + * @brief This is the implementation file for the _FastScrollIndexNode class. + */ + +#if 0 + +#include +#include +#include "FUiCtrl_FastScrollIndexNode.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +// Lifecycle +_FastScrollIndexNode::_FastScrollIndexNode(int indexLength) + : __indexLength(indexLength) + , __indexWidth(0) + , __indexHeight(0) + , __indexOmitted(false) + , __indexOmitPriority(true) + , __indexText(null) +{ +} + +_FastScrollIndexNode::~_FastScrollIndexNode(void) +{ +} + +void +_FastScrollIndexNode::SetIndexNodeWidth(int indexWdith) +{ + __indexWidth = indexWdith; +} + +int +_FastScrollIndexNode::GetIndexNodeWidth(void) const +{ + return __indexWidth; +} + +void +_FastScrollIndexNode::SetIndexNodeHeight(int indexHeight) +{ + __indexHeight = indexHeight; +} + +int +_FastScrollIndexNode::GetIndexNodeHeight(void) const +{ + return __indexHeight; +} + +void +_FastScrollIndexNode::SetIndexNodeOmitted(bool indexOmitted) +{ + __indexOmitted = indexOmitted; +} + +bool +_FastScrollIndexNode::GetIndexNodeOmitted(void) const +{ + return __indexOmitted; +} + +void +_FastScrollIndexNode::SetIndexNodeText(wchar_t* indexText) +{ + __indexText.clear(); + + for (int i = 0; i < __indexLength; i++) + { + __indexText.push_back(*(indexText + i)); + } +} + +void +_FastScrollIndexNode::GetIndexNodeText(wchar_t* indexText) +{ + for (int i = 0; i < (int) __indexText.size(); i++) + { + *(indexText + i) = __indexText[i]; + } +} + +int +_FastScrollIndexNode::GetIndexNodeLength(void) const +{ + return __indexText.size(); +} + +} } } // Tizen::Ui::Controls +#endif diff --git a/src/ui/controls/FUiCtrl_FastScrollModel.cpp b/src/ui/controls/FUiCtrl_FastScrollModel.cpp new file mode 100644 index 0000000..aa4b641 --- /dev/null +++ b/src/ui/controls/FUiCtrl_FastScrollModel.cpp @@ -0,0 +1,78 @@ +// +// 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_FastScrollModel.cpp + * @brief This is the implementation file for the _FastScrollModel class. + */ + +#include +#include "FUiCtrl_FastScrollModel.h" + +namespace Tizen { namespace Ui { namespace Controls +{ +_FastScrollModel::_FastScrollModel(void) + : __visibleIndexNodeCount(0) + , __pRootIndex(null) +{ +} + +_FastScrollModel::~_FastScrollModel(void) +{ + delete __pRootIndex; + __pRootIndex = null; +} + +_FastScrollModel* +_FastScrollModel::CreateFastScrollModelN(void) +{ + _FastScrollModel* pModel = new (std::nothrow) _FastScrollModel(); + 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)); + + SetLastResult(E_SUCCESS); + return pModel; + +CATCH: + delete pModel; + + return null; +} + +result +_FastScrollModel::SetRootIndex(_FastScrollIndex* pIndex) +{ + __pRootIndex = pIndex; + + return E_SUCCESS; +} + +_FastScrollIndex* +_FastScrollModel::GetRootIndex(void) const +{ + return __pRootIndex; +} + +result +_FastScrollModel::Construct(void) +{ + return E_SUCCESS; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_FastScrollPresenter.cpp b/src/ui/controls/FUiCtrl_FastScrollPresenter.cpp new file mode 100644 index 0000000..ec869b0 --- /dev/null +++ b/src/ui/controls/FUiCtrl_FastScrollPresenter.cpp @@ -0,0 +1,3249 @@ +// +// 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_FastScrollPresenter.cpp + * @brief This is the implementation file for the _FastScrollPresenter class. + */ +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "FGrp_TextTextObject.h" +#include +#include "FUiAnim_VisualElement.h" +#include "FUi_Control.h" +#include "FUi_UiTouchEvent.h" +#include "FUi_ResourceManager.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_Math.h" +#include "FUiCtrl_IFastScrollListener.h" +#include "FUiCtrl_UiFastScrollEvent.h" +#include "FUiCtrl_UiFastScrollEventArg.h" +#include "FUiCtrl_FastScroll.h" +#include "FUiCtrl_FastScrollPresenter.h" +#include "FUiCtrl_FastScrollModel.h" +#include "FUiCtrl_FastScrollIndex.h" + +#include "FUiAnim_MatrixUtil.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Animations; +using namespace Tizen::Graphics::_Text; + +namespace +{ +const float FASTSCROLL_OPACITY_ON = 1.0f; +const float FASTSCROLL_OPACITY_SELECTEDBG_DIM = 0.5f; +const float FASTSCROLL_OPACITY_LIGHT_DIM = 0.3f; +const float FASTSCROLL_OPACITY_OFF = 0.0f; +const int FASTSCROLL_POPUPINDEX_COUNT = 3; +} + +namespace Tizen { namespace Ui { namespace Controls +{ + +_FastScrollViewConfig::_FastScrollViewConfig(void) + : __indexBgColor(Color::GetColor(COLOR_ID_BLACK)) + , __indexHighlightColor(Color::GetColor(COLOR_ID_BLACK)) + , __indexLineColor(Color::GetColor(COLOR_ID_BLACK)) + , __indexSelectedLineColor(Color::GetColor(COLOR_ID_BLACK)) + , __indexTextColor(Color::GetColor(COLOR_ID_BLACK)) + , __indexDividerColor(Color::GetColor(COLOR_ID_BLACK)) + , __selectedIndexBgColor(Color::GetColor(COLOR_ID_BLACK)) + , __selectedIndexTextColor(Color::GetColor(COLOR_ID_BLACK)) + , __popupBgColor(Color::GetColor(COLOR_ID_BLACK)) + , __popupTextColor(Color::GetColor(COLOR_ID_BLACK)) + , __indexSizeMin(0.0f, 0.0f) + , __popupSize(0.0f, 0.0f) + , __indexMarginTop(0.0f) + , __indexGap(0.0f) + , __indexLeftLineThickness(0.0f) + , __indexTextSize(0.0f) + , __indexSeparatorThickness(0.0f) + , __indexSeparatorWidth(0.0f) + , __selectedIndexMarginRight(0.0f) + , __selectedIndexHeight(0.0f) + , __popupWidthIncrement(0.0f) + , __popupTextSize(0.0f) + , __popupShadowRight(0.0f) + , __popupShadowBottom(0.0f) + , __pIndexBgBitmap(null) + , __pSelectedIndexBgBitmap(null) + , __pSelectedIndexlineBitmap(null) + , __pPopupBgBitmap(null) + , __pPopupBgEffectBitmap(null) + , __pFont(null) + , __ignoreTouchEvent(false) +{ +} + +_FastScrollViewConfig::~_FastScrollViewConfig(void) +{ + ReleaseResources(); +} + +_FastScrollViewConfig* +_FastScrollViewConfig::CreateFastScrollViewConfigN(_ControlOrientation orientation) +{ + _FastScrollViewConfig* pConfig = new (std::nothrow) _FastScrollViewConfig(); + 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)); + + SetLastResult(E_SUCCESS); + return pConfig; + +CATCH: + delete pConfig; + + return null; +} + +result +_FastScrollViewConfig::ReloadConfig(_ControlOrientation orientation) +{ + result r = E_SUCCESS; + + // 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_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_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_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_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, "[%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, "[%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, "[%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, "[%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, "[%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, "[%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, "[%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, "[%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, "[%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, "[%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, "[%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, "[%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, "[%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, "[%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, "[%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, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); + + return E_SUCCESS; + +CATCH: + __indexBgColor = Color::GetColor(COLOR_ID_BLACK); + __indexHighlightColor = Color::GetColor(COLOR_ID_BLACK); + __indexLineColor= Color::GetColor(COLOR_ID_BLACK); + __indexSelectedLineColor= Color::GetColor(COLOR_ID_BLACK); + __indexTextColor = Color::GetColor(COLOR_ID_BLACK); + __indexDividerColor= Color::GetColor(COLOR_ID_BLACK); + __selectedIndexBgColor = Color::GetColor(COLOR_ID_BLACK); + __selectedIndexTextColor = Color::GetColor(COLOR_ID_BLACK); + __popupBgColor = Color::GetColor(COLOR_ID_BLACK); + __popupTextColor = Color::GetColor(COLOR_ID_BLACK); + + __indexSizeMin.SetSize(0.0f, 0.0f); + __popupSize.SetSize(0.0f, 0.0f); + + __indexMarginTop = 0.0f; + __indexGap = 0.0f; + __indexLeftLineThickness = 0.0f; + __indexTextSize = 0.0f; + __indexSeparatorThickness = 0.0f; + __indexSeparatorWidth = 0.0f; + __selectedIndexMarginRight = 0.0f; + __selectedIndexHeight = 0.0f; + __popupWidthIncrement = 0.0f; + __popupTextSize = 0.0f; + __popupShadowRight = 0.0f; + __popupShadowBottom = 0.0f; + __ignoreTouchEvent = false; + ReleaseResources(); + + return E_SYSTEM; +} + +void +_FastScrollViewConfig::ReleaseResources(void) +{ + delete __pIndexBgBitmap; + delete __pSelectedIndexBgBitmap; + delete __pSelectedIndexlineBitmap; + delete __pPopupBgBitmap; + delete __pPopupBgEffectBitmap; + + __pIndexBgBitmap = null; + __pSelectedIndexBgBitmap = null; + __pSelectedIndexlineBitmap = null; + __pPopupBgBitmap = null; + __pPopupBgEffectBitmap = null; +} + +result +_FastScrollViewConfig::Construct(_ControlOrientation orientation) +{ + return ReloadConfig(orientation); +} + + +_FastScrollIndexView::_FastScrollIndexView(_VisualElement& parentVe, _FastScrollViewConfig& viewConfig) + : __parentVe(parentVe) + , __viewConfig(viewConfig) + , __pBaseIndex(null) + , __pSelectedIndex(null) + , __pSelectedIndexInOmittedIndex(null) + , __pFormerIndex(null) + , __pBaseIndexVe(null) + , __pSelectedBgVe(null) + , __pSelectedIndexVe(null) + , __needUpdateBaseIndex(false) + , __needUpdateSelectedIndex(false) + , __needDestroySelf(false) +{ +} + +_FastScrollIndexView::~_FastScrollIndexView(void) +{ + if (__pSelectedIndexVe) + { + __pSelectedIndexVe->RemoveAllAnimations(); + __pSelectedIndexVe->SetAnimationProvider(null); + + __pSelectedIndexVe->Destroy(); + __pSelectedIndexVe = null; + } + + if (__pSelectedBgVe) + { + __pSelectedBgVe->RemoveAllAnimations(); + __pSelectedBgVe->SetAnimationProvider(null); + + __pSelectedBgVe->Destroy(); + __pSelectedBgVe = null; + } + + if (__pBaseIndexVe) + { + __pBaseIndexVe->RemoveAllAnimations(); + __pBaseIndexVe->SetAnimationProvider(null); + + __pBaseIndexVe->Destroy(); + __pBaseIndexVe = null; + } +} + +_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, "[%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)); + + SetLastResult(E_SUCCESS); + return pIndexView; + +CATCH: + delete pIndexView; + + return null; +} + +result +_FastScrollIndexView::FadeOutAndDestroy(void) +{ + __needDestroySelf = true; + if (__pSelectedIndexVe) + { + __pSelectedIndexVe->RemoveAllAnimations(); + } + + if (__pSelectedBgVe) + { + __pSelectedBgVe->RemoveAllAnimations(); + } + + return SetIndexVisibility(false); +} + +result +_FastScrollIndexView::SetBaseIndex(_FastScrollIndex* pIndex) +{ + if (__pBaseIndex == pIndex) + { + return E_SUCCESS; + } + + __pBaseIndex = pIndex; + + result r = UpdateIndex(false); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to update the index view."); + + return E_SUCCESS; +} + +_FastScrollIndex* +_FastScrollIndexView::GetBaseIndex(void) const +{ + return __pBaseIndex; +} + +result +_FastScrollIndexView::SetIndexBounds(const FloatRectangle& indexBounds) +{ + SysTryReturnResult(NID_UI_CTRL, __pSelectedIndexVe, E_INVALID_STATE, "__pSelectedIndexVe must not be null."); + + FloatRectangle veBounds(indexBounds.x, indexBounds.y, indexBounds.width, indexBounds.height); + __pBaseIndexVe->SetBounds(veBounds); + + __needUpdateBaseIndex = true; + + veBounds.x = 0.0f; + veBounds.y = 0.0f; + __pSelectedIndexVe->SetBounds(veBounds); + + __needUpdateSelectedIndex = true; + + return E_SUCCESS; +} + +Rectangle +_FastScrollIndexView::GetIndexBounds(void) const +{ + FloatRectangle veBounds = __pBaseIndexVe->GetBounds(); + return Rectangle(veBounds.x, veBounds.y, veBounds.width, veBounds.height); +} + +FloatRectangle +_FastScrollIndexView::GetIndexBoundsF(void) const +{ + return __pBaseIndexVe->GetBounds(); +} + +_FastScrollIndex* +_FastScrollIndexView::GetIndexAtPoint(const FloatPoint& point) const +{ + 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, "[%s] The index has no children.", GetErrorMessage(E_INVALID_STATE)); + + _FastScrollIndex* pChildIndex = null; + + FloatRectangle bounds = __pBaseIndexVe->GetBounds(); + if (bounds.Contains(point) == true) + { + float touchY = point.y - bounds.y - __viewConfig.__indexMarginTop; + float indexHeight = GetIndexHeight(); + int indexOrder = 0; + + if (!(_FloatCompare(touchY, 0.0f) || _FloatCompare(indexHeight, 0.0f))) + { + indexOrder = _CoordinateSystemUtils::ConvertToInteger(touchY / indexHeight); + } + + pChildIndex = __pBaseIndex->GetChildIndex(indexOrder, true); + SysTryReturn(NID_UI_CTRL, pChildIndex, null, GetLastResult(), "[%s] Failed to get the child index.", + GetErrorMessage(GetLastResult())); + } + + SetLastResult(E_SUCCESS); + return pChildIndex; +} + +_FastScrollIndex* +_FastScrollIndexView::GetOmissionIndexAtPoint(_FastScrollIndex* pIndex, const FloatPoint& point) const +{ + 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, "[%s] Failed to get the hidden index", GetErrorMessage(E_INVALID_STATE)); + float indexHeight = GetIndexHeight() /hiddenChildCount; + int omissionIndexOrder = 0; + + if ((touchY > 0.0f) && !_FloatCompare(indexHeight, 0.0f)) + { + omissionIndexOrder = _CoordinateSystemUtils::ConvertToInteger(touchY / indexHeight); + } + + _FastScrollIndex* pChildIndex = pIndex->GetChildIndex(omissionIndexOrder); + SysTryReturn(NID_UI_CTRL, pChildIndex, null, GetLastResult(), "[%s] Failed to get the child index.", + GetErrorMessage(GetLastResult())); + + SetLastResult(E_SUCCESS); + return pChildIndex; +} + +float +_FastScrollIndexView::GetIndexHeight(void) const +{ + FloatRectangle bounds = __pBaseIndexVe->GetBounds(); + float indexHeight = __viewConfig.__indexSizeMin.height; + + if (__pBaseIndex->GetParentIndex() == null) + { + float indexHeightPerChild = (bounds.height - __viewConfig.__indexMarginTop * 2.0f) / (__pBaseIndex->GetChildCount(__pBaseIndex->GetIndexType())); + if (indexHeight < indexHeightPerChild) + { + indexHeight = indexHeightPerChild; + } + } + + return indexHeight; +} + +result +_FastScrollIndexView::SelectIndex(int indexOrder) +{ + result r = E_SUCCESS; + + SysTryReturnResult(NID_UI_CTRL, __pBaseIndex, E_INVALID_STATE, "__pBaseIndex must not be null."); + + _FastScrollIndex* pIndex = __pBaseIndex->GetChildIndex(indexOrder, true); + SysTryReturnResult(NID_UI_CTRL, pIndex, GetLastResult(), "Failed to get the child index."); + + r = SelectIndex(pIndex, false); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to select the index."); + + return E_SUCCESS; +} + +result +_FastScrollIndexView::SelectIndex(_FastScrollIndex* pIndex, bool animation) +{ + result r = E_SUCCESS; + + if (__pSelectedIndex == pIndex) + { + return E_SUCCESS; + } + + __pSelectedIndex = pIndex; + + if (__pSelectedIndex) + { + __pSelectedBgVe->SetBounds(CalculateSelectedBg()); + if (GetSelectedIndexVisibility() == false) + { + r = SetSelectedIndexVisibility(true, animation); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set visibility of the Selected Bg ve."); + } + } + else + { + if (GetSelectedIndexVisibility() == true) + { + r = SetSelectedIndexVisibility(false, animation); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set visibility of the Selected Bg ve."); + } + SetSelectedIndexInOmittedIndex(null); + __pFormerIndex = null; + } + + r = UpdateIndex(false); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to update the index view."); + + return E_SUCCESS; +} + +void +_FastScrollIndexView::SelectIndexList(bool isNext) +{ + FloatMatrix4 baseVeMatrix; + baseVeMatrix.SetAsIdentity(); + FloatRectangle bounds = __pBaseIndexVe->GetBounds(); + + if (isNext) + { + _MatrixUtilTranslate(baseVeMatrix, 0.0f, bounds.height, 0.0f); + } + else + { + _MatrixUtilTranslate(baseVeMatrix, 0.0f, -bounds.height, 0.0f); + } + __pBaseIndexVe->SetTransformMatrix(baseVeMatrix); + __pBaseIndexVe->SetImplicitAnimationEnabled(true); + + baseVeMatrix.SetAsIdentity(); + _MatrixUtilTranslate(baseVeMatrix, 0.0f, 0.0f, 0.0f); + __pBaseIndexVe->SetTransformMatrix(baseVeMatrix); + + __pBaseIndexVe->SetImplicitAnimationEnabled(false); + __needUpdateBaseIndex = true; +} + + +int +_FastScrollIndexView::GetSelectedIndexOrder(void) const +{ + 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); +} + +void +_FastScrollIndexView::SetSelectedIndex(_FastScrollIndex* pIndex) +{ + __pSelectedIndex = pIndex; +} + +_FastScrollIndex* +_FastScrollIndexView::GetSelectedIndex(void) const +{ + return __pSelectedIndex; +} + +void +_FastScrollIndexView::SetSelectedIndexInOmittedIndex(_FastScrollIndex* pIndex) +{ + if (pIndex == __pSelectedIndexInOmittedIndex) + { + return; + } + + __pFormerIndex = __pSelectedIndexInOmittedIndex; + __pSelectedIndexInOmittedIndex = pIndex; +} + +_FastScrollIndex* +_FastScrollIndexView::GetSelectedIndexInOmittedIndex(void) const +{ + return __pSelectedIndexInOmittedIndex; +} + +_FastScrollIndex* +_FastScrollIndexView::GetFormerIndex(void) const +{ + return __pFormerIndex; +} + +bool +_FastScrollIndexView::IsOnAnimation(void) const +{ + return false; +} + +void +_FastScrollIndexView::RemoveAllAnimations(void) +{ + __pBaseIndexVe->RemoveAllAnimations(); +} + +result +_FastScrollIndexView::SetIndexVisibility(bool visibility) +{ + result r = E_SUCCESS; + + __pBaseIndexVe->SetImplicitAnimationEnabled(true); + + if (visibility) + { + __pBaseIndexVe->SetOpacity(FASTSCROLL_OPACITY_ON); + } + else + { + __pBaseIndexVe->SetOpacity(FASTSCROLL_OPACITY_OFF); + } + // else keep up current visibility. + + __pBaseIndexVe->SetImplicitAnimationEnabled(false); + + return r; +} + +bool +_FastScrollIndexView::GetIndexVisibility(void) const +{ + float opacity = __pBaseIndexVe->GetOpacity(); + if (opacity > FASTSCROLL_OPACITY_OFF) + { + return true; + } + else + { + return false; + } +} + +result +_FastScrollIndexView::SetSelectedIndexVisibility(bool visibility, bool animation) +{ + SysTryReturnResult(NID_UI_CTRL, __pSelectedIndexVe, E_INVALID_STATE, "__pSelectedIndexVe must not be null."); + SysTryReturnResult(NID_UI_CTRL, __pSelectedBgVe, E_INVALID_STATE, "__pSelectedBgVe must not be null."); + + if (animation) + { + __pSelectedIndexVe->SetImplicitAnimationEnabled(true); + __pSelectedBgVe->SetImplicitAnimationEnabled(true); + } + + if (visibility) + { + __pSelectedIndexVe->SetOpacity(FASTSCROLL_OPACITY_ON); + __pSelectedBgVe->SetOpacity(FASTSCROLL_OPACITY_SELECTEDBG_DIM); + } + else + { + __pSelectedIndexVe->SetOpacity(FASTSCROLL_OPACITY_OFF); + __pSelectedBgVe->SetOpacity(FASTSCROLL_OPACITY_OFF); + } + // else keep up current visibility. + + __pSelectedIndexVe->SetImplicitAnimationEnabled(false); + __pSelectedBgVe->SetImplicitAnimationEnabled(false); + + return E_SUCCESS; +} + +bool +_FastScrollIndexView::GetSelectedIndexVisibility(void) const +{ + 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) + { + return true; + } + + return false; +} + + +result +_FastScrollIndexView::AddAccessibilityElement(const _AccessibilityContainer& control) +{ + 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."); + + FloatRectangle bounds = __pBaseIndexVe->GetBounds(); + float indexHeight = GetIndexHeight(); + FloatRectangle indexRect(bounds.x, __viewConfig.__indexMarginTop, bounds.width, indexHeight); + int nonOmittedIndex = 0; + + _AccessibilityElement* pAccessibilityElement = null; + result r = E_SUCCESS; + for (int i = 0; i < omittedChildCount;) + { + _FastScrollIndex* pChildIndex = __pBaseIndex->GetChildIndex(i, true); + SysTryReturnResult(NID_UI_CTRL, pChildIndex, GetLastResult(), "Failed to get the child index."); + + int omittedCount = 0; + if (pChildIndex->GetOmitted()) + { + omittedCount = pChildIndex->GetChildCount(); + pChildIndex = __pBaseIndex->GetChildIndex(nonOmittedIndex, false); + SysTryReturnResult(NID_UI_CTRL, pChildIndex, GetLastResult(), "Failed to get the child index."); + } + + Bitmap* pChildIndexImage = pChildIndex->GetIndexImage(); + if (pChildIndexImage == null) + { + String* pChildIndexText = pChildIndex->GetIndexText(); + SysTryReturnResult(NID_UI_CTRL, pChildIndexText, E_INVALID_STATE, "pChildIndexText must not be null."); + + _AccessibilityContainer* pAccessibilityContainer = const_cast <_AccessibilityContainer*>(&control); + pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true); + SysTryReturnResult(NID_UI_CTRL, pAccessibilityElement, E_OUT_OF_MEMORY, "Memory allocation failed."); + pAccessibilityElement->SetBounds(indexRect); + pAccessibilityElement->SetLabel(*pChildIndexText); + pAccessibilityElement->SetName(L"FastScrollIndex"); + 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)); + } + + if (omittedCount > 1) + { + omittedCount--; + } + else + { + indexRect.y += indexHeight; + i++; + } + + nonOmittedIndex++; + } + + return E_SUCCESS; + +CATCH: + delete pAccessibilityElement; + return r; +} + +result +_FastScrollIndexView::UpdateIndex(bool bNeedUpdateBaseIndex) +{ + result r = E_SUCCESS; + + r = __parentVe.InvalidateRectangle(null); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to invalidate the index Ve."); + + if (__pSelectedIndex) + { + __needUpdateSelectedIndex = true; + } + + if (bNeedUpdateBaseIndex) + { + __needUpdateBaseIndex = true; + } + + return E_SUCCESS; +} + +void +_FastScrollIndexView::OnDraw(void) +{ + DrawBaseIndex(); + if (__pSelectedIndex) + { + DrawSelectedBg(); + DrawSelectedIndex(); + } +} + +VisualElementAnimation* +_FastScrollIndexView::CreateAnimationForProperty(VisualElement& target, const String& property) +{ + VisualElementAnimation* pAnimation = VisualElementAnimationProvider::CreateAnimationForProperty(target, property); + + if (pAnimation) + { + const IVisualElementAnimationTimingFunction* pTimingFunction = VisualElementAnimation::GetTimingFunctionByName("EaseInOut"); + if (pTimingFunction) + { + pAnimation->SetTimingFunction(pTimingFunction); + } + pAnimation->SetVisualElementAnimationStatusEventListener(this); + } + return pAnimation; +} + +void +_FastScrollIndexView::OnVisualElementAnimationStarted(const VisualElementAnimation& animation, const String& keyName, VisualElement& target) +{ +} + +void +_FastScrollIndexView::OnVisualElementAnimationRepeated(const VisualElementAnimation& animation, const String& keyName, VisualElement& target, long currentRepeatCount) +{ +} + +void +_FastScrollIndexView::OnVisualElementAnimationFinished(const VisualElementAnimation& animation, const String& keyName, VisualElement& target, bool completedNormally) +{ + if (__pBaseIndexVe == (static_cast <_VisualElement*>(&target))) + { + if (__needDestroySelf && completedNormally) + { + if (__pSelectedIndexVe) + { + __pSelectedIndexVe->RemoveAllAnimations(); + __pSelectedIndexVe->SetAnimationProvider(null); + } + + if (__pSelectedBgVe) + { + __pSelectedBgVe->RemoveAllAnimations(); + __pSelectedBgVe->SetAnimationProvider(null); + } + + __pBaseIndexVe->RemoveAllAnimations(); + __pBaseIndexVe->SetAnimationProvider(null); + + delete this; + } + else if (__viewConfig.__ignoreTouchEvent) + { + __viewConfig.__ignoreTouchEvent = false; + } + } +} + +FloatRectangle +_FastScrollIndexView::CalculateSelectedBg(void) +{ + SysTryReturn(NID_UI_CTRL, __pBaseIndex, FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f), E_INVALID_STATE, + "[%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, + "[%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, + "[%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, "[%s] The index has no children.", GetErrorMessage(E_INVALID_STATE)); + + FloatRectangle bounds = __pBaseIndexVe->GetBounds(); + float indexHeight = GetIndexHeight(); + int selectedIndexOrder = GetSelectedIndexOrder(); + FloatRectangle selectedRect(0.0f, 0.0f, (bounds.width - __viewConfig.__selectedIndexMarginRight), __viewConfig.__selectedIndexHeight); + + if (_FloatCompare(bounds.height, __viewConfig.__selectedIndexHeight) || (bounds.height < __viewConfig.__selectedIndexHeight)) + { + selectedRect.height = bounds.height; + } + else + { + selectedRect.y = ((selectedIndexOrder * indexHeight) + __viewConfig.__indexMarginTop); + if (indexHeight < __viewConfig.__selectedIndexHeight) + { + selectedRect.y -= ((__viewConfig.__selectedIndexHeight - indexHeight) / 2.0f); + } + else + { + selectedRect.height = indexHeight; + } + + if (selectedRect.y < 0.0f) + { + selectedRect.y = 0.0f; + } + } + + return selectedRect; +} + +void +_FastScrollIndexView::DrawBaseIndex() +{ + if (!__needUpdateBaseIndex) + { + return; + } + 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, "[%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.", + GetErrorMessage(GetLastResult())); + + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + + pCanvas->SetLineWidth(__viewConfig.__indexSeparatorThickness); + pCanvas->SetForegroundColor(__viewConfig.__indexLineColor); + + + FloatRectangle bounds = __pBaseIndexVe->GetBounds(); + float indexHeight = GetIndexHeight(); + + FloatRectangle bgBounds(0.0f, 0.0f, bounds.width, bounds.height); + if (__viewConfig.__pIndexBgBitmap) + { + DrawBitmap(*pCanvas, bgBounds, *__viewConfig.__pIndexBgBitmap); + } + pCanvas->DrawLine(FloatPoint(1.0f, 0.0f), FloatPoint(1.0f, bounds.height)); + + FloatRectangle indexRect(0.0f, __viewConfig.__indexMarginTop, bounds.width, indexHeight); + Bitmap* pReplacementColorBitmap = null; + 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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + pTextObject->Construct(); + + for (int i = 0; i < childCount; i++) + { + TextSimple* pSimpleText = null; + + _FastScrollIndex* pChildIndex = __pBaseIndex->GetChildIndex(i, true); + SysTryCatch(NID_UI_CTRL, pChildIndex, , GetLastResult(), "[%s] Failed to get the child index.", + GetErrorMessage(GetLastResult())); + + Bitmap* pChildIndexImage = pChildIndex->GetIndexImage(); + if (pChildIndexImage) + { + FloatRectangle imageRect = indexRect; + float scaleFactor = indexRect.width / pChildIndexImage->GetWidthF(); + float heightScaleFactor = indexRect.height / pChildIndexImage->GetHeightF(); + if (scaleFactor > heightScaleFactor) + { + scaleFactor = heightScaleFactor; + } + + imageRect.width = pChildIndexImage->GetWidthF() * scaleFactor + FASTSCROLL_OPACITY_SELECTEDBG_DIM; + imageRect.height = pChildIndexImage->GetHeightF() * scaleFactor + FASTSCROLL_OPACITY_SELECTEDBG_DIM; + + if (indexRect.width - imageRect.width > 0.0f) + { + imageRect.x = indexRect.x + (indexRect.width - imageRect.width) / 2.0f; + } + + if (indexRect.height - imageRect.height > 0.0f) + { + imageRect.y = indexRect.y + (indexRect.height - imageRect.height) / 2.0f; + } + + pReplacementColorBitmap = + _BitmapImpl::GetColorReplacedBitmapN(*pChildIndexImage, + Color::GetColor(COLOR_ID_MAGENTA), __viewConfig.__indexTextColor); + r = DrawBitmap(*pCanvas, imageRect, *pReplacementColorBitmap, + FloatRectangle(0.0f, 0.0f, pChildIndexImage->GetWidthF(), pChildIndexImage->GetHeightF())); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to draw a bitmap.", GetErrorMessage(r)); + + delete pReplacementColorBitmap; + pReplacementColorBitmap = null; + } + else + { + String* pChildIndexText = pChildIndex->GetIndexText(); + 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, "[%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)); + + r = pTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_WORD); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to set wrap.", GetErrorMessage(r)); + + r = pTextObject->SetFont(__viewConfig.__pFont, 0, pTextObject->GetTextLength()); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to set font.", GetErrorMessage(r)); + + r = pTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_CENTER | TEXT_OBJECT_ALIGNMENT_MIDDLE); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to set alignment.", GetErrorMessage(r)); + + r = pTextObject->SetBounds(indexRect); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to set bounds of pTextObject.", GetErrorMessage(r)); + + r = pTextObject->SetForegroundColor(__viewConfig.__indexTextColor, 0, pTextObject->GetTextLength()); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to set foreground color.", GetErrorMessage(r)); + + r = pTextObject->Draw(*_CanvasImpl::GetInstance(*pCanvas)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to draw text.", GetErrorMessage(r)); + + } + + indexRect.y += indexHeight; + if (i != (childCount - 1)) + { + pCanvas->SetForegroundColor(__viewConfig.__indexDividerColor); + pCanvas->DrawLine(FloatPoint(separatorX, indexRect.y + __viewConfig.__indexSeparatorThickness), + FloatPoint(__viewConfig.__indexSeparatorWidth, indexRect.y + __viewConfig.__indexSeparatorThickness)); + } + } + + __needUpdateBaseIndex = false; + //fall through +CATCH: + delete pTextObject; + delete pCanvas; + delete pReplacementColorBitmap; +} + +void +_FastScrollIndexView::DrawSelectedBg() +{ + if (!__needUpdateSelectedIndex) + { + return; + } + + SysTryReturnVoidResult(NID_UI_CTRL, __pSelectedIndex, E_INVALID_STATE, + "[%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.", + GetErrorMessage(GetLastResult())); + + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + + FloatRectangle bounds = __pSelectedBgVe->GetBounds(); + bounds.y = 0.0f; + + if (__viewConfig.__pSelectedIndexBgBitmap) + { + DrawBitmap(*pCanvas, bounds, *__viewConfig.__pSelectedIndexBgBitmap); + } + + delete pCanvas; +} + +void +_FastScrollIndexView::DrawSelectedIndex() +{ + if (!__needUpdateSelectedIndex) + { + return; + } + + 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.", + GetErrorMessage(GetLastResult())); + + result r = E_SUCCESS; + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + FloatRectangle bounds = __pSelectedIndexVe->GetBounds(); + FloatRectangle outlineBounds = __pSelectedBgVe->GetBounds(); + + pCanvas->SetLineWidth(__viewConfig.__indexLeftLineThickness); + pCanvas->SetForegroundColor(__viewConfig.__indexSelectedLineColor); + + if (__viewConfig.__pSelectedIndexlineBitmap) + { + 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)); + } + + //draw text + TextObject* pTextObject = null; + TextSimple* pSimpleText = null; + + float indexHeight = GetIndexHeight(); + FloatRectangle indexRect(0.0f, ((GetSelectedIndexOrder() * indexHeight) + __viewConfig.__indexMarginTop), + bounds.width, indexHeight); + + Bitmap* pChildIndexImage = __pSelectedIndex->GetIndexImage(); + Bitmap* pReplacementColorBitmap = null; + if (pChildIndexImage) + { + FloatRectangle imageRect = indexRect; + float scaleFactor = indexRect.width / pChildIndexImage->GetWidthF(); + float heightScaleFactor = indexRect.height / pChildIndexImage->GetHeightF(); + if (scaleFactor > heightScaleFactor) + { + scaleFactor = heightScaleFactor; + } + + imageRect.width = pChildIndexImage->GetWidthF() * scaleFactor + FASTSCROLL_OPACITY_SELECTEDBG_DIM; + imageRect.height = pChildIndexImage->GetHeightF() * scaleFactor + FASTSCROLL_OPACITY_SELECTEDBG_DIM; + + if (indexRect.width - imageRect.width > 0.0f) + { + imageRect.x = indexRect.x + (indexRect.width - imageRect.width) / 2.0f; + } + + if (indexRect.height - imageRect.height > 0.0f) + { + imageRect.y = indexRect.y + (indexRect.height - imageRect.height) / 2.0f; + } + + pReplacementColorBitmap = + _BitmapImpl::GetColorReplacedBitmapN(*pChildIndexImage, + Color::GetColor(COLOR_ID_MAGENTA), __viewConfig.__selectedIndexTextColor); + r = DrawBitmap(*pCanvas, imageRect, *pReplacementColorBitmap, + FloatRectangle(0.0f, 0.0f, pChildIndexImage->GetWidthF(), pChildIndexImage->GetHeightF())); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to draw a bitmap.", GetErrorMessage(r)); + + delete pReplacementColorBitmap; + pReplacementColorBitmap = null; + } + else + { + String* pChildIndexText = __pSelectedIndex->GetIndexText(); + 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, "[%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, "[%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)); + + r = pTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_WORD); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to set wrap.", GetErrorMessage(r)); + + r = pTextObject->SetFont(__viewConfig.__pFont, 0, pTextObject->GetTextLength()); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to set font.", GetErrorMessage(r)); + + r = pTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_CENTER | TEXT_OBJECT_ALIGNMENT_MIDDLE); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to set alignment.", GetErrorMessage(r)); + + r = pTextObject->SetBounds(indexRect); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to set bounds of pTextObject.", GetErrorMessage(r)); + + r = pTextObject->SetForegroundColor(__viewConfig.__selectedIndexTextColor, 0, pTextObject->GetTextLength()); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to set foreground color.", GetErrorMessage(r)); + + r = pTextObject->Draw(*_CanvasImpl::GetInstance(*pCanvas)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to draw text.", GetErrorMessage(r)); + + } + __needUpdateSelectedIndex = false; + + //fall through +CATCH: + delete pTextObject; + delete pCanvas; + delete pReplacementColorBitmap; +} + +result +_FastScrollIndexView::DrawBitmap(Canvas& canvas, const FloatRectangle& bounds, const Bitmap& bitmap) +{ + result r = E_SUCCESS; + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(bitmap)) + { + r = canvas.DrawNinePatchedBitmap(bounds, bitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to draw ninepathced bitmap"); + } + else + { + r = canvas.DrawBitmap(bounds, bitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to draw bitmap"); + } + + return E_SUCCESS; +} + +result +_FastScrollIndexView::DrawBitmap(Canvas& canvas, const FloatRectangle& srcRect, const Bitmap& bitmap, const FloatRectangle& dstRect) +{ + result r = E_SUCCESS; + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(bitmap)) + { + r = canvas.DrawNinePatchedBitmap(srcRect, bitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to draw ninepathced bitmap"); + } + else + { + r = canvas.DrawBitmap(srcRect, bitmap, dstRect); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to draw bitmap"); + } + + return E_SUCCESS; +} + +result +_FastScrollIndexView::Construct(void) +{ + result r = E_SUCCESS; + + // FormattedText for Title text + __pBaseIndexVe = new (std::nothrow) _VisualElement(); + 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)); + + __pBaseIndexVe->SetAnimationProvider(this); + + r = __pBaseIndexVe->SetSurfaceOpaque(false); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to set the opaque of the base index ve.", GetErrorMessage(r)); + + __pBaseIndexVe->SetImplicitAnimationEnabled(false); + + r = __parentVe.AttachChild(*__pBaseIndexVe); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to attach the base index ve to the parent.", GetErrorMessage(r)); + + __pBaseIndexVe->SetShowState(true); + + //__pSelectedBgVe + __pSelectedBgVe = new (std::nothrow) _VisualElement(); + 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)); + + __pSelectedBgVe->SetAnimationProvider(this); + + r = __pSelectedBgVe->SetSurfaceOpaque(false); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to set the opaque of the selected Bg ve.", GetErrorMessage(r)); + + __pSelectedBgVe->SetImplicitAnimationEnabled(false); + + r = __pBaseIndexVe->AttachChild(*__pSelectedBgVe); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to attach the selected Bg ve to the parent.", GetErrorMessage(r)); + + __pSelectedBgVe->SetOpacity(FASTSCROLL_OPACITY_SELECTEDBG_DIM); + + __pSelectedBgVe->SetShowState(true); + + //__pSelectedIndexVe + __pSelectedIndexVe = new (std::nothrow) _VisualElement(); + 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)); + + __pSelectedIndexVe->SetAnimationProvider(this); + + r = __pSelectedIndexVe->SetSurfaceOpaque(false); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to set the opaque of the selected index ve.", GetErrorMessage(r)); + + __pSelectedIndexVe->SetImplicitAnimationEnabled(false); + + r = __pBaseIndexVe->AttachChild(*__pSelectedIndexVe); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to attach the selected index ve to the parent.", GetErrorMessage(r)); + + __pSelectedIndexVe->SetShowState(true); + + return E_SUCCESS; + +CATCH: + if (__pSelectedIndexVe) + { + __pSelectedIndexVe->Destroy(); + __pSelectedIndexVe = null; + } + + if (__pSelectedBgVe) + { + __pSelectedBgVe->Destroy(); + __pSelectedBgVe = null; + } + + if (__pBaseIndexVe) + { + __pBaseIndexVe->Destroy(); + __pBaseIndexVe = null; + } + + return r; +} + +_FastScrollPopupView::_FastScrollPopupView(_VisualElement& parentVe, _FastScrollViewConfig& viewConfig) + : __parentVe(parentVe) + , __viewConfig(viewConfig) + , __pPopupVe(null) + , __needUpdatePopupVe(false) + , __needUpdatePopupIndexVe(false) + , __needDestroySelf(false) +{ +} + +_FastScrollPopupView::~_FastScrollPopupView(void) +{ + for (int i = 0; i < GetIndexVeCount(); i++) + { + _VisualElement* pIndexVe = GetIndexVe(i); + + if (pIndexVe) + { + pIndexVe->RemoveAllAnimations(); + pIndexVe->SetAnimationProvider(null); + pIndexVe->Destroy(); + } + } + __indexViews.RemoveAll(false); + + if (__pPopupVe) + { + __pPopupVe->RemoveAllAnimations(); + __pPopupVe->SetAnimationProvider(null); + + __pPopupVe->Destroy(); + __pPopupVe = null; + } +} + +_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, "[%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)); + + SetLastResult(E_SUCCESS); + return pPopupView; + +CATCH: + delete pPopupView; + + return null; +} + +result +_FastScrollPopupView::FadeOutAndDestroy(void) +{ + __needDestroySelf = true; + + for (int i = 0; i < GetIndexVeCount(); i++) + { + _VisualElement* pIndexVe = GetIndexVe(i); + SysTryReturnResult(NID_UI_CTRL, pIndexVe, GetLastResult(), "Failed to get the popup index view."); + + pIndexVe->RemoveAllAnimations(); + } + + return SetPopupVisibility(false); +} + +result +_FastScrollPopupView::SelectIndex(int indexLevel, _FastScrollIndex* pIndex, _FastScrollIndex* pFormerIndex) +{ + _VisualElement* pIndexVe = GetIndexVe(indexLevel); + SysTryReturnResult(NID_UI_CTRL, pIndexVe, GetLastResult(), "Failed to get the popup index view."); + + if (pIndex) + { + pIndexVe->SetOpacity(FASTSCROLL_OPACITY_ON); + FloatRectangle popupVeBounds = __pPopupVe->GetBounds(); + FloatMatrix4 popupVeMatrix; + popupVeMatrix.SetAsIdentity(); + + if (pFormerIndex && (pFormerIndex != pIndex)) + { + FloatRectangle popupIndexVeBounds = pIndexVe->GetBounds(); + + int selectedOrder = pIndex->GetIndexOrder(false); + int oldOrder = pFormerIndex->GetIndexOrder(false); + + if (selectedOrder > oldOrder) + { + _MatrixUtilTranslate(popupVeMatrix, 0.0f, 0.0f, 0.0f); + } + else + { + _MatrixUtilTranslate(popupVeMatrix, 0.0f, -(popupVeBounds.height * (FASTSCROLL_POPUPINDEX_COUNT - 1)), 0.0f); + } + pIndexVe->SetTransformMatrix(popupVeMatrix); + pIndexVe->SetImplicitAnimationEnabled(true); + + popupVeMatrix.SetAsIdentity(); + _MatrixUtilTranslate(popupVeMatrix, 0.0f, -popupVeBounds.height, 0.0f); + pIndexVe->SetTransformMatrix(popupVeMatrix); + + pIndexVe->SetImplicitAnimationEnabled(false); + } + else + { + _MatrixUtilTranslate(popupVeMatrix, 0.0f, -popupVeBounds.height, 0.0f); + pIndexVe->SetTransformMatrix(popupVeMatrix); + } + } + else + { + pIndexVe->SetOpacity(FASTSCROLL_OPACITY_LIGHT_DIM); + } + + return E_SUCCESS; +} + +result +_FastScrollPopupView::AddPopupIndexVe(int indexLevel) +{ + result r = E_SUCCESS; + _VisualElement* pPopupIndexVe = new (std::nothrow) _VisualElement(); + 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)); + + pPopupIndexVe->SetAnimationProvider(this); + + r = pPopupIndexVe->SetSurfaceOpaque(false); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to set the opaque of the popup index ve.", GetErrorMessage(r)); + + pPopupIndexVe->SetImplicitAnimationEnabled(false); + + r = __pPopupVe->AttachChild(*pPopupIndexVe); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to attach the popup index ve to the popup ve.", GetErrorMessage(r)); + + pPopupIndexVe->SetShowState(true); + + r = __indexViews.InsertAt(*pPopupIndexVe, indexLevel); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to change the last index view.", GetErrorMessage(r)); + + return E_SUCCESS; + +CATCH: + if (pPopupIndexVe) + { + pPopupIndexVe->RemoveAllAnimations(); + pPopupIndexVe->SetAnimationProvider(null); + + pPopupIndexVe->Destroy(); + } + + return r; +} + +result +_FastScrollPopupView::RemovePopupIndexVe(int indexLevel) +{ + result r = E_SUCCESS; + + if (indexLevel < GetIndexVeCount()) + { + _VisualElement* pIndexVe = GetIndexVe(indexLevel); + SysTryReturnResult(NID_UI_CTRL, pIndexVe, GetLastResult(), "Failed to get the popup index ve."); + + r = __indexViews.Remove(*pIndexVe, false); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to remove the popup index ve."); + + pIndexVe->RemoveAllAnimations(); + pIndexVe->SetAnimationProvider(null); + pIndexVe->Destroy(); + } + + return E_SUCCESS; +} + +result +_FastScrollPopupView::SetPopupBounds(const FloatRectangle& indexBounds) +{ + SysTryReturnResult(NID_UI_CTRL, __pPopupVe, E_INVALID_STATE, "__pPopupVe must not be null."); + + __pPopupVe->SetBounds(indexBounds); + + return E_SUCCESS; +} + +result +_FastScrollPopupView::SetPopupIndexBounds(int indexLevel, const _FastScrollIndex* pBaseIndex) +{ + FloatRectangle veBounds = __pPopupVe->GetBounds(); + _VisualElement* pIndexVe = GetIndexVe(indexLevel); + SysTryReturnResult(NID_UI_CTRL, pIndexVe, GetLastResult(), "Failed to get the popup index view."); + + if (pBaseIndex) + { + veBounds.x = 0.0f; + veBounds.y = 0.0f; + veBounds.height = veBounds.height * FASTSCROLL_POPUPINDEX_COUNT; + } + + int indexVeCount = GetIndexVeCount(); + float indexWidth = veBounds.width; + if (indexVeCount > 0) + { + indexWidth /= indexVeCount; + } + + veBounds.width = indexWidth; + veBounds.x = veBounds.width * indexLevel; + + pIndexVe->SetBounds(veBounds); + + return E_SUCCESS; +} + +_VisualElement* +_FastScrollPopupView::GetIndexVe(int indexLevel) const +{ + Object* pObj = const_cast(__indexViews.GetAt(indexLevel)); + SysTryReturn(NID_UI_CTRL, pObj, null, GetLastResult(), "[%s] Failed to get the popup index ve.", + GetErrorMessage(GetLastResult())); + + return dynamic_cast<_VisualElement*>(pObj); +} + +int +_FastScrollPopupView::GetIndexVeCount(void) const +{ + return __indexViews.GetCount(); +} + +bool +_FastScrollPopupView::IsOnAnimation(void) const +{ + return false; +} + +void +_FastScrollPopupView::RemoveAllAnimations(void) +{ + SysTryReturnVoidResult(NID_UI_CTRL, __pPopupVe, E_INVALID_STATE, "[%s] __pPopupVe must not be null.", GetErrorMessage(E_INVALID_STATE)); + __pPopupVe->RemoveAllAnimations(); +} + +result +_FastScrollPopupView::SetPopupVisibility(bool visibility) +{ + SysTryReturnResult(NID_UI_CTRL, __pPopupVe, E_INVALID_STATE, "__pPopupVe must not be null."); + + if (visibility) + { + __pPopupVe->SetTransformMatrix(__matrixFadeInStart); + __pPopupVe->SetImplicitAnimationEnabled(true); + __pPopupVe->SetOpacity(FASTSCROLL_OPACITY_ON); + __pPopupVe->SetTransformMatrix(__matrixOrigin); + __pPopupVe->SetImplicitAnimationEnabled(false); + } + else + { + __pPopupVe->SetImplicitAnimationEnabled(true); + __pPopupVe->SetOpacity(FASTSCROLL_OPACITY_OFF); + __pPopupVe->SetTransformMatrix(__matrixFadeOutEnd); + __pPopupVe->SetImplicitAnimationEnabled(false); + } + // else keep up current visibility. + + return E_SUCCESS; +} + +bool +_FastScrollPopupView::GetPopupVisibility(void) const +{ + 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) + { + return true; + } + + return false; +} + +void +_FastScrollPopupView::SetPopupVeUpdateNeeded(bool needUpdate) +{ + __needUpdatePopupIndexVe = needUpdate; +} + +result +_FastScrollPopupView::UpdateIndex(void) +{ + SysTryReturnResult(NID_UI_CTRL, __pPopupVe, E_INVALID_STATE, "__pPopupVe must not be null."); + + result r = E_SUCCESS; + + r = __parentVe.InvalidateRectangle(null); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to invalidate the popup Ve."); + + __needUpdatePopupIndexVe = true; + + return E_SUCCESS; +} + +void +_FastScrollPopupView::OnDraw(int indexLevel, const _FastScrollIndex* pBaseIndex, const _FastScrollIndex* pSelectedIndex) +{ + DrawPopupVe(); + DrawPopupIndexVe(indexLevel, pBaseIndex, pSelectedIndex); +} + +VisualElementAnimation* +_FastScrollPopupView::CreateAnimationForProperty(VisualElement& target, const String& property) +{ + VisualElementAnimation* pAnimation = VisualElementAnimationProvider::CreateAnimationForProperty(target, property); + + if (pAnimation) + { + const IVisualElementAnimationTimingFunction* pTimingFunction = VisualElementAnimation::GetTimingFunctionByName("EaseInOut"); + if (pTimingFunction) + { + pAnimation->SetTimingFunction(pTimingFunction); + } + pAnimation->SetVisualElementAnimationStatusEventListener(this); + } + return pAnimation; +} + +void +_FastScrollPopupView::OnVisualElementAnimationStarted(const VisualElementAnimation& animation, const String& keyName, VisualElement& target) +{ +} + +void +_FastScrollPopupView::OnVisualElementAnimationRepeated(const VisualElementAnimation& animation, const String& keyName, VisualElement& target, long currentRepeatCount) +{ +} + +void +_FastScrollPopupView::OnVisualElementAnimationFinished(const VisualElementAnimation& animation, const String& keyName, VisualElement& target, bool completedNormally) +{ + 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) + { + for (int i = 0; i < GetIndexVeCount(); i++) + { + _VisualElement* pIndexVe = GetIndexVe(i); + if (pIndexVe) + { + pIndexVe->RemoveAllAnimations(); + pIndexVe->SetAnimationProvider(null); + } + } + + __pPopupVe->RemoveAllAnimations(); + __pPopupVe->SetAnimationProvider(null); + + delete this; + } + } +} + +void +_FastScrollPopupView::DrawPopupVe(void) +{ + if (!__needUpdatePopupVe) + { + return; + } + + 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.", + GetErrorMessage(GetLastResult())); + + FloatRectangle bounds = __pPopupVe->GetBounds(); + bounds.SetPosition(0.0f, 0.0f); + + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + bool isCustomBitmap = IS_CUSTOM_BITMAP(FASTSCROLL::POPUP_BG_NORMAL); + + if (__viewConfig.__pPopupBgEffectBitmap && isCustomBitmap == false) + { + DrawBitmap(*pCanvas, bounds, *__viewConfig.__pPopupBgEffectBitmap); + } + + if (__viewConfig.__pPopupBgBitmap) + { + DrawBitmap(*pCanvas, bounds, *__viewConfig.__pPopupBgBitmap); + } + + delete pCanvas; + + __needUpdatePopupVe = false; +} + + +void +_FastScrollPopupView::DrawPopupIndexVe(int indexLevel, const _FastScrollIndex* pBaseIndex, const _FastScrollIndex* pSelectedIndex) +{ + if (__needUpdatePopupIndexVe != true) + { + return; + } + + 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, "[%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.", + GetErrorMessage(GetLastResult())); + + Canvas* pCanvas = pIndexVe->GetCanvasN(); + SysTryReturnVoidResult(NID_UI_CTRL, pCanvas, GetLastResult(), "[%s] Failed to get the canvas of the popup index ve.", + GetErrorMessage(GetLastResult())); + + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + + FloatRectangle veBounds = pIndexVe->GetBounds(); + FloatRectangle bounds(veBounds.x, veBounds.y, veBounds.width, veBounds.height); + + float indexHeight = bounds.height / FASTSCROLL_POPUPINDEX_COUNT; + if (indexHeight < __viewConfig.__indexTextSize) + { + indexHeight = __viewConfig.__indexTextSize; + } + + FloatRectangle indexRect(0.0f, 0.0f, bounds.width, indexHeight); + int selectedOrder = pSelectedIndex->GetIndexOrder(false); + Bitmap* pReplacementColorBitmap = null; + + TextObject* pTextObject = new (std::nothrow) TextObject(); + SysTryCatch(NID_UI_CTRL, pTextObject, , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + pTextObject->Construct(); + + for (int i = -1; i < 2; i++) + { + TextSimple* pSimpleText = null; + + _FastScrollIndex* pChildIndex = pBaseIndex->GetChildIndex(selectedOrder + i); + if (pChildIndex) + { + Bitmap* pChildIndexImage = pChildIndex->GetIndexImage(); + if (pChildIndexImage) + { + FloatRectangle imageRect = indexRect; + float scaleFactor = indexRect.width / pChildIndexImage->GetWidthF(); + float heightScale = indexRect.height / pChildIndexImage->GetHeightF(); + float rectHeight = indexRect.height; + if (rectHeight > __viewConfig.__popupTextSize) + { + rectHeight = __viewConfig.__popupTextSize; + } + + if (scaleFactor > heightScale) + { + scaleFactor = heightScale; + } + imageRect.width = pChildIndexImage->GetWidthF() * scaleFactor; + imageRect.height = pChildIndexImage->GetHeightF() * scaleFactor; + + if (indexRect.width - imageRect.width > 0.0f) + { + imageRect.x = indexRect.x + (indexRect.width - imageRect.width) / 2.0f; + } + + if (indexRect.height - imageRect.height > 0.0f) + { + imageRect.y = indexRect.y + (indexRect.height - imageRect.height) / 2.0f; + } + + pReplacementColorBitmap = + _BitmapImpl::GetColorReplacedBitmapN(*pChildIndexImage, + Color::GetColor(COLOR_ID_MAGENTA), __viewConfig.__popupTextColor); + r = DrawBitmap(*pCanvas, imageRect, *pReplacementColorBitmap, + FloatRectangle(0.0f, 0.0f, pChildIndexImage->GetWidthF(), pChildIndexImage->GetHeightF())); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to draw a bitmap.", GetErrorMessage(r)); + + delete pReplacementColorBitmap; + pReplacementColorBitmap = null; + } + else + { + String* pChildIndexText = pChildIndex->GetIndexText(); + 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, "[%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)); + + r = pTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_WORD); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to set wrap.", GetErrorMessage(r)); + + r = pTextObject->SetFont(__viewConfig.__pFont, 0, pTextObject->GetTextLength()); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to set font.", GetErrorMessage(r)); + + r = pTextObject->SetForegroundColor(__viewConfig.__popupTextColor, 0, pTextObject->GetTextLength()); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to set foreground color.", GetErrorMessage(r)); + + r = pTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_CENTER | TEXT_OBJECT_ALIGNMENT_MIDDLE); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to set alignment.", GetErrorMessage(r)); + + r = pTextObject->SetBounds(indexRect); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to set bounds of pTextObject.", GetErrorMessage(r)); + + r = pTextObject->Draw(*_CanvasImpl::GetInstance(*pCanvas)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to draw text.", GetErrorMessage(r)); + } + } + + indexRect.y += indexHeight; + } + + //fall through +CATCH: + delete pTextObject; + delete pCanvas; + delete pReplacementColorBitmap; +} + +result +_FastScrollPopupView::DrawBitmap(Canvas& canvas, const FloatRectangle& bounds, const Bitmap& bitmap) +{ + result r = E_SUCCESS; + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(bitmap)) + { + r = canvas.DrawNinePatchedBitmap(bounds, bitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to draw ninepathced bitmap"); + } + else + { + r = canvas.DrawBitmap(bounds, bitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to draw bitmap"); + } + + return E_SUCCESS; +} + +result +_FastScrollPopupView::DrawBitmap(Canvas& canvas, const FloatRectangle& srcRect, const Bitmap& bitmap, const FloatRectangle& dstRect) +{ + result r = E_SUCCESS; + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(bitmap)) + { + r = canvas.DrawNinePatchedBitmap(srcRect, bitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to draw ninepathced bitmap"); + } + else + { + r = canvas.DrawBitmap(srcRect, bitmap, dstRect); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to draw bitmap"); + } + + return E_SUCCESS; +} + +result +_FastScrollPopupView::Construct(void) +{ + result r = E_SUCCESS; + + __pPopupVe = new (std::nothrow) _VisualElement(); + 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)); + + __pPopupVe->SetAnimationProvider(this); + + r = __pPopupVe->SetSurfaceOpaque(false); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to set the opaque of the popup ve.", GetErrorMessage(r)); + + __pPopupVe->SetImplicitAnimationEnabled(false); + + r = __parentVe.AttachChild(*__pPopupVe); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to attach the popup ve to the parent.", GetErrorMessage(r)); + + __pPopupVe->SetShowState(true); + __pPopupVe->SetClipChildrenEnabled(true); + __pPopupVe->SetOpacity(FASTSCROLL_OPACITY_OFF); + + __needUpdatePopupVe = true; + + __matrixOrigin.SetAsIdentity(); + __matrixFadeInStart.SetAsIdentity(); + __matrixFadeOutEnd.SetAsIdentity(); + + _MatrixUtilScale(__matrixFadeInStart, 0.8f, 0.8f, 1.0f); + _MatrixUtilScale(__matrixFadeOutEnd, 0.1f, 0.1f, 1.0f); + + return E_SUCCESS; + +CATCH: + if (__pPopupVe) + { + __pPopupVe->Destroy(); + __pPopupVe = null; + } + + return r; +} + +_FastScrollPresenter::_FastScrollPresenter(_Control& parentCtrl, _FastScroll& fastScroll, bool enableFadeEffect, bool visibility) + : __parentCtrl(parentCtrl) + , __fastScroll(fastScroll) + , __pCtrlVe(null) + , __pViewConfig(null) + , __pFastScrollEvent(null) + , __pFastScrollModel(null) + , __fontStyle(0) + , __fontSize(0.0f) + , __pPopupView(null) + , __focusedIndexLevel(0) + , __pSelectedIndex(null) + , __enableFadeEffect(enableFadeEffect) + , __indexCountMax(0) + , __fadeIn(false) + , __fadeOut(false) + , __scrollVisibility(visibility) + , __fadeEffectDuration_ms(500) +{ +} + +_FastScrollPresenter::~_FastScrollPresenter(void) +{ + delete __pFastScrollEvent; + __pFastScrollEvent = null; + + delete __pFastScrollModel; + __pFastScrollModel = null; + + delete __pPopupView; + __pPopupView = null; + + RemoveAllIndexViews(false); + + delete __pViewConfig; + __pViewConfig = null; + + if (__pCtrlVe) + { + __pCtrlVe->RemoveAllAnimations(); + __pCtrlVe->SetAnimationProvider(null); + } +} + +_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, "[%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)); + + return pPresenter; + +CATCH: + delete pPresenter; + + return null; +} + +result +_FastScrollPresenter::SetRootIndex(_FastScrollIndex* pIndex) +{ + result r = E_SUCCESS; + + // initialize index views + RemoveAllIndexViews(false); + + // initialize the popup view + if (__pPopupView) + { + r = __pPopupView->SetPopupVisibility(false); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to clear visibility of the popup view."); + } + + r = SetFontInfo(FONT_STYLE_PLAIN, __pViewConfig->__indexTextSize); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set font."); + + // set the root index into _FastScrollModel + r = __pFastScrollModel->SetRootIndex(pIndex); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set the root index into _FastScrollModel"); + + // add new root index view. + if (pIndex) + { + r = AddIndexView(0, *pIndex); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to add the root index view."); + } + + return E_SUCCESS; +} + +_FastScrollIndex* +_FastScrollPresenter::GetRootIndex(void) const +{ + return __pFastScrollModel->GetRootIndex(); +} + +result +_FastScrollPresenter::UpdateIndex(void) +{ + result r = E_SUCCESS; + + // update the base index of index views + int indexViewCount = GetIndexViewCount(); + for (int i = 0; i < indexViewCount; i++) + { + _FastScrollIndexView* pIndexView = GetIndexView(i); + SysTryReturnResult(NID_UI_CTRL, pIndexView, GetLastResult(), "Failed to get the index view."); + + _FastScrollIndex* pIndex = pIndexView->GetBaseIndex(); + + if ((pIndex->GetChildCount() > __indexCountMax) && (pIndex->GetIndexType() != FAST_SCROLL_INDEX_TYPE_OMISSION)) + { + r = pIndex->SetOmissionIndex(__indexCountMax); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set omiited index."); + } + + r = pIndexView->UpdateIndex(true); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to update the index view."); + } + + // update the base index of the popup view + if (__pPopupView) + { + r = __pPopupView->UpdateIndex(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to update the popup view."); + } + + return E_SUCCESS; +} + +void +_FastScrollPresenter::EnableFadeEffect(bool enable) +{ + __enableFadeEffect = enable; +} + +bool +_FastScrollPresenter::IsEnabledFadeEffect(void) const +{ + return __enableFadeEffect; +} + +bool +_FastScrollPresenter::IsOnFadeEffect(void) const +{ + return (__fadeIn || __fadeOut); +} + +bool +_FastScrollPresenter::IsScrollVisible(void) const +{ + return (__fadeIn || __fadeOut || __scrollVisibility); +} + +result +_FastScrollPresenter::SetScrollVisibility(bool visibility) +{ + result r = E_SUCCESS; + + if (GetScrollVisibility() == visibility) + { + // keep up current visibility. + return E_SUCCESS; + } + + if (__pViewConfig->__ignoreTouchEvent && visibility == false) + { + return E_SUCCESS; + } + + if (visibility == false && __pSelectedIndex != null) + { + return E_SUCCESS; + } + + __pCtrlVe->RemoveAllAnimations(); + if (visibility) + { + if (__enableFadeEffect) + { + __fadeIn = true; + __fadeOut = false; + + __pCtrlVe->SetImplicitAnimationEnabled(true); + } + + __pCtrlVe->SetOpacity(FASTSCROLL_OPACITY_ON); + + if (__enableFadeEffect) + { + __pCtrlVe->SetImplicitAnimationEnabled(false); + } + else + { + __fadeIn = false; + __fadeOut = false; + } + } + else + { + if (__enableFadeEffect) + { + __fadeIn = false; + __fadeOut = true; + + __pCtrlVe->SetImplicitAnimationEnabled(true); + } + + __pCtrlVe->SetOpacity(FASTSCROLL_OPACITY_OFF); + + if (__enableFadeEffect) + { + __pCtrlVe->SetImplicitAnimationEnabled(false); + } + else + { + __fadeIn = false; + __fadeOut = false; + } + } + + __scrollVisibility = visibility; + + return r; +} + +bool +_FastScrollPresenter::GetScrollVisibility(void) const +{ + float opacity = __pCtrlVe->GetOpacity(); + + if (__enableFadeEffect) + { + if (__scrollVisibility) + { + return true; + } + } + else if (opacity > FASTSCROLL_OPACITY_OFF) + { + return true; + } + + return false; +} + +void +_FastScrollPresenter::CancelFadeEffect(void) +{ + if (__fadeIn) + { + __fadeIn = false; + __scrollVisibility = false; + __pCtrlVe->SetOpacity(FASTSCROLL_OPACITY_OFF); + } + else if (__fadeOut) + { + __fadeOut = false; + __scrollVisibility = true; + __pCtrlVe->SetOpacity(FASTSCROLL_OPACITY_ON); + } +} + +void +_FastScrollPresenter::AddFastScrollEventListener(const Controls::_IUiFastScrollListener& listener) +{ + result r = E_SUCCESS; + + if (__pFastScrollEvent == null) + { + __pFastScrollEvent = new (std::nothrow) _UiFastScrollEvent(); + SysTryReturnVoidResult(NID_UI_CTRL, __pFastScrollEvent, E_OUT_OF_MEMORY, + "[%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)); + } + + r = __pFastScrollEvent->AddListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +_FastScrollPresenter::RemoveFastScrollEventListener(const Controls::_IUiFastScrollListener& listener) +{ + result r = E_SUCCESS; + + 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)); +} + +result +_FastScrollPresenter::AddAccessibilityElement(const _AccessibilityContainer& control, bool onAccessibility) +{ + _FastScrollIndexView* pIndexView = GetIndexView(0); + SysTryReturnResult(NID_UI_CTRL, pIndexView, GetLastResult(), "Failed to get fastscroll indexview.", + GetErrorMessage(GetLastResult())); + + _AccessibilityContainer* pAccessibilityContainer = const_cast <_AccessibilityContainer*>(&control); + result r = pAccessibilityContainer->RemoveAllElement(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to remove accessibility elements."); + _AccessibilityElement* pAccessibilityElement = null; + + if (onAccessibility) + { + r = pIndexView->AddAccessibilityElement(control); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to Add accessibility element."); + } + else + { + pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true); + SysTryReturnResult(NID_UI_CTRL, pAccessibilityElement, E_OUT_OF_MEMORY, "Memory allocation failed."); + + pAccessibilityElement->SetBounds(pIndexView->GetIndexBounds()); + 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); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to Add accessibility element.", GetErrorMessage(r)); + } + return E_SUCCESS; + +CATCH: + delete pAccessibilityElement; + return r; +} + +void +_FastScrollPresenter::OnParentBoundsChanged(void) +{ + RelayoutFastScrollChildren(); +} + +void +_FastScrollPresenter::OnDraw(void) +{ + // draw index views + bool availableTextSize = (__fastScroll.GetBoundsF().height >= __pViewConfig->__popupTextSize); + int indexViewCount = GetIndexViewCount(); + for (int i = 0; i < indexViewCount; i++) + { + _FastScrollIndexView* pIndexView = GetIndexView(i); + SysTryReturnVoidResult(NID_UI_CTRL, pIndexView, GetLastResult(), "[%s] Failed to get the index view.", + GetErrorMessage(GetLastResult())); + + result r = SetFontInfo(FONT_STYLE_PLAIN, __pViewConfig->__indexTextSize); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Failed to set font.", GetErrorMessage(r)); + pIndexView->OnDraw(); + + // draw the popup view + if (__pPopupView && i <= __focusedIndexLevel) + { + if (availableTextSize) + { + r = SetFontInfo(FONT_STYLE_PLAIN, __pViewConfig->__popupTextSize); + } + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Failed to set font.", GetErrorMessage(r)); + __pPopupView->OnDraw(i, pIndexView->GetBaseIndex(), pIndexView->GetSelectedIndexInOmittedIndex()); + } + } + + if (__pPopupView) + { + __pPopupView->SetPopupVeUpdateNeeded(false); + } +} + +bool +_FastScrollPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + FloatPoint touchedPosition = touchinfo.GetCurrentPosition(); + __pViewConfig->__ignoreTouchEvent = false; + return OnTouchPressedAndMoved(touchedPosition, true); +} + +bool +_FastScrollPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + return OnTouchReleasedAndCanceled(); +} + +bool +_FastScrollPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + FloatPoint touchedPosition = touchinfo.GetCurrentPosition(); + return OnTouchPressedAndMoved(touchedPosition, false); +} + +bool +_FastScrollPresenter::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + return OnTouchReleasedAndCanceled(); +} + +void +_FastScrollPresenter::OnAncestorVisibleStateChanged(const _Control& control) +{ + OnTouchReleasedAndCanceled(); +} + +void +_FastScrollPresenter::OnAncestorEnableStateChanged(const _Control& control) +{ + OnTouchReleasedAndCanceled(); +} + +void +_FastScrollPresenter::OnAncestorInputEnableStateChanged(const _Control& control) +{ + OnTouchReleasedAndCanceled(); +} + +void +_FastScrollPresenter::OnFontChanged(Font* pFont) +{ + __pViewConfig->__pFont = pFont; +} + +void +_FastScrollPresenter::OnFontInfoRequested(unsigned long& style, float& size) +{ + style = __fontStyle; + size = __fontSize; +} + +result +_FastScrollPresenter::SetFontInfo(unsigned long style, float size) +{ + __fontStyle = style; + __fontSize = size; + + __pViewConfig->__pFont = __fastScroll.GetFallbackFont(); + SysTryReturnResult(NID_UI_CTRL, __pViewConfig->__pFont, GetLastResult(), "Failed to get a font."); + + return E_SUCCESS; +} + +VisualElementAnimation* +_FastScrollPresenter::CreateAnimationForProperty(VisualElement& target, const String& property) +{ + VisualElementAnimation* pAnimation = VisualElementAnimationProvider::CreateAnimationForProperty(target, property); + + if (pAnimation) + { + const IVisualElementAnimationTimingFunction* pTimingFunction = VisualElementAnimation::GetTimingFunctionByName("EaseInOut"); + if (pTimingFunction) + { + pAnimation->SetTimingFunction(pTimingFunction); + } + pAnimation->SetVisualElementAnimationStatusEventListener(this); + } + return pAnimation; +} + +void +_FastScrollPresenter::OnVisualElementAnimationStarted(const VisualElementAnimation& animation, const String& keyName, VisualElement& target) +{ +} + +void +_FastScrollPresenter::OnVisualElementAnimationRepeated(const VisualElementAnimation& animation, const String& keyName, VisualElement& target, long currentRepeatCount) +{ +} + +void +_FastScrollPresenter::OnVisualElementAnimationFinished(const VisualElementAnimation& animation, const String& keyName, VisualElement& target, bool completedNormally) +{ + if (__pCtrlVe == (static_cast <_VisualElement*>(&target))) + { + __fadeIn = false; + __fadeOut = false; + } +} + +HitTestResult +_FastScrollPresenter::HitTest(const Tizen::Graphics::FloatPoint& point) +{ + if (IsScrollVisible() == false) + { + return HIT_TEST_NOWHERE; + } + + int indexViewCount = GetIndexViewCount(); + for (int i = 0; i < indexViewCount; i++) + { + _FastScrollIndexView* pIndexView = GetIndexView(i); + SysTryReturn(NID_UI_CTRL, pIndexView, HIT_TEST_NOWHERE, GetLastResult(), "[%s] Failed to get the index view.", + GetErrorMessage(GetLastResult())); + + FloatRectangle indexBounds = pIndexView->GetIndexBoundsF(); + if (indexBounds.Contains(point) == true) + { + return HIT_TEST_MATCH; + } + } + + return HIT_TEST_NOWHERE; +} + +void +_FastScrollPresenter::OnIndexDataUpdated(_FastScrollIndex& updatedIndex) +{ + result r = E_SUCCESS; + + int indexViewCount = GetIndexViewCount(); + for (int i = 0; i < indexViewCount; i++) + { + _FastScrollIndexView* pIndexView = GetIndexView(i); + SysTryReturnVoidResult(NID_UI_CTRL, pIndexView, GetLastResult(), "[%s] Failed to get the index view.", + GetErrorMessage(GetLastResult())); + + if (pIndexView->GetBaseIndex() == &updatedIndex) + { + r = pIndexView->UpdateIndex(false); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Failed to update index view.", GetErrorMessage(r)); + + if (__pPopupView) + { + r = __pPopupView->UpdateIndex(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Failed to update the popup view.", GetErrorMessage(r)); + } + break; + } + } +} + +void +_FastScrollPresenter::OnIndexDeleted(_FastScrollIndex& deletedIndex) +{ + result r = E_SUCCESS; + + int indexViewCount = GetIndexViewCount(); + for (int i = 0; i < indexViewCount; i++) + { + _FastScrollIndexView* pIndexView = GetIndexView(i); + SysTryReturnVoidResult(NID_UI_CTRL, pIndexView, GetLastResult(), "[%s] Failed to get the index view.", + GetErrorMessage(GetLastResult())); + + if (pIndexView->GetBaseIndex() == &deletedIndex) + { + // first of all, update the base index view + if (i != 0) + { + _FastScrollIndexView* pBaseIndexView = GetIndexView(i - 1); + SysTryReturnVoidResult(NID_UI_CTRL, pBaseIndexView, GetLastResult(), "[%s] Failed to get the index view.", + GetErrorMessage(GetLastResult())); + + r = pBaseIndexView->UpdateIndex(false); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Failed to update index view.", GetErrorMessage(r)); + } + + // then remove the index view for detached index. + RemoveIndexView(i, true); + + delete __pPopupView; + __pPopupView = null; + + break; + } + else if (pIndexView->GetBaseIndex() == deletedIndex.GetParentIndex()) + { + r = pIndexView->UpdateIndex(false); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Failed to update index view.", GetErrorMessage(r)); + + r = __pPopupView->UpdateIndex(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Failed to update popup view.", GetErrorMessage(r)); + } + } +} + +void +_FastScrollPresenter::OnChildIndexAttached(_FastScrollIndex& parentIndex, int attachedOrder, _FastScrollIndex& attachedIndex) +{ + result r = E_SUCCESS; + + int indexViewCount = GetIndexViewCount(); + for (int i = 0; i < indexViewCount; i++) + { + _FastScrollIndexView* pIndexView = GetIndexView(i); + SysTryReturnVoidResult(NID_UI_CTRL, pIndexView, GetLastResult(), "[%s] Failed to get the index view.", + GetErrorMessage(GetLastResult())); + + if (pIndexView->GetBaseIndex() == &parentIndex) + { + r = pIndexView->UpdateIndex(false); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Failed to update index view.", GetErrorMessage(r)); + + r = __pPopupView->UpdateIndex(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Failed to update popup view.", GetErrorMessage(r)); + break; + } + } +} + +void +_FastScrollPresenter::OnChildIndexDetached(_FastScrollIndex& parentIndex, int detachedOrder, _FastScrollIndex& detachedIndex) +{ + result r = E_SUCCESS; + + int indexViewCount = GetIndexViewCount(); + for (int i = 0; i < indexViewCount; i++) + { + _FastScrollIndexView* pIndexView = GetIndexView(i); + SysTryReturnVoidResult(NID_UI_CTRL, pIndexView, GetLastResult(), "[%s] Failed to get the index view.", + GetErrorMessage(GetLastResult())); + + if (pIndexView->GetBaseIndex() == &detachedIndex) + { + // first of all, update the base index view + if (i != 0) + { + _FastScrollIndexView* pBaseIndexView = GetIndexView(i - 1); + SysTryReturnVoidResult(NID_UI_CTRL, pBaseIndexView, GetLastResult(), "[%s] Failed to get the index view.", + GetErrorMessage(GetLastResult())); + + r = pBaseIndexView->UpdateIndex(false); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Failed to update index view.", GetErrorMessage(r)); + } + + // then remove the index view for detached index. + RemoveIndexView(i, true); + + delete __pPopupView; + __pPopupView = null; + break; + } + else if (pIndexView->GetBaseIndex() == &parentIndex) + { + r = pIndexView->UpdateIndex(false); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Failed to update index view.", GetErrorMessage(r)); + + r = __pPopupView->UpdateIndex(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Failed to update popup view.", GetErrorMessage(r)); + } + } +} + + +result +_FastScrollPresenter::Construct(void) +{ + result r = E_SUCCESS; + + // load color/shape configuration and bitmap resources + __pViewConfig = _FastScrollViewConfig::CreateFastScrollViewConfigN(_CONTROL_ORIENTATION_PORTRAIT); + SysTryReturnResult(NID_UI_CTRL, __pViewConfig, GetLastResult(), "Failed to create _FastScrollViewConfig."); + + // create _FastScrollModel + __pFastScrollModel = _FastScrollModel::CreateFastScrollModelN(); + SysTryCatch(NID_UI_CTRL, __pFastScrollModel, , GetLastResult(), "[%s] Failed to create _FastScrollModel.", + GetErrorMessage(GetLastResult())); + + // initialize visual elements + __pCtrlVe = __fastScroll.GetVisualElement(); + SysTryCatch(NID_UI_CTRL, __pCtrlVe, , GetLastResult(), "[%s] Failed to get VisualElement of the _FastScroll", + GetErrorMessage(GetLastResult())); + + __pCtrlVe->SetAnimationProvider(this); + __pCtrlVe->SetClipChildrenEnabled(false); + + if (__scrollVisibility) + { + __pCtrlVe->SetOpacity(FASTSCROLL_OPACITY_ON); + } + else + { + __pCtrlVe->SetOpacity(FASTSCROLL_OPACITY_OFF); + } + + // initialize the fastscroll control + r = __fastScroll.SetBounds(CalculateFastScrollBounds(0)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to set the bounds of _FastScroll", GetErrorMessage(r)); + + __fastScroll.SetBackgroundColor(Tizen::Graphics::Color(0, 0, 0, 0)); + + __indexCountMax = _CoordinateSystemUtils::ConvertToInteger((__fastScroll.GetBoundsF().height - + (__pViewConfig->__indexMarginTop * 2.0f)) / __pViewConfig->__indexSizeMin.height); + + return E_SUCCESS; + +CATCH: + delete __pFastScrollModel; + __pFastScrollModel = null; + + delete __pViewConfig; + __pViewConfig = null; + + return GetLastResult(); +} + +FloatRectangle +_FastScrollPresenter::CalculateFastScrollBounds(int indexCount) +{ + FloatRectangle fastScrollBounds(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle parentBounds = __parentCtrl.GetBoundsF(); + fastScrollBounds.width = parentBounds.width; + fastScrollBounds.height = parentBounds.height; + return fastScrollBounds; +} + +FloatRectangle +_FastScrollPresenter::CalculateIndexBounds(int indexLevel, _FastScrollIndex& pIndex) +{ + FloatRectangle fastScrollBounds = __fastScroll.GetBoundsF(); + FloatRectangle indexBounds(0.0f, 0.0f, __pViewConfig->__indexSizeMin.width, fastScrollBounds.height); + + indexBounds.x = fastScrollBounds.width - __pViewConfig->__indexSizeMin.width; + for (int i = 1; i <= indexLevel; i++) + { + indexBounds.x -= __pViewConfig->__indexGap + __pViewConfig->__indexSizeMin.width; + } + + if (indexBounds.x < 0.0f) + { + indexBounds.x = 0.0f; + } + + if (indexLevel != 0) + { + int childCount = pIndex.GetChildCount(); + indexBounds.height = (childCount * __pViewConfig->__indexSizeMin.height) + (__pViewConfig->__indexMarginTop * 2.0f); + + if (indexBounds.height < fastScrollBounds.height) + { + _FastScrollIndexView* pParentIndexView = GetIndexView(indexLevel - 1); + if (pParentIndexView) + { + FloatRectangle parentBounds = pParentIndexView->GetIndexBoundsF(); + + indexBounds.y = parentBounds.y + (pIndex.GetIndexOrder() * pParentIndexView->GetIndexHeight()) - __pViewConfig->__indexMarginTop; + if (indexBounds.y < fastScrollBounds.y) + { + indexBounds.y = fastScrollBounds.y; + } + + float totalHeight = indexBounds.y + indexBounds.height; + if (_FloatCompare(totalHeight, fastScrollBounds.height) || (totalHeight > fastScrollBounds.height)) + { + indexBounds.y = fastScrollBounds.height - indexBounds.height; + } + } + } + else + { + indexBounds.height = fastScrollBounds.height; + } + } + + return indexBounds; +} + +FloatRectangle +_FastScrollPresenter::CalculatePopupBounds(void) +{ + FloatRectangle popupBounds(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle parentBounds = __parentCtrl.GetBoundsF(); + FloatRectangle fastScrollBounds = __fastScroll.GetBoundsF(); + + popupBounds.width = __pViewConfig->__popupSize.width + (__pViewConfig->__popupWidthIncrement * __focusedIndexLevel); + if (popupBounds.width > parentBounds.width) + { + popupBounds.width = parentBounds.width; + } + + popupBounds.height = __pViewConfig->__popupSize.height; + if (popupBounds.height > parentBounds.height) + { + popupBounds.height = parentBounds.height; + } + + popupBounds.x = ((parentBounds.width - popupBounds.width) / 2.0f) - fastScrollBounds.x; + if (popupBounds.x < 0.0f) + { + popupBounds.x = 0.0f; + } + + popupBounds.y = ((parentBounds.height - popupBounds.height) / 2.0f) - fastScrollBounds.y; + if (popupBounds.y < 0.0f) + { + popupBounds.y = 0.0f; + } + + return popupBounds; +} + +void +_FastScrollPresenter::RelayoutFastScrollChildren(void) +{ + result r = E_SUCCESS; + + int indexViewCount = GetIndexViewCount(); + + // initialize the fastscroll control + r = __fastScroll.SetBounds(CalculateFastScrollBounds(indexViewCount)); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Failed to set the bounds of _FastScroll", GetErrorMessage(r)); + + __indexCountMax = _CoordinateSystemUtils::ConvertToInteger((__fastScroll.GetBoundsF().height - + (__pViewConfig->__indexMarginTop * 2.0f)) / __pViewConfig->__indexSizeMin.height); + + for (int i = 0; i < indexViewCount; i++) + { + _FastScrollIndexView* pIndexView = GetIndexView(i); + SysTryReturnVoidResult(NID_UI_CTRL, pIndexView, GetLastResult(), "[%s] Failed to get the index view.", + GetErrorMessage(GetLastResult())); + + r = pIndexView->SetIndexBounds(CalculateIndexBounds(i, *(pIndexView->GetBaseIndex()))); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Failed to set bounds of the index.", GetErrorMessage(r)); + + _FastScrollIndex* pIndex = pIndexView->GetBaseIndex(); + if (pIndex->GetIndexType() == FAST_SCROLL_INDEX_TYPE_OMISSION) + { + _FastScrollIndex* pSelectedIndex = pIndexView->GetSelectedIndex(); + if (pSelectedIndex && pSelectedIndex->GetOmitted()) + { + DeselectIndexViews(); + } + r = pIndex->RemoveOmissionChildren(false); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Failed to remove omission index view", GetErrorMessage(r)); + } + + if (pIndex->GetChildCount() > __indexCountMax) + { + r = pIndex->SetOmissionIndex(__indexCountMax); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Failed to set omission index.", GetErrorMessage(r)); + } + + r = pIndexView->UpdateIndex(false); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Failed to update index view.", GetErrorMessage(r)); + } + + if (__pPopupView) + { + r = __pPopupView->SetPopupBounds(CalculatePopupBounds()); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Failed to set bounds of the popup view.", GetErrorMessage(r)); + } +} + +_FastScrollIndex* +_FastScrollPresenter::SelectOnIndexViews(const FloatPoint& point, bool isPressed) +{ + result r = E_SUCCESS; + + _FastScrollIndex* pSelectedIndex = null; + int selectedIndexLevel = 0; + int indexViewCount = GetIndexViewCount(); + 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++) + { + _FastScrollIndexView* pIndexView = GetIndexView(i); + SysTryReturn(NID_UI_CTRL, pIndexView, null, GetLastResult(), "[%s] Failed to get the index view.", + GetErrorMessage(GetLastResult())); + + _FastScrollIndex* pIndex = pIndexView->GetIndexAtPoint(point); + if (pIndex) + { + // select the index of the index view. + r = pIndexView->SelectIndex(pIndex, isPressed); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Failed to select the index.", GetErrorMessage(r)); + pSelectedIndex = pIndex; + if (pIndex->GetOmitted() == true) + { + pSelectedIndex = pIndexView->GetOmissionIndexAtPoint(pIndex, point); + } + + pIndexView->SetSelectedIndexInOmittedIndex(pSelectedIndex); + + selectedIndexLevel = i; + break; + } + } + + // if can no find the index on views, select index of the last index view + if ((pSelectedIndex == null) && (__focusedIndexLevel != -1)) + { + _FastScrollIndexView* pFocusedIndexView = GetIndexView(__focusedIndexLevel); + SysTryReturn(NID_UI_CTRL, pFocusedIndexView, null, GetLastResult(), "[%s] Failed to get the index view.", + GetErrorMessage(GetLastResult())); + + _FastScrollIndex* pIndex = pFocusedIndexView->GetIndexAtPoint(FloatPoint(pFocusedIndexView->GetIndexBoundsF().x, point.y)); + if (pIndex) + { + // select the index of the focused index view. + r = pFocusedIndexView->SelectIndex(pIndex, isPressed); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Failed to select the index.", GetErrorMessage(r)); + pSelectedIndex = pIndex; + + if (pIndex->GetOmitted() == true) + { + pSelectedIndex = pFocusedIndexView->GetOmissionIndexAtPoint(pIndex, + FloatPoint(pFocusedIndexView->GetIndexBoundsF().x, point.y)); + if (pSelectedIndex == null) + { + pSelectedIndex = pFocusedIndexView->GetSelectedIndexInOmittedIndex(); + } + } + pFocusedIndexView->SetSelectedIndexInOmittedIndex(pSelectedIndex); + + selectedIndexLevel = __focusedIndexLevel; + } + else + { + pSelectedIndex = pFocusedIndexView->GetSelectedIndex(); + if (pSelectedIndex && pSelectedIndex->GetOmitted() == true) + { + pSelectedIndex = pFocusedIndexView->GetSelectedIndexInOmittedIndex(); + } + selectedIndexLevel = __focusedIndexLevel; + } + } + + if (pSelectedIndex) + { + int childCount = pSelectedIndex->GetChildCount(); + if (childCount > 0 && (pSelectedIndex->GetOmitted() == false)) + { + _FastScrollIndexView* pSelectedIndexView = GetIndexView(selectedIndexLevel + 1); + if (pSelectedIndexView) + { + r = pSelectedIndexView->SelectIndex((_FastScrollIndex*)null, false); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Failed to select the index.", GetErrorMessage(r)); + + r = pSelectedIndexView->SetBaseIndex(pSelectedIndex); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Failed to set the base index of the index view.", GetErrorMessage(r)); + + r = pSelectedIndexView->SetIndexBounds(CalculateIndexBounds(selectedIndexLevel + 1, *pSelectedIndex)); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Failed to set bounds of the index.", GetErrorMessage(r)); + + r = pSelectedIndexView->SetIndexVisibility(true); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Failed to set the visibility of the index view.", GetErrorMessage(r)); + + indexViewCount = GetIndexViewCount(); + while (indexViewCount > selectedIndexLevel + 2) + { + r = RemoveIndexView(indexViewCount - 1, true); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Failed to remove the index view.", GetErrorMessage(r)); + indexViewCount = GetIndexViewCount(); + } + } + else + { + r = AddIndexView(*pSelectedIndex); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Failed to add new child index.", GetErrorMessage(r)); + } + + if ((childCount > __indexCountMax) && (pSelectedIndex->GetIndexType() != FAST_SCROLL_INDEX_TYPE_OMISSION)) + { + r = pSelectedIndex->SetOmissionIndex(__indexCountMax); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Failed to set omission index.", GetErrorMessage(r)); + } + } + else + { + indexViewCount = GetIndexViewCount(); + while (indexViewCount > selectedIndexLevel + 1) + { + r = RemoveIndexView(indexViewCount - 1, true); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Failed to remove the index view.", GetErrorMessage(r)); + indexViewCount = GetIndexViewCount(); + } + } + } + else + { + indexViewCount = GetIndexViewCount(); + while (indexViewCount > 1) + { + r = RemoveIndexView(indexViewCount - 1, true); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Failed to remove the index view.", GetErrorMessage(r)); + indexViewCount = GetIndexViewCount(); + } + } + + __focusedIndexLevel = selectedIndexLevel; + return pSelectedIndex; +} + +result +_FastScrollPresenter::DeselectIndexViews(void) +{ + result r = E_SUCCESS; + + while (GetIndexViewCount() > 1) + { + RemoveIndexView(GetIndexViewCount() - 1, true); + } + + _FastScrollIndexView* pIndexView = GetIndexView(0); + SysTryReturnResult(NID_UI_CTRL, pIndexView, GetLastResult(), "Failed to get the index view."); + + r = pIndexView->SelectIndex((_FastScrollIndex*)null, true); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to clear the index selection."); + pIndexView->SetSelectedIndexInOmittedIndex(null); + + __fastScroll.Invalidate(); + + return E_SUCCESS; +} + +result +_FastScrollPresenter::SetPopupIndex(_FastScrollIndex& popupIndex, const FloatPoint& point) +{ + result r = E_SUCCESS; + + // set the selected node into the popup views. + if (__pPopupView == null) + { + __pPopupView = _FastScrollPopupView::CreateFastScrollPopupViewN(*__pCtrlVe, *__pViewConfig); + SysTryReturnResult(NID_UI_CTRL, __pPopupView, GetLastResult(), "Propagating."); + + r = __pPopupView->SetPopupBounds(CalculatePopupBounds()); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set bounds of the popup view."); + + r = __pPopupView->SetPopupVisibility(true); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set visibility of the popup view."); + } + + int indexViewCount = __focusedIndexLevel + 1; + int popupIndexViewCount = __pPopupView->GetIndexVeCount(); + + if (indexViewCount != popupIndexViewCount) + { + r = __pPopupView->SetPopupBounds(CalculatePopupBounds()); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set bounds of the popup view."); + + if (indexViewCount > popupIndexViewCount) + { + for (int i = popupIndexViewCount; i < indexViewCount; i++) + { + r = __pPopupView->AddPopupIndexVe(i); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to add popup index ve."); + } + } + else if (indexViewCount < popupIndexViewCount) + { + for (int i = indexViewCount; i < popupIndexViewCount; i++) + { + r = __pPopupView->RemovePopupIndexVe(i); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to remove popup index ve."); + } + } + } + + r = __pPopupView->UpdateIndex(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to update the popup view."); + + for (int i = 0; i < indexViewCount; i++) + { + _FastScrollIndexView* pIndexView = GetIndexView(i); + SysTryReturnResult(NID_UI_CTRL, pIndexView, r, "Failed to index view."); + + r = __pPopupView->SetPopupIndexBounds(i, pIndexView->GetBaseIndex()); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set bounds of the popup index ve."); + + _FastScrollIndex* pFormerIndex = null; + if (i == __focusedIndexLevel) + { + pFormerIndex = pIndexView->GetFormerIndex(); + r = __pPopupView->SelectIndex(i, &popupIndex, pFormerIndex); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to select the popup index."); + } + else + { + r = __pPopupView->SelectIndex(i, null, null); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to select the popup index."); + } + } + + return E_SUCCESS; +} + +result +_FastScrollPresenter::ClearPopupIndex(void) +{ + result r = E_SUCCESS; + + // clear the node data of the popup view + if (__pPopupView) + { + r = __pPopupView->FadeOutAndDestroy(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to clear visibility of the popup view."); + + __pPopupView = null; + } + + return E_SUCCESS; +} + +result +_FastScrollPresenter::FireFastScrollEvent(_FastScrollIndex& selectedIndex) +{ + // fire the fast scroll event + if (__pFastScrollEvent) + { + String* pIndexNodeText = selectedIndex.GetIndexText(); + if (pIndexNodeText) + { + _UiFastScrollEventArg* pEventArg = new (std::nothrow) _UiFastScrollEventArg(*__pFastScrollEvent->GetSource(), selectedIndex); + SysTryReturnResult(NID_UI_CTRL, pEventArg, E_OUT_OF_MEMORY, "Memory allocation failed."); + + __pFastScrollEvent->Fire(*pEventArg); + } + } + + return E_SUCCESS; +} + +bool +_FastScrollPresenter::OnTouchPressedAndMoved(const FloatPoint& point, bool isPressed) +{ + result r = E_SUCCESS; + if (__pViewConfig->__ignoreTouchEvent) + { + return true; + } + + if (__enableFadeEffect && __scrollVisibility == false) + { + r = SetScrollVisibility(true); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, true, r, "[%s] Failed to fade out fastscroll.", GetErrorMessage(r)); + } + + _FastScrollIndex* pSelectedIndex = SelectOnIndexViews(point, isPressed); + if (pSelectedIndex) + { + if (pSelectedIndex->GetNextIndexList() || pSelectedIndex->GetPreviousIndexList()) + { + _FastScrollIndexView* pIndexView = GetIndexView(__focusedIndexLevel); + SysTryReturn(NID_UI_CTRL, pIndexView != null, true, r, "[%s] Propagating.", GetErrorMessage(r)); + + _FastScrollIndex* pBaseIndex = pIndexView->GetBaseIndex(); + SysTryReturn(NID_UI_CTRL, pBaseIndex != null, true, r, "[%s] Propagating.", GetErrorMessage(r)); + + bool isNext = true; + if (pSelectedIndex->GetNextIndexList()) + { + pBaseIndex->SetCurrentIndexList(pSelectedIndex->GetNextIndexList()); + } + else + { + pBaseIndex->SetCurrentIndexList(pSelectedIndex->GetPreviousIndexList()); + isNext = false; + } + + if (pBaseIndex->GetIndexType() == FAST_SCROLL_INDEX_TYPE_OMISSION) + { + r = pBaseIndex->RemoveOmissionChildren(false); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, true, r, "[%s] Failed to remove omission index view", GetErrorMessage(r)); + } + + __pViewConfig->__ignoreTouchEvent = true; + OnTouchReleasedAndCanceled(); + UpdateIndex(); + pIndexView->SelectIndexList(isNext); + + if (__pSelectedIndex != pSelectedIndex) + { + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, &__fastScroll); + } + return true; + } + else if (__pSelectedIndex != pSelectedIndex) + { + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, &__fastScroll); + r = SetPopupIndex(*pSelectedIndex, point); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, true, r, "[%s] Failed to set the popup index.", GetErrorMessage(r)); + + r = FireFastScrollEvent(*pSelectedIndex); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, true, r, "[%s] Failed to send the fast scroll event.", GetErrorMessage(r)); + __pSelectedIndex = pSelectedIndex; + } + } + + return true; +} + +bool +_FastScrollPresenter::OnTouchReleasedAndCanceled(void) +{ + result r = E_SUCCESS; + + r = DeselectIndexViews(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, true, r, "[%s] Failed to deselect index views.", GetErrorMessage(r)); + + r = ClearPopupIndex(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, true, r, "[%s] Failed to clear the popup index.", GetErrorMessage(r)); + + __pSelectedIndex = null; + + if (__enableFadeEffect && __pViewConfig->__ignoreTouchEvent == false && __scrollVisibility == true) + { + r = SetScrollVisibility(false); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, true, r, "[%s] Failed to fade out fastscroll.", GetErrorMessage(r)); + } + + return true; +} + +result +_FastScrollPresenter::AddIndexView(_FastScrollIndex& baseIndex) +{ + return AddIndexView(GetIndexViewCount(), baseIndex); +} + +result +_FastScrollPresenter::AddIndexView(int indexLevel, _FastScrollIndex& baseIndex) +{ + result r = E_SUCCESS; + + _FastScrollIndexView* pNewIndexView = _FastScrollIndexView::CreateFastScrollIndexViewN(*__pCtrlVe, *__pViewConfig); + SysTryReturnResult(NID_UI_CTRL, pNewIndexView, GetLastResult(), "Propagating."); + + r = __fastScroll.SetBounds(CalculateFastScrollBounds(GetIndexViewCount() + 1)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set the bounds of _FastScroll."); + + r = pNewIndexView->SetIndexBounds(CalculateIndexBounds(indexLevel, baseIndex)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set bounds of the index view."); + + r = pNewIndexView->SetBaseIndex(&baseIndex); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set the index data for the index view."); + + r = pNewIndexView->SetIndexVisibility(true); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set visibility of the index view."); + + r = __indexViews.InsertAt(*pNewIndexView, indexLevel); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to change the last index view."); + + return E_SUCCESS; +} + +result +_FastScrollPresenter::RemoveIndexView(int indexLevel, bool fadeout) +{ + result r = E_SUCCESS; + + int indexViewCount = GetIndexViewCount(); + if (indexLevel < indexViewCount) + { + _FastScrollIndexView* pIndexView = GetIndexView(indexLevel); + SysTryReturnResult(NID_UI_CTRL, pIndexView, GetLastResult(), "Failed to get the index view."); + + if (fadeout) + { + r = pIndexView->FadeOutAndDestroy(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to request to fade out of the index view."); + } + + r = __indexViews.Remove(*pIndexView, false); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to remove the index views."); + + // initialize the fastscroll control + r = __fastScroll.SetBounds(CalculateFastScrollBounds(GetIndexViewCount())); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set the bounds of _FastScroll"); + } + + return E_SUCCESS; +} + +result +_FastScrollPresenter::RemoveAllIndexViews(bool fadeout) +{ + result r = E_SUCCESS; + + if (fadeout) + { + int indexViewCount = GetIndexViewCount(); + for (int i = 0; i < indexViewCount; i++) + { + _FastScrollIndexView* pIndexView = GetIndexView(i); + SysTryReturnResult(NID_UI_CTRL, pIndexView, GetLastResult(), "Failed to get the index view."); + + r = pIndexView->FadeOutAndDestroy(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to request to fade out of the index view."); + } + } + + __indexViews.RemoveAll(true); + + // initialize the fastscroll control + r = __fastScroll.SetBounds(CalculateFastScrollBounds(0)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set the bounds of _FastScroll."); + + return E_SUCCESS; +} + +_FastScrollIndexView* +_FastScrollPresenter::GetIndexView(int indexLevel) const +{ + Object* pIndexView = const_cast(__indexViews.GetAt(indexLevel)); + SysTryReturn(NID_UI_CTRL, pIndexView, null, GetLastResult(), "[%s] Failed to get the index view.", + GetErrorMessage(GetLastResult())); + + return dynamic_cast<_FastScrollIndexView*>(pIndexView); +} + +int +_FastScrollPresenter::GetIndexViewCount(void) const +{ + return __indexViews.GetCount(); +} + +} } } // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_FlickAnimation.cpp b/src/ui/controls/FUiCtrl_FlickAnimation.cpp new file mode 100644 index 0000000..d8ba869 --- /dev/null +++ b/src/ui/controls/FUiCtrl_FlickAnimation.cpp @@ -0,0 +1,666 @@ +// +// 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_FlickAnimation.cpp + * @brief This is the implementation file for _FlickAnimation class. + * + * This file contains the implementation of _FlickAnimation class. + */ + +#include +#include "FUiCtrl_FlickAnimation.h" + +#ifdef MEMORY_LEAK_CHECK +#include "mem_leak_check.h" +#endif + +namespace Tizen { namespace Ui { namespace Controls +{ +// Defined Parameter +const int FLK_REF_RESOL_PXL[2] = {480, 800}; // Reference Pixel + +enum +{ + _X = 0, + _Y = 1 +}; + + +_FlickAnimation::_FlickAnimation(void) +{ + __flickDirection = FD_VERTICAL; + + __dimension[_X] = 0; // 42 + __dimension[_Y] = 0; // 70 + + __resolution[_X] = 240; + __resolution[_Y] = 320; + + __align[_X] = __resolution[_X] / FLK_ANI_DEFAULT_ALIGN_RATIO; + __align[_Y] = __resolution[_Y] / FLK_ANI_DEFAULT_ALIGN_RATIO; + + __margin[_X] = 0; + __margin[_Y] = 0; + + __flickAnimationFPS = 25; + __flickAnimationFPSRef = 20; + __flickAnimaionTimeMin = FLK_ANI_TIME_MIN_MSEC * __flickAnimationFPS / 1000; + __flickAnimationTimeMax = FLK_ANI_TIME_MAX_MSEC * __flickAnimationFPS / 1000; + + __friction[_X] = 10; + __friction[_Y] = 10; + __velocity[_X] = 0; + __velocity[_Y] = 0; + + __frictionMin[_X] = 5; + __frictionMin[_Y] = 5; + __velocityMin[_X] = 0; + __velocityMin[_Y] = 0; + + __acceleration[_X] = 0; + __acceleration[_Y] = 0; + __drawCount = 0; + + __tensionStatus[_X] = TENSION_DONE; + __tensionStatus[_Y] = TENSION_DONE; + __tensionDistMax[_X] = 0; + __tensionDistMax[_Y] = 0; +} + +_FlickAnimation::~_FlickAnimation(void) +{ +} + +void +_FlickAnimation::SetSizeInformation(int resW, int resH, int mmW, int mmH) +{ + if (resW > 0 && resH > 0 && mmW > 0 && mmH > 0) + { + __resolution[_X] = resW; + __resolution[_Y] = resH; + + __dimension[_X] = mmW; + __dimension[_Y] = mmH; + } +} + +void +_FlickAnimation::SetAlignInformation(int alignW, int alignH) +{ + // Align Value < 0 then Resolution * 1/n + if (alignW > 0) + { + __align[_X] = alignW; + } + else + { + __align[_X] = __resolution[_X] / FLK_ANI_DEFAULT_ALIGN_RATIO; + } + + if (alignH > 0) + { + __align[_Y] = alignH; + } + else + { + __align[_Y] = __resolution[_Y] / FLK_ANI_DEFAULT_ALIGN_RATIO; + } + + // set Margin + __margin[_X] = __align[_X] / 20; + __margin[_Y] = __align[_Y] / 20; +} + +// sensitivity increases, the larger the distance but, less than fps. +void +_FlickAnimation::SetSensitivity(int fps, int sensitivity) +{ + if (fps > 0) + { + __flickAnimationFPS = fps; + + // max sensitivity is fps + if (0 < sensitivity && sensitivity < fps) + { + __flickAnimationFPSRef = sensitivity; + } + else + { + __flickAnimationFPSRef = fps; + } + + // Update + __flickAnimaionTimeMin = FLK_ANI_TIME_MIN_MSEC * __flickAnimationFPS / 1000; + __flickAnimationTimeMax = FLK_ANI_TIME_MAX_MSEC * __flickAnimationFPS / 1000; + } +} + +void +_FlickAnimation::SetDirection(int dir) +{ + __flickDirection = dir; +} + +void +_FlickAnimation::SetTensionEnable(bool enableX, bool enableY) +{ + if (enableX) + { + __tensionStatus[_X] = TENSION_DONE; + } + else + { + __tensionStatus[_X] = TENSION_NA; + } + + if (enableY) + { + __tensionStatus[_Y] = TENSION_DONE; + } + else + { + __tensionStatus[_Y] = TENSION_NA; + } +} + +bool +_FlickAnimation::IsItemExecutable(int flickX, int flickY) +{ + bool returnValue = (__velocity[_X] == 0 && __velocity[_Y] == 0 && flickX == 0 && flickY == 0); + + return returnValue; +} + +void +_FlickAnimation::CalculateInitializeVelocity(int flickX, int flickY, int flickTime, int* pFlkVelX, int* pFlkVelY) +{ + if (flickTime < 1) // {{110726 lsw2000}} Prevent 'Divide by 0' + { + flickTime = 1; + } + + // Calculateulate Velocity + int velX = flickX * 1000 / flickTime; // in pixel unit + int velY = flickY * 1000 / flickTime; // in pixel unit +// int velX = flickX * 1000/flickTime * m_nMmW/m_nResW; // in mm unit +// int velY = flickY * 1000/flickTime * m_nMmH/m_nResH; // in mm unit + + // Calculateulate Flick Amount using velocity and distance + // (input in mm) = (input in pixel) * (mm/resolution) + // (output in pixel) = (input in mm) * (alpha * resolution) <= (alpha = pixel output per mm input depends on resoultion) + // then (output in pixel) = (input in pixel) * (mm) * (alpha) +// *pFlkVelX = (velX*FLK_WEIGHT_VEL + flickX*FLK_WEIGHT_DIST)*m_nMmW/FLK_ALPHA_PER_MM; +// *pFlkVelY = (velY*FLK_WEIGHT_VEL + flickY*FLK_WEIGHT_DIST)*m_nMmH/FLK_ALPHA_PER_MM; + *pFlkVelX = (velX * FLK_WEIGHT_VEL + flickX * FLK_WEIGHT_DIST) / FLK_ALPHA_PER_PIXEL; + *pFlkVelY = (velY * FLK_WEIGHT_VEL + flickY * FLK_WEIGHT_DIST) / FLK_ALPHA_PER_PIXEL; +} + +int +_FlickAnimation::EstimateInitializeVelocity(int totalDist, int idx) +{ + int flkVel = 0; + int vel = 0; + bool minusFlag = (totalDist < 0); + totalDist = ((totalDist < 0) ? (-totalDist) : (totalDist)); + + // totalDist => vel => FlkVel + int velMax = __align[idx] * 2 / 3 * __flickAnimationFPSRef; + int distMax = velMax / __flickAnimationFPS; + int thres1 = distMax * __flickAnimaionTimeMin / 2; + int thres2 = distMax * __flickAnimationTimeMax / 2; + + if (totalDist < thres1) + { + int velMin = velMax / FLK_ANI_SPEED_MIN_RATIO; + vel = totalDist * __flickAnimationFPS * 2 / __flickAnimaionTimeMin; + flkVel = (vel - velMin) * (FLK_SPEED_THRES1 - FLK_SPEED_MIN) / (velMax - velMin) + FLK_SPEED_MIN; + } + else if (totalDist < thres2) + { + flkVel = (totalDist * 2 / distMax - __flickAnimaionTimeMin) + * (FLK_SPEED_THRES2 - FLK_SPEED_THRES1) / (__flickAnimationTimeMax - __flickAnimaionTimeMin) + FLK_SPEED_THRES1; + } + else + { + int totalDistRemain = totalDist - thres2; + int alpha = __align[idx] * (FLK_ANI_OVERSPEED_END_CNT - FLK_ANI_OVERSPEED_START_CNT - 1); + int accel = (totalDistRemain + alpha / 2) / alpha; + flkVel = FLK_SPEED_THRES2 + accel * FLK_OVERSPEED_STEP; + } + + if (minusFlag) + { + flkVel *= -1; + } + + return flkVel; +} + +// Set Flick Animation Variables from Flick Algorithm result +void +_FlickAnimation::InitializeFlickAmount(int flkVelX, int flkVelY) +{ + InitializeFlick(flkVelX, flkVelY); +} + +void +_FlickAnimation::InitializeFlickAmount(int flkVel) +{ + switch (__flickDirection) + { + case FD_VERTICAL: + InitializeFlick(0, flkVel); + break; + + case FD_HORIZONTAL: + InitializeFlick(flkVel, 0); + break; + + default: + // Error!!! + break; + } +} + +void +_FlickAnimation::InitializeFlick(int flkVelX, int flkVelY) +{ + InitializeTension(); + + __acceleration[_X] = 0; + __acceleration[_Y] = 0; + __drawCount = 0; + + if (flkVelX == 0 && flkVelY == 0) + { + __velocity[_X] = 0; + __velocity[_Y] = 0; + return; + } + + if (flkVelY == 0) + { + __velocity[_Y] = 0; + if (__flickDirection == FD_VERTICAL) + { + return; + } + } + else + { + InitializeFlickXY(flkVelY, _Y); + } + + if (flkVelX == 0) + { + __velocity[_X] = 0; + + if (__flickDirection == FD_HORIZONTAL) + { + return; + } + } + else + { + InitializeFlickXY(flkVelX, _X); + } +} + +void +_FlickAnimation::InitializeFlickXY(int flkVel, int idx) +{ + bool minusFlag = (flkVel < 0); + flkVel = ((flkVel < 0) ? (-flkVel) : (flkVel)); + + if (flkVel < FLK_SPEED_MIN) + { + flkVel = FLK_SPEED_MIN; + } + + // calculate __velocity & __friction based on FlkVel + /************************************************************************** + FlkVel | Vmin ~ Vth1 | Vth1 ~ Vth2 | > Vth2 + __velocity | 0 ~ velMax | velMax | velMax + Accel + Time | Tmin | Tmin ~ Tmax | Tmax + __acceleration | 0 | 0 | (flkVel-Vth2)/Step + **************************************************************************/ + int velMax = __align[idx] * 2 / 3 * __flickAnimationFPSRef; + + if (flkVel < FLK_SPEED_THRES1) + { + int velMin = velMax / FLK_ANI_SPEED_MIN_RATIO; + __velocity[idx] = (flkVel - FLK_SPEED_MIN) * (velMax - velMin) / (FLK_SPEED_THRES1 - FLK_SPEED_MIN) + velMin; + __friction[idx] = __velocity[idx] / __flickAnimaionTimeMin; + } + else if (flkVel < FLK_SPEED_THRES2) + { + __velocity[idx] = velMax; + __friction[idx] = velMax / + ((__flickAnimationTimeMax - + __flickAnimaionTimeMin) * + (flkVel - FLK_SPEED_THRES1) / (FLK_SPEED_THRES2 - FLK_SPEED_THRES1) + __flickAnimaionTimeMin); + } + else + { + __velocity[idx] = velMax; + __friction[idx] = velMax / __flickAnimationTimeMax; + __acceleration[idx] = (flkVel - FLK_SPEED_THRES2 + FLK_OVERSPEED_STEP / 2) / FLK_OVERSPEED_STEP; + } + + if (minusFlag) + { + __velocity[idx] *= -1; + __acceleration[idx] *= -1; + } + + // calculate Minimum Velocity, Friction for slowdown + int deltaMin = 8 * __flickAnimationFPSRef / __flickAnimationFPS * __resolution[idx] / FLK_REF_RESOL_PXL[idx]; + __velocityMin[idx] = deltaMin * __flickAnimationFPS; + __frictionMin[idx] = velMax / __flickAnimationTimeMax * 1 / 2; + + if (__frictionMin[idx] > __friction[idx]) + { + __frictionMin[idx] = __friction[idx]; + } + + if (__friction[idx] == 0) + { + __friction[idx] = 1; + } +} + +// Return next step distance and update Velocity. +int +_FlickAnimation::CalculateNextMove(int* pMoveX, int* pMoveY) +{ + *pMoveX = CalculateNextMoveXY(_X); + *pMoveY = CalculateNextMoveXY(_Y); + + __drawCount++; + + if (*pMoveX == 0 && *pMoveY == 0) + { + return 0; + } + else + { + return 1; + } +} + +int +_FlickAnimation::CalculateNextMove(void) +{ + int moved = 0; + + switch (__flickDirection) + { + case FD_VERTICAL: + moved = CalculateNextMoveXY(_Y); + break; + + case FD_HORIZONTAL: + moved = CalculateNextMoveXY(_X); + break; + + default: + // Error!!! + return 0; + } + __drawCount++; + + return moved; +} + +int +_FlickAnimation::CalculateNextMoveXY(int idx) +{ + if (__velocity[idx] == 0) + { + return 0; + } + + int delta = __velocity[idx] / __flickAnimationFPS; + + // removal reverse Flick effect + if (delta >= __align[idx] / 2 - __margin[idx]) + { + delta = __align[idx] / 2 - __margin[idx]; + } + else if (delta <= -(__align[idx] / 2 - __margin[idx])) + { + delta = -(__align[idx] / 2 - __margin[idx]); + } + + // adding start accelerate effect when fast Flick + if (__acceleration[idx] && __drawCount > FLK_ANI_OVERSPEED_START_CNT && __drawCount < FLK_ANI_OVERSPEED_END_CNT) + { + delta += __align[idx] * __acceleration[idx]; + } + else + { + int deltaNew = delta; + +// if (deltaNew > 10 && deltaNew%(m_alignH/12)) +// deltaNew = (deltaNew/(m_alignH/12)+1)*(m_alignH/12); + +// if (__velocity && delta == 0) +// deltaNew = m_alignH/24; + + delta = deltaNew; + } + + // ceiling RoundOff for smooth stop + if (delta == 0) + { + if (__velocity[idx] > 0) + { + delta = 1; + } + else if (__velocity[idx] < 0) + { + delta = -1; + } + } + +// if (delta == 1 && m_nSlowStopCnt < __flickAnimationFPS) +// { +// return delta; +// } + + // Velocity Decrease according to Friction Coefficient + // V(i+1)= V(i) - u*g*dT + if (__velocity[idx] > __velocityMin[idx] + __friction[idx]) + { + __velocity[idx] -= __friction[idx]; + } + else if (__velocity[idx] > __velocityMin[idx]) + { + __velocity[idx] = __velocityMin[idx]; + __friction[idx] = __frictionMin[idx]; + } + else if (__velocity[idx] > __friction[idx]) + { + __velocity[idx] -= __friction[idx]; + } + else if (__velocity[idx] < -__velocityMin[idx] - __friction[idx]) + { + __velocity[idx] += __friction[idx]; + } + else if (__velocity[idx] < -__velocityMin[idx]) + { + __velocity[idx] = -__velocityMin[idx]; + __friction[idx] = __frictionMin[idx]; + } + else if (__velocity[idx] < -__friction[idx]) + { + __velocity[idx] += __friction[idx]; + } + else + { + __velocity[idx] = 0; + } + + return delta; +} + +void +_FlickAnimation::InitializeTension(void) +{ + if (__tensionStatus[_X] != TENSION_NA) + { + __tensionStatus[_X] = TENSION_DONE; + } + + if (__tensionStatus[_Y] != TENSION_NA) + { + __tensionStatus[_Y] = TENSION_DONE; + } +} + +// start Tension effect and return true upon reaching the end of both. +bool +_FlickAnimation::StartTensionEffect(int pos, int end, int idx) +{ + if (__tensionStatus[idx] == TENSION_NA) + { + return false; + } + + bool reachEndFlag = false; + int vel = 0; + + if (pos > 0) + { + switch (__tensionStatus[idx]) + { + case TENSION_DONE: + // Tension start => calculate final distance (max : Resolution * 1/3) + __tensionDistMax[idx] = __resolution[idx] / 3 * __velocity[idx] / (__align[idx] * 2 / 3 * __flickAnimationFPSRef); + __acceleration[idx] = 0; + __tensionStatus[idx] = TENSION_COMPRESS; + // fall through + + case TENSION_COMPRESS: + vel = (__tensionDistMax[idx] - pos) * __flickAnimationFPS; + + if (vel < __velocity[idx]) + { + __velocity[idx] = vel; + } + + // Before Reaching End (delta > 0) + if (__velocity[idx] / __flickAnimationFPS > 0) + { + break; + } + + // After Reaching End, Tension Release Start + __tensionStatus[idx] = TENSION_RELEASE; + reachEndFlag = true; + // fall through + + case TENSION_RELEASE: + __velocity[idx] = -(pos * __flickAnimationFPS / 2); + + if (__velocity[idx] > -__flickAnimationFPS) + { + __velocity[idx] = -__flickAnimationFPS; // Adjust final position is 0. + } + break; + + default: + break; + } + } + else if (pos < end && pos < 0) + { + int delta = 0; + + if (end > 0) + { + delta = pos; + } + else + { + delta = pos - end; + } + + switch (__tensionStatus[idx]) + { + case TENSION_DONE: + __tensionDistMax[idx] = __resolution[idx] / 3 * __velocity[idx] / (__align[idx] * 2 / 3 * __flickAnimationFPSRef); + __acceleration[idx] = 0; + __tensionStatus[idx] = TENSION_COMPRESS; + // fall through + + case TENSION_COMPRESS: + vel = (__tensionDistMax[idx] - delta) * __flickAnimationFPS; + + if (vel > __velocity[idx]) + { + __velocity[idx] = vel; + } + + // Before Reaching End (delta > 0) + if (__velocity[idx] / __flickAnimationFPS < 0) + { + break; + } + + // After Reaching End, Tension Release Start + __tensionStatus[idx] = TENSION_RELEASE; + reachEndFlag = true; + // fall through + + case TENSION_RELEASE: + __velocity[idx] = -(delta * __flickAnimationFPS / 2); + + if (__velocity[idx] < __flickAnimationFPS) + { + __velocity[idx] = __flickAnimationFPS; + } + break; + + default: + break; + } + } + + if (__velocity[idx] == 0) + { + __tensionStatus[idx] = TENSION_DONE; + } + + return reachEndFlag; +} + +int +_FlickAnimation::GetCurVelocity(int idx) const +{ + return __velocity[idx]; +} + +int +_FlickAnimation::GetCurFriction(int idx) const +{ + return __friction[idx]; +} + +}}} // Tizen::Ui::Controls + diff --git a/src/ui/controls/FUiCtrl_FooterImpl.cpp b/src/ui/controls/FUiCtrl_FooterImpl.cpp new file mode 100644 index 0000000..9fce59d --- /dev/null +++ b/src/ui/controls/FUiCtrl_FooterImpl.cpp @@ -0,0 +1,1907 @@ +// +// 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_FooterImpl.cpp + * @brief This is the implementation file for the _FooterImpl class. + */ + +#include +#include +#include "FUi_AccessibilityContainer.h" +#include "FUi_AccessibilityElement.h" +#include "FUi_Control.h" +#include "FUi_ResourceManager.h" +#include "FUi_UiBuilder.h" +#include "FUiCtrl_ButtonItemImpl.h" +#include "FUiCtrl_FooterImpl.h" +#include "FUiCtrl_FooterItemImpl.h" +#include "FUiCtrl_IActionEventListener.h" +#include "FUiCtrl_PublicActionEvent.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_FooterImpl* +_FooterImpl::CreateFooterImplN(Footer* pControl) +{ + ClearLastResult(); + result r = E_SUCCESS; + + _Toolbar* pCore = null; + + pCore = _Toolbar::CreateToolbarN(false); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pCore, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pCore->InitializeLongPressGesture(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pCore->InitializeFlickGesture(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + _FooterImpl* pFooterImpl = new (std::nothrow) _FooterImpl(pControl, pCore); + + r = CheckConstruction(pCore, pFooterImpl); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + return pFooterImpl; +} + +_FooterImpl::_FooterImpl(Footer* pPublic, _Toolbar* pCore) + : _ControlImpl(pPublic, pCore) + //, __calledBySetItemSelected(false) + , __style(FOOTER_STYLE_BUTTON_TEXT) + , __pPublicActionEvent(null) +{ + result r = GetLastResult(); // Check if _ControlImpl succeeded. + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + pCore->SetStyle(TOOLBAR_TEXT); + + Color tempColor = Color(0); + + GET_COLOR_CONFIG(FOOTER::BG_NORMAL, tempColor); + pCore->SetColor(tempColor); +} + +_FooterImpl::~_FooterImpl(void) +{ + if (__pPublicActionEvent) + { + delete __pPublicActionEvent; + __pPublicActionEvent = null; + } +} + +Footer* +_FooterImpl::GetFooter(void) const +{ + return &const_cast (GetPublic()); +} + +const char* +_FooterImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Controls::Footer"; +} + +const Footer& +_FooterImpl::GetPublic(void) const +{ + return static_cast(_ControlImpl::GetPublic()); +} + +Footer& +_FooterImpl::GetPublic(void) +{ + return static_cast(_ControlImpl::GetPublic()); +} + +const _Toolbar& +_FooterImpl::GetCore(void) const +{ + return static_cast(_ControlImpl::GetCore()); +} + +_Toolbar& +_FooterImpl::GetCore(void) +{ + return static_cast<_Toolbar&>(_ControlImpl::GetCore()); +} + +const _FooterImpl* +_FooterImpl::GetInstance(const Footer& footer) +{ + return static_cast (footer._pControlImpl); +} + +_FooterImpl* +_FooterImpl::GetInstance(Footer& footer) +{ + return static_cast<_FooterImpl*> (footer._pControlImpl); +} + +result +_FooterImpl::AddItem(const FooterItem& item) +{ + result r = CheckItemValidate(item); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(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); + + if (__style == FOOTER_STYLE_SEGMENTED_TEXT || __style == FOOTER_STYLE_SEGMENTED_ICON || __style == FOOTER_STYLE_SEGMENTED_ICON_TEXT + || __style == FOOTER_STYLE_TAB || __style == FOOTER_STYLE_TAB_LARGE) + { + pButton->SetButtonStyle(_BUTTON_STYLE_SEGMENT); + } + + return GetCore().AddItem(pButton); +} + +Color +_FooterImpl::GetButtonColor(ButtonItemStatus status) const +{ + _ButtonStatus tempStatus = ConvertButtonStatus(status); + + return GetCore().GetButtonColor(tempStatus); +} + +Color +_FooterImpl::GetButtonTextColor(ButtonItemStatus status) const +{ + _ButtonStatus tempStatus = ConvertButtonStatus(status); + + return GetCore().GetButtonTextColor(tempStatus); +} + +ButtonItemStatus +_FooterImpl::GetButtonStatus(ButtonPosition position) const +{ + SysTryReturn(NID_UI_CTRL, (IsButtonSet(position) == true), BUTTON_ITEM_STATUS_NORMAL, E_INVALID_OPERATION, + "[E_INVALID_OPERATION] No button item is set at the specified position."); + + _ButtonStatus buttonStatus; + + if (position == BUTTON_POSITION_LEFT) + { + buttonStatus = GetCore().GetButtonStatus(LEFT_BUTTON); + } + else if (position == BUTTON_POSITION_RIGHT) + { + buttonStatus = GetCore().GetButtonStatus(RIGHT_BUTTON); + } + else + { + return BUTTON_ITEM_STATUS_NORMAL; + } + + return ConvertButtonItemStatus(buttonStatus); +} + +ButtonItemStatus +_FooterImpl::GetBackButtonStatus(void) const +{ + SysTryReturn(NID_UI_CTRL, 0, BUTTON_ITEM_STATUS_NORMAL, E_INVALID_OPERATION, + "[E_INVALID_OPERATION] No button item is set at the specified position."); +} + +Color +_FooterImpl::GetItemColor(FooterItemStatus status) const +{ + _ButtonStatus tempStatus = ConvertButtonStatus(status); + + return GetCore().GetItemColor(tempStatus); +} + +int +_FooterImpl::GetItemCount(void) const +{ + return GetCore().GetItemCount(); +} + +result +_FooterImpl::GetItemStatus(int itemIndex, FooterItemStatus& status) const +{ + int count = GetItemCount(); + + SysTryReturnResult(NID_UI_CTRL, (itemIndex >= 0 && itemIndex < count), E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] The itemIndex is out of range."); + + _Button* pButton = GetCore().GetItem(itemIndex); + + SysTryReturnResult(NID_UI_CTRL, pButton, E_SYSTEM, "[E_SYSTEM] Unable to get the item status."); + + status = ConvertFooterItemStatus(pButton->GetButtonStatus()); + + return E_SUCCESS; +} + +Color +_FooterImpl::GetItemTextColor(FooterItemStatus status) const +{ + _ButtonStatus tempStatus = ConvertButtonStatus(status); + + return GetCore().GetItemTextColor(tempStatus); +} + +FooterStyle +_FooterImpl::GetStyle(void) const +{ + return __style; +} + +int +_FooterImpl::GetSelectedItemIndex(void) const +{ + SysTryReturn(NID_UI_CTRL, (__style != FOOTER_STYLE_BUTTON_TEXT && __style != FOOTER_STYLE_BUTTON_ICON && __style != FOOTER_STYLE_BUTTON_ICON_TEXT), -1, + E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] Unable to get the selected item itemIndex because the current style does not support it."); + + return GetCore().GetSelectedItemIndex(); +} + +Color +_FooterImpl::GetColor(void) const +{ + return GetCore().GetColor(); +} + +result +_FooterImpl::InsertItemAt(int itemIndex, const FooterItem& item) +{ + result r = CheckItemValidate(item); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = CheckItemExceed(item); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + int count = GetItemCount(); + + SysTryReturnResult(NID_UI_CTRL, (itemIndex >= 0 && itemIndex <= count), E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] The itemIndex is out of range."); + + _Button* pButton = ConvertFooterItem(item); + + if (__style == FOOTER_STYLE_SEGMENTED_TEXT || __style == FOOTER_STYLE_SEGMENTED_ICON || __style == FOOTER_STYLE_SEGMENTED_ICON_TEXT + || __style == FOOTER_STYLE_TAB || __style == FOOTER_STYLE_TAB_LARGE) + { + pButton->SetButtonStyle(_BUTTON_STYLE_SEGMENT); + } + + return GetCore().InsertItemAt(itemIndex, pButton); +} + +bool +_FooterImpl::IsButtonSet(ButtonPosition position) const +{ + if (position == BUTTON_POSITION_LEFT) + { + return GetCore().IsButtonSet(LEFT_BUTTON); + } + else if (position == BUTTON_POSITION_RIGHT) + { + return GetCore().IsButtonSet(RIGHT_BUTTON); + } + else + { + return false; + } +} + +bool +_FooterImpl::IsBackButtonSet(void) const +{ + return false; +} + +bool +_FooterImpl::IsTabEditModeEnabled(void) const +{ + return GetCore().IsTabEditModeEnabled(); +} + +result +_FooterImpl::RemoveAllButtons(void) +{ + return GetCore().RemoveAllButtons(); +} + +result +_FooterImpl::RemoveButtonAt(ButtonPosition position) +{ + if (position == BUTTON_POSITION_LEFT) + { + return GetCore().RemoveButtonAt(LEFT_BUTTON); + } + else if (position == BUTTON_POSITION_RIGHT) + { + return GetCore().RemoveButtonAt(RIGHT_BUTTON); + } + + return E_SUCCESS; +} + +result +_FooterImpl::RemoveBackButton(void) +{ + return E_SUCCESS; +} + +result +_FooterImpl::RemoveAllItems(void) +{ + return GetCore().RemoveAllItems(); +} + +result +_FooterImpl::RemoveItemAt(int itemIndex) +{ + int count = GetItemCount(); + + SysTryReturnResult(NID_UI_CTRL, (itemIndex >= 0 && itemIndex < count), E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] The itemIndex is out of range."); + + return GetCore().RemoveItemAt(itemIndex); +} + +result +_FooterImpl::SetBackgroundBitmap(const Bitmap* pBitmap) +{ + return GetCore().SetBackgroundBitmap(*pBitmap); +} + +result +_FooterImpl::SetButton(ButtonPosition position, const ButtonItem& button) +{ + 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, + 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 + || __style == FOOTER_STYLE_BUTTON_TEXT || __style == FOOTER_STYLE_BUTTON_ICON || __style == FOOTER_STYLE_BUTTON_ICON_TEXT) + { + SysTryReturnResult(NID_UI_CTRL, (count <= FOOTER_MAX_ITEM_COUNT_WITH_BUTTON), E_SYSTEM, + "[E_SYSTEM] If the item count is larger then 3, no button can be set."); + } + + SysTryReturnResult(NID_UI_CTRL, (position == BUTTON_POSITION_LEFT || position == BUTTON_POSITION_RIGHT), E_INVALID_ARG, + "[E_INVALID_ARG] The position is invalid."); + + _Button* pButton = ConvertButtonItem(button); + + if (position == BUTTON_POSITION_LEFT) + { + return GetCore().SetButton(LEFT_BUTTON, pButton); + } + else if (position == BUTTON_POSITION_RIGHT) + { + return GetCore().SetButton(RIGHT_BUTTON, pButton); + } + + return E_SUCCESS; +} + +result +_FooterImpl::SetButtonColor(ButtonItemStatus status, const Color& color) +{ + _ButtonStatus tempStatus = ConvertButtonStatus(status); + + return GetCore().SetButtonColor(tempStatus, color); +} + +result +_FooterImpl::SetButtonTextColor(ButtonItemStatus status, const Color& color) +{ + _ButtonStatus tempStatus = ConvertButtonStatus(status); + + return GetCore().SetButtonTextColor(tempStatus, color); +} + +result +_FooterImpl::SetBackButton(void) +{ + return E_UNSUPPORTED_OPERATION; +} + +result +_FooterImpl::SetItemAt(int itemIndex, const FooterItem& item) +{ + result r = CheckItemValidate(item); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + int count = GetItemCount(); + + SysTryReturnResult(NID_UI_CTRL, (itemIndex >= 0 && itemIndex < count), E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] The itemIndex is out of range."); + + _Button* pButton = ConvertFooterItem(item); + + if (__style == FOOTER_STYLE_SEGMENTED_TEXT || __style == FOOTER_STYLE_SEGMENTED_ICON || __style == FOOTER_STYLE_SEGMENTED_ICON_TEXT + || __style == FOOTER_STYLE_TAB || __style == FOOTER_STYLE_TAB_LARGE) + { + pButton->SetButtonStyle(_BUTTON_STYLE_SEGMENT); + } + + return GetCore().SetItemAt(itemIndex, pButton); +} + +result +_FooterImpl::SetItemColor(FooterItemStatus status, const Color& color) +{ + _ButtonStatus tempStatus = ConvertButtonStatus(status); + + return GetCore().SetItemColor(tempStatus, color); +} + +result +_FooterImpl::SetItemEnabled(int itemIndex, bool enable) +{ + int count = GetItemCount(); + + SysTryReturnResult(NID_UI_CTRL, (itemIndex >= 0 && itemIndex < count), E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] The itemIndex is out of range."); + + if (__style == FOOTER_STYLE_SEGMENTED_TEXT || __style == FOOTER_STYLE_SEGMENTED_ICON || __style == FOOTER_STYLE_SEGMENTED_ICON_TEXT + || __style == FOOTER_STYLE_TAB || __style == FOOTER_STYLE_TAB_LARGE) + { + // Selected item cannot be disabled. + int selectedItemIndex = GetSelectedItemIndex(); + + if ((selectedItemIndex == itemIndex && enable == false) || (selectedItemIndex == -1 && itemIndex == 0 && enable == false)) + { + SysLogException(NID_UI_CTRL, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The Selected item cannot be disabled."); + return E_INVALID_OPERATION; + } + } + + return GetCore().SetItemEnabled(itemIndex, enable); +} + +result +_FooterImpl::SetItemBadgeIcon(int itemIndex, const Bitmap* pBadgeIcon) +{ + int count = GetItemCount(); + + SysTryReturnResult(NID_UI_CTRL, (itemIndex >= 0 && itemIndex < count), E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] The itemIndex is out of range."); + + return GetCore().SetItemBadgeIcon(itemIndex, pBadgeIcon); +} + +result +_FooterImpl::SetItemTextColor(FooterItemStatus status, const Color& color) +{ + _ButtonStatus tempStatus = ConvertButtonStatus(status); + + return GetCore().SetItemTextColor(tempStatus, color); +} + +result +_FooterImpl::SetButtonEnabled(ButtonPosition position, bool enable) +{ + bool isButtonSet = IsButtonSet(position); + + SysTryReturnResult(NID_UI_CTRL, isButtonSet, E_INVALID_OPERATION, + "[E_INVALID_OPERATION] No button item is set at the specified position."); + + if (position == BUTTON_POSITION_LEFT) + { + return GetCore().SetButtonEnabled(LEFT_BUTTON, enable); + } + else if (position == BUTTON_POSITION_RIGHT) + { + return GetCore().SetButtonEnabled(RIGHT_BUTTON, enable); + } + + return E_INVALID_STATE; +} + +result +_FooterImpl::SetBackButtonEnabled(bool enable) +{ + return E_INVALID_OPERATION; +} + +result +_FooterImpl::SetItemSelected(int itemIndex) +{ + int count = GetItemCount(); + + SysTryReturnResult(NID_UI_CTRL, (itemIndex >= 0 && itemIndex < count), E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] The itemIndex is out of range."); + + SysTryReturnResult(NID_UI_CTRL, (__style != FOOTER_STYLE_BUTTON_ICON && __style != FOOTER_STYLE_BUTTON_TEXT && __style != FOOTER_STYLE_BUTTON_ICON_TEXT), + E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] Unable to get the selected item itemIndex because the current style does not support it."); + + // Disabled item can not selected. + FooterItemStatus status; + result r = GetItemStatus(itemIndex, status); + + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[E_INVALID_STATE] Failed to get item status."); + + SysTryReturnResult(NID_UI_CTRL, (status != FOOTER_ITEM_STATUS_DISABLED), E_INVALID_OPERATION, + "[E_INVALID_OPERATION] The disabled item can not be selected."); + + //__calledBySetItemSelected = true; + + return GetCore().SetItemSelected(itemIndex); +} + +result +_FooterImpl::SetItemNumberedBadgeIcon(int itemIndex, int number) +{ + int count = GetItemCount(); + + SysTryReturnResult(NID_UI_CTRL, (itemIndex >= 0 && itemIndex < count), E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] The itemIndex is out of range."); + + SysTryReturnResult(NID_UI_CTRL, (number >= 0 && number <= FOOTER_NUMBERD_BADGE_ICON_NUMBER_MAX), E_INVALID_ARG, + "[E_INVALID_ARG] The number is invalid."); + + return GetCore().SetItemNumberedBadgeIcon(itemIndex, number); +} + +result +_FooterImpl::SetColor(const Color& color) +{ + return GetCore().SetColor(color); +} + +result +_FooterImpl::SetStyle(FooterStyle style) +{ + RemoveAllItems(); + RemoveAllButtons(); + + __style = style; + + return GetCore().SetStyle(ConvertFooterStyle(__style)); +} + +result +_FooterImpl::SetTabEditModeEnabled(bool enable) +{ + SysTryReturnResult(NID_UI_CTRL, (__style == FOOTER_STYLE_TAB || __style == FOOTER_STYLE_TAB_LARGE), E_UNSUPPORTED_OPERATION, + "[E_UNSUPPORTED_OPERATION] This operation is only for FOOTER_STYLE_TAB or FOOTER_STYLE_TAB_LARGE"); + + return GetCore().SetTabEditModeEnabled(enable); +} + +result +_FooterImpl::SetTransparent(bool transparent) +{ + return GetCore().SetTransparent(transparent); +} + +Rectangle +_FooterImpl::GetButtonBounds(ButtonPosition position) const +{ + bool isButtonSet = IsButtonSet(position); + + SysTryReturn(NID_UI_CTRL, isButtonSet, Rectangle(-1, -1, -1, -1), + E_INVALID_OPERATION, "[E_INVALID_OPERATION] No button item is set at the specified position."); + + Rectangle rect; + + if (position == BUTTON_POSITION_LEFT) + { + rect = GetCore().GetButtonBounds(LEFT_BUTTON); + } + else if (position == BUTTON_POSITION_RIGHT) + { + rect = GetCore().GetButtonBounds(RIGHT_BUTTON); + } + + return rect; +} + +FloatRectangle +_FooterImpl::GetButtonBoundsF(ButtonPosition position) const +{ + bool isButtonSet = IsButtonSet(position); + + SysTryReturn(NID_UI_CTRL, isButtonSet, FloatRectangle(-1.0f, -1.0f, -1.0f, -1.0f), + E_INVALID_OPERATION, "[E_INVALID_OPERATION] No button item is set at the specified position."); + + FloatRectangle rect; + + if (position == BUTTON_POSITION_LEFT) + { + rect = GetCore().GetButtonBoundsF(LEFT_BUTTON); + } + else if (position == BUTTON_POSITION_RIGHT) + { + rect = GetCore().GetButtonBoundsF(RIGHT_BUTTON); + } + + return rect; +} + +void +_FooterImpl::AddActionEventListener(IActionEventListener& listener) +{ + if (__pPublicActionEvent == null) + { + __pPublicActionEvent = _PublicActionEvent::CreateInstanceN(GetPublic()); + + if (IsFailed(GetLastResult())) + { + SysLogException(NID_UI_CTRL, E_SYSTEM, "[E_SYSTEM] System error occurred."); + delete __pPublicActionEvent; + return; + } + } + + __pPublicActionEvent->AddListener(listener); + + GetCore().AddActionEventListener(*this); + + return; +} + +void +_FooterImpl::RemoveActionEventListener(IActionEventListener& listener) +{ + ClearLastResult(); + + SysTryReturnVoidResult(NID_UI_CTRL, __pPublicActionEvent, E_INVALID_STATE, "[E_INVALID_STATE] This instance isn't constructed."); + + // Todo : check fail case of RemoveListener + __pPublicActionEvent->RemoveListener(listener); + + GetCore().RemoveActionEventListener(*this); + + return; +} + +void +_FooterImpl::OnActionPerformed(const _Control& source, int actionId) +{ + if (GetCore().IsInitialDraw() == true && GetCore().GetSelectedItemIndex() == 0) + { + return; + } + + if (__pPublicActionEvent != null) + { + __pPublicActionEvent->Fire(*_PublicActionEvent::CreateActionEventArgN(actionId)); + } + + return; +} + +result +_FooterImpl::CheckItemValidate(const FooterItem& item) +{ + result r = E_SUCCESS; + + 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(); + + if (__style == FOOTER_STYLE_BUTTON_TEXT || __style == FOOTER_STYLE_BUTTON_ICON || __style == FOOTER_STYLE_BUTTON_ICON_TEXT) + { + if (IsButtonSet(BUTTON_POSITION_LEFT)) + { + SysTryReturnResult(NID_UI_CTRL, (count < 3), E_MAX_EXCEEDED, + "[E_MAX_EXCEEDED] The number of items have exceeded the maximum limit."); + } + else + { + if (IsButtonSet(BUTTON_POSITION_RIGHT)) + { + SysTryReturnResult(NID_UI_CTRL, (count < 3), E_MAX_EXCEEDED, + "[E_MAX_EXCEEDED] The number of items have exceeded the maximum limit."); + } + else + { + SysTryReturnResult(NID_UI_CTRL, (count < 5), E_MAX_EXCEEDED, + "[E_MAX_EXCEEDED] The number of items have exceeded the maximum limit."); + } + } + } + else if (__style == FOOTER_STYLE_SEGMENTED_TEXT || __style == FOOTER_STYLE_SEGMENTED_ICON || __style == FOOTER_STYLE_SEGMENTED_ICON_TEXT) + { + if (IsButtonSet(BUTTON_POSITION_LEFT)) + { + SysTryReturnResult(NID_UI_CTRL, (count < 3), E_MAX_EXCEEDED, + "[E_MAX_EXCEEDED] The number of items have exceeded the maximum limit."); + } + else + { + if (IsButtonSet(BUTTON_POSITION_RIGHT)) + { + SysTryReturnResult(NID_UI_CTRL, (count < 3), E_MAX_EXCEEDED, + "[E_MAX_EXCEEDED] The number of items have exceeded the maximum limit."); + } + else + { + SysTryReturnResult(NID_UI_CTRL, (count < 4), E_MAX_EXCEEDED, + "[E_MAX_EXCEEDED] The number of items have exceeded the maximum limit."); + } + } + } + else if (__style == FOOTER_STYLE_TAB || __style == FOOTER_STYLE_TAB_LARGE) + { + SysTryReturnResult(NID_UI_CTRL, (count < 15), E_MAX_EXCEEDED, + "[E_MAX_EXCEEDED] The number of items have exceeded the maximum limit."); + } + + return r; +} + +_Button* +_FooterImpl::ConvertButtonItem(const ButtonItem& buttonItem) +{ + _Button* pButton = _Button::CreateButtonN(); + + float buttonItemWidth = 0.0f; + float buttonItemHeight = 0.0f; + + GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_WIDTH, GetCore().GetOrientation(), buttonItemWidth); + GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_HEIGHT, GetCore().GetOrientation(), buttonItemHeight); + + pButton->SetMargin(0.0f, 0.0f, 0.0f, 0.0f); + pButton->SetBounds(FloatRectangle(0.0f, 0.0f, buttonItemWidth, buttonItemHeight)); + + pButton->SetActionId(buttonItem.GetActionId()); + + pButton->SetText(buttonItem.GetText()); + + pButton->SetTextMaxLine(2); + + float fontSize = 0.0f; + float multilineFontSize = 0.0f; + result r = E_SUCCESS; + + r = GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_FONT_SIZE, GetCore().GetOrientation(), fontSize); + if (!IsFailed(r)) + { + pButton->SetTextSize(fontSize, FONT_STYLE_BOLD); + } + + r = GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_MULTILINE_FONT_SIZE, GetCore().GetOrientation(), multilineFontSize); + if (!IsFailed(r)) + { + pButton->SetMultilineTextSize(multilineFontSize); + } + + float iconSize = 0.0f; + + GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_ICON_SIZE, GetCore().GetOrientation(), iconSize); //63 + + Bitmap* pIconBitmap = null; + + pIconBitmap = const_cast(buttonItem.__pImpl->GetIcon(BUTTON_ITEM_STATUS_NORMAL)); + + if (pIconBitmap) + { + pIconBitmap->Scale(FloatDimension(iconSize, iconSize)); + + pButton->SetBitmap(_BUTTON_STATUS_NORMAL, FloatPoint(0.0f, 0.0f), *pIconBitmap); + pButton->SetBitmap(_BUTTON_STATUS_DISABLED, FloatPoint(0.0f, 0.0f), *pIconBitmap); + pButton->SetBitmap(_BUTTON_STATUS_PRESSED, FloatPoint(0.0f, 0.0f), *pIconBitmap); + pButton->SetBitmap(_BUTTON_STATUS_HIGHLIGHTED, FloatPoint(0.0f, 0.0f), *pIconBitmap); + } + + pIconBitmap = const_cast(buttonItem.__pImpl->GetIcon(BUTTON_ITEM_STATUS_PRESSED)); + + if (pIconBitmap) + { + pIconBitmap->Scale(FloatDimension(iconSize, iconSize)); + + pButton->SetBitmap(_BUTTON_STATUS_PRESSED, FloatPoint(0.0f, 0.0f), *pIconBitmap); + } + + pIconBitmap = const_cast(buttonItem.__pImpl->GetIcon(BUTTON_ITEM_STATUS_HIGHLIGHTED)); + + if (pIconBitmap) + { + pIconBitmap->Scale(FloatDimension(iconSize, iconSize)); + + pButton->SetBitmap(_BUTTON_STATUS_HIGHLIGHTED, FloatPoint(0.0f, 0.0f), *pIconBitmap); + } + + pIconBitmap = const_cast(buttonItem.__pImpl->GetIcon(BUTTON_ITEM_STATUS_DISABLED)); + + if (pIconBitmap) + { + pIconBitmap->Scale(FloatDimension(iconSize, iconSize)); + + pButton->SetBitmap(_BUTTON_STATUS_DISABLED, FloatPoint(0.0f, 0.0f), *pIconBitmap); + } + + Bitmap* pNormalBackgroundBitmap = null; + Bitmap* pDisabledBackgroundBitmap = null; + Bitmap* pPressedBackgroundBitmap = null; + Bitmap* pHighlightedBackgroundBitmap = null; + + Bitmap* pColorReplacedBitmap = null; + + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pNormalBackgroundBitmap); + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pDisabledBackgroundBitmap); + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pPressedBackgroundBitmap); + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pHighlightedBackgroundBitmap); + + if (pNormalBackgroundBitmap) + { + pColorReplacedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pNormalBackgroundBitmap, Color::GetColor(COLOR_ID_MAGENTA), + GetCore().GetButtonColor(_BUTTON_STATUS_NORMAL)); + + if (GetCore().GetButtonColor(_BUTTON_STATUS_NORMAL).GetAlpha() != 0xFF) + { + pColorReplacedBitmap->SetAlphaConstant(GetCore().GetButtonColor(_BUTTON_STATUS_NORMAL).GetAlpha()); + } + + pButton->SetBackgroundBitmap(_BUTTON_STATUS_NORMAL, *pColorReplacedBitmap); + + delete pColorReplacedBitmap; + delete pNormalBackgroundBitmap; + } + + if (pDisabledBackgroundBitmap) + { + pColorReplacedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDisabledBackgroundBitmap, Color::GetColor(COLOR_ID_MAGENTA), + GetCore().GetButtonColor(_BUTTON_STATUS_DISABLED)); + + if (GetCore().GetButtonColor(_BUTTON_STATUS_DISABLED).GetAlpha() != 0xFF) + { + pColorReplacedBitmap->SetAlphaConstant(GetCore().GetButtonColor(_BUTTON_STATUS_DISABLED).GetAlpha()); + } + + pButton->SetBackgroundBitmap(_BUTTON_STATUS_DISABLED, *pColorReplacedBitmap); + + delete pColorReplacedBitmap; + delete pDisabledBackgroundBitmap; + } + + if (pPressedBackgroundBitmap) + { + pColorReplacedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pPressedBackgroundBitmap, Color::GetColor(COLOR_ID_MAGENTA), + GetCore().GetButtonColor(_BUTTON_STATUS_PRESSED)); + + if (GetCore().GetButtonColor(_BUTTON_STATUS_PRESSED).GetAlpha() != 0xFF) + { + pColorReplacedBitmap->SetAlphaConstant(GetCore().GetButtonColor(_BUTTON_STATUS_PRESSED).GetAlpha()); + } + + pButton->SetBackgroundBitmap(_BUTTON_STATUS_PRESSED, *pColorReplacedBitmap); + + delete pColorReplacedBitmap; + delete pPressedBackgroundBitmap; + } + + if (pHighlightedBackgroundBitmap) + { + pColorReplacedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pHighlightedBackgroundBitmap, Color::GetColor(COLOR_ID_MAGENTA), + GetCore().GetButtonColor(_BUTTON_STATUS_HIGHLIGHTED)); + + if (GetCore().GetButtonColor(_BUTTON_STATUS_HIGHLIGHTED).GetAlpha() != 0xFF) + { + pColorReplacedBitmap->SetAlphaConstant(GetCore().GetButtonColor(_BUTTON_STATUS_HIGHLIGHTED).GetAlpha()); + } + + pButton->SetBackgroundBitmap(_BUTTON_STATUS_HIGHLIGHTED, *pColorReplacedBitmap); + + delete pColorReplacedBitmap; + delete pHighlightedBackgroundBitmap; + } + + if (buttonItem.__pImpl->GetBackgroundBitmap(BUTTON_ITEM_STATUS_NORMAL) != null) + { + pButton->SetToolbarItemBackgroundBitmap(_BUTTON_STATUS_NORMAL, *buttonItem.__pImpl->GetBackgroundBitmap(BUTTON_ITEM_STATUS_NORMAL)); + } + if (buttonItem.__pImpl->GetBackgroundBitmap(BUTTON_ITEM_STATUS_PRESSED) != null) + { + pButton->SetToolbarItemBackgroundBitmap(_BUTTON_STATUS_PRESSED, *buttonItem.__pImpl->GetBackgroundBitmap(BUTTON_ITEM_STATUS_PRESSED)); + } + if (buttonItem.__pImpl->GetBackgroundBitmap(BUTTON_ITEM_STATUS_HIGHLIGHTED) != null) + { + pButton->SetToolbarItemBackgroundBitmap(_BUTTON_STATUS_HIGHLIGHTED, *buttonItem.__pImpl->GetBackgroundBitmap(BUTTON_ITEM_STATUS_HIGHLIGHTED)); + } + if (buttonItem.__pImpl->GetBackgroundBitmap(BUTTON_ITEM_STATUS_DISABLED) != null) + { + pButton->SetToolbarItemBackgroundBitmap(_BUTTON_STATUS_DISABLED, *buttonItem.__pImpl->GetBackgroundBitmap(BUTTON_ITEM_STATUS_DISABLED)); + } + + if (buttonItem.__pImpl->__accessibilityHint.GetLength() > 0) + { + _AccessibilityContainer* pContainer = pButton->GetAccessibilityContainer(); + if (pContainer) + { + _AccessibilityElement* pElement = pContainer->GetChildElement(L"ButtonText"); + if (pElement) + { + pElement->SetHint(buttonItem.__pImpl->__accessibilityHint); + } + } + } + + return pButton; +} + +_Button* +_FooterImpl::ConvertFooterItem(const FooterItem& footerItem) +{ + _Button* pButton = _Button::CreateButtonN(); + + float minItemLength = 0.0f; + + GET_SHAPE_CONFIG(FOOTER::ITEM_MINIMUM_WIDTH, GetCore().GetOrientation(), minItemLength); + + pButton->SetBounds(FloatRectangle(0.0f, 0.0f, minItemLength, minItemLength)); + + pButton->SetActionId(footerItem.GetActionId()); + + if (__style != FOOTER_STYLE_BUTTON_ICON && __style != FOOTER_STYLE_SEGMENTED_ICON) + { + pButton->SetText(footerItem.GetText()); + } + + pButton->SetTextMaxLine(2); + + float fontSize = 0.0f; + float iconSize = 0.0f; + + result r = E_SUCCESS; + + bool customTheme = false; + + if (__style == FOOTER_STYLE_SEGMENTED_TEXT || __style == FOOTER_STYLE_SEGMENTED_ICON + || __style == FOOTER_STYLE_SEGMENTED_ICON_TEXT || __style == FOOTER_STYLE_TAB || __style == FOOTER_STYLE_TAB_LARGE) + { + r = GET_SHAPE_CONFIG(FOOTER::SEGMENTED_ITEM_FONT_SIZE, GetCore().GetOrientation(), fontSize); + + if (footerItem.GetText() != L"" && __style != FOOTER_STYLE_TAB_LARGE && __style != FOOTER_STYLE_SEGMENTED_ICON) + { + GET_SHAPE_CONFIG(HEADER::TAB_ITEM_ICON_SIZE_WITH_TEXT, GetCore().GetOrientation(), iconSize); //45 + } + else + { + GET_SHAPE_CONFIG(HEADER::TAB_ITEM_ICON_SIZE, GetCore().GetOrientation(), iconSize); // 63 + } + + Bitmap* pSelectedBitmap = null; + Bitmap* pColorReplacedBitmap = null; + Color selectedBitmapColor; + + GET_BITMAP_CONFIG_N(FOOTER::TAB_ITEM_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, pSelectedBitmap); + GET_COLOR_CONFIG(FOOTER::SELECTED_BAR_BG_NORMAL, selectedBitmapColor); + + pColorReplacedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pSelectedBitmap, Color::GetColor(COLOR_ID_MAGENTA), selectedBitmapColor); + + if (__style == FOOTER_STYLE_SEGMENTED_TEXT || __style == FOOTER_STYLE_SEGMENTED_ICON || __style == FOOTER_STYLE_SEGMENTED_ICON_TEXT) + { + if (GetCore().IsTransparent() == true) + { + customTheme = IS_CUSTOM_BITMAP(FOOTER::SEGMENTED_ITEM_TRANSLUCENT_BG_SELECTED); + } + else + { + customTheme = IS_CUSTOM_BITMAP(FOOTER::SEGMENTED_ITEM_BG_SELECTED); + } + } + else if (__style == FOOTER_STYLE_TAB || __style == FOOTER_STYLE_TAB_LARGE) + { + if (GetCore().IsTransparent() == true) + { + customTheme = IS_CUSTOM_BITMAP(FOOTER::TAB_ITEM_TRANSLUCENT_BG_SELECTED); + } + else + { + customTheme = IS_CUSTOM_BITMAP(FOOTER::TAB_ITEM_BG_SELECTED); + } + } + + if (pColorReplacedBitmap && customTheme == false) + { + pButton->SetUnderlineBitmap(*pColorReplacedBitmap); + } + + delete pColorReplacedBitmap; + delete pSelectedBitmap; + + if (__style == FOOTER_STYLE_TAB_LARGE) + { + pButton->SetTabTextSlide(true); + } + } + else if (__style == FOOTER_STYLE_BUTTON_TEXT || __style == FOOTER_STYLE_BUTTON_ICON || __style == FOOTER_STYLE_BUTTON_ICON_TEXT) + { + r = GET_SHAPE_CONFIG(FOOTER::FOOTER_ITEM_FONT_SIZE, GetCore().GetOrientation(), fontSize); + + if (footerItem.GetText() != L"" && __style != FOOTER_STYLE_BUTTON_ICON) + { + GET_SHAPE_CONFIG(FOOTER::FOOTER_ITEM_BUTTON_STYLE_ICON_SIZE_WITH_TEXT, GetCore().GetOrientation(), iconSize); //45 + } + else + { + GET_SHAPE_CONFIG(FOOTER::FOOTER_ITEM_BUTTON_STYLE_ICON_SIZE, GetCore().GetOrientation(), iconSize); //63 + } + } + + if (!IsFailed(r)) + { + pButton->SetTextSize(fontSize, FONT_STYLE_BOLD); + } + + Bitmap* pIconBitmap = null; + + if (__style != FOOTER_STYLE_BUTTON_TEXT && __style != FOOTER_STYLE_SEGMENTED_TEXT) + { + pIconBitmap = const_cast(footerItem.__pImpl->GetIcon(FOOTER_ITEM_STATUS_NORMAL)); + if (pIconBitmap) + { + pIconBitmap->Scale(FloatDimension(iconSize, iconSize)); + + pButton->SetBitmap(_BUTTON_STATUS_NORMAL, FloatPoint(0.0f, 0.0f), *pIconBitmap); + pButton->SetBitmap(_BUTTON_STATUS_PRESSED, FloatPoint(0.0f, 0.0f), *pIconBitmap); + pButton->SetBitmap(_BUTTON_STATUS_SELECTED, FloatPoint(0.0f, 0.0f), *pIconBitmap); + pButton->SetBitmap(_BUTTON_STATUS_HIGHLIGHTED, FloatPoint(0.0f, 0.0f), *pIconBitmap); + pButton->SetBitmap(_BUTTON_STATUS_DISABLED, FloatPoint(0.0f, 0.0f), *pIconBitmap); + } + + pIconBitmap = const_cast(footerItem.__pImpl->GetIcon(FOOTER_ITEM_STATUS_PRESSED)); + + if (pIconBitmap) + { + pIconBitmap->Scale(FloatDimension(iconSize, iconSize)); + + pButton->SetBitmap(_BUTTON_STATUS_PRESSED, FloatPoint(0.0f, 0.0f), *pIconBitmap); + } + + pIconBitmap = const_cast(footerItem.__pImpl->GetIcon(FOOTER_ITEM_STATUS_SELECTED)); + + if (pIconBitmap) + { + pIconBitmap->Scale(FloatDimension(iconSize, iconSize)); + + pButton->SetBitmap(_BUTTON_STATUS_SELECTED, FloatPoint(0.0f, 0.0f), *pIconBitmap); + } + + pIconBitmap = const_cast(footerItem.__pImpl->GetIcon(FOOTER_ITEM_STATUS_HIGHLIGHTED)); + + if (pIconBitmap) + { + pIconBitmap->Scale(FloatDimension(iconSize, iconSize)); + + pButton->SetBitmap(_BUTTON_STATUS_HIGHLIGHTED, FloatPoint(0.0f, 0.0f), *pIconBitmap); + } + + pIconBitmap = const_cast(footerItem.__pImpl->GetIcon(FOOTER_ITEM_STATUS_DISABLED)); + + if (pIconBitmap) + { + pIconBitmap->Scale(FloatDimension(iconSize, iconSize)); + + pButton->SetBitmap(_BUTTON_STATUS_DISABLED, FloatPoint(0.0f, 0.0f), *pIconBitmap); + } + } + + if (footerItem.__pImpl->GetBackgroundBitmap(FOOTER_ITEM_STATUS_NORMAL) != null) + { + pButton->SetToolbarItemBackgroundBitmap(_BUTTON_STATUS_NORMAL, + *footerItem.__pImpl->GetBackgroundBitmap(FOOTER_ITEM_STATUS_NORMAL)); + } + if (footerItem.__pImpl->GetBackgroundBitmap(FOOTER_ITEM_STATUS_PRESSED) != null) + { + pButton->SetToolbarItemBackgroundBitmap(_BUTTON_STATUS_PRESSED, + *footerItem.__pImpl->GetBackgroundBitmap(FOOTER_ITEM_STATUS_PRESSED)); + } + if (footerItem.__pImpl->GetBackgroundBitmap(FOOTER_ITEM_STATUS_SELECTED) != null) + { + pButton->SetToolbarItemBackgroundBitmap(_BUTTON_STATUS_SELECTED, + *footerItem.__pImpl->GetBackgroundBitmap(FOOTER_ITEM_STATUS_SELECTED)); + } + if (footerItem.__pImpl->GetBackgroundBitmap(FOOTER_ITEM_STATUS_HIGHLIGHTED) != null) + { + pButton->SetToolbarItemBackgroundBitmap(_BUTTON_STATUS_HIGHLIGHTED, + *footerItem.__pImpl->GetBackgroundBitmap(FOOTER_ITEM_STATUS_HIGHLIGHTED)); + } + if (footerItem.__pImpl->GetBackgroundBitmap(FOOTER_ITEM_STATUS_DISABLED) != null) + { + pButton->SetToolbarItemBackgroundBitmap(_BUTTON_STATUS_DISABLED, + *footerItem.__pImpl->GetBackgroundBitmap(FOOTER_ITEM_STATUS_DISABLED)); + } + + if (footerItem.__pImpl->__accessibilityHint.GetLength() > 0) + { + _AccessibilityContainer* pContainer = pButton->GetAccessibilityContainer(); + if (pContainer) + { + _AccessibilityElement* pElement = pContainer->GetChildElement(L"ButtonText"); + if (pElement) + { + pElement->SetHint(footerItem.__pImpl->__accessibilityHint); + } + } + } + + return pButton; +} + +void +_FooterImpl::OnChangeLayout(_ControlOrientation orientation) +{ + GetCore().OnChangeLayout(orientation); + + return; +} + +result +_FooterImpl::SetButtonBadgeIcon(ButtonPosition position, const Bitmap* pBadgeIcon) +{ + SysTryReturnResult(NID_UI_CTRL, (position == BUTTON_POSITION_LEFT || position == BUTTON_POSITION_RIGHT), E_SYSTEM, + "[E_SYSTEM] The position is invalid."); + + bool isButtonSet = IsButtonSet(position); + + SysTryReturnResult(NID_UI_CTRL, isButtonSet, E_INVALID_STATE, + "[E_INVALID_STATE] No button item is set at the specified position."); + + if (position == BUTTON_POSITION_LEFT) + { + return GetCore().SetButtonBadgeIcon(LEFT_BUTTON, pBadgeIcon); + } + else + { + return GetCore().SetButtonBadgeIcon(RIGHT_BUTTON, pBadgeIcon); + } +} + +result +_FooterImpl::SetButtonNumberedBadgeIcon(ButtonPosition position, int number) +{ + SysTryReturnResult(NID_UI_CTRL, (position == BUTTON_POSITION_LEFT || position == BUTTON_POSITION_RIGHT), E_SYSTEM, + "[E_SYSTEM] The position is invalid."); + + bool isButtonSet = IsButtonSet(position); + + SysTryReturnResult(NID_UI_CTRL, isButtonSet, E_INVALID_STATE, + "[E_INVALID_STATE] No button item is set at the specified position."); + + SysTryReturnResult(NID_UI_CTRL, (0 <= number && number <= FOOTER_NUMBERD_BADGE_ICON_NUMBER_MAX), E_INVALID_ARG, + "[E_INVALID_ARG] The number is invalid."); + + if (position == BUTTON_POSITION_LEFT) + { + return GetCore().SetButtonNumberedBadgeIcon(LEFT_BUTTON, number); + } + else + { + return GetCore().SetButtonNumberedBadgeIcon(RIGHT_BUTTON, number); + } +} + +ButtonItemStatus +_FooterImpl::ConvertButtonItemStatus(_ButtonStatus status) const +{ + switch (status) + { + case _BUTTON_STATUS_NORMAL: + return BUTTON_ITEM_STATUS_NORMAL; + break; + + case _BUTTON_STATUS_DISABLED: + return BUTTON_ITEM_STATUS_DISABLED; + break; + + case _BUTTON_STATUS_PRESSED: + return BUTTON_ITEM_STATUS_PRESSED; + break; + + case _BUTTON_STATUS_HIGHLIGHTED: + return BUTTON_ITEM_STATUS_HIGHLIGHTED; + break; + + default: + return BUTTON_ITEM_STATUS_DISABLED; + break; + } +} + +FooterItemStatus +_FooterImpl::ConvertFooterItemStatus(_ButtonStatus status) const +{ + switch (status) + { + case _BUTTON_STATUS_NORMAL: + return FOOTER_ITEM_STATUS_NORMAL; + break; + + case _BUTTON_STATUS_DISABLED: + return FOOTER_ITEM_STATUS_DISABLED; + break; + + case _BUTTON_STATUS_PRESSED: + return FOOTER_ITEM_STATUS_PRESSED; + break; + + case _BUTTON_STATUS_HIGHLIGHTED: + return FOOTER_ITEM_STATUS_HIGHLIGHTED; + break; + + case _BUTTON_STATUS_SELECTED: + return FOOTER_ITEM_STATUS_SELECTED; + break; + + default: + return FOOTER_ITEM_STATUS_DISABLED; + break; + } +} + +_ButtonStatus +_FooterImpl::ConvertButtonStatus(ButtonItemStatus status) const +{ + switch (status) + { + case BUTTON_ITEM_STATUS_NORMAL: + return _BUTTON_STATUS_NORMAL; + break; + + case BUTTON_ITEM_STATUS_DISABLED: + return _BUTTON_STATUS_DISABLED; + break; + + case BUTTON_ITEM_STATUS_PRESSED: + return _BUTTON_STATUS_PRESSED; + break; + + case BUTTON_ITEM_STATUS_HIGHLIGHTED: + return _BUTTON_STATUS_HIGHLIGHTED; + break; + + default: + return _BUTTON_STATUS_DISABLED; + break; + } +} + +_ButtonStatus +_FooterImpl::ConvertButtonStatus(FooterItemStatus status) const +{ + switch (status) + { + case FOOTER_ITEM_STATUS_NORMAL: + return _BUTTON_STATUS_NORMAL; + break; + + case FOOTER_ITEM_STATUS_DISABLED: + return _BUTTON_STATUS_DISABLED; + break; + + case FOOTER_ITEM_STATUS_PRESSED: + return _BUTTON_STATUS_PRESSED; + break; + + case FOOTER_ITEM_STATUS_HIGHLIGHTED: + return _BUTTON_STATUS_HIGHLIGHTED; + break; + + case FOOTER_ITEM_STATUS_SELECTED: + return _BUTTON_STATUS_SELECTED; + break; + + default: + return _BUTTON_STATUS_DISABLED; + break; + } +} + +ToolbarStyle +_FooterImpl::ConvertFooterStyle(FooterStyle style) +{ + ToolbarStyle viewStyle = TOOLBAR_TEXT; + + switch (style) + { + case FOOTER_STYLE_TAB: + viewStyle = TOOLBAR_TAB; + break; + + case FOOTER_STYLE_SEGMENTED_TEXT: + // fall through + + case FOOTER_STYLE_SEGMENTED_ICON_TEXT: + // fall through + + case FOOTER_STYLE_SEGMENTED_ICON: + viewStyle = TOOLBAR_SEGMENTED; + break; + + case FOOTER_STYLE_BUTTON_TEXT: + viewStyle = TOOLBAR_TEXT; + break; + + case FOOTER_STYLE_BUTTON_ICON: + viewStyle = TOOLBAR_ICON; + break; + + case FOOTER_STYLE_BUTTON_ICON_TEXT: + viewStyle = TOOLBAR_ICON_TEXT; + break; + + case FOOTER_STYLE_TAB_LARGE: + viewStyle = TOOLBAR_TAB_LARGE; + break; + + default: + break; + } + + return viewStyle; +} + + +class _FooterMaker + : public _UiBuilderControlMaker +{ +public: + _FooterMaker(_UiBuilder* uibuilder) + : _UiBuilderControlMaker(uibuilder){}; + virtual ~_FooterMaker(){}; + static _UiBuilderControlMaker* GetInstance(_UiBuilder* uibuilder) + { + _FooterMaker* pFooterMaker = new (std::nothrow) _FooterMaker(uibuilder); + return pFooterMaker; + }; +protected: + virtual Control* Make(_UiBuilderControl* pControl) + { + Footer* pFooter = null; + + String elementString; + int opacity = 0; + int numberedBadge = 0; + Color color; + + //Construct + FooterStyle fstyle = FOOTER_STYLE_BUTTON_TEXT; + Form* pForm = static_cast(GetContainer()); + pFooter = pForm->GetFooter(); + + if (null == pFooter) + { + return null; + } + + if (pControl->GetElement(L"footerStyle", elementString)) + { + if (elementString.Equals(L"FOOTER_STYLE_BUTTON_TEXT", false)) + { + fstyle = FOOTER_STYLE_BUTTON_TEXT; + } + else if (elementString.Equals(L"FOOTER_STYLE_BUTTON_ICON", false)) + { + fstyle = FOOTER_STYLE_BUTTON_ICON; + } + else if (elementString.Equals(L"FOOTER_STYLE_BUTTON_ICON_TEXT", false)) + { + fstyle = FOOTER_STYLE_BUTTON_ICON_TEXT; + } + else if (elementString.Equals(L"FOOTER_STYLE_SEGMENTED_TEXT", false)) + { + fstyle = FOOTER_STYLE_SEGMENTED_TEXT; + } + else if (elementString.Equals(L"FOOTER_STYLE_SEGMENTED_ICON", false)) + { + fstyle = FOOTER_STYLE_SEGMENTED_ICON; + } + else if (elementString.Equals(L"FOOTER_STYLE_SEGMENTED_ICON_TEXT", false)) + { + fstyle = FOOTER_STYLE_SEGMENTED_ICON_TEXT; + } + else if (elementString.Equals(L"FOOTER_STYLE_TAB", false)) + { + fstyle = FOOTER_STYLE_TAB; + } + else if (elementString.Equals(L"FOOTER_STYLE_TAB_LARGE", false)) + { + fstyle = FOOTER_STYLE_TAB_LARGE; + } + + pFooter->SetStyle(fstyle); + } + + if (pControl->GetElement(L"backgroundBitmapPath", elementString) || pControl->GetElement(L"BGBitmapPath", elementString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(elementString); + pFooter->SetBackgroundBitmap(pBitmap); + } + + // footer color + if (pControl->GetElement(L"colorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + + if (pControl->GetElement(L"color", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + pFooter->SetColor(color); + } + + // normal button + if (pControl->GetElement(L"normalButtonColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + + if (pControl->GetElement(L"normalButtonColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + pFooter->SetButtonColor(BUTTON_ITEM_STATUS_NORMAL, color); + } + + if (pControl->GetElement(L"normalButtonTextColor", elementString)) + { + ConvertStringToColor(elementString, color); + pFooter->SetButtonTextColor(BUTTON_ITEM_STATUS_NORMAL, color); + } + + // pressed button + if (pControl->GetElement(L"pressedButtonColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + + if (pControl->GetElement(L"pressedButtonColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + pFooter->SetButtonColor(BUTTON_ITEM_STATUS_PRESSED, color); + } + + if (pControl->GetElement(L"pressedButtonTextColor", elementString)) + { + ConvertStringToColor(elementString, color); + pFooter->SetButtonTextColor(BUTTON_ITEM_STATUS_PRESSED, color); + } + + // highlighted button + if (pControl->GetElement(L"highlightedButtonColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + + if (pControl->GetElement(L"highlightedButtonColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + pFooter->SetButtonColor(BUTTON_ITEM_STATUS_HIGHLIGHTED, color); + } + + if (pControl->GetElement(L"highlightedButtonTextColor", elementString)) + { + ConvertStringToColor(elementString, color); + pFooter->SetButtonTextColor(BUTTON_ITEM_STATUS_HIGHLIGHTED, color); + } + + // disabled button + if (pControl->GetElement(L"disabledButtonColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + + if (pControl->GetElement(L"disabledButtonColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + pFooter->SetButtonColor(BUTTON_ITEM_STATUS_DISABLED, color); + } + + if (pControl->GetElement(L"disabledButtonTextColor", elementString)) + { + ConvertStringToColor(elementString, color); + pFooter->SetButtonTextColor(BUTTON_ITEM_STATUS_DISABLED, color); + } + + if (pControl->GetElement(L"normalItemColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + + if (pControl->GetElement(L"normalItemColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + pFooter->SetItemColor(FOOTER_ITEM_STATUS_NORMAL, color); + } + + if (pControl->GetElement(L"normalItemTextColor", elementString)) + { + ConvertStringToColor(elementString, color); + pFooter->SetItemTextColor(FOOTER_ITEM_STATUS_NORMAL, color); + } + + // pressed item + if (pControl->GetElement(L"pressedItemColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + + if (pControl->GetElement(L"pressedItemColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + pFooter->SetItemColor(FOOTER_ITEM_STATUS_PRESSED, color); + } + + if (pControl->GetElement(L"pressedItemTextColor", elementString)) + { + ConvertStringToColor(elementString, color); + pFooter->SetItemTextColor(FOOTER_ITEM_STATUS_PRESSED, color); + } + + // selected item + if (pControl->GetElement(L"selectedItemColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + + if (pControl->GetElement(L"selectedItemColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + pFooter->SetItemColor(FOOTER_ITEM_STATUS_SELECTED, color); + } + + if (pControl->GetElement(L"selectedItemTextColor", elementString)) + { + ConvertStringToColor(elementString, color); + pFooter->SetItemTextColor(FOOTER_ITEM_STATUS_SELECTED, color); + } + + // highlighted item + if (pControl->GetElement(L"highlightedItemColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + + if (pControl->GetElement(L"highlightedItemColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + pFooter->SetItemColor(FOOTER_ITEM_STATUS_HIGHLIGHTED, color); + } + + if (pControl->GetElement(L"highlightedItemTextColor", elementString)) + { + ConvertStringToColor(elementString, color); + pFooter->SetItemTextColor(FOOTER_ITEM_STATUS_HIGHLIGHTED, color); + } + + if (pControl->GetElement(L"disabledItemColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + + if (pControl->GetElement(L"disabledItemColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + pFooter->SetItemColor(FOOTER_ITEM_STATUS_DISABLED, color); + } + + if (pControl->GetElement(L"disabledItemTextColor", elementString)) + { + ConvertStringToColor(elementString, color); + pFooter->SetItemTextColor(FOOTER_ITEM_STATUS_DISABLED, color); + } + + int itemCnt = pControl->GetItemCount(); + ButtonItemStyle buttonItemStyle = BUTTON_ITEM_STYLE_TEXT; + ButtonPosition buttonPosition = BUTTON_POSITION_LEFT; + String footerItemString; + + for (int i = 0; i < itemCnt; i++) + { + footerItemString = pControl->GetItemName(i); + + if (footerItemString.Equals(L"footerItem", false)) + { + FooterItem footerItem; + + if (pControl->GetItemElement(i, "actionId", elementString)) + { + int actionId =0; + Base::Integer::Parse(elementString, actionId); + footerItem.Construct(actionId); + } + + if (pControl->GetItemElement(i, "text", elementString)) + { + footerItem.SetText(elementString); + } + + // footeritem background bitmap path setting + // normal bg bitmap + if (pControl->GetItemElement(i, "normalBGBitmapPath", elementString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(elementString); + footerItem.SetBackgroundBitmap(FOOTER_ITEM_STATUS_NORMAL, pBitmap); + } + + // pressed bg bitmap + if (pControl->GetItemElement(i, "pressedBGBitmapPath", elementString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(elementString); + footerItem.SetBackgroundBitmap(FOOTER_ITEM_STATUS_PRESSED, pBitmap); + } + + // selected bg bitmap + if (pControl->GetItemElement(i, "selectedBGBitmapPath", elementString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(elementString); + footerItem.SetBackgroundBitmap(FOOTER_ITEM_STATUS_SELECTED, pBitmap); + } + + // highlighted bg bitmap + if (pControl->GetItemElement(i, "highlightedBGBitmapPath", elementString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(elementString); + footerItem.SetBackgroundBitmap(FOOTER_ITEM_STATUS_HIGHLIGHTED, pBitmap); + } + + // disabled bg bitmap + if (pControl->GetItemElement(i, "disabledBGBitmapPath", elementString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(elementString); + footerItem.SetBackgroundBitmap(FOOTER_ITEM_STATUS_DISABLED, pBitmap); + } + + // footeritem icon bitmap setting + // normal + if (pControl->GetItemElement(i, "normalIconPath", elementString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(elementString); + footerItem.SetIcon(FOOTER_ITEM_STATUS_NORMAL, pBitmap); + } + + // pressed + if (pControl->GetItemElement(i, "pressedIconPath", elementString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(elementString); + footerItem.SetIcon(FOOTER_ITEM_STATUS_PRESSED, pBitmap); + } + + // selected + if (pControl->GetItemElement(i, "selectedIconPath", elementString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(elementString); + footerItem.SetIcon(FOOTER_ITEM_STATUS_SELECTED, pBitmap); + } + + // highlighted + if (pControl->GetItemElement(i, "highlightedIconPath", elementString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(elementString); + footerItem.SetIcon(FOOTER_ITEM_STATUS_HIGHLIGHTED, pBitmap); + } + + // disabled + if (pControl->GetItemElement(i, "disabledIconPath", elementString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(elementString); + footerItem.SetIcon(FOOTER_ITEM_STATUS_DISABLED, pBitmap); + } + + if (pControl->GetItemElement(i, L"accessibilityHint", elementString)) + { + _FooterItemImpl::GetInstance(footerItem)->SetAccessibilityHint(elementString); + } + + pFooter->AddItem(footerItem); + + if (pControl->GetItemElement(i, "footerItemBadgeIconPath", elementString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(elementString); + result r = pFooter->SetItemBadgeIcon(i, pBitmap); + SysLogException(NID_UI_CTRL, r, "[E_INVALID_STATE] Failed to set an icon"); + } + + if (pControl->GetItemElement(i, "footerItemNumberedBadgeIcon", elementString)) + { + Base::Integer::Parse(elementString, numberedBadge); + result r = pFooter->SetItemNumberedBadgeIcon(i, numberedBadge); + SysLogException(NID_UI_CTRL, r, "[E_INVALID_STATE] Failed to set a numbered icon"); + } + } + else if (footerItemString.Equals(L"buttonItem", false)) + { + ButtonItem buttonItem; + + // set button style + if (pControl->GetItemElement(i, "style", elementString)) + { + if (elementString.Equals(L"BUTTON_ITEM_STYLE_TEXT", false)) + { + buttonItemStyle = BUTTON_ITEM_STYLE_TEXT; + } + else if (elementString.Equals(L"BUTTON_ITEM_STYLE_ICON", false)) + { + buttonItemStyle = BUTTON_ITEM_STYLE_ICON; + } + } + + // set button position + if (pControl->GetItemElement(i, "position", elementString)) + { + if (elementString.Equals(L"BUTTON_POSITION_LEFT", false)) + { + buttonPosition = BUTTON_POSITION_LEFT; + } + else if (elementString.Equals(L"BUTTON_POSITION_RIGHT", false)) + { + buttonPosition = BUTTON_POSITION_RIGHT; + } + } + + // Construct + if (pControl->GetItemElement(i, "actionId", elementString)) + { + int actionId = 0; + Base::Integer::Parse(elementString, actionId); + buttonItem.Construct(buttonItemStyle, actionId); + } + + // SetText + if (pControl->GetItemElement(i, "text", elementString)) + { + buttonItem.SetText(elementString); + } + + // buttonitem background bitmap path setting + // normal bg bitmap + if (pControl->GetItemElement(i, "normalBGBitmapPath", elementString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(elementString); + buttonItem.SetBackgroundBitmap(BUTTON_ITEM_STATUS_NORMAL, pBitmap); + } + + // pressed bg bitmap + if (pControl->GetItemElement(i, "pressedBGBitmapPath", elementString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(elementString); + buttonItem.SetBackgroundBitmap(BUTTON_ITEM_STATUS_PRESSED, pBitmap); + } + + // highlighted bg bitmap + if (pControl->GetItemElement(i, "highlightedBGBitmapPath", elementString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(elementString); + buttonItem.SetBackgroundBitmap(BUTTON_ITEM_STATUS_HIGHLIGHTED, pBitmap); + } + + // disabled bg bitmap + if (pControl->GetItemElement(i, "disabledBGBitmapPath", elementString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(elementString); + buttonItem.SetBackgroundBitmap(BUTTON_ITEM_STATUS_DISABLED, pBitmap); + } + + // buttonitem icon bitmap setting + if (pControl->GetItemElement(i, "normalIconPath", elementString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(elementString); + buttonItem.SetIcon(BUTTON_ITEM_STATUS_NORMAL, pBitmap); + } + + if (pControl->GetItemElement(i, "pressedIconPath", elementString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(elementString); + buttonItem.SetIcon(BUTTON_ITEM_STATUS_PRESSED, pBitmap); + } + + if (pControl->GetItemElement(i, "highlightedIconPath", elementString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(elementString); + buttonItem.SetIcon(BUTTON_ITEM_STATUS_HIGHLIGHTED, pBitmap); + } + + if (pControl->GetItemElement(i, "disabledIconPath", elementString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(elementString); + buttonItem.SetIcon(BUTTON_ITEM_STATUS_DISABLED, pBitmap); + } + + if (pControl->GetItemElement(i, L"accessibilityHint", elementString)) + { + _ButtonItemImpl::GetInstance(buttonItem)->SetAccessibilityHint(elementString); + } + + pFooter->SetButton(buttonPosition, buttonItem); + + if (pControl->GetItemElement(i, "buttonItemBadgeIconPath", elementString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(elementString); + result r = pFooter->SetButtonBadgeIcon(buttonPosition, pBitmap); + SysLogException(NID_UI_CTRL, r, "[E_INVALID_STATE] Failed to set an icon"); + } + + if (pControl->GetItemElement(i, "buttonItemNumberedBadgeIcon", elementString)) + { + Base::Integer::Parse(elementString, numberedBadge); + result r = pFooter->SetButtonNumberedBadgeIcon(buttonPosition, numberedBadge); + SysLogException(NID_UI_CTRL, r, "[E_INVALID_STATE] Failed to set a numbered icon"); + } + } + } + + return pFooter; + } + +private: + +}; + +_FooterRegister::_FooterRegister() +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->RegisterControl(L"Footer", _FooterMaker::GetInstance); +} + +_FooterRegister::~_FooterRegister() +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->UnregisterControl(L"Footer"); +} + +static _FooterRegister FooterRegisterToUiBuilder; + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_FooterItemImpl.cpp b/src/ui/controls/FUiCtrl_FooterItemImpl.cpp new file mode 100644 index 0000000..380ea1d --- /dev/null +++ b/src/ui/controls/FUiCtrl_FooterItemImpl.cpp @@ -0,0 +1,167 @@ +// +// 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_FooterItemImpl.cpp +* @brief This is the implementation file for _FooterItemImpl class. +*/ + +#include +#include "FUiCtrl_FooterItemImpl.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_FooterItemImpl::_FooterItemImpl(FooterItem* pPublic) + : __actionId(-1) + , __itemText(L"") + , __accessibilityHint(L"") +{ + for (int i = 0; i < FOOTER_ITEM_MAX_STATE_COUNT; i++) + { + __pIconBitmap[i] = null; + __pFooterItemBackgroundBitmap[i] = null; + } +} + +_FooterItemImpl::~_FooterItemImpl(void) +{ + for (int i = 0; i < FOOTER_ITEM_MAX_STATE_COUNT; i++) + { + __pIconBitmap[i] = null; + __pFooterItemBackgroundBitmap[i] = null; + } +} + +const _FooterItemImpl* +_FooterItemImpl::GetInstance(const FooterItem& footerItem) +{ + return static_cast (footerItem.__pImpl); +} + +_FooterItemImpl* +_FooterItemImpl::GetInstance(FooterItem& footerItem) +{ + return static_cast<_FooterItemImpl*> (footerItem.__pImpl); +} + +result +_FooterItemImpl::Construct(int actionId) +{ + SysTryReturnResult(NID_UI_CTRL, actionId >= FOOTER_ITEM_ACTION_ID_MIN, + E_INVALID_ARG, "[E_INVALID_ARG] The actionId is invalid."); + + __actionId = actionId; + __itemText = String(L""); + + for (int i = 0; i < FOOTER_ITEM_MAX_STATE_COUNT; i++) + { + __pIconBitmap[i] = null; + __pFooterItemBackgroundBitmap[i] = null; + } + + return E_SUCCESS; +} + +int +_FooterItemImpl::GetActionId(void) const +{ + ClearLastResult(); + + return __actionId; +} + +const Bitmap* +_FooterItemImpl::GetBackgroundBitmap(FooterItemStatus status) const +{ + ClearLastResult(); + + SysTryReturn(NID_UI_CTRL, (status >= FOOTER_ITEM_STATUS_NORMAL && status < FOOTER_ITEM_MAX_STATE_COUNT), null, E_INVALID_ARG, + "[E_INVALID_ARG] status is invalid."); + + return __pFooterItemBackgroundBitmap[status]; +} + +const Bitmap* +_FooterItemImpl::GetIcon(FooterItemStatus status) const +{ + ClearLastResult(); + + SysTryReturn(NID_UI_CTRL, (status >= FOOTER_ITEM_STATUS_NORMAL && status < FOOTER_ITEM_MAX_STATE_COUNT), null, E_INVALID_ARG, + "[E_INVALID_ARG] status is invalid."); + + return __pIconBitmap[status]; +} + +String +_FooterItemImpl::GetText(void) const +{ + ClearLastResult(); + + return __itemText; +} + +result +_FooterItemImpl::SetActionId(int actionId) +{ + SysTryReturnResult(NID_UI_CTRL, actionId >= FOOTER_ITEM_ACTION_ID_MIN, + E_INVALID_ARG, "[E_INVALID_ARG] The actionId is invalid."); + + __actionId = actionId; + + return E_SUCCESS; +} + +result +_FooterItemImpl::SetBackgroundBitmap(FooterItemStatus status, const Bitmap* pBitmap) +{ + SysTryReturnResult(NID_UI_CTRL, (status >= FOOTER_ITEM_STATUS_NORMAL && status < FOOTER_ITEM_MAX_STATE_COUNT), E_INVALID_ARG, + "[E_INVALID_ARG] status is invalid."); + + __pFooterItemBackgroundBitmap[status] = pBitmap; + + return E_SUCCESS; +} + +result +_FooterItemImpl::SetIcon(FooterItemStatus status, const Bitmap* pIcon) +{ + SysTryReturnResult(NID_UI_CTRL, (status >= FOOTER_ITEM_STATUS_NORMAL && status < FOOTER_ITEM_MAX_STATE_COUNT), E_INVALID_ARG, + "[E_INVALID_ARG] status is invalid."); + + __pIconBitmap[status] = pIcon; + + return E_SUCCESS; +} + +result +_FooterItemImpl::SetText(const String& text) +{ + __itemText = text; + + return E_SUCCESS; +} + +void +_FooterItemImpl::SetAccessibilityHint(const Tizen::Base::String& hint) +{ + __accessibilityHint = hint; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_Form.cpp b/src/ui/controls/FUiCtrl_Form.cpp new file mode 100644 index 0000000..0e570ab --- /dev/null +++ b/src/ui/controls/FUiCtrl_Form.cpp @@ -0,0 +1,3587 @@ +// +// 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_Form.cpp + * @brief This is the implementation file for the _Form class. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "FUiAnim_ControlVisualElement.h" +#include "FUiAnim_VisualElementImpl.h" +#include "FUi_ResourceManager.h" +#include "FUi_EcoreEvasMgr.h" +#include "FUi_EcoreEvas.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_DataBindingContext.h" +#include "FUi_AccessibilityContainer.h" +#include "FUi_AccessibilityManager.h" +#include "FUiCtrl_Form.h" +#include "FUiCtrl_Frame.h" +#include "FUiCtrl_FormPresenter.h" +#include "FUiCtrl_Toolbar.h" +#include "FUiCtrl_Tab.h" +#include "FUiCtrl_ActionEvent.h" +#include "FUiCtrl_OverlayRegionImpl.h" +#include "FUiCtrl_OverlayPanelImpl.h" +#include "FUiCtrl_IFormBackEventListener.h" +#include "FUiCtrl_Indicator.h" +#include "FUi_SystemUtilImpl.h" +#include "FUiCtrl_FormImpl.h" + +using namespace std; +using namespace Tizen::Ui::Animations; +using namespace Tizen::Ui; +using namespace Tizen::Base; // Rotation +using namespace Tizen::Base::Runtime; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_Form::_Form(void) + : __pFormPresenter(null) + , __pFormBackEventListener(null) + , __pFormMenuEventListener(null) + , __formStyle(0) + , __oldFormStyle(0) + , __pActionEvent(null) + , __pHeader(null) + , __pFooter(null) + , __pTab(null) + , __pIndicator(null) + , __transparentIndicator(false) + , __transparentHeader(false) + , __transparentFooter(false) + , __transparentTab(false) + , __indicatorShowState(false) + , __deflated(false) + , __deflatedHeight(0.0f) + , __overlayRegionCount(0) + , __pOverlayerRegionImplArray(null) + , __softkeyCount(SOFTKEY_COUNT + 1) + , __updatedSoftkeyCount(0) + , __keypadShowstate(false) + , __clipboardShowstate(false) + , __alreadyStopKeySent(false) + , __pFormOrientationstatusEventListener(null) + , __pFocusControl(null) + , __pFocusTraversalControl(null) +{ + Color color; + result r = GET_COLOR_CONFIG(FORM::BG_NORMAL,color); + if (r == E_SUCCESS) + { + SetBackgroundColor(color); + } + else + { + SetBackgroundColor(0xff000000); + } + + _FormPresenter* pPresenter = new (std::nothrow) _FormPresenter(*this); + SysTryReturnVoidResult(NID_UI_CTRL, pPresenter, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + + SetPresenter(*pPresenter); + + for (int i = 0; i < __softkeyCount; i++) + { + __actionId[_SOFTKEY_0 + i] = 0; + __softkeyText[_SOFTKEY_0 + i] = String(); + __showSoftkey[_SOFTKEY_0 + i] = false; + __enableSoftkey[_SOFTKEY_0 + i] = false; + } + + for (int i = 0; i < SOFTKEY_COUNT + 1; i++) + { + __pSoftkeyNormalBitmap[_SOFTKEY_0 + i] = null; + __pSoftkeyDisabledBitmap[_SOFTKEY_0 + i] = null; + __pSoftkeyPressedBitmap[_SOFTKEY_0 + i] = null; + __pSoftkeyHighlightedBitmap[_SOFTKEY_0 + i] = null; + + __pSoftkeyNormalEffectBitmap[_SOFTKEY_0 + i] = null; + __pSoftkeyPressedEffectBitmap[_SOFTKEY_0 + i] = null; + + __pTextSoftkeyNormalBitmap[_SOFTKEY_0 + i] = null; + __pTextSoftkeyDisabledBitmap[_SOFTKEY_0 + i] = null; + __pTextSoftkeyPressedBitmap[_SOFTKEY_0 + i] = null; + __pTextSoftkeyHighlightedBitmap[_SOFTKEY_0 + i] = null; + + __pTextSoftkeyNormalEffectBitmap[_SOFTKEY_0 + i] = null; + __pTextSoftkeyPressedEffectBitmap[_SOFTKEY_0 + i] = null; + + __pSoftkeyNormalIcon[_SOFTKEY_0 + i] = null; + __pSoftkeyDisabledIcon[_SOFTKEY_0 + i] = null; + __pSoftkeyPressedIcon[_SOFTKEY_0 + i] = null; + __pSoftkeyHighlightedIcon[_SOFTKEY_0 + i] = null; + } + + //create data binding context + _DataBindingContext* pContext = new (std::nothrow) _DataBindingContext(*this); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, pContext && GetLastResult() == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + SetDataBindingContext(pContext); + + ClearLastResult(); + GetAccessibilityContainer()->Activate(true); + SetFocusNavigateEnabled(false); + return; + +CATCH: + delete pContext; +} + +_Form::~_Form(void) +{ + delete __pFormPresenter; + __pFormPresenter = null; + + if (__pActionEvent) + { + delete __pActionEvent; + __pActionEvent = null; + } + + for (int i = 0; i < SOFTKEY_COUNT+1 ; i++) + { + if (__pSoftkeyNormalBitmap[i]) + { + delete __pSoftkeyNormalBitmap[i]; + __pSoftkeyNormalBitmap[i] = null; + } + + if (__pSoftkeyDisabledBitmap[i]) + { + delete __pSoftkeyDisabledBitmap[i]; + __pSoftkeyDisabledBitmap[i] = null; + } + + if (__pSoftkeyPressedBitmap[i]) + { + delete __pSoftkeyPressedBitmap[i]; + __pSoftkeyPressedBitmap[i] = null; + } + + if (__pSoftkeyHighlightedBitmap[i]) + { + delete __pSoftkeyHighlightedBitmap[i]; + __pSoftkeyHighlightedBitmap[i] = null; + } + + if (__pSoftkeyNormalEffectBitmap[i]) + { + delete __pSoftkeyNormalEffectBitmap[i]; + __pSoftkeyNormalEffectBitmap[i] = null; + } + + if (__pSoftkeyPressedEffectBitmap[i]) + { + delete __pSoftkeyPressedEffectBitmap[i]; + __pSoftkeyPressedEffectBitmap[i] = null; + } + + if (__pTextSoftkeyNormalBitmap[i]) + { + delete __pTextSoftkeyNormalBitmap[i]; + __pTextSoftkeyNormalBitmap[i] = null; + } + + if (__pTextSoftkeyDisabledBitmap[i]) + { + delete __pTextSoftkeyDisabledBitmap[i]; + __pTextSoftkeyDisabledBitmap[i] = null; + } + + if (__pTextSoftkeyPressedBitmap[i]) + { + delete __pTextSoftkeyPressedBitmap[i]; + __pTextSoftkeyPressedBitmap[i] = null; + } + + if (__pTextSoftkeyHighlightedBitmap[i]) + { + delete __pTextSoftkeyHighlightedBitmap[i]; + __pTextSoftkeyHighlightedBitmap[i] = null; + } + + if (__pTextSoftkeyNormalEffectBitmap[i]) + { + delete __pTextSoftkeyNormalEffectBitmap[i]; + __pTextSoftkeyNormalEffectBitmap[i] = null; + } + + if (__pTextSoftkeyPressedEffectBitmap[i]) + { + delete __pTextSoftkeyPressedEffectBitmap[i]; + __pTextSoftkeyPressedEffectBitmap[i] = null; + } + + if (__pSoftkeyNormalIcon[i]) + { + delete __pSoftkeyNormalIcon[i]; + __pSoftkeyNormalIcon[i] = null; + } + + if (__pSoftkeyDisabledIcon[i]) + { + delete __pSoftkeyDisabledIcon[i]; + __pSoftkeyDisabledIcon[i] = null; + } + + if (__pSoftkeyPressedIcon[i]) + { + delete __pSoftkeyPressedIcon[i]; + __pSoftkeyPressedIcon[i] = null; + } + + if (__pSoftkeyHighlightedIcon[i]) + { + delete __pSoftkeyHighlightedIcon[i]; + __pSoftkeyHighlightedIcon[i] = null; + } + } + + if (__pOverlayerRegionImplArray != null) + { + int maxCount = OverlayRegion::GetMaxCount(); + + for (int i = 0; i < maxCount; i++) + { + if (__pOverlayerRegionImplArray[i]) + { + OverlayRegion* _pOverlayRegion = __pOverlayerRegionImplArray[i]->GetOverlayRegion(); + delete _pOverlayRegion; + } + } + + delete[] __pOverlayerRegionImplArray; + } + + if (__pIndicator) + { + __pIndicator->DeleteIndicatorObject(); + __pIndicator->Destroy(); + __pIndicator = null; + } + + ClearLastResult(); +} + +_Form* +_Form::CreateFormN(void) +{ + _Form* pForm = null; + + 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."); + + pForm->AcquireHandle(); + + SetLastResult(E_SUCCESS); + + return pForm; + +CATCH: + delete pForm; + + return null; +} + +result +_Form::SetPresenter(const _FormPresenter& formPresenter) +{ + __pFormPresenter = const_cast <_FormPresenter*>(&formPresenter); + + return E_SUCCESS; +} + +void +_Form::OnDraw(void) +{ + if (__pFormPresenter) + { + __pFormPresenter->Draw(); + } + + if (__formStyle & FORM_STYLE_SOFTKEY_0 || __formStyle & FORM_STYLE_SOFTKEY_1 || __formStyle & FORM_STYLE_OPTIONKEY) + { + if (__pFooter) + { + UpdateSoftkey(__formStyle); + } + } + if(unlikely((_AccessibilityManager::IsActivated()))) + { + _AccessibilityManager::GetInstance()->RequestAutoReading(_ACCESSIBILITY_AUTO_READING_MODE_FIRST_ITEM); + } + return; +} + +void +_Form::SetFormBackEventListener(_IFormBackEventListener* pFormBackEventListener) +{ + __pFormBackEventListener = pFormBackEventListener; + + if (__pFooter) + { + __pFooter->SetBackEventListener(*this, ID_BACK_BUTTON); + } + if (__pHeader) + { + __pHeader->SetBackEventListener(*this, ID_BACK_BUTTON); + } + + SetLastResult(E_SUCCESS); +} + +void +_Form::SetFormMenuEventListener(_IFormMenuEventListener* pFormMenuEventListener) +{ + __pFormMenuEventListener = pFormMenuEventListener; + + if (__pFooter) + { + __pFooter->SetMenuEventListener(*this, ID_MENU_BUTTON); + } + + SetLastResult(E_SUCCESS); +} + +unsigned long +_Form::GetFormStyle(void) const +{ + return __formStyle; +} + +_Toolbar* +_Form::GetFooter(void) const +{ + return __pFooter; +} + +_Toolbar* +_Form::GetHeader(void) const +{ + return __pHeader; +} + +_Tab* +_Form::GetTab(void) const +{ + return __pTab; +} + +_Indicator* +_Form::GetIndicator(void) const +{ + return __pIndicator; +} + +String +_Form::GetTitleText(void) const +{ + if (__pHeader && (__formStyle & FORM_STYLE_TITLE)) + { + return __pHeader->GetTitleText(); + } + else + { + return String(L""); + } +} + +HorizontalAlignment +_Form::GetTitleTextHorizontalAlignment(void) const +{ + if (__pHeader && (__formStyle & FORM_STYLE_TITLE)) + { + return __pHeader->GetTitleTextHorizontalAlignment(); + } + else + { + SysLog(NID_UI_CTRL, "[E_SYSTEM] The title is not valid."); + return ALIGNMENT_LEFT; + } +} + +OverlayRegion* +_Form::GetOverlayRegionN(const Rectangle& rect, OverlayRegionType regionType) +{ + FloatRectangle rectF = _CoordinateSystemUtils::ConvertToFloat(rect); + return GetOverlayRegionN(rectF, regionType); +} + +OverlayRegion* +_Form::GetOverlayRegionN(const FloatRectangle& rect, OverlayRegionType regionType) +{ + ClearLastResult(); + + int maxCount = OverlayRegion::GetMaxCount(); + SysTryReturn(NID_UI_CTRL, maxCount > 0, null, E_SYSTEM, "[E_SYSTEM] The maximum count of OverlayRegion is invalid.", maxCount); + + //Initialize OverlayRegion array + if (__pOverlayerRegionImplArray == null) + { + __pOverlayerRegionImplArray = new (std::nothrow) _OverlayRegionImpl*[maxCount]; + SysTryReturn(NID_UI_CTRL, __pOverlayerRegionImplArray != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + + for (int index = 0; index < maxCount; index++) + { + __pOverlayerRegionImplArray[index] = null; + } + __overlayRegionCount = 0; + } + + //Get bounds of OverlayRegion + FloatRectangle formLogicalBoundsF(GetClientBoundsF()); + FloatRectangle formPhysicalBoundsF = _CoordinateSystemUtils::Transform(CoordinateSystem::AlignToDevice(formLogicalBoundsF)); + + FloatPoint overlayPositionF(formLogicalBoundsF.x + rect.x, formLogicalBoundsF.y + rect.y); + FloatRectangle overlaylLogicalBoundsF(overlayPositionF.x, overlayPositionF.y, rect.width, rect.height); + FloatRectangle overlayPhysicalBoundsF = _CoordinateSystemUtils::Transform(CoordinateSystem::AlignToDevice(overlaylLogicalBoundsF)); + Rectangle overlayPhysicalBounds = _CoordinateSystemUtils::ConvertToInteger(overlayPhysicalBoundsF); + + Rectangle formPhysicalBounds = _CoordinateSystemUtils::ConvertToInteger(formPhysicalBoundsF); + SysTryReturn(NID_UI_CTRL, overlayPhysicalBounds.width <= formPhysicalBounds.width && overlayPhysicalBounds.height <= formPhysicalBounds.height, + null, E_INVALID_ARG, "[E_INVALID_ARG] The size of input rectangle is over maximum size."); + + result r = _OverlayRegionImpl::IsValidBounds(overlayPhysicalBounds); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + bool modified = false; + bool evaluated = OverlayRegion::EvaluateBounds(OVERLAY_REGION_EVALUATION_OPTION_LESS_THAN, overlaylLogicalBoundsF, modified); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, evaluated && r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (modified) + { + overlayPhysicalBoundsF = _CoordinateSystemUtils::Transform(CoordinateSystem::AlignToDevice(overlaylLogicalBoundsF)); + overlayPhysicalBounds = _CoordinateSystemUtils::ConvertToInteger(overlayPhysicalBoundsF); + + int unitWidth = OverlayRegion::GetWidthUnit(); + if(overlayPhysicalBounds.width % unitWidth == 1) + { + overlayPhysicalBounds.width -= 1; + } + else if (overlayPhysicalBounds.width % unitWidth == (unitWidth - 1)) + { + overlayPhysicalBounds.width += 1; + } + + int unitHeight = OverlayRegion::GetHeightUnit(); + if(overlayPhysicalBounds.height % unitHeight == 1) + { + overlayPhysicalBounds.height -= 1; + } + else if (overlayPhysicalBounds.height % unitHeight == (unitHeight - 1)) + { + overlayPhysicalBounds.height += 1; + } + } + SysSecureLog(NID_UI_CTRL, "The current bounds of overlay region is [%.3f, %.3f, %.3f, %.3f]" + , overlaylLogicalBoundsF.x, overlaylLogicalBoundsF.y, overlaylLogicalBoundsF.width, overlaylLogicalBoundsF.height); + + //Check for using OverlayPanel simutaneously + for (int index = 0; index < GetChildCount(); index++) + { + _OverlayPanel* pOverlayPanel = dynamic_cast <_OverlayPanel*>(GetChild(index)); + SysTryReturn(NID_UI_CTRL, pOverlayPanel == null, null, E_SYSTEM, "[E_SYSTEM] Failed to get Overlay Region. Using OverlayRegion mixed with OverlayPanel is not supported."); + } + + //Check count of existing OverlayRegion + int index = 0; + for (index = 0; index < maxCount; index++) + { + if (__pOverlayerRegionImplArray[index] == null) + { + break; + } + SysTryReturn(NID_UI_CTRL, index < maxCount, null, E_SYSTEM, "[E_SYSTEM] The Overlay Region already exceeds permitted maximum limit."); + } + + //Create OverlayRegion + unique_ptr<_OverlayRegionImpl> pOverlayRegionImpl(new (std::nothrow) _OverlayRegionImpl()); + SysTryReturn(NID_UI_CTRL, pOverlayRegionImpl != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] failed to make the OverlayRegionImpl instance!"); + + r = pOverlayRegionImpl->Construct(this, regionType, rect, overlaylLogicalBoundsF, overlayPhysicalBounds); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + unique_ptr pOverlayRegion(pOverlayRegionImpl->CreateOverlayRegionN()); + SysTryReturn(NID_UI_CTRL, pOverlayRegion != null, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + pOverlayRegionImpl->SetFormArrayIndex(index); + __pOverlayerRegionImplArray[index] = pOverlayRegionImpl.release(); + __overlayRegionCount++; + + return pOverlayRegion.release(); +} + +int +_Form::GetOverlayRegionCount(void) const +{ + return __overlayRegionCount; +} + +void +_Form::MoveOverlayRegion(bool top) +{ + if (__pOverlayerRegionImplArray == null) + { + return; + } + for (int i = 0; i < OverlayRegion::GetMaxCount(); i++) + { + if (__pOverlayerRegionImplArray[i] != null) + { + if (top) + { + __pOverlayerRegionImplArray[i]->GoForeground(); + } + else + { + __pOverlayerRegionImplArray[i]->GoBackground(); + } + } + } +} + +void +_Form::CreateSoftkey(unsigned long formStyle) +{ + FloatDimension softkeyDimension(0.0f, 0.0f); + FloatDimension softkeyDisplayDimension(0.0f, 0.0f); + FloatDimension optionkeyDimension(0.0f, 0.0f); + float fontSize = 0.0f; + float multilineFontSize = 0.0f; + float leftSoftkeyLeftMargin = 0.0f; + float rightSoftkeyLeftMargin = 0.0f; + float softkeyTopMargin = 0.0f; + + Color softkeyNormalBackgroundColor; + Color softkeyDisabledBackgroundColor; + Color softkeyPressedBackgroundColor; + Color softkeyHighlightedBackgroundColor; + + Color softkeyNormalTextColor; + Color softkeyDisabledTextColor; + Color softkeyPressedTextColor; + Color softkeyHighlightedTextColor; + + Color softkeyNormalIconColor; + Color softkeyDisabledIconColor; + Color softkeyPressedIconColor; + Color softkeyHighlightedIconColor; + + GET_DIMENSION_CONFIG(FOOTER::SOFTKEY_RECT, GetOrientation(), softkeyDimension); + GET_DIMENSION_CONFIG(FOOTER::SOFTKEY_DISPLAY_RECT_WITH_TEXT, GetOrientation(), softkeyDisplayDimension); + GET_DIMENSION_CONFIG(FOOTER::OPTIONKEY_RECT, GetOrientation(), optionkeyDimension); + GET_SHAPE_CONFIG(FOOTER::SOFTKEY_TEXT_SIZE, GetOrientation(), fontSize); + GET_SHAPE_CONFIG(FOOTER::SOFTKEY_MULTILINE_TEXT_SIZE, GetOrientation(), multilineFontSize); + GET_SHAPE_CONFIG(FOOTER::SOFTKEY_0_LEFT_MARGIN, GetOrientation(), leftSoftkeyLeftMargin); + GET_SHAPE_CONFIG(FOOTER::SOFTKEY_1_LEFT_MARGIN, GetOrientation(), rightSoftkeyLeftMargin); + GET_SHAPE_CONFIG(FOOTER::SOFTKEY_TOP_MARGIN, GetOrientation(), softkeyTopMargin); + + GET_COLOR_CONFIG(FOOTER::SOFTKEY_BG_NORMAL, softkeyNormalBackgroundColor); + GET_COLOR_CONFIG(FOOTER::SOFTKEY_BG_DISABLED, softkeyDisabledBackgroundColor); + GET_COLOR_CONFIG(FOOTER::SOFTKEY_BG_PRESSED, softkeyPressedBackgroundColor); + GET_COLOR_CONFIG(FOOTER::SOFTKEY_BG_HIGHLIGHTED, softkeyHighlightedBackgroundColor); + + GET_COLOR_CONFIG(FOOTER::SOFTKEY_TEXT_NORMAL, softkeyNormalTextColor); + GET_COLOR_CONFIG(FOOTER::SOFTKEY_TEXT_DISABLED, softkeyDisabledTextColor); + GET_COLOR_CONFIG(FOOTER::SOFTKEY_TEXT_PRESSED, softkeyPressedTextColor); + GET_COLOR_CONFIG(FOOTER::SOFTKEY_TEXT_HIGHLIGHTED, softkeyHighlightedTextColor); + + GET_COLOR_CONFIG(FOOTER::SOFTKEY_ICON_NORMAL, softkeyNormalIconColor); + GET_COLOR_CONFIG(FOOTER::SOFTKEY_ICON_DISABLED, softkeyDisabledIconColor); + GET_COLOR_CONFIG(FOOTER::SOFTKEY_ICON_PRESSED, softkeyPressedIconColor); + GET_COLOR_CONFIG(FOOTER::SOFTKEY_ICON_HIGHLIGHTED, softkeyHighlightedIconColor); + + result r = E_SUCCESS; + + if (__pFooter != null) + { + __pFooter->SetStyle(TOOLBAR_SOFTKEY); + } + + if (formStyle & FORM_STYLE_SOFTKEY_0) + { + if (__pSoftkeyNormalBitmap[_SOFTKEY_0]) + { + delete __pSoftkeyNormalBitmap[_SOFTKEY_0]; + __pSoftkeyNormalBitmap[_SOFTKEY_0] = null; + } + 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; + } + 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; + } + 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; + } + 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; + } + 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; + } + 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; + } + 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; + } + 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; + } + 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; + } + 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; + } + 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; + } + 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]) + { + delete __pSoftkeyNormalIcon[_SOFTKEY_0]; + __pSoftkeyNormalIcon[_SOFTKEY_0] = null; + } + 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]) + { + delete __pSoftkeyDisabledIcon[_SOFTKEY_0]; + __pSoftkeyDisabledIcon[_SOFTKEY_0] = null; + } + 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]) + { + delete __pSoftkeyPressedIcon[_SOFTKEY_0]; + __pSoftkeyPressedIcon[_SOFTKEY_0] = null; + } + 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]) + { + delete __pSoftkeyHighlightedIcon[_SOFTKEY_0]; + __pSoftkeyHighlightedIcon[_SOFTKEY_0] = null; + } + 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(); + + if (pButton) + { + pButton->SetSize(softkeyDimension); + pButton->SetTextSize(fontSize); + pButton->SetMultilineTextSize(multilineFontSize); + pButton->SetUserDefinedTextArea(FloatRectangle(leftSoftkeyLeftMargin, softkeyTopMargin, softkeyDisplayDimension.width, softkeyDisplayDimension.height)); + pButton->SetTextColor(_BUTTON_STATUS_NORMAL, softkeyNormalTextColor); + pButton->SetTextColor(_BUTTON_STATUS_DISABLED, softkeyDisabledTextColor); + pButton->SetTextColor(_BUTTON_STATUS_PRESSED, softkeyPressedTextColor); + pButton->SetTextColor(_BUTTON_STATUS_HIGHLIGHTED, softkeyHighlightedTextColor); + __pFooter->SetButton(LEFT_BUTTON, pButton); + } + } + + if (formStyle & FORM_STYLE_SOFTKEY_1) + { + if (__pSoftkeyNormalBitmap[_SOFTKEY_1]) + { + delete __pSoftkeyNormalBitmap[_SOFTKEY_1]; + __pSoftkeyNormalBitmap[_SOFTKEY_1] = null; + } + 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; + } + 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; + } + 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; + } + 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; + } + 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; + } + 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; + } + 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; + } + 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; + } + 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; + } + 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; + } + 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; + } + 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]) + { + delete __pSoftkeyNormalIcon[_SOFTKEY_1]; + __pSoftkeyNormalIcon[_SOFTKEY_1] = null; + } + 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]) + { + delete __pSoftkeyDisabledIcon[_SOFTKEY_1]; + __pSoftkeyDisabledIcon[_SOFTKEY_1] = null; + } + 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]) + { + delete __pSoftkeyPressedIcon[_SOFTKEY_1]; + __pSoftkeyPressedIcon[_SOFTKEY_1] = null; + } + 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]) + { + delete __pSoftkeyHighlightedIcon[_SOFTKEY_1]; + __pSoftkeyHighlightedIcon[_SOFTKEY_1] = null; + } + 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) + { + pButton->SetSize(softkeyDimension); + pButton->SetTextSize(fontSize); + pButton->SetMultilineTextSize(multilineFontSize); + pButton->SetUserDefinedTextArea(FloatRectangle(rightSoftkeyLeftMargin, softkeyTopMargin, softkeyDisplayDimension.width, softkeyDisplayDimension.height)); + pButton->SetTextColor(_BUTTON_STATUS_NORMAL, softkeyNormalTextColor); + pButton->SetTextColor(_BUTTON_STATUS_DISABLED, softkeyDisabledTextColor); + pButton->SetTextColor(_BUTTON_STATUS_PRESSED, softkeyPressedTextColor); + pButton->SetTextColor(_BUTTON_STATUS_HIGHLIGHTED, softkeyHighlightedTextColor); + __pFooter->SetButton(RIGHT_BUTTON, pButton); + } + } + + if (formStyle & FORM_STYLE_OPTIONKEY) + { + if (__pSoftkeyNormalBitmap[SOFTKEY_COUNT]) + { + delete __pSoftkeyNormalBitmap[SOFTKEY_COUNT]; + __pSoftkeyNormalBitmap[SOFTKEY_COUNT] = null; + } + 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; + } + 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; + } + 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; + } + 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; + } + 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; + } + 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]) + { + delete __pSoftkeyNormalIcon[SOFTKEY_COUNT]; + __pSoftkeyNormalIcon[SOFTKEY_COUNT] = null; + } + 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]) + { + delete __pSoftkeyDisabledIcon[SOFTKEY_COUNT]; + __pSoftkeyDisabledIcon[SOFTKEY_COUNT] = null; + } + 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]) + { + delete __pSoftkeyPressedIcon[SOFTKEY_COUNT]; + __pSoftkeyPressedIcon[SOFTKEY_COUNT] = null; + } + 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]) + { + delete __pSoftkeyHighlightedIcon[SOFTKEY_COUNT]; + __pSoftkeyHighlightedIcon[SOFTKEY_COUNT] = null; + } + 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) + { + pButton->SetSize(optionkeyDimension); + pButton->SetTextColor(_BUTTON_STATUS_NORMAL, softkeyNormalTextColor); + pButton->SetTextColor(_BUTTON_STATUS_DISABLED, softkeyDisabledTextColor); + pButton->SetTextColor(_BUTTON_STATUS_PRESSED, softkeyPressedTextColor); + pButton->SetTextColor(_BUTTON_STATUS_HIGHLIGHTED, softkeyHighlightedTextColor); + __pFooter->SetButton(MIDDLE_BUTTON, pButton); + } + } +} + +void +_Form::UpdateSoftkey(unsigned long formStyle) +{ + float softkeyIconGap = 3.0f; + + if (__formStyle & FORM_STYLE_SOFTKEY_0)// && __updatedSoftkeyCount % 2 == 0) + { + if (__pFooter->GetButton(LEFT_BUTTON)) + { + __pFooter->GetButton(LEFT_BUTTON)->SetActionId(__actionId[_SOFTKEY_0]); + + if (__softkeyText[_SOFTKEY_0] != String()) + { + if (__pTextSoftkeyNormalBitmap[_SOFTKEY_0]) + { + __pFooter->GetButton(LEFT_BUTTON)->SetBackgroundBitmap(_BUTTON_STATUS_NORMAL, *__pTextSoftkeyNormalBitmap[_SOFTKEY_0]); + } + + if (__pTextSoftkeyDisabledBitmap[_SOFTKEY_0]) + { + __pFooter->GetButton(LEFT_BUTTON)->SetBackgroundBitmap(_BUTTON_STATUS_DISABLED, *__pTextSoftkeyDisabledBitmap[_SOFTKEY_0]); + } + + if (__pTextSoftkeyPressedBitmap[_SOFTKEY_0]) + { + __pFooter->GetButton(LEFT_BUTTON)->SetBackgroundBitmap(_BUTTON_STATUS_PRESSED, *__pTextSoftkeyPressedBitmap[_SOFTKEY_0]); + } + + if (__pTextSoftkeyHighlightedBitmap[_SOFTKEY_0]) + { + __pFooter->GetButton(LEFT_BUTTON)->SetBackgroundBitmap(_BUTTON_STATUS_HIGHLIGHTED, *__pTextSoftkeyHighlightedBitmap[_SOFTKEY_0]); + } + + if (__pTextSoftkeyNormalEffectBitmap[_SOFTKEY_0]) + { + __pFooter->GetButton(LEFT_BUTTON)->SetBackgroundEffectBitmap(_BUTTON_STATUS_NORMAL, *__pTextSoftkeyNormalEffectBitmap[_SOFTKEY_0]); + } + + if (__pTextSoftkeyPressedEffectBitmap[_SOFTKEY_0]) + { + __pFooter->GetButton(LEFT_BUTTON)->SetBackgroundEffectBitmap(_BUTTON_STATUS_PRESSED, *__pTextSoftkeyPressedEffectBitmap[_SOFTKEY_0]); + } + + __pFooter->GetButton(LEFT_BUTTON)->SetText(__softkeyText[_SOFTKEY_0]); + + __pFooter->RearrangeItems(); + } + else + { + if (__pSoftkeyNormalBitmap[_SOFTKEY_0]) + { + __pFooter->GetButton(LEFT_BUTTON)->SetBackgroundBitmap(_BUTTON_STATUS_NORMAL, *__pSoftkeyNormalBitmap[_SOFTKEY_0]); + } + + if (__pSoftkeyDisabledBitmap[_SOFTKEY_0]) + { + __pFooter->GetButton(LEFT_BUTTON)->SetBackgroundBitmap(_BUTTON_STATUS_DISABLED, *__pSoftkeyDisabledBitmap[_SOFTKEY_0]); + } + + if (__pSoftkeyPressedBitmap[_SOFTKEY_0]) + { + __pFooter->GetButton(LEFT_BUTTON)->SetBackgroundBitmap(_BUTTON_STATUS_PRESSED, *__pSoftkeyPressedBitmap[_SOFTKEY_0]); + } + + if (__pSoftkeyHighlightedBitmap[_SOFTKEY_0]) + { + __pFooter->GetButton(LEFT_BUTTON)->SetBackgroundBitmap(_BUTTON_STATUS_HIGHLIGHTED, *__pSoftkeyHighlightedBitmap[_SOFTKEY_0]); + } + + if (__pSoftkeyNormalEffectBitmap[_SOFTKEY_0]) + { + __pFooter->GetButton(LEFT_BUTTON)->SetBackgroundEffectBitmap(_BUTTON_STATUS_NORMAL, *__pSoftkeyNormalEffectBitmap[_SOFTKEY_0]); + } + + if (__pSoftkeyPressedEffectBitmap[_SOFTKEY_0]) + { + __pFooter->GetButton(LEFT_BUTTON)->SetBackgroundEffectBitmap(_BUTTON_STATUS_PRESSED, *__pSoftkeyPressedEffectBitmap[_SOFTKEY_0]); + } + + if (__pSoftkeyNormalIcon[_SOFTKEY_0]) + { + __pFooter->GetButton(LEFT_BUTTON)->SetBitmap(_BUTTON_STATUS_NORMAL, + FloatPoint((__pFooter->GetButton(LEFT_BUTTON)->GetSizeF().width - __pSoftkeyNormalIcon[_SOFTKEY_0]->GetWidthF()) / 2, + (__pFooter->GetButton(LEFT_BUTTON)->GetSizeF().height - __pSoftkeyNormalIcon[_SOFTKEY_0]->GetHeightF()) / 2 + softkeyIconGap), *__pSoftkeyNormalIcon[_SOFTKEY_0]); + } + + if (__pSoftkeyDisabledIcon[_SOFTKEY_0]) + { + __pFooter->GetButton(LEFT_BUTTON)->SetBitmap(_BUTTON_STATUS_DISABLED, + FloatPoint((__pFooter->GetButton(LEFT_BUTTON)->GetSizeF().width - __pSoftkeyDisabledIcon[_SOFTKEY_0]->GetWidthF()) / 2, + (__pFooter->GetButton(LEFT_BUTTON)->GetSizeF().height - __pSoftkeyDisabledIcon[_SOFTKEY_0]->GetHeightF()) / 2 + softkeyIconGap), *__pSoftkeyDisabledIcon[_SOFTKEY_0]); + } + + if (__pSoftkeyPressedIcon[_SOFTKEY_0]) + { + __pFooter->GetButton(LEFT_BUTTON)->SetBitmap(_BUTTON_STATUS_PRESSED, + FloatPoint((__pFooter->GetButton(LEFT_BUTTON)->GetSizeF().width - __pSoftkeyPressedIcon[_SOFTKEY_0]->GetWidthF()) / 2, + (__pFooter->GetButton(LEFT_BUTTON)->GetSizeF().height - __pSoftkeyPressedIcon[_SOFTKEY_0]->GetHeightF()) / 2 + softkeyIconGap), *__pSoftkeyPressedIcon[_SOFTKEY_0]); + } + + if (__pSoftkeyHighlightedIcon[_SOFTKEY_0]) + { + __pFooter->GetButton(LEFT_BUTTON)->SetBitmap(_BUTTON_STATUS_HIGHLIGHTED, + FloatPoint((__pFooter->GetButton(LEFT_BUTTON)->GetSizeF().width - __pSoftkeyHighlightedIcon[_SOFTKEY_0]->GetWidthF()) / 2, + (__pFooter->GetButton(LEFT_BUTTON)->GetSizeF().height - __pSoftkeyHighlightedIcon[_SOFTKEY_0]->GetHeightF()) / 2 + softkeyIconGap), *__pSoftkeyHighlightedIcon[_SOFTKEY_0]); + } + } + } + } + + if (__formStyle & FORM_STYLE_SOFTKEY_1)// && __updatedSoftkeyCount % 2 == 0) + { + if (__pFooter->GetButton(RIGHT_BUTTON)) + { + __pFooter->GetButton(RIGHT_BUTTON)->SetActionId(__actionId[_SOFTKEY_1]); + + if (__softkeyText[_SOFTKEY_1] != String()) + { + if (__pTextSoftkeyNormalBitmap[_SOFTKEY_1]) + { + __pFooter->GetButton(RIGHT_BUTTON)->SetBackgroundBitmap(_BUTTON_STATUS_NORMAL, *__pTextSoftkeyNormalBitmap[_SOFTKEY_1]); + } + + if (__pTextSoftkeyDisabledBitmap[_SOFTKEY_1]) + { + __pFooter->GetButton(RIGHT_BUTTON)->SetBackgroundBitmap(_BUTTON_STATUS_DISABLED, *__pTextSoftkeyDisabledBitmap[_SOFTKEY_1]); + } + + if (__pTextSoftkeyPressedBitmap[_SOFTKEY_1]) + { + __pFooter->GetButton(RIGHT_BUTTON)->SetBackgroundBitmap(_BUTTON_STATUS_PRESSED, *__pTextSoftkeyPressedBitmap[_SOFTKEY_1]); + } + + if (__pTextSoftkeyHighlightedBitmap[_SOFTKEY_1]) + { + __pFooter->GetButton(RIGHT_BUTTON)->SetBackgroundBitmap(_BUTTON_STATUS_HIGHLIGHTED, *__pTextSoftkeyHighlightedBitmap[_SOFTKEY_1]); + } + + if (__pTextSoftkeyNormalEffectBitmap[_SOFTKEY_1]) + { + __pFooter->GetButton(RIGHT_BUTTON)->SetBackgroundEffectBitmap(_BUTTON_STATUS_NORMAL, *__pTextSoftkeyNormalEffectBitmap[_SOFTKEY_1]); + } + + if (__pTextSoftkeyPressedEffectBitmap[_SOFTKEY_1]) + { + __pFooter->GetButton(RIGHT_BUTTON)->SetBackgroundEffectBitmap(_BUTTON_STATUS_PRESSED, *__pTextSoftkeyPressedEffectBitmap[_SOFTKEY_1]); + } + + __pFooter->GetButton(RIGHT_BUTTON)->SetText(__softkeyText[_SOFTKEY_1]); + + __pFooter->RearrangeItems(); + } + else + { + if (__pSoftkeyNormalBitmap[_SOFTKEY_1]) + { + __pFooter->GetButton(RIGHT_BUTTON)->SetBackgroundBitmap(_BUTTON_STATUS_NORMAL, *__pSoftkeyNormalBitmap[_SOFTKEY_1]); + } + + if (__pSoftkeyDisabledBitmap[_SOFTKEY_1]) + { + __pFooter->GetButton(RIGHT_BUTTON)->SetBackgroundBitmap(_BUTTON_STATUS_DISABLED, *__pSoftkeyDisabledBitmap[_SOFTKEY_1]); + } + + if (__pSoftkeyPressedBitmap[_SOFTKEY_1]) + { + __pFooter->GetButton(RIGHT_BUTTON)->SetBackgroundBitmap(_BUTTON_STATUS_PRESSED, *__pSoftkeyPressedBitmap[_SOFTKEY_1]); + } + + if (__pSoftkeyHighlightedBitmap[_SOFTKEY_1]) + { + __pFooter->GetButton(RIGHT_BUTTON)->SetBackgroundBitmap(_BUTTON_STATUS_HIGHLIGHTED, *__pSoftkeyHighlightedBitmap[_SOFTKEY_1]); + } + + if (__pSoftkeyNormalEffectBitmap[_SOFTKEY_1]) + { + __pFooter->GetButton(RIGHT_BUTTON)->SetBackgroundEffectBitmap(_BUTTON_STATUS_NORMAL, *__pSoftkeyNormalEffectBitmap[_SOFTKEY_1]); + } + + if (__pSoftkeyPressedEffectBitmap[_SOFTKEY_1]) + { + __pFooter->GetButton(RIGHT_BUTTON)->SetBackgroundEffectBitmap(_BUTTON_STATUS_PRESSED, *__pSoftkeyPressedEffectBitmap[_SOFTKEY_1]); + } + + if (__pSoftkeyNormalIcon[_SOFTKEY_1]) + { + __pFooter->GetButton(RIGHT_BUTTON)->SetBitmap(_BUTTON_STATUS_NORMAL, + FloatPoint((__pFooter->GetButton(RIGHT_BUTTON)->GetSizeF().width - __pSoftkeyNormalIcon[_SOFTKEY_1]->GetWidthF()) / 2, + (__pFooter->GetButton(RIGHT_BUTTON)->GetSizeF().height - __pSoftkeyNormalIcon[_SOFTKEY_1]->GetHeightF()) / 2 + softkeyIconGap), *__pSoftkeyNormalIcon[_SOFTKEY_1]); + } + + if (__pSoftkeyDisabledIcon[_SOFTKEY_1]) + { + __pFooter->GetButton(RIGHT_BUTTON)->SetBitmap(_BUTTON_STATUS_DISABLED, + FloatPoint((__pFooter->GetButton(RIGHT_BUTTON)->GetSizeF().width - __pSoftkeyDisabledIcon[_SOFTKEY_1]->GetWidthF()) / 2, + (__pFooter->GetButton(RIGHT_BUTTON)->GetSizeF().height - __pSoftkeyDisabledIcon[_SOFTKEY_1]->GetHeightF()) / 2 + softkeyIconGap), *__pSoftkeyDisabledIcon[_SOFTKEY_1]); + } + + if (__pSoftkeyPressedIcon[_SOFTKEY_1]) + { + __pFooter->GetButton(RIGHT_BUTTON)->SetBitmap(_BUTTON_STATUS_PRESSED, + FloatPoint((__pFooter->GetButton(RIGHT_BUTTON)->GetSizeF().width - __pSoftkeyPressedIcon[_SOFTKEY_1]->GetWidthF()) / 2, + (__pFooter->GetButton(RIGHT_BUTTON)->GetSizeF().height - __pSoftkeyPressedIcon[_SOFTKEY_1]->GetHeightF()) / 2 + softkeyIconGap), *__pSoftkeyPressedIcon[_SOFTKEY_1]); + } + + if (__pSoftkeyHighlightedIcon[_SOFTKEY_1]) + { + __pFooter->GetButton(RIGHT_BUTTON)->SetBitmap(_BUTTON_STATUS_HIGHLIGHTED, + FloatPoint((__pFooter->GetButton(RIGHT_BUTTON)->GetSizeF().width - __pSoftkeyHighlightedIcon[_SOFTKEY_1]->GetWidthF()) / 2, + (__pFooter->GetButton(RIGHT_BUTTON)->GetSizeF().height - __pSoftkeyHighlightedIcon[_SOFTKEY_1]->GetHeightF()) / 2 + softkeyIconGap), *__pSoftkeyHighlightedIcon[_SOFTKEY_1]); + } + } + } + } + + if (__formStyle & FORM_STYLE_OPTIONKEY) + { + if (__pFooter->GetButton(MIDDLE_BUTTON)) + { + __pFooter->GetButton(MIDDLE_BUTTON)->SetActionId(__actionId[SOFTKEY_COUNT]); + + if (__pSoftkeyNormalBitmap[SOFTKEY_COUNT]) + { + __pFooter->GetButton(MIDDLE_BUTTON)->SetBackgroundBitmap(_BUTTON_STATUS_NORMAL, *__pSoftkeyNormalBitmap[SOFTKEY_COUNT]); + } + + if (__pSoftkeyDisabledBitmap[SOFTKEY_COUNT]) + { + __pFooter->GetButton(MIDDLE_BUTTON)->SetBackgroundBitmap(_BUTTON_STATUS_DISABLED, *__pSoftkeyDisabledBitmap[SOFTKEY_COUNT]); + } + + if (__pSoftkeyPressedBitmap[SOFTKEY_COUNT]) + { + __pFooter->GetButton(MIDDLE_BUTTON)->SetBackgroundBitmap(_BUTTON_STATUS_PRESSED, *__pSoftkeyPressedBitmap[SOFTKEY_COUNT]); + } + + if (__pSoftkeyHighlightedBitmap[SOFTKEY_COUNT]) + { + __pFooter->GetButton(MIDDLE_BUTTON)->SetBackgroundBitmap(_BUTTON_STATUS_HIGHLIGHTED, *__pSoftkeyHighlightedBitmap[SOFTKEY_COUNT]); + } + + if (__pSoftkeyNormalEffectBitmap[SOFTKEY_COUNT]) + { + __pFooter->GetButton(MIDDLE_BUTTON)->SetBackgroundEffectBitmap(_BUTTON_STATUS_NORMAL, *__pSoftkeyNormalEffectBitmap[SOFTKEY_COUNT]); + } + + if (__pSoftkeyPressedEffectBitmap[SOFTKEY_COUNT]) + { + __pFooter->GetButton(MIDDLE_BUTTON)->SetBackgroundEffectBitmap(_BUTTON_STATUS_PRESSED, *__pSoftkeyPressedEffectBitmap[SOFTKEY_COUNT]); + } + + if (__pSoftkeyNormalIcon[SOFTKEY_COUNT]) + { + __pFooter->GetButton(MIDDLE_BUTTON)->SetBitmap(_BUTTON_STATUS_NORMAL, FloatPoint(0.0f, 0.0f), *__pSoftkeyNormalIcon[SOFTKEY_COUNT]); + } + + if (__pSoftkeyDisabledIcon[SOFTKEY_COUNT]) + { + __pFooter->GetButton(MIDDLE_BUTTON)->SetBitmap(_BUTTON_STATUS_DISABLED, FloatPoint(0.0f, 0.0f), *__pSoftkeyDisabledIcon[SOFTKEY_COUNT]); + } + + if (__pSoftkeyPressedIcon[SOFTKEY_COUNT]) + { + __pFooter->GetButton(MIDDLE_BUTTON)->SetBitmap(_BUTTON_STATUS_PRESSED, FloatPoint(0.0f, 0.0f), *__pSoftkeyPressedIcon[SOFTKEY_COUNT]); + } + + if (__pSoftkeyHighlightedIcon[SOFTKEY_COUNT]) + { + __pFooter->GetButton(MIDDLE_BUTTON)->SetBitmap(_BUTTON_STATUS_HIGHLIGHTED, FloatPoint(0.0f, 0.0f), *__pSoftkeyHighlightedIcon[SOFTKEY_COUNT]); + } + } + } +} + +String +_Form::GetDescription(void) const +{ + String description = _Control::GetDescription(); + + String descriptionTemp(L""); + + descriptionTemp.Format(LOG_LEN_MAX, L"_Form: style(%d) transparent(%d %d %d %d) deflated(%d) deflatedHeight(%d) overlayRegionCount(%d) softkeyCount(%d) updatedSoftkeyCount(%d)", + __formStyle, __transparentIndicator, __transparentHeader, __transparentFooter, __transparentTab, __deflated, __deflatedHeight, + __overlayRegionCount, __softkeyCount, __updatedSoftkeyCount); + + description.Append(descriptionTemp); + + return description; +} + +Canvas* +_Form::GetClientAreaCanvasN(void) const +{ + Canvas* pCanvas = GetCanvasN(GetClientBounds()); + if ((pCanvas == null) || (GetLastResult() != E_SUCCESS)) + { + SysLog(NID_UI_CTRL, "[%s] Propagated.", GetErrorMessage(GetLastResult())); + delete pCanvas; + return null; + } + + return pCanvas; +} + +int +_Form::GetSoftkeyActionId(_Softkey softkey) const +{ + if (CheckSoftkey(softkey) == false) + { + return -1; + } + + return __actionId[softkey]; +} + +int +_Form::GetOptionkeyActionId(void) const +{ + if (HasOptionkey() == false) + { + return -1; + } + + return __actionId[SOFTKEY_COUNT]; +} + +String +_Form::GetSoftkeyText(_Softkey softkey) const +{ + if (CheckSoftkey(softkey) == false) + { + return String(L""); + } + + return __softkeyText[softkey]; +} + +void +_Form::SetFormStyle(unsigned long formStyle) +{ + result r = E_SUCCESS; + + __formStyle = formStyle; + + if (!__pIndicator) + { + __pIndicator = CreateIndicatorN(); + SysTryReturnVoidResult(NID_UI_CTRL, __pIndicator != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + float indicatorwidth = GetClientBoundsF().width; + float indicatorheight = 0.0f; + + GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, GetOrientation(), indicatorheight); + + __pIndicator->SetBounds(FloatRectangle(0.0f, 0.0f, indicatorwidth, indicatorheight)); + r = GetVisualElement()->AttachChild(*__pIndicator); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + _VisualElementImpl* pImpl = _VisualElementImpl::GetInstance(*__pIndicator); + + result r = pImpl->SetZOrderGroup(_ControlVisualElement::Z_ORDER_GROUP_CONTROL + 4); + + r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } +} + +result +_Form::SetActionBarsTranslucent(unsigned long actionBars, bool translucent) +{ + SysTryReturn( + NID_UI_CTRL, + ((actionBars & FORM_ACTION_BAR_INDICATOR) || (actionBars & FORM_ACTION_BAR_HEADER) || + (actionBars & FORM_ACTION_BAR_FOOTER) || (actionBars & FORM_ACTION_BAR_TAB)), + E_INVALID_OPERATION, E_INVALID_OPERATION, + ("[E_INVALID_OPERATION] The current state of the instance prohibits the execution of the specified operation.")); + + if ((!(__formStyle & FORM_STYLE_INDICATOR) && (actionBars & FORM_ACTION_BAR_INDICATOR)) + || (!(__formStyle & FORM_STYLE_HEADER) && (actionBars & FORM_ACTION_BAR_HEADER)) + || (!(__formStyle & FORM_STYLE_FOOTER) && (actionBars & FORM_ACTION_BAR_FOOTER)) + || (!(__formStyle & FORM_STYLE_TEXT_TAB) && (actionBars & FORM_ACTION_BAR_TAB))) + { + SysLog(NID_UI_CTRL, + "[E_INVALID_OPERATION] The current state of the instance prohibits the execution of the specified operation."); + return E_INVALID_OPERATION; + } + + result r = E_SUCCESS; + + Color bgColor(0, 0, 0, 0); + if (actionBars & FORM_ACTION_BAR_INDICATOR) + { + if (translucent) + { + r = SetIndicatorOpacity(_INDICATOR_OPACITY_TRANSLUCENT); + } + else + { + r = SetIndicatorOpacity(_INDICATOR_OPACITY_OPAQUE); + } + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + if (actionBars & FORM_ACTION_BAR_HEADER) + { + if (IsHeaderTranslucent() != translucent) + { + if (__pHeader) + { + __pHeader->SetTransparent(translucent); + __transparentHeader = translucent; + } + } + } + + if (IsHeaderVisible()) + { + if (IsIndicatorTranslucent() != IsHeaderTranslucent()) + { + if (IsIndicatorTranslucent()) + { + FloatRectangle bounds(0.0f, 0.0f, GetClientBoundsF().width, __pHeader->GetBoundsF().height); + SetHeaderBounds(bounds); + } + else + { + FloatRectangle bounds(0.0f, GetIndicatorBoundsF().height, GetClientBoundsF().width, __pHeader->GetBoundsF().height); + SetHeaderBounds(bounds); + } + } + else if (!IsIndicatorTranslucent() && !IsHeaderTranslucent()) + { + FloatRectangle bounds(0.0f, GetIndicatorBoundsF().height, GetClientBoundsF().width, __pHeader->GetBoundsF().height); + SetHeaderBounds(bounds); + } + else + { + if (GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT) + { + FloatRectangle bounds(0.0f, GetIndicatorBoundsF().height, GetClientBoundsF().width, __pHeader->GetBoundsF().height); + SetHeaderBounds(bounds); + } + else + { + FloatRectangle bounds(0.0f, 0.0f, GetClientBoundsF().width, __pHeader->GetBoundsF().height); + SetHeaderBounds(bounds); + } + } + } + + if (actionBars & FORM_ACTION_BAR_FOOTER) + { + if (IsFooterTranslucent() != translucent) + { + if (__pFooter) + { + __pFooter->SetTransparent(translucent); + __transparentFooter = translucent; + } + } + } + + AdjustClientBounds(); + + return E_SUCCESS; +} + +result +_Form::SetActionBarsVisible(unsigned long actionBars, bool visible) +{ + SysTryReturn( + NID_UI_CTRL, + ((actionBars & FORM_ACTION_BAR_INDICATOR) || (actionBars & FORM_ACTION_BAR_HEADER) || + (actionBars & FORM_ACTION_BAR_FOOTER)), + E_INVALID_OPERATION, + E_INVALID_OPERATION, + ("[E_INVALID_OPERATION] The current state of the instance prohibits the execution of the specified operation. ")); + + if ((!(__formStyle & FORM_STYLE_INDICATOR) && (actionBars & FORM_ACTION_BAR_INDICATOR)) + || (!(__formStyle & FORM_STYLE_HEADER) && (actionBars & FORM_ACTION_BAR_HEADER)) + || (!(__formStyle & FORM_STYLE_FOOTER) && (actionBars & FORM_ACTION_BAR_FOOTER))) + { + SysLog(NID_UI_CTRL, "[E_INVALID_OPERATION] The current state of the instance prohibits the execution of the specified operation."); + return E_INVALID_OPERATION; + } + + if ((actionBars & FORM_ACTION_BAR_INDICATOR)) + { + if (GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT) + { + if (!(__formStyle & FORM_STYLE_INDICATOR)) + { + SysLog(NID_UI_CTRL, + "[E_INVALID_OPERATION] The current state of the instance prohibits the execution of the specified operation."); + return E_INVALID_OPERATION; + } + } + else + { + SysLog(NID_UI_CTRL, + "[E_INVALID_OPERATION] The current state of the instance prohibits the execution of the specified operation."); + return E_INVALID_OPERATION; + } + } + + FloatRectangle bounds = GetBoundsF(); + SetBounds(bounds); + + if (actionBars & FORM_ACTION_BAR_INDICATOR) + { + SetIndicatorShowState(visible); + } + + if (actionBars & FORM_ACTION_BAR_HEADER) + { + if (IsHeaderVisible() != visible) + { + if (__pHeader) + { + if (visible == true) + { + float adjHeight = 0.0f; + if (IsIndicatorVisible()) + { + FloatRectangle indicatorBounds = GetIndicatorBoundsF(); + adjHeight = indicatorBounds.height; + + if (IsIndicatorTranslucent()) + { + if (!IsHeaderTranslucent()) + { + adjHeight = 0.0f; + } + else + { + if (GetOrientation() == _CONTROL_ORIENTATION_LANDSCAPE) + { + adjHeight = 0.0f; + } + } + } + } + FloatRectangle bounds = __pHeader->GetBoundsF(); + bounds.y = adjHeight; + + SetHeaderBounds(bounds); + } + __pHeader->SetVisibleState(visible); + } + } + } + + if (actionBars & FORM_ACTION_BAR_FOOTER) + { + if (__pFooter) + { + __pFooter->SetVisibleState(visible); + } + } + + AdjustClientBounds(); + + return E_SUCCESS; +} + +result +_Form::SetTitleIcon(const Bitmap* pTitleBitmap) +{ + SysTryReturn(NID_UI_CTRL, (__formStyle & FORM_STYLE_TITLE), E_INVALID_OPERATION, + E_INVALID_OPERATION, "[E_INVALID_OPERATION] This API is only for FORM_STYLE_TITLE."); + + SysTryReturn(NID_UI_CTRL, __pHeader, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] The title is not valid."); + + result r = __pHeader->SetTitleIcon(*pTitleBitmap); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +_Form::SetTitleText(const String& title, HorizontalAlignment alignment) +{ + SysTryReturn(NID_UI_CTRL, (__formStyle & FORM_STYLE_TITLE), E_INVALID_OPERATION, + E_INVALID_OPERATION, "[E_INVALID_OPERATION] This API is only for FORM_STYLE_TITLE."); + + SysTryReturn(NID_UI_CTRL, __pHeader, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] The title is not valid."); + + result r = __pHeader->SetTitleText(title, alignment); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +_Form::SetSoftkeyEnabled(_Softkey softkey, bool enable) +{ + result r = E_SYSTEM; + + if (CheckSoftkey(softkey) == false) + { + return r; + } + + __enableSoftkey[softkey] = enable; + + r = E_SUCCESS; + + return r; +} + +result +_Form::SetOptionkeyActionId(int actionId) +{ + result r = E_SYSTEM; + + if (HasOptionkey() == false) + { + return r; + } + + __actionId[SOFTKEY_COUNT] = actionId; + + r = E_SUCCESS; + + return r; +} + +result +_Form::SetSoftkeyActionId(_Softkey softkey, int actionId) +{ + result r = E_SYSTEM; + + if (CheckSoftkey(softkey) == false) + { + return r; + } + + __actionId[softkey] = actionId; + + r = E_SUCCESS; + + return r; +} + +result +_Form::SetSoftkeyText(_Softkey softkey, const String& text) +{ + result r = E_SYSTEM; + + if (CheckSoftkey(softkey) == false) + { + return r; + } + + __softkeyText[softkey] = text; + + r = E_SUCCESS; + + return r; +} + +result +_Form::SetSoftkeyIcon(_Softkey softkey, const Bitmap& normalBitmap, const Bitmap* pPressedBitmap) +{ + result r = E_SYSTEM; + + if (CheckSoftkey(softkey) == false) + { + return r; + } + + float softkey_icon_size = 0.0f; + + GET_SHAPE_CONFIG(FOOTER::SOFTKEY_ICON_SIZE, GetOrientation(), softkey_icon_size); + + Bitmap* pClonedNormalBitmap = _BitmapImpl::CloneN(normalBitmap); + + if (pClonedNormalBitmap) + { + if (__pSoftkeyNormalIcon[softkey] != null) + { + delete __pSoftkeyNormalIcon[softkey]; + } + + __pSoftkeyNormalIcon[softkey] = pClonedNormalBitmap; + + __pSoftkeyNormalIcon[softkey]->Scale(FloatDimension(softkey_icon_size, softkey_icon_size)); + + r = E_SUCCESS; + } + + if (pPressedBitmap != null) + { + Bitmap* pClonedPressedBitmap = _BitmapImpl::CloneN(*pPressedBitmap); + + if (pClonedPressedBitmap) + { + if (__pSoftkeyPressedIcon[softkey] != null) + { + delete __pSoftkeyPressedIcon[softkey]; + } + + __pSoftkeyPressedIcon[softkey] = pClonedPressedBitmap; + + __pSoftkeyPressedIcon[softkey]->Scale(FloatDimension(softkey_icon_size, softkey_icon_size)); + + r = E_SUCCESS; + } + } + + return r; +} + +bool +_Form::HasFooter(void) const +{ + if (__pFooter) + { + return true; + } + else + { + return false; + } +} + +bool +_Form::HasHeader(void) const +{ + if (__pHeader) + { + return true; + } + else + { + return false; + } +} + +bool +_Form::HasIndicator(void) const +{ + + if (__pIndicator) + { + if (GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT) + { + if ((GetFormStyle() & FORM_STYLE_INDICATOR) || (GetFormStyle() & FORM_STYLE_INDICATOR_AUTO_HIDE)) + { + return true; + } + else + { + return false; + } + } + else + { + if (GetFormStyle() & FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE) + { + return true; + } + else + { + return false; + } + } + } + else + { + return false; + } +} + +bool +_Form::HasTitle(void) const +{ + if (__pHeader && (__formStyle & FORM_STYLE_TITLE)) + { + return true; + } + else + { + return false; + } +} + +bool +_Form::HasTab(void) const +{ + if ((__pTab && (__formStyle & FORM_STYLE_TEXT_TAB)) +|| (__pTab && (__formStyle & FORM_STYLE_ICON_TAB))) + { + return true; + } + else + { + return false; + } +} + +bool +_Form::IsIndicatorVisible(void) const +{ + _Control* pParent = GetParent(); + _Frame* pFrame = dynamic_cast<_Frame*>(pParent); + + bool visible = true; + + if (pFrame && IsAttachedToMainTree()) + { + visible = __pIndicator->GetIndicatorShowState(); + SysTryReturn(NID_UI_CTRL, GetLastResult() == E_SUCCESS, false, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + } + else + { + visible = __indicatorShowState; + } + + return visible; +} + +bool +_Form::IsHeaderVisible(void) const +{ + if (__pHeader) + { + return __pHeader->IsVisible(); + } + else + { + return false; + } +} + +bool +_Form::IsFooterVisible(void) const +{ + if (__pFooter) + { + return __pFooter->IsVisible(); + } + else + { + return false; + } +} + +bool +_Form::IsIndicatorTranslucent(void) const +{ + _Control* pParent = GetParent(); + _Frame* pFrame = dynamic_cast<_Frame*>(pParent); + + _IndicatorOpacity opacity = _INDICATOR_OPACITY_UNKNOWN; + + bool transparent = false; + + if (pFrame && IsAttachedToMainTree()) + { + FrameShowMode mode = pFrame->GetShowMode(); + if (mode != FRAME_SHOW_MODE_FULL_SCREEN) + { + if (mode == FRAME_SHOW_MODE_MINIMIZED) + { + if (pFrame->GetShowMode(false) != FRAME_SHOW_MODE_FULL_SCREEN) + { + return transparent; + } + } + } + opacity = __pIndicator->GetIndicatorOpacity(); + SysTryReturn(NID_UI_CTRL, GetLastResult() == E_SUCCESS, false, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + if (opacity == _INDICATOR_OPACITY_TRANSLUCENT) + { + transparent = true; + } + else if (opacity == _INDICATOR_OPACITY_OPAQUE) + { + transparent = false; + } + else + { + transparent = true; + } + } + else + { + transparent = __transparentIndicator; + } + + return transparent; +} + +bool +_Form::IsIndicatorAutoHide(void) const +{ + _Control* pParent = GetParent(); + _Frame* pFrame = dynamic_cast<_Frame*>(pParent); + + bool autohide = false; + + if (pFrame && IsAttachedToMainTree()) + { + autohide = __pIndicator->GetIndicatorAutoHide(); + } + + return autohide; +} + +bool +_Form::IsHeaderTranslucent(void) const +{ + return __transparentHeader; +} + +bool +_Form::IsFooterTranslucent(void) const +{ + return __transparentFooter; +} + +bool +_Form::IsTabTranslucent(void) const +{ + return __transparentTab; +} + +bool +_Form::HasOptionkey(void) const +{ + if (GetFormStyle() & FORM_STYLE_OPTIONKEY) + { + return true; + } + else + { + return false; + } +} + +bool +_Form::HasSoftkey(_Softkey softkey) const +{ + unsigned long __formStyle = FORM_STYLE_NORMAL; + + if (softkey == _SOFTKEY_0) + { + __formStyle = FORM_STYLE_SOFTKEY_0; + } + else if (softkey == _SOFTKEY_1) + { + __formStyle = FORM_STYLE_SOFTKEY_1; + } + else + { + return false; + } + + if (GetFormStyle() & __formStyle) + { + return true; + } + else + { + return false; + } +} + +bool +_Form::IsSoftkeyEnabled(_Softkey softkey) const +{ + if (CheckSoftkey(softkey) == false) + { + return false; + } + + return __enableSoftkey[softkey]; +} + +bool +_Form::CheckSoftkey(_Softkey softkey) const +{ + bool result = true; + + if (HasSoftkey(softkey) == false) + { + return false; + } + + if (softkey >= _SOFTKEY_COUNT) + { + return false; + } + + return result; +} + +bool +_Form::IsOrientationRoot(void) const +{ + return true; +} + +Point +_Form::TranslateToClientAreaPosition(const Point& position) const +{ + Rectangle clientArea = GetClientBounds(); + return Point(position.x - clientArea.x, position.y - clientArea.y); +} + +FloatPoint +_Form::TranslateToClientAreaPosition(const FloatPoint& position) const +{ + FloatRectangle clientArea = GetClientBoundsF(); + return FloatPoint(position.x - clientArea.x, position.y - clientArea.y); +} + +Point +_Form::TranslateFromClientAreaPosition(const Point& clientPosition) const +{ + Rectangle clientArea = GetClientBounds(); + return Point(clientPosition.x + clientArea.x, clientPosition.y + clientArea.y); +} + +FloatPoint +_Form::TranslateFromClientAreaPosition(const FloatPoint& clientPosition) const +{ + FloatRectangle clientArea = GetClientBoundsF(); + return FloatPoint(clientPosition.x + clientArea.x, clientPosition.y + clientArea.y); +} + +bool +_Form::IsDeflated(void) +{ + if (__deflated) + { + return true; + } + else + { + return false; + } +} + +bool +_Form::DeflateClientRectHeight(int height) +{ + if ( height > 0) + { + __deflated = true; + } + else + { + __deflated = false; + } + + __deflatedHeight = _CoordinateSystemUtils::ConvertToFloat(height); + + AdjustClientBounds(); + + if (__pFooter) + { + float adjHeight = 0.0f; + + if (!(__pFooter->GetVisibleState()) || IsFooterTranslucent()) + { + adjHeight = GetToolbarHeightF(false); + } + + FloatRectangle bounds(0.0f, GetClientBoundsF().y + GetClientBoundsF().height-adjHeight, + GetClientBoundsF().width, GetToolbarHeightF(false)); + SetFooterBounds(bounds); + } + + return true; +} + +bool +_Form::DeflateClientRectHeight(float height) +{ + if ( height > 0.0f) + { + __deflated = true; + } + else + { + __deflated = false; + } + + __deflatedHeight = height; + + AdjustClientBounds(); + + if (__pFooter) + { + float adjHeight = 0.0f; + + if (!(__pFooter->GetVisibleState()) || IsFooterTranslucent()) + { + adjHeight = GetToolbarHeightF(false); + } + + FloatRectangle bounds(0.0f, GetClientBoundsF().y + GetClientBoundsF().height-adjHeight, + GetClientBoundsF().width, GetToolbarHeightF(false)); + SetFooterBounds(bounds); + } + + return true; +} + +_Toolbar* +_Form::CreateHeaderN(void) +{ + _Toolbar* __pHeader = _Toolbar::CreateToolbarN(true); + SysTryReturn(NID_UI_CTRL, __pHeader, null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + return __pHeader; +} + +_Toolbar* +_Form::CreateFooterN(void) +{ + _Toolbar* __pFooter = _Toolbar::CreateToolbarN(false); + SysTryReturn(NID_UI_CTRL, __pFooter, null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + return __pFooter; +} + +_Tab* +_Form::CreateTabN(void) +{ + _Tab* __pTab = _Tab::CreateTabN(); + SysTryReturn(NID_UI_CTRL, __pTab, null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + return __pTab; +} + +_Indicator* +_Form::CreateIndicatorN(void) +{ + _Indicator* pIndicator = _Indicator::CreateIndicator(); + SysTryReturn(NID_UI_CTRL, pIndicator, null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + return pIndicator; +} + +int +_Form::GetToolbarHeight(bool header) const +{ + int toolbarHeight = 0; + + if (header && (__formStyle & FORM_STYLE_HEADER)) + { + if (__pHeader) + { + toolbarHeight = __pHeader->GetBounds().height; + } + } + else if (header && (__formStyle & FORM_STYLE_TITLE)) + { + GET_SHAPE_CONFIG(HEADER::HEIGHT, GetOrientation(), toolbarHeight); + } + else if (__formStyle & FORM_STYLE_SOFTKEY_0 || __formStyle & FORM_STYLE_SOFTKEY_1 || __formStyle & FORM_STYLE_OPTIONKEY) + { + GET_SHAPE_CONFIG(FOOTER::SOFTKEY_HEIGHT, GetOrientation(), toolbarHeight); + } + else + { + if (__pFooter) + { + toolbarHeight = __pFooter->GetBounds().height; + } + + //GET_SHAPE_CONFIG(L"FOOTER_HEIGHT", GetOrientation(), toolbarHeight); + } + + return toolbarHeight; +} + +float +_Form::GetToolbarHeightF(bool header) const +{ + FloatDimension toolbarSize(0.0f, 0.0f); + + if (header && (__formStyle & FORM_STYLE_HEADER)) + { + if (__pHeader) + { + toolbarSize.height = __pHeader->GetBoundsF().height; + } + } + else if (header && (__formStyle & FORM_STYLE_TITLE)) + { + GET_SHAPE_CONFIG(HEADER::HEIGHT, GetOrientation(), toolbarSize.height); + } + else if (__formStyle & FORM_STYLE_SOFTKEY_0 || __formStyle & FORM_STYLE_SOFTKEY_1 || __formStyle & FORM_STYLE_OPTIONKEY) + { + GET_SHAPE_CONFIG(FOOTER::SOFTKEY_HEIGHT, GetOrientation(), toolbarSize.height); + } + else + { + if (__pFooter) + { + toolbarSize.height = __pFooter->GetBoundsF().height; + } + } + + toolbarSize = TranslateSize(toolbarSize); + + return toolbarSize.height; +} + +int +_Form::GetTabHeight(void) const +{ + int height = 0; + + if ((__formStyle & FORM_STYLE_TEXT_TAB) || (__formStyle & FORM_STYLE_ICON_TAB)) + { + GET_SHAPE_CONFIG(TAB::HEIGHT, GetOrientation(), height); + } + + return height; +} + +float +_Form::GetTabHeightF(void) const +{ + FloatDimension tabSize(0.0f, 0.0f); + + if ((__formStyle & FORM_STYLE_TEXT_TAB) || (__formStyle & FORM_STYLE_ICON_TAB)) + { + GET_SHAPE_CONFIG(TAB::HEIGHT, GetOrientation(), tabSize.height); + } + + tabSize = TranslateSize(tabSize); + + return tabSize.height; +} + +bool +_Form::RemoveHeader(void) +{ + result r = E_SUCCESS; + if (__pHeader) + { + if (__pHeader->GetParent()) + { + r = DetachSystemChild(*__pHeader); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, r, "[%s] Propagating.", GetErrorMessage(r)); + } + __pHeader = null; + + AdjustClientBounds(); + } + else + { + return false; + } + + return true; +} + +bool +_Form::RemoveFooter(void) +{ + result r = E_SUCCESS; + if (__pFooter) + { + if (__pFooter->GetParent()) + { + r = DetachSystemChild(*__pFooter); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, r, "[%s] Propagating.", GetErrorMessage(r)); + } + __pFooter = null; + + AdjustClientBounds(); + } + else + { + return false; + } + + return true; +} + +bool +_Form::RemoveTab(void) +{ + result r = E_SUCCESS; + if (__pTab) + { + if (__pTab->GetParent()) + { + r = DetachSystemChild(*__pTab); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, r, "[%s] Propagating.", GetErrorMessage(r)); + } + __pTab = null; + + AdjustClientBounds(); + } + else + { + return false; + } + + return true; +} + +bool +_Form::RemoveIndicator(void) +{ + result r = E_SUCCESS; + if (__pIndicator) + { + r = GetVisualElement()->DetachChild(*__pIndicator); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, r, "[%s] Propagating.", GetErrorMessage(r)); + __pIndicator = null; + } + else + { + return false; + } + + return true; +} + +result +_Form::SetHeaderBounds(Rectangle& bounds) +{ + SysTryReturn(NID_UI_CTRL, __pHeader, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] Header isn't constructed."); + + bool movable = __pHeader->IsMovable(); + bool resizable = __pHeader->IsResizable(); + + __pHeader->SetMovable(true); + __pHeader->SetResizable(true); + + result r = E_SUCCESS; + r = __pHeader->SetBounds(_CoordinateSystemUtils::ConvertToFloat(bounds)); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pHeader->SetMovable(movable); + __pHeader->SetResizable(resizable); + + AdjustClientBounds(); + + return r; +} + +result +_Form::SetHeaderBounds(FloatRectangle& bounds) +{ + SysTryReturn(NID_UI_CTRL, __pHeader, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] Header isn't constructed."); + + bool movable = __pHeader->IsMovable(); + bool resizable = __pHeader->IsResizable(); + + __pHeader->SetMovable(true); + __pHeader->SetResizable(true); + + result r = E_SUCCESS; + r = __pHeader->SetBounds(bounds); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pHeader->SetMovable(movable); + __pHeader->SetResizable(resizable); + + AdjustClientBounds(); + + return r; +} + +result +_Form::SetFooterBounds(Rectangle& bounds) +{ + SysTryReturn(NID_UI_CTRL, __pFooter, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] Footer isn't constructed."); + + bool movable = __pFooter->IsMovable(); + bool resizable = __pFooter->IsResizable(); + + __pFooter->SetMovable(true); + __pFooter->SetResizable(true); + + result r = E_SUCCESS; + r = __pFooter->SetBounds(_CoordinateSystemUtils::ConvertToFloat(bounds)); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pFooter->SetMovable(movable); + __pFooter->SetResizable(resizable); + + AdjustClientBounds(); + + return r; +} + +bool +_Form::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) +{ + return false; +} + +bool +_Form::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) +{ + if (keyInfo.GetKeyCode() == _KEY_ESC || keyInfo.GetKeyCode() == _KEY_BACK) + { + 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) + { + void* pData = GetUserData(); + if (pData) + { + _FormImpl* pDataImpl = static_cast<_FormImpl*>(pData); + pDataImpl->OnFormMenuRequested(*this); + } + + return false; + } + + return false; +} + +result +_Form::SetFooterBounds(FloatRectangle& bounds) +{ + SysTryReturn(NID_UI_CTRL, __pFooter, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] Footer isn't constructed."); + + bool movable = __pFooter->IsMovable(); + bool resizable = __pFooter->IsResizable(); + + __pFooter->SetMovable(true); + __pFooter->SetResizable(true); + + result r = E_SUCCESS; + r = __pFooter->SetBounds(bounds); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pFooter->SetMovable(movable); + __pFooter->SetResizable(resizable); + + AdjustClientBounds(); + + return r; +} + +result +_Form::SetTabBounds(Rectangle& bounds) +{ + SysTryReturn(NID_UI_CTRL, __pTab, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] Tab isn't constructed."); + + bool movable = __pTab->IsMovable(); + bool resizable = __pTab->IsResizable(); + + __pTab->SetMovable(true); + __pTab->SetResizable(true); + + result r = E_SUCCESS; + r = __pTab->SetBounds(_CoordinateSystemUtils::ConvertToFloat(bounds)); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pTab->SetMovable(movable); + __pTab->SetResizable(resizable); + + AdjustClientBounds(); + + return r; +} + +result +_Form::SetTabBounds(FloatRectangle& bounds) +{ + SysTryReturn(NID_UI_CTRL, __pTab, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] Tab isn't constructed."); + + bool movable = __pTab->IsMovable(); + bool resizable = __pTab->IsResizable(); + + __pTab->SetMovable(true); + __pTab->SetResizable(true); + + result r = E_SUCCESS; + r = __pTab->SetBounds(bounds); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pTab->SetMovable(movable); + __pTab->SetResizable(resizable); + + AdjustClientBounds(); + + return r; +} + +result +_Form::AddActionEventListener(_IActionEventListener& listener) +{ + if (__pActionEvent == null) + { + __pActionEvent = _ActionEvent::CreateInstanceN(*this); + + SysTryReturn(NID_UI_CTRL, __pActionEvent, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred.") + } + + result r = __pActionEvent->AddListener(listener); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +void +_Form::AddOptionkeyActionListener(_IActionEventListener& listener) +{ + if (HasOptionkey() == false) + { + return ; + } +} + +void +_Form::AddSoftkeyActionListener(_Softkey softkey, _IActionEventListener& listener) +{ + if (CheckSoftkey(softkey) == false) + { + return ; + } +} + +result +_Form::RemoveActionEventListener(_IActionEventListener& listener) +{ + SysTryReturn(NID_UI_CTRL, __pActionEvent, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] This instance isn't constructed.") + // Todo : check fail case of RemoveListener + result r = __pActionEvent->RemoveListener(listener); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +void +_Form::RemoveOptionkeyActionListener(_IActionEventListener& listener) +{ + if (HasOptionkey() == false) + { + return ; + } +} + +void +_Form::RemoveSoftkeyActionListener(_Softkey softkey, _IActionEventListener& listener) +{ + if (CheckSoftkey(softkey) == false) + { + return ; + } +} + +void +_Form::OnActionPerformed(const _Control& source, int actionId) +{ + switch (actionId) + { + case ID_BACK_BUTTON: + if (!__keypadShowstate && !__clipboardShowstate) + { + if (__pFormBackEventListener) + { + __pFormBackEventListener->OnFormBackRequested(*this); + } + } + else + { + if (__keypadShowstate) + { + if (!__alreadyStopKeySent) + { + _SystemUtilImpl::GenerateKeyEvent(KEY_EVENT_TYPE_PRESSED, _KEY_BACK); + _SystemUtilImpl::GenerateKeyEvent(KEY_EVENT_TYPE_RELEASED, _KEY_BACK); + __alreadyStopKeySent = true; + } + } + + if (__clipboardShowstate) + { + _SystemUtilImpl::SendKeyStopMessage(); + } + } + break; + case ID_MENU_BUTTON : + if (__pFormMenuEventListener) + { + __pFormMenuEventListener->OnFormMenuRequested(*this); + } + break; + + default: + break; + } +} + +void +_Form::OnChildVisibleStateChanged(const _Control& child) +{ + if (IsHeaderVisible()) + { + float adjHeight = 0.0f; + if (IsIndicatorVisible()) + { + FloatRectangle indicatorBounds = GetIndicatorBoundsF(); + adjHeight = indicatorBounds.height; + + if (IsIndicatorTranslucent()) + { + if (!IsHeaderTranslucent()) + { + adjHeight = 0.0f; + } + else + { + if (GetOrientation() == _CONTROL_ORIENTATION_LANDSCAPE) + { + adjHeight = 0.0f; + } + else + { + if (FORM_STYLE_INDICATOR_AUTO_HIDE & GetFormStyle()) + { + adjHeight = 0.0f; + } + } + } + } + } + FloatRectangle bounds = __pHeader->GetBoundsF(); + bounds.y = adjHeight; + SetHeaderBounds(bounds); + } + + AdjustClientBounds(); +} + +Rectangle +_Form::GetIndicatorBounds(void) const +{ + _Control* pParent = GetParent(); + _Frame* pFrame = dynamic_cast<_Frame*>(pParent); + + if (pFrame) + { + FrameShowMode mode = pFrame->GetShowMode(); + if (mode != FRAME_SHOW_MODE_FULL_SCREEN) + { + if (mode == FRAME_SHOW_MODE_MINIMIZED) + { + if (pFrame->GetShowMode(false) != FRAME_SHOW_MODE_FULL_SCREEN) + { + return Rectangle(0, 0, 0, 0); + } + } + } + } + + int indicatorwidth = GetClientBounds().width; + int indicatorheight = 0; + + 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); + } + } + + Rectangle rect (0, 0, indicatorwidth, indicatorheight); + + SetLastResult(E_SUCCESS); + + return rect; +} + +FloatRectangle +_Form::GetIndicatorBoundsF(void) const +{ + _Control* pParent = GetParent(); + _Frame* pFrame = dynamic_cast<_Frame*>(pParent); + + if (pFrame) + { + FrameShowMode mode = pFrame->GetShowMode(); + if (mode != FRAME_SHOW_MODE_FULL_SCREEN) + { + if (mode == FRAME_SHOW_MODE_MINIMIZED) + { + if (pFrame->GetShowMode(false) != FRAME_SHOW_MODE_FULL_SCREEN) + { + return FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); + } + } + } + } + + float indicatorwidth = GetClientBoundsF().width; + 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); + } + } + + FloatRectangle rect (0.0f, 0.0f, indicatorwidth, indicatorheight); + + SetLastResult(E_SUCCESS); + + return rect; +} + +void +_Form::SetHeader(_Toolbar* pToolbar) +{ + __pHeader = pToolbar; +} + +void +_Form::SetFooter(_Toolbar* pToolbar) +{ + __pFooter = pToolbar; +} + +void +_Form::SetTab(_Tab* pTab) +{ + __pTab = pTab; +} + +void +_Form::SetTabStyle(int style) +{ + __pTab->SetStyle(style); +} + +result +_Form::SetIndicatorShowState(bool state) +{ + result r = E_SUCCESS; + + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + SysTryReturn(NID_UI_CTRL, pEcoreEvas, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Unable to get evas"); + + _Control* pParent = GetParent(); + if (!pParent) + { + pParent = const_cast<_Control*>(pEcoreEvas->GetFrame()); + } + _Frame* pFrame = dynamic_cast<_Frame*>(pParent); + + if (pFrame && IsAttachedToMainTree()) + { + FrameShowMode mode = pFrame->GetShowMode(); + if (mode != FRAME_SHOW_MODE_FULL_SCREEN) + { + if (mode == FRAME_SHOW_MODE_MINIMIZED) + { + if (pFrame->GetShowMode(false) == FRAME_SHOW_MODE_FULL_SCREEN) + { + r = __pIndicator->SetIndicatorShowState(state); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + else + { + r = __pIndicator->SetIndicatorShowState(false); + return r; + } + } + else if (mode == FRAME_SHOW_MODE_FULL_SCREEN) + { + r = __pIndicator->SetIndicatorShowState(state); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + else if (!pFrame && IsAttachedToMainTree()) + { + __pIndicator->SetShowState(false); + } + + __indicatorShowState = state; + + return r; +} + +void +_Form::SetIndicatorAutoHide(bool portrait, bool landscape) +{ + result r = E_SUCCESS; + + _Control* pParent = GetParent(); + _Frame* pFrame = dynamic_cast<_Frame*>(pParent); + + if (pFrame && IsAttachedToMainTree()) + { + FrameShowMode mode = pFrame->GetShowMode(); + if (mode != FRAME_SHOW_MODE_FULL_SCREEN) + { + if (mode == FRAME_SHOW_MODE_MINIMIZED) + { + if (pFrame->GetShowMode(false) == FRAME_SHOW_MODE_FULL_SCREEN) + { + __pIndicator->SetIndicatorAutoHide(portrait, landscape); + r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + } + else if (mode == FRAME_SHOW_MODE_FULL_SCREEN) + { + __pIndicator->SetIndicatorAutoHide(portrait, landscape); + r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + } +} + +result +_Form::SetIndicatorOpacity(_IndicatorOpacity opacity) +{ + result r = E_SUCCESS; + + _Control* pParent = GetParent(); + _Frame* pFrame = dynamic_cast<_Frame*>(pParent); + + if (pFrame && IsAttachedToMainTree()) + { + FrameShowMode mode = pFrame->GetShowMode(); + + if (mode != FRAME_SHOW_MODE_FULL_SCREEN) + { + if (mode == FRAME_SHOW_MODE_MINIMIZED) + { + if (pFrame->GetShowMode(false) == FRAME_SHOW_MODE_FULL_SCREEN) + { + r = __pIndicator->SetIndicatorOpacity(opacity); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + } + else if (mode == FRAME_SHOW_MODE_FULL_SCREEN) + { + r = __pIndicator->SetIndicatorOpacity(opacity); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + + if (opacity == _INDICATOR_OPACITY_TRANSLUCENT) + { + __transparentIndicator = true; + } + else if (opacity == _INDICATOR_OPACITY_OPAQUE) + { + __transparentIndicator = false; + } + + return r; +} + +result +_Form::AddIndicatorObject(void) +{ + result r = E_SUCCESS; + + if (__pIndicator) + { + r = __pIndicator->AddIndicatorObject(this, GetRootWindow()); + } + + return r; +} + +result +_Form::DeleteIndicatorObject(void) +{ + result r = E_SUCCESS; + if (__pIndicator) + { + r = __pIndicator->DeleteIndicatorObject(); + } + + return r; +} + +void +_Form::SetKeypadShowState(bool state) +{ + __keypadShowstate = state; + + if (!state) + { + __alreadyStopKeySent = false; + } + + if (__clipboardShowstate) + { + return; + } +} + +void +_Form::SetClipboardShowState(bool state) +{ + __clipboardShowstate = state; + + if (__keypadShowstate) + { + return; + } +} + +result +_Form::AttachedToMainTree(void) +{ + _Frame* pFrame = dynamic_cast<_Frame*>(GetParent()); + if (pFrame != null) + { + FrameShowMode mode = pFrame->GetShowMode(); + if (mode != FRAME_SHOW_MODE_FULL_SCREEN) + { + 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)); + } + } + } + + result r = E_SUCCESS; + + if (FORM_STYLE_INDICATOR & GetFormStyle()) + { + __pIndicator->OnAttachedToMainTree(); + AddIndicatorObject(); + + if (__transparentIndicator != IsIndicatorTranslucent()) + { + if (__transparentIndicator == true) + { + SetIndicatorOpacity(_INDICATOR_OPACITY_TRANSLUCENT); + } + else + { + SetIndicatorOpacity(_INDICATOR_OPACITY_OPAQUE); + } + } + + if (__indicatorShowState != IsIndicatorVisible()) + { + SetIndicatorShowState(__indicatorShowState); + } + + if (FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE & GetFormStyle()) + { + SetIndicatorAutoHide(false, true); + } + else + { + SetIndicatorAutoHide(false, false); + } + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + if ((FORM_STYLE_INDICATOR_AUTO_HIDE & GetFormStyle()) && (FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE & GetFormStyle())) + { + AddIndicatorObject(); + SetIndicatorShowState(__indicatorShowState); + SetIndicatorAutoHide(true, true); + } + else + { + if (FORM_STYLE_INDICATOR_AUTO_HIDE & GetFormStyle()) + { + AddIndicatorObject(); + if (GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT) + { + SetIndicatorShowState(__indicatorShowState); + } + else + { + SetIndicatorShowState(false); + } + SetIndicatorAutoHide(true, false); + + } + else if(FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE & GetFormStyle()) + { + AddIndicatorObject(); + if (GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT) + { + SetIndicatorShowState(false); + } + else + { + SetIndicatorShowState(__indicatorShowState); + } + SetIndicatorAutoHide(false, true); + } + else + { + __pIndicator->SetWindow(GetRootWindow()); + r = SetIndicatorShowState(false); + SetIndicatorAutoHide(false, false); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + } + + AdjustClientBounds(); + + return r; +} + +result +_Form::DetachingFromMainTree(void) +{ + result r = E_SUCCESS; + r = DeleteIndicatorObject(); + return r; +} + +result +_Form::AdjustClientBounds(void) +{ + result r = E_SUCCESS; + + FloatDimension size = GetSizeF(); + FloatRectangle clientBounds(0.0f, 0.0f, size.width, size.height); + + if (__deflated) + { + clientBounds.height -= __deflatedHeight; + } + + FloatRectangle indicatorBounds = GetIndicatorBoundsF(); + + _Control* pParent = GetParent(); + _Frame* pFrame = dynamic_cast<_Frame*>(pParent); + if (pFrame) + { + FrameShowMode mode = pFrame->GetShowMode(); + + if (mode != FRAME_SHOW_MODE_FULL_SCREEN) + { + if (mode == FRAME_SHOW_MODE_MINIMIZED) + { + if (pFrame->GetShowMode(false) == FRAME_SHOW_MODE_FULL_SCREEN) + { + if (FORM_STYLE_INDICATOR & __formStyle) + { + if (IsIndicatorVisible() && !IsIndicatorTranslucent()) + { + clientBounds.y += indicatorBounds.height; + clientBounds.height -= indicatorBounds.height; + } + } + } + } + } + else + { + if (FORM_STYLE_INDICATOR & __formStyle) + { + if (IsIndicatorVisible() && !IsIndicatorTranslucent()) + { + clientBounds.y += indicatorBounds.height; + clientBounds.height -= indicatorBounds.height; + } + } + } + } + else + { + if (FORM_STYLE_INDICATOR & __formStyle) + { + if (IsIndicatorVisible() && !IsIndicatorTranslucent()) + { + clientBounds.y += indicatorBounds.height; + clientBounds.height -= indicatorBounds.height; + } + } + } + + if (__pHeader) + { + if (__pHeader->GetVisibleState() && !IsHeaderTranslucent()) + { + clientBounds.y += GetToolbarHeightF(true); + clientBounds.height -= GetToolbarHeightF(true); + } + } + + if (__pTab) + { + if (__pTab->GetVisibleState()) //&& !IsHeaderTranslucent()) + { + clientBounds.y += GetTabHeightF(); + clientBounds.height -= GetTabHeightF(); + } + } + + if (__pFooter) + { + if (FORM_STYLE_FOOTER & __formStyle || FORM_STYLE_SOFTKEY_0 & __formStyle || FORM_STYLE_SOFTKEY_1 & __formStyle + || FORM_STYLE_OPTIONKEY & __formStyle) + { + if (__pFooter->GetVisibleState() && !IsFooterTranslucent()) + { + clientBounds.height -= GetToolbarHeightF(false); + } + } + } + + SetClientBounds(clientBounds); + + return r; +} + +void +_Form::OnBoundsChanged(void) +{ + FloatRectangle toolbarBounds; + FloatRectangle indicatorFloatBounds(0.0f, 0.0f, 0.0f, 0.0f); + + float indicatorheight = 0.0f; + + GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, GetOrientation(), indicatorheight); + + if (__pIndicator && (indicatorheight > 0)) + { + __pIndicator->SetBounds(FloatRectangle(0.0f, 0.0f, GetClientBoundsF().width, indicatorheight)); + } + AdjustClientBounds(); + + if (HasHeader()) + { + if (IsIndicatorVisible()) + { + indicatorFloatBounds = GetIndicatorBoundsF(); + if (IsIndicatorTranslucent()) + { + if (!IsHeaderTranslucent()) + { + indicatorFloatBounds.height = 0.0f; + } + else + { + if (GetOrientation() == _CONTROL_ORIENTATION_LANDSCAPE) + { + indicatorFloatBounds.height = 0.0f; + } + } + } + } + + toolbarBounds = GetHeader()->GetBoundsF(); + toolbarBounds.width = GetSizeF().width; + + FloatRectangle bounds(toolbarBounds.x, indicatorFloatBounds.height, toolbarBounds.width, toolbarBounds.height); + SetHeaderBounds(bounds); + } + + if (HasFooter()) + { + toolbarBounds = GetFooter()->GetBoundsF(); + toolbarBounds.width = GetSizeF().width; + toolbarBounds.y = GetSizeF().height - toolbarBounds.height; + SetFooterBounds(toolbarBounds); + } + + if (HasTab()) + { + toolbarBounds = GetTab()->GetBoundsF(); + toolbarBounds.width = GetSizeF().width; + SetTabBounds(toolbarBounds); + } + + AdjustClientBounds(); +} + +FloatDimension +_Form::TranslateSize(FloatDimension size) const +{ + FloatDimension returnSize(0.0f, 0.0f); + returnSize = CoordinateSystem::AlignToDevice(size); + + return returnSize; +} + +result +_Form::SetNotificationTrayOpenEnabled(bool enable) +{ + SysTryReturnResult(NID_UI_CTRL, (__formStyle & FORM_STYLE_INDICATOR || __formStyle & FORM_STYLE_INDICATOR_AUTO_HIDE), E_INVALID_OPERATION, "[E_INVALID_OPERATION] The style of form is invalid."); + + if (__pIndicator) + { + __pIndicator->SetNotificationTrayOpenEnabled(enable); + } + return E_SUCCESS; +} + +bool +_Form::IsNotificationTrayOpenEnabled(void) const +{ + SysTryReturnResult(NID_UI_CTRL, (__formStyle & FORM_STYLE_INDICATOR || __formStyle & FORM_STYLE_INDICATOR_AUTO_HIDE), E_INVALID_OPERATION, "[E_INVALID_OPERATION] The style of form is invalid."); + + if (__pIndicator) + { + __pIndicator->IsNotificationTrayOpenEnabled(); + } + return true; +} + +IListT<_Control*>* +_Form::GetFocusList(void) const +{ + if(!__pFocusControlList) + { + __pFocusControlList.reset(GetFocusListN()); + __pFocusControlList->InsertAt(const_cast<_Form*>(this), 0); + } + return __pFocusControlList.get(); +} + +void +_Form::SetFocusControl(const _Control* pControl) +{ + __pFocusControl = const_cast<_Control*>(pControl); +} + +_Control* +_Form::GetFocusControl(void) const +{ + return __pFocusControl; +} + +void +_Form::ResetFocusList(void) +{ + if(__pFocusControlList) + { + __pFocusControlList.reset(); + } +} + +void +_Form::UpdateClientBounds(const FloatDimension& size, FloatRectangle& clientBounds) +{ + clientBounds.width = size.width; + clientBounds.height = size.height; + + if (__deflated) + { + clientBounds.height -= __deflatedHeight; + } + + FloatRectangle indicatorBounds = GetIndicatorBoundsF(); + + _Control* pParent = GetParent(); + _Frame* pFrame = dynamic_cast<_Frame*>(pParent); + if (pFrame) + { + FrameShowMode mode = pFrame->GetShowMode(); + + if (mode != FRAME_SHOW_MODE_FULL_SCREEN) + { + if (mode == FRAME_SHOW_MODE_MINIMIZED) + { + if (pFrame->GetShowMode(false) == FRAME_SHOW_MODE_FULL_SCREEN) + { + if (FORM_STYLE_INDICATOR & __formStyle) + { + if (IsIndicatorVisible() && !IsIndicatorTranslucent()) + { + clientBounds.y += indicatorBounds.height; + clientBounds.height -= indicatorBounds.height; + } + } + } + } + } + else + { + if (FORM_STYLE_INDICATOR & __formStyle) + { + if (IsIndicatorVisible() && !IsIndicatorTranslucent()) + { + clientBounds.y += indicatorBounds.height; + clientBounds.height -= indicatorBounds.height; + } + } + } + } + else + { + if (FORM_STYLE_INDICATOR & __formStyle) + { + if (IsIndicatorVisible() && !IsIndicatorTranslucent()) + { + clientBounds.y += indicatorBounds.height; + clientBounds.height -= indicatorBounds.height; + } + } + } + + if (__pHeader) + { + if (__pHeader->GetVisibleState() && !IsHeaderTranslucent()) + { + clientBounds.y += GetToolbarHeightF(true); + clientBounds.height -= GetToolbarHeightF(true); + } + } + + if (__pTab) + { + if (__pTab->GetVisibleState()) //&& !IsHeaderTranslucent()) + { + clientBounds.y += GetTabHeightF(); + clientBounds.height -= GetTabHeightF(); + } + } + + if (__pFooter) + { + if (FORM_STYLE_FOOTER & __formStyle || FORM_STYLE_SOFTKEY_0 & __formStyle || FORM_STYLE_SOFTKEY_1 & __formStyle + || FORM_STYLE_OPTIONKEY & __formStyle) + { + if (__pFooter->GetVisibleState() && !IsFooterTranslucent()) + { + clientBounds.height -= GetToolbarHeightF(false); + } + } + } +} + +void +_Form::OnVisibleStateChanged(void) +{ + if (GetVisibleState()) + { + if (FORM_STYLE_INDICATOR & GetFormStyle()) + { + if (GetOrientation() == _CONTROL_ORIENTATION_LANDSCAPE) + { + if (FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE & GetFormStyle()) + { + SetIndicatorShowState(true); + SetIndicatorAutoHide(false, true); + } + else + { + SetIndicatorShowState(false); + SetIndicatorAutoHide(false, false); + } + } + else + { + + if (FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE & GetFormStyle()) + { + SetIndicatorAutoHide(false, true); + } + else + { + SetIndicatorAutoHide(false, false); + } + SetIndicatorShowState(__indicatorShowState); + } + } + else + { + if ((FORM_STYLE_INDICATOR_AUTO_HIDE & GetFormStyle()) && (FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE & GetFormStyle())) + { + SetIndicatorShowState(__indicatorShowState); + SetIndicatorAutoHide(true, true); + } + else + { + if (FORM_STYLE_INDICATOR_AUTO_HIDE & GetFormStyle()) + { + if (GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT) + { + SetIndicatorShowState(true); + } + else + { + SetIndicatorShowState(false); + } + SetIndicatorAutoHide(true, false); + + } + else if(FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE & GetFormStyle()) + { + if (GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT) + { + SetIndicatorShowState(false); + } + else + { + SetIndicatorShowState(__indicatorShowState); + } + SetIndicatorAutoHide(false, true); + } + else + { + SetIndicatorShowState(false); + SetIndicatorAutoHide(false, false); + } + } + } + ActivateIndicator(); + } + else + { + DeactivateIndicator(); + } + AdjustClientBounds(); +} + +void +_Form::SetFormOrientationStatusEventListener(_IFormOrientationStatusEventListener* pFormOrientationstatusEventListener) +{ + __pFormOrientationstatusEventListener = pFormOrientationstatusEventListener; +} + +Tizen::Ui::OrientationStatus +_Form::GetFormOrientationStatus(void) const +{ + if (__pFormOrientationstatusEventListener) + { + return __pFormOrientationstatusEventListener->OnFormOrientationStatusRequested(); + } + + return ORIENTATION_STATUS_PORTRAIT; +} + +_Control* +_Form::GetFocusTraversalControl(void) const +{ + return __pFocusTraversalControl; +} +void +_Form::SetFocusTraversalControl(_Control* pControl) +{ + __pFocusTraversalControl = pControl; +} + +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; + } + } +} + + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_FormImpl.cpp b/src/ui/controls/FUiCtrl_FormImpl.cpp new file mode 100644 index 0000000..28657a0 --- /dev/null +++ b/src/ui/controls/FUiCtrl_FormImpl.cpp @@ -0,0 +1,2254 @@ +// +// 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. +// + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "FUi_UiEventManager.h" +#include "FUi_LayoutImpl.h" +#include "FUi_LayoutLayoutMaker.h" +#include "FUi_EcoreEvasMgr.h" +#include "FUi_EcoreEvas.h" +#include "FUi_ControlImplManager.h" +#include "FUi_OrientationAgent.h" +#include "FUi_ImeOrientationAgent.h" +#include "FUi_UiBuilder.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_DataBindingContextImpl.h" +#include "FUi_ResourceSizeInfo.h" +#include "FUi_ResourceManager.h" +#include "FUiAnim_VisualElement.h" +#include "FUiCtrl_FormImpl.h" +#include "FUiCtrl_HeaderImpl.h" +#include "FUiCtrl_FooterImpl.h" +#include "FUiCtrl_Form.h" +#include "FUiCtrl_Frame.h" +#include "FUiCtrl_FrameImpl.h" +#include "FUiCtrl_TabImpl.h" +#include "FUiCtrl_Indicator.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Animations; + +#define OPTIONKEY SOFTKEY_COUNT + +namespace +{ +const wchar_t* _REQUEST_ORIENTATION_EVENT = L"RequestOrientationEvent"; +} + +namespace Tizen { namespace Ui { namespace Controls +{ + +Dimension +_FormImpl::FormSizeInfo::GetDefaultMinimumSize(_ControlOrientation orientation) const +{ + result r = E_SUCCESS; + Dimension dimension(0, 0); + SetLastResult(r); + + return dimension; +} + +FloatDimension +_FormImpl::FormSizeInfo::GetDefaultMinimumSizeF(_ControlOrientation orientation) const +{ + result r = E_SUCCESS; + FloatDimension dimension(0.0f, 0.0f); + SetLastResult(r); + + return dimension; +} + +const _FormImpl* +_FormImpl::GetInstance(const Form& form) +{ + return static_cast (form._pControlImpl); +} + +_FormImpl* +_FormImpl::GetInstance(Form& form) +{ + return static_cast<_FormImpl*> (form._pControlImpl); +} + +_FormImpl::_FormImpl(Form* pPublic, _Form* pCore, Layout* pPublicPortraitLayout, Layout* pPublicLandscapeLayout) + : _ContainerImpl(pPublic, pCore, pPublicPortraitLayout, pPublicLandscapeLayout) + , __pForm(null) + , __pFormBackEventListener(null) + , __pFormMenuEventListener(null) + , __pOriAgent(null) + , __pImeOriAgent(null) + , __pLeftSoftkeyActionEvent(null) + , __pRightSoftkeyActionEvent(null) + , __pOptionMenuActionEvent(null) +{ + __pForm = pCore; + + int appType = _AppInfo::GetAppType(); + if (appType & _APP_TYPE_IME_APP) + { + __pImeOriAgent = _ImeOrientationAgent::CreateInstanceN(*pPublic); + SysTryReturnVoidResult(NID_UI_CTRL, __pImeOriAgent != null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + } + else + { + __pOriAgent = _OrientationAgent::CreateInstanceN(*pPublic); + SysTryReturnVoidResult(NID_UI_CTRL, __pOriAgent != null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + } +} + +_FormImpl::~_FormImpl(void) +{ + if (__pImeOriAgent) + { + delete __pImeOriAgent; + __pImeOriAgent = null; + } + + if (__pOriAgent) + { + delete __pOriAgent; + __pOriAgent = null; + } + + if (__pLeftSoftkeyActionEvent) + { + delete __pLeftSoftkeyActionEvent; + __pLeftSoftkeyActionEvent = null; + } + + if (__pRightSoftkeyActionEvent) + { + delete __pRightSoftkeyActionEvent; + __pRightSoftkeyActionEvent = null; + } + + if (__pOptionMenuActionEvent) + { + delete __pOptionMenuActionEvent; + __pOptionMenuActionEvent = null; + } + + __leftSoftkeyActionList.RemoveAll(false); + __rightSoftkeyActionList.RemoveAll(false); + + RemoveHeader(); + RemoveFooter(); + RemoveTabImpl(); + + __pForm = null; + + ClearLastResult(); +} + +_FormImpl* +_FormImpl::CreateFormImplN(Form* pControl, Layout* pPublicPortraitLayout, Layout* pPublicLandscapeLayout) +{ + result r = E_SUCCESS; + _VisualElement* pVisualElement = null; + + _Form* pCore = _Form::CreateFormN(); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pCore, null, r, "[%s] Propagating.", GetErrorMessage(r)); // [ToDo] interpret last result. + + _FormImpl* pImpl = new (std::nothrow) _FormImpl(pControl, pCore, pPublicPortraitLayout, pPublicLandscapeLayout); + + r = _ControlImpl::CheckConstruction(pCore, pImpl); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + const FloatDimension portraitSize = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF(); + const FloatDimension landscapeSize = FloatDimension(portraitSize.height, portraitSize.width); + + _ControlOrientation orientation = pCore->GetOrientation(); + + if (orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + r = pImpl->InitializeBoundsPropertiesF(GET_SIZE_INFO(Form), portraitSize, orientation); + } + else + { + r = pImpl->InitializeBoundsPropertiesF(GET_SIZE_INFO(Form), landscapeSize, orientation); + } + SysAssert(r == E_SUCCESS); + + pCore->SetFormOrientationStatusEventListener(pImpl); + + // Make surface opaque. + pVisualElement = pCore->GetVisualElement(); + SysTryCatch(NID_UI_CTRL, pVisualElement, , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + r = pVisualElement->SetSurfaceOpaque(true); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); // [ToDo] interpret last result. + + SetLastResult(E_SUCCESS); + + return pImpl; + +CATCH: + delete pCore; + delete pImpl; + + return null; +} + +const char* +_FormImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Controls::Form"; +} + +const Form& +_FormImpl::GetPublic(void) const +{ + return static_cast(_ControlImpl::GetPublic()); +} + +Form& +_FormImpl::GetPublic(void) +{ + return static_cast(_ControlImpl::GetPublic()); +} + +const _Form& +_FormImpl::GetCore(void) const +{ + return static_cast(_ControlImpl::GetCore()); +} + +_Form& +_FormImpl::GetCore(void) +{ + return static_cast<_Form&>(_ControlImpl::GetCore()); +} + +_ControlImpl* +_FormImpl::GetFocusControl(void) +{ + return null; +} + +unsigned long +_FormImpl::GetFormStyle(void) const +{ + return GetCore().GetFormStyle(); +} + +bool +_FormImpl::HasIndicator(void) const +{ + return GetCore().HasIndicator(); +} + +void +_FormImpl::SetFormStyle(unsigned long formStyle) +{ + result r = E_SUCCESS; + + _HeaderImpl* pHeader = GetHeader(); + _FooterImpl* pFooter = GetFooter(); + _TabImpl* pTabImpl = GetTabImpl(); + + if (IsAttachedToMainTree()) + { + if (FORM_STYLE_INDICATOR & formStyle) + { + _Frame* pFrame = dynamic_cast<_Frame*>(GetCore().GetParent()); + SysTryReturnVoidResult(NID_UI_CTRL, pFrame != null, E_INVALID_ARG, "A Form which has FORM_STYLE_INDICATOR style cannot be added to a container except Frame."); + } + } + + if ((formStyle & FORM_STYLE_INDICATOR) && (formStyle & FORM_STYLE_INDICATOR_AUTO_HIDE)) + { + SysLogException(NID_UI_CTRL, E_INVALID_ARG, "[E_INVALID_ARG] Invalid form style. FORM_STYLE_INDICATOR and FORM_STYLE_INDICATOR_AUTO_HIDE can't use each other."); + return; + } + + // check formstyle + if (((formStyle & FORM_STYLE_TITLE) || (formStyle & FORM_STYLE_TEXT_TAB) || (formStyle & FORM_STYLE_ICON_TAB)) && (formStyle & FORM_STYLE_HEADER)) + { + SysLogException(NID_UI_CTRL, E_INVALID_ARG, "[E_INVALID_ARG] Invalid form style. FORM_STYLE_TITLE, FORM_STYLE_TEXT_TAB or FORM_STYLE_ICON_TAB and FORM_STYLE_HEADER can't use each other."); + + // remove Header + if (pHeader) + { + RemoveHeader(); + r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + return; + } + + if (((formStyle & FORM_STYLE_SOFTKEY_0) || (formStyle & FORM_STYLE_SOFTKEY_1) || (formStyle & FORM_STYLE_OPTIONKEY)) && (formStyle & FORM_STYLE_FOOTER)) + { + SysLogException(NID_UI_CTRL, E_INVALID_ARG, "[E_INVALID_ARG] Invalid form style. FORM_STYLE_SOFTKEY0, FORM_STYLE_SOFTKEY_1 or FORM_STYLE_OPTIONKEY and FORM_STYLE_FOOTER can't use each other."); + + // remove Footer + if (pFooter) + { + RemoveFooter(); + r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + return; + } + + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + SysTryReturnVoidResult(NID_UI_CTRL, pEcoreEvas, E_SYSTEM, "[E_SYSTEM] Unable to get evas."); + + GetCore().SetFormStyle(formStyle); + + FloatRectangle indicatorBounds(0.0f, 0.0f, 0.0f, 0.0f); + + if (FORM_STYLE_INDICATOR & formStyle) + { + GetCore().SetIndicatorShowState(true); + indicatorBounds = GetCore().GetIndicatorBoundsF(); + + if (FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE & formStyle) + { + GetCore().SetIndicatorAutoHide(false, true); + } + else + { + if (OnFormOrientationStatusRequested() == ORIENTATION_STATUS_PORTRAIT || OnFormOrientationStatusRequested() == ORIENTATION_STATUS_PORTRAIT_REVERSE) + { + GetCore().SetIndicatorShowState(true); + } + else + { + GetCore().SetIndicatorShowState(false); + } + + GetCore().SetIndicatorAutoHide(false, false); + } + r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + } + else + { + if ((FORM_STYLE_INDICATOR_AUTO_HIDE & formStyle) && (FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE & formStyle)) + { + r = GetCore().SetIndicatorShowState(true); + GetCore().SetIndicatorAutoHide(true, true); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + if (FORM_STYLE_INDICATOR_AUTO_HIDE & formStyle) + { + r = GetCore().SetIndicatorShowState(true); + GetCore().SetIndicatorAutoHide(true, false); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + else if(FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE & formStyle) + { + r = GetCore().SetIndicatorShowState(true); + GetCore().SetIndicatorAutoHide(false, true); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + r = GetCore().SetIndicatorShowState(false); + GetCore().SetIndicatorAutoHide(false, false); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + } + + if (formStyle & FORM_STYLE_HEADER) + { + if (!pHeader) + { + pHeader = CreateHeaderN(); + SysTryReturnVoidResult(NID_UI_CTRL, pHeader != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + GetCore().SetHeader(&pHeader->GetCore()); + GetCore().AdjustClientBounds(); + + 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); + + r = GetCore().AttachSystemChild(pHeader->GetCore()); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + 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) + { + if (!pHeader) + { + pHeader = CreateHeaderN(); + SysTryReturnVoidResult(NID_UI_CTRL, pHeader != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + GetCore().SetHeader(&pHeader->GetCore()); + GetCore().AdjustClientBounds(); + + FloatRectangle bounds(0.0f, indicatorBounds.height, GetClientBoundsF().width, GetCore().GetToolbarHeightF(true)); + GetCore().SetHeaderBounds(bounds); + + 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 + { + // remove Header + if (pHeader) + { + RemoveHeader(); + r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + + if (formStyle & FORM_STYLE_TEXT_TAB) + { + float titleHeight = 0.0f; + + if (formStyle & FORM_STYLE_TITLE) + { + if (pHeader) + { + titleHeight = pHeader->GetBoundsF().height; + } + } + + if (GetCore().GetOrientation() == _CONTROL_ORIENTATION_LANDSCAPE) + { + indicatorBounds.height = 0.0f; + } + + if (!pTabImpl) + { + pTabImpl = CreateTabImplN(); + SysTryReturnVoidResult(NID_UI_CTRL, pTabImpl != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + float posY = indicatorBounds.height + titleHeight; + + GetCore().SetTab(&pTabImpl->GetCore()); + GetCore().AdjustClientBounds(); + + FloatRectangle bounds(0.0f, posY, GetClientBoundsF().width, GetCore().GetTabHeightF()); + GetCore().SetTabBounds(bounds); + + 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) + { + float titleHeight = 0.0f; + + if (formStyle & FORM_STYLE_TITLE) + { + if (pHeader) + { + titleHeight = pHeader->GetBoundsF().height; + } + } + + if (!pTabImpl) + { + pTabImpl = CreateTabImplN(); + SysTryReturnVoidResult(NID_UI_CTRL, pTabImpl != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + float posY = indicatorBounds.height + titleHeight; + + GetCore().SetTab(&pTabImpl->GetCore()); + GetCore().AdjustClientBounds(); + + FloatRectangle bounds(0.0f, posY, GetClientBoundsF().width, GetCore().GetTabHeightF()); + GetCore().SetTabBounds(bounds); + + 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 + { + if (pTabImpl) + { + RemoveTabImpl(); + r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + + if (formStyle & FORM_STYLE_FOOTER) + { + if (!pFooter) + { + pFooter = CreateFooterN(); + SysTryReturnVoidResult(NID_UI_CTRL, pFooter != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + GetCore().SetFooter(&pFooter->GetCore()); + GetCore().AdjustClientBounds(); + + FloatRectangle clientbounds = GetClientBoundsF(); + FloatRectangle bounds(0.0f, clientbounds.y + clientbounds.height, clientbounds.width, GetCore().GetToolbarHeightF(false)); + + GetCore().SetFooterBounds(bounds); + + r = GetCore().AttachSystemChild(pFooter->GetCore()); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + 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) + { + if (pFooter) + { + RemoveFooter(); + r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + pFooter = GetFooter(); + + if (!pFooter) + { + pFooter = CreateFooterN(); + SysTryReturnVoidResult(NID_UI_CTRL, pFooter != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + GetCore().SetFooter(&pFooter->GetCore()); + GetCore().AdjustClientBounds(); + + FloatRectangle clientbounds = GetClientBoundsF(); + FloatRectangle bounds(0.0f, clientbounds.y + clientbounds.height - GetCore().GetToolbarHeightF(false), clientbounds.width, GetCore().GetToolbarHeightF(false)); + + GetCore().SetFooterBounds(bounds); + + r = GetCore().AttachSystemChild(pFooter->GetCore()); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + GetCore().CreateSoftkey(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 + { + // remove Footer + if (pFooter) + { + RemoveFooter(); + r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + GetCore().AdjustClientBounds(); + } + } + + GetCore().AdjustClientBounds(); + + SetLastResult(E_SUCCESS); + + return; +} + +_FooterImpl* +_FormImpl::GetFooter(void) const +{ + _Toolbar* pToolbar = __pForm->GetFooter(); + if (pToolbar == null) + { + return null; + } + + _FooterImpl* pFooterImpl = static_cast<_FooterImpl*>(pToolbar->GetUserData()); + + return pFooterImpl; +} + +_HeaderImpl* +_FormImpl::GetHeader(void) const +{ + _Toolbar* pToolbar = __pForm->GetHeader(); + if (pToolbar == null) + { + return null; + } + + _HeaderImpl* pHeaderImpl = static_cast<_HeaderImpl*>(pToolbar->GetUserData()); + + return pHeaderImpl; +} + +// Ki-Dong,Hong.Temp +_TabImpl* +_FormImpl::GetTabImpl(void) const +{ + _Tab* pTab = __pForm->GetTab(); + if (pTab == null) + { + return null; + } + + _TabImpl* pTabImpl = static_cast<_TabImpl*>(pTab->GetUserData()); + + return pTabImpl; +} + +String +_FormImpl::GetTitleText(void) const +{ + return GetCore().GetTitleText(); +} + +HorizontalAlignment +_FormImpl::GetTitleTextHorizontalAlignment(void) const +{ + return GetCore().GetTitleTextHorizontalAlignment(); +} + +bool +_FormImpl::HasFooter(void) const +{ + return GetCore().HasFooter(); +} + +bool +_FormImpl::HasHeader(void) const +{ + return GetCore().HasHeader(); +} + +bool +_FormImpl::HasTitle(void) const +{ + return GetCore().HasTitle(); +} + +bool +_FormImpl::HasTab(void) const +{ + return GetCore().HasTab(); +} + +bool +_FormImpl::IsIndicatorVisible(void) const +{ + return GetCore().IsIndicatorVisible(); +} + +bool +_FormImpl::IsHeaderVisible(void) const +{ + return GetCore().IsHeaderVisible(); +} + +bool +_FormImpl::IsFooterVisible(void) const +{ + return GetCore().IsFooterVisible(); +} + +bool +_FormImpl::IsIndicatorTranslucent(void) const +{ + return GetCore().IsIndicatorTranslucent(); +} + +bool +_FormImpl::IsHeaderTranslucent(void) const +{ + return GetCore().IsHeaderTranslucent(); +} + +bool +_FormImpl::IsFooterTranslucent(void) const +{ + return GetCore().IsFooterTranslucent(); +} + +// Ki-Dong,Hong.Temp +bool +_FormImpl::IsTabTranslucent(void) const +{ + return GetCore().IsTabTranslucent(); +} + +result +_FormImpl::SetActionBarsTranslucent(unsigned long actionBars, bool translucent) +{ + return GetCore().SetActionBarsTranslucent(actionBars, translucent); +} + +result +_FormImpl::SetActionBarsVisible(unsigned long actionBars, bool visible) +{ + return GetCore().SetActionBarsVisible(actionBars, visible); +} + +result +_FormImpl::SetTitleIcon(const Bitmap* pTitleBitmap) +{ + return GetCore().SetTitleIcon(pTitleBitmap); +} + +result +_FormImpl::SetTitleText(const String& title, HorizontalAlignment alignment) +{ + return GetCore().SetTitleText(title, alignment); +} + +OverlayRegion* +_FormImpl::GetOverlayRegionN(const Rectangle& rect, OverlayRegionType regionType) +{ + return GetCore().GetOverlayRegionN(rect, regionType); +} + +OverlayRegion* +_FormImpl::GetOverlayRegionN(const FloatRectangle& rect, OverlayRegionType regionType) +{ + return GetCore().GetOverlayRegionN(rect, regionType); +} + +void +_FormImpl::OnDraw(void) +{ + if (__pOriAgent) + { + __pOriAgent->FireOrientationEvent(); + } + + _ContainerImpl::OnDraw(); +} + +bool +_FormImpl::OnKeyReleased(const _ControlImpl& source, _KeyCode keyCode) +{ + switch (keyCode) + { + case _KEY_BACKSPACE: + if (GetCore().GetFooter() || GetCore().GetHeader()) + { + if (__pFormBackEventListener) + { + Form* pForm = dynamic_cast (&GetPublic()); + if (pForm) + { + __pFormBackEventListener->OnFormBackRequested(*pForm); + } + } + else + { + break; + } + } + else + { + break; + } + break; + + default: + return false; + } + + return true; +} + +void +_FormImpl::OnActionPerformed(const _Control& source, int actionId) +{ + if (GetFormStyle() & FORM_STYLE_SOFTKEY_0 || GetFormStyle() & FORM_STYLE_SOFTKEY_1 || GetFormStyle() & FORM_STYLE_OPTIONKEY) + { + Tizen::Base::Runtime::IEventArg* tempArg = null; + tempArg = _PublicActionEvent::CreateActionEventArgN(actionId); + SysTryReturnVoidResult(NID_UI_CTRL, tempArg , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create Eventarg."); + bool fired = true; + + _PublicActionEvent* pSoftkeyActionEvent = null; + + if (GetCore().GetFooter()->IsButtonSet(LEFT_BUTTON) && GetSoftkeyActionId(SOFTKEY_0) == actionId) + { + for (int i = 0; i < __leftSoftkeyActionList.GetCount(); i++) + { + pSoftkeyActionEvent = dynamic_cast<_PublicActionEvent*>(__leftSoftkeyActionList.GetAt(i)); + + if (pSoftkeyActionEvent) + { + pSoftkeyActionEvent->Fire(*tempArg); + fired = false; + } + } + } + + if (GetCore().GetFooter()->IsButtonSet(RIGHT_BUTTON) && GetSoftkeyActionId(SOFTKEY_1) == actionId) + { + for (int i = 0; i < __rightSoftkeyActionList.GetCount(); i++) + { + pSoftkeyActionEvent = dynamic_cast<_PublicActionEvent*>(__rightSoftkeyActionList.GetAt(i)); + + if (pSoftkeyActionEvent) + { + pSoftkeyActionEvent->Fire(*tempArg); + fired = false; + } + } + } + + if (GetCore().GetFooter()->IsButtonSet(MIDDLE_BUTTON) && GetOptionkeyActionId() == actionId) + { + if (__pOptionMenuActionEvent) + { + __pOptionMenuActionEvent->Fire(*tempArg); + fired = false; + } + } + if (fired) + { + delete tempArg; + } + } +} + +Canvas* +_FormImpl::GetClientAreaCanvasN(void) const +{ + return GetCore().GetClientAreaCanvasN(); +} + +Point +_FormImpl::TranslateToClientAreaPosition(const Point& position) const +{ + return GetCore().TranslateToClientAreaPosition(position); +} + +FloatPoint +_FormImpl::TranslateToClientAreaPosition(const FloatPoint& position) const +{ + return GetCore().TranslateToClientAreaPosition(position); +} + +Point +_FormImpl::TranslateFromClientAreaPosition(const Point& clientPosition) const +{ + return GetCore().TranslateFromClientAreaPosition(clientPosition); +} + +FloatPoint +_FormImpl::TranslateFromClientAreaPosition(const FloatPoint& clientPosition) const +{ + return GetCore().TranslateFromClientAreaPosition(clientPosition); +} + +void +_FormImpl::SetFormBackEventListener(const IFormBackEventListener* pFormBackEventListener) +{ + __pFormBackEventListener = const_cast (pFormBackEventListener); + GetCore().SetFormBackEventListener(this); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +_FormImpl::SetFormMenuEventListener(const IFormMenuEventListener* pFormMenuEventListener) +{ + __pFormMenuEventListener = const_cast (pFormMenuEventListener); + GetCore().SetFormMenuEventListener(this); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +_FormImpl::AddOrientationEventListener(IOrientationEventListener& listener) +{ + if (__pOriAgent) + { + __pOriAgent->AddListener(listener); + } + else if (__pImeOriAgent) + { + __pImeOriAgent->AddListener(listener); + } +} + +void +_FormImpl::AddOptionkeyActionListener(const IActionEventListener& listener) +{ + if (HasOptionkey() == false) + { + return ; + } + + __pOptionMenuActionEvent = _PublicActionEvent::CreateInstanceN(GetPublic()); + + SysTryReturnVoidResult(NID_UI_CTRL, __pOptionMenuActionEvent != null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + __pOptionMenuActionEvent->AddListener(listener); +} + +void +_FormImpl::AddSoftkeyActionListener(Softkey softkey, const IActionEventListener& listener) +{ + _Softkey _softkey = ConvertSoftkey(softkey); + + if (GetCore().CheckSoftkey(_softkey) == false) + { + return ; + } + + if (softkey == SOFTKEY_0) + { + __pLeftSoftkeyActionEvent = _PublicActionEvent::CreateInstanceN(GetPublic()); + + SysTryReturnVoidResult(NID_UI_CTRL, __pLeftSoftkeyActionEvent != null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + __pLeftSoftkeyActionEvent->AddListener(listener); + + __leftSoftkeyActionList.Add(*__pLeftSoftkeyActionEvent); + } + else if (softkey == SOFTKEY_1) + { + __pRightSoftkeyActionEvent = _PublicActionEvent::CreateInstanceN(GetPublic()); + + SysTryReturnVoidResult(NID_UI_CTRL, __pRightSoftkeyActionEvent != null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + __pRightSoftkeyActionEvent->AddListener(listener); + + __rightSoftkeyActionList.Add(*__pRightSoftkeyActionEvent); + } +} + +void +_FormImpl::RemoveOrientationEventListener(IOrientationEventListener& listener) +{ + if (__pOriAgent) + { + __pOriAgent->RemoveListener(listener); + } + else if (__pImeOriAgent) + { + __pImeOriAgent->RemoveListener(listener); + } +} + +void +_FormImpl::RemoveOptionkeyActionListener(const IActionEventListener& listener) +{ + if (HasOptionkey() == false) + { + return ; + } + + if (__pOptionMenuActionEvent) + { + __pOptionMenuActionEvent->RemoveListener(listener); + } +} + +void +_FormImpl::RemoveSoftkeyActionListener(Softkey softkey, const IActionEventListener& listener) +{ + _Softkey _softkey = ConvertSoftkey(softkey); + + if (GetCore().CheckSoftkey(_softkey) == false) + { + return ; + } + + if (softkey == SOFTKEY_0) + { + if (__pLeftSoftkeyActionEvent) + { + __pLeftSoftkeyActionEvent->RemoveListener(listener); + } + } + else if (softkey == SOFTKEY_1) + { + if (__pRightSoftkeyActionEvent) + { + __pRightSoftkeyActionEvent->RemoveListener(listener); + } + } +} + +void +_FormImpl::SetOrientation(Orientation orientation) +{ + if (__pOriAgent) + { + __pOriAgent->SetMode(orientation); + } +} + +Orientation +_FormImpl::GetOrientation(void) const +{ + if (__pOriAgent) + { + return __pOriAgent->GetMode(); + } + + return ORIENTATION_NONE; +} + +OrientationStatus +_FormImpl::GetOrientationStatus(void) const +{ + if (__pOriAgent) + { + return __pOriAgent->GetStatus(); + } + else if (__pImeOriAgent) + { + return __pImeOriAgent->GetStatus(); + } + + return ORIENTATION_STATUS_NONE; +} + +void +_FormImpl::UpdateOrientationStatus(bool draw) +{ + if (__pOriAgent) + { + __pOriAgent->Update(draw); + } +} + +void +_FormImpl::UpdateOrientation(void) +{ + if (__pOriAgent) + { + __pOriAgent->UpdateOrientation(); + } +} + +void +_FormImpl::UpdateOrientation(int angle) +{ + SysLog(NID_UI_CTRL, "[Ime Rotation]"); + + if (__pImeOriAgent) + { + __pImeOriAgent->UpdateOrientation(angle); + } +} + +bool +_FormImpl::HasOptionkey(void) const +{ + return GetCore().HasOptionkey(); +} + +bool +_FormImpl::HasSoftkey(Softkey softkey) const +{ + _Softkey _softkey = ConvertSoftkey(softkey); + + return GetCore().HasSoftkey(_softkey); +} + +result +_FormImpl::SetSoftkeyEnabled(Softkey softkey, bool enable) +{ + _Softkey _softkey = ConvertSoftkey(softkey); + + result r = GetCore().SetSoftkeyEnabled(_softkey, enable); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +bool +_FormImpl::IsSoftkeyEnabled(Softkey softkey) const +{ + _Softkey _softkey = ConvertSoftkey(softkey); + + return GetCore().IsSoftkeyEnabled(_softkey); +} + +int +_FormImpl::GetSoftkeyActionId(Softkey softkey) const +{ + _Softkey _softkey = ConvertSoftkey(softkey); + + return GetCore().GetSoftkeyActionId(_softkey); +} + +int +_FormImpl::GetOptionkeyActionId(void) const +{ + return GetCore().GetOptionkeyActionId(); +} + +String +_FormImpl::GetSoftkeyText(Softkey softkey) const +{ + _Softkey _softkey = ConvertSoftkey(softkey); + + return GetCore().GetSoftkeyText(_softkey); +} + +result +_FormImpl::SetOptionkeyActionId(int actionId) +{ + result r = GetCore().SetOptionkeyActionId(actionId); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +_FormImpl::SetSoftkeyActionId(Softkey softkey, int actionId) +{ + _Softkey _softkey = ConvertSoftkey(softkey); + + result r = GetCore().SetSoftkeyActionId(_softkey, actionId); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +_FormImpl::SetSoftkeyText(Softkey softkey, const String& text) +{ + _Softkey _softkey = ConvertSoftkey(softkey); + + result r = GetCore().SetSoftkeyText(_softkey, text); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +_FormImpl::SetSoftkeyIcon(Softkey softkey, const Bitmap& pNormalBitmap, const Bitmap* ppPressedBitmap) +{ + _Softkey _softkey = ConvertSoftkey(softkey); + + result r = GetCore().SetSoftkeyIcon(_softkey, pNormalBitmap, ppPressedBitmap); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +void +_FormImpl::OnChangeLayout(_ControlOrientation orientation) +{ + FloatDimension portraitSize = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF(); + FloatDimension landscapeSize = FloatDimension(portraitSize.height, portraitSize.width); + + _FrameImpl* pFrameImpl = dynamic_cast<_FrameImpl*>(GetParent()); + if (pFrameImpl) + { + FrameShowMode frameShowMode = pFrameImpl->GetShowMode(); + + if ((frameShowMode == FRAME_SHOW_MODE_PARTIAL_SCREEN) || (frameShowMode == FRAME_SHOW_MODE_PARTIAL_SCREEN_FLOATING)) + { + bool movable = pFrameImpl->GetCore().IsMovable(); + pFrameImpl->GetCore().SetMovable(true); + + FloatPoint prevPoint = pFrameImpl->GetPositionF(); + FloatPoint curPoint(prevPoint.x, prevPoint.y); + float ratio = portraitSize.width / portraitSize.height; + if (orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + if (prevPoint.x > 0.0f) + { + curPoint.x = prevPoint.x * ratio; + } + + if (prevPoint.y > 0.0f) + { + curPoint.y = prevPoint.y / ratio; + } + } + else + { + if (prevPoint.x > 0.0f) + { + curPoint.x = prevPoint.x / ratio; + } + + if (prevPoint.y > 0.0f) + { + curPoint.y = prevPoint.y * ratio; + } + } + + // depend on WM. + // Skip + //pFrameImpl->SetPosition(curPoint); + portraitSize = pFrameImpl->GetSizeF(); + landscapeSize = portraitSize; + pFrameImpl->GetCore().SetMovable(movable); + pFrameImpl->GetCore().SetFloatingOrientation(orientation); + } + } + + // Change layout. + _ContainerImpl::OnChangeLayout(orientation); + SysTryReturnVoidResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + if (orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + SetSize(portraitSize); + } + else + { + 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) + { + pIndicator->SetIndicatorOrientation(orientation); + if (orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + if ((FORM_STYLE_INDICATOR & GetFormStyle()) || (FORM_STYLE_INDICATOR_AUTO_HIDE & GetFormStyle())) + { + GetCore().SetIndicatorShowState(true); + } + else + { + GetCore().SetIndicatorShowState(false); + } + } + else + { + if (FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE & GetFormStyle()) + { + GetCore().SetIndicatorShowState(true); + } + else + { + GetCore().SetIndicatorShowState(false); + } + } + } + GetCore().AdjustClientBounds(); + } + else + { + GetCore().SetIndicatorShowState(false); + } + if (pIndicator) + { + pIndicator->OnChangeLayout(orientation); + } + + float adjHeight = 0.0f; + + if (GetCore().HasHeader()) + { + FloatRectangle indicatorBounds(0.0f, 0.0f, 0.0f, 0.0f); + if (GetCore().IsIndicatorVisible()) + { + indicatorBounds = GetCore().GetIndicatorBoundsF(); + if (GetCore().IsIndicatorTranslucent()) + { + if (!GetCore().IsHeaderTranslucent()) + { + indicatorBounds.height = 0.0f; + } + else + { + if (orientation == _CONTROL_ORIENTATION_LANDSCAPE) + { + indicatorBounds.height = 0.0f; + } + else + { + if (FORM_STYLE_INDICATOR_AUTO_HIDE & GetFormStyle()) + { + indicatorBounds.height = 0.0f; + } + } + } + } + } + + FloatRectangle bounds(0.0f, indicatorBounds.height, GetClientBoundsF().width, GetCore().GetToolbarHeightF(true)); + GetCore().SetHeaderBounds(bounds); + } + + if (GetCore().HasTab()) // Ki-Dong,Hong.Temp + { + float titleHeight = 0.0f; + + if (GetCore().GetFormStyle() & FORM_STYLE_TITLE) + { + if (GetCore().HasHeader()) + { + _HeaderImpl* pHeaderImpl = GetHeader(); + if (pHeaderImpl) + { + titleHeight = pHeaderImpl->GetBoundsF().height; + } + } + } + + FloatRectangle indicatorBounds(0.0f, 0.0f, 0.0f, 0.0f); + + if (GetCore().IsIndicatorVisible()) + { + indicatorBounds = GetCore().GetIndicatorBoundsF(); + if (GetCore().IsIndicatorTranslucent()) + { + if (!GetCore().IsHeaderTranslucent()) + { + indicatorBounds.height = 0.0f; + } + else + { + if (orientation == _CONTROL_ORIENTATION_LANDSCAPE) + { + indicatorBounds.height = 0.0f; + } + else + { + if (FORM_STYLE_INDICATOR_AUTO_HIDE & GetFormStyle()) + { + indicatorBounds.height = 0.0f; + } + } + } + } + } + + float posY = indicatorBounds.height + titleHeight; + + FloatRectangle bounds(0.0f, posY, GetClientBoundsF().width, GetCore().GetTabHeightF()); + GetCore().SetTabBounds(bounds); + } + + if (GetCore().HasFooter()) + { + if (GetCore().GetFooter()->GetVisibleState() && !GetCore().IsFooterTranslucent()) + { + adjHeight = 0.0f; + } + else + { + adjHeight = GetCore().GetToolbarHeightF(false); + } + + if (!(GetCore().GetFormStyle() & FORM_STYLE_FOOTER || GetCore().GetFormStyle() & FORM_STYLE_SOFTKEY_0 || GetCore().GetFormStyle() & FORM_STYLE_SOFTKEY_1 + || GetCore().GetFormStyle() & FORM_STYLE_OPTIONKEY)) + { + adjHeight = GetCore().GetToolbarHeightF(false); + } + + FloatRectangle bounds(0.0f, GetClientBoundsF().y + GetClientBoundsF().height - adjHeight, + GetClientBoundsF().width, GetCore().GetToolbarHeightF(false)); + GetCore().SetFooterBounds(bounds); + } +} + +_HeaderImpl* +_FormImpl::CreateHeaderN(void) +{ + result r = E_SUCCESS; + + 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(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + _HeaderImpl* pHeaderImpl = _HeaderImpl::GetInstance(*pHeader); + + SetLastResult(E_SUCCESS); + + return pHeaderImpl; +} + +_FooterImpl* +_FormImpl::CreateFooterN(void) +{ + result r = E_SUCCESS; + + 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(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + _FooterImpl* pFooterImpl = _FooterImpl::GetInstance(*pFooter); + + SetLastResult(E_SUCCESS); + + return pFooterImpl; +} + +// Ki-Dong,Hong.Temp +_TabImpl* +_FormImpl::CreateTabImplN(void) +{ + //result r = E_SUCCESS; + + //Tab* pTab = new (std::nothrow) Tab; + //SysTryReturn(NID_UI_CTRL, pTab, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + //r = pTab->Construct(); + //SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, E_SYSTEM, "[E_SYSTEM] Unable to consturct tab."); + + //return pTab->GetTabImpl(); + Tab* pTab = _TabImpl::CreateTabN(); + SysTryReturn(NID_UI_CTRL, pTab, null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _TabImpl* pTabImpl = _TabImpl::GetInstance(*pTab); + + SetLastResult(E_SUCCESS); + + return pTabImpl; +} + +bool +_FormImpl::DeflateClientRectHeight(int height) +{ + return GetCore().DeflateClientRectHeight(height); +} + +bool +_FormImpl::DeflateClientRectHeight(float height) +{ + return GetCore().DeflateClientRectHeight(height); +} + +bool +_FormImpl::RemoveHeader(void) +{ + _HeaderImpl* pHeaderImpl = GetHeader(); + + if (pHeaderImpl) + { + __pForm->RemoveHeader(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, r, "[%s] Propagating.", GetErrorMessage(r)); + Header* pHeader = pHeaderImpl->GetHeader(); + + delete pHeader; + } + else + return false; + + return true; +} + +bool +_FormImpl::RemoveFooter(void) +{ + _FooterImpl* pFooterImpl = GetFooter(); + + if (pFooterImpl) + { + __pForm->RemoveFooter(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, r, "[%s] Propagating.", GetErrorMessage(r)); + Footer* pFooter = pFooterImpl->GetFooter(); + + delete pFooter; + } + else + { + return false; + } + + return true; +} + +// Ki-Dong,Hong.Temp +bool +_FormImpl::RemoveTabImpl(void) +{ + _TabImpl* pTabImpl = GetTabImpl(); + + if (pTabImpl) + { + __pForm->RemoveTab(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, r, "[%s] Propagating.", GetErrorMessage(r)); + Tab* pTab = pTabImpl->GetTab(); + + pTabImpl->DeleteTab(pTab); + } + else + { + return false; + } + + return true; +} + +DataBindingContext* +_FormImpl::GetDataBindingContextN(void) const +{ + return _DataBindingContextImpl::GetDataBindingContextN(*this); +} + +result +_FormImpl::OnAttaching(const _Control* pParent) +{ + result r = E_SUCCESS; + _Frame* pFrame = dynamic_cast<_Frame*>(const_cast<_Control*>((pParent))); + if (FORM_STYLE_INDICATOR & GetCore().GetFormStyle()) + { + SysTryReturnResult(NID_UI_CTRL, pFrame != null, E_INVALID_ARG, "A Form which has FORM_STYLE_INDICATOR style cannot be added to a container except Frame."); + } + r = _ControlImpl::OnAttaching(pParent); + return r; +} + +result +_FormImpl::OnAttachedToMainTree(void) +{ + result r = E_SUCCESS; + 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); + + if (FORM_STYLE_INDICATOR & GetCore().GetFormStyle()) + { + indicatorBounds = GetCore().GetIndicatorBoundsF(); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + _HeaderImpl* pHeader = GetHeader(); + _FooterImpl* pFooter = GetFooter(); + _TabImpl* pTabImpl = GetTabImpl(); + + if (pHeader) + { + 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); + } + + float titleHeight = 0.0f; + + if (pHeader) + { + titleHeight = pHeader->GetBoundsF().height; + } + + 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); + } + + if (pFooter) + { + float adjHeight = 0.0f; + + if (!(GetCore().GetFooter()->GetVisibleState()) || GetCore().IsFooterTranslucent()) + { + adjHeight = GetCore().GetToolbarHeightF(false); + } + + if (!(GetCore().GetFormStyle() & FORM_STYLE_FOOTER || GetCore().GetFormStyle() & FORM_STYLE_SOFTKEY_0 || GetCore().GetFormStyle() & FORM_STYLE_SOFTKEY_1 + || GetCore().GetFormStyle() & FORM_STYLE_OPTIONKEY)) + { + adjHeight = GetCore().GetToolbarHeightF(false); + } + + FloatRectangle clientbounds = GetClientBoundsF(); + FloatRectangle bounds(0.0f, clientbounds.y + clientbounds.height - adjHeight, clientbounds.width, GetCore().GetToolbarHeightF(false)); + + GetCore().SetFooterBounds(bounds); + } + + UpdateOrientationStatus(); + + if (__pOriAgent) + { + __pOriAgent->RequestOrientationEvent(); + } + + return r; +} + +result +_FormImpl::OnDetachingFromMainTree(void) +{ + result r = E_SUCCESS; + r = GetCore().DetachingFromMainTree(); + r = _ContainerImpl::OnDetachingFromMainTree(); + + return r; +} + +bool +_FormImpl::OnNotifiedN(const _ControlImpl& source, IList* pArgs) +{ + String* pString = dynamic_cast (pArgs->GetAt(0)); + if (pString) + { + if (*pString == _REQUEST_ORIENTATION_EVENT) + { + if (__pOriAgent) + { + __pOriAgent->FireOrientationEvent(); + } + + pArgs->RemoveAll(true); + delete pArgs; + + return true; + } + } + + return false; +} + +void +_FormImpl::OnFormBackRequested(Tizen::Ui::Controls::_Form& source) +{ + if (__pFormBackEventListener) + { + _FormImpl* pFormImpl = static_cast<_FormImpl*>(source.GetUserData()); + Form* pForm = dynamic_cast (&pFormImpl->GetPublic()); + if (pForm) + { + __pFormBackEventListener->OnFormBackRequested(*pForm); + + SysLog(NID_UI, "OnFormBackRequested, Call SetTouchCanceled"); + _UiEventManager* pUiEventManager = _UiEventManager::GetInstance(); + if (pUiEventManager) + { + pUiEventManager->ClearEventQueue(); + } + } + else + { + return; + } + } +} + +void +_FormImpl::OnFormMenuRequested(Tizen::Ui::Controls::_Form& source) +{ + if (__pFormMenuEventListener) + { + _FormImpl* pFormImpl = static_cast<_FormImpl*>(source.GetUserData()); + Form* pForm = dynamic_cast (&pFormImpl->GetPublic()); + if (pForm) + { + __pFormMenuEventListener->OnFormMenuRequested(*pForm); + } + else + { + return; + } + } +} + +OrientationStatus +_FormImpl::OnFormOrientationStatusRequested(void) +{ + _ControlImplManager* pImplManager = _ControlImplManager::GetInstance(); + SysAssert(pImplManager); + + OrientationStatus status = ORIENTATION_STATUS_PORTRAIT; + int appType = _AppInfo::GetAppType(); + if (!(appType & _APP_TYPE_IME_APP)) + { + status = pImplManager->GetOrientationStatus(GetOrientation()); + } + return status; +} + +bool +_FormImpl::IsOpaque(void) const +{ + //return true; + return false; +} + +_Softkey +_FormImpl::ConvertSoftkey(Softkey softkey) const +{ + _Softkey _softkey; + + if (softkey == SOFTKEY_0) + { + _softkey = _SOFTKEY_0; + } + else if (softkey == SOFTKEY_1) + { + _softkey = _SOFTKEY_1; + } + else + { + _softkey = _SOFTKEY_COUNT; + } + + return _softkey; +} + +result +_FormImpl::SetNotificationTrayOpenEnabled(bool enable) +{ + return GetCore().SetNotificationTrayOpenEnabled(enable); +} + +bool +_FormImpl::IsNotificationTrayOpenEnabled(void) const +{ + return GetCore().IsNotificationTrayOpenEnabled(); +} + +class _FormMaker + : public _UiBuilderControlMaker +{ +public: + _FormMaker(_UiBuilder* uibuilder) + : _UiBuilderControlMaker(uibuilder){}; + virtual ~_FormMaker() + { + }; + static _UiBuilderControlMaker* GetInstance(_UiBuilder* uibuilder) + { + _FormMaker* pFormMaker = new (std::nothrow) _FormMaker(uibuilder); + return pFormMaker; + }; +protected: + virtual Control* Make(_UiBuilderControl* pControl) + { + _UiBuilderControlLayout* pControlProperty = null; + result r = E_SUCCESS; + int style = 0; + int opacity = 0; + Tizen::Base::String elementString; + bool isTitleAlign = false; + Color color; + + HorizontalAlignment align = ALIGNMENT_CENTER; + Form* pForm = (Form*) GetContainer(); + + // Get control manager + _ControlManager* pControlManager = _ControlManager::GetInstance(); + if (pControlManager == null) + { + SysLog(NID_UI_CTRL, "Unable to get the control manager.n"); + return null; + } + FloatDimension screenSize = pControlManager->GetScreenSizeF(); + + //Set rect + (pControl->GetAttribute(UIBUILDER_ATTRIBUTE_PORTRAIT))->SetRect(0.0f, 0.0f, screenSize.width, screenSize.height); + (pControl->GetAttribute(UIBUILDER_ATTRIBUTE_LANDSCAPE))->SetRect(0.0f, 0.0f, screenSize.height, screenSize.width); + + // Get device orientation + app_device_orientation_e deviceOrientation = app_get_device_orientation(); + bool isHorizontal = (deviceOrientation == APP_DEVICE_ORIENTATION_90) || (deviceOrientation == APP_DEVICE_ORIENTATION_270); + + if (isHorizontal) + { + pControlProperty = pControl->GetAttribute(UIBUILDER_ATTRIBUTE_LANDSCAPE); + } + else + { + pControlProperty = pControl->GetAttribute(UIBUILDER_ATTRIBUTE_PORTRAIT); + } + + if (pControlProperty == null) + { + SysLogException(NID_UI_CTRL, E_SYSTEM, "[E_SYSTEM] Can't read attributes"); + return null; + } + + pControlProperty = pControl->GetAttribute(UIBUILDER_ATTRIBUTE_PORTRAIT); + Tizen::Base::String styleString; + styleString = pControlProperty->GetStyle(); + + if (styleString.Contains(L"FORM_STYLE_TITLE")) + { + style |= FORM_STYLE_TITLE; + } + if (styleString.Contains(L"FORM_STYLE_SOFTKEY_0")) + { + style |= FORM_STYLE_SOFTKEY_0; + } + if (styleString.Contains(L"FORM_STYLE_SOFTKEY_1")) + { + style |= FORM_STYLE_SOFTKEY_1; + } + if (styleString.Contains(L"FORM_STYLE_OPTIONKEY")) + { + style |= FORM_STYLE_OPTIONKEY; + } + if (styleString.Contains(L"FORM_STYLE_INDICATOR")) + { + if (styleString.Contains(L"FORM_STYLE_INDICATOR_AUTO_HIDE")) + { + style |= FORM_STYLE_INDICATOR_AUTO_HIDE; + } + else + { + style |= FORM_STYLE_INDICATOR; + } + } + if (styleString.Contains(L"FORM_STYLE_PORTRAIT_INDICATOR")) + { + if (styleString.Contains(L"FORM_STYLE_PORTRAIT_INDICATOR_AUTO_HIDE")) + { + style |= FORM_STYLE_PORTRAIT_INDICATOR_AUTO_HIDE; + } + else + { + style |= FORM_STYLE_PORTRAIT_INDICATOR; + } + } + if (styleString.Contains(L"FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE")) + { + style |= FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE; + } + if (styleString.Contains(L"FORM_STYLE_TEXT_TAB")) + { + style |= FORM_STYLE_TEXT_TAB; + } + if (styleString.Contains(L"FORM_STYLE_ICON_TAB")) + { + style |= FORM_STYLE_ICON_TAB; + } + if (styleString.Contains(L"FORM_STYLE_HEADER")) + { + style |= FORM_STYLE_HEADER; + } + if (styleString.Contains(L"FORM_STYLE_FOOTER")) + { + style |= FORM_STYLE_FOOTER; + } + + _UiBuilderLayoutType layoutType = UIBUILDER_LAYOUT_NONE; + __pLayoutMaker->GetLayoutType(pControlProperty, layoutType); + if (layoutType == UIBUILDER_LAYOUT_NONE) + { + // Construct + r = pForm->Construct(style); + } + else + { + Layout* pPortraitLayout = null; + Layout* pLandscapeLayout = null; + result tempResult = E_SUCCESS; + tempResult = __pLayoutMaker->GetLayoutN(pControl, pPortraitLayout, pLandscapeLayout); + if (E_SUCCESS == tempResult) + { + r = pForm->Construct(*pPortraitLayout, *pLandscapeLayout, style); + } + else + { + r = tempResult; + } + + _UiBuilderLayoutType layoutType = UIBUILDER_LAYOUT_NONE; + + if (__pLayoutMaker->GetLayoutType(pControlProperty, layoutType) == false) + { + return null; + } + + 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) + { + pGridLayout = dynamic_cast(pPortraitLayout); + } + else + { + pGridLayout = dynamic_cast(pLandscapeLayout); + } + __pLayoutMaker->SetGridLayoutContainerProperty(pGridLayout, pControlProperty); + } + } + delete pPortraitLayout; + if (pPortraitLayout != pLandscapeLayout) + { + delete pLandscapeLayout; + } + } + + if (r != E_SUCCESS) + { + SysLog(NID_UI_CTRL, "Failed to create Form."); + return null; + } + + // Set Property + if (pControl->GetElement(L"titleAlign", elementString)) + { + if (elementString.Equals(L"ALIGN_CENTER", false)) + { + align = ALIGNMENT_CENTER; + } + else if (elementString.Equals(L"ALIGN_RIGHT", false)) + { + align = ALIGNMENT_RIGHT; + } + else + { + align = ALIGNMENT_LEFT; + } + isTitleAlign = true; + } + + if (style & FORM_STYLE_TITLE) + { + if (pControl->GetElement(L"title", elementString)) + { + if (isTitleAlign) + { + pForm->SetTitleText(elementString, align); + } + else + { + pForm->SetTitleText(elementString); + } + } + else + { + if (isTitleAlign) + { + pForm->SetTitleText(L"", align); + } + else + { + pForm->SetTitleText(L""); + } + } + } + + if (pControl->GetElement(L"titleIcon", elementString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(elementString); + if (pBitmap != null) + { + r = pForm->SetTitleIcon(pBitmap); + delete pBitmap; + if (IsFailed(r)) + { + SysLog(NID_UI_CTRL, "Failed to set TitleIcon."); + } + } + } + + if (pControl->GetElement(L"softKey0Text", elementString)) + { + pForm->SetSoftkeyText(SOFTKEY_0, elementString); + } + if (pControl->GetElement(L"softKey1Text", elementString)) + { + pForm->SetSoftkeyText(SOFTKEY_1, elementString); + } + if (pControl->GetElement(L"backgroundColorOpacity", elementString) || pControl->GetElement(L"BGColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + if (pControl->GetElement(L"backgroundColor", elementString) || pControl->GetElement(L"BGColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + pForm->SetBackgroundColor(color); + } + else + { + Color color; + r = GET_COLOR_CONFIG(FORM::BG_NORMAL,color); + if (r == E_SUCCESS) + { + pForm->SetBackgroundColor(color); + } + else + { + pForm->SetBackgroundColor(0xff000000); + } + } + + if (pControl->GetElement(L"softKey0Icon", elementString) || pControl->GetElement(L"softKey0NormalIcon", elementString)) + { + Bitmap* pNormalBitmap = null; + Bitmap* pPressedBitmap = null; + pNormalBitmap = LoadBitmapN(elementString); //__image->DecodeN(path,BITMAP_PIXEL_FORMAT_RGB565); + + if (pNormalBitmap != null) + { + if (pControl->GetElement(L"softKey0PressedIcon", elementString)) + { + pPressedBitmap = LoadBitmapN(elementString); + } + + if (pPressedBitmap != null) + { + pForm->SetSoftkeyIcon(SOFTKEY_0, *pNormalBitmap, pPressedBitmap); + delete pNormalBitmap; + delete pPressedBitmap; + } + else + { + pForm->SetSoftkeyIcon(SOFTKEY_0, *pNormalBitmap, null); + delete pNormalBitmap; + } + } + } + if (pControl->GetElement(L"softKey1Icon", elementString) || pControl->GetElement(L"softKey1NormalIcon", elementString)) + { + Bitmap* pNormalBitmap = null; + Bitmap* pPressedBitmap = null; + pNormalBitmap = LoadBitmapN(elementString); //__image->DecodeN(path,BITMAP_PIXEL_FORMAT_RGB565); + + if (pNormalBitmap != null) + { + if (pControl->GetElement(L"softKey1PressedIcon", elementString)) + { + pPressedBitmap = LoadBitmapN(elementString); // __image->DecodeN(path,BITMAP_PIXEL_FORMAT_RGB565); + } + + if (pPressedBitmap != null) + { + pForm->SetSoftkeyIcon(SOFTKEY_1, *pNormalBitmap, pPressedBitmap); + delete pNormalBitmap; + delete pPressedBitmap; + } + else + { + pForm->SetSoftkeyIcon(SOFTKEY_1, *pNormalBitmap, null); + delete pNormalBitmap; + } + } + } + + if (pControl->GetElement(L"Orientation", elementString) || pControl->GetElement(L"orientation", elementString)) + { + //ORIENTATION_NONE, + //ORIENTATION_PORTRAIT, + //ORIENTATION_LANDSACPE, + //ORIENTATION_PORTRAIT_REVERSE, + //ORIENTATION_LANDSACPE_REVERSE, + //ORIENTATION_AUTO = 6, + //ORIENTATION_AUTO_FOUR_DIRECTION = 8, + + if (elementString.Equals(L"Automatic:2Dir", false) || elementString.Equals(L"Automatic", false)) + { + pForm->SetOrientation(ORIENTATION_AUTOMATIC); + } + else if (elementString.Equals(L"Automatic:4Dir", false)) + { + pForm->SetOrientation(ORIENTATION_AUTOMATIC_FOUR_DIRECTION); + } + else if (elementString.Equals(L"Landscape", false)) + { + pForm->SetOrientation(ORIENTATION_LANDSCAPE); + SetUiBuilderRotateState(UIBUIDER_SCREEN_HORIZONTAL); + } + else if (elementString.Equals(L"Landscape:Reverse", false)) + { + pForm->SetOrientation(ORIENTATION_LANDSCAPE_REVERSE); + SetUiBuilderRotateState(UIBUIDER_SCREEN_HORIZONTAL); + } + else if (elementString.Equals(L"Portrait", false)) + { + pForm->SetOrientation(ORIENTATION_PORTRAIT); + SetUiBuilderRotateState(UIBUIDER_SCREEN_VERTICAL); + } + else if (elementString.Equals(L"Portrait:Reverse", false)) + { + pForm->SetOrientation(ORIENTATION_PORTRAIT_REVERSE); + SetUiBuilderRotateState(UIBUIDER_SCREEN_VERTICAL); + } + } + + if (style & FORM_STYLE_HEADER) + { + if (pControl->GetElement(L"translucentHeader", elementString)) + { + if (elementString.Equals(L"true", false)) + { + pForm->SetActionBarsTranslucent(FORM_ACTION_BAR_HEADER, true); + } + } + } + + if (style & FORM_STYLE_FOOTER) + { + if (pControl->GetElement(L"translucentFooter", elementString)) + { + if (elementString.Equals(L"true", false)) + { + pForm->SetActionBarsTranslucent(FORM_ACTION_BAR_FOOTER, true); + } + } + } + + if (style & FORM_STYLE_INDICATOR) + { + if (pControl->GetElement(L"translucentIndicator", elementString)) + { + if (elementString.Equals(L"true", false)) + { + pForm->SetActionBarsTranslucent(FORM_ACTION_BAR_INDICATOR, true); + } + } + } + + return pForm; + } + +}; + +_FormRegister::_FormRegister() +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->RegisterControl(L"Form", _FormMaker::GetInstance); +} +_FormRegister::~_FormRegister() +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->UnregisterControl(L"Form"); +} +static _FormRegister FormRegisterToUiBuilder; +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_FormModel.cpp b/src/ui/controls/FUiCtrl_FormModel.cpp new file mode 100644 index 0000000..cd8cfba --- /dev/null +++ b/src/ui/controls/FUiCtrl_FormModel.cpp @@ -0,0 +1,35 @@ +// +// 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_FormModel.cpp + * @brief This is the implementation file for the _FormModel class. + */ + +#include "FUiCtrl_FormModel.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +_FormModel::_FormModel(void) +{ +} + +_FormModel::~_FormModel(void) +{ +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_FormPresenter.cpp b/src/ui/controls/FUiCtrl_FormPresenter.cpp new file mode 100644 index 0000000..17efd0c --- /dev/null +++ b/src/ui/controls/FUiCtrl_FormPresenter.cpp @@ -0,0 +1,79 @@ +// +// 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_FormPresenter.cpp + * @brief This is the implementation file for the _FormPresenter class. + */ + +#include +#include +#include +#include "FUiCtrl_FormPresenter.h" +#include "FUiCtrl_FormModel.h" +#include "FUiCtrl_Form.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +_FormPresenter::_FormPresenter(const _Form& form) + : __pForm(null) + , __pFormModel(null) +{ + __pForm = const_cast <_Form*>(&form); + + _FormModel* pModel = new (std::nothrow) _FormModel(); + SysTryReturnVoidResult(NID_UI_CTRL, pModel, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.."); + + SetModel(*pModel); + + SetLastResult(E_SUCCESS); + + return; +} + +_FormPresenter::~_FormPresenter(void) +{ + if (__pFormModel) + { + delete __pFormModel; + __pFormModel = null; + } +} + +result +_FormPresenter::SetModel(const _FormModel& formModel) +{ + __pFormModel = const_cast <_FormModel*>(&formModel); + + return E_SUCCESS; +} + +void +_FormPresenter::Draw(void) +{ + _Draw(); + + return; +} + +void +_FormPresenter::_Draw(void) +{ + return; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_Frame.cpp b/src/ui/controls/FUiCtrl_Frame.cpp new file mode 100644 index 0000000..0cc230d --- /dev/null +++ b/src/ui/controls/FUiCtrl_Frame.cpp @@ -0,0 +1,1361 @@ +// +// 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 +#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) + , __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."); + + FloatDimension screen = _ControlManager::GetInstance()->GetScreenSizeF(); + __floatingBounds.width = screen.width; + __floatingBounds.height = screen.height; + + 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; + +CATCH: + delete pPresenter; + pPresenter = null; + + delete pFrameEvent; + pFrameEvent = null; +} + +_Frame::~_Frame(void) +{ + if (__pFrameEvent) + { + delete __pFrameEvent; + __pFrameEvent = null; + } + + delete __pFramePresenter; + __pFramePresenter = null; + + delete __pFormActivationChangeEventListeners; + __pFormActivationChangeEventListeners = null; + + ClearLastResult(); +} + +_Frame* +_Frame::CreateFrameN(void) +{ + result r = E_SUCCESS; + _RootVisualElement* pRootVE = null; + _EflLayer* pLayer = null; + int appType = _AppInfo::GetAppType(); +#if defined(PARTIAL_SCREEN) + bool isMultiWindow = false; +#endif + + _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) + isMultiWindow = _AppInfo::IsMultiWindow(); + SysLog(NID_UI_CTRL, "[WM ROTATION]

IsMultiWindow = %d", isMultiWindow); + if (isMultiWindow) + { + 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); + } + } +} + +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) + { + FireFormActivationChangeEvent(pCurrentForm, _FORM_STATUS_DEACTIVATING); + + // 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(); + + FireFormActivationChangeEvent(pCurrentForm, _FORM_STATUS_DEACTIVATED); + } + } + + FireFormActivationChangeEvent(pCurrentForm, _FORM_STATUS_ACTIVATING); + 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); + + FireFormActivationChangeEvent(pNewForm, _FORM_STATUS_ACTIVATED); + + 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)); +} + +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) +{ + 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) +{ + __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) + { + 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; + } + } + } + + 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) +{ +#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) + { + int controlCount = GetChildCount(); + + if (controlCount > 1) + { + _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) + { + _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 + { + _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) + { + _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."); + 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; + } + + 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) +{ + _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); + } + + _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 +{ + _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/controls/FUiCtrl_FrameEvent.cpp b/src/ui/controls/FUiCtrl_FrameEvent.cpp new file mode 100644 index 0000000..3b8e06b --- /dev/null +++ b/src/ui/controls/FUiCtrl_FrameEvent.cpp @@ -0,0 +1,187 @@ +// +// 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_FrameEvent.cpp + * @brief This is the implementation for the _FrameEvent class. + * @version 1.0 + */ + +#include +#include +#include +#include +#include "FUiCtrl_IFrameEventListener.h" +#include "FUiCtrl_FrameEvent.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; + +namespace Tizen { namespace Ui { namespace Controls +{ +/** + * @class _FrameEventArg + * @brief This class is used as an argument of event listener's method. + * + * This class is used as an argument of event listener's method. When frame event is generated, + * the @c _FrameEvent instance calls WindowEventListener's method with instance of this class as an argument. + */ +class _FrameEventArg + : public Tizen::Base::Object + , public Tizen::Base::Runtime::IEventArg +{ +public: +// Lifecycle + /** + * This is the default class constructor. + * + * @param[in] source A pointer to the _Frame instance which contains this instance. + * @param[in] frameState The frame event type. + */ + _FrameEventArg(const _Frame& source, int frameState); + + /** + * This is the class destructor. + * + */ + virtual ~_FrameEventArg(void); + +// Accessor + /** + * This method returns the Window object which the event initially occurred. + * + * @return See the comment above. + * + */ + const _Frame* GetSource(void) const; + + /** + * This method returns the event type of frame event. + * + * @return See the comment above. + */ + int GetType(void) const; + +private: +// Attribute + _Frame* __pSource; + int __frameState; +}; // _FrameEventArg + +_FrameEventArg::_FrameEventArg(const _Frame& source, int frameState) + : __pSource(const_cast <_Frame*>(&source)) + , __frameState(frameState) +{ +} + +_FrameEventArg::~_FrameEventArg(void) +{ +} + +const _Frame* +_FrameEventArg::GetSource(void) const +{ + return __pSource; +} + +int +_FrameEventArg::GetType(void) const +{ + return __frameState; +} + +_FrameEvent* +_FrameEvent::CreateInstanceN(const _Frame& source) +{ + _FrameEvent* pFrameEvent = new (std::nothrow) _FrameEvent(source); + SysTryReturn(NID_UI_CTRL, pFrameEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + if (IsFailed(GetLastResult())) + { + goto CATCH; + } + + SetLastResult(E_SUCCESS); + + return pFrameEvent; + +CATCH: + delete pFrameEvent; + return null; +} + +IEventArg* +_FrameEvent::CreateFrameEventArgN(const _Frame& source, int frameState) +{ + _FrameEventArg* pEventArg = new (std::nothrow) _FrameEventArg(source, frameState); + SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + SetLastResult(E_SUCCESS); + + return pEventArg; +} + +_FrameEvent::~_FrameEvent(void) +{ +} + +const _Frame* +_FrameEvent::GetSource(void) const +{ + return __pSource; +} + +void +_FrameEvent::FireImpl(IEventListener& listener, const IEventArg& arg) +{ + _IFrameEventListener* pFrameListener = dynamic_cast <_IFrameEventListener*>(&listener); + SysTryReturnVoidResult(NID_UI_CTRL, pFrameListener, E_INVALID_ARG, "[E_INVALID_ARG] The invalid listener was given."); + + const _FrameEventArg* pArg = static_cast (&arg); + SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_INVALID_ARG, "[E_INVALID_ARG] The invalid event argument was given."); + + if (pArg->GetType() == _FRAME_STATUS_ACTIVATED) + { + pFrameListener->OnFrameActivated(*pArg->GetSource()); + } + else if (pArg->GetType() == _FRAME_STATUS_DEACTIVATED) + { + pFrameListener->OnFrameDeactivated(*pArg->GetSource()); + } + else if (pArg->GetType() == _FRAME_STATUS_MINIMIZED) + { + pFrameListener->OnFrameMinimized(*pArg->GetSource()); + } + else if (pArg->GetType() == _FRAME_STATUS_RESTORED) + { + pFrameListener->OnFrameRestored(*pArg->GetSource()); + } + + return; +} + +_FrameEvent::_FrameEvent(const _Frame& source) + : __pSource(null) +{ + result r = _Event::Initialize(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pSource = &source; + + ClearLastResult(); +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_FrameImpl.cpp b/src/ui/controls/FUiCtrl_FrameImpl.cpp new file mode 100644 index 0000000..d6f929a --- /dev/null +++ b/src/ui/controls/FUiCtrl_FrameImpl.cpp @@ -0,0 +1,733 @@ +// +// 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. +// + +#include +#include +#include +#include +#include +#include +#include "FUi_ControlManager.h" +#include "FUi_OrientationAgent.h" +#include "FUi_ImeOrientationAgent.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUiCtrlForm.h" +#include "FUiCtrl_FrameImpl.h" +#include "FUiCtrl_FormImpl.h" +#include "FUiCtrl_Frame.h" +#include "FUiCtrl_PublicFrameEvent.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Animations; + +namespace +{ +const wchar_t* _REQUEST_ORIENTATION_EVENT = L"RequestOrientationEvent"; +} + +namespace Tizen { namespace Ui { namespace Controls { + + +const _FrameImpl* +_FrameImpl::GetInstance(const Frame& frame) +{ + return static_cast (frame._pControlImpl); +} + +_FrameImpl* +_FrameImpl::GetInstance(Frame& frame) +{ + return static_cast<_FrameImpl*> (frame._pControlImpl); +} + +void +_FrameImpl::Dispose(void) +{ + GetCore().RemoveFrameEventListener(*this); + + if (__pFrameEvent) + { + delete __pFrameEvent; + __pFrameEvent = null; + } + + if (__pOrientationAgent) + { + delete __pOrientationAgent; + __pOrientationAgent = null; + } + + if (__pImeOrientationAgent) + { + delete __pImeOrientationAgent; + __pImeOrientationAgent = null; + } + + delete __pFrameAnimator; + __pFrameAnimator = null; +} + +_FrameImpl::_FrameImpl(Frame* pPublic, _Frame* pCore) + : _WindowImpl(pPublic, pCore) + , __pFrameEvent(null) + , __pFrameAnimator(null) + , __pOrientationAgent(null) + , __pImeOrientationAgent(null) +{ + __pFrameEvent = _PublicFrameEvent::CreateInstanceN(*pPublic); + SysTryReturnVoidResult(NID_UI_CTRL, __pFrameEvent, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + int appType = _AppInfo::GetAppType(); + if (appType & _APP_TYPE_IME_APP) + { + __pImeOrientationAgent = _ImeOrientationAgent::CreateInstanceN(*pPublic); + SysTryCatch(NID_UI_CTRL, __pImeOrientationAgent != null, , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + } + else + { + __pOrientationAgent = _OrientationAgent::CreateInstanceN(*pPublic); + SysTryCatch(NID_UI_CTRL, __pOrientationAgent != null, , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + } + + return; + +CATCH: + Dispose(); +} + +_FrameImpl::~_FrameImpl(void) +{ + // [ToDo] Wrong point to call OnFrameTerminating(). + if (__pFrameEvent) + { + IEventArg* pEventArg = _PublicFrameEvent::CreateFrameEventArgN(_FrameImpl::GetPublic(), FRAME_STATE_TERMINATING); + if (pEventArg) + { + __pFrameEvent->Fire(*pEventArg); + } + } + + Dispose(); + ClearLastResult(); +} + +const char* +_FrameImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Controls::Frame"; +} + +const Frame& +_FrameImpl::GetPublic(void) const +{ + return static_cast(_ControlImpl::GetPublic()); +} + +Frame& +_FrameImpl::GetPublic(void) +{ + return static_cast(_ControlImpl::GetPublic()); +} + +const _Frame& +_FrameImpl::GetCore(void) const +{ + return static_cast(_ControlImpl::GetCore()); +} + +_Frame& +_FrameImpl::GetCore(void) +{ + return static_cast<_Frame&>(_ControlImpl::GetCore()); +} + +result +_FrameImpl::SetCurrentForm(const _FormImpl& formImpl) +{ + result r = E_SUCCESS; + + _FormImpl* pNewCurForm = const_cast<_FormImpl*>(&formImpl); + + SysTryReturn(NID_UI_CTRL, + pNewCurForm != null, E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] The Form is not initialized."); + + SysTryReturn(NID_UI_CTRL, + IsAncestorOf(pNewCurForm), E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] The Form is not the child of this Frame."); + + FrameShowMode showMode = GetCore().GetShowMode(); + if (showMode != FRAME_SHOW_MODE_FULL_SCREEN) + { + if (showMode == FRAME_SHOW_MODE_MINIMIZED) + { + if (GetCore().GetShowMode(false) != FRAME_SHOW_MODE_FULL_SCREEN) + { + SysTryReturn(NID_UI_CTRL, !(pNewCurForm->GetFormStyle() & FORM_STYLE_INDICATOR), E_INVALID_ARG, E_INVALID_ARG, "Only Frame whose show mode is @c FRAME_SHOW_MODE_FULL_SCREEN can set a Form which has the style of @c FORM_STYLE_INDICATOR as the current form."); + } + } + else + { + SysTryReturn(NID_UI_CTRL, !(pNewCurForm->GetFormStyle() & FORM_STYLE_INDICATOR), E_INVALID_ARG, E_INVALID_ARG, "Only Frame whose show mode is @c FRAME_SHOW_MODE_FULL_SCREEN can set a Form which has the style of @c FORM_STYLE_INDICATOR as the current form."); + } + } + + + r = MoveChildToTop(*pNewCurForm); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + // [ToDo] Change the method to return result. And the arg should be reference. + GetCore().SetCurrentForm(&pNewCurForm->GetCore()); + r = GetLastResult(); + SysAssert(r == E_SUCCESS); // [ToDo] Exception check. + + pNewCurForm->UpdateOrientationStatus(); + + // [ToDo] Check last result + SysAssert(GetLastResult() == E_SUCCESS); + return E_SUCCESS; +} + +result +_FrameImpl::SetCurrentForm(_FormImpl* pFormImpl) +{ + result r = E_SUCCESS; + + _FormImpl* pNewCurForm = pFormImpl; + + SysTryReturn(NID_UI_CTRL, + pNewCurForm != null, E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] The Form is not initialized."); + + SysTryReturn(NID_UI_CTRL, + IsAncestorOf(pNewCurForm), E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] The Form is not the child of this Frame."); + + if (GetCore().GetShowMode() != FRAME_SHOW_MODE_FULL_SCREEN) + { + SysTryReturn(NID_UI_CTRL, !(pNewCurForm->GetFormStyle() & FORM_STYLE_INDICATOR), E_INVALID_ARG, E_INVALID_ARG, "Only Frame whose show mode is @c FRAME_SHOW_MODE_FULL_SCREEN can set a Form which has the style of @c FORM_STYLE_INDICATOR as the current form."); + } + + + r = MoveChildToTop(*pNewCurForm); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + // [ToDo] Change the method to return result. And the arg should be reference. + GetCore().SetCurrentForm(&pNewCurForm->GetCore()); + r = GetLastResult(); + SysAssert(r == E_SUCCESS); // [ToDo] Exception check. + + pNewCurForm->UpdateOrientationStatus(); + + // [ToDo] Check last result + SysAssert(GetLastResult() == E_SUCCESS); + return E_SUCCESS; +} + +// [ToDo] This function should return _FormImpl*. +_FormImpl* +_FrameImpl::GetCurrentForm(void) const +{ + _Control* pFormCore = GetCore().GetCurrentForm(); + if (!pFormCore) + { + return null; + } + + _FormImpl* pFormImpl = static_cast<_FormImpl*>(pFormCore->GetUserData()); + + return pFormImpl; +} + +_FrameImpl* +_FrameImpl::CreateFrameImplN(Frame* pPublic) +{ + ClearLastResult(); + result r = E_SUCCESS; + + _Frame* pCore = _Frame::CreateFrameN(); + SysTryReturn(NID_UI_CTRL, pCore, null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _FrameImpl* pImpl = new (std::nothrow) _FrameImpl(pPublic, pCore); + r = _ControlImpl::CheckConstruction(pCore, pImpl); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + pCore->SetSize(_ControlManager::GetInstance()->GetScreenSizeF()); + + pCore->AddFrameEventListener(*pImpl); + + SetLastResult(E_SUCCESS); + + return pImpl; +} + +void +_FrameImpl::AddFrameEventListener(IFrameEventListener& listener) +{ + result r = __pFrameEvent->AddListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +_FrameImpl::RemoveFrameEventListener(IFrameEventListener& listener) +{ + result r = __pFrameEvent->RemoveListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +Animations::FrameAnimator* +_FrameImpl::GetFrameAnimator(void) const +{ + if (__pFrameAnimator == null) + { + FrameAnimator* pFrameAnimator = new (std::nothrow) FrameAnimator(); + SysTryReturn(NID_UI_CTRL, + pFrameAnimator != null, null, + E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + + result r = pFrameAnimator->Construct(GetPublic()); + if (IsFailed(r)) + { + SysLogException(NID_UI_CTRL, E_SYSTEM, "[E_SYSTEM] FrameAnimator::Construct failed"); + delete pFrameAnimator; + return null; + } + + const_cast<_FrameImpl*>(this)->__pFrameAnimator = pFrameAnimator; + } + + SetLastResult(E_SUCCESS); + + return __pFrameAnimator; +} + +void +_FrameImpl::OnDraw(void) +{ + if (__pOrientationAgent) + { + __pOrientationAgent->FireOrientationEvent(); + } + + _WindowImpl::OnDraw(); +} + +void +_FrameImpl::OnChangeLayout(_ControlOrientation orientation) +{ + // Change layout. + _ContainerImpl::OnChangeLayout(orientation); + SysTryReturnVoidResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + bool resizable = IsResizable(); + SetResizable(true); + + _ControlManager* pCoreManager = _ControlManager::GetInstance(); + SysAssert(pCoreManager); + const FloatDimension& screenSize = pCoreManager->GetScreenSizeF(); + + FrameShowMode frameShowMode = GetCore().GetShowMode(); + + if (frameShowMode == FRAME_SHOW_MODE_FULL_SCREEN) + { + GetCore().SetRotation(true); + + if (orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + SetSize(screenSize); + } + else + { + SetSize(FloatDimension(screenSize.height, screenSize.width)); + } + + GetCore().SetRotation(false); + } + else if ((frameShowMode == FRAME_SHOW_MODE_PARTIAL_SCREEN) || (frameShowMode == FRAME_SHOW_MODE_PARTIAL_SCREEN_FLOATING)) + { + bool movable = IsMovable(); + SetMovable(true); + + FloatPoint prevPoint = GetPositionF(); + FloatPoint curPoint(prevPoint.x, prevPoint.y); + float ratio = screenSize.width / screenSize.height; + if (orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + if (prevPoint.x > 0.0f) + { + curPoint.x = prevPoint.x * ratio; + } + + if (prevPoint.y > 0.0f) + { + curPoint.y = prevPoint.y / ratio; + } + } + else + { + if (prevPoint.x > 0.0f) + { + curPoint.x = prevPoint.x / ratio; + } + + if (prevPoint.y > 0.0f) + { + curPoint.y = prevPoint.y * ratio; + } + } + + // depend on WM. + // Skip + //SetPosition(curPoint); + SetMovable(movable); + GetCore().SetFloatingOrientation(orientation); + } + + SetResizable(resizable); +} + +void +_FrameImpl::OnChildDetaching(const _Control& child) +{ + result r = E_SUCCESS; + + _FormImpl* pFormImpl = static_cast<_FormImpl*>(child.GetUserData()); + + _FormImpl* pCurrentForm = GetCurrentForm(); + + if (pCurrentForm != null) + { + if (pCurrentForm == pFormImpl) + { + // if the given control will be the current form, hide the current form + int count = GetChildCount(); + if (count > 1) + { + _ControlImpl* pControlImpl = GetChild(count - 2); + if (!pControlImpl) + { + return ; + } + + Form* pPrevForm = static_cast(&pControlImpl->GetPublic()); + + if (pPrevForm != null) + { + r = pPrevForm->SetShowState(true); + if (IsFailed(r)) + { + SysLogException(NID_UI_CTRL, r, "[%s] Propagating.", GetErrorMessage(r)); + return ; + } + } + } + } + } +} + +void +_FrameImpl::OnChildDetached(const _Control& child) +{ + _ControlImpl::OnChildDetached(child); + + int childCount = GetCore().GetChildCount(); + if (childCount == 0) + { + if (IsDestroying() == false) + { + UpdateOrientationStatus(); + } + } + else if (childCount > 0) + { + _Control* pControl = GetCore().GetChild(childCount - 1); + _ControlImpl* pControlImpl = static_cast<_ControlImpl*>(pControl->GetUserData()); + _FormImpl* pCurrentFormImpl = dynamic_cast<_FormImpl*>(pControlImpl); + SysTryReturnVoidResult(NID_UI_CTRL, pCurrentFormImpl, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + pCurrentFormImpl->UpdateOrientationStatus(true); + } +} + +void +_FrameImpl::OnFrameActivated(const _Frame& source) +{ + if (__pFrameEvent) + { + IEventArg* pEventArg = _PublicFrameEvent::CreateFrameEventArgN(_FrameImpl::GetPublic(), FRAME_STATE_ACTIVATED); + if (pEventArg) + { + __pFrameEvent->Fire(*pEventArg); + } + } +} + +void +_FrameImpl::OnFrameDeactivated(const _Frame& source) +{ + if (__pFrameEvent) + { + IEventArg* pEventArg = _PublicFrameEvent::CreateFrameEventArgN(_FrameImpl::GetPublic(), FRAME_STATE_DEACTIVATED); + if (pEventArg) + { + __pFrameEvent->Fire(*pEventArg); + } + } +} + +void +_FrameImpl::OnFrameMinimized(const _Frame& source) +{ + if (__pFrameEvent) + { + IEventArg* pEventArg = _PublicFrameEvent::CreateFrameEventArgN(_FrameImpl::GetPublic(), FRAME_STATE_MINIMIZED); + if (pEventArg) + { + __pFrameEvent->Fire(*pEventArg); + } + } +} + +void +_FrameImpl::OnFrameRestored(const _Frame& source) +{ + if (__pFrameEvent) + { + IEventArg* pEventArg = _PublicFrameEvent::CreateFrameEventArgN(_FrameImpl::GetPublic(), FRAME_STATE_RESTORED); + if (pEventArg) + { + __pFrameEvent->Fire(*pEventArg); + } + } +} + +void +_FrameImpl::OnBoundsChanged(void) +{ + int childcount = GetChildCount(); + FloatRectangle bounds = GetBoundsF(); + + for (int i = 0 ; i < childcount ; i++) + { + _ControlImpl* pChild = GetChild(i); + _FormImpl* pForm = dynamic_cast<_FormImpl*>(pChild); + if (pForm) + { + if (GetShowMode() == FRAME_SHOW_MODE_FULL_SCREEN) + { + if (pForm->GetOrientationStatus() == ORIENTATION_STATUS_PORTRAIT || pForm->GetOrientationStatus() == ORIENTATION_STATUS_PORTRAIT_REVERSE) + { + pForm->SetBounds(FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height)); + } + else + { + pForm->SetBounds(FloatRectangle(0.0f, 0.0f, bounds.height, bounds.width)); + } + } + else + { + pForm->SetBounds(FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height)); + } + + } + } + + _ContainerImpl::OnBoundsChanged(); + +} + +result +_FrameImpl::OnAttachedToMainTree(void) +{ + result r = _WindowImpl::OnAttachedToMainTree(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (__pOrientationAgent) + { + __pOrientationAgent->RequestOrientationEvent(); + } + + return r; +} + +result +_FrameImpl::OnDetachingFromMainTree(void) +{ + result r = _WindowImpl::OnDetachingFromMainTree(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + delete __pFrameAnimator; + __pFrameAnimator = null; + + return r; +} + +bool +_FrameImpl::OnNotifiedN(const _ControlImpl& source, IList* pArgs) +{ + String* pString = dynamic_cast (pArgs->GetAt(0)); + if (pString) + { + if (*pString == _REQUEST_ORIENTATION_EVENT) + { + if (__pOrientationAgent) + { + __pOrientationAgent->FireOrientationEvent(); + } + + pArgs->RemoveAll(true); + delete pArgs; + + return true; + } + } + + return false; +} + +void +_FrameImpl::AddOrientationEventListener(Tizen::Ui::IOrientationEventListener& listener) +{ + if (__pOrientationAgent) + { + __pOrientationAgent->AddListener(listener); + } + else if (__pImeOrientationAgent) + { + __pImeOrientationAgent->AddListener(listener); + } +} + +void +_FrameImpl::RemoveOrientationEventListener(Tizen::Ui::IOrientationEventListener& listener) +{ + if (__pOrientationAgent) + { + __pOrientationAgent->RemoveListener(listener); + } + else if (__pImeOrientationAgent) + { + __pImeOrientationAgent->RemoveListener(listener); + } +} + +void +_FrameImpl::SetOrientation(Orientation orientation) +{ + if (__pOrientationAgent) + { + __pOrientationAgent->SetMode(orientation); + } +} + +Orientation +_FrameImpl::GetOrientation(void) const +{ + if (__pOrientationAgent) + { + return __pOrientationAgent->GetMode(); + } + + return ORIENTATION_NONE; +} + +OrientationStatus +_FrameImpl::GetOrientationStatus(void) const +{ + if (__pOrientationAgent) + { + return __pOrientationAgent->GetStatus(); + } + else if (__pImeOrientationAgent) + { + return __pImeOrientationAgent->GetStatus(); + } + + return ORIENTATION_STATUS_NONE; +} + +bool +_FrameImpl::IsChildAttachable(_ControlImpl& child) const +{ + return (dynamic_cast<_FormImpl*>(&child) != null); +} + +void +_FrameImpl::UpdateOrientationStatus(void) +{ + if (__pOrientationAgent) + { + __pOrientationAgent->Update(); + } +} + +void +_FrameImpl::UpdateOrientation(void) +{ + if (__pOrientationAgent) + { + __pOrientationAgent->UpdateOrientation(); + } +} + +void +_FrameImpl::UpdateOrientation(int angle) +{ + SysLog(NID_UI_CTRL, "[Ime Rotation]"); + + if (__pImeOrientationAgent) + { + __pImeOrientationAgent->UpdateOrientation(angle); + } +} + +bool +_FrameImpl::IsOpaque(void) const +{ + //return true; + return false; +} + +void +_FrameImpl::SetFloatingBounds(const FloatRectangle& rect) +{ + GetCore().SetFloatingBounds(rect); +} + +void +_FrameImpl::SetFloatingBounds(const Rectangle& rect) +{ + GetCore().SetFloatingBounds(rect); +} + +result +_FrameImpl::SetShowMode(FrameShowMode showMode) +{ + return GetCore().SetShowMode(showMode); +} + +FrameShowMode +_FrameImpl::GetShowMode(void) const +{ + return GetCore().GetShowMode(); +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_FrameModel.cpp b/src/ui/controls/FUiCtrl_FrameModel.cpp new file mode 100644 index 0000000..bcbd0b2 --- /dev/null +++ b/src/ui/controls/FUiCtrl_FrameModel.cpp @@ -0,0 +1,37 @@ +// +// 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_FrameModel.cpp + * @brief This is the implementation file for the _FrameModel class. + */ + +#include +#include +#include "FUiCtrl_FrameModel.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +_FrameModel::_FrameModel(void) +{ +} + +_FrameModel::~_FrameModel(void) +{ +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_FramePresenter.cpp b/src/ui/controls/FUiCtrl_FramePresenter.cpp new file mode 100644 index 0000000..324d6f1 --- /dev/null +++ b/src/ui/controls/FUiCtrl_FramePresenter.cpp @@ -0,0 +1,84 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +/** + * @file FUiCtrl_FramePresenter.cpp + * @brief This is the implementation file for the _FramePresenter class. + */ + +#include +#include +#include +#include +#include "FUiCtrl_FramePresenter.h" +#include "FUiCtrl_FrameModel.h" +#include "FUiCtrl_Frame.h" + +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_FramePresenter::_FramePresenter(const _Frame& frame) + : __pFrame(null) + , __pFrameModel(null) +{ + __pFrame = const_cast <_Frame*>(&frame); + + _FrameModel* pModel = new (std::nothrow) _FrameModel(); + SysTryReturnVoidResult(NID_UI_CTRL, pModel, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + _SetModel(*pModel); + + ClearLastResult(); + + return; +} + +_FramePresenter::~_FramePresenter(void) +{ + if (__pFrameModel) + { + delete __pFrameModel; + __pFrameModel = null; + } + + ClearLastResult(); +} + +result +_FramePresenter::_SetModel(const _FrameModel& frameModel) +{ + __pFrameModel = const_cast <_FrameModel*>(&frameModel); + + return E_SUCCESS; +} + +void +_FramePresenter::Draw(void) +{ + _Draw(); + + return; +} + +void +_FramePresenter::_Draw(void) +{ + return; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_Gallery.cpp b/src/ui/controls/FUiCtrl_Gallery.cpp new file mode 100644 index 0000000..269c896 --- /dev/null +++ b/src/ui/controls/FUiCtrl_Gallery.cpp @@ -0,0 +1,867 @@ +// +// 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. +// +#include +#include +#include +#include "FUi_AccessibilityContainer.h" +#include "FUi_AccessibilityElement.h" +#include "FUi_AccessibilityManager.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_ResourceManager.h" +#include "FUi_TouchFlickGestureDetector.h" +#include "FUi_TouchTapGestureDetector.h" +#include "FUi_TouchPinchGestureDetector.h" +#include "FUi_TouchLongPressGestureDetector.h" +#include "FUiCtrl_Gallery.h" +#include "FUiCtrl_GalleryBitmap.h" +#include "FUiCtrl_GalleryPresenter.h" +#include "FUiCtrl_GalleryRenderer.h" +#include "FUiCtrl_GalleryRendererNotification.h" +#include "FUiCtrl_GalleryViewEventInfo.h" +#include "FUiCtrl_GalleryViewEvent.h" +#include "FUiCtrl_IGalleryCoreEventListener.h" +#include "FUiCtrl_IGalleryRendererNotiListener.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::System; +using namespace Tizen::Ui::Effects; + +namespace { + const float TOUCH_INSENSITIVE = 0.08f; + const int GALLERY_GESTURE_TAP_MOVE_ALLOWANCE = 50; +} // unnamed namespace + +namespace Tizen { namespace Ui { namespace Controls { + +_Gallery::_Gallery(void) + : __pRenderer(null) + , __pPresenter(null) + , __modelInitialized(false) + , __longPressed(false) + , __keyEventProcessing(false) + , __pGalleryImageElement(null) +{ + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + if (pContainer != null) + { + pContainer->Activate(true); + } +} + +_Gallery::~_Gallery(void) +{ + result r = __flickGesture.RemoveGestureListener(*this); + if (r != E_SUCCESS) + { + SetLastResult(r); + SysAssert(false); + } + + r = RemoveGestureDetector(__flickGesture); + if (r != E_SUCCESS) + { + SetLastResult(r); + SysAssert(false); + } + + r = __oneTapGesture.RemoveGestureListener(*this); + if (r != E_SUCCESS) + { + SetLastResult(r); + SysAssert(false); + } + + r = RemoveGestureDetector(__oneTapGesture); + if (r != E_SUCCESS) + { + SetLastResult(r); + SysAssert(false); + } + + r = __twoTapGesture.RemoveGestureListener(*this); + if (r != E_SUCCESS) + { + SetLastResult(r); + SysAssert(false); + } + + r = RemoveGestureDetector(__twoTapGesture); + if (r != E_SUCCESS) + { + SetLastResult(r); + SysAssert(false); + } + + r = __pinchGesture.RemoveGestureListener(*this); + if (r != E_SUCCESS) + { + SetLastResult(r); + SysAssert(false); + } + + r = RemoveGestureDetector(__pinchGesture); + if (r != E_SUCCESS) + { + SetLastResult(r); + SysAssert(false); + } + + r = __longPressGesture.RemoveGestureListener(*this); + if (r != E_SUCCESS) + { + SetLastResult(r); + SysAssert(false); + } + + r = RemoveGestureDetector(__longPressGesture); + if (r != E_SUCCESS) + { + SetLastResult(r); + SysAssert(false); + } + + r = _SettingInfoImpl::RemoveSettingEventListenerForInternal(*this); + if (r != E_SUCCESS) + { + SetLastResult(r); + SysAssert(false); + } + + RemoveGalleryAccessibilityElements(); + + delete __pRenderer; + delete __pPresenter; +} + +_Gallery* +_Gallery::CreateGalleryN(_GalleryItemProviderAdaptorImpl* pGalleryItemProviderAdaptor) +{ + result r = E_SUCCESS; + ClearLastResult(); + + _Gallery* pGallery = new (std::nothrow) _Gallery(); + SysTryCatch(NID_UI_CTRL, pGallery != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to allocate the memory for the _Gallery."); + + r = pGallery->Construct(pGalleryItemProviderAdaptor); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + SetLastResult(E_SUCCESS); + + return pGallery; + +CATCH: + delete pGallery; + + return null; +} + +result +_Gallery::Construct(_GalleryItemProviderAdaptorImpl* pGalleryItemProviderAdaptor) +{ + result r = E_SUCCESS; + _GalleryRenderer* pRenderer = null; + _GalleryPresenter* pPresenter = null; + + pRenderer = _GalleryRenderer::CreateGalleryRendererN((Tizen::Ui::_Control&)*this); + SysTryCatch(NID_UI_CTRL, pRenderer != null, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Failed to create the _GalleryRenderer."); + + pPresenter = _GalleryPresenter::CreateGalleryPresenterN((_IGalleryRenderer&)*pRenderer, pGalleryItemProviderAdaptor, this); + SysTryCatch(NID_UI_CTRL, pPresenter != null, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Failed to create the _GalleryPresenter."); + + r = pRenderer->AddNotiListener(*pPresenter); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + AcquireHandle(); + + r = __flickGesture.AddGestureListener(*this); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = _Control::AddGestureDetector(__flickGesture); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __oneTapGesture.AddGestureListener(*this); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __oneTapGesture.SetTapCount(1); + r = _Control::AddGestureDetector(__oneTapGesture); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __twoTapGesture.AddGestureListener(*this); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __twoTapGesture.SetMoveAllowance(GALLERY_GESTURE_TAP_MOVE_ALLOWANCE); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Failed to set TapMoveAllowance", GetErrorMessage(r)); + + __twoTapGesture.SetTapCount(2); + r = _Control::AddGestureDetector(__twoTapGesture); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __oneTapGesture.StartOnFailureOf(__twoTapGesture); + + SetMultiTouchEnabled(true); + r = _Control::AddGestureDetector(__pinchGesture); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __pinchGesture.AddGestureListener(*this); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __longPressGesture.AddGestureListener(*this); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = _Control::AddGestureDetector(__longPressGesture); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = _SettingInfoImpl::AddSettingEventListenerForInternal(*this); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + SetTouchPressThreshold(TOUCH_INSENSITIVE); + + SetRenderer((_GalleryRenderer &)*pRenderer); + SetPresenter((_GalleryPresenter &)*pPresenter); + + return E_SUCCESS; + +CATCH: + delete pRenderer; + delete pPresenter; + + return r; +} + +// presenter access +result +_Gallery::SetTextOfEmptyGallery(const String& text) +{ + return GetPresenter().SetTextOfEmptyGallery(text); +} + +String +_Gallery::GetTextOfEmptyGallery(void) const +{ + return GetPresenter().GetTextOfEmptyGallery(); +} + +result +_Gallery::SetBitmapOfEmptyGallery(const _GalleryBitmap* pBitmap) +{ + return GetPresenter().SetBitmapOfEmptyGallery(pBitmap); +} + +result +_Gallery::SetCoreEventListener(const _IGalleryCoreEventListener& coreEventListener) +{ + return GetPresenter().SetCoreEventListener(coreEventListener); +} + +result +_Gallery::RemoveCoreEventListener(const _IGalleryCoreEventListener& coreEventListener) +{ + return GetPresenter().RemoveCoreEventListener(coreEventListener); +} + +result +_Gallery::SetZoomingEnabled(bool enable) +{ + return GetPresenter().SetZoomingEnabled(enable); +} + +bool +_Gallery::IsZoomingEnabled(void) const +{ + return GetPresenter().IsZoomingEnabled(); +} + +result +_Gallery::SetSlideShowType(_GallerySlideShowType slideShowType) +{ + return GetPresenter().SetSlideShowType(slideShowType); +} + +_GallerySlideShowType +_Gallery::GetSlideShowType(void) const +{ + return GetPresenter().GetSlideShowType(); +} + +result +_Gallery::SetSlideShowAnimationDuration(int duration) +{ + return GetPresenter().SetSlideShowAnimationDuration(duration); +} + +int +_Gallery::GetSlideShowAnimationDuration(void) const +{ + return GetPresenter().GetSlideShowAnimationDuration(); +} + +result +_Gallery::SetSlideShowViewDuration(int duration) +{ + return GetPresenter().SetSlideShowViewDuration(duration); +} + +int +_Gallery::GetSlideShowViewDuration(void) const +{ + return GetPresenter().GetSlideShowViewDuration(); +} + +result +_Gallery::StartSlideShow(bool repeat) +{ + SetFocused(true); + return GetPresenter().StartSlideShow(repeat); +} + +result +_Gallery::StopSlideShow(void) +{ + return GetPresenter().StopSlideShow(); +} + +bool +_Gallery::IsSlideShowStarted(void) const +{ + return GetPresenter().IsSlideShowStarted(); +} + +// model access +result +_Gallery::SetCurrentItemIndex(int itemIndex) +{ + return GetPresenter().SetCurrentItem(itemIndex); +} + +int +_Gallery::GetCurrentItemIndex(void) const +{ + return GetPresenter().GetCurrentItemIndex(); +} + +int +_Gallery::GetItemCount(void) const +{ + return GetPresenter().GetItemCount(); +} + +result +_Gallery::RequestToLoadItem(int itemIndex) +{ + SysTryReturnResult(NID_UI_CTRL, __modelInitialized == true, E_INVALID_OPERATION, "Does not call to first draw."); + result r = GetPresenter().RequestToLoadItem(itemIndex); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagation.", GetErrorMessage(r)); + + InitializeAccessibilityElement(); + + return E_SUCCESS; +} + +result +_Gallery::RequestToUnloadItem(int itemIndex) +{ + SysTryReturnResult(NID_UI_CTRL, __modelInitialized == true, E_INVALID_OPERATION, "Does not call to first draw."); + result r = GetPresenter().RequestToUnloadItem(itemIndex); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagation.", GetErrorMessage(r)); + + InitializeAccessibilityElement(); + + return E_SUCCESS; +} + +result +_Gallery::RequestToUnloadAllItems(void) +{ + result r = GetPresenter().RequestToUnloadAllItems(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagation.", GetErrorMessage(r)); + + InitializeAccessibilityElement(); + + return E_SUCCESS; +} + +result +_Gallery::RequestToUpdateItem(int itemIndex) +{ + SysTryReturnResult(NID_UI_CTRL, __modelInitialized == true, E_INVALID_OPERATION, "Does not call to first draw."); + result r = GetPresenter().RequestToUpdateItem(itemIndex); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagation.", GetErrorMessage(r)); + + InitializeAccessibilityElement(); + + return E_SUCCESS; +} + +result +_Gallery::RequestToUpdateAllItems(void) +{ + result r = GetPresenter().RequestToUpdateAllItems(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagation.", GetErrorMessage(r)); + + InitializeAccessibilityElement(); + + return E_SUCCESS; +} + +bool +_Gallery::OnFlickGestureDetected(_TouchFlickGestureDetector& gesture) +{ + __longPressed = false; + _GalleryViewEventInfo viewEventInfo; + int distanceX = 0; + int distanceY = 0; + gesture.GetDistance(distanceX, distanceY); + if (gesture.GetDirection() == _FLICK_DIRECTION_RIGHT + || gesture.GetDirection() == _FLICK_DIRECTION_LEFT) + { + distanceY = 0; + } + else + { + distanceX = 0; + } + Point flickPoint(distanceX, distanceY); + + viewEventInfo.SetFlickPosition(flickPoint); + viewEventInfo.SetFlicked(true); + viewEventInfo.SetFlickTime(gesture.GetDuration()); + _GalleryViewEvent viewEvent(GALLERY_VIEW_EVENT_TOUCH_FLICK, &viewEventInfo); + bool r = GetPresenter().PostEvent(viewEvent); + SysTryReturn(NID_UI_CTRL, r == true, true, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + return true; +} + +bool +_Gallery::OnFlickGestureCanceled(_TouchFlickGestureDetector& gesture) +{ + return false; +} + +bool +_Gallery::OnTapGestureDetected(_TouchTapGestureDetector& gesture) +{ + __longPressed = false; + if (gesture.GetTapCount() == 1) + { + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, this); + } + else + { + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_MULTI_TAP, this); + Point pos(0, 0); + Tizen::Ui::_TouchInfo touchInfo(0, _TOUCH_DOUBLE_PRESSED, pos, false, 0); + _GalleryViewEventInfo viewEventInfo(touchInfo); + _GalleryViewEvent viewEvent(GALLERY_VIEW_EVENT_TOUCH_DOUBLE_PRESSED, &viewEventInfo); + + bool r = GetPresenter().PostEvent(viewEvent); + SysTryReturn(NID_UI_CTRL, r == true, true, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + } + + return true; +} + +bool +_Gallery::OnTapGestureCanceled(_TouchTapGestureDetector& gesture) +{ + return false; +} + +bool +_Gallery::OnPinchGestureStarted(_TouchPinchGestureDetector& gesture) +{ + __longPressed = false; + return true; +} + +bool +_Gallery::OnPinchGestureChanged(_TouchPinchGestureDetector& gesture) +{ + _GalleryViewEventInfo viewEventInfo; + viewEventInfo.SetPinchCenterPosition(_CoordinateSystemUtils::ConvertToFloat(gesture.GetCenterPoint())); + viewEventInfo.SetPinchArea(gesture.GetScale()); + _GalleryViewEvent viewEvent(GALLERY_VIEW_EVENT_TOUCH_PINCH_ZOOM, &viewEventInfo); + bool r = GetPresenter().PostEvent(viewEvent); + SysTryReturn(NID_UI_CTRL, r == true, true, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + return true; +} + +bool +_Gallery::OnPinchGestureFinished(_TouchPinchGestureDetector& gesture) +{ + //return OnPinchGestureChanged(gesture); + return true; +} + +bool +_Gallery::OnPinchGestureCanceled(_TouchPinchGestureDetector& gesture) +{ + return false; +} + +bool +_Gallery::OnLongPressGestureDetected(_TouchLongPressGestureDetector& gesture) +{ + __longPressed = true; + return true; +} + +bool +_Gallery::OnLongPressGestureCanceled(_TouchLongPressGestureDetector& gesture) +{ + return true; +} + +// Touch Event Callbacks +bool +_Gallery::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + _GalleryViewEventInfo viewEventInfo(const_cast <_TouchInfo&>(touchinfo)); + _GalleryViewEvent viewEvent(GALLERY_VIEW_EVENT_TOUCH_PRESSED, &viewEventInfo); + + return GetPresenter().PostEvent(viewEvent); +} + +bool +_Gallery::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + _GalleryViewEventInfo viewEventInfo(const_cast <_TouchInfo&>(touchinfo)); + _GalleryViewEvent viewEvent(GALLERY_VIEW_EVENT_TOUCH_RELEASED, &viewEventInfo); + + bool touchReturn = GetPresenter().PostEvent(viewEvent); + if (__longPressed == true) + { + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, this); + __longPressed = false; + } + + return touchReturn; +} + +bool +_Gallery::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + __longPressed = false; + _GalleryViewEventInfo viewEventInfo(const_cast <_TouchInfo&>(touchinfo)); + _GalleryViewEvent viewEvent(GALLERY_VIEW_EVENT_TOUCH_MOVED, &viewEventInfo); + + return GetPresenter().PostEvent(viewEvent); +} + +bool +_Gallery::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + _GalleryViewEventInfo viewEventInfo; + _GalleryViewEvent viewEvent(GALLERY_VIEW_EVENT_TOUCH_CANCELED, &viewEventInfo); + + return GetPresenter().PostEvent(viewEvent); +} + +// Windowing Event Callbacks +void +_Gallery::OnDraw(void) +{ + if (__modelInitialized == false) + { + //GetPresenter().RequestToUpdateItemCount(); + __modelInitialized = true; + } + + GetPresenter().OnDraw(); + + if (__keyEventProcessing == true) + { + __keyEventProcessing = false; + } +} + +void +_Gallery::OnBoundsChanged(void) +{ + _GalleryViewEventInfo viewEventInfo; + _GalleryViewEvent viewEvent(GALLERY_VIEW_EVENT_BOUNDS_CHANGED, &viewEventInfo); + + bool r = GetPresenter().PostEvent(viewEvent); + SysTryReturnVoidResult(NID_UI_CTRL, r == true, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + ResizeGalleryAccessibilityElement(); +} + +void +_Gallery::OnFontInfoRequested(unsigned long& style, int& size) +{ + GetPresenter().OnFontInfoRequested(style, size); +} + +void +_Gallery::OnFontChanged(Font* pFont) +{ + GetPresenter().OnFontChanged(); +} + +void +_Gallery::SetEffect(Effect* pEffect) +{ + GetRenderer().SetEffect(pEffect); +} + +Effect* +_Gallery::GetEffect(void) +{ + return GetRenderer().GetEffect(); +} + +result +_Gallery::OnAttachedToMainTree(void) +{ + InitializeAccessibilityElement(); + + return E_SUCCESS; +} + +void +_Gallery::InitializeAccessibilityElement(void) +{ + if (_AccessibilityManager::IsActivated() != true) + { + return; + } + + if (GetItemCount() > 0) + { + AddGalleryAccessibilityElement(); + } + else + { + RemoveGalleryAccessibilityElements(); + } + + return; +} + +void +_Gallery::ResizeGalleryAccessibilityElement(void) +{ + if (_AccessibilityManager::IsActivated() == true && __pGalleryImageElement != null) + { + // TODO : need _AccessibilityElement::SetBoundsF() + FloatRectangle floatRect = __pRenderer->GetCanvasImageBounds(__pPresenter->SearchCanvasIndex(GetCurrentItemIndex())); + Rectangle rect(floatRect.x, floatRect.y, floatRect.width, floatRect.height); + __pGalleryImageElement->SetBounds(rect); + } + + return; +} + +void +_Gallery::RemoveGalleryAccessibilityElements(void) +{ + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + + if (pContainer != null && __pGalleryImageElement != null) + { + result r = pContainer->RemoveElement(*__pGalleryImageElement); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + __pGalleryImageElement = null; + } +} + +void +_Gallery::AddGalleryAccessibilityElement(void) +{ + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + if(pContainer != null && __pGalleryImageElement == null) + { + _AccessibilityElement* pGalleryElement = new (std::nothrow) _AccessibilityElement(true); + SysTryReturnVoidResult(NID_UI_CTRL, pGalleryElement, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + FloatRectangle floatRect = __pRenderer->GetCanvasImageBounds(__pPresenter->SearchCanvasIndex(GetCurrentItemIndex())); + Rectangle rect(floatRect.x, floatRect.y, floatRect.width, floatRect.height); + pGalleryElement->SetBounds(rect); + pGalleryElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_IMAGE"); + pGalleryElement->SetName(L"GalleryImage"); + + pContainer->AddElement(*pGalleryElement); + __pGalleryImageElement = pGalleryElement; + } + + return; +} + +void +_Gallery::OnSettingChanged(Tizen::Base::String& key) +{ + const wchar_t* LOCALE_LANGUAGE = L"http://tizen.org/setting/locale.language"; + if (key == LOCALE_LANGUAGE) + { + __pPresenter->UpdateEmptyString(); + } +} + +bool +_Gallery::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) +{ + if (!IsFocusModeStateEnabled()) + { + return false; + } + + bool returnValue = false; + bool keyPressed = false; + + if (keyInfo.GetKeyCode() == _KEY_ENTER + || keyInfo.GetKeyCode() == _KEY_UP + || keyInfo.GetKeyCode() == _KEY_DOWN + || keyInfo.GetKeyCode() == _KEY_LEFT + || keyInfo.GetKeyCode() == _KEY_RIGHT) + { + if (__keyEventProcessing == true) + { + Invalidate(); + return true; + } + + keyPressed = true; + _GalleryViewEventInfo viewEventInfo; + _GalleryViewEvent pressedEvent(GALLERY_VIEW_EVENT_TOUCH_PRESSED, &viewEventInfo); + returnValue = GetPresenter().PostEvent(pressedEvent); + SysTryReturn(NID_UI_CTRL, returnValue == true, false, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + __keyEventProcessing = true; + } + + switch (keyInfo.GetKeyCode()) + { + case _KEY_UP: + { + _GalleryViewEventInfo viewEventInfo; + Point flickPoint(0, 100); + viewEventInfo.SetFlickPosition(flickPoint); + viewEventInfo.SetFlicked(true); + viewEventInfo.SetFlickTime(1); + _GalleryViewEvent viewEvent(GALLERY_VIEW_EVENT_TOUCH_FLICK, &viewEventInfo); + returnValue = GetPresenter().PostEvent(viewEvent); + if (returnValue == false) + { + __keyEventProcessing = false; + } + + break; + } + + case _KEY_DOWN: + { + _GalleryViewEventInfo viewEventInfo; + Point flickPoint(0, -100); + viewEventInfo.SetFlickPosition(flickPoint); + viewEventInfo.SetFlicked(true); + viewEventInfo.SetFlickTime(1); + _GalleryViewEvent viewEvent(GALLERY_VIEW_EVENT_TOUCH_FLICK, &viewEventInfo); + returnValue = GetPresenter().PostEvent(viewEvent); + if (returnValue == false) + { + __keyEventProcessing = false; + } + + break; + } + + case _KEY_LEFT: + { + _GalleryViewEventInfo viewEventInfo; + Point flickPoint(100, 0); + viewEventInfo.SetFlickPosition(flickPoint); + viewEventInfo.SetFlicked(true); + viewEventInfo.SetFlickTime(1); + _GalleryViewEvent viewEvent(GALLERY_VIEW_EVENT_TOUCH_FLICK, &viewEventInfo); + returnValue = GetPresenter().PostEvent(viewEvent); + if (returnValue == false) + { + __keyEventProcessing = false; + } + + break; + } + + case _KEY_RIGHT: + { + _GalleryViewEventInfo viewEventInfo; + Point flickPoint(-100, 0); + viewEventInfo.SetFlickPosition(flickPoint); + viewEventInfo.SetFlicked(true); + viewEventInfo.SetFlickTime(1); + _GalleryViewEvent viewEvent(GALLERY_VIEW_EVENT_TOUCH_FLICK, &viewEventInfo); + returnValue = GetPresenter().PostEvent(viewEvent); + if (returnValue == false) + { + __keyEventProcessing = false; + } + + break; + } + + default: + break; + } + + if (keyPressed == true) + { + _GalleryViewEventInfo viewEventInfo; + _GalleryViewEvent releaseEvent(GALLERY_VIEW_EVENT_TOUCH_RELEASED, &viewEventInfo); + bool releaseReturnValue = GetPresenter().PostEvent(releaseEvent); + SysTryReturn(NID_UI_CTRL, releaseReturnValue == true, false, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + } + + return returnValue; +} + +bool +_Gallery::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) +{ + if (!IsFocusModeStateEnabled()) + { + return false; + } + + if ((keyInfo.GetKeyCode() == _KEY_BACK || keyInfo.GetKeyCode() == _KEY_ESC) && IsSlideShowStarted()) + { + StopSlideShow(); + return true; + } + + 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_GalleryBitmap.cpp b/src/ui/controls/FUiCtrl_GalleryBitmap.cpp new file mode 100644 index 0000000..7cb65bc --- /dev/null +++ b/src/ui/controls/FUiCtrl_GalleryBitmap.cpp @@ -0,0 +1,273 @@ +// +// 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. +// +#include +#include +#include +#include +#include +#include <../util/FGrp_Util.h> +#include "FUi_Math.h" +#include "FUiCtrl_GalleryBitmap.h" + + +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls { + +_GalleryBitmap::_GalleryBitmap(void) + : __pBitmap(null) + , __rotation(GALLERY_INTERNAL_IMAGE_ROTATION_0) + , __bitmapSizeAndRotateAdjusted(false) +{ + // Do nothing +} + +_GalleryBitmap::~_GalleryBitmap(void) +{ + delete __pBitmap; +} + +_GalleryBitmap* +_GalleryBitmap::CloneN(_GalleryBitmap* pBitmap) +{ + Bitmap* pInternalBitmap = null; + _GalleryBitmap* pCloneBitmap = new(std::nothrow) _GalleryBitmap(); + SysTryCatch(NID_UI_CTRL, pCloneBitmap != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pInternalBitmap = _BitmapImpl::CloneN(*pBitmap->GetInternalBitmap()); + SysTryCatch(NID_UI_CTRL, pInternalBitmap != null, , GetLastResult(), "[%s] Propagating", GetErrorMessage(GetLastResult())); + + pCloneBitmap->SetInternalBitmap(pInternalBitmap); + + pCloneBitmap->SetAdjustBitmapFlag(pBitmap->IsInitialize()); + + pCloneBitmap->SetBitmapRotation(pBitmap->GetBitmapRotation()); + + SetLastResult(E_SUCCESS); + + return pCloneBitmap; + +CATCH: + delete pCloneBitmap; + + return null; +} + +_GalleryBitmap* +_GalleryBitmap::CreateGalleryBitmapN(Bitmap* pBitmap) +{ + Bitmap* pInternalBitmap = null; + _GalleryBitmap* pCloneBitmap = new(std::nothrow) _GalleryBitmap(); + SysTryCatch(NID_UI_CTRL, pCloneBitmap != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pInternalBitmap = _BitmapImpl::CloneN(*pBitmap); + SysTryCatch(NID_UI_CTRL, pInternalBitmap != null, , GetLastResult(), "[%s] Propagating", GetErrorMessage(GetLastResult())); + + pCloneBitmap->SetInternalBitmap(pInternalBitmap); + + SetLastResult(E_SUCCESS); + + return pCloneBitmap; + +CATCH: + delete pCloneBitmap; + + return null; +} + +result +_GalleryBitmap::SetSize(const Dimension& size) +{ + if (size.width == GetSize().width && size.height == GetSize().height) + { + return E_SUCCESS; + } + + Dimension scaledSize = size; + float width = GetSize().width; + float height = GetSize().height; + + float widthFactor = (float)size.width / width; + float heightFactor = (float)size.height / height; + + if (widthFactor > heightFactor) + { + scaledSize.width = width * heightFactor + 0.5f; + } + else + { + scaledSize.height = height * widthFactor + 0.5f; + } + + result r = __pBitmap->Scale(scaledSize); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return E_SUCCESS; +} + +FloatDimension +_GalleryBitmap::GetSize(void) const +{ + FloatDimension dim; + dim.width = __pBitmap->GetWidth(); + dim.height = __pBitmap->GetHeight(); + + return dim; +} + +result +_GalleryBitmap::Initialize(const FloatDimension& size, _GalleryFittingType fittingType) +{ + if (IsInitialize() == false) + { + result r = AdjustBitmapRotate(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + SetAdjustBitmapFlag(true); + } + + return E_SUCCESS; +} + +result +_GalleryBitmap::AdjustBitmapRotate(void) +{ + // TODO : need _Effect::RotateImageF() + Bitmap* pImage = null; + _Util::LockManager* pSrcLock = null; + _Util::LockManager* pDstLock = null; + Bitmap* pBitmap = null; + result r = E_SUCCESS; + + Dimension dim; + int degree = 0; + switch (__rotation) + { + case GALLERY_INTERNAL_IMAGE_ROTATION_0: + dim.SetSize(__pBitmap->GetWidth(), __pBitmap->GetHeight()); + break; + case GALLERY_INTERNAL_IMAGE_ROTATION_90: + degree = 90; + dim.SetSize(__pBitmap->GetHeight(), __pBitmap->GetWidth()); + break; + case GALLERY_INTERNAL_IMAGE_ROTATION_180: + degree = 180; + dim.SetSize(__pBitmap->GetWidth(), __pBitmap->GetHeight()); + break; + case GALLERY_INTERNAL_IMAGE_ROTATION_270: + degree = 270; + dim.SetSize(__pBitmap->GetHeight(), __pBitmap->GetWidth()); + break; + default: + SysAssert(false); + break; + } + + if (__rotation != GALLERY_INTERNAL_IMAGE_ROTATION_0) + { + pImage = new(std::nothrow) Bitmap(); + SysTryReturn(NID_UI_CTRL, pImage != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = pImage->Construct(dim, __pBitmap->GetPixelColorFormat()); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating", GetErrorMessage(r)); + + pSrcLock = new (std::nothrow) _Util::LockManager(*_BitmapImpl::GetInstance(*__pBitmap)); + SysTryCatch(NID_UI_CTRL, pSrcLock != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pDstLock = new (std::nothrow) _Util::LockManager(*_BitmapImpl::GetInstance(*pImage)); + SysTryCatch(NID_UI_CTRL, pDstLock != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + { + const BufferInfo& srcBufferInfo = pSrcLock->GetBufferInfo(); + const BufferInfo& dstBufferInfo = pDstLock->GetBufferInfo(); + + _Util::Pixmap srcImage(srcBufferInfo.width, srcBufferInfo.height, srcBufferInfo.bitsPerPixel, srcBufferInfo.pPixels, srcBufferInfo.pitch); + _Util::Pixmap dstImage(dstBufferInfo.width, dstBufferInfo.height, dstBufferInfo.bitsPerPixel, dstBufferInfo.pPixels, dstBufferInfo.pitch); + + _Effect::RotateDesc rotateDesc = { degree, __pBitmap->GetWidth() >> 1 , __pBitmap->GetHeight() >> 1}; //??? + bool pass = _Effect::RotateImage(dstImage, dim.width >> 1, dim.height >> 1, srcImage, rotateDesc, 255); + //bool pass = _Effect::RotateImage(dstImage, dstBufferInfo.width >> 1, dstBufferInfo.height >> 1, srcImage, rotateDesc, 255); + if (pass == true) + { + pBitmap = new (std::nothrow) Bitmap(); + SysTryCatch(NID_UI_CTRL, pBitmap != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + Rectangle rect(0, 0, dim.width, dim.height); + r = pBitmap->Construct(*pImage, rect); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating", GetErrorMessage(r)); + + delete __pBitmap; + __pBitmap = pBitmap; + } + else + { + r = GetLastResult(); + } + delete pSrcLock; + delete pDstLock; + } + delete pImage; + } + + return r; + +CATCH: + delete pBitmap; + delete pDstLock; + delete pSrcLock; + delete pImage; + + return r; +} + +bool +_GalleryBitmap::IsInitialize(void) const +{ + return __bitmapSizeAndRotateAdjusted; +} + +void +_GalleryBitmap::SetBitmapRotation(_GalleryImageRotation rotation) +{ + __rotation = rotation; +} + +_GalleryImageRotation +_GalleryBitmap::GetBitmapRotation(void) const +{ + return __rotation; +} + +Bitmap* +_GalleryBitmap::GetInternalBitmap(void) const +{ + return __pBitmap; +} + +void +_GalleryBitmap::SetAdjustBitmapFlag(bool initialize) +{ + __bitmapSizeAndRotateAdjusted = initialize; +} + +void +_GalleryBitmap::SetInternalBitmap(Bitmap* pBitmap) +{ + __pBitmap = pBitmap; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_GalleryCanvas.cpp b/src/ui/controls/FUiCtrl_GalleryCanvas.cpp new file mode 100644 index 0000000..160be62 --- /dev/null +++ b/src/ui/controls/FUiCtrl_GalleryCanvas.cpp @@ -0,0 +1,842 @@ +// +// 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. +// +#include +#include +#include +#include +#include +#include +#include "FUiAnim_VisualElement.h" +#include "FUiCtrl_GalleryCanvas.h" +#include "FUiCtrl_GalleryBitmap.h" + + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Animations; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_GalleryAnimationProvider::_GalleryAnimationProvider(void) + : __pAnimationDelegator(null) +{ + __animationTiming.duration_ms = 0; + __animationTiming.timingFunction = GALLERY_ANIMATION_TIMING_FUNC_LINEAR; +} + +_GalleryAnimationProvider::~_GalleryAnimationProvider(void) +{ + // Do nothing +} + +VisualElementAnimation* +_GalleryAnimationProvider::CreateAnimationForProperty(VisualElement& source, const String& property) +{ + const IVisualElementAnimationTimingFunction* pTimingFunction = GetTimingFunc(__animationTiming.timingFunction); + + VisualElementAnimation* pAnimation = VisualElementAnimationProvider::CreateAnimationForProperty(source, property);//dynamic_cast(visualElement.CreateAnimationForPropertyN(visualElement, VEPropTransform)); + if (pAnimation != null) + { + result r = pAnimation->SetDuration(__animationTiming.duration_ms); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pAnimation->SetTimingFunction(pTimingFunction); + pAnimation->SetVisualElementAnimationStatusEventListener(__pAnimationDelegator); + } + + SetLastResult(E_SUCCESS); + + return pAnimation; + +CATCH: + delete pAnimation; + + return null; +} + +void +_GalleryAnimationProvider::SetAnimationDelegator(IVisualElementAnimationStatusEventListener* pAnimationDelegator) +{ + __pAnimationDelegator = pAnimationDelegator; + return; +} + +void +_GalleryAnimationProvider::SetGalleryAnimationTiming(_GalleryAnimationTiming animationTiming) +{ + __animationTiming = animationTiming; + return; +} + +const IVisualElementAnimationTimingFunction* +_GalleryAnimationProvider::GetTimingFunc(_GalleryAnimationTimingFunction timingFunction) const +{ + const IVisualElementAnimationTimingFunction* pTimingFunc = null; + switch (timingFunction) + { + case GALLERY_ANIMATION_TIMING_FUNC_LINEAR: + pTimingFunc = VisualElementAnimation::GetTimingFunctionByName("Linear"); + break; + case GALLERY_ANIMATION_TIMING_FUNC_EASEIN: + pTimingFunc = VisualElementAnimation::GetTimingFunctionByName("EaseIn"); + break; + case GALLERY_ANIMATION_TIMING_FUNC_EASEOUT: + pTimingFunc = VisualElementAnimation::GetTimingFunctionByName("EaseOut"); + break; + case GALLERY_ANIMATION_TIMING_FUNC_EASEINOUT: + pTimingFunc = VisualElementAnimation::GetTimingFunctionByName("EaseInOut"); + break; + default: + break; + } + + return pTimingFunc; +} + + +// _GalleryCanvas +_GalleryCanvas* +_GalleryCanvas::CreateGalleryCanvasN(FloatRectangle& canvasBounds) +{ + result r = E_SUCCESS; + + _GalleryCanvas* pCanvas = new (std::nothrow) _GalleryCanvas(); + SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, + "[E_OUT_OF_MEMORY] Failed to allocate the memory for the _GalleryCanvas."); + + r = pCanvas->Construct(canvasBounds); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + SetLastResult(E_SUCCESS); + + return pCanvas; + +CATCH: + delete pCanvas; + + return null; +} + +result +_GalleryCanvas::SetImage(const _GalleryBitmap* pImage, const FloatRectangle& viewBounds, _GalleryFittingType fittingType) +{ + if (pImage == null) + { + return E_SUCCESS; + } + + FloatRectangle canvasBounds = GetBounds(); + canvasBounds.width = viewBounds.width; + canvasBounds.height = viewBounds.height; + result r = SetBounds(canvasBounds); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _GalleryBitmap* pCanvasImage = _GalleryBitmap::CloneN(const_cast<_GalleryBitmap*>(pImage)); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pCanvasImage != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + delete __pImage; + __pImage = pCanvasImage; + + if (__pImage->IsInitialize() == false || __visualElementBoundsChanged == true) + { + result r = __pImage->Initialize(__pRootCanvas->GetControlSize(), fittingType); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + FloatDimension imageSize = GetScaledBitmapSize(*__pImage, __pRootCanvas->GetControlSize(), fittingType); + FloatPoint position(0,0); + if (__imageVerticalAlignment == GALLERY_VERTICAL_ALIGN_MIDDLE) + { + position.y = (__bounds.height - imageSize.height) / 2; + } + else if (__imageVerticalAlignment == GALLERY_VERTICAL_ALIGN_BOTTOM) + { + position.y = (__bounds.height - imageSize.height); + } + if (__imageHorizontalAlignment == GALLERY_HORIZONTAL_ALIGN_CENTER) + { + position.x = (__bounds.width - imageSize.width) / 2; + } + else if (__imageHorizontalAlignment == GALLERY_HORIZONTAL_ALIGN_RIGHT) + { + position.x = (__bounds.width - imageSize.width); + } + + FloatRectangle visualElementBounds(position.x, position.y, imageSize.width, imageSize.height); + r = SetVisualElementBounds(visualElementBounds); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __originalImageBounds = visualElementBounds; + SetImageBounds(GetBounds()); + + __visualElementBoundsChanged = false; + } + + SetNeedUpdateImage(true); + + return E_SUCCESS; +} + +_GalleryBitmap* +_GalleryCanvas::GetImage(void) const +{ + return __pImage; +} + +result +_GalleryCanvas::SetBounds(const FloatRectangle& bounds) +{ + SysTryReturnResult(NID_UI_CTRL, bounds.width >= 0.0 && bounds.height >= 0.0, E_INVALID_ARG, + "The bounds width or height is negative value."); + + __bounds = bounds; + if (GetFrameVisualElement().IsClipChildrenEnabled() == true) + { + GetFrameVisualElement().SetBounds(bounds); + } + return E_SUCCESS; +} + +const FloatRectangle& +_GalleryCanvas::GetBounds(void) const +{ + return __bounds; +} + +result +_GalleryCanvas::SetVisibility(bool visibility) +{ + if (IsVisibility() == visibility) + { + return E_SUCCESS; + } + + GetImageVisualElement().SetImplicitAnimationEnabled(false); + GetImageVisualElement().SetShowState(visibility); + GetFrameVisualElement().SetImplicitAnimationEnabled(false); + GetFrameVisualElement().SetShowState(visibility); + + return E_SUCCESS; +} + +bool +_GalleryCanvas::IsVisibility(void) const +{ + return GetImageVisualElement().GetShowState(); +} + +result +_GalleryCanvas::RefreshCanvas(void) +{ + return GetImageVisualElement().InvalidateRectangle(null); +} + +result +_GalleryCanvas::LoadImage(void) +{ + Canvas* pCanvas = null; + result r = E_SUCCESS; + Bitmap* pScaledImage = null; + + if (IsNeedUpdateImage() == true) + { + _GalleryBitmap* pImage = GetImage(); + if (pImage != null) + { + FloatRectangle rect = GetImageVisualElementBounds(); + rect.x = 0.0; + rect.y = 0.0; + pCanvas = GetImageVisualElement().GetCanvasN(); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, pCanvas != null, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pCanvas->SetBackgroundColor(__pRootCanvas->GetBackgroundColor()); + r = pCanvas->Clear(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pScaledImage = ScaledBitmapN(pImage->GetInternalBitmap(), Dimension(rect.width, rect.height)); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, pScaledImage != null, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pCanvas->DrawBitmap(Point(0,0), *pScaledImage); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GetImageVisualElement().SetFlushNeeded(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + delete pScaledImage; + delete pCanvas; + } + SetNeedUpdateImage(false); + } + + return E_SUCCESS; + +CATCH: + delete pScaledImage; + delete pCanvas; + return r; +} + +_GalleryCanvas::_GalleryCanvas(void) + : __pImageVisualElement(null) + , __pFrameVisualElement(null) + , __pAnimation(null) + , __bounds(0, 0, 0, 0) + , __pImage(null) + , __visableRegionOfImage(0, 0, 0, 0) + , __needUpdateImage(false) + , __visualElementBoundsChanged(false) + , __imageBounds(0, 0, 0, 0) + , __originalImageBounds(0, 0, 0, 0) + , __pRootCanvas(null) + , __factor(1.0) + , __imageAnchor(0, 0) + , __imageVerticalAlignment(GALLERY_VERTICAL_ALIGN_MIDDLE) + , __imageHorizontalAlignment(GALLERY_HORIZONTAL_ALIGN_CENTER) +{ + // Do nothing +} + +_GalleryCanvas::~_GalleryCanvas(void) +{ + GetImageVisualElement().RemoveAllAnimations(); + + delete __pImage; + __pImage = null; + + if (__pImageVisualElement != null) + { + __pImageVisualElement->Destroy(); + } + + if (__pFrameVisualElement != null) + { + __pFrameVisualElement->Destroy(); + } +} + +result +_GalleryCanvas::Construct(FloatRectangle& canvasBounds) +{ + result r = E_SUCCESS; + _VisualElement* pImageVisualElement = null; + _VisualElement* pFrameVisualElement = null; + + pImageVisualElement = new (std::nothrow) _VisualElement(); + SysTryCatch(NID_UI_CTRL, pImageVisualElement != null, , E_OUT_OF_MEMORY, + "[E_OUT_OF_MEMORY] Failed to allocate the memory for the _VisualElement."); + + r = pImageVisualElement->Construct(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pImageVisualElement->SetImplicitAnimationEnabled(false); + pImageVisualElement->SetBounds(canvasBounds); + + pImageVisualElement->SetShowState(true); + + r = pImageVisualElement->SetSurfaceOpaque(false); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + SetImageVisualElement(*pImageVisualElement); + + pFrameVisualElement = new (std::nothrow) _VisualElement(); + SysTryCatch(NID_UI_CTRL, pFrameVisualElement != null, , E_OUT_OF_MEMORY, + "[E_OUT_OF_MEMORY] Failed to allocate the memory for the _VisualElement."); + r = pFrameVisualElement->Construct(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pFrameVisualElement->SetImplicitAnimationEnabled(false); + pFrameVisualElement->SetBounds(canvasBounds); + + pFrameVisualElement->SetShowState(true); + + SetFrameVisualElement(*pFrameVisualElement); + + r = GetFrameVisualElement().AttachChild(GetImageVisualElement()); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + GetFrameVisualElement().SetClipChildrenEnabled(true); + + return E_SUCCESS; + +CATCH: + if (pImageVisualElement != null) + { + pImageVisualElement->Destroy(); + } + + if (pFrameVisualElement != null) + { + pFrameVisualElement->Destroy(); + } + __pImageVisualElement = null; + __pFrameVisualElement = null; + + return r; +} + +void +_GalleryCanvas::SetImageVisualElement(_VisualElement& visualElement) +{ + __pImageVisualElement = &visualElement; + return; +} + +_VisualElement& +_GalleryCanvas::GetImageVisualElement(void) const +{ + return *__pImageVisualElement; +} + +void +_GalleryCanvas::SetFrameVisualElement(_VisualElement& visualElement) +{ + __pFrameVisualElement = &visualElement; + return; +} + +_VisualElement& +_GalleryCanvas::GetFrameVisualElement(void) const +{ + return *__pFrameVisualElement; +} + +void +_GalleryCanvas::SetAnimation(VisualElementPropertyAnimation& animation) +{ + __pAnimation = &animation; + return; +} + +VisualElementPropertyAnimation& +_GalleryCanvas::GetAnimation(void) const +{ + return *__pAnimation; +} + +void +_GalleryCanvas::SetNeedUpdateImage(bool needUpdate) +{ + __needUpdateImage = needUpdate; + return; +} + +bool +_GalleryCanvas::IsNeedUpdateImage(void) const +{ + return __needUpdateImage; +} + +void +_GalleryCanvas::SetCanvasFactor(float factor) +{ + __factor = factor; + return; +} + +float +_GalleryCanvas::GetCanvasFactor(void) const +{ + return __factor; +} + +result +_GalleryCanvas::SetVisualElementBounds(const FloatRectangle& bounds) +{ + if (GetImageVisualElementBounds() == bounds) + { + return E_SUCCESS; + } + + __visualElementBoundsChanged = true; + return GetImageVisualElement().SetBounds(bounds); +} + +FloatRectangle +_GalleryCanvas::GetImageVisualElementBounds(void) const +{ + return GetImageVisualElement().GetBounds(); +} + +void +_GalleryCanvas::SetImageBounds(const FloatRectangle& canvasBounds) +{ + float factor = GetCanvasFactor(); + if (__visualElementBoundsChanged == true) + { + factor = 1.0f; + } + __imageBounds.width = __originalImageBounds.width * factor; + __imageBounds.height = __originalImageBounds.height * factor; + + if (__imageVerticalAlignment == GALLERY_VERTICAL_ALIGN_MIDDLE) + { + __imageBounds.y = (canvasBounds.height - __imageBounds.height) / 2; + } + else if (__imageVerticalAlignment == GALLERY_VERTICAL_ALIGN_BOTTOM) + { + __imageBounds.y = (canvasBounds.height - __imageBounds.height); + } + if (__imageHorizontalAlignment == GALLERY_HORIZONTAL_ALIGN_CENTER) + { + __imageBounds.x = (canvasBounds.width - __imageBounds.width) / 2; + } + else if (__imageHorizontalAlignment == GALLERY_HORIZONTAL_ALIGN_RIGHT) + { + __imageBounds.x = (canvasBounds.width - __imageBounds.width); + } + + return; +} + +FloatRectangle +_GalleryCanvas::GetOriginalImageBounds(void) const +{ + return __originalImageBounds; +} + +FloatRectangle +_GalleryCanvas::GetImageBounds(void) const +{ + return __imageBounds; +} + +result +_GalleryCanvas::SetAnimationDelegator(_GalleryAnimationProvider* pVEDelegator) +{ + if (GetImageVisualElement().GetAnimationProvider() == pVEDelegator + && GetFrameVisualElement().GetAnimationProvider() == pVEDelegator) + { + return E_SUCCESS; + } + + result r = GetImageVisualElement().SetAnimationProvider(pVEDelegator); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GetFrameVisualElement().SetAnimationProvider(pVEDelegator); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +void +_GalleryCanvas::SetRootCanvas(_GalleryRootCanvas& rootCanvas) +{ + __pRootCanvas = &rootCanvas; + return; +} + +void +_GalleryCanvas::SetImageAnchor(Tizen::Graphics::FloatPoint anchor) +{ + __imageAnchor = anchor; + return; +} + +FloatPoint +_GalleryCanvas::GetImageAnchor(void) const +{ + return __imageAnchor; +} + +FloatRectangle +_GalleryCanvas::GetAlignBoundary(void) const +{ + FloatRectangle imageBounds = GetImageBounds(); + if (__originalImageBounds.width != imageBounds.width || __originalImageBounds.height != imageBounds.height) + { + imageBounds.x += GetBounds().x; + imageBounds.y += GetBounds().y; + return imageBounds; + } + else + { + return FloatRectangle(-1, -1, -1, -1); + } +} + +void +_GalleryCanvas::SetClippingOfFrameVisualElement(bool clipping) +{ + GetFrameVisualElement().SetClipChildrenEnabled(clipping); +} + +void +_GalleryCanvas::SetImageAlignment(_GalleryVerticalAlignment imageVerticalAlignment + , _GalleryHorizontalAlignment imageHorizontalAlignment) +{ + __imageVerticalAlignment = imageVerticalAlignment; + __imageHorizontalAlignment = imageHorizontalAlignment; +} + +void +_GalleryCanvas::GetImageAlignment(_GalleryVerticalAlignment& imageVerticalAlignment + , _GalleryHorizontalAlignment& imageHorizontalAlignment) const +{ + imageVerticalAlignment = __imageVerticalAlignment; + imageHorizontalAlignment = __imageHorizontalAlignment; +} + +FloatDimension +_GalleryCanvas::GetScaledBitmapSize(_GalleryBitmap& galleryBitmap, const FloatDimension& size, _GalleryFittingType fittingType) const +{ + FloatDimension scaledSize = size; + if (fittingType == GALLERY_FITTING_TYPE_NONE) + { + return scaledSize; + } + + if (fittingType != GALLERY_FITTING_TYPE_FIT_XY) + { + float width = galleryBitmap.GetSize().width; + float height = galleryBitmap.GetSize().height; + + float widthFactor = size.width / width; + float heightFactor = size.height / height; + + if (fittingType == GALLERY_FITTING_TYPE_STRECTABLE) + { + if (widthFactor < 1.0f && heightFactor < 1.0f) + { + return scaledSize; + } + } + else if (fittingType == GALLERY_FITTING_TYPE_SHRINKABLE) + { + if (widthFactor > 1.0f && heightFactor > 1.0f) + { + return scaledSize; + } + } + + if (widthFactor > 1.0f && heightFactor > 1.0f) + { + scaledSize.SetSize(width, height); + } + else + { + if (widthFactor > heightFactor) + { + scaledSize.width = width * heightFactor; + } + else + { + scaledSize.height = height * widthFactor; + } + } + } + return scaledSize; +} + +Bitmap* +_GalleryCanvas::ScaledBitmapN(Bitmap* pSourceBitmap, Dimension scaledSize) +{ + Bitmap* pScaledBitmap = new (std::nothrow) Bitmap(); + SysTryReturn(NID_UI_CTRL, pScaledBitmap != null, null, E_OUT_OF_MEMORY, + "[E_OUT_OF_MEMORY] Failed to allocate the memory for the Bitmap."); + + FloatRectangle rect(0, 0, pSourceBitmap->GetWidthF(), pSourceBitmap->GetHeightF()); + int share = 1; + int widthShare = rect.width / scaledSize.width; + int heightShare = rect.height / scaledSize.height; + int power = 0; + Dimension realScaleSize = scaledSize; + + result r = pScaledBitmap->Construct(*pSourceBitmap, rect); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + if (widthShare > heightShare) + { + share = widthShare; + } + else + { + share = heightShare; + } + + + while (share > pow(2, (power + 1))) + { + power++; + } + + r = pScaledBitmap->SetScalingQuality(BITMAP_SCALING_QUALITY_HIGH); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + for (; power >= 0; power--) + { + realScaleSize.width = scaledSize.width * pow(2, power); + realScaleSize.height = scaledSize.height * pow(2, power); + r = pScaledBitmap->Scale(realScaleSize); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + return pScaledBitmap; + +CATCH: + delete pScaledBitmap; + + return null; +} + + +// _GalleryRootCanvas +_GalleryRootCanvas* +_GalleryRootCanvas::CreateGalleryRootCanvasN(_Control& control) +{ + _GalleryRootCanvas* pRootCanvas = new (std::nothrow) _GalleryRootCanvas(control); + SysTryReturn(NID_UI_CTRL, pRootCanvas != null, null, E_OUT_OF_MEMORY, + "[E_OUT_OF_MEMORY] Failed to allocate the memory for the _GalleryRootCanvas."); + + SetLastResult(E_SUCCESS); + + return pRootCanvas; +} + +result +_GalleryRootCanvas::SetBackgroundImage(const _GalleryBitmap* pImage) +{ + __pBackgroundImage = const_cast <_GalleryBitmap*>(pImage); + return E_SUCCESS; +} + +_GalleryBitmap* +_GalleryRootCanvas::GetBackgroundImage(void) const +{ + return __pBackgroundImage; +} + +Color +_GalleryRootCanvas::GetBackgroundColor(void) const +{ + return GetControl().GetBackgroundColor(); +} + +result +_GalleryRootCanvas::SetBounds(const FloatRectangle& bounds) +{ + if (GetBounds() == bounds) + { + return E_SUCCESS; + } + + return GetControl().SetBounds(bounds); +} + +FloatRectangle +_GalleryRootCanvas::GetBounds(void) const +{ + return GetControl().GetBoundsF(); +} + +FloatDimension +_GalleryRootCanvas::GetControlSize(void) const +{ + return GetControl().GetSizeF(); +} + +result +_GalleryRootCanvas::SetVisibility(bool visibility) +{ + if (IsVisibility() == visibility) + { + return E_SUCCESS; + } + + GetControl().SetVisibleState(visibility); + + return E_SUCCESS; +} + +bool +_GalleryRootCanvas::IsVisibility(void) const +{ + return GetControl().GetVisibleState(); +} + +result +_GalleryRootCanvas::AddChildCanvas(_GalleryCanvas& canvas) +{ + _VisualElement& childVisualElement = canvas.GetFrameVisualElement(); + _VisualElement* pRootVisualElement = GetImageVisualElement(); + SysTryReturn(NID_UI_CTRL, pRootVisualElement != null, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Root VisualElement is null."); + + result r = pRootVisualElement->AttachChild(childVisualElement); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + canvas.SetRootCanvas(*this); + + return E_SUCCESS; +} + +result +_GalleryRootCanvas::RemoveChildCanvas(_GalleryCanvas& canvas) +{ + _VisualElement& childVisualElement = canvas.GetFrameVisualElement(); + _VisualElement* pRootVisualElement = GetImageVisualElement(); + SysTryReturn(NID_UI_CTRL, pRootVisualElement != null, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Root VisualElement is null."); + + result r = pRootVisualElement->DetachChild(childVisualElement); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +_GalleryRootCanvas::RefreshCanvas(void) +{ + GetControl().Invalidate(); + return E_SUCCESS; +} + +_GalleryRootCanvas::_GalleryRootCanvas(_Control& control) + : __pControl(null) + , __bounds(0, 0, 0, 0) + , __pBackgroundImage(null) + , __needUpdateBackgroundImage(false) +{ + SetControl(control); +} + +_GalleryRootCanvas::~_GalleryRootCanvas(void) +{ + // Do nothing +} + +void +_GalleryRootCanvas::SetControl(_Control& control) +{ + __pControl = &control; + return; +} + +_Control& +_GalleryRootCanvas::GetControl(void) const +{ + return *__pControl; +} + +_VisualElement* +_GalleryRootCanvas::GetImageVisualElement(void) const +{ + return GetControl().GetVisualElement(); +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_GalleryCanvasManager.cpp b/src/ui/controls/FUiCtrl_GalleryCanvasManager.cpp new file mode 100644 index 0000000..ed0e21d --- /dev/null +++ b/src/ui/controls/FUiCtrl_GalleryCanvasManager.cpp @@ -0,0 +1,309 @@ +// +// 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. +// +#include +#include +#include +#include "FUi_Control.h" +#include "FUiCtrl_GalleryCanvasManager.h" +#include "FUiCtrl_GalleryCanvas.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; + +namespace Tizen { namespace Ui { namespace Controls { + +_GalleryCanvasManager* +_GalleryCanvasManager::CreateCanvasManagerN(_Control& control, int initialCanvasCount, + FloatRectangle& initialCanvasBounds, _GalleryAnimationProvider* pVEDelegator) +{ + result r = E_SUCCESS; + + _GalleryCanvasManager* pCanvasManager = new (std::nothrow) _GalleryCanvasManager(); + SysTryCatch(NID_UI_CTRL, pCanvasManager != null, , E_OUT_OF_MEMORY, + "[E_OUT_OF_MEMORY] Failed to allocate the memory for the _GalleryCanvasManager."); + + r = pCanvasManager->Construct(control, initialCanvasCount, initialCanvasBounds); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pCanvasManager->SetAnimationDelegator(*pVEDelegator); + + SetLastResult(E_SUCCESS); + + return pCanvasManager; + +CATCH: + delete pCanvasManager; + + return null; +} + +result +_GalleryCanvasManager::ResetCanvasManager(int canvasCount, FloatRectangle& canvasBounds) +{ + SysTryReturn(NID_UI_CTRL, canvasCount >= 0, E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] The maxCount parameter is invalid."); + + result r = RemoveAllCanvas(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __canvasArray.SetCapacity(canvasCount); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + for (int i = 0; i < GetCanvasCount(); i++) + { + _GalleryCanvas* pCanvas = _GalleryCanvas::CreateGalleryCanvasN(canvasBounds); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, pCanvas != null, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __canvasArray.Add(*pCanvas); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GetRootCanvas().AddChildCanvas(*pCanvas); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pCanvas->SetAnimationDelegator(__pVEDelegator); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pCanvas->SetBounds(canvasBounds); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + return E_SUCCESS; + +CATCH: + __canvasArray.RemoveAll(true); + + return r; +} + +int +_GalleryCanvasManager::GetCanvasCount(void) const +{ + return __canvasArray.GetCapacity(); +} + +_GalleryRootCanvas& +_GalleryCanvasManager::GetRootCanvas(void) const +{ + if (__pRootCanvas == null) + { + //SysLog(NID_UI_CTRL, "[Assertion] The _GalleryRootCanvas is null"); + SysAssert(false); + } + + return *__pRootCanvas; +} + +_GalleryCanvas* +_GalleryCanvasManager::GetCanvas(int canvasIndex) const +{ + SysTryReturn(NID_UI_CTRL, (canvasIndex >= 0 && canvasIndex < GetCanvasCount()), null, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] The canvasIndex is out of range."); + + _GalleryCanvas* pCanvas = dynamic_cast<_GalleryCanvas*>(const_cast(__canvasArray.GetAt(canvasIndex))); + SysTryReturn(NID_UI_CTRL, pCanvas != null, null, E_INVALID_STATE, + "[E_INVALID_STATE] The _GalleryCanvasArray is in an invalid state."); + + return pCanvas; +} + +result +_GalleryCanvasManager::ReleaseAllCanvasResource(void) +{ + __canvasArray.RemoveAll(true); + + return E_SUCCESS; +} + +result +_GalleryCanvasManager::ResetAllCanvas(Tizen::Graphics::FloatRectangle& canvasBounds) +{ + _GalleryCanvas* pCanvas = null; + result r = E_SUCCESS; + int canvasCount = __canvasArray.GetCount(); + for (int i = 0; i < canvasCount - 1; i++) // last index is empty canvas index + { + pCanvas = GetCanvas(i); + if (pCanvas != null) + { + r = GetRootCanvas().RemoveChildCanvas(*pCanvas); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + + for (int i = 0; i < canvasCount - 1; i++) + { + r = __canvasArray.RemoveAt(0, true); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + for (int i = 0; i < canvasCount - 1; i++) // last index is empty canvas index + { + _GalleryCanvas* pCanvas = _GalleryCanvas::CreateGalleryCanvasN(canvasBounds); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, pCanvas != null, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __canvasArray.InsertAt(*pCanvas, i); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GetRootCanvas().AddChildCanvas(*pCanvas); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pCanvas->SetAnimationDelegator(__pVEDelegator); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pCanvas->SetBounds(canvasBounds); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + return E_SUCCESS; + +CATCH: + __canvasArray.RemoveAll(true); + + return r; +} + +result +_GalleryCanvasManager::LoadAllCanvasImage(void) +{ + result r = E_SUCCESS; + for (int i = 0; i < GetCanvasCount(); i++) + { + _GalleryCanvas* pCanvas = dynamic_cast<_GalleryCanvas*>(__canvasArray.GetAt(i)); + SysTryReturn(NID_UI_CTRL, pCanvas != null, E_INVALID_STATE, E_INVALID_STATE, + "[E_INVALID_STATE] The _GalleryCanvasArray is in an invalid state."); + + r = pCanvas->LoadImage(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + return E_SUCCESS; +} + +_GalleryCanvasManager::_GalleryCanvasManager(void) + : __pControl(null) + , __pRootCanvas(null) + , __pVEDelegator(null) +{ + // Do nothing +} + +_GalleryCanvasManager::~_GalleryCanvasManager(void) +{ + result r = RemoveAllCanvas(); + delete __pRootCanvas; + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + + +result +_GalleryCanvasManager::Construct(_Control& control, int initialCanvasCount, FloatRectangle& initialCanvasBounds) +{ + result r = E_SUCCESS; + _GalleryRootCanvas* pRootCanvas = null; + + pRootCanvas = _GalleryRootCanvas::CreateGalleryRootCanvasN(control); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, pRootCanvas != null, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __canvasArray.Construct(initialCanvasCount); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + for (int i = 0; i < GetCanvasCount(); i++) + { + _GalleryCanvas* pCanvas = _GalleryCanvas::CreateGalleryCanvasN(initialCanvasBounds); + SysTryCatch(NID_UI_CTRL, pCanvas != null, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __canvasArray.Add(*pCanvas); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pRootCanvas->AddChildCanvas(*pCanvas); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pCanvas->SetAnimationDelegator(__pVEDelegator); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pCanvas->SetBounds(initialCanvasBounds); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + SetControl(control); + SetRootCanvas(*pRootCanvas); + + return E_SUCCESS; + +CATCH: + delete pRootCanvas; + __canvasArray.RemoveAll(true); + + return r; +} + +result +_GalleryCanvasManager::RemoveAllCanvas(void) +{ + _GalleryCanvas* pCanvas = null; + result r = E_SUCCESS; + for (int i = 0; i < __canvasArray.GetCount(); i++) + { + pCanvas = GetCanvas(i); + if (pCanvas != null) + { + r = GetRootCanvas().RemoveChildCanvas(*pCanvas); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + + __canvasArray.RemoveAll(true); + + return E_SUCCESS; +} + +void +_GalleryCanvasManager::SetControl(_Control& control) +{ + __pControl = &control; +} + +_Control& +_GalleryCanvasManager::GetControl(void) const +{ + return *__pControl; +} + +void +_GalleryCanvasManager::SetRootCanvas(_GalleryRootCanvas& rootCanvas) +{ + __pRootCanvas = &rootCanvas; +} + +void +_GalleryCanvasManager::SetAnimationDelegator(_GalleryAnimationProvider& pVEDelegator) +{ + __pVEDelegator = &pVEDelegator; +} + +_GalleryAnimationProvider& +_GalleryCanvasManager::GetAnimationDelegator(void) const +{ + return *__pVEDelegator; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_GalleryCoreEvent.cpp b/src/ui/controls/FUiCtrl_GalleryCoreEvent.cpp new file mode 100644 index 0000000..a53227c --- /dev/null +++ b/src/ui/controls/FUiCtrl_GalleryCoreEvent.cpp @@ -0,0 +1,67 @@ +// +// 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. +// +#include +#include +#include "FUiCtrl_GalleryCoreEvent.h" +#include "FUiCtrl_GalleryCoreEventArg.h" +#include "FUiCtrl_IGalleryCoreEventListener.h" +#include "FUiCtrl_GalleryItem.h" + +using namespace Tizen::Base::Runtime; + +namespace Tizen { namespace Ui { namespace Controls { + +_GalleryCoreEvent::_GalleryCoreEvent(void) +{ + // Do nothing +} + +_GalleryCoreEvent::~_GalleryCoreEvent(void) +{ + // Do nothing +} + +void +_GalleryCoreEvent::FireImpl(IEventListener& listener, const IEventArg& arg) +{ + _IGalleryCoreEventListener* pGalleryEventListener = dynamic_cast<_IGalleryCoreEventListener*>(&listener); + SysTryReturnVoidResult(NID_UI_CTRL, pGalleryEventListener != null, E_INVALID_ARG, + "[E_INVALID_ARG] listener is invalid listener type."); + + const _GalleryCoreEventArg& galleryArg = static_cast(arg); + + switch (galleryArg.GetEventType()) + { + case GALLERY_CORE_EVENT_CURRENT_ITEM_CHANGED: + pGalleryEventListener->OnCurrentItemChanged(galleryArg.GetArg1()); + break; + case GALLERY_CORE_EVENT_ITEM_CLICKED: + pGalleryEventListener->OnItemClicked(galleryArg.GetArg1()); + break; + case GALLERY_CORE_EVENT_SLIDE_SHOW_STARTED: + pGalleryEventListener->OnSlideShowStarted(); + break; + case GALLERY_CORE_EVENT_SLIDE_SHOW_STOPPED: + pGalleryEventListener->OnSlideShowStopped(); + break; + default: + SysTryReturnVoidResult(NID_UI_CTRL, false, E_INVALID_ARG, "[E_INVALID_ARG] The event type is invalid type."); + break; + } +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_GalleryCoreEventArg.cpp b/src/ui/controls/FUiCtrl_GalleryCoreEventArg.cpp new file mode 100644 index 0000000..a93dc9d --- /dev/null +++ b/src/ui/controls/FUiCtrl_GalleryCoreEventArg.cpp @@ -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. +// +#include "FUiCtrl_GalleryCoreEventArg.h" +#include "FUiCtrl_GalleryItem.h" + +namespace Tizen { namespace Ui { namespace Controls { + +_GalleryCoreEventArg::_GalleryCoreEventArg(_GalleryCoreEventType eventType, int arg1, _GalleryItem** arg2, bool arg3) + : __arg1(arg1) + , __ppArg2(arg2) + , __arg3(arg3) + , __eventType(eventType) +{ + // Do nothing +} + +_GalleryCoreEventArg::~_GalleryCoreEventArg(void) +{ + // Do nothing +} + +int& +_GalleryCoreEventArg::GetArg1(void) const +{ + return const_cast(__arg1); +} + +_GalleryItem** +_GalleryCoreEventArg::GetArg2(void) const +{ + return __ppArg2; +} + +bool& +_GalleryCoreEventArg::GetArg3(void) const +{ + return const_cast(__arg3); +} + +_GalleryCoreEventType +_GalleryCoreEventArg::GetEventType(void) const +{ + return __eventType; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_GalleryCoreEventListener.cpp b/src/ui/controls/FUiCtrl_GalleryCoreEventListener.cpp new file mode 100644 index 0000000..5aafac2 --- /dev/null +++ b/src/ui/controls/FUiCtrl_GalleryCoreEventListener.cpp @@ -0,0 +1,77 @@ +// +// 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. +// +#include +#include +#include +#include +#include "FUiCtrl_GalleryCoreEventListener.h" +#include "FUiCtrl_GalleryImplEvent.h" +#include "FUiCtrl_GalleryImplEventArg.h" +#include "FUiCtrl_GalleryItemImpl.h" +#include "FUiCtrl_GalleryItem.h" + +namespace Tizen { namespace Ui { namespace Controls { + +_GalleryCoreEventListener::_GalleryCoreEventListener(_GalleryImplEvent& implEvent) + : __pItemProvider(null) + , __implEvent(implEvent) +{ + // Do nothing +} + +_GalleryCoreEventListener::~_GalleryCoreEventListener(void) +{ + // Do nothing +} + +void +_GalleryCoreEventListener::OnCurrentItemChanged(int currentIndex) +{ + _GalleryImplEventArg* pEventArg = new (std::nothrow) _GalleryImplEventArg(GALLERY_EVENT_CURRENT_ITEM_CHANGED, currentIndex); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + __implEvent.Fire(*pEventArg); +} + +void +_GalleryCoreEventListener::OnItemClicked(int itemIndex) +{ + _GalleryImplEventArg* pEventArg = new (std::nothrow) _GalleryImplEventArg(GALLERY_EVENT_ITEM_CLICKED, itemIndex); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + __implEvent.Fire(*pEventArg); +} + +void +_GalleryCoreEventListener::OnSlideShowStarted(void) +{ + _GalleryImplEventArg* pEventArg = new (std::nothrow) _GalleryImplEventArg(GALLERY_EVENT_SLIDE_SHOW_STARTED); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + __implEvent.Fire(*pEventArg); +} + +void +_GalleryCoreEventListener::OnSlideShowStopped(void) +{ + _GalleryImplEventArg* pEventArg = new (std::nothrow) _GalleryImplEventArg(GALLERY_EVENT_SLIDE_SHOW_STOPPED); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + __implEvent.Fire(*pEventArg); +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_GalleryImageReader.cpp b/src/ui/controls/FUiCtrl_GalleryImageReader.cpp new file mode 100644 index 0000000..2e3f3a2 --- /dev/null +++ b/src/ui/controls/FUiCtrl_GalleryImageReader.cpp @@ -0,0 +1,180 @@ +// +// 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. +// +#include +#include +#include +#include +#include +#include +#include +#include "FUiCtrl_GalleryImageReader.h" +#include "FUiCtrl_GalleryBitmap.h" +#include "FUiCtrl_GalleryModel.h" +#include "FUiCtrl_GalleryItem.h" + + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Media; + +namespace Tizen { namespace Ui { namespace Controls { + +_GalleryImageReader::_GalleryImageReader(_GalleryModel& galleryModel) + : __galleryModel(galleryModel) + , __pTmpFileBitmap(null) + , __currentLoadBitmapIndex(-1) + , __currentLoadBitmapSize(0, 0) +{ + // Do nothing +} + +_GalleryImageReader::~_GalleryImageReader(void) +{ + delete __pTmpFileBitmap; +} + +_GalleryBitmap* +_GalleryImageReader::GetPartialImageFromFileN(int index, + const FloatRectangle& partialBounds, const FloatDimension& imageSize) const +{ + SysTryReturn(NID_UI_CTRL, index >= 0, null, E_INVALID_ARG, "[E_INVALID_ARG] The index argument is negative value."); + SysTryReturn(NID_UI_CTRL, index < __galleryModel.GetItemCount(), null, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] The index argument is out of range"); + + if (__currentLoadBitmapIndex != index || __currentLoadBitmapSize != imageSize) + { + const_cast<_GalleryImageReader*>(this)->LoadPartialImageFromFile(index, imageSize); + } + + _GalleryBitmap* pPartialGalleryBitmap = null; + Bitmap* pPartialBitmap = new(std::nothrow) Bitmap(); + SysTryReturn(NID_UI_CTRL, pPartialBitmap != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + result r = pPartialBitmap->Construct(*__pTmpFileBitmap, partialBounds); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pPartialGalleryBitmap = _GalleryBitmap::CreateGalleryBitmapN(pPartialBitmap); + SysTryCatch(NID_UI_CTRL, pPartialGalleryBitmap != null, , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + SetLastResult(E_SUCCESS); + delete pPartialBitmap; + + return pPartialGalleryBitmap; + +CATCH: + //delete pPartialGalleryBitmap; + delete pPartialBitmap; + + return null; +} + +_GalleryBitmap* +_GalleryImageReader::GetItemImage(int index) const +{ + SysTryReturn(NID_UI_CTRL, index >= 0, null, E_INVALID_ARG, "[E_INVALID_ARG] The index argument is negative value."); + SysTryReturn(NID_UI_CTRL, index < __galleryModel.GetItemCount(), null, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The index argument is out of range."); + + _GalleryItem* pItem = __galleryModel.GetItem(index); + SysTryReturn(NID_UI_CTRL, pItem != null, null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + return pItem->GetGalleryItemImage(); +} + +void +_GalleryImageReader::LoadPartialImageFromFile(int index, const FloatDimension& imageSize) +{ + _GalleryBitmap* pPartialGalleryBitmap = null; + Dimension bitmapSize; + ByteBuffer* pBuffer = null; + MediaPixelFormat mediaPixelFormat = MEDIA_PIXEL_FORMAT_NONE; + result r = E_SUCCESS; + + _GalleryItem* pItem = __galleryModel.GetItem(index); + SysTryCatch(NID_UI_CTRL, pItem != null, , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + if (pItem->GetGalleryItemImage() == null) + { + SysTryCatch(NID_UI_CTRL, false, , E_SYSTEM, "[E_SYSTEM] The gallery bitmap not exist."); + } + + switch (pItem->GetGalleryItemImage()->GetInternalBitmap()->GetPixelColorFormat()) + { + case BITMAP_PIXEL_FORMAT_RGB565: + mediaPixelFormat = MEDIA_PIXEL_FORMAT_RGB565LE; + break; + case BITMAP_PIXEL_FORMAT_ARGB8888: + mediaPixelFormat = MEDIA_PIXEL_FORMAT_BGRA8888; + break; + case BITMAP_PIXEL_FORMAT_R8G8B8A8: + mediaPixelFormat = MEDIA_PIXEL_FORMAT_RGBA8888; + break; + default: + SysAssert(false); + break; + } + + pBuffer = _ImageDecoder::DecodeToBufferN(pItem->GetGalleryItemFilePath(), mediaPixelFormat, bitmapSize.width, bitmapSize.height, true); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + delete __pTmpFileBitmap; + __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,) + //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)); + + r = __pTmpFileBitmap->Scale(imageSize); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pPartialGalleryBitmap = _GalleryBitmap::CreateGalleryBitmapN(__pTmpFileBitmap); + SysTryCatch(NID_UI_CTRL, pPartialGalleryBitmap != null, , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + pPartialGalleryBitmap->SetBitmapRotation(pItem->GetGalleryRotation()); + + r = pPartialGalleryBitmap->Initialize(imageSize, GALLERY_FITTING_TYPE_FIT); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + delete __pTmpFileBitmap; + __pTmpFileBitmap = _BitmapImpl::CloneN(*pPartialGalleryBitmap->GetInternalBitmap()); + SysTryCatch(NID_UI_CTRL, __pTmpFileBitmap != null, , r, "[%s] Propagating.", GetErrorMessage(r)); + + SetLastResult(E_SUCCESS); + + __currentLoadBitmapIndex = index; + __currentLoadBitmapSize = imageSize; + + delete pBuffer; + delete pPartialGalleryBitmap; + return; + +CATCH: + delete pBuffer; + delete __pTmpFileBitmap; + __pTmpFileBitmap = null; + delete pPartialGalleryBitmap; +} + +void +_GalleryImageReader::ResetLoadedPartialImageIndex(void) +{ + __currentLoadBitmapIndex = -1; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_GalleryImpl.cpp b/src/ui/controls/FUiCtrl_GalleryImpl.cpp new file mode 100644 index 0000000..4815cb0 --- /dev/null +++ b/src/ui/controls/FUiCtrl_GalleryImpl.cpp @@ -0,0 +1,554 @@ +// +// 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. +// +#include +#include +#include +#include +#include "FUi_UiBuilder.h" +#include "FUiCtrl_Gallery.h" +#include "FUiCtrl_GalleryImpl.h" +#include "FUiCtrl_GalleryBitmap.h" +#include "FUiCtrl_GalleryItemProviderAdaptorImpl.h" +#include "FUiCtrl_GalleryCoreEventListener.h" +#include "FUiCtrl_GalleryImplEvent.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Effects; + +namespace Tizen { namespace Ui { namespace Controls { + +namespace +{ + +_GallerySlideShowType +ConvertEnum(GalleryAnimation var) +{ + switch (var) + { + case GALLERY_ANIMATION_PAGE: + return GALLERY_SLIDESHOW_PAGE; + + case GALLERY_ANIMATION_DISSOLVE: + return GALLERY_SLIDESHOW_DISSOLVE; + + case GALLERY_ANIMATION_ZOOM: + return GALLERY_SLIDESHOW_ZOOM; + + default: + return (_GallerySlideShowType)-1; + } +} + +GalleryAnimation +ConvertEnum(_GallerySlideShowType var) +{ + switch (var) + { + case GALLERY_SLIDESHOW_PAGE: + return GALLERY_ANIMATION_PAGE; + + case GALLERY_SLIDESHOW_DISSOLVE: + return GALLERY_ANIMATION_DISSOLVE; + + case GALLERY_SLIDESHOW_ZOOM: + return GALLERY_ANIMATION_ZOOM; + + default: + return (GalleryAnimation)-1; + } +} + +} // unnamed namespace + +_GalleryImpl::_GalleryImpl(Gallery* pGallery, _Gallery* pCore, _GalleryImplEvent* pImplEvent, + _GalleryCoreEventListener* pCoreEventListener, _GalleryItemProviderAdaptorImpl* pGalleryItemProviderAdaptor) + : _ControlImpl(pGallery, pCore) + , __pImplEvent(pImplEvent) + , __pCoreEventListener(pCoreEventListener) + , __pGalleryItemProviderAdaptor(pGalleryItemProviderAdaptor) +{ +} + +_GalleryImpl::~_GalleryImpl(void) +{ + RequestToUnloadAllItems(); + + delete __pImplEvent; + delete __pCoreEventListener; + delete __pGalleryItemProviderAdaptor; +} + +_GalleryImpl* +_GalleryImpl::CreateGalleryImplN(Gallery* pGallery) +{ + SysTryReturn(NID_UI_CTRL, pGallery != null, null, E_INVALID_ARG, "[E_INVALID_ARG] pGallery is null."); + + _GalleryCoreEventListener* pCoreEventListener = null; + _GalleryItemProviderAdaptorImpl* pGalleryItemProviderAdaptor = null; + _Gallery* pCore = null; + _GalleryImpl* pImpl = null; + result r = E_SUCCESS; + + _GalleryImplEvent* pImplEvent = new (std::nothrow) _GalleryImplEvent(); + SysTryCatch(NID_UI_CTRL, pImplEvent != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pCoreEventListener = new (std::nothrow) _GalleryCoreEventListener(*pImplEvent); + SysTryCatch(NID_UI_CTRL, pCoreEventListener != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pGalleryItemProviderAdaptor = new (std::nothrow) _GalleryItemProviderAdaptorImpl(); + SysTryCatch(NID_UI_CTRL, pGalleryItemProviderAdaptor != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pCore = _Gallery::CreateGalleryN(pGalleryItemProviderAdaptor); + SysTryCatch(NID_UI_CTRL, pCore != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = pCore->SetCoreEventListener(*pCoreEventListener); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pImpl = new (std::nothrow) _GalleryImpl(pGallery, pCore, pImplEvent, pCoreEventListener, pGalleryItemProviderAdaptor); + SysTryCatch(NID_UI_CTRL, pImpl != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + //pCore = null; + + SetLastResult(E_SUCCESS); + return pImpl; + +CATCH: + delete pCoreEventListener; + delete pImplEvent; + delete pCore; + //delete pImpl; + + return null; +} + +const char* +_GalleryImpl::GetPublicClassName(void) const +{ + return "Control::Gallery"; +} + +const Gallery& +_GalleryImpl::GetPublic(void) const +{ + return static_cast(_ControlImpl::GetPublic()); +} + +Gallery& +_GalleryImpl::GetPublic(void) +{ + return static_cast(_ControlImpl::GetPublic()); +} + +const _Gallery& +_GalleryImpl::GetCore(void) const +{ + return static_cast(_ControlImpl::GetCore()); +} + +_Gallery& +_GalleryImpl::GetCore(void) +{ + return static_cast<_Gallery&>(_ControlImpl::GetCore()); +} + +void +_GalleryImpl::AddGalleryEventListener(IGalleryEventListener& listener) +{ + result r = __pImplEvent->AddListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + SetLastResult(E_SUCCESS); +} + +void +_GalleryImpl::RemoveGalleryEventListener(IGalleryEventListener& listener) +{ + result r = __pImplEvent->RemoveListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + SetLastResult(E_SUCCESS); +} + +result +_GalleryImpl::SetItemProvider(IGalleryItemProvider& provider) +{ + __pGalleryItemProviderAdaptor->SetGalleryItemProvider(provider); + + return GetCore().RequestToUpdateAllItems(); +} + +result +_GalleryImpl::SetCurrentItemIndex(int index) +{ + SysTryReturn(NID_UI_CTRL, __pGalleryItemProviderAdaptor->HasGalleryItemProvider() == true, E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Item provider is null"); + + return GetCore().SetCurrentItemIndex(index); +} + +int +_GalleryImpl::GetCurrentItemIndex(void) const +{ + return GetCore().GetCurrentItemIndex(); +} + +result +_GalleryImpl::SetZoomingEnabled(bool enable) +{ + return GetCore().SetZoomingEnabled(enable); +} + +bool +_GalleryImpl::IsZoomingEnabled(void) const +{ + return GetCore().IsZoomingEnabled(); +} + +result +_GalleryImpl::SetTextOfEmptyGallery(const String& text) +{ + return GetCore().SetTextOfEmptyGallery(text); +} + +String +_GalleryImpl::GetTextOfEmptyGallery(void) const +{ + return GetCore().GetTextOfEmptyGallery(); +} + +result +_GalleryImpl::SetBitmapOfEmptyGallery(const Bitmap* pBitmap) +{ + _GalleryBitmap* pGalleryBitmap = _GalleryBitmap::CreateGalleryBitmapN(const_cast(pBitmap)); + SysTryReturn(NID_UI_CTRL, pGalleryBitmap != null, GetLastResult(), GetLastResult(), + "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + return GetCore().SetBitmapOfEmptyGallery(pGalleryBitmap); +} + +result +_GalleryImpl::SetSlideShowAnimation(GalleryAnimation animation) +{ + _GallerySlideShowType slideShowType = ConvertEnum(animation); + + SysTryReturn(NID_UI_CTRL, slideShowType != -1, E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] The animation argument(%d) is invalid argument.", animation); + + return GetCore().SetSlideShowType(slideShowType); +} + +GalleryAnimation +_GalleryImpl::GetSlideShowAnimation(void) const +{ + return ConvertEnum(GetCore().GetSlideShowType()); +} + +result +_GalleryImpl::SetSlideShowAnimationDuration(int duration) +{ + return GetCore().SetSlideShowAnimationDuration(duration); +} + +int +_GalleryImpl::GetSlideShowAnimationDuration(void) const +{ + return GetCore().GetSlideShowAnimationDuration(); +} + +result +_GalleryImpl::SetSlideShowViewDuration(int duration) +{ + return GetCore().SetSlideShowViewDuration(duration); +} + +int +_GalleryImpl::GetSlideShowViewDuration(void) const +{ + return GetCore().GetSlideShowViewDuration(); +} + +result +_GalleryImpl::StartSlideShow(bool repeat) +{ + return GetCore().StartSlideShow(repeat); +} + +result +_GalleryImpl::StopSlideShow(void) const +{ + _Gallery* pCore = const_cast<_Gallery*>(&GetCore()); // ??? + + return pCore->StopSlideShow(); +} + +bool +_GalleryImpl::IsSlideShowStarted(void) const +{ + return GetCore().IsSlideShowStarted(); +} + +int +_GalleryImpl::GetItemCount(void) const +{ + return GetCore().GetItemCount(); +} + +result +_GalleryImpl::RefreshGallery(int itemIndex, GalleryRefreshType type) +{ + SysTryReturn(NID_UI_CTRL, __pGalleryItemProviderAdaptor->HasGalleryItemProvider() == true, E_INVALID_OPERATION, E_INVALID_OPERATION, + "[E_INVALID_OPERATION] Item provider is null"); + + switch (type) + { + case GALLERY_REFRESH_TYPE_ITEM_ADD: + return GetCore().RequestToLoadItem(itemIndex); + case GALLERY_REFRESH_TYPE_ITEM_REMOVE: + return GetCore().RequestToUnloadItem(itemIndex); + case GALLERY_REFRESH_TYPE_ITEM_MODIFY: + return GetCore().RequestToUpdateItem(itemIndex); + default: + SysTryReturn(NID_UI_CTRL, false, E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] The refresh type(%d) is invalid type.", type); + break; + } + + return E_SUCCESS; +} + +result +_GalleryImpl::UpdateGallery(void) +{ + SysTryReturn(NID_UI_CTRL, __pGalleryItemProviderAdaptor->HasGalleryItemProvider() == true, E_INVALID_OPERATION, E_INVALID_OPERATION, + "[E_INVALID_OPERATION] Item provider is null"); + + result r = GetCore().RequestToUpdateAllItems(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +void +_GalleryImpl::RequestToUnloadAllItems(void) +{ + result r = GetCore().RequestToUnloadAllItems(); + SysAssert(r == E_SUCCESS); +} + +void +_GalleryImpl::SetEffect(Effect* pEffect) +{ + GetCore().SetEffect(pEffect); +} + +Effect* +_GalleryImpl::GetEffect(void) +{ + return GetCore().GetEffect(); +} + +_GalleryImpl* +_GalleryImpl::GetInstance(Gallery& gallery) +{ + return static_cast<_GalleryImpl*> (gallery._pControlImpl); +} + +const _GalleryImpl* +_GalleryImpl::GetInstance(const Gallery& gallery) +{ + return static_cast (gallery._pControlImpl); +} + +// Ui Builder +class _GalleryMaker + : public _UiBuilderControlMaker +{ +public: + _GalleryMaker(_UiBuilder* uibuilder) + : _UiBuilderControlMaker(uibuilder) {}; + virtual ~_GalleryMaker() {}; + static _UiBuilderControlMaker* + GetInstance(_UiBuilder* uibuilder) + { + _GalleryMaker* pListViewMaker = new (std::nothrow) _GalleryMaker(uibuilder); + return pListViewMaker; + }; +protected: + virtual Control* + Make(_UiBuilderControl* pControl) + { + result r = E_SYSTEM; + _UiBuilderControlLayout* pControlProperty = null; + Gallery* pGallery = null; + FloatRectangle rect; + Tizen::Base::String elementString; + int currentIndex = 0; + int duration = 0; + Color color; + bool isZoomingEnabled = true; + + GetProperty(pControl, &pControlProperty); + if (pControlProperty == null) + { + return null; + } + + pGallery = new (std::nothrow) Gallery(); + if (pGallery == null) + { + return null; + } + + rect = pControlProperty->GetRectF(); + //Construct + r = pGallery->Construct(rect); + if (r != E_SUCCESS) + { + delete pGallery; + return null; + } + + if (pControl->GetElement(L"backgroundColor", elementString) || pControl->GetElement(L"BGColor", elementString)) + { + ConvertStringToColor32(elementString, 100, color); + r = pGallery->SetBackgroundColor(color); + if (r != E_SUCCESS) + { + delete pGallery; + return null; + } + } + + if (pControl->GetElement(L"bitmapPathOfEmptyGallery", elementString)) + { + Bitmap* pBackgroundBitmap = null; + pBackgroundBitmap = LoadBitmapN(elementString); //__image->DecodeN(path,BITMAP_PIXEL_FORMAT_RGB565); + if (pBackgroundBitmap != null) + { + r = pGallery->SetBitmapOfEmptyGallery(pBackgroundBitmap); + if (r != E_SUCCESS) + { + delete pBackgroundBitmap; + delete pGallery; + return null; + } + delete pBackgroundBitmap; + } + } + + if (pControl->GetElement(L"currentItemIndex", elementString)) + { + Base::Integer::Parse(elementString, currentIndex); + r = pGallery->SetCurrentItemIndex(currentIndex); + if (r != E_SUCCESS) + { + delete pGallery; + return null; + } + } + + if (pControl->GetElement(L"slideShowAnimation", elementString)) + { + GalleryAnimation animation = GALLERY_ANIMATION_DISSOLVE; + if (elementString.Equals(L"GALLERY_ANIMATION_PAGE", false)) + { + animation = GALLERY_ANIMATION_PAGE; + } + else if (elementString.Equals(L"GALLERY_ANIMATION_ZOOM", false)) + { + animation = GALLERY_ANIMATION_ZOOM; + } + + r = pGallery->SetSlideShowAnimation(animation); + if (r != E_SUCCESS) + { + delete pGallery; + return null; + } + } + + if (pControl->GetElement(L"slideShowAnimationDuration", elementString)) + { + Base::Integer::Parse(elementString, duration); + r = pGallery->SetSlideShowAnimationDuration(duration); + if (r != E_SUCCESS) + { + delete pGallery; + return null; + } + } + + if (pControl->GetElement(L"slideShowViewDuration", elementString)) + { + Base::Integer::Parse(elementString, duration); + r = pGallery->SetSlideShowViewDuration(duration); + if (r != E_SUCCESS) + { + delete pGallery; + return null; + } + } + + if (pControl->GetElement(L"textOfEmptyGallery", elementString)) + { + r = pGallery->SetTextOfEmptyGallery(elementString); + if (r != E_SUCCESS) + { + delete pGallery; + return null; + } + } + + if (pControl->GetElement(L"zoomingEnabled", elementString)) + { + { + if (elementString.Equals(L"true", false)) + { + isZoomingEnabled = true; + } + else + { + isZoomingEnabled = false; + } + } + r = pGallery->SetZoomingEnabled(isZoomingEnabled); + if (r != E_SUCCESS) + { + delete pGallery; + return null; + } + } + + return pGallery; + } + +private: +}; + +_GalleryRegister::_GalleryRegister(void) +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->RegisterControl(L"Gallery", _GalleryMaker::GetInstance); +} +_GalleryRegister::~_GalleryRegister(void) +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->UnregisterControl(L"Gallery"); +} +static _GalleryRegister GalleryRegisterToUiBuilder; +}}} // Controls diff --git a/src/ui/controls/FUiCtrl_GalleryImplEvent.cpp b/src/ui/controls/FUiCtrl_GalleryImplEvent.cpp new file mode 100644 index 0000000..b9ad15d --- /dev/null +++ b/src/ui/controls/FUiCtrl_GalleryImplEvent.cpp @@ -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. +// +#include +#include +#include "FUiCtrl_GalleryImplEvent.h" +#include "FUiCtrl_GalleryImplEventArg.h" + +using namespace Tizen::Base::Runtime; + +namespace Tizen { namespace Ui { namespace Controls { + +_GalleryImplEvent::_GalleryImplEvent(void) + : __pSource(null) +{ + // Do nothing +} + +_GalleryImplEvent::~_GalleryImplEvent(void) +{ + // Do nothing +} + +result +_GalleryImplEvent::Construct(Gallery* pSource) +{ + __pSource = pSource; + + return E_SUCCESS; +} + +void +_GalleryImplEvent::FireImpl(IEventListener& listener, const IEventArg& arg) +{ + IGalleryEventListener* pGalleryEventListener = dynamic_cast(&listener); + SysTryReturnVoidResult(NID_UI_CTRL, pGalleryEventListener != null, E_INVALID_ARG, + "[E_INVALID_ARG] pListener is invalid listener type."); + + const _GalleryImplEventArg& galleryArg = static_cast(arg); + + switch (galleryArg.GetEventType()) + { + case GALLERY_EVENT_CURRENT_ITEM_CHANGED: + pGalleryEventListener->OnGalleryCurrentItemChanged(*__pSource, galleryArg.GetArg1()); + break; + case GALLERY_EVENT_ITEM_CLICKED: + pGalleryEventListener->OnGalleryItemClicked(*__pSource, galleryArg.GetArg1()); + break; + case GALLERY_EVENT_SLIDE_SHOW_STARTED: + pGalleryEventListener->OnGallerySlideShowStarted(*__pSource); + break; + case GALLERY_EVENT_SLIDE_SHOW_STOPPED: + pGalleryEventListener->OnGallerySlideShowStopped(*__pSource); + break; + default: + SysTryReturnVoidResult(NID_UI_CTRL, false, E_INVALID_ARG, "[E_INVALIDE_ARG] The event type is invalid type."); + break; + } +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_GalleryImplEventArg.cpp b/src/ui/controls/FUiCtrl_GalleryImplEventArg.cpp new file mode 100644 index 0000000..c5197f7 --- /dev/null +++ b/src/ui/controls/FUiCtrl_GalleryImplEventArg.cpp @@ -0,0 +1,45 @@ +// +// 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. +// +#include "FUiCtrl_GalleryImplEventArg.h" + +namespace Tizen { namespace Ui { namespace Controls { + +_GalleryImplEventArg::_GalleryImplEventArg(_GalleryEventType eventType, int arg1) + : __arg1(arg1) + , __eventType(eventType) +{ + // Do nothing +} + +_GalleryImplEventArg::~_GalleryImplEventArg(void) +{ + // Do nothing +} + +int +_GalleryImplEventArg::GetArg1(void) const +{ + return __arg1; +} + +_GalleryEventType +_GalleryImplEventArg::GetEventType(void) const +{ + return __eventType; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_GalleryItem.cpp b/src/ui/controls/FUiCtrl_GalleryItem.cpp new file mode 100644 index 0000000..8832a9b --- /dev/null +++ b/src/ui/controls/FUiCtrl_GalleryItem.cpp @@ -0,0 +1,91 @@ +// +// 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. +// +#include +#include "FUiCtrl_GalleryItem.h" +#include "FUiCtrl_GalleryBitmap.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls { + +_GalleryItem::_GalleryItem(_GalleryBitmap* pImage, String imageFilePath, _GalleryImageRotation rotation) + : __pImage(pImage) + , __imageFilePath(imageFilePath) + , __rotation(rotation) + , __itemIndex(-1) +{ + // Do nothing +} + +_GalleryItem::~_GalleryItem(void) +{ + delete __pImage; + __pImage = null; +} + +void +_GalleryItem::SetGalleryItemImage(_GalleryBitmap* pImage) +{ + delete __pImage; + __pImage = pImage; +} + +_GalleryBitmap* +_GalleryItem::GetGalleryItemImage(void) const +{ + return __pImage; +} + +void +_GalleryItem::SetGalleryItemFilePath(String& filePath) +{ + __imageFilePath = filePath; +} + +String +_GalleryItem::GetGalleryItemFilePath(void) const +{ + return __imageFilePath; +} + +void +_GalleryItem::SetGalleryRotation(_GalleryImageRotation rotation) +{ + __rotation = rotation; +} + +_GalleryImageRotation +_GalleryItem::GetGalleryRotation(void) const +{ + return __rotation; +} + +void +_GalleryItem::SetItemIndex(int groupIndex, int itemIndex) +{ + __itemIndex = itemIndex; +} + +void +_GalleryItem::GetItemIndex(int& groupIndex, int& itemIndex) const +{ + groupIndex = 0; + itemIndex = __itemIndex; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_GalleryItemImpl.cpp b/src/ui/controls/FUiCtrl_GalleryItemImpl.cpp new file mode 100644 index 0000000..54604a0 --- /dev/null +++ b/src/ui/controls/FUiCtrl_GalleryItemImpl.cpp @@ -0,0 +1,118 @@ +// +// 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. +// +#include +#include +#include +#include +#include "FUiCtrl_GalleryItemImpl.h" +#include "FUiCtrl_GalleryItem.h" +#include "FUiCtrl_GalleryBitmap.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Base; + +namespace Tizen { namespace Ui { namespace Controls { + +_GalleryItemImpl::_GalleryItemImpl(GalleryItem* pPublicGalleryItem, _GalleryItem* pCoreGalleryItem) + : __pPublicGalleryItem(pPublicGalleryItem) + , __pCoreGalleryItem(pCoreGalleryItem) +{ + // Do nothing +} +_GalleryItemImpl::~_GalleryItemImpl(void) +{ + delete __pCoreGalleryItem; +} + +_GalleryItemImpl* +_GalleryItemImpl::CreateGalleryItemImplN(GalleryItem* pPubilcGalleryItem, const Bitmap& image, + GalleryImageRotation rotation, String filePath) +{ + SysTryReturn(NID_UI_CTRL, pPubilcGalleryItem != null, null, E_INVALID_ARG, + "[E_INVALID_ARG] The public gallery item argument is null."); + + _GalleryItem* pCoreGalleryItem = null; + _GalleryItemImpl* pImplGalleryItem = null; + _GalleryBitmap* pGalleryBitmap = null; + + pGalleryBitmap = _GalleryBitmap::CreateGalleryBitmapN(const_cast(&image)); + result r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, pGalleryBitmap != null, , GetLastResult(), "[%s] Propagating.", GetErrorMessage(r)); + + pGalleryBitmap->SetBitmapRotation(static_cast<_GalleryImageRotation>(rotation)); + + pCoreGalleryItem = new (std::nothrow) _GalleryItem(pGalleryBitmap, filePath, static_cast<_GalleryImageRotation>(rotation)); + SysTryCatch(NID_UI_CTRL, pCoreGalleryItem != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pImplGalleryItem = new (std::nothrow) _GalleryItemImpl(pPubilcGalleryItem, pCoreGalleryItem); + SysTryCatch(NID_UI_CTRL, pImplGalleryItem != null, pGalleryBitmap = null, E_OUT_OF_MEMORY, + "[E_OUT_OF_MEMORY] Memory allocation failed."); + + SetLastResult(E_SUCCESS); + + return pImplGalleryItem; +CATCH: + //delete pImplGalleryItem; + delete pCoreGalleryItem; + delete pGalleryBitmap; + + return null; +} + +const char* +_GalleryItemImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Controls::GalleryItem"; +} + +const GalleryItem& +_GalleryItemImpl::GetPublic(void) const +{ + return *__pPublicGalleryItem; +} + +GalleryItem& +_GalleryItemImpl::GetPublic(void) +{ + return *__pPublicGalleryItem; +} + +const _GalleryItem& +_GalleryItemImpl::GetCore(void) const +{ + return *__pCoreGalleryItem; +} + +_GalleryItem& +_GalleryItemImpl::GetCore(void) +{ + return *__pCoreGalleryItem; +} + +_GalleryItemImpl* +_GalleryItemImpl::GetInstance(GalleryItem& galleryItem) +{ + return static_cast<_GalleryItemImpl*> (galleryItem.__pImpl); +} + +const _GalleryItemImpl* +_GalleryItemImpl::GetInstance(const GalleryItem& galleryItem) +{ + return static_cast (galleryItem.__pImpl); +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_GalleryItemProvider.cpp b/src/ui/controls/FUiCtrl_GalleryItemProvider.cpp new file mode 100644 index 0000000..974f9c3 --- /dev/null +++ b/src/ui/controls/FUiCtrl_GalleryItemProvider.cpp @@ -0,0 +1,71 @@ +// +// 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. +// +#include +#include +#include +#include "FUiCtrl_GalleryItemProvider.h" +#include "FUiCtrl_GalleryCoreEvent.h" +#include "FUiCtrl_GalleryCoreEventArg.h" +#include "FUiCtrl_GalleryItem.h" +#include "FUiCtrl_GalleryItemProviderAdaptorImpl.h" +#include "FUiCtrl_GalleryBitmap.h" + +namespace Tizen { namespace Ui { namespace Controls { + +_GalleryItemProvider::_GalleryItemProvider(_GalleryCoreEvent& coreEvent, _GalleryItemProviderAdaptorImpl* pGalleryItemProviderAdaptor) + : __coreEvent(coreEvent) + , __pItemProviderAdaptor(pGalleryItemProviderAdaptor) +{ + // Do nothing. +} + +_GalleryItemProvider::~_GalleryItemProvider(void) +{ + // Do nothing. +} + +_GalleryItem* +_GalleryItemProvider::CreateItem(int index) +{ + _GalleryItem* pItem = __pItemProviderAdaptor->CreateItem(index); + + SetLastResult(E_SUCCESS); + return pItem; +} + +bool +_GalleryItemProvider::DeleteItem(int index, _GalleryItem* pItem) +{ + SetLastResult(E_SUCCESS); + return __pItemProviderAdaptor->DeleteItem(index, pItem); +} + +bool +_GalleryItemProvider::UnloadItem(int index, _GalleryItem* pItem) +{ + SetLastResult(E_SUCCESS); + return __pItemProviderAdaptor->UnloadItem(index, pItem); +} + +int +_GalleryItemProvider::GetItemCount(void) const +{ + SetLastResult(E_SUCCESS); + return __pItemProviderAdaptor->GetItemCount(); +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_GalleryItemProviderAdaptor.cpp b/src/ui/controls/FUiCtrl_GalleryItemProviderAdaptor.cpp new file mode 100644 index 0000000..0457460 --- /dev/null +++ b/src/ui/controls/FUiCtrl_GalleryItemProviderAdaptor.cpp @@ -0,0 +1,135 @@ +// +// 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. +// +#include +#include +#include +#include "FUiCtrl_GalleryItemProviderAdaptor.h" +#include "FUiCtrl_IGalleryItemProvider.h" +#include "FUiCtrl_GalleryItem.h" +#include "FUiCtrl_GalleryBitmap.h" + + +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls { + +_GalleryItemProviderAdaptor::_GalleryItemProviderAdaptor(_IGalleryItemProvider& itemProvider) + : __itemProvider(itemProvider) +{ + // Do nothing. +} + +_GalleryItemProviderAdaptor::~_GalleryItemProviderAdaptor(void) +{ + // Do nothing. +} + +result +_GalleryItemProviderAdaptor::SetGalleryItemProvider(_IGalleryItemProvider& itemProvider) +{ + __itemProvider = itemProvider; + + return E_SUCCESS; +} + +_IListItemCommon* +_GalleryItemProviderAdaptor::LoadItem(int groupIndex, int itemIndex) +{ + SysTryReturn(NID_UI_CTRL, itemIndex >= 0, null, E_INVALID_ARG, "[E_INVALID_ARG] Item index argument is negative."); + + _GalleryItem* pItem = __itemProvider.CreateItem(itemIndex); + SysTryReturn(NID_UI_CTRL, pItem != null, null, E_SYSTEM, "[E_SYSTEM] Did not create a GalleryItem"); + + SetLastResult(E_SUCCESS); + + return pItem; +} + +result +_GalleryItemProviderAdaptor::UnloadItem(_IListItemCommon* pItem, int groupIndex, int itemIndex) +{ + SysTryReturn(NID_UI_CTRL, pItem != null, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Gallery Item is null"); + SysTryReturn(NID_UI_CTRL, itemIndex >= 0, null, E_INVALID_ARG, "[E_INVALID_ARG] Item index is negative."); + //SysTryReturn(NID_UI_CTRL, itemIndex < GetItemCount(), null, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] Item index argument is out of range."); + + _GalleryItem* pGalleryItem = dynamic_cast<_GalleryItem*>(pItem); + SysTryReturn(NID_UI_CTRL, pGalleryItem != null, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] pItem is not a _GalleryItem object"); + + bool deleteSuccess = true; + if (pGalleryItem->GetAppInfo() != null) + { + deleteSuccess = __itemProvider.UnloadItem(itemIndex, pGalleryItem); + } + else + { + delete pGalleryItem; + } + + if (deleteSuccess == true) + { + return E_SUCCESS; + } + else if (GetLastResult() != E_SUCCESS) + { + return GetLastResult(); + } + else + { + return E_INVALID_STATE; + } +} + +int +_GalleryItemProviderAdaptor::GetItemCount(int groupIndex) const +{ + return __itemProvider.GetItemCount(); +} + +result +_GalleryItemProviderAdaptor::DeleteItem(_IListItemCommon* pItem, int groupIndex, int itemIndex) +{ + SysTryReturn(NID_UI_CTRL, pItem != null, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Gallery Item is null."); + SysTryReturn(NID_UI_CTRL, itemIndex >= 0, null, E_INVALID_ARG, "[E_INVALID_ARG] Item index is negative."); + + _GalleryItem* pGalleryItem = dynamic_cast<_GalleryItem*>(pItem); + SysTryReturn(NID_UI_CTRL, pGalleryItem != null, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] pItem is not a _GalleryItem object"); + + bool deleteSuccess = true; + if (pGalleryItem->GetAppInfo() != null) + { + deleteSuccess = __itemProvider.DeleteItem(itemIndex, pGalleryItem); + } + else + { + delete pGalleryItem; + } + + if (deleteSuccess == true) + { + return E_SUCCESS; + } + else if (GetLastResult() != E_SUCCESS) + { + return GetLastResult(); + } + else + { + return E_INVALID_STATE; + } +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_GalleryItemProviderAdaptorImpl.cpp b/src/ui/controls/FUiCtrl_GalleryItemProviderAdaptorImpl.cpp new file mode 100644 index 0000000..33e1382 --- /dev/null +++ b/src/ui/controls/FUiCtrl_GalleryItemProviderAdaptorImpl.cpp @@ -0,0 +1,114 @@ +// +// 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. +// +#include +#include +#include +#include +#include "FUiCtrl_GalleryItemProviderAdaptorImpl.h" +#include "FUiCtrl_GalleryItemImpl.h" +#include "FUiCtrl_GalleryItem.h" + +namespace Tizen { namespace Ui { namespace Controls { + +_GalleryItemProviderAdaptorImpl::_GalleryItemProviderAdaptorImpl(void) + : __pItemProvider(null) +{ + // Do nothing +} + +_GalleryItemProviderAdaptorImpl::~_GalleryItemProviderAdaptorImpl(void) +{ + // Do nothing +} + +void +_GalleryItemProviderAdaptorImpl::SetGalleryItemProvider(const IGalleryItemProvider& itemProvider) +{ + __pItemProvider = &const_cast(itemProvider); +} + +bool +_GalleryItemProviderAdaptorImpl::HasGalleryItemProvider(void) const +{ + return __pItemProvider != null ? true : false; +} + +_GalleryItem* +_GalleryItemProviderAdaptorImpl::CreateItem(int index) +{ + if (HasGalleryItemProvider() == false) + { + return null; + } + + GalleryItem* pPublicItem = __pItemProvider->CreateItem(index); + if (pPublicItem != null) + { + _GalleryItemImpl* pImplItem = _GalleryItemImpl::GetInstance(*pPublicItem); + SysTryReturn(NID_UI_CTRL, pImplItem != null, null, E_INVALID_STATE, "[E_INVALID_STATE] Gallery item impl is null."); + pImplItem->GetCore().SetAppInfo(pImplItem); + return &pImplItem->GetCore(); + } + + SetLastResult(E_SUCCESS); + return null; +} + +bool +_GalleryItemProviderAdaptorImpl::UnloadItem(int index, _GalleryItem* pItem) +{ + if (HasGalleryItemProvider() == false) + { + return true; + } + + SysTryReturn(NID_UI_CTRL, pItem != null, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The pItem is null."); + + _GalleryItemImpl* pImplItem = static_cast<_GalleryItemImpl*>(pItem->GetAppInfo()); + GalleryItem* pPublicItem = static_cast(&pImplItem->GetPublic()); + + SetLastResult(E_SUCCESS); + if (__pItemProvider->DeleteItem(index, pPublicItem) == false) + { + delete pPublicItem; + } + + return true; +} + +bool +_GalleryItemProviderAdaptorImpl::DeleteItem(int index, _GalleryItem* pItem) +{ + _GalleryItemImpl* pImplItem = static_cast<_GalleryItemImpl*>(pItem->GetAppInfo()); + GalleryItem* pPublicItem = &pImplItem->GetPublic(); + delete pPublicItem; + + SetLastResult(E_SUCCESS); + return true; +} + +int +_GalleryItemProviderAdaptorImpl::GetItemCount(void) const +{ + if (HasGalleryItemProvider() == false) + { + return 0; + } + return __pItemProvider->GetItemCount(); +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_GalleryModel.cpp b/src/ui/controls/FUiCtrl_GalleryModel.cpp new file mode 100644 index 0000000..6ee054c --- /dev/null +++ b/src/ui/controls/FUiCtrl_GalleryModel.cpp @@ -0,0 +1,217 @@ +// +// 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. +// +#include +#include "FUiCtrl_GalleryModel.h" +#include "FUiCtrl_GalleryItem.h" +#include "FUiCtrl_GalleryItemProviderAdaptor.h" + +namespace Tizen { namespace Ui { namespace Controls { + +namespace +{ + +const int GALLERY_ITEM_CACHE_SIZE = 5; + +} // unnamed namespace + +_GalleryModel::_GalleryModel(void) + : __pGalleryItemProviderAdaptor(null) + , __itemCount(0) +{ + // Do nothing. +} + +_GalleryModel::~_GalleryModel(void) +{ + result r = __listViewModel.RemoveAllItem(); + + delete __pGalleryItemProviderAdaptor; + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +_GalleryModel* +_GalleryModel::CreateGalleryModelN(_IGalleryItemProvider& galleryItemProvider) +{ + result r = E_SUCCESS; + + _GalleryItemProviderAdaptor* pGalleryItemProviderAdaptor = new (std::nothrow) _GalleryItemProviderAdaptor(galleryItemProvider); + SysTryReturn(NID_UI_CTRL, pGalleryItemProviderAdaptor != null, null, E_OUT_OF_MEMORY, + "[E_OUT_OF_MEMORY] Memory allocation failed."); + + _GalleryModel* pGalleryModel = new (std::nothrow) _GalleryModel(); + SysTryCatch(NID_UI_CTRL, pGalleryModel != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = pGalleryModel->RegisterItemProviderAdaptor(pGalleryItemProviderAdaptor); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pGalleryModel->SetCacheSize(GALLERY_ITEM_CACHE_SIZE); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + SetLastResult(E_SUCCESS); + return pGalleryModel; + +CATCH: + delete pGalleryItemProviderAdaptor; + delete pGalleryModel; + + return null; +} + +result +_GalleryModel::RegisterItemProviderAdaptor(_GalleryItemProviderAdaptor* pGalleryItemProviderAdaptor) +{ + __pGalleryItemProviderAdaptor = pGalleryItemProviderAdaptor; + return __listViewModel.RegisterItemProviderAdaptor(pGalleryItemProviderAdaptor); +} + +_GalleryItem* +_GalleryModel::GetItem(int index) const +{ + SysTryReturn(NID_UI_CTRL, index >= 0, null, E_INVALID_ARG, "[E_INVALID_ARG] The argument(%d) is negative value.", index); + + _GalleryItem* pItem = static_cast<_GalleryItem*>(const_cast<_ListViewModel*>(&__listViewModel)->LoadItem(0, index)); + SysTryReturn(NID_UI_CTRL, pItem != null, null, GetLastResult(), + "[%s] gallery item(%d) is invalid object", GetErrorMessage(GetLastResult()), index); + + SetLastResult(E_SUCCESS); + + return pItem; +} + +result +_GalleryModel::SetItemProvider(_IGalleryItemProvider& provider) +{ + return __pGalleryItemProviderAdaptor->SetGalleryItemProvider(provider); +} + +int +_GalleryModel::GetItemCount(void) const +{ + return __itemCount; +} + +int +_GalleryModel::GetItemCountFromProvider(void) const +{ + return __pGalleryItemProviderAdaptor->GetItemCount(0); +} + +void +_GalleryModel::UpdateItemCount(void) +{ + __itemCount = GetItemCountFromProvider(); +} + +result +_GalleryModel::RequestToLoadItem(int index) +{ + SysTryReturn(NID_UI_CTRL, index >= 0, 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 <= GetItemCount(), E_OUT_OF_RANGE, "Item index is out of range."); + + _IListItemCommon* pCommonItem = __pGalleryItemProviderAdaptor->LoadItem(0, index); + SysTryReturnResult(NID_UI_CTRL, pCommonItem != null, GetLastResult(), "Propagating."); + + // pCommonItem is always _GalleryItem type. + _GalleryItem* pItem = static_cast<_GalleryItem*>(pCommonItem); + result r = __listViewModel.InsertItemToGroup(pItem, 0, index); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + __itemCount++; + + return E_SUCCESS; +} + +result +_GalleryModel::RequestToUnloadItem(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); + + result r = __listViewModel.RemoveItemAt(0, index); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + __itemCount--; + + return E_SUCCESS; +} + + +result +_GalleryModel::RequestToUnloadAllItems(void) +{ + return __listViewModel.DeleteAllGroupAndItem(); +} + +result +_GalleryModel::RequestToUpdateItem(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); + + _IListItemCommon* pItem = __pGalleryItemProviderAdaptor->LoadItem(0, index); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pItem != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __listViewModel.SetItem(*pItem, 0, index); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +_GalleryModel::RequestToUpdateAllItems(void) +{ + UpdateItemCount(); + result r = RequestToUnloadAllItems(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = AddGroup(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +_GalleryModel::SetCacheSize(int size) +{ + SysTryReturn(NID_UI_CTRL, size >= 0, E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] The argument(%d) is out of range.", size); + return __listViewModel.SetMaxCachingSize(size); +} + +int +_GalleryModel::GetCacheSize(void) const +{ + return __listViewModel.GetMaxCachingSize(); +} + +result +_GalleryModel::AddGroup(void) +{ + int itemCount = GetItemCount(); + if (__listViewModel.GetAllGroupCount() == 0) + { + result r = __listViewModel.AddGroup(itemCount); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + //r = __listViewModel.SetAllItemCountAndHeight(1, itemCount, 1); + //SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + return E_SUCCESS; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_GalleryPresenter.cpp b/src/ui/controls/FUiCtrl_GalleryPresenter.cpp new file mode 100644 index 0000000..17ff36f --- /dev/null +++ b/src/ui/controls/FUiCtrl_GalleryPresenter.cpp @@ -0,0 +1,1361 @@ +// +// 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. +// +#include +#include +#include +#include "FUi_Math.h" +#include "FUi_ResourceManager.h" +#include "FUiCtrl_Gallery.h" +#include "FUiCtrl_GalleryPresenter.h" +#include "FUiCtrl_GalleryModel.h" +#include "FUiCtrl_GalleryItem.h" +#include "FUiCtrl_GalleryItemProvider.h" +#include "FUiCtrl_GalleryCoreEvent.h" +#include "FUiCtrl_GalleryCoreEventArg.h" +#include "FUiCtrl_GalleryImageReader.h" +#include "FUiCtrl_GalleryViewEventHandler.h" +#include "FUiCtrl_IGalleryCoreEventListener.h" +#include "FUiCtrl_IGalleryRenderer.h" +#include "FUiCtrl_GalleryBitmap.h" +#include "FUiCtrl_GalleryViewEvent.h" +#include "FUiAnim_VisualElement.h" + + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; + +namespace Tizen { namespace Ui { namespace Controls { + +namespace +{ + +const int DEFAULT_ITEM_SPACING = 30; + +const int DEFAULT_ANIMATION_DURATION = 3000; +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 PARTIAL_CANVAS = 0; +} // unnamed namespace + +IMPLEMENT_PROPERTY(_GalleryPresenter); + +_GalleryPresenter::_GalleryPresenter(_IGalleryRenderer& galleryRenderer) + : __galleryRenderer(galleryRenderer) + , __pGalleryViewEventHandler(null) + , __pGalleryCoreEvent(null) + , __pGalleryItemProvider(null) + , __pGalleryModel(null) + , __pGalleryImageReader(null) + , __pEmptyGalleryImage(null) + , __emptyText(L"") + , __slideShowAnimationDuration(DEFAULT_ANIMATION_DURATION) + , __slideShowViewDuration(DEFAULT_VIEW_DURATION) + , __gallerySlideShowType(GALLERY_SLIDESHOW_DISSOLVE) + , __currentItemIndex(NO_CURRENT_IMAGE) + , __slideShowRepeat(false) + , __slideShowStarted(false) + , __zoomingEnabled(true) + , __pSlideShowTimer(null) + , __slideShowPlayCount(0) + , __itemSpacing(DEFAULT_ITEM_SPACING) + , __pItemToCanvas(null) + , __fittingType(GALLERY_FITTING_TYPE_FIT) + , __verticalAlignment(GALLERY_VERTICAL_ALIGN_MIDDLE) + , __horizontalAlignment(GALLERY_HORIZONTAL_ALIGN_CENTER) + , __emptyFontSize(0) + , __emptyFontStyle(FONT_STYLE_PLAIN) + , __userSetEmptyText(false) + , __pGalleryView(null) +{ + AddPropertyChangeEventListener(*this); +} + +_GalleryPresenter::~_GalleryPresenter(void) +{ + delete __pGalleryViewEventHandler; + delete __pGalleryImageReader; + delete __pGalleryModel; + delete __pGalleryItemProvider; + delete __pGalleryCoreEvent; + delete __pEmptyGalleryImage; + delete[] __pItemToCanvas; + + if (__pSlideShowTimer != null) + { + __pSlideShowTimer->Cancel(); + delete __pSlideShowTimer; + __pSlideShowTimer = null; + } +} + +_GalleryPresenter* +_GalleryPresenter::CreateGalleryPresenterN(_IGalleryRenderer& galleryRenderer, + _GalleryItemProviderAdaptorImpl* pGalleryItemProviderAdaptor, _Gallery* pGalleryView) +{ + _GalleryPresenter* pPresenter = new (std::nothrow) _GalleryPresenter(galleryRenderer); + SysTryReturn(NID_UI_CTRL, pPresenter != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + result r = pPresenter->Construct(pGalleryItemProviderAdaptor, pGalleryView); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + SetLastResult(E_SUCCESS); + return pPresenter; + +CATCH: + delete pPresenter; + + return null; +} + +result +_GalleryPresenter::Construct(_GalleryItemProviderAdaptorImpl* pGalleryItemProviderAdaptor, _Gallery* pGalleryView) +{ + SetLastResult(E_SUCCESS); + + result r = E_SUCCESS; + + __pGalleryCoreEvent = new (std::nothrow) _GalleryCoreEvent(); + SysTryCatch(NID_UI_CTRL, __pGalleryCoreEvent != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + __pGalleryItemProvider = new (std::nothrow) _GalleryItemProvider(*__pGalleryCoreEvent, pGalleryItemProviderAdaptor); + SysTryCatch(NID_UI_CTRL, __pGalleryItemProvider != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + __pGalleryModel = _GalleryModel::CreateGalleryModelN(*__pGalleryItemProvider); + SysTryCatch(NID_UI_CTRL, __pGalleryModel != null, , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + __pGalleryImageReader = new (std::nothrow) _GalleryImageReader(*__pGalleryModel); + SysTryCatch(NID_UI_CTRL, __pGalleryImageReader != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + __pItemToCanvas = new(std::nothrow) int[MAX_CANVAS_COUNT]; + SysTryCatch(NID_UI_CTRL, __pItemToCanvas != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + memset(__pItemToCanvas, -1, sizeof(int) * MAX_CANVAS_COUNT); + + r = __galleryRenderer.SetCanvasMaxCount(MAX_CANVAS_COUNT); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __galleryRenderer.EnableEmptyView(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + GET_STRING_CONFIG(IDS_TPLATFORM_BODY_NO_IMAGES, __emptyText); + GET_SHAPE_CONFIG(GALLERY::EMPTY_FONT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, __emptyFontSize); + r = __galleryRenderer.SetEmptyText(__emptyText); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pGalleryViewEventHandler = new (std::nothrow) _GalleryViewEventHandler(*this, __galleryRenderer, *__pGalleryImageReader); + SysTryCatch(NID_UI_CTRL, __pGalleryViewEventHandler != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = __pGalleryViewEventHandler->Construct(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + SetFontStyle(FONT_STYLE_PLAIN); + + __pGalleryView = pGalleryView; + + return E_SUCCESS; + +CATCH: + delete __pGalleryViewEventHandler; + delete __pGalleryImageReader; + delete __pGalleryModel; + delete __pGalleryItemProvider; + delete __pGalleryCoreEvent; + delete[] __pItemToCanvas; + + return r; +} + +int +_GalleryPresenter::GetCurrentItemIndex(void) const +{ + return __currentItemIndex; +} + +result +_GalleryPresenter::SetCurrentItemIndex(int index, bool eventFire) +{ + SysTryReturn(NID_UI_CTRL, index < __pGalleryModel->GetItemCount(), E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] The argument(%d) is out of range.", index); + + if (__currentItemIndex != NO_CURRENT_IMAGE && __currentItemIndex != index) + { + __currentItemIndex = index; + if (eventFire == true) + { + ChangedItem(); + } + } + else + { + __currentItemIndex = index; + } + + __pGalleryViewEventHandler->SetZoomFlag(false); + + return E_SUCCESS; +} + +result +_GalleryPresenter::SetCurrentItem(int index) +{ + SysTryReturn(NID_UI_CTRL, index >=0 && index < __pGalleryModel->GetItemCount(), E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] The argument(%d) is out of range.", index); + + int oldCurrentCanvasIndex = 0; + result r = E_SUCCESS; + + if (index == __currentItemIndex) + { + return E_SUCCESS; + } + + if (__currentItemIndex != NO_CURRENT_IMAGE) + { + oldCurrentCanvasIndex = SearchCanvasIndex(__currentItemIndex); + SysTryReturn(NID_UI_CTRL, oldCurrentCanvasIndex != NOT_EXIST_CANVAS, E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] The canvas of %d item is not exist.", oldCurrentCanvasIndex); + + if (__currentItemIndex > index) + { + FloatRectangle rect = __galleryRenderer.GetViewRect(); + rect.x = rect.width; + r = __galleryRenderer.SetCanvasBounds(oldCurrentCanvasIndex, rect); + } + else if (__currentItemIndex < index) + { + FloatRectangle rect = __galleryRenderer.GetViewRect(); + rect.x = -rect.width; + r = __galleryRenderer.SetCanvasBounds(oldCurrentCanvasIndex, rect); + } + + r = __galleryRenderer.SetCanvasVisibility(oldCurrentCanvasIndex, false); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + int newCurrentCanvasIndex = SearchCanvasIndex(index); + if (newCurrentCanvasIndex == NOT_EXIST_CANVAS) + { + r = SetCanvasImage(index); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + newCurrentCanvasIndex = SearchCanvasIndex(index); + } + r = __galleryRenderer.SetCanvasBounds(newCurrentCanvasIndex, __galleryRenderer.GetViewRect()); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __galleryRenderer.SetCanvasVisibility(newCurrentCanvasIndex, true); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = SetCurrentItemIndex(index); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + //RefreshView(); + + return E_SUCCESS; + +CATCH: + result resultValue = __galleryRenderer.SetCanvasVisibility(oldCurrentCanvasIndex, true); + if (resultValue != E_SUCCESS) + { + SysLog(NID_UI_CTRL, "[%s] Failed to setting of canvas visibility.", GetErrorMessage(resultValue)); + } + + return r; +} + +int +_GalleryPresenter::GetItemCount(void) const +{ + return __pGalleryModel->GetItemCount(); +} + +void +_GalleryPresenter::SetItemSpacing(int spacing) +{ + __itemSpacing = spacing; +} +int +_GalleryPresenter::GetItemSpacing(void) const +{ + return __itemSpacing; +} + +_GallerySlideShowType +_GalleryPresenter::GetSlideShowType(void) const +{ + return __gallerySlideShowType; +} + +result +_GalleryPresenter::SetSlideShowType(_GallerySlideShowType slideShowType) +{ + SysTryReturn(NID_UI_CTRL, slideShowType >= GALLERY_SLIDESHOW_DISSOLVE && slideShowType <= GALLERY_SLIDESHOW_PAGE, + E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The animation argument(%d) is out of range", slideShowType); + + __gallerySlideShowType = slideShowType; + + return E_SUCCESS; +} + +int +_GalleryPresenter::GetSlideShowAnimationDuration(void) const +{ + Variant variant = GetProperty("slideShowAnimationDuration"); + return variant.ToInt(); +} + +result +_GalleryPresenter::SetSlideShowAnimationDuration(int duration) +{ + SysTryReturn(NID_UI_CTRL, duration >= MIN_ANIMATION_DURATION && duration <= MAX_ANIMATION_DURATION, + E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The argument(%d) is out of range.", duration); + + return SetProperty("slideShowAnimationDuration", Variant(duration)); +} + +int +_GalleryPresenter::GetSlideShowViewDuration(void) const +{ + Variant variant = GetProperty("slideShowViewDuration"); + return variant.ToInt(); +} + +result +_GalleryPresenter::SetSlideShowViewDuration(int duration) +{ + SysTryReturn(NID_UI_CTRL, duration >= MIN_VIEW_DURATION, E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] The argument(%d) is out of range.", duration); + + return SetProperty("slideShowViewDuration", Variant(duration)); +} + +result +_GalleryPresenter::StartSlideShow(bool repeat) +{ + SysTryReturn(NID_UI_CTRL, __pSlideShowTimer == null, E_INVALID_OPERATION, E_INVALID_OPERATION, + "[E_INVALID_OPERATION] Slide show is already started"); + + if (GetItemCount() == 0) + { + return E_SUCCESS; + } + + __slideShowRepeat = repeat; + __slideShowPlayCount = GetItemCount() - 1; + + result r = StartSlideShowTimer(GetSlideShowViewDuration()); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _GalleryCoreEventArg* pArg = new(std::nothrow) _GalleryCoreEventArg(GALLERY_CORE_EVENT_SLIDE_SHOW_STARTED); + __pGalleryCoreEvent->Fire(*pArg); + + return E_SUCCESS; +} + +result +_GalleryPresenter::StopSlideShow(void) +{ + SysTryReturn(NID_UI_CTRL, __pSlideShowTimer != null, E_INVALID_OPERATION, E_INVALID_OPERATION, + "[E_INVALID_OPERATION] Slide show is already stopped"); + + StopSlideShowTimer(); + __galleryRenderer.StopAllCanvasAnimation(); + + result r = __pGalleryViewEventHandler->SetVisibleCanvas(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _GalleryCoreEventArg* pArg = new(std::nothrow) _GalleryCoreEventArg(GALLERY_CORE_EVENT_SLIDE_SHOW_STOPPED); + __pGalleryCoreEvent->Fire(*pArg); + + r = __galleryRenderer.RefreshView(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +String +_GalleryPresenter::GetTextOfEmptyGallery(void) const +{ + Variant variant = GetProperty("textOfEmptyGallery"); + return variant.ToString(); +} + +result +_GalleryPresenter::SetTextOfEmptyGallery(const String& text) +{ + String oldText = GetTextOfEmptyGallery(); + if (oldText == text) + { + return E_SUCCESS; + } + __userSetEmptyText = true; + result r = __galleryRenderer.SetEmptyText(text); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return SetProperty("textOfEmptyGallery", Variant(text)); +} + +result +_GalleryPresenter::SetBitmapOfEmptyGallery(const _GalleryBitmap* pBitmap) +{ + result r = __galleryRenderer.SetEmptyImage(pBitmap); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pEmptyGalleryImage = const_cast <_GalleryBitmap*>(pBitmap); + + return E_SUCCESS; +} + +bool +_GalleryPresenter::IsSlideShowStarted(void) const +{ + return __pSlideShowTimer != null ? true : false; +} + +result +_GalleryPresenter::SetZoomingEnabled(bool enable) +{ + return SetProperty("zoomingEnabled", Variant(enable)); +} + +bool +_GalleryPresenter::IsZoomingEnabled(void) const +{ + Variant variant = GetProperty("zoomingEnabled"); + + return variant.ToBool(); +} + +bool +_GalleryPresenter::PostEvent(_GalleryViewEvent& event) +{ + bool slideShowStarted = false; + if (__pSlideShowTimer != null && event.GetEventType() != GALLERY_VIEW_EVENT_BOUNDS_CHANGED) + { + result r = StopSlideShow(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, r, "[%s] Propagating.", GetErrorMessage(r)); + slideShowStarted = true; + } + + if (GetItemCount() == 0) + { + if (event.GetEventType() == GALLERY_VIEW_EVENT_BOUNDS_CHANGED) + { + return OnBoundsChanged(); + } + //SetLastResult(E_SUCCESS); + return false; + } + + switch (event.GetEventType()) + { + case GALLERY_VIEW_EVENT_TOUCH_PRESSED: + { + if (slideShowStarted == true) + { + result r = __pGalleryViewEventHandler->SetVisibleCanvas(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, r, "[%s] Propagating.", GetErrorMessage(r)); + return true; + } + return __pGalleryViewEventHandler->OnTouchPressed(*(event.GetEventInfo())); + } + + case GALLERY_VIEW_EVENT_TOUCH_RELEASED: + return __pGalleryViewEventHandler->OnTouchReleased(*(event.GetEventInfo())); + + case GALLERY_VIEW_EVENT_TOUCH_DOUBLE_PRESSED: + __galleryRenderer.SetCanvasVisibility(PARTIAL_CANVAS, false); + return __pGalleryViewEventHandler->OnTouchDoublePressed(*(event.GetEventInfo())); + + case GALLERY_VIEW_EVENT_TOUCH_MOVED: + __galleryRenderer.SetCanvasVisibility(PARTIAL_CANVAS, false); + return __pGalleryViewEventHandler->OnTouchMoved(*(event.GetEventInfo())); + + case GALLERY_VIEW_EVENT_TOUCH_PINCH_ZOOM: + return __pGalleryViewEventHandler->OnTouchPinchZoom(*(event.GetEventInfo())); + + case GALLERY_VIEW_EVENT_TOUCH_FLICK: + //__galleryRenderer.SetCanvasVisibility(PARTIAL_CANVAS, false); + return __pGalleryViewEventHandler->OnTouchFlicked(*(event.GetEventInfo())); + + case GALLERY_VIEW_EVENT_BOUNDS_CHANGED: + return OnBoundsChanged(); + + case GALLERY_VIEW_EVENT_TOUCH_CANCELED: + return __pGalleryViewEventHandler->OnTouchCanceled(); + + default: + SysTryReturn(NID_UI_CTRL, false, false, E_INVALID_ARG, + "[E_INVALID_ARG] The event type(%d) is invalid type", event.GetEventType()); + } + + //SetLastResult(E_SUCCESS); + return true; +} + +bool +_GalleryPresenter::OnBoundsChanged(void) +{ + int itemIndex = -1; + result r = E_SUCCESS; + + if (__pSlideShowTimer != null && GetSlideShowType() == GALLERY_SLIDESHOW_PAGE) + { + int slideShowPlayCount = __slideShowPlayCount; + bool slideShowRepeat = __slideShowRepeat; + __galleryRenderer.StopAllCanvasAnimation(); + __slideShowPlayCount = slideShowPlayCount; + __slideShowRepeat = slideShowRepeat; + r = StartSlideShowTimer(GetSlideShowViewDuration()); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, true, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + r = __galleryRenderer.InitializeCanvasBounds(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, true, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (GetItemCount() > 0) + { + for (int canvasIndex = PARTIAL_CANVAS + 1; canvasIndex < MAX_CANVAS_COUNT; canvasIndex++) + { + itemIndex = __pItemToCanvas[canvasIndex]; + if (itemIndex != NOT_EXIST_CANVAS) + { + r = __galleryRenderer.SetCanvasImage(canvasIndex, __pGalleryImageReader->GetItemImage(itemIndex) + , __verticalAlignment, __horizontalAlignment, __fittingType); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, true, r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + } + else + { + r = __galleryRenderer.EnableEmptyView(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, true, r, "[%s] Propagating.", GetErrorMessage(r)); + SetLastResult(E_SUCCESS); + return true; + } + + int currentItemIndex = GetCurrentItemIndex(); + int currentCanvasIndex = SearchCanvasIndex(currentItemIndex); + int nextItemIndex = GetCurrentItemIndex() + 1; + if (nextItemIndex >= GetItemCount()) + { + nextItemIndex = 0; + } + int nextCanvasIndex = SearchCanvasIndex(nextItemIndex); + + r = __galleryRenderer.SetCanvasShowState(currentCanvasIndex, true); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, true, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (__pSlideShowTimer != null && __slideShowStarted == true) + { + r = __galleryRenderer.SetCanvasShowState(nextCanvasIndex, true); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, true, r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + __galleryRenderer.GalleryBoundsChanged(currentCanvasIndex); + FloatRectangle canvasBounds = __galleryRenderer.GetCanvasBounds(currentCanvasIndex); + FloatRectangle imageBounds = __galleryRenderer.GetCanvasImageBounds(currentCanvasIndex); + __pGalleryViewEventHandler->CorrectCanvasPosition(canvasBounds, imageBounds); + r = __galleryRenderer.SetCanvasBounds(currentCanvasIndex, canvasBounds); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, true, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pGalleryViewEventHandler->ResetTouch(); + + r = __pGalleryViewEventHandler->AlignCanvas(false); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, true, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + SetLastResult(E_SUCCESS); + + return true; +} + +void +_GalleryPresenter::OnDraw(void) +{ + result r = E_SUCCESS; + + if (GetItemCount() > 0 && GetCurrentItemIndex() == NO_CURRENT_IMAGE) + { + r = SetCurrentItem(0); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + r = __galleryRenderer.Draw(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + SetLastResult(E_SUCCESS); +} + +result +_GalleryPresenter::SetCoreEventListener(const _IGalleryCoreEventListener& coreEventListener) +{ + return __pGalleryCoreEvent->AddListener(coreEventListener); +} + +result +_GalleryPresenter::RemoveCoreEventListener(const _IGalleryCoreEventListener& coreEventListener) +{ + return __pGalleryCoreEvent->RemoveListener(coreEventListener); +} + +bool +_GalleryPresenter::ClickedItem(void) +{ + _GalleryCoreEventArg* pArg = new(std::nothrow) _GalleryCoreEventArg(GALLERY_CORE_EVENT_ITEM_CLICKED, __currentItemIndex); + return __pGalleryCoreEvent->Fire(*pArg); +} + +bool +_GalleryPresenter::ChangedItem(void) +{ + if (__currentItemIndex == NO_CURRENT_IMAGE) + { + return true; + } + + __pGalleryView->ResizeGalleryAccessibilityElement(); + + _GalleryCoreEventArg* pArg = new(std::nothrow) _GalleryCoreEventArg(GALLERY_CORE_EVENT_CURRENT_ITEM_CHANGED, __currentItemIndex); + return __pGalleryCoreEvent->Fire(*pArg); +} + +result +_GalleryPresenter::RequestToLoadItem(int itemIndex) +{ + result r = __pGalleryModel->RequestToLoadItem(itemIndex); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SortItemToCanvasIndex(itemIndex, true); + + if (GetItemCount() == 1) + { + r = __galleryRenderer.DisableEmptyView(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = SetCurrentItem(itemIndex); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + r = __galleryRenderer.RefreshView(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +_GalleryPresenter::RequestToUnloadItem(int itemIndex) +{ + result r = E_SUCCESS; + + int canvasIndex = SearchCanvasIndex(itemIndex); + if (canvasIndex != NOT_EXIST_CANVAS) + { + __galleryRenderer.SetCanvasVisibility(canvasIndex, false); + __pItemToCanvas[canvasIndex] = NOT_USED_CANVAS; + } + + if (GetItemCount() == 1) + { + r = SetCurrentItemIndex(NO_CURRENT_IMAGE); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __galleryRenderer.EnableEmptyView(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + if (itemIndex == __currentItemIndex) + { + __pGalleryImageReader->ResetLoadedPartialImageIndex(); + r = __galleryRenderer.SetCanvasVisibility(PARTIAL_CANVAS, false); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pGalleryViewEventHandler->SetZoomFlag(false); + + int canvasIndex = NOT_EXIST_CANVAS; + if (itemIndex == GetItemCount() - 1) + { + r = SetCanvasImage(itemIndex - 1); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + canvasIndex = SearchCanvasIndex(itemIndex - 1); + SysTryReturn(NID_UI_CTRL, canvasIndex != NOT_EXIST_CANVAS, E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] Failed to search canvas"); + __currentItemIndex--; + } + else + { + r = SetCanvasImage(itemIndex + 1); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + canvasIndex = SearchCanvasIndex(itemIndex + 1); + SysTryReturn(NID_UI_CTRL, canvasIndex != NOT_EXIST_CANVAS, E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] Failed to search canvas"); + } + + r = __galleryRenderer.SetCanvasVisibility(canvasIndex, true); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __galleryRenderer.SetCanvasBounds(canvasIndex, __galleryRenderer.GetViewRect()); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + if(ChangedItem() == false) + { + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + else if (itemIndex < __currentItemIndex) + { + __currentItemIndex--; + } + } + + r = __pGalleryModel->RequestToUnloadItem(itemIndex); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + SortItemToCanvasIndex(itemIndex, false); + + r = __galleryRenderer.RefreshView(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +_GalleryPresenter::RequestToUnloadAllItems(void) +{ + result r = __pGalleryModel->RequestToUnloadAllItems(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + for (int i = 0; i < MAX_CANVAS_COUNT; i++) + { + __pItemToCanvas[i] = NOT_USED_CANVAS; + } + + r = SetCurrentItemIndex(NO_CURRENT_IMAGE); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __galleryRenderer.EnableEmptyView(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + //r = __galleryRenderer.RefreshView(); + //SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +_GalleryPresenter::RequestToUpdateItem(int itemIndex) +{ + result r = __pGalleryModel->RequestToUpdateItem(itemIndex); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + int canvasIndex = SearchCanvasIndex(itemIndex); + if (itemIndex == GetCurrentItemIndex()) + { + _GalleryBitmap* pImage = __pGalleryImageReader->GetItemImage(itemIndex); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pImage != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __galleryRenderer.SetCanvasImage(canvasIndex, (const _GalleryBitmap*)pImage + , __verticalAlignment, __horizontalAlignment, __fittingType); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __galleryRenderer.GalleryBoundsChanged(canvasIndex); + FloatRectangle canvasBounds = __galleryRenderer.GetCanvasBounds(canvasIndex); + FloatRectangle imageBounds = __galleryRenderer.GetCanvasImageBounds(canvasIndex); + __pGalleryViewEventHandler->CorrectCanvasPosition(canvasBounds, imageBounds); + r = __galleryRenderer.SetCanvasBounds(canvasIndex, canvasBounds); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, true, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __pGalleryViewEventHandler->AlignCanvas(false); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, true, r, "[%s] Propagating.", GetErrorMessage(r)); + } + else if (canvasIndex != NOT_EXIST_CANVAS) + { + __pItemToCanvas[canvasIndex] = NOT_USED_CANVAS; + } + + r = __galleryRenderer.RefreshView(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +_GalleryPresenter::RequestToUpdateAllItems(void) +{ + result r = __pGalleryModel->RequestToUpdateAllItems(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __galleryRenderer.ResetAllCanvas(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + for (int i = 0; i < MAX_CANVAS_COUNT; i++) + { + __pItemToCanvas[i] = NOT_USED_CANVAS; + } + + int itemCount = GetItemCount(); + if (itemCount > 0) + { + r = __galleryRenderer.DisableEmptyView(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (GetCurrentItemIndex() != NO_CURRENT_IMAGE) + { + r = SetCanvasImage(GetCurrentItemIndex()); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __galleryRenderer.SetCanvasVisibility(SearchCanvasIndex(GetCurrentItemIndex()), true); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + r = SetCurrentItem(0); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __galleryRenderer.SetCanvasVisibility(SearchCanvasIndex(0), true); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + else + { + r = __galleryRenderer.EnableEmptyView(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + return E_SUCCESS; +} + +result +_GalleryPresenter::RequestToUpdateItemCount(void) +{ + __pGalleryModel->UpdateItemCount(); + + return E_SUCCESS; +} + +void +_GalleryPresenter::OnTimerExpired(Runtime::Timer& timer) +{ + result r = E_SUCCESS; + if (&timer == __pSlideShowTimer) + { + r = PlaySlideShow(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + SetLastResult(E_SUCCESS); +} + +void +_GalleryPresenter::OnTransitionCancel(void) +{ + __slideShowStarted = false; + int endItemIndex = __currentItemIndex + 1; + if (GetItemCount() > 0) + { + endItemIndex = endItemIndex % GetItemCount(); + } + else + { + endItemIndex = 0; + } + + result r = SetCurrentItemIndex(endItemIndex); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + StopSlideShowTimer(); +} + +void +_GalleryPresenter::OnTransitionCompleted(void) +{ + int endItemIndex = __currentItemIndex + 1; + if (GetItemCount() > 0) + { + endItemIndex = endItemIndex % GetItemCount(); + } + else + { + endItemIndex = 0; + } + + result r = SetCurrentItemIndex(endItemIndex); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + __slideShowStarted = false; + if (__slideShowPlayCount > 0 || __slideShowRepeat == true) + { + StartSlideShowTimer(GetSlideShowViewDuration()); + } + else + { + r = StopSlideShow(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating", GetErrorMessage(r)); + } + + SetLastResult(E_SUCCESS); +} + +void +_GalleryPresenter::OnCanvasAnimationCancel(void) +{ + __slideShowStarted = false; +} + +void +_GalleryPresenter::OnCanvasAnimationCompleted(void) +{ + __slideShowStarted = false; +} + +void +_GalleryPresenter::OnCanvasAnimationStarted(void) +{ + __slideShowStarted = true; +} + +result +_GalleryPresenter::SetCanvasImage(int itemIndex) +{ + SysTryReturn(NID_UI_CTRL, itemIndex >= 0, E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] The argument(%d) is negative value.", itemIndex); + SysTryReturn(NID_UI_CTRL, itemIndex >=0 && itemIndex < __pGalleryModel->GetItemCount(), + E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The argument(%d) is out of range.", itemIndex); + + if (SearchCanvasIndex(itemIndex) != NOT_EXIST_CANVAS) + { + return E_SUCCESS; + } + + int emptyCanvasIndex = GetEmptyCanvasIndex(); + if (emptyCanvasIndex == NOT_EXIST_CANVAS) + { + emptyCanvasIndex = ClearCanvasIndex(__currentItemIndex); + } + + _GalleryBitmap* pImage = __pGalleryImageReader->GetItemImage(itemIndex); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pItemToCanvas[emptyCanvasIndex] = itemIndex; + r = __galleryRenderer.SetCanvasImage(emptyCanvasIndex, (const _GalleryBitmap*)pImage + , __verticalAlignment, __horizontalAlignment, __fittingType); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + FloatRectangle bounds = __galleryRenderer.GetViewRect(); + r = __galleryRenderer.SetCanvasBounds(emptyCanvasIndex, bounds); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __galleryRenderer.SetCanvasVisibility(emptyCanvasIndex, false); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +_GalleryPresenter::SetPartialCanvasImage(void) +{ + SysTryReturn(NID_UI_CTRL, __currentItemIndex >= 0, E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] The argument(%d) is negative value.", __currentItemIndex); + + _GalleryItem* pGalleryItem = __pGalleryModel->GetItem(__currentItemIndex); + if (pGalleryItem->GetGalleryItemFilePath() == L"") + { + return E_SUCCESS; + } + + int currentCanvasIndex = SearchCanvasIndex(__currentItemIndex); + + FloatRectangle canvasBounds = __galleryRenderer.GetCanvasBounds(currentCanvasIndex); + FloatRectangle imageBounds = __galleryRenderer.GetCanvasImageBounds(currentCanvasIndex); + FloatRectangle viewBounds = __galleryRenderer.GetViewRect(); + + if (imageBounds.width < viewBounds.width) + { + imageBounds.x -= (viewBounds.width - imageBounds.width) / 2; + } + + if (imageBounds.height < viewBounds.height) + { + imageBounds.y -= (viewBounds.height - imageBounds.height) / 2; + } + + canvasBounds.x = _Abs(-canvasBounds.x - imageBounds.x); + canvasBounds.y = _Abs(-canvasBounds.y - imageBounds.y); + canvasBounds.width = viewBounds.width < imageBounds.width ? viewBounds.width : imageBounds.width; + canvasBounds.height = viewBounds.height < imageBounds.height ? viewBounds.height : imageBounds.height; + + FloatDimension size(imageBounds.width, imageBounds.height); + + _GalleryBitmap* pImage = __pGalleryImageReader->GetPartialImageFromFileN(__currentItemIndex, canvasBounds, size); + SysTryReturn(NID_UI_CTRL, pImage != null, GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + __pItemToCanvas[PARTIAL_CANVAS] = __currentItemIndex; + result r = __galleryRenderer.SetCanvasImage(PARTIAL_CANVAS, (const _GalleryBitmap*)pImage + , GALLERY_VERTICAL_ALIGN_MIDDLE, GALLERY_HORIZONTAL_ALIGN_CENTER, __fittingType); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __galleryRenderer.SetCanvasBounds(PARTIAL_CANVAS, viewBounds); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __galleryRenderer.SetCanvasVisibility(PARTIAL_CANVAS, true); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + delete pImage; + + return E_SUCCESS; +CATCH: + delete pImage; + + return r; +} + +int +_GalleryPresenter::SearchCanvasIndex(int itemIndex) +{ + if (itemIndex == NO_CURRENT_IMAGE) + { + return NOT_EXIST_CANVAS; + } + + for (int i = 1; i < MAX_CANVAS_COUNT; i++) + { + if (__pItemToCanvas[i] == itemIndex) + { + return i; + } + } + + return NOT_EXIST_CANVAS; +} + +int +_GalleryPresenter::GetEmptyCanvasIndex(void) const +{ + for (int i = 1; i < MAX_CANVAS_COUNT; i++) + { + if (__pItemToCanvas[i] == NOT_USED_CANVAS) + { + return i; + } + } + return NOT_EXIST_CANVAS; +} + +result +_GalleryPresenter::SetCanvasIndex(int canvasIndex, int itemIndex) +{ + SysTryReturn(NID_UI_CTRL, canvasIndex >= 0, E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] The argument(%d) is negative value.", canvasIndex); + SysTryReturn(NID_UI_CTRL, canvasIndex > 0 && canvasIndex < MAX_CANVAS_COUNT, E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] The canvas index(%d) is out of range", canvasIndex); + SysTryReturn(NID_UI_CTRL, itemIndex >= 0, E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] The argument(%d) is negative value.", itemIndex); + SysTryReturn(NID_UI_CTRL, itemIndex >=0 && itemIndex < __pGalleryModel->GetItemCount(), E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] The argument(%d) is out of range.", itemIndex); + + if (__pItemToCanvas[canvasIndex] == NOT_USED_CANVAS) + { + __pItemToCanvas[canvasIndex] = itemIndex; + } + else + { + SysTryReturn(NID_UI_CTRL, false, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The canvas index(%d) is used.", canvasIndex); + } + + return E_SUCCESS; +} + +int +_GalleryPresenter::ClearCanvasIndex(int currentItemIndex) +{ + SysTryReturn(NID_UI_CTRL, currentItemIndex >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument(%d) is negative value.", currentItemIndex); + + int clearCanvasIndex = 1; + int maxAbsValue = 0; + int absValue = 0; + + for (int i = 1; i < MAX_CANVAS_COUNT; i++) + { + absValue = _Abs(currentItemIndex - __pItemToCanvas[i]); + if (absValue > maxAbsValue) + { + maxAbsValue = absValue; + clearCanvasIndex = i; + } + } + __pItemToCanvas[clearCanvasIndex] = NOT_USED_CANVAS; + + SetLastResult(E_SUCCESS); + return clearCanvasIndex; +} + +void +_GalleryPresenter::SortItemToCanvasIndex(int itemIndex, bool add) +{ + if (add == true) + { + for (int i = 0; i < MAX_CANVAS_COUNT; i++) + { + if (__pItemToCanvas[i] >= itemIndex) + { + __pItemToCanvas[i]++; + } + } + } + else + { + for (int i = 0; i < MAX_CANVAS_COUNT; i++) + { + if (__pItemToCanvas[i] > itemIndex) + { + __pItemToCanvas[i]--; + } + } + } +} + +result +_GalleryPresenter::StartSlideShowTimer(int duration) +{ + result r = E_SUCCESS; + if (__pSlideShowTimer != null) + { + __pSlideShowTimer->Cancel(); + delete __pSlideShowTimer; + __pSlideShowTimer = null; + } + + __pSlideShowTimer = new(std::nothrow) Runtime::Timer(); + SysTryCatch(NID_UI_CTRL, __pSlideShowTimer != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = __pSlideShowTimer->Construct(*this); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pSlideShowTimer->Start(duration); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; + +CATCH: + if (__pSlideShowTimer != null) + { + __pSlideShowTimer->Cancel(); + delete __pSlideShowTimer; + __pSlideShowTimer = null; + } + + return GetLastResult(); +} + +void +_GalleryPresenter::StopSlideShowTimer(void) +{ + if (__pSlideShowTimer != null) + { + __pSlideShowTimer->Cancel(); + delete __pSlideShowTimer; + __pSlideShowTimer = null; + } + + __slideShowRepeat = false; + __slideShowPlayCount = 0; +} + +result +_GalleryPresenter::PlaySlideShow(void) +{ + int startCanvasIndex = SearchCanvasIndex(__currentItemIndex); + SysTryReturn(NID_UI_CTRL, startCanvasIndex != NOT_EXIST_CANVAS, E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] The current item not exist."); + + int endItemIndex = __currentItemIndex + 1; + if (endItemIndex >= GetItemCount()) + { + endItemIndex = 0; + } + + result r = __galleryRenderer.SetCanvasVisibility(PARTIAL_CANVAS, false); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __galleryRenderer.SetCanvasVisibility(startCanvasIndex, true); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + int endCanvasIndex = SearchCanvasIndex(endItemIndex); + if (endCanvasIndex == NOT_EXIST_CANVAS) + { + r = SetCanvasImage(endItemIndex); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + endCanvasIndex = SearchCanvasIndex(endItemIndex); + } + + _GalleryTransitionType transition = static_cast<_GalleryTransitionType>(GetSlideShowType()); + _GalleryAnimationTiming animation = {__slideShowAnimationDuration, GALLERY_ANIMATION_TIMING_FUNC_EASEOUT}; + r = __galleryRenderer.SetCanvasVisibility(endCanvasIndex, true); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __galleryRenderer.RunCanvasTransition(startCanvasIndex, endCanvasIndex, transition, &animation); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (__slideShowRepeat == false) + { + __slideShowPlayCount--; + } + + r = __galleryRenderer.RefreshView(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +// property access +Variant +_GalleryPresenter::GetPropertySlideShowViewDuration(void) const +{ + return Variant(__slideShowViewDuration); +} + +result +_GalleryPresenter::SetPropertySlideShowViewDuration(const Variant& variant) +{ + __slideShowViewDuration = variant.ToInt(); + + return E_SUCCESS; +} + +Variant +_GalleryPresenter::GetPropertySlideShowAnimationDuration(void) const +{ + return Variant(__slideShowAnimationDuration); +} + +result +_GalleryPresenter::SetPropertySlideShowAnimationDuration(const Variant& variant) +{ + __slideShowAnimationDuration = variant.ToInt(); + + return E_SUCCESS; +} + +Variant +_GalleryPresenter::GetPropertyTextOfEmptyGallery(void) const +{ + return Variant(__emptyText); +} + +result +_GalleryPresenter::SetPropertyTextOfEmptyGallery(const Variant& variant) +{ + __emptyText = variant.ToString(); + + return E_SUCCESS; +} + +Variant +_GalleryPresenter::GetPropertyZoomingEnabled(void) const +{ + return Variant(__zoomingEnabled); +} + +result +_GalleryPresenter::SetPropertyZoomingEnabled(const Variant& variant) +{ + __zoomingEnabled = variant.ToBool(); + + return E_SUCCESS; +} + +void +_GalleryPresenter::OnPropertyChanging(_PropertyBase& source, const String& name, + const Variant& oldProperty, const Variant& newProperty) +{ +} + +void +_GalleryPresenter::OnPropertyChanged(_PropertyBase& source, const String& name, + const Variant& oldProperty, const Variant& newProperty) +{ +} + +void +_GalleryPresenter::SetFontSize(int size) +{ + __emptyFontSize = size; +} + +int +_GalleryPresenter::GetFontSize(void) const +{ + return __emptyFontSize; +} + +void +_GalleryPresenter::SetFontStyle(FontStyle style) +{ + __emptyFontStyle = style; +} + +FontStyle +_GalleryPresenter::GetFontStyle(void) const +{ + return __emptyFontStyle; +} + +void +_GalleryPresenter::OnFontInfoRequested(unsigned long& style, int& size) +{ + style = GetFontStyle(); + size = GetFontSize(); +} + +void +_GalleryPresenter::OnFontChanged(void) +{ + if (GetItemCount() == 0) + { + result r = __galleryRenderer.EnableEmptyView(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } +} + +void +_GalleryPresenter::UpdateEmptyString(void) +{ + if (__userSetEmptyText == false) + { + GET_STRING_CONFIG(IDS_TPLATFORM_BODY_NO_IMAGES, __emptyText); + result r = __galleryRenderer.SetEmptyText(__emptyText); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (GetItemCount() == 0) + { + r = __galleryRenderer.EnableEmptyView(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + r = __galleryRenderer.RefreshView(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_GalleryRenderer.cpp b/src/ui/controls/FUiCtrl_GalleryRenderer.cpp new file mode 100644 index 0000000..fc4c780 --- /dev/null +++ b/src/ui/controls/FUiCtrl_GalleryRenderer.cpp @@ -0,0 +1,1310 @@ +// +// 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. +// +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "FUi_Control.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_ResourceManager.h" +#include "FUiAnim_MatrixUtil.h" +#include "FUiAnim_VisualElement.h" +#include "FUiCtrl_GalleryImpl.h" +#include "FUiCtrl_GalleryRenderer.h" +#include "FUiCtrl_GalleryBitmap.h" +#include "FUiCtrl_GalleryCanvasManager.h" +#include "FUiCtrl_GalleryCanvas.h" +#include "FUiCtrl_GalleryRendererNotifier.h" +#include "FUiCtrl_GalleryRendererNotification.h" +#include "FUiCtrl_IGalleryRendererNotiListener.h" + + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Animations; +using namespace Tizen::Ui::Effects; +using namespace Tizen::Graphics::_Text; + +namespace Tizen { namespace Ui { namespace Controls { + +namespace +{ + +const int GALLERY_CANVAS_INITIAL_MAX_COUNT = 5; +const int GALLERY_ZOOM_TRANSITION_ZOOM_FACTOR = 10; + +} // unnamed namespace + +_GalleryRenderer* +_GalleryRenderer::CreateGalleryRendererN(_Control& control) +{ + result r = E_SUCCESS; + + _GalleryRenderer* pRenderer = new (std::nothrow) _GalleryRenderer(); + SysTryCatch(NID_UI_CTRL, pRenderer != null, , E_OUT_OF_MEMORY, + "[E_OUT_OF_MEMORY] Failed to allocate the memory for the _GalleryRenderer."); + + r = pRenderer->Construct(control); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + SetLastResult(E_SUCCESS); + + return pRenderer; + +CATCH: + delete pRenderer; + + return null; +} + +result +_GalleryRenderer::AddNotiListener(const _IGalleryRendererNotiListener& notiListener) +{ + return GetRendererNotifier().AddListener((const IEventListener&)notiListener); +} + +result +_GalleryRenderer::RemoveNotiListener(const _IGalleryRendererNotiListener& notiListener) +{ + return GetRendererNotifier().RemoveListener((const IEventListener&)notiListener); +} + +result +_GalleryRenderer::SetCanvasMaxCount(int maxCount) +{ + if (GetCanvasMaxCount() == maxCount) + { + return E_SUCCESS; + } + + result r = E_SUCCESS; + _GalleryCanvasManager& canvasManager = GetCanvasManager(); + FloatRectangle viewRect = GetViewRect(); + + r = canvasManager.ResetCanvasManager(maxCount + 1, viewRect); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + SetEmptyCanvasIndex(maxCount); + + return E_SUCCESS; +} + +int +_GalleryRenderer::GetCanvasMaxCount(void) const +{ + return GetCanvasManager().GetCanvasCount(); +} + +result +_GalleryRenderer::SetCanvasVisibility(int canvasIndex, bool visibility) +{ + _GalleryCanvas* pCanvas = GetCanvasManager().GetCanvas(canvasIndex); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pCanvas != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + pCanvas->GetFrameVisualElement().SetImplicitAnimationEnabled(false); + + if (visibility == true) + { + r = pCanvas->GetFrameVisualElement().SetZOrderGroup(1000); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + pCanvas->GetFrameVisualElement().SetOpacity(1.0); + } + else + { + r = pCanvas->GetFrameVisualElement().SetZOrderGroup(0); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + return pCanvas->SetVisibility(visibility); +} +result +_GalleryRenderer::SetCanvasShowState(int canvasIndex, bool showState) +{ + _GalleryCanvas* pCanvas = GetCanvasManager().GetCanvas(canvasIndex); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pCanvas != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (pCanvas->IsVisibility() == showState) + { + return E_SUCCESS; + } + + return pCanvas->SetVisibility(showState); +} + +bool +_GalleryRenderer::IsCanvasVisibility(int canvasIndex) const +{ + _GalleryCanvas* pCanvas = GetCanvasManager().GetCanvas(canvasIndex); + SysTryReturn(NID_UI_CTRL, pCanvas != null, false, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + return pCanvas->IsVisibility(); +} + +FloatRectangle +_GalleryRenderer::GetViewRect(void) const +{ + FloatRectangle rect = GetCanvasManager().GetRootCanvas().GetBounds(); + rect.x = 0.0; + rect.y = 0.0; + return rect; +} + +result +_GalleryRenderer::SetEmptyImage(const _GalleryBitmap* pImage) +{ + _GalleryCanvas* pCanvas = GetCanvasManager().GetCanvas(GetEmptyCanvasIndex()); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pCanvas != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pCanvas->SetImage(pImage, GetViewRect(), GALLERY_FITTING_TYPE_NONE); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; + + return E_SUCCESS; +} + +result +_GalleryRenderer::SetEmptyText(const String& pText) +{ + __emptyString = pText; + + return E_SUCCESS; +} + +result +_GalleryRenderer::EnableEmptyView(void) +{ + __showEmptyImage = true; + __needDrawEmptyCanvas = true; + + return E_SUCCESS; +} + +result +_GalleryRenderer::DisableEmptyView(void) +{ + result r = SetCanvasVisibility(GetEmptyCanvasIndex(), false); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __showEmptyImage = false; + __needDrawEmptyCanvas = false; + + return E_SUCCESS; +} + +result +_GalleryRenderer::SetCanvasImage(int canvasIndex, const _GalleryBitmap* pImage + , _GalleryVerticalAlignment imageVerticalAlignment, _GalleryHorizontalAlignment imageHorizontalAlignment + , _GalleryFittingType fittingType) +{ + _GalleryCanvas* pCanvas = GetCanvasManager().GetCanvas(canvasIndex); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pCanvas != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + pCanvas->SetImageAlignment(imageVerticalAlignment, imageHorizontalAlignment); + r = pCanvas->SetImage(pImage, GetViewRect(), fittingType); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +_GalleryRenderer::SetCanvasBounds(int canvasIndex, const FloatRectangle& bounds, + const _GalleryAnimationTiming* pAnimation) +{ + _GalleryCanvas* pCanvas = GetCanvasManager().GetCanvas(canvasIndex); + + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pCanvas != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _VisualElement& visualElement = pCanvas->GetImageVisualElement(); + _VisualElement& frameVisualElement = pCanvas->GetFrameVisualElement(); + frameVisualElement.SetImplicitAnimationEnabled(false); + + FloatMatrix4 endMatrix; + endMatrix.SetAsIdentity(); + + float translateX = bounds.x; + float translateY = bounds.y; + + FloatRectangle viewRect = GetViewRect(); + FloatRectangle imageBounds = pCanvas->GetOriginalImageBounds(); + if (bounds.width != viewRect.width) + { + float factor = (float)bounds.width / (float)(viewRect.width); + translateX = translateX - (imageBounds.width / 2 + imageBounds.x) + ((imageBounds.width / 2 + imageBounds.x) * factor); + translateY = translateY - (imageBounds.height / 2 + imageBounds.y) + ((imageBounds.height / 2 + imageBounds.y) * factor); + endMatrix.SetAsIdentity(); + _MatrixUtilTranslate(endMatrix, translateX, translateY, 0); + _MatrixUtilScale(endMatrix, factor, factor, 1); + pCanvas->SetCanvasFactor(factor); + pCanvas->SetClippingOfFrameVisualElement(false); + } + else + { + //_MatrixUtilTranslate(endMatrix, translateX, translateY, 0); + pCanvas->SetCanvasFactor(1.0f); + pCanvas->SetClippingOfFrameVisualElement(true); + } + + r = SetCanvasImageBounds(canvasIndex, bounds); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (pAnimation != null) + { + visualElement.SetImplicitAnimationEnabled(true); + frameVisualElement.SetImplicitAnimationEnabled(true); + AddAnimationCount(); + + GetAnimationDelegator().SetGalleryAnimationTiming(*pAnimation); + + r = visualElement.SetTransformMatrix(endMatrix); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + __animationRunning = true; + + pCanvas->SetBounds(bounds); + + visualElement.SetImplicitAnimationEnabled(false); + frameVisualElement.SetImplicitAnimationEnabled(false); + } + else + { + visualElement.RemoveAllAnimations(); + + if (GetAnimationCount() != 0) + { + ResetAnimationCount(); + OnAnimationCancel(); + } + + visualElement.SetImplicitAnimationEnabled(false); + + r = visualElement.SetTransformMatrix(endMatrix); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + pCanvas->SetBounds(bounds); + } + + FloatPoint anchor; + imageBounds = pCanvas->GetImageBounds(); + anchor.x = (-bounds.x + (GetViewRect().width / 2)) / bounds.width; + anchor.y = (-bounds.y + (GetViewRect().height / 2)) / bounds.height; + pCanvas->SetImageAnchor(anchor); + + return E_SUCCESS; +} + +FloatRectangle +_GalleryRenderer::GetCanvasBounds(int canvasIndex) const +{ + _GalleryCanvas* pCanvas = GetCanvasManager().GetCanvas(canvasIndex); + SysTryReturn(NID_UI_CTRL, pCanvas != null, FloatRectangle(-1, -1, -1, -1), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + SetLastResult(E_SUCCESS); + + return pCanvas->GetBounds(); +} + +FloatRectangle +_GalleryRenderer::GetCanvasAlignBoundary(int canvasIndex) const +{ + _GalleryCanvas* pCanvas = GetCanvasManager().GetCanvas(canvasIndex); + SysTryReturn(NID_UI_CTRL, pCanvas != null, FloatRectangle(-1, -1, -1, -1), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + SetLastResult(E_SUCCESS); + + FloatRectangle alignBoundary = pCanvas->GetAlignBoundary(); + if (alignBoundary.width == -1 || alignBoundary.width < GetViewRect().width) + { + alignBoundary = GetViewRect(); + } + + return alignBoundary; +} + +result +_GalleryRenderer::SetCanvasImageBounds(int canvasIndex, const FloatRectangle& bounds) +{ + _GalleryCanvas* pCanvas = GetCanvasManager().GetCanvas(canvasIndex); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pCanvas != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + pCanvas->SetImageBounds(bounds); + + return E_SUCCESS; +} + +FloatRectangle +_GalleryRenderer::GetCanvasImageBounds(int canvasIndex) const +{ + _GalleryCanvas* pCanvas = GetCanvasManager().GetCanvas(canvasIndex); + SysTryReturn(NID_UI_CTRL, pCanvas != null, FloatRectangle(-1, -1, -1, -1), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + SetLastResult(E_SUCCESS); + + return pCanvas->GetImageBounds(); +} + +result +_GalleryRenderer::RunCanvasTransition(int startCanvasIndex, int endCanvasIndex, _GalleryTransitionType transition, + const _GalleryAnimationTiming* pAnimation) +{ + result r = E_SUCCESS; + ResetAnimationCount(); + + _GalleryCanvas* pCanvas = null; + for (int i = 0; i < GetCanvasManager().GetCanvasCount(); i++) + { + pCanvas = GetCanvasManager().GetCanvas(i); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pCanvas != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + pCanvas->SetVisibility(false); + } + + pCanvas = GetCanvasManager().GetCanvas(startCanvasIndex); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pCanvas != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pCanvas->SetVisibility(true); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + pCanvas = GetCanvasManager().GetCanvas(endCanvasIndex); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pCanvas != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pCanvas->SetVisibility(true); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + switch (transition) + { + case GALLERY_TRANSITION_DISSOLVE: + r = RunDissolveTransition(startCanvasIndex, endCanvasIndex, pAnimation); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + break; + case GALLERY_TRANSITION_ZOOM: + r = RunZoomTransition(startCanvasIndex, endCanvasIndex, pAnimation); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + break; + case GALLERY_TRANSITION_PAGE: + r = RunPageTransition(startCanvasIndex, endCanvasIndex, pAnimation); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + break; + default: + break; + } + + return E_SUCCESS; +} + +void +_GalleryRenderer::StopAllCanvasAnimation(void) +{ + StopAllAnimation(); + + SetLastResult(E_SUCCESS); + return; +} + +bool +_GalleryRenderer::IsRunningCanvasTransition(void) const +{ + bool returnValue = (GetSlideShowPlayType() == GALLERY_SLIDESHOW_NONE && __animationRunning == false); + + return returnValue; +} + +bool +_GalleryRenderer::IsRunningCanvasAnimation(void) const +{ + return __animationRunning; +} + +bool +_GalleryRenderer::IsExposed(void) const +{ + return false; +} + +result +_GalleryRenderer::RefreshView(void) +{ + return GetCanvasManager().GetRootCanvas().RefreshCanvas(); +} + +result +_GalleryRenderer::ReleaseAllCanvasResource(void) +{ + return GetCanvasManager().ReleaseAllCanvasResource(); +} + +result +_GalleryRenderer::ResetAllCanvas(void) +{ + FloatRectangle viewRect = GetViewRect(); + result r = GetCanvasManager().ResetAllCanvas(viewRect); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +_GalleryRenderer::InitializeCanvasBounds(void) +{ + int canvasCount = GetCanvasManager().GetCanvasCount(); + _GalleryCanvas* pCanvas = null; + FloatRectangle bounds = GetViewRect(); + result r = E_SUCCESS; + for (int canvasIndex = 0; canvasIndex < canvasCount; canvasIndex++) + { + pCanvas = GetCanvasManager().GetCanvas(canvasIndex); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pCanvas != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pCanvas->SetBounds(bounds); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pCanvas->SetVisibility(false); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + return E_SUCCESS; +} + + +result +_GalleryRenderer::Draw(void) +{ + result r = E_SUCCESS; + if (__showEmptyImage == true) + { + r = ShowEmptyImageAndText(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysLog(NID_UI_CTRL, "There is no image in gallery."); + } + else + { + r = GetCanvasManager().LoadAllCanvasImage(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + return E_SUCCESS; +} + +void +_GalleryRenderer::GalleryBoundsChanged(int currentCanvasIndex) +{ + _GalleryCanvas* pCanvas = null; + result r = E_SUCCESS; + + pCanvas = GetCanvasManager().GetCanvas(currentCanvasIndex); + SysTryReturnVoidResult(NID_UI_CTRL, pCanvas != null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + float factor = pCanvas->GetCanvasFactor(); + FloatRectangle bounds = pCanvas->GetBounds(); + bounds.width *= factor; + bounds.height *= factor; + + if (bounds.width != GetViewRect().width) + { + bounds.x = -(pCanvas->GetImageAnchor().x * bounds.width - GetViewRect().width / 2); + bounds.y = -(pCanvas->GetImageAnchor().y * bounds.height - GetViewRect().height / 2); + + r = pCanvas->GetFrameVisualElement().SetBounds(FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height)); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + pCanvas->SetImageBounds(bounds); + + r = pCanvas->SetBounds(bounds); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + SetLastResult(E_SUCCESS); + return; +} + +void +_GalleryRenderer::OnVisualElementAnimationStarted(const VisualElementAnimation& animation, const String& keyName, VisualElement& target) +{ + _GalleryRendererNotification* pRendererNotifier = new (std::nothrow)_GalleryRendererNotification(GALLERY_RENDERER_NOTI_CANVAS_ANIMATION_STARTED); + SysTryReturnVoidResult(NID_UI_CTRL, pRendererNotifier != null, E_OUT_OF_MEMORY, + "[E_OUT_OF_MEMORY] Failed to allocate the memory for the _GalleryRendererNotification."); + GetRendererNotifier().Fire(*pRendererNotifier); +} + +void +_GalleryRenderer::OnVisualElementAnimationRepeated(const VisualElementAnimation& animation, const String& keyName, VisualElement& target, long currentRepeatCount) +{ + return; +} + +void +_GalleryRenderer::OnVisualElementAnimationFinished(const VisualElementAnimation& animation, + const String& keyName, + VisualElement& target, + bool completedNormally) +{ + _GalleryRendererNotification* pRendererNotifier = null; + + if (completedNormally == true) + { + ReleaseAnimationCount(); + if (GetSlideShowPlayType() == GALLERY_SLIDESHOW_NONE) + { + if (GetAnimationCount() == 0) + { + pRendererNotifier = new (std::nothrow)_GalleryRendererNotification(GALLERY_RENDERER_NOTI_CANVAS_ANIMATION_COMPLETED); + SysTryReturnVoidResult(NID_UI_CTRL, pRendererNotifier != null, E_OUT_OF_MEMORY, + "[E_OUT_OF_MEMORY] Failed to allocate the memory for the _GalleryRendererNotification."); + GetRendererNotifier().Fire(*pRendererNotifier); + __animationRunning = false; + } + } + else + { + if (GetAnimationCount() == 0) + { + SetSlideShowPlayType(GALLERY_SLIDESHOW_NONE); + pRendererNotifier = new (std::nothrow)_GalleryRendererNotification(GALLERY_RENDERER_NOTI_TRANSITION_COMPLETED); + SysTryReturnVoidResult(NID_UI_CTRL, pRendererNotifier != null, E_OUT_OF_MEMORY, + "[E_OUT_OF_MEMORY] Failed to allocate the memory for the _GalleryRendererNotification."); + + GetRendererNotifier().Fire(*pRendererNotifier); + } + } + } + else + { + if (GetSlideShowPlayType() != GALLERY_SLIDESHOW_NONE) + { + SetSlideShowPlayType(GALLERY_SLIDESHOW_NONE); + pRendererNotifier = new (std::nothrow)_GalleryRendererNotification(GALLERY_RENDERER_NOTI_TRANSITION_CANCEL); + SysTryReturnVoidResult(NID_UI_CTRL, pRendererNotifier != null, E_OUT_OF_MEMORY, + "[E_OUT_OF_MEMORY] Failed to allocate the memory for the _GalleryRendererNotification."); + + GetRendererNotifier().Fire(*pRendererNotifier); + } + } + + SetLastResult(E_SUCCESS); + return; +} + +_GalleryRenderer::_GalleryRenderer(void) + : __pControl(null) + , __pCanvasManager(null) + , __pRendererNotifyer(null) + , __pGalleryAnimationDelegator(null) + , __emptyString(L"") + , __emptyCanvasIndex(-1) + , __slideShowAnimationCount(0) + , __slideShowPlayType(GALLERY_SLIDESHOW_NONE) + , __showEmptyImage(true) + , __animationRunning(false) + , __needDrawEmptyCanvas(true) + , __startCanvasOfPageCurling(-1) + , __endCanvasOfPageCurling(-1) + , __pEffect(null) + , __pTransparentBitmap(null) + , __pPageCurlingBitmap(null) +{ + GET_COLOR_CONFIG(GALLERY::EMPTY_TEXT_NORMAL, __emptyTextColor); +} + +_GalleryRenderer::~_GalleryRenderer(void) +{ + StopAllAnimation(); + + if (GetEffect() != null) + { + EffectManager::GetInstance()->DestroyEffect(*__pEffect); + EffectManager::DestroyInstance(); + __pEffect = null; + } + + delete __pCanvasManager; + delete __pGalleryAnimationDelegator; + delete __pRendererNotifyer; + delete __pTransparentBitmap; + delete __pPageCurlingBitmap; +} + +result +_GalleryRenderer::Construct(_Control& control) +{ + result r = E_SUCCESS; + _GalleryRendererNotifier* pRendererNotifier = null; + _GalleryCanvasManager* pCanvasManager = null; + _GalleryAnimationProvider* pVEDelegator = null; + FloatRectangle initialCanvasBounds = control.GetBoundsF(); + + pRendererNotifier = new (std::nothrow) _GalleryRendererNotifier(); + SysTryCatch(NID_UI_CTRL, pRendererNotifier != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = pRendererNotifier->Construct(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pVEDelegator = new (std::nothrow) _GalleryAnimationProvider(); + SysTryCatch(NID_UI_CTRL, pRendererNotifier != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pCanvasManager = _GalleryCanvasManager::CreateCanvasManagerN(control, GALLERY_CANVAS_INITIAL_MAX_COUNT, initialCanvasBounds, pVEDelegator); + SysTryCatch(NID_UI_CTRL, pCanvasManager != null, , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + SetControl(control); + SetRendererNotifier(*pRendererNotifier); + SetCanvasManager(*pCanvasManager); + SetAnimationDelegator(*pVEDelegator); + + GetAnimationDelegator().SetAnimationDelegator(this); + + return E_SUCCESS; + +CATCH: + delete pRendererNotifier; + delete pVEDelegator; + + return r; +} + +result +_GalleryRenderer::ShowEmptyImageAndText(void) +{ + Canvas* pEmptyCanvas = null; + FloatDimension textDimension(0, 0); + Font* pFont = null; + TextObject* pTextObject = null; + result r = E_SUCCESS; + + if (__needDrawEmptyCanvas == true) + { + _GalleryCanvas* pEmptyGalleryCanvas = GetCanvasManager().GetCanvas(GetEmptyCanvasIndex()); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pEmptyGalleryCanvas != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pEmptyGalleryCanvas->SetBounds(GetViewRect()); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + // text + if (__emptyString.GetLength() != 0) + { + pFont = GetControl().GetFallbackFont(); + SysTryCatch(NID_UI_CTRL, pFont != null, , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + pFont->GetTextExtent(__emptyString, __emptyString.GetLength(), textDimension); + + 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); + TextSimple* pSimpleText = new (std::nothrow)TextSimple((const_cast(__emptyString.GetPointer())), __emptyString.GetLength(), TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL); + pTextObject->AppendElement(*pSimpleText); + + pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); + pTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE); + pTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_CENTER | TEXT_OBJECT_ALIGNMENT_MIDDLE); + pTextObject->SetFont(pFont, 0, pTextObject->GetTextLength()); + textDimension = pTextObject->GetTextExtentF(0, pTextObject->GetTextLength()); + + if (textDimension.width > GetViewRect().width) + { + textDimension.width = GetViewRect().width; + } + pTextObject->SetForegroundColor(__emptyTextColor, 0, pTextObject->GetTextLength()); + } + + FloatPoint imagePosition(0, 0); + FloatPoint textPosition(0, 0); + FloatDimension imageSize(0, 0); + FloatRectangle visualElementBounds(0, 0, 0, 0); + _GalleryBitmap* pImage = pEmptyGalleryCanvas->GetImage(); + if (pImage != null) + { + imageSize = pImage->GetSize(); + } + + if (imageSize.width >= textDimension.width) + { + visualElementBounds.x = GetViewRect().width - imageSize.width; + visualElementBounds.width = imageSize.width; + if (imageSize.width != textDimension.width) + { + textPosition.x = (imageSize.width - textDimension.width) / 2; + } + } + else + { + visualElementBounds.x = GetViewRect().width - textDimension.width; + visualElementBounds.width = textDimension.width; + imagePosition.x = (textDimension.width - imageSize.width) / 2; + } + visualElementBounds.height = imageSize.height + textDimension.height; + visualElementBounds.y = GetViewRect().height - visualElementBounds.height; + + visualElementBounds.x = visualElementBounds.x / 2; + visualElementBounds.y = visualElementBounds.y / 2; + + pEmptyGalleryCanvas->SetVisualElementBounds(visualElementBounds); + + FloatRectangle imageBounds(imagePosition.x, imagePosition.y, imageSize.width, imageSize.height); + pEmptyGalleryCanvas->SetImageBounds(imageBounds); + + if (pImage != null || __emptyString.GetLength() != 0) + { + pEmptyCanvas = pEmptyGalleryCanvas->GetImageVisualElement().GetCanvasN(); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, pEmptyCanvas != null, , r, "[%s] Propagating.", GetErrorMessage(r)); + + Color color(0, 0, 0, 0); + pEmptyCanvas->SetBackgroundColor(color); + + r = pEmptyCanvas->Clear(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + if (pImage != null) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*(pImage->GetInternalBitmap()))) + { + FloatDimension size = pImage->GetSize(); + FloatRectangle rect(imagePosition.x, imagePosition.y, size.width, size.height); + r = pEmptyCanvas->DrawNinePatchedBitmap(rect, *pImage->GetInternalBitmap()); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + r = pEmptyCanvas->DrawBitmap(imagePosition, *pImage->GetInternalBitmap()); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + + textPosition.y = imageBounds.y + imageBounds.height; + if (pTextObject != null) + { + pTextObject->SetBounds(FloatRectangle(textPosition.x, textPosition.y, textDimension.width, textDimension.height)); + pTextObject->Draw(*_CanvasImpl::GetInstance(*pEmptyCanvas)); + + delete pTextObject; + pTextObject = null; + } + } + + r = pEmptyGalleryCanvas->GetImageVisualElement().SetFlushNeeded(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + delete pEmptyCanvas; + + r = pEmptyGalleryCanvas->SetVisibility(true); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __needDrawEmptyCanvas = false; + } + + return E_SUCCESS; + +CATCH: + delete pTextObject; + delete pEmptyCanvas; + + return r; +} + +result +_GalleryRenderer::RunDissolveTransition(int startCanvasIndex, int endCanvasIndex, const _GalleryAnimationTiming* pAnimation) +{ + SysTryReturn(NID_UI_CTRL, pAnimation != null, E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] The gallery animation timing is null"); + + FloatRectangle viewBounds = GetViewRect(); + result r = SetCanvasBounds(endCanvasIndex, viewBounds); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _GalleryCanvas* pStartCanvas = GetCanvasManager().GetCanvas(startCanvasIndex); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pStartCanvas != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _GalleryCanvas* pEndCanvas = GetCanvasManager().GetCanvas(endCanvasIndex); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pEndCanvas != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _VisualElement& startVisualElement = pStartCanvas->GetFrameVisualElement(); + r = startVisualElement.SetZOrder(&pEndCanvas->GetFrameVisualElement(), true); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + startVisualElement.SetImplicitAnimationEnabled(true); + + GetAnimationDelegator().SetGalleryAnimationTiming(*pAnimation); + startVisualElement.SetOpacity(0.0f); + AddAnimationCount(); + + startVisualElement.SetImplicitAnimationEnabled(false); + + pEndCanvas->GetFrameVisualElement().SetOpacity(0.0f); + + pEndCanvas->GetFrameVisualElement().SetImplicitAnimationEnabled(true); + + pEndCanvas->GetFrameVisualElement().SetOpacity(1.0f); + //AddAnimationCount(); + + pEndCanvas->GetFrameVisualElement().SetImplicitAnimationEnabled(false); + + SetSlideShowPlayType(GALLERY_SLIDESHOW_DISSOLVE); + + return E_SUCCESS; +} + +result +_GalleryRenderer::RunZoomTransition(int startCanvasIndex, int endCanvasIndex, const _GalleryAnimationTiming* pAnimation) +{ + result r = RunDissolveTransition(startCanvasIndex, endCanvasIndex, pAnimation); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + FloatRectangle viewRect = GetViewRect(); + FloatRectangle zoomBounds = viewRect; + zoomBounds.width *= GALLERY_ZOOM_TRANSITION_ZOOM_FACTOR; + zoomBounds.height *= GALLERY_ZOOM_TRANSITION_ZOOM_FACTOR; + zoomBounds.x = -(viewRect.width / 2 * (GALLERY_ZOOM_TRANSITION_ZOOM_FACTOR - 1)); + zoomBounds.y = -(viewRect.height / 2 * (GALLERY_ZOOM_TRANSITION_ZOOM_FACTOR - 1)); + + r = SetCanvasBounds(startCanvasIndex, zoomBounds, pAnimation); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + //AddAnimationCount(); + + SetSlideShowPlayType(GALLERY_SLIDESHOW_ZOOM); + + return E_SUCCESS; +} + +result +_GalleryRenderer::RunPageTransition(int startCanvasIndex, int endCanvasIndex, const _GalleryAnimationTiming* pAnimation) +{ + SysTryReturn(NID_UI_CTRL, pAnimation != null, E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] The gallery animation timing is null"); + + result r = E_SUCCESS; + Effect* pEffect = null; + if (GetEffect() == null) + { + pEffect = EffectManager::GetInstance()->CreateEffect(L"/usr/share/osp/effects/gallery_page_curling.eff"); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + _GalleryImpl* pImpl = static_cast<_GalleryImpl*>(__pControl->GetUserData()); + Gallery& pPublic = pImpl->GetPublic(); + r = pEffect->SetRenderTarget(&pPublic); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + SetEffect(pEffect); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pEffect = null; + } + + SetStartCanvasOfPageCurling(startCanvasIndex); + SetEndCanvasOfPageCurling(endCanvasIndex); + + r = SetCanvasBounds(startCanvasIndex, GetViewRect()); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = SetCanvasVisibility(startCanvasIndex, false); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = SetCanvasVisibility(endCanvasIndex, false); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __pEffect->Start(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + SetSlideShowPlayType(GALLERY_SLIDESHOW_PAGE); + + return E_SUCCESS; + +CATCH: + if (pEffect != null) + { + EffectManager::GetInstance()->DestroyEffect(*pEffect); + pEffect = null; + } + if (__pEffect != null) + { + EffectManager::GetInstance()->DestroyEffect(*__pEffect); + __pEffect = null; + } + EffectManager::DestroyInstance(); + + return r; +} + +void +_GalleryRenderer::OnAnimationCancel(void) +{ + _GalleryRendererNotification* pRendererNoti = new (std::nothrow)_GalleryRendererNotification(GALLERY_RENDERER_NOTI_CANVAS_ANIMATION_CANCEL); + SysTryReturnVoidResult(NID_UI_CTRL, pRendererNoti != null, E_OUT_OF_MEMORY, + "[E_OUT_OF_MEMORY] Failed to allocate the memory for the _GalleryRendererNotification."); + + GetRendererNotifier().Fire(*pRendererNoti); + + SetLastResult(E_SUCCESS); + return; +} + +void +_GalleryRenderer::SetControl(_Control& control) +{ + __pControl = &control; + return; +} + +_Control& +_GalleryRenderer::GetControl(void) const +{ + return *__pControl; +} + +void +_GalleryRenderer::SetCanvasManager(_GalleryCanvasManager& canvasManager) +{ + __pCanvasManager = &canvasManager; + return; +} + +_GalleryCanvasManager& +_GalleryRenderer::GetCanvasManager(void) const +{ + return (_GalleryCanvasManager&)*__pCanvasManager; +} + +void +_GalleryRenderer::SetRendererNotifier(_GalleryRendererNotifier& rendererNotifier) +{ + __pRendererNotifyer = &rendererNotifier; + return; +} + +_GalleryRendererNotifier& +_GalleryRenderer::GetRendererNotifier(void) const +{ + return (_GalleryRendererNotifier&)*__pRendererNotifyer; +} + +void +_GalleryRenderer::SetAnimationDelegator(_GalleryAnimationProvider& galleryVEDelegator) +{ + __pGalleryAnimationDelegator = &galleryVEDelegator; + return; +} + +_GalleryAnimationProvider& +_GalleryRenderer::GetAnimationDelegator(void) const +{ + return *__pGalleryAnimationDelegator; +} + +void +_GalleryRenderer::SetEmptyCanvasIndex(int emptyCanvasIndex) +{ + __emptyCanvasIndex = emptyCanvasIndex; + return; +} + +int +_GalleryRenderer::GetEmptyCanvasIndex(void) const +{ + return __emptyCanvasIndex; +} + +void +_GalleryRenderer::SetSlideShowPlayType(_GallerySlideShowType slideShowType) +{ + __slideShowPlayType = slideShowType; + return; +} + +_GallerySlideShowType +_GalleryRenderer::GetSlideShowPlayType(void) const +{ + return __slideShowPlayType; +} + +void +_GalleryRenderer::AddAnimationCount(void) +{ + __slideShowAnimationCount++; + return; +} + +void +_GalleryRenderer::ReleaseAnimationCount(void) +{ + __slideShowAnimationCount--; + return; +} + +void +_GalleryRenderer::ResetAnimationCount(void) +{ + __slideShowAnimationCount = 0; + return; +} + +int +_GalleryRenderer::GetAnimationCount(void) const +{ + return __slideShowAnimationCount; +} + +void +_GalleryRenderer::StopAllAnimation(void) +{ + _GalleryCanvas* pCanvas = null; + int canvasCount = GetCanvasManager().GetCanvasCount(); + result r = E_SUCCESS; + for (int i = 0; i < canvasCount; i++) + { + pCanvas = GetCanvasManager().GetCanvas(i); + r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, pCanvas != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + pCanvas->GetImageVisualElement().RemoveAllAnimations(); + pCanvas->GetFrameVisualElement().RemoveAllAnimations(); + } + + Canvas* pRootCanvas = null; + Effect* pEffect = __pEffect; + if (__pEffect != null) + { + __pEffect = null; + if (pEffect->IsRunning() == true) + { + r = pEffect->Stop(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + EffectManager::GetInstance()->DestroyEffect(*pEffect); + EffectManager::DestroyInstance(); + pEffect = null; + + pRootCanvas = GetCanvasManager().GetRootCanvas().GetImageVisualElement()->GetCanvasN(); + r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, pRootCanvas != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + pRootCanvas->SetBackgroundColor(GetCanvasManager().GetRootCanvas().GetBackgroundColor()); + r = pRootCanvas->Clear(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + delete pRootCanvas; + + r = Draw(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + ResetAnimationCount(); + + SetLastResult(E_SUCCESS); + return; + +CATCH: + if (pEffect != null) + { + EffectManager::GetInstance()->DestroyEffect(*pEffect); + EffectManager::DestroyInstance(); + pEffect = null; + } + + delete pRootCanvas; +} + +// 3d effect listener +void +_GalleryRenderer::OnEffectStarted(Effect& effect) +{ +} + +void +_GalleryRenderer::OnEffectFinished(Effect& effect, EffectResult effectResult, const IList& lastShownBitmapIds) +{ + FloatRectangle viewBounds = GetViewRect(); + int endCanvasIndex = GetEndCanvasOfPageCurling(); + result r = SetCanvasBounds(endCanvasIndex, viewBounds); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + int startCanvasIndex = GetStartCanvasOfPageCurling(); + r = SetCanvasVisibility(startCanvasIndex, false); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + delete __pTransparentBitmap; + __pTransparentBitmap = null; + + delete __pPageCurlingBitmap; + __pPageCurlingBitmap = null; + + _GalleryRendererNotification* pRendererNotifier = null; + if (effectResult == EFFECT_RESULT_FINISHED) + { + pRendererNotifier = new (std::nothrow)_GalleryRendererNotification(GALLERY_RENDERER_NOTI_TRANSITION_COMPLETED); + SysTryReturnVoidResult(NID_UI_CTRL, pRendererNotifier != null, E_OUT_OF_MEMORY, + "[E_OUT_OF_MEMORY] Failed to allocate the memory for the _GalleryRendererNotification."); + GetRendererNotifier().FireAsync(*pRendererNotifier); + } + else + { + pRendererNotifier = new (std::nothrow)_GalleryRendererNotification(GALLERY_RENDERER_NOTI_TRANSITION_CANCEL); + SysTryReturnVoidResult(NID_UI_CTRL, pRendererNotifier != null, E_OUT_OF_MEMORY, + "[E_OUT_OF_MEMORY] Failed to allocate the memory for the _GalleryRendererNotification."); + GetRendererNotifier().Fire(*pRendererNotifier); + } + + SetSlideShowPlayType(GALLERY_SLIDESHOW_NONE); + ResetAnimationCount(); +} + +// 3d effect provider +result +_GalleryRenderer::SetBitmap(Effect& effect, long bitmapId) +{ + int startCanvasIndex = GetStartCanvasOfPageCurling(); + int endCanvasIndex = GetEndCanvasOfPageCurling(); + + _GalleryCanvas* pStartCanvas = GetCanvasManager().GetCanvas(startCanvasIndex); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pStartCanvas != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _GalleryCanvas* pEndCanvas = GetCanvasManager().GetCanvas(endCanvasIndex); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pEndCanvas != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (bitmapId == 0) + { + Canvas pageCurlingCanvas; + r = pageCurlingCanvas.Construct(GetViewRect()); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + pageCurlingCanvas.SetBackgroundColor(__pControl->GetBackgroundColor()); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pageCurlingCanvas.Clear(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + FloatRectangle imageBounds = pStartCanvas->GetImageBounds(); + r = pageCurlingCanvas.DrawBitmap(imageBounds, *pStartCanvas->GetImage()->GetInternalBitmap()); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pPageCurlingBitmap = new (std::nothrow) Bitmap(); + SysTryReturn(NID_UI_CTRL, __pPageCurlingBitmap != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = __pPageCurlingBitmap->Construct(pageCurlingCanvas, GetViewRect()); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + effect.SetBitmap(bitmapId, *__pPageCurlingBitmap); + } + else if (bitmapId == 1) + { + Canvas transparentCanvas; + r = transparentCanvas.Construct(GetViewRect()); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + transparentCanvas.SetBackgroundColor(__pControl->GetBackgroundColor()); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = transparentCanvas.Clear(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + FloatRectangle imageBounds = pEndCanvas->GetImageBounds(); + r = transparentCanvas.DrawBitmap(imageBounds, *pEndCanvas->GetImage()->GetInternalBitmap()); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pTransparentBitmap = new (std::nothrow) Bitmap(); + SysTryReturn(NID_UI_CTRL, __pTransparentBitmap != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = __pTransparentBitmap->Construct(transparentCanvas, GetViewRect()); + + //r = __pTransparentBitmap->Construct(viewBounds); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + effect.SetBitmap(bitmapId, *__pTransparentBitmap); + } + + return E_SUCCESS; +} + +void +_GalleryRenderer::SetStartCanvasOfPageCurling(int startCanvasIndex) +{ + __startCanvasOfPageCurling = startCanvasIndex; +} + +int +_GalleryRenderer::GetStartCanvasOfPageCurling(void) +{ + return __startCanvasOfPageCurling; +} + +void +_GalleryRenderer::SetEndCanvasOfPageCurling(int endCanvasIndex) +{ + __endCanvasOfPageCurling = endCanvasIndex; +} + +int +_GalleryRenderer::GetEndCanvasOfPageCurling(void) +{ + return __endCanvasOfPageCurling; +} + +void +_GalleryRenderer::SetEffect(Effect* pEffect) +{ + SysTryReturnVoidResult(NID_UI_CTRL, pEffect != null, E_INVALID_ARG, "[E_INVALID_ARG] The effect object is null."); + SetLastResult(E_SUCCESS); + + if (pEffect == __pEffect) + { + return; + } + + pEffect->SetEffectEventListener(this); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + pEffect->SetResourceProvider(this); + r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pEffect = pEffect; +} + +Tizen::Ui::Effects::Effect* +_GalleryRenderer::GetEffect(void) +{ + return __pEffect; +} + +}}} // Tizen::Ui::Controls + diff --git a/src/ui/controls/FUiCtrl_GalleryRendererNotifier.cpp b/src/ui/controls/FUiCtrl_GalleryRendererNotifier.cpp new file mode 100644 index 0000000..79870bd --- /dev/null +++ b/src/ui/controls/FUiCtrl_GalleryRendererNotifier.cpp @@ -0,0 +1,76 @@ +// +// 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. +// +#include +#include +#include +#include "FUiCtrl_GalleryRendererNotifier.h" +#include "FUiCtrl_GalleryRendererNotification.h" +#include "FUiCtrl_IGalleryRendererNotiListener.h" + + +using namespace Tizen::Base::Runtime; + +namespace Tizen { namespace Ui { namespace Controls { + +_GalleryRendererNotifier::_GalleryRendererNotifier(void) +{ + // Do nothing +} + +_GalleryRendererNotifier::~_GalleryRendererNotifier(void) +{ + // Do nothing +} + +result +_GalleryRendererNotifier::Construct(void) +{ + return _Event::Initialize(); +} + +void +_GalleryRendererNotifier::FireImpl(IEventListener& listener, const IEventArg& arg) +{ + _IGalleryRendererNotiListener* pRendererNotiListener = dynamic_cast<_IGalleryRendererNotiListener*>(&listener); + SysTryReturnVoidResult(NID_UI_CTRL, pRendererNotiListener != null, E_INVALID_ARG, "[E_INVALID_ARG] IEventListener is invalid listener."); + + const _GalleryRendererNotification& rendererNotification = static_cast(arg); + + switch (rendererNotification.GetNotificationType()) + { + case GALLERY_RENDERER_NOTI_TRANSITION_CANCEL: + pRendererNotiListener->OnTransitionCancel(); + break; + case GALLERY_RENDERER_NOTI_TRANSITION_COMPLETED: + pRendererNotiListener->OnTransitionCompleted(); + break; + case GALLERY_RENDERER_NOTI_CANVAS_ANIMATION_CANCEL: + pRendererNotiListener->OnCanvasAnimationCancel(); + break; + case GALLERY_RENDERER_NOTI_CANVAS_ANIMATION_COMPLETED: + pRendererNotiListener->OnCanvasAnimationCompleted(); + break; + case GALLERY_RENDERER_NOTI_CANVAS_ANIMATION_STARTED: + pRendererNotiListener->OnCanvasAnimationStarted(); + break; + default: + SysTryReturnVoidResult(NID_UI_CTRL, false, E_INVALID_ARG, "[E_INVALID_ARG] The notification type is invalid."); + break; + } +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_GalleryViewEvent.cpp b/src/ui/controls/FUiCtrl_GalleryViewEvent.cpp new file mode 100644 index 0000000..0396d6d --- /dev/null +++ b/src/ui/controls/FUiCtrl_GalleryViewEvent.cpp @@ -0,0 +1,47 @@ +// +// 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. +// +#include "FUiCtrl_GalleryViewEvent.h" +#include "FUiCtrl_GalleryViewEventInfo.h" + +namespace Tizen { namespace Ui { namespace Controls { + +_GalleryViewEvent::_GalleryViewEvent(GalleryViewEventType eventType, _GalleryViewEventInfo* eventInfo) + : __eventType(eventType) + , __pEventInfo(eventInfo) +{ + // Do nothing +} + +_GalleryViewEvent::~_GalleryViewEvent(void) +{ + // Do nothing +} + +GalleryViewEventType +_GalleryViewEvent::GetEventType(void) const +{ + return __eventType; +} + +_GalleryViewEventInfo* +_GalleryViewEvent::GetEventInfo(void) const +{ + return __pEventInfo; +} + +}}} // Tizen::Ui::Controls + diff --git a/src/ui/controls/FUiCtrl_GalleryViewEventHandler.cpp b/src/ui/controls/FUiCtrl_GalleryViewEventHandler.cpp new file mode 100644 index 0000000..1f8111f --- /dev/null +++ b/src/ui/controls/FUiCtrl_GalleryViewEventHandler.cpp @@ -0,0 +1,1180 @@ +// +// 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. +// +#include +#include +#include +#include "FUi_Math.h" +#include "FUiCtrl_GalleryImageReader.h" +#include "FUiCtrl_GalleryPresenter.h" +#include "FUiCtrl_GalleryViewEventInfo.h" +#include "FUiCtrl_GalleryViewEventHandler.h" +#include "FUiCtrl_IGalleryRenderer.h" + + +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls { + +namespace +{ + const int FLICK_ANIMATION_DURATION = 500; + const int ALIGH_ANIMATION_DURATION = 1000; + const int ZOOM_ANIMATION_DURATION = 1000; + const int PINCH_ZOOM_ANIMATION_DURATION = 500; + const int DOUBLE_PRESSE_ZOOM_DISTANCE = 1000; + const int FLICK_MOVE_ANIMATION_DURATION = 500; + const int FLICK_MOVE_DISTANCE = 200; + const float MAX_ZOOM_RATIO = 3.0; + const float MIN_ZOOM_RATIO = 0.3; + const int NO_CHANGE_ITEM_INDEX = -1; +} + +_GalleryViewEventHandler::_GalleryViewEventHandler(_GalleryPresenter& presenter, _IGalleryRenderer& galleryRenderer, + _GalleryImageReader& galleryImageReader) + : __galleryPresenter(presenter) + , __galleryRenderer(galleryRenderer) + , __galleryImageReader(galleryImageReader) + , __previousPosition(0, 0) + , __startPinchCenterPosition(0, 0) + , __flickingDirection(FLICK_DIRECTION_NONE) + , __pinchInitialArea(0) + , __pressed(false) + , __moving(false) + , __zoomMode(false) + , __zoomAnimationComplete(true) + , __pinchMode(false) + , __touchPointId(0) + , __currentItemIndex(NO_CHANGE_ITEM_INDEX) + , __moveDirection(MOVE_DIRECTION_NONE) + , __endOfRange(false) +{ + // Do nothing. +} + +_GalleryViewEventHandler::~_GalleryViewEventHandler(void) +{ + // Do nothing. +} + +result +_GalleryViewEventHandler::Construct(void) +{ + return __galleryRenderer.AddNotiListener(*this); +} + +bool +_GalleryViewEventHandler::OnTouchPressed(_GalleryViewEventInfo& eventInfo) +{ + SysTryReturn(NID_UI_CTRL, __pressed == false, true, E_SYSTEM, "[E_SYSTEM] Already pressed state."); + result r = SetVisibleCanvas(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + __pressed = true; + __previousPosition.SetPosition(eventInfo.GetCurrentPosition()); + + __touchPointId = eventInfo.GetPointId(); + __flickingDirection = FLICK_DIRECTION_NONE; + + //SetLastResult(E_SUCCESS); + + return true; + +CATCH: + SetRollbackCanvas(); + return true; +} + +bool +_GalleryViewEventHandler::OnTouchDoublePressed(_GalleryViewEventInfo& eventInfo) +{ + _GalleryAnimationTiming animation = {ZOOM_ANIMATION_DURATION, GALLERY_ANIMATION_TIMING_FUNC_EASEOUT}; + FloatPoint center; + int distance = DOUBLE_PRESSE_ZOOM_DISTANCE; + if (__zoomMode == false) + { + center = __previousPosition; + __zoomMode = true; + } + else + { + FloatRectangle viewRect = __galleryRenderer.GetViewRect(); + center.SetPosition(viewRect.width / 2, viewRect.height / 2); + __zoomMode = false; + int currentCanvasIndex = __galleryPresenter.SearchCanvasIndex(__galleryPresenter.GetCurrentItemIndex()); + FloatRectangle canvasRect = __galleryRenderer.GetCanvasBounds(currentCanvasIndex); + distance = canvasRect.width - viewRect.width; + } + result r = ZoomCanvas(distance, center, __zoomMode, &animation); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, true, r, "[%s] Propagating.", GetErrorMessage(r)); + + __zoomAnimationComplete = false; + __pressed = false; + + r = RefreshView(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, true, r, "[%s] Propagating.", GetErrorMessage(r)); + + //SetLastResult(E_SUCCESS); + + return true; +} + +bool +_GalleryViewEventHandler::OnTouchMoved(_GalleryViewEventInfo& eventInfo) +{ + if (__moveDirection == MOVE_DIRECTION_VERTICAL) + { + return false; + } + + if (__pinchMode == true || __touchPointId != eventInfo.GetPointId()) + { + return true; + } + + FloatDimension distance; + distance.width = __previousPosition.x - eventInfo.GetCurrentPosition().x; + distance.height = __previousPosition.y - eventInfo.GetCurrentPosition().y; + + result r = MoveCanvas(distance); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, true, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = RefreshView(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, true, r, "[%s] Propagating.", GetErrorMessage(r)); + + __previousPosition.SetPosition(eventInfo.GetCurrentPosition()); + + //SetLastResult(E_SUCCESS); + + return __moveDirection == MOVE_DIRECTION_VERTICAL ? false : !__endOfRange; +} + +bool +_GalleryViewEventHandler::OnTouchReleased(_GalleryViewEventInfo& eventInfo) +{ + result r = E_SUCCESS; + bool itemClickedSuccess = true; + if (__pressed == true) + { + if (__moving == true) + { + if (__flickingDirection == FLICK_DIRECTION_NONE) + { + r = AlignCanvas(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + __moving = false; + } + else + { + if (IsZoomFlag() == true && __zoomAnimationComplete == true) + { + r = __galleryPresenter.SetPartialCanvasImage(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating", GetErrorMessage(r)); + } + itemClickedSuccess = __galleryPresenter.ClickedItem(); + } + __pressed = false; + } + + if (__pinchMode == true) + { + FloatRectangle viewRect = __galleryRenderer.GetViewRect(); + + int currentCanvasIndex = __galleryPresenter.SearchCanvasIndex(__galleryPresenter.GetCurrentItemIndex()); + FloatRectangle canvasRect = __galleryRenderer.GetCanvasBounds(currentCanvasIndex); + float distance = canvasRect.width - viewRect.width; + + if (distance < 0) + { + FloatPoint center(viewRect.width / 2, viewRect.height / 2); + _GalleryAnimationTiming animation = {PINCH_ZOOM_ANIMATION_DURATION, GALLERY_ANIMATION_TIMING_FUNC_EASEOUT}; + r = ZoomCanvas(distance, center, false, &animation); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, true, r, "[%s] Propagating.", GetErrorMessage(r)); + //__zoomMode = false; + } + else + { + r = AlignCanvas(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + __pinchInitialArea = 0; + __startPinchCenterPosition.SetPosition(0.0, 0.0); + __pinchMode = false; + } + + r = RefreshView(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + __flickingDirection = FLICK_DIRECTION_NONE; + __moveDirection = MOVE_DIRECTION_NONE; + + //SetLastResult(E_SUCCESS); + + return true; + +CATCH: + SetRollbackCanvas(); + __moving = false; + __pressed = false; + __pinchInitialArea = 0; + __pinchMode = false; + __flickingDirection = FLICK_DIRECTION_NONE; + __zoomMode = false; + return true; +} + +bool +_GalleryViewEventHandler::ResetTouch(void) +{ + result r = E_SUCCESS; + + __pressed = false; + __moving = false; + __pinchInitialArea = 0; + __startPinchCenterPosition.SetPosition(0.0, 0.0); + __pinchMode = false; + __flickingDirection = FLICK_DIRECTION_NONE; + + r = SetVisibleCanvas(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, true, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = RefreshView(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, true, r, "[%s] Propagating.", GetErrorMessage(r)); + + return true; +} + + +bool +_GalleryViewEventHandler::OnTouchPinchZoom(_GalleryViewEventInfo& eventInfo) +{ + if (__galleryPresenter.IsZoomingEnabled() == false) + { + return true; + } + + if (__moving == true) + { + return true; + } + + FloatPoint center = eventInfo.GetPinchCenterPosition(); + int currentCanvasIndex = __galleryPresenter.SearchCanvasIndex(__galleryPresenter.GetCurrentItemIndex()); + FloatRectangle canvasRect = __galleryRenderer.GetCanvasBounds(currentCanvasIndex); + FloatRectangle viewRect = __galleryRenderer.GetViewRect(); + + int area = eventInfo.GetPinchArea(); + + if (__pinchInitialArea == 0) + { + __pinchInitialArea = area; + area = 0; + } + else + { + area -= __pinchInitialArea; + __pinchInitialArea += area; + } + + //__zoomMode = true; + __pinchMode = true; + bool zoomIn = true; + if (area < 0) + { + zoomIn = false; + area = -area; + } + + float factor = canvasRect.width / viewRect.width; + + __startPinchCenterPosition = center; + __startPinchCenterPosition.x = CalculateRound((__startPinchCenterPosition.x - canvasRect.x) / factor); + __startPinchCenterPosition.y = CalculateRound((__startPinchCenterPosition.y - canvasRect.y) / factor); + + result r = PinchZoomCanvas(area, center, zoomIn); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, true, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pressed = false; //??? + r = RefreshView(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, true, r, "[%s] Propagating.", GetErrorMessage(r)); + + SetLastResult(E_SUCCESS); + + return true; +} + +bool +_GalleryViewEventHandler::OnTouchFlicked(_GalleryViewEventInfo& eventInfo) +{ + SysTryReturn(NID_UI_CTRL, __pressed == true, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] not pressed state."); + + if (__pinchMode == true) + { + return true; + } + + if (__moveDirection == MOVE_DIRECTION_VERTICAL) + { + return false; + } + + result r = E_SUCCESS; + if (__zoomMode == false) + { + if (eventInfo.GetFlickPosition(). x == 0) + { + return false; + } + + __moving = true; + if (eventInfo.GetFlickPosition().x > 0) + { + r = FlickToTheRight(); + } + else if (eventInfo.GetFlickPosition().x < 0) + { + r = FlickToTheLeft(); + } + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + _GalleryAnimationTiming animation = {FLICK_MOVE_ANIMATION_DURATION, GALLERY_ANIMATION_TIMING_FUNC_EASEOUT}; + + int moveX = 0; + int moveY = 0; + if (eventInfo.GetFlickPosition().x > 0) + { + moveX = -FLICK_MOVE_DISTANCE; + } + else + { + moveX = FLICK_MOVE_DISTANCE; + } + + if (eventInfo.GetFlickPosition().y > 0) + { + moveY = -FLICK_MOVE_DISTANCE; + } + else + { + moveY = FLICK_MOVE_DISTANCE; + } + + FloatDimension dim(moveX, moveY); + r = MoveCanvas(dim, &animation); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + r = RefreshView(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + //SetLastResult(E_SUCCESS); + + return !__endOfRange; + +CATCH: + SetRollbackCanvas(); + + return true; +} + +bool +_GalleryViewEventHandler::OnTouchCanceled(void) +{ + ResetTouch(); + AlignCanvas(); + + return true; +} + +void +_GalleryViewEventHandler::OnTransitionCancel(void) +{ +} + +void +_GalleryViewEventHandler::OnTransitionCompleted(void) +{ +} + +void +_GalleryViewEventHandler::OnCanvasAnimationCancel(void) +{ + __zoomAnimationComplete = true; + __flickingDirection = FLICK_DIRECTION_NONE; + result r = CallChangeItemIndex(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = RefreshView(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + //SetLastResult(E_SUCCESS); +} + +void +_GalleryViewEventHandler::OnCanvasAnimationCompleted(void) +{ + result r = E_SUCCESS; + + if (__zoomAnimationComplete == false) + { + r = AlignCanvas(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + __zoomAnimationComplete = true; + } + + if (__zoomMode == true) + { + r = AlignCanvas(false); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __galleryPresenter.SetPartialCanvasImage(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + __flickingDirection = FLICK_DIRECTION_NONE; + + r = CallChangeItemIndex(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = RefreshView(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + //SetLastResult(E_SUCCESS); +} + +void +_GalleryViewEventHandler::OnCanvasAnimationStarted(void) +{ + +} + +void +_GalleryViewEventHandler::SetZoomFlag(bool zoomMode) +{ + __zoomMode = zoomMode; +} + +bool +_GalleryViewEventHandler::IsZoomFlag(void) const +{ + return __zoomMode; +} + +result +_GalleryViewEventHandler::RefreshView(void) +{ + return __galleryRenderer.RefreshView(); +} + +result +_GalleryViewEventHandler::SetVisibleCanvas(void) +{ + int currentItemIndex = __galleryPresenter.GetCurrentItemIndex(); + SysTryReturn(NID_UI_CTRL, currentItemIndex >= 0 && currentItemIndex < __galleryPresenter.GetItemCount(), E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] This value(%d) is out of range(%d ~ %d)", currentItemIndex, 0, __galleryPresenter.GetItemCount()); + + FloatRectangle viewRect = __galleryRenderer.GetViewRect(); + FloatRectangle rect = viewRect; + + // current item + int currentCanvasIndex = __galleryPresenter.SearchCanvasIndex(currentItemIndex); + result r = E_SUCCESS; + if (currentCanvasIndex == NOT_EXIST_CANVAS) + { + r = __galleryPresenter.SetCanvasImage(currentItemIndex); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + if (__zoomMode == false) + { + r = __galleryRenderer.SetCanvasBounds(currentCanvasIndex, rect); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + FloatRectangle currentCanvasRect = __galleryRenderer.GetCanvasBounds(currentCanvasIndex); + r = __galleryRenderer.SetCanvasBounds(currentCanvasIndex, currentCanvasRect); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + r = __galleryRenderer.SetCanvasVisibility(currentCanvasIndex, true); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + FloatRectangle currentCanvasAlignBoundary = __galleryRenderer.GetCanvasAlignBoundary(currentCanvasIndex); + // left item + if (currentItemIndex - 1 >= 0 && currentItemIndex - 1 < __galleryPresenter.GetItemCount()) + { + int leftCanvasIndex = __galleryPresenter.SearchCanvasIndex(currentItemIndex - 1); + if (leftCanvasIndex == NOT_EXIST_CANVAS) + { + r = __galleryPresenter.SetCanvasImage(currentItemIndex - 1); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + leftCanvasIndex = __galleryPresenter.SearchCanvasIndex(currentItemIndex - 1); + SysTryReturn(NID_UI_CTRL, leftCanvasIndex != NOT_EXIST_CANVAS, GetLastResult(), GetLastResult(), + "[%s] Propagating.", GetErrorMessage(GetLastResult())); + } + rect = viewRect; + rect.x = currentCanvasAlignBoundary.x - viewRect.width - __galleryPresenter.GetItemSpacing(); + r = __galleryRenderer.SetCanvasBounds(leftCanvasIndex, rect); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __galleryRenderer.SetCanvasVisibility(leftCanvasIndex, true); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + // right item + if (currentItemIndex + 1 >= 0 && currentItemIndex + 1 < __galleryPresenter.GetItemCount()) + { + int rightCanvasIndex = __galleryPresenter.SearchCanvasIndex(currentItemIndex + 1); + if (rightCanvasIndex == NOT_EXIST_CANVAS) + { + r = __galleryPresenter.SetCanvasImage(currentItemIndex + 1); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + rightCanvasIndex = __galleryPresenter.SearchCanvasIndex(currentItemIndex + 1); + SysTryReturn(NID_UI_CTRL, rightCanvasIndex != NOT_EXIST_CANVAS, GetLastResult(), GetLastResult(), + "[%s] Propagating.", GetErrorMessage(GetLastResult())); + } + rect = viewRect; + rect.x = currentCanvasAlignBoundary.x + currentCanvasAlignBoundary.width + __galleryPresenter.GetItemSpacing(); + r = __galleryRenderer.SetCanvasBounds(rightCanvasIndex, rect); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __galleryRenderer.SetCanvasVisibility(rightCanvasIndex, true); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + return E_SUCCESS; +} + +result +_GalleryViewEventHandler::SetInvisibleCanvas(void) +{ + int currentItemIndex = __galleryPresenter.GetCurrentItemIndex(); + SysTryReturn(NID_UI_CTRL, currentItemIndex >= 0 && currentItemIndex < __galleryPresenter.GetItemCount(), E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] This value(%d) is out of range(%d ~ %d)", currentItemIndex, 0, __galleryPresenter.GetItemCount()); + + int leftCanvasIndex = __galleryPresenter.SearchCanvasIndex(currentItemIndex - 1); + int rightCanvasIndex = __galleryPresenter.SearchCanvasIndex(currentItemIndex + 1); + + result r = E_SUCCESS; + if (leftCanvasIndex != NOT_EXIST_CANVAS) + { + r = __galleryRenderer.SetCanvasVisibility(leftCanvasIndex, false); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + if (rightCanvasIndex != NOT_EXIST_CANVAS) + { + r = __galleryRenderer.SetCanvasVisibility(rightCanvasIndex, false); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + return E_SUCCESS; +} + +result +_GalleryViewEventHandler::FlickToTheRight(void) +{ + result r = E_SUCCESS; + FloatRectangle viewRect = __galleryRenderer.GetViewRect(); + FloatRectangle rect = viewRect; + int currentItemIndex = __galleryPresenter.GetCurrentItemIndex(); + int leftCanvasIndex = __galleryPresenter.SearchCanvasIndex(currentItemIndex - 1); + __endOfRange = false; + + __flickingDirection = FLICK_DIRECTION_RIGHT; + if (leftCanvasIndex == NOT_EXIST_CANVAS) + { + if (currentItemIndex - 1 < 0) + { + __flickingDirection = FLICK_DIRECTION_NONE; + __endOfRange = true; + return E_SUCCESS; + } + else + { + r = __galleryPresenter.SetCanvasImage(currentItemIndex - 1); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + leftCanvasIndex = __galleryPresenter.SearchCanvasIndex(currentItemIndex - 1); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, leftCanvasIndex != NOT_EXIST_CANVAS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + rect.x = viewRect.x - viewRect.width - __galleryPresenter.GetItemSpacing(); + r = __galleryRenderer.SetCanvasBounds(leftCanvasIndex, rect); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __galleryRenderer.SetCanvasVisibility(leftCanvasIndex, true); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + + int currentCanvasIndex = __galleryPresenter.SearchCanvasIndex(currentItemIndex); + int rightCanvasIndex = __galleryPresenter.SearchCanvasIndex(currentItemIndex + 1); + + _GalleryAnimationTiming animation = {FLICK_ANIMATION_DURATION, GALLERY_ANIMATION_TIMING_FUNC_EASEOUT}; + + rect.x = viewRect.x + viewRect.width + __galleryPresenter.GetItemSpacing(); + r = __galleryRenderer.SetCanvasBounds(currentCanvasIndex, rect, &animation); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + rect.x = viewRect.x; + r = __galleryRenderer.SetCanvasBounds(leftCanvasIndex, rect, &animation); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (rightCanvasIndex != NOT_EXIST_CANVAS) + { + rect.x = viewRect.x + viewRect.width * 2 + __galleryPresenter.GetItemSpacing(); + r = __galleryRenderer.SetCanvasBounds(rightCanvasIndex, rect, &animation); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + r = SetCurrentItemIndex(__galleryPresenter.GetCurrentItemIndex() - 1); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +_GalleryViewEventHandler::FlickToTheLeft(void) +{ + result r = E_SUCCESS; + FloatRectangle viewRect = __galleryRenderer.GetViewRect(); + FloatRectangle rect = viewRect; + int currentItemIndex = __galleryPresenter.GetCurrentItemIndex(); + int rightCanvasIndex = __galleryPresenter.SearchCanvasIndex(currentItemIndex + 1); + __endOfRange = false; + + __flickingDirection = FLICK_DIRECTION_LEFT; + if (rightCanvasIndex == NOT_EXIST_CANVAS) + { + if (currentItemIndex + 1 >= __galleryPresenter.GetItemCount()) + { + __flickingDirection = FLICK_DIRECTION_NONE; + __endOfRange = true; + return E_SUCCESS; + } + else + { + r = __galleryPresenter.SetCanvasImage(currentItemIndex + 1); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + rightCanvasIndex = __galleryPresenter.SearchCanvasIndex(currentItemIndex + 1); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, rightCanvasIndex != NOT_EXIST_CANVAS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + rect.x = viewRect.x + viewRect.width + __galleryPresenter.GetItemSpacing(); + r = __galleryRenderer.SetCanvasBounds(rightCanvasIndex, rect); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __galleryRenderer.SetCanvasVisibility(rightCanvasIndex, true); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + + int currentCanvasIndex = __galleryPresenter.SearchCanvasIndex(currentItemIndex); + int leftCanvasIndex = __galleryPresenter.SearchCanvasIndex(currentItemIndex - 1); + _GalleryAnimationTiming animation = {FLICK_ANIMATION_DURATION, GALLERY_ANIMATION_TIMING_FUNC_EASEOUT}; + + rect.x = viewRect.x - viewRect.width - __galleryPresenter.GetItemSpacing(); + r = __galleryRenderer.SetCanvasBounds(currentCanvasIndex, rect, &animation); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + rect.x = viewRect.x; + r = __galleryRenderer.SetCanvasBounds(rightCanvasIndex, rect, &animation); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (leftCanvasIndex != NOT_EXIST_CANVAS) + { + rect.x = viewRect.x - viewRect.width * 2 - __galleryPresenter.GetItemSpacing(); + r = __galleryRenderer.SetCanvasBounds(leftCanvasIndex, rect, &animation); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + r = SetCurrentItemIndex(__galleryPresenter.GetCurrentItemIndex() + 1); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +_GalleryViewEventHandler::ZoomCanvas(float distance, const FloatPoint& center, bool zoomIn, _GalleryAnimationTiming* pAnimation) +{ + if (__galleryPresenter.IsZoomingEnabled() == false || distance == 0.0) + { + __zoomMode = false; + return E_SUCCESS; + } + + int currentItemIndex = __galleryPresenter.GetCurrentItemIndex(); + int currentCanvasIndex = __galleryPresenter.SearchCanvasIndex(currentItemIndex); + if (__galleryRenderer.IsCanvasVisibility(currentCanvasIndex) == false) + { + result r = __galleryRenderer.SetCanvasVisibility(currentCanvasIndex, true); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + FloatRectangle canvasBounds = __galleryRenderer.GetCanvasBounds(currentCanvasIndex); + FloatRectangle imageBounds = __galleryRenderer.GetCanvasImageBounds(currentCanvasIndex); + FloatRectangle viewBounds = __galleryRenderer.GetViewRect(); + float factor = 1.0; + if (zoomIn == true) + { + factor = (canvasBounds.width + distance) / viewBounds.width; + canvasBounds.width = factor * viewBounds.width; + canvasBounds.height = factor * viewBounds.height; + canvasBounds.x = -(center.x * factor - viewBounds.width / 2); + canvasBounds.y = -(center.y * factor - viewBounds.height/ 2); + + imageBounds.x *= factor; + imageBounds.y *= factor; + imageBounds.width *= factor; + imageBounds.height *= factor; + + CorrectCanvasPosition(canvasBounds, imageBounds); + } + else + { + canvasBounds = viewBounds; + } + + result r = __galleryRenderer.SetCanvasBounds(currentCanvasIndex, canvasBounds, pAnimation); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (canvasBounds.width > viewBounds.width) + { + __zoomMode = true; + } + else + { + __zoomMode = false; + } + + return E_SUCCESS; +} + +result +_GalleryViewEventHandler::PinchZoomCanvas(int area, const FloatPoint& center, bool zoomIn) +{ + if (__galleryPresenter.IsZoomingEnabled() == false || area == 0 || + __startPinchCenterPosition.x == 0 || __startPinchCenterPosition.y == 0) + { + return E_SUCCESS; + } + + int currentItemIndex = __galleryPresenter.GetCurrentItemIndex(); + int currentCanvasIndex = __galleryPresenter.SearchCanvasIndex(currentItemIndex); + + FloatRectangle bounds = __galleryRenderer.GetCanvasBounds(currentCanvasIndex); + FloatRectangle viewBounds = __galleryRenderer.GetViewRect(); + + float factor = 1.0f; + if (zoomIn == true) + { + factor = (bounds.width + area) / viewBounds.width; + if (factor > MAX_ZOOM_RATIO) + { + factor = MAX_ZOOM_RATIO; + } + } + else + { + factor = (bounds.width - area) / viewBounds.width; + if (factor < MIN_ZOOM_RATIO) + { + factor = MIN_ZOOM_RATIO; + } + } + + bounds.width = CalculateRound(factor * viewBounds.width); + if (bounds.width < 1) + { + bounds.width = 1; + } + + bounds.height = CalculateRound(factor * viewBounds.height); + if (bounds.height < 1) + { + bounds.height = 1; + } + + if (bounds.width > viewBounds.width || bounds.height > viewBounds.height) + { + bounds.x = center.x - CalculateRound(__startPinchCenterPosition.x * factor); + bounds.y = center.y - CalculateRound(__startPinchCenterPosition.y * factor); + + if (bounds.x > 0) + { + bounds.x = 0; + } + else if (bounds.x < -(bounds.width - viewBounds.width)) + { + bounds.x = -(bounds.width - viewBounds.width); + } + + if (bounds.y > 0) + { + bounds.y = 0; + } + else if (bounds.y < -(bounds.height- viewBounds.height)) + { + bounds.y = -(bounds.height - viewBounds.height); + } + } + else + { + bounds.x = (viewBounds.width / 2) - CalculateRound(viewBounds.width / 2 * factor); + bounds.y = (viewBounds.height / 2) - CalculateRound(viewBounds.height / 2 * factor); + } + + result r = __galleryRenderer.SetCanvasBounds(currentCanvasIndex, bounds); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (bounds.width > viewBounds.width) + { + __zoomMode = true; + } + else + { + __zoomMode = false; + } + + return E_SUCCESS; +} + +result +_GalleryViewEventHandler::MoveCanvas(const FloatDimension& distance, _GalleryAnimationTiming* pAnimation) +{ + SysTryReturn(NID_UI_CTRL, __pressed == true, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] not pressed state."); + + int currentItemIndex = __galleryPresenter.GetCurrentItemIndex(); + int currentCanvasIndex = __galleryPresenter.SearchCanvasIndex(currentItemIndex); + int rightCanvasIndex = NOT_EXIST_CANVAS; + int leftCanvasIndex = NOT_EXIST_CANVAS; + __endOfRange = false; + + if (currentItemIndex != 0) + { + leftCanvasIndex = __galleryPresenter.SearchCanvasIndex(currentItemIndex - 1); + } + if (currentItemIndex < __galleryPresenter.GetItemCount()) + { + rightCanvasIndex = __galleryPresenter.SearchCanvasIndex(currentItemIndex + 1); + } + + FloatRectangle viewRect = __galleryRenderer.GetViewRect(); + FloatRectangle currentCanvasRect = __galleryRenderer.GetCanvasBounds(currentCanvasIndex); + FloatRectangle rect = currentCanvasRect; + + FloatRectangle canvasImageBounds = __galleryRenderer.GetCanvasImageBounds(currentCanvasIndex); + if (IsZoomFlag() == true) + { + if (canvasImageBounds.y + rect.y > 0) + { + rect.y -= (distance.height / 2); + } + else if (canvasImageBounds.y + canvasImageBounds.height + rect.y < viewRect.height) + { + rect.y -= (distance.height / 2); + } + else + { + rect.y -= distance.height; + } + + if (leftCanvasIndex == NOT_EXIST_CANVAS && canvasImageBounds.x + rect.x > 0 && distance.width < 0) + { + rect.x -= (distance.width / 2); + } + else if (rightCanvasIndex == NOT_EXIST_CANVAS + && canvasImageBounds.x + canvasImageBounds.width + rect.x < viewRect.width + && distance.width > 0) + { + rect.x -= (distance.width / 2); + } + else + { + rect.x -= distance.width; + } + } + else + { + if (__moveDirection == MOVE_DIRECTION_NONE && _Abs(distance.width) < _Abs(distance.height)) + { + __moveDirection = MOVE_DIRECTION_VERTICAL; + return E_SUCCESS; + } + else + { + __moveDirection = MOVE_DIRECTION_HORIZONTAL; + } + rect.x -= distance.width; + } + + if (rect.x > 0 && leftCanvasIndex == NOT_EXIST_CANVAS && __zoomMode == false) + { + __endOfRange = true; + return E_SUCCESS; + } + else if (rect.x < 0 && rightCanvasIndex == NOT_EXIST_CANVAS && __zoomMode == false) + { + __endOfRange = true; + return E_SUCCESS; + } + + result r = __galleryRenderer.SetCanvasBounds(currentCanvasIndex, rect, pAnimation); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (rightCanvasIndex != NOT_EXIST_CANVAS) + { + rect = __galleryRenderer.GetCanvasBounds(rightCanvasIndex); + //rect.x = currentCanvasRect.x - distance.width + currentCanvasRect.width + __galleryPresenter.GetItemSpacing(); + rect.x -= distance.width; + r = __galleryRenderer.SetCanvasBounds(rightCanvasIndex, rect, pAnimation); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + if (leftCanvasIndex != NOT_EXIST_CANVAS) + { + rect = __galleryRenderer.GetCanvasBounds(leftCanvasIndex); + //rect.x = currentCanvasRect.x - distance.width - rect.width - __galleryPresenter.GetItemSpacing(); + rect.x -= distance.width; + r = __galleryRenderer.SetCanvasBounds(leftCanvasIndex, rect, pAnimation); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + __moving = true; + + return E_SUCCESS; +} + +result +_GalleryViewEventHandler::AlignCanvas(bool animation) +{ + int currentItemIndex = __galleryPresenter.GetCurrentItemIndex(); + int currentCanvasIndex = __galleryPresenter.SearchCanvasIndex(currentItemIndex); + int leftCanvasIndex = __galleryPresenter.SearchCanvasIndex(currentItemIndex - 1); + int rightCanvasIndex = __galleryPresenter.SearchCanvasIndex(currentItemIndex + 1); + + result r = E_SUCCESS; + FloatRectangle viewRect = __galleryRenderer.GetViewRect(); + FloatRectangle currentCanvasRect = __galleryRenderer.GetCanvasBounds(currentCanvasIndex); + FloatRectangle canvasImageBounds = __galleryRenderer.GetCanvasImageBounds(currentCanvasIndex); + + FloatRectangle rect = viewRect; + _GalleryAnimationTiming* pAnimationTimingFunction = null; + bool immediatePartialCanvasChange = false; + + if (animation == true) + { + __galleryRenderer.StopAllCanvasAnimation(); + pAnimationTimingFunction = new(std::nothrow) _GalleryAnimationTiming(); + SysTryCatch(NID_UI_CTRL, pAnimationTimingFunction != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + pAnimationTimingFunction->duration_ms = ALIGH_ANIMATION_DURATION; + pAnimationTimingFunction->timingFunction = GALLERY_ANIMATION_TIMING_FUNC_EASEOUT; + } + + if (__zoomMode == true) + { + if (!(viewRect.y < canvasImageBounds.y && viewRect.height > canvasImageBounds.height + canvasImageBounds.y)) + { + immediatePartialCanvasChange = true; + } + } + + if ((IsZoomFlag() == true + && currentCanvasRect.x + canvasImageBounds.x > __galleryRenderer.GetViewRect().width / 2 + && (leftCanvasIndex != NOT_EXIST_CANVAS)) + || (IsZoomFlag() == false + && (canvasImageBounds.width / 2 + canvasImageBounds.x) < canvasImageBounds.x + currentCanvasRect.x)) // ----> align + { + r = __galleryRenderer.SetCanvasBounds(leftCanvasIndex, rect, pAnimationTimingFunction); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = SetCurrentItemIndex(currentItemIndex - 1); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + rect = viewRect; + rect.x = viewRect.width + __galleryPresenter.GetItemSpacing(); + r = __galleryRenderer.SetCanvasBounds(currentCanvasIndex, rect, pAnimationTimingFunction); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + else if ((IsZoomFlag() == true + && currentCanvasRect.x + (canvasImageBounds.x + canvasImageBounds.width) < __galleryRenderer.GetViewRect().width / 2 + && (rightCanvasIndex != NOT_EXIST_CANVAS)) + ||(IsZoomFlag() == false + && (canvasImageBounds.width / 2 + canvasImageBounds.x) > currentCanvasRect.x + currentCanvasRect.width)) // <---- align + { + r = __galleryRenderer.SetCanvasBounds(rightCanvasIndex, rect, pAnimationTimingFunction); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = SetCurrentItemIndex(currentItemIndex + 1); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + rect = viewRect; + rect.x = -viewRect.width - __galleryPresenter.GetItemSpacing(); + r = __galleryRenderer.SetCanvasBounds(currentCanvasIndex, rect, pAnimationTimingFunction); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + else if (currentCanvasRect.x != 0 || currentCanvasRect.width != viewRect.width)// return align (before position) + { + if (currentCanvasIndex != NOT_EXIST_CANVAS) + { + rect = currentCanvasRect; + if (__zoomMode == true) + { + bool corrected = CorrectCanvasPosition(rect, canvasImageBounds); + if ((animation != true || corrected == false) && + immediatePartialCanvasChange == true && __zoomAnimationComplete == true) + { + r = __galleryPresenter.SetPartialCanvasImage(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating", GetErrorMessage(r)); + } + } + else + { + rect = viewRect; + } + + r = __galleryRenderer.SetCanvasBounds(currentCanvasIndex, rect, pAnimationTimingFunction); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + FloatRectangle currentCanvasAlignBoundary = __galleryRenderer.GetCanvasAlignBoundary(currentCanvasIndex); + if (rightCanvasIndex != NOT_EXIST_CANVAS) + { + rect = viewRect; + rect.x = currentCanvasAlignBoundary.x + currentCanvasAlignBoundary.width + __galleryPresenter.GetItemSpacing(); + r = __galleryRenderer.SetCanvasBounds(rightCanvasIndex, rect, pAnimationTimingFunction); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + if (leftCanvasIndex != NOT_EXIST_CANVAS) + { + rect = viewRect; + rect.x = currentCanvasAlignBoundary.x - rect.width - __galleryPresenter.GetItemSpacing(); + r = __galleryRenderer.SetCanvasBounds(leftCanvasIndex, rect, pAnimationTimingFunction); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + + delete pAnimationTimingFunction; + + return E_SUCCESS; + +CATCH: + delete pAnimationTimingFunction; + return r; +} + +void +_GalleryViewEventHandler::SetRollbackCanvas(void) +{ + int currentItemIndex = __galleryPresenter.GetCurrentItemIndex(); + int currentCanvasIndex = __galleryPresenter.SearchCanvasIndex(currentItemIndex); + int leftCanvasIndex = __galleryPresenter.SearchCanvasIndex(currentItemIndex - 1); + int rightCanvasIndex = __galleryPresenter.SearchCanvasIndex(currentItemIndex + 1); + + FloatRectangle viewRect = __galleryRenderer.GetViewRect(); + + result r = __galleryRenderer.SetCanvasBounds(currentCanvasIndex, viewRect); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __galleryRenderer.SetCanvasVisibility(leftCanvasIndex, false); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __galleryRenderer.SetCanvasVisibility(rightCanvasIndex, false); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + //SetLastResult(E_SUCCESS); +} + +int +_GalleryViewEventHandler::CalculateRound(float value) +{ + int returnValue = ((int)((value) * 10)) % 10 > 5 ? value + 0.5 : value; + return returnValue; +} + +bool +_GalleryViewEventHandler::CorrectCanvasPosition(FloatRectangle& canvasBounds, const FloatRectangle& imageBounds) +{ + if (IsZoomFlag() == false) + { + return false; + } + FloatRectangle viewBounds = __galleryRenderer.GetViewRect(); + bool corrected = false; + if (imageBounds.width > viewBounds.width) + { + if (viewBounds.x < imageBounds.x + canvasBounds.x) + { + canvasBounds.x = -imageBounds.x; + corrected = true; + } + else if (viewBounds.width > imageBounds.x + imageBounds.width + canvasBounds.x) + { + canvasBounds.x = (viewBounds.x + viewBounds.width) - (imageBounds.x + imageBounds.width); + corrected = true; + } + } + else + { + canvasBounds.x = viewBounds.width / 2 -((imageBounds.width / 2 + imageBounds.x)); + corrected = true; + } + + if (imageBounds.height > viewBounds.height) + { + if (viewBounds.y < imageBounds.y + canvasBounds.y) + { + canvasBounds.y = -imageBounds.y; + corrected = true; + } + else if (viewBounds.height > imageBounds.height + imageBounds.y + canvasBounds.y) + { + canvasBounds.y = (viewBounds.y + viewBounds.height) - (imageBounds.y + imageBounds.height); + corrected = true; + } + } + else + { + canvasBounds.y = viewBounds.height / 2 -((imageBounds.height / 2 + imageBounds.y)); + corrected = true; + } + + return corrected; +} + +result +_GalleryViewEventHandler::SetCurrentItemIndex(int index) +{ + __currentItemIndex = index; + + return __galleryPresenter.SetCurrentItemIndex(__currentItemIndex, false); +} + +result +_GalleryViewEventHandler::CallChangeItemIndex(void) +{ + result r = E_SUCCESS; + if (__currentItemIndex != NO_CHANGE_ITEM_INDEX) + { + r = __galleryPresenter.SetCurrentItemIndex(__currentItemIndex); + __currentItemIndex = NO_CHANGE_ITEM_INDEX; + __galleryPresenter.ChangedItem(); + } + return r; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_GalleryViewEventInfo.cpp b/src/ui/controls/FUiCtrl_GalleryViewEventInfo.cpp new file mode 100644 index 0000000..81fb62f --- /dev/null +++ b/src/ui/controls/FUiCtrl_GalleryViewEventInfo.cpp @@ -0,0 +1,138 @@ +// +// 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. +// +#include +#include "FUi_CoordinateSystemUtils.h" +#include "FUiCtrl_GalleryViewEventInfo.h" + +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls { + +_GalleryViewEventInfo::_GalleryViewEventInfo(void) + : __pTouchInfo(null) + , __flicked(false) + , __flickPosition(0, 0) + , __flickTime(0) + , __pinchCenterPosition(0, 0) + , __PinchArea(0) +{ + // Do nothing +} + +_GalleryViewEventInfo::_GalleryViewEventInfo(_TouchInfo& touchInfo) + : __pTouchInfo(&touchInfo) + , __flicked(false) + , __flickPosition(0, 0) + , __flickTime(0) + , __pinchCenterPosition(0, 0) + , __PinchArea(0) +{ + // Do nothing. +} + +_GalleryViewEventInfo::~_GalleryViewEventInfo(void) +{ + // Do nothing. +} + +Tizen::Graphics::FloatPoint +_GalleryViewEventInfo::GetCurrentPosition(void) const +{ + if (__pTouchInfo == null) + { + return FloatPoint(0.0f, 0.0f); + } + else + { + return __pTouchInfo->GetCurrentPosition(); + } +} + +void +_GalleryViewEventInfo::SetFlicked(bool flicked) +{ + __flicked = flicked; +} + +bool +_GalleryViewEventInfo::IsFlicked(void) const +{ + return __flicked; +} + +void +_GalleryViewEventInfo::SetFlickPosition(Tizen::Graphics::Point flickPos) +{ + __flickPosition = flickPos; +} + +Tizen::Graphics::Point +_GalleryViewEventInfo::GetFlickPosition(void) const +{ + return __flickPosition; +} + +void +_GalleryViewEventInfo::SetFlickTime(int flickTime) +{ + __flickTime = flickTime; +} + +int +_GalleryViewEventInfo::GetFlickTime(void) const +{ + return __flickTime; +} + +void +_GalleryViewEventInfo::SetPinchCenterPosition(Tizen::Graphics::FloatPoint centerPos) +{ + __pinchCenterPosition = centerPos; +} + +Tizen::Graphics::FloatPoint +_GalleryViewEventInfo::GetPinchCenterPosition(void) const +{ + return __pinchCenterPosition; +} + +void +_GalleryViewEventInfo::SetPinchArea(int distance) +{ + __PinchArea = distance; +} + +int +_GalleryViewEventInfo::GetPinchArea(void) const +{ + return __PinchArea; +} + +unsigned long +_GalleryViewEventInfo::GetPointId(void) const +{ + if (__pTouchInfo == null) + { + return 0; + } + else + { + return __pTouchInfo->GetPointId(); + } +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_GroupContainer.cpp b/src/ui/controls/FUiCtrl_GroupContainer.cpp new file mode 100644 index 0000000..38dcbe9 --- /dev/null +++ b/src/ui/controls/FUiCtrl_GroupContainer.cpp @@ -0,0 +1,1314 @@ +// +// 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_GroupContainer.cpp + * @brief This is the implementation file for the _GroupContainer class. + * + */ + +#include +#include +#include +#include "FUiCtrl_GroupContainer.h" +#include "FUiAnim_VisualElement.h" +#include "FUi_ControlImpl.h" +#include "FUiCtrl_GroupContainerImpl.h" +#include "FUi_ControlManager.h" +#include "FUi_ResourceManager.h" +#include "FUiCtrl_Label.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Base; +using namespace Tizen::Ui::Animations; +using namespace Tizen::Base::Utility; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_GroupContainer::_GroupContainer(void) + : __pCellsArray(null) + , __pGroupContainerImpl(null) + , __pGroupContainerPresenter(null) + , __rowCount(0) + , __columnCount(0) + , __childAttachedRowIndex(-1) + , __childAttachedColumnIndex(-1) + , __lineWidth(0) + , __lineColor() + , __isChildAdding(false) + , __pStretchableRowIndex(null) + , __pStretchableColumnIndex(null) + , __pSystemControl(null) + , __pContentProvider(null) +{ + +} + +_GroupContainer::~_GroupContainer(void) +{ + for (int i = 0; i < __rowCount; i++) + { + delete[] __pCellsArray[i]; + } + delete[] __pCellsArray; + delete __pGroupContainerPresenter; + __pGroupContainerPresenter = null; + + delete[] __pStretchableRowIndex; + delete[] __pStretchableColumnIndex; + + delete __pSystemControl; + __pSystemControl = null; + + delete __pContentProvider; + __pContentProvider = null; +} + +_GroupContainer* +_GroupContainer::CreateGroupContainerN(const FloatRectangle& rect, int rowCount, int columnCount, float lineWidth) +{ + ClearLastResult(); + _GroupContainer* pGroupContainer = new (std::nothrow) _GroupContainer(); + 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)); + + return pGroupContainer; + +CATCH: + delete pGroupContainer; + + SetLastResult(r); + return null; +} + +result +_GroupContainer::Initialize(const FloatRectangle& rect, int rowCount, int columnCount, float lineWidth) +{ + result r = E_SUCCESS; + + 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; + + 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); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + float totalColLineWidth = (columnCount + 1.0f) * __lineWidth; + float totalRowLineHeight = (rowCount + 1.0f) * __lineWidth; + + int cellWidth = (rect.width - totalColLineWidth) / (columnCount); + int cellHeight = (rect.height - totalRowLineHeight) / (rowCount); + + float balanceWidthPixels = fmod((rect.width - totalColLineWidth), columnCount); + float balanceHeightPixels = fmod((rect.height - totalRowLineHeight), rowCount); + int margin = 0; + int width = Math::Round((balanceWidthPixels + ROUNDOFF_VALUE) * 10.0f); + int height = Math::Round((balanceHeightPixels + ROUNDOFF_VALUE) * 10.0f); + + _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); + r = GET_FIXED_VALUE_CONFIG(GROUPCONTAINER::DEFAULT_MARGIN, orientation, margin); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + __pCellsArray = new (std::nothrow) _CellInfo *[rowCount]; + 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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + for (int i = 0; i < rowCount; i++) + { + __pStretchableRowIndex[i] = false; + } + + __pStretchableColumnIndex = new (std::nothrow) bool[columnCount]; + 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++) + { + __pStretchableColumnIndex[i] = false; + } + + for (int i = 0; i < rowCount; i++) + { + __pCellsArray[i] = null; + } + + 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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + } + + for (int rowIndex = 0; rowIndex < rowCount; rowIndex++) + { + for (int columnIndex = 0; columnIndex < columnCount; columnIndex++) + { + __pCellsArray[rowIndex][columnIndex].cellBounds.width = 0; + __pCellsArray[rowIndex][columnIndex].cellBounds.height = 0; + } + } + + while (width > 0) + { + for (int columnIndex = 0; columnIndex < columnCount; columnIndex++) + { + if (width > 0) + { + for (int rowIndex = 0; rowIndex < rowCount; rowIndex++) + { + __pCellsArray[rowIndex][columnIndex].cellBounds.width += 0.1f; + } + width = width - 1; + } + else + { + break; + } + } + } + + while (height > 0) + { + for (int rowIndex = 0; rowIndex < rowCount; rowIndex++) + { + if (height > 0) + { + for (int columnIndex = 0; columnIndex < columnCount; columnIndex++) + { + __pCellsArray[rowIndex][columnIndex].cellBounds.height += 0.1f; + } + height = height - 1; + } + else + { + break; + } + } + } + + for (int row = 0; row < rowCount; row++) + { + for (int col = 0; col < columnCount; col++) + { + if (col == 0) + { + __pCellsArray[row][col].cellBounds.x = __lineWidth; + } + else + { + __pCellsArray[row][col].cellBounds.x = (__pCellsArray[row][col - 1].cellBounds.x + __pCellsArray[row][col - 1].cellBounds.width) + __lineWidth; + } + + if (row == 0) + { + __pCellsArray[row][col].cellBounds.y = __lineWidth; + } + else + { + __pCellsArray[row][col].cellBounds.y = (__pCellsArray[row - 1][col].cellBounds.y + __pCellsArray[row - 1][col].cellBounds.height) + __lineWidth; + } + + __pCellsArray[row][col].cellBounds.width += cellWidth; + __pCellsArray[row][col].cellBounds.height += cellHeight; + + __pCellsArray[row][col].actualSize.width = __pCellsArray[row][col].cellBounds.width; + __pCellsArray[row][col].actualSize.height = __pCellsArray[row][col].cellBounds.height; + + __pCellsArray[row][col].parentCell.row = row; + __pCellsArray[row][col].parentCell.column = col; + __pCellsArray[row][col].cellMargin.left = margin; + __pCellsArray[row][col].cellMargin.right = margin; + __pCellsArray[row][col].cellMargin.top = margin; + __pCellsArray[row][col].cellMargin.bottom = margin; + + __pCellsArray[row][col].isResizeEnabled = false; + __pCellsArray[row][col].isMerged = false; + __pCellsArray[row][col].isParent = false; + __pCellsArray[row][col].mergedRowCount = 0; + __pCellsArray[row][col].mergedColumnCount = 0; + __pCellsArray[row][col].isBoundsModified = false; + } + } + + __pSystemControl = _Control::CreateControlN(); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Propagating.", GetErrorMessage(r)); + + __pSystemControl->SetBounds(FloatRectangle(0.0f, 0.0f, rect.width, rect.height)); + __pSystemControl->SetBackgroundColor(Color(0)); + 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, "[%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, "[%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)); + + __rowCount = rowCount; + __columnCount = columnCount; + + r = SetBounds(rect); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; + +CATCH: + + for (int i = 0; i < __rowCount; i++) + { + delete[] __pCellsArray[i]; + } + delete[] __pCellsArray; + + delete[] __pStretchableRowIndex; + delete[] __pStretchableColumnIndex; + + delete __pSystemControl; + __pSystemControl = null; + + delete __pContentProvider; + __pContentProvider = null; + + delete __pGroupContainerPresenter; + __pGroupContainerPresenter = null; + + return r; +} + +void +_GroupContainer::SetImpl(_GroupContainerImpl *pImpl) +{ + __pGroupContainerImpl = pImpl; + + return; +} + +result +_GroupContainer::AddControlAt(Control &control, int rowIndex, int columnIndex) +{ + result r = E_SUCCESS; + + 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, (HasChild(rowIndex, columnIndex) == false), E_INVALID_OPERATION, "The control instance is already added in this index."); + + //Can't add in merged cells + if (__pCellsArray[rowIndex][columnIndex].parentCell.row == rowIndex && + __pCellsArray[rowIndex][columnIndex].parentCell.column == columnIndex) + { + float x = __pCellsArray[rowIndex][columnIndex].cellBounds.x; + float y = __pCellsArray[rowIndex][columnIndex].cellBounds.y; + float leftMargin = __pCellsArray[rowIndex][columnIndex].cellMargin.left; + float topMargin = __pCellsArray[rowIndex][columnIndex].cellMargin.top; + + __childAttachedRowIndex = rowIndex; + __childAttachedColumnIndex = columnIndex; + + __isChildAdding = true; + r = __pGroupContainerImpl->AddChild(const_cast <_ControlImpl*>(_ControlImpl::GetInstance(control))); + __isChildAdding = false; + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + _ControlImpl* pControlImpl = const_cast <_ControlImpl*>(_ControlImpl::GetInstance(control)); + SetChildPosition(pControlImpl->GetCore(), rowIndex, columnIndex, FloatPoint(x + leftMargin + control.GetXF(), y + topMargin + control.GetYF())); + + pControlImpl->GetCore().SetUserData(static_cast(pControlImpl)); + + } + else + { + r = E_INVALID_OPERATION; + } + return E_SUCCESS; + +CATCH: + __childAttachedRowIndex = -1; + __childAttachedColumnIndex = -1; + return r; +} + +Control* +_GroupContainer::GetControlAt(int rowIndex, int columnIndex) +{ + SysTryReturn(NID_UI_CTRL, (rowIndex >= 0 && columnIndex >= 0 && rowIndex < __rowCount && columnIndex < __columnCount), null, E_OUT_OF_RANGE, "rowIndex(%d) or columnIndex(%d) is out of range.", rowIndex, columnIndex); + + result r = E_SUCCESS; + SysTryReturn(NID_UI_CTRL, (HasChild(rowIndex, columnIndex)), null, E_INVALID_OPERATION, "Control does not exist in the specified cell."); + + _Control* pChild = null; + _ControlImpl* pChildImpl = null; + + pChild = GetControlCoreAt(rowIndex, columnIndex); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pChild, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + pChildImpl = static_cast<_ControlImpl*>(pChild->GetUserData()); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pChildImpl, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + return &pChildImpl->GetPublic(); +} + +result +_GroupContainer::RemoveControlAt(int rowIndex, int columnIndex) +{ + SysTryReturnResult(NID_UI_CTRL, (rowIndex >= 0 && columnIndex >= 0 && rowIndex < __rowCount && columnIndex < __columnCount), E_OUT_OF_RANGE, "rowIndex(%d) or columnIndex(%d) is out of range.", rowIndex, columnIndex); + + result r = E_SUCCESS; + + SysTryReturnResult(NID_UI_CTRL, (HasChild(rowIndex, columnIndex)), E_INVALID_OPERATION, "Control does not exist in the specified cell."); + + _Control* pChild = null; + _ControlImpl* pChildImpl = null; + + pChild = GetControlCoreAt(rowIndex, columnIndex); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, pChild != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + pChildImpl = static_cast<_ControlImpl*>(pChild->GetUserData()); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, pChildImpl != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __pGroupContainerImpl->GetPublic().RemoveControl(const_cast(pChildImpl->GetPublic())); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +_GroupContainer::SetColumnWidth(int columnIndex, float width, bool isUser) +{ + 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 is used. Column width (%f) should be non negative.", width); + + int row = -1; + int column = -1; + + for (int i = 0; i < __rowCount; i++) + { + for (int j = 0; j < __columnCount; j++) + { + __pCellsArray[i][j].isBoundsModified = false; + } + } + + //Algorithm: + //Step 1: If a particular cell is NOT merged, set Width, else goto Step 2 + //Step 2: If Merged and Parent = FALSE, set Width + //Step 3: If parent cell's Width is NOT adjusted according to child then adjust it + //Step 4: Assign actual size + //Step 5: Calculate other cells x,y and re position control in it, if any + for (int i = 0; i < __rowCount; i++) + { + row = __pCellsArray[i][columnIndex].parentCell.row; + column = __pCellsArray[i][columnIndex].parentCell.column; + + if (__pCellsArray[i][columnIndex].isMerged) + { + if (!__pCellsArray[i][columnIndex].isParent) + { + __pCellsArray[i][columnIndex].cellBounds.width = width; + } + if (!__pCellsArray[row][column].isBoundsModified) + { + __pCellsArray[row][column].cellBounds.width -= (__pCellsArray[i][columnIndex].actualSize.width - width); + __pCellsArray[row][column].isBoundsModified = true; + } + } + else + { + __pCellsArray[i][columnIndex].cellBounds.width = width; + } + + __pCellsArray[i][columnIndex].actualSize.width = width; + + for (int j = columnIndex; j < __columnCount - 1; j++) + { + FloatRectangle previousCellBounds = __pCellsArray[i][j + 1].cellBounds; + __pCellsArray[i][j + 1].cellBounds.x = __pCellsArray[i][j].cellBounds.x + __pCellsArray[i][j].actualSize.width + __lineWidth; + + if (HasChild(i, j + 1)) + { + _Control* pControl = GetControlCoreAt(i, j + 1); + if (pControl != null) + { + FloatPoint controlPosition = pControl->GetPositionF(); + float updatedPosition = controlPosition.x - previousCellBounds.x; + SetChildPosition(*pControl, i, j + 1, FloatPoint(__pCellsArray[i][j + 1].cellBounds.x + updatedPosition, controlPosition.y)); + } + } + } + } + + if (isUser) + { + UpdateStretchableCellBounds(GetGridBounds(), GetBoundsF(), columnIndex, -1); + } + + return E_SUCCESS; +} + +float +_GroupContainer::GetColumnWidth(int columnIndex) +{ + SysTryReturnResult(NID_UI_CTRL, (columnIndex >= 0 && columnIndex < __columnCount), E_OUT_OF_RANGE, "columnIndex(%d) is out of range.", columnIndex); + return __pCellsArray[0][columnIndex].cellBounds.width; +} + +result +_GroupContainer::SetRowHeight(int rowIndex, float height, bool isUser) +{ + 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 is used. Row height (%f) should be non negative.", height); + + int row = -1; + int column = -1; + + for (int i = 0; i < __rowCount; i++) + { + for (int j = 0; j < __columnCount; j++) + { + __pCellsArray[i][j].isBoundsModified = false; + } + } + + //Algorithm: + //Step 1: If a particular cell is NOT merged, set Height, else goto Step 2 + //Step 2: If Merged and Parent = FALSE, set Height + //Step 3: If parent cell's Height is NOT adjusted according to child then adjust it + //Step 4: Assign actual size + //Step 5: Calculate other cells x,y and re position control in it, if any. + for (int j = 0; j < __columnCount; j++) + { + row = __pCellsArray[rowIndex][j].parentCell.row; + column = __pCellsArray[rowIndex][j].parentCell.column; + + if (__pCellsArray[rowIndex][j].isMerged) + { + if (!__pCellsArray[rowIndex][j].isParent) + { + __pCellsArray[rowIndex][j].cellBounds.height = height; + } + if (!__pCellsArray[row][column].isBoundsModified) + { + __pCellsArray[row][column].cellBounds.height -= (__pCellsArray[rowIndex][j].actualSize.height - height); + __pCellsArray[row][column].isBoundsModified = true; + } + } + else + { + __pCellsArray[rowIndex][j].cellBounds.height = height; + } + + __pCellsArray[rowIndex][j].actualSize.height = height; + + for (int i = rowIndex; i < __rowCount - 1; i++) + { + FloatRectangle previousCellBounds = __pCellsArray[i + 1][j].cellBounds; + __pCellsArray[i + 1][j].cellBounds.y = __pCellsArray[i][j].cellBounds.y + __pCellsArray[i][j].actualSize.height + __lineWidth; + + if (HasChild(i + 1, j)) + { + _Control* pControl = GetControlCoreAt(i + 1, j); + if (pControl != null) + { + FloatPoint controlPosition = pControl->GetPositionF(); + float updatedPosition = controlPosition.y - previousCellBounds.y; + SetChildPosition(*pControl, i + 1, j, FloatPoint(controlPosition.x, __pCellsArray[i + 1][j].cellBounds.y + updatedPosition)); + } + } + } + } + + if (isUser) + { + UpdateStretchableCellBounds(GetGridBounds(), GetBoundsF(), -1, rowIndex); + } + + return E_SUCCESS; +} + +float +_GroupContainer::GetRowHeight(int rowIndex) +{ + SysTryReturnResult(NID_UI_CTRL, (rowIndex >= 0 && rowIndex < __rowCount), E_OUT_OF_RANGE, "rowIndex(%d) is out of range.", rowIndex); + return __pCellsArray[rowIndex][0].cellBounds.height; +} + +result +_GroupContainer::Merge(int rowStartIndex, int columnStartIndex, int rowCount, int columnCount) +{ + SysTryReturnResult(NID_UI_CTRL, (rowStartIndex >= 0 && rowStartIndex < __rowCount && columnStartIndex >= 0 && columnStartIndex < __columnCount), E_OUT_OF_RANGE, "rowStartIndex(%d) or columnStartIndex(%d) is out of range.", rowStartIndex, columnStartIndex); + SysTryReturnResult(NID_UI_CTRL, (rowCount >= 0 && rowCount < __rowCount && columnCount >= 0 && columnCount < __columnCount), E_OUT_OF_RANGE, "rowCount(%d) or columnCount(%d) is out of range.", rowCount, columnCount); + + int rowEndIndex = rowStartIndex + rowCount; + int columnEndIndex = columnStartIndex + columnCount; + + if (rowEndIndex >= __rowCount || columnEndIndex >= __columnCount) + { + SysLogException(NID_UI_CTRL, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The row index or the column index is out of range."); + return E_OUT_OF_RANGE; + } + + //If same combination of cells, return success + if (__pCellsArray[rowStartIndex][columnStartIndex].isParent) + { + _MergeCellIndex parent = __pCellsArray[rowEndIndex][columnEndIndex].parentCell; + if ((parent.row == rowStartIndex) && (parent.column == columnStartIndex)) + { + return E_SUCCESS; + } + } + + //If non empty, return + for (int i = rowStartIndex; i <= rowEndIndex; i++) + { + for (int j = columnStartIndex; j <= columnEndIndex; j++) + { + + if (__pCellsArray[i][j].isMerged) + { + if (__pCellsArray[i][j].isParent) + { + if ((__pCellsArray[i][j].mergedColumnCount > (columnEndIndex - j)) || (__pCellsArray[i][j].mergedRowCount > (rowEndIndex - i))) + { + return E_INVALID_ARG; + } + } + else if (columnStartIndex > __pCellsArray[i][j].parentCell.column || rowStartIndex > __pCellsArray[i][j].parentCell.row) + { + return E_INVALID_ARG; + } + } + + //Allow merge if Control is added in parent cell + if (i != rowStartIndex || j != columnStartIndex) + { + if (HasChild(i, j)) + { + return E_INVALID_ARG; + } + } + } + } + + __pCellsArray[rowStartIndex][columnStartIndex].cellBounds.width = __pCellsArray[rowStartIndex][columnStartIndex].actualSize.width; + __pCellsArray[rowStartIndex][columnStartIndex].cellBounds.height = __pCellsArray[rowStartIndex][columnStartIndex].actualSize.height; + + for (int i = rowStartIndex; i < rowEndIndex; i++) + { + for (int j = columnStartIndex; j < columnEndIndex; j++) + { + if (__pCellsArray[i][j].isParent) + { + __pCellsArray[i][j].isParent = false; + } + //Add Width of All Cells on RHS of parent, to Parent Cell + if (i == rowStartIndex) + { + __pCellsArray[rowStartIndex][columnStartIndex].cellBounds.width += (__pCellsArray[i][j + 1].actualSize.width + __lineWidth); + } + //Add Height of All Cells below parent, to Parent Cell + if (j == columnStartIndex) + { + __pCellsArray[rowStartIndex][columnStartIndex].cellBounds.height += (__pCellsArray[i + 1][j].actualSize.height + __lineWidth); + } + + CollapseCell(i, j, rowStartIndex, columnStartIndex); + CollapseCell(i, j + 1, rowStartIndex, columnStartIndex); + CollapseCell(i + 1, j, rowStartIndex, columnStartIndex); + CollapseCell(i + 1, j + 1, rowStartIndex, columnStartIndex); + } + //Logic to handle merge cells in same column but different rows + if (columnStartIndex == columnEndIndex) + { + __pCellsArray[rowStartIndex][columnStartIndex].cellBounds.height += (__pCellsArray[i + 1][columnStartIndex].actualSize.height + __lineWidth); + CollapseCell(rowStartIndex, columnStartIndex, rowStartIndex, columnStartIndex); + + CollapseCell(i + 1, columnStartIndex, rowStartIndex, columnStartIndex); + } + } + //Logic to handle merge cells in same row but different columns + if (rowStartIndex == rowEndIndex) + { + for (int j = columnStartIndex; j < columnEndIndex; j++) + { + __pCellsArray[rowStartIndex][columnStartIndex].cellBounds.width += (__pCellsArray[rowStartIndex][j + 1].actualSize.width + __lineWidth); + CollapseCell(rowStartIndex, columnStartIndex, rowStartIndex, columnStartIndex); + + CollapseCell(rowStartIndex, j + 1, rowStartIndex, columnStartIndex); + } + } + + __pCellsArray[rowStartIndex][columnStartIndex].mergedColumnCount = columnEndIndex - columnStartIndex; + __pCellsArray[rowStartIndex][columnStartIndex].mergedRowCount = rowEndIndex - rowStartIndex; + __pCellsArray[rowStartIndex][columnStartIndex].isParent = true; + + return E_SUCCESS; +} + +result +_GroupContainer::SetChildResizingEnabled(int rowIndex, int columnIndex, bool enable) +{ + result r = E_SUCCESS; + + SysTryReturnResult(NID_UI_CTRL, (rowIndex >= 0 && columnIndex >= 0 && rowIndex < __rowCount && columnIndex < __columnCount), E_OUT_OF_RANGE, "rowIndex(%d) or columnIndex(%d) is out of range.", rowIndex, columnIndex); + + if (__pCellsArray[rowIndex][columnIndex].parentCell.row == rowIndex && + __pCellsArray[rowIndex][columnIndex].parentCell.column == columnIndex) + { + if (enable) + { + __pCellsArray[rowIndex][columnIndex].isResizeEnabled = true; + r = ResizeControl(rowIndex, columnIndex); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + else + { + __pCellsArray[rowIndex][columnIndex].isResizeEnabled = false; + } + } + else + { + r = E_INVALID_ARG; + } + + return E_SUCCESS; +} + +result +_GroupContainer::SetMargin(int rowIndex, int columnIndex, float leftMargin, float rightMargin, float topMargin, float bottomMargin) +{ + result r = E_SUCCESS; + + 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 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; + __pCellsArray[rowIndex][columnIndex].cellMargin.right = rightMargin; + __pCellsArray[rowIndex][columnIndex].cellMargin.top = topMargin; + __pCellsArray[rowIndex][columnIndex].cellMargin.bottom = bottomMargin; + + if (HasChild(rowIndex, columnIndex)) + { + FloatRectangle controlRect(0.0f, 0.0f, 0.0f, 0.0f); + + FloatRectangle rect = GetBoundsAt(rowIndex, columnIndex); + + _Control* pControl = GetControlCoreAt(rowIndex, columnIndex); + if (pControl != null) + { + controlRect = pControl->GetBoundsF(); + + FloatRectangle localCellControlRect(0.0f, 0.0f, 0.0f, 0.0f); + localCellControlRect.x = controlRect.x - rect.x - prevCellMargin.left; + localCellControlRect.y = controlRect.y - rect.y - prevCellMargin.top; + + rect.x = rect.x + leftMargin + localCellControlRect.x; + rect.y = rect.y + topMargin + localCellControlRect.y; + if (__pCellsArray[rowIndex][columnIndex].isResizeEnabled) + { + controlRect.width = rect.width - (leftMargin + localCellControlRect.x + rightMargin); + controlRect.height = rect.height - (topMargin + localCellControlRect.y + bottomMargin); + } + + r = SetChildBounds(*pControl, rowIndex, columnIndex, FloatRectangle(rect.x, rect.y, controlRect.width, controlRect.height)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + } + + return E_SUCCESS; +} + +FloatRectangle +_GroupContainer::GetBoundsAt(int rowIndex, int columnIndex) const +{ + ClearLastResult(); + + FloatRectangle rect(0.0f, 0.0f, -1.0f, -1.0f); + SysTryReturn(NID_UI_CTRL, (rowIndex >= 0 && columnIndex >=0 && rowIndex < __rowCount && columnIndex < __columnCount), rect, E_OUT_OF_RANGE, "rowIndex(%d) or columnIndex(%d) is out of range.", rowIndex, columnIndex); + + rect.x = __pCellsArray[rowIndex][columnIndex].cellBounds.x; + rect.width = __pCellsArray[rowIndex][columnIndex].cellBounds.width; + rect.y = __pCellsArray[rowIndex][columnIndex].cellBounds.y; + rect.height = __pCellsArray[rowIndex][columnIndex].cellBounds.height; + + return rect; +} + +result +_GroupContainer::Split(int rowIndex, int columnIndex) +{ + int rowEndIndex = -1; + int columnEndIndex = -1; + + SysTryReturnResult(NID_UI_CTRL, (rowIndex >= 0 && columnIndex >=0 && rowIndex < __rowCount && columnIndex < __columnCount), E_OUT_OF_RANGE, "rowIndex(%d) or columnIndex(%d) is out of range.", rowIndex, columnIndex); + + if (__pCellsArray[rowIndex][columnIndex].isParent) + { + Point lastChild = GetLastChild(rowIndex, columnIndex); + rowEndIndex = lastChild.x; + columnEndIndex = lastChild.y; + } + else + { + return E_INVALID_ARG; + } + + __pCellsArray[rowIndex][columnIndex].mergedColumnCount = 0; + __pCellsArray[rowIndex][columnIndex].mergedRowCount = 0; + + for (int i = rowIndex; i <= rowEndIndex; i++) + { + for (int j = columnIndex; j <= columnEndIndex; j++) + { + __pCellsArray[i][j].cellBounds.width = __pCellsArray[i][j].actualSize.width; + __pCellsArray[i][j].cellBounds.height = __pCellsArray[i][j].actualSize.height; + __pCellsArray[i][j].isMerged = false; + __pCellsArray[i][j].isParent = false; + __pCellsArray[i][j].parentCell.row = i; + __pCellsArray[i][j].parentCell.column = j; + } + } + + return E_SUCCESS; +} + +void +_GroupContainer::SetLineColor(const Color& color) +{ + __lineColor = color; + + return; +} + +Color +_GroupContainer::GetLineColor(void) +{ + return __lineColor; +} + +float +_GroupContainer::GetLineWidth(void) +{ + return __lineWidth; +} + +result +_GroupContainer::SetColumnStretchable(int columnIndex, bool stretchable) +{ + SysTryReturnResult(NID_UI_CTRL, (columnIndex >= 0 && columnIndex < __columnCount), E_OUT_OF_RANGE, "columnIndex(%d) is out of range.", columnIndex); + + if (stretchable) + { + __pStretchableColumnIndex[columnIndex] = true; + } + else + { + __pStretchableColumnIndex[columnIndex] = false; + } + + UpdateStretchableCellBounds(GetGridBounds(), GetBoundsF()); + + return E_SUCCESS; +} + +bool +_GroupContainer::IsColumnStretchable(int columnIndex) +{ + SysTryReturnResult(NID_UI_CTRL, (columnIndex >= 0 && columnIndex < __columnCount), E_OUT_OF_RANGE, "columnIndex(%d) is out of range.", columnIndex); + + return __pStretchableColumnIndex[columnIndex]; +} + +result +_GroupContainer::SetRowStretchable(int rowIndex, bool stretchable) +{ + SysTryReturnResult(NID_UI_CTRL, (rowIndex >= 0 && rowIndex < __rowCount), E_OUT_OF_RANGE, "rowIndex(%d) is out of range.", rowIndex); + + if (stretchable) + { + __pStretchableRowIndex[rowIndex] = true; + + } + else + { + __pStretchableRowIndex[rowIndex] = false; + } + + UpdateStretchableCellBounds(GetGridBounds(), GetBoundsF()); + + return E_SUCCESS; +} + +bool +_GroupContainer::IsRowStretchable(int rowIndex) +{ + SysTryReturnResult(NID_UI_CTRL, (rowIndex >= 0 && rowIndex < __rowCount), E_OUT_OF_RANGE, "rowIndex(%d) is out of range.", rowIndex); + + return __pStretchableRowIndex[rowIndex]; +} + +int +_GroupContainer::GetRowCount(void) +{ + return __rowCount; +} + +int +_GroupContainer::GetColumnCount(void) +{ + return __columnCount; +} + +result +_GroupContainer::ResizeControl(int rowIndex, int columnIndex) +{ + result r = E_SUCCESS; + + SysTryReturnResult(NID_UI_CTRL, (rowIndex >= 0 && columnIndex >= 0 && rowIndex < __rowCount && columnIndex < __columnCount), E_OUT_OF_RANGE, "rowIndex(%d) or columnIndex(%d) is out of range.", rowIndex, columnIndex); + + if (__pCellsArray[rowIndex][columnIndex].isResizeEnabled) + { + if (HasChild(rowIndex, columnIndex)) + { + FloatRectangle rect = GetBoundsAt(rowIndex, columnIndex); + _Control* pControl = GetControlCoreAt(rowIndex, columnIndex); + + if (pControl != null) + { + FloatRectangle controlRect = pControl->GetBoundsF(); + if (__pCellsArray[rowIndex][columnIndex].isResizeEnabled) + { + rect.width = rect.width - (controlRect.x - rect.x + __pCellsArray[rowIndex][columnIndex].cellMargin.right); + rect.height = rect.height - (controlRect.y - rect.y + __pCellsArray[rowIndex][columnIndex].cellMargin.bottom); + } + + r = SetChildBounds(*pControl, rowIndex, columnIndex, FloatRectangle(controlRect.x, controlRect.y, rect.width, rect.height)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + } + } + + return E_SUCCESS; +} + +void +_GroupContainer::CollapseCell(int rowIndex, int columnIndex, int rowStartIndex, int columnStartIndex) +{ + __pCellsArray[rowIndex][columnIndex].isMerged = true; + __pCellsArray[rowIndex][columnIndex].parentCell.row = rowStartIndex; + __pCellsArray[rowIndex][columnIndex].parentCell.column = columnStartIndex; + + return; +} + +bool +_GroupContainer::HasChild(int rowIndex, int columnIndex) +{ + if (__pCellsArray[rowIndex][columnIndex].controlHandle.IsValid()) + { + return true; + } + + return false; +} + +Point +_GroupContainer::GetLastChild(int rowIndex, int columnIndex) +{ + Point lastChild; + if (__pCellsArray[rowIndex][columnIndex].isParent) + { + lastChild.x = rowIndex + __pCellsArray[rowIndex][columnIndex].mergedRowCount; + lastChild.y = columnIndex + __pCellsArray[rowIndex][columnIndex].mergedColumnCount; + } + return lastChild; +} + +bool +_GroupContainer::IsMerged(int rowIndex, int columnIndex) +{ + return __pCellsArray[rowIndex][columnIndex].isMerged; +} + +bool +_GroupContainer::IsParent(int rowIndex, int columnIndex) +{ + return __pCellsArray[rowIndex][columnIndex].isParent; +} + +_Control* +_GroupContainer::GetControlCoreAt(int rowIndex, int columnIndex) +{ + SetLastResult(E_SUCCESS); + + _Control* pControl = null; + _ControlManager *pControlManager = null; + pControlManager = _ControlManager::GetInstance(); + if (pControlManager != null) + { + pControl = pControlManager->GetObject(__pCellsArray[rowIndex][columnIndex].controlHandle); + } + + if (pControl == null) + { + SysLogException(NID_UI_CTRL, E_INVALID_OPERATION, "[E_INVALID_OPERATION] Failed to get control at specified index."); + } + + return pControl; +} + +_GroupContainer::_MergeCellIndex +_GroupContainer::GetParentCell(const _Control& child) +{ + _MergeCellIndex index = {-1, -1}; + for (int row = 0; row < __rowCount; row++) + { + for (int cols = 0; cols < __columnCount; cols++) + { + if (__pCellsArray[row][cols].controlHandle == child.GetHandle()) + { + return __pCellsArray[row][cols].parentCell; + } + } + } + return index; +} + +void +_GroupContainer::OnDraw(void) +{ + ClearLastResult(); + + if (__pGroupContainerPresenter != null) + { + __pGroupContainerPresenter->Draw(); + } + + return; +} + +result +_GroupContainer::OnAttachedToMainTree(void) +{ + __pGroupContainerPresenter->LoadResourceBitmaps(); + + return E_SUCCESS; +} + +void +_GroupContainer::OnChildAttached(const _Control& child) +{ + //This check is to make sure this _Control is added through AddControlAt(int, int); + if (__childAttachedRowIndex >= 0 && __childAttachedColumnIndex >= 0) + { + __pCellsArray[__childAttachedRowIndex][__childAttachedColumnIndex].controlHandle = child.GetHandle(); + } + __childAttachedRowIndex = -1; + __childAttachedColumnIndex = -1; + + return; +} + +void +_GroupContainer::OnChildDetached(const _Control& child) +{ + +} + +void +_GroupContainer::OnChildBoundsChanged(const _Control& child) +{ + if (__isChildAdding) + { + //This check is to make sure this _Control is added through AddControlAt(int, int); + if (__childAttachedRowIndex >= 0 && __childAttachedColumnIndex >= 0) + { + __pCellsArray[__childAttachedRowIndex][__childAttachedColumnIndex].controlHandle = child.GetHandle(); + } + __childAttachedRowIndex = -1; + __childAttachedColumnIndex = -1; + __isChildAdding = false; + } + + _MergeCellIndex parentIndex = GetParentCell(child); + FloatRectangle parentBounds = __pCellsArray[parentIndex.row][parentIndex.column].cellBounds; + _CellMargin parentMargin = __pCellsArray[parentIndex.row][parentIndex.column].cellMargin; + + FloatPoint childCurrentPosition = __pCellsArray[parentIndex.row][parentIndex.column].childControlPos; + FloatPoint childNewPosition = child.GetPositionF(); + + if (childCurrentPosition != childNewPosition) + { + childNewPosition.x += parentBounds.x; + childNewPosition.y += parentBounds.y; + childNewPosition.x += parentMargin.left; + childNewPosition.y += parentMargin.top; + + __pCellsArray[parentIndex.row][parentIndex.column].childControlPos = childNewPosition; + (const_cast<_Control&>(child)).SetPosition(childNewPosition); + } + + return; +} + +result +_GroupContainer::SetChildPosition(_Control& pControl, int rowIndex, int columnIndex, FloatPoint position) +{ + __pCellsArray[rowIndex][columnIndex].childControlPos = position; + FloatRectangle rect = pControl.GetBoundsF(); + return pControl.SetBounds(FloatRectangle(position.x, position.y, rect.width, rect.height), false); +} + +result +_GroupContainer::SetChildBounds(_Control& pControl, int rowIndex, int columnIndex, FloatRectangle bounds) +{ + __pCellsArray[rowIndex][columnIndex].childControlPos = FloatPoint(bounds.x, bounds.y); + return pControl.SetBounds(FloatRectangle(bounds.x, bounds.y, bounds.width, bounds.height), false); +} + +void +_GroupContainer::OnBoundsChanged(void) +{ + __pSystemControl->SetBounds(FloatRectangle(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height), false); + + UpdateStretchableCellBounds(GetGridBounds(), GetBoundsF()); + + return; +} + +void +_GroupContainer::UpdateStretchableCellBounds(FloatRectangle gridRect, FloatRectangle controlRect, int columnWidthIndex, int rowHeightIndex) +{ + int stretchableRowCount = 0; + int stretchableColumnCount = 0; + int stretchableWidth = 0; + int stretchableHeight = 0; + float balanceWidthPixels = 0.0f; + float balanceHeightPixels = 0.0f; + int width = 0; + int height = 0; + float columnWidth[__columnCount]; + float rowHeight[__rowCount]; + + for (int columnIndex = 0; columnIndex < __columnCount; columnIndex++) + { + columnWidth[columnIndex] = 0.0f; + + if (__pStretchableColumnIndex[columnIndex] && columnWidthIndex != columnIndex) + { + stretchableColumnCount++; + } + } + + if (stretchableColumnCount != 0) + { + stretchableWidth = (controlRect.width - gridRect.width) / stretchableColumnCount; + balanceWidthPixels = fmod((controlRect.width - gridRect.width), stretchableColumnCount); + + if (balanceWidthPixels > 0) + { + width = Math::Round((balanceWidthPixels + ROUNDOFF_VALUE) * 10.0); + } + else if (balanceWidthPixels < 0) + { + width = Math::Round((balanceWidthPixels - ROUNDOFF_VALUE) * 10.0); + } + + while (width != 0) + { + for (int columnIndex = 0; columnIndex < __columnCount; columnIndex++) + { + if (__pStretchableColumnIndex[columnIndex] && columnWidthIndex != columnIndex) + { + if (width > 0) + { + columnWidth[columnIndex] = columnWidth[columnIndex] + 0.1f; + + width = width - 1; + } + else if (width < 0) + { + columnWidth[columnIndex] = columnWidth[columnIndex] - 0.1f; + + width = width + 1; + } + else + { + break; + } + } + } + } + + for (int columnIndex = 0; columnIndex < __columnCount; columnIndex++) + { + if (__pStretchableColumnIndex[columnIndex] && columnWidthIndex != columnIndex) + { + columnWidth[columnIndex] = columnWidth[columnIndex] + __pCellsArray[0][columnIndex].actualSize.width + stretchableWidth; + + if (columnWidth[columnIndex] < 0) + { + columnWidth[columnIndex] = 0; + } + + SetColumnWidth(columnIndex, columnWidth[columnIndex], false); + } + } + } + + for (int rowIndex = 0; rowIndex < __rowCount; rowIndex++) + { + rowHeight[rowIndex] = 0.0f; + + if (__pStretchableRowIndex[rowIndex] && rowIndex != rowHeightIndex) + { + stretchableRowCount++; + } + } + + if (stretchableRowCount != 0) + { + stretchableHeight = (controlRect.height - gridRect.height) / stretchableRowCount; + balanceHeightPixels = fmod((controlRect.height - gridRect.height), stretchableRowCount); + + if (balanceHeightPixels > 0) + { + height = Math::Round((balanceHeightPixels + ROUNDOFF_VALUE) * 10.0); + } + else if (balanceHeightPixels < 0) + { + height = Math::Round((balanceHeightPixels - ROUNDOFF_VALUE) * 10.0); + } + + while (height != 0) + { + for (int rowIndex = 0; rowIndex < __rowCount; rowIndex++) + { + if (__pStretchableRowIndex[rowIndex] && rowIndex != rowHeightIndex) + { + if (height > 0) + { + rowHeight[rowIndex] = rowHeight[rowIndex] + 0.1f; + + height = height - 1; + } + else if (height < 0) + { + rowHeight[rowIndex] = rowHeight[rowIndex] - 0.1f; + + height = height + 1; + } + else + { + break; + } + } + } + } + + for (int rowIndex = 0; rowIndex < __rowCount; rowIndex++) + { + if (__pStretchableRowIndex[rowIndex] && rowIndex != rowHeightIndex) + { + rowHeight[rowIndex] = rowHeight[rowIndex] + __pCellsArray[rowIndex][0].actualSize.height + stretchableHeight; + + if (rowHeight[rowIndex] < 0) + { + rowHeight[rowIndex] = 0; + } + + SetRowHeight(rowIndex, rowHeight[rowIndex], false); + } + } + } + + return; +} + +FloatRectangle +_GroupContainer::GetGridBounds(void) +{ + FloatRectangle gridBounds(0.0f, 0.0f, 0.0f, 0.0f); + + //Calculate total grid bounds (Accumulated Bounds of all Cells) + gridBounds.x = __pCellsArray[0][0].cellBounds.x - __lineWidth; + gridBounds.y = __pCellsArray[0][0].cellBounds.y - __lineWidth; + + _MergeCellIndex parent = __pCellsArray[0][__columnCount - 1].parentCell; + FloatRectangle lastCell = GetBoundsAt(parent.row, parent.column); + gridBounds.width = (lastCell.x + lastCell.width + __lineWidth); + + parent = __pCellsArray[__rowCount - 1][0].parentCell; + lastCell = GetBoundsAt(parent.row, parent.column); + gridBounds.height = (lastCell.y + lastCell.height + __lineWidth); + + return gridBounds; +} + +_Control* +_GroupContainer::GetSystemChild(void) +{ + return __pSystemControl; +} + +bool +GroupContainerContentProvider::PrepareDraw(VisualElement& target) +{ + return true; +} + +void +GroupContainerContentProvider::DrawContent(VisualElement& target, Canvas& canvas) +{ + return; +} + +HitTestResult +GroupContainerContentProvider::HitTest(VisualElement& target, const FloatPoint& point) +{ + return HIT_TEST_NOWHERE; +} + +}}} //Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_GroupContainerImpl.cpp b/src/ui/controls/FUiCtrl_GroupContainerImpl.cpp new file mode 100644 index 0000000..1306bd8 --- /dev/null +++ b/src/ui/controls/FUiCtrl_GroupContainerImpl.cpp @@ -0,0 +1,433 @@ +// +// 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_GroupContainerImpl.cpp + * @brief This is the implementation file for the _GroupContainerImpl class. + * + */ + +#include +#include +#include +#include "FUiCtrl_GroupContainerImpl.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_UiBuilder.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Base; + +namespace Tizen { namespace Ui { namespace Controls +{ +_GroupContainerImpl::_GroupContainerImpl(Control* pPublic, _Control* pCore) +: _ContainerImpl(pPublic, pCore) +{ + +} + +_GroupContainerImpl::~_GroupContainerImpl(void) +{ + // nothing +} + +_GroupContainerImpl* +_GroupContainerImpl::CreateGroupContainerImplN(GroupContainer* pControl, const Rectangle& rect, int rowCount, int columnCount, int lineWidth) +{ + ClearLastResult(); + + _GroupContainerImpl* pImpl = null; + _GroupContainer* pCore = null; + + FloatRectangle floatBounds = _CoordinateSystemUtils::ConvertToFloat(rect); + float floatLineWidth = _CoordinateSystemUtils::ConvertToFloat(lineWidth); + + pCore = _GroupContainer::CreateGroupContainerN(floatBounds, rowCount, columnCount, floatLineWidth); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + pImpl = new (std::nothrow) _GroupContainerImpl(pControl, pCore); + r = CheckConstruction(pCore, pImpl); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + return pImpl; +} + +_GroupContainerImpl* +_GroupContainerImpl::CreateGroupContainerImplFN(GroupContainer* pControl, const FloatRectangle& rect, int rowCount, int columnCount, float lineWidth) +{ + ClearLastResult(); + + _GroupContainerImpl* pImpl = null; + _GroupContainer* pCore = null; + + pCore = _GroupContainer::CreateGroupContainerN(rect, rowCount, columnCount, lineWidth); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + pImpl = new (std::nothrow) _GroupContainerImpl(pControl, pCore); + r = CheckConstruction(pCore, pImpl); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + return pImpl; +} + +void +_GroupContainerImpl::Initialize(void) +{ + GetCore().SetImpl(this); +} + +const _GroupContainerImpl* +_GroupContainerImpl::GetInstance(const GroupContainer& grpContainer) +{ + return static_cast(_ControlImpl::GetInstance(grpContainer)); +} + +_GroupContainerImpl* +_GroupContainerImpl::GetInstance(GroupContainer& grpContainer) +{ + return static_cast<_GroupContainerImpl*>(_ControlImpl::GetInstance(grpContainer)); +} + +const char* +_GroupContainerImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Controls::GroupContainer"; +} + +const GroupContainer& +_GroupContainerImpl::GetPublic(void) const +{ + return static_cast (_ControlImpl::GetPublic()); +} + +GroupContainer& +_GroupContainerImpl::GetPublic(void) +{ + return static_cast (_ControlImpl::GetPublic()); +} + +const _GroupContainer& +_GroupContainerImpl::GetCore(void) const +{ + return static_cast (_ControlImpl::GetCore()); +} + +_GroupContainer& +_GroupContainerImpl::GetCore(void) +{ + return static_cast <_GroupContainer&>(_ControlImpl::GetCore()); +} + +result +_GroupContainerImpl::AddControlAt(Control &control, int rowIndex, int rolumnIndex) +{ + result r = GetCore().AddControlAt(control, rowIndex, rolumnIndex); + SetLastResultReturn(r); +} + +Control* +_GroupContainerImpl::GetControlAt(int rowIndex, int columnIndex) +{ + ClearLastResult(); + + return GetCore().GetControlAt(rowIndex, columnIndex); +} + +result +_GroupContainerImpl::RemoveControlAt(int rowIndex, int columnIndex) +{ + result r = GetCore().RemoveControlAt(rowIndex, columnIndex); + SetLastResultReturn(r); +} + +result +_GroupContainerImpl::SetColumnWidth(int columnIndex, int width) +{ + float floatWidth = _CoordinateSystemUtils::ConvertToFloat(width); + result r = GetCore().SetColumnWidth(columnIndex, floatWidth); + SetLastResultReturn(r); +} + +result +_GroupContainerImpl::SetColumnWidth(int columnIndex, float width) +{ + result r = GetCore().SetColumnWidth(columnIndex, width); + SetLastResultReturn(r); +} + +int +_GroupContainerImpl::GetColumnWidth(int columnIndex) +{ + ClearLastResult(); + + int width = _CoordinateSystemUtils::ConvertToInteger(GetCore().GetColumnWidth(columnIndex)); + return width; +} + +float +_GroupContainerImpl::GetColumnWidthF(int columnIndex) +{ + ClearLastResult(); + + return GetCore().GetColumnWidth(columnIndex); +} + +result +_GroupContainerImpl::SetRowHeight(int rowIndex, int height) +{ + float floatHeight = _CoordinateSystemUtils::ConvertToFloat(height); + result r = GetCore().SetRowHeight(rowIndex, floatHeight); + SetLastResultReturn(r); +} + +result +_GroupContainerImpl::SetRowHeight(int rowIndex, float height) +{ + result r = GetCore().SetRowHeight(rowIndex, height); + SetLastResultReturn(r); +} + +int +_GroupContainerImpl::GetRowHeight(int rowIndex) +{ + ClearLastResult(); + + return _CoordinateSystemUtils::ConvertToInteger(GetCore().GetRowHeight(rowIndex)); +} + +float +_GroupContainerImpl::GetRowHeightF(int rowIndex) +{ + ClearLastResult(); + + return GetCore().GetRowHeight(rowIndex); +} + +result +_GroupContainerImpl::Merge(int rowStartIndex, int columnStartIndex, int rowCount, int columnCount) +{ + result r = GetCore().Merge(rowStartIndex, columnStartIndex, rowCount, columnCount); + + SetLastResultReturn(r); +} + +result +_GroupContainerImpl::SetChildResizingEnabled(int rowIndex, int columnIndex, bool enable) +{ + result r = GetCore().SetChildResizingEnabled(rowIndex, columnIndex, enable); + SetLastResultReturn(r); +} + +result +_GroupContainerImpl::SetMargin(int rowIndex, int columnIndex, int leftMargin, int rightMargin, int topMargin, int bottomMargin) +{ + float floatLeftMargin = _CoordinateSystemUtils::ConvertToFloat(leftMargin); + float floatRightMargin = _CoordinateSystemUtils::ConvertToFloat(rightMargin); + float floatTopMargin = _CoordinateSystemUtils::ConvertToFloat(topMargin); + float floatBottomMargin = _CoordinateSystemUtils::ConvertToFloat(bottomMargin); + + result r = GetCore().SetMargin(rowIndex, columnIndex, floatLeftMargin, floatRightMargin, floatTopMargin, floatBottomMargin); + SetLastResultReturn(r); +} + +result +_GroupContainerImpl::SetMargin(int rowIndex, int columnIndex, float leftMargin, float rightMargin, float topMargin, float bottomMargin) +{ + result r = GetCore().SetMargin(rowIndex, columnIndex, leftMargin, rightMargin, topMargin, bottomMargin); + SetLastResultReturn(r); +} + +result +_GroupContainerImpl::Split(int rowIndex, int columnIndex) +{ + result r = GetCore().Split(rowIndex, columnIndex); + SetLastResultReturn(r); +} + +Rectangle +_GroupContainerImpl::GetBoundsAt(int rowIndex, int columnIndex) const +{ + ClearLastResult(); + + return _CoordinateSystemUtils::ConvertToInteger(GetCore().GetBoundsAt(rowIndex, columnIndex)); +} + +FloatRectangle +_GroupContainerImpl::GetBoundsAtF(int rowIndex, int columnIndex) const +{ + ClearLastResult(); + + return GetCore().GetBoundsAt(rowIndex, columnIndex); +} + +result +_GroupContainerImpl::SetColumnStretchable(int columnIndex, bool stretchable) +{ + result r = GetCore().SetColumnStretchable(columnIndex, stretchable); + SetLastResultReturn(r); +} + +bool +_GroupContainerImpl::IsColumnStretchable(int columnIndex) +{ + ClearLastResult(); + + return GetCore().IsColumnStretchable(columnIndex); +} + +result +_GroupContainerImpl::SetRowStretchable(int rowIndex, bool stretchable) +{ + result r = GetCore().SetRowStretchable(rowIndex, stretchable); + SetLastResultReturn(r); +} + +bool +_GroupContainerImpl::IsRowStretchable(int rowIndex) +{ + ClearLastResult(); + + return GetCore().IsRowStretchable(rowIndex); +} + +void +_GroupContainerImpl::SetLineColor(const Color& color) +{ + ClearLastResult(); + + GetCore().SetLineColor(color); + + return; +} + +Color +_GroupContainerImpl::GetLineColor(void) +{ + ClearLastResult(); + + return GetCore().GetLineColor(); +} + +class _GroupContainerMaker + : public _UiBuilderControlMaker +{ +public: + _GroupContainerMaker(_UiBuilder* pUiBuilder) + : _UiBuilderControlMaker(pUiBuilder){}; + virtual ~_GroupContainerMaker(void){}; + + static _UiBuilderControlMaker* + GetInstance(_UiBuilder* pUiBuilder) + { + _GroupContainerMaker* pGroupContainerMaker = new (std::nothrow) _GroupContainerMaker(pUiBuilder); + SysTryReturn(NID_UI_CTRL, pGroupContainerMaker, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + return pGroupContainerMaker; + }; + +protected: + virtual Control* + Make(_UiBuilderControl* pControl) + { + result r = E_SYSTEM; + _UiBuilderControlLayout* pControlProperty = null; + GroupContainer* pGroupContainer = null; + FloatRectangle rect(0.0f, 0.0f, 0.0f, 0.0f); + String elementString = L""; + int rowCount = 1; + int columnCount = 1; + float lineWidth = 1.0f; + Color backgroundColor(0, 0, 0, 0); + Color lineColor(0, 0, 0, 0); + + GetProperty(pControl, &pControlProperty); + + if (pControlProperty == null) + { + return null; + } + + if (pControl->GetElement("rowCount", elementString)) + { + Integer::Parse(elementString, rowCount); + } + + if (pControl->GetElement("columnCount", elementString)) + { + Integer::Parse(elementString, columnCount); + } + + if (pControl->GetElement("lineWidth", elementString)) + { + lineWidth = _LocalizedNumParser::ToDouble(elementString, "C"); + } + + rect = pControlProperty->GetRectF(); + + pGroupContainer = new (std::nothrow) GroupContainer(); + 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); + + if (r != E_SUCCESS) + { + SysLog(NID_UI_CTRL, "Failed to create GroupContainer."); + + delete pGroupContainer; + pGroupContainer = null; + + return null; + } + + if (pControl->GetElement(L"backgroundColor", elementString)) + { + ConvertStringToColor(elementString, backgroundColor); + pGroupContainer->SetBackgroundColor(backgroundColor); + } + + if (pControl->GetElement(L"lineColor", elementString)) + { + ConvertStringToColor(elementString, lineColor); + pGroupContainer->SetBackgroundColor(lineColor); + } + + return pGroupContainer; + } +}; // _GroupContainerMaker + +_GroupContainerRegister::_GroupContainerRegister(void) +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + if (pUiBuilderControlTableManager != null) + { + pUiBuilderControlTableManager->RegisterControl(L"GroupContainer", _GroupContainerMaker::GetInstance); + } +} + +_GroupContainerRegister::~_GroupContainerRegister(void) +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + if (pUiBuilderControlTableManager != null) + { + pUiBuilderControlTableManager->UnregisterControl(L"GroupContainer"); + } +} +static _GroupContainerRegister GroupContainerRegisterToUiBuilder; +}}} //Tizen::Ui::Controls + diff --git a/src/ui/controls/FUiCtrl_GroupContainerPresenter.cpp b/src/ui/controls/FUiCtrl_GroupContainerPresenter.cpp new file mode 100644 index 0000000..b17b655 --- /dev/null +++ b/src/ui/controls/FUiCtrl_GroupContainerPresenter.cpp @@ -0,0 +1,321 @@ +// +// 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_GroupContainerPresenter.cpp + * @brief This is the implementation file for the _GroupContainerPresenter class. + * + */ + +#include +#include +#include +#include +#include "FUiCtrl_GroupContainerPresenter.h" +#include "FUi_ResourceManager.h" +#include "FUiAnim_VisualElement.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUiCtrl_Form.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Ui::Animations; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_GroupContainerPresenter::_GroupContainerPresenter(void) +{ + // Nothing +} + +_GroupContainerPresenter::_GroupContainerPresenter(_GroupContainer& groupContainer) + : __pGroupContainer(&groupContainer) + , __pSystemChildColorReplacedBgBitmap(null) + , __pSystemChildBgEffectBitmap(null) + , __pGroupContainerColorReplacedBgBitmap(null) + , __parentBgColor(Color(0, 0, 0, 0)) + , __bgColor(Color(0, 0, 0, 0)) +{ + // Nothing +} + +_GroupContainerPresenter::~_GroupContainerPresenter(void) +{ + __pGroupContainer = null; + + delete __pSystemChildColorReplacedBgBitmap; + __pSystemChildColorReplacedBgBitmap = null; + + delete __pSystemChildBgEffectBitmap; + __pSystemChildBgEffectBitmap = null; + + delete __pGroupContainerColorReplacedBgBitmap; + __pGroupContainerColorReplacedBgBitmap = null; +} + +result +_GroupContainerPresenter::LoadResourceBitmaps(void) +{ + result r = E_SUCCESS; + __parentBgColor = GetParentColor(); + + if (__pSystemChildColorReplacedBgBitmap != null) + { + delete __pSystemChildColorReplacedBgBitmap; + __pSystemChildColorReplacedBgBitmap = null; + } + + 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)); + } + + if (__pGroupContainerColorReplacedBgBitmap != null) + { + delete __pGroupContainerColorReplacedBgBitmap; + __pGroupContainerColorReplacedBgBitmap = null; + } + + __bgColor = __pGroupContainer->GetBackgroundColor(); + + 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 E_SUCCESS; + +CATCH: + + delete __pSystemChildColorReplacedBgBitmap; + __pSystemChildColorReplacedBgBitmap = null; + + delete __pSystemChildBgEffectBitmap; + __pSystemChildBgEffectBitmap = null; + + return r; +} + +void +_GroupContainerPresenter::Draw(void) +{ + result r = E_SUCCESS; + FloatRectangle gridBounds(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle rect(0.0f, 0.0f, 0.0f, 0.0f); + int width = 0; + int lineAdjustPosition = 0; + int rowIndex = 0; + int columnIndex = 0; + int rows = __pGroupContainer->GetRowCount(); + int columns = __pGroupContainer->GetColumnCount(); + float lineWidth = __pGroupContainer->GetLineWidth(); + float verticalDividerHeight = 0.0f; + + if (__parentBgColor != GetParentColor() || __bgColor != __pGroupContainer->GetBackgroundColor()) + { + LoadResourceBitmaps(); + } + + Canvas* pCanvas = __pGroupContainer->GetVisualElement()->GetCanvasN(); + + SysTryReturnVoidResult(NID_UI_CTRL, pCanvas != null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get the canvas."); + + Canvas* pControlCanvas = null; + _Control* pControl = __pGroupContainer->GetSystemChild(); + SysTryCatch(NID_UI_CTRL, pControl != null, ,E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get the child control."); + + pControlCanvas = pControl->GetCanvasN(); + SysTryCatch(NID_UI_CTRL, pControlCanvas != null, ,E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get the canvas."); + + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + + pControlCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pControlCanvas->Clear(); + + pCanvas->SetLineStyle(LINE_STYLE_SOLID); + pCanvas->SetLineWidth(lineWidth); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, ,r, "[%s] Propagating.", GetErrorMessage(r)); + + pCanvas->SetForegroundColor(__pGroupContainer->GetLineColor()); + + gridBounds = __pGroupContainer->GetGridBounds(); + + DrawBackgroundBitmapForGroupContainer(pCanvas); + DrawBackgroundBitmapForSystemChild(pControlCanvas); + DrawBackgroundEffectBitmapForSystemChild(pControlCanvas); + + if (gridBounds.width < __pGroupContainer->GetBoundsF().width) + { + pCanvas->DrawLine(FloatPoint(gridBounds.x + gridBounds.width, gridBounds.y), FloatPoint(gridBounds.x + gridBounds.width, gridBounds.y + gridBounds.height)); + } + + if (gridBounds.height < __pGroupContainer->GetBoundsF().height) + { + pCanvas->DrawLine(FloatPoint(gridBounds.x, gridBounds.y + gridBounds.height), FloatPoint(gridBounds.x + gridBounds.width, gridBounds.y + gridBounds.height)); + } + + width = _CoordinateSystemUtils::ConvertToInteger(lineWidth); + lineAdjustPosition = ((width % 2) == 0) ? (width / 2) : ((width - 1) / 2); + + for (rowIndex = 0; rowIndex < rows; rowIndex++) + { + for (columnIndex = 0; columnIndex < columns; columnIndex++) + { + __pGroupContainer->ResizeControl(rowIndex, columnIndex); + rect = __pGroupContainer->GetBoundsAt(rowIndex , columnIndex); + + //Draw Cell Left and Top Lines for all cells + if ((!__pGroupContainer->IsMerged(rowIndex, columnIndex)) || (__pGroupContainer->IsParent(rowIndex, columnIndex))) + { + //Cells's Top Line + if (rowIndex != 0) + { + pCanvas->DrawLine(FloatPoint(rect.x - lineWidth, rect.y - lineWidth + lineAdjustPosition), FloatPoint(rect.x + rect.width, rect.y - lineWidth + lineAdjustPosition)); + } + //Cell's Left Line + if (columnIndex != 0) + { + verticalDividerHeight = rect.height / 2; + pCanvas->DrawLine(FloatPoint(rect.x - lineWidth + lineAdjustPosition, rect.y + (verticalDividerHeight / 2)), FloatPoint(rect.x - lineWidth + lineAdjustPosition, rect.y + (verticalDividerHeight / 2) + verticalDividerHeight)); + } + } + } + } + + delete pCanvas; + delete pControlCanvas; + + return; + +CATCH: + delete pCanvas; + delete pControlCanvas; + + return; +} + +void +_GroupContainerPresenter::DrawBackgroundBitmapForSystemChild(Canvas* pCanvas) +{ + result r = E_SUCCESS; + + FloatRectangle bounds = __pGroupContainer->GetBoundsF(); + bounds.x = 0.0f; + bounds.y = 0.0f; + + if(__pSystemChildColorReplacedBgBitmap != null) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pSystemChildColorReplacedBgBitmap)) + { + r = pCanvas->DrawNinePatchedBitmap(bounds, *__pSystemChildColorReplacedBgBitmap); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + r = pCanvas->DrawBitmap(bounds, *__pSystemChildColorReplacedBgBitmap); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + + return; +} + +void +_GroupContainerPresenter::DrawBackgroundBitmapForGroupContainer(Canvas* pCanvas) +{ + result r = E_SUCCESS; + + FloatRectangle bounds = __pGroupContainer->GetBoundsF(); + bounds.x = 0.0f; + bounds.y = 0.0f; + + if(__pGroupContainerColorReplacedBgBitmap != null) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pGroupContainerColorReplacedBgBitmap)) + { + r = pCanvas->DrawNinePatchedBitmap(bounds, *__pGroupContainerColorReplacedBgBitmap); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + r = pCanvas->DrawBitmap(bounds, *__pGroupContainerColorReplacedBgBitmap); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + + return; +} + +void +_GroupContainerPresenter::DrawBackgroundEffectBitmapForSystemChild(Canvas* pCanvas) +{ + result r = E_SUCCESS; + + FloatRectangle bounds = __pGroupContainer->GetBoundsF(); + bounds.x = 0.0f; + bounds.y = 0.0f; + + if(__pSystemChildBgEffectBitmap != null) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pSystemChildBgEffectBitmap)) + { + r = pCanvas->DrawNinePatchedBitmap(bounds, *__pSystemChildBgEffectBitmap); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + r = pCanvas->DrawBitmap(bounds, *__pSystemChildBgEffectBitmap); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + + return; +} + +Color +_GroupContainerPresenter::GetParentColor(void) const +{ + _Control* pParentControl = __pGroupContainer->GetParent(); + if (pParentControl == null) + { + return Color(0, 0, 0, 0); + } + + Color parentBgColor = pParentControl->GetBackgroundColor(); + _Form* pForm = dynamic_cast<_Form*>(pParentControl); + + while (pForm == null && parentBgColor.GetAlpha() == 0x00) + { + pParentControl = pParentControl->GetParent(); + if (pParentControl == null) + { + break; + } + + pForm = dynamic_cast<_Form*>(pParentControl); + parentBgColor = pParentControl->GetBackgroundColor(); + } + + return parentBgColor; +} + +}}} // Tizen::Ui::Controls + diff --git a/src/ui/controls/FUiCtrl_GroupItemImpl.cpp b/src/ui/controls/FUiCtrl_GroupItemImpl.cpp new file mode 100644 index 0000000..476390c --- /dev/null +++ b/src/ui/controls/FUiCtrl_GroupItemImpl.cpp @@ -0,0 +1,255 @@ +// +// 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_GroupItemImpl.cpp + * @brief This is the implementation file for the GroupItemImpl class. + * + * This header file contains the declarations of the GroupItemImpl class. + */ + +#include +#include +#include "FUi_ResourceManager.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUiCtrl_GroupItemImpl.h" +#include "FUiCtrl_ListViewItem.h" + +#ifdef MEMORY_LEAK_CHECK +#include "mem_leak_check.h" +#endif + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Graphics::_Text; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_GroupItemImpl* +_GroupItemImpl::GetInstance(GroupItem& groupItem) +{ + return groupItem._pImpl; +} + +const _GroupItemImpl* +_GroupItemImpl::GetInstance(const GroupItem& groupItem) +{ + return groupItem._pImpl; +} + +_GroupItemImpl::_GroupItemImpl(GroupItem* pPublic) + : _ListItemBaseImpl(null) +{ + GET_SHAPE_CONFIG(LISTVIEW::GROUPITEM_DEFAULT_FONT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, __textSize); + GET_COLOR_CONFIG(TABLEVIEW::GROUPITEM_TEXT_NORMAL, __textColor); +} + +_GroupItemImpl::~_GroupItemImpl(void) +{ + +} + +const char* +_GroupItemImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Controls::GroupItem"; +} + +_GroupItemImpl* +_GroupItemImpl::CreateGroupItemImpN(GroupItem* pPublic, const FloatDimension& itemSize) +{ + 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] Memory allocation failed."); + + r = pImpl->Construct(itemSize); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return pImpl; + +CATCH: + delete pImpl; + pImpl = null; + + return null; +} + +result +_GroupItemImpl::Construct(const FloatDimension& itemSize) +{ + result r = _ListItemBaseImpl::Construct(itemSize, LIST_ANNEX_STYLE_NORMAL); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _ListViewItem* pItem = GetListViewItem(); + + pItem->SetListViewItemType(LISTVIEW_ITEM_TYPE_GROUP); + pItem->SetItemDividerEnabled(false); + pItem->SetItemTapSoundEnabled(false); + + r = SetBackgroundColor(GetBackgroundColor()); + + SetLastResultReturn(r); +} + +result +_GroupItemImpl::SetBackgroundBitmap(const Bitmap* pBitmap) +{ + result r = E_SUCCESS; + + r = _ListItemBaseImpl::SetBackgroundBitmap(LIST_ITEM_DRAWING_STATUS_NORMAL, pBitmap); + r = _ListItemBaseImpl::SetBackgroundBitmap(LIST_ITEM_DRAWING_STATUS_PRESSED, pBitmap); + r = _ListItemBaseImpl::SetBackgroundBitmap(LIST_ITEM_DRAWING_STATUS_HIGHLIGHTED, pBitmap); + + return r; +} + +result +_GroupItemImpl::SetBackgroundColor(const Color& color) +{ + result r = E_SUCCESS; + + r = _ListItemBaseImpl::SetBackgroundColor(LIST_ITEM_DRAWING_STATUS_NORMAL, color); + r = _ListItemBaseImpl::SetBackgroundColor(LIST_ITEM_DRAWING_STATUS_PRESSED, color); + r = _ListItemBaseImpl::SetBackgroundColor(LIST_ITEM_DRAWING_STATUS_HIGHLIGHTED, color); + + return r; +} + +Color +_GroupItemImpl::GetBackgroundColor(void) const +{ + return _ListItemBaseImpl::GetBackgroundColor(LIST_ITEM_DRAWING_STATUS_NORMAL); +} + +result +_GroupItemImpl::SetTextColor(const Color& color) +{ + _ListViewItem* pItem = GetListViewItem(); + + if (pItem->HasElement(LIST_ITEM_RESERVED_ID_3)) + { + bool ret = false; + + ret = pItem->SetTextColor(LIST_ITEM_RESERVED_ID_3, color, LISTVIEW_ITEM_STATUS_NORMAL); + SysTryReturn(NID_UI_CTRL, ret == true, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred."); + + ret = pItem->SetTextColor(LIST_ITEM_RESERVED_ID_3, color, LISTVIEW_ITEM_STATUS_PRESSED); + SysTryReturn(NID_UI_CTRL, ret == true, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred."); + + ret = pItem->SetTextColor(LIST_ITEM_RESERVED_ID_3, color, LISTVIEW_ITEM_STATUS_HIGHLIGHTED); + SysTryReturn(NID_UI_CTRL, ret == true, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred."); + } + + __textColor = color; + + return E_SUCCESS; +} + +Color +_GroupItemImpl::GetTextColor(void) const +{ + return __textColor; +} + +result +_GroupItemImpl::SetTextSize(float size) +{ + __textSize = size; + + _ListViewItem* pItem = GetListViewItem(); + if (pItem->HasElement(LIST_ITEM_RESERVED_ID_3)) + { + bool ret = pItem->SetTextSize(LIST_ITEM_RESERVED_ID_3, size); + + return (ret ? E_SUCCESS : E_SYSTEM); + } + + return E_SUCCESS; +} + +float +_GroupItemImpl::GetTextSize(void) const +{ + return __textSize; +} + +result +_GroupItemImpl::SetElement(const String& text, const Bitmap* pBitmap) +{ + bool ret = false; + _ListViewItem* pItem = GetListViewItem(); + + if (pItem->HasElement(LIST_ITEM_RESERVED_ID_2)) + { + ret = pItem->DeleteElement(LIST_ITEM_RESERVED_ID_2); + SysTryReturn(NID_UI_CTRL, (ret == true), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Unable to delete bitmap element."); + } + + if (pItem->HasElement(LIST_ITEM_RESERVED_ID_3)) + { + ret = pItem->DeleteElement(LIST_ITEM_RESERVED_ID_3); + SysTryReturn(NID_UI_CTRL, (ret == true), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Unable to delete text element."); + } + + FloatRectangle bitmapRect = FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle textRect = FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); + float leftMargin = 0.0f; + float itemHeight = GetItemSize().height; + float elementSpacing = 0.0f; + result r = E_SUCCESS; + + GET_SHAPE_CONFIG(LISTVIEW::GROUPITEM_ELEMENT_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, leftMargin); + + // Add Bitmap element (optional) + if (pBitmap != null) + { + GET_SHAPE_CONFIG(LISTVIEW::GROUPITEM_ELEMENT_SPACING, _CONTROL_ORIENTATION_PORTRAIT, elementSpacing); + + float elementWidth = itemHeight * GROUP_ITEM_ELEMENT_BITMAP_SIZE_RATIO; + float elementHeight = elementWidth; + + bitmapRect.x = leftMargin; + bitmapRect.y = (itemHeight - elementHeight) / 2.0f; + bitmapRect.width = elementWidth; + bitmapRect.height = elementHeight; + + r = pItem->AddElement(bitmapRect, LIST_ITEM_RESERVED_ID_2, pBitmap); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + } + + // Add Text element + textRect.x = leftMargin + bitmapRect.width + elementSpacing; + textRect.y = 0; + textRect.width = GetItemSize().width - textRect.x; + textRect.height = itemHeight; + + r = pItem->AddElement(textRect, LIST_ITEM_RESERVED_ID_3, text); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + pItem->SetTextSize(LIST_ITEM_RESERVED_ID_3, __textSize); + pItem->SetTextAlignment(LIST_ITEM_RESERVED_ID_3, TEXT_OBJECT_ALIGNMENT_MIDDLE); + + pItem->SetTextColor(LIST_ITEM_RESERVED_ID_3, __textColor, LISTVIEW_ITEM_STATUS_NORMAL); + pItem->SetTextColor(LIST_ITEM_RESERVED_ID_3, __textColor, LISTVIEW_ITEM_STATUS_PRESSED); + pItem->SetTextColor(LIST_ITEM_RESERVED_ID_3, __textColor, LISTVIEW_ITEM_STATUS_HIGHLIGHTED); + + return E_SUCCESS; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_GroupedListImpl.cpp b/src/ui/controls/FUiCtrl_GroupedListImpl.cpp new file mode 100644 index 0000000..8378ef4 --- /dev/null +++ b/src/ui/controls/FUiCtrl_GroupedListImpl.cpp @@ -0,0 +1,1504 @@ +// +// 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_GroupedListImpl.cpp +* @brief This file contains implementation of _GroupedListImpl class +*/ + +#include +#include +#include +#include +#include "FUiCtrl_CustomListItemFormatImpl.h" +#include "FUiCtrl_CustomListItemImpl.h" +#include "FUiCtrl_GroupedListImpl.h" +#include "FUiCtrl_ListItemBaseImpl.h" +#include "FUiCtrl_CustomListElements.h" +#include "FUiCtrl_FastScroll.h" +#include "FUiCtrl_FastScrollIndex.h" +#include "FUiCtrl_ListListener.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_UiBuilder.h" +#include "FUi_ResourceSizeInfo.h" +#include "FUi_ResourceManager.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Base::Collection; +using namespace Tizen::Base::Utility; + + +namespace Tizen { namespace Ui { namespace Controls +{ + +static const int ID_FORMAT_STRING = 1; +static const int ID_FORMAT_MARGIN = 2; + +_GroupedListItemDataProvider::_GroupedListItemDataProvider(_GroupedListImpl* pGroupedListImpl) +{ + __pList = pGroupedListImpl; +} + +_GroupedListItemDataProvider::~_GroupedListItemDataProvider(void) +{ +} + +int +_GroupedListItemDataProvider::GetGroupCount() +{ + SysTryReturn(NID_UI_CTRL, __pList, 0, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Item provider not constructed properly."); + return __pList->GetGroupCount(); +} + +int +_GroupedListItemDataProvider::GetItemCount(int groupIndex) +{ + SysTryReturn(NID_UI_CTRL, __pList, 0, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Item provider not constructed properly."); + + return __pList->GetSubItemCountAt(groupIndex); +} + +TableViewGroupItem* +_GroupedListItemDataProvider::CreateGroupItem(int groupIndex, int itemWidth) +{ + result r = E_SUCCESS; + + _TableViewItemParams tableViewItemParams; + tableViewItemParams.pItem = __pList->GetCustomListItemAt(groupIndex, -1); + tableViewItemParams.width = itemWidth; + tableViewItemParams.itemId = -1; + tableViewItemParams.groupIndex = groupIndex; + tableViewItemParams.itemIndex = -1; + tableViewItemParams.isDividerEnabled = false; + tableViewItemParams.pCheckBitmaps = null; + tableViewItemParams.annexStyle = __pList->_annexStyle; + + r = _CustomListItemImpl::CreateTableViewItem(tableViewItemParams); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + return __pList->GetTableViewGroupItemAt(groupIndex); +} + +TableViewItem* +_GroupedListItemDataProvider::CreateItem(int groupIndex, int itemIndex, int itemWidth) +{ + result r = E_SUCCESS; + + CustomListItem* pCustomListItem = __pList->GetCustomListItemAt(groupIndex, itemIndex); + SysTryReturn(NID_UI_CTRL, pCustomListItem, null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get an item at index(%d).", itemIndex); + + _TableViewItemParams tableViewItemParams; + tableViewItemParams.pItem = pCustomListItem; + tableViewItemParams.width = itemWidth; + tableViewItemParams.itemId = pCustomListItem->__pCustomListItemImpl->itemId; + tableViewItemParams.groupIndex = groupIndex; + tableViewItemParams.itemIndex = itemIndex; + tableViewItemParams.isDividerEnabled = __pList->_isDividerEnabled; + tableViewItemParams.pCheckBitmaps = __pList->_pCheckBitmaps; + tableViewItemParams.annexStyle = __pList->_annexStyle; + + r = _CustomListItemImpl::CreateTableViewItem(tableViewItemParams); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + pCustomListItem->__pCustomListItemImpl->__pTableViewItemData->AddTouchEventListener(*__pList); + + TableViewItem* pItem = pCustomListItem->__pCustomListItemImpl->__pTableViewItemData; + pItem->SetBackgroundColor(__pList->__bgColor); + + return pItem; +} + +int +_GroupedListItemDataProvider::GetDefaultGroupItemHeight(void) +{ + return __pList->__groupItemHeight; +} + +int +_GroupedListItemDataProvider::GetDefaultItemHeight(void) +{ + CustomListItem* pItem = __pList->GetCustomListItemAt(0, 0); + + if (pItem) + { + return pItem->__pCustomListItemImpl->height; + } + else + { + return __pList->_defaultItemHeight; + } +} + +bool +_GroupedListItemDataProvider::DeleteGroupItem(int groupIndex, TableViewGroupItem* pItem) +{ + delete pItem; + + if (__pList->__directDelete == false) + { + CustomListItem* pCustomListItem = __pList->GetCustomListItemAt(groupIndex, -1); + pCustomListItem->__pCustomListItemImpl->__pTableViewGroupItemData = null; + } + + return true; +} + +bool +_GroupedListItemDataProvider::IsReorderable(int groupIndexFrom, int groupIndexTo) +{ + return false; +} + +bool +_GroupedListItemDataProvider::DeleteItem(int groupIndex, int itemIndex, TableViewItem* pItem) +{ + delete pItem; + + if (__pList->__directDelete == false) + { + CustomListItem* pCustomListItem = __pList->GetCustomListItemAt(groupIndex, itemIndex); + pCustomListItem->__pCustomListItemImpl->__pTableViewItemData = null; + } + + return true; +} + +void +_GroupedListItemDataProvider::UpdateGroupItem(int groupIndex, TableViewGroupItem* pItem) +{ +} + +void +_GroupedListItemDataProvider::UpdateItem(int groupIndex, int itemIndex, TableViewItem* pItem) +{ + CustomListItem* pCustomListItem = __pList->GetCustomListItemAt(groupIndex, itemIndex); + SysTryReturnVoidResult(NID_UI_CTRL, pCustomListItem, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get an item at index(%d, %d).", groupIndex, itemIndex); + + _TableViewItemUpdateParams updateParams; + updateParams.pItem = pCustomListItem; + updateParams.isDividerEnabled = __pList->_isDividerEnabled; + updateParams.pCheckBitmaps = __pList->_pCheckBitmaps; + updateParams.annexStyle = __pList->_annexStyle; + + result r = E_SUCCESS; + + r = _CustomListItemImpl::UpdateTableViewItem(updateParams); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to refresh an item."); + + pItem->SetEnabled(true); +} + +_GroupedListImpl* +_GroupedListImpl::GetInstance(GroupedList& groupedList) +{ + return static_cast<_GroupedListImpl*>(groupedList._pControlImpl); +} + +const _GroupedListImpl* +_GroupedListImpl::GetInstance(const GroupedList& groupedList) +{ + return static_cast(groupedList._pControlImpl); +} + +_GroupedListImpl::_GroupedListImpl(Control* pList, _TableView* pCore) + : _ListBaseImpl(pList, pCore) + , __pItemProvider(null) + , __pItemListener(null) + , __groupItemHeight(0) + , __groupItemTextFont(0) + , __directDelete(false) + , __pItemFormat(null) +{ +} + +_GroupedListImpl::~_GroupedListImpl(void) +{ + int count = GetItemCount(); + + for (int index = 0; index < count; index++) + { + RemoveFromSubItemsList(index); + } + + RemoveAllFromItemsList(); + + __itemListenersList.RemoveAll(true); + __fastScrollListenersList.RemoveAll(true); + + delete __pItemProvider; + + delete __pItemFormat; +} + +const char* +_GroupedListImpl::GetPublicClassName(void) const +{ + return "GroupedList"; +} + +const GroupedList& +_GroupedListImpl::GetPublic(void) const +{ + return static_cast(_ControlImpl::GetPublic()); +} + +GroupedList& +_GroupedListImpl::GetPublic(void) +{ + return static_cast(_ControlImpl::GetPublic()); +} + +const _TableView& +_GroupedListImpl::GetCore(void) const +{ + return static_cast(_ControlImpl::GetCore()); +} + +_TableView& +_GroupedListImpl::GetCore(void) +{ + return static_cast<_TableView&>(_ControlImpl::GetCore()); +} + +_GroupedListImpl* +_GroupedListImpl::CreateGroupedListImplN(GroupedList* pControl, const Rectangle& bounds, bool itemDivider, bool fastScroll) +{ + result r = E_SUCCESS; + _TableView* pCore = null; + _GroupedListImpl* pImpl = null; + + r = GET_SIZE_INFO(GroupedList).CheckInitialSizeValidF(FloatDimension(bounds.width, bounds.height), _CONTROL_ORIENTATION_PORTRAIT); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + if(fastScroll == true) + { + pCore = _TableView::CreateTableViewN(TABLE_VIEW_STYLE_GROUPED, itemDivider, TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL); + } + else + { + pCore = _TableView::CreateTableViewN(TABLE_VIEW_STYLE_GROUPED, itemDivider, TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT); + } + + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pCore, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + pImpl = new (std::nothrow) _GroupedListImpl(pControl, pCore); + SysTryCatch(NID_UI_CTRL, pImpl, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = pImpl->InitializeBoundsPropertiesF(GET_SIZE_INFO(GroupedList), _CoordinateSystemUtils::ConvertToFloat(bounds), pCore->GetOrientation()); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pCore->SetItemDividerEnabled(itemDivider); + + return pImpl; + +CATCH: + delete pCore; + delete pImpl; + + return null; +} + +result +_GroupedListImpl::AddGroupedItemEventListener(const IGroupedItemEventListener& listener) +{ + _ListListener* pListenerData = new (std::nothrow) _ListListener(); + + SysTryReturn(NID_UI_CTRL, pListenerData, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pListenerData->pListener = const_cast(&listener); + __itemListenersList.Add(*pListenerData); + + return E_SUCCESS; +} + +result +_GroupedListImpl::RemoveGroupedItemEventListener(const IGroupedItemEventListener& listener) +{ + _ListListener* pListenerData = null; + int count = __itemListenersList.GetCount(); + result r = E_SYSTEM; + + for (int listenerCount = 0; listenerCount < count; listenerCount++) + { + pListenerData = dynamic_cast<_ListListener*>(__itemListenersList.GetAt(listenerCount)); + + if ((pListenerData != null) && (pListenerData->pListener == &listener)) + { + r = E_SUCCESS; + __itemListenersList.RemoveAt(listenerCount, true); + break; + } + } + + return r; +} + +result +_GroupedListImpl::AddFastScrollEventListener(const IFastScrollEventListener& listener) +{ + _ListListener* pListenerData = new (std::nothrow) _ListListener(); + + SysTryReturn(NID_UI_CTRL, pListenerData, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pListenerData->pListener = const_cast(&listener); + __fastScrollListenersList.Add(*pListenerData); + + return E_SUCCESS; +} + +result +_GroupedListImpl::RemoveFastScrollEventListener(const IFastScrollEventListener& listener) +{ + _ListListener* pListenerData = null; + int count = __fastScrollListenersList.GetCount(); + + for (int listenerCount = 0; listenerCount < count; listenerCount++) + { + pListenerData = dynamic_cast<_ListListener*>(__fastScrollListenersList.GetAt(listenerCount)); + + if ((pListenerData != null) && (pListenerData->pListener == &listener)) + { + __fastScrollListenersList.RemoveAt(listenerCount, true); + break; + } + } + return E_SUCCESS; +} + +result +_GroupedListImpl::Initialize(void) +{ + __pItemProvider = new (std::nothrow) _GroupedListItemDataProvider(this); + SysTryReturn(NID_UI_CTRL, (__pItemProvider != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + 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"); + + _TableViewItemProvider* pItemProvider = _TableViewItemProvider::CreateTableViewItemProviderN(style); + SysTryReturn(NID_UI_CTRL, pItemProvider != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + result r = pItemProvider->SetGroupedStyleItemProvider(__pItemProvider); + if (r != E_SUCCESS) + { + delete pItemProvider; + SysTryReturn(NID_UI_CTRL, false, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + r = GetCore().SetItemProvider(pItemProvider); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GetCore().AddGroupedTableViewItemEventListener(*this); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (GetCore().GetScrollStyle() == TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL) + { + r = GetCore().AddFastScrollListener(*this); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + GET_SHAPE_CONFIG(TABLEVIEW::GROUPITEM_DEFAULT_HEIGHT, GetCore().GetOrientation(), __groupItemHeight); + GET_SHAPE_CONFIG(TABLEVIEW::GROUPITEM_DEFAULT_FONT_SIZE, GetCore().GetOrientation(), __groupItemTextFont); + + __pItemFormat = new (std::nothrow) CustomListItemFormat(); + SysTryReturn(NID_UI_CTRL, __pItemFormat, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + __pItemFormat->Construct(); + + int leftMargin = 0; + Color groupTextColor = Color(0); + GET_SHAPE_CONFIG(TABLEVIEW::GROUPITEM_INDEX_BAR_LEFT_MARGIN, GetCore().GetOrientation(), leftMargin); + GET_COLOR_CONFIG(TABLEVIEW::GROUPITEM_TEXT_NORMAL, groupTextColor); + + __pItemFormat->AddElement(ID_FORMAT_MARGIN, Rectangle(0, 0, leftMargin, __groupItemHeight), __groupItemTextFont); + __pItemFormat->AddElement(ID_FORMAT_STRING, Rectangle(leftMargin, 0, GetCore().GetBounds().width, __groupItemHeight), + __groupItemTextFont, groupTextColor, groupTextColor); + + __pItemFormat->SetElementEventEnabled(ID_FORMAT_MARGIN, true); + __pItemFormat->SetElementEventEnabled(ID_FORMAT_STRING, true); + + return r; +} + +result +_GroupedListImpl::AddGroup(const String& text, const Bitmap* pBackgroundBitmap, int groupId) +{ + return InsertGroupAt(GetGroupCount(), text, pBackgroundBitmap, groupId); +} + +result +_GroupedListImpl::AddItem(int groupIndex, const CustomListItem& item, int itemId) +{ + SysTryReturnResult(NID_UI_CTRL, ((groupIndex >= 0) && (groupIndex < GetGroupCount())), + E_INVALID_ARG, "Invalid argument used. groupIndex = %d", groupIndex); + + return InsertItemAt(groupIndex, GetSubItemCountAt(groupIndex), item, itemId); +} + +result +_GroupedListImpl::SetItemAt(int groupIndex, int itemIndex, const CustomListItem& item, int itemId) +{ + result r = E_SUCCESS; + + SysTryReturnResult(NID_UI_CTRL, ((groupIndex >= 0) && (groupIndex < GetGroupCount())), + E_INVALID_ARG, "Invalid argument used. groupIndex = %d", groupIndex); + + SysTryReturnResult(NID_UI_CTRL, ((itemIndex >= 0) && (itemIndex < GetSubItemCountAt(groupIndex))), + E_INVALID_ARG, "Invalid argument used. groupIndex = %d", itemIndex); + + SysTryReturnResult(NID_UI_CTRL, (IsItemNew(item) == true), E_SYSTEM, "A system error has occurred. The item already exists."); + + CustomListItem* pOldCustomListItem = GetCustomListItemAt(groupIndex, itemIndex); + SysTryReturnResult(NID_UI_CTRL, pOldCustomListItem, E_SYSTEM, "A system error has occurred. Failed to get old CustomListItem"); + + _CheckElementModel* pOldCheckElement = GetCheckElementAt(groupIndex, itemIndex); + _CheckElementModel* pNewCheckElement = item.__pCustomListItemImpl->GetCheckElement(); + + if (pNewCheckElement && pOldCheckElement) + { + pNewCheckElement->SetCheckBoxStatus(pOldCheckElement->GetCheckBoxStatus()); + } + + item.__pCustomListItemImpl->__pTableViewItemData = pOldCustomListItem->__pCustomListItemImpl->__pTableViewItemData; + item.__pCustomListItemImpl->itemId = itemId; + + _TableViewGroupItemData* pGroupItem = GetTableViewGroupItemAt(groupIndex); + SysTryReturn(NID_UI_CTRL, pGroupItem, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get GroupItem at %d index.", groupIndex); + + r = SetInItemsList(item, groupIndex, itemIndex); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, "A system error has occurred. Failed to insert an item."); + + r = GetCore().RefreshTableView(groupIndex, itemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, "A system error has occurred. Failed to insert an item."); + + return r; +} + +result +_GroupedListImpl::InsertGroupAt(int groupIndex, const String& text, const Bitmap* pBackgroundBitmap, int groupId) +{ + result r = E_SUCCESS; + + SysTryReturn(NID_UI_CTRL, (groupIndex >= 0 && groupIndex <= GetGroupCount()), + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. groupIndex = %d", groupIndex); + + CustomListItem* pCustomListItem = new (std::nothrow) CustomListItem(); + SysTryReturn(NID_UI_CTRL, pCustomListItem, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pCustomListItem->Construct(__groupItemHeight); + pCustomListItem->SetItemFormat(*__pItemFormat); + pCustomListItem->SetElement(ID_FORMAT_STRING, text); + pCustomListItem->SetElement(ID_FORMAT_MARGIN, ""); + + if (pBackgroundBitmap != null) + { + pCustomListItem->SetNormalItemBackgroundBitmap(*pBackgroundBitmap); + } + + pCustomListItem->__pCustomListItemImpl->itemId = groupId; + + r = InsertIntoItemsList(*pCustomListItem, groupIndex, -1); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to insert an item."); + + if (GetCore().GetFirstDrawnFlag() == false) + { + r = GetCore().RefreshTableView(groupIndex, -1, TABLE_VIEW_REFRESH_TYPE_ITEM_ADD); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to insert an item."); + } + + return r; +} + +result +_GroupedListImpl::SetGroupAt(int groupIndex, const String& text, const Bitmap* pBackgroundBitmap, int groupId) +{ + result r = E_SUCCESS; + + SysTryReturn(NID_UI_CTRL, (groupIndex >= 0 && groupIndex < GetGroupCount()), + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. groupIndex = %d", groupIndex); + + CustomListItem* pCustomListItem = GetCustomListItemAt(groupIndex, -1); + SysTryReturn(NID_UI_CTRL, (pCustomListItem), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to insert an item."); + + _CustomListItemImpl* pCustomListItemImpl = pCustomListItem->__pCustomListItemImpl; + SysTryReturn(NID_UI_CTRL, (pCustomListItemImpl), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to insert an item."); + + pCustomListItem->SetElement(ID_FORMAT_STRING, text); + if (pBackgroundBitmap != null) + { + pCustomListItem->SetNormalItemBackgroundBitmap(*pBackgroundBitmap); + } + + pCustomListItemImpl->itemId = groupId; + + _TableViewItemUpdateParams updateParams; + updateParams.pItem = pCustomListItem; + updateParams.isDividerEnabled = _isDividerEnabled; + updateParams.pCheckBitmaps = _pCheckBitmaps; + updateParams.annexStyle = _annexStyle; + + r = _CustomListItemImpl::UpdateTableViewItem(updateParams); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, "A system error has occurred. Failed to refresh an item."); + + return r; +} + +result +_GroupedListImpl::InsertItemAt(int groupIndex, int itemIndex, const CustomListItem& item, int itemId) +{ + result r = E_SUCCESS; + + SysTryReturn(NID_UI_CTRL, ((groupIndex >= 0) && (groupIndex < GetGroupCount())), + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. groupIndex = %d", groupIndex); + + SysTryReturn(NID_UI_CTRL, ((itemIndex >= 0) && (itemIndex <= GetSubItemCountAt(groupIndex))), + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. itemIndex = %d", itemIndex); + + item.__pCustomListItemImpl->itemId = itemId; + + r = InsertIntoItemsList(item, groupIndex, itemIndex); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to insert an item."); + + r = GetCore().RefreshTableView(groupIndex, itemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_ADD); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to insert an item."); + + return r; +} + +result +_GroupedListImpl::RemoveItemAt(int groupIndex, int itemIndex) +{ + int count = GetGroupCount(); + SysTryReturn(NID_UI_CTRL, ((groupIndex >= 0) && (groupIndex < count)), + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. groupIndex = %d.", groupIndex); + + SysTryReturn(NID_UI_CTRL, ((itemIndex >= 0) && (itemIndex < GetSubItemCountAt(groupIndex))), + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. itemIndex = %d", itemIndex); + + result r = E_SUCCESS; + + r = RemoveFromItemsList(groupIndex, itemIndex); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to remove item."); + + __directDelete = true; + + r = GetCore().RefreshTableView(groupIndex, itemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_REMOVE); + + __directDelete = false; + + return r; +} + +result +_GroupedListImpl::RemoveAllItemsAt(int groupIndex) +{ + SysTryReturn(NID_UI_CTRL, ((groupIndex >= 0) && (groupIndex < GetGroupCount())), + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. groupIndex = %d.", groupIndex); + + result r = E_SUCCESS; + + int count = GetSubItemCountAt(groupIndex) - 1; + for (int index = count; index >= 0; index--) + { + r = RemoveItemAt(groupIndex, 0); + } + + return r; +} + +result +_GroupedListImpl::RemoveGroupAt(int groupIndex) +{ + SysTryReturn(NID_UI_CTRL, ((groupIndex >= 0) && (groupIndex < GetGroupCount())), + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. groupIndex = %d.", groupIndex); + + result r = E_SUCCESS; + + r = RemoveFromSubItemsList(groupIndex); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = RemoveFromItemsList(groupIndex, -1); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __directDelete = true; + + r = GetCore().RefreshTableView(groupIndex, -1, TABLE_VIEW_REFRESH_TYPE_ITEM_REMOVE); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __directDelete = false; + + return E_SUCCESS; +} + +result +_GroupedListImpl::RemoveAllGroups(void) +{ + result r = E_SUCCESS; + int count = GetGroupCount(); + + for (int groupIndex = (count - 1); groupIndex >= 0; groupIndex--) + { + r = RemoveGroupAt(groupIndex); + } + + return r; +} + +result +_GroupedListImpl::RemoveAllItems(void) +{ + result r = E_SUCCESS; + int count = GetGroupCount(); + + for (int groupIndex = count - 1; groupIndex >= 0; groupIndex--) + { + r = RemoveAllItemsAt(groupIndex); + } + + return r; +} + +result +_GroupedListImpl::SetItemEnabled(int groupIndex, int itemIndex, bool enable) +{ + int count = GetGroupCount(); + SysTryReturnResult(NID_UI_CTRL, ((groupIndex >= 0) && (groupIndex < count)), E_INVALID_ARG, "Invalid argument used. groupIndex = %d.", groupIndex); + + SysTryReturnResult(NID_UI_CTRL, (itemIndex >= 0 && itemIndex < GetSubItemCountAt(groupIndex)), E_INVALID_ARG, "Invalid argument used. itemIndex(%d)", itemIndex); + + result r = E_SUCCESS; + + r = GetCore().SetItemEnabled(groupIndex, itemIndex, enable); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + DrawItem(groupIndex, itemIndex); + + return r; +} + +bool +_GroupedListImpl::IsItemEnabled(int groupIndex, int itemIndex) const +{ + return GetCore().IsItemEnabled(groupIndex, itemIndex); +} + +result +_GroupedListImpl::SetItemChecked(int groupIndex, int itemIndex, bool check) +{ + SysTryReturnResult(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL), E_SYSTEM, "A system error has occurred. List style should not be TABLE_VIEW_ANNEX_STYLE_NORMAL"); + + SysTryReturn(NID_UI_CTRL, ((groupIndex >= 0) && (groupIndex < GetGroupCount())), + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. groupIndex = %d", groupIndex); + + SysTryReturn(NID_UI_CTRL, ((itemIndex >= 0) && (itemIndex < GetSubItemCountAt(groupIndex))), + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. itemIndex = %d", itemIndex); + + SysTryReturn(NID_UI_CTRL, (IsItemEnabled(groupIndex, itemIndex) == true), + E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The List item is not enabled at index %d %d.", groupIndex, itemIndex); + + if (IsItemChecked(groupIndex, itemIndex) == check) + { + return E_SUCCESS; + } + + _CheckElementModel* pCheckElement = GetCheckElementAt(groupIndex, itemIndex); + SysTryReturnResult(NID_UI_CTRL, (pCheckElement != null), E_SYSTEM, "A system error has occurred. Checkbox element not created"); + + if (_annexStyle == TABLE_VIEW_ANNEX_STYLE_RADIO) + { + if (check) + { + if (_currentRadioGroupIndex != -1) + { + _CheckElementModel* pOldCheckElement = GetCheckElementAt(_currentRadioGroupIndex, _currentRadioIndex); + SysTryReturnResult(NID_UI_CTRL, (pOldCheckElement != null), E_SYSTEM, "A system error has occurred. Checkbox element not created"); + + pOldCheckElement->SetCheckBoxStatus(CHECK_BOX_UNCHECKED); + + DrawItem(_currentRadioGroupIndex, _currentRadioIndex); + } + + _currentRadioGroupIndex = groupIndex; + _currentRadioIndex = itemIndex; + + } + else + { + _currentRadioGroupIndex = -1; + _currentRadioIndex = -1; + } + } + + pCheckElement->SetCheckBoxStatus((_CheckBoxBitmapType)check); + + GetCore().Draw(); + + return E_SUCCESS; +} + +bool +_GroupedListImpl::IsItemChecked(int groupIndex, int itemIndex) const +{ + SysTryReturn(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL), + false, E_SYSTEM, "[E_SYSTEM] A system error has occurred. List style should not be TABLE_VIEW_ANNEX_STYLE_NORMAL."); + + const _CheckElementModel* pCheckElement = GetCheckElementAt(groupIndex, itemIndex); + SysTryReturn(NID_UI_CTRL, pCheckElement, false, E_SYSTEM, "[E_SYSTEM] A system error has occurred. CheckElement is not constructed properly."); + + return (bool)pCheckElement->GetCheckBoxStatus(); +} + +result +_GroupedListImpl::SetAllItemsChecked(int groupIndex, bool check) +{ + SysTryReturn(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The List Style should not be TABLE_VIEW_ANNEX_STYLE_NORMAL"); + SysTryReturn(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_RADIO), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The List Style should not be TABLE_VIEW_ANNEX_STYLE_RADIO"); + + SysTryReturn(NID_UI_CTRL, ((groupIndex >= 0) && (groupIndex < GetGroupCount())), + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. groupIndex = %d", groupIndex); + + _CheckElementModel* pCheckElement = null; + + int groupItemCount = GetSubItemCountAt(groupIndex); + for (int indexItem = 0; indexItem < groupItemCount; indexItem++) + { + pCheckElement = GetCheckElementAt(groupIndex, indexItem); + SysTryReturnResult(NID_UI_CTRL, (pCheckElement != null), E_SYSTEM, "A system error has occurred. Checkbox element not created."); + + pCheckElement->SetCheckBoxStatus((_CheckBoxBitmapType)check); + } + + return E_SUCCESS; +} + +result +_GroupedListImpl::RemoveAllCheckedItems(void) +{ + SysTryReturn(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The List Style should not be TABLE_VIEW_ANNEX_STYLE_NORMAL"); + SysTryReturn(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_RADIO), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The List Style should not be TABLE_VIEW_ANNEX_STYLE_RADIO"); + + int count = GetGroupCount(); + + for (int groupIndex = (count - 1); groupIndex >= 0; groupIndex--) + { + if (RemoveAllCheckedItemsAt(groupIndex) != E_SUCCESS) + { + SysLog(NID_UI_CTRL, "Checked item with groupIndex=%d not removed successfully.", groupIndex); + } + } + + return E_SUCCESS; +} + +result +_GroupedListImpl::RemoveAllCheckedItemsAt(int groupIndex) +{ + result r = E_SUCCESS; + + SysTryReturn(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The List Style should not be TABLE_VIEW_ANNEX_STYLE_NORMAL"); + SysTryReturn(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_RADIO), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The List Style should not be TABLE_VIEW_ANNEX_STYLE_RADIO"); + + SysTryReturn(NID_UI_CTRL, ((groupIndex >= 0) && (groupIndex < GetGroupCount())), + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. groupIndex = %d", groupIndex); + + int count = GetSubItemCountAt(groupIndex); + for (int itemIndex = (count - 1) ; itemIndex >= 0; itemIndex--) + { + if (IsItemChecked(groupIndex, itemIndex)) + { + r = RemoveItemAt(groupIndex, itemIndex); + if (r != E_SUCCESS) + { + SysLog(NID_UI_CTRL, "Checked item with index %d %d not removed successfully.", groupIndex, itemIndex); + } + } + } + + return r; +} + +result +_GroupedListImpl::GetFirstCheckedItemIndex(int& groupIndex, int& itemIndex) const +{ + SysTryReturnResult(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL), E_SYSTEM, "List style should not be TABLE_VIEW_ANNEX_STYLE_NORMAL"); + + groupIndex = -1; + itemIndex = -1; + int count = GetGroupCount(); + for (int indexGroup = 0; indexGroup < count; indexGroup++) + { + int subItemCount = GetSubItemCountAt(indexGroup); + + for (int indexItem = 0; indexItem < subItemCount; indexItem++) + { + if (IsItemChecked(indexGroup, indexItem)) + { + itemIndex = indexItem; + groupIndex = indexGroup; + return E_SUCCESS; + } + } + } + + return E_SYSTEM; +} + +result +_GroupedListImpl::GetLastCheckedItemIndex(int& groupIndex, int& itemIndex) const +{ + SysTryReturnResult(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL), E_SYSTEM, "List style should not be TABLE_VIEW_ANNEX_STYLE_NORMAL"); + + groupIndex = -1; + itemIndex = -1; + int count = GetGroupCount(); + + for (int indexGroup = count - 1; indexGroup >= 0; indexGroup--) + { + int subItemCount = GetSubItemCountAt(indexGroup); + + for (int indexItem = subItemCount - 1; indexItem >= 0; indexItem--) + { + if (IsItemChecked(indexGroup, indexItem)) + { + itemIndex = indexItem; + groupIndex = indexGroup; + return E_SUCCESS; + } + } + } + + return E_SYSTEM; +} + +result +_GroupedListImpl::GetNextCheckedItemIndexAfter(int& groupIndex, int& itemIndex) const +{ + SysTryReturnResult(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL), E_SYSTEM, "List style should not be TABLE_VIEW_ANNEX_STYLE_NORMAL"); + + int count = GetGroupCount(); + + int subItemCount = GetSubItemCountAt(groupIndex); + + SysTryReturn(NID_UI_CTRL, ((groupIndex >= 0) && (groupIndex < count)), + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. groupIndex = %d.", groupIndex); + + SysTryReturn(NID_UI_CTRL, ((itemIndex >= 0) && (itemIndex < subItemCount)), + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. itemIndex = %d.", itemIndex); + + SysTryReturn(NID_UI_CTRL, (!((groupIndex == (count - 1)) && (itemIndex == (subItemCount - 1)))), + E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Input item is last item of last group") + + int itemStart = 0; + + for (int indexGroup = groupIndex; indexGroup < count; indexGroup++) + { + if (indexGroup == groupIndex) + { + itemStart = itemIndex + 1; + } + else + { + itemStart = 0; + } + + subItemCount = GetSubItemCountAt(groupIndex); + for (int indexItem = itemStart; indexItem < subItemCount; indexItem++) + { + if (IsItemChecked(indexGroup, indexItem)) + { + itemIndex = indexItem; + groupIndex = indexGroup; + return E_SUCCESS; + } + } + } + + return E_SYSTEM; +} + +int +_GroupedListImpl::GetGroupIndexFromGroupId(int groupId) const +{ + int count = GetGroupCount(); + + for (int indexGroup = 0; indexGroup < count; indexGroup++) + { + const CustomListItem* pCustomListItem = GetCustomListItemAt(indexGroup, -1); + SysTryReturn(NID_UI_CTRL, pCustomListItem, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get an item at index(%d).", indexGroup); + + if (pCustomListItem->__pCustomListItemImpl->itemId == groupId) + { + return indexGroup; + } + } + SetLastResult(E_SUCCESS); + return -1; +} + +result +_GroupedListImpl::GetItemIndexFromItemId(int itemId, int& groupIndex, int& itemIndex) const +{ + groupIndex = -1; + itemIndex = -1; + + int count = GetGroupCount(); + + for (int indexGroup = 0; indexGroup < count; indexGroup++) + { + int subItemCount = GetSubItemCountAt(indexGroup); + for (int indexItem = 0; indexItem < subItemCount; indexItem++) + { + const CustomListItem* pSubListItem = GetCustomListItemAt(indexGroup, indexItem); + SysTryReturn(NID_UI_CTRL, pSubListItem, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get an item at index(%d).", indexItem); + + if (pSubListItem->__pCustomListItemImpl->itemId == itemId) + { + itemIndex = indexItem; + groupIndex = indexGroup; + return E_SUCCESS; + } + } + } + + return E_SYSTEM; +} + +void +_GroupedListImpl::ScrollToBottom(void) +{ + int lastGroupIndex = GetGroupCount() - 1; + int lastItemIndex = GetSubItemCountAt(lastGroupIndex) - 1; + + GetCore().SetBottomDrawnItemIndex(lastGroupIndex, lastItemIndex); + GetCore().Draw(); + + return; +} +void +_GroupedListImpl::ScrollToTop(void) +{ + GetCore().SetTopDrawnItemIndex(0, -1); + + GetCore().Draw(); + + return; +} + +result +_GroupedListImpl::ScrollToTop(int groupIndex) +{ + SysTryReturn(NID_UI_CTRL, ((groupIndex < GetGroupCount()) && (groupIndex >= 0)), + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. groupIndex = %d.", groupIndex); + + result r = E_SUCCESS; + + r = GetCore().SetTopDrawnItemIndex(groupIndex, -1); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + GetCore().Draw(); + + return r; +} + +result +_GroupedListImpl::ScrollToTop(int groupIndex, int itemIndex) +{ + SysTryReturn(NID_UI_CTRL, ((groupIndex < GetGroupCount()) && (groupIndex >= 0)), + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. groupIndex = %d.", groupIndex); + + SysTryReturn(NID_UI_CTRL, ((itemIndex >= 0) && (itemIndex < GetSubItemCountAt(groupIndex))), + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. itemIndex = %d.", itemIndex); + + result r = E_SUCCESS; + + r = GetCore().SetTopDrawnItemIndex(groupIndex, itemIndex); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + GetCore().Draw(); + + return r; +} + +result +_GroupedListImpl::RefreshGroup(int groupIndex) +{ + result r = E_SUCCESS; + + SysTryReturn(NID_UI_CTRL, ((groupIndex < GetGroupCount()) && (groupIndex >= 0)), + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. groupIndex = %d.", groupIndex); + + int count = GetSubItemCountAt(groupIndex); + for (int indexItem = 0; indexItem < count; indexItem++) + { + r = RefreshItem(groupIndex, indexItem); + if (r != E_SUCCESS) + { + SysLog(NID_UI_CTRL, "Not able to refresh item with index %d %d.", groupIndex, indexItem); + } + } + + return E_SUCCESS; +} + +result +_GroupedListImpl::RefreshItem(int groupIndex, int itemIndex) +{ + SysTryReturn(NID_UI_CTRL, ((groupIndex < GetGroupCount()) && (groupIndex >= 0)), + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. groupIndex = %d.", groupIndex); + + result r = E_SUCCESS; + + SysTryReturn(NID_UI_CTRL, ((itemIndex >= 0) && (itemIndex < GetSubItemCountAt(groupIndex))), + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. itemIndex = %d.", itemIndex); + + int topItemIndex = -1; + int bottomItemIndex = -1; + int groupItemIndex = -1; + + GetCore().GetTopDrawnItemIndex(groupItemIndex, topItemIndex); + GetCore().GetBottomDrawnItemIndex(groupItemIndex, bottomItemIndex); + + SysTryReturnResult(NID_UI_CTRL, (itemIndex >= topItemIndex && itemIndex <= bottomItemIndex), E_INVALID_OPERATION, + "Index should be within drawn item range %d.", itemIndex); + + _TableViewItemUpdateParams updateParams; + updateParams.pItem = GetCustomListItemAt(groupIndex, itemIndex); + updateParams.isDividerEnabled = _isDividerEnabled; + updateParams.pCheckBitmaps = _pCheckBitmaps; + updateParams.annexStyle = _annexStyle; + + r = _CustomListItemImpl::UpdateTableViewItem(updateParams); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, "A system error has occurred. Failed to refresh an item."); + + DrawItem(groupIndex, itemIndex); + + return E_SUCCESS; +} + +int +_GroupedListImpl::GetGroupIdAt(int groupIndex) const +{ + SysTryReturn(NID_UI_CTRL, ((groupIndex < GetGroupCount()) && (groupIndex >= 0)), + -1, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. groupIndex = %d.", groupIndex); + + const CustomListItem* pCustomListItem = GetCustomListItemAt(groupIndex, -1); + SysTryReturn(NID_UI_CTRL, pCustomListItem, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get an item at index(%d).", groupIndex); + + SysTryReturn(NID_UI_CTRL, pCustomListItem->__pCustomListItemImpl, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get an item at index(%d).", groupIndex); + + return pCustomListItem->__pCustomListItemImpl->itemId; +} + +int +_GroupedListImpl::GetItemIdAt(int groupIndex, int itemIndex) const +{ + int count = GetGroupCount(); + SysTryReturn(NID_UI_CTRL, ((groupIndex >= 0) && (groupIndex < count)), + -1, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. groupIndex = %d.", groupIndex); + + SysTryReturn(NID_UI_CTRL, ((itemIndex >= 0) && (itemIndex < GetSubItemCountAt(groupIndex))), + -1, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. itemIndex = %d.", itemIndex); + + const CustomListItem* pItem = GetCustomListItemAt(groupIndex, itemIndex); + SysTryReturn(NID_UI_CTRL, pItem, -1, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get an item at index(%d %d).", groupIndex, itemIndex); + + return pItem->__pCustomListItemImpl->itemId; +} + +void +_GroupedListImpl::SetListBackgroundColor(const Color& bgColor) +{ + GetCore().SetBackgroundColor(bgColor); + return; +} + +void +_GroupedListImpl::OnTableViewItemStateChanged(_TableView& tableView, int itemIndex, _TableViewItem* pItem, TableViewItemStatus status) +{ + return; +} + +void +_GroupedListImpl::OnTableViewContextItemActivationStateChanged(_TableView& tableView, int itemIndex, _TableViewItem* pContextItem, bool activated) +{ + return; +} + +void +_GroupedListImpl::OnTableViewItemReordered(_TableView& tableView, int itemIndexFrom, int itemIndexTo) +{ + return; +} + +void +_GroupedListImpl::OnGroupedTableViewGroupItemStateChanged(_TableView& tableView, int groupIndex, _TableViewItem* pItem, TableViewItemStatus status) +{ + return; +} + +void +_GroupedListImpl::OnGroupedTableViewItemStateChanged(_TableView& tableView, int groupIndex, int itemIndex, _TableViewItem* pItem, TableViewItemStatus status) +{ + CustomListItemStatus customListItemStatus = CUSTOM_LIST_ITEM_STATUS_NORMAL; + ItemStatus itemStatus = ITEM_HIGHLIGHTED; + + switch (status) + { + case TABLE_VIEW_ITEM_STATUS_SELECTED: + itemStatus = ITEM_SELECTED; + customListItemStatus = CUSTOM_LIST_ITEM_STATUS_SELECTED; + break; + case TABLE_VIEW_ITEM_STATUS_HIGHLIGHTED: + itemStatus = ITEM_HIGHLIGHTED; + customListItemStatus = CUSTOM_LIST_ITEM_STATUS_FOCUSED; + break; + case TABLE_VIEW_ITEM_STATUS_CHECKED: + itemStatus = ITEM_CHECKED; + break; + case TABLE_VIEW_ITEM_STATUS_UNCHECKED: + itemStatus = ITEM_UNCHECKED; + break; + default: + SysLog(NID_UI_CTRL, "[E_SYSTEM] A system error has occurred. item status is invalid(%d).", status); + SetLastResult(E_SYSTEM); + return; + } + + CustomListItem* pCustomListItem = GetCustomListItemAt(groupIndex, itemIndex); + SysTryReturnVoidResult(NID_UI_CTRL, pCustomListItem, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get an item at index(%d).", itemIndex); + + LinkedList* pElements = &pCustomListItem->__pCustomListItemImpl->elements; + _ElementBaseModel* pElementBase = null; + + for (int i = 0; i < pElements->GetCount(); i++) + { + pElementBase = dynamic_cast<_ElementBaseModel*>(pElements->GetAt(i)); + SysTryReturnVoidResult(NID_UI_CTRL, (pElementBase != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get valid element at index %d.", i); + + if ((_isDividerEnabled && pElementBase->_elementType != LIST_ITEM_ELEMENT_TYPE_CHECKBOX) || (!_isDividerEnabled)) + { + pElementBase->HandleElementEvent(customListItemStatus); + } + } + + if ((!_isDividerEnabled) && (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL)) + { + bool isChecked = IsItemChecked(groupIndex, itemIndex); + + if (isChecked) + { + itemStatus = ITEM_UNCHECKED; + } + else + { + itemStatus = ITEM_CHECKED; + } + + SetItemChecked(groupIndex, itemIndex, !isChecked); + } + + ProcessItemStateChange(groupIndex, itemIndex, itemStatus); + + GetCore().Draw(); + return; +} + +void +_GroupedListImpl::OnGroupedTableViewContextItemActivationStateChanged(_TableView& tableView, int groupIndex, int itemIndex, _TableViewItem* pContextItem, bool activated) +{ + return; +} + +void +_GroupedListImpl::OnGroupedTableViewItemReordered(_TableView& tableView, int groupIndexFrom, int itemIndexFrom, int groupIndexTo, int itemIndexTo) +{ + return; +} + +void +_GroupedListImpl::OnSectionTableViewItemStateChanged(_TableView& tableView, int sectionIndex, int itemIndex, _TableViewItem* pItem, TableViewItemStatus status) +{ + return; +} + +void +_GroupedListImpl::OnSectionTableViewContextItemActivationStateChanged(_TableView& tableView, int sectionIndex, int itemIndex, _TableViewItem* pContextItem, bool activated) +{ + return; +} + +void +_GroupedListImpl::OnTableViewItemSwept(_TableView& tableView, int groupIndex, int itemIndex, TableViewSweepDirection direction) +{ + return; +} + +void +_GroupedListImpl::ProcessItemStateChange(int groupIndex, int itemIndex, int elementId, ItemStatus itemStatus) +{ + int itemId = GetItemIdAt(groupIndex, itemIndex); + _ListListener* pListenerData = null; + IGroupedItemEventListener* pGroupedItemEventListener = null; + int count = __itemListenersList.GetCount(); + + for (int listenerCount = 0; listenerCount < count; listenerCount++) + { + pListenerData = dynamic_cast<_ListListener*>(__itemListenersList.GetAt(listenerCount)); + if (pListenerData != null) + { + pGroupedItemEventListener = dynamic_cast(pListenerData->pListener); + SysTryReturnVoidResult(NID_UI_CTRL, (pGroupedItemEventListener != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get EventListener"); + + pGroupedItemEventListener->OnItemStateChanged(GetPublic(), groupIndex, itemIndex, itemId, elementId, itemStatus); + } + } + + return; +} + +void +_GroupedListImpl::ProcessItemStateChange(int groupIndex, int itemIndex, ItemStatus itemStatus) +{ + int itemId = GetItemIdAt(groupIndex, itemIndex); + _ListListener* pListenerData = null; + IGroupedItemEventListener* pGroupedItemEventListener = null; + int count = __itemListenersList.GetCount(); + + for (int listenerCount = 0; listenerCount < count; listenerCount++) + { + pListenerData = dynamic_cast<_ListListener*>(__itemListenersList.GetAt(listenerCount)); + if (pListenerData != null) + { + pGroupedItemEventListener = dynamic_cast(pListenerData->pListener); + SysTryReturnVoidResult(NID_UI_CTRL, (pGroupedItemEventListener != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get EventListener"); + pGroupedItemEventListener->OnItemStateChanged(GetPublic(), groupIndex, itemIndex, itemId, itemStatus); + } + } + SetLastResult(E_SUCCESS); + return; +} + +void +_GroupedListImpl::OnUiFastScrollIndexSelected(_Control& source, _FastScrollIndex& index) +{ + _ListListener* pListenerData = null; + IFastScrollEventListener* pFastScrollListener = null; + int listenerCount = __fastScrollListenersList.GetCount(); + + for (int listenerIndex = 0; listenerIndex < listenerCount; listenerIndex++) + { + pListenerData = dynamic_cast<_ListListener*>(__fastScrollListenersList.GetAt(listenerIndex)); + SysTryReturnVoidResult(NID_UI_CTRL, (pListenerData != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get ScrollEventListener"); + + pFastScrollListener = dynamic_cast(pListenerData->pListener); + SysTryReturnVoidResult(NID_UI_CTRL, (pFastScrollListener != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get ScrollEventListener"); + + wchar_t mch = L' '; + String* pIndexText = index.GetIndexText(); + if (pIndexText != null) + { + pIndexText->GetCharAt(0, mch); + } + const Control& control = GetPublic(); + _FastScrollIndex* __pMainIndex = index.GetParentIndex(); + if (__pMainIndex == GetCore().GetFastScrollBar()->GetIndex()) + { + Character mainIndex(mch); + pFastScrollListener->OnMainIndexChanged(control, mainIndex); + } + } + SetLastResult(E_SUCCESS); + return; +} + + +void +_GroupedListImpl::OnBoundsChanged(void) +{ + GetCore().OnBoundsChanged(); + return; +} + +result +_GroupedListImpl::SetFastScrollMainIndex(const String& text) +{ + SysTryReturn(NID_UI_CTRL, (text.GetLength() > 0), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Empty string"); + + result r = GetCore().SetFastScrollIndex(text, false); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + __mainIndexText = text; + + return E_SUCCESS; +} + +class _GroupedListMaker + : public _UiBuilderControlMaker +{ +public: + _GroupedListMaker(_UiBuilder* uibuilder) + : _UiBuilderControlMaker(uibuilder){}; + virtual ~_GroupedListMaker(){}; + static _UiBuilderControlMaker* + GetInstance(_UiBuilder* uibuilder) + { + _GroupedListMaker* pGroupedListMaker = new (std::nothrow) _GroupedListMaker(uibuilder); + return pGroupedListMaker; + }; +protected: + virtual Tizen::Ui::Control* + Make(_UiBuilderControl* pControl) + { + result r = E_SYSTEM; + _UiBuilderControlLayout* pControlProperty = null; + GroupedList* pGroupedList = null; + Rectangle rect; + Rectangle rectMin; + Dimension dimMin; + + Tizen::Base::String elementString; + CustomListStyle style = CUSTOM_LIST_STYLE_NORMAL; + bool isItemDivider = true; + bool isFastScroll = false; + Color color; + + GetProperty(pControl, &pControlProperty); + if (pControlProperty == null) + { + return null; + } + + pGroupedList = new (std::nothrow) GroupedList(); + if (pGroupedList == null) + { + return null; + } + + rect = pControlProperty->GetRect(); + + Tizen::Base::String styleString; + styleString = pControlProperty->GetStyle(); + + if (styleString.Equals(L"CUSTOM_LIST_STYLE_NORMAL", false)) + { + style = CUSTOM_LIST_STYLE_NORMAL; + } + else if (styleString.Equals(L"CUSTOM_LIST_STYLE_RADIO", false)) + { + style = CUSTOM_LIST_STYLE_RADIO; + } + else if (styleString.Equals(L"CUSTOM_LIST_STYLE_RADIO_WITH_DIVIDER", false)) + { + style = CUSTOM_LIST_STYLE_RADIO_WITH_DIVIDER; + } + else if (styleString.Equals(L"CUSTOM_LIST_STYLE_MARK", false)) + { + style = CUSTOM_LIST_STYLE_MARK; + } + else if (styleString.Equals(L"CUSTOM_LIST_STYLE_MARK_WITH_DIVIDER", false)) + { + style = CUSTOM_LIST_STYLE_MARK_WITH_DIVIDER; + } + else if (styleString.Equals(L"CUSTOM_LIST_STYLE_ONOFF", false)) + { + style = CUSTOM_LIST_STYLE_ONOFF; + } + else if (styleString.Equals(L"CUSTOM_LIST_STYLE_ONOFF_WITH_DIVIDER", false)) + { + style = CUSTOM_LIST_STYLE_ONOFF_WITH_DIVIDER; + } + else + { + style = CUSTOM_LIST_STYLE_NORMAL; + } + + //Construct + if (pControl->GetElement("itemDivider", elementString)) + { + if (elementString.Equals(L"true", false)) + { + isItemDivider = true; + } + else + { + isItemDivider = false; + } + } + + if (pControl->GetElement("fastScroll", elementString)) + { + if (elementString.Equals(L"true", false)) + { + isFastScroll = true; + } + else + { + isFastScroll = false; + } + } + + r = pGroupedList->Construct(rect, style, isItemDivider, isFastScroll); + if (r != E_SUCCESS) + { + delete pGroupedList; + return null; + } + + if (pControl->GetElement("textOfEmptyList", elementString)) + { + pGroupedList->SetTextOfEmptyList(elementString); + } + + if (pControl->GetElement("colorOfEmptyListText", elementString)) + { + ConvertStringToColor(elementString, color); + pGroupedList->SetTextColorOfEmptyList(color); + } + + GET_DIMENSION_CONFIG(LIST::GROUPEDLIST_MIN_SIZE, _CONTROL_ORIENTATION_PORTRAIT, dimMin); + rectMin = (pControl->GetAttribute(0))->GetRect(); + (pControl->GetAttribute(0))->SetRect(rectMin.x, rectMin.y, dimMin.width, dimMin.height); + + GET_DIMENSION_CONFIG(LIST::GROUPEDLIST_MIN_SIZE, _CONTROL_ORIENTATION_LANDSCAPE, dimMin); + rectMin = (pControl->GetAttribute(1))->GetRect(); + (pControl->GetAttribute(1))->SetRect(rectMin.x, rectMin.y, dimMin.width, dimMin.height); + + return pGroupedList; + } + +private: +}; + +_GroupedListRegister::_GroupedListRegister() +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + if (pUiBuilderControlTableManager) + { + pUiBuilderControlTableManager->RegisterControl(L"GroupedList", _GroupedListMaker::GetInstance); + } +} +_GroupedListRegister::~_GroupedListRegister() +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + if (pUiBuilderControlTableManager) + { + pUiBuilderControlTableManager->UnregisterControl(L"GroupedList"); + } +} +static _GroupedListRegister GroupedListRegisterToUiBuilder; +}}} //Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_GroupedListViewImpl.cpp b/src/ui/controls/FUiCtrl_GroupedListViewImpl.cpp new file mode 100644 index 0000000..3ec5c6e --- /dev/null +++ b/src/ui/controls/FUiCtrl_GroupedListViewImpl.cpp @@ -0,0 +1,2325 @@ +// +// 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_GroupedListViewImpl.cpp + * @brief This is the implementation file for + * _GroupedListViewImpl class. + * + * This file contains the implementation of _GroupedListViewImpl + * class. + */ + +#include +#include +#include +#include "FUi_AccessibilityContainer.h" +#include "FUi_AccessibilityElement.h" +#include "FUi_AccessibilityManager.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_ITouchLongPressGestureEventListener.h" +#include "FUi_Math.h" +#include "FUi_ResourceManager.h" +#include "FUi_TouchEventArg.h" +#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" +#include "FUiCtrl_GroupedListViewItemProviderAdaptor.h" +#include "FUiCtrl_Label.h" +#include "FUiCtrl_ListItemEvent.h" +#include "FUiCtrl_ListItemEventArg.h" +#include "FUiCtrl_ListViewItem.h" +#include "FUiCtrl_PublicLinkEvent.h" +#include "FUiCtrl_ScrollEvent.h" +#include "FUiCtrl_ScrollEventArg.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Base::Utility; +using namespace Tizen::Graphics; +using namespace Tizen::Graphics::_Text; + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _GroupedListViewImpl::_GroupedListViewPropagatedTouchEventListener + : public Tizen::Ui::_IPropagatedTouchEventListener + , public Tizen::Ui::_ITouchLongPressGestureEventListener +{ +public: + + _GroupedListViewPropagatedTouchEventListener(_GroupedListViewImpl& impl) + : __impl(impl) + , __core(impl.GetCore()) + , __public(impl.GetPublic()) + , __oldPreviousPressedTime(0) + , __previousPressedTime(0) + , __currentPressedTime(0) + , __previousPressedPoint(0.0f, 0.0f) + , __currentPressedPoint(0.0f, 0.0f) + , __pLongPressedGesture(null) + { + __pTouchManager = _TouchManager::GetInstance(); + SysTryReturnVoidResult(NID_UI_CTRL, (__pTouchManager != null), E_SYSTEM, "[E_SYSTEM] System error occurred."); + + // Add _TouchLongPressGestureDetector + __pLongPressedGesture = new (std::nothrow) _TouchLongPressGestureDetector(); + 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); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] propagating.", GetErrorMessage(r)); + } + + virtual ~_GroupedListViewPropagatedTouchEventListener(void) + { + if (__pLongPressedGesture != null) + { + __pLongPressedGesture->RemoveGestureListener(*this); + __core.RemoveGestureDetector(*__pLongPressedGesture); + + delete __pLongPressedGesture; + __pLongPressedGesture = null; + } + } + + virtual bool OnTouchPressed(const _Control& source, const _TouchInfo& touchInfo) + { + return __impl.CallOnTouchPressed(source, touchInfo); + } + + virtual bool OnTouchReleased(const _Control& source, const _TouchInfo& touchInfo) + { + return __impl.CallOnTouchReleased(source, touchInfo); + } + + virtual bool OnTouchMoved(const _Control& source, const _TouchInfo& touchInfo) + { + return __impl.CallOnTouchMoved(source, touchInfo); + } + + virtual bool OnTouchCanceled(const _Control& source, const _TouchInfo& touchInfo) + { + return __impl.CallOnTouchCanceled(source, touchInfo); + } + + virtual _UiTouchEventDelivery OnPreviewTouchPressed(const _Control& source, const _TouchInfo& touchInfo) + { + _UiTouchEventDelivery isFiltered = _UI_TOUCH_EVENT_DELIVERY_NO; + IPropagatedTouchEventListener* pListener = __impl.GetPublicPropagatedTouchEventListener(); + + if (pListener != null) + { + Control& control = __impl.GetPublic(); + + TouchEventInfo publicTouchInfo; + + _TouchEventArg* pEventArg = GetTouchEventArgN(touchInfo); + SysTryReturn(NID_UI, pEventArg, _UI_TOUCH_EVENT_DELIVERY_YES, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + publicTouchInfo.Construct(*pEventArg); + + if (pEventArg) + { + delete pEventArg; + pEventArg = null; + } + + if (pListener->OnTouchPressed(control, publicTouchInfo) == true) + { + return _UI_TOUCH_EVENT_DELIVERY_NO; + } + } + + // public TouchEventListener + if (ProcessTouchEventListener(touchInfo) == true) + { + return _UI_TOUCH_EVENT_DELIVERY_NO; + } + + if (__core.Equals(source)) + { + return _UI_TOUCH_EVENT_DELIVERY_NO; + } + + isFiltered = __impl.OnPreviewTouchPressed(__impl, touchInfo); + if (isFiltered == _UI_TOUCH_EVENT_DELIVERY_NO) + { + return _UI_TOUCH_EVENT_DELIVERY_NO; + } + + isFiltered = __core.OnPreviewTouchPressed(source, touchInfo); + + return isFiltered; + } + + virtual _UiTouchEventDelivery OnPreviewTouchReleased(const _Control& source, const _TouchInfo& touchInfo) + { + _UiTouchEventDelivery isFiltered = _UI_TOUCH_EVENT_DELIVERY_NO; + IPropagatedTouchEventListener* pListener = __impl.GetPublicPropagatedTouchEventListener(); + + if (pListener != null) + { + Control& control = __impl.GetPublic(); + + TouchEventInfo publicTouchInfo; + + _TouchEventArg* pEventArg = GetTouchEventArgN(touchInfo); + SysTryReturn(NID_UI, pEventArg, _UI_TOUCH_EVENT_DELIVERY_YES, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + publicTouchInfo.Construct(*pEventArg); + + if (pEventArg) + { + delete pEventArg; + pEventArg = null; + } + + if (pListener->OnTouchReleased(control, publicTouchInfo) == true) + { + return _UI_TOUCH_EVENT_DELIVERY_NO; + } + } + + // public TouchEventListener + if (ProcessTouchEventListener(touchInfo) == true) + { + return _UI_TOUCH_EVENT_DELIVERY_NO; + } + + if (__core.Equals(source)) + { + return _UI_TOUCH_EVENT_DELIVERY_NO; + } + + isFiltered = __impl.OnPreviewTouchReleased(__impl, touchInfo); + if (isFiltered == _UI_TOUCH_EVENT_DELIVERY_NO) + { + return _UI_TOUCH_EVENT_DELIVERY_NO; + } + + isFiltered = __core.OnPreviewTouchReleased(source, touchInfo); + + return isFiltered; + } + + virtual _UiTouchEventDelivery OnPreviewTouchMoved(const _Control& source, const _TouchInfo& touchInfo) + { + _UiTouchEventDelivery isFiltered = _UI_TOUCH_EVENT_DELIVERY_NO; + IPropagatedTouchEventListener* pListener = __impl.GetPublicPropagatedTouchEventListener(); + + if (pListener != null) + { + Control& control = __impl.GetPublic(); + + TouchEventInfo publicTouchInfo; + + _TouchEventArg* pEventArg = GetTouchEventArgN(touchInfo); + SysTryReturn(NID_UI, pEventArg, _UI_TOUCH_EVENT_DELIVERY_YES, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + publicTouchInfo.Construct(*pEventArg); + + if (pEventArg) + { + delete pEventArg; + pEventArg = null; + } + + if (pListener->OnTouchMoved(control, publicTouchInfo) == true) + { + return _UI_TOUCH_EVENT_DELIVERY_NO; + } + } + + // public TouchEventListener + if (ProcessTouchEventListener(touchInfo) == true) + { + return _UI_TOUCH_EVENT_DELIVERY_NO; + } + + if (__core.Equals(source)) + { + return _UI_TOUCH_EVENT_DELIVERY_NO; + } + + isFiltered = __impl.OnPreviewTouchMoved(__impl, touchInfo); + if (isFiltered == _UI_TOUCH_EVENT_DELIVERY_NO) + { + return _UI_TOUCH_EVENT_DELIVERY_NO; + } + + isFiltered = __core.OnPreviewTouchMoved(source, touchInfo); + + return isFiltered; + } + + virtual _UiTouchEventDelivery OnPreviewTouchCanceled(const _Control& source, const _TouchInfo& touchInfo) + { + IPropagatedTouchEventListener* pListener = __impl.GetPublicPropagatedTouchEventListener(); + + if (pListener != null) + { + Control& control = __impl.GetPublic(); + + TouchEventInfo publicTouchInfo; + + _TouchEventArg* pEventArg = GetTouchEventArgN(touchInfo); + SysTryReturn(NID_UI, pEventArg, _UI_TOUCH_EVENT_DELIVERY_YES, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + publicTouchInfo.Construct(*pEventArg); + + if (pEventArg) + { + delete pEventArg; + pEventArg = null; + } + + if (pListener->OnTouchCanceled(control, publicTouchInfo) == true) + { + return _UI_TOUCH_EVENT_DELIVERY_NO; + } + } + + // public TouchEventListener + if (ProcessTouchEventListener(touchInfo) == true) + { + return _UI_TOUCH_EVENT_DELIVERY_NO; + } + + return _UI_TOUCH_EVENT_DELIVERY_YES; + } + + virtual void OnTouchPressHandled(const _Control& source) + { + __impl.OnTouchPressHandled(source); + } + + virtual void OnTouchReleaseHandled(const _Control& source) + { + __impl.OnTouchReleaseHandled(source); + } + + virtual void OnTouchMoveHandled(const _Control& source) + { + __impl.OnTouchMoveHandled(source); + } + + virtual void OnTouchCancelHandled(const _Control& source) + { + __impl.OnTouchCancelHandled(source); + } + + bool OnLongPressGestureDetected(_TouchLongPressGestureDetector& gesture) + { + bool filtered = ProcessTouchEventListener(); + + if (!filtered) + { + __impl.FireListViewItemLongPressedEvent(); + } + + return filtered; + } + + bool OnLongPressGestureCanceled(_TouchLongPressGestureDetector& gesture) + { + return false; + } + +private: + + bool ProcessTouchEventListener(const _TouchInfo& touchInfo) + { + bool filtered = false; + + if (touchInfo.GetTouchStatus() == _TOUCH_PRESSED) + { + filtered = ProcessTouchDoublePressed(touchInfo); + } + + if (!filtered) + { + ProcessTouchEvent(touchInfo); + } + + filtered = __impl.IsInputEventConsumed(); + + if (filtered) + { + __impl.ResetInputEventConsumed(); + } + + return filtered; + } + + bool ProcessTouchEventListener(void) + { + // for TouchLongPressed + _TouchInfo touchInfo(0, _TOUCH_LONG_PRESSED, __currentPressedPoint, false, 0); + + return ProcessTouchEventListener(touchInfo); + } + + void ProcessTouchEvent(const _TouchInfo& touchInfo) + { + TouchEventInfo publicTouchInfo; + + _TouchEventArg* pEventArg = GetTouchEventArgN(touchInfo); + SysTryReturnVoidResult(NID_UI, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + publicTouchInfo.Construct(*pEventArg); + + _Control* pDraggedControl = __pTouchManager->GetTouchControlSource(); + + IEnumeratorT* pEnumerator = __impl.GetTouchEventListener()->GetEnumeratorN(); + if (pEnumerator) + { + while (pEnumerator->MoveNext() == E_SUCCESS) + { + IEventListener* pListener = null; + pEnumerator->GetCurrent(pListener); + + ITouchEventListener* pTouchEventListener = dynamic_cast (pListener); + if (pTouchEventListener != null) + { + FirePublicListener(*pTouchEventListener, publicTouchInfo); + + if (touchInfo.GetTouchStatus() == _TOUCH_RELEASED) + { + if (pDraggedControl == null) //if exist dragged control, don't send focus event + { + FireFocusListener(*pTouchEventListener, publicTouchInfo); + } + } + else if (touchInfo.GetTouchStatus() == _TOUCH_MOVED) + { + FireFocusListener(*pTouchEventListener, publicTouchInfo); + } + } + } + + delete pEnumerator; + } + + delete pEventArg; + } + + bool ProcessTouchDoublePressed(const _TouchInfo& touchinfo) + { + if (__pTouchManager->GetPointCount() == 1) + { + __oldPreviousPressedTime = __previousPressedTime; + __previousPressedTime = __currentPressedTime; + __currentPressedTime = touchinfo.GetTimeStamp(); + __previousPressedPoint.x = __currentPressedPoint.x; + __previousPressedPoint.y = __currentPressedPoint.y; + __currentPressedPoint.x = touchinfo.GetCurrentPosition().x; + __currentPressedPoint.y = touchinfo.GetCurrentPosition().y; + + if (Math::Abs(__previousPressedTime - __currentPressedTime) < DOUBLE_PRESS_TIME) + { + if (Math::Abs(__previousPressedTime - __oldPreviousPressedTime) > DOUBLE_PRESS_TIME) + { + if ((Math::Abs(__previousPressedPoint.x - __currentPressedPoint.x) < DOUBLE_PRESS_MOVE_ALLOWANCE) + && (Math::Abs(__previousPressedPoint.y - __currentPressedPoint.y) < DOUBLE_PRESS_MOVE_ALLOWANCE)) + { + _TouchInfo touchInfo(0, _TOUCH_DOUBLE_PRESSED, __currentPressedPoint, false, 0); + ProcessTouchEvent(touchInfo); + + return true; + } + } + } + } + + return false; + } + + void FirePublicListener(ITouchEventListener& listener, const TouchEventInfo& touchEventInfo) + { + switch (touchEventInfo.GetTouchStatus()) + { + case TOUCH_PRESSED: + listener.OnTouchPressed(__public, touchEventInfo.GetCurrentPosition(), touchEventInfo); + break; + case TOUCH_LONG_PRESSED: + listener.OnTouchLongPressed(__public, touchEventInfo.GetCurrentPosition(), touchEventInfo); + break; + case TOUCH_RELEASED: + listener.OnTouchReleased(__public, touchEventInfo.GetCurrentPosition(), touchEventInfo); + break; + case TOUCH_MOVED: + listener.OnTouchMoved(__public, touchEventInfo.GetCurrentPosition(), touchEventInfo); + break; + case TOUCH_DOUBLE_PRESSED: + listener.OnTouchDoublePressed(__public, touchEventInfo.GetCurrentPosition(), touchEventInfo); + break; + case TOUCH_FOCUS_IN: + listener.OnTouchFocusIn(__public, touchEventInfo.GetCurrentPosition(), touchEventInfo); + break; + case TOUCH_FOCUS_OUT: + listener.OnTouchFocusOut(__public, touchEventInfo.GetCurrentPosition(), touchEventInfo); + break; + case TOUCH_CANCELED: + listener.OnTouchCanceled(__public, touchEventInfo.GetCurrentPosition(), touchEventInfo); + break; + default: + break; + } + } + + void FireFocusListener(ITouchEventListener& listener, const TouchEventInfo& touchEventInfo) + { + _ControlManager* pControlManager = _ControlManager::GetInstance(); + SysTryReturnVoidResult(NID_UI, pControlManager, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + Point screenPoint(__pTouchManager->GetScreenPoint(touchEventInfo.GetPointId()).x, + __pTouchManager->GetScreenPoint(touchEventInfo.GetPointId()).y); + + _Control* pTouchedControl = pControlManager->GetTopmostTouchedControl(screenPoint); + SysTryReturnVoidResult(NID_UI, pTouchedControl, E_INVALID_CONDITION, "[E_INVALID_CONDITION] pTouchedControl is null."); + + if (__pTouchManager->GetFocusedControlSource() != pTouchedControl) + { + if (&(__core) != pTouchedControl) + { + if (__pTouchManager->GetFocusedControlSource() == &(__core)) + { + listener.OnTouchFocusOut(__public, touchEventInfo.GetCurrentPosition(), touchEventInfo); + } + } + else + { + listener.OnTouchFocusIn(__public, touchEventInfo.GetCurrentPosition(), touchEventInfo); + } + + __pTouchManager->SetFocusedControlSource(*pTouchedControl); + } + } + + _TouchEventArg* GetTouchEventArgN(const _TouchInfo& touchInfo) + { + FloatPoint startPoint; + + _TouchEventArg* pEventArg = new (std::nothrow) _TouchEventArg(__public, touchInfo.GetTouchStatus()); + 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(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); + + // need to flick distance setting + + return pEventArg; + } + +private: + static const int DOUBLE_PRESS_TIME = 500; + static const int DOUBLE_PRESS_MOVE_ALLOWANCE = 10; + + _GroupedListViewImpl& __impl; + _Control& __core; + Control& __public; + _TouchManager* __pTouchManager; + + unsigned int __oldPreviousPressedTime; + unsigned int __previousPressedTime; + unsigned int __currentPressedTime; + Tizen::Graphics::FloatPoint __previousPressedPoint; + Tizen::Graphics::FloatPoint __currentPressedPoint; + _TouchLongPressGestureDetector* __pLongPressedGesture; +}; + +_GroupedListViewImpl* +_GroupedListViewImpl::GetInstance(GroupedListView& groupedListView) +{ + return static_cast <_GroupedListViewImpl*>(groupedListView._pControlImpl); +} + +const _GroupedListViewImpl* +_GroupedListViewImpl::GetInstance(const GroupedListView& groupedListView) +{ + return static_cast (groupedListView._pControlImpl); +} + +_GroupedListViewImpl::_GroupedListViewImpl(GroupedListView* pGroupedList, _TableView* pCore) + : _ControlImpl(pGroupedList, pCore) + , __pListItemEvent(null) + , __pLinkEvent(null) + , __pScrollEvent(null) + , __pFastScrollEvent(null) + , __pEmptyBitmap(null) + , __pEmptyText(null) + , __pAccessibilityElement(null) + , __redrawListView(true) + , __isOrientationChanged(false) + , __isUpdateListCalled(false) + , __needReloadItems(false) + , __pPropagatedTouchEventListener(null) +{ + GET_COLOR_CONFIG(TABLEVIEW::EMPTY_CONTENTS_TEXT_NORMAL, __emptyTextColor); +} + +_GroupedListViewImpl::~_GroupedListViewImpl() +{ + delete __pListItemEvent; + __pListItemEvent = null; + + delete __pLinkEvent; + __pLinkEvent = null; + + delete __pScrollEvent; + __pScrollEvent = null; + + delete __pFastScrollEvent; + __pFastScrollEvent = null; + + if (__pEmptyBitmap != null) + { + GetCore().DetachChild(*__pEmptyBitmap); + + delete __pEmptyBitmap; + __pEmptyBitmap = null; + } + + if (__pEmptyText != null) + { + GetCore().DetachChild(*__pEmptyText); + + delete __pEmptyText; + __pEmptyText = null; + } + + _AccessibilityContainer* pContainer = GetCore().GetAccessibilityContainer(); + + if ((__pAccessibilityElement != null) && (pContainer != null)) + { + pContainer->RemoveElement(__pAccessibilityElement); + } + + delete __pPropagatedTouchEventListener; + __pPropagatedTouchEventListener = null; +} + +const char* +_GroupedListViewImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Controls::GroupedListView"; +} + +const GroupedListView& +_GroupedListViewImpl::GetPublic(void) const +{ + return static_cast (_ControlImpl::GetPublic()); +} + +GroupedListView& +_GroupedListViewImpl::GetPublic(void) +{ + return static_cast (_ControlImpl::GetPublic()); +} + +const _TableView& +_GroupedListViewImpl::GetCore(void) const +{ + return static_cast (_ControlImpl::GetCore()); +} + +_TableView& +_GroupedListViewImpl::GetCore(void) +{ + return static_cast <_TableView&>(_ControlImpl::GetCore()); +} + +_GroupedListViewImpl* +_GroupedListViewImpl::CreateGroupedListViewImplN(GroupedListView* pControl, GroupedListViewStyle style, bool itemDivider, ListScrollStyle scrollStyle) +{ + result r = E_SUCCESS; + TableViewScrollBarStyle scrollBarStyle; + + switch (scrollStyle) + { + case SCROLL_STYLE_FADE_OUT: + scrollBarStyle = TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT; + break; + + case SCROLL_STYLE_FIXED: + scrollBarStyle = TABLE_VIEW_SCROLL_BAR_STYLE_FIXED; + break; + + case SCROLL_STYLE_FAST_SCROLL: + scrollBarStyle = TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL; + break; + + case SCROLL_STYLE_JUMP_TO_TOP: + scrollBarStyle = TABLE_VIEW_SCROLL_BAR_STYLE_JUMP_TO_TOP; + break; + + case SCROLL_STYLE_THUMB: + scrollBarStyle = TABLE_VIEW_SCROLL_BAR_STYLE_THUMB; + break; + + case SCROLL_STYLE_FAST_SCROLL_FIXED: + scrollBarStyle = TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL_FIXED; + break; + + default: + scrollBarStyle = TABLE_VIEW_SCROLL_BAR_STYLE_NONE; + break; + } + + 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] Memory allocation failed."); + + _GroupedListViewImpl* pImpl = new (std::nothrow) _GroupedListViewImpl(pControl, pCore); + + r = CheckConstruction(pCore, pImpl); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), null, r, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + pImpl->__pPropagatedTouchEventListener = new (std::nothrow) _GroupedListViewPropagatedTouchEventListener(*pImpl); + + if (pImpl->__pPropagatedTouchEventListener != null) + { + pCore->SetPropagatedTouchEventListener(pImpl->__pPropagatedTouchEventListener); + } + + return pImpl; +} + +result +_GroupedListViewImpl::SetItemProvider(IGroupedListViewItemProvider& provider) +{ + result r = E_SUCCESS; + + _GroupedListViewItemProviderAdaptor* pProviderAdaptor = + static_cast <_GroupedListViewItemProviderAdaptor*>(GetCore().GetItemProviderAdaptor()); + + if (pProviderAdaptor != null) + { + IGroupedListViewItemProvider* pProvider = pProviderAdaptor->GetItemProvider(); + if (&provider == pProvider) + { + return r; + } + } + + float itemWidth = GetBoundsF().width; + + if (GetCore().GetTableViewStyle() == TABLE_VIEW_STYLE_SECTION) + { + float margin = 0.0f; + GET_SHAPE_CONFIG(TABLEVIEW::GROUPITEM_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, margin); + + itemWidth -= (margin * 2.0f); + } + + if (pProviderAdaptor == null) + { + pProviderAdaptor = new (std::nothrow) _GroupedListViewItemProviderAdaptor(provider); + SysTryReturn(NID_UI_CTRL, (pProviderAdaptor != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, + "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pProviderAdaptor->SetListViewItemEventListener(*this); + + r = pProviderAdaptor->SetListWidth(itemWidth); + GetCore().SetItemProviderAdaptor(pProviderAdaptor); + } + else + { + pProviderAdaptor->SetItemProvider(provider); + r = pProviderAdaptor->SetListWidth(itemWidth); + + UpdateList(); + } + + __redrawListView = true; + + SetLastResultReturn(r); +} + +result +_GroupedListViewImpl::SetItemProvider(IGroupedListViewItemProviderF& provider) +{ + result r = E_SUCCESS; + + _GroupedListViewItemProviderAdaptor* pProviderAdaptor = + static_cast <_GroupedListViewItemProviderAdaptor*>(GetCore().GetItemProviderAdaptor()); + + if (pProviderAdaptor != null) + { + IGroupedListViewItemProviderF* pProvider = pProviderAdaptor->GetItemProviderF(); + if (&provider == pProvider) + { + return r; + } + } + + float itemWidth = GetBoundsF().width; + + if (GetCore().GetTableViewStyle() == TABLE_VIEW_STYLE_SECTION) + { + float margin = 0.0f; + GET_SHAPE_CONFIG(TABLEVIEW::GROUPITEM_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, margin); + + itemWidth -= (margin * 2.0f); + } + + if (pProviderAdaptor == null) + { + pProviderAdaptor = new (std::nothrow) _GroupedListViewItemProviderAdaptor(provider); + SysTryReturn(NID_UI_CTRL, (pProviderAdaptor != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, + "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pProviderAdaptor->SetListViewItemEventListener(*this); + + r = pProviderAdaptor->SetListWidth(itemWidth); + GetCore().SetItemProviderAdaptor(pProviderAdaptor); + } + else + { + pProviderAdaptor->SetItemProvider(provider); + r = pProviderAdaptor->SetListWidth(itemWidth); + + UpdateList(); + } + + __redrawListView = true; + + SetLastResultReturn(r); + + return E_SUCCESS; +} + +void +_GroupedListViewImpl::AddGroupedListViewItemEventListener(IGroupedListViewItemEventListener& listener) +{ + result r = E_SUCCESS; + + if (__pListItemEvent == null) + { + __pListItemEvent = new (std::nothrow) _ListItemEvent(); + 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."); + } + + __pListItemEvent->AddListener(listener); + + r = GetCore().AddGroupedTableViewItemEventListener(*this); + + SetLastResult(r); +} + +void +_GroupedListViewImpl::RemoveGroupedListViewItemEventListener(IGroupedListViewItemEventListener& listener) +{ + result r = E_SUCCESS; + + if (__pListItemEvent != null) + { + r = __pListItemEvent->RemoveListener(listener); + } + + SetLastResult(r); +} + +void +_GroupedListViewImpl::AddFastScrollListener(IFastScrollListener& listener) +{ + result r = E_SUCCESS; + + if (__pFastScrollEvent == null) + { + __pFastScrollEvent = new (std::nothrow) _FastScrollEvent(); + 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."); + } + + __pFastScrollEvent->AddListener(listener); + + r = GetCore().AddFastScrollListener(*this); + + SetLastResult(r); +} + +void +_GroupedListViewImpl::RemoveFastScrollListener(IFastScrollListener& listener) +{ + result r = E_SUCCESS; + + if (__pFastScrollEvent != null) + { + r = __pFastScrollEvent->RemoveListener(listener); + } + + SetLastResult(r); +} + +void +_GroupedListViewImpl::AddScrollEventListener(IScrollEventListener& listener) +{ + result r = E_SUCCESS; + + if (__pScrollEvent == null) + { + __pScrollEvent = new (std::nothrow) _ScrollEvent(); + 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."); + } + + __pScrollEvent->AddListener(listener); + + GetCore().AddScrollEventListener(*this); + + SetLastResult(r); +} + +void +_GroupedListViewImpl::AddScrollEventListener(IScrollEventListenerF& listener) +{ + result r = E_SUCCESS; + + if (__pScrollEvent == null) + { + __pScrollEvent = new (std::nothrow) _ScrollEvent(); + 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."); + } + + __pScrollEvent->AddListener(listener); + + GetCore().AddScrollEventListener(*this); + + SetLastResult(r); +} + +void +_GroupedListViewImpl::RemoveScrollEventListener(IScrollEventListener& listener) +{ + result r = E_SUCCESS; + + if (__pScrollEvent != null) + { + r = __pScrollEvent->RemoveListener(listener); + } + + SetLastResult(r); +} + +void +_GroupedListViewImpl::RemoveScrollEventListener(IScrollEventListenerF& listener) +{ + result r = E_SUCCESS; + + if (__pScrollEvent != null) + { + r = __pScrollEvent->RemoveListener(listener); + } + + SetLastResult(r); +} + +void +_GroupedListViewImpl::AddUiLinkEventListener(const IUiLinkEventListener& listener) +{ + result r = E_SUCCESS; + + if (__pLinkEvent == null) + { + __pLinkEvent = _PublicLinkEvent::CreateInstanceN(GetPublic()); + SysTryReturnVoidResult(NID_UI, (__pLinkEvent != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + } + + r = __pLinkEvent->AddListener(listener); + + SetLastResult(r); +} + +void +_GroupedListViewImpl::RemoveUiLinkEventListener(const IUiLinkEventListener& listener) +{ + result r = E_SUCCESS; + + if (__pLinkEvent != null) + { + r = __pLinkEvent->RemoveListener(listener); + } + + SetLastResult(r); +} + +result +_GroupedListViewImpl::SetSweepEnabled(bool enable) +{ + GetCore().SetSweepEnabled(enable); + + SetLastResultReturn(E_SUCCESS); +} + +result +_GroupedListViewImpl::SetFastScrollIndex(const String& text, bool useSearchIcon) +{ + result r = GetCore().SetFastScrollIndex(text, useSearchIcon); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS) || (r == E_SYSTEM), E_INVALID_STATE, E_INVALID_STATE, + "[E_INVALID_STATE] This instance is in an invalid state."); + + SetLastResultReturn(r); +} + +result +_GroupedListViewImpl::GetTopDrawnItemIndex(int& groupIndex, int& itemIndex) const +{ + 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 +{ + 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 +_GroupedListViewImpl::ScrollToItem(int groupIndex, int itemIndex, ListScrollItemAlignment itemAlignment) +{ + result r = E_SUCCESS; + + if (itemAlignment == LIST_SCROLL_ITEM_ALIGNMENT_TOP) + { + r = GetCore().SetTopDrawnItemIndex(groupIndex, itemIndex); + } + else if (itemAlignment == LIST_SCROLL_ITEM_ALIGNMENT_BOTTOM) + { + r = GetCore().SetBottomDrawnItemIndex(groupIndex, itemIndex); + } + else + { + SysTryReturn(NID_UI_CTRL, false, E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] The specified itemAlignment is out of range."); + } + + SetLastResultReturn(r); +} + +result +_GroupedListViewImpl::SetItemChecked(int groupIndex, int itemIndex, bool check) +{ + return GetCore().SetItemChecked(groupIndex, itemIndex, check); +} + +bool +_GroupedListViewImpl::IsItemChecked(int groupIndex, int itemIndex) const +{ + return GetCore().IsItemChecked(groupIndex, itemIndex); +} + +result +_GroupedListViewImpl::SetItemEnabled(int groupIndex, int itemIndex, bool enable) +{ + return GetCore().SetItemEnabled(groupIndex, itemIndex, enable); +} + +bool +_GroupedListViewImpl::IsItemEnabled(int groupIndex, int itemIndex) const +{ + return GetCore().IsItemEnabled(groupIndex, itemIndex); +} + +int +_GroupedListViewImpl::GetGroupCount(void) const +{ + return GetCore().GetGroupCount(); +} + +int +_GroupedListViewImpl::GetItemCountAt(int groupIndex) const +{ + return GetCore().GetItemCountAt(groupIndex); +} + +result +_GroupedListViewImpl::ShowItemDescriptionText(int groupIndex, int itemIndex) +{ + return SetItemDescriptionTextShowState(groupIndex, itemIndex, true); +} + +result +_GroupedListViewImpl::HideItemDescriptionText(int groupIndex, int itemIndex) +{ + return SetItemDescriptionTextShowState(groupIndex, itemIndex, false); +} + +result +_GroupedListViewImpl::SetItemDescriptionTextShowState(int groupIndex, int itemIndex, bool show) +{ + result r = E_SUCCESS; + + SysTryReturn(NID_UI_CTRL, (groupIndex >= 0) && (groupIndex < GetGroupCount()), E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] The specified groupIndex is out of range."); + + SysTryReturn(NID_UI_CTRL, (itemIndex >= 0) && (itemIndex < GetItemCountAt(groupIndex)), E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] The specified itemIndex is out of range."); + + _GroupedListViewItemProviderAdaptor* pProviderAdaptor = + static_cast <_GroupedListViewItemProviderAdaptor*>(GetCore().GetItemProviderAdaptor()); + SysTryReturn(NID_UI_CTRL, (pProviderAdaptor != null), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] _GroupedListItemProviderAdaptor is not set."); + + // Save description text show state to provider adaptor + pProviderAdaptor->SetDescriptionTextShowState(groupIndex, itemIndex, show); + + if (GetCore().FindItem(groupIndex, itemIndex) != null) + { + r = GetCore().RefreshTableView(groupIndex, itemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY); + } + + SetLastResultReturn(r); +} + +result +_GroupedListViewImpl::RefreshList(int groupIndex, int itemIndex, ListRefreshType type) +{ + result r = E_SUCCESS; + + if (__needReloadItems) + { + return r; + } + + int groupCount = GetCore().GetGroupCount(); + int itemCount = GetCore().GetItemCountAt(groupIndex); + + if ((groupIndex < 0) || (groupIndex > groupCount) || (itemIndex < -1) || (itemIndex > itemCount) || + ((type != LIST_REFRESH_TYPE_ITEM_ADD) && (itemIndex == itemCount))) + { + SysLogException(NID_UI_CTRL, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The index is out of range."); + return E_OUT_OF_RANGE; + } + + if (type == LIST_REFRESH_TYPE_ITEM_MODIFY) + { + if (IsContextItemOpened(groupIndex, itemIndex)) + { + CloseContextItem(groupIndex, itemIndex); + } + + int topGroupIndex = -1; + int topItemIndex = -1; + int bottomGroupIndex = -1; + int bottomItemIndex = -1; + + GetCore().GetFirstLoadedItemIndex(topGroupIndex, topItemIndex); + GetCore().GetLastLoadedItemIndex(bottomGroupIndex, bottomItemIndex); + + if ((topGroupIndex > groupIndex) || (bottomGroupIndex < groupIndex) || + ((topGroupIndex == groupIndex) && (topItemIndex > itemIndex)) || + ((bottomGroupIndex == groupIndex) && (bottomItemIndex < itemIndex))) + { + // not yet loaded item + SetLastResultReturn(r); + } + else + { + _ListViewItem* pListViewItem = static_cast<_ListViewItem*>(GetCore().FindItem(groupIndex, itemIndex)); + _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); + pListViewItem = null; + } + + // item unload + GetCore().UnloadItem(groupIndex, itemIndex); + // item load + pListViewItem = static_cast<_ListViewItem*>(GetCore().LoadItem(groupIndex, itemIndex)); + + if (needChangeEventTarget && (pListViewItem != null)) + { + pListViewItem->SetCurrentStatus(itemStatus); + + _Control* pTarget = static_cast<_Control*>(pListViewItem); + + for (int i = 0; i < pListViewItem->GetChildCount(); i++) + { + if (pListViewItem->GetChild(i)->GetBoundsF().Contains(itemStatus.currentTouchPosition)) + { + pTarget = pListViewItem->GetChild(i); + } + } + + // change touch event target + 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 + { + r = GetCore().RefreshTableView(groupIndex, itemIndex, static_cast(type)); + } + + CheckEmptyListShowState(); + + Draw(); + Show(); + + SetLastResultReturn(r); +} + +result +_GroupedListViewImpl::RefreshList(int groupIndex, int itemIndex, int elementId) +{ + if ((groupIndex < 0) || (groupIndex >= GetCore().GetGroupCount()) || (itemIndex < 0) || (itemIndex >= GetCore().GetItemCountAt(groupIndex))) + { + return E_OUT_OF_RANGE; + } + + result r = E_SUCCESS; + _ListViewItem* pListViewItem = static_cast<_ListViewItem*>(GetCore().FindItem(groupIndex, itemIndex)); + + if (pListViewItem != null) + { + r = (pListViewItem->RefreshElement(elementId)) ? E_SUCCESS : E_OUT_OF_RANGE; + } + + SetLastResultReturn(r); +} + +result +_GroupedListViewImpl::UpdateList(bool isRestoreAnnexFocusValue) +{ + __needReloadItems = true; + + result r = GetCore().UpdateTableView(isRestoreAnnexFocusValue); + + CheckEmptyListShowState(); + + Invalidate(true); + + // API versioning for initial Show() operation + if (Tizen::App::_AppInfo::GetApiVersion() == _API_VERSION_2_0 && Tizen::App::_AppInfo::IsOspCompat()) + { + Show(); + } + + __needReloadItems = false; + + SetLastResultReturn(r); +} + +void +_GroupedListViewImpl::SetItemNeedsLazyDeletion(_ListViewItem* pItem) +{ + _GroupedListViewItemProviderAdaptor* pProviderAdaptor = + static_cast <_GroupedListViewItemProviderAdaptor*>(GetCore().GetItemProviderAdaptor()); + + if (pProviderAdaptor != null) + { + pProviderAdaptor->SetItemNeedsLazyDeletion(pItem); + } +} + +result +_GroupedListViewImpl::GetItemIndexFromPosition(const FloatPoint& position, int& groupIndex, int& itemIndex) const +{ + result r = GetCore().GetItemIndexFromPosition(position, groupIndex, itemIndex); + + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] There is no item at the specified position."); + + SetLastResultReturn(r); +} + +result +_GroupedListViewImpl::GetItemIndexFromPosition(const FloatPoint& position, int& groupIndex, int& itemIndex, int& elementId) const +{ + elementId = -1; + + result r = GetCore().GetItemIndexFromPosition(position, groupIndex, itemIndex); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] There is no item at the specified position."); + + _ListViewItem* pListViewItem = static_cast<_ListViewItem*>(GetCore().FindItem(groupIndex, itemIndex)); + + if (pListViewItem != null) + { + FloatPoint originPosition = pListViewItem->GetPositionF(); + originPosition.y -= GetCore().GetScrollPosition(); + + elementId = pListViewItem->GetElementIdFromPosition(FloatPoint(position.x - originPosition.x, position.y - originPosition.y)); + } + + SetLastResultReturn(r); +} + +result +_GroupedListViewImpl::SetSectionColor(const Color& color) +{ + return GetCore().SetSectionColor(color); +} + +Color +_GroupedListViewImpl::GetSectionColor(void) const +{ + return GetCore().GetSectionColor(); +} + +result +_GroupedListViewImpl::SetItemDividerColor(const Color& color) +{ + return GetCore().SetItemDividerColor(color); +} + +Color +_GroupedListViewImpl::GetItemDividerColor(void) const +{ + return GetCore().GetItemDividerColor(); +} + +void +_GroupedListViewImpl::SetListBackgroundColor(const Color& color) +{ + SetBackgroundColor(color); +} + +result +_GroupedListViewImpl::SetBackgroundBitmap(const Bitmap* pBitmap) +{ + GetCore().SetBackgroundBitmap(const_cast(pBitmap)); + GetCore().SetBackgroundBitmapStretch(true); + + SetLastResultReturn(E_SUCCESS); +} + +result +_GroupedListViewImpl::SetBitmapOfEmptyList(const Bitmap* pBitmap) +{ + if (pBitmap == null) + { + if (__pEmptyBitmap != null) + { + GetCore().DetachChild(*__pEmptyBitmap); + + delete __pEmptyBitmap; + __pEmptyBitmap = null; + } + } + else + { + if (__pEmptyBitmap == null) + { + __pEmptyBitmap = _Label::CreateLabelN(); + SysTryReturn(NID_UI_CTRL, (__pEmptyBitmap != null), E_SYSTEM, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + __pEmptyBitmap->SetVisibleState(false); + __pEmptyBitmap->SetMargin(0.0f, 0.0f); + + GetCore().AttachChild(*__pEmptyBitmap); + } + + __pEmptyBitmap->SetSize(FloatDimension(pBitmap->GetWidthF(), pBitmap->GetHeightF())); + __pEmptyBitmap->SetBackgroundColor(Color(0, 0, 0, 0)); + __pEmptyBitmap->SetBackgroundBitmap(*pBitmap); + } + + AdjustLayoutOfEmptyList(); + + SetLastResultReturn(E_SUCCESS); +} + +result +_GroupedListViewImpl::SetTextOfEmptyList(const String& text) +{ + if (text.IsEmpty()) + { + if (__pEmptyText != null) + { + GetCore().DetachChild(*__pEmptyText); + + delete __pEmptyText; + __pEmptyText = null; + } + } + else + { + if (__pEmptyText == null) + { + __pEmptyText = _Label::CreateLabelN(); + SysTryReturn(NID_UI_CTRL, (__pEmptyText != null), E_SYSTEM, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + __pEmptyText->SetVisibleState(false); + __pEmptyText->SetMargin(0.0f, 0.0f); + + GetCore().AttachChild(*__pEmptyText); + } + + 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(); + + TextSimple* pSimpleText = new (std::nothrow) TextSimple(const_cast (text.GetPointer()), text.GetLength()); + SysTryReturn(NID_UI_CTRL, (pSimpleText != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + pText->AppendElement(*pSimpleText); + + float fontSize = 0.0f; + GET_SHAPE_CONFIG(LISTVIEW::EMPTY_LIST_TEXT_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, fontSize); + + Font font; + font.Construct(GetFont(), FONT_STYLE_PLAIN, fontSize); + pText->SetFont(&font, 0, pText->GetTextLength()); + + FloatDimension listDimension = GetCore().GetSizeF(); + + pText->SetBounds(FloatRectangle(0.0f, 0.0f, listDimension.width, 1.0f)); + pText->Compose(); + + FloatDimension labelDimension = pText->GetTextExtentF(0, pText->GetTextLength()); + labelDimension.height = pText->GetTotalHeightF(); + + if (labelDimension.width > listDimension.width) + { + pText->SetBounds(FloatRectangle(0.0f, 0.0f, listDimension.width, 1.0f)); + pText->Compose(); + + float labelHeight = pText->GetTotalHeightF(); + + labelDimension.width = listDimension.width; + labelDimension.height = ((listDimension.height < labelHeight) ? listDimension.height : labelHeight); + } + + delete pText; + + __pEmptyText->SetSize(labelDimension); + __pEmptyText->SetBackgroundColor(Color(0, 0, 0, 0)); + __pEmptyText->SetMargin(0.0f, 0.0f, 0.0f, 0.0f); + __pEmptyText->SetTextColor(__emptyTextColor); + __pEmptyText->SetTextConfig(fontSize, LABEL_TEXT_STYLE_NORMAL); + __pEmptyText->SetText(text); + } + + AdjustLayoutOfEmptyList(); + + SetLastResultReturn(E_SUCCESS); +} + +String +_GroupedListViewImpl::GetTextOfEmptyList(void) const +{ + return ((__pEmptyText != null) ? __pEmptyText->GetText() : String()); +} + +result +_GroupedListViewImpl::SetTextColorOfEmptyList(const Color& color) +{ + __emptyTextColor = color; + + if (__pEmptyText != null) + { + __pEmptyText->SetTextColor(color); + } + + SetLastResultReturn(E_SUCCESS); +} + +Color +_GroupedListViewImpl::GetTextColorOfEmptyList(void) const +{ + return __emptyTextColor; +} + +result +_GroupedListViewImpl::ExpandGroup(int groupIndex) +{ + SysTryReturn(NID_UI_CTRL, (GetCore().GetTableViewStyle() == TABLE_VIEW_STYLE_GROUPED), E_INVALID_OPERATION, E_INVALID_OPERATION, + "[E_INVALID_OPERATION] The control should be indexed style."); + + return GetCore().ExpandGroup(groupIndex); +} + +result +_GroupedListViewImpl::CollapseGroup(int groupIndex) +{ + SysTryReturn(NID_UI_CTRL, (GetCore().GetTableViewStyle() == TABLE_VIEW_STYLE_GROUPED), E_INVALID_OPERATION, E_INVALID_OPERATION, + "[E_INVALID_OPERATION] The control should be indexed style."); + + return GetCore().CollapseGroup(groupIndex); +} + +bool +_GroupedListViewImpl::IsGroupExpanded(int groupIndex) const +{ + return GetCore().IsGroupExpanded(groupIndex); +} + +result +_GroupedListViewImpl::ExpandAllGroups(void) +{ + SysTryReturn(NID_UI_CTRL, (GetCore().GetTableViewStyle() == TABLE_VIEW_STYLE_GROUPED), E_INVALID_OPERATION, E_INVALID_OPERATION, + "[E_INVALID_OPERATION] The control should be indexed style."); + + return GetCore().ExpandAllGroup(true); +} + +result +_GroupedListViewImpl::CollapseAllGroups(void) +{ + SysTryReturn(NID_UI_CTRL, (GetCore().GetTableViewStyle() == TABLE_VIEW_STYLE_GROUPED), E_INVALID_OPERATION, E_INVALID_OPERATION, + "[E_INVALID_OPERATION] The control should be indexed style."); + + return GetCore().CollapseAllGroup(true); +} + +void +_GroupedListViewImpl::CheckEmptyListShowState(void) +{ + bool isEmpty = (GetGroupCount() == 0); + + if (__pEmptyBitmap != null) + { + __pEmptyBitmap->SetVisibleState(isEmpty); + } + if (__pEmptyText != null) + { + __pEmptyText->SetVisibleState(isEmpty); + } + + _AccessibilityContainer* pContainer = GetCore().GetAccessibilityContainer(); + + if (_AccessibilityManager::IsActivated() && (pContainer != null)) + { + if (isEmpty) + { + if (__pAccessibilityElement == null) + { + __pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true); + + SysTryReturnVoidResult(NID_UI_CTRL, (__pAccessibilityElement != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + __pAccessibilityElement->SetName(L"ListView"); + + pContainer->RemoveAllElement(); + pContainer->AddElement(*__pAccessibilityElement); + } + + Rectangle bounds = GetBounds(); + __pAccessibilityElement->SetBounds(Rectangle(0, 0, bounds.width, bounds.height)); + + String accessibilityLable; + + if (__pEmptyBitmap != null) + { + __pEmptyBitmap->GetAccessibilityContainer()->Activate(false); + + accessibilityLable += L"Image, "; + } + if (__pEmptyText != null) + { + __pEmptyText->GetAccessibilityContainer()->Activate(false); + + accessibilityLable += __pEmptyText->GetText(); + accessibilityLable += L", "; + } + + accessibilityLable += L"No items"; + + __pAccessibilityElement->SetLabel(accessibilityLable); + } + else + { + if (__pAccessibilityElement != null) + { + if (pContainer->RemoveElement(*__pAccessibilityElement) != E_SUCCESS) + { + delete __pAccessibilityElement; + } + __pAccessibilityElement = null; + } + } + } +} + +void +_GroupedListViewImpl::AdjustLayoutOfEmptyList(void) +{ + FloatDimension listDimension = GetCore().GetSizeF(); + FloatDimension emptyBitmap; + FloatDimension emptyText; + FloatPoint bitmapPos; + FloatPoint textPos; + float totalHeight = 0.0f; + float horizontalSpacing = 0.0f; + + if (__pEmptyBitmap != null) + { + emptyBitmap = __pEmptyBitmap->GetSizeF(); + } + if (__pEmptyText != null) + { + emptyText = __pEmptyText->GetSizeF(); + + if (__pEmptyBitmap != null) + { + GET_SHAPE_CONFIG(LISTVIEW::EMPTY_LIST_HORIZONTAL_SPACING, _CONTROL_ORIENTATION_PORTRAIT, horizontalSpacing); + } + } + + totalHeight = emptyBitmap.height + horizontalSpacing + emptyText.height; + + if ((__pEmptyBitmap != null) && (__pEmptyText != null) && (totalHeight < listDimension.height)) + { + bitmapPos.x = ((_FloatCompare(listDimension.width, emptyBitmap.width)) ? 0.0f : (listDimension.width - emptyBitmap.width) / 2.0f); + bitmapPos.y = (listDimension.height - totalHeight) / 2.0f; + + textPos.x = ((_FloatCompare(listDimension.width, emptyText.width)) ? 0.0f : (listDimension.width - emptyText.width) / 2.0f); + textPos.y = bitmapPos.y + emptyBitmap.height + horizontalSpacing; + } + else + { + if (__pEmptyBitmap != null) + { + bitmapPos.x = ((_FloatCompare(listDimension.width, emptyBitmap.width)) ? 0.0f : (listDimension.width - emptyBitmap.width) / 2.0f); + bitmapPos.y = ((listDimension.height <= totalHeight) ? 0.0f : (listDimension.height - totalHeight) / 2.0f); + } + + 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); + } + } + + if (__pEmptyBitmap != null) + { + __pEmptyBitmap->SetPosition(bitmapPos); + } + if (__pEmptyText != null) + { + __pEmptyText->SetPosition(textPos); + } + + CheckEmptyListShowState(); + Invalidate(true); +} + +result +_GroupedListViewImpl::BeginReorderingMode(void) +{ + SysTryReturn(NID_UI_CTRL, (GetCore().GetTableViewStyle() == TABLE_VIEW_STYLE_GROUPED), E_INVALID_OPERATION, E_INVALID_OPERATION, + "[E_INVALID_OPERATION] Reordering mode is supported only Indexed style."); + + result r = GetCore().SetReorderModeEnabled(true); + + SetLastResultReturn(r); +} + +result +_GroupedListViewImpl::EndReorderingMode(void) +{ + SysTryReturn(NID_UI_CTRL, (GetCore().GetTableViewStyle() == TABLE_VIEW_STYLE_GROUPED), E_INVALID_OPERATION, E_INVALID_OPERATION, + "[E_INVALID_OPERATION] Reordering mode is supported only Indexed style."); + + result r = GetCore().SetReorderModeEnabled(false); + + SetLastResultReturn(r); +} + +bool +_GroupedListViewImpl::IsInReorderingMode(void) const +{ + return GetCore().IsReorderModeEnabled(); +} + +void +_GroupedListViewImpl::SetScrollInputMode(ScrollInputMode mode) +{ + GetCore().SetScrollInputMode(mode); +} + +ScrollInputMode +_GroupedListViewImpl::GetScrollInputMode(void) const +{ + return GetCore().GetScrollInputMode(); +} + +result +_GroupedListViewImpl::OpenContextItem(int groupIndex, int itemIndex) +{ + return GetCore().OpenContextItem(groupIndex, itemIndex); +} + +result +_GroupedListViewImpl::CloseContextItem(int groupIndex, int itemIndex) +{ + return GetCore().CloseContextItem(groupIndex, itemIndex); +} + +bool +_GroupedListViewImpl::IsContextItemOpened(int groupIndex, int itemIndex) const +{ + return GetCore().IsContextItemOpened(groupIndex, itemIndex); +} + +void +_GroupedListViewImpl::OnListViewContextItemStateChanged(_Control& source, int groupIndex, int itemIndex, int elementId, + ListContextItemStatus status) +{ + if (__pListItemEvent != null) + { + CloseContextItem(groupIndex, itemIndex); + + _ListViewItem* pListViewItem = static_cast<_ListViewItem*>(GetCore().FindItem(groupIndex, itemIndex)); + + SetItemNeedsLazyDeletion(pListViewItem); + + _ListItemEventArg* pArg = new (std::nothrow) _ListItemEventArg(groupIndex, itemIndex, elementId, 0, NOTIFY_TYPE_SELCTED_CONTEXT_ITEM); + __pListItemEvent->Fire(*pArg); + + SetItemNeedsLazyDeletion(null); + } +} + +void +_GroupedListViewImpl::OnGroupedTableViewGroupItemStateChanged(_TableView& tableView, int groupIndex, _TableViewItem* pItem, + TableViewItemStatus status) +{ + FireListViewItemEvent(groupIndex, -1, pItem, status); +} + +void +_GroupedListViewImpl::OnGroupedTableViewItemStateChanged(_TableView& tableView, int groupIndex, int itemIndex, _TableViewItem* pItem, + TableViewItemStatus status) +{ + FireListViewItemEvent(groupIndex, itemIndex, pItem, status); +} + +void +_GroupedListViewImpl::OnGroupedTableViewContextItemActivationStateChanged(_TableView& tableView, int groupIndex, int itemIndex, + _TableViewItem* pContextItem, bool activated) +{ + _ListViewItem* pListViewItem = static_cast<_ListViewItem*>(GetCore().FindItem(groupIndex, itemIndex)); + + if (pListViewItem != null) + { + pListViewItem->SetContextItemActivationState(activated); + } +} + +void +_GroupedListViewImpl::OnGroupedTableViewItemReordered(_TableView& tableView, int groupIndexFrom, int itemIndexFrom, + int groupIndexTo, int itemIndexTo) +{ + if (__pListItemEvent != null) + { + _ListItemEventArg* pArg = new (std::nothrow) _ListItemEventArg(groupIndexFrom, itemIndexFrom, groupIndexTo, itemIndexTo, + NOTIFY_TYPE_REORDERED_ITEM); + __pListItemEvent->Fire(*pArg); + } +} + +void +_GroupedListViewImpl::OnSectionTableViewItemStateChanged(_TableView& tableView, int sectionIndex, int itemIndex, _TableViewItem* pItem, + TableViewItemStatus status) +{ + FireListViewItemEvent(sectionIndex, itemIndex, pItem, status); +} + +void +_GroupedListViewImpl::OnSectionTableViewContextItemActivationStateChanged(_TableView& tableView, int sectionIndex, int itemIndex, + _TableViewItem* pContextItem, bool activated) +{ + _ListViewItem* pListViewItem = static_cast<_ListViewItem*>(GetCore().FindItem(sectionIndex, itemIndex)); + + if (pListViewItem != null) + { + pListViewItem->SetContextItemActivationState(activated); + } +} + +void +_GroupedListViewImpl::OnTableViewItemSwept(_TableView& tableView, int groupIndex, int itemIndex, TableViewSweepDirection direction) +{ + if (__pListItemEvent != null) + { + _ListViewItem* pListViewItem = static_cast<_ListViewItem*>(GetCore().FindItem(groupIndex, itemIndex)); + + SetItemNeedsLazyDeletion(pListViewItem); + + _ListItemEventArg* pArg = new (std::nothrow) _ListItemEventArg(groupIndex, itemIndex, direction, 0, NOTIFY_TYPE_SWEPT_ITEM); + __pListItemEvent->Fire(*pArg); + + SetItemNeedsLazyDeletion(null); + } +} + +void +_GroupedListViewImpl::FireListViewItemEvent(int groupIndex, int itemIndex, _TableViewItem* pItem, TableViewItemStatus status) +{ + if (__pListItemEvent != null) + { + _ListViewItem* pListViewItem = static_cast<_ListViewItem*>(pItem); + + if (pListViewItem != null) + { + SetItemNeedsLazyDeletion(pListViewItem); + + _ListViewItemStateChangedInfo itemInfo; + pListViewItem->GetLastStateChangedInfo(itemInfo); + + if ((__pLinkEvent != null) && (itemInfo.pUiLinkInfo != null)) + { + IEventArg* pLinkEventArg = _PublicLinkEvent::CreateLinkEventArgN(itemInfo.pUiLinkInfo->textInfo, + itemInfo.pUiLinkInfo->linkType, itemInfo.pUiLinkInfo->linkInfo); + SysTryReturnVoidResult(NID_UI_CTRL, (pLinkEventArg != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _LinkEventArg."); + __pLinkEvent->Fire(*pLinkEventArg); + + } + else + { + _ListItemEventArg* pArg = new (std::nothrow) _ListItemEventArg(groupIndex, itemIndex, itemInfo.elementId, 0, + static_cast(status)); + __pListItemEvent->Fire(*pArg); + } + + pListViewItem->ClearLastStateChangedInfo(); + + SetItemNeedsLazyDeletion(null); + } + } +} + +void +_GroupedListViewImpl::FireListViewItemLongPressedEvent(void) +{ + if (__pListItemEvent != null) + { + int groupIndex = -1; + int itemIndex = -1; + int elementId = -1; + + if ((GetItemIndexFromPosition(GetCurrentTouchPosition(), groupIndex, itemIndex, elementId) == E_SUCCESS) && (itemIndex != -1)) + { + _ListViewItem* pListViewItem = static_cast<_ListViewItem*>(GetCore().FindItem(groupIndex, itemIndex)); + + if ((pListViewItem != null) && (!pListViewItem->IsContextItem())) + { + SetItemNeedsLazyDeletion(pListViewItem); + + _ListItemEventArg* pArg = new (std::nothrow) _ListItemEventArg(groupIndex, itemIndex, elementId, 0, NOTIFY_TYPE_LONG_PRESSED_ITEM); + __pListItemEvent->Fire(*pArg); + + SetItemNeedsLazyDeletion(null); + } + } + } +} + +void +_GroupedListViewImpl::OnScrollEndReached(_Control& source, ScrollEndEvent type) +{ + if (__pScrollEvent != null) + { + _ScrollEventArg* pEventArg = _ScrollEventArg::GetScrollEventArgN(GetPublic(), type); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + + __pScrollEvent->Fire(*pEventArg); + } +} + +void +_GroupedListViewImpl::OnScrollPositionChanged(_Control& source, float scrollPosition) +{ + if (__pScrollEvent != null) + { + _ScrollEventArg* pEventArg = _ScrollEventArg::GetScrollEventArgN(GetPublic(), scrollPosition); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, (pEventArg != null), r, "[%s] Propagating.", GetErrorMessage(r)); + + __pScrollEvent->Fire(*pEventArg); + } +} + +void +_GroupedListViewImpl::OnScrollStopped(_Control& source) +{ + if (__pScrollEvent != null) + { + _ScrollEventArg* pEventArg = _ScrollEventArg::GetScrollEventArgN(GetPublic()); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + + __pScrollEvent->Fire(*pEventArg); + } +} + +void +_GroupedListViewImpl::OnUiFastScrollIndexSelected(_Control& source, _FastScrollIndex& index) +{ + if (__pFastScrollEvent != null) + { + String* pIndexText = index.GetIndexText(); + if (pIndexText != null) + { + _FastScrollEventArg* pEventArg = new (std::nothrow) _FastScrollEventArg(GetPublic(), *pIndexText); + __pFastScrollEvent->Fire(*pEventArg); + } + } +} + +void +_GroupedListViewImpl::OnDraw(void) +{ + _ControlImpl::OnDraw(); + + if (__redrawListView) + { + CheckEmptyListShowState(); + __redrawListView = false; + } +} + +void +_GroupedListViewImpl::OnChangeLayout(_ControlOrientation orientation) +{ + if (__isUpdateListCalled) + { + __isUpdateListCalled = false; + } + else + { + __isOrientationChanged = true; + } + + if (GetCore().IsFocusModeStateEnabled() && GetCore().GetRootWindow() && GetCore().GetRootWindow()->IsActivated()) + { + GetCore().SetFocusDuringOrientationChange(); + } + + _ControlImpl::OnChangeLayout(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) + { + SetBitmapOfEmptyList(__pEmptyBitmap->GetBackgroundBitmap()); + } + if (__pEmptyText != null) + { + SetTextOfEmptyList(__pEmptyText->GetText()); + } + + if (__isOrientationChanged) + { + __isOrientationChanged = false; + + if (GetCore().IsTableViewFocused() && GetCore().IsFocusModeStateEnabled() + && GetCore().GetRootWindow() && GetCore().GetRootWindow()->IsActivated()) + { + UpdateList(true); + } + else + { + UpdateList(); + } + } +} + +void +_GroupedListViewImpl::OnFontChanged(Font* pFont) +{ + String fontName = GetFont(); + _GroupedListViewItemProviderAdaptor* pProviderAdaptor = + static_cast <_GroupedListViewItemProviderAdaptor*>(GetCore().GetItemProviderAdaptor()); + + if (__pEmptyText != null) + { + __pEmptyText->SetFont(fontName); + SetTextOfEmptyList(__pEmptyText->GetText()); + } + + if (pProviderAdaptor != null) + { + pProviderAdaptor->SetItemFont(fontName); + } + + int firstGroup = -1; + int firstItem = -1; + int lastGroup = -1; + int lastItem = -1; + int currentItem = -1; + int lastItemInGroup = -1; + + GetCore().GetFirstLoadedItemIndex(firstGroup, firstItem); + GetCore().GetLastLoadedItemIndex(lastGroup, lastItem); + + for (int i = firstGroup; i <= lastGroup; i++) + { + currentItem = ((i == firstGroup) ? firstItem : -1); + lastItemInGroup = ((i == lastGroup) ? lastItem : (GetCore().GetItemCountAt(i) - 1)); + + for (; currentItem <= lastItemInGroup; currentItem++) + { + _ListViewItem* pListViewItem = static_cast<_ListViewItem*>(GetCore().FindItem(i, currentItem)); + + if (pListViewItem != null) + { + pListViewItem->SetFont(fontName); + pListViewItem->SetItemChanged(true); + } + } + } +} + +void +_GroupedListViewImpl::OnFontInfoRequested(unsigned long& style, int& size) +{ + float textSize = 0.0f; + OnFontInfoRequested(style, textSize); + + size = _CoordinateSystemUtils::ConvertToInteger(textSize); +} + +void +_GroupedListViewImpl::OnFontInfoRequested(unsigned long& style, float& size) +{ + GET_SHAPE_CONFIG(LISTVIEW::EMPTY_LIST_TEXT_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, size); + style = FONT_STYLE_PLAIN; +} + +FloatPoint +_GroupedListViewImpl::GetCurrentTouchPosition(void) +{ + FloatPoint currentTouchPos = _TouchManager::GetInstance()->GetScreenPoint(0); + FloatRectangle bounds = GetCore().GetAbsoluteBoundsF(true); + + currentTouchPos.x -= bounds.x; + currentTouchPos.y -= bounds.y; + + return currentTouchPos; +} + +result +_GroupedListViewImpl::OnTouchEventListenerAdded(void) +{ + return E_SUCCESS; +} + +result +_GroupedListViewImpl::OnTouchEventListenerRemoved(void) +{ + return E_SUCCESS; +} + +class _GroupedListViewMaker + : public _UiBuilderControlMaker +{ +public: + _GroupedListViewMaker(_UiBuilder* uibuilder) + : _UiBuilderControlMaker(uibuilder){}; + + virtual ~_GroupedListViewMaker(){}; + + static _UiBuilderControlMaker* + GetInstance(_UiBuilder* uibuilder) + { + _GroupedListViewMaker* pGroupedListViewMaker = new (std::nothrow) _GroupedListViewMaker(uibuilder); + return pGroupedListViewMaker; + }; +protected: + virtual Tizen::Ui::Control* + Make(_UiBuilderControl* pControl) + { + result r = E_SYSTEM; + _UiBuilderControlLayout* pControlProperty = null; + GroupedListView* pGroupedListView = null; + FloatRectangle rect; + + ListScrollStyle scrollStyle = SCROLL_STYLE_FADE_OUT; + GroupedListViewStyle style = GROUPED_LIST_VIEW_STYLE_INDEXED; + ScrollInputMode scrollInputMode = SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION; + + String elementString; + bool itemDividerState = true; + int opacity = 100; + bool sweepEnabledState = false; + Color color; + + GetProperty(pControl, &pControlProperty); + if (pControlProperty == null) + { + return null; + } + + pGroupedListView = new (std::nothrow) GroupedListView(); + if (pGroupedListView == null) + { + return null; + } + + rect = pControlProperty->GetRectF(); + + String styleString; + styleString = pControlProperty->GetStyle(); + + if (styleString.Equals(L"GROUPED_LIST_VIEW_STYLE_SECTION", false)) + { + style = GROUPED_LIST_VIEW_STYLE_SECTION; + } + else + { + style = GROUPED_LIST_VIEW_STYLE_INDEXED; + } + + //Construct + if (pControl->GetElement(L"itemDivider", elementString)) + { + if (elementString.Equals(L"true", false)) + { + itemDividerState = true; + } + else + { + itemDividerState = false; + } + } + + if (pControl->GetElement(L"listScrollStyle", elementString)) + { + if (elementString.Equals(L"SCROLL_STYLE_FIXED", false)) + { + scrollStyle = SCROLL_STYLE_FIXED; + } + else if (elementString.Equals(L"SCROLL_STYLE_FAST_SCROLL", false)) + { + scrollStyle = SCROLL_STYLE_FAST_SCROLL; + } + else if (elementString.Equals(L"SCROLL_STYLE_JUMP_TO_TOP", false)) + { + scrollStyle = SCROLL_STYLE_JUMP_TO_TOP; + } + else if (elementString.Equals(L"SCROLL_STYLE_THUMB", false)) + { + scrollStyle = SCROLL_STYLE_THUMB; + } + } + else if (pControl->GetElement(L"fastScroll", elementString)) + { + if (elementString.Equals(L"true", false)) + { + scrollStyle = SCROLL_STYLE_FAST_SCROLL; + } + } + + r = pGroupedListView->Construct(rect, style, itemDividerState, scrollStyle); + SysTryCatch(NID_UI, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + // Set BackgroundsBitmap + if (pControl->GetElement("backgroundBitmapPath", elementString)) + { + Bitmap* pBackgroundBitmap = null; + pBackgroundBitmap = LoadBitmapN(elementString); + if (pBackgroundBitmap != null) + { + r = pGroupedListView->SetBackgroundBitmap(pBackgroundBitmap); + delete pBackgroundBitmap; + pBackgroundBitmap = null; + + SysTryCatch(NID_UI, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + + // Set Empty List + if (pControl->GetElement(L"textOfEmptyList", elementString)) + { + r = pGroupedListView->SetTextOfEmptyList(elementString); + SysTryCatch(NID_UI, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + if (pControl->GetElement(L"colorOfEmptyListText", elementString)) + { + ConvertStringToColor(elementString, color); + r = pGroupedListView->SetTextColorOfEmptyList(color); + SysTryCatch(NID_UI, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + if (pControl->GetElement(L"bitmapPathOfEmptyList", elementString)) + { + Bitmap* pBackgroundBitmap = null; + pBackgroundBitmap = LoadBitmapN(elementString); //__image->DecodeN(path,BITMAP_PIXEL_FORMAT_RGB565); + if (pBackgroundBitmap != null) + { + r = pGroupedListView->SetBitmapOfEmptyList(pBackgroundBitmap); + delete pBackgroundBitmap; + pBackgroundBitmap = null; + + SysTryCatch(NID_UI, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + + if (pControl->GetElement(L"backgroundColorOpacity", elementString) || pControl->GetElement(L"BGColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + + if (pControl->GetElement(L"backgroundColor", elementString) || pControl->GetElement(L"BGColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + r = pGroupedListView->SetBackgroundColor(color); + SysTryCatch(NID_UI, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + if (pControl->GetElement(L"itemDividerColor", elementString)) + { + ConvertStringToColor(elementString, color); + r = pGroupedListView->SetItemDividerColor(color); + SysTryCatch(NID_UI, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + if (pControl->GetElement(L"sectionColor", elementString)) + { + ConvertStringToColor(elementString, color); + r = pGroupedListView->SetSectionColor(color); + SysTryCatch(NID_UI, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + if (pControl->GetElement(L"sweepEnabled", elementString)) + { + { + if (elementString.Equals(L"true", false)) + { + sweepEnabledState = true; + } + else + { + sweepEnabledState = false; + } + } + r = pGroupedListView->SetSweepEnabled(sweepEnabledState); + SysTryCatch(NID_UI, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + // scroll Input Mode + if (pControl->GetElement(L"scrollInputMode", elementString)) + { + if (elementString.Equals(L"SCROLL_INPUT_MODE_RESTRICT_TO_INITIAL_DIRECTION", false)) + { + scrollInputMode = SCROLL_INPUT_MODE_RESTRICT_TO_INITIAL_DIRECTION; + } + + pGroupedListView->SetScrollInputMode(scrollInputMode); + } + + return pGroupedListView; + + CATCH: + delete pGroupedListView; + return null; + } + +private: +}; // _GroupedListViewMaker + +_GroupedListViewRegister::_GroupedListViewRegister() +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->RegisterControl(L"GroupedListView", _GroupedListViewMaker::GetInstance); +} + +_GroupedListViewRegister::~_GroupedListViewRegister() +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->UnregisterControl(L"GroupedListView"); +} +static _GroupedListViewRegister GroupedListViewRegisterToUIbuilder; +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_GroupedListViewItemProviderAdaptor.cpp b/src/ui/controls/FUiCtrl_GroupedListViewItemProviderAdaptor.cpp new file mode 100644 index 0000000..238eaa8 --- /dev/null +++ b/src/ui/controls/FUiCtrl_GroupedListViewItemProviderAdaptor.cpp @@ -0,0 +1,562 @@ +// +// 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_GroupedListViewItemProviderAdaptor.cpp + * @brief This is the implementation file for _GroupedListViewItemProviderAdaptor class. + * + * This file contains the implementation of _GroupedListViewItemProviderAdaptor class. + */ + +#include +#include +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_ResourceManager.h" +#include "FUiCtrl_GroupedListViewItemProviderAdaptor.h" +#include "FUiCtrl_GroupItemImpl.h" +#include "FUiCtrl_IListItemCommon.h" +#include "FUiCtrl_ListItemBaseImpl.h" +#include "FUiCtrl_ListViewItem.h" + +#ifdef MEMORY_LEAK_CHECK +#include "mem_leak_check.h" +#endif + +using namespace Tizen::Base; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_GroupedListViewItemProviderAdaptor::_GroupedListViewItemProviderAdaptor(const IGroupedListViewItemProvider& provider) + : __pGroupedListViewProvider(const_cast(&provider)) + , __pGroupedListViewProviderF(null) + , __pEventListener(null) + , __fontName(L"") + , __groupItemAverageHeight(0.0f) + , __itemAverageHeight(0.0f) + , __groupItemLoadedCount(0) + , __itemLoadedCount(0) + , __countOfAllGroups(0) + , __countOfAllItems(0) + , __pItemNeedsLazyDeletion(null) + , __pLazyDeletionItem(null) + , __usingFloatingPoint(false) + , __pDefaultItem(null) +{ +} + +_GroupedListViewItemProviderAdaptor::_GroupedListViewItemProviderAdaptor(const IGroupedListViewItemProviderF& provider) + : __pGroupedListViewProvider(null) + , __pGroupedListViewProviderF(const_cast(&provider)) + , __pEventListener(null) + , __fontName(L"") + , __groupItemAverageHeight(0.0f) + , __itemAverageHeight(0.0f) + , __groupItemLoadedCount(0) + , __itemLoadedCount(0) + , __countOfAllGroups(0) + , __countOfAllItems(0) + , __pItemNeedsLazyDeletion(null) + , __pLazyDeletionItem(null) + , __usingFloatingPoint(true) + , __pDefaultItem(null) +{ +} + +_GroupedListViewItemProviderAdaptor::~_GroupedListViewItemProviderAdaptor() +{ + delete __pDefaultItem; + __pDefaultItem = null; + + __descriptionTextShowItem.clear(); + + SetItemLazyDeletion(null); +} + +void +_GroupedListViewItemProviderAdaptor::SetItemProvider(const IGroupedListViewItemProvider& provider) +{ + __pGroupedListViewProvider = const_cast(&provider); + __pGroupedListViewProviderF = null; + + __usingFloatingPoint = false; +} + +void +_GroupedListViewItemProviderAdaptor::SetItemProvider(const IGroupedListViewItemProviderF& provider) +{ + __pGroupedListViewProvider = null; + __pGroupedListViewProviderF = const_cast(&provider); + + __usingFloatingPoint = true; +} + +IGroupedListViewItemProvider* +_GroupedListViewItemProviderAdaptor::GetItemProvider(void) const +{ + return __pGroupedListViewProvider; +} + +IGroupedListViewItemProviderF* +_GroupedListViewItemProviderAdaptor::GetItemProviderF(void) const +{ + return __pGroupedListViewProviderF; +} + +_IListItemCommon* +_GroupedListViewItemProviderAdaptor::LoadItem(int groupIndex, int itemIndex) +{ + ListItemBase* pItemBase = null; + GroupItem* pGroupItem = null; + _IListItemCommon* pDefaultItem = null; + + if (itemIndex == -1) + { + if (__usingFloatingPoint) + { + pGroupItem = __pGroupedListViewProviderF->CreateGroupItem(groupIndex, GetListWidth()); + } + else + { + pGroupItem = __pGroupedListViewProvider->CreateGroupItem(groupIndex, _CoordinateSystemUtils::ConvertToInteger(GetListWidth())); + } + + if (pGroupItem == null) + { + pDefaultItem = GetDefaultItem(); + pDefaultItem->SetAppInfo(null); + + return pDefaultItem; + } + } + else + { + if (__usingFloatingPoint) + { + pItemBase = __pGroupedListViewProviderF->CreateItem(groupIndex, itemIndex, GetListWidth()); + } + else + { + pItemBase = __pGroupedListViewProvider->CreateItem(groupIndex, itemIndex, _CoordinateSystemUtils::ConvertToInteger(GetListWidth())); + } + + if (pItemBase == null) + { + pDefaultItem = GetDefaultItem(); + pDefaultItem->SetAppInfo(null); + + return pDefaultItem; + } + } + + _ListItemBaseImpl* pItemBaseImpl = null; + if (itemIndex == -1) + { + pItemBaseImpl = static_cast<_ListItemBaseImpl*>(_GroupItemImpl::GetInstance(*pGroupItem)); + } + else + { + pItemBaseImpl = _ListItemBaseImpl::GetInstance(*pItemBase); + } + SysAssert(pItemBaseImpl != null); + + // add ListViewItem event listener + pItemBaseImpl->AddListViewItemEventListener(*__pEventListener); + + _ListViewItem* pListViewItem = pItemBaseImpl->GetListViewItem(); + SysAssert(pListViewItem != null); + + pListViewItem->AddRef(); + pListViewItem->SetItemStyle(static_cast(pItemBaseImpl->GetListItemAnnexStyle())); + pListViewItem->SetItemWidth(GetListWidth()); + pListViewItem->SetFont(__fontName); + + if (itemIndex == -1) + { + pListViewItem->SetAppInfo(pGroupItem); + + if (__groupItemLoadedCount < __countOfAllGroups) + { + __groupItemAverageHeight = (__groupItemAverageHeight * __groupItemLoadedCount + pListViewItem->GetItemHeight()) / (__groupItemLoadedCount + 1); + __groupItemLoadedCount++; + } + } + else + { + pListViewItem->SetAppInfo(pItemBase); + + if (__itemLoadedCount < __countOfAllItems) + { + __itemAverageHeight = (__itemAverageHeight * __itemLoadedCount + pListViewItem->GetItemHeight()) / (__itemLoadedCount + 1); + __itemLoadedCount++; + } + } + + if (IsDescriptionTextShown(groupIndex, itemIndex)) + { + pListViewItem->SetDescriptionTextShowState(true); + } + + return pListViewItem; +} + +result +_GroupedListViewItemProviderAdaptor::UnloadItem(_IListItemCommon* pListItem, int groupIndex, int itemIndex) +{ + SysTryReturn(NID_UI_CTRL, pListItem != null, E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] pListItem is invalid argument."); + + _ListViewItem* pListViewItem = static_cast<_ListViewItem*>(pListItem); + if (pListViewItem->GetParent() != null) + { + pListViewItem->GetParent()->DetachChild(*pListViewItem); + } + + // default item case + if (pListViewItem == GetDefaultItem()) + { + return E_SUCCESS; + } + + if (pListViewItem == __pItemNeedsLazyDeletion) + { + SetItemLazyDeletion(pListViewItem); + } + + if (pListViewItem->Release() != 0) + { + if (itemIndex == -1) + { + GroupItem* pGroupItem = static_cast(pListViewItem->GetAppInfo()); + + _GroupItemImpl* pItemBaseImpl = _GroupItemImpl::GetInstance(*pGroupItem); + SysAssert(pItemBaseImpl != null); + + // remove ListViewItem event listener + pItemBaseImpl->RemoveListViewItemEventListener(*__pEventListener); + + if (__usingFloatingPoint) + { + if (!__pGroupedListViewProviderF->DeleteGroupItem(groupIndex, pGroupItem, GetListWidth())) + { + delete pGroupItem; + } + } + else + { + if (!__pGroupedListViewProvider->DeleteGroupItem(groupIndex, pGroupItem, _CoordinateSystemUtils::ConvertToInteger(GetListWidth()))) + { + delete pGroupItem; + } + } + } + else + { + ListItemBase* pItemBase = static_cast(pListViewItem->GetAppInfo()); + + _ListItemBaseImpl* pItemBaseImpl = _ListItemBaseImpl::GetInstance(*pItemBase); + SysAssert(pItemBaseImpl != null); + + // remove ListViewItem event listener + pItemBaseImpl->RemoveListViewItemEventListener(*__pEventListener); + + if (__usingFloatingPoint) + { + if (!__pGroupedListViewProviderF->DeleteItem(groupIndex, itemIndex, pItemBase, GetListWidth())) + { + delete pItemBase; + } + } + else + { + if (!__pGroupedListViewProvider->DeleteItem(groupIndex, itemIndex, pItemBase, _CoordinateSystemUtils::ConvertToInteger(GetListWidth()))) + { + delete pItemBase; + } + } + } + } + + return E_SUCCESS; +} + +result +_GroupedListViewItemProviderAdaptor::DeleteItem(_IListItemCommon* pListItem, int groupIndex, int itemIndex) +{ + SysTryReturn(NID_UI_CTRL, pListItem != null, E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] pListItem is invalid argument."); + + _ListViewItem* pListViewItem = static_cast<_ListViewItem*>(pListItem); + if (pListViewItem->GetParent() != null) + { + pListViewItem->GetParent()->DetachChild(*pListViewItem); + } + + // default item case + if (pListViewItem == GetDefaultItem()) + { + return E_SUCCESS; + } + + if (pListViewItem == __pItemNeedsLazyDeletion) + { + SetItemLazyDeletion(pListViewItem); + } + + if (pListViewItem->Release() != 0) + { + if (itemIndex == -1) + { + GroupItem* pGroupItem = static_cast(pListViewItem->GetAppInfo()); + delete pGroupItem; + } + else + { + ListItemBase* pItemBase = static_cast(pListViewItem->GetAppInfo()); + delete pItemBase; + } + } + + return E_SUCCESS; +} + +bool +_GroupedListViewItemProviderAdaptor::UpdateItem(_IListItemCommon* pItem, int groupIndex, int itemIndex) +{ + _ListViewItem* pListViewItem = static_cast<_ListViewItem*>(pItem); + + if (pListViewItem != null) + { + pListViewItem->SetDescriptionTextShowState(IsDescriptionTextShown(groupIndex, itemIndex)); + } + + return true; +} + +int +_GroupedListViewItemProviderAdaptor::GetItemCount(int groupIndex) const +{ + _GroupedListViewItemProviderAdaptor* pItemProviderAdaptor = const_cast<_GroupedListViewItemProviderAdaptor*>(this); + + int itemCount = 0; + if (__usingFloatingPoint) + { + itemCount = __pGroupedListViewProviderF->GetItemCount(groupIndex); + } + else + { + itemCount = __pGroupedListViewProvider->GetItemCount(groupIndex); + } + + if (__groupItemLoadedCount <= groupIndex) + { + pItemProviderAdaptor->__countOfAllItems += itemCount; + } + + return itemCount; +} + +int +_GroupedListViewItemProviderAdaptor::GetGroupCount(void) const +{ + _GroupedListViewItemProviderAdaptor* pItemProviderAdaptor = const_cast<_GroupedListViewItemProviderAdaptor*>(this); + + if (__usingFloatingPoint) + { + pItemProviderAdaptor->__countOfAllGroups = __pGroupedListViewProviderF->GetGroupCount(); + } + else + { + pItemProviderAdaptor->__countOfAllGroups = __pGroupedListViewProvider->GetGroupCount(); + } + + return __countOfAllGroups; +} + +float +_GroupedListViewItemProviderAdaptor::GetDefaultItemHeight(void) +{ + return __itemAverageHeight; +} + +float +_GroupedListViewItemProviderAdaptor::GetDefaultGroupItemHeight(void) +{ + return __groupItemAverageHeight; +} + +bool +_GroupedListViewItemProviderAdaptor::IsReorderable(int groupIndexFrom, int groupIndexTo) +{ + if (__usingFloatingPoint) + { + return __pGroupedListViewProviderF->IsReorderable(groupIndexFrom, groupIndexTo); + } + + return __pGroupedListViewProvider->IsReorderable(groupIndexFrom, groupIndexTo); +} + +bool +_GroupedListViewItemProviderAdaptor::HasSectionHeader(int groupIndex) const +{ + return true; +} + +bool +_GroupedListViewItemProviderAdaptor::HasSectionFooter(int groupIndex) const +{ + return false; +} + +bool +_GroupedListViewItemProviderAdaptor::SetDescriptionTextShowState(int groupIndex, int itemIndex, bool show) +{ + _ListItemPos descriptionTextPos = {groupIndex, itemIndex}; + int idxDescriptionTextGroup = -1; + int idxDescriptionTextItem = -1; + + _LinkedList <_ListItemPos>::_Iterator theIter = __descriptionTextShowItem.begin(); + while (theIter != __descriptionTextShowItem.end()) + { + idxDescriptionTextGroup = theIter->groupIndex; + idxDescriptionTextItem = theIter->itemIndex; + + if (idxDescriptionTextGroup == groupIndex) + { + if (idxDescriptionTextItem == itemIndex) + { + if (show == false) + { + __descriptionTextShowItem.erase(theIter); + } + return true; + } + else if (idxDescriptionTextItem > itemIndex) + { + if (show == true) + { + __descriptionTextShowItem.insert(theIter, descriptionTextPos); + } + return true; + } + } + + if (idxDescriptionTextGroup > groupIndex) + { + if (show == true) + { + __descriptionTextShowItem.insert(theIter, descriptionTextPos); + } + return true; + } + + theIter++; + } + + if (show == true) + { + __descriptionTextShowItem.push_back(descriptionTextPos); + } + + return true; +} + +bool +_GroupedListViewItemProviderAdaptor::IsDescriptionTextShown(int groupIndex, int itemIndex) const +{ + int idxDescriptionTextGroup = -1; + int idxDescriptionTextItem = -1; + + _LinkedList <_ListItemPos>::_Iterator theIter = __descriptionTextShowItem.begin(); + while (theIter != __descriptionTextShowItem.end()) + { + idxDescriptionTextGroup = theIter->groupIndex; + idxDescriptionTextItem = theIter->itemIndex; + + if (idxDescriptionTextGroup == groupIndex) + { + if (idxDescriptionTextItem == itemIndex) + { + return true; + } + else if (idxDescriptionTextItem > itemIndex) + { + return false; + } + } + else if (idxDescriptionTextGroup > groupIndex) + { + return false; + } + + theIter++; + } + + return false; +} + +void +_GroupedListViewItemProviderAdaptor::SetListViewItemEventListener(_IUiListViewItemEventListener& listener) +{ + __pEventListener = &listener; +} + +void +_GroupedListViewItemProviderAdaptor::SetItemFont(const String& fontName) +{ + __fontName = fontName; +} + +void +_GroupedListViewItemProviderAdaptor::SetItemNeedsLazyDeletion(_ListViewItem* pItem) +{ + __pItemNeedsLazyDeletion = pItem; +} + +void +_GroupedListViewItemProviderAdaptor::SetItemLazyDeletion(_ListViewItem* pItem) +{ + if (__pLazyDeletionItem != pItem) + { + if (__pLazyDeletionItem != null) + { + __pLazyDeletionItem->Release(); + } + if (pItem != null) + { + pItem->AddRef(); + } + + __pLazyDeletionItem = 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 new file mode 100644 index 0000000..9150549 --- /dev/null +++ b/src/ui/controls/FUiCtrl_HeaderImpl.cpp @@ -0,0 +1,2263 @@ +// +// 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_HeaderImpl.cpp + * @brief This is the implementation file for the _HeaderImpl class. + */ + +#include +#include +#include +#include +#include "FUi_AccessibilityContainer.h" +#include "FUi_AccessibilityElement.h" +#include "FUi_Control.h" +#include "FUi_EcoreEvasMgr.h" +#include "FUi_EcoreEvas.h" +#include "FUi_ResourceManager.h" +#include "FUi_UiBuilder.h" +#include "FUiCtrl_ButtonItemImpl.h" +#include "FUiCtrl_HeaderImpl.h" +#include "FUiCtrl_HeaderItemImpl.h" +#include "FUiCtrl_IActionEventListener.h" +#include "FUiCtrl_PanelImpl.h" +#include "FUiCtrl_PublicActionEvent.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_HeaderImpl* +_HeaderImpl::CreateHeaderImplN(Header* pControl) +{ + ClearLastResult(); + result r = E_SUCCESS; + + _Toolbar* pCore = null; + + pCore = _Toolbar::CreateToolbarN(true); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pCore, null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(r)); + + r = pCore->InitializeLongPressGesture(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pCore->InitializeFlickGesture(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + _HeaderImpl* pHeaderImpl = new (std::nothrow) _HeaderImpl(pControl, pCore); + + r = CheckConstruction(pCore, pHeaderImpl); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + return pHeaderImpl; +} + +_HeaderImpl::_HeaderImpl(Header* pPublic, _Toolbar* pCore) + : _ControlImpl(pPublic, pCore) + , __style(HEADER_STYLE_TITLE) + , __pPublicActionEvent(null) + //, __calledBySetItemSelected(false) +{ + result r = GetLastResult(); // Check if _ControlImpl succeeded. + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + pCore->SetStyle(TOOLBAR_TITLE); + + Color tempColor = Color(0); + + GET_COLOR_CONFIG(HEADER::BG_NORMAL, tempColor); + pCore->SetColor(tempColor); +} + +_HeaderImpl::~_HeaderImpl(void) +{ + if (__pPublicActionEvent) + { + delete __pPublicActionEvent; + __pPublicActionEvent = null; + } +} + +Header* +_HeaderImpl::GetHeader(void) const +{ + return &const_cast (GetPublic()); +} + +const char* +_HeaderImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Controls::Header"; +} + +const Header& +_HeaderImpl::GetPublic(void) const +{ + return static_cast(_ControlImpl::GetPublic()); +} + +Header& +_HeaderImpl::GetPublic(void) +{ + return static_cast(_ControlImpl::GetPublic()); +} + +const _Toolbar& +_HeaderImpl::GetCore(void) const +{ + return static_cast(_ControlImpl::GetCore()); +} + +_Toolbar& +_HeaderImpl::GetCore(void) +{ + return static_cast<_Toolbar&>(_ControlImpl::GetCore()); +} + +const _HeaderImpl* +_HeaderImpl::GetInstance(const Header& header) +{ + return static_cast (header._pControlImpl); +} + +_HeaderImpl* +_HeaderImpl::GetInstance(Header& header) +{ + return static_cast<_HeaderImpl*> (header._pControlImpl); +} + +result +_HeaderImpl::AddItem(const HeaderItem& item) +{ + result r = CheckItemValidate(item); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(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) + { + SysLogException(NID_UI_CTRL, E_MAX_EXCEEDED, "[E_MAX_EXCEEDED] Only 1 HeaderItem can be added to HEADER_STYLE_TITLE_BUTTON "); + return E_MAX_EXCEEDED; + } + + _Button* pButton = ConvertHeaderItem(item); + + if (__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) + { + pButton->SetButtonStyle(_BUTTON_STYLE_SEGMENT); + } + + return GetCore().AddItem(pButton); +} + +ButtonItemStatus +_HeaderImpl::GetButtonStatus(ButtonPosition position) const +{ + bool isButtonSet = IsButtonSet(position); + + SysTryReturn(NID_UI_CTRL, isButtonSet == true, BUTTON_ITEM_STATUS_NORMAL, E_INVALID_OPERATION, + "[E_INVALID_OPERATION] No button item is set at the specified position."); + + _ButtonStatus buttonStatus = _BUTTON_STATUS_NORMAL; + + if (position == BUTTON_POSITION_LEFT) + { + buttonStatus = GetCore().GetButtonStatus(LEFT_BUTTON); + } + else if (position == BUTTON_POSITION_RIGHT) + { + buttonStatus = GetCore().GetButtonStatus(RIGHT_BUTTON); + } + + return ConvertButtonItemStatus(buttonStatus); +} + +Color +_HeaderImpl::GetButtonColor(ButtonItemStatus status) const +{ + _ButtonStatus tempStatus = ConvertButtonStatus(status); + + return GetCore().GetButtonColor(tempStatus); +} + +Color +_HeaderImpl::GetButtonTextColor(ButtonItemStatus status) const +{ + _ButtonStatus tempStatus = ConvertButtonStatus(status); + + return GetCore().GetButtonTextColor(tempStatus); +} + +String +_HeaderImpl::GetDescriptionText(void) const +{ + return GetCore().GetDescriptionText(); +} + +Color +_HeaderImpl::GetDescriptionTextColor(void) const +{ + return GetCore().GetDescriptionTextColor(); +} + +Color +_HeaderImpl::GetItemColor(HeaderItemStatus status) const +{ + _ButtonStatus tempStatus = ConvertButtonStatus(status); + + return GetCore().GetItemColor(tempStatus); +} + +int +_HeaderImpl::GetItemCount(void) const +{ + return GetCore().GetItemCount(); +} + +result +_HeaderImpl::GetItemStatus(int itemIndex, HeaderItemStatus& status) const +{ + int count = GetItemCount(); + + SysTryReturnResult(NID_UI_CTRL, (itemIndex >= 0 && itemIndex <= count), E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] The itemIndex is out of range."); + + _Button* pButton = GetCore().GetItem(itemIndex); + + SysTryReturnResult(NID_UI_CTRL, pButton, E_SYSTEM, "[E_SYSTEM] Unable to get the item status."); + + status = ConvertHeaderItemStatus(pButton->GetButtonStatus()); + + return E_SUCCESS; +} + +Color +_HeaderImpl::GetItemTextColor(HeaderItemStatus status) const +{ + _ButtonStatus tempStatus = ConvertButtonStatus(status); + + return GetCore().GetItemTextColor(tempStatus); +} + +HeaderStyle +_HeaderImpl::GetStyle(void) const +{ + return __style; +} + +int +_HeaderImpl::GetSelectedItemIndex(void) const +{ + SysTryReturn(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), -1, + E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] Unable to get the selected item index because the current style does not support it.") + + return GetCore().GetSelectedItemIndex(); +} + +String +_HeaderImpl::GetTitleText(void) const +{ + return GetCore().GetTitleText(); +} + +Color +_HeaderImpl::GetTitleTextColor(void) const +{ + return GetCore().GetTitleTextColor(); +} + +Color +_HeaderImpl::GetColor(void) const +{ + return GetCore().GetColor(); +} + +result +_HeaderImpl::InsertItemAt(int itemIndex, const HeaderItem& item) +{ + result r = CheckItemValidate(item); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(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 + || __style == HEADER_STYLE_BUTTON), E_SYSTEM, + "[E_SYSTEM] Unable to add the item because the current style does not support it."); + + int count = GetItemCount(); + + SysTryReturnResult(NID_UI_CTRL, (itemIndex >= 0 && itemIndex <= count), E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] The itemIndex is out of range."); + + _Button* pButton = ConvertHeaderItem(item); + + if (__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) + { + pButton->SetButtonStyle(_BUTTON_STYLE_SEGMENT); + } + + return GetCore().InsertItemAt(itemIndex, pButton); +} + +bool +_HeaderImpl::IsButtonSet(ButtonPosition position) const +{ + if (position == BUTTON_POSITION_LEFT) + { + return GetCore().IsButtonSet(LEFT_BUTTON); + } + else if (position == BUTTON_POSITION_RIGHT) + { + return GetCore().IsButtonSet(RIGHT_BUTTON); + } + + return false; +} + +result +_HeaderImpl::PlayWaitingAnimation(HeaderAnimationPosition animationPos) +{ + if ((__style == HEADER_STYLE_SEGMENTED || __style == HEADER_STYLE_TITLE_BUTTON || __style == HEADER_STYLE_BUTTON + || __style == HEADER_STYLE_TAB || __style == HEADER_STYLE_TAB_LARGE) + && animationPos == HEADER_ANIMATION_POSITION_TITLE) + { + SysLogException(NID_UI_CTRL, E_INVALID_OPERATION, "[E_INVALID_OPERATION] Unable to pause the waiting animation because the current style does not support it."); + return E_INVALID_OPERATION; + } + + if ((IsButtonSet(BUTTON_POSITION_LEFT) == false && animationPos == HEADER_ANIMATION_POSITION_BUTTON_LEFT) + || (IsButtonSet(BUTTON_POSITION_RIGHT) == false && animationPos == HEADER_ANIMATION_POSITION_BUTTON_RIGHT)) + { + SysLogException(NID_UI_CTRL, E_INVALID_OPERATION, + "[E_INVALID_OPERATION] Unable to play the waiting animation because no button is set at the specified position."); + return E_INVALID_OPERATION; + } + + ToolbarAnimationPosition toolbarAnimPos = TOOLBAR_ANIMATION_POSITION_TITLE; + + if (animationPos == HEADER_ANIMATION_POSITION_TITLE) + { + toolbarAnimPos = TOOLBAR_ANIMATION_POSITION_TITLE; + } + else if (animationPos == HEADER_ANIMATION_POSITION_BUTTON_LEFT) + { + toolbarAnimPos = TOOLBAR_ANIMATION_POSITION_BUTTON_LEFT; + } + else if (animationPos == HEADER_ANIMATION_POSITION_BUTTON_RIGHT) + { + toolbarAnimPos = TOOLBAR_ANIMATION_POSITION_BUTTON_RIGHT; + } + + return GetCore().PlayWaitingAnimation(toolbarAnimPos); +} + +result +_HeaderImpl::StopWaitingAnimation(HeaderAnimationPosition animationPos) +{ + if ((__style == HEADER_STYLE_SEGMENTED || __style == HEADER_STYLE_TITLE_BUTTON || __style == HEADER_STYLE_BUTTON + || __style == HEADER_STYLE_TAB || __style == HEADER_STYLE_TAB_LARGE) + && animationPos == HEADER_ANIMATION_POSITION_TITLE) + { + SysLogException(NID_UI_CTRL, E_INVALID_OPERATION, "[E_INVALID_OPERATION] A Header in this style doesn't support title animation."); + return E_INVALID_OPERATION; + } + + SysTryReturnResult(NID_UI_CTRL, (GetWaitingAnimationStatus(animationPos) != ANIMATION_STOPPED), E_INVALID_OPERATION, + "[E_INVALID_OPERATION] The animation is not playing currently."); + + ToolbarAnimationPosition toolbarAnimPos = TOOLBAR_ANIMATION_POSITION_TITLE; + + if (animationPos == HEADER_ANIMATION_POSITION_TITLE) + { + toolbarAnimPos = TOOLBAR_ANIMATION_POSITION_TITLE; + } + else if (animationPos == HEADER_ANIMATION_POSITION_BUTTON_LEFT) + { + toolbarAnimPos = TOOLBAR_ANIMATION_POSITION_BUTTON_LEFT; + } + else if (animationPos == HEADER_ANIMATION_POSITION_BUTTON_RIGHT) + { + toolbarAnimPos = TOOLBAR_ANIMATION_POSITION_BUTTON_RIGHT; + } + + return GetCore().StopWaitingAnimation(toolbarAnimPos); +} + +result +_HeaderImpl::PauseWaitingAnimation(HeaderAnimationPosition animationPos) +{ + if ((__style == HEADER_STYLE_SEGMENTED || __style == HEADER_STYLE_TITLE_BUTTON || __style == HEADER_STYLE_BUTTON + || __style == HEADER_STYLE_TAB || __style == HEADER_STYLE_TAB_LARGE) + && animationPos == HEADER_ANIMATION_POSITION_TITLE) + { + SysLogException(NID_UI_CTRL, E_INVALID_OPERATION, "[E_INVALID_OPERATION] Unable to pause the waiting animation because the current style does not support it."); + return E_INVALID_OPERATION; + } + + SysTryReturnResult(NID_UI_CTRL, (GetWaitingAnimationStatus(animationPos) != ANIMATION_STOPPED), E_INVALID_OPERATION, + "[E_INVALID_OPERATION] No waiting animation is in progress at the specified position."); + + SysTryReturnResult(NID_UI_CTRL, + (animationPos >= HEADER_ANIMATION_POSITION_TITLE && animationPos <= HEADER_ANIMATION_POSITION_BUTTON_RIGHT), + E_INVALID_ARG, "[E_INVALID_ARG] The animationPos is invalid"); + + ToolbarAnimationPosition toolbarAnimPos = TOOLBAR_ANIMATION_POSITION_TITLE; + + if (animationPos == HEADER_ANIMATION_POSITION_TITLE) + { + toolbarAnimPos = TOOLBAR_ANIMATION_POSITION_TITLE; + } + else if (animationPos == HEADER_ANIMATION_POSITION_BUTTON_LEFT) + { + toolbarAnimPos = TOOLBAR_ANIMATION_POSITION_BUTTON_LEFT; + } + else if (animationPos == HEADER_ANIMATION_POSITION_BUTTON_RIGHT) + { + toolbarAnimPos = TOOLBAR_ANIMATION_POSITION_BUTTON_RIGHT; + } + + return GetCore().PauseWaitingAnimation(toolbarAnimPos); +} + +AnimationStatus +_HeaderImpl::GetWaitingAnimationStatus(HeaderAnimationPosition animationPos) const +{ + ToolbarAnimationPosition toolbarAnimPos = TOOLBAR_ANIMATION_POSITION_TITLE; + + if (HEADER_ANIMATION_POSITION_TITLE == animationPos) + { + toolbarAnimPos = TOOLBAR_ANIMATION_POSITION_TITLE; + } + else if (animationPos == HEADER_ANIMATION_POSITION_BUTTON_LEFT) + { + toolbarAnimPos = TOOLBAR_ANIMATION_POSITION_BUTTON_LEFT; + } + else if (animationPos == HEADER_ANIMATION_POSITION_BUTTON_RIGHT) + { + toolbarAnimPos = TOOLBAR_ANIMATION_POSITION_BUTTON_RIGHT; + } + + return GetCore().GetWaitingAnimationStatus(toolbarAnimPos); +} + +result +_HeaderImpl::RemoveAllButtons(void) +{ + return GetCore().RemoveAllButtons(); +} + +result +_HeaderImpl::RemoveAllItems(void) +{ + return GetCore().RemoveAllItems(); +} + +result +_HeaderImpl::RemoveItemAt(int itemIndex) +{ + int count = GetItemCount(); + + SysTryReturnResult(NID_UI_CTRL, (itemIndex >= 0 && itemIndex <= count), E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] The itemIndex is out of range."); + + + return GetCore().RemoveItemAt(itemIndex); +} + +result +_HeaderImpl::RemoveButtonAt(ButtonPosition position) +{ + if (BUTTON_POSITION_LEFT == position) + { + return GetCore().RemoveButtonAt(LEFT_BUTTON); + } + else if (BUTTON_POSITION_RIGHT == position) + { + return GetCore().RemoveButtonAt(RIGHT_BUTTON); + } + + return E_SUCCESS; +} + +result +_HeaderImpl::SetBackgroundBitmap(const Bitmap* pBitmap) +{ + return GetCore().SetBackgroundBitmap(*pBitmap); +} + +result +_HeaderImpl::SetButton(ButtonPosition position, const ButtonItem& button) +{ + 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, + 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) + { + SysTryReturnResult(NID_UI_CTRL, (count <= HEADER_MAX_ITEM_COUNT_WITH_BUTTON), E_SYSTEM, + "[E_SYSTEM] If the item count is larger then 4, no button can be set."); + } + + SysTryReturnResult(NID_UI_CTRL, (position == BUTTON_POSITION_LEFT || position == BUTTON_POSITION_RIGHT), E_INVALID_ARG, + "[E_INVALID_ARG] The position is invalid."); + + _Button* pButton = ConvertButtonItem(button); + + if (position == BUTTON_POSITION_LEFT) + { + return GetCore().SetButton(LEFT_BUTTON, pButton); + } + else if (position == BUTTON_POSITION_RIGHT) + { + return GetCore().SetButton(RIGHT_BUTTON, pButton); + } + + return E_SUCCESS; +} + +result +_HeaderImpl::SetButtonColor(ButtonItemStatus status, const Color& color) +{ + _ButtonStatus tempStatus = ConvertButtonStatus(status); + + return GetCore().SetButtonColor(tempStatus, color); +} + +result +_HeaderImpl::SetButtonEnabled(ButtonPosition position, bool enable) +{ + bool isButtonSet = IsButtonSet(position); + + SysTryReturnResult(NID_UI_CTRL, isButtonSet, E_INVALID_OPERATION, + "[E_INVALID_OPERATION] No button item is set at the specified position."); + + if (position == BUTTON_POSITION_LEFT) + { + GetCore().SetButtonEnabled(LEFT_BUTTON, enable); + } + else if (position == BUTTON_POSITION_RIGHT) + { + GetCore().SetButtonEnabled(RIGHT_BUTTON, enable); + } + + return E_SUCCESS; +} + +result +_HeaderImpl::SetButtonTextColor(ButtonItemStatus status, const Color& color) +{ + _ButtonStatus tempStatus = ConvertButtonStatus(status); + + return GetCore().SetButtonTextColor(tempStatus, color); +} + +result +_HeaderImpl::SetButtonBadgeIcon(ButtonPosition position, const Bitmap* pBadgeIcon) +{ + SysTryReturnResult(NID_UI_CTRL, (position == BUTTON_POSITION_LEFT || position == BUTTON_POSITION_RIGHT), E_SYSTEM, + "[E_SYSTEM] The position is invalid."); + + bool isButtonSet = IsButtonSet(position); + + SysTryReturnResult(NID_UI_CTRL, isButtonSet, E_INVALID_STATE, + "[E_INVALID_STATE] No button item is set at the specified position."); + + if (position == BUTTON_POSITION_LEFT) + { + return GetCore().SetButtonBadgeIcon(LEFT_BUTTON, pBadgeIcon); + } + else + { + return GetCore().SetButtonBadgeIcon(RIGHT_BUTTON, pBadgeIcon); + } +} + +result +_HeaderImpl::SetButtonNumberedBadgeIcon(ButtonPosition position, int number) +{ + SysTryReturnResult(NID_UI_CTRL, (position == BUTTON_POSITION_LEFT || position == BUTTON_POSITION_RIGHT), E_SYSTEM, + "[E_SYSTEM] The position is invalid."); + + bool isButtonSet = IsButtonSet(position); + + SysTryReturnResult(NID_UI_CTRL, isButtonSet, E_INVALID_STATE, + "[E_INVALID_STATE] No button item is set at the specified position."); + + SysTryReturnResult(NID_UI_CTRL, (0 <= number && number <= HEADER_NUMBERD_BADGE_ICON_NUMBER_MAX), E_INVALID_ARG, + "[E_INVALID_ARG] The number is invalid."); + + if (position == BUTTON_POSITION_LEFT) + { + return GetCore().SetButtonNumberedBadgeIcon(LEFT_BUTTON, number); + } + else + { + return GetCore().SetButtonNumberedBadgeIcon(RIGHT_BUTTON, number); + } +} + +result +_HeaderImpl::SetItemAt(int itemIndex, const HeaderItem& item) +{ + result r = CheckItemValidate(item); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + int count = GetItemCount(); + + SysTryReturnResult(NID_UI_CTRL, (itemIndex >= 0 && itemIndex <= count && __style != HEADER_STYLE_TITLE), E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] The itemIndex is out of range."); + + _Button* pButton = ConvertHeaderItem(item); + + if (__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) + { + pButton->SetButtonStyle(_BUTTON_STYLE_SEGMENT); + } + + return GetCore().SetItemAt(itemIndex, pButton); +} + +result +_HeaderImpl::SetItemBadgeIcon(int itemIndex, const Bitmap* pBadgeIcon) +{ + SysTryReturnResult(NID_UI_CTRL, __style != HEADER_STYLE_TITLE, + E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] Unable to set the badge icon because the current style does not support it."); + + int count = GetItemCount(); + + SysTryReturnResult(NID_UI_CTRL, (itemIndex >= 0 && itemIndex < count), E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] The itemIndex is out of range."); + + return GetCore().SetItemBadgeIcon(itemIndex, pBadgeIcon); +} + +result +_HeaderImpl::SetItemNumberedBadgeIcon(int itemIndex, int number) +{ + SysTryReturnResult(NID_UI_CTRL, __style != HEADER_STYLE_TITLE, + E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] Unable to set the badge icon because the current style does not support it."); + + SysTryReturnResult(NID_UI_CTRL, (0 <= number && number <= HEADER_NUMBERD_BADGE_ICON_NUMBER_MAX), E_INVALID_ARG, + "[E_INVALID_ARG] The number is invalid."); + + int count = GetItemCount(); + + SysTryReturnResult(NID_UI_CTRL, (itemIndex >= 0 && itemIndex < count), E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] The itemIndex is out of range."); + + return GetCore().SetItemNumberedBadgeIcon(itemIndex, number); +} + +result +_HeaderImpl::SetItemColor(HeaderItemStatus status, const Color& color) +{ + _ButtonStatus tempStatus = ConvertButtonStatus(status); + + return GetCore().SetItemColor(tempStatus, color); +} + +result +_HeaderImpl::SetItemEnabled(int itemIndex, bool enable) +{ + int count = GetItemCount(); + + SysTryReturnResult(NID_UI_CTRL, (count != 0), E_SYSTEM, "[E_SYSTEM] No item to be enabled exists.") + + SysTryReturnResult(NID_UI_CTRL, (itemIndex >= 0 && itemIndex < count), E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] The itemIndex is out of range."); + + // Selected item cannot be disabled. + int selectedItemIndex = GetSelectedItemIndex(); + + if (__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) + { + if ((selectedItemIndex == itemIndex && enable == false) || (selectedItemIndex == -1 && itemIndex == 0 && enable == false)) + { + SysLogException(NID_UI_CTRL, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The Selected item cannot be disabled."); + return E_INVALID_OPERATION; + } + } + + return GetCore().SetItemEnabled(itemIndex, enable); +} + +result +_HeaderImpl::SetItemTextColor(HeaderItemStatus status, const Color& color) +{ + _ButtonStatus tempStatus = ConvertButtonStatus(status); + + return GetCore().SetItemTextColor(tempStatus, color); +} + +result +_HeaderImpl::SetItemSelected(int itemIndex) +{ + 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), + E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] Unable to select the item because the current style does not support it."); + + int count = GetItemCount(); + + SysTryReturnResult(NID_UI_CTRL, (count != 0 && itemIndex >= 0 && itemIndex < count), E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] The itemIndex is out of range."); + + // Disabled items can not be selected. + HeaderItemStatus status; + + result r = GetItemStatus(itemIndex, status); + + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[E_INVALID_STATE] Failed to get item status."); + + SysTryReturnResult(NID_UI_CTRL, (status != HEADER_ITEM_STATUS_DISABLED), E_INVALID_OPERATION, + "[E_INVALID_OPERATION] The disabled item can not be selected."); + + //__calledBySetItemSelected = true; + + return GetCore().SetItemSelected(itemIndex); +} + +result +_HeaderImpl::SetColor(const Color& color) +{ + return GetCore().SetColor(color); +} + +result +_HeaderImpl::SetStyle(HeaderStyle style) +{ + RemoveAllItems(); + RemoveAllButtons(); + + __style = style; + + return GetCore().SetStyle(ConvertHeaderStyle(__style)); +} + +result +_HeaderImpl::SetTitleIcon(const Bitmap* pIcon) +{ + SysTryReturnResult(NID_UI_CTRL, (__style == HEADER_STYLE_TITLE || __style == HEADER_STYLE_SEGMENTED_WITH_TITLE + || __style == HEADER_STYLE_TAB_WITH_TITLE), + E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] Unable to set the title icon because the current style does not support it."); + + return GetCore().SetTitleIcon(*pIcon); +} + +result +_HeaderImpl::SetTitleText(const String& text) +{ + SysTryReturnResult(NID_UI_CTRL, (__style == HEADER_STYLE_TITLE || __style == HEADER_STYLE_SEGMENTED_WITH_TITLE + || __style == HEADER_STYLE_TAB_WITH_TITLE), + E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] Unable to set the title icon because the current style does not support it."); + + return GetCore().SetTitleText(text); +} + +result +_HeaderImpl::SetTitleTextColor(const Color& color) +{ + SysTryReturnResult(NID_UI_CTRL, (__style == HEADER_STYLE_TITLE || __style == HEADER_STYLE_SEGMENTED_WITH_TITLE + || __style == HEADER_STYLE_TAB_WITH_TITLE), + E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] Unable to set the title icon because the current style does not support it."); + + return GetCore().SetTitleTextColor(color); +} + +result +_HeaderImpl::SetTransparent(bool transparent) +{ + return GetCore().SetTransparent(transparent); +} + +result +_HeaderImpl::SetDescriptionText(const String& text) +{ + SysTryReturnResult(NID_UI_CTRL, (__style == HEADER_STYLE_TITLE), E_UNSUPPORTED_OPERATION, + "[E_UNSUPPORTED_OPERATION] Unable to set the description text icon because the current style does not support it."); + + return GetCore().SetDescriptionText(text); +} + +result +_HeaderImpl::SetDescriptionTextColor(const Color& color) +{ + SysTryReturnResult(NID_UI_CTRL, (__style == HEADER_STYLE_TITLE), E_UNSUPPORTED_OPERATION, + "[E_UNSUPPORTED_OPERATION] Unable to set the description text icon because the current style does not support it."); + + return GetCore().SetDescriptionTextColor(color); +} + +bool +_HeaderImpl::IsTabEditModeEnabled(void) const +{ + return GetCore().IsTabEditModeEnabled(); +} + +result +_HeaderImpl::SetTabEditModeEnabled(bool enable) +{ + SysTryReturnResult(NID_UI_CTRL, (__style == HEADER_STYLE_TAB || __style == HEADER_STYLE_TAB_WITH_TITLE || __style == HEADER_STYLE_TAB_LARGE), E_UNSUPPORTED_OPERATION, + "[E_UNSUPPORTED_OPERATION] This operation is only for HEADER_STYLE_TAB, HEADER_STYLE_TAB_WITH_TITLE or HEADER_STYLE_TAB_LARGE"); + + return GetCore().SetTabEditModeEnabled(enable); +} + +result +_HeaderImpl::SetBackButton(void) +{ + return E_UNSUPPORTED_OPERATION; +} + +bool +_HeaderImpl::IsBackButtonSet(void) const +{ + return false; +} + +void +_HeaderImpl::RemoveBackButton(void) +{ + return; +} + +result +_HeaderImpl::SetBackButtonEnabled(bool enable) +{ + return E_INVALID_OPERATION; +} + +ButtonItemStatus +_HeaderImpl::GetBackButtonStatus(void) const +{ + SysTryReturn(NID_UI_CTRL, 0, BUTTON_ITEM_STATUS_NORMAL, E_INVALID_OPERATION, + "[E_INVALID_OPERATION] No button item is set at the specified position."); +} + +Rectangle +_HeaderImpl::GetButtonBounds(ButtonPosition position) const +{ + bool isButtonSet = IsButtonSet(position); + + SysTryReturn(NID_UI_CTRL, isButtonSet, Rectangle(-1, -1, -1, -1), E_INVALID_OPERATION, "[E_INVALID_OPERATION] No button item is set at the specified position."); + + Rectangle rect; + + if (position == BUTTON_POSITION_LEFT) + { + rect = GetCore().GetButtonBounds(LEFT_BUTTON); + } + else if (position == BUTTON_POSITION_RIGHT) + { + rect = GetCore().GetButtonBounds(RIGHT_BUTTON); + } + + return rect; +} + +FloatRectangle +_HeaderImpl::GetButtonBoundsF(ButtonPosition position) const +{ + bool isButtonSet = IsButtonSet(position); + + SysTryReturn(NID_UI_CTRL, isButtonSet, FloatRectangle(-1.0f, -1.0f, -1.0f, -1.0f), + E_INVALID_OPERATION, "[E_INVALID_OPERATION] No button item is set at the specified position."); + + FloatRectangle rect; + + if (position == BUTTON_POSITION_LEFT) + { + rect = GetCore().GetButtonBoundsF(LEFT_BUTTON); + } + else if (position == BUTTON_POSITION_RIGHT) + { + rect = GetCore().GetButtonBoundsF(RIGHT_BUTTON); + } + + return rect; +} + +result +_HeaderImpl::SetTitleBadgeIcon(const Bitmap* pBadgeIcon) +{ + SysTryReturnResult(NID_UI_CTRL, (__style == HEADER_STYLE_TITLE || __style == HEADER_STYLE_SEGMENTED_WITH_TITLE + || __style == HEADER_STYLE_TAB_WITH_TITLE), + E_INVALID_OPERATION, "[E_INVALID_OPERATION] Unable to set the title badge icon because the current style does not support it."); + + return GetCore().SetTitleBadgeIcon(pBadgeIcon); +} + +result +_HeaderImpl::SetTitleNumberedBadgeIcon(int number) +{ + SysTryReturnResult(NID_UI_CTRL, (__style == HEADER_STYLE_TITLE || __style == HEADER_STYLE_SEGMENTED_WITH_TITLE + || __style == HEADER_STYLE_TAB_WITH_TITLE), + E_INVALID_OPERATION, "[E_INVALID_OPERATION] Unable to set the title badge icon because the current style does not support it."); + + SysTryReturnResult(NID_UI_CTRL, (0 <= number && number <= HEADER_NUMBERD_BADGE_ICON_NUMBER_MAX), E_INVALID_ARG, + "[E_INVALID_ARG] The number is invalid."); + + return GetCore().SetTitleNumberedBadgeIcon(number); +} + +void +_HeaderImpl::AddActionEventListener(IActionEventListener& listener) +{ + if (__pPublicActionEvent == null) + { + __pPublicActionEvent = _PublicActionEvent::CreateInstanceN(GetPublic()); + + if (IsFailed(GetLastResult())) + { + SysLogException(NID_UI_CTRL, E_SYSTEM, "[E_SYSTEM] System error occurred."); + delete __pPublicActionEvent; + + return; + } + } + + __pPublicActionEvent->AddListener(listener); + + GetCore().AddActionEventListener(*this); + + return; +} + +void +_HeaderImpl::RemoveActionEventListener(IActionEventListener& listener) +{ + SysTryReturnVoidResult(NID_UI_CTRL, __pPublicActionEvent, E_INVALID_STATE, "[E_INVALID_STATE] This instance isn't constructed."); + + // Todo : check fail case of RemoveListener + __pPublicActionEvent->RemoveListener(listener); + + GetCore().RemoveActionEventListener(*this); + + return; +} + +void +_HeaderImpl::OnActionPerformed(const _Control& source, int actionId) +{ + if (GetCore().IsInitialDraw() == true && GetCore().GetSelectedItemIndex() == 0) + { + return; + } + + if (__pPublicActionEvent != null) + { + __pPublicActionEvent->Fire(*_PublicActionEvent::CreateActionEventArgN(actionId)); + } + + return; +} + +result +_HeaderImpl::CheckItemValidate(const HeaderItem& item) +{ + result r = E_SUCCESS; + + 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(); + + if (__style == HEADER_STYLE_TAB || __style == HEADER_STYLE_TAB_WITH_TITLE || __style == HEADER_STYLE_TAB_LARGE) + { + SysTryReturnResult(NID_UI_CTRL, (count < HEADER_TAB_STYLE_MAX_ITEM_COUNT), E_MAX_EXCEEDED, + "[E_MAX_EXCEEDED] The number of items have exceeded the maximum limit."); + } + else + { + SysTryReturnResult(NID_UI_CTRL, (count < HEADER_ITEM_MAX_COUNT), E_MAX_EXCEEDED, + "[E_MAX_EXCEEDED] The number of items have exceeded the maximum limit."); + } + + if ((HEADER_STYLE_TITLE_BUTTON == __style) && (HEADER_TITLE_BUTTON_STYLE_MAX_ITEM_COUNT <= count)) + { + SysLogException(NID_UI_CTRL, E_MAX_EXCEEDED, "[E_MAX_EXCEEDED] The number of items exceeded the maximum limit."); + r = E_MAX_EXCEEDED; + goto CATCH; + } + + if ((HEADER_STYLE_TAB_WITH_TITLE != __style) && (count >= HEADER_MAX_ITEM_COUNT_WITH_BUTTON) && + (true == IsButtonSet(BUTTON_POSITION_LEFT) || true == IsButtonSet(BUTTON_POSITION_RIGHT))) + { + SysLogException(NID_UI_CTRL, E_MAX_EXCEEDED, "[E_MAX_EXCEEDED] The number of items with button have exceeded the maximum limit."); + r = E_MAX_EXCEEDED; + goto CATCH; + } + + return r; + +CATCH: + return r; +} + +ToolbarStyle +_HeaderImpl::ConvertHeaderStyle(HeaderStyle style) +{ + ToolbarStyle viewStyle = TOOLBAR_TITLE; + + if (style == HEADER_STYLE_TITLE || style == HEADER_STYLE_TITLE_BUTTON) + { + viewStyle = TOOLBAR_TITLE; + } + else if (style == HEADER_STYLE_SEGMENTED) + { + viewStyle = TOOLBAR_HEADER_SEGMENTED; + } + else if (style == HEADER_STYLE_SEGMENTED_WITH_TITLE) + { + viewStyle = TOOLBAR_HEADER_SEGMENTED_WITH_TITLE; + } + else if (style == HEADER_STYLE_TAB) + { + viewStyle = TOOLBAR_TAB; + } + else if (style == HEADER_STYLE_TAB_WITH_TITLE) + { + viewStyle = TOOLBAR_TAB_WITH_TITLE; + } + else if (style == HEADER_STYLE_BUTTON) + { + viewStyle = TOOLBAR_TEXT; + } + else if (style == HEADER_STYLE_TAB_LARGE) + { + viewStyle = TOOLBAR_TAB_LARGE; + } + + return viewStyle; +} + +_Button* +_HeaderImpl::ConvertButtonItem(const ButtonItem& buttonItem) +{ + result r = E_SUCCESS; + + _Button* pButton = _Button::CreateButtonN(); + + pButton->SetMargin(0.0f, 0.0f, 0.0f, 0.0f); + + float fontSize = 0.0f; + float multilineFontSize = 0.0f; + + if (__style == HEADER_STYLE_BUTTON) + { + r = GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_FONT_SIZE, GetCore().GetOrientation(), fontSize); + if (!IsFailed(r)) + { + pButton->SetTextSize(fontSize, FONT_STYLE_BOLD); + } + + r = GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_MULTILINE_FONT_SIZE, GetCore().GetOrientation(), multilineFontSize); + if (!IsFailed(r)) + { + pButton->SetMultilineTextSize(multilineFontSize); + } + } + else + { + r = GET_SHAPE_CONFIG(HEADER::BUTTON_ITEM_FONT_SIZE, GetCore().GetOrientation(), fontSize); + if (!IsFailed(r)) + { + pButton->SetTextSize(fontSize, FONT_STYLE_BOLD); + } + + r = GET_SHAPE_CONFIG(HEADER::BUTTON_ITEM_MULTILINE_FONT_SIZE, GetCore().GetOrientation(), multilineFontSize); + if (!IsFailed(r)) + { + pButton->SetMultilineTextSize(multilineFontSize); + } + } + + pButton->SetText(buttonItem.GetText()); + + float buttonItemWidth = 0.0f; + float buttonItemHeight = 0.0f; + float textMargin = 0.0f; + + GET_SHAPE_CONFIG(HEADER::BUTTON_ITEM_HEIGHT, GetCore().GetOrientation(), buttonItemHeight); + GET_SHAPE_CONFIG(HEADER::BUTTON_ITEM_WIDTH, GetCore().GetOrientation(), buttonItemWidth); + GET_SHAPE_CONFIG(HEADER::BUTTON_ITEM_MARGIN_WITH_TEXT, GetCore().GetOrientation(), textMargin); + + if (buttonItem.GetText() != L"") + { + pButton->SetBounds(FloatRectangle(0.0f, 0.0f, buttonItemWidth, buttonItemHeight)); + + float extentSize = 0.0f; + float extentSizeMax = 0.0f; + float extentSizeMin = 0.0f; + + GET_SHAPE_CONFIG(HEADER::BUTTON_ITEM_WIDTH_WITH_TEXT, GetCore().GetOrientation(), extentSizeMax); + GET_SHAPE_CONFIG(HEADER::BUTTON_ITEM_WIDTH, GetCore().GetOrientation(), extentSizeMin); + + extentSize = pButton->GetTextExtentSizeF() + textMargin * 2; + + if (extentSize > extentSizeMax) + { + extentSize = extentSizeMax; + } + + if (extentSize < extentSizeMin) + { + extentSize = extentSizeMin; + } + + pButton->SetMargin(textMargin, 0.0f, textMargin - 1, 0.0f); + pButton->SetBounds(FloatRectangle(0.0f, 0.0f, extentSize, buttonItemHeight)); + } + else + { + pButton->SetBounds(FloatRectangle(0.0f, 0.0f, buttonItemWidth, buttonItemHeight)); + } + + pButton->SetActionId(buttonItem.GetActionId()); + pButton->SetTextMaxLine(2); + + float iconSize = 0.0f; + + if (__style == HEADER_STYLE_BUTTON) + { + GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_ICON_SIZE, GetCore().GetOrientation(), iconSize); // 63 + } + else + { + if (__style == HEADER_STYLE_SEGMENTED_WITH_TITLE) + { + GET_SHAPE_CONFIG(HEADER::TAB_ITEM_ICON_SIZE, GetCore().GetOrientation(), iconSize); //63 + } + else + { + GET_SHAPE_CONFIG(HEADER::BUTTON_ITEM_ICON_SIZE, GetCore().GetOrientation(), iconSize); //63 + } + } + + Bitmap* pIconBitmap = null; + pIconBitmap = const_cast(buttonItem.__pImpl->GetIcon(BUTTON_ITEM_STATUS_NORMAL)); + + if (pIconBitmap) + { + pIconBitmap->Scale(FloatDimension(iconSize, iconSize)); + + pButton->SetBitmap(_BUTTON_STATUS_NORMAL, FloatPoint(0.0f, 0.0f), *pIconBitmap); + pButton->SetBitmap(_BUTTON_STATUS_PRESSED, FloatPoint(0.0f, 0.0f), *pIconBitmap); + pButton->SetBitmap(_BUTTON_STATUS_HIGHLIGHTED, FloatPoint(0.0f, 0.0f), *pIconBitmap); + pButton->SetBitmap(_BUTTON_STATUS_DISABLED, FloatPoint(0.0f, 0.0f), *pIconBitmap); + } + + pIconBitmap = const_cast(buttonItem.__pImpl->GetIcon(BUTTON_ITEM_STATUS_PRESSED)); + + if (pIconBitmap) + { + pIconBitmap->Scale(FloatDimension(iconSize, iconSize)); + + pButton->SetBitmap(_BUTTON_STATUS_PRESSED, FloatPoint(0.0f, 0.0f), *pIconBitmap); + } + + pIconBitmap = const_cast(buttonItem.__pImpl->GetIcon(BUTTON_ITEM_STATUS_HIGHLIGHTED)); + + if (pIconBitmap) + { + pIconBitmap->Scale(FloatDimension(iconSize, iconSize)); + + pButton->SetBitmap(_BUTTON_STATUS_HIGHLIGHTED, FloatPoint(0.0f, 0.0f), *pIconBitmap); + } + + pIconBitmap = const_cast(buttonItem.__pImpl->GetIcon(BUTTON_ITEM_STATUS_DISABLED)); + + if (pIconBitmap) + { + pIconBitmap->Scale(FloatDimension(iconSize, iconSize)); + + pButton->SetBitmap(_BUTTON_STATUS_DISABLED, FloatPoint(0.0f, 0.0f), *pIconBitmap); + } + + Bitmap* pNormalBackgroundBitmap = null; + Bitmap* pDisabledBackgroundBitmap = null; + Bitmap* pPressedBackgroundBitmap = null; + Bitmap* pHighlightedBackgroundBitmap = null; + + Bitmap* pColorReplacedBitmap = null; + + GET_BITMAP_CONFIG_N(HEADER::BUTTON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pNormalBackgroundBitmap); + GET_BITMAP_CONFIG_N(HEADER::BUTTON_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pDisabledBackgroundBitmap); + GET_BITMAP_CONFIG_N(HEADER::BUTTON_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pPressedBackgroundBitmap); + GET_BITMAP_CONFIG_N(HEADER::BUTTON_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pHighlightedBackgroundBitmap); + + if (pNormalBackgroundBitmap) + { + pColorReplacedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pNormalBackgroundBitmap, Color::GetColor(COLOR_ID_MAGENTA), + GetCore().GetButtonColor(_BUTTON_STATUS_NORMAL)); + + if (GetCore().GetButtonColor(_BUTTON_STATUS_NORMAL).GetAlpha() != 0xFF) + { + pColorReplacedBitmap->SetAlphaConstant(GetCore().GetButtonColor(_BUTTON_STATUS_NORMAL).GetAlpha()); + } + + pButton->SetBackgroundBitmap(_BUTTON_STATUS_NORMAL, *pColorReplacedBitmap); + + delete pColorReplacedBitmap; + delete pNormalBackgroundBitmap; + } + + if (pDisabledBackgroundBitmap) + { + pColorReplacedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDisabledBackgroundBitmap, Color::GetColor(COLOR_ID_MAGENTA), + GetCore().GetButtonColor(_BUTTON_STATUS_DISABLED)); + + if (GetCore().GetButtonColor(_BUTTON_STATUS_DISABLED).GetAlpha() != 0xFF) + { + pColorReplacedBitmap->SetAlphaConstant(GetCore().GetButtonColor(_BUTTON_STATUS_DISABLED).GetAlpha()); + } + + pButton->SetBackgroundBitmap(_BUTTON_STATUS_DISABLED, *pColorReplacedBitmap); + + delete pColorReplacedBitmap; + delete pDisabledBackgroundBitmap; + } + + if (pPressedBackgroundBitmap) + { + pColorReplacedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pPressedBackgroundBitmap, Color::GetColor(COLOR_ID_MAGENTA), + GetCore().GetButtonColor(_BUTTON_STATUS_PRESSED)); + + if (GetCore().GetButtonColor(_BUTTON_STATUS_PRESSED).GetAlpha() != 0xFF) + { + pColorReplacedBitmap->SetAlphaConstant(GetCore().GetButtonColor(_BUTTON_STATUS_PRESSED).GetAlpha()); + } + + pButton->SetBackgroundBitmap(_BUTTON_STATUS_PRESSED, *pColorReplacedBitmap); + + delete pColorReplacedBitmap; + delete pPressedBackgroundBitmap; + } + + if (pHighlightedBackgroundBitmap) + { + pColorReplacedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pHighlightedBackgroundBitmap, Color::GetColor(COLOR_ID_MAGENTA), + GetCore().GetButtonColor(_BUTTON_STATUS_HIGHLIGHTED)); + + if (GetCore().GetButtonColor(_BUTTON_STATUS_HIGHLIGHTED).GetAlpha() != 0xFF) + { + pColorReplacedBitmap->SetAlphaConstant(GetCore().GetButtonColor(_BUTTON_STATUS_HIGHLIGHTED).GetAlpha()); + } + + pButton->SetBackgroundBitmap(_BUTTON_STATUS_HIGHLIGHTED, *pColorReplacedBitmap); + + delete pColorReplacedBitmap; + delete pHighlightedBackgroundBitmap; + } + + if (buttonItem.__pImpl->GetBackgroundBitmap(BUTTON_ITEM_STATUS_NORMAL) != null) + { + pButton->SetToolbarItemBackgroundBitmap(_BUTTON_STATUS_NORMAL, + *buttonItem.__pImpl->GetBackgroundBitmap(BUTTON_ITEM_STATUS_NORMAL)); + } + if (buttonItem.__pImpl->GetBackgroundBitmap(BUTTON_ITEM_STATUS_PRESSED) != null) + { + pButton->SetToolbarItemBackgroundBitmap(_BUTTON_STATUS_PRESSED, + *buttonItem.__pImpl->GetBackgroundBitmap(BUTTON_ITEM_STATUS_PRESSED)); + } + if (buttonItem.__pImpl->GetBackgroundBitmap(BUTTON_ITEM_STATUS_HIGHLIGHTED) != null) + { + pButton->SetToolbarItemBackgroundBitmap(_BUTTON_STATUS_HIGHLIGHTED, + *buttonItem.__pImpl->GetBackgroundBitmap(BUTTON_ITEM_STATUS_HIGHLIGHTED)); + } + if (buttonItem.__pImpl->GetBackgroundBitmap(BUTTON_ITEM_STATUS_DISABLED) != null) + { + pButton->SetToolbarItemBackgroundBitmap(_BUTTON_STATUS_DISABLED, + *buttonItem.__pImpl->GetBackgroundBitmap(BUTTON_ITEM_STATUS_DISABLED)); + } + + if (buttonItem.__pImpl->__accessibilityHint.GetLength() > 0) + { + _AccessibilityContainer* pContainer = pButton->GetAccessibilityContainer(); + if (pContainer) + { + _AccessibilityElement* pElement = pContainer->GetChildElement(L"ButtonText"); + if (pElement) + { + pElement->SetHint(buttonItem.__pImpl->__accessibilityHint); + } + } + } + + return pButton; +} + +_Button* +_HeaderImpl::ConvertHeaderItem(const HeaderItem& headerItem) +{ + _Button* pButton = _Button::CreateButtonN(); + + float minItemLength = 0.0f; + + GET_SHAPE_CONFIG(HEADER::ITEM_MINIMUM_WIDTH, GetCore().GetOrientation(), minItemLength); + + pButton->SetBounds(FloatRectangle(0.0f, 0.0f, minItemLength, minItemLength)); + + pButton->SetActionId(headerItem.GetActionId()); + + pButton->SetText(headerItem.GetText()); + + pButton->SetTextMaxLine(2); + + float fontSize = 0.0f; + result r = E_SUCCESS; + + bool customTheme = false; + + if (__style == HEADER_STYLE_SEGMENTED || __style == HEADER_STYLE_SEGMENTED_WITH_TITLE || __style == HEADER_STYLE_TITLE_BUTTON) + { + r = GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_FONT_SIZE, GetCore().GetOrientation(), fontSize); + } + else if (__style == HEADER_STYLE_TAB || __style == HEADER_STYLE_TAB_WITH_TITLE || __style == HEADER_STYLE_TAB_LARGE) + { + r = GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE, GetCore().GetOrientation(), fontSize); + } + else // __style == HEADER_STYLE_BUTTON + { + r = GET_SHAPE_CONFIG(FOOTER::FOOTER_ITEM_FONT_SIZE, GetCore().GetOrientation(), fontSize); + } + + if (!IsFailed(r)) + { + pButton->SetTextSize(fontSize, FONT_STYLE_BOLD); + } + + float iconSize = 0.0f; + + if (__style == HEADER_STYLE_SEGMENTED || __style == HEADER_STYLE_SEGMENTED_WITH_TITLE + || __style == HEADER_STYLE_TAB_WITH_TITLE || __style == HEADER_STYLE_TAB || __style == HEADER_STYLE_TAB_LARGE) + { + if (headerItem.GetText() != L"" && __style != HEADER_STYLE_TAB_LARGE) + { + GET_SHAPE_CONFIG(HEADER::TAB_ITEM_ICON_SIZE_WITH_TEXT, GetCore().GetOrientation(), iconSize); // 45 + } + else + { + GET_SHAPE_CONFIG(HEADER::TAB_ITEM_ICON_SIZE, GetCore().GetOrientation(), iconSize); // 63 + } + + Bitmap* pSelectedBitmap = null; + Bitmap* pColorReplacedBitmap = null; + Color selectedBitmapColor; + + GET_BITMAP_CONFIG_N(HEADER::TAB_ITEM_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, pSelectedBitmap); + GET_COLOR_CONFIG(HEADER::SELECTED_BAR_BG_NORMAL, selectedBitmapColor); + + pColorReplacedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pSelectedBitmap, Color::GetColor(COLOR_ID_MAGENTA), selectedBitmapColor); + + if (__style == HEADER_STYLE_SEGMENTED || __style == HEADER_STYLE_SEGMENTED_WITH_TITLE) + { + if (GetCore().IsTransparent() == true) + { + customTheme = IS_CUSTOM_BITMAP(HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_SELECTED); + } + else + { + customTheme = IS_CUSTOM_BITMAP(HEADER::SEGMENTED_ITEM_BG_SELECTED); + } + } + else if (__style == HEADER_STYLE_TAB_WITH_TITLE || __style == HEADER_STYLE_TAB || __style == HEADER_STYLE_TAB_LARGE) + { + if (GetCore().IsTransparent() == true) + { + customTheme = IS_CUSTOM_BITMAP(HEADER::TAB_ITEM_TRANSLUCENT_BG_SELECTED); + } + else + { + customTheme = IS_CUSTOM_BITMAP(HEADER::TAB_ITEM_BG_SELECTED); + } + } + + if (pColorReplacedBitmap && customTheme == false) + { + if (__style == HEADER_STYLE_SEGMENTED_WITH_TITLE || __style == HEADER_STYLE_TAB_WITH_TITLE) + { + pButton->SetUnderlineBitmap(*pColorReplacedBitmap); + } + else + { + pButton->SetUnderlineBitmap(*pColorReplacedBitmap); + } + } + + delete pColorReplacedBitmap; + delete pSelectedBitmap; + + if (__style == HEADER_STYLE_TAB_LARGE || __style == HEADER_STYLE_SEGMENTED_WITH_TITLE || __style == HEADER_STYLE_TAB_WITH_TITLE) + { + pButton->SetTabTextSlide(true); + } + } + else // __style == HEADER_STYLE_BUTTON + { + if (headerItem.GetText() != L"") + { + GET_SHAPE_CONFIG(FOOTER::FOOTER_ITEM_BUTTON_STYLE_ICON_SIZE_WITH_TEXT, GetCore().GetOrientation(), iconSize); //45 + } + else + { + GET_SHAPE_CONFIG(FOOTER::FOOTER_ITEM_BUTTON_STYLE_ICON_SIZE, GetCore().GetOrientation(), iconSize); // 63 + } + } + + Bitmap* pIconBitmap = null; + + pIconBitmap = const_cast(headerItem.__pImpl->GetIcon(HEADER_ITEM_STATUS_NORMAL)); + if (pIconBitmap) + { + pIconBitmap->Scale(FloatDimension(iconSize, iconSize)); + + pButton->SetBitmap(_BUTTON_STATUS_NORMAL, FloatPoint(0.0f, 0.0f), *pIconBitmap); + pButton->SetBitmap(_BUTTON_STATUS_PRESSED, FloatPoint(0.0f, 0.0f), *pIconBitmap); + pButton->SetBitmap(_BUTTON_STATUS_SELECTED, FloatPoint(0.0f, 0.0f), *pIconBitmap); + pButton->SetBitmap(_BUTTON_STATUS_HIGHLIGHTED, FloatPoint(0.0f, 0.0f), *pIconBitmap); + pButton->SetBitmap(_BUTTON_STATUS_DISABLED, FloatPoint(0.0f, 0.0f), *pIconBitmap); + } + + pIconBitmap = const_cast(headerItem.__pImpl->GetIcon(HEADER_ITEM_STATUS_PRESSED)); + + if (pIconBitmap) + { + pIconBitmap->Scale(FloatDimension(iconSize, iconSize)); + + pButton->SetBitmap(_BUTTON_STATUS_PRESSED, FloatPoint(0.0f, 0.0f), *pIconBitmap); + } + + pIconBitmap = const_cast(headerItem.__pImpl->GetIcon(HEADER_ITEM_STATUS_SELECTED)); + + if (pIconBitmap) + { + pIconBitmap->Scale(FloatDimension(iconSize, iconSize)); + + pButton->SetBitmap(_BUTTON_STATUS_SELECTED, FloatPoint(0.0f, 0.0f), *pIconBitmap); + } + + pIconBitmap = const_cast(headerItem.__pImpl->GetIcon(HEADER_ITEM_STATUS_HIGHLIGHTED)); + + if (pIconBitmap) + { + pIconBitmap->Scale(FloatDimension(iconSize, iconSize)); + + pButton->SetBitmap(_BUTTON_STATUS_HIGHLIGHTED, FloatPoint(0.0f, 0.0f), *pIconBitmap); + } + + pIconBitmap = const_cast(headerItem.__pImpl->GetIcon(HEADER_ITEM_STATUS_DISABLED)); + + if (pIconBitmap) + { + pIconBitmap->Scale(FloatDimension(iconSize, iconSize)); + + pButton->SetBitmap(_BUTTON_STATUS_DISABLED, FloatPoint(0.0f, 0.0f), *pIconBitmap); + } + + if (headerItem.__pImpl->GetBackgroundBitmap(HEADER_ITEM_STATUS_NORMAL) != null) + { + pButton->SetToolbarItemBackgroundBitmap(_BUTTON_STATUS_NORMAL, + *headerItem.__pImpl->GetBackgroundBitmap(HEADER_ITEM_STATUS_NORMAL)); + } + if (headerItem.__pImpl->GetBackgroundBitmap(HEADER_ITEM_STATUS_PRESSED) != null) + { + pButton->SetToolbarItemBackgroundBitmap(_BUTTON_STATUS_PRESSED, + *headerItem.__pImpl->GetBackgroundBitmap(HEADER_ITEM_STATUS_PRESSED)); + } + if (headerItem.__pImpl->GetBackgroundBitmap(HEADER_ITEM_STATUS_SELECTED) != null) + { + pButton->SetToolbarItemBackgroundBitmap(_BUTTON_STATUS_SELECTED, + *headerItem.__pImpl->GetBackgroundBitmap(HEADER_ITEM_STATUS_SELECTED)); + } + if (headerItem.__pImpl->GetBackgroundBitmap(HEADER_ITEM_STATUS_HIGHLIGHTED) != null) + { + pButton->SetToolbarItemBackgroundBitmap(_BUTTON_STATUS_HIGHLIGHTED, + *headerItem.__pImpl->GetBackgroundBitmap(HEADER_ITEM_STATUS_HIGHLIGHTED)); + } + if (headerItem.__pImpl->GetBackgroundBitmap(HEADER_ITEM_STATUS_DISABLED) != null) + { + pButton->SetToolbarItemBackgroundBitmap(_BUTTON_STATUS_DISABLED, + *headerItem.__pImpl->GetBackgroundBitmap(HEADER_ITEM_STATUS_DISABLED)); + } + + if (headerItem.__pImpl->__accessibilityHint.GetLength() > 0) + { + _AccessibilityContainer* pContainer = pButton->GetAccessibilityContainer(); + if (pContainer) + { + _AccessibilityElement* pElement = pContainer->GetChildElement(L"ButtonText"); + if (pElement) + { + pElement->SetHint(headerItem.__pImpl->__accessibilityHint); + } + } + } + + return pButton; +} + +ButtonItemStatus +_HeaderImpl::ConvertButtonItemStatus(_ButtonStatus status) const +{ + switch (status) + { + case _BUTTON_STATUS_NORMAL: + return BUTTON_ITEM_STATUS_NORMAL; + break; + + case _BUTTON_STATUS_DISABLED: + return BUTTON_ITEM_STATUS_DISABLED; + break; + + case _BUTTON_STATUS_PRESSED: + return BUTTON_ITEM_STATUS_PRESSED; + break; + + case _BUTTON_STATUS_HIGHLIGHTED: + return BUTTON_ITEM_STATUS_HIGHLIGHTED; + break; + + default: + return BUTTON_ITEM_STATUS_DISABLED; + break; + } +} + +HeaderItemStatus +_HeaderImpl::ConvertHeaderItemStatus(_ButtonStatus status) const +{ + switch (status) + { + case _BUTTON_STATUS_NORMAL: + return HEADER_ITEM_STATUS_NORMAL; + break; + + case _BUTTON_STATUS_DISABLED: + return HEADER_ITEM_STATUS_DISABLED; + break; + + case _BUTTON_STATUS_PRESSED: + return HEADER_ITEM_STATUS_PRESSED; + break; + + case _BUTTON_STATUS_HIGHLIGHTED: + return HEADER_ITEM_STATUS_HIGHLIGHTED; + break; + + case _BUTTON_STATUS_SELECTED: + return HEADER_ITEM_STATUS_SELECTED; + break; + + default: + return HEADER_ITEM_STATUS_DISABLED; + break; + } +} + +_ButtonStatus +_HeaderImpl::ConvertButtonStatus(ButtonItemStatus status) const +{ + switch (status) + { + case BUTTON_ITEM_STATUS_NORMAL: + return _BUTTON_STATUS_NORMAL; + break; + + case BUTTON_ITEM_STATUS_DISABLED: + return _BUTTON_STATUS_DISABLED; + break; + + case BUTTON_ITEM_STATUS_PRESSED: + return _BUTTON_STATUS_PRESSED; + break; + + case BUTTON_ITEM_STATUS_HIGHLIGHTED: + return _BUTTON_STATUS_HIGHLIGHTED; + break; + + default: + return _BUTTON_STATUS_DISABLED; + break; + } +} + +_ButtonStatus +_HeaderImpl::ConvertButtonStatus(HeaderItemStatus status) const +{ + switch (status) + { + case HEADER_ITEM_STATUS_NORMAL: + return _BUTTON_STATUS_NORMAL; + break; + + case HEADER_ITEM_STATUS_DISABLED: + return _BUTTON_STATUS_DISABLED; + break; + + case HEADER_ITEM_STATUS_PRESSED: + return _BUTTON_STATUS_PRESSED; + break; + + case HEADER_ITEM_STATUS_HIGHLIGHTED: + return _BUTTON_STATUS_HIGHLIGHTED; + break; + + case HEADER_ITEM_STATUS_SELECTED: + return _BUTTON_STATUS_SELECTED; + break; + + default: + return _BUTTON_STATUS_DISABLED; + break; + } +} + +class _HeaderMaker + : public _UiBuilderControlMaker +{ +public: + _HeaderMaker(_UiBuilder* uibuilder) + : _UiBuilderControlMaker(uibuilder){}; + virtual ~_HeaderMaker(){}; + static _UiBuilderControlMaker* GetInstance(_UiBuilder* uibuilder) + { + _HeaderMaker* pHeaderMaker = new (std::nothrow) _HeaderMaker(uibuilder); + return pHeaderMaker; + }; +protected: + virtual Control* Make(_UiBuilderControl* pControl) + { + Header* pHeader = null; + String elementString; + int opacity = 0; + int numberedBadge = 0; + Color color; + + //Construct + HeaderStyle hstyle = HEADER_STYLE_TITLE; + Form* pForm = static_cast(GetContainer()); + pHeader = pForm->GetHeader(); + + if (null == pHeader) + { + return null; + } + + if (pControl->GetElement(L"headerStyle", elementString)) + { + if (elementString.Equals(L"HEADER_STYLE_TITLE", false)) + { + hstyle = HEADER_STYLE_TITLE; + } + else if (elementString.Equals(L"HEADER_STYLE_SEGMENTED", false)) + { + hstyle = HEADER_STYLE_SEGMENTED; + } + else if (elementString.Equals(L"HEADER_STYLE_TITLE_BUTTON", false)) + { + hstyle = HEADER_STYLE_TITLE_BUTTON; + } + else if (elementString.Equals(L"HEADER_STYLE_SEGMENTED_WITH_TITLE", false)) + { + hstyle = HEADER_STYLE_SEGMENTED_WITH_TITLE; + } + else if (elementString.Equals(L"HEADER_STYLE_TAB", false)) + { + hstyle = HEADER_STYLE_TAB; + } + else if (elementString.Equals(L"HEADER_STYLE_TAB_WITH_TITLE", false)) + { + hstyle = HEADER_STYLE_TAB_WITH_TITLE; + } + else if (elementString.Equals(L"HEADER_STYLE_BUTTON", false)) + { + hstyle = HEADER_STYLE_BUTTON; + } + else if (elementString.Equals(L"HEADER_STYLE_TAB_LARGE", false)) + { + hstyle = HEADER_STYLE_TAB_LARGE; + } + + pHeader->SetStyle(hstyle); + } + + if (pControl->GetElement(L"backgroundBitmapPath", elementString) || pControl->GetElement(L"BGBitmapPath", elementString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(elementString); + pHeader->SetBackgroundBitmap(pBitmap); + } + + // header color + if (pControl->GetElement(L"colorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + + if (pControl->GetElement(L"color", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + pHeader->SetColor(color); + } + + if (HEADER_STYLE_TITLE == hstyle || HEADER_STYLE_SEGMENTED_WITH_TITLE == hstyle || HEADER_STYLE_TAB_WITH_TITLE == hstyle) + { + // title + if (pControl->GetElement(L"titleText", elementString)) + { + pHeader->SetTitleText(elementString); + } + + if (pControl->GetElement(L"titleTextColor", elementString)) + { + ConvertStringToColor(elementString, color); + result r = pHeader->SetTitleTextColor(color); + SysLogException(NID_UI_CTRL, r, "[E_INVALID_STATE] Failed to set title text color"); + } + + if (pControl->GetElement(L"titleIconPath", elementString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(elementString); + result r = pHeader->SetTitleIcon(pBitmap); + SysLogException(NID_UI_CTRL, r, "[E_INVALID_STATE] Failed to set an icon"); + } + + if (pControl->GetElement(L"titleBadgeIconPath", elementString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(elementString); + result r = pHeader->SetTitleBadgeIcon(pBitmap); + SysLogException(NID_UI_CTRL, r, "[E_INVALID_STATE] Failed to set an icon"); + } + + if (pControl->GetElement(L"titleNumberedBadgeIcon", elementString)) + { + Base::Integer::Parse(elementString, numberedBadge); + result r = pHeader->SetTitleNumberedBadgeIcon(numberedBadge); + SysLogException(NID_UI_CTRL, r, "[E_INVALID_STATE] Failed to set a numbered icon"); + } + + // description + if (pControl->GetElement(L"descriptionText", elementString)) + { + result r = pHeader->SetDescriptionText(elementString); + SysLogException(NID_UI_CTRL, r, "[E_INVALID_STATE] Failed to set description text"); + } + + if (pControl->GetElement(L"descriptionTextColor", elementString)) + { + ConvertStringToColor(elementString, color); + result r = pHeader->SetDescriptionTextColor(color); + SysLogException(NID_UI_CTRL, r, "[E_INVALID_STATE] Failed to set description text color"); + } + } + + if (pControl->GetElement(L"accessibilityHint", elementString)) + { + AccessibilityContainer* pContainer = pHeader->GetAccessibilityContainer(); + if (pContainer) + { + AccessibilityElement* pElement = pContainer->GetElement(L"HeaderTitleText"); + if (pElement) + { + pElement->SetHint(elementString); + } + } + } + + // normal button + if (pControl->GetElement(L"normalButtonColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + + if (pControl->GetElement(L"normalButtonColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + pHeader->SetButtonColor(BUTTON_ITEM_STATUS_NORMAL, color); + } + + if (pControl->GetElement(L"normalButtonTextColor", elementString)) + { + ConvertStringToColor(elementString, color); + pHeader->SetButtonTextColor(BUTTON_ITEM_STATUS_NORMAL, color); + } + + // pressed button + if (pControl->GetElement(L"pressedButtonColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + + if (pControl->GetElement(L"pressedButtonColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + pHeader->SetButtonColor(BUTTON_ITEM_STATUS_PRESSED, color); + } + + if (pControl->GetElement(L"pressedButtonTextColor", elementString)) + { + ConvertStringToColor(elementString, color); + pHeader->SetButtonTextColor(BUTTON_ITEM_STATUS_PRESSED, color); + } + + // highlighted button + if (pControl->GetElement(L"highlightedButtonColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + + if (pControl->GetElement(L"highlightedButtonColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + pHeader->SetButtonColor(BUTTON_ITEM_STATUS_HIGHLIGHTED, color); + } + + if (pControl->GetElement(L"highlightedButtonTextColor", elementString)) + { + ConvertStringToColor(elementString, color); + pHeader->SetButtonTextColor(BUTTON_ITEM_STATUS_HIGHLIGHTED, color); + } + + // disabled button + if (pControl->GetElement(L"disabledButtonColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + + if (pControl->GetElement(L"disabledButtonColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + pHeader->SetButtonColor(BUTTON_ITEM_STATUS_DISABLED, color); + } + + if (pControl->GetElement(L"disabledButtonTextColor", elementString)) + { + ConvertStringToColor(elementString, color); + pHeader->SetButtonTextColor(BUTTON_ITEM_STATUS_DISABLED, color); + } + + if (HEADER_STYLE_TITLE != hstyle) + { + // normal item + if (pControl->GetElement(L"normalItemColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + + if (pControl->GetElement(L"normalItemColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + pHeader->SetItemColor(HEADER_ITEM_STATUS_NORMAL, color); + } + + if (pControl->GetElement(L"normalItemTextColor", elementString)) + { + ConvertStringToColor(elementString, color); + pHeader->SetItemTextColor(HEADER_ITEM_STATUS_NORMAL, color); + } + + // pressed item + if (pControl->GetElement(L"pressedItemColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + + if (pControl->GetElement(L"pressedItemColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + pHeader->SetItemColor(HEADER_ITEM_STATUS_PRESSED, color); + } + + if (pControl->GetElement(L"pressedItemTextColor", elementString)) + { + ConvertStringToColor(elementString, color); + pHeader->SetItemTextColor(HEADER_ITEM_STATUS_PRESSED, color); + } + + if (hstyle == HEADER_STYLE_SEGMENTED || hstyle == HEADER_STYLE_SEGMENTED_WITH_TITLE + || hstyle == HEADER_STYLE_TAB || hstyle == HEADER_STYLE_TAB_WITH_TITLE || hstyle == HEADER_STYLE_TAB_LARGE) + { + // selected item + if (pControl->GetElement(L"selectedItemColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + + if (pControl->GetElement(L"selectedItemColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + pHeader->SetItemColor(HEADER_ITEM_STATUS_SELECTED, color); + } + + if (pControl->GetElement(L"selectedItemTextColor", elementString)) + { + ConvertStringToColor(elementString, color); + pHeader->SetItemTextColor(HEADER_ITEM_STATUS_SELECTED, color); + } + } + + // highlighted item + if (pControl->GetElement(L"highlightedItemColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + + if (pControl->GetElement(L"highlightedItemColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + pHeader->SetItemColor(HEADER_ITEM_STATUS_HIGHLIGHTED, color); + } + + if (pControl->GetElement(L"highlightedItemTextColor", elementString)) + { + ConvertStringToColor(elementString, color); + pHeader->SetItemTextColor(HEADER_ITEM_STATUS_HIGHLIGHTED, color); + } + + // disabled item + if (pControl->GetElement(L"disabledItemColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + + if (pControl->GetElement(L"disabledItemColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + pHeader->SetItemColor(HEADER_ITEM_STATUS_DISABLED, color); + } + + if (pControl->GetElement(L"disabledItemTextColor", elementString)) + { + ConvertStringToColor(elementString, color); + pHeader->SetItemTextColor(HEADER_ITEM_STATUS_DISABLED, color); + } + } + + int itemCnt = pControl->GetItemCount(); + ButtonItemStyle buttonItemStyle = BUTTON_ITEM_STYLE_TEXT; + ButtonPosition buttonPosition = BUTTON_POSITION_LEFT; + String headerItemString; + + for (int i = 0; i < itemCnt; i++) + { + headerItemString = pControl->GetItemName(i); + if ((HEADER_STYLE_TITLE != hstyle) && (headerItemString.Equals(L"headerItem", false))) + { + HeaderItem headerItem; + + // get Action Id + if (pControl->GetItemElement(i, "actionId", headerItemString)) + { + int actionId; + Base::Integer::Parse(headerItemString, actionId); + headerItem.Construct(actionId); + } + + // get text + if (pControl->GetItemElement(i, "text", headerItemString)) + { + headerItem.SetText(headerItemString); + } + + // headeritem icon bitmap setting + // normal + if (pControl->GetItemElement(i, "normalIconPath", headerItemString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(headerItemString); + headerItem.SetIcon(HEADER_ITEM_STATUS_NORMAL, pBitmap); + } + + // pressed + if (pControl->GetItemElement(i, "pressedIconPath", headerItemString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(headerItemString); + headerItem.SetIcon(HEADER_ITEM_STATUS_PRESSED, pBitmap); + } + + // selected + if (pControl->GetItemElement(i, "selectedIconPath", headerItemString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(headerItemString); + headerItem.SetIcon(HEADER_ITEM_STATUS_SELECTED, pBitmap); + } + + // highlighted + if (pControl->GetItemElement(i, "highlightedIconPath", headerItemString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(headerItemString); + headerItem.SetIcon(HEADER_ITEM_STATUS_HIGHLIGHTED, pBitmap); + } + + // disabled + if (pControl->GetItemElement(i, "disabledIconPath", headerItemString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(headerItemString); + headerItem.SetIcon(HEADER_ITEM_STATUS_DISABLED, pBitmap); + } + + // headeritem background bitmap path setting + // normal bg bitmap + if (pControl->GetItemElement(i, "normalBGBitmapPath", headerItemString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(headerItemString); + headerItem.SetBackgroundBitmap(HEADER_ITEM_STATUS_NORMAL, pBitmap); + } + + // pressed bg bitmap + if (pControl->GetItemElement(i, "pressedBGBitmapPath", headerItemString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(headerItemString); + headerItem.SetBackgroundBitmap(HEADER_ITEM_STATUS_PRESSED, pBitmap); + } + + // selected bg bitmap + if (pControl->GetItemElement(i, "selectedBGBitmapPath", headerItemString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(headerItemString); + headerItem.SetBackgroundBitmap(HEADER_ITEM_STATUS_SELECTED, pBitmap); + } + + // highlighted bg bitmap + if (pControl->GetItemElement(i, "highlightedBGBitmapPath", headerItemString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(headerItemString); + headerItem.SetBackgroundBitmap(HEADER_ITEM_STATUS_HIGHLIGHTED, pBitmap); + } + + // disabled bg bitmap + if (pControl->GetItemElement(i, "disabledBGBitmapPath", headerItemString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(headerItemString); + headerItem.SetBackgroundBitmap(HEADER_ITEM_STATUS_DISABLED, pBitmap); + } + + if (pControl->GetItemElement(i, L"accessibilityHint", elementString)) + { + _HeaderItemImpl::GetInstance(headerItem)->SetAccessibilityHint(elementString); + } + + pHeader->AddItem(headerItem); + + if (pControl->GetItemElement(i, "headerItemBadgeIconPath", headerItemString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(headerItemString); + result r = pHeader->SetItemBadgeIcon(i, pBitmap); + SysLogException(NID_UI_CTRL, r, "[E_INVALID_STATE] Failed to set an icon"); + } + + if (pControl->GetItemElement(i, "headerItemNumberedBadgeIcon", headerItemString)) + { + Base::Integer::Parse(headerItemString, numberedBadge); + result r = pHeader->SetItemNumberedBadgeIcon(i, numberedBadge); + SysLogException(NID_UI_CTRL, r, "[E_INVALID_STATE] Failed to set a numbered icon"); + } + } + else if (headerItemString.Equals(L"buttonItem", false)) + { + ButtonItem buttonItem; + + // set button style + if (pControl->GetItemElement(i, "style", headerItemString)) + { + if (headerItemString.Equals(L"BUTTON_ITEM_STYLE_TEXT", false)) + { + buttonItemStyle = BUTTON_ITEM_STYLE_TEXT; + } + else if (headerItemString.Equals(L"BUTTON_ITEM_STYLE_ICON", false)) + { + buttonItemStyle = BUTTON_ITEM_STYLE_ICON; + } + } + + // set button position + if (pControl->GetItemElement(i, "position", headerItemString)) + { + if (headerItemString.Equals(L"BUTTON_POSITION_LEFT", false)) + { + buttonPosition = BUTTON_POSITION_LEFT; + } + else if (headerItemString.Equals(L"BUTTON_POSITION_RIGHT", false)) + { + buttonPosition = BUTTON_POSITION_RIGHT; + } + } + + if (pControl->GetItemElement(i, "actionId", headerItemString)) + { + int actionId; + Base::Integer::Parse(headerItemString, actionId); + buttonItem.Construct(buttonItemStyle, actionId); + } + + if (pControl->GetItemElement(i, "text", headerItemString)) + { + buttonItem.SetText(headerItemString); + } + + // buttonitem background bitmap path setting + // normal bg bitmap + if (pControl->GetItemElement(i, "normalBGBitmapPath", headerItemString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(headerItemString); + buttonItem.SetBackgroundBitmap(BUTTON_ITEM_STATUS_NORMAL, pBitmap); + } + + // pressed bg bitmap + if (pControl->GetItemElement(i, "pressedBGBitmapPath", headerItemString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(headerItemString); + buttonItem.SetBackgroundBitmap(BUTTON_ITEM_STATUS_PRESSED, pBitmap); + } + + // highlighted bg bitmap + if (pControl->GetItemElement(i, "highlightedBGBitmapPath", headerItemString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(headerItemString); + buttonItem.SetBackgroundBitmap(BUTTON_ITEM_STATUS_HIGHLIGHTED, pBitmap); + } + + // disabled bg bitmap + if (pControl->GetItemElement(i, "disabledBGBitmapPath", headerItemString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(headerItemString); + buttonItem.SetBackgroundBitmap(BUTTON_ITEM_STATUS_DISABLED, pBitmap); + } + + // buttonitem icon bitmap setting + if (pControl->GetItemElement(i, "normalIconPath", headerItemString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(headerItemString); + buttonItem.SetIcon(BUTTON_ITEM_STATUS_NORMAL, pBitmap); + } + + if (pControl->GetItemElement(i, "pressedIconPath", headerItemString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(headerItemString); + buttonItem.SetIcon(BUTTON_ITEM_STATUS_PRESSED, pBitmap); + } + + if (pControl->GetItemElement(i, "highlightedIconPath", headerItemString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(headerItemString); + buttonItem.SetIcon(BUTTON_ITEM_STATUS_HIGHLIGHTED, pBitmap); + } + + if (pControl->GetItemElement(i, "disabledIconPath", headerItemString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(headerItemString); + buttonItem.SetIcon(BUTTON_ITEM_STATUS_DISABLED, pBitmap); + } + + if (pControl->GetItemElement(i, L"accessibilityHint", elementString)) + { + _ButtonItemImpl::GetInstance(buttonItem)->SetAccessibilityHint(elementString); + } + pHeader->SetButton(buttonPosition, buttonItem); + + if (pControl->GetItemElement(i, "buttonItemBadgeIconPath", headerItemString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(headerItemString); + result r = pHeader->SetButtonBadgeIcon(buttonPosition, pBitmap); + SysLogException(NID_UI_CTRL, r, "[E_INVALID_STATE] Failed to set an icon"); + } + + if (pControl->GetItemElement(i, "buttonItemNumberedBadgeIcon", headerItemString)) + { + Base::Integer::Parse(headerItemString, numberedBadge); + result r = pHeader->SetButtonNumberedBadgeIcon(buttonPosition, numberedBadge); + SysLogException(NID_UI_CTRL, r, "[E_INVALID_STATE] Failed to set a numbered icon"); + } + } + + } + + return pHeader; + } + +private: + +}; + +_HeaderRegister::_HeaderRegister() +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->RegisterControl(L"Header", _HeaderMaker::GetInstance); +} + +_HeaderRegister::~_HeaderRegister() +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->UnregisterControl(L"Header"); +} + +static _HeaderRegister HeaderRegisterToUiBuilder; + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_HeaderItemImpl.cpp b/src/ui/controls/FUiCtrl_HeaderItemImpl.cpp new file mode 100644 index 0000000..fb0b383 --- /dev/null +++ b/src/ui/controls/FUiCtrl_HeaderItemImpl.cpp @@ -0,0 +1,167 @@ +// +// 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_HeaderItemImpl.cpp +* @brief This is the implementation file for _HeaderItemImpl class. +*/ + +#include +#include "FUiCtrl_HeaderItemImpl.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_HeaderItemImpl::_HeaderItemImpl(HeaderItem* pPublic) + : __actionId(-1) + , __itemText(L"") + , __accessibilityHint(L"") +{ + for (int i = 0; i < HEADER_ITEM_MAX_STATE_COUNT; i++) + { + __pIconBitmap[i] = null; + __pHeaderItemBackgroundBitmap[i] = null; + } +} + +_HeaderItemImpl::~_HeaderItemImpl(void) +{ + for (int i = 0; i < HEADER_ITEM_MAX_STATE_COUNT; i++) + { + __pIconBitmap[i] = null; + __pHeaderItemBackgroundBitmap[i] = null; + } +} + +const _HeaderItemImpl* +_HeaderItemImpl::GetInstance(const HeaderItem& headerItem) +{ + return static_cast (headerItem.__pImpl); +} + +_HeaderItemImpl* +_HeaderItemImpl::GetInstance(HeaderItem& headerItem) +{ + return static_cast<_HeaderItemImpl*> (headerItem.__pImpl); +} + +result +_HeaderItemImpl::Construct(int actionId) +{ + SysTryReturnResult(NID_UI_CTRL, actionId >= HEADER_ITEM_ACTION_ID_MIN, + E_INVALID_ARG, "[E_INVALID_ARG] The actionId is invalid."); + + __actionId = actionId; + __itemText = String(L""); + + for (int i = 0; i < HEADER_ITEM_MAX_STATE_COUNT; i++) + { + __pIconBitmap[i] = null; + __pHeaderItemBackgroundBitmap[i] = null; + } + + return E_SUCCESS; +} + +int +_HeaderItemImpl::GetActionId(void) const +{ + ClearLastResult(); + + return __actionId; +} + +const Bitmap* +_HeaderItemImpl::GetBackgroundBitmap(HeaderItemStatus status) const +{ + ClearLastResult(); + + SysTryReturn(NID_UI_CTRL, (status >= HEADER_ITEM_STATUS_NORMAL && status < HEADER_ITEM_MAX_STATE_COUNT), null, E_INVALID_ARG, + "[E_INVALID_ARG] status is invalid."); + + return __pHeaderItemBackgroundBitmap[status]; +} + +const Bitmap* +_HeaderItemImpl::GetIcon(HeaderItemStatus status) const +{ + ClearLastResult(); + + SysTryReturn(NID_UI_CTRL, (status >= HEADER_ITEM_STATUS_NORMAL && status < HEADER_ITEM_MAX_STATE_COUNT), null, E_INVALID_ARG, + "[E_INVALID_ARG] status is invalid."); + + return __pIconBitmap[status]; +} + +String +_HeaderItemImpl::GetText(void) const +{ + ClearLastResult(); + + return __itemText; +} + +result +_HeaderItemImpl::SetActionId(int actionId) +{ + SysTryReturnResult(NID_UI_CTRL, actionId >= HEADER_ITEM_ACTION_ID_MIN, + E_INVALID_ARG, "[E_INVALID_ARG] The actionId is invalid."); + + __actionId = actionId; + + return E_SUCCESS; +} + +result +_HeaderItemImpl::SetBackgroundBitmap(HeaderItemStatus status, const Bitmap* pBitmap) +{ + SysTryReturnResult(NID_UI_CTRL, (status >= HEADER_ITEM_STATUS_NORMAL && status < HEADER_ITEM_MAX_STATE_COUNT), E_INVALID_ARG, + "[E_INVALID_ARG] status is invalid."); + + __pHeaderItemBackgroundBitmap[status] = pBitmap; + + return E_SUCCESS; +} + +result +_HeaderItemImpl::SetIcon(HeaderItemStatus status, const Bitmap* pIcon) +{ + SysTryReturnResult(NID_UI_CTRL, (status >= HEADER_ITEM_STATUS_NORMAL && status < HEADER_ITEM_MAX_STATE_COUNT), E_INVALID_ARG, + "[E_INVALID_ARG] status is invalid."); + + __pIconBitmap[status] = pIcon; + + return E_SUCCESS; +} + +result +_HeaderItemImpl::SetText(const String& text) +{ + __itemText = text; + + return E_SUCCESS; +} + +void +_HeaderItemImpl::SetAccessibilityHint(const Tizen::Base::String& hint) +{ + __accessibilityHint = hint; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_IconListData.cpp b/src/ui/controls/FUiCtrl_IconListData.cpp new file mode 100644 index 0000000..c426e55 --- /dev/null +++ b/src/ui/controls/FUiCtrl_IconListData.cpp @@ -0,0 +1,122 @@ +// +// 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_IconListData.cpp + * @brief This is the implementation file for _IconListData class + * + * This file contains the implementation of _IconListData class + */ + +#include "FUiCtrl_IconListData.h" + +using namespace Tizen::Base; +using namespace Tizen::Ui; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_IconListData::_IconListData(void) + : __pNormalBitmap(null) + , __pFocusedBitmap(null) + , __labelText() + , __itemId(-1) +{ +} + +_IconListData::~_IconListData(void) +{ + delete __pNormalBitmap; + __pNormalBitmap = null; + + delete __pFocusedBitmap; + __pFocusedBitmap = null; +} + +const Bitmap* +_IconListData::GetNormalBitmap(void) +{ + return __pNormalBitmap; +} + +const Bitmap* +_IconListData::GetFocusedBitmap(void) +{ + return __pFocusedBitmap; +} + +const String +_IconListData::GetLabelText(void) +{ + return __labelText; +} + +int +_IconListData::GetItemId(void) +{ + return __itemId; +} + +void +_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] Memory allocation failed."); + + result r = __pNormalBitmap->Construct(*pNormalBitmap, Rectangle(0, 0, pNormalBitmap->GetWidth(), pNormalBitmap->GetHeight())); + if (IsFailed(r)) + { + SysLogException(NID_UI_CTRL, r, "[E_SYSTEM]Bitmap construct failed"); + } + } + +} + +void +_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] Memory allocation failed."); + + result r = __pFocusedBitmap->Construct(*pFocusedBitmap, Rectangle(0, 0, pFocusedBitmap->GetWidth(), pFocusedBitmap->GetHeight())); + if (IsFailed(r)) + { + SysLogException(NID_UI_CTRL, r, "[E_SYSTEM]Bitmap construct failed"); + } + } +} + +void +_IconListData::SetLabelText(const String& labelText) +{ + __labelText = labelText; + +} + +void +_IconListData::SetItemId(int itemId) +{ + __itemId = itemId; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_IconListImpl.cpp b/src/ui/controls/FUiCtrl_IconListImpl.cpp new file mode 100644 index 0000000..a6ec99e --- /dev/null +++ b/src/ui/controls/FUiCtrl_IconListImpl.cpp @@ -0,0 +1,1024 @@ +// +// 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_IconListImpl.cpp + * @brief This is the implementation file for _IconListImpl class + * + * This file contains the implementation of _IconListImpl class + */ + +#include +#include "FUiCtrl_IconListImpl.h" +#include "FUiCtrl_IconListItemProvider.h" +#include "FUiCtrl_IconListData.h" +#include "FUi_ResourceManager.h" +#include "FUiCtrl_ListListener.h" +//UiBuilder +#include "FUi_UiBuilder.h" + +using namespace Tizen::Base; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_IconListImpl* +_IconListImpl::GetInstance(IconList& iconList) +{ + return static_cast< _IconListImpl* >(iconList._pControlImpl); +} + +const _IconListImpl* +_IconListImpl::GetInstance(const IconList& iconList) +{ + return static_cast< const _IconListImpl* >(iconList._pControlImpl); +} + +_IconListImpl::_IconListImpl(Control* pList, _IconListView* pCore) + : _ControlImpl(pList, pCore) + , __pIconListItemProvider(null) + , __annexStyle(ICON_LIST_VIEW_STYLE_NORMAL) +{ +} + +_IconListImpl::~_IconListImpl(void) +{ + __iconList.RemoveAll(true); + __iconListenersList.RemoveAll(true); + + delete __pIconListItemProvider; + __pIconListItemProvider = null; +} + +const char* +_IconListImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Controls::IconList"; +} + +const IconList& +_IconListImpl::GetPublic(void) const +{ + return static_cast< const IconList& >(_ControlImpl::GetPublic()); +} + +IconList& +_IconListImpl::GetPublic(void) +{ + return static_cast< IconList& >(_ControlImpl::GetPublic()); +} + +const _IconListView& +_IconListImpl::GetCore(void) const +{ + return static_cast< const _IconListView& >(_ControlImpl::GetCore()); +} + +_IconListView& +_IconListImpl::GetCore(void) +{ + return static_cast< _IconListView& >(_ControlImpl::GetCore()); +} + +_IconListImpl* +_IconListImpl::CreateIconListImplN(IconList* pControl) +{ + _IconListView* pCore = _IconListView::CreateIconListViewN(); + 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] Memory allocation failed."); + + return pImpl; + +CATCH: + delete pCore; + return null; +} + +result +_IconListImpl::SetIconListStyle(IconListStyle style) +{ + result r = E_SUCCESS; + + switch (style) + { + case ICON_LIST_STYLE_NORMAL: + __annexStyle = ICON_LIST_VIEW_STYLE_NORMAL; + break; + + case ICON_LIST_STYLE_RADIO: + __annexStyle = ICON_LIST_VIEW_STYLE_RADIO; + break; + + case ICON_LIST_STYLE_MARK: + __annexStyle = ICON_LIST_VIEW_STYLE_MARK; + break; + + default: + r = E_INVALID_ARG; + break; + } + + 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)); + + return r; +} + +result +_IconListImpl::InitializeIconList(int itemWidth, int itemHeight) +{ + result r = E_SUCCESS; + int initialTextSize = itemHeight >> 2; + int minSize = 0; + int topMargin = 0; + int rightMargin = 0; + int leftMargin = 0; + + GET_FIXED_VALUE_CONFIG(ICONLIST::MINIMUM_FONT_SIZE, GetCore().GetOrientation(), minSize); + GET_SHAPE_CONFIG(ICONLIST::LIST1X_TOP_MARGIN, GetCore().GetOrientation(), topMargin); + GET_SHAPE_CONFIG(ICONLIST::LIST1X_LEFT_MARGIN, GetCore().GetOrientation(), leftMargin); + GET_SHAPE_CONFIG(ICONLIST::LIST1X_RIGHT_MARGIN, GetCore().GetOrientation(), rightMargin); + + if (initialTextSize < minSize) + { + initialTextSize = minSize; + } + + r = GetCore().SetItemTextSize(initialTextSize); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Failed to set item text size", GetErrorMessage(r)); + + r = GetCore().SetScrollDirection(ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Failed to set scroll direction", GetErrorMessage(r)); + + r = GetCore().SetItemBitmapBounds(Rectangle(0, 0, itemWidth, itemHeight)); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Failed to set bitmap bounds", GetErrorMessage(r)); + + r = GetCore().SetItemBorderStyle(ICON_LIST_VIEW_ITEM_BORDER_STYLE_OUTLINE); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Failed to set border style", GetErrorMessage(r)); + + r = GetCore().SetItemSpacing(rightMargin, topMargin); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Failed to set item spacing", GetErrorMessage(r)); + + r = GetCore().SetMargin(MARGIN_TYPE_TOP, topMargin); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Failed to set top margin", GetErrorMessage(r)); + + r = GetCore().SetMargin(MARGIN_TYPE_LEFT, leftMargin); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Failed to set left margin", GetErrorMessage(r)); + + r = GetCore().SetMargin(MARGIN_TYPE_RIGHT, rightMargin); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Failed to set right margin", GetErrorMessage(r)); + + r = GetCore().SetMargin(MARGIN_TYPE_BOTTOM, 0); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Failed to set bottom margin", GetErrorMessage(r)); + + return r; +} + +result +_IconListImpl::SetItemProvider(void) +{ + __pIconListItemProvider = new (std::nothrow) _IconListItemProvider(this); + SysTryReturnResult(NID_UI_CTRL, __pIconListItemProvider, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + return GetCore().SetItemProvider(*__pIconListItemProvider); +} + +result +_IconListImpl::SetNonSlidable(void) +{ + return GetCore().SetNonSlidableList(); +} + +result +_IconListImpl::SetListener(void) +{ + result r = E_SUCCESS; + r = GetCore().AddIconListItemEventListener(*this); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Failed to set IconListItemEvent listener", GetErrorMessage(r)); + + return r; +} + +void +_IconListImpl::AddItemEventListener(IItemEventListener& listener) +{ + _ListListener* pIconListListener = new (std::nothrow) _ListListener(); + SysTryReturnVoidResult(NID_UI_CTRL, pIconListListener, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pIconListListener->pListener = &listener; + + __iconListenersList.Add(*pIconListListener); +} + +void +_IconListImpl::RemoveItemEventListener(IItemEventListener& listener) +{ + _ListListener* pIconListListener = null; + + for (int listenerCount = 0; listenerCount < __iconListenersList.GetCount(); listenerCount++) + { + pIconListListener = dynamic_cast< _ListListener* >(__iconListenersList.GetAt(listenerCount)); + + if ((pIconListListener != null) && (pIconListListener->pListener == &listener)) + { + __iconListenersList.RemoveAt(listenerCount, true); + break; + } + } + +} + +void +_IconListImpl::SetBackgroundBitmap(const Bitmap& bitmap) +{ + result r = E_SUCCESS; + + r = GetCore().SetBackgroundBitmap(&bitmap); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] SetBackgroundBitmap failed."); +} + +result +_IconListImpl::SetMargin(int topMargin, int leftMargin) +{ + result r = E_SUCCESS; + + r = GetCore().SetMargin(MARGIN_TYPE_TOP, topMargin); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, "[%s] Failed to set Margin", GetErrorMessage(r)); + + r = GetCore().SetMargin(MARGIN_TYPE_LEFT, leftMargin); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, "[%s] Failed to set Margin", GetErrorMessage(r)); + + return r; +} + +int +_IconListImpl::GetTopMargin(void) const +{ + return GetCore().GetMargin(MARGIN_TYPE_TOP); +} + +int +_IconListImpl::GetLeftMargin(void) const +{ + return GetCore().GetMargin(MARGIN_TYPE_LEFT); +} + +result +_IconListImpl::AddItem(const String* pText, const Bitmap* pNormalBitmap, const Bitmap* pFocusedBitmap, int itemId) +{ + result r = E_SUCCESS; + + _IconListData* pIconListData = CreateIconListItemN(pText, pNormalBitmap, pFocusedBitmap, itemId); + SysTryReturnResult(NID_UI_CTRL, pIconListData, E_SYSTEM, "[E_SYSTEM] This Item instance is null."); + + r = __iconList.Add(*pIconListData); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Add failed."); + + r = GetCore().RefreshList(__iconList.GetCount() - 1, LIST_REFRESH_TYPE_ITEM_ADD); + SysTryReturnResult(NID_UI_CTRL, E_SUCCESS == r, E_SYSTEM, "[E_SYSTEM] Could not able to Add an Item."); + + return r; + +CATCH: + delete pIconListData; + pIconListData = null; + return E_SYSTEM; +} + +result +_IconListImpl::InsertItemAt(int index, const String* pText, const Bitmap* pNormalBitmap, const Bitmap* pFocusedBitmap, int itemId) +{ + result r = E_SUCCESS; + + SysTryReturnResult(NID_UI_CTRL, (index >= 0 && index <= __iconList.GetCount()), + E_SYSTEM, "[E_INVALID_ARG] Index passed is invalid"); + + if (index == __iconList.GetCount()) + { + return AddItem(pText, pNormalBitmap, pFocusedBitmap, itemId); + } + + _IconListData* pIconListData = CreateIconListItemN(pText, pNormalBitmap, pFocusedBitmap, itemId); + SysTryReturnResult(NID_UI_CTRL, pIconListData, E_SYSTEM, "[E_SYSTEM] This Item instance is null."); + + r = __iconList.InsertAt(*pIconListData, index); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] InsertAt failed."); + + r = GetCore().RefreshList(index, LIST_REFRESH_TYPE_ITEM_ADD); + SysTryReturnResult(NID_UI_CTRL, E_SUCCESS == r, E_SYSTEM, "[E_SYSTEM] Item could not be inserted into list."); + + return r; + +CATCH: + delete pIconListData; + pIconListData = null; + return E_SYSTEM; +} + +result +_IconListImpl::SetItemAt(int index, const String* pText, const Bitmap* pNormalBitmap, const Bitmap* pFocusedBitmap, int itemId) +{ + result r = E_SUCCESS; + + SysTryReturnResult(NID_UI_CTRL, (index >= 0 && index < __iconList.GetCount()), + E_SYSTEM, "[E_INVALID_ARG] The index should not be less than 0 and greater than ItemCount"); + + _IconListData* pIconListData = CreateIconListItemN(pText, pNormalBitmap, pFocusedBitmap, itemId); + SysTryReturnResult(NID_UI_CTRL, pIconListData, E_SYSTEM, "[E_SYSTEM] This Item instance is null."); + + r = __iconList.SetAt(*pIconListData, index, true); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] SetAt failed."); + + r = GetCore().RefreshList(index, LIST_REFRESH_TYPE_ITEM_MODIFY); + SysTryReturnResult(NID_UI_CTRL, E_SUCCESS == r, E_SYSTEM, "[E_SYSTEM] Item could not be modified."); + + return r; + +CATCH: + delete pIconListData; + pIconListData = null; + return E_SYSTEM; +} + +result +_IconListImpl::RemoveItemAt(int index) +{ + result r = E_SUCCESS; + + SysTryReturnResult(NID_UI_CTRL, (index >= 0 && index < __iconList.GetCount()), + E_SYSTEM, "[E_INVALID_ARG] Index passed is invalid"); + + __iconList.RemoveAt(index, true); + + r = GetCore().RefreshList(index, LIST_REFRESH_TYPE_ITEM_REMOVE); + SysTryReturnResult(NID_UI_CTRL, E_SUCCESS == r, E_SYSTEM, "[E_SYSTEM] Could not able to Remove an Item."); + + return r; +} + +result +_IconListImpl::RemoveAllItems(void) +{ + result r = E_SUCCESS; + result finalResult = E_SUCCESS; + + for (int index = __iconList.GetCount() - 1; index >= 0; index--) + { + r = RemoveItemAt(index); + if (r != E_SUCCESS) + { + finalResult = r; + SysLog(NID_UI_CTRL, "[E_SYSTEM] Item at %d index not removed successfully", index); + } + } + + return finalResult; +} + +int +_IconListImpl::GetColumnCount(void) const +{ + return GetCore().GetItemCountPerAxis(); +} + +int +_IconListImpl::GetItemCount(void) const +{ + return __iconList.GetCount(); +} + +result +_IconListImpl::SetItemChecked(int index, bool check) +{ + result r = E_SUCCESS; + + SysTryReturnResult(NID_UI_CTRL, (index >= 0 && index < __iconList.GetCount()), E_INVALID_ARG, "[E_INVALID_ARG] Index passed is invalid"); + SysTryReturnResult(NID_UI_CTRL, (__annexStyle != ICON_LIST_VIEW_STYLE_NORMAL), E_SYSTEM, "[E_SYSTEM] Invalid operation for ICON_LIST_VIEW_STYLE_NORMAL."); + + r = GetCore().SetItemChecked(index, check); + SysTryReturnResult(NID_UI_CTRL, E_SUCCESS == r, r, "SetItemChecked failed."); + + r = GetCore().RefreshList(index, LIST_REFRESH_TYPE_ITEM_MODIFY); + SysTryReturnResult(NID_UI_CTRL, E_SUCCESS == r, r, "[E_SYSTEM] Item Not removed SuccessFully."); + + return r; +} + +bool +_IconListImpl::IsItemChecked(int index) const +{ + SysTryReturn(NID_UI_CTRL, (__annexStyle != ICON_LIST_VIEW_STYLE_NORMAL), + false, E_SYSTEM, "[E_SYSTEM] list style should not be ICON_LIST_VIEW_STYLE_NORMAL."); + + SysTryReturnResult(NID_UI_CTRL, (index >= 0 && index < __iconList.GetCount()), + false, "[E_INVALID_ARG] Index passed is invalid"); + + return GetCore().IsItemChecked(index); +} + +result +_IconListImpl::SetAllItemsChecked(bool check) +{ + SysTryReturnResult(NID_UI_CTRL, (__annexStyle != ICON_LIST_VIEW_STYLE_RADIO && __annexStyle != ICON_LIST_VIEW_STYLE_NORMAL), + E_SYSTEM, "[E_SYSTEM] Invalid Operation."); + + result r = E_SUCCESS; + + for (int index = 0; index < __iconList.GetCount(); index++) + { + r = GetCore().SetItemChecked(index, check); + if (r != E_SUCCESS) + { + SysLog(NID_UI_CTRL, "[E_SYSTEM] Item Not checked Properly"); + } + GetCore().RefreshList(index, LIST_REFRESH_TYPE_ITEM_MODIFY); + } + + return r; +} + +result +_IconListImpl::RemoveAllCheckedItems(void) +{ + SysTryReturnResult(NID_UI_CTRL, (__annexStyle != ICON_LIST_VIEW_STYLE_RADIO && __annexStyle != ICON_LIST_VIEW_STYLE_NORMAL), + E_SYSTEM, "[E_SYSTEM] Invalid Operation."); + + result r = E_SUCCESS; + result finalResult = E_SUCCESS; + + for (int index = __iconList.GetCount() - 1; index >= 0 ; index--) + { + if (GetCore().IsItemChecked(index)) + { + r = RemoveItemAt(index); + if (r != E_SUCCESS) + { + finalResult = r; + SysLog(NID_UI_CTRL, "[E_SYSTEM] Item at %d index not removed successfully", index); + } + } + } + + return finalResult; +} + +int +_IconListImpl::GetFirstCheckedItemIndex(void) const +{ + const _Control& control = GetCore(); + _IconListView* pList = dynamic_cast< _IconListView* >(const_cast< _Control* >(&control)); + SysTryReturn(NID_UI_CTRL, (pList != null), INVALID_INDEX, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + SysTryReturn(NID_UI_CTRL, (__annexStyle != ICON_LIST_VIEW_STYLE_NORMAL), INVALID_INDEX, E_SYSTEM, "[E_SYSTEM] Invalid operation for ICON_LIST_VIEW_STYLE_NORMAL."); + + for (int index = 0; index < __iconList.GetCount(); index++) + { + if (GetCore().IsItemChecked(index)) + { + return index; + } + } + + return INVALID_INDEX; +} + +int +_IconListImpl::GetLastCheckedItemIndex(void) const +{ + const _Control& control = GetCore(); + _IconListView* pList = dynamic_cast< _IconListView* >(const_cast< _Control* >(&control)); + SysTryReturn(NID_UI_CTRL, (pList != null), INVALID_INDEX, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + SysTryReturn(NID_UI_CTRL, (__annexStyle != ICON_LIST_VIEW_STYLE_NORMAL), INVALID_INDEX, E_SYSTEM, "[E_SYSTEM] Invalid operation for ICON_LIST_VIEW_STYLE_NORMAL."); + + for (int index = __iconList.GetCount() - 1; index >= 0; index--) + { + if (GetCore().IsItemChecked(index)) + { + return index; + } + } + + return INVALID_INDEX; +} + +int +_IconListImpl::GetNextCheckedItemIndexAfter(int index) const +{ + const _Control& control = GetCore(); + _IconListView* pList = dynamic_cast< _IconListView* >(const_cast< _Control* >(&control)); + SysTryReturn(NID_UI_CTRL, (pList != null), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + SysTryReturn(NID_UI_CTRL, (index >= 0 && index < __iconList.GetCount()), INVALID_INDEX, INVALID_INDEX, "[INVALID_INDEX] Invalid index(%d)", index); + + SysTryReturn(NID_UI_CTRL, (__annexStyle != ICON_LIST_VIEW_STYLE_NORMAL), INVALID_INDEX, E_SYSTEM, "[E_SYSTEM] Invalid operation for ICON_LIST_VIEW_STYLE_NORMAL."); + + for (int i = index + 1; i < __iconList.GetCount(); i++) + { + if (GetCore().IsItemChecked(i)) + { + return i; + } + + } + + return INVALID_INDEX; +} + +int +_IconListImpl::GetItemIndexFromPosition(int x, int y) const +{ + SysTryReturn(NID_UI_CTRL, (x >= 0 && y >= 0), INVALID_INDEX, E_INVALID_ARG, "[E_INVALID_ARG] Invalid Co-ordinates"); + + return GetCore().GetItemIndexFromPosition(Point(x, y)); +} + +int +_IconListImpl::GetItemIndexFromPosition(const Point& position) const +{ + return GetCore().GetItemIndexFromPosition(position); +} + +void +_IconListImpl::SetTextHorizontalAlignment(HorizontalAlignment alignment) +{ + if (!(alignment >= ALIGNMENT_LEFT && alignment <= ALIGNMENT_RIGHT)) + { + SetLastResult(E_INVALID_ARG); + //SetLastLog("[E_INVALID_ARG] Cannot set text Horizontal align"); + return; + } + + GetCore().SetTextHorizontalAlignment(alignment); +} + +void +_IconListImpl::SetTextVerticalAlignment(VerticalAlignment alignment) +{ + if (!(alignment >= ALIGNMENT_TOP && alignment <= ALIGNMENT_BOTTOM)) + { + SetLastResult(E_INVALID_ARG); + //SetLastLog("[E_INVALID_ARG] Cannot set text vertical align"); + return; + } + + switch (alignment) + { + case ALIGNMENT_TOP: + { + GetCore().SetTextVerticalAlignment(ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_INSIDE_TOP); + } + break; + + case ALIGNMENT_MIDDLE: + { + GetCore().SetTextVerticalAlignment(ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_INSIDE_MIDDLE); + } + break; + + case ALIGNMENT_BOTTOM: + { + GetCore().SetTextVerticalAlignment(ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_INSIDE_BOTTOM); + } + break; + } +} + +HorizontalAlignment +_IconListImpl::GetTextHorizontalAlignment(void) const +{ + return GetCore().GetTextHorizontalAlignment(); + +} + +VerticalAlignment +_IconListImpl::GetTextVerticalAlignment(void) const +{ + switch (GetCore().GetTextVerticalAlignment()) + { + case ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_INSIDE_TOP: + { + return ALIGNMENT_TOP; + } + break; + + case ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_INSIDE_MIDDLE: + { + return ALIGNMENT_MIDDLE; + } + break; + + case ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_INSIDE_BOTTOM: + { + return ALIGNMENT_BOTTOM; + } + break; + + default: + { + return ALIGNMENT_TOP; + } + break; + } +} + +void +_IconListImpl::SetTextOfEmptyList(const String& text) +{ + GetCore().SetTextOfEmptyList(text); +} + +void +_IconListImpl::SetTextColorOfEmptyList(const Color& color) +{ + GetCore().SetTextColorOfEmptyList(color); +} + +Tizen::Graphics::Color +_IconListImpl::GetTextColorOfEmptyList(void) const +{ + return GetCore().GetTextColorOfEmptyList(); +} + +void +_IconListImpl::SetItemTextColor(const Color& textColor) +{ + GetCore().SetItemTextColor(ICON_LIST_VIEW_ITEM_DRAWING_STATUS_NORMAL, textColor); +} + +Tizen::Graphics::Color +_IconListImpl::GetItemTextColor(void) const +{ + return GetCore().GetItemTextColor(ICON_LIST_VIEW_ITEM_DRAWING_STATUS_NORMAL); +} + +void +_IconListImpl::SetTextSize(int size) +{ + GetCore().SetItemTextSize(size); +} + +int +_IconListImpl::GetTextSize(void) const +{ + return GetCore().GetItemTextSize(); +} + +int +_IconListImpl::GetItemIndexFromItemId(int itemId) const +{ + _IconListData* pIconListData = null; + + for (int index = 0; index < __iconList.GetCount(); index++) + { + pIconListData = dynamic_cast< _IconListData* >(const_cast< Object* >(__iconList.GetAt(index))); + if (pIconListData != null) + { + if (pIconListData->GetItemId() == itemId) + { + return index; + } + } + } + + return INVALID_INDEX; +} + +int +_IconListImpl::GetItemIdAt(int index) const +{ + SysTryReturn(NID_UI_CTRL, (index < __iconList.GetCount()), + INVALID_INDEX, E_INVALID_ARG, ("[E_INVALID_ARG] Index passed is invalid")); + + _IconListData* pIconListData = null; + pIconListData = dynamic_cast< _IconListData* >(const_cast< Object* >(__iconList.GetAt(index))); + if (pIconListData != null) + { + return pIconListData->GetItemId(); + } + + return INVALID_INDEX; +} + +void +_IconListImpl::SetCheckBoxPosition(IconListCheckBoxPosition position) +{ + SysTryReturnVoidResult(NID_UI_CTRL, (__annexStyle == ICON_LIST_VIEW_STYLE_RADIO || __annexStyle == ICON_LIST_VIEW_STYLE_MARK), + E_INVALID_OPERATION, "[E_INVALID_OPERATION] Can not set position of CheckBox."); + + if (!(position >= ICON_LIST_CHECK_BOX_POSITION_TOP_LEFT && position <= ICON_LIST_CHECK_BOX_POSITION_BOTTOM_RIGHT)) + { + SetLastResult(E_INVALID_ARG); + //SetLastLog("[E_INVALID_ARG] Cannot set text Horizontal align"); + return; + } + + switch (position) + { + case ICON_LIST_CHECK_BOX_POSITION_TOP_LEFT: + { + GetCore().SetCheckBoxPosition(ICON_LIST_VIEW_CHECK_BOX_POSITION_TOP_LEFT); + } + break; + + case ICON_LIST_CHECK_BOX_POSITION_TOP_RIGHT: + { + GetCore().SetCheckBoxPosition(ICON_LIST_VIEW_CHECK_BOX_POSITION_TOP_RIGHT); + } + break; + + case ICON_LIST_CHECK_BOX_POSITION_BOTTOM_LEFT: + { + GetCore().SetCheckBoxPosition(ICON_LIST_VIEW_CHECK_BOX_POSITION_BOTTOM_LEFT); + } + break; + + case ICON_LIST_CHECK_BOX_POSITION_BOTTOM_RIGHT: + { + GetCore().SetCheckBoxPosition(ICON_LIST_VIEW_CHECK_BOX_POSITION_BOTTOM_RIGHT); + } + break; + } +} + +IconListCheckBoxPosition +_IconListImpl::GetCheckBoxPosition(void) const +{ + switch (GetCore().GetCheckBoxPosition()) + { + case ICON_LIST_VIEW_CHECK_BOX_POSITION_TOP_LEFT: + { + return ICON_LIST_CHECK_BOX_POSITION_TOP_LEFT; + } + break; + + case ICON_LIST_VIEW_CHECK_BOX_POSITION_TOP_RIGHT: + { + return ICON_LIST_CHECK_BOX_POSITION_TOP_RIGHT; + } + break; + + case ICON_LIST_VIEW_CHECK_BOX_POSITION_BOTTOM_LEFT: + { + return ICON_LIST_CHECK_BOX_POSITION_BOTTOM_LEFT; + } + break; + + case ICON_LIST_VIEW_CHECK_BOX_POSITION_BOTTOM_RIGHT: + { + return ICON_LIST_CHECK_BOX_POSITION_BOTTOM_RIGHT; + } + break; + + default: + { + return ICON_LIST_CHECK_BOX_POSITION_TOP_RIGHT; + } + break; + } +} + +void +_IconListImpl::SetFocusAnimationEnabled(bool enable) +{ + GetCore().SetTouchAnimationEnabled(enable); +} + +void +_IconListImpl::ScrollToBottom(void) +{ + GetCore().ScrollToItem(__iconList.GetCount() - 1); +} + +void +_IconListImpl::ScrollToTop(void) +{ + GetCore().ScrollToItem(0); +} + +result +_IconListImpl::ScrollToTop(int itemIndex) +{ + SysTryReturnResult(NID_UI_CTRL, (itemIndex >= 0 && itemIndex < __iconList.GetCount()), E_INVALID_ARG, "[E_INVALID_ARG] Invalid index(%d)", itemIndex); + + return GetCore().ScrollToItem(itemIndex); +} + +result +_IconListImpl::RefreshItem(int index) +{ + SysTryReturnResult(NID_UI_CTRL, (index >= 0 && index < __iconList.GetCount()), E_INVALID_ARG, "[E_INVALID_ARG] Invalid index(%d)", index); + + return GetCore().RefreshList(index, LIST_REFRESH_TYPE_ITEM_MODIFY); +} + +void +_IconListImpl::OnIconListItemStateChanged(_IconListViewItemEventArg* pArg) +{ + SysTryReturnVoidResult(NID_UI_CTRL, (__iconListenersList.GetCount() > 0), E_SYSTEM, "[E_SYSTEM] No listeners added."); + int index = pArg->GetIndex(); + _IconListData* pIconListData = dynamic_cast< _IconListData* >(__iconList.GetAt(index)); + SysTryReturnVoidResult(NID_UI_CTRL, pIconListData != null, E_SYSTEM, "[E_SYSTEM] Failed to get IconListdata at %d index.", index); + + ItemStatus itemStatus = ITEM_HIGHLIGHTED; + + switch (pArg->GetStatus()) + { + case ICON_LIST_VIEW_ITEM_CHECKED: + { + itemStatus = ITEM_CHECKED; + } + break; + + case ICON_LIST_VIEW_ITEM_UNCHECKED: + { + itemStatus = ITEM_UNCHECKED; + } + break; + + case ICON_LIST_VIEW_ITEM_SELECTED: + { + itemStatus = ITEM_SELECTED; + } + break; + + case ICON_LIST_VIEW_ITEM_HIGHLIGHTED: + { + itemStatus = ITEM_HIGHLIGHTED; + } + break; + + default: + SysLog(NID_UI_CTRL, "IconListViewItemStatus is invalid."); + break; + } + + _ListListener* pIconListListener = null; + Tizen::Ui::IItemEventListener* pItemEventListener = null; + for (int listenerCount = 0; listenerCount < __iconListenersList.GetCount(); listenerCount++) + { + pIconListListener = dynamic_cast< _ListListener* >(__iconListenersList.GetAt(listenerCount)); + SysTryReturnVoidResult(NID_UI_CTRL, (pIconListListener != null), E_SYSTEM, "[E_SYSTEM] Failed to get ListListener"); + + pItemEventListener = dynamic_cast< IItemEventListener* >(pIconListListener->pListener); + SysTryReturnVoidResult(NID_UI_CTRL, (pItemEventListener != null), E_SYSTEM, "[E_SYSTEM] Failed to get EventListener"); + + pItemEventListener->OnItemStateChanged(GetPublic(), index, pIconListData->GetItemId(), itemStatus); + } + +} + +_IconListData* +_IconListImpl::CreateIconListItemN(const String* pText, const Bitmap* pNormalBitmap, const Bitmap* pFocusedBitmap, int itemId) +{ + SysTryReturn(NID_UI_CTRL, (pText != null), null, E_SYSTEM, "[E_SYSTEM] pText is null"); + + _IconListData* pIconListData = null; + pIconListData = new (std::nothrow) _IconListData(); + SysTryReturn(NID_UI_CTRL, pIconListData, null, E_SYSTEM, "[E_SYSTEM] This instance is not constructed."); + + pIconListData->SetLabelText(*pText); + pIconListData->SetItemId(itemId); + pIconListData->SetNormalBitmap(pNormalBitmap); + pIconListData->SetFocusedBitmap(pFocusedBitmap); + + return pIconListData; +} + + +class _IconListMaker + : public _UiBuilderControlMaker +{ +public: + _IconListMaker(_UiBuilder* uibuilder) + : _UiBuilderControlMaker(uibuilder){}; + virtual ~_IconListMaker(){}; + static _UiBuilderControlMaker* + GetInstance(_UiBuilder* uibuilder) + { + _IconListMaker* pIconListMaker = new (std::nothrow) _IconListMaker(uibuilder); + return pIconListMaker; + }; +protected: + virtual Control* + Make(_UiBuilderControl* pControl) + { + result r = E_SYSTEM; + _UiBuilderControlLayout* pControlProperty = null; + IconList* pIconList = null; + Rectangle rect; + Rectangle rectMin; + Dimension dimMin; + + IconListStyle style = ICON_LIST_STYLE_NORMAL; + Tizen::Base::String elementString; + int tempItemWidth = 0; + int tempItemHeight = 0; + + Color color; + + GetProperty(pControl, &pControlProperty); + if (pControlProperty == null) + { + return null; + } + + pIconList = new (std::nothrow) IconList(); + if (pIconList == null) + { + return null; + } + + rect = pControlProperty->GetRect(); + + if (pControl->GetElement(L"itemWidth", elementString)) + { + Base::Integer::Parse(elementString, tempItemWidth); + } + + if (pControl->GetElement(L"itemHeight", elementString)) + { + Base::Integer::Parse(elementString, tempItemHeight); + } + + if (tempItemHeight < 1) + { + tempItemHeight = rect.height >> 2; + } + if (tempItemWidth < 1) + { + tempItemWidth = rect.width >> 2; + } + + Tizen::Base::String styleString; + styleString = pControlProperty->GetStyle(); + + if (styleString.Equals(L"ICON_LIST_STYLE_NORMAL", false)) + { + style = ICON_LIST_STYLE_NORMAL; + } + else if (styleString.Equals(L"ICON_LIST_STYLE_RADIO", false)) + { + style = ICON_LIST_STYLE_RADIO; + } + else if (styleString.Equals(L"ICON_LIST_STYLE_MARK", false)) + { + style = ICON_LIST_STYLE_MARK; + } + + r = pIconList->Construct(rect, style, tempItemWidth, tempItemHeight); + if (r != E_SUCCESS) + { + delete pIconList; + pIconList = null; + return null; + } + + if (pControl->GetElement(L"textOfEmptyList", elementString)) + { + pIconList->SetTextOfEmptyList(elementString); + } + + if (pControl->GetElement(L"colorOfEmptyListText", elementString)) + { + ConvertStringToColor(elementString, color); + pIconList->SetTextColorOfEmptyList(color); + } + + return pIconList; + } +private: +}; + +_IconListRegister::_IconListRegister() +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->RegisterControl(L"IconList", _IconListMaker::GetInstance); +} +_IconListRegister::~_IconListRegister() +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->UnregisterControl(L"IconList"); +} +static _IconListRegister IconListRegisterToUiBuilder; +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_IconListItem.cpp b/src/ui/controls/FUiCtrl_IconListItem.cpp new file mode 100644 index 0000000..3b0f57c --- /dev/null +++ b/src/ui/controls/FUiCtrl_IconListItem.cpp @@ -0,0 +1,1159 @@ +// +// 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_IconListItem.cpp + * @brief This is the implementation file for the _IconListItem class. + */ + +//Includes +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_Math.h" +#include "FUiAnim_VisualElement.h" +#include "FUiCtrl_IconListItem.h" +#include "FUiCtrl_IconListItemDrawingProperty.h" +#include "FUiCtrl_IconListUtils.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Graphics::_Text; +using namespace Tizen::Ui::Animations; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_IconListItem::_IconListItem(_VisualElement* pBase) + : _ListItemCommon() + , __itemIndex(0) + , __text(L"") + , __pBase(pBase) + , __pTextVE(null) + , __pCheckVE(null) + , __pCheckBgVE(null) + , __pTouchAniVE(null) + , __pFocusVE(null) + , __pProperty(null) + , __foreDrawnState(LIST_ITEM_STATE_NORMAL) + , __isDrawn(false) + , __isAlradyDestory(false) + , __pTextObject(null) + , __pAccessibilityElement(null) +{ + __pBitmap[ICON_LIST_VIEW_ITEM_DRAWING_STATUS_NORMAL] = null; + __pBitmap[ICON_LIST_VIEW_ITEM_DRAWING_STATUS_PRESSED] = null; + __pBitmap[ICON_LIST_VIEW_ITEM_DRAWING_STATUS_HIGHLIGHTED] = null; +} + +_IconListItem::~_IconListItem(void) +{ + delete __pBitmap[ICON_LIST_VIEW_ITEM_DRAWING_STATUS_NORMAL]; + __pBitmap[ICON_LIST_VIEW_ITEM_DRAWING_STATUS_NORMAL] = null; + + delete __pBitmap[ICON_LIST_VIEW_ITEM_DRAWING_STATUS_PRESSED]; + __pBitmap[ICON_LIST_VIEW_ITEM_DRAWING_STATUS_PRESSED] = null; + + delete __pBitmap[ICON_LIST_VIEW_ITEM_DRAWING_STATUS_HIGHLIGHTED]; + __pBitmap[ICON_LIST_VIEW_ITEM_DRAWING_STATUS_HIGHLIGHTED] = null; + + __pProperty = null; + + delete __pTextObject; + __pTextObject = null; + + if (__pBase != null) + { + __pBase->RemoveAllAnimations(); + + for (int i = 0, n = __overlayBitmaps.size() ; i < n ; i++) + { + _OverlayBitmap* pOverlayBitmap = __overlayBitmaps.at(i); + delete pOverlayBitmap->pBitmap; + pOverlayBitmap->pBitmap = null; + + if (pOverlayBitmap->pVE != null) + { + __pBase->DetachChild(*(pOverlayBitmap->pVE)); + pOverlayBitmap->pVE->Destroy(); + pOverlayBitmap->pVE = null; + } + delete pOverlayBitmap; + } + + if (__pTextVE != null) + { + __pBase->DetachChild(*__pTextVE); + __pTextVE->Destroy(); + __pTextVE = null; + } + + if (__pCheckVE != null) + { + __pBase->DetachChild(*__pCheckVE); + __pCheckVE->Destroy(); + __pCheckVE = null; + } + + if (__pCheckBgVE != null) + { + __pBase->DetachChild(*__pCheckBgVE); + __pCheckBgVE->Destroy(); + __pCheckBgVE = null; + } + + if (__pTouchAniVE!= null) + { + __pBase->DetachChild(*__pTouchAniVE); + __pTouchAniVE->Destroy(); + __pTouchAniVE = null; + } + + if (__pFocusVE!= null) + { + __pBase->DetachChild(*__pFocusVE); + __pFocusVE->Destroy(); + __pFocusVE = null; + } + + VisualElement* pParent = __pBase->GetParent(); + if (pParent != null) + { + pParent->DetachChild(*__pBase); + } + __pBase->Destroy(); + __pBase = null; + } + + __isAlradyDestory = true; + __overlayBitmaps.clear(); + + if (__pAccessibilityElement != null) + { + if (__pAccessibilityElement->GetParent() != null) + { + __pAccessibilityElement->GetParent()->RemoveElement(*__pAccessibilityElement); + } + __pAccessibilityElement = null; + } +} + +_IconListItem* +_IconListItem::CreateIconListItemN(IconListViewItem* pIconListViewItem) +{ + result r = E_SUCCESS; + _IconListItem* pItem = null; + _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(); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + ClearLastResult(); + + pBase->SetSurfaceOpaque(false); + pBase->SetImplicitAnimationEnabled(false); + + pItem = new (std::nothrow) _IconListItem(pBase); + SysTryCatch(NID_UI_CTRL, pItem != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pItem->SetAppInfo(pIconListViewItem); + + return pItem; +CATCH: + pBase->Destroy(); + + return null; +} + +bool +_IconListItem::DrawItem(FloatRectangle& rect, ListItemState isFocused, int itemIndex, bool overwriteItemBG) +{ + SysAssertf(__pProperty != null, "Not yet initialized. SetDrawingProperty() should be called before use."); + + ClearLastResult(); + + if (!__pBase->GetShowState()) + { + __pBase->SetShowState(true); + } + + __pBase->SetBounds(rect); + + // Support Accessibility + if (__pProperty->IsAccessibilityEnabled()) + { + if (itemIndex != -1) + { + SetItemAccessibilityElement(rect, itemIndex); + } + } + + if (!__pProperty->IsChanged() && __isDrawn && __foreDrawnState == isFocused) + { + return true; + } + + Canvas* pCanvas = __pBase->GetCanvasN(FloatRectangle(0.0f, 0.0f, rect.width, rect.height)); + if (pCanvas == null) + { + return false; + } + + // Draw Background Color + IconListViewItemDrawingStatus status = _IconListUtils::EnumConverter::ConvertListItemStateToIconListViewItemDrawingStatus(isFocused); + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + + float margin = __pProperty->GetSelectBackgroundMargin(); + 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]; + if (pBitmap != null) + { + DrawBitmap(*pCanvas, *pBitmap); + } + + // Draw Text + DrawText(__pProperty->GetTextColor(status)); + + // Draw Check + if (__pProperty->IsItemCheckedStyle()) + { + DrawCheck(*pCanvas); + } + + // Draw Overlay Bitmap + if (__overlayBitmaps.size() > 0) + { + DrawOverlayBitmaps(); + } + + DrawBorder(*pCanvas, (status == ICON_LIST_VIEW_ITEM_DRAWING_STATUS_HIGHLIGHTED)); + + __pBase->SetFlushNeeded(); + __isDrawn = true; + __foreDrawnState = isFocused; + delete pCanvas; + + return true; +} + +result +_IconListItem::DrawItemTouchAnimation(FloatRectangle& rect, float ratio) +{ + SysAssertf(__pProperty != null, "Not yet initialized. SetDrawingProperty() should be called before use."); + + __pBase->SetBounds(rect); + + if (!__pBase->GetShowState()) + { + __pBase->SetShowState(true); + } + + Canvas* pCanvas = __pBase->GetCanvasN(FloatRectangle(0.0f, 0.0f, rect.width, rect.height)); + if (pCanvas == null) + { + result r = GetLastResult(); + SysLogException(NID_UI_CTRL, r, "[%s] Propagating.", GetErrorMessage(r)); + return r; + } + + pCanvas->SetBackgroundColor(__pProperty->GetBackgroundColor(ICON_LIST_VIEW_ITEM_DRAWING_STATUS_NORMAL)); + pCanvas->Clear(); + + // Draw Bitmap + Bitmap* pBitmap = __pBitmap[ICON_LIST_VIEW_ITEM_DRAWING_STATUS_NORMAL]; + if (pBitmap != null) + { + DrawBitmap(*pCanvas, *pBitmap, ratio); + } + + // Draw Text + DrawText(__pProperty->GetTextColor(ICON_LIST_VIEW_ITEM_DRAWING_STATUS_NORMAL)); + + // Draw Check + if (__pProperty->IsItemCheckedStyle()) + { + DrawCheck(*pCanvas); + } + + if (__overlayBitmaps.size() > 0) + { + DrawOverlayBitmaps(); + } + + __isDrawn = false; + delete pCanvas; + + return E_SUCCESS; +} + +result +_IconListItem::DrawItemCheckAnimation(FloatRectangle& rect, float ratio) +{ + SysAssertf(__pProperty != null, "Not yet initialized. SetDrawingProperty() should be called before use."); + + __pBase->SetBounds(rect); + + if (!__pBase->GetShowState()) + { + __pBase->SetShowState(true); + } + + Canvas* pCanvas = __pBase->GetCanvasN(FloatRectangle(0.0f, 0.0f, rect.width, rect.height)); + if (pCanvas == null) + { + result r = GetLastResult(); + SysLogException(NID_UI_CTRL, r, "[%s] Propagating.", GetErrorMessage(r)); + return r; + } + + pCanvas->SetBackgroundColor(__pProperty->GetBackgroundColor(ICON_LIST_VIEW_ITEM_DRAWING_STATUS_NORMAL)); + pCanvas->Clear(); + + // Draw Bitmap + Bitmap* pBitmap = __pBitmap[ICON_LIST_VIEW_ITEM_DRAWING_STATUS_NORMAL]; + if (pBitmap != null) + { + DrawBitmap(*pCanvas, *pBitmap); + } + + // Draw Text + DrawText(__pProperty->GetTextColor(ICON_LIST_VIEW_ITEM_DRAWING_STATUS_NORMAL)); + + // Draw Check + if (__pProperty->IsItemCheckedStyle()) + { + DrawCheck(*pCanvas, ratio); + } + + if (__overlayBitmaps.size() > 0) + { + DrawOverlayBitmaps(); + } + + __isDrawn = false; + delete pCanvas; + + return E_SUCCESS; +} + +result +_IconListItem::DrawBitmap(Canvas& canvas, Bitmap& bitmap, float ratio) +{ + FloatRectangle rect = __pProperty->GetItemBitmapBounds(); + float borderWidth = __pProperty->GetDropShadowBorderWidth(); + if (__pProperty->GetBorderStyle() == ICON_LIST_VIEW_ITEM_BORDER_STYLE_SHADOW || __pProperty->GetBorderStyle() == ICON_LIST_VIEW_ITEM_BORDER_STYLE_OUTLINE) + { + rect.x += CoordinateSystem::ConvertToLogicalX(1.0f); + rect.y += CoordinateSystem::ConvertToLogicalY(1.0f); + rect.width -= CoordinateSystem::ConvertToLogicalX(borderWidth); + rect.height -= CoordinateSystem::ConvertToLogicalY(borderWidth); + } + + float width = rect.width; + float height = rect.height; + + // Adjust Bitmap Ratio + if (__pProperty->IsItemBitmapAsAspectRatio()) + { + width = bitmap.GetWidthF() * rect.height / bitmap.GetHeightF(); + height = bitmap.GetHeightF() * rect.width / bitmap.GetWidthF(); + if (!_FloatCompareLE(width, rect.width)) + { + width = rect.width; + } + + if (!_FloatCompareLE(height, rect.height)) + { + height = rect.height; + } + } + + // Resize & Set Alpha by Ratio(ratio < 1.0f) + if (!_FloatCompareGE(ratio, REFERENCE_FACTOR)) + { + width = width * ratio; + height = height * ratio; + bitmap.SetAlphaConstant(OPAQUE_ALPHA * ratio); + } + + // Set bitmap bounds + rect.x += (rect.width - width) / 2.0f; + rect.y += (rect.height - height) / 2.0f; + rect.SetSize(width, height); + + if (__pTouchAniVE == null) + { + __pTouchAniVE = new (std::nothrow) _VisualElement(); + SysTryReturn(NID_UI_CTRL, __pTouchAniVE != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + result r = __pTouchAniVE->Construct(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pTouchAniVE->SetRedrawOnResizeEnabled(false); + __pTouchAniVE->SetImplicitAnimationEnabled(false); + __pBase->AttachChild(*__pTouchAniVE); + } + __pTouchAniVE->SetBounds(FloatRectangle(rect.x, rect.y, width, height)); + __pTouchAniVE->SetShowState(true); + + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(bitmap)) + { + Canvas* pCanvas = __pTouchAniVE->GetCanvasN(); + SysTryReturn(NID_UI_CTRL, pCanvas != null, GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + pCanvas->DrawNinePatchedBitmap(FloatRectangle(0.0f, 0.0f, bitmap.GetWidthF(), bitmap.GetHeightF()), bitmap); + delete pCanvas; + } + else + { + String imagePath = _BitmapImpl::GetInstance(bitmap)->GetFileName(); + + if (!imagePath.IsEmpty()) + { + __pTouchAniVE->SetImageSource(imagePath); + } + else + { + __pTouchAniVE->SetImageSource(L""); + Canvas* pCanvas = __pTouchAniVE->GetCanvasN(); + SysTryReturn(NID_UI_CTRL, pCanvas != null, GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + pCanvas->DrawBitmap(FloatRectangle(0.0f, 0.0f, width, height), bitmap); + delete pCanvas; + } + } + + if (!_FloatCompareGE(ratio, REFERENCE_FACTOR)) + { + bitmap.SetAlphaConstant(OPAQUE_ALPHA); + } + + return E_SUCCESS; +} + +result +_IconListItem::DrawText(const Color& color) +{ + if (__text.IsEmpty()) + { + return E_SUCCESS; + } + + if (__pTextObject == null) + { + __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); + SysTryReturnResult(NID_UI_CTRL, pSimpleText, E_OUT_OF_MEMORY, "Memory allocation failed."); + + __pTextObject->AppendElement(*pSimpleText); + + __pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); + } + + + switch (__pProperty->GetTextHorizontalAlignment()) + { + case ALIGNMENT_LEFT: + __pTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT); + break; + + case ALIGNMENT_CENTER: + __pTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_CENTER); + break; + + case ALIGNMENT_RIGHT: + __pTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_RIGHT); + break; + } + + __pTextObject->SetForegroundColor(color, 0, __pTextObject->GetTextLength()); + + Font* pFont = __pProperty->GetFont(); + SysTryReturn(NID_UI_CTRL, pFont != null, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred."); + + float textVerticalMargin = __pProperty->GetTextVerticalMargin(); + float width = __pProperty->GetTextAreaWidth(); + + __pTextObject->SetFont(pFont, 0, __pTextObject->GetTextLength()); + __pTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_WORD); + __pTextObject->SetBounds(FloatRectangle(0.0f, 0.0f, width, 1.0f)); + __pTextObject->Compose(); + + float height = __pTextObject->GetTotalHeightF(); + float leading = _FontImpl::GetInstance((*pFont))->GetLeadingF(); + float textYPos = __pProperty->GetTextYPosition(); + if (_FloatCompareGE(height, leading * 2)) + { + textYPos = __pProperty->GetTwoLineTextYPosition(); + height = (leading + textVerticalMargin) * 2; + } + else + { + height += (textVerticalMargin * 2); + } + + if (__pProperty->GetTextVerticalAlignment() == ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_INSIDE_BOTTOM) + { + FloatDimension itemSize = __pProperty->GetItemSize(); + textYPos = itemSize.height - height - 1; + } + + result r = GetLastResult(); + FloatRectangle bounds(0.0f, 0.0f, width, height); + Canvas* pCanvas = null; + + if (__pTextVE == null) + { + __pTextVE = new (std::nothrow) _VisualElement(); + SysTryReturn(NID_UI_CTRL, __pTextVE != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + result r = __pTextVE->Construct(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pTextVE->SetRedrawOnResizeEnabled(false); + __pTextVE->SetImplicitAnimationEnabled(false); + + __pBase->AttachChild(*__pTextVE); + } + + __pTextVE->SetBounds(FloatRectangle(__pProperty->GetTextXPosition(), textYPos, width, height)); + __pTextVE->SetShowState(true); + + pCanvas = __pTextVE->GetCanvasN(); + SysTryReturn(NID_UI_CTRL, pCanvas != null, GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + pCanvas->FillRectangle(__pProperty->GetTextBackgroundColor(), bounds); + + __pTextObject->SetBounds(bounds); + __pTextObject->Draw(*_CanvasImpl::GetInstance(*pCanvas)); + delete pCanvas; + + return E_SUCCESS; + +CATCH: + __pTextVE->Destroy(); + __pTextVE = null; + + return r; +} + +result +_IconListItem::DrawCheck(Canvas& canvas, float ratio) +{ + const Bitmap* pBackgroundBitmap = null; + const Bitmap* pBitmap = null; + pBitmap = IsChecked() ? __pProperty->GetCheckBitmap() : null; + pBackgroundBitmap = IsItemEnabled() ? (IsChecked() ? __pProperty->GetCheckedBackgroundBitmap() : __pProperty->GetUnCheckedBackgroundBitmap()) : __pProperty->GetDisabledCheckBitmap(); + + if (pBackgroundBitmap == null) + { + return E_SYSTEM; + } + + float width = pBackgroundBitmap->GetWidthF(); + float height = pBackgroundBitmap->GetHeightF(); + float checkMargin = __pProperty->GetCheckMargin(); + + FloatRectangle bitmapBounds = __pProperty->GetItemBitmapBounds(); + FloatPoint checkPosition(0.0f, 0.0f); + switch (__pProperty->GetCheckBoxPosition()) + { + case ICON_LIST_VIEW_CHECK_BOX_POSITION_TOP_LEFT: + checkPosition.x += checkMargin; + checkPosition.y += checkMargin; + break; + + case ICON_LIST_VIEW_CHECK_BOX_POSITION_TOP_RIGHT: + checkPosition.x += bitmapBounds.width - checkMargin - width; + checkPosition.y += checkMargin; + break; + + case ICON_LIST_VIEW_CHECK_BOX_POSITION_BOTTOM_LEFT: + checkPosition.x += checkMargin; + checkPosition.y += bitmapBounds.height - checkMargin - height; + break; + + case ICON_LIST_VIEW_CHECK_BOX_POSITION_BOTTOM_RIGHT: + checkPosition.x += bitmapBounds.width - checkMargin - width; + checkPosition.y += bitmapBounds.height - checkMargin - height; + break; + } + + if (__pCheckBgVE == null) + { + __pCheckBgVE = new (std::nothrow) _VisualElement(); + SysTryReturn(NID_UI_CTRL, __pCheckBgVE != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + result r = __pCheckBgVE->Construct(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pCheckBgVE->SetRedrawOnResizeEnabled(false); + __pCheckBgVE->SetImplicitAnimationEnabled(false); + __pBase->AttachChild(*__pCheckBgVE); + __pCheckBgVE->SetBounds(FloatRectangle(checkPosition.x, checkPosition.y, width, height)); + __pCheckBgVE->SetShowState(true); + } + + Canvas* pCheckBgCanvas = __pCheckBgVE->GetCanvasN(); + SysTryReturn(NID_UI_CTRL, pCheckBgCanvas != null, GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + pCheckBgCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCheckBgCanvas->Clear(); + + // draw background of check box + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pBackgroundBitmap)) + { + pCheckBgCanvas->DrawNinePatchedBitmap(FloatRectangle(0.0f, 0.0f, width, height), *pBackgroundBitmap); + } + else + { + pCheckBgCanvas->DrawBitmap(FloatRectangle(0.0f, 0.0f, width, height), *pBackgroundBitmap); + } + + // draw check image + if (__pCheckVE == null) + { + __pCheckVE = new (std::nothrow) _VisualElement(); + SysTryReturn(NID_UI_CTRL, __pCheckVE != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + result r = __pCheckVE->Construct(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pCheckVE->SetRedrawOnResizeEnabled(false); + __pCheckVE->SetImplicitAnimationEnabled(false); + __pBase->AttachChild(*__pCheckVE); + + __pCheckVE->SetBounds(FloatRectangle(checkPosition.x, checkPosition.y, width, height)); + __pCheckVE->SetShowState(true); + } + + Canvas* pCanvas = __pCheckVE->GetCanvasN(); + SysTryReturn(NID_UI_CTRL, pCanvas != null, GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + + if (pBitmap != null) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pBitmap)) + { + pCanvas->DrawNinePatchedBitmap(FloatRectangle(0.0f, 0.0f, pBitmap->GetWidthF(), pBitmap->GetHeightF()), *pBitmap); + } + else + { + pCanvas->DrawBitmap(FloatRectangle(0.0f, 0.0f, pBitmap->GetWidthF() * ratio, pBitmap->GetHeightF()), *pBitmap, FloatRectangle(0.0f, 0.0f, pBitmap->GetWidthF() * ratio, pBitmap->GetHeightF())); + } + } + + delete pCheckBgCanvas; + delete pCanvas; + + return E_SUCCESS; +} + +result +_IconListItem::DrawOverlayBitmaps(void) +{ + result r = E_SUCCESS; + FloatRectangle bitmapBounds = __pProperty->GetItemBitmapBounds(); + Canvas* pCanvas = null; + for (int i = 0, n = __overlayBitmaps.size(); i < n; i++) + { + _OverlayBitmap* pOverlayBitmap = __overlayBitmaps.at(i); + float overlayMargin = __pProperty->GetOverlayMargin(); + if (pOverlayBitmap->pBitmap != null) + { + FloatRectangle overlayBitmapBounds = GetOverlayBitmapBounds(pOverlayBitmap, bitmapBounds, overlayMargin); + + _VisualElement* pVE = null; + if (pOverlayBitmap->pVE == null) + { + pVE = new (std::nothrow) _VisualElement(); + SysTryReturn(NID_UI_CTRL, pVE != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = pVE->Construct(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + pVE->SetRedrawOnResizeEnabled(false); + pVE->SetImplicitAnimationEnabled(false); + + __pBase->AttachChild(*pVE); + pOverlayBitmap->pVE = pVE; + } + else + { + pVE = pOverlayBitmap->pVE; + } + + pVE->SetBounds(overlayBitmapBounds); + pVE->SetShowState(true); + + pCanvas = pVE->GetCanvasN(); + SysTryReturn(NID_UI_CTRL, pCanvas != null, GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + + overlayBitmapBounds.SetPosition(0.0f, 0.0f); + Bitmap* pBitmap = pOverlayBitmap->pBitmap; + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pBitmap)) + { + pCanvas->DrawNinePatchedBitmap(overlayBitmapBounds, *pBitmap); + } + else + { + pCanvas->DrawBitmap(overlayBitmapBounds, *pBitmap); + } + delete pCanvas; + } + } + return r; +} + +result +_IconListItem::DrawBorder(Tizen::Graphics::Canvas& canvas, bool isFocused) +{ + if (__pFocusVE == null) + { + __pFocusVE = new (std::nothrow) _VisualElement(); + SysTryReturn(NID_UI_CTRL, __pFocusVE != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + result r = __pFocusVE->Construct(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pFocusVE->SetRedrawOnResizeEnabled(false); + __pFocusVE->SetImplicitAnimationEnabled(false); + __pBase->AttachChild(*__pFocusVE); + + FloatRectangle focusUiBounds = __pProperty->GetItemBitmapBounds(); + __pFocusVE->SetBounds(FloatRectangle(focusUiBounds.x, focusUiBounds.y, focusUiBounds.width, focusUiBounds.height)); + } + + if (isFocused) + { + Canvas* pCanvas = __pFocusVE->GetCanvasN(); + SysTryReturn(NID_UI_CTRL, pCanvas != null, GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + + const Bitmap* pShadowBitmap = __pProperty->GetFocusBitmap(); + + if (pShadowBitmap != null) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pShadowBitmap)) + { + pCanvas->DrawNinePatchedBitmap(__pProperty->GetDropShadowBitmapBounds(), *pShadowBitmap); + } + else + { + pCanvas->DrawBitmap(__pProperty->GetDropShadowBitmapBounds(), *pShadowBitmap); + } + __pFocusVE->SetShowState(true); + } + delete pCanvas; + } + else + { + switch (__pProperty->GetBorderStyle()) + { + case ICON_LIST_VIEW_ITEM_BORDER_STYLE_NONE: + break; + + case ICON_LIST_VIEW_ITEM_BORDER_STYLE_OUTLINE: + { + // Draw Outline + canvas.SetForegroundColor(__pProperty->GetBorderColor(isFocused)); + canvas.SetLineWidth(1.0f); + FloatDimension dim = __pProperty->GetItemSize(); + canvas.DrawRectangle(FloatRectangle(0.0f, 0.0f, dim.width, dim.height)); + break; + } + + case ICON_LIST_VIEW_ITEM_BORDER_STYLE_SHADOW: + { + // Draw Drop-Shadow Effect + if (__pProperty->GetDropShadowBitmap() != null) + { + const Bitmap* pShadowBitmap = __pProperty->GetDropShadowBitmap(); + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pShadowBitmap)) + { + canvas.DrawNinePatchedBitmap(__pProperty->GetDropShadowBitmapBounds(), *pShadowBitmap); + } + else + { + canvas.DrawBitmap(__pProperty->GetDropShadowBitmapBounds(), *pShadowBitmap); + } + } + break; + } + } + __pFocusVE->SetShowState(false); + } + return E_SUCCESS; +} + +result +_IconListItem::SetText(const String* pText) +{ + if (pText == null) + { + __text = String(L""); + return E_SUCCESS; + } + + __text = *pText; + __isDrawn = false; + + return E_SUCCESS; +} + +const String& +_IconListItem::GetText(void) const +{ + return __text; +} + +result +_IconListItem::SetBitmap(IconListViewItemDrawingStatus status, const Bitmap* pBitmap) +{ + if (ICON_LIST_VIEW_ITEM_DRAWING_STATUS_NORMAL > status || ICON_LIST_VIEW_ITEM_DRAWING_STATUS_HIGHLIGHTED < status) + { + SysLogException(NID_UI_CTRL, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used."); + return E_INVALID_ARG; + } + + SysTryReturn(NID_UI_CTRL, (status != ICON_LIST_VIEW_ITEM_DRAWING_STATUS_NORMAL || pBitmap != null), E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. The normal bitmap must not be null."); + + result r = E_SUCCESS; + Bitmap* pCopiedBitmap = null; + if (pBitmap != null) + { + pCopiedBitmap = _BitmapImpl::CloneN(*pBitmap); + r = GetLastResult(); + } + + if (r == E_SUCCESS) + { + delete __pBitmap[status]; + __pBitmap[status] = pCopiedBitmap; + } + else + { + delete pCopiedBitmap; + } + + __isDrawn = false; + + return r; +} + +const Bitmap* +_IconListItem::GetBitmap(IconListViewItemDrawingStatus status) const +{ + SysTryReturn(NID_UI_CTRL, + (status > ICON_LIST_VIEW_ITEM_DRAWING_STATUS_NORMAL && status < ICON_LIST_VIEW_ITEM_DRAWING_STATUS_HIGHLIGHTED), + null, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used."); + + SetLastResult(E_SUCCESS); + return __pBitmap[status]; +} + +_VisualElement* +_IconListItem::GetVisualElement(void) const +{ + return __pBase; +} + +void +_IconListItem::ClearVisualElement(void) +{ + __isDrawn = false; +} + +result +_IconListItem::SetDrawingProperty(_IconListItemDrawingProperty& property) +{ + __pProperty = &property; + + return E_SUCCESS; +} + +void +_IconListItem::SetChecked(bool checked) +{ + if (IsChecked() == checked) + { + return; + } + + _ListItemCommon::SetChecked(checked); + __isDrawn = false; +} + +void +_IconListItem::SetItemIndex(int groupIndex, int itemIndex) +{ + __itemIndex = itemIndex; +} + +void +_IconListItem::GetItemIndex(int& groupIndex, int& itemIndex) const +{ + groupIndex = DEFAULT_GROUP_INDEX; + itemIndex = __itemIndex; +} + +result +_IconListItem::SetOverlayBitmap(int overlayBitmapId, const Bitmap* pOverlayBitmap, HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment) +{ + result r = E_SUCCESS; + + SysTryReturn(NID_UI_CTRL, horizontalAlignment >= ALIGNMENT_LEFT && horizontalAlignment <= ALIGNMENT_RIGHT, E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] The horizontal alignment is inappropriate."); + SysTryReturn(NID_UI_CTRL, verticalAlignment >= ALIGNMENT_TOP && verticalAlignment <= ALIGNMENT_BOTTOM, E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] The vertical alignment is inappropriate."); + + bool found = false; + Bitmap* pCopiedBitmap = null; + for (int i = 0, n = __overlayBitmaps.size() ; i < n; i++) + { + _OverlayBitmap* pCurrentOverlayBitmap = __overlayBitmaps.at(i); + if (pCurrentOverlayBitmap->horizontalAlignment == horizontalAlignment && pCurrentOverlayBitmap->verticalAlignment == verticalAlignment) + { + found = true; + if (pOverlayBitmap == null) + { + // delete overlay bitmap + delete pCurrentOverlayBitmap->pBitmap; + pCurrentOverlayBitmap->pBitmap = null; + + if (pCurrentOverlayBitmap->pVE != null) + { + pCurrentOverlayBitmap->pVE->Destroy(); + pCurrentOverlayBitmap->pVE = null; + } + __overlayBitmaps.erase(__overlayBitmaps.begin() + i); + delete pCurrentOverlayBitmap; + } + else + { + // replace overlay bitmap + pCopiedBitmap = null; + pCopiedBitmap = _BitmapImpl::CloneN(*pOverlayBitmap); + r = GetLastResult(); + + if (r == E_SUCCESS) + { + delete pCurrentOverlayBitmap->pBitmap; + pCurrentOverlayBitmap->pBitmap = pCopiedBitmap; + pCurrentOverlayBitmap->id = overlayBitmapId; + } + } + break; + } + } + + if (!found) + { + if (pOverlayBitmap != null) + { + // add overlay bitmap + pCopiedBitmap = null; + pCopiedBitmap = _BitmapImpl::CloneN(*pOverlayBitmap); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _OverlayBitmap* pNewOverlayBitmap = new (std::nothrow) _OverlayBitmap(); + pNewOverlayBitmap->id = overlayBitmapId; + pNewOverlayBitmap->pBitmap = pCopiedBitmap; + pNewOverlayBitmap->horizontalAlignment = horizontalAlignment; + pNewOverlayBitmap->verticalAlignment = verticalAlignment; + pNewOverlayBitmap->pVE = null; + + __overlayBitmaps.push_back(pNewOverlayBitmap); + } + } + + SetLastResult(r); + return r; +} + +int +_IconListItem::GetOverlayBitmapIdFromPosition(FloatPoint& position) const +{ + if (__overlayBitmaps.size() <= 0) + { + return -1; + } + + FloatRectangle bitmapBounds = __pProperty->GetItemBitmapBounds(); + for (int i = __overlayBitmaps.size() - 1; i >= 0; i--) + { + _OverlayBitmap* pOverlayBitmap = __overlayBitmaps.at(i); + if (pOverlayBitmap != null) + { + float overlayMargin = __pProperty->GetOverlayMargin(); + if (pOverlayBitmap->pBitmap != null) + { + FloatRectangle rect = GetOverlayBitmapBounds(pOverlayBitmap, bitmapBounds, overlayMargin); + if (rect.Contains(position)) + { + return pOverlayBitmap->id; + } + } + } + } + return -1; +} + +_VisualElement* +_IconListItem::GetItemVisualElement(void) const +{ + return __pBase; +} + +_AccessibilityElement* +_IconListItem::SetItemAccessibilityElement(FloatRectangle& rect, int itemIndex, const _AccessibilityElement& pElement, bool swapElement) +{ + if (__pAccessibilityElement == null) + { + __pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true); + SysTryReturn(NID_UI_CTRL, __pAccessibilityElement != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + __pAccessibilityElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_IMAGE"); + } + + if (itemIndex >= 0) + { + if (swapElement) + { + __pAccessibilityElement = const_cast<_AccessibilityElement*>(&pElement); + } + + __pAccessibilityElement->Activate(true); + if (IsChecked()) + { + __pAccessibilityElement->SetValueWithStringId("IDS_TPLATFORM_BODY_SELECTED_T_TTS"); + } + __pAccessibilityElement->SetName(L"IconListViewItem" + Integer::ToString(itemIndex + 1)); + __pAccessibilityElement->SetLabel(GetText()); + + if (__pAccessibilityElement->GetBounds() != rect) + { + __pAccessibilityElement->SetBounds(rect); + } + } + + return __pAccessibilityElement; +} + +_AccessibilityElement* +_IconListItem::GetItemAccessibilityElement(void) +{ + return __pAccessibilityElement; +} + +FloatRectangle +_IconListItem::GetOverlayBitmapBounds(_OverlayBitmap* pOverlayBitmap, const FloatRectangle& parentRect, float overlayMargin) const +{ + float x = parentRect.x; + float y = parentRect.y; + float width = pOverlayBitmap->pBitmap->GetWidthF(); + float height = pOverlayBitmap->pBitmap->GetHeightF(); + + switch (pOverlayBitmap->horizontalAlignment) + { + case ALIGNMENT_LEFT: + x += overlayMargin; + break; + case ALIGNMENT_CENTER: + x += (parentRect.width - width) / 2; + break; + case ALIGNMENT_RIGHT: + x += (parentRect.width - width - overlayMargin); + break; + } + + switch (pOverlayBitmap->verticalAlignment) + { + case ALIGNMENT_TOP: + y += overlayMargin; + break; + case ALIGNMENT_MIDDLE: + y += (parentRect.height - height) / 2; + break; + case ALIGNMENT_BOTTOM: + y += (parentRect.height - height - overlayMargin); + break; + } + + return FloatRectangle(x, y, width, height); +} + +bool +_IconListItem::IsDrawn(void) const +{ + return __isDrawn; +} + +Tizen::Ui::Animations::_VisualElement* +_IconListItem::GetSelectAniVisualElement(void) const +{ + return __pTouchAniVE; +} + +Tizen::Ui::Animations::_VisualElement* +_IconListItem::GetCheckAniVisualElement(void) const +{ + return __pCheckVE; +} + +Tizen::Ui::Animations::_VisualElement* +_IconListItem::GetCheckBGVisualElement(void) const +{ + return __pCheckBgVE; +} +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_IconListItemDrawingProperty.cpp b/src/ui/controls/FUiCtrl_IconListItemDrawingProperty.cpp new file mode 100644 index 0000000..3f5e9a3 --- /dev/null +++ b/src/ui/controls/FUiCtrl_IconListItemDrawingProperty.cpp @@ -0,0 +1,765 @@ +// +// 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_IconListItemDrawingProperty.cpp + * @brief This is the implementation file for the _IconListItemDrawingProperty class. + */ + +//Includes +#include +#include + +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_Math.h" +#include "FUi_ResourceManager.h" +#include "FUiCtrl_IconListItemDrawingProperty.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_IconListItemDrawingProperty::_IconListItemDrawingProperty(void) + : __textSize(0.0f) + , __pFont(null) + , __normalTextColor(0) + , __pressedTextColor(0) + , __highlightedTextColor(0) + , __size(0.0f, 0.0f) + , __bitmapBounds(0.0f, 0.0f, 0.0f, 0.0f) + , __pFocusBitmap(null) + , __pDropShadowBitmapWithReplacementColor(null) + , __dropShadowBorderWidth(0.0f) + , __dropShadowMargin(0.0f) + , __pCheckBitmap(null) + , __pCheckedBackgroundBitmap(null) + , __pUnCheckedBackgroundBitmap(null) + , __pDisabledCheckBitmap(null) + , __checkMargin(0.0f) + , __overlayMargin(0.0f) + , __pressedBackgroundColor(0) + , __normalBorderColor(0) + , __focusBorderColor(0) + , __inTextBackgroundColor(0) + , __textYPos(0.0f) + , __2LineTextYPos(0.0f) + , __checkBoxPosition(ICON_LIST_VIEW_CHECK_BOX_POSITION_TOP_RIGHT) + , __borderStyle(ICON_LIST_VIEW_ITEM_BORDER_STYLE_NONE) + , __textHorizontalAlignment(ALIGNMENT_CENTER) + , __textVerticalAlignment(ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_INSIDE_BOTTOM) + , __refCount(1) + , __changed(true) + , __asAspectRatio(true) + , __checkedStyle(false) + , __verticalExtent(0.0f) + , __insideOneLineTextHeight(0.0f) + , __insideTwoLineTextHeight(0.0f) + , __selectBackgroundMargin(0.0f) + , __itemTextHorizontalMargin(0.0f) + , __itemTextVerticalMargin(0.0f) + , __accessibilityEnabled(false) + , __customColorSet(false) +{ + // Do nothing +} + +_IconListItemDrawingProperty::~_IconListItemDrawingProperty(void) +{ + delete __pFocusBitmap; + __pFocusBitmap = null; + + delete __pDropShadowBitmapWithReplacementColor; + __pDropShadowBitmapWithReplacementColor = null; + + delete __pCheckBitmap; + __pCheckBitmap = null; + + delete __pCheckedBackgroundBitmap; + __pCheckedBackgroundBitmap = null; + + delete __pUnCheckedBackgroundBitmap; + __pUnCheckedBackgroundBitmap = null; + + delete __pDisabledCheckBitmap; + __pDisabledCheckBitmap = null; +} + +_IconListItemDrawingProperty* +_IconListItemDrawingProperty::CreateInstanceN(void) +{ + _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(); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + return pProperty; + +CATCH: + delete pProperty; + + return null; +} + +result +_IconListItemDrawingProperty::Initialize(void) +{ + result r = E_SUCCESS; + + // Load Drop Shadow Bitmap + GET_FIXED_VALUE_CONFIG(ICONLIST::DROP_SHADOW_BORDER, _CONTROL_ORIENTATION_PORTRAIT, __dropShadowBorderWidth); + GET_FIXED_VALUE_CONFIG(ICONLIST::DROP_SHADOW_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __dropShadowMargin); + + float width = 0.0f; + float height = 0.0f; + 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_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)); + + 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 + GET_FIXED_VALUE_CONFIG(ICONLIST::CHECKBOX_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __checkMargin); + + FloatDimension dimension(0.0f, 0.0f); + GET_DIMENSION_CONFIG(ICONLIST::CHECKBOX_SIZE, _CONTROL_ORIENTATION_PORTRAIT, dimension); + width = dimension.width; + height = dimension.height; + + if (!_FloatCompareLE(width, 0.0f) && !_FloatCompareLE(height, 0.0f)) + { + r = GET_BITMAP_CONFIG_N(ICONLIST::CHECK_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pCheckBitmap); + if (r != E_SUCCESS) + { + delete __pCheckBitmap; + __pCheckBitmap = null; + + SysLogException(NID_UI_CTRL, r, "[%s] Propagating.", GetErrorMessage(r)); + return r; + } + + r = GET_BITMAP_CONFIG_N(ICONLIST::CHECK_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pCheckedBackgroundBitmap); + if (r != E_SUCCESS) + { + delete __pCheckedBackgroundBitmap; + __pCheckedBackgroundBitmap = null; + + SysLogException(NID_UI_CTRL, r, "[%s] Propagating.", GetErrorMessage(r)); + return r; + } + + r = GET_BITMAP_CONFIG_N(ICONLIST::CHECK_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pUnCheckedBackgroundBitmap); + if (r != E_SUCCESS) + { + delete __pUnCheckedBackgroundBitmap; + __pUnCheckedBackgroundBitmap = null; + + SysLogException(NID_UI_CTRL, r, "[%s] Propagating.", GetErrorMessage(r)); + return r; + } + } + + // Load overlay bitmap margin + GET_FIXED_VALUE_CONFIG(ICONLIST::OVERLAY_ICON_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __overlayMargin); + + // Load item press state background color + GET_COLOR_CONFIG(ICONLIST::ITEM_BG_PRESSED, __pressedBackgroundColor); + __pressedBackgroundColor.SetAlpha(0x80); + + // Load Item Text Size & color + GET_SHAPE_CONFIG(ICONLIST::FONT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, __textSize); + GET_COLOR_CONFIG(ICONLIST::INNER_TEXT_BG_NORMAL, __inTextBackgroundColor); + __inTextBackgroundColor.SetAlpha(0x80); + + // Load Item text height + GET_SHAPE_CONFIG(ICONLIST::VERTICAL_EXTENT, _CONTROL_ORIENTATION_PORTRAIT, __verticalExtent); + GET_SHAPE_CONFIG(ICONLIST::INSIDE_ONE_LINE_TEXT_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, __insideOneLineTextHeight); + GET_SHAPE_CONFIG(ICONLIST::INSIDE_TWO_LINE_TEXT_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, __insideTwoLineTextHeight); + + // Load item margin + GET_FIXED_VALUE_CONFIG(ICONLIST::SELECT_BG_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __selectBackgroundMargin); + GET_FIXED_VALUE_CONFIG(ICONLIST::TEXT_HORIZONTAL_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __itemTextHorizontalMargin); + GET_FIXED_VALUE_CONFIG(ICONLIST::TEXT_VERTICAL_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __itemTextVerticalMargin); + + return r; +} + +const Color +_IconListItemDrawingProperty::GetBackgroundColor(IconListViewItemDrawingStatus status) const +{ + SysTryReturn(NID_UI_CTRL, + (status >= ICON_LIST_VIEW_ITEM_DRAWING_STATUS_NORMAL && status <= ICON_LIST_VIEW_ITEM_DRAWING_STATUS_HIGHLIGHTED), + Color(0), E_INVALID_ARG, "[E_INVALID_ARG] Invalid value of drawing status is used."); + + ClearLastResult(); + if (status == ICON_LIST_VIEW_ITEM_DRAWING_STATUS_PRESSED) + { + return __pressedBackgroundColor; + } + return Color(0, 0, 0, 0); +} + +result +_IconListItemDrawingProperty::SetTextSize(float size) +{ + float minSize = 0.0f; + GET_FIXED_VALUE_CONFIG(ICONLIST::MINIMUM_FONT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, minSize); + SysTryReturn(NID_UI_CTRL, _FloatCompareGE(size, minSize), E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] Invalid argument is used. Font size should be greater than or equal to the minimum size."); + + if (!_FloatCompare(__textSize, size)) + { + __textSize = size; + } + + return E_SUCCESS; +} + +float +_IconListItemDrawingProperty::GetTextSize(void) const +{ + ClearLastResult(); + return __textSize; +} + +result +_IconListItemDrawingProperty::SetFont(Font* pFont) +{ + SysTryReturn(NID_UI_CTRL, pFont != null, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used."); + + if (pFont == __pFont) + { + return E_SUCCESS; + } + + __pFont = pFont; + + float oldVerticalExtent = __verticalExtent; + float textSize = 0.0f; + GET_SHAPE_CONFIG(ICONLIST::FONT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, textSize); + + if (!_FloatCompare(__textSize, textSize)) + { + int leading = _FontImpl::GetInstance(*__pFont)->GetLeading(); + __insideOneLineTextHeight = leading + __itemTextVerticalMargin * 2.0f; + __insideTwoLineTextHeight = (leading * 2.0f) + __itemTextVerticalMargin * 2.0f; + __verticalExtent = __insideTwoLineTextHeight; + } + else + { + GET_SHAPE_CONFIG(ICONLIST::VERTICAL_EXTENT, _CONTROL_ORIENTATION_PORTRAIT, __verticalExtent); + GET_SHAPE_CONFIG(ICONLIST::INSIDE_ONE_LINE_TEXT_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, __insideOneLineTextHeight); + GET_SHAPE_CONFIG(ICONLIST::INSIDE_TWO_LINE_TEXT_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, __insideTwoLineTextHeight); + } + + if (__textVerticalAlignment >= ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_OUTSIDE_TOP) + { + __size.height -= oldVerticalExtent; + __size.height = __size.height + __insideTwoLineTextHeight; + } + + __changed = true; + + // Adjust layout of Item. + return SetItemLayout(); +} + +Font* +_IconListItemDrawingProperty::GetFont(void) const +{ + return __pFont; +} + +result +_IconListItemDrawingProperty::SetTextColor(IconListViewItemDrawingStatus status, const Color color) +{ + SysTryReturn(NID_UI_CTRL, + (status >= ICON_LIST_VIEW_ITEM_DRAWING_STATUS_NORMAL && status <= ICON_LIST_VIEW_ITEM_DRAWING_STATUS_HIGHLIGHTED), + E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Invalid value of drawing status."); + + if (status == ICON_LIST_VIEW_ITEM_DRAWING_STATUS_NORMAL) + { + __normalTextColor = color; + } + else if (status == ICON_LIST_VIEW_ITEM_DRAWING_STATUS_PRESSED) + { + __pressedTextColor = color; + } + else + { + __highlightedTextColor = color; + } + + __changed = true; + __customColorSet = true; + return E_SUCCESS; +} + +const Color +_IconListItemDrawingProperty::GetTextColor(IconListViewItemDrawingStatus status) const +{ + SysTryReturn(NID_UI_CTRL, + (status >= ICON_LIST_VIEW_ITEM_DRAWING_STATUS_NORMAL && status <= ICON_LIST_VIEW_ITEM_DRAWING_STATUS_HIGHLIGHTED), + Color(0), E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Invalid value of drawing status."); + + ClearLastResult(); + + if (status == ICON_LIST_VIEW_ITEM_DRAWING_STATUS_NORMAL) + { + return __normalTextColor; + } + else if (status == ICON_LIST_VIEW_ITEM_DRAWING_STATUS_PRESSED) + { + return __pressedTextColor; + } + else + { + return __highlightedTextColor; + } +} + +const Color +_IconListItemDrawingProperty::GetTextBackgroundColor(void) const +{ + if (__textVerticalAlignment >= ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_OUTSIDE_TOP) + { + return Color(0, 0, 0, 0); + } + return __inTextBackgroundColor; +} + +const Color +_IconListItemDrawingProperty::GetBorderColor(bool isFocused) const +{ + return isFocused ? __focusBorderColor : __normalBorderColor; +} + +result +_IconListItemDrawingProperty::SetItemLayout(void) +{ + SysTryReturn(NID_UI_CTRL, + (__textVerticalAlignment >= ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_INSIDE_TOP && __textVerticalAlignment <= + ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_OUTSIDE_BOTTOM), E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has been occurred. The current state of vertical text alignment is not valid."); + + switch (__textVerticalAlignment) + { + case ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_INSIDE_TOP: + __textYPos = 1.0f; + __2LineTextYPos = __textYPos; + break; + + case ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_INSIDE_MIDDLE: + __textYPos = (__size.height - __insideOneLineTextHeight) / 2.0f ; + __2LineTextYPos = (__size.height - __insideTwoLineTextHeight) / 2.0f; + break; + + case ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_INSIDE_BOTTOM: + __textYPos = __size.height - __insideOneLineTextHeight - 2.0f; + __2LineTextYPos = __size.height - __insideTwoLineTextHeight - 2.0f; + break; + + case ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_OUTSIDE_TOP: + __textYPos = __insideOneLineTextHeight - __itemTextVerticalMargin; + __2LineTextYPos = 1.0f; + break; + + case ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_OUTSIDE_BOTTOM: + __textYPos = __size.height - __verticalExtent; + __2LineTextYPos = __textYPos; + break; + } + + if (!__customColorSet) + { + if (__textVerticalAlignment >= ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_INSIDE_TOP && __textVerticalAlignment <= ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_INSIDE_BOTTOM) + { + GET_COLOR_CONFIG(ICONLIST::INNER_TEXT_NORMAL, __normalTextColor); + GET_COLOR_CONFIG(ICONLIST::INNER_TEXT_PRESSED, __pressedTextColor); + GET_COLOR_CONFIG(ICONLIST::INNER_TEXT_HIGHLIGHTED, __highlightedTextColor); + } + else if (__textVerticalAlignment >= ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_OUTSIDE_TOP && __textVerticalAlignment <= ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_OUTSIDE_BOTTOM) + { + GET_COLOR_CONFIG(ICONLIST::TEXT_NORMAL, __normalTextColor); + GET_COLOR_CONFIG(ICONLIST::TEXT_PRESSED, __pressedTextColor); + GET_COLOR_CONFIG(ICONLIST::TEXT_HIGHLIGHTED, __highlightedTextColor); + } + } + + __changed = true; + + return E_SUCCESS; +} + +result +_IconListItemDrawingProperty::SetItemBitmapBounds(const FloatRectangle bounds) +{ + SysTryReturn(NID_UI_CTRL, _FloatCompareGE(bounds.x, 0.0f) && _FloatCompareGE(bounds.y, 0.0f), E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] Invalid argument is used. X and Y must be a non-negative value."); + SysTryReturn(NID_UI_CTRL, _FloatCompareGE(bounds.width, 0.0f) && _FloatCompareGE(bounds.height, 0.0f), E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. Width and height should be larger than 0.0f."); + + __bitmapBounds = bounds; + __size.width = bounds.width; + __size.height = bounds.height; + + if (__textVerticalAlignment >= ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_OUTSIDE_TOP) + { + __size.height += __insideTwoLineTextHeight; + } + + return SetItemLayout(); +} + +FloatRectangle +_IconListItemDrawingProperty::GetItemBitmapBounds(void) const +{ + ClearLastResult(); + + FloatRectangle bounds(__bitmapBounds); + if (__textVerticalAlignment == ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_OUTSIDE_TOP) + { + bounds.y += __verticalExtent; + } + + return bounds; +} + +FloatDimension +_IconListItemDrawingProperty::GetItemBitmapSize(void) const +{ + ClearLastResult(); + return FloatDimension(__bitmapBounds.width, __bitmapBounds.height); +} + +result +_IconListItemDrawingProperty::SetItemSize(const FloatDimension size) +{ + SysTryReturn(NID_UI_CTRL, !_FloatCompareLE(size.width, 0.0f) && !_FloatCompareLE(size.height, 0.0f), E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. Width and height should be larger than 0."); + + __size = size; + return E_SUCCESS; +} + +FloatDimension +_IconListItemDrawingProperty::GetItemSize(void) const +{ + ClearLastResult(); + return __size; +} + +float +_IconListItemDrawingProperty::GetTextXPosition(void) const +{ + return __itemTextHorizontalMargin; +} + +float +_IconListItemDrawingProperty::GetTextYPosition(void) const +{ + return __textYPos; +} + +float +_IconListItemDrawingProperty::GetTwoLineTextYPosition(void) const +{ + return __2LineTextYPos; +} + +float +_IconListItemDrawingProperty::GetTextAreaWidth(void) const +{ + return __bitmapBounds.width - __itemTextHorizontalMargin * 2.0f; +} + +float +_IconListItemDrawingProperty::GetTextVerticalMargin(void) const +{ + return __itemTextVerticalMargin; +} + +result +_IconListItemDrawingProperty::SetCheckBoxPosition(IconListViewCheckBoxPosition position) +{ + SysTryReturn(NID_UI_CTRL, + (position >= ICON_LIST_VIEW_CHECK_BOX_POSITION_TOP_LEFT && position <= ICON_LIST_VIEW_CHECK_BOX_POSITION_BOTTOM_RIGHT), + E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Invalid position of CheckBox is used."); + + if (__checkBoxPosition == position) + { + return E_SUCCESS; + } + + __checkBoxPosition = position; + __changed = true; + + return E_SUCCESS; +} + +IconListViewCheckBoxPosition +_IconListItemDrawingProperty::GetCheckBoxPosition(void) const +{ + return __checkBoxPosition; +} + +result +_IconListItemDrawingProperty::SetBorderStyle(IconListViewItemBorderStyle style) +{ + SysTryReturn(NID_UI_CTRL, (style >= ICON_LIST_VIEW_ITEM_BORDER_STYLE_NONE && style <= ICON_LIST_VIEW_ITEM_BORDER_STYLE_SHADOW), + E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Invalid item border style is used."); + + if (__borderStyle == style) + { + return E_SUCCESS; + } + + __borderStyle = style; + __changed = true; + + return E_SUCCESS; +} + +IconListViewItemBorderStyle +_IconListItemDrawingProperty::GetBorderStyle(void) const +{ + ClearLastResult(); + return __borderStyle; +} + +result +_IconListItemDrawingProperty::SetTextHorizontalAlignment(HorizontalAlignment alignment) +{ + SysTryReturn(NID_UI_CTRL, (alignment >= ALIGNMENT_LEFT && alignment <= ALIGNMENT_RIGHT), E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has been occurred. Invalid horizontal text alignment is used."); + + if (__textHorizontalAlignment == alignment) + { + return E_SUCCESS; + } + + __textHorizontalAlignment = alignment; + __changed = true; + + return E_SUCCESS; +} + +HorizontalAlignment +_IconListItemDrawingProperty::GetTextHorizontalAlignment(void) const +{ + return __textHorizontalAlignment; +} + +result +_IconListItemDrawingProperty::SetTextVerticalAlignment(IconListViewItemTextVerticalAlignment alignment) +{ + SysTryReturn(NID_UI_CTRL, (alignment >= ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_INSIDE_TOP && alignment <= + ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_OUTSIDE_BOTTOM), E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has been occurred. Invalid vertical text alignment is used."); + + if (__textVerticalAlignment == alignment) + { + return E_SUCCESS; + } + + if (alignment >= ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_OUTSIDE_TOP && + __textVerticalAlignment < ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_OUTSIDE_TOP) + { + __size.height = __size.height + __verticalExtent; + } + else if (alignment < ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_OUTSIDE_TOP && + __textVerticalAlignment >= ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_OUTSIDE_TOP) + { + __size.height -= __verticalExtent; + } + + __textVerticalAlignment = alignment; + __changed = true; + + // Adjust layout of Item. + return SetItemLayout(); +} + +IconListViewItemTextVerticalAlignment +_IconListItemDrawingProperty::GetTextVerticalAlignment(void) const +{ + return __textVerticalAlignment; +} + +const Bitmap* +_IconListItemDrawingProperty::GetDropShadowBitmap(void) const +{ + return __pDropShadowBitmapWithReplacementColor; +} + +const Bitmap* +_IconListItemDrawingProperty::GetFocusBitmap(void) const +{ + return __pFocusBitmap; +} + +float +_IconListItemDrawingProperty::GetDropShadowBorderWidth(void) const +{ + return __dropShadowBorderWidth; +} + +float +_IconListItemDrawingProperty::GetDropShadowMargin(void) const +{ + return __dropShadowMargin; +} + +FloatRectangle +_IconListItemDrawingProperty::GetDropShadowBitmapBounds(void) const +{ + FloatRectangle bounds(__bitmapBounds); + if (__textVerticalAlignment == ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_OUTSIDE_TOP) + { + bounds.y += __verticalExtent; + } + + return bounds; +} + +const Bitmap* +_IconListItemDrawingProperty::GetCheckBitmap(void) const +{ + return __pCheckBitmap; +} + +const Bitmap* +_IconListItemDrawingProperty::GetCheckedBackgroundBitmap(void) const +{ + return __pCheckedBackgroundBitmap; +} + +const Bitmap* +_IconListItemDrawingProperty::GetUnCheckedBackgroundBitmap(void) const +{ + return __pUnCheckedBackgroundBitmap; +} + +const Bitmap* +_IconListItemDrawingProperty::GetDisabledCheckBitmap(void) const +{ + return __pDisabledCheckBitmap; +} + +void +_IconListItemDrawingProperty::SetItemCheckedStyle(bool checkStyle) +{ + __checkedStyle = checkStyle; +} + +bool +_IconListItemDrawingProperty::IsItemCheckedStyle(void) const +{ + return __checkedStyle; +} + +float +_IconListItemDrawingProperty::GetCheckMargin(void) const +{ + return __checkMargin; +} + +float +_IconListItemDrawingProperty::GetOverlayMargin(void) const +{ + return __overlayMargin; +} + +float +_IconListItemDrawingProperty::GetSelectBackgroundMargin(void) const +{ + return __selectBackgroundMargin; +} + +void +_IconListItemDrawingProperty::SetDrawingFlag(void) +{ + __changed = false; +} + +bool +_IconListItemDrawingProperty::IsChanged(void) const +{ + return __changed; +} + +int +_IconListItemDrawingProperty::AddRef(void) +{ + return ++__refCount; +} + +int +_IconListItemDrawingProperty::Release(void) +{ + --__refCount; + if (__refCount <= 0) + { + delete this; + return 0; + } + + return __refCount; +} + +void +_IconListItemDrawingProperty::SetItemBitmapAsAspectRatio(bool isAspect) +{ + __asAspectRatio = isAspect; +} + +bool +_IconListItemDrawingProperty::IsItemBitmapAsAspectRatio(void) const +{ + return __asAspectRatio; +} + +void +_IconListItemDrawingProperty::SetAccessibilityEnabled(bool enabled) +{ + if (__accessibilityEnabled != enabled) + { + __accessibilityEnabled = enabled; + __changed = true; + } +} + +bool +_IconListItemDrawingProperty::IsAccessibilityEnabled(void) +{ + return __accessibilityEnabled; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_IconListItemProvider.cpp b/src/ui/controls/FUiCtrl_IconListItemProvider.cpp new file mode 100644 index 0000000..14a4fd3 --- /dev/null +++ b/src/ui/controls/FUiCtrl_IconListItemProvider.cpp @@ -0,0 +1,95 @@ +// +// 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. +// + +#include +#include +#include +#include "FUiCtrl_IconListItemProvider.h" +#include "FUiCtrl_IconListImpl.h" +#include "FUiCtrl_IconListData.h" + +using namespace Tizen::Base; +using namespace Tizen::Ui; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_IconListItemProvider::_IconListItemProvider(_IconListImpl* pIconList) + : __pIconListImpl(pIconList) +{ +} + +_IconListItemProvider::~_IconListItemProvider(void) +{ +} + +int +_IconListItemProvider::GetItemCount(void) +{ + if (__pIconListImpl) + { + return __pIconListImpl->__iconList.GetCount(); + } + + return 0; +} + +IconListViewItem* +_IconListItemProvider::CreateItem(int index) +{ + _IconListData* pIconListData = null; + pIconListData = dynamic_cast< _IconListData* >(__pIconListImpl->__iconList.GetAt(index)); + + if (pIconListData) + { + IconListViewItem* pIconListViewItem = null; + pIconListViewItem = new (std::nothrow) IconListViewItem(); + SysTryReturn(NID_UI_CTRL, pIconListViewItem, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + String labelText = pIconListData->GetLabelText(); + const Bitmap* pNormalBitmap = pIconListData->GetNormalBitmap(); + const Bitmap* pFocusedBitmap = pIconListData->GetFocusedBitmap(); + + if (pNormalBitmap != null && pFocusedBitmap != null) + { + pIconListViewItem->Construct(*pNormalBitmap, &labelText, pFocusedBitmap); + } + else if (pNormalBitmap != null) + { + pIconListViewItem->Construct(*pNormalBitmap, &labelText); + } + else + { + delete pIconListViewItem; + pIconListViewItem = null; + return null; + } + + return pIconListViewItem; + } + + return null; +} + +bool +_IconListItemProvider::DeleteItem(int index, Tizen::Ui::Controls::IconListViewItem* pItem) +{ + return false; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_IconListItemProviderAdaptor.cpp b/src/ui/controls/FUiCtrl_IconListItemProviderAdaptor.cpp new file mode 100644 index 0000000..ba3975b --- /dev/null +++ b/src/ui/controls/FUiCtrl_IconListItemProviderAdaptor.cpp @@ -0,0 +1,270 @@ +// +// 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_IconListItemProviderAdaptor.cpp + * @brief This is the implementation file for the _IconListItemProviderAdaptor class. + */ + +//Includes +#include +#include +#include + +#include "FUiAnim_VisualElement.h" +#include "FUiCtrl_IconListItem.h" +#include "FUiCtrl_IconListItemProviderAdaptor.h" +#include "FUiCtrl_IconListViewItemImpl.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Animations; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_IconListItemProviderAdaptor::_IconListItemProviderAdaptor(void) + : __pItemProvider(null) + , __pBlankItem(null) + , __pRoot(null) +{ + // Do nothing +} + +_IconListItemProviderAdaptor::~_IconListItemProviderAdaptor(void) +{ + __pItemProvider = null; + + delete __pBlankItem; + __pBlankItem = null; + + __pRoot = null; +} + +// Operation +_IListItemCommon* +_IconListItemProviderAdaptor::GetBlankItem(void) const +{ + if (__pBlankItem == null) + { + // Create Default Blank Item. + _IconListItem* pBlankItem = _IconListItem::CreateIconListItemN(null); + SysTryReturn(NID_UI_CTRL, (pBlankItem != null), null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + const_cast<_IconListItemProviderAdaptor*>(this)->__pBlankItem = pBlankItem; + } + + return __pBlankItem; +} + +// Accessor +void +_IconListItemProviderAdaptor::SetItemProvider(void* pProvider) +{ + IIconListViewItemProvider* pItemProvider = static_cast(pProvider); + if (pItemProvider != null) + { + __pItemProvider = pItemProvider; + } +} + +IIconListViewItemProvider* +_IconListItemProviderAdaptor::GetItemProvider(void) const +{ + return __pItemProvider; +} + +_IListItemCommon* +_IconListItemProviderAdaptor::LoadItem(int groupIndex, int itemIndex) +{ + // Argument Check + SysTryReturn(NID_UI_CTRL, (groupIndex == DEFAULT_GROUP_INDEX), null, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] Index of group must be 0."); + SysTryReturn(NID_UI_CTRL, (itemIndex >= GROUP_TITLE_INDEX), null, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Index must be a non-negative integer."); + + SysAssertf(__pItemProvider != null, "Not yet initialized. SetItemProvider() should be called before use."); + + ClearLastResult(); + // Return Group Item + if (itemIndex == GROUP_TITLE_INDEX) + { + return GetBlankItem(); + } + + // Valid Check + _IconListItem* pIconListItem = null; + IconListViewItem* pItem = __pItemProvider->CreateItem(itemIndex); + SysTryCatch(NID_UI_CTRL, (pItem != null), , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Can't get new item."); + SysTryCatch(NID_UI_CTRL, (pItem->__pImpl != null), , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Can't get new item."); + + pIconListItem = pItem->__pImpl->__pIconListItem; + SysTryCatch(NID_UI_CTRL, (pIconListItem != null), , E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Can't get new item."); + + pIconListItem->ClearVisualElement(); + pIconListItem->AddRef(); + + // Attach _VisualElement + if (__pRoot != null) + { + _VisualElement* pBase = pIconListItem->GetVisualElement(); + if (pBase != null) + { + __pRoot->AttachChild(*pBase); + pBase->SetShowState(false); + pBase->SetClipToParent(true); + } + } + + return pIconListItem; + +CATCH: + if (pItem != null) + { + if (!__pItemProvider->DeleteItem(itemIndex, pItem)) + { + delete pItem; + } + } + + return GetBlankItem(); +} + +result +_IconListItemProviderAdaptor::UnloadItem(_IListItemCommon* pListItem, int groupIndex, int itemIndex) +{ + // Argument Check + SysTryReturn(NID_UI_CTRL, (pListItem != null), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. Item must not be null."); + SysTryReturn(NID_UI_CTRL, (groupIndex == DEFAULT_GROUP_INDEX), E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] Index of group must be 0."); + SysTryReturn(NID_UI_CTRL, (itemIndex >= GROUP_TITLE_INDEX), E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Index must be a non-negative integer."); + + // Group Item + if (itemIndex == GROUP_TITLE_INDEX) + { + return E_SUCCESS; + } + + // Is the Blank Item? + if (pListItem == GetBlankItem()) + { + return E_SUCCESS; + } + + _IconListItem* pIconListItem = dynamic_cast<_IconListItem*>(pListItem); + if (pIconListItem != null) + { + _VisualElement* pBase = pIconListItem->GetVisualElement(); + if (pBase != null) + { + pBase->SetShowState(false); + pIconListItem->ClearVisualElement(); + __pRoot->DetachChild(*pBase); + } + } + + IconListViewItem* pItem = static_cast(pIconListItem->GetAppInfo()); + pIconListItem->Release(); + if (pItem == null) + { + return E_SUCCESS; + } + + SysAssertf(__pItemProvider != null, "Not yet initialized. SetItemProvider() should be called before use."); + + if (!__pItemProvider->DeleteItem(itemIndex, pItem)) + { + delete pItem; + } + + return E_SUCCESS; +} + +result +_IconListItemProviderAdaptor::DeleteItem(_IListItemCommon* pListItem, int groupIndex, int itemIndex) +{ + // Argument Check + SysTryReturn(NID_UI_CTRL, (pListItem != null), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. Item must not be null."); + SysTryReturn(NID_UI_CTRL, (groupIndex == DEFAULT_GROUP_INDEX), E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] Index of group must be 0."); + SysTryReturn(NID_UI_CTRL, (itemIndex >= GROUP_TITLE_INDEX), E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Index must be a non-negative integer."); + + // Group Item + if (itemIndex == GROUP_TITLE_INDEX) + { + return E_SUCCESS; + } + + // Is the Blank Item? + if (pListItem == GetBlankItem()) + { + return E_SUCCESS; + } + + _IconListItem* pIconListItem = dynamic_cast <_IconListItem*>(pListItem); + if (pIconListItem != null) + { + _VisualElement* pBase = pIconListItem->GetVisualElement(); + if (pBase != null) + { + pBase->SetShowState(false); + pIconListItem->ClearVisualElement(); + __pRoot->DetachChild(*pBase); + } + } + + IconListViewItem* pItem = static_cast (pIconListItem->GetAppInfo()); + pIconListItem->Release(); + if (pItem != null) + { + delete pItem; + } + + return E_SUCCESS; +} + +int +_IconListItemProviderAdaptor::GetItemCount(int groupIndex) const +{ + // Argument Check + SysTryReturn(NID_UI_CTRL, (groupIndex == DEFAULT_GROUP_INDEX), -1, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] Index of group must be 0."); + + SysAssertf(__pItemProvider != null, "Not yet initialized. SetItemProvider() should be called before use."); + + ClearLastResult(); + + int itemCount = __pItemProvider->GetItemCount(); + return (itemCount < 0) ? 0 : itemCount; +} + +int +_IconListItemProviderAdaptor::GetGroupCount(void) const +{ + return DEFAULT_GROUP_COUNT; +} + +void +_IconListItemProviderAdaptor::SetVisualElement(Tizen::Ui::Animations::_VisualElement* pRoot) +{ + SysTryReturnVoidResult(NID_UI_CTRL, (pRoot != null), E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used."); + + ClearLastResult(); + + __pRoot = pRoot; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_IconListPresenter.cpp b/src/ui/controls/FUiCtrl_IconListPresenter.cpp new file mode 100644 index 0000000..8d1d683 --- /dev/null +++ b/src/ui/controls/FUiCtrl_IconListPresenter.cpp @@ -0,0 +1,5507 @@ +// +// 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_IconListPresenter.cpp + * @brief This is the implementation file for the _IconListPresenter class. + */ + +//Includes +#include +#include +#include +#include +#include +#include +#include + +#include "FUi_AccessibilityElement.h" +#include "FUi_AccessibilityManager.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_Math.h" +#include "FUi_ResourceManager.h" +#include "FUi_UiTouchEvent.h" +#include "FUiAnim_VisualElement.h" +#include "FUiCtrl_IconListItem.h" +#include "FUiCtrl_IconListItemDrawingProperty.h" +#include "FUiCtrl_IconListItemProviderAdaptor.h" +#include "FUiCtrl_IconListPresenter.h" +#include "FUiCtrl_IconListView.h" +#include "FUiCtrl_IconListViewItemEvent.h" +#include "FUiCtrl_ListViewModel.h" +#include "FUiCtrl_Scroll.h" +#include "FUiCtrl_UiIconListItemEvent.h" +#include "FUiCtrl_UiScrollEvent.h" +#include "FUiCtrl_UiScrollEventArg.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Base::Utility; +using namespace Tizen::Graphics; +using namespace Tizen::Graphics::_Text; +using namespace Tizen::Ui::Animations; + +namespace { +const int SCROLL_PANEL_FIXED_FLICK_AMOUNT = 1000; +} + +namespace Tizen { namespace Ui { namespace Controls +{ +const float _IconListPresenter::REORDER_SCROLL_ANIMATION_DISTANCE = 10.0f; + +_IconListPresenter::_IconListPresenter(_IconListView* pIconListView, _ListViewModel* pListModel) + : __pListModel(pListModel) + , __pIconListView(pIconListView) + , __pItemProviderAdaptor(null) + , __backgroundColor(0) + , __currentTouchInfo() + , __selectedOverlayBitmapId(-1) + , __selectedIndex(INVALID_INDEX) + , __checkedIndex(INVALID_INDEX) + , __previousIndex(INVALID_INDEX) + , __previousCheckIndex(INVALID_INDEX) + , __highlightedIndex(INVALID_INDEX) + , __firstDrawnIndex(INVALID_INDEX) + , __lastDrawnIndex(INVALID_INDEX) + , __firstDrawnItemFullyDrawn(false) + , __lastDrawnItemFullyDrawn(false) + , __scrollDirection(ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL) + , __topMargin(0.0f) + , __bottomMargin(0.0f) + , __leftMargin(0.0f) + , __rightMargin(0.0f) + , __horizontalSpacing(0.0f) + , __verticalSpacing(0.0f) + , __magneticScrollSize(0) + , __itemCountPerAxis(0) + , __itemHorizontalAlignment(ALIGNMENT_LEFT) + , __itemVerticalAlignment(ALIGNMENT_TOP) + , __scrollPosition(0.0f) + , __unitScrollLength(0.0f) + , __scrollLength(0.0f) + , __unitLengthOfAxis(0.0f) + , __startPosOfAxis(0.0f) + , __endPosOfAxis(0.0f) + , __checkedRadioIndex(INVALID_INDEX) + , __isItemChecked(false) + , __pItemDrawingProperty(null) + , __pTouchActionTimer(null) + , __pMagneticScrollTimer(null) + , __pAnimationTimer(null) + , __pRunningAnimationCheckTimer(null) + , __pFirstShowScrollTimer(null) + , __magneticScrollAnimation() + , __isTouchAnimationEnabled(true) + , __previousTouchAnimatinEnabled(true) + , __isLayoutChanged(true) + , __isTouchPressed(false) + , __onDrawing(false) + , __requireNextDrawing(false) + , __alreadyDrawn(false) + , __enableCustomItemProviderAdaptor(false) + , __listStatusChanged(false) + , __needBaseCanvas(false) + , __isSelectionDelayed(false) + , __isCheckAnimationRunning(false) + , __isSelectAnimationRunning(false) + , __pPreviousAnimationVE(null) + , __pRemoveItemVE(null) + , __pEmptyListVE(null) + , __pVE(null) + , __pSelectAnimationVE(null) + , __pCheckAnimationVE(null) + , __pPreviousSelectAnimationVE(null) + , __pPreviousCheckAnimationVE(null) + , __onReordering(false) + , __reorderFromIndex(INVALID_INDEX) + , __reorderToIndex(INVALID_INDEX) + , __lastReorderedPosition(-1.0f, -1.0f) + , __lastReorderedDifferences(0.0f, 0.0f) + , __reorderItemBounds(0.0f, 0.0f, 0.0f, 0.0f) + , __pReorderScrollTimer(null) + , __reorderScrollAnimationDistance(0.0f) + , __scrollPositionBeforeScrollAnimation(0.0f) + , __flickRunning(false) + , __animationItemIndex(INVALID_INDEX) + , __previousAnimationItemIndex(INVALID_INDEX) + , __addTransactionId(0) + , __removeTransactionId(0) + , __moveTransactionId(0) + , __firstTouchMove(true) + , __firstTouchMoveDirection(ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL) + , __RequestToDrawAccessibilityFocusUi(false) + , __runningAnimationBackupIndex(INVALID_INDEX) + , __lazyDecodeBackGroundBitmap(false) + , __lazyDecodeEmptyListBitmap(false) + , __needSetAccessibility(false) +{ +} + +_IconListPresenter::~_IconListPresenter(void) +{ + Dispose(); +} + +_IconListPresenter* +_IconListPresenter::CreateInstanceN(_IconListView& pIconListView) +{ + _IconListPresenter* pIconListPresenter = null; + _IconListItemDrawingProperty* pItemDrawingProperty = null; + + // Create _ListModel + _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 + pIconListPresenter = new (std::nothrow) _IconListPresenter(&pIconListView, pListModel); + SysTryCatch(NID_UI_CTRL, (pIconListPresenter != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + // Create _IconListItemDrawingProperty + pItemDrawingProperty = _IconListItemDrawingProperty::CreateInstanceN(); + SysTryCatch(NID_UI_CTRL, (pItemDrawingProperty != null), , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + pIconListPresenter->__pItemDrawingProperty = pItemDrawingProperty; + + // Initialize _IconListPresenter + pIconListPresenter->Initialize(); + + return pIconListPresenter; + +CATCH: + delete pListModel; + delete pIconListPresenter; + + return null; +} + +result +_IconListPresenter::Dispose(void) +{ + StopAllAnimations(); + + delete __pListModel; + __pListModel = null; + + delete __pItemProviderAdaptor; + __pItemProviderAdaptor = null; + + __pIconListView = null; + + delete __pItemDrawingProperty; + __pItemDrawingProperty = null; + + delete __pTouchActionTimer; + __pTouchActionTimer = null; + + delete __pMagneticScrollTimer; + __pMagneticScrollTimer = null; + + delete __pReorderScrollTimer; + __pReorderScrollTimer = null; + + delete __pAnimationTimer; + __pAnimationTimer = null; + + delete __pRunningAnimationCheckTimer; + __pRunningAnimationCheckTimer = null; + + delete __pFirstShowScrollTimer; + __pFirstShowScrollTimer = null; + + if (__pRemoveItemVE != null) + { + __pRemoveItemVE->Destroy(); + __pRemoveItemVE = null; + } + + if (__pEmptyListVE != null) + { + __pEmptyListVE->Destroy(); + __pEmptyListVE = null; + } + + return E_SUCCESS; +} + +result +_IconListPresenter::Initialize(void) +{ + SetItemBorderStyle(ICON_LIST_VIEW_ITEM_BORDER_STYLE_NONE); + SetTextHorizontalAlignment(ALIGNMENT_CENTER); + SetTextVerticalAlignment(ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_INSIDE_BOTTOM); + SetItemBitmapAsAspectRatio(true); + SetCheckBoxPosition(ICON_LIST_VIEW_CHECK_BOX_POSITION_TOP_RIGHT); + + __pVE = __pIconListView->GetVisualElement(); + __pVE->SetClipChildrenEnabled(true); + __pVE->SetSurfaceOpaque(false); + + // Support Accessibility + if (_AccessibilityManager::IsActivated()) + { + __pIconListView->GetAccessibilityContainer()->AddListener(*this); + __pItemDrawingProperty->SetAccessibilityEnabled(true); + } + + return E_SUCCESS; +} + +result +_IconListPresenter::InitializeFont(void) +{ + Font* pFont = __pIconListView->GetFallbackFont(); + SysTryReturn(NID_UI_CTRL, (pFont != null), GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + return __pItemDrawingProperty->SetFont(pFont); +} + +result +_IconListPresenter::SetItemProvider(const IIconListViewItemProvider& provider) +{ + _IconListItemProviderAdaptor* pAdaptor = static_cast <_IconListItemProviderAdaptor*>(__pListModel->GetItemProviderAdaptor()); + + if (pAdaptor == null) + { + RegisterItemProviderAdaptor(null); + pAdaptor = dynamic_cast <_IconListItemProviderAdaptor*>(__pItemProviderAdaptor); + SysTryReturn(NID_UI_CTRL, (pAdaptor != null), E_SYSTEM, E_SYSTEM, "[ESYSTEM] A system error has been occurred."); + } + else + { + IIconListViewItemProvider* pProvider = pAdaptor->GetItemProvider(); + if (&provider == pProvider) + { + return E_SUCCESS; + } + // Remove All Items + __pListModel->RemoveAllItem(); + } + + // Set Item Provider + pAdaptor->SetItemProvider(const_cast (&provider)); + + __isLayoutChanged = true; + __scrollPosition = 0.0f; + + AdjustLayout(); + InitializeFont(); + + return E_SUCCESS; +} + +result +_IconListPresenter::RegisterItemProviderAdaptor(_IListItemProviderAdaptor* pItemProviderAdaptor) +{ + // Remove All Items + __pListModel->RemoveAllItem(); + __selectedIndex = INVALID_INDEX; + __highlightedIndex = INVALID_INDEX; + __isLayoutChanged = true; + __alreadyDrawn = false; + + _IconListItemProviderAdaptor* pAdaptor = null; + bool enableCustomItemProviderAdaptor = true; + if (pItemProviderAdaptor == null) + { + // Create Default _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."); + + pAdaptor->SetVisualElement(__pIconListView->GetVisualElement()); + enableCustomItemProviderAdaptor = false; + pItemProviderAdaptor = pAdaptor; + } + + // Set _IconListItemProviderAdaptor + __pItemProviderAdaptor = null; + result r = __pListModel->RegisterItemProviderAdaptor(pItemProviderAdaptor); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + if (enableCustomItemProviderAdaptor) + { + __pListModel->AddGroup(0, __pIconListView->GetStyle() == ICON_LIST_VIEW_STYLE_RADIO); + } + + __pItemProviderAdaptor = pItemProviderAdaptor; + __enableCustomItemProviderAdaptor = enableCustomItemProviderAdaptor; + + return E_SUCCESS; + +CATCH: + delete pAdaptor; + + return r; +} + +result +_IconListPresenter::SetScrollDirection(IconListViewScrollDirection scrollDirection) +{ + SysTryReturn(NID_UI_CTRL, + (scrollDirection >= ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL && scrollDirection <= ICON_LIST_VIEW_SCROLL_DIRECTION_HORIZONTAL), + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid scrollDirection is used."); + + _ControlOrientation orientation = __pIconListView->GetOrientation(); + float scrollBarWidth = 0.0f; + GET_SHAPE_CONFIG(ICONLIST::TOP_MARGIN, orientation, __topMargin); + GET_SHAPE_CONFIG(ICONLIST::BOTTOM_MARGIN, orientation, __bottomMargin); + GET_SHAPE_CONFIG(ICONLIST::LEFT_MARGIN, orientation, __leftMargin); + GET_SHAPE_CONFIG(ICONLIST::RIGHT_MARGIN, orientation, __rightMargin); + GET_SHAPE_CONFIG(ICONLIST::HORIZONTAL_SPACING, orientation, __horizontalSpacing); + GET_SHAPE_CONFIG(ICONLIST::VERTICAL_SPACING, orientation, __verticalSpacing); + + __scrollDirection = scrollDirection; + FloatRectangle bounds = __pIconListView->GetBoundsF(); + if (scrollDirection == ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL) + { + GET_SHAPE_CONFIG(SCROLL::VERTICAL_THUMB_MIN_WIDTH, orientation, scrollBarWidth); + SetItemLayoutHorizontalAlignment(ALIGNMENT_CENTER); + __pIconListView->SetScroll(FloatRectangle(bounds.width - scrollBarWidth, 0.0f, scrollBarWidth, bounds.height), + SCROLL_DIRECTION_VERTICAL); + } + else + { + GET_SHAPE_CONFIG(SCROLL::HORIZONTAL_THUMB_MIN_WIDTH, orientation, scrollBarWidth); + SetItemLayoutVerticalAlignment(ALIGNMENT_MIDDLE); + __pIconListView->SetScroll(FloatRectangle(0.0f, bounds.height - scrollBarWidth, bounds.width, scrollBarWidth), + SCROLL_DIRECTION_HORIZONTAL); + } + + return E_SUCCESS; +} + +result +_IconListPresenter::SetMargin(MarginType type, float value) +{ + SysTryReturn(NID_UI_CTRL, _FloatCompareGE(value, 0.0f), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. The value must be non-negative value."); + + switch (type) + { + case MARGIN_TYPE_TOP: + if (!_FloatCompare(__topMargin, value)) + { + __topMargin = value; + AdjustLayout(); + } + break; + + case MARGIN_TYPE_BOTTOM: + if (!_FloatCompare(__bottomMargin, value)) + { + __bottomMargin = value; + AdjustLayout(); + } + break; + + case MARGIN_TYPE_LEFT: + if (!_FloatCompare(__leftMargin, value)) + { + __leftMargin = value; + AdjustLayout(); + } + break; + + case MARGIN_TYPE_RIGHT: + if (!_FloatCompare(__rightMargin, value)) + { + __rightMargin = value; + AdjustLayout(); + } + break; + + default: + SysLogException(NID_UI_CTRL, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used."); + return E_INVALID_ARG; + } + return E_SUCCESS; +} + +float +_IconListPresenter::GetMargin(MarginType type) const +{ + ClearLastResult(); + switch (type) + { + case MARGIN_TYPE_TOP: + return __topMargin; + + case MARGIN_TYPE_BOTTOM: + return __bottomMargin; + + case MARGIN_TYPE_LEFT: + return __leftMargin; + + case MARGIN_TYPE_RIGHT: + return __rightMargin; + + default: + SysLogException(NID_UI_CTRL, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used."); + return -1.0f; + } +} + +result +_IconListPresenter::SetItemSpacing(float horizontalSpacing, float verticalSpacing) +{ + SysTryReturn(NID_UI_CTRL, _FloatCompareGE(horizontalSpacing, 0.0f) && _FloatCompareGE(verticalSpacing, 0.0f), E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] Invalid argument is used. The value must be non-negative value."); + + if (!_FloatCompare(__horizontalSpacing, horizontalSpacing)) + { + __horizontalSpacing = horizontalSpacing; + __isLayoutChanged = true; + } + + if (!_FloatCompare(__verticalSpacing, verticalSpacing)) + { + __verticalSpacing = verticalSpacing; + __isLayoutChanged = true; + } + + if (__isLayoutChanged) + { + AdjustLayout(); + } + + return E_SUCCESS; +} + +float +_IconListPresenter::GetItemHorizontalSpacing(void) const +{ + ClearLastResult(); + return __horizontalSpacing; +} + +float +_IconListPresenter::GetItemVerticalSpacing(void) const +{ + ClearLastResult(); + return __verticalSpacing; +} + +void +_IconListPresenter::SetUseCheckedStyle(bool checkedStyle) +{ + __pItemDrawingProperty->SetItemCheckedStyle(checkedStyle); +} + +result +_IconListPresenter::SetItemChecked(int index, bool check) +{ + if (__pListModel->GetAllGroupCount() == 0) + { + SysTryReturn(NID_UI_CTRL, (__pItemProviderAdaptor != null), E_INVALID_STATE, E_INVALID_STATE, + "[E_INVALID_STATE] This instance isn't constructed."); + + int itemCount = __pItemProviderAdaptor->GetItemCount(); + if (itemCount < 0) + { + itemCount = 0; + } + + SysTryReturn(NID_UI_CTRL, (index >= 0 && index < itemCount), E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Index must be non-negative integer, and less count of whole items."); + + // Add Group + result r = __pListModel->AddGroup(itemCount, __pIconListView->GetStyle() == ICON_LIST_VIEW_STYLE_RADIO); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + SysTryReturn(NID_UI_CTRL, (index >= 0 && index < __pListModel->GetItemCountInGroup(DEFAULT_GROUP_INDEX)), E_OUT_OF_RANGE, + E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] Index must be non-negative integer, and less count of whole items."); + } + + return __pListModel->SetItemChecked(DEFAULT_GROUP_INDEX, index, check); +} + +bool +_IconListPresenter::IsItemChecked(int index) const +{ + ClearLastResult(); + return __pListModel->IsItemChecked(DEFAULT_GROUP_INDEX, index); +} + +int +_IconListPresenter::GetItemIndexFromPosition(float x, float y) const +{ + ClearLastResult(); + if (_FloatCompareLE(__unitLengthOfAxis, 0.0f) || _FloatCompareLE(__unitScrollLength, 0.0f)) + { + return -1; + } + + ClearLastResult(); + + int row = 0; + int col = 0; + int modX = 0; + int modY = 0; + int index = -1; + + if (__scrollDirection == ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL) + { + x -= __startPosOfAxis; + if (!_FloatCompareGE(x, 0.0f)) + { + return -1; + } + + col = static_cast (x / __unitLengthOfAxis); + if (col >= __itemCountPerAxis) + { + return -1; + } + + modX = x - (static_cast (x / __unitLengthOfAxis) * __unitLengthOfAxis); + if (_FloatCompareGE(modX, GetItemSize().width)) + { + return -1; + } + + y += __scrollPosition - __topMargin; + if (!_FloatCompareGE(y, 0.0f)) + { + return -1; + } + + modY = y - (static_cast (y / __unitScrollLength) * __unitScrollLength); + if (_FloatCompareGE(modY, GetItemSize().height)) + { + return -1; + } + + row = static_cast (y / __unitScrollLength); + index = row * __itemCountPerAxis + col; + if (index >= __pListModel->GetItemCountInGroup(DEFAULT_GROUP_INDEX)) + { + return -1; + } + } + else + { + y -= __startPosOfAxis; + if (!_FloatCompareGE(y, 0.0f)) + { + return -1; + } + + row = static_cast (y / __unitLengthOfAxis); + if (row >= __itemCountPerAxis) + { + return -1; + } + + modY = y - (static_cast (y / __unitLengthOfAxis) * __unitLengthOfAxis); + if (_FloatCompareGE(modY, GetItemSize().height)) + { + return -1; + } + + x += __scrollPosition - __leftMargin; + if (!_FloatCompareGE(x, 0.0f)) + { + return -1; + } + + modX = x - (static_cast (x / __unitScrollLength) * __unitScrollLength); + if (_FloatCompareGE(modX, GetItemSize().width)) + { + return -1; + } + + col = static_cast (x / __unitScrollLength); + index = col * __itemCountPerAxis + row; + if (index >= __pListModel->GetItemCountInGroup(DEFAULT_GROUP_INDEX)) + { + return -1; + } + } + + return index; +} + +int +_IconListPresenter::GetItemIndexFromPosition(const FloatPoint& position) const +{ + return GetItemIndexFromPosition(position.x, position.y); +} + +result +_IconListPresenter::SetTextHorizontalAlignment(HorizontalAlignment alignment) +{ + return __pItemDrawingProperty->SetTextHorizontalAlignment(alignment); +} + +result +_IconListPresenter::SetTextVerticalAlignment(IconListViewItemTextVerticalAlignment alignment) +{ + int itemHeight = __pItemDrawingProperty->GetItemSize().height; + result r = __pItemDrawingProperty->SetTextVerticalAlignment(alignment); + if (alignment >= ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_OUTSIDE_TOP) + { + _ControlOrientation orientation = __pIconListView->GetOrientation(); + GET_SHAPE_CONFIG(ICONLIST::OUTSIDE_TEXT_VERTICAL_SPACING, orientation, __verticalSpacing); + } + + if (itemHeight != __pItemDrawingProperty->GetItemSize().height) + { + AdjustLayout(); + } + + return r; +} + +HorizontalAlignment +_IconListPresenter::GetTextHorizontalAlignment(void) const +{ + ClearLastResult(); + return __pItemDrawingProperty->GetTextHorizontalAlignment(); +} + +IconListViewItemTextVerticalAlignment +_IconListPresenter::GetTextVerticalAlignment(void) const +{ + ClearLastResult(); + return __pItemDrawingProperty->GetTextVerticalAlignment(); +} + +result +_IconListPresenter::SetItemTextColor(IconListViewItemDrawingStatus status, const Color& color) +{ + SysTryReturn(NID_UI_CTRL, + (status >= ICON_LIST_VIEW_ITEM_DRAWING_STATUS_NORMAL && status <= ICON_LIST_VIEW_ITEM_DRAWING_STATUS_HIGHLIGHTED), + E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Invalid status is used."); + + return __pItemDrawingProperty->SetTextColor(status, color); +} + +const Color +_IconListPresenter::GetItemTextColor(IconListViewItemDrawingStatus status) const +{ + SysTryReturn(NID_UI_CTRL, + (status >= ICON_LIST_VIEW_ITEM_DRAWING_STATUS_NORMAL && status <= ICON_LIST_VIEW_ITEM_DRAWING_STATUS_HIGHLIGHTED), + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] status is invalid."); + + return __pItemDrawingProperty->GetTextColor(status); +} + +result +_IconListPresenter::SetItemTextSize(float size) +{ + if (__pItemDrawingProperty->GetTextSize() != size) + { + float itemHeight = __pItemDrawingProperty->GetItemSize().height; + result r = __pItemDrawingProperty->SetTextSize(size); + + InitializeFont(); + + if (!_FloatCompare(itemHeight, __pItemDrawingProperty->GetItemSize().height)) + { + AdjustLayout(); + } + return r; + } + + return E_SUCCESS; +} + +float +_IconListPresenter::GetItemTextSize(void) const +{ + return __pItemDrawingProperty->GetTextSize(); +} + +result +_IconListPresenter::SetCheckBoxPosition(IconListViewCheckBoxPosition position) +{ + return __pItemDrawingProperty->SetCheckBoxPosition(position); +} + +IconListViewCheckBoxPosition +_IconListPresenter::GetCheckBoxPosition(void) const +{ + ClearLastResult(); + return __pItemDrawingProperty->GetCheckBoxPosition(); +} + +result +_IconListPresenter::SetTouchAnimationEnabled(bool enable) +{ + __isTouchAnimationEnabled = enable; + __previousTouchAnimatinEnabled = enable; + + return E_SUCCESS; +} + +bool +_IconListPresenter::IsTouchAnimationEnabled(void) const +{ + ClearLastResult(); + return __onReordering ? __previousTouchAnimatinEnabled : __isTouchAnimationEnabled; +} + +result +_IconListPresenter::ScrollToItem(int index) +{ + int itemCount = __pListModel->GetItemCountInGroup(DEFAULT_GROUP_INDEX); + SysTryReturn(NID_UI_CTRL, (index >= 0 && index < itemCount), E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Index must be non-negative integer, and less count of whole items."); + + SysTryReturn(NID_UI_CTRL, (__itemCountPerAxis > 0), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Unable to get ItemCount per axis."); + + float scrollPosition = (index / __itemCountPerAxis) * __unitScrollLength; + if (__scrollDirection == ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL) + { + scrollPosition += __topMargin; + } + else + { + scrollPosition += __leftMargin; + } + + if (SetScrollPosition(scrollPosition, false)) + { + ScrollFadeOut(true); + FireScrollEvent(); + } + + return E_SUCCESS; +} + +result +_IconListPresenter::ScrollByPixel(float pixel) +{ + if (_FloatCompare(pixel, 0.0f)) + { + return E_SUCCESS; + } + + if (SetScrollPosition(__scrollPosition + pixel, false)) + { + __pIconListView->Invalidate(); + ScrollFadeOut(true); + FireScrollEvent(); + + return E_SUCCESS; + } + + return E_OUT_OF_RANGE; +} + +result +_IconListPresenter::RefreshList(int index, ListRefreshType type) +{ + SysTryReturn(NID_UI_CTRL, (__pItemProviderAdaptor != null), E_INVALID_STATE, E_INVALID_STATE, + "[E_INVALID_STATE] IconListViewItemProvider isn't added."); + + SysTryReturn(NID_UI_CTRL, __alreadyDrawn, E_INVALID_OPERATION, E_INVALID_OPERATION, + "[E_INVALID_OPERATION] Unable to refresh IconListView before first drawn."); + + int itemCount = __pListModel->GetItemCountInGroup(DEFAULT_GROUP_INDEX); + SysTryReturn(NID_UI_CTRL, (index >= 0 && index <= itemCount), E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Index must be non-negative integer, and less count of whole items."); + + SysTryReturn(NID_UI_CTRL, (index < itemCount || type == LIST_REFRESH_TYPE_ITEM_ADD), E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Index must be non-negative integer, and less count of whole items."); + + SysTryReturn(NID_UI_CTRL, (type >= LIST_REFRESH_TYPE_ITEM_ADD && type <= LIST_REFRESH_TYPE_ITEM_MODIFY), E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has been occurred. Refresh type is invalid."); + + if (__pAnimationTimer != null) + { + ResetAnimationTimer(); + StopAllAnimations(); + Draw(); + } + + bool usingAnimation = false; + result r = E_SUCCESS; + switch (type) + { + case LIST_REFRESH_TYPE_ITEM_ADD: + { + _IconListItem* pItem = dynamic_cast <_IconListItem*>(__pItemProviderAdaptor->LoadItem(DEFAULT_GROUP_INDEX, index)); + SysTryReturn(NID_UI_CTRL, (pItem != null), GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + if ((__firstDrawnIndex <= index) && (__lastDrawnIndex >= index)) + { + MoveBackward(index); + } + else if (__firstDrawnIndex > index) + { + MoveBackward(__firstDrawnIndex - 1); + usingAnimation = true; + } + + if (__pListModel->GetItemCountInGroup(DEFAULT_GROUP_INDEX) == 0) + { + __listStatusChanged = true; + } + + r = InsertItemAt(index, pItem); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (__listStatusChanged) + { + __pIconListView->Invalidate(); + } + + if (((__firstDrawnIndex <= index) && (__lastDrawnIndex >= index)) || (index == (__lastDrawnIndex + 1))) + { + if (index < itemCount) + { + StartAnimationTimer(ITEM_ANIMATION_DELAY); + __animationItemIndex = index; + } + else + { + AddAnimation(*pItem, index); + } + + usingAnimation = true; + } + + break; + } + + case LIST_REFRESH_TYPE_ITEM_REMOVE: + { + _IconListItem* pItem = dynamic_cast <_IconListItem*>(__pListModel->LoadItem(DEFAULT_GROUP_INDEX, index)); + SysTryReturn(NID_UI_CTRL, (pItem != null), GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + if ((__firstDrawnIndex <= index) && (__lastDrawnIndex >= index)) + { + RemoveAnimation(*pItem, index); + MoveForward(index + 1); + usingAnimation = true; + } + else if (__firstDrawnIndex > index) + { + MoveForward(__firstDrawnIndex); + usingAnimation = true; + } + + r = RemoveItemAt(index); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (__pListModel->GetItemCountInGroup(DEFAULT_GROUP_INDEX) == 0) + { + __listStatusChanged = true; + __pIconListView->Invalidate(); + return r; + } + + break; + } + + case LIST_REFRESH_TYPE_ITEM_MODIFY: + { + if (__isSelectAnimationRunning && __selectedIndex == index) + { + __runningAnimationBackupIndex = index; + return StartRunningAnimationCheckTimer(); + } + + if (__pListModel->IsLoadedItem(DEFAULT_GROUP_INDEX , index) == false) + return r; + + _IconListItem* pItem = dynamic_cast <_IconListItem*>(__pItemProviderAdaptor->LoadItem(DEFAULT_GROUP_INDEX, index)); + SysTryReturn(NID_UI_CTRL, (pItem != null), GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + if (pItem->GetItemAccessibilityElement() != null && pItem->GetItemAccessibilityElement()->IsActivated()) + { + pItem->GetItemAccessibilityElement()->Activate(false); + } + + r = SetItemAt(index, pItem); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __needSetAccessibility = true; + RedrawItem(index, __highlightedIndex == index); + + return r; + } + } + + if (usingAnimation) + { + AdjustLayout(); + InitializeFont(); + + UpdateDrawnIndex(); + } + + return r; +} + +void +_IconListPresenter::UpdateDrawnIndex(void) +{ + int drawingLine = 0; + int itemCount = __pListModel->GetItemCountInGroup(DEFAULT_GROUP_INDEX); + FloatRectangle itemRect(0.0f, 0.0f, GetItemSize().height, GetItemSize().width); + + if (__scrollDirection == ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL) + { + float endXPos = __endPosOfAxis; + float endYPos = __pIconListView->GetBounds().height; + + drawingLine = (__scrollPosition > __topMargin) ? (__scrollPosition - __topMargin + __verticalSpacing) / __unitScrollLength : 0; + itemRect.y = __topMargin + drawingLine * __unitScrollLength - __scrollPosition; + + int index = drawingLine * __itemCountPerAxis; + __firstDrawnIndex = index; + while(!_FloatCompareGE(itemRect.y, endYPos)) + { + itemRect.x = __startPosOfAxis; + while (!_FloatCompareGE(itemRect.x, endXPos) && (index < itemCount)) + { + ++index; + itemRect.x += __unitLengthOfAxis; + } + itemRect.y += __unitScrollLength; + } + __lastDrawnIndex = index - 1; + } + else + { + float endXPos = __pIconListView->GetBounds().width; + float endYPos = __endPosOfAxis; + + drawingLine = (__scrollPosition > __leftMargin) ? (__scrollPosition - __leftMargin + __horizontalSpacing) / __unitScrollLength : 0; + itemRect.x = __leftMargin + drawingLine * __unitScrollLength - __scrollPosition; + + int index = drawingLine * __itemCountPerAxis; + __firstDrawnIndex = index; + while(!_FloatCompareGE(itemRect.x, endXPos)) + { + itemRect.y = __startPosOfAxis; + while (!_FloatCompareGE(itemRect.y, endYPos) && (index < itemCount)) + { + ++index; + itemRect.y += __unitLengthOfAxis; + } + itemRect.x += __unitScrollLength; + } + __lastDrawnIndex = index - 1; + } +} + +result +_IconListPresenter::UpdateList(void) +{ + SysTryReturn(NID_UI_CTRL, (__pItemProviderAdaptor != null), E_INVALID_STATE, E_INVALID_STATE, + "[E_INVALID_STATE] IconListViewItemProvider isn't added."); + + ResetTouchActionTimer(); + ResetAnimationTimer(); + StopAllAnimations(); + + _AccessibilityContainer* pContainer = __pIconListView->GetAccessibilityContainer(); + int itemCount = __pListModel->GetItemCountInGroup(DEFAULT_GROUP_INDEX); + if (_AccessibilityManager::IsActivated() && (pContainer != null) && itemCount > 0) + { + for (int index = 0; index < itemCount; index++) + { + _IconListItem* pItem = dynamic_cast <_IconListItem*>(__pItemProviderAdaptor->LoadItem(DEFAULT_GROUP_INDEX, index)); + if (pItem != null && pItem->GetItemAccessibilityElement() != null) + { + pItem->GetItemAccessibilityElement()->Activate(false); + } + } + } + + result r = RemoveAllItems(); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __selectedIndex = INVALID_INDEX; + + if (!__pIconListView->IsFocusModeStateEnabled()) + { + __highlightedIndex = INVALID_INDEX; + } + + __isLayoutChanged = true; + __alreadyDrawn = false; + __listStatusChanged = true; + + AddGroupAndRestoreItem(true); + __pIconListView->Draw(); + + return E_SUCCESS; +} + +result +_IconListPresenter::SetItemBitmapBounds(const FloatRectangle& bounds) +{ + FloatRectangle itemBitmapBounds = __pItemDrawingProperty->GetItemBitmapBounds(); + if (itemBitmapBounds == bounds) + { + return E_SUCCESS; + } + + result r = __pItemDrawingProperty->SetItemBitmapBounds(bounds); + + if (r == E_SUCCESS) + { + __isLayoutChanged = true; + } + + return r; +} + +FloatRectangle +_IconListPresenter::GetItemBitmapBounds(void) const +{ + return __pItemDrawingProperty->GetItemBitmapBounds(); +} + +result +_IconListPresenter::GetItemBitmapSize(float& width, float& height) const +{ + FloatDimension itemSize = __pItemDrawingProperty->GetItemBitmapSize(); + width = itemSize.width; + height = itemSize.height; + + return E_SUCCESS; +} + +FloatDimension +_IconListPresenter::GetItemBitmapSize(void) const +{ + return __pItemDrawingProperty->GetItemBitmapSize(); +} + +result +_IconListPresenter::SetItemSize(const FloatDimension& size) +{ + SysTryReturn(NID_UI_CTRL, (__pItemDrawingProperty != null), E_INVALID_STATE, E_INVALID_STATE, + "[E_INVALID_STATE] This instance isn't constructed."); + + SysTryReturn(NID_UI_CTRL, !_FloatCompareLE(size.width, 0.0f) && !_FloatCompareLE(size.height, 0.0f), E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. Width and Height should be larger than 0."); + + __isLayoutChanged = true; + return __pItemDrawingProperty->SetItemSize(size); +} + +result +_IconListPresenter::GetItemSize(float& width, float& height) const +{ + FloatDimension itemSize = __pItemDrawingProperty->GetItemSize(); + width = itemSize.width; + height = itemSize.height; + + return E_SUCCESS; +} + +FloatDimension +_IconListPresenter::GetItemSize(void) const +{ + return __pItemDrawingProperty->GetItemSize(); +} + +result +_IconListPresenter::SetMagneticScrollSize(int scrollSize) +{ + SysTryReturn(NID_UI_CTRL, (__pItemProviderAdaptor != null), E_INVALID_STATE, E_INVALID_STATE, + "[E_INVALID_STATE] This instance isn't constructed."); + + int rowCount = static_cast (Math::Ceiling(((double) __pItemProviderAdaptor->GetItemCount()) / ((double) __itemCountPerAxis))); + SysTryReturn(NID_UI_CTRL, ((scrollSize >= 0) && (scrollSize <= rowCount)), E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] Invalid argument is used. ScrollSize is a non-negative integer and less than the number of rows."); + + __magneticScrollSize = scrollSize; + + return E_SUCCESS; +} + +int +_IconListPresenter::GetMagneticScrollSize(void) const +{ + ClearLastResult(); + return __magneticScrollSize; +} + +void +_IconListPresenter::SetItemCountPerAxis(int itemCountPerAxis) +{ + SysTryReturnVoidResult(NID_UI_CTRL, (itemCountPerAxis >= 0), E_INVALID_ARG, + "[E_INVALID_ARG] Invalid argument is used. itemCountPerAxis is a non-negative integer."); + + ClearLastResult(); + __itemCountPerAxis = itemCountPerAxis; +} + +int +_IconListPresenter::GetItemCountPerAxis(void) const +{ + ClearLastResult(); + return __itemCountPerAxis; +} + +result +_IconListPresenter::SetItemLayoutHorizontalAlignment(HorizontalAlignment alignment) +{ + SysTryReturn(NID_UI_CTRL, (__scrollDirection == ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL), E_INVALID_OPERATION, + E_INVALID_OPERATION, "[E_INVALID_OPERATION] This isn't vertical scroll."); + + SysTryReturn(NID_UI_CTRL, (alignment >= ALIGNMENT_LEFT && alignment <= ALIGNMENT_RIGHT), E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] alignment is invalid."); + + if (alignment != __itemHorizontalAlignment) + { + __itemHorizontalAlignment = alignment; + __isLayoutChanged = true; + } + + return E_SUCCESS; +} + +result +_IconListPresenter::SetItemLayoutVerticalAlignment(VerticalAlignment alignment) +{ + SysTryReturn(NID_UI_CTRL, (__scrollDirection == ICON_LIST_VIEW_SCROLL_DIRECTION_HORIZONTAL), E_INVALID_OPERATION, + E_INVALID_OPERATION, "[E_INVALID_OPERATION] This isn't horizontal scroll."); + + SysTryReturn(NID_UI_CTRL, (alignment >= ALIGNMENT_TOP && alignment <= ALIGNMENT_BOTTOM), E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] alignment is invalid."); + + if (alignment != __itemVerticalAlignment) + { + __itemVerticalAlignment = alignment; + __isLayoutChanged = true; + } + + return E_SUCCESS; +} + +HorizontalAlignment +_IconListPresenter::GetItemLayoutHorizontalAlignment(void) const +{ + ClearLastResult(); + return __itemHorizontalAlignment; +} + +VerticalAlignment +_IconListPresenter::GetItemLayoutVerticalAlignment(void) const +{ + ClearLastResult(); + return __itemVerticalAlignment; +} + +result +_IconListPresenter::SetItemBorderStyle(IconListViewItemBorderStyle borderStyle) +{ + return __pItemDrawingProperty->SetBorderStyle(borderStyle); +} + +IconListViewItemBorderStyle +_IconListPresenter::GetItemBorderStyle(void) const +{ + return __pItemDrawingProperty->GetBorderStyle(); +} + +_IconListItemDrawingProperty* +_IconListPresenter::GetItemDrawingProperty(void) const +{ + return __pItemDrawingProperty; +} + +void +_IconListPresenter::ClearVisualElement(void) +{ + __listStatusChanged = true; +} + +result +_IconListPresenter::SetNonSlidableList(void) +{ + // Remove All Items & Register Adaptor + __pListModel->RemoveAllItem(); + + __firstDrawnIndex = INVALID_INDEX; + __lastDrawnIndex = INVALID_INDEX; + __selectedIndex = INVALID_INDEX; + __highlightedIndex = INVALID_INDEX; + __isLayoutChanged = true; + __alreadyDrawn = true; + + return __pListModel->AddGroup(0, __pIconListView->GetStyle() == ICON_LIST_VIEW_STYLE_RADIO); +} + +result +_IconListPresenter::AddItem(_IconListItem* pItem) +{ + result r = __pListModel->AddItemToGroup(pItem, DEFAULT_GROUP_INDEX); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + pItem->ClearVisualElement(); + + // Attach _VisualElement + _VisualElement* pBase = pItem->GetVisualElement(); + if (pBase != null) + { + VisualElement* pParent = pBase->GetParent(); + if (pParent != null) + { + pParent->DetachChild(*pBase); + } + __pIconListView->GetVisualElement()->AttachChild(*pBase); + pBase->SetShowState(false); + pBase->SetClipToParent(true); + } + + __isLayoutChanged = true; + + return E_SUCCESS; +} + +result +_IconListPresenter::InsertItemAt(int index, _IconListItem* pItem) +{ + result r = __pListModel->InsertItemToGroup(pItem, DEFAULT_GROUP_INDEX, index); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + pItem->ClearVisualElement(); + pItem->SetDrawingProperty(*__pItemDrawingProperty); + + // Attach _VisualElement + _VisualElement* pBase = pItem->GetVisualElement(); + if (pBase != null) + { + VisualElement* pParent = pBase->GetParent(); + if (pParent != null) + { + pParent->DetachChild(*pBase); + } + __pIconListView->GetVisualElement()->AttachChild(*pBase); + pBase->SetShowState(false); + pBase->SetClipToParent(true); + } + + __isLayoutChanged = true; + + return E_SUCCESS; +} + +result +_IconListPresenter::SetItemAt(int index, _IconListItem* pItem) +{ + SysTryReturn(NID_UI_CTRL, (pItem != null), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. pItem is null."); + + result r = __pListModel->SetItem(*pItem, DEFAULT_GROUP_INDEX, index); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + pItem->ClearVisualElement(); + pItem->SetDrawingProperty(*__pItemDrawingProperty); + + // Attach _VisualElement + _VisualElement* pBase = pItem->GetVisualElement(); + if (pBase != null) + { + VisualElement* pParent = pBase->GetParent(); + if (pParent != null) + { + pParent->DetachChild(*pBase); + } + __pIconListView->GetVisualElement()->AttachChild(*pBase); + pBase->SetShowState(false); + pBase->SetClipToParent(true); + } + + return E_SUCCESS; +} + +result +_IconListPresenter::RemoveItemAt(int index) +{ + __isLayoutChanged = true; + + return __pListModel->RemoveItemAt(DEFAULT_GROUP_INDEX, index); +} + +result +_IconListPresenter::RemoveAllItems(void) +{ + __isLayoutChanged = true; + + return __pListModel->RemoveAllItem(false, true); +} + +void +_IconListPresenter::SetItemBitmapAsAspectRatio(bool isAspect) +{ + __pItemDrawingProperty->SetItemBitmapAsAspectRatio(isAspect); +} + +bool +_IconListPresenter::IsItemBitmapAsAspectRatio(void) const +{ + return __pItemDrawingProperty->IsItemBitmapAsAspectRatio(); +} + +result +_IconListPresenter::SetReorderModeEnabled(bool enable) +{ + __isLayoutChanged = true; + + if (__isTouchAnimationEnabled && enable) + { + __isTouchAnimationEnabled = false; + } + else if (!enable) + { + __isTouchAnimationEnabled = __previousTouchAnimatinEnabled; + } + + __pIconListView->Invalidate(); + return E_SUCCESS; +} + +result +_IconListPresenter::Draw(void) +{ + result r = E_SUCCESS; + int itemCount = 0; + + if (__onDrawing) + { + __requireNextDrawing = true; + return E_SUCCESS; + } + + // If it is first draw, + if (!__alreadyDrawn) + { + r = AddGroupAndRestoreItem(false); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + // Set Drawing Flag + __onDrawing = true; + + // Draw Background + Color backgroundColor = __pIconListView->GetBackgroundColor(); + if (__listStatusChanged) + { + const Bitmap* pBackgroundBitmap = __pIconListView->GetBackgroundBitmap(); + if (pBackgroundBitmap != null) + { + FloatRectangle bounds(__pIconListView->GetBoundsF()); + bounds.SetPosition(0.0f, 0.0f); + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pBackgroundBitmap)) + { + Canvas* pCanvas = __pVE->GetCanvasN(); + SysTryCatch(NID_UI_CTRL, (pCanvas!= null), , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + pCanvas->SetBackgroundColor(backgroundColor); + pCanvas->Clear(); + pCanvas->DrawNinePatchedBitmap(bounds, *pBackgroundBitmap); + delete pCanvas; + } + else + { + String imagePath = _BitmapImpl::GetInstance(*pBackgroundBitmap)->GetFileName(); + + if (!imagePath.IsEmpty()) + { + __pVE->SetImageSource(imagePath); + __lazyDecodeBackGroundBitmap = true; + } + else + { + __pVE->SetImageSource(L""); + __lazyDecodeBackGroundBitmap = false; + Canvas* pCanvas = __pVE->GetCanvasN(); + SysTryCatch(NID_UI_CTRL, (pCanvas!= null), , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + pCanvas->SetBackgroundColor(backgroundColor); + pCanvas->Clear(); + pCanvas->DrawBitmap(bounds, *pBackgroundBitmap); + delete pCanvas; + } + } + + __needBaseCanvas = true; + } + else + { + __pVE->SetBackgroundColor(_Colorf((float) backgroundColor.GetRed() / 255, (float) backgroundColor.GetGreen() / 255, (float) backgroundColor.GetBlue() / 255, (float) backgroundColor.GetAlpha() / 255)); + __needBaseCanvas = false; + } + } + + itemCount = __pListModel->GetItemCountInGroup(DEFAULT_GROUP_INDEX); + if (itemCount <= 0) + { + r = DrawEmptyList(); + __onDrawing = false; + __alreadyDrawn = true; + if (__requireNextDrawing) + { + __requireNextDrawing = false; + return Draw(); + } + return r; + } + + // If layout is changed, adjust layout. + if (__isLayoutChanged) + { + AdjustLayout(); + } + + // Draw Items + if (__scrollDirection == ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL) + { + // Vertical Scroll + r = DrawVerticalScrollList(); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + // Horizontal Scroll + r = DrawHorizontalScrollList(); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + __pItemDrawingProperty->SetDrawingFlag(); + + if (!__alreadyDrawn) + { + __alreadyDrawn = true; + + // start timer for scroll fade out + _Scroll* pScroll = __pIconListView->GetScroll(); + if (pScroll != null) + { + float scrollViewRange = 0.0f; + float scrollRange = 0.0f; + pScroll->GetScrollRange(&scrollViewRange, &scrollRange); + if (!_FloatCompareGE(scrollViewRange, scrollRange)) + { + pScroll->SetScrollVisibility(true); + pScroll->SetScrollingEffectVisibility(true); + StartFirstShowScrollTimer(); + } + } + } + + if (__listStatusChanged) + { + if (__pEmptyListVE != null) + { + if (__needBaseCanvas) + { + __pEmptyListVE->Destroy(); + __pEmptyListVE = null; + } + else + { + __pEmptyListVE->SetShowState(false); + } + } + __listStatusChanged = false; + } + +CATCH: + __onDrawing = false; + if (__requireNextDrawing) + { + __requireNextDrawing = false; + return Draw(); + } + + return r; +} + +result +_IconListPresenter::AddGroupAndRestoreItem(bool restoreItem) +{ + if (__pListModel->GetAllGroupCount() == 0) + { + int itemCount = (__pItemProviderAdaptor != null) ? __pItemProviderAdaptor->GetItemCount() : 0; + + // Add Group + result r = __pListModel->AddGroup(itemCount, __pIconListView->GetStyle() == ICON_LIST_VIEW_STYLE_RADIO); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + __isLayoutChanged = true; + InitializeFont(); + + if (restoreItem) + { + __pListModel->RestoreItemStatus(); + } + + return E_SUCCESS; +} + +result +_IconListPresenter::DrawEmptyList(void) +{ + result r = E_SUCCESS; + + if (!__listStatusChanged) + { + return r; + } + + Canvas* pCanvas = null; + TextObject* pTextObject = null; + FloatDimension textDimension; + FloatRectangle bounds(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle viewBounds = __pIconListView->GetBoundsF(); + viewBounds.x = 0.0f; + viewBounds.y = 0.0f; + + float emptyTextHeight = 0.0f; + + Font* pFont = null; + const String emptyText = __pIconListView->GetTextOfEmptyList(); + + float bitmapXPosition = 0.0f; + float bitmapHeight = 0.0f; + float bitmapWidth = 0.0f; + const Bitmap* pBitmap = __pIconListView->GetBitmapOfEmptyList(); + + // Reset Scroll Range & Position + _Scroll* pScroll = __pIconListView->GetScroll(); + 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); + } + + // set visual element or canvas for empty list + if (pBitmap != null && __pEmptyListVE == null) + { + __pEmptyListVE = new (std::nothrow) _VisualElement(); + SysTryCatch(NID_UI, __pEmptyListVE != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = __pEmptyListVE->Construct(); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pEmptyListVE->SetSurfaceOpaque(false); + __pEmptyListVE->SetImplicitAnimationEnabled(false); + + __pVE->AttachChild(*__pEmptyListVE); + } + else if (__needBaseCanvas) + { + pCanvas = __pVE->GetCanvasN(); + SysTryCatch(NID_UI, pCanvas != null, , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + } + + if (!emptyText.IsEmpty()) + { + GET_SHAPE_CONFIG(ICONLIST::EMPTY_TEXT_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, emptyTextHeight); + + pFont = __pIconListView->GetFallbackFont(); + SysTryCatch(NID_UI, pFont != null, , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + pTextObject = new (std::nothrow) TextObject(); + SysTryCatch(NID_UI, pTextObject != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pTextObject->Construct(); + TextSimple* pSimpleText = new (std::nothrow)TextSimple(const_cast (emptyText.GetPointer()), emptyText.GetLength()); + SysTryCatch(NID_UI, pSimpleText != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pTextObject->AppendElement(*pSimpleText); + pTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_CENTER | TEXT_OBJECT_ALIGNMENT_MIDDLE); + pTextObject->SetForegroundColor(__pIconListView->GetTextColorOfEmptyList(), 0, pTextObject->GetTextLength()); + pTextObject->SetFont(pFont, 0, pTextObject->GetTextLength()); + pTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_WORD); + pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); + + pTextObject->SetBounds(FloatRectangle(0.0f, 0.0f, viewBounds.width, 1.0f)); + pTextObject->Compose(); + textDimension.height = pTextObject->GetTotalHeightF(); + textDimension.width = pTextObject->GetLineWidthAtF(0); + + for (int i = 1; i < pTextObject->GetTotalLineCount(); i++) + { + float tempWidth = pTextObject->GetLineWidthAtF(i); + textDimension.width = textDimension.width > tempWidth ? textDimension.width : tempWidth; + } + + // calculate bounds with text + if (_FloatCompareGE(viewBounds.width, textDimension.width)) + { + bounds.x = (viewBounds.width - textDimension.width) / 2; + bounds.width = textDimension.width; + } + else + { + bounds.width = viewBounds.width; + } + + if (_FloatCompareGE(viewBounds.height, textDimension.height)) + { + bounds.y = (viewBounds.height - textDimension.height) / 2; + bounds.height = textDimension.height; + } + else + { + bounds.height = viewBounds.height; + } + } + + if (pBitmap != null) + { + bitmapHeight = pBitmap->GetHeightF(); + bitmapWidth = pBitmap->GetWidthF(); + + bounds.height += bitmapHeight + emptyTextHeight; + + bounds.y = (viewBounds.height - bounds.height) / 2; + + if (!_FloatCompareGE(bounds.y, 0.0f)) + { + bounds.y = 0.0f; + } + + if (!_FloatCompareLE(bounds.width, bitmapWidth)) + { + bitmapXPosition = (bounds.width - bitmapWidth) / 2; + } + else if (!_FloatCompareLE(viewBounds.width, bitmapWidth)) + { + bounds.x = (viewBounds.width - bitmapWidth) / 2; + bounds.width = bitmapWidth; + } + else + { + bounds.x = 0.0f; + bounds.width = bitmapWidth; + } + } + + // draw empty list + if (pBitmap != null && __pEmptyListVE != null) + { + __pEmptyListVE->SetBounds(bounds); + __pEmptyListVE->SetShowState(true); + + bounds.x = 0.0f; + bounds.y = 0.0f; + } + + if (pBitmap != null) + { + FloatRectangle bitmapBounds(bounds.x + bitmapXPosition, bounds.y, bitmapWidth, bitmapHeight); + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pBitmap)) + { + pCanvas = __pEmptyListVE->GetCanvasN(); + SysTryCatch(NID_UI, pCanvas != null, , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + pCanvas->DrawNinePatchedBitmap(bitmapBounds, *pBitmap); + } + else + { + String imagePath = _BitmapImpl::GetInstance(*pBitmap)->GetFileName(); + + if (!imagePath.IsEmpty()) + { + __pEmptyListVE->SetImageSource(imagePath); + __lazyDecodeEmptyListBitmap = true; + } + else + { + __pEmptyListVE->SetImageSource(L""); + __lazyDecodeEmptyListBitmap = false; + pCanvas = __pEmptyListVE->GetCanvasN(); + SysTryCatch(NID_UI, pCanvas != null, , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + pCanvas->DrawBitmap(bitmapBounds, *pBitmap); + } + } + } + + if (!emptyText.IsEmpty()) + { + if (!_FloatCompare(bitmapHeight, 0.0f)) + { + bounds.y += emptyTextHeight + bitmapHeight; + } + bounds.height = textDimension.height; + + if (pCanvas == null) + { + Color backgroundColor = Color(0, 0, 0, 0); + if (__pEmptyListVE != null) + { + pCanvas = __pEmptyListVE->GetCanvasN(); + } + else + { + pCanvas = __pVE->GetCanvasN(); + backgroundColor = __pIconListView->GetBackgroundColor(); + } + SysTryCatch(NID_UI, pCanvas != null, , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + pCanvas->SetBackgroundColor(backgroundColor); + pCanvas->Clear(); + } + + pTextObject->SetBounds(bounds); + pTextObject->Draw(*_CanvasImpl::GetInstance(*pCanvas)); + } + + __listStatusChanged = false; + + delete pCanvas; + delete pTextObject; + return r; + +CATCH: + if (__pEmptyListVE != null) + { + __pEmptyListVE->Destroy(); + __pEmptyListVE = null; + } + + delete pCanvas; + delete pTextObject; + return r; +} + +result +_IconListPresenter::DrawHorizontalScrollList(void) +{ + int itemCount = __pListModel->GetItemCountInGroup(DEFAULT_GROUP_INDEX); + float itemHeight = GetItemSize().height; + float itemWidth = GetItemSize().width; + FloatRectangle itemRect(0.0f, 0.0f, itemWidth, itemHeight); + int drawingLine = __scrollPosition > __leftMargin ? _CoordinateSystemUtils::ConvertToInteger((__scrollPosition - __leftMargin + __horizontalSpacing) / __unitScrollLength) : 0; + int index = drawingLine * __itemCountPerAxis; + float endXPos = __pIconListView->GetBounds().width; + float endYPos = __endPosOfAxis; + float unitWidth = __unitScrollLength; + float unitHeight = __unitLengthOfAxis; + itemRect.x = __leftMargin + drawingLine * unitWidth - __scrollPosition; + + // Hide Items + if (__lastDrawnIndex >= 0) + { + float scroll = endXPos - itemRect.x; + int lastIndex = index + (static_cast ((scroll - 1.0f) / unitWidth) + 1) * __itemCountPerAxis - 1; + if (lastIndex >= itemCount) + { + lastIndex = itemCount - 1; + } + + if (__lastDrawnIndex < index || __firstDrawnIndex > lastIndex) + { + HideItems(__firstDrawnIndex, __lastDrawnIndex); + } + else + { + HideItems(__firstDrawnIndex, index - 1); + HideItems(lastIndex + 1, __lastDrawnIndex); + } + } + + // Preload Items + if (__firstDrawnIndex > index) + { + int topIndex = __firstDrawnIndex - __itemCountPerAxis * (static_cast (__pIconListView->GetBounds().width / __unitScrollLength) + 1); + if (topIndex <= index) + { + while (--__firstDrawnIndex > index) + { + __pListModel->LoadItem(DEFAULT_GROUP_INDEX, __firstDrawnIndex); + } + } + } + + // Draw Items + _IconListItem* pItem = null; + __firstDrawnIndex = index; + __firstDrawnItemFullyDrawn = _FloatCompareGE(itemRect.x, 0); + + while (itemRect.x < endXPos) + { + itemRect.y = __startPosOfAxis; + while (itemRect.y < endYPos && index < itemCount) + { + // Draw Item + pItem = dynamic_cast <_IconListItem*>(__pListModel->LoadItem(DEFAULT_GROUP_INDEX, index)); + if (pItem != null) + { + pItem->SetDrawingProperty(*__pItemDrawingProperty); + + if (__reorderToIndex == index && __isTouchPressed) + { + pItem->DrawItem(itemRect, LIST_ITEM_STATE_PRESSED); + } + else if (__highlightedIndex == index) + { + pItem->DrawItem(itemRect, LIST_ITEM_STATE_HIGHLIGHTED); + } + else + { + pItem->DrawItem(itemRect, LIST_ITEM_STATE_NORMAL, index); + } + + if (pItem->GetVisualElement() != null) + { + pItem->GetVisualElement()->SetFlushNeeded(); + } + + // Support Accessibility + SetAccessibilityElement(index, pItem); + } + ++index; + itemRect.y += unitHeight; + } + itemRect.x += unitWidth; + } + __lastDrawnIndex = index - 1; + __lastDrawnItemFullyDrawn = _FloatCompareGE(endYPos, itemRect.x); + + // Support Accessibility + __RequestToDrawAccessibilityFocusUi = true; + RequestToDrawAccessibilityFocusUi(); + + return E_SUCCESS; +} + +result +_IconListPresenter::DrawVerticalScrollList(void) +{ + int itemCount = __pListModel->GetItemCountInGroup(DEFAULT_GROUP_INDEX); + float itemHeight = GetItemSize().height; + float itemWidth = GetItemSize().width; + FloatRectangle itemRect(0.0f, 0.0f, itemWidth, itemHeight); + int drawingLine = __scrollPosition > __topMargin ? _CoordinateSystemUtils::ConvertToInteger((__scrollPosition - __topMargin + __verticalSpacing) / __unitScrollLength) : 0; + int index = drawingLine * __itemCountPerAxis; + float endXPos = __endPosOfAxis; + float endYPos = __pIconListView->GetBounds().height; + float unitWidth = __unitLengthOfAxis; + float unitHeight = __unitScrollLength; + itemRect.y = __topMargin + drawingLine * unitHeight - __scrollPosition; + + // Hide Items + if (__lastDrawnIndex >= 0) + { + float scroll = endYPos - itemRect.y; + int lastIndex = index + (static_cast ((scroll - 1.0f) / unitHeight) + 1) * __itemCountPerAxis - 1; + if (lastIndex >= itemCount) + { + lastIndex = itemCount - 1; + } + + if (__lastDrawnIndex < index || __firstDrawnIndex > lastIndex) + { + HideItems(__firstDrawnIndex, __lastDrawnIndex); + } + else + { + HideItems(__firstDrawnIndex, index - 1); + HideItems(lastIndex + 1, __lastDrawnIndex); + } + } + + // Preload Items + if (__firstDrawnIndex > index) + { + int topIndex = __firstDrawnIndex - __itemCountPerAxis * (static_cast (__pIconListView->GetBounds().height / __unitScrollLength) + 1); + if (topIndex <= index) + { + while (--__firstDrawnIndex > index) + { + __pListModel->LoadItem(DEFAULT_GROUP_INDEX, __firstDrawnIndex); + } + } + } + + // Draw Items + _IconListItem* pItem = null; + __firstDrawnIndex = index; + __firstDrawnItemFullyDrawn = _FloatCompareGE(itemRect.y, 0); + + while (itemRect.y < endYPos) + { + itemRect.x = __startPosOfAxis; + while (itemRect.x < endXPos && index < itemCount) + { + // Draw Item + pItem = dynamic_cast <_IconListItem*>(__pListModel->LoadItem(DEFAULT_GROUP_INDEX, index)); + if (pItem != null) + { + pItem->SetDrawingProperty(*__pItemDrawingProperty); + + if (__reorderToIndex == index && __isTouchPressed) + { + pItem->DrawItem(itemRect, LIST_ITEM_STATE_PRESSED); + } + else if (__highlightedIndex == index) + { + pItem->DrawItem(itemRect, LIST_ITEM_STATE_HIGHLIGHTED); + } + else + { + pItem->DrawItem(itemRect, LIST_ITEM_STATE_NORMAL, index); + } + + // Support Accessibility + SetAccessibilityElement(index, pItem); + } + ++index; + itemRect.x += unitWidth; + } + itemRect.y += unitHeight; + } + __lastDrawnIndex = index - 1; + __lastDrawnItemFullyDrawn = _FloatCompareGE(endYPos, itemRect.y); + + // Support Accessibility + __RequestToDrawAccessibilityFocusUi = true; + RequestToDrawAccessibilityFocusUi(); + + return E_SUCCESS; +} + +void +_IconListPresenter::AdjustLayout(void) +{ + FloatDimension itemSize = __pIconListView->GetItemSize(); + FloatRectangle bounds = __pIconListView->GetBoundsF(); + int itemCount = __pListModel->GetItemCountInGroup(DEFAULT_GROUP_INDEX); + float oldScrollLength = __scrollLength; + + // Reset layout changed flag + __isLayoutChanged = false; + + // Calculate + if (__scrollDirection == ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL) + { + // Unit Axis Length(= Item Width + Horizontal Spacing) + __unitLengthOfAxis = itemSize.width + __horizontalSpacing; + + // ItemCountPerAxis + __itemCountPerAxis = (bounds.width - __leftMargin - __rightMargin + __horizontalSpacing) / __unitLengthOfAxis; + + // Unit Scroll Length(= Item Height + Vertical Spacing) + __unitScrollLength = itemSize.height + __verticalSpacing; + + // ScrollLength + if (__itemCountPerAxis > 0) + { + __scrollLength = __topMargin + __bottomMargin - __verticalSpacing + __unitScrollLength * + ((itemCount - 1) / __itemCountPerAxis + 1) - bounds.height; + if (!_FloatCompareGE(__scrollLength, 0.0f)) + { + __scrollLength = 0.0f; + } + } + else + { + __itemCountPerAxis = 0; + __scrollLength = 0.0f; + } + + // startPosOfAxis + switch (__itemHorizontalAlignment) + { + case ALIGNMENT_LEFT: + __startPosOfAxis = __leftMargin; + break; + + case ALIGNMENT_CENTER: + __startPosOfAxis = (bounds.width + __leftMargin - __rightMargin - __itemCountPerAxis * __unitLengthOfAxis + + __horizontalSpacing) / 2; + break; + + case ALIGNMENT_RIGHT: + __startPosOfAxis = bounds.width - __rightMargin - __itemCountPerAxis * __unitLengthOfAxis + __horizontalSpacing; + break; + } + + // endPosOfAxis + __endPosOfAxis = __startPosOfAxis + __itemCountPerAxis * __unitLengthOfAxis - __horizontalSpacing; + + if (!_FloatCompare(__scrollLength, oldScrollLength)) + { + // Set Scroll Range & Position + _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)) + { + pScroll->EnableScrollingEffect(false); + } + else + { + pScroll->EnableScrollingEffect(true); + } + } + + if (!_FloatCompareGE(__scrollLength, oldScrollLength) && !_FloatCompareLE(__scrollPosition, __scrollLength)) + { + if (SetScrollPosition(__scrollLength)) + { + ScrollFadeOut(); + FireScrollEvent(); + + __pIconListView->Invalidate(); + } + } + } + + // CachingSize = # of items of view * ITEM_CACHE_SIZE_MULTIPLIER + __pListModel->SetMaxCachingSize((static_cast (bounds.height / __unitScrollLength) + 1) * + __itemCountPerAxis * ITEM_CACHE_SIZE_MULTIPLIER); + } + else + { + // Unit Axis Length(= Item Height + Vertical Spacing) + __unitLengthOfAxis = itemSize.height + __verticalSpacing; + + // ItemCountPerAxis + __itemCountPerAxis = static_cast ((bounds.height - __topMargin - __bottomMargin + __verticalSpacing) / __unitLengthOfAxis); + + // Unit Scroll Length(= Item Width + Horizontal Spacing) + __unitScrollLength = itemSize.width + __horizontalSpacing; + + // ScrollLength + if (__itemCountPerAxis > 0) + { + __scrollLength = __leftMargin + __rightMargin - __horizontalSpacing + __unitScrollLength * + ((itemCount - 1) / __itemCountPerAxis + 1) - bounds.width; + if (!_FloatCompareGE(__scrollLength, 0.0f)) + { + __scrollLength = 0.0f; + } + } + else + { + __itemCountPerAxis = 0; + __scrollLength = 0.0f; + } + + // startPosOfAxis + switch (__itemVerticalAlignment) + { + case ALIGNMENT_TOP: + __startPosOfAxis = __topMargin; + break; + + case ALIGNMENT_MIDDLE: + __startPosOfAxis = (bounds.height + __topMargin - __bottomMargin - __itemCountPerAxis * __unitLengthOfAxis + + __verticalSpacing) / 2; + break; + + case ALIGNMENT_BOTTOM: + __startPosOfAxis = bounds.height - __bottomMargin - __itemCountPerAxis * __unitLengthOfAxis + __verticalSpacing; + break; + } + + // endPosOfAxis + __endPosOfAxis = __startPosOfAxis + __itemCountPerAxis * __unitLengthOfAxis - __verticalSpacing; + + if (!_FloatCompare(__scrollLength, oldScrollLength)) + { + // Set Scroll Range & Position + _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)) + { + pScroll->EnableScrollingEffect(false); + } + else + { + pScroll->EnableScrollingEffect(true); + } + } + + if (!_FloatCompareGE(__scrollLength, oldScrollLength) && !_FloatCompareLE(__scrollPosition, __scrollLength)) + { + if (SetScrollPosition(__scrollLength)) + { + ScrollFadeOut(); + FireScrollEvent(); + + __pIconListView->Invalidate(); + } + } + } + + // CachingSize = # of items of view * ITEM_CACHE_SIZE_MULTIPLIER + __pListModel->SetMaxCachingSize(static_cast (bounds.width / __unitScrollLength + 1) * + __itemCountPerAxis * ITEM_CACHE_SIZE_MULTIPLIER); + } +} + +void +_IconListPresenter::HideItems(int startIndex, int endIndex) +{ + // Valid Check + if (startIndex < 0 || endIndex < 0) + { + return; + } + + if (endIndex >= __pListModel->GetItemCountInGroup(DEFAULT_GROUP_INDEX)) + { + endIndex = __pListModel->GetItemCountInGroup(DEFAULT_GROUP_INDEX) - 1; + } + + for (int index = startIndex; index <= endIndex; ++index) + { + _IconListItem* pItem = dynamic_cast <_IconListItem*>(__pListModel->LoadItem(DEFAULT_GROUP_INDEX, index)); + if (pItem != null) + { + _VisualElement* pBase = pItem->GetVisualElement(); + if (pBase != null) + { + pBase->SetShowState(false); + } + + pItem->ClearVisualElement(); + } + } +} + +result +_IconListPresenter::RedrawItem(int index, bool drawFocusUi, bool doShow) +{ + SysTryReturn(NID_UI_CTRL, (index >= 0 && index < __pListModel->GetItemCountInGroup(DEFAULT_GROUP_INDEX)), E_OUT_OF_RANGE, + E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] Index must be non-negative integer, and less than count of whole items."); + + // Pre-Load Check + + _IconListItem* pItem = dynamic_cast <_IconListItem*>(__pListModel->LoadItem(DEFAULT_GROUP_INDEX, index)); + SysTryReturn(NID_UI_CTRL, (pItem != null), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Unable to get item."); + + // Pre-draw check + if (index < __firstDrawnIndex || index > __lastDrawnIndex) + { + pItem->ClearVisualElement(); + return E_SUCCESS; + } + + FloatRectangle itemRect = GetItemBounds(index); + + pItem->SetDrawingProperty(*__pItemDrawingProperty); + pItem->ClearVisualElement(); + + if (__reorderToIndex == index && __isTouchPressed) + { + 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); + } + else + { + pItem->DrawItem(itemRect, LIST_ITEM_STATE_NORMAL); + } + + if (_AccessibilityManager::IsActivated()) + { + _AccessibilityElement* pAccessibilityElement = pItem->GetItemAccessibilityElement(); + if ((pAccessibilityElement == null || pAccessibilityElement->GetParent() == null) && __needSetAccessibility) + { + pItem->SetItemAccessibilityElement(itemRect, index); + SetAccessibilityElement(index, pItem); + __needSetAccessibility = false; + } + } + + _VisualElement* pBase = pItem->GetVisualElement(); + pBase->InvalidateRectangle(&itemRect); + pBase->Draw(); + + if (doShow) + { + pBase->SetFlushNeeded(); + } + + return E_SUCCESS; +} + +result +_IconListPresenter::FireIconListViewItemEvent(_IconListViewItemEventType eventType, int index, int arg) +{ + // Create EventArg + _IconListViewItemEventArg* pArg = new (std::nothrow) _IconListViewItemEventArg(index, eventType); + SysTryReturn(NID_UI_CTRL, (pArg != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + switch (eventType) + { + case EVENT_TYPE_ITEM_SELECTED: + pArg->SetStatus(static_cast (arg)); + break; + + case EVENT_TYPE_OVERLAY_BITMAP_SELECTED: + pArg->SetOverlayBitmapId(arg); + break; + + case EVENT_TYPE_ITEM_REORDERED: + pArg->SetToIndex(arg); + break; + } + + // Fire Event + return __pIconListView->GetIconListItemEvent()->Fire(*pArg); +} + +result +_IconListPresenter::FireScrollEndReachedEvent(ScrollEndEvent type) +{ + // Create EventArg + _UiScrollEventArg* pEventArg = _UiScrollEventArg::GetScrollEventArgN(*__pIconListView, type); + result r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + // Fire Event + r = __pIconListView->GetScrollEvent()->Fire(*pEventArg); + return r; +CATCH: + delete pEventArg; + return r; +} + +result +_IconListPresenter::FireScrollPositionChangedEvent(float scrollPosition) +{ + // Create EventArg + _UiScrollEventArg* pEventArg = _UiScrollEventArg::GetScrollEventArgN(*__pIconListView, scrollPosition); + result r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + // Fire Event + r = __pIconListView->GetScrollEvent()->Fire(*pEventArg); + return r; +CATCH: + delete pEventArg; + return r; +} + +result +_IconListPresenter::FireScrollStoppedEvent() +{ + // Create EventArg + _UiScrollEventArg* pEventArg = _UiScrollEventArg::GetScrollEventArgN(*__pIconListView); + result r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + // Fire Event + r = __pIconListView->GetScrollEvent()->Fire(*pEventArg); + return r; +CATCH: + delete pEventArg; + return r; +} + +result +_IconListPresenter::FireScrollEvent() +{ + result r = E_SUCCESS; + + if ((__flickRunning) || (__pMagneticScrollTimer != null)) + { + return r; + } + + if (_FloatCompare(__scrollPosition, 0.0f)) + { + if (__scrollDirection == ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL) + { + r = FireScrollEndReachedEvent(SCROLL_END_EVENT_END_TOP); + } + else + { + r = FireScrollEndReachedEvent(SCROLL_END_EVENT_END_LEFT); + } + + if (!__isTouchPressed) + { + ScrollFadeOut(); + } + } + else if (_FloatCompare(__scrollPosition, __scrollLength)) + { + if (__scrollDirection == ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL) + { + r = FireScrollEndReachedEvent(SCROLL_END_EVENT_END_BOTTOM); + } + else + { + r = FireScrollEndReachedEvent(SCROLL_END_EVENT_END_RIGHT); + } + + if (!__isTouchPressed) + { + ScrollFadeOut(); + } + } + else + { + r = FireScrollPositionChangedEvent(__scrollPosition); + } + return r; +} + +bool +_IconListPresenter::SetScrollPosition(float position, bool enableFadeEffect) +{ + if (_FloatCompareLE(__scrollLength, 0.0f) && (!_FloatCompare(position, 0.0f))) + { + return false; + } + + if (_FloatCompare(__scrollPosition, position)) + { + return false; + } + + if (!_FloatCompareLE(position, __scrollLength)) + { + __scrollPosition = __scrollLength; + } + else if (!_FloatCompareGE(position, 0.0f)) + { + __scrollPosition = 0.0f; + } + else + { + __scrollPosition = position; + } + + result r = E_SUCCESS; + _Scroll* pScroll =__pIconListView->GetScroll(); + if (pScroll != null) + { + pScroll->SetScrollingEffectVisibility(true); + + if (pScroll->IsEnabledFadeEffect()) + { + if (enableFadeEffect) + { + pScroll->SetScrollVisibility(true); + } + else + { + pScroll->EnableFadeEffect(false); + pScroll->SetScrollVisibility(true); + pScroll->EnableFadeEffect(true); + } + } + + r = pScroll->SetScrollPosition(position); + } + + return (r == E_SUCCESS); +} + +void +_IconListPresenter::ScrollFadeOut(bool showEffect) +{ + _Scroll* pScroll = __pIconListView->GetScroll(); + if (pScroll != null) + { + if (pScroll->IsEnabledFadeEffect()) + { + if (showEffect) + { + pScroll->EnableFadeEffect(false); + pScroll->SetScrollVisibility(true); + pScroll->SetScrollingEffectVisibility(true); + pScroll->EnableFadeEffect(true); + } + + pScroll->SetScrollVisibility(false); + } + + pScroll->SetScrollingEffectVisibility(false); + } +} + +float +_IconListPresenter::GetMagneticScrollPosition(void) const +{ + return GetMagneticScrollPosition(__scrollPosition); +} + +float +_IconListPresenter::GetMagneticScrollPosition(float scrollPosition) const +{ + if (__magneticScrollSize <= 0) + { + return __scrollPosition; + } + + float leftScrollLength = __scrollLength - scrollPosition; + if (__scrollDirection == ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL) + { + if (!_FloatCompareGE(scrollPosition, __topMargin)) + { + return 0; + } + + scrollPosition -= __topMargin; + } + else + { + if (!_FloatCompareGE(scrollPosition, __leftMargin)) + { + return 0; + } + + scrollPosition -= __leftMargin; + } + + float unitMagneticScrollSize = __unitScrollLength * __magneticScrollSize; + float leftMagneticScrollPosition = scrollPosition - (static_cast (scrollPosition / unitMagneticScrollSize) * unitMagneticScrollSize); + if (!_FloatCompareLE(leftMagneticScrollPosition, leftScrollLength)) + { + scrollPosition = __scrollLength + OVERSCROLLING_MAX_DISTANCE; + } + else if (!_FloatCompareLE(leftMagneticScrollPosition, unitMagneticScrollSize / 2)) + { + scrollPosition = scrollPosition - leftMagneticScrollPosition + unitMagneticScrollSize; + } + else + { + scrollPosition = scrollPosition - leftMagneticScrollPosition; + } + + return scrollPosition; +} + +FloatRectangle +_IconListPresenter::GetItemBounds(int index) const +{ + // Absolute Coordinate Base + FloatRectangle rect(0.0f, 0.0f, GetItemSize().width, GetItemSize().height); + if (__scrollDirection == ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL) + { + rect.x = __startPosOfAxis + __unitLengthOfAxis * (index % __itemCountPerAxis); + rect.y = __topMargin + __unitScrollLength * (index / __itemCountPerAxis) - __scrollPosition; + } + else + { + rect.x = __leftMargin + __unitScrollLength * (index / __itemCountPerAxis) - __scrollPosition; + rect.y = __startPosOfAxis + __unitLengthOfAxis * (index % __itemCountPerAxis); + } + + return rect; +} + +int +_IconListPresenter::CalculateFlickAmount(int distance, int duration) +{ + if (_FloatCompare(distance, 0.0f)) + { + return 0.0f; + } + else if (distance < 0.0) + { + return -SCROLL_PANEL_FIXED_FLICK_AMOUNT; + } + else + { + return SCROLL_PANEL_FIXED_FLICK_AMOUNT; + } +} + +void +_IconListPresenter::TranslateIconListItemPosition(float& x, float& y) +{ + if (_FloatCompareLE(__unitLengthOfAxis, 0.0f) || _FloatCompareLE(__unitScrollLength, 0.0f)) + { + x = -1.0f; + y = -1.0f; + return; + } + + if (__scrollDirection == ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL) + { + x -= __startPosOfAxis; + if (!_FloatCompareGE(x, 0.0f)) + { + x = -1.0f; + y = -1.0f; + return; + } + + x = x - static_cast (x / __unitLengthOfAxis) * __unitLengthOfAxis; + + y += __scrollPosition - __topMargin; + if (!_FloatCompareGE(y, 0.0f)) + { + x = -1.0f; + y = -1.0f; + return; + } + + y = y - static_cast (y / __unitScrollLength) * __unitScrollLength; + } + else + { + y -= __startPosOfAxis; + if (!_FloatCompareGE(y, 0.0f)) + { + x = -1.0f; + y = -1.0f; + return; + } + + y = y - static_cast (y - __unitLengthOfAxis) * __unitLengthOfAxis; + + x += __scrollPosition - __leftMargin; + if (!_FloatCompareGE(x, 0.0f)) + { + x = -1.0f; + y = -1.0f; + return; + } + + x = x - static_cast (x / __unitScrollLength) * __unitScrollLength; + } +} + +result +_IconListPresenter::StartTouchActionTimer(void) +{ + result r = E_SUCCESS; + + if (__pTouchActionTimer == null) + { + __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); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + __pTouchActionTimer->Cancel(); + } + + r = __pTouchActionTimer->Start(TOUCH_ACTION_TIMER_PERIOD); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + +CATCH: + ResetTouchActionTimer(); + return r; +} + +result +_IconListPresenter::ResetTouchActionTimer(void) +{ + delete __pTouchActionTimer; + __pTouchActionTimer = null; + + return E_SUCCESS; +} + +result +_IconListPresenter::StartMagneticScrollTimer(void) +{ + result r = E_SUCCESS; + + if (__pMagneticScrollTimer == null) + { + __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); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + __pMagneticScrollTimer->Cancel(); + } + + r = __pMagneticScrollTimer->Start(MAGNETIC_SCROLL_TIMER_PERIOD); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + +CATCH: + ResetMagneticScrollTimer(); + return r; +} + +result +_IconListPresenter::ResetMagneticScrollTimer(void) +{ + if (__pMagneticScrollTimer != null) + { + FireScrollStoppedEvent(); + } + + delete __pMagneticScrollTimer; + __pMagneticScrollTimer = null; + + return E_SUCCESS; +} + +result +_IconListPresenter::StartReorderScrollTimer(void) +{ + result r = E_SUCCESS; + + if (__pReorderScrollTimer == null) + { + __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); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + __pReorderScrollTimer->Cancel(); + } + + r = __pReorderScrollTimer->Start(REORDER_SCROLL_TIMER_PERIOD); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + +CATCH: + ResetReorderScrollTimer(); + return r; +} + +result +_IconListPresenter::ResetReorderScrollTimer(void) +{ + delete __pReorderScrollTimer; + __pReorderScrollTimer = null; + + return E_SUCCESS; +} + +result +_IconListPresenter::StartAnimationTimer(int delay) +{ + result r = E_SUCCESS; + + if (__pAnimationTimer == null) + { + __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); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + __pAnimationTimer->Cancel(); + } + + r = __pAnimationTimer->Start(delay); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + +CATCH: + ResetAnimationTimer(); + return r; + +} + +result +_IconListPresenter::ResetAnimationTimer(void) +{ + delete __pAnimationTimer; + __pAnimationTimer = null; + + return E_SUCCESS; +} + +result +_IconListPresenter::StartRunningAnimationCheckTimer(void) +{ + result r = E_SUCCESS; + + if (__pRunningAnimationCheckTimer == null) + { + __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); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + __pRunningAnimationCheckTimer->Cancel(); + } + + r = __pRunningAnimationCheckTimer->Start(10); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + +CATCH: + ResetRunningAnimationCheckTimer(); + return r; + +} + +result +_IconListPresenter::ResetRunningAnimationCheckTimer(void) +{ + delete __pRunningAnimationCheckTimer; + __pRunningAnimationCheckTimer = null; + + return E_SUCCESS; +} + +result +_IconListPresenter::StartFirstShowScrollTimer(void) +{ + result r = E_SUCCESS; + + if (__pFirstShowScrollTimer == null) + { + __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); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + __pFirstShowScrollTimer->Cancel(); + } + + r = __pFirstShowScrollTimer->Start(1000); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + +CATCH: + ResetFirstShowScrollTimer(); + return r; + +} + +result +_IconListPresenter::ResetFirstShowScrollTimer(void) +{ + delete __pFirstShowScrollTimer; + __pFirstShowScrollTimer = null; + + return E_SUCCESS; +} + + +// Tizen::Ui::_ControlImpl +void +_IconListPresenter::OnBoundsChanged(void) +{ + __isLayoutChanged = true; + + if (__pIconListView->GetScroll() != null) + { + __pIconListView->GetScroll()->OnParentBoundsChanged(); + } +} + +void +_IconListPresenter::OnFontInfoRequested(unsigned long& style, float& size) +{ + style = FONT_STYLE_PLAIN; + + if (__pListModel->GetItemCountInGroup(DEFAULT_GROUP_INDEX) <= 0) + { + size = __pIconListView->GetTextSizeOfEmptyList(); + } + else + { + size = __pItemDrawingProperty->GetTextSize(); + } +} + +void +_IconListPresenter::OnFontChanged(Font* pFont) +{ + ClearVisualElement(); + __pItemDrawingProperty->SetFont(pFont); +} + +void +_IconListPresenter::OnFocusModeStateChanged(void) +{ + if (__highlightedIndex != INVALID_INDEX) + { + RedrawItem(__highlightedIndex, false); + __highlightedIndex = INVALID_INDEX; + } +} + +void +_IconListPresenter::OnDrawFocus(void) +{ + 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) +{ + int itemCount = __pListModel->GetItemCountInGroup(DEFAULT_GROUP_INDEX); + + if (__pIconListView->GetBackgroundBitmap() != null && itemCount > 0) + { + if (__pVE != null && __lazyDecodeBackGroundBitmap == true) + { + const Bitmap* pBackgroundBitmap = __pIconListView->GetBackgroundBitmap(); + + if (pBackgroundBitmap != null) + { + Canvas* pCanvas = __pVE->GetCanvasN(); + SysTryCatch(NID_UI_CTRL, (pCanvas!= null), , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + Color backgroundColor = __pIconListView->GetBackgroundColor(); + pCanvas->SetBackgroundColor(backgroundColor); + pCanvas->Clear(); + + pBackgroundBitmap->IsNinePatchedBitmap(); + Draw(); + return pCanvas; + } + } + } + else if (__pIconListView->GetBitmapOfEmptyList() != null && itemCount <= 0) + { + if (__pEmptyListVE != null && __lazyDecodeEmptyListBitmap == true) + { + const Bitmap* pEmptyBitmap = __pIconListView->GetBitmapOfEmptyList(); + + if (pEmptyBitmap != null) + { + Canvas* pCanvas = __pEmptyListVE->GetCanvasN(); + SysTryCatch(NID_UI_CTRL, (pCanvas!= null), , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + + pEmptyBitmap->IsNinePatchedBitmap(); + DrawEmptyList(); + return pCanvas; + } + } + } + +CATCH: + return null; +} + +// Tizen::Ui::_IKeyEventPreviewer +bool +_IconListPresenter::OnPreviewKeyPressed(const _Control& source, const _KeyInfo& keyInfo) +{ + return true; +} + +bool +_IconListPresenter::OnPreviewKeyReleased(const _Control& source, const _KeyInfo& keyInfo) +{ + return true; +} + +// Tizen::Ui::_IKeyEventListener +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); + } + else + { + return SetFocusUiIndexHorizontalScrollList(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: + case _KEY_UP: + case _KEY_DOWN: + case _KEY_LEFT: + case _KEY_RIGHT: + break; + case _KEY_ENTER: + { + if (__highlightedIndex != INVALID_INDEX) + { + PreDrawCheckAnimation(__highlightedIndex); + + if (__isTouchAnimationEnabled) + { + StartSelectAnimation(__highlightedIndex); + } + else + { + DrawCheckAnimation(__highlightedIndex); + } + + FireEventAfterTouchRelease(__highlightedIndex); + } + } + break; + + default: + return false; + } + return true; +} + +// Tizen::Ui::_INotificationEventPreviewer +bool +_IconListPresenter::OnPreviewNotifiedN(const _Control& source, IList* pArgs) +{ + delete pArgs; + return true; +} + +// Tizen::Ui::_INotificationEventListener +bool +_IconListPresenter::OnNotifiedN(const _Control& source, IList* pArgs) +{ + delete pArgs; + return true; +} + +// Tizen::Ui::_ITouchEventPreviewer +_UiTouchEventDelivery +_IconListPresenter::OnPreviewTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + if (__selectedIndex < 0) + { + // handle the event of touch release that occurred from thumb style scrollbar + _Scroll* pScroll = __pIconListView->GetScroll(); + if (pScroll != null && pScroll->IsEnabledHandler()) + { + // Trigger Magnetic Scroll Effect + if ((__pMagneticScrollTimer == null) && (!__flickRunning) && (__magneticScrollSize > 0)) + { + float diff = GetMagneticScrollPosition() - __scrollPosition; + if (diff != 0) + { + ResetMagneticScrollTimer(); + + // Trigger Magnetic Scroll Effect + __magneticScrollAnimation.StartAnimation(diff); + StartMagneticScrollTimer(); + } + else + { + ScrollFadeOut(); + } + } + + if ((__pMagneticScrollTimer == null) && (!__flickRunning)) + { + ScrollFadeOut(); + } + } + } + + return _UI_TOUCH_EVENT_DELIVERY_YES; +} + +// Tizen::Ui::_ITouchEventListener +bool +_IconListPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + __currentTouchInfo = touchinfo; + __isTouchPressed = true; + + _Scroll* pScroll = __pIconListView->GetScroll(); + if (pScroll != null) + { + float scrollPosition = pScroll->GetScrollPosition(); + if (!_FloatCompare(scrollPosition, __scrollPosition)) + { + pScroll->SetScrollPosition(__scrollPosition); + } + } + + StopAllAnimations(); + + // Reset Timer + ResetAnimationTimer(); + ResetTouchActionTimer(); + ResetMagneticScrollTimer(); + StartTouchActionTimer(); + + return true; +} + +bool +_IconListPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + __isTouchPressed = false; + __firstTouchMove = true; + int fireIndex = INVALID_INDEX; + + if (__onReordering) + { + FinishReordering(); + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_LIST_REORDER, __pIconListView); + } + else + { + if (__selectedIndex >= 0) + { + fireIndex = __selectedIndex; + __isSelectionDelayed = false; + + PreDrawCheckAnimation(fireIndex); + + if (__isTouchAnimationEnabled) + { + StartSelectAnimation(fireIndex); + } + else + { + DrawCheckAnimation(fireIndex); + } + + FireEventAfterTouchRelease(fireIndex); + } + else if (__pTouchActionTimer != null) + { + ResetTouchActionTimer(); + if (OnTouchActionActivated(*__pIconListView, __currentTouchInfo)) + { + fireIndex = __selectedIndex; + __isSelectionDelayed = true; + + PreDrawCheckAnimation(fireIndex); + + if (__isTouchAnimationEnabled) + { + StartSelectAnimation(fireIndex); + } + else + { + DrawCheckAnimation(fireIndex); + } + + FireEventAfterTouchRelease(fireIndex); + } + } + } + + // Trigger Magnetic Scroll Effect + if ((__pMagneticScrollTimer == null) && (!__flickRunning) && (__magneticScrollSize > 0)) + { + float diff = GetMagneticScrollPosition() - __scrollPosition; + if (!_FloatCompare(diff, 0.0f)) + { + ResetMagneticScrollTimer(); + + // Trigger Magnetic Scroll Effect + __magneticScrollAnimation.StartAnimation(diff); + StartMagneticScrollTimer(); + } + else + { + ScrollFadeOut(); + } + } + + if ((__pMagneticScrollTimer == null) && (!__flickRunning)) + { + if (__pIconListView->GetScroll()->GetScrollVisibility()) + { + ScrollFadeOut(); + } + } + + return true; +} + +void +_IconListPresenter::FireEventAfterTouchRelease(int index) +{ + if (index >= 0 && __pListModel->IsItemEnabled(DEFAULT_GROUP_INDEX, index)) + { + if (__selectedOverlayBitmapId >= 0) + { + FireIconListViewItemEvent(EVENT_TYPE_OVERLAY_BITMAP_SELECTED, index, __selectedOverlayBitmapId); + __selectedOverlayBitmapId = INVALID_INDEX; + return; + } + + switch (__pIconListView->GetStyle()) + { + case ICON_LIST_VIEW_STYLE_NORMAL: + { + FireIconListViewItemEvent(EVENT_TYPE_ITEM_SELECTED, index, ICON_LIST_VIEW_ITEM_SELECTED); + break; + } + + case ICON_LIST_VIEW_STYLE_RADIO: + { + FireIconListViewItemEvent(EVENT_TYPE_ITEM_SELECTED, index, ICON_LIST_VIEW_ITEM_CHECKED); + + break; + } + + case ICON_LIST_VIEW_STYLE_MARK: + { + bool isChecked = __pListModel->IsItemChecked(DEFAULT_GROUP_INDEX, index); + + if (isChecked) + { + FireIconListViewItemEvent(EVENT_TYPE_ITEM_SELECTED, index, ICON_LIST_VIEW_ITEM_CHECKED); + } + else + { + FireIconListViewItemEvent(EVENT_TYPE_ITEM_SELECTED, index, ICON_LIST_VIEW_ITEM_UNCHECKED); + } + break; + } + } + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pIconListView); + } +} + +bool +_IconListPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + const FloatPoint movedPosition = touchinfo.GetCurrentPosition(); + + if (__pTouchActionTimer != null) + { + ResetAnimationTimer(); + ResetTouchActionTimer(); + + int revertIndex = __selectedIndex; + __selectedIndex = INVALID_INDEX; + __selectedOverlayBitmapId = -1; + RedrawItem(revertIndex); + } + + if (__pIconListView == null || !__isTouchPressed) + { + __currentTouchInfo = touchinfo; + return true; + } + + FloatPoint pressedPosition = __currentTouchInfo.GetCurrentPosition(); + + if (__onReordering) + { + DoReordering(movedPosition); + return true; + } + + if (__pIconListView->GetScrollInputMode() == SCROLL_INPUT_MODE_RESTRICT_TO_INITIAL_DIRECTION) + { + float scrollDistanceX = _Abs(pressedPosition.x - movedPosition.x); + float scrollDistanceY = _Abs(pressedPosition.y - movedPosition.y); + + bool isVerticalDirection = scrollDistanceY > scrollDistanceX; + bool isHorizontalDirection = scrollDistanceX > scrollDistanceY; + + if (__firstTouchMove) + { + if (isVerticalDirection) + { + __firstTouchMoveDirection = ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL; + } + else if (isHorizontalDirection) + { + __firstTouchMoveDirection = ICON_LIST_VIEW_SCROLL_DIRECTION_HORIZONTAL; + } + else + { + __firstTouchMoveDirection = __scrollDirection; + } + __firstTouchMove = false; + } + + if (__scrollDirection != __firstTouchMoveDirection) + { + if (__firstTouchMoveDirection == ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL && !isHorizontalDirection) + { + return false; + } + else if (__firstTouchMoveDirection == ICON_LIST_VIEW_SCROLL_DIRECTION_HORIZONTAL && !isVerticalDirection) + { + return false; + } + return true; + } + else + { + if (__firstTouchMoveDirection == ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL && isHorizontalDirection) + { + return true; + } + else if (__firstTouchMoveDirection == ICON_LIST_VIEW_SCROLL_DIRECTION_HORIZONTAL && isVerticalDirection) + { + return true; + } + } + } + + float scrollPosition = __scrollPosition; + + _Scroll* pScroll = __pIconListView->GetScroll(); + if (pScroll != null) + { + scrollPosition = pScroll->GetScrollPosition(); + } + + if (__scrollDirection == ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL) + { + scrollPosition += pressedPosition.y - movedPosition.y; + } + else + { + scrollPosition += pressedPosition.x - movedPosition.x; + } + + __currentTouchInfo = touchinfo; + + if (SetScrollPosition(scrollPosition)) + { + // Draw + __selectedIndex = INVALID_INDEX; + __pIconListView->Invalidate(); + + // Trigger ScrollEvent + FireScrollEvent(); + + return true; + } + + return false; +} + +bool +_IconListPresenter::OnTouchActionActivated(const _Control& source, const _TouchInfo& touchinfo) +{ + if (__pListModel == null || __pIconListView == null) + { + return false; + } + + if (__pIconListView->IsInReorderingMode()) + { + __lastReorderedPosition = touchinfo.GetCurrentPosition(); + PrepareReordering(); + __lastReorderedDifferences.x = touchinfo.GetCurrentPosition().x - __reorderItemBounds.x; + __lastReorderedDifferences.y = touchinfo.GetCurrentPosition().y - __reorderItemBounds.y; + } + else + { + FloatPoint touchPressedPosition = touchinfo.GetCurrentPosition(); + int index = GetItemIndexFromPosition(touchPressedPosition); + if (index >= 0 && __pListModel->IsItemEnabled(DEFAULT_GROUP_INDEX, index)) + { + __selectedIndex = index; + __selectedOverlayBitmapId = -1; + _IconListItem* pItem = dynamic_cast<_IconListItem*>(__pListModel->LoadItem(DEFAULT_GROUP_INDEX, index)); + if (pItem != null) + { + pItem->SetDrawingProperty(*__pItemDrawingProperty); + + TranslateIconListItemPosition(touchPressedPosition.x, touchPressedPosition.y); + if (_FloatCompareGE(touchPressedPosition.x, 0.0f) && _FloatCompareGE(touchPressedPosition.y, 0.0f)) + { + __selectedOverlayBitmapId = pItem->GetOverlayBitmapIdFromPosition(touchPressedPosition); + } + } + + bool flag = __isTouchAnimationEnabled; + __isTouchAnimationEnabled = false; + + RedrawItem(index); + + if (flag) + { + __isTouchAnimationEnabled = true; + } + } + else + { + return false; + } + } + return true; +} + +bool +_IconListPresenter::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + StopScrollToAnimation(); + + ResetAnimationTimer(); + ResetTouchActionTimer(); + ResetMagneticScrollTimer(); + ResetReorderScrollTimer(); + + __isTouchPressed = false; + __firstTouchMove = true; + ScrollFadeOut(); + + return true; +} + +bool +_IconListPresenter::OnFlickGestureDetected(bool isFlicked, const Point& flickPosition, int flickTime) +{ + if (isFlicked) + { + StopAllAnimations(); + + ResetAnimationTimer(); + ResetTouchActionTimer(); + ResetMagneticScrollTimer(); + + __flickRunning = true; + + float targetPosition = __scrollPosition; + if (__scrollDirection == ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL && flickPosition.y != 0) + { + targetPosition -= CalculateFlickAmount(flickPosition.y, flickTime); + } + else if (__scrollDirection == ICON_LIST_VIEW_SCROLL_DIRECTION_HORIZONTAL && flickPosition.x != 0) + { + targetPosition -= CalculateFlickAmount(flickPosition.x, flickTime); + } + + if (_FloatCompareLE(targetPosition, OVERSCROLLING_MAX_DISTANCE * -1)) + { + targetPosition = (OVERSCROLLING_MAX_DISTANCE * -1); + } + else if (_FloatCompareGE(targetPosition, __scrollLength + OVERSCROLLING_MAX_DISTANCE)) + { + targetPosition = (__scrollLength + OVERSCROLLING_MAX_DISTANCE); + } + else if (__magneticScrollSize > 0) + { + targetPosition = GetMagneticScrollPosition(targetPosition); + } + + StartScrollToAnimation(targetPosition); + } + return true; +} + +bool +_IconListPresenter::OnLongPressGestureDetected(void) +{ + return true; +} + +void +_IconListPresenter::OnTimerExpired(Timer& timer) +{ + if (&timer == __pTouchActionTimer) + { + OnTouchActionActivated(*__pIconListView, __currentTouchInfo); + } + else if (&timer == __pMagneticScrollTimer) + { + float scrollPosition = 0.0f; + if (__magneticScrollAnimation.GetMagneticScrollAnimationFrame(scrollPosition)) + { + scrollPosition += __pIconListView->GetScroll()->GetScrollPosition(); + if (SetScrollPosition(scrollPosition)) + { + StartMagneticScrollTimer(); + __pIconListView->Invalidate(); + + FireScrollPositionChangedEvent(__scrollPosition); + } + } + else + { + ResetMagneticScrollTimer(); + + if (!__flickRunning) + { + ScrollFadeOut(); + FireScrollEvent(); + FireScrollStoppedEvent(); + } + } + } + else if (&timer == __pReorderScrollTimer) + { + StartReorderScrollAnimation(); + } + else if (&timer == __pAnimationTimer) + { + int index = __animationItemIndex; + ResetAnimationTimer(); + + // start add animation + _IconListItem* pItem = dynamic_cast <_IconListItem*>(__pListModel->LoadItem(DEFAULT_GROUP_INDEX, index)); + SysTryReturnVoidResult(NID_UI_CTRL, (pItem != null), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + AddAnimation(*pItem, index); + } + else if (&timer == __pRunningAnimationCheckTimer) + { + if (!__isSelectAnimationRunning) + { + ResetRunningAnimationCheckTimer(); + RefreshList(__runningAnimationBackupIndex, LIST_REFRESH_TYPE_ITEM_MODIFY); + __runningAnimationBackupIndex = INVALID_INDEX; + } + else + { + StartRunningAnimationCheckTimer(); + } + } + else if (&timer == __pFirstShowScrollTimer) + { + ScrollFadeOut(); + ResetFirstShowScrollTimer(); + } +} + +void +_IconListPresenter::StartReorderScrollAnimation(void) +{ + float scrollPosition = __scrollPosition; + scrollPosition += __reorderScrollAnimationDistance; + + if (SetScrollPosition(scrollPosition)) + { + __pIconListView->Invalidate(); + FireScrollPositionChangedEvent(__scrollPosition); + + if (!_FloatCompareLE(__scrollPosition, 0.0f) && !_FloatCompareGE(__scrollPosition, __scrollLength)) + { + StartReorderScrollTimer(); + } + } +} + +void +_IconListPresenter::OnVisibleStateChanged(void) +{ + StopScrollToAnimation(); + + ResetAnimationTimer(); + ResetTouchActionTimer(); + ResetMagneticScrollTimer(); + ResetReorderScrollTimer(); +} + +void +_IconListPresenter::OnInputEnableStateChanged(void) +{ + if (__selectedIndex != INVALID_INDEX) + { + int inputEnableIndex = __selectedIndex; + __selectedIndex = INVALID_INDEX; + RedrawItem(inputEnableIndex); + } +} + +// Tizen::Ui::_IScrollEventListener +void +_IconListPresenter::OnScrollEndReached(_Control& source, ScrollEndEvent type) +{ + ScrollFadeOut(); + FireScrollEndReachedEvent(type); +} + +void +_IconListPresenter::OnScrollPositionChanged(_Control& source, float scrollPosition) +{ + StopScrollToAnimation(); + + if (SetScrollPosition(scrollPosition)) + { + __selectedIndex = INVALID_INDEX; + __pIconListView->Invalidate(); + + ScrollFadeOut(); + FireScrollEvent(); + } +} + +void +_IconListPresenter::OnScrollStopped(_Control& source) +{ + FireScrollStoppedEvent(); +} + +void +_IconListPresenter::OnScrollJumpToTop(_Control& source) +{ + StopScrollToAnimation(); + + if (SetScrollPosition(0.0f)) + { + __selectedIndex = INVALID_INDEX; + __pIconListView->Invalidate(); + + ScrollFadeOut(); + FireScrollEvent(); + } +} + +// Tizen::Ui::Animations::IAnimationTransactionEventListener +void +_IconListPresenter::OnAnimationTransactionStarted(int transactionId) +{ +} + +void +_IconListPresenter::OnAnimationTransactionStopped(int transactionId) +{ + if (__addTransactionId == transactionId) + { + __animationItemIndex = INVALID_INDEX; + __addTransactionId = 0; + __pPreviousAnimationVE->SetOpacity(1.0f); + RedrawItem(__previousAnimationItemIndex); + } + else if (__removeTransactionId == transactionId) + { + __removeTransactionId = 0; + + if (__pRemoveItemVE != null) + { + _VisualElement* pParent = __pIconListView->GetVisualElement(); + if (pParent != null) + { + pParent->DetachChild(*__pRemoveItemVE); + } + __pRemoveItemVE->Destroy(); + __pRemoveItemVE = null; + } + + } + else if (__moveTransactionId == transactionId) + { + __moveTransactionId = 0; + } + + ClearVisualElement(); + + if (__pIconListView != null) + { + __pIconListView->Invalidate(); + } +} + +void +_IconListPresenter::OnAnimationTransactionFinished(int transactionId) +{ + if (__addTransactionId == transactionId) + { + __addTransactionId = 0; + RedrawItem(__animationItemIndex); + __animationItemIndex = INVALID_INDEX; + } + else if (__removeTransactionId == transactionId) + { + __removeTransactionId = 0; + + if (__pRemoveItemVE != null) + { + _VisualElement* pParent = __pIconListView->GetVisualElement(); + if (pParent != null) + { + pParent->DetachChild(*__pRemoveItemVE); + } + __pRemoveItemVE->Destroy(); + __pRemoveItemVE = null; + } + } + else if (__moveTransactionId == transactionId) + { + __moveTransactionId = 0; + } +} + +// Tizen::Ui::Animations::IVisualElementAnimationTickEventListener +void +_IconListPresenter::OnTickOccurred(const VisualElementAnimation& animation, const String& keyName, VisualElement& target, const Variant& currentValue) +{ + if (&target != __pIconListView->GetVisualElement() && &target != __pCheckAnimationVE) + { + return; + } + + if (keyName == L"ScrollAnimation") + { + if (SetScrollPosition(currentValue.ToFloat())) + { + __pIconListView->Invalidate(); + FireScrollEvent(); + } + FireScrollPositionChangedEvent(__scrollPosition); + } + + if (keyName == L"CheckAnimation") + { + Canvas* pCanvas = __pCheckAnimationVE->GetCanvasN(); + + if (pCanvas == null) + { + return; + } + + const Bitmap* pBitmap = null; + pBitmap = IsItemChecked(__checkedIndex) ? __pItemDrawingProperty->GetCheckBitmap(): null; + + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + + SysLogException(NID_UI_CTRL, E_SUCCESS, "currentValue %f", currentValue.ToFloat()); + if (pBitmap != null) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pBitmap)) + { + pCanvas->DrawNinePatchedBitmap(FloatRectangle(0.0f, 0.0f, pBitmap->GetWidthF(), pBitmap->GetHeightF()), *pBitmap); + } + else + { + pCanvas->DrawBitmap(FloatRectangle(0.0f, 0.0f, pBitmap->GetWidthF()*currentValue.ToFloat()/1000.0f, pBitmap->GetHeightF()*currentValue.ToFloat()/1000.0f), *pBitmap, FloatRectangle(0.0f, 0.0f, pBitmap->GetWidthF()*currentValue.ToFloat()/1000.0f, pBitmap->GetHeightF()*currentValue.ToFloat()/1000.0f)); + } + } + delete pCanvas; + } +} + +// Tizen::Ui::Animations::IVisualElementAnimationStatusEventListener +void +_IconListPresenter::OnVisualElementAnimationStarted(const VisualElementAnimation& animation, const String& keyName, VisualElement& target) +{ + // nothing + if (keyName == L"CheckAnimation") + { + RedrawItem(__checkedIndex, __highlightedIndex == __checkedIndex); + } +} + +void +_IconListPresenter::OnVisualElementAnimationRepeated(const VisualElementAnimation& animation, const String& keyName, VisualElement& target, long currentRepeatCount) +{ + // nothing +} + +void +_IconListPresenter::OnVisualElementAnimationFinished(const VisualElementAnimation& animation, const String& keyName, VisualElement& target, bool completedNormally) +{ + if (keyName == L"ScrollAnimation") + { + if (&target != __pIconListView->GetVisualElement()) + { + return; + } + + __flickRunning = false; + ScrollFadeOut(); + FireScrollPositionChangedEvent(__scrollPosition); + FireScrollStoppedEvent(); + } + + if (keyName == L"SelectAnimation") + { + if (&target != __pIconListView->GetVisualElement() && &target != __pPreviousSelectAnimationVE && &target != __pSelectAnimationVE) + { + return; + } + + int index = __selectedIndex; + __selectedIndex = INVALID_INDEX; + + if (!completedNormally) + { + if (__pIconListView->GetStyle() == ICON_LIST_VIEW_STYLE_RADIO) + { + if (__checkedIndex != __checkedRadioIndex) + { + RedrawItem(__checkedIndex); + RedrawItem(__checkedRadioIndex); + } + } + RedrawItem(index); + } + else + { + DrawCheckAnimation(index); + } + __isSelectAnimationRunning = false; + } + + if (keyName == L"CheckAnimation") + { + if (&target != __pIconListView->GetVisualElement() && &target != __pPreviousCheckAnimationVE && &target != __pCheckAnimationVE) + { + return; + } + + int index = __checkedIndex; + __checkedIndex = INVALID_INDEX; + + if (!completedNormally) + { + RedrawItem(index); + } + else if (__highlightedIndex == index) + { + RedrawItem(__highlightedIndex, true); + } + __isCheckAnimationRunning = false; + } +} + +void +_IconListPresenter::SetAccessibilityElement(int itemIndex, _IconListItem* pItem) +{ + _AccessibilityContainer* pContainer = __pIconListView->GetAccessibilityContainer(); + + if (_AccessibilityManager::IsActivated() && (pContainer != null)) + { + _AccessibilityElement* pAccessibilityElement = pItem->GetItemAccessibilityElement(); + + if ((pAccessibilityElement != null) && (pAccessibilityElement->GetParent() == null)) + { + _IconListItem* pNextItem = dynamic_cast <_IconListItem*>(__pListModel->LoadItem(DEFAULT_GROUP_INDEX, itemIndex+1)); + + if (pNextItem == null) + { + pContainer->AddElement(*pAccessibilityElement); + } + else + { + _AccessibilityElement* pNextAccessibilityElement = pNextItem->GetItemAccessibilityElement(); + + if (pNextAccessibilityElement == null) + { + pContainer->AddElement(*pAccessibilityElement); + } + else if ((pNextAccessibilityElement != null) && (pNextAccessibilityElement->GetParent() == null)) + { + pContainer->AddElement(*pAccessibilityElement); + } + else + { + LinkedListT<_AccessibilityElement*> elements; + int currentIndex = -1; + + pContainer->GetElements(elements); + + if (elements.IndexOf(pNextAccessibilityElement, currentIndex) == E_SUCCESS) + { + pContainer->InsertElement(*pAccessibilityElement, currentIndex); + } + else + { + pContainer->AddElement(*pAccessibilityElement); + } + } + } + } + } +} + +void +_IconListPresenter::MakeDummyAccessibilityElement(int itemIndex, bool ahead) +{ + if ((itemIndex < 0) || (itemIndex >= __pListModel->GetItemCountInGroup(DEFAULT_GROUP_INDEX))) + { + return; + } + + if (ahead && !__firstDrawnItemFullyDrawn) + { + return; + } + + _AccessibilityContainer* pContainer = __pIconListView->GetAccessibilityContainer(); + if (_AccessibilityManager::IsActivated() && (pContainer != null)) + { + _IconListItem* pItem = dynamic_cast <_IconListItem*>(__pListModel->LoadItem(DEFAULT_GROUP_INDEX, itemIndex)); + + if (pItem != null) + { + FloatRectangle bounds = __pIconListView->GetBoundsF(); + FloatRectangle rect; + rect = (ahead) ? FloatRectangle(-1.0f, -1.0f, 1.0f, 1.0f) + : FloatRectangle(bounds.x + bounds.width, bounds.y + bounds.height, 1.0f, 1.0f); + + pItem->SetItemAccessibilityElement(rect, itemIndex); + SetAccessibilityElement(itemIndex, pItem); + } + } +} + +void +_IconListPresenter::RequestToDrawAccessibilityFocusUi(void) +{ + if (_AccessibilityManager::IsActivated() && __RequestToDrawAccessibilityFocusUi) + { + // AccessibilityElement deactivated + _IconListItem* pItem = null; + int firstLoadedGroupIndex = -1; + int firstLoadedItemIndex = -1; + int lastLoadedGroupIndex = -1; + int lastLoadedItemIndex = -1; + + __pListModel->GetFirstLoadedItemIndex(firstLoadedGroupIndex, firstLoadedItemIndex); + __pListModel->GetLastLoadedItemIndex(lastLoadedGroupIndex, lastLoadedItemIndex); + + for (int i = firstLoadedItemIndex; i < __firstDrawnIndex; i++) + { + pItem = dynamic_cast <_IconListItem*>(__pListModel->LoadItem(DEFAULT_GROUP_INDEX, i)); + SysTryReturnVoidResult(NID_UI_CTRL, (pItem != null), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + if (pItem->GetItemAccessibilityElement() != null) + { + pItem->GetItemAccessibilityElement()->Activate(false); + } + } + + for (int i = __lastDrawnIndex+1; i <= lastLoadedItemIndex; i++) + { + pItem = dynamic_cast <_IconListItem*>(__pListModel->LoadItem(DEFAULT_GROUP_INDEX, i)); + SysTryReturnVoidResult(NID_UI_CTRL, (pItem != null), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + if (pItem->GetItemAccessibilityElement() != null) + { + pItem->GetItemAccessibilityElement()->Activate(false); + } + } + + // set dummy AccessibilityElement + MakeDummyAccessibilityElement((__firstDrawnIndex - 1), true); + MakeDummyAccessibilityElement((__lastDrawnIndex + 1), false); + + _AccessibilityManager::GetInstance()->RequestToDrawFocusUi(); + + __RequestToDrawAccessibilityFocusUi = false; + + // for change GestureMode of _AccessibilityManager + // need to access _AccessibilityManager::SetGestureMode() API + _Control* pDummyControl = _Control::CreateControlN(); + _AccessibilityContainer* pDummyContainer = new (std::nothrow) _AccessibilityContainer(*pDummyControl); + + _AccessibilityManager::GetInstance()->AddContainer(*pDummyContainer); + _AccessibilityManager::GetInstance()->RemoveContainer(*pDummyContainer); + + delete pDummyContainer; + delete pDummyControl; + } +} + +bool +_IconListPresenter::OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + int toItemIndex = -1; + _IconListItem* pItem = null; + + if (__lastDrawnIndex < __pListModel->GetItemCountInGroup(DEFAULT_GROUP_INDEX)) + { + toItemIndex =__lastDrawnIndex + 1 - ((__lastDrawnItemFullyDrawn) ? 0 : GetItemCountPerAxis());; + pItem = static_cast <_IconListItem*>(__pListModel->LoadItem(DEFAULT_GROUP_INDEX, toItemIndex)); + + if (pItem != null) + { + if (&element == pItem->GetItemAccessibilityElement()) + { + ScrollToItem(toItemIndex); + __pIconListView->Invalidate(); + __RequestToDrawAccessibilityFocusUi = true; + } + } + return true; + } + return false; +} + +bool +_IconListPresenter::OnAccessibilityFocusMovedPrevious(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + int toItemIndex = -1; + _IconListItem* pItem = null; + + if (__firstDrawnIndex > 0) + { + toItemIndex = __firstDrawnIndex - 1 + ((__firstDrawnItemFullyDrawn) ? 0 : GetItemCountPerAxis()); + pItem = static_cast <_IconListItem*>(__pListModel->LoadItem(DEFAULT_GROUP_INDEX, toItemIndex)); + + if (pItem != null) + { + if (&element == pItem->GetItemAccessibilityElement()) + { + ScrollToItem(toItemIndex); + __pIconListView->Invalidate(); + __RequestToDrawAccessibilityFocusUi = true; + } + } + return true; + } + return false; +} + +bool +_IconListPresenter::OnAccessibilityReadingElement(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_IconListPresenter::OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_IconListPresenter::OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_IconListPresenter::OnAccessibilityFocusOut(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_IconListPresenter::OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_IconListPresenter::OnAccessibilityValueIncreased(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_IconListPresenter::OnAccessibilityValueDecreased(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_IconListPresenter::OnAccessibilityItemRefreshed(const _AccessibilityContainer& control, const _AccessibilityElement& element, _AccessibilityFocusDirection direction) +{ + int currentItemIndex = -1; + _IconListItem* pItem = null; + + if (direction == _ACCESSIBILITY_FOCUS_DIRECTION_PREVIOUS) + { + int lastItemIndex = __pListModel->GetItemCountInGroup(DEFAULT_GROUP_INDEX) - 1; + currentItemIndex = (__lastDrawnIndex == lastItemIndex) ? __lastDrawnIndex : __lastDrawnIndex + 1; + + pItem = static_cast <_IconListItem*>(__pListModel->LoadItem(DEFAULT_GROUP_INDEX, currentItemIndex)); + + if ((pItem != null) && (&element == pItem->GetItemAccessibilityElement())) + { + ScrollToItem(lastItemIndex); + __pIconListView->Invalidate(); + __pIconListView->Show(); + __RequestToDrawAccessibilityFocusUi = true; + + // accessibility element backup + _AccessibilityElement* pAccessbilityElement = const_cast<_AccessibilityElement*>(&element); + _AccessibilityElement* pLastItemElement = pItem->GetItemAccessibilityElement(); + + // swap accessibility element with last item. + _IconListItem* pSwapItem = static_cast <_IconListItem*>(__pListModel->LoadItem(DEFAULT_GROUP_INDEX, lastItemIndex)); + FloatRectangle swapItemRect = pSwapItem->GetVisualElement()->GetBounds(); + pItem->SetItemAccessibilityElement(swapItemRect, lastItemIndex, *pAccessbilityElement, true); + + // swap accessibility element in linkedlist + LinkedListT<_AccessibilityElement*> OriginaccessibilityElements; + _AccessibilityElement* pSwapElement = null; + __pIconListView->GetAccessibilityContainer()->GetElements(OriginaccessibilityElements); + int elementCount = OriginaccessibilityElements.GetCount(); + + for (int i = 0; i < elementCount; i++) + { + if (OriginaccessibilityElements.GetAt(i, pSwapElement) == E_SUCCESS) + { + if (pSwapElement == const_cast<_AccessibilityElement*>(&element)) + { + OriginaccessibilityElements.SetAt(pLastItemElement, i); + } + } + } + + __RequestToDrawAccessibilityFocusUi = true; + RequestToDrawAccessibilityFocusUi(); + + if (currentItemIndex == lastItemIndex) + { + return false; + } + else + { + return true; + } + } + return false; + } + else if (direction == _ACCESSIBILITY_FOCUS_DIRECTION_NEXT) + { + currentItemIndex = (__firstDrawnIndex == 0) ? __firstDrawnIndex : __firstDrawnIndex - 1; + if (!__firstDrawnItemFullyDrawn) + { + currentItemIndex = __firstDrawnIndex; + } + + pItem = static_cast <_IconListItem*>(__pListModel->LoadItem(DEFAULT_GROUP_INDEX, currentItemIndex)); + + if ((pItem != null) && (&element == pItem->GetItemAccessibilityElement())) + { + // accessibility element backup + ScrollToItem(0); + __pIconListView->Invalidate(); + __pIconListView->Show(); + __RequestToDrawAccessibilityFocusUi = true; + + // accessibility element backup + _AccessibilityElement* pAccessbilityElement = const_cast<_AccessibilityElement*>(&element); + _AccessibilityElement* pLastItemElement = pItem->GetItemAccessibilityElement(); + + // swap accessibility element with last item. + _IconListItem* pSwapItem = static_cast <_IconListItem*>(__pListModel->LoadItem(DEFAULT_GROUP_INDEX, 0)); + FloatRectangle swapItemRect = pSwapItem->GetVisualElement()->GetBounds(); + pItem->SetItemAccessibilityElement(swapItemRect, 0, *pAccessbilityElement, true); + + // swap accessibility element in linkedlist + LinkedListT<_AccessibilityElement*> OriginaccessibilityElements; + _AccessibilityElement* pSwapElement = null; + __pIconListView->GetAccessibilityContainer()->GetElements(OriginaccessibilityElements); + int elementCount = OriginaccessibilityElements.GetCount(); + + for (int i = 0; i < elementCount; i++) + { + if (OriginaccessibilityElements.GetAt(i, pSwapElement) == E_SUCCESS) + { + if (pSwapElement == const_cast<_AccessibilityElement*>(&element)) + { + OriginaccessibilityElements.SetAt(pLastItemElement, i); + } + } + } + + __RequestToDrawAccessibilityFocusUi = true; + RequestToDrawAccessibilityFocusUi(); + if (currentItemIndex == 0) + { + return false; + } + else + { + return true; + } + } + return false; + } + else + { + return false; + } +} + +void +_IconListPresenter::PrepareReordering(void) +{ + int index = GetItemIndexFromPosition(__lastReorderedPosition); + if (__onReordering || index == INVALID_INDEX) + { + return; + } + + __onReordering = true; + __reorderFromIndex = index; + __reorderToIndex = index; + + if (__pListModel->IsValidItem(DEFAULT_GROUP_INDEX, __reorderToIndex)) + { + _IconListItem* pToItem = static_cast <_IconListItem*>(__pListModel->LoadItem(DEFAULT_GROUP_INDEX, __reorderToIndex)); + if (pToItem != null) + { + _VisualElement* pItemVE = pToItem->GetItemVisualElement(); + if (pItemVE != null) + { + __reorderItemBounds = pItemVE->GetBounds(); + pItemVE->SetImplicitAnimationEnabled(false); + RedrawItem(__reorderToIndex); + } + } + else + { + ClearReorderingInformation(); + } + } + else + { + ClearReorderingInformation(); + } +} + +void +_IconListPresenter::DoReordering(const FloatPoint& movedPosition) +{ + if (__pListModel->IsValidItem(DEFAULT_GROUP_INDEX, __reorderToIndex)) + { + _IconListItem* pToItem = static_cast <_IconListItem*>(__pListModel->LoadItem(DEFAULT_GROUP_INDEX, __reorderToIndex)); + if (pToItem != null) + { + _VisualElement* pItemVE = pToItem->GetItemVisualElement(); + if (pItemVE != null) + { + FloatRectangle rect = pItemVE->GetBounds(); + pItemVE->SetShowState(true); + pItemVE->SetImplicitAnimationEnabled(false); + pItemVE->SetBounds(FloatRectangle(movedPosition.x - __lastReorderedDifferences.x, movedPosition.y - __lastReorderedDifferences.y, rect.width, rect.height)); + + if (__scrollDirection == ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL) + { + if (!_FloatCompareGE(movedPosition.y, __topMargin)) + { + __reorderScrollAnimationDistance = -REORDER_SCROLL_ANIMATION_DISTANCE; + if (__pReorderScrollTimer == null && !_FloatCompareLE(__scrollPosition, 0.0f)) + { + __scrollPositionBeforeScrollAnimation = __scrollPosition; + StartReorderScrollTimer(); + } + } + else if (!_FloatCompareLE(movedPosition.y + __lastReorderedDifferences.y, __pIconListView->GetBounds().height - __bottomMargin) && + !_FloatCompareGE(__scrollPosition, __scrollLength)) + { + __reorderScrollAnimationDistance = REORDER_SCROLL_ANIMATION_DISTANCE; + if (__pReorderScrollTimer == null) + { + __scrollPositionBeforeScrollAnimation = __scrollPosition; + StartReorderScrollTimer(); + } + } + else + { + if (__pReorderScrollTimer == null) + { + CheckAndReorderItem(movedPosition.x - __lastReorderedPosition.x, movedPosition.y - __lastReorderedPosition.y); + } + else + { + ResetReorderScrollTimer(); + float diff = __scrollPositionBeforeScrollAnimation - __scrollPosition; + int rowCount = static_cast (diff / __unitScrollLength); + int index = __reorderToIndex - rowCount * __itemCountPerAxis; + __reorderItemBounds.y += diff; + SwapReorderedItems(index, false); + __lastReorderedPosition.y += rowCount * __itemCountPerAxis - __verticalSpacing; + } + } + } + else + { + if (!_FloatCompareGE(movedPosition.x, __leftMargin) && !_FloatCompareLE(__scrollPosition, 0.0f)) + { + __reorderScrollAnimationDistance = -REORDER_SCROLL_ANIMATION_DISTANCE; + if (__pReorderScrollTimer == null) + { + __scrollPositionBeforeScrollAnimation = __scrollPosition; + StartReorderScrollTimer(); + } + } + else if (!_FloatCompareLE(movedPosition.x + __lastReorderedDifferences.x, __pIconListView->GetBounds().width - __rightMargin) && + !_FloatCompareGE(__scrollPosition, __scrollLength)) + { + __reorderScrollAnimationDistance = REORDER_SCROLL_ANIMATION_DISTANCE; + if (__pReorderScrollTimer == null) + { + __scrollPositionBeforeScrollAnimation = __scrollPosition; + StartReorderScrollTimer(); + } + } + else + { + if (__pReorderScrollTimer == null) + { + CheckAndReorderItem(movedPosition.x - __lastReorderedPosition.x, movedPosition.y - __lastReorderedPosition.y); + } + else + { + ResetReorderScrollTimer(); + float diff = __scrollPositionBeforeScrollAnimation - __scrollPosition; + int rowCount = static_cast (diff / __unitScrollLength); + int index = __reorderToIndex - rowCount * __itemCountPerAxis; + __reorderItemBounds.x += diff; + SwapReorderedItems(index, false); + __lastReorderedPosition.x += rowCount * __itemCountPerAxis - __horizontalSpacing; + } + } + } + } + } + } +} + +void +_IconListPresenter::CheckAndReorderItem(float movedX, float movedY) +{ + bool toUp = false; + bool toDown = false; + bool toLeft = false; + bool toRight = false; + + bool singleItemChanged = true; + + float horizontalThreshold = (GetItemSize().width + __verticalSpacing) / 2; + float verticalThreshold = (GetItemSize().height + __verticalSpacing) / 2; + + if (!_FloatCompareLE(_Abs(movedX), horizontalThreshold)) + { + if (!_FloatCompareLE(movedX, 0.0f)) + { + toRight = true; + } + else + { + toLeft = true; + } + } + + if (!_FloatCompareLE(_Abs(movedY), verticalThreshold)) + { + if (!_FloatCompareLE(movedY, 0.0f)) + { + toDown = true; + } + else + { + toUp = true; + } + } + + int toIndex = INVALID_INDEX; + + if (__scrollDirection == ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL) + { + if (toLeft) + { + if (__reorderToIndex % __itemCountPerAxis != 0) + { + toIndex = __reorderToIndex - 1; + __lastReorderedPosition.x -= __unitLengthOfAxis; + } + } + else if (toRight) + { + if (__reorderToIndex % __itemCountPerAxis != __itemCountPerAxis - 1) + { + toIndex = __reorderToIndex + 1; + __lastReorderedPosition.x += __unitLengthOfAxis; + } + } + else if (toUp) + { + if (__reorderToIndex >= __itemCountPerAxis) + { + toIndex = __reorderToIndex - __itemCountPerAxis; + __lastReorderedPosition.y -= __unitScrollLength; + + singleItemChanged = false; + } + } + else if (toDown) + { + if (__reorderToIndex + __itemCountPerAxis < __pListModel->GetAllItemCount()) + { + toIndex = __reorderToIndex +__itemCountPerAxis; + __lastReorderedPosition.y += __unitScrollLength; + + singleItemChanged = false; + } + } + } + else + { + if (toUp) + { + if (__reorderToIndex % __itemCountPerAxis != 0) + { + toIndex = __reorderToIndex - 1; + __lastReorderedPosition.y -= __unitLengthOfAxis; + } + } + else if (toDown) + { + if (__reorderToIndex % __itemCountPerAxis != __itemCountPerAxis - 1) + { + toIndex = __reorderToIndex + 1; + __lastReorderedPosition.y += __unitLengthOfAxis; + } + } + else if (toLeft) + { + if (__reorderToIndex >= __itemCountPerAxis) + { + toIndex = __reorderToIndex - __itemCountPerAxis; + __lastReorderedPosition.x -= __unitScrollLength; + + singleItemChanged = false; + } + } + else if (toRight) + { + if (__reorderToIndex + __itemCountPerAxis < __pListModel->GetAllItemCount()) + { + toIndex = __reorderToIndex +__itemCountPerAxis; + __lastReorderedPosition.x += __unitScrollLength; + + singleItemChanged = false; + } + } + } + + if (toIndex != INVALID_INDEX) + { + SwapReorderedItems(toIndex, singleItemChanged); + } +} + +void +_IconListPresenter::SwapReorderedItems(int toIndex, bool singleItemChanged) +{ + if (toIndex < 0) + { + return; + } + else if (toIndex >= __pListModel->GetAllItemCount()) + { + toIndex -= __itemCountPerAxis; + } + + _IconListItem* pItem = null; + _IconListItem* pTempItem = null; + _VisualElement* pToItemVE = null; + _VisualElement* pToTempItemVE = null; + FloatRectangle tempBounds; + + if (singleItemChanged) + { + pItem = static_cast<_IconListItem*>(__pListModel->LoadItem(DEFAULT_GROUP_INDEX, toIndex)); + if (pItem != null) + { + pToItemVE = pItem->GetItemVisualElement(); + } + if (pToItemVE != null) + { + FloatRectangle bounds = pToItemVE->GetBounds(); + if (bounds.IsEmpty()) + { + bounds = GetItemBounds(toIndex); + + pToItemVE->SetImplicitAnimationEnabled(false); + pToItemVE->SetBounds(bounds); + } + + FloatRectangle temp = __reorderItemBounds; + __reorderItemBounds.SetPosition(bounds.x, bounds.y); + pToItemVE->SetImplicitAnimationEnabled(true); + pToItemVE->SetBounds(temp); + pToItemVE->SetImplicitAnimationEnabled(false); + } + } + else + { + if (__reorderToIndex > toIndex) + { + for (int i = toIndex; i < __reorderToIndex; i++) + { + pItem = static_cast<_IconListItem*>(__pListModel->LoadItem(DEFAULT_GROUP_INDEX, i)); + pTempItem = static_cast<_IconListItem*>(__pListModel->LoadItem(DEFAULT_GROUP_INDEX, i + 1)); + if (pItem != null && pTempItem != null) + { + pToItemVE = pItem->GetItemVisualElement(); + pToTempItemVE = pTempItem->GetItemVisualElement(); + } + + if (pToItemVE != null && pToTempItemVE != null) + { + FloatRectangle temp = pToTempItemVE->GetBounds(); + if (temp.IsEmpty()) + { + temp = GetItemBounds(i + 1); + + pToTempItemVE->SetImplicitAnimationEnabled(false); + pToTempItemVE->SetBounds(temp); + } + + if (i == toIndex) + { + tempBounds = pToItemVE->GetBounds(); + if (tempBounds.IsEmpty()) + { + tempBounds = GetItemBounds(toIndex); + + pToItemVE->SetImplicitAnimationEnabled(false); + pToItemVE->SetBounds(tempBounds); + } + } + else if (i == __reorderToIndex -1) + { + temp = __reorderItemBounds; + __reorderItemBounds.SetPosition(tempBounds.x, tempBounds.y); + } + pToItemVE->SetImplicitAnimationEnabled(true); + pToItemVE->SetBounds(temp); + pToItemVE->SetImplicitAnimationEnabled(false); + } + } + } + else + { + for (int i = toIndex; i > __reorderToIndex; i--) + { + pItem = static_cast<_IconListItem*>(__pListModel->LoadItem(DEFAULT_GROUP_INDEX, i)); + pTempItem = static_cast<_IconListItem*>(__pListModel->LoadItem(DEFAULT_GROUP_INDEX, i - 1)); + if (pItem != null && pTempItem != null) + { + pToItemVE = pItem->GetItemVisualElement(); + pToTempItemVE = pTempItem->GetItemVisualElement(); + } + + if (pToItemVE != null && pToTempItemVE != null) + { + FloatRectangle temp = pToTempItemVE->GetBounds(); + if (temp.IsEmpty()) + { + temp = GetItemBounds(i - 1); + + pToTempItemVE->SetImplicitAnimationEnabled(false); + pToTempItemVE->SetBounds(temp); + } + + if (i == toIndex) + { + tempBounds = pToItemVE->GetBounds(); + if (tempBounds.IsEmpty()) + { + tempBounds = GetItemBounds(toIndex); + + pToItemVE->SetImplicitAnimationEnabled(false); + pToItemVE->SetBounds(tempBounds); + } + } + else if (i == __reorderToIndex + 1) + { + temp = __reorderItemBounds; + __reorderItemBounds.SetPosition(tempBounds.x, tempBounds.y); + } + + pToItemVE->SetImplicitAnimationEnabled(true); + pToItemVE->SetBounds(temp); + pToItemVE->SetImplicitAnimationEnabled(false); + } + } + } + } + + __pListModel->MoveItem(DEFAULT_GROUP_INDEX, __reorderToIndex, DEFAULT_GROUP_INDEX, toIndex); + __reorderToIndex = toIndex; +} + +void +_IconListPresenter::FinishReordering(void) +{ + if (__pListModel->IsValidItem(DEFAULT_GROUP_INDEX, __reorderToIndex)) + { + if (__reorderFromIndex != __reorderToIndex) + { + FireIconListViewItemEvent(EVENT_TYPE_ITEM_REORDERED , __reorderFromIndex, __reorderToIndex); + for (int i = _Min(__reorderFromIndex, __reorderToIndex); i <= _Max(__reorderFromIndex, __reorderToIndex); i++) + { + RedrawItem(i); + } + } + else + { + RedrawItem(__reorderToIndex); + } + } + ResetReorderScrollTimer(); + ClearReorderingInformation(); +} + +void +_IconListPresenter::ClearReorderingInformation(void) +{ + __onReordering = false; + __reorderFromIndex = INVALID_INDEX; + __reorderToIndex = INVALID_INDEX; + __reorderItemBounds.SetBounds(0.0f, 0.0f, 0.0f, 0.0f); +} + +// visual interaction animation +void +_IconListPresenter::StartScrollToAnimation(float targetPosition) +{ + __pVE->RemoveAnimation(L"ScrollAnimation"); + + VisualElementValueAnimation* pScrollingAnimation = __pIconListView->GetScrollingAnimation(); + pScrollingAnimation->SetStartValue(Variant(__scrollPosition)); + pScrollingAnimation->SetEndValue(Variant(targetPosition)); + pScrollingAnimation->SetDuration(FLICK_ANIMATION_DURATION); + __pVE->AddAnimation(L"ScrollAnimation", *pScrollingAnimation); +} + +void +_IconListPresenter::StopScrollToAnimation(void) +{ + __pVE->RemoveAnimation(L"ScrollAnimation"); +} + +void +_IconListPresenter::StopAllAnimations(void) +{ + __pVE->RemoveAnimation(L"ScrollAnimation"); + + if (__isTouchAnimationEnabled && __isSelectAnimationRunning) + { + if (__pSelectAnimationVE != null) + { + __pSelectAnimationVE->RemoveAnimation(L"SelectAnimation"); + } + + if (__previousIndex > INVALID_INDEX && __pListModel->IsLoadedItem(DEFAULT_GROUP_INDEX, __previousIndex)) + { + if (__pPreviousSelectAnimationVE != null) + { + __pPreviousSelectAnimationVE->RemoveAnimation(L"SelectAnimation"); + } + } + } + + if (__pIconListView->GetStyle() != ICON_LIST_VIEW_STYLE_NORMAL && __isCheckAnimationRunning) + { + if (__pCheckAnimationVE != null) + { + __pCheckAnimationVE->RemoveAnimation(L"CheckAnimation"); + } + + if (__previousCheckIndex> INVALID_INDEX && __pListModel->IsLoadedItem(DEFAULT_GROUP_INDEX, __previousCheckIndex)) + { + if (__pPreviousCheckAnimationVE != null) + { + __pPreviousCheckAnimationVE->RemoveAnimation(L"CheckAnimation"); + } + } + } +} + +void +_IconListPresenter::AddAnimation(_IconListItem& item, int index, int delay) +{ + _VisualElement* pVE = item.GetItemVisualElement(); + if (pVE != null) + { + pVE->SetImplicitAnimationEnabled(true); + FloatRectangle endRect(GetItemBounds(index)); + FloatRectangle startRect(endRect.x + (endRect.width * 0.15f), endRect.y + (endRect.height * 0.15f), endRect.width * 0.7f, endRect.height * 0.7f); + + if (IsAnimationRunning(__addTransactionId)) + { + AnimationTransaction::Stop(__addTransactionId); + } + + AnimationTransaction::Begin(__addTransactionId); + AnimationTransaction::SetVisualElementAnimationTimingFunction(VisualElementAnimation::GetTimingFunctionByName("EaseInOut")); + AnimationTransaction::SetVisualElementAnimationDuration(ITEM_ANIMATION_DURATION); + AnimationTransaction::SetVisualElementAnimationDelay(delay); + + // opacity animation + VisualElementPropertyAnimation* pOpacityAnimation = new (std::nothrow) VisualElementPropertyAnimation(); + SysTryReturnVoidResult(NID_UI_CTRL, (pOpacityAnimation != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pOpacityAnimation->SetPropertyName(L"opacity"); + pOpacityAnimation->SetStartValue(Variant(0.0f)); + pOpacityAnimation->SetEndValue(Variant(1.0f)); + + pVE->AddAnimation(L"AddItemOpacityAnimation", *pOpacityAnimation); + delete pOpacityAnimation; + + // scale animation + VisualElementPropertyAnimation* pScaleAnimation = new (std::nothrow) VisualElementPropertyAnimation(); + SysTryReturnVoidResult(NID_UI_CTRL, (pScaleAnimation != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pScaleAnimation->SetPropertyName(L"bounds"); + pScaleAnimation->SetStartValue(Variant(startRect)); + pScaleAnimation->SetEndValue(Variant(endRect)); + + pVE->AddAnimation(L"AddItemScaleAnimation", *pScaleAnimation); + delete pScaleAnimation; + + pVE->SetImplicitAnimationEnabled(false); + + AnimationTransaction::Commit(); + __previousAnimationItemIndex = index; + __pPreviousAnimationVE = pVE; + } +} + +void +_IconListPresenter::RemoveAnimation(_IconListItem& item, int index) +{ + result r = E_SUCCESS; + Canvas* pCanvas = null; + _VisualElement* pItemVE = item.GetItemVisualElement(); + if (pItemVE != null) + { + if (__pRemoveItemVE != null) + { + __pRemoveItemVE->Destroy(); + __pRemoveItemVE = null; + } + + FloatRectangle startRect = pItemVE->GetBounds(); + FloatRectangle endRect = FloatRectangle(startRect.x + (startRect.width * 0.1f), startRect.y + (startRect.height * 0.1f), startRect.width * 0.8f, startRect.height * 0.8f); + + __pRemoveItemVE = new (std::nothrow) _VisualElement(); + SysTryReturnVoidResult(NID_UI_CTRL, __pRemoveItemVE != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = __pRemoveItemVE->Construct(); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pRemoveItemVE->SetSurfaceOpaque(false); + __pRemoveItemVE->SetShowState(true); + __pRemoveItemVE->SetImplicitAnimationEnabled(false); + + r = __pRemoveItemVE->SetBounds(startRect); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + _VisualElement* pParent = __pIconListView->GetVisualElement(); + pParent->AttachChild(*__pRemoveItemVE); + + pCanvas = __pRemoveItemVE->GetCanvasN(); + SysTryCatch(NID_UI_CTRL, (pCanvas != null), , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + pCanvas->Clear(); + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + r = pItemVE->Capture(*pCanvas, FloatRectangle(0.0f, 0.0f, startRect.width, startRect.height), false); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + delete pCanvas; + + if (IsAnimationRunning(__removeTransactionId)) + { + AnimationTransaction::Stop(__removeTransactionId); + } + + AnimationTransaction::Begin(__removeTransactionId); + + // scale animation + VisualElementPropertyAnimation* pScaleAnimation = new (std::nothrow) VisualElementPropertyAnimation(); + SysTryReturnVoidResult(NID_UI_CTRL, (pScaleAnimation != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pScaleAnimation->SetTimingFunction(VisualElementAnimation::GetTimingFunctionByName("EaseInOut")); + pScaleAnimation->SetPropertyName(L"bounds"); + pScaleAnimation->SetStartValue(Variant(startRect)); + pScaleAnimation->SetEndValue(Variant(endRect)); + pScaleAnimation->SetDuration(ITEM_ANIMATION_DURATION); + + String scaleAnimationName(L"RemoveItemScaleAnimation"); + __pRemoveItemVE->AddAnimation(scaleAnimationName, *pScaleAnimation); + delete pScaleAnimation; + + // opacity animation + VisualElementPropertyAnimation* pOpacityAnimation = new (std::nothrow) VisualElementPropertyAnimation(); + SysTryReturnVoidResult(NID_UI_CTRL, (pOpacityAnimation != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pOpacityAnimation->SetTimingFunction(VisualElementAnimation::GetTimingFunctionByName("EaseInOut")); + pOpacityAnimation->SetPropertyName(L"opacity"); + pOpacityAnimation->SetStartValue(Variant(1.0f)); + pOpacityAnimation->SetEndValue(Variant(0.0f)); + pOpacityAnimation->SetDuration(ITEM_ANIMATION_DURATION); + + String opacityAnimationName(L"RemoveItemOpacityAnimation"); + __pRemoveItemVE->AddAnimation(opacityAnimationName, *pOpacityAnimation); + delete pOpacityAnimation; + + AnimationTransaction::Commit(); + } + + return; +CATCH: + delete pCanvas; +} + +void +_IconListPresenter::MoveAnimation(_IconListItem& item, FloatRectangle& bounds, int delay) +{ + _VisualElement* pVE = item.GetItemVisualElement(); + if (pVE != null) + { + pVE->SetImplicitAnimationEnabled(false); + pVE->SetShowState(true); + + // move animation + VisualElementPropertyAnimation* pMoveAnimation = new (std::nothrow) VisualElementPropertyAnimation(); + SysTryReturnVoidResult(NID_UI_CTRL, (pMoveAnimation != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + FloatRectangle startRect = pVE->GetBounds(); + + pMoveAnimation->SetTimingFunction(VisualElementAnimation::GetTimingFunctionByName("EaseInOut")); + pMoveAnimation->SetPropertyName(L"bounds"); + pMoveAnimation->SetStartValue(Variant(startRect)); + pMoveAnimation->SetEndValue(Variant(bounds)); + pMoveAnimation->SetDuration(MOVE_ITEM_ANIMATION_DURATION); + pMoveAnimation->SetDelay(delay); + + String moveAnimationName(L"MoveItemAnimation"); + pVE->AddAnimation(moveAnimationName, *pMoveAnimation); + delete pMoveAnimation; + } +} + +void +_IconListPresenter::MoveAnimation(_IconListItem& item, FloatRectangle& startBounds, FloatRectangle& endBounds, int delay) +{ + if (!item.IsDrawn()) + { + item.SetDrawingProperty(*__pItemDrawingProperty); + item.DrawItem(startBounds, LIST_ITEM_STATE_NORMAL); + } + + _VisualElement* pVE = item.GetItemVisualElement(); + if (pVE != null) + { + pVE->SetImplicitAnimationEnabled(false); + pVE->SetShowState(true); + + // move animation + VisualElementPropertyAnimation* pMoveAnimation = new (std::nothrow) VisualElementPropertyAnimation(); + SysTryReturnVoidResult(NID_UI_CTRL, (pMoveAnimation != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + FloatRectangle startRect = pVE->GetBounds(); + + pMoveAnimation->SetTimingFunction(VisualElementAnimation::GetTimingFunctionByName("EaseInOut")); + pMoveAnimation->SetPropertyName(L"bounds"); + pMoveAnimation->SetStartValue(Variant(startBounds)); + pMoveAnimation->SetEndValue(Variant(endBounds)); + pMoveAnimation->SetDuration(MOVE_ITEM_ANIMATION_DURATION); + pMoveAnimation->SetDelay(delay); + + String moveAnimationName(L"MoveItemAnimation"); + pVE->AddAnimation(moveAnimationName, *pMoveAnimation); + delete pMoveAnimation; + } +} + +void +_IconListPresenter::MoveAnimation(_IconListItem& item, FloatRectangle& bounds, int delay, bool fadeIn) +{ + _VisualElement* pVE = item.GetItemVisualElement(); + if (pVE != null) + { + pVE->SetImplicitAnimationEnabled(false); + + // opacity animation + VisualElementPropertyAnimation* pOpacityAnimation = new (std::nothrow) VisualElementPropertyAnimation(); + SysTryReturnVoidResult(NID_UI_CTRL, (pOpacityAnimation != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pOpacityAnimation->SetTimingFunction(VisualElementAnimation::GetTimingFunctionByName("EaseInOut")); + pOpacityAnimation->SetPropertyName(L"opacity"); + + if (fadeIn) + { + pOpacityAnimation->SetStartValue(Variant(0.0f)); + pOpacityAnimation->SetEndValue(Variant(1.0f)); + } + else + { + pOpacityAnimation->SetStartValue(Variant(1.0f)); + pOpacityAnimation->SetEndValue(Variant(0.0f)); + } + + pOpacityAnimation->SetDuration(MOVE_ITEM_ANIMATION_DURATION); + + String opacityAnimationName(L"MoveItemOpacityAnimation"); + pVE->AddAnimation(opacityAnimationName, *pOpacityAnimation); + delete pOpacityAnimation; + + // move animation + VisualElementPropertyAnimation* pMoveAnimation = new (std::nothrow) VisualElementPropertyAnimation(); + SysTryReturnVoidResult(NID_UI_CTRL, (pMoveAnimation != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + FloatRectangle startRect = pVE->GetBounds(); + + pMoveAnimation->SetTimingFunction(VisualElementAnimation::GetTimingFunctionByName("EaseInOut")); + pMoveAnimation->SetPropertyName(L"bounds"); + pMoveAnimation->SetStartValue(Variant(startRect)); + pMoveAnimation->SetEndValue(Variant(bounds)); + pMoveAnimation->SetDuration(MOVE_ITEM_ANIMATION_DURATION); + pMoveAnimation->SetDelay(delay); + + String moveAnimationName(L"MoveItemAnimation"); + pVE->AddAnimation(moveAnimationName, *pMoveAnimation); + delete pMoveAnimation; + } +} + +void +_IconListPresenter::RemoveAllAnimation(_IconListItem& item) +{ + _VisualElement* pVE = item.GetItemVisualElement(); + if (pVE != null) + { + pVE->RemoveAllAnimations(); + } +} + +void +_IconListPresenter::MoveForward(int index) +{ + int itemCount = __pListModel->GetItemCountInGroup(DEFAULT_GROUP_INDEX); + if (index < 0 || index >= itemCount) + { + return; + } + + int bottomLine = 0; + if (__scrollDirection == ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL) + { + float bottomPosition = __scrollPosition + __pIconListView->GetBounds().height; + bottomLine = (bottomPosition - __topMargin + __verticalSpacing) / __unitScrollLength; + } + else + { + float bottomPosition = __scrollPosition + __pIconListView->GetBounds().width; + bottomLine = (bottomPosition - __leftMargin + __horizontalSpacing) / __unitScrollLength; + } + + int startIndex = index; + int endIndex = (bottomLine + 1) * __itemCountPerAxis; + endIndex = endIndex >= itemCount ? itemCount - 1 : endIndex; + if (startIndex > endIndex) + { + return; + } + + // move forward + _IconListItem* pItem = null; + _VisualElement* pItemVE = null; + + if (IsAnimationRunning(__moveTransactionId)) + { + AnimationTransaction::Stop(__moveTransactionId); + } + + AnimationTransaction::Begin(__moveTransactionId); + + FloatRectangle startBounds; + FloatRectangle endBounds; + for (int i = startIndex; i <= endIndex; i++) + { + startBounds = GetItemBounds(i); + endBounds = GetItemBounds(i - 1); + if (!endBounds.IsEmpty() && !startBounds.IsEmpty()) + { + pItem = static_cast<_IconListItem*>(__pListModel->LoadItem(DEFAULT_GROUP_INDEX, i)); + if (pItem != null) + { + pItemVE = pItem->GetItemVisualElement(); + if (pItemVE != null) + { + if (pItem->IsDrawn()) + { + pItem->ClearVisualElement(); + pItem->SetDrawingProperty(*__pItemDrawingProperty); + pItem->DrawItem(endBounds, LIST_ITEM_STATE_NORMAL); + } + else + { + MoveAnimation(*pItem, startBounds, endBounds, ITEM_ANIMATION_DELAY); + } + } + } + } + } + AnimationTransaction::Commit(); +} + +void +_IconListPresenter::MoveBackward(int index) +{ + int itemCount = __pListModel->GetItemCountInGroup(DEFAULT_GROUP_INDEX); + if (index < 0 || index >= itemCount) + { + return; + } + + int bottomLine = 0; + if (__scrollDirection == ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL) + { + float bottomPosition = __scrollPosition + __pIconListView->GetBounds().height; + bottomLine = (bottomPosition - __topMargin + __verticalSpacing) / __unitScrollLength; + } + else + { + float bottomPosition = __scrollPosition + __pIconListView->GetBounds().width; + bottomLine = (bottomPosition - __leftMargin + __horizontalSpacing) / __unitScrollLength; + } + + int endIndex = index; + int startIndex = (bottomLine + 1) * __itemCountPerAxis; + startIndex = startIndex >= itemCount ? itemCount - 1 : startIndex; + + if (startIndex < endIndex) + { + return; + } + + // move backward + _IconListItem* pItem = null; + _VisualElement* pItemVE = null; + + if (IsAnimationRunning(__moveTransactionId)) + { + AnimationTransaction::Stop(__moveTransactionId); + } + + AnimationTransaction::Begin(__moveTransactionId); + + FloatRectangle startBounds; + FloatRectangle endBounds; + for (int i = startIndex; i >= endIndex; i--) + { + startBounds = GetItemBounds(i); + endBounds = GetItemBounds(i + 1); + if (!startBounds.IsEmpty() && !endBounds.IsEmpty()) + { + pItem = static_cast<_IconListItem*>(__pListModel->LoadItem(DEFAULT_GROUP_INDEX, i)); + if (pItem != null) + { + pItemVE = pItem->GetItemVisualElement(); + if (pItemVE != null) + { + MoveAnimation(*pItem, startBounds, endBounds, 0); + } + } + } + } + AnimationTransaction::Commit(); +} + +bool +_IconListPresenter::IsAnimationRunning(int transactionId) +{ + if (AnimationTransaction::GetStatus(transactionId) == ANIMATION_TRANSACTION_STATUS_PLAYING) + { + return true; + } + + return false; +} + +void +_IconListPresenter::StartSelectAnimation(int index) +{ + if (index <= INVALID_INDEX || index > __pListModel->GetItemCountInGroup(DEFAULT_GROUP_INDEX) - 1) + return; + + if (__previousIndex > INVALID_INDEX && __pPreviousSelectAnimationVE != null) + { + if (__pListModel->IsLoadedItem(DEFAULT_GROUP_INDEX, __previousIndex) && __isSelectAnimationRunning) + { + __pPreviousSelectAnimationVE->RemoveAnimation(L"SelectAnimation"); + } + } + + _IconListItem* pItem = static_cast<_IconListItem*>(__pListModel->LoadItem(DEFAULT_GROUP_INDEX, index)); + __pSelectAnimationVE = pItem->GetSelectAniVisualElement(); + if (__pSelectAnimationVE == null) + { + return; + } + __pSelectAnimationVE->RemoveAllAnimations(); + + FloatRectangle startFloatRect = __pSelectAnimationVE->GetBounds(); + FloatRectangle endFloatRect; + endFloatRect = FloatRectangle(startFloatRect.x + startFloatRect.width*0.5f/2, startFloatRect.y + startFloatRect.height*0.5f/2, startFloatRect.width*0.5f, startFloatRect.height*0.5f); + + VisualElementPropertyAnimation* pSelectAnimation = new (std::nothrow) VisualElementPropertyAnimation(); + SysTryReturnVoidResult(NID_UI_CTRL, (pSelectAnimation != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pSelectAnimation->SetTimingFunction(VisualElementAnimation::GetTimingFunctionByName("EaseInOut")); + pSelectAnimation->SetPropertyName(L"bounds"); + pSelectAnimation->SetAutoReverseEnabled(true); + pSelectAnimation->SetStartValue(Variant(startFloatRect)); + pSelectAnimation->SetEndValue(Variant(endFloatRect)); + pSelectAnimation->SetDuration(TOUCH_ACTION_TIMER_PERIOD); + pSelectAnimation->SetVisualElementAnimationStatusEventListener(__pIconListView); + __pSelectAnimationVE->AddAnimation(L"SelectAnimation", *pSelectAnimation); + delete pSelectAnimation; + + __isSelectAnimationRunning = true; + __pPreviousSelectAnimationVE = __pSelectAnimationVE; + __previousIndex = index; +} + +void +_IconListPresenter::StartCheckAnimation(int index) +{ + if (index <= INVALID_INDEX || index > __pListModel->GetItemCountInGroup(DEFAULT_GROUP_INDEX) - 1) + return; + + _IconListItem* pItem = static_cast<_IconListItem*>(__pListModel->LoadItem(DEFAULT_GROUP_INDEX, index)); + + if (__previousCheckIndex >= 0 && __pPreviousCheckAnimationVE !=null && __isCheckAnimationRunning) + { + if (__pListModel->IsLoadedItem(DEFAULT_GROUP_INDEX, __previousCheckIndex)) + { + __pPreviousCheckAnimationVE->RemoveAnimation(L"CheckAnimation"); + } + } + + const Bitmap* pBackgroundBitmap = __pListModel->IsItemEnabled(DEFAULT_GROUP_INDEX, index) ? (IsItemChecked(index) ? __pItemDrawingProperty->GetCheckedBackgroundBitmap() : __pItemDrawingProperty->GetUnCheckedBackgroundBitmap()) : __pItemDrawingProperty->GetDisabledCheckBitmap(); + + Canvas* pCheckBgCanvas = pItem->GetCheckBGVisualElement()->GetCanvasN(); + + if (pCheckBgCanvas == null) + { + return; + } + + pCheckBgCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCheckBgCanvas->Clear(); + + // draw background of check box + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pBackgroundBitmap)) + { + pCheckBgCanvas->DrawNinePatchedBitmap(FloatRectangle(0.0f, 0.0f, pBackgroundBitmap->GetWidthF(), pBackgroundBitmap->GetHeightF()), *pBackgroundBitmap); + } + else + { + pCheckBgCanvas->DrawBitmap(FloatRectangle(0.0f, 0.0f, pBackgroundBitmap->GetWidthF(), pBackgroundBitmap->GetHeightF()), *pBackgroundBitmap); + } + + delete pCheckBgCanvas; + + __pCheckAnimationVE = pItem->GetCheckAniVisualElement(); + if (__pCheckAnimationVE == null) + { + return; + } + __pCheckAnimationVE->RemoveAllAnimations(); + + VisualElementValueAnimation* pCheckAnimation = new (std::nothrow) VisualElementValueAnimation(); + pCheckAnimation->SetStartValue(Variant(0.0f)); + pCheckAnimation->SetEndValue(Variant(1000.0f)); + pCheckAnimation->SetDuration(150); + pCheckAnimation->SetVisualElementAnimationTickEventListener(__pIconListView); + pCheckAnimation->SetVisualElementAnimationStatusEventListener(__pIconListView); + + __pCheckAnimationVE->AddAnimation(L"CheckAnimation", *pCheckAnimation); + __isCheckAnimationRunning = true; + __pPreviousCheckAnimationVE = __pCheckAnimationVE; + __previousCheckIndex = index; + +} + +result +_IconListPresenter::DrawCheckAnimation(int index) +{ + result r = GetLastResult(); + __selectedIndex = INVALID_INDEX; + + switch (__pIconListView->GetStyle()) + { + case ICON_LIST_VIEW_STYLE_NORMAL: + { + r = RedrawItem(index, __highlightedIndex == index); + break; + } + case ICON_LIST_VIEW_STYLE_RADIO: + { + if (index != __checkedRadioIndex) + { + if (__checkedRadioIndex >= 0 && __pListModel->IsLoadedItem(DEFAULT_GROUP_INDEX, __checkedRadioIndex)) + { + r = RedrawItem(__checkedRadioIndex); + } + __checkedIndex = index; + StartCheckAnimation(index); + } + else + { + r = RedrawItem(index, __highlightedIndex == index); + } + break; + } + case ICON_LIST_VIEW_STYLE_MARK: + { + if (__isItemChecked) + { + r = RedrawItem(index, __highlightedIndex == index); + } + else + { + __checkedIndex = index; + StartCheckAnimation(index); + } + break; + } + } + + __isItemChecked = false; + + return r; +} + +void +_IconListPresenter::PreDrawCheckAnimation(int index) +{ + switch (__pIconListView->GetStyle()) + { + case ICON_LIST_VIEW_STYLE_NORMAL: + { + break; + } + + case ICON_LIST_VIEW_STYLE_RADIO: + { + __checkedRadioIndex = __pListModel->GetIndexOfRadioCheckedItem(0); + __pListModel->SetItemChecked(DEFAULT_GROUP_INDEX, index, true); + break; + } + case ICON_LIST_VIEW_STYLE_MARK: + { + __isItemChecked = __pListModel->IsItemChecked(DEFAULT_GROUP_INDEX, index); + __pListModel->SetItemChecked(DEFAULT_GROUP_INDEX, index, !__isItemChecked); + break; + } + } +} + +void +_IconListPresenter::DrawFocusUi(int focusUiIndex) +{ + StopAllAnimations(); + + // Reset Timer + ResetAnimationTimer(); + ResetTouchActionTimer(); + ResetMagneticScrollTimer(); + + int lastItemIndex = __pListModel->GetItemCountInGroup(DEFAULT_GROUP_INDEX) - 1; + if (focusUiIndex < 0) + { + __highlightedIndex = 0; + } + else if (focusUiIndex > lastItemIndex) + { + __highlightedIndex = lastItemIndex; + } + + if (!__firstDrawnItemFullyDrawn && (__highlightedIndex >= __firstDrawnIndex && __highlightedIndex <= __firstDrawnIndex + GetItemCountPerAxis() - 1)) + { + ScrollToItem(__highlightedIndex); + __pIconListView->Draw(); + } + else if (!__lastDrawnItemFullyDrawn && (__lastDrawnIndex - __highlightedIndex <= GetItemCountPerAxis() - 1)) + { + ScrollToItem(__highlightedIndex); + __pIconListView->Draw(); + } + + if (__highlightedIndex < __firstDrawnIndex || __highlightedIndex > __lastDrawnIndex) + { + ScrollToItem(__highlightedIndex); + __pIconListView->Draw(); + } + + RedrawItem(__highlightedIndex, true); +} + +bool +_IconListPresenter::SetFocusUiIndexVerticalScrollList(const _KeyInfo& keyInfo) +{ + if ((keyInfo.GetKeyCode() >= _KEY_LEFT && keyInfo.GetKeyCode() <= _KEY_RIGHT) && __highlightedIndex == INVALID_INDEX) + { + return false; + } + + else if ((keyInfo.GetKeyCode() >= _KEY_LEFT && keyInfo.GetKeyCode() <= _KEY_RIGHT) && __highlightedIndex != INVALID_INDEX) + { + int lastItemIndex = __pListModel->GetItemCountInGroup(DEFAULT_GROUP_INDEX) - 1; + int lastLineTopIndex = (lastItemIndex / GetItemCountPerAxis()) * GetItemCountPerAxis(); + + if (((keyInfo.GetKeyCode() == _KEY_UP) && (__highlightedIndex >= 0 && __highlightedIndex <= GetItemCountPerAxis() - 1)) || + ((keyInfo.GetKeyCode() == _KEY_DOWN) && (__highlightedIndex <= lastItemIndex && __highlightedIndex >= lastLineTopIndex))) + { + RedrawItem(__highlightedIndex); + __highlightedIndex = INVALID_INDEX; + return false; + } + else if ((keyInfo.GetKeyCode() == _KEY_LEFT && __highlightedIndex == 0) || (keyInfo.GetKeyCode() == _KEY_RIGHT && __highlightedIndex == lastItemIndex)) + { + return false; + } + else + { + RedrawItem(__highlightedIndex); + } + } + else if (keyInfo.GetKeyCode() == _KEY_ENTER) + { + RedrawItem(__highlightedIndex, true); + } + + switch (keyInfo.GetKeyCode()) + { + case _KEY_TAB: + { + RedrawItem(__highlightedIndex); + __highlightedIndex = INVALID_INDEX; + return false; + } + + case _KEY_UP: + { + __highlightedIndex -= GetItemCountPerAxis(); + break; + } + + case _KEY_DOWN: + { + __highlightedIndex += GetItemCountPerAxis(); + break; + } + + case _KEY_LEFT: + { + --__highlightedIndex; + break; + } + + case _KEY_RIGHT: + { + ++__highlightedIndex; + break; + } + + case _KEY_ENTER: + { + __selectedIndex = __highlightedIndex; + return true; + } + + default: + return false; + } + DrawFocusUi(__highlightedIndex); + return true; +} + +bool +_IconListPresenter::SetFocusUiIndexHorizontalScrollList(const _KeyInfo& keyInfo) +{ + if ((keyInfo.GetKeyCode() >= _KEY_LEFT && keyInfo.GetKeyCode() <= _KEY_RIGHT) && __highlightedIndex == INVALID_INDEX) + { + return false; + } + + else if ((keyInfo.GetKeyCode() >= _KEY_LEFT && keyInfo.GetKeyCode() <= _KEY_RIGHT) && __highlightedIndex != INVALID_INDEX) + { + int lastItemIndex = __pListModel->GetItemCountInGroup(DEFAULT_GROUP_INDEX) - 1; + int lastLineTopIndex = (lastItemIndex / GetItemCountPerAxis()) * GetItemCountPerAxis(); + bool isFocusUiTop = false; + bool isFocusUiBottom = false; + + for (int topIndex = __firstDrawnIndex; topIndex <= lastItemIndex; topIndex+=GetItemCountPerAxis()) + { + if (topIndex == __highlightedIndex) + { + isFocusUiTop = true; + break; + } + } + + for (int bottomIndex = __firstDrawnIndex + GetItemCountPerAxis() - 1; bottomIndex <= lastItemIndex; bottomIndex += GetItemCountPerAxis()) + { + if (bottomIndex == __highlightedIndex || __highlightedIndex == lastItemIndex) + { + isFocusUiBottom = true; + break; + } + } + + if ((keyInfo.GetKeyCode() == _KEY_UP && isFocusUiTop) || (keyInfo.GetKeyCode() == _KEY_DOWN && isFocusUiBottom)) + { + RedrawItem(__highlightedIndex); + __highlightedIndex = INVALID_INDEX; + return false; + } + else if ((keyInfo.GetKeyCode() == _KEY_LEFT && (__highlightedIndex >= 0 && __highlightedIndex <= GetItemCountPerAxis() - 1)) || (keyInfo.GetKeyCode() == _KEY_RIGHT && (__highlightedIndex >= lastLineTopIndex && __highlightedIndex <= lastItemIndex))) + { + return false; + } + else + { + RedrawItem(__highlightedIndex); + } + } + else if (keyInfo.GetKeyCode() == _KEY_ENTER) + { + RedrawItem(__highlightedIndex, true); + } + + switch (keyInfo.GetKeyCode()) + { + case _KEY_TAB: + { + if (__highlightedIndex == INVALID_INDEX) + { + __highlightedIndex = 0; + } + else + { + RedrawItem(__highlightedIndex); + __highlightedIndex = INVALID_INDEX; + return false; + } + break; + } + + case _KEY_UP: + { + --__highlightedIndex; + break; + } + + case _KEY_DOWN: + { + ++__highlightedIndex; + break; + } + + case _KEY_LEFT: + { + __highlightedIndex -= GetItemCountPerAxis(); + break; + } + + case _KEY_RIGHT: + { + __highlightedIndex += GetItemCountPerAxis(); + break; + } + + case _KEY_ENTER: + { + __selectedIndex = __highlightedIndex; + return true; + } + + default: + return false; + } + 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_IconListUtils.cpp b/src/ui/controls/FUiCtrl_IconListUtils.cpp new file mode 100644 index 0000000..cf0a786 --- /dev/null +++ b/src/ui/controls/FUiCtrl_IconListUtils.cpp @@ -0,0 +1,201 @@ +// +// 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_IconListUtils.cpp + * @brief This is the implementation file for the _IconListUtils. + */ + +#include "FUi_Math.h" +#include "FUiCtrl_IconListUtils.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +namespace _IconListUtils +{ + +const float TouchAnimation::FRAME_RATIO[TouchAnimation::FRAME_COUNT] = +{0.9375, 0.875, 0.8125, 0.75, 0.6875, 0.625, 0.5625, 0.5, 0.5625, 0.625, 0.6875, 0.75, 0.8125, 0.875, 0.9375, 1.0}; + +TouchAnimation::TouchAnimation(void) + : __frame(0.0f) +{ + +} + +TouchAnimation::~TouchAnimation(void) +{ + +} + +bool +TouchAnimation::GetTouchAnimationFrame(float& ratio) +{ + ratio = FRAME_RATIO[__frame++]; + if (__frame >= FRAME_COUNT) + { + __frame = FRAME_COUNT - 1; + return false; + } + return true; +} + +float +TouchAnimation::GetCurrentAnimationFrame(void) const +{ + return FRAME_RATIO[__frame]; +} + +void +TouchAnimation::StartAnimation(void) +{ + __frame = 0; +} + +MagneticScrollAnimation::MagneticScrollAnimation(void) + : __scroll(0) +{ + +} + +MagneticScrollAnimation::~MagneticScrollAnimation(void) +{ + +} + +bool +MagneticScrollAnimation::GetMagneticScrollAnimationFrame(float& diff) +{ + if (_FloatCompare(__scroll, 0.0f)) + { + diff = 0.0f; + return false; + } + else if (!_FloatCompareLE(__scroll, 0.0f)) + { + diff = (__scroll - 1) / MAGNETIC_SCROLL_EFFECT_DIVIDER + 1; + __scroll -= diff; + if (__scroll < 0.0f) + { + diff += __scroll; + __scroll = 0.0f; + } + return true; + } + else + { + diff = (__scroll + 1) / MAGNETIC_SCROLL_EFFECT_DIVIDER - 1; + __scroll -= diff; + if (__scroll > 0.0f) + { + diff += __scroll; + __scroll = 0.0f; + } + return true; + } +} + +void +MagneticScrollAnimation::StartAnimation(float scroll) +{ + __scroll = scroll; +} + +CheckAnimation::CheckAnimation(void) + : __frame(0) +{ +} + +CheckAnimation::~CheckAnimation(void) +{ +} + +bool +CheckAnimation::GetCheckAnimationFrame(float& ratio) +{ + __frame++; + ratio = (float)__frame / (float)FRAME_COUNT; + + if (__frame >= FRAME_COUNT) + { + return false; + } + + return true; +} + +float +CheckAnimation::GetCurrentAnimationFrame(void) const +{ + float frame = (float) __frame; + if (__frame <= 0) + { + frame = 1.0f; + } + + return frame / (float) FRAME_COUNT; +} + +void +CheckAnimation::StartAnimation(void) +{ + __frame = 0; +} + +ListItemState +EnumConverter::ConvertIconListViewItemDrawingStatusToListItemState(IconListViewItemDrawingStatus status) +{ + switch (status) + { + case ICON_LIST_VIEW_ITEM_DRAWING_STATUS_NORMAL: + return LIST_ITEM_STATE_NORMAL; + + case ICON_LIST_VIEW_ITEM_DRAWING_STATUS_PRESSED: + return LIST_ITEM_STATE_PRESSED; + + case ICON_LIST_VIEW_ITEM_DRAWING_STATUS_HIGHLIGHTED: + return LIST_ITEM_STATE_HIGHLIGHTED; + } + + return LIST_ITEM_STATE_NORMAL; +} + +IconListViewItemDrawingStatus +EnumConverter::ConvertListItemStateToIconListViewItemDrawingStatus(ListItemState state) +{ + switch (state) + { + case LIST_ITEM_STATE_NORMAL: + return ICON_LIST_VIEW_ITEM_DRAWING_STATUS_NORMAL; + + case LIST_ITEM_STATE_PRESSED: + return ICON_LIST_VIEW_ITEM_DRAWING_STATUS_PRESSED; + + case LIST_ITEM_STATE_HIGHLIGHTED: + return ICON_LIST_VIEW_ITEM_DRAWING_STATUS_HIGHLIGHTED; + + default: + return ICON_LIST_VIEW_ITEM_DRAWING_STATUS_NORMAL; + } + + return ICON_LIST_VIEW_ITEM_DRAWING_STATUS_NORMAL; +} + +} // Tizen::Ui::Controls::_IconListUtils + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_IconListView.cpp b/src/ui/controls/FUiCtrl_IconListView.cpp new file mode 100644 index 0000000..b866e5e --- /dev/null +++ b/src/ui/controls/FUiCtrl_IconListView.cpp @@ -0,0 +1,1320 @@ +// +// 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_IconListView.cpp + * @brief This is the implementation file for the _IconListView class. + */ + +//Includes +#include +#include + +#include "FUi_AccessibilityContainer.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_Math.h" +#include "FUi_ResourceManager.h" +#include "FUiAnim_VisualElement.h" +#include "FUiCtrl_IconListItem.h" +#include "FUiCtrl_IconListPresenter.h" +#include "FUiCtrl_IconListView.h" +#include "FUiCtrl_IconListViewItemEventArg.h" +#include "FUiCtrl_IIconListItemEventListener.h" +#include "FUiCtrl_IScrollEventListener.h" +#include "FUiCtrl_UiIconListItemEvent.h" +#include "FUiCtrl_UiScrollEvent.h" +#include "FUiCtrl_UiScrollEventArg.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Animations; + +namespace Tizen { namespace Ui { namespace Controls +{ + +IMPLEMENT_PROPERTY(_IconListView); + +_IconListView::_IconListView(void) + : _Control() + , __pIconListPresenter(null) + , __pScroll(null) + , __pIconListItemEvent(null) + , __pScrollEvent(null) + , __pGestureFlick(null) + , __pGestureLongPress(null) + , __style(ICON_LIST_VIEW_STYLE_NORMAL) + , __scrollStyle(ICON_LIST_SCROLL_STYLE_FADE_OUT) + , __pBackgroundBitmap(null) + , __textOfEmptyList(L"") + , __textColorOfEmptyList(0) + , __textSizeOfEmptyList(0) + , __pBitmapOfEmptyList(null) + , __reorderEnabled(false) + , __pScrollingAnimation(null) + , __scrollInputMode(SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION) +{ + SetControlDelegate(*this); + AddPropertyChangeEventListener(*this); + + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + if (pContainer != null) + { + pContainer->Activate(true); + } +} + +_IconListView::~_IconListView(void) +{ + Dispose(); +} + +result +_IconListView::Dispose(void) +{ + AnimationTransaction::SetTransactionEventListener(null); + + if (__pScrollingAnimation != null) + { + __pScrollingAnimation->SetVisualElementAnimationTickEventListener(null); + __pScrollingAnimation->SetVisualElementAnimationStatusEventListener(null); + + GetVisualElement()->RemoveAllAnimations(); + + delete __pScrollingAnimation; + __pScrollingAnimation = null; + } + + delete __pIconListPresenter; + __pIconListPresenter = null; + + delete __pBackgroundBitmap; + __pBackgroundBitmap = null; + + delete __pBitmapOfEmptyList; + __pBitmapOfEmptyList = null; + + delete __pIconListItemEvent; + __pIconListItemEvent = null; + + delete __pScrollEvent; + __pScrollEvent = null; + + if (__pScroll != null) + { + DetachSystemChild(*__pScroll); + delete __pScroll; + __pScroll = null; + } + + if (__pGestureFlick != null) + { + _ITouchFlickGestureEventListener* pListener = dynamic_cast<_ITouchFlickGestureEventListener*>(this); + __pGestureFlick->RemoveGestureListener(*pListener); + RemoveGestureDetector(*__pGestureFlick); + delete __pGestureFlick; + __pGestureFlick = null; + } + + if (__pGestureLongPress != null) + { + _ITouchLongPressGestureEventListener* pListener = dynamic_cast<_ITouchLongPressGestureEventListener*>(this); + __pGestureLongPress->RemoveGestureListener(*pListener); + RemoveGestureDetector(*__pGestureLongPress); + delete __pGestureLongPress; + __pGestureLongPress = null; + } + + return E_SUCCESS; +} + +_IconListView* +_IconListView::CreateIconListViewN(IconListViewStyle style) +{ + result r = E_SUCCESS; + _IconListView* pCore = null; + _IconListPresenter* pIconListPresenter = null; + + ClearLastResult(); + + // Create _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(); + + // Create _IconListPresenter + pIconListPresenter = _IconListPresenter::CreateInstanceN(*pCore); + SysTryCatch(NID_UI_CTRL, (pIconListPresenter != null), , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + r = pCore->Initialize(*pIconListPresenter); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pCore->SetStyle(style); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + pCore->__pGestureFlick = new (std::nothrow) _TouchFlickGestureDetector(); + + pCore->AddGestureDetector(*(pCore->__pGestureFlick)); + SysTryCatch(NID_UI_CTRL, (GetLastResult() == E_SUCCESS), , r = E_SYSTEM, "[E_SYSTEM] A system error has been occurred. AddGestureDetector failed."); + + r = pCore->__pGestureFlick->AddGestureListener(*pCore); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r = E_SYSTEM, "[E_SYSTEM] A system error has been occurred. AddGestureListener failed."); + + pCore->__pGestureLongPress = new (std::nothrow) _TouchLongPressGestureDetector(); + pCore->AddGestureDetector(*(pCore->__pGestureLongPress)); + SysTryCatch(NID_UI_CTRL, (GetLastResult() == E_SUCCESS), , r = E_SYSTEM, "[E_SYSTEM] A system error has been occurred. AddGestureDetector failed."); + + r = pCore->__pGestureLongPress->AddGestureListener(*pCore); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r = E_SYSTEM, "[E_SYSTEM] A system error has been occurred. AddGestureListener failed."); + + return pCore; + +CATCH: + delete pCore; + + return null; +} + +result +_IconListView::Initialize(_IconListPresenter& presenter) +{ + result r = E_SUCCESS; + Color color; + float textSize = 0.0f; + + // Set _IconListPresenter + __pIconListPresenter = &presenter; + + // Check _VisualElement + 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(); + SysTryCatch(NID_UI_CTRL, (__pIconListItemEvent != null), r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, + "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = __pIconListItemEvent->Construct(*this); + 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(); + SysTryCatch(NID_UI_CTRL, (__pScrollEvent != null), r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, + "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = __pScrollEvent->Construct(*this); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Unable to construct Scroll Event."); + + SetBackgroundColor(Color(0, 0, 0, 0)); + + // Load emtpy content properties + GET_SHAPE_CONFIG(ICONLIST::EMPTY_FONT_SIZE, GetOrientation(), textSize); + SetTextSizeOfEmptyList(textSize); + + GET_COLOR_CONFIG(ICONLIST::EMPTY_TEXT_NORMAL, color); + SetTextColorOfEmptyList(color); + + // Set Touch move allowance config + SetTouchPressThreshold(0.08); + + AnimationTransaction::SetTransactionEventListener(this); + + __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); + __pScrollingAnimation->SetTimingFunction(VisualElementAnimation::GetTimingFunctionByName("EaseOut")); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pScrollingAnimation->SetVisualElementAnimationTickEventListener(this); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pScrollingAnimation->SetVisualElementAnimationStatusEventListener(this); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + +CATCH: + Dispose(); + return r; +} + +result +_IconListView::SetItemProvider(const IIconListViewItemProvider& provider) +{ + return __pIconListPresenter->SetItemProvider(provider); +} + +result +_IconListView::RegisterItemProviderAdaptor(_IListItemProviderAdaptor* pItemProviderAdaptor) +{ + return __pIconListPresenter->RegisterItemProviderAdaptor(pItemProviderAdaptor); +} + +result +_IconListView::AddIconListItemEventListener(const _IIconListItemEventListener& listener) +{ + result r = __pIconListItemEvent->AddListener(listener); + if (r == E_OBJ_ALREADY_EXIST) + { + SysLogException(NID_UI_CTRL, (r = E_SYSTEM), "[E_SYSTEM] A system error has been occurred. The same instance already exists in the event listener list."); + } + return r; +} + +result +_IconListView::RemoveIconListItemEventListener(const _IIconListItemEventListener& listener) +{ + return __pIconListItemEvent->RemoveListener(listener); +} + +result +_IconListView::AddScrollEventListener(const _IScrollEventListener& listener) +{ + result r = __pScrollEvent->AddListener(listener); + if (r == E_OBJ_ALREADY_EXIST) + { + SysLogException(NID_UI_CTRL, (r = E_SYSTEM), "[E_SYSTEM] A system error has been occurred. The same instance already exists in the event listener list."); + } + return r; +} + +result +_IconListView::RemoveScrollEventListener(const _IScrollEventListener& listener) +{ + return __pScrollEvent->RemoveListener(listener); +} + +result +_IconListView::SetStyle(IconListViewStyle style) +{ + SysTryReturn(NID_UI_CTRL, (style >= ICON_LIST_VIEW_STYLE_NORMAL && style <= ICON_LIST_VIEW_STYLE_MARK), E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] Invalid style is used."); + + __style = style; + __pIconListPresenter->SetUseCheckedStyle(__style == ICON_LIST_VIEW_STYLE_NORMAL ? false : true); + + return E_SUCCESS; +} + +IconListViewStyle +_IconListView::GetStyle(void) const +{ + return __style; +} + +result +_IconListView::SetScrollDirection(IconListViewScrollDirection scrollDirection) +{ + return __pIconListPresenter->SetScrollDirection(scrollDirection); +} + +result +_IconListView::SetScrollStyle(IconListViewScrollStyle scrollStyle) +{ + SysTryReturn(NID_UI_CTRL, scrollStyle >= ICON_LIST_SCROLL_STYLE_FADE_OUT && scrollStyle <= ICON_LIST_SCROLL_STYLE_THUMB, + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid scrollStyle is used."); + + __scrollStyle = scrollStyle; + return E_SUCCESS; +} + +IconListViewScrollStyle +_IconListView::GetScrollStyle(void) const +{ + return __scrollStyle; +} + +result +_IconListView::SetBackgroundBitmap(const Bitmap* pBitmap) +{ + result r = E_SUCCESS; + + Bitmap* pCopiedBitmap = null; + if (pBitmap != null) + { + pCopiedBitmap = _BitmapImpl::CloneN(*pBitmap); + r = GetLastResult(); + } + + if (r == E_SUCCESS) + { + delete __pBackgroundBitmap; + __pBackgroundBitmap = pCopiedBitmap; + } + else + { + delete pCopiedBitmap; + } + + __pIconListPresenter->ClearVisualElement(); + + return r; +} + +const Bitmap* +_IconListView::GetBackgroundBitmap(void) const +{ + return __pBackgroundBitmap; +} + +result +_IconListView::SetMargin(MarginType type, float value) +{ + return __pIconListPresenter->SetMargin(type, value); +} + +float +_IconListView::GetMargin(MarginType type) const +{ + return __pIconListPresenter->GetMargin(type); +} + +result +_IconListView::SetItemSpacing(float horizontalSpacing, float verticalSpacing) +{ + return __pIconListPresenter->SetItemSpacing(horizontalSpacing, verticalSpacing); +} + +float +_IconListView::GetItemHorizontalSpacing(void) const +{ + return __pIconListPresenter->GetItemHorizontalSpacing(); +} + +float +_IconListView::GetItemVerticalSpacing(void) const +{ + return __pIconListPresenter->GetItemVerticalSpacing(); +} + +result +_IconListView::SetItemChecked(int index, bool check) +{ + SysTryReturn(NID_UI_CTRL, (__style == ICON_LIST_VIEW_STYLE_RADIO || __style == ICON_LIST_VIEW_STYLE_MARK), E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has been occurred. The style of IconListView is not available to check."); + + return __pIconListPresenter->SetItemChecked(index, check); +} + +bool +_IconListView::IsItemChecked(int index) const +{ + SysTryReturn(NID_UI_CTRL, (__style == ICON_LIST_VIEW_STYLE_RADIO || __style == ICON_LIST_VIEW_STYLE_MARK), false, E_SYSTEM, + "[E_SYSTEM] A system error has been occurred. The style of IconListView is not available to check."); + + return __pIconListPresenter->IsItemChecked(index); +} + +int +_IconListView::GetItemIndexFromPosition(float x, float y) const +{ + return __pIconListPresenter->GetItemIndexFromPosition(x, y); +} + +int +_IconListView::GetItemIndexFromPosition(const Point& position) const +{ + return GetItemIndexFromPosition(_CoordinateSystemUtils::ConvertToFloat(position)); +} + +int +_IconListView::GetItemIndexFromPosition(const FloatPoint& position) const +{ + return __pIconListPresenter->GetItemIndexFromPosition(position); +} + +result +_IconListView::SetPropertyTextHorizontalAlignment(const Variant& alignment) +{ + return __pIconListPresenter->SetTextHorizontalAlignment(static_cast(alignment.ToInt())); +} + +result +_IconListView::SetTextHorizontalAlignment(HorizontalAlignment alignment) +{ + return SetProperty("textHorizontalAlignment", Variant(static_cast(alignment))); +} + +result +_IconListView::SetPropertyTextVerticalAlignment(const Variant& alignment) +{ + return __pIconListPresenter->SetTextVerticalAlignment(static_cast(alignment.ToInt())); +} + +result +_IconListView::SetTextVerticalAlignment(IconListViewItemTextVerticalAlignment alignment) +{ + return SetProperty("textVerticalAlignment", Variant(static_cast(alignment))); +} + +Variant +_IconListView::GetPropertyTextHorizontalAlignment(void) const +{ + return Variant(static_cast(__pIconListPresenter->GetTextHorizontalAlignment())); +} + +HorizontalAlignment +_IconListView::GetTextHorizontalAlignment(void) const +{ + Variant alignment = GetProperty("textHorizontalAlignment"); + return static_cast (alignment.ToInt()); +} + +Variant +_IconListView::GetPropertyTextVerticalAlignment(void) const +{ + return Variant(static_cast(__pIconListPresenter->GetTextVerticalAlignment())); +} + +IconListViewItemTextVerticalAlignment +_IconListView::GetTextVerticalAlignment(void) const +{ + Variant alignment = GetProperty("textVerticalAlignment"); + return static_cast (alignment.ToInt()); +} + +result +_IconListView::SetPropertyTextOfEmptyList(const Variant& text) +{ + __textOfEmptyList = text.ToString(); + + __pIconListPresenter->ClearVisualElement(); + + return E_SUCCESS; +} + +result +_IconListView::SetTextOfEmptyList(const String& text) +{ + return SetProperty("textOfEmptyList", Variant(text)); +} + +Variant +_IconListView::GetPropertyTextOfEmptyList(void) const +{ + return Variant(__textOfEmptyList); +} + +const String +_IconListView::GetTextOfEmptyList(void) const +{ + Variant text = GetProperty("textOfEmptyList"); + return text.ToString(); +} + +result +_IconListView::SetPropertyTextColorOfEmptyList(const Variant& color) +{ + __textColorOfEmptyList = color.ToColor(); + __pIconListPresenter->ClearVisualElement(); + + return E_SUCCESS; +} +result +_IconListView::SetTextColorOfEmptyList(const Color& color) +{ + return SetProperty("textColorOfEmptyList", Variant(color)); +} + +Variant +_IconListView::GetPropertyTextColorOfEmptyList(void) const +{ + return Variant(__textColorOfEmptyList); +} + +const Color +_IconListView::GetTextColorOfEmptyList(void) const +{ + Variant color = GetProperty("textColorOfEmptyList"); + return color.ToColor(); +} + +result +_IconListView::SetTextSizeOfEmptyList(float size) +{ + float minSize = 0.0f; + GET_FIXED_VALUE_CONFIG(ICONLIST::MINIMUM_FONT_SIZE, GetOrientation(), minSize); + SysTryReturn(NID_UI_CTRL, _FloatCompareGE(size, minSize), E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] Invalid argument is used. Font size should be greater than or equal to the minimum size."); + + __textSizeOfEmptyList = size; + + return E_SUCCESS; +} + +float +_IconListView::GetTextSizeOfEmptyList(void) const +{ + return __textSizeOfEmptyList; +} + +result +_IconListView::SetItemTextColor(IconListViewItemDrawingStatus status, const Color& color) +{ + return __pIconListPresenter->SetItemTextColor(status, color); +} + +const Color +_IconListView::GetItemTextColor(IconListViewItemDrawingStatus status) const +{ + return __pIconListPresenter->GetItemTextColor(status); +} + +result +_IconListView::SetPropertyItemTextSize(const Variant& size) +{ + return __pIconListPresenter->SetItemTextSize(size.ToFloat()); +} + +result +_IconListView::SetItemTextSize(float size) +{ + return SetProperty("itemTextSize", Variant((size))); +} + +Variant +_IconListView::GetPropertyItemTextSize(void) const +{ + return Variant(__pIconListPresenter->GetItemTextSize()); +} + +float +_IconListView::GetItemTextSize(void) const +{ + Variant size = GetProperty("itemTextSize"); + return size.ToFloat(); +} + +result +_IconListView::SetPropertyCheckBoxPosition(const Variant& position) +{ + SysTryReturn(NID_UI_CTRL, (__style == ICON_LIST_VIEW_STYLE_RADIO || __style == ICON_LIST_VIEW_STYLE_MARK), E_INVALID_OPERATION, + E_INVALID_OPERATION, "[E_INVALID_OPERATION] The current style of IconListView is not available to check. So can not set position of check box."); + + return __pIconListPresenter->SetCheckBoxPosition(static_cast(position.ToInt())); +} + +result +_IconListView::SetCheckBoxPosition(IconListViewCheckBoxPosition position) +{ + return SetProperty("checkBoxPosition", Variant(static_cast(position))); +} + +Variant +_IconListView::GetPropertyCheckBoxPosition(void) const +{ + SysTryReturn(NID_UI_CTRL, (__style == ICON_LIST_VIEW_STYLE_RADIO || __style == ICON_LIST_VIEW_STYLE_MARK), + Variant(static_cast(ICON_LIST_VIEW_CHECK_BOX_POSITION_TOP_LEFT)), E_INVALID_OPERATION, + "[E_INVALID_OPERATION] The current style of IconListView is not available to check. So can not get position of check box."); + + return Variant(static_cast(__pIconListPresenter->GetCheckBoxPosition())); +} + +IconListViewCheckBoxPosition +_IconListView::GetCheckBoxPosition(void) const +{ + Variant position = GetProperty("checkBoxPosition"); + return static_cast(position.ToInt()); +} + +result +_IconListView::SetPropertyTouchAnimationEnabled(const Variant& enabled) +{ + return __pIconListPresenter->SetTouchAnimationEnabled(enabled.ToBool()); +} + +result +_IconListView::SetTouchAnimationEnabled(bool enable) +{ + return SetProperty("touchAnimationEnabled", Variant(enable)); +} + +Variant +_IconListView::GetPropertyTouchAnimationEnabled(void) const +{ + return Variant(__pIconListPresenter->IsTouchAnimationEnabled()); +} + +bool +_IconListView::IsTouchAnimationEnabled(void) const +{ + Variant enabled = GetProperty("touchAnimationEnabled"); + return enabled.ToBool(); +} + +result +_IconListView::ScrollToItem(int index) +{ + return __pIconListPresenter->ScrollToItem(index); +} + +result +_IconListView::ScrollByPixel(float pixel) +{ + return __pIconListPresenter->ScrollByPixel(pixel); +} + +result +_IconListView::RefreshList(int index, ListRefreshType type) +{ + return __pIconListPresenter->RefreshList(index, type); +} + +result +_IconListView::UpdateList(void) +{ + return __pIconListPresenter->UpdateList(); +} + +result +_IconListView::SetItemBitmapBounds(const Rectangle& bounds) +{ + return SetItemBitmapBounds(_CoordinateSystemUtils::ConvertToFloat(bounds)); +} + +result +_IconListView::SetItemBitmapBounds(const FloatRectangle& bounds) +{ + return __pIconListPresenter->SetItemBitmapBounds(bounds); +} + +const FloatRectangle +_IconListView::GetItemBitmapBounds(void) const +{ + return __pIconListPresenter->GetItemBitmapBounds(); +} + +result +_IconListView::GetItemBitmapSize(float& width, float& height) const +{ + return __pIconListPresenter->GetItemBitmapSize(width, height); +} + +const FloatDimension +_IconListView::GetItemBitmapSize(void) const +{ + return __pIconListPresenter->GetItemBitmapSize(); +} + +result +_IconListView::SetItemSize(const FloatDimension& size) +{ + return __pIconListPresenter->SetItemSize(size); +} + +result +_IconListView::GetItemSize(float& width, float& height) const +{ + return __pIconListPresenter->GetItemSize(width, height); +} + +const FloatDimension +_IconListView::GetItemSize(void) const +{ + return __pIconListPresenter->GetItemSize(); +} + +result +_IconListView::SetPropertyMagneticScrollSize(const Variant& size) +{ + return __pIconListPresenter->SetMagneticScrollSize(size.ToInt()); +} + +result +_IconListView::SetMagneticScrollSize(int scrollSize) +{ + return SetProperty("magneticScrollSize", Variant(scrollSize)); +} + +Variant +_IconListView::GetPropertyMagneticScrollSize(void) const +{ + return Variant(__pIconListPresenter->GetMagneticScrollSize()); +} + +int +_IconListView::GetMagneticScrollSize(void) const +{ + Variant size = GetProperty("magneticScrollSize"); + return size.ToInt(); +} + +int +_IconListView::GetItemCountPerAxis(void) const +{ + return __pIconListPresenter->GetItemCountPerAxis(); +} + +result +_IconListView::SetPropertyItemLayoutHorizontalAlignment(const Variant& alignment) +{ + return __pIconListPresenter->SetItemLayoutHorizontalAlignment(static_cast(alignment.ToInt())); +} + +result +_IconListView::SetItemLayoutHorizontalAlignment(HorizontalAlignment alignment) +{ + return SetProperty("itemLayoutHorizontalAlignment", Variant(static_cast(alignment))); +} + +result +_IconListView::SetPropertyItemLayoutVerticalAlignment(const Variant& alignment) +{ + return __pIconListPresenter->SetItemLayoutVerticalAlignment(static_cast(alignment.ToInt())); +} + +result +_IconListView::SetItemLayoutVerticalAlignment(VerticalAlignment alignment) +{ + return SetProperty("itemLayoutVerticalAlignment", Variant(static_cast(alignment))); +} + +Variant +_IconListView::GetPropertyItemLayoutHorizontalAlignment(void) const +{ + return Variant(static_cast(__pIconListPresenter->GetItemLayoutHorizontalAlignment())); +} + +HorizontalAlignment +_IconListView::GetItemLayoutHorizontalAlignment(void) const +{ + Variant alignment = GetProperty("itemLayoutHorizontalAlignment"); + return static_cast(alignment.ToInt()); +} + +Variant +_IconListView::GetPropertyItemLayoutVerticalAlignment(void) const +{ + return Variant(static_cast(__pIconListPresenter->GetItemLayoutVerticalAlignment())); +} + +VerticalAlignment +_IconListView::GetItemLayoutVerticalAlignment(void) const +{ + Variant alignment = GetProperty("itemLayoutVerticalAlignment"); + return static_cast(alignment.ToInt()); +} + +result +_IconListView::SetPropertyItemBorderStyle(const Variant& style) +{ + return __pIconListPresenter->SetItemBorderStyle(static_cast(style.ToInt())); +} + +result +_IconListView::SetItemBorderStyle(IconListViewItemBorderStyle borderStyle) +{ + return SetProperty("itemBorderStyle", Variant(static_cast(borderStyle))); +} + +Variant +_IconListView::GetPropertyItemBorderStyle(void) const +{ + return Variant(static_cast(__pIconListPresenter->GetItemBorderStyle())); +} + +IconListViewItemBorderStyle +_IconListView::GetItemBorderStyle(void) const +{ + Variant style = GetProperty("itemBorderStyle"); + return static_cast(style.ToInt()); +} + +result +_IconListView::SetBitmapOfEmptyList(const Bitmap* pBitmap) +{ + result r = E_SUCCESS; + Bitmap* pCopiedBitmap = null; + if (pBitmap != null) + { + pCopiedBitmap = _BitmapImpl::CloneN(*pBitmap); + r = GetLastResult(); + } + + if (r == E_SUCCESS) + { + delete __pBitmapOfEmptyList; + __pBitmapOfEmptyList = pCopiedBitmap; + } + else + { + delete pCopiedBitmap; + } + + __pIconListPresenter->ClearVisualElement(); + + return r; +} + +const Bitmap* +_IconListView::GetBitmapOfEmptyList(void) const +{ + return __pBitmapOfEmptyList; +} + +result +_IconListView::SetNonSlidableList(void) +{ + return __pIconListPresenter->SetNonSlidableList(); +} + +result +_IconListView::AddItem(_IconListItem* pItem) +{ + return __pIconListPresenter->AddItem(pItem); +} + +result +_IconListView::InsertItemAt(int index, _IconListItem* pItem) +{ + return __pIconListPresenter->InsertItemAt(index, pItem); +} + +result +_IconListView::SetItemAt(int index, _IconListItem* pItem) +{ + return __pIconListPresenter->SetItemAt(index, pItem); +} + +result +_IconListView::RemoveItemAt(int index) +{ + return __pIconListPresenter->RemoveItemAt(index); +} + +result +_IconListView::RemoveAllItems(void) +{ + return __pIconListPresenter->RemoveAllItems(); +} + +result +_IconListView::SetScroll(const FloatRectangle& bounds, _ScrollDirection scrollDirection) +{ + if (__pScroll == null) + { + __pScroll = _Scroll::CreateScrollN(*this, scrollDirection, + (((__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), + 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."); + + __pScroll->EnableScrollingEffect(true); + __pScroll->SetParentUsingViewport(false); + __pScroll->AddScrollEventListener(*__pIconListPresenter); + + AttachSystemChild(*__pScroll); + } + + return E_SUCCESS; +} + +_Scroll* +_IconListView::GetScroll(void) const +{ + return __pScroll; +} + +void +_IconListView::SetItemBitmapAsAspectRatio(bool isAspect) +{ + __pIconListPresenter->SetItemBitmapAsAspectRatio(isAspect); +} + +bool +_IconListView::IsItemBitmapAsAspectRatio(void) const +{ + return __pIconListPresenter->IsItemBitmapAsAspectRatio(); +} + +_UiIconListItemEvent* +_IconListView::GetIconListItemEvent(void) const +{ + return __pIconListItemEvent; +} + +_UiScrollEvent* +_IconListView::GetScrollEvent(void) const +{ + return __pScrollEvent; +} + +_TouchLongPressGestureDetector* +_IconListView::GetLongPressGesture(void) const +{ + return __pGestureLongPress; +} + +result +_IconListView::SetLongPressGesture(_TouchLongPressGestureDetector* pLongPress) +{ + __pGestureLongPress = pLongPress; + return E_SUCCESS; +} + +_TouchFlickGestureDetector* +_IconListView::GetFlickGesture(void) const +{ + return __pGestureFlick; +} + +result +_IconListView::SetFlickGesture(_TouchFlickGestureDetector* pFlick) +{ + __pGestureFlick = pFlick; + return E_SUCCESS; +} + +result +_IconListView::SetReorderModeEnabled(bool enable) +{ + if (__reorderEnabled != enable) + { + __reorderEnabled = enable; + return __pIconListPresenter->SetReorderModeEnabled(enable); + } + return E_SUCCESS; +} + +bool +_IconListView::IsInReorderingMode(void) const +{ + return __reorderEnabled; +} + +void +_IconListView::SetScrollInputMode(ScrollInputMode mode) +{ + __scrollInputMode = mode; +} + +ScrollInputMode +_IconListView::GetScrollInputMode(void) const +{ + return __scrollInputMode; +} + +void +_IconListView::OnBoundsChanged(void) +{ + __pIconListPresenter->OnBoundsChanged(); +} + +void +_IconListView::OnDraw(void) +{ + __pIconListPresenter->Draw(); +} + +void +_IconListView::OnAncestorVisibleStateChanged(const _Control& control) +{ + _Control::OnAncestorVisibleStateChanged(control); + + OnVisibleStateChanged(); +} + +void +_IconListView::OnAncestorEnableStateChanged(const _Control& control) +{ + _Control::OnAncestorEnableStateChanged(control); + + OnVisibleStateChanged(); +} + +void +_IconListView::OnAncestorInputEnableStateChanged(const _Control& control) +{ + __pIconListPresenter->OnInputEnableStateChanged(); +} + +void +_IconListView::OnChangeLayout(_ControlOrientation orientation) +{ + _Control::OnChangeLayout(orientation); + + __pIconListPresenter->ClearVisualElement(); +} + +void +_IconListView::OnFontInfoRequested(unsigned long& style, int& size) +{ + float floatSize = 0.0f; + __pIconListPresenter->OnFontInfoRequested(style, floatSize); + size = _CoordinateSystemUtils::ConvertToInteger(floatSize); +} + +void +_IconListView::OnFontInfoRequested(unsigned long& style, float& size) +{ + __pIconListPresenter->OnFontInfoRequested(style, size); +} + +void +_IconListView::OnFontChanged(Font* pFont) +{ + __pIconListPresenter->OnFontChanged(pFont); +} + +void +_IconListView::OnFocusModeStateChanged(void) +{ + __pIconListPresenter->OnFocusModeStateChanged(); +} + +void +_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) +{ + return __pIconListPresenter->OnCanvasRequestedN(bounds); +} + + +// Tizen::Ui::_IPreviewKeyEventListener +bool +_IconListView::OnPreviewKeyPressed(const _Control& source, const _KeyInfo& keyInfo) +{ + return __pIconListPresenter->OnPreviewKeyPressed(source, keyInfo); +} + +bool +_IconListView::OnPreviewKeyReleased(const _Control& source, const _KeyInfo& keyInfo) +{ + return __pIconListPresenter->OnPreviewKeyReleased(source, keyInfo); +} + +// Tizen::Ui::_IKeyEventListener +bool +_IconListView::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) +{ + return __pIconListPresenter->OnKeyPressed(source, keyInfo); +} + +bool +_IconListView::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) +{ + return __pIconListPresenter->OnKeyReleased(source, keyInfo); +} + +// Tizen::Ui::_IPreviewNotificationEventListener +bool +_IconListView::OnPreviewNotifiedN(const _Control& source, Collection::IList* pArgs) +{ + return __pIconListPresenter->OnPreviewNotifiedN(source, pArgs); +} + +// Tizen::Ui::_INotificationEventListener +bool +_IconListView::OnNotifiedN(const _Control& source, Collection::IList* pArgs) +{ + return __pIconListPresenter->OnNotifiedN(source, pArgs); +} + +// Tizen::Ui::_ITouchEventPreviewer +_UiTouchEventDelivery +_IconListView::OnPreviewTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pIconListPresenter->OnPreviewTouchReleased(source, touchinfo); +} + +// Tizen::Ui::_ITouchEventListener +bool +_IconListView::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pIconListPresenter->OnTouchPressed(source, touchinfo); +} + +bool +_IconListView::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pIconListPresenter->OnTouchReleased(source, touchinfo); +} + +bool +_IconListView::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pIconListPresenter->OnTouchMoved(source, touchinfo); +} + +bool +_IconListView::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pIconListPresenter->OnTouchCanceled(source, touchinfo); +} + +bool +_IconListView::OnFlickGestureDetected(_TouchFlickGestureDetector& gesture) +{ + int xDistance = 0; + int yDistance = 0; + gesture.GetDistance(xDistance, yDistance); + Point flickPoint(xDistance, yDistance); + + return __pIconListPresenter->OnFlickGestureDetected(true, flickPoint, gesture.GetDuration()); +} + +bool +_IconListView::OnFlickGestureCanceled(_TouchFlickGestureDetector& gesture) +{ + return false; +} + +bool +_IconListView::OnLongPressGestureDetected(_TouchLongPressGestureDetector& gesture) +{ + return __pIconListPresenter->OnLongPressGestureDetected(); +} + +bool +_IconListView::OnLongPressGestureCanceled(_TouchLongPressGestureDetector& gesture) +{ + return false; +} + +void +_IconListView::OnPropertyChanging(_PropertyBase& source, const String& name, const Variant& oldValue, const Variant& newValue) +{ +} + +void +_IconListView::OnPropertyChanged(_PropertyBase& source, const String& name, const Variant& oldValue, const Variant& newValue) +{ +} + +void +_IconListView::OnVisibleStateChanged(void) +{ + if (__pScroll != null) + { + bool enableFadeEffect = __pScroll->IsEnabledFadeEffect(); + if (GetVisibleState() == false) + { + if (enableFadeEffect) + { + __pScroll->SetScrollVisibility(false); + } + } + else if (enableFadeEffect) + { + float scrollViewRange = 0.0f; + float scrollRange = 0.0f; + __pScroll->GetScrollRange(&scrollViewRange, &scrollRange); + + if (!_FloatCompareGE(scrollViewRange, scrollRange)) + { + __pIconListPresenter->ScrollFadeOut(); + } + } + } + + __pIconListPresenter->OnVisibleStateChanged(); +} + +// Tizen::Ui::_IScrollEventListener +void +_IconListView::OnScrollEndReached(_Control& source, ScrollEndEvent type) +{ + __pIconListPresenter->OnScrollEndReached(source, type); +} + +void +_IconListView::OnScrollPositionChanged(_Control& source, float scrollPosition) +{ + __pIconListPresenter->OnScrollPositionChanged(source, scrollPosition); +} + +void +_IconListView::OnScrollStopped(_Control& source) +{ + __pIconListPresenter->OnScrollStopped(source); +} + +// Tizen::Ui::Animations::IAnimationTransactionEventListener +void +_IconListView::OnAnimationTransactionStarted(int transactionId) +{ +} + +void +_IconListView::OnAnimationTransactionStopped(int transactionId) +{ + __pIconListPresenter->OnAnimationTransactionStopped(transactionId); +} + +void +_IconListView::OnAnimationTransactionFinished(int transactionId) +{ + __pIconListPresenter->OnAnimationTransactionFinished(transactionId); +} + +// Tizen::Ui::Animations::IVisualElementAnimationTickEventListener +void +_IconListView::OnTickOccurred(const VisualElementAnimation& animation, const String& keyName, VisualElement& target, const Variant& currentValue) +{ + __pIconListPresenter->OnTickOccurred(animation, keyName, target, currentValue); +} + +// Tizen::Ui::Animations::IVisualElementAnimationStatusEventListener +void +_IconListView::OnVisualElementAnimationStarted(const VisualElementAnimation& animation, const String& keyName, VisualElement& target) +{ + __pIconListPresenter->OnVisualElementAnimationStarted(animation, keyName, target); +} + +void +_IconListView::OnVisualElementAnimationRepeated(const VisualElementAnimation& animation, const String& keyName, VisualElement& target, long currentRepeatCount) +{ + __pIconListPresenter->OnVisualElementAnimationRepeated(animation, keyName, target, currentRepeatCount); +} + +void +_IconListView::OnVisualElementAnimationFinished(const VisualElementAnimation& animation, const String& keyName, VisualElement& target, bool completedNormally) +{ + __pIconListPresenter->OnVisualElementAnimationFinished(animation, keyName, target, completedNormally); +} + +VisualElementValueAnimation* +_IconListView::GetScrollingAnimation(void) const +{ + return __pScrollingAnimation; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_IconListViewImpl.cpp b/src/ui/controls/FUiCtrl_IconListViewImpl.cpp new file mode 100644 index 0000000..84ece73 --- /dev/null +++ b/src/ui/controls/FUiCtrl_IconListViewImpl.cpp @@ -0,0 +1,1048 @@ +// +// 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_IconListViewImpl.cpp + * @brief This is the implementation file for the _IconListViewImpl class. + */ + +//Includes +#include +#include +#include "FUi_UiBuilder.h" +#include "FUiCtrl_IconListView.h" +#include "FUiCtrl_IconListViewImpl.h" +#include "FUiCtrl_IconListViewItemEvent.h" +#include "FUiCtrl_IconListViewItemEventArg.h" +#include "FUiCtrl_ScrollEvent.h" +#include "FUiCtrl_ScrollEventArg.h" +#include "FUi_CoordinateSystemUtils.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_IconListViewImpl::_IconListViewImpl(IconListView* pIconListView, _IconListView* pCore) + : _ControlImpl(pIconListView, pCore) + , __pIconListView(pCore) + , __pIconListViewItemEvent(null) + , __pScrollEvent(null) +{ + // Do nothing +} + +_IconListViewImpl::~_IconListViewImpl(void) +{ + Dispose(); +} + +_IconListViewImpl* +_IconListViewImpl::CreateIconListViewImplN(IconListView* pIconListView) +{ + _IconListView* pCore = _IconListView::CreateIconListViewN(); + SysTryReturn(NID_UI_CTRL, (pCore != null), null , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _IconListViewImpl* pImpl = new (std::nothrow) _IconListViewImpl(pIconListView, pCore); + + result r = CheckConstruction(pCore, pImpl); + SysTryReturn(NID_UI, (r == E_SUCCESS), null , r, "[%s] Propagating.", GetErrorMessage(r)); + + return pImpl; +} + +_IconListViewImpl* +_IconListViewImpl::GetInstance(IconListView& iconListView) +{ + return static_cast<_IconListViewImpl*>(iconListView._pControlImpl); +} + +const _IconListViewImpl* +_IconListViewImpl::GetInstance(const IconListView& iconListView) +{ + return static_cast(iconListView._pControlImpl); +} + +const char* +_IconListViewImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Controls::IconListView"; +} + +IconListView& +_IconListViewImpl::GetPublic(void) +{ + return static_cast (_ControlImpl::GetPublic()); +} + +result +_IconListViewImpl::Dispose(void) +{ + __pIconListView = null; + + if (__pIconListViewItemEvent != null) + { + delete __pIconListViewItemEvent; + __pIconListViewItemEvent = null; + } + + if (__pScrollEvent != null) + { + delete __pScrollEvent; + __pScrollEvent = null; + } + + return E_SUCCESS; +} + +result +_IconListViewImpl::Initialize(IconListView* pIconListView, const FloatDimension& itemBitmapSize, IconListViewStyle style, + IconListViewScrollDirection scrollDirection, IconListViewScrollStyle scrollStyle) +{ + SysTryReturn(NID_UI_CTRL, (__pIconListView != null), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Unable to create IconListView."); + + result r = E_SUCCESS; + FloatRectangle itemBitmapBounds(0.0f, 0.0f, itemBitmapSize.width, itemBitmapSize.height); + + r = __pIconListView->SetStyle(style); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __pIconListView->SetScrollStyle(scrollStyle); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __pIconListView->SetScrollDirection(scrollDirection); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __pIconListView->SetItemBitmapBounds(itemBitmapBounds); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pIconListViewItemEvent = new (std::nothrow) _IconListViewItemEvent; + SysTryCatch(NID_UI_CTRL, (__pIconListViewItemEvent != null), r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, + "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = __pIconListViewItemEvent->Construct(*pIconListView); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __pIconListView->AddIconListItemEventListener(*this); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pScrollEvent = new (std::nothrow) _ScrollEvent(); + SysTryCatch(NID_UI_CTRL, (__pScrollEvent != null), r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, + "[E_OUT_OF_MEMORY] Memory allocation failed/"); + + r = __pScrollEvent->Construct(*pIconListView); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __pIconListView->AddScrollEventListener(*this); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +CATCH: + Dispose(); + return r; +} + +result +_IconListViewImpl::SetItemProvider(IIconListViewItemProvider& provider) +{ + return __pIconListView->SetItemProvider(provider); +} + +void +_IconListViewImpl::AddIconListViewItemEventListener(IIconListViewItemEventListener& listener) +{ + result r = __pIconListViewItemEvent->AddListener(listener); + if (r == E_OBJ_ALREADY_EXIST) + { + SysLogException(NID_UI_CTRL, (r = E_SYSTEM), "[E_SYSTEM] A system error has been occurred. The same instance already exists in the event listener list."); + } + else + { + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + } + + SetLastResult(r); +} + +void +_IconListViewImpl::RemoveIconListViewItemEventListener(IIconListViewItemEventListener& listener) +{ + result r = __pIconListViewItemEvent->RemoveListener(listener); + if (r == E_OBJ_NOT_FOUND) + { + SysLogException(NID_UI_CTRL, (r = E_SYSTEM), "[E_SYSTEM] A system error has been occurred. The specified listener does not exist in the event listener list."); + } + else + { + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + } + + SetLastResult(r); +} + +void +_IconListViewImpl::AddScrollEventListener(IScrollEventListener& listener) +{ + result r = __pScrollEvent->AddListener(listener); + if (r == E_OBJ_ALREADY_EXIST) + { + SysLogException(NID_UI_CTRL, (r = E_SYSTEM), "[E_SYSTEM] A system error has been occurred. The same instance already exists in the event listener list."); + } + else + { + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + } + + SetLastResult(r); +} + +void +_IconListViewImpl::AddScrollEventListener(IScrollEventListenerF& listener) +{ + result r = __pScrollEvent->AddListener(listener); + if (r == E_OBJ_ALREADY_EXIST) + { + SysLogException(NID_UI_CTRL, (r = E_SYSTEM), "[E_SYSTEM] A system error has been occurred. The same instance already exists in the event listener list."); + } + else + { + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + } + + SetLastResult(r); +} + +void +_IconListViewImpl::RemoveScrollEventListener(IScrollEventListener& listener) +{ + result r = __pScrollEvent->RemoveListener(listener); + if (r == E_OBJ_NOT_FOUND) + { + SysLogException(NID_UI_CTRL, (r = E_SYSTEM), "[E_SYSTEM] A system error has been occurred. The specified listener does not exist in the event listener list."); + } + else + { + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + } + + SetLastResult(r); +} + +void +_IconListViewImpl::RemoveScrollEventListener(IScrollEventListenerF& listener) +{ + result r = __pScrollEvent->RemoveListener(listener); + if (r == E_OBJ_NOT_FOUND) + { + SysLogException(NID_UI_CTRL, (r = E_SYSTEM), "[E_SYSTEM] A system error has been occurred. The specified listener does not exist in the event listener list."); + } + else + { + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + } + + SetLastResult(r); +} + +result +_IconListViewImpl::SetBackgroundBitmap(const Bitmap* pBitmap) +{ + return __pIconListView->SetBackgroundBitmap(pBitmap); +} + +result +_IconListViewImpl::SetMargin(MarginType type, float value) +{ + return __pIconListView->SetMargin(type, value); +} + +float +_IconListViewImpl::GetMargin(MarginType type) const +{ + return __pIconListView->GetMargin(type); +} + +result +_IconListViewImpl::SetItemSpacing(float horizontalSpacing, float verticalSpacing) +{ + return __pIconListView->SetItemSpacing(horizontalSpacing, verticalSpacing); +} + +float +_IconListViewImpl::GetItemHorizontalSpacing(void) const +{ + return __pIconListView->GetItemHorizontalSpacing(); +} + +float +_IconListViewImpl::GetItemVerticalSpacing(void) const +{ + return __pIconListView->GetItemVerticalSpacing(); +} + +result +_IconListViewImpl::SetItemChecked(int index, bool check) +{ + return __pIconListView->SetItemChecked(index, check); +} + +bool +_IconListViewImpl::IsItemChecked(int index) const +{ + return __pIconListView->IsItemChecked(index); +} + +int +_IconListViewImpl::GetItemIndexFromPosition(float x, float y) const +{ + return __pIconListView->GetItemIndexFromPosition(x, y); +} + +int +_IconListViewImpl::GetItemIndexFromPosition(const FloatPoint& position) const +{ + return __pIconListView->GetItemIndexFromPosition(position); +} + +result +_IconListViewImpl::SetTextHorizontalAlignment(HorizontalAlignment alignment) +{ + return __pIconListView->SetTextHorizontalAlignment(alignment); +} + +result +_IconListViewImpl::SetTextVerticalAlignment(IconListViewItemTextVerticalAlignment alignment) +{ + return __pIconListView->SetTextVerticalAlignment(alignment); +} + +HorizontalAlignment +_IconListViewImpl::GetTextHorizontalAlignment(void) const +{ + ClearLastResult(); + return __pIconListView->GetTextHorizontalAlignment(); +} + +IconListViewItemTextVerticalAlignment +_IconListViewImpl::GetTextVerticalAlignment(void) const +{ + ClearLastResult(); + return __pIconListView->GetTextVerticalAlignment(); +} + +result +_IconListViewImpl::SetTextOfEmptyList(const String& text) +{ + return __pIconListView->SetTextOfEmptyList(text); +} + +String +_IconListViewImpl::GetTextOfEmptyList(void) const +{ + ClearLastResult(); + return __pIconListView->GetTextOfEmptyList(); +} + +result +_IconListViewImpl::SetTextColorOfEmptyList(const Color& color) +{ + return __pIconListView->SetTextColorOfEmptyList(color); +} + +Color +_IconListViewImpl::GetTextColorOfEmptyList(void) const +{ + ClearLastResult(); + return __pIconListView->GetTextColorOfEmptyList(); +} + +result +_IconListViewImpl::SetItemTextColor(IconListViewItemDrawingStatus status, const Color& color) +{ + return __pIconListView->SetItemTextColor(status, color); +} + +Color +_IconListViewImpl::GetItemTextColor(IconListViewItemDrawingStatus status) const +{ + return __pIconListView->GetItemTextColor(status); +} + +result +_IconListViewImpl::SetItemTextSize(float size) +{ + return __pIconListView->SetItemTextSize(size); +} + +float +_IconListViewImpl::GetItemTextSize(void) const +{ + ClearLastResult(); + return __pIconListView->GetItemTextSize(); +} + +result +_IconListViewImpl::SetCheckBoxPosition(IconListViewCheckBoxPosition position) +{ + return __pIconListView->SetCheckBoxPosition(position); +} + +IconListViewCheckBoxPosition +_IconListViewImpl::GetCheckBoxPosition(void) const +{ + ClearLastResult(); + return __pIconListView->GetCheckBoxPosition(); +} + +result +_IconListViewImpl::SetTouchAnimationEnabled(bool enable) +{ + return __pIconListView->SetTouchAnimationEnabled(enable); +} + +bool +_IconListViewImpl::IsTouchAnimationEnabled(void) const +{ + ClearLastResult(); + return __pIconListView->IsTouchAnimationEnabled(); +} + +result +_IconListViewImpl::ScrollToItem(int index) +{ + return __pIconListView->ScrollToItem(index); +} + +result +_IconListViewImpl::ScrollByPixel(float pixel) +{ + return __pIconListView->ScrollByPixel(pixel); +} + +result +_IconListViewImpl::RefreshList(int index, ListRefreshType type) +{ + return __pIconListView->RefreshList(index, type); +} + +result +_IconListViewImpl::UpdateList(void) +{ + return __pIconListView->UpdateList(); +} + +result +_IconListViewImpl::GetItemBitmapSize(float& width, float& height) const +{ + return __pIconListView->GetItemBitmapSize(width, height); +} + +FloatDimension +_IconListViewImpl::GetItemBitmapSize(void) const +{ + return __pIconListView->GetItemBitmapSize(); +} + +result +_IconListViewImpl::GetItemSize(float& width, float& height) const +{ + return __pIconListView->GetItemSize(width, height); +} + +FloatDimension +_IconListViewImpl::GetItemSize(void) const +{ + return __pIconListView->GetItemSize(); +} + +result +_IconListViewImpl::SetMagneticScrollSize(int scrollSize) +{ + return __pIconListView->SetMagneticScrollSize(scrollSize); +} + +int +_IconListViewImpl::GetMagneticScrollSize(void) const +{ + ClearLastResult(); + return __pIconListView->GetMagneticScrollSize(); +} + +int +_IconListViewImpl::GetItemCountPerAxis(void) const +{ + return __pIconListView->GetItemCountPerAxis(); +} + +result +_IconListViewImpl::SetItemLayoutHorizontalAlignment(HorizontalAlignment alignment) +{ + return __pIconListView->SetItemLayoutHorizontalAlignment(alignment); +} + +result +_IconListViewImpl::SetItemLayoutVerticalAlignment(VerticalAlignment alignment) +{ + return __pIconListView->SetItemLayoutVerticalAlignment(alignment); +} + +HorizontalAlignment +_IconListViewImpl::GetItemLayoutHorizontalAlignment(void) const +{ + ClearLastResult(); + return __pIconListView->GetItemLayoutHorizontalAlignment(); +} + +VerticalAlignment +_IconListViewImpl::GetItemLayoutVerticalAlignment(void) const +{ + ClearLastResult(); + return __pIconListView->GetItemLayoutVerticalAlignment(); +} + +result +_IconListViewImpl::SetItemBorderStyle(IconListViewItemBorderStyle borderStyle) +{ + return __pIconListView->SetItemBorderStyle(borderStyle); +} + +IconListViewItemBorderStyle +_IconListViewImpl::GetItemBorderStyle(void) const +{ + ClearLastResult(); + return __pIconListView->GetItemBorderStyle(); +} + +result +_IconListViewImpl::SetBitmapOfEmptyList(const Bitmap* pBitmap) +{ + return __pIconListView->SetBitmapOfEmptyList(pBitmap); +} + +result +_IconListViewImpl::BeginReorderingMode(void) +{ + return __pIconListView->SetReorderModeEnabled(true); +} + +result +_IconListViewImpl::EndReorderingMode(void) +{ + return __pIconListView->SetReorderModeEnabled(false); +} + +bool +_IconListViewImpl::IsInReorderingMode(void) const +{ + return __pIconListView->IsInReorderingMode(); +} + +void +_IconListViewImpl::SetScrollInputMode(ScrollInputMode mode) +{ + __pIconListView->SetScrollInputMode(mode); +} + +ScrollInputMode +_IconListViewImpl::GetScrollInputMode(void) const +{ + return __pIconListView->GetScrollInputMode(); +} + +void +_IconListViewImpl::OnIconListItemStateChanged(_IconListViewItemEventArg* pArg) +{ + if (__pIconListViewItemEvent != null && pArg != null) + { + _IconListViewItemEventArg* pEventArg = new (std::nothrow) _IconListViewItemEventArg(pArg->GetIndex(), pArg->GetEventType()); + SysTryReturnVoidResult(NID_UI_CTRL, (pEventArg != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + pEventArg->SetStatus(pArg->GetStatus()); + __pIconListViewItemEvent->Fire(*pEventArg); + } +} + +void +_IconListViewImpl::OnIconListViewOverlayBitmapSelected(_IconListViewItemEventArg* pArg) +{ + if (__pIconListViewItemEvent != null && pArg != null) + { + _IconListViewItemEventArg* pEventArg = new (std::nothrow) _IconListViewItemEventArg(pArg->GetIndex(), pArg->GetEventType()); + SysTryReturnVoidResult(NID_UI_CTRL, (pEventArg != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + pEventArg->SetOverlayBitmapId(pArg->GetOverlayBitmapId()); + __pIconListViewItemEvent->Fire(*pEventArg); + } +} + +void +_IconListViewImpl::OnIconListViewItemReordered(_IconListViewItemEventArg* pArg) +{ + if (__pIconListViewItemEvent != null && pArg != null) + { + _IconListViewItemEventArg* pEventArg = new (std::nothrow) _IconListViewItemEventArg(pArg->GetIndex(), pArg->GetEventType()); + SysTryReturnVoidResult(NID_UI_CTRL, (pEventArg != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + pEventArg->SetToIndex(pArg->GetToIndex()); + __pIconListViewItemEvent->Fire(*pEventArg); + } +} + +void +_IconListViewImpl::OnScrollEndReached(_Control& source, ScrollEndEvent type) +{ + if (__pScrollEvent == null) + { + return; + } + + _ScrollEventArg* pEventArg = _ScrollEventArg::GetScrollEventArgN(GetPublic(), type); + result r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pScrollEvent->Fire(*pEventArg); + + return; +CATCH: + delete pEventArg; +} + +void +_IconListViewImpl::OnScrollPositionChanged(_Control& source, float scrollPosition) +{ + if (__pScrollEvent == null) + { + return; + } + + _ScrollEventArg* pEventArg = _ScrollEventArg::GetScrollEventArgN(GetPublic(), scrollPosition); + result r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pScrollEvent->Fire(*pEventArg); + + return; +CATCH: + delete pEventArg; +} + +void +_IconListViewImpl::OnScrollStopped(_Control& source) +{ + if (__pScrollEvent == null) + { + return; + } + + _ScrollEventArg* pEventArg = _ScrollEventArg::GetScrollEventArgN(GetPublic()); + result r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pScrollEvent->Fire(*pEventArg); + + return; +CATCH: + delete pEventArg; +} + +class _IconListViewMaker + : public _UiBuilderControlMaker +{ +public: + _IconListViewMaker(_UiBuilder* uibuilder) + : _UiBuilderControlMaker(uibuilder) + { + } + + virtual ~_IconListViewMaker() + { + } + + static _UiBuilderControlMaker* + GetInstance(_UiBuilder* uibuilder) + { + _IconListViewMaker* pIconListViewMaker = new (std::nothrow) _IconListViewMaker(uibuilder); + + return pIconListViewMaker; + } + +protected: + virtual Control* + Make(_UiBuilderControl* pControl) + { + SysTryReturn(NID_UI, (pControl != null), null, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Invalid parameter is used."); + _UiBuilderControlLayout* pControlProperty = null; + 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(); + SysTryReturn(NID_UI, (pIconListView != null), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + ClearLastResult(); + + IconListViewStyle style = ICON_LIST_VIEW_STYLE_NORMAL; + IconListViewScrollDirection scrollDirection = ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL; + ScrollInputMode scrollInputMode = SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION; + + // Get Bounds + FloatDimension itemBitmapSize(100.0f, 100.0f); + FloatRectangle bounds(pControlProperty->GetRectF()); + Tizen::Base::String elementString; + + // Get ItemBitmapSize(width) + if (pControl->GetElement("itemBitmapWidth", elementString)) + { + itemBitmapSize.width = _LocalizedNumParser::ToDouble(elementString, "C"); + } + + // Get ItemBitmapSize(height) + if (pControl->GetElement("itemBitmapHeight", elementString)) + { + itemBitmapSize.height = _LocalizedNumParser::ToDouble(elementString, "C"); + } + + // Get style + Tizen::Base::String styleString; + styleString = pControlProperty->GetStyle(); + if (styleString.IsEmpty() == false) + { + if (styleString.Equals(L"ICON_LIST_VIEW_STYLE_NORMAL", false)) + { + style = ICON_LIST_VIEW_STYLE_NORMAL; + } + else if (styleString.Equals(L"ICON_LIST_VIEW_STYLE_RADIO", false)) + { + style = ICON_LIST_VIEW_STYLE_RADIO; + } + else if (styleString.Equals(L"ICON_LIST_VIEW_STYLE_MARK", false)) + { + style = ICON_LIST_VIEW_STYLE_MARK; + } + } + + // Get scrollDirection + if (pControl->GetElement("scrollDirection", elementString)) + { + if (elementString.Equals(L"ICON_LIST_VIEW_SCROLL_DIRECTION_HORIZONTAL", false)) + { + scrollDirection = ICON_LIST_VIEW_SCROLL_DIRECTION_HORIZONTAL; + } + else if (elementString.Equals(L"ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL", false)) + { + scrollDirection = ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL; + } + } + + // Construct IconListView + result r = pIconListView->Construct(bounds, itemBitmapSize, style, scrollDirection); + SysTryCatch(NID_UI, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + // Set BackgroundsBitmap + if (pControl->GetElement("backgroundBitmapPath", elementString) || pControl->GetElement("BGBitmapPath", elementString)) + { + Bitmap* pBackgroundBitmap = null; + pBackgroundBitmap = LoadBitmapN(elementString); + if (pBackgroundBitmap) + { + pIconListView->SetBackgroundBitmap(pBackgroundBitmap); + delete pBackgroundBitmap; + } + } + + // Set BackgroundColor + if (pControl->GetElement("backgroundColor", elementString) || pControl->GetElement("BGColor", elementString)) + { + Color bgColor; + ConvertStringToColor(elementString, bgColor); + if (pControl->GetElement("backgroundColorOpacity", elementString) || pControl->GetElement("BGColorOpacity", elementString)) + { + int opacity =0; + Base::Integer::Parse(elementString, opacity); + bgColor.SetAlpha(ConvertOpacity100to255(opacity)); + } + pIconListView->SetBackgroundColor(bgColor); + } + + // Set CheckBoxPosition + if ((style == ICON_LIST_VIEW_STYLE_RADIO || style == ICON_LIST_VIEW_STYLE_MARK) + && pControl->GetElement("checkBoxPosition", elementString)) + { + IconListViewCheckBoxPosition checkBoxPosition = ICON_LIST_VIEW_CHECK_BOX_POSITION_TOP_RIGHT; + if (elementString.Equals(L"ICON_LIST_VIEW_CHECK_BOX_POSITION_TOP_LEFT", false)) + { + checkBoxPosition = ICON_LIST_VIEW_CHECK_BOX_POSITION_TOP_LEFT; + } + else if (elementString.Equals(L"ICON_LIST_VIEW_CHECK_BOX_POSITION_TOP_RIGHT", false)) + { + checkBoxPosition = ICON_LIST_VIEW_CHECK_BOX_POSITION_TOP_RIGHT; + } + else if (elementString.Equals(L"ICON_LIST_VIEW_CHECK_BOX_POSITION_BOTTOM_LEFT", false)) + { + checkBoxPosition = ICON_LIST_VIEW_CHECK_BOX_POSITION_BOTTOM_LEFT; + } + else if (elementString.Equals(L"ICON_LIST_VIEW_CHECK_BOX_POSITION_BOTTOM_RIGHT", false)) + { + checkBoxPosition = ICON_LIST_VIEW_CHECK_BOX_POSITION_BOTTOM_RIGHT; + } + + pIconListView->SetCheckBoxPosition(checkBoxPosition); + } + + // Set BitmapOfEmptyList + if (pControl->GetElement("bitmapPathOfEmptyList", elementString)) + { + Bitmap* pBitmapOfEmptyList = null; + pBitmapOfEmptyList = LoadBitmapN(elementString); + if (pBitmapOfEmptyList) + { + pIconListView->SetBitmapOfEmptyList(pBitmapOfEmptyList); + delete pBitmapOfEmptyList; + } + } + + // Set TextOfEmptyList + if (pControl->GetElement("textOfEmptyList", elementString)) + { + pIconListView->SetTextOfEmptyList(elementString); + } + + // Set TextColorOfEmptyList + if (pControl->GetElement("colorOfEmptyListText", elementString)) + { + Color color; + ConvertStringToColor(elementString, color); + pIconListView->SetTextColorOfEmptyList(color); + } + + // Set ItemBorderStyle + if (pControl->GetElement("itemBorderStyle", elementString)) + { + IconListViewItemBorderStyle borderStyle = ICON_LIST_VIEW_ITEM_BORDER_STYLE_SHADOW; + if (elementString.Equals(L"ICON_LIST_VIEW_ITEM_BORDER_STYLE_NONE", false)) + { + borderStyle = ICON_LIST_VIEW_ITEM_BORDER_STYLE_NONE; + } + else if (elementString.Equals(L"ICON_LIST_VIEW_ITEM_BORDER_STYLE_OUTLINE", false)) + { + borderStyle = ICON_LIST_VIEW_ITEM_BORDER_STYLE_OUTLINE; + } + else if (elementString.Equals(L"ICON_LIST_VIEW_ITEM_BORDER_STYLE_SHADOW", false)) + { + borderStyle = ICON_LIST_VIEW_ITEM_BORDER_STYLE_SHADOW; + } + + pIconListView->SetItemBorderStyle(borderStyle); + } + + // Set ItemLayoutHorizontalAlignment + if (scrollDirection == ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL + && pControl->GetElement("itemHorizontalAlignment", elementString)) + { + HorizontalAlignment alignment = ALIGNMENT_CENTER; + if (elementString.Equals(L"ALIGNMENT_LEFT", false)) + { + alignment = ALIGNMENT_LEFT; + } + else if (elementString.Equals(L"ALIGNMENT_CENTER", false)) + { + alignment = ALIGNMENT_CENTER; + } + else if (elementString.Equals(L"ALIGNMENT_RIGHT", false)) + { + alignment = ALIGNMENT_RIGHT; + } + + pIconListView->SetItemLayoutHorizontalAlignment(alignment); + } + + // Set ItemLayoutVerticalAlignment + if (scrollDirection == ICON_LIST_VIEW_SCROLL_DIRECTION_HORIZONTAL + && pControl->GetElement("itemVerticalAlignment", elementString)) + { + VerticalAlignment alignment = ALIGNMENT_MIDDLE; + if (elementString.Equals(L"ALIGNMENT_TOP", false)) + { + alignment = ALIGNMENT_TOP; + } + else if (elementString.Equals(L"ALIGNMENT_MIDDLE", false)) + { + alignment = ALIGNMENT_MIDDLE; + } + else if (elementString.Equals(L"ALIGNMENT_BOTTOM", false)) + { + alignment = ALIGNMENT_BOTTOM; + } + + pIconListView->SetItemLayoutVerticalAlignment(alignment); + } + + // Set TextHorizontalAlignment + if (pControl->GetElement("itemTextHorizontalAlignment", elementString)) + { + HorizontalAlignment alignment = ALIGNMENT_CENTER; + if (elementString.Equals(L"ALIGNMENT_LEFT", false)) + { + alignment = ALIGNMENT_LEFT; + } + else if (elementString.Equals(L"ALIGNMENT_CENTER", false)) + { + alignment = ALIGNMENT_CENTER; + } + else if (elementString.Equals(L"ALIGNMENT_RIGHT", false)) + { + alignment = ALIGNMENT_RIGHT; + } + + pIconListView->SetTextHorizontalAlignment(alignment); + } + + // Set TextVerticalAlignment + if (pControl->GetElement("itemTextVerticalAlignment", elementString)) + { + IconListViewItemTextVerticalAlignment alignment = ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_INSIDE_BOTTOM; + if (elementString.Equals(L"ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_INSIDE_TOP", false)) + { + alignment = ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_INSIDE_TOP; + } + else if (elementString.Equals(L"ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_INSIDE_MIDDLE", false)) + { + alignment = ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_INSIDE_MIDDLE; + } + else if (elementString.Equals(L"ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_INSIDE_BOTTOM", false)) + { + alignment = ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_INSIDE_BOTTOM; + } + else if (elementString.Equals(L"ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_OUTSIDE_TOP", false)) + { + alignment = ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_OUTSIDE_TOP; + } + else if (elementString.Equals(L"ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_OUTSIDE_BOTTOM", false)) + { + alignment = ICON_LIST_VIEW_ITEM_TEXT_VERTICAL_ALIGNMENT_OUTSIDE_BOTTOM; + } + + pIconListView->SetTextVerticalAlignment(alignment); + } + + // Set ItemHorizontalSpacing + if (pControl->GetElement("itemHorizontalSpacing", elementString)) + { + float spacing = 0.0f; + spacing = _LocalizedNumParser::ToDouble(elementString, "C"); + pIconListView->SetItemSpacing(spacing, pIconListView->GetItemVerticalSpacingF()); + } + + // Set ItemVerticalSpacing + if (pControl->GetElement("itemVerticalSpacing", elementString)) + { + float spacing = 0.0f; + spacing = _LocalizedNumParser::ToDouble(elementString, "C"); + pIconListView->SetItemSpacing(pIconListView->GetItemHorizontalSpacingF(), spacing); + } + + // Set ItemTextSize + if (pControl->GetElement("itemTextSize", elementString)) + { + float size = 0.0f; + size = _LocalizedNumParser::ToDouble(elementString, "C"); + _ICoordinateSystemTransformer* pTransform = GetTransformer(); + if (pTransform) + { + size = pTransform->Transform(size); + } + pIconListView->SetItemTextSize(size); + } + + // Set NormalItemTextColor + if (pControl->GetElement("normalItemTextColor", elementString)) + { + Color color; + ConvertStringToColor(elementString, color); + pIconListView->SetItemTextColor(ICON_LIST_VIEW_ITEM_DRAWING_STATUS_NORMAL, color); + } + + // Set PressedItemTextColor + if (pControl->GetElement("pressedItemTextColor", elementString)) + { + Color color; + ConvertStringToColor(elementString, color); + pIconListView->SetItemTextColor(ICON_LIST_VIEW_ITEM_DRAWING_STATUS_PRESSED, color); + } + + // Set HighlightedItemTextColor + if (pControl->GetElement("highlightedItemTextColor", elementString)) + { + Color color; + ConvertStringToColor(elementString, color); + pIconListView->SetItemTextColor(ICON_LIST_VIEW_ITEM_DRAWING_STATUS_HIGHLIGHTED, color); + } + + // Set TouchAnimationEnabled + if (pControl->GetElement("touchAnimationEnabled", elementString)) + { + bool enabled = true; + if (elementString.Equals(L"false", false) || elementString.Equals(L"FALSE", false)) + { + enabled = false; + } + + pIconListView->SetTouchAnimationEnabled(enabled); + } + + // Set MagneticScrollSize + if (pControl->GetElement("magneticScrollSize", elementString)) + { + int size = 0; + Base::Integer::Parse(elementString, size); + pIconListView->SetMagneticScrollSize(size); + } + + // Scroll Input Mode + if (pControl->GetElement("scrollInputMode", elementString)) + { + if (elementString.Equals(L"SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION", false)) + { + scrollInputMode = SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION; + } + else if (elementString.Equals(L"SCROLL_INPUT_MODE_RESTRICT_TO_INITIAL_DIRECTION", false)) + { + scrollInputMode = SCROLL_INPUT_MODE_RESTRICT_TO_INITIAL_DIRECTION; + } + + pIconListView->SetScrollInputMode(scrollInputMode); + } + + return pIconListView; + +CATCH: + delete pIconListView; + return null; + } +}; + +_IconListViewRegister::_IconListViewRegister() +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->RegisterControl(L"IconListView", _IconListViewMaker::GetInstance); +} + +_IconListViewRegister::~_IconListViewRegister() +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->UnregisterControl(L"IconListView"); +} +static _IconListViewRegister IconListViewRegisterToUiBuilder; +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_IconListViewItemEvent.cpp b/src/ui/controls/FUiCtrl_IconListViewItemEvent.cpp new file mode 100644 index 0000000..bfa14a2 --- /dev/null +++ b/src/ui/controls/FUiCtrl_IconListViewItemEvent.cpp @@ -0,0 +1,103 @@ +// +// 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_IconListViewItemEvent.cpp + * @brief This is the implementation file for the _IconListViewItemEvent class. + */ + +#include +#include +#include + +#include "FUiCtrl_IconListViewItemEvent.h" +#include "FUiCtrl_IconListViewItemEventArg.h" + +namespace Tizen +{ +namespace Ui +{ +namespace Controls +{ + +_IconListViewItemEvent::_IconListViewItemEvent(void) + : __pSource(null) +{ + // Do nothing +} + +_IconListViewItemEvent::~_IconListViewItemEvent(void) +{ + // Do nothing +} + +result +_IconListViewItemEvent::Construct(const IconListView& source) +{ + result r = _Event::Initialize(); + + // set event source + if (r == E_SUCCESS) + { + __pSource = const_cast (&source); + } + + return r; +} + +const IconListView* +_IconListViewItemEvent::GetSource(void) const +{ + return __pSource; +} + +void +_IconListViewItemEvent::FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg) +{ + // cast to IIconListViewItemEventListener + IIconListViewItemEventListener* pItemListener = dynamic_cast (&listener); + SysTryReturnVoidResult(NID_UI_CTRL, (pItemListener != null), E_INVALID_ARG, "[E_INVALID_ARG] Invalid listener is used."); + + // cast to _IconListViewItemEventArg + const _IconListViewItemEventArg* pItemEventArg = dynamic_cast (&arg); + SysTryReturnVoidResult(NID_UI_CTRL, (pItemEventArg != null), E_INVALID_ARG, "[E_INVALID_ARG] Invalid event argument is used."); + + switch (pItemEventArg->GetEventType()) + { + case EVENT_TYPE_ITEM_SELECTED: + pItemListener->OnIconListViewItemStateChanged( + const_cast(*GetSource()), pItemEventArg->GetIndex(), pItemEventArg->GetStatus()); + break; + case EVENT_TYPE_OVERLAY_BITMAP_SELECTED: + pItemListener->OnIconListViewOverlayBitmapSelected( + const_cast(*GetSource()), pItemEventArg->GetIndex(), pItemEventArg->GetOverlayBitmapId()); + break; + case EVENT_TYPE_ITEM_REORDERED: + pItemListener->OnIconListViewItemReordered( + const_cast(*GetSource()), pItemEventArg->GetFromIndex(), pItemEventArg->GetToIndex()); + break; + + default: + SysLogException(NID_UI_CTRL, E_INVALID_ARG, "[E_INVALID_ARG] Invalid event argument is used."); + return; + } + + SetLastResult(E_SUCCESS); +} + +}}} // Tizen::Ui::Controls + diff --git a/src/ui/controls/FUiCtrl_IconListViewItemEventArg.cpp b/src/ui/controls/FUiCtrl_IconListViewItemEventArg.cpp new file mode 100644 index 0000000..435f915 --- /dev/null +++ b/src/ui/controls/FUiCtrl_IconListViewItemEventArg.cpp @@ -0,0 +1,97 @@ +// +// 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_IconListViewItemEventArg.cpp + * @brief This is the implementation file for the _IconListViewItemEventArg class. + */ + +#include "FUiCtrl_IconListViewItemEventArg.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +_IconListViewItemEventArg::_IconListViewItemEventArg(int index, _IconListViewItemEventType eventType) + : __itemIndex(index) + , __toIndex(-1) + , __overlayBitmapId(-1) + , __itemStatus(ICON_LIST_VIEW_ITEM_CHECKED) + , __eventType(eventType) +{ + // Do nothing +} + +_IconListViewItemEventArg::~_IconListViewItemEventArg(void) +{ + // Do nothing +} + +int +_IconListViewItemEventArg::GetIndex(void) const +{ + return __itemIndex; +} + +IconListViewItemStatus +_IconListViewItemEventArg::GetStatus(void) const +{ + return __itemStatus; +} + +void +_IconListViewItemEventArg::SetStatus(IconListViewItemStatus status) +{ + __itemStatus = status; +} + +int +_IconListViewItemEventArg::GetOverlayBitmapId(void) const +{ + return __overlayBitmapId; +} + +void +_IconListViewItemEventArg::SetOverlayBitmapId(const int overlayBitmapId) +{ + __overlayBitmapId = overlayBitmapId; +} + +int +_IconListViewItemEventArg::GetFromIndex(void) const +{ + return __itemIndex; +} + +int +_IconListViewItemEventArg::GetToIndex(void) const +{ + return __toIndex; +} + +void +_IconListViewItemEventArg::SetToIndex(int toIndex) +{ + __toIndex = toIndex; +} + +_IconListViewItemEventType +_IconListViewItemEventArg::GetEventType(void) const +{ + return __eventType; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_IconListViewItemImpl.cpp b/src/ui/controls/FUiCtrl_IconListViewItemImpl.cpp new file mode 100644 index 0000000..c281bd3 --- /dev/null +++ b/src/ui/controls/FUiCtrl_IconListViewItemImpl.cpp @@ -0,0 +1,87 @@ +// +// 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_IconListViewItemImpl.cpp + * @brief This is the implementation file for the _IconListViewItemImpl class. + */ + +// Includes +#include + +#include "FUiCtrl_IconListItem.h" +#include "FUiCtrl_IconListViewItemImpl.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_IconListViewItemImpl::_IconListViewItemImpl(IconListViewItem* pIconListViewItem, _IconListItem* pItem) + : __pIconListViewItem(pIconListViewItem) + , __pIconListItem(pItem) +{ + // nothing +} + +_IconListViewItemImpl::~_IconListViewItemImpl(void) +{ + __pIconListViewItem = null; + + __pIconListItem->SetAppInfo(null); + __pIconListItem->Release(); + __pIconListItem = null; +} + +_IconListViewItemImpl* +_IconListViewItemImpl::CreateIconListViewItemImplN(IconListViewItem& pIconListViewItem, const Bitmap& bitmap, + const String* pText, const Bitmap* pSelectedBitmap, const Bitmap* pHighlightedBitmap) +{ + _IconListItem* pItem = _IconListItem::CreateIconListItemN(&pIconListViewItem); + SysTryReturn(NID_UI_CTRL, (pItem != null), null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _IconListViewItemImpl* pImpl = null; + result r = E_SUCCESS; + r = pItem->SetBitmap(ICON_LIST_VIEW_ITEM_DRAWING_STATUS_NORMAL, &bitmap); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + pImpl = new (std::nothrow) _IconListViewItemImpl(&pIconListViewItem, pItem); + SysTryCatch(NID_UI_CTRL, (pImpl != null), , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + ClearLastResult(); + + pItem->SetText(pText); + pItem->SetBitmap(ICON_LIST_VIEW_ITEM_DRAWING_STATUS_PRESSED, pSelectedBitmap); + pItem->SetBitmap(ICON_LIST_VIEW_ITEM_DRAWING_STATUS_HIGHLIGHTED, pHighlightedBitmap); + + return pImpl; +CATCH: + delete pItem; + pItem = null; + + return null; +} + +result +_IconListViewItemImpl::SetOverlayBitmap(int overlayBitmapId, const Tizen::Graphics::Bitmap* pOverlayBitmap, + HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment) +{ + return __pIconListItem->SetOverlayBitmap(overlayBitmapId, pOverlayBitmap, horizontalAlignment, verticalAlignment); +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_Indicator.cpp b/src/ui/controls/FUiCtrl_Indicator.cpp new file mode 100644 index 0000000..efcf022 --- /dev/null +++ b/src/ui/controls/FUiCtrl_Indicator.cpp @@ -0,0 +1,1271 @@ +// +// 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_Indicator.cpp + * @brief This is the implementation file for the _Form class. + */ + +#include +#include +#include +#include +#include +#include "FUiAnim_VisualElement.h" +#include "FUiAnim_VisualElementImpl.h" +#include "FUiAnim_EflNode.h" +#include "FUi_EcoreEvasMgr.h" +#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" + +using namespace Tizen::Base::Runtime; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Animations; + +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; +} + +namespace Tizen { namespace Ui { namespace Controls +{ + +struct _IndicatorDataAnimation +{ + Ecore_X_Window xwin; + double duration; +}; + +_Indicator* +_Indicator::CreateIndicator(void) +{ + result r = E_SUCCESS; + Color bgColor(0xff343432); + + _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; + +CATCH: + delete pIndicator; + return null; +} + +_Indicator::_Indicator(void) + : __pPortraitIndicatorEvasObject(null) + , __pLandscapeIndicatorEvasObject(null) + , __pConnectionTimer(null) + , __pAnimationTimer(null) + , __pPortraitVisualElement(null) + , __pLandscapeVisualElement(null) + , __pCurrentVisualElement(null) + , __pWindow(null) + , __showstate(false) + , __portraitautohide(false) + , __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 +_Indicator::SetIndicatorShowState(bool state) +{ + result r = E_SUCCESS; + + _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; + + SetShowState(state); + + if (state) + { + SetIndicatorOpacity(__opacity); + } + + return r; +} + +void +_Indicator::SetIndicatorAutoHide(bool portrait, bool landscape) +{ + Ecore_X_Window win = 0; + if (__pWindow) + { + win = (Ecore_X_Window)__pWindow->GetNativeHandle(); + } + + if (__orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + if (portrait) + { + 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 + { + if (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; + __landscapeautohide = landscape; + +} + +result +_Indicator::SetIndicatorOpacity(_IndicatorOpacity opacity) +{ + result r = E_SUCCESS; + + if (opacity == _INDICATOR_OPACITY_OPAQUE) + { + 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)); + } + else if (opacity == _INDICATOR_OPACITY_TRANSLUCENT) + { + if (__orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + Color bgColor(0x7f000000); + SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255.0f, (float)bgColor.GetGreen() / 255.0f, (float)bgColor.GetBlue() / 255.0f, (float)bgColor.GetAlpha() / 255.0f)); + } + else + { + 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)); + } + } + + __opacity = opacity; + + return r; +} + +bool +_Indicator::GetIndicatorShowState(void) const +{ + return __showstate; +} + +_IndicatorOpacity +_Indicator::GetIndicatorOpacity(void) const +{ + if (__orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + if (__portraitautohide) + { + return _INDICATOR_OPACITY_TRANSPARENT; + } + } + else + { + if (__landscapeautohide) + { + return _INDICATOR_OPACITY_TRANSPARENT; + } + } + + return __opacity; +} + +bool +_Indicator::GetIndicatorAutoHide(void) const +{ + if (__orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + return __portraitautohide; + } + else + { + return __landscapeautohide; + } + +} + +Rectangle +_Indicator::GetIndicatorBounds(void) const +{ + const Dimension portraitSize = _ControlManager::GetInstance()->_ControlManager::GetScreenSize(); + const Dimension landscapeSize = Dimension(portraitSize.height, portraitSize.width); + + Rectangle indicatorbounds(0, 0, 0, 0); + + if (__orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + indicatorbounds.width = portraitSize.width; + } + else + { + indicatorbounds.width = landscapeSize.width; + } + 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."); + + _ICoordinateSystemTransformer* pXformer = pCoordSystem->GetTransformer(); + SysTryReturn(NID_UI_CTRL, pXformer, Rectangle(-1, -1, -1, -1), E_SYSTEM, "[E_SYSTEM] Coordinate system load failed."); + + indicatorbounds = pXformer->Transform(indicatorbounds); + + return indicatorbounds; +} + +FloatRectangle +_Indicator::GetIndicatorBoundsF(void) const +{ + const FloatDimension portraitSize = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF(); + const FloatDimension landscapeSize = FloatDimension(portraitSize.height, portraitSize.width); + + FloatRectangle indicatorbounds(0.0f, 0.0f, 0.0f, 0.0f); + + if (__orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + indicatorbounds.width = portraitSize.width; + } + else + { + indicatorbounds.width = landscapeSize.width; + } + + 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."); + + _ICoordinateSystemTransformer* pXformer = pCoordSystem->GetTransformer(); + SysTryReturn(NID_UI_CTRL, pXformer, FloatRectangle(-1.0, -1.0, -1.0, -1.0), E_SYSTEM, "[E_SYSTEM] Coordinate system load failed."); + + indicatorbounds = pXformer->Transform(indicatorbounds); + + return indicatorbounds; +} + +result +_Indicator::AddIndicatorObject(_Control* pControl, _Window* pWindow) +{ + result r = E_SUCCESS; + + __pWindow = pWindow; + + __pPortraitVisualElement = _IndicatorManager::GetInstance()->GetIndicatorVisualElement(pWindow, _INDICATOR_ORIENTATION_PORTRAIT, pControl); + SysTryReturn(NID_UI_CTRL, __pPortraitVisualElement, null, E_SYSTEM, "[E_SYSTEM] Indicator can not create the surface."); + __pLandscapeVisualElement = _IndicatorManager::GetInstance()->GetIndicatorVisualElement(pWindow, _INDICATOR_ORIENTATION_LANDSCAPE, pControl); + SysTryReturn(NID_UI_CTRL, __pLandscapeVisualElement, null, E_SYSTEM, "[E_SYSTEM] Indicator can not create the surface."); + __pPortraitIndicatorEvasObject = _IndicatorManager::GetInstance()->GetEvasObject(pWindow, pControl, _INDICATOR_ORIENTATION_PORTRAIT); + SysTryReturn(NID_UI_CTRL, __pPortraitIndicatorEvasObject, null, E_SYSTEM, "[E_SYSTEM] Indicator can not get the Evas_Object."); + __pLandscapeIndicatorEvasObject = _IndicatorManager::GetInstance()->GetEvasObject(pWindow, pControl, _INDICATOR_ORIENTATION_LANDSCAPE); + SysTryReturn(NID_UI_CTRL, __pLandscapeIndicatorEvasObject, null, E_SYSTEM, "[E_SYSTEM] Indicator can not get the Evas_Object."); + + _ControlOrientation orientation = pControl->GetOrientation(); + if (orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + r = ChangeCurrentVisualElement(__pPortraitVisualElement); + } + else + { + r = ChangeCurrentVisualElement(__pLandscapeVisualElement); + } + + 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); + SysTryReturn(NID_UI_CTRL, pLandscapeEe, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Unable to get evas."); + + ecore_evas_data_set(pPortraitEe, pPortPublicKey, __pPortraitIndicatorEvasObject); + ecore_evas_data_set(pLandscapeEe, pLandPublicKey, __pLandscapeIndicatorEvasObject); + ecore_evas_data_set(pPortraitEe, pIndicatorKey, this); + ecore_evas_data_set(pLandscapeEe, pIndicatorKey, this); + ecore_evas_callback_delete_request_set(pPortraitEe, _Indicator::OnDisconnected); + ecore_evas_callback_delete_request_set(pLandscapeEe, _Indicator::OnDisconnected); + + ecore_evas_callback_msg_handle_set(pPortraitEe, _Indicator::OnMessageHandle); + ecore_evas_callback_msg_handle_set(pLandscapeEe, _Indicator::OnMessageHandle); + + Activate(); + + return r; +} + +result +_Indicator::DeleteIndicatorObject(void) +{ + result r = E_SUCCESS; + + r = _IndicatorManager::GetInstance()->ReleaseIndicatorVisualElement(__pWindow, _INDICATOR_ORIENTATION_PORTRAIT, __pPortraitVisualElement); + r = _IndicatorManager::GetInstance()->ReleaseIndicatorVisualElement(__pWindow, _INDICATOR_ORIENTATION_LANDSCAPE, __pLandscapeVisualElement); + + if (__pPortraitVisualElement) + { + if (__pPortraitVisualElement == __pCurrentVisualElement) + { + r = DetachChild(*__pPortraitVisualElement); + } + } + if (__pLandscapeVisualElement) + { + if (__pLandscapeVisualElement == __pCurrentVisualElement) + { + r = DetachChild(*__pLandscapeVisualElement); + } + } + + 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; + __pLandscapeVisualElement = null; + __pCurrentVisualElement = null; + + return r; +} + +result +_Indicator::ChangeCurrentVisualElement(Tizen::Ui::Animations::_VisualElement* pVisualElement) +{ + result r = E_SUCCESS; + + if (!(__pCurrentVisualElement == pVisualElement)) + { + r = AttachChild(*pVisualElement); + if (__pCurrentVisualElement) + { + r = DetachChild(*__pCurrentVisualElement); + } + __pCurrentVisualElement = pVisualElement; + } + + return r; +} + +void +_Indicator::OnChangeLayout(_ControlOrientation orientation) +{ + RemoveIndicatorAnimations(); + if (__pAnimationTimer != null) + { + __pAnimationTimer->Cancel(); + __animating = false; + } + + Ecore_X_Window win = 0; + if (__pWindow) + { + win = (Ecore_X_Window)__pWindow->GetNativeHandle(); + } + + __orientation = orientation; + + if (orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + ChangeCurrentVisualElement(__pPortraitVisualElement); + SetClipChildrenEnabled(true); + + if (__portraitautohide) + { + 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 + { + ChangeCurrentVisualElement(__pLandscapeVisualElement); + SetClipChildrenEnabled(false); + + if (__landscapeautohide) + { + 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); + } + } +} + +result +_Indicator::OnAttachedToMainTree(void) +{ + result r = E_SUCCESS; + + if (__pCurrentVisualElement) + { + r = ChangeCurrentVisualElement(__pCurrentVisualElement); + } + + return r; +} + +void +_Indicator::OnTimerExpired(Timer& timer) +{ + if (__pConnectionTimer == &timer) + { + 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 if(__pAnimationTimer == &timer) + { + ShowIndicatorEffect(false, ANIMATION_DURATION); + + timer.Cancel(); + __animating = false; + } +} + +void +_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(); + 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) + { + delete pIndicator->__pConnectionTimer; + pIndicator->__pConnectionTimer = null; + + return; + } + } + + pIndicator->__pConnectionTimer->Start(CONNECTION_INTERVAL); +} + +result +_Indicator::SetNotificationTrayOpenEnabled(bool enable) +{ + Ecore_X_Window win = (Ecore_X_Window)__pWindow->GetNativeHandle(); + + Ecore_X_Atom atomPanelScrollable = ecore_x_atom_get("_E_MOVE_PANEL_SCROLLABLE_STATE"); + + unsigned int val[3]; + int returnResult = ecore_x_window_prop_card32_get(win, atomPanelScrollable, val, 3); + + if (returnResult) + { + if (enable) + { + val[1] = 1; + } + else + { + val[1] = 0; + } + + ecore_x_window_prop_card32_set(win, atomPanelScrollable, val, 3); + } + + return E_SUCCESS; +} + +bool +_Indicator::IsNotificationTrayOpenEnabled(void) const +{ + Ecore_X_Window win = (Ecore_X_Window)__pWindow->GetNativeHandle(); + + Ecore_X_Atom atomPanelScrollable = ecore_x_atom_get("_E_MOVE_PANEL_SCROLLABLE_STATE"); + + unsigned int val[3]; + int returnResult = ecore_x_window_prop_card32_get(win, atomPanelScrollable, val, 3); + + if (returnResult) + { + if (val[1] == 1) + { + return true; + } + else + { + return false; + } + } + return false; +} + +void +_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); + + if (msgDomain == MSG_DOMAIN_CONTROL_INDICATOR) + { + if (msgId == MSG_ID_INDICATOR_REPEAT_EVENT) + { + int* repeat = (int*)data; + if (1 == *repeat) + { + if (pPortraitIndicatorEvasObject) + { + evas_object_repeat_events_set(pPortraitIndicatorEvasObject, EINA_TRUE); + } + if (pLandscapeIndicatorEvasObject) + { + evas_object_repeat_events_set(pLandscapeIndicatorEvasObject, EINA_TRUE); + } + } + else + { + if (pPortraitIndicatorEvasObject) + { + evas_object_repeat_events_set(pPortraitIndicatorEvasObject, EINA_FALSE); + } + if (pLandscapeIndicatorEvasObject) + { + evas_object_repeat_events_set(pLandscapeIndicatorEvasObject, EINA_FALSE); + } + } + } + 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 +_Indicator::OnHitTest(const Tizen::Graphics::FloatPoint& point) +{ + if (!IsVisible()) + { + return HIT_TEST_NOWHERE; + } + + if (!GetBounds().Contains(point)) + { + return HIT_TEST_NOWHERE; + } + + 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; + } + + unsigned long 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 + { + return false; + } + if (touchPosition.y < indicatorHeight) + { + __startTouchPoint = touchPosition; + + if (__animating) + { + return true; + } + else + { + __touchPressed = true; + __pointId = pointId; + } + + if (__orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + if (__portraitautohide) + { + 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) + { + if(pTouchManager->GetTouchControlSource() == &source) + { + 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 (__touchPressed) + { + FloatPoint touchPoint = source.ConvertToScreenPosition(touchinfo.GetCurrentPosition()); + float gap = touchPoint.y - __startTouchPoint.y; + + int touchGap = 0; + if (__pWindow) + { + GET_SHAPE_CONFIG(FORM::INDICATOR_TOUCH_GAP, __pWindow->GetOrientation(), touchGap); + } + else + { + 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 + { + 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::OnVisualElementAnimationStarted(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target) +{ + 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::OnVisualElementAnimationRepeated(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, long currentRepeatCount) +{ + +} + +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 new file mode 100644 index 0000000..48aed9a --- /dev/null +++ b/src/ui/controls/FUiCtrl_IndicatorManager.cpp @@ -0,0 +1,492 @@ +// +// 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_IndicatorManager.cpp + * @brief This is the implementation file for the _IndicatorManager class. + */ + +#include +#include +#include +#include "FUiAnim_RootVisualElement.h" +#include "FUiAnim_EflLayer.h" +#include "FUi_EcoreEvas.h" +#include "FUi_EcoreEvasMgr.h" +#include "FUi_Window.h" +#include "FUi_ControlManager.h" +#include "FUi_ResourceManager.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUiCtrl_IndicatorManager.h" +#include "FUiCtrl_Form.h" +#include "FUiCtrl_Frame.h" +#include "FUiCtrl_Keypad.h" + +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Animations; + + +namespace Tizen { namespace Ui { namespace Controls +{ + +static const char* pPortraitSvcName = "elm_indicator_portrait"; +static const char* pLandScapeSvcName = "elm_indicator_landscape"; +const int NUMBER_OF_OBJECT = 2; + +_IndicatorManager* _IndicatorManager::__pInstance = null; + +_IndicatorManager* +_IndicatorManager::GetInstance(void) +{ + return __pInstance; +} + +void +_IndicatorManager::Initialize(void) +{ + if (!__pInstance) + { + __pInstance = new (std::nothrow)_IndicatorManager(); + SysAssert(__pInstance); + } +} + +void +_IndicatorManager::InitializeInstance(void) +{ + static pthread_once_t once_block = PTHREAD_ONCE_INIT; + + if (!__pInstance) + { + pthread_once(&once_block, Initialize); + } +} + +void +_IndicatorManager::ReleaseInstance(void) +{ + if (__pInstance) + { + delete __pInstance; + __pInstance = null; + } +} + +_IndicatorManager::_IndicatorManager(void) // [ToDo] exception check. +{ + __indicatorMap.Construct(); +} + +_IndicatorManager::~_IndicatorManager(void) +{ + IMapEnumeratorT<_Window*, IndicatorComponent*>* pEnumerator = __indicatorMap.GetMapEnumeratorN(); + if (pEnumerator) + { + while(pEnumerator->MoveNext() == E_SUCCESS) + { + IndicatorComponent* pIndicatorComponent = null; + pEnumerator->GetValue(pIndicatorComponent); + + if (pIndicatorComponent) + { + delete pIndicatorComponent[0].pPortraitSurface; + delete pIndicatorComponent[1].pPortraitSurface; + delete pIndicatorComponent[0].pLandscapeSurface; + delete pIndicatorComponent[1].pLandscapeSurface; + pIndicatorComponent[0].pPortraitVisualElement->Destroy(); + pIndicatorComponent[0].pLandscapeVisualElement->Destroy(); + pIndicatorComponent[1].pPortraitVisualElement->Destroy(); + pIndicatorComponent[1].pLandscapeVisualElement->Destroy(); + + delete [] pIndicatorComponent; + } + } + delete pEnumerator; + } + + __indicatorMap.RemoveAll(); +} + +_VisualElement* +_IndicatorManager::GetIndicatorVisualElement(_Window* pWindow, _IndicatorOrientation orientation, _Control* pControl) const +{ + result r = E_SUCCESS; + + IndicatorComponent* pIndicatorComponentArray = null; + r = __indicatorMap.GetValue(pWindow, pIndicatorComponentArray); + SysTryReturn(NID_UI_CTRL, pIndicatorComponentArray, null, E_SYSTEM, "[E_SYSTEM] Unable to get Indicator"); + + + for(int i = 0 ; i < NUMBER_OF_OBJECT ; i++) + { + if (pControl == pIndicatorComponentArray[i].pControl) + { + if ((orientation == _INDICATOR_ORIENTATION_PORTRAIT) && (pIndicatorComponentArray[i].portraitVisualElementUsed)) + { + return pIndicatorComponentArray[i].pPortraitVisualElement; + } + else if((orientation == _INDICATOR_ORIENTATION_LANDSCAPE) && (pIndicatorComponentArray[i].landscapeVisualElementUsed)) + { + return pIndicatorComponentArray[i].pLandscapeVisualElement; + } + } + } + + if (IsFull(pIndicatorComponentArray)) + { + _Frame* pFrame = dynamic_cast<_Frame*>(pWindow); + if (pFrame) + { + _Form* pCurrentForm = pFrame->GetCurrentForm(); + if (pCurrentForm == pControl) + { + int count = pFrame->GetChildCount(); + pCurrentForm = dynamic_cast<_Form*>(pFrame->GetChild(count-2)); + } + + if (pCurrentForm) + { + for(int i = 0 ; i < NUMBER_OF_OBJECT ; i++) + { + if (pIndicatorComponentArray[i].pControl != pCurrentForm) + { + _Form* pForm = dynamic_cast<_Form*>(pIndicatorComponentArray[i].pControl); + if (pForm) + { + pForm->DeleteIndicatorObject(); + } + break; + } + } + } + } + } + + _VisualElement* pVisalElement = null; + if (pIndicatorComponentArray) + { + for(int i = 0 ; i < NUMBER_OF_OBJECT ; i++) + { + if (orientation == _INDICATOR_ORIENTATION_PORTRAIT) + { + if (!(pIndicatorComponentArray[i].portraitVisualElementUsed)) + { + pVisalElement = pIndicatorComponentArray[i].pPortraitVisualElement; + pIndicatorComponentArray[i].portraitVisualElementUsed = true; + pIndicatorComponentArray[i].pControl = pControl; + break; + } + } + else if(orientation == _INDICATOR_ORIENTATION_LANDSCAPE) + { + if (!(pIndicatorComponentArray[i].landscapeVisualElementUsed)) + { + pVisalElement = pIndicatorComponentArray[i].pLandscapeVisualElement; + pIndicatorComponentArray[i].landscapeVisualElementUsed = true; + pIndicatorComponentArray[i].pControl = pControl; + break; + } + } + } + } + return pVisalElement; +} + +result +_IndicatorManager::ReleaseIndicatorVisualElement(_Window* pWindow, _IndicatorOrientation orientation, _VisualElement* pVisualElement) +{ + result r = E_SUCCESS; + IndicatorComponent* pIndicatorComponentArray = null; + r = __indicatorMap.GetValue(pWindow, pIndicatorComponentArray); + + if (pIndicatorComponentArray) + { + for(int i = 0 ; i < NUMBER_OF_OBJECT ; i++) + { + if (orientation == _INDICATOR_ORIENTATION_PORTRAIT) + { + if (pIndicatorComponentArray[i].portraitVisualElementUsed) + { + if (pVisualElement == pIndicatorComponentArray[i].pPortraitVisualElement) + { + pIndicatorComponentArray[i].portraitVisualElementUsed = false; + pIndicatorComponentArray[i].pControl = null; + break; + } + } + } + else if(orientation == _INDICATOR_ORIENTATION_LANDSCAPE) + { + if (pIndicatorComponentArray[i].landscapeVisualElementUsed) + { + if (pVisualElement == pIndicatorComponentArray[i].pLandscapeVisualElement) + { + pIndicatorComponentArray[i].landscapeVisualElementUsed = false; + pIndicatorComponentArray[i].pControl = null; + break; + } + } + } + } + } + return r;; +} + +result +_IndicatorManager::AddWindow(_Window* pWindow) +{ + result r = E_SUCCESS; + + _Frame* pFrame = dynamic_cast<_Frame*>(pWindow); + _Keypad* pKeypad = dynamic_cast<_Keypad*>(pWindow); + + if ((pFrame == null) && (pKeypad == null)) + { + return E_SUCCESS; + } + + IndicatorComponent* pIndicatorComponentArray = MakeIndicatorComponentArrayN(pWindow); + + r = __indicatorMap.Add(pWindow, pIndicatorComponentArray); + + return r; +} + +result +_IndicatorManager::DeleteWindow(_Window* pWindow) +{ + result r = E_SUCCESS; + IndicatorComponent* pIndicatorComponentArray = null; + + _Frame* pFrame = dynamic_cast<_Frame*>(pWindow); + _Keypad* pKeypad = dynamic_cast<_Keypad*>(pWindow); + + if ((pFrame == null) && (pKeypad == null)) + { + return E_SUCCESS; + } + + r = __indicatorMap.GetValue(pWindow, pIndicatorComponentArray); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS && pIndicatorComponentArray, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (pIndicatorComponentArray[0].pPortraitEvasObject) + { + evas_object_del(pIndicatorComponentArray[0].pPortraitEvasObject); + } + + if (pIndicatorComponentArray[0].pLandscapeEvasObject) + { + evas_object_del(pIndicatorComponentArray[0].pLandscapeEvasObject); + } + + if (pIndicatorComponentArray[1].pPortraitEvasObject) + { + evas_object_del(pIndicatorComponentArray[1].pPortraitEvasObject); + } + + if (pIndicatorComponentArray[1].pLandscapeEvasObject) + { + evas_object_del(pIndicatorComponentArray[1].pLandscapeEvasObject); + } + + delete pIndicatorComponentArray[0].pPortraitSurface; + delete pIndicatorComponentArray[0].pLandscapeSurface; + delete pIndicatorComponentArray[1].pPortraitSurface; + delete pIndicatorComponentArray[1].pLandscapeSurface; + pIndicatorComponentArray[0].pPortraitVisualElement->Destroy(); + pIndicatorComponentArray[0].pLandscapeVisualElement->Destroy(); + pIndicatorComponentArray[1].pPortraitVisualElement->Destroy(); + pIndicatorComponentArray[1].pLandscapeVisualElement->Destroy(); + + delete [] pIndicatorComponentArray; + __indicatorMap.Remove(pWindow); + + return r; +} + +IndicatorComponent* +_IndicatorManager::MakeIndicatorComponentArrayN(_Window* pWindow) +{ + result r = E_SUCCESS; + Eina_Bool result = EINA_TRUE; + FloatDimension portraitsize(0.0f, 0.0f); + FloatDimension landscapesize(0.0f, 0.0f); + + _VisualElement* pLandscapeVisualElement = null; + _VisualElement* pPortraitVisualElement = null; + + IndicatorComponent* pIndicatorComponentArray = new IndicatorComponent[NUMBER_OF_OBJECT]; + + _RootVisualElement* pRootVisualElement = pWindow->GetRootVisualElement(); + _EflLayer* pEflLayer = static_cast<_EflLayer*>(pRootVisualElement->GetNativeLayer()); + Ecore_Evas* pEcore_Evas = pEflLayer->GetEcoreEvas(); + SysTryCatch(NID_UI_CTRL, pEcore_Evas, , E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + portraitsize = GetIndicatorSizeF(_INDICATOR_ORIENTATION_PORTRAIT); + landscapesize = GetIndicatorSizeF(_INDICATOR_ORIENTATION_LANDSCAPE); + + //Get indicator Image Object + for(int i = 0 ; i < NUMBER_OF_OBJECT ; i++) + { + Evas_Object* pPortraitEvasObject = ecore_evas_extn_plug_new(pEcore_Evas); + SysTryCatch(NID_UI_CTRL, pPortraitEvasObject, , E_SYSTEM, "[E_SYSTEM] Unable to get evas object"); + + Evas_Object* pLandscapeEvasObject = ecore_evas_extn_plug_new(pEcore_Evas); + SysTryCatch(NID_UI_CTRL, pLandscapeEvasObject, , E_SYSTEM, "[E_SYSTEM] Unable to get evas object"); + + result = ecore_evas_extn_plug_connect(pPortraitEvasObject, pPortraitSvcName, 0, EINA_FALSE); + result = ecore_evas_extn_plug_connect(pLandscapeEvasObject, pLandScapeSvcName, 0, EINA_FALSE); + + evas_object_resize(pPortraitEvasObject, portraitsize.width, portraitsize.height); + evas_object_resize(pLandscapeEvasObject, landscapesize.width, landscapesize.height); + evas_object_move(pPortraitEvasObject, 0, 0); + evas_object_move(pLandscapeEvasObject, 0, 0); + + 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(); + 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."); + pPortraitVisualElement->SetImplicitAnimationEnabled(false); + pPortraitVisualElement->SetShowState(true); + pPortraitVisualElement->SetSurface(pPortraitSurface); + pPortraitVisualElement->SetBounds(FloatRectangle(0.0f, 0.0f, portraitsize.width, portraitsize.height)); + + 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."); + pLandscapeVisualElement->SetImplicitAnimationEnabled(false); + pLandscapeVisualElement->SetShowState(true); + pLandscapeVisualElement->SetSurface(pLandScapeSurface); + pLandscapeVisualElement->SetBounds(FloatRectangle(0.0f, 0.0f, landscapesize.width, landscapesize.height)); + + pIndicatorComponentArray[i].pPortraitEvasObject = pPortraitEvasObject; + pIndicatorComponentArray[i].pLandscapeEvasObject = pLandscapeEvasObject; + pIndicatorComponentArray[i].pPortraitSurface = pPortraitSurface; + pIndicatorComponentArray[i].pLandscapeSurface = pLandScapeSurface; + pIndicatorComponentArray[i].pPortraitVisualElement = pPortraitVisualElement; + pIndicatorComponentArray[i].pLandscapeVisualElement = pLandscapeVisualElement; + pIndicatorComponentArray[i].portraitVisualElementUsed = false; + pIndicatorComponentArray[i].landscapeVisualElementUsed = false; + pIndicatorComponentArray[i].pControl = null; + } + + return pIndicatorComponentArray; + +CATCH: + delete [] pIndicatorComponentArray; + if (pPortraitVisualElement) + { + pPortraitVisualElement->Destroy(); + } + if (pLandscapeVisualElement) + { + pLandscapeVisualElement->Destroy(); + } + return null; +} + +bool +_IndicatorManager::IsFull(IndicatorComponent* pIndicatorComponentArray) const +{ + if (pIndicatorComponentArray[0].portraitVisualElementUsed && pIndicatorComponentArray[0].landscapeVisualElementUsed + && pIndicatorComponentArray[1].portraitVisualElementUsed && pIndicatorComponentArray[1].landscapeVisualElementUsed) + { + return true; + } + + return false; +} + +Evas_Object* +_IndicatorManager::GetEvasObject(_Window* pWindow, _Control* pControl, _IndicatorOrientation orientation) const +{ + Evas_Object* pEvasObject = null; + + result r = E_SUCCESS; + IndicatorComponent* pIndicatorComponentArray = null; + r = __indicatorMap.GetValue(pWindow, pIndicatorComponentArray); + SysTryReturn(NID_UI_CTRL, pIndicatorComponentArray, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + for(int i = 0 ; i < NUMBER_OF_OBJECT ; i++) + { + if (pControl == pIndicatorComponentArray[i].pControl) + { + if (orientation == _INDICATOR_ORIENTATION_PORTRAIT) + { + pEvasObject = pIndicatorComponentArray[i].pPortraitEvasObject; + } + else if(orientation == _INDICATOR_ORIENTATION_LANDSCAPE) + { + pEvasObject = pIndicatorComponentArray[i].pLandscapeEvasObject; + } + } + } + return pEvasObject; +} + +Dimension +_IndicatorManager::GetIndicatorSize(_IndicatorOrientation orientation) const +{ + const Dimension portraitSize = _ControlManager::GetInstance()->_ControlManager::GetScreenSize(); + const Dimension landscapeSize = Dimension(portraitSize.height, portraitSize.width); + + Rectangle indicatorbounds(0, 0, 0, 0); + + if (orientation == _INDICATOR_ORIENTATION_PORTRAIT) + { + indicatorbounds.width = portraitSize.width; + } + else + { + indicatorbounds.width = landscapeSize.width; + } + GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, indicatorbounds.height); + + Dimension size(0, 0); + size.width = indicatorbounds.width; + size.height = indicatorbounds.height; + + return size; +} + +FloatDimension +_IndicatorManager::GetIndicatorSizeF(_IndicatorOrientation orientation) const +{ + const FloatDimension portraitSize = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF(); + const FloatDimension landscapeSize = FloatDimension(portraitSize.height, portraitSize.width); + + FloatDimension indicatorSize(0.0f, 0.0f); + + if (orientation == _INDICATOR_ORIENTATION_PORTRAIT) + { + indicatorSize.width = portraitSize.width; + } + else + { + indicatorSize.width = landscapeSize.width; + } + GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, indicatorSize.height); + + return indicatorSize; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_InputPad.cpp b/src/ui/controls/FUiCtrl_InputPad.cpp new file mode 100644 index 0000000..9f8c396 --- /dev/null +++ b/src/ui/controls/FUiCtrl_InputPad.cpp @@ -0,0 +1,312 @@ +// +// 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_InputPad.cpp + * @brief This is the implementation file for the _InputPad class. + */ + +#include + +#include "FUiCtrl_InputPad.h" +#include "FUiCtrl_InputPadPresenter.h" +#include "FUi_AccessibilityContainer.h" +#include "FUi_AccessibilityElement.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; + +const int INPUTPAD_BUTTON_MAX = 12; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_InputPad::_InputPad(void) + : __pInputPadPresenter(null) +{ + ClearLastResult(); +} + +_InputPad::~_InputPad(void) +{ + delete __pInputPadPresenter; + __pInputPadPresenter = null; + + RemoveAllAccessibilityElement(); + + ClearLastResult(); +} + +result +_InputPad::Construct(const FloatRectangle& bounds) +{ + result r = E_SUCCESS; + + SetBounds(bounds); + + __pInputPadPresenter = new (std::nothrow) _InputPadPresenter(this); + SysTryReturnResult(NID_UI_CTRL, __pInputPadPresenter, E_OUT_OF_MEMORY, "Memory allocation failed."); + + r = __pInputPadPresenter->Construct(bounds); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to construct the instance of presenter for Inputpad"); + + AcquireHandle(); + + if(likely((_AccessibilityManager::IsActivated()))) + { + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + if (pContainer != null) + { + InitializeAccessibilityElementMonthNames(); + pContainer->SetPriority(ACCESSIBILITY_PRIORITY_KEYPAD); + pContainer->Activate(true); + } + } + + ClearLastResult(); + + return r; + +CATCH: + delete __pInputPadPresenter; + __pInputPadPresenter = null; + + return r; +} + +result +_InputPad::SetInputPadEventListener(const _IInputPadEventListener& listener) +{ + ClearLastResult(); + + SysAssertf((__pInputPadPresenter != null), "The instance of InputpadPresenter is not yet constructed."); + + __pInputPadPresenter->SetInputPadEventListener(listener); + + return E_SUCCESS; +} + +void +_InputPad::SetInputPadStyle(const _InputPadStyle style) +{ + SysTryReturnVoidResult(NID_UI_CTRL, (style >= INPUTPAD_STYLE_NORMAL), E_INVALID_ARG, + "[E_INVALID_ARG] Invalid argument(s) is used. The style provided is not present in the _InputPadStyle list."); + + SysTryReturnVoidResult(NID_UI_CTRL, (style < INPUTPAD_STYLE_MAX), E_INVALID_ARG, + "[E_INVALID_ARG] Invalid argument(s) is used. The style provided is not a valid _InputPadStyle value."); + + if (style == __pInputPadPresenter->GetInputPadStyle()) + { + if (HasAccessibilityElement() == true) + { + return; + } + } + else + { + RemoveAllAccessibilityElement(); + } + + __pInputPadPresenter->SetInputPadStyle(style); + SetAllAccessibilityElement(); + + return; +} + +String& +_InputPad::GetAccessibilityElementMonthName(int number) +{ + SysTryReturn(NID_UI_CTRL, (number >= 0), __pMonthNames[0], E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get the month name."); + + return __pMonthNames[number]; +} + +void +_InputPad::SetFont(Font* pFont) +{ + __pInputPadPresenter->SetFont(pFont); + + return; +} + +void +_InputPad::OnBoundsChanged(void) +{ + if (__pInputPadPresenter != null) + { + __pInputPadPresenter->LoadProperties(GetOrientation()); + SetBoundsAllAccessibilityElement(); + } + + return; +} + +void +_InputPad::OnDraw(void) +{ + __pInputPadPresenter->Draw(); + + return; +} + +bool +_InputPad::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pInputPadPresenter->OnTouchPressed(source, touchinfo); +} + +bool +_InputPad::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pInputPadPresenter->OnTouchReleased(source, touchinfo); +} + +bool +_InputPad::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pInputPadPresenter->OnTouchCanceled(source, touchinfo); +} + +void +_InputPad::OnChangeLayout(_ControlOrientation orientation) +{ + if (__pInputPadPresenter != null) + { + __pInputPadPresenter->EnableLayoutChangedFlag(); + __pInputPadPresenter->LoadProperties(orientation); + __pInputPadPresenter->SetInputPadStyle(__pInputPadPresenter->GetInputPadStyle()); + SetBoundsAllAccessibilityElement(); + } + + return; +} + +bool +_InputPad::HasAccessibilityElement(void) +{ + return __accessibilityElements.GetCount() > 0; +} + +void +_InputPad::SetAllAccessibilityElement(void) +{ + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + if (pContainer != null) + { + pContainer->RemoveAllElement(); + + for (int index = 0; index < INPUTPAD_BUTTON_MAX; index++) + { + int returnValue = __pInputPadPresenter->GetReturnValue(index); + if (returnValue >= 0) + { + _AccessibilityElement* pElement = new (std::nothrow) _AccessibilityElement(true); + if (pElement != null) + { + if (__pInputPadPresenter->GetInputPadStyle() == INPUTPAD_STYLE_ALPHA) + { + pElement->SetLabel(__pMonthNames[index]); + } + else + { + pElement->SetLabel(Integer::ToString(returnValue)); + } + pElement->SetTrait(ACCESSIBILITY_TRAITS_NONE); +// pElement->SetTrait(ACCESSIBILITY_TRAITS_INPUTPAD); + pElement->SetBounds(__pInputPadPresenter->GetButtonBounds(index)); + pContainer->AddElement(*pElement); + __accessibilityElements.Add(pElement); + } + } + } + } + + return; +} + +void +_InputPad::SetBoundsAllAccessibilityElement(void) +{ + if(likely(!(_AccessibilityManager::IsActivated()))) + { + return; + } + + _AccessibilityElement* pElement = null; + IEnumeratorT<_AccessibilityElement*>* pEnumerator = __accessibilityElements.GetEnumeratorN(); + int index = 0; + while (pEnumerator->MoveNext() == E_SUCCESS) + { + if (pEnumerator->GetCurrent(pElement) == E_SUCCESS) + { + while (__pInputPadPresenter->GetReturnValue(index) < 0) + { + index++; + } + pElement->SetBounds(__pInputPadPresenter->GetButtonBounds(index)); + } + index++; + } + delete pEnumerator; + + return; +} + +void +_InputPad::RemoveAllAccessibilityElement(void) +{ + _AccessibilityElement* pElement = null; + while (HasAccessibilityElement() == true) + { + if ((__accessibilityElements.GetAt(0, pElement)) == E_SUCCESS) + { + __accessibilityElements.RemoveAt(0); + pElement->GetParent()->RemoveElement(*pElement); + } + else + { + __accessibilityElements.RemoveAt(0); + } + } + + return; +} + +void +_InputPad::InitializeAccessibilityElementMonthNames(void) +{ + __pMonthNames[0] = L"January"; + __pMonthNames[1] = L"February"; + __pMonthNames[2] = L"March"; + __pMonthNames[3] = L"April"; + __pMonthNames[4] = L"May"; + __pMonthNames[5] = L"June"; + __pMonthNames[6] = L"July"; + __pMonthNames[7] = L"August"; + __pMonthNames[8] = L"September"; + __pMonthNames[9] = L"October"; + __pMonthNames[10] = L"November"; + __pMonthNames[11] = L"December"; + + return; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_InputPadPresenter.cpp b/src/ui/controls/FUiCtrl_InputPadPresenter.cpp new file mode 100644 index 0000000..d8b38a3 --- /dev/null +++ b/src/ui/controls/FUiCtrl_InputPadPresenter.cpp @@ -0,0 +1,680 @@ +// +// 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_InputPadPresenter.cpp + * @brief This is the implementation file for the _InputPadPresenter class. + */ + +#include +#include +#include + +#include "FUi_ResourceManager.h" +#include "FUiAnim_VisualElement.h" +#include "FUiCtrl_InputPad.h" +#include "FUiCtrl_InputPadPresenter.h" +#include "FUiCtrl_DateTimeUtils.h" +#include "FUi_CoordinateSystemUtils.h" + +using namespace Tizen::Ui::Controls; +using namespace Tizen::Graphics; +using namespace Tizen::Graphics::_Text; +using namespace Tizen::Base; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_InputPadPresenter::_InputPadPresenter(_InputPad* pInputPad) + : __pInputPad(pInputPad) + , __pInputPadEventListener(null) + , __pFont(null) + , __pKeypadBackgroundBitmap(null) + , __inputPadStyle(INPUTPAD_STYLE_NORMAL) + , __buttonWidth(0.0f) + , __buttonHeight(0.0f) + , __startX(0.0f) + , __startY(0.0f) + , __marginX(0.0f) + , __marginY(0.0f) + , __pressedIndex(-1) + , __isLayoutChanged(false) +{ + for (int i = 0; i < DATETIME_STATUS_MAX; i++) + { + __pKeypadButtonNormalBitmap[i] = null; + __pKeypadButtonEffectBitmap[i] = null; + } +} + +_InputPadPresenter::~_InputPadPresenter(void) +{ + delete __pFont; + __pFont = null; + + delete __pKeypadBackgroundBitmap; + __pKeypadBackgroundBitmap = null; + + for (int i = 0; i < DATETIME_STATUS_MAX; i++) + { + delete __pKeypadButtonNormalBitmap[i]; + __pKeypadButtonNormalBitmap[i] = null; + + delete __pKeypadButtonEffectBitmap[i]; + __pKeypadButtonEffectBitmap[i] = null; + } +} + +result +_InputPadPresenter::Construct(const FloatRectangle& bounds) +{ + result r = E_SUCCESS; + + r = LoadProperties(__pInputPad->GetOrientation()); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, + "A system error has occurred. Failed to load the properties for input pad."); + + r = LoadResource(); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, + "A system error has occurred. Failed to load the resource for input pad."); + + r = InitializeTextObjects(); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, + "A system error has occurred. Failed to initialize the text objects for input pad."); + + return r; +} + +result +_InputPadPresenter::LoadProperties(_ControlOrientation orientation) +{ + float marginTop = 0.0f; + + GET_SHAPE_CONFIG(INPUTPAD::BUTTON_WIDTH, orientation, __buttonWidth); + GET_SHAPE_CONFIG(INPUTPAD::BUTTON_HEIGHT, orientation, __buttonHeight); + GET_SHAPE_CONFIG(INPUTPAD::BUTTON_HORIZONTAL_MARGIN, orientation, __marginX); + GET_SHAPE_CONFIG(INPUTPAD::BUTTON_VERTICAL_MARGIN, orientation, __marginY); + GET_SHAPE_CONFIG(INPUTPAD::TOP_MARGIN, orientation, marginTop); + + __startX = (__pInputPad->GetBounds().width - (__buttonWidth + __marginX) * INPUTPAD_BUTTON_COLUMN_MAX + __marginX) / 2; + __startY = marginTop; + + return E_SUCCESS; +} + +result +_InputPadPresenter::LoadResource(void) +{ + result r = E_SUCCESS; + + Color buttonColor[DATETIME_STATUS_MAX]; + Color replacementColor = Color::GetColor(COLOR_ID_MAGENTA); + + bool isCustomBitmap[DATETIME_STATUS_MAX]; + + for (int i = 0; i < DATETIME_STATUS_MAX; i++) + { + buttonColor[i] = Color(); + isCustomBitmap[i] = false; + } + + GET_COLOR_CONFIG(INPUTPAD::BUTTON_BG_NORMAL, buttonColor[DATETIME_STATUS_NORMAL]); + GET_COLOR_CONFIG(INPUTPAD::BUTTON_BG_PRESSED, buttonColor[DATETIME_STATUS_SELECTED]); + GET_COLOR_CONFIG(INPUTPAD::BUTTON_BG_HIGHLIGHTED, buttonColor[DATETIME_STATUS_HIGHLIGHTED]); + GET_COLOR_CONFIG(INPUTPAD::BUTTON_BG_DISABLED, buttonColor[DATETIME_STATUS_DISABLED]); + + r = GET_BITMAP_CONFIG_N(INPUTPAD::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pKeypadBackgroundBitmap); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); + + 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); + + if (isCustomBitmap[DATETIME_STATUS_NORMAL]) + { + 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)); + } + 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]) + { + 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]) + { + 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]) + { + 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)); + } + else + { + 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; + +CATCH: + delete __pKeypadBackgroundBitmap; + __pKeypadBackgroundBitmap = null; + + for (int i = 0; i < DATETIME_STATUS_MAX; i++) + { + + delete __pKeypadButtonNormalBitmap[i]; + __pKeypadButtonNormalBitmap[i] = null; + + delete __pKeypadButtonEffectBitmap[i]; + __pKeypadButtonEffectBitmap[i] = null; + } + + return r; +} + +result +_InputPadPresenter::InitializeTextObjects(void) +{ + result r = E_SUCCESS; + + // Create TextObject + r = __textObject.Construct(); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + + __textObject.SetAlignment(TEXT_OBJECT_ALIGNMENT_CENTER | TEXT_OBJECT_ALIGNMENT_MIDDLE); + __textObject.SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE); + __textObject.SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); + + r = __guideTextObject.Construct(); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + + __guideTextObject.SetAlignment(TEXT_OBJECT_ALIGNMENT_RIGHT | TEXT_OBJECT_ALIGNMENT_TOP); + __guideTextObject.SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE); + __guideTextObject.SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); + + return r; +} + +void +_InputPadPresenter::SetInputPadEventListener(const _IInputPadEventListener& listener) +{ + __pInputPadEventListener = const_cast <_IInputPadEventListener*>(&listener); + + return; +} + +result +_InputPadPresenter::SetInputPadStyle(const _InputPadStyle style) +{ + if (style != __inputPadStyle || __isLayoutChanged == true) + { + __isLayoutChanged = false; + + __inputPadStyle = style; + } + __pressedIndex = -1; + + return E_SUCCESS; +} + +_InputPadStyle +_InputPadPresenter::GetInputPadStyle(void) const +{ + return __inputPadStyle; +} + +FloatRectangle +_InputPadPresenter::GetButtonBounds(int index) const +{ + FloatRectangle buttonBounds; + + buttonBounds.x = __startX + (index % INPUTPAD_BUTTON_COLUMN_MAX) * (__buttonWidth + __marginX); + buttonBounds.y = __startY + (index / INPUTPAD_BUTTON_COLUMN_MAX) * (__buttonHeight + __marginY); + buttonBounds.width = __buttonWidth; + buttonBounds.height = __buttonHeight; + + return buttonBounds; +} + +result +_InputPadPresenter::Draw(void) +{ + result r = E_SUCCESS; + FloatRectangle bgBounds; + + Canvas* pCanvas = __pInputPad->GetCanvasN(); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, (pCanvas != null), r, "Propagating."); + + pCanvas->Clear(); + + bgBounds = pCanvas->GetBoundsF(); + + if(__pKeypadBackgroundBitmap != null) + { + 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); + + delete pCanvas; + pCanvas = null; + + return r; + +CATCH: + delete pCanvas; + pCanvas = null; + + return r; +} + +void +_InputPadPresenter::EnableLayoutChangedFlag(void) +{ + __isLayoutChanged = true; + + return; +} + +void +_InputPadPresenter::SetFont(Font* pFont) +{ + if (__pFont != null) + { + delete __pFont; + __pFont = null; + } + + __pFont = _FontImpl::CloneN(*pFont); + SysTryReturnVoidResult(NID_UI_CTRL, __pFont != null, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + return; +} + +result +_InputPadPresenter::DrawAllButtons(Canvas& canvas) +{ + result r = E_SUCCESS; + + for (int i = 0; i < INPUTPAD_BUTTON_MAX; i++) + { + r |= DrawButton(canvas, i); + } + + if (r != E_SUCCESS) + { + return E_SYSTEM; + } + + return E_SUCCESS; +} + +result +_InputPadPresenter::DrawButton(Canvas& canvas, int index) +{ + result r = E_SUCCESS; + Color textColor; + DateTimePickerStatus status; + bool isCustomBitmap[DATETIME_STATUS_MAX]; + + FloatRectangle buttonBounds = GetButtonBounds(index); + int returnValue = GetReturnValue(index); + + // Do not Draw Extra Buttons in case of Numeric Keypad + if (returnValue < 0) + { + return E_SUCCESS; + } + + if (__pInputPad->IsEnabled() == false) + { + status = DATETIME_STATUS_DISABLED; + GET_COLOR_CONFIG(INPUTPAD::TEXT_DISABLED, textColor); + } + else if (__pressedIndex == index) + { + status = DATETIME_STATUS_SELECTED; + GET_COLOR_CONFIG(INPUTPAD::TEXT_PRESSED, textColor); + } + else + { + status = DATETIME_STATUS_NORMAL; + GET_COLOR_CONFIG(INPUTPAD::TEXT_NORMAL, textColor); + } + + 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); + + if (isCustomBitmap[status] == false && __pKeypadButtonEffectBitmap[status] != null) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pKeypadButtonEffectBitmap[status])) + { + r = canvas.DrawNinePatchedBitmap(buttonBounds, *__pKeypadButtonEffectBitmap[status]); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); + } + else + { + r = canvas.DrawBitmap(buttonBounds, *__pKeypadButtonEffectBitmap[status]); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); + } + } + + if (__pKeypadButtonNormalBitmap[status] != null) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pKeypadButtonNormalBitmap[status])) + { + r = canvas.DrawNinePatchedBitmap(buttonBounds, *__pKeypadButtonNormalBitmap[status]); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); + } + else + { + r = canvas.DrawBitmap(buttonBounds, *__pKeypadButtonNormalBitmap[status]); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); + } + } + + // Draw text + if (__inputPadStyle == INPUTPAD_STYLE_ALPHA) + { + // Calculate text bounds + int textCorrectionY = 0; + GET_SHAPE_CONFIG(INPUTPAD::TEXT_CORRECTION_Y, __pInputPad->GetOrientation(), textCorrectionY); + + buttonBounds.y += textCorrectionY; + + _DateTimeUtils dateTimeUtils; + String text = dateTimeUtils.GetMonthString(returnValue); + + r = __textObject.RemoveAll(); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); + + TextSimple* pSimpleText = new (std::nothrow)TextSimple((wchar_t*)text.GetPointer(), text.GetLength(), + TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL); + SysTryReturnResult(NID_UI_CTRL, (pSimpleText != null), E_OUT_OF_MEMORY, "Memory allocation failed."); + + r = __textObject.AppendElement(*pSimpleText); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); + + r = __textObject.SetForegroundColor(textColor, 0, __textObject.GetTextLength()); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); + + int fontSize = 0; + GET_SHAPE_CONFIG(INPUTPAD::ALPHA_FONT_SIZE, __pInputPad->GetOrientation(), fontSize); + + r = _FontImpl::GetInstance(*__pFont)->SetStyle(FONT_STYLE_BOLD); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); + + r = _FontImpl::GetInstance(*__pFont)->SetSize(fontSize); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); + + r = __textObject.SetFont(__pFont, 0, __textObject.GetTextLength()); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); + + r = __textObject.SetBounds(buttonBounds); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); + + r = __textObject.Draw(*_CanvasImpl::GetInstance(canvas)); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); + + // Draw guide text + int guideTextCorrectionX = 0; + GET_SHAPE_CONFIG(INPUTPAD::GUIDE_CORRECTION_X, __pInputPad->GetOrientation(), guideTextCorrectionX); + + buttonBounds.width -= guideTextCorrectionX; + + Color guideTextColor; + GET_COLOR_CONFIG(INPUTPAD::GUIDE_TEXT_NORMAL, guideTextColor); + + String guideText = Integer::ToString(returnValue); + + r = __guideTextObject.RemoveAll(); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); + + TextSimple* pSimpleTextForGuideText = new (std::nothrow)TextSimple((wchar_t*)guideText.GetPointer(), + guideText.GetLength(), TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL); + SysTryReturnResult(NID_UI_CTRL, (pSimpleTextForGuideText != null), E_OUT_OF_MEMORY, "Memory allocation failed."); + + r = __guideTextObject.AppendElement(*pSimpleTextForGuideText); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); + + r = __guideTextObject.SetForegroundColor(guideTextColor, 0, __guideTextObject.GetTextLength()); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); + + GET_SHAPE_CONFIG(INPUTPAD::GUIDE_FONT_SIZE, __pInputPad->GetOrientation(), fontSize); + + r = _FontImpl::GetInstance(*__pFont)->SetStyle(FONT_STYLE_PLAIN); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); + + r = _FontImpl::GetInstance(*__pFont)->SetSize(fontSize); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); + + r = __guideTextObject.SetFont(__pFont, 0, __guideTextObject.GetTextLength()); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); + + r = __guideTextObject.SetBounds(buttonBounds); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); + + r = __guideTextObject.Draw(*_CanvasImpl::GetInstance(canvas)); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); + } + else if (returnValue >= 0) + { + String text = Integer::ToString(returnValue); + + r = __textObject.RemoveAll(); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); + + TextSimple* pSimpleText = new (std::nothrow)TextSimple((wchar_t*)text.GetPointer(), + text.GetLength(), TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL); + SysTryReturnResult(NID_UI_CTRL, (pSimpleText != null), E_OUT_OF_MEMORY, "Memory allocation failed."); + + r = __textObject.AppendElement(*pSimpleText); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); + result r = E_SUCCESS; + + r = __textObject.SetForegroundColor(textColor, 0, __textObject.GetTextLength()); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); + + int fontSize = 0; + + GET_SHAPE_CONFIG(INPUTPAD::NUMERIC_FONT_SIZE, __pInputPad->GetOrientation(), fontSize); + + r = _FontImpl::GetInstance(*__pFont)->SetStyle(FONT_STYLE_BOLD); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); + + r = _FontImpl::GetInstance(*__pFont)->SetSize(fontSize); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); + + r = __textObject.SetFont(__pFont, 0, __textObject.GetTextLength()); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); + + r = __textObject.SetBounds(buttonBounds); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); + + r = __textObject.Draw(*_CanvasImpl::GetInstance(canvas)); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); + } + + return E_SUCCESS; +} + +result +_InputPadPresenter::RefreshButton(int index) +{ + Canvas* pCanvas = __pInputPad->GetCanvasN(); + SysTryReturnResult(NID_UI_CTRL, (pCanvas != null), GetLastResult(), "Propagating."); + + result r = DrawButton(*pCanvas, index); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to draw the keypad button."); + + delete pCanvas; + pCanvas = null; + + if (__pInputPad->GetVisualElement() != null) + { + __pInputPad->GetVisualElement()->SetFlushNeeded(); + } + + return r; + +CATCH: + delete pCanvas; + pCanvas = null; + + return r; +} + +int +_InputPadPresenter::GetIndexFromTouchedPosition(const FloatPoint& point) const +{ + float correctionValue = 0.0f; + + GET_FIXED_VALUE_CONFIG(INPUTPAD::BUTTON_TOUCH_CORRECTION_Y, __pInputPad->GetOrientation(), correctionValue); + + if (point.x < (__startX - correctionValue) || point.y < (__startY - correctionValue)) + { + return -1; + } + + int row = _CoordinateSystemUtils::ConvertToInteger((point.y - __startY + __marginY + correctionValue) / (__buttonHeight + __marginY)); + int col = _CoordinateSystemUtils::ConvertToInteger((point.x - __startX + __marginX) / (__buttonWidth + __marginX)); + if (row >= INPUTPAD_BUTTON_ROW_MAX || col >= INPUTPAD_BUTTON_COLUMN_MAX) + { + return -1; + } + + return row * INPUTPAD_BUTTON_COLUMN_MAX + col; +} + +int +_InputPadPresenter::GetReturnValue(int index) const +{ + if (__inputPadStyle == INPUTPAD_STYLE_NORMAL) + { + if (index >= INPUTPAD_NUMBER_1 && index <= INPUTPAD_NUMBER_9) + { + return index + 1; + } + else if (index == INPUTPAD_NUMBER_0) + { + return 0; + } + } + else if (__inputPadStyle == INPUTPAD_STYLE_ALPHA) + { + return index + 1; + } + + return -1; +} + +bool +_InputPadPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + if (&source != __pInputPad) + { + return false; + } + + __pressedIndex = GetIndexFromTouchedPosition(touchinfo.GetCurrentPosition()); + if (__pressedIndex >= 0) + { + RefreshButton(__pressedIndex); + return true; + } + + return false; +} + +bool +_InputPadPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + if (&source != __pInputPad) + { + return false; + } + + SysTryReturn(NID_UI_CTRL, __pressedIndex >= 0, true, E_SUCCESS, "Touch pressed Index is invalid, ignoring touch release"); + + int refreshIndex = __pressedIndex; + int currentReleasedIndex = GetIndexFromTouchedPosition(touchinfo.GetCurrentPosition()); + + if (currentReleasedIndex >= 0) + { + if (__pInputPadEventListener != null) + { + __pInputPadEventListener->OnInputPadValueChanged(source, GetReturnValue(currentReleasedIndex)); + } + } + + __pressedIndex = -1; + if (refreshIndex >= 0) + { + RefreshButton(refreshIndex); + } + + return true; +} + +bool +_InputPadPresenter::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + return OnTouchReleased(source, touchinfo); +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_Keypad.cpp b/src/ui/controls/FUiCtrl_Keypad.cpp new file mode 100644 index 0000000..62e85f0 --- /dev/null +++ b/src/ui/controls/FUiCtrl_Keypad.cpp @@ -0,0 +1,905 @@ +// +// 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_Keypad.cpp +* @brief This file contains implementation of _Keypad class +* +* This file contains implementation of _Keypad class. +*/ + +#include +#include +#include +#include +#include "FUi_AccessibilityContainer.h" +#include "FUi_AccessibilityElement.h" +#include "FUi_EcoreEvas.h" +#include "FUi_EcoreEvasMgr.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_SystemUtilImpl.h" +#include "FUiAnim_ControlVisualElement.h" +#include "FUiAnim_VisualElement.h" +#include "FUiAnim_VisualElementImpl.h" +#include "FUiCtrlForm.h" +#include "FUiCtrl_Indicator.h" +#include "FUiCtrl_Edit.h" +#include "FUiCtrl_Frame.h" +#include "FUiCtrl_Form.h" +#include "FUiCtrl_Keypad.h" +#include "FUiCtrl_Toolbar.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Animations; +using namespace Tizen::Ui::Controls; +using namespace Tizen::System; + +namespace Tizen { namespace Ui { namespace Controls +{ +const int COMMAND_DONE_BUTTON_ID = 100; +const int FOOTER_BACK_BUTTON_ID = 101; + +IMPLEMENT_PROPERTY(_Keypad); + +_Keypad::_Keypad(void) + : __isFirstCall(true) + , __isInitialized(false) + , __isSingleLineEnabled(false) + , __pIndicator(null) + , __pCallerEdit(null) + , __pChildEdit(null) + , __pFooter(null) + , __text() + , __pTextEvent(null) + , __isCommandButtonPressed(false) + , __isPredictionWindowOpendInUSBMode(false) +{ + _AccessibilityContainer* pAccessibilityContainer = GetAccessibilityContainer(); + if(pAccessibilityContainer) + { + pAccessibilityContainer->Activate(true); + } + + _ControlManager::GetInstance()->SetClipboardOwner(this); +} + +_Keypad::~_Keypad(void) +{ + _ControlManager::GetInstance()->SetClipboardOwner(null); + + Dispose(); +} + +_Keypad* +_Keypad::CreateKeypadN(void) +{ + ClearLastResult(); + + FloatDimension screenSize = _ControlManager::GetInstance()->GetScreenSizeF(); + + FloatRectangle portBounds(0.0f, 0.0f, screenSize.width, screenSize.height); + FloatRectangle landBounds(0.0f, 0.0f, screenSize.width, screenSize.height); + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + + _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)); + + r = pKeypad->CreateRootVisualElement(_WINDOW_TYPE_SUB); + + 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); + pEcoreEvas->SetWindowRotationBounds(*pKeypad, 270, landBounds); + + pKeypad->AcquireHandle(); + + return pKeypad; + +CATCH: + delete pKeypad; + + return null; +} + +result +_Keypad::Initialize(int editStyle, _KeypadStyleInfo keypadStyleInfo, int limitLength, _Edit* pCallerEdit) +{ + result r = E_SUCCESS; + bool UsbKeyboardConnected = false; + + _ControlManager* pControlManager = _ControlManager::GetInstance(); + SysTryReturnResult(NID_UI_CTRL, pControlManager, E_SYSTEM, "Failed to get root."); + + if (GetOwner() == null) + { + _Frame* pFrame = dynamic_cast <_Frame*>(pControlManager->GetCurrentFrame()); + SysTryReturn(NID_UI_CTRL, pFrame != null, E_SYSTEM, + E_SYSTEM, "[E_SYSTEM] This instance is not constructed."); + + _Form* pForm = pFrame->GetCurrentForm(); + + if (pForm) + { + SetOwner(pForm); + } + else + { + SetOwner(pFrame); + } + } + + __pFooter = CreateFooter(); + + if (!__pFooter) + { + SysTryReturnResult(NID_UI_CTRL, __pFooter, GetLastResult(), "Unable to create Footer"); + } + + if (pCallerEdit) + { + __pCallerEdit = pCallerEdit; + } + else + { + __pCallerEdit = null; + } + + if (__pChildEdit == null) + { + __pChildEdit = _Edit::CreateEditN(); + SysTryCatch(NID_UI_CTRL, __pChildEdit, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "Memory allocation failed."); + + String doneText; + String cancelText; + _AccessibilityContainer* pAccessibilityContainer = null; + Variant variantKeypadStyle = (int)keypadStyleInfo.keypadStyle; + + GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_DONE, doneText); + GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_CANCEL_ABB, cancelText); + + __pChildEdit->SetFullScreenKeypadEdit(true); + + r = __pChildEdit->Initialize(editStyle, INPUT_STYLE_OVERLAY, limitLength); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pChildEdit->SetTextPredictionEnabled(keypadStyleInfo.textPredictionEnabled); + __pChildEdit->SetKeypadNormalNumberStyle(keypadStyleInfo.isNormalNumberStyle); + __pChildEdit->SetPropertyKeypadStyle(variantKeypadStyle); + + if (!keypadStyleInfo.enterActionEnabled)//EditField Style + { + __pChildEdit->SetKeypadActionEnabled(false); + } + + __pChildEdit->SetLowerCaseModeEnabled(keypadStyleInfo.isLowerCaseModeEnabled); + + r = __pChildEdit->SetKeypadCommandButtonVisible(false); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pChildEdit->AddKeypadEventListener(*this); + + r = AttachChild(*__pChildEdit); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pAccessibilityContainer = GetAccessibilityContainer(); + if (pAccessibilityContainer) + { + _AccessibilityContainer* pAccessibilityEdit = __pChildEdit->GetAccessibilityContainer(); + if (pAccessibilityEdit) + { + pAccessibilityContainer->AddChildContainer(*pAccessibilityEdit); + } + } + + if (__pCallerEdit) + { + if (editStyle & EDIT_STYLE_PASSWORD) + { + __pChildEdit->SetPasswordVisible(__pCallerEdit->IsPasswordVisible()); + } + } + } + + SetClipChildrenEnabled(false); + + if (!__pIndicator) + { + __pIndicator = _Indicator::CreateIndicator(); + SysTryCatch(NID_UI_CTRL, __pIndicator, , GetLastResult(), "Unable to create Indicator"); + + _VisualElement* pKeypadVisualElement = GetVisualElement(); + pKeypadVisualElement->AttachChild(*__pIndicator); + + _VisualElementImpl* pImpl = _VisualElementImpl::GetInstance(*__pIndicator); + r = pImpl->SetZOrderGroup(_ControlVisualElement::Z_ORDER_GROUP_CONTROL + 4); + + 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_HEIGHT, GetOrientation(), indicatorheight); + } + + __pIndicator->SetBounds(FloatRectangle(0.0f, 0.0f, indicatorwidth, indicatorheight)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + UsbKeyboardConnected = __pChildEdit->IsUsbKeyboardConnected(); + + r = ChangeLayoutInternal(LAYOUT_CHANGE_NONE); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pChildEdit->SetVisibleState(true); + + __isInitialized = true; + + r = _SettingInfoImpl::AddSettingEventListenerForInternal(*this); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + +CATCH: + Dispose(); + return r; +} + +result +_Keypad::Dispose(void) +{ + result r = E_SUCCESS; + if (__pFooter) + { + DetachChild(*__pFooter); + delete __pFooter; + __pFooter = null; + } + if (__pChildEdit) + { + DetachChild(*__pChildEdit); + delete __pChildEdit; + __pChildEdit = null; + } + __pCallerEdit = null; + + if (__pTextEvent) + { + delete __pTextEvent; + __pTextEvent = null; + } + + if (__pIndicator) + { + _VisualElement* pKeypadVisualElement = GetVisualElement(); + pKeypadVisualElement->DetachChild(*__pIndicator); + delete __pIndicator; + __pIndicator = null; + } + + _SettingInfoImpl::RemoveSettingEventListenerForInternal(*this); + + return r; +} + +_Toolbar* +_Keypad::CreateFooter(void) +{ + result r = E_SUCCESS; + + _Toolbar* pFooter = null; + + if (!__pFooter) + { + _ControlManager* pControlManager = _ControlManager::GetInstance(); + SysTryReturn(NID_UI_CTRL, pControlManager, null, E_SYSTEM, "Fail to get ControlManager instance"); + + _Frame* pFrame = dynamic_cast <_Frame*>(pControlManager->GetCurrentFrame()); + SysTryReturn(NID_UI_CTRL, pFrame, null, E_SYSTEM, "This instance is not constructed."); + + String doneText; + + FloatRectangle bounds(0.0f,0.0f,0.0f,0.0f); + + FloatDimension screenSize = pControlManager->GetScreenSizeF(); + + pFooter = _Toolbar::CreateToolbarN(false); + 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)); + + r = pFooter->SetStyle(TOOLBAR_TEXT); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pFooter->SetResizable(true); + pFooter->SetMovable(true); + + _ControlOrientation orientation = GetOrientation(); + + if (orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + bounds.width = screenSize.width; + } + else + { + bounds.width = screenSize.height; + } + + float height = 0.0f; + GET_SHAPE_CONFIG(FOOTER::HEIGHT, orientation, height); + bounds.height = height; + + r = pFooter->SetBounds(bounds); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pFooter->SetResizable(false); + pFooter->SetMovable(false); + + GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_DONE, doneText); + + r = pFooter->AddItem(CreateButtonItemN(COMMAND_DONE_BUTTON_ID, doneText)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pFooter->AddActionEventListener(*this); + + r = AttachChild(*pFooter); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return pFooter; + + } + else + { + return __pFooter; + } + +CATCH: + delete pFooter; + return null; +} + +_Button* +_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] Memory allocation failed."); + + r = pButton->SetActionId(actionId); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pButton->SetText(text); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return pButton; +CATCH: + delete pButton; + + return null; +} + +result +_Keypad::ChangeLayoutInternal(LayoutChangeState layoutChangeState) +{ + result r = E_SUCCESS; + _ControlManager* pControlManager = _ControlManager::GetInstance(); + SysTryReturnResult(NID_UI_CTRL, pControlManager, E_SYSTEM, "Failed to get root."); + FloatDimension screenSize = pControlManager->GetScreenSizeF(); + _ControlOrientation orientation = GetOrientation(); + + _Frame* pFrame = dynamic_cast <_Frame*>(pControlManager->GetCurrentFrame()); + SysTryReturn(NID_UI_CTRL, pFrame, null, E_SYSTEM, "This instance is not constructed."); + + FloatRectangle bounds(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle keypadRect(0.0f, 0.0f, 0.0f, 0.0f); + float indicatorHeight = 0.0f; + float clipboardHeight = 0.0f; + bool isKeypadExist = false; + bool isClipboardExist = false; + + FloatDimension indicatorDimension(0.0f, 0.0f); + FloatDimension keypadDimsnsion(0.0f, 0.0f); + + if (__isInitialized || __pChildEdit->IsUsbKeyboardConnected()) + { + isKeypadExist = __pChildEdit->CheckKeypadExist(orientation); + isClipboardExist = __pChildEdit->IsClipboardExist(); + } + + if (orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + bounds.width = screenSize.width; + bounds.height = screenSize.height; + } + else + { + bounds.width = screenSize.height; + bounds.height = screenSize.width; + } + + if (orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, GetOrientation(), indicatorHeight); + } + + indicatorDimension.height = indicatorHeight; + + SetResizable(true); + SetMovable(true); + r = SetBounds(CoordinateSystem::AlignToDevice(bounds)); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SetResizable(false); + SetMovable(false); + + FloatRectangle editRect = CoordinateSystem::AlignToDevice(bounds); + + editRect.y = CoordinateSystem::AlignToDevice(indicatorDimension).height; + + float footerHeight = 0.0f; + FloatDimension footerDimension(0.0f, 0.0f); + + GET_SHAPE_CONFIG(FOOTER::HEIGHT, orientation, footerHeight); + footerDimension.height = footerHeight; + + editRect.height -= CoordinateSystem::AlignToDevice(indicatorDimension).height; + editRect.height -= CoordinateSystem::AlignToDevice(footerDimension).height; + + if ((isClipboardExist && layoutChangeState == LAYOUT_CHANGE_ROTATE)) + { + ; + } + else + { + if (isKeypadExist || isClipboardExist) + { + if (isKeypadExist) + { + r = __pChildEdit->GetKeypadBounds(keypadRect); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + if (isClipboardExist) + { + clipboardHeight = __pChildEdit->GetClipboardHeight(); + } + + if (clipboardHeight > keypadRect.height) + { + keypadDimsnsion.height = clipboardHeight; + } + else + { + keypadDimsnsion.height = keypadRect.height; + } + + editRect.height -= CoordinateSystem::AlignToDevice(keypadDimsnsion).height; + } + } + + r = __pChildEdit->SetBounds(editRect); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + FloatRectangle footerBounds(0.0f, 0.0f, 0.0f, 0.0f); + + footerBounds.y = editRect.height + CoordinateSystem::AlignToDevice(indicatorDimension).height; + footerBounds.width = editRect.width; + footerBounds.height = CoordinateSystem::AlignToDevice(footerDimension).height; + + __pFooter->SetResizable(true); + __pFooter->SetMovable(true); + + __pFooter->SetBounds(footerBounds); + + __pFooter->SetResizable(false); + __pFooter->SetMovable(false); + + SysLog(NID_UI_CTRL, "[FULLEDIT] ChangeLayoutInternal Draw FullScreen window- Footer position(%f, %f, %f, %f)", footerBounds.x, footerBounds.y, footerBounds.width, footerBounds.height); + Invalidate(true); + + return r; +} + +result +_Keypad::OnAttachedToMainTree(void) +{ + result r = E_SUCCESS; + + GetEcoreEvasMgr()->GetEcoreEvas()->SetOwner(*this, *GetOwner());//set owner to EcoreEvas for orientation set. + + r = __pChildEdit->SetText(__text); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (__pIndicator) + { + __pIndicator->OnAttachedToMainTree(); + __pIndicator->AddIndicatorObject(this, GetRootWindow()); + __pIndicator->SetIndicatorShowState(true); + __pIndicator->SetIndicatorAutoHide(false, true); + } + + Invalidate(true); + + return r; +} + +result +_Keypad::OnDetachingFromMainTree(void) +{ + if (__pIndicator) + { + __pIndicator->DeleteIndicatorObject(); + } + + if (__pCallerEdit && !__pCallerEdit->IsInputEventEnabled()) + { + __pCallerEdit->UnlockInputEvent(); + } + + return _Window::OnDetachingFromMainTree(); +} + +void +_Keypad::OnNativeWindowActivated(void) +{ + if (__isFirstCall && __pChildEdit) + { + __pChildEdit->SetFocused(); + __isFirstCall = false; + ChangeLayoutInternal(LAYOUT_CHANGE_NONE); + } + + return; +} + +bool +_Keypad::IsRotationSynchronized(void) const +{ + return true; +} + +void +_Keypad::OnDraw(void) +{ + Color backgroundColor; + GET_COLOR_CONFIG(EDIT::BG_NORMAL, backgroundColor); + SetBackgroundColor(backgroundColor); + + return; +} + +result +_Keypad::SetSingleLineEnabled(bool enabled) +{ + SetProperty("singleLineEnabled", Variant(enabled)); + + return E_SUCCESS; +} + +bool +_Keypad::IsSingleLineEnabled(void) const +{ + Variant enabled = GetProperty("singleLineEnabled"); + + return enabled.ToBool(); +} + +result +_Keypad::SetPropertySingleLineEnabled(const Variant& enabled) +{ + __isSingleLineEnabled = enabled.ToBool(); + + return E_SUCCESS; +} + +Variant +_Keypad::GetPropertySingleLineEnabled(void) const +{ + return Variant(__isSingleLineEnabled); +} + +String +_Keypad::GetText(void) const +{ + Variant text = GetProperty("text"); + + return text.ToString(); +} + +void +_Keypad::SetText(const String& text) +{ + SetProperty("text", Variant(text)); + + return; +} + +result +_Keypad::SetPropertyText(const Variant& text) +{ + __text = text.ToString(); + + return E_SUCCESS; +} + +Variant +_Keypad::GetPropertyText(void) const +{ + return Variant(__text); +} + +result +_Keypad::AddTextEventListener(const _ITextEventListener& listener) +{ + if (__pTextEvent == null) + { + __pTextEvent = _TextEvent::CreateInstanceN(*this); + SysTryReturn(NID_UI_CTRL, __pTextEvent, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred.\n"); + } + + return __pTextEvent->AddListener(listener); +} + +result +_Keypad::RemoveTextEventListener(const _ITextEventListener& listener) +{ + SysTryReturn(NID_UI_CTRL, __pTextEvent, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] This instance isn't constructed."); + __pTextEvent->RemoveListener(listener); + + return E_SUCCESS; +} + +void +_Keypad::SetEditTextFilter(IEditTextFilter* pFilter) +{ + if (__pChildEdit) + { + __pChildEdit->SetEditTextFilter(pFilter); + } + + return; +} + +void +_Keypad::SendOpaqueCommand (const Tizen::Base::String& command) +{ + if (__pChildEdit) + { + __pChildEdit->SendOpaqueCommand(command); + } + + return; +} + +bool +_Keypad::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) +{ + if (keyInfo.GetKeyCode() == _KEY_ESC || keyInfo.GetKeyCode() == _KEY_BACK) + { + OnActionPerformed(source, FOOTER_BACK_BUTTON_ID); + } + + return true; +} + +void +_Keypad::OnActionPerformed(const _Control& source, int actionId) +{ + bool isReCreationLock = false; + if ((actionId != COMMAND_DONE_BUTTON_ID) && (actionId != FOOTER_BACK_BUTTON_ID)) + { + return; + } + + __pChildEdit->HideKeypad(); + + if (__pCallerEdit) + { + __pCallerEdit->SetKeypadEnabled(false); + isReCreationLock = true; + } + Close(); + if (isReCreationLock) + { + __pCallerEdit->SetKeypadEnabled(true); + } + + CoreTextEventStatus textEventStatus = CORE_TEXT_EVENT_CHANGED; + if (actionId == COMMAND_DONE_BUTTON_ID) + { + __text = __pChildEdit->GetText(); + textEventStatus = CORE_TEXT_EVENT_CHANGED; + } + else + { + textEventStatus = CORE_TEXT_EVENT_CANCELED; + } + + __isCommandButtonPressed = true; + + if (__pCallerEdit) + { + __pCallerEdit->SetText(__text); + _Control* pParent = __pCallerEdit->GetParent(); + if (pParent) + { + pParent->Invalidate(true); + } + + __pCallerEdit->SendTextEvent(textEventStatus); + } + else + { + GetOwner()->Invalidate(true); + if (__pTextEvent) + { + IEventArg* pEventArg = _TextEvent::CreateTextEventArgN(textEventStatus); + if (pEventArg) + { + __pTextEvent->Fire(*pEventArg); + } + } + } + + return; +} + +void +_Keypad::OnKeypadWillOpen(void) +{ + SysLog(NID_UI_CTRL, "[FULLEDIT] OnKeypadWillOpen"); + return; +} + +void +_Keypad::OnKeypadOpened(void) +{ + if (__pChildEdit->IsUsbKeyboardConnected()) + { + __isPredictionWindowOpendInUSBMode = true; + } + + SysLog(NID_UI_CTRL, "[FULLEDIT] OnKeypadOpened"); + + ChangeLayoutInternal(LAYOUT_CHANGE_KEYPAD_SHOW);//usb off & bounded or usb on & prediction + + return; +} + +void +_Keypad::OnKeypadClosed(void) +{ + __isPredictionWindowOpendInUSBMode = false; + + SysLog(NID_UI_CTRL, "[FULLEDIT] OnKeypadClosed"); + + ChangeLayoutInternal(LAYOUT_CHANGE_KEYPAD_HIDE); + + return; +} + +void +_Keypad::OnKeypadBoundsChanged(void) +{ + SysLog(NID_UI_CTRL, "[FULLEDIT] OnKeypadBoundsChanged"); + + ChangeLayoutInternal(LAYOUT_CHANGE_KEYPAD_BOUNDS_CHANGED);// predictive window show/hide + + return; +} + +void +_Keypad::OnKeypadActionPerformed(CoreKeypadAction keypadAction) +{ + return; +} + +void +_Keypad::OnChangeLayout(_ControlOrientation orientation) +{ + float indicatorheight = 0.0f; + + const FloatDimension portraitSize = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF(); + const FloatDimension landscapeSize = FloatDimension(portraitSize.height, portraitSize.width); + + if (__pIndicator) + { + if (orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, GetOrientation(), indicatorheight); + __pIndicator->SetBounds(FloatRectangle(0.0f, 0.0f, portraitSize.width, indicatorheight)); + } + else + { + GET_SHAPE_CONFIG(FORM::INDICATOR_HEIGHT, GetOrientation(), indicatorheight); + __pIndicator->SetBounds(FloatRectangle(0.0f, 0.0f, landscapeSize.width, indicatorheight)); + } + + __pIndicator->OnChangeLayout(orientation); + } + + if (__isInitialized) + { + ChangeLayoutInternal(LAYOUT_CHANGE_ROTATE); + } + + return; +} + +void +_Keypad::OnSettingChanged(String& key) +{ + const wchar_t* LOCALE_LANGUAGE = L"http://tizen.org/setting/locale.language"; + if (key == LOCALE_LANGUAGE) + { + if (__pFooter) + { + _Button* pButton = __pFooter->GetItem(0); + if (pButton) + { + String doneText; + GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_DONE, doneText); + pButton->SetText(doneText); + } + } + } +} + +bool +_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 new file mode 100644 index 0000000..cf3f169 --- /dev/null +++ b/src/ui/controls/FUiCtrl_KeypadEvent.cpp @@ -0,0 +1,211 @@ +// +// 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_KeypadEvent.cpp +* @brief This file contains implementation of _KeypadEvent class +* +* This file contains implementation of _KeypadEvent class. +*/ + +// Includes +#include +#include +#include +#include "FUiCtrl_KeypadEvent.h" + + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; + +namespace Tizen {namespace Ui {namespace Controls +{ +/** + * @class + * @brief This class is used as the argument to change event listener. + * + * This class is used as the argument to change event listener. When an change event is generated + * (such as when a button is pressed) the TextSelectionEvent calls TextSelectionEventListener's OnTextd + * with an instance of this class as an argument. + * + * From this class, one can find out, the (event) source object and the change ID. + */ +class _OSP_EXPORT_ _KeypadEventArg + : public IEventArg + , public Object +{ +// Lifecycle +public: + /** + * This is the default class constructor. + * + * @param[in] source A pointer to the Object instance which contains this instance. + */ + _KeypadEventArg(CoreKeypadAction actionId, CoreKeypadEventStatus status); + + /** + * This is the class destructor. + * + */ + virtual ~_KeypadEventArg(void); + + +// Access +public: + CoreKeypadAction GetKeypadActionId() const; + + CoreKeypadEventStatus GetStatus() const; + +// Attribute +private: + /** + * Event source. + */ + CoreKeypadAction __actionId; + + /** + * status. + */ + CoreKeypadEventStatus __status; +}; // _KeypadEventArg + +//////////////////////////////////////////////////////////////////////////////// +/// __TextSelectionEventArg class Lifecycle + +_KeypadEventArg::_KeypadEventArg(CoreKeypadAction actionId, CoreKeypadEventStatus status) +{ + __actionId = actionId; + __status = status; +} + +_KeypadEventArg::~_KeypadEventArg(void) +{ + // Nothing. +} + +CoreKeypadAction +_KeypadEventArg::GetKeypadActionId(void) const +{ + return __actionId; +} + +CoreKeypadEventStatus +_KeypadEventArg::GetStatus() const +{ + return __status; +} + +//////////////////////////////////////////////////////////////////////////////// +/// __TextSelectionEvent class Lifecycle +_KeypadEvent::_KeypadEvent(const _Control& source) + : __pSource(null) +{ + result r = _Event::Initialize(); + + // set event source + if (r == E_SUCCESS) + { + __pSource = &source; + } +} + +_KeypadEvent::~_KeypadEvent(void) +{ + // Nothing. +} + +_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 allocation failed."); + + if (IsFailed(GetLastResult())) + { + goto CATCH; + } + + return pCoreKeypadEvent; +CATCH: + delete pCoreKeypadEvent; + return null; +} + +const _Control* +_KeypadEvent::GetSource(void) const +{ + return __pSource; +} + +// Operations + +void +_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."); + + const _KeypadEventArg* pKeypadEventArg = dynamic_cast (&arg); + SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg != null, E_INVALID_ARG, + "[E_INVALID_ARG] The invalid Event Argument was given."); + + CoreKeypadAction keypadAction = pKeypadEventArg->GetKeypadActionId(); + + CoreKeypadEventStatus status = pKeypadEventArg->GetStatus(); + switch (status) + { + case CORE_KEYPAD_EVENT_STATUS_CREATED: + pKeypadEventListener->OnKeypadWillOpen(); + break; + + case CORE_KEYPAD_EVENT_STATUS_OPEN: + pKeypadEventListener->OnKeypadOpened(); + break; + + case CORE_KEYPAD_EVENT_STATUS_CLOSE: + pKeypadEventListener->OnKeypadClosed(); + break; + + case CORE_KEYPAD_EVENT_STATUS_BOUNDS_CHANGED: + pKeypadEventListener->OnKeypadBoundsChanged(); + break; + + case CORE_KEYPAD_EVENT_STATUS_ENTERACTION: + pKeypadEventListener->OnKeypadActionPerformed(keypadAction); + break; + + default: + break; + } + + SetLastResult(E_SUCCESS); + + return; +} + +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 allocation failed."); + + return pEventArg; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_KeypadImpl.cpp b/src/ui/controls/FUiCtrl_KeypadImpl.cpp new file mode 100644 index 0000000..3beabc0 --- /dev/null +++ b/src/ui/controls/FUiCtrl_KeypadImpl.cpp @@ -0,0 +1,288 @@ +// +// 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_KeypadImpl.cpp +* @brief This file contains implementation of _KeypadImpl class +* +* This file contains implementation of _KeypadImpl class. +*/ + +#include "FUi_ControlImplManager.h" +#include "FUiCtrl_Edit.h" +#include "FUiCtrl_KeypadImpl.h" +#include "FUiCtrl_Keypad.h" +#include "FUiCtrl_PublicTextEvent.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_KeypadImpl* +_KeypadImpl::GetInstance(Keypad& keypad) +{ + return (static_cast<_KeypadImpl*> (keypad._pControlImpl)); +} + +const _KeypadImpl* +_KeypadImpl::GetInstance(const Keypad& keypad) +{ + return (static_cast (keypad._pControlImpl)); +} + +_KeypadImpl::_KeypadImpl(Keypad* pPublic, _Keypad* pCore) + : _WindowImpl(pPublic, pCore) + , __pKeypad(pCore) + , __limitLength(0) + , __pTextEvent(null) + , __pPublicTextEvent(null) +{ + __keypadStyleInfo.keypadStyle = KEYPAD_STYLE_NORMAL; + __keypadStyleInfo.textPredictionEnabled = false; + __keypadStyleInfo.isNormalNumberStyle = false; + __keypadStyleInfo.enterActionEnabled = true; + __keypadStyleInfo.isLowerCaseModeEnabled = false; +} + +_KeypadImpl::~_KeypadImpl(void) +{ + if (__pPublicTextEvent) + { + delete __pPublicTextEvent; + __pPublicTextEvent = null; + } +} + +_KeypadImpl* +_KeypadImpl::CreateKeypadImplN(Keypad* pControl) +{ + ClearLastResult(); + result r = E_SUCCESS; + _Keypad* pCore = null; + + pCore = _Keypad::CreateKeypadN(); + SysTryReturn(NID_UI_CTRL, pCore, null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _KeypadImpl* pImpl = new (std::nothrow) _KeypadImpl(pControl, pCore); + r = CheckConstruction(pCore, pImpl); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + return pImpl; +} + +const char* +_KeypadImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Controls::Keypad"; +} + +const Keypad& +_KeypadImpl::GetPublic(void) const +{ + return static_cast (_ControlImpl::GetPublic()); +} + +Keypad& +_KeypadImpl::GetPublic(void) +{ + return static_cast (_ControlImpl::GetPublic()); +} + +const _Keypad& +_KeypadImpl::GetCore(void) const +{ + return static_cast (_ControlImpl::GetCore()); +} + +_Keypad& +_KeypadImpl::GetCore(void) +{ + return static_cast <_Keypad&>(_ControlImpl::GetCore()); +} + +result +_KeypadImpl::Initialize(KeypadStyle keypadStyle, KeypadInputModeCategory category, int limitLength, bool enabledTextPrediction) +{ + result r = E_SUCCESS; + ClearLastResult(); + + __keypadStyleInfo.keypadStyle = keypadStyle; + __keypadStyleInfo.textPredictionEnabled = enabledTextPrediction; + if ((keypadStyle == KEYPAD_STYLE_NORMAL) && (category & (KEYPAD_MODE_NUMERIC | KEYPAD_MODE_SYMBOL))) + { + __keypadStyleInfo.isNormalNumberStyle = true; + } + else + { + __keypadStyleInfo.isNormalNumberStyle = false; + } + + __limitLength = limitLength; + + __pKeypad->SetResizable(false); + __pKeypad->SetMovable(false); + + 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] Memory allocation failed."); + + r = __pKeypad->AddTextEventListener(*this); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +void +_KeypadImpl::SetTextPredictionEnabled(bool enable) +{ + __keypadStyleInfo.textPredictionEnabled = enable; +} + +bool +_KeypadImpl::IsTextPredictionEnabled(void) const +{ + return __keypadStyleInfo.textPredictionEnabled; +} + +result +_KeypadImpl::SetSingleLineEnabled(bool enabled) +{ + ClearLastResult(); + + if ((__keypadStyleInfo.keypadStyle == KEYPAD_STYLE_PASSWORD) && (enabled == false)) + { + SysLogException(NID_UI_CTRL, E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] The password style can't support multiline."); + return E_UNSUPPORTED_OPERATION; + } + SysTryReturnResult(NID_UI_CTRL, __pKeypad->IsActivated() == false, E_INVALID_OPERATION, "Keypad is already shown."); + + Variant var(enabled); + return __pKeypad->SetPropertySingleLineEnabled(var); +} + +bool +_KeypadImpl::IsSingleLineEnabled(void) const +{ + ClearLastResult(); + return __pKeypad->GetPropertySingleLineEnabled().ToBool(); +} + +result +_KeypadImpl::AddTextEventListener(ITextEventListener& listener) +{ + ClearLastResult(); + return __pPublicTextEvent->AddListener(listener); +} + +result +_KeypadImpl::RemoveTextEventListener(ITextEventListener& listener) +{ + ClearLastResult(); + return __pPublicTextEvent->RemoveListener(listener); +} + +result +_KeypadImpl::OnAttachedToMainTree(void) +{ + ClearLastResult(); + + result r = E_SUCCESS; + int editStyle = EDIT_STYLE_NORMAL; + + if (IsSingleLineEnabled()) + { + editStyle |= EDIT_STYLE_SINGLE_LINE; + } + + if (__keypadStyleInfo.keypadStyle == KEYPAD_STYLE_PASSWORD) + { + editStyle |= EDIT_STYLE_PASSWORD | EDIT_STYLE_SINGLE_LINE; + } + + String text = GetText(); + + r = __pKeypad->Initialize(editStyle, __keypadStyleInfo, __limitLength, null); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + + SetText(text); + + r = _WindowImpl::OnAttachedToMainTree(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +String +_KeypadImpl::GetText(void) const +{ + ClearLastResult(); + + return __pKeypad->GetPropertyText().ToString(); +} + +void +_KeypadImpl::SetText(const String& text) +{ + ClearLastResult(); + + Variant var(text); + __pKeypad->SetPropertyText(var); + return; +} + +void +_KeypadImpl::SetEditTextFilter(IEditTextFilter* pFilter) +{ + ClearLastResult(); + __pKeypad->SetEditTextFilter(pFilter); + return; +} + +void +_KeypadImpl::SendOpaqueCommand (const Tizen::Base::String& command) +{ + ClearLastResult(); + __pKeypad->SendOpaqueCommand(command); + return; +} + +void +_KeypadImpl::OnTextValueChanged(const _Control& source) +{ + IEventArg* pEventArg = _PublicTextEvent::CreateTextEventArgN(TEXT_EVENT_CHANGED); + if (pEventArg) + { + __pPublicTextEvent->Fire(*pEventArg); + } +} + +void +_KeypadImpl::OnTextValueChangeCanceled(const _Control& source) +{ + IEventArg* pEventArg = _PublicTextEvent::CreateTextEventArgN(TEXT_EVENT_CANCELED); + if (pEventArg) + { + __pPublicTextEvent->Fire(*pEventArg); + } +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_Label.cpp b/src/ui/controls/FUiCtrl_Label.cpp new file mode 100644 index 0000000..5928d6c --- /dev/null +++ b/src/ui/controls/FUiCtrl_Label.cpp @@ -0,0 +1,692 @@ +// +// 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_Label.cpp + * @brief This is the implementation file for the _Label class. + */ + +#include +#include +#include +#include "FUi_AccessibilityContainer.h" +#include "FUi_AccessibilityElement.h" +#include "FUi_AccessibilityManager.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_ResourceManager.h" +#include "FUi_EflWindow.h" +#include "FUiCtrl_Label.h" +#include "FUiCtrl_LabelPresenter.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Ui::Animations; +using namespace Tizen::Graphics::_Text; + +namespace Tizen { namespace Ui { namespace Controls +{ + +IMPLEMENT_PROPERTY(_Label); + +_Label::_Label(void) + : __pLabelPresenter(null) + , __text(L"") + , __textSize(0.0f) + , __horizontalAlignment(ALIGNMENT_CENTER) + , __verticalAlignment(ALIGNMENT_MIDDLE) + , __pBackgroundBitmap(null) + , __pBackgroundEffectBitmap(null) + , __leftMargin(0.0f) + , __topMargin(0.0f) + , __rightMargin(0.0f) + , __bottomMargin(0.0f) + , __contented(false) + , __contentedDimension(FloatDimension(0.0f, 0.0f)) + , __pTextElement(null) +{ + result r = E_SUCCESS; + + _AccessibilityContainer* pContainer = null; + + GET_SHAPE_CONFIG(LABEL::TEXT_FONT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, __textSize); + + _LabelPresenter* pPresenter = new (std::nothrow) _LabelPresenter(); + SysTryReturnVoidResult(NID_UI_CTRL, pPresenter, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + + r = SetPresenter(*pPresenter); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + r = pPresenter->Construct(*this); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + r = pPresenter->Install(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + GET_COLOR_CONFIG(LABEL::TEXT_NORMAL, __textColor); + + GET_SHAPE_CONFIG(LABEL::LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __leftMargin); + GET_SHAPE_CONFIG(LABEL::TOP_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __topMargin); + GET_SHAPE_CONFIG(LABEL::RIGHT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __rightMargin); + GET_SHAPE_CONFIG(LABEL::BOTTOM_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __bottomMargin); + + SetBackgroundColor(Color(0, 0, 0, 0)); // for transparent + SetFocusable(false); + + pContainer = GetAccessibilityContainer(); + + if(pContainer) + { + pContainer->Activate(true); + InitializeAccessibilityElement(); + } + + ClearLastResult(); + + return ; + +CATCH: + delete pPresenter; +} + +_Label* +_Label::CreateLabelN(void) +{ + _Label* pLabel = new (std::nothrow) _Label(); + SysTryReturn(NID_UI_CTRL, pLabel, 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."); + + pLabel->AcquireHandle(); + + pLabel->SetTouchPressThreshold(SENSITIVE); + + return pLabel; + +CATCH: + delete pLabel; + return null; +} + +_Label::~_Label(void) +{ + if (__pLabelPresenter) + { + delete __pLabelPresenter; + __pLabelPresenter = null; + } + + if (__pBackgroundBitmap) + { + delete __pBackgroundBitmap; + __pBackgroundBitmap = null; + } + + if (__pBackgroundEffectBitmap) + { + delete __pBackgroundEffectBitmap; + __pBackgroundEffectBitmap = null; + } + if (__pTextElement) + { + __pTextElement->Activate(false); + __pTextElement = null; + } + ClearLastResult(); +} + +result +_Label::SetPresenter(const _LabelPresenter& labelPresenter) +{ + __pLabelPresenter = const_cast <_LabelPresenter*>(&labelPresenter); + + return E_SUCCESS; +} + +void +_Label::OnDraw(void) +{ + __pLabelPresenter->Draw(); + + return; +} + +result +_Label::OnAttachedToMainTree(void) +{ + if(__pTextElement) + { + __pTextElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height)); + } + + return E_SUCCESS; +} + +void +_Label::InitializeAccessibilityElement(void) +{ + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + + __pTextElement = new (std::nothrow) _AccessibilityElement(true); + SysTryReturnVoidResult(NID_UI_CTRL, __pTextElement, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + __pTextElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height)); + __pTextElement->SetLabel(GetText()); + __pTextElement->SetName(L"LabelText"); + + pContainer->AddElement(*__pTextElement); + + return; +} + +bool +_Label::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pLabelPresenter->OnTouchPressed(source, touchinfo); +} + +bool +_Label::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pLabelPresenter->OnTouchReleased(source, touchinfo); +} + +bool +_Label::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pLabelPresenter->OnTouchMoved(source, touchinfo); +} + +bool +_Label::OnTouchCanceled(const _Control & source, const _TouchInfo & touchinfo) +{ + return __pLabelPresenter->OnTouchCanceled(source, touchinfo); +} + +void +_Label::OnTouchMoveHandled(const _Control& control) +{ + __pLabelPresenter->OnTouchMoveHandled(control); + + return; +} + +void +_Label::OnBoundsChanged(void) +{ + __contented = false; + + if(__pTextElement) + { + __pTextElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height)); + } + + return; +} + +void +_Label::OnFontChanged(Font* pFont) +{ + __contented = false; + + __pLabelPresenter->OnFontChanged(pFont); + + _Control::OnFontChanged(pFont); + + return; +} + +void +_Label::OnFontInfoRequested(unsigned long& style, int& size) +{ + __contented = false; + + __pLabelPresenter->OnFontInfoRequested(style, size); + + return; +} + +Canvas* +_Label::OnCanvasRequestedN(const FloatRectangle& bounds) +{ + return __pLabelPresenter->OnCanvasRequestedN(bounds); +} + +result +_Label::SetText(const String& text) +{ + return SetProperty(L"text", Variant(text)); +} + +result +_Label::SetPropertyText(const Variant& text) +{ + __contented = false; + + __text = text.ToString(); + + if(__pTextElement) + { + __pTextElement->SetLabel(__text); + } + + result r = __pLabelPresenter->InitTextObject(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +_Label::SetTextColor(const Color& color) +{ + return SetProperty(L"textColor", Variant(color)); +} + +result +_Label::SetPropertyTextColor(const Variant& color) +{ + __textColor = color.ToColor(); + return E_SUCCESS; +} + +result +_Label::SetBackgroundBitmap(const Bitmap& bitmap) +{ + result r = E_SYSTEM; + + Bitmap* pClonedBitmap = _BitmapImpl::CloneN(bitmap); + + if (pClonedBitmap) + { + if (__pBackgroundBitmap != null) + { + delete __pBackgroundBitmap; + } + + __pBackgroundBitmap = pClonedBitmap; + + r = E_SUCCESS; + } + + return r; +} + +Bitmap* +_Label::GetBackgroundBitmap(void) const +{ + return __pBackgroundBitmap; +} + +result +_Label::SetBackgroundEffectBitmap(const Bitmap& bitmap) +{ + result r = E_SYSTEM; + + Bitmap* pClonedBitmap = _BitmapImpl::CloneN(bitmap); + + if (pClonedBitmap) + { + if (__pBackgroundEffectBitmap != null) + { + delete __pBackgroundEffectBitmap; + } + + __pBackgroundEffectBitmap = pClonedBitmap; + + r = E_SUCCESS; + } + + return r; +} + +Bitmap* +_Label::GetBackgroundEffectBitmap(void) const +{ + return __pBackgroundEffectBitmap; +} + + +result +_Label::SetTextHorizontalAlignment(HorizontalAlignment alignment) +{ + __contented = false; + + __horizontalAlignment = alignment; + return E_SUCCESS; +} + +result +_Label::SetTextVerticalAlignment(VerticalAlignment alignment) +{ + __contented = false; + + __verticalAlignment = alignment; + return E_SUCCESS; +} + +result +_Label::SetTextConfig(int size, LabelTextStyle style) +{ + float floatSize = _CoordinateSystemUtils::ConvertToFloat(size); + + __pLabelPresenter->SetTextConfig(floatSize, style); + + return SetProperty(L"textSize", Variant(floatSize)); +} + +result +_Label::SetTextConfig(float size, LabelTextStyle style) +{ + __pLabelPresenter->SetTextConfig(size, style); + + return SetProperty(L"textSize", Variant(size)); +} + +result +_Label::SetPropertyTextSize(const Variant& textSize) +{ + __contented = false; + + __textSize = textSize.ToFloat(); + + return E_SUCCESS; +} + +String +_Label::GetText(void) const +{ + Variant text = GetProperty(L"text"); + + return text.ToString(); +} + +Variant +_Label::GetPropertyText(void) const +{ + return Variant(__text); +} + +HorizontalAlignment +_Label::GetTextHorizontalAlignment(void) const +{ + return __horizontalAlignment; +} + +VerticalAlignment +_Label::GetTextVerticalAlignment(void) const +{ + return __verticalAlignment; +} + +Color +_Label::GetTextColor(void) const +{ + Variant color = GetProperty(L"textColor"); + + return color.ToColor(); +} + +Variant +_Label::GetPropertyTextColor(void) const +{ + return Variant(__textColor); +} + +int +_Label::GetTextSize(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetTextSizeF()); +} + +float +_Label::GetTextSizeF(void) const +{ + Variant size = GetProperty(L"textSize"); + + return size.ToFloat(); +} + +Variant +_Label::GetPropertyTextSize(void) const +{ + return Variant(__textSize); +} + +LabelTextStyle +_Label::GetTextStyle(void) const +{ + return __pLabelPresenter->GetTextStyle(); +} + +result +_Label::SetMargin(int topMargin, int leftMargin) +{ + float floatTopMargin = _CoordinateSystemUtils::ConvertToFloat(topMargin); + float floatLeftMargin = _CoordinateSystemUtils::ConvertToFloat(leftMargin); + + return SetMargin(floatTopMargin, floatLeftMargin); +} + +result +_Label::SetMargin(float topMargin, float leftMargin) +{ + __contented = false; + + __topMargin = topMargin; + __leftMargin = leftMargin; + + return E_SUCCESS; +} + +result +_Label::SetMargin(int leftMargin, int topMargin, int rightMargin, int bottomMargin) +{ + float floatLeftMargin = _CoordinateSystemUtils::ConvertToFloat(leftMargin); + float floatTopMargin = _CoordinateSystemUtils::ConvertToFloat(topMargin); + float floatRightMargin = _CoordinateSystemUtils::ConvertToFloat(rightMargin); + float floatBottomMargin = _CoordinateSystemUtils::ConvertToFloat(bottomMargin); + + return SetMargin(floatLeftMargin, floatTopMargin, floatRightMargin, floatBottomMargin); +} + +result +_Label::SetMargin(float leftMargin, float topMargin, float rightMargin, float bottomMargin) +{ + __contented = false; + + __leftMargin = leftMargin; + __topMargin = topMargin; + __rightMargin = rightMargin; + __bottomMargin = bottomMargin; + + return E_SUCCESS; +} + +int +_Label::GetLeftMargin(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetLeftMarginF()); +} + +float +_Label::GetLeftMarginF(void) const +{ + return __leftMargin; +} + +int +_Label::GetTopMargin(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetTopMarginF()); +} + +float +_Label::GetTopMarginF(void) const +{ + return __topMargin; +} + +int +_Label::GetRightMargin(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetRightMarginF()); +} + +float +_Label::GetRightMarginF(void) const +{ + return __rightMargin; +} + +int +_Label::GetBottomMargin(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetBottomMarginF()); +} + +float +_Label::GetBottomMarginF(void) const +{ + return __bottomMargin; +} + +FloatDimension +_Label::GetContentSizeF(bool horizontalMode, bool verticalMode) const +{ + return GetContentSizeInternalF(horizontalMode, verticalMode); +} + +FloatDimension +_Label::GetContentSizeInternalF(bool horizontalMode, bool verticalMode) const +{ + if (__contented) + { + return __contentedDimension; + } + + if (__text.IsEmpty() && __pBackgroundBitmap == null) + { + return FloatDimension(GetBoundsF().width, GetBoundsF().height); + } + + FloatDimension textSize(0.0f, 0.0f); + FloatDimension dimension(0.0f, 0.0f); + FloatRectangle contentRect(0.0f, 0.0f, 0.0f , 0.0f); + + TextObject* pTextObject = __pLabelPresenter->GetTextObject(); + + FloatRectangle previousRect = pTextObject->GetBoundsF(); + TextObjectActionType previousActionType = pTextObject->GetAction(); + + dimension.width = GetBoundsF().width - (__leftMargin + __rightMargin); + dimension.height = GetBoundsF().height - (__topMargin + __bottomMargin); + + _ControlOrientation orientation = GetOrientation(); + if (orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + contentRect.width = _ControlManager::GetInstance()->GetScreenSizeF().width; + contentRect.height = _ControlManager::GetInstance()->GetScreenSizeF().height; + } + else + { + contentRect.width = _ControlManager::GetInstance()->GetScreenSizeF().height; + contentRect.height = _ControlManager::GetInstance()->GetScreenSizeF().width; + } + + if (horizontalMode == true) + { + 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(); + + 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; + } + + if (verticalMode == true) + { + FloatRectangle bounds(0.0f, 0.0f, dimension.width, dimension.height); + pTextObject->SetBounds(bounds); + pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_NONE); + pTextObject->Compose(); + + textSize = pTextObject->GetTextExtentF(); + + dimension.height = textSize.height; + } + + pTextObject->SetBounds(previousRect); + pTextObject->SetAction(previousActionType); + + dimension.width += (__leftMargin + __rightMargin); + dimension.height += (__topMargin + __bottomMargin); + + if (__pBackgroundBitmap != null) + { + dimension.width = GetBoundsF().width; + dimension.height = GetBoundsF().height; + } + + const_cast<_Label*>(this)->__contented = true; + const_cast<_Label*>(this)->__contentedDimension = dimension; + + 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 new file mode 100644 index 0000000..6969766 --- /dev/null +++ b/src/ui/controls/FUiCtrl_LabelImpl.cpp @@ -0,0 +1,597 @@ +// +// 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_LabelImpl.cpp + * @brief This is the implementation file for the _LabelImpl class. + */ + +#include +#include +#include +#include +#include +#include "FUi_ResourceSizeInfo.h" +#include "FUi_ResourceManager.h" +#include "FUi_UiBuilder.h" +#include "FUiCtrl_LabelImpl.h" +#include "FUiCtrl_Label.h" +#include "FUi_CoordinateSystemUtils.h" + + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +Dimension +_LabelImpl::LabelSizeInfo::GetDefaultMinimumSize(_ControlOrientation orientation) const +{ + result r = E_SUCCESS; + Dimension dimension(0, 0); + + r = GET_DIMENSION_CONFIG(LABEL::MIN_SIZE, orientation, dimension); + SysTryReturn(NID_UI, r == E_SUCCESS, dimension, r, "[%s] A system error occurred.", GetErrorMessage(r)); + + SetLastResult(r); + + return dimension; +} + +FloatDimension +_LabelImpl::LabelSizeInfo::GetDefaultMinimumSizeF(_ControlOrientation orientation) const +{ + result r = E_SUCCESS; + FloatDimension dimension(0.0f, 0.0f); + + r = GET_DIMENSION_CONFIG(LABEL::MIN_SIZE, orientation, dimension); + SysTryReturn(NID_UI, r == E_SUCCESS, dimension, r, "[%s] A system error occurred.", GetErrorMessage(r)); + + SetLastResult(r); + + return dimension; +} + +_LabelImpl* +_LabelImpl::GetInstance(Label& label) +{ + return static_cast<_LabelImpl*> (label._pControlImpl); +} + +const _LabelImpl* +_LabelImpl::GetInstance(const Label& label) +{ + return static_cast (label._pControlImpl); +} + +_LabelImpl::_LabelImpl(Label* pPublic, _Label* pCore) + : _ControlImpl(pPublic, pCore) +{ + ClearLastResult(); + SetFocusableChangable(false); +} + +_LabelImpl::~_LabelImpl(void) +{ + ClearLastResult(); +} + +_LabelImpl* +_LabelImpl::CreateLabelImplN(Label* pControl, const Rectangle& bounds) +{ + result r = E_SUCCESS; + r = GET_SIZE_INFO(Label).CheckInitialSizeValid(Dimension(bounds.width, bounds.height), _CONTROL_ORIENTATION_PORTRAIT); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, E_INVALID_ARG, "[E_INVALID_ARG] The given size is not valid."); + + _Label* pCore = _Label::CreateLabelN(); + SysTryReturn(NID_UI_CTRL, pCore, null, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _LabelImpl* pImpl = new (std::nothrow) _LabelImpl(pControl, pCore); + r = _ControlImpl::CheckConstruction(pCore, pImpl); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pImpl->InitializeBoundsProperties(GET_SIZE_INFO(Label), bounds, pCore->GetOrientation()); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + ClearLastResult(); + + return pImpl; + +CATCH: + delete pImpl; + return null; +} + +_LabelImpl* +_LabelImpl::CreateLabelImplN(Label* pControl, const FloatRectangle& bounds) +{ + result r = E_SUCCESS; + r = GET_SIZE_INFO(Label).CheckInitialSizeValidF(FloatDimension(bounds.width, bounds.height), _CONTROL_ORIENTATION_PORTRAIT); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, E_INVALID_ARG, "[E_INVALID_ARG] The given size is not valid."); + + _Label* pCore = _Label::CreateLabelN(); + SysTryReturn(NID_UI_CTRL, pCore, null, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _LabelImpl* pImpl = new (std::nothrow) _LabelImpl(pControl, pCore); + r = _ControlImpl::CheckConstruction(pCore, pImpl); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pImpl->InitializeBoundsPropertiesF(GET_SIZE_INFO(Label), bounds, pCore->GetOrientation()); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pImpl->SetBackgroundColor(Color(0, 0, 0, 0)); // for transparent + + ClearLastResult(); + + return pImpl; + +CATCH: + delete pImpl; + return null; +} + +Color +_LabelImpl::GetColorOnError(void) +{ + return Color(0XFFFFFFFF); +} + +const char* +_LabelImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Controls::Label"; +} + +const Label& +_LabelImpl::GetPublic(void) const +{ + return static_cast (_ControlImpl::GetPublic()); +} + +Label& +_LabelImpl::GetPublic(void) +{ + return static_cast (_ControlImpl::GetPublic()); +} + +const _Label& +_LabelImpl::GetCore(void) const +{ + return static_cast (_ControlImpl::GetCore()); +} + +_Label& +_LabelImpl::GetCore(void) +{ + return static_cast <_Label&>(_ControlImpl::GetCore()); +} + +result +_LabelImpl::OnBoundsChanged(const Rectangle& oldRect, const Rectangle& newRect) +{ + return E_SUCCESS; +} + +result +_LabelImpl::OnBoundsChanged(const FloatRectangle& oldRect, const FloatRectangle& newRect) +{ + return E_SUCCESS; +} + +Tizen::Graphics::FloatDimension +_LabelImpl::GetContentSizeF(bool horizontalMode, bool verticalMode) const +{ + return GetCore().GetContentSizeF(horizontalMode, verticalMode); +} + +result +_LabelImpl::SetText(const String& text) +{ + Variant var(text); + result r = GetCore().SetPropertyText(var); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +_LabelImpl::SetTextColor(const Color& color) +{ + result r = GetCore().SetTextColor(color); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +_LabelImpl::SetBackgroundBitmap(const Bitmap& bitmap) +{ + result r = GetCore().SetBackgroundBitmap(bitmap); + SetLastResultReturn(r); +} + +result +_LabelImpl::SetTextHorizontalAlignment(HorizontalAlignment alignment) +{ + result r = GetCore().SetTextHorizontalAlignment(alignment); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +_LabelImpl::SetTextVerticalAlignment(VerticalAlignment alignment) +{ + result r = GetCore().SetTextVerticalAlignment(alignment); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +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)); + + return r; +} + +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)); + + return r; +} + +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); +} + +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); +} + +String +_LabelImpl::GetText(void) const +{ + ClearLastResult(); + + return GetCore().GetPropertyText().ToString(); +} + +HorizontalAlignment +_LabelImpl::GetTextHorizontalAlignment(void) const +{ + ClearLastResult(); + + return GetCore().GetTextHorizontalAlignment(); +} + +VerticalAlignment +_LabelImpl::GetTextVerticalAlignment(void) const +{ + ClearLastResult(); + + return GetCore().GetTextVerticalAlignment(); +} + +Color +_LabelImpl::GetTextColor(void) const +{ + ClearLastResult(); + + return GetCore().GetTextColor(); +} + +int +_LabelImpl::GetTextSize(void) const +{ + ClearLastResult(); + + return GetCore().GetTextSize(); +} + +float +_LabelImpl::GetTextSizeF(void) const +{ + ClearLastResult(); + + return GetCore().GetTextSizeF(); +} + +LabelTextStyle +_LabelImpl::GetTextStyle(void) const +{ + ClearLastResult(); + + return GetCore().GetTextStyle(); +} + +int +_LabelImpl::GetTopMargin(void) const +{ + ClearLastResult(); + + return GetCore().GetTopMargin(); +} + +float +_LabelImpl::GetTopMarginF(void) const +{ + ClearLastResult(); + + return GetCore().GetTopMarginF(); +} + +int +_LabelImpl::GetLeftMargin(void) const +{ + ClearLastResult(); + + return GetCore().GetLeftMargin(); +} + +float +_LabelImpl::GetLeftMarginF(void) const +{ + ClearLastResult(); + + return GetCore().GetLeftMarginF(); +} + +class _LabelMaker + : public _UiBuilderControlMaker +{ +public: + _LabelMaker(_UiBuilder* uibuilder) + : _UiBuilderControlMaker(uibuilder){}; + virtual ~_LabelMaker(){}; + static _UiBuilderControlMaker* GetInstance(_UiBuilder* uibuilder) + { + _LabelMaker* pLabelMaker = new (std::nothrow) _LabelMaker(uibuilder); + return static_cast<_UiBuilderControlMaker*>(pLabelMaker); + }; +protected: + virtual Control* Make(_UiBuilderControl* pControl) + { +// bool b = false; +// bool bText = false; +// bool bSoftkeyCount = false; + result r = E_SYSTEM; + _UiBuilderControlLayout* pControlProperty = null; + Label* pLabel = null; + FloatRectangle rect; + + HorizontalAlignment horizontalAlignment; + VerticalAlignment verticalAlignment; + Tizen::Base::String elementString; + int opacity = 0; + float size = 0.0f; + float leftMargin = 0.0f; + float topMargin = 0.0f; + LabelTextStyle style = LABEL_TEXT_STYLE_NORMAL; + Color color; + + GetProperty(pControl, &pControlProperty); + if (pControlProperty == null) + { + return null; + } + + pLabel = new (std::nothrow) Label(); + rect = pControlProperty->GetRectF(); + + //Construct + if (pControl->GetElement(L"text", elementString)) + { + r = pLabel->Construct(rect, elementString); + } + else + { + r = pLabel->Construct(rect, String(L"")); + } + + if (r != E_SUCCESS) + { + delete pLabel; + return null; + } + + //setting + if (pControl->GetElement(L"horizontalAlign", elementString) || pControl->GetElement(L"hAlign", elementString)) + { + if (ConvertHAlignToHorizontalAlignment(elementString, horizontalAlignment)) + { + pLabel->SetTextHorizontalAlignment(horizontalAlignment); + } + } + + if (pControl->GetElement(L"verticalAlign", elementString) || pControl->GetElement(L"vAlign", elementString)) + { + if (ConvertVAlignToVerticalAlignment(elementString, verticalAlignment)) + { + pLabel->SetTextVerticalAlignment(verticalAlignment); + } + } + + if (pControl->GetElement(L"backgroundColorOpacity", elementString) || pControl->GetElement(L"BGColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + + if (pControl->GetElement(L"backgroundColor", elementString) || pControl->GetElement(L"BGColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + pLabel->SetBackgroundColor(color); + } + else + { + color = pLabel->GetBackgroundColor(); + color.SetAlpha(ConvertOpacity100to255(opacity)); + pLabel->SetBackgroundColor(color); + } + + if (pControl->GetElement(L"textColor", elementString)) + { + ConvertStringToColor(elementString, color); + pLabel->SetTextColor(color); + } + + if (pControl->GetElement(L"backgroundBitmapPath", elementString) || pControl->GetElement(L"BGBitmapPath", elementString)) + { + Bitmap* pBackgroundBitmap = null; + pBackgroundBitmap = LoadBitmapN(elementString); + + if (pBackgroundBitmap != null) + { + pLabel->SetBackgroundBitmap(*pBackgroundBitmap); + delete pBackgroundBitmap; + } + } + + if (pControl->GetElement(L"textSize", elementString)) + { + size = _LocalizedNumParser::ToDouble(elementString, "C"); + _ICoordinateSystemTransformer* pTransform = GetTransformer(); + if (pTransform) + { + size = pTransform->Transform(size); + } + } + + if (pControl->GetElement(L"textStyle", elementString)) + { + if (elementString.Equals(L"LABEL_TEXT_STYLE_NORMAL", false)) + { + style = LABEL_TEXT_STYLE_NORMAL; + } + else if (elementString.Equals(L"LABEL_TEXT_STYLE_BOLD", false)) + { + style = LABEL_TEXT_STYLE_BOLD; + } + else if (elementString.Equals(L"LABEL_TEXT_STYLE_ITALIC", false)) + { + style = LABEL_TEXT_STYLE_ITALIC; + } + } + + if (size > 0.0f) + { + pLabel->SetTextConfig(size, style); + } + else + { + pLabel->SetTextConfig(pLabel->GetTextSize(), style); + } + + if (pControl->GetElement(L"LeftMargin", elementString)) + { + Base::Float::Parse(elementString, leftMargin); + _ICoordinateSystemTransformer* pTransform = GetTransformer(); + if (pTransform) + { + leftMargin = pTransform->Transform(leftMargin); + } + } + + if (pControl->GetElement(L"TopMargin", elementString)) + { + Base::Float::Parse(elementString, topMargin); + _ICoordinateSystemTransformer* pTransform = GetTransformer(); + if (pTransform) + { + topMargin = pTransform->Transform(topMargin); + } + } + + pLabel->SetMargin(topMargin, leftMargin); + + //-------safety for Minimum size------------------- + rect = (pControl->GetAttribute(UIBUILDER_ATTRIBUTE_PORTRAIT))->GetRectF(); + if (rect.width < 0.0f) // LABEL_MIN_WIDTH = 0 + { + rect.width = 0.0f; + } + + if (rect.height < 0.0f) + { + rect.height = 0.0f; + } + + (pControl->GetAttribute(UIBUILDER_ATTRIBUTE_PORTRAIT))->SetRect(rect.x, rect.y, rect.width, rect.height); + + rect = (pControl->GetAttribute(UIBUILDER_ATTRIBUTE_LANDSCAPE))->GetRectF(); + if (rect.width < 0.0f) + { + rect.width = 0.0f; + } + + if (rect.height < 0.0f) // LABEL_MIN_HEIGHT = 0 + { + rect.height = 0.0f; + } + (pControl->GetAttribute(UIBUILDER_ATTRIBUTE_LANDSCAPE))->SetRect(rect.x, rect.y, rect.width, rect.height); + //---------end safety code------------------------ + + if (pControl->GetElement(L"accessibilityHint", elementString)) + { + AccessibilityContainer* pContainer = pLabel->GetAccessibilityContainer(); + if (pContainer) + { + AccessibilityElement* pElement = pContainer->GetElement(L"LabelText"); + if (pElement) + { + pElement->SetHint(elementString); + } + } + } + + return pLabel; + } +private: +}; // _LabelMaker + +_LabelRegister::_LabelRegister() +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->RegisterControl(L"Label", _LabelMaker::GetInstance); +} +_LabelRegister::~_LabelRegister() +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->UnregisterControl(L"Label"); +} +static _LabelRegister LabelRegisterToUiBuilder; +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_LabelModel.cpp b/src/ui/controls/FUiCtrl_LabelModel.cpp new file mode 100644 index 0000000..6800bee --- /dev/null +++ b/src/ui/controls/FUiCtrl_LabelModel.cpp @@ -0,0 +1,47 @@ +// +// 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_LabelModel.cpp + * @brief This is the implementation file for the _LabelModel class. + */ + +#include +#include +#include "FUiCtrl_LabelModel.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +_LabelModel::_LabelModel(void) +{ + +} + +_LabelModel::~_LabelModel(void) +{ +} + +result +_LabelModel::Construct(void) +{ + result r = E_SUCCESS; + + return r; +} + + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_LabelPresenter.cpp b/src/ui/controls/FUiCtrl_LabelPresenter.cpp new file mode 100644 index 0000000..11a0988 --- /dev/null +++ b/src/ui/controls/FUiCtrl_LabelPresenter.cpp @@ -0,0 +1,510 @@ +// +// 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_LabelPresenter.cpp + * @brief This is the implementation file for the _LabelPresenter class. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_ResourceManager.h" +#include "FUiAnim_VisualElement.h" +#include "FUiCtrl_LabelPresenter.h" +#include "FUiCtrl_LabelModel.h" +#include "FUiCtrl_Label.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Ui::Animations; +using namespace Tizen::Graphics::_Text; +using namespace Tizen::App; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_LabelPresenter::_LabelPresenter(void) + : __pLabel(null) + , __pLabelModel(null) + , __previousEnabledState(false) + , __lazyDecode(false) + , __pFont(null) + , __pTextObject(null) + , __pBase(null) + , __textStyle(LABEL_TEXT_STYLE_NORMAL) + , __fontStyle(0) + , __fontSize(0.0f) +{ + +} + +_LabelPresenter::~_LabelPresenter(void) +{ + if (__pLabelModel) + { + delete __pLabelModel; + __pLabelModel = null; + } + + if (__pTextObject) + { + delete __pTextObject; + __pTextObject = null; + } +} + +result +_LabelPresenter::Construct(const _Label& label) +{ + result r = E_SUCCESS; + + __pLabel = const_cast <_Label*>(&label); + + __fontStyle = FONT_STYLE_PLAIN; + __fontSize = __pLabel->GetTextSizeF(); + __pFont = __pLabel->GetFallbackFont(); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, __pFont, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __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 is insufficient."); + + __pTextObject->Construct(); + + return E_SUCCESS; + +CATCH: + delete __pTextObject; + __pTextObject = null; + + return r; +} + +result +_LabelPresenter::Install(void) +{ + result r = E_SUCCESS; + + __pBase = __pLabel->GetVisualElement(); + + _LabelModel* pModel = new (std::nothrow) _LabelModel(); + SysTryReturn(NID_UI_CTRL, pModel, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + + r = SetModel(*pModel); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + r = pModel->Construct(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + return E_SUCCESS; + +CATCH: + delete pModel; + return r; +} + +result +_LabelPresenter::SetModel(const _LabelModel& labelModel) +{ + __pLabelModel = const_cast <_LabelModel*>(&labelModel); + + return E_SUCCESS; +} + +result +_LabelPresenter::InitTextObject(void) +{ + TextSimple* pSimpleText = null; + + __pTextObject->RemoveAll(true); + + pSimpleText = new (std::nothrow) TextSimple(const_cast(__pLabel->GetText().GetPointer()), __pLabel->GetText().GetLength(), TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL, __pFont); + SysTryReturn(NID_UI_CTRL, pSimpleText, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + + __pTextObject->AppendElement(*pSimpleText); + __pTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_WORD); + __pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); + + return E_SUCCESS; +} + +void +_LabelPresenter::OnFontChanged(Font* pFont) +{ + __pFont = pFont; + if (__pTextObject) + { + __pTextObject->SetFont(__pFont, 0, __pTextObject->GetTextLength()); + } + + return; +} + +result +_LabelPresenter::SetTextConfig(int size, LabelTextStyle style) +{ + float floatSize = _CoordinateSystemUtils::ConvertToFloat(size); + + return SetTextConfig(floatSize, style); +} + +result +_LabelPresenter::SetTextConfig(float size, LabelTextStyle style) +{ + result r = E_SUCCESS; + + unsigned long fontStyle = FONT_STYLE_PLAIN; + bool isStrikeOut = __pFont->IsStrikeOut(); + bool isUnderLine = __pFont->IsUnderlined(); + + __textStyle = style; + + if (__textStyle == LABEL_TEXT_STYLE_ITALIC) + { + fontStyle |= FONT_STYLE_ITALIC; + } + + if (__textStyle == LABEL_TEXT_STYLE_BOLD) + { + fontStyle |= FONT_STYLE_BOLD; + } + + __fontStyle = fontStyle; + __fontSize = size; + + __pFont = __pLabel->GetFallbackFont(); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, __pFont, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pFont->SetStrikeOut(isStrikeOut); + __pFont->SetUnderline(isUnderLine); + + __pTextObject->SetFont(__pFont, 0, __pTextObject->GetTextLength()); + + return E_SUCCESS; +} + +LabelTextStyle +_LabelPresenter::GetTextStyle(void) const +{ + return __textStyle; +} + +void +_LabelPresenter::SetFontInfo(unsigned long style, int size) +{ + float floatSize = _CoordinateSystemUtils::ConvertToFloat(size); + + return SetFontInfo(style, floatSize); +} + +void +_LabelPresenter::SetFontInfo(unsigned long style, float size) +{ + __fontStyle = style; + __fontSize = size; + + return; +} + +void +_LabelPresenter::OnFontInfoRequested(unsigned long& style, int& size) +{ + style = __fontStyle; + size = _CoordinateSystemUtils::ConvertToInteger(__fontSize); + + return; +} + +void +_LabelPresenter::OnFontInfoRequested(unsigned long& style, float& size) +{ + style = __fontStyle; + size = __fontSize; + + return; +} + +TextObject* +_LabelPresenter::GetTextObject(void) const +{ + return __pTextObject; +} + +Font* +_LabelPresenter::GetFont(void) const +{ + return __pFont; +} + +void +_LabelPresenter::Draw(void) +{ + DrawBackground(); + + if (!__pLabel->GetText().IsEmpty()) + { + DrawText(); + } + + return; +} + +void +_LabelPresenter::DrawBackground(void) +{ + Bitmap* pBitmap = __pLabel->GetBackgroundBitmap(); + Bitmap* pEffectBitmap = __pLabel->GetBackgroundEffectBitmap(); + + FloatRectangle bounds(0.0f, 0.0f, __pLabel->GetBoundsF().width, __pLabel->GetBoundsF().height); + + Color bgColor = __pLabel->GetBackgroundColor(); + + Canvas* pCanvas = null; + + String imagePath = L""; + + if (pBitmap != null) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pBitmap) == false) + { + imagePath = _BitmapImpl::GetInstance(*pBitmap)->GetFileName(); + } + + if (imagePath.IsEmpty() == false && __pLabel->GetText() == L"") + { + __pBase->SetBackgroundColor(_Colorf( + (float)bgColor.GetRed() / 255, (float)bgColor.GetGreen() / 255, (float)bgColor.GetBlue() / 255, (float)bgColor.GetAlpha() / 255)); + + __pBase->SetImageSource(imagePath); + + __lazyDecode = true; + } + else + { + __pBase->SetImageSource(L""); + + __lazyDecode = false; + + pCanvas = __pLabel->GetCanvasN(); + if (pCanvas == null) + { + SysLog(NID_UI_CTRL, "Cannot get a canvas."); + + return; + } + + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pBitmap)) + { + pCanvas->DrawNinePatchedBitmap(bounds, *pBitmap); + } + else + { + pCanvas->DrawBitmap(FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height), *pBitmap); + } + + if (pEffectBitmap != null) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pEffectBitmap)) + { + pCanvas->DrawNinePatchedBitmap(bounds, *pEffectBitmap); + } + else + { + pCanvas->DrawBitmap(FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height), *pEffectBitmap); + } + } + } + } + else // pBitmap is null + { + if (__pLabel->GetText().IsEmpty() && __pLabel->IsCalledGetCanvasN() == false) + { + __pBase->SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255, (float)bgColor.GetGreen() / 255, (float)bgColor.GetBlue() / 255, (float)bgColor.GetAlpha() / 255)); + } + else + { + pCanvas = __pLabel->GetCanvasN(); + if (pCanvas == null) + { + SysLog(NID_UI_CTRL, "Cannot get a canvas."); + + return; + } + + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + pCanvas->FillRectangle(__pLabel->GetBackgroundColor(), bounds); + } + } + + if (pCanvas) + { + delete pCanvas; + } + + return; +} + +void +_LabelPresenter::DrawText(void) +{ + TextObjectAlignment horizontalAlign = TEXT_OBJECT_ALIGNMENT_CENTER; + TextObjectAlignment verticalAlign = TEXT_OBJECT_ALIGNMENT_MIDDLE; + + float leftMargin = __pLabel->GetLeftMargin(); + float topMargin = __pLabel->GetTopMargin(); + float rightMargin = __pLabel->GetRightMargin(); + float bottomMargin = __pLabel->GetBottomMargin(); + + FloatRectangle rect(leftMargin, topMargin, __pLabel->GetBoundsF().width - (leftMargin + rightMargin), __pLabel->GetBoundsF().height - (topMargin + bottomMargin)); + + if (rect.width <= 0 || rect.height <= 0) + { + SysLog(NID_UI_CTRL, "text display rectangle is wrong."); + + return; + } + + Canvas* pCanvas = __pLabel->GetCanvasN(); + if (pCanvas == null) + { + SysLog(NID_UI_CTRL, "Cannot get a canvas."); + + return; + } + + __pTextObject->SetBounds(rect); + __pTextObject->SetDisplayBoundsExpandEnabled(true); + + switch (__pLabel->GetTextHorizontalAlignment()) + { + case ALIGNMENT_LEFT: + horizontalAlign = TEXT_OBJECT_ALIGNMENT_LEFT; + break; + case ALIGNMENT_CENTER: + horizontalAlign = TEXT_OBJECT_ALIGNMENT_CENTER; + break; + default: + horizontalAlign = TEXT_OBJECT_ALIGNMENT_RIGHT; + } + + switch (__pLabel->GetTextVerticalAlignment()) + { + case ALIGNMENT_TOP: + verticalAlign = TEXT_OBJECT_ALIGNMENT_TOP; + break; + case ALIGNMENT_MIDDLE: + verticalAlign = TEXT_OBJECT_ALIGNMENT_MIDDLE; + break; + default: + verticalAlign = TEXT_OBJECT_ALIGNMENT_BOTTOM; + } + + __pTextObject->SetAlignment(horizontalAlign | verticalAlign); + __pTextObject->Compose(); + __pTextObject->SetForegroundColor(__pLabel->GetTextColor(), 0, __pTextObject->GetTextLength()); + __pTextObject->Draw(*_CanvasImpl::GetInstance(*pCanvas)); + + delete pCanvas; + + return; +} + +bool +_LabelPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + return false; +} + +bool +_LabelPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + return false; +} + +bool +_LabelPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + return false; +} + +bool +_LabelPresenter::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + return false; +} + +void +_LabelPresenter::OnTouchMoveHandled(const _Control& control) +{ + return; +} + +Canvas* +_LabelPresenter::OnCanvasRequestedN(const FloatRectangle& bounds) +{ + Canvas* pCanvas = null; + + if (__lazyDecode == true) + { + Bitmap* pBitmap = null; + + pBitmap = __pLabel->GetBackgroundBitmap(); + + if (pBitmap != null) + { + if (pBitmap->IsNinePatchedBitmap()) // just decode // fix prevent CHECKED_RETURN + { + // empty + } + } + + Draw(); + + pCanvas = __pLabel->GetCanvasN(); + } + + return pCanvas; +} + +bool +_LabelPresenter::IsEnabledStateChanged(void) +{ + bool __currentEnabledState = __pLabel->GetEnableState(); + + if (__currentEnabledState != __previousEnabledState) + { + __previousEnabledState = __currentEnabledState; + return true; + } + else + { + return false; + } +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_LanguageEvent.cpp b/src/ui/controls/FUiCtrl_LanguageEvent.cpp new file mode 100644 index 0000000..af72982 --- /dev/null +++ b/src/ui/controls/FUiCtrl_LanguageEvent.cpp @@ -0,0 +1,187 @@ +// +// 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_LanguageEvent.cpp + * @brief This is the implementation for the _LanguageEvent class. + * @version 2.0 + */ + +// includes +#include +#include +#include +#include +#include "FUiCtrl_LanguageEvent.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Locales; + +namespace Tizen { namespace Ui { namespace Controls +{ +/** +* @class _LanguageEventArg +* @brief This class is used as an argument of event listener's method. +* +* This class is used as an argument of event listener's method. When language event is generated, +* the @c languageEvent instance calls @c languageEventListener's method with instance of this class as an argument. +* +*/ +class _OSP_EXPORT_ _LanguageEventArg + : public IEventArg + , public Object +{ +// Lifecycle +public: + /** + * This is the default class constructor. + * + * @param[in] source A pointer to the Window instance which contains this instance. + * @param[in] prevLanguageCode the key code of the event initially occurs. + * @param[in] currentLanguageCode the key state of the event initially occurs. + */ + _LanguageEventArg(LanguageCode prevLanguageCode, LanguageCode currentLanguageCode); + + + /** + * This is the class destructor. + * + */ + virtual ~_LanguageEventArg(void); + + +// Access +public: + /** + * This method returns a previous language code. + * + * @return See the comment above. + * + */ + LanguageCode GetPreviousLanguageCode(void) const; + + /** + * This method returns a current language code. + * + * @return See the comment above. + * + */ + LanguageCode GetCurrentLanguageCode(void) const; + +// Attribute +private: + LanguageCode __prevLanguageCode; + LanguageCode __currentLanguageCode; +}; // _LanguageEventArg + +_LanguageEventArg::_LanguageEventArg(LanguageCode prevLanguageCode, LanguageCode currentLanguageCode) + : __prevLanguageCode(prevLanguageCode) + , __currentLanguageCode(currentLanguageCode) +{ + +} + +_LanguageEventArg::~_LanguageEventArg(void) +{ + // Nothing. +} + +LanguageCode +_LanguageEventArg::GetCurrentLanguageCode(void) const +{ + return __currentLanguageCode; +} + +LanguageCode +_LanguageEventArg::GetPreviousLanguageCode(void) const +{ + return __prevLanguageCode; +} + +//////////////////////////////////////////////////////////////////////////////// +/// _FocusEvent class Lifecycle + +_LanguageEvent::_LanguageEvent(const _Control& source) + : __pSource(null) +{ + result r = _Event::Initialize(); + + // set event source + if (r == E_SUCCESS) + __pSource = &source; +} + + +_LanguageEvent::~_LanguageEvent() +{ + // NOTHING +} + +_LanguageEvent* +_LanguageEvent::CreateInstanceN(const _Control& source) +{ + _LanguageEvent* pCoreLanguageEvent = new (std::nothrow) _LanguageEvent(source); + SysTryReturn(NID_UI_CTRL, pCoreLanguageEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + if (IsFailed(GetLastResult())) + goto CATCH; + + return pCoreLanguageEvent; + +CATCH: + delete pCoreLanguageEvent; + return null; +} + +const _Control* +_LanguageEvent::GetSource(void) const +{ + return (__pSource); +} + +void +_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."); + + const _LanguageEventArg* pLanguageEventArg = dynamic_cast (&arg); + SysTryReturnVoidResult(NID_UI_CTRL, pLanguageEventArg != null, E_INVALID_ARG, + "[E_INVALID_ARG] The invalid Event Argument was given."); + + LanguageCode currentLanguageCode = pLanguageEventArg->GetCurrentLanguageCode(); + LanguageCode previousLanguageCode = pLanguageEventArg->GetPreviousLanguageCode(); + + pLanguageEventListener->OnLanguageChanged(currentLanguageCode, previousLanguageCode); + + SetLastResult(E_SUCCESS); + + return; +} + +IEventArg* +_LanguageEvent::CreateLanguageEventArgN(LanguageCode prevLanguageCode, + LanguageCode currentLanguageCode) +{ + _LanguageEventArg* pLanguageEventArg = new (std::nothrow) _LanguageEventArg(prevLanguageCode, currentLanguageCode); + SysTryReturn(NID_UI_CTRL, pLanguageEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + return pLanguageEventArg; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_LinkEvent.cpp b/src/ui/controls/FUiCtrl_LinkEvent.cpp new file mode 100644 index 0000000..0465bb9 --- /dev/null +++ b/src/ui/controls/FUiCtrl_LinkEvent.cpp @@ -0,0 +1,185 @@ +// +// 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_LinkEvent.cpp +* @brief This is the implementation for the _LinkEvent class. +* @version 1.0 +*/ + +// includes +#include +#include +#include +#include "FUiCtrl_LinkEvent.h" + + +// using namespace +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Base::Utility; + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @class _LinkEventArg + * @brief This class is used as the argument to change event listener. + * + * This class is used as the argument to change event listener. When an change event is generated + * (such as when a button is pressed) the TextSelectionEvent calls TextSelectionEventListener's OnTextd + * with an instance of this class as an argument. + * + * From this class, one can find out, the (event) source object and the change ID. + */ +class _OSP_EXPORT_ _LinkEventArg + : public IEventArg + , public Object +{ +// Lifecycle +public: + /** + * This is the default class constructor. + * + */ + _LinkEventArg(const String& text, LinkType linkType, const String& link); + + /** + * This is the class destructor. + * + */ + virtual ~_LinkEventArg(void); + + String GetText(void) const; + + LinkType GetLinkType(void) const; + + String GetLinkText(void) const; + + +private: + String __text; + + LinkType __linkType; + + String __linkText; +}; // _LinkEventArg + +//////////////////////////////////////////////////////////////////////////////// +/// _LinkEventArg class Lifecycle + +_LinkEventArg::_LinkEventArg(const String& text, LinkType linkType, const String& link) + : __text(text) + , __linkType(linkType) + , __linkText(link) +{ + // Nothing. +} + +_LinkEventArg::~_LinkEventArg(void) +{ + // Nothing. +} + +String +_LinkEventArg::GetText(void) const +{ + return __text; +} + +LinkType +_LinkEventArg::GetLinkType(void) const +{ + return __linkType; +} + +String +_LinkEventArg::GetLinkText(void) const +{ + return __linkText; +} + +//////////////////////////////////////////////////////////////////////////////// +/// _LinkEvent class Lifecycle +_LinkEvent::_LinkEvent(const _Control& source) + : __pSource(null) +{ + result r = _Event::Initialize(); + + // Set event source + if (r == E_SUCCESS) + { + __pSource = &source; + } +} + +_LinkEvent::~_LinkEvent(void) +{ + // Nothing. +} + +_LinkEvent* +_LinkEvent::CreateInstanceN(const _Control& source) +{ + _LinkEvent* pCoreLinkEvent = new (std::nothrow) _LinkEvent(source); + SysTryReturn(NID_UI_CTRL, pCoreLinkEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + if (IsFailed(GetLastResult())) + goto CATCH; + + return pCoreLinkEvent; + +CATCH: + delete pCoreLinkEvent; + return null; +} + +const _Control* +_LinkEvent::GetSource(void) const +{ + return __pSource; +} + +void +_LinkEvent::FireImpl(IEventListener& listener, const IEventArg& arg) +{ + _IUiLinkEventListener* pLinkEventListener = dynamic_cast <_IUiLinkEventListener*>(&listener); + 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, "[E_INVALID_ARG] The Invalid Event Argument is given."); + + const String text = pLinkEventArg->GetText(); + LinkType linkType = pLinkEventArg->GetLinkType(); + const String linkText = pLinkEventArg->GetLinkText(); + + pLinkEventListener->OnLinkClicked(const_cast <_Control&>(*__pSource), text, linkType, linkText); + + SetLastResult(E_SUCCESS); + + return; +} + +IEventArg* +_LinkEvent::CreateLinkEventArgN(String text, LinkType linkType, String link) +{ + _LinkEventArg* pEventArg = new (std::nothrow) _LinkEventArg(text, linkType, link); + SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + return pEventArg; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_ListBaseImpl.cpp b/src/ui/controls/FUiCtrl_ListBaseImpl.cpp new file mode 100644 index 0000000..ef7fffe --- /dev/null +++ b/src/ui/controls/FUiCtrl_ListBaseImpl.cpp @@ -0,0 +1,1059 @@ +// +// 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_ListBaseImpl.cpp +* @brief This file contains implementation of common classes used by 1.x Lists +*/ + +#include +#include +#include +#include "FUiCtrl_ListBaseImpl.h" +#include "FUiCtrl_CustomListElements.h" +#include "FUiCtrl_CustomListItemImpl.h" +#include "FUiCtrl_Label.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FGrp_BitmapImpl.h" + +using namespace Tizen::Base::Collection; +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Graphics::_Text; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_ListBaseImpl::_ListBaseImpl(Control* pList, _TableView* pCore) + : _ControlImpl(pList, pCore) + , _annexStyle(TABLE_VIEW_ANNEX_STYLE_NORMAL) + , _currentRadioIndex(-1) + , _currentRadioGroupIndex(-1) + , _isDividerEnabled(false) + , _itemsList(_CustomListItemImpl::DeleteCustomListItem) + , __pEmptyText(null) +{ + 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 < BITMAP_MAX; i++) + { + _pCheckBitmaps[i] = null; + } + +} + +_ListBaseImpl::~_ListBaseImpl(void) +{ + 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."); + + pCore->DetachAllChildren(); +} + +Bitmap* +_ListBaseImpl::CreateMergedBitmapN(Bitmap& pNormalBitmap, Bitmap* pSelectedBitmap) +{ + Bitmap* pMergeBitmap = null; + Canvas* pCanvas = null; + + Rectangle bitmapBounds; + result r = E_SUCCESS; + + bitmapBounds = Rectangle(0, 0, pNormalBitmap.GetWidth(), pNormalBitmap.GetHeight()); + + pCanvas = new (std::nothrow) Canvas(); + SysTryReturn(NID_UI_CTRL, pCanvas != null, null, E_OUT_OF_MEMORY, "Memory allocation failed."); + + pCanvas->Construct(bitmapBounds); + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(pNormalBitmap)) + { + pCanvas->DrawNinePatchedBitmap(bitmapBounds, pNormalBitmap); + } + else + { + pCanvas->DrawBitmap(bitmapBounds, pNormalBitmap); + } + + if (pSelectedBitmap != null) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pSelectedBitmap)) + { + pCanvas->DrawNinePatchedBitmap(bitmapBounds, *pSelectedBitmap); + } + else + { + pCanvas->DrawBitmap(bitmapBounds, *pSelectedBitmap); + } + } + + pMergeBitmap = new (std::nothrow) Bitmap(); + SysTryCatch(NID_UI_CTRL, pMergeBitmap != null, , E_OUT_OF_MEMORY, "Memory allocation failed."); + + r = pMergeBitmap->Construct(*pCanvas, bitmapBounds); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "A system error has occurred. Failed to construct an item."); + + + delete pCanvas; + return pMergeBitmap; + +CATCH: + delete pCanvas; + delete pMergeBitmap; + + return null; +} + + +Bitmap* +_ListBaseImpl::CreateOnOffMergedBitmapN(Bitmap& pNormalBitmap, Bitmap& pSelectedBitmap, _CheckBoxBitmapType status) +{ + Bitmap* pMergeBitmap = null; + Canvas* pCanvas = null; + + Rectangle bitmapBounds; + Rectangle handlerBounds; + result r = E_SUCCESS; + + bitmapBounds = Rectangle(0, 0, pNormalBitmap.GetWidth(), pNormalBitmap.GetHeight()); + + if (status == CHECK_BOX_UNCHECKED) + { + handlerBounds = Rectangle(0, 0, pSelectedBitmap.GetWidth(), pSelectedBitmap.GetHeight()); + } + else + { + handlerBounds.x = pNormalBitmap.GetWidth() - pSelectedBitmap.GetWidth(); + handlerBounds.y = 0; + handlerBounds.width = pSelectedBitmap.GetWidth(); + handlerBounds.height = pSelectedBitmap.GetHeight(); + } + + pCanvas = new (std::nothrow) Canvas(); + SysTryReturn(NID_UI_CTRL, pCanvas != null, null, E_OUT_OF_MEMORY, "Memory allocation failed."); + + pCanvas->Construct(bitmapBounds); + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(pNormalBitmap)) + { + pCanvas->DrawNinePatchedBitmap(bitmapBounds, pNormalBitmap); + } + else + { + pCanvas->DrawBitmap(bitmapBounds, pNormalBitmap); + } + + if(_BitmapImpl::CheckNinePatchedBitmapStrictly(pSelectedBitmap)) + { + pCanvas->DrawNinePatchedBitmap(handlerBounds, pSelectedBitmap); + } + else + { + pCanvas->DrawBitmap(handlerBounds, pSelectedBitmap); + } + + pMergeBitmap = new (std::nothrow) Bitmap(); + SysTryCatch(NID_UI_CTRL, pMergeBitmap != null, , E_OUT_OF_MEMORY, "Memory allocation failed."); + + r = pMergeBitmap->Construct(*pCanvas, bitmapBounds); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "A system error has occurred. Failed to construct an item."); + + delete pCanvas; + return pMergeBitmap; + +CATCH: + delete pCanvas; + delete pMergeBitmap; + + return null; +} + +result +_ListBaseImpl::LoadDefaultBitmap(void) +{ + Bitmap* pNormalBitmap = null; + Bitmap* pSelectedBitmap = null; + Bitmap* pHandlerBitmap = null; + Bitmap* pDisabledNormalBitmap = null; + Bitmap* pDisabledSelectedBitmap = null; + Bitmap* pDisabledHandlerBitmap = null; + Bitmap* pPressedBitmap = null; + + result r = E_SUCCESS; + + if (_annexStyle == TABLE_VIEW_ANNEX_STYLE_RADIO) + { + r = GET_BITMAP_CONFIG_N(TABLEVIEW::RADIOBUTTON_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pNormalBitmap); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, GetErrorMessage(r), "[%s] Propagating.", GetErrorMessage(r)); + + _pCheckBitmaps[BITMAP_UNCHECKED] = CreateMergedBitmapN(*pNormalBitmap, pSelectedBitmap); + + r = GET_BITMAP_CONFIG_N(TABLEVIEW::RADIOBUTTON_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pPressedBitmap); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + _pCheckBitmaps[BITMAP_UNCHECKED_PRESSED] = CreateMergedBitmapN(*pPressedBitmap, pSelectedBitmap); + + r = GET_BITMAP_CONFIG_N(TABLEVIEW::RADIOBUTTON_BUTTON_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pSelectedBitmap); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + _pCheckBitmaps[BITMAP_CHECKED] = CreateMergedBitmapN(*pNormalBitmap, pSelectedBitmap); + + _pCheckBitmaps[BITMAP_CHECKED_PRESSED] = CreateMergedBitmapN(*pPressedBitmap, pSelectedBitmap); + + r = GET_BITMAP_CONFIG_N(TABLEVIEW::RADIOBUTTON_NORMAL_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pDisabledNormalBitmap); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GET_BITMAP_CONFIG_N(TABLEVIEW::RADIOBUTTON_BUTTON_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pSelectedBitmap); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + _pCheckBitmaps[BITMAP_CHECKED_DISABLED] = CreateMergedBitmapN(*pDisabledNormalBitmap, pSelectedBitmap); + } + else if (_annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING || _annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER) + { + r = GET_BITMAP_CONFIG_N(TABLEVIEW::ONOFFBUTTON_OFF_HANDLER, BITMAP_PIXEL_FORMAT_ARGB8888, pHandlerBitmap); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, GetErrorMessage(r), "[%s] Propagating.", GetErrorMessage(r)); + + r = GET_BITMAP_CONFIG_N(TABLEVIEW::ONOFFBUTTON_BG, BITMAP_PIXEL_FORMAT_ARGB8888, pNormalBitmap); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + _pCheckBitmaps[BITMAP_UNCHECKED] = CreateOnOffMergedBitmapN(*pNormalBitmap, *pHandlerBitmap, CHECK_BOX_UNCHECKED); + + delete pHandlerBitmap; + pHandlerBitmap = null; + + r = GET_BITMAP_CONFIG_N(TABLEVIEW::ONOFFBUTTON_ON_HANDLER, BITMAP_PIXEL_FORMAT_ARGB8888, pHandlerBitmap); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + + _pCheckBitmaps[BITMAP_CHECKED] = CreateOnOffMergedBitmapN(*pNormalBitmap, *pHandlerBitmap, CHECK_BOX_CHECKED); + + r = GET_BITMAP_CONFIG_N(TABLEVIEW::ONOFFBUTTON_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pDisabledNormalBitmap); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GET_BITMAP_CONFIG_N(TABLEVIEW::ONOFFBUTTON_ON_HANDLER_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pDisabledHandlerBitmap); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + _pCheckBitmaps[BITMAP_CHECKED_DISABLED] = CreateOnOffMergedBitmapN(*pDisabledNormalBitmap, *pDisabledHandlerBitmap, CHECK_BOX_CHECKED); + + delete pDisabledHandlerBitmap; + pDisabledHandlerBitmap = null; + + r = GET_BITMAP_CONFIG_N(TABLEVIEW::ONOFFBUTTON_OFF_HANDLER_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pDisabledHandlerBitmap); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + _pCheckBitmaps[BITMAP_UNCHECKED_DISABLED] = CreateOnOffMergedBitmapN(*pDisabledNormalBitmap, *pDisabledHandlerBitmap, CHECK_BOX_UNCHECKED); + } + else + { + r = GET_BITMAP_CONFIG_N(TABLEVIEW::CHECKBOX_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pNormalBitmap); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, GetErrorMessage(r), "[%s] Propagating.", GetErrorMessage(r)); + + _pCheckBitmaps[BITMAP_UNCHECKED] = CreateMergedBitmapN(*pNormalBitmap, pSelectedBitmap); + + r = GET_BITMAP_CONFIG_N(TABLEVIEW::CHECKBOX_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pPressedBitmap); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + _pCheckBitmaps[BITMAP_UNCHECKED_PRESSED] = CreateMergedBitmapN(*pPressedBitmap, pSelectedBitmap); + + r = GET_BITMAP_CONFIG_N(TABLEVIEW::CHECKBOX_CHECK_MARK_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pSelectedBitmap); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + _pCheckBitmaps[BITMAP_CHECKED] = CreateMergedBitmapN(*pNormalBitmap, pSelectedBitmap); + + delete pSelectedBitmap; + pSelectedBitmap = null; + + r = GET_BITMAP_CONFIG_N(TABLEVIEW::CHECKBOX_CHECK_MARK_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pSelectedBitmap); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + _pCheckBitmaps[BITMAP_CHECKED_PRESSED] = CreateMergedBitmapN(*pPressedBitmap, pSelectedBitmap); + + r = GET_BITMAP_CONFIG_N(TABLEVIEW::CHECKBOX_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pDisabledNormalBitmap); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GET_BITMAP_CONFIG_N(TABLEVIEW::CHECKBOX_CHECK_MARK_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pDisabledSelectedBitmap); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + _pCheckBitmaps[BITMAP_CHECKED_DISABLED] = CreateMergedBitmapN(*pDisabledNormalBitmap, pDisabledSelectedBitmap); + } + + delete pNormalBitmap; + delete pSelectedBitmap; + delete pHandlerBitmap; + delete pDisabledNormalBitmap; + delete pDisabledSelectedBitmap; + delete pDisabledHandlerBitmap; + delete pPressedBitmap; + + return r; + +CATCH: + delete pNormalBitmap; + delete pSelectedBitmap; + delete pHandlerBitmap; + delete pDisabledNormalBitmap; + delete pDisabledSelectedBitmap; + delete pDisabledHandlerBitmap; + delete pPressedBitmap; + + return r; + +} + +Tizen::Ui::Controls::TableViewAnnexStyle +_ListBaseImpl::GetAnnexStyle(void) +{ + return _annexStyle; +} + +Tizen::Graphics::Bitmap** +_ListBaseImpl::GetCheckBitmaps(void) +{ + return _pCheckBitmaps; +} + +result +_ListBaseImpl::SetItemChecked(int groupIndex, int itemIndex, bool check) +{ + return E_SUCCESS; +} + +bool +_ListBaseImpl::IsItemChecked(int groupIndex, int itemIndex) const +{ + return false; +} + +void +_ListBaseImpl::OnTouchDoublePressed(const Control &source, const Point ¤tPosition, const TouchEventInfo &touchInfo) +{ + return; +} + +void +_ListBaseImpl::OnTouchFocusIn(const Control &source, const Point ¤tPosition, const TouchEventInfo &touchInfo) +{ + return; +} + +void +_ListBaseImpl::OnTouchFocusOut(const Control &source, const Point ¤tPosition, const TouchEventInfo &touchInfo) +{ + OnTouchReleased(source, currentPosition, touchInfo); + return; +} + +void +_ListBaseImpl::OnTouchLongPressed(const Control &source, const Point ¤tPosition, const TouchEventInfo &touchInfo) +{ + return; +} + +void +_ListBaseImpl::OnTouchMoved(const Control &source, const Point ¤tPosition, const TouchEventInfo &touchInfo) +{ + return; +} + +void +_ListBaseImpl::OnTouchPressed(const Control &source, const Point ¤tPosition, const TouchEventInfo &touchInfo) +{ + CustomListItem* pCustomListItem = GetItemFromControl(source); + SysTryReturnVoidResult(NID_UI_CTRL, pCustomListItem, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get an item"); + + pCustomListItem->__pCustomListItemImpl->StartSliding(); + + UpdateElements(source, CUSTOM_LIST_ITEM_STATUS_FOCUSED); + return; +} + +void +_ListBaseImpl::OnTouchReleased(const Control &source, const Point ¤tPosition, const TouchEventInfo &touchInfo) +{ + CustomListItem* pCustomListItem = GetItemFromControl(source); + SysTryReturnVoidResult(NID_UI_CTRL, pCustomListItem, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get an item"); + + pCustomListItem->__pCustomListItemImpl->StopSliding(); + + UpdateElements(source, CUSTOM_LIST_ITEM_STATUS_NORMAL); + return; +} + +CustomListItem* +_ListBaseImpl::GetItemFromControl(const Control &source) +{ + _ITableViewBaseItemData* pBaseData = dynamic_cast<_ITableViewBaseItemData*>(const_cast(&source)); + SysTryReturn(NID_UI_CTRL, (pBaseData != null), null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get item."); + + int groupIndex = -1; + int itemIndex = -1; + + pBaseData->GetIndex(groupIndex, itemIndex); + + return GetCustomListItemAt(groupIndex, itemIndex- GetTopItemIndex(groupIndex)); +} + +void +_ListBaseImpl::UpdateElements(const Control &source, CustomListItemStatus itemStatus) +{ + _ITableViewBaseItemData* pBaseData = dynamic_cast<_ITableViewBaseItemData*>(const_cast(&source)); + SysTryReturnVoidResult(NID_UI_CTRL, (pBaseData != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get item."); + + int groupIndex = -1; + int itemIndex = -1; + + pBaseData->GetIndex(groupIndex, itemIndex); + + CustomListItem* pCustomListItem = GetCustomListItemAt(groupIndex, itemIndex - GetTopItemIndex(groupIndex)); + SysTryReturnVoidResult(NID_UI_CTRL, pCustomListItem, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get an item"); + + LinkedList* pElements = &pCustomListItem->__pCustomListItemImpl->elements; + + int elementCount = pElements->GetCount(); + for (int i = 0; i < elementCount; i++) + { + _ElementBaseModel* pElementBase = dynamic_cast<_ElementBaseModel*>(pElements->GetAt(i)); + SysTryReturnVoidResult(NID_UI_CTRL, (pElementBase != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get element."); + + if (pElementBase->_elementType != LIST_ITEM_ELEMENT_TYPE_CHECKBOX) + { + pElementBase->HandleElementEvent(itemStatus); + } + } + + DrawItem(groupIndex, itemIndex); +} + +int +_ListBaseImpl::GetTopItemIndex(int groupIndex) const +{ + return 0; +} + +bool +_ListBaseImpl::IsItemNew(const CustomListItem& item) const +{ + for (int itemCount = 0; itemCount < _itemsList.GetCount(); itemCount++) + { + CustomListItem* pCustomListItem = dynamic_cast(const_cast(_itemsList.GetAt(itemCount))); + SysTryReturnResult(NID_UI_CTRL, pCustomListItem, E_SYSTEM, + "A system error has occurred. Failed to get CustomList item at index %d.", itemCount); + + _CustomListItemImpl* pCustomListItemImpl = pCustomListItem->__pCustomListItemImpl; + SysTryReturnResult(NID_UI_CTRL, pCustomListItemImpl, E_SYSTEM, "A system error has occurred. Failed to get an item at index(%d)", itemCount); + + if ((pCustomListItem == const_cast(&item)) && (pCustomListItemImpl->itemId == item.__pCustomListItemImpl->itemId)) + { + return false; + } + + for (int subItemCount = 0; subItemCount < GetSubItemCountAt(itemCount); subItemCount++) + { + CustomListItem* pCustomListItem = dynamic_cast(const_cast(pCustomListItemImpl->__pSubItemsList->GetAt(subItemCount))); + SysTryReturnResult(NID_UI_CTRL, pCustomListItem, E_SYSTEM, + "A system error has occurred. Failed to get CustomList item at index %d.", itemCount); + + if ((pCustomListItem == const_cast(&item)) && (pCustomListItem->__pCustomListItemImpl->itemId == item.__pCustomListItemImpl->itemId)) + { + return false; + } + } + } + + return true; +} + +result +_ListBaseImpl::UpdateIndices(int groupIndex, int itemIndex, int updateBy) +{ + int index = 0; + if (updateBy == -1) + { + index = itemIndex; + } + else + { + index = itemIndex + 1; + } + + if (groupIndex == -1) + { + for (; index < _itemsList.GetCount(); index++) + { + _TableViewItemData* pTableViewItemData = GetTableViewItemAt(-1, index); + + if (pTableViewItemData) + { + pTableViewItemData->itemIndex += updateBy; + } + } + + if (_currentRadioIndex >= itemIndex) + { + _currentRadioIndex += updateBy; + } + } + else if (itemIndex == -1) + { + for (int index = groupIndex; index < _itemsList.GetCount(); index++) + { + _TableViewGroupItemData* pGroupItem = GetTableViewGroupItemAt(index); + + if (pGroupItem) + { + pGroupItem->groupIndex += updateBy; + } + } + + if (_currentRadioGroupIndex >= groupIndex) + { + _currentRadioGroupIndex += updateBy; + } + } + else + { + int subItemCount = GetSubItemCountAt(groupIndex); + + for (; index < subItemCount; index++) + { + _TableViewItemData* pTableViewItemData = GetTableViewItemAt(groupIndex, index); + + if (pTableViewItemData) + { + pTableViewItemData->itemIndex += updateBy; + } + } + + if (_currentRadioIndex >= itemIndex) + { + _currentRadioIndex += updateBy; + } + } + + return E_SUCCESS; +} + +result +_ListBaseImpl::InsertIntoItemsList(const CustomListItem& item, int groupIndex, int itemIndex, bool updateIndices) +{ + result r = E_SUCCESS; + + if (GetCore().GetFirstDrawnFlag() == true) + { + updateIndices = false; + } + + if (groupIndex == -1) + { + r = _itemsList.InsertAt(item, itemIndex); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + else if (itemIndex == -1) + { + r = _itemsList.InsertAt(item, groupIndex); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "A system error has occurred. Failed to insert an item."); + } + else + { + CustomListItem* pCustomListItem = GetCustomListItemAt(groupIndex, -1); + SysTryReturnResult(NID_UI_CTRL, pCustomListItem, E_SYSTEM, "A system error has occurred. Failed to get item at %d index.", groupIndex); + + if (pCustomListItem->__pCustomListItemImpl->__pSubItemsList == null) + { + pCustomListItem->__pCustomListItemImpl->__pSubItemsList = new (std::nothrow) ArrayList(_CustomListItemImpl::DeleteCustomListItem); + SysTryReturnResult(NID_UI_CTRL, pCustomListItem->__pCustomListItemImpl->__pSubItemsList, E_OUT_OF_MEMORY, "Memory allocation failed."); + + pCustomListItem->__pCustomListItemImpl->__pSubItemsList->Construct(1); + } + + pCustomListItem->__pCustomListItemImpl->__pSubItemsList->InsertAt(item, itemIndex); + } + + if (updateIndices) + { + return UpdateIndices(groupIndex, itemIndex, 1); + } + else + { + return E_SUCCESS; + } +} + +result +_ListBaseImpl::RemoveFromItemsList(int groupIndex, int itemIndex, bool updateIndices) +{ + result r = E_SUCCESS; + + if (GetCore().GetFirstDrawnFlag() == true) + { + updateIndices = false; + } + + if (groupIndex == -1) + { + r = _itemsList.RemoveAt(itemIndex, true); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "A system error has occurred. Failed to remove an item."); + } + else if (itemIndex == -1) + { + r = _itemsList.RemoveAt(groupIndex, true); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "A system error has occurred. Failed to remove an item."); + } + else + { + CustomListItem* pCustomListGroupItem = dynamic_cast(const_cast(_itemsList.GetAt(groupIndex))); + SysTryReturnResult(NID_UI_CTRL, pCustomListGroupItem, E_SYSTEM, "A system error has occurred. Failed to get an item at groupIndex(%d)", groupIndex); + + ArrayList* pList = pCustomListGroupItem->__pCustomListItemImpl->__pSubItemsList; + SysTryReturnResult(NID_UI_CTRL, pList, E_SYSTEM, "A system error has occurred. Failed to get subItem at groupIndex(%d) itemIndex(%d)", groupIndex, itemIndex); + + r = pList->RemoveAt(itemIndex, true); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "A system error has occurred. Failed to remove an item."); + } + + if (updateIndices) + { + return UpdateIndices(groupIndex, itemIndex, -1); + } + else + { + return E_SUCCESS; + } + +} + +result +_ListBaseImpl::SetInItemsList(const CustomListItem& item, int groupIndex, int itemIndex) +{ + result r = E_SUCCESS; + + if (groupIndex == -1) + { + r = _itemsList.SetAt(item, itemIndex, true); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "A system error has occurred. Failed to remove an item."); + } + else if (itemIndex == -1) + { + CustomListItem* pOldItem = GetCustomListItemAt(groupIndex, -1); + SysTryReturnResult(NID_UI_CTRL, pOldItem, E_SYSTEM, "A system error has occurred. Failed to get current item."); + + item.__pCustomListItemImpl->__pTableViewGroupItemData = pOldItem->__pCustomListItemImpl->__pTableViewGroupItemData; + item.__pCustomListItemImpl->__pSubItemsList = pOldItem->__pCustomListItemImpl->__pSubItemsList; + + r = _itemsList.SetAt(item, groupIndex, true); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "A system error has occurred. Failed to remove an item."); + } + else + { + CustomListItem* pCustomListGroupItem = GetCustomListItemAt(groupIndex, -1); + SysTryReturnResult(NID_UI_CTRL, pCustomListGroupItem, E_SYSTEM, "A system error has occurred. Failed to get GroupItem at %d index.", groupIndex); + + ArrayList* pList = pCustomListGroupItem->__pCustomListItemImpl->__pSubItemsList; + SysTryReturnResult(NID_UI_CTRL, pList, E_SYSTEM, "A system error has occurred. Failed to get subItem at groupIndex(%d) itemIndex(%d)", groupIndex, itemIndex); + + pList->SetAt(item, itemIndex, true); + } + + return E_SUCCESS; +} + +void +_ListBaseImpl::RemoveAllFromItemsList(void) +{ + _itemsList.RemoveAll(true); +} + +CustomListItem* +_ListBaseImpl::GetCustomListItemAt(int groupIndex, int itemIndex) +{ + const CustomListItem* pItem = (static_cast(this))->GetCustomListItemAt(groupIndex, itemIndex); + return const_cast(pItem); +} + +const CustomListItem* +_ListBaseImpl::GetCustomListItemAt(int groupIndex, int itemIndex) const +{ + if (groupIndex == -1) + { + CustomListItem* pCustomListItem = dynamic_cast(const_cast(_itemsList.GetAt(itemIndex))); + SysTryReturn(NID_UI_CTRL, pCustomListItem, null, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. itemIndex = %d", itemIndex); + + return pCustomListItem; + } + else if (itemIndex == -1) + { + CustomListItem* pCustomListItem = dynamic_cast(const_cast(_itemsList.GetAt(groupIndex))); + SysTryReturn(NID_UI_CTRL, pCustomListItem, null, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. groupIndex = %d", groupIndex); + + return pCustomListItem; + } + else + { + CustomListItem* pCustomListGroupItem = dynamic_cast(const_cast(_itemsList.GetAt(groupIndex))); + SysTryReturn(NID_UI_CTRL, pCustomListGroupItem, null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get an item at groupIndex(%d)", groupIndex); + + ArrayList* pList = pCustomListGroupItem->__pCustomListItemImpl->__pSubItemsList; + SysTryReturn(NID_UI_CTRL, pList, null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get subItem at groupIndex(%d) itemIndex(%d)", groupIndex, itemIndex); + + CustomListItem* pCustomListItem = dynamic_cast(const_cast(pList->GetAt(itemIndex))); + SysTryReturn(NID_UI_CTRL, pCustomListItem, null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get an item at groupIndex(%d) itemIndex(%d)", groupIndex, itemIndex); + + return pCustomListItem; + } +} + +_TableViewItemData* +_ListBaseImpl::GetTableViewItemAt(int groupIndex, int itemIndex) +{ + const _TableViewItemData* pTableViewItemData = (static_cast(this))->GetTableViewItemAt(groupIndex, itemIndex); + return const_cast<_TableViewItemData*>(pTableViewItemData); +} + +const _TableViewItemData* +_ListBaseImpl::GetTableViewItemAt(int groupIndex, int itemIndex) const +{ + const CustomListItem* pCustomListGroupItem = (static_cast(this))->GetCustomListItemAt(groupIndex, itemIndex); + SysTryReturn(NID_UI_CTRL, pCustomListGroupItem, null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get an item at groupIndex(%d) itemIndex(%d)", groupIndex, itemIndex); + + SysTryReturn(NID_UI_CTRL, pCustomListGroupItem->__pCustomListItemImpl, null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get an item at groupIndex(%d) itemIndex(%d)", groupIndex, itemIndex); + + return pCustomListGroupItem->__pCustomListItemImpl->__pTableViewItemData; +} + +_TableViewGroupItemData* +_ListBaseImpl::GetTableViewGroupItemAt(int groupIndex) +{ + const _TableViewGroupItemData* pTableViewGroupItemData = (static_cast(this))->GetTableViewGroupItemAt(groupIndex); + return const_cast<_TableViewGroupItemData*>(pTableViewGroupItemData); +} + +const _TableViewGroupItemData* +_ListBaseImpl::GetTableViewGroupItemAt(int groupIndex) const +{ + const CustomListItem* pCustomListGroupItem = (static_cast(this))->GetCustomListItemAt(groupIndex, -1); + SysTryReturn(NID_UI_CTRL, pCustomListGroupItem, null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get an item at groupIndex(%d)", groupIndex); + + SysTryReturn(NID_UI_CTRL, pCustomListGroupItem->__pCustomListItemImpl, null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get an item at groupIndex(%d)", groupIndex); + + return pCustomListGroupItem->__pCustomListItemImpl->__pTableViewGroupItemData; +} + +_CheckElementModel* +_ListBaseImpl::GetCheckElementAt(int groupIndex, int itemIndex) +{ + const _CheckElementModel* pCheckElementModel = (static_cast(this))->GetCheckElementAt(groupIndex, itemIndex); + return const_cast<_CheckElementModel*>(pCheckElementModel); +} + +const _CheckElementModel* +_ListBaseImpl::GetCheckElementAt(int groupIndex, int itemIndex) const +{ + const CustomListItem* pCustomListItem = GetCustomListItemAt(groupIndex, itemIndex); + SysTryReturn(NID_UI_CTRL, pCustomListItem, null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get an item at groupIndex(%d), itemIndex(%d)", groupIndex, itemIndex); + + SysTryReturn(NID_UI_CTRL, pCustomListItem->__pCustomListItemImpl, null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get an item at groupIndex(%d), itemIndex(%d)", groupIndex, itemIndex); + + return pCustomListItem->__pCustomListItemImpl->GetCheckElement(); +} + +void +_ListBaseImpl::DrawItem(int groupIndex, int itemIndex) +{ + if (itemIndex == -1) + { + _TableViewGroupItemData* pTableViewGroupItemData = GetTableViewGroupItemAt(groupIndex); + + if (pTableViewGroupItemData) + { + pTableViewGroupItemData->Invalidate(true); + } + } + else + { + _TableViewItemData* pTableViewItemData = GetTableViewItemAt(groupIndex, itemIndex); + + if (pTableViewItemData) + { + pTableViewItemData->Invalidate(true); + } + } +} + +result +_ListBaseImpl::SetListStyle(CustomListStyle style) +{ + result r = E_SUCCESS; + + switch (style) + { + case CUSTOM_LIST_STYLE_NORMAL: + _annexStyle = TABLE_VIEW_ANNEX_STYLE_NORMAL; + break; + + case CUSTOM_LIST_STYLE_RADIO: + _annexStyle = TABLE_VIEW_ANNEX_STYLE_RADIO; + break; + + case CUSTOM_LIST_STYLE_RADIO_WITH_DIVIDER: + _annexStyle = TABLE_VIEW_ANNEX_STYLE_RADIO; + _isDividerEnabled = true; + break; + + case CUSTOM_LIST_STYLE_MARK: + _annexStyle = TABLE_VIEW_ANNEX_STYLE_MARK; + break; + + case CUSTOM_LIST_STYLE_MARK_WITH_DIVIDER: + _annexStyle = TABLE_VIEW_ANNEX_STYLE_MARK; + _isDividerEnabled = true; + break; + + case CUSTOM_LIST_STYLE_ONOFF: + _annexStyle = TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING; + break; + + case CUSTOM_LIST_STYLE_ONOFF_WITH_DIVIDER: + _annexStyle = TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING; + _isDividerEnabled = true; + break; + + default: + SysLog(NID_UI_CTRL, "[E_INVALID_ARG] Invalid argument used. style is invalid."); + r = E_INVALID_ARG; + break; + } + + return r; +} + +_TableView& +_ListBaseImpl::GetCore(void) +{ + return static_cast<_TableView&>(_ControlImpl::GetCore()); +} + +const _TableView& +_ListBaseImpl::GetCore(void) const +{ + return static_cast(_ControlImpl::GetCore()); +} + +void +_ListBaseImpl::SetTextOfEmptyList(const String& text) +{ + if (text.IsEmpty()) + { + if (__pEmptyText != null) + { + GetCore().DetachChild(*__pEmptyText); + + delete __pEmptyText; + __pEmptyText = null; + } + } + else + { + if (__pEmptyText == null) + { + __pEmptyText = _Label::CreateLabelN(); + SysTryReturnVoidResult(NID_UI_CTRL, (__pEmptyText != null), E_SYSTEM, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + __pEmptyText->SetVisibleState(false); + __pEmptyText->SetMargin(0, 0); + + GetCore().AttachChild(*__pEmptyText); + } + + TextObject* pText = new (std::nothrow) TextObject(); + SysTryReturnVoidResult(NID_UI_CTRL, (pText != null), E_OUT_OF_MEMORY, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + pText->Construct(); + + TextSimple* pSimpleText = new (std::nothrow) TextSimple(const_cast (text.GetPointer()), text.GetLength()); + SysTryReturnVoidResult(NID_UI_CTRL, (pSimpleText != null), E_OUT_OF_MEMORY, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + pText->AppendElement(*pSimpleText); + + int textSize = 0; + GET_SHAPE_CONFIG(LIST::EMPTY_LIST_TEXT_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, textSize); + + Font font; + font.Construct(GetFont(), FONT_STYLE_PLAIN, textSize); + pText->SetFont(&font, 0, pText->GetTextLength()); + + FloatDimension listDimension = GetCore().GetSizeF(); + + pText->SetBounds(FloatRectangle(0.0f, 0.0f, listDimension.width, 1.0f)); + pText->Compose(); + + FloatDimension labelDimension = pText->GetTextExtentF(0, pText->GetTextLength()); + labelDimension.height = pText->GetTotalHeightF(); + + if (labelDimension.width > listDimension.width) + { + pText->SetBounds(FloatRectangle(0.0f, 0.0f, listDimension.width, 1.0f)); + pText->Compose(); + + float labelHeight = pText->GetTotalHeightF(); + + labelDimension.width = listDimension.width; + labelDimension.height = ((listDimension.height < labelHeight) ? listDimension.height : labelHeight); + } + + delete pText; + + FloatRectangle bounds = GetCore().GetBoundsF(); + + __pEmptyText->SetBounds(FloatRectangle((bounds.width - labelDimension.width)/2.0f, (bounds.height - labelDimension.height)/2.0f, labelDimension.width, labelDimension.height)); + __pEmptyText->SetBackgroundColor(Color(0, 0, 0, 0)); + __pEmptyText->SetTextColor(__emptyTextColor); + __pEmptyText->SetTextConfig(textSize, LABEL_TEXT_STYLE_NORMAL); + __pEmptyText->SetText(text); + } + + return; +} + +void +_ListBaseImpl::SetTextColorOfEmptyList(const Color& color) +{ + __emptyTextColor = color; + + if (__pEmptyText != null) + { + __pEmptyText->SetTextColor(color); + } + + return; +} + +Color +_ListBaseImpl::GetTextColorOfEmptyList(void) const +{ + return __emptyTextColor; +} + +result +_ListBaseImpl::GetTopDrawnItemIndex(int& groupIndex, int& itemIndex) const +{ + result r = GetCore().GetTopDrawnItemIndex(groupIndex, itemIndex); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +_ListBaseImpl::GetBottomDrawnItemIndex(int& groupIndex, int& itemIndex) const +{ + result r = GetCore().GetBottomDrawnItemIndex(groupIndex, itemIndex); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +_ListBaseImpl::GetItemIndexFromPosition(const Point& position, int& groupIndex, int& itemIndex) const +{ + return GetCore().GetItemIndexFromPosition(position, groupIndex, itemIndex); +} + +int +_ListBaseImpl::GetItemCount(void) const +{ + return _itemsList.GetCount(); +} + +int +_ListBaseImpl::GetGroupCount(void) const +{ + return _itemsList.GetCount(); +} + +int +_ListBaseImpl::GetSubItemCountAt(int groupIndex) const +{ + result r = E_SUCCESS; + + const CustomListItem* pCustomListItem = GetCustomListItemAt(groupIndex, -1); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), -1, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + ArrayList* pList = pCustomListItem->__pCustomListItemImpl->__pSubItemsList; + SysTryReturn(NID_UI_CTRL, pList, 0, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get subItemsList at groupIndex(%d)", groupIndex); + + return pList->GetCount(); +} + +result +_ListBaseImpl::RemoveFromSubItemsList(int groupIndex) +{ + result r = E_SUCCESS; + + const CustomListItem* pCustomListItem = GetCustomListItemAt(groupIndex, -1); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + ArrayList* pList = pCustomListItem->__pCustomListItemImpl->__pSubItemsList; + + if (pList) + { + pList->RemoveAll(); + delete pList; + pCustomListItem->__pCustomListItemImpl->__pSubItemsList = null; + } + + return E_SUCCESS; +} + +void +_ListBaseImpl::OnDraw(void) +{ + _ControlImpl::OnDraw(); + + bool isEmpty = (GetItemCount() <= 0); + + if (__pEmptyText != null) + { + __pEmptyText->SetVisibleState(isEmpty); + } +} + +void +_ListBaseImpl::OnBoundsChanged(void) +{ + GetCore().OnBoundsChanged(); +} + +}}} //Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_ListContextItemImpl.cpp b/src/ui/controls/FUiCtrl_ListContextItemImpl.cpp new file mode 100644 index 0000000..cc3e495 --- /dev/null +++ b/src/ui/controls/FUiCtrl_ListContextItemImpl.cpp @@ -0,0 +1,229 @@ +// +// 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_ListContextItemImpl.cpp + * @brief This is the implementation file for _ListContextItemImpl class. + * + * This file contains the implementation of _ListContextItemImpl class. + */ + +#include +#include +#include "FUi_ResourceManager.h" +#include "FUiCtrl_ListContextItemImpl.h" +#include "FUiCtrl_ListViewContextItem.h" + +#ifdef MEMORY_LEAK_CHECK +#include "mem_leak_check.h" +#endif + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_ListContextItemImpl* +_ListContextItemImpl::GetInstance(ListContextItem& listContextItem) +{ + return listContextItem.__pImpl; +} + +const _ListContextItemImpl* +_ListContextItemImpl::GetInstance(const ListContextItem& listContextItem) +{ + return listContextItem.__pImpl; +} + +_ListContextItemImpl::_ListContextItemImpl(ListContextItem* pPublic) + : __pPublic(pPublic) + , __pContextItem(null) +{ + // nothing +} + +_ListContextItemImpl::~_ListContextItemImpl(void) +{ + if (__pContextItem != null) + { + __pContextItem->Release(); + } +} + +const char* +_ListContextItemImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Controls::ListContextItem"; +} + +const ListContextItem& +_ListContextItemImpl::GetPublic(void) const +{ + return static_cast (*__pPublic); +} + +ListContextItem& +_ListContextItemImpl::GetPublic(void) +{ + return *__pPublic; +} + +_ListContextItemImpl* +_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] Memory allocation failed."); + + r = pImpl->Construct(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return pImpl; + +CATCH: + delete pImpl; + pImpl = null; + + return null; +} + +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] Memory allocation failed."); + + Color bgColor(0, 0, 0, 0); + GET_COLOR_CONFIG(TABLEVIEW::CONTEXTITEM_BG_NORMAL, bgColor); + SetBackgroundColor(bgColor); + + return E_SUCCESS; +} + +result +_ListContextItemImpl::AddElement(int elementId, const String& text, bool enable) +{ + 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, + ("[E_SYSTEM] Unable to add an element.")); + + return E_SUCCESS; +} + +result +_ListContextItemImpl::AddElement(int elementId, const Bitmap& normalBitmap, + const Bitmap& pressedBitmap, const Bitmap* pHighlightedBitmap, bool enable) +{ + 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), + E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Unable to add an element."); + + return E_SUCCESS; +} + +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, 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), + E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Unable to add an element."); + + return E_SUCCESS; +} + +result +_ListContextItemImpl::SetElementBackgroundColor(int elementId, ListContextItemElementStatus status, const Color& backgroundColor) +{ + 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); + + return (ret ? E_SUCCESS : E_INVALID_OPERATION); +} + +Color +_ListContextItemImpl::GetElementBackgroundColor(int elementId, ListContextItemElementStatus status) const +{ + 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); +} + +result +_ListContextItemImpl::SetElementTextColor(int elementId, ListContextItemElementStatus status, const Color& textColor) +{ + 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); + + return (ret ? E_SUCCESS : E_INVALID_OPERATION); +} + +Color +_ListContextItemImpl::GetElementTextColor(int elementId, ListContextItemElementStatus status) const +{ + 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); +} + +Color +_ListContextItemImpl::GetBackgroundColor(void) const +{ + return __pContextItem->GetItemBackgroundColor(LIST_ITEM_STATE_NORMAL); +} + +result +_ListContextItemImpl::SetBackgroundColor(const Color& color) +{ + __pContextItem->SetItemBackgroundColor(LIST_ITEM_STATE_NORMAL, color); + __pContextItem->SetItemBackgroundColor(LIST_ITEM_STATE_PRESSED, color); + __pContextItem->SetItemBackgroundColor(LIST_ITEM_STATE_HIGHLIGHTED, color); + __pContextItem->SetItemChanged(true); + + return E_SUCCESS; +} + +result +_ListContextItemImpl::SetBackgroundBitmap(const Bitmap* pBitmap) +{ + __pContextItem->SetItemBackgroundBitmap(LIST_ITEM_STATE_NORMAL, pBitmap); + __pContextItem->SetItemChanged(true); + + return E_SUCCESS; +} + +_ListViewContextItem* +_ListContextItemImpl::GetContextItem(void) const +{ + return __pContextItem; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_ListImpl.cpp b/src/ui/controls/FUiCtrl_ListImpl.cpp new file mode 100644 index 0000000..8b7c2d7 --- /dev/null +++ b/src/ui/controls/FUiCtrl_ListImpl.cpp @@ -0,0 +1,2149 @@ +// +// 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_ListImpl.cpp + * @brief This is the implementation file for the _ListImpl class. + * + */ + +#include +#include +#include "FUiCtrl_ListImpl.h" +#include "FUiCtrl_ListListener.h" +#include "FUi_ResourceSizeInfo.h" +#include "FUi_UiBuilder.h" +#include "FUi_CoordinateSystemUtils.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Base::Collection; + +namespace Tizen { namespace Ui { namespace Controls +{ + +extern const int INVALID_INDEX; + +_NumberElement::_NumberElement(void) + : index(-1) +{ +} + +_NumberElement::~_NumberElement(void) +{ +} + +_ListItemDataProvider::_ListItemDataProvider(_ListImpl* pListImpl) + : __pListImpl(pListImpl) +{ +} + +_ListItemDataProvider::~_ListItemDataProvider(void) +{ +} + +int +_ListItemDataProvider::GetItemCount(void) +{ + SysTryReturn(NID_UI_CTRL, __pListImpl, -1, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. List instance is null."); + return __pListImpl->GetItemCount(); +} + +TableViewItem* +_ListItemDataProvider::CreateItem(int index, int itemWidth) +{ + SysTryReturn(NID_UI_CTRL, __pListImpl, null, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. List instance is null."); + + CustomListItem* pCustomListItem = __pListImpl->GetCustomListItemAt(-1, index); + SysTryReturn(NID_UI_CTRL, pCustomListItem, null, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get an item at index(%d).", index); + + _CustomListItemImpl* pCustomListItemImpl = null; + pCustomListItemImpl = pCustomListItem->__pCustomListItemImpl; + SysTryReturn(NID_UI_CTRL, pCustomListItemImpl, null, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. _CustomListItemImpl instance is null."); + + int height = __pListImpl->__row1Height + __pListImpl->__row2Height; + pCustomListItemImpl->height = height; + + _TableViewItemParams tableViewItemParams; + tableViewItemParams.pItem = (const_cast(pCustomListItem)); + tableViewItemParams.width = itemWidth; + tableViewItemParams.itemId = pCustomListItemImpl->itemId; + tableViewItemParams.itemIndex = index; + tableViewItemParams.groupIndex = -1; + tableViewItemParams.isDividerEnabled = __pListImpl->_isDividerEnabled; + tableViewItemParams.pCheckBitmaps = __pListImpl->_pCheckBitmaps; + tableViewItemParams.annexStyle = __pListImpl->_annexStyle; + + result r = _CustomListItemImpl::CreateTableViewItem(tableViewItemParams); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + pCustomListItemImpl->__pTableViewItemData->AddTouchEventListener(*__pListImpl); + + return pCustomListItemImpl->__pTableViewItemData; +} + +bool +_ListItemDataProvider::DeleteItem(const int itemIndex, TableViewItem* pItem) +{ + delete pItem; + + if (__pListImpl->__directDelete == false) + { + CustomListItem* pCustomListItem = __pListImpl->GetCustomListItemAt(-1, itemIndex); + pCustomListItem->__pCustomListItemImpl->__pTableViewItemData = null; + } + + return true; +} + +int +_ListItemDataProvider::GetDefaultItemHeight(void) +{ + SysTryReturn(NID_UI_CTRL, __pListImpl, 0, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. List instance is null."); + return (__pListImpl->__row1Height + __pListImpl->__row2Height); +} + +void +_ListItemDataProvider::UpdateItem(int itemIndex, TableViewItem* pItem) +{ + SysTryReturnVoidResult(NID_UI_CTRL, __pListImpl, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. List instance is null."); + CustomListItem* pCustomListItem = __pListImpl->GetCustomListItemAt(-1, itemIndex); + SysTryReturnVoidResult(NID_UI_CTRL, pCustomListItem, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get an item at index(%d).", itemIndex); + + _CustomListItemImpl* pCustomListItemImpl = null; + pCustomListItemImpl = pCustomListItem->__pCustomListItemImpl; + SysTryReturnVoidResult(NID_UI_CTRL, pCustomListItemImpl, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. _CustomListItemImpl instance is null."); + + int height = __pListImpl->__row1Height + __pListImpl->__row2Height; + pCustomListItemImpl->height = height; + + FloatRectangle rect = pItem->GetBoundsF(); + pItem->SetSize(FloatDimension(rect.width, height)); +} + +result +_NumberElement::DrawElement(const Canvas& canvas, const Rectangle& rect, CustomListItemStatus itemStatus) +{ + String text; + text.Append(index); + + Canvas* pCanvas = const_cast(&canvas); + SysTryReturnResult(NID_UI_CTRL, (pCanvas != null), E_SYSTEM, + "A system error has occurred. Failed to get the canvas."); + + pCanvas->FillRectangle(Color::GetColor(COLOR_ID_MAGENTA), _CoordinateSystemUtils::ConvertToFloat(rect)); + pCanvas->SetForegroundColor(Color::GetColor(COLOR_ID_WHITE)); + + Font font; + + font.Construct(FONT_STYLE_PLAIN, 18.0f); + pCanvas->SetFont(font); + + if (pCanvas->DrawText(FloatPoint(rect.x + 5.0f, rect.y + 5.0f), String(text)) != E_SUCCESS) + { + return E_SYSTEM; + } + + return E_SUCCESS; +} + +_ListImpl* +_ListImpl::GetInstance(List& list) +{ + return static_cast<_ListImpl*>(list._pControlImpl); +} + +const _ListImpl* +_ListImpl::GetInstance(const List& list) +{ + return static_cast(list._pControlImpl); +} + +_ListImpl::_ListImpl(Control* pList, _TableView* pCore) + : _ListBaseImpl(pList, pCore) + , __row1Height(-1) + , __row2Height(-1) + , __column1Width(-1) + , __column2Width(-1) + , __text1SlideEnabled(true) + , __text2SlideEnabled(true) + , __listStyle(LIST_STYLE_NORMAL) + , __listItemFormat(LIST_ITEM_SINGLE_IMAGE) + , __pNormalBgBitmap(null) + , __pHighlightedBgBitmap(null) + , __pFocusedBgBitmap(null) + , __pNumberElements(null) + , __pItemFormat(null) + , __pItemProvider(null) + , __maxCount(0) + , __isCheckStyle(true) + , __directDelete(false) +{ +} + +_ListImpl::~_ListImpl(void) +{ + __itemListeners.RemoveAll(true); + + if (__pNumberElements != null) + { + __pNumberElements->RemoveAll(true); + delete __pNumberElements; + __pNumberElements = null; + } + + if (__pItemFormat != null) + { + delete __pItemFormat; + __pItemFormat = null; + } + + if (__pItemProvider) + { + delete __pItemProvider; + __pItemProvider = null; + } + + RemoveAllFromItemsList(); +} + +const char* +_ListImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Controls::List"; +} + +const List& +_ListImpl::GetPublic(void) const +{ + return static_cast(_ControlImpl::GetPublic()); +} + +List& +_ListImpl::GetPublic(void) +{ + return static_cast(_ControlImpl::GetPublic()); +} + +const _TableView& +_ListImpl::GetCore(void) const +{ + return static_cast(_ControlImpl::GetCore()); +} + +_TableView& +_ListImpl::GetCore(void) +{ + return static_cast<_TableView&>(_ControlImpl::GetCore()); +} + +_ListImpl* +_ListImpl::CreateListImplN(List* pControl, const Rectangle& bounds) +{ + result r = E_SUCCESS; + + r = GET_SIZE_INFO(List).CheckInitialSizeValidF(FloatDimension(bounds.width, bounds.height), _CONTROL_ORIENTATION_PORTRAIT); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + _TableView* pCore = null; + _ListImpl* pImpl = null; + + pCore = _TableView::CreateTableViewN(TABLE_VIEW_STYLE_SIMPLE, true, TABLE_VIEW_SCROLL_BAR_STYLE_FIXED); + + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pCore, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + pImpl = new (std::nothrow) _ListImpl(pControl, pCore); + SysTryCatch(NID_UI_CTRL, pImpl, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + ClearLastResult(); + + return pImpl; + +CATCH: + delete pCore; + return null; +} + +result +_ListImpl::Initialize(ListItemFormat itemFormat, int row1Height, int row2Height, int column1Width, int column2Width) +{ + result r = E_SUCCESS; + + GET_FIXED_VALUE_CONFIG(LIST::LIST_ITEM_MAX_COUNT, GetCore().GetOrientation(), __maxCount); + + __pItemProvider = new (std::nothrow) _ListItemDataProvider(this); + SysTryReturnResult(NID_UI_CTRL, (__pItemProvider != null), E_OUT_OF_MEMORY, "Memory allocation failed."); + + TableViewStyle style = GetCore().GetTableViewStyle(); + SysTryReturn(NID_UI_CTRL, style == TABLE_VIEW_STYLE_SIMPLE, E_INVALID_OPERATION, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The current style of TableView is not TABLE_VIEW_STYLE_SIMPLE"); + + _TableViewItemProvider* pItemProvider = _TableViewItemProvider::CreateTableViewItemProviderN(style); + SysTryReturn(NID_UI_CTRL, pItemProvider != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = pItemProvider->SetSimpleStyleItemProvider(__pItemProvider); + + if (r != E_SUCCESS) + { + delete pItemProvider; + SysTryReturn(NID_UI_CTRL, false, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + r = GetCore().SetItemProvider(pItemProvider); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GetCore().AddTableViewItemEventListener(*this); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + SetListItemFormat(itemFormat); + + r = InitializeItemSizes(row1Height, row2Height, column1Width, column2Width); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = InitCustomListItemFormat(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +_ListImpl::InitializeItemSizes(int row1Height, int row2Height, int column1Width, int column2Width) +{ + result r = E_SUCCESS; + + r = SetRow1Height(row1Height); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = SetRow2Height(row2Height); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = SetColumn1Width(column1Width); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = SetColumn2Width(column2Width); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +_ListImpl::UpdateBounds(const Rectangle& rect) +{ + result r = E_SUCCESS; + + r = InitializeBoundsPropertiesF(GET_SIZE_INFO(CustomList), _CoordinateSystemUtils::ConvertToFloat(rect), GetCore().GetOrientation()); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +_ListImpl::SetStyle(ListStyle style) +{ + __listStyle = style; + result r = E_SUCCESS; + + switch (style) + { + case LIST_STYLE_NORMAL: + case LIST_STYLE_NUMBER: + __isCheckStyle = false; + _annexStyle = TABLE_VIEW_ANNEX_STYLE_NORMAL; + break; + + case LIST_STYLE_RADIO_WITH_DIVIDER: + _isDividerEnabled = true; + _annexStyle = TABLE_VIEW_ANNEX_STYLE_RADIO; + break; + + case LIST_STYLE_RADIO: + _annexStyle = TABLE_VIEW_ANNEX_STYLE_RADIO; + break; + + case LIST_STYLE_MARK_WITH_DIVIDER: + _isDividerEnabled = true; + _annexStyle = TABLE_VIEW_ANNEX_STYLE_MARK; + break; + + case LIST_STYLE_MARK: + _annexStyle = TABLE_VIEW_ANNEX_STYLE_MARK; + break; + + case LIST_STYLE_ONOFF_WITH_DIVIDER: + _isDividerEnabled = true; + _annexStyle = TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING; + break; + + case LIST_STYLE_ONOFF: + _annexStyle = TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING; + break; + + default: + r = E_INVALID_ARG; + break; + } + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "The current value of List style is invalid."); + + if ((style == LIST_STYLE_NUMBER) && (__pNumberElements == null)) + { + __pNumberElements = new (std::nothrow) LinkedList(); + SysTryReturnResult(NID_UI_CTRL, __pNumberElements, E_OUT_OF_MEMORY, "Memory allocation failed."); + } + + return E_SUCCESS; + +} + +void +_ListImpl::SetListItemFormat(ListItemFormat itemFormat) +{ + __listItemFormat = itemFormat; + return; +} + +result +_ListImpl::InitCustomListItemFormat(void) +{ + __pItemFormat = new (std::nothrow) CustomListItemFormat(); + SysTryReturnResult(NID_UI_CTRL, (__pItemFormat != null), E_OUT_OF_MEMORY, "Memory allocation failed."); + + __pItemFormat->Construct(); + + Rectangle text1Rect; + Rectangle text2Rect; + Rectangle img1Rect; + Rectangle img2Rect; + GetElementRects(text1Rect, text2Rect, img1Rect, img2Rect); + + int textSize = 0; + int listStyleNumberX = 0; + int listStyleNumberWidth = 0; + int listStyleNumberHeight = 0; + int checkItemWidth = 0; + int checkItemHeight = 0; + + GET_SHAPE_CONFIG(LIST::LIST_ITEM_TEXT_SIZE, GetCore().GetOrientation(), textSize); + + GET_SHAPE_CONFIG(LIST::LIST_STYLE_NUMBER_X, GetCore().GetOrientation(), listStyleNumberX); + GET_SHAPE_CONFIG(LIST::LIST_STYLE_NUMBER_WIDTH, GetCore().GetOrientation(), listStyleNumberWidth); + GET_SHAPE_CONFIG(LIST::LIST_STYLE_NUMBER_HEIGHT, GetCore().GetOrientation(), listStyleNumberHeight); + + GET_SHAPE_CONFIG(LIST::LIST_CHECK_ITEM_WIDTH, GetCore().GetOrientation(), checkItemWidth); + GET_SHAPE_CONFIG(LIST::LIST_CHECK_ITEM_HEIGHT, GetCore().GetOrientation(), checkItemHeight); + + if (__listItemFormat != LIST_ITEM_SINGLE_IMAGE) + { + GET_COLOR_CONFIG(LIST::ELEMENT_TEXT_NORMAL, __text1Color); + } + if (__listItemFormat > LIST_ITEM_SINGLE_IMAGE_TEXT_IMAGE) + { + GET_COLOR_CONFIG(LIST::ELEMENT_TEXT_NORMAL, __text2Color); + } + + if (text1Rect.x > 0) + { + __pItemFormat->AddElement(ID_FORMAT_TEXT1, text1Rect); + __pItemFormat->SetElementEventEnabled(ID_FORMAT_TEXT1, false); + } + + if (img1Rect.x > 0) + { + __pItemFormat->AddElement(ID_FORMAT_IMAGE1, img1Rect); + __pItemFormat->SetElementEventEnabled(ID_FORMAT_IMAGE1, false); + } + + if (text2Rect.x > 0) + { + __pItemFormat->AddElement(ID_FORMAT_TEXT2, text2Rect); + __pItemFormat->SetElementEventEnabled(ID_FORMAT_TEXT2, false); + } + + if (img2Rect.x > 0) + { + __pItemFormat->AddElement(ID_FORMAT_IMAGE2, img2Rect); + __pItemFormat->SetElementEventEnabled(ID_FORMAT_IMAGE2, false); + } + + if (__listStyle == LIST_STYLE_NUMBER) + { + __pItemFormat->AddElement(ID_FORMAT_NUMBER, Rectangle(listStyleNumberX, GetItemHeight()/2 - 15, listStyleNumberWidth, listStyleNumberHeight)); + __pItemFormat->SetElementEventEnabled(ID_FORMAT_NUMBER, false); + } + + if (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL) + { + __pItemFormat->AddElement(ID_FORMAT_CHECK, Rectangle(GetCore().GetBounds().width - 60, GetItemHeight() / 2 - 25, checkItemWidth , checkItemHeight)); + __pItemFormat->SetElementEventEnabled(ID_FORMAT_CHECK, true); + } + + return E_SUCCESS; +} + +bool +_ListImpl::GetTextSlide(ListItemText textIndex) +{ + switch (textIndex) + { + case LIST_ITEM_TEXT1: + return __text1SlideEnabled; + + case LIST_ITEM_TEXT2: + return __text2SlideEnabled; + + default: + SysTryReturn(NID_UI_CTRL, false, false, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. The ListItemText is invalid."); + } +} + +result +_ListImpl::AddItemEventListener(const IItemEventListener& listener) +{ + _ListListener* pListListener = new (std::nothrow) _ListListener; + SysTryReturn(NID_UI_CTRL, pListListener, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pListListener->pListener = const_cast(&listener); + __itemListeners.Add(*pListListener); + + return E_SUCCESS; +} + +result +_ListImpl::RemoveItemEventListener(const IItemEventListener& listener) +{ + _ListListener* pListListener = null; + result r = E_SYSTEM; + int count = __itemListeners.GetCount(); + + for (int listenerCount = 0; listenerCount < count; listenerCount++) + { + pListListener = dynamic_cast<_ListListener*>(__itemListeners.GetAt(listenerCount)); + + if ((pListListener != null) && (pListListener->pListener == &listener)) + { + r = E_SUCCESS; + __itemListeners.RemoveAt(listenerCount, true); + break; + } + } + + return r; +} + +result +_ListImpl::AddItem(const String* pText1, const String* pText2, + const Bitmap* pBitmap1, const Bitmap* pBitmap2, int itemId) +{ + if (__listStyle == LIST_STYLE_NUMBER) + { + SysTryReturnResult(NID_UI_CTRL, (GetItemCount() < __maxCount), + E_MAX_EXCEEDED, "AddItem operation exceeds the maximum limit for this list style"); + } + + return InsertItemAt(GetItemCount(), pText1, pText2, pBitmap1, pBitmap2, itemId); +} + +result +_ListImpl::InsertItemAt(int index, const String* pText1, const String* pText2, + const Bitmap* pBitmap1, const Bitmap* pBitmap2, int itemId) +{ + result r = E_SUCCESS; + + if (__listStyle == LIST_STYLE_NUMBER) + { + SysTryReturnResult(NID_UI_CTRL, (GetItemCount() < __maxCount), + E_MAX_EXCEEDED, "InsertItemAt operation exceeds the maximum limit for this list style"); + } + + 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); + SysTryReturnResult(NID_UI_CTRL, pItem, GetLastResult(), + "A system error has occurred. CustomListItem instance is null."); + + r = InsertIntoItemsList(*pItem, -1, index); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] Failed to insert an item.", GetErrorMessage(r)); + + if (GetCore().GetFirstDrawnFlag() == false) + { + r = GetCore().RefreshTableView(0, index, TABLE_VIEW_REFRESH_TYPE_ITEM_ADD); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] Propagating.",GetErrorMessage(r)); + } + + if (__listStyle == LIST_STYLE_NUMBER) + { + r = UpdateNumbers(index); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to update the numbers"); + } + GetCore().Draw(); + + return E_SUCCESS; + +CATCH: + RemoveFromItemsList(-1, index); + + if (__listStyle == LIST_STYLE_NUMBER) + { + __pNumberElements->RemoveAt(index, true); + } + return E_SYSTEM; +} + +result +_ListImpl::SetItemAt(int index, const String* pText1, const String* pText2, + const Bitmap* pBitmap1, const Bitmap* pBitmap2, int itemId) +{ + result r = E_SUCCESS; + SysTryReturnResult(NID_UI_CTRL, (index >= 0 && index < GetItemCount()), + E_OUT_OF_RANGE, "The index(%d) is out of range.", index); + + if (__listStyle == LIST_STYLE_NUMBER) + { + __pNumberElements->RemoveAt(index, true); + } + + CustomListItem* pItem = GetNewItemN(pText1, pText2, pBitmap1, pBitmap2, itemId, index); + SysTryReturnResult(NID_UI_CTRL, pItem, GetLastResult(), + "A system error has occurred. CustomListItem instance is null."); + + pItem->__pCustomListItemImpl->__pTableViewItemData = GetTableViewItemAt(-1, index); + + _CheckElementModel* pCheckElement = null; + _CheckElementModel* pOldCheckElement = GetCheckElementAt(-1, index); + _CheckBoxStatus oldCheckStatus = (pOldCheckElement) ? (pOldCheckElement->GetCheckBoxStatus()) : CHECK_BOX_UNCHECKED; + + pItem->__pCustomListItemImpl->itemId = itemId; + + pCheckElement = GetCheckElementAt(-1, index); + + if (pCheckElement) + { + pCheckElement->SetCheckBoxStatus(oldCheckStatus); + } + + r = SetInItemsList(*pItem, -1, index); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Failed to perform SetAt operation.", GetErrorMessage(r)); + + _TableViewItemUpdateParams updateParams; + updateParams.pItem = const_cast(pItem); + updateParams.isDividerEnabled = _isDividerEnabled; + updateParams.pCheckBitmaps = _pCheckBitmaps; + updateParams.annexStyle = _annexStyle; + + r = _CustomListItemImpl::UpdateTableViewItem(updateParams); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), false, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to refresh an item."); + + if (GetCore().GetFirstDrawnFlag() == false) + { + r = GetCore().RefreshTableView(0, index, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] Propagating.",GetErrorMessage(r)); + } + + r = GetCore().SetItemEnabled(0, index, true); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, + "A system error has occurred. Failed to enable an item."); + + return r; +} + +result +_ListImpl::RemoveItemAt(int index) +{ + result r = E_SUCCESS; + int groupIndex = 0; + SysTryReturnResult(NID_UI_CTRL, (index >= 0 && index < GetItemCount()), + E_OUT_OF_RANGE, "The index(%d) is out of range.", index); + + r = RemoveFromItemsList(-1, index); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, "Failed to perform RemoveAt operation"); + + __directDelete = true; + + if (GetCore().GetFirstDrawnFlag() == false) + { + r = GetCore().RefreshTableView(groupIndex, index, TABLE_VIEW_REFRESH_TYPE_ITEM_REMOVE); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "Propagating."); + } + + __directDelete = false; + + if (__listStyle == LIST_STYLE_NUMBER) + { + __pNumberElements->RemoveAt(index, true); + r = UpdateNumbers(index - 1); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Failed to perform UpdateNumbers", GetErrorMessage(r)); + } + + GetCore().Draw(); + + return r; +} + +result +_ListImpl::RemoveAllItems(void) +{ + result r = E_SUCCESS; + int count = GetItemCount(); + int itemIndex = 0; + + result finalResult = E_SUCCESS; + + for (itemIndex = count - 1; itemIndex >= 0; itemIndex--) + { + r = RemoveItemAt(itemIndex); + if (r != E_SUCCESS) + { + finalResult = r; + SysLog(NID_UI_CTRL, "[%s] Failed to remove item at index(%d)", GetErrorMessage(r), itemIndex); + } + } + + return finalResult; +} + +result +_ListImpl::SetItemEnabled(int index, bool enable) +{ + result r = E_SUCCESS; + + SysTryReturnResult(NID_UI_CTRL, (index >= 0 && index < GetItemCount()), E_SYSTEM, + "A system error has occurred. The current value of index(%d) is invalid.", index); + + r = GetCore().SetItemEnabled(0, index, enable); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + DrawItem(-1, index); + + return r; +} + +bool +_ListImpl::IsItemEnabled(int index) const +{ + return GetCore().IsItemEnabled(0, index); +} + +void +_ListImpl::SetFocusedItemBackgroundBitmap(const Bitmap& bitmap) +{ + __pFocusedBgBitmap = const_cast(&bitmap); + SysTryReturnVoidResult(NID_UI_CTRL, __pFocusedBgBitmap, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get the Bitmap"); + SetBitmap(TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED, bitmap); + + return; +} + +void +_ListImpl::SetHighlightedItemBackgroundBitmap(const Bitmap& bitmap) +{ + __pHighlightedBgBitmap = const_cast(&bitmap); + SysTryReturnVoidResult(NID_UI_CTRL, __pHighlightedBgBitmap, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get the Bitmap"); + SetBitmap(TABLE_VIEW_ITEM_DRAWING_STATUS_HIGHLIGHTED, bitmap); + + return; +} + +void +_ListImpl::SetNormalItemBackgroundBitmap(const Bitmap& bitmap) +{ + __pNormalBgBitmap = const_cast(&bitmap); + SysTryReturnVoidResult(NID_UI_CTRL, __pNormalBgBitmap, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get the Bitmap"); + SetBitmap(TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL, bitmap); + + return; +} + +void +_ListImpl::SetItemTextColor(ListItemText textIndex, const Color& textColor) +{ + int elementId = -1; + + SysTryReturnVoidResult(NID_UI_CTRL, (__listItemFormat != LIST_ITEM_SINGLE_IMAGE), E_SYSTEM, + "[E_SYSTEM] A system error has occurred. The current value of ListItemFormat is invalid."); + + switch (textIndex) + { + case LIST_ITEM_TEXT1: + __text1Color.SetRGB32(textColor.GetRGB32(), textColor.GetAlpha()); + elementId = ID_FORMAT_TEXT1; + break; + + case LIST_ITEM_TEXT2: + SysTryReturnVoidResult(NID_UI_CTRL, (__listItemFormat > LIST_ITEM_SINGLE_IMAGE_TEXT_IMAGE), E_SYSTEM, + "[E_SYSTEM] A system error has occurred. The current value of ListItemFormat is invalid."); + __text2Color.SetRGB32(textColor.GetRGB32(), textColor.GetAlpha()); + elementId = ID_FORMAT_TEXT2; + break; + + default: + SysTryReturnVoidResult(NID_UI_CTRL, (false), E_SYSTEM, + "[E_SYSTEM] A system error has occurred. The current value of ListItemText is invalid."); + } + + Rectangle text1Rect; + Rectangle text2Rect; + Rectangle img1Rect; + Rectangle img2Rect; + + GetElementRects(text1Rect, text2Rect, img1Rect, img2Rect); + + switch (textIndex) + { + case LIST_ITEM_TEXT1: + __pItemFormat->AddElement(elementId, text1Rect, 38, __text1Color, __text1Color, __text1Color); + break; + + case LIST_ITEM_TEXT2: + __pItemFormat->AddElement(elementId, text2Rect, 38, __text2Color, __text2Color, __text2Color); + break; + } + + int count = GetItemCount(); + for (int index = 0; index < count; index++) + { + Refresh(index); + } + + return; +} + +Color +_ListImpl::GetItemTextColor(ListItemText textIndex) const +{ + if (textIndex == LIST_ITEM_TEXT1) + { + return __text1Color; + } + else if(textIndex == LIST_ITEM_TEXT2) + { + return __text2Color; + } + else + { + SysLog(NID_UI_CTRL, "[E_SYSTEM] A system error has occurred. The current value of ListItemText is invalid."); + } + + return Color(); +} + +void +_ListImpl::EnableTextSlide(ListItemText textIndex) +{ + int elementId = -1; + switch (textIndex) + { + case LIST_ITEM_TEXT1: + __text1SlideEnabled = true; + elementId = ID_FORMAT_TEXT1; + break; + + case LIST_ITEM_TEXT2: + __text2SlideEnabled = true; + elementId = ID_FORMAT_TEXT2; + break; + + default: + break; + } + SysTryReturnVoidResult(NID_UI_CTRL, (elementId != -1), E_SYSTEM, + "[E_SYSTEM] A system error has occurred. The ListItemText is invalid."); + + int maxCount = GetItemCount(); + + for (int itemCount = 0; itemCount < maxCount; itemCount++) + { + CustomListItem* pItem = GetCustomListItemAt(-1, itemCount); + 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; + SysTryReturnVoidResult(NID_UI_CTRL, (pItemImpl), E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get item at %d.", itemCount); + + pItemImpl->SetTextSliding(elementId, true); + } + + return; +} + +void +_ListImpl::DisableTextSlide(void) +{ + __text1SlideEnabled = false; + __text2SlideEnabled = false; + + int maxCount = GetItemCount(); + + for (int itemCount = 0; itemCount < maxCount; itemCount++) + { + CustomListItem* pItem = GetCustomListItemAt(-1, itemCount); + 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; + SysTryReturnVoidResult(NID_UI_CTRL, (pItemImpl), E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get item at %d.", itemCount); + + pItemImpl->SetTextSliding(ID_FORMAT_TEXT1, false); + pItemImpl->SetTextSliding(ID_FORMAT_TEXT2, false); + } + + return; +} + +int +_ListImpl::GetItemHeight(void) const +{ + if (__listItemFormat < LIST_ITEM_DOUBLE_IMAGE_TEXT_FULLTEXT) + { + return __row1Height; + } + + return __row1Height + __row2Height; +} + +int +_ListImpl::GetRow1Height(void) const +{ + return __row1Height; +} + +int +_ListImpl::GetRow2Height(void) const +{ + return __row2Height; +} + +int +_ListImpl::GetColumn1Width(void) const +{ + return __column1Width; +} + +int +_ListImpl::GetColumn2Width(void) const +{ + return __column2Width; +} + +result +_ListImpl::SetRow1Height(int row1Height) +{ + __row1Height = row1Height; + if (GetCore().GetFirstDrawnFlag() == false) + { + return ReDrawList(); + } + + return E_SUCCESS; +} + +result +_ListImpl::SetRow2Height(int row2Height) +{ + if (__listItemFormat < LIST_ITEM_DOUBLE_IMAGE_TEXT_FULLTEXT) + { + __row2Height = 0; + } + else + { + __row2Height = row2Height; + if (GetCore().GetFirstDrawnFlag() == false) + { + return ReDrawList(); + } + } + + return E_SUCCESS; +} + +result +_ListImpl::SetColumn1Width(int column1Width) +{ + __column1Width = column1Width; + if (GetCore().GetFirstDrawnFlag() == false) + { + return ReDrawList(); + } + + return E_SUCCESS; +} + +result +_ListImpl::SetColumn2Width(int column2Width) +{ + __column2Width = column2Width; + if (GetCore().GetFirstDrawnFlag() == false) + { + return ReDrawList(); + } + + return E_SUCCESS; +} + + +result +_ListImpl::SetItemChecked(int index, bool check) +{ + SysTryReturnResult(NID_UI_CTRL, (index >= 0 && index < GetItemCount()), E_SYSTEM, + "A system error has occurred. The current value of index(%d) is invalid.", index); + + SysTryReturnResult(NID_UI_CTRL, (__listStyle != LIST_STYLE_NORMAL), E_SYSTEM, + "A system error has occurred. List style should not be LIST_STYLE_NORMAL"); + SysTryReturnResult(NID_UI_CTRL, (__listStyle != LIST_STYLE_NUMBER), E_SYSTEM, + "A system error has occurred. List style should not be LIST_STYLE_NUMBER"); + + if (IsItemChecked(index) == check) + { + return E_SUCCESS; + } + + SysTryReturnResult(NID_UI_CTRL, (IsItemEnabled(index)), E_SYSTEM, + "A system error has occurred. The List item is not enabled at index(%d).", index); + + _CheckElementModel* pCheckElementModel = GetCheckElementAt(-1, index); + SysTryReturnResult(NID_UI_CTRL, pCheckElementModel, E_SYSTEM, + "A system error has occurred. _CheckElementModel instance is null."); + + if (_annexStyle == TABLE_VIEW_ANNEX_STYLE_RADIO) + { + if (check) + { + if (_currentRadioIndex != -1) + { + _CheckElementModel* pOldCheckElementModel = GetCheckElementAt(-1, _currentRadioIndex); + SysTryReturnResult(NID_UI_CTRL, pOldCheckElementModel, E_SYSTEM, + "A system error has occurred. _CheckElementModel instance is null."); + + pOldCheckElementModel->SetCheckBoxStatus(CHECK_BOX_UNCHECKED); + DrawItem(-1, _currentRadioIndex); + } + _currentRadioIndex = index; + } + else + { + _currentRadioIndex = -1; + } + } + + pCheckElementModel->SetCheckBoxStatus((_CheckBoxBitmapType)check); + + DrawItem(-1, index); + + return E_SUCCESS; +} + +bool +_ListImpl::IsItemChecked(int index) const +{ + SysTryReturn(NID_UI_CTRL, (__listStyle != LIST_STYLE_NORMAL), false, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. List style should not be LIST_STYLE_NORMAL."); + SysTryReturn(NID_UI_CTRL, (__listStyle != LIST_STYLE_NUMBER), false, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. List style should not be LIST_STYLE_NUMBER."); + + SysTryReturn(NID_UI_CTRL, (index >= 0 && index < GetItemCount()), + false, E_INVALID_ARG, "[E_INVALID_ARG] The current value of index(%d) is invalid.", index); + + const _CheckElementModel* pCheckElement = GetCheckElementAt(-1, index); + SysTryReturn(NID_UI_CTRL, pCheckElement, false, E_SYSTEM, "[E_SYSTEM] A system error has occurred. CheckElement is not constructed properly."); + + return (bool)pCheckElement->GetCheckBoxStatus(); +} + +result +_ListImpl::SetAllItemsChecked(bool check) +{ + SysTryReturnResult(NID_UI_CTRL, (__listStyle != LIST_STYLE_NORMAL), E_SYSTEM, + "A system error has occurred. List style should not be LIST_STYLE_NORMAL"); + SysTryReturnResult(NID_UI_CTRL, (__listStyle != LIST_STYLE_NUMBER), E_SYSTEM, + "A system error has occurred. List style should not be LIST_STYLE_NUMBER"); + SysTryReturnResult(NID_UI_CTRL, (__listStyle != LIST_STYLE_RADIO), E_SYSTEM, + "A system error has occurred. List style should not be LIST_STYLE_RADIO"); + SysTryReturnResult(NID_UI_CTRL, (__listStyle != LIST_STYLE_RADIO_WITH_DIVIDER), E_SYSTEM, + "A system error has occurred. List style should not be LIST_STYLE_RADIO_WITH_DIVIDER"); + + _CheckElementModel* pCheckElement = null; + + for (int index = 0; index < GetItemCount(); index++) + { + if (IsItemEnabled(index)) + { + pCheckElement = GetCheckElementAt(-1, index); + SysTryReturnResult(NID_UI_CTRL, (pCheckElement != null), E_SYSTEM, + "A system error has occurred. _CheckElementModel instance is null."); + + pCheckElement->SetCheckBoxStatus((_CheckBoxBitmapType)check); + } + } + + GetCore().Draw(); + + return E_SUCCESS; +} + +result +_ListImpl::RemoveAllCheckedItems(void) +{ + SysTryReturnResult(NID_UI_CTRL, (__listStyle != LIST_STYLE_NORMAL), E_SYSTEM, + "A system error has occurred. List style should not be LIST_STYLE_NORMAL"); + SysTryReturnResult(NID_UI_CTRL, (__listStyle != LIST_STYLE_NUMBER), E_SYSTEM, + "A system error has occurred. List style should not be LIST_STYLE_NUMBER"); + SysTryReturnResult(NID_UI_CTRL, (__listStyle != LIST_STYLE_RADIO), E_SYSTEM, + "A system error has occurred. List style should not be LIST_STYLE_RADIO"); + SysTryReturnResult(NID_UI_CTRL, (__listStyle != LIST_STYLE_RADIO_WITH_DIVIDER), E_SYSTEM, + "A system error has occurred. List style should not be LIST_STYLE_RADIO_WITH_DIVIDER"); + + result r = E_SUCCESS; + result finalResult = E_SUCCESS; + + for (int index = GetItemCount() -1; index >= 0; index--) + { + if (IsItemChecked(index)) + { + r = RemoveItemAt(index); + + if (r != E_SUCCESS) + { + finalResult = r; + SysLog(NID_UI_CTRL, "[%s] Item at index(%d) is not removed successfully.", GetErrorMessage(r), index); + } + } + } + + return finalResult; +} + +int +_ListImpl::GetFirstCheckedItemIndex(void) const +{ + SysTryReturn(NID_UI_CTRL, (__listStyle != LIST_STYLE_NORMAL), INVALID_INDEX, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. List style should not be LIST_STYLE_NORMAL."); + SysTryReturn(NID_UI_CTRL, (__listStyle != LIST_STYLE_NUMBER), INVALID_INDEX, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. List style should not be LIST_STYLE_NUMBER."); + + for (int index = 0; index < GetItemCount(); index++) + { + if (IsItemChecked(index)) + { + SetLastResult(E_SUCCESS); + return index; + } + } + SetLastResult(E_SUCCESS); + return INVALID_INDEX; +} + +int +_ListImpl::GetLastCheckedItemIndex(void) const +{ + SysTryReturn(NID_UI_CTRL, (__listStyle != LIST_STYLE_NORMAL), INVALID_INDEX, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. List style should not be LIST_STYLE_NORMAL."); + SysTryReturn(NID_UI_CTRL, (__listStyle != LIST_STYLE_NUMBER), INVALID_INDEX, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. List style should not be LIST_STYLE_NUMBER."); + + for (int index = GetItemCount() - 1; index >= 0; index--) + { + if (IsItemChecked(index)) + { + SetLastResult(E_SUCCESS); + return index; + } + } + SetLastResult(E_SUCCESS); + + return INVALID_INDEX; +} + +int +_ListImpl::GetNextCheckedItemIndexAfter(int index) const +{ + SysTryReturn(NID_UI_CTRL, (__listStyle != LIST_STYLE_NORMAL), INVALID_INDEX, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. List style should not be LIST_STYLE_NORMAL."); + SysTryReturn(NID_UI_CTRL, (__listStyle != LIST_STYLE_NUMBER), INVALID_INDEX, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. List style should not be LIST_STYLE_NUMBER."); + + SysTryReturn(NID_UI_CTRL, (index >= 0 && index < GetItemCount()), INVALID_INDEX, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. The current value of index(%d) is invalid.") ; + + for (int itemCount = index + 1; itemCount < GetItemCount(); itemCount++) + { + if (IsItemChecked(itemCount)) + { + SetLastResult(E_SUCCESS); + return itemCount; + } + } + SetLastResult(E_SUCCESS); + + return INVALID_INDEX; +} + +int +_ListImpl::GetItemIndexFromItemId(int itemId) const +{ + for (int index = 0; index < GetItemCount(); index++) + { + const CustomListItem* pCustomListItem = GetCustomListItemAt(-1, index); + SysTryReturn(NID_UI_CTRL, pCustomListItem, INVALID_INDEX, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get an item at index(%d).", index); + + if (pCustomListItem->__pCustomListItemImpl->itemId == itemId) + { + SetLastResult(E_SUCCESS); + return index; + } + } + + SetLastResult(E_SUCCESS); + + return INVALID_INDEX; +} + +int +_ListImpl::GetItemIdAt(int index) const +{ + SysTryReturn(NID_UI_CTRL, (index >= 0 && index < GetItemCount()), + -1, E_INVALID_ARG, "[E_INVALID_ARG] The current value of index(%d) is invalid.", index); + + const CustomListItem* pCustomListItem = GetCustomListItemAt(-1, index); + SysTryReturn(NID_UI_CTRL, pCustomListItem, -1, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get an item at index(%d).", index); + + SysTryReturn(NID_UI_CTRL, pCustomListItem->__pCustomListItemImpl, -1, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get an item at index(%d).", index); + + SetLastResult(E_SUCCESS); + return pCustomListItem->__pCustomListItemImpl->itemId; +} + +void +_ListImpl::ScrollToBottom(void) +{ + result r = E_SUCCESS; + + GetCore().SetBottomDrawnItemIndex(0, GetItemCount() - 1); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + SetLastResult(E_SUCCESS); + GetCore().Draw(); + + return; +} + +void +_ListImpl::ScrollToTop(void) +{ + result r = E_SUCCESS; + r = GetCore().SetTopDrawnItemIndex(0,0); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + SetLastResult(E_SUCCESS); + GetCore().Draw(); + + return; +} + +result +_ListImpl::ScrollToTop(int index) +{ + SysTryReturnResult(NID_UI_CTRL, (index >= 0 && index < GetItemCount()), E_INVALID_ARG, "The current value of index(%d) is invalid.", index); + + result r = GetCore().SetTopDrawnItemIndex(0, index); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + GetCore().Draw(); + + return r; +} + +result +_ListImpl::RefreshItem(int index) +{ + SysTryReturnResult(NID_UI_CTRL, (index >= 0 && index < GetItemCount()), E_INVALID_ARG, "The current value of index(%d) is invalid.", index); + + int topItemIndex = -1; + int bottomItemIndex = -1; + int groupIndex = -1; + + GetCore().GetTopDrawnItemIndex(groupIndex, topItemIndex); + GetCore().GetBottomDrawnItemIndex(groupIndex, bottomItemIndex); + + SysTryReturnResult(NID_UI_CTRL, (index >= topItemIndex && index <= bottomItemIndex), E_INVALID_OPERATION, + "Index(%d) should be within drawn item range.", index); + + result r = E_SUCCESS; + + _TableViewItemUpdateParams updateParams; + updateParams.pItem = GetCustomListItemAt(-1, index); + updateParams.isDividerEnabled = _isDividerEnabled; + updateParams.pCheckBitmaps = _pCheckBitmaps; + updateParams.annexStyle = _annexStyle; + + r = _CustomListItemImpl::UpdateTableViewItem(updateParams); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, + "A system error has occurred. Failed to refresh an item."); + + DrawItem(-1, index); + + return E_SUCCESS; +} + +CustomListItem* +_ListImpl::GetNewItemN(const String* pText1, const String* pText2, const Bitmap* pBitmap1, const Bitmap* pBitmap2, int itemId, int index) +{ + SysTryReturn(NID_UI_CTRL, __pItemFormat, null, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Item Format must not be null."); + Dimension listSize = GetCore().GetSize(); + Rectangle text1Rect; + Rectangle text2Rect; + Rectangle img1Rect; + Rectangle img2Rect; + + GetElementRects(text1Rect, text2Rect, img1Rect, img2Rect); + + CustomListItem* pItem = new (std::nothrow) CustomListItem(); + SysTryReturn(NID_UI_CTRL, pItem, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pItem->Construct(GetItemHeight()); + pItem->SetItemFormat(*__pItemFormat); + pItem->__pCustomListItemImpl->itemId = itemId; + + if ((pText1 != null) && (text1Rect.x > 0)) + { + pItem->SetElement(ID_FORMAT_TEXT1, *pText1); + pItem->__pCustomListItemImpl->SetTextSliding(ID_FORMAT_TEXT1, __text1SlideEnabled); + } + + if ((pBitmap1 != null) && (img1Rect.x > 0)) + { + pItem->SetElement(ID_FORMAT_IMAGE1, *pBitmap1, pBitmap1); + } + + if ((pText2 != null) && (text2Rect.x > 0)) + { + pItem->SetElement(ID_FORMAT_TEXT2, *pText2); + pItem->__pCustomListItemImpl->SetTextSliding(ID_FORMAT_TEXT2, __text2SlideEnabled); + } + + if ((pBitmap2 != null) && (img2Rect.x > 0)) + { + pItem->SetElement(ID_FORMAT_IMAGE2, *pBitmap2, pBitmap2); + } + + _NumberElement *pNumberElement = null; + + if (__listStyle == LIST_STYLE_NUMBER) + { + pNumberElement = new (std::nothrow) _NumberElement(); + SysTryReturn(NID_UI_CTRL, pNumberElement, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + pNumberElement->index = index + 1; + __pNumberElements->InsertAt(*pNumberElement, index); + pItem->SetElement(ID_FORMAT_NUMBER, *(dynamic_cast(pNumberElement))); + } + + if (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL) + { + pItem->SetCheckBox(ID_FORMAT_CHECK); + } + + return pItem; +} + +void +_ListImpl::GetItemMargins(int& leftMargin, int& numberStyleMargin, int& dividerMargin, int& lowerMargin, int& upperMargin) +{ + if (__listStyle == LIST_STYLE_NUMBER) + { + GET_SHAPE_CONFIG(LIST::LIST_ITEM_NUMBER_STYLE_MARGIN, GetCore().GetOrientation(), numberStyleMargin); + } + + if (__isCheckStyle) + { + GET_SHAPE_CONFIG(LIST::LIST_ITEM_DIVIDER_MARGIN, GetCore().GetOrientation(), dividerMargin); + } + + GET_SHAPE_CONFIG(LIST::LIST_ITEM_LEFT_MARGIN, GetCore().GetOrientation(), leftMargin); + GET_SHAPE_CONFIG(LIST::LIST_ITEM_LOWER_MARGIN, GetCore().GetOrientation(), lowerMargin); + GET_SHAPE_CONFIG(LIST::LIST_ITEM_UPPER_MARGIN, GetCore().GetOrientation(), upperMargin); +} + +void +_ListImpl::GetElementRects(Rectangle& text1Rect, Rectangle& text2Rect, Rectangle& img1Rect, Rectangle& img2Rect) +{ + Dimension listSize = GetCore().GetSize(); + + int leftMargin = 0; + int numberStyleMargin = 0; + int dividerMargin = 0; + int lowerMargin = 0; + int upperMargin = 0; + + GetItemMargins(leftMargin, numberStyleMargin, dividerMargin, lowerMargin, upperMargin); + + switch (__listItemFormat) + { + case LIST_ITEM_SINGLE_IMAGE: + + img1Rect.x = leftMargin + numberStyleMargin; + img1Rect.y = upperMargin; + img1Rect.width = __column1Width - dividerMargin; + img1Rect.height = __row1Height - lowerMargin; + + break; + + case LIST_ITEM_SINGLE_TEXT: + + text1Rect.x = leftMargin + numberStyleMargin; + text1Rect.y = upperMargin; + text1Rect.width = __column1Width - dividerMargin - text1Rect.x; + text1Rect.height = __row1Height - lowerMargin; + + break; + + case LIST_ITEM_SINGLE_IMAGE_TEXT: + + img1Rect.x = leftMargin + numberStyleMargin; + img1Rect.y = upperMargin; + img1Rect.width = __column1Width; + img1Rect.height = __row1Height - lowerMargin; + + text1Rect.x = __column1Width + leftMargin + numberStyleMargin; + text1Rect.y = upperMargin; + text1Rect.width = (__column1Width + __column2Width + dividerMargin <= listSize.width) ? (__column2Width) : (__column2Width - dividerMargin); + text1Rect.height = __row1Height - lowerMargin; + + break; + + case LIST_ITEM_SINGLE_TEXT_IMAGE: + + img1Rect.x = __column1Width + leftMargin + numberStyleMargin; + img1Rect.y = upperMargin; + img1Rect.width = __column1Width; + img1Rect.height = __row1Height - lowerMargin; + + text1Rect.x = leftMargin + numberStyleMargin; + text1Rect.y = upperMargin; + text1Rect.width = (__column1Width + __column2Width + dividerMargin <= listSize.width) ? (__column2Width) : (__column2Width - dividerMargin); + text1Rect.height = __row1Height - lowerMargin; + + break; + + case LIST_ITEM_SINGLE_IMAGE_TEXT_IMAGE: + + img1Rect.x = leftMargin + numberStyleMargin; + img1Rect.y = upperMargin; + img1Rect.width = __column1Width; + img1Rect.height = __row1Height - lowerMargin; + + text1Rect.x = __column1Width + leftMargin + numberStyleMargin; + text1Rect.y = upperMargin; + text1Rect.width = __column2Width; + text1Rect.height = __row1Height - lowerMargin; + + img2Rect.x = text1Rect.x + __column2Width; + img2Rect.y = upperMargin; + img2Rect.width = (__column1Width + __column2Width + dividerMargin <= listSize.width) ? (__column2Width) : (__column2Width - dividerMargin); + img2Rect.height = __row1Height - lowerMargin; + + break; + + case LIST_ITEM_DOUBLE_IMAGE_TEXT_FULLTEXT: + + img1Rect.x = leftMargin + numberStyleMargin; + img1Rect.y = upperMargin; + img1Rect.width = __column1Width; + img1Rect.height = __row1Height - lowerMargin; + + text1Rect.x = __column1Width + leftMargin + numberStyleMargin; + text1Rect.y = upperMargin; + text1Rect.width = (__column1Width + __column2Width + dividerMargin <= listSize.width) ? (__column2Width) : (__column2Width - dividerMargin); + text1Rect.height = __row1Height - lowerMargin; + + text2Rect.x = leftMargin + numberStyleMargin; + text2Rect.y = __row1Height; + text2Rect.width = __column1Width; + text2Rect.height = __row2Height - lowerMargin; + + break; + + case LIST_ITEM_DOUBLE_FULLTEXT_IMAGE_TEXT: + + img1Rect.x = leftMargin + numberStyleMargin; + img1Rect.y = __row1Height; + img1Rect.width = __column1Width; + img1Rect.height = __row2Height; + + text1Rect.x = __column1Width + leftMargin + numberStyleMargin; + text1Rect.y = __row1Height; + text1Rect.width = (__column1Width + __column2Width + dividerMargin <= listSize.width) ? (__column2Width) : (__column2Width - dividerMargin); + text1Rect.height = __row2Height; + + text2Rect.x = leftMargin + numberStyleMargin; + text2Rect.y = upperMargin; + text2Rect.width = __column1Width; + text2Rect.height = __row1Height - lowerMargin; + + break; + + case LIST_ITEM_DOUBLE_TEXT_IMAGE_FULLTEXT: + + img1Rect.x = __column1Width + leftMargin + numberStyleMargin; + img1Rect.y = upperMargin; + img1Rect.width = (__column1Width + __column2Width + dividerMargin <= listSize.width) ? (__column2Width) : (__column2Width - dividerMargin); + img1Rect.height = __row1Height - lowerMargin; + + text1Rect.x = leftMargin + numberStyleMargin; + text1Rect.y = upperMargin; + text1Rect.width = __column1Width; + text1Rect.height = __row1Height - lowerMargin; + + text2Rect.x = leftMargin + numberStyleMargin; + text2Rect.y = __row1Height; + text2Rect.width = __column1Width; + text2Rect.height = __row2Height; + + break; + + case LIST_ITEM_DOUBLE_FULLTEXT_TEXT_IMAGE: + + img1Rect.x = __column1Width + leftMargin + numberStyleMargin; + img1Rect.y = __row1Height; + img1Rect.width = (__column1Width + __column2Width + dividerMargin <= listSize.width) ? (__column2Width) : (__column2Width - dividerMargin); + img1Rect.height = __row2Height; + + text1Rect.x = leftMargin + numberStyleMargin; + text1Rect.y = __row1Height; + text1Rect.width = __column1Width; + text1Rect.height = __row2Height; + + text2Rect.x = leftMargin + numberStyleMargin; + text2Rect.y = upperMargin; + text2Rect.width = __column1Width; + text2Rect.height = __row1Height - lowerMargin; + + break; + + case LIST_ITEM_DOUBLE_IMAGE_TEXT_TEXT: + + img1Rect.x = leftMargin + numberStyleMargin; + img1Rect.y = upperMargin; + img1Rect.width = __column1Width; + img1Rect.height = __row1Height + __row2Height - lowerMargin; + + text1Rect.x = __column1Width + leftMargin + numberStyleMargin; + text1Rect.y = upperMargin; + text1Rect.width = (__column1Width + __column2Width + dividerMargin <= listSize.width) ? (__column2Width) : (__column2Width - dividerMargin); + text1Rect.height = __row1Height - lowerMargin; + + text2Rect.x = __column1Width + leftMargin + numberStyleMargin; + text2Rect.y = __row1Height; + text2Rect.width = (__column1Width + __column2Width + dividerMargin <= listSize.width) ? (__column2Width) : (__column2Width - dividerMargin); + text2Rect.height = __row2Height; + + break; + + case LIST_ITEM_DOUBLE_TEXT_TEXT_IMAGE: + + img1Rect.x = __column1Width + leftMargin + numberStyleMargin; + img1Rect.y = upperMargin; + img1Rect.width = (__column1Width + __column2Width + dividerMargin <= listSize.width) ? (__column2Width) : (__column2Width - dividerMargin); + img1Rect.height = __row1Height + __row2Height - lowerMargin; + + text1Rect.x = leftMargin + numberStyleMargin; + text1Rect.y = upperMargin; + text1Rect.width = __column1Width; + text1Rect.height = __row2Height - lowerMargin; + + text2Rect.x = leftMargin + numberStyleMargin; + text2Rect.y = __row1Height; + text2Rect.width = __column1Width; + text2Rect.height = __row1Height; + + break; + } +} + +result +_ListImpl::ReDrawList(void) +{ + Rectangle text1Rect; + Rectangle text2Rect; + Rectangle img1Rect; + Rectangle img2Rect; + int groupIndex = -1; + int currIndex = -1; + + GetTopDrawnItemIndex(groupIndex, currIndex); + + GetElementRects(text1Rect, text2Rect, img1Rect, img2Rect); + + int textSize = 0; + int listStyleNumberX = 0; + int listStyleNumberWidth = 0; + int listStyleNumberHeight = 0; + int checkItemWidth = 0; + int checkItemHeight = 0; + + GET_SHAPE_CONFIG(LIST::LIST_ITEM_TEXT_SIZE, GetCore().GetOrientation(), textSize); + + GET_SHAPE_CONFIG(LIST::LIST_STYLE_NUMBER_X, GetCore().GetOrientation(), listStyleNumberX); + GET_SHAPE_CONFIG(LIST::LIST_STYLE_NUMBER_WIDTH, GetCore().GetOrientation(), listStyleNumberWidth); + GET_SHAPE_CONFIG(LIST::LIST_STYLE_NUMBER_HEIGHT, GetCore().GetOrientation(), listStyleNumberHeight); + + GET_SHAPE_CONFIG(LIST::LIST_CHECK_ITEM_WIDTH, GetCore().GetOrientation(), checkItemWidth); + GET_SHAPE_CONFIG(LIST::LIST_CHECK_ITEM_HEIGHT, GetCore().GetOrientation(), checkItemHeight); + + if (text1Rect.x > 0) + { + __pItemFormat->AddElement(ID_FORMAT_TEXT1, text1Rect); + __pItemFormat->SetElementEventEnabled(ID_FORMAT_TEXT1, false); + } + + if (img1Rect.x > 0) + { + __pItemFormat->AddElement(ID_FORMAT_IMAGE1, img1Rect); + __pItemFormat->SetElementEventEnabled(ID_FORMAT_IMAGE1, false); + } + + if (text2Rect.x > 0) + { + __pItemFormat->AddElement(ID_FORMAT_TEXT2, text2Rect); + __pItemFormat->SetElementEventEnabled(ID_FORMAT_TEXT2, false); + } + + if (img2Rect.x > 0) + { + __pItemFormat->AddElement(ID_FORMAT_IMAGE2, img2Rect); + __pItemFormat->SetElementEventEnabled(ID_FORMAT_IMAGE2, false); + } + + if (__listStyle == LIST_STYLE_NUMBER) + { + __pItemFormat->AddElement(ID_FORMAT_NUMBER, Rectangle(listStyleNumberX, GetItemHeight()/2 - 15, listStyleNumberWidth, listStyleNumberHeight)); + __pItemFormat->SetElementEventEnabled(ID_FORMAT_NUMBER, false); + } + + if (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL) + { + __pItemFormat->AddElement(ID_FORMAT_CHECK, Rectangle(GetCore().GetBounds().width - 60, GetItemHeight()/2 - 25 , checkItemWidth , checkItemHeight)); + __pItemFormat->SetElementEventEnabled(ID_FORMAT_CHECK, true); + } + + int count = GetItemCount(); + result r = E_SUCCESS; + + for (int index = 0; index < count; index++) + { + Refresh(index); + + r = GetCore().RefreshTableView(0, index, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] Propagating.",GetErrorMessage(r)); + } + + ScrollToTop(currIndex); + SetLastResult(E_SUCCESS); + + return E_SUCCESS; +} + +void +_ListImpl::SetBitmap(TableViewItemDrawingStatus itemStatus, const Bitmap& bitmap) +{ + _TableViewItemData* pItem = null; + + int groupIndex = -1; + int topIndex = -1; + int bottomIndex = -1; + + GetTopDrawnItemIndex(groupIndex, topIndex); + GetBottomDrawnItemIndex(groupIndex, bottomIndex); + + int count = GetItemCount(); + for (int itemIndex = 0; itemIndex < count; itemIndex++) + { + pItem = GetTableViewItemAt(-1, itemIndex); + SysTryReturnVoidResult(NID_UI_CTRL, pItem, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. _TableViewItemData instance is null."); + + pItem->SetBackgroundBitmap(&bitmap, itemStatus); + if (itemIndex >= topIndex && itemIndex <= bottomIndex) + { + pItem->Invalidate(true); + } + } +} + +result +_ListImpl::UpdateNumbers(int index) +{ + SysTryReturnResult(NID_UI_CTRL, __listStyle == LIST_STYLE_NUMBER, E_SYSTEM, + "A system error has occurred. The current value of list style is invalid."); + + SysTryReturnResult(NID_UI_CTRL, __pNumberElements != null, E_SYSTEM, + "A system error has occured. Failed to update numbers"); + + _NumberElement* pNumberElement = null; + int count = __pNumberElements->GetCount(); + + for (int itemIndex = index + 1; itemIndex < count; itemIndex++) + { + pNumberElement = dynamic_cast<_NumberElement*>(__pNumberElements->GetAt(itemIndex)); + SysTryReturnResult(NID_UI_CTRL, pNumberElement, E_SYSTEM, + "A system error has occurred. Failed to get _NumberElement instance at index(%d).", index); + pNumberElement->index = itemIndex + 1; + + CustomListItem* pCustomListItem = GetCustomListItemAt(-1, itemIndex); + SysTryReturnResult(NID_UI_CTRL, pCustomListItem, E_SYSTEM, + "A system error has occurred. Failed to get an item at index(%d).", itemIndex); + + pCustomListItem->SetElement(ID_FORMAT_NUMBER, *(dynamic_cast(pNumberElement))); + } + + return E_SUCCESS; +} + +result +_ListImpl::Refresh(int index) +{ + result r = E_SUCCESS; + + _TableViewItemUpdateParams updateParams; + updateParams.pItem = GetCustomListItemAt(-1, index); + updateParams.isDividerEnabled = _isDividerEnabled; + updateParams.pCheckBitmaps = _pCheckBitmaps; + updateParams.annexStyle = _annexStyle; + + r = _CustomListItemImpl::UpdateTableViewItem(updateParams); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, + "A system error has occurred. Failed to refresh an item."); + + DrawItem(-1, index); + + return E_SUCCESS; +} + +bool +_ListImpl::IsItemChecked(int groupIndex, int subIndex) const +{ + return IsItemChecked(subIndex); +} + +result +_ListImpl::SetItemChecked(int groupIndex, int itemIndex, bool check) +{ + return SetItemChecked(itemIndex, check); +} + +void +_ListImpl::OnTableViewItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status) +{ + ItemStatus itemStatus = ITEM_HIGHLIGHTED; + + switch (status) + { + case TABLE_VIEW_ITEM_STATUS_SELECTED: + itemStatus = ITEM_SELECTED; + break; + case TABLE_VIEW_ITEM_STATUS_HIGHLIGHTED: + itemStatus = ITEM_HIGHLIGHTED; + break; + case TABLE_VIEW_ITEM_STATUS_CHECKED: + itemStatus = ITEM_CHECKED; + break; + case TABLE_VIEW_ITEM_STATUS_UNCHECKED: + itemStatus = ITEM_UNCHECKED; + break; + default: + SetLastResult(E_SYSTEM); + break; + } + + if ((!_isDividerEnabled) && (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL)) + { + bool isChecked = IsItemChecked(itemIndex); + + if (isChecked) + { + itemStatus = ITEM_UNCHECKED; + } + else + { + itemStatus = ITEM_CHECKED; + } + + SetItemChecked(itemIndex, !isChecked); + } + + ProcessItemStateChange(-1, itemIndex, itemStatus); + + return; +} + +void +_ListImpl::OnTableViewItemReordered(Tizen::Ui::Controls::_TableView& tableView, int itemIndexFrom, int itemIndexTo) +{ + +} + +void +_ListImpl::OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::_TableView& tableView, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pContextItem, bool activated) +{ + +} + +void +_ListImpl::OnGroupedTableViewGroupItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status) +{ + +} + +void +_ListImpl::OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status) +{ + +} + +void +_ListImpl::OnGroupedTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pContextItem, bool activated) +{ + +} + +void +_ListImpl::OnGroupedTableViewItemReordered(Tizen::Ui::Controls::_TableView& tableView, int groupIndexFrom, int itemIndexFrom, int groupIndexTo, int itemIndexTo) +{ +} + +void +_ListImpl::OnSectionTableViewItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int sectionIndex, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status) +{ + +} + +void +_ListImpl::OnTableViewItemSwept(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewSweepDirection direction) +{ + +} + +void +_ListImpl::OnSectionTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::_TableView& tableView, int sectionIndex, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pContextItem, bool activated) +{ + +} + +void +_ListImpl::ProcessItemStateChange(int groupIndex, int itemIndex, ItemStatus itemStatus) +{ + int itemId = GetItemIdAt(itemIndex); + + _ListListener* pListenerList = null; + IItemEventListener* pEventListener = null; + + int count = __itemListeners.GetCount(); + for (int listenerCount = 0; listenerCount < count; listenerCount++) + { + pListenerList = dynamic_cast<_ListListener*>(__itemListeners.GetAt(listenerCount)); + SysTryReturnVoidResult(NID_UI_CTRL, (pListenerList != null), E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get Listener."); + + pEventListener = dynamic_cast(pListenerList->pListener); + SysTryReturnVoidResult(NID_UI_CTRL, (pEventListener != null), E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get Listener."); + + pEventListener->OnItemStateChanged(GetPublic(), itemIndex, itemId, itemStatus); + } + SetLastResult(E_SUCCESS); + + return; +} + +void +_ListImpl::ProcessItemStateChange(int groupIndex, int itemIndex, int elementId, ItemStatus itemStatus) +{ + int itemId = GetItemIdAt(itemIndex); + + _ListListener* pListenerList = null; + IItemEventListener* pEventListener = null; + + int count = __itemListeners.GetCount(); + for (int listenerCount = 0; listenerCount < count; listenerCount++) + { + pListenerList = dynamic_cast<_ListListener*>(__itemListeners.GetAt(listenerCount)); + SysTryReturnVoidResult(NID_UI_CTRL, (pListenerList != null), E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get Listener."); + + pEventListener = dynamic_cast(pListenerList->pListener); + SysTryReturnVoidResult(NID_UI_CTRL, (pEventListener != null), E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get Listener."); + + pEventListener->OnItemStateChanged(GetPublic(), itemIndex, itemId, itemStatus); + } + SetLastResult(E_SUCCESS); + + return; +} + + + +class _ListMaker + : public _UiBuilderControlMaker +{ +public: + _ListMaker(_UiBuilder* uibuilder) + : _UiBuilderControlMaker(uibuilder){}; + virtual ~_ListMaker(){}; + static _UiBuilderControlMaker* + GetInstance(_UiBuilder* uibuilder) + { + _ListMaker* pListMaker = new (std::nothrow) _ListMaker(uibuilder); + return pListMaker; + }; +protected: + virtual Control* + Make(_UiBuilderControl* pControl) + { + result r = E_SYSTEM; + _UiBuilderControlLayout* pControlProperty = null; + List* pList = null; + Rectangle rect; + Rectangle rectMin; + Dimension dimMin; + Tizen::Base::String elementString; + int tempRow1Height = 0; + int tempRow2Height = 0; + int tempColumn1Width = 0; + int tempColumn2Width = 0; + + ListStyle style = LIST_STYLE_NORMAL; + ListItemFormat format = LIST_ITEM_SINGLE_TEXT; + Color color; + + GetProperty(pControl, &pControlProperty); + if (pControlProperty == null) + { + return null; + } + + pList = new (std::nothrow) List(); + if (pList == null) + { + return null; + } + + rect = pControlProperty->GetRect(); + + if (pControl->GetElement(L"ListItemFormat", elementString)) + { + if (elementString.Equals(L"LIST_ITEM_SINGLE_IMAGE", false)) + { + format = LIST_ITEM_SINGLE_IMAGE; + } + else if (elementString.Equals(L"LIST_ITEM_SINGLE_TEXT", false)) + { + format = LIST_ITEM_SINGLE_TEXT; + } + else if (elementString.Equals(L"LIST_ITEM_SINGLE_IMAGE_TEXT", false)) + { + format = LIST_ITEM_SINGLE_IMAGE_TEXT; + } + else if (elementString.Equals(L"LIST_ITEM_SINGLE_TEXT_IMAGE", false)) + { + format = LIST_ITEM_SINGLE_TEXT_IMAGE; + } + else if (elementString.Equals(L"LIST_ITEM_SINGLE_IMAGE_TEXT_IMAGE", false)) + { + format = LIST_ITEM_SINGLE_IMAGE_TEXT_IMAGE; + } + else if (elementString.Equals(L"LIST_ITEM_DOUBLE_IMAGE_TEXT_FULLTEXT", false)) + { + format = LIST_ITEM_DOUBLE_IMAGE_TEXT_FULLTEXT; + } + else if (elementString.Equals(L"LIST_ITEM_DOUBLE_FULLTEXT_IMAGE_TEXT", false)) + { + format = LIST_ITEM_DOUBLE_FULLTEXT_IMAGE_TEXT; + } + else if (elementString.Equals(L"LIST_ITEM_DOUBLE_TEXT_IMAGE_FULLTEXT", false)) + { + format = LIST_ITEM_DOUBLE_TEXT_IMAGE_FULLTEXT; + } + else if (elementString.Equals(L"LIST_ITEM_DOUBLE_FULLTEXT_TEXT_IMAGE", false)) + { + format = LIST_ITEM_DOUBLE_FULLTEXT_TEXT_IMAGE; + } + else if (elementString.Equals(L"LIST_ITEM_DOUBLE_IMAGE_TEXT_TEXT", false)) + { + format = LIST_ITEM_DOUBLE_IMAGE_TEXT_TEXT; + } + else if (elementString.Equals(L"LIST_ITEM_DOUBLE_TEXT_TEXT_IMAGE", false)) + { + format = LIST_ITEM_DOUBLE_TEXT_TEXT_IMAGE; + } + else + { + format = LIST_ITEM_SINGLE_TEXT; + } + } + + if (pControl->GetElement(L"line1Height", elementString) || pControl->GetElement(L"row1Height", elementString)) + { + Base::Integer::Parse(elementString, tempRow1Height); + } + + if ((pControl->GetElement(L"line2Height", elementString) || pControl->GetElement(L"row2Height", elementString)) && (format > 4)) + { + Base::Integer::Parse(elementString,tempRow2Height); + } + else + { + tempRow2Height = 0; + } + + if (pControl->GetElement(L"column1Width", elementString)) + { + Base::Integer::Parse(elementString,tempColumn1Width); + } + + if ((pControl->GetElement(L"column2Width", elementString)) && (format > 1)) + { + Base::Integer::Parse(elementString,tempColumn2Width); + } + else + { + tempColumn2Width = 0; + } + + Tizen::Base::String styleString; + styleString = pControlProperty->GetStyle(); + + if (styleString.Equals(L"LIST_STYLE_NORMAL", false)) + { + style = LIST_STYLE_NORMAL; + } + else if (styleString.Equals(L"LIST_STYLE_NUMBER", false)) + { + style = LIST_STYLE_NUMBER; + } + else if (styleString.Equals(L"LIST_STYLE_RADIO", false)) + { + style = LIST_STYLE_RADIO; + } + else if (styleString.Equals(L"LIST_STYLE_RADIO_WITH_DIVIDER", false)) + { + style = LIST_STYLE_RADIO_WITH_DIVIDER; + } + else if (styleString.Equals(L"LIST_STYLE_MARK_WITH_DIVIDER", false)) + { + style = LIST_STYLE_MARK_WITH_DIVIDER; + } + else if (styleString.Equals(L"LIST_STYLE_ONOFF_WITH_DIVIDER", false)) + { + style = LIST_STYLE_ONOFF_WITH_DIVIDER; + } + else if (styleString.Equals(L"LIST_STYLE_MARK", false)) + { + style = LIST_STYLE_MARK; + } + else if (styleString.Equals(L"LIST_STYLE_ONOFF", false)) + { + style = LIST_STYLE_ONOFF; + } + else + { + style = LIST_STYLE_NORMAL; + } + + if (tempRow1Height < 0 || tempRow1Height > ((Tizen::Ui::Control*) GetContainer())->GetBounds().height) + { + tempRow1Height = ((Tizen::Ui::Control*) GetContainer())->GetBounds().height >> 2; + } + if (tempRow2Height < 0 || tempRow2Height > ((Tizen::Ui::Control*) GetContainer())->GetBounds().height) + { + tempRow2Height = ((Tizen::Ui::Control*) GetContainer())->GetBounds().height >> 2; + } + if (tempColumn1Width < 0 || tempColumn1Width > ((Tizen::Ui::Control*) GetContainer())->GetBounds().width) + { + tempColumn1Width = ((Tizen::Ui::Control*) GetContainer())->GetBounds().width >> 2; + } + if (tempColumn2Width < 0 || tempColumn2Width > ((Tizen::Ui::Control*) GetContainer())->GetBounds().width) + { + tempColumn2Width = ((Tizen::Ui::Control*) GetContainer())->GetBounds().width >> 2; + } + + r = pList->Construct(rect, style, format, tempRow1Height, tempRow2Height, tempColumn1Width, tempColumn2Width); + if (r != E_SUCCESS) + { + delete pList; + return null; + } + + if (pControl->GetElement(L"textOfEmptyList", elementString)) + { + pList->SetTextOfEmptyList(elementString); + } + + if (pControl->GetElement(L"colorOfEmptyListText", elementString)) + { + ConvertStringToColor(elementString, color); + pList->SetTextColorOfEmptyList(color); + } + + GET_DIMENSION_CONFIG(LIST::LIST_MIN_SIZE, _CONTROL_ORIENTATION_PORTRAIT, dimMin); + rectMin = (pControl->GetAttribute(0))->GetRect(); + (pControl->GetAttribute(0))->SetRect(rectMin.x, rectMin.y, dimMin.width, dimMin.height); + + GET_DIMENSION_CONFIG(LIST::LIST_MIN_SIZE, _CONTROL_ORIENTATION_LANDSCAPE, dimMin); + rectMin = (pControl->GetAttribute(1))->GetRect(); + (pControl->GetAttribute(1))->SetRect(rectMin.x, rectMin.y, dimMin.width, dimMin.height); + + return pList; + } + +private: +}; + +_ListRegister::_ListRegister() +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + if (pUiBuilderControlTableManager) + { + pUiBuilderControlTableManager->RegisterControl(L"List", _ListMaker::GetInstance); + } +} +_ListRegister::~_ListRegister() +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + if (pUiBuilderControlTableManager) + { + pUiBuilderControlTableManager->UnregisterControl(L"List"); + } +} + +static _ListRegister ListRegisterToUiBuilder; +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_ListItemBaseImpl.cpp b/src/ui/controls/FUiCtrl_ListItemBaseImpl.cpp new file mode 100644 index 0000000..7f4f941 --- /dev/null +++ b/src/ui/controls/FUiCtrl_ListItemBaseImpl.cpp @@ -0,0 +1,385 @@ +// +// 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_ListItemBaseImpl.cpp + * @brief This is the implementation file for _ListItemBaseImpl class. + * + * This file contains the implementation of _ListItemBaseImpl class. + */ + +#include +#include +#include +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_ResourceManager.h" +#include "FUiCtrl_ListContextItemImpl.h" +#include "FUiCtrl_ListItemBaseImpl.h" +#include "FUiCtrl_ListViewContextItem.h" +#include "FUiCtrl_ListViewItem.h" +#include "FUiCtrl_UiListViewItemEvent.h" +#include "FUiCtrl_UiListViewItemEventArg.h" + +#ifdef MEMORY_LEAK_CHECK +#include "mem_leak_check.h" +#endif + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Graphics::_Text; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_ListItemBaseImpl* +_ListItemBaseImpl::GetInstance(ListItemBase& listItemBase) +{ + return listItemBase._pImpl; +} + +const _ListItemBaseImpl* +_ListItemBaseImpl::GetInstance(const ListItemBase& listItemBase) +{ + return listItemBase._pImpl; +} + +_ListItemBaseImpl::_ListItemBaseImpl(ListItemBase* pPublic) + : __pPublic(pPublic) + , __pListViewItem(null) + , __style(LIST_ANNEX_STYLE_NORMAL) + , __pEvent(null) +{ + +} + +_ListItemBaseImpl::~_ListItemBaseImpl(void) +{ + if (__pListViewItem != null) + { + _TableViewItem* pContextItem = __pListViewItem->GetContextItem(); + __pListViewItem->Release(); + + if (pContextItem) + { + pContextItem->Release(); + } + } + + delete __pEvent; + __pEvent = null; +} + +const char* +_ListItemBaseImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Controls::ListItemBase"; +} + +const ListItemBase& +_ListItemBaseImpl::GetPublic(void) const +{ + return static_cast (*__pPublic); +} + +ListItemBase& +_ListItemBaseImpl::GetPublic(void) +{ + return *__pPublic; +} + +_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] Memory allocation failed."); + + result r = pImpl->Construct(itemSize, style); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return pImpl; + +CATCH: + delete pImpl; + pImpl = null; + + return null; +} + +result +_ListItemBaseImpl::Construct(const FloatDimension& itemSize, ListAnnexStyle style) +{ + SysTryReturn(NID_UI_CTRL, (itemSize.width >= 0.0f) && (itemSize.height >= 0.0f), E_INVALID_ARG, E_INVALID_ARG, + ("[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] Memory allocation failed."); + + __pListViewItem->SetSize(itemSize); + __pListViewItem->SetBounds(FloatRectangle(0.0f, 0.0f, itemSize.width, itemSize.height)); + __pListViewItem->SetBackgroundColor(Color(0, 0, 0, 0)); + __pListViewItem->SetSelectionStyle(TABLE_VIEW_ITEM_SELECTION_STYLE_WHOLE); + __pListViewItem->GetAccessibilityContainer()->Activate(true); + + __itemSize = itemSize; + __style = style; + + return E_SUCCESS; +} + +_ListViewItem* +_ListItemBaseImpl::GetListViewItem(void) const +{ + return __pListViewItem; +} + +FloatDimension +_ListItemBaseImpl::GetItemSize(void) const +{ + return __itemSize; +} + +result +_ListItemBaseImpl::SetBackgroundBitmap(ListItemDrawingStatus status, const Bitmap* pBitmap) +{ + SysTryReturn(NID_UI_CTRL, (pBitmap != null), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] It is invalid argument."); + + ListItemState itemState; + + switch (status) + { + case LIST_ITEM_DRAWING_STATUS_NORMAL: + itemState = LIST_ITEM_STATE_NORMAL; + break; + + case LIST_ITEM_DRAWING_STATUS_PRESSED: + itemState = LIST_ITEM_STATE_PRESSED; + break; + + case LIST_ITEM_DRAWING_STATUS_HIGHLIGHTED: + itemState = LIST_ITEM_STATE_HIGHLIGHTED; + break; + + default: + SysTryReturn(NID_UI_CTRL, false, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Unable to set background image."); + } + + bool ret = __pListViewItem->SetItemBackgroundBitmap(itemState, pBitmap); + __pListViewItem->SetItemChanged(ret); + + return E_SUCCESS; +} + +result +_ListItemBaseImpl::SetBackgroundColor(ListItemDrawingStatus status, const Color& color) +{ + ListItemState itemState; + + switch (status) + { + case LIST_ITEM_DRAWING_STATUS_NORMAL: + itemState = LIST_ITEM_STATE_NORMAL; + break; + + case LIST_ITEM_DRAWING_STATUS_PRESSED: + itemState = LIST_ITEM_STATE_PRESSED; + break; + + case LIST_ITEM_DRAWING_STATUS_HIGHLIGHTED: + itemState = LIST_ITEM_STATE_HIGHLIGHTED; + break; + + default: + SysTryReturn(NID_UI_CTRL, false, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Unable to set background color."); + } + + __pListViewItem->SetItemBackgroundColor(itemState, color); + __pListViewItem->SetItemChanged(true); + + return E_SUCCESS; +} + +Color +_ListItemBaseImpl::GetBackgroundColor(ListItemDrawingStatus status) const +{ + ListItemState itemState; + + switch (status) + { + case LIST_ITEM_DRAWING_STATUS_NORMAL: + itemState = LIST_ITEM_STATE_NORMAL; + break; + + case LIST_ITEM_DRAWING_STATUS_PRESSED: + itemState = LIST_ITEM_STATE_PRESSED; + break; + + case LIST_ITEM_DRAWING_STATUS_HIGHLIGHTED: + itemState = LIST_ITEM_STATE_HIGHLIGHTED; + break; + + default: + SysTryReturn(NID_UI_CTRL, false, Color(0), E_SYSTEM, "[E_SYSTEM] Unable to get background color."); + } + + return __pListViewItem->GetItemBackgroundColor(itemState); +} + +result +_ListItemBaseImpl::SetContextItem(const _ListContextItemImpl* pItem) +{ + if (__pListViewItem->GetContextItem()) + { + __pListViewItem->GetContextItem()->Release(); + } + + if (pItem == null) + { + __pListViewItem->SetContextItem(null); + return E_SUCCESS; + } + + _ListViewContextItem* pContextItem = const_cast<_ListContextItemImpl*>(pItem)->GetContextItem(); + + if (pContextItem != null) + { + __pListViewItem->SetItemWidth(__itemSize.width); + + pContextItem->AddRef(); + + __pListViewItem->SetContextItem(pContextItem); + __pListViewItem->SetContextItemEventListener(*this); + + return E_SUCCESS; + } + + return E_SYSTEM; +} + +result +_ListItemBaseImpl::SetDescriptionText(const String& text) +{ + SysTryReturn(NID_UI_CTRL, (__pListViewItem->SetDescriptionText(text) == true), E_SYSTEM, E_SYSTEM, + ("[E_SYSTEM] Unable to set description text.")); + + return E_SUCCESS; +} + +result +_ListItemBaseImpl::SetDescriptionTextColor(const Color& color) +{ + __pListViewItem->SetDescriptionTextColor(color); + + return E_SUCCESS; +} + +float +_ListItemBaseImpl::GetAnnexWidth(ListAnnexStyle style) +{ + TableViewAnnexStyle annexStyle = TABLE_VIEW_ANNEX_STYLE_NORMAL; + + switch (style) + { + case LIST_ANNEX_STYLE_NORMAL: + annexStyle = TABLE_VIEW_ANNEX_STYLE_NORMAL; + break; + + case LIST_ANNEX_STYLE_MARK: + annexStyle = TABLE_VIEW_ANNEX_STYLE_MARK; + break; + + case LIST_ANNEX_STYLE_ONOFF_SLIDING: + annexStyle = TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING; + break; + + case LIST_ANNEX_STYLE_DETAILED: + annexStyle = TABLE_VIEW_ANNEX_STYLE_DETAILED; + break; + + case LIST_ANNEX_STYLE_RADIO: + annexStyle = TABLE_VIEW_ANNEX_STYLE_RADIO; + break; + + case LIST_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER: + annexStyle = TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER; + break; + + default: + break; + } + + return _TableViewItem::GetAnnexWidth(annexStyle); +} + +ListAnnexStyle +_ListItemBaseImpl::GetListItemAnnexStyle(void) +{ + return __style; +} + +bool +_ListItemBaseImpl::SetTextColor(int elementId, Color textColor) +{ + bool ret = __pListViewItem->SetTextColor(elementId, textColor); + __pListViewItem->SetItemChanged(ret); + + return ret; +} + +bool +_ListItemBaseImpl::GetTextColor(int elementId, Color& textColor) const +{ + return __pListViewItem->GetTextColor(elementId, textColor); +} + +void +_ListItemBaseImpl::AddListViewItemEventListener(_IUiListViewItemEventListener& listener) +{ + if (__pEvent == null) + { + __pEvent = new (std::nothrow) _UiListViewItemEvent(); + SysTryReturnVoidResult(NID_UI_CTRL, __pEvent != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + } + + __pEvent->AddListener(listener); +} + +void +_ListItemBaseImpl::RemoveListViewItemEventListener(_IUiListViewItemEventListener& listener) +{ + if (__pEvent != null) + { + __pEvent->RemoveListener(listener); + } +} + +void +_ListItemBaseImpl::OnActionPerformed(const _Control& source, int actionId) +{ + if (__pEvent != null) + { + int groupIndex = -1; + int itemIndex = -1; + + __pListViewItem->GetItemIndex(groupIndex, itemIndex); + __pEvent->SetSource(__pListViewItem); + + _UiListViewItemEventArg* pArg = new (std::nothrow) _UiListViewItemEventArg(groupIndex, itemIndex, actionId, NOTIFY_TYPE_CONTEXTITEM_SELCTED); + __pEvent->Fire(*pArg); + } +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_ListItemCommon.cpp b/src/ui/controls/FUiCtrl_ListItemCommon.cpp new file mode 100644 index 0000000..8efede2 --- /dev/null +++ b/src/ui/controls/FUiCtrl_ListItemCommon.cpp @@ -0,0 +1,138 @@ +// +// 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_ListItemCommon.cpp + * @brief This is the implementation file for _ListItemCommon class. + * + * This file contains the implementation of _ListItemCommon class. + */ + +#include +#include "FUiCtrl_ListItemCommon.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +_ListItemCommon::_ListItemCommon(void) + : __pAppInfo(null) + , __refCount(1) + , __itemHeight(0) + , __checkedState(false) + , __enabledState(true) + , __itemChanged(true) + , __reorderMode(false) +{ +} + +_ListItemCommon::~_ListItemCommon(void) +{ + __pAppInfo = null; +} + +int +_ListItemCommon::GetItemHeight(void) const +{ + return __itemHeight; +} + +void +_ListItemCommon::SetItemHeight(int itemHeight) +{ + __itemHeight = itemHeight; +} + +void +_ListItemCommon::SetChecked(bool checked) +{ + __checkedState = checked; +} + +bool +_ListItemCommon::IsChecked(void) const +{ + return __checkedState; +} + +void +_ListItemCommon::SetItemEnabled(bool enabled) +{ + __enabledState = enabled; +} + +bool +_ListItemCommon::IsItemEnabled(void) const +{ + return __enabledState; +} + +bool +_ListItemCommon::IsReorderMode(void) const +{ + return __reorderMode; +} + +void +_ListItemCommon::SetReorderMode(bool enabled) +{ + __reorderMode = enabled; +} + +void +_ListItemCommon::SetAppInfo(const void* pAppInfo) +{ + __pAppInfo = const_cast(pAppInfo); +} + +void* +_ListItemCommon::GetAppInfo(void) const +{ + return __pAppInfo; +} + +void +_ListItemCommon::SetItemChanged(bool changed) +{ + __itemChanged = changed; +} + +bool +_ListItemCommon::IsItemChanged(void) const +{ + return __itemChanged; +} + +int +_ListItemCommon::AddRef(void) +{ + return ++__refCount; +} + +int +_ListItemCommon::Release(void) +{ + --__refCount; + if (__refCount <= 0) + { + delete this; + return 0; + } + + return __refCount; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_ListItemEvent.cpp b/src/ui/controls/FUiCtrl_ListItemEvent.cpp new file mode 100644 index 0000000..213817c --- /dev/null +++ b/src/ui/controls/FUiCtrl_ListItemEvent.cpp @@ -0,0 +1,284 @@ +// +// 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_ListItemEvent.cpp + * @brief This is the implementation file for _ListItemEvent class. + * + * This file contains the implementation of _ListItemEvent class. + */ + +#include +#include +#include +#include +#include +#include "FUiCtrl_ListItemEvent.h" +#include "FUiCtrl_ListItemEventArg.h" + +// using namespace +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_ListItemEvent::_ListItemEvent(void) + : __pSource(null) + , __invokeListViewItemCallback(true) + , __invokeGroupedListViewItemCallback(true) + , __className(CLASSNAME_NONE) +{ + // nothing +} + +_ListItemEvent::~_ListItemEvent(void) +{ + // nothing +} + +result +_ListItemEvent::Construct(Control& source, ListClassName name) +{ + // set event source + __pSource = &source; + __className = name; + + return E_SUCCESS; +} + +Control* +_ListItemEvent::GetSource(void) const +{ + return __pSource; +} + +ListClassName +_ListItemEvent::GetListClassName(void) const +{ + return __className; +} + +void +_ListItemEvent::FireImpl(IEventListener& listener, const IEventArg& arg) +{ + // cast to _ItemEventArg + _ListItemEventArg* pEventArg = dynamic_cast<_ListItemEventArg*>(const_cast(&arg)); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, E_INVALID_ARG, + ("[E_INVALID_ARG] event argument is invalid type.")); + + int index1 = -1; + int index2 = -1; + int index3 = -1; + int index4 = -1; + + pEventArg->GetEventArgs(index1, index2, index3, index4); + + bool tempInvokeListViewItemCallback = __invokeListViewItemCallback; + __invokeListViewItemCallback = true; + + bool tempInvokeGroupedListViewItemCallback = __invokeGroupedListViewItemCallback; + __invokeGroupedListViewItemCallback = true; + + if (__className == CLASSNAME_LISTVIEW) // ListView + { + IListViewItemEventListener* pItemListener = dynamic_cast(&listener); + SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, + ("[E_INVALID_ARG] invalid listener type.")); + + ListView* pListView = dynamic_cast(GetSource()); + SysAssertf(pListView != null, "Not yet constructed. Construct() should be called before use."); + + if (index2 < 0) + { + index2 = -1; + } + + switch (pEventArg->GetNotifyType()) + { + case NOTIFY_TYPE_SELECTED_ITEM: + if (tempInvokeListViewItemCallback == true) + { + pItemListener->OnListViewItemStateChanged(*pListView, index1, index2, LIST_ITEM_STATUS_SELECTED); + } + break; + + case NOTIFY_TYPE_HIGHLIGHED_ITEM: + if (tempInvokeListViewItemCallback == true) + { + pItemListener->OnListViewItemStateChanged(*pListView, index1, index2, LIST_ITEM_STATUS_HIGHLIGHTED); + } + break; + + case NOTIFY_TYPE_ANNEX_CHECK: + if (tempInvokeListViewItemCallback == true) + { + pItemListener->OnListViewItemStateChanged(*pListView, index1, index2, LIST_ITEM_STATUS_CHECKED); + } + break; + + case NOTIFY_TYPE_ANNEX_UNCHECK: + if (tempInvokeListViewItemCallback == true) + { + pItemListener->OnListViewItemStateChanged(*pListView, index1, index2, LIST_ITEM_STATUS_UNCHECKED); + } + break; + + case NOTIFY_TYPE_ANNEX_MORE: + if (tempInvokeListViewItemCallback == true) + { + pItemListener->OnListViewItemStateChanged(*pListView, index1, index2, LIST_ITEM_STATUS_MORE); + } + break; + + case NOTIFY_TYPE_SELCTED_CONTEXT_ITEM: + if (tempInvokeListViewItemCallback == true) + { + pItemListener->OnListViewContextItemStateChanged(*pListView, index1, index2, LIST_CONTEXT_ITEM_STATUS_SELECTED); + } + break; + + case NOTIFY_TYPE_SWEPT_ITEM: + if (tempInvokeListViewItemCallback == true) + { + if (index2 == SWEEP_DIRECTION_LEFT) + { + pItemListener->OnListViewItemSwept(*pListView, index1, SWEEP_DIRECTION_LEFT); + } + else + { + pItemListener->OnListViewItemSwept(*pListView, index1, SWEEP_DIRECTION_RIGHT); + } + } + break; + + case NOTIFY_TYPE_LONG_PRESSED_ITEM: + pItemListener->OnListViewItemLongPressed(*pListView, index1, index2, __invokeListViewItemCallback); + break; + + case NOTIFY_TYPE_REORDERED_ITEM: + if (tempInvokeListViewItemCallback == true) + { + pItemListener->OnListViewItemReordered(*pListView, index1, index2); + } + break; + + default: + return; + } + + } + else if (__className == CLASSNAME_GROUPEDLISTVIEW) // GroupedListView + { + IGroupedListViewItemEventListener* pItemListener = dynamic_cast(&listener); + SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, + ("[E_INVALID_ARG] invalid listener type.")); + + GroupedListView* pGroupedListView = dynamic_cast(GetSource()); + SysAssertf(pGroupedListView != null, "Not yet constructed. Construct() should be called before use."); + + if (index3 < 0) + { + index3 = -1; + } + + switch (pEventArg->GetNotifyType()) + { + case NOTIFY_TYPE_SELECTED_ITEM: + if (tempInvokeGroupedListViewItemCallback == true) + { + if (index2 == -1) + { + pItemListener->OnGroupedListViewGroupItemSelected(*pGroupedListView, index1); + break; + } + + pItemListener->OnGroupedListViewItemStateChanged(*pGroupedListView, index1, index2, index3, LIST_ITEM_STATUS_SELECTED); + } + break; + + case NOTIFY_TYPE_HIGHLIGHED_ITEM: + if (tempInvokeGroupedListViewItemCallback == true) + { + pItemListener->OnGroupedListViewItemStateChanged(*pGroupedListView, index1, index2, index3, LIST_ITEM_STATUS_HIGHLIGHTED); + } + break; + + case NOTIFY_TYPE_ANNEX_CHECK: + if (tempInvokeGroupedListViewItemCallback == true) + { + pItemListener->OnGroupedListViewItemStateChanged(*pGroupedListView, index1, index2, index3, LIST_ITEM_STATUS_CHECKED); + } + break; + + case NOTIFY_TYPE_ANNEX_UNCHECK: + if (tempInvokeGroupedListViewItemCallback == true) + { + pItemListener->OnGroupedListViewItemStateChanged(*pGroupedListView, index1, index2, index3, LIST_ITEM_STATUS_UNCHECKED); + } + break; + + case NOTIFY_TYPE_ANNEX_MORE: + if (tempInvokeGroupedListViewItemCallback == true) + { + pItemListener->OnGroupedListViewItemStateChanged(*pGroupedListView, index1, index2, index3, LIST_ITEM_STATUS_MORE); + } + break; + + case NOTIFY_TYPE_SELCTED_CONTEXT_ITEM: + if (tempInvokeGroupedListViewItemCallback == true) + { + pItemListener->OnGroupedListViewContextItemStateChanged(*pGroupedListView, index1, index2, index3, LIST_CONTEXT_ITEM_STATUS_SELECTED); + } + break; + + case NOTIFY_TYPE_SWEPT_ITEM: + if (tempInvokeGroupedListViewItemCallback == true) + { + if (index3 == SWEEP_DIRECTION_LEFT) + { + pItemListener->OnGroupedListViewItemSwept(*pGroupedListView, index1, index2, SWEEP_DIRECTION_LEFT); + } + else + { + pItemListener->OnGroupedListViewItemSwept(*pGroupedListView, index1, index2, SWEEP_DIRECTION_RIGHT); + } + } + break; + + case NOTIFY_TYPE_LONG_PRESSED_ITEM: + if (index2 != -1) + { + pItemListener->OnGroupedListViewItemLongPressed(*pGroupedListView, index1, index2, index3, __invokeGroupedListViewItemCallback); + } + break; + + case NOTIFY_TYPE_REORDERED_ITEM: + if (tempInvokeListViewItemCallback == true) + { + pItemListener->OnGroupedListViewItemReordered(*pGroupedListView, index1, index2, index3, index4); + } + break; + + default: + return; + } + } +} + +}}} // Tizen::Ui::Controls + diff --git a/src/ui/controls/FUiCtrl_ListItemEventArg.cpp b/src/ui/controls/FUiCtrl_ListItemEventArg.cpp new file mode 100644 index 0000000..7ef9ed1 --- /dev/null +++ b/src/ui/controls/FUiCtrl_ListItemEventArg.cpp @@ -0,0 +1,88 @@ +// +// 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_ListItemEventArg.cpp + * @brief This is the implementation file for _ListItemEventArg class. + * + * This file contains the implementation of _ListItemEventArg class. + */ + +#include +#include "FUiCtrl_ListItemEventArg.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_ListItemEventArg::_ListItemEventArg(int arg1, int arg2, int arg3, int arg4, NotifyType type) + : __arg1(arg1) + , __arg2(arg2) + , __arg3(arg3) + , __arg4(arg4) + , __type(type) +{ + // nothing +} + +_ListItemEventArg::~_ListItemEventArg(void) +{ + // nothing +} + +int +_ListItemEventArg::GetEventArg1(void) const +{ + return __arg1; +} + +int +_ListItemEventArg::GetEventArg2(void) const +{ + return __arg2; +} + +int +_ListItemEventArg::GetEventArg3(void) const +{ + return __arg3; +} + +int +_ListItemEventArg::GetEventArg4(void) const +{ + return __arg4; +} + +void +_ListItemEventArg::GetEventArgs(int& arg1, int& arg2, int& arg3, int& arg4) +{ + arg1 = __arg1; + arg2 = __arg2; + arg3 = __arg3; + arg4 = __arg4; +} + +NotifyType +_ListItemEventArg::GetNotifyType(void) const +{ + return __type; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_ListViewContextItem.cpp b/src/ui/controls/FUiCtrl_ListViewContextItem.cpp new file mode 100644 index 0000000..94c2abb --- /dev/null +++ b/src/ui/controls/FUiCtrl_ListViewContextItem.cpp @@ -0,0 +1,398 @@ +// +// 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_ListViewContextItem.cpp + * @brief This is the implementation file for _ListViewContextItem class. + * + * This file contains the implementation of _ListViewContextItem class. + */ + +#include +#include "FUi_Math.h" +#include "FUi_ResourceManager.h" +#include "FUiCtrl_ListViewContextItem.h" + +#ifdef MEMORY_LEAK_CHECK +#include "mem_leak_check.h" +#endif + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_ListViewContextItem::_ListViewContextItem(float itemHeight) + : _TableViewItem(itemHeight) + , __itemWidth(0.0f) + , __elementYPosition(0.0f) +{ + GET_SHAPE_CONFIG(LISTVIEW::CONTEXTITEM_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __margin); + GET_SHAPE_CONFIG(LISTVIEW::CONTEXTITEM_ELEMENT_SPACING, _CONTROL_ORIENTATION_PORTRAIT, __elementSpacing); + GET_SHAPE_CONFIG(LISTVIEW::CONTEXTITEM_ELEMENT_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, __elementHeight); + + SetBackgroundColor(Color(0, 0, 0, 0)); +} + +_ListViewContextItem::~_ListViewContextItem(void) +{ + for (int i = __elements.size() - 1; i >= 0; i--) + { + _ListViewContextItemElement element = __elements.at(i); + + DetachChild(*(element.pButton)); + + delete element.pButton; + element.pButton = null; + + __elements.pop_back(); + } + + __elements.clear(); +} + +_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] Memory allocation failed."); + + pItem->AcquireHandle(); + + result r = pItem->Initialize(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r = E_SYSTEM, "[E_SYSTEM] Unable to create TableView Item"); + + return pItem; + +CATCH: + delete pItem; + + return null; +} + +bool +_ListViewContextItem::AddElement(int elementId, const String& text, bool enable) +{ + if (text.IsEmpty() || HasElement(elementId)) + { + return false; + } + + _ListViewContextItemElement contextElement; + memset(&contextElement, 0, sizeof(_ListViewContextItemElement)); + + contextElement.elementId = elementId; + contextElement.pButton = _Button::CreateButtonN(); + SysTryReturn(NID_UI_CTRL, (contextElement.pButton != null), false, E_OUT_OF_MEMORY, "E_OUT_OF_MEMORY] Memory allocation failed."); + + __elements.push_back(contextElement); + + AdjustElementLayout(GetBoundsF()); + + contextElement.pButton->SetActionId(elementId); + contextElement.pButton->SetEnableState(enable); + contextElement.pButton->SetText(text); + + AttachChild(*(contextElement.pButton)); + + return true; +} + +bool +_ListViewContextItem::AddElement(int elementId, const Bitmap* pNormalBitmap, const Bitmap* pPressedBitmap, + const Bitmap* pHighlightedBitmap, bool enable) +{ + if ((pNormalBitmap == null) || (pPressedBitmap == null) || HasElement(elementId)) + { + return false; + } + + _ListViewContextItemElement contextElement; + memset(&contextElement, 0, sizeof(_ListViewContextItemElement)); + + contextElement.elementId = elementId; + contextElement.pButton = _Button::CreateButtonN(); + SysTryReturn(NID_UI_CTRL, (contextElement.pButton != null), false, E_OUT_OF_MEMORY, "E_OUT_OF_MEMORY] Memory allocation failed."); + + __elements.push_back(contextElement); + + AdjustElementLayout(GetBoundsF()); + + contextElement.pButton->SetActionId(elementId); + contextElement.pButton->SetEnableState(enable); + contextElement.pButton->SetBackgroundBitmap(_BUTTON_STATUS_NORMAL, *pNormalBitmap); + contextElement.pButton->SetBackgroundBitmap(_BUTTON_STATUS_PRESSED, *pPressedBitmap); + + if (pHighlightedBitmap != null) + { + contextElement.pButton->SetBackgroundBitmap(_BUTTON_STATUS_HIGHLIGHTED, *pHighlightedBitmap); + } + + AttachChild(*(contextElement.pButton)); + + return true; +} + +bool +_ListViewContextItem::AddElement(int elementId, const String& text, const Bitmap* pNormalBitmap, const Bitmap* pPressedBitmap, + const Bitmap* pHighlightedBitmap, bool enable) +{ + bool ret = AddElement(elementId, pNormalBitmap, pPressedBitmap, pHighlightedBitmap, enable); + + _ListViewContextItemElement* pElement = GetElement(elementId); + + if ((ret) && (pElement != null)) + { + pElement->pButton->SetMargin(0.0f, 0.0f, 0.0f, 0.0f); + pElement->pButton->SetText(text); + + return true; + } + + return false; +} + +bool +_ListViewContextItem::SetElementTextColor(int elementId, ListViewContextItemElementDrawingStatus status, const Color& textColor) +{ + result r = E_SYSTEM; + _ListViewContextItemElement* pElement = GetElement(elementId); + + if (pElement != null) + { + r = pElement->pButton->SetTextColor(GetButtonDrawingStatus(status), textColor); + } + + return (r == E_SUCCESS); +} + +Color +_ListViewContextItem::GetElementTextColor(int elementId, ListViewContextItemElementDrawingStatus status) const +{ + _ListViewContextItemElement* pElement = GetElement(elementId); + + if (pElement != null) + { + return pElement->pButton->GetTextColor(GetButtonDrawingStatus(status)); + } + + return Color(0); +} + +bool +_ListViewContextItem::SetElementBackgroundColor(int elementId, ListViewContextItemElementDrawingStatus status, const Color& backgroundColor) +{ + result r = E_SYSTEM; + _ListViewContextItemElement* pElement = GetElement(elementId); + + if (pElement != null) + { + r = pElement->pButton->SetColor(GetButtonDrawingStatus(status), backgroundColor); + } + + return (r == E_SUCCESS); +} + +Color +_ListViewContextItem::GetElementBackgroundColor(int elementId, ListViewContextItemElementDrawingStatus status) const +{ + _ListViewContextItemElement* pElement = GetElement(elementId); + + if (pElement != null) + { + return pElement->pButton->GetColor(GetButtonDrawingStatus(status)); + } + + return Color(0); +} + +_ButtonStatus +_ListViewContextItem::GetButtonDrawingStatus(ListViewContextItemElementDrawingStatus status) const +{ + _ButtonStatus buttonStatus; + + switch (status) + { + case LISTVIEW_CONTEXTITEM_ELEMENT_STATUS_NORMAL: + buttonStatus = _BUTTON_STATUS_NORMAL; + break; + + case LISTVIEW_CONTEXTITEM_ELEMENT_STATUS_PRESSED: + buttonStatus = _BUTTON_STATUS_PRESSED; + break; + + case LISTVIEW_CONTEXTITEM_ELEMENT_STATUS_HIGHLIGHTED: + buttonStatus = _BUTTON_STATUS_HIGHLIGHTED; + break; + + default: + buttonStatus = _BUTTON_STATUS_NORMAL; + break; + } + + return buttonStatus; +} + +void +_ListViewContextItem::AdjustElementLayout(FloatRectangle bounds) +{ + int elementCount = __elements.size(); + FloatRectangle elementBounds; + + if ((elementCount <= 0) || (bounds.width <= 0.0f) || (bounds.height <= 0.0f)) + { + return; + } + + // Calculate horizontal value + if (elementCount == 1) + { + float margin = 0.0f; + GET_SHAPE_CONFIG(LISTVIEW::CONTEXTITEM_LEFT_MARGIN_ONE, _CONTROL_ORIENTATION_PORTRAIT, margin); + + elementBounds.x = __margin + margin; + elementBounds.width = (bounds.width - ((__margin + margin) * 2.0f)); + } + else + { + elementBounds.x = __margin; + elementBounds.width = ((bounds.width - __margin * 2.0f) - (__elementSpacing * (elementCount - 1))) / elementCount; + } + + // Calculate vertical value + elementBounds.y = (bounds.height - __elementHeight) / 2.0f; + elementBounds.height = __elementHeight; + __elementYPosition = elementBounds.y; + + _LinkedList <_ListViewContextItemElement>::_Iterator iter; + + for (iter = __elements.begin(); iter != __elements.end(); iter++) + { + if (iter->pButton != null) + { + iter->pButton->SetBounds(elementBounds); + } + + elementBounds.x += (elementBounds.width + __elementSpacing); + } +} + +_ListViewContextItemElement* +_ListViewContextItem::GetElement(int elementId) const +{ + _LinkedList <_ListViewContextItemElement>::_Iterator iter; + + for (iter = __elements.begin(); iter != __elements.end(); iter++) + { + if (iter->elementId == elementId) + { + return &(*iter); + } + } + + return null; +} + +bool +_ListViewContextItem::HasElement(int elementId) +{ + _ListViewContextItemElement* pElement = GetElement(elementId); + + return (pElement != null); +} + +int +_ListViewContextItem::GetElementIdFromPosition(const FloatPoint& position) const +{ + _LinkedList <_ListViewContextItemElement>::_ReverseIterator reverseIter; + + for (reverseIter = __elements.rbegin(); reverseIter != __elements.rend(); reverseIter++) + { + if ((*reverseIter).pButton->GetBoundsF().Contains(position)) + { + return (*reverseIter).elementId; + } + } + + return -1; +} + +void +_ListViewContextItem::AddContextItemEventListener(_IActionEventListener& listener) +{ + if (__elements.size() > 0) + { + _LinkedList <_ListViewContextItemElement>::_Iterator iter; + + for (iter = __elements.begin(); iter != __elements.end(); iter++) + { + iter->pButton->AddActionEventListener(listener); + } + } +} + +void +_ListViewContextItem::RemoveContextItemEventListener(_IActionEventListener& listener) +{ + if (__elements.size() > 0) + { + _LinkedList <_ListViewContextItemElement>::_Iterator iter; + + for (iter = __elements.begin(); iter != __elements.end(); iter++) + { + iter->pButton->RemoveActionEventListener(listener); + } + } +} + +void +_ListViewContextItem::AdjustItemBounds(FloatRectangle& bounds) +{ + if (!_FloatCompare(bounds.width, __itemWidth) || !_FloatCompare(GetSizeF().height, bounds.height)) + { + AdjustElementLayout(FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height)); + __itemWidth = bounds.width; + } +} + +result +_ListViewContextItem::OnBoundsChanging(const FloatRectangle& bounds) +{ + float elementYPosition = (bounds.height - __elementHeight) / 2.0f; + if (!_FloatCompare(GetSizeF().height, bounds.height) || !_FloatCompare(__elementYPosition, elementYPosition)) + { + AdjustElementLayout(FloatRectangle(0.0f, 0.0f, __itemWidth, bounds.height)); + } + + return E_SUCCESS; +} + +void +_ListViewContextItem::OnFontChanged(Font* pFont) +{ + String fontName = GetFont(); + + _LinkedList <_ListViewContextItemElement>::_Iterator iter; + + for (iter = __elements.begin(); iter != __elements.end(); iter++) + { + iter->pButton->SetFont(fontName); + } +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_ListViewImpl.cpp b/src/ui/controls/FUiCtrl_ListViewImpl.cpp new file mode 100644 index 0000000..d2a985c --- /dev/null +++ b/src/ui/controls/FUiCtrl_ListViewImpl.cpp @@ -0,0 +1,2180 @@ +// +// 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_ListViewImpl.cpp + * @brief This is the implementation file for _ListViewImpl class. + * + * This file contains the implementation of _ListViewImpl class. + */ + +#include +#include +#include +#include "FUi_AccessibilityContainer.h" +#include "FUi_AccessibilityElement.h" +#include "FUi_AccessibilityManager.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_Math.h" +#include "FUi_ITouchLongPressGestureEventListener.h" +#include "FUi_ResourceManager.h" +#include "FUi_TouchEventArg.h" +#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" +#include "FUiCtrl_ListItemEvent.h" +#include "FUiCtrl_ListItemEventArg.h" +#include "FUiCtrl_ListViewImpl.h" +#include "FUiCtrl_ListViewItem.h" +#include "FUiCtrl_ListViewItemProviderAdaptor.h" +#include "FUiCtrl_PublicLinkEvent.h" +#include "FUiCtrl_ScrollEvent.h" +#include "FUiCtrl_ScrollEventArg.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Base::Utility; +using namespace Tizen::Graphics; +using namespace Tizen::Graphics::_Text; + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _ListViewImpl::_ListViewPropagatedTouchEventListener + : public Tizen::Ui::_IPropagatedTouchEventListener + , public Tizen::Ui::_ITouchLongPressGestureEventListener +{ +public: + + _ListViewPropagatedTouchEventListener(_ListViewImpl& impl) + : __impl(impl) + , __core(impl.GetCore()) + , __public(impl.GetPublic()) + , __oldPreviousPressedTime(0) + , __previousPressedTime(0) + , __currentPressedTime(0) + , __previousPressedPoint(0.0f, 0.0f) + , __currentPressedPoint(0.0f, 0.0f) + , __pLongPressedGesture(null) + { + __pTouchManager = _TouchManager::GetInstance(); + SysTryReturnVoidResult(NID_UI_CTRL, (__pTouchManager != null), E_SYSTEM, "[E_SYSTEM] System error occurred."); + + // Add _TouchLongPressGestureDetector + __pLongPressedGesture = new (std::nothrow) _TouchLongPressGestureDetector(); + 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); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] propagating.", GetErrorMessage(r)); + } + + virtual ~_ListViewPropagatedTouchEventListener(void) + { + if (__pLongPressedGesture != null) + { + __pLongPressedGesture->RemoveGestureListener(*this); + __core.RemoveGestureDetector(*__pLongPressedGesture); + + delete __pLongPressedGesture; + __pLongPressedGesture = null; + } + } + + virtual bool OnTouchPressed(const _Control& source, const _TouchInfo& touchInfo) + { + return __impl.CallOnTouchPressed(source, touchInfo); + } + + virtual bool OnTouchReleased(const _Control& source, const _TouchInfo& touchInfo) + { + return __impl.CallOnTouchReleased(source, touchInfo); + } + + virtual bool OnTouchMoved(const _Control& source, const _TouchInfo& touchInfo) + { + return __impl.CallOnTouchMoved(source, touchInfo); + } + + virtual bool OnTouchCanceled(const _Control& source, const _TouchInfo& touchInfo) + { + return __impl.CallOnTouchCanceled(source, touchInfo); + } + + virtual _UiTouchEventDelivery OnPreviewTouchPressed(const _Control& source, const _TouchInfo& touchInfo) + { + _UiTouchEventDelivery isFiltered = _UI_TOUCH_EVENT_DELIVERY_NO; + IPropagatedTouchEventListener* pListener = __impl.GetPublicPropagatedTouchEventListener(); + + if (pListener != null) + { + Control& control = __impl.GetPublic(); + + TouchEventInfo publicTouchInfo; + + _TouchEventArg* pEventArg = GetTouchEventArgN(touchInfo); + SysTryReturn(NID_UI, pEventArg, _UI_TOUCH_EVENT_DELIVERY_YES, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + publicTouchInfo.Construct(*pEventArg); + + if (pEventArg) + { + delete pEventArg; + pEventArg = null; + } + + if (pListener->OnTouchPressed(control, publicTouchInfo) == true) + { + return _UI_TOUCH_EVENT_DELIVERY_NO; + } + } + + // public TouchEventListener + if (ProcessTouchEventListener(touchInfo) == true) + { + return _UI_TOUCH_EVENT_DELIVERY_NO; + } + + if (__core.Equals(source)) + { + return _UI_TOUCH_EVENT_DELIVERY_NO; + } + + isFiltered = __impl.OnPreviewTouchPressed(__impl, touchInfo); + if (isFiltered == _UI_TOUCH_EVENT_DELIVERY_NO) + { + return _UI_TOUCH_EVENT_DELIVERY_NO; + } + + isFiltered = __core.OnPreviewTouchPressed(source, touchInfo); + + return isFiltered; + } + + virtual _UiTouchEventDelivery OnPreviewTouchReleased(const _Control& source, const _TouchInfo& touchInfo) + { + _UiTouchEventDelivery isFiltered = _UI_TOUCH_EVENT_DELIVERY_NO; + IPropagatedTouchEventListener* pListener = __impl.GetPublicPropagatedTouchEventListener(); + + if (pListener != null) + { + Control& control = __impl.GetPublic(); + + TouchEventInfo publicTouchInfo; + + _TouchEventArg* pEventArg = GetTouchEventArgN(touchInfo); + SysTryReturn(NID_UI, pEventArg, _UI_TOUCH_EVENT_DELIVERY_YES, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + publicTouchInfo.Construct(*pEventArg); + + if (pEventArg) + { + delete pEventArg; + pEventArg = null; + } + + if (pListener->OnTouchReleased(control, publicTouchInfo) == true) + { + return _UI_TOUCH_EVENT_DELIVERY_NO; + } + } + + // public TouchEventListener + if (ProcessTouchEventListener(touchInfo) == true) + { + return _UI_TOUCH_EVENT_DELIVERY_NO; + } + + if (__core.Equals(source)) + { + return _UI_TOUCH_EVENT_DELIVERY_NO; + } + + isFiltered = __impl.OnPreviewTouchReleased(__impl, touchInfo); + if (isFiltered == _UI_TOUCH_EVENT_DELIVERY_NO) + { + return _UI_TOUCH_EVENT_DELIVERY_NO; + } + + isFiltered = __core.OnPreviewTouchReleased(source, touchInfo); + + return isFiltered; + } + + virtual _UiTouchEventDelivery OnPreviewTouchMoved(const _Control& source, const _TouchInfo& touchInfo) + { + _UiTouchEventDelivery isFiltered = _UI_TOUCH_EVENT_DELIVERY_NO; + IPropagatedTouchEventListener* pListener = __impl.GetPublicPropagatedTouchEventListener(); + + if (pListener != null) + { + Control& control = __impl.GetPublic(); + + TouchEventInfo publicTouchInfo; + + _TouchEventArg* pEventArg = GetTouchEventArgN(touchInfo); + SysTryReturn(NID_UI, pEventArg, _UI_TOUCH_EVENT_DELIVERY_YES, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + publicTouchInfo.Construct(*pEventArg); + + if (pEventArg) + { + delete pEventArg; + pEventArg = null; + } + + if (pListener->OnTouchMoved(control, publicTouchInfo) == true) + { + return _UI_TOUCH_EVENT_DELIVERY_NO; + } + } + + // public TouchEventListener + if (ProcessTouchEventListener(touchInfo) == true) + { + return _UI_TOUCH_EVENT_DELIVERY_NO; + } + + if (__core.Equals(source)) + { + return _UI_TOUCH_EVENT_DELIVERY_NO; + } + + isFiltered = __impl.OnPreviewTouchMoved(__impl, touchInfo); + if (isFiltered == _UI_TOUCH_EVENT_DELIVERY_NO) + { + return _UI_TOUCH_EVENT_DELIVERY_NO; + } + + isFiltered = __core.OnPreviewTouchMoved(source, touchInfo); + + return isFiltered; + } + + virtual _UiTouchEventDelivery OnPreviewTouchCanceled(const _Control& source, const _TouchInfo& touchInfo) + { + IPropagatedTouchEventListener* pListener = __impl.GetPublicPropagatedTouchEventListener(); + + if (pListener != null) + { + Control& control = __impl.GetPublic(); + + TouchEventInfo publicTouchInfo; + + _TouchEventArg* pEventArg = GetTouchEventArgN(touchInfo); + SysTryReturn(NID_UI, pEventArg, _UI_TOUCH_EVENT_DELIVERY_YES, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + publicTouchInfo.Construct(*pEventArg); + + if (pEventArg) + { + delete pEventArg; + pEventArg = null; + } + + if (pListener->OnTouchCanceled(control, publicTouchInfo) == true) + { + return _UI_TOUCH_EVENT_DELIVERY_NO; + } + } + + // public TouchEventListener + if (ProcessTouchEventListener(touchInfo) == true) + { + return _UI_TOUCH_EVENT_DELIVERY_NO; + } + + return _UI_TOUCH_EVENT_DELIVERY_YES; + } + + virtual void OnTouchPressHandled(const _Control& source) + { + __impl.OnTouchPressHandled(source); + } + + virtual void OnTouchReleaseHandled(const _Control& source) + { + __impl.OnTouchReleaseHandled(source); + } + + virtual void OnTouchMoveHandled(const _Control& source) + { + __impl.OnTouchMoveHandled(source); + } + + virtual void OnTouchCancelHandled(const _Control& source) + { + __impl.OnTouchCancelHandled(source); + } + + bool OnLongPressGestureDetected(_TouchLongPressGestureDetector& gesture) + { + bool filtered = ProcessTouchEventListener(); + + if (!filtered) + { + __impl.FireListViewItemLongPressedEvent(); + } + + return filtered; + } + + bool OnLongPressGestureCanceled(_TouchLongPressGestureDetector& gesture) + { + return false; + } + +private: + + bool ProcessTouchEventListener(const _TouchInfo& touchInfo) + { + bool filtered = false; + + if (touchInfo.GetTouchStatus() == _TOUCH_PRESSED) + { + filtered = ProcessTouchDoublePressed(touchInfo); + } + + if (!filtered) + { + ProcessTouchEvent(touchInfo); + } + + filtered = __impl.IsInputEventConsumed(); + + if (filtered) + { + __impl.ResetInputEventConsumed(); + } + + return filtered; + } + + bool ProcessTouchEventListener(void) + { + // for TouchLongPressed + _TouchInfo touchInfo(0, _TOUCH_LONG_PRESSED, __currentPressedPoint, false, 0); + + return ProcessTouchEventListener(touchInfo); + } + + void ProcessTouchEvent(const _TouchInfo& touchInfo) + { + TouchEventInfo publicTouchInfo; + + _TouchEventArg* pEventArg = GetTouchEventArgN(touchInfo); + SysTryReturnVoidResult(NID_UI, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + publicTouchInfo.Construct(*pEventArg); + + _Control* pDraggedControl = __pTouchManager->GetTouchControlSource(); + + IEnumeratorT* pEnumerator = __impl.GetTouchEventListener()->GetEnumeratorN(); + if (pEnumerator) + { + while (pEnumerator->MoveNext() == E_SUCCESS) + { + IEventListener* pListener = null; + pEnumerator->GetCurrent(pListener); + + ITouchEventListener* pTouchEventListener = dynamic_cast (pListener); + if (pTouchEventListener != null) + { + FirePublicListener(*pTouchEventListener, publicTouchInfo); + + if (touchInfo.GetTouchStatus() == _TOUCH_RELEASED) + { + if (pDraggedControl == null) //if exist dragged control, don't send focus event + { + FireFocusListener(*pTouchEventListener, publicTouchInfo); + } + } + else if (touchInfo.GetTouchStatus() == _TOUCH_MOVED) + { + FireFocusListener(*pTouchEventListener, publicTouchInfo); + } + } + } + + delete pEnumerator; + } + + delete pEventArg; + } + + bool ProcessTouchDoublePressed(const _TouchInfo& touchinfo) + { + if (__pTouchManager->GetPointCount() == 1) + { + __oldPreviousPressedTime = __previousPressedTime; + __previousPressedTime = __currentPressedTime; + __currentPressedTime = touchinfo.GetTimeStamp(); + __previousPressedPoint.x = __currentPressedPoint.x; + __previousPressedPoint.y = __currentPressedPoint.y; + __currentPressedPoint.x = touchinfo.GetCurrentPosition().x; + __currentPressedPoint.y = touchinfo.GetCurrentPosition().y; + + if (Math::Abs(__previousPressedTime - __currentPressedTime) < DOUBLE_PRESS_TIME) + { + if (Math::Abs(__previousPressedTime - __oldPreviousPressedTime) > DOUBLE_PRESS_TIME) + { + if ((Math::Abs(__previousPressedPoint.x - __currentPressedPoint.x) < DOUBLE_PRESS_MOVE_ALLOWANCE) + && (Math::Abs(__previousPressedPoint.y - __currentPressedPoint.y) < DOUBLE_PRESS_MOVE_ALLOWANCE)) + { + _TouchInfo touchInfo(0, _TOUCH_DOUBLE_PRESSED, __currentPressedPoint, false, 0); + ProcessTouchEvent(touchInfo); + + return true; + } + } + } + } + + return false; + } + + void FirePublicListener(ITouchEventListener& listener, const TouchEventInfo& touchEventInfo) + { + switch (touchEventInfo.GetTouchStatus()) + { + case TOUCH_PRESSED: + listener.OnTouchPressed(__public, touchEventInfo.GetCurrentPosition(), touchEventInfo); + break; + case TOUCH_LONG_PRESSED: + listener.OnTouchLongPressed(__public, touchEventInfo.GetCurrentPosition(), touchEventInfo); + break; + case TOUCH_RELEASED: + listener.OnTouchReleased(__public, touchEventInfo.GetCurrentPosition(), touchEventInfo); + break; + case TOUCH_MOVED: + listener.OnTouchMoved(__public, touchEventInfo.GetCurrentPosition(), touchEventInfo); + break; + case TOUCH_DOUBLE_PRESSED: + listener.OnTouchDoublePressed(__public, touchEventInfo.GetCurrentPosition(), touchEventInfo); + break; + case TOUCH_FOCUS_IN: + listener.OnTouchFocusIn(__public, touchEventInfo.GetCurrentPosition(), touchEventInfo); + break; + case TOUCH_FOCUS_OUT: + listener.OnTouchFocusOut(__public, touchEventInfo.GetCurrentPosition(), touchEventInfo); + break; + case TOUCH_CANCELED: + listener.OnTouchCanceled(__public, touchEventInfo.GetCurrentPosition(), touchEventInfo); + break; + default: + break; + } + } + + void FireFocusListener(ITouchEventListener& listener, const TouchEventInfo& touchEventInfo) + { + _ControlManager* pControlManager = _ControlManager::GetInstance(); + SysTryReturnVoidResult(NID_UI, pControlManager, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + Point screenPoint(__pTouchManager->GetScreenPoint(touchEventInfo.GetPointId()).x, + __pTouchManager->GetScreenPoint(touchEventInfo.GetPointId()).y); + + _Control* pTouchedControl = pControlManager->GetTopmostTouchedControl(screenPoint); + SysTryReturnVoidResult(NID_UI, pTouchedControl, E_INVALID_CONDITION, "[E_INVALID_CONDITION] pTouchedControl is null."); + + if (__pTouchManager->GetFocusedControlSource() != pTouchedControl) + { + if (&(__core) != pTouchedControl) + { + if (__pTouchManager->GetFocusedControlSource() == &(__core)) + { + listener.OnTouchFocusOut(__public, touchEventInfo.GetCurrentPosition(), touchEventInfo); + } + } + else + { + listener.OnTouchFocusIn(__public, touchEventInfo.GetCurrentPosition(), touchEventInfo); + } + + __pTouchManager->SetFocusedControlSource(*pTouchedControl); + } + } + + _TouchEventArg* GetTouchEventArgN(const _TouchInfo& touchInfo) + { + FloatPoint startPoint; + + _TouchEventArg* pEventArg = new (std::nothrow) _TouchEventArg(__public, touchInfo.GetTouchStatus()); + 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(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); + + // need to flick distance setting + + return pEventArg; + } + +private: + static const int DOUBLE_PRESS_TIME = 500; + static const int DOUBLE_PRESS_MOVE_ALLOWANCE = 10; + + _ListViewImpl& __impl; + _Control& __core; + Control& __public; + _TouchManager* __pTouchManager; + + unsigned int __oldPreviousPressedTime; + unsigned int __previousPressedTime; + unsigned int __currentPressedTime; + Tizen::Graphics::FloatPoint __previousPressedPoint; + Tizen::Graphics::FloatPoint __currentPressedPoint; + _TouchLongPressGestureDetector* __pLongPressedGesture; +}; + +_ListViewImpl* +_ListViewImpl::GetInstance(ListView& listView) +{ + return static_cast<_ListViewImpl*>(listView._pControlImpl); +} + +const _ListViewImpl* +_ListViewImpl::GetInstance(const ListView& listView) +{ + return static_cast(listView._pControlImpl); +} + +_ListViewImpl::_ListViewImpl(ListView* pList, _TableView* pCore) + : _ControlImpl(pList, pCore) + , __pListItemEvent(null) + , __pLinkEvent(null) + , __pScrollEvent(null) + , __pFastScrollEvent(null) + , __pEmptyBitmap(null) + , __pEmptyText(null) + , __pAccessibilityElement(null) + , __redrawListView(true) + , __isOrientationChanged(false) + , __isUpdateListCalled(false) + , __needReloadItems(false) + , __pPropagatedTouchEventListener(null) +{ + GET_COLOR_CONFIG(TABLEVIEW::EMPTY_CONTENTS_TEXT_NORMAL, __emptyTextColor); +} + +_ListViewImpl::~_ListViewImpl() +{ + delete __pListItemEvent; + __pListItemEvent = null; + + delete __pLinkEvent; + __pLinkEvent = null; + + delete __pScrollEvent; + __pScrollEvent = null; + + delete __pFastScrollEvent; + __pFastScrollEvent = null; + + if (__pEmptyBitmap != null) + { + GetCore().DetachChild(*__pEmptyBitmap); + + delete __pEmptyBitmap; + __pEmptyBitmap = null; + } + + if (__pEmptyText != null) + { + GetCore().DetachChild(*__pEmptyText); + + delete __pEmptyText; + __pEmptyText = null; + } + + _AccessibilityContainer* pContainer = GetCore().GetAccessibilityContainer(); + + if ((__pAccessibilityElement != null) && (pContainer != null)) + { + pContainer->RemoveElement(__pAccessibilityElement); + } + + delete __pPropagatedTouchEventListener; + __pPropagatedTouchEventListener = null; +} + +const char* +_ListViewImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Controls::ListView"; +} + +const ListView& +_ListViewImpl::GetPublic(void) const +{ + return static_cast (_ControlImpl::GetPublic()); +} + +ListView& +_ListViewImpl::GetPublic(void) +{ + return static_cast (_ControlImpl::GetPublic()); +} + +const _TableView& +_ListViewImpl::GetCore(void) const +{ + return static_cast (_ControlImpl::GetCore()); +} + +_TableView& +_ListViewImpl::GetCore(void) +{ + return static_cast <_TableView&>(_ControlImpl::GetCore()); +} + +_ListViewImpl* +_ListViewImpl::CreateListViewImplN(ListView* pControl, bool itemDivider, ListScrollStyle scrollStyle) +{ + result r = E_SUCCESS; + TableViewScrollBarStyle scrollBarStyle; + + switch (scrollStyle) + { + case SCROLL_STYLE_FADE_OUT: + scrollBarStyle = TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT; + break; + + case SCROLL_STYLE_FIXED: + scrollBarStyle = TABLE_VIEW_SCROLL_BAR_STYLE_FIXED; + break; + + case SCROLL_STYLE_FAST_SCROLL: + scrollBarStyle = TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL; + break; + + case SCROLL_STYLE_JUMP_TO_TOP: + scrollBarStyle = TABLE_VIEW_SCROLL_BAR_STYLE_JUMP_TO_TOP; + break; + + case SCROLL_STYLE_THUMB: + scrollBarStyle = TABLE_VIEW_SCROLL_BAR_STYLE_THUMB; + break; + + case SCROLL_STYLE_FAST_SCROLL_FIXED: + scrollBarStyle = TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL_FIXED; + break; + + default: + scrollBarStyle = TABLE_VIEW_SCROLL_BAR_STYLE_NONE; + break; + } + + _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] Memory allocation failed."); + + _ListViewImpl* pImpl = new (std::nothrow) _ListViewImpl(pControl, pCore); + + r = CheckConstruction(pCore, pImpl); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), null, r, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + pImpl->__pPropagatedTouchEventListener = new (std::nothrow) _ListViewPropagatedTouchEventListener(*pImpl); + + if (pImpl->__pPropagatedTouchEventListener != null) + { + pCore->SetPropagatedTouchEventListener(pImpl->__pPropagatedTouchEventListener); + } + + return pImpl; +} + +result +_ListViewImpl::SetItemProvider(IListViewItemProvider& provider) +{ + result r = E_SUCCESS; + + _ListViewItemProviderAdaptor* pProviderAdaptor = + static_cast <_ListViewItemProviderAdaptor*>(GetCore().GetItemProviderAdaptor()); + + if (pProviderAdaptor != null) + { + IListViewItemProvider* pProvider = pProviderAdaptor->GetItemProvider(); + if (&provider == pProvider) + { + return r; + } + } + + if (pProviderAdaptor == null) + { + pProviderAdaptor = new (std::nothrow) _ListViewItemProviderAdaptor(provider); + SysTryReturn(NID_UI_CTRL, (pProviderAdaptor != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, + "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pProviderAdaptor->SetListViewItemEventListener(*this); + + r = pProviderAdaptor->SetListWidth(GetBoundsF().width); + GetCore().SetItemProviderAdaptor(pProviderAdaptor); + } + else + { + pProviderAdaptor->SetItemProvider(provider); + r = pProviderAdaptor->SetListWidth(GetBoundsF().width); + + UpdateList(); + } + + __redrawListView = true; + + SetLastResultReturn(r); +} + +result +_ListViewImpl::SetItemProvider(IListViewItemProviderF& provider) +{ + // hmkim + result r = E_SUCCESS; + + _ListViewItemProviderAdaptor* pProviderAdaptor = + static_cast <_ListViewItemProviderAdaptor*>(GetCore().GetItemProviderAdaptor()); + + if (pProviderAdaptor != null) + { + IListViewItemProviderF* pProvider = pProviderAdaptor->GetItemProviderF(); + if (&provider == pProvider) + { + return r; + } + } + + if (pProviderAdaptor == null) + { + pProviderAdaptor = new (std::nothrow) _ListViewItemProviderAdaptor(provider); + SysTryReturn(NID_UI_CTRL, (pProviderAdaptor != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, + "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pProviderAdaptor->SetListViewItemEventListener(*this); + + r = pProviderAdaptor->SetListWidth(GetBoundsF().width); + GetCore().SetItemProviderAdaptor(pProviderAdaptor); + } + else + { + pProviderAdaptor->SetItemProvider(provider); + r = pProviderAdaptor->SetListWidth(GetBoundsF().width); + + UpdateList(); + } + + __redrawListView = true; + + SetLastResultReturn(r); + + return E_SUCCESS; +} + +void +_ListViewImpl::AddListViewItemEventListener(IListViewItemEventListener& listener) +{ + result r = E_SUCCESS; + + if (__pListItemEvent == null) + { + __pListItemEvent = new (std::nothrow) _ListItemEvent(); + 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."); + } + + __pListItemEvent->AddListener(listener); + + r = GetCore().AddTableViewItemEventListener(*this); + + SetLastResult(r); +} + +void +_ListViewImpl::RemoveListViewItemEventListener(IListViewItemEventListener& listener) +{ + result r = E_SUCCESS; + + if (__pListItemEvent != null) + { + r = __pListItemEvent->RemoveListener(listener); + } + + SetLastResult(r); +} + +void +_ListViewImpl::AddFastScrollListener(IFastScrollListener& listener) +{ + result r = E_SUCCESS; + + if (__pFastScrollEvent == null) + { + __pFastScrollEvent = new (std::nothrow) _FastScrollEvent(); + 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."); + } + + __pFastScrollEvent->AddListener(listener); + + r = GetCore().AddFastScrollListener(*this); + + SetLastResult(r); +} + +void +_ListViewImpl::RemoveFastScrollListener(IFastScrollListener& listener) +{ + result r = E_SUCCESS; + + if (__pFastScrollEvent != null) + { + r = __pFastScrollEvent->RemoveListener(listener); + } + + SetLastResult(r); +} + +void +_ListViewImpl::AddScrollEventListener(IScrollEventListener& listener) +{ + result r = E_SUCCESS; + + if (__pScrollEvent == null) + { + __pScrollEvent = new (std::nothrow) _ScrollEvent(); + 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."); + } + + __pScrollEvent->AddListener(listener); + + GetCore().AddScrollEventListener(*this); + + SetLastResult(r); +} + +void +_ListViewImpl::AddScrollEventListener(IScrollEventListenerF& listener) +{ + result r = E_SUCCESS; + + if (__pScrollEvent == null) + { + __pScrollEvent = new (std::nothrow) _ScrollEvent(); + 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."); + } + + __pScrollEvent->AddListener(listener); + + GetCore().AddScrollEventListener(*this); + + SetLastResult(r); +} + +void +_ListViewImpl::RemoveScrollEventListener(IScrollEventListener& listener) +{ + result r = E_SUCCESS; + + if (__pScrollEvent != null) + { + r = __pScrollEvent->RemoveListener(listener); + } + + SetLastResult(r); +} + +void +_ListViewImpl::RemoveScrollEventListener(IScrollEventListenerF& listener) +{ + result r = E_SUCCESS; + + if (__pScrollEvent != null) + { + r = __pScrollEvent->RemoveListener(listener); + } + + SetLastResult(r); +} + +void +_ListViewImpl::AddUiLinkEventListener(const IUiLinkEventListener& listener) +{ + result r = E_SUCCESS; + + if (__pLinkEvent == null) + { + __pLinkEvent = _PublicLinkEvent::CreateInstanceN(GetPublic()); + SysTryReturnVoidResult(NID_UI_CTRL, (__pLinkEvent != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + } + + r = __pLinkEvent->AddListener(listener); + + SetLastResult(r); +} + + +void +_ListViewImpl::RemoveUiLinkEventListener(const IUiLinkEventListener& listener) +{ + result r = E_SUCCESS; + + if (__pLinkEvent != null) + { + r = __pLinkEvent->RemoveListener(listener); + } + + SetLastResult(r); +} + +result +_ListViewImpl::SetSweepEnabled(bool enable) +{ + GetCore().SetSweepEnabled(enable); + + SetLastResultReturn(E_SUCCESS); +} + +result +_ListViewImpl::SetFastScrollIndex(const String& text, bool useSearchIcon) +{ + result r = GetCore().SetFastScrollIndex(text, useSearchIcon); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS) || (r == E_SYSTEM), E_INVALID_STATE, E_INVALID_STATE, + "[E_INVALID_STATE] This instance is in an invalid state."); + + SetLastResultReturn(r); +} + +int +_ListViewImpl::GetTopDrawnItemIndex(void) const +{ + result r = E_SUCCESS; + int groupIndex = -1; + int itemIndex = -1; + + r = GetCore().GetTopDrawnItemIndex(groupIndex, itemIndex); + SetLastResult(r); + + return itemIndex; +} + +int +_ListViewImpl::GetBottomDrawnItemIndex(void) const +{ + result r = E_SUCCESS; + int groupIndex = -1; + int itemIndex = -1; + + r = GetCore().GetBottomDrawnItemIndex(groupIndex, itemIndex); + SetLastResult(r); + + return itemIndex; +} + +result +_ListViewImpl::ScrollToItem(int index, ListScrollItemAlignment itemAlignment) +{ + result r = E_SUCCESS; + + if (itemAlignment == LIST_SCROLL_ITEM_ALIGNMENT_TOP) + { + r = GetCore().SetTopDrawnItemIndex(0, index); + } + else if (itemAlignment == LIST_SCROLL_ITEM_ALIGNMENT_BOTTOM) + { + r = GetCore().SetBottomDrawnItemIndex(0, index); + } + else + { + SysTryReturn(NID_UI_CTRL, false, E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] The specified itemAlignment is out of range."); + } + + SetLastResultReturn(r); +} + +result +_ListViewImpl::SetItemChecked(int index, bool check) +{ + return GetCore().SetItemChecked(0, index, check); +} + +bool +_ListViewImpl::IsItemChecked(int index) const +{ + return GetCore().IsItemChecked(0, index); +} + +result +_ListViewImpl::SetItemEnabled(int index, bool enable) +{ + return GetCore().SetItemEnabled(0, index, enable); +} + +bool +_ListViewImpl::IsItemEnabled(int index) const +{ + return GetCore().IsItemEnabled(0, index); +} + +int +_ListViewImpl::GetItemCount(void) const +{ + return GetCore().GetItemCountAt(0); +} + +result +_ListViewImpl::ShowItemDescriptionText(int index) +{ + return SetItemDescriptionTextShowState(index, true); +} + +result +_ListViewImpl::HideItemDescriptionText(int index) +{ + return SetItemDescriptionTextShowState(index, false); +} + +result +_ListViewImpl::SetItemDescriptionTextShowState(int index, bool show) +{ + result r = E_SUCCESS; + + SysTryReturn(NID_UI_CTRL, (index >= 0) && (index < GetItemCount()), E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] The specified index is out of range."); + + _ListViewItemProviderAdaptor* pProviderAdaptor = + static_cast <_ListViewItemProviderAdaptor*>(GetCore().GetItemProviderAdaptor()); + SysTryReturn(NID_UI_CTRL, (pProviderAdaptor != null), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] _ListItemProviderAdaptor is not set."); + + // Save description text show state to provider adaptor + pProviderAdaptor->SetDescriptionTextShowState(index, show); + + if (GetCore().FindItem(0, index) != null) + { + r = GetCore().RefreshTableView(0, index, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY); + } + + SetLastResultReturn(r); +} + +result +_ListViewImpl::RefreshList(int index, ListRefreshType type) +{ + result r = E_SUCCESS; + + if (__needReloadItems) + { + return r; + } + + int itemCount = GetCore().GetItemCountAt(0); + + if ((index < 0) || (index > itemCount) || ((type != LIST_REFRESH_TYPE_ITEM_ADD) && (index == itemCount))) + { + SysLogException(NID_UI_CTRL, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The index is out of range."); + return E_OUT_OF_RANGE; + } + + if (type == LIST_REFRESH_TYPE_ITEM_MODIFY) + { + if (IsContextItemOpened(index)) + { + CloseContextItem(index); + } + + int topGroupIndex = -1; + int topItemIndex = -1; + int bottomGroupIndex = -1; + int bottomItemIndex = -1; + + GetCore().GetFirstLoadedItemIndex(topGroupIndex, topItemIndex); + GetCore().GetLastLoadedItemIndex(bottomGroupIndex, bottomItemIndex); + + if ((topItemIndex <= index) && (bottomItemIndex >= index)) + { + _ListViewItem* pListViewItem = static_cast<_ListViewItem*>(GetCore().FindItem(0, index)); + _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); + pListViewItem = null; + } + + // item unload + GetCore().UnloadItem(0, index); + // item load + pListViewItem = static_cast<_ListViewItem*>(GetCore().LoadItem(0, index)); + + if (needChangeEventTarget && (pListViewItem != null)) + { + pListViewItem->SetCurrentStatus(itemStatus); + + _Control* pTarget = static_cast<_Control*>(pListViewItem); + + for (int i = 0; i < pListViewItem->GetChildCount(); i++) + { + if (pListViewItem->GetChild(i)->GetBoundsF().Contains(itemStatus.currentTouchPosition)) + { + pTarget = pListViewItem->GetChild(i); + } + } + + // change touch event target + 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 + { + // not yet loaded item + SetLastResultReturn(r); + } + } + else + { + r = GetCore().RefreshTableView(0, index, static_cast(type)); + } + + CheckEmptyListShowState(); + + Draw(); + Show(); + + SetLastResultReturn(r); +} + +result +_ListViewImpl::RefreshList(int index, int elementId) +{ + if ((index < 0) || (index >= GetCore().GetItemCountAt(0))) + { + return E_OUT_OF_RANGE; + } + + result r = E_SUCCESS; + _ListViewItem* pListViewItem = static_cast<_ListViewItem*>(GetCore().FindItem(0, index)); + + if (pListViewItem != null) + { + r = (pListViewItem->RefreshElement(elementId)) ? E_SUCCESS : E_OUT_OF_RANGE; + } + + SetLastResultReturn(r); +} + +result +_ListViewImpl::UpdateList(bool isRestoreAnnexFocusValue) +{ + __needReloadItems = true; + + result r = GetCore().UpdateTableView(isRestoreAnnexFocusValue); + + CheckEmptyListShowState(); + + Invalidate(true); + + // API versioning for initial Show() operation + if (Tizen::App::_AppInfo::GetApiVersion() == _API_VERSION_2_0 && Tizen::App::_AppInfo::IsOspCompat()) + { + Show(); + } + + __needReloadItems = false; + + SetLastResultReturn(r); +} + +void +_ListViewImpl::SetItemNeedsLazyDeletion(_ListViewItem* pItem) +{ + _ListViewItemProviderAdaptor* pProviderAdaptor = static_cast <_ListViewItemProviderAdaptor*>(GetCore().GetItemProviderAdaptor()); + + if (pProviderAdaptor != null) + { + pProviderAdaptor->SetItemNeedsLazyDeletion(pItem); + } +} + +int +_ListViewImpl::GetItemIndexFromPosition(const FloatPoint& position) const +{ + int groupIndex = -1; + int itemIndex = -1; + + GetCore().GetItemIndexFromPosition(position, groupIndex, itemIndex); + + return itemIndex; +} + +result +_ListViewImpl::GetItemIndexFromPosition(const FloatPoint& position, int& itemIndex, int& elementId) const +{ + int groupIndex = -1; + elementId = -1; + + result r = GetCore().GetItemIndexFromPosition(position, groupIndex, itemIndex); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] There is no item at the specified position."); + + _ListViewItem* pListViewItem = static_cast<_ListViewItem*>(GetCore().FindItem(0, itemIndex)); + + if (pListViewItem != null) + { + FloatPoint originPosition = pListViewItem->GetPositionF(); + originPosition.y -= GetCore().GetScrollPosition(); + + elementId = pListViewItem->GetElementIdFromPosition(FloatPoint(position.x - originPosition.x, position.y - originPosition.y)); + } + + SetLastResultReturn(r); +} + +result +_ListViewImpl::SetItemDividerColor(const Color& color) +{ + return GetCore().SetItemDividerColor(color); +} + +Color +_ListViewImpl::GetItemDividerColor(void) const +{ + return GetCore().GetItemDividerColor(); +} + +void +_ListViewImpl::AdjustLayoutOfEmptyList(void) +{ + FloatDimension listDimension = GetCore().GetSizeF(); + FloatDimension emptyBitmap; + FloatDimension emptyText; + FloatPoint bitmapPos; + FloatPoint textPos; + float totalHeight = 0.0f; + float horizontalSpacing = 0.0f; + + if (__pEmptyBitmap != null) + { + emptyBitmap = __pEmptyBitmap->GetSizeF(); + } + + if (__pEmptyText != null) + { + emptyText = __pEmptyText->GetSizeF(); + + if (__pEmptyBitmap != null) + { + GET_SHAPE_CONFIG(LISTVIEW::EMPTY_LIST_HORIZONTAL_SPACING, _CONTROL_ORIENTATION_PORTRAIT, horizontalSpacing); + } + } + + totalHeight = emptyBitmap.height + horizontalSpacing + emptyText.height; + + if ((__pEmptyBitmap != null) && (__pEmptyText != null) && (totalHeight < listDimension.height)) + { + bitmapPos.x = ((_FloatCompare(listDimension.width, emptyBitmap.width)) ? 0.0f : (listDimension.width - emptyBitmap.width) / 2.0f); + bitmapPos.y = (listDimension.height - totalHeight) / 2.0f; + + textPos.x = ((_FloatCompare(listDimension.width, emptyText.width)) ? 0.0f : (listDimension.width - emptyText.width) / 2.0f); + textPos.y = bitmapPos.y + emptyBitmap.height + horizontalSpacing; + } + else + { + if (__pEmptyBitmap != null) + { + bitmapPos.x = ((_FloatCompare(listDimension.width, emptyBitmap.width)) ? 0.0f : (listDimension.width - emptyBitmap.width) / 2.0f); + bitmapPos.y = ((listDimension.height <= totalHeight) ? 0.0f : (listDimension.height - totalHeight) / 2.0f); + } + + 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); + } + } + + if (__pEmptyBitmap != null) + { + __pEmptyBitmap->SetPosition(bitmapPos); + } + if (__pEmptyText != null) + { + __pEmptyText->SetPosition(textPos); + } + + CheckEmptyListShowState(); + Invalidate(true); +} + +void +_ListViewImpl::CheckEmptyListShowState(void) +{ + bool isEmpty = (GetItemCount() <= 0); + + if (__pEmptyBitmap != null) + { + __pEmptyBitmap->SetVisibleState(isEmpty); + } + if (__pEmptyText != null) + { + __pEmptyText->SetVisibleState(isEmpty); + } + + _AccessibilityContainer* pContainer = GetCore().GetAccessibilityContainer(); + + if (_AccessibilityManager::IsActivated() && (pContainer != null)) + { + if (isEmpty) + { + if (__pAccessibilityElement == null) + { + __pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true); + + SysTryReturnVoidResult(NID_UI_CTRL, (__pAccessibilityElement != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + __pAccessibilityElement->SetName(L"ListView"); + + pContainer->RemoveAllElement(); + pContainer->AddElement(*__pAccessibilityElement); + } + + Rectangle bounds = GetBounds(); + __pAccessibilityElement->SetBounds(Rectangle(0, 0, bounds.width, bounds.height)); + + String accessibilityLable; + + if (__pEmptyBitmap != null) + { + __pEmptyBitmap->GetAccessibilityContainer()->Activate(false); + + accessibilityLable += L"Image, "; + } + if (__pEmptyText != null) + { + __pEmptyText->GetAccessibilityContainer()->Activate(false); + + accessibilityLable += __pEmptyText->GetText(); + accessibilityLable += L", "; + } + + accessibilityLable += L"No items"; + + __pAccessibilityElement->SetLabel(accessibilityLable); + } + else + { + if (__pAccessibilityElement != null) + { + if (pContainer->RemoveElement(*__pAccessibilityElement) != E_SUCCESS) + { + delete __pAccessibilityElement; + } + __pAccessibilityElement = null; + } + } + } +} + +result +_ListViewImpl::SetBitmapOfEmptyList(const Bitmap* pBitmap) +{ + if (pBitmap == null) + { + if (__pEmptyBitmap != null) + { + GetCore().DetachChild(*__pEmptyBitmap); + + delete __pEmptyBitmap; + __pEmptyBitmap = null; + } + } + else + { + if (__pEmptyBitmap == null) + { + __pEmptyBitmap = _Label::CreateLabelN(); + SysTryReturn(NID_UI_CTRL, (__pEmptyBitmap != null), E_SYSTEM, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + __pEmptyBitmap->SetVisibleState(false); + __pEmptyBitmap->SetMargin(0.0f, 0.0f); + + GetCore().AttachChild(*__pEmptyBitmap); + } + + __pEmptyBitmap->SetSize(FloatDimension(pBitmap->GetWidthF(), pBitmap->GetHeightF())); + __pEmptyBitmap->SetBackgroundColor(Color(0, 0, 0, 0)); + __pEmptyBitmap->SetBackgroundBitmap(*pBitmap); + } + + AdjustLayoutOfEmptyList(); + + SetLastResultReturn(E_SUCCESS); +} + +result +_ListViewImpl::SetTextOfEmptyList(const String& text) +{ + if (text.IsEmpty()) + { + if (__pEmptyText != null) + { + GetCore().DetachChild(*__pEmptyText); + + delete __pEmptyText; + __pEmptyText = null; + } + } + else + { + if (__pEmptyText == null) + { + __pEmptyText = _Label::CreateLabelN(); + SysTryReturn(NID_UI_CTRL, (__pEmptyText != null), E_SYSTEM, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + __pEmptyText->SetVisibleState(false); + __pEmptyText->SetMargin(0.0f, 0.0f); + + GetCore().AttachChild(*__pEmptyText); + } + + 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(); + + TextSimple* pSimpleText = new (std::nothrow) TextSimple(const_cast (text.GetPointer()), text.GetLength()); + SysTryReturn(NID_UI_CTRL, (pSimpleText != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + pText->AppendElement(*pSimpleText); + + float textSize = 0.0f; + GET_SHAPE_CONFIG(LISTVIEW::EMPTY_LIST_TEXT_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, textSize); + + Font font; + font.Construct(GetFont(), FONT_STYLE_PLAIN, textSize); + pText->SetFont(&font, 0, pText->GetTextLength()); + + FloatDimension listDimension = GetCore().GetSizeF(); + + pText->SetBounds(FloatRectangle(0.0f, 0.0f, listDimension.width, 1.0f)); + pText->Compose(); + + FloatDimension labelDimension = pText->GetTextExtentF(0, pText->GetTextLength()); + labelDimension.height = pText->GetTotalHeightF(); + + if (labelDimension.width > listDimension.width) + { + pText->SetBounds(FloatRectangle(0.0f, 0.0f, listDimension.width, 1.0f)); + pText->Compose(); + + float labelHeight = pText->GetTotalHeightF(); + + labelDimension.width = listDimension.width; + labelDimension.height = ((listDimension.height < labelHeight) ? listDimension.height : labelHeight); + } + + delete pText; + + __pEmptyText->SetSize(labelDimension); + __pEmptyText->SetBackgroundColor(Color(0, 0, 0, 0)); + __pEmptyText->SetMargin(0.0f, 0.0f, 0.0f, 0.0f); + __pEmptyText->SetTextColor(__emptyTextColor); + __pEmptyText->SetTextConfig(textSize, LABEL_TEXT_STYLE_NORMAL); + __pEmptyText->SetText(text); + } + + AdjustLayoutOfEmptyList(); + + SetLastResultReturn(E_SUCCESS); +} + +String +_ListViewImpl::GetTextOfEmptyList(void) const +{ + return ((__pEmptyText != null) ? __pEmptyText->GetText() : String()); +} + +result +_ListViewImpl::SetTextColorOfEmptyList(const Color& color) +{ + __emptyTextColor = color; + + if (__pEmptyText != null) + { + __pEmptyText->SetTextColor(color); + } + + SetLastResultReturn(E_SUCCESS); +} + +Color +_ListViewImpl::GetTextColorOfEmptyList(void) const +{ + return __emptyTextColor; +} + +result +_ListViewImpl::SetListBackgroundColor(const Color& color) +{ + SetBackgroundColor(color); + + SetLastResultReturn(E_SUCCESS); +} + +result +_ListViewImpl::SetBackgroundBitmap(const Bitmap* pBitmap) +{ + GetCore().SetBackgroundBitmap(const_cast(pBitmap)); + GetCore().SetBackgroundBitmapStretch(true); + + SetLastResultReturn(E_SUCCESS); +} + +result +_ListViewImpl::BeginReorderingMode(void) +{ + result r = GetCore().SetReorderModeEnabled(true); + + SetLastResultReturn(r); +} + +result +_ListViewImpl::EndReorderingMode(void) +{ + result r = GetCore().SetReorderModeEnabled(false); + + SetLastResultReturn(r); +} + +bool +_ListViewImpl::IsInReorderingMode(void) const +{ + return GetCore().IsReorderModeEnabled(); +} + +void +_ListViewImpl::SetScrollInputMode(ScrollInputMode mode) +{ + GetCore().SetScrollInputMode(mode); +} + +ScrollInputMode +_ListViewImpl::GetScrollInputMode(void) const +{ + return GetCore().GetScrollInputMode(); +} + +result +_ListViewImpl::OpenContextItem(int itemIndex) +{ + return GetCore().OpenContextItem(0, itemIndex); +} + +result +_ListViewImpl::CloseContextItem(int itemIndex) +{ + return GetCore().CloseContextItem(0, itemIndex); +} + +bool +_ListViewImpl::IsContextItemOpened(int itemIndex) const +{ + return GetCore().IsContextItemOpened(0, itemIndex); +} + +void +_ListViewImpl::OnListViewContextItemStateChanged(_Control& source, int groupIndex, int itemIndex, int elementId, + ListContextItemStatus status) +{ + if (__pListItemEvent != null) + { + CloseContextItem(itemIndex); + + _ListViewItem* pListViewItem = static_cast<_ListViewItem*>(GetCore().FindItem(0, itemIndex)); + + SetItemNeedsLazyDeletion(pListViewItem); + + _ListItemEventArg* pArg = new (std::nothrow) _ListItemEventArg(itemIndex, elementId, 0, 0, NOTIFY_TYPE_SELCTED_CONTEXT_ITEM); + __pListItemEvent->Fire(*pArg); + + SetItemNeedsLazyDeletion(null); + } +} + +void +_ListViewImpl::OnTableViewItemStateChanged(_TableView& tableView, int itemIndex, _TableViewItem* pItem, TableViewItemStatus status) +{ + if (__pListItemEvent != null) + { + _ListViewItem* pListViewItem = static_cast<_ListViewItem*>(pItem); + + if (pListViewItem != null) + { + SetItemNeedsLazyDeletion(pListViewItem); + + _ListViewItemStateChangedInfo itemInfo; + pListViewItem->GetLastStateChangedInfo(itemInfo); + + if ((__pLinkEvent != null) && (itemInfo.pUiLinkInfo != null)) + { + IEventArg* pLinkEventArg = _PublicLinkEvent::CreateLinkEventArgN(itemInfo.pUiLinkInfo->textInfo, + itemInfo.pUiLinkInfo->linkType, itemInfo.pUiLinkInfo->linkInfo); + + SysTryReturnVoidResult(NID_UI_CTRL, (pLinkEventArg != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _LinkEventArg."); + __pLinkEvent->Fire(*pLinkEventArg); + + } + else + { + _ListItemEventArg* pArg = new (std::nothrow) _ListItemEventArg(itemIndex, itemInfo.elementId, 0, 0, static_cast(status)); + __pListItemEvent->Fire(*pArg); + } + + pListViewItem->ClearLastStateChangedInfo(); + + SetItemNeedsLazyDeletion(null); + } + } +} + +void +_ListViewImpl::OnTableViewContextItemActivationStateChanged(_TableView& tableView, int itemIndex, _TableViewItem* pContextItem, bool activated) +{ + _ListViewItem* pListViewItem = static_cast<_ListViewItem*>(GetCore().FindItem(0, itemIndex)); + + if (pListViewItem != null) + { + pListViewItem->SetContextItemActivationState(activated); + } +} + +void +_ListViewImpl::OnTableViewItemReordered(_TableView& tableView, int itemIndexFrom, int itemIndexTo) +{ + if (__pListItemEvent != null) + { + _ListItemEventArg* pArg = new (std::nothrow) _ListItemEventArg(itemIndexFrom, itemIndexTo, 0, 0, NOTIFY_TYPE_REORDERED_ITEM); + __pListItemEvent->Fire(*pArg); + } +} + +void +_ListViewImpl::OnTableViewItemSwept(_TableView& tableView, int groupIndex, int itemIndex, TableViewSweepDirection direction) +{ + if (__pListItemEvent != null) + { + _ListViewItem* pListViewItem = static_cast<_ListViewItem*>(GetCore().FindItem(0, itemIndex)); + + SetItemNeedsLazyDeletion(pListViewItem); + + _ListItemEventArg* pArg = new (std::nothrow) _ListItemEventArg(itemIndex, direction, 0, 0, NOTIFY_TYPE_SWEPT_ITEM); + __pListItemEvent->Fire(*pArg); + + SetItemNeedsLazyDeletion(null); + } +} + +void +_ListViewImpl::OnScrollEndReached(_Control& source, ScrollEndEvent type) +{ + if (__pScrollEvent != null) + { + _ScrollEventArg* pEventArg = _ScrollEventArg::GetScrollEventArgN(GetPublic(), type); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + + __pScrollEvent->Fire(*pEventArg); + } +} + +void +_ListViewImpl::OnScrollPositionChanged(_Control& source, float scrollPosition) +{ + if (__pScrollEvent != null) + { + _ScrollEventArg* pEventArg = _ScrollEventArg::GetScrollEventArgN(GetPublic(), scrollPosition); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, (pEventArg != null), r, "[%s] Propagating.", GetErrorMessage(r)); + + __pScrollEvent->Fire(*pEventArg); + } +} + +void +_ListViewImpl::OnScrollStopped(_Control& source) +{ + if (__pScrollEvent != null) + { + _ScrollEventArg* pEventArg = _ScrollEventArg::GetScrollEventArgN(GetPublic()); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r)); + + __pScrollEvent->Fire(*pEventArg); + } +} + +void +_ListViewImpl::OnUiFastScrollIndexSelected(_Control& source, _FastScrollIndex& index) +{ + if (__pFastScrollEvent != null) + { + String* pIndexText = index.GetIndexText(); + if (pIndexText != null) + { + _FastScrollEventArg* pEventArg = new (std::nothrow) _FastScrollEventArg(GetPublic(), *pIndexText); + __pFastScrollEvent->Fire(*pEventArg); + } + } +} + +void +_ListViewImpl::OnDraw(void) +{ + _ControlImpl::OnDraw(); + + if (__redrawListView) + { + CheckEmptyListShowState(); + __redrawListView = false; + } +} + +void +_ListViewImpl::OnChangeLayout(_ControlOrientation orientation) +{ + if (__isUpdateListCalled) + { + __isUpdateListCalled = false; + } + else + { + __isOrientationChanged = true; + } + + if (GetCore().IsFocusModeStateEnabled() && GetCore().GetRootWindow() && GetCore().GetRootWindow()->IsActivated()) + { + GetCore().SetFocusDuringOrientationChange(); + } + + _ControlImpl::OnChangeLayout(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) + { + SetBitmapOfEmptyList(__pEmptyBitmap->GetBackgroundBitmap()); + } + if (__pEmptyText != null) + { + SetTextOfEmptyList(__pEmptyText->GetText()); + } + + if (__isOrientationChanged) + { + __isOrientationChanged = false; + + if (GetCore().IsTableViewFocused() && GetCore().IsFocusModeStateEnabled() + && GetCore().GetRootWindow() && GetCore().GetRootWindow()->IsActivated()) + { + UpdateList(true); + } + else + { + UpdateList(); + } + + } +} + +void +_ListViewImpl::OnFontChanged(Font* pFont) +{ + String fontName = GetFont(); + _ListViewItemProviderAdaptor* pProviderAdaptor = static_cast <_ListViewItemProviderAdaptor*>(GetCore().GetItemProviderAdaptor()); + + if (__pEmptyText != null) + { + __pEmptyText->SetFont(fontName); + SetTextOfEmptyList(__pEmptyText->GetText()); + } + + if (pProviderAdaptor != null) + { + pProviderAdaptor->SetItemFont(fontName); + } + + int firstGroup = -1; + int firstItem = -1; + int lastGroup = -1; + int lastItem = -1; + + GetCore().GetFirstLoadedItemIndex(firstGroup, firstItem); + GetCore().GetLastLoadedItemIndex(lastGroup, lastItem); + + firstItem = ((firstItem == -1) ? 0 : firstItem); + + for (int i = firstItem; i <= lastItem; i++) + { + _ListViewItem* pListViewItem = static_cast<_ListViewItem*>(GetCore().FindItem(0, i)); + + if (pListViewItem != null) + { + pListViewItem->SetFont(fontName); + pListViewItem->SetItemChanged(true); + } + } +} + +void +_ListViewImpl::OnFontInfoRequested(unsigned long& style, int& size) +{ + float textSize = 0.0f; + OnFontInfoRequested(style, textSize); + + size = _CoordinateSystemUtils::ConvertToInteger(textSize); +} + +void +_ListViewImpl::OnFontInfoRequested(unsigned long& style, float& size) +{ + GET_SHAPE_CONFIG(LISTVIEW::EMPTY_LIST_TEXT_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, size); + style = FONT_STYLE_PLAIN; +} + +FloatPoint +_ListViewImpl::GetCurrentTouchPosition(void) +{ + FloatPoint currentTouchPos = _TouchManager::GetInstance()->GetScreenPoint(0); + FloatRectangle bounds = GetCore().GetAbsoluteBoundsF(true); + + currentTouchPos.x -= bounds.x; + currentTouchPos.y -= bounds.y; + + return currentTouchPos; +} + +result +_ListViewImpl::OnTouchEventListenerAdded(void) +{ + return E_SUCCESS; +} + +result +_ListViewImpl::OnTouchEventListenerRemoved(void) +{ + return E_SUCCESS; +} + +void +_ListViewImpl::FireListViewItemLongPressedEvent(void) +{ + if (__pListItemEvent != null) + { + int itemIndex = -1; + int elementId = -1; + + if (GetItemIndexFromPosition(GetCurrentTouchPosition(), itemIndex, elementId) == E_SUCCESS) + { + _ListViewItem* pListViewItem = static_cast<_ListViewItem*>(GetCore().FindItem(0, itemIndex)); + + if ((pListViewItem != null) && (!pListViewItem->IsContextItem())) + { + SetItemNeedsLazyDeletion(pListViewItem); + + _ListItemEventArg* pArg = new (std::nothrow) _ListItemEventArg(itemIndex, elementId, 0, 0, NOTIFY_TYPE_LONG_PRESSED_ITEM); + __pListItemEvent->Fire(*pArg); + + SetItemNeedsLazyDeletion(null); + } + } + } +} + +class _ListViewMaker + : public _UiBuilderControlMaker +{ +public: + _ListViewMaker(_UiBuilder* uibuilder) + : _UiBuilderControlMaker(uibuilder){}; + + virtual ~_ListViewMaker(){}; + + static _UiBuilderControlMaker* + GetInstance(_UiBuilder* uibuilder) + { + _ListViewMaker* pListViewMaker = new (std::nothrow) _ListViewMaker(uibuilder); + return pListViewMaker; + }; + +protected: + virtual Control* + Make(_UiBuilderControl* pControl) + { + result r = E_SYSTEM; + _UiBuilderControlLayout* pControlProperty = null; + ListView* pListView = null; + FloatRectangle rect; + String elementString; + + ListScrollStyle scrollStyle = SCROLL_STYLE_FADE_OUT; + ScrollInputMode scrollInputMode = SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION; + + bool hasItemDivider = true; + int opacity = 100; + bool isSweepEnabled = false; + Color color; + + GetProperty(pControl, &pControlProperty); + if (pControlProperty == null) + { + return null; + } + + pListView = new (std::nothrow) ListView(); + if (pListView == null) + { + return null; + } + + rect = pControlProperty->GetRectF(); + + //Construct + if (pControl->GetElement(L"itemDivider", elementString)) + { + if (elementString.Equals(L"true", false)) + { + hasItemDivider = true; + } + else + { + hasItemDivider = false; + } + } + + if (pControl->GetElement(L"listScrollStyle", elementString)) + { + if (elementString.Equals(L"SCROLL_STYLE_FIXED", false)) + { + scrollStyle = SCROLL_STYLE_FIXED; + } + else if (elementString.Equals(L"SCROLL_STYLE_FAST_SCROLL", false)) + { + scrollStyle = SCROLL_STYLE_FAST_SCROLL; + } + else if (elementString.Equals(L"SCROLL_STYLE_JUMP_TO_TOP", false)) + { + scrollStyle = SCROLL_STYLE_JUMP_TO_TOP; + } + else if (elementString.Equals(L"SCROLL_STYLE_THUMB", false)) + { + scrollStyle = SCROLL_STYLE_THUMB; + } + } + else if (pControl->GetElement(L"fastScroll", elementString)) + { + if (elementString.Equals(L"true", false)) + { + scrollStyle = SCROLL_STYLE_FAST_SCROLL; + } + } + + r = pListView->Construct(rect, hasItemDivider, scrollStyle); + SysTryCatch(NID_UI, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + // Set BackgroundsBitmap + if (pControl->GetElement("backgroundBitmapPath", elementString)) + { + Bitmap* pBackgroundBitmap = null; + pBackgroundBitmap = LoadBitmapN(elementString); + if (pBackgroundBitmap != null) + { + r = pListView->SetBackgroundBitmap(pBackgroundBitmap); + delete pBackgroundBitmap; + pBackgroundBitmap = null; + + SysTryCatch(NID_UI, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + + // Set Empty List + if (pControl->GetElement(L"textOfEmptyList", elementString)) + { + r = pListView->SetTextOfEmptyList(elementString); + SysTryCatch(NID_UI, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + if (pControl->GetElement(L"colorOfEmptyListText", elementString)) + { + ConvertStringToColor(elementString, color); + r = pListView->SetTextColorOfEmptyList(color); + SysTryCatch(NID_UI, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + if (pControl->GetElement(L"bitmapPathOfEmptyList", elementString)) + { + Bitmap* pBackgroundBitmap = null; + pBackgroundBitmap = LoadBitmapN(elementString); //__image->DecodeN(path,BITMAP_PIXEL_FORMAT_RGB565); + if (pBackgroundBitmap != null) + { + r = pListView->SetBitmapOfEmptyList(pBackgroundBitmap); + delete pBackgroundBitmap; + pBackgroundBitmap = null; + + SysTryCatch(NID_UI, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + + if (pControl->GetElement(L"backgroundColorOpacity", elementString) || pControl->GetElement(L"BGColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + + if (pControl->GetElement(L"backgroundColor", elementString) || pControl->GetElement(L"BGColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + r = pListView->SetBackgroundColor(color); + SysTryCatch(NID_UI, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + if (pControl->GetElement(L"itemDividerColor", elementString)) + { + ConvertStringToColor(elementString, color); + r = pListView->SetItemDividerColor(color); + SysTryCatch(NID_UI, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + if (pControl->GetElement(L"sweepEnabled", elementString)) + { + if (elementString.Equals(L"true", false)) + { + isSweepEnabled = true; + } + else + { + isSweepEnabled = false; + } + + r = pListView->SetSweepEnabled(isSweepEnabled); + SysTryCatch(NID_UI, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + // scroll Input Mode + if (pControl->GetElement(L"scrollInputMode", elementString)) + { + if (elementString.Equals(L"SCROLL_INPUT_MODE_RESTRICT_TO_INITIAL_DIRECTION", false)) + { + scrollInputMode = SCROLL_INPUT_MODE_RESTRICT_TO_INITIAL_DIRECTION; + } + + pListView->SetScrollInputMode(scrollInputMode); + } + + return pListView; + + CATCH: + delete pListView; + return null; + } + +private: +}; // _ListViewMaker + +_ListViewRegister::_ListViewRegister() +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->RegisterControl(L"ListView", _ListViewMaker::GetInstance); +} + +_ListViewRegister::~_ListViewRegister() +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->UnregisterControl(L"ListView"); +} + +static _ListViewRegister ListViewRegisterToUIbuilder; +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_ListViewItem.cpp b/src/ui/controls/FUiCtrl_ListViewItem.cpp new file mode 100644 index 0000000..5cf92ee --- /dev/null +++ b/src/ui/controls/FUiCtrl_ListViewItem.cpp @@ -0,0 +1,2266 @@ +// +// 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_ListViewItem.cpp + * @brief This is the implementation file for _ListViewItem class. + * + * This file contains the implementation of _ListViewItem class. + */ + +#include +#include +#include +#include +#include +#include +#include +#include "FUi_AccessibilityContainer.h" +#include "FUi_AccessibilityElement.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_Math.h" +#include "FUi_ResourceManager.h" +#include "FUiAnim_VisualElement.h" +#include "FUiCtrl_Label.h" +#include "FUiCtrl_ListViewContextItem.h" +#include "FUiCtrl_ListViewItem.h" +#include "FUiCtrl_UiListViewItemEvent.h" +#include "FUiCtrl_UiListViewItemEventArg.h" + +#ifdef MEMORY_LEAK_CHECK +#include "mem_leak_check.h" +#endif + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Base::Utility; +using namespace Tizen::Graphics; +using namespace Tizen::Graphics::_Text; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Animations; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_ListViewItem::_ListViewItem(float itemHeight) + : _TableViewItem(itemHeight) + , __needAlignContextItem(false) + , __touchPressed(false) + , __touchEnabled(false) + , __selectedElementId(-1) + , __descriptionTextShowState(false) + , __pDescriptionText(null) + , __pDivider(null) + , __selectionEabled(false) + , __fontStyle(0) + , __fontSize(0.0f) + , __fontName(L"") + , __prevTouchPos(-1.0f, -1.0f) + , __pTextSlideTimer(null) + , __pAccessibilityElement(null) + , __isContextItemListenerActivated(false) +{ + GET_COLOR_CONFIG(TABLEVIEW::ITEM_DESCRIPTION_TEXT_NORMAL, __descriptionTextColor); + + ___stateChangedInfo.selectionType = LISTVIEW_ITEM_SELECTED; + ___stateChangedInfo.elementId = -1; + ___stateChangedInfo.pUiLinkInfo = null; +} + +_ListViewItem::~_ListViewItem(void) +{ + DeleteAllElement(); + + delete ___stateChangedInfo.pUiLinkInfo; + ___stateChangedInfo.pUiLinkInfo = null; + + delete __pTextSlideTimer; + __pTextSlideTimer = null; + + if (__pDescriptionText != null) + { + DetachChild(*__pDescriptionText); + + delete __pDescriptionText; + __pDescriptionText = null; + } + + if (__pDivider != null) + { + DetachChild(*__pDivider); + + delete __pDivider; + __pDivider = null; + } + + _ListViewContextItem* pContextItem = static_cast<_ListViewContextItem*>(GetContextItem()); + if ((pContextItem != null) && (__pContextItemEventListener != null)) + { + if (__isContextItemListenerActivated) + { + pContextItem->RemoveContextItemEventListener(*__pContextItemEventListener); + } + __pContextItemEventListener = null; + __isContextItemListenerActivated = false; + } + + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + + if ((__pAccessibilityElement != null) && (pContainer != null)) + { + pContainer->RemoveAllElement(); + __pAccessibilityElement = null; + } +} + +_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] Memory allocation failed."); + + pItem->AcquireHandle(); + + result r = pItem->Initialize(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r = E_SYSTEM, "[E_SYSTEM] Unable to create _ListViewItem"); + + return pItem; + +CATCH: + delete pItem; + + return null; +} + +void +_ListViewItem::SetListViewItemType(ListViewItemType type) +{ + __itemType = type; +} + +result +_ListViewItem::AddElement(FloatRectangle& rect, int elementId, const String& text, bool textSliding) +{ + result r = E_SUCCESS; + + SysTryReturn(NID_UI_CTRL, (HasElement(elementId) == false), E_INVALID_ARG, E_INVALID_ARG, + ("[E_INVALID_ARG] This elementId already exists.")); + + // Convert String to TextObject + TextObject* pText = new (std::nothrow) TextObject(); + 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) + { + 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); + pText->SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE); + } + + // Make element object + memset(&element, 0, sizeof(_ListViewItemElement)); + element.elementId = elementId; + element.elementType = LISTVIEW_ITEM_ELEMENT_TEXT; + element.bounds = rect; + + element.pTextElement = new (std::nothrow) _ListViewItemElementText(); + 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; + + GET_SHAPE_CONFIG(LISTVIEW::ITEM_DEFAULT_FONT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, element.pTextElement->textSize); + GET_COLOR_CONFIG(TABLEVIEW::ITEM_TEXT_NORMAL, element.pTextElement->textColor[LISTVIEW_ITEM_STATUS_NORMAL]); + GET_COLOR_CONFIG(TABLEVIEW::ITEM_TEXT_PRESSED, element.pTextElement->textColor[LISTVIEW_ITEM_STATUS_PRESSED]); + GET_COLOR_CONFIG(TABLEVIEW::ITEM_TEXT_HIGHLIGHTED, element.pTextElement->textColor[LISTVIEW_ITEM_STATUS_HIGHLIGHTED]); + + // Set Visual element for this element + 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); + element.pTextElement->pVE = pVE; + + __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.")); + + SysTryReturn(NID_GRP, (pEnrichedText != null) && (_EnrichedTextImpl::GetInstance(*pEnrichedText) != null), + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This _EnrichedText element is null."); + + // Set Text element + _EnrichedTextImpl* pCloneText = _EnrichedTextImpl::GetInstance(*pEnrichedText)->GetCloneN(); + 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; + memset(&element, 0, sizeof(_ListViewItemElement)); + + element.elementId = elementId; + element.elementType = LISTVIEW_ITEM_ELEMENT_TEXT; + element.bounds = rect; + + element.pTextElement = new (std::nothrow) _ListViewItemElementText(); + SysTryCatch(NID_UI_CTRL, (element.pTextElement != null), , GetLastResult(), "[%s] Propagating.", + GetErrorMessage(GetLastResult())); + + element.pTextElement->pTextObject = pText; + element.pTextElement->pEnrichedText = pCloneText; + element.pTextElement->textSlidingEnabled = false; + + GET_COLOR_CONFIG(TABLEVIEW::ITEM_TEXT_NORMAL, element.pTextElement->textColor[LISTVIEW_ITEM_STATUS_NORMAL]); + GET_COLOR_CONFIG(TABLEVIEW::ITEM_TEXT_PRESSED, element.pTextElement->textColor[LISTVIEW_ITEM_STATUS_PRESSED]); + GET_COLOR_CONFIG(TABLEVIEW::ITEM_TEXT_HIGHLIGHTED, element.pTextElement->textColor[LISTVIEW_ITEM_STATUS_HIGHLIGHTED]); + + // Set Visual element for this element + 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->SetImplicitAnimationEnabled(false); + pVE->SetContentProvider(&__hitTestVEDelegator); + element.pTextElement->pVE = pVE; + + __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; + + 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); + SysTryCatch(NID_UI_CTRL, (pClonePressedBitmap != null), (r = GetLastResult()), r, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + } + + if (pHighlightedBitmap != null) + { + pCloneHighlightedBitmap = _BitmapImpl::CloneN(*pHighlightedBitmap); + SysTryCatch(NID_UI_CTRL, (pCloneHighlightedBitmap != null), (r = GetLastResult()), r, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + } + + element.elementId = elementId; + element.elementType = LISTVIEW_ITEM_ELEMENT_BITMAP; + element.bounds = rect; + + element.pBitmapElement = new (std::nothrow) _ListViewItemElementBitmap(); + SysTryCatch(NID_UI_CTRL, (element.pBitmapElement != null), (r = GetLastResult()), r, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + element.pBitmapElement->pBitmap[LISTVIEW_ITEM_STATUS_NORMAL] = pCloneNormalBitmap; + element.pBitmapElement->pBitmap[LISTVIEW_ITEM_STATUS_PRESSED] = pClonePressedBitmap; + element.pBitmapElement->pBitmap[LISTVIEW_ITEM_STATUS_HIGHLIGHTED] = pCloneHighlightedBitmap; + + pVE = new (std::nothrow) _VisualElement(); + SysTryCatch(NID_UI_CTRL, pVE, , 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.pBitmapElement->pVE = pVE; + + __elements.push_back(element); + + return E_SUCCESS; + +CATCH: + delete pCloneNormalBitmap; + delete pClonePressedBitmap; + delete pCloneHighlightedBitmap; + delete element.pBitmapElement; + + if (pVE) + { + pVE->Destroy(); + } + + return r; +} + +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.")); + + SysTryReturn(NID_GRP, (pCustom != null), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This Custom element is null."); + + // Make element object + _ListViewItemElement element; + memset(&element, 0, sizeof(_ListViewItemElement)); + + element.elementId = elementId; + element.elementType = LISTVIEW_ITEM_ELEMENT_OBJ; + element.bounds = rect; + + element.pCustomElement = new (std::nothrow) _ListViewItemElementCustom(); + SysTryReturn(NID_UI_CTRL, (element.pCustomElement != null), GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + element.pCustomElement->pCustom = const_cast<_ICustomElement*>(pCustom); + + _VisualElement* 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->SetImplicitAnimationEnabled(false); + pVE->SetContentProvider(&__hitTestVEDelegator); + element.pCustomElement->pVE = pVE; + + if (pVE->GetParent() == null) + { + GetVisualElement()->AttachChild(*(pVE)); + pVE->SetShowState(true); + pVE->SetBounds(rect); + } + + __elements.push_back(element); + + return E_SUCCESS; + +CATCH: + delete element.pCustomElement; + + if(pVE != null) + { + pVE->Destroy(); + } + + return r; +} + +bool +_ListViewItem::DeleteElement(int elementId) +{ + _LinkedList <_ListViewItemElement>::_Iterator iter; + + for (iter = __elements.begin(); iter != __elements.end(); iter++) + { + if (iter->elementId == elementId) + { + DeleteElement(&(*iter)); + __elements.erase(iter); + + return true; + } + } + + return false; +} + +void +_ListViewItem::DeleteAllElement(void) +{ + _LinkedList <_ListViewItemElement>::_Iterator iter; + + for (iter = __elements.begin(); iter != __elements.end(); iter++) + { + DeleteElement(&(*iter)); + } + + __elements.clear(); +} + +void +_ListViewItem::DeleteElement(_ListViewItemElement* pElement) +{ + if (pElement->pTextElement != null) + { + if (pElement->pTextElement->pEnrichedText != null) + { + (pElement->pTextElement->pEnrichedText)->RemoveAllTextElements(true); + + delete pElement->pTextElement->pEnrichedText; + pElement->pTextElement->pEnrichedText = null; + + pElement->pTextElement->pTextObject = null; + } + else + { + delete pElement->pTextElement->pTextObject; + pElement->pTextElement->pTextObject = null; + } + + if (pElement->pTextElement->pVE != null) + { + pElement->pTextElement->pVE->Destroy(); + pElement->pTextElement->pVE = null; + } + + delete pElement->pTextElement; + pElement->pTextElement = null; + } + + if (pElement->pBitmapElement != null) + { + for (int i = 0; i < LISTVIEW_ITEM_STATUS_MAX; i++) + { + delete pElement->pBitmapElement->pBitmap[i]; + pElement->pBitmapElement->pBitmap[i] = null; + } + + if (pElement->pBitmapElement->pVE != null) + { + pElement->pBitmapElement->pVE->Destroy(); + pElement->pBitmapElement->pVE = null; + } + + delete pElement->pBitmapElement; + pElement->pBitmapElement = null; + } + + if (pElement->pCustomElement) + { + delete pElement->pCustomElement->pCustom; + pElement->pCustomElement->pCustom = null; + + if (pElement->pCustomElement->pVE != null) + { + pElement->pCustomElement->pVE->Destroy(); + pElement->pCustomElement->pVE = null; + } + + delete pElement->pCustomElement; + pElement->pCustomElement = null; + } +} + +bool +_ListViewItem::HasElement(int elementId) +{ + _ListViewItemElement* pElement = GetElement(elementId); + + return (pElement != null); +} + +bool +_ListViewItem::RefreshElement(int elementId) +{ + _ListViewItemElement* pElement = GetElement(elementId); + + if (pElement != null) + { + DrawElement(pElement); + } + + return (pElement != null); +} + +void +_ListViewItem::SetLastStateChangedInfo(void) +{ + ClearLastStateChangedInfo(); + + int elementId = GetElementIdFromCurrentTouchPosition(); + _ListViewItemElement* pElement = GetElement(elementId); + + if ((pElement != null) && (__itemType == LISTVIEW_ITEM_TYPE_CUSTOM)) + { + _ListViewItemUiLinkInfo* pInfo = null; + int cutlinkTextTouchedIndex = -1; + + if (IsCutlinkTextSelected(__prevTouchPos, &cutlinkTextTouchedIndex, &pInfo)) + { + if ((GetItemStyle() == TABLE_VIEW_ANNEX_STYLE_DETAILED) + && (pElement->actionElement == true) && (pElement->selectionEnabled == false)) + { + elementId = -1; + } + + if (cutlinkTextTouchedIndex >= 0) + { + ___stateChangedInfo.selectionType = LISTVIEW_ITEM_UILINK_SELECTED; + ___stateChangedInfo.elementId = elementId; + ___stateChangedInfo.pUiLinkInfo = pInfo; + } + else + { + ___stateChangedInfo.selectionType = LISTVIEW_ITEM_ELEMENT_SELECTED; + ___stateChangedInfo.elementId = elementId; + delete pInfo; + } + } + else + { + if ((GetItemStyle() == TABLE_VIEW_ANNEX_STYLE_DETAILED) + && (pElement->actionElement == true) && (pElement->selectionEnabled == false)) + { + elementId = -1; + } + + ___stateChangedInfo.selectionType = LISTVIEW_ITEM_ELEMENT_SELECTED; + ___stateChangedInfo.elementId = elementId; + } + } + else + { + ___stateChangedInfo.selectionType = LISTVIEW_ITEM_ELEMENT_SELECTED; + ___stateChangedInfo.elementId = -1; + } +} + +bool +_ListViewItem::GetLastStateChangedInfo(_ListViewItemStateChangedInfo& changedInfo) const +{ + changedInfo = ___stateChangedInfo; + + return (___stateChangedInfo.selectionType != LISTVIEW_ITEM_SELECTED); +} + +void +_ListViewItem::ClearLastStateChangedInfo(void) +{ + delete ___stateChangedInfo.pUiLinkInfo; + + ___stateChangedInfo.selectionType = LISTVIEW_ITEM_SELECTED; + ___stateChangedInfo.elementId = -1; + ___stateChangedInfo.pUiLinkInfo = null; +} + +void +_ListViewItem::SetCurrentStatus(_ListViewItemStatus& currentStatus) +{ + // This function was made to modify of ListView::RefreshList(). + // This function could adversely affect touch event handling. So, you should be used with caution. + + SetPressedControl((currentStatus.annexStyle == GetItemStyle()) ? currentStatus.pressedControl : TABLE_VIEW_ITEM_PRESSED_ITEM); + SetSelectionState(currentStatus.itemSelected); + SetLastTouchPressedPosition(currentStatus.currentTouchPosition); + + if (!currentStatus.itemSelected) + { + SetItemDrawingStatus(LISTVIEW_ITEM_STATUS_NORMAL); + } + + __prevTouchPos = currentStatus.currentTouchPosition; + __touchEnabled = currentStatus.touchEnabled; + __selectionEabled = currentStatus.elementSelectionEnabled; + __selectedElementId = currentStatus.selectedElementId; + __touchPressed = (currentStatus.itemSelected || currentStatus.elementSelectionEnabled); + + if (__selectionEabled) + { + SetItemDrawingStatus(LISTVIEW_ITEM_STATUS_NORMAL); + } + + _ListViewItemElement* pElement = GetElement(__selectedElementId); + + // text sliding check and invoke + if (pElement != null) + { + if (pElement->elementType == LISTVIEW_ITEM_ELEMENT_TEXT) + { + RefreshElement(__selectedElementId); + + SetCutlinkTextFocus(currentStatus.currentTouchPosition); + + if (pElement->pTextElement->textSlidingEnabled) + { + pElement->pTextElement->pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_SLIDE_LEFT); + pElement->pTextElement->pTextObject->Compose(); + + if (pElement->pTextElement->pTextObject->IsActionOn()) + { + StartTextSlideTimer(); + } + } + } + } + + Draw(); + Show(); + + // set item state changed info + SetLastStateChangedInfo(); +} + +void +_ListViewItem::GetCurrentStatus(_ListViewItemStatus& currentStatus) +{ + // for _TableViewItem + currentStatus.annexStyle = GetItemStyle(); + currentStatus.pressedControl = GetPressedControl(); + currentStatus.itemSelected = GetSelectionState(); + currentStatus.currentTouchPosition = __prevTouchPos; + + // for _ListViewItem + currentStatus.touchEnabled = __touchEnabled; + currentStatus.elementSelectionEnabled = __selectionEabled; + currentStatus.selectedElementId = __selectedElementId; +} + +bool +_ListViewItem::IsItemSelected(void) +{ + return __touchEnabled; +} + +int +_ListViewItem::GetElementIdFromPosition(const FloatPoint& position) const +{ + _LinkedList <_ListViewItemElement>::_ReverseIterator reverseIter; + + for (reverseIter = __elements.rbegin(); reverseIter != __elements.rend(); reverseIter++) + { + if ((*reverseIter).bounds.Contains(position)) + { + return (*reverseIter).elementId; + } + } + + return -1; +} + +int +_ListViewItem::GetElementIdFromCurrentTouchPosition(void) const +{ + return GetElementIdFromPosition(__prevTouchPos); +} + +_ListViewItemElement* +_ListViewItem::GetElement(int elementId) const +{ + _LinkedList <_ListViewItemElement>::_Iterator iter; + + for (iter = __elements.begin(); iter != __elements.end(); iter++) + { + if (iter->elementId == elementId) + { + return &(*iter); + } + } + + return null; +} + +ListViewItemElementType +_ListViewItem::GetElementType(int elementId) const +{ + _ListViewItemElement* pElement = GetElement(elementId); + + return ((pElement != null) ? pElement->elementType : LISTVIEW_ITEM_ELEMENT_INVALID); +} + +TextObject* +_ListViewItem::GetTextObjectInElement(int elementId) const +{ + _ListViewItemElementText* pElement = GetElementText(elementId); + + return ((pElement != null) ? pElement->pTextObject : null); +} + +_ListViewItemElementText* +_ListViewItem::GetElementText(int elementId) const +{ + _ListViewItemElement* pElement = GetElement(elementId); + + if ((pElement != null) && (pElement->elementType == LISTVIEW_ITEM_ELEMENT_TEXT) + && (pElement->pTextElement->pTextObject != null)) + { + return pElement->pTextElement; + } + + return null; +} + +_ListViewItemElementBitmap* +_ListViewItem::GetElementBitmap(int elementId) const +{ + _ListViewItemElement* pElement = GetElement(elementId); + + if ((pElement != null) && (pElement->elementType == LISTVIEW_ITEM_ELEMENT_BITMAP)) + { + return pElement->pBitmapElement; + } + + return null; +} + +bool +_ListViewItem::SetElementSelectionEnabled(int elementId, bool enable) +{ + _ListViewItemElement* pElement = GetElement(elementId); + + if (pElement == null) + { + return false; + } + + pElement->actionElement = true; + pElement->selectionEnabled = enable; + + return true; +} + +bool +_ListViewItem::GetElementSelectionEnabled(int elementId, bool& enable) +{ + _ListViewItemElement* pElement = GetElement(elementId); + + if ((pElement == null) || (pElement->actionElement == false)) + { + return false; + } + + enable = pElement->selectionEnabled; + + return true; +} + +bool +_ListViewItem::SetTextCutlinkMask(int elementId, unsigned long mask) +{ + _ListViewItemElementText* pElement = GetElementText(elementId); + + if (pElement == null) + { + return false; + } + + pElement->cutlinkMaskType = mask; + + return true; +} + +bool +_ListViewItem::SetTextCutlinkViewMode(int elementId, bool cutlinkViewMode, bool cutlinkParseEnable) +{ + _ListViewItemElementText* pElement = GetElementText(elementId); + + if (pElement == null) + { + return false; + } + + pElement->cutlinkViewModeEnabled = cutlinkViewMode; + pElement->cutlinkParseEnabled = cutlinkParseEnable; + pElement->cutlinkMaskType = LINK_TYPE_MAX; + + return true; +} + +bool +_ListViewItem::SetTextAlignment(int elementId, TextObjectAlignment textAlignment) +{ + TextObject* pTextObject = GetTextObjectInElement(elementId); + + if (pTextObject == null) + { + return false; + } + + TextObjectAlignment originAlign = pTextObject->GetAlignment(); + + // reset original alignment + if ((0x0007 & textAlignment) != 0x0000) // TextHorizontalAlignment + { + originAlign &= 0x0700; + } + else if ((0x0700 & textAlignment) != 0x0000) // TextVerticalAlignment + { + originAlign &= 0x0007; + } + + pTextObject->SetAlignment(originAlign | textAlignment); + + return true; +} + +bool +_ListViewItem::GetTextAlignment(int elementId, TextObjectAlignment& textAlignment) const +{ + TextObject* pTextObject = GetTextObjectInElement(elementId); + + if (pTextObject == null) + { + return false; + } + + textAlignment = pTextObject->GetAlignment(); + + return true; +} + +bool +_ListViewItem::SetTextWrapType(int elementId, TextObjectWrapType wrapType) +{ + TextObject* pTextObject = GetTextObjectInElement(elementId); + + if (pTextObject == null) + { + return false; + } + + pTextObject->SetWrap(wrapType); + + return true; +} + +bool +_ListViewItem::SetTextSize(int elementId, float textSize) +{ + _ListViewItemElementText* pElement = GetElementText(elementId); + + if ((pElement != null) && (textSize > 0.0f)) + { + pElement->textSize = textSize; + + return true; + } + + return false; +} + +bool +_ListViewItem::SetTextColor(int elementId, Color textColor, ListViewItemDrawingStatus status) +{ + _ListViewItemElementText* pElement = GetElementText(elementId); + + if (pElement == null) + { + return false; + } + + pElement->textColor[status] = textColor; + + return true; +} + +bool +_ListViewItem::GetTextColor(int elementId, Color& textColor, ListViewItemDrawingStatus status) const +{ + _ListViewItemElementText* pElement = GetElementText(elementId); + + if (pElement == null) + { + return false; + } + + textColor = pElement->textColor[status]; + + return true; +} + +bool +_ListViewItem::SetDescriptionText(const String& text) +{ + if (text.IsEmpty()) + { + if (__pDescriptionText != null) + { + DetachChild(*__pDescriptionText); + + delete __pDescriptionText; + __pDescriptionText = null; + } + + return true; + } + else + { + if (__pDescriptionText == null) + { + __pDescriptionText = _Label::CreateLabelN(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, (__pDescriptionText != null), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pDescriptionText->SetVisibleState(false); + __pDescriptionText->SetMargin(0.0f, 0.0f, 0.0f, 0.0f); + __pDescriptionText->SetTextHorizontalAlignment(ALIGNMENT_LEFT); + + AttachChild(*__pDescriptionText); + } + + FloatRectangle bounds = GetBoundsF(); + FloatRectangle textBounds; + float textSize = 0.0f; + bool ret = true; + + GET_SHAPE_CONFIG(LISTVIEW::ITEM_DESCRIPTION_TEXT_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, textBounds.x); + GET_SHAPE_CONFIG(LISTVIEW::ITEM_DESCRIPTION_TEXT_TOP_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, textBounds.y); + GET_SHAPE_CONFIG(LISTVIEW::ITEM_DESCRIPTION_TEXT_FONT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, textSize); + + 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] Memory allocation failed."); + + pText->Construct(); + + TextSimple* pSimpleText = new (std::nothrow) TextSimple((const_cast(text.GetPointer())), text.GetLength()); + SysTryCatch(NID_UI_CTRL, (pSimpleText != null), (ret = false), E_OUT_OF_MEMORY, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + pText->AppendElement(*pSimpleText); + pText->SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT | TEXT_OBJECT_ALIGNMENT_TOP); + pText->SetWrap(TEXT_OBJECT_WRAP_TYPE_WORD); + pText->SetFont(GetFont(FONT_STYLE_PLAIN, textSize), 0, pText->GetTextLength()); + pText->SetBounds(FloatRectangle(0.0f, 0.0f, textBounds.width, 1.0f)); + pText->Compose(); + + textBounds.height = pText->GetTotalHeight(); + + __pDescriptionText->SetBounds(FloatRectangle(textBounds.x, bounds.height + textBounds.y, textBounds.width, textBounds.height)); + __pDescriptionText->SetBackgroundColor(Color(0, 0, 0, 0)); + __pDescriptionText->SetTextColor(__descriptionTextColor); + __pDescriptionText->SetTextConfig(textSize, LABEL_TEXT_STYLE_NORMAL); + __pDescriptionText->SetText(text); + +CATCH: + delete pText; + + return ret; + } +} + +void +_ListViewItem::SetDescriptionTextColor(const Color& color) +{ + __descriptionTextColor = color; +} + +float +_ListViewItem::GetDescriptionTextHeight(void) +{ + if (__pDescriptionText != null) + { + float margin = 0.0f; + GET_SHAPE_CONFIG(LISTVIEW::ITEM_DESCRIPTION_TEXT_TOP_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, margin); + + return ((margin * 2.0f) + __pDescriptionText->GetBoundsF().height); + } + + return 0.0f; +} + +void +_ListViewItem::SetDescriptionTextShowState(bool show) +{ + if (__descriptionTextShowState != show) + { + __descriptionTextShowState = show; + + if (__pDescriptionText != null) + { + __pDescriptionText->SetVisibleState(__descriptionTextShowState); + + FloatDimension itemDimension = GetSizeF(); + float descriptionTextHeight = GetDescriptionTextHeight(); + + itemDimension.height += ((__descriptionTextShowState) ? (descriptionTextHeight) : (-descriptionTextHeight)); + + // Set position & item height + SetItemCustomHeight((__descriptionTextShowState ? (itemDimension.height - descriptionTextHeight) : 0.0f)); + SetItemHeight(itemDimension.height); + + SetSize(itemDimension); + + if (__pAccessibilityElement != null) + { + SetAccessibilityElement(); + } + } + } +} + +void +_ListViewItem::SetContextItemEventListener(_IActionEventListener& listener) +{ + __pContextItemEventListener = &listener; +} + +void +_ListViewItem::SetContextItemActivationState(bool activate) +{ + _ListViewContextItem* pContextItem = static_cast<_ListViewContextItem*>(GetContextItem()); + + if ((pContextItem != null) && (__pContextItemEventListener != null)) + { + if (activate) + { + pContextItem->AddContextItemEventListener(*__pContextItemEventListener); + __isContextItemListenerActivated = true; + } + else + { + pContextItem->RemoveContextItemEventListener(*__pContextItemEventListener); + __isContextItemListenerActivated = false; + } + } +} + +bool +_ListViewItem::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + if ((&source != this) && (source.GetParent() != this)) + { + return false; + } + + if (IsTouchPressOnScroll()) + { + return false; + } + + StopTextSlideTimer(); + + FloatPoint pos = touchinfo.GetCurrentPosition(); + __prevTouchPos.SetPosition(pos.x, pos.y); + + __selectedElementId = GetElementIdFromPosition(pos); + + _ListViewItemElement* pElement = GetElement(__selectedElementId); + + if (pElement != null) + { + if ((pElement->actionElement) && (pElement->selectionEnabled)) + { + __selectionEabled = true; + } + + if (pElement->elementType == LISTVIEW_ITEM_ELEMENT_TEXT) + { + SetCutlinkTextFocus(pos); + + if (pElement->pTextElement->textSlidingEnabled) + { + pElement->pTextElement->pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_SLIDE_LEFT); + pElement->pTextElement->pTextObject->Compose(); + + if (pElement->pTextElement->pTextObject->IsActionOn()) + { + StartTextSlideTimer(); + } + } + } + } + + __touchPressed = true; + __touchEnabled = true; + + _TableViewItem::OnTouchPressed(source, touchinfo); + + SetLastStateChangedInfo(); + + // for do not occur annex selection. + if (__selectionEabled) + { + StopTouchPressedTimer(); + SetSelectionState(false); + + RefreshElement(__selectedElementId); + } + + return false; +} + +bool +_ListViewItem::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + if ((&source != this) && (source.GetParent() != this)) + { + return false; + } + + if (IsTouchPressOnScroll()) + { + SetTouchPressOnScroll(false); + return false; + } + + FloatPoint pos = touchinfo.GetCurrentPosition(); + __prevTouchPos.SetPosition(pos.x, pos.y); + + __touchPressed = false; + __touchEnabled = false; + + ResetTextSlide(); + ResetCutlinkFocus(); + + _TableViewItem::OnTouchReleased(source, touchinfo); + + if (__selectionEabled) + { + __selectionEabled = false; + + //Invalidate(); + RefreshElement(__selectedElementId); + + bool enabled = SetItemTapSoundEnabled(false); + FireItemEvent(); + SetItemTapSoundEnabled(enabled); + } + + __selectedElementId = -1; + + return false; +} + +bool +_ListViewItem::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + FloatPoint pos = touchinfo.GetCurrentPosition(); + __prevTouchPos.SetPosition(pos.x, pos.y); + + if (IsTouchPressOnScroll()) + { + SetTouchPressOnScroll(false); + } + + if (__touchPressed) + { + ClearLastStateChangedInfo(); + } + + ResetTextSlide(); + + __selectedElementId = -1; + __selectionEabled = false; + __touchPressed = false; + + _TableViewItem::OnTouchMoved(source, touchinfo); + + return false; +} + +bool +_ListViewItem::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + FloatPoint pos = touchinfo.GetCurrentPosition(); + __prevTouchPos.SetPosition(pos.x, pos.y); + + ResetTextSlide(); + + __selectedElementId = -1; + __selectionEabled = false; + __touchPressed = false; + __touchEnabled = false; + + _TableViewItem::OnTouchCanceled(source, touchinfo); + + return false; +} + +void +_ListViewItem::OnDraw(void) +{ + bool needDraw = IsItemChanged(); + + _TableViewItem::OnDraw(); + + if (needDraw) + { + DrawElements(); + DrawDivider(); + } +} + +result +_ListViewItem::OnBoundsChanging(const FloatRectangle& bounds) +{ + FloatDimension currentSize = GetSizeF(); + + if (!_FloatCompare(currentSize.width, bounds.width) || !_FloatCompare(currentSize.height, bounds.height)) + { + __needAlignContextItem = true; + } + + return E_SUCCESS; +} + +void +_ListViewItem::OnBoundsChanged(void) +{ + _TableViewItem::OnBoundsChanged(); + + if (__needAlignContextItem) + { + _ListViewContextItem* pContextItem = static_cast<_ListViewContextItem*>(GetContextItem()); + + if (pContextItem != null) + { + FloatRectangle bounds = GetBoundsF(); + pContextItem->AdjustItemBounds(bounds); + + __needAlignContextItem = false; + } + } +} + +void +_ListViewItem::SetItemDrawingStatus(ListViewItemDrawingStatus status) +{ + TableViewItemDrawingStatus parentStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL; + + switch (status) + { + case LISTVIEW_ITEM_STATUS_PRESSED: + parentStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED; + break; + + case LISTVIEW_ITEM_STATUS_HIGHLIGHTED: + parentStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_HIGHLIGHTED; + break; + + default: + parentStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL; + break; + } + + SetDrawingStatus(parentStatus); +} + +ListViewItemDrawingStatus +_ListViewItem::GetItemDrawingStatus(void) +{ + TableViewItemDrawingStatus parentStatus = GetDrawingStatus(); + + switch (parentStatus) + { + case TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED: + return LISTVIEW_ITEM_STATUS_PRESSED; + + case TABLE_VIEW_ITEM_DRAWING_STATUS_HIGHLIGHTED: + return LISTVIEW_ITEM_STATUS_HIGHLIGHTED; + + default: + return LISTVIEW_ITEM_STATUS_NORMAL; + } +} + +void +_ListViewItem::DrawElement(_ListViewItemElement* pElement) +{ + // Get Current TableViewItem drawing status + ListViewItemDrawingStatus status = GetItemDrawingStatus(); + FloatRectangle elementRect; + + // Check element selection enabled + if (status != LISTVIEW_ITEM_STATUS_NORMAL) + { + if (__selectedElementId == -1) + { + if ((pElement->actionElement) && (pElement->selectionEnabled)) + { + status = LISTVIEW_ITEM_STATUS_NORMAL; + } + } + else if (__selectedElementId != pElement->elementId) + { + bool enabled = false; + if (GetElementSelectionEnabled(__selectedElementId, enabled) && enabled) + { + status = LISTVIEW_ITEM_STATUS_NORMAL; + } + else if ((pElement->actionElement) && (pElement->selectionEnabled)) + { + status = LISTVIEW_ITEM_STATUS_NORMAL; + } + } + } + else + { + if ((__selectedElementId == pElement->elementId) && __selectionEabled) + { + status = LISTVIEW_ITEM_STATUS_PRESSED; + } + } + + Canvas* pCanvas = null; + + switch (pElement->elementType) + { + case LISTVIEW_ITEM_ELEMENT_TEXT: + DrawText(pElement->bounds, status, pElement->pTextElement); + break; + + case LISTVIEW_ITEM_ELEMENT_BITMAP: + DrawBitmap(pElement->bounds, status, pElement->pBitmapElement); + break; + + case LISTVIEW_ITEM_ELEMENT_OBJ: + pCanvas = pElement->pCustomElement->pVE->GetCanvasN(); + + if (pCanvas != null) + { + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + elementRect.SetBounds(0.0f, 0.0f, pElement->bounds.width, pElement->bounds.height); + + pElement->pCustomElement->pCustom->DrawElement(pCanvas, elementRect, status); + } + break; + + default: + break; + } + + delete pCanvas; +} + +void +_ListViewItem::DrawElements(void) +{ + _LinkedList <_ListViewItemElement>::_Iterator iter; + + for (iter = __elements.begin(); iter != __elements.end(); iter++) + { + DrawElement(&(*iter)); + } +} + +bool +_ListViewItem::DrawText(FloatRectangle& rect, ListViewItemDrawingStatus status, _ListViewItemElementText* pText) +{ + SysTryReturn(NID_UI_CTRL, (pText != null), false, E_INVALID_ARG, "[E_INVALID_ARG] This Text element is null."); + + FloatRectangle bounds(rect.x, rect.y, rect.width, rect.height); + + if (pText->pVE->GetParent() == null) + { + GetVisualElement()->AttachChild(*(pText->pVE)); + pText->pVE->SetShowState(true); + } + + if (pText->textSize > 0) + { + pText->pTextObject->SetFont(GetFont(FONT_STYLE_PLAIN, pText->textSize), 0, pText->pTextObject->GetTextLength()); + } + + // Calculate Text element bounds + if (pText->pEnrichedText == null) + { + FloatDimension textDimension = pText->pTextObject->GetTextExtentF(0, pText->pTextObject->GetTextLength()); + textDimension.height += 2.0f; + TextObjectAlignment textAlign = pText->pTextObject->GetAlignment(); + + if (__itemType == LISTVIEW_ITEM_TYPE_CUSTOM) + { + if (textDimension.width < bounds.width) + { + bounds.width = textDimension.width; + + if ((0x0007 & textAlign) == TEXT_OBJECT_ALIGNMENT_CENTER) + { + bounds.x = rect.x + ((rect.width - bounds.width) / 2.0f); + } + else if ((0x0007 & textAlign) == TEXT_OBJECT_ALIGNMENT_RIGHT) + { + bounds.x = rect.x + (rect.width - bounds.width); + } + } + if (textDimension.height < bounds.height) + { + bounds.height = textDimension.height; + + if ((0x0700 & textAlign) == TEXT_OBJECT_ALIGNMENT_MIDDLE) + { + bounds.y = rect.y + ((rect.height - bounds.height) / 2.0f); + } + else if ((0x0700 & textAlign) == TEXT_OBJECT_ALIGNMENT_BOTTOM) + { + bounds.y = rect.y + (rect.height - bounds.height); + } + } + } + else + { + FloatDimension itemDimension = GetSizeF(); + + if ((itemDimension.width < (bounds.x + bounds.width)) || (itemDimension.height < (bounds.y + bounds.height)) + || !_FloatCompare(bounds.width, textDimension.width) || !_FloatCompare(bounds.height, textDimension.height)) + { + TableViewAnnexStyle style = GetItemStyle(); + float annexWidth = 0.0f; + float margin = 0.0f; + + GET_SHAPE_CONFIG(LISTVIEW::ITEM_ELEMENT_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, margin); + + if ((style == TABLE_VIEW_ANNEX_STYLE_DETAILED) || (style == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING) + || (style == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER)) + { + annexWidth = _TableViewItem::GetAnnexWidth(style); + } + + // initialize element width + bounds.width = GetSize().width - bounds.x - annexWidth - margin; + + bounds.x = rect.x; + bounds.y = rect.y + ((rect.height - textDimension.height) / 2.0f); + bounds.width = (bounds.width > textDimension.width) ? textDimension.width : bounds.width; + bounds.height = textDimension.height; + + rect = bounds; + } + } + } + + pText->pVE->SetBounds(bounds); + + // Check to EnrichedText contains Cutlink + if ((pText->pEnrichedText != null) && (pText->cutlinkViewModeEnabled) && (pText->cutlinkParseEnabled) + && (pText->pTextObject->GetTotalCutLinkElementCount() <= 0)) + { + if (ParseCutlinkText(pText)) + { + pText->pTextObject->SetCutLinkViewMode(true); + } + } + else if (pText->pEnrichedText == null) + { + if (IsItemEnabled()) + { + pText->pTextObject->SetForegroundColor(pText->textColor[status], 0, pText->pTextObject->GetTextLength()); + } + else + { + Color disableTextColor; + GET_COLOR_CONFIG(TABLEVIEW::ITEM_TEXT_DISABLED, disableTextColor); + + pText->pTextObject->SetForegroundColor(disableTextColor, 0, pText->pTextObject->GetTextLength()); + } + } + + pText->pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); + pText->pTextObject->SetBounds(FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height)); + + Canvas* pCanvas = pText->pVE->GetCanvasN(); + SysTryReturn(NID_UI_CTRL, (pCanvas != null), false, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + + pText->pTextObject->Draw(*_CanvasImpl::GetInstance(*pCanvas)); + + delete pCanvas; + + return true; +} + +bool +_ListViewItem::DrawBitmap(FloatRectangle& rect, ListViewItemDrawingStatus status, _ListViewItemElementBitmap* pBitmap) +{ + SysTryReturn(NID_UI_CTRL, (pBitmap != null), false, E_INVALID_ARG, "[E_INVALID_ARG] This Bitmap element is null."); + + Bitmap* pDrawBitmap = pBitmap->pBitmap[status]; + if ((pDrawBitmap == null) && (status != LISTVIEW_ITEM_STATUS_NORMAL)) + { + pDrawBitmap = pBitmap->pBitmap[LISTVIEW_ITEM_STATUS_NORMAL]; + } + + SysTryReturn(NID_UI_CTRL, (pDrawBitmap != null), false, E_INVALID_ARG, "[E_INVALID_ARG] This Bitmap element is null."); + + if (pBitmap->pVE->GetParent() == null) + { + GetVisualElement()->AttachChild(*(pBitmap->pVE)); + pBitmap->pVE->SetShowState(true); + } + + pBitmap->pVE->SetBounds(rect); + + bool isNinePatchedBitmap = _BitmapImpl::CheckNinePatchedBitmapStrictly(*pDrawBitmap); + String imagePath = _BitmapImpl::GetInstance(*pDrawBitmap)->GetFileName(); + + if (!isNinePatchedBitmap && !imagePath.IsEmpty()) + { + pBitmap->pVE->SetBackgroundColor(_Colorf(0.0f, 0.0f, 0.0f, 0.0f)); + pBitmap->pVE->SetImageSource(imagePath); + } + else + { + pBitmap->pVE->SetImageSource(L""); + + Canvas* pCanvas = pBitmap->pVE->GetCanvasN(); + SysTryReturn(NID_UI_CTRL, (pCanvas != null), false, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + + if (isNinePatchedBitmap) + { + pCanvas->DrawNinePatchedBitmap(FloatRectangle(0.0f, 0.0f, rect.width, rect.height), *pDrawBitmap); + } + else + { + pCanvas->DrawBitmap(FloatRectangle(0.0f, 0.0f, rect.width, rect.height), *pDrawBitmap); + } + + delete pCanvas; + } + + return true; +} + +void +_ListViewItem::DrawDivider(void) +{ + if ((__itemType == LISTVIEW_ITEM_TYPE_GROUP) && (GetItemBackgroundBitmap(LIST_ITEM_STATE_NORMAL) == null)) + { + float lineHeight = 0.0f; + float lineLeftMargin = 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); + + FloatRectangle textBounds; + FloatRectangle bitmapBounds; + _ListViewItemElementText* pElementText = GetElementText(LIST_ITEM_RESERVED_ID_3); + _ListViewItemElementBitmap* pElementBitmap = GetElementBitmap(LIST_ITEM_RESERVED_ID_2); + + if ((pElementText != null) && (pElementText->pVE != null)) + { + textBounds = pElementText->pVE->GetBounds(); + } + + if ((pElementBitmap != null) && (pElementBitmap->pVE != null)) + { + bitmapBounds = pElementBitmap->pVE->GetBounds(); + } + + float textBottomPos = textBounds.y + textBounds.height; + float bitmapBottomPos = bitmapBounds.y + bitmapBounds.height; + + lineTopMargin = (textBottomPos > bitmapBottomPos) ? textBottomPos : bitmapBottomPos; + + FloatRectangle bounds = GetBoundsF(); + float defaultMargin = bounds.height - lineHeight; + lineTopMargin = (lineTopMargin > defaultMargin) ? lineTopMargin : defaultMargin; + + if (bounds.height <= lineTopMargin) + { + return; + } + + if (__pDivider == null) + { + __pDivider = _Label::CreateLabelN(); + SysTryReturnVoidResult(NID_UI_CTRL, __pDivider != null, E_OUT_OF_MEMORY, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + AttachSystemChild(*__pDivider); + + _AccessibilityContainer* pContainer = __pDivider->GetAccessibilityContainer(); + if (pContainer != null) + { + pContainer->Activate(false); + } + } + + Color underLineColor; + GET_COLOR_CONFIG(TABLEVIEW::GROUPITEM_INDEX_BAR_NORMAL, underLineColor); + + __pDivider->SetBounds(FloatRectangle(lineLeftMargin, lineTopMargin, bounds.width - lineLeftMargin * 2.0f, lineHeight)); + __pDivider->SetBackgroundColor(underLineColor); + __pDivider->Invalidate(); + } +} + +void +_ListViewItem::StartTextSlideTimer(void) +{ + result r = E_SUCCESS; + + if (__pTextSlideTimer == null) + { + __pTextSlideTimer = new (std::nothrow) Timer(); + + r = __pTextSlideTimer->Construct(*this); + SysTryCatch(NID_UI, (r == E_SUCCESS), ,E_SYSTEM, ("[E_SYSTEM] Timer cannot construct.")); + } + else + { + __pTextSlideTimer->Cancel(); + } + + r = __pTextSlideTimer->Start(TEXT_SLIDING_TIMER_DURATION); + SysTryCatch(NID_UI, (r == E_SUCCESS), , E_SYSTEM, ("[E_SYSTEM] Timer Start failed.")); + + return; + +CATCH: + StopTextSlideTimer(); +} + +void +_ListViewItem::StopTextSlideTimer(void) +{ + delete __pTextSlideTimer; + __pTextSlideTimer = null; +} + +bool +_ListViewItem::IsTextSlideTimerRunning(void) +{ + return (__pTextSlideTimer != null); +} + +void +_ListViewItem::OnTextSlideTimerExpired(void) +{ + if (__selectedElementId != -1) + { + _ListViewItemElement* pElement = GetElement(__selectedElementId); + + if ((pElement != null) && (pElement->pTextElement->pTextObject != null)) + { + TextObject* pTextObject = pElement->pTextElement->pTextObject; + + Canvas* pCanvas = (pElement->pTextElement->pVE)->GetCanvasN(); + SysTryReturnVoidResult(NID_UI_CTRL, (pCanvas != null), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + + pTextObject->SetForegroundColor(pElement->pTextElement->textColor[LISTVIEW_ITEM_STATUS_PRESSED], 0, pTextObject->GetTextLength()); + pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_SLIDE_LEFT); + pTextObject->Compose(); + if (pTextObject->DrawWithOffset(*_CanvasImpl::GetInstance(*pCanvas)) == E_SUCCESS) + { + pCanvas->Show(_CoordinateSystemUtils::ConvertToInteger(pElement->bounds)); + StartTextSlideTimer(); + } + else + { + Invalidate(); + } + + delete pCanvas; + pCanvas = null; + } + } +} + +void +_ListViewItem::ResetTextSlide(void) +{ + if (IsTextSlideTimerRunning()) + { + StopTextSlideTimer(); + + _ListViewItemElement* pElement = GetElement(__selectedElementId); + + if ((pElement != null) && (pElement->pTextElement->pTextObject != null)) + { + 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); + } + } +} + +void +_ListViewItem::OnTimerExpired(Timer& timer) +{ + _TableViewItem::OnTimerExpired(timer); + + if (&timer == __pTextSlideTimer) + { + OnTextSlideTimerExpired(); + } +} + +bool +_ListViewItem::ParseCutlinkText(_ListViewItemElementText* pElementText) +{ + if ((pElementText == null) || (pElementText->pEnrichedText == null)) + { + return false; + } + + TextObject* pTextObject = pElementText->pTextObject; + unsigned long cutlinkMaskType = pElementText->cutlinkMaskType; + TextLinkInfo* pTextLinkInfo = null; + TextLinkInfo* pNextLinkInfo = null; + int currentOffset = 0; + bool isChangingCutlink = false; + wchar_t* pCutlinkString = null; + bool ret = true; + + 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] 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] Memory allocation failed.")); + + pParser->SetCutLinkMask(cutlinkMaskType); + + pTextLinkInfo = pParser->Parse(pStr, strLength, 0); + SysTryCatch(NID_UI, (pTextLinkInfo != null), (ret = false), E_SYSTEM, ("[E_SYSTEM] TextLinkInfo is not valid.")); + + // remove all text element in _EnrichedTextImpl + pElementText->pEnrichedText->RemoveAllTextElements(true); + //pTextObject->RemoveAll(true); + + while (pTextLinkInfo != null) + { + isChangingCutlink = false; + + switch (pTextLinkInfo->linkType) + { + case LINK_TYPE_URL: + if (cutlinkMaskType & LINK_TYPE_URL) + { + isChangingCutlink = true; + } + break; + + case LINK_TYPE_EMAIL: + if (cutlinkMaskType & LINK_TYPE_EMAIL) + { + isChangingCutlink = true; + } + break; + + case LINK_TYPE_TEL_NUM: + if (cutlinkMaskType & LINK_TYPE_TEL_NUM) + { + isChangingCutlink = true; + } + break; + + case LINK_TYPE_APPCONTROL: + if (cutlinkMaskType & LINK_TYPE_APPCONTROL) + { + isChangingCutlink = true; + } + break; + + case LINK_TYPE_MIME: + if (cutlinkMaskType & LINK_TYPE_MIME) + { + isChangingCutlink = true; + } + break; + + default: + break; + } + + pCutlinkString = new (std::nothrow) wchar_t[pTextLinkInfo->length + 1]; + + if (pCutlinkString == null) + { + while (pTextLinkInfo != null) + { + pNextLinkInfo = pTextLinkInfo->pNextLinkInfo; + delete pTextLinkInfo; + pTextLinkInfo = pNextLinkInfo; + } + } + + for (int i = 0; i < pTextLinkInfo->length; i++) + { + pCutlinkString[i] = pStr[pTextLinkInfo->srcOffset + i]; + } + + pCutlinkString[pTextLinkInfo->length] = null; + + if (currentOffset < pTextLinkInfo->srcOffset) + { + TextSimple* pSimpleText = new (std::nothrow) TextSimple(pStr + currentOffset, pTextLinkInfo->srcOffset - currentOffset); + pTextObject->AppendElement(*pSimpleText); + } + + if (isChangingCutlink == true) + { + TextCutLink* pTextElement = new (std::nothrow) TextCutLink(false, pTextLinkInfo->linkType, pStr + pTextLinkInfo->srcOffset, + pTextLinkInfo->length); + pTextElement->SetEditModeEnable(true); + pTextObject->AppendElement(*pTextElement); + } + else + { + TextSimple* pSimpleText = new (std::nothrow) TextSimple(pCutlinkString, pTextLinkInfo->length); + pTextObject->AppendElement(*pSimpleText); + } + + currentOffset = pTextLinkInfo->srcOffset + pTextLinkInfo->length; + + pNextLinkInfo = pTextLinkInfo->pNextLinkInfo; + delete pTextLinkInfo; + pTextLinkInfo = pNextLinkInfo; + + delete[] pCutlinkString; + pCutlinkString = null; + } + + if (strLength != currentOffset) + { + TextSimple* pSimpleText = new (std::nothrow) TextSimple(pStr + currentOffset, strLength - currentOffset); + pTextObject->AppendElement(*pSimpleText); + } + + //pTextObject->SetRange(0, pTextObject->GetLength()); + //pTextObject->NotifyTextChanged(0, pTextObject->GetLength()); + pTextObject->Compose(); + +CATCH: + delete pParser; + pParser = null; + + if (pStr != null) + { + delete[] pStr; + pStr = null; + } + + return ret; +} + +bool +_ListViewItem::IsCutlinkTextSelected(const FloatPoint& position, int* index, _ListViewItemUiLinkInfo** ppInfo) const +{ + int elementId = GetElementIdFromPosition(position); + _ListViewItemElementText* pElement = GetElementText(elementId); + _ListViewItemElement* pElementItem = GetElement(elementId); + + if ((pElement != null) && (pElement->pTextObject != null) && (pElement->cutlinkViewModeEnabled) && (pElementItem != null)) + { + TextObject* pTextObject = pElement->pTextObject; + FloatRectangle displayRect = pElementItem->bounds; + + int selectedIndex = pTextObject->GetCutLinkIndexFromPositionData(position.x - displayRect.x, position.y - displayRect.y); + + if (selectedIndex >= 0) + { + *index = selectedIndex; + TextCutLink* pCutLinkObject = dynamic_cast(pTextObject->GetCutLinkElementAtCutLinkElementIndex(selectedIndex)); + if (pCutLinkObject == null) + { + return false; + } + + String cutLinkString(pCutLinkObject->GetText()); + LinkType baseLinkType = pCutLinkObject->GetCutLinkType(); + + if (baseLinkType & pElement->cutlinkMaskType) + { + _ListViewItemUiLinkInfo* pUiLinkInfo = new (std::nothrow) _ListViewItemUiLinkInfo(); + + pUiLinkInfo->textInfo = cutLinkString; + pUiLinkInfo->linkType = baseLinkType; + pUiLinkInfo->linkInfo = cutLinkString; + + *ppInfo = pUiLinkInfo; + } + } + + return true; + } + + return false; +} + +bool +_ListViewItem::SetCutlinkTextFocus(const FloatPoint& position) +{ + int elementId = GetElementIdFromPosition(position); + _ListViewItemElementText* pElement = GetElementText(elementId); + + if ((pElement != null) && (pElement->pTextObject != null) && (pElement->cutlinkViewModeEnabled)) + { + TextObject* pTextObject = pElement->pTextObject; + FloatRectangle displayRect = pTextObject->GetBoundsF(); + + int index = pTextObject->GetCutLinkIndexFromPositionData(position.x - displayRect.x, position.y - displayRect.y); + + if (index >= 0) + { + pTextObject->ChangeCutLinkState(index, true); + return true; + } + } + + return false; +} + +bool +_ListViewItem::ResetCutlinkFocus(void) +{ + _LinkedList <_ListViewItemElement>::_Iterator iter; + + for (iter = __elements.begin(); iter != __elements.end(); iter++) + { + if ((iter->elementType == LISTVIEW_ITEM_ELEMENT_TEXT) && (iter->pTextElement->pTextObject)) + { + iter->pTextElement->pTextObject->ResetAllCutLinkElementsState(); + } + } + + return true; +} + +Font* +_ListViewItem::GetFont(unsigned long fontStyle, float fontSize) +{ + __fontStyle = fontStyle; + __fontSize = fontSize; + + return GetFallbackFont(); +} + +void +_ListViewItem::OnFontChanged(Font* pFont) +{ + __fontName = _Control::GetFont(); + + if (__pDescriptionText != null) + { + __pDescriptionText->SetFont(__fontName); + } + + if (GetContextItem() != null) + { + GetContextItem()->SetFont(__fontName); + } +} + +void +_ListViewItem::OnFontInfoRequested(unsigned long& style, int& size) +{ + style = __fontStyle; + size = _CoordinateSystemUtils::ConvertToInteger(__fontSize); +} + +void +_ListViewItem::OnFontInfoRequested(unsigned long& style, float& size) +{ + style = __fontStyle; + size = __fontSize; +} + +bool +CompareAccessibilityElement(_ListViewItemElement* a, _ListViewItemElement* b) +{ + if (_FloatCompare(a->bounds.y, b->bounds.y)) + { + return (a->bounds.x < b->bounds.x); + } + + return (a->bounds.y < b->bounds.y); +} + +void +_ListViewItem::SetAccessibilityElement(void) +{ + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + + if (pContainer != null) + { + if (__pAccessibilityElement == null) + { + __pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true); + SysTryReturnVoidResult(NID_UI_CTRL, (__pAccessibilityElement != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pContainer->AddElement(*__pAccessibilityElement); + } + + __pAccessibilityElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height)); + } +} + +_AccessibilityElement* +_ListViewItem::GetAccessibilityElement(void) +{ + return __pAccessibilityElement; +} + +void +_ListViewItem::SetAccessibilityElementTrait(void) +{ + if(__pAccessibilityElement == null) + { + return; + } + int groupIndex = -1; + int itemIndex = -1; + + switch (GetItemStyle()) + { + case TABLE_VIEW_ANNEX_STYLE_NORMAL: + GetItemIndex(groupIndex, itemIndex); + if(groupIndex != -1 && itemIndex == -1) + { + __pAccessibilityElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_GROUP_INDEX"); + } + break; + + case TABLE_VIEW_ANNEX_STYLE_MARK: + __pAccessibilityElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_TICKBOX_T_TTS"); + break; + + case TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING: + case TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER: + __pAccessibilityElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_ON_OFF_BUTTON_T_TTS"); + break; + + case TABLE_VIEW_ANNEX_STYLE_DETAILED: + __pAccessibilityElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_BUTTON_T_TTS"); + break; + + case TABLE_VIEW_ANNEX_STYLE_RADIO: + __pAccessibilityElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_RADIO_BUTTON_T_TTS"); + break; + + default: + break; + } +} +void +_ListViewItem::SetAccessibilityElementValue(void) +{ + if(__pAccessibilityElement == null) + { + return; + } + + switch (GetItemStyle()) + { + case TABLE_VIEW_ANNEX_STYLE_MARK: + if (IsChecked()) + { + __pAccessibilityElement->SetValueWithStringId("IDS_TPLATFORM_BODY_TICK_T_TTS"); + } + else + { + __pAccessibilityElement->SetValueWithStringId("IDS_TPLATFORM_BODY_UNTICK_T_TTS"); + } + break; + + case TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING: + case TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER: + if (IsChecked()) + { + __pAccessibilityElement->SetValueWithStringId("IDS_TPLATFORM_BODY_ON"); + } + else + { + __pAccessibilityElement->SetValueWithStringId("IDS_TPLATFORM_BODY_OFF"); + } + break; + + case TABLE_VIEW_ANNEX_STYLE_RADIO: + if (IsChecked()) + { + __pAccessibilityElement->SetValueWithStringId("IDS_TPLATFORM_BODY_SELECTED_T_TTS"); + } + else + { + __pAccessibilityElement->SetValueWithStringId("IDS_TPLATFORM_BODY_NOT_SELECTED_T_TTS"); + } + break; + + default: + break; + } +} +void +_ListViewItem::SetAccessibilityElementLabel(void) +{ + if(__pAccessibilityElement == null) + { + return; + } + if(__pAccessibilityElement->GetLabel().GetLength() > 0) + { + return; + } + _LinkedList <_ListViewItemElement*> accessibilityElementList; + _LinkedList <_ListViewItemElement>::_Iterator iter; + _LinkedList <_ListViewItemElement*>::_Iterator accessibilityIter; + _ListViewItemElement* pElement = null; + String accessibilityName; + String accessibilityLabel; + int groupIndex = -1; + int itemIndex = -1; + + // accessibility element name + GetItemIndex(groupIndex, itemIndex); + + if (__itemType == LISTVIEW_ITEM_TYPE_GROUP) + { + accessibilityName = L"GroupIndex" + Integer::ToString(groupIndex); + } + else + { + accessibilityName = L"ListViewItem" + Integer::ToString(groupIndex) + L"_" + Integer::ToString(itemIndex); + } + + // accessibility element label + for (iter = __elements.begin(); iter != __elements.end(); iter++) + { + if ((iter->elementType == LISTVIEW_ITEM_ELEMENT_TEXT) || (iter->elementType == LISTVIEW_ITEM_ELEMENT_BITMAP)) + { + accessibilityElementList.push_back(&(*iter)); + } + } + + accessibilityElementList.sort(CompareAccessibilityElement); + + for (accessibilityIter = accessibilityElementList.begin(); accessibilityIter != accessibilityElementList.end(); accessibilityIter++) + { + pElement = *accessibilityIter; + + if (pElement->elementType == LISTVIEW_ITEM_ELEMENT_TEXT) + { + int textLength = pElement->pTextElement->pTextObject->GetTextLength(); + + 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] Memory allocation failed."); + + pElement->pTextElement->pTextObject->GetText(pAccessibilityText, textLength); + + accessibilityLabel += String(pAccessibilityText); + accessibilityLabel += L", "; + + delete[] pAccessibilityText; + } + } + else if (pElement->elementType == LISTVIEW_ITEM_ELEMENT_BITMAP) + { + accessibilityLabel += L"Icon, "; + } + } + + accessibilityElementList.clear(); + + if (accessibilityLabel.IsEmpty()) + { + accessibilityLabel = L"ListViewItem"; + } + + if (__descriptionTextShowState) + { + String descriptionText = __pDescriptionText->GetText(); + accessibilityLabel += ((descriptionText.GetLength() > 0) ? (L", " + descriptionText + L"") : L""); + } + __pAccessibilityElement->SetName(accessibilityName); + __pAccessibilityElement->SetLabel(accessibilityLabel); +} + +result +_ListViewItem::OnAttachedToMainTree(void) +{ + if((GetParent() != null) && (GetParent()->GetAccessibilityContainer() != null)) + { + GetParent()->GetAccessibilityContainer()->AddChildContainer(*GetAccessibilityContainer()); + } + + return _TableViewItem::OnAttachedToMainTree(); +} + +result +_ListViewItem::OnDetachingFromMainTree(void) +{ + if((GetParent() != null) && (GetParent()->GetAccessibilityContainer() != null)) + { + GetParent()->GetAccessibilityContainer()->RemoveChildContainer(*GetAccessibilityContainer()); + } + + return _Control::OnDetachingFromMainTree(); +} + +_ListViewItemHitTestVEDelegator::_ListViewItemHitTestVEDelegator(void) +{ +} + +_ListViewItemHitTestVEDelegator::~_ListViewItemHitTestVEDelegator(void) +{ +} + +HitTestResult +_ListViewItemHitTestVEDelegator::HitTest(VisualElement& target, const FloatPoint& point) +{ + return HIT_TEST_NOWHERE; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_ListViewItemProviderAdaptor.cpp b/src/ui/controls/FUiCtrl_ListViewItemProviderAdaptor.cpp new file mode 100644 index 0000000..f4502fe --- /dev/null +++ b/src/ui/controls/FUiCtrl_ListViewItemProviderAdaptor.cpp @@ -0,0 +1,425 @@ +// +// 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_ListViewItemProviderAdaptor.cpp + * @brief This is the implementation file for _ListViewItemProviderAdaptor class. + * + * This file contains the implementation of _ListViewItemProviderAdaptor class. + */ + +#include +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_ResourceManager.h" +#include "FUiCtrl_IListItemCommon.h" +#include "FUiCtrl_ListItemBaseImpl.h" +#include "FUiCtrl_ListViewContextItem.h" +#include "FUiCtrl_ListViewImpl.h" +#include "FUiCtrl_ListViewItem.h" +#include "FUiCtrl_ListViewItemProviderAdaptor.h" + +#ifdef MEMORY_LEAK_CHECK +#include "mem_leak_check.h" +#endif + +using namespace Tizen::Graphics; +using namespace Tizen::Base; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_ListViewItemProviderAdaptor::_ListViewItemProviderAdaptor(const IListViewItemProvider& provider) + : __pListViewProvider(const_cast(&provider)) + , __pListViewProviderF(null) + , __pEventListener(null) + , __fontName(L"") + , __itemAverageHeight(0.0f) + , __itemLoadedCount(0) + , __countOfAllItems(0) + , __pItemNeedsLazyDeletion(null) + , __pLazyDeletionItem(null) + , __usingFloatingPoint(false) + , __pDefaultItem(null) +{ +} + +_ListViewItemProviderAdaptor::_ListViewItemProviderAdaptor(const IListViewItemProviderF& provider) + : __pListViewProvider(null) + , __pListViewProviderF(const_cast(&provider)) + , __pEventListener(null) + , __fontName(L"") + , __itemAverageHeight(0.0f) + , __itemLoadedCount(0) + , __countOfAllItems(0) + , __pItemNeedsLazyDeletion(null) + , __pLazyDeletionItem(null) + , __usingFloatingPoint(true) + , __pDefaultItem(null) +{ +} + +_ListViewItemProviderAdaptor::~_ListViewItemProviderAdaptor(void) +{ + delete __pDefaultItem; + __pDefaultItem = null; + + __descriptionTextShowItem.clear(); + + SetItemLazyDeletion(null); +} + +void +_ListViewItemProviderAdaptor::SetItemProvider(const IListViewItemProvider& provider) +{ + __pListViewProvider = const_cast(&provider); + __pListViewProviderF = null; + + __usingFloatingPoint = false; +} + +void +_ListViewItemProviderAdaptor::SetItemProvider(const IListViewItemProviderF& provider) +{ + __pListViewProvider = null; + __pListViewProviderF = const_cast(&provider); + + __usingFloatingPoint = true; +} + +IListViewItemProvider* +_ListViewItemProviderAdaptor::GetItemProvider(void) const +{ + return __pListViewProvider; +} + +IListViewItemProviderF* +_ListViewItemProviderAdaptor::GetItemProviderF(void) const +{ + return __pListViewProviderF; +} + +_IListItemCommon* +_ListViewItemProviderAdaptor::LoadItem(int groupIndex, int itemIndex) +{ + SysTryReturn(NID_UI_CTRL, (groupIndex == 0), null, E_INVALID_ARG, + "[E_INVALID_ARG] parameter not available."); + + _IListItemCommon* pDefaultItem = null; + if (itemIndex == -1) + { + pDefaultItem = GetDefaultItem(); + pDefaultItem->SetAppInfo(null); + + return pDefaultItem; + } + + ListItemBase* pItemBase = null; + if (__usingFloatingPoint) + { + pItemBase = __pListViewProviderF->CreateItem(itemIndex, GetListWidth()); + } + else + { + pItemBase = __pListViewProvider->CreateItem(itemIndex, _CoordinateSystemUtils::ConvertToInteger(GetListWidth())); + } + + if (pItemBase == null) + { + pDefaultItem = GetDefaultItem(); + pDefaultItem->SetAppInfo(null); + + return pDefaultItem; + } + + _ListItemBaseImpl* pItemBaseImpl = _ListItemBaseImpl::GetInstance(*pItemBase); + SysAssert(pItemBaseImpl != null); + + // add ListViewItem event listener + pItemBaseImpl->AddListViewItemEventListener(*__pEventListener); + + _ListViewItem* pListViewItem = pItemBaseImpl->GetListViewItem(); + SysAssert(pListViewItem != null); + + pListViewItem->AddRef(); + pListViewItem->SetAppInfo(pItemBase); + pListViewItem->SetItemStyle(static_cast(pItemBaseImpl->GetListItemAnnexStyle())); + pListViewItem->SetItemWidth(GetListWidth()); + pListViewItem->SetFont(__fontName); + + if (IsDescriptionTextShown(itemIndex)) + { + pListViewItem->SetDescriptionTextShowState(true); + } + + if (__itemLoadedCount < __countOfAllItems) + { + __itemAverageHeight = (__itemAverageHeight * __itemLoadedCount + pListViewItem->GetItemHeight()) / (__itemLoadedCount + 1); + __itemLoadedCount++; + } + + return pListViewItem; +} + +result +_ListViewItemProviderAdaptor::UnloadItem(_IListItemCommon* pListItem, int groupIndex, int itemIndex) +{ + SysTryReturn(NID_UI_CTRL, pListItem != null, E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG]pListItem is invalid argument"); + + _ListViewItem* pListViewItem = static_cast<_ListViewItem*>(pListItem); + if (pListViewItem->GetParent() != null) + { + pListViewItem->GetParent()->DetachChild(*pListViewItem); + } + + // default item case + if (pListViewItem == GetDefaultItem()) + { + return E_SUCCESS; + } + + if (pListViewItem == __pItemNeedsLazyDeletion) + { + SetItemLazyDeletion(pListViewItem); + } + + if (pListViewItem->Release() != 0) + { + ListItemBase* pItemBase = static_cast(pListViewItem->GetAppInfo()); + + _ListItemBaseImpl* pItemBaseImpl = _ListItemBaseImpl::GetInstance(*pItemBase); + SysAssert(pItemBaseImpl != null); + + // remove ListViewItem event listener + pItemBaseImpl->RemoveListViewItemEventListener(*__pEventListener); + + if (__usingFloatingPoint) + { + if (!__pListViewProviderF->DeleteItem(itemIndex, pItemBase, GetListWidth())) + { + delete pItemBase; + } + } + else + { + if (!__pListViewProvider->DeleteItem(itemIndex, pItemBase, _CoordinateSystemUtils::ConvertToInteger(GetListWidth()))) + { + delete pItemBase; + } + } + } + + return E_SUCCESS; +} + +result +_ListViewItemProviderAdaptor::DeleteItem(_IListItemCommon* pListItem, int groupIndex, int itemIndex) +{ + SysTryReturn(NID_UI_CTRL, pListItem != null, E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] pListItem is invalid argument."); + + _ListViewItem* pListViewItem = static_cast<_ListViewItem*>(pListItem); + if (pListViewItem->GetParent() != null) + { + pListViewItem->GetParent()->DetachChild(*pListViewItem); + } + + // default item case + if (pListViewItem == GetDefaultItem()) + { + return E_SUCCESS; + } + + if (pListViewItem == __pItemNeedsLazyDeletion) + { + SetItemLazyDeletion(pListViewItem); + } + + if (pListViewItem->Release() != 0) + { + ListItemBase* pItemBase = static_cast(pListViewItem->GetAppInfo()); + delete pItemBase; + } + + return E_SUCCESS; +} + +bool +_ListViewItemProviderAdaptor::UpdateItem(_IListItemCommon* pItem, int groupIndex, int itemIndex) +{ + _ListViewItem* pListViewItem = static_cast<_ListViewItem*>(pItem); + + if (pListViewItem != null) + { + pListViewItem->SetDescriptionTextShowState(IsDescriptionTextShown(itemIndex)); + } + + return true; +} + +int +_ListViewItemProviderAdaptor::GetItemCount(int groupIndex) const +{ + _ListViewItemProviderAdaptor* pItemProviderAdaptor = const_cast<_ListViewItemProviderAdaptor*>(this); + + if (__usingFloatingPoint) + { + pItemProviderAdaptor->__countOfAllItems = __pListViewProviderF->GetItemCount(); + } + else + { + pItemProviderAdaptor->__countOfAllItems = __pListViewProvider->GetItemCount(); + } + + return __countOfAllItems; +} + +int +_ListViewItemProviderAdaptor::GetGroupCount(void) const +{ + return 1; +} + +float +_ListViewItemProviderAdaptor::GetDefaultItemHeight(void) +{ + return __itemAverageHeight; +} + +float +_ListViewItemProviderAdaptor::GetDefaultGroupItemHeight(void) +{ + return 0.0f; +} + +bool +_ListViewItemProviderAdaptor::SetDescriptionTextShowState(int itemIndex, bool show) +{ + int index = -1; + _LinkedList ::_Iterator theIter = __descriptionTextShowItem.begin(); + + while (theIter != __descriptionTextShowItem.end()) + { + index = (int) (*theIter); + + if (index == itemIndex) + { + if (show == false) + { + __descriptionTextShowItem.erase(theIter); + } + + return true; + } + else if (index > itemIndex) + { + if (show == true) + { + __descriptionTextShowItem.insert(theIter, itemIndex); + } + + return true; + } + + theIter++; + } + + if (show == true) + { + __descriptionTextShowItem.push_back(itemIndex); + } + + return true; +} + +bool +_ListViewItemProviderAdaptor::IsDescriptionTextShown(int itemIndex) const +{ + int index = -1; + _LinkedList ::_Iterator theIter = __descriptionTextShowItem.begin(); + + while (theIter != __descriptionTextShowItem.end()) + { + index = (int) (*theIter); + + if (index == itemIndex) + { + return true; + } + else if (index > itemIndex) + { + return false; + + } + + theIter++; + } + + return false; +} + +void +_ListViewItemProviderAdaptor::SetListViewItemEventListener(_IUiListViewItemEventListener& listener) +{ + __pEventListener = &listener; +} + +void +_ListViewItemProviderAdaptor::SetItemFont(const String& fontName) +{ + __fontName = fontName; +} + +void +_ListViewItemProviderAdaptor::SetItemNeedsLazyDeletion(_ListViewItem* pItem) +{ + __pItemNeedsLazyDeletion = pItem; +} + +void +_ListViewItemProviderAdaptor::SetItemLazyDeletion(_ListViewItem* pItem) +{ + if (__pLazyDeletionItem != pItem) + { + if (__pLazyDeletionItem != null) + { + __pLazyDeletionItem->Release(); + } + if (pItem != null) + { + pItem->AddRef(); + } + + __pLazyDeletionItem = 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 new file mode 100644 index 0000000..2ef2918 --- /dev/null +++ b/src/ui/controls/FUiCtrl_ListViewModel.cpp @@ -0,0 +1,1782 @@ +// +// 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_ListViewModel.cpp + * @brief This is the implementation file for _ListViewModel class. + * + * This file contains the implementation of _ListViewModel class. + */ + +#include +#include "FUiCtrl_IListItemProviderAdaptor.h" +#include "FUiCtrl_IListItemCommon.h" +#include "FUiCtrl_ListViewModel.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +_ListViewModel::_ListViewModel(void) + : __pListProviderAdaptor(null) + , __pTemporaryItemBuffer(null) + , __countOfAllGroups(0) + , __countOfAllItems(0) + , __indexOfFocusedGroup(-1) + , __indexOfFocusedItem(-1) + , __sizeOfCachingItems(CACHE_SIZE) + , __overflowItemsRemovingEnabled(true) + , __onRemovingAllItems(false) + , __pListViewModelDelegate(null) +{ + +} + +_ListViewModel::~_ListViewModel(void) +{ + if (__pTemporaryItemBuffer != null) + { + int temporaryGroupIndex = -1; + int temporaryItemIndex = -1; + __pTemporaryItemBuffer->GetItemIndex(temporaryGroupIndex, temporaryItemIndex); + + __pListProviderAdaptor->DeleteItem(__pTemporaryItemBuffer, temporaryGroupIndex, temporaryItemIndex); + __pTemporaryItemBuffer = null; + } + + if (!__backupGroupNodes.empty()) + { + _ListViewGroupNode* pBackupedListGroupNode = null; + int count = __backupGroupNodes.size(); + for (int i = 0; i < count; i++) + { + pBackupedListGroupNode = __backupGroupNodes.back(); + __backupGroupNodes.pop_back(); + + delete pBackupedListGroupNode; + } + } + + DeleteAllGroupAndItem(); +} + +_IListItemProviderAdaptor* +_ListViewModel::GetItemProviderAdaptor(void) const +{ + return __pListProviderAdaptor; +} + +result +_ListViewModel::RegisterItemProviderAdaptor(const _IListItemProviderAdaptor* pProviderAdaptor) +{ + SysTryReturn(NID_UI_CTRL, pProviderAdaptor != null, E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] pProviderAdaptor is null."); + + if (__pListProviderAdaptor != null) + { + RemoveAllItem(false); + } + + __pListProviderAdaptor = const_cast<_IListItemProviderAdaptor*>(pProviderAdaptor); + + return E_SUCCESS; +} + +result +_ListViewModel::SetGroupExpandState(int groupIndex, bool state) +{ + _ListViewGroupNode* pListGroupNode = GetGroupNode(groupIndex); + SysTryReturn(NID_UI_CTRL, pListGroupNode != null, GetLastResult(), GetLastResult(), + "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + pListGroupNode->__itemExpanded = state; + + return E_SUCCESS; +} + +bool +_ListViewModel::IsGroupExpanded(int groupIndex) const +{ + _ListViewGroupNode* pListGroupNode = GetGroupNode(groupIndex); + SysTryReturn(NID_UI_CTRL, pListGroupNode != null, false, GetLastResult(), + "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + return pListGroupNode->__itemExpanded; +} + +_IListItemCommon* +_ListViewModel::GetItemFromTemporaryBuffer(int groupIndex, int itemIndex) +{ + if (__onRemovingAllItems) + { + return null; + } + + int temporaryGroupIndex = -1; + int temporaryItemIndex = -1; + if (__pTemporaryItemBuffer != null) + { + __pTemporaryItemBuffer->GetItemIndex(temporaryGroupIndex, temporaryItemIndex); + if (groupIndex == temporaryGroupIndex && itemIndex == temporaryItemIndex) + { + return __pTemporaryItemBuffer; + } + } + + _IListItemCommon* pItem = GetItemFromContainer(groupIndex, itemIndex); + + if (pItem == null) + { + __pListProviderAdaptor->UnloadItem(__pTemporaryItemBuffer, temporaryGroupIndex, temporaryItemIndex); + __pTemporaryItemBuffer = __pListProviderAdaptor->LoadItem(groupIndex, itemIndex); + if (__pTemporaryItemBuffer != null) + { + __pTemporaryItemBuffer->SetItemIndex(groupIndex, itemIndex); + } + } + else if (__pTemporaryItemBuffer != null && __pTemporaryItemBuffer != pItem) + { + __pListProviderAdaptor->UnloadItem(__pTemporaryItemBuffer, temporaryGroupIndex, temporaryItemIndex); + __pTemporaryItemBuffer = null; + + return pItem; + } + else + { + __pTemporaryItemBuffer = null; + + return pItem; + } + + return __pTemporaryItemBuffer; +} + +_IListItemCommon* +_ListViewModel::GetItemFromContainer(int groupIndex, int itemIndex) const +{ + if (groupIndex < 0 || groupIndex >= __countOfAllGroups) + { + return null; + } + + _ListViewGroupNode* pListGroupNode = GetGroupNode(groupIndex); + SysTryReturn(NID_UI_CTRL, pListGroupNode != null, null, GetLastResult(), + "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + int temporaryGroupIndex = -1; + int temporaryItemIndex = -1; + + _IListItemCommon* pItem = null; + _LinkedList <_IListItemCommon*>::_Iterator theIter = pListGroupNode->__items.begin(); + _LinkedList <_IListItemCommon*>::_Iterator theEndIter = pListGroupNode->__items.end(); + + while (theIter != theEndIter) + { + pItem = *theIter; + pItem->GetItemIndex(temporaryGroupIndex, temporaryItemIndex); + + if (temporaryItemIndex == itemIndex) + { + return pItem; + } + else if (temporaryItemIndex > itemIndex) + { + break; + } + + theIter++; + } + + return null; +} + +_IListItemCommon* +_ListViewModel::LoadItem(int groupIndex, int itemIndex) +{ + if (__onRemovingAllItems) + { + return null; + } + + // check validation of groupIndex + if (groupIndex < 0 || groupIndex >= __countOfAllGroups) + { + return null; + } + + _ListViewGroupNode* pListGroupNode = GetGroupNode(groupIndex); + SysTryReturn(NID_UI_CTRL, pListGroupNode != null, null, GetLastResult(), + "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + // check validation of item index + if (itemIndex < -1 || itemIndex >= pListGroupNode->__itemCountInGroup) + { + return null; + } + + // load item + _IListItemCommon* pItemCommon = GetItemFromContainer(groupIndex, itemIndex); + if (pItemCommon == null) + { + pItemCommon = __pListProviderAdaptor->LoadItem(groupIndex, itemIndex); + if (pItemCommon != null) + { + pItemCommon->SetChecked(IsItemChecked(groupIndex, itemIndex)); + pItemCommon->SetItemEnabled(IsItemEnabled(groupIndex, itemIndex)); + pItemCommon->SetItemIndex(groupIndex, itemIndex); + + LoadItemToContainer(groupIndex, itemIndex, *pItemCommon); + } + } + + return pItemCommon; +} + +result +_ListViewModel::LoadItemToContainer(int groupIndex, int itemIndex, _IListItemCommon& item) +{ + _ListViewGroupNode* pListGroupNode = __groupNodes.at(groupIndex); + SysTryReturn(NID_UI_CTRL, pListGroupNode != null, GetLastResult(), GetLastResult(), + "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + int overCount = 0; + bool pushToTopOrMiddle = true; + + if (pListGroupNode->__items.empty()) + { + int loadedGroups = GetAllGroupCount(); + _ListViewGroupNode* pTemporaryGroupNode = null; + for (int i = loadedGroups - 1; i >= 0; i--) + { + pTemporaryGroupNode = GetGroupNode(i); + if (pTemporaryGroupNode != null) + { + if (i > groupIndex) + { + if (pTemporaryGroupNode->__items.size() > 0) + { + break; + } + } + else + { + pushToTopOrMiddle = false; + break; + } + } + } + } + else + { + int temporaryGroupIndex = -1; + int temporaryItemIndex = -1; + _IListItemCommon* pItem = null; + _LinkedList <_IListItemCommon*>::_Iterator theIter = pListGroupNode->__items.begin(); + _LinkedList <_IListItemCommon*>::_Iterator theEndIter = pListGroupNode->__items.end(); + while (theIter != theEndIter) + { + pItem = *theIter; + pItem->GetItemIndex(temporaryGroupIndex, temporaryItemIndex); + + if (temporaryItemIndex == itemIndex) + { + return E_SUCCESS; + } + else if (temporaryItemIndex > itemIndex) + { + // push item to top or middle + pListGroupNode->__items.insert(theIter, &item); + + overCount = GetOverflowCount(); + if (overCount > 0) + { + if (__pListViewModelDelegate != null && __pListViewModelDelegate->OnOcurredOverflowItems(__sizeOfCachingItems, overCount)) + { + __sizeOfCachingItems += overCount; + } + else + { + RemoveOverflowItems(true, overCount); + } + } + + return E_SUCCESS; + } + ++theIter; + } + + int lastLoadedItemIndex = -1; + int lastLoadedGroupIndex = -1; + GetLastLoadedItemIndex(lastLoadedGroupIndex, lastLoadedItemIndex); + if (lastLoadedGroupIndex == temporaryGroupIndex && lastLoadedItemIndex == temporaryItemIndex) + { + pushToTopOrMiddle = false; + } + else + { + pushToTopOrMiddle = true; + } + } + + // push item to bottom + pListGroupNode->__items.push_back(&item); + + overCount = GetOverflowCount(); + if (overCount > 0) + { + // if push item to end of list, RemoveOverflowItems() from top. + if (__pListViewModelDelegate != null && __pListViewModelDelegate->OnOcurredOverflowItems(__sizeOfCachingItems, overCount)) + { + __sizeOfCachingItems += overCount; + } + else + { + RemoveOverflowItems(pushToTopOrMiddle, overCount); + } + } + + return E_SUCCESS; +} + +void +_ListViewModel::SetListViewModelDelegate(_IListViewModelDelegate* pDelegate) +{ + __pListViewModelDelegate = pDelegate; +} + +bool +_ListViewModel::IsValidItem(int groupIndex, int itemIndex) const +{ + // check validation of groupIndex + if (groupIndex < 0 || groupIndex >= __countOfAllGroups) + { + return false; + } + + _ListViewGroupNode* pListGroupNode = GetGroupNode(groupIndex); + SysTryReturn(NID_UI_CTRL, pListGroupNode != null, false, GetLastResult(), + "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + // check validation of item index + if (itemIndex < -1 || itemIndex >= pListGroupNode->__itemCountInGroup) + { + return false; + } + + return true; +} + +bool +_ListViewModel::IsLoadedItem(int groupIndex, int itemIndex) const +{ + // check validation of groupIndex + if (groupIndex < 0 || groupIndex >= __countOfAllGroups) + { + return false; + } + + _ListViewGroupNode* pListGroupNode = GetGroupNode(groupIndex); + SysTryReturn(NID_UI_CTRL, pListGroupNode != null, false, GetLastResult(), + "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + // check validation of item index + if (itemIndex < -1 || itemIndex >= pListGroupNode->__itemCountInGroup) + { + return false; + } + + int temporaryGroupIndex = -1; + int temporaryItemIndex = -1; + + _IListItemCommon* pItem = null; + _LinkedList <_IListItemCommon*>::_Iterator theIter = pListGroupNode->__items.begin(); + _LinkedList <_IListItemCommon*>::_Iterator theEndIter = pListGroupNode->__items.end(); + + while (theIter != theEndIter) + { + pItem = *theIter; + pItem->GetItemIndex(temporaryGroupIndex, temporaryItemIndex); + + if (temporaryItemIndex == itemIndex) + { + return true; + } + else if (temporaryItemIndex > itemIndex) + { + return false; + } + + theIter++; + } + + return false; +} + +result +_ListViewModel::AddGroup(int itemCount, bool usingRadioStyle) +{ + SysTryReturn(NID_UI_CTRL, itemCount >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The itemCount is not valid."); + + //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] Memory allocation failed."); + + pListGroupNode->__itemCountInGroup = itemCount; + pListGroupNode->__usingRadioStyle = usingRadioStyle; + + __groupNodes.push_back(pListGroupNode); + + __countOfAllItems = __countOfAllItems + itemCount + 1; // include groupItem + __countOfAllGroups++; + + return E_SUCCESS; +} + +result +_ListViewModel::InsertGroup(int groupIndex, int itemCount, bool usingRadioStyle) +{ + // check validation of groupIndex + SysTryReturn(NID_UI_CTRL, (groupIndex >= 0 && groupIndex <= __countOfAllGroups), E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] Wrong group index(%d).", groupIndex); + + SysTryReturn(NID_UI_CTRL, itemCount >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The itemCount is not valid."); + + if (__groupNodes.empty() || groupIndex == GetAllGroupCount()) + { + return AddGroup(itemCount); + } + + //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] Memory allocation failed."); + + pListGroupNode->__itemCountInGroup = itemCount; + pListGroupNode->__usingRadioStyle = usingRadioStyle; + + __groupNodes.insert(__groupNodes.begin() + groupIndex, pListGroupNode); + + __countOfAllItems = __countOfAllItems + itemCount + 1; // include groupItem + __countOfAllGroups++; + + // item index reordering + int groupCount = GetAllGroupCount(); + int temporaryGroupIndex = -1; + int temporaryItemIndex = -1; + + pListGroupNode = null; + _IListItemCommon* pItem = null; + + for (int i = groupCount - 1; i > groupIndex; i--) + { + pListGroupNode = GetGroupNode(i); + if (pListGroupNode != null) + { + for (int j = pListGroupNode->__items.size() - 1; j >= 0; j--) + { + pItem = pListGroupNode->__items.at(j); + if (pItem != null) + { + pItem->GetItemIndex(temporaryGroupIndex, temporaryItemIndex); + pItem->SetItemIndex(i, temporaryItemIndex); + } + } + } + } + + return E_SUCCESS; +} + +result +_ListViewModel::UnloadAllItem(void) +{ + if (__groupNodes.empty()) + { + return E_SUCCESS; + } + + int groupCount = GetAllGroupCount(); + int itemCount = 0; + + _ListViewGroupNode* pListGroupNode = null; + _IListItemCommon* pItem = null; + + int groupIndex = -1; + int itemIndex = -1; + for (int i = groupCount - 1; i >= 0; i--) + { + pListGroupNode = GetGroupNode(i); + if (pListGroupNode != null) + { + itemCount = pListGroupNode->__items.size(); + for (int j = itemCount - 1; j >= 0; j--) + { + pItem = pListGroupNode->__items.back(); + pListGroupNode->__items.pop_back(); + + if (pItem != null) + { + pItem->GetItemIndex(groupIndex, itemIndex); + __pListProviderAdaptor->UnloadItem(pItem, groupIndex, itemIndex); + } + } + } + } + + return E_SUCCESS; +} + +result +_ListViewModel::DeleteAllGroupAndItem(void) +{ + return RemoveAllItem(true); +} + +result +_ListViewModel::RemoveAllItem(bool internalDestroy, bool backupItemStatus) +{ + if (__groupNodes.empty()) + { + return E_SUCCESS; + } + + __onRemovingAllItems = true; + + _LinkedList <_ListViewGroupNode*> backupGroupNodes; + backupGroupNodes = __groupNodes; + + __countOfAllGroups = 0; + __countOfAllItems = 0; + + int groupCount = backupGroupNodes.size(); + int itemCount = 0; + + _ListViewGroupNode* pListGroupNode = null; + _IListItemCommon* pItem = null; + + int groupIndex = -1; + int itemIndex = -1; + for (int i = groupCount - 1; i >= 0; i--) + { + pListGroupNode = backupGroupNodes.at(i); + + if (pListGroupNode != null) + { + itemCount = pListGroupNode->__items.size(); + + for (int j = itemCount - 1; j >= 0; j--) + { + pItem = pListGroupNode->__items.back(); + pListGroupNode->__items.pop_back(); + + if (pItem != null) + { + pItem->GetItemIndex(groupIndex, itemIndex); + + if (!internalDestroy) + { + __pListProviderAdaptor->UnloadItem(pItem, groupIndex, itemIndex); + } + else + { + __pListProviderAdaptor->DeleteItem(pItem, groupIndex, itemIndex); + } + } + } + + pListGroupNode->__itemCountInGroup = 0; + + if (!backupItemStatus) + { + __groupNodes.remove(pListGroupNode); + delete pListGroupNode; + pListGroupNode = null; + } + } + } + + if (backupItemStatus) + { + __backupGroupNodes = backupGroupNodes; + } + + __onRemovingAllItems = false; + return E_SUCCESS; +} + +void +_ListViewModel::RestoreItemStatus(void) +{ + if (__backupGroupNodes.empty()) + { + return; + } + + _ListViewGroupNode* pListGroupNode = null; + _ListViewGroupNode* pBackupedListGroupNode = null; + + for (int i = 0; i < __backupGroupNodes.size(); i++) + { + pListGroupNode = GetGroupNode(i); + pBackupedListGroupNode = __backupGroupNodes.at(i); + + if (pListGroupNode != null) + { + pListGroupNode->__checkedItems = pBackupedListGroupNode->__checkedItems; + pListGroupNode->__disabledItems = pBackupedListGroupNode->__disabledItems; + pListGroupNode->__itemExpanded = pBackupedListGroupNode->__itemExpanded; + } + + delete pBackupedListGroupNode; + } + + __backupGroupNodes.clear(); +} + + +result +_ListViewModel::UnloadItem(int groupIndex, int itemIndex) +{ + // check validation of groupIndex + SysTryReturn(NID_UI_CTRL, (groupIndex >= 0 && groupIndex < __countOfAllGroups), E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] Wrong group index(%d).", groupIndex); + + _ListViewGroupNode* pListGroupNode = GetGroupNode(groupIndex); + SysTryReturn(NID_UI_CTRL, pListGroupNode != null, GetLastResult(), GetLastResult(), + "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + int temporaryGroupIndex = -1; + int temporaryItemIndex = -1; + + _IListItemCommon* pItem = null; + _LinkedList <_IListItemCommon*>::_Iterator theIter = pListGroupNode->__items.begin(); + _LinkedList <_IListItemCommon*>::_Iterator theEndIter = pListGroupNode->__items.end(); + + while (theIter != theEndIter) + { + pItem = *theIter; + pItem->GetItemIndex(temporaryGroupIndex, temporaryItemIndex); + + if (temporaryItemIndex == itemIndex) + { + pListGroupNode->__items.erase(theIter); + + __pListProviderAdaptor->UnloadItem(pItem, groupIndex, itemIndex); + + return E_SUCCESS; + } + + theIter++; + } + + return E_SUCCESS; +} + +result +_ListViewModel::RemoveItemAt(int groupIndex, int itemIndex, bool internalDestroy) +{ + // check validation of groupIndex + SysTryReturn(NID_UI_CTRL, (groupIndex >= 0 && groupIndex < __countOfAllGroups), E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] Wrong group index(%d).", groupIndex); + + if (itemIndex == -1) + { + return RemoveGroup(groupIndex); + } + + _ListViewGroupNode* pListGroupNode = GetGroupNode(groupIndex); + SysTryReturn(NID_UI_CTRL, pListGroupNode != null, GetLastResult(), GetLastResult(), + "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + + _IListItemCommon* pItem = GetItemFromContainer(groupIndex, itemIndex); + + int temporaryGroupIndex = -1; + int temporaryItemIndex = -1; + _IListItemCommon* pTemporaryItem = null; + _LinkedList <_IListItemCommon*>::_Iterator theIter = pListGroupNode->__items.begin(); + while (theIter != pListGroupNode->__items.end()) + { + pTemporaryItem = *theIter; + pTemporaryItem->GetItemIndex(temporaryGroupIndex, temporaryItemIndex); + + if (temporaryItemIndex > itemIndex) + { + pTemporaryItem->SetItemIndex(temporaryGroupIndex, temporaryItemIndex - 1); + } + + theIter++; + } + + MoveCheckedAndDisabledItemIndex(pListGroupNode, itemIndex, -1); + + pListGroupNode->__itemCountInGroup--; + __countOfAllItems--; + + if (pItem != null) + { + pListGroupNode->__items.remove(pItem); + if (internalDestroy == false) + { + __pListProviderAdaptor->UnloadItem(pItem, groupIndex, itemIndex); + } + else + { + __pListProviderAdaptor->DeleteItem(pItem, groupIndex, itemIndex); + } + } + + return E_SUCCESS; +} + +result +_ListViewModel::RemoveGroup(int groupIndex) +{ + // check validation of groupIndex + SysTryReturn(NID_UI_CTRL, (groupIndex >= 0 && groupIndex < __countOfAllGroups), E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] Wrong group index(%d).", groupIndex); + + _ListViewGroupNode* pRemoveGroupNode = GetGroupNode(groupIndex); + SysTryReturn(NID_UI_CTRL, pRemoveGroupNode != null, GetLastResult(), GetLastResult(), + "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + // remove group from model + __groupNodes.erase(__groupNodes.begin() + groupIndex); + + __countOfAllItems -= (pRemoveGroupNode->__itemCountInGroup + 1); + __countOfAllGroups--; + + _IListItemCommon* pItem = null; + _ListViewGroupNode* pListGroupNode = null; + + int itemCount = 0; + int temporaryGroupIndex = -1; + int temporaryItemIndex = -1; + + // reset item index + int groupCount = __groupNodes.size(); + for (int i = groupCount - 1; i >= groupIndex; i--) + { + pListGroupNode = GetGroupNode(i); + + if (pListGroupNode != null) + { + itemCount = pListGroupNode->__items.size(); + + for (int j = itemCount - 1; j >= 0; j--) + { + pItem = pListGroupNode->__items.at(j); + + if (pItem != null) + { + pItem->GetItemIndex(temporaryGroupIndex, temporaryItemIndex); + pItem->SetItemIndex(temporaryGroupIndex - 1, temporaryItemIndex); + } + } + } + } + + // remove group + itemCount = pRemoveGroupNode->__items.size(); + + for (int i = itemCount - 1; i >= 0; i--) + { + pItem = pRemoveGroupNode->__items.at(i); + pRemoveGroupNode->__items.pop_back(); + + if (pItem != null) + { + pItem->GetItemIndex(temporaryGroupIndex, temporaryItemIndex); + __pListProviderAdaptor->UnloadItem(pItem, temporaryGroupIndex, temporaryItemIndex); + } + } + + delete pRemoveGroupNode; + + return E_SUCCESS; +} + +result +_ListViewModel::SetMaxCachingSize(int cachingSize) +{ + SysTryReturn(NID_UI_CTRL, cachingSize > 0, E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] Wrong cachingSize(%d).", cachingSize); + + __sizeOfCachingItems = cachingSize; + + return E_SUCCESS; +} + +int +_ListViewModel::GetMaxCachingSize(void) const +{ + return __sizeOfCachingItems; +} + +int +_ListViewModel::GetOverflowCount(void) const +{ + int loadedItems = 0; + int loadedGroups = __groupNodes.size(); + + _ListViewGroupNode* pListGroupNode = null; + for (int i = 0; i < loadedGroups; i++) + { + pListGroupNode = __groupNodes.at(i); + if (pListGroupNode != null) + { + loadedItems += pListGroupNode->__items.size(); + } + } + + if (__sizeOfCachingItems < loadedItems) + { + return loadedItems - __sizeOfCachingItems; + } + + return 0; +} + +result +_ListViewModel::RemoveOverflowItems(bool deleteFromEnd, int removeCount) +{ + SysTryReturn(NID_UI_CTRL, (removeCount > 0 && removeCount < __sizeOfCachingItems), E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] removeCount should be greater than 0."); + + if (__overflowItemsRemovingEnabled == false) + { + return E_SUCCESS; + } + + int loadedGroups = GetAllGroupCount(); + int temporaryGroupIndex = -1; + int temporaryItemIndex = -1; + int loadedItems = 0; + int i = 0; + int j = 0; + + _ListViewGroupNode* pListGroupNode = null; + _IListItemCommon* pItem = null; + + // remove priority : collapsed group items + for (i = 0; i < loadedGroups; i++) + { + pListGroupNode = GetGroupNode(i); + if (pListGroupNode != null) + { + if (pListGroupNode->__itemExpanded == false) + { + loadedItems = pListGroupNode->__items.size(); + for (j = 0; j < loadedItems; j++) + { + pItem = pListGroupNode->__items.back(); + pItem->GetItemIndex(temporaryGroupIndex, temporaryItemIndex); + + if (temporaryItemIndex == -1) + { + break; + } + + pListGroupNode->__items.pop_back(); + __pListProviderAdaptor->UnloadItem(pItem, temporaryGroupIndex, temporaryItemIndex); + + if (--removeCount <= 0) + { + return E_SUCCESS; + } + } + } + } + } + + if (deleteFromEnd == true) + { + for (i = loadedGroups - 1; i >= 0; i--) + { + pListGroupNode = GetGroupNode(i); + if (pListGroupNode != null) + { + loadedItems = pListGroupNode->__items.size(); + for (j = 0; j < loadedItems; j++) + { + pItem = pListGroupNode->__items.back(); + pItem->GetItemIndex(temporaryGroupIndex, temporaryItemIndex); + + pListGroupNode->__items.pop_back(); + __pListProviderAdaptor->UnloadItem(pItem, temporaryGroupIndex, temporaryItemIndex); + + if (--removeCount <= 0) + { + return E_SUCCESS; + } + } + } + } + } + else + { + for (i = 0; i < loadedGroups; i++) + { + pListGroupNode = GetGroupNode(i); + if (pListGroupNode != null) + { + loadedItems = pListGroupNode->__items.size(); + for (j = 0; j < loadedItems; j++) + { + pItem = pListGroupNode->__items.front(); + pItem->GetItemIndex(temporaryGroupIndex, temporaryItemIndex); + + pListGroupNode->__items.pop_front(); + __pListProviderAdaptor->UnloadItem(pItem, temporaryGroupIndex, temporaryItemIndex); + + if (--removeCount <= 0) + { + return E_SUCCESS; + } + } + } + } + } + + return E_SUCCESS; +} + +int +_ListViewModel::GetAllItemCount(void) const +{ + return __countOfAllItems; +} + +int +_ListViewModel::GetItemCountInGroup(int groupIndex) const +{ + // check validation of groupIndex + if (groupIndex < 0 || groupIndex >= __countOfAllGroups) + { + return -1; + } + + int itemCount = -1; + + _ListViewGroupNode* pListGroupNode = GetGroupNode(groupIndex); + + if (pListGroupNode == null) + { + itemCount = __pListProviderAdaptor->GetItemCount(groupIndex); + } + else + { + itemCount = pListGroupNode->__itemCountInGroup; + } + + return itemCount; +} + +int +_ListViewModel::GetAllGroupCount(void) const +{ + return __groupNodes.size(); +} + +void +_ListViewModel::GetFocusedItem(int& groupIndex, int& itemIndex) const +{ + groupIndex = __indexOfFocusedGroup; + itemIndex = __indexOfFocusedItem; +} + +void +_ListViewModel::SetFocusedItem(int groupIndex, int itemIndex) +{ + __indexOfFocusedGroup = groupIndex; + __indexOfFocusedItem = itemIndex; +} + +bool +_ListViewModel::IsFocusedItem(int groupIndex, int itemIndex) const +{ + if ((groupIndex == __indexOfFocusedGroup) && (itemIndex == __indexOfFocusedItem)) + { + return true; + } + + return false; +} + +result +_ListViewModel::SetItemEnabled(int groupIndex, int itemIndex, bool enable) +{ + // check validation + if (IsValidItem(groupIndex, itemIndex) == false) + { + return E_SYSTEM; + } + + _ListViewGroupNode* pListGroupNode = GetGroupNode(groupIndex); + SysTryReturn(NID_UI_CTRL, pListGroupNode != null, GetLastResult(), GetLastResult(), + "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + int disabledItem = itemIndex; + bool findItem = false; + + _LinkedList ::_Iterator theIter = pListGroupNode->__disabledItems.begin(); + + while (theIter != pListGroupNode->__disabledItems.end()) + { + if (*theIter == itemIndex) + { + if (enable == true) + { + pListGroupNode->__disabledItems.erase(theIter); + } + findItem = true; + break; + } + else if (*theIter > itemIndex) + { + if (enable == false) + { + pListGroupNode->__disabledItems.insert(theIter, disabledItem); + } + findItem = true; + break; + } + + theIter++; + } + + if (findItem == false && enable == false) + { + pListGroupNode->__disabledItems.push_back(disabledItem); + } + + if (IsLoadedItem(groupIndex, itemIndex) == false) + { + return E_SUCCESS; + } + + _IListItemCommon* pItem = GetItemFromContainer(groupIndex, itemIndex); + if (pItem != null) + { + pItem->SetItemEnabled(enable); + } + + return E_SUCCESS; +} + +bool +_ListViewModel::IsItemEnabled(int groupIndex, int itemIndex) const +{ + // check validation + if (IsValidItem(groupIndex, itemIndex) == false) + { + return false; + } + + _ListViewGroupNode* pListGroupNode = GetGroupNode(groupIndex); + SysTryReturn(NID_UI_CTRL, pListGroupNode != null, false, GetLastResult(), + "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _LinkedList ::_Iterator theIter = pListGroupNode->__disabledItems.begin(); + + while (theIter != pListGroupNode->__disabledItems.end()) + { + if (*theIter == itemIndex) + { + return false; + } + else if (*theIter > itemIndex) + { + break; + } + + theIter++; + } + + return true; +} + +result +_ListViewModel::SetItemChecked(int groupIndex, int itemIndex, bool check) +{ + // check validation + if (IsValidItem(groupIndex, itemIndex) == false) + { + return E_SYSTEM; + } + + _ListViewGroupNode* pListGroupNode = GetGroupNode(groupIndex); + SysTryReturn(NID_UI_CTRL, pListGroupNode != null, GetLastResult(), GetLastResult(), + "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + //radio style + _IListItemCommon* pItem = null; + if (pListGroupNode->__usingRadioStyle == true) + { + if (check == true) + { + if (pListGroupNode->__radioCheckedItemIndex == itemIndex) + { + return E_SUCCESS; + } + + pItem = GetItemFromContainer(groupIndex, pListGroupNode->__radioCheckedItemIndex); + if (pItem != null) + { + pItem->SetChecked(false); + } + + pListGroupNode->__radioCheckedItemIndex = itemIndex; + + pItem = GetItemFromContainer(groupIndex, itemIndex); + if (pItem != null) + { + pItem->SetChecked(true); + } + + return E_SUCCESS; + } + else + { + if (pListGroupNode->__radioCheckedItemIndex == itemIndex) + { + pItem = GetItemFromContainer(groupIndex, pListGroupNode->__radioCheckedItemIndex); + if (pItem != null) + { + pItem->SetChecked(false); + } + + pListGroupNode->__radioCheckedItemIndex = -1; + } + + return E_SUCCESS; + } + } + + int checkedItem = itemIndex; + bool findItem = false; + + _LinkedList ::_Iterator theIter = pListGroupNode->__checkedItems.begin(); + while (theIter != pListGroupNode->__checkedItems.end()) + { + if (*theIter == itemIndex) + { + if (check == false) + { + pListGroupNode->__checkedItems.erase(theIter); + } + findItem = true; + break; + } + else if (*theIter > itemIndex) + { + if (check == true) + { + pListGroupNode->__checkedItems.insert(theIter, checkedItem); + } + findItem = true; + break; + } + + theIter++; + } + + if (findItem == false && check == true) + { + pListGroupNode->__checkedItems.push_back(checkedItem); + } + + if (IsLoadedItem(groupIndex, itemIndex) == false) + { + return E_SUCCESS; + } + + pItem = GetItemFromContainer(groupIndex, itemIndex); + if (pItem != null) + { + pItem->SetChecked(check); + } + + return E_SUCCESS; +} + +bool +_ListViewModel::IsItemChecked(int groupIndex, int itemIndex) const +{ + // check validation + if (!IsValidItem(groupIndex, itemIndex)) + { + return false; + } + + _ListViewGroupNode* pListGroupNode = GetGroupNode(groupIndex); + SysTryReturn(NID_UI_CTRL, pListGroupNode != null, false, GetLastResult(), + "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + //radio style + if (pListGroupNode->__usingRadioStyle) + { + if (pListGroupNode->__radioCheckedItemIndex == itemIndex) + { + return true; + } + + return false; + } + + _LinkedList ::_Iterator theIter = pListGroupNode->__checkedItems.begin(); + + while (theIter != pListGroupNode->__checkedItems.end()) + { + if (*theIter == itemIndex) + { + return true; + } + else if (*theIter > itemIndex) + { + break; + } + + theIter++; + } + + return false; +} + +int +_ListViewModel::GetIndexOfRadioCheckedItem(int groupIndex) const +{ + _ListViewGroupNode* pListGroupNode = GetGroupNode(groupIndex); + SysTryReturn(NID_UI_CTRL, pListGroupNode != null, -1, GetLastResult(), + "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + return pListGroupNode->__radioCheckedItemIndex; +} + +void +_ListViewModel::SetAllLoadedItemStateChanged(bool state) +{ + if (__groupNodes.empty() == true) + { + return; + } + + int groupCount = GetAllGroupCount(); + _ListViewGroupNode* pListGroupNode = null; + _IListItemCommon* pItem = null; + + for (int i = 0; i < groupCount; i++) + { + pListGroupNode = GetGroupNode(i); + SysTryReturnVoidResult(NID_UI_CTRL, pListGroupNode != null, GetLastResult(), + "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _LinkedList <_IListItemCommon*>::_Iterator theIter = pListGroupNode->__items.begin(); + while (theIter != pListGroupNode->__items.end()) + { + pItem = *theIter; + pItem->SetItemChanged(state); + + theIter++; + } + } +} + +void +_ListViewModel::GetFirstLoadedItemIndex(int& groupIndex, int& itemIndex) const +{ + int groupCount = GetAllGroupCount(); + _ListViewGroupNode* pListGroupNode = null; + _IListItemCommon* pItem = null; + + for (int i = 0; i < groupCount; i++) + { + pListGroupNode = GetGroupNode(i); + SysTryReturnVoidResult(NID_UI_CTRL, pListGroupNode != null, GetLastResult(), + "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + if (pListGroupNode->__items.empty() == false) + { + pItem = pListGroupNode->__items.front(); + pItem->GetItemIndex(groupIndex, itemIndex); + break; + } + } +} + +void +_ListViewModel::GetLastLoadedItemIndex(int& groupIndex, int& itemIndex) const +{ + int groupCount = GetAllGroupCount(); + _ListViewGroupNode* pListGroupNode = null; + _IListItemCommon* pItem = null; + + for (int i = groupCount - 1; i >= 0; i--) + { + pListGroupNode = GetGroupNode(i); + SysTryReturnVoidResult(NID_UI_CTRL, pListGroupNode != null, GetLastResult(), + "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + if (pListGroupNode->__items.empty() == false) + { + pItem = pListGroupNode->__items.back(); + pItem->GetItemIndex(groupIndex, itemIndex); + break; + } + } +} + +result +_ListViewModel::AddItemToGroup(_IListItemCommon* pItem, int groupIndex) +{ + return InsertItemToGroup(pItem, groupIndex, GetItemCountInGroup(groupIndex)); +} + + +result +_ListViewModel::InsertItemToGroup(_IListItemCommon* pItem, int groupIndex, int itemIndex) +{ + // check validation of groupIndex + SysTryReturn(NID_UI_CTRL, (groupIndex >= 0 && groupIndex < __countOfAllGroups), E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] Wrong group index(%d).", groupIndex); + + if (itemIndex < -1 || itemIndex > GetItemCountInGroup(groupIndex)) + { + SysLogException(NID_UI_CTRL, E_INVALID_ARG, "[E_INVALID_ARG] Item index is not valid."); + return E_INVALID_ARG; + } + + _ListViewGroupNode* pListGroupNode = GetGroupNode(groupIndex); + SysTryReturn(NID_UI_CTRL, pListGroupNode != null, GetLastResult(), GetLastResult(), + "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _IListItemCommon* pTemporaryItem = null; + int temporaryGroupIndex = -1; + int temporaryItemIndex = -1; + int itemCount = pListGroupNode->__items.size(); + for (int i = itemCount - 1; i >= 0; i--) + { + pTemporaryItem = pListGroupNode->__items.at(i); + if (pTemporaryItem != null) + { + pTemporaryItem->GetItemIndex(temporaryGroupIndex, temporaryItemIndex); + if (temporaryItemIndex >= itemIndex) + { + pTemporaryItem->SetItemIndex(temporaryGroupIndex, ++temporaryItemIndex); + } + else + { + break; + } + } + } + + _LinkedList ::_Iterator theIter; + // checked(radio/check) item index + if (pListGroupNode->__usingRadioStyle == true) + { + //radio item + if (pListGroupNode->__radioCheckedItemIndex >= itemIndex) + { + pListGroupNode->__radioCheckedItemIndex++; + } + } + else + { + theIter = pListGroupNode->__checkedItems.begin(); + while (theIter != pListGroupNode->__checkedItems.end()) + { + if (*theIter >= itemIndex) + { + (*theIter) += 1; + } + + theIter++; + } + } + + // disabled item index + theIter = pListGroupNode->__disabledItems.begin(); + while (theIter != pListGroupNode->__disabledItems.end()) + { + if (*theIter >= itemIndex) + { + (*theIter) += 1; + } + + theIter++; + } + + pListGroupNode->__itemCountInGroup++; + __countOfAllItems++; + + result r = E_SUCCESS; + + if (pItem !=null) + { + pItem->SetItemIndex(groupIndex, itemIndex); + r = LoadItemToContainer(groupIndex, itemIndex, *pItem); + } + + return r; +} + +result +_ListViewModel::SetItem(_IListItemCommon& item, int groupIndex, int itemIndex) +{ + // check validation of groupIndex + SysTryReturn(NID_UI_CTRL, (groupIndex >= 0 && groupIndex < __countOfAllGroups), E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] Wrong group index(%d).", groupIndex); + + if (itemIndex < -1 || itemIndex > GetItemCountInGroup(groupIndex)) + { + SysLogException(NID_UI_CTRL, E_INVALID_ARG, "[E_INVALID_ARG] Item index is not valid."); + return E_INVALID_ARG; + } + + if (IsLoadedItem(groupIndex, itemIndex) == false) + { + return __pListProviderAdaptor->UnloadItem(&item, groupIndex, itemIndex); + } + + _ListViewGroupNode* pListGroupNode = GetGroupNode(groupIndex); + SysTryReturn(NID_UI_CTRL, pListGroupNode != null, GetLastResult(), GetLastResult(), + "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + item.SetItemIndex(groupIndex, itemIndex); + item.SetChecked(IsItemChecked(groupIndex, itemIndex)); + item.SetItemEnabled(IsItemEnabled(groupIndex, itemIndex)); + + _LinkedList <_IListItemCommon*>::_Iterator theIter = pListGroupNode->__items.begin(); + + _IListItemCommon* pPreviousItem = null; + int temporaryGroupIndex = -1; + int temporaryItemIndex = -1; + while (theIter != pListGroupNode->__items.end()) + { + pPreviousItem = *theIter; + pPreviousItem->GetItemIndex(temporaryGroupIndex, temporaryItemIndex); + + if (temporaryItemIndex == itemIndex) + { + *theIter = &item; + break; + } + else if (temporaryItemIndex > itemIndex) + { + return __pListProviderAdaptor->UnloadItem(&item, groupIndex, itemIndex); + } + + theIter++; + } + + return __pListProviderAdaptor->UnloadItem(pPreviousItem, groupIndex, itemIndex); +} + +// origin & destination item must be loaded +result +_ListViewModel::MoveItem(int originGroupIndex, int originItemIndex, int destinationGroupIndex, int destinationItemIndex) +{ + if (IsValidItem(originGroupIndex, originItemIndex) == false + || IsValidItem(destinationGroupIndex, destinationItemIndex - 1) == false) + { + SysLogException(NID_UI_CTRL, E_INVALID_ARG, "[E_INVALID_ARG] Item index is not valid."); + return E_SYSTEM; + } + + _ListViewGroupNode* pOriginGroupNode = GetGroupNode(originGroupIndex); + SysTryReturn(NID_UI_CTRL, pOriginGroupNode != null, GetLastResult(), GetLastResult(), + "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _ListViewGroupNode* pDestinationGroupNode = GetGroupNode(destinationGroupIndex); + SysTryReturn(NID_UI_CTRL, pDestinationGroupNode != null, GetLastResult(), GetLastResult(), + "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _IListItemCommon* pItem = GetItemFromContainer(originGroupIndex, originItemIndex); + SysTryReturn(NID_UI_CTRL, pItem != null, GetLastResult(), GetLastResult(), + "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _IListItemCommon* pTemporaryItem = null; + int temporaryGroupIndex = -1; + int temporaryItemIndex = -1; + int indexCount = 0; + bool isFound = false; + + if (originGroupIndex != destinationGroupIndex) // different group + { + pOriginGroupNode->__items.remove(pItem); + + _LinkedList <_IListItemCommon*>::_Iterator theIter = pOriginGroupNode->__items.begin(); + while (theIter != pOriginGroupNode->__items.end()) + { + pTemporaryItem = *theIter; + pTemporaryItem->GetItemIndex(temporaryGroupIndex, temporaryItemIndex); + + if (temporaryItemIndex > originItemIndex) + { + pTemporaryItem->SetItemIndex(temporaryGroupIndex, temporaryItemIndex - 1); + } + + theIter++; + } + + pItem->SetItemIndex(destinationGroupIndex, destinationItemIndex); + + _LinkedList <_IListItemCommon*>::_Iterator destinationIter = pDestinationGroupNode->__items.begin(); + while (destinationIter != pDestinationGroupNode->__items.end()) + { + pTemporaryItem = *destinationIter; + pTemporaryItem->GetItemIndex(temporaryGroupIndex, temporaryItemIndex); + + if (temporaryItemIndex >= destinationItemIndex) + { + pTemporaryItem->SetItemIndex(temporaryGroupIndex, temporaryItemIndex + 1); + + if (temporaryItemIndex == destinationItemIndex) + { + pDestinationGroupNode->__items.insert(destinationIter, pItem); + isFound = true; + } + } + + destinationIter++; + } + + if (isFound == false) + { + pDestinationGroupNode->__items.push_back(pItem); + } + + // remove checked(radio/check) & disabled item index + MoveCheckedAndDisabledItemIndex(pOriginGroupNode, originItemIndex, -1, pItem->IsChecked(), pItem->IsItemEnabled()); + + // insert checked(radio/check) & disabled item index + MoveCheckedAndDisabledItemIndex(pDestinationGroupNode, -1, destinationItemIndex, pItem->IsChecked(), pItem->IsItemEnabled()); + + pOriginGroupNode->__itemCountInGroup--; + pDestinationGroupNode->__itemCountInGroup++; + } + else // same group + { + pOriginGroupNode->__items.remove(pItem); + + _LinkedList <_IListItemCommon*>::_Iterator theIter = pOriginGroupNode->__items.begin(); + while (theIter != pOriginGroupNode->__items.end()) + { + pTemporaryItem = *theIter; + pTemporaryItem->GetItemIndex(temporaryGroupIndex, temporaryItemIndex); + + if (temporaryItemIndex < originItemIndex && temporaryItemIndex >= destinationItemIndex) + { + pTemporaryItem->SetItemIndex(temporaryGroupIndex, temporaryItemIndex + 1); + } + else if (temporaryItemIndex > originItemIndex && temporaryItemIndex <= destinationItemIndex) + { + pTemporaryItem->SetItemIndex(temporaryGroupIndex, temporaryItemIndex - 1); + + if (temporaryItemIndex == destinationItemIndex) + { + indexCount++; + } + } + else if (temporaryItemIndex > originItemIndex && temporaryItemIndex > destinationItemIndex) + { + break; + } + + if (temporaryItemIndex < destinationItemIndex) + { + indexCount++; + } + + theIter++; + } + + pItem->SetItemIndex(destinationGroupIndex, destinationItemIndex); + pOriginGroupNode->__items.insert(pOriginGroupNode->__items.begin() + indexCount, pItem); + + // move checked(radio/check) & disabled item index + MoveCheckedAndDisabledItemIndex(pOriginGroupNode, originItemIndex, destinationItemIndex, pItem->IsChecked(), pItem->IsItemEnabled()); + } + + return E_SUCCESS; +} + +// insert mode : originItemIndex == -1 +// remove mode : destinationItemIndex == -1 +void +_ListViewModel::MoveCheckedAndDisabledItemIndex(_ListViewGroupNode* pListGroupNode, int originItemIndex, int destinationItemIndex, bool checked, bool enabled) +{ + int indexCount = 0; + int temporaryDestinationIndex = destinationItemIndex; + if (destinationItemIndex == -1) + { + temporaryDestinationIndex = pListGroupNode->__itemCountInGroup; + } + + // move checked(radio/check) item index + if (pListGroupNode->__usingRadioStyle) + { + //radio style + if (checked == true || (pListGroupNode->__radioCheckedItemIndex == originItemIndex && originItemIndex != -1)) // for insert mode + { + pListGroupNode->__radioCheckedItemIndex = destinationItemIndex; + } + else if (pListGroupNode->__radioCheckedItemIndex < originItemIndex && + pListGroupNode->__radioCheckedItemIndex >= temporaryDestinationIndex) + { + pListGroupNode->__radioCheckedItemIndex++; + } + else if (originItemIndex != -1 && + pListGroupNode->__radioCheckedItemIndex > originItemIndex && + pListGroupNode->__radioCheckedItemIndex < temporaryDestinationIndex) + { + pListGroupNode->__radioCheckedItemIndex--; + } + } + else + { + //checked style + int checkedItemIndex = -1; + _LinkedList ::_Iterator theIter = pListGroupNode->__checkedItems.begin(); + + while (theIter != pListGroupNode->__checkedItems.end()) + { + checkedItemIndex = (int)(*theIter); + if (originItemIndex == -1) // insert mode + { + if (checkedItemIndex >= temporaryDestinationIndex) + { + *theIter = checkedItemIndex + 1; + } + else + { + indexCount++; + } + } + else + { + if (checkedItemIndex < originItemIndex && checkedItemIndex >= temporaryDestinationIndex) + { + *theIter = checkedItemIndex + 1; + } + else if (checkedItemIndex > originItemIndex && checkedItemIndex < temporaryDestinationIndex) + { + *theIter = checkedItemIndex - 1; + } + else if (checkedItemIndex == originItemIndex) + { + pListGroupNode->__checkedItems.erase(theIter); + continue; + } + else if (checkedItemIndex > originItemIndex && checkedItemIndex > temporaryDestinationIndex) + { + break; + } + + if (checkedItemIndex <= temporaryDestinationIndex && checkedItemIndex != originItemIndex) + { + indexCount++; + } + } + + theIter++; + } + + if (destinationItemIndex != -1 && checked == true) + { + pListGroupNode->__checkedItems.insert(pListGroupNode->__checkedItems.begin() + + indexCount, destinationItemIndex); + } + } + + indexCount = 0; + + // move disabled + int disabledItemIndex = -1; + _LinkedList ::_Iterator theIter = pListGroupNode->__disabledItems.begin(); + + while (theIter != pListGroupNode->__disabledItems.end()) + { + disabledItemIndex = (int)(*theIter); + if (originItemIndex == -1) // insert mode + { + if (disabledItemIndex >= temporaryDestinationIndex) + { + *theIter = disabledItemIndex + 1; + } + else + { + indexCount++; + } + } + else + { + if (disabledItemIndex < originItemIndex && disabledItemIndex >= temporaryDestinationIndex) + { + *theIter = disabledItemIndex + 1; + } + else if (disabledItemIndex > originItemIndex && disabledItemIndex < temporaryDestinationIndex) + { + *theIter = disabledItemIndex - 1; + } + else if (disabledItemIndex == originItemIndex) + { + pListGroupNode->__disabledItems.erase(theIter); + continue; + } + else if (disabledItemIndex > originItemIndex && disabledItemIndex > temporaryDestinationIndex) + { + break; + } + + if (disabledItemIndex <= temporaryDestinationIndex && disabledItemIndex != originItemIndex) + { + indexCount++; + } + } + + theIter++; + } + + if (destinationItemIndex != -1 && enabled == false) + { + pListGroupNode->__disabledItems.insert(pListGroupNode->__disabledItems.begin() + + indexCount, destinationItemIndex); + } +} + +_ListViewGroupNode* +_ListViewModel::GetGroupNode(int groupIndex) const +{ + if (__groupNodes.empty()) + { + SysLogException(NID_UI_CTRL, E_SYSTEM, "[E_SYSTEM] GroupNode is Empty."); + return null; + } + + _ListViewGroupNode* pListGroupNode = __groupNodes.at(groupIndex); + if (pListGroupNode == null) + { + SysLogException(NID_UI_CTRL, E_SYSTEM, "[E_SYSTEM] Failed to get _ListViewGroupNode."); + } + + return pListGroupNode; +} + +}}} // Tizen::Ui::Controls + diff --git a/src/ui/controls/FUiCtrl_MessageBox.cpp b/src/ui/controls/FUiCtrl_MessageBox.cpp new file mode 100644 index 0000000..3c337b4 --- /dev/null +++ b/src/ui/controls/FUiCtrl_MessageBox.cpp @@ -0,0 +1,552 @@ +// +// 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_MessageBox.cpp + * @brief This is the implementation file for the _MessageBox class. + */ + +#include +#include +#include +#include +#include "FUi_AccessibilityContainer.h" +#include "FUi_AccessibilityElement.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_EcoreEvas.h" +#include "FUi_EcoreEvasMgr.h" +#include "FUi_ResourceManager.h" +#include "FUiCtrl_Form.h" +#include "FUiCtrl_Frame.h" +#include "FUiCtrl_MessageBox.h" +#include "FUiCtrl_MessageBoxPresenter.h" + + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::System; + + +namespace Tizen { namespace Ui { namespace Controls +{ + + +_MessageBox::_MessageBox(void) + : __pMsgboxPresenter(null) + , __msgboxStyle(MSGBOX_STYLE_NONE) + , __textColor(Color(0xFFFFFFFF)) + , __pButtonEffectBitmap(null) + , __pTitleEffectBitmap(null) + , __pComposedButtonBitmap(null) + , __pComposedTitleBitmap(null) + , __text(L"") + , __timeout(0) +{ + //empty statement +} + +_MessageBox::~_MessageBox(void) +{ + delete __pMsgboxPresenter; + __pMsgboxPresenter = null; + + delete _pComposedBgBitmap; + _pComposedBgBitmap = null; + + delete _pOutlineBitmap; + _pOutlineBitmap = null; + + delete __pButtonEffectBitmap; + __pButtonEffectBitmap = null; + + delete __pTitleEffectBitmap; + __pTitleEffectBitmap = null; + + delete __pComposedButtonBitmap; + __pComposedButtonBitmap = null; + + delete __pComposedTitleBitmap; + __pComposedTitleBitmap = null; + + _SettingInfoImpl::RemoveSettingEventListenerForInternal(*this); +} + +_MessageBox* +_MessageBox::CreateMessageBoxN(void) +{ + _MessageBox* pMsgbox = new (std::nothrow) _MessageBox(); + SysTryReturn(NID_UI_CTRL, pMsgbox != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + result r = pMsgbox->CreateRootVisualElement(_WINDOW_TYPE_SUB); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + // for taking touch event + pMsgbox->AcquireHandle(); + + return pMsgbox; + +CATCH: + delete pMsgbox; + + return null; +} + +result +_MessageBox::Initialize(const String& title, const String& text, MessageBoxStyle style, unsigned long timeout) +{ + result r = E_SUCCESS; + + float titleHeight = 0.0f; + Color titleBgColor(0x00000000); + Color buttonBgColor(0x00000000); + _AccessibilityContainer* pContainer = null; + SetFocusNavigateEnabled(false); + + _titleText = title; + _titleState = !(title.Equals(L"", false)); + + __text = text; + __msgboxStyle = style; + __timeout = timeout; + + _MessageBoxPresenter* pPresenter = new (std::nothrow) _MessageBoxPresenter(); + SysTryReturn(NID_UI_CTRL, pPresenter != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + SetPresenter(*pPresenter); + + r = pPresenter->Initialize(*this); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + SetDimmingEnabled(true); + + GET_COLOR_CONFIG(MESSAGEBOX::BG_NORMAL, _bgColor); + GET_COLOR_CONFIG(MESSAGEBOX::TITLE_TEXT_NORMAL, _titleTextColor); + GET_COLOR_CONFIG(MESSAGEBOX::TEXT_NORMAL, __textColor); + GET_COLOR_CONFIG(MESSAGEBOX::TITLE_BG_NORMAL, titleBgColor); + GET_COLOR_CONFIG(MESSAGEBOX::BOTTOM_BG_NORMAL, buttonBgColor); + + GET_SHAPE_CONFIG(MESSAGEBOX::TITLE_HEIGHT, GetOrientation(), titleHeight); + + // MsgBox_Outline + 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 + 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 + 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 + 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)); + + } + + if (_titleState) + { + // MsgBox-TitleBitmap + 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 + 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 + if (GetVisualElement() != null) + { + GetVisualElement()->SetSurfaceOpaque(false); + } + + pContainer = GetAccessibilityContainer(); + if(pContainer != null) + { + pContainer->Activate(true); + pContainer->AddListener(*this); + } + + r = _SettingInfoImpl::AddSettingEventListenerForInternal(*this); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + SetTouchPressThreshold(0.08); + + return r; + +CATCH: + + delete _pOutlineBitmap; + _pOutlineBitmap = null; + + delete _pComposedBgBitmap; + _pComposedBgBitmap = null; + + delete __pComposedButtonBitmap; + __pComposedButtonBitmap = null; + + delete __pButtonEffectBitmap; + __pButtonEffectBitmap = null; + + delete __pComposedTitleBitmap; + __pComposedTitleBitmap = null; + + delete __pTitleEffectBitmap; + __pTitleEffectBitmap = null; + + return r; +} + +result +_MessageBox::SetPresenter(const _MessageBoxPresenter& msgboxPresenter) +{ + __pMsgboxPresenter = const_cast <_MessageBoxPresenter*>(&msgboxPresenter); + + return E_SUCCESS; +} + +_PopupPresenter* +_MessageBox::GetPresenter(void) +{ + return static_cast <_PopupPresenter*>(__pMsgboxPresenter); +} + +void +_MessageBox::OnDraw() +{ + __pMsgboxPresenter->Draw(); + if(unlikely((_AccessibilityManager::IsActivated()))) + { + _AccessibilityManager::GetInstance()->RequestAutoReading(_ACCESSIBILITY_AUTO_READING_MODE_FIRST_ITEM); + } + return; +} + +void +_MessageBox::OnFontChanged(Font* pFont) +{ + __pMsgboxPresenter->OnFontChanged(pFont); +} + +void +_MessageBox::OnFontInfoRequested(unsigned long& style, float& size) +{ + __pMsgboxPresenter->OnFontInfoRequested(style, size); +} + +void +_MessageBox::OnActivated(void) +{ + _Popup::OnActivated(); +} + +void +_MessageBox::OnDeactivated(void) +{ + _Popup::OnDeactivated(); +} + +void +_MessageBox::InitializeAccessibilityElement(void) +{ + result r = E_SUCCESS; + + _Popup::InitializeAccessibilityElement(); + + if (_pTitleTextAccessibilityElement != null) + { + _pTitleTextAccessibilityElement->SetName(L"MessageBoxTitleText"); + } + + __pMsgboxPresenter->InitializeAccessibilityElement(); + r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + return; +} + +result +_MessageBox::ShowAndWait(int& modalResult) +{ + __pMsgboxPresenter->ShowAndWait(modalResult); + + return E_SUCCESS; +} + +String +_MessageBox::GetText(void) const +{ + return __text; +} + +unsigned long +_MessageBox::GetTimeout(void) const +{ + return __timeout; +} + +void +_MessageBox::SetTextColor(const Color& color) +{ + __textColor = color; +} + +Color +_MessageBox::GetTextColor(void) const +{ + return __textColor; +} + +MessageBoxStyle +_MessageBox::GetMsgBoxStyle(void) const +{ + return __msgboxStyle; +} + +float +_MessageBox::GetTotalHeight(void) const +{ + float titleHeight = 0.0f; + float bottomHeight = 0.0f; + + float textTopMargin = 0.0f; + float textTopMarginNoButton = 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::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::BG_IMAGE_TRANSPARENT_TOP_MARGIN, orientation, transTopMargin); + GET_SHAPE_CONFIG(MESSAGEBOX::BG_IMAGE_TRANSPARENT_BOTTOM_MARGIN, orientation, transBottomMargin); + + if (HasTitle() == false) + { + titleHeight = 0.0f; + } + + float totalH = titleHeight + + transTopMargin + + transBottomMargin + + __pMsgboxPresenter->GetBodyTextObjHeight(); + + switch (__msgboxStyle) + { + case MSGBOX_STYLE_NONE: + totalH += textTopMarginNoButton * 2.0f; + break; + + case MSGBOX_STYLE_OK: + // fall through + case MSGBOX_STYLE_CANCEL: + // fall through + case MSGBOX_STYLE_OKCANCEL: + // fall through + case MSGBOX_STYLE_YESNO: + // fall through + case MSGBOX_STYLE_RETRYCANCEL: + // fall through + case MSGBOX_STYLE_YESNOCANCEL: + // fall through + case MSGBOX_STYLE_ABORTRETRYIGNORE: + // fall through + case MSGBOX_STYLE_CANCELTRYCONTINUE: + totalH += textTopMargin * 2.0f + + bottomHeight; + break; + } + + return totalH; +} + +void +_MessageBox::OnChangeLayout(_ControlOrientation orientation) +{ + _Popup::OnChangeLayout(orientation); + + result r = __pMsgboxPresenter->OnChangeLayout(orientation); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + return; +} + +void +_MessageBox::OnBoundsChanged(void) +{ + _AccessibilityContainer* pContainer = null; + + pContainer = GetAccessibilityContainer(); + + SetClientBounds(FloatRectangle(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height)); + + if ((_pTitleTextAccessibilityElement != null) && (HasTitle() == true)) + { + _pTitleTextAccessibilityElement->SetBounds(__pMsgboxPresenter->GetTitleTextBounds()); + } + + if (GetMsgBoxStyle() == MSGBOX_STYLE_NONE && pContainer != null) + { + _AccessibilityElement* pElementMessageBox = pContainer->GetChildElement(L"MessageBox"); + + if (pElementMessageBox != null) + { + pElementMessageBox->SetBounds(FloatRectangle(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height)); + } + } + + return; +} + +bool +_MessageBox::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + if (&source != this) + { + return false; + } + + return __pMsgboxPresenter->OnTouchPressed(source, touchinfo); +} + +bool +_MessageBox::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + if (&source != this) + { + return false; + } + + return __pMsgboxPresenter->OnTouchReleased(source, touchinfo); +} + +bool +_MessageBox::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + if (&source != this) + { + return false; + } + + return __pMsgboxPresenter->OnTouchMoved(source, touchinfo); +} + +void +_MessageBox::OnSettingChanged(String& key) +{ + const wchar_t* LOCALE_LANGUAGE = L"http://tizen.org/setting/locale.language"; + if (key == LOCALE_LANGUAGE) + { + __pMsgboxPresenter->UpdateButtonString(); + } +} + +bool +_MessageBox::OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_MessageBox::OnAccessibilityFocusMovedPrevious(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_MessageBox::OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_MessageBox::OnAccessibilityReadingElement(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_MessageBox::OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_MessageBox::OnAccessibilityFocusOut(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_MessageBox::OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return __pMsgboxPresenter->OnAccessibilityActionPerformed(control, element); +} + +bool +_MessageBox::OnAccessibilityValueIncreased(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_MessageBox::OnAccessibilityValueDecreased(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_MessageBox::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) +{ + return __pMsgboxPresenter->OnKeyReleased(source, keyInfo); +} + +Bitmap* +_MessageBox::GetButtonBackgroundBitmap(void) +{ + return __pComposedButtonBitmap; +} + +Bitmap* +_MessageBox::GetButtonBackgroundEffectBitmap(void) +{ + return __pButtonEffectBitmap; +} + +Bitmap* +_MessageBox::GetTitleBackgroundBitmap(void) +{ + return __pComposedTitleBitmap; +} + +Bitmap* +_MessageBox::GetTitleBackgroundEffectBitmap(void) +{ + return __pTitleEffectBitmap; +} +}}} // Tizen::Ui::Controls + diff --git a/src/ui/controls/FUiCtrl_MessageBoxImpl.cpp b/src/ui/controls/FUiCtrl_MessageBoxImpl.cpp new file mode 100644 index 0000000..7328613 --- /dev/null +++ b/src/ui/controls/FUiCtrl_MessageBoxImpl.cpp @@ -0,0 +1,295 @@ +// +// 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_MessageBoxImpl.cpp + * @brief This is the implementation file for the _MessageBoxImpl class. + */ + + +// Includes +#include +#include "FUi_ControlImplManager.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_ResourceManager.h" +#include "FUiCtrl_FrameImpl.h" +#include "FUiCtrl_MessageBoxImpl.h" +#include "FUiCtrl_Form.h" + + +using namespace Tizen::Graphics; +using namespace Tizen::Base; + + +namespace Tizen { namespace Ui { namespace Controls +{ + + +_MessageBoxImpl* +_MessageBoxImpl::GetInstance(MessageBox& pMessageBox) +{ + return static_cast <_MessageBoxImpl*>(pMessageBox._pControlImpl); +} + +const _MessageBoxImpl* +_MessageBoxImpl::GetInstance(const MessageBox& pMessageBox) +{ + return static_cast (pMessageBox._pControlImpl); +} + +_MessageBoxImpl::_MessageBoxImpl(MessageBox* pPublic, _MessageBox* pCore) + : _WindowImpl(pPublic, pCore) +{ + // empty statement +} + +_MessageBoxImpl::~_MessageBoxImpl(void) +{ + // empty statement +} + +_MessageBoxImpl* +_MessageBoxImpl::CreateMessageBoxImplN(MessageBox* pControl) +{ + result r = E_SUCCESS; + + _MessageBox* pCore = null; + _MessageBoxImpl* pImpl = null; + + pCore = _MessageBox::CreateMessageBoxN(); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pCore, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + pImpl = new (std::nothrow) _MessageBoxImpl(pControl, pCore); + r = CheckConstruction(pCore, pImpl); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + return pImpl; +} + +result +_MessageBoxImpl::Initialize(const Tizen::Base::String& title, const Tizen::Base::String& text, MessageBoxStyle style, unsigned long timeout) +{ + result r = E_SUCCESS; + + FloatRectangle bounds; + float totalH = -1.0f; + + float maxHeight = 0.0f; + float defaultWidth = 0.0f; + + _ControlOrientation orientation; + + r = GetCore().Initialize(title, text, style, timeout); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + orientation = GetCore().GetOrientation(); + GET_SHAPE_CONFIG(MESSAGEBOX::MAX_HEIGHT, orientation, maxHeight); + GET_SHAPE_CONFIG(MESSAGEBOX::DEFAULT_WIDTH, orientation, defaultWidth); + + totalH = GetCore().GetTotalHeight(); + + if (totalH > maxHeight) + { + bounds = GetCenterAlignRect(defaultWidth, maxHeight); + } + else + { + bounds = GetCenterAlignRect(defaultWidth, totalH); + } + + r = SetBounds(bounds); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + SetMovable(false); + SetResizable(false); + + return r; +} + +const char* +_MessageBoxImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Controls::MessageBox"; +} + +const MessageBox& +_MessageBoxImpl::GetPublic(void) const +{ + return static_cast (_ControlImpl::GetPublic()); +} + +MessageBox& +_MessageBoxImpl::GetPublic(void) +{ + return static_cast (_ControlImpl::GetPublic()); +} + +const _MessageBox& +_MessageBoxImpl::GetCore(void) const +{ + return static_cast (_ControlImpl::GetCore()); +} + +_MessageBox& +_MessageBoxImpl::GetCore(void) +{ + return static_cast <_MessageBox&>(_ControlImpl::GetCore()); +} + +result +_MessageBoxImpl::ShowAndWait(int& modalResult) +{ + SysTryReturn(NID_UI_CTRL, GetVisibleState() != false, E_SYSTEM, + E_SYSTEM, "[E_SYSTEM] This control is not visible"); + + return GetCore().ShowAndWait(modalResult); +} + +void +_MessageBoxImpl::SetColor(const Color& color) +{ + return GetCore().SetColor(color); +} + +Color +_MessageBoxImpl::GetColor() const +{ + return GetCore().GetColor(); +} + +void +_MessageBoxImpl::SetTitleTextColor(const Color& color) +{ + return GetCore().SetTitleTextColor(color); +} + +Color +_MessageBoxImpl::GetTitleTextColor() const +{ + return GetCore().GetTitleTextColor(); +} +void +_MessageBoxImpl::SetTextColor(const Color& color) +{ + return GetCore().SetTextColor(color); +} + +Color +_MessageBoxImpl::GetTextColor() const +{ + return GetCore().GetTextColor(); +} + +MessageBoxStyle +_MessageBoxImpl::GetMessageBoxStyle(void) const +{ + return GetCore().GetMsgBoxStyle(); +} + +String +_MessageBoxImpl::GetTitleText(void) const +{ + return GetCore().GetTitleText(); +} + +String +_MessageBoxImpl::GetText(void) const +{ + return GetCore().GetText(); +} + +unsigned long +_MessageBoxImpl::GetTimeout(void) const +{ + return GetCore().GetTimeout(); +} + +int +_MessageBoxImpl::GetMaxTextLength(void) const +{ + int maxLength = 0; + GET_FIXED_VALUE_CONFIG(MESSAGEBOX::TEXT_MAX_LENGTH, GetCore().GetOrientation(), maxLength); + + return maxLength; +} + +FloatRectangle +_MessageBoxImpl::GetCenterAlignRect(float width, float height) const +{ + float x = 0.0f; + float y = 0.0f; + + FloatDimension screenRect = _ControlManager::GetInstance()->GetScreenSizeF(); + + if (GetCore().GetOrientation() == _CONTROL_ORIENTATION_LANDSCAPE) + { + float temp = screenRect.width; + screenRect.width = screenRect.height; + screenRect.height = temp; + } + + x = (screenRect.width - width) / 2.0f; + y = (screenRect.height - height) / 2.0f; + + return FloatRectangle(x, y, width, height); +} + + +void +_MessageBoxImpl::OnChangeLayout(_ControlOrientation orientation) +{ + result r = E_SUCCESS; + + float defaultWidth; + float maxHeight; + float totalH; + FloatRectangle bounds; + + GetCore().OnChangeLayout(orientation); + + r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + SetResizable(true); + SetMovable(true); + + GET_SHAPE_CONFIG(MESSAGEBOX::MAX_HEIGHT, orientation, maxHeight); + GET_SHAPE_CONFIG(MESSAGEBOX::DEFAULT_WIDTH, orientation, defaultWidth); + + totalH = GetCore().GetTotalHeight(); + + if (totalH > maxHeight) + { + totalH = maxHeight; + } + + bounds = GetCenterAlignRect(defaultWidth, totalH); + + r = SetBounds(bounds); + + SetMovable(false); + SetResizable(false); + + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + + return ; +} + + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_MessageBoxPresenter.cpp b/src/ui/controls/FUiCtrl_MessageBoxPresenter.cpp new file mode 100644 index 0000000..99b9d2f --- /dev/null +++ b/src/ui/controls/FUiCtrl_MessageBoxPresenter.cpp @@ -0,0 +1,1612 @@ +// +// 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_MessageBoxPresenter.cpp + * @brief This is the implementation file for the _MessageBoxPresenter class. + */ +#include +#include +#include +#include +#include +#include +#include "FUi_AccessibilityContainer.h" +#include "FUi_AccessibilityElement.h" +#include "FUi_Math.h" +#include "FUi_ModalLoopManager.h" +#include "FUi_ResourceManager.h" +#include "FUi_TouchManager.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUiCtrl_ButtonImpl.h" +#include "FUiCtrl_Button.h" +#include "FUiCtrl_Label.h" +#include "FUiCtrl_Scroll.h" +#include "FUiCtrl_ScrollPanel.h" +#include "FUiCtrl_MessageBox.h" +#include "FUiCtrl_MessageBoxPresenter.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Graphics; +using namespace Tizen::Graphics::_Text; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Animations; + + +namespace Tizen { namespace Ui { namespace Controls +{ + + +_MessageBoxPresenter::_MessageBoxPresenter(void) + : __pMessageBox(null) + , __pButtonListener(null) + , __msgboxResult(MSGBOX_RESULT_CLOSE) + , __pBodyTextObject(null) + , __textBounds(0.0f, 0.0f, 0.0f, 0.0f) + , __titleBgBounds(0.0f, 0.0f, 0.0f, 0.0f) + , __buttonBgBounds(0.0f, 0.0f, 0.0f, 0.0f) + , __pLabel(null) + , __pScroll(null) + , __pScrollPanel(null) + , __scrollPos(0.0f) + , __buttonNum(0) + , __prevPositionY(-1.0f) + , __textObjHeight(0.0f) + , __touchPressFlag(false) + , __scrollStart(false) + , __btnClickFlag(false) + , __bodyClickFlag(false) + , __touchOutBounds(false) + , __beginModal(false) +{ + for (int i = 0; i < 3; i++) + { + __pButtons[i] = null; + } +} + +_MessageBoxPresenter::~_MessageBoxPresenter(void) +{ + for (int i = 0; i < __buttonNum; i++) + { + delete __pButtons[i]; + __pButtons[i] = null; + } + + delete __pButtonListener; + __pButtonListener = null; + + if (__pBodyTextObject != null) + { + __pBodyTextObject->RemoveAll(); + delete __pBodyTextObject; + __pBodyTextObject = null; + } + + if (__pLabel != null) + { + __pScrollPanel->DetachChild(*__pLabel); + delete __pLabel; + __pLabel = null; + } + + if (__pScrollPanel != null) + { + __pMessageBox->DetachChild(*__pScrollPanel); + delete __pScrollPanel; + __pScrollPanel = null; + } + + if (__pScroll != null) + { + __pMessageBox->DetachSystemChild(*__pScroll); + delete __pScroll; + __pScroll = null; + } +} + +result +_MessageBoxPresenter::OnChangeLayout(_ControlOrientation orientation) +{ + result r = E_SUCCESS; + + float titleTextSize = 0.0f; + float minTitleTextSize = 0.0f; + float defaultWidth = 0.0f; + float titleHeight = 0.0f; + float bottomHeight = 0.0f; + float maxHeight = 0.0f; + + float textTopMargin = 0.0f; + + float titleTopMargin = 0.0f; + float titleLeftMargin = 0.0f; + float titleRightMargin = 0.0f; + + float transTopMargin = 0.0f; + float transBottomMargin = 0.0f; + float labelHeight = 0.0f; + float transLeftMargin = 0.0f; + float transRightMargin = 0.0f; + + GET_SHAPE_CONFIG(POPUP::TITLE_TEXT_SIZE, orientation, titleTextSize); + GET_SHAPE_CONFIG(POPUP::MIN_TITLE_TEXT_SIZE, orientation, minTitleTextSize); + + GET_SHAPE_CONFIG(MESSAGEBOX::DEFAULT_WIDTH, orientation, defaultWidth); + GET_SHAPE_CONFIG(MESSAGEBOX::BOTTOM_HEIGHT, orientation, bottomHeight); + GET_SHAPE_CONFIG(MESSAGEBOX::MAX_HEIGHT, orientation, maxHeight); + + GET_SHAPE_CONFIG(MESSAGEBOX::TEXT_TOP_MRAGIN, orientation, textTopMargin); + + GET_SHAPE_CONFIG(MESSAGEBOX::TITLE_TEXT_TOP_MARGIN, orientation, titleTopMargin); + GET_SHAPE_CONFIG(MESSAGEBOX::TITLE_TEXT_LEFT_MARGIN, orientation, titleLeftMargin); + GET_SHAPE_CONFIG(MESSAGEBOX::TITLE_TEXT_RIGHT_MARGIN, orientation, titleRightMargin); + + GET_SHAPE_CONFIG(MESSAGEBOX::BG_IMAGE_TRANSPARENT_TOP_MARGIN, orientation, transTopMargin); + GET_SHAPE_CONFIG(MESSAGEBOX::BG_IMAGE_TRANSPARENT_BOTTOM_MARGIN, orientation, transBottomMargin); + GET_SHAPE_CONFIG(MESSAGEBOX::BG_IMAGE_TRANSPARENT_LEFT_MARGIN, orientation, transLeftMargin); + GET_SHAPE_CONFIG(MESSAGEBOX::BG_IMAGE_TRANSPARENT_RIGHT_MARGIN, orientation, transRightMargin); + + __textBounds.width = defaultWidth - GetLeftRightLabelMargin(); + __titleBgBounds.width = defaultWidth - (transLeftMargin + transRightMargin); + + // TitleText + if (__pMessageBox->HasTitle() == true) + { + GET_SHAPE_CONFIG(MESSAGEBOX::TITLE_HEIGHT, orientation, titleHeight); + + _titleBounds.width = __textBounds.width; + _pTitleTextObject->SetBounds(_titleBounds); + + r = CalculateTitleTextSize(titleTextSize, minTitleTextSize); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + _titleBounds.height = _pTitleTextObject->GetTotalHeightF(); + } + + // Text + __pBodyTextObject->SetBounds(__textBounds); + + __pBodyTextObject->Compose(); + + // Text bounds + __pScrollPanel->SetBounds(__textBounds); + + labelHeight = __pBodyTextObject->GetTotalHeightF(); + + if (labelHeight < __textObjHeight) + { + __pLabel->SetBounds(FloatRectangle(0.0f, (__textObjHeight - labelHeight)/2.0f, __textBounds.width, labelHeight)); + } + else + { + __pLabel->SetBounds(FloatRectangle(0.0f, 0.0f, __textBounds.width, labelHeight)); + } + + __buttonBgBounds = FloatRectangle(transLeftMargin, __pMessageBox->GetTotalHeight() - bottomHeight - transBottomMargin, defaultWidth- (transLeftMargin + transRightMargin), bottomHeight); + + for (int i = 0; i < __buttonNum; i++) + { + r = __pButtons[i]->SetBounds(CalculateButtonPositionAndSize(i)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + return r; +} + +result +_MessageBoxPresenter::Initialize(_MessageBox& msgbox) +{ + result r = E_SUCCESS; + + float titleTextSize = 0.0f; + float bodyTextSize = 0.0f; + + float defaultWidth = 0.0f; + float titleHeight = 0.0f; + float bottomHeight = 0.0f; + float maxHeight = 0.0f; + + float textTopMargin = 0.0f; + float textTopMarginNoButton = 0.0f; + float textLeftMargin = 0.0f; + + float titleTopMargin = 0.0f; + float titleLeftMargin = 0.0f; + float titleRightMargin = 0.0f; + + float transTopMargin = 0.0f; + float transBottomMargin = 0.0f; + float transLeftMargin = 0.0f; + float transRightMargin = 0.0f; + float labelHeight = 0.0f; + + _ControlOrientation orientation; + + __pMessageBox = &msgbox; + + orientation = __pMessageBox->GetOrientation(); + + GET_SHAPE_CONFIG(MESSAGEBOX::TITLE_TEXT_SIZE, orientation, titleTextSize); + GET_SHAPE_CONFIG(MESSAGEBOX::TEXT_SIZE, orientation, bodyTextSize); + GET_SHAPE_CONFIG(MESSAGEBOX::TEXT_HEIGHT, orientation, __textObjHeight); + + GET_SHAPE_CONFIG(MESSAGEBOX::DEFAULT_WIDTH, orientation, defaultWidth); + GET_SHAPE_CONFIG(MESSAGEBOX::TITLE_HEIGHT, orientation, titleHeight); + GET_SHAPE_CONFIG(MESSAGEBOX::BOTTOM_HEIGHT, orientation, bottomHeight); + GET_SHAPE_CONFIG(MESSAGEBOX::MAX_HEIGHT, orientation, maxHeight); + + GET_SHAPE_CONFIG(MESSAGEBOX::TEXT_TOP_MRAGIN, orientation, textTopMargin); + GET_SHAPE_CONFIG(MESSAGEBOX::TEXT_TOP_MRAGIN_NO_BUTTON, orientation, textTopMarginNoButton); + GET_SHAPE_CONFIG(MESSAGEBOX::TEXT_LEFT_MARGIN, orientation, textLeftMargin); + + GET_SHAPE_CONFIG(MESSAGEBOX::TITLE_TEXT_TOP_MARGIN, orientation, titleTopMargin); + GET_SHAPE_CONFIG(MESSAGEBOX::TITLE_TEXT_LEFT_MARGIN, orientation, titleLeftMargin); + GET_SHAPE_CONFIG(MESSAGEBOX::TITLE_TEXT_RIGHT_MARGIN, orientation, titleRightMargin); + + GET_SHAPE_CONFIG(MESSAGEBOX::BG_IMAGE_TRANSPARENT_TOP_MARGIN, orientation, transTopMargin); + GET_SHAPE_CONFIG(MESSAGEBOX::BG_IMAGE_TRANSPARENT_BOTTOM_MARGIN, orientation, transBottomMargin); + GET_SHAPE_CONFIG(MESSAGEBOX::BG_IMAGE_TRANSPARENT_LEFT_MARGIN, orientation, transLeftMargin); + GET_SHAPE_CONFIG(MESSAGEBOX::BG_IMAGE_TRANSPARENT_RIGHT_MARGIN, orientation, transRightMargin); + + __titleBgBounds= FloatRectangle(transLeftMargin, transTopMargin, _CoordinateSystemUtils::ConvertToFloat(defaultWidth) - (2 * transLeftMargin), titleHeight); + + + // TitleText + if (__pMessageBox->HasTitle() == true) + { + _pTitleTextObject = new (std::nothrow) TextObject(); + SysTryReturn(NID_UI_CTRL, _pTitleTextObject != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create TitleTextObject."); + + r = _pTitleTextObject->Construct(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + FloatRectangle bounds = FloatRectangle(titleLeftMargin + transLeftMargin, + titleTopMargin + transTopMargin, + defaultWidth - (titleLeftMargin + titleRightMargin + transLeftMargin + transRightMargin), + titleHeight - titleTopMargin); + + labelHeight = GetLabelHeight(_pTitleTextObject, const_cast (__pMessageBox->GetTitleText().GetPointer()), + __pMessageBox->GetTitleText().GetLength(), titleTextSize, bounds, true); + + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + _titleBounds = FloatRectangle(titleLeftMargin + transLeftMargin, + __titleBgBounds.y + (__titleBgBounds.height - labelHeight) / 2, + defaultWidth - (titleLeftMargin + titleRightMargin + transLeftMargin + transRightMargin), + labelHeight); + } + else + { + titleHeight = 0; + } + + // Text bounds + __textBounds.SetBounds(textLeftMargin + transLeftMargin, + titleHeight + textTopMargin + transTopMargin, + defaultWidth - GetLeftRightLabelMargin(), + __textObjHeight); + + + if ((__pMessageBox->HasTitle() == false) && (__pMessageBox->GetMsgBoxStyle() == MSGBOX_STYLE_NONE)) + { + __textBounds.y = transTopMargin + textTopMarginNoButton; + } + + __pLabel = _Label::CreateLabelN(); + SysTryCatch(NID_UI_CTRL, __pLabel != null, , E_OUT_OF_MEMORY, "[E_SYSTEM] Failed to create the scroll."); + + __pBodyTextObject = new (std::nothrow) TextObject(); + SysTryCatch(NID_UI_CTRL, __pBodyTextObject != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = __pBodyTextObject->Construct(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + labelHeight = GetLabelHeight(__pBodyTextObject, const_cast (__pMessageBox->GetText().GetPointer()), + __pMessageBox->GetText().GetLength(), bodyTextSize, __textBounds, false); + + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + if (__pMessageBox->GetText().GetLength() > 0) + { + __textObjHeight = __pBodyTextObject->GetLineHeightAtF(0) * 3.0; + __textBounds.height = __textObjHeight; + } + + if (labelHeight < __textObjHeight) + { + __pLabel->SetBounds(FloatRectangle(0.0f, (__textObjHeight - labelHeight)/2.0f, __textBounds.width, labelHeight)); + } + else + { + __pLabel->SetBounds(FloatRectangle(0.0f, 0.0f, __textBounds.width, labelHeight)); + } + + + __pLabel->SetText(__pMessageBox->GetText()); + __pLabel->SetTextConfig(bodyTextSize, LABEL_TEXT_STYLE_NORMAL); + __pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT); + __pLabel->SetMargin(0.0f, 0.0f, 0.0f, 0.0f); + + __pScrollPanel = _ScrollPanel::CreateScrollPanelN(__textBounds, SCROLL_PANEL_SCROLL_DIRECTION_VERTICAL, true); + + SysTryCatch(NID_UI_CTRL, __pScrollPanel != null, , E_OUT_OF_MEMORY, "[E_SYSTEM] Failed to create the scroll."); + __pScrollPanel->SetBounds(__textBounds); + __pScrollPanel->AttachChild(*__pLabel); + __pScrollPanel->SetFocusable(false); + __pMessageBox->AttachChild(*__pScrollPanel); + + __buttonBgBounds = FloatRectangle(transLeftMargin, __pMessageBox->GetTotalHeight() - bottomHeight - transBottomMargin, _CoordinateSystemUtils::ConvertToFloat(defaultWidth)- (transLeftMargin + transRightMargin), bottomHeight); + + GetButtonString(); + + if (__buttonNum != 0) + { + r = CreateButtons(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + return r; + +CATCH: + delete _pTitleTextObject; + _pTitleTextObject = null; + + delete __pBodyTextObject; + __pBodyTextObject = null; + + SetLastResult(r); + return r; +} + +float +_MessageBoxPresenter::GetLabelHeight(TextObject* textObject, wchar_t* text, int length, float bodyTextSize, FloatRectangle bounds, bool isTitle) +{ + TextSimple* pSimpleTextForBodyText = null; + result r = E_SUCCESS; + + // Text + 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->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); + textObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT); + textObject->SetBounds(bounds); + + if (isTitle == true) + { + float minTitleTextSize = 0.0f; + + GET_SHAPE_CONFIG(MESSAGEBOX::MIN_TITLE_TEXT_SIZE, __pMessageBox->GetOrientation(), minTitleTextSize); + + r = CalculateTitleTextSize(bodyTextSize, minTitleTextSize); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + r = SetFontInfo(FONT_STYLE_PLAIN, bodyTextSize); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to set font.", GetErrorMessage(r)); + + textObject->SetFont(_pFont, 0, textObject->GetTextLength()); + + textObject->Compose(); + } + + SetLastResult(r); + + return textObject->GetTotalHeightF(); + +CATCH: + return 0.0f; +} + +float +_MessageBoxPresenter::GetLeftRightLabelMargin(void) +{ + float textLeftMargin = 0.0f; + float textRightMargin = 0.0f; + float transLeftMargin = 0.0f; + float transRightMargin = 0.0f; + + _ControlOrientation orientation = __pMessageBox->GetOrientation(); + + GET_SHAPE_CONFIG(MESSAGEBOX::TEXT_LEFT_MARGIN, orientation, textLeftMargin); + GET_SHAPE_CONFIG(MESSAGEBOX::TEXT_RIGHT_MARGIN, orientation, textRightMargin); + GET_SHAPE_CONFIG(MESSAGEBOX::BG_IMAGE_TRANSPARENT_LEFT_MARGIN, orientation, transLeftMargin); + GET_SHAPE_CONFIG(MESSAGEBOX::BG_IMAGE_TRANSPARENT_RIGHT_MARGIN, orientation, transRightMargin); + + return textLeftMargin + textRightMargin + transLeftMargin + transRightMargin; +} + +void +_MessageBoxPresenter::Draw(void) +{ + result r = E_SUCCESS; + + float defaultWidth = 0.0f; + float textSize = 0.0f; + + bool isCustomBitmap = false; + + _ControlOrientation orientation; + + orientation = __pMessageBox->GetOrientation(); + + GET_SHAPE_CONFIG(MESSAGEBOX::DEFAULT_WIDTH, orientation, defaultWidth); + GET_SHAPE_CONFIG(MESSAGEBOX::TEXT_SIZE, orientation, textSize); + + Canvas* pCanvas = __pMessageBox->GetCanvasN(); + SysTryReturnVoidResult(NID_UI_CTRL, (pCanvas != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create canvas."); + + pCanvas->SetBackgroundColor(Color(0x00000000)); + pCanvas->Clear(); + + float totalH = __pMessageBox->GetTotalHeight(); + + FloatRectangle bgBounds(0.0f, 0.0f, _CoordinateSystemUtils::ConvertToFloat(defaultWidth), totalH); + + const Bitmap* pBackgroundBitmap = __pMessageBox->GetBackgroundBitmap(); + const Bitmap* pOutlineBitmap = __pMessageBox->GetOutlineBitmap(); + const Bitmap* pButtonBitmap = __pMessageBox->GetButtonBackgroundBitmap(); + const Bitmap* pButtonEffectBitmap = __pMessageBox->GetButtonBackgroundEffectBitmap(); + const Bitmap* pTitleBitmap = __pMessageBox->GetTitleBackgroundBitmap(); + const Bitmap* pTitleEffectBitmap = __pMessageBox->GetTitleBackgroundEffectBitmap(); + + isCustomBitmap = IS_CUSTOM_BITMAP(MESSAGEBOX::BG_NORMAL); + // Draw BG + if (pBackgroundBitmap != null) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pBackgroundBitmap)) + { + pCanvas->DrawNinePatchedBitmap(bgBounds, *pBackgroundBitmap); + } + else + { + pCanvas->DrawBitmap(bgBounds, *pBackgroundBitmap); + } + } + + // Draw Outline + if (!isCustomBitmap && pOutlineBitmap != null) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pOutlineBitmap)) + { + pCanvas->DrawNinePatchedBitmap(bgBounds, *pOutlineBitmap); + } + else + { + pCanvas->DrawBitmap(bgBounds, *pOutlineBitmap); + } + } + + //DrawButtonBG + if(pButtonBitmap != null) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pButtonBitmap)) + { + pCanvas->DrawNinePatchedBitmap(__buttonBgBounds, *pButtonBitmap); + } + else + { + pCanvas->DrawBitmap(__buttonBgBounds, *pButtonBitmap); + } + } + //DrawEffectButtonBitmap + if (pButtonEffectBitmap != null) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pButtonEffectBitmap)) + { + pCanvas->DrawNinePatchedBitmap(__buttonBgBounds, *pButtonEffectBitmap); + } + else + { + pCanvas->DrawBitmap(__buttonBgBounds, *pButtonEffectBitmap); + } + } + + // Draw Title + if (_pTitleTextObject != null) + { + //DrawTitleBG + if(pTitleBitmap != null) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pTitleBitmap)) + { + pCanvas->DrawNinePatchedBitmap(__titleBgBounds, *pTitleBitmap); + } + else + { + pCanvas->DrawBitmap(__titleBgBounds, *pTitleBitmap); + } + } + //DrawEffectTitleBitmap + if (pTitleEffectBitmap != null) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pTitleEffectBitmap)) + { + pCanvas->DrawNinePatchedBitmap(__titleBgBounds, *pTitleEffectBitmap); + } + else + { + pCanvas->DrawBitmap(__titleBgBounds, *pTitleEffectBitmap); + } + } + r = SetFontInfo(FONT_STYLE_PLAIN, _titleTextSize); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + _pTitleTextObject->SetFont(_pFont, 0, _pTitleTextObject->GetTextLength()); + _pTitleTextObject->SetForegroundColor(__pMessageBox->GetTitleTextColor(), 0, _pTitleTextObject->GetTextLength()); + _pTitleTextObject->SetBounds(_titleBounds); + _pTitleTextObject->Draw(*_CanvasImpl::GetInstance(*pCanvas)); + } + + __pLabel->SetTextColor(__pMessageBox->GetTextColor()); + //fall thtrough +CATCH: + delete pCanvas; + + return; +} + +result +_MessageBoxPresenter::ShowAndWait(int& modalResult) +{ + result r = E_SUCCESS; + + r = __pMessageBox->Open(); + + __pMessageBox->SetTouchCapture(false, false); + + ProcessEvent(); + + __pMessageBox->ReleaseTouchCapture(); + + __pMessageBox->Close(); + + modalResult = GetReturnValue(); + + _ModalLoopManager::GetInstance()->SetLastExitCode(-1); + + return r; +} + +void +_MessageBoxPresenter::ProcessEvent(void) +{ + _ControlHandle handle; + + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + if (pTouchManager) + { + _Control* pControl = pTouchManager->GetTouchControlSource(); + if (pControl) + { + pControl->SetEventEnableState(false); + } + } + + if (__pMessageBox->GetMsgBoxStyle() == MSGBOX_STYLE_NONE) + { + __beginModal = true; + } + else if (__pButtonListener != null) + { + __pButtonListener->SetBeginModal(true); + } + + _ModalLoopManager::GetInstance()->BeginMainLoop(__pMessageBox->GetTimeout(), MSGBOX_RESULT_CLOSE); + + int exitCode = _ModalLoopManager::GetInstance()->GetLastExitCode(); + switch (exitCode) + { + case MSGBOX_BUTTON_CLICKED: + if (__pButtonListener != null && __pButtonListener->IsButtonClicked()) + { + handle = __pButtonListener->GetClickedButtonHandle(); + FindButtonAndResult(handle); + break; + } + case MSGBOX_BUTTON_CLOSE: + SetReturnValue(MSGBOX_RESULT_CLOSE); + break; + + case MSGBOX_BUTTON_CANCEL: + SetReturnValue(MSGBOX_RESULT_CANCEL); + break; + + // fall through + case _ModalLoopManager::MODAL_LOOP_EXIT_CODE_APP_TERMINATION: + case _ModalLoopManager::MODAL_LOOP_EXIT_CODE_CONTINUOUS_TERMINATION: + _ModalLoopManager::GetInstance()->EndMainLoop(exitCode, false); + __beginModal = false; + break; + } + + if (__pMessageBox->GetMsgBoxStyle() == MSGBOX_STYLE_NONE) + { + __beginModal = false; + } + else if (__pButtonListener != null) + { + __pButtonListener->SetBeginModal(false); + } + } + +void +_MessageBoxPresenter::GetButtonString(void) +{ + switch (__pMessageBox->GetMsgBoxStyle()) + { + case MSGBOX_STYLE_NONE: + __buttonNum = 0; + break; + + case MSGBOX_STYLE_OK: + __buttonNum = 1; + GET_STRING_CONFIG(IDS_COM_SK_OK, __buttonText[0]); + break; + + case MSGBOX_STYLE_CANCEL: + __buttonNum = 1; + GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_CANCEL_ABB, __buttonText[0]); + break; + + case MSGBOX_STYLE_OKCANCEL: + __buttonNum = 2; + GET_STRING_CONFIG(IDS_COM_SK_OK, __buttonText[1]); + GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_CANCEL_ABB, __buttonText[0]); + break; + + case MSGBOX_STYLE_YESNO: + __buttonNum = 2; + GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_YES, __buttonText[1]); + GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_NO, __buttonText[0]); + break; + + case MSGBOX_STYLE_YESNOCANCEL: + __buttonNum = 3; + GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_YES, __buttonText[2]); + GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_NO, __buttonText[1]); + GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_CANCEL_ABB, __buttonText[0]); + break; + + case MSGBOX_STYLE_ABORTRETRYIGNORE: + __buttonNum = 3; + GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_ABORT, __buttonText[0]); + GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_RETRY, __buttonText[1]); + GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_IGNORE, __buttonText[2]); + break; + + case MSGBOX_STYLE_CANCELTRYCONTINUE: + __buttonNum = 3; + GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_CANCEL_ABB, __buttonText[0]); + GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_TRY, __buttonText[1]); + GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_CONTINUE_ABB, __buttonText[2]); + break; + + case MSGBOX_STYLE_RETRYCANCEL: + __buttonNum = 2; + GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_RETRY, __buttonText[1]); + GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_CANCEL_ABB, __buttonText[0]); + break; + + default: + break; + } +} + +void +_MessageBoxPresenter::UpdateButtonString(void) +{ + GetButtonString(); + + for (int i = 0; i < __buttonNum; i++) + { + __pButtons[i]->SetText(__buttonText[i]); + } +} + +result +_MessageBoxPresenter::CreateButtons(void) +{ + result r = E_SUCCESS; + //Button Colors + Color buttonColorNormal(0x00000000); + Color buttonColorPressed(0x00000000); + Color buttonColorDisabled(0x00000000); + Color buttonColorHighlighted(0x00000000); + Color buttonTextNormal(0x00000000); + Color buttonTextPressed(0x00000000); + Color buttonTextDisabled(0x00000000); + Color buttonTextHighlighted(0x00000000); + bool isCustomBitmap = false; + + Bitmap* pComposedButtonBgNormal = null; + Bitmap* pComposedButtonBgPressed = null; + Bitmap* pComposedButtonBgDisabled = null; + Bitmap* pComposedButtonBgHighlighted = null; + + Bitmap* pButtonNormalEffect = null; + Bitmap* pButtonPressedEffect = null; + Bitmap* pButtonDisabledEffect = null; + + GET_COLOR_CONFIG(MESSAGEBOX::BOTTOM_BUTTON_BG_NORMAL, buttonColorNormal); + GET_COLOR_CONFIG(MESSAGEBOX::BOTTOM_BUTTON_BG_PRESSED, buttonColorPressed); + GET_COLOR_CONFIG(MESSAGEBOX::BOTTOM_BUTTON_BG_DISABLED, buttonColorDisabled); + GET_COLOR_CONFIG(MESSAGEBOX::BOTTOM_BUTTON_BG_HIGHLIGHTED, buttonColorHighlighted); + + GET_COLOR_CONFIG(MESSAGEBOX::BOTTOM_BUTTON_TEXT_NORMAL, buttonTextNormal); + GET_COLOR_CONFIG(MESSAGEBOX::BOTTOM_BUTTON_TEXT_PRESSED, buttonTextPressed); + GET_COLOR_CONFIG(MESSAGEBOX::BOTTOM_BUTTON_TEXT_DISABLED, buttonTextDisabled); + GET_COLOR_CONFIG(MESSAGEBOX::BOTTOM_BUTTON_TEXT_HIGHLIGHTED, buttonTextHighlighted); + + 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) + { + 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)); + } + + 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) + { + 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)); + } + + 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) + { + 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)); + } + + 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)); + + __pButtonListener = new (std::nothrow) _MessageBoxButtonListener(); + SysTryCatch(NID_UI_CTRL, __pButtonListener != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + for (int i = 0; i < __buttonNum; i++) + { + _ControlImpl* pImpl = null; + _Button* pButtonCore = null; + + __pButtons[i] = new (std::nothrow) Button(); + SysTryCatch(NID_UI_CTRL, __pButtons[i] != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = __pButtons[i]->Construct(CalculateButtonPositionAndSize(i)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pButtons[i]->SetText(__buttonText[i]); + __pButtons[i]->AddTouchEventListener(*__pButtonListener); + __pButtons[i]->AddKeyEventListener(*__pButtonListener); + __pButtons[i]->SetNormalBackgroundBitmap(*pComposedButtonBgNormal); + __pButtons[i]->SetPressedBackgroundBitmap(*pComposedButtonBgPressed); + __pButtons[i]->SetDisabledBackgroundBitmap(*pComposedButtonBgDisabled); + __pButtons[i]->SetHighlightedBackgroundBitmap(*pComposedButtonBgHighlighted); + __pButtons[i]->SetTextColor(buttonTextNormal); + __pButtons[i]->SetPressedTextColor(buttonTextPressed); + __pButtons[i]->SetDisabledTextColor(buttonTextDisabled); + __pButtons[i]->SetHighlightedTextColor(buttonTextHighlighted); + + pImpl = _ControlImpl::GetInstance(*__pButtons[i]); + pButtonCore = dynamic_cast<_Button*>(&pImpl->GetCore()); + + if (pButtonCore != null) + { + pButtonCore->SetTouchPressThreshold(0.16); + __pMessageBox->AttachChild(*pButtonCore); + + if (pButtonNormalEffect != null) + { + pButtonCore->SetBackgroundEffectBitmap(_BUTTON_STATUS_NORMAL, *pButtonNormalEffect); + } + + if (pButtonPressedEffect != null) + { + pButtonCore->SetBackgroundEffectBitmap(_BUTTON_STATUS_PRESSED, *pButtonPressedEffect); + } + + if(pButtonDisabledEffect != null) + { + pButtonCore->SetBackgroundEffectBitmap(_BUTTON_STATUS_DISABLED, *pButtonDisabledEffect); + } + } + + if (i != 0) + { + __pButtons[i-1]->SetNextFocus(__pButtons[i]); + __pButtons[i]->SetPreviousFocus(__pButtons[i-1]); + } + + } + + delete pComposedButtonBgNormal; + pComposedButtonBgNormal = null; + + delete pComposedButtonBgPressed; + pComposedButtonBgPressed = null; + + delete pComposedButtonBgDisabled; + pComposedButtonBgDisabled = null; + + delete pComposedButtonBgHighlighted; + pComposedButtonBgHighlighted = null; + + delete pButtonNormalEffect; + pButtonNormalEffect = null; + + delete pButtonPressedEffect; + pButtonNormalEffect = null; + + delete pButtonDisabledEffect; + pButtonNormalEffect = null; + + return r; + +CATCH: + + delete pComposedButtonBgNormal; + pComposedButtonBgNormal = null; + + delete pComposedButtonBgPressed; + pComposedButtonBgPressed = null; + + delete pComposedButtonBgDisabled; + pComposedButtonBgDisabled = null; + + delete pComposedButtonBgHighlighted; + pComposedButtonBgHighlighted = null; + + delete pButtonNormalEffect; + pButtonNormalEffect = null; + + delete pButtonPressedEffect; + pButtonNormalEffect = null; + + delete pButtonDisabledEffect; + pButtonNormalEffect = null; + + delete __pButtonListener; + __pButtonListener = null; + + for (int i = 0; i < __buttonNum; i++) + { + delete __pButtons[i]; + __pButtons[i] = null; + } + return r; +} + +FloatRectangle +_MessageBoxPresenter::CalculateButtonPositionAndSize(int buttonIndex) +{ + float x = 0.0f; + float y = 0.0f; + float w = 0.0f; + float h = 0.0f; + + float defaultWidth = 0.0f; + float btnHeight = 0.0f; + + float btnSideMargin1 = 0.0f; + float btnSideMargin2 = 0.0f; + float btnSideMargin3 = 0.0f; + float btnTopMargin = 0.0f; + + float btnGap = 0.0f; + float textTopMargin = 0.0f; + + float titleHeight = 0.0f; + float transTopMargin = 0.0f; + + _ControlOrientation orientation; + orientation = __pMessageBox->GetOrientation(); + GET_SHAPE_CONFIG(MESSAGEBOX::DEFAULT_WIDTH, orientation, defaultWidth); + GET_SHAPE_CONFIG(MESSAGEBOX::BUTTON_HEIGHT, orientation, btnHeight); + + GET_SHAPE_CONFIG(MESSAGEBOX::BUTTON_SIDE_MARGIN_01, orientation, btnSideMargin1); + GET_SHAPE_CONFIG(MESSAGEBOX::BUTTON_SIDE_MARGIN_02, orientation, btnSideMargin2); + GET_SHAPE_CONFIG(MESSAGEBOX::BUTTON_SIDE_MARGIN_03, orientation, btnSideMargin3); + GET_SHAPE_CONFIG(MESSAGEBOX::BUTTON_TOP_MARGIN, orientation, btnTopMargin); + + GET_SHAPE_CONFIG(MESSAGEBOX::BUTTON_INTERNAL_GAP, orientation, btnGap); + GET_SHAPE_CONFIG(MESSAGEBOX::TEXT_TOP_MRAGIN, orientation, textTopMargin); + + GET_SHAPE_CONFIG(MESSAGEBOX::TITLE_HEIGHT, orientation, titleHeight); + GET_SHAPE_CONFIG(MESSAGEBOX::BG_IMAGE_TRANSPARENT_TOP_MARGIN, orientation, transTopMargin); + + if (__pMessageBox->HasTitle() == false) + { + titleHeight = 0.0f; + } + + switch (__buttonNum) + { + case 1: + w = defaultWidth - (btnSideMargin1 * 2.0f); + h = btnHeight; + x = btnSideMargin1; + break; + + case 2: + w = (defaultWidth - (btnSideMargin2 * 2.0f) - btnGap) / 2.0f; + h = btnHeight; + x = btnSideMargin2 + (buttonIndex * (w + btnGap)); + break; + + case 3: + { + switch (buttonIndex) + { + case 0: + // fall through + case 1: + // fall through + case 2: + w = (defaultWidth - ((btnSideMargin3 + btnGap) * 2.0f)) / 3.0f; + h = btnHeight; + x = btnSideMargin3 + (buttonIndex * (w + btnGap)); + break; + } + break; + } + default: + break; + } + y = __buttonBgBounds.y + (__buttonBgBounds.height - h) / 2; + return FloatRectangle(x, y, w, h); +} + +void +_MessageBoxPresenter::FindButtonAndResult(const _ControlHandle handle) +{ + int btnPos = -1; + + for (int i = 0; i < __buttonNum; i++) + { + _ControlImpl* pImpl = _ControlImpl::GetInstance(*__pButtons[i]); + if (pImpl->GetCore().GetHandle() == handle) + { + btnPos = i; + break; + } + } + + switch (__pMessageBox->GetMsgBoxStyle()) + { + case MSGBOX_STYLE_NONE: + SetReturnValue(MSGBOX_RESULT_CLOSE); + break; + + case MSGBOX_STYLE_OK: + SetReturnValue(MSGBOX_RESULT_OK); + break; + + case MSGBOX_STYLE_CANCEL: + SetReturnValue(MSGBOX_RESULT_CANCEL); + break; + + case MSGBOX_STYLE_OKCANCEL: + switch (btnPos) + { + case 0: + SetReturnValue(MSGBOX_RESULT_CANCEL); + break; + + case 1: + SetReturnValue(MSGBOX_RESULT_OK); + break; + } + break; + + case MSGBOX_STYLE_YESNO: + switch (btnPos) + { + case 0: + SetReturnValue(MSGBOX_RESULT_NO); + break; + + case 1: + SetReturnValue(MSGBOX_RESULT_YES); + break; + } + break; + + case MSGBOX_STYLE_YESNOCANCEL: + switch (btnPos) + { + case 0: + SetReturnValue(MSGBOX_RESULT_CANCEL); + break; + + case 1: + SetReturnValue(MSGBOX_RESULT_NO); + break; + + case 2: + SetReturnValue(MSGBOX_RESULT_YES); + break; + } + break; + + case MSGBOX_STYLE_ABORTRETRYIGNORE: + switch (btnPos) + { + case 0: + SetReturnValue(MSGBOX_RESULT_ABORT); + break; + + case 1: + SetReturnValue(MSGBOX_RESULT_RETRY); + break; + + case 2: + SetReturnValue(MSGBOX_RESULT_IGNORE); + break; + } + break; + + case MSGBOX_STYLE_CANCELTRYCONTINUE: + switch (btnPos) + { + case 0: + SetReturnValue(MSGBOX_RESULT_CANCEL); + break; + + case 1: + SetReturnValue(MSGBOX_RESULT_TRY); + break; + + case 2: + SetReturnValue(MSGBOX_RESULT_CONTINUE); + break; + } + break; + + case MSGBOX_STYLE_RETRYCANCEL: + switch (btnPos) + { + case 0: + SetReturnValue(MSGBOX_RESULT_CANCEL); + break; + + case 1: + SetReturnValue(MSGBOX_RESULT_RETRY); + break; + } + break; + + default: + break; + } +} + +float +_MessageBoxPresenter::CalculateButtonAreaHeight(void) +{ + float btnHeight = 0.0f; + + GET_SHAPE_CONFIG(MESSAGEBOX::BUTTON_HEIGHT, __pMessageBox->GetOrientation(), btnHeight); + + switch (__pMessageBox->GetMsgBoxStyle()) + { + case MSGBOX_STYLE_NONE: + return 0; + + case MSGBOX_STYLE_OK: + // fall through + case MSGBOX_STYLE_CANCEL: + // fall through + case MSGBOX_STYLE_OKCANCEL: + // fall through + case MSGBOX_STYLE_YESNO: + // fall through + case MSGBOX_STYLE_RETRYCANCEL: + // fall through + case MSGBOX_STYLE_YESNOCANCEL: + // fall through + case MSGBOX_STYLE_ABORTRETRYIGNORE: + // fall through + case MSGBOX_STYLE_CANCELTRYCONTINUE: + return btnHeight; + } + + return -1.0f; +} + +float +_MessageBoxPresenter::GetBodyTextObjHeight(void) const +{ + return (__pBodyTextObject == null) ? 0.0f : __textObjHeight; +} +float +_MessageBoxPresenter::GetBodyTextHeight(void) const +{ + return (__pBodyTextObject == null) ? 0.0f : __pBodyTextObject->GetTotalHeightF(); +} + +FloatRectangle +_MessageBoxPresenter::GetTextBounds(void) const +{ + return __textBounds; +} + +void +_MessageBoxPresenter::SetReturnValue(MessageBoxModalResult rtn) +{ + __msgboxResult = rtn; +} + +int +_MessageBoxPresenter::GetReturnValue(void) const +{ + return (int) __msgboxResult; +} + +void +_MessageBoxPresenter::InitializeAccessibilityElement(void) +{ + result r = E_SUCCESS; + + _AccessibilityContainer* pContainer = null; + + pContainer = __pMessageBox->GetAccessibilityContainer(); + + if (pContainer == null) + { + return ; + } + + if (__pLabel != null) + { + _AccessibilityContainer* pLabelContainer = __pLabel->GetAccessibilityContainer(); + if (pLabelContainer != null) + { + _AccessibilityElement* pLabelElement = pLabelContainer->GetChildElement(L"LabelText"); + if (pLabelElement != null) + { + pLabelElement->SetName(L"MessageBoxText"); + pLabelElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_TEXT_IN_BODY_OF_POP_UP_T_TALKBACK"); + } + + // Add Container + pContainer->AddChildContainer(*pLabelContainer); + } + } + + if (__pMessageBox->GetMsgBoxStyle() != MSGBOX_STYLE_NONE) + { + for (int i = 0; i < __buttonNum; i++) + { + _ControlImpl* pImpl = null; + _Button* pButtonCore = null; + + pImpl = _ControlImpl::GetInstance(*__pButtons[i]); + + pButtonCore = dynamic_cast<_Button*>(&pImpl->GetCore()); + r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, pButtonCore != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + _AccessibilityContainer* pButtonContainer = pButtonCore->GetAccessibilityContainer(); + if (pButtonContainer != null) + { + _AccessibilityElement* pButtonElement = pButtonContainer->GetChildElement(L"ButtonText"); + if (pButtonElement != null) + { + String numberString = null; + numberString = Integer::ToString(i + 1); + + String buttonName = L"MessageBoxButton"; + buttonName.Append(numberString); + + pButtonElement->SetName(buttonName); + } + + // Add Container + pContainer->AddChildContainer(*pButtonContainer); + } + } + } + else + { + _AccessibilityElement* pElementMessageBox = new (std::nothrow) _AccessibilityElement(true); + SysTryReturnVoidResult(NID_UI_CTRL, pElementMessageBox != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + pElementMessageBox->SetSupportOperatingGesture(false); + pElementMessageBox->SetName(L"MessageBox"); + 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); + } +} + +_Popup* +_MessageBoxPresenter::GetCore(void) +{ + return static_cast <_Popup*>(__pMessageBox); +} + +bool +_MessageBoxPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + FloatPoint point = touchinfo.GetCurrentPosition(); + + FloatRectangle rect(0.0f, 0.0f, __pMessageBox->GetBoundsF().width, __pMessageBox->GetBoundsF().height); + + // Touch-event's starting point is MessageBox's leftTop + if (rect.Contains(point) == false) + { + __touchOutBounds = true; + } + else + { + __touchOutBounds = false; + } + + __touchPressFlag = true; + + if ((__pScroll != null) && (__textBounds.Contains(point) == true)) + { + __pScroll->SetScrollVisibility(true); + + __scrollStart = true; + } + + return true; +} + +bool +_MessageBoxPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + if (__touchOutBounds == true) + { + if (__pMessageBox->GetMsgBoxStyle() == MSGBOX_STYLE_NONE) + { + if (__beginModal == true) + { + SetReturnValue(MSGBOX_RESULT_CLOSE); + _ModalLoopManager::GetInstance()->EndMainLoop(MSGBOX_RESULT_CLOSE, false); + __beginModal = false; + } + } + } + + if (__touchPressFlag == false) + { + __prevPositionY = -1.0f; + + __scrollStart = false; + } + + if (__pScroll != null) + { + __pScroll->SetScrollVisibility(false); + } + + return true; +} + + +bool +_MessageBoxPresenter::OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + if (__pMessageBox->GetMsgBoxStyle() == MSGBOX_STYLE_NONE) + { + if (__beginModal == true) + { + SetReturnValue(MSGBOX_RESULT_CLOSE); + _ModalLoopManager::GetInstance()->EndMainLoop(MSGBOX_RESULT_CLOSE, false); + __beginModal = false; + } + } + + return true; +} + +bool +_MessageBoxPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + __touchOutBounds = false; + + if ((__pScroll != null) && (__scrollStart == true)) + { + float scrollAmountView = 0.0f; + float scrollAmountData = 0.0f; + float currentPosition = touchinfo.GetCurrentPosition().y; + + // TextObject + if (_FloatCompare(__prevPositionY, -1.0f)) + { + __prevPositionY = currentPosition; + } + + float distance = __prevPositionY - currentPosition; + + float newFirstDspY = __pBodyTextObject->GetFirstDisplayPositionYF(); + newFirstDspY += distance; + + if (newFirstDspY < 0.0f) + { + newFirstDspY = 0.0f; + } + + if (newFirstDspY > __textBounds.height) + { + newFirstDspY = __textBounds.height; + } + + int moveLine = __pBodyTextObject->GetLineIndexAtPositionY(newFirstDspY); + + __pBodyTextObject->SetFirstDisplayLineIndex(moveLine); + __pBodyTextObject->SetFirstDisplayPositionY(newFirstDspY); + + // _Scroll + __pScroll->GetScrollRange(&scrollAmountView, &scrollAmountData); + __scrollPos += distance; + + if (__scrollPos < 0.0f) + { + __scrollPos = 0.0f; + } + else if (__scrollPos > scrollAmountView) + { + __scrollPos = scrollAmountView; + } + + __pScroll->SetScrollPosition(__scrollPos); + + __prevPositionY = currentPosition; + + __touchPressFlag = false; + + Draw(); + __pMessageBox->Show(); + } + + return true; + +} + +bool +_MessageBoxPresenter::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) +{ + _KeyCode keyCode = keyInfo.GetKeyCode(); + + if (keyCode == _KEY_ESC || keyCode == _KEY_BACK) + { + MessageBoxStyle style = __pMessageBox->GetMsgBoxStyle(); + + if ((__pButtonListener != null) && (__pButtonListener->GetBeginModal() == true)) + { + switch (style) + { + case MSGBOX_STYLE_CANCEL: + // fall through + case MSGBOX_STYLE_OKCANCEL: + // fall through + case MSGBOX_STYLE_YESNOCANCEL: + // fall through + case MSGBOX_STYLE_CANCELTRYCONTINUE: + // fall through + case MSGBOX_STYLE_RETRYCANCEL: + _ModalLoopManager::GetInstance()->EndMainLoop(MSGBOX_BUTTON_CANCEL, false); + __pButtonListener->SetBeginModal(false); + break; + default: + break; + } + } + return true; + } + return false; +} + +//////////////////////////////////////////////////////////////////////// +///////////////////////////MsgBoxButtonListener///////////////////////// +//////////////////////////////////////////////////////////////////////// + +_MessageBoxPresenter::_MessageBoxButtonListener::_MessageBoxButtonListener(void) + : __buttonHandle() + , __buttonPressFlag(false) + , __buttonReleaseState(false) + , __beginModal(false) + , __point(0.0f, 0.0f) +{ + // empty statement +} + +_MessageBoxPresenter::_MessageBoxButtonListener::~_MessageBoxButtonListener(void) +{ + // empty statement +} + +_ControlHandle +_MessageBoxPresenter::_MessageBoxButtonListener::GetClickedButtonHandle(void) const +{ + return __buttonHandle; +} + +bool +_MessageBoxPresenter::_MessageBoxButtonListener::IsButtonClicked(void) +{ + return __buttonReleaseState; +} + +void +_MessageBoxPresenter::_MessageBoxButtonListener::OnTouchPressed(const Control& source, const Point& currentPosition, + const TouchEventInfo& touchInfo) +{ + __buttonPressFlag = true; + __buttonReleaseState = false; + + FloatPoint point = touchInfo.GetCurrentPositionF(); + __point = point; +} + +void +_MessageBoxPresenter::_MessageBoxButtonListener::OnTouchMoved(const Control& source, const Point& currentPosition, + const TouchEventInfo& touchInfo) +{ + //FloatPoint point = touchInfo.GetCurrentPositionF(); + + __buttonPressFlag = false; +} + +void +_MessageBoxPresenter::_MessageBoxButtonListener::OnTouchReleased(const Control& source, const Point& currentPosition, + const TouchEventInfo& touchInfo) +{ + if (__buttonPressFlag == true) + { + __buttonHandle = _ControlImpl::GetInstance(source)->GetCore().GetHandle(); + SysTryReturnVoidResult(NID_UI_CTRL, __buttonHandle.IsValid() == true, E_SYSTEM, "[E_SYSTEM] Button's Handle is invalid"); + + __buttonPressFlag = false; + __buttonReleaseState = true; + + if (__beginModal == true) + { + _ModalLoopManager::GetInstance()->EndMainLoop(MSGBOX_BUTTON_CLICKED, false); + __beginModal = false; + } + + return; + } +} + +void +_MessageBoxPresenter::_MessageBoxButtonListener::OnKeyReleased(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode) +{ + const _ControlImpl* pImpl = null; + const _Button* pControl = null; + + pImpl = _ControlImpl::GetInstance(source); + pControl = dynamic_cast(&pImpl->GetCore()); + + if (!pControl->IsFocusModeStateEnabled()) + { + return; + } + + if (pControl != null) + { + if (keyCode == KEY_ENTER) + { + __buttonHandle = _ControlImpl::GetInstance(source)->GetCore().GetHandle(); + SysTryReturnVoidResult(NID_UI_CTRL, __buttonHandle.IsValid() == true, E_SYSTEM, "[E_SYSTEM] Button's Handle is invalid"); + + __buttonPressFlag = false; + __buttonReleaseState = true; + + if (__beginModal == true) + { + _ModalLoopManager::GetInstance()->EndMainLoop(MSGBOX_BUTTON_CLICKED, false); + __beginModal = false; + } + } + } + + return; +} + +void +_MessageBoxPresenter::_MessageBoxButtonListener::OnKeyPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode) +{ + const _ControlImpl* pImpl = null; + const _Button* pControl = null; + + pImpl = _ControlImpl::GetInstance(source); + pControl = dynamic_cast(&pImpl->GetCore()); + + if (pControl != null) + { + _Button* pFocusControl = null; + switch (keyCode) + { + case KEY_RIGHT: + pFocusControl = dynamic_cast<_Button*>(pControl->GetNextFocus()); + break; + + case KEY_LEFT: + pFocusControl = dynamic_cast<_Button*>(pControl->GetPreviousFocus()); + break; + + default : + break; + } + + _Window* pTop = pControl->GetRootWindow(); + + if (pFocusControl != null) + { + pTop->SetFocusTraversalControl(pFocusControl, true); + _Control* pParentControl = pFocusControl->GetParent(); + + if (pParentControl != null) + { + pParentControl->OnChildControlFocusMoved(*pFocusControl); + } + + pFocusControl->SetFocused(); + pFocusControl->DrawFocus(); + } + } + + return ; +} + +void +_MessageBoxPresenter::_MessageBoxButtonListener::SetBeginModal(bool beginModal) +{ + __beginModal = beginModal; +} + +bool +_MessageBoxPresenter::_MessageBoxButtonListener::GetBeginModal(void) +{ + return __beginModal; +} + +}}} // Tizen::Ui::Controls + diff --git a/src/ui/controls/FUiCtrl_OptionMenu.cpp b/src/ui/controls/FUiCtrl_OptionMenu.cpp new file mode 100644 index 0000000..54fc725 --- /dev/null +++ b/src/ui/controls/FUiCtrl_OptionMenu.cpp @@ -0,0 +1,1811 @@ +// +// 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_OptionMenu.cpp + * @brief This is the implementation file for the _OptionMenu class. + */ + +#include +#include +#include + +#include +#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" +#include "FUi_AccessibilityElement.h" +#include "FUiCtrl_ActionEvent.h" +#include "FUiCtrl_Form.h" +#include "FUiCtrl_Frame.h" +#include "FUiCtrl_OptionMenu.h" +#include "FUiCtrl_Scroll.h" +#include "FUiCtrl_ContextMenu.h" +#include "FUiCtrl_OptionMenuItem.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; + +namespace { +static const float TOUCH_PRESS_THRESHOLD_INSENSITIVE = 0.16f; +} + +namespace Tizen { namespace Ui { namespace Controls +{ + +IMPLEMENT_PROPERTY(_OptionMenu); + +_OptionMenu::_OptionMenu(void) + : __pOptionMenuPresenter(null) + , __showItemCount(0) + , __isAttachedToMainTree(false) + , __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)) + , __pActionEvent(null) + , __pBackgroundNormalBitmap(null) + , __pBackgroundEffectBitmap(null) + , __layout(_CONTROL_ORIENTATION_PORTRAIT) + , __rotation(_CONTROL_ROTATION_0) + , __pScrollPanel(null) + , __pSubMenu(null) + , __pCurrentFrame(null) + , __subMenuIndex(-1) +{ + __backgroundColor = Color(255, 255, 255, 255); + + __textColor[OPTION_MENU_CORE_ITEM_STATUS_NORMAL] = Color(255, 255, 255, 255); + __textColor[OPTION_MENU_CORE_ITEM_STATUS_PRESSED] = Color(255, 255, 255, 255); + __textColor[OPTION_MENU_CORE_ITEM_STATUS_HIGHLIGHTED] = Color(255, 255, 255, 255); + + __itemColor[OPTION_MENU_CORE_ITEM_STATUS_NORMAL] = Color(255, 255, 255, 255); + __itemColor[OPTION_MENU_CORE_ITEM_STATUS_PRESSED] = Color(255, 255, 255, 255); + __itemColor[OPTION_MENU_CORE_ITEM_STATUS_HIGHLIGHTED] = Color(255, 255, 255, 255); +} + +_OptionMenu::~_OptionMenu(void) +{ + if (__isAttachedToMainTree && GetOwner() != null) + { + GetOwner()->UnlockInputEvent(); + } + + if (GetVisualElement()) + { + GetVisualElement()->RemoveAllAnimations(); + } + + __pCurrentFrame = null; + + if (__pScrollPanel != null) + { + __pScrollPanel->DetachAllChildren(); + DetachChild(*__pScrollPanel); + delete __pScrollPanel; + __pScrollPanel = null; + } + + if (__pSubMenu != null) + { + __pSubMenu->Close(); + delete __pSubMenu; + __pSubMenu = null; + } + + delete __pOptionMenuPresenter; + __pOptionMenuPresenter = null; + + delete __pBackgroundNormalBitmap; + __pBackgroundNormalBitmap = null; + + delete __pBackgroundEffectBitmap; + __pBackgroundEffectBitmap = null; + + delete __pActionEvent; + __pActionEvent = null; + + delete __pBoundsTimingFunction; + __pBoundsTimingFunction = null; + + delete __pOpacityTimingFunction; + __pOpacityTimingFunction= null; + + __actionId.RemoveAll(); + + RemoveAllAccessibilityElement(); +} + +_OptionMenu* +_OptionMenu::CreateOptionMenuN(void) +{ + result r = E_SUCCESS; + float minWidth = 0.0f; + float minHeight = 0.0f; + _OptionMenu* pOptionMenu = null; + _ScrollPanel* pScrollPanel = null; + _Scroll* pScroll = null; + + GET_SHAPE_CONFIG(OPTIONMENU::LIST_MIN_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, minWidth); + 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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + r = pOptionMenu->CreateRootVisualElement(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pOptionMenu->SetFocusable(true); + + r = pOptionMenu->Initialize(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to Initialize.", GetErrorMessage(r)); + + r = pOptionMenu->Install(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to Install.", GetErrorMessage(r)); + + pOptionMenu->AcquireHandle(); + pOptionMenu->SetTouchPressThreshold(TOUCH_PRESS_THRESHOLD_INSENSITIVE); + + pOptionMenu->SetMovable(false); + pOptionMenu->SetResizable(false); + + if (pOptionMenu->GetAccessibilityContainer() != null) + { + pOptionMenu->GetAccessibilityContainer()->Activate(true); + pOptionMenu->GetAccessibilityContainer()->AddListener(*pOptionMenu); + } + + pScrollPanel = _ScrollPanel::CreateScrollPanelN(FloatRectangle(0.0f, 0.0f, minWidth, minHeight), SCROLL_PANEL_SCROLL_DIRECTION_VERTICAL, false, false); + pScrollPanel->SetTouchPressThreshold(TOUCH_PRESS_THRESHOLD_INSENSITIVE); + + pScroll = pScrollPanel->GetScrollBar(); + SysTryCatch(NID_UI_CTRL, pScroll, , E_INVALID_STATE, "[%s] _Scroll is not constructed", GetErrorMessage(E_INVALID_STATE)); + pScroll->SetContextMenuScrollType(true); + + pOptionMenu->AttachChild(*(pScrollPanel)); + + pOptionMenu->__pScrollPanel = pScrollPanel; + + return pOptionMenu; + +CATCH: + delete pOptionMenu; + delete pScrollPanel; + + return null; +} + +_ScrollPanel* +_OptionMenu::GetScrollPanel(void) +{ + return __pScrollPanel; +} + +bool +_OptionMenu::OnFocusGained(const _Control &source) +{ + __currentFocusedIndex = 0; + __isFocused = false; + + return true; +} + +bool +_OptionMenu::OnFocusLost(const _Control &source) +{ + __pOptionMenuPresenter->ClearFocus(); + __isFocused = false; + + return true; +} + +void +_OptionMenu::OnDrawFocus(void) +{ + if (!__isFocused) + { + GetScrollPanel()->ScrollToTop(); + __isFocused = true; + __currentFocusedIndex = 0; + __pOptionMenuPresenter->DrawFocus(__currentFocusedIndex); + } + + return; +} + +void +_OptionMenu::ResetFocus(void) +{ + __isFocused = false; + __pOptionMenuPresenter->ClearFocus(); + return; +} + +bool +_OptionMenu::OnKeyPressed(const _Control &source, const _KeyInfo &keyInfo) +{ + _KeyCode keyCode = keyInfo.GetKeyCode(); + + if (!__isFocused) + { + if (keyCode == _KEY_TAB || keyCode == _KEY_UP || keyCode == _KEY_DOWN) + { + __isFocused = true; + __currentFocusedIndex = 0; + __pOptionMenuPresenter->DrawFocus(__currentFocusedIndex); + __pScrollPanel->ScrollToTop(); + } + return true; + } + + int height = 0; + int dividerHeight = 0; + int count = GetMaximumVisibleItemsCount(); + int totalItemCount = GetItemCount(); + + GET_SHAPE_CONFIG(OPTIONMENU::ITEM_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, height); + GET_SHAPE_CONFIG(OPTIONMENU::LIST_DIVIDER_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, dividerHeight); + + switch (keyCode) + { + case _KEY_DOWN: + if (__currentFocusedIndex < totalItemCount - 1) + { + if (__currentFocusedIndex < count - 1) + { + __currentFocusedIndex++; + } + else + { + int pos = GetScrollPanel()->GetScrollPosition(); + GetScrollPanel()->SetScrollPosition(pos + height + 2 * dividerHeight); + __currentFocusedIndex++; + } + } + else + { + __currentFocusedIndex = totalItemCount - 1; + } + break; + + case _KEY_UP: + if (__currentFocusedIndex > 0) + { + if (__currentFocusedIndex < count - 1) + { + __currentFocusedIndex--; + } + else + { + int pos = GetScrollPanel()->GetScrollPosition(); + GetScrollPanel()->SetScrollPosition(pos - height - 2 * dividerHeight); + __currentFocusedIndex--; + } + } + else + { + __currentFocusedIndex = 0; + } + break; + + default: + return true; + } + + __pOptionMenuPresenter->DrawFocus(__currentFocusedIndex); + + return true; +} + +bool +_OptionMenu::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) +{ + if (__isAnimating && GetVisualElement()) + { + GetVisualElement()->RemoveAllAnimations(); + } + + _KeyCode keyCode = keyInfo.GetKeyCode(); + + if (keyCode == _KEY_ENTER && __isFocused) + { + if (!__isAnimating) + { + __pOptionMenuPresenter->OnEnterKeyReleased(__currentFocusedIndex); + } + return true; + } + + if (keyCode == _KEY_ESC || keyCode == _KEY_BACK) + { + __isFocused = false; + __pOptionMenuPresenter->ClearFocus(); + CloseAnimation(-1); + return true; + } + + if (keyCode == _KEY_CONTEXT_MENU || keyCode == _KEY_MENU) + { + if (__isAttachedToMainTree) + { + CloseAnimation(-1); + } + else + { + + } + + return true; + } + + 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) +{ + result r = E_SUCCESS; + + // load bitmap of a background and arrow + r = LoadBitmap(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to load bitmap."); + + r = __actionId.Construct(); + 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, "Memory allocation failed."); + + SetPresenter(*pPresenter); + + r = pPresenter->Install(); + + return r; +} + +result +_OptionMenu::Initialize(void) +{ + result r = E_SUCCESS; + FloatDimension screen(0.0f, 0.0f); + Color backgroundColor(0, 0, 0, 0); + Color backgroundSelectedColor(0, 0, 0, 0); + Color itemTextColor(0, 0, 0, 0); + Color itemTextSelectedColor(0, 0, 0, 0); + + screen = _ControlManager::GetInstance()->GetScreenSizeF(); + + r = SetBounds(FloatRectangle(0.0f, 0.0f, screen.width, screen.height)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set option menu bounds."); + + SetMovable(false); + SetResizable(false); + + GET_COLOR_CONFIG(OPTIONMENU::ITEM_BG_NORMAL, backgroundColor); + GET_COLOR_CONFIG(OPTIONMENU::ITEM_BG_PRESSED, backgroundSelectedColor); + GET_COLOR_CONFIG(OPTIONMENU::ITEM_TEXT_NORMAL, itemTextColor); + GET_COLOR_CONFIG(OPTIONMENU::ITEM_TEXT_PRESSED, itemTextSelectedColor); + + __backgroundColor = backgroundColor; + __itemColor[OPTION_MENU_CORE_ITEM_STATUS_NORMAL] = backgroundColor; + __itemColor[OPTION_MENU_CORE_ITEM_STATUS_PRESSED] = backgroundSelectedColor; + __textColor[OPTION_MENU_CORE_ITEM_STATUS_NORMAL] = itemTextColor; + __textColor[OPTION_MENU_CORE_ITEM_STATUS_PRESSED] = itemTextSelectedColor; + + if (GetVisualElement() != null) + { + GetVisualElement()->SetSurfaceOpaque(false); + } + + return r; +} + +result +_OptionMenu::SetPresenter(const _OptionMenuPresenter& OptionMenuPresenter) +{ + __pOptionMenuPresenter = const_cast <_OptionMenuPresenter*>(&OptionMenuPresenter); + + return E_SUCCESS; +} + +void +_OptionMenu::OnDraw(void) +{ + __pOptionMenuPresenter->Draw(); + + if(unlikely((_AccessibilityManager::IsActivated()))) + { + _AccessibilityManager::GetInstance()->RequestAutoReading(_ACCESSIBILITY_AUTO_READING_MODE_FIRST_ITEM); + } + + return; +} + +result +_OptionMenu::OnAttachedToMainTree(void) +{ + result r = E_SUCCESS; + + __isAttachedToMainTree = true; + + _Control* pOwner = GetOwner(); + if (pOwner == null) + { + __pCurrentFrame = dynamic_cast<_Frame*>(_ControlManager::GetInstance()->GetCurrentFrame()); + SysTryReturnResult(NID_UI_CTRL, __pCurrentFrame != null, E_SYSTEM, "Current frame instance is not available."); + + _Form* pForm = __pCurrentFrame->GetCurrentForm(); + pForm != null ? SetOwner(pForm) : SetOwner(__pCurrentFrame); + + pOwner = GetOwner(); + } + else + { + pOwner->LockInputEvent(); + } + + if (__pCurrentFrame != null) + { + __pCurrentFrame->AddFrameEventListener(*this); + } + + __layout = pOwner->GetOrientation(); + + _Window* pOwnerWindow = pOwner->GetRootWindow(); + + if (pOwnerWindow != null) + { + int ownerRotation = GetEcoreEvasMgr()->GetEcoreEvas()->GetWindowRotation(*pOwnerWindow); + switch (ownerRotation) + { + case 0: + __rotation = _CONTROL_ROTATION_0; + break; + + case 90: + __rotation = _CONTROL_ROTATION_90; + break; + + case 180: + __rotation = _CONTROL_ROTATION_180; + break; + + case 270: + __rotation = _CONTROL_ROTATION_270; + break; + + default: + __rotation = _CONTROL_ROTATION_0; + break; + } + } + + __layout = GetOwner()->GetOrientation(); + + if (!__isMaxVisibleCountSet) + { + GET_SHAPE_CONFIG(OPTIONMENU::MAX_VISIBLE_ITEM_COUNT, __layout, __showItemCount); + } + + __pOptionMenuPresenter->CalculateItemMaximumWidth(); + + r = __pOptionMenuPresenter->CalculateWindowRect(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + GetEcoreEvasMgr()->GetEcoreEvas()->SetWindowBounds(*this, GetBoundsF()); + + OpenAnimation(); + + return _Window::OnAttachedToMainTree(); +} + +result +_OptionMenu::OnDetachingFromMainTree(void) +{ + ReleaseTouchCapture(); + + if (__pCurrentFrame != null) + { + __pCurrentFrame->RemoveFrameEventListener(*this); + } + + _Control* pOwner = GetOwner(); + if (pOwner != null) + { + pOwner->UnlockInputEvent(); + } + + __isAttachedToMainTree = false; + + __pScrollPanel->ScrollToTop(); + + return _Window::OnDetachingFromMainTree(); +} + +void +_OptionMenu::OnFrameDeactivated(const _Frame& source) +{ + DestroySubMenu(); + SetVisibleState(false); + return; +} + +void +_OptionMenu::OnFrameActivated(const _Frame& source) +{ + return; +} + +void +_OptionMenu::OnFrameMinimized(const _Frame& source) +{ + return; +} +void +_OptionMenu::OnFrameRestored(const _Frame& source) +{ + return; +} + +void +_OptionMenu::OnActivated(void) +{ + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + + if (pTouchManager != null) + { + pTouchManager->SetTouchCanceled(null); + } + + _Window::OnActivated(); + + SetTouchCapture(false, false); + + return; +} + +void +_OptionMenu::OnDeactivated(void) +{ + __pOptionMenuPresenter->ResetSelectedItem(); + return _Window::OnDeactivated(); +} + +result +_OptionMenu::AddItem(const String& text, int actionId, const Bitmap* pNormalBitmap, const Bitmap* pPressedBitmap, const Bitmap* pHighlightedBitmap) +{ + result r = E_SUCCESS; + + 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); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to add a item."); + + __actionId.Add(actionId); + + if (__isAttachedToMainTree) + { + __pOptionMenuPresenter->CalculateWindowRect(); + } + + return r; +} + +result +_OptionMenu::InsertItemAt(int mainIndex, const String& text, int actionId, const Bitmap* pNormalBitmap, const Bitmap* pPressedBitmap, const Bitmap* pHighlightedBitmap) +{ + result r = E_SUCCESS; + + 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); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to add a item."); + + __actionId.InsertAt(actionId, mainIndex); + + if (__isAttachedToMainTree) + { + __pOptionMenuPresenter->CalculateWindowRect(); + } + + return r; +} + +int +_OptionMenu::GetItemIndexFromActionId(int actionId) const +{ + return __pOptionMenuPresenter->GetItemIndexFromActionId(actionId); +} + +result +_OptionMenu::SetItemAt(int mainIndex, const String& text, int actionId, const Bitmap* pNormalBitmap, const Bitmap* pPressedBitmap, const Bitmap* pHighlightedBitmap) +{ + result r = E_SUCCESS; + + r = __pOptionMenuPresenter->SetItem(mainIndex, text, actionId, pNormalBitmap, pPressedBitmap, pHighlightedBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set a item."); + + __actionId.SetAt(actionId, mainIndex); + + if (__isAttachedToMainTree) + { + __pOptionMenuPresenter->CalculateWindowRect(); + } + + return r; +} + +result +_OptionMenu::AddSubItem(int mainIndex, const String& text, int actionId) +{ + result r = __pOptionMenuPresenter->AddSubItem(mainIndex, text, actionId); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); + + if (__pSubMenu != null && mainIndex == __subMenuIndex) + { + __pSubMenu->AddItem(text, actionId, null, null, null); + } + + return E_SUCCESS; +} + +result +_OptionMenu::InsertSubItemAt(int mainIndex, int subIndex, const String& text, int actionId) +{ + result r = __pOptionMenuPresenter->InsertSubItemAt(mainIndex, subIndex, text, actionId); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); + + if (__pSubMenu != null && mainIndex == __subMenuIndex) + { + __pSubMenu->InsertItem(subIndex, text, actionId, null, null, null); + } + + return E_SUCCESS; +} + +result +_OptionMenu::SetSubItemAt(int mainIndex, int subIndex, const String& text, int actionId) +{ + result r = __pOptionMenuPresenter->SetSubItemAt(mainIndex, subIndex, text, actionId); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); + + if (__pSubMenu != null && mainIndex == __subMenuIndex) + { + __pSubMenu->SetItem(subIndex, text, actionId, null, null, null); + } + + return E_SUCCESS; +} + +result +_OptionMenu::RemoveSubItemAt(int mainIndex, int subIndex) +{ + result r = __pOptionMenuPresenter->RemoveSubItemAt(mainIndex, subIndex); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); + + if (__pSubMenu != null && mainIndex == __subMenuIndex) + { + __pSubMenu->RemoveItemAt(subIndex); + } + + return E_SUCCESS; +} + +int +_OptionMenu::GetSubItemCount(int mainIndex) const +{ + return __pOptionMenuPresenter->GetSubItemCount(mainIndex); +} + +int +_OptionMenu::GetSubItemIndexFromActionId(int actionId) const +{ + return __pOptionMenuPresenter->GetSubItemIndexFromActionId(actionId); +} + +int +_OptionMenu::GetSubItemActionIdAt(int mainIndex, int subIndex) const +{ + return __pOptionMenuPresenter->GetSubItemActionIdAt(mainIndex, subIndex); +} + + +result +_OptionMenu::ShowSubMenu(int mainIndex, _OptionMenuItem& item) +{ + if (__pSubMenu != null) + { + DestroySubMenu(); + } + + float textSize = 0.0f; + float itemHeight = 0.0f; + + GET_SHAPE_CONFIG(OPTIONMENU::TEXT_SIZE, GetOrientation(), textSize); + GET_SHAPE_CONFIG(OPTIONMENU::LIST_ITEM_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, itemHeight); + + FloatRectangle itemBounds = item.GetBoundsF(); + itemBounds.height = itemHeight; + float scrollPosition = __pScrollPanel->GetScrollPosition(); + FloatPoint anchorPosition(0.0f, 0.0f); + ContextMenuCoreAlign alignment = CONTEXT_MENU_CORE_ALIGN_RIGHT; + + if (__rotation == _CONTROL_ROTATION_270 && __layout == _CONTROL_ORIENTATION_LANDSCAPE) + { + alignment = CONTEXT_MENU_CORE_ALIGN_LEFT; + } + else + { + alignment = CONTEXT_MENU_CORE_ALIGN_RIGHT; + } + + anchorPosition = FloatPoint(GetBoundsF().x + itemBounds.x + itemBounds.width / 2.0f, GetBoundsF().y + itemBounds.y + itemBounds.height / 2.0f - scrollPosition); + + __pSubMenu = _ContextMenu::CreateContextMenuN(anchorPosition, CONTEXT_MENU_CORE_STYLE_LIST, alignment); + + if (__pSubMenu == null) + { + return GetLastResult(); + } + + __pSubMenu->SetFocusable(true); + + if (__pSubMenu->GetOwner() == null) + { + _Frame* pFrame = dynamic_cast<_Frame*>(_ControlManager::GetInstance()->GetCurrentFrame()); + SysTryReturnResult(NID_UI_CTRL, pFrame != null, E_SYSTEM, "This instance is not constructed."); + + _Form* pForm = pFrame->GetCurrentForm(); + if (pForm != null) + { + __pSubMenu->SetOwner(pForm); + } + else + { + __pSubMenu->SetOwner(pFrame); + } + } + + __pSubMenu->Initialize(); + __pSubMenu->AddActionEventListener(*this); + + _OptionMenuItem* pSubItem = null; + int subItemCount = item.GetSubItemCount(); + for (int subIndex = 0; subIndex < subItemCount; subIndex++) + { + pSubItem = item.GetSubItem(subIndex); + if (pSubItem != null) + { + __pSubMenu->AddItem(pSubItem->GetText(), pSubItem->GetActionId(), null, null, null); + } + } + + __pSubMenu->Open(); + __subMenuIndex = mainIndex; + + return E_SUCCESS; +} + +bool +_OptionMenu::IsSubMenuShown(void) const +{ + return (__pSubMenu != null) && __pSubMenu->IsAttached(); +} + +result +_OptionMenu::DestroySubMenu(void) +{ + SysTryReturnResult(NID_UI_CTRL, __pSubMenu != null, E_SYSTEM, "A system error has occured. __pSubMenu is null."); + + __pSubMenu->Close(); + delete __pSubMenu; + __pSubMenu = null; + + __subMenuIndex = -1; + + return E_SUCCESS; +} + +result +_OptionMenu::InsertItem(int index, const String& text, int actionId, const Bitmap* pNormalBitmap, const Bitmap* pPressedBitmap, const Bitmap* pHighlightedBitmap) +{ + result r = E_SUCCESS; + + r = __pOptionMenuPresenter->InsertItem(index, text, actionId, pNormalBitmap, pPressedBitmap, pHighlightedBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to insert a item."); + + __actionId.InsertAt(actionId, index); + + if (__isAttachedToMainTree) + { + __pOptionMenuPresenter->CalculateWindowRect(); + } + + return r; +} + +result +_OptionMenu::SetItem(int index, const String& text, int actionId, const Bitmap* pNormalBitmap, const Bitmap* pPressedBitmap, const Bitmap* pHighlightedBitmap) +{ + result r = E_SUCCESS; + + r = __pOptionMenuPresenter->SetItem(index, text, actionId, pNormalBitmap, pPressedBitmap, pHighlightedBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set a item."); + + __actionId.SetAt(actionId, index); + + if (__isAttachedToMainTree) + { + __pOptionMenuPresenter->CalculateWindowRect(); + } + + return r; +} + +result +_OptionMenu::RemoveItemAt(int index) +{ + result r = E_SUCCESS; + + r = __pOptionMenuPresenter->DeleteItem(index); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to remove a item."); + + __actionId.RemoveAt(index); + + if (__isAttachedToMainTree) + { + __pOptionMenuPresenter->CalculateWindowRect(); + } + + return r; +} + +void +_OptionMenu::RemoveAllItems(void) +{ + result r = E_SUCCESS; + + r = __pOptionMenuPresenter->DeleteItemAll(); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Failed to remove all items.", GetErrorMessage(r)); + + __actionId.RemoveAll(); + + if (__isAttachedToMainTree) + { + __pOptionMenuPresenter->CalculateWindowRect(); + } + + SetLastResult(r); + return; +} + +int +_OptionMenu::GetItemCount(void) const +{ + return __actionId.GetCount(); +} + +int +_OptionMenu::GetItemIndexAt(int actionId) const +{ + int count = __actionId.GetCount(); + + for (int i = 0; i < count; i++) + { + int index = GetItemActionIdAt(i); + + if (actionId == index) + { + return i; + } + } + + return -1; +} + +int +_OptionMenu::GetItemActionIdAt(int index) const +{ + int count = __actionId.GetCount(); + int actionId = -1; + + if (count <= 0 || index >= count) + { + return -1; + } + + __actionId.GetAt(index, actionId); + + return actionId; +} + +result +_OptionMenu::SetWindowRect(const FloatRectangle& rect) +{ + __windowRect = rect; + + return E_SUCCESS; +} + +FloatRectangle +_OptionMenu::GetWindowRect(void) const +{ + return __windowRect; +} + +result +_OptionMenu::SetBodyRect(const FloatRectangle& rect) +{ + __bodyRect = rect; + + return E_SUCCESS; +} + +FloatRectangle +_OptionMenu::GetBodyRect(void) const +{ + return __bodyRect; +} + +result +_OptionMenu::SetItemRect(const FloatRectangle& rect) +{ + __itemRect = rect; + + return E_SUCCESS; +} + +FloatRectangle +_OptionMenu::GetItemRect(void) const +{ + return __itemRect; +} + +result +_OptionMenu::SetPropertyMaxVisibleItemsCount(const Variant& count) +{ + int showCount = count.ToInt(); + + SysTryReturnResult(NID_UI_CTRL, showCount > 0, E_INVALID_ARG, "Invalid argument is used. Count is invalid."); + + __showItemCount = showCount; + + return E_SUCCESS; +} + +Variant +_OptionMenu::GetPropertyMaxVisibleItemsCount(void) const +{ + return Variant(__showItemCount); +} + +int +_OptionMenu::GetMaximumVisibleItemsCount(void) const +{ + Variant count = GetProperty("maxVisibleItemsCount"); + + return count.ToInt(); +} + +result +_OptionMenu::SetShowItemCount(int count) +{ + result r; + + r = SetProperty("maxVisibleItemsCount", Variant(count)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set property."); + + if (__isAttachedToMainTree) + { + __pOptionMenuPresenter->CalculateWindowRect(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "Failed to calculate window."); + } + + return E_SUCCESS; +} + +result +_OptionMenu::SetPropertyColor(const Variant& color) +{ + __backgroundColor = color.ToColor(); + + result r = LoadColorReplacedBitmap(__backgroundColor); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "A system error has occurred. Failed to load the color replacement bitmap."); + + return E_SUCCESS; +} + +Variant +_OptionMenu::GetPropertyColor(void) const +{ + return Variant(__backgroundColor); +} + +result +_OptionMenu::SetColor(const Graphics::Color& color) +{ + return SetProperty("color", Variant(color)); +} + +Color +_OptionMenu::GetColor(void) const +{ + Variant color = GetProperty("color"); + + return color.ToColor(); +} + +result +_OptionMenu::SetMaxVisibleItemsCount(int maxItemsCount) +{ + result r = SetPropertyMaxVisibleItemsCount(maxItemsCount); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + __isMaxVisibleCountSet = true; + + if (__isAttachedToMainTree) + { + __pOptionMenuPresenter->CalculateWindowRect(); + } + + return E_SUCCESS; +} + +result +_OptionMenu::SetPropertyNormalItemColor(const Variant& color) +{ + __itemColor[OPTION_MENU_CORE_ITEM_STATUS_NORMAL] = color.ToColor(); + + return __pOptionMenuPresenter->ApplyColorProperty(); +} + +Variant +_OptionMenu::GetPropertyNormalItemColor(void) const +{ + return Variant(__itemColor[OPTION_MENU_CORE_ITEM_STATUS_NORMAL]); +} + +result +_OptionMenu::SetPropertyPressedItemColor(const Variant& color) +{ + __itemColor[OPTION_MENU_CORE_ITEM_STATUS_PRESSED] = color.ToColor(); + + return __pOptionMenuPresenter->ApplyColorProperty(); +} + +Variant +_OptionMenu::GetPropertyPressedItemColor(void) const +{ + return Variant(__itemColor[OPTION_MENU_CORE_ITEM_STATUS_PRESSED]); +} + +result +_OptionMenu::SetPropertyHighlightedItemColor(const Variant & color) +{ + __itemColor[OPTION_MENU_CORE_ITEM_STATUS_HIGHLIGHTED] = color.ToColor(); + + return __pOptionMenuPresenter->ApplyColorProperty(); +} + +Variant +_OptionMenu::GetPropertyHighlightedItemColor(void) const +{ + return Variant(__itemColor[OPTION_MENU_CORE_ITEM_STATUS_HIGHLIGHTED]); +} + +result +_OptionMenu::SetItemColor(enum OptionMenuCoreItemStatus status, const Graphics::Color& color) +{ + result r = E_SUCCESS; + + if (status == OPTION_MENU_CORE_ITEM_STATUS_NORMAL) + { + r = SetProperty("normalItemColor", Variant(color)); + } + else if (status == OPTION_MENU_CORE_ITEM_STATUS_PRESSED) + { + r = SetProperty("pressedItemColor", Variant(color)); + } + else + { + r = SetProperty("highlightedItemColor", Variant(color)); + } + + return r; +} + +Color +_OptionMenu::GetItemColor(enum OptionMenuCoreItemStatus status) const +{ + Color itemColor; + + if (status == OPTION_MENU_CORE_ITEM_STATUS_NORMAL) + { + Variant color = GetProperty("normalItemColor"); + itemColor = color.ToColor(); + + } + else if (status == OPTION_MENU_CORE_ITEM_STATUS_PRESSED) + { + Variant color = GetProperty("pressedItemColor"); + itemColor = color.ToColor(); + + } + else + { + Variant color = GetProperty("highlightedItemColor"); + itemColor = color.ToColor(); + } + + return itemColor; +} + +result +_OptionMenu::SetPropertyNormalItemTextColor(const Variant& color) +{ + __textColor[OPTION_MENU_CORE_ITEM_STATUS_NORMAL] = color.ToColor(); + + return __pOptionMenuPresenter->ApplyColorProperty(); +} + +Variant +_OptionMenu::GetPropertyNormalItemTextColor(void) const +{ + return Variant(__textColor[OPTION_MENU_CORE_ITEM_STATUS_NORMAL]); +} + +result +_OptionMenu::SetPropertyPressedItemTextColor(const Variant& color) +{ + __textColor[OPTION_MENU_CORE_ITEM_STATUS_PRESSED] = color.ToColor(); + + return __pOptionMenuPresenter->ApplyColorProperty(); +} + +Variant +_OptionMenu::GetPropertyPressedItemTextColor(void) const +{ + return Variant(__textColor[OPTION_MENU_CORE_ITEM_STATUS_PRESSED]); +} + +result +_OptionMenu::SetPropertyHighlightedItemTextColor(const Variant & color) +{ + __textColor[OPTION_MENU_CORE_ITEM_STATUS_HIGHLIGHTED] = color.ToColor(); + + return __pOptionMenuPresenter->ApplyColorProperty(); +} + +Variant +_OptionMenu::GetPropertyHighlightedItemTextColor(void) const +{ + return Variant(__textColor[OPTION_MENU_CORE_ITEM_STATUS_HIGHLIGHTED]); +} + +result +_OptionMenu::SetTextColor(enum OptionMenuCoreItemStatus status, const Graphics::Color& color) +{ + result r = E_SUCCESS; + + if (status == OPTION_MENU_CORE_ITEM_STATUS_NORMAL) + { + r = SetProperty("normalItemTextColor", Variant(color)); + } + else if (status == OPTION_MENU_CORE_ITEM_STATUS_PRESSED) + { + r = SetProperty("pressedItemTextColor", Variant(color)); + } + else + { + r = SetProperty("highlightedItemTextColor", Variant(color)); + } + + return r; +} + +Color +_OptionMenu::GetTextColor(enum OptionMenuCoreItemStatus status) const +{ + Color textColor; + + if (status == OPTION_MENU_CORE_ITEM_STATUS_NORMAL) + { + Variant color = GetProperty("normalItemTextColor"); + textColor = color.ToColor(); + + } + else if (status == OPTION_MENU_CORE_ITEM_STATUS_PRESSED) + { + Variant color = GetProperty("pressedItemTextColor"); + textColor = color.ToColor(); + + } + else + { + Variant color = GetProperty("highlightedItemTextColor"); + textColor = color.ToColor(); + } + + return textColor; +} + +result +_OptionMenu::AddActionEventListener(const _IActionEventListener& listener) +{ + result r = E_SUCCESS; + + if (__pActionEvent == null) + { + __pActionEvent = _ActionEvent::CreateInstanceN(*this); + SysTryReturnResult(NID_UI_CTRL, __pActionEvent != null, GetLastResult(), "Propagating."); + + r = __pActionEvent->AddListener(listener); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to remove action event listener."); + } + + return r; + +CATCH: + delete __pActionEvent; + __pActionEvent = null; + return r; +} + +result +_OptionMenu::RemoveActionEventListener(const _IActionEventListener& listener) +{ + SysTryReturnResult(NID_UI_CTRL, __pActionEvent != null, E_INVALID_STATE, + "The action event instance isn't constructed."); + + result r = E_SUCCESS; + + r = __pActionEvent->RemoveListener(listener); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to remove action event listener"); + + return r; +} + +result +_OptionMenu::FireActionEvent(int actionId) +{ + IEventArg* pArg = _ActionEvent::CreateActionEventArgN(actionId); + result r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, (pArg != null), r, "Propagating."); + + r = __pActionEvent->Fire(*pArg); + + return r; +} + +_ActionEvent* +_OptionMenu::GetActionEvent(void) const +{ + return __pActionEvent; +} + +result +_OptionMenu::LoadBitmap(void) +{ + result r = E_SUCCESS; + Color backgroundColor; + + r = GET_BITMAP_CONFIG_N(OPTIONMENU::BG_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pBackgroundEffectBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap."); + + backgroundColor = GetColor(); + + r = LoadColorReplacedBitmap(backgroundColor); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Failed to load bitmap."); + + return r; + +CATCH: + delete __pBackgroundEffectBitmap; + __pBackgroundEffectBitmap = null; + + return r; +} + +result +_OptionMenu::LoadColorReplacedBitmap(const Color& color) +{ + result r = E_SUCCESS; + + // Delete old bitmap + if (__pBackgroundNormalBitmap != null) + { + 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; +} + +const Bitmap* +_OptionMenu::GetBackgroundNormalBitmap(void) const +{ + return __pBackgroundNormalBitmap; +} + +const Bitmap* +_OptionMenu::GetBackgroundEffectBitmap(void) const +{ + return __pBackgroundEffectBitmap; +} + +_UiTouchEventDelivery +_OptionMenu::OnPreviewTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + 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); +} + +_UiTouchEventDelivery +_OptionMenu::OnPreviewTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pOptionMenuPresenter->OnPreviewTouchMoved(source, touchinfo); +} + +bool +_OptionMenu::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pOptionMenuPresenter->OnTouchMoved(source, touchinfo); +} + +_UiTouchEventDelivery +_OptionMenu::OnPreviewTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pOptionMenuPresenter->OnPreviewTouchReleased(source, touchinfo); +} + +bool +_OptionMenu::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + if (__isAnimating && GetVisualElement()) + { + GetVisualElement()->RemoveAllAnimations(); + return true; + } + + return __pOptionMenuPresenter->OnTouchReleased(source, touchinfo); +} + +bool +_OptionMenu::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + __pOptionMenuPresenter->OnTouchCanceled(source, touchinfo); + + SetVisibleState(false); + + return true; +} + +void +_OptionMenu::OnActionPerformed(const _Control& source, int actionId) +{ + __pOptionMenuPresenter->OnActionPerformed(source, actionId); +} + +void +_OptionMenu::OnFontChanged(Font* pFont) +{ + return __pOptionMenuPresenter->OnFontChanged(pFont); +} + +void +_OptionMenu::OnFontInfoRequested(unsigned long& style, float& size) +{ + return __pOptionMenuPresenter->OnFontInfoRequested(style, size); +} + +void +_OptionMenu::OnChangeLayout(_ControlRotation rotation) +{ + __layout = GetOwner()->GetOrientation(); + + if (!__isMaxVisibleCountSet) + { + GET_SHAPE_CONFIG(OPTIONMENU::MAX_VISIBLE_ITEM_COUNT, __layout, __showItemCount); + } + + if (__isAttachedToMainTree) + { + if(__rotation != rotation) + { + SetVisibleState(false); + } + } + + __rotation = rotation; + + __pOptionMenuPresenter->ResetSelectedItem(); +} + +void +_OptionMenu::OnOwnerChanged(_Control* pOldOwner) +{ + if (!__isAttachedToMainTree) + { + return; + } + + _Control* pOwner = GetOwner(); + + if (pOldOwner != null) + { + pOldOwner->UnlockInputEvent(); + } + + if (pOwner != null) + { + pOwner->LockInputEvent(); + } +} + +_AccessibilityElement* +_OptionMenu::GetAccessibilityElement(const int mainIndex) const +{ + _AccessibilityElement* pElement = null; + result r = __accessibilityElements.GetAt(mainIndex, pElement); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed at AccessibilityElement.", GetErrorMessage(r)); + + return pElement; + +CATCH: + delete pElement; + + return null; +} + +void +_OptionMenu::AddAccessibilityElement(const _AccessibilityElement& element) +{ + __accessibilityElements.Add(const_cast<_AccessibilityElement*>(&element)); +} + +void +_OptionMenu::SetAllAccessibilityElement(void) +{ + RemoveAllAccessibilityElement(); + __pOptionMenuPresenter->SetAllAccessibilityElement(); +} + +bool +_OptionMenu::OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_OptionMenu::OnAccessibilityFocusMovedPrevious(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_OptionMenu::OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_OptionMenu::OnAccessibilityReadingElement(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_OptionMenu::OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_OptionMenu::OnAccessibilityFocusOut(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_OptionMenu::OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + CloseAnimation(-1); + + return true; +} + +bool +_OptionMenu::OnAccessibilityValueIncreased(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_OptionMenu::OnAccessibilityValueDecreased(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +void +_OptionMenu::RemoveAllAccessibilityElement(void) +{ + _AccessibilityContainer* pAccessibilityContainer = GetAccessibilityContainer(); + if (pAccessibilityContainer != null && pAccessibilityContainer->IsActivated()) + { + pAccessibilityContainer->RemoveAllElement(); + } + + return; +} + +_OptionMenuItemInfo +_OptionMenu::GetItemFromPosition(const FloatPoint& position) const +{ + return __pOptionMenuPresenter->GetItemFromPosition(position); +} + +_OptionMenuItemInfo +_OptionMenu::FindItem(int index) const +{ + return __pOptionMenuPresenter->FindItem(index); +} + +result +_OptionMenu::SetTopDrawnItemIndex(int index) +{ + return __pOptionMenuPresenter->SetTopDrawnItemIndex(index); +} + +_ControlOrientation +_OptionMenu::GetLayout(void) const +{ + return __layout; +} + +_ControlRotation +_OptionMenu::GetRotation(void) const +{ + return __rotation; +} + +}}} // Tizen::Ui: Control diff --git a/src/ui/controls/FUiCtrl_OptionMenuImpl.cpp b/src/ui/controls/FUiCtrl_OptionMenuImpl.cpp new file mode 100644 index 0000000..e0fc21a --- /dev/null +++ b/src/ui/controls/FUiCtrl_OptionMenuImpl.cpp @@ -0,0 +1,462 @@ +// +// 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_OptionMenuImpl.cpp + * @brief This is the implementation file for the _OptionMenuImpl class. + */ + +#include +#include + +#include "FUi_ResourceManager.h" +#include "FUiCtrl_OptionMenuImpl.h" +#include "FUiCtrl_PublicActionEvent.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Ui; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_OptionMenuImpl* +_OptionMenuImpl::GetInstance(OptionMenu& optionMenu) +{ + return static_cast<_OptionMenuImpl*>(optionMenu._pControlImpl); +} + +const _OptionMenuImpl* +_OptionMenuImpl::GetInstance(const OptionMenu& optionMenu) +{ + return static_cast(optionMenu._pControlImpl); +} + +_OptionMenuImpl::_OptionMenuImpl(OptionMenu* pPublic, _OptionMenu* pCore) + : _WindowImpl(pPublic, pCore) + , __pPublicActionEvent(null) +{ +} + +_OptionMenuImpl* +_OptionMenuImpl::CreateOptionMenuImplN(OptionMenu& control) +{ + ClearLastResult(); + + _OptionMenu* pCore = _OptionMenu::CreateOptionMenuN(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, (pCore != null), null, r, "[%s] Propagating.", GetErrorMessage(r)); + + int itemMaxCount = 0; + GET_SHAPE_CONFIG(OPTIONMENU::ITEM_MAX_COUNT, _CONTROL_ORIENTATION_PORTRAIT, itemMaxCount); + pCore->SetShowItemCount(itemMaxCount); + + _OptionMenuImpl* pImpl = new (std::nothrow) _OptionMenuImpl(&control, pCore); + r = CheckConstruction(pCore, pImpl); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), null, r, "[%s] Propagating.", GetErrorMessage(r)); + + pImpl->__pPublicActionEvent = _PublicActionEvent::CreateInstanceN(control); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, (pImpl->__pPublicActionEvent != null), , r, + "[%s] Propagating.", GetErrorMessage(r)); + + r = pCore->AddActionEventListener(*pImpl); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + return pImpl; + +CATCH: + delete pImpl; + return null; +} + +_OptionMenuImpl::~_OptionMenuImpl(void) +{ + delete __pPublicActionEvent; + __pPublicActionEvent = null; +} + +result +_OptionMenuImpl::AddActionEventListener(IActionEventListener& listener) +{ + ClearLastResult(); + + return __pPublicActionEvent->AddListener(listener); +} + +result +_OptionMenuImpl::RemoveActionEventListener(IActionEventListener& listener) +{ + ClearLastResult(); + + return __pPublicActionEvent->RemoveListener(listener); +} + +result +_OptionMenuImpl::AddItem(const String& text, int actionId, const Bitmap* pNormalBitmap, + const Bitmap* pPressedBitmap, const Bitmap* pHighlightedBitmap) +{ + ClearLastResult(); + + return GetCore().AddItem(text, actionId, pNormalBitmap, pPressedBitmap, pHighlightedBitmap); +} + +result +_OptionMenuImpl::InsertItemAt(int mainIndex, const String& text, int actionId, const Bitmap* normalBitmap, + const Bitmap* pPressedBitmap, const Bitmap *pHighlightedBitmap) +{ + ClearLastResult(); + 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); +} + +result +_OptionMenuImpl::SetItemAt(int mainIndex, const String& text, int actionId, const Bitmap* normalBitmap, + const Bitmap* pPressedBitmap, const Bitmap *pHighlightedBitmap) +{ + ClearLastResult(); + 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); +} + +result +_OptionMenuImpl::RemoveItemAt(int mainIndex) +{ + ClearLastResult(); + 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); +} + +void +_OptionMenuImpl::RemoveAllItems(void) +{ + ClearLastResult(); + + GetCore().RemoveAllItems(); + + return; +} + +int +_OptionMenuImpl::GetItemCount(void) const +{ + ClearLastResult(); + + return GetCore().GetItemCount(); +} + +int +_OptionMenuImpl::GetItemIndexFromActionId(int actionId) const +{ + ClearLastResult(); + + return GetCore().GetItemIndexAt(actionId); +} + +int +_OptionMenuImpl::GetItemActionIdAt(int mainIndex) const +{ + ClearLastResult(); + SysTryReturn(NID_UI_CTRL, (mainIndex >= 0 && mainIndex < GetItemCount()), E_INVALID_ARG, E_INVALID_ARG, + "[%s] Invalid argument is used. The specified main index (%d) is invalid.", GetErrorMessage(E_INVALID_ARG), mainIndex); + + return GetCore().GetItemActionIdAt(mainIndex); +} + +result +_OptionMenuImpl::AddSubItem(int mainIndex, const String& text, int actionId) +{ + ClearLastResult(); + 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); +} + +result +_OptionMenuImpl::InsertSubItemAt(int mainIndex, int subIndex, const String& text, int actionId) +{ + ClearLastResult(); + 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); +} + +result +_OptionMenuImpl::SetSubItemAt(int mainIndex, int subIndex, const String& text, int actionId) +{ + ClearLastResult(); + 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); +} + +result +_OptionMenuImpl::RemoveSubItemAt(int mainIndex, int subIndex) +{ + ClearLastResult(); + 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); +} + +int +_OptionMenuImpl::GetSubItemCount(int mainIndex) const +{ + ClearLastResult(); + SysTryReturn(NID_UI_CTRL, (mainIndex >= 0), E_INVALID_ARG, E_INVALID_ARG, + "[%s] Invalid argument is used. The specified main index (%d) is negative.", GetErrorMessage(E_INVALID_ARG), mainIndex); + + return GetCore().GetSubItemCount(mainIndex); +} + +int +_OptionMenuImpl::GetSubItemIndexFromActionId(int actionId) const +{ + ClearLastResult(); + + return GetCore().GetSubItemIndexFromActionId(actionId); +} + +int +_OptionMenuImpl::GetSubItemActionIdAt(int mainIndex, int subIndex) const +{ + ClearLastResult(); + SysTryReturn(NID_UI_CTRL, (mainIndex >= 0), E_INVALID_ARG, E_INVALID_ARG, + "[%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, + "[%s] Invalid argument is used. The specified sub index (%d) is negative.", GetErrorMessage(E_INVALID_ARG), subIndex); + + return GetCore().GetSubItemActionIdAt(mainIndex, subIndex); +} + +result +_OptionMenuImpl::SetItemTextColor(OptionMenuItemStatus status, const Color& color) +{ + ClearLastResult(); + + result r = E_SUCCESS; + + switch (status) + { + case OPTION_MENU_ITEM_STATUS_NORMAL: + r = GetCore().SetTextColor(OPTION_MENU_CORE_ITEM_STATUS_NORMAL, color); + break; + + case OPTION_MENU_ITEM_STATUS_PRESSED: + r = GetCore().SetTextColor(OPTION_MENU_CORE_ITEM_STATUS_PRESSED, color); + break; + + case OPTION_MENU_ITEM_STATUS_HIGHLIGHTED: + r = GetCore().SetTextColor(OPTION_MENU_CORE_ITEM_STATUS_HIGHLIGHTED, color); + break; + + default: + SysLogException(NID_UI_CTRL, E_INVALID_ARG, "Invalid argument is used. OptionMenuItemStatus param is invalid."); + r = E_INVALID_ARG; + break; + } + + return r; +} + +Color +_OptionMenuImpl::GetItemTextColor(OptionMenuItemStatus status) const +{ + ClearLastResult(); + + Color color(0, 0, 0, 0); + + switch (status) + { + case OPTION_MENU_ITEM_STATUS_NORMAL: + color = GetCore().GetTextColor(OPTION_MENU_CORE_ITEM_STATUS_NORMAL); + break; + + case OPTION_MENU_ITEM_STATUS_PRESSED: + color = GetCore().GetTextColor(OPTION_MENU_CORE_ITEM_STATUS_PRESSED); + break; + + case OPTION_MENU_ITEM_STATUS_HIGHLIGHTED: + color = GetCore().GetTextColor(OPTION_MENU_CORE_ITEM_STATUS_HIGHLIGHTED); + break; + + default: + SysLogException(NID_UI_CTRL, E_SYSTEM, "Invalid argument is used. OptionMenuItemStatus param is invalid."); + break; + } + + return color; +} + +result +_OptionMenuImpl::SetItemColor(OptionMenuItemStatus status, const Color& color) +{ + ClearLastResult(); + + result r = E_SUCCESS; + + switch (status) + { + //The item color for OPTION_MENU_ITEM_STATUS_NORMAL is not supported. + //case OPTION_MENU_ITEM_STATUS_NORMAL: + + case OPTION_MENU_ITEM_STATUS_PRESSED: + r = GetCore().SetItemColor(OPTION_MENU_CORE_ITEM_STATUS_PRESSED, color); + break; + + case OPTION_MENU_ITEM_STATUS_HIGHLIGHTED: + r = GetCore().SetItemColor(OPTION_MENU_CORE_ITEM_STATUS_HIGHLIGHTED, color); + break; + + default: + SysLogException(NID_UI_CTRL, E_INVALID_ARG, "Invalid argument is used. OptionMenuItemStatus param is invalid."); + r = E_INVALID_ARG; + break; + } + + return r; +} + +Color +_OptionMenuImpl::GetItemColor(OptionMenuItemStatus status) const +{ + ClearLastResult(); + + Color color(0, 0, 0, 0); + + switch (status) + { + case OPTION_MENU_ITEM_STATUS_NORMAL: + color = GetCore().GetItemColor(OPTION_MENU_CORE_ITEM_STATUS_NORMAL); + break; + + case OPTION_MENU_ITEM_STATUS_PRESSED: + color = GetCore().GetItemColor(OPTION_MENU_CORE_ITEM_STATUS_PRESSED); + break; + + case OPTION_MENU_ITEM_STATUS_HIGHLIGHTED: + color = GetCore().GetItemColor(OPTION_MENU_CORE_ITEM_STATUS_HIGHLIGHTED); + break; + + default: + SysLogException(NID_UI_CTRL, E_SYSTEM, "Invalid argument is used. OptionMenuItemStatus parma is invalid."); + break; + } + + return color; +} + +result +_OptionMenuImpl::SetColor(const Color& color) +{ + ClearLastResult(); + + return GetCore().SetColor(color); +} + +Color +_OptionMenuImpl::GetColor(void) const +{ + ClearLastResult(); + + return GetCore().GetColor(); +} + +result +_OptionMenuImpl::SetMaxVisibleItemsCount(int maxItemsCount) +{ + ClearLastResult(); + + return GetCore().SetMaxVisibleItemsCount(maxItemsCount); +} + +int +_OptionMenuImpl::GetMaxVisibleItemsCount(void) const +{ + ClearLastResult(); + return GetCore().GetPropertyMaxVisibleItemsCount().ToInt(); +} + +result +_OptionMenuImpl::OnAttachedToMainTree(void) +{ + return _WindowImpl::OnAttachedToMainTree(); +} + +const char* +_OptionMenuImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Controls::OptionMenu"; +} + +const OptionMenu& +_OptionMenuImpl::GetPublic(void) const +{ + return static_cast (_ControlImpl::GetPublic()); +} + +OptionMenu& +_OptionMenuImpl::GetPublic(void) +{ + return static_cast (_ControlImpl::GetPublic()); +} + +const _OptionMenu& +_OptionMenuImpl::GetCore(void) const +{ + return static_cast (_ControlImpl::GetCore()); +} + +_OptionMenu& +_OptionMenuImpl::GetCore(void) +{ + return static_cast <_OptionMenu&>(_ControlImpl::GetCore()); +} + +void +_OptionMenuImpl::OnActionPerformed(const _Control& source, int actionId) +{ + if (__pPublicActionEvent != null) + { + IEventArg* pEventArg = _PublicActionEvent::CreateActionEventArgN(actionId); + if (pEventArg == null) + { + return; + } + + __pPublicActionEvent->Fire(*pEventArg); + } +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_OptionMenuItem.cpp b/src/ui/controls/FUiCtrl_OptionMenuItem.cpp new file mode 100644 index 0000000..38da96a --- /dev/null +++ b/src/ui/controls/FUiCtrl_OptionMenuItem.cpp @@ -0,0 +1,935 @@ +// +// 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_OptionMenuItem.cpp + * @brief This is the implementation file for the _OptionMenuItem class. + */ + +#include +#include +#include "FUi_AccessibilityContainer.h" +#include "FUi_AccessibilityElement.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_Math.h" +#include "FUi_ResourceManager.h" + +#include "FUiCtrl_ScrollPanel.h" +#include "FUiCtrl_OptionMenuItem.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; + +namespace { +static const float TOUCH_PRESS_THRESHOLD_INSENSITIVE = 0.16f; +} + +namespace Tizen { namespace Ui { namespace Controls +{ + +_OptionMenuItem::_OptionMenuItem(void) + : __type(OPTION_MENU_ITEM_DRAWING_TYPE_NONE) + , __actionId(-1) + , __upperDividerLine(false) + , __lowerDividerLine(false) + , __selected(false) + , __highlighted(false) + , __parentScrollEnable(false) + , __leftMargin(0.0f) + , __rightMargin(0.0f) + , __dividerHeight(0.0f) + , __bgPressedMargin(0.0f) + , __textLeftMargin(0.0f) + , __textRightMargin(0.0f) + , __textTopMargin(0.0f) + , __textBottomMargin(0.0f) + , __arrowLeftMargin(0.0f) + , __arrowRightMargin(0.0f) + , __arrowMargin(0.0f) + , __itemHeight(0.0f) + , __bgPressedLeftRightMargin(0.0f) + , __bgPressedTopBottomMargin(0.0f) + , __textSize(0.0f) + , __text(L"") + , __pNormalBgBitmap(null) + , __pSelectedBgBitmap(null) + , __pArrowBitmap(null) + , __pArrowPressedBitmap(null) + , __size(FloatDimension(0.0f, 0.0f)) + , __drawRect(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f)) + , __pBitmapLabel(null) + , __pTextLabel(null) + , __pUpperDividerLineLabel(null) + , __pBackgroundLabel(null) + , __pLowerDividerLineLabel(null) + , __pArrowLabel(null) + , __pSubItems(null) +{ + _ControlOrientation orientation = GetOrientation(); + + __pBitmap[OPTION_MENU_ITEM_DRAWING_STATUS_NORMAL] = null; + __pBitmap[OPTION_MENU_ITEM_DRAWING_STATUS_PRESSED] = null; + __pBitmap[OPTION_MENU_ITEM_DRAWING_STATUS_HIGHLIGHTED] = null; + + GET_SHAPE_CONFIG(OPTIONMENU::LIST_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __leftMargin); + GET_SHAPE_CONFIG(OPTIONMENU::LIST_RIGHT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __rightMargin); + GET_SHAPE_CONFIG(OPTIONMENU::LIST_DIVIDER_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, __dividerHeight); + GET_SHAPE_CONFIG(OPTIONMENU::ITEM_BG_PRESSED_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __bgPressedMargin); + GET_SHAPE_CONFIG(OPTIONMENU::ITEM_BG_PRESSED_LEFT_RIGHT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __bgPressedLeftRightMargin); + GET_SHAPE_CONFIG(OPTIONMENU::ITEM_BG_PRESSED_TOP_BOTTOM_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __bgPressedTopBottomMargin); + + GET_SHAPE_CONFIG(OPTIONMENU::TEXT_LEFT_MARGIN, orientation, __textLeftMargin); + GET_SHAPE_CONFIG(OPTIONMENU::TEXT_RIGHT_MARGIN, orientation, __textRightMargin); + GET_SHAPE_CONFIG(OPTIONMENU::TEXT_TOP_MARGIN, orientation, __textTopMargin); + GET_SHAPE_CONFIG(OPTIONMENU::TEXT_BOTTOM_MARGIN, orientation, __textBottomMargin); + GET_SHAPE_CONFIG(OPTIONMENU::LEFT_MARGIN, orientation, __arrowLeftMargin); + GET_SHAPE_CONFIG(OPTIONMENU::RIGHT_MARGIN, orientation, __arrowRightMargin); + GET_SHAPE_CONFIG(OPTIONMENU::ARROW_MARGIN, orientation, __arrowMargin); + GET_SHAPE_CONFIG(OPTIONMENU::ITEM_HEIGHT, orientation, __itemHeight); + + 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_REPLACED_BITMAP_CONFIG_N(OPTIONMENU::ITEM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, Color(0, 0, 0, 0), __pNormalBgBitmap); + + InitializeAccessibilityElement(); +} + +_OptionMenuItem::~_OptionMenuItem(void) +{ + delete __pBitmap[OPTION_MENU_ITEM_DRAWING_STATUS_NORMAL]; + __pBitmap[OPTION_MENU_ITEM_DRAWING_STATUS_NORMAL] = null; + + delete __pBitmap[OPTION_MENU_ITEM_DRAWING_STATUS_PRESSED]; + __pBitmap[OPTION_MENU_ITEM_DRAWING_STATUS_PRESSED] = null; + + delete __pBitmap[OPTION_MENU_ITEM_DRAWING_STATUS_HIGHLIGHTED]; + __pBitmap[OPTION_MENU_ITEM_DRAWING_STATUS_HIGHLIGHTED] = null; + + if (__pUpperDividerLineLabel != null) + { + DetachChild(*__pUpperDividerLineLabel); + delete __pUpperDividerLineLabel; + __pUpperDividerLineLabel = null; + } + + if (__pBackgroundLabel != null) + { + DetachChild(*__pBackgroundLabel); + delete __pBackgroundLabel; + __pBackgroundLabel = null; + } + + if (__pBitmapLabel != null) + { + DetachChild(*__pBitmapLabel); + delete __pBitmapLabel; + __pBitmapLabel = null; + } + + if (__pTextLabel != null) + { + DetachChild(*__pTextLabel); + delete __pTextLabel; + __pTextLabel = null; + } + + delete __pNormalBgBitmap; + __pNormalBgBitmap = null; + + delete __pSelectedBgBitmap; + __pSelectedBgBitmap = null; + + delete __pArrowBitmap; + __pArrowBitmap = null; + + delete __pArrowPressedBitmap; + __pArrowPressedBitmap = null; + + if (__pLowerDividerLineLabel != null) + { + DetachChild(*__pLowerDividerLineLabel); + delete __pLowerDividerLineLabel; + __pLowerDividerLineLabel = null; + } + + if (__pArrowLabel != null) + { + DetachChild(*__pArrowLabel); + delete __pArrowLabel; + __pArrowLabel = null; + } + + if (__pSubItems != null) + { + __pSubItems->RemoveAll(true); + delete __pSubItems; + __pSubItems = null; + } + + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + if (pContainer != null) + { + pContainer->RemoveAllElement(); + } +} + +_OptionMenuItem* +_OptionMenuItem::CreateOptionMenuItemN(void) +{ + ClearLastResult(); + + _OptionMenuItem* pItem = null; + + pItem = new (std::nothrow) _OptionMenuItem(); + SysTryReturn(NID_UI_CTRL, pItem != null, null , E_OUT_OF_MEMORY, "[%s] Memory allocation falied.", GetErrorMessage(E_OUT_OF_MEMORY)); + + pItem->AcquireHandle(); + + SetLastResult(E_SUCCESS); + return pItem; +} + +result +_OptionMenuItem::InsertSubItemAt(_OptionMenuItem& subItem, int index) +{ + if (__pSubItems == null) + { + __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) + { + delete __pSubItems; + __pSubItems = null; + SysLogException(NID_UI_CTRL, r, "[%s] Propagating.", GetErrorMessage(r)); + return r; + } + } + + 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); +} + +result +_OptionMenuItem::SetSubItemAt(_OptionMenuItem& subItem, int index) +{ + _OptionMenuItem* pItem = static_cast<_OptionMenuItem*>(__pSubItems->GetAt(index)); + + pItem->SetText(subItem.GetText()); + pItem->SetActionId(subItem.GetActionId()); + + delete &subItem; + + return E_SUCCESS; +} + +result +_OptionMenuItem::RemoveSubItemAt(int 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); +} + +bool +_OptionMenuItem::HasSubItem(void) const +{ + return (__pSubItems != null && __pSubItems->GetCount() > 0); +} + +int +_OptionMenuItem::GetSubItemCount(void) const +{ + if (__pSubItems == null) + { + return 0; + } + + return __pSubItems->GetCount(); +} + +_OptionMenuItem* +_OptionMenuItem::GetSubItem(int 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, + "[%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)); +} + +void +_OptionMenuItem::InitializeAccessibilityElement(void) +{ + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + if (pContainer != null) + { + pContainer->Activate(true); + _AccessibilityElement* pElement = new (std::nothrow) _AccessibilityElement(true); + 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)); + pContainer->AddElement(*pElement); + } + + return; +} + +void +_OptionMenuItem::SetBitmapLabel(_Label* pLabel) +{ + __pBitmapLabel = pLabel; +} + +void +_OptionMenuItem::SetTextLabel(_Label* pLabel) +{ + __pTextLabel = pLabel; +} + +_Label* +_OptionMenuItem::GetBitmapLabel(void) const +{ + if (__pBitmapLabel == null) + { + return null; + } + + return const_cast<_Label*>(__pBitmapLabel); +} + +_Label* +_OptionMenuItem::GetTextLabel(void) const +{ + if (__pTextLabel == null) + { + return null; + } + + return const_cast<_Label*>(__pTextLabel); +} + +void +_OptionMenuItem::SetType(OptionMenuItemDrawingType type) +{ + __type = type; +} + +OptionMenuItemDrawingType +_OptionMenuItem::GetType(void) const +{ + return __type; +} + +void +_OptionMenuItem::SetActionId(int actionId) +{ + __actionId = actionId; +} + +int +_OptionMenuItem::GetActionId(void) const +{ + return __actionId; +} + +void +_OptionMenuItem::SetUpperDivider(bool drawDivider) +{ + __upperDividerLine = drawDivider; +} + +void +_OptionMenuItem::SetLowerDivider(bool drawDivider) +{ + __lowerDividerLine = drawDivider; +} + +bool +_OptionMenuItem::HasUpperDivider(void) const +{ + return __upperDividerLine; +} + +bool +_OptionMenuItem::HasLowerDivider(void) const +{ + return __lowerDividerLine; +} + +void +_OptionMenuItem::SetTextSize(float size) +{ + __textSize = size; +} + +result +_OptionMenuItem::SetText(const String& text) +{ + __text = text; + + return E_SUCCESS; +} + +const String& +_OptionMenuItem::GetText(void) const +{ + return __text; +} + +result +_OptionMenuItem::SetBitmap(OptionMenuItemDrawingStatus status, const Bitmap* pBitmap) +{ + 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."); + + 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); + + // If bitmap is in _OptionMenuItem, delete old one. + if (__pBitmap[status] != null) + { + delete __pBitmap[status]; + __pBitmap[status] = null; + } + + __pBitmap[status] = pClonedBitmap; + + return E_SUCCESS; +} + +const Bitmap* +_OptionMenuItem::GetBitmap(OptionMenuItemDrawingStatus status) const +{ + if (status < OPTION_MENU_ITEM_DRAWING_STATUS_NORMAL || status > OPTION_MENU_ITEM_DRAWING_STATUS_HIGHLIGHTED) + { + return null; + } + + return __pBitmap[status]; +} + +void +_OptionMenuItem::SetPressedItemColor(Color color) +{ + __selectedBgColor = color; +} + +void +_OptionMenuItem::SetSize(FloatDimension size) +{ + __size = size; +} + +FloatDimension +_OptionMenuItem::GetSize(void) const +{ + return __size; +} + +void +_OptionMenuItem::SetDrawRect(FloatRectangle rect) +{ + __drawRect = rect; +} + +FloatRectangle +_OptionMenuItem::GetDrawRect(void) const +{ + return __drawRect; +} + +void +_OptionMenuItem::SetPressedDrawRect(FloatRectangle rect) +{ + __pressedDrawRect = rect; +} + +FloatRectangle +_OptionMenuItem::GetPressedDrawRect(void) const +{ + return __pressedDrawRect; +} + +int +_OptionMenuItem::Release(void) +{ + delete this; + + return 0; +} + +void +_OptionMenuItem::OnBoundsChanged(void) +{ + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + if (pContainer != null) + { + _AccessibilityElement* pElement = pContainer->GetChildElement(0); + if (pElement != null) + { + pElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height)); + } + } +} + +void +_OptionMenuItem::OnDraw(void) +{ + DrawItem(); +} + +void +_OptionMenuItem::DrawItem(void) +{ + if (__upperDividerLine) + { + DrawItemUpperDivider(); + } + + if (__lowerDividerLine) + { + DrawItemLowerDivider(); + } + + DrawItemBackground(); + DrawItemBitmap(); + + if (HasSubItem()) + { + DrawArrow(); + } +} + +void +_OptionMenuItem::DrawItemBitmap(void) +{ + if (__selected) + { + __pBitmapLabel->SetBackgroundBitmap(*__pBitmap[OPTION_MENU_ITEM_DRAWING_STATUS_PRESSED]); + } + else if (__highlighted) + { + __pBitmapLabel->SetBackgroundBitmap(*__pBitmap[OPTION_MENU_ITEM_DRAWING_STATUS_HIGHLIGHTED]); + } + else + { + __pBitmapLabel->SetBackgroundBitmap(*__pBitmap[OPTION_MENU_ITEM_DRAWING_STATUS_NORMAL]); + } + + FloatRectangle bounds = __pTextLabel->GetBoundsF(); + FloatRectangle itemBounds = GetBoundsF(); + + float bitmapWidth = (__type == OPTION_MENU_ITEM_DRAWING_TYPE_BITMAP) ? __pBitmapLabel->GetBoundsF().width : 0.0f; + float textLabelX = __leftMargin + bitmapWidth; + + bounds.x = textLabelX; + bounds.width = itemBounds.width; + + bounds.width = bounds.width - __textLeftMargin - __textRightMargin - bitmapWidth; + + if (HasSubItem()) + { + bounds.width = bounds.width - __arrowLeftMargin - __arrowRightMargin; + } + + __pTextLabel->SetBounds(bounds); + __pBitmapLabel->Invalidate(); + __pTextLabel->Invalidate(); +} + +void +_OptionMenuItem::DrawArrow(void) +{ + FloatRectangle bounds = GetBoundsF(); + FloatRectangle textRect; + textRect.height = bounds.height - __textTopMargin - __textBottomMargin; + textRect.width = bounds.width - __arrowLeftMargin - __arrowRightMargin - __textLeftMargin - __textRightMargin; + textRect.x = bounds.x + __arrowLeftMargin + __textLeftMargin; + textRect.y = bounds.y + ((bounds.height - textRect.height) / 2.0f); + + textRect.width -= __arrowMargin; + + Color arrowColor; + result r = E_SUCCESS; + FloatRectangle arrowbounds(0.0f, 0.0f, 0.0f, 0.0f); + + if (__pArrowBitmap == null) + { + // Load Contextual Popup Arrow Bitmap + GET_COLOR_CONFIG(OPTIONMENU::CONTEXTUAL_POPUP_ARROW_NORMAL, arrowColor); + + 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 + GET_COLOR_CONFIG(OPTIONMENU::CONTEXTUAL_POPUP_ARROW_PRESSED, arrowColor); + + 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)); + + AttachChild(*__pArrowLabel); + + _AccessibilityContainer* pContainer = __pArrowLabel->GetAccessibilityContainer(); + if (pContainer != null) + { + pContainer->Activate(false); + } + } + + arrowbounds = FloatRectangle(bounds.x + bounds.width - __arrowMargin - __rightMargin, + (__itemHeight - __pArrowBitmap->GetHeight())/2.0f, __pArrowBitmap->GetWidth(), __pArrowBitmap->GetHeight()); + __pArrowLabel->SetBounds(FloatRectangle(arrowbounds)); + + if (__selected) + { + __pArrowLabel->SetBackgroundBitmap(*__pArrowPressedBitmap); + } + else + { + __pArrowLabel->SetBackgroundBitmap(*__pArrowBitmap); + } + + __pArrowLabel->Invalidate(); + + return; + +CATCH: + + delete __pArrowBitmap; + __pArrowBitmap = null; + + delete __pArrowPressedBitmap; + __pArrowPressedBitmap = null; + + delete __pArrowLabel; + __pArrowLabel = null; +} + +void +_OptionMenuItem::DrawItemUpperDivider(void) +{ + FloatRectangle bounds(0.0f, 0.0f, 0.0f, 0.0f); + Color dividerLineColor(0, 0, 0, 0); + + if (__pUpperDividerLineLabel == null) + { + __pUpperDividerLineLabel = _Label::CreateLabelN(); + SysTryReturnVoidResult(NID_UI_CTRL, __pUpperDividerLineLabel, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + AttachChild(*__pUpperDividerLineLabel); + + _AccessibilityContainer* pContainer = __pUpperDividerLineLabel->GetAccessibilityContainer(); + if (pContainer != null) + { + pContainer->Activate(false); + } + } + + bounds = GetBoundsF(); + + dividerLineColor = __upperDividerLineColor; + + __pUpperDividerLineLabel->SetBounds(FloatRectangle(0.0f, 0.0f, bounds.width, __dividerHeight)); + __pUpperDividerLineLabel->SetBackgroundColor(dividerLineColor); + __pUpperDividerLineLabel->Invalidate(); +} + +int +_OptionMenuItem::GetSubItemIndexFromActionId(int actionId) const +{ + if (__pSubItems == null) + { + return -1; + } + + int index = 0; + int subItemCount = __pSubItems->GetCount(); + const _OptionMenuItem* pItem = null; + for (index = 0; index < subItemCount; index++) + { + pItem = static_cast(__pSubItems->GetAt(index)); + if (pItem != null) + { + if (pItem->__actionId == actionId) + { + return index; + } + } + } + + return -1; +} + +void +_OptionMenuItem::DrawItemBackground(void) +{ + SetBackgroundColor(Color(0, 0, 0, 0)); + float topMargin = 0.0f; + float bottomMargin = 0.0f; + + if (__pBackgroundLabel == null) + { + __pBackgroundLabel = _Label::CreateLabelN(); + SysTryReturnVoidResult(NID_UI_CTRL, __pBackgroundLabel, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + __pBackgroundLabel->SetTouchPressThreshold(TOUCH_PRESS_THRESHOLD_INSENSITIVE); + AttachChild(*__pBackgroundLabel); + MoveChildToBottom(*__pBackgroundLabel); + + _AccessibilityContainer* pContainer = __pBackgroundLabel->GetAccessibilityContainer(); + if (pContainer != null) + { + pContainer->Activate(false); + } + } + + FloatRectangle bounds = GetBoundsF(); + + _ScrollPanel* pScrollPanel = static_cast<_ScrollPanel*>(GetParent()); + FloatRectangle boundsScrollPanel = pScrollPanel->GetBoundsF(); + + float topOverlap = pScrollPanel->GetScrollPosition() - bounds.y; + if (topOverlap >= 0.0f) + { + topMargin = topOverlap; + } + else + { + topMargin = __bgPressedTopBottomMargin; + } + + float bottomOverlap = bounds.y + bounds.height - (pScrollPanel->GetScrollPosition() + boundsScrollPanel.height); + if (bottomOverlap >= 0.0f) + { + bottomMargin = bottomOverlap; + } + else + { + bottomMargin = __bgPressedTopBottomMargin; + } + + __pBackgroundLabel->SetBounds(FloatRectangle(__bgPressedLeftRightMargin, topMargin, bounds.width - __bgPressedLeftRightMargin * 2.0f, + bounds.height - topMargin - bottomMargin)); + 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(); +} + +void +_OptionMenuItem::DrawItemLowerDivider(void) +{ + FloatRectangle bounds(0.0f, 0.0f, 0.0f, 0.0f); + Color dividerLineColor(0, 0, 0, 0); + + if (__pLowerDividerLineLabel == null) + { + __pLowerDividerLineLabel = _Label::CreateLabelN(); + SysTryReturnVoidResult(NID_UI_CTRL, __pLowerDividerLineLabel, E_OUT_OF_MEMORY, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + AttachChild(*__pLowerDividerLineLabel); + + _AccessibilityContainer* pContainer = __pLowerDividerLineLabel->GetAccessibilityContainer(); + if (pContainer != null) + { + pContainer->Activate(false); + } + } + + bounds = GetBoundsF(); + + dividerLineColor = __lowerDividerLineColor; + + __pLowerDividerLineLabel->SetBounds(FloatRectangle(0.0f, bounds.height - __dividerHeight, bounds.width, __dividerHeight)); + __pLowerDividerLineLabel->SetBackgroundColor(dividerLineColor); + __pLowerDividerLineLabel->Invalidate(); +} + +_UiTouchEventDelivery +_OptionMenuItem::OnPreviewTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + SetAndInvalidate(true); + + return _UI_TOUCH_EVENT_DELIVERY_FORCED_YES; +} + +bool +_OptionMenuItem::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + SetAndInvalidate(true); + + return false; +} + +_UiTouchEventDelivery +_OptionMenuItem::OnPreviewTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + TouchMoved(source, touchinfo); + + return _UI_TOUCH_EVENT_DELIVERY_FORCED_YES; +} + +bool +_OptionMenuItem::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + TouchMoved(source, touchinfo); + + return false; +} + +_UiTouchEventDelivery +_OptionMenuItem::OnPreviewTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + SetAndInvalidate(false); + + return _UI_TOUCH_EVENT_DELIVERY_FORCED_YES; +} + +bool +_OptionMenuItem::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + SetAndInvalidate(false); + + return false; +} + + +void +_OptionMenuItem::TouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + FloatPoint touchPosition = touchinfo.GetCurrentPosition(); + + if (__pressed) + { + if (__parentScrollEnable) + { + if (__selected) + { + __selected = false; + Invalidate(); + } + } + else + { + int oldSelected = __selected; + + FloatRectangle bounds(0.0f, 0.0f, __size.width, __size.height); + if (bounds.Contains(touchPosition)) + { + __selected = true; + } + else + { + __selected = false; + } + + if (oldSelected != __selected) + { + Invalidate(); + } + } + } +} + +void +_OptionMenuItem::OnFontChanged(Font* pFont) +{ + String fontName = _Control::GetFont(); + + if (__pTextLabel != null) + { + __pTextLabel->SetFont(fontName); + } +} + +void +_OptionMenuItem::OnFontInfoRequested(unsigned long& style, float& size) +{ + style = FONT_STYLE_PLAIN; + size = __textSize; +} + +void +_OptionMenuItem::SetParentScrollEnable(bool enable) +{ + __parentScrollEnable = enable; +} + +bool +_OptionMenuItem::GetParentScrollEnable(void) const +{ + return __parentScrollEnable; +} + +bool +_OptionMenuItem::IsSelected(void) const +{ + return __selected; +} + +bool +_OptionMenuItem::IsHighlighted(void) const +{ + return __highlighted; +} + +void +_OptionMenuItem::SetHighlighted(bool status) +{ + __highlighted = status; +} + +void +_OptionMenuItem::SetAndInvalidate(bool flag) +{ + __selected = flag; + __pressed = flag; + Invalidate(); +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_OptionMenuModel.cpp b/src/ui/controls/FUiCtrl_OptionMenuModel.cpp new file mode 100644 index 0000000..569c9d8 --- /dev/null +++ b/src/ui/controls/FUiCtrl_OptionMenuModel.cpp @@ -0,0 +1,321 @@ +// +// 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_OptionMenuModel.cpp + * @brief This is the implementation file for the _OptionMenuModel class. + */ + +#include +#include +#include "FUi_Control.h" +#include "FUiCtrl_OptionMenuModel.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Base; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_OptionMenuModel::_OptionMenuModel(void) +{ + +} + +_OptionMenuModel::~_OptionMenuModel(void) +{ + __items.RemoveAll(true); +} + + +result +_OptionMenuModel::Construct(void) +{ + result r = __items.Construct(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to construct ArrayList."); + + return r; +} + +bool +_OptionMenuModel::IsValidItem(_OptionMenuItem *pItem) +{ + if (pItem == null) + { + return false; + } + + int actionId = pItem->GetActionId(); + int itemCount = __items.GetCount(); + + for (int i = 0; i < itemCount; i++) + { + _OptionMenuItem* pTargetItem = GetItem(i); + + if (pTargetItem == null) + return false; + + if (pTargetItem->GetActionId() == actionId) + { + return false; + } + } + + return true; +} + +int +_OptionMenuModel::GetItemCount(void) const +{ + return __items.GetCount(); +} + +result +_OptionMenuModel::AddItem(_OptionMenuItem* pItem, int mainIndex) +{ + result r = E_SUCCESS; + + if (mainIndex == INVALID_INDEX) + { + r = __items.Add(*pItem); + } + else + { + _OptionMenuItem* pMainItem = GetItem(mainIndex); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, pItem != null, r, "Propagating."); + + r = pMainItem->InsertSubItemAt(*pItem, pMainItem->GetSubItemCount()); + } + + return r; +} + +result +_OptionMenuModel::InsertItemAt(_OptionMenuItem* pItem, int mainIndex, int subIndex) +{ + result r = E_SUCCESS; + + if (subIndex == INVALID_INDEX) + { + r = __items.InsertAt(*pItem, mainIndex); + } + else + { + _OptionMenuItem* pMainItem = GetItem(mainIndex); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, pItem != null, r, "Propagating."); + + r = pMainItem->InsertSubItemAt(*pItem, subIndex); + + } + + return r; +} + +result +_OptionMenuModel::SetItemAt(int mainIndex, const String& text, int actionId, const Bitmap* pNormalBitmap, + const Bitmap* pPressedBitmap, const Bitmap* pHighlightedBitmap, float fontSize, int subIndex) +{ + _OptionMenuItem* pItem = GetItem(mainIndex, subIndex); + result r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, pItem != null, r, "Propagating."); + + OptionMenuItemDrawingType itemType = OPTION_MENU_ITEM_DRAWING_TYPE_TEXT; + + if (subIndex == INVALID_INDEX) + { + int index = GetItemIndexFromActionId(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); + 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); + 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; + + if (pNormalBitmap != null) + { + itemType = OPTION_MENU_ITEM_DRAWING_TYPE_BITMAP; + } + + pItem->SetBitmap(OPTION_MENU_ITEM_DRAWING_STATUS_NORMAL, pNormalBitmap); + + pLabel = pItem->GetBitmapLabel(); + + if (pLabel != null) + { + pLabel->SetBackgroundBitmap(*pNormalBitmap); + } + + pItem->SetBitmap(OPTION_MENU_ITEM_DRAWING_STATUS_PRESSED, pPressedBitmap); + + pItem->SetBitmap(OPTION_MENU_ITEM_DRAWING_STATUS_HIGHLIGHTED, pHighlightedBitmap); + + pLabel = pItem->GetTextLabel(); + + if (pLabel != null) + { + pLabel->SetText(text); + pLabel->SetTextConfig(fontSize, LABEL_TEXT_STYLE_NORMAL); + } + + pItem->SetType(itemType); + pItem->SetText(text); + pItem->SetActionId(actionId); + pItem->SetTextSize(fontSize); + + return E_SUCCESS; +} + +result +_OptionMenuModel::RemoveItem(int mainIndex, int subIndex) +{ + if (subIndex == INVALID_INDEX) + { + return __items.RemoveAt(mainIndex, true); + } + + _OptionMenuItem* pMainItem = GetItem(mainIndex); + result r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, pMainItem != null, r, "Propagating."); + + 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); +} + +result +_OptionMenuModel::RemoveAllItem(void) +{ + __items.RemoveAll(true); + + return E_SUCCESS; +} + +void +_OptionMenuModel::ResetAllItem(void) +{ + int count = __items.GetCount(); + + _OptionMenuItem* pItem; + for(int index = 0; index < count; index++) + { + pItem = static_cast <_OptionMenuItem*>(__items.GetAt(index)); + pItem->SetAndInvalidate(false); + } +} + +void +_OptionMenuModel::ResetSelectedItem(int selectedIndex) +{ + if (selectedIndex == -1) + { + return; + } + + _OptionMenuItem* pItem = null; + pItem = static_cast <_OptionMenuItem*>(__items.GetAt(selectedIndex)); + 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); + +} + +int +_OptionMenuModel::GetItemIndexFromActionId(int actionId) const +{ + const _OptionMenuItem* pItem = null; + for (int mainIndex = 0; mainIndex < __items.GetCount(); mainIndex++) + { + pItem = static_cast(__items.GetAt(mainIndex)); + if (pItem != null) + { + if (pItem->GetActionId() == actionId) + { + return mainIndex; + } + } + } + + return -1; +} + +int +_OptionMenuModel::GetSubItemCount(int mainIndex) const +{ + const _OptionMenuItem* pItem = GetItem(mainIndex); + if (pItem == null) + { + return -1; + } + + return pItem->GetSubItemCount(); +} + +int +_OptionMenuModel::GetSubItemIndexFromActionId(int actionId, int& mainIndex) const +{ + const _OptionMenuItem* pMainItem = null; + int mainItemCount = __items.GetCount(); + for (int index = 0; index < mainItemCount; index++) + { + pMainItem = static_cast(__items.GetAt(index)); + if (pMainItem != null) + { + int subItemIndex = pMainItem->GetSubItemIndexFromActionId(actionId); + if (subItemIndex >= 0) + { + return subItemIndex; + } + } + } + + return -1; +} + +_OptionMenuItem* +_OptionMenuModel::GetItem(int mainIndex, int subIndex) const +{ + int count = __items.GetCount(); + + if (mainIndex < 0 || mainIndex >= count) + { + return null; + } + + const _OptionMenuItem* pItem = static_cast (__items.GetAt(mainIndex)); + + if (subIndex == INVALID_INDEX) + { + return const_cast<_OptionMenuItem*>(pItem); + } + else + { + return const_cast<_OptionMenuItem*>(pItem)->GetSubItem(subIndex); + } +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_OptionMenuPresenter.cpp b/src/ui/controls/FUiCtrl_OptionMenuPresenter.cpp new file mode 100644 index 0000000..57d8b25 --- /dev/null +++ b/src/ui/controls/FUiCtrl_OptionMenuPresenter.cpp @@ -0,0 +1,1189 @@ +// +// 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_OptionMenuListPresenter.cpp + * @brief This is the implementation file for the _OptionMenuPresenter class. + */ + +#include +#include +#include +#include +#include +#include "FUi_AccessibilityContainer.h" +#include "FUi_AccessibilityElement.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_Math.h" +#include "FUi_ResourceManager.h" +#include "FUiAnim_MatrixUtil.h" +#include "FUiCtrl_ActionEvent.h" +#include "FUiCtrl_IActionEventListener.h" + +#include "FUiCtrl_OptionMenuPresenter.h" + +using namespace Tizen::Graphics; +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; +} + +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) + , __pFont(null) + , __layoutSize(FloatDimension(0.0f, 0.0f)) + , __touchOutRect(false) + , __selectedIndex(-1) + , __scrollEnable(false) + , __maxWidth(0.0f) + , __minWidth(0.0f) + , __topMargin(0.0f) + , __bottomMargin(0.0f) + , __leftMargin(0.0f) + , __rightMargin(0.0f) + , __itemWidth(0.0f) + , __itemMinWidth(0.0f) + , __itemHeight(0.0f) + , __itemMaxWidth(0.0f) + , __itemGap(0.0f) + , __itemBitmapWidth(0.0f) + , __itemBitmapHeight(0.0f) + , __itemFontSize(0.0f) + , __dividerHeight(0.0f) + , __focusedIndex(-1) +{ + +} + +_OptionMenuPresenter::~_OptionMenuPresenter(void) +{ + __pOptionMenu = null; + + delete __pModel; + __pModel = null; + + __pFont = null; + +} + +result +_OptionMenuPresenter::Install(void) +{ + result r = E_SUCCESS; + + LoadShape(); + + __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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + __pFont = __pOptionMenu->GetFallbackFont(); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, (__pFont != null), , r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + +CATCH: + delete __pModel; + __pModel = null; + + __pFont = null; + + return r; +} + +void +_OptionMenuPresenter::LoadShape(void) +{ + GET_SHAPE_CONFIG(OPTIONMENU::LIST_MIN_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, __itemMinWidth); + GET_SHAPE_CONFIG(OPTIONMENU::LIST_MAX_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, __itemMaxWidth); + GET_SHAPE_CONFIG(OPTIONMENU::LIST_ITEM_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, __itemHeight); + GET_SHAPE_CONFIG(OPTIONMENU::LIST_ITEM_GAP, _CONTROL_ORIENTATION_PORTRAIT, __itemGap); + + GET_SHAPE_CONFIG(OPTIONMENU::LIST_TOP_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __topMargin); + GET_SHAPE_CONFIG(OPTIONMENU::LIST_BOTTOM_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __bottomMargin); + GET_SHAPE_CONFIG(OPTIONMENU::LIST_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __leftMargin); + GET_SHAPE_CONFIG(OPTIONMENU::LIST_RIGHT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __rightMargin); + + GET_SHAPE_CONFIG(OPTIONMENU::LIST_ICON_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, __itemBitmapWidth); + GET_SHAPE_CONFIG(OPTIONMENU::LIST_ICON_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, __itemBitmapHeight); + + GET_SHAPE_CONFIG(OPTIONMENU::LIST_ITEM_FONT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, __itemFontSize); + GET_SHAPE_CONFIG(OPTIONMENU::LIST_DIVIDER_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, __dividerHeight); + + __itemWidth = __itemMinWidth; +} + +_OptionMenuItem* +_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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + OptionMenuItemDrawingType itemType = OPTION_MENU_ITEM_DRAWING_TYPE_TEXT; + _Label* pLabel = null; + result r = E_SUCCESS; + + // add bitmap label + pLabel = _Label::CreateLabelN(); + if (GetLastResult() != E_SUCCESS) + { + delete pItem; + return null; + } + + pLabel->SetBackgroundBitmap(*pNormalBitmap); + pLabel->SetBackgroundColor(Color(0, 0, 0, 0)); + + int bitmapY = (__itemHeight - __itemBitmapHeight) / 2; + pLabel->SetBounds(FloatRectangle(__leftMargin, bitmapY, __itemBitmapWidth, __itemBitmapHeight)); + pLabel->SetTouchPressThreshold(TOUCH_PRESS_THRESHOLD_INSENSITIVE); + pItem->AttachChild(*pLabel); + pItem->SetBitmapLabel(pLabel); + + _AccessibilityContainer* pContainer = pLabel->GetAccessibilityContainer(); + if (pContainer != null) + { + pContainer->Activate(false); + } + + if (pNormalBitmap != null) + { + r = pItem->SetBitmap(OPTION_MENU_ITEM_DRAWING_STATUS_NORMAL, pNormalBitmap); + if (r != E_SUCCESS) + { + delete pItem; + return null; + } + + itemType = OPTION_MENU_ITEM_DRAWING_TYPE_BITMAP; + } + + if (pPressedBitmap != null) + { + r = pItem->SetBitmap(OPTION_MENU_ITEM_DRAWING_STATUS_PRESSED, pPressedBitmap); + if (r != E_SUCCESS) + { + delete pItem; + return null; + } + } + + if (pHighlightedBitmap != null) + { + r = pItem->SetBitmap(OPTION_MENU_ITEM_DRAWING_STATUS_HIGHLIGHTED, pHighlightedBitmap); + if (r != E_SUCCESS) + { + delete pItem; + return null; + } + } + + pItem->SetType(itemType); + pItem->SetActionId(actionId); + + pItem->SetTextSize(__itemFontSize); + r = pItem->SetText(text); + if (r != E_SUCCESS) + { + delete pItem; + return null; + } + + // calculate item size + float bitmapWidth = 0.0f; + + if (itemType == OPTION_MENU_ITEM_DRAWING_TYPE_BITMAP) + { + bitmapWidth = __itemBitmapWidth; + } + + FloatDimension textArea(0.0f, 0.0f); + FloatDimension itemSize(0.0f, 0.0f); + + CalculateItemSize(text, itemType, textArea, itemSize); + + float labelLeftMargin = 0.0f; + GET_SHAPE_CONFIG(LABEL::LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, labelLeftMargin); + pItem->SetSize(itemSize); + + // add text label + float textLabelX = labelLeftMargin + bitmapWidth; + + pLabel = _Label::CreateLabelN(); + if (GetLastResult() != E_SUCCESS) + { + delete pItem; + return null; + } + + pLabel->SetText(text); + OptionMenuCoreItemStatus itemStatus = OPTION_MENU_CORE_ITEM_STATUS_NORMAL; + pLabel->SetTextColor(__pOptionMenu->GetTextColor(itemStatus)); + pLabel->SetBackgroundColor(Color(0, 0, 0, 0)); + + itemSize = pItem->GetSize(); + pLabel->SetBounds(FloatRectangle(textLabelX, (itemSize.height - textArea.height) / 2.0f, textArea.width, textArea.height)); + pLabel->SetTextVerticalAlignment(ALIGNMENT_MIDDLE); + pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT); + pLabel->SetTextConfig(__itemFontSize, LABEL_TEXT_STYLE_NORMAL); + + pLabel->SetTouchPressThreshold(TOUCH_PRESS_THRESHOLD_INSENSITIVE); + pItem->AttachChild(*pLabel); + + pContainer = pLabel->GetAccessibilityContainer(); + + if (pContainer != null) + { + pContainer->Activate(false); + } + pItem->SetTextLabel(pLabel); + + if (!isSubItem) + { + __itemWidth = __itemWidth < itemSize.width ? itemSize.width : __itemWidth; + } + + pItem->SetTouchPressThreshold(TOUCH_PRESS_THRESHOLD_INSENSITIVE); + return pItem; +} + +void +_OptionMenuPresenter::CalculateItemSize(const String &text, OptionMenuItemDrawingType itemType, FloatDimension &textArea, FloatDimension &itemSize) +{ + float labelLeftMargin = 0.0f; + float labelTopMargin = 0.0f; + __pFont->GetTextExtent(text, text.GetLength(), textArea); + + GET_SHAPE_CONFIG(LABEL::LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, labelLeftMargin); + GET_SHAPE_CONFIG(LABEL::TOP_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, labelTopMargin); + + textArea.width += 2.0f * labelLeftMargin; + textArea.height += 2.0f * labelTopMargin; + itemSize.height = __itemHeight + (__dividerHeight * 2.0f); + itemSize.width = __leftMargin + textArea.width + __rightMargin; + + if (itemType == OPTION_MENU_ITEM_DRAWING_TYPE_BITMAP) + { + itemSize.width = itemSize.width + __itemBitmapWidth; + } + + itemSize.width = itemSize.width < __itemMinWidth ? __itemMinWidth : itemSize.width; + + if (itemSize.width > __itemMaxWidth) + { + textArea.width -= itemSize.width - __itemMaxWidth; + itemSize.width = __itemMaxWidth; + } +} + +result +_OptionMenuPresenter::AddItem(const String& text, int actionId, const Bitmap* normalBitmap, const Bitmap* pPressedBitmap, const Bitmap* pHighlightedBitmap) +{ + _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; + SysTryReturnResult(NID_UI_CTRL, false, r, "Failed to add item."); + } + + return r; +} + +result +_OptionMenuPresenter::AddSubItem(int mainIndex, const String& text, int actionId) +{ + SysTryReturnResult(NID_UI_CTRL, mainIndex >=0 && mainIndex < __pModel->GetItemCount(), E_INVALID_ARG, "Invalid argument is used. mainIndex (%d) is invalid.", mainIndex); + + _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; + SysTryReturnResult(NID_UI_CTRL, false, r, "Failed to add item."); + } + + return r; +} + +int +_OptionMenuPresenter::GetItemIndexFromActionId(int actionId) const +{ + return __pModel->GetItemIndexFromActionId(actionId); +} + +int +_OptionMenuPresenter::GetItemActionIdAt(int mainIndex) const +{ + _OptionMenuItem* pItem = __pModel->GetItem(mainIndex); + if (pItem == null) + { + return -1; + } + + return pItem->GetActionId(); +} + +result +_OptionMenuPresenter::InsertItem(int mainIndex, const String& text, int actionId, const Bitmap* normalBitmap, + const Bitmap* pPressedBitmap, const Bitmap* pHighlightedBitmap) +{ + _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; + SysTryReturnResult(NID_UI_CTRL, false, r, "Failed to add item."); + } + + return E_SUCCESS; +} + +result +_OptionMenuPresenter::InsertSubItemAt(int mainIndex, int subIndex, const String& text, int actionId) +{ + 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 = 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); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); + + return E_SUCCESS; +} + +result +_OptionMenuPresenter::SetSubItemAt(int mainIndex, int subIndex, const String& text, int actionId) +{ + 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); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); + + return E_SUCCESS; +} + +result +_OptionMenuPresenter::RemoveSubItemAt(int mainIndex, int 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); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); + + return E_SUCCESS; +} + +int +_OptionMenuPresenter::GetSubItemCount(int mainIndex) const +{ + 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); +} + +int +_OptionMenuPresenter::GetSubItemIndexFromActionId(int actionId) const +{ + int mainIndex = -1; + return __pModel->GetSubItemIndexFromActionId(actionId, mainIndex); +} + +int +_OptionMenuPresenter::GetSubItemActionIdAt(int mainIndex, int subIndex) const +{ + _OptionMenuItem* pItem = __pModel->GetItem(mainIndex, subIndex); + if (pItem == null) + { + return -1; + } + + return pItem->GetActionId(); +} + +void +_OptionMenuPresenter::CalculateItemMaximumWidth(void) +{ + FloatDimension itemSize(0.0f, 0.0f); + FloatDimension textArea(0.0f, 0.0f); + float maxItemWidth = __itemMinWidth; + + for (int i = 0; i < __pModel->GetItemCount(); i++) + { + _OptionMenuItem* pItem = null; + + pItem = __pModel->GetItem(i); + 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); + + if (maxItemWidth < itemSize.width) + { + maxItemWidth = itemSize.width; + } + + } + __itemWidth = maxItemWidth; +} + +result +_OptionMenuPresenter::SetItem(int index, const String& text, int actionId, const Bitmap* normalBitmap, const Bitmap* pPressedBitmap, const Bitmap* pHighlightedBitmap) +{ + 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); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + _OptionMenuItem* pItem = __pModel->GetItem(index); + + SysTryReturnResult(NID_UI_CTRL, pItem != null, r, "Propagating."); + CalculateItemMaximumWidth(); + + return r; +} + +result +_OptionMenuPresenter::DeleteItem(int 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; + + 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); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to delete item."); + + CalculateItemMaximumWidth(); + + return r; +} + +result +_OptionMenuPresenter::DeleteItemAll(void) +{ + SysTryReturnResult(NID_UI_CTRL, (__pOptionMenu->GetItemCount() > 0), E_SYSTEM, + "A system error has occurred. No items exists."); + + result r = E_SUCCESS; + _OptionMenuItem* pItem = null; + + 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; +} + +result +_OptionMenuPresenter::CalculateWindowRect(void) +{ + result r = CalculateRect(); + AdjustItemPosition(); + __pOptionMenu->SetAllAccessibilityElement(); + + return r; +} + +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; +} + +result +_OptionMenuPresenter::CalculateRect(void) +{ + FloatRectangle windowRect = FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); // OptionMenu window itself + FloatRectangle bodyRect = FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); // bg surronding showing items, relative to window + FloatRectangle itemRect = FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); // relative to window + + float bodyTopMargin = __topMargin; + float bodyBottomMargin = __bottomMargin; + float bodyLeftMargin = __leftMargin; + float bodyRightMargin = __rightMargin; + + int scrollPanelMargin; + GET_SHAPE_CONFIG(OPTIONMENU::SCROLL_PANEL_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, scrollPanelMargin); + + FloatDimension screen = _ControlManager::GetInstance()->GetScreenSizeF(); + _ControlRotation rotation = __pOptionMenu->GetRotation(); + + if (__pOptionMenu->GetLayout() == _CONTROL_ORIENTATION_LANDSCAPE) + { + screen.SetSize(screen.height, screen.width); + } + + AdjustItemLayout(); + + bodyRect.width = __layoutSize.width + bodyLeftMargin + bodyRightMargin; + bodyRect.height = __layoutSize.height + bodyTopMargin + bodyBottomMargin + 2 * scrollPanelMargin; + + if (rotation == _CONTROL_ROTATION_270 && __pOptionMenu->GetLayout() == _CONTROL_ORIENTATION_LANDSCAPE) + { + bodyRect.x = screen.width - bodyRect.width; + } + + bodyRect.y = screen.height - bodyRect.height; + + bodyRect = CoordinateSystem::AlignToDevice(bodyRect); + + windowRect = bodyRect; + + bodyRect.x = 0.0f; + bodyRect.y = 0.0f; + + itemRect.x = bodyRect.x + bodyLeftMargin; + itemRect.y = bodyRect.y + bodyTopMargin + scrollPanelMargin; + itemRect.width = __layoutSize.width; + itemRect.height = __layoutSize.height; + + __pOptionMenu->SetWindowRect(windowRect); + __pOptionMenu->SetBodyRect(bodyRect); + __pOptionMenu->SetItemRect(itemRect); + + // _ScrollPanel API call sequence: SetBounds() -> SetScrollAreaBounds() + // _Scroll visual interaction if Bounds < ScrollAreaBounds + if (__pOptionMenu->IsVisible()) + { + __pOptionMenu->GetScrollPanel()->SetBounds(FloatRectangle(bodyRect.x + bodyLeftMargin, bodyRect.y + bodyTopMargin + scrollPanelMargin, + __layoutSize.width, __layoutSize.height)); + int itemCount = __pModel->GetItemCount(); + float itemHeight = __itemHeight + (__dividerHeight * 2.0f); + float layoutClientHeight = itemCount * itemHeight - (__dividerHeight * 2.0f); + __pOptionMenu->GetScrollPanel()->SetClientAreaHeight(layoutClientHeight); + } + + __pOptionMenu->SetMovable(true); + __pOptionMenu->SetResizable(true); + + __pOptionMenu->SetBounds(windowRect); + + __pOptionMenu->SetMovable(false); + __pOptionMenu->SetResizable(false); + + return E_SUCCESS; +} + +void +_OptionMenuPresenter::AdjustItemLayout(void) +{ + FloatDimension layoutSize(0.0f, 0.0f); + + int itemCount = __pModel->GetItemCount(); + + if (itemCount <= 0) + { + __layoutSize.width = __itemWidth; + __layoutSize.height = __itemHeight; + return; + } + + layoutSize = AdjustItemLayoutStyle(); + + FloatDimension screen = _ControlManager::GetInstance()->GetScreenSizeF(); + if (__pOptionMenu->GetLayout() == _CONTROL_ORIENTATION_LANDSCAPE) + { + screen.SetSize(screen.height, screen.width); + } + + int maxHeight = screen.height; + if (layoutSize.height > maxHeight) + { + layoutSize.height = maxHeight; + } + + __layoutSize = layoutSize; +} + +FloatDimension +_OptionMenuPresenter::AdjustItemLayoutStyle(void) +{ + int itemMaxCount = __pOptionMenu->GetMaximumVisibleItemsCount(); + + int itemCount = __pModel->GetItemCount(); + float itemHeight = __itemHeight + (__dividerHeight * 2.0f); + + FloatDimension layoutSize(__itemWidth, 0.0f); + + float layoutClientHeight = itemCount * itemHeight - (__dividerHeight * 2.0f); + float layoutMaxHeight = itemMaxCount * itemHeight - (__dividerHeight * 2.0f); + if (layoutClientHeight > layoutMaxHeight) + { + __scrollEnable = true; + layoutSize.height = layoutMaxHeight + itemHeight / 2; + } + else + { + __scrollEnable = false; + layoutSize.height = layoutClientHeight; + } + + return layoutSize; +} + +void +_OptionMenuPresenter::AdjustItemPosition(void) +{ + int itemCount = __pModel->GetItemCount(); + if (itemCount <= 0) + { + return; + } + + float itemHeight = __itemHeight + (__dividerHeight * 2.0f); + float drawItemY = 0.0f; + + float x = __pOptionMenu->GetBodyRect().x + __leftMargin; + float y = __pOptionMenu->GetBodyRect().y + __topMargin; + + _OptionMenuItem* pItem = null; + + for (int i = 0; i < itemCount; i++) + { + pItem = __pModel->GetItem(i); + + if (pItem == null) + { + break; + } + + FloatRectangle drawRect(x, drawItemY + y, __itemWidth, itemHeight); + + pItem->SetDrawRect(drawRect); + pItem->SetUpperDivider(i > 0); + pItem->SetLowerDivider(i < itemCount - 1); + pItem->SetParentScrollEnable(__scrollEnable); + pItem->SetBounds(FloatRectangle(0.0f, drawItemY, drawRect.width, drawRect.height)); + + if (!pItem->HasParent()) + { + __pOptionMenu->GetScrollPanel()->AttachChild(*pItem); + } + + drawItemY += itemHeight; + } +} + +int +_OptionMenuPresenter::GetItemIndexFromPosition(const FloatPoint& point) const +{ + int index = -1; + int itemCount = __pModel->GetItemCount(); + + if (itemCount < 0) + { + return -1; + } + + _OptionMenuItem* pItem = null; + + float scrollPosition = __pOptionMenu->GetScrollPanel()->GetScrollPosition(); + FloatPoint position(point.x, point.y + scrollPosition); + + for (int i = 0; i < itemCount; i++) + { + pItem = __pModel->GetItem(i); + + if (pItem == null) + { + break; + } + + FloatRectangle drawRect = pItem->GetDrawRect(); + + if (drawRect.Contains(position)) + { + index = i; + break; + } + } + + return index; +} + +result +_OptionMenuPresenter::Draw(void) +{ + result r = E_SUCCESS; + + Canvas* pCanvas = __pOptionMenu->GetCanvasN(); + SysTryReturnResult(NID_UI_CTRL, pCanvas != null, GetLastResult(), "Propagating"); + + // Clear canvas for drawing area of the OptionMenu. + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + FloatRectangle bounds(__pOptionMenu->GetWindowRect()); + pCanvas->Clear(FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height)); + + r = DrawBackground(pCanvas); + if (r != E_SUCCESS) + { + SysLog(NID_UI_CTRL, "[%s] Failed to draw background.", GetErrorMessage(r)); + } + + delete pCanvas; + return r; +} + +result +_OptionMenuPresenter::DrawFocus(int index) +{ + + result r = E_SUCCESS; + + ClearFocus(); + _OptionMenuItem* pItem = __pModel->GetItem(index); + if (pItem != null) + { + pItem->SetHighlighted(true); + pItem->Invalidate(true); + pItem->DrawFocus(); + __focusedIndex = index; + } + + return r; +} + +void +_OptionMenuPresenter::ClearFocus(void) +{ + _OptionMenuItem* pPreviousItem; + if (__focusedIndex != -1) + { + pPreviousItem = __pModel->GetItem(__focusedIndex); + if (pPreviousItem != null) + { + pPreviousItem->SetHighlighted(false); + pPreviousItem->RemoveFocusRing(); + pPreviousItem->Invalidate(true); + } + } +} + +void +_OptionMenuPresenter::OnEnterKeyReleased(int selectedIndex) +{ + _OptionMenuItem* pItem = null; + pItem = __pModel->GetItem(selectedIndex); + __selectedIndex = -1; + ClearFocus(); + + if (pItem != null) + { + if (pItem->HasSubItem()) + { + // Show SubItem + __pOptionMenu->ShowSubMenu(selectedIndex, *pItem); + return ; + } + else + { + __pOptionMenu->CloseAnimation(pItem->GetActionId()); + } + } + return; +} + +result +_OptionMenuPresenter::DrawBackground(Canvas* pCanvas) +{ + SysTryReturnResult(NID_UI_CTRL, pCanvas != null, E_SYSTEM, "A system error has occurred. pCanvas is null"); + + result r = E_SUCCESS; + + FloatRectangle bodyRect = __pOptionMenu->GetBodyRect(); + + const Bitmap* pBackgroundNormalBitmap = __pOptionMenu->GetBackgroundNormalBitmap(); + const Bitmap* pBackgroundEffectBitmap = __pOptionMenu->GetBackgroundEffectBitmap(); + + if (pBackgroundNormalBitmap == null && pBackgroundEffectBitmap == null) + { + pCanvas->SetForegroundColor(__pOptionMenu->GetColor()); + pCanvas->DrawRectangle(bodyRect); + } + else + { + if (pBackgroundNormalBitmap != null) + { + r = DrawBitmap(*pCanvas, bodyRect, *pBackgroundNormalBitmap); + } + + if (pBackgroundEffectBitmap != null) + { + r = DrawBitmap(*pCanvas, bodyRect, *pBackgroundEffectBitmap); + } + } + + return r; +} + +_UiTouchEventDelivery +_OptionMenuPresenter::OnPreviewTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + return _UI_TOUCH_EVENT_DELIVERY_FORCED_YES; +} + +bool +_OptionMenuPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + FloatPoint touchPosition = touchinfo.GetCurrentPosition(); + FloatRectangle itemRect = __pOptionMenu->GetItemRect(); + + if (__pOptionMenu->IsSubMenuShown()) + { + __pOptionMenu->DestroySubMenu(); + __pOptionMenu->SetTouchCapture(false, false); + return true; + } + + if (!itemRect.Contains(touchPosition)) + { + __selectedIndex = -1; + __touchOutRect = true; + return true; + } + + __selectedIndex = GetItemIndexFromPosition(touchPosition); + __touchOutRect = false; + return true; +} + +_UiTouchEventDelivery +_OptionMenuPresenter::OnPreviewTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + return _UI_TOUCH_EVENT_DELIVERY_FORCED_YES; +} + +bool +_OptionMenuPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + FloatPoint touchPosition = touchinfo.GetCurrentPosition(); + + if (__touchOutRect) + { + FloatRectangle itemRect = __pOptionMenu->GetItemRect(); + if (!itemRect.Contains(touchPosition)) + { + __selectedIndex = -1; + __pOptionMenu->CloseAnimation(-1); + return true; + } + else + { + __pOptionMenu->SetFocused(true); + } + } + + __pOptionMenu->Invalidate(true); + + int currentSelectedIndex = GetItemIndexFromPosition(touchPosition); + if (__selectedIndex != -1 && (__selectedIndex == currentSelectedIndex)) + { + _OptionMenuItem* pItem = null; + pItem = __pModel->GetItem(__selectedIndex); + __selectedIndex = -1; + + if (pItem != null) + { + if (pItem->HasSubItem()) + { + // Show SubItem + __pOptionMenu->ShowSubMenu(__selectedIndex, *pItem); + return true; + } + else + { + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pOptionMenu); + // Fire Action Event + __pOptionMenu->CloseAnimation(pItem->GetActionId()); + } + } + + } + return true; +} + +_UiTouchEventDelivery +_OptionMenuPresenter::OnPreviewTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + return _UI_TOUCH_EVENT_DELIVERY_FORCED_YES; +} + +bool +_OptionMenuPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + if (__scrollEnable) + { + __selectedIndex = -1; + } + ResetSelectedItem(); + + return true; +} + +bool +_OptionMenuPresenter::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + __pModel->ResetAllItem(); + return true; +} + +void +_OptionMenuPresenter::ResetSelectedItem(void) +{ + __pModel->ResetSelectedItem(__selectedIndex); +} + +void +_OptionMenuPresenter::OnActionPerformed(const _Control& source, int actionId) +{ + // for SubMenu Events + __pOptionMenu->DestroySubMenu(); + __pOptionMenu->CloseAnimation(actionId); +} + +void +_OptionMenuPresenter::OnFontChanged(Font* pFont) +{ + __pFont = pFont; + String fontName = __pOptionMenu->GetFont(); + + int itemCount = __pModel->GetItemCount(); + for (int i = 0; i < itemCount; i++) + { + _OptionMenuItem* pItem = __pModel->GetItem(i); + if (pItem != null) + { + pItem->SetFont(fontName); + } + } +} + +void +_OptionMenuPresenter::OnFontInfoRequested(unsigned long& style, float& size) +{ + style = FONT_STYLE_PLAIN; + size = __itemFontSize; +} + +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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + pElementOptionMenu->SetSupportOperatingGesture(false); + //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); + + int itemCount = __pModel->GetItemCount(); + for (int i = 0; i < itemCount; i++) + { + _OptionMenuItem* pItem = __pModel->GetItem(i); + if (pItem != null) + { + _AccessibilityContainer* pContainer = pItem->GetAccessibilityContainer(); + if (pContainer != null) + { + LinkedListT<_AccessibilityElement*> accessibilityElements; + _AccessibilityElement* pElement = null; + + pContainer->GetElements(accessibilityElements); + if (accessibilityElements.GetAt(0, pElement) == E_SUCCESS) + { + pElement->SetName(L"OptionMenuItem" + Integer::ToString(i)); + if (pItem->GetType() == OPTION_MENU_ITEM_DRAWING_TYPE_BITMAP) + { + String string; + GET_STRING_CONFIG(IDS_TPLATFORM_BODY_ICON, string); + pElement->SetLabel(string + pItem->GetText()); + } + else + { + pElement->SetLabel(pItem->GetText()); + } + + pElement->SetBounds(FloatRectangle(0.0f, 0.0f, pItem->GetBoundsF().width, pItem->GetBoundsF().height)); + } + pContainerOptionMenu->AddChildContainer(*pContainer); + } + } + } + } +} + +_OptionMenuItemInfo +_OptionMenuPresenter::GetItemFromPosition(const FloatPoint& position) +{ + _OptionMenuItemInfo itemInfo; + int index = GetItemIndexFromPosition(position); + itemInfo.pOptionMenuItem = __pModel->GetItem(index); + + itemInfo.bListItem = false; + itemInfo.pListItem = null; + return itemInfo; +} + +_OptionMenuItemInfo +_OptionMenuPresenter::FindItem(int index) +{ + _OptionMenuItemInfo itemInfo; + itemInfo.bListItem = false; + itemInfo.pListItem = null; + itemInfo.pOptionMenuItem = __pModel->GetItem(index); + return itemInfo; +} + +result +_OptionMenuPresenter::SetTopDrawnItemIndex(int index) +{ + return E_SUCCESS; +} + +result +_OptionMenuPresenter::DrawBitmap(Canvas& canvas, const FloatRectangle& bounds, const Bitmap& bitmap) +{ + 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."); + } + else + { + r = canvas.DrawBitmap(bounds, bitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Fail to draw bitmap."); + } + + return r; +} + +}}} // Tizen::Ui: Control diff --git a/src/ui/controls/FUiCtrl_OverlayAgent.cpp b/src/ui/controls/FUiCtrl_OverlayAgent.cpp new file mode 100644 index 0000000..9ee34b1 --- /dev/null +++ b/src/ui/controls/FUiCtrl_OverlayAgent.cpp @@ -0,0 +1,1804 @@ +// +// 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_OverlayAgent.cpp + * @brief This file contains implementation of _OverlayAgent class + */ + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include "FUi_Control.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_EcoreEvas.h" +#include "FUi_EcoreEvasMgr.h" +#include "FUi_Window.h" +#include "FUiAnim_EflNode.h" +#include "FUiAnim_ControlVisualElement.h" +#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)) + +using namespace std; +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Graphics; +using namespace Tizen::Io; +using namespace Tizen::Media; +using namespace Tizen::System; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Ui::Animations; + +namespace +{ +bool +CheckXvExtension(Display* pDisplay, int* pFirstPort, int* pCountPort) +{ + unsigned int version = 0; + unsigned int release = 0; + unsigned int requestBase = 0; + unsigned int eventBase = 0; + unsigned int errorBase = 0; + + // Query and print Xvideo properties + int returnValue = XvQueryExtension(pDisplay, &version, &release, &requestBase, &eventBase, &errorBase); + if (returnValue != Success) + { + if (returnValue == XvBadExtension) + { + SysSecureLog(NID_UI_CTRL, "XvBadExtension returned at XvQueryExtension!"); + } + else if (returnValue == XvBadAlloc) + { + SysSecureLog(NID_UI_CTRL, "XvBadAlloc returned at XvQueryExtension!"); + } + else + { + SysSecureLog(NID_UI_CTRL, "Other error happened at XvQueryExtension!"); + } + + return false; + } + + unsigned int adaptors = 0; + XvAdaptorInfo* pAdaptorInfo = null; + returnValue = XvQueryAdaptors(pDisplay, DefaultRootWindow(pDisplay), &adaptors, &pAdaptorInfo); + if (returnValue != Success) + { + if (returnValue == XvBadExtension) + { + SysSecureLog(NID_UI_CTRL, "XvBadExtension returned at XvQueryExtension."); + } + else if (returnValue == XvBadAlloc) + { + SysSecureLog(NID_UI_CTRL, "XvBadAlloc returned at XvQueryExtension."); + } + else + { + SysSecureLog(NID_UI_CTRL, "Other error happaned at XvQueryAdaptors."); + } + + if (pAdaptorInfo != null) + { + XvFreeAdaptorInfo(pAdaptorInfo); + } + + return false; + } + + int port = -1; + if (adaptors > 0 && pAdaptorInfo != null) + { + for (unsigned int i = 0; i < adaptors; i++) + { + for (unsigned int j = 0; j < pAdaptorInfo[i].num_formats; j++) + { + SysSecureLog(NID_UI_CTRL, "The current value of depth is %d and visual is %ld.", pAdaptorInfo[i].formats[j].depth, pAdaptorInfo[i].formats[j].visual_id); + } + } + + port = pAdaptorInfo[0].base_id; + + *pFirstPort = port; + *pCountPort = pAdaptorInfo[0].num_ports; + SysSecureLog(NID_UI_CTRL, "The current value of port is %d", port); + } + + if (pAdaptorInfo != null) + { + XvFreeAdaptorInfo(pAdaptorInfo); + } + + if (port == -1) + { + return false; + } + + return true; +} + +Eina_Bool +OnPixmapDamaged(void* pData, int type, void* pEvent) +{ + Ecore_X_Event_Damage* pDamageEvent = (Ecore_X_Event_Damage*)pEvent; + SysTryReturn(NID_UI_CTRL, pDamageEvent != null, ECORE_CALLBACK_PASS_ON, E_INVALID_DATA, "[E_INVALID_DATA] The current value of DamageEvent is invalid."); + + 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."); + + for (int i = 0; i < Tizen::Ui::Controls::_OVERLAY_AGENT_PIXMAP_MAX; i++) + { + if (pOverlayAgent->GetPixmap(i) == pDamageEvent->drawable) + { + pOverlayAgent->SetRendererFlushNeeded(i); + pOverlayAgent->SetBufferFree(i); + + return ECORE_CALLBACK_PASS_ON; + } + } + + return ECORE_CALLBACK_PASS_ON; +} + +void +OnEvasImageDamaged(void* pData, Evas_Object* pImageObject) +{ + Tizen::Ui::Controls::_OverlayAgent* pOverlayAgent = static_cast(pData); + SysTryReturnVoidResult(NID_UI_CTRL, pOverlayAgent != null, E_INVALID_DATA, "[E_INVALID_DATA] Failed to get OverlayAgent from DamagedEvent."); + + Evas_Object* pRendererImageObject = pOverlayAgent->GetRendererImageObject(); + SysTryReturnVoidResult(NID_UI_CTRL, pRendererImageObject != null, E_INVALID_DATA, "[E_INVALID_DATA] Failed to get Renderer ImageObject of OverlayAgent."); + + if (pRendererImageObject != pImageObject) + { + return; + } + + Dimension newImageSize(0,0); + evas_object_image_size_get(pImageObject, &newImageSize.width, &newImageSize.height); + + Dimension rendererImageSize(0,0); + evas_object_image_size_get(pRendererImageObject, &rendererImageSize.width, &rendererImageSize.height); + + if (!newImageSize.Equals(rendererImageSize)) + { + SysSecureLog(NID_UI_CTRL,"newImageSize [%d, %d] rendererImageSize [%d, %d]", newImageSize.width, newImageSize.height, rendererImageSize.width, rendererImageSize.height); + 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,}; + +int _OverlayAgent::__overlayAgentCount = 0; +int _OverlayAgent::__dstRectMinWidth = -1; +int _OverlayAgent::__dstRectMinHegith = -1; +int _OverlayAgent::__srcRectMinWidth = -1; +int _OverlayAgent::__srcRectMinHegith = -1; +int _OverlayAgent::__overlayWidthUnit = -1; +int _OverlayAgent::__overlayHeightUnit = -1; +int _OverlayAgent::__overlayMaxCount = -1; +bool _OverlayAgent::__OverlayAgentBufferPixelFormat[] = {false, }; + +struct visualElementDeleter +{ + void operator()(_VisualElement* pVisualElement) + { + pVisualElement->Destroy(); + } +}; + +struct xVImageDeleter +{ + void operator()(XvImage* pXvImage) + { + XFree(pXvImage); + pXvImage = null; + } +}; + +_OverlayAgent::_OverlayVisualElement::_OverlayVisualElement(void) + : __pOverlayTimer(null) + , __pImageObject(null) + , __showStateChanged(false) +{ +} + +_OverlayAgent::_OverlayVisualElement::_OverlayVisualElement(const _OverlayVisualElement& rhs) + : _VisualElement(rhs) + , __pOverlayTimer(null) + , __pImageObject(rhs.__pImageObject) + , __showStateChanged(rhs.__showStateChanged) +{ +} + +_OverlayAgent::_OverlayVisualElement::~_OverlayVisualElement(void) +{ + if (__pOverlayTimer) + { + __pOverlayTimer->Cancel(); + delete __pOverlayTimer; + __pOverlayTimer = null; + } + + if (__pImageObject) + { + evas_object_event_callback_del(__pImageObject, EVAS_CALLBACK_SHOW, OnImageObjectShown); + evas_object_event_callback_del(__pImageObject, EVAS_CALLBACK_HIDE, OnImageObjectHidden); + } +} + +result +_OverlayAgent::_OverlayVisualElement::Construct(void) +{ + if (!__pOverlayTimer) + { + __pOverlayTimer = new (nothrow) Timer(); + __pOverlayTimer->Construct(*this); + } + + return _VisualElement::Construct(); +} + +Evas_Object* +_OverlayAgent::_OverlayVisualElement::GetImageObject(void) const +{ + return __pImageObject; +} + +void +_OverlayAgent::_OverlayVisualElement::SetImageObject(Evas_Object* pImageObject) +{ + if (__pImageObject) + { + evas_object_event_callback_del(__pImageObject, EVAS_CALLBACK_SHOW, OnImageObjectShown); + evas_object_event_callback_del(__pImageObject, EVAS_CALLBACK_HIDE, OnImageObjectHidden); + } + + __pImageObject = pImageObject; + + if (__pImageObject) + { + evas_object_event_callback_add(__pImageObject, EVAS_CALLBACK_SHOW, OnImageObjectShown, this); + evas_object_event_callback_add(__pImageObject, EVAS_CALLBACK_HIDE, OnImageObjectHidden, this); + } +} + +void +_OverlayAgent::_OverlayVisualElement::SetImageObjectShowStateChanged(void) +{ + __showStateChanged = true; + + if (IsFailed(__pOverlayTimer->Start(0))) + { + __pOverlayTimer->Cancel(); + __pOverlayTimer->Start(0); + SysSecureLog(NID_UI_CTRL, "The timer is restarted."); + ClearLastResult(); + } +} + +void +_OverlayAgent::_OverlayVisualElement::OnImageObjectShown(void* pData, Evas *pEvas, Evas_Object *pImageObject, void *event_info) +{ + _OverlayVisualElement* pOverlayVE = reinterpret_cast<_OverlayVisualElement*>(pData); + if (pOverlayVE) + { + pOverlayVE->SetImageObjectShowStateChanged(); + SysSecureLog(NID_UI_CTRL, "The show state of Renderer VisualElement is set to SHOW"); + } +} + +void +_OverlayAgent::_OverlayVisualElement::OnImageObjectHidden(void* pData, Evas *pEvas, Evas_Object *pImageObject, void *event_info) +{ + _OverlayVisualElement* pOverlayVE = reinterpret_cast<_OverlayVisualElement*>(pData); + if (pOverlayVE) + { + pOverlayVE->SetImageObjectShowStateChanged(); + SysSecureLog(NID_UI_CTRL, "The show state of Renderer VisualElement is set to HIDE"); + } +} + +VisualElement* +_OverlayAgent::_OverlayVisualElement::CloneN(void) const +{ + return new (nothrow) _OverlayVisualElement(*this); +} + +void +_OverlayAgent::_OverlayVisualElement::OnTimerExpired(Timer& timer) +{ + if (&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* +_OverlayAgent::CreateInstanceN(_OverlayAgentStyle style, const _Control& parentControl, const FloatRectangle& logicalBounds, const Rectangle& physicalBounds) +{ + unique_ptr<_OverlayAgent> pOverlayAgent(new (nothrow) _OverlayAgent(style, parentControl, logicalBounds, physicalBounds)); + SysTryReturn(NID_UI_CTRL, pOverlayAgent != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + return pOverlayAgent.release(); +} + +_OverlayAgent::_OverlayAgent(_OverlayAgentStyle style, const _Control& parentControl, const FloatRectangle& logicalBounds, const Rectangle& physicalBounds) + : __pRendererVE(null) + , __pParentVE(null) + , __pImageObject(null) + , __style(style) + , __currentRotation(_OVERLAY_AGENT_ROTATION_NONE) + , __savedColorFormat(FOURCC('R','G','B','4')) + , __currentColorFormat(_OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_ARGB8888) + , __currentSourceBufferSize(0,0) + , __standardRendererBounds(0.0f, 0.0f, 0.0f, 0.0f) + , __standardParentBounds(0.0f, 0.0f, 0.0f, 0.0f) + , __needToRellaocImage(false) + , __pCurrentSourceBuffer(null) + , __pConvertedSourceBuffer(null) + , __pPixmapEventHandler(null) + , __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--; + + if (__xvPort > 0) + { + UngrabXvPort(); + } + + for (int i = 0; i < _OVERLAY_AGENT_PIXMAP_MAX; i++) + { + if (__pixmapDamageHandle[i]) + { + ecore_x_damage_free(__pixmapDamageHandle[i]); + __pixmapDamageHandle[i] = 0; + } + + XFreePixmap((Display*) ecore_x_display_get(), __pixmap[i].__nativePixmap); + __pixmap[i].__nativePixmap = 0; + __pixmap[i].__pixmapState = _PIXMAP_STATE_FREE; + __pSurfaceForPixmap = null; + } + + if (__pPixmapEventHandler) + { + ecore_event_handler_del(__pPixmapEventHandler); + __pPixmapEventHandler = null; + } + + if (__pShmInfo) + { + XShmDetach((Display*)ecore_x_display_get(), __pShmInfo); + shmdt(__pShmInfo->shmaddr); + shmctl(__pShmInfo->shmid, IPC_RMID, NULL); + delete __pShmInfo; + __pShmInfo = null; + } + + if (__pXvImage) + { + XFree(__pXvImage); + __pXvImage = null; + } + + if (__pConvertedSourceBuffer) + { + delete __pConvertedSourceBuffer; + __pConvertedSourceBuffer = null; + } + + if (__pCurrentSourceBuffer) + { + delete __pCurrentSourceBuffer; + __pCurrentSourceBuffer = null; + } + + if (__pRendererVE != null) + { + __pRendererVE->Destroy(); + __pRendererVE = null; + } + + if (__pImageObject) + { + evas_object_del(__pImageObject); + __pImageObject = null; + } + + if (__pMutex) + { + __pMutex->Release(); + delete __pMutex; + __pMutex = null; + } +} + +result +_OverlayAgent::GetBufferInfo(BufferInfo& bufferInfo) const +{ + SysTryReturnResult(NID_UI_CTRL, __pImageObject != null, E_SYSTEM, "The Renderer ImageObject is null."); + SysTryReturnResult(NID_UI_CTRL, __pRendererVE != null, E_SYSTEM, "The Renderer Visual Element is null."); + + int width = 0; + int height = 0; + evas_object_geometry_get(__pImageObject, NULL, NULL, &width, &height); + + bufferInfo.width = width; + bufferInfo.pitch = width; + bufferInfo.height = height; + bufferInfo.bitsPerPixel = 32; + bufferInfo.pixelFormat = PIXEL_FORMAT_ARGB8888; + + _BufferInfoImpl* pBufferInfoImpl = _BufferInfoImpl::GetInstance(bufferInfo); + SysTryReturnResult(NID_UI_CTRL, pBufferInfoImpl != null, E_SYSTEM, "Failed to get instance of buffer info."); + + result r = E_SUCCESS; + + if(__style == _OVERLAY_AGENT_STYLE_REGION_SW || __style == _OVERLAY_AGENT_STYLE_PANEL_SW) + { + pBufferInfoImpl->SetHandle(_BufferInfoImpl::HANDLE_TYPE_VE_SURFACE, reinterpret_cast(__pImageObject)); + SysSecureLog(NID_UI_CTRL,"The returned handle of BufferInfo is a evas image object (HANDLE_TYPE_VE_SURFACE)"); + } + else + { + 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)"); + } + + pBufferInfoImpl->SetBounds(Rectangle(0, 0, width, height)); + + return r; +} + +result +_OverlayAgent::SetInputBuffer(const ByteBuffer& srcBuffer, const Dimension& srcDim, _OverlayAgentBufferPixelFormat srcFormat) +{ + SysTryReturnResult(NID_UI_CTRL, srcBuffer.GetPointer() != null, E_INVALID_ARG, "The current value of input source buffer is invalid."); + SysTryReturnResult(NID_UI_CTRL, srcBuffer.GetCapacity() > 0, E_INVALID_ARG, "The current size of input source buffer is invalid."); + SysTryReturnResult(NID_UI_CTRL, srcDim.width >= GetSrcRectMinWidth(), E_INVALID_ARG, "The width of dimension [%d] is under the minimum size.", srcDim.width); + SysTryReturnResult(NID_UI_CTRL, srcDim.height >= GetSrcRectMinHeight(), E_INVALID_ARG, "The height of dimension [%d] is under the minimum size.", srcDim.height); + + if (__currentColorFormat != srcFormat) + { + unsigned int colorFormat = 0; + + switch (srcFormat) + { + case _OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_ARGB8888: + colorFormat = FOURCC('R','G','B','4'); + break; + case _OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_RGB565: + colorFormat = FOURCC('R','G','B','P'); + break; + case _OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_YCbCr420_PLANAR: + colorFormat = FOURCC('I','4','2','0'); + break; + case _OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_NV12: + colorFormat = FOURCC('N','V','1','2'); + break; + case _OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_UYVY: + colorFormat = FOURCC('U','Y','V','Y'); + break; + default: + SysLogException(NID_UI_CTRL, E_UNSUPPORTED_FORMAT, "The specified pixel format is not supported."); + return E_UNSUPPORTED_FORMAT; + } + + __savedColorFormat = colorFormat; + __currentColorFormat = srcFormat; + __needToRellaocImage = true; + } + + if (!srcDim.Equals(__currentSourceBufferSize)) + { + __currentSourceBufferSize.width = srcDim.width; + __currentSourceBufferSize.height = srcDim.height; + __needToRellaocImage = true; + } + + __pCurrentSourceBuffer = &srcBuffer; + + if (__needToRellaocImage) + { + SysSecureLog(NID_UI_CTRL,"The current buffer pointer is %x, size is %d, color format is %d", + __pCurrentSourceBuffer->GetPointer(), __pCurrentSourceBuffer->GetCapacity(), __savedColorFormat); + } + + return E_SUCCESS; +} + +result +_OverlayAgent::Draw(void) +{ + SysTryReturnResult(NID_UI_CTRL, __pCurrentSourceBuffer->GetPointer() != null, E_SYSTEM, "The current input user buffer is null. (nothing to draw)"); + + result r = E_SUCCESS; + + if(__style == _OVERLAY_AGENT_STYLE_REGION_SW || __style == _OVERLAY_AGENT_STYLE_PANEL_SW) + { + r = PutEvasImage(); + } + else + { + r = PutXvImage(); + } + + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "Propagating."); + + return r; +} + + +result +_OverlayAgent::GrabXvPort(void) +{ + Display* pDisplay = (Display*)ecore_x_display_get(); + SysTryReturnResult(NID_UI_CTRL, pDisplay != null, E_SYSTEM, "The current value of Display is null"); + + int baseXvPort = -1; + int portCount = -1; + if (!CheckXvExtension(pDisplay, &baseXvPort, &portCount)) + { + SysTryReturnResult(NID_UI_CTRL, false, E_SYSTEM, "Failed to check XvExtension"); + } + + SysTryReturnResult(NID_UI_CTRL, baseXvPort > 0, E_SYSTEM, "The current value of base XvPort is invalid."); + 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; + + for (int index = 0; index < portCount; index++) + { + if(!__isPortGrabbed[index]) + { + int tempPort = __baseXvPort + index; + if (XvGrabPort(pDisplay, tempPort, 0) != Success) + { + SysSecureLog(NID_UI_CTRL, "The current XvPort[%d] has been alreadly used by another process", tempPort); + } + else + { + __xvPort = tempPort; + __isPortGrabbed[index] = true; + break; + } + } + } + + 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; +} + +void +_OverlayAgent::UngrabXvPort(void) +{ + ClearLastResult(); + + if (__xvPort > 0 && (__xvPort - __baseXvPort) >= 0 && __isPortGrabbed[__xvPort - __baseXvPort]) + { + Display* pDisplay = (Display*) ecore_x_display_get(); + Atom atom = XInternAtom(pDisplay, "_USER_WM_PORT_ATTRIBUTE_STREAM_OFF", False); + 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[0].__nativePixmap); + + __isPortGrabbed[__xvPort - __baseXvPort] = false; + __xvPort = -1; + } +} + +result +_OverlayAgent::PutXvImage(void) +{ + 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"); + + if (__pXvImage == null || __needToRellaocImage) + //||(__pXvImage && __pXvImage->data_size != currentSourceBufferSize->GetCapacity()) ) + { + if (__xvPort != -1) + { + UngrabXvPort(); + } + + if (__pXvImage != null) + { + if (__pShmInfo) + { + XShmDetach(pDisplay, __pShmInfo); + shmdt(__pShmInfo->shmaddr); + shmctl(__pShmInfo->shmid, IPC_RMID, NULL); + delete __pShmInfo; + __pShmInfo = null; + } + + if (__pXvImage) + { + XFree(__pXvImage); + __pXvImage = null; + } + } + } + + if (__xvPort == -1) + { + result r = GrabXvPort(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "Propagating."); + } + + if (__needToRellaocImage) + { + unique_ptr pShmInfo(new (std::nothrow) XShmSegmentInfo()); + SysTryReturnResult(NID_UI_CTRL, pShmInfo != null, E_SYSTEM, "Failed to create XShmSegmentInfo"); + + 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."); + + __pShmInfo = pShmInfo.release(); + __pXvImage = pXvImage.release(); + } + + if (__pXvImage == null) + { + SysLogException(NID_UI_CTRL, E_SYSTEM, "[E_SYSTEM] Failed to get XvImage"); + return E_SYSTEM; + } + + memcpy(__pXvImage->data, __pCurrentSourceBuffer->GetPointer(), __pXvImage->data_size); + __pCurrentSourceBuffer = null; + + int imageWidth = 0; + int imageHeight = 0; + evas_object_image_size_get(__pImageObject, &imageWidth, &imageHeight); + + GC gc= DefaultGCOfScreen(DefaultScreenOfDisplay(pDisplay)); + XvShmPutImage(pDisplay, __xvPort, __pixmap[0].__nativePixmap, gc, __pXvImage, 0, 0, __currentSourceBufferSize.width, __currentSourceBufferSize.height, 0, 0, imageWidth, imageHeight, False); + XSync(pDisplay, 0); + + if (__needToRellaocImage) + { + SysSecureLog(NID_UI_CTRL, "The current value of source buffer size is [%d,%d]", __currentSourceBufferSize.width, __currentSourceBufferSize.height); + SysSecureLog(NID_UI_CTRL, "The current value of destination XvImage size is [%d,%d]", imageWidth, imageHeight); + __needToRellaocImage = false; + } + + result r = __pRendererVE->SetFlushNeeded(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r,"[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +_OverlayAgent::PutEvasImage(void) +{ + SysTryReturnResult(NID_UI_CTRL, __pImageObject != null, E_SYSTEM, "The current value of Renderer ImageObject is null"); + SysTryReturnResult(NID_UI_CTRL, __pCurrentSourceBuffer->GetPointer() != null, E_SYSTEM, "The current value of Renderer byte buffer is null"); + + result r = E_SUCCESS; + + // Create new buffer to convert pixel format + if (__needToRellaocImage || __pConvertedSourceBuffer == null || + !(__pConvertedSourceBuffer && (__pConvertedSourceBuffer->GetCapacity() == __pCurrentSourceBuffer->GetCapacity()))) + { + if (__pConvertedSourceBuffer != null) + { + __pConvertedSourceBuffer->SetPosition(0); + delete __pConvertedSourceBuffer; + __pConvertedSourceBuffer = null; + } + + __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); + if (r != E_SUCCESS) + { + delete __pConvertedSourceBuffer; + __pConvertedSourceBuffer = null; + SysLogException(NID_UI_CTRL, r, "[%s] Failed to construct a byte buffer for EvasImageObject.", GetErrorMessage(r)); + + return r; + } + } + + __pConvertedSourceBuffer->SetPosition(0); + + switch (__currentColorFormat) + { + case _OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_ARGB8888: + r = __pConvertedSourceBuffer->SetArray(__pCurrentSourceBuffer->GetPointer(), 0, __pConvertedSourceBuffer->GetCapacity()); + break; + case _OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_RGB565: + r = _ImageUtil::ConvertPixelFormat(*__pCurrentSourceBuffer, MEDIA_PIXEL_FORMAT_RGB565LE, __currentSourceBufferSize.width, __currentSourceBufferSize.height, *__pConvertedSourceBuffer, MEDIA_PIXEL_FORMAT_BGRA8888); + break; + case _OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_YCbCr420_PLANAR: + r = _ImageUtil::ConvertPixelFormat(*__pCurrentSourceBuffer, MEDIA_PIXEL_FORMAT_YUV420P, __currentSourceBufferSize.width, __currentSourceBufferSize.height, *__pConvertedSourceBuffer, MEDIA_PIXEL_FORMAT_BGRA8888); + break; + case _OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_NV12: + r = _ImageUtil::ConvertPixelFormat(*__pCurrentSourceBuffer, MEDIA_PIXEL_FORMAT_NV12, __currentSourceBufferSize.width, __currentSourceBufferSize.height, *__pConvertedSourceBuffer, MEDIA_PIXEL_FORMAT_BGRA8888); + break; + case _OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_UYVY: + r = _ImageUtil::ConvertPixelFormat(*__pCurrentSourceBuffer, MEDIA_PIXEL_FORMAT_UYVY422, __currentSourceBufferSize.width, __currentSourceBufferSize.height, *__pConvertedSourceBuffer, MEDIA_PIXEL_FORMAT_BGRA8888); + break; + default: + SysLogException(NID_UI_CTRL, E_UNSUPPORTED_FORMAT, "[E_UNSUPPORTED_FORMAT] The specified pixel format is not supported."); + return E_UNSUPPORTED_FORMAT; + } + + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r,"Propagating."); + + __pCurrentSourceBuffer = null; + void* pImageData = (void*)(__pConvertedSourceBuffer->GetPointer()); + SysTryReturnResult(NID_UI_CTRL, pImageData != null, E_SYSTEM, "The converted image data for Overlay Renderer VisualElement is invalid."); + + 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); + + if (__needToRellaocImage) + { + SysSecureLog(NID_UI_CTRL, "The current value of source buffer bounds is [%d,%d,%d, %d]", 0, 0, __currentSourceBufferSize.width, __currentSourceBufferSize.height); + __needToRellaocImage = false; + } + + r = __pRendererVE->SetFlushNeeded(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r,"[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +_OverlayAgent::SetRotation(_OverlayAgentRotation rotation) +{ + SysTryReturnResult(NID_UI_CTRL, __pRendererVE != null, E_SYSTEM, "The Renderer Visual Element is null"); + SysTryReturnResult(NID_UI_CTRL, rotation < _OVERLAY_AGENT_ROTATION_MAX, E_INVALID_ARG, "The value of input rotation [%d] is invalid.", rotation); + + if (rotation == __currentRotation) + { + return E_SUCCESS; + } + + float initialZAngle = __pRendererVE->GetProperty(L"transform.rotation.z").ToFloat(); + float rotatedZAngle = initialZAngle; + + switch (rotation) + { + case _OVERLAY_AGENT_ROTATION_NONE: // fall through + case _OVERLAY_AGENT_ROTATION_NONE_LR: // fall through + case _OVERLAY_AGENT_ROTATION_NONE_UD: + rotatedZAngle = 0.0f; + break; + + case _OVERLAY_AGENT_ROTATION_90: // fall through + case _OVERLAY_AGENT_ROTATION_90_LR: // fall through + case _OVERLAY_AGENT_ROTATION_90_UD: + rotatedZAngle = 90.0f; + break; + + case _OVERLAY_AGENT_ROTATION_180: // fall through + case _OVERLAY_AGENT_ROTATION_180_LR: // fall through + case _OVERLAY_AGENT_ROTATION_180_UD: + rotatedZAngle = 180.0f; + break; + + case _OVERLAY_AGENT_ROTATION_270: // fall through + case _OVERLAY_AGENT_ROTATION_270_LR: // fall through + case _OVERLAY_AGENT_ROTATION_270_UD: + rotatedZAngle = 270.0f; + break; + + default: + break; + } + + //Set bounds of rotated renderer + FloatRectangle rendererBounds = __standardRendererBounds; + if (rotatedZAngle == 90.0f || rotatedZAngle == 270.0f ) + { + rendererBounds.x = __standardRendererBounds.x - ((__standardRendererBounds.height - __standardRendererBounds.width) / 2.0f); + rendererBounds.y = __standardRendererBounds.y + ((__standardRendererBounds.height - __standardRendererBounds.width) / 2.0f); + std::swap(rendererBounds.height, rendererBounds.width); + } + + result r = __pRendererVE->SetBounds(rendererBounds); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = __pRendererVE->SetProperty(L"transform.rotation.z", rotatedZAngle); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + SysLog(NID_UI_CTRL, "The current Overlay Renderer is rotated (%d -> %d)", static_cast(initialZAngle), static_cast(rotatedZAngle)); + + switch (rotation) + { + case _OVERLAY_AGENT_ROTATION_NONE: // fall through + case _OVERLAY_AGENT_ROTATION_90: // fall through + case _OVERLAY_AGENT_ROTATION_180: // fall through + case _OVERLAY_AGENT_ROTATION_270: + r = __pRendererVE->SetProperty(L"transform.rotation.x", 0.0f); + r = __pRendererVE->SetProperty(L"transform.rotation.y", 0.0f); + break; + + case _OVERLAY_AGENT_ROTATION_NONE_UD: // fall through + case _OVERLAY_AGENT_ROTATION_180_UD: // fall through + case _OVERLAY_AGENT_ROTATION_90_LR: // fall through + case _OVERLAY_AGENT_ROTATION_270_LR: + r = __pRendererVE->SetProperty(L"transform.rotation.x", 180.0f); + r = __pRendererVE->SetProperty(L"transform.rotation.y", 0.0f); + SysLog(NID_UI_CTRL, "The current Overlay Renderer is flipped over up side down."); + break; + + case _OVERLAY_AGENT_ROTATION_NONE_LR: // fall through + case _OVERLAY_AGENT_ROTATION_180_LR: // fall through + case _OVERLAY_AGENT_ROTATION_90_UD: // fall through + case _OVERLAY_AGENT_ROTATION_270_UD: + r = __pRendererVE->SetProperty(L"transform.rotation.x", 0.0f); + r = __pRendererVE->SetProperty(L"transform.rotation.y", 180.0f); + SysLog(NID_UI_CTRL, "The current Overlay Renderer is flipped over left side right."); + break; + + default: + break; + } + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + __currentRotation = rotation; + + r = __pRendererVE->SetFlushNeeded(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +result +_OverlayAgent::SetDestination(const FloatDimension& dimension) +{ + SysTryReturnResult(NID_UI_CTRL, __pParentVE != null, E_SYSTEM, "The Renderer Visual Element is null"); + SysTryReturnResult(NID_UI_CTRL, __pRendererVE != null, E_SYSTEM, "The Renderer Visual Element is null"); + if (__standardRendererBounds.width == dimension.width && __standardRendererBounds.height == dimension.height && + __standardParentBounds.width == __pParentVE->GetBounds().width && __standardParentBounds.height == __pParentVE->GetBounds().height) + { + return E_SUCCESS; + } + + //Set bounds of saved renderer + FloatRectangle parentBounds= __pParentVE->GetBounds(); + + if (parentBounds.width >= dimension.width) + { + __standardRendererBounds.x = (parentBounds.width - dimension.width) / 2.0f; + __standardRendererBounds.width = dimension.width; + } + else + { + __standardRendererBounds.x = 0.0f; + __standardRendererBounds.width = parentBounds.width; + } + + if (parentBounds.height >= dimension.height) + { + __standardRendererBounds.y = (parentBounds.height - dimension.height) / 2.0f; + __standardRendererBounds.height = dimension.height; + } + else + { + __standardRendererBounds.y = 0.0f; + __standardRendererBounds.height = parentBounds.height; + } + + //Set bounds of resizing renderer + float parentWidth = parentBounds.width; + float parentHeight = parentBounds.height; + FloatDimension inputDimension(dimension.width, dimension.height); + + Variant rotationAngle = __pRendererVE->GetProperty(L"transform.rotation.z"); + if(rotationAngle.ToFloat() == 90.0f || rotationAngle.ToFloat() == 270.0f) + { + std::swap(parentWidth, parentHeight); + std::swap(inputDimension.width, inputDimension.height); + } + + FloatRectangle rendererBounds = __standardRendererBounds; + + if (parentWidth >= inputDimension.width) + { + rendererBounds.x = (parentBounds.width - inputDimension.width) / 2.0f; + rendererBounds.width = inputDimension.width; + } + else + { + rendererBounds.x = 0.0f; + rendererBounds.width = parentBounds.width; + } + + if (parentHeight >= inputDimension.height) + { + rendererBounds.y = (parentBounds.height - inputDimension.height) / 2.0f; + rendererBounds.height = inputDimension.height; + } + else + { + rendererBounds.y = 0.0f; + rendererBounds.height = parentBounds.height; + } + SysLog(NID_UI_CTRL, "The current bounds of resized renderer is [%.3f, %.3f, %.3f, %.3f]", + __standardRendererBounds.x, __standardRendererBounds.y, __standardRendererBounds.width, __standardRendererBounds.height); + + result r = __pRendererVE->SetBounds(rendererBounds); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = __pRendererVE->SetFlushNeeded(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + __standardParentBounds = __pParentVE->GetBounds(); + + return r; +} + +result +_OverlayAgent::SetAspectRatio(bool enable) +{ + return E_SUCCESS; +} + +FloatRectangle +_OverlayAgent::GetBounds(void) const +{ + SysTryReturn(NID_UI_CTRL, __pRendererVE != null, FloatRectangle(0.0f, 0.0f, 0.1f, 0.1f), E_SYSTEM, "The Renderer Visual Element is null"); + return __standardRendererBounds; +} + +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, "Memory allocation failed."); + + result r = pRendererVE->Construct(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + pRendererVE->SetName("OverlayRenderer"); + pRendererVE->SetShowState(true); + //pRendererVE->SetImplicitAnimationEnabled(true); + pRendererVE->SetImplicitAnimationEnabled(false); + pRendererVE->SetZOrderGroup(_CONTROL_LAYER_OVERLAY); + + FloatPoint logicalPoint(0.0f, 0.0f); + if(__style == _OVERLAY_AGENT_STYLE_REGION_SW || __style == _OVERLAY_AGENT_STYLE_REGION_GL) + { + logicalPoint.x = logicalBounds.x; + logicalPoint.y = logicalBounds.y; + } + + 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."); + + __pParentVE->SetName("OverlayPanel"); + r = __pParentVE->InsertChild(pRendererVE.get(), null, true); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __pParentVE->SetSurfaceOpaque(true); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + + // Get and Set ImageObject of Renderer VisualElement + _EflNode* pEflNode = dynamic_cast<_EflNode*>(pRendererVE->GetNativeNode()); + SysTryReturnResult(NID_UI_CTRL, pEflNode != null, E_SYSTEM, "Failed to get EflNode from Renderer VisualElement."); + + Evas* pEvas = pEflNode->GetEvas(); + SysTryReturnResult(NID_UI_CTRL, pEvas != null, E_SYSTEM, "Failed to get 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_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.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)); + + pRendererVE->SetAnchor(FloatPoint(0.5f, 0.5f)); + __pRendererVE = pRendererVE.release(); + __standardRendererBounds = __pRendererVE->GetBounds(); + + return r; +} + +result +_OverlayAgent::CreatePixmap(const Rectangle& physicalBounds, int pixmapIndex) +{ + //Set size of pixmap + Dimension pixmapSize(physicalBounds.width, physicalBounds.height); + SysTryReturnResult(NID_UI_CTRL, (pixmapSize.width >= GetDstRectMinWidth()) && (pixmapSize.height >= GetDstRectMinHeight()), + E_SYSTEM, "input size (%d, %d) is too small to create a pixmap",pixmapSize.width, pixmapSize.height); + + // Create pixmap + Display *pDisplay = (Display*)ecore_x_display_get(); + SysTryReturnResult(NID_UI_CTRL, pDisplay != null, E_SYSTEM, "The current value of Display is null"); + + __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[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[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[pixmapIndex].__nativePixmap; + +// 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"); + + 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"); + } + + SysSecureLog(NID_UI_CTRL,"The [%d]th pixmap[%d] is Created", pixmapIndex, (unsigned int) __pixmap[pixmapIndex].__nativePixmap); + + return E_SUCCESS; + +CATCH: + for (int i = 0; i < _OVERLAY_AGENT_PIXMAP_MAX; i++) + { + 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; + } + } + + 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++) + { + result r = CreatePixmap(physicalBounds, i); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + return E_SUCCESS; +} + +unsigned int +_OverlayAgent::GetFreeBuffer(void* userData) +{ + _OverlayAgent* pOverlayAgent = dynamic_cast<_OverlayAgent*> ((_OverlayAgent*)userData); + if (pOverlayAgent == null) + { + return 0; + } + + 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(int index) const +{ + return __pixmap[index].__nativePixmap; +} + +unsigned int +_OverlayAgent::GetFreeBuffer(void) +{ + 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* +_OverlayAgent::GetRendererImageObject(void) const +{ + return __pImageObject; +} + +bool +_OverlayAgent::IsValidDestinationDimension(const FloatDimension& dimension) const +{ + FloatDimension physicalDimensionF = _CoordinateSystemUtils::Transform(dimension); + Dimension physicalDimension = _CoordinateSystemUtils::ConvertToInteger(physicalDimensionF); + SysTryReturn(NID_UI_CTRL, (physicalDimension.width >= GetDstRectMinWidth() && physicalDimension.height >= GetDstRectMinHeight()), false, E_INVALID_ARG, + "[E_INVALID_ARG] The size of input dimension (logical size : [%.3f, %.3f], physical size : [%d,%d]) is under minimun size." + ,dimension.width, dimension.height, physicalDimension.width, physicalDimension.height); + + FloatRectangle parentBounds = __pParentVE->GetBounds(); + SysTryReturn(NID_UI_CTRL, (dimension.width <= parentBounds.width || dimension.height <= parentBounds.height), false, E_INVALID_ARG, + "[E_INVALID_ARG] The size of input dimension[%.3f, %.3f] is over maximum size[%.3f,%.3f]." + ,dimension.width, dimension.height, parentBounds.width, parentBounds.height); + + return true; +} + +int +_OverlayAgent::GetOverlayAgentCount(void) +{ + return __overlayAgentCount; +} + +IListT* +_OverlayAgent::GetPixelFormatListN(void) +{ + if (!__OverlayAgentBufferPixelFormat[0]) + { + const wchar_t* _UI_REGISTRY_PATH = L"/usr/etc/system-info.ini"; + const wchar_t* _UI_INFO_SESSION = L"UiControlInfo"; + + _RegistryImpl registry; + result r = registry.Construct(_UI_REGISTRY_PATH, REG_OPEN_READ_ONLY, null); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + String pixelFormatList(null); + r = registry.GetValue(_UI_INFO_SESSION, L"OverlayRegionBufferPixelFormat", pixelFormatList); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + bool set = false; + if (pixelFormatList.Contains(L"ARGB8888")) + { + __OverlayAgentBufferPixelFormat[_OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_ARGB8888] = true; + set = true; + } + + if (pixelFormatList.Contains(L"RGB565")) + { + __OverlayAgentBufferPixelFormat[_OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_RGB565] = true; + set = true; + } + + if (pixelFormatList.Contains(L"YCbCr420P")) + { + __OverlayAgentBufferPixelFormat[_OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_YCbCr420_PLANAR] = true; + set = true; + } + + if (pixelFormatList.Contains(L"NV12")) + { + __OverlayAgentBufferPixelFormat[_OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_NV12] = true; + set = true; + } + + if (pixelFormatList.Contains(L"UYVY")) + { + __OverlayAgentBufferPixelFormat[_OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_UYVY] = true; + set = true; + } + + SysAssertf(set, "The registry file is an invalid."); + + __OverlayAgentBufferPixelFormat[0] = set; + } + + 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"); + + result r = pFormatList->Construct(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + for (int index = _OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_ARGB8888; index <= _OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_UYVY; index++) + { + r = pFormatList->Add(__OverlayAgentBufferPixelFormat[index]); + } + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + return pFormatList.release(); +} + +result +_OverlayAgent::EvaluateBounds(OverlayAgentEvaluationOption option, FloatRectangle& rect, bool& modified) +{ + modified = false; + SysTryReturnResult(NID_UI_CTRL, rect.width > 0.0f && rect.height > 0.0f, + E_INVALID_ARG, "The size of input rectangle(%.3f, %.3f) is invalid.", rect.width, rect.height); + + Rectangle logicalEvaluatingBounds = _CoordinateSystemUtils::ConvertToInteger(rect); + SysTryReturnResult(NID_UI_CTRL, logicalEvaluatingBounds.width > 0 && logicalEvaluatingBounds.height > 0, + E_INVALID_ARG, "The size of logical rectangle(%d, %d) is invalid.", logicalEvaluatingBounds.width, logicalEvaluatingBounds.height); + + Rectangle physicalRect(_CoordinateSystemUtils::Transform(logicalEvaluatingBounds)); + SysTryReturnResult(NID_UI_CTRL, physicalRect.width > 0 && physicalRect.height > 0, + E_INVALID_ARG, "The size of physical rectangle(%d, %d) is invalid.", physicalRect.width, physicalRect.height); + + int physicalMinWidth = GetDstRectMinWidth(); + int physicalMinHeight = GetDstRectMinHeight(); + SysTryReturnResult(NID_UI_CTRL, physicalMinWidth > 0 && physicalMinHeight > 0, E_SYSTEM, "The value of overlay control's Min width and Min height are invalid."); + + const int widthUnit = GetWidthUnit(); + const int heightUnit = GetHeightUnit(); + SysTryReturnResult(NID_UI_CTRL, widthUnit > 0 && heightUnit > 0, E_SYSTEM, "The value of overlay control's width Unit and height Unit are invalid."); + + int screenWidth = _Screen::GetWidth(); + int screenHeight = _Screen::GetHeight(); + SysTryReturnResult(NID_UI_CTRL, screenWidth > 0 && screenHeight > 0, E_SYSTEM, "The value of screen size is invalid."); + + //If orientation status of screen is landscape mode, swap width and height. + { + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + int orientation = ecore_evas_rotation_get(pEcoreEvas->GetEcoreEvas()); + + if (orientation == 90 || orientation == 270) + { + int temp = screenWidth; + screenWidth = screenHeight; + screenHeight = temp; + SysSecureLog(NID_UI_CTRL, "The current value of device screen width is %d, device screen height is %d and orientation is %d", screenWidth, screenHeight, orientation); + } + } + + int physicalMaxWidth= screenWidth - (screenWidth % widthUnit); + int physicalMaxHeight = screenHeight - (screenHeight % heightUnit); + int logicalMaxWidth = _CoordinateSystemUtils::InverseHorizontalTransform(physicalMaxWidth); + int logicalMaxHeight = _CoordinateSystemUtils::InverseVerticalTransform(physicalMaxHeight); + + int widthReminder = physicalRect.width % widthUnit; + int heightReminder = physicalRect.height % heightUnit; + + //Fix one pixel error when coordinate system transform + if (widthReminder == 1) + { + physicalRect.width -= 1; + widthReminder = physicalRect.width % widthUnit; + } + + if (heightReminder == 1) + { + physicalRect.height -= 1; + heightReminder = physicalRect.height % heightUnit; + } + + switch (option) + { + case OVERLAY_AGENT_EVALUATION_OPTION_GREATER_THAN: + { + if (logicalEvaluatingBounds.width > logicalMaxWidth || logicalEvaluatingBounds.height > logicalMaxHeight) + { + SysLogException(NID_UI_CTRL, E_UNSUPPORTED_OPTION, "[E_UNSUPPORTED_OPTION] The size of input rect exceeds logical maximun size."); + return E_UNSUPPORTED_OPTION; + } + + if (physicalRect.width > physicalMaxWidth || physicalRect.height > physicalMaxHeight) + { + SysLogException(NID_UI_CTRL, E_UNSUPPORTED_OPTION, "[E_UNSUPPORTED_OPTION] The size of input rect exceeds physical maximun size."); + return E_UNSUPPORTED_OPTION; + } + + if (widthReminder != 0) + { + widthReminder -= widthUnit; + } + + if (heightReminder != 0) + { + heightReminder -= heightUnit; + } + + physicalRect.width -= widthReminder; + physicalRect.height -= heightReminder; + + if (physicalRect.width < physicalMinWidth) + { + physicalRect.width = physicalMinWidth; + } + + if (physicalRect.height < physicalMinHeight) + { + physicalRect.height = physicalMinHeight; + } + } + break; + case OVERLAY_AGENT_EVALUATION_OPTION_LESS_THAN: + { + if (physicalRect.width < physicalMinWidth || physicalRect.height < physicalMinHeight) + { + SysLogException(NID_UI_CTRL, E_UNSUPPORTED_OPTION, "[E_UNSUPPORTED_OPTION] The size of input rect is under minimun size."); + + return E_UNSUPPORTED_OPTION; + } + + if (physicalRect.width > physicalMaxWidth) + { + physicalRect.width = physicalMaxWidth + widthReminder; + } + + if (physicalRect.height > physicalMaxHeight) + { + physicalRect.height = physicalMaxHeight + heightReminder; + } + + physicalRect.width -= widthReminder; + physicalRect.height -= heightReminder; + } + break; + default: + { + SysLogException(NID_UI_CTRL, E_UNSUPPORTED_OPTION, "[E_UNSUPPORTED_OPTION] The input option is an invalid."); + + return E_UNSUPPORTED_OPTION; + } + } + + FloatRectangle originalInputRect(rect); + rect = _CoordinateSystemUtils::ConvertToFloat(_CoordinateSystemUtils::InverseTransform(physicalRect)); + + rect.x = originalInputRect.x; + rect.y = originalInputRect.y; + + if (rect != originalInputRect) + { + modified = true; + SysLog(NID_UI_CTRL, "The input bounds [%.3f, %.3f, %.3f, %.3f] is modified to [%.3f, %.3f, %.3f, %.3f]", + originalInputRect.x, originalInputRect.y, originalInputRect.width, originalInputRect.height, + rect.x, rect.y, rect.width, rect.height); + } + else + { + SysLog(NID_UI_CTRL, "The evaluated bounds [%.3f, %.3f, %.3f, %.3f] is valid.", + rect.x, rect.y, rect.width, rect.height); + } + + result r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +int +_OverlayAgent::GetValueFromRegistry(const String& key) +{ + const wchar_t* _UI_REGISTRY_PATH = L"/usr/etc/system-info.ini"; + const wchar_t* _UI_INFO_SESSION = L"UiControlInfo"; + + _RegistryImpl registry; + result r = registry.Construct(_UI_REGISTRY_PATH, REG_OPEN_READ_ONLY, null); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, -1, r, "[%s] Propagating.", GetErrorMessage(r)); + + String strValue(null); + r = registry.GetValue(_UI_INFO_SESSION, key, strValue); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, -1, r, "[%s] Propagating.", GetErrorMessage(r)); + + int value; + r = Integer::Parse(strValue, value); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, -1, r, "[%s] Propagating.", GetErrorMessage(r)); + + return value; +} + +int +_OverlayAgent::GetDstRectMinWidth(void) +{ + if (__dstRectMinWidth < 0) + { + int value = GetValueFromRegistry(L"OverlayDstMinWidth"); + SysTryReturn(NID_UI_CTRL, value > 0, -1, E_SYSTEM, "[E_SYSTEM] Failed to get Overlay info from registry"); + + __dstRectMinWidth = value; + SysLog(NID_UI_CTRL, "The overlay control's minimum width of destination is [%d]", __dstRectMinWidth); + } + + SetLastResult(E_SUCCESS); + + return __dstRectMinWidth; +} + +int +_OverlayAgent::GetDstRectMinHeight(void) +{ + if (__dstRectMinHegith < 0) + { + int value = GetValueFromRegistry(L"OverlayDstMinHeight"); + SysTryReturn(NID_UI_CTRL, value > 0, -1, E_SYSTEM, "[E_SYSTEM] Failed to get Overlay info from registry"); + + __dstRectMinHegith = value; + SysLog(NID_UI_CTRL, "The overlay control's minimum height of destination is [%d]", __dstRectMinHegith); + } + + SetLastResult(E_SUCCESS); + + return __dstRectMinHegith; +} + +int +_OverlayAgent::GetSrcRectMinWidth(void) +{ + if (__srcRectMinWidth < 0) + { + int value = GetValueFromRegistry(L"OverlaySrcMinWidth"); + SysTryReturn(NID_UI_CTRL, value > 0, -1, E_SYSTEM, "[E_SYSTEM] Failed to get Overlay info from registry"); + + __srcRectMinWidth = value; + SysLog(NID_UI_CTRL, "The overlay control's minimum width of source buffer is [%d]", __srcRectMinWidth); + } + + SetLastResult(E_SUCCESS); + + return __srcRectMinWidth; +} + +int +_OverlayAgent::GetSrcRectMinHeight(void) +{ + if (__srcRectMinHegith < 0) + { + int value = GetValueFromRegistry(L"OverlaySrcMinHeight"); + SysTryReturn(NID_UI_CTRL, value > 0, -1, E_SYSTEM, "[E_SYSTEM] Failed to get Overlay info from registry"); + + __srcRectMinHegith = value; + SysLog(NID_UI_CTRL, "The overlay control's minimum height of source buffer is [%d]", __srcRectMinHegith); + } + + SetLastResult(E_SUCCESS); + + return __srcRectMinHegith; +} + +int +_OverlayAgent::GetWidthUnit(void) +{ + if (__overlayWidthUnit < 0) + { + int value = GetValueFromRegistry(L"OverlayRegionWidthUnit"); + SysTryReturn(NID_UI_CTRL, value > 0, -1, E_SYSTEM, "[E_SYSTEM] Failed to get Overlay info from registry"); + + __overlayWidthUnit = value; + SysLog(NID_UI_CTRL, "The overlay control's unit width is [%d]", __overlayWidthUnit); + } + + SetLastResult(E_SUCCESS); + + return __overlayWidthUnit; +} + +int +_OverlayAgent::GetHeightUnit(void) +{ + if (__overlayHeightUnit < 0) + { + int value = GetValueFromRegistry(L"OverlayRegionHeightUnit"); + SysTryReturn(NID_UI_CTRL, value > 0, -1, E_SYSTEM, "[E_SYSTEM] Failed to get Overlay info from registry"); + + __overlayHeightUnit = value; + SysLog(NID_UI_CTRL, "The overlay control's unit height is [%d]", __overlayHeightUnit); + } + + SetLastResult(E_SUCCESS); + + return __overlayHeightUnit; +} + +int +_OverlayAgent::GetMaxCount(void) +{ + if (__overlayMaxCount < 0) + { + int value = GetValueFromRegistry(L"MaxOverlayRegionCount"); + SysTryReturn(NID_UI_CTRL, value > 0, -1, E_SYSTEM, "[E_SYSTEM] Failed to get Overlay info from registry"); + + __overlayMaxCount = value; + SysLog(NID_UI_CTRL, "The overlay control's maximum count is [%d]", __overlayMaxCount); + } + + SetLastResult(E_SUCCESS); + + return __overlayMaxCount; +} +}}} // Tizen::Ui + diff --git a/src/ui/controls/FUiCtrl_OverlayPanel.cpp b/src/ui/controls/FUiCtrl_OverlayPanel.cpp new file mode 100644 index 0000000..bd72d8e --- /dev/null +++ b/src/ui/controls/FUiCtrl_OverlayPanel.cpp @@ -0,0 +1,351 @@ +// +// 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_OverlayPanel.cpp +* @brief This file contains implementation of _OverlayPanel class +*/ + +#include +#include +#include + +#include +#include +#include +#include +#include "FUi_EcoreEvasMgr.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUiCtrl_OverlayPanel.h" +#include "FUiCtrl_OverlayAgent.h" +#include "FUiCtrl_Form.h" +#include "FUiCtrl_FormImpl.h" +#include "FUiAnim_ControlVisualElement.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Animations; +using namespace Tizen::Ui::Controls; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_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 allocation failed."); + + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + pOverlayPanel->AcquireHandle(); + SetLastResult(E_SUCCESS); + + return pOverlayPanel.release(); +} + +_OverlayPanel::_OverlayPanel(void) + : __pOverlayAgent(null) +{ + SetLastResult(E_SUCCESS); +} + +_OverlayPanel::~_OverlayPanel(void) +{ + if (__pOverlayAgent) + { + delete __pOverlayAgent; + __pOverlayAgent = null; + } +} + +result +_OverlayPanel::SetInputBuffer(const FloatDimension& destDim, const ByteBuffer& srcBuffer, const Dimension& srcDim, OverlayPanel::BufferPixelFormat srcFormat) +{ + SysTryReturnResult(NID_UI_CTRL, __pOverlayAgent != null, E_SYSTEM, "OverlayAgent must not be null."); + SysTryReturnResult(NID_UI_CTRL, __pOverlayAgent->IsValidDestinationDimension(destDim), E_INVALID_ARG, "A specified input paramete is invalid."); + + _OverlayAgentBufferPixelFormat format = _OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_ARGB8888; + switch (srcFormat) + { + case OverlayPanel::BUFFER_PIXEL_FORMAT_ARGB8888: + format = _OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_ARGB8888; + break; + case OverlayPanel::BUFFER_PIXEL_FORMAT_RGB565: + format = _OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_RGB565; + break; + case OverlayPanel::BUFFER_PIXEL_FORMAT_YCbCr420_PLANAR: + format = _OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_YCbCr420_PLANAR; + break; + case OverlayPanel::BUFFER_PIXEL_FORMAT_UYVY: + format = _OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_UYVY; + break; + case OverlayPanel::BUFFER_PIXEL_FORMAT_NV12: + format = _OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_NV12; + break; + default: + SysLogException(NID_UI_CTRL, E_UNSUPPORTED_FORMAT, "The specified pixel format is unsupported."); + return E_UNSUPPORTED_FORMAT; + } + + result r = __pOverlayAgent->SetInputBuffer(srcBuffer, srcDim, format); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __pOverlayAgent->Draw(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __pOverlayAgent->SetDestination(destDim); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +_OverlayPanel::SetRendererRotation(OverlayPanel::Rotation rotation) +{ + SysTryReturnResult(NID_UI_CTRL, __pOverlayAgent != null, E_SYSTEM, "OverlayAgent must not be null."); + + return __pOverlayAgent->SetRotation((_OverlayAgentRotation)rotation); +} + +result +_OverlayPanel::SetRendererAspectRatio(bool aspectRatio) +{ + SysTryReturnResult(NID_UI_CTRL, __pOverlayAgent != null, E_INVALID_OPERATION, "OverlayAgent must not be null."); + + return __pOverlayAgent->SetAspectRatio(aspectRatio); +} + +result +_OverlayPanel::SetRenderSize(const FloatDimension& dimension) +{ + SysTryReturnResult(NID_UI_CTRL, __pOverlayAgent != null, E_INVALID_OPERATION, "OverlayAgent must not be null."); + SysTryReturnResult(NID_UI_CTRL, __pOverlayAgent->IsValidDestinationDimension(dimension), E_INVALID_ARG, "A specified input parameter is invalid."); + + result r =__pOverlayAgent->SetDestination(dimension); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_INVALID_OPERATION, "The current state of the instance prohibits the execution of the specified."); + + return r; +} + +result +_OverlayPanel::GetBackgroundBufferInfo(BufferInfo& info) const +{ + SysTryReturnResult(NID_UI_CTRL, __pOverlayAgent != null, E_SYSTEM, "OverlayAgent must not be null."); + + return __pOverlayAgent->GetBufferInfo(info); +} + +Color +_OverlayPanel::GetMaskingColor(void) const +{ + return Color(0x00000000); +} + +result +_OverlayPanel::OnAttachedToMainTree(void) +{ + int maxCount = OverlayRegion::GetMaxCount(); + SysTryReturnResult(NID_UI_CTRL, maxCount > 0, E_SYSTEM, "The current value of OverlayAgent max count[%d] is invalid.", maxCount); + SysTryReturnResult(NID_UI_CTRL, _OverlayAgent::GetOverlayAgentCount() <= maxCount, E_SYSTEM, "OverlayAgent already exceeds the maximum limit."); + + // Check Parent container's status + { + _Control* pParent = GetParent(); + SysTryReturnResult(NID_UI_CTRL, pParent != null, E_SYSTEM, "The parent container 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(); + SysTryReturnResult(NID_UI_CTRL, form.GetOverlayRegionCount() == 0, E_SYSTEM, "Using OverlayPanel mixed with OverlayRegion is unsupported."); + + // check for overlayPanel maximum count + int panelCount = 0; + _OverlayPanel* pOverlayPanel = null; + + for (int idx = 0 ; idx < form.GetChildCount(); idx++) + { + pOverlayPanel = dynamic_cast <_OverlayPanel*>(form.GetChild(idx)); + if(pOverlayPanel != null) + { + panelCount++; + pOverlayPanel = null; + } + } + SysTryReturn(NID_UI_CTRL, panelCount <= maxCount, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] OverlayPanel already exceeds the maximum limit."); + } + + + // Get Bounds of Logical and Physical OverlayPanel + result r = E_SUCCESS; + FloatRectangle logicalBoundsF(0.0f, 0.0f, 0.0f, 0.0f); + Rectangle physicalBounds(0, 0, 0, 0); + { + FloatRectangle parentBoundsF = GetParent()->GetClientBoundsF(); + FloatRectangle ovelrayBoundsF = GetBoundsF(); + logicalBoundsF = FloatRectangle(parentBoundsF.x + ovelrayBoundsF.x, parentBoundsF.y + ovelrayBoundsF.y, ovelrayBoundsF.width, ovelrayBoundsF.height); + + bool modified = false; + r = _OverlayAgent::EvaluateBounds(OVERLAY_AGENT_EVALUATION_OPTION_LESS_THAN, logicalBoundsF, modified); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "Propagating."); + + FloatRectangle physicalBoundsF = _CoordinateSystemUtils::Transform(CoordinateSystem::AlignToDevice(logicalBoundsF)); + physicalBounds = _CoordinateSystemUtils::ConvertToInteger(physicalBoundsF); + + int unitWidth = _OverlayAgent::GetWidthUnit(); + if(physicalBounds.width % unitWidth == 1) + { + physicalBounds.width -= 1; + } + else if (physicalBounds.width % unitWidth == (unitWidth - 1)) + { + physicalBounds.width += 1; + } + + int unitHeight = _OverlayAgent::GetHeightUnit(); + if(physicalBounds.height % unitHeight == 1) + { + physicalBounds.height -= 1; + } + else if (physicalBounds.height % unitHeight == (unitHeight - 1)) + { + physicalBounds.height += 1; + } + } + + + // Get style of OverlayPanel + _OverlayAgentStyle overlayAgentType = _OVERLAY_AGENT_STYLE_NONE; + { + String preferredEngineConfig(elm_config_preferred_engine_get()); + if(preferredEngineConfig.Equals("opengl_x11", true)) + { + overlayAgentType = _OVERLAY_AGENT_STYLE_PANEL_GL; + SysLog(NID_UI_CTRL, "The current value of HwAcceleration is On"); + } + else if(preferredEngineConfig.Equals("software_x11", true)) + { + overlayAgentType = _OVERLAY_AGENT_STYLE_PANEL_SW; + SysLog(NID_UI_CTRL, "The current value of HwAcceleration is Off"); + } + else + { + String engineConfig(elm_config_engine_get()); + if(engineConfig.Equals("opengl_x11", true)) + { + overlayAgentType = _OVERLAY_AGENT_STYLE_PANEL_GL; + SysLog(NID_UI_CTRL,"The current value of HwAcceleration is On (System Default)"); + } + else + { + overlayAgentType = _OVERLAY_AGENT_STYLE_PANEL_SW; + SysLog(NID_UI_CTRL,"The current value of HwAcceleration is Off (System Default)"); + } + } + } + + + // Create Overlay Agent + __pOverlayAgent = _OverlayAgent::CreateInstanceN(overlayAgentType, *this, logicalBoundsF, physicalBounds); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS && __pOverlayAgent != null, r, "Propagating."); + + if (overlayAgentType == _OVERLAY_AGENT_STYLE_PANEL_GL) + { + r = __pOverlayAgent->CreatePixmap(physicalBounds); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + else + { + 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, "Memory allocation failed to create buffer for first frame."); + + unsigned long* pPos = (unsigned long*)pBuf.get(); + for(int i = 0; i < physicalBounds.height; i++) + { + for(int j = 0; j < physicalBounds.width; j++) + { + *pPos = 0xFF000000; + pPos++; + } + } + + ByteBuffer buffer; + r = buffer.Construct(size); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + buffer.SetArray(pBuf.get(), 0, size); + FloatDimension dimF(logicalBoundsF.width, logicalBoundsF.height); + r = SetInputBuffer(dimF, buffer, Dimension(physicalBounds.width, physicalBounds.height), OverlayPanel::BUFFER_PIXEL_FORMAT_ARGB8888); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + + r = GetVisualElement()->SetRenderOperation(_VisualElement::RENDER_OPERATION_BLEND); + 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, "Propagating."); + + return r; +} + +void +_OverlayPanel::OnBoundsChanged(void) +{ + ClearLastResult(); + + if (__pOverlayAgent == null) + { + SysSecureLog(NID_UI_CTRL, "The OverlayPanel is not yet attached to main tree."); + return; + } + + float width = __pOverlayAgent->GetBounds().width; + if (GetBoundsF().width < width) + { + width = GetBoundsF().width; + } + + float height = __pOverlayAgent->GetBounds().height; + if (GetBoundsF().height < height) + { + height = GetBoundsF().height; + } + SysLog(NID_UI_CTRL, "The changed size of OverlayPanel's renderer is [%.3f, %.3f]", width, height); + + result r = __pOverlayAgent->SetDestination(FloatDimension(width, height)); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + +} +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_OverlayPanelImpl.cpp b/src/ui/controls/FUiCtrl_OverlayPanelImpl.cpp new file mode 100644 index 0000000..af6aed2 --- /dev/null +++ b/src/ui/controls/FUiCtrl_OverlayPanelImpl.cpp @@ -0,0 +1,499 @@ +// +// 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_OverlayPanelImpl.cpp + * @brief This is the implementation file for _OverlayPanelImpl class. + */ + +#include +#include +#include + +#include +#include +#include +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_ControlManager.h" +#include "FUi_ResourceSizeInfo.h" +#include "FUi_UiBuilder.h" +#include "FUiCtrl_FormImpl.h" +#include "FUiCtrl_OverlayAgent.h" +#include "FUiCtrl_OverlayPanelImpl.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; +using namespace Tizen::Io; +using namespace Tizen::System; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Animations; +using namespace Tizen::Ui::Controls; + +namespace Tizen { namespace Ui { namespace Controls +{ + +bool _OverlayPanelImpl::__overlayPanelPixelFomatList[_OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_MAX]= {false,}; + +Dimension +_OverlayPanelImpl::OverlayPanelSizeInfo::GetDefaultMinimumSize(_ControlOrientation orientation) const +{ + Dimension overlayPanelMinSize = _CoordinateSystemUtils::InverseTransform(Dimension(_OverlayAgent::GetDstRectMinWidth(), _OverlayAgent::GetDstRectMinHeight())); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, Dimension(-1, -1), r,"[%s] Propagating.", GetErrorMessage(r)); + SysTryReturn(NID_UI_CTRL, overlayPanelMinSize.width > 0 && overlayPanelMinSize.height > 0, Dimension(-1, -1), E_SYSTEM, + "[E_SYSTEM] The minimum size of overlay panel in system-info(%d, %d) is invalid.", overlayPanelMinSize.width, overlayPanelMinSize.height); + + return overlayPanelMinSize; +} + +Dimension +_OverlayPanelImpl::OverlayPanelSizeInfo::GetDefaultMaximumSize(_ControlOrientation orientation) const +{ + Dimension overlayPanelMaxSize = CoordinateSystem::GetLogicalResolution(); + + if (orientation == _CONTROL_ORIENTATION_LANDSCAPE) + { + return Dimension(overlayPanelMaxSize.height, overlayPanelMaxSize.width); + } + + return overlayPanelMaxSize; +} + +_OverlayPanelImpl* +_OverlayPanelImpl::CreateOverlayPanelImplN(OverlayPanel* pPublic, const Rectangle& bounds) +{ + result r = GET_SIZE_INFO(OverlayPanel).CheckInitialSizeValid(Dimension(bounds.width, bounds.height), _ControlManager::GetInstance()->GetOrientation()); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, E_INVALID_ARG, "[E_INVALID_ARG] The size of overlay panel(%d, %d) is invalid.", bounds.width, bounds.height); + + _OverlayPanel* pCore = _OverlayPanel::CreateOverlayPanelN(); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pCore != null, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + std::unique_ptr<_OverlayPanelImpl> pImpl(new (std::nothrow) _OverlayPanelImpl(pPublic, pCore)); + r = _ControlImpl::CheckConstruction(pCore, pImpl.get()); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pImpl->InitializeBoundsProperties(GET_SIZE_INFO(OverlayPanel), bounds, _ControlManager::GetInstance()->GetOrientation()); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + return pImpl.release(); +} + +_OverlayPanelImpl* +_OverlayPanelImpl::CreateOverlayPanelImplN(OverlayPanel* pPublic, const FloatRectangle& bounds) +{ + result r = GET_SIZE_INFO(OverlayPanel).CheckInitialSizeValid(Dimension(bounds.width, bounds.height), _ControlManager::GetInstance()->GetOrientation()); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, E_INVALID_ARG, "[E_INVALID_ARG] The size of overlay panel(%d, %d) is invalid.", bounds.width, bounds.height); + + _OverlayPanel* pCore = _OverlayPanel::CreateOverlayPanelN(); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pCore != null, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + std::unique_ptr<_OverlayPanelImpl> pImpl(new (std::nothrow) _OverlayPanelImpl(pPublic, pCore)); + r = _ControlImpl::CheckConstruction(pCore, pImpl.get()); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pImpl->InitializeBoundsPropertiesF(GET_SIZE_INFO(OverlayPanel), bounds, _ControlManager::GetInstance()->GetOrientation()); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + return pImpl.release(); +} + +_OverlayPanelImpl::~_OverlayPanelImpl(void) +{ +} + +void +_OverlayPanelImpl::SetChildBuilderBounds(_ContainerImpl* pContainerImpl, _ControlOrientation controlOrientation) +{ + FloatRectangle builderBounds; + _ContainerImpl* pTempContainerImpl; + + for(int i = 0; i < pContainerImpl->GetChildCount(); i++) + { + _ControlImpl* pControlImpl = pContainerImpl->GetChild(i); + bool exist = pControlImpl->GetBuilderBoundsF(controlOrientation, builderBounds); + if (!exist) + { + continue; + } + + pControlImpl->SetBounds(builderBounds); + pTempContainerImpl = dynamic_cast<_ContainerImpl*>(pControlImpl); + if (pTempContainerImpl != null) + { + SetChildBuilderBounds(pTempContainerImpl, controlOrientation); + } + } +} + +result +_OverlayPanelImpl::OnAttachedToMainTree(void) +{ + //result r = SetFocusable(false); + result r = E_SUCCESS; + + _ControlOrientation controlOrientation = _CONTROL_ORIENTATION_PORTRAIT; + FloatRectangle builderBounds; + bool exist = GetBuilderBoundsF(controlOrientation, builderBounds); + + if (exist) + { + _ContainerImpl* pContainerImpl = this; + _FormImpl* pParentImpl = null; + + while (pContainerImpl) + { + pParentImpl = dynamic_cast<_FormImpl*>(pContainerImpl->GetParent()); + if (pParentImpl != null) + { + break; + } + else + { + pContainerImpl = pContainerImpl->GetParent(); + } + } + + if (pParentImpl) + { + OrientationStatus orientation = pParentImpl->GetOrientationStatus(); + if (orientation == ORIENTATION_STATUS_LANDSCAPE || orientation == ORIENTATION_STATUS_LANDSCAPE_REVERSE) + { + controlOrientation = _CONTROL_ORIENTATION_LANDSCAPE; + exist = GetBuilderBoundsF(controlOrientation, builderBounds); + SysTryLog(NID_UI_CTRL, exist, "Failed to GetBuilderBoundsF on Landscape mode"); + } + + r = SetBounds(builderBounds); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Failed to SetBounds", GetErrorMessage(r)); + SetChildBuilderBounds(this, controlOrientation); + } + } + + r = _ContainerImpl::OnAttachedToMainTree(); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Failed to OnAttachedToMainTree", GetErrorMessage(r)); + + return r; +} + +void +_OverlayPanelImpl::SetRendererRotation(OverlayPanel::Rotation rotation) +{ + GetCore().SetRendererRotation(rotation); +} + +void +_OverlayPanelImpl::SetRendererAspectRatio(bool fix) +{ + GetCore().SetRendererAspectRatio(fix); +} + +result +_OverlayPanelImpl::SetRenderSize(const Dimension& dimension) +{ + FloatDimension floatDimension = _CoordinateSystemUtils::ConvertToFloat(dimension); + return GetCore().SetRenderSize(floatDimension); +} + +result +_OverlayPanelImpl::SetRenderSize(const FloatDimension& dimension) +{ + return GetCore().SetRenderSize(dimension); +} + +result +_OverlayPanelImpl::SetInputBuffer(const Dimension& destDim, const ByteBuffer& srcBuffer, const Dimension& srcDim, OverlayPanel::BufferPixelFormat srcFormat) +{ + FloatDimension destFloatDim = _CoordinateSystemUtils::ConvertToFloat(destDim); + return SetInputBuffer(destFloatDim, srcBuffer, srcDim, srcFormat); +} + +result +_OverlayPanelImpl::SetInputBuffer(const FloatDimension& destDim, const ByteBuffer& srcBuffer, const Dimension& srcDim, OverlayPanel::BufferPixelFormat srcFormat) +{ + if (!__overlayPanelPixelFomatList[0]) + { + result r = _OverlayPanelImpl::SetPixelFormatList(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + if (!__overlayPanelPixelFomatList[srcFormat]) + { + SysLogException(NID_UI_CTRL, E_UNSUPPORTED_FORMAT, "[E_UNSUPPORTED_FORMAT] The Source format[%d] is unsupported.", srcFormat); + return E_UNSUPPORTED_FORMAT; + } + + result r = GetCore().SetInputBuffer(destDim, srcBuffer, srcDim, srcFormat); + + if (r == E_INVALID_ARG || r == E_UNSUPPORTED_FORMAT || r == E_SYSTEM) + { + SysLogException(NID_UI_CTRL, r, "[%s] Propagating.", GetErrorMessage(r)); + } + else if (r != E_SUCCESS) + { + r = E_SYSTEM; + SysLogException(NID_UI_CTRL, r, "[E_SYSTEM] A system error occurred."); + } + + return r; +} + +result +_OverlayPanelImpl::GetBackgroundBufferInfo(BufferInfo& bufferInfo) const +{ + result r = GetCore().GetBackgroundBufferInfo(bufferInfo); + + if (r == E_OPERATION_FAILED) + { + SysLogException(NID_UI_CTRL, r, "[%s] Propagating.", GetErrorMessage(r)); + } + else if (r != E_SUCCESS) + { + r = E_OPERATION_FAILED; + SysLogException(NID_UI_CTRL, r, "[E_OPERATION_FAILED] failed to GetBackgroundBufferInfo."); + } + + return r; +} + +Color +_OverlayPanelImpl::GetMaskingColor(void) const +{ + return GetCore().GetMaskingColor(); +} + +void +_OverlayPanelImpl::OnChangeLayout(_ControlOrientation orientation) +{ + result r = InitializeBoundsProperties(GET_SIZE_INFO(OverlayPanel), orientation); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + _ControlImpl::OnChangeLayout(orientation); +} + +_OverlayPanelImpl::_OverlayPanelImpl(OverlayPanel* pPublic, _OverlayPanel* pCore) + : _ContainerImpl(pPublic, pCore) +{ +} + +const char* +_OverlayPanelImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Controls::OverlayPanel"; +} + +const _OverlayPanel& +_OverlayPanelImpl::GetCore(void) const +{ + return static_cast (_ControlImpl::GetCore()); +} + +_OverlayPanel& +_OverlayPanelImpl::GetCore(void) +{ + return static_cast <_OverlayPanel&>(_ControlImpl::GetCore()); +} + +const OverlayPanel& +_OverlayPanelImpl::GetPublic(void) const +{ + return static_cast (_ControlImpl::GetPublic()); +} + +OverlayPanel& +_OverlayPanelImpl::GetPublic(void) +{ + return static_cast (_ControlImpl::GetPublic()); +} + +_OverlayPanelImpl* +_OverlayPanelImpl::GetInstance(OverlayPanel& overlayPanel) +{ + return static_cast<_OverlayPanelImpl*>(_ControlImpl::GetInstance(overlayPanel)); +} + +const _OverlayPanelImpl* +_OverlayPanelImpl::GetInstance(const OverlayPanel& overlayPanel) +{ + return static_cast(_ControlImpl::GetInstance(overlayPanel)); +} + +result +_OverlayPanelImpl::SetPixelFormatList(void) +{ + if (__overlayPanelPixelFomatList[0]) + { + return E_SUCCESS; + } + + 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"); + + bool set = false; + for (int formatIndex = 0; formatIndex < pFormatList->GetCount(); formatIndex++) + { + bool value = false; + pFormatList->GetAt(formatIndex, value); + + if (value) + { + __overlayPanelPixelFomatList[formatIndex + 1] = true; + set = true; + } + } + + SysAssertf(set, "The list of supported pixel formats is an invalid."); + + __overlayPanelPixelFomatList[0] = set; + + return E_SUCCESS; +} + +IListT* +_OverlayPanelImpl::GetSupportedBufferPixelFormatListN(void) +{ + result r = E_SUCCESS; + + if (!__overlayPanelPixelFomatList[0]) + { + r = _OverlayPanelImpl::SetPixelFormatList(); + 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"); + + r = pFormatList->Construct(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + for (int index = _OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_ARGB8888; index <= _OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_UYVY; index++) + { + if (__overlayPanelPixelFomatList[index]) + { + r = pFormatList->Add(static_cast(index - 1)); + } + } + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + return pFormatList.release(); +} + +result +_OverlayPanelImpl::EvaluateBounds(OverlayPanelEvaluationOption option, FloatRectangle& rect, bool& modified) +{ + switch (option) + { + case OVERLAY_PANEL_EVAL_OPT_GREATER_THAN: + return _OverlayAgent::EvaluateBounds(OVERLAY_AGENT_EVALUATION_OPTION_GREATER_THAN, rect, modified); + + case OVERLAY_PANEL_EVAL_OPT_LESS_THAN: + return _OverlayAgent::EvaluateBounds(OVERLAY_AGENT_EVALUATION_OPTION_LESS_THAN, rect, modified); + + default: + SysLogException(NID_UI_CTRL, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. The OverlayPanelEvaluationOption is invalid."); + return E_INVALID_ARG; + } +} + +int +_OverlayPanelImpl::GetWidthUnit(void) +{ + int widthUnit = _OverlayAgent::GetWidthUnit(); + SysAssertf(widthUnit > 0, "Failed to get a OverlayAgent's WidthUnit"); + + return widthUnit; +} + +int +_OverlayPanelImpl::GetHeightUnit(void) +{ + int heightUnit = _OverlayAgent::GetHeightUnit(); + SysAssertf(heightUnit > 0, "Failed to get a OverlayAgent's HeightUnit"); + + return heightUnit; +} + +int +_OverlayPanelImpl::GetMaxCount(void) +{ + int maxCount = _OverlayAgent::GetMaxCount(); + SysAssertf(maxCount > 0, "Failed to get a OverlayAgent's MaxCount"); + + return maxCount; +} + +class _OverlayPanelMaker + : public _UiBuilderControlMaker +{ +public: + _OverlayPanelMaker(_UiBuilder* uibuilder) + :_UiBuilderControlMaker(uibuilder) + { + }; + + virtual ~_OverlayPanelMaker() + { + }; + + static _UiBuilderControlMaker* GetInstance(_UiBuilder* uibuilder) + { + _OverlayPanelMaker* pOverlayPanelMaker = new (std::nothrow) _OverlayPanelMaker(uibuilder); + SysTryReturn(NID_UI_CTRL, pOverlayPanelMaker != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + + return pOverlayPanelMaker; + }; + +protected: + virtual Tizen::Ui::Control* Make(_UiBuilderControl* pControl) + { + _UiBuilderControlLayout* pControlProperty = null; + + GetProperty(pControl, &pControlProperty); + SysTryReturn(NID_UI_CTRL, pControlProperty != null, null, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + std::unique_ptr pOverlayPanel(new (std::nothrow) OverlayPanel()); + SysTryReturn(NID_UI_CTRL, pOverlayPanel != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + + FloatRectangle overlayPanelBounds = pControlProperty->GetRectF(); + bool modified = false; + + OverlayPanel::EvaluateBounds(OVERLAY_PANEL_EVAL_OPT_LESS_THAN, overlayPanelBounds, modified); + SysTryLog(NID_UI_CTRL, modified, "The bounds of OverlayPanel is modified into [%.3f, %.3f, %.3f, %.3f]" + , overlayPanelBounds.x, overlayPanelBounds.y, overlayPanelBounds.width, overlayPanelBounds.height); + + result r = pOverlayPanel->Construct(overlayPanelBounds); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + return pOverlayPanel.release(); + } +}; + +_OverlayPanelRegister::_OverlayPanelRegister() +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->RegisterControl("OverlayPanel", _OverlayPanelMaker::GetInstance); +} + +_OverlayPanelRegister::~_OverlayPanelRegister() +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->UnregisterControl("OverlayPanel"); +} +static _OverlayPanelRegister OverlayPanelRegisterToUIbuilder; +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_OverlayRegionImpl.cpp b/src/ui/controls/FUiCtrl_OverlayRegionImpl.cpp new file mode 100644 index 0000000..1caf3e8 --- /dev/null +++ b/src/ui/controls/FUiCtrl_OverlayRegionImpl.cpp @@ -0,0 +1,694 @@ +// +// 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_OverlayRegionImpl.cpp + * @brief This is the implementation file for _OverlayRegionImpl class. + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "FUi_CoordinateSystemUtils.h" +#include "FUiCtrl_FormImpl.h" +#include "FUiCtrl_OverlayAgent.h" +#include "FUiCtrl_OverlayRegionImpl.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; +using namespace Tizen::Io; +using namespace Tizen::Media; +using namespace Tizen::System; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; + +namespace Tizen { namespace Ui { namespace Controls +{ +const int _ROTATION_COUNT = 4; +int _OverlayRegionImpl::__primaryCameraRotation = -1; +int _OverlayRegionImpl::__secondaryCameraRotation = -1; +bool _OverlayRegionImpl::__overlayRegionPixelFomatList[]= {false,}; + +OverlayRegionRotate +_ConvertCamToOverlayRegionRotation(OverlayRegionType overlayRegionType, int cameraRotation, int formOrientation) +{ + OverlayRegionRotate rotation = OVERLAYREGION_ROTATE_NONE; + int tempCameraRotation = 0; + int tempFormRotation = 0; + + switch (cameraRotation) + { + case 1://CAMERA_ROTATION_NONE: + tempCameraRotation = 0; + break; + case 2://CAMERA_ROTATION_90: + tempCameraRotation = 1; + break; + case 3://CAMERA_ROTATION_180: + tempCameraRotation = 2; + break; + case 4://CAMERA_ROTATION_270: + tempCameraRotation = 3; + break; + default: + SysLogException(NID_UI_CTRL, E_INVALID_ARG, "[E_INVALID_ARG] The current rotation of camera[%d] is invalid", cameraRotation); + return rotation; + } + + switch (static_cast(formOrientation)) + { + case ORIENTATION_STATUS_PORTRAIT: + tempFormRotation = 0; + break; + case ORIENTATION_STATUS_LANDSCAPE: + tempFormRotation = 1; + break; + case ORIENTATION_STATUS_PORTRAIT_REVERSE: + tempFormRotation = 2; + break; + case ORIENTATION_STATUS_LANDSCAPE_REVERSE: + tempFormRotation = 3; + break; + default: + SysLogException(NID_UI_CTRL, E_INVALID_ARG, "[E_INVALID_ARG] The current rotation of form[%d] is invalid", formOrientation); + return rotation; + } + + switch (overlayRegionType) + { + case OVERLAY_REGION_TYPE_NORMAL: + rotation = OVERLAYREGION_ROTATE_0; + break; + case OVERLAY_REGION_TYPE_PRIMARY_CAMERA: + rotation = static_cast((_ROTATION_COUNT - (tempFormRotation - tempCameraRotation)) % _ROTATION_COUNT); + break; + case OVERLAY_REGION_TYPE_SECONDARY_CAMERA: + rotation = static_cast((tempFormRotation + tempCameraRotation) % _ROTATION_COUNT); + break; + default: + break; + } + SysSecureLog(NID_UI_CTRL, "The current OverlayRegion's type is [%d], rotation is [%d]", overlayRegionType, rotation); + + return rotation; +} + +_OverlayRegionImpl::_OverlayRegionImpl(void) + : __pParentForm(null) + , __pOverlayRegion(null) + , __overlayRegionType(OVERLAY_REGION_TYPE_MIN) + , __pOverlayAgent(null) + , __destRect(0.0f, 0.0f, 0.0f, 0.0f) + , __overlayRegionIndex(-1) + , __showState(true) + , __cameraRotation(1) +{ +} + +_OverlayRegionImpl::~_OverlayRegionImpl(void) +{ + if (__pParentForm) + { + if (__overlayRegionIndex != -1) + { + __pParentForm->__pOverlayerRegionImplArray[__overlayRegionIndex] = null; + } + + __pParentForm->__overlayRegionCount--; + } + SysSecureLog(NID_UI_CTRL, "The [%d]th OverlayRegion in form[%x] is deleted.", __overlayRegionIndex, __pParentForm); + + if (__pOverlayAgent) + { + delete __pOverlayAgent; + } +} + +Tizen::Graphics::FloatRectangle +_OverlayRegionImpl::GetBounds(void) const +{ + return __destRect; +} + +void +_OverlayRegionImpl::GetBounds(float& x, float& y, float& width, float& height) const +{ + x = __destRect.x; + y = __destRect.y; + width = __destRect.width; + height = __destRect.height; +} + +result +_OverlayRegionImpl::SetInputBuffer(const Tizen::Base::ByteBuffer& srcBuffer, const Tizen::Graphics::Dimension& srcDim, OverlayRegionBufferPixelFormat srcFormat) +{ + SysTryReturnResult(NID_UI_CTRL, __pOverlayAgent != null, E_INVALID_STATE, "The current value of OverlayAgent is null."); + SysTryReturnResult(NID_UI_CTRL, __showState, E_SYSTEM, "The current Overlay Region is on back ground. Not yet draw."); + + SysTryReturnResult(NID_UI_CTRL, srcDim.width > 0 && srcDim.height > 0, E_INVALID_ARG, " The current value of source dimension[%d, %d] is invalid", srcDim.width, srcDim.height); + SysTryReturnResult(NID_UI_CTRL, srcDim.width % OverlayRegion::GetWidthUnit() == 0 && srcDim.height % OverlayRegion::GetHeightUnit()== 0, E_INVALID_ARG, + "The current value of source dimension[%d, %d] is invalid. It should be multiple of OverlayRegion::GetWidthUnit() & GetHeightUnit()", srcDim.width, srcDim.height); + + if (!__overlayRegionPixelFomatList[0]) + { + result r = _OverlayRegionImpl::SetPixelFormatList(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + _OverlayAgentBufferPixelFormat format = _OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_ARGB8888; + + switch (srcFormat) + { + case OVERLAY_REGION_BUFFER_PIXEL_FORMAT_ARGB8888: + format = _OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_ARGB8888; + break; + case OVERLAY_REGION_BUFFER_PIXEL_FORMAT_RGB565: + format = _OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_RGB565; + break; + case OVERLAY_REGION_BUFFER_PIXEL_FORMAT_YCbCr420_PLANAR: + format = _OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_YCbCr420_PLANAR; + break; + case OVERLAY_REGION_BUFFER_PIXEL_FORMAT_NV12: + format = _OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_NV12; + break; + case OVERLAY_REGION_BUFFER_PIXEL_FORMAT_UYVY: + format = _OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_UYVY; + break; + default: + SysLogException(NID_UI_CTRL, E_UNSUPPORTED_FORMAT, "[E_UNSUPPORTED_FORMAT] The input value of srcFormat[%d] is unsupported.", srcFormat); + return E_UNSUPPORTED_FORMAT; + } + + if (!__overlayRegionPixelFomatList[srcFormat]) + { + SysLogException(NID_UI_CTRL, E_UNSUPPORTED_FORMAT, "[E_UNSUPPORTED_FORMAT] The input value of srcFormat[%d] is unsupported.", srcFormat); + return E_UNSUPPORTED_FORMAT; + } + + int size = srcBuffer.GetCapacity(); + SysTryReturnResult(NID_UI_CTRL, size > 0, E_INVALID_ARG, "The current size of source[%d] is invalid.", size); + + result r = __pOverlayAgent->SetInputBuffer(srcBuffer, srcDim, format); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = __pOverlayAgent->Draw(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return E_SUCCESS; +} + +result +_OverlayRegionImpl::GetBackgroundBufferInfo(Tizen::Graphics::BufferInfo& info) const +{ + SysTryReturnResult(NID_UI_CTRL, __pOverlayAgent != null, E_INVALID_STATE, "The current value of OverlayAgent is null."); + + result r = __pOverlayAgent->GetBufferInfo(info); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + _BufferInfoImpl* pBufferInfoImpl = _BufferInfoImpl::GetInstance(info); + SysTryReturnResult(NID_UI_CTRL, pBufferInfoImpl != null , E_SYSTEM, "The current value of BufferInfo is null."); + + _FormImpl* pFormImpl = static_cast<_FormImpl*>(__pParentForm->GetUserData()); + SysTryReturnResult(NID_UI_CTRL, pFormImpl != null, E_SYSTEM, "The current value of parent form is null."); + + OrientationStatus formOrientationStatus = pFormImpl->GetOrientationStatus(); + switch (formOrientationStatus) + { + case ORIENTATION_STATUS_NONE: + //fall through + case ORIENTATION_STATUS_PORTRAIT: + pBufferInfoImpl->SetOrientation(_BufferInfoImpl::ORIENTATION_PORTRAIT); + break; + case ORIENTATION_STATUS_LANDSCAPE : + pBufferInfoImpl->SetOrientation(_BufferInfoImpl::ORIENTATION_LANDSCAPE); + break; + case ORIENTATION_STATUS_PORTRAIT_REVERSE: + pBufferInfoImpl->SetOrientation(_BufferInfoImpl::ORIENTATION_PORTRAIT_REVERSE); + break; + case ORIENTATION_STATUS_LANDSCAPE_REVERSE: + pBufferInfoImpl->SetOrientation(_BufferInfoImpl::ORIENTATION_LANDSCAPE_REVERSE); + break; + } + + switch (__cameraRotation) + { + case 1: //CAMERA_ROTATION_NONE + pBufferInfoImpl->SetRotation(_BufferInfoImpl::ROTATION_0); + break; + case 2: //CAMERA_ROTATION_90: + pBufferInfoImpl->SetRotation(_BufferInfoImpl::ROTATION_90); + break; + case 3: //CAMERA_ROTATION_180: + pBufferInfoImpl->SetRotation(_BufferInfoImpl::ROTATION_180); + break; + case 4: //CAMERA_ROTATION_270: + pBufferInfoImpl->SetRotation(_BufferInfoImpl::ROTATION_270); + break; + } + + return E_SUCCESS; +} + +result +_OverlayRegionImpl::Construct(_Form* pParentForm, OverlayRegionType overlayRegionType, const FloatRectangle& userDestRect, const FloatRectangle& overlayLogRect, const Rectangle& finalPhyRect) +{ + SysTryReturnResult(NID_UI_CTRL, pParentForm != null, E_SYSTEM, "The current value of Parent Form is null."); + + _FormImpl* pFormImpl = static_cast<_FormImpl*>(pParentForm->GetUserData()); + SysTryReturnResult(NID_UI_CTRL, pFormImpl != null, E_SYSTEM, "The Impl of Parent Form is null."); + + _OverlayAgentStyle overlayAgentType = _OVERLAY_AGENT_STYLE_REGION_SW; + { + String preferredEngineConfig(elm_config_preferred_engine_get()); + if(preferredEngineConfig.Equals("opengl_x11", true)) + { + overlayAgentType = _OVERLAY_AGENT_STYLE_REGION_GL; + SysLog(NID_UI_CTRL, "The current value of HwAcceleration is On"); + } + else if(preferredEngineConfig.Equals("software_x11", true)) + { + overlayAgentType = _OVERLAY_AGENT_STYLE_REGION_SW; + SysLog(NID_UI_CTRL, "The current value of HwAcceleration is Off"); + } + else + { + String engineConfig(elm_config_engine_get()); + if(engineConfig.Equals("opengl_x11", true)) + { + overlayAgentType = _OVERLAY_AGENT_STYLE_REGION_GL; + SysLog(NID_UI_CTRL,"The current value of HwAcceleration is On (System Default)"); + } + else + { + SysLog(NID_UI_CTRL,"The current value of HwAcceleration is Off (System Default)"); + } + } + } + + std::unique_ptr<_OverlayAgent> pOverlayAgent(_OverlayAgent::CreateInstanceN(overlayAgentType, *pParentForm, overlayLogRect, finalPhyRect)); + SysTryReturnResult(NID_UI_CTRL, pOverlayAgent != null, E_SYSTEM, "The current value of OverlayAgent is null."); + + result r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL,r == E_SUCCESS, r, "Propagating."); + + //Set Rotation of OverlayRegion + if (__primaryCameraRotation == -1 || __secondaryCameraRotation == -1) + { + _OverlayRegionMediaCapability capability; + r = capability.Construct(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + __primaryCameraRotation = capability.cameraPrimaryRotation; + __secondaryCameraRotation = capability.cameraSecondaryRotation; + } + + switch (overlayRegionType) + { + case OVERLAY_REGION_TYPE_NORMAL: + __cameraRotation = 1; //CAMERA_ROTATION_NONE + break; + case OVERLAY_REGION_TYPE_PRIMARY_CAMERA: + __cameraRotation = __primaryCameraRotation; + break; + case OVERLAY_REGION_TYPE_SECONDARY_CAMERA: + __cameraRotation = __secondaryCameraRotation; + break; + default: + SysLogException(NID_UI_CTRL, E_UNSUPPORTED_FORMAT, "[E_UNSUPPORTED_FORMAT] The current type of OverlayRegion[%d] is unsupported", overlayRegionType); + return E_UNSUPPORTED_FORMAT; + } + + OverlayRegionRotate rotation = _ConvertCamToOverlayRegionRotation(overlayRegionType, __cameraRotation, pFormImpl->GetOrientationStatus()); + SysTryReturnResult(NID_UI_CTRL, rotation != OVERLAYREGION_ROTATE_NONE, E_SYSTEM, "The current camera rotation is invalid."); + + switch(rotation) + { + case OVERLAYREGION_ROTATE_0: + r = pOverlayAgent->SetRotation(_OVERLAY_AGENT_ROTATION_NONE); + break; + case OVERLAYREGION_ROTATE_90: + r = pOverlayAgent->SetRotation(_OVERLAY_AGENT_ROTATION_90); + break; + case OVERLAYREGION_ROTATE_180: + r = pOverlayAgent->SetRotation(_OVERLAY_AGENT_ROTATION_180); + break; + case OVERLAYREGION_ROTATE_270: + r = pOverlayAgent->SetRotation(_OVERLAY_AGENT_ROTATION_270); + break; + default: + r = E_SYSTEM; + break; + } + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + __pParentForm = pParentForm; + __overlayRegionType = overlayRegionType; + __destRect = userDestRect; + __pOverlayAgent = pOverlayAgent.release(); + + if(overlayAgentType == _OVERLAY_AGENT_STYLE_REGION_GL) + { + r = __pOverlayAgent->CreatePixmap(finalPhyRect); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + else if (overlayAgentType == _OVERLAY_AGENT_STYLE_REGION_SW) + { + 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, "Memory allocation failed to create a buffer for OverlayRegion."); + + unsigned long* pPos = (unsigned long*)pBuffer.get(); + for(int i = 0; i < finalPhyRect.height; i++) + { + for(int j = 0; j < finalPhyRect.width; j++) + { + *pPos = 0xFF000000; + pPos++; + } + } + + ByteBuffer buffer; + r = buffer.Construct(size); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + buffer.SetArray(pBuffer.get(), 0, size); + r = SetInputBuffer(buffer, Dimension(finalPhyRect.width, finalPhyRect.height), OVERLAY_REGION_BUFFER_PIXEL_FORMAT_ARGB8888); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + else + { + SysLogException(NID_UI_CTRL, E_SYSTEM, "[E_SYSTEM] The current type of OverlayAgen[%d] is invalid.", overlayRegionType); + return E_SYSTEM; + } + return r; +} + +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] Memory allocation failed to create OverlayRegion."); + + __pOverlayRegion = pOverlayRegion; + __pOverlayRegion->__pOverlayRegionImpl = this; + + return pOverlayRegion; +} + +void +_OverlayRegionImpl::SetFormArrayIndex(int index) +{ + __overlayRegionIndex = index; +} + +OverlayRegion* +_OverlayRegionImpl::GetOverlayRegion(void) const +{ + return __pOverlayRegion; +} + +void +_OverlayRegionImpl::GoForeground(void) +{ + ClearLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, __pOverlayAgent != null, E_SYSTEM, "[E_SYSTEM] The current value of OverlayAgent is null."); + + __showState = true; +} + +void +_OverlayRegionImpl::GoBackground(void) +{ + ClearLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, __pOverlayAgent != null, E_SYSTEM, "[E_SYSTEM] The current value of OverlayAgent is null."); + + __showState = false; + __pOverlayAgent->UngrabXvPort(); +} + +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 +_OverlayRegionImpl::IsValidBounds(const Rectangle& physicalBounds) +{ + int minWidth = _OverlayAgent::GetDstRectMinWidth(); + int minHeight = _OverlayAgent::GetDstRectMinHeight(); + SysTryReturnResult(NID_UI_CTRL, physicalBounds.width >= minWidth && physicalBounds.height >= minHeight, E_INVALID_ARG, + "The current size of OverlayRegoin[%d, %d] is under minimum size[%d, %d].", physicalBounds.width, physicalBounds.height, minWidth, minHeight); + + return E_SUCCESS; +} + +result +_OverlayRegionImpl::SetPixelFormatList(void) +{ + if (__overlayRegionPixelFomatList[0]) + { + return E_SUCCESS; + } + + std::unique_ptr< IListT > pFormatList(_OverlayAgent::GetPixelFormatListN()); + 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++) + { + bool value = false; + pFormatList->GetAt(formatIndex, value); + + if (value) + { + __overlayRegionPixelFomatList[formatIndex + 1] = true; + set = true; + } + } + + SysAssertf(set, "The list of supported pixel formats is an invalid."); + + __overlayRegionPixelFomatList[0] = set; + + return E_SUCCESS; +} + +IListT* +_OverlayRegionImpl::GetSupportedBufferPixelFormatListN(void) +{ + result r = E_SUCCESS; + + if (!_OverlayRegionImpl::__overlayRegionPixelFomatList[0]) + { + r = _OverlayRegionImpl::SetPixelFormatList(); + 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] Memory allocation failed to create a list instance"); + + r = pFormatList->Construct(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + for (int index = _OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_ARGB8888; index <= _OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_UYVY; index++) + { + if (_OverlayRegionImpl::__overlayRegionPixelFomatList[index]) + { + r = pFormatList->Add(static_cast(index)); + } + } + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + return pFormatList.release(); +} + +_OverlayRegionImpl* +_OverlayRegionImpl::GetInstance(OverlayRegion& overlayRegion) +{ + return (&overlayRegion != null) ? overlayRegion.__pOverlayRegionImpl : null; +} + +const _OverlayRegionImpl* +_OverlayRegionImpl::GetInstance(const OverlayRegion& overlayRegion) +{ + return (&overlayRegion != null) ? overlayRegion.__pOverlayRegionImpl : null; +} + +} } } // Tizen::Ui::Controls + + + +namespace +{ +const char* _MEDIA_CAPABILITY_FILE_PATH = "/usr/etc/media-capability.xml"; +const char* _CAM_PRIMARY_DIRECTION = "Camera.Primary.Direction"; +const char* _CAM_PRIMARY_ROTATION = "Camera.Primary.Rotation"; +const char* _CAM_SECONDARY_DIRECTION = "Camera.Secondary.Direction"; +const char* _CAM_SECONDARY_ROTATION = "Camera.Secondary.Rotation"; + +_OverlayRegionMediaCapability::_OverlayRegionMediaCapability(void) + : cameraPrimaryDirection(0) + , cameraPrimaryRotation(0) + , cameraSecondaryDirection(0) + , cameraSecondaryRotation(0) +{ +} + +_OverlayRegionMediaCapability::~_OverlayRegionMediaCapability(void) +{ +} + +result +_OverlayRegionMediaCapability::Construct(void) +{ + String fileName = _MEDIA_CAPABILITY_FILE_PATH; + + FileAttributes attributes; + result r = File::GetAttributes(fileName, attributes); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "Propagating."); + + long long length = attributes.GetFileSize(); + SysTryReturnResult(NID_UI_CTRL, length > 0, E_SYSTEM, "The size of file(%s) is zero.", fileName.GetPointer()); + + std::unique_ptr pXmlBuffer(new (std::nothrow) char[length]); + SysTryReturnResult(NID_UI_CTRL, pXmlBuffer != null, E_OUT_OF_MEMORY, "The Buffer of Xml is null"); + + File fileObj; + r = fileObj.Construct(fileName, L"r"); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "Propagating."); + + //Read the capability xml file content as parse the capability + int readLen = fileObj.Read(pXmlBuffer.get(), length); + SysTryReturnResult(NID_UI_CTRL, readLen == length, E_SYSTEM, "Failed to read xml file. (length is %d and readLen is %d)", length, readLen); + + //Parse the capability file buffer all the parse key value pair shall be added in __pMap object + r = ParseCapability(pXmlBuffer.get(), readLen); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "Propagating."); + + return r; +} + +void +_OverlayRegionMediaCapability::ParseSection(xmlNodePtr pRoot, const String& section) +{ + xmlNode* pNode = null; + + for (pNode = pRoot->children; pNode; pNode = pNode->next) + { + String name((char*)pNode->name); + String key(section); + + key += "." + name; + + if (pNode->type == XML_ELEMENT_NODE && pNode->children) + { + if (key.Equals(String(_CAM_PRIMARY_DIRECTION))) + { + String direction((char*)pNode->children->content); + if (direction.Equals(String("Back"))) + { + cameraPrimaryDirection = 2; //CAMERA_DIRECTION_BACK; + } + else + { + cameraPrimaryDirection = 1; //CAMERA_DIRECTION_FRONT; + } + } + else if (key.Equals(String(_CAM_PRIMARY_ROTATION))) + { + String rot((char*)pNode->children->content); + int ret = 0 ; + Integer::Decode(rot, ret); + cameraPrimaryRotation = (ret / 90) + 1; + } + else if (key.Equals(String(_CAM_SECONDARY_DIRECTION))) + { + String direction((char*)pNode->children->content); + if (direction.Equals(String("Back"))) + { + cameraSecondaryDirection = 2; //CAMERA_DIRECTION_BACK; + } + else + { + cameraSecondaryDirection = 1; //CAMERA_DIRECTION_FRONT; + } + } + else if (key.Equals(String(_CAM_SECONDARY_ROTATION))) + { + String rot((char*)pNode->children->content); + int ret = 0 ; + Integer::Decode(rot, ret); + cameraSecondaryRotation = (ret / 90) + 1; + } + } + + ParseSection(pNode, key); + } +} + +result +_OverlayRegionMediaCapability::ParseCapability(const char* xmlBuffer, int length) +{ + std::unique_ptr pDoc(xmlParseMemory(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, "Failed to get RootElement of xmlDoc."); + + String name = (const char*) (pRoot->name); + 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) + { + if (pNode->type == XML_ELEMENT_NODE) + { + String nodeName((char*)pNode->name); + ParseSection(pNode, nodeName); + } + } + + return E_SUCCESS; +} + +} diff --git a/src/ui/controls/FUiCtrl_Panel.cpp b/src/ui/controls/FUiCtrl_Panel.cpp new file mode 100644 index 0000000..53be9d5 --- /dev/null +++ b/src/ui/controls/FUiCtrl_Panel.cpp @@ -0,0 +1,359 @@ +// +// 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_Panel.cpp + * @brief This is the implementation file for the %_Panel class. + * + */ + +#include +#include +#include +#include +#include "FUi_AccessibilityContainer.h" +#include "FUi_DataBindingContext.h" +#include "FUi_ResourceManager.h" +#include "FUiAnim_VisualElement.h" +#include "FUiCtrl_Panel.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Ui; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_Panel::_Panel(void) + : _Control() + , __pPanelPresenter(null) + , __groupStyle(GROUP_STYLE_NONE) + , __pGroupStyleBitmap(null) + , __pGroupStyleBackgroundBitmap(null) + , __backgroundBitmapStretch(false) + , __backgroundBitmapHorizontalAlign(PANEL_BACKGROUND_BITMAP_HORIZONTAL_ALIGN_CENTER) + , __backgroundBitmapVerticalAlign(PANEL_BACKGROUND_BITMAP_VERTICAL_ALIGN_MIDDLE) + , __pBackgroundBitmap(null) +{ + GetAccessibilityContainer()->Activate(true); +} + +_Panel::~_Panel(void) +{ + delete __pBackgroundBitmap; + __pBackgroundBitmap = null; + + delete __pGroupStyleBackgroundBitmap; + __pGroupStyleBackgroundBitmap = null; + + delete __pGroupStyleBitmap; + __pGroupStyleBitmap = null; + + delete __pPanelPresenter; + __pPanelPresenter = null; +} + +_Panel* +_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] 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] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + r = pPresenter->Initialize(*pPanel); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pPanel->Initialize(*pPresenter); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pPanel->SetGroupStyle(groupStyle); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + if (groupStyle != GROUP_STYLE_NONE) + { + Color defaultGroupStyleBackgroundColor = 0x00000000; + GET_COLOR_CONFIG(PANEL::GROUPED_STYLE_BG_NORMAL, defaultGroupStyleBackgroundColor); + pPanel->SetBackgroundColor(defaultGroupStyleBackgroundColor); + } + + pPanel->AcquireHandle(); + + r = pPanel->SetBounds(rect); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return pPanel; + +CATCH: + delete pPresenter; + pPanel->__pPanelPresenter = null; + + delete pPanel; + + SetLastResult(r); + return null; +} + +result +_Panel::Initialize(const _PanelPresenter& presenter) +{ + ClearLastResult(); + + SetPanelPresenter(&presenter); + + result r = GetVisualElement()->SetSurfaceOpaque(false); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + SetBackgroundColor(Color(0, 0, 0, 0)); + r = GetLastResult(); + 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] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + SetDataBindingContext(pContext); + + return r; + +CATCH: + delete pContext; + + return r; +} + +result +_Panel::SetPanelPresenter(const _PanelPresenter* panelPresenter) +{ + ClearLastResult(); + + __pPanelPresenter = const_cast <_PanelPresenter*>(panelPresenter); + + return E_SUCCESS; +} + +void +_Panel::OnDraw(void) +{ + ClearLastResult(); + + if (__pPanelPresenter != null) + { + result r = __pPanelPresenter->Draw(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } +} + +void +_Panel::SetBackgroundColor(const Color& color) +{ + ClearLastResult(); + + if (_Control::GetBackgroundColor() == color) + { + return; + } + + _Control::SetBackgroundColor(color); + + if (__groupStyle != GROUP_STYLE_NONE) + { + Invalidate(); + } +} + +GroupStyle +_Panel::GetGroupStyle(void) const +{ + ClearLastResult(); + + return __groupStyle; +} + +void +_Panel::SetGroupStyle(GroupStyle groupStyle) +{ + ClearLastResult(); + + if (__groupStyle == groupStyle) + { + return; + } + __groupStyle = groupStyle; + + delete __pGroupStyleBackgroundBitmap; + __pGroupStyleBackgroundBitmap = null; + + delete __pGroupStyleBitmap; + __pGroupStyleBitmap = null; + + result r = E_SUCCESS; + switch (__groupStyle) + { + case GROUP_STYLE_TOP: + r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_TOP_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pGroupStyleBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_TOP_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pGroupStyleBackgroundBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + break; + case GROUP_STYLE_MIDDLE: + r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_MIDDLE_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pGroupStyleBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_MIDDLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pGroupStyleBackgroundBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + break; + case GROUP_STYLE_BOTTOM: + r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_BOTTOM_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pGroupStyleBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_BOTTOM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pGroupStyleBackgroundBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + break; + case GROUP_STYLE_SINGLE: + r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_SINGLE_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pGroupStyleBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + r = GET_BITMAP_CONFIG_N(PANEL::GROUPED_SINGLE_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pGroupStyleBackgroundBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + break; + case GROUP_STYLE_NONE: + // fall through + default: + break; + } + + return; +CATCH: + delete __pGroupStyleBackgroundBitmap; + __pGroupStyleBackgroundBitmap = null; + delete __pGroupStyleBitmap; + __pGroupStyleBitmap = null; + + SetLastResult(r); +} + +Bitmap* +_Panel::GetGroupStyleBitmap(void) const +{ + ClearLastResult(); + + return __pGroupStyleBitmap; +} + +Bitmap* +_Panel::GetGroupStyleBackgroundBitmap(void) const +{ + ClearLastResult(); + + return __pGroupStyleBackgroundBitmap; +} + +bool +_Panel::IsBackgroundBitmapStretch(void) const +{ + ClearLastResult(); + + return __backgroundBitmapStretch; +} + +void +_Panel::SetBackgroundBitmapStretch(bool stretch) +{ + ClearLastResult(); + + __backgroundBitmapStretch = stretch; +} + +_PanelBackgroundBitmapHorizontalAlign +_Panel::GetBackgroundBitmapHorizontalAlign(void) const +{ + ClearLastResult(); + + return __backgroundBitmapHorizontalAlign; +} + +void +_Panel::SetBackgroundBitmapHorizontalAlign(_PanelBackgroundBitmapHorizontalAlign align) +{ + ClearLastResult(); + + __backgroundBitmapHorizontalAlign = align; +} + +_PanelBackgroundBitmapVerticalAlign +_Panel::GetBackgroundBitmapVerticalAlign(void) const +{ + ClearLastResult(); + + return __backgroundBitmapVerticalAlign; +} + +void +_Panel::SetBackgroundBitmapVerticalAlign(_PanelBackgroundBitmapVerticalAlign align) +{ + ClearLastResult(); + + __backgroundBitmapVerticalAlign = align; +} + +void +_Panel::SetBackgroundBitmapAlign(_PanelBackgroundBitmapHorizontalAlign horizontalAlign, _PanelBackgroundBitmapVerticalAlign verticalAlign) +{ + ClearLastResult(); + + SetBackgroundBitmapHorizontalAlign(horizontalAlign); + SetBackgroundBitmapVerticalAlign(verticalAlign); +} + +Bitmap* +_Panel::GetBackgroundBitmap(void) const +{ + ClearLastResult(); + + return __pBackgroundBitmap; +} + +void +_Panel::SetBackgroundBitmap(Bitmap* bitmap) +{ + ClearLastResult(); + + if (__pBackgroundBitmap != bitmap) + { + delete __pBackgroundBitmap; + __pBackgroundBitmap = null; + } + + if (bitmap == null) + { + return; + } + + __pBackgroundBitmap = _BitmapImpl::CloneN(*bitmap); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + Invalidate(); +} + + +}}} //Tizen::Ui::Controls + diff --git a/src/ui/controls/FUiCtrl_PanelImpl.cpp b/src/ui/controls/FUiCtrl_PanelImpl.cpp new file mode 100644 index 0000000..e24e287 --- /dev/null +++ b/src/ui/controls/FUiCtrl_PanelImpl.cpp @@ -0,0 +1,422 @@ +// +// 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_PanelImpl.cpp + * @brief This is the implementation file for the %_PanelImpl class. + * + */ + +#include +#include +#include +#include "FUi_LayoutImpl.h" +#include "FUi_LayoutLayoutMaker.h" +#include "FUi_DataBindingContextImpl.h" +#include "FUi_UiBuilder.h" +#include "FUiCtrl_PanelImpl.h" +#include "FUiCtrl_FormImpl.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Base; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_PanelImpl::_PanelImpl(Control* pPublic, _Control* pCore, Layout* pPublicPortraitLayout, Layout* pPublicLandscapeLayout) + : _ContainerImpl(pPublic, pCore, pPublicPortraitLayout, pPublicLandscapeLayout) +{ + // nothing +} + +_PanelImpl::~_PanelImpl(void) +{ + // nothing +} + +_PanelImpl* +_PanelImpl::CreatePanelImplN(Panel* pControl, const FloatRectangle& rect, GroupStyle groupStyle, Layout* pPublicPortraitLayout, Layout* pPublicLandscapeLayout) +{ + ClearLastResult(); + + _PanelImpl* pImpl = null; + _Panel* pCore = null; + + if (pPublicPortraitLayout != null) + { + _LayoutImpl* pPortraitLayoutImpl = _LayoutImpl::GetInstance(*pPublicPortraitLayout); + SysTryReturn(NID_UI_CTRL, pPortraitLayoutImpl != null, null, E_INVALID_ARG, "[%s] Portrait layout is invalid object.", GetErrorMessage(E_INVALID_ARG)); + } + + if (pPublicLandscapeLayout != null) + { + _LayoutImpl* pLandscapeLayoutImpl = _LayoutImpl::GetInstance(*pPublicLandscapeLayout); + SysTryReturn(NID_UI_CTRL, pLandscapeLayoutImpl != null, null, E_INVALID_ARG, "[%s] Landscape layout is invalid object", GetErrorMessage(E_INVALID_ARG)); + } + + pCore = _Panel::CreatePanelN(rect, groupStyle); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + pImpl = new (std::nothrow) _PanelImpl(pControl, pCore, pPublicPortraitLayout, pPublicLandscapeLayout); + r = CheckConstruction(pCore, pImpl); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + return pImpl; +} + +const _PanelImpl* +_PanelImpl::GetInstance(const Panel& panel) +{ + return static_cast(_ControlImpl::GetInstance(panel)); +} + +_PanelImpl* +_PanelImpl::GetInstance(Panel& panel) +{ + return static_cast<_PanelImpl*>(_ControlImpl::GetInstance(panel)); +} + +const char* +_PanelImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Controls::Panel"; +} + +const Panel& +_PanelImpl::GetPublic(void) const +{ + return static_cast (_ControlImpl::GetPublic()); +} + +Panel& +_PanelImpl::GetPublic(void) +{ + return static_cast (_ControlImpl::GetPublic()); +} + +const _Panel& +_PanelImpl::GetCore(void) const +{ + return static_cast (_ControlImpl::GetCore()); +} + +_Panel& +_PanelImpl::GetCore(void) +{ + return static_cast <_Panel&>(_ControlImpl::GetCore()); +} + +void +_PanelImpl::SetBackgroundColor(const Color& color) +{ + if (!IsOpaque()) + { + GetCore().SetBackgroundColor(color); + } + else + { + byte r, g, b, a; + color.GetColorComponents(r, g, b, a); + GetCore().SetBackgroundColor(Color(r*a/ 255, g*a/255, b*a/ 255, 255)); + } +} + +bool +_PanelImpl::IsCompositeEnabled(void) const +{ + ClearLastResult(); + return true; +} + +result +_PanelImpl::SetCompositeEnabled(bool enabled) +{ + ClearLastResult(); + + if (enabled) + { + return E_SUCCESS; + } + + SysLogException(NID_UI, E_SYSTEM, "[%s] This method is not supported.", GetErrorMessage(E_SYSTEM)); + return E_SYSTEM; +} + +result +_PanelImpl::OnAttachedToMainTree(void) +{ + result r = E_SUCCESS; + + SetFocusable(false); + + FloatRectangle builderBounds; + _ControlOrientation controlOrientation = _CONTROL_ORIENTATION_PORTRAIT; + bool exist = GetBuilderBoundsF(controlOrientation, builderBounds); + + if (exist) + { + _ContainerImpl* pContainerImpl = this; + _FormImpl* pParentImpl = null; + + while(pContainerImpl) + { + pParentImpl = dynamic_cast<_FormImpl*>(pContainerImpl->GetParent()); + + if (pParentImpl != null) + { + break; + } + else + { + pContainerImpl = pContainerImpl->GetParent(); + } + } + + if (pParentImpl) + { + OrientationStatus orientation = pParentImpl->GetOrientationStatus(); + if (orientation == ORIENTATION_STATUS_LANDSCAPE + || orientation == ORIENTATION_STATUS_LANDSCAPE_REVERSE) + { + FloatRectangle landscapeBuilderBounds; + controlOrientation = _CONTROL_ORIENTATION_LANDSCAPE; + if (GetBuilderBoundsF(controlOrientation, landscapeBuilderBounds)) + { + builderBounds = landscapeBuilderBounds; + } + } + result r = SetBounds(builderBounds); + if (r != E_SUCCESS) + { + SysLogException(NID_UI_CTRL, r, "[%s] SetBounds failed", GetErrorMessage(r)); + } + + SetChildBuilderBounds(this, controlOrientation); + } + } + + r = _ContainerImpl::OnAttachedToMainTree(); + + return r; +} + +void +_PanelImpl::SetChildBuilderBounds(_ContainerImpl* pContainerImpl, _ControlOrientation controlOrientation) +{ + FloatRectangle builderBounds; + _ContainerImpl* pTempContainerImpl; + for(int i = 0; i < pContainerImpl->GetChildCount(); i++) + { + _ControlImpl* pControlImpl = pContainerImpl->GetChild(i); + bool exist = pControlImpl->GetBuilderBoundsF(controlOrientation, builderBounds); + if (!exist) + { + continue; + } + + pControlImpl->SetBounds(builderBounds); + pTempContainerImpl = dynamic_cast<_ContainerImpl*>(pControlImpl); + if (pTempContainerImpl != null) + { + SetChildBuilderBounds(pTempContainerImpl, controlOrientation); + } + + } +} + + +DataBindingContext* +_PanelImpl::GetDataBindingContextN(void) const +{ + return _DataBindingContextImpl::GetDataBindingContextN(*this); +} + +class _PanelMaker + : public _UiBuilderControlMaker +{ +public: + _PanelMaker(_UiBuilder* uibuilder) + : _UiBuilderControlMaker(uibuilder){}; + virtual ~_PanelMaker(void){}; + static _UiBuilderControlMaker* + GetInstance(_UiBuilder* uibuilder) + { + _PanelMaker* pPanelMaker = new (std::nothrow) _PanelMaker(uibuilder); + SysTryReturn(NID_UI_CTRL, pPanelMaker != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + return pPanelMaker; + }; +protected: + virtual Control* + Make(_UiBuilderControl* pControl) + { + result r = E_SYSTEM; + _UiBuilderControlLayout* pControlProperty = null; + Panel* pPanel = null; + FloatRectangle rect; + String elementString; + int opacity = 0; + Color color; + GroupStyle panelGroupStyle = GROUP_STYLE_NONE; + + GetProperty(pControl, &pControlProperty); + if (pControlProperty == null) + { + return null; + } + + if (pControl->GetParentWin().IsEmpty()) + { + pPanel = static_cast (GetContainer()); + } + else + { + pPanel = new (std::nothrow) Panel(); + } + SysTryReturn(NID_UI_CTRL, pPanel != null, null, E_OUT_OF_MEMORY, "[%s] UiBuilder failed to create Panel object.", GetErrorMessage(E_OUT_OF_MEMORY)); + rect = pControlProperty->GetRectF(); + + if (pControl->GetElement(L"groupStyle", elementString) || pControl->GetElement(L"GroupStyle", elementString)) + { + if (elementString.Equals(L"GROUP_STYLE_NONE", false)) + { + panelGroupStyle = GROUP_STYLE_NONE; + } + if (elementString.Equals(L"GROUP_STYLE_SINGLE", false)) + { + panelGroupStyle = GROUP_STYLE_SINGLE; + } + if (elementString.Equals(L"GROUP_STYLE_TOP", false)) + { + panelGroupStyle = GROUP_STYLE_TOP; + } + if (elementString.Equals(L"GROUP_STYLE_MIDDLE", false)) + { + panelGroupStyle = GROUP_STYLE_MIDDLE; + } + if (elementString.Equals(L"GROUP_STYLE_BOTTOM", false)) + { + panelGroupStyle = GROUP_STYLE_BOTTOM; + } + } + + // Construct + _UiBuilderLayoutType layoutType = UIBUILDER_LAYOUT_NONE; + __pLayoutMaker->GetLayoutType(pControlProperty, layoutType); + if (layoutType == UIBUILDER_LAYOUT_NONE) + { + r = pPanel->Construct(rect, panelGroupStyle); + } + else + { + Layout* pPortraitLayout = null; + Layout* pLandscapeLayout = null; + result tempResult = E_SUCCESS; + tempResult = __pLayoutMaker->GetLayoutN(pControl, pPortraitLayout, pLandscapeLayout); + if (E_SUCCESS == tempResult) + { + r = pPanel->Construct(*pPortraitLayout, *pLandscapeLayout, rect, panelGroupStyle); + } + else + { + r = tempResult; + } + _UiBuilderLayoutType layoutType = UIBUILDER_LAYOUT_NONE; + + if (__pLayoutMaker->GetLayoutType(pControlProperty, layoutType) == false) + { + delete pPanel; + return null; + } + + 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) + { + pGridLayout = dynamic_cast(pPortraitLayout); + } + else + { + pGridLayout = dynamic_cast(pLandscapeLayout); + } + __pLayoutMaker->SetGridLayoutContainerProperty(pGridLayout, pControlProperty); + } + } + delete pPortraitLayout; + if (pPortraitLayout != pLandscapeLayout) + { + delete pLandscapeLayout; + } + //CONSTRUCT_WITH_LAYOUT_ARG2(pPanel, rect, gStyle); + } + if (r != E_SUCCESS) + { + delete pPanel; + return null; + } + + if (pControl->GetElement(L"backgroundOpacity", elementString) || pControl->GetElement(L"BGColorOpacity", elementString) || pControl->GetElement(L"backgroundColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + if (pControl->GetElement(L"backgroundColor", elementString) || pControl->GetElement(L"BGColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + pPanel->SetBackgroundColor(color); + } + else + { + color = pPanel->GetBackgroundColor(); + color.SetAlpha(ConvertOpacity100to255(opacity)); + pPanel->SetBackgroundColor(color); + } + + // set composite mode + if (pControl->GetElement(L"compositeEnabled", elementString)) + { + if (elementString.Equals(L"false", false)) + { + pPanel->SetCompositeEnabled(false); + } + } + + return pPanel; + } + + +private: +}; // _PanelMaker + +_PanelRegister::_PanelRegister(void) +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->RegisterControl(L"Panel", _PanelMaker::GetInstance); +} +_PanelRegister::~_PanelRegister(void) +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->UnregisterControl(L"Panel"); +} +static _PanelRegister PanelRegisterToUiBuilder; +}}} //Tizen::Ui::Controls + diff --git a/src/ui/controls/FUiCtrl_PanelPresenter.cpp b/src/ui/controls/FUiCtrl_PanelPresenter.cpp new file mode 100644 index 0000000..0558ad5 --- /dev/null +++ b/src/ui/controls/FUiCtrl_PanelPresenter.cpp @@ -0,0 +1,259 @@ +// +// 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_PanelPresenter.cpp + * @brief This is the implementation file for the %_PanelPresenter class. + * + */ + +#include +#include +#include +#include +#include "FUi_ResourceManager.h" +#include "FUiAnim_VisualElement.h" +#include "FUiCtrl_PanelPresenter.h" +#include "FUiCtrl_Panel.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Ui::Animations; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_PanelPresenter::_PanelPresenter(void) + : __pPanel(null) +{ + // Nothing +} + +_PanelPresenter::~_PanelPresenter(void) +{ + // Nothing +} + +result +_PanelPresenter::Initialize(_Panel& panel) +{ + __pPanel = &panel; + + return E_SUCCESS; +} + +result +_PanelPresenter::Draw(void) +{ + if (__pPanel->GetBackgroundBitmap() == null + && (__pPanel->GetGroupStyle() == GROUP_STYLE_NONE || (__pPanel->GetGroupStyleBitmap() == null && __pPanel->GetGroupStyleBackgroundBitmap() == null))) + { + return E_SUCCESS; + } + + bool customBackground = false; + + Canvas* pCanvas = __pPanel->GetVisualElement()->GetCanvasN(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pCanvas != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pCanvas->Clear(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + DrawGroupStyleBackgroundBitmap(pCanvas); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + DrawBackgrounBitmap(pCanvas); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + switch (__pPanel->GetGroupStyle()) + { + case GROUP_STYLE_TOP: + customBackground = IS_CUSTOM_BITMAP(PANEL::GROUPED_TOP_BG_NORMAL); + break; + case GROUP_STYLE_MIDDLE: + customBackground = IS_CUSTOM_BITMAP(PANEL::GROUPED_MIDDLE_BG_NORMAL); + break; + case GROUP_STYLE_BOTTOM: + customBackground = IS_CUSTOM_BITMAP(PANEL::GROUPED_BOTTOM_BG_NORMAL); + break; + case GROUP_STYLE_SINGLE: + customBackground = IS_CUSTOM_BITMAP(PANEL::GROUPED_SINGLE_BG_NORMAL); + break; + default: + break; + } + + if (!customBackground) + { + DrawGroupStyleBitmap(pCanvas); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + // fall throw +CATCH: + delete pCanvas; + + return r; +} + +void +_PanelPresenter::DrawBackgrounBitmap(Canvas* pCanvas) +{ + Bitmap* pBackgroundBitmap = __pPanel->GetBackgroundBitmap(); + + if (pBackgroundBitmap != null) + { + FloatRectangle bounds = __pPanel->GetBoundsF(); + bounds.x = 0.0f; + bounds.y = 0.0f; + + if (!__pPanel->IsBackgroundBitmapStretch()) + { + int bitmapWidth = pBackgroundBitmap->GetWidth(); + int bitmapHeight = pBackgroundBitmap->GetHeight(); + + switch (__pPanel->GetBackgroundBitmapHorizontalAlign()) + { + case PANEL_BACKGROUND_BITMAP_HORIZONTAL_ALIGN_RIGHT: + bounds.x = bounds.width - bitmapWidth; + break; + case PANEL_BACKGROUND_BITMAP_HORIZONTAL_ALIGN_CENTER: + bounds.x = (bounds.width / 2.0f) - (bitmapWidth / 2.0f); + break; + case PANEL_BACKGROUND_BITMAP_HORIZONTAL_ALIGN_LEFT: + // fall through + default: + break; + } + + switch (__pPanel->GetBackgroundBitmapVerticalAlign()) + { + case PANEL_BACKGROUND_BITMAP_VERTICAL_ALIGN_BOTTOM: + bounds.y = bounds.height - bitmapHeight; + break; + case PANEL_BACKGROUND_BITMAP_VERTICAL_ALIGN_MIDDLE: + bounds.y = (bounds.height / 2.0f) - (bitmapHeight / 2.0f); + break; + case PANEL_BACKGROUND_BITMAP_VERTICAL_ALIGN_TOP: + // fall through + default: + break; + } + + bounds.width = bitmapWidth; + bounds.height = bitmapHeight; + } + + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pBackgroundBitmap)) + { + result r = pCanvas->DrawNinePatchedBitmap(bounds, *pBackgroundBitmap); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + result r = pCanvas->DrawBitmap(bounds, *pBackgroundBitmap); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + +} + +void +_PanelPresenter::DrawGroupStyleBitmap(Canvas* pCanvas) +{ + result r = E_SUCCESS; + + Bitmap* pColorReplacedBitmap = null; + Bitmap* pGroupStyleBitmap = __pPanel->GetGroupStyleBitmap(); + + if (pGroupStyleBitmap != null) + { + FloatRectangle bounds = __pPanel->GetBoundsF(); + bounds.x = 0.0f; + bounds.y = 0.0f; + + pColorReplacedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pGroupStyleBitmap, Color::GetColor(COLOR_ID_MAGENTA), __pPanel->GetBackgroundColor()); + if (pColorReplacedBitmap != null) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pGroupStyleBitmap)) + { + r = pCanvas->DrawNinePatchedBitmap(bounds, *pColorReplacedBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + r = pCanvas->DrawBitmap(bounds, *pColorReplacedBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + } + + // fall through +CATCH: + delete pColorReplacedBitmap; + + SetLastResult(r); +} + +void +_PanelPresenter::DrawGroupStyleBackgroundBitmap(Canvas* pCanvas) +{ + result r = E_SUCCESS; + + Bitmap* pColorReplacedBitmap = null; + Bitmap* pGroupStyleBackgroundBitmap = __pPanel->GetGroupStyleBackgroundBitmap(); + + if (pGroupStyleBackgroundBitmap != null) + { + FloatRectangle bounds = __pPanel->GetBoundsF(); + bounds.x = 0.0f; + bounds.y = 0.0f; + + pColorReplacedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pGroupStyleBackgroundBitmap, Color::GetColor(COLOR_ID_MAGENTA), __pPanel->GetBackgroundColor()); + r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, pColorReplacedBitmap != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pGroupStyleBackgroundBitmap)) + { + r = pCanvas->DrawNinePatchedBitmap(bounds, *pColorReplacedBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + r = pCanvas->DrawBitmap(bounds, *pColorReplacedBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + + // fall through +CATCH: + delete pColorReplacedBitmap; + + SetLastResult(r); +} + +}}} // Tizen::Ui::Controls + diff --git a/src/ui/controls/FUiCtrl_Popup.cpp b/src/ui/controls/FUiCtrl_Popup.cpp new file mode 100644 index 0000000..024fd5b --- /dev/null +++ b/src/ui/controls/FUiCtrl_Popup.cpp @@ -0,0 +1,642 @@ +// +// 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_Popup.cpp + * @brief This is the implementation file for the _Popup class. + */ + +#include +#include +#include +#include +#include "FUi_AccessibilityContainer.h" +#include "FUi_AccessibilityElement.h" +#include "FUi_ControlManager.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_EcoreEvas.h" +#include "FUi_EcoreEvasMgr.h" +#include "FUi_ModalLoopManager.h" +#include "FUi_ResourceManager.h" +#include "FUi_DataBindingContext.h" +#include "FUiCtrl_Popup.h" +#include "FUiCtrl_PopupPresenter.h" +#include "FUiCtrl_Form.h" +#include "FUiCtrl_Frame.h" + + +using namespace Tizen::Graphics; +using namespace Tizen::Ui::Animations; +using namespace Tizen::Ui; +using namespace Tizen::Base; + + +namespace Tizen { namespace Ui { namespace Controls +{ + + +_Popup::_Popup(void) + : _titleState(false) + , _titleText(L"") + , _bgColor(Color(0xFFFFFFFF)) + , _titleTextColor(Color(0xFFFFFFFF)) + , _pComposedBgBitmap(null) + , _pOutlineBitmap(null) + , _pComposedTitleBitmap(null) + , _pTitleEffectBitmap(null) + , _pTitleTextAccessibilityElement(null) + , __pPopupPresenter(null) + , __bounds(0.0f, 0.0f, 0.0f, 0.0f) + , __popupResult(POPUP_RESULT_NONE) +{ +} + +_Popup::~_Popup(void) +{ + delete __pPopupPresenter; + __pPopupPresenter = null; + + delete _pComposedBgBitmap; + _pComposedBgBitmap = null; + + delete _pOutlineBitmap; + _pOutlineBitmap = null; + + delete _pComposedTitleBitmap; + _pComposedTitleBitmap = null; + + delete _pTitleEffectBitmap; + _pTitleEffectBitmap = null; + + if (_pTitleTextAccessibilityElement) + { + _pTitleTextAccessibilityElement->Activate(false); + _pTitleTextAccessibilityElement = null; + } +} + +_Popup* +_Popup::CreatePopupN(void) +{ + _Popup* pPopup = new (std::nothrow) _Popup(); + SysTryReturn(NID_UI_CTRL, pPopup != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + result r = pPopup->CreateRootVisualElement(_WINDOW_TYPE_SUB); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + // for taking touch event + pPopup->AcquireHandle(); + + return pPopup; + +CATCH: + delete pPopup; + return null; +} + +result +_Popup::Initialize(bool hasTitle, const Tizen::Graphics::FloatRectangle& bounds) +{ + result r = E_SUCCESS; + + _AccessibilityContainer* pContainer = null; + _DataBindingContext* pContext = null; + Color titleBgColor(0x00000000); + + _titleState = hasTitle; + __bounds = bounds; + SetClientBounds(GetPopupClientArea()); + SetFocusNavigateEnabled(false); + + _PopupPresenter* pPresenter = new (std::nothrow) _PopupPresenter(); + SysTryReturn(NID_UI_CTRL, pPresenter != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + SetPresenter(*pPresenter); + pPresenter->Initialize(*this); + + SetDimmingEnabled(true); + + GET_COLOR_CONFIG(POPUP::BG_NORMAL, _bgColor); + GET_COLOR_CONFIG(POPUP::TITLE_TEXT_NORMAL, _titleTextColor); + + if (_titleState) + { + GET_COLOR_CONFIG(POPUP::TITLE_BG_NORMAL, titleBgColor); + + 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)); + + // Popup-TitleEffectBitmap + 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 + 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 + 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 + r = GetVisualElement()->SetSurfaceOpaque(false); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + GetVisualElement()->SetClipChildrenEnabled(true); + + //create data binding context + pContext = new (std::nothrow) _DataBindingContext(*this); + SysTryCatch(NID_UI_CTRL, pContext != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + SetDataBindingContext(pContext); + + pContainer = GetAccessibilityContainer(); + if(pContainer != null) + { + pContainer->Activate(true); + } + + return r; + +CATCH: + delete pContext; + + delete _pComposedTitleBitmap; + _pComposedTitleBitmap = null; + + delete _pTitleEffectBitmap; + _pTitleEffectBitmap = null; + + delete _pOutlineBitmap; + _pOutlineBitmap = null; + + delete _pComposedBgBitmap; + _pComposedBgBitmap = null; + + return r; +} + +result +_Popup::SetPresenter(const _PopupPresenter& popupPresenter) +{ + __pPopupPresenter = const_cast <_PopupPresenter*>(&popupPresenter); + + return E_SUCCESS; +} + +_PopupPresenter* +_Popup::GetPresenter(void) +{ + return __pPopupPresenter; +} + +result +_Popup::DoModal(int& modalResult) +{ + SysTryReturn(NID_UI_CTRL, __pPopupPresenter != null, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] This instance is not allocated."); + + __pPopupPresenter->DoModal(modalResult); + + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +_Popup::EndModal(int modalResult) +{ + _ModalLoopManager::GetInstance()->EndMainLoop(POPUP_RESULT_END_MODAL, false); + + SetReturnValue(static_cast (modalResult)); + + return E_SUCCESS; +} + +void +_Popup::SetReturnValue(PopupModalResult rtn) +{ + __popupResult = rtn; +} + +int +_Popup::GetPopupReturnValue(void) const +{ + return (int) __popupResult; +} + +bool +_Popup::HasTitle(void) const +{ + return _titleState; +} + +FloatPoint +_Popup::TranslateFromClientAreaPosition(const FloatPoint& clientPosition) const +{ + FloatRectangle leftTop = GetClientBoundsF(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, FloatPoint(-1.0f, -1.0f), r, "[%s] Propagating.", GetErrorMessage(r)); + + return FloatPoint(clientPosition.x + leftTop.x, clientPosition.y + leftTop.y); +} + +FloatPoint +_Popup::TranslateToClientAreaPosition(const FloatPoint& position) const +{ + FloatRectangle leftTop = GetClientBoundsF(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, FloatPoint(-1.0f, -1.0f), r, "[%s] Propagating.", GetErrorMessage(r)); + + return FloatPoint(position.x - leftTop.x, position.y - leftTop.y); +} + +Canvas* +_Popup::GetClientAreaCanvasN(void) const +{ + Canvas* pCanvas = GetCanvasN(GetClientBoundsF()); + if ((pCanvas == null) || (GetLastResult() != E_SUCCESS)) + { + SysLog(NID_UI_CTRL, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + delete pCanvas; + return null; + } + + return pCanvas; +} + +void +_Popup::SetColor(const Color& color) +{ + result r = E_SUCCESS; + + if (_pComposedBgBitmap != null) + { + delete _pComposedBgBitmap; + _pComposedBgBitmap = null; + } + + 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; +} + +Color +_Popup::GetColor() const +{ + return _bgColor; +} + +void +_Popup::SetTitleTextColor(const Color& color) +{ + _titleTextColor = color; +} + +Color +_Popup::GetTitleTextColor() const +{ + return _titleTextColor; +} + +result +_Popup::SetTitleText(const String& title) +{ + if (HasTitle() == true) + { + if (__pPopupPresenter != null) + { + _titleText = title; + + result r = __pPopupPresenter->SetTitleTextObject(_titleText); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (_pTitleTextAccessibilityElement != null) + { + _pTitleTextAccessibilityElement->SetLabel(title); + } + } + return E_SUCCESS; + } + else + { + return E_SYSTEM; + } + +} + +String +_Popup::GetTitleText(void) const +{ + return _titleText; +} + +const Bitmap* +_Popup::GetBackgroundBitmap(void) const +{ + return _pComposedBgBitmap; +} + +const Bitmap* +_Popup::GetOutlineBitmap(void) const +{ + return _pOutlineBitmap; +} + +Bitmap* +_Popup::GetTitleBackgroundBitmap(void) +{ + return _pComposedTitleBitmap; +} + +Bitmap* +_Popup::GetTitleBackgroundEffectBitmap(void) +{ + return _pTitleEffectBitmap; +} + + +FloatRectangle +_Popup::GetPopupClientArea(void) const +{ + float x = 0.0f; + float y = 0.0f; + float width = 0.0f; + float height = 0.0f; + + float titleHeight = 0.0f; + + if (HasTitle()) + { + GET_SHAPE_CONFIG(POPUP::TITLE_HEIGHT, GetOrientation(), titleHeight); + y = titleHeight; + } + + width = GetBoundsF().width; + height = GetBoundsF().height - y; + + return FloatRectangle(x, y, width, height); +} + +_AccessibilityElement* +_Popup::GetTitleTextAccessibilityElement(void) +{ + return _pTitleTextAccessibilityElement; +} + +void +_Popup::OnDraw(void) +{ + __pPopupPresenter->OnDraw(); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + if(unlikely((_AccessibilityManager::IsActivated()))) + { + _AccessibilityManager::GetInstance()->RequestAutoReading(_ACCESSIBILITY_AUTO_READING_MODE_FIRST_ITEM); + } + return; +} + +void +_Popup::OnFontChanged(Font * pFont) +{ + if (__pPopupPresenter != null) + { + __pPopupPresenter->OnFontChanged(pFont); + } +} + +void +_Popup::OnFontInfoRequested(unsigned long& style, float& size) +{ + if (__pPopupPresenter != null) + { + __pPopupPresenter->OnFontInfoRequested(style, size); + } +} + +void +_Popup::OnActivated(void) +{ + if (__pPopupPresenter != null) + { + __pPopupPresenter->OnActivated(); + } + + if (GetVisibleState()) + { + SetTouchCapture(false, false); + } + + _Control* pOwner = GetOwner(); + if (pOwner == null) + { + _Frame* pFrame = dynamic_cast<_Frame*>(_ControlManager::GetInstance()->GetCurrentFrame()); + SysTryReturnVoidResult(NID_UI_CTRL, pFrame != null, E_SYSTEM, "[E_SYSTEM] This instance is not constructed."); + + _Form* pForm = pFrame->GetCurrentForm(); + if (pForm != null) + { + SetOwner(pForm); + } + else + { + SetOwner(pFrame); + } + } + else + { + pOwner->LockInputEvent(); + } + + _Window::OnActivated(); +} + +void +_Popup::OnDeactivated(void) +{ + _Control* pOwner = GetOwner(); + if (pOwner != null) + { + pOwner->UnlockInputEvent(); + } + + ReleaseTouchCapture(); + + _Window::OnDeactivated(); +} + +void +_Popup::OnVisibleStateChanged(void) +{ + _Window::OnVisibleStateChanged(); +} + +result +_Popup::OnAttachingToMainTree(const _Control* pParent) +{ + return _Window::OnAttachingToMainTree(pParent); +} + +result +_Popup::OnAttachedToMainTree(void) +{ + SysTryReturn(NID_UI_CTRL, GetVisibleState() != false, E_INVALID_OPERATION, + E_INVALID_OPERATION, "[E_INVALID_OPERATION] This control is not 'displayable'"); + + + InitializeAccessibilityElement(); + + return E_SUCCESS; +} + +void +_Popup::InitializeAccessibilityElement(void) +{ + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + if (pContainer != null) + { + pContainer->RemoveAllElement(); + _pTitleTextAccessibilityElement = null; + if (HasTitle() == true) + { + _pTitleTextAccessibilityElement = new (std::nothrow) _AccessibilityElement(true); + SysTryReturnVoidResult(NID_UI_CTRL, _pTitleTextAccessibilityElement != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + _PopupPresenter* pPresenter = GetPresenter(); + SysTryReturnVoidResult(NID_UI_CTRL, pPresenter != null, E_SYSTEM, "[E_SYSTEM] This instance is not constructed."); + _pTitleTextAccessibilityElement->Construct(L"PopupTitleText", pPresenter->GetTitleTextBounds()); + _pTitleTextAccessibilityElement->SetLabel(GetTitleText()); + _pTitleTextAccessibilityElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_POP_UP_HEADER_T_TALKBACK"); + + pContainer->AddElement(*_pTitleTextAccessibilityElement); + } + } + + return; +} + +result +_Popup::OnDetachingFromMainTree(void) +{ + return _Window::OnDetachingFromMainTree(); +} + +result +_Popup::OnBoundsChanging(const FloatRectangle& bounds) +{ + return E_SUCCESS; +} + +void +_Popup::OnBoundsChanged(void) +{ + SetClientBounds(GetPopupClientArea()); + + if (__pPopupPresenter != null) + { + __pPopupPresenter->OnBoundsChanged(); + + if ((_pTitleTextAccessibilityElement != null) && (HasTitle() == true)) + { + _pTitleTextAccessibilityElement->SetBounds(__pPopupPresenter->GetTitleTextBounds()); + } + } +} + +bool +_Popup::IsLayoutChangable(void) const +{ + return true; +} + +bool +_Popup::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + if (&source != this) + { + return false; + } + + return __pPopupPresenter->OnTouchPressed(source, touchinfo); +} + +bool +_Popup::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + if (&source != this) + { + return false; + } + + return __pPopupPresenter->OnTouchReleased(source, touchinfo); +} + +void +_Popup::OnOwnerChanged(_Control* pOldOwner) +{ + if (IsActivated() == false) + { + return; + } + + _Control* pOwner = GetOwner(); + + if (pOldOwner != null) + { + pOldOwner->UnlockInputEvent(); + } + + if (pOwner != null) + { + pOwner->LockInputEvent(); + } +} + +void +_Popup::UpdateClientBounds(const FloatDimension& size, FloatRectangle& clientBounds) +{ + float titleHeight = 0.0f; + + if (HasTitle()) + { + GET_SHAPE_CONFIG(POPUP::TITLE_HEIGHT, GetOrientation(), titleHeight); + clientBounds.y = titleHeight; + } + + clientBounds.width = size.width; + clientBounds.height = size.height - clientBounds.y; +} + +bool +_Popup::IsRotationSynchronized(void) const +{ + return true; +} + +void +_Popup::OnChangeLayout(_ControlOrientation orientation) +{ + _Window::OnChangeLayout(orientation); +} + +}}} // Tizen::Ui::Controls + diff --git a/src/ui/controls/FUiCtrl_PopupImpl.cpp b/src/ui/controls/FUiCtrl_PopupImpl.cpp new file mode 100644 index 0000000..7d8a598 --- /dev/null +++ b/src/ui/controls/FUiCtrl_PopupImpl.cpp @@ -0,0 +1,588 @@ +// +// 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_PopupImpl.cpp + * @brief This is the implementation file for the _PopupImpl class. + */ + + +#include +#include +#include +#include +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_UiBuilder.h" +#include "FUi_DataBindingContextImpl.h" +#include "FUi_ResourceSizeInfo.h" +#include "FUi_ResourceManager.h" +#include "FUi_ControlImplManager.h" +#include "FUi_LayoutImpl.h" +#include "FUi_Math.h" +#include "FUiCtrl_FrameImpl.h" +#include "FUiCtrl_PopupImpl.h" +#include "FUiCtrl_Popup.h" +#include "FUiCtrl_Form.h" + + +using namespace Tizen::Ui::Animations; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; + + +namespace Tizen { namespace Ui { namespace Controls +{ + + +FloatDimension +_PopupImpl::PopupSizeInfo::GetDefaultMinimumSizeF(_ControlOrientation orientation) const +{ + result r = E_SUCCESS; + FloatDimension dimension(0, 0); + + r = GET_DIMENSION_CONFIG(POPUP::MIN_SIZE, orientation, dimension); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, dimension, r, "[%s] A system error occurred.", GetErrorMessage(r)); + SetLastResult(r); + + return dimension; +} + +_PopupImpl* +_PopupImpl::GetInstance(Popup& pPopup) +{ + return static_cast <_PopupImpl*>(pPopup._pControlImpl); +} + +const _PopupImpl* +_PopupImpl::GetInstance(const Popup& pPopup) +{ + return static_cast (pPopup._pControlImpl); +} + +_PopupImpl::_PopupImpl(Popup* pPublic, _Popup* pCore, Layout* pPublicPortraitLayout, Layout* pPublicLandscapeLayout) + : _WindowImpl(pPublic, pCore, pPublicPortraitLayout, pPublicLandscapeLayout) + , _isModal(false) + , _centerAlign(false) + , __init(false) + , __callBoundsChange(false) + , __prevPos(0.0f, 0.0f) + , __boundsChangedInternally(false) + , __boundsChangedExternally(false) +{ + //empty statement +} + +_PopupImpl::~_PopupImpl(void) +{ + //empty statement +} + +_PopupImpl* +_PopupImpl::CreatePopupImplN(Popup* pControl, const Tizen::Graphics::FloatDimension& dim, Layout* pPublicPortraitLayout, Layout* pPublicLandscapeLayout) +{ + result r = E_SUCCESS; + + r = GET_SIZE_INFO(Popup).CheckInitialSizeValidF(dim, _CONTROL_ORIENTATION_PORTRAIT); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, E_INVALID_ARG, "[E_INVALID_ARG] The given size is not valid."); + + _PopupImpl* pImpl = null; + _Popup* pCore = null; + + pCore = _Popup::CreatePopupN(); + SysTryReturn(NID_UI_CTRL, pCore, null, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + pImpl = new (std::nothrow) _PopupImpl(pControl, pCore, pPublicPortraitLayout, pPublicLandscapeLayout); + r = CheckConstruction(pCore, pImpl); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pImpl->InitializeBoundsPropertiesF(GET_SIZE_INFO(Popup), dim, pCore->GetOrientation()); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + ClearLastResult(); + + return pImpl; + +CATCH: + delete pImpl; //This deletes pCore as well + + return null; +} + +result +_PopupImpl::Initialize(bool hasTitle, const Tizen::Graphics::FloatDimension& dim) +{ + result r = E_SUCCESS; + + FloatRectangle bounds = GetCenterAlignedRect(dim.width, dim.height); + __init = true; + _centerAlign = true; + __boundsChangedInternally = true; + r = SetBounds(bounds); + __boundsChangedInternally = false; + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + return GetCore().Initialize(hasTitle, bounds); +} + +const char* +_PopupImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Controls::Popup"; +} + +const Popup& +_PopupImpl::GetPublic(void) const +{ + return static_cast (_ControlImpl::GetPublic()); +} + +Popup& +_PopupImpl::GetPublic(void) +{ + return static_cast (_ControlImpl::GetPublic()); +} + +const _Popup& +_PopupImpl::GetCore(void) const +{ + return static_cast (_ControlImpl::GetCore()); +} + +_Popup& +_PopupImpl::GetCore(void) +{ + return static_cast <_Popup&>(_ControlImpl::GetCore()); +} + +FloatRectangle +_PopupImpl::GetCenterAlignedRect(float width, float height) const +{ + float x = 0.0f; + float y = 0.0f; + + _ControlManager* pControlManager = _ControlManager::GetInstance(); + + FloatDimension screenRect = pControlManager->GetScreenSizeF(); + + if (GetCore().GetOrientation() == _CONTROL_ORIENTATION_LANDSCAPE) + { + float temp = screenRect.width; + screenRect.width = screenRect.height; + screenRect.height = temp; + } + + x = (screenRect.width - width) / 2.0f; + y = (screenRect.height - height) / 2.0f; + + return FloatRectangle(x, y, width, height); +} + +FloatRectangle +_PopupImpl::GetClientAreaBounds(void) const +{ + return CoordinateSystem::AlignToDevice(_ControlImpl::GetClientBoundsF()); +} + +Canvas* +_PopupImpl::GetClientAreaCanvasN(void) const +{ + return GetCore().GetClientAreaCanvasN(); +} + +FloatPoint +_PopupImpl::TranslateFromClientAreaPosition(const FloatPoint& clientPosition) const +{ + return GetCore().TranslateFromClientAreaPosition(clientPosition); +} + +FloatPoint +_PopupImpl::TranslateToClientAreaPosition(const FloatPoint& position) const +{ + return GetCore().TranslateToClientAreaPosition(position); +} + +result +_PopupImpl::DoModal(int& modalResult) +{ + SysTryReturn(NID_UI_CTRL, GetVisibleState() != false, E_INVALID_STATE, + E_INVALID_STATE, "[E_INVALID_STATE] The Popup is not visible"); + + _isModal = true; + + return GetCore().DoModal(modalResult); +} + +result +_PopupImpl::EndModal(int modalResult) +{ + SysTryReturn(NID_UI_CTRL, _isModal == true, E_INVALID_STATE, E_INVALID_STATE, + "[E_INVALID_STATE] The method is not supported because this popup isn't running as a modal window."); + + return GetCore().EndModal(modalResult); +} + +result +_PopupImpl::SetColor(const Color& color) +{ + GetCore().SetColor(color); + + return E_SUCCESS; +} + +Color +_PopupImpl::GetColor(void) const +{ + return GetCore().GetColor(); +} + +result +_PopupImpl::SetTitleText(const Tizen::Base::String& title) +{ + result r = GetCore().SetTitleText(title); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +Tizen::Base::String +_PopupImpl::GetTitleText(void) const +{ + return GetCore().GetTitleText(); +} + +result +_PopupImpl::SetTitleTextColor(const Color& color) +{ + GetCore().SetTitleTextColor(color); + + return E_SUCCESS; +} + +Color +_PopupImpl::GetTitleTextColor() const +{ + return GetCore().GetTitleTextColor(); +} + +DataBindingContext* +_PopupImpl::GetDataBindingContextN(void) const +{ + return Tizen::Ui::_DataBindingContextImpl::GetDataBindingContextN(*this); +} + +bool +_PopupImpl::GetXmlBounds(Tizen::Graphics::FloatRectangle& rect) +{ + Rectangle builderBounds; + _ControlOrientation controlOrientation = _CONTROL_ORIENTATION_PORTRAIT; + bool exist = GetBuilderBounds(controlOrientation, builderBounds); + if(!exist) + { + return false; + } + + controlOrientation = GetCore().GetOrientation(); + + if (controlOrientation == _CONTROL_ORIENTATION_LANDSCAPE) + { + exist = GetBuilderBounds(controlOrientation, builderBounds); + } + rect = _CoordinateSystemUtils::ConvertToFloat(builderBounds); + + return true; +} +void +_PopupImpl::OnChangeLayout(_ControlOrientation orientation) +{ + result r = E_SUCCESS; + FloatRectangle bounds; + if (!__callBoundsChange) + { + _centerAlign = true; + + if (__boundsChangedExternally) + { + bounds = GetCenterAlignedRect(GetBounds().width, GetBounds().height); + __boundsChangedInternally = true; + r = SetBounds(bounds); + __boundsChangedInternally = false; + } + else + { + + if(GetXmlBounds(bounds)) + { + bounds = GetCenterAlignedRect(bounds.width, bounds.height); + } + else + { + bounds = GetCenterAlignedRect(GetBounds().width, GetBounds().height); + } + __boundsChangedInternally = true; + r = SetBounds(bounds); + __boundsChangedInternally = false; + } + + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + if (!__boundsChangedExternally) + { + if(GetXmlBounds(bounds)) + { + __boundsChangedInternally = true; + r = SetBounds(bounds); + __boundsChangedInternally = false; + } + } + + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + } + + Layout* pLayout; + + pLayout = GetPublicLayoutN(); + + if (pLayout != null) + { + Tizen::Ui::_SharedPtr pLayoutImpl = _LayoutImpl::GetLayoutImpl(pLayout); + + if (!pLayoutImpl.IsNull()) + { + r = GetCore().SetCurrentLayout(pLayoutImpl->GetCore()); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] Failed to set up the current layout"); + } + } + + return GetCore().OnChangeLayout(orientation); +} + +result +_PopupImpl::OnBoundsChanging(const FloatRectangle& bounds) +{ + __prevPos = GetBoundsF().GetTopLeft(); + + return _ControlImpl::OnBoundsChanging(bounds); +} + +void +_PopupImpl::OnBoundsChanged(void) +{ + if (!__boundsChangedInternally && __init) + { + __boundsChangedExternally = true; + } + + FloatRectangle rect = GetBoundsF(); + if (__init) + { + if ((_centerAlign || (_FloatCompare(__prevPos.x, rect.x) && _FloatCompare(__prevPos.y, rect.y))) && __callBoundsChange == false) + { + rect = GetCenterAlignedRect(GetSizeF().width, GetSizeF().height); + } + else + { + __callBoundsChange = true; + } + } + + _centerAlign = true; + __boundsChangedInternally = true; + result r = SetBounds(rect, true); + __boundsChangedInternally = false; + if (IsFailed(r)) + { + // Error propagation fall through + ClearLastResult(); + } + + _ControlImpl::OnBoundsChanged(); + + _centerAlign = false; +} + + +class _PopupMaker + : public _UiBuilderControlMaker +{ +public: + _PopupMaker(_UiBuilder* uibuilder) + : _UiBuilderControlMaker(uibuilder){}; + virtual ~_PopupMaker(){}; + + static _UiBuilderControlMaker* GetInstance(_UiBuilder* uibuilder) + { + _PopupMaker* pPopupMaker = new (std::nothrow) _PopupMaker(uibuilder); + + return static_cast<_UiBuilderControlMaker*>(pPopupMaker); + }; + +protected: + virtual Tizen::Ui::Control* Make(_UiBuilderControl* pControl) + { + bool hasTitle = false; + result r = E_SYSTEM; + _UiBuilderControlLayout* pControlProperty = null; + Tizen::Base::String elementString; + Color color; + Tizen::Graphics::FloatDimension dim; + Tizen::Graphics::FloatRectangle rect; + + Popup* pPopup = dynamic_cast (GetContainer()); + SysTryReturn(NID_UI_CTRL, pPopup != null, null, E_SYSTEM, "[E_SYSTEM] This instance is not constructed."); + + SetUiBuilderRotateState(UIBUIDER_SCREEN_VERTICAL); + GetProperty(pControl, &pControlProperty); + + if (pControlProperty == null) + { + return null; + } + + if (pControl->GetElement("titleText", elementString)) + { + hasTitle = true; + } + else + { + hasTitle = false; + } + + //pPopup = new (std::nothrow) Popup(); + rect = pControlProperty->GetRectF(); + + dim.width = rect.width; + dim.height = rect.height; + + _UiBuilderLayoutType layoutType = UIBUILDER_LAYOUT_NONE; + __pLayoutMaker->GetLayoutType(pControlProperty, layoutType); + + if (layoutType == UIBUILDER_LAYOUT_NONE) + { + r = pPopup->Construct(hasTitle, dim); + } + else + { + Layout* pPortraitLayout = null; + Layout* pLandscapeLayout = null; + result tempResult = E_SUCCESS; + + tempResult = __pLayoutMaker->GetLayoutN(pControl, pPortraitLayout, pLandscapeLayout); + + if (E_SUCCESS == tempResult) + { + r = pPopup->Construct(*pPortraitLayout, *pLandscapeLayout, hasTitle, dim); + } + else + { + r = tempResult; + } + + _UiBuilderLayoutType layoutType = UIBUILDER_LAYOUT_NONE; + + if (__pLayoutMaker->GetLayoutType(pControlProperty, layoutType) == false) + { + return null; + } + + 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) + { + pGridLayout = dynamic_cast(pPortraitLayout); + } + else + { + pGridLayout = dynamic_cast(pLandscapeLayout); + } + __pLayoutMaker->SetGridLayoutContainerProperty(pGridLayout, pControlProperty); + } + } + + delete pPortraitLayout; + + if (pPortraitLayout != pLandscapeLayout) + { + delete pLandscapeLayout; + } + // CONSTRUCT_WITH_LAYOUT_ARG2(pPopup, hasTitle, dim); + } + + if (r != E_SUCCESS) + { + SysLog(NID_UI_CTRL, "Failed to create Popup."); + return null; + } + + if (hasTitle == true) + { + pPopup->SetTitleText(elementString); + } + + //set property + if (pControl->GetElement("color", elementString)) + { + ConvertStringToColor(elementString, color); + pPopup->SetColor(color); + } + + if (pControl->GetElement("titleTextColor", elementString)) + { + ConvertStringToColor(elementString, color); + pPopup->SetTitleTextColor(color); + } + + if (pControl->GetElement(L"accessibilityHint", elementString)) + { + AccessibilityContainer* pContainer = pPopup->GetAccessibilityContainer(); + if (pContainer) + { + AccessibilityElement* pElement = pContainer->GetElement(L"PopupTitleText"); + if (pElement) + { + pElement->SetHint(elementString); + } + } + } + + return pPopup; + } + +private: + +}; // _PopupMaker + +_PopupRegister::_PopupRegister() +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->RegisterControl(L"Popup", _PopupMaker::GetInstance); +} + +_PopupRegister::~_PopupRegister() +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->UnregisterControl(L"Popup"); +} +static _PopupRegister PopupRegisterToUiBuilder; + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_PopupPresenter.cpp b/src/ui/controls/FUiCtrl_PopupPresenter.cpp new file mode 100644 index 0000000..a42e518 --- /dev/null +++ b/src/ui/controls/FUiCtrl_PopupPresenter.cpp @@ -0,0 +1,609 @@ +// +// 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_PopupPresenter.cpp + * @brief This is the implementation file for the _PopupPresenter class. + */ + + +#include +#include +#include +#include +#include +#include +#include "FUi_ControlManager.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_Math.h" +#include "FUi_ModalLoopManager.h" +#include "FUi_ResourceManager.h" +#include "FUi_UiTouchEvent.h" +#include "FUiAnim_RootVisualElement.h" +#include "FUiCtrl_PopupPresenter.h" +#include "FUiCtrl_Popup.h" + + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Graphics::_Text; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Animations; + + +namespace Tizen { namespace Ui { namespace Controls +{ + + +_PopupPresenter::_PopupPresenter(void) + : _pFont(null) + , _titleBounds(0.0f, 0.0f, 0.0f, 0.0f) + , _titleBgBounds(0.0f, 0.0f, 0.0f, 0.0f) + , _titleTextSize(0.0f) + , _fontStyle(0) + , _fontSize(0.0f) + , _pTitleTextObject(null) + , __pPopup(null) + , __pPopupVE(null) + , __pBackgroundVE(null) +{ + //empty statement +} + +_PopupPresenter::~_PopupPresenter(void) +{ + if (_pTitleTextObject != null) + { + _pTitleTextObject->RemoveAll(); + delete _pTitleTextObject; + _pTitleTextObject = null; + } + + if (__pBackgroundVE != null) + { + __pBackgroundVE->Destroy(); + __pBackgroundVE = null; + } +} + +void +_PopupPresenter::Initialize(_Popup& popup) +{ + result r = E_SUCCESS; + + FloatRectangle bounds; + + float transTopMargin = 0.0f; + float transBottomMargin = 0.0f; + float transLeftMargin = 0.0f; + float transRightMargin = 0.0f; + + float bgOutlineEffectTopMargin = 0.0f; + float bgOutlineEffectBottomMargin = 0.0f; + float bgOutlineEffectLeftMargin = 0.0f; + float bgOutlineEffectRightMargin = 0.0f; + + _ControlOrientation orientation; + + __pPopup = &popup; + + orientation = __pPopup->GetOrientation(); + + GET_SHAPE_CONFIG(POPUP::BG_IMAGE_TRANSPARENT_TOP_MARGIN, orientation, transTopMargin); + GET_SHAPE_CONFIG(POPUP::BG_IMAGE_TRANSPARENT_BOTTOM_MARGIN, orientation, transBottomMargin); + GET_SHAPE_CONFIG(POPUP::BG_IMAGE_TRANSPARENT_LEFT_MARGIN, orientation, transLeftMargin); + GET_SHAPE_CONFIG(POPUP::BG_IMAGE_TRANSPARENT_RIGHT_MARGIN, orientation, transRightMargin); + + GET_SHAPE_CONFIG(POPUP::BG_OUTLINE_EFFECT_TOP_MARGIN, orientation, bgOutlineEffectTopMargin); + GET_SHAPE_CONFIG(POPUP::BG_OUTLINE_EFFECT_BOTTOM_MARGIN, orientation, bgOutlineEffectBottomMargin); + GET_SHAPE_CONFIG(POPUP::BG_OUTLINE_EFFECT_LEFT_MARGIN, orientation, bgOutlineEffectLeftMargin); + GET_SHAPE_CONFIG(POPUP::BG_OUTLINE_EFFECT_RIGHT_MARGIN, orientation, bgOutlineEffectRightMargin); + + __pBackgroundVE = new (std::nothrow) _VisualElement(); + SysTryReturnVoidResult(NID_UI_CTRL, __pBackgroundVE != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = __pBackgroundVE->Construct(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + bounds = __pPopup->GetBoundsF(); + + bounds.x -= bgOutlineEffectLeftMargin; + bounds.y -= bgOutlineEffectTopMargin; + + __pBackgroundVE->SetBounds(FloatRectangle(bounds.x, + bounds.y, + bounds.width + bgOutlineEffectLeftMargin + bgOutlineEffectRightMargin, + bounds.height + bgOutlineEffectTopMargin + bgOutlineEffectBottomMargin)); + + r = __pBackgroundVE->SetSurfaceOpaque(false); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pBackgroundVE->SetShowState(true); + __pBackgroundVE->SetImplicitAnimationEnabled(false); + + __pPopupVE = __pPopup->GetVisualElement(); + SysTryCatch(NID_UI_CTRL, (__pPopupVE != null), r = E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get the Popup visual element."); + + return; + +CATCH: + __pBackgroundVE->Destroy(); + __pBackgroundVE = null; + + return; +} + + +void +_PopupPresenter::OnFontChanged(Font* pFont) +{ + _pFont = pFont; +} + +void +_PopupPresenter::OnFontInfoRequested(unsigned long& style, float& size) +{ + style = _fontStyle; + size = _fontSize; +} + +result +_PopupPresenter::SetFontInfo(unsigned long style, float size) +{ + if (_fontSize == size && _fontStyle == style && _pFont != null) + { + return E_SUCCESS; + } + + _fontStyle = style; + _fontSize = size; + + _pFont = GetCore()->GetFallbackFont(); + SysTryReturnResult(NID_UI_CTRL, _pFont != null, GetLastResult(), "Failed to get a font."); + + return E_SUCCESS; +} + +result +_PopupPresenter::SetTitleTextObject(const String &title) +{ + result r = E_SUCCESS; + TextSimple* pSimpleText = null; + + float titleTextSize = 0.0f; + float minTitleTextSize = 0.0f; + float titleHeight = 0.0f; + float titleTopMargin = 0.0f; + float titleLeftMargin = 0.0f; + float titleRightMargin = 0.0f; + float transTopMargin = 0.0f; + float transLeftMargin = 0.0f; + float transRightMargin = 0.0f; + + _ControlOrientation orientation; + + orientation = __pPopup->GetOrientation(); + + GET_SHAPE_CONFIG(POPUP::TITLE_TEXT_SIZE, orientation, titleTextSize); + GET_SHAPE_CONFIG(POPUP::MIN_TITLE_TEXT_SIZE, orientation, minTitleTextSize); + GET_SHAPE_CONFIG(POPUP::TITLE_HEIGHT, orientation, titleHeight); + + GET_SHAPE_CONFIG(POPUP::TITLE_TEXT_TOP_MARGIN, orientation, titleTopMargin); + GET_SHAPE_CONFIG(POPUP::TITLE_TEXT_LEFT_MARGIN, orientation, titleLeftMargin); + GET_SHAPE_CONFIG(POPUP::TITLE_TEXT_RIGHT_MARGIN, orientation, titleRightMargin); + + GET_SHAPE_CONFIG(POPUP::BG_IMAGE_TRANSPARENT_TOP_MARGIN, orientation, transTopMargin); + GET_SHAPE_CONFIG(POPUP::BG_IMAGE_TRANSPARENT_LEFT_MARGIN, orientation, transLeftMargin); + GET_SHAPE_CONFIG(POPUP::BG_IMAGE_TRANSPARENT_RIGHT_MARGIN, orientation, transRightMargin); + + if (_pTitleTextObject != null) + { + delete _pTitleTextObject; + } + + // Title text + _pTitleTextObject = new (std::nothrow) TextObject(); + SysTryReturn(NID_UI_CTRL, _pTitleTextObject != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = _pTitleTextObject->Construct(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pSimpleText = new (std::nothrow) TextSimple(const_cast (title.GetPointer()), + title.GetLength(), + 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); + _pTitleTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); + _pTitleTextObject->SetTextObjectEllipsisType(TEXT_OBJECT_ELLIPSIS_TYPE_TAIL); + + _pTitleTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT); + + _pTitleTextObject->SetBounds(FloatRectangle(titleLeftMargin, + titleTopMargin, + __pPopup->GetBoundsF().width - (titleLeftMargin + titleRightMargin), + titleHeight - titleTopMargin)); + + r = CalculateTitleTextSize(titleTextSize, minTitleTextSize); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + _titleBgBounds.SetBounds(0, + 0, + __pPopup->GetBounds().width, + titleHeight); + + _titleBounds = FloatRectangle(titleLeftMargin, + _titleBgBounds.y + (_titleBgBounds.height - _pTitleTextObject->GetTotalHeight()) / 2.0f, + __pPopup->GetBoundsF().width - (titleLeftMargin + titleRightMargin), + _pTitleTextObject->GetTotalHeight()); + + _pTitleTextObject->SetBounds(_titleBounds); + + return r; + +CATCH: + delete _pTitleTextObject; + _pTitleTextObject = null; + + return r; +} + +result +_PopupPresenter::CalculateTitleTextSize(float titleTextSize, float minTitleTextSize) +{ + result r = E_SUCCESS; + + int titleTextLength = _pTitleTextObject->GetTextLength(); + FloatRectangle titleBounds = _pTitleTextObject->GetBoundsF(); + + while (titleTextSize >= minTitleTextSize) + { + r = SetFontInfo(FONT_STYLE_PLAIN, titleTextSize); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] failed to set font.", GetErrorMessage(r)); + + _pTitleTextObject->SetFont(_pFont, 0, titleTextLength); + _pTitleTextObject->Compose(); + + FloatDimension titleAreaSize = _pTitleTextObject->GetTextExtentF(0, titleTextLength); + if (_FloatCompareLE(titleAreaSize.width, titleBounds.width)) + { + break; + } + + --titleTextSize; + } + + if (titleTextSize < minTitleTextSize) + { + _titleTextSize = minTitleTextSize; + } + else + { + _titleTextSize = titleTextSize; + } + + return r; +} +void +_PopupPresenter::OnDraw(void) +{ + Draw(); +} + +FloatRectangle +_PopupPresenter::GetTitleTextBounds(void) const +{ + return _titleBounds; +} + +void +_PopupPresenter::OnBoundsChanged(void) +{ + UpdateEffectBounds(); + + if (__pPopup->HasTitle() == true) + { + UpdateTitleTextBounds(); + } +} + +void +_PopupPresenter::UpdateTitleTextBounds(void) +{ + float titleLeftMargin = 0.0f; + float titleRightMargin = 0.0f; + float titleTextSize = 0.0f; + float minTitleTextSize = 0.0f; + + _ControlOrientation orientation; + + if (_pTitleTextObject == null) + { + return; + } + + orientation = __pPopup->GetOrientation(); + + GET_SHAPE_CONFIG(POPUP::TITLE_TEXT_LEFT_MARGIN, orientation, titleLeftMargin); + GET_SHAPE_CONFIG(POPUP::TITLE_TEXT_RIGHT_MARGIN, orientation, titleRightMargin); + + GET_SHAPE_CONFIG(POPUP::TITLE_TEXT_SIZE, orientation, titleTextSize); + GET_SHAPE_CONFIG(POPUP::MIN_TITLE_TEXT_SIZE, orientation, minTitleTextSize); + + _titleBounds.width = __pPopup->GetBounds().width - (titleLeftMargin + titleRightMargin), + _titleBgBounds.width = __pPopup->GetBounds().width; + + _pTitleTextObject->SetBounds(_titleBounds); + + result r = CalculateTitleTextSize(titleTextSize, minTitleTextSize); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + return; +} + +void +_PopupPresenter::UpdateEffectBounds(void) +{ + FloatRectangle bounds; + + float bgOutlineEffectTopMargin = 0.0f; + float bgOutlineEffectBottomMargin = 0.0f; + float bgOutlineEffectLeftMargin = 0.0f; + float bgOutlineEffectRightMargin = 0.0f; + + _ControlOrientation orientation; + + orientation = __pPopup->GetOrientation(); + + GET_SHAPE_CONFIG(POPUP::BG_OUTLINE_EFFECT_TOP_MARGIN, orientation, bgOutlineEffectTopMargin); + GET_SHAPE_CONFIG(POPUP::BG_OUTLINE_EFFECT_BOTTOM_MARGIN, orientation, bgOutlineEffectBottomMargin); + GET_SHAPE_CONFIG(POPUP::BG_OUTLINE_EFFECT_LEFT_MARGIN, orientation, bgOutlineEffectLeftMargin); + GET_SHAPE_CONFIG(POPUP::BG_OUTLINE_EFFECT_RIGHT_MARGIN, orientation, bgOutlineEffectRightMargin); + + bounds = __pPopup->GetBoundsF(); + + bounds.x -= bgOutlineEffectLeftMargin; + bounds.y -= bgOutlineEffectTopMargin; + __pBackgroundVE->SetBounds(FloatRectangle(bounds.x, + bounds.y, + bounds.width + bgOutlineEffectLeftMargin + bgOutlineEffectRightMargin, + bounds.height + bgOutlineEffectTopMargin + bgOutlineEffectBottomMargin)); +} + +void +_PopupPresenter::Draw(void) +{ + result r = E_SUCCESS; + + float transTopMargin = 0.0f; + float transBottomMargin = 0.0f; + float transLeftMargin = 0.0f; + float transRightMargin = 0.0f; + + float bgOutlineEffectTopMargin = 0.0f; + float bgOutlineEffectBottomMargin = 0.0f; + float bgOutlineEffectLeftMargin = 0.0f; + float bgOutlineEffectRightMargin = 0.0f; + bool isCustomBitmap = false; + + FloatDimension minSize(0.0f, 0.0f); + FloatRectangle pBounds; + + _ControlOrientation orientation; + + orientation = __pPopup->GetOrientation(); + + isCustomBitmap = IS_CUSTOM_BITMAP(POPUP::BG_NORMAL); + + GET_SHAPE_CONFIG(POPUP::BG_IMAGE_TRANSPARENT_TOP_MARGIN, orientation, transTopMargin); + GET_SHAPE_CONFIG(POPUP::BG_IMAGE_TRANSPARENT_BOTTOM_MARGIN, orientation, transBottomMargin); + GET_SHAPE_CONFIG(POPUP::BG_IMAGE_TRANSPARENT_LEFT_MARGIN, orientation, transLeftMargin); + GET_SHAPE_CONFIG(POPUP::BG_IMAGE_TRANSPARENT_RIGHT_MARGIN, orientation, transRightMargin); + + GET_SHAPE_CONFIG(POPUP::BG_OUTLINE_EFFECT_TOP_MARGIN, orientation, bgOutlineEffectTopMargin); + GET_SHAPE_CONFIG(POPUP::BG_OUTLINE_EFFECT_BOTTOM_MARGIN, orientation, bgOutlineEffectBottomMargin); + GET_SHAPE_CONFIG(POPUP::BG_OUTLINE_EFFECT_LEFT_MARGIN, orientation, bgOutlineEffectLeftMargin); + GET_SHAPE_CONFIG(POPUP::BG_OUTLINE_EFFECT_RIGHT_MARGIN, orientation, bgOutlineEffectRightMargin); + GET_DIMENSION_CONFIG(POPUP::MIN_SIZE_EXCEPT_TRANSPARENT_MARGIN, orientation, minSize); + + // Get canvas + Canvas* pCanvas = __pPopup->GetCanvasN(); + SysTryReturnVoidResult(NID_UI_CTRL, pCanvas != null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + + Canvas* pBackgroundCanvas = __pBackgroundVE->GetCanvasN(); + SysTryCatch(NID_UI_CTRL, pBackgroundCanvas != null, , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + pBackgroundCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pBackgroundCanvas->Clear(); + + pBounds = __pPopup->GetBoundsF(); + // Draw BG + if (__pPopup->GetBackgroundBitmap() != null) + { + FloatRectangle bounds(-transLeftMargin, + -transTopMargin, + pBounds.width + transLeftMargin + transRightMargin, + pBounds.height + transTopMargin + transBottomMargin); + + const Bitmap* pBackgroundBitmap = __pPopup->GetBackgroundBitmap(); + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pBackgroundBitmap)) + { + pCanvas->DrawNinePatchedBitmap(bounds, *pBackgroundBitmap); + } + else + { + pCanvas->DrawBitmap(bounds, *pBackgroundBitmap); + } + } + + // Draw Outline + if (!isCustomBitmap && __pPopup->GetOutlineBitmap() != null && + _FloatCompareGE(pBounds.width, minSize.width) && + _FloatCompareGE(pBounds.height, minSize.height) && __pPopup->GetColor().GetAlpha() != 0x00) + { + FloatRectangle bounds(0.0f, + 0.0f, + pBounds.width + bgOutlineEffectLeftMargin + bgOutlineEffectRightMargin, + pBounds.height + bgOutlineEffectTopMargin + bgOutlineEffectBottomMargin); + + const Bitmap* pOutlineBitmap = __pPopup->GetOutlineBitmap(); + + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pOutlineBitmap)) + { + pBackgroundCanvas->DrawNinePatchedBitmap(bounds, *pOutlineBitmap); + } + else + { + pBackgroundCanvas->DrawBitmap(bounds, *pOutlineBitmap); + } + } + + // Draw Title + if (__pPopup->HasTitle()) + { + if (__pPopup->GetColor().GetAlpha() != 0x00) + { + const Bitmap* pTitleBitmap = __pPopup->GetTitleBackgroundBitmap(); + const Bitmap* pTitleEffectBitmap = __pPopup->GetTitleBackgroundEffectBitmap(); + + //DrawTitleBG + if(pTitleBitmap != null) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pTitleBitmap)) + { + pCanvas->DrawNinePatchedBitmap(_titleBgBounds, *pTitleBitmap); + } + else + { + pCanvas->DrawBitmap(_titleBgBounds, *pTitleBitmap); + } + } + + //DrawEffectTitleBitmap + if (pTitleEffectBitmap != null) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pTitleEffectBitmap)) + { + pCanvas->DrawNinePatchedBitmap(_titleBgBounds, *pTitleEffectBitmap); + } + else + { + pCanvas->DrawBitmap(_titleBgBounds, *pTitleEffectBitmap); + } + } + } + + if (_pTitleTextObject != null) + { + r = SetFontInfo(FONT_STYLE_PLAIN, _titleTextSize); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + _pTitleTextObject->SetFont(_pFont, 0, _pTitleTextObject->GetTextLength()); + _pTitleTextObject->SetBounds(_titleBounds); + _pTitleTextObject->SetForegroundColor(__pPopup->GetTitleTextColor(), 0, _pTitleTextObject->GetTextLength()); + + _pTitleTextObject->Draw(*_CanvasImpl::GetInstance(*pCanvas)); + } + } + + //fall thtrough +CATCH: + delete pCanvas; + delete pBackgroundCanvas; + + return; +} + +void +_PopupPresenter::OnActivated(void) +{ + result r = E_SUCCESS; + + _Window* pWindow = __pPopup->GetRootWindow(); + _RootVisualElement* pParent = pWindow->GetRootVisualElement(); + if (pParent) + { + r = pParent->InsertChild(*__pBackgroundVE, __pPopupVE, false); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + } + + return; +} + +result +_PopupPresenter::DoModal(int& modalResult) +{ + result r = E_SUCCESS; + + r = __pPopup->Open(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + ProcessEvent(); + + __pPopup->Close(); + + modalResult = __pPopup->GetPopupReturnValue(); + + return r; +} + +void +_PopupPresenter::ProcessEvent(void) +{ + _ModalLoopManager::GetInstance()->BeginMainLoop(); + + int exitCode = _ModalLoopManager::GetInstance()->GetLastExitCode(); + switch (exitCode) + { + case _ModalLoopManager::MODAL_LOOP_EXIT_CODE_APP_TERMINATION: + case _ModalLoopManager::MODAL_LOOP_EXIT_CODE_CONTINUOUS_TERMINATION: + _ModalLoopManager::GetInstance()->EndMainLoop(exitCode, false); + break; + default: + break; + } +} + +bool +_PopupPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + return true; +} + +bool +_PopupPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + return true; +} + +_Popup* +_PopupPresenter::GetCore(void) +{ + return __pPopup; +} + +}}} // Tizen::Ui::Controls + + diff --git a/src/ui/controls/FUiCtrl_Progress.cpp b/src/ui/controls/FUiCtrl_Progress.cpp new file mode 100644 index 0000000..2c0f9f0 --- /dev/null +++ b/src/ui/controls/FUiCtrl_Progress.cpp @@ -0,0 +1,394 @@ +// +// 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_Progress.cpp + * @brief This is the implementation file for the _Progress class. + */ + +#include +#include +#include "FUiAnim_VisualElement.h" +#include "FUi_ResourceManager.h" +#include "FUi_AccessibilityContainer.h" +#include "FUi_AccessibilityElement.h" +#include "FUiCtrl_Progress.h" +#include "FUiCtrl_ProgressPresenter.h" + +using namespace Tizen::Ui; +using namespace Tizen::Graphics; +using namespace Tizen::Base; + +namespace Tizen { namespace Ui { namespace Controls +{ + +IMPLEMENT_PROPERTY(_Progress); + +_Progress::_Progress(void) + : __pProgressPresenter(null) + , __pAccessibilityElement(null) +{ + Tizen::Ui::Animations::_VisualElement* pBase = GetVisualElement(); + + if (pBase != null) + { + pBase->SetSurfaceOpaque(false); + } +} + +_Progress::~_Progress(void) +{ + delete __pProgressPresenter; + __pProgressPresenter = null; + if (__pAccessibilityElement != null) + { + __pAccessibilityElement->Activate(false); + __pAccessibilityElement = null; + } +} + +_Progress* +_Progress::CreateProgressN() +{ + result r = E_SUCCESS; + + _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(); + + pProgress->__pProgressPresenter = _ProgressPresenter::CreateInstanceN(*pProgress); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, pProgress->__pProgressPresenter != null, , r, + "[%s] Propagating.", GetErrorMessage(r)); + + 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(PROGRESS::BAR_BG_NORMAL, pProgress->__barBgColor); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to get progress colorconfig", GetErrorMessage(r)); + + pProgress->AcquireHandle(); + pProgress->SetFocusable(false); + + if (pContainer != null) + { + pContainer->Activate(true); + pProgress->InitializeAccessibilityElement(); + } + + + return pProgress; + +CATCH: + delete pProgress; + pProgress = null; + + return null; +} + +result +_Progress::InitializeAccessibilityElement(void) +{ + result r = E_SUCCESS; + + if (__pAccessibilityElement != null) + { + return r; + } + + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + if (pContainer != null) + { + __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.Replace(L"%d", Integer::ToString(GetPercentComplete())); + __pAccessibilityElement->SetValue(string); + + r = pContainer->AddElement(*__pAccessibilityElement); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + + return r; +} + +result +_Progress::OnAttachedToMainTree(void) +{ + if (__pAccessibilityElement != null) + { + __pAccessibilityElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBounds().width, GetBounds().height)); + } + return E_SUCCESS; +} + +void +_Progress::OnBoundsChanged(void) +{ + if (__pAccessibilityElement != null) + { + __pAccessibilityElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBounds().width, GetBounds().height)); + } + + return; +} + +result +_Progress::SetValue(int value) +{ + return SetProperty("value", Variant(value)); +} + +result +_Progress::SetPropertyValue(const Variant& value) +{ + result r = E_SUCCESS; + + int tempValue = value.ToInt(); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + __pProgressPresenter->SetValue(tempValue); + + r = InitializeAccessibilityElement(); + 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.Replace(L"%d", Integer::ToString(GetPercentComplete())); + __pAccessibilityElement->SetValue(string); + } + + return r; +} + +int +_Progress::GetValue(void) const +{ + Variant value = GetProperty("value"); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, -1, r, "[%s] Propagating.", GetErrorMessage(r)); + + return value.ToInt(); +} + +Variant +_Progress::GetPropertyValue(void) const +{ + return Variant(__pProgressPresenter->GetValue()); +} + +result +_Progress::SetRange(int minValue, int maxValue) +{ + 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; + + Variant oldMinValue = GetProperty("minValue"); + Variant value = GetProperty("value"); + + r = SetProperty("minValue", Variant(minValue)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set minimum value."); + + r = SetProperty("maxValue", Variant(maxValue)); + if (r != E_SUCCESS) + { + SysLogException(NID_UI_CTRL, r, "[%s] Failed to set maximum value.", GetErrorMessage(r)); + + result nestedResult = SetPropertyMinValue(oldMinValue); + if (nestedResult != E_SUCCESS) + { + SysLog(NID_UI_CTRL, "Failed to recover original minimum value"); + return r; + } + + nestedResult = SetPropertyValue(value); + if (nestedResult != E_SUCCESS) + { + SysLog(NID_UI_CTRL, "Failed to recover original value"); + } + } + + if (__pAccessibilityElement != null) + { + String string; + GET_STRING_CONFIG(IDS_TPLATFORM_BODY_PD_PERCENT_T_TTS, string); + string.Replace(L"%d", Integer::ToString(GetPercentComplete())); + __pAccessibilityElement->SetValue(string); + } + + return r; +} + +result +_Progress::SetPropertyMinValue(const Variant& minValue) +{ + result r = E_SUCCESS; + + int tempMinValue = minValue.ToInt(); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + __pProgressPresenter->SetMinValue(tempMinValue); + + return r; +} + +result +_Progress::SetPropertyMaxValue(const Variant& maxValue) +{ + result r = E_SUCCESS; + + int tempMaxValue = maxValue.ToInt(); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + __pProgressPresenter->SetMaxValue(tempMaxValue); + + return r; +} + +result +_Progress::GetRange(int& minValue, int& maxValue) const +{ + result r = E_SUCCESS; + + Variant minimum = GetProperty("minValue"); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + Variant maximum = GetProperty("maxValue"); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + minValue = minimum.ToInt(); + maxValue = maximum.ToInt(); + + return r; +} + +Variant +_Progress::GetPropertyMinValue(void) const +{ + return Variant(__pProgressPresenter->GetMinValue()); +} + +Variant +_Progress::GetPropertyMaxValue(void) const +{ + return Variant(__pProgressPresenter->GetMaxValue()); +} + +int +_Progress::GetPercentComplete(void) const +{ + return __pProgressPresenter->GetPercentComplete(); +} + +result +_Progress::SetBarColor(const Color& color) +{ + return SetProperty("barColor", Variant(color)); +} + +result +_Progress::SetPropertyBarColor(const Variant& barColor) +{ + result r = E_SUCCESS; + + Color tempColor = barColor.ToColor(); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + __barColor = tempColor; + __barColor.SetAlpha(0xFF); + + return r; +} + +Color +_Progress::GetBarColor(void) const +{ + Variant barColor = GetProperty("barColor"); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, Color(), r, "[%s] Propagating.", GetErrorMessage(r)); + + return barColor.ToColor(); +} + +Variant +_Progress::GetPropertyBarColor(void) const +{ + return Variant(__barColor); +} + +result +_Progress::SetBarBackgroundColor(const Color& color) +{ + return SetProperty("barBackgroundColor", Variant(color)); +} + +result +_Progress::SetPropertyBarBackgroundColor(const Variant& barBgColor) +{ + result r = E_SUCCESS; + + Color tempColor = barBgColor.ToColor(); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + __barBgColor = tempColor; + __barBgColor.SetAlpha(0xFF); + + return r; +} + +Color +_Progress::GetBarBackgroundColor(void) const +{ + Variant barBackgroundColor = GetProperty("barBackgroundColor"); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, Color(), r, "[%s] Propagating.", GetErrorMessage(r)); + + return barBackgroundColor.ToColor(); +} + +Variant +_Progress::GetPropertyBarBackgroundColor(void) const +{ + return Variant(__barBgColor); +} +void +_Progress::OnDraw(void) +{ + __pProgressPresenter->Draw(); + return; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_ProgressImpl.cpp b/src/ui/controls/FUiCtrl_ProgressImpl.cpp new file mode 100644 index 0000000..ffd6057 --- /dev/null +++ b/src/ui/controls/FUiCtrl_ProgressImpl.cpp @@ -0,0 +1,348 @@ +// +// 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_ProgressImpl.cpp + * @brief This is the implementation file for the _ProgressImpl class. + */ + +#include +#include +#include +#include +#include "FUi_UiBuilder.h" +#include "FUi_ResourceManager.h" +#include "FUi_ResourceSizeInfo.h" +#include "FUiCtrl_ProgressImpl.h" +#include "FUiCtrl_Progress.h" + +using namespace Tizen::Ui; +using namespace Tizen::Graphics; + +const int _DEFAULT_MINIMUM = 0; +const int _DEFAULT_MAXIMUM = 100; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_ProgressImpl* +_ProgressImpl::GetInstance(Progress& progress) +{ + return static_cast<_ProgressImpl*> (progress._pControlImpl); +} + +const _ProgressImpl* +_ProgressImpl::GetInstance(const Progress& progress) +{ + return static_cast (progress._pControlImpl); +} + +_ProgressImpl::_ProgressImpl(Progress* pPublic, _Progress* pCore) + : _ControlImpl(pPublic, pCore) +{ + SetFocusableChangable(false); +} + +_ProgressImpl::~_ProgressImpl(void) +{ +} + +_ProgressImpl* +_ProgressImpl::CreateProgressImplN(Progress* pControl, const Rectangle& bounds) +{ + ClearLastResult(); + + result r = E_SUCCESS; + + r = GET_SIZE_INFO(Progress).CheckInitialSizeValid(Dimension(bounds.width, bounds.height), _CONTROL_ORIENTATION_PORTRAIT); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + _Progress* pCore = _Progress::CreateProgressN(); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pCore != null, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + _ProgressImpl* pImpl = new (std::nothrow) _ProgressImpl(pControl, pCore); + 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)); + + return pImpl; + +CATCH: + delete pImpl; //This deletes pCore as well + pImpl = null; + + return null; +} + +_ProgressImpl* +_ProgressImpl::CreateProgressImplFN(Progress* pControl, const FloatRectangle& bounds) +{ + ClearLastResult(); + + result r = E_SUCCESS; + + r = GET_SIZE_INFO(Progress).CheckInitialSizeValidF(FloatDimension(bounds.width, bounds.height), _CONTROL_ORIENTATION_PORTRAIT); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + _Progress* pCore = _Progress::CreateProgressN(); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pCore != null, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + _ProgressImpl* pImpl = new (std::nothrow) _ProgressImpl(pControl, pCore); + 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)); + + return pImpl; + +CATCH: + delete pImpl; //This deletes pCore as well + pImpl = null; + + return null; +} + +result +_ProgressImpl::SetValue(int value) +{ + ClearLastResult(); + + Variant newValue(value); + + return GetCore().SetPropertyValue(newValue); +} + +result +_ProgressImpl::SetRange(int minValue, int maxValue) +{ + ClearLastResult(); + + return GetCore().SetRange(minValue, maxValue); +} + +int +_ProgressImpl::GetValue(void) const +{ + ClearLastResult(); + + return GetCore().GetPropertyValue().ToInt(); +} + +result +_ProgressImpl::GetRange(int& minValue, int& maxValue) const +{ + ClearLastResult(); + + return GetCore().GetRange(minValue, maxValue); +} + +int +_ProgressImpl::GetPercentComplete(void) const +{ + ClearLastResult(); + + return GetCore().GetPercentComplete(); +} + +result +_ProgressImpl::SetBarColor(const Color& color) +{ + ClearLastResult(); + + Variant barColor(color); + + return GetCore().SetPropertyBarColor(barColor); +} + +Color +_ProgressImpl::GetBarColor() const +{ + ClearLastResult(); + + return GetCore().GetPropertyBarColor().ToColor(); +} + +result +_ProgressImpl::SetBarBackgroundColor(const Color& color) +{ + ClearLastResult(); + + Variant barBackgroundColor(color); + + return GetCore().SetPropertyBarBackgroundColor(barBackgroundColor); +} + +Color +_ProgressImpl::GetBarBackgroundColor() const +{ + ClearLastResult(); + + return GetCore().GetPropertyBarBackgroundColor().ToColor(); +} +const char* +_ProgressImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Controls::Progress"; +} + +const Progress& +_ProgressImpl::GetPublic(void) const +{ + return static_cast (_ControlImpl::GetPublic()); +} + +Progress& +_ProgressImpl::GetPublic(void) +{ + return static_cast (_ControlImpl::GetPublic()); +} + +const _Progress& +_ProgressImpl::GetCore(void) const +{ + return static_cast (_ControlImpl::GetCore()); +} + +_Progress& +_ProgressImpl::GetCore(void) +{ + return static_cast <_Progress&>(_ControlImpl::GetCore()); +} + + +class _ProgressMaker + : public _UiBuilderControlMaker +{ + +public: + _ProgressMaker(_UiBuilder* pUiBuilder) + : _UiBuilderControlMaker(pUiBuilder){} + virtual ~_ProgressMaker(void){} + + static _UiBuilderControlMaker* + GetInstance(_UiBuilder* pUiBuilder) + { + _ProgressMaker* pProgressMaker = new (std::nothrow) _ProgressMaker(pUiBuilder); + return pProgressMaker; + } + +protected: + virtual Control* + Make(_UiBuilderControl* pControl) + { + result r = E_SUCCESS; + _UiBuilderControlLayout* pControlProperty = null; + Progress* pProgress = null; + Tizen::Base::String elementString; + Tizen::Base::String elementString1; + Color color; + int tempMin = 0; + int tempMax = 0; + int temp = 0; + + FloatRectangle rect; + + GetProperty(pControl, &pControlProperty); + if (pControlProperty == 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)) + { + Base::Integer::Parse(elementString, tempMin); + Base::Integer::Parse(elementString1, tempMax); + if (tempMin > tempMax) + { + temp = tempMin; + tempMin = tempMax; + tempMax = tempMin; + } + } + else + { + tempMin = _DEFAULT_MINIMUM; + tempMax = _DEFAULT_MAXIMUM; + } + + r = pProgress->Construct(rect, tempMin, tempMax); + if (r != E_SUCCESS) + { + delete pProgress; + pProgress = null; + + return null; + } + + if (pControl->GetElement(L"value", elementString)) + { + int tempValue = 0; + Base::Integer::Parse(elementString, tempValue); + pProgress->SetValue(tempValue); + } + + if (pControl->GetElement(L"barColor", elementString)) + { + ConvertStringToColor(elementString, color); + pProgress->SetBarColor(color); + } + + if (pControl->GetElement(L"barBackgroundColor", elementString)) + { + ConvertStringToColor(elementString, color); + pProgress->SetBarBackgroundColor(color); + } + + if (pControl->GetElement(L"accessibilityHint", elementString)) + { + AccessibilityContainer* pContainer = pProgress->GetAccessibilityContainer(); + if (pContainer != null) + { + AccessibilityElement* pElement = pContainer->GetElement(L"ProgressingImage"); + if (pElement != null) + { + pElement->SetHint(elementString); + } + } + } + + return pProgress; + } + +}; // _ProgressMaker + +_ProgressRegister::_ProgressRegister(void) +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->RegisterControl(L"Progress", _ProgressMaker::GetInstance); +} + +_ProgressRegister::~_ProgressRegister(void) +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->UnregisterControl(L"Progress"); +} +static _ProgressRegister ProgressRegisterToUiBuilder; +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_ProgressModel.cpp b/src/ui/controls/FUiCtrl_ProgressModel.cpp new file mode 100644 index 0000000..b953a11 --- /dev/null +++ b/src/ui/controls/FUiCtrl_ProgressModel.cpp @@ -0,0 +1,78 @@ +// +// 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_ProgressModel.cpp + * @brief This is the implementation file for the _ProgressModel class. + */ + +#include "FUiCtrl_ProgressModel.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +_ProgressModel::_ProgressModel(void) + : __minValue(0) + , __maxValue(0) + , __currentValue(0) +{ +} + +_ProgressModel::~_ProgressModel(void) +{ +} + +void +_ProgressModel::SetValue(int value) +{ + __currentValue = value; + return; +} + +int +_ProgressModel::GetValue() const +{ + return __currentValue; +} + +void +_ProgressModel::SetMinValue(int minValue) +{ + __minValue = minValue; + return; +} + +int +_ProgressModel::GetMinValue(void) const +{ + return __minValue; +} + +void +_ProgressModel::SetMaxValue(int maxValue) +{ + __maxValue = maxValue; + return; +} + +int +_ProgressModel::GetMaxValue(void) const +{ + return __maxValue; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_ProgressPopup.cpp b/src/ui/controls/FUiCtrl_ProgressPopup.cpp new file mode 100644 index 0000000..7a648ff --- /dev/null +++ b/src/ui/controls/FUiCtrl_ProgressPopup.cpp @@ -0,0 +1,913 @@ +// +// 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_ProgressPopup.cpp + * @brief This is the implementation file for the _ProgressPopup class. + */ + +#include +#include +#include +#include +#include +#include +#include "FUi_AccessibilityContainer.h" +#include "FUi_AccessibilityElement.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_EcoreEvas.h" +#include "FUi_EcoreEvasMgr.h" +#include "FUi_ResourceManager.h" +#include "FUiCtrl_ButtonImpl.h" +#include "FUiCtrl_Button.h" +#include "FUiCtrl_Form.h" +#include "FUiCtrl_Frame.h" +#include "FUiCtrl_ProgressPopup.h" +#include "FUiCtrl_ProgressPopupPresenter.h" + + +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Animations; +using namespace Tizen::Base; +using namespace Tizen::System; + +namespace Tizen { namespace Ui { namespace Controls +{ + + +_ProgressPopup::_ProgressPopup(void) + : __pProgressPopupPresenter(null) + , __pProgressPopupEvent(null) + , __pButton(null) + , __pComposedButtonBitmap(null) + , __pButtonEffectBitmap(null) + , __text(L"") + , __textColor(Color(0xFFFFFFFF)) + , __animationRect(0.0f, 0.0f, 0.0f, 0.0f) + , __textState(false) + , __buttonState(false) + , __isTransparent(false) +{ + // empty statement +} + +_ProgressPopup::~_ProgressPopup(void) +{ + delete __pProgressPopupPresenter; + __pProgressPopupPresenter = null; + + if (__pProgressPopupEvent != null) + { + delete __pProgressPopupEvent; + __pProgressPopupEvent = null; + } + + delete _pComposedBgBitmap; + _pComposedBgBitmap = null; + + delete _pOutlineBitmap; + _pOutlineBitmap = null; + + delete __pComposedButtonBitmap; + __pComposedButtonBitmap = null; + + delete __pButtonEffectBitmap; + __pButtonEffectBitmap = null; + + delete _pComposedTitleBitmap; + _pComposedTitleBitmap = null; + + delete _pTitleEffectBitmap; + _pTitleEffectBitmap = null; + + delete __pButton; + __pButton = null; + + _SettingInfoImpl::RemoveSettingEventListenerForInternal(*this); +} + +_ProgressPopup* +_ProgressPopup::CreateProgressPopupN(void) +{ + _ProgressPopup* pProgressPopup = new (std::nothrow) _ProgressPopup(); + SysTryReturn(NID_UI_CTRL, pProgressPopup != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + result r = pProgressPopup->CreateRootVisualElement(_WINDOW_TYPE_SUB); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + // for taking touch event + pProgressPopup->AcquireHandle(); + return pProgressPopup; + +CATCH: + delete pProgressPopup; + + return null; +} + +result +_ProgressPopup::Initialize(bool cancelButton, bool transparent, const FloatRectangle& animationRect) +{ + result r = E_SUCCESS; + + _AccessibilityContainer* pContainer = null; + + Color titleBgColor(0x00000000); + Color buttonBgColor(0x00000000); + + Color buttonColorNormal(0x00000000); + Color buttonColorPressed(0x00000000); + Color buttonColorDisabled(0x00000000); + Color buttonColorHighlighted(0x00000000); + Color buttonTextNormal(0x00000000); + Color buttonTextPressed(0x00000000); + Color buttonTextDisabled(0x00000000); + Color buttonTextHighlighted(0x00000000); + bool isCustomBitmap = false; + + Bitmap* pComposedButtonBgNormal = null; + Bitmap* pComposedButtonBgPressed = null; + Bitmap* pComposedButtonBgDisabled = null; + Bitmap* pComposedButtonBgHighlighted = null; + Bitmap* pButtonNormalEffect = null; + Bitmap* pButtonPressedEffect = null; + Bitmap* pButtonDisabledEffect = null; + + __animationRect = animationRect; + __buttonState = cancelButton; + __isTransparent = transparent; + + SetFocusNavigateEnabled(false); + + _ProgressPopupPresenter* pPresenter = new (std::nothrow) _ProgressPopupPresenter(); + SysTryReturn(NID_UI_CTRL, pPresenter != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + SetPresenter(*pPresenter); + + r = pPresenter->Initialize(*this, cancelButton, transparent, animationRect); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + GET_COLOR_CONFIG(POPUP::TITLE_TEXT_NORMAL, _titleTextColor); + GET_COLOR_CONFIG(MESSAGEBOX::TEXT_NORMAL, __textColor); + GET_COLOR_CONFIG(MESSAGEBOX::TITLE_BG_NORMAL, titleBgColor); + GET_COLOR_CONFIG(MESSAGEBOX::BOTTOM_BG_NORMAL, buttonBgColor); + + 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); + + 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) + { + 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)); + + 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)); + } + + 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)); + + 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 + if (GetVisualElement() != null) + { + GetVisualElement()->SetSurfaceOpaque(false); + } + + SetDimmingEnabled(true); + + if (__buttonState && !__isTransparent) + { + GET_COLOR_CONFIG(MESSAGEBOX::BOTTOM_BUTTON_BG_NORMAL, buttonColorNormal); + GET_COLOR_CONFIG(MESSAGEBOX::BOTTOM_BUTTON_BG_PRESSED, buttonColorPressed); + GET_COLOR_CONFIG(MESSAGEBOX::BOTTOM_BUTTON_BG_DISABLED, buttonColorDisabled); + GET_COLOR_CONFIG(MESSAGEBOX::BOTTOM_BUTTON_BG_HIGHLIGHTED, buttonColorHighlighted); + + GET_COLOR_CONFIG(MESSAGEBOX::BOTTOM_BUTTON_TEXT_NORMAL, buttonTextNormal); + GET_COLOR_CONFIG(MESSAGEBOX::BOTTOM_BUTTON_TEXT_PRESSED, buttonTextPressed); + GET_COLOR_CONFIG(MESSAGEBOX::BOTTOM_BUTTON_TEXT_DISABLED, buttonTextDisabled); + GET_COLOR_CONFIG(MESSAGEBOX::BOTTOM_BUTTON_TEXT_HIGHLIGHTED, buttonTextHighlighted); + + + isCustomBitmap = IS_CUSTOM_BITMAP(MESSAGEBOX::BOTTOM_BUTTON_BG_NORMAL); + + if (!isCustomBitmap) + { + 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)); + } + + isCustomBitmap = IS_CUSTOM_BITMAP(MESSAGEBOX::BOTTOM_BUTTON_BG_PRESSED); + + if (!isCustomBitmap) + { + 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)); + } + + isCustomBitmap = IS_CUSTOM_BITMAP(MESSAGEBOX::BOTTOM_BUTTON_BG_DISABLED); + + if (!isCustomBitmap) + { + 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)); + } + + 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)); + + 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)); + + 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)); + + 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."); + + r = __pButton->Construct(pPresenter->GetButtonBounds()); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + SetButtonText(); + __pButton->SetNormalBackgroundBitmap(*pComposedButtonBgNormal); + __pButton->SetPressedBackgroundBitmap(*pComposedButtonBgPressed); + __pButton->SetDisabledBackgroundBitmap(*pComposedButtonBgDisabled); + __pButton->SetHighlightedBackgroundBitmap(*pComposedButtonBgHighlighted); + __pButton->SetTextColor(buttonTextNormal); + __pButton->SetPressedTextColor(buttonTextPressed); + __pButton->SetDisabledTextColor(buttonTextDisabled); + __pButton->SetHighlightedTextColor(buttonTextHighlighted); + + _ControlImpl* pImpl = _ControlImpl::GetInstance(*__pButton); + r = AttachChild(pImpl->GetCore()); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + _Button* pButtonCore = dynamic_cast <_Button*>(&pImpl->GetCore()); + SysTryCatch(NID_UI_CTRL, pButtonCore != null, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pButtonCore->SetActionId(ID_PROGRESS_POPUP_CANCEL_BUTTON); + pButtonCore->AddActionEventListener(*this); + if (pButtonNormalEffect != null) + { + pButtonCore->SetBackgroundEffectBitmap(_BUTTON_STATUS_NORMAL, *pButtonNormalEffect); + } + + if (pButtonPressedEffect != null) + { + pButtonCore->SetBackgroundEffectBitmap(_BUTTON_STATUS_PRESSED, *pButtonPressedEffect); + } + + if(pButtonDisabledEffect != null) + { + pButtonCore->SetBackgroundEffectBitmap(_BUTTON_STATUS_DISABLED, *pButtonDisabledEffect); + } + } + + pContainer = GetAccessibilityContainer(); + if(pContainer != null) + { + pContainer->Activate(true); + } + + r = _SettingInfoImpl::AddSettingEventListenerForInternal(*this); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + delete pComposedButtonBgNormal; + pComposedButtonBgNormal = null; + + delete pComposedButtonBgPressed; + pComposedButtonBgPressed = null; + + delete pComposedButtonBgDisabled; + pComposedButtonBgDisabled = null; + + delete pComposedButtonBgHighlighted; + pComposedButtonBgHighlighted = null; + + delete pButtonNormalEffect; + pButtonNormalEffect = null; + + delete pButtonPressedEffect; + pButtonNormalEffect = null; + + delete pButtonDisabledEffect; + pButtonNormalEffect = null; + + return r; + + CATCH: + + delete pComposedButtonBgNormal; + pComposedButtonBgNormal = null; + + delete pComposedButtonBgPressed; + pComposedButtonBgPressed = null; + + delete pComposedButtonBgDisabled; + pComposedButtonBgDisabled = null; + + delete pComposedButtonBgHighlighted; + pComposedButtonBgHighlighted = null; + + delete pButtonNormalEffect; + pButtonNormalEffect = null; + + delete pButtonPressedEffect; + pButtonNormalEffect = null; + + delete pButtonDisabledEffect; + pButtonNormalEffect = null; + + delete _pOutlineBitmap; + _pOutlineBitmap = null; + + delete _pComposedBgBitmap; + _pComposedBgBitmap = null; + + if (__pComposedButtonBitmap != null) + { + delete __pComposedButtonBitmap; + __pComposedButtonBitmap = null; + } + + if (__pButtonEffectBitmap != null) + { + delete __pButtonEffectBitmap; + __pButtonEffectBitmap = null; + } + + delete _pComposedTitleBitmap; + _pComposedTitleBitmap = null; + + delete _pTitleEffectBitmap; + _pTitleEffectBitmap = null; + + delete __pButton; + __pButton = null; + + return r; +} + +result +_ProgressPopup::SetPresenter(const _ProgressPopupPresenter& ProgressPopupPresenter) +{ + __pProgressPopupPresenter = const_cast <_ProgressPopupPresenter*>(&ProgressPopupPresenter); + + return E_SUCCESS; +} + +_PopupPresenter* +_ProgressPopup::GetPresenter(void) +{ + return static_cast <_PopupPresenter*>(__pProgressPopupPresenter); +} + +result +_ProgressPopup::DoModal(int& modalResult) +{ + result r = E_SUCCESS; + + r = __pProgressPopupPresenter->DoModal(modalResult); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +_ProgressPopup::AddProgressPopupEventListener(const Tizen::Ui::Controls::_IProgressPopupEventListener& listener) +{ + result r = E_SUCCESS; + + if (__pProgressPopupEvent == null) + { + __pProgressPopupEvent = _ProgressPopupEvent::CreateInstanceN(*this); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + r = __pProgressPopupEvent->AddListener(listener); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +_ProgressPopup::SetTitleText(const String& title) +{ + result r = E_SUCCESS; + + _titleText = title; + _titleState = true; + + __pProgressPopupPresenter->SetTitleTextObject(); + + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + if (_pTitleTextAccessibilityElement != null) + { + _pTitleTextAccessibilityElement->SetLabel(title); + } + + return r; +CATCH: + _titleText = L""; + _titleState = false; + + return r; +} + +result +_ProgressPopup::SetText(const String& text) +{ + result r = E_SUCCESS; + + __text = text; + __textState = true; + + __pProgressPopupPresenter->SetTextObject(); + + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +CATCH: + __text = L""; + __textState = false; + + return r; +} + +result +_ProgressPopup::UpdateBounds(void) +{ + result r = E_SUCCESS; + // change the button bounds + if (HasButton()) + { + __pButton->SetBounds(__pProgressPopupPresenter->GetButtonBounds()); + } + // update total height -> GetTotalHeight (called by Impl) + // update process-animation rect position -> GetAnimationRect (called by UpdateProcessAnimationVE) + // update process-animation VE + r = __pProgressPopupPresenter->UpdateProcessAnimation(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +String +_ProgressPopup::GetText(void) const +{ + return __text; +} + +Bitmap* +_ProgressPopup::GetButtonBackgroundBitmap(void) +{ + return __pComposedButtonBitmap; +} + +Bitmap* +_ProgressPopup::GetButtonBackgroundEffectBitmap(void) +{ + return __pButtonEffectBitmap; +} + +float +_ProgressPopup::GetTotalHeight(void) const +{ + float transTopMargin = 0.0f; + float transBottomMargin = 0.0f; + float titleHeight = 0.0f; + float animationTopMargin = 0.0f; + float animationWidth = 0.0f; + float textTopGap = 0.0f; + float textBottomGap = 0.0f; + float bottomHeight = 0.0f; + float minHeight = 0.0f; + + _ControlOrientation orientation; + + orientation = GetOrientation(); + + GET_SHAPE_CONFIG(POPUP::BG_IMAGE_TRANSPARENT_TOP_MARGIN, orientation, transTopMargin); + GET_SHAPE_CONFIG(POPUP::BG_IMAGE_TRANSPARENT_BOTTOM_MARGIN, orientation, transBottomMargin); + GET_SHAPE_CONFIG(POPUP::PROCESS_ANIMATION_WIDTH, orientation, animationWidth); + GET_SHAPE_CONFIG(POPUP::PROCESS_TEXT_TOP_MARGIN, orientation, textTopGap); + GET_SHAPE_CONFIG(POPUP::PROCESS_TEXT_BOTTOM_MARGIN, orientation, textBottomGap); + + GET_SHAPE_CONFIG(MESSAGEBOX::BOTTOM_HEIGHT, orientation, bottomHeight); + GET_SHAPE_CONFIG(MESSAGEBOX::MIN_HEIGHT, orientation, minHeight); + + + if (HasTitle()) + { + GET_SHAPE_CONFIG(POPUP::TITLE_HEIGHT, orientation, titleHeight); + GET_SHAPE_CONFIG(POPUP::PROCESS_ANIMATION_WITH_TITLE_TOP_MARGIN, orientation, animationTopMargin); + } + else + { + GET_SHAPE_CONFIG(POPUP::PROCESS_ANIMATION_NO_TITLE_TOP_MARGIN, orientation, animationTopMargin); + } + + if (!HasText()) + { + textTopGap = 0.0f; + textBottomGap = textBottomGap * 1.5f; + } + + if (!HasButton()) + { + bottomHeight = 0.0f; + } + + + float totalH = titleHeight + + animationTopMargin + + animationWidth + + textTopGap + + textBottomGap + + bottomHeight + + __pProgressPopupPresenter->GetBodyTextObjHeight(); + + + if (minHeight > totalH) + { + totalH = minHeight; + } + + totalH = totalH + transTopMargin + transBottomMargin; + + return totalH; +} + +result +_ProgressPopup::SetTextColor(const Color& color) +{ + __textColor = color; + + return E_SUCCESS; +} + +Color +_ProgressPopup::GetTextColor() const +{ + return __textColor; +} + +FloatRectangle +_ProgressPopup::GetAnimationRect(void) const +{ + FloatRectangle animationBounds; + + float defaultWidth = 0.0f; + float titleHeight = 0.0f; + float animationWidth = 0.0f; + float animationTopMargin = 0.0f; + float transTopMargin = 0.0f; + + _ControlOrientation orientation; + + orientation = GetOrientation(); + + GET_SHAPE_CONFIG(MESSAGEBOX::DEFAULT_WIDTH, orientation, defaultWidth); + + GET_SHAPE_CONFIG(POPUP::PROCESS_ANIMATION_WIDTH, orientation, animationWidth); + GET_SHAPE_CONFIG(POPUP::BG_IMAGE_TRANSPARENT_TOP_MARGIN, orientation, transTopMargin); + + if (HasTitle()) + { + GET_SHAPE_CONFIG(POPUP::TITLE_HEIGHT, orientation, titleHeight); + GET_SHAPE_CONFIG(POPUP::PROCESS_ANIMATION_WITH_TITLE_TOP_MARGIN, orientation, animationTopMargin); + } + else if (HasText() || HasButton()) + { + GET_SHAPE_CONFIG(POPUP::PROCESS_ANIMATION_NO_TITLE_TOP_MARGIN, orientation, animationTopMargin); + } + else + { + GET_SHAPE_CONFIG(POPUP::PROCESS_ANIMATION_NO_TITLE_TOP_MARGIN, orientation, animationTopMargin); + } + + animationBounds = FloatRectangle((defaultWidth - animationWidth) / 2.0f, + titleHeight + animationTopMargin + transTopMargin, + animationWidth, animationWidth); + + return animationBounds; +} + +bool +_ProgressPopup::HasText(void) const +{ + return __textState; +} + +bool +_ProgressPopup::HasButton(void) const +{ + return (__buttonState && !__isTransparent); +} + +bool +_ProgressPopup::IsTransparent(void) const +{ + return __isTransparent; +} + +void +_ProgressPopup::FireProgressPopupEvent(void) +{ + if (__pProgressPopupEvent != null) + { + Tizen::Base::Runtime::IEventArg* pEventArg = _ProgressPopupEvent::CreateProgressPopupEventArgN(); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pProgressPopupEvent->Fire(*pEventArg); + } +} + +void +_ProgressPopup::OnDraw(void) +{ + __pProgressPopupPresenter->Draw(); + if(unlikely((_AccessibilityManager::IsActivated()))) + { + _AccessibilityManager::GetInstance()->RequestAutoReading(_ACCESSIBILITY_AUTO_READING_MODE_FIRST_ITEM); + } +} + +void +_ProgressPopup::OnFontChanged(Font * pFont) +{ + __pProgressPopupPresenter->OnFontChanged(pFont); +} + +void +_ProgressPopup::OnFontInfoRequested(unsigned long& style, float& size) +{ + __pProgressPopupPresenter->OnFontInfoRequested(style, size); +} + +void +_ProgressPopup::OnActionPerformed(const Tizen::Ui::_Control& source, int actionId) +{ + switch (actionId) + { + case ID_PROGRESS_POPUP_CANCEL_BUTTON: + { + FireProgressPopupEvent(); + _Popup::SetReturnValue(POPUP_RESULT_CANCEL); + break; + } + + default: + break; + } +} + +void +_ProgressPopup::OnBoundsChanged(void) +{ + SetClientBounds(FloatRectangle(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height)); + + if ((HasTitle() == true) && (_pTitleTextAccessibilityElement != null)) + { + _pTitleTextAccessibilityElement->SetBounds(__pProgressPopupPresenter->GetTitleTextBounds()); + } + + return; +} + +void +_ProgressPopup::OnVisibleStateChanged(void) +{ + _Window::OnVisibleStateChanged(); +} + +void +_ProgressPopup::OnActivated(void) +{ + __pProgressPopupPresenter->PlayProcessAnimation(); + + + if (GetVisibleState() && !__isTransparent) + { + SetTouchCapture(false, false); + } + + _Control* pOwner = GetOwner(); + if (pOwner == null) + { + _Frame* pFrame = dynamic_cast<_Frame*>(_ControlManager::GetInstance()->GetCurrentFrame()); + SysTryReturnVoidResult(NID_UI_CTRL, pFrame != null, E_SYSTEM, "[E_SYSTEM] This instance is not constructed."); + + _Form* pForm = pFrame->GetCurrentForm(); + if (pForm != null) + { + SetOwner(pForm); + } + else + { + SetOwner(pFrame); + } + } + else + { + pOwner->LockInputEvent(); + } + + if (__isTransparent) + { + _DimmingLayer* pDimmingLayer = GetDimmingLayer(); + + if (pDimmingLayer != null) + { + pDimmingLayer->SetOpacity(0.0f); + } + } + + _Window::OnActivated(); +} + +void +_ProgressPopup::OnDeactivated(void) +{ + __pProgressPopupPresenter->StopProcessAnimation(); + + _Popup::OnDeactivated(); +} + +void +_ProgressPopup::InitializeAccessibilityElement(void) +{ + result r = E_SUCCESS; + + _Popup::InitializeAccessibilityElement(); + + if (_pTitleTextAccessibilityElement != null) + { + _pTitleTextAccessibilityElement->SetName(L"ProgressPopupTitleText"); + } + + __pProgressPopupPresenter->InitializeAccessibilityElement(); + r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (HasButton() == true) + { + + SetCancelButtonAccessibilityElement(); + } + return; +} + +void +_ProgressPopup::SetCancelButtonAccessibilityElement(void) +{ + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + + if (pContainer != null) + { + _ControlImpl* pImpl = null; + _Button* pButtonCore = null; + + pImpl = _ControlImpl::GetInstance(*__pButton); + + pButtonCore = dynamic_cast<_Button*>(&pImpl->GetCore()); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, pButtonCore != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + _AccessibilityContainer* pButtonContainer = pButtonCore->GetAccessibilityContainer(); + + if (pButtonContainer != null) + { + _AccessibilityElement* pButtonElement = pButtonContainer->GetChildElement(L"ButtonText"); + if (pButtonElement != null) + { + pButtonElement->SetName(L"ProgressPopupButton1"); + } + + // Add Container + pContainer->AddChildContainer(*pButtonContainer); + } + } +} +void +_ProgressPopup::OnChangeLayout(_ControlOrientation orientation) +{ + _Popup::OnChangeLayout(orientation); + + result r = E_SUCCESS; + + r = __pProgressPopupPresenter->OnChangeLayout(orientation); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (HasButton()) + { + r = __pButton->SetBounds(__pProgressPopupPresenter->GetButtonBounds()); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } +} + +bool +_ProgressPopup::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + if (&source != this) + { + return false; + } + + return __pProgressPopupPresenter->OnTouchPressed(source, touchinfo); +} + +bool +_ProgressPopup::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) +{ + _KeyCode keyCode = keyInfo.GetKeyCode(); + + if (keyCode == _KEY_ESC || keyCode == _KEY_BACK) + { + if (HasButton()) + { + FireProgressPopupEvent(); + _Popup::SetReturnValue(POPUP_RESULT_CANCEL); + } + + return true; + } + return false; +} + +bool +_ProgressPopup::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + if (&source != this) + { + return false; + } + + return __pProgressPopupPresenter->OnTouchMoved(source, touchinfo); +} + +bool +_ProgressPopup::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + if (&source != this) + { + return false; + } + + return __pProgressPopupPresenter->OnTouchReleased(source, touchinfo); +} + +void +_ProgressPopup::OnSettingChanged(String& key) +{ + const wchar_t* LOCALE_LANGUAGE = L"http://tizen.org/setting/locale.language"; + + if ((key == LOCALE_LANGUAGE) && (__pButton != null)) + { + SetButtonText(); + } +} + +void +_ProgressPopup::SetButtonText(void) +{ + String buttonText; + + GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_CANCEL_ABB, buttonText); + + __pButton->SetText(buttonText); +} + +}}} // Tizen::Ui::Controls + diff --git a/src/ui/controls/FUiCtrl_ProgressPopupEvent.cpp b/src/ui/controls/FUiCtrl_ProgressPopupEvent.cpp new file mode 100644 index 0000000..0f7e2ae --- /dev/null +++ b/src/ui/controls/FUiCtrl_ProgressPopupEvent.cpp @@ -0,0 +1,124 @@ +// +// 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_ProgressPopupEvent.cpp +* @brief This is the implementation for the ActionEvent class. +*/ + +#include +#include +#include +#include "FUiCtrl_IProgressPopupEventListener.h" +#include "FUiCtrl_ProgressPopupEvent.h" + + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; + + +namespace Tizen { namespace Ui { namespace Controls +{ + + +class _OSP_EXPORT_ _ProgressPopupEventArg + : public Object + , public IEventArg +{ +public: + _ProgressPopupEventArg(void); + + virtual ~_ProgressPopupEventArg(void); + +}; // _ProgressPopupEventArg + + +_ProgressPopupEventArg::_ProgressPopupEventArg(void) +{ + // empty statement +} + +_ProgressPopupEventArg::~_ProgressPopupEventArg(void) +{ + // empty statement +} + + +_ProgressPopupEvent::_ProgressPopupEvent(const _Control& source) + : __pSource(null) +{ + result r = _Event::Initialize(); + + // set event source + if (r == E_SUCCESS) + { + __pSource = &source; + SetLastResult(E_SUCCESS); + } +} + +_ProgressPopupEvent::~_ProgressPopupEvent(void) +{ + // empty statement +} + +_ProgressPopupEvent* +_ProgressPopupEvent::CreateInstanceN(const _Control& source) +{ + _ProgressPopupEvent* pProgressPopupEvent = new (std::nothrow) _ProgressPopupEvent(source); + SysTryReturn(NID_UI_CTRL, pProgressPopupEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + if (IsFailed(GetLastResult())) + { + goto CATCH; + } + + return pProgressPopupEvent; + +CATCH: + delete pProgressPopupEvent; + return null; +} + +const _Control* +_ProgressPopupEvent::GetSource(void) const +{ + return __pSource; +} + +void +_ProgressPopupEvent::FireImpl(IEventListener& pListener, const IEventArg& arg) +{ + // cast to _IProgressPopupEventListener + _IProgressPopupEventListener* pProgressPopupListener = dynamic_cast <_IProgressPopupEventListener*>(&pListener); + SysTryReturnVoidResult(NID_UI_CTRL, pProgressPopupListener != null, E_INVALID_ARG, + "[E_INVALID_ARG] The invalid listener was given.\n"); + + // call progresspopup event listener method + pProgressPopupListener->OnProgressPopupCanceled(); +} + +IEventArg* +_ProgressPopupEvent::CreateProgressPopupEventArgN(void) +{ + _ProgressPopupEventArg* pEventArg = new (std::nothrow) _ProgressPopupEventArg(); + SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + return pEventArg; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_ProgressPopupImpl.cpp b/src/ui/controls/FUiCtrl_ProgressPopupImpl.cpp new file mode 100644 index 0000000..e80feb2 --- /dev/null +++ b/src/ui/controls/FUiCtrl_ProgressPopupImpl.cpp @@ -0,0 +1,453 @@ +// +// 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_ProgressPopupImpl.cpp + * @brief This is the implementation file for the _ProgressPopupImpl class. + */ + + +#include +#include +#include "FUi_ResourceManager.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_ControlImplManager.h" +#include "FUi_Math.h" +#include "FUiCtrl_FrameImpl.h" +#include "FUiCtrl_Form.h" +#include "FUiCtrl_ProgressPopupImpl.h" + + + +using namespace Tizen::Ui::Animations; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Base; + + +namespace Tizen { namespace Ui { namespace Controls +{ + + +_ProgressPopupImpl* +_ProgressPopupImpl::GetInstance(ProgressPopup& pProgressPopup) +{ + return static_cast <_ProgressPopupImpl*>(pProgressPopup._pControlImpl); +} + +const _ProgressPopupImpl* +_ProgressPopupImpl::GetInstance(const ProgressPopup& pProgressPopup) +{ + return static_cast (pProgressPopup._pControlImpl); +} + +_ProgressPopupImpl::_ProgressPopupImpl(ProgressPopup* pPublic, _ProgressPopup* pCore) + : _PopupImpl(pPublic, pCore) + , __pPublicProgressPopupEvent(null) +{ + _centerAlign = true; + //empty statement +} + +_ProgressPopupImpl::~_ProgressPopupImpl(void) +{ + if (__pPublicProgressPopupEvent != null) + { + delete __pPublicProgressPopupEvent; + __pPublicProgressPopupEvent = null; + } +} + +_ProgressPopupImpl* +_ProgressPopupImpl::CreateProgressPopupImplN(ProgressPopup* pControl) +{ + result r = E_SUCCESS; + + _ProgressPopupImpl* pImpl = null; + _ProgressPopup* pCore = null; + + pCore = _ProgressPopup::CreateProgressPopupN(); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pCore, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + pImpl = new (std::nothrow) _ProgressPopupImpl(pControl, pCore); + r = CheckConstruction(pCore, pImpl); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + return pImpl; +} + +result +_ProgressPopupImpl::Initialize(bool cancelButton, bool transparent) +{ + result r = E_SUCCESS; + + float animationWidth = 0.0f; + + _ControlOrientation orientation; + + orientation = GetCore().GetOrientation(); + + GET_SHAPE_CONFIG(POPUP::PROCESS_ANIMATION_WIDTH, orientation, animationWidth); + + FloatRectangle animationRect; + animationRect = GetCenterAlignedRect(animationWidth, animationWidth); + + r = GetCore().Initialize(cancelButton, transparent, animationRect); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (transparent) + { + r = SetBounds(animationRect); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + float maxHeight = 0.0f; + float defaultWidth = 0.0f; + + GET_SHAPE_CONFIG(MESSAGEBOX::MAX_HEIGHT, orientation, maxHeight); + GET_SHAPE_CONFIG(MESSAGEBOX::DEFAULT_WIDTH, orientation, defaultWidth); + + float totalH = -1.0f; + totalH = GetCore().GetTotalHeight(); + + FloatRectangle bounds; + if (totalH > maxHeight) + { + bounds = GetCenterAlignedRect(defaultWidth, maxHeight); + } + else + { + bounds = GetCenterAlignedRect(defaultWidth, totalH); + } + + r = SetBounds(bounds); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + SetResizable(false); + + return r; +} + +const char* +_ProgressPopupImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Controls::ProgressPopup"; +} + +const ProgressPopup& +_ProgressPopupImpl::GetPublic(void) const +{ + return static_cast (_ControlImpl::GetPublic()); +} + +ProgressPopup& +_ProgressPopupImpl::GetPublic(void) +{ + return static_cast (_ControlImpl::GetPublic()); +} + +const _ProgressPopup& +_ProgressPopupImpl::GetCore(void) const +{ + return static_cast (_ControlImpl::GetCore()); +} + +_ProgressPopup& +_ProgressPopupImpl::GetCore(void) +{ + return static_cast <_ProgressPopup&>(_ControlImpl::GetCore()); +} + +result +_ProgressPopupImpl::AddProgressPopupEventListener(IProgressPopupEventListener& listener) +{ + result r = E_SUCCESS; + + if (__pPublicProgressPopupEvent == null) + { + __pPublicProgressPopupEvent = _PublicProgressPopupEvent::CreateInstanceN(GetPublic()); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + r = __pPublicProgressPopupEvent->AddListener(listener); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return GetCore().AddProgressPopupEventListener(*this); +} + +result +_ProgressPopupImpl::RemoveProgressPopupEventListener(IProgressPopupEventListener & listener) +{ + result r = E_SUCCESS; + + if (__pPublicProgressPopupEvent != null) + { + r = __pPublicProgressPopupEvent->RemoveListener(listener); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + return r; +} + +result +_ProgressPopupImpl::OnAttachedToMainTree(void) +{ + _WindowImpl::OnAttachedToMainTree(); + return GetCore().Open(); +} + +result +_ProgressPopupImpl::SetTitleText(const String& title) +{ + result r = E_SUCCESS; + + if (GetCore().IsTransparent()) + { + return r; + } + + r = GetCore().SetTitleText(title); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, r, "[%s] Propagating.", GetErrorMessage(r)); + + float maxHeight = 0.0f; + float defaultWidth = 0.0f; + + GET_SHAPE_CONFIG(MESSAGEBOX::MAX_HEIGHT, GetCore().GetOrientation(), maxHeight); + GET_SHAPE_CONFIG(MESSAGEBOX::DEFAULT_WIDTH, GetCore().GetOrientation(), defaultWidth); + + float totalH = -1.0f; + totalH = GetCore().GetTotalHeight(); + + FloatRectangle bounds; + if (totalH > maxHeight) + { + bounds = GetCenterAlignedRect(defaultWidth, maxHeight); + } + else + { + bounds = GetCenterAlignedRect(defaultWidth, totalH); + } + + SetResizable(true); + + r = SetBounds(bounds); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + SetResizable(false); + + r = GetCore().UpdateBounds(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + +} + +result +_ProgressPopupImpl::SetText(const String& text) +{ + result r = E_SUCCESS; + int maxLength = 0; + + if (GetCore().IsTransparent()) + { + return r; + } + + maxLength = GetMaxTextLength(); + SysTryReturn(NID_UI_CTRL, text.GetLength() <= maxLength, E_MAX_EXCEEDED, E_MAX_EXCEEDED, + "[E_MAX_EXCEEDED] Text length is too long to create ProgressPopup."); + + r = GetCore().SetText(text); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + float maxHeight = 0.0f; + float defaultWidth = 0.0f; + + GET_SHAPE_CONFIG(MESSAGEBOX::MAX_HEIGHT, GetCore().GetOrientation(), maxHeight); + GET_SHAPE_CONFIG(MESSAGEBOX::DEFAULT_WIDTH, GetCore().GetOrientation(), defaultWidth); + + float totalH = -1.0f; + totalH = GetCore().GetTotalHeight(); + + FloatRectangle bounds; + + if (totalH > maxHeight) + { + bounds = GetCenterAlignedRect(defaultWidth, maxHeight); + } + else + { + bounds = GetCenterAlignedRect(defaultWidth, totalH); + } + + SetResizable(true); + + r = SetBounds(bounds); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + SetResizable(false); + + r = GetCore().UpdateBounds(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + + return r; + +} + +String +_ProgressPopupImpl::GetText(void) const +{ + return GetCore().GetText(); +} + +result +_ProgressPopupImpl::SetTextColor(const Color& color) +{ + GetCore().SetTextColor(color); + + return E_SUCCESS; +} + +Color +_ProgressPopupImpl::GetTextColor() const +{ + return GetCore().GetTextColor(); +} + +int +_ProgressPopupImpl::GetMaxTextLength(void) const +{ + int maxLength = 0; + GET_FIXED_VALUE_CONFIG(MESSAGEBOX::TEXT_MAX_LENGTH, GetCore().GetOrientation(), maxLength); + + return maxLength; +} + +FloatRectangle +_ProgressPopupImpl::GetCenterAlignedRect(float width, float height) const +{ + float x = 0.0f; + float y = 0.0f; + + FloatDimension screenRect = _ControlManager::GetInstance()->GetScreenSizeF(); + + if (GetCore().GetOrientation() == _CONTROL_ORIENTATION_LANDSCAPE) + { + float temp = screenRect.width; + screenRect.width = screenRect.height; + screenRect.height = temp; + } + + x = (screenRect.width - width) / 2.0f; + y = (screenRect.height - height) / 2.0f; + + return FloatRectangle(x, y, width, height); +} + +void +_ProgressPopupImpl::OnProgressPopupCanceled(void) +{ + if (__pPublicProgressPopupEvent != null) + { + Tizen::Base::Runtime::IEventArg* pEventArg = _PublicProgressPopupEvent::CreateProgressPopupEventArgN(); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pPublicProgressPopupEvent->Fire(*pEventArg); + } +} + +void +_ProgressPopupImpl::OnChangeLayout(_ControlOrientation orientation) +{ + result r = E_SUCCESS; + FloatRectangle bounds; + + bounds = GetBoundsF(); + + if(GetCore().IsTransparent() == false) + { + GetCore().OnChangeLayout(orientation); + + r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + float maxHeight = 0.0f; + float defaultWidth = 0.0f; + + GET_SHAPE_CONFIG(MESSAGEBOX::MAX_HEIGHT, orientation, maxHeight); + GET_SHAPE_CONFIG(MESSAGEBOX::DEFAULT_WIDTH, orientation, defaultWidth); + + bounds.width = defaultWidth; + + float totalH = -1.0f; + totalH = GetCore().GetTotalHeight(); + + if (totalH > maxHeight) + { + bounds.height = maxHeight; + } + else + { + bounds.height = totalH; + } + } + + SetResizable(true); + + if(_centerAlign) + { + r = SetBounds(GetCenterAlignedRect(bounds.width, bounds.height)); + } + else + { + r = SetBounds(bounds); + } + + SetResizable(false); + + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + + return ; +} + +void +_ProgressPopupImpl::OnBoundsChanged(void) +{ + FloatRectangle rect; + FloatRectangle pRect = GetBoundsF(); + + if(_centerAlign) + { + rect = GetCenterAlignedRect(pRect.width, pRect.height); + + if (!_FloatCompare(rect.x, pRect.x) || !_FloatCompare(rect.y, pRect.y)) + { + _centerAlign = false; + } + } + + _ControlImpl::OnBoundsChanged(); +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_ProgressPopupPresenter.cpp b/src/ui/controls/FUiCtrl_ProgressPopupPresenter.cpp new file mode 100644 index 0000000..93da7f8 --- /dev/null +++ b/src/ui/controls/FUiCtrl_ProgressPopupPresenter.cpp @@ -0,0 +1,817 @@ +// +// 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_ProgressPopupPresenter.cpp + * @brief This is the implementation file for the _ProgressPopupPresenter class. + */ + + +#include +#include +#include +#include +#include +#include "FUi_AccessibilityContainer.h" +#include "FUi_AccessibilityElement.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_ResourceManager.h" +#include "FUi_UiTouchEvent.h" +#include "FUiCtrl_Label.h" +#include "FUiCtrl_ScrollPanel.h" +#include "FUiCtrl_ProgressPopupPresenter.h" +#include "FUiCtrl_ProgressPopup.h" + + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Graphics; +using namespace Tizen::Graphics::_Text; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Animations; + + +namespace Tizen { namespace Ui { namespace Controls +{ + + +_ProgressPopupPresenter::_ProgressPopupPresenter(void) + : __pProgressPopup(null) + , __pBodyTextObject(null) + , __textBounds(0.0f, 0.0f, 0.0f, 0.0f) + , __titleBgBounds(0.0f, 0.0f, 0.0f, 0.0f) + , __buttonBgBounds(0.0f, 0.0f, 0.0f, 0.0f) + , __pLabel(null) + , __pScrollPanel(null) + , __pAnimation(null) + , __pAnimationFrameList(null) + , __textObjectHeight(0.0f) + , __currentIndex(0) + , __buttonPressState(false) + , __cancelButton(false) + , __transparent(false) +{ +} + +_ProgressPopupPresenter::~_ProgressPopupPresenter(void) +{ + if (__pBodyTextObject != null) + { + __pBodyTextObject->RemoveAll(); + delete __pBodyTextObject; + __pBodyTextObject = null; + } + + if (__pLabel != null) + { + __pScrollPanel->DetachChild(*__pLabel); + delete __pLabel; + __pLabel = null; + } + + if (__pScrollPanel != null) + { + __pProgressPopup->DetachChild(*__pScrollPanel); + delete __pScrollPanel; + __pScrollPanel = null; + } + + if (__pAnimationFrameList != null) + { + __pAnimationFrameList->RemoveAll(true); + delete __pAnimationFrameList; + __pAnimationFrameList = null; + } + + if (__pAnimation != null) + { + delete __pAnimation; + __pAnimation = null; + } + +} + +result +_ProgressPopupPresenter::Initialize(_ProgressPopup& ProgressPopup, bool cancelButton, bool transparent, const FloatRectangle& animationRect) +{ + result r = E_SUCCESS; + + __cancelButton = cancelButton; + __transparent = transparent; + __pProgressPopup = &ProgressPopup; + + return r; +} + +void +_ProgressPopupPresenter::SetTitleTextObject(void) +{ + result r = E_SUCCESS; + + TextSimple* pSimpleTextForTitleText = null; + + float titleTextSize = 0.0f; + float minTitleTextSize = 0.0f; + float defaultWidth = 0.0f; + float titleHeight = 0.0f; + float titleTopMargin = 0.0f; + float titleLeftMargin = 0.0f; + float titleRightMargin = 0.0f; + + float transTopMargin = 0.0f; + float transLeftMargin = 0.0f; + float transRightMargin = 0.0f; + + _ControlOrientation orientation; + + orientation = __pProgressPopup->GetOrientation(); + + GET_SHAPE_CONFIG(POPUP::TITLE_TEXT_SIZE, orientation, titleTextSize); + GET_SHAPE_CONFIG(POPUP::MIN_TITLE_TEXT_SIZE, orientation, minTitleTextSize); + GET_SHAPE_CONFIG(MESSAGEBOX::DEFAULT_WIDTH, orientation, defaultWidth); + GET_SHAPE_CONFIG(POPUP::TITLE_HEIGHT, orientation, titleHeight); + GET_SHAPE_CONFIG(POPUP::TITLE_TEXT_TOP_MARGIN, orientation, titleTopMargin); + GET_SHAPE_CONFIG(POPUP::TITLE_TEXT_LEFT_MARGIN, orientation, titleLeftMargin); + GET_SHAPE_CONFIG(POPUP::TITLE_TEXT_RIGHT_MARGIN, orientation, titleRightMargin); + + GET_SHAPE_CONFIG(POPUP::BG_IMAGE_TRANSPARENT_TOP_MARGIN, orientation, transTopMargin); + GET_SHAPE_CONFIG(POPUP::BG_IMAGE_TRANSPARENT_LEFT_MARGIN, orientation, transLeftMargin); + GET_SHAPE_CONFIG(POPUP::BG_IMAGE_TRANSPARENT_RIGHT_MARGIN, orientation, transRightMargin); + + if (_pTitleTextObject == null) + { + _pTitleTextObject = new (std::nothrow) TextObject(); + SysTryReturnVoidResult(NID_UI_CTRL, _pTitleTextObject != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = _pTitleTextObject->Construct(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + r = _pTitleTextObject->RemoveAll(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + pSimpleTextForTitleText = new (std::nothrow) TextSimple(const_cast (__pProgressPopup->GetTitleText().GetPointer()), + __pProgressPopup->GetTitleText().GetLength(), + 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); + _pTitleTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); + _pTitleTextObject->SetTextObjectEllipsisType(TEXT_OBJECT_ELLIPSIS_TYPE_TAIL); + + _pTitleTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT); + + _pTitleTextObject->SetBounds(FloatRectangle(titleLeftMargin + transLeftMargin, + titleTopMargin + transTopMargin, + defaultWidth - (titleLeftMargin + titleRightMargin + transLeftMargin + transRightMargin), + titleHeight - titleTopMargin)); + + r = CalculateTitleTextSize(titleTextSize, minTitleTextSize); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __titleBgBounds.SetBounds(transLeftMargin, transTopMargin, + defaultWidth - (transLeftMargin + transRightMargin), titleHeight); + + _titleBounds = FloatRectangle(titleLeftMargin + transLeftMargin, + __titleBgBounds.y + (__titleBgBounds.height - _pTitleTextObject->GetTotalHeight()) / 2.0f, + defaultWidth - (titleLeftMargin + titleRightMargin + transLeftMargin + transRightMargin), + _pTitleTextObject->GetTotalHeight()); + + + SetLastResult(E_SUCCESS); + return; +CATCH: + delete _pTitleTextObject; + _pTitleTextObject = null; + + return; +} + +void +_ProgressPopupPresenter::SetTextObject(void) +{ + result r = E_SUCCESS; + + TextSimple* pSimpleTextForBodyText = null; + + float bodyTextSize = 0.0f; + float defaultWidth = 0.0f; + float titleHeight = 0.0f; + float maxHeight = 0.0f; + float textLeftMargin = 0.0f; + float textRightMargin = 0.0f; + float bottomHeight = 0.0f; + float transTopMargin = 0.0f; + float transLeftMargin = 0.0f; + float transRightMargin = 0.0f; + float animationWidth = 0.0f; + float textTopMargin = 0.0f; + float animationTopMargin = 0.0f; + + _ControlOrientation orientation; + + orientation = __pProgressPopup->GetOrientation(); + + GET_SHAPE_CONFIG(POPUP::PROCESS_ANIMATION_WIDTH, orientation, animationWidth); + + GET_SHAPE_CONFIG(POPUP::BG_IMAGE_TRANSPARENT_TOP_MARGIN, orientation, transTopMargin); + GET_SHAPE_CONFIG(POPUP::BG_IMAGE_TRANSPARENT_LEFT_MARGIN, orientation, transLeftMargin); + GET_SHAPE_CONFIG(POPUP::BG_IMAGE_TRANSPARENT_RIGHT_MARGIN, orientation, transRightMargin); + + GET_SHAPE_CONFIG(POPUP::PROCESS_TEXT_TOP_MARGIN, orientation, textTopMargin); + GET_SHAPE_CONFIG(POPUP::BODY_TEXT_HEIGHT, orientation, __textObjectHeight); + GET_SHAPE_CONFIG(MESSAGEBOX::TEXT_LEFT_MARGIN, orientation, textLeftMargin); + GET_SHAPE_CONFIG(MESSAGEBOX::TEXT_RIGHT_MARGIN, orientation, textRightMargin); + GET_SHAPE_CONFIG(MESSAGEBOX::TEXT_SIZE, orientation, bodyTextSize); + + GET_SHAPE_CONFIG(MESSAGEBOX::MAX_HEIGHT, orientation, maxHeight); + GET_SHAPE_CONFIG(MESSAGEBOX::DEFAULT_WIDTH, orientation, defaultWidth); + GET_SHAPE_CONFIG(MESSAGEBOX::BOTTOM_HEIGHT, orientation, bottomHeight); + + if (__pProgressPopup->HasTitle()) + { + GET_SHAPE_CONFIG(POPUP::TITLE_HEIGHT, orientation, titleHeight); + GET_SHAPE_CONFIG(POPUP::PROCESS_ANIMATION_WITH_TITLE_TOP_MARGIN, orientation, animationTopMargin); + } + else + { + GET_SHAPE_CONFIG(POPUP::PROCESS_ANIMATION_NO_TITLE_TOP_MARGIN, orientation, animationTopMargin); + } + + if (__pBodyTextObject == null) + { + __pBodyTextObject = new (std::nothrow) TextObject(); + SysTryReturnVoidResult(NID_UI_CTRL, __pBodyTextObject != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = __pBodyTextObject->Construct(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pLabel = _Label::CreateLabelN(); + SysTryCatch(NID_UI_CTRL, __pLabel != null, , E_OUT_OF_MEMORY, "[E_SYSTEM] Failed to create the scroll."); + } + else + { + r = __pBodyTextObject->RemoveAll(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + pSimpleTextForBodyText = new (std::nothrow) TextSimple(const_cast (__pProgressPopup->GetText().GetPointer()), + __pProgressPopup->GetText().GetLength(), + 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."); + + __pBodyTextObject->AppendElement(*pSimpleTextForBodyText); + __pBodyTextObject->SetForegroundColor(__pProgressPopup->GetTextColor(), 0, __pBodyTextObject->GetTextLength()); + __pBodyTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_WORD); + + r = SetFontInfo(FONT_STYLE_PLAIN, bodyTextSize); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to set font.", GetErrorMessage(r)); + + __pBodyTextObject->SetFont(_pFont, 0, __pBodyTextObject->GetTextLength()); + __pBodyTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT); + + if (__pProgressPopup->HasButton()) + { + GET_SHAPE_CONFIG(MESSAGEBOX::BOTTOM_HEIGHT, orientation, bottomHeight); + } + + // Calculate Text bounds + __textBounds.SetBounds(textLeftMargin + transLeftMargin, + titleHeight + textTopMargin + transTopMargin + animationWidth + animationTopMargin, + defaultWidth - (textLeftMargin + textRightMargin + transLeftMargin + transRightMargin), + maxHeight - titleHeight - bottomHeight - animationWidth); + + __pBodyTextObject->SetBounds(__textBounds); + + if (__pProgressPopup->GetText().GetLength() > 0) + { + __pBodyTextObject->Compose(); + __textObjectHeight = __pBodyTextObject->GetLineHeightAtF(0) * 3.0; + __textBounds.height = __textObjectHeight; + } + + if (__pBodyTextObject->GetTotalHeightF() < __textObjectHeight) + { + __pLabel->SetBounds(FloatRectangle(0.0f, (__textObjectHeight - __pBodyTextObject->GetTotalHeightF())/2.0f, __textBounds.width, __pBodyTextObject->GetTotalHeightF())); + } + else + { + __pLabel->SetBounds(FloatRectangle(0.0f, 0.0f, __textBounds.width, __pBodyTextObject->GetTotalHeightF())); + } + + __pLabel->SetText(__pProgressPopup->GetText()); + __pLabel->SetTextConfig(bodyTextSize, LABEL_TEXT_STYLE_NORMAL); + __pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT); + __pLabel->SetMargin(0.0f, 0.0f, 0.0f, 0.0f); + + if (__pScrollPanel == null) + { + __pScrollPanel = _ScrollPanel::CreateScrollPanelN(__textBounds, SCROLL_PANEL_SCROLL_DIRECTION_VERTICAL, true); + SysTryCatch(NID_UI_CTRL, __pScrollPanel != null, , E_OUT_OF_MEMORY, "[E_SYSTEM] Failed to create the scroll."); + + __pScrollPanel->SetBounds(__textBounds); + __pScrollPanel->SetFocusable(false); + __pScrollPanel->AttachChild(*__pLabel); + __pProgressPopup->AttachChild(*__pScrollPanel); + } + else + { + __pScrollPanel->SetBounds(__textBounds); + } + + SetLastResult(E_SUCCESS); + + return; +CATCH: + delete __pBodyTextObject; + __pBodyTextObject = null; + + delete __pLabel; + __pLabel = null; + + delete __pScrollPanel; + __pScrollPanel = null; + + return; +} + +result +_ProgressPopupPresenter::PlayProcessAnimation(void) +{ + if (__pAnimation != null) + { + if (__pAnimation->GetStatus() == ANIMATION_PLAYING) + { + return E_SUCCESS; + } + } + else + { + SetProcessAnimation(); + } + + if (__pAnimation != null) + { + __pAnimation->Play(); + } + + return E_SUCCESS; + +} + +result +_ProgressPopupPresenter::StopProcessAnimation(void) +{ + if (__pAnimation != null) + { + __pAnimation->Stop(); + + __pProgressPopup->DetachChild(*__pAnimation); + + delete __pAnimation; + __pAnimation = null; + } + + return E_SUCCESS; +} + +result +_ProgressPopupPresenter::SetProcessAnimation(void) +{ + result r = E_SUCCESS; + + if (__pAnimation != null) + { + if (__pAnimation->GetStatus() == ANIMATION_PLAYING) + { + return r; + } + } + + if (__pAnimationFrameList) + { + __pAnimationFrameList->RemoveAll(true); + delete __pAnimationFrameList; + __pAnimationFrameList = null; + } + + r = GET_ANIMATION_CONFIG_N(POPUP::PROCESSING_ANIMATION, __pAnimationFrameList); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM,"System error is occured."); + + delete __pAnimation; + __pAnimation = null; + + __pAnimation = _Animation::CreateAnimationN(true); + + if (__pAnimation) + { + if (__pAnimationFrameList) + { + __pAnimation->SetAnimationFrames(*__pAnimationFrameList); + __pAnimation->SetImageCount(__pAnimationFrameList->GetCount()); + } + + __pAnimation->SetRepeatCount(ANIMATION_REPEAT_COUNT); + __pAnimation->AddAnimationEventListener(*this); + + FloatRectangle animationBounds = __pProgressPopup->GetAnimationRect(); + + if (__transparent) + { + __pAnimation->GetVisualElement()->SetOpacity(0.6f); + __pAnimation->SetBounds(FloatRectangle(0.0f, 0.0f, animationBounds.width, animationBounds.height)); + } + else + { + __pAnimation->SetBounds(FloatRectangle(animationBounds.x, animationBounds.y, animationBounds.width, animationBounds.height)); + } + + __pProgressPopup->AttachChild(*__pAnimation); + } + + return r; +} + +result +_ProgressPopupPresenter::UpdateProcessAnimation(void) +{ + result r = E_SUCCESS; + FloatRectangle animationBounds = __pProgressPopup->GetAnimationRect(); + if(__pAnimation) + { + r = __pAnimation->SetBounds(animationBounds); + } + return r; +} + +void +_ProgressPopupPresenter::OnAnimationStopped(const _Control & source) +{ + if (&source == __pAnimation) + { + __pAnimation->Play(); + } +} + +void +_ProgressPopupPresenter::Draw(void) +{ + result r = E_SUCCESS; + + float titleTextSize = 0.0f; + float bodyTextSize = 0.0f; + float defaultWidth = 0.0f; + + bool isCustomBitmap = false; + + _ControlOrientation orientation; + + isCustomBitmap = IS_CUSTOM_BITMAP(POPUP::BG_NORMAL); + + orientation = __pProgressPopup->GetOrientation(); + + Canvas* pCanvas = __pProgressPopup->GetCanvasN(); + SysTryReturnVoidResult(NID_UI_CTRL, (pCanvas != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create canvas."); + + pCanvas->SetBackgroundColor(Color(0x00000000)); + pCanvas->Clear(); + + if (__transparent) + { + return; + } + + GET_SHAPE_CONFIG(POPUP::TITLE_TEXT_SIZE, orientation, titleTextSize); + GET_SHAPE_CONFIG(MESSAGEBOX::TEXT_SIZE, orientation, bodyTextSize); + + GET_SHAPE_CONFIG(MESSAGEBOX::DEFAULT_WIDTH, orientation, defaultWidth); + + float totalH = __pProgressPopup->GetTotalHeight(); + + const Bitmap* pBackgroundBitmap = __pProgressPopup->GetBackgroundBitmap(); + const Bitmap* pOutlineBitmap = __pProgressPopup->GetOutlineBitmap(); + + FloatRectangle bgBounds(0.0f, 0.0f, defaultWidth, totalH); + + // Draw BG + if (pBackgroundBitmap != null) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pBackgroundBitmap)) + { + pCanvas->DrawNinePatchedBitmap(bgBounds, *pBackgroundBitmap); + } + else + { + pCanvas->DrawBitmap(bgBounds, *pBackgroundBitmap); + } + } + + // Draw Outline + if (!isCustomBitmap && pOutlineBitmap != null) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pOutlineBitmap)) + { + pCanvas->DrawNinePatchedBitmap(bgBounds, *pOutlineBitmap); + } + else + { + pCanvas->DrawBitmap(bgBounds, *pOutlineBitmap); + } + } + + const Bitmap* pTitleBitmap = __pProgressPopup->GetTitleBackgroundBitmap(); + const Bitmap* pTitleEffectBitmap = __pProgressPopup->GetTitleBackgroundEffectBitmap(); + + // Draw Title text + if (_pTitleTextObject != null) + { + //DrawTitleBG + if(pTitleBitmap != null) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pTitleBitmap)) + { + pCanvas->DrawNinePatchedBitmap(__titleBgBounds, *pTitleBitmap); + } + else + { + pCanvas->DrawBitmap(__titleBgBounds, *pTitleBitmap); + } + } + + //DrawEffectTitleBitmap + if (pTitleEffectBitmap != null) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pTitleEffectBitmap)) + { + pCanvas->DrawNinePatchedBitmap(__titleBgBounds, *pTitleEffectBitmap); + } + else + { + pCanvas->DrawBitmap(__titleBgBounds, *pTitleEffectBitmap); + } + } + + r = SetFontInfo(FONT_STYLE_PLAIN, _titleTextSize); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + _pTitleTextObject->SetFont(_pFont, 0, _pTitleTextObject->GetTextLength()); + _pTitleTextObject->SetBounds(_titleBounds); + _pTitleTextObject->Draw(*_CanvasImpl::GetInstance(*pCanvas)); + } + + if(__cancelButton) + { + const Bitmap* pButtonBitmap = __pProgressPopup->GetButtonBackgroundBitmap(); + const Bitmap* pButtonEffectBitmap = __pProgressPopup->GetButtonBackgroundEffectBitmap(); + + //DrawButtonBG + if(pButtonBitmap != null) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pButtonBitmap)) + { + pCanvas->DrawNinePatchedBitmap(__buttonBgBounds, *pButtonBitmap); + } + else + { + pCanvas->DrawBitmap(__buttonBgBounds, *pButtonBitmap); + } + } + + //DrawEffectButtonBitmap + if (pButtonEffectBitmap != null) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pButtonEffectBitmap)) + { + pCanvas->DrawNinePatchedBitmap(__buttonBgBounds, *pButtonEffectBitmap); + } + else + { + pCanvas->DrawBitmap(__buttonBgBounds, *pButtonEffectBitmap); + } + } + } + + if (__pLabel != null) + { + __pLabel->SetTextColor(__pProgressPopup->GetTextColor()); + } + + //fall thtrough +CATCH: + delete pCanvas; + + return; +} + +result +_ProgressPopupPresenter::DoModal(int& modalResult) +{ + __pProgressPopup->Open(); + + ProcessEvent(); + + __pProgressPopup->Close(); + + modalResult = __pProgressPopup->GetPopupReturnValue(); + + return E_SUCCESS; +} + +float +_ProgressPopupPresenter::GetBodyTextObjHeight(void) const +{ + return (__pBodyTextObject == null) ? 0.0f : __textObjectHeight; +} +float +_ProgressPopupPresenter::GetBodyTextHeight(void) const +{ + return (__pBodyTextObject == null) ? 0.0f : __pBodyTextObject->GetTotalHeightF(); +} + +FloatRectangle +_ProgressPopupPresenter::GetTextBounds(void) const +{ + return __textBounds; +} + +FloatRectangle +_ProgressPopupPresenter::GetButtonBounds(void) +{ + float width = 0; + float height = 0; + float x = 0; + float y = 0; + + float defaultWidth = 0.0f; + float titleHeight = 0.0f; + float btnHeight = 0.0f; + float btnSideMargin1 = 0.0f; + float transTopMargin = 0.0f; + float transLeftMargin = 0.0f; + float transRightMargin = 0.0f; + float animationWidth = 0.0f; + float animationTopMargin = 0.0f; + float textTopMargin = 0.0f; + float textBottomMargin = 0.0f; + float buttonBgHeight = 0.0f; + _ControlOrientation orientation; + + orientation = __pProgressPopup->GetOrientation(); + + GET_SHAPE_CONFIG(POPUP::BG_IMAGE_TRANSPARENT_TOP_MARGIN, orientation, transTopMargin); + GET_SHAPE_CONFIG(POPUP::BG_IMAGE_TRANSPARENT_LEFT_MARGIN, orientation, transLeftMargin); + GET_SHAPE_CONFIG(POPUP::BG_IMAGE_TRANSPARENT_RIGHT_MARGIN, orientation, transRightMargin); + GET_SHAPE_CONFIG(POPUP::PROCESS_ANIMATION_WIDTH, orientation, animationWidth); + GET_SHAPE_CONFIG(POPUP::PROCESS_TEXT_TOP_MARGIN, orientation, textTopMargin); + GET_SHAPE_CONFIG(POPUP::PROCESS_TEXT_BOTTOM_MARGIN, orientation, textBottomMargin); + + + GET_SHAPE_CONFIG(MESSAGEBOX::DEFAULT_WIDTH, orientation, defaultWidth); + GET_SHAPE_CONFIG(MESSAGEBOX::BUTTON_HEIGHT, orientation, btnHeight); + GET_SHAPE_CONFIG(MESSAGEBOX::BUTTON_SIDE_MARGIN_01, orientation, btnSideMargin1); + GET_SHAPE_CONFIG(MESSAGEBOX::BOTTOM_HEIGHT, orientation, buttonBgHeight); + + if (!__pProgressPopup->HasButton()) + { + return FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); + } + + if (__pProgressPopup->HasTitle()) + { + GET_SHAPE_CONFIG(POPUP::TITLE_HEIGHT, orientation, titleHeight); + GET_SHAPE_CONFIG(POPUP::PROCESS_ANIMATION_WITH_TITLE_TOP_MARGIN, orientation, animationTopMargin); + } + else + { + GET_SHAPE_CONFIG(POPUP::PROCESS_ANIMATION_NO_TITLE_TOP_MARGIN, orientation, animationTopMargin); + } + + if (!__pProgressPopup->HasText()) + { + textTopMargin = 0.0f; + textBottomMargin = textBottomMargin * 1.5f; + } + + width = defaultWidth - (btnSideMargin1 * 2.0f); + height = btnHeight; + x = btnSideMargin1; + + y = transTopMargin + + titleHeight + + animationTopMargin + + animationWidth + + textTopMargin + + textBottomMargin + + GetBodyTextObjHeight(); + + __buttonBgBounds.SetBounds(transLeftMargin, y , (defaultWidth - (transLeftMargin + transRightMargin)) , (buttonBgHeight)); + + return FloatRectangle(x, y + ((buttonBgHeight - height) / 2), width, height); +} + +void +_ProgressPopupPresenter::InitializeAccessibilityElement(void) +{ + _AccessibilityContainer* pContainer = __pProgressPopup->GetAccessibilityContainer(); + + if (pContainer == null) + { + return ; + } + + if (__pLabel != null) + { + _AccessibilityContainer* pLabelContainer = __pLabel->GetAccessibilityContainer(); + if (pLabelContainer != null) + { + _AccessibilityElement* pLabelElement = pLabelContainer->GetChildElement(L"LabelText"); + if (pLabelElement != null) + { + pLabelElement->SetName(L"ProgressPopupText"); + pLabelElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_TEXT_IN_BODY_OF_POP_UP_T_TALKBACK"); + } + + // Add Container + pContainer->AddChildContainer(*pLabelContainer); + } + } +} + + +_Popup* +_ProgressPopupPresenter::GetCore(void) +{ + return static_cast <_Popup*>(__pProgressPopup); +} + +bool +_ProgressPopupPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + __buttonPressState = true; + + return true; +} + +bool +_ProgressPopupPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + __buttonPressState = false; + + return true; +} + +bool +_ProgressPopupPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + Point touchPoint = _CoordinateSystemUtils::ConvertToInteger(touchinfo.GetCurrentPosition()); + + return true; +} + +result +_ProgressPopupPresenter::OnChangeLayout(_ControlOrientation orientation) +{ + FloatRectangle animationBounds = __pProgressPopup->GetAnimationRect(); + + if (__pAnimation != null) + { + __pAnimation->SetBounds(FloatRectangle(animationBounds.x, animationBounds.y, animationBounds.width, animationBounds.height)); + } + + if (__pProgressPopup->HasTitle()) + { + SetTitleTextObject(); + } + + if (__pProgressPopup->HasText()) + { + SetTextObject(); + } + + return E_SUCCESS; +} + +}}} // Tizen::Ui::Controls + + diff --git a/src/ui/controls/FUiCtrl_ProgressPresenter.cpp b/src/ui/controls/FUiCtrl_ProgressPresenter.cpp new file mode 100644 index 0000000..7a1d87b --- /dev/null +++ b/src/ui/controls/FUiCtrl_ProgressPresenter.cpp @@ -0,0 +1,384 @@ +// +// 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_ProgressPresenter.cpp + * @brief This is the implementation file for the _ProgressPresenter class. + */ + +#include +#include +#include +#include "FUi_ResourceManager.h" +#include "FUiCtrl_ProgressPresenter.h" +#include "FUiCtrl_ProgressModel.h" +#include "FUiCtrl_Progress.h" + +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_ProgressPresenter::_ProgressPresenter(void) + : __pProgress(null) + , __pProgressModel(null) + , __pBarResourceEffectBitmap(null) + , __pBarBgResourceEffectBitmap(null) + , __pBarColorReplacementBitmap(null) + , __pBarBgColorReplacementBitmap(null) +{ +} + +_ProgressPresenter::~_ProgressPresenter(void) +{ + delete __pProgressModel; + __pProgressModel = null; + + delete __pBarResourceEffectBitmap; + __pBarResourceEffectBitmap = null; + + delete __pBarBgResourceEffectBitmap; + __pBarBgResourceEffectBitmap = null; + + delete __pBarColorReplacementBitmap; + __pBarColorReplacementBitmap = null; + + delete __pBarBgColorReplacementBitmap; + __pBarBgColorReplacementBitmap = null; +} + +_ProgressPresenter* +_ProgressPresenter::CreateInstanceN(const _Progress& progress) +{ + result r = E_SUCCESS; + _ProgressPresenter* pProgressPresenter = new (std::nothrow) _ProgressPresenter(); + SysTryReturn(NID_UI_CTRL, pProgressPresenter != null, null, E_OUT_OF_MEMORY, + "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + pProgressPresenter->__pProgress = const_cast <_Progress*>(&progress); + SysTryCatch(NID_UI_CTRL, pProgressPresenter->__pProgress != null, , E_SYSTEM, + "A system error has occurred. The Progress control core is null.", GetErrorMessage(E_SYSTEM)); + + pProgressPresenter->__pProgressModel = new (std::nothrow) _ProgressModel(); + SysTryCatch(NID_UI_CTRL, pProgressPresenter->__pProgressModel != null, , E_OUT_OF_MEMORY, + "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", GetErrorMessage(E_SYSTEM)); + + return pProgressPresenter; + +CATCH: + delete pProgressPresenter; + pProgressPresenter = null; + + return null; +} + +void +_ProgressPresenter::SetValue(int value) +{ + int maxValue = __pProgressModel->GetMaxValue(); + int minValue = __pProgressModel->GetMinValue(); + + if (value > maxValue) + { + value = maxValue; + } + else if (value < minValue) + { + value = minValue; + } + + __pProgressModel->SetValue(value); + + return; +} + +void +_ProgressPresenter::SetMinValue(int minValue) +{ + __pProgressModel->SetMinValue(minValue); + + if (__pProgressModel->GetValue() < minValue) + { + __pProgressModel->SetValue(minValue); + } + + return; +} + +void +_ProgressPresenter::SetMaxValue(int maxValue) +{ + __pProgressModel->SetMaxValue(maxValue); + + if (__pProgressModel->GetValue() > maxValue) + { + __pProgressModel->SetValue(maxValue); + } + return; +} + +int +_ProgressPresenter::GetValue(void) const +{ + return __pProgressModel->GetValue(); +} + +int +_ProgressPresenter::GetMinValue(void) const +{ + return __pProgressModel->GetMinValue(); +} + +int +_ProgressPresenter::GetMaxValue(void) const +{ + return __pProgressModel->GetMaxValue(); +} + +int +_ProgressPresenter::GetPercentComplete(void) const +{ + int percentValue = 0; + int span = __pProgressModel->GetMaxValue() - __pProgressModel->GetMinValue(); + + if (span != 0) + { + percentValue = (int) ((((double) __pProgressModel->GetValue() - __pProgressModel->GetMinValue()) / span) * 100); + } + + return percentValue; +} + +result +_ProgressPresenter::LoadResource(void) +{ + result r = E_SUCCESS; + + int opacity = 0; + + Color bgColor; + Color barColor; + + r = GET_COLOR_CONFIG(PROGRESS::BAR_BG_NORMAL, bgColor); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = GET_COLOR_CONFIG(PROGRESS::BAR_NORMAL, barColor); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, " Propagating."); + + 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."); + + 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)); + + 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)); + + r = GET_BITMAP_CONFIG_N(PROGRESS::BAR_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pBarResourceEffectBitmap); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + opacity = barColor.GetAlpha(); + __pBarColorReplacementBitmap->SetAlphaConstant(opacity); + + __currentBarColor = barColor; + __currentBarBgColor = bgColor; + + return r; + +CATCH: + + delete __pBarBgColorReplacementBitmap; + __pBarBgColorReplacementBitmap = null; + + delete __pBarResourceEffectBitmap; + __pBarResourceEffectBitmap = null; + + delete __pBarBgResourceEffectBitmap; + __pBarBgResourceEffectBitmap = null; + + delete __pBarColorReplacementBitmap; + __pBarColorReplacementBitmap = null; + + return r; +} + +result +_ProgressPresenter::DrawBitmap(Canvas& canvas, const FloatRectangle& bounds, Bitmap* pBitmap) +{ + result r = E_SUCCESS; + + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pBitmap)) + { + r = canvas.DrawNinePatchedBitmap(bounds, *pBitmap); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + r = canvas.DrawBitmap(bounds, *pBitmap); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + return r; +} + +result +_ProgressPresenter::Draw(void) +{ + result r = E_SUCCESS; + + FloatRectangle bounds = __pProgress->GetBoundsF(); + Canvas* pCanvas = __pProgress->GetCanvasN(); + SysTryReturnResult(NID_UI_CTRL, pCanvas != null, E_SYSTEM, "Failed to get a canvas."); + + int minValue = __pProgressModel->GetMinValue(); + int maxValue = __pProgressModel->GetMaxValue(); + float width = 0.0f; + float height = 0.0f; + int opacity = 0; + float leftMargin = 0.0f; + float minimumWidth = 0.0f; + float minimumHeight = 0.0f; + float offset = 0.0f; + Bitmap* pReplacementBitmap = null; + bool isCustomBarBitmap = false; + Color bgColor; + + r = GET_COLOR_CONFIG(PROGRESS::BAR_BG_NORMAL, bgColor); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GET_SHAPE_CONFIG(PROGRESS::BAR_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, height); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GET_SHAPE_CONFIG(PROGRESS::BAR_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, leftMargin); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GET_SHAPE_CONFIG(PROGRESS::MINIMUM_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, minimumWidth); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GET_SHAPE_CONFIG(PROGRESS::BAR_OFFSET, _CONTROL_ORIENTATION_PORTRAIT, offset); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GET_SHAPE_CONFIG(PROGRESS::MINIMUM_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, minimumHeight); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + if (bounds.width < minimumWidth) + { + bounds.width = minimumWidth; + } + + if (bounds.height < minimumHeight) + { + bounds.height = minimumHeight; + } + + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + + width = bounds.width - (2.0f * leftMargin) - (2.0f * offset); + if (maxValue == __pProgressModel->GetValue()) + { + width = bounds.width - (2.0f * leftMargin) - (2.0f * offset); + } + else + { + width = (width) * ((__pProgressModel->GetValue() - minValue) * 100.0f / (maxValue - minValue)) / 100.0f; + } + + if (!__pProgress->IsEnabled()) // disabled + { + __pBarBgColorReplacementBitmap->SetAlphaConstant(0xFF); + + r = DrawBitmap(*pCanvas, FloatRectangle(leftMargin, (bounds.height - height) / 2.0f, (bounds.width - (2.0f * leftMargin)), height), __pBarBgColorReplacementBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + opacity = bgColor.GetAlpha(); + __pBarBgColorReplacementBitmap->SetAlphaConstant(opacity); + + isCustomBarBitmap = IS_CUSTOM_BITMAP(PROGRESS::BAR_BG_NORMAL); + + if (__pProgress->GetBarBackgroundColor() != __currentBarBgColor) + { + 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; + + __pBarBgColorReplacementBitmap = pReplacementBitmap; + __currentBarBgColor = __pProgress->GetBarBackgroundColor(); + } + + r = DrawBitmap(*pCanvas, FloatRectangle(leftMargin, (bounds.height - height) / 2.0f, (bounds.width - (2.0f * leftMargin)), height), __pBarBgColorReplacementBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + if (!isCustomBarBitmap) + { + r = DrawBitmap(*pCanvas, FloatRectangle(leftMargin, (bounds.height - height) / 2.0f, (bounds.width - (2.0f * leftMargin)), height), __pBarBgResourceEffectBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + if (width > 0) + { + if (__pProgress->GetBarColor() != __currentBarColor) + { + 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; + + __pBarColorReplacementBitmap = pReplacementBitmap; + __currentBarColor = __pProgress->GetBarColor(); + } + if (!__pProgress->IsEnabled()) // disabled + { + __pBarColorReplacementBitmap->SetAlphaConstant(0x4C); + } + else + { + opacity = __pProgress->GetBarColor().GetAlpha(); + __pBarColorReplacementBitmap->SetAlphaConstant(opacity); + } + + isCustomBarBitmap = IS_CUSTOM_BITMAP(PROGRESS::BAR_NORMAL); + + r = DrawBitmap(*pCanvas, FloatRectangle((leftMargin + offset), (bounds.height - height) / 2.0f, width, height), __pBarColorReplacementBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + if (!isCustomBarBitmap) + { + r = DrawBitmap(*pCanvas, FloatRectangle((leftMargin + offset), (bounds.height - height) / 2.0f, width, height), __pBarResourceEffectBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + } + + delete pCanvas; + pCanvas = null; + + return r; + +CATCH: + + delete pCanvas; + pCanvas = null; + + return r; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_PublicActionEvent.cpp b/src/ui/controls/FUiCtrl_PublicActionEvent.cpp new file mode 100644 index 0000000..de0315e --- /dev/null +++ b/src/ui/controls/FUiCtrl_PublicActionEvent.cpp @@ -0,0 +1,166 @@ +// +// 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_PublicActionEvent.cpp +* @brief This is the implementation for the _PublicActionEvent class. +*/ + +#include +#include +#include +#include +#include "FUiCtrl_PublicActionEvent.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @class _PublicActionEventArg + * @brief This class is used as the argument to action event listener. + * + * This class is used as the argument to action event listener. When an action event is generated + * (such as when a button is pressed) the ActionEvent calls ActionEventListener's OnActionPerformed + * with an instance of this class as an argument. + * + * From this class, one can find out, the (event) source object and the action ID. + */ +class _OSP_EXPORT_ _PublicActionEventArg + : public IEventArg + , public Object +{ +public: + /** + * This is the default class constructor. + * + * @param[in] source A pointer to the Object instance which contains this instance. + * @param[in] actionId Action Id. + */ + _PublicActionEventArg(int actionId); + + /** + * This is the class destructor. + * + */ + virtual ~_PublicActionEventArg(void); + +public: + /** + * This method returns the actionId which the event initially occurred. + * + * @return See the comment above. + */ + int GetActionId(void) const; + +private: + /** + * Action Id. + */ + int __actionId; +}; // _PublicActionEventArg + +_PublicActionEventArg::_PublicActionEventArg(int actionId) + : __actionId(actionId) +{ + // nothing +} + +_PublicActionEventArg::~_PublicActionEventArg(void) +{ + // nothing +} + +int +_PublicActionEventArg::GetActionId(void) const +{ + return __actionId; +} + +_PublicActionEvent::_PublicActionEvent(const Control& source) + : __pSource(null) +{ + result r = _Event::Initialize(); + + // set event source + if (r == E_SUCCESS) + { + __pSource = &source; + SetLastResult(E_SUCCESS); + } +} + +_PublicActionEvent::~_PublicActionEvent(void) +{ + // nothing +} + +_PublicActionEvent* +_PublicActionEvent::CreateInstanceN(const Control& source) +{ + _PublicActionEvent* pPublicActionEvent = new (std::nothrow) _PublicActionEvent(source); + SysTryReturn(NID_UI_CTRL, pPublicActionEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + if (IsFailed(GetLastResult())) + { + goto CATCH; + } + + return pPublicActionEvent; + +CATCH: + delete pPublicActionEvent; + return null; +} + +const Control* +_PublicActionEvent::GetSource(void) const +{ + return __pSource; +} + +void +_PublicActionEvent::FireImpl(IEventListener& listener, const IEventArg& arg) +{ + // cast to IActionEventListener + IActionEventListener* pActionListener = dynamic_cast (&listener); + SysTryReturnVoidResult(NID_UI_CTRL, pActionListener != null, E_INVALID_ARG, + "[E_INVALID_ARG] The invalid listener was given.\n"); + + // cast to _PublicActionEventArg + const _PublicActionEventArg* pArg = dynamic_cast (&arg); + SysTryReturnVoidResult(NID_UI_CTRL, pArg != null, E_INVALID_ARG, "[E_INVALID_ARG] The invalid Event Argument was given.\n"); + + // call cursor change event listener method + pActionListener->OnActionPerformed(*__pSource, pArg->GetActionId()); + + SetLastResult(E_SUCCESS); + + return; +} + +IEventArg* +_PublicActionEvent::CreateActionEventArgN(int actionId) +{ + _PublicActionEventArg* pEventArg = new (std::nothrow) _PublicActionEventArg(actionId); + SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + return pEventArg; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_PublicAdjustmentEvent.cpp b/src/ui/controls/FUiCtrl_PublicAdjustmentEvent.cpp new file mode 100644 index 0000000..fb88c8b --- /dev/null +++ b/src/ui/controls/FUiCtrl_PublicAdjustmentEvent.cpp @@ -0,0 +1,143 @@ +// +// 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_PublicAdjustmentEvent.cpp + * @brief This is the implementation for the _AdjustmentEvent class. + * + * This file contains the implementation of _AdjustmentEvent class. @n + */ + +#include +#include +#include +#include +#include "FUiCtrl_PublicAdjustmentEvent.h" + +using namespace Tizen::Ui; +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _OSP_EXPORT_ _PublicAdjustmentEventArg + : public IEventArg + , public Object +{ +// Lifecycle +public: + _PublicAdjustmentEventArg(int adjustment); + virtual ~_PublicAdjustmentEventArg(void); + +// Access +public: + int GetAdjustment(void) const; + +// Attribute +private: + int __adjustment; + +}; // _PublicAdjustmentEventArg + +_PublicAdjustmentEventArg::_PublicAdjustmentEventArg(int adjustment) + : __adjustment(adjustment) +{ +} + +_PublicAdjustmentEventArg::~_PublicAdjustmentEventArg(void) +{ +} + +int +_PublicAdjustmentEventArg::GetAdjustment(void) const +{ + return __adjustment; +} + + +_PublicAdjustmentEvent::_PublicAdjustmentEvent(const Control& source) + : __pSource(null) +{ + result r = _Event::Initialize(); + + // set event source + if (r == E_SUCCESS) + { + __pSource = &source; + } +} + +_PublicAdjustmentEvent::~_PublicAdjustmentEvent(void) +{ +} + +_PublicAdjustmentEvent* +_PublicAdjustmentEvent::CreateInstanceN(const Control& source) +{ + _PublicAdjustmentEvent* pPublicAdjustmentEvent = new (std::nothrow) _PublicAdjustmentEvent(source); + SysTryReturn(NID_UI_CTRL, pPublicAdjustmentEvent != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + if (IsFailed(GetLastResult())) + { + goto CATCH; + } + + return pPublicAdjustmentEvent; + +CATCH: + delete pPublicAdjustmentEvent; + pPublicAdjustmentEvent = null; + + return null; +} + +const Control* +_PublicAdjustmentEvent::GetSource(void) const +{ + return __pSource; +} + +void +_PublicAdjustmentEvent::FireImpl(IEventListener& listener, const IEventArg& arg) +{ + // cast to IAdjustmentEventListener + IAdjustmentEventListener* pAdjustmentListener = dynamic_cast (&listener); + SysTryReturnVoidResult(NID_UI_CTRL, pAdjustmentListener != null, E_INVALID_ARG, + "[E_INVALID_ARG] The invalid listener was given."); + + // cast to _PublicAdjustmentEventArg + const _PublicAdjustmentEventArg* pAdjustmentEventArg = dynamic_cast (&arg); + SysTryReturnVoidResult(NID_UI_CTRL, pAdjustmentEventArg != null, E_INVALID_ARG, + "[E_INVALID_ARG] The invalid Event Argument was given."); + + // call cursor change event listener method + pAdjustmentListener->OnAdjustmentValueChanged(*__pSource, pAdjustmentEventArg->GetAdjustment()); + SetLastResult(E_SUCCESS); + return; +} + +IEventArg* +_PublicAdjustmentEvent::CreateAdjustmentEventArgN(int adjustment) +{ + _PublicAdjustmentEventArg* pEventArg = new (std::nothrow) _PublicAdjustmentEventArg(adjustment); + SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + return pEventArg; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_PublicAnimationEvent.cpp b/src/ui/controls/FUiCtrl_PublicAnimationEvent.cpp new file mode 100644 index 0000000..de27b88 --- /dev/null +++ b/src/ui/controls/FUiCtrl_PublicAnimationEvent.cpp @@ -0,0 +1,117 @@ +// +// 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_PublicAnimationEvent.cpp +* @brief This is the implementation for the AnimationEvent class. +*/ + +#include +#include +#include +#include +#include "FUiCtrl_PublicAnimationEvent.h" + +using namespace Tizen::Ui; +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _PublicAnimationEventArg + : public IEventArg + , public Object +{ +public: + _PublicAnimationEventArg(void); + virtual ~_PublicAnimationEventArg(void); +}; // _PublicAnimationEventArg + +_PublicAnimationEventArg::_PublicAnimationEventArg(void) +{ +} + +_PublicAnimationEventArg::~_PublicAnimationEventArg(void) +{ +} + + +_PublicAnimationEvent::_PublicAnimationEvent(const Control& source) + : __pSource(null) +{ + result r = _Event::Initialize(); + + if (r == E_SUCCESS) + { + __pSource = &source; + } +} + +_PublicAnimationEvent::~_PublicAnimationEvent(void) +{ +} + +_PublicAnimationEvent* +_PublicAnimationEvent::CreateInstanceN(const Control& source) +{ + _PublicAnimationEvent* pPublicAnimationEvent = new (std::nothrow) _PublicAnimationEvent(source); + SysTryReturn(NID_UI_CTRL, pPublicAnimationEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + if (IsFailed(GetLastResult())) + { + goto CATCH; + } + + return pPublicAnimationEvent; + +CATCH: + delete pPublicAnimationEvent; + pPublicAnimationEvent = null; + + return null; +} + +const Control* +_PublicAnimationEvent::GetSource(void) const +{ + return __pSource; +} + +void +_PublicAnimationEvent::FireImpl(IEventListener& listener, const IEventArg& arg) +{ + IAnimationEventListener* pAnimationListener = dynamic_cast (&listener); + SysTryReturnVoidResult(NID_UI_CTRL, pAnimationListener != null, E_INVALID_ARG, + "[E_INVALID_ARG] Invalid listener was given."); + + pAnimationListener->OnAnimationStopped(*__pSource); + + SetLastResult(E_SUCCESS); + return; +} + +IEventArg* +_PublicAnimationEvent::CreateAnimationEventArgN(void) +{ + _PublicAnimationEventArg* pEventArg = new (std::nothrow) _PublicAnimationEventArg(); + SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + return pEventArg; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_PublicClipboardPopupEvent.cpp b/src/ui/controls/FUiCtrl_PublicClipboardPopupEvent.cpp new file mode 100644 index 0000000..bb6cdab --- /dev/null +++ b/src/ui/controls/FUiCtrl_PublicClipboardPopupEvent.cpp @@ -0,0 +1,128 @@ +// +// 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_PublicClipboardPopupEvent.cpp + * @brief This is the implementation for the _PublicClipboardPopupEvent class. + * @version 1.0 + */ +#include +#include +#include +#include +#include "FUiCtrl_PublicClipboardPopupEvent.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Ui; + +namespace Tizen { namespace Ui { namespace Controls +{ +/** + * @class _PublicClipboardPopupEventArg + * @brief This class is used as the argument to clipboard-popup event listener. + * + */ +class _PublicClipboardPopupEventArg + : public Tizen::Base::Runtime::IEventArg + , public Tizen::Base::Object +{ +public: + _PublicClipboardPopupEventArg(const ClipboardItem* pClipboardItem); + + virtual ~_PublicClipboardPopupEventArg(void); + + const ClipboardItem* GetClipboardItem(void) const; + +private: + _PublicClipboardPopupEventArg(const _PublicClipboardPopupEventArg& rhs); + _PublicClipboardPopupEventArg& operator =(const _PublicClipboardPopupEventArg& rhs); + +private: + ClipboardItem* __pClipboardItem; +}; // _PublicClipboardPopupEventArg + +_PublicClipboardPopupEventArg::_PublicClipboardPopupEventArg(const ClipboardItem* pClipboardItem) + : __pClipboardItem(const_cast (pClipboardItem)) +{ +} + +_PublicClipboardPopupEventArg::~_PublicClipboardPopupEventArg(void) +{ +} + +const ClipboardItem* +_PublicClipboardPopupEventArg::GetClipboardItem(void) const +{ + return __pClipboardItem; +} + +_PublicClipboardPopupEvent* +_PublicClipboardPopupEvent::CreateInstanceN(void) +{ + _PublicClipboardPopupEvent* pPublicClipboardPopupEvent = new (std::nothrow) _PublicClipboardPopupEvent(); + SysTryReturn(NID_UI_CTRL, pPublicClipboardPopupEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + + result r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + SetLastResult(E_SUCCESS); + + return pPublicClipboardPopupEvent; + +CATCH: + delete pPublicClipboardPopupEvent; + return null; +} + +IEventArg* +_PublicClipboardPopupEvent::CreateClipboardPopupEventArgN(const ClipboardItem* pClipboardItem) +{ + _PublicClipboardPopupEventArg* pEventArg = new (std::nothrow) _PublicClipboardPopupEventArg(pClipboardItem); + SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + + SetLastResult(E_SUCCESS); + + return pEventArg; +} + +_PublicClipboardPopupEvent::~_PublicClipboardPopupEvent(void) +{ +} + +void +_PublicClipboardPopupEvent::FireImpl(IEventListener& listener, const IEventArg& arg) +{ + IClipboardPopupEventListener* pEventListener = dynamic_cast (&listener); + SysTryReturnVoidResult(NID_UI_CTRL, pEventListener, E_INVALID_ARG, "[E_INVALID_ARG] A specified input parameter is invalid."); + + const _PublicClipboardPopupEventArg* pArg = dynamic_cast (&arg); + SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_INVALID_ARG, "[E_INVALID_ARG] A specified input parameter is invalid."); + + pEventListener->OnClipboardPopupClosed(pArg->GetClipboardItem()); + + SetLastResult(E_SUCCESS); +} + +_PublicClipboardPopupEvent::_PublicClipboardPopupEvent(void) +{ + result r = _Event::Initialize(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + SetLastResult(E_SUCCESS); +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_PublicColorChangeEvent.cpp b/src/ui/controls/FUiCtrl_PublicColorChangeEvent.cpp new file mode 100644 index 0000000..e0d2cd1 --- /dev/null +++ b/src/ui/controls/FUiCtrl_PublicColorChangeEvent.cpp @@ -0,0 +1,131 @@ +// +// 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_PublicColorChangeEvent.cpp + * @brief This is the implementation for the _PublicColorChangeEvent class. + * + * This file contains the implementation of _PublicColorChangeEvent class. @n + */ + +#include +#include +#include +#include +#include +#include "FUiCtrl_PublicColorChangeEvent.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _OSP_EXPORT_ _PublicColorChangeEventArg + : public Tizen::Base::Runtime::IEventArg + , public Tizen::Base::Object +{ +public: + _PublicColorChangeEventArg(const Color& color) + : __color(color) + { + } + + virtual ~_PublicColorChangeEventArg(void) + { + } + + const Color GetColor(void) const + { + return __color; + } + +private: + Color __color; +}; // _PublicColorChangeEventArg + +_PublicColorChangeEvent::_PublicColorChangeEvent(const Control& source) + : __pSource(null) +{ + result r = _Event::Initialize(); + + // set event source + if (r == E_SUCCESS) + { + __pSource = &source; + } +} + +_PublicColorChangeEvent::~_PublicColorChangeEvent(void) +{ +} + +const Control* +_PublicColorChangeEvent::GetSource(void) const +{ + return (__pSource); +} + +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] 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] Invalid argument is used. The _PublicColorChangeEventArg instance is null."); + + pColorChangeListener->OnColorChanged(*__pSource, Color(pArg->GetColor())); + + return; +} + +_PublicColorChangeEvent* +_PublicColorChangeEvent::CreateInstanceN(const Control& source) +{ + _PublicColorChangeEvent* pCoreColorChangeEvent = new (std::nothrow) _PublicColorChangeEvent(source); + SysTryReturn(NID_UI_CTRL, pCoreColorChangeEvent != null, null, E_OUT_OF_MEMORY, + "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + if (IsFailed(GetLastResult())) + { + goto CATCH; + } + + return pCoreColorChangeEvent; + +CATCH: + delete pCoreColorChangeEvent; + return null; + +} + +IEventArg* +_PublicColorChangeEvent::CreateColorChangeEventArgN(const Color& color) +{ + _PublicColorChangeEventArg* pEventArg = new (std::nothrow) _PublicColorChangeEventArg(color); + SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, + "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + return pEventArg; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_PublicDateTimeChangeEvent.cpp b/src/ui/controls/FUiCtrl_PublicDateTimeChangeEvent.cpp new file mode 100644 index 0000000..3a2278a --- /dev/null +++ b/src/ui/controls/FUiCtrl_PublicDateTimeChangeEvent.cpp @@ -0,0 +1,215 @@ +// +// 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_PublicDateTimeChangeEvent.cpp + * @brief This is the implementation file for the _PublicDateTimeChangeEvent and _PublicDateTimeChangeEventArg classes. + */ + +#include +#include +#include +#include +#include +#include +#include "FUiCtrl_PublicDateTimeChangeEvent.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; +using namespace Tizen::System; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_PublicDateTimeChangeEventArg::_PublicDateTimeChangeEventArg(DateTimePublicChangeStatus status) + : __status(status) + , __year(1) + , __month(1) + , __day(1) + , __hour(0) + , __minute(0) +{ + SystemTime::GetCurrentTime(TIME_MODE_WALL, __dateTime1); +} + +_PublicDateTimeChangeEventArg::~_PublicDateTimeChangeEventArg(void) +{ + // Nothing. +} + +void +_PublicDateTimeChangeEventArg::SetDateTime(const Tizen::Base::DateTime& dateTime) +{ + __dateTime1 = dateTime; + + return; +} + +int +_PublicDateTimeChangeEventArg::GetYear(void) const +{ + return __year; +} + +int +_PublicDateTimeChangeEventArg::GetMonth(void) const +{ + return __month; +} + +int +_PublicDateTimeChangeEventArg::GetDay(void) const +{ + return __day; +} + +int +_PublicDateTimeChangeEventArg::GetHour(void) const +{ + return __hour; +} + +int +_PublicDateTimeChangeEventArg::GetMinute(void) const +{ + return __minute; +} + +Tizen::Base::DateTime +_PublicDateTimeChangeEventArg::GetDateTime(void) const +{ + return __dateTime1; +} + +DateTimePublicChangeStatus +_PublicDateTimeChangeEventArg::GetStatus(void) const +{ + return __status; +} + +void +_PublicDateTimeChangeEventArg::SetTime(int hour, int minute) +{ + __hour = hour; + __minute = minute; + + return; +} + +void +_PublicDateTimeChangeEventArg::SetDate(int year, int month, int day) +{ + __year = year; + __month = month; + __day = day; + + return; +} + +//////////////////////////////////////////////////////////////////////////////// +/// _PublicDateTimeChangeEventArg class end + +_PublicDateTimeChangeEvent::_PublicDateTimeChangeEvent(const Tizen::Ui::Control& source) + : __pSource(null) +{ + result r = _Event::Initialize(); + + if (r == E_SUCCESS) + { + __pSource = const_cast(&source); + } +} + +_PublicDateTimeChangeEvent::~_PublicDateTimeChangeEvent(void) +{ + // Nothing. +} + +void +_PublicDateTimeChangeEvent::FireImpl(IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg) +{ + const _PublicDateTimeChangeEventArg* pArg = dynamic_cast (&arg); + SysTryReturnVoidResult(NID_UI_CTRL, (pArg != null), E_INVALID_ARG, + "[E_INVALID_ARG] Invalid argument(s) is used. The instance of _PublicDateTimeChangeEventArg is null."); + + DateTimePublicChangeStatus status = pArg->GetStatus(); + if ((status == DATETIME_PUBLIC_CHANGE_SAVED) || (status == DATETIME_PUBLIC_CHANGE_CANCELED)) + { + IDateTimeChangeEventListener* pChangeEventListener = dynamic_cast (&listener); + SysTryReturnVoidResult(NID_UI_CTRL, (pChangeEventListener != null), E_INVALID_ARG, + "[E_INVALID_ARG] Invalid argument(s) is used. The instance of IDateTimeChangeEventListener is null."); + + if (status == DATETIME_PUBLIC_CHANGE_SAVED) + { + pChangeEventListener->OnDateTimeChanged(*__pSource, pArg->GetYear(), pArg->GetMonth(), pArg->GetDay(), + pArg->GetHour(), pArg->GetMinute()); + } + else + { + pChangeEventListener->OnDateTimeChangeCanceled(*__pSource); + } + } + else if ((status == DATE_PUBLIC_CHANGE_SAVED) || (status == DATE_PUBLIC_CHANGE_CANCELED)) + { + IDateChangeEventListener* pChangeEventListener = dynamic_cast (&listener); + SysTryReturnVoidResult(NID_UI_CTRL, (pChangeEventListener != null), E_INVALID_ARG, + "[E_INVALID_ARG] Invalid argument(s) is used. The instance of IDateChangeEventListener is null."); + + if (status == DATE_PUBLIC_CHANGE_SAVED) + { + pChangeEventListener->OnDateChanged(*__pSource, pArg->GetYear(), pArg->GetMonth(), pArg->GetDay()); + } + else + { + pChangeEventListener->OnDateChangeCanceled(*__pSource); + } + } + else if ((status == TIME_PUBLIC_CHANGE_SAVED) || (status == TIME_PUBLIC_CHANGE_CANCELED)) + { + ITimeChangeEventListener* pChangeEventListener = dynamic_cast (&listener); + SysTryReturnVoidResult(NID_UI_CTRL, (pChangeEventListener != null), E_INVALID_ARG, + "[E_INVALID_ARG] Invalid argument(s) is used. The instance of ITimeChangeEventListener is null."); + + if (status == TIME_PUBLIC_CHANGE_SAVED) + { + pChangeEventListener->OnTimeChanged(*__pSource, pArg->GetHour(), pArg->GetMinute()); + } + else + { + pChangeEventListener->OnTimeChangeCanceled(*__pSource); + } + } + SetLastResult(E_SUCCESS); + return; +} + +const Tizen::Ui::Control* +_PublicDateTimeChangeEvent::GetSource(void) const +{ + return __pSource; +} + +Tizen::Base::Runtime::IEventArg* +_PublicDateTimeChangeEvent::CreateDateTimeChangeEventArgN(DateTimePublicChangeStatus status) +{ + _PublicDateTimeChangeEventArg* pEventArg = new (std::nothrow) _PublicDateTimeChangeEventArg(status); + SysTryReturn(NID_UI_CTRL, (pEventArg != null), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + return pEventArg; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_PublicExpandableEditAreaEvent.cpp b/src/ui/controls/FUiCtrl_PublicExpandableEditAreaEvent.cpp new file mode 100644 index 0000000..a3433d4 --- /dev/null +++ b/src/ui/controls/FUiCtrl_PublicExpandableEditAreaEvent.cpp @@ -0,0 +1,205 @@ +// +// 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_PublicExpandableEditAreaEvent.cpp +* @brief This is the implementation for the _PublicExpandableEditAreaEvent class. +* +* This file contains implementation of _PublicExpandableEditAreaEvent class. +*/ + +// includes +#include +#include +#include +#include +#include "FUiCtrl_PublicExpandableEditAreaEvent.h" + +// using namespace +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; + +namespace Tizen {namespace Ui {namespace Controls +{ +/** + * @class _PublicExpandableEditAreaEventArg + * @brief This class is used as the argument to action event listener. + * + * This class is used as the argument to action event listener. When an action event is generated + * (such as when a button is pressed) the ExpandableEditAreaEvent calls ExpandableEditAreaEventListener's OnActionPerformed + * with an instance of this class as an argument. + * + * From this class, one can find out, the (event) source object and the action ID. + */ +class _OSP_EXPORT_ _PublicExpandableEditAreaEventArg + : public Tizen::Base::Runtime::IEventArg + , public Tizen::Base::Object +{ +// Lifecycle +public: + /** + * This is the default class constructor. + * + * @param[in] source A pointer to the Object instance which contains this instance. + * @param[in] actionId Action Id. + */ + _PublicExpandableEditAreaEventArg(ExpandableEditAreaEventStatus status, int selectedTokenIndex = -1); + + /** + * This is the class destructor. + * + */ + virtual ~_PublicExpandableEditAreaEventArg(void); + + +// Access +public: + /** + * This method returns the ExpandableEditAreaEventStatus which the event initially occurred. + * + * @return See the comment above. + */ + ExpandableEditAreaEventStatus GetStatus(void) const; + + int GetNewLineCount(void) const; + + +// Attribute +private: + /** + * ExpandableEditAreaEventStatus. + */ + ExpandableEditAreaEventStatus __status; + + int __newLineCount; +}; // _PublicExpandableEditAreaEventArg + +_PublicExpandableEditAreaEventArg::_PublicExpandableEditAreaEventArg(ExpandableEditAreaEventStatus status, int newLineCount) + : __status(status) + , __newLineCount(newLineCount) +{ + // nothing +} + +_PublicExpandableEditAreaEventArg::~_PublicExpandableEditAreaEventArg(void) +{ + // nothing +} + +//////////////////////////////////////////////////////////////////////////////// +/// _ExpandableEditAreaEventArg class Access +ExpandableEditAreaEventStatus +_PublicExpandableEditAreaEventArg::GetStatus(void) const +{ + return __status; +} + +int +_PublicExpandableEditAreaEventArg::GetNewLineCount(void) const +{ + return __newLineCount; +} + + +//////////////////////////////////////////////////////////////////////////////// +/// _PublicExpandableEditAreaEvent class Lifecycle +_PublicExpandableEditAreaEvent::_PublicExpandableEditAreaEvent(const Tizen::Ui::Control& source) + : __pSource(null) +{ + result r = _Event::Initialize(); + + // set event source + if (r == E_SUCCESS) + { + __pSource = &source; + } +} + +_PublicExpandableEditAreaEvent::~_PublicExpandableEditAreaEvent(void) +{ + // nothing +} + +_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 allocation failed."); + + if (IsFailed(GetLastResult())) + { + goto CATCH; + } + + return pPublicExpandableEditAreaEvent; + +CATCH: + delete pPublicExpandableEditAreaEvent; + return null; +} + +//////////////////////////////////////////////////////////////////////////////// +/// _WindowEvent class Accessor + +const Tizen::Ui::Control* +_PublicExpandableEditAreaEvent::GetSource(void) const +{ + return __pSource; +} + +//////////////////////////////////////////////////////////////////////////////// +/// _PublicExpandableEditAreaEvent class Operation + +void +_PublicExpandableEditAreaEvent::FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg) +{ + // cast to IExpandableEditAreaEventListener + IExpandableEditAreaEventListener* pExpandableEditAreaEventListener = + dynamic_cast (&listener); + SysTryReturnVoidResult(NID_UI_CTRL, pExpandableEditAreaEventListener != null, E_INVALID_ARG, + "[E_INVALID_ARG] The invalid listener was given.\n"); + + // cast to _PublicExpandableEditAreaEventArg + const _PublicExpandableEditAreaEventArg* pArg = dynamic_cast (&arg); + 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(); + if (status == EXPANDABLE_EDITAREA_EVENT_ADDED) + { + pExpandableEditAreaEventListener->OnExpandableEditAreaLineAdded(*dynamic_cast (const_cast (__pSource)), + pArg->GetNewLineCount()); + } + else if (status == EXPANDABLE_EDITAREA_EVENT_REMOVED) + { + pExpandableEditAreaEventListener->OnExpandableEditAreaLineRemoved(*dynamic_cast (const_cast (__pSource)), + pArg->GetNewLineCount()); + } + SetLastResult(E_SUCCESS); + + return; +} + +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 allocation failed."); + + return pEventArg; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_PublicFrameEvent.cpp b/src/ui/controls/FUiCtrl_PublicFrameEvent.cpp new file mode 100644 index 0000000..b510cb7 --- /dev/null +++ b/src/ui/controls/FUiCtrl_PublicFrameEvent.cpp @@ -0,0 +1,194 @@ +// +// 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_PublicFrameEvent.cpp + * @brief This is the implementation for the _PublicFrameEvent class. + * @version 1.0 + */ + +#include +#include +#include +#include +#include +#include "FUiCtrl_PublicFrameEvent.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; + +namespace Tizen { namespace Ui { namespace Controls +{ +/** + * @class _PublicFrameEventArg + * @brief This class is used as an argument of event listener's method. + * + * This class is used as an argument of event listener's method. When frame event is generated, + * the @c _PublicFrameEvent instance calls WindowEventListener's method with instance of this class as an argument. + */ +class _PublicFrameEventArg + : public Tizen::Base::Object + , public Tizen::Base::Runtime::IEventArg +{ +public: +// Lifecycle + /** + * This is the default class constructor. + * + * @param[in] source A pointer to the Frame instance which contains this instance. + * @param[in] frameState The frame event type. + */ + _PublicFrameEventArg(const Frame& source, int frameState); + + /** + * This is the class destructor. + * + */ + virtual ~_PublicFrameEventArg(void); + +// Accessor + /** + * This method returns the Window object which the event initially occurred. + * + * @return See the comment above. + * + */ + const Frame* GetSource(void) const; + + /** + * This method returns the event type of frame event. + * + * @return See the comment above. + */ + int GetType(void) const; + +private: +// Attribute + Frame* __pSource; + int __frameState; +}; // _PublicFrameEventArg + +_PublicFrameEventArg::_PublicFrameEventArg(const Frame& source, int frameState) + : __pSource(const_cast (&source)) + , __frameState(frameState) +{ +} + +_PublicFrameEventArg::~_PublicFrameEventArg(void) +{ +} + +const Frame* +_PublicFrameEventArg::GetSource(void) const +{ + return __pSource; +} + +int +_PublicFrameEventArg::GetType(void) const +{ + return __frameState; +} + +_PublicFrameEvent* +_PublicFrameEvent::CreateInstanceN(const Frame& source) +{ + _PublicFrameEvent* pPublicFrameEvent = new (std::nothrow) _PublicFrameEvent(source); + SysTryReturn(NID_UI_CTRL, pPublicFrameEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + if (IsFailed(GetLastResult())) + { + goto CATCH; + } + + SetLastResult(E_SUCCESS); + + return pPublicFrameEvent; + +CATCH: + delete pPublicFrameEvent; + return null; +} + +IEventArg* +_PublicFrameEvent::CreateFrameEventArgN(const Frame& source, int frameState) +{ + _PublicFrameEventArg* pEventArg = new (std::nothrow) _PublicFrameEventArg(source, frameState); + SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + SetLastResult(E_SUCCESS); + + return pEventArg; +} + +_PublicFrameEvent::~_PublicFrameEvent(void) +{ +} + +const Frame* +_PublicFrameEvent::GetSource(void) const +{ + return __pSource; +} + +void +_PublicFrameEvent::FireImpl(IEventListener& listener, const IEventArg& arg) +{ + IFrameEventListener* pFrameListener = dynamic_cast (&listener); + SysTryReturnVoidResult(NID_UI_CTRL, pFrameListener, E_INVALID_ARG, "[E_INVALID_ARG] The invalid listener was given."); + + const _PublicFrameEventArg* pArg = static_cast (&arg); + SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_INVALID_ARG, "[E_INVALID_ARG] The invalid event argument was given."); + + int type = pArg->GetType(); + switch (type) + { + case FRAME_STATE_TERMINATING : + pFrameListener->OnFrameTerminating(*pArg->GetSource()); + break; + case FRAME_STATE_ACTIVATED : + pFrameListener->OnFrameActivated(*pArg->GetSource()); + break; + case FRAME_STATE_DEACTIVATED : + pFrameListener->OnFrameDeactivated(*pArg->GetSource()); + break; + case FRAME_STATE_MINIMIZED: + pFrameListener->OnFrameMinimized(*pArg->GetSource()); + break; + case FRAME_STATE_RESTORED: + pFrameListener->OnFrameRestored(*pArg->GetSource()); + break; + default : + SysLogException(NID_UI_CTRL, E_INVALID_ARG, "[E_INVALID_ARG] The invalid event argument was given."); + break; + } + + SetLastResult(E_SUCCESS); + + return; +} + +_PublicFrameEvent::_PublicFrameEvent(const Frame& source) + : __pSource(null) +{ + result r = _Event::Initialize(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pSource = &source; + ClearLastResult(); +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_PublicKeypadEvent.cpp b/src/ui/controls/FUiCtrl_PublicKeypadEvent.cpp new file mode 100644 index 0000000..1bbf0f3 --- /dev/null +++ b/src/ui/controls/FUiCtrl_PublicKeypadEvent.cpp @@ -0,0 +1,221 @@ +// +// 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_PublicKeypadEvent.cpp +* @brief This is the implementation for the _PublicKeypadEvent class. +* +* This file contains implementation of _PublicKeypadEvent class. +*/ + +// Includes +#include +#include +#include +#include "FUiCtrl_PublicKeypadEvent.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; + +namespace Tizen {namespace Ui {namespace Controls +{ + +/** + * @class + * @brief This class is used as the argument to change event listener. + * + * This class is used as the argument to change event listener. When an change event is generated + * (such as when a button is pressed) the TextSelectionEvent calls TextSelectionEventListener's OnTextd + * with an instance of this class as an argument. + * + * From this class, one can find out, the (event) source object and the change ID. + */ +class _OSP_EXPORT_ _PublicKeypadEventArg + : public IEventArg + , public Object +{ +// Lifecycle +public: + /** + * This is the default class constructor. + * + * @param[in] source A pointer to the Object instance which contains this instance. + */ + _PublicKeypadEventArg(const Control& source, KeypadAction actionId, KeypadEventStatus status); + + /** + * This is the class destructor. + * + */ + virtual ~_PublicKeypadEventArg(void); + + +// Access +public: + /** + * This method returns the object which the event initially occurred. + * + * @return The object which the event initially occurred. + */ + const Control* GetSource(void) const; + + KeypadAction GetKeypadActionId() const; + + KeypadEventStatus GetStatus() const; + +// Attribute +private: + /** + * Event source. + */ + const Control* __pSource; + + /** + * Event source. + */ + KeypadAction __actionId; + + /** + * status. + */ + KeypadEventStatus __status; +}; // _PublicKeypadEventArg + +//////////////////////////////////////////////////////////////////////////////// +/// __TextSelectionEventArg class Lifecycle + +_PublicKeypadEventArg::_PublicKeypadEventArg(const Control& source, KeypadAction actionId, Controls::KeypadEventStatus status) +{ + __pSource = &source; + __actionId = actionId; + __status = status; +} + +_PublicKeypadEventArg::~_PublicKeypadEventArg(void) +{ + // Nothing. +} + +const Control* +_PublicKeypadEventArg::GetSource(void) const +{ + return __pSource; +} + +KeypadAction +_PublicKeypadEventArg::GetKeypadActionId(void) const +{ + return __actionId; +} + +KeypadEventStatus +_PublicKeypadEventArg::GetStatus() const +{ + return __status; +} + +//////////////////////////////////////////////////////////////////////////////// +/// __TextSelectionEvent class Lifecycle +_PublicKeypadEvent::_PublicKeypadEvent(const Control& source) + : __pSource(null) +{ + result r = _Event::Initialize(); + + // set event source + if (r == E_SUCCESS) + __pSource = &source; +} + +_PublicKeypadEvent::~_PublicKeypadEvent(void) +{ + // Nothing. +} + +_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 allocation failed."); + + return pPublicKeypadEvent; +} + +const Control* +_PublicKeypadEvent::GetSource(void) const +{ + return __pSource; +} + +// Operations + +void +_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."); + + const _PublicKeypadEventArg* pKeypadEventArg = dynamic_cast (&arg); + SysTryReturnVoidResult(NID_UI_CTRL, pKeypadEventArg != null, E_INVALID_ARG, + "[E_INVALID_ARG] The invalid Event Argument was given."); + + Control* tempSource = null; + tempSource = const_cast (pKeypadEventArg->GetSource()); + KeypadAction keypadAction = pKeypadEventArg->GetKeypadActionId(); + + Controls::KeypadEventStatus status = pKeypadEventArg->GetStatus(); + switch (status) + { + case KEYPAD_EVENT_STATUS_CREATED: + pKeypadEventListener->OnKeypadWillOpen(*tempSource); + break; + + case KEYPAD_EVENT_STATUS_OPEN: + pKeypadEventListener->OnKeypadOpened(*tempSource); + break; + + case KEYPAD_EVENT_STATUS_CLOSE: + pKeypadEventListener->OnKeypadClosed(*tempSource); + break; + + case KEYPAD_EVENT_STATUS_BOUNDS_CHANGED: + pKeypadEventListener->OnKeypadBoundsChanged(*tempSource); + break; + + case KEYPAD_EVENT_STATUS_ENTERACTION: + pKeypadEventListener->OnKeypadActionPerformed(*tempSource, keypadAction); + break; + + default: + break; + } + + SetLastResult(E_SUCCESS); + + return; +} + +Tizen::Base::Runtime::IEventArg* +_PublicKeypadEvent::CreateKeypadEventArgN(const Tizen::Ui::Control& source, Tizen::Ui::KeypadAction actionId, + 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 allocation failed."); + + return pEventArg; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_PublicLanguageEvent.cpp b/src/ui/controls/FUiCtrl_PublicLanguageEvent.cpp new file mode 100644 index 0000000..67c9dca --- /dev/null +++ b/src/ui/controls/FUiCtrl_PublicLanguageEvent.cpp @@ -0,0 +1,200 @@ +// +// 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_PublicLanguageEvent.cpp + * @brief This is the implementation for the _LanguageEvent class. + * @version 2.0 + */ + +// includes +#include +#include +#include +#include +#include "FUiCtrl_PublicLanguageEvent.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Locales; + +namespace Tizen { namespace Ui { namespace Controls +{ +/** +* @class _LanguageEventArg +* @brief This class is used as an argument of event listener's method. +* +* This class is used as an argument of event listener's method. When language event is generated, +* the @c languageEvent instance calls @c languageEventListener's method with instance of this class as an argument. +* +*/ +class _OSP_EXPORT_ _PublicLanguageEventArg + : public Object + , public IEventArg +{ +// Lifecycle +public: + /** + * This is the default class constructor. + * + * @param[in] source A pointer to the Window instance which contains this instance. + * @param[in] prevLanguageCode the key code of the event initially occurs. + * @param[in] currentLanguageCode the key state of the event initially occurs. + */ + _PublicLanguageEventArg(const Control& source, LanguageCode prevLanguageCode, LanguageCode currentLanguageCode); + + + /** + * This is the class destructor. + * + */ + virtual ~_PublicLanguageEventArg(void); + + +// Access +public: + /** + * This method returns the object which the event initially occurs. + * + * @return The object which the event initially occurs. + */ + const Control* GetSource(void) const; + + + /** + * This method returns a previous language code. + * + * @return See the comment above. + * + */ + LanguageCode GetPreviousLanguageCode(void) const; + + /** + * This method returns a current language code. + * + * @return See the comment above. + * + */ + LanguageCode GetCurrentLanguageCode(void) const; + +// Attribute +private: + const Control* __pSource; + LanguageCode __prevLanguageCode; + LanguageCode __currentLanguageCode; +}; // _PublicLanguageEventArg + +_PublicLanguageEventArg::_PublicLanguageEventArg(const Control& source, LanguageCode prevLanguageCode, LanguageCode currentLanguageCode) + : __pSource(&source) + , __prevLanguageCode(prevLanguageCode) + , __currentLanguageCode(currentLanguageCode) +{ + +} + +_PublicLanguageEventArg::~_PublicLanguageEventArg(void) +{ + // Nothing. +} + +const Control* +_PublicLanguageEventArg::GetSource(void) const +{ + return __pSource; +} + +LanguageCode +_PublicLanguageEventArg::GetCurrentLanguageCode(void) const +{ + return __currentLanguageCode; +} + +LanguageCode +_PublicLanguageEventArg::GetPreviousLanguageCode(void) const +{ + return __prevLanguageCode; +} + +//////////////////////////////////////////////////////////////////////////////// +/// _FocusEvent class Lifecycle + +_PublicLanguageEvent::_PublicLanguageEvent(const Control& source) + : __pSource(null) +{ + result r = _Event::Initialize(); + + // set event source + if (r == E_SUCCESS) + __pSource = &source; +} + + +_PublicLanguageEvent::~_PublicLanguageEvent() +{ + // NOTHING +} + +_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 allocation failed."); + + return pPublicLanguageEvent; +} + +const Control* +_PublicLanguageEvent::GetSource(void) const +{ + return __pSource; +} + +void +_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."); + + const _PublicLanguageEventArg* pLanguageEventArg = dynamic_cast (&arg); + SysTryReturnVoidResult(NID_UI_CTRL, pLanguageEventArg != null, E_INVALID_ARG, + "[E_INVALID_ARG] The invalid Event Argument was given."); + + Control* tempSource = null; + tempSource = const_cast (pLanguageEventArg->GetSource()); + + LanguageCode currentLanguageCode = pLanguageEventArg->GetCurrentLanguageCode(); + LanguageCode previousLanguageCode = pLanguageEventArg->GetPreviousLanguageCode(); + + pLanguageEventListener->OnLanguageChanged(*tempSource, currentLanguageCode, previousLanguageCode); + + SetLastResult(E_SUCCESS); + + return; +} + +IEventArg* +_PublicLanguageEvent::CreateLanguageEventArgN(const Control& source, LanguageCode prevLanguageCode, + LanguageCode currentLanguageCode) +{ + _PublicLanguageEventArg* pLanguageEventArg = new (std::nothrow) _PublicLanguageEventArg(source, prevLanguageCode, + currentLanguageCode); + SysTryReturn(NID_UI_CTRL, pLanguageEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + return pLanguageEventArg; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_PublicLinkEvent.cpp b/src/ui/controls/FUiCtrl_PublicLinkEvent.cpp new file mode 100644 index 0000000..8c981b4 --- /dev/null +++ b/src/ui/controls/FUiCtrl_PublicLinkEvent.cpp @@ -0,0 +1,201 @@ +// +// 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_PublicLinkEvent.cpp +* @brief This is the implementation for the _PublicLinkEvent class. +* @version 1.0 +*/ + +// includes +#include +#include +#include +#include "FUiCtrl_PublicLinkEvent.h" + + +// using namespace +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @class _PublicLinkEventArg + * @brief This class is used as the argument to change event listener. + * + * This class is used as the argument to change event listener. When an change event is generated + * (such as when a button is pressed) the TextSelectionEvent calls TextSelectionEventListener's OnTextd + * with an instance of this class as an argument. + * + * From this class, one can find out, the (event) source object and the change ID. + */ +class _OSP_EXPORT_ _PublicLinkEventArg + : public Tizen::Base::Runtime::IEventArg + , public Tizen::Base::Object +{ +// Lifecycle +public: + /** + * This is the default class constructor. + * + */ + _PublicLinkEventArg(const Tizen::Base::String& text, Tizen::Base::Utility::LinkType linkType, const Tizen::Base::String& link); + + /** + * This is the class destructor. + * + */ + virtual ~_PublicLinkEventArg(void); + + /** + * Gets the text. + * + * @return The text. + */ + Tizen::Base::String GetText(void) const; + + /** + * Gets the link type. + * + * @return The link type. + */ + Tizen::Base::Utility::LinkType GetLinkType(void) const; + + /** + * Gets the link text. + * + * @return The link text. + */ + Tizen::Base::String GetLinkText(void) const; + + +private: + /** + * The text. + */ + Tizen::Base::String __text; + + /** + * The linktype. + */ + Tizen::Base::Utility::LinkType __linkType; + + /** + * The link text. + */ + Tizen::Base::String __linkText; +}; // _PublicLinkEventArg + +//////////////////////////////////////////////////////////////////////////////// +/// _PublicLinkEventArg class Lifecycle + +_PublicLinkEventArg::_PublicLinkEventArg(const Tizen::Base::String& text, Tizen::Base::Utility::LinkType linkType, const Tizen::Base::String& link) + : __text(text) + , __linkType(linkType) + , __linkText(link) +{ + // Nothing. +} + +_PublicLinkEventArg::~_PublicLinkEventArg(void) +{ + // Nothing. +} + +Tizen::Base::String +_PublicLinkEventArg::GetText(void) const +{ + return __text; +} + +Tizen::Base::Utility::LinkType +_PublicLinkEventArg::GetLinkType(void) const +{ + return __linkType; +} + +Tizen::Base::String +_PublicLinkEventArg::GetLinkText(void) const +{ + return __linkText; +} + +//////////////////////////////////////////////////////////////////////////////// +/// _PublicLinkEvent class Lifecycle +_PublicLinkEvent::_PublicLinkEvent(const Tizen::Ui::Control& source) + : __pSource(null) +{ + result r = _Event::Initialize(); + + // Set event source + if (r == E_SUCCESS) + { + __pSource = &source; + } +} + +_PublicLinkEvent::~_PublicLinkEvent(void) +{ + // Nothing. +} + +_PublicLinkEvent* +_PublicLinkEvent::CreateInstanceN(const Tizen::Ui::Control& source) +{ + _PublicLinkEvent* pPublicLinkEvent = new (std::nothrow) _PublicLinkEvent(source); + SysTryReturn(NID_UI_CTRL, pPublicLinkEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + return pPublicLinkEvent; +} + +const Tizen::Ui::Control* +_PublicLinkEvent::GetSource(void) const +{ + return __pSource; +} + +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, "[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, "[E_INVALID_ARG] The Invalid Event Argument is given."); + + const Tizen::Base::String text = pLinkEventArg->GetText(); + Tizen::Base::Utility::LinkType linkType = pLinkEventArg->GetLinkType(); + const Tizen::Base::String linkText = pLinkEventArg->GetLinkText(); + + pLinkEventListener->OnLinkClicked(const_cast (*__pSource), text, linkType, linkText); + + SetLastResult(E_SUCCESS); + + return; +} + +IEventArg* +_PublicLinkEvent::CreateLinkEventArgN(Tizen::Base::String text, Tizen::Base::Utility::LinkType linkType, Tizen::Base::String link) +{ + _PublicLinkEventArg* pEventArg = new (std::nothrow) _PublicLinkEventArg(text, linkType, link); + SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + return pEventArg; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_PublicProgressPopupEvent.cpp b/src/ui/controls/FUiCtrl_PublicProgressPopupEvent.cpp new file mode 100644 index 0000000..b05ff53 --- /dev/null +++ b/src/ui/controls/FUiCtrl_PublicProgressPopupEvent.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 FUiCtrl_PublicProgressPopupEvent.cpp + * @brief This is the implementation for the _PublicProgressPopupEvent class. + */ + +#include +#include +#include +#include +#include "FUiCtrl_PublicProgressPopupEvent.h" + + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; + + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @class _PublicProgressPopupEventArg + * @brief This class is used as the argument to progresspopup event listener. + * + */ +class _OSP_EXPORT_ _PublicProgressPopupEventArg + : public Object + , public IEventArg +{ +public: + _PublicProgressPopupEventArg(void); + virtual ~_PublicProgressPopupEventArg(void); + +}; // _PublicProgressPopupEventArg + + +_PublicProgressPopupEventArg::_PublicProgressPopupEventArg(void) +{ + // empty statement +} + +_PublicProgressPopupEventArg::~_PublicProgressPopupEventArg(void) +{ + // empty statement +} + + + +_PublicProgressPopupEvent::_PublicProgressPopupEvent(const Tizen::Ui::Control& source) + : __pSource(null) +{ + result r = _Event::Initialize(); + + // set event source + if (r == E_SUCCESS) + { + __pSource = &source; + SetLastResult(E_SUCCESS); + } +} + +_PublicProgressPopupEvent::~_PublicProgressPopupEvent(void) +{ + // empty statement +} + +_PublicProgressPopupEvent* +_PublicProgressPopupEvent::CreateInstanceN(const Control& source) +{ + _PublicProgressPopupEvent* pPublicProgressPopupEvent = new (std::nothrow) _PublicProgressPopupEvent(source); + SysTryReturn(NID_UI_CTRL, pPublicProgressPopupEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + if (IsFailed(GetLastResult())) + { + goto CATCH; + } + + return pPublicProgressPopupEvent; + +CATCH: + delete pPublicProgressPopupEvent; + return null; +} + +const Control* +_PublicProgressPopupEvent::GetSource(void) const +{ + return __pSource; +} + +void +_PublicProgressPopupEvent::FireImpl(IEventListener& pListener, const IEventArg& arg) +{ + // cast to IProgressPopupEventListener + IProgressPopupEventListener* pProgressPopupListener = dynamic_cast (&pListener); + SysTryReturnVoidResult(NID_UI_CTRL, pProgressPopupListener != null, E_INVALID_ARG, + "[E_INVALID_ARG] The invalid listener was given."); + + // cast to _PublicProgressPopupEventArg +// const _PublicProgressPopupEventArg* pArg = dynamic_cast (&arg); +// SysTryReturn(NID_UI_CTRL, pArg != null, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The invalid Event Argument was given."); + + // call progresspopup event listener method + pProgressPopupListener->OnProgressPopupCanceled(); +} + +IEventArg* +_PublicProgressPopupEvent::CreateProgressPopupEventArgN(void) +{ + _PublicProgressPopupEventArg* pEventArg = new (std::nothrow) _PublicProgressPopupEventArg(); + SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + return pEventArg; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_PublicScrollPanelEvent.cpp b/src/ui/controls/FUiCtrl_PublicScrollPanelEvent.cpp new file mode 100644 index 0000000..a2b10f7 --- /dev/null +++ b/src/ui/controls/FUiCtrl_PublicScrollPanelEvent.cpp @@ -0,0 +1,184 @@ +// +// 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_PublicScrollPanelEvent.cpp +* @brief This is the implementation for the _PublicScrollPanelEvent class. +* @version 2.0 +*/ + +// includes +#include +#include +#include +#include +#include "FUiCtrl_PublicScrollPanelEvent.h" + + +// using namespace +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Ui; + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @class _PublicScrollPanelEventArg + * @brief This class is used as the argument to change event listener. + * + * This class is used as the argument to change event listener. When an change event is generated + * (such as when a button is pressed) the ScrollPanelEvent calls ScrollPanelEventListener's OnTextd + * with an instance of this class as an argument. + * + * From this class, one can find out, the (event) source object and the change ID. + */ +class _OSP_EXPORT_ _PublicScrollPanelEventArg + : public Tizen::Base::Runtime::IEventArg + , public Tizen::Base::Object +{ +// Lifecycle +public: + /** + * This is the default class constructor. + * + */ + _PublicScrollPanelEventArg(ScrollPanelStatus status); + + /** + * This is the class destructor. + * + */ + virtual ~_PublicScrollPanelEventArg(void); + + +// Access +public: + ScrollPanelStatus GetStatus(void) const; + +// Attribute +private: + /** + * Status + */ + ScrollPanelStatus __status; +}; // _PublicScrollPanelEventArg + +//////////////////////////////////////////////////////////////////////////////// +/// _PublicScrollPanelEventArg class Lifecycle + +_PublicScrollPanelEventArg::_PublicScrollPanelEventArg(ScrollPanelStatus status) + : __status(status) +{ + // Nothing +} + +_PublicScrollPanelEventArg::~_PublicScrollPanelEventArg(void) +{ + // Nothing. +} + +ScrollPanelStatus +_PublicScrollPanelEventArg::GetStatus(void) const +{ + return __status; +} + +//////////////////////////////////////////////////////////////////////////////// +/// _PublicScrollPanelEvent class Lifecycle +_PublicScrollPanelEvent::_PublicScrollPanelEvent(const Control& source) + : __pSource(null) +{ + result r = _Event::Initialize(); + + // Set event source + if (r == E_SUCCESS) + { + __pSource = &source; + } +} + +_PublicScrollPanelEvent::~_PublicScrollPanelEvent(void) +{ + // Nothing. +} + +_PublicScrollPanelEvent* +_PublicScrollPanelEvent::CreateInstanceN(const Control& source) +{ + _PublicScrollPanelEvent* pPublicScrollPanelEvent = new (std::nothrow) _PublicScrollPanelEvent(source); + SysTryReturn(NID_UI_CTRL, pPublicScrollPanelEvent, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + return pPublicScrollPanelEvent; +} + +// Accessors + +const Control* +_PublicScrollPanelEvent::GetSource(void) const +{ + return __pSource; +} + +// Operations + +void +_PublicScrollPanelEvent::FireImpl(IEventListener& listener, const IEventArg& arg) +{ + IScrollPanelEventListener* pScrollPanelEventListener = dynamic_cast (&listener); + 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, + "[E_INVALID_ARG] Invalid argument is used. The _PublicScrollPanelEventArg instance is null."); + + switch (pScrollPanelEventArg->GetStatus()) + { + case OVERLAY_CONTROL_CREATED: + pScrollPanelEventListener->OnOverlayControlCreated(*GetSource()); + break; + + case OVERLAY_CONTROL_OPENED: + pScrollPanelEventListener->OnOverlayControlOpened(*GetSource()); + break; + + case OVERLAY_CONTROL_CLOSED: + pScrollPanelEventListener->OnOverlayControlClosed(*GetSource()); + break; + + case OTHER_CONTROL_SELECTED: + pScrollPanelEventListener->OnOtherControlSelected(*GetSource()); + break; + } + + SetLastResult(E_SUCCESS); + + return; + +} + +IEventArg* +_PublicScrollPanelEvent::CreateScrollPanelEventArgN(ScrollPanelStatus status) +{ + _PublicScrollPanelEventArg* pEventArg = new (std::nothrow) _PublicScrollPanelEventArg(status); + SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + return pEventArg; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_PublicSearchBarEvent.cpp b/src/ui/controls/FUiCtrl_PublicSearchBarEvent.cpp new file mode 100644 index 0000000..4727c9d --- /dev/null +++ b/src/ui/controls/FUiCtrl_PublicSearchBarEvent.cpp @@ -0,0 +1,190 @@ +// +// 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_PublicSearchBarEvent.cpp +* @brief This is the implementation for the PublicSearcBarEvent class. +* @version 1.0 +*/ + +#include +#include +#include +#include +#include "FUiCtrl_PublicSearchBarEvent.h" + +// using namespace +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @class _PublicSearchBarEventArg + * @brief This class is used as the argument to searchbar event listener. + * + * This class is used as the argument to searchbar event listener. When an searchbar event is generated + * (such as when a searchbar is pressed) the SearchBarEvent calls SearchBarEventListener's OnSearchBarModeChanged + * with an instance of this class as an argument. + * + * From this class, one can find out, the (event) source object and the action ID. + */ +class _OSP_EXPORT_ _PublicSearchBarEventArg + : public Tizen::Base::Runtime::IEventArg + , public Tizen::Base::Object +{ +// Lifecycle +public: + /** + * This is the default class constructor. + * + * @param[in] status + */ + _PublicSearchBarEventArg(SearchBarEventStatus status); + + /** + * This is the class destructor. + * + */ + virtual ~_PublicSearchBarEventArg(void); + + +// Access +public: + /** + * This method returns the actionId which the event initially occurred. + * + * @return See the comment above. + */ + SearchBarEventStatus GetStatus(void) const; + + +// Attribute +private: + /** + * Event status. + */ + SearchBarEventStatus __status; +}; + +_PublicSearchBarEventArg::_PublicSearchBarEventArg(SearchBarEventStatus status) + : __status(status) +{ + // nothing +} + +_PublicSearchBarEventArg::~_PublicSearchBarEventArg(void) +{ + // nothing +} + +//////////////////////////////////////////////////////////////////////////////// +/// _SearchBarEventArg class Access +SearchBarEventStatus +_PublicSearchBarEventArg::GetStatus(void) const +{ + return __status; +} + +//////////////////////////////////////////////////////////////////////////////// +/// _PublicSearchBarEvent class Lifecycle +_PublicSearchBarEvent::_PublicSearchBarEvent(const SearchBar& source) + : __pSource(null) +{ + result r = _Event::Initialize(); + + // set event source + if (r == E_SUCCESS) + { + __pSource = &source; + } +} + +_PublicSearchBarEvent::~_PublicSearchBarEvent(void) +{ + // nothing +} + +_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 allocation failed."); + + if (IsFailed(GetLastResult())) + { + goto CATCH; + } + + return pPublicSearchBarEvent; + +CATCH: + delete pPublicSearchBarEvent; + return null; +} + +//////////////////////////////////////////////////////////////////////////////// +/// _WindowEvent class Accessor + +const SearchBar* +_PublicSearchBarEvent::GetSource(void) const +{ + return __pSource; +} + +//////////////////////////////////////////////////////////////////////////////// +/// _PublicActionEvent class Operation + +void +_PublicSearchBarEvent::FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg) + +{ + // cast to IActionEventListener + ISearchBarEventListener* pSearchBarListener = dynamic_cast (&listener); + SysTryReturnVoidResult(NID_UI_CTRL, pSearchBarListener != null, E_INVALID_ARG, "[E_INVALID_ARG] The invalid listener was given."); + + // cast to _PublicSearchBarEventArg + const _PublicSearchBarEventArg* pArg = dynamic_cast (&arg); + SysTryReturnVoidResult(NID_UI_CTRL, pArg != null, E_INVALID_ARG, "[E_INVALID_ARG] The invalid Event Argument was given."); + + SearchBar* pSource = null; + pSource = const_cast (__pSource); + SysTryReturnVoidResult(NID_UI_CTRL, pSource != null, E_INVALID_ARG, "[E_INVALID_ARG] The invalid Event Argument was given."); + + // call cursor change event listener method + SearchBarEventStatus status = pArg->GetStatus(); + if (status == SEARCH_BAR_EVENT_MODE_CHANGE) + { + pSearchBarListener->OnSearchBarModeChanged(*pSource, pSource->GetMode()); + } + + SetLastResult(E_SUCCESS); + + return; +} + +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 allocation failed."); + + return pEventArg; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_PublicSliderEvent.cpp b/src/ui/controls/FUiCtrl_PublicSliderEvent.cpp new file mode 100644 index 0000000..e6eeca9 --- /dev/null +++ b/src/ui/controls/FUiCtrl_PublicSliderEvent.cpp @@ -0,0 +1,143 @@ +// +// 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_PublicSliderEvent.cpp + * @brief This is the implementation for the _PublicSliderEvent class. + * + * This file contains the implementation of _PublicSliderEvent class. @n + */ + +#include +#include +#include +#include +#include "FUiCtrl_PublicSliderEvent.h" + +using namespace Tizen::Ui; +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _OSP_EXPORT_ _PublicSliderEventArg + : public IEventArg + , public Object +{ +// Lifecycle +public: + _PublicSliderEventArg(int value); + virtual ~_PublicSliderEventArg(void); + +// Access +public: + int GetValue(void) const; + +// Attribute +private: + int __value; + +}; // _PublicSliderEventArg + +_PublicSliderEventArg::_PublicSliderEventArg(int value) + : __value(value) +{ +} + +_PublicSliderEventArg::~_PublicSliderEventArg(void) +{ +} + +int +_PublicSliderEventArg::GetValue(void) const +{ + return __value; +} + + +_PublicSliderEvent::_PublicSliderEvent(const Controls::Slider& source) + : __pSource(null) +{ + result r = _Event::Initialize(); + + // set event source + if (r == E_SUCCESS) + { + __pSource = const_cast (&source); + } +} + +_PublicSliderEvent::~_PublicSliderEvent(void) +{ +} + +_PublicSliderEvent* +_PublicSliderEvent::CreateInstanceN(const Controls::Slider& source) +{ + _PublicSliderEvent* pPublicSliderEvent = new (std::nothrow) _PublicSliderEvent(source); + SysTryReturn(NID_UI_CTRL, pPublicSliderEvent != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + if (IsFailed(GetLastResult())) + { + goto CATCH; + } + + return pPublicSliderEvent; + +CATCH: + delete pPublicSliderEvent; + pPublicSliderEvent = null; + + return null; +} + +const Controls::Slider* +_PublicSliderEvent::GetSource(void) const +{ + return __pSource; +} + +void +_PublicSliderEvent::FireImpl(IEventListener& listener, const IEventArg& arg) +{ + // cast to ISliderEventListener + ISliderEventListener* pSliderListener = dynamic_cast (&listener); + SysTryReturnVoidResult(NID_UI_CTRL, pSliderListener != null, E_INVALID_ARG, + "[E_INVALID_ARG] The invalid listener was given."); + + // cast to _PublicSliderEventArg + const _PublicSliderEventArg* pSliderEventArg = dynamic_cast (&arg); + SysTryReturnVoidResult(NID_UI_CTRL, pSliderEventArg != null, E_INVALID_ARG, + "[E_INVALID_ARG] The invalid Event Argument was given."); + + // call cursor change event listener method + pSliderListener->OnSliderBarMoved(*__pSource, pSliderEventArg->GetValue()); + SetLastResult(E_SUCCESS); + return; +} + +IEventArg* +_PublicSliderEvent::CreateSliderEventArgN(int value) +{ + _PublicSliderEventArg* pEventArg = new (std::nothrow) _PublicSliderEventArg(value); + SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + return pEventArg; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_PublicSplitPanelEvent.cpp b/src/ui/controls/FUiCtrl_PublicSplitPanelEvent.cpp new file mode 100644 index 0000000..6acccb2 --- /dev/null +++ b/src/ui/controls/FUiCtrl_PublicSplitPanelEvent.cpp @@ -0,0 +1,194 @@ +// +// 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_PublicSplitPanelEvent.cpp +* @brief This is the implementation for the _PublicSplitPanelEvent class. +* @version 1.0 +*/ + +// includes +#include +#include +#include +#include +#include +#include "FUiCtrl_PublicSplitPanelEvent.h" +#include "FUiCtrl_SplitPanelImpl.h" + + +// using namespace +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @class _PublicSplitPanelEventArg + * @brief This class is used as the argument to change event listener. + * + * This class is used as the argument to change event listener. When an change event is generated + * (such as when a button is pressed) the SplitPanelEvent calls SplitPanelEventListener's OnTextd + * with an instance of this class as an argument. + * + * From this class, one can find out, the (event) source object and the change ID. + */ +class _OSP_EXPORT_ _PublicSplitPanelEventArg + : public Tizen::Base::Runtime::IEventArg + , public Tizen::Base::Object +{ +// Lifecycle +public: + /** + * This is the default class constructor. + * + * @param[in] status + */ + _PublicSplitPanelEventArg(SplitPanelEventStatus status); + + /** + * This is the class destructor. + * + */ + virtual ~_PublicSplitPanelEventArg(void); + + +// Access +public: + SplitPanelEventStatus GetStatus(void) const; + +// Attribute +private: + /** + * Status + */ + SplitPanelEventStatus __status; +}; // _PublicSplitPanelEventArg + +//////////////////////////////////////////////////////////////////////////////// +/// _PublicSplitPanelEventArg class Lifecycle + +_PublicSplitPanelEventArg::_PublicSplitPanelEventArg(SplitPanelEventStatus status) + : __status(status) +{ + // Nothing +} + +_PublicSplitPanelEventArg::~_PublicSplitPanelEventArg(void) +{ + // Nothing. +} + +SplitPanelEventStatus +_PublicSplitPanelEventArg::GetStatus(void) const +{ + return __status; +} + +//////////////////////////////////////////////////////////////////////////////// +/// _PublicSplitPanelEvent class Lifecycle +_PublicSplitPanelEvent::_PublicSplitPanelEvent(const SplitPanel& source) + : __pSource(null) +{ + //result r = Event::Construct(); + result r = _Event::Initialize(); + + // Set event source + if (r == E_SUCCESS) + { + __pSource = &source; + } +} + +_PublicSplitPanelEvent::~_PublicSplitPanelEvent(void) +{ + // Nothing. +} + +_PublicSplitPanelEvent* +_PublicSplitPanelEvent::CreateInstanceN(const SplitPanel& source) +{ + _PublicSplitPanelEvent* pPublicSplitPanelEvent = new (std::nothrow) _PublicSplitPanelEvent(source); + SysTryReturn(NID_UI_CTRL, pPublicSplitPanelEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + return pPublicSplitPanelEvent; +} + +// Accessors + +const SplitPanel* +_PublicSplitPanelEvent::GetSource(void) const +{ + return __pSource; +} + +// Operations + +void +_PublicSplitPanelEvent::FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg) +{ + // cast to IActionEventListener + ISplitPanelEventListener* pSplitPanelEventListener = dynamic_cast (&listener); + ISplitPanelEventListenerF* pSplitPanelEventListenerF = dynamic_cast (&listener); + SysTryReturnVoidResult(NID_UI_CTRL, pSplitPanelEventListener != null || pSplitPanelEventListenerF != null, E_INVALID_ARG, "[E_INVALID_ARG] The invalid listener was given."); + + // cast to _PublicSplitPanelEventArg + const _PublicSplitPanelEventArg* pArg = dynamic_cast (&arg); + SysTryReturnVoidResult(NID_UI_CTRL, pArg != null, E_INVALID_ARG, "[E_INVALID_ARG] The invalid Event Argument was given."); + + SplitPanel* pSource = null; + pSource = const_cast (__pSource); + + // call cursor change event listener method + SplitPanelEventStatus status = pArg->GetStatus(); + if (status == SPLIT_PANEL_EVENT_DIVIDER_POSITION_CHANGE) + { + if (pSplitPanelEventListener != null) + { + pSplitPanelEventListener->OnDividerPositionChanged(*pSource, pSource->GetDividerPosition()); + } + + if (pSplitPanelEventListenerF != null) + { + pSplitPanelEventListenerF->OnDividerPositionChanged(*pSource, pSource->GetDividerPositionF()); + } + } + else + { + if (pSplitPanelEventListener != null) + { + pSplitPanelEventListener->OnDividerDoublePressed(*pSource); + } + + if (pSplitPanelEventListenerF != null) + { + pSplitPanelEventListenerF->OnDividerDoublePressed(*pSource); + } + } +} + +IEventArg* +_PublicSplitPanelEvent::CreateSplitPanelEventArgN(SplitPanelEventStatus status) +{ + _PublicSplitPanelEventArg* pEventArg = new (std::nothrow) _PublicSplitPanelEventArg(status); + SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + return pEventArg; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_PublicTextBlockEvent.cpp b/src/ui/controls/FUiCtrl_PublicTextBlockEvent.cpp new file mode 100644 index 0000000..3139523 --- /dev/null +++ b/src/ui/controls/FUiCtrl_PublicTextBlockEvent.cpp @@ -0,0 +1,189 @@ +// +// 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_PublicTextBlockEvent.cpp +* @brief This is the implementation for the _PublicTextBlockEvent class. +* +* This file contains implementation of _PublicTextBlockEvent class. +*/ + +// includes +#include +#include +#include +#include +#include "FUiCtrl_PublicTextBlockEvent.h" + + +// using namespace +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @class _PublicTextBlockEventArg + * @brief This class is used as the argument to change event listener. + * + * This class is used as the argument to change event listener. When an change event is generated + * (such as when a button is pressed) the TextBlockEvent calls TextBlockEventListener's OnTextd + * with an instance of this class as an argument. + * + * From this class, one can find out, the (event) source object and the change ID. + */ +class _OSP_EXPORT_ _PublicTextBlockEventArg + : public IEventArg + , public Object +{ +// Lifecycle +public: + /** + * This is the default class constructor. + * + */ + _PublicTextBlockEventArg(int start, int end); + + /** + * This is the class destructor. + * + */ + virtual ~_PublicTextBlockEventArg(void); + + +// Access +public: + /** + * Gets the start position of text block. + * + * @return the start position of text block. + */ + const int GetStartPosition(void) const; + + /** + * Gets the end position of text block. + * + * @return the end position of text block. + */ + const int GetEndPosition(void) const; + +// Attribute +private: + /** + * Start position. + */ + int __start; + + /** + * End position. + */ + int __end; +}; // _PublicTextBlockEventArg + +//////////////////////////////////////////////////////////////////////////////// +/// _PublicTextBlockEventArg class Lifecycle + +_PublicTextBlockEventArg::_PublicTextBlockEventArg(int start, int end) + : __start(start) + , __end(end) +{ + // Nothing +} + +_PublicTextBlockEventArg::~_PublicTextBlockEventArg(void) +{ + // Nothing. +} + +const int +_PublicTextBlockEventArg::GetStartPosition(void) const +{ + return __start; +} + +const int +_PublicTextBlockEventArg::GetEndPosition(void) const +{ + return __end; +} + +//////////////////////////////////////////////////////////////////////////////// +/// _PublicTextBlockEvent class Lifecycle +_PublicTextBlockEvent::_PublicTextBlockEvent(const Control& source) + : __pSource(null) +{ + result r = _Event::Initialize(); + + // Set event source + if (r == E_SUCCESS) + { + __pSource = &source; + } +} + +_PublicTextBlockEvent::~_PublicTextBlockEvent(void) +{ + // Nothing. +} + +_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 allocation failed."); + + return pPublicTextBlockEvent; +} + +// Accessors + +const Control* +_PublicTextBlockEvent::GetSource(void) const +{ + return __pSource; +} + +// Operations + +void +_PublicTextBlockEvent::FireImpl(IEventListener& listener, const IEventArg& arg) +{ + ITextBlockEventListener* pTextBlockEventListener = dynamic_cast (&listener); + 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, "[E_INVALID_ARG] The Invalid Event Argument is given."); + + pTextBlockEventListener->OnTextBlockSelected(const_cast (*__pSource), + pTextBlockEventArg->GetStartPosition(), pTextBlockEventArg->GetEndPosition()); + + SetLastResult(E_SUCCESS); + + return; +} + +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 allocation failed."); + + return pEventArg; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_PublicTextEvent.cpp b/src/ui/controls/FUiCtrl_PublicTextEvent.cpp new file mode 100644 index 0000000..028d79b --- /dev/null +++ b/src/ui/controls/FUiCtrl_PublicTextEvent.cpp @@ -0,0 +1,185 @@ +// +// 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_PublicTextEvent.cpp +* @brief This is the implementation for the _PublicTextEvent class. +* +* This file contains implementation of _PublicTextEvent class. +*/ + +// includes +#include +#include +#include +#include +#include "FUiCtrl_PublicTextEvent.h" + + +// using namespace +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @class _PublicTextEventArg + * @brief This class is used as the argument to action event listener. + * + * This class is used as the argument to action event listener. When an action event is generated + * (such as when a button is pressed) the TextEvent calls TextEventListener's OnActionPerformed + * with an instance of this class as an argument. + * + * From this class, one can find out, the (event) source object and the action ID. + */ +class _OSP_EXPORT_ _PublicTextEventArg + : public IEventArg + , public Object +{ +// Lifecycle +public: + /** + * This is the default class constructor. + * + * @param[in] source A pointer to the Object instance which contains this instance. + * @param[in] actionId Action Id. + */ + _PublicTextEventArg(TextEventStatus status); + + /** + * This is the class destructor. + * + */ + virtual ~_PublicTextEventArg(void); + + +// Access +public: + /** + * This method returns the TextEventStatus which the event initially occurred. + * + * @return See the comment above. + */ + TextEventStatus GetStatus(void) const; + + +// Attribute +private: + /** + * Action Id. + */ + TextEventStatus __status; +}; // _PublicTextEventArg + +_PublicTextEventArg::_PublicTextEventArg(TextEventStatus status) + : __status(status) +{ + // nothing +} + +_PublicTextEventArg::~_PublicTextEventArg(void) +{ + // nothing +} + +//////////////////////////////////////////////////////////////////////////////// +/// _TextEventArg class Access +TextEventStatus +_PublicTextEventArg::GetStatus(void) const +{ + return __status; +} + +//////////////////////////////////////////////////////////////////////////////// +/// _PublicTextEvent class Lifecycle +_PublicTextEvent::_PublicTextEvent(const Control& source) + : __pSource(null) +{ + result r = _Event::Initialize(); + + // set event source + if (r == E_SUCCESS) + { + __pSource = &source; + } +} + +_PublicTextEvent::~_PublicTextEvent(void) +{ + // nothing +} + +_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 allocation failed."); + + return pPublicTextEvent; +} + +//////////////////////////////////////////////////////////////////////////////// +/// _WindowEvent class Accessor + +const Control* +_PublicTextEvent::GetSource(void) const +{ + return __pSource; +} + +//////////////////////////////////////////////////////////////////////////////// +/// _PublicTextEvent class Operation + +void +_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."); + + // 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."); + + // call cursor change event listener method + TextEventStatus stauts = pArg->GetStatus(); + if (stauts == TEXT_EVENT_CHANGED) + { + pTextListener->OnTextValueChanged(*__pSource); + } + else if (stauts == TEXT_EVENT_CANCELED) + { + pTextListener->OnTextValueChangeCanceled(*__pSource); + } + + SetLastResult(E_SUCCESS); + + return; +} + +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 allocation failed."); + + return pEventArg; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_RadioGroup.cpp b/src/ui/controls/FUiCtrl_RadioGroup.cpp new file mode 100644 index 0000000..8f2567e --- /dev/null +++ b/src/ui/controls/FUiCtrl_RadioGroup.cpp @@ -0,0 +1,248 @@ +// +// 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_RadioGroup.cpp + * @brief This is the implementation file for the _RadioGroup class. + */ + +#include +#include +#include "FUiCtrl_RadioGroup.h" +#include "FUiCtrl_RadioGroupPresenter.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_RadioGroup::_RadioGroup(void) + : __pRadioGroupPresenter(null) + , __checkList(null) +{ + result r = E_SUCCESS; + + _RadioGroupPresenter* pPresenter = new (std::nothrow) _RadioGroupPresenter(); + SysTryReturnVoidResult(NID_UI_CTRL, pPresenter, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + + r = SetPresenter(*pPresenter); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + r = pPresenter->Construct(*this); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + r = pPresenter->Install(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + SetMovable(false); + SetResizable(false); + SetFocusable(false); + + ClearLastResult(); + + return; + +CATCH: + delete pPresenter; +} + +_RadioGroup* +_RadioGroup::CreateRadioGroupN(void) +{ + _RadioGroup* pRadioGroup = new (std::nothrow) _RadioGroup(); + SysTryReturn(NID_UI_CTRL, pRadioGroup, 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."); + + pRadioGroup->AcquireHandle(); + + pRadioGroup->CreateCheckList(); + + return pRadioGroup; + +CATCH: + delete pRadioGroup; + return null; +} + +_RadioGroup::~_RadioGroup(void) +{ + if (__pRadioGroupPresenter) + { + delete __pRadioGroupPresenter; + __pRadioGroupPresenter = null; + } + + if (__checkList) + { + delete __checkList; + __checkList = null; + } + + ClearLastResult(); +} + +result +_RadioGroup::SetPresenter(const _RadioGroupPresenter& radioGroupPresenter) +{ + __pRadioGroupPresenter = const_cast <_RadioGroupPresenter*>(&radioGroupPresenter); + + return E_SUCCESS; +} + +result +_RadioGroup::CreateCheckList(void) +{ + result r = E_SUCCESS; + + __checkList = new (std::nothrow) ArrayList(); + SysTryReturn(NID_UI_CTRL, __checkList, E_INVALID_STATE, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + r = __checkList->Construct(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[E_SYSTEM] System error occurred."); + + return E_SUCCESS; + +CATCH: + delete __checkList; + return E_SYSTEM; +} + +result +_RadioGroup::Add(_CheckButton& checkButton) +{ + result r = E_SUCCESS; + + if ((checkButton.__checkButtonStyle != CHECK_BUTTON_STYLE_RADIO) && + (checkButton.__checkButtonStyle != CHECK_BUTTON_STYLE_RADIO_WITH_DIVIDER) + && (checkButton.__checkButtonStyle != CHECK_BUTTON_STYLE_RADIO_WITH_DETAILED_BUTTON)) + { + SysTryReturn(NID_UI_CTRL, 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The CheckButton style is invalid.\n"); + } + + r = checkButton.AddRadioGroup(*this); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] The CheckButton is already belonged to a RadioGroup.\n"); + + r = __checkList->Add(checkButton); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] The CheckButton is already belonged to a RadioGroup.\n"); + + return E_SUCCESS; +} + +result +_RadioGroup::Remove(_CheckButton& checkButton) +{ + result r = E_SUCCESS; + + r = checkButton.RemoveRadioGroup(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, + "[E_OBJ_NOT_FOUND] Unable to find the CheckButton.\n"); + + r = __checkList->Remove(checkButton); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, + "[E_OBJ_NOT_FOUND] Unable to find the CheckButton.\n"); + + return E_SUCCESS; +} + +bool +_RadioGroup::OnNotifiedN(const _Control& source, IList* pArgs) +{ + SysTryReturn(NID_UI_CTRL, pArgs != null, false, E_SYSTEM, "[E_SYSTEM] The argument is invalid."); + + String checkButtonReleasedEvent(L"CheckButtonReleasedEvent"); + String* pType = dynamic_cast (pArgs->GetAt(0)); + + const _CheckButton* pSelectedCheckButton = dynamic_cast (pArgs->GetAt(1)); + SysTryReturn(NID_UI_CTRL, pSelectedCheckButton, false, E_INVALID_STATE, "[E_INVALID_STATE] This instance is not constructed."); + + if (pType) + { + if (*pType == checkButtonReleasedEvent) + { + SetSelectedItem(*pSelectedCheckButton); + } + delete pArgs; + } + + return true; +} + +result +_RadioGroup::SetSelectedItem(const _CheckButton& checkButton) +{ + _CheckButton* pCurrentRB = null; + _CheckButton* pTarget = const_cast <_CheckButton*>(&checkButton); + + int count = __checkList->GetCount(); + + for (int i = 0; i < count; i++) + { + pCurrentRB = dynamic_cast<_CheckButton*>(__checkList->GetAt(i)); + + if (pCurrentRB) + { + if (pTarget == pCurrentRB) + { + pCurrentRB->SetSelected(true); + } + else + { + pCurrentRB->SetSelected(false); + } + pCurrentRB->Draw(); + } + } + + return E_SUCCESS; +} + +int +_RadioGroup::GetItemCount(void) const +{ + return __checkList->GetCount(); +} + +const _CheckButton* +_RadioGroup::GetSelectedItem(void) const +{ + const _CheckButton* pCurrentRB = null; + int count = __checkList->GetCount(); + + for (int i = 0; i < count; i++) + { + pCurrentRB = dynamic_cast<_CheckButton*>(__checkList->GetAt(i)); + + if (pCurrentRB) + { + if (pCurrentRB->IsSelected() == true) + { + break; + } + else + { + pCurrentRB = null; + } + } + } + + return pCurrentRB; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_RadioGroupImpl.cpp b/src/ui/controls/FUiCtrl_RadioGroupImpl.cpp new file mode 100644 index 0000000..7c72784 --- /dev/null +++ b/src/ui/controls/FUiCtrl_RadioGroupImpl.cpp @@ -0,0 +1,217 @@ +// +// 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_RadioGroupImpl.cpp + * @brief This is the implementation file for the _RadioGroupImpl class. + */ + +#include +#include +#include "FUi_ResourceSizeInfo.h" +#include "FUi_ResourceManager.h" +#include "FUiCtrl_RadioGroupImpl.h" +#include "FUiCtrl_CheckButtonImpl.h" +#include "FUiCtrl_RadioGroup.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +Dimension +_RadioGroupImpl::RadioGroupSizeInfo::GetDefaultMinimumSize(_ControlOrientation orientation) const +{ + result r = E_SUCCESS; + Dimension dimension(0, 0); + + r = GET_DIMENSION_CONFIG(RADIOGROUP::MIN_SIZE, orientation, dimension); + SysTryReturn(NID_UI, r == E_SUCCESS, dimension, r, "[%s] A system error occurred.", GetErrorMessage(r)); + + SetLastResult(r); + + return dimension; +} + +FloatDimension +_RadioGroupImpl::RadioGroupSizeInfo::GetDefaultMinimumSizeF(_ControlOrientation orientation) const +{ + result r = E_SUCCESS; + FloatDimension dimension(0.0f, 0.0f); + + r = GET_DIMENSION_CONFIG(RADIOGROUP::MIN_SIZE, orientation, dimension); + SysTryReturn(NID_UI, r == E_SUCCESS, dimension, r, "[%s] A system error occurred.", GetErrorMessage(r)); + + SetLastResult(r); + + return dimension; +} + +_RadioGroupImpl* +_RadioGroupImpl::GetInstance(RadioGroup& radioGroup) +{ + return static_cast<_RadioGroupImpl*> (radioGroup._pControlImpl); +} + +const _RadioGroupImpl* +_RadioGroupImpl::GetInstance(const RadioGroup& radioGroup) +{ + return static_cast (radioGroup._pControlImpl); +} + +_RadioGroupImpl::_RadioGroupImpl(RadioGroup* pPublic, _RadioGroup* pCore) + : _ControlImpl(pPublic, pCore) +{ + ClearLastResult(); + SetFocusableChangable(false); +} + +_RadioGroupImpl::~_RadioGroupImpl(void) +{ + ClearLastResult(); +} + +_RadioGroupImpl* +_RadioGroupImpl::CreateRadioGroupImplN(RadioGroup* pControl) +{ + result r = E_SUCCESS; + + _RadioGroup* pCore = _RadioGroup::CreateRadioGroupN(); + SysTryReturn(NID_UI_CTRL, pCore, null, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _RadioGroupImpl* pImpl = new (std::nothrow) _RadioGroupImpl(pControl, pCore); + r = _ControlImpl::CheckConstruction(pCore, pImpl); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + ClearLastResult(); + + return pImpl; +} + +Color +_RadioGroupImpl::GetColorOnError(void) +{ + return Color(0XFFFFFFFF); +} + +const char* +_RadioGroupImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Controls::RadioGroup"; +} + +const RadioGroup& +_RadioGroupImpl::GetPublic(void) const +{ + return static_cast(_ControlImpl::GetPublic()); +} + +RadioGroup& +_RadioGroupImpl::GetPublic(void) +{ + return static_cast(_ControlImpl::GetPublic()); +} + +const _RadioGroup& +_RadioGroupImpl::GetCore(void) const +{ + return static_cast(_ControlImpl::GetCore()); +} + +_RadioGroup& +_RadioGroupImpl::GetCore(void) +{ + return static_cast <_RadioGroup&>(_ControlImpl::GetCore()); +} + +result +_RadioGroupImpl::OnAttachedToMainTree(void) +{ + _ControlImpl::OnAttachedToMainTree(); + + return E_SUCCESS; +} + +result +_RadioGroupImpl::Add(const CheckButton& checkButton) +{ + const _CheckButton& _checkButton = _CheckButtonImpl::GetInstance(checkButton)->GetCore(); + + result r = GetCore().Add(const_cast<_CheckButton&>(_checkButton)); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +_RadioGroupImpl::Remove(const CheckButton& checkButton) +{ + const _CheckButton& _checkButton = _CheckButtonImpl::GetInstance(checkButton)->GetCore(); + + result r = GetCore().Remove(const_cast<_CheckButton&>(_checkButton)); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +int +_RadioGroupImpl::GetItemCount(void) const +{ + ClearLastResult(); + + return GetCore().GetItemCount(); +} + +result +_RadioGroupImpl::SetSelectedItem(const CheckButton& checkButton) +{ + const _CheckButton& _checkButton = _CheckButtonImpl::GetInstance(checkButton)->GetCore(); + + result r = GetCore().SetSelectedItem(const_cast<_CheckButton&>(_checkButton)); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +const CheckButton* +_RadioGroupImpl::GetSelectedItem(void) const +{ + ClearLastResult(); + + const _CheckButton* _pCheckButton = GetCore().GetSelectedItem(); + + if (!_pCheckButton) + { + return null; + } + + _CheckButtonImpl* pCheckButtonImpl = static_cast<_CheckButtonImpl*>(_pCheckButton->GetUserData()); + if (!pCheckButtonImpl) + { + return null; + } + + const CheckButton* pCheckButton = dynamic_cast(&(pCheckButtonImpl->GetPublic())); + if (!pCheckButton) + { + return null; + } + + return pCheckButton; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_RadioGroupModel.cpp b/src/ui/controls/FUiCtrl_RadioGroupModel.cpp new file mode 100644 index 0000000..ad64ca6 --- /dev/null +++ b/src/ui/controls/FUiCtrl_RadioGroupModel.cpp @@ -0,0 +1,47 @@ +// +// 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_RadioGroupModel.cpp + * @brief This is the implementation file for the _RadioGroupModel class. + */ + +#include +#include +#include "FUiCtrl_RadioGroupModel.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +_RadioGroupModel::_RadioGroupModel(void) +{ + +} + +_RadioGroupModel::~_RadioGroupModel(void) +{ + +} + +result +_RadioGroupModel::Construct(void) +{ + result r = E_SUCCESS; + + return r; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_RadioGroupPresenter.cpp b/src/ui/controls/FUiCtrl_RadioGroupPresenter.cpp new file mode 100644 index 0000000..1b5ea2b --- /dev/null +++ b/src/ui/controls/FUiCtrl_RadioGroupPresenter.cpp @@ -0,0 +1,98 @@ +// +// 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_RadioGroupPresenter.cpp + * @brief This is the implementation file for the _RadioGroupPresenter class. + */ + +#include +#include +#include "FUiAnim_VisualElement.h" +#include "FUiCtrl_RadioGroupPresenter.h" +#include "FUiCtrl_RadioGroupModel.h" +#include "FUiCtrl_RadioGroup.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_RadioGroupPresenter::_RadioGroupPresenter(void) + : __pRadioGroup(null) + , __pRadioGroupModel(null) + , __pRoot(null) +{ + +} + +_RadioGroupPresenter::~_RadioGroupPresenter(void) +{ + if (__pRadioGroupModel) + { + delete __pRadioGroupModel; + __pRadioGroupModel = null; + } +} + +result +_RadioGroupPresenter::Construct(const _RadioGroup& radioGroup) +{ + result r = E_SUCCESS; + + __pRadioGroup = const_cast <_RadioGroup*>(&radioGroup); + + __pRoot = __pRadioGroup->GetVisualElement(); + + if (__pRoot) + { + __pRoot->SetSurfaceOpaque(false); + } + + return r; +} + +result +_RadioGroupPresenter::Install(void) +{ + result r = E_SUCCESS; + + _RadioGroupModel* pModel = new (std::nothrow) _RadioGroupModel(); + SysTryReturn(NID_UI_CTRL, pModel, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + + r = SetModel(*pModel); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + r = pModel->Construct(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + return E_SUCCESS; + +CATCH: + delete pModel; + return r; +} + +result +_RadioGroupPresenter::SetModel(const _RadioGroupModel& radioGroupModel) +{ + __pRadioGroupModel = const_cast <_RadioGroupModel*>(&radioGroupModel); + + return E_SUCCESS; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_Scroll.cpp b/src/ui/controls/FUiCtrl_Scroll.cpp new file mode 100644 index 0000000..01923cb --- /dev/null +++ b/src/ui/controls/FUiCtrl_Scroll.cpp @@ -0,0 +1,322 @@ +// +// 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_Scroll.cpp + * @brief This is the implementation file for the _Scroll class. + */ + +#include +#include "FUiCtrl_Scroll.h" +#include "FUiCtrl_ScrollPresenter.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Ui::Animations; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_Scroll::_Scroll(void) + : __pPresenter(null) +{ +} + +_Scroll::~_Scroll(void) +{ + delete __pPresenter; + __pPresenter = null; +} + +_Scroll* +_Scroll::CreateScrollN(Tizen::Ui::_Control& parentCtrl, + _ScrollDirection scrollDir, + bool enableFadeEffect, + bool enableJumpToTop, + bool enableHandler, + bool visibility, + float viewRange, + float scrollRange, + float scrollPosition) +{ + result r = E_SUCCESS; + ClearLastResult(); + + _Scroll* pScroll = new (std::nothrow) _Scroll(); + SysTryReturn(NID_UI_CTRL, pScroll, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + + r = pScroll->Construct(parentCtrl, + scrollDir, + enableFadeEffect, + enableJumpToTop, + enableHandler, + visibility, + viewRange, + scrollRange, + scrollPosition); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating", GetErrorMessage(r)); + + return pScroll; + +CATCH: + delete pScroll; + return null; +} + +result +_Scroll::Construct(Tizen::Ui::_Control& parentCtrl, + _ScrollDirection scrollDir, + bool enableFadeEffect, + bool enableJumpToTop, + bool enableHandler, + bool visibility, + float viewRange, + float scrollRange, + float scrollPosition) +{ + _ScrollPresenter* pPresenter = _ScrollPresenter::CreateScrollPresenterN(parentCtrl, + *this, + scrollDir, + enableFadeEffect, + enableJumpToTop, + enableHandler, + visibility, + viewRange, + scrollRange, + scrollPosition); + SysTryReturnResult(NID_UI_CTRL, pPresenter, GetLastResult(), "Propagating."); + + SetPresenter((_ScrollPresenter &)*pPresenter); + SetFocusable(false); + + AcquireHandle(); + + return E_SUCCESS; +} + +void +_Scroll::SetPresenter(_ScrollPresenter& scrollPresenter) +{ + __pPresenter = &scrollPresenter; +} + +_ScrollPresenter& +_Scroll::GetPresenter(void) const +{ + return *__pPresenter; +} + +result +_Scroll::SetScrollDirection(_ScrollDirection scrollDir) +{ + return GetPresenter().SetScrollDirection(scrollDir); +} + +_ScrollDirection +_Scroll::GetScrollDirection(void) const +{ + return GetPresenter().GetScrollDirection(); +} + +result +_Scroll::SetScrollRange(float viewRange, float scrollRange) +{ + return GetPresenter().SetScrollRange(viewRange, scrollRange); +} + +void +_Scroll::GetScrollRange(float* pViewRange, float* pScrollRange) const +{ + GetPresenter().GetScrollRange(pViewRange, pScrollRange); +} + +result +_Scroll::SetScrollPosition(float scrollPosition) +{ + return GetPresenter().SetScrollPosition(scrollPosition); +} + +float +_Scroll::GetScrollPosition(void) const +{ + return GetPresenter().GetScrollPosition(); +} + +result +_Scroll::SetContextMenuScrollType(bool isContextMenu) +{ + return GetPresenter().SetContextMenuScrollType(isContextMenu); +} + +void +_Scroll::EnableFadeEffect(bool enable) +{ + GetPresenter().EnableFadeEffect(enable); +} + +bool +_Scroll::IsEnabledFadeEffect(void) const +{ + return GetPresenter().IsEnabledFadeEffect(); +} + +bool +_Scroll::IsOnFadeEffect(void) const +{ + return GetPresenter().IsOnFadeEffect(); +} + +void +_Scroll::EnableScrollingEffect(bool enable) +{ + GetPresenter().EnableScrollingEffect(enable); +} + +bool +_Scroll::IsEnabledScrollingEffect(void) const +{ + return GetPresenter().IsEnabledScrollingEffect(); +} + +void +_Scroll::EnableOverScrollingEffect(bool enable) +{ + GetPresenter().EnableOverScrollingEffect(enable); +} + +bool +_Scroll::IsEnabledOverScrollingEffect(void) const +{ + return GetPresenter().IsEnabledOverScrollingEffect(); +} + +void +_Scroll::SetParentUsingViewport(bool useViewport) +{ + GetPresenter().SetParentUsingViewport(useViewport); +} + +bool +_Scroll::IsParentUsingViewport(void) const +{ + return GetPresenter().IsParentUsingViewport(); +} + +result +_Scroll::SetScrollVisibility(bool visibility) +{ + return GetPresenter().SetScrollVisibility(visibility); +} + +bool +_Scroll::GetScrollVisibility(void) const +{ + return GetPresenter().GetScrollVisibility(); +} + +void +_Scroll::CancelFadeEffect(void) +{ + GetPresenter().CancelFadeEffect(); +} + +result +_Scroll::SetScrollingEffectVisibility(bool visibility) +{ + return GetPresenter().SetScrollingEffectVisibility(visibility); +} + +result +_Scroll::EnableJumpToTop(bool enable) +{ + return GetPresenter().EnableJumpToTop(enable); +} + +bool +_Scroll::IsEnabledJumpToTop(void) const +{ + return GetPresenter().IsEnabledJumpToTop(); +} + +result +_Scroll::EnableHandler(bool enable) +{ + return GetPresenter().EnableHandler(enable); +} + +bool +_Scroll::IsEnabledHandler(void) const +{ + return GetPresenter().IsEnabledHandler(); +} + +void +_Scroll::AddScrollEventListener(const Tizen::Ui::Controls::_IScrollEventListener& listener) +{ + GetPresenter().AddScrollEventListener(listener); +} + +void +_Scroll::RemoveScrollEventListener(const Tizen::Ui::Controls::_IScrollEventListener& listener) +{ + GetPresenter().RemoveScrollEventListener(listener); +} + +void +_Scroll::OnParentBoundsChanged(void) +{ + GetPresenter().OnParentBoundsChanged(); +} + +void +_Scroll::OnDraw(void) +{ + GetPresenter().OnDraw(); +} + +bool +_Scroll::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + return GetPresenter().OnTouchPressed(source, touchinfo); +} + +bool +_Scroll::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + return GetPresenter().OnTouchReleased(source, touchinfo); +} + +bool +_Scroll::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + return GetPresenter().OnTouchMoved(source, touchinfo); +} + +void +_Scroll::OnTouchMoveHandled(const _Control& control) +{ + return GetPresenter().OnTouchMoveHandled(control); +} + +HitTestResult +_Scroll::HitTest(const Tizen::Graphics::FloatPoint& point) +{ + return GetPresenter().HitTest(point); +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_ScrollEvent.cpp b/src/ui/controls/FUiCtrl_ScrollEvent.cpp new file mode 100644 index 0000000..145319a --- /dev/null +++ b/src/ui/controls/FUiCtrl_ScrollEvent.cpp @@ -0,0 +1,128 @@ +// +// 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_ScrollEvent.cpp +* @brief This is the implementation for the _ScrollEvent class. +*/ + +#include +#include +#include +#include +#include "FUiCtrl_ScrollEvent.h" +#include "FUiCtrl_ScrollEventArg.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; + +namespace Tizen { namespace Ui { namespace Controls +{ + +//////////////////////////////////////////////////////////////////////////////// +/// _ScrollEvent class Lifecycle + +_ScrollEvent::_ScrollEvent(void) + : __pSource(null) +{ + // nothing +} + +_ScrollEvent::~_ScrollEvent(void) +{ + // nothing +} + +result +_ScrollEvent::Construct(const Tizen::Ui::Control& source) +{ + result r = _Event::Initialize(); + + // set event source + if (r == E_SUCCESS) + { + __pSource = const_cast (&source); + } + + return r; +} + +//////////////////////////////////////////////////////////////////////////////// +/// __WindowEvent class Accessor + +Tizen::Ui::Control* +_ScrollEvent::GetSource(void) const +{ + return __pSource; +} + +//////////////////////////////////////////////////////////////////////////////// +/// _ScrollEvent class Operation + +void +_ScrollEvent::FireImpl(IEventListener& listener, const IEventArg& arg) +{ + IScrollEventListener* pScrollEventListener = dynamic_cast (&listener); + IScrollEventListenerF* pScrollEventListenerF = null; + if (pScrollEventListener == null) + { + pScrollEventListenerF = dynamic_cast (&listener); + SysTryReturnVoidResult(NID_UI_CTRL, (pScrollEventListenerF != null), E_INVALID_ARG, "[%s] The invalid listener was given.", GetErrorMessage(E_INVALID_ARG)); + } + + const _ScrollEventArg* pArg = dynamic_cast (&arg); + SysTryReturnVoidResult(NID_UI_CTRL, (pArg != null), E_INVALID_ARG, "[%s] The invalid Event Argument was given.", GetErrorMessage(E_INVALID_ARG)); + + switch (pArg->GetEventType()) + { + case SCROLL_EVENT_ON_SCROLL_STOPPED: + if (pScrollEventListener != null) + { + pScrollEventListener->OnScrollStopped(*pArg->GetSource()); + } + else + { + pScrollEventListenerF->OnScrollStopped(*pArg->GetSource()); + } + break; + case SCROLL_EVENT_ON_SCROLL_POSITION_CHANGED: + if (pScrollEventListener != null) + { + pScrollEventListener->OnScrollPositionChanged(*pArg->GetSource(), pArg->GetScrollPosition()); + } + else + { + pScrollEventListenerF->OnScrollPositionChanged(*pArg->GetSource(), pArg->GetScrollPosition()); + } + break; + case SCROLL_EVENT_ON_SCROLL_END_REACHED: + if (pScrollEventListener != null) + { + pScrollEventListener->OnScrollEndReached(*pArg->GetSource(), pArg->GetScrollType()); + } + else + { + pScrollEventListenerF->OnScrollEndReached(*pArg->GetSource(), pArg->GetScrollType()); + } + break; + default: + SysTryReturnVoidResult(NID_UI_CTRL, false, E_INVALID_ARG, "[%s] The invalid Event Argument was given.", GetErrorMessage(E_INVALID_ARG)); + break; + } +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_ScrollEventArg.cpp b/src/ui/controls/FUiCtrl_ScrollEventArg.cpp new file mode 100644 index 0000000..acea1a9 --- /dev/null +++ b/src/ui/controls/FUiCtrl_ScrollEventArg.cpp @@ -0,0 +1,103 @@ +// +// 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_ScrollEventArg.cpp +* @brief This is the implementation for the _ScrollEventArg class. +*/ + +#include +#include "FUiCtrl_ScrollEventArg.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; + +namespace Tizen { namespace Ui { namespace Controls +{ + +//////////////////////////////////////////////////////////////////////////////// +/// _ScrollEventArg class Lifecycle + +_ScrollEventArg::_ScrollEventArg(_ScrollEventType eventType, const Control& source, float scrollPosition, ScrollEndEvent scrollType) + : __eventType(eventType) + , __pSource(const_cast (&source)) + , __scrollPosition(scrollPosition) + , __scrollType(scrollType) +{ + // nothing +} + +_ScrollEventArg::~_ScrollEventArg(void) +{ + // nothing +} + +_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] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + return pEventArg; +} + +_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] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + return pEventArg; +} + +_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] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + return pEventArg; +} + +//////////////////////////////////////////////////////////////////////////////// +/// _ScrollEventArg class Access + +_ScrollEventType +_ScrollEventArg::GetEventType(void) const +{ + return __eventType; +} + +Control* +_ScrollEventArg::GetSource(void) const +{ + return __pSource; +} + +float +_ScrollEventArg::GetScrollPosition(void) const +{ + return __scrollPosition; +} + +ScrollEndEvent +_ScrollEventArg::GetScrollType(void) const +{ + return __scrollType; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_ScrollPanel.cpp b/src/ui/controls/FUiCtrl_ScrollPanel.cpp new file mode 100644 index 0000000..b534222 --- /dev/null +++ b/src/ui/controls/FUiCtrl_ScrollPanel.cpp @@ -0,0 +1,1135 @@ +// +// 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_ScrollPanel.cpp + * @brief This is the implementation file for the %_ScrollPanel class. + * + */ + +#include +#include +#include +#include +#include +#include "FUiAnim_VisualElement.h" +#include "FUi_TouchFlickGestureDetector.h" +#include "FUiCtrl_UiScrollEvent.h" +#include "FUiCtrl_UiScrollEventArg.h" +#include "FUiCtrl_Scroll.h" +#include "FUiCtrl_ScrollPanelPresenter.h" +#include "FUiCtrl_ScrollPanel.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Ui::Animations; +using namespace Tizen::Base::Runtime; + +namespace +{ +const int SCROLL_PANEL_ANIMATION_DEFAULT_REPEAT_COUNT = 1; +} + +namespace Tizen { namespace Ui { namespace Controls +{ +_ScrollPanel::_ScrollPanel(void) + : _Panel() + , __pScrollPanelPresenter(null) + , __pScrollEvent(null) + , __pCoreScrollPanelEvent(null) + , __pGestureFlick(null) + , __pKeyPadBindingControl(null) + , __scrollDirection(SCROLL_PANEL_SCROLL_DIRECTION_VERTICAL) + , __scrollInputMode(SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION) + , __autoResizingEnable(true) + , __pageScrollEnabled(false) + , __pageScrollAlignSize(FloatDimension(0.0f, 0.0f)) + , __pageScrollMoveOnlyOnePageOnFlick(true) + , __scrollBarVisible(true) + , __pHorizontalScrollBar(null) + , __pVerticalScrollBar(null) + , __pScrollingAnimation(null) + , __fixingClientBoundsEnable(true) +{ + // nothing +} + + +_ScrollPanel::~_ScrollPanel(void) +{ + _ControlManager* pControlManager = _ControlManager::GetInstance(); + SysTryReturnVoidResult(NID_UI_CTRL, pControlManager, E_SYSTEM, "[%s] System error occurred.", GetErrorMessage(E_SYSTEM)); + + if (GetVisualElement() != null) + { + __pScrollingAnimation->SetVisualElementAnimationTickEventListener(null); + __pScrollingAnimation->SetVisualElementAnimationStatusEventListener(null); + GetVisualElement()->RemoveAllAnimations(); + } + + if (__pGestureFlick != null) + { + __pGestureFlick->RemoveGestureListener(*this); + pControlManager->RemoveGestureDetector(*__pGestureFlick); + RemoveGestureDetector(*__pGestureFlick); + delete __pGestureFlick; + __pGestureFlick = null; + } + + delete __pScrollEvent; + __pScrollEvent = null; + + if (__pScrollPanelPresenter != null) + { + __pScrollPanelPresenter->StopScrollBarLoadEffectTimer(); + } + + if (__pVerticalScrollBar != null && IsAncestorOf(*__pVerticalScrollBar)) + { + DetachSystemChild(*__pVerticalScrollBar); + } + delete __pVerticalScrollBar; + __pVerticalScrollBar = null; + + if (__pHorizontalScrollBar != null && IsAncestorOf(*__pHorizontalScrollBar)) + { + DetachSystemChild(*__pHorizontalScrollBar); + } + delete __pHorizontalScrollBar; + __pHorizontalScrollBar = null; + + delete __pScrollingAnimation; + __pScrollingAnimation = null; + + _Panel::SetPanelPresenter(null); + delete __pScrollPanelPresenter; + __pScrollPanelPresenter = null; +} + +_ScrollPanel* +_ScrollPanel::CreateScrollPanelN(const FloatRectangle& rect, ScrollPanelScrollDirection scrollDirection, bool autoResizingEnable, bool pageScrollEnabled) +{ + ClearLastResult(); + result r = E_SUCCESS; + + _Scroll* pHorizontalScrollBar = null; + _Scroll* pVerticalScrollBar = null; + + 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] 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] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + r = pPresenter->Initialize(*pScrollPanel); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pScrollPanel->Initialize(*pPresenter); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pPresenter->SetScrollAreaBoundsInternal(areaBounds); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + if (scrollDirection == SCROLL_PANEL_SCROLL_DIRECTION_VERTICAL && rect.height > 0.0f) + { + pVerticalScrollBar = _Scroll::CreateScrollN(*pScrollPanel, + SCROLL_DIRECTION_VERTICAL, + true, + false, + false, + false, + rect.height, + rect.height, + 0.0f); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r ==E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pVerticalScrollBar->EnableScrollingEffect(true); + + pVerticalScrollBar->AddScrollEventListener(*pScrollPanel); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r ==E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pScrollPanel->AttachSystemChild(*pVerticalScrollBar); + SysTryCatch(NID_UI_CTRL, r ==E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pScrollPanel->SetVerticalScrollBar(pVerticalScrollBar); + } + + if (scrollDirection == SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL && rect.width > 0.0f) + { + pHorizontalScrollBar = _Scroll::CreateScrollN(*pScrollPanel, + SCROLL_DIRECTION_HORIZONTAL, + true, + false, + false, + false, + rect.width, + rect.width, + 0.0f); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r ==E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pHorizontalScrollBar->EnableScrollingEffect(true); + + pHorizontalScrollBar->AddScrollEventListener(*pScrollPanel); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r ==E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pScrollPanel->AttachSystemChild(*pHorizontalScrollBar); + SysTryCatch(NID_UI_CTRL, r ==E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pScrollPanel->SetHorizontalScrollBar(pHorizontalScrollBar); + } + + r = pScrollPanel->SetBounds(rect); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return pScrollPanel; + +CATCH: + if (pHorizontalScrollBar != null && pScrollPanel->IsAncestorOf(*pHorizontalScrollBar)) + { + pScrollPanel->DetachSystemChild(*pHorizontalScrollBar); + } + delete pHorizontalScrollBar; + pScrollPanel->__pHorizontalScrollBar = null; + + if (pVerticalScrollBar != null && pScrollPanel->IsAncestorOf(*pVerticalScrollBar)) + { + pScrollPanel->DetachSystemChild(*pVerticalScrollBar); + } + delete pVerticalScrollBar; + pScrollPanel->__pVerticalScrollBar = null; + + delete pPresenter; + pScrollPanel->__pScrollPanelPresenter = null; + + delete pScrollPanel; + + SetLastResult(r); + return null; +} + +result +_ScrollPanel::Initialize(const _ScrollPanelPresenter& presenter, bool acquireHandle) +{ + ClearLastResult(); + + result r = _Panel::Initialize(presenter); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + SetScrollPanelPresenter(&presenter); + + __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")); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pScrollingAnimation->SetVisualElementAnimationTickEventListener(this); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pScrollingAnimation->SetVisualElementAnimationStatusEventListener(this); + 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] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + if (acquireHandle) + { + AcquireHandle(); + } + + r = AddGestureDetector(*__pGestureFlick); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __pGestureFlick->AddGestureListener(*this); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + +CATCH: + delete __pGestureFlick; + __pGestureFlick = null; + + delete __pScrollingAnimation; + __pScrollingAnimation = null; + + SetLastResult(r); + return r; +} + +result +_ScrollPanel::SetScrollPanelPresenter(const _ScrollPanelPresenter* presenter) +{ + ClearLastResult(); + + _Panel::SetPanelPresenter(presenter); + __pScrollPanelPresenter = const_cast <_ScrollPanelPresenter*>(presenter); + + return E_SUCCESS; +} + +void +_ScrollPanel::OnDraw(void) +{ + ClearLastResult(); + + if (__pScrollPanelPresenter == null) + { + return; + } + + result r = __pScrollPanelPresenter->Draw(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +result +_ScrollPanel::OnBoundsChanging(const FloatRectangle& bounds) +{ + ClearLastResult(); + + return __pScrollPanelPresenter->OnBoundsChanging(bounds); +} + +void +_ScrollPanel::OnBoundsChanged(void) +{ + ClearLastResult(); + + if (__pScrollPanelPresenter == null) + { + return; + } + + __pScrollPanelPresenter->OnBoundsChanged(); +} + +void +_ScrollPanel::OnChildAttached(const _Control& child) +{ + ClearLastResult(); + + if (__pScrollPanelPresenter == null) + { + return; + } + + __pScrollPanelPresenter->OnChildAttached(child); +} + +void +_ScrollPanel::OnChildDetached(const _Control& child) +{ + ClearLastResult(); + + if (__pScrollPanelPresenter == null) + { + return; + } + + __pScrollPanelPresenter->OnChildDetached(child); +} + +void +_ScrollPanel::OnChildBoundsChanged(const _Control& child) +{ + ClearLastResult(); + + if (__pScrollPanelPresenter == null) + { + return; + } + + __pScrollPanelPresenter->OnChildBoundsChanged(child); +} + +bool +_ScrollPanel::OnFlickGestureDetected(_TouchFlickGestureDetector& gesture) +{ + ClearLastResult(); + + return __pScrollPanelPresenter->OnFlickGestureDetected(gesture); +} + +bool +_ScrollPanel::OnFlickGestureCanceled(_TouchFlickGestureDetector& gesture) +{ + ClearLastResult(); + + return __pScrollPanelPresenter->OnFlickGestureCanceled(gesture); +} + +bool +_ScrollPanel::OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + ClearLastResult(); + + return __pScrollPanelPresenter->OnAccessibilityFocusMovedNext(control, element); +} + +bool +_ScrollPanel::OnAccessibilityFocusMovedPrevious(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + ClearLastResult(); + + return __pScrollPanelPresenter->OnAccessibilityFocusMovedPrevious(control, element); +} + +bool +_ScrollPanel::OnAccessibilityReadingElement(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + ClearLastResult(); + + return __pScrollPanelPresenter->OnAccessibilityReadingElement(control, element); +} +bool +_ScrollPanel::OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + ClearLastResult(); + + return __pScrollPanelPresenter->OnAccessibilityReadElement(control, element); +} + +bool +_ScrollPanel::OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + ClearLastResult(); + + return __pScrollPanelPresenter->OnAccessibilityFocusIn(control, element); +} + +bool +_ScrollPanel::OnAccessibilityFocusOut(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + ClearLastResult(); + + return __pScrollPanelPresenter->OnAccessibilityFocusOut(control, element); +} + +bool +_ScrollPanel::OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + ClearLastResult(); + + return __pScrollPanelPresenter->OnAccessibilityActionPerformed(control, element); +} +bool +_ScrollPanel::OnAccessibilityValueIncreased(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} +bool +_ScrollPanel::OnAccessibilityValueDecreased(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +void +_ScrollPanel::OnChildControlFocusMoved(const _Control& control) +{ + ClearLastResult(); + + __pScrollPanelPresenter->OnChildControlFocusMoved(control); +} + +void +_ScrollPanel::OnDescendantControlFocusMoved(const _Control& control) +{ + ClearLastResult(); + + __pScrollPanelPresenter->OnDescendantControlFocusMoved(control); +} + +bool +_ScrollPanel::OnAccessibilityItemRefreshed(const _AccessibilityContainer& control, const _AccessibilityElement& element, _AccessibilityFocusDirection direction) +{ + ClearLastResult(); + + return __pScrollPanelPresenter->OnAccessibilityItemRefreshed(control, element, direction); +} +_UiTouchEventDelivery +_ScrollPanel::OnPreviewTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + ClearLastResult(); + + return __pScrollPanelPresenter->OnPreviewTouchPressed(source, touchinfo); +} + +_UiTouchEventDelivery +_ScrollPanel::OnPreviewTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + ClearLastResult(); + + return __pScrollPanelPresenter->OnPreviewTouchMoved(source, touchinfo); +} + +_UiTouchEventDelivery +_ScrollPanel::OnPreviewTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + ClearLastResult(); + + return __pScrollPanelPresenter->OnPreviewTouchReleased(source, touchinfo); +} + +_UiTouchEventDelivery +_ScrollPanel::OnPreviewTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + ClearLastResult(); + + return __pScrollPanelPresenter->OnPreviewTouchCanceled(source, touchinfo); +} + +bool +_ScrollPanel::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + ClearLastResult(); + + return __pScrollPanelPresenter->OnTouchPressed(source, touchinfo); +} + +bool +_ScrollPanel::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + ClearLastResult(); + + return __pScrollPanelPresenter->OnTouchMoved(source, touchinfo); +} + +bool +_ScrollPanel::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + ClearLastResult(); + + return __pScrollPanelPresenter->OnTouchReleased(source, touchinfo); +} + +bool +_ScrollPanel::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + ClearLastResult(); + + return __pScrollPanelPresenter->OnTouchCanceled(source, touchinfo); +} + +void +_ScrollPanel::OnTouchMoveHandled(const _Control& control) +{ + ClearLastResult(); + + return __pScrollPanelPresenter->OnTouchMoveHandled(control); +} + +void +_ScrollPanel::OnScrollEndReached(_Control& source, ScrollEndEvent type) +{ + ClearLastResult(); + + __pScrollPanelPresenter->OnScrollEndReached(source, type); +} + +void +_ScrollPanel::OnScrollPositionChanged(_Control& source, float scrollPosition) +{ + ClearLastResult(); + + __pScrollPanelPresenter->OnScrollPositionChanged(source, scrollPosition); +} + +void +_ScrollPanel::OnScrollStopped(_Control& source) +{ + ClearLastResult(); + + __pScrollPanelPresenter->OnScrollStopped(source); +} + +void +_ScrollPanel::OnScrollJumpToTop(_Control& source) +{ + ClearLastResult(); + + __pScrollPanelPresenter->OnScrollJumpToTop(source); +} + +void +_ScrollPanel::OnVisualElementAnimationStarted(const VisualElementAnimation& animation, const String& keyName, VisualElement& target) +{ + ClearLastResult(); + + if (__pScrollPanelPresenter == null) + { + return; + } + + __pScrollPanelPresenter->OnVisualElementAnimationStarted(animation, keyName, target); +} + +void +_ScrollPanel::OnVisualElementAnimationRepeated(const VisualElementAnimation& animation, const String& keyName, VisualElement& target, long currentRepeatCount) +{ + ClearLastResult(); + + if (__pScrollPanelPresenter == null) + { + return; + } + + __pScrollPanelPresenter->OnVisualElementAnimationRepeated(animation, keyName, target, currentRepeatCount); +} + +void +_ScrollPanel::OnVisualElementAnimationFinished(const VisualElementAnimation& animation, const String& keyName, VisualElement& target, bool completedNormally) +{ + ClearLastResult(); + + if (__pScrollPanelPresenter == null) + { + return; + } + + __pScrollPanelPresenter->OnVisualElementAnimationFinished(animation, keyName, target, completedNormally); +} + +void +_ScrollPanel::OnTickOccurred(const VisualElementAnimation& animation, const String& keyName, VisualElement& target, const Variant& currentValue) +{ + ClearLastResult(); + + __pScrollPanelPresenter->OnTickOccurred(animation, keyName, target, currentValue); +} + +bool +_ScrollPanel::IsScrollAreaAutoResizingEnabled(void) const +{ + ClearLastResult(); + + return __autoResizingEnable; +} + +void +_ScrollPanel::SetScrollAreaAutoResizingEnabled(bool autoResizingEnable) +{ + ClearLastResult(); + + __autoResizingEnable = autoResizingEnable; +} + +FloatRectangle +_ScrollPanel::GetScrollAreaBounds(void) const +{ + ClearLastResult(); + + return __pScrollPanelPresenter->GetScrollAreaBounds(); +} + +result +_ScrollPanel::SetClientAreaHeight(float height) +{ + ClearLastResult(); + + return __pScrollPanelPresenter->SetClientAreaHeight(height); +} + +result +_ScrollPanel::SetClientAreaWidth(float width) +{ + ClearLastResult(); + + return __pScrollPanelPresenter->SetClientAreaWidth(width); +} + +result +_ScrollPanel::SetScrollAreaBounds(FloatRectangle& bounds) +{ + ClearLastResult(); + + return __pScrollPanelPresenter->SetScrollAreaBounds(bounds); +} + +void +_ScrollPanel::UpdateClientBounds(const FloatDimension& size, FloatRectangle& clientBounds) +{ + ClearLastResult(); + + if (IsFixingClientBoundsEnabled()) + { + __pScrollPanelPresenter->UpdateClientBounds(size, clientBounds); + } + else + { + _Panel::UpdateClientBounds(size, clientBounds); + } +} + +bool +_ScrollPanel::IsPageScrollEnabled(void) const +{ + ClearLastResult(); + + return __pageScrollEnabled; +} + +void +_ScrollPanel::SetPageScrollEnabled(bool enable) +{ + ClearLastResult(); + + __pageScrollEnabled = enable; +} + +FloatDimension +_ScrollPanel::GetPageScrollAlignSize(void) const +{ + ClearLastResult(); + + return __pageScrollAlignSize; +} + +void +_ScrollPanel::SetPageScrollAlignSize(FloatDimension size) +{ + ClearLastResult(); + + __pageScrollAlignSize = size; +} + +bool +_ScrollPanel::IsPageScrollFlickMoveLimitedOnePage(void) const +{ + return __pageScrollMoveOnlyOnePageOnFlick; +} + +bool +_ScrollPanel::IsScrollAnimationRunning(void) const +{ + return __pScrollPanelPresenter->IsScrollAnimationRunning(); +} + +void +_ScrollPanel::SetScrollPosition(float position, bool withAnimation) +{ + ClearLastResult(); + + __pScrollPanelPresenter->SetScrollPosition(position, withAnimation); +} + +void +_ScrollPanel::SetScrollPosition(FloatPoint position, bool withAnimation) +{ + ClearLastResult(); + + __pScrollPanelPresenter->SetScrollPosition(position, withAnimation); +} + +float +_ScrollPanel::GetScrollPosition(void) const +{ + ClearLastResult(); + + return __pScrollPanelPresenter->GetScrollPosition(); +} + +float +_ScrollPanel::GetVerticalScrollPosition(void) const +{ + ClearLastResult(); + + return __pScrollPanelPresenter->GetVerticalScrollPosition(); +} + +void +_ScrollPanel::SetVerticalScrollPosition(float position) +{ + ClearLastResult(); + + __pScrollPanelPresenter->SetVerticalScrollPosition(position); + InvalidateHierarchyAbsoluteBounds(*this); +} + +float +_ScrollPanel::GetHorizontalScrollPosition(void) const +{ + ClearLastResult(); + + return __pScrollPanelPresenter->GetHorizontalScrollPosition(); +} + +void +_ScrollPanel::SetHorizontalScrollPosition(float position) +{ + ClearLastResult(); + + __pScrollPanelPresenter->SetHorizontalScrollPosition(position); + InvalidateHierarchyAbsoluteBounds(*this); +} + +float +_ScrollPanel::CalculatePagingScrollPosition(float position) const +{ + ClearLastResult(); + + return __pScrollPanelPresenter->CalculatePagingScrollPosition(position); +} + +bool +_ScrollPanel::ScrollToControl(const _Control& source, bool recursive) +{ + ClearLastResult(); + + return __pScrollPanelPresenter->ScrollToControl(source, recursive); +} + +void +_ScrollPanel::ScrollToTop(void) const +{ + ClearLastResult(); + + __pScrollPanelPresenter->ScrollToTop(); +} + +void +_ScrollPanel::ScrollToBottom(void) const +{ + ClearLastResult(); + + __pScrollPanelPresenter->ScrollToBottom(); +} + +void +_ScrollPanel::ScrollToLeft(void) const +{ + ClearLastResult(); + + __pScrollPanelPresenter->ScrollToLeft(); +} + +void +_ScrollPanel::ScrollToRight(void) const +{ + ClearLastResult(); + + __pScrollPanelPresenter->ScrollToRight(); +} + +void +_ScrollPanel::AddScrollEventListener(const _IScrollEventListener& listener) +{ + ClearLastResult(); + result r = E_SUCCESS; + + if (__pScrollEvent == null) + { + // Create scroll event + __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 IEventListener &)listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +_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 IEventListener &)listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +_ScrollPanel::SetScrollPanelEvent(const _ScrollPanelEvent* pScrollPanelEvent) +{ + ClearLastResult(); + + __pCoreScrollPanelEvent = const_cast<_ScrollPanelEvent*>(pScrollPanelEvent); +} + +_ScrollPanelEvent* +_ScrollPanel::GetScrollPanelEvent(void) const +{ + ClearLastResult(); + + return __pCoreScrollPanelEvent; +} + +const _Control* +_ScrollPanel::GetControlKeypadBinding(void) const +{ + ClearLastResult(); + + return __pKeyPadBindingControl; +} + +void +_ScrollPanel::SetControlKeypadBinding(const _Control* pControl) +{ + ClearLastResult(); + + // pControl can be null + __pKeyPadBindingControl = pControl; +} + +ScrollPanelScrollDirection +_ScrollPanel::GetScrollDirection(void) const +{ + ClearLastResult(); + + return __scrollDirection; +} + +void +_ScrollPanel::SetScrollDirection(ScrollPanelScrollDirection direction) +{ + ClearLastResult(); + + __scrollDirection = direction; +} + +ScrollInputMode +_ScrollPanel::GetScrollInputMode(void) const +{ + ClearLastResult(); + + return __scrollInputMode; +} + +void +_ScrollPanel::SetScrollInputMode(ScrollInputMode mode) +{ + ClearLastResult(); + + __scrollInputMode = mode; +} + +bool +_ScrollPanel::IsScrollBarVisible(void) const +{ + ClearLastResult(); + + return __scrollBarVisible; +} + +void +_ScrollPanel::SetScrollBarVisible(bool scrollBarVisible) +{ + ClearLastResult(); + + __scrollBarVisible = scrollBarVisible; +} + +_Scroll* +_ScrollPanel::GetScrollBar(void) const +{ + ClearLastResult(); + + ScrollPanelScrollDirection direction = GetScrollDirection(); + if (direction == SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL) + { + return GetHorizontalScrollBar(); + } + else + { + return GetVerticalScrollBar(); + } +} +void +_ScrollPanel::SetScrollBar(const _Scroll* pScrollBar) +{ + ClearLastResult(); + + ScrollPanelScrollDirection direction = GetScrollDirection(); + if (direction == SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL) + { + SetHorizontalScrollBar(pScrollBar); + } + else + { + SetVerticalScrollBar(pScrollBar); + } +} + +_Scroll* +_ScrollPanel::GetVerticalScrollBar(void) const +{ + ClearLastResult(); + + return __pVerticalScrollBar; +} + +void +_ScrollPanel::SetVerticalScrollBar(const _Scroll* pVerticalScrollBar) +{ + ClearLastResult(); + + __pVerticalScrollBar = const_cast<_Scroll*>(pVerticalScrollBar); +} + +_Scroll* +_ScrollPanel::GetHorizontalScrollBar(void) const +{ + ClearLastResult(); + + return __pHorizontalScrollBar; +} + +void +_ScrollPanel::SetHorizontalScrollBar(const _Scroll* pHorizontalScrollBar) +{ + ClearLastResult(); + + __pHorizontalScrollBar = const_cast<_Scroll*>(pHorizontalScrollBar); +} + +bool +_ScrollPanel::IsFixingClientBoundsEnabled(void) const +{ + return __fixingClientBoundsEnable; +} + +void +_ScrollPanel::SetFixingClientBoundsEnabled(bool enable) +{ + __fixingClientBoundsEnable = enable; +} + +result +_ScrollPanel::FireOnScrollEndEvent(ScrollEndEvent scrollEndEventType) +{ + ClearLastResult(); + + if (__pScrollEvent == null) + { + return E_SUCCESS; + } + + _UiScrollEventArg* pEventArg = _UiScrollEventArg::GetScrollEventArgN(*this, scrollEndEventType); + result r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pScrollEvent->Fire(*pEventArg); + + return E_SUCCESS; +CATCH: + delete pEventArg; + + return E_SUCCESS; +} + +result +_ScrollPanel::FireOnScrollPositionChangedEvent(void) +{ + ClearLastResult(); + + return FireOnScrollPositionChangedEvent(__pScrollPanelPresenter->GetScrollPosition()); +} + +result +_ScrollPanel::FireOnScrollPositionChangedEvent(float scrollPosition) +{ + ClearLastResult(); + + if (__pScrollEvent == null) + { + return E_SUCCESS; + } + + _UiScrollEventArg* pEventArg = _UiScrollEventArg::GetScrollEventArgN(*this, scrollPosition); + result r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pScrollEvent->Fire(*pEventArg); + + return E_SUCCESS; +CATCH: + delete pEventArg; + + return E_SUCCESS; +} + +result +_ScrollPanel::FireOnScrollStoppedEvent(void) +{ + ClearLastResult(); + + if (__pScrollEvent == null) + { + return E_SUCCESS; + } + + _UiScrollEventArg* pEventArg = _UiScrollEventArg::GetScrollEventArgN(*this); + result r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pScrollEvent->Fire(*pEventArg); + + return E_SUCCESS; +CATCH: + delete pEventArg; + + return E_SUCCESS; +} + +VisualElementValueAnimation* +_ScrollPanel::GetScrollingAnimation(void) const +{ + ClearLastResult(); + + return __pScrollingAnimation; +} + +result +_ScrollPanel::FireScrollPanelEvent(const _Control& source, CoreScrollPanelStatus scrollPanelStatus) +{ + ClearLastResult(); + + if (GetControlKeypadBinding() != &source) + { + if (__pCoreScrollPanelEvent != null) + { + IEventArg* pEventArg = _ScrollPanelEvent::CreateScrollPanelEventArgN(scrollPanelStatus); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pEventArg != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pCoreScrollPanelEvent->Fire(*pEventArg); + } + } + + return E_SUCCESS; +} + +}}} // Tizen::Ui::Controls + diff --git a/src/ui/controls/FUiCtrl_ScrollPanelEvent.cpp b/src/ui/controls/FUiCtrl_ScrollPanelEvent.cpp new file mode 100644 index 0000000..658ea0c --- /dev/null +++ b/src/ui/controls/FUiCtrl_ScrollPanelEvent.cpp @@ -0,0 +1,192 @@ +// +// 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_ScrollPanelEvent.cpp +* @brief This is the implementation for the _ScrollPanelEvent class. +* @version 2.0 +*/ + +// includes +#include +#include +#include +#include "FUiCtrl_IScrollPanelEventListener.h" +#include "FUiCtrl_ScrollPanelEvent.h" + +// using namespace +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Ui; + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @class _ScrollPanelEventArg + * @brief This class is used as the argument to change event listener. + * + * This class is used as the argument to change event listener. When an change event is generated + * (such as when a button is pressed) the ScrollPanelEvent calls ScrollPanelEventListener's OnTextd + * with an instance of this class as an argument. + * + * From this class, one can find out, the (event) source object and the change ID. + */ +class _ScrollPanelEventArg + : public Tizen::Base::Runtime::IEventArg + , public Tizen::Base::Object +{ +// Lifecycle +public: + /** + * This is the default class constructor. + * + */ + _ScrollPanelEventArg(CoreScrollPanelStatus status); + + /** + * This is the class destructor. + * + */ + virtual ~_ScrollPanelEventArg(void); + + +// Access +public: + CoreScrollPanelStatus GetStatus(void) const; + +// Attribute +private: + /** + * Status + */ + CoreScrollPanelStatus __status; +}; // _ScrollPanelEventArg + +//////////////////////////////////////////////////////////////////////////////// +/// _ScrollPanelEventArg class Lifecycle + +_ScrollPanelEventArg::_ScrollPanelEventArg(CoreScrollPanelStatus status) + : __status(status) +{ + // Nothing +} + +_ScrollPanelEventArg::~_ScrollPanelEventArg(void) +{ + // Nothing. +} + +CoreScrollPanelStatus +_ScrollPanelEventArg::GetStatus(void) const +{ + return __status; +} + +//////////////////////////////////////////////////////////////////////////////// +/// _ScrollPanelEvent class Lifecycle +_ScrollPanelEvent::_ScrollPanelEvent(const _Control& source) + : __pSource(null) +{ + result r = _Event::Initialize(); + + // Set event source + if (r == E_SUCCESS) + { + __pSource = &source; + } +} + +_ScrollPanelEvent::~_ScrollPanelEvent(void) +{ + // Nothing. +} + +_ScrollPanelEvent* +_ScrollPanelEvent::CreateScrollPanelEventN(const _Control& source) +{ + _ScrollPanelEvent* pCoreScrollPanelEvent = new (std::nothrow) _ScrollPanelEvent(source); + SysTryReturn(NID_UI_CTRL, pCoreScrollPanelEvent != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + if (IsFailed(GetLastResult())) + { + goto CATCH; + } + + return pCoreScrollPanelEvent; + +CATCH: + delete pCoreScrollPanelEvent; + return null; +} + +// Accessors + +const _Control* +_ScrollPanelEvent::GetSource(void) const +{ + return __pSource; +} + +// Operations + +void +_ScrollPanelEvent::FireImpl(IEventListener& listener, const IEventArg& arg) +{ + _IScrollPanelEventListener* pScrollPanelEventListener = dynamic_cast <_IScrollPanelEventListener*>(&listener); + 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, + "[E_INVALID_ARG] Invalid argument is used. The _ScrollPanelEventArg instance is null."); + + switch (pScrollPanelEventArg->GetStatus()) + { + case CORE_OVERLAY_CONTROL_CREATED: + // notify listener + pScrollPanelEventListener->OnOverlayControlCreated(*GetSource()); + break; + + case CORE_OVERLAY_CONTROL_OPENED: + pScrollPanelEventListener->OnOverlayControlOpened(*GetSource()); + break; + + case CORE_OVERLAY_CONTROL_CLOSED: + pScrollPanelEventListener->OnOverlayControlClosed(*GetSource()); + break; + + case CORE_OTHER_CONTROL_SELECTED: + pScrollPanelEventListener->OnOtherControlSelected(*GetSource()); + break; + } + + SetLastResult(E_SUCCESS); + + return; +} + +IEventArg* +_ScrollPanelEvent::CreateScrollPanelEventArgN(CoreScrollPanelStatus status) +{ + _ScrollPanelEventArg* pEventArg = new (std::nothrow) _ScrollPanelEventArg(status); + SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + return pEventArg; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_ScrollPanelImpl.cpp b/src/ui/controls/FUiCtrl_ScrollPanelImpl.cpp new file mode 100644 index 0000000..eeda9be --- /dev/null +++ b/src/ui/controls/FUiCtrl_ScrollPanelImpl.cpp @@ -0,0 +1,622 @@ +// +// 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_ScrollPanelImpl.cpp + * @brief This is the implementation file for the %_ScrollPanelImpl class. + * + */ + +#include +#include +#include +#include +#include +#include "FApp_AppInfo.h" +#include "FUi_LayoutImpl.h" +#include "FUi_LayoutLayoutMaker.h" +#include "FUi_UiBuilder.h" +#include "FUiCtrl_Edit.h" +#include "FUiCtrl_ScrollEvent.h" +#include "FUiCtrl_ScrollEventArg.h" +#include "FUiCtrl_ScrollPanelImpl.h" +#include "FUi_CoordinateSystemUtils.h" + +using namespace Tizen::App; +using namespace Tizen::Graphics; +using namespace Tizen::Base; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_ScrollPanelImpl::_ScrollPanelImpl(Control* pPublic, _Control* pCore, Layout* pPublicPortraitLayout, Layout* pPublicLandscapeLayout) + : _PanelImpl(pPublic, pCore, pPublicPortraitLayout, pPublicLandscapeLayout) + , __pScrollEvent(null) + , __detached(false) +{ + // nothing +} + +_ScrollPanelImpl::~_ScrollPanelImpl(void) +{ + GetCore().RemoveScrollEventListener(*this); + + delete __pScrollEvent; + __pScrollEvent = null; +} + +_ScrollPanelImpl* +_ScrollPanelImpl::CreateScrollPanelImplN(ScrollPanel* pControl, const FloatRectangle& rect, ScrollPanelScrollDirection scrollDirection, bool autoResizingEnable, Layout* pPublicPortraitLayout, Layout* pPublicLandscapeLayout) +{ + ClearLastResult(); + + _ScrollPanelImpl* pImpl = null; + _ScrollPanel* pCore = null; + + if (pPublicPortraitLayout != null) + { + _LayoutImpl* pPortraitLayoutImpl = _LayoutImpl::GetInstance(*pPublicPortraitLayout); + SysTryReturn(NID_UI_CTRL, pPortraitLayoutImpl != null, null, E_INVALID_ARG, "[%s] Portrait layout is invalid object", GetErrorMessage(E_INVALID_ARG)); + } + if (pPublicLandscapeLayout != null) + { + _LayoutImpl* pLandscapeLayoutImpl = _LayoutImpl::GetInstance(*pPublicLandscapeLayout); + SysTryReturn(NID_UI_CTRL, pLandscapeLayoutImpl != null, null, E_INVALID_ARG, "[%s] Landscape layout is invalid object", GetErrorMessage(E_INVALID_ARG)); + } + + pCore = _ScrollPanel::CreateScrollPanelN(rect, scrollDirection, autoResizingEnable); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pCore != null, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + pImpl = new (std::nothrow) _ScrollPanelImpl(pControl, pCore, pPublicPortraitLayout, pPublicLandscapeLayout); + r = CheckConstruction(pCore, pImpl); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + pCore->SetFixingClientBoundsEnabled(!_AppInfo::IsOspCompat()); + + return pImpl; +} + +const _ScrollPanelImpl* +_ScrollPanelImpl::GetInstance(const ScrollPanel& scrollPanel) +{ + return static_cast(_ControlImpl::GetInstance(scrollPanel)); +} + +_ScrollPanelImpl* +_ScrollPanelImpl::GetInstance(ScrollPanel& scrollPanel) +{ + return static_cast<_ScrollPanelImpl*>(_ControlImpl::GetInstance(scrollPanel)); +} + +const char* +_ScrollPanelImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Controls::ScrollPanel"; +} + +const ScrollPanel& +_ScrollPanelImpl::GetPublic(void) const +{ + return static_cast (_ControlImpl::GetPublic()); +} + +ScrollPanel& +_ScrollPanelImpl::GetPublic(void) +{ + return static_cast (_ControlImpl::GetPublic()); +} + +const _ScrollPanel& +_ScrollPanelImpl::GetCore(void) const +{ + return static_cast (_ControlImpl::GetCore()); +} + +_ScrollPanel& +_ScrollPanelImpl::GetCore(void) +{ + return static_cast <_ScrollPanel&>(_ControlImpl::GetCore()); +} + +result +_ScrollPanelImpl::OnDetachingFromMainTree(void) +{ + __detached = true; + + return _PanelImpl::OnDetachingFromMainTree(); +} + +void +_ScrollPanelImpl::AddScrollEventListener(IScrollEventListener& listener) +{ + ClearLastResult(); + + result r = E_SUCCESS; + + if (__pScrollEvent == null) + { + __pScrollEvent = new (std::nothrow) _ScrollEvent(); + 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)); + } + + r = __pScrollEvent->AddListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + GetCore().AddScrollEventListener(*this); + r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +_ScrollPanelImpl::AddScrollEventListener(IScrollEventListenerF& listener) +{ + ClearLastResult(); + + result r = E_SUCCESS; + + if (__pScrollEvent == null) + { + __pScrollEvent = new (std::nothrow) _ScrollEvent(); + 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)); + } + + r = __pScrollEvent->AddListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + GetCore().AddScrollEventListener(*this); + r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +_ScrollPanelImpl::RemoveScrollEventListener(IScrollEventListener& listener) +{ + ClearLastResult(); + + if (__pScrollEvent != null) + { + result r = __pScrollEvent->RemoveListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } +} + +void +_ScrollPanelImpl::RemoveScrollEventListener(IScrollEventListenerF& listener) +{ + ClearLastResult(); + + if (__pScrollEvent != null) + { + result r = __pScrollEvent->RemoveListener(listener); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } +} + +void +_ScrollPanelImpl::OnScrollEndReached(_Control& source, ScrollEndEvent type) +{ + if (__detached) + { + return; + } + + if (__pScrollEvent == null) + { + return; + } + + _ScrollEventArg* pEventArg = _ScrollEventArg::GetScrollEventArgN(GetPublic(), type); + result r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pScrollEvent->Fire(*pEventArg); + + return; +CATCH: + delete pEventArg; +} + +void +_ScrollPanelImpl::OnScrollPositionChanged(_Control& source, float scrollPosition) +{ + if (__detached) + { + return; + } + + if (__pScrollEvent == null) + { + return; + } + + _ScrollEventArg* pEventArg = _ScrollEventArg::GetScrollEventArgN(GetPublic(), scrollPosition); + result r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pScrollEvent->Fire(*pEventArg); + + return; +CATCH: + delete pEventArg; +} + +void +_ScrollPanelImpl::OnScrollStopped(_Control& source) +{ + if (__detached) + { + return; + } + + if (__pScrollEvent == null) + { + return; + } + + _ScrollEventArg* pEventArg = _ScrollEventArg::GetScrollEventArgN(GetPublic()); + result r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pScrollEvent->Fire(*pEventArg); + + return; +CATCH: + delete pEventArg; +} + +float +_ScrollPanelImpl::GetScrollPosition(void) const +{ + return GetCore().GetScrollPosition(); +} + +void +_ScrollPanelImpl::SetScrollPosition(float position, bool withAnimation) +{ + GetCore().SetScrollPosition(position, withAnimation); +} + +void +_ScrollPanelImpl::ScrollToBottom(void) const +{ + const _ScrollPanel& scrollPanel = GetCore(); + if (scrollPanel.GetScrollDirection() == SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL) + { + scrollPanel.ScrollToRight(); + } + else + { + scrollPanel.ScrollToBottom(); + } +} + +void +_ScrollPanelImpl::ScrollToTop(void) const +{ + const _ScrollPanel& scrollPanel = GetCore(); + if (scrollPanel.GetScrollDirection() == SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL) + { + scrollPanel.ScrollToLeft(); + } + else + { + scrollPanel.ScrollToTop(); + } +} + +result +_ScrollPanelImpl::CloseOverlayWindow(void) +{ + ClearLastResult(); + + const _Control* pControl = GetCore().GetControlKeypadBinding(); + + _Edit* pKeypadBindingEdit = dynamic_cast <_Edit*>(const_cast <_Control*>(pControl)); + + if (pKeypadBindingEdit == null) + { + return E_SUCCESS; + } + + result r = pKeypadBindingEdit->HideKeypad(); + SysTryReturn(NID_UI_CTRL, r != E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +FloatRectangle +_ScrollPanelImpl::GetClientAreaBounds(void) const +{ + return GetCore().GetScrollAreaBounds(); +} + +result +_ScrollPanelImpl::SetClientAreaHeight(float height) +{ + return GetCore().SetClientAreaHeight(height); +} + +result +_ScrollPanelImpl::SetClientAreaWidth(float width) +{ + return GetCore().SetClientAreaWidth(width); +} + +ScrollPanelScrollDirection +_ScrollPanelImpl::GetScrollDirection(void) const +{ + return GetCore().GetScrollDirection(); +} + +bool +_ScrollPanelImpl::IsScrollAreaAutoResizingEnabled(void) const +{ + return GetCore().IsScrollAreaAutoResizingEnabled(); +} + +void +_ScrollPanelImpl::SetPageScrollEnabled(bool enable) +{ + return GetCore().SetPageScrollEnabled(enable); +} + +bool +_ScrollPanelImpl::IsPageScrollEnabled(void) const +{ + return GetCore().IsPageScrollEnabled(); +} + +void +_ScrollPanelImpl::SetScrollBarVisible(bool visible) +{ + GetCore().SetScrollBarVisible(visible); +} + +bool +_ScrollPanelImpl::IsScrollBarVisible(void) const +{ + return GetCore().IsScrollBarVisible(); +} + +void +_ScrollPanelImpl::SetScrollInputMode(ScrollInputMode mode) +{ + GetCore().SetScrollInputMode(mode); +} + +ScrollInputMode +_ScrollPanelImpl::GetScrollInputMode(void) const +{ + return GetCore().GetScrollInputMode(); +} + +class _ScrollPanelMaker + : public _UiBuilderControlMaker +{ +public: + _ScrollPanelMaker(_UiBuilder* pUibuilder) + : _UiBuilderControlMaker(pUibuilder) {}; + virtual ~_ScrollPanelMaker(void) {}; + + static _UiBuilderControlMaker* + GetInstance(_UiBuilder* pUibuilder) + { + _ScrollPanelMaker* pScrollPanelMaker = new (std::nothrow) _ScrollPanelMaker(pUibuilder); + SysTryReturn(NID_UI_CTRL, pScrollPanelMaker != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + return pScrollPanelMaker; + }; + +protected: + virtual Control* + Make(_UiBuilderControl* pControl) + { + result r = E_SYSTEM; + + ScrollPanel* pScrollPanel = null; + FloatRectangle rect; + + _UiBuilderControlLayout* pControlProperty = null; + _UiBuilderLayoutType layoutType = UIBUILDER_LAYOUT_NONE; + + Color color; + + int opacity = 100; + ScrollPanelScrollDirection scrollDirection = SCROLL_PANEL_SCROLL_DIRECTION_VERTICAL; + bool autoResizingEnabled = true; + + String elementString; + GetProperty(pControl, &pControlProperty); + SysTryReturn(NID_UI_CTRL, pControlProperty != null, null, E_SYSTEM, "[E_SYSTEM] A system error occurred. pControlProperty is invalid pointer."); + + if(pControl->GetParentWin().IsEmpty()) + { + pScrollPanel = static_cast (GetContainer()); + } + else + { + 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)); + rect = pControlProperty->GetRectF(); + + // Construct + __pLayoutMaker->GetLayoutType(pControlProperty, layoutType); + + // ScrollDirection + if (pControl->GetElement(L"scrollDirection", elementString) || pControl->GetElement(L"ScrollDirection", elementString)) + { + if (elementString.Equals(L"SCROLL_PANEL_SCROLL_DIRECTION_VERTICAL", false)) + { + scrollDirection = SCROLL_PANEL_SCROLL_DIRECTION_VERTICAL; + } + else if (elementString.Equals(L"SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL", false)) + { + scrollDirection = SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL; + } + } + + // AutoResizingEnabled + if (pControl->GetElement(L"autoResizingEnabled", elementString) || pControl->GetElement(L"AutoResizingEnabled", elementString)) + { + if (elementString.Equals(L"false", false)) + { + autoResizingEnabled = false; + } + else if (elementString.Equals(L"true", false)) + { + autoResizingEnabled = true; + } + } + + if (layoutType == UIBUILDER_LAYOUT_NONE) + { + r = pScrollPanel->Construct(rect, scrollDirection, autoResizingEnabled); + } + else + { + Layout* pPortraitLayout = null; + Layout* pLandscapeLayout = null; + result tempResult = E_SUCCESS; + tempResult = __pLayoutMaker->GetLayoutN(pControl, pPortraitLayout, pLandscapeLayout); + if (E_SUCCESS == tempResult) + { + //CONSTRUCT_WITH_LAYOUT_ARG1(pScrollPanel, rect); + r = pScrollPanel->Construct(*pPortraitLayout, *pLandscapeLayout, rect, scrollDirection, autoResizingEnabled); + } + else + { + r = tempResult; + } + delete pPortraitLayout; + if (pPortraitLayout != pLandscapeLayout) + { + delete pLandscapeLayout; + } + } + if (r != E_SUCCESS) + { + delete pScrollPanel; + return null; + } + + if (pControl->GetElement("backgroundColorOpacity", elementString) || pControl->GetElement("BGColorOpacity", elementString) || pControl->GetElement("backgroundOpacity", elementString)) + { + Integer::Parse(elementString, opacity); + } + + if (pControl->GetElement("backgroundColor", elementString) || pControl->GetElement("BGColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + pScrollPanel->SetBackgroundColor(color); + } + else + { + color = pScrollPanel->GetBackgroundColor(); + color.SetAlpha(ConvertOpacity100to255(opacity)); + pScrollPanel->SetBackgroundColor(color); + } + + if (!autoResizingEnabled) + { + if (scrollDirection == SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL) + { + // ClientAreaWidth + if (pControl->GetElement(L"clientAreaWidth", elementString) || pControl->GetElement(L"ClientAreaWidth", elementString)) + { + float width = 0.0f; + width = _LocalizedNumParser::ToDouble(elementString, "C"); + pScrollPanel->SetClientAreaWidth(width); + } + } + else if (scrollDirection == SCROLL_PANEL_SCROLL_DIRECTION_VERTICAL) + { + // ClientAreaHeight + if (pControl->GetElement(L"clientAreaHeight", elementString) || pControl->GetElement(L"ClientAreaHeight", elementString)) + { + float height = 0.0f; + height = _LocalizedNumParser::ToDouble(elementString, "C"); + pScrollPanel->SetClientAreaWidth(height); + } + } + } + + // PageScrollEnabled + if (pControl->GetElement(L"pageScrollEnabled", elementString) || pControl->GetElement(L"PageScrollEnabled", elementString)) + { + if (elementString.Equals(L"false", false)) + { + pScrollPanel->SetPageScrollEnabled(false); + } + else if (elementString.Equals(L"true", false)) + { + pScrollPanel->SetPageScrollEnabled(true); + } + } + + // ScrollBarVisible + if (pControl->GetElement(L"scrollBarVisible", elementString) || pControl->GetElement(L"ScrollBarVisible", elementString)) + { + if (elementString.Equals(L"false", false)) + { + pScrollPanel->SetScrollBarVisible(false); + } + else if (elementString.Equals(L"true", false)) + { + pScrollPanel->SetScrollBarVisible(true); + } + } + + // ScrollInputMode + if (pControl->GetElement(L"scrollInputMode", elementString) || pControl->GetElement(L"ScrollInputMode", elementString)) + { + if (elementString.Equals(L"SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION", false)) + { + pScrollPanel->SetScrollInputMode(SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION); + } + else if (elementString.Equals(L"SCROLL_INPUT_MODE_RESTRICT_TO_INITIAL_DIRECTION", false)) + { + pScrollPanel->SetScrollInputMode(SCROLL_INPUT_MODE_RESTRICT_TO_INITIAL_DIRECTION); + } + } + + return pScrollPanel; + } + +private: +}; // _ScrollPanelMaker + +_ScrollPanelRegister::_ScrollPanelRegister(void) +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->RegisterControl(L"ScrollPanel", _ScrollPanelMaker::GetInstance); +} +_ScrollPanelRegister::~_ScrollPanelRegister(void) +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->UnregisterControl(L"ScrollPanel"); +} +static _ScrollPanelRegister ScrollPanelRegisterToUiBuilder; +}}} // Tizen::Ui::Controls + diff --git a/src/ui/controls/FUiCtrl_ScrollPanelModel.cpp b/src/ui/controls/FUiCtrl_ScrollPanelModel.cpp new file mode 100644 index 0000000..bd8e4b0 --- /dev/null +++ b/src/ui/controls/FUiCtrl_ScrollPanelModel.cpp @@ -0,0 +1,102 @@ +// +// 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_ScrollPanelModel.cpp + * @brief This is the implementation file for the %_ScrollPanelModel class. + * + */ + +#include +#include +#include +#include "FUiCtrl_ScrollPanelModel.h" + +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_ScrollPanelModel::_ScrollPanelModel(void) + : __currentScrollPosition(FloatPoint(0.0f, 0.0f)) + , __scrollAreaBounds(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f)) +{ + // nothing +} + +_ScrollPanelModel::~_ScrollPanelModel(void) +{ + // nothing +} + +void +_ScrollPanelModel::SetCurrentScrollPosition(float currentScrollHorizontalPosition, float currentScrollVerticalPosition) +{ + SetCurrentHorizontalScrollPosition(currentScrollHorizontalPosition); + SetCurrentVerticalScrollPosition(currentScrollVerticalPosition); +} + +void +_ScrollPanelModel::SetCurrentScrollPosition(FloatPoint& currentScrollPosition) +{ + __currentScrollPosition = currentScrollPosition; +} + +FloatPoint +_ScrollPanelModel::GetCurrentScrollPosition(void) const +{ + return __currentScrollPosition; +} + +void +_ScrollPanelModel::SetCurrentVerticalScrollPosition(float currentVerticalScrollPosition) +{ + __currentScrollPosition.y = currentVerticalScrollPosition; +} + +float +_ScrollPanelModel::GetCurrentVerticalScrollPosition(void) const +{ + return __currentScrollPosition.y; +} + +void +_ScrollPanelModel::SetCurrentHorizontalScrollPosition(float currentHorizontalScrollPosition) +{ + __currentScrollPosition.x = currentHorizontalScrollPosition; +} + +float +_ScrollPanelModel::GetCurrentHorizontalScrollPosition(void) const +{ + return __currentScrollPosition.x; +} + +void +_ScrollPanelModel::SetScrollAreaBounds(FloatRectangle& areaBounds) +{ + __scrollAreaBounds = areaBounds; +} + +FloatRectangle +_ScrollPanelModel::GetScrollAreaBounds(void) const +{ + return __scrollAreaBounds; +} + +}}} // Tizen::Ui::Controls + diff --git a/src/ui/controls/FUiCtrl_ScrollPanelPresenter.cpp b/src/ui/controls/FUiCtrl_ScrollPanelPresenter.cpp new file mode 100644 index 0000000..77abf76 --- /dev/null +++ b/src/ui/controls/FUiCtrl_ScrollPanelPresenter.cpp @@ -0,0 +1,2104 @@ +// +// 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_ScrollPanelPresenter.cpp + * @brief This is the implementation file for the %_ScrollPanelPresenter class. + * + */ + +#include +#include +#include +#include +#include +#include +#include "FUi_Math.h" +#include "FUi_ResourceManager.h" +#include "FUi_UiTouchEvent.h" +#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" +#include "FUiCtrl_ScrollPanelPresenter.h" +#include "FUiCtrl_ScrollPanelModel.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Ui::Animations; +using namespace Tizen::Base::Runtime; + +namespace +{ +static const float SCROLL_PANEL_OVERSCROLLING_MAX_DISTANCCE = 100.0f; +static const float SCROLL_PANEL_FIXED_FLICK_AMOUNT = 1000.0f; + +static const int SCROLL_PANEL_SCROLLING_ANIMATION_DURATION = 1000; +static const int SCROLL_PANEL_SCROLL_BAR_LOAD_EFFECT_TIMER_DURATION = 1000; + +static const String SCROLLING_ANIMATION_NAME(L"SCROLL_PANEL_SCROLLING_ANIMATION"); +} + +namespace Tizen { namespace Ui { namespace Controls +{ + +_ScrollPanelPresenter::_ScrollPanelPresenter(void) + : __pScrollPanel(null) + , __pScrollPanelModel(null) + , __limitAnimationDistance(0.0f) + , __pPressedControl(null) + , __subControlMoved(false) + , __touchPressed(false) + , __scrollOccured(false) + , __modelUpdating(false) + , __scrollAnimationRunning(false) + , __flickRunning(false) + , __pScrollBarLoadEffectTimer(null) + , __scrollBarLoadEffectStatus(_SCROLL_PANEL_SCROLL_BAR_LOAD_EFFECT_UNLOAD) + , __firstDrawn(false) + , __firstTouchMove(true) + , __firstScrollMoveDirection(SCROLL_PANEL_SCROLL_DIRECTION_VERTICAL) + , __jumpToTopRunning(false) +{ + // nothing +} + +_ScrollPanelPresenter::~_ScrollPanelPresenter(void) +{ + delete __pScrollBarLoadEffectTimer; + __pScrollBarLoadEffectTimer = null; + + delete __pScrollPanelModel; + __pScrollPanelModel = null; +} + +result +_ScrollPanelPresenter::Initialize(_ScrollPanel& scrollPanel) +{ + result r = _PanelPresenter::Initialize(scrollPanel); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __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] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + __pScrollPanelModel = pModel; + + return E_SUCCESS; +} + +result +_ScrollPanelPresenter::Draw(void) +{ + + if (!__firstDrawn) + { + if (__scrollBarLoadEffectStatus == _SCROLL_PANEL_SCROLL_BAR_LOAD_EFFECT_LOADING) + { + DoScrollBarLoadEffect(); + } + + __firstDrawn = true; + } + + if (__pScrollPanel->GetBackgroundBitmap() == null) + { + return E_SUCCESS; + } + + Canvas* pCanvas = __pScrollPanel->GetVisualElement()->GetCanvasN(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pCanvas != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pCanvas->Clear(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + DrawBackgrounBitmap(pCanvas); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + // fall throw +CATCH: + delete pCanvas; + + return r; +} + +result +_ScrollPanelPresenter::OnBoundsChanging(const FloatRectangle& bounds) +{ + if (__scrollAnimationRunning) + { + StopScrollingAnimation(); + } + + if (!__modelUpdating) + { + __modelUpdating = true; + __previousBounds = __pScrollPanel->GetBoundsF(); + __previousScrollAreaBounds = GetScrollAreaBounds(); + } + + return E_SUCCESS; +} + +void +_ScrollPanelPresenter::OnBoundsChanged(void) +{ + AdjustModel(); + ScrollToFocusedControl(); +} + +void +_ScrollPanelPresenter::OnChildAttached(const _Control& child) +{ + if (child.GetArea() != _CONTROL_AREA_SYSTEM) + { + if (__pScrollPanel->IsScrollAreaAutoResizingEnabled()) + { + UpdateLayout(); + + if (!__modelUpdating) + { + __modelUpdating = true; + __previousBounds = __pScrollPanel->GetBoundsF(); + __previousScrollAreaBounds = GetScrollAreaBounds(); + } + AdjustModel(); + } + + _AccessibilityContainer* pChildAccessibilityContainer = (const_cast<_Control&>(child)).GetAccessibilityContainer(); + pChildAccessibilityContainer->AddListener(*__pScrollPanel); + } + +} + +void +_ScrollPanelPresenter::OnChildDetached(const _Control& child) +{ + if (child.GetArea() != _CONTROL_AREA_SYSTEM) + { + if (__pScrollPanel->IsScrollAreaAutoResizingEnabled()) + { + UpdateLayout(); + + if (!__modelUpdating) + { + __modelUpdating = true; + __previousBounds = __pScrollPanel->GetBoundsF(); + __previousScrollAreaBounds = GetScrollAreaBounds(); + } + AdjustModel(); + } + + _AccessibilityContainer* pChildAccessibilityContainer = (const_cast<_Control&>(child)).GetAccessibilityContainer(); + pChildAccessibilityContainer->RemoveListener(*__pScrollPanel); + } + +} + +void +_ScrollPanelPresenter::OnChildBoundsChanged(const _Control& child) +{ + if (child.GetArea() != _CONTROL_AREA_SYSTEM) + { + if (__pScrollPanel->IsScrollAreaAutoResizingEnabled()) + { + if (!__modelUpdating) + { + __modelUpdating = true; + __previousBounds = __pScrollPanel->GetBoundsF(); + __previousScrollAreaBounds = GetScrollAreaBounds(); + } + AdjustModel(); + ScrollToFocusedControl(); + } + } +} + +void +_ScrollPanelPresenter::SetScrollPosition(FloatPoint position, bool withAnimation) +{ + if (__pScrollPanel->GetScrollDirection() == SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL) + { + SetScrollPosition(position.x, withAnimation); + } + else + { + SetScrollPosition(position.y, withAnimation); + } +} + +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)); + } +} + +float +_ScrollPanelPresenter::GetScrollPosition(void) const +{ + float scrollPosition = GetScrollPositionInternal(); + return FixScrollPositionIntoScrollAreaBounds(scrollPosition); +} + +float +_ScrollPanelPresenter::GetVerticalScrollPosition(void) const +{ + float scrollPosition = GetVerticalScrollPositionInternal(); + return FixScrollPositionIntoScrollAreaBounds(scrollPosition); +} + +void +_ScrollPanelPresenter::SetVerticalScrollPosition(float position) +{ + SetScrollPosition(position, true); +} + +float +_ScrollPanelPresenter::GetHorizontalScrollPosition(void) const +{ + float scrollPosition = GetHorizontalScrollPositionInternal(); + return FixScrollPositionIntoScrollAreaBounds(scrollPosition); +} + +void +_ScrollPanelPresenter::SetHorizontalScrollPosition(float position) +{ + SetScrollPosition(position, true); +} + +float +_ScrollPanelPresenter::GetScrollPositionInternal(void) const +{ + ScrollPanelScrollDirection scrollDirection = __pScrollPanel->GetScrollDirection(); + + if (scrollDirection == SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL) + { + return GetHorizontalScrollPositionInternal(); + } + else + { + return GetVerticalScrollPositionInternal(); + } +} + +void +_ScrollPanelPresenter::SetScrollPositionInternal(float position) +{ + ScrollPanelScrollDirection scrollDirection = __pScrollPanel->GetScrollDirection(); + if (scrollDirection == SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL) + { + SetHorizontalScrollPositionInternal(position); + } + else + { + SetVerticalScrollPositionInternal(position); + } +} + +float +_ScrollPanelPresenter::GetVerticalScrollPositionInternal(void) const +{ + return __pScrollPanelModel->GetCurrentVerticalScrollPosition(); +} + +void +_ScrollPanelPresenter::SetVerticalScrollPositionInternal(float position) +{ + __pScrollPanelModel->SetCurrentVerticalScrollPosition(position); +} + +float +_ScrollPanelPresenter::GetHorizontalScrollPositionInternal(void) const +{ + return __pScrollPanelModel->GetCurrentHorizontalScrollPosition(); +} + +void +_ScrollPanelPresenter::SetHorizontalScrollPositionInternal(float position) +{ + __pScrollPanelModel->SetCurrentHorizontalScrollPosition(position); +} + +void +_ScrollPanelPresenter::StopScrollingAnimation(void) +{ + __scrollAnimationRunning = false; + __pScrollPanel->GetVisualElement()->RemoveAnimation(SCROLLING_ANIMATION_NAME); +} + +float +_ScrollPanelPresenter::FixScrollPositionIntoScrollAreaBounds(float position) const +{ + return FixScrollPositionIntoScrollAreaBounds(position, __pScrollPanel->GetBoundsF(), GetScrollAreaBounds()); +} + +float +_ScrollPanelPresenter::FixScrollPositionIntoScrollAreaBounds(float position, FloatRectangle bounds, FloatRectangle scrollArea) const +{ + float minScrollPosition = 0.0f; + float maxScrollPosition = 0.0f; + if (__pScrollPanel->GetScrollDirection() == SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL) + { + minScrollPosition = scrollArea.x; + maxScrollPosition = scrollArea.x + scrollArea.width - bounds.width; + } + else + { + minScrollPosition = scrollArea.y; + maxScrollPosition = scrollArea.y + scrollArea.height - bounds.height; + } + + if (minScrollPosition > maxScrollPosition) + { + maxScrollPosition = minScrollPosition; + } + if (position < minScrollPosition) + { + position = minScrollPosition; + } + if (position > maxScrollPosition) + { + position = maxScrollPosition; + } + + return position; +} + +void +_ScrollPanelPresenter::ScrollToTop(void) +{ + SetVerticalScrollPosition(GetScrollAreaBounds().y); +} + +void +_ScrollPanelPresenter::ScrollToBottom(void) +{ + SetVerticalScrollPosition(GetScrollAreaBounds().height - __pScrollPanel->GetBoundsF().height); +} + +void +_ScrollPanelPresenter::ScrollToLeft(void) +{ + SetHorizontalScrollPosition(GetScrollAreaBounds().x); +} + +void +_ScrollPanelPresenter::ScrollToRight(void) +{ + SetHorizontalScrollPosition(GetScrollAreaBounds().width - __pScrollPanel->GetBoundsF().width); +} + +result +_ScrollPanelPresenter::RunTouchPressed(const _Control& source, const _TouchInfo& touchInfo) +{ + // stop flick, stop scroll animation + if (__flickRunning || __scrollAnimationRunning) + { + if (!__jumpToTopRunning) + { + StopScrollingAnimation(); + } + + __jumpToTopRunning = false; + } + + __currentMovedPosition = FloatPoint(touchInfo.GetCurrentPosition().x, touchInfo.GetCurrentPosition().y); + __previousTouchedPosition = __currentMovedPosition; + __pPressedControl = &(const_cast<_Control&>(source)); + __subControlMoved = false; + __touchPressed = true; + __firstTouchMove = true; + + return E_SUCCESS; +} + +result +_ScrollPanelPresenter::RunPreviewTouchMoved(const _Control& source, const _TouchInfo& touchInfo) +{ + if (__pPressedControl == &source && __touchPressed) + { + __previousTouchedPosition = __currentMovedPosition; + __currentMovedPosition = FloatPoint(touchInfo.GetCurrentPosition().x, touchInfo.GetCurrentPosition().y); + + if (__pScrollPanel != &source) + { + __subControlMoved = true; + } + + if (__firstTouchMove) + { + ScrollPanelScrollDirection scrollDirection = __pScrollPanel->GetScrollDirection(); + float scrollDistanceX = __previousTouchedPosition.x - __currentMovedPosition.x; + float scrollDistanceY = __previousTouchedPosition.y - __currentMovedPosition.y; + + if (_Abs(scrollDistanceY) < _Abs(scrollDistanceX)) + { + __firstScrollMoveDirection = SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL; + } + else if (_Abs(scrollDistanceY) > _Abs(scrollDistanceX)) + { + __firstScrollMoveDirection = SCROLL_PANEL_SCROLL_DIRECTION_VERTICAL; + } + else + { + __firstScrollMoveDirection = scrollDirection; + } + + __firstTouchMove = false; + } + } + + return E_SUCCESS; +} + +result +_ScrollPanelPresenter::RunTouchReleased(const _Control& source, const _TouchInfo& touchInfo) +{ + SysTryReturn(NID_UI_CTRL, __pPressedControl == &source, E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] source has changed during touch process.", GetErrorMessage(E_INVALID_OPERATION)); + + __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)); + } + } + + // scrollpanel child control touch released + if (__pScrollPanel != &source) + { + // for ScrollPanelEventListener + if (__subControlMoved) + { + __pScrollPanel->FireScrollPanelEvent(source, CORE_OTHER_CONTROL_SELECTED); + } + } + + __pPressedControl = null; + __subControlMoved = false; + + if (!__scrollAnimationRunning) + { + RollbackBouncing(true); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + FadeOutScrollBar(); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (__scrollOccured) + { + __scrollOccured = false; + __pScrollPanel->FireOnScrollStoppedEvent(); + } + } + + return E_SUCCESS; +} + +result +_ScrollPanelPresenter::RunTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + SysTryReturn(NID_UI_CTRL, __pPressedControl == &source, E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] source has changed during touch process.", GetErrorMessage(E_INVALID_OPERATION)); + + __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; + + if (!__scrollAnimationRunning) + { + RollbackBouncing(true); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + FadeOutScrollBar(); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + if (__scrollOccured && !__scrollAnimationRunning) + { + __scrollOccured = false; + __pScrollPanel->FireOnScrollStoppedEvent(); + } + + return E_SUCCESS; +} + +_UiTouchEventDelivery +_ScrollPanelPresenter::OnPreviewTouchPressed(const _Control& source, const _TouchInfo& touchInfo) +{ + return _UI_TOUCH_EVENT_DELIVERY_FORCED_YES; +} + +_UiTouchEventDelivery +_ScrollPanelPresenter::OnPreviewTouchMoved(const _Control& source, const _TouchInfo& touchInfo) +{ + RunPreviewTouchMoved(source, touchInfo); + + return _UI_TOUCH_EVENT_DELIVERY_YES; +} + +_UiTouchEventDelivery +_ScrollPanelPresenter::OnPreviewTouchReleased(const _Control& source, const _TouchInfo& touchInfo) +{ + return _UI_TOUCH_EVENT_DELIVERY_FORCED_YES; +} + +_UiTouchEventDelivery +_ScrollPanelPresenter::OnPreviewTouchCanceled(const _Control& source, const _TouchInfo& touchInfo) +{ + return _UI_TOUCH_EVENT_DELIVERY_FORCED_YES; +} + +bool +_ScrollPanelPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& touchInfo) +{ + result r = RunTouchPressed(source, touchInfo); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, true, r, "[%s] Propagating.", GetErrorMessage(r)); + + return true; +} + +bool +_ScrollPanelPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchInfo) +{ + if (__pPressedControl != &source) + { + return false; + } + + if (!__touchPressed) + { + return false; + } + + if (!IsScrollable()) + { + return false; + } + + FloatPoint touchPoint = FloatPoint(touchInfo.GetCurrentPosition().x, touchInfo.GetCurrentPosition().y); + if (!_FloatCompare(__currentMovedPosition.x, touchPoint.x) + || !_FloatCompare(__currentMovedPosition.y, touchPoint.y)) + { + RunPreviewTouchMoved(source, touchInfo); + } + + // calculate move distance + ScrollPanelScrollDirection scrollDirection = __pScrollPanel->GetScrollDirection(); + ScrollInputMode scrollInputMode = __pScrollPanel->GetScrollInputMode(); + float scrollDistance = 0.0f; + float scrollDistanceX = __previousTouchedPosition.x - __currentMovedPosition.x; + float scrollDistanceY = __previousTouchedPosition.y - __currentMovedPosition.y; + + if (scrollInputMode == SCROLL_INPUT_MODE_RESTRICT_TO_INITIAL_DIRECTION) + { + if (scrollDirection == __firstScrollMoveDirection) + { + if (scrollDirection == SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL) + { + scrollDistance = scrollDistanceX; + } + else if (scrollDirection == SCROLL_PANEL_SCROLL_DIRECTION_VERTICAL) + { + scrollDistance = scrollDistanceY; + } + } + else + { + RollbackBouncing(true); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, r, "[%s] Propagating.", GetErrorMessage(r)); + + FadeOutScrollBar(); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, r, "[%s] Propagating.", GetErrorMessage(r)); + + if ((__firstScrollMoveDirection == SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL && _Abs(scrollDistanceY) > _Abs(scrollDistanceX)) + || (__firstScrollMoveDirection == SCROLL_PANEL_SCROLL_DIRECTION_VERTICAL && _Abs(scrollDistanceY) < _Abs(scrollDistanceX))) + { + return true; + } + else + { + return false; + } + } + } + else + { + if (scrollDirection == SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL) + { + if (_Abs(scrollDistanceY) <= _Abs(scrollDistanceX)) + { + scrollDistance = scrollDistanceX; + } + else + { + return false; + } + } + else if (scrollDirection == SCROLL_PANEL_SCROLL_DIRECTION_VERTICAL) + { + if (_Abs(scrollDistanceY) >= _Abs(scrollDistanceX)) + { + scrollDistance = scrollDistanceY; + } + else + { + return false; + } + } + } + + if (!_FloatCompare(scrollDistance, 0.0f)) + { + FadeInScrollBar(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, true, r, "[%s] Propagating.", GetErrorMessage(r)); + + float realMoveDistance = ScrollTo(scrollDistance + GetScrollPositionInternal()); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (_FloatCompare(realMoveDistance, 0.0f)) + { + // not moved and bubbling + if (scrollInputMode == SCROLL_INPUT_MODE_RESTRICT_TO_INITIAL_DIRECTION) + { + if (scrollDirection == SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL) + { + if (_Abs(scrollDistanceY) < _Abs(scrollDistanceX)) + { + return false; + } + else + { + return true; + } + } + else if (scrollDirection == SCROLL_PANEL_SCROLL_DIRECTION_VERTICAL) + { + if (_Abs(scrollDistanceY) > _Abs(scrollDistanceX)) + { + return false; + } + else + { + return true; + } + } + } + else + { + return false; + } + } + + } + else + { + return true; + } + + return true; +} + +bool +_ScrollPanelPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchInfo) +{ + result r = RunTouchReleased(source, touchInfo); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, true, r, "[%s] Propagating.", GetErrorMessage(r)); + + return true; +} + +bool +_ScrollPanelPresenter::OnTouchCanceled(const _Control& source, const _TouchInfo& touchInfo) +{ + result r = RunTouchCanceled(source, touchInfo); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, true, r, "[%s] Propagating.", GetErrorMessage(r)); + + return true; +} + +void +_ScrollPanelPresenter::OnTouchMoveHandled(const _Control& control) +{ + RollbackBouncing(true); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + FadeOutScrollBar(); + r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +_ScrollPanelPresenter::OnScrollEndReached(_Control& source, ScrollEndEvent type) +{ +} + +void +_ScrollPanelPresenter::OnScrollPositionChanged(_Control& source, float scrollPosition) +{ + if (&source != __pScrollPanel->GetScrollBar()) + { + return; + } + + FadeInScrollBar(); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + SetScrollPosition(scrollPosition, false); +} + +void +_ScrollPanelPresenter::OnScrollStopped(_Control& source) +{ + if (&source != __pScrollPanel->GetScrollBar()) + { + return; + } + + FadeOutScrollBar(); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +_ScrollPanelPresenter::OnScrollJumpToTop(_Control& source) +{ + if (&source != __pScrollPanel->GetScrollBar()) + { + return; + } + + __jumpToTopRunning = true; + SetScrollPosition(0, true); +} + +bool +_ScrollPanelPresenter::DoFlickGestureRecognized(_TouchFlickGestureDetector& gesture) +{ + if (!IsScrollable()) + { + return false; + } + + FloatRectangle scrollArea = GetScrollAreaBounds(); + FloatRectangle scrollPanelBounds = __pScrollPanel->GetBoundsF(); + + float distanceX = 0.0f; + float distanceY = 0.0f; + gesture.GetDistance(distanceX, distanceY); + _FlickDirection moveDirection = _FLICK_DIRECTION_NONE; + + if (_Abs(distanceX) > _Abs(distanceY)) + { + if (distanceX < 0.0f) + { + moveDirection = _FLICK_DIRECTION_LEFT; + } + else if (distanceX > 0.0f) + { + moveDirection = _FLICK_DIRECTION_RIGHT; + } + } + else + { + if (distanceY < 0.0f) + { + moveDirection = _FLICK_DIRECTION_UP; + } + else if (distanceY > 0.0f) + { + moveDirection = _FLICK_DIRECTION_DOWN; + } + } + + if (__pScrollPanel->GetScrollDirection() == SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL) + { + if (moveDirection != _FLICK_DIRECTION_RIGHT && moveDirection != _FLICK_DIRECTION_LEFT) + { + return false; + } + } + else + { + if (moveDirection != _FLICK_DIRECTION_DOWN && moveDirection != _FLICK_DIRECTION_UP) + { + return false; + } + } + + if (__pScrollPanel->IsPageScrollEnabled() && __pScrollPanel->IsPageScrollFlickMoveLimitedOnePage()) + { + float currentScrollPosition = GetScrollPosition(); + float targetPosition = currentScrollPosition; + + if (__pScrollPanel->GetScrollDirection() == SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL) + { + float pageSize = __pScrollPanel->GetPageScrollAlignSize().width; + + // to right page + if (moveDirection == _FLICK_DIRECTION_LEFT) + { + targetPosition = (((int)(currentScrollPosition / pageSize)) + 1) * pageSize; + } + // to left page + else if (moveDirection == _FLICK_DIRECTION_RIGHT) + { + targetPosition = ((int)(currentScrollPosition / pageSize)) * pageSize; + } + } + else + { + float pageSize = __pScrollPanel->GetPageScrollAlignSize().height; + + // to down page + if (moveDirection == _FLICK_DIRECTION_UP) + { + targetPosition = (((int)(currentScrollPosition / pageSize)) + 1) * pageSize; + } + // to up page + else if (moveDirection == _FLICK_DIRECTION_DOWN) + { + targetPosition = ((int)(currentScrollPosition / pageSize)) * pageSize; + } + } + + targetPosition = FixScrollPositionIntoScrollAreaBounds(targetPosition); + if (_FloatCompare(targetPosition, currentScrollPosition)) + { + return false; + } + + __flickRunning = true; + + ScrollTo(targetPosition, true); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, r, "[%s] Propagating.", GetErrorMessage(r)); + + FadeInScrollBar(); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, r, "[%s] Propagating.", GetErrorMessage(r)); + + return true; + } + else + { + float moveAmount = 0.0f; + float flickAmount = 0.0f; + + // calculate flick amount + if (__pScrollPanel->GetScrollDirection() == SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL) + { + flickAmount = CalculateFlickAmount(distanceX, gesture.GetDuration()); + } + else + { + flickAmount = CalculateFlickAmount(distanceY, gesture.GetDuration()); + } + + moveAmount = -flickAmount; + + // page align + if (__pScrollPanel->IsPageScrollEnabled()) + { + float scrollPosition = 0.0f; + float maxPosition = 0.0f; + float pageSize = 0.0f; + + if (__pScrollPanel->GetScrollDirection() == SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL) + { + pageSize = __pScrollPanel->GetPageScrollAlignSize().width; + maxPosition = scrollArea.width - scrollPanelBounds.width; + scrollPosition = __pScrollPanelModel->GetCurrentHorizontalScrollPosition(); + } + else + { + pageSize = __pScrollPanel->GetPageScrollAlignSize().height; + maxPosition = scrollArea.height - scrollPanelBounds.height; + scrollPosition = __pScrollPanelModel->GetCurrentVerticalScrollPosition(); + } + + int lowerPageIndex = (scrollPosition + moveAmount) / pageSize; + float targetPageMin = pageSize * lowerPageIndex; + float pageGap = (scrollPosition + moveAmount) - targetPageMin; + float targetPageMax = targetPageMin + pageSize; + + if (pageGap <= targetPageMax - targetPageMin - pageGap) + { + moveAmount = targetPageMin - scrollPosition; + } + else + { + moveAmount = targetPageMax - scrollPosition; + } + } + + if (!_FloatCompare(moveAmount, 0.0f)) + { + // scroll with animation + __flickRunning = true; + + if (AccumulateFlickGesture(moveDirection)) + { + return true; + } + + // limited flick amount + float targetPosition = moveAmount + GetScrollPositionInternal(); + float scrollToPosition = FixScrollPositionIntoScrollAreaBounds(targetPosition); + if (_Abs(scrollToPosition - targetPosition) > SCROLL_PANEL_OVERSCROLLING_MAX_DISTANCCE) + { + switch (moveDirection) + { + case _FLICK_DIRECTION_UP: + targetPosition = scrollArea.height - scrollPanelBounds.height + SCROLL_PANEL_OVERSCROLLING_MAX_DISTANCCE; + break; + case _FLICK_DIRECTION_DOWN: + targetPosition = scrollArea.y - SCROLL_PANEL_OVERSCROLLING_MAX_DISTANCCE; + break; + case _FLICK_DIRECTION_LEFT: + targetPosition = scrollArea.width - scrollPanelBounds.width + SCROLL_PANEL_OVERSCROLLING_MAX_DISTANCCE; + break; + case _FLICK_DIRECTION_RIGHT: + targetPosition = scrollArea.x - SCROLL_PANEL_OVERSCROLLING_MAX_DISTANCCE; + break; + default: + break; + } + } + + FlickTo(targetPosition, gesture.GetDuration()); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, r, "[%s] Propagating.", GetErrorMessage(r)); + + FadeInScrollBar(); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, r, "[%s] Propagating.", GetErrorMessage(r)); + + return true; + } + else + { + return false; + } + } +} + +bool +_ScrollPanelPresenter::OnFlickGestureDetected(_TouchFlickGestureDetector& gesture) +{ + return DoFlickGestureRecognized(gesture); +} + +bool +_ScrollPanelPresenter::OnFlickGestureCanceled(_TouchFlickGestureDetector& gesture) +{ + StopScrollingAnimation(); + RollbackBouncing(true); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, r, "[%s] Propagating.", GetErrorMessage(r)); + + return false; +} + +bool +_ScrollPanelPresenter::IsControlOutOfView(const _Control& control) const +{ + FloatRectangle controlBounds = control.GetAbsoluteBoundsF(true); + FloatRectangle scrollPanelBounds = __pScrollPanel->GetAbsoluteBoundsF(true); + + // is control out of view area + if (__pScrollPanel->GetScrollDirection() == SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL) + { + if (controlBounds.x < scrollPanelBounds.x || controlBounds.x + controlBounds.width > scrollPanelBounds.x + scrollPanelBounds.width) + { + return true; + } + } + else + { + if (controlBounds.y < scrollPanelBounds.y || controlBounds.y + controlBounds.height > scrollPanelBounds.y + scrollPanelBounds.height) + { + return true; + } + } + + return false; +} + +void +_ScrollPanelPresenter::ScrollToControlWhenOutOfView(const _Control& control) +{ + if (IsControlOutOfView(control)) + { + ScrollToControl(control, true); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } +} + +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 +{ + float maxPosition = 0.0f; + float pageSize = 0.0f; + + if (__pScrollPanel->GetScrollDirection() == SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL) + { + pageSize = __pScrollPanel->GetPageScrollAlignSize().width; + maxPosition = GetScrollAreaBounds().width - __pScrollPanel->GetBoundsF().width; + } + else + { + pageSize = __pScrollPanel->GetPageScrollAlignSize().height; + maxPosition = GetScrollAreaBounds().height - __pScrollPanel->GetBoundsF().height; + } + + float targetPosition = 0.0f; + int lowerPageIndex = position / pageSize; + float currentPageMin = pageSize * lowerPageIndex; + float pageGap = position - currentPageMin; + float currentPageMax = currentPageMin + pageSize; + if (currentPageMax > maxPosition) + { + currentPageMax = maxPosition; + } + + if (pageGap <= currentPageMax - currentPageMin - pageGap) + { + targetPosition = currentPageMin; + } + else + { + targetPosition = currentPageMax; + } + + return targetPosition; +} + +void +_ScrollPanelPresenter::RollbackBouncing(bool withAnimation) +{ + if (!IsScrollable()) + { + return; + } + + float scrollPosition = GetScrollPositionInternal(); + float fixedScrollPosition = FixScrollPositionIntoScrollAreaBounds(scrollPosition); + + // there are no rollbacking animation + withAnimation = false; + + if (!_FloatCompare(scrollPosition, fixedScrollPosition)) + { + FadeInScrollBar(); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + ScrollTo(fixedScrollPosition, withAnimation); + r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (!__scrollAnimationRunning) + { + FadeOutScrollBar(); + r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + } +} + +bool +_ScrollPanelPresenter::OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + const _Control& controlObj = control.GetOwner(); + ScrollToControlWhenOutOfView(controlObj); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, r, "[%s] Propagating.", GetErrorMessage(r)); + + return false; +} + +bool +_ScrollPanelPresenter::OnAccessibilityFocusMovedPrevious(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + const _Control& controlObj = control.GetOwner(); + ScrollToControlWhenOutOfView(controlObj); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, r, "[%s] Propagating.", GetErrorMessage(r)); + + return false; +} + +bool +_ScrollPanelPresenter::OnAccessibilityReadingElement(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} +bool +_ScrollPanelPresenter::OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} +bool +_ScrollPanelPresenter::OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_ScrollPanelPresenter::OnAccessibilityFocusOut(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_ScrollPanelPresenter::OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +void +_ScrollPanelPresenter::OnChildControlFocusMoved(const _Control& control) +{ + ScrollToControlWhenOutOfView(control); +} + +void +_ScrollPanelPresenter::OnDescendantControlFocusMoved(const _Control& control) +{ + ScrollToControlWhenOutOfView(control); +} + +bool +_ScrollPanelPresenter::OnAccessibilityItemRefreshed(const _AccessibilityContainer& control, const _AccessibilityElement& element, _AccessibilityFocusDirection direction) +{ + return false; +} + +void +_ScrollPanelPresenter::OnTimerExpired(Timer& timer) +{ + if (&timer == __pScrollBarLoadEffectTimer) + { + __scrollBarLoadEffectStatus = _SCROLL_PANEL_SCROLL_BAR_LOAD_EFFECT_LOADED; + + delete __pScrollBarLoadEffectTimer; + __pScrollBarLoadEffectTimer = null; + + FadeOutScrollBar(); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } +} + +void +_ScrollPanelPresenter::OnVisualElementAnimationStarted(const VisualElementAnimation& animation, const String& keyName, VisualElement& target) +{ + // nothing +} + +void +_ScrollPanelPresenter::OnVisualElementAnimationRepeated(const VisualElementAnimation& animation, const String& keyName, VisualElement& target, long currentRepeatCount) +{ + // nothing +} + +void +_ScrollPanelPresenter::OnVisualElementAnimationFinished(const VisualElementAnimation& animation, const String& keyName, VisualElement& target, bool completedNormally) +{ + __scrollAnimationRunning = false; + __flickRunning = false; + + if (__scrollOccured) + { + __scrollOccured = false; + __pScrollPanel->FireOnScrollStoppedEvent(); + } + + if (!__jumpToTopRunning && !__modelUpdating) + { + RollbackBouncing(completedNormally); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + __jumpToTopRunning = false; + + if (!__scrollAnimationRunning) + { + FadeOutScrollBar(); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } +} + +void +_ScrollPanelPresenter::OnTickOccurred(const VisualElementAnimation& animation, const String& keyName, VisualElement& target, const Variant& currentValue) +{ + _VisualElement* pVisualElement = __pScrollPanel->GetVisualElement(); + + if (&target != pVisualElement) + { + return; + } + + if (keyName == SCROLLING_ANIMATION_NAME) + { + if (!__scrollAnimationRunning) + { + return; + } + + ScrollToInternal(currentValue.ToFloat()); + } +} + +void +_ScrollPanelPresenter::UpdateLayout(void) +{ + __pScrollPanel->PartialUpdateLayout(); +} + +void +_ScrollPanelPresenter::AdjustModel() +{ + _Scroll* pHorizontalScrollBar = __pScrollPanel->GetHorizontalScrollBar(); + _Scroll* pVerticalScrollBar = __pScrollPanel->GetVerticalScrollBar(); + + FloatRectangle scrollPanelBounds = __pScrollPanel->GetBoundsF(); + ScrollPanelScrollDirection scrollDirection = __pScrollPanel->GetScrollDirection(); + FloatRectangle scrollArea = FloatRectangle(0.0f, 0.0f, scrollPanelBounds.width, scrollPanelBounds.height); + + if (__pScrollPanel->IsScrollAreaAutoResizingEnabled()) + { + int count = __pScrollPanel->GetChildCount(); + + if (__pScrollPanel->GetScrollDirection() == SCROLL_PANEL_SCROLL_DIRECTION_VERTICAL) + { + for (int i = 0; i < count; i++) + { + _Control* pControl = __pScrollPanel->GetChild(i); + SysTryReturnVoidResult(NID_UI_CTRL, pControl != null, E_SYSTEM, "[%s] pControl(child) is invalid pointer.", GetErrorMessage(E_SYSTEM)); + + if (pControl->GetArea() == _CONTROL_AREA_SYSTEM) + { + continue; + } + + float targetMaxPos = pControl->GetBoundsF().GetBottomRight().y; + if (scrollArea.height < targetMaxPos) + { + scrollArea.height = targetMaxPos; + } + } + } + else if (__pScrollPanel->GetScrollDirection() == SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL) + { + for (int i = 0; i < count; i++) + { + _Control* pControl = __pScrollPanel->GetChild(i); + SysTryReturnVoidResult(NID_UI_CTRL, pControl != null, E_SYSTEM, "[%s] pControl(child) is invalid pointer.", GetErrorMessage(E_SYSTEM)); + + if (pControl->GetArea() == _CONTROL_AREA_SYSTEM) + { + continue; + } + + float targetMaxPos = pControl->GetBoundsF().GetBottomRight().x; + if (scrollArea.width < targetMaxPos) + { + scrollArea.width = targetMaxPos; + } + } + } + } + else + { + scrollArea = GetScrollAreaBounds(); + if (scrollDirection == SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL) + { + if (scrollArea.width < scrollPanelBounds.width) + { + scrollArea.width = scrollPanelBounds.width; + } + scrollArea.height = scrollPanelBounds.height; + } + else + { + scrollArea.width = scrollPanelBounds.width; + if (scrollArea.height < scrollPanelBounds.height) + { + scrollArea.height = scrollPanelBounds.height; + } + } + } + + // change model values + SetScrollAreaBoundsInternal(scrollArea); + FloatDimension alignSize = FloatDimension(scrollPanelBounds.width, scrollPanelBounds.height); + __pScrollPanel->SetPageScrollAlignSize(alignSize); + + // before change model ScrollPosition fix + if (__modelUpdating) + { + float scrollPosition = GetScrollPositionInternal(); + float fixedScrollPosition = FixScrollPositionIntoScrollAreaBounds(scrollPosition); + float previousFixedScrollPosition = FixScrollPositionIntoScrollAreaBounds(scrollPosition, __previousBounds, __previousScrollAreaBounds); + if (!_FloatCompare(scrollPosition, fixedScrollPosition) + || !_FloatCompare(scrollPosition, previousFixedScrollPosition)) + { + ScrollTo(fixedScrollPosition, false); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + __modelUpdating = false; + __previousBounds = __pScrollPanel->GetBoundsF(); + __previousScrollAreaBounds = GetScrollAreaBounds(); + } + + // Adjust ScrollBar + if (scrollDirection == SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL) + { + if (scrollPanelBounds.width > 0) + { + if (pHorizontalScrollBar != null) + { + pHorizontalScrollBar->OnParentBoundsChanged(); + } + + if (!IsScrollable() && !_FloatCompare(scrollArea.x, GetScrollPosition())) + { + SetScrollPosition(scrollArea.x, false); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + } + else + { + if (scrollPanelBounds.height > 0) + { + if (pVerticalScrollBar != null) + { + pVerticalScrollBar->OnParentBoundsChanged(); + } + + if (!IsScrollable() && !_FloatCompare(scrollArea.y, GetScrollPosition())) + { + SetScrollPosition(scrollArea.y, false); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + } + + // update scrollbar range + ChangeScrollBarRange(); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (!__scrollAnimationRunning) + { + FadeOutScrollBar(); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } +} + +bool +_ScrollPanelPresenter::ScrollToControl(const _Control& source, bool recursive) +{ + SysTryReturn(NID_UI_CTRL, __pScrollPanel->GetChildCount() != 0, false, E_INVALID_ARG, "[%s] ScrollPanel have no child control.", GetErrorMessage(E_INVALID_ARG)); + + FloatPoint controlPosition = source.GetPositionF(); + if (!recursive) + { + SysTryReturn(NID_UI_CTRL, __pScrollPanel->GetChildIndex(source) != -1, false, E_INVALID_ARG, "[%s] source is not a child control.", GetErrorMessage(E_INVALID_ARG)); + } + else + { + SysTryReturn(NID_UI_CTRL, __pScrollPanel->IsAncestorOf(source), false, E_INVALID_ARG, "[%s] source is not a child control.", GetErrorMessage(E_INVALID_ARG)); + + _Control* pParent = source.GetParent(); + while (pParent != null && pParent != __pScrollPanel) + { + _ScrollPanel* pScrollPanelParent = dynamic_cast<_ScrollPanel*> (pParent); + if (pScrollPanelParent != null) + { + FloatDimension pagingGap(0.0f, 0.0f); + if (pScrollPanelParent->IsPageScrollEnabled()) + { + FloatPoint pagingPosition = controlPosition; + if (pScrollPanelParent->GetScrollDirection() == SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL) + { + pagingPosition.x = pScrollPanelParent->CalculatePagingScrollPosition(controlPosition.x); + pagingGap.width = controlPosition.x - pagingPosition.x; + if (pagingGap.width < 0.0f) + { + pagingPosition.x -= pScrollPanelParent->GetPageScrollAlignSize().width; + pagingGap.width += pScrollPanelParent->GetPageScrollAlignSize().width; + } + } + else + { + pagingPosition.y = pScrollPanelParent->CalculatePagingScrollPosition(controlPosition.y); + pagingGap.height = controlPosition.y - pagingPosition.y; + if (pagingGap.height < 0.0f) + { + pagingPosition.y -= pScrollPanelParent->GetPageScrollAlignSize().height; + pagingGap.height += pScrollPanelParent->GetPageScrollAlignSize().height; + } + } + + pScrollPanelParent->SetScrollPosition(pagingPosition, false); + } + else + { + pScrollPanelParent->SetScrollPosition(controlPosition, false); + } + + controlPosition.x -= pScrollPanelParent->GetHorizontalScrollPosition() + pagingGap.width; + controlPosition.y -= pScrollPanelParent->GetVerticalScrollPosition() + pagingGap.height; + } + + FloatPoint parentPosition = pParent->GetPositionF(); + controlPosition.x += parentPosition.x; + controlPosition.y += parentPosition.y; + + pParent = pParent->GetParent(); + } + } + + if (__pScrollPanel->IsPageScrollEnabled()) + { + FloatPoint pagingPosition = controlPosition; + if (__pScrollPanel->GetScrollDirection() == SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL) + { + pagingPosition.x = CalculatePagingScrollPosition(controlPosition.x); + if (pagingPosition.x > controlPosition.x) + { + controlPosition.x = pagingPosition.x - __pScrollPanel->GetPageScrollAlignSize().width; + } + else + { + controlPosition.x = pagingPosition.x; + } + } + else + { + pagingPosition.y = CalculatePagingScrollPosition(controlPosition.y); + if (pagingPosition.y > controlPosition.y) + { + controlPosition.y = pagingPosition.y - __pScrollPanel->GetPageScrollAlignSize().height; + } + else + { + controlPosition.y = pagingPosition.y; + } + } + } + SetScrollPosition(controlPosition, true); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, r, "[%s] Propagating.", GetErrorMessage(r)); + + return true; +} + +float +_ScrollPanelPresenter::ScrollTo(float targetPosition) +{ + return ScrollTo(targetPosition, false); +} + +float +_ScrollPanelPresenter::ScrollTo(float targetPosition, bool withAnimation) +{ + StopScrollingAnimation(); + __pScrollPanel->InvalidateHierarchyAbsoluteBounds(*__pScrollPanel); + + if (withAnimation) + { + // Calculate real move distance + float scrollToPosition = FixScrollPositionIntoScrollAreaBounds(targetPosition); + + float oldPosition = GetScrollPositionInternal(); + VisualElementValueAnimation* pScrollingAnimation = __pScrollPanel->GetScrollingAnimation(); + pScrollingAnimation->SetStartValue(Variant(oldPosition)); + pScrollingAnimation->SetEndValue(Variant(targetPosition)); + pScrollingAnimation->SetDuration(SCROLL_PANEL_SCROLLING_ANIMATION_DURATION); + _VisualElement* pVisualElement = __pScrollPanel->GetVisualElement(); + __scrollAnimationRunning = true; + pVisualElement->AddAnimation(SCROLLING_ANIMATION_NAME, *pScrollingAnimation); + + return scrollToPosition - oldPosition; + } + else + { + return ScrollToInternal(targetPosition); + } +} + +float +_ScrollPanelPresenter::ScrollToInternal(float targetPosition) +{ + ScrollPanelScrollDirection scrollDirection = __pScrollPanel->GetScrollDirection(); + _VisualElement* pVisualElement = __pScrollPanel->GetVisualElement(); + float previousScrollPosition = GetScrollPositionInternal(); + float distance = 0.0f; + FloatPoint floatPointDistance; + + float scrollToPosition = FixScrollPositionIntoScrollAreaBounds(targetPosition); + + if (scrollDirection == SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL) + { + distance = scrollToPosition - FixScrollPositionIntoScrollAreaBounds(previousScrollPosition, __previousBounds, __previousScrollAreaBounds); + floatPointDistance.SetPosition(-distance, 0.0f); + } + else + { + distance = scrollToPosition - FixScrollPositionIntoScrollAreaBounds(previousScrollPosition, __previousBounds, __previousScrollAreaBounds); + floatPointDistance.SetPosition(0.0f, -distance); + } + + if (!_FloatCompare(distance, 0)) + { + result r = pVisualElement->ScrollByPoint(floatPointDistance, false); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, 0, r, "[%s] Propagating.", GetErrorMessage(r)); + + __scrollOccured = true; + } + + ChangeScrollBarPosition(targetPosition); + SetScrollPositionInternal(targetPosition); + + if (!_FloatCompare(distance, 0)) + { + FloatRectangle scrollPanelBounds = __pScrollPanel->GetBoundsF(); + FloatRectangle scrollArea = GetScrollAreaBounds(); + + if (scrollDirection == SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL) + { + if (scrollArea.width > scrollPanelBounds.width) + { + float minScrollPos = scrollArea.x; + float maxScrollPos = scrollArea.width - scrollPanelBounds.width; + + if ((targetPosition >= minScrollPos && targetPosition <= maxScrollPos) + || (previousScrollPosition > minScrollPos || previousScrollPosition < maxScrollPos)) + { + __pScrollPanel->FireOnScrollPositionChangedEvent(); + } + + if (previousScrollPosition > minScrollPos && previousScrollPosition < maxScrollPos) + { + 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(); + } + } + } + } + else + { + if (scrollArea.height > scrollPanelBounds.height) + { + float minScrollPos = scrollArea.y; + float maxScrollPos = scrollArea.height - scrollPanelBounds.height; + + if ((targetPosition >= minScrollPos && targetPosition <= maxScrollPos) + || (previousScrollPosition > minScrollPos || previousScrollPosition < maxScrollPos)) + { + __pScrollPanel->FireOnScrollPositionChangedEvent(); + } + + if (previousScrollPosition > minScrollPos && previousScrollPosition < maxScrollPos) + { + 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(); + } + } + } + } + } + + return distance; +} + +void +_ScrollPanelPresenter::ChangeScrollBarPosition(float position) +{ + _Scroll* pScrollBar = __pScrollPanel->GetScrollBar(); + + if (pScrollBar != null && __pScrollPanel->IsAncestorOf(*pScrollBar)) + { + if (__pScrollPanel->GetScrollDirection() == SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL) + { + result r = pScrollBar->SetScrollPosition(position); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + result r = pScrollBar->SetScrollPosition(position); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + } +} + +void +_ScrollPanelPresenter::ChangeScrollBarRange(void) +{ + _Scroll* pScrollBar = __pScrollPanel->GetScrollBar(); + + if (pScrollBar != null) + { + float viewRange = 0.0f; + float scrollRange = 0.0f; + + if (__pScrollPanel->GetScrollDirection() == SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL) + { + viewRange = __pScrollPanel->GetBoundsF().width; + scrollRange = GetScrollAreaBounds().width; + } + else + { + viewRange = __pScrollPanel->GetBoundsF().height; + scrollRange = GetScrollAreaBounds().height; + } + + if (viewRange <= scrollRange) + { + result r = pScrollBar->SetScrollRange(viewRange, scrollRange); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (!_FloatCompare(viewRange, scrollRange)) + { + if (__scrollBarLoadEffectStatus == _SCROLL_PANEL_SCROLL_BAR_LOAD_EFFECT_UNLOAD) + { + __scrollBarLoadEffectStatus = _SCROLL_PANEL_SCROLL_BAR_LOAD_EFFECT_LOADING; + + if (__firstDrawn) + { + DoScrollBarLoadEffect(); + } + } + } + else + { + __scrollBarLoadEffectStatus = _SCROLL_PANEL_SCROLL_BAR_LOAD_EFFECT_UNLOAD; + } + } + } +} + +void +_ScrollPanelPresenter::DoScrollBarLoadEffect(void) +{ + if (__pScrollPanel->IsScrollBarVisible()) + { + FadeInScrollBar(); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + StartScrollBarLoadEffectTimer(); + r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + __scrollBarLoadEffectStatus = _SCROLL_PANEL_SCROLL_BAR_LOAD_EFFECT_UNLOAD; + } +} + +void +_ScrollPanelPresenter::StartScrollBarLoadEffectTimer(void) +{ + result r = E_SUCCESS; + + if (__pScrollBarLoadEffectTimer == null && __scrollBarLoadEffectStatus == _SCROLL_PANEL_SCROLL_BAR_LOAD_EFFECT_LOADING) + { + __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)); + + r = __pScrollBarLoadEffectTimer->Start(SCROLL_PANEL_SCROLL_BAR_LOAD_EFFECT_TIMER_DURATION); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + return; + +CATCH: + delete __pScrollBarLoadEffectTimer; + __pScrollBarLoadEffectTimer = null; + + SetLastResult(r); +} + +void +_ScrollPanelPresenter::StopScrollBarLoadEffectTimer(void) +{ + if (__pScrollBarLoadEffectTimer) + { + __pScrollBarLoadEffectTimer->Cancel(); + } +} + +void +_ScrollPanelPresenter::FadeOutScrollBar(void) +{ + if (!__scrollAnimationRunning) + { + _Scroll* pScrollBar = __pScrollPanel->GetScrollBar(); + if (pScrollBar != null) + { + if ((!__pScrollPanel->IsScrollBarVisible() || !IsScrollable()) + || (!pScrollBar->IsEnabledHandler() && __scrollBarLoadEffectStatus == _SCROLL_PANEL_SCROLL_BAR_LOAD_EFFECT_LOADED)) + { + result r = pScrollBar->SetScrollVisibility(false); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + result r = pScrollBar->SetScrollingEffectVisibility(false); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + } +} + +void +_ScrollPanelPresenter::StopFadeOutScrollBar(void) +{ + _Scroll* pScrollBar = __pScrollPanel->GetScrollBar(); + + if (pScrollBar != null) + { + pScrollBar->CancelFadeEffect(); + } +} + +void +_ScrollPanelPresenter::FadeInScrollBar(void) +{ + if (!IsScrollable()) + { + return; + } + + _Scroll* pScrollBar = __pScrollPanel->GetScrollBar(); + + if (pScrollBar != null) + { + if (__pScrollPanel->IsScrollBarVisible()) + { + result r = pScrollBar->SetScrollVisibility(true); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + result r = pScrollBar->SetScrollingEffectVisibility(true); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } +} + +bool +_ScrollPanelPresenter::IsScrollable(void) const +{ + if (__pScrollPanel->GetScrollDirection() == SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL) + { + return __pScrollPanel->GetBoundsF().width >0 && __pScrollPanel->GetBoundsF().width < GetScrollAreaBounds().width; + } + else + { + return __pScrollPanel->GetBoundsF().height > 0 && __pScrollPanel->GetBoundsF().height < GetScrollAreaBounds().height; + } +} + +FloatRectangle +_ScrollPanelPresenter::GetScrollAreaBounds(void) const +{ + return __pScrollPanelModel->GetScrollAreaBounds(); +} + +result +_ScrollPanelPresenter::SetClientAreaHeight(float height) +{ + SysTryReturn(NID_UI_CTRL, __pScrollPanel->GetScrollDirection() == SCROLL_PANEL_SCROLL_DIRECTION_VERTICAL, E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] The height of the client area cannot be set when the scroll direction is horizontal.", GetErrorMessage(E_INVALID_OPERATION)); + FloatRectangle bounds = GetScrollAreaBounds(); + bounds.height = height; + + return SetScrollAreaBounds(bounds); +} + +result +_ScrollPanelPresenter::SetClientAreaWidth(float width) +{ + SysTryReturn(NID_UI_CTRL, __pScrollPanel->GetScrollDirection() == SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL, E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] The width of the client area cannot be set when the scroll direction is vertical.", GetErrorMessage(E_INVALID_OPERATION)); + FloatRectangle bounds = GetScrollAreaBounds(); + bounds.width = width; + + return SetScrollAreaBounds(bounds); +} + +void +_ScrollPanelPresenter::SetScrollAreaBoundsInternal(FloatRectangle& bounds) +{ + if (__pScrollPanel->IsFixingClientBoundsEnabled()) + { + __pScrollPanel->SetClientBounds(bounds); + } + __pScrollPanelModel->SetScrollAreaBounds(bounds); +} + +void +_ScrollPanelPresenter::UpdateClientBounds(const FloatDimension& size, FloatRectangle& clientBounds) +{ + if (__pScrollPanel->IsFixingClientBoundsEnabled()) + { + clientBounds = GetScrollAreaBounds(); + if (IsScrollable()) + { + if (size.height > clientBounds.height) + { + clientBounds.height = size.height; + } + if (size.width > clientBounds.width) + { + clientBounds.width = size.width; + } + } + else + { + clientBounds.width = size.width; + clientBounds.height = size.height; + } + } + else + { + clientBounds.width = size.width; + clientBounds.height = size.height; + } +} + +result +_ScrollPanelPresenter::SetScrollAreaBounds(FloatRectangle& bounds) +{ + SysTryReturn(NID_UI_CTRL, !__pScrollPanel->IsScrollAreaAutoResizingEnabled(), E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] The width of the client area cannot be set when auto resizing of the client area is on.", GetErrorMessage(E_INVALID_OPERATION)); + + bounds.x = 0.0f; + bounds.y = 0.0f; + + if (__pScrollPanel->GetScrollDirection() == SCROLL_PANEL_SCROLL_DIRECTION_HORIZONTAL) + { + SysTryReturn(NID_UI_CTRL, __pScrollPanel->GetBoundsF().width <= bounds.width, E_INVALID_ARG, E_INVALID_ARG, "[%s] width is less than the width of ScrollPanel", GetErrorMessage(E_INVALID_ARG)); + bounds.height = __pScrollPanel->GetBoundsF().height; + } + else + { + SysTryReturn(NID_UI_CTRL, __pScrollPanel->GetBoundsF().height <= bounds.height, E_INVALID_ARG, E_INVALID_ARG, "[%s] height is less than the height of ScrollPanel", GetErrorMessage(E_INVALID_ARG)); + bounds.width = __pScrollPanel->GetBoundsF().width; + } + + if (__scrollAnimationRunning) + { + if (IsScrollable()) + { + float scrollPosition = GetScrollPositionInternal(); + float fixedScrollPosition = FixScrollPositionIntoScrollAreaBounds(scrollPosition); + + if (!_FloatCompare(scrollPosition, fixedScrollPosition)) + { + StopScrollingAnimation(); + } + } + } + + if (!__modelUpdating) + { + __modelUpdating = true; + __previousBounds = __pScrollPanel->GetBoundsF(); + __previousScrollAreaBounds = GetScrollAreaBounds(); + } + + SetScrollAreaBoundsInternal(bounds); + + AdjustModel(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +const _Control* +_ScrollPanelPresenter::GetPressedControl(void) const +{ + return __pPressedControl; +} + +FloatPoint +_ScrollPanelPresenter::GetPreviousTouchPosition(void) const +{ + return __previousTouchedPosition; +} + +FloatPoint +_ScrollPanelPresenter::GetCurrentTouchPosition(void) const +{ + return __currentMovedPosition; +} + +bool +_ScrollPanelPresenter::IsScrollAnimationRunning(void) const +{ + if (__scrollOccured && __scrollAnimationRunning) + { + return true; + } + + return false; +} + +bool +_ScrollPanelPresenter::IsModelUpdating(void) const +{ + return __modelUpdating; +} + +float +_ScrollPanelPresenter::CalculateFlickAmount(float flickDistance, float flickDuration) +{ + if (_FloatCompare(flickDistance, 0.0f)) + { + return 0.0f; + } + else if (flickDistance < 0.0) + { + return -SCROLL_PANEL_FIXED_FLICK_AMOUNT; + } + else + { + return SCROLL_PANEL_FIXED_FLICK_AMOUNT; + } +} + +bool +_ScrollPanelPresenter::AccumulateFlickGesture(_FlickDirection direction) +{ + return false; +} + + +float +_ScrollPanelPresenter::FlickTo(float targetPosition, float duration) +{ + return ScrollTo(targetPosition, true); +} + +}}} // Tizen::Ui::Controls + diff --git a/src/ui/controls/FUiCtrl_ScrollPresenter.cpp b/src/ui/controls/FUiCtrl_ScrollPresenter.cpp new file mode 100644 index 0000000..1705415 --- /dev/null +++ b/src/ui/controls/FUiCtrl_ScrollPresenter.cpp @@ -0,0 +1,2412 @@ +// +// 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_ScrollPresenter.cpp + * @brief This is the implementation file for the %_ScrollPresenter class. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "FUi_ResourceManager.h" +#include "FUi_UiTouchEvent.h" +#include "FUi_Math.h" +#include "FUiAnim_TransformMatrix3Df.h" +#include "FUiAnim_VisualElement.h" +#include "FUiCtrl_ScrollPresenter.h" +#include "FUiCtrl_UiScrollEvent.h" +#include "FUiCtrl_UiScrollEventArg.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Animations; + +namespace +{ +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; +} + +namespace Tizen { namespace Ui { namespace Controls +{ + +#ifndef MAX +#define MAX(a, b) ((a) > (b) ? (a) : (b)) +#define MIN(a, b) ((a) < (b) ? (a) : (b)) +#endif + +_ScrollPresenter::_ScrollPresenter(void) + : __pParentCtrl(null) + , __pScrollCtrl(null) + , __scrollDirection(SCROLL_DIRECTION_VERTICAL) + , __enableFadeEffect(false) + , __enableJumpToTop(false) + , __enableHandler(false) + , __enableScrollingEffect(false) + , __enableOverScrollingEffect(false) + , __isContextMenuScroll(false) + , __parentUsingViewport(true) + , __viewRange(0.0f) + , __scrollRange(0.0f) + , __scrollPositionCurr(0.0f) + , __fadeIn(false) + , __fadeOut(false) + , __scrollVisibility(false) + , __scrollingEffectVisibility(false) + , __parentBouncingRate(0.0f) + , __fadeEffectDuration_ms(5000) + , __needUpdateThumb(false) + , __needUpdateJumpTopTop(false) + , __needUpdateHandler(false) + , __needUpdateScrollingEffect(false) + , __handlerTouched(false) + , __handlerTouchedPosition(0.0f) + , __jumpToTopPressed(false) + , __pScrollEvent(null) + , __pCtrlVe(null) + , __pThumbVe(null) + , __pJumpToTopVe(null) + , __pHandlerVe(null) + , __pFrontScrollingEffectVe(null) + , __pReerScrollingEffectVe(null) + , __thumbColor(0x00000000) + , __jumpToTopColor(0x00000000) + , __jumpToTopColorPressed(0x00000000) + , __buttonColor(0x00000000) + , __buttonColorPressed(0x00000000) + , __pThumbBitmap(null) + , __pThumbEffectBitmap(null) + , __pJumpToTopBitmap(null) + , __pJumpToTopPressBitmap(null) + , __pJumpToTopEfBitmap(null) + , __pButtonBitmap(null) + , __pButtonEfBitmap(null) + , __pButtonPressBitmap(null) + , __pButtonPressEfBitmap(null) + , __pHandlerBitmap(null) + , __pFrontScrollingEffectBitmap(null) + , __pReerScrollingEffectBitmap(null) + , __thumbSizeMin(0.0f, 0.0f) + , __thumbMargin(0.0f) + , __jumpToTopSize(0.0f, 0.0f) + , __jumpToTopMarginRight(0.0f) + , __jumpToTopMarginTop(0.0f) + , __handlerSizeMin(0.0f, 0.0f) + , __handlerMarginLeft(0.0f) + , __handlerMarginRight(0.0f) + , __handlerMarginTop(0.0f) + , __handlerMarginBottom(0.0f) + , __scrollingEffectWidthLeft(0.0f) + , __scrollingEffectWidthRight(0.0f) + , __scrollingEffectHeightTop(0.0f) + , __scrollingEffectHeightBottom(0.0f) + , __beforeBouncingMatrixHash() +{ +} + +_ScrollPresenter::~_ScrollPresenter(void) +{ + delete __pScrollEvent; + __pScrollEvent = null; + + __beforeBouncingMatrixHash.RemoveAll(true); + + if (__pThumbVe != null) + { + __pThumbVe->Destroy(); + __pThumbVe = null; + } + + if (__pJumpToTopVe != null) + { + __pJumpToTopVe->Destroy(); + __pJumpToTopVe = null; + } + + if (__pHandlerVe != null) + { + __pHandlerVe->Destroy(); + __pHandlerVe = null; + } + + if (__pFrontScrollingEffectVe != null) + { + __pFrontScrollingEffectVe->RemoveAllAnimations(); + __pFrontScrollingEffectVe->Destroy(); + __pFrontScrollingEffectVe = null; + } + + if (__pReerScrollingEffectVe != null) + { + __pReerScrollingEffectVe->RemoveAllAnimations(); + __pReerScrollingEffectVe->Destroy(); + __pReerScrollingEffectVe = null; + } + + if (__pCtrlVe != null) + { + __pCtrlVe->RemoveAllAnimations(); + __pCtrlVe->SetAnimationProvider(null); + __pCtrlVe->Destroy(); + __pCtrlVe = null; + } + + ReleaseBitmapResources(); +} + +_ScrollPresenter* +_ScrollPresenter::CreateScrollPresenterN(_Control& parentCtrl, + _Scroll& scrollCtrl, + _ScrollDirection scrollDirection, + bool enableFadeEffect, + bool enableJumpToTop, + bool enableHandler, + bool visibility, + float viewRange, + float scrollRange, + float scrollPosition) +{ + 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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + result r = pPresenter->Construct(parentCtrl, + scrollCtrl, + scrollDirection, + enableFadeEffect, + enableJumpToTop, + enableHandler, + visibility, + viewRange, + scrollRange, + scrollPosition); + + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + SetLastResult(E_SUCCESS); + return pPresenter; + +CATCH: + delete pPresenter; + + return null; +} + +result +_ScrollPresenter::SetScrollDirection(_ScrollDirection scrollDirection) +{ + if (__scrollDirection == scrollDirection) + { + return E_SUCCESS; + } + + // load color/shape configuration and bitmap resources + result r = LoadResources(scrollDirection, _CONTROL_ORIENTATION_PORTRAIT); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to load resources."); + + // reset attributes + __scrollDirection = scrollDirection; + + // reset the bounds of scroll control + FloatRectangle bounds = GetParentCtrl().GetBoundsF(); + bounds.SetPosition(0.0f, 0.0f); + r = GetControl().SetBounds(bounds); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set the bounds of _Scroll."); + + // relayout scroll children. + r = RelayoutScrollChildren(__scrollDirection); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to relayout scroll chilren"); + + return E_SUCCESS; +} + +_ScrollDirection +_ScrollPresenter::GetScrollDirection(void) const +{ + return __scrollDirection; +} + +result +_ScrollPresenter::SetScrollRange(float viewRange, float scrollRange) +{ + 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) + { + return E_SUCCESS; + } + + __viewRange = viewRange; + __scrollRange = scrollRange; + + result r = RelayoutScrollChildren(__scrollDirection); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to relayout scroll chilren"); + + return E_SUCCESS; +} + +void +_ScrollPresenter::GetScrollRange(float* pViewRange, float* pScrollRange) const +{ + SysTryReturnVoidResult(NID_UI_CTRL, + !((pViewRange == null) && (pScrollRange == null)), + 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; + + return; +} + +result +_ScrollPresenter::SetScrollPosition(float scrollPosition) +{ + result r = E_SUCCESS; + + if (scrollPosition != __scrollPositionCurr) + { + + if (!__enableScrollingEffect) + { + if (scrollPosition < 0.0f) + { + scrollPosition = 0.0f; + } + else if (scrollPosition > (__scrollRange - __viewRange)) + { + scrollPosition = (__scrollRange - __viewRange); + } + } + __scrollPositionCurr = scrollPosition; + + if (__enableJumpToTop) + { + if ((_FloatCompare(__scrollPositionCurr, 0.0f) || __scrollPositionCurr < 0.0f) && (__pJumpToTopVe->GetOpacity() > 0.0f)) + { + __pCtrlVe->SetImplicitAnimationEnabled(true); + __pJumpToTopVe->SetImplicitAnimationEnabled(true); + + __pJumpToTopVe->SetOpacity(SCROLL_OPACITY_OFF); + + __pJumpToTopVe->SetImplicitAnimationEnabled(false); + __pCtrlVe->SetImplicitAnimationEnabled(false); + } + else if ((__scrollPositionCurr > 0.0f) && (__pJumpToTopVe->GetOpacity() < 1.0f)) + { + __pCtrlVe->SetImplicitAnimationEnabled(true); + __pJumpToTopVe->SetImplicitAnimationEnabled(true); + + __pJumpToTopVe->SetOpacity(SCROLL_OPACITY_ON); + + __pJumpToTopVe->SetImplicitAnimationEnabled(false); + __pCtrlVe->SetImplicitAnimationEnabled(false); + } + // else keep up current visibility. + + } + + if (__enableHandler) + { + FloatPoint handlerPosition = CalculateHandlerPosition(__scrollDirection); + FloatRectangle handlerBounds(handlerPosition.x, handlerPosition.y, __pHandlerVe->GetBounds().width, __pHandlerVe->GetBounds().height); + FloatRectangle scrollCtrlBounds = __pCtrlVe->GetBounds(); + + if (__scrollDirection == SCROLL_DIRECTION_HORIZONTAL) + { + if (handlerPosition.x < 0.0f) + { + handlerBounds.x = 0.0f; + } + else if (handlerPosition.x > scrollCtrlBounds.width - handlerBounds.width) + { + handlerBounds.x =scrollCtrlBounds.width - handlerBounds.width; + } + } + else + { + if (handlerPosition.y < 0.0f) + { + handlerBounds.y = 0.0f; + } + else if (handlerPosition.y > scrollCtrlBounds.height - handlerBounds.height) + { + handlerBounds.y = scrollCtrlBounds.height - handlerBounds.height; + } + } + + __pHandlerVe->SetBounds(handlerBounds); + } + else + { + FloatPoint thumbPosition = CalculateThumbPosition(__scrollDirection); + FloatRectangle thumbBounds(thumbPosition.x, thumbPosition.y, __pThumbVe->GetBounds().width, __pThumbVe->GetBounds().height); + FloatRectangle scrollCtrlBounds = __pCtrlVe->GetBounds(); + + if (__scrollDirection == SCROLL_DIRECTION_HORIZONTAL) + { + if (thumbPosition.x < 0.0f) + { + thumbBounds.x = 0.0f; + } + else if (thumbPosition.x > scrollCtrlBounds.width - thumbBounds.width) + { + thumbBounds.x = scrollCtrlBounds.width - thumbBounds.width; + } + } + else + { + if (thumbPosition.y < 0.0f) + { + thumbBounds.y = 0.0f; + } + else if (thumbPosition.y > scrollCtrlBounds.height - thumbBounds.height) + { + thumbBounds.y = scrollCtrlBounds.height - thumbBounds.height; + } + } + + __pThumbVe->SetBounds(thumbBounds); + } + + r = SetScrollingEffect(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + + return r; +} + +float +_ScrollPresenter::GetScrollPosition(void) const +{ + return __scrollPositionCurr; +} + +result +_ScrollPresenter::SetContextMenuScrollType(bool isContextMenu) +{ + result r = E_SUCCESS; + if (__isContextMenuScroll == isContextMenu) + { + return E_SUCCESS; + } + + if (__scrollDirection == SCROLL_DIRECTION_HORIZONTAL) + { + return E_SUCCESS; + } + + __isContextMenuScroll = isContextMenu; + __enableJumpToTop = false; + __enableHandler = false; + __enableScrollingEffect = false; + __enableOverScrollingEffect = false; + + delete __pThumbBitmap; + __pThumbBitmap = null; + + _ControlOrientation orientation = _CONTROL_ORIENTATION_PORTRAIT; + if (isContextMenu) + { + r = GET_BITMAP_CONFIG_N(SCROLL::CONTEXTTHUMB_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __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_SHAPE_CONFIG(SCROLL::CONTEXTTHUMB_MIN_WIDTH, orientation, __thumbSizeMin.width); + 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, "[%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, "[%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, "[%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, "[%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, "[%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, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); + } + + __pThumbVe->SetBounds(CalculateThumbBounds(__scrollDirection)); + __needUpdateThumb = true; + (GetControl().GetVisualElement())->InvalidateRectangle(null); + + return E_SUCCESS; + +CATCH: + delete __pThumbBitmap; + __pThumbBitmap = null; + + return r; +} + +void +_ScrollPresenter::EnableFadeEffect(bool enable) +{ + __enableFadeEffect = enable; + + return; +} + +bool +_ScrollPresenter::IsEnabledFadeEffect(void) const +{ + return __enableFadeEffect; +} + +bool +_ScrollPresenter::IsOnFadeEffect(void) const +{ + return (__fadeIn || __fadeOut); +} + +void +_ScrollPresenter::EnableScrollingEffect(bool enable) +{ + __enableScrollingEffect = enable; +} + +bool +_ScrollPresenter::IsEnabledScrollingEffect(void) const +{ + return __enableScrollingEffect; +} + +void +_ScrollPresenter::EnableOverScrollingEffect(bool enable) +{ + __enableOverScrollingEffect = enable; +} + +bool +_ScrollPresenter::IsEnabledOverScrollingEffect(void) const +{ + return __enableOverScrollingEffect; +} + +void +_ScrollPresenter::SetParentUsingViewport(bool useViewPort) +{ + __parentUsingViewport = useViewPort; +} + +bool +_ScrollPresenter::IsParentUsingViewport(void) const +{ + return __parentUsingViewport; +} + +result +_ScrollPresenter::SetScrollVisibility(bool visibility) +{ + if (GetScrollVisibility() == visibility) + { + // keep up current visibility. + return E_SUCCESS; + } + + if (__jumpToTopPressed && visibility == false) + { + // ignore visibility off + return E_SUCCESS; + } + + __pCtrlVe->RemoveAllAnimations(); + if (visibility) + { + if (__enableFadeEffect) + { + __fadeIn = true; + __fadeOut = false; + + __pCtrlVe->SetImplicitAnimationEnabled(true); + } + + __pCtrlVe->SetOpacity(SCROLL_OPACITY_ON); + + if (__enableFadeEffect) + { + __pCtrlVe->SetImplicitAnimationEnabled(false); + } + else + { + __fadeIn = false; + __fadeOut = false; + } + } + else + { + if (__enableFadeEffect) + { + __fadeIn = false; + __fadeOut = true; + + __pCtrlVe->SetImplicitAnimationEnabled(true); + } + + __pCtrlVe->SetOpacity(SCROLL_OPACITY_OFF); + + if (__enableFadeEffect) + { + __pCtrlVe->SetImplicitAnimationEnabled(false); + } + else + { + __fadeIn = false; + __fadeOut = false; + } + } + + __scrollVisibility = visibility; + + return E_SUCCESS; +} + +bool +_ScrollPresenter::GetScrollVisibility(void) const +{ + if (__enableFadeEffect) + { + if (__scrollVisibility) + { + return true; + } + } + else if (__pCtrlVe->GetOpacity() > SCROLL_OPACITY_OFF) + { + return true; + } + + return false; +} + +void +_ScrollPresenter::CancelFadeEffect(void) +{ + if (__fadeIn) + { + __fadeIn = false; + __scrollVisibility = false; + __pCtrlVe->SetOpacity(SCROLL_OPACITY_OFF); + } + else if (__fadeOut) + { + __fadeOut = false; + __scrollVisibility = true; + __pCtrlVe->SetOpacity(SCROLL_OPACITY_ON); + } + + return; +} + +result +_ScrollPresenter::EnableJumpToTop(bool enable) +{ + result r = E_SUCCESS; + + if (__enableJumpToTop != enable) + { + if (enable) + { + if (__enableFadeEffect) + { + __pCtrlVe->SetImplicitAnimationEnabled(true); + } + + r = AttachScrollChild(&__pJumpToTopVe, CalculateJumpToTopBounds(__scrollDirection), true); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to attach the __pJumpToTopVe to _Scroll"); + + if (!(_FloatCompare(__scrollPositionCurr, 0.0f))) + { + __pJumpToTopVe->SetOpacity(SCROLL_OPACITY_ON); + } + else + { + __pJumpToTopVe->SetOpacity(SCROLL_OPACITY_OFF); + } + + if (__enableFadeEffect) + { + __pCtrlVe->SetImplicitAnimationEnabled(false); + } + } + else + { + DetachScrollChild(&__pJumpToTopVe, true); + } + + __enableJumpToTop = enable; + } + + return E_SUCCESS; + +} + +bool +_ScrollPresenter::IsEnabledJumpToTop(void) const +{ + return __enableJumpToTop; +} + +result +_ScrollPresenter::EnableHandler(bool enable) +{ + result r = E_SUCCESS; + + if (__enableHandler != enable) + { + if (__enableFadeEffect) + { + __pCtrlVe->SetImplicitAnimationEnabled(true); + } + + if (enable) + { + r = AttachScrollChild(&__pHandlerVe, CalculateHandlerBounds(__scrollDirection), true); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to attach the __pHandlerVe to _Scroll"); + + DetachScrollChild(&__pThumbVe, true); + } + else + { + r = AttachScrollChild(&__pThumbVe, CalculateThumbBounds(__scrollDirection), true); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to attach the __pThumbVe to _Scroll"); + + DetachScrollChild(&__pHandlerVe, true); + } + __enableHandler = enable; + + if (__enableFadeEffect) + { + __pCtrlVe->SetImplicitAnimationEnabled(false); + } + } + + return E_SUCCESS; +} + +bool +_ScrollPresenter::IsEnabledHandler(void) const +{ + return __enableHandler; +} + +result +_ScrollPresenter::SetScrollingEffectVisibility(bool visibility) +{ + if (!__enableScrollingEffect) + { + visibility = false; + } + + if (__scrollingEffectVisibility == visibility) + { + // keep up current visibility. + return E_SUCCESS; + } + + if (__pFrontScrollingEffectVe == null || __pReerScrollingEffectVe == null) + { + return E_SUCCESS; + } + + __pFrontScrollingEffectVe->RemoveAllAnimations(); + __pReerScrollingEffectVe->RemoveAllAnimations(); + __scrollingEffectVisibility = visibility; + + return E_SUCCESS; +} + +void +_ScrollPresenter::SetScrollingEffectOpacity(float opacity) +{ + __pFrontScrollingEffectVe->SetOpacity(opacity); + __pReerScrollingEffectVe->SetOpacity(opacity); +} + +void +_ScrollPresenter::SetScrollingEffectOpacity(_VisualElement& Ve, bool isActive, float ratio) +{ + float baseOpacity = (isActive) ? SCROLL_OPACITY_ON : SCROLL_OPACITY_LIGHT_DIM; + Ve.SetOpacity(SCROLL_OPACITY_DARK_DIM + ((baseOpacity - SCROLL_OPACITY_DARK_DIM) * ratio)); +} + +bool +_ScrollPresenter::IsScrollVisible(void) const +{ + return (__fadeIn || __fadeOut || __scrollVisibility); +} + +void +_ScrollPresenter::AddScrollEventListener(const Controls::_IScrollEventListener& listener) +{ + if (__pScrollEvent == null) + { + __pScrollEvent = new (std::nothrow) _UiScrollEvent(); + SysTryReturnVoidResult(NID_UI_CTRL, __pScrollEvent, E_OUT_OF_MEMORY, + "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + __pScrollEvent->Construct(GetControl()); + } + + __pScrollEvent->AddListener(listener); + + return; +} + +void +_ScrollPresenter::RemoveScrollEventListener(const Controls::_IScrollEventListener& listener) +{ + ClearLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, __pScrollEvent, E_SYSTEM, "[%s] A system error has occurred. __pScrollEvent must not be null.", GetErrorMessage(E_SYSTEM)); + + __pScrollEvent->RemoveListener(listener); + + return; +} + +void +_ScrollPresenter::OnParentBoundsChanged(void) +{ + FloatRectangle bounds = GetParentCtrl().GetBoundsF(); + bounds.SetPosition(0.0f, 0.0f); + GetControl().SetBounds(bounds); + + RelayoutScrollChildren(__scrollDirection); + return; +} + +void +_ScrollPresenter::OnDraw(void) +{ + DrawThumb(); + DrawJumpToTop(); + DrawHandler(); + + return; +} + +bool +_ScrollPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + bool ret = false; + + ret |= OnTouchPressedHandler(source, touchinfo); + ret |= OnTouchPressedJumpToTop(source, touchinfo); + + return ret; +} + +bool +_ScrollPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + bool ret = false; + + ret |= OnTouchReleasedHandler(source, touchinfo); + ret |= OnTouchReleasedJumpToTop(source, touchinfo); + + return ret; +} + +bool +_ScrollPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + bool ret = false; + + ret |= OnTouchMovedHandler(source, touchinfo); + ret |= OnTouchMovedJumpToTop(source, touchinfo); + + return ret; +} + +void +_ScrollPresenter::OnTouchMoveHandled(const _Control& source) +{ + if (__jumpToTopPressed) + { + __needUpdateJumpTopTop = true; + __jumpToTopPressed = false; + (GetControl().GetVisualElement())->InvalidateRectangle(null); + } +} + +HitTestResult +_ScrollPresenter::HitTest(const FloatPoint& point) +{ + FloatRectangle ctrlBounds = __pCtrlVe->GetBounds(); + + if (__enableJumpToTop && IsScrollVisible()) + { + FloatRectangle jumpToTopBounds = __pJumpToTopVe->GetBounds(); + jumpToTopBounds.x += ctrlBounds.x; + jumpToTopBounds.y += ctrlBounds.y; + if (jumpToTopBounds.Contains(point)) + { + return HIT_TEST_MATCH; + } + } + + if (__enableHandler) + { + FloatRectangle handlerBounds = __pHandlerVe->GetBounds(); + handlerBounds.x += ctrlBounds.x; + handlerBounds.y += ctrlBounds.y; + if (handlerBounds.Contains(point)) + { + return HIT_TEST_MATCH; + } + } + + return HIT_TEST_NOWHERE; +} + +VisualElementAnimation* +_ScrollPresenter::CreateAnimationForProperty(VisualElement& target, const String& property) +{ + VisualElementAnimation* pAnimation = VisualElementAnimationProvider::CreateAnimationForProperty(target, property); + SysTryReturn(NID_UI_CTRL, pAnimation, null, GetLastResult(), "[%s] Failed to create a VisualElementAnimation.", GetErrorMessage(GetLastResult())); + + pAnimation->SetVisualElementAnimationStatusEventListener(this); + SetLastResult(E_SUCCESS); + + return pAnimation; +} + +void +_ScrollPresenter::OnVisualElementAnimationStarted(const VisualElementAnimation& animation, const String& keyName, VisualElement& target) +{ + return; +} + +void +_ScrollPresenter::OnVisualElementAnimationRepeated(const VisualElementAnimation& animation, const String& keyName, VisualElement& target, long currentRepeatCount) +{ + return; +} + +void +_ScrollPresenter::OnVisualElementAnimationFinished(const VisualElementAnimation& animation, const String& keyName, VisualElement& target, bool completedNormally) +{ + if (__pCtrlVe == (static_cast <_VisualElement*>(&target))) + { + __fadeIn = false; + __fadeOut = false; + } + + return; +} + +result +_ScrollPresenter::Construct(_Control& parentCtrl, + _Scroll& scrollCtrl, + _ScrollDirection scrollDirection, + bool enableFadeEffect, + bool enableJumpToTop, + bool enableHandler, + bool visibility, + float viewRange, + float scrollRange, + float scrollPosition) +{ + result r = E_SUCCESS; + + // load color/shape configuration and bitmap resources + r = LoadResources(scrollDirection, _CONTROL_ORIENTATION_PORTRAIT); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to load resources."); + + // set attributes + SetParentCtrl(parentCtrl); + SetControl(scrollCtrl); + __scrollDirection = scrollDirection; + __enableFadeEffect = enableFadeEffect; + __enableJumpToTop = enableJumpToTop; + __enableHandler = enableHandler; + __viewRange = viewRange; + __scrollRange = scrollRange; + __scrollPositionCurr = scrollPosition; + + _VisualElement* pVe = null; + + // initialize the scroll control + FloatRectangle bounds = GetParentCtrl().GetBoundsF(); + bounds.SetPosition(0.0f, 0.0f); + GetControl().SetBounds(bounds); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to set the bounds of _Scroll.", GetErrorMessage(r)); + + scrollCtrl.SetBackgroundColor(Color(0, 0, 0, 0)); + + // initialize visual elements + pVe = scrollCtrl.GetVisualElement(); + SysTryCatch(NID_UI_CTRL, pVe, , GetLastResult(), "[%s] Failed to get VisualElement of the _Scroll.", GetErrorMessage(GetLastResult())); + + __pCtrlVe = new (std::nothrow) _VisualElement(); + SysTryReturnResult(NID_UI_CTRL, __pCtrlVe != null, E_OUT_OF_MEMORY, "Memory allocation failed."); + + r = __pCtrlVe->Construct(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to construct Visual Element.", GetErrorMessage(r)); + + r = __pCtrlVe->SetSurfaceOpaque(false); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to set surface opaque.", GetErrorMessage(r)); + + __pCtrlVe->SetImplicitAnimationEnabled(false); + + r = pVe->AttachChild(*__pCtrlVe); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to attach child to the control VisualElement.", GetErrorMessage(r)); + + __pCtrlVe->SetBounds(CalculateScrollCtrlBounds(scrollDirection)); + __pCtrlVe->SetAnimationProvider(this); + __pCtrlVe->SetShowState(true); + + if (visibility) + { + __pCtrlVe->SetOpacity(SCROLL_OPACITY_ON); + } + else + { + __pCtrlVe->SetOpacity(SCROLL_OPACITY_OFF); + } + + // initialize jumpToTopVe + if (enableJumpToTop) + { + r = AttachScrollChild(&__pJumpToTopVe, CalculateJumpToTopBounds(scrollDirection), true); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to attach the __pJumpToTopVe to _Scroll.", GetErrorMessage(r)); + + if ((scrollDirection != SCROLL_DIRECTION_VERTICAL) || (_FloatCompare(scrollPosition, 0.0f))) + { + __pJumpToTopVe->SetOpacity(SCROLL_OPACITY_OFF); + } + + __needUpdateJumpTopTop = true; + } + + // initialize thumbVe and handlerVe + if (enableHandler) + { + r = AttachScrollChild(&__pHandlerVe, CalculateHandlerBounds(scrollDirection), true); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to attach the __pHandlerVe to _Scroll.", GetErrorMessage(r)); + + DetachScrollChild(&__pThumbVe, true); + + __needUpdateHandler = true; + } + else + { + r = AttachScrollChild(&__pThumbVe, CalculateThumbBounds(scrollDirection), true); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to attach the __pThumbVe to _Scroll.", GetErrorMessage(r)); + + DetachScrollChild(&__pHandlerVe, true); + + __needUpdateThumb = true; + } + + // initialize scrolling effect front VE + __pFrontScrollingEffectVe = new (std::nothrow) _VisualElement(); + 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)); + + r = __pFrontScrollingEffectVe->SetSurfaceOpaque(false); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to set surface opaque.", GetErrorMessage(r)); + + __pFrontScrollingEffectVe->SetImplicitAnimationEnabled(false); + + r = pVe->AttachChild(*__pFrontScrollingEffectVe); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to attach child to the control VisualElement.", GetErrorMessage(r)); + + __pFrontScrollingEffectVe->SetBounds(CalculateScrollingEffectFrontBounds(scrollDirection)); + __pFrontScrollingEffectVe->SetShowState(true); + __pFrontScrollingEffectVe->SetOpacity(SCROLL_OPACITY_OFF); + + // initialize scrolling effect reer VE + __pReerScrollingEffectVe = new (std::nothrow) _VisualElement(); + 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)); + + r = __pReerScrollingEffectVe->SetSurfaceOpaque(false); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to set surface opaque.", GetErrorMessage(r)); + + __pReerScrollingEffectVe->SetImplicitAnimationEnabled(false); + + r = pVe->AttachChild(*__pReerScrollingEffectVe); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to attach child to the control VisualElement.", GetErrorMessage(r)); + + __pReerScrollingEffectVe->SetBounds(CalculateScrollCtrlBounds(scrollDirection)); + __pReerScrollingEffectVe->SetShowState(true); + __pReerScrollingEffectVe->SetOpacity(SCROLL_OPACITY_OFF); + + __needUpdateScrollingEffect = true; + + __scrollVisibility = visibility; + + r = __beforeBouncingMatrixHash.Construct(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; + +CATCH: + // set attributes + __pParentCtrl = null; + __pScrollCtrl = null; + __scrollDirection = SCROLL_DIRECTION_VERTICAL; + __enableFadeEffect = false; + __enableJumpToTop = false; + __enableHandler = false; + __enableScrollingEffect = false; + __enableOverScrollingEffect = false; + __isContextMenuScroll = false; + + __viewRange = 0.0f; + __scrollRange = 0.0f; + + __scrollPositionCurr = 0.0f; + __needUpdateThumb = false; + __needUpdateJumpTopTop = false; + __needUpdateHandler = false; + __needUpdateScrollingEffect = false; + __jumpToTopPressed = false; + + __thumbColor = 0x00000000; + __jumpToTopColor = 0x00000000; + __jumpToTopColorPressed = 0x00000000; + __buttonColor= 0x00000000; + __buttonColorPressed = 0x00000000; + + ReleaseBitmapResources(); + + __thumbSizeMin.SetSize(0.0f, 0.0f); + __thumbMargin = 0.0f; + __jumpToTopSize.SetSize(0.0f, 0.0f); + __jumpToTopMarginRight = 0.0f; + __jumpToTopMarginTop = 0.0f; + __handlerSizeMin.SetSize(0.0f, 0.0f); + __handlerMarginLeft = 0.0f; + __handlerMarginRight = 0.0f; + __handlerMarginTop = 0.0f; + __handlerMarginBottom = 0.0f; + __scrollingEffectWidthLeft = 0.0f; + __scrollingEffectWidthRight = 0.0f; + __scrollingEffectHeightTop = 0.0f; + __scrollingEffectHeightBottom = 0.0f; + + if (__pThumbVe != null) + { + __pThumbVe->Destroy(); + __pThumbVe = null; + } + + if (__pJumpToTopVe != null) + { + __pJumpToTopVe->Destroy(); + __pJumpToTopVe = null; + } + + if (__pHandlerVe != null) + { + __pHandlerVe->Destroy(); + __pHandlerVe = null; + } + + if (__pFrontScrollingEffectVe != null) + { + __pFrontScrollingEffectVe->RemoveAllAnimations(); + __pFrontScrollingEffectVe->Destroy(); + __pFrontScrollingEffectVe = null; + } + + if (__pReerScrollingEffectVe != null) + { + __pReerScrollingEffectVe->RemoveAllAnimations(); + __pReerScrollingEffectVe->Destroy(); + __pReerScrollingEffectVe = null; + } + + if (__pCtrlVe != null) + { + __pCtrlVe->RemoveAllAnimations(); + __pCtrlVe->SetAnimationProvider(null); + __pCtrlVe->Destroy(); + __pCtrlVe = null; + } + + return r; +} + +result +_ScrollPresenter::LoadResources(_ScrollDirection scrollDirection, _ControlOrientation orientation) +{ + result r = E_SUCCESS; + + r = LoadColorConfig(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to get resource.", GetErrorMessage(r)); + + r = LoadBitmapResources(scrollDirection); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to get resource.", GetErrorMessage(r)); + + r = LoadShapeConfig(scrollDirection, orientation); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to get resource.", GetErrorMessage(r)); + + return E_SUCCESS; + +CATCH: + __thumbColor = 0x00000000; + __jumpToTopColor = 0x00000000; + __jumpToTopColorPressed = 0x00000000; + __buttonColor= 0x00000000; + __buttonColorPressed = 0x00000000; + + ReleaseBitmapResources(); + + __thumbSizeMin.SetSize(0, 0); + __thumbMargin = 0; + __jumpToTopSize.SetSize(0, 0); + __jumpToTopMarginRight = 0; + __jumpToTopMarginTop = 0; + __handlerSizeMin.SetSize(0, 0); + __handlerMarginLeft = 0; + __handlerMarginRight = 0; + __handlerMarginTop = 0; + __handlerMarginBottom = 0; + __scrollingEffectWidthLeft = 0; + __scrollingEffectWidthRight = 0; + __scrollingEffectHeightTop = 0; + __scrollingEffectHeightBottom = 0; + + return r; + +} + +result +_ScrollPresenter::LoadColorConfig(void) +{ + result r = E_SUCCESS; + + // load color configuration + r = GET_COLOR_CONFIG(SCROLL::THUMB_BG_NORMAL, __thumbColor); + 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, "[%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, "[%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, "[%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, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); + + return E_SUCCESS; + +CATCH: + __thumbColor = 0x00000000; + __jumpToTopColor = 0x00000000; + __jumpToTopColorPressed = 0x00000000; + __buttonColor= 0x00000000; + __buttonColorPressed = 0x00000000; + + return E_SYSTEM; + +} + +result +_ScrollPresenter::LoadBitmapResources(_ScrollDirection scrollDirection) +{ + result r = E_SUCCESS; + + // release allocated resources. + ReleaseBitmapResources(); + + // load bitmap resources + 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, "[%s] A system error has occurred. Failed to load image.", GetErrorMessage(E_SYSTEM)); + + 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, "[%s] A system error has occurred. Failed to load image.", GetErrorMessage(E_SYSTEM)); + + if (scrollDirection == SCROLL_DIRECTION_HORIZONTAL) + { + 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, "[%s] A system error has occurred. Failed to load image.", GetErrorMessage(E_SYSTEM)); + + 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_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, "[%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, "[%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, "[%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, "[%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, "A system error has occurred.[%s] failed to load image.", GetErrorMessage(E_SYSTEM)); + } + else + { + 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, "A system error has occurred.[%s] failed to load image.", GetErrorMessage(E_SYSTEM)); + + 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_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, "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, "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, "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, "A system error has occurred.[%s] failed to load image.", GetErrorMessage(E_SYSTEM)); + } + + return E_SUCCESS; + +CATCH: + ReleaseBitmapResources(); + + return E_SYSTEM; +} + +result +_ScrollPresenter::LoadShapeConfig(_ScrollDirection scrollDirection, _ControlOrientation orientation) +{ + result r = E_SUCCESS; + + // load shape configuration + if (scrollDirection == SCROLL_DIRECTION_VERTICAL) + { + if (__isContextMenuScroll) + { + r = GET_SHAPE_CONFIG(SCROLL::CONTEXTTHUMB_MIN_WIDTH, orientation, __thumbSizeMin.width); + 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, "[%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, "[%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, "[%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, "[%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, "[%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, "[%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, "[%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, "[%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, "[%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, "[%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, "[%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, "[%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, "[%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, "[%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, "[%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, "[%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, "[%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, "[%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, "[%s] A system error has occurred. Failed to get resource.", GetErrorMessage(E_SYSTEM)); + + __handlerMarginRight = __handlerMarginLeft; + __handlerMarginTop = __handlerMarginLeft; + __handlerMarginBottom = __handlerMarginLeft; + + return E_SUCCESS; + +CATCH: + __thumbSizeMin.SetSize(0.0f, 0.0f); + __thumbMargin = 0.0f; + __jumpToTopSize.SetSize(0.0f, 0.0f); + __jumpToTopMarginRight = 0.0f; + __jumpToTopMarginTop = 0.0f; + __handlerSizeMin.SetSize(0.0f, 0.0f); + __handlerMarginLeft = 0.0f; + __handlerMarginRight = 0.0f; + __handlerMarginTop = 0.0f; + __handlerMarginBottom = 0.0f; + __scrollingEffectWidthLeft = 0.0f; + __scrollingEffectWidthRight = 0.0f; + __scrollingEffectHeightTop = 0.0f; + __scrollingEffectHeightBottom = 0.0f; + + return E_SYSTEM; + +} + +void +_ScrollPresenter::ReleaseBitmapResources(void) +{ + delete __pThumbBitmap; + __pThumbBitmap = null; + + delete __pThumbEffectBitmap; + __pThumbEffectBitmap = null; + + delete __pJumpToTopBitmap; + __pJumpToTopBitmap = null; + + delete __pJumpToTopPressBitmap; + __pJumpToTopPressBitmap = null; + + delete __pJumpToTopEfBitmap; + __pJumpToTopEfBitmap = null; + + delete __pButtonBitmap; + __pButtonBitmap = null; + + delete __pButtonEfBitmap; + __pButtonEfBitmap = null; + + delete __pButtonPressBitmap; + __pButtonPressBitmap = null; + + delete __pButtonPressEfBitmap; + __pButtonPressEfBitmap = null; + + delete __pHandlerBitmap; + __pHandlerBitmap = null; + + delete __pFrontScrollingEffectBitmap; + __pFrontScrollingEffectBitmap = null; + + delete __pReerScrollingEffectBitmap; + __pReerScrollingEffectBitmap = null; + + return; +} + +FloatRectangle +_ScrollPresenter::CalculateScrollCtrlBounds(_ScrollDirection scrollDirection) +{ + FloatRectangle scrollCtrlBounds; + FloatRectangle parentBounds = GetParentCtrl().GetBoundsF(); + + if (scrollDirection == SCROLL_DIRECTION_VERTICAL) + { + scrollCtrlBounds.width = MAX(scrollCtrlBounds.width, (__thumbSizeMin.width + __thumbMargin)); + scrollCtrlBounds.width = MAX(scrollCtrlBounds.width, (__handlerSizeMin.width + __handlerMarginRight + __handlerMarginLeft)); + scrollCtrlBounds.width = MAX(scrollCtrlBounds.width, (__jumpToTopSize.width + __jumpToTopMarginRight)); + scrollCtrlBounds.width = MIN(scrollCtrlBounds.width, (parentBounds.width)); + scrollCtrlBounds.height = parentBounds.height; + } + else + { + scrollCtrlBounds.height = MAX(scrollCtrlBounds.height, (__thumbSizeMin.width + __thumbMargin)); + scrollCtrlBounds.height = MAX(scrollCtrlBounds.height, (__handlerSizeMin.width + __handlerMarginRight + __handlerMarginLeft)); + scrollCtrlBounds.height = MAX(scrollCtrlBounds.height, (__jumpToTopSize.width + __jumpToTopMarginRight)); + scrollCtrlBounds.height = MIN(scrollCtrlBounds.height, (parentBounds.height)); + scrollCtrlBounds.width = parentBounds.width; + } + + scrollCtrlBounds.x = parentBounds.width - scrollCtrlBounds.width; + scrollCtrlBounds.y = parentBounds.height - scrollCtrlBounds.height; + + return scrollCtrlBounds; +} + +FloatRectangle +_ScrollPresenter::CalculateThumbBounds(_ScrollDirection scrollDirection) +{ + FloatDimension thumbSize = CalculateThumbSize(scrollDirection); + FloatPoint thumbPosition = CalculateThumbPosition(scrollDirection); + + FloatRectangle scrollCtrlBounds = __pCtrlVe->GetBounds(); + if (scrollDirection == SCROLL_DIRECTION_HORIZONTAL) + { + if (thumbPosition.x < 0.0f) + { + thumbPosition.x = 0.0f; + } + else if (thumbPosition.x > scrollCtrlBounds.width - thumbSize.width) + { + thumbPosition.x = scrollCtrlBounds.width - thumbSize.width; + } + } + else + { + if (thumbPosition.y < 0.0f) + { + thumbPosition.y = 0.0f; + } + else if (thumbPosition.y > scrollCtrlBounds.height - thumbSize.height) + { + thumbPosition.y = scrollCtrlBounds.height - thumbSize.height; + } + } + + return FloatRectangle(thumbPosition.x, thumbPosition.y, thumbSize.width, thumbSize.height); +} + +FloatPoint +_ScrollPresenter::CalculateThumbPosition(_ScrollDirection scrollDirection) +{ + FloatPoint thumbPosition; + FloatRectangle scrollCtrlBounds = __pCtrlVe->GetBounds(); + + if (scrollDirection == SCROLL_DIRECTION_VERTICAL) + { + thumbPosition.x = scrollCtrlBounds.width - (__thumbSizeMin.width + __thumbMargin); + if (thumbPosition.x < 0.0f) + { + thumbPosition.x = 0.0f; + } + + if (__scrollRange > 0.0f) + { + thumbPosition.y = (scrollCtrlBounds.height * __scrollPositionCurr) / __scrollRange; + if (__scrollPositionCurr < 0.0f) + { + thumbPosition.y = 0.0f; + } + } + else + { + thumbPosition.y = 0.0f; + } + } + else + { + thumbPosition.y = scrollCtrlBounds.height - (__thumbSizeMin.height + __thumbMargin); + if (thumbPosition.y < 0.0f) + { + thumbPosition.y = 0.0f; + } + + if (__scrollRange > 0.0f) + { + thumbPosition.x = (scrollCtrlBounds.width * __scrollPositionCurr) / __scrollRange; + if (__scrollPositionCurr < 0.0f) + { + thumbPosition.x = 0.0f; + } + } + else + { + thumbPosition.x = 0.0f; + } + } + + return thumbPosition; +} + +FloatDimension +_ScrollPresenter::CalculateThumbSize(_ScrollDirection scrollDirection) +{ + FloatDimension thumbSize; + FloatRectangle scrollCtrlBounds = __pCtrlVe->GetBounds(); + + if (scrollDirection == SCROLL_DIRECTION_VERTICAL) + { + thumbSize.width = MIN(__thumbSizeMin.width, scrollCtrlBounds.width); + if (__scrollRange > 0.0f) + { + thumbSize.height = (scrollCtrlBounds.height * __viewRange) / __scrollRange; + thumbSize.height = MAX(__thumbSizeMin.height, thumbSize.height); + thumbSize.height = MIN(scrollCtrlBounds.height, thumbSize.height); + } + else + { + thumbSize.height = 0.0f; + } + } + else + { + thumbSize.height = MIN(__thumbSizeMin.height, scrollCtrlBounds.height); + if (__scrollRange > 0.0f) + { + thumbSize.width = (scrollCtrlBounds.width * __viewRange) / __scrollRange; + thumbSize.width = MAX(__thumbSizeMin.width, thumbSize.width); + thumbSize.width = MIN(scrollCtrlBounds.width, thumbSize.width); + } + else + { + thumbSize.width = 0.0f; + } + } + + return thumbSize; +} + +FloatRectangle +_ScrollPresenter::CalculateHandlerBounds(_ScrollDirection scrollDirection) +{ + FloatDimension handlerSize = CalculateHandlerSize(scrollDirection); + FloatPoint handlerPosition = CalculateHandlerPosition(scrollDirection); + + FloatRectangle scrollCtrlBounds = __pCtrlVe->GetBounds(); + if (scrollDirection == SCROLL_DIRECTION_HORIZONTAL) + { + if (handlerPosition.x < 0.0f) + { + handlerPosition.x = 0.0f; + } + else if (handlerPosition.x > scrollCtrlBounds.width - handlerSize.width) + { + handlerPosition.x = scrollCtrlBounds.width - handlerSize.width; + } + } + else + { + if (handlerPosition.y < 0.0f) + { + handlerPosition.y = 0.0f; + } + else if (handlerPosition.y > scrollCtrlBounds.height - handlerSize.height) + { + handlerPosition.y = scrollCtrlBounds.height - handlerSize.height; + } + } + + return FloatRectangle(handlerPosition.x, handlerPosition.y, handlerSize.width, handlerSize.height); +} + +FloatPoint +_ScrollPresenter::CalculateHandlerPosition(_ScrollDirection scrollDirection) +{ + FloatPoint handlerPosition; + FloatRectangle scrollCtrlBounds = __pCtrlVe->GetBounds(); + + if (scrollDirection == SCROLL_DIRECTION_VERTICAL) + { + handlerPosition.x = scrollCtrlBounds.width - (__handlerSizeMin.width + __handlerMarginRight); + if (handlerPosition.x < 0.0f) + { + handlerPosition.x = 0.0f; + } + if (__scrollRange > 0.0f) + { + handlerPosition.y = (scrollCtrlBounds.height * __scrollPositionCurr) / __scrollRange; + } + else + { + handlerPosition.y = 0.0f; + } + } + else + { + handlerPosition.y = scrollCtrlBounds.height - (__handlerSizeMin.width + __handlerMarginRight); + if (handlerPosition.y < 0.0f) + { + handlerPosition.y = 0.0f; + } + if (__scrollRange > 0.0f) + { + handlerPosition.x = (scrollCtrlBounds.width * __scrollPositionCurr) / __scrollRange; + } + else + { + handlerPosition.x = 0.0f; + } + } + + return handlerPosition; +} + +FloatDimension +_ScrollPresenter::CalculateHandlerSize(_ScrollDirection scrollDirection) +{ + FloatDimension handlerSize; + FloatRectangle scrollCtrlBounds = __pCtrlVe->GetBounds(); + + if (scrollDirection == SCROLL_DIRECTION_VERTICAL) + { + handlerSize.width = MIN(__handlerSizeMin.width, scrollCtrlBounds.width); + if (__scrollRange > 0.0f) + { + handlerSize.height = (scrollCtrlBounds.height * __viewRange) / __scrollRange; + } + else + { + handlerSize.height = 0.0f; + } + } + else + { + handlerSize.height = MIN(__handlerSizeMin.width, scrollCtrlBounds.height); + if (__scrollRange > 0.0f) + { + handlerSize.width = (scrollCtrlBounds.width * __viewRange) / __scrollRange; + } + else + { + handlerSize.width = 0.0f; + } + } + + return handlerSize; +} + +FloatRectangle +_ScrollPresenter::CalculateJumpToTopBounds(_ScrollDirection scrollDirection) +{ + FloatRectangle scrollCtrlBounds = __pCtrlVe->GetBounds(); + FloatRectangle jumpToTopBounds(0.0f, 0.0f, 0.0f, 0.0f); + + if (scrollDirection == SCROLL_DIRECTION_VERTICAL) + { + jumpToTopBounds.width = MIN(__jumpToTopSize.width, scrollCtrlBounds.width); + jumpToTopBounds.height = MIN(__jumpToTopSize.height, scrollCtrlBounds.height); + jumpToTopBounds.x = scrollCtrlBounds.width - (__jumpToTopSize.width + __jumpToTopMarginRight); + if (jumpToTopBounds.x < 0.0f) + { + jumpToTopBounds.x = 0.0f; + } + jumpToTopBounds.y = __jumpToTopMarginTop; + } + else + { + jumpToTopBounds.width = MIN(__jumpToTopSize.width, scrollCtrlBounds.width); + jumpToTopBounds.height = MIN(__jumpToTopSize.height, scrollCtrlBounds.height); + jumpToTopBounds.y = scrollCtrlBounds.height - (__jumpToTopSize.height + __jumpToTopMarginRight); + if (jumpToTopBounds.y < 0.0f) + { + jumpToTopBounds.y = 0.0f; + } + jumpToTopBounds.x = __jumpToTopMarginTop; + } + + return jumpToTopBounds; +} + +FloatRectangle +_ScrollPresenter::CalculateScrollingEffectFrontBounds(_ScrollDirection scrollDirection) +{ + FloatRectangle scrollCtrlBounds = GetControl().GetBoundsF(); + FloatRectangle scrollEffectFrontBounds(0.0f, 0.0f, 0.0f, 0.0f); + + if (scrollDirection == SCROLL_DIRECTION_HORIZONTAL) + { + scrollEffectFrontBounds.width = __scrollingEffectWidthLeft; + scrollEffectFrontBounds.height = scrollCtrlBounds.height; + } + else + { + scrollEffectFrontBounds.width = scrollCtrlBounds.width; + scrollEffectFrontBounds.height = __scrollingEffectHeightTop; + } + return scrollEffectFrontBounds; +} + +FloatRectangle +_ScrollPresenter::CalculateScrollingEffectReerBounds(_ScrollDirection scrollDirection) +{ + FloatRectangle scrollCtrlBounds = GetControl().GetBoundsF(); + FloatRectangle scrollEffectReerBounds(0.0f, 0.0f, 0.0f, 0.0f); + + if (scrollDirection == SCROLL_DIRECTION_HORIZONTAL) + { + scrollEffectReerBounds.x = scrollCtrlBounds.width - __scrollingEffectWidthRight; + scrollEffectReerBounds.width = __scrollingEffectWidthRight; + scrollEffectReerBounds.height = scrollCtrlBounds.height; + } + else + { + scrollEffectReerBounds.y = scrollCtrlBounds.height - __scrollingEffectHeightBottom; + scrollEffectReerBounds.width = scrollCtrlBounds.width; + scrollEffectReerBounds.height = __scrollingEffectHeightBottom; + } + + return scrollEffectReerBounds; +} + +result +_ScrollPresenter::AttachScrollChild(_VisualElement** ppScrollVe, const FloatRectangle& bounds, bool visibility) +{ + result r = E_SUCCESS; + _VisualElement* pScrollVe = *ppScrollVe; + + if (pScrollVe == null) + { + pScrollVe = new (std::nothrow) _VisualElement(); + 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)); + + r = pScrollVe->SetSurfaceOpaque(false); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to set surface opaque.", GetErrorMessage(r)); + + pScrollVe->SetImplicitAnimationEnabled(false); + + r = __pCtrlVe->AttachChild(*pScrollVe); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to attach child to the __pCtrlVe.", GetErrorMessage(r)); + + *ppScrollVe = pScrollVe; + } + + pScrollVe->SetBounds(bounds); + pScrollVe->SetShowState(visibility); + + return E_SUCCESS; + +CATCH: + if (pScrollVe) + { + pScrollVe->Destroy(); + pScrollVe = null; + *ppScrollVe = pScrollVe; + } + + return r; +} + +void +_ScrollPresenter::DetachScrollChild(_VisualElement** ppScrollVe, bool destroy) +{ + _VisualElement* pScrollVe = *ppScrollVe; + + if (pScrollVe) + { + if (destroy) + { + pScrollVe->Destroy(); + pScrollVe = null; + *ppScrollVe = null; + } + else + { + pScrollVe->SetShowState(false); + } + } +} + +result +_ScrollPresenter::RelayoutScrollChildren(_ScrollDirection scrollDirection) +{ + result r = E_SUCCESS; + + __pCtrlVe->SetBounds(CalculateScrollCtrlBounds(scrollDirection)); + if (__enableJumpToTop) + { + __pJumpToTopVe->SetBounds(CalculateJumpToTopBounds(scrollDirection)); + __needUpdateJumpTopTop = true; + } + + if (__enableHandler) + { + __pHandlerVe->SetBounds(CalculateHandlerBounds(scrollDirection)); + __needUpdateHandler = true; + } + else + { + __pThumbVe->SetBounds(CalculateThumbBounds(scrollDirection)); + __needUpdateThumb = true; + } + + __pFrontScrollingEffectVe->SetBounds(CalculateScrollingEffectFrontBounds(scrollDirection)); + __pReerScrollingEffectVe->SetBounds(CalculateScrollingEffectReerBounds(scrollDirection)); + __needUpdateScrollingEffect = true; + + r = (GetControl().GetVisualElement())->InvalidateRectangle(null); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to invalidate Control Ve."); + + return E_SUCCESS; +} + +void +_ScrollPresenter::DrawThumb(void) +{ + if (__needUpdateThumb != true) + { + return; + } + + Canvas* pCanvas = null; + result r = E_SUCCESS; + + if (__enableHandler != true) + { + pCanvas = __pThumbVe->GetCanvasN(); + 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(); + + FloatRectangle thumbBounds = __pThumbVe->GetBounds(); + thumbBounds.SetPosition(0.0f, 0.0f); + bool isCustomBitmap = false; + if (__scrollDirection == SCROLL_DIRECTION_VERTICAL) + { + isCustomBitmap = IS_CUSTOM_BITMAP(SCROLL::THUMB_VERTICAL_BG_NORMAL); + } + else + { + isCustomBitmap = IS_CUSTOM_BITMAP(SCROLL::THUMB_HORIZONTAL_BG_NORMAL); + } + + + if (__isContextMenuScroll == false) + { + 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); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to draw bitmap.", GetErrorMessage(r)); + } + else + { + r = DrawBitmap(*pCanvas, thumbBounds, *__pThumbBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to draw bitmap.", GetErrorMessage(r)); + } + } + + __needUpdateThumb = false; + //fall through +CATCH: + delete pCanvas; + + + return; +} + +void +_ScrollPresenter::DrawJumpToTop(void) +{ + if (__needUpdateJumpTopTop != true) + { + return; + } + + Canvas* pCanvas = null; + result r = E_SUCCESS; + bool isCustomBitmap = false; + if (__enableJumpToTop) + { + String bitmapId = L"SCROLL::JUMP_TO_TOP_NORMAL"; + if (__scrollDirection == SCROLL_DIRECTION_HORIZONTAL) + { + bitmapId = L"SCROLL::JUMP_TO_LEFT_NORMAL"; + } + + Bitmap* pJumpToTopBitmap = __pJumpToTopBitmap; + Bitmap* pButtonBitmap = __pButtonBitmap; + Bitmap* pButtonEfBitmap = __pButtonEfBitmap; + String buttonBitmapId = L"SCROLL::BUTTON_BG_NORMAL"; + + if (__jumpToTopPressed) + { + pJumpToTopBitmap = __pJumpToTopPressBitmap; + pButtonBitmap = __pButtonPressBitmap; + pButtonEfBitmap = __pButtonPressEfBitmap; + buttonBitmapId = L"SCROLL::BUTTON_BG_PRESSED"; + } + + if (__jumpToTopPressed) + { + isCustomBitmap = IS_CUSTOM_BITMAP(SCROLL::BUTTON_BG_PRESSED); + } + else + { + isCustomBitmap = IS_CUSTOM_BITMAP(SCROLL::BUTTON_BG_NORMAL); + } + + pCanvas = __pJumpToTopVe->GetCanvasN(); + 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(); + + FloatRectangle jumpToTopBounds = __pJumpToTopVe->GetBounds(); + jumpToTopBounds.SetPosition(0.0f, 0.0f); + + //Draw Button + isCustomBitmap = IS_CUSTOM_BITMAP(SCROLL::BUTTON_BG_PRESSED); + if (isCustomBitmap == false) + { + r = DrawBitmap(*pCanvas, jumpToTopBounds, *pButtonEfBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to draw bitmap.", GetErrorMessage(r)); + } + + 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) + { + isCustomBitmap = IS_CUSTOM_BITMAP(SCROLL::JUMP_TO_TOP_NORMAL); + } + else + { + isCustomBitmap = IS_CUSTOM_BITMAP(SCROLL::JUMP_TO_LEFT_NORMAL); + } + if (isCustomBitmap == false) + { + r = DrawBitmap(*pCanvas, jumpToTopBounds, *__pJumpToTopEfBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to draw bitmap.", GetErrorMessage(r)); + } + + r = DrawBitmap(*pCanvas, jumpToTopBounds, *pJumpToTopBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to draw bitmap.", GetErrorMessage(r)); + } + + __needUpdateJumpTopTop = false; + //fall through +CATCH: + delete pCanvas; + + + return; +} + +void +_ScrollPresenter::DrawHandler(void) +{ + if (__needUpdateHandler != true) + { + return; + } + + Canvas* pCanvas = null; + result r = E_SUCCESS; + + if (__enableHandler) + { + // handler bounds setting + pCanvas = __pHandlerVe->GetCanvasN(); + 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)); + pCanvas->Clear(); + + // draw handler bg bitmap + FloatRectangle handlerBounds = __pHandlerVe->GetBounds(); + handlerBounds.SetPosition(0.0f, 0.0f); + + r = DrawBitmap(*pCanvas, handlerBounds, *__pHandlerBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to draw bitmap.", GetErrorMessage(r)); + } + + __needUpdateHandler = false; + //fall through +CATCH: + delete pCanvas; + + return; +} + +void +_ScrollPresenter::DrawScrollingEffect(void) +{ + if (__needUpdateScrollingEffect != true) + { + return; + } + + Canvas* pCanvas = null; + result r = E_SUCCESS; + + if (__pFrontScrollingEffectBitmap != null) + { + pCanvas = __pFrontScrollingEffectVe->GetCanvasN(); + SysTryReturnVoidResult(NID_UI_CTRL, pCanvas, GetLastResult(), "[%s] Failed to get the canvas of __pFrontScrollingEffectVe", GetErrorMessage(GetLastResult())); + + // clear background + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + + FloatRectangle effectBounds = __pFrontScrollingEffectVe->GetBounds(); + effectBounds.SetPosition(0.0f, 0.0f); + r = DrawBitmap(*pCanvas, effectBounds, *__pFrontScrollingEffectBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to draw bitmap.", GetErrorMessage(r)); + + delete pCanvas; + } + + if (__pReerScrollingEffectBitmap != null) + { + pCanvas = __pReerScrollingEffectVe->GetCanvasN(); + SysTryReturnVoidResult(NID_UI_CTRL, pCanvas, GetLastResult(), "[%s] Failed to get the canvas of __pReerScrollingEffectVe", GetErrorMessage(GetLastResult())); + + // clear background + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + + FloatRectangle effectBounds = __pReerScrollingEffectVe->GetBounds(); + effectBounds.SetPosition(0.0f, 0.0f); + r = DrawBitmap(*pCanvas, effectBounds, *__pReerScrollingEffectBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to draw bitmap.", GetErrorMessage(r)); + + delete pCanvas; + } + + __needUpdateScrollingEffect = false; + + return; + +CATCH: + delete pCanvas; +} + +result +_ScrollPresenter::DrawBitmap(Canvas& canvas, const FloatRectangle& bounds, const Bitmap& bitmap) +{ + result r = E_SUCCESS; + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(bitmap)) + { + r = canvas.DrawNinePatchedBitmap(bounds, bitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to draw ninepathced bitmap"); + } + else + { + FloatPoint pos((bounds.width - bitmap.GetWidthF()) / 2.0f, (bounds.height - bitmap.GetHeightF()) / 2.0f); + r = canvas.DrawBitmap(pos, bitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to draw bitmap"); + } + + return E_SUCCESS; +} + +bool +_ScrollPresenter::OnTouchPressedJumpToTop(const _Control& source, const _TouchInfo& touchinfo) +{ + if (__enableJumpToTop && IsScrollVisible()) + { + FloatRectangle ctrlBounds = __pCtrlVe->GetBounds(); + FloatRectangle jumpToTopBounds = __pJumpToTopVe->GetBounds(); + jumpToTopBounds.x += ctrlBounds.x; + jumpToTopBounds.y += ctrlBounds.y; + FloatPoint touchedPosition = touchinfo.GetCurrentPosition(); + if (jumpToTopBounds.Contains(touchedPosition)) + { + __needUpdateJumpTopTop = true; + __jumpToTopPressed = true; + SetScrollVisibility(true); + (GetControl().GetVisualElement())->InvalidateRectangle(null); + return true; + } + } + + return false; +} + +bool +_ScrollPresenter::OnTouchReleasedJumpToTop(const _Control& source, const _TouchInfo& touchinfo) +{ + if (__jumpToTopPressed) + { + __needUpdateJumpTopTop = true; + __jumpToTopPressed = false; + (GetControl().GetVisualElement())->InvalidateRectangle(null); + + if (__pScrollEvent) + { + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pScrollCtrl); + _UiScrollEventArg* pEventArg = _UiScrollEventArg::GetScrollJumpToTopEventArgN(*__pScrollCtrl); + SysTryReturn(NID_UI_CTRL, pEventArg, true, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + __pScrollEvent->Fire(*pEventArg); + return true; + } + } + return false; +} + +bool +_ScrollPresenter::OnTouchMovedJumpToTop(const _Control& source, const _TouchInfo& touchinfo) +{ + if (__jumpToTopPressed) + { + FloatRectangle ctrlBounds = __pCtrlVe->GetBounds(); + FloatRectangle jumpToTopBounds = __pJumpToTopVe->GetBounds(); + jumpToTopBounds.x += ctrlBounds.x; + jumpToTopBounds.y += ctrlBounds.y; + FloatPoint touchedPosition = touchinfo.GetCurrentPosition(); + if (!(jumpToTopBounds.Contains(touchedPosition))) + { + __needUpdateJumpTopTop = true; + __jumpToTopPressed = false; + (GetControl().GetVisualElement())->InvalidateRectangle(null); + } + return true; + } + + return false; +} + +bool +_ScrollPresenter::OnTouchPressedHandler(const _Control& source, const _TouchInfo& touchinfo) +{ + if (__enableHandler) + { + FloatRectangle ctrlBounds = __pCtrlVe->GetBounds(); + FloatRectangle handlerBounds = __pHandlerVe->GetBounds(); + handlerBounds.x += ctrlBounds.x; + handlerBounds.y += ctrlBounds.y; + FloatPoint touchedPosition = touchinfo.GetCurrentPosition(); + if (handlerBounds.Contains(touchedPosition)) + { + __handlerTouched = true; + if (__scrollDirection == SCROLL_DIRECTION_VERTICAL) + { + __handlerTouchedPosition = touchinfo.GetCurrentPosition().y; + } + else + { + __handlerTouchedPosition = touchinfo.GetCurrentPosition().x; + } + return true; + } + } + + return false; +} + +bool +_ScrollPresenter::OnTouchReleasedHandler(const _Control& source, const _TouchInfo& touchinfo) +{ + if (__enableHandler) + { + __handlerTouched = false; + __handlerTouchedPosition = 0.0f; + + if (__pScrollEvent) + { + _UiScrollEventArg* pEventArg = _UiScrollEventArg::GetScrollEventArgN(*__pScrollCtrl); + SysTryReturn(NID_UI_CTRL, pEventArg, true, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + __pScrollEvent->Fire(*pEventArg); + } + return true; + } + + // forwarding OnTouchReleased event to parent control + return false; +} + +bool +_ScrollPresenter::OnTouchMovedHandler(const _Control& source, const _TouchInfo& touchinfo) +{ + if (__enableHandler && __handlerTouched) + { + float scrollPosition = GetScrollPosition(); + FloatRectangle scrollCtrlBounds = GetControl().GetBoundsF(); + float touchPosition = 0.0f; + float scrollBoundsRange = 0.0f; + + if (__scrollDirection == SCROLL_DIRECTION_VERTICAL) + { + touchPosition = touchinfo.GetCurrentPosition().y; + scrollBoundsRange = scrollCtrlBounds.height; + } + else + { + touchPosition = touchinfo.GetCurrentPosition().x; + scrollBoundsRange = scrollCtrlBounds.width; + } + + float touchDistance = touchPosition - __handlerTouchedPosition; + float scrollDistance = (__scrollRange * touchDistance) / scrollBoundsRange; + + scrollPosition += scrollDistance; + + int scrollType = -1; + if (_FloatCompare(scrollPosition, 0.0f) || scrollPosition < 0.0f) + { + scrollType = (__scrollDirection == SCROLL_DIRECTION_VERTICAL) ? SCROLL_END_EVENT_END_TOP : SCROLL_END_EVENT_END_LEFT; + scrollPosition = 0.0f; + } + else if (scrollPosition >= __scrollRange - __viewRange) + { + scrollType = (__scrollDirection == SCROLL_DIRECTION_VERTICAL) ? SCROLL_END_EVENT_END_BOTTOM : + SCROLL_END_EVENT_END_RIGHT; + scrollPosition = __scrollRange - __viewRange; + } + + result r = SetScrollPosition(scrollPosition); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, true, r, "[%s] Failed to set scroll position.", GetErrorMessage(r)); + + __handlerTouchedPosition = touchPosition; + + if (__pScrollEvent) + { + _UiScrollEventArg* pEventArg = null; + if (scrollType >= 0) + { + pEventArg = _UiScrollEventArg::GetScrollEventArgN(*__pScrollCtrl, (ScrollEndEvent)scrollType); + SysTryReturn(NID_UI_CTRL, pEventArg, true, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + } + else + { + pEventArg = _UiScrollEventArg::GetScrollEventArgN(*__pScrollCtrl, GetScrollPosition()); + SysTryReturn(NID_UI_CTRL, pEventArg, true, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + } + + __pScrollEvent->Fire(*pEventArg); + } + + return true; + } + + // forwarding OnTouchMoved event to parent control + return false; +} + +void +_ScrollPresenter::SetParentCtrl(_Control& parentCtrl) +{ + __pParentCtrl = &parentCtrl; +} + +_Control& +_ScrollPresenter::GetParentCtrl(void) const +{ + return *__pParentCtrl; +} + +void +_ScrollPresenter::SetControl(_Scroll& scrollCtrl) +{ + __pScrollCtrl = &scrollCtrl; +} + +_Scroll& +_ScrollPresenter::GetControl(void) const +{ + return *__pScrollCtrl; +} + +result +_ScrollPresenter::SetScrollingEffect(void) +{ + if ((__enableScrollingEffect || __enableOverScrollingEffect) && __scrollingEffectVisibility) + { + if (__scrollPositionCurr < 0.0f) + { + SetScrollingEffectVisibility(false); + } + else if (__scrollPositionCurr > (__scrollRange - __viewRange)) + { + SetScrollingEffectVisibility(false); + } + else + { + if (__pFrontScrollingEffectVe->GetOpacity() != SCROLL_OPACITY_DARK_DIM && !__fadeOut) + { + SetScrollingEffectVisibility(true); + } + } + } + + return E_SUCCESS; +} + +result +_ScrollPresenter::SetParentBouncing(float rate) +{ + if (rate == __parentBouncingRate) + { + return E_SUCCESS; + } + + __parentBouncingRate = rate; + + return E_SUCCESS; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_SearchBar.cpp b/src/ui/controls/FUiCtrl_SearchBar.cpp new file mode 100644 index 0000000..7a07d35 --- /dev/null +++ b/src/ui/controls/FUiCtrl_SearchBar.cpp @@ -0,0 +1,2942 @@ +// +// 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_SearchBar.cpp + * @brief This is the implementation file for the _SearchBar class. + */ + +#include +#include +#include +#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" +#include "FUiCtrl_Edit.h" +#include "FUiCtrl_Panel.h" +#include "FUiCtrl_OverlayPanel.h" +#include "FUiCtrl_Keypad.h" +#include "FUiCtrl_ColorPicker.h" +#include "FUiCtrl_ActionEvent.h" +#include "FUiCtrl_TextBlockEvent.h" +#include "FUiCtrl_TextEvent.h" +#include "FUiCtrl_SearchBarImpl.h" +#include "FUiCtrl_EditFieldImpl.h" +#include "FUiCtrl_ButtonImpl.h" + + +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Animations; +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Locales; +using namespace Tizen::System; + +namespace Tizen { namespace Ui { namespace Controls +{ + +IMPLEMENT_PROPERTY(_SearchBar); + +_SearchBar::_SearchBar(void) + : __pSearchBarPresenter(null) + , __pClippedGroupControl(null) + , __pEdit(null) + , __pCancelButton(null) + , __pContainer(null) + , __pContentControl(null) + , __actionId(0) + , __searchBarStyle(0) + , __isButtonEnabled(true) + , __isUsableCancelButton(false) + , __isUserContainerBounds(false) + , __isCancelActionInProgress(false) + , __isUserGuideTextColor(false) + , __isKeypadOpening(false) + , __isupdateContentBounds(false) + , __isFocusCallbackToBeFired(true) + , __isButtonTextChangedByApp(false) + , __contentVisibilitySetByApp(true) + , __isFocusUiInitialized(false) + , __isTouchMoved(false) + , __keypadAction(CORE_KEYPAD_ACTION_SEARCH) + , __pBackgroundBitmap(null) + , __backgroundColor(Color()) + , __contentColor(Color()) + , __pActionEvent(null) + , __pKeypadEvent(null) + , __pTextBlockEvent(null) + , __pTextEvent(null) + , __pSearchBarEvent(null) + , __pLanguageEvent(null) + , __pAccessibilitySearchBarElement(null) +{ + for (int i = 0; i < SEARCHBAR_BUTTON_COLOR_MAX; i++) + { + __buttonColor[i] = Color(0); + __buttonTextColor[i] = Color(0); + } + + for (int i = 0; i < SEARCHBAR_COLOR_MAX; i++) + { + __color[i] = Color(0); + __textColor[i] = Color(0); + __guideTextColor[i] = Color(0); + } + + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + if (pContainer != null) + { + pContainer->Activate(true); + } +} + +_SearchBar::~_SearchBar(void) +{ + SettingInfo::RemoveSettingEventListener(*this); + + delete __pSearchBarPresenter; + __pSearchBarPresenter = null; + + if (__pClippedGroupControl != null) + { + DetachChild(*__pClippedGroupControl); + + delete __pClippedGroupControl; + __pClippedGroupControl = null; + } + + if (__pContainer != null) + { + DetachChild(*__pContainer); + + delete __pContainer; + __pContainer = null; + } + + delete __pActionEvent; + __pActionEvent = null; + + delete __pKeypadEvent; + __pKeypadEvent = null; + + delete __pTextBlockEvent; + __pTextBlockEvent = null; + + delete __pTextEvent; + __pTextEvent = null; + + delete __pSearchBarEvent; + __pSearchBarEvent = null; + + delete __pLanguageEvent; + __pLanguageEvent = null; + + if (__pAccessibilitySearchBarElement != null) + { + __pAccessibilitySearchBarElement->Activate(false); + __pAccessibilitySearchBarElement = null; + } + + delete __pBackgroundBitmap; + __pBackgroundBitmap = null; +} + +_SearchBar* +_SearchBar::CreateSearchBarN(void) +{ + _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; + return null; + } + + pSearchBar->AcquireHandle(); + pSearchBar->SetTouchPressThreshold(_TOUCH_PRESS_THRESHOLD_INSENSITIVE); + + return pSearchBar; +} + +result +_SearchBar::Initialize(bool enableSearchBarButton, CoreKeypadAction keypadAction) +{ + result r = E_SUCCESS; + + // Setting Button color + GET_COLOR_CONFIG(SEARCHBAR::BUTTON_BG_NORMAL, __buttonColor[SEARCH_BAR_BUTTON_STATUS_NORMAL]); + GET_COLOR_CONFIG(SEARCHBAR::BUTTON_BG_PRESSED, __buttonColor[SEARCH_BAR_BUTTON_STATUS_PRESSED]); + GET_COLOR_CONFIG(SEARCHBAR::BUTTON_BG_HIGHLIGHTED, __buttonColor[SEARCH_BAR_BUTTON_STATUS_HIGHLIGHTED]); + GET_COLOR_CONFIG(SEARCHBAR::BUTTON_BG_DISABLED, __buttonColor[SEARCH_BAR_BUTTON_STATUS_DISABLED]); + + GET_COLOR_CONFIG(SEARCHBAR::BUTTON_TEXT_NORMAL, __buttonTextColor[SEARCH_BAR_BUTTON_STATUS_NORMAL]); + GET_COLOR_CONFIG(SEARCHBAR::BUTTON_TEXT_PRESSED, __buttonTextColor[SEARCH_BAR_BUTTON_STATUS_PRESSED]); + GET_COLOR_CONFIG(SEARCHBAR::BUTTON_TEXT_HIGHLIGHTED, __buttonTextColor[SEARCH_BAR_BUTTON_STATUS_HIGHLIGHTED]); + GET_COLOR_CONFIG(SEARCHBAR::BUTTON_TEXT_DISABLED, __buttonTextColor[SEARCH_BAR_BUTTON_STATUS_DISABLED]); + + GET_COLOR_CONFIG(SEARCHBAR::CONTENT_AREA_BG_NORMAL, __contentColor); + + for (int i = 0; i < SEARCHBAR_COLOR_MAX; i++) + { + switch (i) + { + case SEARCH_FIELD_STATUS_DISABLED: + GET_COLOR_CONFIG(SEARCHBAR::EDIT_BG_DISABLED, __color[i]); + GET_COLOR_CONFIG(SEARCHBAR::EDIT_TEXT_DISABLED, __textColor[i]); + GET_COLOR_CONFIG(SEARCHBAR::GUIDE_TEXT_DISABLED, __guideTextColor[i]); + break; + + case SEARCH_FIELD_STATUS_HIGHLIGHTED: + GET_COLOR_CONFIG(SEARCHBAR::EDIT_BG_NORMAL, __color[i]); + GET_COLOR_CONFIG(SEARCHBAR::EDIT_TEXT_HIGHLIGHTED, __textColor[i]); + GET_COLOR_CONFIG(SEARCHBAR::GUIDE_TEXT_NORMAL, __guideTextColor[i]); + break; + default: + GET_COLOR_CONFIG(SEARCHBAR::EDIT_BG_NORMAL, __color[i]); + GET_COLOR_CONFIG(SEARCHBAR::EDIT_TEXT_NORMAL, __textColor[i]); + GET_COLOR_CONFIG(SEARCHBAR::GUIDE_TEXT_NORMAL, __guideTextColor[i]); + break; + } + } + + GET_COLOR_CONFIG(SEARCHBAR::BG_NORMAL, __backgroundColor); + + __isUsableCancelButton = enableSearchBarButton; + __keypadAction = keypadAction; + + GetVisualElement()->SetClipChildrenEnabled(false); + + r = CreateClippedGroupControl(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, + "[%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, + "[%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, + "[%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, + "[%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 != 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)); + + r = pPresenter->Install(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pSearchBarPresenter = pPresenter; + + InitializeAccessibility(); + + r = _SettingInfoImpl::AddSettingEventListener(*this); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + +CATCH: + delete pPresenter; + pPresenter = null; + + return r; +} + +result +_SearchBar::CreateSearchField(void) +{ + result r = E_SUCCESS; + + FloatRectangle editBounds; + float horizontalMargin = 0.0f; + float verticalMargin = 0.0f; + float iconHorizontalMargin = 0.0f; + float textHorizontalMargin = 0.0f; + float iconWidth = 0.0f; + float textSize = 0.0f; + float searchBarMinHeight = 0.0f; + float searchBarMinWidthModeNormal = 0.0f; + + FloatRectangle searchBarBounds = GetBoundsF(); + _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); + + GET_SHAPE_CONFIG(SEARCHBAR::HORIZONTAL_MARGIN, orientation, horizontalMargin); + GET_SHAPE_CONFIG(SEARCHBAR::VERTICAL_MARGIN, orientation, verticalMargin); + GET_SHAPE_CONFIG(SEARCHBAR::ICON_HORIZONTAL_MARGIN, orientation, iconHorizontalMargin); + GET_SHAPE_CONFIG(SEARCHBAR::ICON_WIDTH, orientation, iconWidth); + GET_SHAPE_CONFIG(SEARCHBAR::TEXT_HORIZONTAL_MARGIN, orientation, textHorizontalMargin); + GET_SHAPE_CONFIG(SEARCHBAR::SEARCH_FIELD_MIN_WIDTH_NORMAL_MODE, orientation, searchBarMinWidthModeNormal); + GET_SHAPE_CONFIG(SEARCHBAR::MIN_HEIGHT, orientation, searchBarMinHeight); + + float searchFieldMinHeight = searchBarMinHeight - (verticalMargin * 2.0f); + + editBounds.x = horizontalMargin; + + if (searchBarBounds.height < searchBarMinHeight) + { + verticalMargin = (searchBarBounds.height - searchFieldMinHeight)/2.0f; + if (verticalMargin < 0.0f) + { + verticalMargin = 0.0f; + } + } + + editBounds.y = verticalMargin; + + editBounds.width = searchBarBounds.width - (editBounds.x * 2.0f); + editBounds.height = searchBarBounds.height - (editBounds.y * 2.0f); + + editBounds.width = (editBounds.width > searchBarMinWidthModeNormal) ? editBounds.width : searchBarMinWidthModeNormal; + editBounds.height = (editBounds.height > searchFieldMinHeight) ? editBounds.height : searchFieldMinHeight; + + _SearchBarImpl* pSearchBarImpl = static_cast<_SearchBarImpl*>(GetUserData()); + 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, + "A system error has occurred. Failed to get _Edit instance."); + + __pEdit->SetKeypadCommandButtonVisible(false); + __pEdit->SetBounds(editBounds); + __pEdit->AddKeypadEventListener(*this); + __pEdit->AddTextBlockEventListener(*this); + __pEdit->AddTextEventListener(*this); + + GET_SHAPE_CONFIG(SEARCHBAR::EDIT_TEXT_SIZE, orientation, textSize); + __pEdit->SetTextSize(textSize); + + __pEdit->SetHorizontalMargin(iconHorizontalMargin + iconWidth + textHorizontalMargin, EDIT_TEXT_LEFT_MARGIN); + __pEdit->SetHorizontalMargin(textHorizontalMargin, EDIT_TEXT_RIGHT_MARGIN); + __pEdit->SetLimitLength(SEARCHBAR_TEXT_LENGTH_MAX); + + for (int status = 0; status < SEARCHBAR_COLOR_MAX; status++) + { + EditStatus editStatus = ConvertSearchBarStatus((SearchFieldStatus) status); + __pEdit->SetColor(editStatus, __color[status]); + } + + __pEdit->SetTextColor(EDIT_TEXT_COLOR_NORMAL, __textColor[SEARCH_FIELD_STATUS_NORMAL]); + __pEdit->SetTextColor(EDIT_TEXT_COLOR_DISABLED, __textColor[SEARCH_FIELD_STATUS_DISABLED]); + __pEdit->SetTextColor(EDIT_TEXT_COLOR_HIGHLIGHTED, __textColor[SEARCH_FIELD_STATUS_HIGHLIGHTED]); + + __pEdit->ReplaceDefaultBackgroundBitmapForSearchBar(); + + __pEdit->SetKeypadAction(__keypadAction); + + r = __pClippedGroupControl->AttachChild(*__pEdit); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, + "[%s] A system error has occurred. Failed to attach edit as child.", GetErrorMessage(E_SYSTEM)); + + return E_SUCCESS; + +CATCH: + delete __pEdit; + __pEdit = null; + + return r; +} + +result +_SearchBar::CreateCancelButton(void) +{ + result r = E_SUCCESS; + + float textSize = 0.0f; + String cancelButtonText; + + _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); + + _SearchBarImpl* pSearchBarImpl = static_cast<_SearchBarImpl*>(GetUserData()); + 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, + "A system error has occurred. Failed to get _Button instance."); + + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = ResizeCancelButton(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_CANCEL_ABB, cancelButtonText); + r = __pCancelButton->SetText(cancelButtonText); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + GET_SHAPE_CONFIG(SEARCHBAR::BUTTON_TEXT_SIZE, orientation, textSize); + r = __pCancelButton->SetTextSize(textSize); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pCancelButton->SetTextHorizontalAlignment(ALIGNMENT_CENTER); + __pCancelButton->SetTextVerticalAlignment(ALIGNMENT_MIDDLE); + + r = __pCancelButton->SetActionId(__actionId); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __pCancelButton->AddActionEventListener(*this); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pCancelButton->SetVisibleState(false); + + for (int status = 0; status < SEARCHBAR_BUTTON_COLOR_MAX; status++) + { + _ButtonStatus buttonStatus = ConvertSearchBarButtonStatus((SearchBarButtonStatus) status); + + r = __pCancelButton->SetColor(buttonStatus, __buttonColor[status]); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __pCancelButton->SetTextColor(buttonStatus, __buttonTextColor[status]); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + r = __pClippedGroupControl->AttachChild(*__pCancelButton); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, + "[%s] A system error has occurred. Failed to attach button as child.", GetErrorMessage(E_SYSTEM)); + + return E_SUCCESS; + +CATCH: + delete __pCancelButton; + __pCancelButton = null; + + return r; +} + +result +_SearchBar::CreateContentsArea(void) +{ + result r = E_SUCCESS; + + __pContainer = _Control::CreateControlN(); + + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + __pContainer->SetVisibleState(false); + + r = AttachChild(*__pContainer); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, + "[%s] A system error has occurred. Failed to attach the parent of content.", GetErrorMessage(E_SYSTEM)); + + return E_SUCCESS; + +CATCH: + delete __pContainer; + __pContainer = null; + + return r; +} + +void +_SearchBar::SetContentsArea(void) +{ + if (__isUserContainerBounds) + { + return; + } + + FloatDimension screenSize = _ControlManager::GetInstance()->GetScreenSizeF(); + float width = screenSize.width; + float height = screenSize.height; + + _Control* pParent = GetParentForm(); + if (pParent != null) + { + width = pParent->GetClientBoundsF().width; + height = pParent->GetClientBoundsF().height; + } + + FloatRectangle controlBounds = GetBoundsF(); + controlBounds = CoordinateSystem::AlignToDevice(FloatRectangle(controlBounds)); + + __contentAreaBounds.x = 0.0f; + __contentAreaBounds.y = controlBounds.height; + __contentAreaBounds.width = width - controlBounds.x; + __contentAreaBounds.height = height - (controlBounds.y + controlBounds.height); + + if (__pContainer != null) + { + result r = E_SUCCESS; + r = __pContainer->SetBounds(__contentAreaBounds); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + return; +} + +_Control* +_SearchBar::GetContent(void) const +{ + return __pContentControl; +} + +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); + result r = E_SUCCESS; + + if (__pContainer != null) + { + r = __pContainer->AttachChild(*__pContentControl); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating"); + } + + return r; +} + +result +_SearchBar::UpdateContentArea(bool invalidate) +{ + return __pSearchBarPresenter->UpdateContentArea(invalidate); +} + +result +_SearchBar::SetContentAreaVisible(bool visible, bool isCalledByApp) +{ + 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) + { + __pContainer->SetVisibleState(visible); + } + + if (isCalledByApp) + { + __contentVisibilitySetByApp = visible; + } + + return __pSearchBarPresenter->SetContentAreaVisible(visible); +} + +bool +_SearchBar::IsContentAreaVisible(void) const +{ + return __pSearchBarPresenter->IsContentAreaVisible(); +} + +result +_SearchBar::SetContentAreaSize(const Dimension& size) +{ + return SetProperty("contentAreaSize", Variant(size)); +} + +Dimension +_SearchBar::GetContentAreaSize(void) const +{ + Variant size = GetProperty("contentAreaSize"); + + return size.ToDimension(); +} + +SearchBarMode +_SearchBar::GetMode(void) const +{ + return __pSearchBarPresenter->GetMode(); +} + +bool +_SearchBar::IsModeLocked(void) const +{ + return __pSearchBarPresenter->IsModeLocked(); +} + +result +_SearchBar::SetMode(SearchBarMode mode, bool isCalledByApp) +{ + _AccessibilityElement* pEditElement = __pEdit->GetTextAccessibilityElement(); +// if (mode == SEARCH_BAR_MODE_NORMAL) +// { +// pEditElement->SetHint("Double Tap To Type Search Text"); +// } +// else +// { +// pEditElement->SetHint("Enter Search Text"); +// } + +// pEditElement->SetTrait("SearchBar"); + pEditElement->SetName("SearchField"); + + return __pSearchBarPresenter->SetMode(mode, isCalledByApp); +} + +result +_SearchBar::SetModeLocked(bool modeLocked) +{ + if (modeLocked && GetMode() == SEARCH_BAR_MODE_NORMAL) + { + __pEdit->SetViewModeEnabled(true); + } + + if (!modeLocked && __pEdit->IsViewModeEnabled()) + { + __pEdit->SetViewModeEnabled(false); + } + + return __pSearchBarPresenter->SetModeLocked(modeLocked); +} + +int +_SearchBar::GetButtonActionId(void) const +{ + Variant actionId = GetProperty("buttonActionId"); + + return actionId.ToInt(); +} + +Color +_SearchBar::GetButtonColor(SearchBarButtonStatus status) const +{ + Variant buttonColor; + + switch (status) + { + case SEARCH_BAR_BUTTON_STATUS_NORMAL: + buttonColor = GetProperty("buttonNormalColor"); + break; + case SEARCH_BAR_BUTTON_STATUS_PRESSED: + buttonColor = GetProperty("buttonPressedColor"); + break; + case SEARCH_BAR_BUTTON_STATUS_HIGHLIGHTED: + buttonColor = GetProperty("buttonHighlightedColor"); + break; + case SEARCH_BAR_BUTTON_STATUS_DISABLED: + buttonColor = GetProperty("buttonDisabledColor"); + break; + default: + break; + } + + return buttonColor.ToColor(); +} + +Color +_SearchBar::GetButtonTextColor(SearchBarButtonStatus status) const +{ + Variant buttonTextColor; + + switch (status) + { + case SEARCH_BAR_BUTTON_STATUS_NORMAL: + buttonTextColor = GetProperty("buttonNormalTextColor"); + break; + case SEARCH_BAR_BUTTON_STATUS_PRESSED: + buttonTextColor = GetProperty("buttonPressedTextColor"); + break; + case SEARCH_BAR_BUTTON_STATUS_HIGHLIGHTED: + buttonTextColor = GetProperty("buttonHighlightedTextColor"); + break; + case SEARCH_BAR_BUTTON_STATUS_DISABLED: + buttonTextColor = GetProperty("buttonDisabledTextColor"); + break; + default: + break; + } + + return buttonTextColor.ToColor(); +} + +SearchBarButtonStatus +_SearchBar::GetButtonStatus(void) const +{ + 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; + + if (!__isButtonEnabled) + { + buttonStatus = SEARCH_BAR_BUTTON_STATUS_DISABLED; + } + + return buttonStatus; +} + +result +_SearchBar::SetButtonText(const String& text) +{ + 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, + "[%s] A system error has occurred. Failed to set text.", GetErrorMessage(E_SYSTEM)); + + __isButtonTextChangedByApp = true; + + return r; +} + +result +_SearchBar::SetButtonActionId(int actionId) +{ + return SetProperty("buttonActionId", Variant(actionId)); +} + +result +_SearchBar::SetButtonEnabled(bool enabled) +{ + 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); + + __isButtonEnabled = enabled; + + return E_SUCCESS; +} + +result +_SearchBar::SetButtonColor(SearchBarButtonStatus status, const Color& color) +{ + result r = E_SUCCESS; + + switch (status) + { + case SEARCH_BAR_BUTTON_STATUS_NORMAL: + r = SetProperty("buttonNormalColor", Variant(color)); + break; + case SEARCH_BAR_BUTTON_STATUS_PRESSED: + r = SetProperty("buttonPressedColor", Variant(color)); + break; + case SEARCH_BAR_BUTTON_STATUS_HIGHLIGHTED: + r = SetProperty("buttonHighlightedColor", Variant(color)); + break; + case SEARCH_BAR_BUTTON_STATUS_DISABLED: + r = SetProperty("buttonDisabledColor", Variant(color)); + break; + default: + break; + } + + return r; +} + +result +_SearchBar::SetButtonTextColor(SearchBarButtonStatus status, const Color& color) +{ + result r = E_SUCCESS; + + switch (status) + { + case SEARCH_BAR_BUTTON_STATUS_NORMAL: + r = SetProperty("buttonNormalTextColor", Variant(color)); + break; + case SEARCH_BAR_BUTTON_STATUS_PRESSED: + r = SetProperty("buttonPressedTextColor", Variant(color)); + break; + case SEARCH_BAR_BUTTON_STATUS_HIGHLIGHTED: + r = SetProperty("buttonHighlightedTextColor", Variant(color)); + break; + case SEARCH_BAR_BUTTON_STATUS_DISABLED: + r = SetProperty("buttonDisabledTextColor", Variant(color)); + break; + default: + break; + } + + return r; +} + +result +_SearchBar::AppendCharacter(const Character& character) +{ + 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, + "[%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, + "[%s] A system error has occurred. Failed to set character.", GetErrorMessage(E_SYSTEM)); + + return r; +} + +result +_SearchBar::AppendText(const String& text) +{ + 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, + "[%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, + "[%s] A system error has occurred. Failed to set text.", GetErrorMessage(E_SYSTEM)); + + return r; +} + +result +_SearchBar::SetText(const String& text) +{ + 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, + "[%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, + "[%s] A system error has occurred. Failed to set text.", GetErrorMessage(E_SYSTEM)); + + return r; +} + +result +_SearchBar::InsertCharacterAt(int index, const Character& character) +{ + 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, + "[%s] index(%d) is out of range.", GetErrorMessage(E_OUT_OF_RANGE), index); + SysTryReturn(NID_UI_CTRL, character.CompareTo(null), E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The character is null.", GetErrorMessage(E_SYSTEM)); + + result r = E_SUCCESS; + + int textLength = 0; + int limitLength = 0; + limitLength = __pEdit->GetTextLimitLength(); + textLength = __pEdit->GetTextLength() + 1; + + SysTryReturn(NID_UI_CTRL, limitLength >= textLength, E_MAX_EXCEEDED, E_MAX_EXCEEDED, + "[%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, + "[%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, + "[%s] A system error has occurred. Failed to set text.", GetErrorMessage(E_SYSTEM)); + + return r; +} + +result +_SearchBar::InsertTextAt(int index, const String& text) +{ + 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, + "[%s] index(%d) is out of range.", GetErrorMessage(E_OUT_OF_RANGE), index); + + result r = E_SUCCESS; + + int textLength = 0; + int limitLength = 0; + limitLength = __pEdit->GetTextLimitLength(); + textLength = __pEdit->GetTextLength() + text.GetLength(); + + SysTryReturn(NID_UI_CTRL, limitLength >= textLength, E_MAX_EXCEEDED, E_MAX_EXCEEDED, + "[%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, + "[%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, + "[%s] A system error has occurred. Failed to insert text.", GetErrorMessage(E_SYSTEM)); + + return r; +} + +result +_SearchBar::DeleteCharacterAt(int index) +{ + 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, + "[%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, + "[%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, + "A system error has occurred. Failed to delete character."); + + return r; +} + +result +_SearchBar::Clear(void) +{ + 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(); +} + +int +_SearchBar::GetTextLength(void) const +{ + 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(); +} + +String +_SearchBar::GetText(void) const +{ + 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(); +} + +String +_SearchBar::GetText(int start, int end) const +{ + 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); +} + +int +_SearchBar::GetLimitLength(void) const +{ + 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(); +} + +result +_SearchBar::SetLimitLength(int limitLength) +{ + 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, + "[%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, + "[%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)); + + r = SetText(tempString); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +_SearchBar::ShowKeypad(void) const +{ + 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, + "[%s] The SearchBar is currently in Normal mode.", GetErrorMessage(E_INVALID_STATE)); + return __pEdit->ShowKeypad(); +} + +result +_SearchBar::HideKeypad(void) +{ + 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, + "[%s] A system error has occurred. The SearchBar is currently in Normal mode.", GetErrorMessage(E_SYSTEM)); + + result r = __pEdit->HideKeypad(); + + SetContentsArea(); + + return r; +} + +float +_SearchBar::GetSearchFieldTextSizeF(void) const +{ + 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(); +} + +result +_SearchBar::SetSearchFieldTextSize(float size) +{ + 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); +} + +result +_SearchBar::GetBlockRange(int& start, int& end) const +{ + 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, + "[%s] A system error has occurred. Failed to get text block range.", GetErrorMessage(E_SYSTEM)); + + start = startIndex; + end = endIndex - 1; + + return E_SUCCESS; +} + +result +_SearchBar::ReleaseBlock(void) +{ + 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 start = 0; + int end = 0; + + r = GetBlockRange(start, end); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return __pEdit->ReleaseTextBlock(); +} + +result +_SearchBar::SetBlockRange(int start, int end) +{ + 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 textLength = 0; + textLength = __pEdit->GetTextLength(); + + SysTryReturn(NID_UI_CTRL, (start < end && start >= 0 && textLength >= end), E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[%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, + "[%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, + "[%s] A system error has occurred. Failed to set cursor position.", GetErrorMessage(E_SYSTEM)); + + return E_SUCCESS; +} + +result +_SearchBar::RemoveTextBlock(void) +{ + 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->RemoveTextBlock(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +Color +_SearchBar::GetColor(void) const +{ + Variant backgroundColor = GetProperty("color"); + + return backgroundColor.ToColor(); +} + +Color +_SearchBar::GetSearchFieldColor(SearchFieldStatus status) const +{ + Variant searchFieldColor; + + switch (status) + { + case SEARCH_FIELD_STATUS_NORMAL: + searchFieldColor = GetProperty("searchFieldNormalColor"); + break; + case SEARCH_FIELD_STATUS_HIGHLIGHTED: + searchFieldColor = GetProperty("searchFieldHighlightedColor"); + break; + case SEARCH_FIELD_STATUS_DISABLED: + searchFieldColor = GetProperty("searchFieldDisabledColor"); + break; + default: + break; + } + + return searchFieldColor.ToColor(); +} + + +Color +_SearchBar::GetSearchFieldTextColor(SearchFieldStatus status) const +{ + Variant searchFieldTextColor; + + switch (status) + { + case SEARCH_FIELD_STATUS_NORMAL: + searchFieldTextColor = GetProperty("searchFieldNormalTextColor"); + break; + case SEARCH_FIELD_STATUS_HIGHLIGHTED: + searchFieldTextColor = GetProperty("searchFieldHighlightedTextColor"); + break; + case SEARCH_FIELD_STATUS_DISABLED: + searchFieldTextColor = GetProperty("searchFieldDisabledTextColor"); + break; + default: + break; + } + + return searchFieldTextColor.ToColor(); +} + + +result +_SearchBar::SetBackgroundBitmap(const Bitmap& bitmap) +{ + Bitmap* pNewBitmap = _BitmapImpl::CloneN(bitmap); + 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; + + __pBackgroundBitmap = pNewBitmap; + + return E_SUCCESS; +} + +Bitmap* +_SearchBar::GetBackgroundBitmap(void) const +{ + return __pBackgroundBitmap; +} + +result +_SearchBar::SetColor(const Color& color) +{ + return SetProperty("color", Variant(color)); +} + +result +_SearchBar::SetSearchFieldColor(SearchFieldStatus status, const Color& color) +{ + result r = E_SUCCESS; + + switch (status) + { + case SEARCH_FIELD_STATUS_NORMAL: + r = SetProperty("searchFieldNormalColor", Variant(color)); + break; + case SEARCH_FIELD_STATUS_HIGHLIGHTED: + r = SetProperty("searchFieldHighlightedColor", Variant(color)); + break; + case SEARCH_FIELD_STATUS_DISABLED: + r = SetProperty("searchFieldDisabledColor", Variant(color)); + break; + default: + break; + } + + return r; +} + + +result +_SearchBar::SetSearchFieldTextColor(SearchFieldStatus status, const Color& color) +{ + result r = E_SUCCESS; + + switch (status) + { + case SEARCH_FIELD_STATUS_NORMAL: + r = SetProperty("searchFieldNormalTextColor", Variant(color)); + break; + case SEARCH_FIELD_STATUS_HIGHLIGHTED: + r = SetProperty("searchFieldHighlightedTextColor", Variant(color)); + break; + case SEARCH_FIELD_STATUS_DISABLED: + r = SetProperty("searchFieldDisabledTextColor", Variant(color)); + break; + default: + break; + } + + return r; +} + + +String +_SearchBar::GetGuideText(void) const +{ + 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(); +} + +result +_SearchBar::SetGuideText(const String& guideText) +{ + 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); + + return E_SUCCESS; +} + +Color +_SearchBar::GetGuideTextColor(void) const +{ + 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(); +} + +result +_SearchBar::SetGuideTextColor(const Color& color) +{ + 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); +} + +int +_SearchBar::GetCursorPosition(void) const +{ + 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(); +} + +result +_SearchBar::SetCursorPosition(int index) +{ + 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, + "[%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, + "[%s] index(%d) is out of range.", GetErrorMessage(E_OUT_OF_RANGE), index); + + return __pEdit->SetCursorPosition(index); +} + +bool +_SearchBar::IsLowerCaseModeEnabled(void) const +{ + 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(); +} + +void +_SearchBar::SetLowerCaseModeEnabled(bool enable) +{ + 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); +} + +EllipsisPosition +_SearchBar::GetEllipsisPosition(void) const +{ + 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(); +} + +result +_SearchBar::SetEllipsisPosition(EllipsisPosition position) +{ + 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; +} + +CoreKeypadAction +_SearchBar::GetKeypadAction(void) const +{ + return __keypadAction; +} + +bool +_SearchBar::IsTextPredictionEnabled(void) const +{ + 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 != null, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. The _Edit instance is null.", GetErrorMessage(E_SYSTEM)); + return __pEdit->SetTextPredictionEnabled(enable); +} + +result +_SearchBar::SetCurrentLanguage(LanguageCode languageCode) +{ + return __pEdit->SetCurrentLanguage(languageCode); +} + +result +_SearchBar::GetCurrentLanguage(LanguageCode& language) const +{ + return __pEdit->GetCurrentLanguage(language); +} + +result +_SearchBar::AddActionEventListener(const _IActionEventListener& listener) +{ + result r = E_SUCCESS; + + if (__pActionEvent == null) + { + __pActionEvent = _ActionEvent::CreateInstanceN(*this); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + __pActionEvent->AddListener(listener); + } + + return r; +} + +result +_SearchBar::RemoveActionEventListener(const _IActionEventListener& listener) +{ + 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); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +result +_SearchBar::AddKeypadEventListener(const _IKeypadEventListener& listener) +{ + result r = E_SUCCESS; + + if (__pKeypadEvent == null) + { + __pKeypadEvent = _KeypadEvent::CreateInstanceN(*this); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = __pKeypadEvent->AddListener(listener); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + + return r; +} + +result +_SearchBar::RemoveKeypadEventListener(const _IKeypadEventListener& listener) +{ + 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); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +result +_SearchBar::AddTextBlockEventListener(const _ITextBlockEventListener& listener) +{ + result r = E_SUCCESS; + + if (__pTextBlockEvent == null) + { + __pTextBlockEvent = _TextBlockEvent::CreateInstanceN(*this); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = __pTextBlockEvent->AddListener(listener); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + } + + return r; +} + +result +_SearchBar::RemoveTextBlockEventListener(const _ITextBlockEventListener& listener) +{ + 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); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + + +result +_SearchBar::AddTextEventListener(const _ITextEventListener& listener) +{ + result r = E_SUCCESS; + + if (__pTextEvent == null) + { + __pTextEvent = _TextEvent::CreateInstanceN(*this); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = __pTextEvent->AddListener(listener); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + + return r; +} + +result +_SearchBar::RemoveTextEventListener(const _ITextEventListener& listener) +{ + 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); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +result +_SearchBar::AddSearchBarEventListener(const _ISearchBarEventListener& listener) +{ + result r = E_SUCCESS; + + if (__pSearchBarEvent == null) + { + __pSearchBarEvent = _SearchBarEvent::CreateInstanceN(*this); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = __pSearchBarEvent->AddListener(listener); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + + return r; +} + +result +_SearchBar::RemoveSearchBarEventListener(const _ISearchBarEventListener& listener) +{ + 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); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +result +_SearchBar::AddLanguageEventListener(const _ILanguageEventListener& listener) +{ + result r = E_SUCCESS; + + if (__pLanguageEvent == null) + { + __pLanguageEvent = _LanguageEvent::CreateInstanceN(*this); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = __pLanguageEvent->AddListener(listener); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + + return r; +} + +result +_SearchBar::RemoveLanguageEventListener(const _ILanguageEventListener& listener) +{ + 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); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +void +_SearchBar::OnBoundsChanged(void) +{ + if (__pSearchBarPresenter != null) + { + __isupdateContentBounds = true; + __pSearchBarPresenter->OnBoundsChanged(); + } + + if (__pAccessibilitySearchBarElement != null) + { + __pAccessibilitySearchBarElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height)); + } + + if (IsFocused()) + { + RemoveFocusRing(true); + if (IsFocusModeStateEnabled()) + { + DrawFocus(); + } + } + + return; +} + +void +_SearchBar::OnChangeLayout(_ControlOrientation orientation) +{ + __isupdateContentBounds = true; + return; +} + +void +_SearchBar::OnDraw(void) +{ + if (!__isUserGuideTextColor) + { + SearchFieldStatus status = GetCurrentStatus(); + __pEdit->SetGuideTextColor(__guideTextColor[status]); + } + + if (__isupdateContentBounds) + { + SetContentsArea(); + __isupdateContentBounds = false; + } + __pSearchBarPresenter->Draw(); + return; +} + +_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)); + if (pEdit == null) + { + return _UI_TOUCH_EVENT_DELIVERY_YES; + } + + if (pEdit->IsClearIconPressed()) + { + __isTouchMoved = false; + return _UI_TOUCH_EVENT_DELIVERY_YES; + } + + SetContentAreaVisible(__contentVisibilitySetByApp); //When a touch happens on SearchField + SetFocusCallbackParameter(true); + + 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; +} + +bool +_SearchBar::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + __pSearchBarPresenter->OnTouchReleased(source); + return true; +} + +void +_SearchBar::FireButtonActionEvent(const _Control &source, int actionId) +{ + if (__actionId == actionId) + { + __isCancelActionInProgress = true; + SetFocusCallbackParameter(true); + SetMode(SEARCH_BAR_MODE_NORMAL); + + SetFocused(); + + if (__pActionEvent != null) + { + IEventArg* pEventArg = _ActionEvent::CreateActionEventArgN(__actionId); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pActionEvent->Fire(*pEventArg); + } + __isCancelActionInProgress = false; + } +} + +void +_SearchBar::OnActionPerformed(const _Control& source, int actionId) +{ + FireButtonActionEvent(source, actionId); + return; +} + +// Keypad callbacks +void +_SearchBar::OnKeypadWillOpen(void) +{ + if (!__isKeypadOpening) + { + if (__pKeypadEvent != null) + { + IEventArg* pEventArg = _KeypadEvent::CreateKeypadEventArgN(CORE_KEYPAD_ACTION_SEARCH, CORE_KEYPAD_EVENT_STATUS_CREATED); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pKeypadEvent->Fire(*pEventArg); + } + } + + __isKeypadOpening = true; + return; +} + +void +_SearchBar::OnKeypadOpened(void) +{ + if (__pKeypadEvent != null) + { + IEventArg* pEventArg = _KeypadEvent::CreateKeypadEventArgN(CORE_KEYPAD_ACTION_SEARCH, CORE_KEYPAD_EVENT_STATUS_OPEN); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pKeypadEvent->Fire(*pEventArg); + } + + __isKeypadOpening = false; + SetContentsArea(); + return; +} + +void +_SearchBar::OnKeypadClosed(void) +{ + if (__pKeypadEvent != null) + { + IEventArg* pEventArg = _KeypadEvent::CreateKeypadEventArgN(CORE_KEYPAD_ACTION_SEARCH, CORE_KEYPAD_EVENT_STATUS_CLOSE); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pKeypadEvent->Fire(*pEventArg); + } + + __isKeypadOpening = false; + + SetContentsArea(); + return; +} + +void +_SearchBar::OnKeypadBoundsChanged(void) +{ + if (__pKeypadEvent != null) + { + IEventArg* pEventArg = _KeypadEvent::CreateKeypadEventArgN(CORE_KEYPAD_ACTION_SEARCH, CORE_KEYPAD_EVENT_STATUS_BOUNDS_CHANGED); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pKeypadEvent->Fire(*pEventArg); + } + + SetContentsArea(); + return; +} + +void +_SearchBar::OnKeypadActionPerformed(CoreKeypadAction keypadAction) +{ + if (__pKeypadEvent != null) + { + IEventArg* pEventArg = _KeypadEvent::CreateKeypadEventArgN(keypadAction, CORE_KEYPAD_EVENT_STATUS_ENTERACTION); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pKeypadEvent->Fire(*pEventArg); + } + return; +} + +// TextBlock callbacks +void +_SearchBar::OnTextBlockSelected(_Control& source, int start, int end) +{ + if (__pTextBlockEvent != null) + { + IEventArg* pEventArg = _TextBlockEvent::CreateTextBlockEventArgN(start, end); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pTextBlockEvent->Fire(*pEventArg); + } + return; +} + +// Text callbacks +void +_SearchBar::OnTextValueChanged(const _Control& source) +{ + if (GetTextLength()) + { + SetContentAreaVisible(__contentVisibilitySetByApp); + } + + if (!__isCancelActionInProgress) + { + SetContentDimming(); + if (__pTextEvent != null) + { + IEventArg* pEventArg = _TextEvent::CreateTextEventArgN(CORE_TEXT_EVENT_CHANGED); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pTextEvent->Fire(*pEventArg); + } + } + return; +} + +void +_SearchBar::OnTextValueChangeCanceled(const _Control& source) +{ + if (__pTextEvent != null) + { + IEventArg* pEventArg = _TextEvent::CreateTextEventArgN(CORE_TEXT_EVENT_CANCELED); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pTextEvent->Fire(*pEventArg); + } + return; +} + +result +_SearchBar::OnAttachedToMainTree(void) +{ + SetContentsArea(); + return E_SUCCESS; +} + +void +_SearchBar::OnFontChanged(Font* pFont) +{ + __pCancelButton->SetFont(pFont->GetFaceName()); + __pEdit->SetFont(*pFont); + return; +} + +void +_SearchBar::OnFontInfoRequested(unsigned long& style, int& size) +{ + style = FONT_STYLE_PLAIN; + size = __pCancelButton->GetTextSize(); + + return; +} + +bool +_SearchBar::OnFocusGained(const _Control& source) +{ + return _Control::OnFocusGained(source); +} + +bool +_SearchBar::OnFocusLost(const _Control &source) +{ + return _Control::OnFocusLost(source); +} + +void +_SearchBar::OnDrawFocus(void) +{ + __isFocusUiInitialized = true; + _Control::OnDrawFocus(); + + return; +} + +bool +_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) +{ + if (!__pEdit->IsUsbKeyboardConnected()) + { + return false; + } + + _KeyCode keyCode = keyInfo.GetKeyCode(); + + if (keyCode == _KEY_TAB && GetMode() == SEARCH_BAR_MODE_INPUT && __isFocusUiInitialized == false) + { + __isFocusUiInitialized = true; + return false; + } + + switch (keyCode) + { + case _KEY_UP: + case _KEY_DOWN: + case _KEY_TAB: + SetFocusCallbackParameter(true); + if ((__pContentControl && __pContentControl->IsVisible() == false) || !__pContentControl) + { + SetContentAreaVisible(false); + } + + break; + default: + break; + } + return false; +} + +bool +_SearchBar::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) +{ + if (!__pEdit->IsUsbKeyboardConnected()) + { + return false; + } + + if (!IsVisible()) + { + return false; + } + + _FocusManagerImpl* pFocusMgrImpl = _FocusManagerImpl::GetInstance(); + if (!pFocusMgrImpl->IsFocusModeStateEnabled()) + { + return false; + } + + _KeyCode keyCode = keyInfo.GetKeyCode(); + + switch (keyCode) + { + case _KEY_RIGHT: + if (&source == this) + { + SetContentAreaVisible(__contentVisibilitySetByApp); + SetFocusCallbackParameter(true); + SetMode(SEARCH_BAR_MODE_INPUT); + __pEdit->SetFocused(); + } + + SetFocusCallbackParameter(false); + + if (&source == __pEdit) + { + if ((!__isButtonEnabled || !__isUsableCancelButton) && __pContentControl && __pContentControl->IsVisible() && __pContentControl->GetEnableState()) + { + __pContentControl->SetFocused(); + __pContentControl->OnDrawFocus(); + + return true; + } + else if (__isButtonEnabled && __isUsableCancelButton) + { + __pCancelButton->SetFocused(); + } + + return true; + } + + if (&source == __pCancelButton && __pContentControl && __pContentControl->IsVisible() && __pContentControl->GetEnableState()) + { + __pContentControl->SetFocused(); + __pContentControl->OnDrawFocus(); + + return true; + } + + break; + + case _KEY_LEFT: + if (&source == __pCancelButton) + { + __pEdit->SetFocused(); + return true; + } + + if (&source == __pContentControl) + { + if ((__isButtonEnabled && __isUsableCancelButton)) + { + __pCancelButton->SetFocused(); + } + else + { + __pEdit->SetFocused(); + } + return true; + } + + break; + + case _KEY_ENTER: + if (&source == __pCancelButton) + { + FireButtonActionEvent(source, __actionId); + _Control::OnDrawFocus(); + + return true; + } + + break; + + default: + return false; + } + + return false; +} + +void +_SearchBar::OnSettingChanged(Tizen::Base::String& key) +{ + if (__isButtonTextChangedByApp || !__isUsableCancelButton) + { + return; + } + + if (key.Equals(L"http://tizen.org/setting/locale.language", false)) + { + String cancelText; + GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_CANCEL_ABB, cancelText); + __pCancelButton->SetText(cancelText); + __pCancelButton->Invalidate(); + } + + return; +} + +Canvas* +_SearchBar::OnCanvasRequestedN(const FloatRectangle& bounds) +{ + return __pSearchBarPresenter->OnCanvasRequestedN(bounds); +} + +_Control* +_SearchBar::GetParentForm(void) const +{ + _Form* pForm = 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; + } + + pControlCore = pControlCore->GetParent(); + } + + return pControlCore; +} + +_Button* +_SearchBar::GetSearchBarButton(void) const +{ + return __pCancelButton; +} + +_Edit* +_SearchBar::GetSearchField(void) +{ + return __pEdit; +} + +_Control* +_SearchBar::GetSearchBarContainer(void) const +{ + return __pContainer; +} + +_Control* +_SearchBar::GetClippedGroupControl(void) const +{ + return __pClippedGroupControl; +} + +bool +_SearchBar::IsUsableCancelButton(void) const +{ + return __isUsableCancelButton; +} + +EditStatus +_SearchBar::ConvertSearchBarStatus(SearchFieldStatus status) +{ + EditStatus editStatus = EDIT_STATUS_NORMAL; + switch (status) + { + case SEARCH_FIELD_STATUS_NORMAL: + editStatus = EDIT_STATUS_NORMAL; + break; + + case SEARCH_FIELD_STATUS_DISABLED: + editStatus = EDIT_STATUS_DISABLED; + break; + + case SEARCH_FIELD_STATUS_HIGHLIGHTED: + editStatus = EDIT_STATUS_HIGHLIGHTED; + break; + default: + break; + } + + return editStatus; +} + +_ButtonStatus +_SearchBar::ConvertSearchBarButtonStatus(SearchBarButtonStatus status) +{ + _ButtonStatus buttonStatus = _BUTTON_STATUS_NORMAL; + + switch (status) + { + case SEARCH_BAR_BUTTON_STATUS_NORMAL: + buttonStatus = _BUTTON_STATUS_NORMAL; + break; + + case SEARCH_BAR_BUTTON_STATUS_PRESSED: + buttonStatus = _BUTTON_STATUS_PRESSED; + break; + + case SEARCH_BAR_BUTTON_STATUS_HIGHLIGHTED: + buttonStatus = _BUTTON_STATUS_HIGHLIGHTED; + break; + + case SEARCH_BAR_BUTTON_STATUS_DISABLED: + buttonStatus = _BUTTON_STATUS_DISABLED; + break; + default: + break; + } + + return buttonStatus; +} + +result +_SearchBar::SendSearchBarEvent(_SearchBarEventStatus status) +{ + result r = E_SUCCESS; + if (__pSearchBarEvent != null) + { + IEventArg* pEventArg = _SearchBarEvent::CreateSearchBarEventArgN(status); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pEventArg != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (!IsContentAreaVisible()) + { + SetContentAreaVisible(false); + } + + __pSearchBarEvent->Fire(*pEventArg); + } + + return E_SUCCESS; +} + +void +_SearchBar::SetHeaderVisibleState(bool visible) +{ + if (__pSearchBarPresenter != null) + { + __pSearchBarPresenter->SetHeaderVisibleState(visible); + } + return; +} + +result +_SearchBar::SetPropertyButtonActionId(const Variant& actionId) +{ + 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, + "[%s] Invalid argument(s) is used. actionId.ToInt() = %d", GetErrorMessage(E_INVALID_ARG), actionId.ToInt()); + + result r = E_SUCCESS; + + r = __pCancelButton->SetPropertyActionId(actionId); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. Failed to set actionId.", GetErrorMessage(E_SYSTEM)); + + __actionId = actionId.ToInt(); + + return r; +} + +Variant +_SearchBar::GetPropertyButtonActionId(void) const +{ + 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); +} + +result +_SearchBar::SetPropertyButtonDisabledColor(const Variant& color) +{ + 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, + "[%s] A system error has occurred. Failed to set button color.", GetErrorMessage(E_SYSTEM)); + + __buttonColor[SEARCH_BAR_BUTTON_STATUS_DISABLED] = color.ToColor(); + + return r; +} + +Variant +_SearchBar::GetPropertyButtonDisabledColor(void) const +{ + 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]); +} + +result +_SearchBar::SetPropertyButtonHighlightedColor(const Variant& color) +{ + 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, + "[%s] A system error has occurred. Failed to set button color.", GetErrorMessage(E_SYSTEM)); + + __buttonColor[SEARCH_BAR_BUTTON_STATUS_HIGHLIGHTED] = color.ToColor(); + + return r; +} + +Variant +_SearchBar::GetPropertyButtonHighlightedColor(void) const +{ + 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]); +} + +result +_SearchBar::SetPropertyButtonNormalColor(const Variant& color) +{ + 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, + "[%s] A system error has occurred. Failed to set button color.", GetErrorMessage(E_SYSTEM)); + + __buttonColor[SEARCH_BAR_BUTTON_STATUS_NORMAL] = color.ToColor(); + + return r; +} + +Variant +_SearchBar::GetPropertyButtonNormalColor(void) const +{ + 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]); +} + +result +_SearchBar::SetPropertyButtonPressedColor(const Variant& color) +{ + 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, + "[%s] A system error has occurred. Failed to set button color.", GetErrorMessage(E_SYSTEM)); + + __buttonColor[SEARCH_BAR_BUTTON_STATUS_PRESSED] = color.ToColor(); + + return r; +} + +Variant +_SearchBar::GetPropertyButtonPressedColor(void) const +{ + 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]); +} + +result +_SearchBar::SetPropertyButtonDisabledTextColor(const Variant& textColor) +{ + 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, + "[%s] A system error has occurred. Failed to set button text color.", GetErrorMessage(E_SYSTEM)); + + __buttonTextColor[SEARCH_BAR_BUTTON_STATUS_DISABLED] = textColor.ToColor(); + + return r; +} + +Variant +_SearchBar::GetPropertyButtonDisabledTextColor(void) const +{ + 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]); +} + +result +_SearchBar::SetPropertyButtonHighlightedTextColor(const Variant& textColor) +{ + 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, + "[%s] A system error has occurred. Failed to set button text color.", GetErrorMessage(E_SYSTEM)); + + __buttonTextColor[SEARCH_BAR_BUTTON_STATUS_HIGHLIGHTED] = textColor.ToColor(); + + return r; +} + +Variant +_SearchBar::GetPropertyButtonHighlightedTextColor(void) const +{ + 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]); +} + +result +_SearchBar::SetPropertyButtonNormalTextColor(const Variant& textColor) +{ + 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, + "[%s] A system error has occurred. Failed to set button text color.", GetErrorMessage(E_SYSTEM)); + + __buttonTextColor[SEARCH_BAR_BUTTON_STATUS_NORMAL] = textColor.ToColor(); + + return r; +} + +Variant +_SearchBar::GetPropertyButtonNormalTextColor(void) const +{ + 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]); +} + +result +_SearchBar::SetPropertyButtonPressedTextColor(const Variant& textColor) +{ + 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, + "[%s] A system error has occurred. Failed to set button text color.", GetErrorMessage(E_SYSTEM)); + + __buttonTextColor[SEARCH_BAR_BUTTON_STATUS_PRESSED] = textColor.ToColor(); + + return r; +} + +Variant +_SearchBar::GetPropertyButtonPressedTextColor(void) const +{ + 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]); +} + +result +_SearchBar::SetPropertySearchFieldDisabledColor(const Variant& color) +{ + 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, + "[%s] A system error has occurred. Failed to set the edit disabled color.", GetErrorMessage(E_SYSTEM)); + + __color[SEARCH_FIELD_STATUS_DISABLED] = color.ToColor(); + + return r; +} + +Variant +_SearchBar::GetPropertySearchFieldDisabledColor(void) const +{ + 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]); +} + +result +_SearchBar::SetPropertySearchFieldHighlightedColor(const Variant& color) +{ + 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, + "[%s] A system error has occurred. Failed to set the edit highlighted color.", GetErrorMessage(E_SYSTEM)); + + __color[SEARCH_FIELD_STATUS_HIGHLIGHTED] = color.ToColor(); + + return r; +} + +Variant +_SearchBar::GetPropertySearchFieldHighlightedColor(void) const +{ + 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]); +} + +result +_SearchBar::SetPropertySearchFieldNormalColor(const Variant& color) +{ + 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, + "[%s] A system error has occurred. Failed to set edit normal color.", GetErrorMessage(E_SYSTEM)); + + __color[SEARCH_FIELD_STATUS_NORMAL] = color.ToColor(); + + return r; +} + +Variant +_SearchBar::GetPropertySearchFieldNormalColor(void) const +{ + 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]); +} + +result +_SearchBar::SetPropertySearchFieldDisabledTextColor(const Variant& textColor) +{ + 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, + "[%s] A system error has occurred. Failed to set edit disabled text color.", GetErrorMessage(E_SYSTEM)); + + __textColor[SEARCH_FIELD_STATUS_DISABLED] = textColor.ToColor(); + + return r; +} + +Variant +_SearchBar::GetPropertySearchFieldDisabledTextColor(void) const +{ + 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]); +} + +result +_SearchBar::SetPropertySearchFieldHighlightedTextColor(const Variant& textColor) +{ + 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, + "[%s] A system error has occurred. Failed to set edit highlighted text color.", GetErrorMessage(E_SYSTEM)); + + __textColor[SEARCH_FIELD_STATUS_HIGHLIGHTED] = textColor.ToColor(); + + return r; +} + +Variant +_SearchBar::GetPropertySearchFieldHighlightedTextColor(void) const +{ + 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]); +} + +result +_SearchBar::SetPropertySearchFieldNormalTextColor(const Variant& textColor) +{ + 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, + "[%s] A system error has occurred. Failed to set edit normal text color.", GetErrorMessage(E_SYSTEM)); + + __textColor[SEARCH_FIELD_STATUS_NORMAL] = textColor.ToColor(); + + return r; +} + +Variant +_SearchBar::GetPropertySearchFieldNormalTextColor(void) const +{ + 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]); +} + +result +_SearchBar::SetPropertyColor(const Variant& color) +{ + __backgroundColor = color.ToColor(); + + return E_SUCCESS; +} + +Variant +_SearchBar::GetPropertyColor(void) const +{ + return Variant(__backgroundColor); +} + +result +_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, + "[%s] Invalid argument(s) is used. contentAreaSize.width = %f, contenAreaSize.height = %f", + GetErrorMessage(E_INVALID_ARG), contentAreaSize.width, contentAreaSize.height); + + result r = E_SUCCESS; + + // Todo + FloatRectangle bounds = GetBoundsF(); + FloatRectangle contentAreaBounds(0.0f, 0.0f, 0.0f, 0.0f); + + contentAreaBounds.x = 0.0f; + contentAreaBounds.y = bounds.height; + contentAreaBounds.width = contentAreaSize.width; + contentAreaBounds.height = contentAreaSize.height; + + __contentAreaBounds = contentAreaBounds; + __isUserContainerBounds = true; + + // set bounds + if (__pContainer != null) + { + r = __pContainer->SetBounds(__contentAreaBounds); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + + return r; +} + +Variant +_SearchBar::GetPropertyContentAreaSize(void) const +{ + FloatDimension contentAreaSize(__contentAreaBounds.width, __contentAreaBounds.height); + + return Variant(contentAreaSize); +} + +result +_SearchBar::CreateClippedGroupControl(void) +{ + result r = E_SUCCESS; + FloatRectangle clippedGroupControlBounds(FloatPoint(0.0f, 0.0f), GetSizeF()); + __pClippedGroupControl = _Control::CreateControlN(); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = AttachChild(*__pClippedGroupControl); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to attach the parent of clipped control."); + + r = __pClippedGroupControl->SetBounds(clippedGroupControlBounds); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pClippedGroupControl->SetBackgroundColor(Color(0)); + + __pClippedGroupControl->SetClipChildrenEnabled(true); + + return r; + +CATCH: + delete __pClippedGroupControl; + __pClippedGroupControl = null; + + return r; +} + +void +_SearchBar::InitializeAccessibility(void) +{ + _AccessibilityContainer* pSBContainer = null; + pSBContainer = GetAccessibilityContainer(); + + _AccessibilityContainer* pEditContainer = null; + pEditContainer = __pEdit->GetAccessibilityContainer(); + pSBContainer->AddChildContainer(*pEditContainer); + + _AccessibilityContainer* pButtonContainer = null; + pButtonContainer = __pCancelButton->GetAccessibilityContainer(); + + if (__isUsableCancelButton) + { + pSBContainer->AddChildContainer(*pButtonContainer); + } + + _AccessibilityElement* pEditElement = __pEdit->GetTextAccessibilityElement(); + +// pEditElement->SetHintWithStringId("Double Tap To Type Search Text"); +// pEditElement->SetTrait("SearchBar"); + pEditElement->SetName("SearchField"); + + pSBContainer->Activate(false); + + return; +} + +void +_SearchBar::SetContentDimming(void) +{ + if (__pContainer != null) + { + if (!GetTextLength()) + { + __contentColor.SetAlpha(_SEARCH_CONTENT_DIM_OPACITY); + } + else + { + __contentColor.SetAlpha(0); + } + __pContainer->SetBackgroundColor(__contentColor); + } + return; +} + +bool +_SearchBar::IsContentAttachable(const _Control* pContent) +{ + const _Window* pWindow = dynamic_cast (pContent); + const _ColorPicker* pColorPicker = dynamic_cast (pContent); + const _Form* pForm = dynamic_cast (pContent); + const _Keypad* pKeypad = dynamic_cast (pContent); + const _OverlayPanel* pOverlayPanel = dynamic_cast (pContent); + + bool isContentAttachable = true; + + isContentAttachable = ((pWindow == null) && (pColorPicker == null) && + (pForm == null) && (pKeypad == null) && (pOverlayPanel == null)); + return isContentAttachable; +} + +result +_SearchBar::ResizeCancelButton(void) +{ + result r = E_SUCCESS; + + float horizontalMargin = 0.0f; + float buttonLeftMargin = 0.0f; + float buttonRightMargin = 0.0f; + float buttonMinWidth = 0.0f; + float searchFieldMinWidth = 0.0f; + float buttonVerticalMargin = 0.0f; + float searchBarMinHeight = 0.0f; + float buttonWidth = 0.0f; + float buttonHeight = 0.0f; + + FloatRectangle cancelButtonBounds; + FloatRectangle searchBarBounds = GetBoundsF(); + + _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); + + GET_SHAPE_CONFIG(SEARCHBAR::HORIZONTAL_MARGIN, orientation, horizontalMargin); + GET_SHAPE_CONFIG(SEARCHBAR::BUTTON_LEFT_MARGIN, orientation, buttonLeftMargin); + GET_SHAPE_CONFIG(SEARCHBAR::BUTTON_RIGHT_MARGIN, orientation, buttonRightMargin); + GET_SHAPE_CONFIG(SEARCHBAR::BUTTON_WIDTH, orientation, buttonWidth); + GET_SHAPE_CONFIG(SEARCHBAR::BUTTON_HEIGHT, orientation, buttonHeight); + GET_SHAPE_CONFIG(SEARCHBAR::BUTTON_MIN_WIDTH, orientation, buttonMinWidth); + GET_SHAPE_CONFIG(SEARCHBAR::SEARCH_FIELD_MIN_WIDTH, orientation, searchFieldMinWidth); + GET_SHAPE_CONFIG(SEARCHBAR::VERTICAL_MARGIN, orientation, buttonVerticalMargin); + GET_SHAPE_CONFIG(SEARCHBAR::MIN_HEIGHT, orientation, searchBarMinHeight); + + cancelButtonBounds.width = buttonWidth; + cancelButtonBounds.height = buttonHeight; + + float buttonResizableSearchBarWidth = (horizontalMargin + searchFieldMinWidth + + cancelButtonBounds.width + buttonLeftMargin + buttonRightMargin); + + if (searchBarBounds.width < buttonResizableSearchBarWidth) + { + cancelButtonBounds.width = searchBarBounds.width -(searchFieldMinWidth + buttonLeftMargin + + buttonRightMargin + horizontalMargin); + } + + cancelButtonBounds.x = searchBarBounds.width - cancelButtonBounds.width - buttonRightMargin; + cancelButtonBounds.y = (searchBarBounds.height - cancelButtonBounds.height)/2.0f; + + cancelButtonBounds.y = cancelButtonBounds.y < 0.0f ? 0.0f:cancelButtonBounds.y; + + if (cancelButtonBounds.width < buttonMinWidth) + { + cancelButtonBounds.width = buttonMinWidth; + } + + cancelButtonBounds.width = (cancelButtonBounds.width > 0.0f) ? cancelButtonBounds.width : 0.0f; + cancelButtonBounds.height = (cancelButtonBounds.height > 0.0f) ? cancelButtonBounds.height : 0.0f; + r = __pCancelButton->SetBounds(cancelButtonBounds); + + return r; +} + +void +_SearchBar::RecalculateButtonBounds(void) +{ + result r = E_SUCCESS; + + float horizontalMargin = 0.0f; + float verticalMargin = 0.0f; + float buttonLeftMargin = 0.0f; + float buttonRightMargin = 0.0f; + float buttonMinWidth = 0.0f; + float searchFieldMinWidth = 0.0f; + float buttonVerticalMargin = 0.0f; + float searchBarMinHeight = 0.0f; + float buttonWidth = 0.0f; + float buttonHeight = 0.0f; + float cancelButtonWidth = 0.0f; + + FloatRectangle cancelButtonBounds; + FloatRectangle editBounds; + FloatRectangle searchBarBounds = GetBoundsF(); + + _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); + + GET_SHAPE_CONFIG(SEARCHBAR::HORIZONTAL_MARGIN, orientation, horizontalMargin); + GET_SHAPE_CONFIG(SEARCHBAR::VERTICAL_MARGIN, orientation, verticalMargin); + GET_SHAPE_CONFIG(SEARCHBAR::BUTTON_LEFT_MARGIN, orientation, buttonLeftMargin); + GET_SHAPE_CONFIG(SEARCHBAR::BUTTON_RIGHT_MARGIN, orientation, buttonRightMargin); + GET_SHAPE_CONFIG(SEARCHBAR::BUTTON_WIDTH, orientation, buttonWidth); + GET_SHAPE_CONFIG(SEARCHBAR::BUTTON_HEIGHT, orientation, buttonHeight); + GET_SHAPE_CONFIG(SEARCHBAR::BUTTON_MIN_WIDTH, orientation, buttonMinWidth); + GET_SHAPE_CONFIG(SEARCHBAR::SEARCH_FIELD_MIN_WIDTH, orientation, searchFieldMinWidth); + GET_SHAPE_CONFIG(SEARCHBAR::VERTICAL_MARGIN, orientation, buttonVerticalMargin); + GET_SHAPE_CONFIG(SEARCHBAR::MIN_HEIGHT, orientation, searchBarMinHeight); + + cancelButtonBounds.height = buttonHeight; + + float searchFieldMinHeight = searchBarMinHeight - (verticalMargin * 2.0f); + cancelButtonWidth = __pCancelButton->GetTextExtentSizeF() + __pCancelButton->GetRightMarginF() + __pCancelButton->GetLeftMarginF(); + editBounds.x = horizontalMargin; + + if (searchBarBounds.height < searchBarMinHeight) + { + verticalMargin = (searchBarBounds.height - searchFieldMinHeight)/2.0f; + if (verticalMargin < 0.0f) + { + verticalMargin = 0.0f; + } + } + + editBounds.y = verticalMargin; + editBounds.height = searchBarBounds.height - (editBounds.y * 2.0f); + + editBounds.height = (editBounds.height > searchFieldMinHeight) ? editBounds.height : searchFieldMinHeight; + + editBounds.width = searchBarBounds.width - cancelButtonWidth - horizontalMargin - buttonLeftMargin - buttonRightMargin; + + if (editBounds.width < searchFieldMinWidth) + { + editBounds.width = searchFieldMinWidth; + } + + cancelButtonBounds.x = editBounds.width + horizontalMargin + buttonLeftMargin; + cancelButtonBounds.y = (searchBarBounds.height - cancelButtonBounds.height)/2.0f; + + cancelButtonBounds.y = cancelButtonBounds.y < 0.0f ? 0.0f:cancelButtonBounds.y; + + float remainingWidth = searchBarBounds.width - editBounds.width - horizontalMargin - buttonLeftMargin - buttonRightMargin; + + if (remainingWidth < buttonMinWidth) + { + cancelButtonBounds.width = buttonMinWidth; + } + else + { + cancelButtonBounds.width = searchBarBounds.width - cancelButtonBounds.x - buttonRightMargin; + } + + cancelButtonBounds.width = (cancelButtonBounds.width > 0.0f) ? cancelButtonBounds.width : 0.0f; + cancelButtonBounds.height = (cancelButtonBounds.height > 0.0f) ? cancelButtonBounds.height : 0.0f; + + r = __pCancelButton->SetBounds(cancelButtonBounds); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + r = __pEdit->SetBounds(editBounds); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + return; +} + +SearchFieldStatus +_SearchBar::GetCurrentStatus(void) +{ + SearchFieldStatus searchFieldStatus = SEARCH_FIELD_STATUS_NORMAL; + + if (IsEnabled()) + { + if (__pEdit->IsFocused()) + { + searchFieldStatus = SEARCH_FIELD_STATUS_HIGHLIGHTED; + } + } + else + { + searchFieldStatus = SEARCH_FIELD_STATUS_DISABLED; + } + + return searchFieldStatus; +} + +void +_SearchBar::SetEditTextFilter(IEditTextFilter* pFilter) +{ + 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); + + return; +} + +void +_SearchBar::SendOpaqueCommand(const String& command) +{ + SysTryReturnVoidResult(NID_UI_CTRL, __pEdit != null, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. The _Edit instance is null."); + + __pEdit->SendOpaqueCommand(command); + + return; +} + +void +_SearchBar::SetFocusCallbackParameter(bool state) +{ + __isFocusCallbackToBeFired = state; + return; +} + +bool +_SearchBar::IsFocusCallbackToBeFired(void) const +{ + return __isFocusCallbackToBeFired; +} +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_SearchBarEvent.cpp b/src/ui/controls/FUiCtrl_SearchBarEvent.cpp new file mode 100644 index 0000000..c32336e --- /dev/null +++ b/src/ui/controls/FUiCtrl_SearchBarEvent.cpp @@ -0,0 +1,192 @@ +// +// 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. +// + +#include +#include +#include +#include "FUiCtrl_ISearchBarEventListener.h" +#include "FUiCtrl_SearchBarEvent.h" +#include "FUiCtrl_SearchBar.h" + +// using namespace +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @class _SearchBarEventArg + * @brief This class is used as the argument to action event listener. + * + * This class is used as the argument to searchbar event listener. When an searchbar event is generated + * (such as when a searchbar is pressed) the SearchBarEvent calls SearchBarEventListener's OnActionPerformed + * with an instance of this class as an argument. + * + * From this class, one can find out, the (event) source object and the action ID. + */ +class _OSP_EXPORT_ _SearchBarEventArg + : public IEventArg + , public Object +{ +// Lifecycle +public: + /** + * This is the default class constructor. + * + * @param[in] status + */ + _SearchBarEventArg(_SearchBarEventStatus status); + + /** + * This is the class destructor. + * + */ + virtual ~_SearchBarEventArg(void); + + +// Access +public: + /** + * This method returns the status which the event initially occurred. + * + * @return See the comment above. + */ + _SearchBarEventStatus GetStatus(void) const; + + +// Attribute +private: + /** + * Event status. + */ + _SearchBarEventStatus __status; +}; + +_SearchBarEventArg::_SearchBarEventArg(_SearchBarEventStatus status) + : __status(status) +{ + // nothing +} + +_SearchBarEventArg::~_SearchBarEventArg(void) +{ + // nothing +} + +//////////////////////////////////////////////////////////////////////////////// +/// _SearchBarEventArg class Access + +_SearchBarEventStatus +_SearchBarEventArg::GetStatus(void) const +{ + return __status; +} + + +//////////////////////////////////////////////////////////////////////////////// +/// _SearchBarEvent class Lifecycle + +_SearchBarEvent::_SearchBarEvent(const _SearchBar& source) + : __pSource(null) +{ + result r = _Event::Initialize(); + + // set event source + if (r == E_SUCCESS) + { + __pSource = &source; + } +} + +_SearchBarEvent::~_SearchBarEvent(void) +{ + // nothing +} + +_SearchBarEvent* +_SearchBarEvent::CreateInstanceN(const _SearchBar& source) +{ + _SearchBarEvent* pSearchBarEvent = new (std::nothrow) _SearchBarEvent(source); + SysTryReturn(NID_UI_CTRL, pSearchBarEvent != null, null, E_OUT_OF_MEMORY, + "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + if (IsFailed(GetLastResult())) + { + goto CATCH; + } + + return pSearchBarEvent; + +CATCH: + delete pSearchBarEvent; + return null; +} + +//////////////////////////////////////////////////////////////////////////////// +/// _WindowEvent class Accessor + +const _SearchBar* +_SearchBarEvent::GetSource(void) const +{ + return __pSource; +} + +//////////////////////////////////////////////////////////////////////////////// +/// _SearchBarEvent class Operation + +void +_SearchBarEvent::FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg) +{ + // cast to _IActionEventListener + _ISearchBarEventListener* pSearchBarListener = dynamic_cast <_ISearchBarEventListener*>(&listener); + SysTryReturnVoidResult(NID_UI_CTRL, pSearchBarListener != null, E_INVALID_ARG, + "[%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, + "[%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, + "[%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(); + if (status == _SEARCH_BAR_EVENT_MODE_CHANGE) + { + pSearchBarListener->OnSearchBarModeChanged(*pSource, pSource->GetMode()); + } + + SetLastResult(E_SUCCESS); + + return; +} + +IEventArg* +_SearchBarEvent::CreateSearchBarEventArgN(_SearchBarEventStatus status) +{ + _SearchBarEventArg* pEventArg = new (std::nothrow) _SearchBarEventArg(status); + SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, + "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + return pEventArg; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_SearchBarImpl.cpp b/src/ui/controls/FUiCtrl_SearchBarImpl.cpp new file mode 100644 index 0000000..0bbbcf3 --- /dev/null +++ b/src/ui/controls/FUiCtrl_SearchBarImpl.cpp @@ -0,0 +1,1993 @@ +// +// 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_SearchBarImpl.cpp + * @brief This is the implementation file for _SearchBarImpl class. + */ + +#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 "FUiCtrl_EditFieldImpl.h" +#include "FUiCtrl_ButtonImpl.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Locales; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_SearchBarImpl::_SearchBarImpl(SearchBar* pPublic, _SearchBar* pCore) + : _ControlImpl(pPublic, pCore) + , __pSearchBar(pCore) + , __pEditField(null) + , __pButton(null) + , __pContentControl(null) + , __pPublicActionEvent(null) + , __pPublicKeypadEvent(null) + , __pPublicTextBlockEvent(null) + , __pPublicTextEvent(null) + , __pPublicSearchBarEvent(null) + , __pPublicLanguageEvent(null) + , __pPublicFocusEventListeners(null) +{ + ClearLastResult(); +} + +_SearchBarImpl::~_SearchBarImpl(void) +{ + if (__pSearchBar != null) + { + SetContent(null); + if (__pSearchBar->GetClippedGroupControl()) + { + _Control* pControl = __pSearchBar->GetClippedGroupControl(); + pControl->DetachAllChildren(); + } + } + + delete __pEditField; + __pEditField = null; + + delete __pButton; + __pButton = null; + + delete __pPublicActionEvent; + __pPublicActionEvent = null; + + delete __pPublicKeypadEvent; + __pPublicKeypadEvent = null; + + delete __pPublicTextBlockEvent; + __pPublicTextBlockEvent = null; + + delete __pPublicTextEvent; + __pPublicTextEvent = null; + + delete __pPublicSearchBarEvent; + __pPublicSearchBarEvent = null; + + delete __pPublicLanguageEvent; + __pPublicLanguageEvent = null; + + delete __pPublicFocusEventListeners; + __pPublicFocusEventListeners = null; +} + +_SearchBarImpl* +_SearchBarImpl::CreateSearchBarImplN(SearchBar* pControl, const Rectangle& bounds, bool enableSearchBarButton, KeypadAction keypadAction) +{ + ClearLastResult(); + result r = E_SUCCESS; + + 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, + "[%s] Invalid argument(s) is used. The given size is not valid.", GetErrorMessage(E_INVALID_ARG)); + + _SearchBar* pCore = _SearchBar::CreateSearchBarN(); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pCore != null, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + _SearchBarImpl* pImpl = new (std::nothrow) _SearchBarImpl(pControl, pCore); + + r = CheckConstruction(pCore, pImpl); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pImpl->InitializeBoundsProperties(GET_SIZE_INFO(SearchBar), bounds, pCore->GetOrientation()); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pImpl->Initialize(enableSearchBarButton, keypadAction); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return pImpl; +CATCH: + delete pImpl; + SetLastResult(r); + return null; +} + +_SearchBarImpl* +_SearchBarImpl::CreateSearchBarImplFN(SearchBar* pControl, const FloatRectangle& bounds, bool enableSearchBarButton, KeypadAction keypadAction) +{ + ClearLastResult(); + result r = E_SUCCESS; + + 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, + "[%s] Invalid argument(s) is used. The given size is not valid.", GetErrorMessage(E_INVALID_ARG)); + + _SearchBar* pCore = _SearchBar::CreateSearchBarN(); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pCore != null, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + _SearchBarImpl* pImpl = new (std::nothrow) _SearchBarImpl(pControl, pCore); + + r = CheckConstruction(pCore, pImpl); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pImpl->InitializeBoundsPropertiesF(GET_SIZE_INFO(SearchBar), bounds, pCore->GetOrientation()); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pImpl->Initialize(enableSearchBarButton, keypadAction); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return pImpl; +CATCH: + delete pImpl; + SetLastResult(r); + return null; +} + +const char* +_SearchBarImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Controls::SearchBar"; +} + +const SearchBar& +_SearchBarImpl::GetPublic(void) const +{ + return static_cast (_ControlImpl::GetPublic()); +} + +SearchBar& +_SearchBarImpl::GetPublic(void) +{ + return static_cast (_ControlImpl::GetPublic()); +} + +const _SearchBar& +_SearchBarImpl::GetCore(void) const +{ + return static_cast (_ControlImpl::GetCore()); +} + +_SearchBar& +_SearchBarImpl::GetCore(void) +{ + return static_cast <_SearchBar&>(_ControlImpl::GetCore()); +} + +_SearchBarImpl* +_SearchBarImpl::GetInstance(SearchBar& searchBar) +{ + return (static_cast<_SearchBarImpl*>(searchBar._pControlImpl)); +} + +const _SearchBarImpl* +_SearchBarImpl::GetInstance(const SearchBar& searchBar) +{ + return (static_cast(searchBar._pControlImpl)); +} + + +result +_SearchBarImpl::Initialize(bool enableSearchBarButton, KeypadAction keypadAction) +{ + ClearLastResult(); + + result r = E_SUCCESS; + + CoreKeypadAction coreKeypadAction = CORE_KEYPAD_ACTION_SEARCH; + switch (keypadAction) + { + case KEYPAD_ACTION_ENTER: + coreKeypadAction = CORE_KEYPAD_ACTION_ENTER; + break; + + case KEYPAD_ACTION_GO: + coreKeypadAction = CORE_KEYPAD_ACTION_GO; + break; + + case KEYPAD_ACTION_NEXT: + coreKeypadAction = CORE_KEYPAD_ACTION_NEXT; + break; + + case KEYPAD_ACTION_SEND: + coreKeypadAction = CORE_KEYPAD_ACTION_SEND; + break; + + case KEYPAD_ACTION_SEARCH: + coreKeypadAction = CORE_KEYPAD_ACTION_SEARCH; + break; + + case KEYPAD_ACTION_LOGIN: + coreKeypadAction = CORE_KEYPAD_ACTION_LOGIN; + break; + + case KEYPAD_ACTION_SIGN_IN: + coreKeypadAction = CORE_KEYPAD_ACTION_SIGN_IN; + break; + + case KEYPAD_ACTION_JOIN: + coreKeypadAction = CORE_KEYPAD_ACTION_JOIN; + break; + + case KEYPAD_ACTION_DONE: + coreKeypadAction = CORE_KEYPAD_ACTION_DONE; + break; + + default: + break; + } + + __pEditField = new (std::nothrow) EditField(); + 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, "Propagating."); + + __pEditField->AddFocusEventListener(*this); + SysTryReturnResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "Propagating."); + + __pEditField->AddKeyEventListener(*this); + SysTryReturnResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "Propagating."); + + __pEditFieldImpl = _EditFieldImpl::GetInstance(*__pEditField); + SysTryReturnResult(NID_UI_CTRL, __pEditFieldImpl != null, E_SYSTEM, + "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 != null, E_OUT_OF_MEMORY, "Memory allocation failed."); + + r = __pButton->Construct(GetBoundsF(), cancelButtonText); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + __pButton->AddFocusEventListener(*this); + SysTryReturnResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "Propagating."); + + __pButtonImpl = _ButtonImpl::GetInstance(*__pButton); + SysTryReturnResult(NID_UI_CTRL, __pButtonImpl != null, E_SYSTEM, + "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 != 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 != 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 != 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 != 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 != 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 != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __pSearchBar->AddLanguageEventListener(*this); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pPublicFocusEventListeners = CreatePublicEventListenerListN(); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +Control* +_SearchBarImpl::GetContent(void) const +{ + ClearLastResult(); + + return __pContentControl; +} + +result +_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, + "[%s] Invalid argument(s) is used. The content cannot be set.", GetErrorMessage(E_INVALID_ARG)); + + __pContentControl = const_cast (pContent); + _Control& control = _ControlImpl::GetInstance(*__pContentControl)->GetCore(); + + r = __pSearchBar->SetContent(&control); + } + + return r; +} + +result +_SearchBarImpl::UpdateContentArea(bool invalidate) +{ + ClearLastResult(); + + return __pSearchBar->UpdateContentArea(invalidate); +} + +result +_SearchBarImpl::SetContentAreaVisible(bool visible) +{ + ClearLastResult(); + + return __pSearchBar->SetContentAreaVisible(visible, true); +} + +bool +_SearchBarImpl::IsContentAreaVisible(void) const +{ + ClearLastResult(); + + return __pSearchBar->IsContentAreaVisible(); +} + +result +_SearchBarImpl::SetContentAreaSize(const Dimension& size) +{ + ClearLastResult(); + + FloatDimension contentSize; + contentSize = _CoordinateSystemUtils::ConvertToFloat(size); + Variant var(contentSize); + + return __pSearchBar->SetPropertyContentAreaSize(var); +} + +result +_SearchBarImpl::SetContentAreaSize(const FloatDimension& size) +{ + ClearLastResult(); + + Variant var(size); + return __pSearchBar->SetPropertyContentAreaSize(var); +} + +Dimension +_SearchBarImpl::GetContentAreaSize(void) const +{ + ClearLastResult(); + + Dimension size; + size = _CoordinateSystemUtils::ConvertToInteger(__pSearchBar->GetPropertyContentAreaSize().ToFloatDimension()); + + return size; +} + +FloatDimension +_SearchBarImpl::GetContentAreaSizeF(void) const +{ + ClearLastResult(); + + return __pSearchBar->GetPropertyContentAreaSize().ToFloatDimension(); +} + +SearchBarMode +_SearchBarImpl::GetMode(void) const +{ + ClearLastResult(); + + return __pSearchBar->GetMode(); +} + +bool +_SearchBarImpl::IsModeLocked(void) const +{ + ClearLastResult(); + + return __pSearchBar->IsModeLocked(); +} + +result +_SearchBarImpl::SetMode(SearchBarMode mode) +{ + ClearLastResult(); + + return __pSearchBar->SetMode(mode, true); +} + +result +_SearchBarImpl::SetModeLocked(bool modeLocked) +{ + ClearLastResult(); + + return __pSearchBar->SetModeLocked(modeLocked); +} + +int +_SearchBarImpl::GetButtonActionId(void) const +{ + ClearLastResult(); + + return __pSearchBar->GetPropertyButtonActionId().ToInt(); +} + +Color +_SearchBarImpl::GetButtonColor(SearchBarButtonStatus status) const +{ + ClearLastResult(); + + Variant buttonColor; + + switch (status) + { + case SEARCH_BAR_BUTTON_STATUS_NORMAL: + buttonColor = __pSearchBar->GetPropertyButtonNormalColor(); + break; + case SEARCH_BAR_BUTTON_STATUS_PRESSED: + buttonColor = __pSearchBar->GetPropertyButtonPressedColor(); + break; + case SEARCH_BAR_BUTTON_STATUS_HIGHLIGHTED: + buttonColor = __pSearchBar->GetPropertyButtonHighlightedColor(); + break; + case SEARCH_BAR_BUTTON_STATUS_DISABLED: + buttonColor = __pSearchBar->GetPropertyButtonDisabledColor(); + break; + default: + break; + } + + return buttonColor.ToColor(); +} + +Color +_SearchBarImpl::GetButtonTextColor(SearchBarButtonStatus status) const +{ + ClearLastResult(); + + Variant buttonTextColor; + + switch (status) + { + case SEARCH_BAR_BUTTON_STATUS_NORMAL: + buttonTextColor = __pSearchBar->GetPropertyButtonNormalTextColor(); + break; + case SEARCH_BAR_BUTTON_STATUS_PRESSED: + buttonTextColor = __pSearchBar->GetPropertyButtonPressedTextColor(); + break; + case SEARCH_BAR_BUTTON_STATUS_HIGHLIGHTED: + buttonTextColor = __pSearchBar->GetPropertyButtonHighlightedTextColor(); + break; + case SEARCH_BAR_BUTTON_STATUS_DISABLED: + buttonTextColor = __pSearchBar->GetPropertyButtonDisabledTextColor(); + break; + default: + break; + } + + return buttonTextColor.ToColor(); +} + +SearchBarButtonStatus +_SearchBarImpl::GetButtonStatus(void) const +{ + ClearLastResult(); + + return __pSearchBar->GetButtonStatus(); +} + +result +_SearchBarImpl::SetButton(const String& text, int actionId) +{ + ClearLastResult(); + + result r = E_SUCCESS; + Variant var(actionId); + + r = __pSearchBar->SetButtonText(text); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __pSearchBar->SetPropertyButtonActionId(var); + + return r; +} + +result +_SearchBarImpl::SetButtonEnabled(bool enabled) +{ + ClearLastResult(); + + return __pSearchBar->SetButtonEnabled(enabled); +} + +result +_SearchBarImpl::SetButtonColor(SearchBarButtonStatus status, const Color& color) +{ + ClearLastResult(); + + result r = E_SUCCESS; + Variant var(color); + + switch (status) + { + case SEARCH_BAR_BUTTON_STATUS_NORMAL: + r = __pSearchBar->SetPropertyButtonNormalColor(var); + break; + case SEARCH_BAR_BUTTON_STATUS_PRESSED: + r = __pSearchBar->SetPropertyButtonPressedColor(var); + break; + case SEARCH_BAR_BUTTON_STATUS_HIGHLIGHTED: + r = __pSearchBar->SetPropertyButtonHighlightedColor(var); + break; + case SEARCH_BAR_BUTTON_STATUS_DISABLED: + r = __pSearchBar->SetPropertyButtonDisabledColor(var); + break; + default: + break; + } + + return r; +} + +result +_SearchBarImpl::SetButtonTextColor(SearchBarButtonStatus status, const Color& color) +{ + ClearLastResult(); + + result r = E_SUCCESS; + Variant var(color); + + switch (status) + { + case SEARCH_BAR_BUTTON_STATUS_NORMAL: + r = __pSearchBar->SetPropertyButtonNormalTextColor(var); + break; + case SEARCH_BAR_BUTTON_STATUS_PRESSED: + r = __pSearchBar->SetPropertyButtonPressedTextColor(var); + break; + case SEARCH_BAR_BUTTON_STATUS_HIGHLIGHTED: + r = __pSearchBar->SetPropertyButtonHighlightedTextColor(var); + break; + case SEARCH_BAR_BUTTON_STATUS_DISABLED: + r = __pSearchBar->SetPropertyButtonDisabledTextColor(var); + break; + default: + break; + } + + return r; +} + +result +_SearchBarImpl::AppendCharacter(const Character& character) +{ + ClearLastResult(); + + return __pSearchBar->AppendCharacter(character); +} + +result +_SearchBarImpl::AppendText(const String& text) +{ + ClearLastResult(); + + return __pSearchBar->AppendText(text); +} + +result +_SearchBarImpl::SetText(const String& text) +{ + ClearLastResult(); + + return __pSearchBar->SetText(text); +} + +result +_SearchBarImpl::InsertCharacterAt(int index, const Character& character) +{ + ClearLastResult(); + + return __pSearchBar->InsertCharacterAt(index, character); +} + +result +_SearchBarImpl::InsertTextAt(int index, const String& text) +{ + ClearLastResult(); + + return __pSearchBar->InsertTextAt(index, text); +} + +result +_SearchBarImpl::DeleteCharacterAt(int index) +{ + ClearLastResult(); + + return __pSearchBar->DeleteCharacterAt(index); +} + +result +_SearchBarImpl::Clear(void) +{ + ClearLastResult(); + + result r = E_SUCCESS; + r = __pSearchBar->Clear(); + + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, + "A system error has occurred. Failed to clear the text."); + return r; +} + +int +_SearchBarImpl::GetTextLength(void) const +{ + ClearLastResult(); + + return __pSearchBar->GetTextLength(); +} + +String +_SearchBarImpl::GetText(void) const +{ + ClearLastResult(); + + return __pSearchBar->GetText(); +} + +String +_SearchBarImpl::GetText(int start, int end) const +{ + ClearLastResult(); + + return __pSearchBar->GetText(start, end); +} + +int +_SearchBarImpl::GetLimitLength(void) const +{ + ClearLastResult(); + + return __pSearchBar->GetLimitLength(); +} + +result +_SearchBarImpl::SetLimitLength(int limitLength) +{ + ClearLastResult(); + + return __pSearchBar->SetLimitLength(limitLength); +} + +result +_SearchBarImpl::ShowKeypad(void) const +{ + ClearLastResult(); + + return __pSearchBar->ShowKeypad(); +} + +result +_SearchBarImpl::HideKeypad(void) const +{ + ClearLastResult(); + + return __pSearchBar->HideKeypad(); +} + +int +_SearchBarImpl::GetSearchFieldTextSize(void) const +{ + ClearLastResult(); + + int textSize = _CoordinateSystemUtils::ConvertToInteger(__pSearchBar->GetSearchFieldTextSizeF()); + return textSize; +} + +float +_SearchBarImpl::GetSearchFieldTextSizeF(void) const +{ + ClearLastResult(); + + return __pSearchBar->GetSearchFieldTextSizeF(); +} + +result +_SearchBarImpl::SetSearchFieldTextSize(int size) +{ + ClearLastResult(); + + float textSize = _CoordinateSystemUtils::ConvertToFloat(size); + return SetSearchFieldTextSize(textSize); +} + +result +_SearchBarImpl::SetSearchFieldTextSize(float size) +{ + ClearLastResult(); + + return __pSearchBar->SetSearchFieldTextSize(size); +} + +result +_SearchBarImpl::GetBlockRange(int& start, int& end) const +{ + ClearLastResult(); + + return __pSearchBar->GetBlockRange(start, end); +} + +result +_SearchBarImpl::ReleaseBlock(void) +{ + ClearLastResult(); + + return __pSearchBar->ReleaseBlock(); +} + +result +_SearchBarImpl::SetBlockRange(int start, int end) +{ + ClearLastResult(); + + return __pSearchBar->SetBlockRange(start, end + 1); +} + +result +_SearchBarImpl::RemoveTextBlock(void) +{ + ClearLastResult(); + result r = __pSearchBar->RemoveTextBlock(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. Unable to remove the text block.", GetErrorMessage(E_SYSTEM)); + + return r; +} + +Color +_SearchBarImpl::GetColor(void) const +{ + ClearLastResult(); + + return __pSearchBar->GetPropertyColor().ToColor(); +} + +Color +_SearchBarImpl::GetSearchFieldColor(SearchFieldStatus status) const +{ + ClearLastResult(); + + Variant searchFieldColor; + + switch (status) + { + case SEARCH_FIELD_STATUS_NORMAL: + searchFieldColor = __pSearchBar->GetPropertySearchFieldNormalColor(); + break; + case SEARCH_FIELD_STATUS_HIGHLIGHTED: + searchFieldColor = __pSearchBar->GetPropertySearchFieldHighlightedColor(); + break; + case SEARCH_FIELD_STATUS_DISABLED: + searchFieldColor = __pSearchBar->GetPropertySearchFieldDisabledColor(); + break; + default: + break; + } + + return searchFieldColor.ToColor(); +} + +Color +_SearchBarImpl::GetSearchFieldTextColor(SearchFieldStatus status) const +{ + ClearLastResult(); + + Color color; + _Edit* pEdit = __pSearchBar->GetSearchField(); + if (pEdit != null) + { + switch (status) + { + case SEARCH_FIELD_STATUS_NORMAL: + color = pEdit->GetTextColor(EDIT_TEXT_COLOR_NORMAL); + break; + case SEARCH_FIELD_STATUS_HIGHLIGHTED: + color = pEdit->GetTextColor(EDIT_TEXT_COLOR_HIGHLIGHTED); + break; + case SEARCH_FIELD_STATUS_DISABLED: + color = pEdit->GetTextColor(EDIT_TEXT_COLOR_DISABLED); + break; + default: + break; + } + } + return color; +} + +result +_SearchBarImpl::SetBackgroundBitmap(const Bitmap& bitmap) +{ + ClearLastResult(); + + return __pSearchBar->SetBackgroundBitmap(bitmap); +} + +result +_SearchBarImpl::SetColor(const Color& color) +{ + ClearLastResult(); + + Variant var(color); + + return __pSearchBar->SetPropertyColor(var); +} + +result +_SearchBarImpl::SetSearchFieldColor(SearchFieldStatus status, const Color& color) +{ + ClearLastResult(); + + result r = E_SUCCESS; + Variant var(color); + + switch (status) + { + case SEARCH_FIELD_STATUS_NORMAL: + r = __pSearchBar->SetPropertySearchFieldNormalColor(var); + break; + case SEARCH_FIELD_STATUS_HIGHLIGHTED: + r = __pSearchBar->SetPropertySearchFieldHighlightedColor(var); + break; + case SEARCH_FIELD_STATUS_DISABLED: + r = __pSearchBar->SetPropertySearchFieldDisabledColor(var); + break; + default: + break; + } + + return r; +} + +result +_SearchBarImpl::SetSearchFieldTextColor(SearchFieldStatus status, const Color& color) +{ + ClearLastResult(); + + result r = E_SUCCESS; + _Edit* pEdit = __pSearchBar->GetSearchField(); + if (pEdit != null) + { + switch (status) + { + case SEARCH_FIELD_STATUS_NORMAL: + r = pEdit->SetTextColor(EDIT_TEXT_COLOR_NORMAL, color); + break; + case SEARCH_FIELD_STATUS_HIGHLIGHTED: + r = pEdit->SetTextColor(EDIT_TEXT_COLOR_HIGHLIGHTED, color); + break; + case SEARCH_FIELD_STATUS_DISABLED: + r = pEdit->SetTextColor(EDIT_TEXT_COLOR_DISABLED, color); + break; + default: + break; + } + } + + return r; +} + +String +_SearchBarImpl::GetGuideText(void) const +{ + ClearLastResult(); + + return __pSearchBar->GetGuideText(); +} + +result +_SearchBarImpl::SetGuideText(const String& guideText) +{ + ClearLastResult(); + + return __pSearchBar->SetGuideText(guideText); +} + +Color +_SearchBarImpl::GetGuideTextColor(void) const +{ + ClearLastResult(); + + return __pSearchBar->GetGuideTextColor(); +} + +result +_SearchBarImpl::SetGuideTextColor(const Color& color) +{ + ClearLastResult(); + + return __pSearchBar->SetGuideTextColor(color); +} + +int +_SearchBarImpl::GetCursorPosition(void) const +{ + ClearLastResult(); + + return __pSearchBar->GetCursorPosition(); +} + +result +_SearchBarImpl::SetCursorPosition(int index) +{ + ClearLastResult(); + + return __pSearchBar->SetCursorPosition(index); +} + +bool +_SearchBarImpl::IsLowerCaseModeEnabled(void) const +{ + ClearLastResult(); + + return __pSearchBar->IsLowerCaseModeEnabled(); +} + +void +_SearchBarImpl::SetLowerCaseModeEnabled(bool enable) +{ + ClearLastResult(); + + return __pSearchBar->SetLowerCaseModeEnabled(enable); +} + +EllipsisPosition +_SearchBarImpl::GetEllipsisPosition(void) const +{ + ClearLastResult(); + + return __pSearchBar->GetEllipsisPosition(); +} + +result +_SearchBarImpl::SetEllipsisPosition(EllipsisPosition position) +{ + ClearLastResult(); + + return __pSearchBar->SetEllipsisPosition(position); +} + +KeypadAction +_SearchBarImpl::GetKeypadAction(void) const +{ + ClearLastResult(); + + CoreKeypadAction coreKeypadAction = __pSearchBar->GetKeypadAction(); + KeypadAction publicKeypadAction = ConvertKeypadAction(coreKeypadAction); + + return publicKeypadAction; +} + +bool +_SearchBarImpl::IsTextPredictionEnabled(void) const +{ + return __pSearchBar->IsTextPredictionEnabled(); +} + +result +_SearchBarImpl::SetTextPredictionEnabled(bool enable) +{ + return __pSearchBar->SetTextPredictionEnabled(enable); +} + +result +_SearchBarImpl::SetCurrentLanguage(LanguageCode languageCode) +{ + return __pSearchBar->SetCurrentLanguage(languageCode); +} + +result +_SearchBarImpl::GetCurrentLanguage(LanguageCode& language) const +{ + return __pSearchBar->GetCurrentLanguage(language); +} + +result +_SearchBarImpl::AddActionEventListener(IActionEventListener& listener) +{ + ClearLastResult(); + + 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, + "A system error has occurred. The same listener instance already exists in the event listener list."); + return r; +} + +result +_SearchBarImpl::RemoveActionEventListener(IActionEventListener& listener) +{ + ClearLastResult(); + + SysTryReturn(NID_UI_CTRL, __pPublicActionEvent != null, E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred."); + + result r = __pPublicActionEvent->RemoveListener(listener); + SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_NOT_FOUND, E_SYSTEM, + "A system error has occurred. The specified listener does not exist in the event listener list."); + return r; +} + +result +_SearchBarImpl::AddKeypadEventListener(IKeypadEventListener& listener) +{ + ClearLastResult(); + + 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, + "A system error has occurred. The same listener instance already exists in the event listener list."); + + return r; +} + +result +_SearchBarImpl::RemoveKeypadEventListener(IKeypadEventListener& listener) +{ + ClearLastResult(); + + 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, + "A system error has occurred. The specified listener does not exist in the event listener list."); + + return r; +} + +result +_SearchBarImpl::AddTextBlockEventListener(ITextBlockEventListener& listener) +{ + ClearLastResult(); + + 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, + "A system error has occurred. The same listener instance already exists in the event listener list."); + + return r; +} + +result +_SearchBarImpl::RemoveTextBlockEventListener(ITextBlockEventListener& listener) +{ + ClearLastResult(); + + 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, + "A system error has occurred. The specified listener does not exist in the event listener list."); + + return r; +} + + +result +_SearchBarImpl::AddTextEventListener(ITextEventListener& listener) +{ + ClearLastResult(); + + 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, + "A system error has occurred. The same listener instance already exists in the event listener list."); + + return r; +} + +result +_SearchBarImpl::RemoveTextEventListener(ITextEventListener& listener) +{ + ClearLastResult(); + + 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, + "A system error has occurred. The specified listener does not exist in the event listener list."); + + return r; +} + +result +_SearchBarImpl::AddSearchBarEventListener(const ISearchBarEventListener& listener) +{ + ClearLastResult(); + + 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, + "A system error has occurred. The same listener instance already exists in the event listener list."); + + return r; +} + +result +_SearchBarImpl::RemoveSearchBarEventListener(const ISearchBarEventListener& listener) +{ + ClearLastResult(); + + 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, + "A system error has occurred. The specified listener does not exist in the event listener list."); + + return r; +} + +result +_SearchBarImpl::AddLanguageEventListener(ILanguageEventListener& listener) +{ + ClearLastResult(); + + SysAssertf(__pPublicLanguageEvent != null, "Not yet constructed. Construct() should be called before use."); + + return __pPublicLanguageEvent->AddListener(listener); +} + +result +_SearchBarImpl::RemoveLanguageEventListener(ILanguageEventListener& listener) +{ + ClearLastResult(); + + SysAssertf(__pPublicLanguageEvent != null, "Not yet constructed. Construct() should be called before use."); + + return __pPublicLanguageEvent->RemoveListener(listener); +} + +void +_SearchBarImpl::SetEditTextFilter(IEditTextFilter* pFilter) +{ + __pSearchBar->SetEditTextFilter(pFilter); + + return; +} + +void +_SearchBarImpl::SendOpaqueCommand (const String& command) +{ + __pSearchBar->SendOpaqueCommand(command); + + return; +} + +void +_SearchBarImpl::OnActionPerformed(const _Control& source, int actionId) +{ + ClearLastResult(); + + if (__pPublicActionEvent != null) + { + IEventArg* pEventArg = _PublicActionEvent::CreateActionEventArgN(actionId); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pPublicActionEvent->Fire(*pEventArg); + } + return; +} + +void +_SearchBarImpl::OnKeypadWillOpen(void) +{ + ClearLastResult(); + + if (__pPublicKeypadEvent != null) + { + IEventArg* pEventArg = _PublicKeypadEvent::CreateKeypadEventArgN( + GetPublic(), KEYPAD_ACTION_SEARCH, KEYPAD_EVENT_STATUS_CREATED); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pPublicKeypadEvent->Fire(*pEventArg); + } + return; +} + +void +_SearchBarImpl::OnKeypadOpened(void) +{ + ClearLastResult(); + + if (__pPublicKeypadEvent != null) + { + IEventArg* pEventArg = _PublicKeypadEvent::CreateKeypadEventArgN( + GetPublic(), KEYPAD_ACTION_SEARCH, KEYPAD_EVENT_STATUS_OPEN); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pPublicKeypadEvent->Fire(*pEventArg); + } + return; +} + + +void +_SearchBarImpl::OnKeypadClosed(void) +{ + ClearLastResult(); + + if (__pPublicKeypadEvent != null) + { + IEventArg* pEventArg = _PublicKeypadEvent::CreateKeypadEventArgN( + GetPublic(), KEYPAD_ACTION_SEARCH, KEYPAD_EVENT_STATUS_CLOSE); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pPublicKeypadEvent->Fire(*pEventArg); + } + return; +} + +void +_SearchBarImpl::OnKeypadBoundsChanged(void) +{ + ClearLastResult(); + + if (__pPublicKeypadEvent != null) + { + IEventArg* pEventArg = _PublicKeypadEvent::CreateKeypadEventArgN( + GetPublic(), KEYPAD_ACTION_SEARCH, KEYPAD_EVENT_STATUS_BOUNDS_CHANGED); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pPublicKeypadEvent->Fire(*pEventArg); + } + return; +} + +void +_SearchBarImpl::OnKeypadActionPerformed(CoreKeypadAction keypadAction) +{ + ClearLastResult(); + + if (__pPublicKeypadEvent != null) + { + KeypadAction publicKeypadAction = ConvertKeypadAction(keypadAction); + + IEventArg* pEventArg = _PublicKeypadEvent::CreateKeypadEventArgN( + GetPublic(), publicKeypadAction, KEYPAD_EVENT_STATUS_ENTERACTION); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pPublicKeypadEvent->Fire(*pEventArg); + } + return; +} + +void +_SearchBarImpl::OnTextBlockSelected(_Control& source, int start, int end) +{ + ClearLastResult(); + + if (__pPublicTextBlockEvent != null) + { + IEventArg* pEventArg = _PublicTextBlockEvent::CreateTextBlockEventArgN(start, end); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pPublicTextBlockEvent->Fire(*pEventArg); + } + return; +} + +void +_SearchBarImpl::OnTextValueChanged(const _Control& source) +{ + ClearLastResult(); + + if (__pPublicTextEvent != null) + { + IEventArg* pEventArg = _PublicTextEvent::CreateTextEventArgN(TEXT_EVENT_CHANGED); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pPublicTextEvent->Fire(*pEventArg); + } + return; +} + +void +_SearchBarImpl::OnTextValueChangeCanceled(const _Control& source) +{ + ClearLastResult(); + + if (__pPublicTextEvent != null) + { + IEventArg* pEventArg = _PublicTextEvent::CreateTextEventArgN(TEXT_EVENT_CANCELED); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pPublicTextEvent->Fire(*pEventArg); + } + return; +} + +void +_SearchBarImpl::OnSearchBarModeChanged(_SearchBar& source, SearchBarMode mode) +{ + ClearLastResult(); + + if ((_AppInfo::GetApiVersion() == _API_VERSION_2_0 && _AppInfo::IsOspCompat()) && __pSearchBar != null) + { + if (mode == SEARCH_BAR_MODE_NORMAL) + { + __pSearchBar->SetHeaderVisibleState(true); + } + else + { + __pSearchBar->SetHeaderVisibleState(false); + } + __pSearchBar->SetContentsArea(); + } + + if (__pPublicSearchBarEvent != null) + { + IEventArg* pEventArg = _PublicSearchBarEvent::CreateSearchBarEventArgN(SEARCH_BAR_EVENT_MODE_CHANGE); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pPublicSearchBarEvent->Fire(*pEventArg); + } + return; +} + +void +_SearchBarImpl::OnLanguageChanged(LanguageCode oldLanguage, LanguageCode newLanguage) +{ + if (__pPublicLanguageEvent != null) + { + IEventArg* pKLanguageEventArg = _PublicLanguageEvent::CreateLanguageEventArgN(GetPublic(), oldLanguage, newLanguage); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, pKLanguageEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pPublicLanguageEvent->Fire(*pKLanguageEventArg); + } + else + { + SysLog(NID_UI_CTRL, "Event is not created."); + } + return; +} + +void +_SearchBarImpl::OnFocusEventListenerAdded(IFocusEventListener& listener) +{ + ClearLastResult(); + SysTryReturnVoidResult(NID_UI, + __pPublicFocusEventListeners->Add(const_cast (&listener)) == E_SUCCESS, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to add listener."); +} + +void +_SearchBarImpl::OnFocusEventListenerRemoved(IFocusEventListener& listener) +{ + ClearLastResult(); + SysTryReturnVoidResult(NID_UI, + __pPublicFocusEventListeners->Remove(&listener) == E_SUCCESS, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to remove listener."); +} + +void +_SearchBarImpl::OnFocusGained(const Tizen::Ui::Control& source) +{ + if (!__pSearchBar->IsFocusCallbackToBeFired()) + { + return; + } + + IEnumeratorT* pEnumerator = __pPublicFocusEventListeners->GetEnumeratorN(); + + if (pEnumerator != null) + { + while (pEnumerator->MoveNext() == E_SUCCESS) + { + IEventListener* pListener = null; + pEnumerator->GetCurrent(pListener); + + IFocusEventListener* pFocusEventListener = dynamic_cast (pListener); + + if (pFocusEventListener != null) + { + pFocusEventListener->OnFocusGained(GetPublic()); + } + } + + delete pEnumerator; + } + + return; +} + +void +_SearchBarImpl::OnFocusLost(const Tizen::Ui::Control& source) +{ + if (!__pSearchBar->IsFocusCallbackToBeFired()) + { + return; + } + + IEnumeratorT* pEnumerator = __pPublicFocusEventListeners->GetEnumeratorN(); + if (pEnumerator != null) + { + while (pEnumerator->MoveNext() == E_SUCCESS) + { + IEventListener* pListener = null; + pEnumerator->GetCurrent(pListener); + + IFocusEventListener* pFocusEventListener = dynamic_cast (pListener); + + if (pFocusEventListener != null) + { + pFocusEventListener->OnFocusLost(GetPublic()); + } + } + + delete pEnumerator; + } + + return; +} + +void +_SearchBarImpl::OnKeyPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode) +{ + IEnumeratorT* pEnumerator = GetKeyEventListener()->GetEnumeratorN(); + if (pEnumerator != null) + { + while (pEnumerator->MoveNext() == E_SUCCESS) + { + IEventListener* pListener = null; + pEnumerator->GetCurrent(pListener); + + IKeyEventListener* pKeyEventListener = dynamic_cast (pListener); + + if (pKeyEventListener != null) + { + pKeyEventListener->OnKeyPressed(GetPublic(), keyCode); + } + } + + delete pEnumerator; + } + + return; +} + +void +_SearchBarImpl::OnKeyReleased(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode) +{ + IEnumeratorT* pEnumerator = GetKeyEventListener()->GetEnumeratorN(); + if (pEnumerator != null) + { + while (pEnumerator->MoveNext() == E_SUCCESS) + { + IEventListener* pListener = null; + pEnumerator->GetCurrent(pListener); + + IKeyEventListener* pKeyEventListener = dynamic_cast (pListener); + + if (pKeyEventListener != null) + { + pKeyEventListener->OnKeyReleased(GetPublic(), keyCode); + } + } + + delete pEnumerator; + } + + return; +} + +void +_SearchBarImpl::OnKeyLongPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode) +{ + IEnumeratorT* pEnumerator = GetKeyEventListener()->GetEnumeratorN(); + if (pEnumerator != null) + { + while (pEnumerator->MoveNext() == E_SUCCESS) + { + IEventListener* pListener = null; + pEnumerator->GetCurrent(pListener); + + IKeyEventListener* pKeyEventListener = dynamic_cast (pListener); + + if (pKeyEventListener != null) + { + pKeyEventListener->OnKeyLongPressed(GetPublic(), keyCode); + } + } + + delete pEnumerator; + } + + return; +} + +KeypadAction +_SearchBarImpl::ConvertKeypadAction(CoreKeypadAction keypadAction) const +{ + KeypadAction publicKeypadAction = KEYPAD_ACTION_SEARCH; + switch (keypadAction) + { + case CORE_KEYPAD_ACTION_ENTER: + publicKeypadAction = KEYPAD_ACTION_ENTER; + break; + + case CORE_KEYPAD_ACTION_GO: + publicKeypadAction = KEYPAD_ACTION_GO; + break; + + case CORE_KEYPAD_ACTION_NEXT: + publicKeypadAction = KEYPAD_ACTION_NEXT; + break; + + case CORE_KEYPAD_ACTION_SEND: + publicKeypadAction = KEYPAD_ACTION_SEND; + break; + + case CORE_KEYPAD_ACTION_SEARCH: + publicKeypadAction = KEYPAD_ACTION_SEARCH; + break; + + case CORE_KEYPAD_ACTION_LOGIN: + publicKeypadAction = KEYPAD_ACTION_LOGIN; + break; + + case CORE_KEYPAD_ACTION_SIGN_IN: + publicKeypadAction = KEYPAD_ACTION_SIGN_IN; + break; + + case CORE_KEYPAD_ACTION_JOIN: + publicKeypadAction = KEYPAD_ACTION_JOIN; + break; + + case CORE_KEYPAD_ACTION_DONE: + publicKeypadAction = KEYPAD_ACTION_DONE; + break; + + default: + break; + } + + return publicKeypadAction; +} + +_EditFieldImpl* +_SearchBarImpl::GetEditFieldImpl(void) const +{ + return __pEditFieldImpl; +} + +_ButtonImpl* +_SearchBarImpl::GetButtonImpl(void) const +{ + return __pButtonImpl; +} + +class _SearchBarMaker + : public _UiBuilderControlMaker +{ +public: + _SearchBarMaker(_UiBuilder* pUibuilder) + : _UiBuilderControlMaker(pUibuilder){} + virtual ~_SearchBarMaker(void){} + static _UiBuilderControlMaker* + GetInstance(_UiBuilder* pUibuilder) + { + _SearchBarMaker* pSearchBarMaker = new (std::nothrow) _SearchBarMaker(pUibuilder); + return pSearchBarMaker; + }; + +protected: + virtual Control* + Make(_UiBuilderControl* pControl) + { + result r = E_SUCCESS; + + FloatRectangle rect; + SearchBar* pSearchBar = null; + _UiBuilderControlLayout* pControlProperty = null; + bool showSearchBarButton = true; + KeypadAction keypadAction = KEYPAD_ACTION_ENTER; + Color color; + int opacity = SEARCHBAR_DEFAULT_OPACITY; + EllipsisPosition ellipsisPosition = ELLIPSIS_POSITION_END; + String text; + String guideText; + int limitLength = SEARCHBAR_TEXT_LENGTH_MAX; + int buttonActionId = -1; + String buttonText; + float searchFieldTextSize = 0.0f; + bool lowercaseEnable = false; + String elementString; + + GetProperty(pControl, &pControlProperty); + if (pControlProperty == null) + { + return null; + } + + pSearchBar = new (std::nothrow) SearchBar(); + if (pSearchBar == null) + { + return null; + } + + rect = pControlProperty->GetRectF(); + if (pControl->GetElement("showSearchBarButton", elementString)) + { + if (elementString.Equals(L"false", false)) + { + showSearchBarButton = false; + } + } + + if (pControl->GetElement("keypadAction", elementString)) + { + if (elementString.Equals(L"KEYPAD_ACTION_ENTER", false)) + { + keypadAction = KEYPAD_ACTION_ENTER; + } + else if (elementString.Equals(L"KEYPAD_ACTION_GO", false)) + { + keypadAction = KEYPAD_ACTION_GO; + } + else if (elementString.Equals(L"KEYPAD_ACTION_NEXT", false)) + { + keypadAction = KEYPAD_ACTION_NEXT; + } + else if (elementString.Equals(L"KEYPAD_ACTION_SEND", false)) + { + keypadAction = KEYPAD_ACTION_SEND; + } + else if (elementString.Equals(L"KEYPAD_ACTION_SEARCH", false)) + { + keypadAction = KEYPAD_ACTION_SEARCH; + } + else if (elementString.Equals(L"KEYPAD_ACTION_LOGIN", false)) + { + keypadAction = KEYPAD_ACTION_LOGIN; + } + else if (elementString.Equals(L"KEYPAD_ACTION_SIGN_IN", false)) + { + keypadAction = KEYPAD_ACTION_SIGN_IN; + } + else if (elementString.Equals(L"KEYPAD_ACTION_JOIN", false)) + { + keypadAction = KEYPAD_ACTION_JOIN; + } + else if (elementString.Equals(L"KEYPAD_ACTION_DONE", false)) + { + keypadAction = KEYPAD_ACTION_DONE; + } + } + + r = pSearchBar->Construct(rect, showSearchBarButton, keypadAction); + if (r != E_SUCCESS) + { + delete pSearchBar; + return null; + } + + if (showSearchBarButton) + { + if (pControl->GetElement("buttonActionId", elementString)) + { + Base::Integer::Parse(elementString, buttonActionId); + } + + if (pControl->GetElement("buttonText", elementString)) + { + r = pSearchBar->SetButton(elementString, buttonActionId); + } + } + + if (pControl->GetElement("text", elementString)) + { + r = pSearchBar->SetText(elementString); + } + + if (pControl->GetElement("guideText", elementString)) + { + r = pSearchBar->SetGuideText(elementString); + } + + if (pControl->GetElement("searchFieldTextSize", elementString)) + { + searchFieldTextSize = _LocalizedNumParser::ToDouble(elementString, "C"); + _ICoordinateSystemTransformer* pTransform = GetTransformer(); + if (pTransform != null) + { + searchFieldTextSize = pTransform->Transform(searchFieldTextSize); + } + r = pSearchBar->SetSearchFieldTextSize(searchFieldTextSize); + } + + if (pControl->GetElement("limitLength", elementString)) + { + Base::Integer::Parse(elementString, limitLength); + r = pSearchBar->SetLimitLength(limitLength); + } + + if (pControl->GetElement("lowerCaseMode", elementString)) + { + if (elementString.Equals(L"true", false)) + { + lowercaseEnable = true; + } + else + { + lowercaseEnable = false; + } + + pSearchBar->SetLowerCaseModeEnabled(lowercaseEnable); + } + + if (pControl->GetElement("ellipsisPosition", elementString)) + { + if (elementString.Equals(L"ELLIPSIS_POSITION_START", false)) + { + ellipsisPosition = ELLIPSIS_POSITION_START; + } + else if (elementString.Equals(L"ELLIPSIS_POSITION_MIDDLE", false)) + { + ellipsisPosition = ELLIPSIS_POSITION_MIDDLE; + } + else + { + ellipsisPosition = ELLIPSIS_POSITION_END; + } + + r = pSearchBar->SetEllipsisPosition(ellipsisPosition); + } + + if (pControl->GetElement("backgroundBitmapPath", elementString)) + { + Bitmap* pBackgroundBitmap = null; + pBackgroundBitmap = LoadBitmapN(elementString); + if (pBackgroundBitmap != null) + { + pSearchBar->SetBackgroundBitmap(*pBackgroundBitmap); + delete pBackgroundBitmap; + } + } + + if (pControl->GetElement("colorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + if (pControl->GetElement("color", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + r = pSearchBar->SetColor(color); + } + + opacity = SEARCHBAR_DEFAULT_OPACITY; + if (pControl->GetElement("normalButtonColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + r = pSearchBar->SetButtonColor(SEARCH_BAR_BUTTON_STATUS_NORMAL, color); + } + + if (pControl->GetElement("normalButtonTextColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + r = pSearchBar->SetButtonTextColor(SEARCH_BAR_BUTTON_STATUS_NORMAL, color); + } + + if (pControl->GetElement("normalSearchFieldColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + r = pSearchBar->SetSearchFieldColor(SEARCH_FIELD_STATUS_NORMAL, color); + } + + if (pControl->GetElement("normalSearchFieldTextColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + r = pSearchBar->SetSearchFieldTextColor(SEARCH_FIELD_STATUS_NORMAL, color); + } + + if (pControl->GetElement("disabledButtonColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + r = pSearchBar->SetButtonColor(SEARCH_BAR_BUTTON_STATUS_DISABLED, color); + } + + if (pControl->GetElement("disabledButtonTextColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + r = pSearchBar->SetButtonTextColor(SEARCH_BAR_BUTTON_STATUS_DISABLED, color); + } + + if (pControl->GetElement("disabledSearchFieldColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + r = pSearchBar->SetSearchFieldColor(SEARCH_FIELD_STATUS_DISABLED, color); + } + + if (pControl->GetElement("disabledSearchFieldTextColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + r = pSearchBar->SetSearchFieldTextColor(SEARCH_FIELD_STATUS_DISABLED, color); + } + + if (pControl->GetElement("highlightedButtonColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + r = pSearchBar->SetButtonColor(SEARCH_BAR_BUTTON_STATUS_HIGHLIGHTED, color); + } + + if (pControl->GetElement("highlightedButtonTextColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + r = pSearchBar->SetButtonTextColor(SEARCH_BAR_BUTTON_STATUS_HIGHLIGHTED, color); + } + + if (pControl->GetElement("highlightedSearchFieldColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + r = pSearchBar->SetSearchFieldColor(SEARCH_FIELD_STATUS_HIGHLIGHTED, color); + } + + if (pControl->GetElement("highlightedSearchFieldTextColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + r = pSearchBar->SetSearchFieldTextColor(SEARCH_FIELD_STATUS_HIGHLIGHTED, color); + } + + if (pControl->GetElement("pressedButtonColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + r = pSearchBar->SetButtonColor(SEARCH_BAR_BUTTON_STATUS_PRESSED, color); + } + + if (pControl->GetElement("pressedButtonTextColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + r = pSearchBar->SetButtonTextColor(SEARCH_BAR_BUTTON_STATUS_PRESSED, color); + } + + if (pControl->GetElement("guideTextColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + r = pSearchBar->SetGuideTextColor(color); + } + + if (pControl->GetElement(L"accessibilityHint", elementString)) + { + AccessibilityContainer* pContainer = pSearchBar->GetAccessibilityContainer(); + if (pContainer != null) + { + AccessibilityElement* pElement = pContainer->GetElement(L"EditText"); + if (pElement != null) + { + pElement->SetHint(elementString); + } + } + } + + return pSearchBar; + } +}; + +_SearchBarRegister::_SearchBarRegister(void) +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->RegisterControl(L"SearchBar", _SearchBarMaker::GetInstance); +} + +_SearchBarRegister::~_SearchBarRegister(void) +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->UnregisterControl(L"SearchBar"); +} +static _SearchBarRegister SearchBarRegisterToUiBuilder; +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_SearchBarModel.cpp b/src/ui/controls/FUiCtrl_SearchBarModel.cpp new file mode 100644 index 0000000..7762f54 --- /dev/null +++ b/src/ui/controls/FUiCtrl_SearchBarModel.cpp @@ -0,0 +1,88 @@ +// +// 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_SearchBarModel.cpp + * @brief This is the implementation file for the _SearchBarModel class. + */ + +#include +#include "FUiCtrl_SearchBarModel.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +_SearchBarModel::_SearchBarModel(void) + : __isContentAreaVisible(true) + , __isModeLocked(false) + , __searchBarMode(SEARCH_BAR_MODE_NORMAL) +{ +} + +_SearchBarModel::~_SearchBarModel(void) +{ +} + +result +_SearchBarModel::Construct(void) +{ + return E_SUCCESS; +} + +result +_SearchBarModel::SetContentAreaVisible(bool visible) +{ + __isContentAreaVisible = visible; + + return E_SUCCESS; +} + +bool +_SearchBarModel::IsContentAreaVisible(void) const +{ + return __isContentAreaVisible; +} + +SearchBarMode +_SearchBarModel::GetMode(void) const +{ + return __searchBarMode; +} + +bool +_SearchBarModel::IsModeLocked(void) const +{ + return __isModeLocked; +} + +result +_SearchBarModel::SetMode(SearchBarMode mode) +{ + __searchBarMode = mode; + + return E_SUCCESS; +} + +result +_SearchBarModel::SetModeLocked(bool modeLocked) +{ + __isModeLocked = modeLocked; + + return E_SUCCESS; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_SearchBarPresenter.cpp b/src/ui/controls/FUiCtrl_SearchBarPresenter.cpp new file mode 100644 index 0000000..859cda1 --- /dev/null +++ b/src/ui/controls/FUiCtrl_SearchBarPresenter.cpp @@ -0,0 +1,775 @@ +// +// 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_SearchBarPresenter.cpp + * @brief This is the implementation file for the _SearchBarPresenter class. + */ + +#include +#include +#include +#include "FUi_ResourceManager.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUiAnim_VisualElement.h" +#include "FUiCtrl_Edit.h" +#include "FUiCtrl_Form.h" +#include "FUiCtrl_SearchBar.h" +#include "FUiCtrl_SearchBarModel.h" +#include "FUiCtrl_SearchBarPresenter.h" +#include "FUiCtrl_Toolbar.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Ui::Animations; +using namespace Tizen::Base; +using namespace Tizen::Ui; + +namespace Tizen { namespace Ui { namespace Controls { + +_SearchBarPresenter::_SearchBarPresenter(void) + : __pSearchBar(null) + , __pSearchBarModel(null) + , __pCancelButton(null) + , __pEdit(null) + , __pContainer(null) + , __searchFieldBounds(FloatRectangle()) + , __pIconElement(null) + , __pReplacedSearchFieldNormalBitmap(null) + , __pReplacedSearchFieldDisabledBitmap(null) + , __pReplacedSearchBarBitmap(null) + , __pSearchFieldEffectBitmap(null) + , __pSearchBarEffectBitmap(null) + , __currentBgColor(Color()) + , __lazyDecode(false) +{ +} + +_SearchBarPresenter::~_SearchBarPresenter(void) +{ + delete __pSearchBarModel; + __pSearchBarModel = null; + + delete __pReplacedSearchFieldNormalBitmap; + __pReplacedSearchFieldNormalBitmap = null; + + delete __pReplacedSearchFieldDisabledBitmap; + __pReplacedSearchFieldDisabledBitmap = null; + + delete __pReplacedSearchBarBitmap; + __pReplacedSearchBarBitmap = null; + + delete __pSearchFieldEffectBitmap; + __pSearchFieldEffectBitmap = null; + + delete __pSearchBarEffectBitmap; + __pSearchBarEffectBitmap = null; +} + +result +_SearchBarPresenter::Construct(const _SearchBar& searchBar) +{ + result r = E_SUCCESS; + _VisualElement* pSearchBarElement = null; + + __pSearchBar = const_cast <_SearchBar*>(&searchBar); + 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 != 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 != 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 != 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, + "[%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 != 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)); + + __pIconElement->SetShowState(true); + + r = __pIconElement->SetSurfaceOpaque(false); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pIconElement->SetImplicitAnimationEnabled(false); + + r = pEditElement->AttachChild(*__pIconElement); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pSearchBarElement = __pSearchBar->GetVisualElement(); + SysTryCatch(NID_UI_CTRL, pSearchBarElement, , E_SYSTEM, + "[%s] A system error has occurred. Failed to get searchbar's visual element.", GetErrorMessage(E_SYSTEM)); + + return r; + +CATCH: + if (__pIconElement != null) + { + __pIconElement->Destroy(); + __pIconElement = null; + } + + return r; +} + +result +_SearchBarPresenter::LoadSearchBarBitmaps() +{ + result r = E_SUCCESS; + Color searchFieldIconColor; + + r = GET_BITMAP_CONFIG_N(SEARCHBAR::BG_NORMAL_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pSearchBarEffectBitmap); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r,"Propagating."); + + __currentBgColor = __pSearchBar->GetColor(); + + 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); + + 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); + + 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 __pSearchBarEffectBitmap; + __pSearchBarEffectBitmap = null; + + delete __pReplacedSearchBarBitmap; + __pReplacedSearchBarBitmap = null; + + delete __pSearchFieldEffectBitmap; + __pSearchFieldEffectBitmap = null; + + delete __pReplacedSearchFieldNormalBitmap; + __pReplacedSearchFieldNormalBitmap = null; + + return r; +} + +result +_SearchBarPresenter::Install(void) +{ + result r = E_SUCCESS; + + _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, + "[%s] A system error has occurred. The searchbar model construction failed.", GetErrorMessage(E_SYSTEM)); + + __pSearchBarModel = pModel; + + return E_SUCCESS; + +CATCH: + delete pModel; + return E_SYSTEM; +} + +result +_SearchBarPresenter::UpdateContentArea(bool invalidate) +{ + SearchBarMode mode = __pSearchBarModel->GetMode(); + SysTryReturn(NID_UI_CTRL, mode == SEARCH_BAR_MODE_INPUT, E_INVALID_OPERATION, E_INVALID_OPERATION, + "[%s] The searchbar mode cannot be updated.", GetErrorMessage(E_INVALID_OPERATION)); + + __pSearchBar->Invalidate(invalidate); + + return E_SUCCESS; +} + +result +_SearchBarPresenter::SetContentAreaVisible(bool visible) +{ + return __pSearchBarModel->SetContentAreaVisible(visible); +} + +bool +_SearchBarPresenter::IsContentAreaVisible(void) const +{ + return __pSearchBarModel->IsContentAreaVisible(); +} + +SearchBarMode +_SearchBarPresenter::GetMode(void) const +{ + return __pSearchBarModel->GetMode(); +} + +bool +_SearchBarPresenter::IsModeLocked(void) const +{ + return __pSearchBarModel->IsModeLocked(); +} + +result +_SearchBarPresenter::SetMode(SearchBarMode mode, bool isCalledByApp) +{ + SysTryReturn(NID_UI_CTRL, IsModeLocked() == false, E_INVALID_OPERATION, E_INVALID_OPERATION, + "[%s] The searchbar mode is locked.", GetErrorMessage(E_INVALID_OPERATION)); + + if (GetMode() == mode) + { + return E_SUCCESS; + } + + __pSearchBarModel->SetMode(mode); + + result r = ChangeMode(mode, isCalledByApp); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. Failed to change the mode of searchbar.", GetErrorMessage(E_SYSTEM)); + + return r; +} + +result +_SearchBarPresenter::SetModeLocked(bool modeLocked) +{ + return __pSearchBarModel->SetModeLocked(modeLocked); +} + +result +_SearchBarPresenter::Draw(void) +{ + result r = E_SUCCESS; + + Color bgColor = __pSearchBar->GetColor(); + + FloatRectangle bounds(0.0f, 0.0f, __pSearchBar->GetBoundsF().width, __pSearchBar->GetBoundsF().height); + + Bitmap* pBackgroundBitmap = __pSearchBar->GetBackgroundBitmap(); + + if (pBackgroundBitmap == null) + { + r = DrawSearchBarDefaultBitmap(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + String imagePath = L""; + + if (!_BitmapImpl::CheckNinePatchedBitmapStrictly(*pBackgroundBitmap)) + { + imagePath = _BitmapImpl::GetInstance(*pBackgroundBitmap)->GetFileName(); + } + + 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); + __lazyDecode = true; + } + else + { + __pSearchBar->GetVisualElement()->SetImageSource(L""); + __lazyDecode = false; + Canvas* pCanvas = __pSearchBar->GetCanvasN(); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pCanvas != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + pCanvas->SetBackgroundColor(bgColor); + pCanvas->Clear(); + + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pBackgroundBitmap)) + { + pCanvas->DrawNinePatchedBitmap(bounds, *pBackgroundBitmap); + } + else + { + pCanvas->DrawBitmap(bounds, *pBackgroundBitmap, FloatRectangle(0.0f, 0.0f, pBackgroundBitmap->GetWidthF(), pBackgroundBitmap->GetHeightF())); + } + + delete pCanvas; + } + } + + r = DrawIcon(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +_SearchBarPresenter::DrawSearchBarDefaultBitmap(void) +{ + result r = E_SUCCESS; + Canvas* pCanvas = null; + bool isCustomBitmap = false; + FloatRectangle bounds = __pSearchBar->GetBoundsF(); + + Color bgColor = __pSearchBar->GetColor(); + + if (bgColor != __currentBgColor) + { + delete __pReplacedSearchBarBitmap; + __pReplacedSearchBarBitmap = null; + + 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; + } + + isCustomBitmap = IS_CUSTOM_BITMAP(SEARCHBAR::BG_NORMAL); + + pCanvas = __pSearchBar->GetCanvasN(); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, (pCanvas != null), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + pCanvas->SetBackgroundColor(Color(0)); + pCanvas->Clear(); + + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pReplacedSearchBarBitmap)) + { + pCanvas->DrawNinePatchedBitmap(FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height), *__pReplacedSearchBarBitmap); + } + else + { + pCanvas->DrawBitmap(FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height), *__pReplacedSearchBarBitmap); + } + + if (!isCustomBitmap && __pSearchBarEffectBitmap != null) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pSearchBarEffectBitmap)) + { + pCanvas->DrawNinePatchedBitmap(FloatRectangle(0, 0, bounds.width, bounds.height), *__pSearchBarEffectBitmap); + } + else + { + pCanvas->DrawBitmap(FloatRectangle(0, 0, bounds.width, bounds.height), *__pSearchBarEffectBitmap); + } + } + + delete pCanvas; + return r; +} + +void +_SearchBarPresenter::SetCancelButtonVisible(bool visible) +{ + if ((!__pSearchBar->IsUsableCancelButton()) && visible) + { + return; + } + + if (__pCancelButton == null) + { + return; + } + + __pCancelButton->SetVisibleState(visible); + + return; +} + +void +_SearchBarPresenter::SetContainerVisible(bool visible) +{ + if (__pContainer == null) + { + return; + } + + __pContainer->SetVisibleState(visible); + + return; +} + + +result +_SearchBarPresenter::DrawIcon(void) +{ + 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; + + Canvas* pIconCanvas = null; + FloatRectangle iconBounds; + + bool isCustomBitmap = false; + + isCustomBitmap = IS_CUSTOM_BITMAP(SEARCHBAR::ICON_NORMAL); + + float iconMarginH = 0.0f; + float iconWidth = 0.0f; + float iconHeight = 0.0f; + _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); + + GET_SHAPE_CONFIG(SEARCHBAR::ICON_HORIZONTAL_MARGIN, orientation, iconMarginH); + GET_SHAPE_CONFIG(SEARCHBAR::ICON_WIDTH, orientation, iconWidth); + GET_SHAPE_CONFIG(SEARCHBAR::ICON_HEIGHT, orientation, iconHeight); + + iconBounds.x = iconMarginH; + iconBounds.y = (__pEdit->GetBoundsF().height - iconHeight) / 2.0f; + iconBounds.width = iconWidth; + iconBounds.height = iconHeight; + + __pIconElement->SetBounds(FloatRectangle(iconBounds.x, iconBounds.y, iconBounds.width, iconBounds.height)); + + pIconCanvas = __pIconElement->GetCanvasN(FloatRectangle(0.0f, 0.0f, iconBounds.width, iconBounds.height)); + SysTryReturnResult(NID_UI_CTRL, pIconCanvas != null, GetLastResult(), "Propagating."); + + pIconCanvas->SetBackgroundColor(Color(0)); + pIconCanvas->Clear(); + if (__pSearchBar->IsEnabled()) + { + if (__pReplacedSearchFieldNormalBitmap != null) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pReplacedSearchFieldNormalBitmap)) + { + pIconCanvas->DrawNinePatchedBitmap(FloatRectangle(0, 0, iconBounds.width, iconBounds.height), *__pReplacedSearchFieldNormalBitmap); + } + else + { + pIconCanvas->DrawBitmap(FloatPoint((iconBounds.width - __pReplacedSearchFieldNormalBitmap->GetWidthF())/2.0f, (iconBounds.height - __pReplacedSearchFieldNormalBitmap->GetHeightF())/2.0f), *__pReplacedSearchFieldNormalBitmap); + } + } + } + else + { + if (__pReplacedSearchFieldDisabledBitmap != null) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pReplacedSearchFieldDisabledBitmap)) + { + pIconCanvas->DrawNinePatchedBitmap(FloatRectangle(0, 0, iconBounds.width, iconBounds.height), *__pReplacedSearchFieldDisabledBitmap); + } + else + { + pIconCanvas->DrawBitmap(FloatPoint((iconBounds.width - __pReplacedSearchFieldDisabledBitmap->GetWidthF())/2.0f, (iconBounds.height - __pReplacedSearchFieldDisabledBitmap->GetHeightF())/2.0f), *__pReplacedSearchFieldDisabledBitmap); + } + } + } + + if (!isCustomBitmap && __pSearchFieldEffectBitmap != null) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pSearchFieldEffectBitmap)) + { + pIconCanvas->DrawNinePatchedBitmap(FloatRectangle(0, 0, iconBounds.width, iconBounds.height), *__pSearchFieldEffectBitmap); + } + else + { + pIconCanvas->DrawBitmap(FloatPoint(0.0f, 0.0f), *__pSearchFieldEffectBitmap); + } + } + + delete pIconCanvas; + pIconCanvas = null; + + return r; +} + + +result +_SearchBarPresenter::ChangeMode(SearchBarMode mode, bool isCalledByApp) +{ + result r = E_SUCCESS; + + if (mode == SEARCH_BAR_MODE_NORMAL) + { + __pSearchBar->SetFocusCallbackParameter(true); + InitializeViewModeLayout(); + + if (__pEdit != null) + { + __pEdit->ClearText(); + __pEdit->SetBounds(__searchFieldBounds); + if (__pEdit->IsFocused()) + { + __pEdit->HideKeypad(); + } + } + + SetCancelButtonVisible(false); + SetContainerVisible(false); + + r = __pSearchBar->SendSearchBarEvent(_SEARCH_BAR_EVENT_MODE_CHANGE); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, + "[%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, + "[%s] A system error has occurred. Failed to fire the searchbar event.", GetErrorMessage(E_SYSTEM)); + + InitializeInputModeLayout(); + SetCancelButtonVisible(true); + __pSearchBar->SetContentDimming(); + + if (__pEdit != null) + { + float buttonWidth = 0.0f; + _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); + GET_SHAPE_CONFIG(SEARCHBAR::BUTTON_WIDTH, orientation, buttonWidth); + + float cancelButtonWidth = 0.0f; + cancelButtonWidth = __pCancelButton->GetTextExtentSizeF() + __pCancelButton->GetRightMarginF() + __pCancelButton->GetLeftMarginF(); + + if (cancelButtonWidth <= buttonWidth) + { + __pEdit->SetBounds(__searchFieldBounds); + } + if (isCalledByApp) + { + __pEdit->ShowKeypad(); + } + } + __pSearchBar->SetContentsArea(); + + if (IsContentAreaVisible()) + { + SetContainerVisible(true); + } + + __pSearchBar->Invalidate(); + } + + return E_SUCCESS; +} + +void +_SearchBarPresenter::InitializeInputModeLayout(void) +{ + InitializeViewModeLayout(); + + if (!__pSearchBar->IsUsableCancelButton()) + { + return; + } + + float horizontalMargin = 0.0f; + float buttonRightMargin = 0.0f; + float buttonLeftMargin = 0.0f; + float buttonWidth = 0.0f; + float searchFieldMinWidth = 0.0f; + + _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); + + GET_SHAPE_CONFIG(SEARCHBAR::HORIZONTAL_MARGIN, orientation, horizontalMargin); + GET_SHAPE_CONFIG(SEARCHBAR::BUTTON_LEFT_MARGIN, orientation, buttonLeftMargin); + GET_SHAPE_CONFIG(SEARCHBAR::BUTTON_RIGHT_MARGIN, orientation, buttonRightMargin); + GET_SHAPE_CONFIG(SEARCHBAR::SEARCH_FIELD_MIN_WIDTH, orientation, searchFieldMinWidth); + GET_SHAPE_CONFIG(SEARCHBAR::BUTTON_WIDTH, orientation, buttonWidth); + + float buttonResizableSearchBarWidth = (horizontalMargin + searchFieldMinWidth + + buttonWidth + buttonLeftMargin + buttonRightMargin); + + if (__pSearchBar->GetBoundsF().width < buttonResizableSearchBarWidth) + { + __searchFieldBounds.width = searchFieldMinWidth; + } + + else + { + __searchFieldBounds.width = __pSearchBar->GetBoundsF().width - (buttonRightMargin + + buttonWidth + buttonLeftMargin + horizontalMargin); + } + + __searchFieldBounds.width = (__pSearchBar->GetBoundsF().width > searchFieldMinWidth) ? __searchFieldBounds.width : searchFieldMinWidth; + + float cancelButtonWidth = 0.0f; + cancelButtonWidth = __pCancelButton->GetTextExtentSizeF() + __pCancelButton->GetRightMarginF() + __pCancelButton->GetLeftMarginF(); + + if (cancelButtonWidth > buttonWidth) + { + __pSearchBar->RecalculateButtonBounds(); + } + + return; +} + +void +_SearchBarPresenter::InitializeViewModeLayout(void) +{ + float horizontalMargin = 0.0f; + float verticalMargin = 0.0f; + float searchBarMinWidthModeNormal = 0.0f; + float searchBarMinHeight = 0.0f; + _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); + + GET_SHAPE_CONFIG(SEARCHBAR::HORIZONTAL_MARGIN, orientation, horizontalMargin); + GET_SHAPE_CONFIG(SEARCHBAR::VERTICAL_MARGIN, orientation, verticalMargin); + GET_SHAPE_CONFIG(SEARCHBAR::SEARCH_FIELD_MIN_WIDTH_NORMAL_MODE, orientation, searchBarMinWidthModeNormal); + GET_SHAPE_CONFIG(SEARCHBAR::MIN_HEIGHT, orientation, searchBarMinHeight); + + float searchFieldMinHeight = searchBarMinHeight - (verticalMargin * 2.0f); + + __searchFieldBounds.x = horizontalMargin; + if (__pSearchBar->GetBoundsF().height < searchBarMinHeight) + { + verticalMargin = (__pSearchBar->GetBoundsF().height - searchFieldMinHeight)/2.0f; + if (verticalMargin < 0.0f) + { + verticalMargin = 0.0f; + } + } + __searchFieldBounds.y = verticalMargin; + __searchFieldBounds.width = __pSearchBar->GetBoundsF().width - (horizontalMargin * 2.0f); + __searchFieldBounds.height = __pSearchBar->GetBoundsF().height - (verticalMargin * 2.0f); + + __searchFieldBounds.width = (__searchFieldBounds.width > searchBarMinWidthModeNormal) ? __searchFieldBounds.width : searchBarMinWidthModeNormal; + __searchFieldBounds.height = (__searchFieldBounds.height > searchFieldMinHeight) ? __searchFieldBounds.height : searchFieldMinHeight; + + return; +} + +void +_SearchBarPresenter::OnBoundsChanged(void) +{ + _Control* pClippedGroupControl = __pSearchBar->GetClippedGroupControl(); + + if (pClippedGroupControl != null) + { + pClippedGroupControl->SetBounds(FloatRectangle(FloatPoint(0.0f, 0.0f), __pSearchBar->GetSizeF())); + } + + if (GetMode() == SEARCH_BAR_MODE_NORMAL) + { + InitializeViewModeLayout(); + } + else + { + InitializeInputModeLayout(); + } + + result r = E_SUCCESS; + float cancelButtonWidth = 0.0f; + + if (__pCancelButton != null) + { + r = __pSearchBar->ResizeCancelButton(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.",GetErrorMessage(r)); + + cancelButtonWidth = __pCancelButton->GetTextExtentSizeF() + __pCancelButton->GetRightMarginF() + __pCancelButton->GetLeftMarginF(); + } + + r = __pEdit->SetBounds(__searchFieldBounds); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.",GetErrorMessage(r)); + + if (__pSearchBar->IsUsableCancelButton() && GetMode() == SEARCH_BAR_MODE_INPUT) + { + float buttonWidth = 0.0f; + _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); + GET_SHAPE_CONFIG(SEARCHBAR::BUTTON_WIDTH, orientation, buttonWidth); + + if (cancelButtonWidth > buttonWidth) + { + __pSearchBar->RecalculateButtonBounds(); + } + } + + __pSearchBar->SetContentsArea(); + __pSearchBar->Invalidate(true); + + return; +} + +void +_SearchBarPresenter::OnTouchReleased(const _Control& source) +{ + if (&source == __pEdit) + { + __pEdit->ShowKeypad(); + } + + return; +} + +Canvas* +_SearchBarPresenter::OnCanvasRequestedN(const FloatRectangle& bounds) +{ + Canvas* pCanvas = null; + + if (__lazyDecode) + { + Bitmap* pBackgroundBitmap = __pSearchBar->GetBackgroundBitmap(); + 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(); + Draw(); + pCanvas = __pSearchBar->GetCanvasN(); + } + + return pCanvas; +} + +void +_SearchBarPresenter::SetHeaderVisibleState(bool visible) +{ + _Form* pForm = null; + _Control* pControlCore = __pEdit->GetParent(); + + while (true) + { + if (pControlCore == null) + { + SysLog(NID_UI_CTRL,"[E_SYSTEM] The parent form is null."); + + return; + } + + pForm = dynamic_cast<_Form*>(pControlCore); + if (pForm != null) + { + break; + } + + pControlCore = pControlCore->GetParent(); + } + + _Toolbar* pHeader = pForm->GetHeader(); + if (pHeader == null) + { + return; + } + + pHeader->SetVisibleState(visible); + + return; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_SimpleItemImpl.cpp b/src/ui/controls/FUiCtrl_SimpleItemImpl.cpp new file mode 100644 index 0000000..00789ba --- /dev/null +++ b/src/ui/controls/FUiCtrl_SimpleItemImpl.cpp @@ -0,0 +1,179 @@ +// +// 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_SimpleItemImpl.cpp + * @brief This is the implementation file for _SimpleItemImpl class. + * + * This file contains the implementation of _SimpleItemImpl class. + */ + +#include +#include +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_ResourceManager.h" +#include "FUiCtrl_ListViewItem.h" +#include "FUiCtrl_SimpleItemImpl.h" + +#ifdef MEMORY_LEAK_CHECK +#include "mem_leak_check.h" +#endif + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Graphics::_Text; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_SimpleItemImpl::_SimpleItemImpl(SimpleItem* pPublic) + : _ListItemBaseImpl(pPublic) +{ + +} + +_SimpleItemImpl::~_SimpleItemImpl(void) +{ + +} + +SimpleItem& +_SimpleItemImpl::GetPublic(void) +{ + return static_cast (_ListItemBaseImpl::GetPublic()); +} + +const SimpleItem& +_SimpleItemImpl::GetPublic(void) const +{ + return static_cast (_ListItemBaseImpl::GetPublic()); +} + +const char* +_SimpleItemImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Controls::SimpleItem"; +} + +_SimpleItemImpl* +_SimpleItemImpl::CreateSimpleItemImplN(SimpleItem* pPublic, const FloatDimension& itemSize, ListAnnexStyle style) +{ + 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] Memory allocation failed."); + + r = pImpl->Construct(itemSize, style); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[E_SYSTEM] Unable to construct _SimpleItemImpl."); + + return pImpl; + +CATCH: + delete pImpl; + pImpl = null; + + return null; +} + +result +_SimpleItemImpl::Construct(const FloatDimension& itemSize, ListAnnexStyle style) +{ + result r = _ListItemBaseImpl::Construct(itemSize, style); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + GetListViewItem()->SetListViewItemType(LISTVIEW_ITEM_TYPE_SIMPLE); + + SetLastResultReturn(r); +} + +result +_SimpleItemImpl::SetElement(const String& text, const Bitmap* pBitmap) +{ + bool ret = false; + _ListViewItem* pItem = GetListViewItem(); + + if (pItem->HasElement(LIST_ITEM_RESERVED_ID_2)) + { + ret = pItem->DeleteElement(LIST_ITEM_RESERVED_ID_2); + SysTryReturn(NID_UI_CTRL, (ret == true), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Unable to delete bitmap element."); + } + + if (pItem->HasElement(LIST_ITEM_RESERVED_ID_3)) + { + ret = pItem->DeleteElement(LIST_ITEM_RESERVED_ID_3); + SysTryReturn(NID_UI_CTRL, (ret == true), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Unable to delete text element."); + } + + FloatRectangle bitmapRect = FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle textRect = FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); + ListAnnexStyle style = GetListItemAnnexStyle(); + float leftMargin = 0.0f; + float itemHeight = GetItemSize().height; + float annexWidth = 0.0f; + float elementSpacing = 0.0f; + float textSize = 0.0f; + result r = E_SUCCESS; + + GET_SHAPE_CONFIG(LISTVIEW::ITEM_ELEMENT_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, leftMargin); + GET_SHAPE_CONFIG(LISTVIEW::ITEM_ELEMENT_SPACING, _CONTROL_ORIENTATION_PORTRAIT, elementSpacing); + GET_SHAPE_CONFIG(LISTVIEW::ITEM_DEFAULT_FONT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, textSize); + + bitmapRect.x += leftMargin; + + if (style == LIST_ANNEX_STYLE_MARK || style == LIST_ANNEX_STYLE_RADIO) + { + bitmapRect.x += GetAnnexWidth(style) + elementSpacing; + } + else + { + annexWidth = GetAnnexWidth(style); + } + + // Add Bitmap element (optional) + if (pBitmap != null) + { + float elementWidth = itemHeight * SIMPLE_ITEM_ELEMENT_BITMAP_SIZE_RATIO; + float elementHeight = elementWidth; + + bitmapRect.y = (itemHeight - elementHeight) / 2.0f; + bitmapRect.width = elementWidth; + bitmapRect.height = elementHeight; + + r = pItem->AddElement(bitmapRect, LIST_ITEM_RESERVED_ID_2, pBitmap); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + } + else + { + elementSpacing = 0.0f; + } + + // Add Text element + textRect.x = bitmapRect.x + bitmapRect.width + elementSpacing; + textRect.y = 0.0f; + textRect.width = GetItemSize().width - textRect.x - ((annexWidth > 0.0f) ? (annexWidth + leftMargin) : 0.0f); + textRect.height = itemHeight; + + r = pItem->AddElement(textRect, LIST_ITEM_RESERVED_ID_3, text); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + pItem->SetTextSize(LIST_ITEM_RESERVED_ID_3, textSize); + pItem->SetTextAlignment(LIST_ITEM_RESERVED_ID_3, TEXT_OBJECT_ALIGNMENT_MIDDLE); + + return E_SUCCESS; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_SlidableGroupedListImpl.cpp b/src/ui/controls/FUiCtrl_SlidableGroupedListImpl.cpp new file mode 100644 index 0000000..779d7d9 --- /dev/null +++ b/src/ui/controls/FUiCtrl_SlidableGroupedListImpl.cpp @@ -0,0 +1,2421 @@ +// +// 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_SlidableGroupedListImpl.cpp + * @brief This is the implementation file for the _SlidableGroupedListImpl class. + */ + +#include +#include +#include "FUiCtrl_CustomListItemFormatImpl.h" +#include "FUiCtrl_CustomListItemImpl.h" +#include "FUiCtrl_SlidableGroupedListImpl.h" +#include "FUi_ResourceManager.h" +#include "FUiCtrl_ListListener.h" +#include "FUi_UiBuilder.h" +#include "FUiCtrl_TableViewPresenter.h" +#include "FUiCtrl_FastScroll.h" +#include "FUiCtrl_FastScrollIndex.h" +#include "FUi_ResourceSizeInfo.h" +#include "FUi_CoordinateSystemUtils.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Base::Utility; + +namespace Tizen { namespace Ui { namespace Controls { + +static const int ID_FORMAT_STRING = 1; +static const int ID_FORMAT_MARGIN = 2; +extern const int INVALID_INDEX; + +_SlidableGroupedListItemProvider::_SlidableGroupedListItemProvider(_SlidableGroupedListImpl* pListImpl) + : firstTime(true) + , __pListImpl(pListImpl) + , __bottomListenerIndex(0) + , __topListenerIndex(0) +{ + if (__pListImpl != null) + { + __topListenerIndex = __pListImpl->__slidableListenersList.GetCount() - 1; + } +} + +int +_SlidableGroupedListItemProvider::GetGroupCount(void) +{ + if (__pListImpl == null) + { + return 0; + } + + if (__pListImpl->__slidableListenersList.GetCount() > 0) + { + if (firstTime == true) + { + _ListListener* pListenerData = null; + ISlidableGroupedListEventListener* pSlidableGroupedListener = null; + int listenerCount = 0; + + for (listenerCount = 0; listenerCount < __pListImpl->__slidableListenersList.GetCount(); listenerCount++) + { + pListenerData = dynamic_cast<_ListListener*>(__pListImpl->__slidableListenersList.GetAt(listenerCount)); + SysTryReturn(NID_UI_CTRL, (pListenerData != null), -1, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get _ListListener"); + + pSlidableGroupedListener = dynamic_cast(pListenerData->pListener); + SysTryReturn(NID_UI_CTRL, (pSlidableGroupedListener != null), -1, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get ISlidableGroupedListEventListener"); + + pSlidableGroupedListener->OnListPropertyRequested(__pListImpl->GetPublic()); + } + + firstTime = false; + } + return __pListImpl->GetGroupCount(); + } + return 0; + +} + +int +_SlidableGroupedListItemProvider::GetItemCount(int groupIndex) +{ + _SlidableGroupObject* pGroupObject = dynamic_cast<_SlidableGroupObject*>(__pListImpl->__groupsList.GetAt(groupIndex)); + SysTryReturn(NID_UI_CTRL, pGroupObject, 0, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get _SlidableGroupObject at index (%d).", groupIndex); + + return pGroupObject->__itemCount; +} + +TableViewGroupItem* +_SlidableGroupedListItemProvider::CreateGroupItem(int groupIndex, int itemWidth) +{ + result r = E_SUCCESS; + + _TableViewItemParams tableViewItemParams; + tableViewItemParams.pItem = __pListImpl->GetCustomListItemAt(groupIndex, -1); + tableViewItemParams.width = itemWidth; + tableViewItemParams.itemId = -1; + tableViewItemParams.groupIndex = groupIndex; + tableViewItemParams.itemIndex = -1; + tableViewItemParams.isDividerEnabled = false; + tableViewItemParams.pCheckBitmaps = null; + tableViewItemParams.annexStyle = __pListImpl->_annexStyle; + + r = _CustomListItemImpl::CreateTableViewItem(tableViewItemParams); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (GetItemCount(groupIndex) == 0 && groupIndex > __pListImpl->__topGroup) + { + __pListImpl->__bottomGroup++; + } + + if (groupIndex < __pListImpl->__topGroup) + { + __pListImpl->__topGroup = groupIndex; + } + + return __pListImpl->GetTableViewGroupItemAt(groupIndex); +} + +bool +_SlidableGroupedListItemProvider::DeleteGroupItem(int groupIndex, TableViewGroupItem* pItem) +{ + if (__pListImpl->__directDelete == false) + { + CustomListItem* pCustomListItem = __pListImpl->GetCustomListItemAt(groupIndex, -1); + pCustomListItem->__pCustomListItemImpl->__pTableViewGroupItemData = null; + } + + if (__pListImpl->GetItemCountAt(groupIndex) == 0) + { + if (groupIndex == __pListImpl->__topGroup) + { + if (__pListImpl->__topGroup < __pListImpl->__bottomGroup) + { + __pListImpl->__topGroup++; + } + } + else if (groupIndex < __pListImpl->__topGroup) + { + __pListImpl->__topGroup--; + } + if (__pListImpl->__bottomGroup != 0) + { + __pListImpl->__bottomGroup--; + } + } + + delete pItem; + + return true; +} + +bool +_SlidableGroupedListItemProvider::IsReorderable(int groupIndexFrom, int groupIndexTo) +{ + return false; +} + +int +_SlidableGroupedListItemProvider::GetDefaultGroupItemHeight(void) +{ + return __pListImpl->__groupItemHeight; +} + +int +_SlidableGroupedListItemProvider::GetDefaultItemHeight(void) +{ + CustomListItem* pCustomListItem = __pListImpl->GetCustomListItemAt(0, 0); + + if (!pCustomListItem) + { + return __pListImpl->_defaultItemHeight; + } + else + { + return pCustomListItem->__pCustomListItemImpl->height; + } +} + +void +_SlidableGroupedListItemProvider::UpdateGroupItem(int groupIndex, TableViewGroupItem* pItem) +{ +} + +void +_SlidableGroupedListItemProvider::UpdateItem(int groupIndex, int itemIndex, TableViewItem* pItem) +{ + _TableViewItemUpdateParams updateParams; + updateParams.pItem = __pListImpl->GetCustomListItemAt(groupIndex, itemIndex); + updateParams.isDividerEnabled = __pListImpl->_isDividerEnabled; + updateParams.pCheckBitmaps = __pListImpl->_pCheckBitmaps; + updateParams.annexStyle = __pListImpl->_annexStyle; + + result r = E_SUCCESS; + + r = _CustomListItemImpl::UpdateTableViewItem(updateParams); + SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to refresh an item."); + + pItem->SetEnabled(true); +} + +result +_SlidableGroupedListItemProvider::CallLoadToTopCb(int groupIndex, int itemIndex) +{ + _ListListener* pListenerData = null; + ISlidableGroupedListEventListener* pSlidableListener = null; + + pListenerData = dynamic_cast<_ListListener*>(__pListImpl->__slidableListenersList.GetAt(__topListenerIndex)); + SysTryReturn(NID_UI_CTRL, (pListenerData != null), E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get _ListListener at index (%d)", __topListenerIndex); + + pSlidableListener = dynamic_cast(pListenerData->pListener); + SysTryReturn(NID_UI_CTRL, (pSlidableListener != null), E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get ISlidableGroupedListEventListener"); + + pSlidableListener->OnLoadToTopRequested(__pListImpl->GetPublic(), groupIndex, itemIndex, 1); + + if (--__topListenerIndex < 0) + { + __topListenerIndex = __pListImpl->__slidableListenersList.GetCount() - 1; + } + + return E_SUCCESS; +} + +result +_SlidableGroupedListItemProvider::UpdateCheckStatus(int groupIndex, int itemIndex) +{ + _SlidableGroupObject* pGroupObject = dynamic_cast<_SlidableGroupObject*>(__pListImpl->__groupsList.GetAt(groupIndex)); + SysTryReturn(NID_UI_CTRL, pGroupObject, null, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get _SlidableGroupObject at index (%d).", groupIndex); + + if (__pListImpl->_annexStyle == TABLE_VIEW_ANNEX_STYLE_RADIO) + { + if (__pListImpl->_currentRadioGroupIndex == groupIndex && __pListImpl->_currentRadioIndex == itemIndex) + { + _CheckElementModel* pCheckElement = __pListImpl->GetCheckElementAt(groupIndex, itemIndex - pGroupObject->__topIndex); + + if (pCheckElement) + { + pCheckElement->SetCheckBoxStatus(CHECK_BOX_CHECKED); + } + else + { + SysLog(NID_UI_CTRL, "Group item with index %d is not loaded.", itemIndex); + } + } + } + else if (pGroupObject->__pCheckedList) + { + Boolean* pChecked = dynamic_cast(pGroupObject->__pCheckedList->GetAt(itemIndex)); + SysTryReturn(NID_UI_CTRL, pChecked, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred."); + + _CheckElementModel* pCheckElement = __pListImpl->GetCheckElementAt(groupIndex, itemIndex - pGroupObject->__topIndex); + + if (pCheckElement) + { + pCheckElement->SetCheckBoxStatus((_CheckBoxBitmapType)pChecked->ToBool()); + } + else + { + SysLog(NID_UI_CTRL, "Group item with index %d is not loaded.", itemIndex); + } + } + + return E_SUCCESS; +} + +result +_SlidableGroupedListItemProvider::ModifyIndicesAfterTopLoad(void) +{ + + if (__pListImpl->GetCurrentLoadedCount() == 2) + { + for (int index = __pListImpl->__topGroup + 1; index < __pListImpl->__groupsList.GetCount(); index++) + { + _SlidableGroupObject* pTempGroup = dynamic_cast<_SlidableGroupObject*>(__pListImpl->__groupsList.GetAt(index)); + SysTryReturn(NID_UI_CTRL, (pTempGroup != null), E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get SlidableGroupObject at index (%d).", index); + + pTempGroup->__topIndex = 0; + } + } + return E_SUCCESS; +} + +_TableViewItemData* +_SlidableGroupedListItemProvider::LoadAtTop(int groupIndex, int itemIndex) +{ + _TableViewItemData* pTableViewItemData = null; + + _SlidableGroupObject* pGroupObject = dynamic_cast<_SlidableGroupObject*>(__pListImpl->__groupsList.GetAt(groupIndex)); + SysTryReturn(NID_UI_CTRL, pGroupObject, null, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get _SlidableGroupObject at index (%d).", groupIndex); + + result r = E_SUCCESS; + CustomListItem* pCustomListItem = null; + + if (itemIndex >= pGroupObject->__topIndex) + { + pCustomListItem = __pListImpl->GetCustomListItemAt(groupIndex, itemIndex); + } + + + if (!pCustomListItem) + { + __pListImpl->__topGroup = groupIndex; + pGroupObject->__topIndex = itemIndex; + + r = CallLoadToTopCb(groupIndex, itemIndex); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + } + + pTableViewItemData = __pListImpl->GetTableViewItemAt(groupIndex, 0); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pTableViewItemData, null, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + r = UpdateCheckStatus(groupIndex, pGroupObject->__topIndex); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + r = ModifyIndicesAfterTopLoad(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + return pTableViewItemData; +} + +result +_SlidableGroupedListItemProvider::CallLoadToBottomCb(int groupIndex, int itemIndex) +{ + _ListListener* pListenerData = null; + ISlidableGroupedListEventListener* pSlidableListener = null; + + pListenerData = dynamic_cast<_ListListener*>(__pListImpl->__slidableListenersList.GetAt(__bottomListenerIndex)); + SysTryReturn(NID_UI_CTRL, (pListenerData != null), E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get _ListListener at index (%d)", __bottomListenerIndex); + + pSlidableListener = dynamic_cast(pListenerData->pListener); + SysTryReturn(NID_UI_CTRL, (pSlidableListener != null), E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get ISlidableGroupedListEventListener"); + + pSlidableListener->OnLoadToBottomRequested(__pListImpl->GetPublic(), groupIndex, itemIndex, 1); + + if (++__bottomListenerIndex == __pListImpl->__slidableListenersList.GetCount()) + { + __bottomListenerIndex = 0; + } + + return E_SUCCESS; +} + +result +_SlidableGroupedListItemProvider::ModifyIndicesAfterBottomLoad(int groupIndex, int itemIndex) +{ + if (__pListImpl->GetCurrentLoadedCount() > __pListImpl->__itemCacheSize) + { + _SlidableGroupObject* pTopGroupObject = dynamic_cast<_SlidableGroupObject*>(__pListImpl->__groupsList.GetAt(__pListImpl->__topGroup)); + SysTryReturn(NID_UI_CTRL, pTopGroupObject, E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get _SlidableGroupObject at index (%d).", __pListImpl->__topGroup); + + if (__pListImpl->GetSubItemCountAt(__pListImpl->__topGroup) == 0) + { + __pListImpl->__topGroup++; + } + } + else if (__pListImpl->GetCurrentLoadedCount() == 1) + { + __pListImpl->__topGroup = groupIndex; + __pListImpl->__bottomGroup = groupIndex; + + _SlidableGroupObject* pTopGroupObject = dynamic_cast<_SlidableGroupObject*>(__pListImpl->__groupsList.GetAt(__pListImpl->__topGroup)); + SysTryReturn(NID_UI_CTRL, pTopGroupObject, E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get _SlidableGroupObject at index (%d).", __pListImpl->__topGroup); + + pTopGroupObject->__topIndex = itemIndex; + + for (int index = 0; index < groupIndex; index++) + { + _SlidableGroupObject* pTempGroup = dynamic_cast<_SlidableGroupObject*>(__pListImpl->__groupsList.GetAt(index)); + SysTryReturn(NID_UI_CTRL, (pTempGroup != null), E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get SlidableGroupObject at index (%d).", index); + + pTempGroup->__topIndex = pTempGroup->__itemCount - 1; + } + } + + return E_SUCCESS; +} + +_TableViewItemData* +_SlidableGroupedListItemProvider::LoadAtBottom(int groupIndex, int itemIndex) +{ + _TableViewItemData* pTableViewItemData = null; + result r = E_SUCCESS; + + CustomListItem* pCustomListItem = __pListImpl->GetCustomListItemAt(groupIndex, itemIndex - __pListImpl->GetTopItemIndex(groupIndex)); + + if (!pCustomListItem) + { + __pListImpl->__bottomGroup = groupIndex; + r = CallLoadToBottomCb(groupIndex, itemIndex); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + int subItemCount = __pListImpl->GetSubItemCountAt(groupIndex); + + pTableViewItemData = __pListImpl->GetTableViewItemAt(groupIndex, subItemCount - 1); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + } + + r = UpdateCheckStatus(groupIndex, itemIndex); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + r = ModifyIndicesAfterBottomLoad(groupIndex, itemIndex); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + return pTableViewItemData; +} + +TableViewItem* +_SlidableGroupedListItemProvider::CreateItem(int groupIndex, int itemIndex, int itemWidth) +{ + _SlidableGroupObject* pGroupObject = dynamic_cast<_SlidableGroupObject*>(__pListImpl->__groupsList.GetAt(groupIndex)); + SysTryReturn(NID_UI_CTRL, pGroupObject, null, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get _SlidableGroupObject at index (%d).", groupIndex); + + _TableViewItemData* pTableViewItem = null; + result r = E_SUCCESS; + + if (groupIndex == __pListImpl->__topGroup) + { + pTableViewItem = __pListImpl->GetTableViewItemAt(groupIndex, itemIndex - pGroupObject->__topIndex); + } + else + { + pTableViewItem = __pListImpl->GetTableViewItemAt(groupIndex, itemIndex); + } + + __pListImpl->__isCreating = true; + + if (pTableViewItem == null) + { + // load at top + if (groupIndex <= __pListImpl->__topGroup && itemIndex <= pGroupObject->__topIndex) + { + pTableViewItem = LoadAtTop(groupIndex, itemIndex); + } + else // load at bottom + { + pTableViewItem = LoadAtBottom(groupIndex, itemIndex); + } + + SysTryReturn(NID_UI_CTRL, pTableViewItem, null, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + } + + __pListImpl->__isCreating = false; + + return pTableViewItem; +} + +bool +_SlidableGroupedListItemProvider::DeleteItem(int groupIndex, int itemIndex, TableViewItem* pItem) +{ + if (__pListImpl->__isUnloading == true) + { + __pListImpl->RemoveFromItemsList(groupIndex, (itemIndex - __pListImpl->GetTopItemIndex(groupIndex))); + } + else if (__pListImpl->__directDelete == false) + { + if (((groupIndex == __pListImpl->__topGroup) && (itemIndex <= __pListImpl->GetTopItemIndex(__pListImpl->__topGroup))) || (__pListImpl->__forceScroll == true)) + { + __pListImpl->RemoveFromItemsList(groupIndex, 0, false); + + _SlidableGroupObject* pGroupObject = dynamic_cast<_SlidableGroupObject*>(__pListImpl->__groupsList.GetAt(groupIndex)); + SysTryReturn(NID_UI_CTRL, pGroupObject, null, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get _SlidableGroupObject at index (%d).", groupIndex); + + pGroupObject->__topIndex++; + } + else + { + __pListImpl->RemoveFromItemsList(groupIndex, (__pListImpl->GetSubItemCountAt(groupIndex) - 1), false); + } + + __pListImpl->CallUnloadItemCb(groupIndex, itemIndex); + + _SlidableGroupObject* pGroupObject = dynamic_cast<_SlidableGroupObject*>(__pListImpl->__groupsList.GetAt(groupIndex)); + SysTryReturn(NID_UI_CTRL, pGroupObject, false, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get _SlidableGroupObject at index (%d).", groupIndex); + + // adjust top/bottom group indices + if (__pListImpl->GetSubItemCountAt(groupIndex) == 0) + { + if (groupIndex <= __pListImpl->__topGroup) + { + if (__pListImpl->__topGroup < __pListImpl->__bottomGroup) + { + __pListImpl->__topGroup++; + } + } + else + { + if (__pListImpl->__bottomGroup > __pListImpl->__topGroup) + { + __pListImpl->__bottomGroup--; + } + } + } + } + else if (__pListImpl->__isFullUpdate == true) + { + __pListImpl->RemoveFromItemsList(groupIndex, (__pListImpl->GetSubItemCountAt(groupIndex) - 1), false); + } + + delete pItem; + pItem = null; + + return true; +} + +_SlidableGroupObject::_SlidableGroupObject(void) + : __itemCount(0) + , __groupHeight(0) + , __topIndex(0) + , __pCheckedList(null) +{ +} + +_SlidableGroupObject::~_SlidableGroupObject(void) +{ + if (__pCheckedList) + { + __pCheckedList->RemoveAll(true); + delete __pCheckedList; + __pCheckedList = null; + } +} + +_SlidableGroupedListImpl* +_SlidableGroupedListImpl::GetInstance(SlidableGroupedList& slidableGroupedList) +{ + return static_cast<_SlidableGroupedListImpl*>(slidableGroupedList._pControlImpl); +} + +const _SlidableGroupedListImpl* +_SlidableGroupedListImpl::GetInstance(const SlidableGroupedList& slidableGroupedList) +{ + return static_cast(slidableGroupedList._pControlImpl); +} + +_SlidableGroupedListImpl::_SlidableGroupedListImpl(Control* pList, _TableView* pCore) + : _ListBaseImpl(pList, pCore) + , __pFastScrollListener(null) + , __bottomGroup(0) + , __topGroup(0) + , __loadedCount(0) + , __isFullUpdate(false) + , __pItemProvider(null) + , __isUnloading(false) + , __directDelete(false) + , __forceScroll(false) + , __isCreating(false) + , __groupItemTextFont(0) + , __groupItemHeight(0) + , __itemCacheSize(0) + , __pItemFormat(null) +{ +} + +_SlidableGroupedListImpl::~_SlidableGroupedListImpl(void) +{ + if (__pItemProvider && __pItemProvider->firstTime == true) + { + for (int groupIndex = 0; groupIndex < __groupsList.GetCount(); groupIndex++) + { + RemoveFromSubItemsList(groupIndex); + } + } + + RemoveAllFromItemsList(); + + __groupsList.RemoveAll(true); + __slidableListenersList.RemoveAll(true); + __itemListenersList.RemoveAll(true); + + delete __pItemProvider; + + delete __pItemFormat; +} + +_SlidableGroupedListImpl* +_SlidableGroupedListImpl::CreateSlidableGroupedListImplN(SlidableGroupedList* pControl, const Rectangle& bounds, bool itemDivider, bool fastScroll) +{ + result r = E_SUCCESS; + + r = GET_SIZE_INFO(SlidableGroupedList).CheckInitialSizeValidF(FloatDimension(bounds.width, bounds.height), _CONTROL_ORIENTATION_PORTRAIT); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + TableViewScrollBarStyle scrollStyle = TABLE_VIEW_SCROLL_BAR_STYLE_NONE; + + if (fastScroll == true) + { + scrollStyle = TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL; + } + else + { + scrollStyle = TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT; + } + + _TableView* pTableView = _TableView::CreateTableViewN(TABLE_VIEW_STYLE_GROUPED, itemDivider, scrollStyle); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pTableView, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + _SlidableGroupedListImpl* pImpl = new (std::nothrow) _SlidableGroupedListImpl(pControl, pTableView); + SysTryCatch(NID_UI_CTRL, pImpl, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = pImpl->InitializeBoundsPropertiesF(GET_SIZE_INFO(SlidableGroupedList), _CoordinateSystemUtils::ConvertToFloat(bounds), pTableView->GetOrientation()); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return pImpl; + +CATCH: + delete pTableView; + return null; +} + +void +_SlidableGroupedListImpl::AddSlidableGroupedListEventListener(ISlidableGroupedListEventListener& listener) +{ + _ListListener* pSlidableListener = new (std::nothrow) _ListListener(); + SysTryReturnVoidResult(NID_UI_CTRL, pSlidableListener, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pSlidableListener->pListener = &listener; + __slidableListenersList.Add(*pSlidableListener); +} + +void +_SlidableGroupedListImpl::RemoveSlidableGroupedListEventListener(ISlidableGroupedListEventListener& listener) +{ + _ListListener* pListenerData = null; + + IEventListener* pEventListener = dynamic_cast(&listener); + SysTryReturnVoidResult(NID_UI_CTRL, (pEventListener != null), E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get IEventListener."); + + ISlidableGroupedListEventListener* pSlidableListener = null; + + for (int listenerCount = 0; listenerCount < __slidableListenersList.GetCount(); listenerCount++) + { + pListenerData = dynamic_cast<_ListListener*>(__slidableListenersList.GetAt(listenerCount)); + SysTryReturnVoidResult(NID_UI_CTRL, (pListenerData != null), E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get _ListListener at index (%d).", listenerCount); + + pSlidableListener = dynamic_cast(pListenerData->pListener); + SysTryReturnVoidResult(NID_UI_CTRL, (pSlidableListener != null), E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get ISlidableGroupedListEventListener."); + + if (pSlidableListener == pEventListener) + { + __slidableListenersList.RemoveAt(listenerCount, true); + break; + } + } + + RemoveAllGroups(); +} + +void +_SlidableGroupedListImpl::AddFastScrollEventListener(IFastScrollEventListener& listener) +{ + __pFastScrollListener = &listener; + + GetCore().AddFastScrollListener(*this); +} + +result +_SlidableGroupedListImpl::AddGroup(const String& text, const Bitmap* pBackgroundBitmap, int itemCount, int groupHeight, int groupId) +{ + return InsertGroupAt(GetGroupCount(), text, pBackgroundBitmap, itemCount, groupHeight, groupId); +} + +void +_SlidableGroupedListImpl::AddGroupedItemEventListener(IGroupedItemEventListener& listener) +{ + _ListListener* pListenersList = new (std::nothrow) _ListListener(); + SysTryReturnVoidResult(NID_UI_CTRL, pListenersList, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pListenersList->pListener = &listener; + + __itemListenersList.Add(*pListenersList); +} + +result +_SlidableGroupedListImpl::AddItem(int groupIndex, const CustomListItem& item, int itemId) +{ + SysTryReturnResult(NID_UI_CTRL, (groupIndex >= 0 && groupIndex < __groupsList.GetCount()), + E_INVALID_ARG, "Invalid argument is used. groupIndex (%d)", groupIndex); + + _SlidableGroupObject* pGroupObject = dynamic_cast<_SlidableGroupObject*>(__groupsList.GetAt(groupIndex)); + SysTryReturnResult(NID_UI_CTRL, (pGroupObject != null), E_SYSTEM, + "A system error has occurred. Failed to get _SlidableGroupObject at index (%d).", groupIndex); + + return InsertItemAt(groupIndex, GetTopItemIndex(groupIndex) + GetSubItemCountAt(groupIndex), item, itemId); +} + +result +_SlidableGroupedListImpl::GetBottomDrawnItemIndex(int& groupIndex, int& itemIndex) const +{ + return GetCore().GetBottomDrawnItemIndex(groupIndex, itemIndex); +} + +result +_SlidableGroupedListImpl::GetFirstCheckedItemIndex(int& groupIndex, int& itemIndex) const +{ + SysTryReturnResult(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL), E_SYSTEM, + "A system error has occurred. The list style is CUSTOM_LIST_STYLE_NORMAL."); + + _SlidableGroupObject* pGroupObject = null; + Boolean* pChecked = null; + + for (int groupCount = 0; groupCount < GetGroupCount(); groupCount++) + { + pGroupObject = dynamic_cast<_SlidableGroupObject*>(const_cast(__groupsList.GetAt(groupCount))); + SysTryReturnResult(NID_UI_CTRL, (pGroupObject != null), E_SYSTEM, + "A system error has occurred. Failed to get _SlidableGroupObject at index (%d).", groupCount); + + for (int checkCount = 0; checkCount < pGroupObject->__pCheckedList->GetCount(); checkCount++) + { + pChecked = dynamic_cast(const_cast(pGroupObject->__pCheckedList->GetAt(checkCount))); + SysTryReturnResult(NID_UI_CTRL, (pChecked != null), E_SYSTEM, "A system error has occurred."); + + if (pChecked->ToBool()) + { + groupIndex = groupCount; + itemIndex = checkCount; + return E_SUCCESS; + } + } + } + + return E_SYSTEM; +} + +int +_SlidableGroupedListImpl::GetGroupIdAt(int groupIndex) const +{ + SysTryReturn(NID_UI_CTRL, (groupIndex >= 0 && groupIndex < __groupsList.GetCount()), + INVALID_INDEX, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. groupIndex (%d)", groupIndex); + + const CustomListItem* pCustomListItem = GetCustomListItemAt(groupIndex, -1); + SysTryReturn(NID_UI_CTRL, pCustomListItem, 0, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get CustomListItem at index (%d).", groupIndex); + + return pCustomListItem->__pCustomListItemImpl->itemId; +} + +int +_SlidableGroupedListImpl::GetGroupIndexFromGroupId(int groupId) const +{ + for (int groupCount = 0; groupCount < __groupsList.GetCount(); groupCount++) + { + const CustomListItem* pCustomItem = GetCustomListItemAt(groupCount, -1); + SysTryReturn(NID_UI_CTRL, pCustomItem, INVALID_INDEX, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get CustomListItem at index (%d).", groupCount); + + if (pCustomItem->__pCustomListItemImpl->itemId == groupId) + { + return groupCount; + } + } + + return INVALID_INDEX; +} + +result +_SlidableGroupedListImpl::GetFirstLoadedItemIndex(int& groupIndex, int& itemIndex) const +{ + _SlidableGroupObject* pGroupObject = dynamic_cast<_SlidableGroupObject*>(const_cast(__groupsList.GetAt(__topGroup))); + SysTryReturnResult(NID_UI_CTRL, pGroupObject, E_SYSTEM, + "A system error has occurred. Failed to get _SlidableGroupObject at index (%d).", __topGroup); + + groupIndex = __topGroup; + itemIndex = pGroupObject->__topIndex; + + return E_SUCCESS; +} + +result +_SlidableGroupedListImpl::GetLastLoadedItemIndex(int& groupIndex, int& itemIndex) const +{ + _SlidableGroupObject* pGroupObject = dynamic_cast<_SlidableGroupObject*>(const_cast(__groupsList.GetAt(__bottomGroup))); + SysTryReturnResult(NID_UI_CTRL, pGroupObject, E_SYSTEM, + "A system error has occurred. Failed to get _SlidableGroupObject at index (%d).", __bottomGroup); + + itemIndex = GetSubItemCountAt(__bottomGroup) - 1 + pGroupObject->__topIndex; + groupIndex = __bottomGroup; + + return E_SUCCESS; +} + +result +_SlidableGroupedListImpl::SetFastScrollMainIndex(const String& text) +{ + SysTryReturn(NID_UI_CTRL, (text.GetLength() > 0), E_SYSTEM, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. Text is empty."); + + SysTryReturn(NID_UI_CTRL, (GetCore().GetScrollStyle() == TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Scroll bar not enabled"); + + result r = GetCore().SetFastScrollIndex(text, false); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, r, "[%s] Propagating.", GetErrorMessage(r)); + + __mainScrollIndex = text; + + return E_SUCCESS; +} + +result +_SlidableGroupedListImpl::GetItemIndexFromPosition(const Point& position, int& groupIndex, int& itemIndex) const +{ + return GetCore().GetItemIndexFromPosition(position, groupIndex, itemIndex); +} + +result +_SlidableGroupedListImpl::GetItemIndexFromPosition(int x, int y, int& groupIndex, int& itemIndex) const +{ + return GetCore().GetItemIndexFromPosition(Point(x, y), groupIndex, itemIndex); +} + +CustomListItem* +_SlidableGroupedListImpl::CreateGroupItemN(const String& text, const Bitmap* pBackgroundBitmap, int groupId) +{ + CustomListItem* pCustomListItem = new (std::nothrow) CustomListItem(); + SysTryReturn(NID_UI_CTRL, pCustomListItem != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pCustomListItem->Construct(__groupItemHeight); + pCustomListItem->SetItemFormat(*__pItemFormat); + pCustomListItem->SetElement(ID_FORMAT_STRING, text); + pCustomListItem->SetElement(ID_FORMAT_MARGIN, ""); + + if (pBackgroundBitmap != null) + { + pCustomListItem->SetNormalItemBackgroundBitmap(*pBackgroundBitmap); + } + + pCustomListItem->__pCustomListItemImpl->itemId = groupId; + + return pCustomListItem; +} + +result +_SlidableGroupedListImpl::CreateGroupObject(int groupIndex, int itemCount, int groupHeight) +{ + _SlidableGroupObject* pGroupObject = new (std::nothrow) _SlidableGroupObject(); + SysTryReturn(NID_UI_CTRL, pGroupObject != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + __groupsList.InsertAt(*pGroupObject, groupIndex); + + if (_annexStyle == TABLE_VIEW_ANNEX_STYLE_MARK || _annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING || _annexStyle == TABLE_VIEW_ANNEX_STYLE_RADIO) + { + pGroupObject->__pCheckedList = new (std::nothrow) ArrayList(); + SysTryReturn(NID_UI_CTRL, pGroupObject->__pCheckedList, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed"); + + pGroupObject->__pCheckedList->Construct(itemCount); + + Boolean* pChecked = null; + + for (int count = 0; count < itemCount; count++) + { + 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"); + pGroupObject->__pCheckedList->Add(*pChecked); + } + } + + pGroupObject->__groupHeight = groupHeight; + pGroupObject->__itemCount = itemCount; + + return E_SUCCESS; +} + +result +_SlidableGroupedListImpl::InsertGroupAt(int groupIndex, const String& text, const Bitmap* pBackgroundBitmap, int itemCount, int groupHeight, int groupId) +{ + result r = E_SUCCESS; + + SysTryReturn(NID_UI_CTRL, (groupIndex >= 0 && groupIndex <= __groupsList.GetCount()), + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. groupIndex (%d)", groupIndex); + + r = CreateGroupObject(groupIndex, itemCount, groupHeight); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + CustomListItem* pCustomListItem = CreateGroupItemN(text, pBackgroundBitmap, groupId); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = InsertIntoItemsList(*pCustomListItem, groupIndex, -1); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __loadedCount += itemCount; + + if (__slidableListenersList.GetCount() == 0) + { + return E_SUCCESS; + } + + if (groupIndex <= __bottomGroup) + { + __bottomGroup++; + } + + if (groupIndex < __topGroup) + { + __topGroup++; + _SlidableGroupObject* pGroupObject = dynamic_cast<_SlidableGroupObject*>(const_cast(__groupsList.GetAt(groupIndex))); + SysTryReturn(NID_UI_CTRL, pGroupObject, null, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get _SlidableGroupObject at index (%d).", groupIndex); + + pGroupObject->__topIndex = itemCount - 1; + } + + if (__pItemProvider == null) + { + r = CreateItemProvider(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + _ListBaseImpl::OnDraw(); + } + else + { + r = GetCore().RefreshTableView(groupIndex, -1, TABLE_VIEW_REFRESH_TYPE_ITEM_ADD); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to insert a group."); + } + + return E_SUCCESS; +} + +result +_SlidableGroupedListImpl::GetLastCheckedItemIndex(int& groupIndex, int& itemIndex) const +{ + SysTryReturn(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL), E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. The list style is CUSTOM_LIST_STYLE_NORMAL."); + + for (int groupCount = __groupsList.GetCount() - 1; groupCount >= 0; groupCount--) + { + int subItemCount = GetSubItemCountAt(groupCount); + + for (int itemCount = subItemCount - 1; itemCount >= 0; itemCount--) + { + if (IsItemChecked(groupCount, itemCount)) + { + itemIndex = itemCount; + groupIndex = groupCount; + return E_SUCCESS; + } + } + } + + return E_SYSTEM; +} + +const CustomListItem* +_SlidableGroupedListImpl::GetLoadedItemAt(int groupIndex, int index) const +{ + SysTryReturn(NID_UI_CTRL, (groupIndex >= __topGroup && groupIndex <= __bottomGroup), null, E_INVALID_ARG, + "[E_INVALID_ARG] Invalid argument is used. groupIndex (%d) is not loaded or invalid.", groupIndex); + + _SlidableGroupObject* pGroupObject = dynamic_cast<_SlidableGroupObject*>(const_cast(__groupsList.GetAt(groupIndex))); + SysTryReturn(NID_UI_CTRL, pGroupObject, null, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get _SlidableGroupObject at index (%d).", groupIndex); + + SysTryReturn(NID_UI_CTRL, (index >= 0 && index < GetSubItemCountAt(groupIndex)), + null, E_INVALID_ARG, "[E_INVALID_ARG] invalid index(%d)", index); + + const CustomListItem* pSubListItem = GetCustomListItemAt(groupIndex, index); + SysTryReturn(NID_UI_CTRL, pSubListItem, null, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get CustomListItem at index (%d).", index); + + return pSubListItem; +} + +int +_SlidableGroupedListImpl::GetLoadedItemIdAt(int groupIndex, int index) const +{ + const CustomListItem* pCustomListItem = GetLoadedItemAt(groupIndex, index - GetTopItemIndex(groupIndex)); + SysTryReturn(NID_UI_CTRL, pCustomListItem, INVALID_INDEX, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. "); + + return pCustomListItem->__pCustomListItemImpl->itemId; +} + +result +_SlidableGroupedListImpl::GetNextCheckedItemIndexAfter(int& groupIndex, int& index) const +{ + SysTryReturn(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL), E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. The list style is CUSTOM_LIST_STYLE_NORMAL."); + + SysTryReturn(NID_UI_CTRL, (groupIndex >= 0 && groupIndex < __groupsList.GetCount()), E_SYSTEM, E_INVALID_ARG, + "[E_INVALID_ARG] Invalid argument is used. groupIndex (%d).", groupIndex); + + int subItemCount = GetSubItemCountAt(groupIndex); + + SysTryReturn(NID_UI_CTRL, (index >= 0 && index < subItemCount), + E_SYSTEM, E_SYSTEM, "[E_INVALID_ARG] Invalid argument is used. index (%d).", index); + + int itemStart = 0; + + for (int groupCount = groupIndex; groupCount < __groupsList.GetCount(); groupCount++) + { + if (groupCount == groupIndex) + { + itemStart = index + 1; + } + else + { + itemStart = 0; + } + + subItemCount = GetSubItemCountAt(groupIndex); + for (int checkCount = itemStart; checkCount < subItemCount; checkCount++) + { + if (IsItemChecked(groupCount, checkCount)) + { + groupIndex = groupCount; + index = checkCount; + return E_SUCCESS; + } + } + + itemStart = 0; + } + + return E_SUCCESS; +} + +result +_SlidableGroupedListImpl::GetTopDrawnItemIndex(int& groupIndex, int& itemIndex) const +{ + return GetCore().GetTopDrawnItemIndex(groupIndex, itemIndex); +} + +bool +_SlidableGroupedListImpl::IsItemChecked(int groupIndex, int index) const +{ + SysTryReturn(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL), false, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. The list style is CUSTOM_LIST_STYLE_NORMAL."); + + SysTryReturn(NID_UI_CTRL, (groupIndex >= 0 && groupIndex < __groupsList.GetCount()), + false, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. groupIndex (%d).", groupIndex); + + if (_annexStyle == TABLE_VIEW_ANNEX_STYLE_RADIO) + { + if (groupIndex == _currentRadioGroupIndex && index == _currentRadioIndex) + { + return true; + } + else + { + return false; + } + } + else + { + _SlidableGroupObject* pGroupObject = dynamic_cast<_SlidableGroupObject*>(const_cast(__groupsList.GetAt(groupIndex))); + SysTryReturn(NID_UI_CTRL, pGroupObject, false, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get _SlidableGroupObject at index (%d).", groupIndex); + + Boolean* pChecked = dynamic_cast(const_cast(pGroupObject->__pCheckedList->GetAt(index))); + SysTryReturn(NID_UI_CTRL, pChecked, false, E_SYSTEM, "[E_SYSTEM] A system error has occurred."); + + return pChecked->ToBool(); + } +} + +bool +_SlidableGroupedListImpl::IsItemLoaded(int groupIndex, int itemIndex) const +{ + if (groupIndex < __topGroup || groupIndex > __bottomGroup) + { + return false; + } + + else if (groupIndex == __topGroup) + { + _SlidableGroupObject* pGroupObject = dynamic_cast<_SlidableGroupObject*>(const_cast(__groupsList.GetAt(groupIndex))); + SysTryReturn(NID_UI_CTRL, pGroupObject, E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get _SlidableGroupObject at index (%d).", groupIndex); + + if (itemIndex >= pGroupObject->__topIndex && itemIndex <= pGroupObject->__itemCount) + { + return true; + } + + return false; + } + else if (groupIndex == __bottomGroup) + { + _SlidableGroupObject* pGroupObject = dynamic_cast<_SlidableGroupObject*>(const_cast(__groupsList.GetAt(groupIndex))); + SysTryReturn(NID_UI_CTRL, pGroupObject, E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get _SlidableGroupObject at index (%d).", groupIndex); + + if (itemIndex >= 0 && itemIndex < pGroupObject->__itemCount) + { + return true; + } + + return false; + } + + return true; +} + +result +_SlidableGroupedListImpl::RemoveAllGroups(void) +{ + for (int groupCount = __groupsList.GetCount() - 1; groupCount >= 0; groupCount--) + { + RemoveGroupAt(groupCount); + } + + return E_SUCCESS; +} + +result +_SlidableGroupedListImpl::InsertItemAt(int groupIndex, int index, const CustomListItem& item, int itemId) +{ + result r = E_SUCCESS; + + SysTryReturn(NID_UI_CTRL, (groupIndex >= 0 && groupIndex < __groupsList.GetCount()), + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. groupIndex (%d).", groupIndex); + + + _TableViewItemParams tableViewItemParams; + tableViewItemParams.pItem = (const_cast(&item)); + tableViewItemParams.width = GetCore().GetBoundsF().width; + tableViewItemParams.itemIndex = index; + tableViewItemParams.groupIndex = -1; + tableViewItemParams.isDividerEnabled = _isDividerEnabled; + tableViewItemParams.pCheckBitmaps = _pCheckBitmaps; + tableViewItemParams.annexStyle = _annexStyle; + + item.__pCustomListItemImpl->itemId = itemId; + + r = _CustomListItemImpl::CreateTableViewItem(tableViewItemParams); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. Failed to create an item.", GetErrorMessage(r)); + + int subItemCount = GetSubItemCountAt(groupIndex); + if (index < (subItemCount + GetTopItemIndex(groupIndex)) && (index >= GetTopItemIndex(groupIndex))) + { + r = InsertIntoItemsList(item, groupIndex, (index - GetTopItemIndex(groupIndex))); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + } + + _SlidableGroupObject* pGroupObject = dynamic_cast<_SlidableGroupObject*>(const_cast(__groupsList.GetAt(groupIndex))); + SysTryReturn(NID_UI_CTRL, pGroupObject, E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get _SlidableGroupObject at index (%d).", groupIndex); + + pGroupObject->__itemCount++; + + if (pGroupObject->__pCheckedList) + { + Boolean* pChecked = new (std::nothrow) Boolean(false); + SysTryCatch(NID_UI_CTRL, pChecked, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pGroupObject->__pCheckedList->InsertAt(*pChecked, index); + } + + if (GetCore().GetFirstDrawnFlag() == false) + { + r = GetCore().RefreshTableView(groupIndex, index, TABLE_VIEW_REFRESH_TYPE_ITEM_ADD); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to perform InsertItemAt groupIndex (%d), index (%d).", groupIndex, index); + } + + return E_SUCCESS; + +CATCH: + if (pGroupObject->__pCheckedList) + { + pGroupObject->__pCheckedList->RemoveAt(index, true); + } + RemoveFromItemsList(groupIndex, (index - GetTopItemIndex(groupIndex))); + + return E_SYSTEM; +} + +int +_SlidableGroupedListImpl::GetItemCountAt(int groupIndex) const +{ + SysTryReturn(NID_UI_CTRL, (groupIndex >= 0 && groupIndex < __groupsList.GetCount()), + 0, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. groupIndex (%d).", groupIndex); + + _SlidableGroupObject* pGroupObject = dynamic_cast<_SlidableGroupObject*>(const_cast(__groupsList.GetAt(groupIndex))); + SysTryReturn(NID_UI_CTRL, pGroupObject, 0, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get _SlidableGroupObject at index (%d).", groupIndex); + return pGroupObject->__itemCount; +} + +result +_SlidableGroupedListImpl::RefreshItem(int groupIndex, int index) +{ + SysTryReturn(NID_UI_CTRL, (groupIndex >= 0 && groupIndex < __groupsList.GetCount()), + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. groupIndex (%d).", groupIndex); + + int topItemIndex = -1; + int bottomItemIndex = -1; + int groupTopIndex = -1; + + GetCore().GetTopDrawnItemIndex(groupTopIndex, topItemIndex); + GetCore().GetBottomDrawnItemIndex(groupTopIndex, bottomItemIndex); + + SysTryReturn(NID_UI_CTRL, (index >= topItemIndex && index <= bottomItemIndex), E_INVALID_OPERATION, E_INVALID_OPERATION, + "Index (%d) should be within drawn item range.", index); + + result r = E_SUCCESS; + + _TableViewItemUpdateParams updateParams; + updateParams.pItem = GetCustomListItemAt(groupIndex, index); + updateParams.isDividerEnabled = _isDividerEnabled; + updateParams.pCheckBitmaps = _pCheckBitmaps; + updateParams.annexStyle = _annexStyle; + + r = _CustomListItemImpl::UpdateTableViewItem(updateParams); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, + "A system error has occurred. Failed to perform RefreshItem at groupIndex (%d), index (%d).", groupIndex, index); + + DrawItem(groupIndex, index); + + return E_SUCCESS; +} + +result +_SlidableGroupedListImpl::RefreshGroup(int groupIndex) +{ + SysTryReturn(NID_UI_CTRL, (groupIndex >= 0 && groupIndex < __groupsList.GetCount()), + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. groupIndex (%d).", groupIndex); + + _SlidableGroupObject* pGroupObject = dynamic_cast<_SlidableGroupObject*>(__groupsList.GetAt(groupIndex)); + SysTryReturn(NID_UI_CTRL, pGroupObject, E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get _SlidableGroupObject at index (%d).", groupIndex); + + int topIndex = GetTopItemIndex(groupIndex); + int subItemCount = GetSubItemCountAt(groupIndex); + + for (int itemCount = topIndex; itemCount < topIndex + subItemCount; itemCount++) + { + RefreshItem(groupIndex, itemCount); + } + + return E_SUCCESS; + +} + +bool +_SlidableGroupedListImpl::IsLoadedItemEnabled(int groupIndex, int index) const +{ + if (IsItemLoaded(groupIndex, index) == false) + { + return false; + } + + return GetCore().IsItemEnabled(groupIndex, index); +} + +result +_SlidableGroupedListImpl::LoadItemToBottom(const CustomListItem& item, int itemId) +{ + SysTryReturn(NID_UI_CTRL, __isCreating == true, E_SUCCESS, E_SUCCESS, + "[E_SUCCESS] This operation is ignored during creation of list."); + + int itemIndex = GetSubItemCountAt(__bottomGroup); + int topIndex = GetTopItemIndex(__bottomGroup); + + _TableViewItemParams tableViewItemParams; + tableViewItemParams.pItem = (const_cast(&item)); + tableViewItemParams.width = GetCore().GetBoundsF().width; + tableViewItemParams.groupIndex = __bottomGroup; + tableViewItemParams.itemIndex = (itemIndex + topIndex); + tableViewItemParams.isDividerEnabled = _isDividerEnabled; + tableViewItemParams.pCheckBitmaps = _pCheckBitmaps; + tableViewItemParams.itemId = itemId; + tableViewItemParams.annexStyle = _annexStyle; + + result r = _CustomListItemImpl::CreateTableViewItem(tableViewItemParams); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + item.__pCustomListItemImpl->itemId = itemId; + + r = InsertIntoItemsList(item, __bottomGroup, itemIndex, false); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +_SlidableGroupedListImpl::LoadItemToTop(const CustomListItem& item, int itemId) +{ + SysTryReturn(NID_UI_CTRL, __isCreating == true, E_SUCCESS, E_SUCCESS, + "[E_SUCCESS] This operation is ignored during creation of list."); + + _SlidableGroupObject* pGroupObject = dynamic_cast<_SlidableGroupObject*>(__groupsList.GetAt(__topGroup)); + SysTryReturn(NID_UI_CTRL, pGroupObject, E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get _SlidableGroupObject at index (%d).", __topGroup); + + _TableViewItemParams tableViewItemParams; + tableViewItemParams.pItem = (const_cast(&item)); + tableViewItemParams.width = GetCore().GetBoundsF().width; + tableViewItemParams.itemId = itemId; + tableViewItemParams.itemIndex = pGroupObject->__topIndex; + tableViewItemParams.groupIndex = __topGroup; + tableViewItemParams.isDividerEnabled = _isDividerEnabled; + tableViewItemParams.pCheckBitmaps = _pCheckBitmaps; + tableViewItemParams.annexStyle = _annexStyle; + + result r = _CustomListItemImpl::CreateTableViewItem(tableViewItemParams); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + item.__pCustomListItemImpl->itemId = itemId; + + r = InsertIntoItemsList(item, __topGroup, 0, false); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +_SlidableGroupedListImpl::GetLoadedItemIndexFromItemId(int itemId, int& groupIndex, int& itemIndex) const +{ + for (int groupCount = __topGroup; groupCount <= __bottomGroup; groupCount++) + { + for (int itemCount = 0; itemCount < GetSubItemCountAt(groupCount); itemCount++) + { + const CustomListItem* pItem = GetCustomListItemAt(groupCount, itemCount); + if (!pItem) + { + continue; + } + + if (pItem->__pCustomListItemImpl->itemId == itemId) + { + groupIndex = groupCount; + itemIndex = itemCount; + return E_SUCCESS; + } + } + } + + groupIndex = -1; + itemIndex = -1; + + return E_SYSTEM; +} + +result +_SlidableGroupedListImpl::UnloadAllItems(void) +{ + result r = E_SUCCESS; + int itemCount = 0; + int groupCount = 0; + int itemIndex = 0; + + SysTryReturn(NID_UI_CTRL, __pItemProvider, E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. ISlidableGroupedListEventListener not set."); + + for (groupCount = __groupsList.GetCount() - 1; groupCount >= 0; groupCount--) + { + itemCount = GetSubItemCountAt(groupCount); + + for (itemIndex = itemCount - 1; itemIndex >= 0; itemIndex--) + { + __isUnloading = true; + + r = GetCore().RefreshTableView(groupCount, (itemIndex + GetTopItemIndex(groupCount)), TABLE_VIEW_REFRESH_TYPE_ITEM_REMOVE); + + __isUnloading = false; + if (r != E_SUCCESS) + { + SysLog(NID_UI_CTRL, "Group item with index %d not removed successFully.", groupCount); + } + + _SlidableGroupObject* pGroupObject = dynamic_cast<_SlidableGroupObject*>(__groupsList.GetAt(groupCount)); + SysTryReturn(NID_UI_CTRL, pGroupObject, E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get _SlidableGroupObject at index (%d).", groupCount); + + if (pGroupObject->__pCheckedList != null) + { + pGroupObject->__pCheckedList->RemoveAt(itemIndex, true); + } + + CallUnloadItemCb(groupCount, itemIndex); + } + } + + return E_SUCCESS; +} + +result +_SlidableGroupedListImpl::RemoveAllCheckedItemsAt(int groupIndex, int itemHeight) +{ + SysTryReturn(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL), E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. The list style is CUSTOM_LIST_STYLE_NORMAL."); + SysTryReturn(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_RADIO), E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. The list style is CUSTOM_LIST_STYLE_RADIO."); + + SysTryReturn(NID_UI_CTRL, __pItemProvider, E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. ISlidableGroupedListEventListener not set."); + + SysTryReturn(NID_UI_CTRL, (groupIndex >= 0 && groupIndex < __groupsList.GetCount()), + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. groupIndex (%d).", groupIndex); + + _SlidableGroupObject* pGroupObject = dynamic_cast<_SlidableGroupObject*>(__groupsList.GetAt(groupIndex)); + SysTryReturn(NID_UI_CTRL, pGroupObject, E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get _SlidableGroupObject at index (%d).", groupIndex); + + Boolean* pChecked = null; + int itemIndex = 0; + + for (itemIndex = (GetItemCountAt(groupIndex) - 1); itemIndex >= 0; itemIndex--) + { + pChecked = dynamic_cast(pGroupObject->__pCheckedList->GetAt(itemIndex)); + + if (pChecked && pChecked->ToBool() == true) + { + RemoveItemAt(groupIndex, itemIndex, 0); + } + } + + return E_SUCCESS; +} + +result +_SlidableGroupedListImpl::RemoveAllCheckedItems(int itemHeight) +{ + SysTryReturn(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL), E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. The list style is CUSTOM_LIST_STYLE_NORMAL."); + SysTryReturn(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_RADIO), E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. The list style is CUSTOM_LIST_STYLE_RADIO."); + + SysTryReturn(NID_UI_CTRL, __pItemProvider, E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. ISlidableGroupedListEventListener not set."); + + int groupCount = 0; + + for (; groupCount < __groupsList.GetCount(); groupCount++) + { + RemoveAllCheckedItemsAt(groupCount, itemHeight); + } + + return E_SUCCESS; +} + +result +_SlidableGroupedListImpl::RemoveAllItemsAt(int groupIndex) +{ + + SysTryReturn(NID_UI_CTRL, (groupIndex >= 0 && groupIndex < __groupsList.GetCount()), + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. groupIndex (%d).", groupIndex); + + int itemIndex = 0; + + for (itemIndex = (GetItemCountAt(groupIndex) - 1); itemIndex >= 0; itemIndex--) + { + RemoveItemAt(groupIndex, itemIndex, 0); + } + + return E_SUCCESS; +} + +result +_SlidableGroupedListImpl::RemoveAllItems(void) +{ + SysTryReturn(NID_UI_CTRL, __pItemProvider, E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. ISlidableGroupedListEventListener not set."); + + int groupCount = 0; + + for (groupCount = 0; groupCount < __groupsList.GetCount(); groupCount++) + { + _SlidableGroupObject* pGroupObject = dynamic_cast<_SlidableGroupObject*>(__groupsList.GetAt(groupCount)); + SysTryReturn(NID_UI_CTRL, pGroupObject, 0, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get _SlidableGroupObject at index (%d).", groupCount); + + pGroupObject->__itemCount = 0; + pGroupObject->__topIndex = 0; + + } + + __isFullUpdate = true; + GetCore().UpdateTableView(); + __isFullUpdate = false; + + __pItemProvider->firstTime = true; + __topGroup = 0; + return E_SUCCESS; +} + +void +_SlidableGroupedListImpl::RemoveFastScrollEventListener(IFastScrollEventListener& listener) +{ + __pFastScrollListener = null; +} + +void +_SlidableGroupedListImpl::RemoveGroupedItemEventListener(IGroupedItemEventListener& listener) +{ + _ListListener* pListenerList = null; + + for (int listenerCount = 0; listenerCount < __itemListenersList.GetCount(); listenerCount++) + { + pListenerList = dynamic_cast<_ListListener*>(__itemListenersList.GetAt(listenerCount)); + + if ((pListenerList != null) && (pListenerList->pListener == &listener)) + { + __itemListenersList.RemoveAt(listenerCount, true); + break; + } + } +} + +result +_SlidableGroupedListImpl::RemoveItemAt(int groupIndex, int index, int itemHeight) +{ + SysTryReturn(NID_UI_CTRL, (groupIndex >= 0 && groupIndex < __groupsList.GetCount()), + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. groupIndex (%d).", groupIndex); + + _SlidableGroupObject* pGroupObject = dynamic_cast<_SlidableGroupObject*>(__groupsList.GetAt(groupIndex)); + SysTryReturn(NID_UI_CTRL, pGroupObject, E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get _SlidableGroupObject at index (%d).", groupIndex); + + int subItemCount = GetSubItemCountAt(groupIndex); + + SysTryReturn(NID_UI_CTRL, (index >= 0 && index < pGroupObject->__itemCount), + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. index (%d).", index); + + __directDelete = true; + + if (pGroupObject->__pCheckedList != null) + { + pGroupObject->__pCheckedList->RemoveAt(index, true); + } + + if (index < (subItemCount + pGroupObject->__topIndex) && (index >= pGroupObject->__topIndex)) + { + RemoveFromItemsList(groupIndex, (index - pGroupObject->__topIndex)); + } + + result r = GetCore().RefreshTableView(groupIndex, index, TABLE_VIEW_REFRESH_TYPE_ITEM_REMOVE); + if (r != E_SUCCESS) + { + SysLog(NID_UI_CTRL, "Group item with index %d not removed successFully.", groupIndex); + } + + __directDelete = false; + + CallUnloadItemCb(groupIndex, index); + pGroupObject->__itemCount--; + + return E_SUCCESS; +} + +result +_SlidableGroupedListImpl::RemoveGroupAt(int groupIndex) +{ + SysTryReturn(NID_UI_CTRL, (groupIndex >= 0 && groupIndex < __groupsList.GetCount()), + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. groupIndex (%d).", groupIndex); + + result r = E_SUCCESS; + + r = RemoveFromSubItemsList(groupIndex); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = RemoveFromItemsList(groupIndex, -1); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, r, "[%s] Propagating.", GetErrorMessage(r)); + + __groupsList.RemoveAt(groupIndex, true); + + __directDelete = true; + + if (GetCore().GetFirstDrawnFlag() == false) + { + r = GetCore().RefreshTableView(groupIndex, -1, TABLE_VIEW_REFRESH_TYPE_ITEM_REMOVE); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + __directDelete = false; + + return E_SUCCESS; +} + +void +_SlidableGroupedListImpl::ScrollToBottom(void) +{ + SysTryReturnVoidResult(NID_UI_CTRL, (__slidableListenersList.GetCount() > 0), E_SYSTEM, + "[E_SYSTEM] A system error has occurred. No listeners available."); + + __forceScroll = true; + + _SlidableGroupObject* pGroupObject = dynamic_cast<_SlidableGroupObject*>(__groupsList.GetAt(__groupsList.GetCount() - 1)); + SysTryReturnVoidResult(NID_UI_CTRL, pGroupObject, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get _SlidableGroupObject at index (%d).", __groupsList.GetCount() - 1); + + result r = GetCore().SetBottomDrawnItemIndex(__groupsList.GetCount() - 1, pGroupObject->__itemCount - 1); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + __forceScroll = false; + + GetCore().Draw(); +} + +result +_SlidableGroupedListImpl::ScrollToTop(int groupIndex) +{ + SysTryReturnResult(NID_UI_CTRL, (__slidableListenersList.GetCount() > 0), E_SYSTEM, + "[E_SYSTEM] A system error has occurred. No listeners available."); + + SysTryReturn(NID_UI_CTRL, (groupIndex >= 0 && groupIndex < __groupsList.GetCount()), + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. groupIndex (%d).", groupIndex); + + result r = E_SUCCESS; + + __forceScroll = true; + + r = GetCore().SetTopDrawnItemIndex(groupIndex, -1); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + GetCore().Draw(); + + __forceScroll = false; + + return E_SUCCESS; +} + +result +_SlidableGroupedListImpl::ScrollToTop(int groupIndex, int itemIndex) +{ + SysTryReturnResult(NID_UI_CTRL, (__slidableListenersList.GetCount() > 0), E_SYSTEM, + "[E_SYSTEM] A system error has occurred. No listeners available."); + + SysTryReturn(NID_UI_CTRL, (groupIndex >= 0 && groupIndex < __groupsList.GetCount()), + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. groupIndex (%d).", groupIndex); + + _SlidableGroupObject* pGroupObject = dynamic_cast<_SlidableGroupObject*>(__groupsList.GetAt(groupIndex)); + SysTryReturn(NID_UI_CTRL, pGroupObject, E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get _SlidableGroupObject at index (%d).", groupIndex); + + SysTryReturn(NID_UI_CTRL, (itemIndex >= 0 && itemIndex < pGroupObject->__itemCount), + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. itemIndex (%d).", itemIndex); + + result r = E_SUCCESS; + + __forceScroll = true; + + r = GetCore().SetTopDrawnItemIndex(groupIndex, itemIndex); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + GetCore().Draw(); + + __forceScroll = false; + + return E_SUCCESS; +} + +void +_SlidableGroupedListImpl::ScrollToTop(void) +{ + SysTryReturnVoidResult(NID_UI_CTRL, (__slidableListenersList.GetCount() > 0), E_SYSTEM, + "[E_SYSTEM] A system error has occurred. No listeners available."); + + __forceScroll = true; + + result r = GetCore().SetTopDrawnItemIndex(0, -1); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + GetCore().Draw(); + + __forceScroll = false; +} + +result +_SlidableGroupedListImpl::SetAllItemsChecked(int groupIndex, bool check) +{ + SysTryReturn(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL), E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. The list style is CUSTOM_LIST_STYLE_NORMAL."); + SysTryReturn(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_RADIO), E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. The list style is CUSTOM_LIST_STYLE_RADIO."); + + SysTryReturn(NID_UI_CTRL, (groupIndex >= 0 && groupIndex < GetGroupCount()), + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. groupIndex (%d).", groupIndex); + + _SlidableGroupObject* pGroupObject = dynamic_cast<_SlidableGroupObject*>(__groupsList.GetAt(groupIndex)); + SysTryReturn(NID_UI_CTRL, pGroupObject, E_SYSTEM, E_SYSTEM, "[E_SYSTEM]"); + + for (int indexItem = 0; indexItem < pGroupObject->__itemCount; indexItem++) + { + Boolean* pChecked = new (std::nothrow) Boolean(check); + SysTryReturn(NID_UI_CTRL, pChecked, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed"); + + pGroupObject->__pCheckedList->SetAt(*pChecked, indexItem, true); + + _CheckElementModel* pCheckElement = GetCheckElementAt(groupIndex, indexItem); + + if (pCheckElement) + { + pCheckElement->SetCheckBoxStatus((_CheckBoxBitmapType)check); + } + else + { + SysLog(NID_UI_CTRL, "Group item with index %d is not loaded.", indexItem); + } + } + + GetCore().Invalidate(true); + + return E_SUCCESS; +} + +result +_SlidableGroupedListImpl::SetItemAt(int groupIndex, int itemIndex, const CustomListItem& item, int itemId) +{ + SysTryReturn(NID_UI_CTRL, (groupIndex >= 0 && groupIndex < __groupsList.GetCount()), + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. groupIndex (%d).", groupIndex); + + SysTryReturn(NID_UI_CTRL, ((itemIndex >= 0) && (itemIndex < GetSubItemCountAt(groupIndex))), + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. itemIndex (%d).", itemIndex); + + SysTryReturnResult(NID_UI_CTRL, (IsItemNew(item) == true), E_SYSTEM, "[E_SYSTEM] A system error has occurred. The item already exists."); + + _CheckElementModel* pOldCheckElement = GetCheckElementAt(groupIndex, itemIndex - GetTopItemIndex(groupIndex)); + _CheckElementModel* pNewCheckElement = item.__pCustomListItemImpl->GetCheckElement(); + + if (pNewCheckElement && pOldCheckElement) + { + pNewCheckElement->SetCheckBoxStatus(pOldCheckElement->GetCheckBoxStatus()); + } + + item.__pCustomListItemImpl->__pTableViewItemData = GetTableViewItemAt(groupIndex, itemIndex); + item.__pCustomListItemImpl->itemId = itemId; + + result r = SetInItemsList(item, groupIndex, itemIndex); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GetCore().RefreshTableView(groupIndex, itemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +_SlidableGroupedListImpl::UpdateCheckedList(int groupIndex, int index, bool check) +{ + _SlidableGroupObject* pGroupObject = dynamic_cast<_SlidableGroupObject*>(__groupsList.GetAt(groupIndex)); + SysTryReturn(NID_UI_CTRL, (pGroupObject != null), E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get _SlidableGroupObject at groupIndex (%d).", groupIndex); + + SysTryReturn(NID_UI_CTRL, (pGroupObject->__pCheckedList != null), E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get checked list at groupIndex (%d).", groupIndex); + + Boolean* pChecked = new (std::nothrow) Boolean(check); + SysTryReturn(NID_UI_CTRL, pChecked, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + pGroupObject->__pCheckedList->SetAt(*pChecked, index, true); + + return E_SUCCESS; +} + +result +_SlidableGroupedListImpl::SetItemCheckedRadio(int groupIndex, int index, bool check) +{ + + _SlidableGroupObject* pGroupObject = dynamic_cast<_SlidableGroupObject*>(const_cast(__groupsList.GetAt(groupIndex))); + SysTryReturn(NID_UI_CTRL, pGroupObject, INVALID_INDEX, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get _SlidableGroupObject at groupIndex (%d).", groupIndex); + + _CheckElementModel* pCheckElement = GetCheckElementAt(groupIndex, (index - pGroupObject->__topIndex)); + SysTryReturnResult(NID_UI_CTRL, (pCheckElement != null), E_SYSTEM, "A system error has occurred. Checkbox element not created"); + + if (check) + { + if (_currentRadioIndex != -1) + { + _CheckElementModel* pOldCheckElement = GetCheckElementAt(_currentRadioGroupIndex, (_currentRadioIndex - pGroupObject->__topIndex)); + + if (pOldCheckElement) + { + pOldCheckElement->SetCheckBoxStatus(CHECK_BOX_UNCHECKED); + DrawItem(_currentRadioGroupIndex, (_currentRadioIndex - pGroupObject->__topIndex)); + } + } + + _currentRadioGroupIndex = groupIndex; + _currentRadioIndex = index; + } + else + { + _currentRadioGroupIndex = -1; + _currentRadioIndex = -1; + } + pCheckElement->SetCheckBoxStatus((_CheckBoxBitmapType)check); + DrawItem(groupIndex, index - pGroupObject->__topIndex); + + return E_SUCCESS; +} + +result +_SlidableGroupedListImpl::SetItemCheckedMarkOnOff(int groupIndex, int index, bool check) +{ + + _SlidableGroupObject* pGroupObject = dynamic_cast<_SlidableGroupObject*>(const_cast(__groupsList.GetAt(groupIndex))); + SysTryReturn(NID_UI_CTRL, pGroupObject, INVALID_INDEX, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get _SlidableGroupObject at groupIndex (%d).", groupIndex); + + _CheckElementModel* pCheckElement = GetCheckElementAt(groupIndex, (index - pGroupObject->__topIndex)); + SysTryReturnResult(NID_UI_CTRL, (pCheckElement != null), E_SYSTEM, "A system error has occurred."); + + pCheckElement->SetCheckBoxStatus((_CheckBoxBitmapType)check); + + UpdateCheckedList(groupIndex, index, check); + + DrawItem(groupIndex, index - pGroupObject->__topIndex); + + return E_SUCCESS; +} + +result +_SlidableGroupedListImpl::SetItemChecked(int groupIndex, int index, bool check) +{ + SysTryReturn(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL), E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. The list style is CUSTOM_LIST_STYLE_NORMAL."); + + SysTryReturn(NID_UI_CTRL, (groupIndex >= 0 && groupIndex < __groupsList.GetCount()), + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. groupIndex (%d).", groupIndex); + + _SlidableGroupObject* pGroupObject = dynamic_cast<_SlidableGroupObject*>(__groupsList.GetAt(groupIndex)); + SysTryReturn(NID_UI_CTRL, (pGroupObject != null), E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get _SlidableGroupObject at groupIndex (%d).", groupIndex); + + SysTryReturn(NID_UI_CTRL, (index >= 0 && index < pGroupObject->__itemCount), + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. index (%d).", index); + + if (IsItemChecked(groupIndex, index) == check) + { + return E_SUCCESS; + } + + SysTryReturnResult(NID_UI_CTRL, (GetCore().IsItemEnabled(groupIndex, index)), E_SYSTEM, "[E_SYSTEM] A system error has occurred. The list item is not enabled."); + + if (_annexStyle == TABLE_VIEW_ANNEX_STYLE_RADIO) + { + return SetItemCheckedRadio(groupIndex, index, check); + } + else + { + return SetItemCheckedMarkOnOff(groupIndex, index, check); + } +} + +result +_SlidableGroupedListImpl::SetLoadedItemEnabled(int groupIndex, int index, bool enable) +{ + result r = E_SUCCESS; + SysTryReturn(NID_UI_CTRL, (groupIndex >= 0 && groupIndex < __groupsList.GetCount()), + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. groupIndex (%d).", groupIndex); + + _SlidableGroupObject* pGroupObject = dynamic_cast<_SlidableGroupObject*>(__groupsList.GetAt(groupIndex)); + SysTryReturn(NID_UI_CTRL, pGroupObject, E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get _SlidableGroupObject at groupIndex (%d).", groupIndex); + + SysTryReturn(NID_UI_CTRL, (index >= 0 && index < pGroupObject->__itemCount), + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. index (%d).", index); + + CustomListItem* pCustomListItem = GetCustomListItemAt(groupIndex, index); + SysTryReturnResult(NID_UI_CTRL, pCustomListItem, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get an item at %d index.", index); + + _CustomListItemImpl* pCustomListItemImpl = pCustomListItem->__pCustomListItemImpl; + SysTryReturnResult(NID_UI_CTRL, pCustomListItemImpl, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Item instance must not be null."); + + _TableViewItemData* pTableViewItemData = pCustomListItemImpl->__pTableViewItemData; + SysTryReturnResult(NID_UI_CTRL, pTableViewItemData, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get an item at %d index.", index); + + r = GetCore().SetItemEnabled(groupIndex, index, enable); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] Failed to set an item enabled at index %d.", GetErrorMessage(r), index); + + pTableViewItemData->Invalidate(true); + return r; +} + +result +_SlidableGroupedListImpl::SetGroupAt(int groupIndex, const String& text, const Bitmap* pBackgroundBitmap, int groupId) +{ + result r = E_SUCCESS; + + SysTryReturnResult(NID_UI_CTRL, (groupIndex >= 0 && groupIndex < __groupsList.GetCount()), + E_INVALID_ARG, "Invalid argument is used. groupIndex (%d).", groupIndex); + + _SlidableGroupObject* pOldGroup = dynamic_cast<_SlidableGroupObject*>(__groupsList.GetAt(groupIndex)); + SysTryReturn(NID_UI_CTRL, pOldGroup, E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get _SlidableGroupObject at groupIndex (%d).", groupIndex); + + CustomListItem* pCustomListItem = GetCustomListItemAt(groupIndex, -1); + SysTryReturn(NID_UI_CTRL, (pCustomListItem), E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get CustomListItem at groupIndex (%d).", groupIndex); + + pCustomListItem->SetElement(ID_FORMAT_STRING, text); + + if (pBackgroundBitmap != null) + { + pCustomListItem->SetNormalItemBackgroundBitmap(*pBackgroundBitmap); + } + + pCustomListItem->__pCustomListItemImpl->itemId = groupId; + + _TableViewItemUpdateParams updateParams; + updateParams.pItem = pCustomListItem; + updateParams.isDividerEnabled = _isDividerEnabled; + updateParams.pCheckBitmaps = _pCheckBitmaps; + updateParams.annexStyle = _annexStyle; + + r = _CustomListItemImpl::UpdateTableViewItem(updateParams); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, "A system error has occurred. Failed to update an item."); + + return E_SUCCESS; +} + +void +_SlidableGroupedListImpl::OnTableViewItemStateChanged(_TableView& tableView, int itemIndex, _TableViewItem* pItem, TableViewItemStatus status) +{ + return; +} + +void +_SlidableGroupedListImpl::OnTableViewContextItemActivationStateChanged(_TableView& tableView, int itemIndex, _TableViewItem* pContextItem, bool activated) +{ + return; +} + +void +_SlidableGroupedListImpl::OnTableViewItemReordered(_TableView& tableView, int itemIndexFrom, int itemIndexTo) +{ + return; +} + +void +_SlidableGroupedListImpl::OnGroupedTableViewGroupItemStateChanged(_TableView& tableView, int groupIndex, _TableViewItem* pItem, TableViewItemStatus status) +{ + return; +} + +void +_SlidableGroupedListImpl::OnGroupedTableViewItemStateChanged(_TableView& tableView, int groupIndex, int itemIndex, _TableViewItem* pItem, TableViewItemStatus status) +{ + CustomListItem* pCustomListItem = GetCustomListItemAt(groupIndex, itemIndex - GetTopItemIndex(groupIndex)); + SysTryReturnVoidResult(NID_UI_CTRL, pCustomListItem, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get CustomListItem at itemIndex (%d).", itemIndex); + + CustomListItemStatus customListItemStatus = CUSTOM_LIST_ITEM_STATUS_NORMAL; + ItemStatus itemStatus = ITEM_HIGHLIGHTED; + + switch (status) + { + case TABLE_VIEW_ITEM_STATUS_SELECTED: + itemStatus = ITEM_SELECTED; + customListItemStatus = CUSTOM_LIST_ITEM_STATUS_SELECTED; + break; + case TABLE_VIEW_ITEM_STATUS_HIGHLIGHTED: + itemStatus = ITEM_HIGHLIGHTED; + customListItemStatus = CUSTOM_LIST_ITEM_STATUS_FOCUSED; + break; + case TABLE_VIEW_ITEM_STATUS_CHECKED: + itemStatus = ITEM_CHECKED; + break; + case TABLE_VIEW_ITEM_STATUS_UNCHECKED: + itemStatus = ITEM_UNCHECKED; + break; + default: + SetLastResult(E_INVALID_ARG); + SysLog(NID_UI_CTRL, "[E_INVALID_ARG] Invalid argument is used. ListItemStatus is invalid"); + return; + } + + LinkedList* pElements = &pCustomListItem->__pCustomListItemImpl->elements; + _ElementBaseModel* pElementBase = null; + + for (int i = 0; i < pElements->GetCount(); i++) + { + pElementBase = dynamic_cast<_ElementBaseModel*>(pElements->GetAt(i)); + SysTryReturnVoidResult(NID_UI_CTRL, (pElementBase != null), E_SYSTEM, "Invalid element."); + + if ((_isDividerEnabled && pElementBase->_elementType != LIST_ITEM_ELEMENT_TYPE_CHECKBOX) || (!_isDividerEnabled)) + { + pElementBase->HandleElementEvent(customListItemStatus); + } + } + + if ((!_isDividerEnabled) && (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL)) + { + bool isChecked = IsItemChecked(groupIndex, itemIndex); + + if (isChecked) + { + itemStatus = ITEM_UNCHECKED; + } + else + { + itemStatus = ITEM_CHECKED; + } + + SetItemChecked(groupIndex, itemIndex, !isChecked); + } + + ProcessItemStateChange(groupIndex, itemIndex, itemStatus); + + GetCore().Draw(); + return; +} + +void +_SlidableGroupedListImpl::OnGroupedTableViewContextItemActivationStateChanged(_TableView& tableView, int groupIndex, int itemIndex, _TableViewItem* pContextItem, bool activated) +{ + return; +} + +void +_SlidableGroupedListImpl::OnGroupedTableViewItemReordered(Tizen::Ui::Controls::_TableView& tableView, int groupIndexFrom, int itemIndexFrom, int groupIndexTo, int itemIndexTo) +{ + return; +} + +void +_SlidableGroupedListImpl::OnSectionTableViewItemStateChanged(_TableView& tableView, int sectionIndex, int itemIndex, _TableViewItem* pItem, TableViewItemStatus status) +{ + return; +} + +void +_SlidableGroupedListImpl::OnSectionTableViewContextItemActivationStateChanged(_TableView& tableView, int sectionIndex, int itemIndex, _TableViewItem* pContextItem, bool activated) +{ + return; +} + +void +_SlidableGroupedListImpl::OnTableViewItemSwept(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewSweepDirection direction) +{ + return; +} + +void +_SlidableGroupedListImpl::OnDraw(void) +{ + if (__pItemProvider == null) + { + result r = E_SUCCESS; + + r = CreateItemProvider(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + _ListBaseImpl::OnDraw(); +} + +result +_SlidableGroupedListImpl::CreateItemProvider(void) +{ + if (__pItemProvider == null) + { + __pItemProvider = new (std::nothrow) _SlidableGroupedListItemProvider(this); + SysTryReturnResult(NID_UI_CTRL, __pItemProvider, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + TableViewStyle style = GetCore().GetTableViewStyle(); + SysTryReturnResult(NID_UI_CTRL, style == TABLE_VIEW_STYLE_GROUPED, E_INVALID_OPERATION, + "[E_INVALID_OPERATION] The style of TableView is not TABLE_VIEW_STYLE_GROUPED"); + + _TableViewItemProvider* pItemProvider = _TableViewItemProvider::CreateTableViewItemProviderN(style); + result r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, pItemProvider != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + pItemProvider->SetGroupedStyleItemProvider(__pItemProvider); + + GetCore().SetItemProvider(pItemProvider); + } + + return E_SUCCESS; +} + +void +_SlidableGroupedListImpl::Initialize(void) +{ + GetCore().AddGroupedTableViewItemEventListener(*this); + GET_SHAPE_CONFIG(TABLEVIEW::GROUPITEM_DEFAULT_HEIGHT, GetCore().GetOrientation(), __groupItemHeight); + GET_SHAPE_CONFIG(TABLEVIEW::GROUPITEM_DEFAULT_FONT_SIZE, GetCore().GetOrientation(), __groupItemTextFont); + + __itemCacheSize = GetCore().GetMaxItemCachingSize(); + + __pItemFormat = new (std::nothrow) CustomListItemFormat(); + SysTryReturnVoidResult(NID_UI_CTRL, __pItemFormat, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + __pItemFormat->Construct(); + + int leftMargin = 0; + Color groupTextColor = Color(0); + GET_SHAPE_CONFIG(TABLEVIEW::GROUPITEM_INDEX_BAR_LEFT_MARGIN, GetCore().GetOrientation(), leftMargin); + GET_COLOR_CONFIG(TABLEVIEW::GROUPITEM_TEXT_NORMAL, groupTextColor); + + __pItemFormat->AddElement(ID_FORMAT_MARGIN, Rectangle(0, 0, leftMargin, __groupItemHeight), __groupItemTextFont); + __pItemFormat->AddElement(ID_FORMAT_STRING, Rectangle(leftMargin, 0, GetCore().GetBounds().width, __groupItemHeight), + __groupItemTextFont, groupTextColor, groupTextColor); + + __pItemFormat->SetElementEventEnabled(ID_FORMAT_MARGIN, true); + __pItemFormat->SetElementEventEnabled(ID_FORMAT_STRING, true); + + return; +} + +void +_SlidableGroupedListImpl::OnUiFastScrollIndexSelected(_Control& source, _FastScrollIndex& index) +{ + int groupIndex = 0; + mchar mch = L' '; + String* pIndexText = index.GetIndexText(); + if (pIndexText != null) + { + pIndexText->GetCharAt(0, mch); + result r = __mainScrollIndex.IndexOf(*pIndexText, 0, groupIndex); + if (!IsFailed(r)) + { + const Control& control = GetPublic(); + _FastScrollIndex* pMainIndex = index.GetParentIndex(); + if (pMainIndex == GetCore().GetFastScrollBar()->GetIndex()) + { + Character mainIndex(mch); + __pFastScrollListener->OnMainIndexChanged(control, mainIndex); + } + } + } + SetLastResult(E_SUCCESS); +} + +const char* +_SlidableGroupedListImpl::GetPublicClassName(void) const +{ + return "SlidableGroupedList"; +} + +const SlidableGroupedList& +_SlidableGroupedListImpl::GetPublic(void) const +{ + return static_cast(_ControlImpl::GetPublic()); +} + +SlidableGroupedList& +_SlidableGroupedListImpl::GetPublic(void) +{ + return static_cast(_ControlImpl::GetPublic()); +} + +const _TableView& +_SlidableGroupedListImpl::GetCore(void) const +{ + return static_cast(_ControlImpl::GetCore()); +} + +_TableView& +_SlidableGroupedListImpl::GetCore(void) +{ + return static_cast<_TableView&>(_ControlImpl::GetCore()); +} + +void +_SlidableGroupedListImpl::ProcessItemStateChange(int groupIndex, int itemIndex, int elementId, ItemStatus itemStatus) +{ + CustomListItem* pCustomListItem = GetCustomListItemAt(groupIndex, itemIndex - GetTopItemIndex(groupIndex)); + SysTryReturnVoidResult(NID_UI_CTRL, pCustomListItem, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get CustomListItem at itemIndex (%d).", itemIndex); + + int itemId = pCustomListItem->__pCustomListItemImpl->itemId; + + _ListListener* pListenerList = null; + IGroupedItemEventListener* pEventListener = null; + + for (int listenerCount = 0; listenerCount < __itemListenersList.GetCount(); listenerCount++) + { + pListenerList = dynamic_cast<_ListListener*>(__itemListenersList.GetAt(listenerCount)); + SysTryReturnVoidResult(NID_UI_CTRL, (pListenerList != null), E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get _ListListener."); + + pEventListener = dynamic_cast(pListenerList->pListener); + SysTryReturnVoidResult(NID_UI_CTRL, (pEventListener != null), E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get IGroupedItemEventListener."); + + pEventListener->OnItemStateChanged(GetPublic(), groupIndex, itemIndex, itemId, elementId, itemStatus); + } +} + +void +_SlidableGroupedListImpl::ProcessItemStateChange(int groupIndex, int itemIndex, ItemStatus itemStatus) +{ + CustomListItem* pCustomListItem = GetCustomListItemAt(groupIndex, itemIndex - GetTopItemIndex(groupIndex)); + SysTryReturnVoidResult(NID_UI_CTRL, pCustomListItem, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get CustomListItem at itemIndex (%d).", itemIndex); + + int itemId = pCustomListItem->__pCustomListItemImpl->itemId; + + _ListListener* pListenerList = null; + IGroupedItemEventListener* pEventListener = null; + + for (int listenerCount = 0; listenerCount < __itemListenersList.GetCount(); listenerCount++) + { + pListenerList = dynamic_cast<_ListListener*>(__itemListenersList.GetAt(listenerCount)); + SysTryReturnVoidResult(NID_UI_CTRL, (pListenerList != null), E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get _ListListener."); + + pEventListener = dynamic_cast(pListenerList->pListener); + SysTryReturnVoidResult(NID_UI_CTRL, (pEventListener != null), E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get IGroupedItemEventListener."); + + pEventListener->OnItemStateChanged(GetPublic(), groupIndex, itemIndex, itemId, itemStatus); + } +} + +void +_SlidableGroupedListImpl::CallUnloadItemCb(int groupIndex, int itemIndex) +{ + _ListListener* pListenerData = null; + ISlidableGroupedListEventListener* pSlidableListener = null; + + for (int listenerCount = 0; listenerCount < __slidableListenersList.GetCount(); listenerCount++) + { + pListenerData = dynamic_cast<_ListListener*>(__slidableListenersList.GetAt(listenerCount)); + SysTryReturnVoidResult(NID_UI_CTRL, (pListenerData != null), E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get _ListListener."); + + pSlidableListener = dynamic_cast(pListenerData->pListener); + SysTryReturnVoidResult(NID_UI_CTRL, (pSlidableListener != null), E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get IGroupedItemEventListener."); + + pSlidableListener->OnUnloadItemRequested(GetPublic(), groupIndex, itemIndex); + } +} + +int +_SlidableGroupedListImpl::GetCurrentLoadedCount(void) +{ + int count = 0; + + for (int groupIndex = __topGroup; groupIndex <= __bottomGroup; groupIndex++) + { + _TableViewGroupItemData* pTableViewGroupItemData = GetTableViewGroupItemAt(groupIndex); + + if (pTableViewGroupItemData) + { + count++; + } + + count += GetSubItemCountAt(groupIndex); + } + + return count; +} + +int +_SlidableGroupedListImpl::GetTopItemIndex(int groupIndex) const +{ + _SlidableGroupObject* pGroupObject = dynamic_cast<_SlidableGroupObject*>(const_cast(__groupsList.GetAt(groupIndex))); + SysTryReturn(NID_UI_CTRL, pGroupObject, INVALID_INDEX, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get _SlidableGroupObject at groupIndex (%d).", groupIndex); + + return pGroupObject->__topIndex; +} + +class _SlidableGroupedListMaker + : public _UiBuilderControlMaker +{ +public: + _SlidableGroupedListMaker(_UiBuilder* uibuilder) + : _UiBuilderControlMaker(uibuilder){}; + virtual ~_SlidableGroupedListMaker(){}; + static _UiBuilderControlMaker* + GetInstance(_UiBuilder* uibuilder) + { + _SlidableGroupedListMaker* pSlidableListMaker = new (std::nothrow) _SlidableGroupedListMaker(uibuilder); + return pSlidableListMaker; + }; +protected: + virtual Tizen::Ui::Control* + Make(_UiBuilderControl* pControl) + { + result r = E_SYSTEM; + _UiBuilderControlLayout* pControlProperty = null; + SlidableGroupedList* pSlidableGroupedList = null; + Tizen::Graphics::Rectangle rect; + Tizen::Graphics::Rectangle rectMin; + Dimension dimMin; + Tizen::Base::String elementString; + CustomListStyle style = CUSTOM_LIST_STYLE_NORMAL; + bool isItemDivider = true; + Color color; + + GetProperty(pControl, &pControlProperty); + if (pControlProperty == null) + { + return null; + } + + pSlidableGroupedList = new (std::nothrow) SlidableGroupedList(); + if (pSlidableGroupedList == null) + { + return null; + } + + rect = pControlProperty->GetRect(); + + Tizen::Base::String styleString; + styleString = pControlProperty->GetStyle(); + + if (styleString.Equals(L"CUSTOM_LIST_STYLE_NORMAL", false)) + { + style = CUSTOM_LIST_STYLE_NORMAL; + } + else if (styleString.Equals(L"CUSTOM_LIST_STYLE_RADIO", false)) + { + style = CUSTOM_LIST_STYLE_RADIO; + } + else if (styleString.Equals(L"CUSTOM_LIST_STYLE_RADIO_WITH_DIVIDER", false)) + { + style = CUSTOM_LIST_STYLE_RADIO_WITH_DIVIDER; + } + else if (styleString.Equals(L"CUSTOM_LIST_STYLE_MARK", false)) + { + style = CUSTOM_LIST_STYLE_MARK; + } + else if (styleString.Equals(L"CUSTOM_LIST_STYLE_MARK_WITH_DIVIDER", false)) + { + style = CUSTOM_LIST_STYLE_MARK_WITH_DIVIDER; + } + else if (styleString.Equals(L"CUSTOM_LIST_STYLE_ONOFF", false)) + { + style = CUSTOM_LIST_STYLE_ONOFF; + } + else if (styleString.Equals(L"CUSTOM_LIST_STYLE_ONOFF_WITH_DIVIDER", false)) + { + style = CUSTOM_LIST_STYLE_ONOFF_WITH_DIVIDER; + } + else + { + style = CUSTOM_LIST_STYLE_NORMAL; + } + + //Construct + if (pControl->GetElement(L"itemDivider", elementString)) + { + if (elementString.Equals(L"true", false)) + { + isItemDivider = true; + } + else + { + isItemDivider = false; + } + } + + r = pSlidableGroupedList->Construct(rect, style, isItemDivider); + if (r != E_SUCCESS) + { + delete pSlidableGroupedList; + return null; + } + + if (pControl->GetElement(L"textOfEmptyList", elementString)) + { + pSlidableGroupedList->SetTextOfEmptyList(elementString); + } + + if (pControl->GetElement(L"colorOfEmptyListText", elementString)) + { + ConvertStringToColor(elementString, color); + pSlidableGroupedList->SetTextColorOfEmptyList(color); + } + + GET_DIMENSION_CONFIG(LIST::GROUPEDLIST_MIN_SIZE, _CONTROL_ORIENTATION_PORTRAIT, dimMin); + rectMin = (pControl->GetAttribute(0))->GetRect(); + (pControl->GetAttribute(0))->SetRect(rectMin.x, rectMin.y, dimMin.width, dimMin.height); + + GET_DIMENSION_CONFIG(LIST::GROUPEDLIST_MIN_SIZE, _CONTROL_ORIENTATION_LANDSCAPE, dimMin); + rectMin = (pControl->GetAttribute(1))->GetRect(); + (pControl->GetAttribute(1))->SetRect(rectMin.x, rectMin.y, dimMin.width, dimMin.height); + + return pSlidableGroupedList; + } + +private: +}; + +_SlidableGroupedListRegister::_SlidableGroupedListRegister() +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + if (pUiBuilderControlTableManager) + { + pUiBuilderControlTableManager->RegisterControl(L"SlidableGroupedList", _SlidableGroupedListMaker::GetInstance); + } +} +_SlidableGroupedListRegister::~_SlidableGroupedListRegister() +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + if (pUiBuilderControlTableManager) + { + pUiBuilderControlTableManager->UnregisterControl(L"SlidableGroupedList"); + } +} +static _SlidableGroupedListRegister SlidableGroupedListRegisterToUiBuilder; +}}} //Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_SlidableListImpl.cpp b/src/ui/controls/FUiCtrl_SlidableListImpl.cpp new file mode 100644 index 0000000..ceaadd0 --- /dev/null +++ b/src/ui/controls/FUiCtrl_SlidableListImpl.cpp @@ -0,0 +1,1872 @@ +// +// 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_SlidableListImpl.cpp + * @brief This is the implementation file for the _SlidableListImpl class. + */ + +#include +#include +#include "FUiCtrl_CustomListItemFormatImpl.h" +#include "FUiCtrl_CustomListItemImpl.h" +#include "FUiCtrl_SlidableListImpl.h" +#include "FUiCtrl_ListListener.h" +#include "FUi_ResourceSizeInfo.h" +#include "FUi_ResourceManager.h" +#include "FUiCtrl_ListItemBaseImpl.h" +#include "FUi_UiBuilder.h" +#include "FUiCtrl_TableViewItemProvider.h" +#include "FUiCtrl_TableViewPresenter.h" +#include "FUi_CoordinateSystemUtils.h" + + +using namespace Tizen::Base; +using namespace Tizen::Ui; +using namespace Tizen::Graphics; +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Graphics; +using namespace Tizen::Media; +using namespace Tizen::Base::Collection; + + +namespace Tizen { namespace Ui { namespace Controls +{ + +extern const int INVALID_INDEX; + +_SlidableListItemProvider::_SlidableListItemProvider(_SlidableListImpl* pList) + : firstTime(true) + , bottomListenerIndex(0) + , topListenerIndex(0) + , __pListImpl(pList) +{ + if (__pListImpl) + { + topListenerIndex = __pListImpl->__slidableListenersList.GetCount() - 1; + } +} + +int +_SlidableListItemProvider::GetItemCount(void) +{ + SysTryReturn(NID_UI_CTRL, __pListImpl, 0, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Item provider not constructed properly."); + + if (__pListImpl->__slidableListenersList.GetCount() > 0) + { + if (firstTime == true) + { + _ListListener* pListenerData = null; + ISlidableListEventListener* pSlidableListener = null; + int listenerCount = 0; + + for (listenerCount = 0; listenerCount < __pListImpl->__slidableListenersList.GetCount(); listenerCount++) + { + pListenerData = dynamic_cast<_ListListener*>(__pListImpl->__slidableListenersList.GetAt(listenerCount)); + + if (pListenerData) + { + pSlidableListener = dynamic_cast(pListenerData->pListener); + SysTryReturn(NID_UI_CTRL, (pSlidableListener != null), -1, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get EventListener."); + + pSlidableListener->OnListPropertyRequested(__pListImpl->GetPublic()); + } + } + + firstTime = false; + } + + return __pListImpl->__totalItemCount; + } + else + { + return 0; + } +} + +result +_SlidableListItemProvider::CallLoadToTopCb(int index) +{ + _ListListener* pListenerData = null; + ISlidableListEventListener* pSlidableListener = null; + + pListenerData = dynamic_cast<_ListListener*>(__pListImpl->__slidableListenersList.GetAt(topListenerIndex)); + SysTryReturn(NID_UI_CTRL, pListenerData, E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get the listener."); + + pSlidableListener = dynamic_cast(pListenerData->pListener); + SysTryReturn(NID_UI_CTRL, pSlidableListener, E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get the listener."); + + pSlidableListener->OnLoadToTopRequested(__pListImpl->GetPublic(), index, 1); + + if (--topListenerIndex < 0) + { + topListenerIndex = __pListImpl->__slidableListenersList.GetCount() - 1; + } + + return E_SUCCESS; +} + +result +_SlidableListItemProvider::UpdateCheckStatus(int index) +{ + if (__pListImpl->_annexStyle == TABLE_VIEW_ANNEX_STYLE_RADIO) + { + if (__pListImpl->_currentRadioIndex == index) + { + _CheckElementModel* pOldCheckElement = __pListImpl->GetCheckElementAt(-1, __pListImpl->_currentRadioIndex - __pListImpl->__topIndex); + + if (pOldCheckElement) + { + pOldCheckElement->SetCheckBoxStatus(CHECK_BOX_CHECKED); + } + } + } + else if (__pListImpl->__pCheckedList) + { + Boolean* pChecked = dynamic_cast(__pListImpl->__pCheckedList->GetAt(index)); + _CheckElementModel* pCheckElement = __pListImpl->GetCheckElementAt(-1, index - __pListImpl->__topIndex); + + if (pCheckElement && pChecked) + { + pCheckElement->SetCheckBoxStatus((_CheckBoxBitmapType)pChecked->ToBool()); + } + } + return E_SUCCESS; +} + +_TableViewItemData* +_SlidableListItemProvider::LoadAtTop(int index) +{ + _TableViewItemData* pTableViewItemData = null; + result r = E_SUCCESS; + + r = CallLoadToTopCb(index); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + __pListImpl->__topIndex = index; + + pTableViewItemData = __pListImpl->GetTableViewItemAt(-1, 0); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + r = UpdateCheckStatus(index); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + return pTableViewItemData; +} + +result +_SlidableListItemProvider::CallLoadToBottomCb(int index) +{ + _ListListener* pListenerData = null; + ISlidableListEventListener* pSlidableListener = null; + + pListenerData = dynamic_cast<_ListListener*>(__pListImpl->__slidableListenersList.GetAt(bottomListenerIndex)); + SysTryReturn(NID_UI_CTRL, pListenerData, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get the listener."); + + pSlidableListener = dynamic_cast(pListenerData->pListener); + SysTryReturn(NID_UI_CTRL, pSlidableListener, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get the listener."); + + pSlidableListener->OnLoadToBottomRequested(__pListImpl->GetPublic(), index, 1); + + if (++bottomListenerIndex == __pListImpl->__slidableListenersList.GetCount()) + { + bottomListenerIndex = 0; + } + + return E_SUCCESS; +} + +_TableViewItemData* +_SlidableListItemProvider::LoadAtBottom(int index) +{ + _TableViewItemData* pTableViewItemData = null; + result r = E_SUCCESS; + + r = CallLoadToBottomCb(index); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + pTableViewItemData = __pListImpl->GetTableViewItemAt(-1, __pListImpl->_itemsList.GetCount() - 1); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + r = UpdateCheckStatus(index); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + if (__pListImpl->_itemsList.GetCount() == 1) + { + __pListImpl->__topIndex = index; + } + return pTableViewItemData; +} + +TableViewItem* +_SlidableListItemProvider::CreateItem(int index, int itemWidth) +{ + SysTryReturn(NID_UI_CTRL, __pListImpl, null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Item provider not constructed properly."); + + _TableViewItemData* pItem = null; + pItem = __pListImpl->GetTableViewItemAt(-1, index - __pListImpl->__topIndex); + + result r = E_SUCCESS; + + __pListImpl->__isCreating = true; + + if (pItem == null) + { + if (index < __pListImpl->__topIndex) // load at top + { + pItem = LoadAtTop(index); + } + else // load at bottom + { + pItem = LoadAtBottom(index); + } + + SysTryReturn(NID_UI_CTRL, pItem, null, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + } + + __pListImpl->__isCreating = false; + + return pItem; +} + +bool +_SlidableListItemProvider::DeleteItem(int index, TableViewItem* pItem) +{ + SysTryReturn(NID_UI_CTRL, __pListImpl, false, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Item provider not constructed properly."); + + __pListImpl->CallUnloadItemCb(index); + + result r = E_SUCCESS; + + if (__pListImpl->__isForcedScroll == true) + { + r = __pListImpl->_itemsList.RemoveAt(0, true); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to remove an item."); + } + else if (__pListImpl->_itemsList.GetCount() >= __pListImpl->__itemCacheSize) + { + if (index <= __pListImpl->__topIndex) + { + r = __pListImpl->_itemsList.RemoveAt(0, true); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to remove an item."); + + __pListImpl->__topIndex++; + } + else + { + r = __pListImpl->_itemsList.RemoveAt(__pListImpl->_itemsList.GetCount() - 1, true); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to remove an item."); + } + } + else if (__pListImpl->__isFullUpdate == true) + { + r = __pListImpl->_itemsList.RemoveAt(__pListImpl->_itemsList.GetCount() - 1, true); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to remove an item."); + } + + delete pItem; + pItem = null; + + return true; +} + +void +_SlidableListItemProvider::UpdateItem(int itemIndex, TableViewItem* pItem) +{ + //return true; +} + +int +_SlidableListItemProvider::GetDefaultItemHeight() +{ + SysTryReturn(NID_UI_CTRL, __pListImpl, 0, E_SYSTEM, "[E_SYSTEM] A system error has occurred. List instance must not be null."); + + CustomListItem* pCustomListItem = dynamic_cast(__pListImpl->_itemsList.GetAt(0)); + + if (pCustomListItem) + { + _CustomListItemImpl* pCustomListItemImpl = null; + pCustomListItemImpl = pCustomListItem->__pCustomListItemImpl; + SysTryReturn(NID_UI_CTRL, pCustomListItemImpl, 0, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Item instance must not be null"); + return pCustomListItemImpl->height; + } + else + { + return __pListImpl->LISTVIEW_ITEM_HEIGHT; + } +} + +_SlidableListImpl* +_SlidableListImpl::GetInstance(SlidableList& slidableList) +{ + return static_cast<_SlidableListImpl*>(slidableList._pControlImpl); +} + +const _SlidableListImpl* +_SlidableListImpl::GetInstance(const SlidableList& slidableList) +{ + return static_cast(slidableList._pControlImpl); +} + +_SlidableListImpl::_SlidableListImpl(Control* pList, _TableView* pCore) + : _ListBaseImpl(pList, pCore) + , __pCheckedList(null) + , __totalItemCount(-1) + , __topIndex(-1) + , __pItemProvider(null) + , __isFullUpdate(false) + , __isCreating(false) + , __itemCacheSize(0) + , __isForcedScroll(false) +{ +} + +_SlidableListImpl::~_SlidableListImpl(void) +{ + if (__pItemProvider && __pItemProvider->firstTime == true) + { + _itemsList.RemoveAll(false); + } + else + { + _itemsList.RemoveAll(true); + } + + __slidableListenersList.RemoveAll(true); + __itemListenersList.RemoveAll(true); + + if (__pCheckedList) + { + __pCheckedList->RemoveAll(true); + delete __pCheckedList; + } + + if (__pItemProvider) + { + delete __pItemProvider; + __pItemProvider = null; + } +} + +const char* +_SlidableListImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Controls::SlidableList"; +} + +const SlidableList& +_SlidableListImpl::GetPublic(void) const +{ + return static_cast(_ControlImpl::GetPublic()); +} + +SlidableList& +_SlidableListImpl::GetPublic(void) +{ + return static_cast(_ControlImpl::GetPublic()); +} + +const _TableView& +_SlidableListImpl::GetCore(void) const +{ + return static_cast(_ControlImpl::GetCore()); +} + +_TableView& +_SlidableListImpl::GetCore(void) +{ + return static_cast<_TableView&>(_ControlImpl::GetCore()); +} + +_SlidableListImpl* +_SlidableListImpl::CreateSlidableListImplN(SlidableList* pControl, const Rectangle& bounds, bool itemDivider) +{ + result r = E_SUCCESS; + + r = GET_SIZE_INFO(SlidableList).CheckInitialSizeValidF(FloatDimension(bounds.width, bounds.height), _CONTROL_ORIENTATION_PORTRAIT); + if (IsFailed(r)) + { + return null; + } + + _TableView* pList = _TableView::CreateTableViewN(TABLE_VIEW_STYLE_SIMPLE, itemDivider, TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pList, null, r, "[%s] Failed to create ListView instance", GetErrorMessage(r)); + + _SlidableListImpl* pImpl = new (std::nothrow) _SlidableListImpl(pControl, pList); + SysTryCatch(NID_UI_CTRL, pImpl, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + return pImpl; + +CATCH: + delete pList; + return null; +} + +result +_SlidableListImpl::UpdateBounds(const Rectangle& rect) +{ + result r = E_SUCCESS; + + r = InitializeBoundsPropertiesF(GET_SIZE_INFO(SlidableList), _CoordinateSystemUtils::ConvertToFloat(rect), GetCore().GetOrientation()); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +void +_SlidableListImpl::AddSlidableListEventListener(const ISlidableListEventListener& listener) +{ + _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); + __slidableListenersList.Add(*pListenerData); +} + +void +_SlidableListImpl::RemoveSlidableListEventListener(const ISlidableListEventListener& listener) +{ + _ListListener* pListenerData = null; + + for (int listenerCount = 0; listenerCount < __slidableListenersList.GetCount(); listenerCount++) + { + pListenerData = dynamic_cast<_ListListener*>(__slidableListenersList.GetAt(listenerCount)); + + if ((pListenerData != null) && (pListenerData->pListener == &listener)) + { + __slidableListenersList.RemoveAt(listenerCount, true); + break; + } + } +} + +void +_SlidableListImpl::AddCustomItemEventListener(const ICustomItemEventListener& listener) +{ + _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); + + __itemListenersList.Add(*pListenersList); +} + +result +_SlidableListImpl::AddItem(const CustomListItem& item, int itemId) +{ + return InsertItemAt((_itemsList.GetCount() + __topIndex), item, itemId); +} + +int +_SlidableListImpl::GetBottomDrawnItemIndex(void) const +{ + int itemIndex = -1; + int groupIndex = -1; + result r = E_SUCCESS; + r = GetCore().GetBottomDrawnItemIndex(groupIndex, itemIndex); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, INVALID_INDEX, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get the bottom drawn item index."); + + return itemIndex; +} + +int +_SlidableListImpl::GetFirstCheckedItemIndex(void) const +{ + SysTryReturn(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL), INVALID_INDEX, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. List style should not be TABLE_VIEW_ANNEX_STYLE_NORMAL"); + + for (int itemIndex = 0; itemIndex < __totalItemCount; itemIndex++) + { + if (IsItemChecked(itemIndex)) + { + SetLastResult(E_SUCCESS); + return itemIndex; + } + } + + SetLastResult(E_SUCCESS); + return INVALID_INDEX; +} + +int +_SlidableListImpl::GetFirstLoadedItemIndex(void) const +{ + result r = E_SUCCESS; + int itemIndex = -1; + int groupIndex = -1; + + r = GetCore().GetTopDrawnItemIndex(groupIndex, itemIndex); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, INVALID_INDEX, r, "[%s] Propagating.", GetErrorMessage(r)); + + return itemIndex; +} + +int +_SlidableListImpl::GetLastLoadedItemIndex(void) const +{ + result r = E_SUCCESS; + int itemIndex = -1; + int groupIndex = -1; + + r = GetCore().GetBottomDrawnItemIndex(groupIndex, itemIndex); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, INVALID_INDEX, r, "[%s] Propagating.", GetErrorMessage(r)); + + return itemIndex; +} + +int +_SlidableListImpl::GetItemCount(void) const +{ + return __totalItemCount; +} + +int +_SlidableListImpl::GetItemIndexFromItemId(int itemId) const +{ + _TableViewItemData* pTableViewItemData = null; + CustomListItem* pCustomListItem = null; + + for (int index = 0; index < _itemsList.GetCount(); index++) + { + pCustomListItem = dynamic_cast(const_cast(_itemsList.GetAt(index))); + SysTryReturn(NID_UI_CTRL, pCustomListItem, INVALID_INDEX, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get the Customlist item at index %d.", index); + + SysTryReturn(NID_UI_CTRL, pCustomListItem->__pCustomListItemImpl, INVALID_INDEX, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Item instance must not be null."); + + pTableViewItemData = pCustomListItem->__pCustomListItemImpl->__pTableViewItemData; + SysTryReturn(NID_UI_CTRL, pTableViewItemData, INVALID_INDEX, E_SYSTEM, "[E_SYSTEM] A system error has occurred. ItemData must not be null."); + + if ((pTableViewItemData != null) && (pCustomListItem->__pCustomListItemImpl->itemId == itemId)) + { + SetLastResult(E_SUCCESS); + return index; + } + } + SetLastResult(E_SUCCESS); + return INVALID_INDEX; +} + +int +_SlidableListImpl::GetItemIndexFromPosition(const Point& position) const +{ + int itemIndex = -1; + int groupIndex = -1; + + result r = GetCore().GetItemIndexFromPosition(position, groupIndex, itemIndex); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, INVALID_INDEX, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + return itemIndex; + +} + +int +_SlidableListImpl::GetItemIndexFromPosition(int x, int y) const +{ + int itemIndex = -1; + int groupIndex = -1; + + result r = GetCore().GetItemIndexFromPosition(Tizen::Graphics::Point(x, y), groupIndex, itemIndex); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, INVALID_INDEX, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + return itemIndex; +} + +int +_SlidableListImpl::GetLastCheckedItemIndex(void) const +{ + SysTryReturn(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL), INVALID_INDEX, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. List style should not be TABLE_VIEW_ANNEX_STYLE_NORMAL"); + + for (int itemIndex = __totalItemCount - 1; itemIndex > 0; itemIndex--) + { + if (IsItemChecked(itemIndex)) + { + SetLastResult(E_SUCCESS); + return itemIndex; + } + } + SetLastResult(E_SUCCESS); + return INVALID_INDEX; +} + +const CustomListItem* +_SlidableListImpl::GetLoadedItemAt(int index) const +{ + SysTryReturn(NID_UI_CTRL, (index >= __topIndex && index < _itemsList.GetCount() + __topIndex), null, E_INVALID_ARG, + "[E_INVALID_ARG] Invalid argument is used. Index (%d) must be greater than or equal to 0 and less than (%d).", index, _itemsList.GetCount()); + + CustomListItem* pCustomListItem = dynamic_cast(const_cast(_itemsList.GetAt(index - __topIndex))); + SysTryReturn(NID_UI_CTRL, pCustomListItem, null, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get the Customlist item at index %d.", (index - __topIndex)); + + SetLastResult(E_SUCCESS); + return pCustomListItem; +} + +int +_SlidableListImpl::GetLoadedItemIdAt(int index) const +{ + SysTryReturn(NID_UI_CTRL, (index >= __topIndex && index < _itemsList.GetCount() + __topIndex), INVALID_INDEX, E_INVALID_ARG, + "[E_INVALID_ARG] Invalid argument is used. Index (%d) must be greater than or equal to 0 and less than (%d).", index, _itemsList.GetCount()); + + CustomListItem* pCustomListItem = dynamic_cast(const_cast(_itemsList.GetAt(index - __topIndex))); + SysTryReturn(NID_UI_CTRL, pCustomListItem, INVALID_INDEX, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get the Customlist item at index %d.", (index - __topIndex)); + + SysTryReturn(NID_UI_CTRL, pCustomListItem->__pCustomListItemImpl, INVALID_INDEX, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Item instance must not be null."); + + SetLastResult(E_SUCCESS); + return pCustomListItem->__pCustomListItemImpl->itemId; +} + +int +_SlidableListImpl::GetNextCheckedItemIndexAfter(int index) const +{ + SysTryReturn(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL), INVALID_INDEX, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. List style should not be TABLE_VIEW_ANNEX_STYLE_NORMAL."); + + SysTryReturn(NID_UI_CTRL, (index >= 0 && index < __totalItemCount), INVALID_INDEX, E_INVALID_ARG, + "[E_INVALID_ARG] Invalid argument is used. Index (%d) must be greater than or equal to 0 and less than (%d).", index, __totalItemCount); + + for (int itemIndex = index + 1; itemIndex < __totalItemCount; itemIndex++) + { + if (IsItemChecked(itemIndex)) + { + SetLastResult(E_SUCCESS); + return itemIndex; + } + } + SetLastResult(E_SUCCESS); + return INVALID_INDEX; +} + + +int +_SlidableListImpl::GetTopDrawnItemIndex(void) const +{ + int topItemIndex = -1; + int groupIndex = -1; + result r = E_SUCCESS; + + r = GetCore().GetTopDrawnItemIndex(groupIndex, topItemIndex); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, INVALID_INDEX, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get the top drawn item index."); + + return topItemIndex; +} + +result +_SlidableListImpl::InsertItemAt(int index, const CustomListItem& item, int itemId) +{ + SysTryReturnResult(NID_UI_CTRL, (index >= __topIndex && index <= (_itemsList.GetCount() + __topIndex)), E_INVALID_ARG, + "[E_INVALID_ARG] Invalid argument is used. Index (%d) must be greater than or equal to 0 and less than or equal to (%d).", + index, (_itemsList.GetCount() + __topIndex)); + + _TableViewItemParams tableViewItemParams; + tableViewItemParams.pItem = (const_cast(&item)); + tableViewItemParams.width = GetCore().GetBoundsF().width; + tableViewItemParams.itemIndex = index; + tableViewItemParams.groupIndex = -1; + tableViewItemParams.isDividerEnabled = _isDividerEnabled; + tableViewItemParams.pCheckBitmaps = _pCheckBitmaps; + tableViewItemParams.annexStyle = _annexStyle; + + item.__pCustomListItemImpl->itemId = itemId; + + result r = _CustomListItemImpl::CreateTableViewItem(tableViewItemParams); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. Failed to create an item.", GetErrorMessage(r)); + + r = InsertIntoItemsList(item, -1, index - __topIndex); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. Failed to insert an item at index %d.", GetErrorMessage(r), (index)); + + if (__pCheckedList) + { + 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); + } + + if (GetCore().GetFirstDrawnFlag() == false) + { + r = GetCore().RefreshTableView(0, index, TABLE_VIEW_REFRESH_TYPE_ITEM_ADD); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, + "[%s] A system error has occurred. Failed to insert an item at index %d.", GetErrorMessage(r), index); + } + + __totalItemCount++; + + return r; + +CATCH: + RemoveFromItemsList(-1, index - __topIndex); + return E_SYSTEM; +} + +bool +_SlidableListImpl::IsItemChecked(int groupIndex, int subIndex) const +{ + return IsItemChecked(subIndex); +} + +bool +_SlidableListImpl::IsItemChecked(int index) const +{ + switch(_annexStyle) + { + case TABLE_VIEW_ANNEX_STYLE_MARK: + // fall through + case TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING: + { + Boolean* pChecked = dynamic_cast(__pCheckedList->GetAt(index)); + SysTryReturn(NID_UI_CTRL, (pChecked != null), false, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get boolean pointer at %d index.", index); + + return pChecked->ToBool(); + } + break; + + case TABLE_VIEW_ANNEX_STYLE_RADIO: + { + if (index == _currentRadioIndex) + { + return true; + } + else + { + return false; + } + } + break; + + case TABLE_VIEW_ANNEX_STYLE_NORMAL: + // fall through + default: + SysLog(NID_UI_CTRL, "[E_SYSTEM] A system error has occurred. This list style does not support Checked items"); + SetLastResult(E_SYSTEM); + return false; + } +} + +bool +_SlidableListImpl::IsItemLoaded(int index) const +{ + if (_itemsList.GetCount() == 0) + { + return false; + } + else + { + int min = ((__totalItemCount > __itemCacheSize) ? __itemCacheSize : __totalItemCount); + return (index >= __topIndex && index < __topIndex + min) ? true : false; + } +} + +bool +_SlidableListImpl::IsLoadedItemEnabled(int index) const +{ + int itemIndex = -1; + int groupIndex = -1; + GetCore().GetTopDrawnItemIndex(groupIndex, itemIndex); + int topDrawnItemIndex = itemIndex; + GetCore().GetBottomDrawnItemIndex(groupIndex, itemIndex); + int bottomDrawnItemIndex = itemIndex; + + if (index < __topIndex || index > __topIndex + _itemsList.GetCount()) + { + return false; + } + else + { + if ((index >= topDrawnItemIndex && index <= bottomDrawnItemIndex)) + { + return GetCore().IsItemEnabled(0, index); + } + else + { + return false; + } + } +} + +int +_SlidableListImpl::GetTopItemIndex(void) +{ + return __topIndex; +} + +result +_SlidableListImpl::LoadItemToBottom(const CustomListItem& item, int itemId) +{ + SysTryReturn(NID_UI_CTRL, __isCreating == true, E_SUCCESS, E_SUCCESS, "[E_SUCCESS] Not during creation. Can be ignored."); + + _TableViewItemParams tableViewItemParams; + tableViewItemParams.pItem = (const_cast(&item)); + tableViewItemParams.width = GetCore().GetBoundsF().width; + tableViewItemParams.itemIndex = _itemsList.GetCount() + __topIndex; + tableViewItemParams.groupIndex = -1; + tableViewItemParams.isDividerEnabled = _isDividerEnabled; + tableViewItemParams.pCheckBitmaps = _pCheckBitmaps; + tableViewItemParams.annexStyle = _annexStyle; + + result r = _CustomListItemImpl::CreateTableViewItem(tableViewItemParams); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, E_SYSTEM, + "[%s] A system error has occurred. Failed to create an item at index %d.", GetErrorMessage(r), (_itemsList.GetCount() + __topIndex)); + item.__pCustomListItemImpl->itemId = itemId; + + r = _itemsList.Add(item); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, E_SYSTEM, + "[%s] A system error has occurred. Failed to insert an item at index 0.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +_SlidableListImpl::LoadItemToTop(const CustomListItem& item, int itemId) +{ + SysTryReturn(NID_UI_CTRL, __isCreating == true, E_SUCCESS, E_SUCCESS, "[E_SUCCESS] Not during creation. Can be ignored."); + + _TableViewItemParams tableViewItemParams; + tableViewItemParams.pItem = (const_cast(&item)); + tableViewItemParams.width = GetCore().GetBoundsF().width; + tableViewItemParams.itemIndex = (__topIndex - 1); + tableViewItemParams.groupIndex = -1; + tableViewItemParams.isDividerEnabled = _isDividerEnabled; + tableViewItemParams.pCheckBitmaps = _pCheckBitmaps; + tableViewItemParams.annexStyle = _annexStyle; + + result r = _CustomListItemImpl::CreateTableViewItem(tableViewItemParams); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, E_SYSTEM, + "[%s] A system error has occurred. Failed to create an item at index %d.", GetErrorMessage(r), (__topIndex - 1)); + item.__pCustomListItemImpl->itemId = itemId; + + r = _itemsList.InsertAt(item, 0); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, E_SYSTEM, + "[%s] A system error has occurred. Failed to insert an item at index 0.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +void +_SlidableListImpl::SetItemCountAndHeight(int count, int listHeight) +{ + SysTryReturnVoidResult(NID_UI_CTRL, (count > 0 && listHeight > 0), E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. Count (%d) and listHeight (%d) must be greater than 0.", + count, listHeight); + result r = E_SUCCESS; + int prevCount = __totalItemCount; + __totalItemCount = count; + + + if (_annexStyle == TABLE_VIEW_ANNEX_STYLE_MARK || _annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING)//(IsCheckedStyle() == true) + { + Boolean* pChecked = null; + 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); + SysTryReturnVoidResult(NID_UI_CTRL, pChecked, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + __pCheckedList->Add(*pChecked); + } + } + + if (!(__pItemProvider && __pItemProvider->firstTime == true)) + { + for (int itemIndex = prevCount - 1; itemIndex >= count; itemIndex--) + { + _itemsList.RemoveAt(itemIndex); + r = GetCore().RefreshTableView(0, itemIndex , TABLE_VIEW_REFRESH_TYPE_ITEM_REMOVE); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + } + for (int itemIndex = prevCount; itemIndex < count; itemIndex++) + { + r = GetCore().RefreshTableView(0, itemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_ADD); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + } + } + + + return; +} + +int +_SlidableListImpl::GetLoadedItemIndexFromItemId(int itemId) const +{ + _TableViewItemData* pTableViewItemData = null; + CustomListItem* pCustomListItem = null; + + result r = E_SUCCESS; + int topItemIndex = -1; + int bottomItemIndex = -1; + int groupIndex = -1; + + r = GetCore().GetTopDrawnItemIndex(groupIndex, topItemIndex); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, INVALID_INDEX, r, + "[%s] Propagating. Failed to get the index of top item", GetErrorMessage(r)); + r = GetCore().GetBottomDrawnItemIndex(groupIndex, bottomItemIndex); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, INVALID_INDEX, r, + "[%s]Propagating. Failed to get the index of bottom item", GetErrorMessage(r)); + + for (int index = 0; index < _itemsList.GetCount(); index++) + { + pCustomListItem = dynamic_cast(const_cast(_itemsList.GetAt(index))); + SysTryReturn(NID_UI_CTRL, pCustomListItem, INVALID_INDEX, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get the Customlist item at index %d.", index); + + SysTryReturn(NID_UI_CTRL, pCustomListItem->__pCustomListItemImpl, INVALID_INDEX, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Item instance must not be null."); + + pTableViewItemData = pCustomListItem->__pCustomListItemImpl->__pTableViewItemData; + SysTryReturn(NID_UI_CTRL, pTableViewItemData, INVALID_INDEX, E_SYSTEM, "[E_SYSTEM] A system error has occurred. ItemData must not be null."); + + if ((pTableViewItemData != null) && (pCustomListItem->__pCustomListItemImpl->itemId == itemId)) + { + SetLastResult(E_SUCCESS); + + if ((index + __topIndex >= topItemIndex) && (index + __topIndex <= bottomItemIndex)) + { + return index + __topIndex; + } + } + } + + SetLastResult(E_SUCCESS); + return INVALID_INDEX; +} + +result +_SlidableListImpl::UnloadAllItems(void) +{ + SysTryReturn(NID_UI_CTRL, __pItemProvider, E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. SlidableListener not set."); + + result r = E_SUCCESS; + + for (int itemIndex = _itemsList.GetCount() - 1; itemIndex >= 0; itemIndex--) + { + r = RemoveFromItemsList(-1, itemIndex); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. Failed to remove item at index %d", GetErrorMessage(r), itemIndex); + + r = GetCore().RefreshTableView(0, itemIndex + __topIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_REMOVE); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. Failed to remove item at index %d", GetErrorMessage(r), (itemIndex + __topIndex)); + + + if (__pCheckedList) + { + r = __pCheckedList->RemoveAt(itemIndex + __topIndex, true); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. Failed to remove Check item at index %d", GetErrorMessage(r), (itemIndex + __topIndex)); + } + + if (GetCore().GetFirstDrawnFlag() == true) + { + CallUnloadItemCb(itemIndex + __topIndex); + } + } + + return E_SUCCESS; +} + +result +_SlidableListImpl::RefreshItem(int index) +{ + SysTryReturnResult(NID_UI_CTRL, (index >= __topIndex && index <= (__topIndex + _itemsList.GetCount())), E_INVALID_ARG, + "[E_INVALID_ARG] Invalid argument is used. Index (%d) must be greater than or equal to 0 and less than or equal to (%d).", + index, (__topIndex + _itemsList.GetCount())); + + result r = E_SUCCESS; + + int topItemIndex = -1; + int bottomItemIndex = -1; + int groupIndex = -1; + + r = GetCore().GetTopDrawnItemIndex(groupIndex, topItemIndex); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, + "[%s] A system error has occurred. Failed to get the index of top item", GetErrorMessage(r)); + + r = GetCore().GetBottomDrawnItemIndex(groupIndex, bottomItemIndex); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, + "[%s] A system error has occurred. Failed to get the index of bottom item", GetErrorMessage(r)); + + SysTryReturnResult(NID_UI_CTRL, (index >= topItemIndex && index <= bottomItemIndex), E_OUT_OF_RANGE, + "Index %d must be greater than or equal to top index %d and less than or equal to bottom index %d", + index, topItemIndex, bottomItemIndex); + + CustomListItem* pCustomListItem = dynamic_cast(_itemsList.GetAt(index - __topIndex)); + SysTryReturnResult(NID_UI_CTRL, pCustomListItem, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get the Customlist item at index %d.", (index - __topIndex)); + + SysTryReturnResult(NID_UI_CTRL, pCustomListItem->__pCustomListItemImpl, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Item instance must not be null."); + + + _TableViewItemUpdateParams updateParams; + updateParams.pItem = pCustomListItem; + updateParams.isDividerEnabled = _isDividerEnabled; + updateParams.pCheckBitmaps = _pCheckBitmaps; + + r = _CustomListItemImpl::UpdateTableViewItem(updateParams); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to refresh an item."); + + _TableViewItemData* pTableViewItemData = pCustomListItem->__pCustomListItemImpl->__pTableViewItemData; + SysTryReturnResult(NID_UI_CTRL, (pTableViewItemData != null), E_SYSTEM, + "[E_SYSTEM] A system error has occurred. ItemData must not be null."); + + pTableViewItemData->Invalidate(true); + return E_SUCCESS; +} + +result +_SlidableListImpl::RemoveAllCheckedItems(int itemHeight) +{ + SysTryReturnResult(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL), E_SYSTEM, + "[E_SYSTEM] A system error has occurred. List style should not be TABLE_VIEW_ANNEX_STYLE_NORMAL."); + SysTryReturnResult(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_RADIO), E_SYSTEM, + "[E_SYSTEM] A system error has occurred. List style should not be TABLE_VIEW_ANNEX_STYLE_RADIO."); + + SysTryReturn(NID_UI_CTRL, __pItemProvider, E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. SlidableListener not set."); + + result r = E_SUCCESS; + int itemIndex = 0; + Boolean* pChecked = null; + + for (itemIndex = _itemsList.GetCount() + __topIndex; itemIndex < __totalItemCount; itemIndex++) + { + pChecked = dynamic_cast(__pCheckedList->GetAt(itemIndex)); + if ((pChecked != null) && pChecked->ToBool() == true) + { + __pCheckedList->RemoveAt(itemIndex, true); + __totalItemCount--; + } + } + + for (itemIndex = 0; itemIndex < __topIndex; itemIndex++) + { + pChecked = dynamic_cast(__pCheckedList->GetAt(itemIndex)); + if ((pChecked != null) && pChecked->ToBool() == true) + { + __pCheckedList->RemoveAt(itemIndex, true); + __totalItemCount--; + } + } + + for (itemIndex = 0; itemIndex < _itemsList.GetCount(); itemIndex++) + { + if (IsItemChecked(itemIndex + __topIndex) == true) + { + r = RemoveFromItemsList(-1, itemIndex); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to remove an item."); + + __pCheckedList->RemoveAt(itemIndex + __topIndex, true); + + r = GetCore().RefreshTableView(0, itemIndex + __topIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_REMOVE); + + if (r != E_SUCCESS) + { + SysLog(NID_UI_CTRL, "[%s] Failed to remove item at index %d.", GetErrorMessage(r), itemIndex + __topIndex); + } + + if (GetCore().GetFirstDrawnFlag() == true) + { + CallUnloadItemCb(itemIndex + __topIndex); + } + + itemIndex--; + __totalItemCount--; + } + } + + return r; +} + +result +_SlidableListImpl::RemoveAllItems(void) +{ + __totalItemCount = 0; + + __isFullUpdate = true; + GetCore().UpdateTableView(); + __isFullUpdate = false; + + if(__pCheckedList) + { + __pCheckedList->RemoveAll(true); + } + + return E_SUCCESS; +} + +void +_SlidableListImpl::RemoveCustomItemEventListener(const ICustomItemEventListener& listener) +{ + _ListListener* pListenerList = null; + + for (int listenerCount = 0; listenerCount < __itemListenersList.GetCount(); listenerCount++) + { + pListenerList = dynamic_cast<_ListListener*>(__itemListenersList.GetAt(listenerCount)); + + if ((pListenerList != null) && (pListenerList->pListener == &listener)) + { + __itemListenersList.RemoveAt(listenerCount, true); + break; + } + } +} + +result +_SlidableListImpl::RemoveItemAt(int index, int itemHeight) +{ + result r = E_SUCCESS; + + if (!(index >= __topIndex && index < __topIndex + _itemsList.GetCount())) + { + if (index >= 0 && index < __totalItemCount) + { + return E_SUCCESS; + } + else + { + return E_SYSTEM; + } + } + r = RemoveFromItemsList(-1, (index - __topIndex)); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to remove an item."); + + r = GetCore().RefreshTableView(0, index, TABLE_VIEW_REFRESH_TYPE_ITEM_REMOVE); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, + "[%s] A system error has occurred. Failed to remove item at %d", GetErrorMessage(r), index); + + if (__pCheckedList) + { + __pCheckedList->RemoveAt(index, true); + } + + __totalItemCount--; + + if (GetCore().GetFirstDrawnFlag() == true) + { + CallUnloadItemCb(index); + } + + return E_SUCCESS; +} + +void +_SlidableListImpl::ScrollToBottom(void) +{ + __isForcedScroll = true; + + result r = E_SUCCESS; + + r = GetCore().SetBottomDrawnItemIndex(0, __totalItemCount - 1); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + GetCore().Draw(); + + __isForcedScroll = false; +} + +result +_SlidableListImpl::ScrollToTop(int index) +{ + SysTryReturn(NID_UI_CTRL, (index >= 0 && index < __totalItemCount), E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] Invalid argument is used. Index (%d) must be greater than or equal to 0 and less than (%d).", index, __totalItemCount); + + result r = E_SUCCESS; + + __isForcedScroll = true; + + r = GetCore().SetTopDrawnItemIndex(0, index); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + GetCore().Draw(); + + __isForcedScroll = false; + + return E_SUCCESS; +} + +void +_SlidableListImpl::ScrollToTop(void) +{ + result r = E_SUCCESS; + + __isForcedScroll = true; + + r = GetCore().SetTopDrawnItemIndex(0, 0); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + GetCore().Draw(); + + __isForcedScroll = false; +} + +result +_SlidableListImpl::SetAllItemsChecked(bool check) +{ + SysTryReturnResult(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL), E_SYSTEM, + "[E_SYSTEM] A system error has occurred. List style should not be TABLE_VIEW_ANNEX_STYLE_NORMAL"); + SysTryReturnResult(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_RADIO), E_SYSTEM, + "[E_SYSTEM] A system error has occurred. List style should not be TABLE_VIEW_ANNEX_STYLE_RADIO"); + + CustomListItem* pCustomListItem = null; + _TableViewItemData* pTableViewItemData = null; + _CheckElementModel* pCheckElement = null; + + Boolean* pChecked = null; + int itemIndex = 0; + + for (itemIndex = 0; itemIndex < __totalItemCount; itemIndex++) + { + pChecked = new (std::nothrow) Boolean(check); + SysTryReturn(NID_UI_CTRL, pChecked, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + __pCheckedList->SetAt(*pChecked, itemIndex, true); + } + + for (int index = 0; index < _itemsList.GetCount(); index++) + { + pCustomListItem = dynamic_cast(_itemsList.GetAt(index)); + SysTryCatch(NID_UI_CTRL, pCustomListItem, , E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get an item at index %d.", index); + + SysTryCatch(NID_UI_CTRL, pCustomListItem->__pCustomListItemImpl, , E_SYSTEM, "[E_SYSTEM] A system error has occurred. Item instance must not be null"); + + pTableViewItemData = pCustomListItem->__pCustomListItemImpl->__pTableViewItemData; + SysTryCatch(NID_UI_CTRL, pTableViewItemData != null, , E_SYSTEM, "[E_SYSTEM] A system error has occurred. ItemData must not be null."); + + pCheckElement = pCustomListItem->__pCustomListItemImpl->GetCheckElement(); + SysTryCatch(NID_UI_CTRL, (pCheckElement != null), , E_SYSTEM, "[E_SYSTEM] A system error has occurred. CheckElement instance must not be null"); + + if (check) + { + pCheckElement->SetCheckBoxStatus(CHECK_BOX_CHECKED); + } + else + { + pCheckElement->SetCheckBoxStatus(CHECK_BOX_UNCHECKED); + } + } + + return E_SUCCESS; +CATCH: + delete pChecked; + + return E_SYSTEM; +} + +result +_SlidableListImpl::SetItemAt(int index, const CustomListItem& item, int itemId) +{ + result r = E_SUCCESS; + + SysTryReturnResult(NID_UI_CTRL, (index >= __topIndex && index <= (__topIndex + _itemsList.GetCount())), E_INVALID_ARG, + "[E_INVALID_ARG] Invalid argument is used. Index (%d) must be greater than or equal to 0 and less than or equal to (%d).", + index, (__topIndex + _itemsList.GetCount())); + + SysTryReturnResult(NID_UI_CTRL, (IsItemNew(item) == true), E_SYSTEM, "[E_SYSTEM] A system error has occurred. The item already exists."); + + _CheckElementModel* pCheckElement = null; + _CheckElementModel* pOldCheckElement = GetCheckElementAt(-1, index - __topIndex); + _CheckBoxStatus oldCheckStatus = (pOldCheckElement) ? (pOldCheckElement->GetCheckBoxStatus()) : CHECK_BOX_UNCHECKED; + + item.__pCustomListItemImpl->itemId = itemId; + item.__pCustomListItemImpl->__pTableViewItemData = GetTableViewItemAt(-1, index - __topIndex); + + r = _itemsList.SetAt(item, index, true); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to set an item at index %d.", index); + + _TableViewItemUpdateParams updateParams; + updateParams.pItem = (const_cast(&item));; + updateParams.isDividerEnabled = _isDividerEnabled; + updateParams.pCheckBitmaps = _pCheckBitmaps; + updateParams.annexStyle = _annexStyle; + + r = _CustomListItemImpl::UpdateTableViewItem(updateParams); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, + "[%s] A system error has occurred. Failed to update an item.", GetErrorMessage(r)); + + if (GetCore().GetFirstDrawnFlag() == false) + { + r = GetCore().RefreshTableView(0, index, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + } + + pCheckElement = item.__pCustomListItemImpl->GetCheckElement(); + + if (pCheckElement) + { + pCheckElement->SetCheckBoxStatus(oldCheckStatus); + } + + return r; +} + +result +_SlidableListImpl::SetItemChecked(int groupindex, int index, bool check) +{ + return SetItemChecked(index, check); +} + +result +_SlidableListImpl::SetItemChecked(int index, bool check) +{ + SysTryReturnResult(NID_UI_CTRL, (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL), E_SYSTEM, + "[E_SYSTEM] A system error has occurred. List style should not be TABLE_VIEW_ANNEX_STYLE_NORMAL"); + + SysTryReturnResult(NID_UI_CTRL, (index >= 0 && index < __totalItemCount), E_INVALID_ARG, + "[E_INVALID_ARG] Invalid argument is used. Index (%d) must be greater than or equal to 0 and less than (%d).", index, __totalItemCount); + + if (IsItemChecked(index) == check) + { + return E_SUCCESS; + } + + _CheckElementModel* pCheckElementModel = GetCheckElementAt(-1, index - __topIndex); + SysTryReturnResult(NID_UI_CTRL, pCheckElementModel, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. CheckElement instance must not be null."); + + if (_annexStyle == TABLE_VIEW_ANNEX_STYLE_RADIO) + { + if (_currentRadioIndex != -1) + { + _CheckElementModel* pOldCheckElement = GetCheckElementAt(-1, _currentRadioIndex - __topIndex); + + if (pOldCheckElement) + { + pOldCheckElement->SetCheckBoxStatus(CHECK_BOX_UNCHECKED); + DrawItem(-1, _currentRadioIndex - __topIndex); + } + _currentRadioIndex = index; + } + else + { + _currentRadioIndex = -1; + } + + if (check) + { + pCheckElementModel->SetCheckBoxStatus(CHECK_BOX_CHECKED); + _currentRadioIndex = index; + } + else + { + pCheckElementModel->SetCheckBoxStatus(CHECK_BOX_UNCHECKED); + _currentRadioIndex = -1; + } + } + else + { + Boolean* pChecked = new (std::nothrow) Boolean(check); + SysTryReturnResult(NID_UI_CTRL, pChecked, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + __pCheckedList->SetAt(*pChecked, index, true); + + pCheckElementModel->SetCheckBoxStatus((_CheckBoxBitmapType)check); + } + + DrawItem(-1, index - __topIndex); + + return E_SUCCESS; +} + +result +_SlidableListImpl::SetLoadedItemEnabled(int index, bool enable) +{ + result r = E_SUCCESS; + + SysTryReturnResult(NID_UI_CTRL, (index >= __topIndex && index < _itemsList.GetCount() + __topIndex), + E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument is used. Index (%d) must be greater than or equal to 0 and less than (%d).", + index, _itemsList.GetCount()); + + CustomListItem* pCustomListItem = dynamic_cast(_itemsList.GetAt(index - __topIndex)); + SysTryReturnResult(NID_UI_CTRL, pCustomListItem, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get an item at %d index.", index); + + _CustomListItemImpl* pCustomListItemImpl = pCustomListItem->__pCustomListItemImpl; + SysTryReturnResult(NID_UI_CTRL, pCustomListItemImpl, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Item instance must not be null."); + + _TableViewItemData* pTableViewItemData = pCustomListItemImpl->__pTableViewItemData; + SysTryReturnResult(NID_UI_CTRL, pTableViewItemData, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get an item at %d index.", index); + + r = GetCore().SetItemEnabled(0, index, enable); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[%s] Failed to set an item enabled at index %d.", GetErrorMessage(r), index); + + pTableViewItemData->Invalidate(true); + + return r; +} + +result +_SlidableListImpl::Initalize(void) +{ + result r = E_SUCCESS; + + r = GetCore().AddTableViewItemEventListener(*this); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Failed to add item event listener.", GetErrorMessage(r)); + + __totalItemCount = 0; + __topIndex = 0; + + __itemCacheSize = GetCore().GetMaxItemCachingSize(); + + if (_annexStyle == TABLE_VIEW_ANNEX_STYLE_MARK || _annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING) + { + __pCheckedList = new (std::nothrow) ArrayList(); + SysTryReturnResult(NID_UI_CTRL, __pCheckedList, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + __pCheckedList->Construct(); + } + + return E_SUCCESS; +} + +void +_SlidableListImpl::CallUnloadItemCb(int index) +{ + _ListListener* pListenerData = null; + ISlidableListEventListener* pSlidableListener = null; + + for (int listenerCount = 0; listenerCount < __slidableListenersList.GetCount(); listenerCount++) + { + pListenerData = dynamic_cast<_ListListener*>(__slidableListenersList.GetAt(listenerCount)); + + if (pListenerData) + { + pSlidableListener = dynamic_cast(pListenerData->pListener); + SysTryReturnVoidResult(NID_UI_CTRL, (pSlidableListener != null), E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get EventListener"); + pSlidableListener->OnUnloadItemRequested(GetPublic(), index); + } + } + + return; +} + +bool +_SlidableListImpl::IsCheckedStyle(void) +{ + if (((_annexStyle == TABLE_VIEW_ANNEX_STYLE_MARK || _annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING || _annexStyle == TABLE_VIEW_ANNEX_STYLE_RADIO))) + { + return true; + } + else + { + return false; + } +} + +const bool +_SlidableListImpl::IsCheckedStyle(void) const +{ + if (((_annexStyle == TABLE_VIEW_ANNEX_STYLE_MARK || _annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING || _annexStyle == TABLE_VIEW_ANNEX_STYLE_RADIO))) + { + return true; + } + else + { + return false; + } +} +void +_SlidableListImpl::OnTableViewItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int itemIndex, Tizen::Ui::Controls::_TableViewItem* itemTag, Tizen::Ui::Controls::TableViewItemStatus status) +{ + CustomListItem* pCustomListItem = dynamic_cast(_itemsList.GetAt(itemIndex - __topIndex)); + SysTryReturnVoidResult(NID_UI_CTRL, pCustomListItem, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get an item at %d index.", (itemIndex - __topIndex)); + + SysTryReturnVoidResult(NID_UI_CTRL, pCustomListItem->__pCustomListItemImpl, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Item instance must not be null"); + + _TableViewItemData* pTableViewItemData = pCustomListItem->__pCustomListItemImpl->__pTableViewItemData; + SysTryReturnVoidResult(NID_UI_CTRL, (pTableViewItemData != null), E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get an item at %d index.", (itemIndex - __topIndex)); + + ItemStatus itemStatus = ITEM_HIGHLIGHTED; + + switch (status) + { + case TABLE_VIEW_ITEM_STATUS_SELECTED: + itemStatus = ITEM_SELECTED; + break; + case TABLE_VIEW_ITEM_STATUS_HIGHLIGHTED: + itemStatus = ITEM_HIGHLIGHTED; + break; + case TABLE_VIEW_ITEM_STATUS_CHECKED: + itemStatus = ITEM_CHECKED; + break; + case TABLE_VIEW_ITEM_STATUS_UNCHECKED: + itemStatus = ITEM_UNCHECKED; + break; + default: + SetLastResult(E_SYSTEM); + break; + } + + if ((!_isDividerEnabled) && (_annexStyle != TABLE_VIEW_ANNEX_STYLE_NORMAL)) + { + bool isChecked = IsItemChecked(itemIndex); + + if (isChecked) + { + itemStatus = ITEM_UNCHECKED; + } + else + { + itemStatus = ITEM_CHECKED; + } + + SetItemChecked(itemIndex, !isChecked); + } + + ProcessItemStateChange(0, itemIndex, itemStatus); + return; +} + +void +_SlidableListImpl::OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::_TableView& tableView, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pContextItem, bool activated) +{ + return; +} + +void +_SlidableListImpl::OnTableViewItemReordered(Tizen::Ui::Controls::_TableView& tableView, int itemIndexFrom, int itemIndexTo) +{ + return; +} + +void +_SlidableListImpl::OnGroupedTableViewGroupItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status) +{ + return; +} + +void +_SlidableListImpl::OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status) +{ + return; +} + +void +_SlidableListImpl::OnGroupedTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pContextItem, bool activated) +{ + return; +} + +void +_SlidableListImpl::OnGroupedTableViewItemReordered(Tizen::Ui::Controls::_TableView& tableView, int groupIndexFrom, int itemIndexFrom, int groupIndexTo, int itemIndexTo) +{ + return; +} + +void +_SlidableListImpl::OnSectionTableViewItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int sectionIndex, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status) +{ + return; +} + +void +_SlidableListImpl::OnSectionTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::_TableView& tableView, int sectionIndex, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pContextItem, bool activated) +{ + return; +} + +void +_SlidableListImpl::OnTableViewItemSwept(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewSweepDirection direction) +{ + return; +} + +void +_SlidableListImpl::ProcessItemStateChange(int groupIndex, int index, int elementId, ItemStatus itemStatus) +{ + int itemId = GetLoadedItemIdAt(index); + _ListListener* pListenerList = null; + ICustomItemEventListener* pEventListener = null; + + int count = __itemListenersList.GetCount(); + for (int listenerCount = 0; listenerCount < count; listenerCount++) + { + pListenerList = dynamic_cast<_ListListener*>(__itemListenersList.GetAt(listenerCount)); + SysTryReturnVoidResult(NID_UI_CTRL, (pListenerList != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Listener instance is not available."); + + pEventListener = dynamic_cast(pListenerList->pListener); + SysTryReturnVoidResult(NID_UI_CTRL, (pEventListener != null), E_SYSTEM, "[E_SYSTEM] A system error has occurred. Listener instance is not available."); + + pEventListener->OnItemStateChanged(GetPublic(), index, itemId, elementId, itemStatus); + } + SetLastResult(E_SUCCESS); +} + +void +_SlidableListImpl::ProcessItemStateChange(int groupIndex, int index, ItemStatus itemStatus) +{ + int itemId = GetLoadedItemIdAt(index); + _ListListener* pListenerList = null; + ICustomItemEventListener* pEventListener = null; + + int count = __itemListenersList.GetCount(); + for (int listenerCount = 0; listenerCount < count; listenerCount++) + { + pListenerList = dynamic_cast<_ListListener*>(__itemListenersList.GetAt(listenerCount)); + SysTryReturnVoidResult(NID_UI_CTRL, (pListenerList != null), E_SYSTEM, "Failed to get Listener."); + + pEventListener = dynamic_cast(pListenerList->pListener); + SysTryReturnVoidResult(NID_UI_CTRL, (pEventListener != null), E_SYSTEM, "Failed to get Listener."); + + pEventListener->OnItemStateChanged(GetPublic(), index, itemId, itemStatus); + } + SetLastResult(E_SUCCESS); +} + +result +_SlidableListImpl::CreateItemProvider(void) +{ + if (__pItemProvider == null) + { + __pItemProvider = new (std::nothrow) _SlidableListItemProvider(this); + SysTryReturnResult(NID_UI_CTRL, __pItemProvider, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + TableViewStyle style = GetCore().GetTableViewStyle(); + SysTryCatch(NID_UI_CTRL, style == TABLE_VIEW_STYLE_SIMPLE, , E_INVALID_OPERATION, + "[E_INVALID_OPERATION] The current list cannot support the given style."); + + result r = E_SUCCESS; + + _TableViewItemProvider* pItemProvider = _TableViewItemProvider::CreateTableViewItemProviderN(style); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, pItemProvider != null, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pItemProvider->SetSimpleStyleItemProvider(__pItemProvider); + + GetCore().SetItemProvider(pItemProvider); + } + + return E_SUCCESS; + +CATCH: + if (__pItemProvider) + { + delete __pItemProvider; + __pItemProvider = null; + } + + return E_SYSTEM; +} + +void +_SlidableListImpl::OnDraw(void) +{ + if (__pItemProvider == null) + { + __pItemProvider = new (std::nothrow) _SlidableListItemProvider(this); + SysTryReturnVoidResult(NID_UI_CTRL, __pItemProvider, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + TableViewStyle style = GetCore().GetTableViewStyle(); + SysTryCatch(NID_UI_CTRL, style == TABLE_VIEW_STYLE_SIMPLE, , E_INVALID_OPERATION, + "[E_INVALID_OPERATION] The current list cannot support the given style."); + + _TableViewItemProvider* pItemProvider = _TableViewItemProvider::CreateTableViewItemProviderN(style); + result r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, pItemProvider != null, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pItemProvider->SetSimpleStyleItemProvider(__pItemProvider); + + GetCore().SetItemProvider(pItemProvider); + } + + _ListBaseImpl::OnDraw(); + return; + +CATCH: + if (__pItemProvider) + { + delete __pItemProvider; + __pItemProvider = null; + } +} + +class _SlidableListMaker + : public _UiBuilderControlMaker +{ +public: + _SlidableListMaker(_UiBuilder* uibuilder) + : _UiBuilderControlMaker(uibuilder){}; + virtual ~_SlidableListMaker(){}; + static _UiBuilderControlMaker* + GetInstance(_UiBuilder* uibuilder) + { + _SlidableListMaker* pSlidableListMaker = new (std::nothrow) _SlidableListMaker(uibuilder); + return pSlidableListMaker; + }; +protected: + virtual Tizen::Ui::Control* + Make(_UiBuilderControl* pControl) + { + result r = E_SYSTEM; + _UiBuilderControlLayout* pControlProperty = null; + SlidableList* pSlidableList = null; + Tizen::Graphics::Rectangle rect; + Tizen::Graphics::Rectangle rectMin; + Dimension dimMin; + + Tizen::Ui::Controls::CustomListStyle style = CUSTOM_LIST_STYLE_NORMAL; + Tizen::Base::String elementString; + bool isItemDivider = true; + Color color; + + GetProperty(pControl, &pControlProperty); + if (pControlProperty == null) + { + return null; + } + + pSlidableList = new (std::nothrow) SlidableList(); + if (pSlidableList == null) + { + return null; + } + + rect = pControlProperty->GetRect(); + + Tizen::Base::String styleString; + styleString = pControlProperty->GetStyle(); + + + if (styleString.Equals(L"CUSTOM_LIST_STYLE_NORMAL", false)) + { + style = CUSTOM_LIST_STYLE_NORMAL; + } + else if (styleString.Equals(L"CUSTOM_LIST_STYLE_RADIO", false)) + { + style = CUSTOM_LIST_STYLE_RADIO; + } + else if (styleString.Equals(L"CUSTOM_LIST_STYLE_RADIO_WITH_DIVIDER", false)) + { + style = CUSTOM_LIST_STYLE_RADIO_WITH_DIVIDER; + } + else if (styleString.Equals(L"CUSTOM_LIST_STYLE_MARK", false)) + { + style = CUSTOM_LIST_STYLE_MARK; + } + else if (styleString.Equals(L"CUSTOM_LIST_STYLE_MARK_WITH_DIVIDER", false)) + { + style = CUSTOM_LIST_STYLE_MARK_WITH_DIVIDER; + } + else if (styleString.Equals(L"CUSTOM_LIST_STYLE_ONOFF", false)) + { + style = CUSTOM_LIST_STYLE_ONOFF; + } + else if (styleString.Equals(L"CUSTOM_LIST_STYLE_ONOFF_WITH_DIVIDER", false)) + { + style = CUSTOM_LIST_STYLE_ONOFF_WITH_DIVIDER; + } + else + { + style = CUSTOM_LIST_STYLE_NORMAL; + } + + //Construct + if (pControl->GetElement("itemDivider", elementString)) + { + if (elementString.Equals(L"true", false)) + { + isItemDivider = true; + } + else + { + isItemDivider = false; + } + } + + r = pSlidableList->Construct(rect, style, isItemDivider); + if (r != E_SUCCESS) + { + delete pSlidableList; + return null; + } + + if (pControl->GetElement("textOfEmptyList", elementString)) + { + pSlidableList->SetTextOfEmptyList(elementString); + } + + if (pControl->GetElement("colorOfEmptyListText", elementString)) + { + ConvertStringToColor(elementString, color); + pSlidableList->SetTextColorOfEmptyList(color); + } + + GET_DIMENSION_CONFIG(LIST::LIST_MIN_SIZE, _CONTROL_ORIENTATION_PORTRAIT, dimMin); + rectMin = (pControl->GetAttribute(0))->GetRect(); + (pControl->GetAttribute(0))->SetRect(rectMin.x, rectMin.y, dimMin.width, dimMin.height); + + GET_DIMENSION_CONFIG(LIST::LIST_MIN_SIZE, _CONTROL_ORIENTATION_LANDSCAPE, dimMin); + rectMin = (pControl->GetAttribute(1))->GetRect(); + (pControl->GetAttribute(1))->SetRect(rectMin.x, rectMin.y, dimMin.width, dimMin.height); + + return pSlidableList; + } + +private: +}; + + +_SlidableListRegister::_SlidableListRegister() +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + + if (pUiBuilderControlTableManager) + { + pUiBuilderControlTableManager->RegisterControl(L"SlidableList", _SlidableListMaker::GetInstance); + } +} +_SlidableListRegister::~_SlidableListRegister() +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + + if (pUiBuilderControlTableManager) + { + pUiBuilderControlTableManager->UnregisterControl(L"SlidableList"); + } +} +static _SlidableListRegister SlidableListRegisterToUiBuilder; +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_Slider.cpp b/src/ui/controls/FUiCtrl_Slider.cpp new file mode 100644 index 0000000..393edc9 --- /dev/null +++ b/src/ui/controls/FUiCtrl_Slider.cpp @@ -0,0 +1,1106 @@ +// +// 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_Slider.cpp + * @brief This is the implementation file for the _Slider class. + */ + +#include +#include +#include +#include +#include "FUi_ResourceManager.h" +#include "FUi_AccessibilityContainer.h" +#include "FUi_AccessibilityElement.h" +#include "FUiAnim_VisualElement.h" +#include "FUiCtrl_Slider.h" +#include "FUiCtrl_SliderPresenter.h" +#include "FUiCtrl_IAdjustmentEventListener.h" +#include "FUiCtrl_ISliderEventListener.h" +#include "FUiCtrl_SliderOverlay.h" + +using namespace Tizen::Ui; +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Ui::Animations; +using namespace Tizen::Base::Runtime; + +namespace Tizen { namespace Ui { namespace Controls +{ +IMPLEMENT_PROPERTY(_Slider); + +_Slider::_Slider(void) + : __pSliderPresenter(null) + , __pAdjustmentEvent(null) + , __pSliderEvent(null) + , __titleText() + , __pLeftBitmap(null) + , __pRightBitmap(null) + , __bgColor() + , __barColor() + , __barBgColor() + , __titleTextColor() + , __sliderStyle(_SLIDER_STYLE_OVERLAY) + , __pBase(null) + , __pHandle(null) + , __pAccessibilityElement(null) + , __isKeyPressed(false) +{ + __pBase = GetVisualElement(); + + if (__pBase != null) + { + __pBase->SetSurfaceOpaque(false); + __pBase->SetClipChildrenEnabled(false); + } + + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + if (pContainer != null) + { + pContainer->Activate(true); + } +} + +_Slider::~_Slider(void) +{ + delete __pAdjustmentEvent; + __pAdjustmentEvent = null; + + delete __pSliderEvent; + __pSliderEvent = null; + + delete __pLeftBitmap; + __pLeftBitmap = null; + + delete __pRightBitmap; + __pRightBitmap = null; + + delete __pSliderPresenter; + __pSliderPresenter = null; + + if (__pAccessibilityElement != null) + { + __pAccessibilityElement->Activate(false); + __pAccessibilityElement = null; + } + + if (__pBase != null && __pHandle != null) + { + __pBase->DetachChild(*__pHandle); + __pHandle->Destroy(); + } + + __pHandle = null; + __pBase = null; +} + +_Slider* +_Slider::CreateSliderN(void) +{ + result r = E_SUCCESS; + + _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(); + SysTryCatch(NID_UI_CTRL, pSlider->__pSliderPresenter != null, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pSlider->Initialize(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pSlider->AcquireHandle(); + + return pSlider; + +CATCH: + delete pSlider; + pSlider = null; + SetLastResult(r); + return null; +} + +result +_Slider::Initialize(void) +{ + result r = E_SUCCESS; + + FloatRectangle handleRect(0.0f, 0.0f, 0.0f, 0.0f); + _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); + + r = GET_COLOR_CONFIG(SLIDER::BG_DEFAULT_NORMAL, __bgColor); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = GET_COLOR_CONFIG(SLIDER::BAR_NORMAL, __barColor); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = GET_COLOR_CONFIG(SLIDER::BAR_BG_NORMAL, __barBgColor); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = GET_COLOR_CONFIG(SLIDER::TITLE_TEXT_NORMAL, __titleTextColor); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = GET_SHAPE_CONFIG(SLIDER::HANDLE_WIDTH, orientation, handleRect.width); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = GET_SHAPE_CONFIG(SLIDER::HANDLE_HEIGHT, orientation, handleRect.height); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + __pHandle = new (std::nothrow) _VisualElement(); + SysTryReturnResult(NID_UI_CTRL, __pHandle != null, E_OUT_OF_MEMORY, "Memory allocation failed."); + + r = __pHandle->Construct(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + __pHandle->SetBounds(FloatRectangle(handleRect.x, handleRect.y, handleRect.width, handleRect.height)); + + __pHandle->SetShowState(true); + + __pBase->SetClipChildrenEnabled(true); + __pHandle->SetClipToParent(true); + + + r = __pHandle->SetSurfaceOpaque(false); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + __pHandle->SetImplicitAnimationEnabled(false); + + r = __pBase->AttachChild(*__pHandle); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + __pAdjustmentEvent = _AdjustmentEvent::CreateInstanceN(*this); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, __pAdjustmentEvent, r, "Propagating."); + + __pSliderEvent = _SliderEvent::CreateInstanceN(*this); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, __pSliderEvent, r, "Propagating."); + + InitializeAccessibilityElement(); + + return r; +} + +result +_Slider::InitializeAccessibilityElement(void) +{ + result r = E_SUCCESS; + + if (__pAccessibilityElement != null) + { + return r; + } + + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + if (pContainer != null) + { + __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->SetLabel(__titleText); + __pAccessibilityElement->SetName(L"SliderControl"); + __pAccessibilityElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_SLIDER_T_TTS"); + __pAccessibilityElement->SetHintWithStringId("IDS_TPLATFORM_BODY_FLICK_UP_AND_DOWN_TO_ADJUST_THE_POSITION_T_TTS"); + SetAccessibilityElementValue(); + r = pContainer->AddElement(*__pAccessibilityElement); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + pContainer->AddListener(*this); + } + + return r; +} + +void +_Slider::OnDraw(void) +{ + __pSliderPresenter->Draw(); + return; +} + +result +_Slider::OnAttachedToMainTree(void) +{ + return _Control::OnAttachedToMainTree(); +} + +void +_Slider::SetStyle(int style) +{ + __sliderStyle = style; + return; +} + +int +_Slider::GetStyle(void) const +{ + return __sliderStyle; +} + +Canvas* +_Slider::GetHandleCanvasN(void) const +{ + return __pHandle->GetCanvasN(); +} + +_VisualElement* +_Slider::GetHandle(void) const +{ + return __pHandle; +} + +void +_Slider::SetGroupStyle(GroupStyle groupStyle) +{ + __pSliderPresenter->SetGroupStyle(groupStyle); + return; +} + +result +_Slider::UpdateHandle(const FloatRectangle& handleRect) +{ + __pHandle->SetBounds(handleRect); + + return __pHandle->SetFlushNeeded(); +} + +bool +_Slider::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pSliderPresenter->OnTouchPressed(source, touchinfo); +} + +bool +_Slider::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pSliderPresenter->OnTouchReleased(source, touchinfo); +} + +bool +_Slider::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pSliderPresenter->OnTouchMoved(source, touchinfo); +} + +bool +_Slider::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pSliderPresenter->OnTouchCanceled(source, touchinfo); +} + +void +_Slider::OnDrawFocus(void) +{ + __pSliderPresenter->SetFocusMode(true); + Invalidate(); + + return; +} + +bool +_Slider::OnFocusGained(const _Control& source) +{ + if (IsFocusModeStateEnabled()) + { + __pSliderPresenter->SetFocusMode(true); + Invalidate(); + } + + return true; +} + +bool +_Slider::OnFocusLost(const _Control& source) +{ + __pSliderPresenter->SetFocusMode(false); + + if ((GetStyle() & _SLIDER_STYLE_OVERLAY) && (!__pSliderPresenter->IsTouchPressed()) && (__isKeyPressed)) + { + _SliderOverlay* pSliderOverlay = __pSliderPresenter->GetSliderOverlay(); + pSliderOverlay->SetVisibleState(false); + pSliderOverlay->Close(); + } + + if (__isKeyPressed) + { + FireAdjustmentValueEvent(GetValue()); + } + + __isKeyPressed = false; + Invalidate(); + + return true; +} + +void +_Slider::OnFocusModeStateChanged() +{ + __pSliderPresenter->SetFocusMode(false); + + if ((GetStyle() & _SLIDER_STYLE_OVERLAY) && __isKeyPressed) + { + _SliderOverlay* pSliderOverlay = __pSliderPresenter->GetSliderOverlay(); + pSliderOverlay->SetVisibleState(false); + pSliderOverlay->Close(); + } + + if (__isKeyPressed) + { + FireAdjustmentValueEvent(GetValue()); + } + + __isKeyPressed = false; + + Invalidate(); +} + +bool +_Slider::IsKeyPressed() const +{ + return __isKeyPressed; +} + +bool +_Slider::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) +{ + if (__pSliderPresenter->GetFocusMode() == false) + { + return false; + } + + _KeyCode keyCode = keyInfo.GetKeyCode(); + + if (keyCode == _KEY_RIGHT) + { + if (__pSliderPresenter->GetMaxValue() == GetValue()) + { + return false; + } + + __pSliderPresenter->SetValue(GetValue() + 1); + SetAccessibilityElementValue(); + + FireSliderMoveEvent(GetValue()); + + if (GetStyle() & _SLIDER_STYLE_OVERLAY) + { + _SliderOverlay* pSliderOverlay = __pSliderPresenter->GetSliderOverlay(); + pSliderOverlay->SetVisibleState(true); + pSliderOverlay->Open(); + __isKeyPressed = true; + } + + Invalidate(); + return true; + } + + if (keyCode == _KEY_LEFT) + { + if (__pSliderPresenter->GetMinValue() == GetValue()) + { + return false; + } + + __pSliderPresenter->SetValue(GetValue() - 1); + SetAccessibilityElementValue(); + + FireSliderMoveEvent(GetValue()); + + if (GetStyle() & _SLIDER_STYLE_OVERLAY) + { + _SliderOverlay* pSliderOverlay = __pSliderPresenter->GetSliderOverlay(); + pSliderOverlay->SetVisibleState(true); + pSliderOverlay->Open(); + __isKeyPressed = true; + } + + Invalidate(); + return true; + } + + return false; +} + +bool +_Slider::OnKeyReleased(const _Control &source, const _KeyInfo &keyInfo) +{ + if (__pSliderPresenter->GetFocusMode() == false) + { + return false; + } + + _KeyCode keyCode = keyInfo.GetKeyCode(); + + if (keyCode == _KEY_LEFT || keyCode == _KEY_RIGHT) + { + if ((GetStyle() & _SLIDER_STYLE_OVERLAY) && (__isKeyPressed == true)) + { + _SliderOverlay* pSliderOverlay = __pSliderPresenter->GetSliderOverlay(); + pSliderOverlay->SetVisibleState(false); + pSliderOverlay->Close(); + } + + FireAdjustmentValueEvent(GetValue()); + __isKeyPressed = false; + + Invalidate(); + return true; + } + + return false; +} + +void +_Slider::OnBoundsChanged(void) +{ + __pSliderPresenter->OnBoundsChanged(); + if (__pAccessibilityElement != null) + { + __pAccessibilityElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBounds().width, GetBounds().height)); + } + + return; +} + +void +_Slider::OnChangeLayout(_ControlOrientation orientation) +{ + __pSliderPresenter->OnChangeLayout(orientation); + return; +} + +result +_Slider::SetRange(int minValue, int maxValue) +{ + result r = E_SUCCESS; + + 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)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, " Failed to set minimum value."); + + r = SetProperty("maxValue", Variant(maxValue)); + if (r != E_SUCCESS) + { + SysLogException(NID_UI_CTRL, r, "[%s] Failed to set maximum value.", GetErrorMessage(r)); + + result nestedResult = SetPropertyMinValue(oldMinValue); + if (nestedResult != E_SUCCESS) + { + SysLog(NID_UI_CTRL, "Failed to recover original minimum value"); + return r; + } + + nestedResult = SetPropertyValue(value); + if (nestedResult != E_SUCCESS) + { + SysLog(NID_UI_CTRL, "Failed to recover original value"); + } + } + + SetAccessibilityElementValue(); + + return r; +} + +result +_Slider::SetPropertyMinValue(const Variant& minValue) +{ + result r = E_SUCCESS; + + int tempMinValue = minValue.ToInt(); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + __pSliderPresenter->SetMinValue(tempMinValue); + + return r; +} + +result +_Slider::SetPropertyMaxValue(const Variant& maxValue) +{ + result r = E_SUCCESS; + + int tempMaxValue = maxValue.ToInt(); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, " Propagating."); + + __pSliderPresenter->SetMaxValue(tempMaxValue); + + return r; +} + +result +_Slider::GetRange(int& minValue, int& maxValue) const +{ + result r = E_SUCCESS; + + Variant minimum = GetProperty("minValue"); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + Variant maximum = GetProperty("maxValue"); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + minValue = minimum.ToInt(); + maxValue = maximum.ToInt(); + + return r; +} + +Variant +_Slider::GetPropertyMinValue(void) const +{ + return Variant(__pSliderPresenter->GetMinValue()); +} + +Variant +_Slider::GetPropertyMaxValue(void) const +{ + return Variant(__pSliderPresenter->GetMaxValue()); +} + +result +_Slider::SetValue(int value) +{ + return SetProperty("value", Variant(value)); +} + +result +_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(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + if (__pSliderPresenter->GetValue() != tempValue) + { + __pSliderPresenter->SetValue(tempValue); + + SetAccessibilityElementValue(); + } + + return r; +} + +void +_Slider::SetAccessibilityElementValue() +{ + if (__pAccessibilityElement != null) + { + String string; + GET_STRING_CONFIG(IDS_TPLATFORM_BODY_POSITION_P1SD_OF_P2SD_T_TTS, string); + char buffer[10] = {0,}; + snprintf(buffer, sizeof(buffer), "%d", GetValue()); + string.Replace(L"%1$d", buffer); + memset(buffer, 0, 10); + snprintf(buffer, sizeof(buffer), "%d", __pSliderPresenter->GetMaxValue()); + string.Replace(L"%2$d", buffer); + __pAccessibilityElement->SetValue(string); + } + + return; +} +int +_Slider::GetValue(void) const +{ + result r = E_SUCCESS; + + Variant value = GetProperty("value"); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, -1, r, "[%s] Propagating.", GetErrorMessage(r)); + + return value.ToInt(); +} + +Variant +_Slider::GetPropertyValue(void) const +{ + return Variant(__pSliderPresenter->GetValue()); +} + +result +_Slider::SetIcon(IconPosition position, const Bitmap& icon) +{ + result r = E_SUCCESS; + + float iconWidth = 0.0f; + float iconHeight = 0.0f; + _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); + Bitmap* pNewBitmap = null; + + r = GET_SHAPE_CONFIG(SLIDER::ICON_WIDTH, orientation, iconWidth); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r,"Propagating."); + + r = GET_SHAPE_CONFIG(SLIDER::ICON_HEIGHT, orientation, iconHeight); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + if (position == ICON_POSITION_LEFT) + { + pNewBitmap = _BitmapImpl::CloneN(icon); + + r = GetLastResult(); + 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)); + + delete __pLeftBitmap; + __pLeftBitmap = pNewBitmap; + + } + else //(position == ICON_POSITION_RIGHT) + { + pNewBitmap = _BitmapImpl::CloneN(icon); + + r = GetLastResult(); + 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)); + + delete __pRightBitmap; + __pRightBitmap = pNewBitmap; + + } + + __pSliderPresenter->SetNeedUpdate(); + + return E_SUCCESS; +CATCH: + delete pNewBitmap; + pNewBitmap = null; + + return E_SYSTEM; +} + +Bitmap* +_Slider::GetIcon(IconPosition position) const +{ + if (position == ICON_POSITION_LEFT) + { + return __pLeftBitmap; + } + else //(position == ICON_POSITION_RIGHT) + { + return __pRightBitmap; + } +} + +result +_Slider::SetTitleText(const String& title) +{ + return SetProperty("titleText", Variant(title)); +} + +result +_Slider::SetPropertyTitleText(const Variant& titleText) +{ + result r = E_SUCCESS; + String title = titleText.ToString(); + + if (!(GetStyle() & _SLIDER_STYLE_TITLE_TEXT)) + { + SysLogException(NID_UI_CTRL, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The current Slider style does not support title text."); + return E_SYSTEM; + } + + __titleText = title; + __pSliderPresenter->SetNeedUpdate(); + + r = InitializeAccessibilityElement(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + if (__pAccessibilityElement != null) + { + __pAccessibilityElement->SetLabel(__titleText); + } + + return r; +} + +String +_Slider::GetTitleText(void) const +{ + result r = E_SUCCESS; + + Variant titleText = GetProperty("titleText"); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, String(), r, "[%s] Propagating.", GetErrorMessage(r)); + + return titleText.ToString(); +} + +Variant +_Slider::GetPropertyTitleText(void) const +{ + return Variant(__titleText); +} + +result +_Slider::SetTitleTextColor(const Color& color) +{ + return SetProperty("titleTextColor", Variant(color)); +} + +result +_Slider::SetPropertyTitleTextColor(const Variant& titleTextColor) +{ + result r = E_SUCCESS; + + Color tempColor = titleTextColor.ToColor(); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + __titleTextColor = tempColor; + __pSliderPresenter->SetNeedUpdate(); + + return r; +} + +Color +_Slider::GetTitleTextColor(void) const +{ + result r = E_SUCCESS; + + Variant titleTexColor = GetProperty("titleTextColor"); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, Color(), r, "[%s] Propagating.", GetErrorMessage(r)); + + return titleTexColor.ToColor(); +} + +Variant +_Slider::GetPropertyTitleTextColor(void) const +{ + return Variant(__titleTextColor); +} + +result +_Slider::AddAdjustmentEventListener(const _IAdjustmentEventListener& listener) +{ + return __pAdjustmentEvent->AddListener(listener); +} + +result +_Slider::RemoveAdjustmentEventListener(const _IAdjustmentEventListener& listener) +{ + return __pAdjustmentEvent->RemoveListener(listener); +} + +result +_Slider::AddSliderEventListener(const _ISliderEventListener& listener) +{ + return __pSliderEvent->AddListener(listener); +} + +result +_Slider::RemoveSliderEventListener(const _ISliderEventListener& listener) +{ + return __pSliderEvent->RemoveListener(listener); +} + +result +_Slider::SetBarColor(const Color& color) +{ + return SetProperty("barColor", Variant(color)); +} + +result +_Slider::SetPropertyBarColor(const Variant& barColor) +{ + result r = E_SUCCESS; + + Color tempBarColor = barColor.ToColor(); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + __barColor = tempBarColor; + __barColor.SetAlpha(0xFF); + + return r; +} + +Color +_Slider::GetBarColor(void) const +{ + result r = E_SUCCESS; + + Variant barColor = GetProperty("barColor"); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, Color(), r, "[%s] Propagating.", GetErrorMessage(r)); + + return barColor.ToColor(); +} + +Variant +_Slider::GetPropertyBarColor(void) const +{ + return Variant(__barColor); +} + +result +_Slider::SetBarBackgroundColor(const Color& color) +{ + return SetProperty("barBackgroundColor", Variant(color)); +} + +result +_Slider::SetPropertyBarBackgroundColor(const Variant& barBackgroundColor) +{ + result r = E_SUCCESS; + + Color tempBarBackgroundColor = barBackgroundColor.ToColor(); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + __barBgColor = tempBarBackgroundColor; + __barBgColor.SetAlpha(0xFF); + + return r; +} + +Color +_Slider::GetBarBackgroundColor(void) const +{ + result r = E_SUCCESS; + + Variant barBgColor = GetProperty("barBackgroundColor"); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, Color(), r, "[%s] Propagating.", GetErrorMessage(r)); + + return barBgColor.ToColor(); +} + +Variant +_Slider::GetPropertyBarBackgroundColor(void) const +{ + return Variant(__barBgColor); +} + +result +_Slider::SetColor(const Color& color) +{ + return SetProperty("color", Variant(color)); +} + +result +_Slider::SetPropertyColor(const Variant& color) +{ + if (__sliderStyle & _SLIDER_STYLE_NO_BG) + { + SysLogException(NID_UI_CTRL, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The current Slider style does not support background color."); + return E_INVALID_OPERATION; + } + + result r = E_SUCCESS; + + Color tempBgColor = color.ToColor(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + __bgColor = tempBgColor; + + __pSliderPresenter->SetNeedUpdate(); + + return r; +} + +Color +_Slider::GetColor(void) const +{ + result r = E_SUCCESS; + + Variant color = GetProperty("color"); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, Color(), r, "[%s] Propagating.", GetErrorMessage(r)); + + return color.ToColor(); +} + +Variant +_Slider::GetPropertyColor(void) const +{ + if (__sliderStyle & _SLIDER_STYLE_NO_BG) + { + SysLogException(NID_UI_CTRL, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The current Slider style does not support background color."); + return Variant(Color()); + } + else + { + return Variant(__bgColor); + } +} + +Tizen::Base::Runtime::_Event* +_Slider::GetAdjustmentEvent(void) const +{ + return __pAdjustmentEvent; +} + +_SliderEvent* +_Slider::GetSliderEvent(void) const +{ + return __pSliderEvent; +} + +result +_Slider::SetThumbBitmap(SliderThumbStatus status, const Bitmap& bitmap) +{ + return __pSliderPresenter->SetThumbBitmap(status, bitmap); +} + +void +_Slider::SetThumbTextColor(SliderThumbStatus status, const Color& color) +{ + __pSliderPresenter->SetThumbTextColor(status, color); + return; +} + +void +_Slider::OnFontChanged(Font* pFont) +{ + __pSliderPresenter->OnFontChanged(pFont); + return; +} + +void +_Slider::OnFontInfoRequested(unsigned long& style, float& size) +{ + __pSliderPresenter->OnFontInfoRequested(style, size); + return; +} + +void +_Slider::OnAncestorVisibleStateChanged(const _Control& control) +{ + __pSliderPresenter->OnAncestorVisibleStateChanged(control); + + return; +} + +void +_Slider::OnAncestorEnableStateChanged(const _Control& control) +{ + __pSliderPresenter->OnAncestorEnableStateChanged(control); + + return; +} + +void +_Slider::OnVisibleStateChanged(void) +{ + __pSliderPresenter->OnVisibleStateChanged(); + + return; +} + +bool +_Slider::OnAccessibilityValueIncreased(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + if (!GetEnableState()) + { + return true; + } + SetValue(GetValue() + 1); + String string; + GET_STRING_CONFIG(IDS_TPLATFORM_BODY_POSITION_P1SD_OF_P2SD_T_TTS, string); + char buffer[10] = {0,}; + snprintf(buffer, sizeof(buffer), "%d", GetValue()); + string.Replace(L"%1$d", buffer); + memset(buffer, 0, 10); + snprintf(buffer, sizeof(buffer), "%d", __pSliderPresenter->GetMaxValue()); + string.Replace(L"%2$d", buffer); + _AccessibilityManager::GetInstance()->ReadContent(string); + + Invalidate(); + FireSliderMoveEvent(GetValue()); + FireAdjustmentValueEvent(GetValue()); + + return true; +} + +bool +_Slider::OnAccessibilityValueDecreased(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + if (!GetEnableState()) + { + return true; + } + SetValue(GetValue() - 1); + String string; + GET_STRING_CONFIG(IDS_TPLATFORM_BODY_POSITION_P1SD_OF_P2SD_T_TTS, string); + char buffer[10] = {0,}; + snprintf(buffer, sizeof(buffer), "%d", GetValue()); + string.Replace(L"%1$d", buffer); + memset(buffer, 0, 10); + snprintf(buffer, sizeof(buffer), "%d", __pSliderPresenter->GetMaxValue()); + string.Replace(L"%2$d", buffer); + _AccessibilityManager::GetInstance()->ReadContent(string); + + Invalidate(); + FireSliderMoveEvent(GetValue()); + FireAdjustmentValueEvent(GetValue()); + + return true; +} + +void +_Slider::FireSliderMoveEvent(int value) +{ + if (__pSliderEvent != null) + { + IEventArg* pEventArg = _SliderEvent::CreateSliderEventArgN(value); + + if (pEventArg == null) + { + return; + } + + __pSliderEvent->Fire(*pEventArg); + } +} + +void +_Slider::FireAdjustmentValueEvent(int adjustment) +{ + if (__pAdjustmentEvent != null) + { + IEventArg* pEventArg = _AdjustmentEvent::CreateAdjustmentEventArgN(adjustment); + if (pEventArg == null) + { + return; + } + + __pAdjustmentEvent->Fire(*pEventArg); + } +} +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_SliderEvent.cpp b/src/ui/controls/FUiCtrl_SliderEvent.cpp new file mode 100644 index 0000000..61aeba5 --- /dev/null +++ b/src/ui/controls/FUiCtrl_SliderEvent.cpp @@ -0,0 +1,142 @@ +// +// 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_SliderEvent.cpp + * @brief This is the implementation for the _SliderEvent class. + * + * This file contains the implementation of _SliderEvent class. @n + */ + +#include +#include +#include +#include "FUiCtrl_ISliderEventListener.h" +#include "FUiCtrl_SliderEvent.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _OSP_EXPORT_ _SliderEventArg + : public IEventArg + , public Object +{ +// Lifecycle +public: + _SliderEventArg(int value); + virtual ~_SliderEventArg(void); + +// Access +public: + int GetValue(void) const; + +// Attribute +private: + int __value; + +}; // _SliderEventArg + +_SliderEventArg::_SliderEventArg(int value) + : __value(value) +{ +} + +_SliderEventArg::~_SliderEventArg(void) +{ +} + +int +_SliderEventArg::GetValue(void) const +{ + return __value; +} + + +_SliderEvent::_SliderEvent(const _Slider& source) + : __pSource(null) +{ + result r = _Event::Initialize(); + + // set event source + if (r == E_SUCCESS) + { + __pSource = const_cast <_Slider*>(&source); + } +} + +_SliderEvent::~_SliderEvent(void) +{ +} + +_SliderEvent* +_SliderEvent::CreateInstanceN(const _Slider& source) +{ + _SliderEvent* pSliderEvent = new (std::nothrow) _SliderEvent(source); + SysTryReturn(NID_UI_CTRL, pSliderEvent != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + if (IsFailed(GetLastResult())) + { + goto CATCH; + } + + return pSliderEvent; + +CATCH: + delete pSliderEvent; + pSliderEvent = null; + + return null; +} + +const _Slider* +_SliderEvent::GetSource(void) const +{ + return __pSource; +} + +void +_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, + "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, + "Invalid argument(s) is used. The _SliderEventArg is null"); + + // call cursor change event listener method + pSliderListener->OnSliderBarMoved(*__pSource, pSliderEventArg->GetValue()); + SetLastResult(E_SUCCESS); + return ; +} + +IEventArg* +_SliderEvent::CreateSliderEventArgN(int value) +{ + _SliderEventArg* pEventArg = new (std::nothrow) _SliderEventArg(value); + SysTryReturn(NID_UI_CTRL, pEventArg != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + return pEventArg; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_SliderImpl.cpp b/src/ui/controls/FUiCtrl_SliderImpl.cpp new file mode 100644 index 0000000..840fecf --- /dev/null +++ b/src/ui/controls/FUiCtrl_SliderImpl.cpp @@ -0,0 +1,772 @@ +// +// 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_SliderImpl.cpp + * @brief This is the implementation file for the _SliderImpl class. + */ + +#include +#include +#include +#include +#include "FUi_ResourceManager.h" +#include "FUi_ResourceSizeInfo.h" +#include "FUi_UiBuilder.h" +#include "FUiCtrl_SliderImpl.h" +#include "FUiCtrl_PublicAdjustmentEvent.h" +#include "FUiCtrl_PublicSliderEvent.h" + +using namespace Tizen::Ui; +using namespace Tizen::Graphics; +using namespace Tizen::Base; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_SliderImpl* +_SliderImpl::GetInstance(Slider& slider) +{ + return static_cast<_SliderImpl*> (slider._pControlImpl); +} + +const _SliderImpl* +_SliderImpl::GetInstance(const Slider& slider) +{ + return static_cast (slider._pControlImpl); +} + +_SliderImpl::_SliderImpl(Slider* pPublic, _Slider* pCore) + : _ControlImpl(pPublic, pCore) + , __pPublicAdjustmentEvent(null) + , __pPublicSliderEvent(null) +{ +} + +_SliderImpl::~_SliderImpl(void) +{ + delete __pPublicAdjustmentEvent; + __pPublicAdjustmentEvent = null; + + delete __pPublicSliderEvent; + __pPublicSliderEvent = null; +} + +_SliderImpl* +_SliderImpl::CreateSliderImplN(Slider* pControl, const Rectangle& rect, int sliderStyle) +{ + ClearLastResult(); + + result r = E_SUCCESS; + + r = FUNC_SIZE_INFO(Slider)(sliderStyle).CheckInitialSizeValid(Dimension(rect.width, rect.height), _CONTROL_ORIENTATION_PORTRAIT); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + _Slider* pCore = _Slider::CreateSliderN(); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pCore != null, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + _SliderImpl* pImpl = new (std::nothrow) _SliderImpl(pControl, pCore); + 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, "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, "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)); + + r = pCore->AddSliderEventListener(*pImpl); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return pImpl; + +CATCH: + delete pImpl; + pImpl = null; + + return null; +} + +_SliderImpl* +_SliderImpl::CreateSliderImplFN(Slider* pControl, const FloatRectangle& rect, int sliderStyle) +{ + ClearLastResult(); + + result r = E_SUCCESS; + + r = FUNC_SIZE_INFO(Slider)(sliderStyle).CheckInitialSizeValidF(FloatDimension(rect.width, rect.height), _CONTROL_ORIENTATION_PORTRAIT); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + _Slider* pCore = _Slider::CreateSliderN(); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pCore != null, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + _SliderImpl* pImpl = new (std::nothrow) _SliderImpl(pControl, pCore); + 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, "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, "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)); + + r = pCore->AddSliderEventListener(*pImpl); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return pImpl; + +CATCH: + delete pImpl; + pImpl = null; + + return null; +} + +result +_SliderImpl::Initialize(int minValue, int maxValue, BackgroundStyle bgStyle, int sliderStyle, GroupStyle groupStyle) +{ + ClearLastResult(); + + result r = E_SUCCESS; + + int style = _SLIDER_STYLE_NONE; + + if (sliderStyle & SLIDER_STYLE_BUBBLE) + { + style |= _SLIDER_STYLE_OVERLAY; + } + + if (bgStyle == BACKGROUND_STYLE_NONE) + { + 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; + } + if (sliderStyle & SLIDER_STYLE_TITLE) + { + style |= _SLIDER_STYLE_TITLE_TEXT; + } + + r = SetRange(minValue, maxValue); + 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); + + return r; +} + +result +_SliderImpl::SetRange(int minValue, int maxValue) +{ + ClearLastResult(); + + return GetCore().SetRange(minValue, maxValue); +} + +result +_SliderImpl::GetRange(int& minValue, int& maxValue) const +{ + ClearLastResult(); + + return GetCore().GetRange(minValue, maxValue); +} + +result +_SliderImpl::SetValue(int value) +{ + ClearLastResult(); + + Variant varValue(value); + + return GetCore().SetPropertyValue(varValue); +} + +int +_SliderImpl::GetValue(void) const +{ + ClearLastResult(); + + return GetCore().GetPropertyValue().ToInt(); +} + +result +_SliderImpl::SetIcon(IconPosition position, const Bitmap& icon) +{ + ClearLastResult(); + + return GetCore().SetIcon(position, icon); +} + +result +_SliderImpl::SetTitleText(const String& title) +{ + ClearLastResult(); + + Variant varTitleText(title); + + return GetCore().SetPropertyTitleText(varTitleText); +} + +String +_SliderImpl::GetTitleText(void) const +{ + ClearLastResult(); + + return GetCore().GetPropertyTitleText().ToString(); +} + +result +_SliderImpl::SetTitleTextColor(const Color& color) +{ + ClearLastResult(); + + Variant varTitleTextColor(color); + + return GetCore().SetPropertyTitleTextColor(varTitleTextColor); +} + +Color +_SliderImpl::GetTitleTextColor(void) const +{ + ClearLastResult(); + + return GetCore().GetPropertyTitleTextColor().ToColor(); +} + +result +_SliderImpl::AddAdjustmentEventListener(IAdjustmentEventListener& listener) +{ + ClearLastResult(); + + result r = __pPublicAdjustmentEvent->AddListener(listener); + SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_ALREADY_EXIST, E_SYSTEM, "A system error has occurred. The IAdjustmentEventListener instance already exists in the event listener list."); + + return r; +} + +result +_SliderImpl::RemoveAdjustmentEventListener(IAdjustmentEventListener& listener) +{ + ClearLastResult(); + + result r = __pPublicAdjustmentEvent->RemoveListener(listener); + SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_NOT_FOUND, E_SYSTEM, "A system error has occurred. The IAdjustmentEventListener instance does not exist"); + + return r; +} + +result +_SliderImpl::AddSliderEventListener(const ISliderEventListener& listener) +{ + ClearLastResult(); + + result r = __pPublicSliderEvent->AddListener(listener); + SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_ALREADY_EXIST, E_SYSTEM, "A system error has occurred. The ISliderEventListener instance already exists in the event listener list."); + + return r; +} + +result +_SliderImpl::RemoveSliderEventListener(const ISliderEventListener& listener) +{ + ClearLastResult(); + + result r = __pPublicSliderEvent->RemoveListener(listener); + SysTryReturnResult(NID_UI_CTRL, r != E_OBJ_NOT_FOUND, E_SYSTEM, "A system error has occurred. The ISliderEventListener does not exist in the event listener list."); + + return r; +} + +result +_SliderImpl::SetBarColor(const Color& color) +{ + ClearLastResult(); + + Variant varBarColor(color); + + return GetCore().SetPropertyBarColor(varBarColor); +} + +Color +_SliderImpl::GetBarColor(void) const +{ + ClearLastResult(); + + return GetCore().GetPropertyBarColor().ToColor(); +} + +result +_SliderImpl::SetBarBackgroundColor(const Color& color) +{ + ClearLastResult(); + + Variant varBarBackgroundColor(color); + + return GetCore().SetPropertyBarBackgroundColor(varBarBackgroundColor); +} + +Color +_SliderImpl::GetBarBackgroundColor(void) const +{ + ClearLastResult(); + + return GetCore().GetPropertyBarBackgroundColor().ToColor(); +} + +result +_SliderImpl::SetColor(const Color& color) +{ + ClearLastResult(); + + Variant varColor(color); + + return GetCore().SetPropertyColor(varColor); +} + +Color +_SliderImpl::GetColor(void) const +{ + ClearLastResult(); + + return GetCore().GetPropertyColor().ToColor(); +} + +result +_SliderImpl::SetThumbBitmap(SliderThumbStatus status, const Bitmap& bitmap) +{ + ClearLastResult(); + + return GetCore().SetThumbBitmap(status, bitmap); +} + +void +_SliderImpl::SetThumbTextColor(SliderThumbStatus status, const Color& color) +{ + ClearLastResult(); + + GetCore().SetThumbTextColor(status, color); + + return; +} + +const char* +_SliderImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Controls::Slider"; +} + +const Slider& +_SliderImpl::GetPublic(void) const +{ + return static_cast (_ControlImpl::GetPublic()); +} + +Slider& +_SliderImpl::GetPublic(void) +{ + return static_cast (_ControlImpl::GetPublic()); +} + +const _Slider& +_SliderImpl::GetCore(void) const +{ + return static_cast (_ControlImpl::GetCore()); +} + +_Slider& +_SliderImpl::GetCore(void) +{ + return static_cast <_Slider&>(_ControlImpl::GetCore()); +} + +void +_SliderImpl::OnAdjustmentValueChanged(const _Control& source, int adjustment) +{ + ClearLastResult(); + + Runtime::IEventArg* pEventArg = _PublicAdjustmentEvent::CreateAdjustmentEventArgN(adjustment); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pPublicAdjustmentEvent->Fire(*pEventArg); + return; +} + +void +_SliderImpl::OnSliderBarMoved(_Slider& source, int value) +{ + ClearLastResult(); + + Runtime::IEventArg* pEventArg = _PublicSliderEvent::CreateSliderEventArgN(value); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pPublicSliderEvent->Fire(*pEventArg); + return; +} + +class _SliderMaker + : public _UiBuilderControlMaker +{ +public: + _SliderMaker(_UiBuilder* pUiBuilder) + : _UiBuilderControlMaker(pUiBuilder){} + virtual ~_SliderMaker(void){} + + static _UiBuilderControlMaker* + GetInstance(_UiBuilder* pUiBuilder) + { + _SliderMaker* pSliderMaker = new (std::nothrow) _SliderMaker(pUiBuilder); + return pSliderMaker; + } + +protected: + virtual Control* + Make(_UiBuilderControl* pControl) + { + result r = E_SUCCESS; + _UiBuilderControlLayout* pControlProperty = null; + Slider* pSlider = null; + Tizen::Base::String elementString; + Tizen::Base::String elementString1; + FloatRectangle rect; + int tempMin = 0; + int tempMax = 0; + int temp = 0; + int sliderStyle = SLIDER_STYLE_NONE; + bool isShowTitle = false; + bool isGroupStyle = false; + BackgroundStyle backgroundStyleEnum = BACKGROUND_STYLE_DEFAULT; + GroupStyle groupStyleEmum = GROUP_STYLE_NONE; + + Color color; + int opacity = 0; + + + GetProperty(pControl, &pControlProperty); + if (pControlProperty == 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)) + { + if (elementString.Equals(L"BACKGROUND_STYLE_NONE", false)) + { + backgroundStyleEnum = BACKGROUND_STYLE_NONE; + } + } + + if (pControl->GetElement(L"showTitleText", elementString) || pControl->GetElement(L"bShowtitleText", elementString)) + { + if (elementString.Equals(L"true", false)) + { + isShowTitle = true; + } + } + + if (pControl->GetElement(L"groupStyle", elementString) || pControl->GetElement(L"GroupStyle", elementString)) + { + isGroupStyle = true; + + if (elementString.Equals(L"GROUP_STYLE_NONE", false)) + { + groupStyleEmum = GROUP_STYLE_NONE; + } + if (elementString.Equals(L"GROUP_STYLE_SINGLE", false)) + { + groupStyleEmum = GROUP_STYLE_SINGLE; + } + if (elementString.Equals(L"GROUP_STYLE_TOP", false)) + { + groupStyleEmum = GROUP_STYLE_TOP; + } + if (elementString.Equals(L"GROUP_STYLE_MIDDLE", false)) + { + groupStyleEmum = GROUP_STYLE_MIDDLE; + } + if (elementString.Equals(L"GROUP_STYLE_BOTTOM", false)) + { + groupStyleEmum = GROUP_STYLE_BOTTOM; + } + } + if (isGroupStyle) + { + if (pControl->GetElement(L"min", elementString) && pControl->GetElement(L"max", elementString1)) + { + Base::Integer::Parse(elementString, tempMin); + Base::Integer::Parse(elementString1, tempMax); + + if (tempMin > tempMax) + { + temp = tempMin; + tempMin = tempMax; + tempMax = tempMin; + } + + r = pSlider->Construct(rect, backgroundStyleEnum, isShowTitle, tempMin, tempMax, groupStyleEmum); + } + else + { + r = pSlider->Construct(rect, backgroundStyleEnum, isShowTitle, 0, 10, groupStyleEmum); + } + } + + else + { + if (pControl->GetElement(L"sliderStyleBubble", elementString)) + { + if (elementString.Equals(L"true", false)) + { + sliderStyle |= SLIDER_STYLE_BUBBLE; + } + } + + if (pControl->GetElement(L"sliderStyleTitle", elementString)) + { + if (elementString.Equals(L"true", false)) + { + isShowTitle = true; + sliderStyle |= SLIDER_STYLE_TITLE; + } + } + + if (pControl->GetElement(L"min", elementString) && pControl->GetElement(L"max", elementString1)) + { + Base::Integer::Parse(elementString, tempMin); + Base::Integer::Parse(elementString1, tempMax); + + if (tempMin > tempMax) + { + temp = tempMin; + tempMin = tempMax; + tempMax = tempMin; + } + + r = pSlider->Construct(rect, sliderStyle, tempMin, tempMax); + } + else + { + r = pSlider->Construct(rect, sliderStyle, 0, 10); + } + } + + if (r != E_SUCCESS) + { + delete pSlider; + pSlider = null; + + return null; + } + + if (pControl->GetElement(L"value", elementString)) + { + Base::Integer::Parse(elementString, temp); + if (temp > tempMax || temp < tempMin) + { + temp = (tempMin + tempMax) >> 1; + } + pSlider->SetValue(temp); + } + else + { + pSlider->SetValue((tempMin + tempMax) >> 1); + } + + if (isShowTitle) + { + if (pControl->GetElement(L"titleText", elementString)) + { + pSlider->SetTitleText(elementString); + } + if (pControl->GetElement(L"colorOfTitleText", elementString)) + { + ConvertStringToColor(elementString, color); + pSlider->SetTitleTextColor(color); + } + } + + if (pControl->GetElement(L"normalThumbBitmap", elementString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(elementString); + if (pBitmap != null) + { + pSlider->SetThumbBitmap(SLIDER_THUMB_STATUS_NORMAL, *pBitmap); + delete pBitmap; + pBitmap = null; + } + } + + if (pControl->GetElement(L"pressedThumbBitmap", elementString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(elementString); + if (pBitmap != null) + { + pSlider->SetThumbBitmap(SLIDER_THUMB_STATUS_PRESSED, *pBitmap); + delete pBitmap; + pBitmap = null; + } + } + + if (pControl->GetElement(L"disabledThumbBitmap", elementString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(elementString); + if (pBitmap != null) + { + pSlider->SetThumbBitmap(SLIDER_THUMB_STATUS_DISABLED, *pBitmap); + delete pBitmap; + pBitmap = null; + } + } + + if (pControl->GetElement(L"highlightedThumbBitmap", elementString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(elementString); + if (pBitmap != null) + { + pSlider->SetThumbBitmap(SLIDER_THUMB_STATUS_HIGHLIGHTED, *pBitmap); + delete pBitmap; + pBitmap = null; + } + } + + if (pControl->GetElement(L"leftIconBitmapPath", elementString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(elementString); + if (pBitmap != null) + { + pSlider->SetIcon(ICON_POSITION_LEFT, *pBitmap); + delete pBitmap; + pBitmap = null; + } + } + + if (pControl->GetElement(L"rightIconBitmapPath", elementString)) + { + Bitmap* pBitmap = null; + pBitmap = LoadBitmapN(elementString); + if (pBitmap != null) + { + pSlider->SetIcon(ICON_POSITION_RIGHT, *pBitmap); + delete pBitmap; + pBitmap = null; + } + } + + if (pControl->GetElement(L"normalThumbTextColor", elementString)) + { + ConvertStringToColor(elementString, color); + pSlider->SetThumbTextColor(SLIDER_THUMB_STATUS_NORMAL, color); + } + + if (pControl->GetElement(L"pressedThumbTextColor", elementString)) + { + ConvertStringToColor(elementString, color); + pSlider->SetThumbTextColor(SLIDER_THUMB_STATUS_PRESSED, color); + } + + if (pControl->GetElement(L"disabledThumbTextColor", elementString)) + { + ConvertStringToColor(elementString, color); + pSlider->SetThumbTextColor(SLIDER_THUMB_STATUS_DISABLED, color); + } + + if (pControl->GetElement(L"highlightedThumbTextColor", elementString)) + { + ConvertStringToColor(elementString, color); + pSlider->SetThumbTextColor(SLIDER_THUMB_STATUS_HIGHLIGHTED, color); + } + + if (pControl->GetElement(L"barColor", elementString)) + { + ConvertStringToColor(elementString, color); + pSlider->SetBarColor(color); + } + + if (pControl->GetElement(L"barBackgroundColor", elementString)) + { + ConvertStringToColor(elementString, color); + pSlider->SetBarBackgroundColor(color); + } + + if (pControl->GetElement(L"colorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + if (pControl->GetElement(L"color", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + pSlider->SetColor(color); + } + + if (pControl->GetElement(L"accessibilityHint", elementString)) + { + AccessibilityContainer* pContainer = pSlider->GetAccessibilityContainer(); + if (pContainer != null) + { + AccessibilityElement* pElement = pContainer->GetElement(L"SliderControl"); + if (pElement != null) + { + pElement->SetHint(elementString); + } + } + } + + return pSlider; + } + +}; // _SliderMaker + +_SliderRegister::_SliderRegister(void) +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->RegisterControl(L"Slider", _SliderMaker::GetInstance); +} +_SliderRegister::~_SliderRegister(void) +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->UnregisterControl(L"Slider"); +} +static _SliderRegister SliderRegisterToUiBuilder; +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_SliderModel.cpp b/src/ui/controls/FUiCtrl_SliderModel.cpp new file mode 100644 index 0000000..385936c --- /dev/null +++ b/src/ui/controls/FUiCtrl_SliderModel.cpp @@ -0,0 +1,78 @@ +// +// 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_SliderModel.cpp + * @brief This is the implementation file for the _SliderModel class. + */ + +#include "FUiCtrl_SliderModel.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +_SliderModel::_SliderModel(void) + : __minValue(0) + , __maxValue(0) + , __currentValue(0) +{ +} + +_SliderModel::~_SliderModel(void) +{ +} + +void +_SliderModel::SetMinValue(int minValue) +{ + __minValue = minValue; + return; +} + +int +_SliderModel::GetMinValue(void) const +{ + return __minValue; +} + +void +_SliderModel::SetMaxValue(int maxValue) +{ + __maxValue = maxValue; + return; +} + +int +_SliderModel::GetMaxValue(void) const +{ + return __maxValue; +} + +void +_SliderModel::SetValue(int value) +{ + __currentValue = value; + return; +} + +int +_SliderModel::GetValue(void) const +{ + return __currentValue; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_SliderOverlay.cpp b/src/ui/controls/FUiCtrl_SliderOverlay.cpp new file mode 100644 index 0000000..16af62e --- /dev/null +++ b/src/ui/controls/FUiCtrl_SliderOverlay.cpp @@ -0,0 +1,246 @@ +// +// 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_SliderOverlay.cpp + * @brief This is the implementation file for the _SliderOverlay class. + */ + +#include +#include +#include +#include "FUiAnim_VisualElement.h" +#include "FUi_ResourceManager.h" +#include "FUi_EcoreEvasMgr.h" +#include "FUi_EcoreEvas.h" +#include "FUiCtrl_SliderOverlay.h" + + +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_SliderOverlay::_SliderOverlay(void) + : __pOverlayBgBitmap(null) + , __overlayBgColor(0) + , __overlayTextColor(0) + , __pFont(null) + , __pOwner(null) + , __overlayWidth(-1.0f) +{ + Tizen::Ui::Animations::_VisualElement* pBase = GetVisualElement(); + + if (pBase != null) + { + pBase->SetSurfaceOpaque(false); + } +} + +_SliderOverlay::~_SliderOverlay(void) +{ + delete __pOverlayBgBitmap; + __pOverlayBgBitmap = null; +} + +result +_SliderOverlay::Construct(_Control& owner) +{ + result r = E_SUCCESS; + + __pOwner = &owner; + + r = CreateRootVisualElement(_WINDOW_TYPE_VE); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + SetActivationEnabled(false); + + AcquireHandle(); + + r = GET_COLOR_CONFIG(SLIDER::OVERLAY_BG_NORMAL, __overlayBgColor); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GET_COLOR_CONFIG(SLIDER::OVERLAY_TEXT_NORMAL, __overlayTextColor); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = LoadBitmaps(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +_SliderOverlay::SetSliderRect(FloatRectangle& sliderRect, FloatRectangle& sliderTouchRect) +{ + __sliderRect = sliderRect; + __sliderTouchRect = sliderTouchRect; + + return E_SUCCESS; +} + +void +_SliderOverlay::SetFont(Tizen::Graphics::Font* pFont) +{ + __pFont = pFont; + __overlayWidth = -1.0f; + return; +} + +result +_SliderOverlay::LoadBitmaps() +{ + result r = E_SUCCESS; + + Bitmap* pReplacementBitmap = null; + + r = GET_REPLACED_BITMAP_CONFIG_N(SLIDER::OVERLAY_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __overlayBgColor, pReplacementBitmap); + + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + delete __pOverlayBgBitmap; + __pOverlayBgBitmap = pReplacementBitmap; + + return r; +} + +result +_SliderOverlay::DrawSliderOverlay(int positionX, int handleWidth, int value) +{ + result r = E_SUCCESS; + + float overlayWidth = 0.0f; + float overlayHeight = 0.0f; + float overlayBottomMargin = 0.0f; + float overlayLeftMargin = 0.0f; + int overlayTextSize = 0; + float overlayBodyHeight = 0.0f; + float overlayY = 0.0f; + Point textPoint(0, 0); + FloatDimension textDim(0.0f, 0.0f); + + Bitmap* pBgBitmap = __pOverlayBgBitmap; + + Tizen::Base::String text; + text.Append(value); + _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); + + r = GET_SHAPE_CONFIG(SLIDER::OVERLAY_MARGIN, orientation, overlayLeftMargin); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GET_SHAPE_CONFIG(SLIDER::OVERLAY_HEIGHT, orientation, overlayHeight); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GET_SHAPE_CONFIG(SLIDER::OVERLAY_BOTTOM_MARGIN, orientation, overlayBottomMargin); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GET_SHAPE_CONFIG(SLIDER::OVERLAY_HEIGHT_WITHOUT_ARROW, orientation, overlayBodyHeight); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GET_SHAPE_CONFIG(SLIDER::OVERLAY_TEXT_SIZE, orientation, overlayTextSize); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + (_FontImpl::GetInstance(*__pFont))->SetSize(overlayTextSize); + + if (__overlayWidth == -1.0f) + { + int fixedValue = 999; + Tizen::Base::String fixedText; + fixedText.Append(fixedValue); + __pFont->GetTextExtent(fixedText, fixedText.GetLength(), textDim); + __overlayWidth = textDim.width + 2 * overlayLeftMargin; + } + + __pFont->GetTextExtent(text, text.GetLength(), textDim); + + 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) + { + overlayY = __sliderTouchRect.y; + } + + __sliderOverlayRect = FloatRectangle(__sliderRect.x + positionX + (handleWidth - overlayWidth) / 2.0f, + __sliderRect.y + overlayY - (overlayHeight + overlayBottomMargin), + overlayWidth, overlayHeight); + + SetBounds(__sliderOverlayRect); + + // Get canvas & Clear BG + Canvas* pCanvas = GetCanvasN(); + SysTryReturn(NID_UI_CTRL, pCanvas != null, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + pCanvas->SetBackgroundColor(Color(0x00000000)); + pCanvas->Clear(); + + pCanvas->SetFont(*__pFont); + + // Draw BG + FloatRectangle overlayRect = FloatRectangle(0.0f, 0.0f, __sliderOverlayRect.width, __sliderOverlayRect.height); + + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pBgBitmap)) + { + r = pCanvas->DrawNinePatchedBitmap(overlayRect, *pBgBitmap); + } + else + { + r = pCanvas->DrawBitmap(overlayRect, *pBgBitmap); + } + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + // Draw Value Text + __pFont->GetTextExtent(text, text.GetLength(), textDim); + textPoint.x = (__sliderOverlayRect.width - textDim.width) / 2; + textPoint.y = textPoint.y + ((overlayBodyHeight - textDim.height) / 2); + pCanvas->SetForegroundColor(__overlayTextColor); + pCanvas->DrawText(textPoint, text); + + delete pCanvas; + pCanvas = null; + + return r; +CATCH: + delete pCanvas; + return E_SYSTEM; +} + +bool +_SliderOverlay::IsActivatedOnOpen(void) const +{ + return false; +} + +result +_SliderOverlay::OnAttachedToMainTree(void) +{ + SetOwner(__pOwner); + return _Window::OnAttachedToMainTree(); +} + +result +_SliderOverlay::OnDetachingFromMainTree(void) +{ + return _Window::OnDetachingFromMainTree(); +} + +bool +_SliderOverlay::IsRotationSynchronized(void) const +{ + return true; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_SliderPresenter.cpp b/src/ui/controls/FUiCtrl_SliderPresenter.cpp new file mode 100644 index 0000000..dde5b59 --- /dev/null +++ b/src/ui/controls/FUiCtrl_SliderPresenter.cpp @@ -0,0 +1,1800 @@ +// +// 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_SliderPresenter.cpp + * @brief This is the implementation file for the _SliderPresenter class. + */ + +#include +#include +#include +#include +#include +#include +#include "FUi_UiTouchEvent.h" +#include "FUi_ResourceManager.h" +#include "FUi_TouchManager.h" +#include "FUiAnim_VisualElement.h" +#include "FUiCtrl_Slider.h" +#include "FUiCtrl_SliderModel.h" +#include "FUiCtrl_SliderOverlay.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUiCtrl_SliderPresenter.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Base; +using namespace Tizen::Ui::Animations; +using namespace Tizen::Graphics::_Text; +using namespace Tizen::Base::Runtime; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_SliderPresenter::_SliderPresenter(void) + : __pSlider(null) + , __pSliderModel(null) + , __pSliderOverlay(null) + , __pBgTopBitmap(null) + , __pBgMiddleBitmap(null) + , __pBgBottomBitmap(null) + , __pBgSingleBitmap(null) + , __pBgGrpStyleNoneBitmap(null) + , __pBgTopEffectBitmap(null) + , __pBgMiddleEffectBitmap(null) + , __pBgBottomEffectBitmap(null) + , __pBgSingleEffectBitmap(null) + , __pBarResourceEffectBitmap(null) + , __pBarBgResourceEffectBitmap(null) + , __pBarColorReplacementBitmap(null) + , __pBarBgColorReplacementBitmap(null) + , __pHandleNormalBitmap(null) + , __pHandlePressedBitmap(null) + , __pHandleDisabledBitmap(null) + , __pHandleHighlightedBitmap(null) + , __pHandleNormalEffectBitmap(null) + , __pHandlePressedEffectBitmap(null) + , __pHandleDisabledEffectBitmap(null) + , __pHandleHighlightedEffectBitmap(null) + , __currentBarColor(0) + , __currentBarBgColor(0) + , __currentBgColor(0) + , __pFont(null) + , __pTitleTextObject(null) + , __pHandleTextObject(null) + , __handleX(0) + , __handleOffset(0) + , __isSliderPressed(false) + , __isSetValue(true) + , __isFocusModeStateChanged(false) + , __isNeedToBeUpdated(true) + , __isResourceLoaded(false) + , __isCustomHandle(false) + , __isCustomPressedTextColor(false) + , __isTouchCanceled(false) + , __groupStyle(GROUP_STYLE_NONE) + , __fontSize(0.0f) + , __barOffset(0.0f) +{ +} + +_SliderPresenter::~_SliderPresenter(void) +{ + delete __pSliderModel; + __pSliderModel = null; + + delete __pSliderOverlay; + __pSliderOverlay = null; + + delete __pBgTopBitmap; + __pBgTopBitmap = null; + + delete __pBgMiddleBitmap; + __pBgMiddleBitmap = null; + + delete __pBgBottomBitmap; + __pBgBottomBitmap = null; + + delete __pBgSingleBitmap; + __pBgSingleBitmap = null; + + delete __pBgGrpStyleNoneBitmap; + __pBgGrpStyleNoneBitmap = null; + + delete __pBgTopEffectBitmap; + __pBgTopEffectBitmap = null; + + delete __pBgMiddleEffectBitmap; + __pBgMiddleEffectBitmap = null; + + delete __pBgBottomEffectBitmap; + __pBgBottomEffectBitmap = null; + + delete __pBgSingleEffectBitmap; + __pBgSingleEffectBitmap = null; + + delete __pBarResourceEffectBitmap; + __pBarResourceEffectBitmap = null; + + delete __pBarBgResourceEffectBitmap; + __pBarBgResourceEffectBitmap = null; + + delete __pBarColorReplacementBitmap; + __pBarColorReplacementBitmap = null; + + delete __pBarBgColorReplacementBitmap; + __pBarBgColorReplacementBitmap = null; + + delete __pHandleNormalBitmap; + __pHandleNormalBitmap = null; + + delete __pHandlePressedBitmap; + __pHandlePressedBitmap = null; + + delete __pHandleDisabledBitmap; + __pHandleDisabledBitmap = null; + + delete __pHandleHighlightedBitmap; + __pHandleHighlightedBitmap = null; + + delete __pHandleNormalEffectBitmap; + __pHandleNormalEffectBitmap = null; + + delete __pHandlePressedEffectBitmap; + __pHandlePressedEffectBitmap = null; + + delete __pHandleDisabledEffectBitmap; + __pHandleDisabledEffectBitmap = null; + + delete __pHandleHighlightedEffectBitmap; + __pHandleHighlightedEffectBitmap = null; + + delete __pTitleTextObject; + __pTitleTextObject = null; + + delete __pHandleTextObject; + __pHandleTextObject = null; + +} + +_SliderPresenter* +_SliderPresenter::CreateInstanceN(const _Slider& slider) +{ + result r = E_SUCCESS; + + _SliderPresenter* pSliderPresenter = new (std::nothrow) _SliderPresenter(); + SysTryReturn(NID_UI_CTRL, pSliderPresenter != null, null, E_OUT_OF_MEMORY, + "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + pSliderPresenter->__pSlider = const_cast <_Slider*>(&slider); + SysTryCatch(NID_UI_CTRL, pSliderPresenter->__pSlider != null, , E_SYSTEM, + "A system error has occurred. The Slider control core is null."); + + pSliderPresenter->__pSliderModel = new (std::nothrow) _SliderModel(); + SysTryCatch(NID_UI_CTRL, pSliderPresenter->__pSliderModel != null, , E_OUT_OF_MEMORY, + "Memory allocation failed."); + + if (pSliderPresenter->__pSlider->GetStyle() & _SLIDER_STYLE_OVERLAY) + { + pSliderPresenter->__pSliderOverlay = new (std::nothrow) _SliderOverlay(); + SysTryCatch(NID_UI_CTRL, pSliderPresenter->__pSliderOverlay != null, , E_OUT_OF_MEMORY, + "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; +} + +result +_SliderPresenter::Resize(void) +{ + result r = E_SUCCESS; + + float barHeight = 0.0f; + float barLeftMargin = 0.0f; + float barRightMargin = 0.0f; + float sliderY = 0.0f; + float iconWidth = 0.0f; + float iconSideMargin = 0.0f; + float minimumHeight = 0.0f; + float minimumWidth = 0.0f; + float iconRightMargin = 0.0f; + float titleHeight = 0.0f; + FloatRectangle titleTextBounds; + + int minValue = 0; + int maxValue = 0; + + _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); + + if (!__isResourceLoaded) + { + __isResourceLoaded = true; + + r = GET_SHAPE_CONFIG(SLIDER::HANDLE_ONE_DIGIT_TEXT_SIZE, orientation, __fontSize); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + __pFont = __pSlider->GetFallbackFont(); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = GET_COLOR_CONFIG(SLIDER::HANDLE_NUMBER_TEXT_NORMAL, __handleTextColor); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = GET_COLOR_CONFIG(SLIDER::HANDLE_NUMBER_TEXT_DISABLED, __handleTextDisabledColor); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = GET_COLOR_CONFIG(SLIDER::HANDLE_NUMBER_TEXT_PRESSED, __handleTextPressedColor); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = GET_COLOR_CONFIG(SLIDER::HANDLE_NUMBER_TEXT_HIGHLIGHTED, __handleTextHighlightedColor); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + } + + r = GET_SHAPE_CONFIG(SLIDER::BAR_HEIGHT, orientation, barHeight); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = GET_SHAPE_CONFIG(SLIDER::ICON_WIDTH, orientation, iconWidth); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = GET_SHAPE_CONFIG(SLIDER::BAR_OFFSET, orientation, __barOffset); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + if (!__isCustomHandle) + { + r = GET_SHAPE_CONFIG(SLIDER::HANDLE_WIDTH, orientation, __handleRect.width); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = GET_SHAPE_CONFIG(SLIDER::HANDLE_HEIGHT, orientation, __handleRect.height); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + __handleOffset = __handleRect.width / 2; + } + + __rect = FloatRectangle(0.0f, 0.0f, __pSlider->GetBoundsF().width, __pSlider->GetBoundsF().height); + + r = GET_SHAPE_CONFIG(SLIDER::ICON_RIGHT_MARGIN, orientation, iconRightMargin); + 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); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = GET_SHAPE_CONFIG(SLIDER::ICON_LEFT_MARGIN, orientation, barLeftMargin); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + else + { + r = GET_SHAPE_CONFIG(SLIDER::MINIMUM_WIDTH_WITHOUT_ICON, orientation, minimumWidth); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = GET_SHAPE_CONFIG(SLIDER::BAR_LEFT_MARGIN, orientation, barLeftMargin); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + + barRightMargin = barLeftMargin; + + if (__rect.width < minimumWidth) + { + __rect.width = minimumWidth; + } + + r = GET_SHAPE_CONFIG(SLIDER::MINIMUM_HEIGHT, orientation, minimumHeight); + 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); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + minimumHeight = minimumHeight + titleHeight; + } + + if (__rect.height < minimumHeight) + { + __rect.height = minimumHeight; + } + + if (__pSlider->GetStyle() & _SLIDER_STYLE_TITLE_TEXT) + { + 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); + } + else + { + __touchRect = FloatRectangle(barLeftMargin + __barOffset - __handleOffset, (__rect.height - __handleRect.height) / 2.0f, + (__rect.width - (barLeftMargin + barRightMargin ) - (2.0 * __barOffset)) + (2.0f * __handleOffset), __handleRect.height); + } + + if (__pSlider->GetIcon(ICON_POSITION_LEFT) != null) + { + __touchRect.x = __touchRect.x + iconWidth + iconRightMargin; + __touchRect.width = __touchRect.width - (iconWidth + iconRightMargin); + } + + if (__pSlider->GetIcon(ICON_POSITION_RIGHT) != null) + { + __touchRect.width = __touchRect.width - (iconWidth + iconSideMargin + iconRightMargin); + } + + __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(true); + __pSliderOverlay->SetSliderRect(absBounds, __touchRect); + + minValue = __pSliderModel->GetMinValue(); + maxValue = __pSliderModel->GetMaxValue(); + __handleX = ((__touchRect.width - __handleRect.width) * (__pSliderModel->GetValue() - minValue)) / (maxValue - minValue); + + return r; +} + +result +_SliderPresenter::LoadBitmap(void) +{ + result r = E_SUCCESS; + + int opacity = 0; + Bitmap* pReplacementBitmap = null; + Color handleNormalColor; + Color handlePressedColor; + Color handleDisabledColor; + Color handleHighlightedColor; + + r = GET_COLOR_CONFIG(SLIDER::BG_OTHERS_NORMAL, __currentBgColor); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = GET_COLOR_CONFIG(SLIDER::BG_DEFAULT_NORMAL, __currentGrpStyleNoneColor); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = GET_COLOR_CONFIG(SLIDER::BAR_NORMAL, __currentBarColor); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = GET_COLOR_CONFIG(SLIDER::BAR_BG_NORMAL, __currentBarBgColor); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = GET_COLOR_CONFIG(SLIDER::HANDLE_BG_NORMAL, handleNormalColor); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = GET_COLOR_CONFIG(SLIDER::HANDLE_BG_PRESSED, handlePressedColor); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = GET_COLOR_CONFIG(SLIDER::HANDLE_BG_DISABLED, handleDisabledColor); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = GET_COLOR_CONFIG(SLIDER::HANDLE_BG_HIGHLIGHTED, handleHighlightedColor); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + // for GROUP_STYLE_TOP + 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_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)); + + 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_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_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)); + + 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)); + + + r = GET_BITMAP_CONFIG_N(SLIDER::GROUPED_SINGLE_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBgSingleEffectBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + opacity = __currentBgColor.GetAlpha(); + + __pBgTopBitmap->SetAlphaConstant(opacity); + __pBgMiddleBitmap->SetAlphaConstant(opacity); + __pBgBottomBitmap->SetAlphaConstant(opacity); + __pBgSingleBitmap->SetAlphaConstant(opacity); + __pBgGrpStyleNoneBitmap->SetAlphaConstant(__currentGrpStyleNoneColor.GetAlpha()); + + + __pBgTopEffectBitmap->SetAlphaConstant(opacity); + __pBgMiddleEffectBitmap->SetAlphaConstant(opacity); + __pBgBottomEffectBitmap->SetAlphaConstant(opacity); + __pBgSingleEffectBitmap->SetAlphaConstant(opacity); + + + // Bar Resources + 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_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); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GET_BITMAP_CONFIG_N(SLIDER::BAR_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pBarResourceEffectBitmap); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + opacity = __currentBarColor.GetAlpha(); + __pBarColorReplacementBitmap->SetAlphaConstant(opacity); + + // Handle Resources + + if (__pHandleNormalBitmap == null) + { + 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; + } + + + if (__pHandlePressedBitmap == null) + { + 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; + } + + if (__pHandleDisabledBitmap == null) + { + 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; + } + + if (__pHandleHighlightedBitmap == null) + { + 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; + } + + if (__pHandleNormalEffectBitmap == null) + { + r = GET_BITMAP_CONFIG_N(SLIDER::HANDLE_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pHandleNormalEffectBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + if (__pHandlePressedEffectBitmap == null) + { + r = GET_BITMAP_CONFIG_N(SLIDER::HANDLE_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pHandlePressedEffectBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + if (__pHandleDisabledEffectBitmap == null) + { + r = GET_BITMAP_CONFIG_N(SLIDER::HANDLE_BG_EFFECT_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pHandleDisabledEffectBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + if (__pHandleHighlightedEffectBitmap == null) + { + r = GET_BITMAP_CONFIG_N(SLIDER::HANDLE_BG_EFFECT_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pHandleHighlightedEffectBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + __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 __pBgTopBitmap; + __pBgTopBitmap = null; + + delete __pBgMiddleBitmap; + __pBgMiddleBitmap = null; + + delete __pBgBottomBitmap; + __pBgBottomBitmap = null; + + delete __pBgSingleBitmap; + __pBgSingleBitmap = null; + + delete __pBgGrpStyleNoneBitmap; + __pBgGrpStyleNoneBitmap = null; + + delete __pBgTopEffectBitmap; + __pBgTopEffectBitmap = null; + + delete __pBgMiddleEffectBitmap; + __pBgMiddleEffectBitmap = null; + + delete __pBgBottomEffectBitmap; + __pBgBottomEffectBitmap = null; + + delete __pBgSingleEffectBitmap; + __pBgSingleEffectBitmap = null; + + delete __pBarResourceEffectBitmap; + __pBarResourceEffectBitmap = null; + + delete __pBarBgResourceEffectBitmap; + __pBarBgResourceEffectBitmap = null; + + delete __pBarColorReplacementBitmap; + __pBarColorReplacementBitmap = null; + + delete __pBarBgColorReplacementBitmap; + __pBarBgColorReplacementBitmap = null; + + delete __pHandleNormalBitmap; + __pHandleNormalBitmap = null; + + delete __pHandlePressedBitmap; + __pHandlePressedBitmap = null; + + delete __pHandleDisabledBitmap; + __pHandleDisabledBitmap = null; + + delete __pHandleHighlightedBitmap; + __pHandleHighlightedBitmap = null; + + delete __pHandleNormalEffectBitmap; + __pHandleNormalEffectBitmap = null; + + delete __pHandlePressedEffectBitmap; + __pHandlePressedEffectBitmap = null; + + delete __pHandleDisabledEffectBitmap; + __pHandleDisabledEffectBitmap = null; + + delete __pHandleHighlightedEffectBitmap; + __pHandleHighlightedEffectBitmap = null; + + delete __pHandleTextObject; + __pHandleTextObject = null; + + return r; +} + +int +_SliderPresenter::CalculateSliderValue(float positionX, float offsetX) +{ + int minValue = __pSliderModel->GetMinValue(); + int maxValue = __pSliderModel->GetMaxValue(); + + if (positionX <= __touchRect.x + offsetX) + { + __handleX = 0; + return minValue; + } + + if (positionX >= (__touchRect.x + __touchRect.width) - offsetX) + { + __handleX = __touchRect.width - __handleRect.width; + return maxValue; + } + + if ((maxValue - minValue) == 0) + { + return minValue; + } + + __handleX = positionX - (__touchRect.x + offsetX); + + __handleRect.x = __touchRect.x + __handleX; + __handleRect.y = __touchRect.y; + + if (__handleRect.x < __touchRect.x) + { + __handleRect.x = __touchRect.x; + } + + if (__handleRect.x + __handleRect.width > __touchRect.x + __touchRect.width) + { + __handleRect.x = __touchRect.x + __touchRect.width - __handleRect.width; + } + + return minValue + (int) ((float) (__handleX * (maxValue - minValue)) / (float)(__touchRect.width - __handleRect.width) + 0.5); // current value = current width * range / bar bg width +} + +result +_SliderPresenter::Draw(void) +{ + if (__isNeedToBeUpdated) + { + Resize(); + } + + return DrawSlider(); +} + +result +_SliderPresenter::DrawSlider(void) +{ + result r = E_SUCCESS; + float sliderY = 0.0f; + FloatRectangle titleTextBounds; + + int style = __pSlider->GetStyle(); + + Canvas* pCanvas = __pSlider->GetCanvasN(); + SysTryReturnResult(NID_UI_CTRL, pCanvas != null, E_SYSTEM, "System error occurred."); + + if (__isNeedToBeUpdated) + { + r = DrawBackground(*pCanvas); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + if (style & _SLIDER_STYLE_TITLE_TEXT) + { + titleTextBounds = GetTitleTextBounds(); + sliderY = titleTextBounds.y + titleTextBounds.height; + } + + if(sliderY < __rect.height) + { + r = DrawSliderBar(*pCanvas); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + if (__isSliderPressed || __pSlider->IsKeyPressed()) + { + if (style & _SLIDER_STYLE_OVERLAY) + { + r = DrawSliderOverlay(__pSliderModel->GetValue()); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + r = DrawSliderBarNumber(__pSliderModel->GetValue()); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + else + { + r = DrawSliderBarNumber(__pSliderModel->GetValue()); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + + if (__isNeedToBeUpdated) + { + 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)); + + __isNeedToBeUpdated = false; + } + + delete pCanvas; + pCanvas = null; + + return r; + +CATCH: + delete pCanvas; + pCanvas = null; + + return r; +} + +result +_SliderPresenter::DrawBackground(Canvas& canvas) +{ + Bitmap* pBgBitmap = null; + Bitmap* pBgEffectBitmap = null; + Bitmap* pBgGroupBitmap = null; + bool isCustomBitmap = false; + + int opacity = 0; + result r = E_SUCCESS; + canvas.SetBackgroundColor(Color(0x00000000)); + canvas.Clear(); + + if (!(__pSlider->GetStyle() & _SLIDER_STYLE_NO_BG)) + { + switch (__groupStyle) + { + case GROUP_STYLE_TOP: + isCustomBitmap = IS_CUSTOM_BITMAP(SLIDER::GROUPED_TOP_BG_NORMAL); + pBgEffectBitmap = __pBgTopEffectBitmap; + if (__pSlider->GetColor() == __currentBgColor) + { + pBgBitmap = __pBgTopBitmap; + } + else + { + 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)); + return r; + } + else + { + delete __pBgTopBitmap; + __pBgTopBitmap = null; + __pBgTopBitmap = pBgGroupBitmap; + + pBgBitmap = pBgGroupBitmap; + opacity = __pSlider->GetColor().GetAlpha(); + pBgBitmap->SetAlphaConstant(opacity); + __currentBgColor = __pSlider->GetColor(); + } + } + break; + + case GROUP_STYLE_MIDDLE: + isCustomBitmap = IS_CUSTOM_BITMAP(SLIDER::GROUPED_MIDDLE_BG_NORMAL); + pBgEffectBitmap = __pBgMiddleEffectBitmap; + if (__pSlider->GetColor() == __currentBgColor) + { + pBgBitmap = __pBgMiddleBitmap; + } + else + { + 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)); + return r; + } + else + { + delete __pBgMiddleBitmap; + __pBgMiddleBitmap = null; + __pBgMiddleBitmap = pBgGroupBitmap; + + pBgBitmap = __pBgMiddleBitmap; + opacity = __pSlider->GetColor().GetAlpha(); + pBgBitmap->SetAlphaConstant(opacity); + __currentBgColor = __pSlider->GetColor(); + } + } + break; + + case GROUP_STYLE_BOTTOM: + isCustomBitmap = IS_CUSTOM_BITMAP(SLIDER::GROUPED_BOTTOM_BG_NORMAL); + pBgEffectBitmap = __pBgBottomEffectBitmap; + if (__pSlider->GetColor() == __currentBgColor) + { + pBgBitmap = __pBgBottomBitmap; + } + else + { + 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)); + return r; + } + else + { + delete __pBgBottomBitmap; + __pBgBottomBitmap = null; + __pBgBottomBitmap = pBgGroupBitmap; + + pBgBitmap = __pBgBottomBitmap; + opacity = __pSlider->GetColor().GetAlpha(); + pBgBitmap->SetAlphaConstant(opacity); + __currentBgColor = __pSlider->GetColor(); + } + } + break; + + case GROUP_STYLE_SINGLE: + isCustomBitmap = IS_CUSTOM_BITMAP(SLIDER::GROUPED_SINGLE_BG_NORMAL); + pBgEffectBitmap = __pBgSingleEffectBitmap; + if (__pSlider->GetColor() == __currentBgColor) + { + pBgBitmap = __pBgSingleBitmap; + } + else + { + 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)); + return r; + } + else + { + + delete __pBgSingleBitmap; + __pBgSingleBitmap = null; + __pBgSingleBitmap = pBgGroupBitmap; + + pBgBitmap = __pBgSingleBitmap; + opacity = __pSlider->GetColor().GetAlpha(); + pBgBitmap->SetAlphaConstant(opacity); + __currentBgColor = __pSlider->GetColor(); + } + } + break; + + case GROUP_STYLE_NONE: + //fall through + default: + if (__pSlider->GetColor() == __currentBgColor) + { + pBgBitmap = __pBgGrpStyleNoneBitmap; + } + else + { + 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)); + return r; + } + else + { + delete __pBgGrpStyleNoneBitmap; + __pBgGrpStyleNoneBitmap = null; + __pBgGrpStyleNoneBitmap = pBgGroupBitmap; + + pBgBitmap = __pBgGrpStyleNoneBitmap; + opacity = __pSlider->GetColor().GetAlpha(); + pBgBitmap->SetAlphaConstant(opacity); + __currentBgColor = __pSlider->GetColor(); + } + } + break; + } + + DrawBitmap(canvas, __rect, pBgBitmap); + if (__groupStyle != GROUP_STYLE_NONE) + { + if (!isCustomBitmap) + { + DrawBitmap(canvas, __rect, pBgEffectBitmap); + } + } + } + return E_SUCCESS; +} + +void +_SliderPresenter::OnChangeLayout(_ControlOrientation orientation) +{ + int minValue = __pSliderModel->GetMinValue(); + int maxValue = __pSliderModel->GetMaxValue(); + + if (__isSliderPressed) + { + __handleX = ((__touchRect.width - __handleRect.width) * (__pSliderModel->GetValue() - minValue)) / (maxValue - minValue); + __pSlider->Invalidate(); + } + + __isSetValue = true; + + _TouchManager* pTouchMgr = _TouchManager::GetInstance(); + if (pTouchMgr != null) + { + __isTouchCanceled = true; + pTouchMgr->SetTouchCanceled(null); + } + + return; +} + + +result +_SliderPresenter::DrawSliderBar(Canvas& canvas) +{ + result r = E_SUCCESS; + float bitmapHeight = 0.0f; + float bitmapWidth = 0.0f; + float bitmapPositionX = 0.0f; + float bitmapPositionY = 0.0f; + int opacity = 0; + Bitmap* pReplacementBitmap = null; + Bitmap* pHandleBitmap = null; + Bitmap* pHandleEffectBitmap = null; + bool isCustomHandleBitmap = false; + bool isCustomBarBitmap = false; + + if (!__pSlider->IsEnabled()) // disabled + { + pHandleBitmap = __pHandleDisabledBitmap; + pHandleEffectBitmap = __pHandleDisabledEffectBitmap; + isCustomHandleBitmap = IS_CUSTOM_BITMAP(SLIDER::HANDLE_BG_DISABLED); + if(__isSliderPressed == true) + { + __isSliderPressed = false; + if (__pSlider->GetStyle() & _SLIDER_STYLE_OVERLAY) + { + __pSliderOverlay->SetVisibleState(false); + __pSliderOverlay->Close(); + } + } + } + else if (__isSliderPressed) // pressed + { + pHandleBitmap = __pHandlePressedBitmap; + pHandleEffectBitmap = __pHandlePressedEffectBitmap; + isCustomHandleBitmap = IS_CUSTOM_BITMAP(SLIDER::HANDLE_BG_PRESSED); + } + else //(__isSliderPressed == false) // normal state + { + pHandleBitmap = __pHandleNormalBitmap; + pHandleEffectBitmap = __pHandleNormalEffectBitmap; + isCustomHandleBitmap = IS_CUSTOM_BITMAP(SLIDER::HANDLE_BG_NORMAL); + } + + int minValue = __pSliderModel->GetMinValue(); + int maxValue = __pSliderModel->GetMaxValue(); + + __barRect = FloatRectangle(__barBgRect.x + __barOffset, __barBgRect.y, __handleRect.x , __barBgRect.height); + + if (__isSetValue && !__isSliderPressed && (maxValue - minValue) != 0) + { + __handleX = ((__touchRect.width - __handleRect.width) * (__pSliderModel->GetValue() - minValue)) / (maxValue - minValue); + } + + __handleRect.x = __touchRect.x + __handleX; + __handleRect.y = __touchRect.y; + + if (__handleRect.x < __touchRect.x) + { + __handleRect.x = __touchRect.x; + } + + if (__handleRect.x + __handleRect.width > __touchRect.x + __touchRect.width) + { + __handleRect.x = __touchRect.x + __touchRect.width - __handleRect.width; + } + + __barRect.width = __handleRect.x - __barRect.x + (__handleRect.width / 2); + + if (__pSlider->GetBarBackgroundColor() != __currentBarBgColor) + { + 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; + + __pBarBgColorReplacementBitmap = pReplacementBitmap; + __currentBarBgColor = __pSlider->GetBarBackgroundColor(); + } + + if (__pSlider->GetBarColor() != __currentBarColor) + { + 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; + + __pBarColorReplacementBitmap = pReplacementBitmap; + __currentBarColor = __pSlider->GetBarColor(); + } + + // Redrawing twice is required because, when slider is disabled we are applying alpha channel to the bar + // which will show the previously drawn portion. + + if (!__pSlider->IsEnabled()) // disabled + { + __pBarBgColorReplacementBitmap->SetAlphaConstant(0xFF); + DrawBitmap(canvas, __barBgRect, __pBarBgColorReplacementBitmap); + + __pBarColorReplacementBitmap->SetAlphaConstant(0x4C); + } + else + { + opacity = __pSlider->GetBarColor().GetAlpha(); + __pBarColorReplacementBitmap->SetAlphaConstant(opacity); + } + + isCustomBarBitmap = IS_CUSTOM_BITMAP(SLIDER::BAR_BG_NORMAL); + DrawBitmap(canvas, __barBgRect, __pBarBgColorReplacementBitmap); + if (!isCustomBarBitmap) + { + DrawBitmap(canvas, __barBgRect, __pBarBgResourceEffectBitmap); + } + + isCustomBarBitmap = IS_CUSTOM_BITMAP(SLIDER::BAR_NORMAL); + DrawBitmap(canvas, __barRect, __pBarColorReplacementBitmap); + if (!isCustomBarBitmap) + { + DrawBitmap(canvas, __barRect, __pBarResourceEffectBitmap); + } + + Canvas* pHandleCanvas = __pSlider->GetHandleCanvasN(); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, pHandleCanvas != null, r, "Propagating."); + + pHandleCanvas->SetBackgroundColor(0x00000000); + pHandleCanvas->Clear(); + + if (pHandleEffectBitmap != null) // drawing the default bitmap + { + r = DrawBitmap(*pHandleCanvas, FloatRectangle(0.0f, 0.0f, __handleRect.width, __handleRect.height), pHandleBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + if (!isCustomHandleBitmap) + { + r = DrawBitmap(*pHandleCanvas, FloatRectangle(0.0f, 0.0f, __handleRect.width, __handleRect.height), pHandleEffectBitmap); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + else + { + bitmapWidth = pHandleBitmap->GetWidth(); + bitmapHeight = pHandleBitmap->GetHeight(); + + if (!_BitmapImpl::CheckNinePatchedBitmapStrictly(*pHandleBitmap)) + { + // to clip the center portion of the larger bitmap. + if(bitmapWidth > __handleRect.width) + { + bitmapPositionX = (bitmapWidth / 2.0f) - (__handleRect.width / 2.0f); + bitmapWidth = __handleRect.width; + } + + if(bitmapHeight > __handleRect.height) + { + bitmapPositionY = (bitmapHeight / 2.0f) - (__handleRect.height / 2.0f); + bitmapHeight = __handleRect.height; + } + + r = pHandleCanvas->DrawBitmap(FloatRectangle(0.0f, 0.0f, __handleRect.width, __handleRect.height), *pHandleBitmap, FloatRectangle(bitmapPositionX, bitmapPositionY, bitmapWidth, bitmapHeight)); + } + else + { + r = pHandleCanvas->DrawNinePatchedBitmap(FloatRectangle(0.0f, 0.0f, __handleRect.width, __handleRect.height), *pHandleBitmap); + } + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + if ((__pSlider->IsFocused()) && (__isFocusModeStateChanged)) + { + if (__pHandleHighlightedBitmap != null) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pHandleHighlightedBitmap)) + { + r = pHandleCanvas->DrawNinePatchedBitmap(FloatRectangle(0.0f, 0.0f, __handleRect.width, __handleRect.height), *__pHandleHighlightedBitmap); + } + else + { + r = pHandleCanvas->DrawBitmap(FloatRectangle(0.0f, 0.0f, __handleRect.width, __handleRect.height), *__pHandleHighlightedBitmap); + } + + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + + r = __pSlider->UpdateHandle(__handleRect); + if (r != E_SUCCESS) + { + SysLogException(NID_UI_CTRL, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + delete pHandleCanvas; + pHandleCanvas = null; + + return r; + +CATCH: + delete pHandleCanvas; + pHandleCanvas = null; + + return r; +} + +result +_SliderPresenter::DrawSliderBarNumber(int value) +{ + result r = E_SUCCESS; + 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; + } + else if ((__pSlider->IsFocused()) && (__isFocusModeStateChanged)) + { + textColor = __handleTextHighlightedColor; + } + else if ((__isSliderPressed) && !(__pSlider->GetStyle() & _SLIDER_STYLE_OVERLAY)) + { + textColor = __handleTextPressedColor; + } + else + { + textColor = __handleTextColor; + } + + 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); + 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); + 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); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + (_FontImpl::GetInstance(*__pFont))->SetSize(handleNumberSize); + + __pHandleTextObject->RemoveAll(); + + r = __pHandleTextObject->AppendElement(*pSimpleText); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to append Simpletext.", GetErrorMessage(r)); + + __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 +_SliderPresenter::DrawTitleText(Canvas& canvas) +{ + result r = E_SUCCESS; + + TextSimple* pSimpleTitleText = null; + int titleTextSize = 0; + int titleLength = 0; + FloatRectangle titleTextBounds; + _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); + + titleLength = __pSlider->GetTitleText().GetLength(); + SysTryReturnResult(NID_UI_CTRL, titleLength != 0, E_SUCCESS, "Title text is empty"); + + r = GET_SHAPE_CONFIG(SLIDER::TITLE_TEXT_SIZE, orientation, titleTextSize); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + (_FontImpl::GetInstance(*__pFont))->SetSize(titleTextSize); + + titleTextBounds = GetTitleTextBounds(); + + if (__pTitleTextObject == null) + { + __pTitleTextObject = new (std::nothrow) TextObject(); + SysTryReturnResult(NID_UI_CTRL, __pTitleTextObject != null, r = E_OUT_OF_MEMORY, "Memory allocation failed."); + __pTitleTextObject->Construct(); + } + + pSimpleTitleText = new (std::nothrow) TextSimple(const_cast(__pSlider->GetTitleText().GetPointer()), __pSlider->GetTitleText().GetLength()); + + __pTitleTextObject->RemoveAll(); + __pTitleTextObject->AppendElement(*pSimpleTitleText); + __pTitleTextObject->SetForegroundColor(__pSlider->GetTitleTextColor(), 0, __pTitleTextObject->GetTextLength()); + __pTitleTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE); + __pTitleTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); + __pTitleTextObject->SetBounds(GetTitleTextBounds()); + __pTitleTextObject->Compose(); + + __pTitleTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT | TEXT_OBJECT_ALIGNMENT_MIDDLE); + __pTitleTextObject->SetFont(__pFont, 0, __pTitleTextObject->GetTextLength()); + __pTitleTextObject->Draw(*_CanvasImpl::GetInstance(canvas)); + + return r; +} + +result +_SliderPresenter::DrawIcon(Canvas& canvas) +{ + result r = E_SUCCESS; + + Bitmap* pLeftBitmap = __pSlider->GetIcon(ICON_POSITION_LEFT); + Bitmap* pRightBitmap = __pSlider->GetIcon(ICON_POSITION_RIGHT); + + if (pLeftBitmap != null) + { + r = DrawBitmap(canvas, GetIconBounds(ICON_POSITION_LEFT), pLeftBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + + if (pRightBitmap != null) + { + r = DrawBitmap(canvas, GetIconBounds(ICON_POSITION_RIGHT), pRightBitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + + return r; +} + +result +_SliderPresenter::DrawSliderOverlay(int value) +{ + result r = E_SUCCESS; + + FloatRectangle absBounds = __pSlider->GetAbsoluteBoundsF(true); + r = __pSliderOverlay->SetSliderRect(absBounds, __touchRect); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = __pSliderOverlay->DrawSliderOverlay(__touchRect.x + __handleX, __handleRect.width, value); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +result +_SliderPresenter::DrawBitmap(Canvas& canvas, const FloatRectangle& bounds, Bitmap* pBitmap) +{ + result r = E_SUCCESS; + + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pBitmap)) + { + r = canvas.DrawNinePatchedBitmap(bounds, *pBitmap); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating."); + } + else + { + r = canvas.DrawBitmap(bounds, *pBitmap); + SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), r, "Propagating.", GetErrorMessage(r)); + } + return r; +} + +FloatRectangle +_SliderPresenter::GetTitleTextBounds(void) const +{ + FloatRectangle titleTextBounds; + float topMargin = 0.0f; + + result r = E_SUCCESS; + _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); + + r = GET_SHAPE_CONFIG(SLIDER::TITLE_TEXT_POSITION_X, orientation, titleTextBounds.x); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, FloatRectangle(), r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GET_SHAPE_CONFIG(SLIDER::TITLE_TEXT_POSITION_Y, orientation, topMargin); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, FloatRectangle(), r, "[%s] Propagating.", GetErrorMessage(r)); + + titleTextBounds.y = topMargin; + + r = GET_SHAPE_CONFIG(SLIDER::TITLE_TEXT_HEIGHT, orientation, titleTextBounds.height); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, FloatRectangle(), r, "[%s] Propagating.", GetErrorMessage(r)); + + titleTextBounds.width = __pSlider->GetBoundsF().width - titleTextBounds.x; + + return titleTextBounds; +} + +FloatRectangle +_SliderPresenter::GetTouchBounds(void) const +{ + return __touchRect; +} + +FloatRectangle +_SliderPresenter::GetIconBounds(IconPosition iconPosition) const +{ + result r = E_SUCCESS; + + FloatRectangle iconBounds; + float iconSideMargin = 0.0f; + float barHeight = 0.0f; + + _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); + + r = GET_SHAPE_CONFIG(SLIDER::ICON_WIDTH, orientation, iconBounds.width); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, FloatRectangle(), r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GET_SHAPE_CONFIG(SLIDER::ICON_HEIGHT, orientation, iconBounds.height); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, FloatRectangle(), r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GET_SHAPE_CONFIG(SLIDER::ICON_LEFT_MARGIN, orientation, iconSideMargin); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, FloatRectangle(), r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GET_SHAPE_CONFIG(SLIDER::BAR_HEIGHT, orientation, barHeight);; + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, FloatRectangle(), r, "[%s] Propagating.", GetErrorMessage(r)); + + iconBounds.y = __barBgRect.y + ((barHeight - iconBounds.height) / 2); + + if (iconPosition == ICON_POSITION_LEFT) + { + iconBounds.x = iconSideMargin; + } + else + { + iconBounds.x = __rect.width - (iconSideMargin + iconBounds.width); + } + + return iconBounds; +} + +_SliderOverlay* +_SliderPresenter::GetSliderOverlay(void) const +{ + return __pSliderOverlay; +} + +bool +_SliderPresenter::IsTouchPressed() const +{ + return __isSliderPressed; +} + +bool +_SliderPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + if (__pSlider != &source) + { + return false; + } + + FloatPoint point = touchinfo.GetCurrentPosition(); + + + if (__touchRect.Contains(point)) + { + __isSetValue = false; + int candidateValue = __pSliderModel->GetValue(); + + 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(); + + if (__pSlider->GetStyle() & _SLIDER_STYLE_OVERLAY) + { + __pSliderOverlay->SetVisibleState(true); + __pSliderOverlay->Open(); + } + + __pSlider->Invalidate(); + __isSliderPressed = true; + } + + return __isSliderPressed; +} + +bool +_SliderPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + if (__pSlider != &source) + { + return false; + } + + FloatPoint point = touchinfo.GetCurrentPosition(); + + if (__isSliderPressed) + { + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pSlider); + __isSliderPressed = false; + __isSetValue = false; + + int candidateValue = 0; + + if (__isTouchCanceled) + { + __isTouchCanceled = false; + candidateValue = __pSliderModel->GetValue(); + } + else + { + candidateValue = CalculateSliderValue(point.x, point.x - __handleRect.x); + __pSliderModel->SetValue(candidateValue); + __pSlider->SetAccessibilityElementValue(); + } + + __pSlider->Invalidate(); + + if (__pSlider->GetStyle() & _SLIDER_STYLE_OVERLAY) + { + __pSliderOverlay->SetVisibleState(false); + __pSliderOverlay->Close(); + } + + // Adjustment Event Fire + _AdjustmentEvent* pAdjustmentEvent = dynamic_cast <_AdjustmentEvent*>(__pSlider->GetAdjustmentEvent()); + if (pAdjustmentEvent != null) + { + IEventArg* pEventArg = _AdjustmentEvent::CreateAdjustmentEventArgN(candidateValue); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pEventArg != null, true, r, "[%s] Propagating.", GetErrorMessage(r)); + + pAdjustmentEvent->Fire(*pEventArg); + } + return true; + } + + return false; +} + +bool +_SliderPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + if (__pSlider != &source) + { + return false; + } + + if (!__isSliderPressed) + { + return false; + } + + FloatPoint point = touchinfo.GetCurrentPosition(); + + int candidateValue = CalculateSliderValue(point.x, __handleRect.width / 2); + + __pSliderModel->SetValue(candidateValue); + __pSlider->SetAccessibilityElementValue(); + + __pSlider->Invalidate(); + + __pSlider->FireSliderMoveEvent(candidateValue); + + return true; +} + +bool +_SliderPresenter::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + __isTouchCanceled = true; + + return OnTouchReleased(source, touchinfo); +} + +void +_SliderPresenter::OnBoundsChanged(void) +{ + __isNeedToBeUpdated = true; + Resize(); + + return; +} + +void +_SliderPresenter::OnFontChanged(Font* pFont) +{ + __pFont = pFont; + __isNeedToBeUpdated = true; + + if(__pSliderOverlay != null) + __pSliderOverlay->SetFont(pFont); + + return; +} + +void +_SliderPresenter::OnFontInfoRequested(unsigned long& style, float& size) +{ + style = FONT_STYLE_BOLD; + size = __fontSize; + return; +} + +void +_SliderPresenter::OnAncestorEnableStateChanged(const _Control& control) +{ + if (__pSlider->IsEnabled()) + { + return; + } + + __pSlider->Invalidate(); + + return; +} + +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; +} + +void +_SliderPresenter::OnVisibleStateChanged() +{ + if (__pSlider->GetVisibleState()) + { + return; + } + + __isSliderPressed = false; + __isSetValue = true; + __isTouchCanceled = false; + + if (__pSlider->GetStyle() & _SLIDER_STYLE_OVERLAY) + { + __pSliderOverlay->SetVisibleState(false); + __pSliderOverlay->Close(); + } + + return; +} + +void +_SliderPresenter::SetMinValue(int minValue) +{ + __pSliderModel->SetMinValue(minValue); + + if (__pSliderModel->GetValue() < minValue) + { + __pSliderModel->SetValue(minValue); + } + + return; +} + +void +_SliderPresenter::SetMaxValue(int maxValue) +{ + __pSliderModel->SetMaxValue(maxValue); + + if (__pSliderModel->GetValue() > maxValue) + { + __pSliderModel->SetValue(maxValue); + } + + return; +} + +int +_SliderPresenter::GetMinValue(void) const +{ + return __pSliderModel->GetMinValue(); +} + +int +_SliderPresenter::GetMaxValue(void) const +{ + return __pSliderModel->GetMaxValue(); +} + +void +_SliderPresenter::SetValue(int value) +{ + SysTryReturnVoidResult(NID_UI_CTRL, __isSliderPressed == false, E_SYSTEM, "[E_SYSTEM] Failed to set value of slider."); + + int minValue = __pSliderModel->GetMinValue(); + int maxValue = __pSliderModel->GetMaxValue(); + + if (value > maxValue) + { + value = maxValue; + } + else if (value < minValue) + { + value = minValue; + } + + __isSetValue = true; + + __pSliderModel->SetValue(value); + + return; +} + +int +_SliderPresenter::GetValue(void) const +{ + return __pSliderModel->GetValue(); +} + +void +_SliderPresenter::SetNeedUpdate(void) +{ + __isNeedToBeUpdated = true; + return; +} + +void +_SliderPresenter::SetGroupStyle(GroupStyle groupStyle) +{ + __groupStyle = groupStyle; + return; +} + +void +_SliderPresenter::SetFocusMode(bool focusmode) +{ + __isFocusModeStateChanged = focusmode; +} + +bool +_SliderPresenter::GetFocusMode(void) +{ + return __isFocusModeStateChanged; +} + +result +_SliderPresenter::SetThumbBitmap(SliderThumbStatus status, const Bitmap& bitmap) +{ + Bitmap* pThumbBitmap = null; + result r = E_SUCCESS; + + pThumbBitmap = _BitmapImpl::CloneN(bitmap); + + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pThumbBitmap != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + switch (status) + { + case SLIDER_THUMB_STATUS_PRESSED: + + delete __pHandlePressedEffectBitmap; + __pHandlePressedEffectBitmap = null; + + delete __pHandlePressedBitmap; + __pHandlePressedBitmap = pThumbBitmap; + break; + + case SLIDER_THUMB_STATUS_DISABLED: + + delete __pHandleDisabledEffectBitmap; + __pHandleDisabledEffectBitmap = null; + + delete __pHandleDisabledBitmap; + __pHandleDisabledBitmap = pThumbBitmap; + break; + + case SLIDER_THUMB_STATUS_HIGHLIGHTED: + + delete __pHandleHighlightedEffectBitmap; + __pHandleHighlightedEffectBitmap = null; + + delete __pHandleHighlightedBitmap; + __pHandleHighlightedBitmap = pThumbBitmap; + break; + + case SLIDER_THUMB_STATUS_NORMAL: + // fall through + default: + + delete __pHandleNormalEffectBitmap; + __pHandleNormalEffectBitmap = null; + + delete __pHandleNormalBitmap; + __pHandleNormalBitmap = pThumbBitmap; + + __handleRect.width = __pHandleNormalBitmap->GetWidth(); + __handleRect.height = __pHandleNormalBitmap->GetHeight(); + + _VisualElement* pHandle = __pSlider->GetHandle(); + pHandle->SetBounds(FloatRectangle(__handleRect.x, __handleRect.y, __handleRect.width, __handleRect.height)); + + __handleOffset = __handleRect.width / 2; + __isCustomHandle = true; + break; + + } + + Resize(); + return r; +} + +void +_SliderPresenter::SetThumbTextColor(SliderThumbStatus status, const Color& color) +{ + switch (status) + { + case SLIDER_THUMB_STATUS_PRESSED: + __handleTextPressedColor = color; + __isCustomPressedTextColor = true; + break; + + case SLIDER_THUMB_STATUS_DISABLED: + __handleTextDisabledColor = color; + break; + + case SLIDER_THUMB_STATUS_HIGHLIGHTED: + __handleTextHighlightedColor = color; + break; + + case SLIDER_THUMB_STATUS_NORMAL: + // fall through + default: + __handleTextColor = color; + break; + } + + return; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_SplitPanel.cpp b/src/ui/controls/FUiCtrl_SplitPanel.cpp new file mode 100644 index 0000000..c723819 --- /dev/null +++ b/src/ui/controls/FUiCtrl_SplitPanel.cpp @@ -0,0 +1,848 @@ +// +// 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_SplitPanel.cpp + * @brief This is the implementation file for the _SplitPanel class. + */ + +#include +#include +#include +#include +#include +#include "FUi_ResourceManager.h" +#include "FUi_UiTouchEvent.h" +#include "FUi_TouchTapGestureDetector.h" +#include "FUiCtrl_SplitPanel.h" +#include "FUiCtrl_SplitPanelPresenter.h" + +using namespace Tizen::Ui; +using namespace Tizen::Graphics; +using namespace Tizen::Ui::Animations; +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_SplitPanel::_SplitPanel() + : __pSplitPanelPresenter(null) + , __pTapGesture(null) + , __pFirstPaneParent(null) + , __pSecondPaneParent(null) + , __pFirstPane(null) + , __pSecondPane(null) + , __splitPanelDividerDirection(SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL) + , __pSplitPanelEvent(null) + , __dividerTapCount(0) + , __pDividerVisualElement(null) +{ + for (int i=0; i < _SPLIT_PANEL_DIVIDER_STATE; i++) + { + __dividerPosition[i] = 0.0f; + __minimumDividerPosition[i] = 0.0f; + __maximumDividerPosition[i] = 0.0f; + } +} + +_SplitPanel* +_SplitPanel::CreateSplitPanelN(const FloatRectangle& rect, SplitPanelDividerStyle splitPanelDividerStyle, SplitPanelDividerDirection splitPanelDividerDirection) +{ + result r = E_SUCCESS; + float dividerThickness = 0.0f; + _SplitPanel* pSplitPanel = null; + _ControlOrientation orientation = _CONTROL_ORIENTATION_PORTRAIT; + + 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); + if (r != E_SUCCESS) + { + delete pSplitPanel; + pSplitPanel = null; + return null; + } + pSplitPanel->AcquireHandle(); + pSplitPanel->SetDividerDirection(splitPanelDividerDirection); + + orientation = _ControlManager::GetInstance()->GetOrientation(); + + if (splitPanelDividerStyle == SPLIT_PANEL_DIVIDER_STYLE_MOVABLE) + { + GET_SHAPE_CONFIG(SPLITPANEL::MOVABLE_DIVIDER_THICKNESS, orientation, dividerThickness); + } + else + { + GET_SHAPE_CONFIG(SPLITPANEL::FIXED_DIVIDER_THICKNESS, orientation, dividerThickness); + } + + pSplitPanel->__maximumDividerPosition[_SPLIT_PANEL_VERTICAL_DIVIDER_ORIENTATION_PORTRAIT] = rect.width - dividerThickness; + pSplitPanel->__maximumDividerPosition[_SPLIT_PANEL_VERTICAL_DIVIDER_ORIENTATION_LANDSCAPE] = rect.width - dividerThickness; + pSplitPanel->__maximumDividerPosition[_SPLIT_PANEL_HORIZONTAL_DIVIDER_ORIENTATION_PORTRAIT] = rect.height - dividerThickness; + pSplitPanel->__maximumDividerPosition[_SPLIT_PANEL_HORIZONTAL_DIVIDER_ORIENTATION_LANDSCAPE] = rect.width - dividerThickness; + + pSplitPanel->__dividerPosition[_SPLIT_PANEL_VERTICAL_DIVIDER_ORIENTATION_PORTRAIT] = rect.width / 2.0f; + pSplitPanel->__dividerPosition[_SPLIT_PANEL_VERTICAL_DIVIDER_ORIENTATION_LANDSCAPE] = rect.width / 2.0f; + 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(); + SysTryCatch(NID_UI_CTRL, pSplitPanel->__pTapGesture, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pSplitPanel->AddGestureDetector(*(pSplitPanel->__pTapGesture)); + r = pSplitPanel->__pTapGesture->AddGestureListener(*pSplitPanel); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + pSplitPanel->SetFocusable(false); + pSplitPanel->SetBackgroundColor(Color(0,0,0,0)); + + return pSplitPanel; + +CATCH: + if (pSplitPanel->__pTapGesture != null) + { + pSplitPanel->__pTapGesture->RemoveGestureListener(*pSplitPanel); + pSplitPanel->RemoveGestureDetector(*pSplitPanel->__pTapGesture); + + delete pSplitPanel->__pTapGesture; + pSplitPanel->__pTapGesture = null; + } + + delete pSplitPanel; + return null; +} + +result +_SplitPanel::Construct(SplitPanelDividerStyle splitPanelDividerStyle, SplitPanelDividerDirection splitPanelDividerDirection) +{ + result r = E_SUCCESS; + + __pDividerVisualElement = new (std::nothrow) VisualElement(); + SysTryReturnResult(NID_UI_CTRL, __pDividerVisualElement, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + r = __pDividerVisualElement->Construct(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to construct divider visual element.", GetErrorMessage(r)); + + __pDividerVisualElement->SetShowState(true); + __pDividerVisualElement->SetImplicitAnimationEnabled(false); + __pDividerVisualElement->SetClipChildrenEnabled(false); + + 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(); + SysTryCatch(NID_UI_CTRL, __pSplitPanelPresenter != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = __pSplitPanelPresenter->Construct(*this, splitPanelDividerStyle, splitPanelDividerDirection); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to construct presenter.", GetErrorMessage(r)); + + __pFirstPaneParent = _Control::CreateControlN(); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, __pFirstPaneParent != null, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pSecondPaneParent = _Control::CreateControlN(); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, __pSecondPaneParent != null, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pFirstPaneParent->SetFocusable(false); + __pSecondPaneParent->SetFocusable(false); + + __pFirstPaneParent->SetBackgroundColor(Color(0,0,0,0)); + __pSecondPaneParent->SetBackgroundColor(Color(0,0,0,0)); + + r = AttachChild(*__pFirstPaneParent); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = AttachChild(*__pSecondPaneParent); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + +CATCH: + + if (__pDividerVisualElement != null) + { + __pDividerVisualElement->Destroy(); + __pDividerVisualElement = null; + } + + delete __pSplitPanelPresenter; + __pSplitPanelPresenter = null; + + if (__pFirstPaneParent != null) + { + DetachChild(*__pFirstPaneParent); + + delete __pFirstPaneParent; + __pFirstPaneParent = null; + } + + if (__pSecondPaneParent != null) + { + DetachChild(*__pSecondPaneParent); + + delete __pSecondPaneParent; + __pSecondPaneParent = null; + } + + return r; +} + +_SplitPanel::~_SplitPanel(void) +{ + delete __pSplitPanelPresenter; + __pSplitPanelPresenter = null; + + delete __pSplitPanelEvent; + __pSplitPanelEvent = null; + + if (__pTapGesture != null) + { + __pTapGesture->RemoveGestureListener(*this); + RemoveGestureDetector(*__pTapGesture); + + delete __pTapGesture; + __pTapGesture = null; + } + + if (__pDividerVisualElement != null) + { + GetVisualElement()->DetachChild(*__pDividerVisualElement); + + __pDividerVisualElement->Destroy(); + __pDividerVisualElement = null; + } + + if (__pFirstPaneParent != null) + { + DetachChild(*__pFirstPaneParent); + + delete __pFirstPaneParent; + __pFirstPaneParent = null; + } + + if (__pSecondPaneParent != null) + { + DetachChild(*__pSecondPaneParent); + + delete __pSecondPaneParent; + __pSecondPaneParent = null; + } + + ClearLastResult(); +} + +result +_SplitPanel::SetPresenter(const _SplitPanelPresenter& splitPanelPresenter) +{ + __pSplitPanelPresenter = const_cast<_SplitPanelPresenter*>(&splitPanelPresenter); + return E_SUCCESS; +} + +result +_SplitPanel::AddSplitPanelEventListener(const _ISplitPanelEventListener& listener) +{ + result r = E_SUCCESS; + + if (__pSplitPanelEvent == null) + { + __pSplitPanelEvent = _SplitPanelEvent::CreateInstanceN(*this); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, __pSplitPanelEvent, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pSplitPanelEvent->AddListener(listener); + } + + return r; +} + +result +_SplitPanel::RemoveSplitPanelEventListener(const _ISplitPanelEventListener& listener) +{ + SysTryReturn(NID_UI_CTRL, __pSplitPanelEvent, E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] System error occurred."); + + __pSplitPanelEvent->RemoveListener(listener); + + return E_SUCCESS; +} + +void +_SplitPanel::OnDraw(void) +{ + __pSplitPanelPresenter->Draw(); + + return; +} + +void +_SplitPanel::OnChangeLayout(_ControlOrientation orientation) +{ + __pSplitPanelPresenter->OnChangeLayout(orientation); + + return; +} + +void +_SplitPanel::OnBoundsChanged(void) +{ + FloatRectangle bounds = GetBoundsF(); + float dividerThickness = 0.0f; + _ControlOrientation orientation = _CONTROL_ORIENTATION_PORTRAIT; + + orientation = _ControlManager::GetInstance()->GetOrientation(); + + GET_SHAPE_CONFIG(SPLITPANEL::MOVABLE_DIVIDER_THICKNESS, orientation, dividerThickness); + + if (GetDividerDirection() == SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL) + { + if (GetMaximumDividerPosition() > (bounds.width - dividerThickness)) + { + SetMaximumDividerPosition(bounds.width - dividerThickness); + } + } + else + { + if (GetMaximumDividerPosition() > (bounds.height - dividerThickness)) + { + SetMaximumDividerPosition(bounds.height - dividerThickness); + } + } + + __pSplitPanelPresenter->OnBoundsChanged(); + + return; +} + +_UiTouchEventDelivery +_SplitPanel::OnPreviewTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + if (!IsPaneMaximized(SPLIT_PANEL_PANE_ORDER_FIRST) && !IsPaneMaximized(SPLIT_PANEL_PANE_ORDER_SECOND) && __pSplitPanelPresenter->OnTouchPressed(source, touchinfo)) + { + return _UI_TOUCH_EVENT_DELIVERY_NO; + } + + return _UI_TOUCH_EVENT_DELIVERY_YES; +} + +_UiTouchEventDelivery +_SplitPanel::OnPreviewTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + if (!IsPaneMaximized(SPLIT_PANEL_PANE_ORDER_FIRST) && !IsPaneMaximized(SPLIT_PANEL_PANE_ORDER_SECOND) && __pSplitPanelPresenter->OnTouchReleased(source, touchinfo)) + { + return _UI_TOUCH_EVENT_DELIVERY_NO; + } + + return _UI_TOUCH_EVENT_DELIVERY_YES; +} + +_UiTouchEventDelivery +_SplitPanel::OnPreviewTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + if (__pSplitPanelPresenter->OnTouchMoved(source, touchinfo)) + { + return _UI_TOUCH_EVENT_DELIVERY_NO; + } + + return _UI_TOUCH_EVENT_DELIVERY_YES; +} + +_UiTouchEventDelivery +_SplitPanel::OnPreviewTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + if (__pSplitPanelPresenter->OnTouchCanceled(source, touchinfo)) + { + return _UI_TOUCH_EVENT_DELIVERY_NO; + } + + return _UI_TOUCH_EVENT_DELIVERY_YES; +} + +bool +_SplitPanel::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + if (&source != this) + { + return false; + } + return __pSplitPanelPresenter->OnTouchPressed(source, touchinfo); +} + +bool +_SplitPanel::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + if (&source != this) + { + return false; + } + return __pSplitPanelPresenter->OnTouchReleased(source, touchinfo); +} + +bool +_SplitPanel::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + if (&source != this) + { + return false; + } + return __pSplitPanelPresenter->OnTouchMoved(source, touchinfo); +} + +bool +_SplitPanel::OnTouchCanceled(const _Control & source, const _TouchInfo & touchinfo) +{ + return __pSplitPanelPresenter->OnTouchCanceled(source, touchinfo); +} + +bool +_SplitPanel::OnTapGestureDetected(_TouchTapGestureDetector& gesture) +{ + if (__pSplitPanelPresenter == null) + { + return true; + } + + return __pSplitPanelPresenter->OnTapGestureDetected(gesture); +} + +bool +_SplitPanel::OnTapGestureCanceled(_TouchTapGestureDetector& gesture) +{ + return __pSplitPanelPresenter->OnTapGestureCanceled(gesture); +} + +result +_SplitPanel::SetPane(_Control* pControl, SplitPanelPaneOrder paneOrder) +{ + result r = E_SUCCESS; + + if (paneOrder == SPLIT_PANEL_PANE_ORDER_FIRST) + { + if (pControl != null) + { + r = __pFirstPaneParent->AttachChild(*pControl); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + __pFirstPane = pControl; + } + else + { + if (pControl != null) + { + r = __pSecondPaneParent->AttachChild(*pControl); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + __pSecondPane = pControl; + } + + __pSplitPanelPresenter->RecalcSplitPanel(); + + return E_SUCCESS; +} + +_Control* +_SplitPanel::GetPane(SplitPanelPaneOrder paneOrder) const +{ + if (paneOrder == SPLIT_PANEL_PANE_ORDER_FIRST) + { + return const_cast <_Control*>(__pFirstPane); + } + + return const_cast <_Control*>(__pSecondPane); +} + +_Control* +_SplitPanel::GetPaneParent(SplitPanelPaneOrder paneOrder) const +{ + if (paneOrder == SPLIT_PANEL_PANE_ORDER_FIRST) + { + return const_cast <_Control*>(__pFirstPaneParent); + } + + return const_cast <_Control*>(__pSecondPaneParent); +} + +result +_SplitPanel::SetDividerStyle(SplitPanelDividerStyle splitPanelDividerStyle) +{ + __pSplitPanelPresenter->SetDividerStyle(splitPanelDividerStyle); + + return E_SUCCESS; +} + +SplitPanelDividerStyle +_SplitPanel::GetDividerStyle(void) const +{ + return __pSplitPanelPresenter->GetDividerStyle(); +} + +result +_SplitPanel::SetDividerPosition(float position) +{ + const float width = GetBoundsF().width; + const float height = GetBoundsF().height; + int configValue = 0; + float margin = 0.0f; + _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); + + if (GetDividerStyle() == SPLIT_PANEL_DIVIDER_STYLE_MOVABLE) + { + GET_SHAPE_CONFIG(SPLITPANEL::MOVABLE_DIVIDER_THICKNESS, orientation, configValue); + } + else + { + GET_SHAPE_CONFIG(SPLITPANEL::FIXED_DIVIDER_THICKNESS, orientation, configValue); + } + + margin = _CoordinateSystemUtils::ConvertToFloat(configValue); + + if ((0.0f > position) || + ((GetDividerDirection() == SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL) && ((width - margin) < position)) || + ((GetDividerDirection() == SPLIT_PANEL_DIVIDER_DIRECTION_HORIZONTAL) && ((height - margin) < position))) + { + return E_OUT_OF_RANGE; + } + + if (GetDividerStyle() == SPLIT_PANEL_DIVIDER_STYLE_MOVABLE) + { + if ((GetMinimumDividerPosition() > position) || (GetMaximumDividerPosition() < position)) + { + return E_OUT_OF_RANGE; + } + } + + if (orientation == _CONTROL_ORIENTATION_LANDSCAPE) + { + if (GetDividerDirection() == SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL) + { + __dividerPosition[_SPLIT_PANEL_VERTICAL_DIVIDER_ORIENTATION_LANDSCAPE] = position; + } + else + { + __dividerPosition[_SPLIT_PANEL_HORIZONTAL_DIVIDER_ORIENTATION_LANDSCAPE] = position; + } + } + else + { + if (GetDividerDirection() == SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL) + { + __dividerPosition[_SPLIT_PANEL_VERTICAL_DIVIDER_ORIENTATION_PORTRAIT] = position; + } + else + { + __dividerPosition[_SPLIT_PANEL_HORIZONTAL_DIVIDER_ORIENTATION_PORTRAIT] = position; + } + } + + __pSplitPanelPresenter->RecalcSplitPanel(); + + return E_SUCCESS; +} + +float +_SplitPanel::GetDividerPosition(void) const +{ + _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); + + if (orientation == _CONTROL_ORIENTATION_LANDSCAPE) + { + if (GetDividerDirection() == SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL) + { + return __dividerPosition[_SPLIT_PANEL_VERTICAL_DIVIDER_ORIENTATION_LANDSCAPE]; + } + else + { + return __dividerPosition[_SPLIT_PANEL_HORIZONTAL_DIVIDER_ORIENTATION_LANDSCAPE]; + } + } + else + { + if (GetDividerDirection() == SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL) + { + return __dividerPosition[_SPLIT_PANEL_VERTICAL_DIVIDER_ORIENTATION_PORTRAIT]; + } + else + { + return __dividerPosition[_SPLIT_PANEL_HORIZONTAL_DIVIDER_ORIENTATION_PORTRAIT]; + } + } +} + +result +_SplitPanel::SetMaximumDividerPosition(float position) +{ + const float width = GetBoundsF().width; + const float height = GetBoundsF().height; + int configValue = 0; + float margin = 0.0f; + _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); + + if (GetDividerStyle() == SPLIT_PANEL_DIVIDER_STYLE_MOVABLE) + { + GET_SHAPE_CONFIG(SPLITPANEL::MOVABLE_DIVIDER_THICKNESS, orientation, configValue); + } + else + { + GET_SHAPE_CONFIG(SPLITPANEL::FIXED_DIVIDER_THICKNESS, orientation, configValue); + } + + margin = _CoordinateSystemUtils::ConvertToFloat(configValue); + + if ((0.0f > position) || + ((GetDividerDirection() == SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL) && ((width - margin) < position)) || + ((GetDividerDirection() == SPLIT_PANEL_DIVIDER_DIRECTION_HORIZONTAL) && ((height - margin) < position)) || + (position < GetMinimumDividerPosition())) + { + return E_OUT_OF_RANGE; + } + + if (orientation == _CONTROL_ORIENTATION_LANDSCAPE) + { + if (GetDividerDirection() == SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL) + { + __maximumDividerPosition[_SPLIT_PANEL_VERTICAL_DIVIDER_ORIENTATION_LANDSCAPE] = position; + } + else + { + __maximumDividerPosition[_SPLIT_PANEL_HORIZONTAL_DIVIDER_ORIENTATION_LANDSCAPE] = position; + } + } + else + { + if (GetDividerDirection() == SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL) + { + __maximumDividerPosition[_SPLIT_PANEL_VERTICAL_DIVIDER_ORIENTATION_PORTRAIT] = position; + } + else + { + __maximumDividerPosition[_SPLIT_PANEL_HORIZONTAL_DIVIDER_ORIENTATION_PORTRAIT] = position; + } + } + + if (GetDividerPosition() > position) + { + SetDividerPosition(position); + } + + return E_SUCCESS; +} + +float +_SplitPanel::GetMaximumDividerPosition(void) const +{ + _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); + + if (orientation == _CONTROL_ORIENTATION_LANDSCAPE) + { + if (GetDividerDirection() == SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL) + { + return __maximumDividerPosition[_SPLIT_PANEL_VERTICAL_DIVIDER_ORIENTATION_LANDSCAPE]; + } + else + { + 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]; + } + } +} + +result +_SplitPanel::SetMinimumDividerPosition(float position) +{ + const float width = GetBoundsF().width; + const float height = GetBoundsF().height; + int configValue = 0; + float margin = 0.0f; + _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); + + if (GetDividerStyle() == SPLIT_PANEL_DIVIDER_STYLE_MOVABLE) + { + GET_SHAPE_CONFIG(SPLITPANEL::MOVABLE_DIVIDER_THICKNESS, orientation, configValue); + } + else + { + GET_SHAPE_CONFIG(SPLITPANEL::FIXED_DIVIDER_THICKNESS, orientation, configValue); + } + + margin = _CoordinateSystemUtils::ConvertToFloat(configValue); + + if ((0.0f > position) || + ((GetDividerDirection() == SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL) && ((width - margin) < position)) || + ((GetDividerDirection() == SPLIT_PANEL_DIVIDER_DIRECTION_HORIZONTAL) && ((height - margin) < position)) || + (position > GetMaximumDividerPosition())) + { + return E_OUT_OF_RANGE; + } + + if (orientation == _CONTROL_ORIENTATION_LANDSCAPE) + { + if (GetDividerDirection() == SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL) + { + __minimumDividerPosition[_SPLIT_PANEL_VERTICAL_DIVIDER_ORIENTATION_LANDSCAPE] = position; + } + else + { + __minimumDividerPosition[_SPLIT_PANEL_HORIZONTAL_DIVIDER_ORIENTATION_LANDSCAPE] = position; + } + } + else + { + if (GetDividerDirection() == SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL) + { + __minimumDividerPosition[_SPLIT_PANEL_VERTICAL_DIVIDER_ORIENTATION_PORTRAIT] = position; + } + else + { + __minimumDividerPosition[_SPLIT_PANEL_HORIZONTAL_DIVIDER_ORIENTATION_PORTRAIT] = position; + } + } + + if (GetDividerPosition() < position) + { + SetDividerPosition(position); + } + + return E_SUCCESS; +} + +float +_SplitPanel::GetMinimumDividerPosition(void) const +{ + _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); + + if (orientation == _CONTROL_ORIENTATION_LANDSCAPE) + { + if (GetDividerDirection() == SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL) + { + return __minimumDividerPosition[_SPLIT_PANEL_VERTICAL_DIVIDER_ORIENTATION_LANDSCAPE]; + } + else + { + 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]; + } + } +} + +void +_SplitPanel::SetDividerDirection(SplitPanelDividerDirection dividerDirection) +{ + __splitPanelDividerDirection = dividerDirection; + + return; +} + +SplitPanelDividerDirection +_SplitPanel::GetDividerDirection(void) const +{ + SetLastResult(E_SUCCESS); + + return __splitPanelDividerDirection; +} + +result +_SplitPanel::MaximizePane(SplitPanelPaneOrder paneOrder) +{ + return __pSplitPanelPresenter->MaximizePane(paneOrder); +} + +bool +_SplitPanel::IsPaneMaximized(SplitPanelPaneOrder paneOrder) const +{ + return __pSplitPanelPresenter->IsPaneMaximized(paneOrder); +} + +result +_SplitPanel::RestorePane(void) +{ + return __pSplitPanelPresenter->RestorePane(); +} + +result +_SplitPanel::SendSplitPanelEvent(_SplitPanelEventStatus status) +{ + result r = E_SUCCESS; + IEventArg* pEventArg = null; + + if (__pSplitPanelEvent != null) + { + pEventArg = _SplitPanelEvent::CreateSplitPanelEventArgN(status); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pEventArg, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pSplitPanelEvent->Fire(*pEventArg); + } + + return r; +} + +void +_SplitPanel::SetTapCount(int count) +{ + __dividerTapCount = count; + + return; +} + +int +_SplitPanel::GetTapCount(void) const +{ + return __dividerTapCount; +} + +VisualElement* +_SplitPanel::GetDividerVisualElement(void) +{ + return __pDividerVisualElement; +} + +void +_SplitPanel::SetDividerVisualElementBounds(Tizen::Graphics::FloatRectangle& bounds) +{ + if (__pDividerVisualElement != null) + { + __pDividerVisualElement->SetBounds(bounds); + } + + return; +} + +}}} // Tizen::Ui::Controls + diff --git a/src/ui/controls/FUiCtrl_SplitPanelEvent.cpp b/src/ui/controls/FUiCtrl_SplitPanelEvent.cpp new file mode 100644 index 0000000..9a89458 --- /dev/null +++ b/src/ui/controls/FUiCtrl_SplitPanelEvent.cpp @@ -0,0 +1,175 @@ +// +// 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. +// + +#include +#include +#include +#include "FUiCtrl_ISplitPanelEventListener.h" +#include "FUiCtrl_SplitPanelEvent.h" +#include "FUiCtrl_SplitPanel.h" + +// using namespace +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @class _SplitPanelEventArg + * @brief This class is used as the argument to action event listener. + * + * This class is used as the argument to splitpanel event listener. When an splitpanel event is generated + * (such as when a splitpanel is pressed) the SplitPanelEvent calls SplitPanelEventListener's OnActionPerformed + * with an instance of this class as an argument. + * + * From this class, one can find out, the (event) source object and the action ID. + */ +class _OSP_EXPORT_ _SplitPanelEventArg + : public IEventArg + , public Object +{ +// Lifecycle +public: + /** + * This is the default class constructor. + * + * @param[in] status + */ + _SplitPanelEventArg(_SplitPanelEventStatus status); + + /** + * This is the class destructor. + * + */ + virtual ~_SplitPanelEventArg(void); + + +// Access +public: + /** + * This method returns the status which the event initially occurred. + * + * @return See the comment above. + */ + _SplitPanelEventStatus GetStatus(void) const; + + +// Attribute +private: + /** + * Event status. + */ + _SplitPanelEventStatus __status; +}; + +_SplitPanelEventArg::_SplitPanelEventArg(_SplitPanelEventStatus status) + : __status(status) +{ + +} + +_SplitPanelEventArg::~_SplitPanelEventArg(void) +{ + +} + +_SplitPanelEventStatus +_SplitPanelEventArg::GetStatus(void) const +{ + return __status; +} + +_SplitPanelEvent::_SplitPanelEvent(const _SplitPanel& source) + : __pSource(null) +{ + result r = _Event::Initialize(); + + // set event source + if (r == E_SUCCESS) + { + __pSource = &source; + } +} + +_SplitPanelEvent::~_SplitPanelEvent(void) +{ + +} + +_SplitPanelEvent* +_SplitPanelEvent::CreateInstanceN(const _SplitPanel& source) +{ + _SplitPanelEvent* pSplitPanelEvent = new (std::nothrow) _SplitPanelEvent(source); + SysTryReturn(NID_UI_CTRL, pSplitPanelEvent, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + if (IsFailed(GetLastResult())) + { + goto CATCH; + } + + return pSplitPanelEvent; + +CATCH: + delete pSplitPanelEvent; + return null; +} + +const _SplitPanel* +_SplitPanelEvent::GetSource(void) const +{ + return __pSource; +} + +void +_SplitPanelEvent::FireImpl(IEventListener& listener, const IEventArg& arg) +{ + // cast to _IActionEventListener + _ISplitPanelEventListener* pSplitPanelListner = dynamic_cast <_ISplitPanelEventListener*>(&listener); + SysTryReturnVoidResult(NID_UI_CTRL, pSplitPanelListner != null, E_INVALID_ARG, "[E_INVALID_ARG] The invalid listener was given.\n"); + + // cast to _SplitPanelEventArg + const _SplitPanelEventArg* pArg = dynamic_cast (&arg); + SysTryReturnVoidResult(NID_UI_CTRL, pArg != null, E_INVALID_ARG, "[E_INVALID_ARG] The invalid Event Argument was given.\n"); + + _SplitPanel* pSource = null; + pSource = const_cast <_SplitPanel*>(__pSource); + SysTryReturnVoidResult(NID_UI_CTRL, pSource != null, E_INVALID_ARG, "[E_INVALID_ARG] The invalid Event Argument was given.\n"); + + // call cursor change event listener method + _SplitPanelEventStatus status= pArg->GetStatus(); + + if (status == _SPLIT_PANEL_EVENT_DIVIDER_POSITION_CHANGE) + { + pSplitPanelListner->OnDividerPositionChanged(*pSource, pSource->GetDividerPosition()); + } + else + { + pSplitPanelListner->OnDividerDoublePressed(*pSource); + } +} + +IEventArg* +_SplitPanelEvent::CreateSplitPanelEventArgN(_SplitPanelEventStatus status) +{ + _SplitPanelEventArg* pEventArg = new (std::nothrow) _SplitPanelEventArg(status); + SysTryReturn(NID_UI_CTRL, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + return pEventArg; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_SplitPanelImpl.cpp b/src/ui/controls/FUiCtrl_SplitPanelImpl.cpp new file mode 100644 index 0000000..92a0bb3 --- /dev/null +++ b/src/ui/controls/FUiCtrl_SplitPanelImpl.cpp @@ -0,0 +1,562 @@ +// +// 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_SplitPanelImpl.cpp + * @brief This is the implementation file for the _SplitPanelImpl class. + */ + +#include +#include +#include +#include +#include +#include +#include +#include "FUiCtrl_SplitPanelImpl.h" +#include "FUiCtrl_SplitPanel.h" +#include "FUi_UiBuilder.h" +#include "FUi_CoordinateSystemUtils.h" + +using namespace Tizen::Base; +using namespace Tizen::Ui; +using namespace Tizen::Graphics; +using namespace Tizen::Base::Runtime; +using namespace Tizen::App; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_SplitPanelImpl* +_SplitPanelImpl::GetInstance(SplitPanel& pSplitPanel) +{ + return static_cast<_SplitPanelImpl*> (pSplitPanel._pControlImpl); +} + +const _SplitPanelImpl* +_SplitPanelImpl::GetInstance(const SplitPanel& pSplitPanel) +{ + return static_cast (pSplitPanel._pControlImpl); +} + +_SplitPanelImpl::_SplitPanelImpl(SplitPanel* pPublic, _SplitPanel* pCore) + : _ControlImpl(pPublic, pCore) + , __pSplitPanel(pCore) + , __pPublicSplitPanelEvent(null) +{ + ClearLastResult(); +} + +_SplitPanelImpl::~_SplitPanelImpl(void) +{ + if (__pSplitPanel != null) + { + __pSplitPanel->RemoveSplitPanelEventListener(*this); + } + + delete __pPublicSplitPanelEvent; + __pPublicSplitPanelEvent = null; + + ClearLastResult(); +} + +_SplitPanelImpl* +_SplitPanelImpl::CreateSplitPanelImplN(SplitPanel* pControl, const Rectangle& rect, SplitPanelDividerStyle splitPanelDividerStyle, SplitPanelDividerDirection splitPanelDividerDirection) +{ + ClearLastResult(); + result r = E_SUCCESS; + + FloatRectangle rectF = _CoordinateSystemUtils::ConvertToFloat(rect); + + _SplitPanel* pCore = _SplitPanel::CreateSplitPanelN(rectF, splitPanelDividerStyle, splitPanelDividerDirection); + SysTryReturn(NID_UI_CTRL, pCore != null, null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _SplitPanelImpl* pImpl = new (std::nothrow) _SplitPanelImpl(pControl, pCore); + r = _ControlImpl::CheckConstruction(pCore, pImpl); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + return pImpl; +} + +_SplitPanelImpl* +_SplitPanelImpl::CreateSplitPanelImplFN(SplitPanel* pControl, const FloatRectangle& rect, SplitPanelDividerStyle splitPanelDividerStyle, SplitPanelDividerDirection splitPanelDividerDirection) +{ + ClearLastResult(); + result r = E_SUCCESS; + + _SplitPanel* pCore = _SplitPanel::CreateSplitPanelN(rect, splitPanelDividerStyle, splitPanelDividerDirection); + SysTryReturn(NID_UI_CTRL, pCore != null, null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _SplitPanelImpl* pImpl = new (std::nothrow) _SplitPanelImpl(pControl, pCore); + r = _ControlImpl::CheckConstruction(pCore, pImpl); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + return pImpl; +} + +result +_SplitPanelImpl::Initialize(const Rectangle& rect) +{ + ClearLastResult(); + result r = E_SUCCESS; + + FloatRectangle rectF = _CoordinateSystemUtils::ConvertToFloat(rect); + + r = SetBounds(rectF); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + __pPublicSplitPanelEvent = _PublicSplitPanelEvent::CreateInstanceN(GetPublic()); + SysTryReturn(NID_UI_CTRL, __pPublicSplitPanelEvent, GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + r = GetCore().AddSplitPanelEventListener(*this); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +_SplitPanelImpl::InitializeF(const FloatRectangle& rect) +{ + ClearLastResult(); + result r = E_SUCCESS; + + r = SetBounds(rect); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + __pPublicSplitPanelEvent = _PublicSplitPanelEvent::CreateInstanceN(GetPublic()); + SysTryReturn(NID_UI_CTRL, __pPublicSplitPanelEvent, GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + r = GetCore().AddSplitPanelEventListener(*this); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +const char* +_SplitPanelImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Controls::SplitPanel"; +} + +const SplitPanel& +_SplitPanelImpl::GetPublic(void) const +{ + return static_cast (_ControlImpl::GetPublic()); +} + +SplitPanel& +_SplitPanelImpl::GetPublic(void) +{ + return static_cast (_ControlImpl::GetPublic()); +} + +const _SplitPanel& +_SplitPanelImpl::GetCore(void) const +{ + return static_cast (_ControlImpl::GetCore()); +} + +_SplitPanel& +_SplitPanelImpl::GetCore(void) +{ + return static_cast <_SplitPanel&>(_ControlImpl::GetCore()); +} + +void +_SplitPanelImpl::OnDividerPositionChanged(_SplitPanel& source, int position) +{ + ClearLastResult(); + + if (__pPublicSplitPanelEvent != null) + { + IEventArg* pEventArg = _PublicSplitPanelEvent::CreateSplitPanelEventArgN(SPLIT_PANEL_EVENT_DIVIDER_POSITION_CHANGE); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + __pPublicSplitPanelEvent->Fire(*pEventArg); + } +} + +void +_SplitPanelImpl::OnDividerDoublePressed(_SplitPanel& source) +{ + ClearLastResult(); + + if (__pPublicSplitPanelEvent != null) + { + IEventArg* pEventArg = _PublicSplitPanelEvent::CreateSplitPanelEventArgN(SPLIT_PANEL_EVENT_DIVIDER_DOUBLE_PRESSED); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + __pPublicSplitPanelEvent->Fire(*pEventArg); + } +} + +result +_SplitPanelImpl::AddSplitPanelEventListener(ISplitPanelEventListener& listener) +{ + return __pPublicSplitPanelEvent->AddListener(listener); +} + +result +_SplitPanelImpl::AddSplitPanelEventListener(ISplitPanelEventListenerF& listener) +{ + return __pPublicSplitPanelEvent->AddListener(listener); +} + +result +_SplitPanelImpl::RemoveSplitPanelEventListener(ISplitPanelEventListener& listener) +{ + return __pPublicSplitPanelEvent->RemoveListener(listener); +} + +result +_SplitPanelImpl::RemoveSplitPanelEventListener(ISplitPanelEventListenerF& listener) +{ + return __pPublicSplitPanelEvent->RemoveListener(listener); +} + +result +_SplitPanelImpl::SetPane(_ControlImpl* pControl, SplitPanelPaneOrder paneOrder) +{ + result r = E_SUCCESS; + + if (pControl == null) + { + r = GetCore().SetPane(null, paneOrder); + } + else + { + r = GetCore().SetPane(&(pControl->GetCore()), paneOrder); + } + + SetLastResultReturn(r); +} + +_ControlImpl* +_SplitPanelImpl::GetPane(SplitPanelPaneOrder paneOrder) const +{ + _Control* pControl = GetCore().GetPane(paneOrder); + if (pControl == null) + { + return null; + } + + return static_cast<_ControlImpl*>(pControl->GetUserData()); +} + +result +_SplitPanelImpl::SetDividerPosition(int position) +{ + float floatPosition = _CoordinateSystemUtils::ConvertToFloat(position); + result r = GetCore().SetDividerPosition(floatPosition); + SetLastResultReturn(r); +} + +result +_SplitPanelImpl::SetDividerPosition(float position) +{ + result r = GetCore().SetDividerPosition(position); + SetLastResultReturn(r); +} + +int +_SplitPanelImpl::GetDividerPosition(void) const +{ + ClearLastResult(); + int position = _CoordinateSystemUtils::ConvertToInteger(GetCore().GetDividerPosition()); + return position; +} + +float +_SplitPanelImpl::GetDividerPositionF(void) const +{ + ClearLastResult(); + return GetCore().GetDividerPosition(); +} + +result +_SplitPanelImpl::SetMaximumDividerPosition(int position) +{ + float floatPosition = _CoordinateSystemUtils::ConvertToFloat(position); + result r = GetCore().SetMaximumDividerPosition(floatPosition); + SetLastResultReturn(r); +} + +result +_SplitPanelImpl::SetMaximumDividerPosition(float position) +{ + result r = GetCore().SetMaximumDividerPosition(position); + SetLastResultReturn(r); +} + +int +_SplitPanelImpl::GetMaximumDividerPosition(void) const +{ + ClearLastResult(); + int maxPosition = _CoordinateSystemUtils::ConvertToInteger(GetCore().GetMaximumDividerPosition()); + return maxPosition; +} + +float +_SplitPanelImpl::GetMaximumDividerPositionF(void) const +{ + ClearLastResult(); + return GetCore().GetMaximumDividerPosition(); +} + +result +_SplitPanelImpl::SetMinimumDividerPosition(int position) +{ + int floatPosition = _CoordinateSystemUtils::ConvertToFloat(position); + result r = GetCore().SetMinimumDividerPosition(floatPosition); + SetLastResultReturn(r); +} + +result +_SplitPanelImpl::SetMinimumDividerPosition(float position) +{ + result r = GetCore().SetMinimumDividerPosition(position); + SetLastResultReturn(r); +} + +int +_SplitPanelImpl::GetMinimumDividerPosition(void) const +{ + ClearLastResult(); + int minPosition = _CoordinateSystemUtils::ConvertToInteger(GetCore().GetMinimumDividerPosition()); + return minPosition; +} + +float +_SplitPanelImpl::GetMinimumDividerPositionF(void) const +{ + ClearLastResult(); + return GetCore().GetMinimumDividerPosition(); +} + +result +_SplitPanelImpl::MaximizePane(SplitPanelPaneOrder paneOrder) +{ + result r = GetCore().MaximizePane(paneOrder); + SetLastResultReturn(r); +} + +bool +_SplitPanelImpl::IsPaneMaximized(SplitPanelPaneOrder paneOrder) const +{ + ClearLastResult(); + return GetCore().IsPaneMaximized(paneOrder); +} + +result +_SplitPanelImpl::RestorePane(void) +{ + result r = GetCore().RestorePane(); + SetLastResultReturn(r); +} + +class _SplitPanelMaker + : public _UiBuilderControlMaker +{ +public: + _SplitPanelMaker(_UiBuilder* uibuilder) + : _UiBuilderControlMaker(uibuilder) + { + __pTransform = uibuilder->GetTransformer(); + }; + virtual ~_SplitPanelMaker(void){}; + static _UiBuilderControlMaker* + GetInstance(_UiBuilder* uibuilder) + { + _SplitPanelMaker* pSplitPanelMaker = new (std::nothrow) _SplitPanelMaker(uibuilder); + + return pSplitPanelMaker; + }; + +protected: + virtual Control* + Make(_UiBuilderControl* pControl) + { + result r = E_SYSTEM; + _UiBuilderControlLayout* pControlProperty = null; + SplitPanel* pSplitPanel = null; + Tizen::Graphics::FloatRectangle rect; + Tizen::Base::String elementString; + Tizen::Base::String xmlLink; + float minDividerPosition = 0.0f; + float maxDividerPosition = 0.0f; + float dividerPosition = 0.0f; + float originalValue = 0.0f; + + SplitPanelDividerStyle splitPanelDividerStyle = SPLIT_PANEL_DIVIDER_STYLE_MOVABLE; + SplitPanelDividerDirection splitPanelDividerDirection = SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL; + + GetProperty(pControl, &pControlProperty); + + if (pControlProperty == null) + { + return null; + } + + pSplitPanel = new (std::nothrow) SplitPanel(); + SysTryReturn(NID_UI_CTRL, pSplitPanel, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + rect = pControlProperty->GetRectF(); + + // Set Style + if (pControl->GetElement("dividerStyle", elementString) || pControl->GetElement("DividerStyle", elementString)) + { + if (elementString.Equals(L"SPLIT_PANEL_DIVIDER_STYLE_FIXED", false)) + { + splitPanelDividerStyle = SPLIT_PANEL_DIVIDER_STYLE_FIXED; + } + if (elementString.Equals(L"SPLIT_PANEL_DIVIDER_STYLE_MOVABLE", false)) + { + splitPanelDividerStyle = SPLIT_PANEL_DIVIDER_STYLE_MOVABLE; + } + } + + if (pControl->GetElement("dividerDirection", elementString) || pControl->GetElement("DividerDirection", elementString)) + { + if (elementString.Equals(L"SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL", false)) + { + splitPanelDividerDirection = SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL; + } + if (elementString.Equals(L"SPLIT_PANEL_DIVIDER_DIRECTION_HORIZONTAL", false)) + { + splitPanelDividerDirection = SPLIT_PANEL_DIVIDER_DIRECTION_HORIZONTAL; + } + } + + // Construct + r = pSplitPanel->Construct(rect, splitPanelDividerStyle, splitPanelDividerDirection); + + if (r != E_SUCCESS) + { + SysLog(NID_UI_CTRL, "Failed to create SplitPanel."); + delete pSplitPanel; + pSplitPanel = null; + + return null; + } + + if (pControl->GetElement("minDividerPosition", elementString)) + { + minDividerPosition = _LocalizedNumParser::ToDouble(elementString, "C"); + + if (__pTransform != null) + { + originalValue = minDividerPosition; + minDividerPosition = __pTransform->Transform(originalValue); + } + + pSplitPanel->SetMinimumDividerPosition(minDividerPosition); + } + + if (pControl->GetElement("maxDividerPosition", elementString)) + { + maxDividerPosition = _LocalizedNumParser::ToDouble(elementString, "C"); + + if (__pTransform != null) + { + originalValue = maxDividerPosition; + maxDividerPosition = __pTransform->Transform(originalValue); + } + + pSplitPanel->SetMaximumDividerPosition(maxDividerPosition); + } + + if (pControl->GetElement("dividerPosition", elementString)) + { + dividerPosition = _LocalizedNumParser::ToDouble(elementString, "C"); + + if (__pTransform != null) + { + originalValue = dividerPosition; + dividerPosition = __pTransform->Transform(originalValue); + } + + pSplitPanel->SetDividerPosition(dividerPosition); + } + + //Set pane + if (pControl->GetElement("firstPane", elementString)) + { + if (pControl->GetElement("firstPaneXmlLink", xmlLink)) + { + if (elementString.Equals(L"panel", false)) + { + Panel* pFirstPanel = new (std::nothrow) Panel(); + pFirstPanel->Construct(xmlLink); + pSplitPanel->SetPane(pFirstPanel, SPLIT_PANEL_PANE_ORDER_FIRST); + } + else if (elementString.Equals(L"form", false)) + { + Form* pFirstForm = new (std::nothrow) Form(); + pFirstForm->Construct(xmlLink); + pSplitPanel->SetPane(pFirstForm, SPLIT_PANEL_PANE_ORDER_FIRST); + } + else if (elementString.Equals(L"scrollpanel", false)) + { + ScrollPanel* pFirstScrollPanel = new (std::nothrow) ScrollPanel(); + pFirstScrollPanel->Construct(xmlLink); + pSplitPanel->SetPane(pFirstScrollPanel, SPLIT_PANEL_PANE_ORDER_FIRST); + } + } + } + + if (pControl->GetElement("secondPane", elementString)) + { + if (pControl->GetElement("secondPaneXmlLink", xmlLink)) + { + if (elementString.Equals(L"panel", false)) + { + Panel* pFirstPanel = new (std::nothrow) Panel(); + pFirstPanel->Construct(xmlLink); + pSplitPanel->SetPane(pFirstPanel, SPLIT_PANEL_PANE_ORDER_SECOND); + } + else if (elementString.Equals(L"form", false)) + { + Form* pFirstForm = new (std::nothrow) Form(); + pFirstForm->Construct(xmlLink); + pSplitPanel->SetPane(pFirstForm, SPLIT_PANEL_PANE_ORDER_SECOND); + } + else if (elementString.Equals(L"scrollpanel", false)) + { + ScrollPanel* pFirstScrollPanel = new (std::nothrow) ScrollPanel(); + pFirstScrollPanel->Construct(xmlLink); + pSplitPanel->SetPane(pFirstScrollPanel, SPLIT_PANEL_PANE_ORDER_SECOND); + } + } + } + + return pSplitPanel; + } +private: + _ICoordinateSystemTransformer* __pTransform; +}; // _SplitPanelMaker + +_SplitPanelRegister::_SplitPanelRegister(void) +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->RegisterControl(L"SplitPanel", _SplitPanelMaker::GetInstance); +} +_SplitPanelRegister::~_SplitPanelRegister(void) +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->UnregisterControl(L"SplitPanel"); +} +static _SplitPanelRegister SplitPanelRegisterToUIbuilder; +}}} // Tizen::Ui::Controls + diff --git a/src/ui/controls/FUiCtrl_SplitPanelModel.cpp b/src/ui/controls/FUiCtrl_SplitPanelModel.cpp new file mode 100644 index 0000000..5208393 --- /dev/null +++ b/src/ui/controls/FUiCtrl_SplitPanelModel.cpp @@ -0,0 +1,84 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiCtrl_SplitPanelModel.cpp + * @brief This is the implementation file for the _SplitPanelModel class. + */ + +#include +#include +#include "FUiCtrl_SplitPanelModel.h" + + +namespace Tizen { namespace Ui { namespace Controls +{ + +_SplitPanelModel::_SplitPanelModel(void) + : __dividerStyle(SPLIT_PANEL_DIVIDER_STYLE_FIXED) + , __isPaneMaximized(false) + , __maximizedPaneOrder(SPLIT_PANEL_PANE_ORDER_FIRST) +{ +} + +_SplitPanelModel::~_SplitPanelModel(void) +{ +} + +result +_SplitPanelModel::Construct(void) +{ + return E_SUCCESS; +} + +void +_SplitPanelModel::SetDividerStyle(SplitPanelDividerStyle splitPanelDividerStyle) +{ + __dividerStyle = splitPanelDividerStyle; +} + +SplitPanelDividerStyle +_SplitPanelModel::GetDividerStyle(void) const +{ + return __dividerStyle; +} + +void +_SplitPanelModel::SetPaneMaximumState(bool bMaximum) +{ + __isPaneMaximized = bMaximum; +} + +bool +_SplitPanelModel::GetPaneMaximumState(void) const +{ + return __isPaneMaximized; +} + +void +_SplitPanelModel::SetMaximizedPaneOrder(SplitPanelPaneOrder paneOrder) +{ + __maximizedPaneOrder = paneOrder; +} + +SplitPanelPaneOrder +_SplitPanelModel::GetMaximizedPaneOrder(void) const +{ + return __maximizedPaneOrder; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_SplitPanelPresenter.cpp b/src/ui/controls/FUiCtrl_SplitPanelPresenter.cpp new file mode 100644 index 0000000..4855cac --- /dev/null +++ b/src/ui/controls/FUiCtrl_SplitPanelPresenter.cpp @@ -0,0 +1,1546 @@ +// +// 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_SplitPanelPresenter.cpp + * @brief This is the header file for the _SplitPanelPresenter class. + * + * This header file contains the declarations of the %_SplitPanelPresenter class. + */ + +#include +#include +#include +#include +#include +#include +#include "FUi_ResourceManager.h" +#include "FUi_UiTouchEvent.h" +#include "FUiCtrl_SplitPanelPresenter.h" +#include "FUiCtrl_SplitPanel.h" +#include "FUiCtrl_SplitPanelImpl.h" + +using namespace Tizen::Ui; +using namespace Tizen::Graphics; +using namespace Tizen::Ui::Animations; +using namespace Tizen::Base; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_SplitPanelPresenter::_SplitPanelPresenter(void) + : __pSplitPanel(null) + , __pSplitPanelModel(null) + , __dividerMaximumPosition(0.0f) + , __dividerMinimumPosition(0.0f) + , __splitPanelDividerPressed(false) + , __setFirstDividerPositionChangeEvent(true) + , __isChangeBounds(false) + , __dividerRectangle(0.0f, 0.0f ,0.0f, 0.0f) + , __dividerThumbRectangle(0.0f, 0.0f, 0.0f, 0.0f) + , __pDividerPressedBackgroundBitmap(null) + , __pDividerBackgroundBitmap(null) + , __pDividerBackgroundEffectBitmap(null) + , __pDividerThumbBitmap(null) + , __transactionIdMaximize(0) + , __transactionIdRestore(0) + , __controlAnimatorInterpolator(ANIMATION_INTERPOLATOR_LINEAR) + , __visualElementInterpolator(L"Linear") +{ + GET_COLOR_CONFIG(SPLITPANEL::DIVIDER_BG_NORMAL, __dividerBackgroundColor); + GET_COLOR_CONFIG(SPLITPANEL::DIVIDER_BG_PRESSED, __dividerPressedBackgroundColor); +} + +_SplitPanelPresenter::~_SplitPanelPresenter(void) +{ + delete __pSplitPanelModel; + __pSplitPanelModel = null; + + delete __pDividerPressedBackgroundBitmap; + __pDividerPressedBackgroundBitmap = null; + + delete __pDividerBackgroundBitmap; + __pDividerBackgroundBitmap = null; + + delete __pDividerThumbBitmap; + __pDividerThumbBitmap = null; + + delete __pDividerBackgroundEffectBitmap; + __pDividerBackgroundEffectBitmap = null; +} + +result +_SplitPanelPresenter::Construct(const _SplitPanel& splitPanel, SplitPanelDividerStyle splitPanelDividerStyle, SplitPanelDividerDirection splitPanelDividerDirection) +{ + result r = E_SUCCESS; + _SplitPanelModel* pModel = null; + + pModel = new (std::nothrow) _SplitPanelModel(); + SysTryReturnResult(NID_UI_CTRL, pModel, E_OUT_OF_MEMORY, "Memory allocation failed."); + + r = SetModel(*pModel); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to set the model."); + + r = pModel->Construct(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to construct _SplitPanelModel instance."); + + __pSplitPanel = const_cast <_SplitPanel*>(&splitPanel); + SysTryCatch(NID_UI_CTRL, __pSplitPanel != null, , E_SYSTEM, "[E_SYSTEM] A system error has occurred. _SplitPanel instance is null."); + + __pSplitPanelModel->SetDividerStyle(splitPanelDividerStyle); + + r = LoadBitmap(splitPanelDividerDirection); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to load bitmap.", GetErrorMessage(r)); + + AdjustDividerRectangle(); + + __controlAnimatorInterpolator = ANIMATION_INTERPOLATOR_EASE_IN; + __visualElementInterpolator = L"EaseIn"; + + return E_SUCCESS; + +CATCH: + delete pModel; + pModel = null; + + return r; +} + +bool +_SplitPanelPresenter::CheckDividerTouchRegion(float positionX, float positionY) +{ + float dividerPosition = 0.0f; + float extendedDividerTouchMargin = 0.0f; + Bitmap* pThumbBitmap = null; + + _ControlOrientation orientation = _ControlManager::GetInstance()->GetOrientation(); + + dividerPosition = __pSplitPanel->GetDividerPosition(); + pThumbBitmap = __pDividerThumbBitmap; + + GET_SHAPE_CONFIG(SPLITPANEL::EXTENDED_MOVABLE_DIVIDER_TOUCH_MARGIN, orientation, extendedDividerTouchMargin); + + if (__pSplitPanel->GetDividerDirection() == SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL) + { + if ((positionX >= dividerPosition - extendedDividerTouchMargin) + && (positionX <= dividerPosition + pThumbBitmap->GetWidthF() + extendedDividerTouchMargin)) + { + return true; + } + } + else + { + if ((positionY >= dividerPosition - extendedDividerTouchMargin) + && (positionY <= dividerPosition + pThumbBitmap->GetHeightF() + extendedDividerTouchMargin)) + { + return true; + } + } + + return false; +} + +bool +_SplitPanelPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + FloatPoint point(0.0f, 0.0f); + + point = touchinfo.GetCurrentPosition(); + + if (CheckDividerTouchRegion(point.x, point.y)) + { + __splitPanelDividerPressed = true; + __pSplitPanel->Invalidate(); + return true; + } + + return false; +} + +bool +_SplitPanelPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + if (__splitPanelDividerPressed) + { + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pSplitPanel); + __splitPanelDividerPressed = false; + __pSplitPanel->Invalidate(); + return true; + } + else + { + if (__isChangeBounds) + { + __isChangeBounds = false; + } + return false; + } +} + +bool +_SplitPanelPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + FloatPoint point(0.0f, 0.0f); + Bitmap* pThumbBitmap = null; + + if (!__splitPanelDividerPressed) + { + return false; + } + + if (__pSplitPanelModel->GetDividerStyle() == SPLIT_PANEL_DIVIDER_STYLE_FIXED) + { + return false; + } + + if (CheckDividerTouchRegion(point.x, point.y)) + { + __isChangeBounds = true; + } + + point = touchinfo.GetCurrentPosition(); + pThumbBitmap = __pDividerThumbBitmap; + + if (__pSplitPanel->GetDividerDirection() == SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL) + { + // Min, Max Position Check. + if ((__pSplitPanel->GetMinimumDividerPosition() > point.x) + || (__pSplitPanel->GetMaximumDividerPosition() < point.x)) + { + return false; + } + + if (point.x <= __pSplitPanel->GetBoundsF().width - pThumbBitmap->GetWidthF()) + { + __pSplitPanel->SetDividerPosition(point.x); + } + } + else + { + // Min, Max Position Check. + if ((__pSplitPanel->GetMinimumDividerPosition() > point.y) + || (__pSplitPanel->GetMaximumDividerPosition() < point.y)) + { + return false; + } + + if (point.y <= __pSplitPanel->GetBoundsF().height - pThumbBitmap->GetHeightF()) + { + __pSplitPanel->SetDividerPosition(point.y); + } + } + + __pSplitPanel->SendSplitPanelEvent(_SPLIT_PANEL_EVENT_DIVIDER_POSITION_CHANGE); + + __pSplitPanel->Invalidate(); + + return true; +} + +bool +_SplitPanelPresenter::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + if (__splitPanelDividerPressed) + { + __splitPanelDividerPressed = false; + + __pSplitPanel->Invalidate(); + + return true; + } + + if (__isChangeBounds) + { + __isChangeBounds = false; + } + + return false; +} + +bool +_SplitPanelPresenter::OnTapGestureDetected(_TouchTapGestureDetector& gesture) +{ + if (__pSplitPanelModel->GetDividerStyle() == SPLIT_PANEL_DIVIDER_STYLE_FIXED) + { + return false; + } + + __pSplitPanel->SendSplitPanelEvent(_SPLIT_PANEL_EVENT_DIVIDER_DOUBLE_PRESSED); + + return true; +} + +bool +_SplitPanelPresenter::OnTapGestureCanceled(_TouchTapGestureDetector& gesture) +{ + return false; +} + +result +_SplitPanelPresenter::SetDividerStyle(SplitPanelDividerStyle splitPanelDividerStyle) +{ + __pSplitPanelModel->SetDividerStyle(splitPanelDividerStyle); + + return E_SUCCESS; +} + +SplitPanelDividerStyle +_SplitPanelPresenter::GetDividerStyle(void) const +{ + return __pSplitPanelModel->GetDividerStyle(); +} + +FloatRectangle +_SplitPanelPresenter::GetDividerRectangle(void) const +{ + return __dividerRectangle; +} + +result +_SplitPanelPresenter::MaximizePane(SplitPanelPaneOrder paneOrder) +{ + result r = E_SUCCESS; + + if (IsPaneMaximized(paneOrder)) + { + return E_SUCCESS; + } + else if (GetTransactionStatus() == ANIMATION_TRANSACTION_STATUS_PLAYING) + { + AnimationTransaction::Stop(__transactionIdMaximize); + AnimationTransaction::Stop(__transactionIdRestore); + } + + RecalcSplitPanel(); + + AnimationTransaction::Begin(__transactionIdMaximize); + + if (__pSplitPanel->GetDividerDirection() == SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL) + { + if (paneOrder == SPLIT_PANEL_PANE_ORDER_FIRST) + { + r = AnimateDivider(_SPLIT_PANEL_ANIMATION_RIGHT); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = AnimatePaneParent(_SPLIT_PANEL_ANIMATION_RIGHT); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = AnimatePane(_SPLIT_PANEL_ANIMATION_RIGHT); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + r = AnimateDivider(_SPLIT_PANEL_ANIMATION_LEFT); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = AnimatePaneParent(_SPLIT_PANEL_ANIMATION_LEFT); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = AnimatePane(_SPLIT_PANEL_ANIMATION_LEFT); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + else + { + if (paneOrder == SPLIT_PANEL_PANE_ORDER_FIRST) + { + r = AnimateDivider(_SPLIT_PANEL_ANIMATION_BOTTOM); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = AnimatePaneParent(_SPLIT_PANEL_ANIMATION_BOTTOM); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = AnimatePane(_SPLIT_PANEL_ANIMATION_BOTTOM); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + r = AnimateDivider(_SPLIT_PANEL_ANIMATION_TOP); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = AnimatePaneParent(_SPLIT_PANEL_ANIMATION_TOP); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = AnimatePane(_SPLIT_PANEL_ANIMATION_TOP); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + + AnimationTransaction::Commit(); + + __pSplitPanelModel->SetPaneMaximumState(true); + __pSplitPanelModel->SetMaximizedPaneOrder(paneOrder); + + return E_SUCCESS; + +CATCH: + AnimationTransaction::Discard(); + + return r; +} + +bool +_SplitPanelPresenter::IsPaneMaximized(SplitPanelPaneOrder paneOrder) const +{ + if ((__pSplitPanelModel->GetPaneMaximumState()) + && (__pSplitPanelModel->GetMaximizedPaneOrder() == paneOrder)) + { + return true; + } + + return false; +} + +result +_SplitPanelPresenter::RestorePane(void) +{ + result r = E_SUCCESS; + + if (!__pSplitPanelModel->GetPaneMaximumState()) + { + return E_SUCCESS; + } + else if (GetTransactionStatus() == ANIMATION_TRANSACTION_STATUS_PLAYING) + { + AnimationTransaction::Stop(__transactionIdMaximize); + AnimationTransaction::Stop(__transactionIdRestore); + } + + RecalcSplitPanel(); + + AnimationTransaction::Begin(__transactionIdRestore); + + if (__pSplitPanel->GetDividerDirection() == SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL) + { + r = AnimateDivider(_SPLIT_PANEL_ANIMATION_RESTORE_VERTICAL); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = AnimatePaneParent(_SPLIT_PANEL_ANIMATION_RESTORE_VERTICAL); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = AnimatePane(_SPLIT_PANEL_ANIMATION_RESTORE_VERTICAL); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + r = AnimateDivider(_SPLIT_PANEL_ANIMATION_RESTORE_HORIZONTAL); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = AnimatePaneParent(_SPLIT_PANEL_ANIMATION_RESTORE_HORIZONTAL); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = AnimatePane(_SPLIT_PANEL_ANIMATION_RESTORE_HORIZONTAL); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + AnimationTransaction::Commit(); + + __pSplitPanelModel->SetPaneMaximumState(false); + + return E_SUCCESS; + +CATCH: + AnimationTransaction::Discard(); + + return r; +} + +result +_SplitPanelPresenter::Draw(void) +{ + if (GetTransactionStatus() == ANIMATION_TRANSACTION_STATUS_STOPPED && + !__pSplitPanelModel->GetPaneMaximumState()) + { + FloatRectangle dividerBounds(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle dividerThumbBounds(0.0f, 0.0f, 0.0f, 0.0f); + Canvas* pCanvas = null; + + //adjust divider rectangle + AdjustDividerRectangle(); + + pCanvas = __pSplitPanel->GetDividerVisualElement()->GetCanvasN(); + SysTryReturnResult(NID_UI_CTRL, pCanvas != null, GetLastResult(), "Propagating."); + + if (pCanvas != null) + { + pCanvas->Clear(); + + //resize pane + if (__isChangeBounds) + { + SetPaneBounds(); + + __isChangeBounds = false; + } + + dividerBounds = __dividerRectangle; + dividerBounds.x = 0.0f; + dividerBounds.y = 0.0f; + + if (__splitPanelDividerPressed) + { + pCanvas->DrawNinePatchedBitmap(dividerBounds, *__pDividerPressedBackgroundBitmap); + } + else + { + pCanvas->DrawNinePatchedBitmap(dividerBounds, *__pDividerBackgroundBitmap); + } + + //draw divider + pCanvas->DrawNinePatchedBitmap(dividerBounds, *__pDividerBackgroundEffectBitmap); + + //draw divider thumb + if (__pSplitPanelModel->GetDividerStyle() == SPLIT_PANEL_DIVIDER_STYLE_MOVABLE) + { + dividerThumbBounds = __dividerThumbRectangle; + if (__pSplitPanel->GetDividerDirection() == SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL) + { + dividerThumbBounds.x = 0.0f; + } + else + { + dividerThumbBounds.y = 0.0f; + } + + pCanvas->DrawBitmap(dividerThumbBounds, *__pDividerThumbBitmap); + } + + delete pCanvas; + } + } + + return E_SUCCESS; +} + +result +_SplitPanelPresenter::LoadBitmap(SplitPanelDividerDirection splitPanelDividerDirection) +{ + result r = E_SUCCESS; + Bitmap* pDividerBackgroundBitmap = null; + + // 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."); + + if (splitPanelDividerDirection == SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL) + { + r = GET_BITMAP_CONFIG_N(SPLITPANEL::VERTICAL_DIVIDER_BG_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pDividerBackgroundEffectBitmap); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Failed to load bitmap.", GetErrorMessage(r)); + + r = GET_BITMAP_CONFIG_N(SPLITPANEL::VERTICAL_DIVIDER_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDividerThumbBitmap); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Failed to load bitmap.", GetErrorMessage(r)); + } + else + { + r = GET_BITMAP_CONFIG_N(SPLITPANEL::HORIZONTAL_DIVIDER_BG_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, __pDividerBackgroundEffectBitmap); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Failed to load bitmap.", GetErrorMessage(r)); + + r = GET_BITMAP_CONFIG_N(SPLITPANEL::HORIZONTAL_DIVIDER_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pDividerThumbBitmap); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Failed to load bitmap.", GetErrorMessage(r)); + } + + __pDividerPressedBackgroundBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDividerBackgroundBitmap, Color::GetColor(COLOR_ID_MAGENTA), __dividerPressedBackgroundColor); + 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 = GetLastResult(), GetLastResult(), "[%s] Failed to get replacement color bitmap.", GetErrorMessage(GetLastResult())); + + delete pDividerBackgroundBitmap; + + return r; + +CATCH: + delete pDividerBackgroundBitmap; + delete __pDividerBackgroundEffectBitmap; + __pDividerBackgroundEffectBitmap = null; + + delete __pDividerPressedBackgroundBitmap; + __pDividerPressedBackgroundBitmap = null; + + delete __pDividerThumbBitmap; + __pDividerThumbBitmap = null; + + return r; +} + +void +_SplitPanelPresenter::RecalcSplitPanel(void) +{ + //adjust divider rectangle + AdjustDividerRectangle(); + + //resize pane + SetPaneBounds(); + + return; +} + +void +_SplitPanelPresenter::OnChangeLayout(_ControlOrientation orientation) +{ + __isChangeBounds = true; + + AnimationTransaction::Stop(__transactionIdMaximize); + AnimationTransaction::Stop(__transactionIdRestore); + + return; +} + +void +_SplitPanelPresenter::OnBoundsChanged(void) +{ + __isChangeBounds = true; + + AnimationTransaction::Stop(__transactionIdMaximize); + AnimationTransaction::Stop(__transactionIdRestore); + + return; +} + +result +_SplitPanelPresenter::SetModel(const _SplitPanelModel& splitPanelModel) +{ + __pSplitPanelModel = const_cast<_SplitPanelModel*>(&splitPanelModel); + + return E_SUCCESS; +} + +result +_SplitPanelPresenter::SetPaneBounds(void) +{ + result r = E_SUCCESS; + FloatRectangle clientBounds(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle firstPaneBounds(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle secondPaneBounds(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle dividerBounds(0.0f, 0.0f, 0.0f, 0.0f); + FloatPoint panePostion(0.0f, 0.0f); + _Control* pFirstPane = null; + _Control* pSecondPane = null; + _Control* pFirstPaneParent = null; + _Control* pSecondPaneParent = null; + + clientBounds = __pSplitPanel->GetBoundsF(); + + pFirstPane = __pSplitPanel->GetPane(SPLIT_PANEL_PANE_ORDER_FIRST); + pSecondPane = __pSplitPanel->GetPane(SPLIT_PANEL_PANE_ORDER_SECOND); + + pFirstPaneParent = __pSplitPanel->GetPaneParent(SPLIT_PANEL_PANE_ORDER_FIRST); + pSecondPaneParent = __pSplitPanel->GetPaneParent(SPLIT_PANEL_PANE_ORDER_SECOND); + + clientBounds.x = clientBounds.y = 0.0f; + + if (IsPaneMaximized(SPLIT_PANEL_PANE_ORDER_FIRST)) + { + firstPaneBounds = clientBounds; + + if (__pSplitPanel->GetDividerDirection() == SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL) + { + secondPaneBounds = FloatRectangle(clientBounds.width + __dividerRectangle.width, 0.0f, clientBounds.width - __dividerRectangle.x - __dividerRectangle.width, clientBounds.height); + } + else + { + secondPaneBounds = FloatRectangle(0.0f, clientBounds.height + __dividerRectangle.height, clientBounds.width, clientBounds.height - __dividerRectangle.y - __dividerRectangle.height); + } + + dividerBounds = __dividerRectangle; + dividerBounds.x = clientBounds.width; + + __pSplitPanel->SetDividerVisualElementBounds(dividerBounds); + } + else if (IsPaneMaximized(SPLIT_PANEL_PANE_ORDER_SECOND)) + { + secondPaneBounds = clientBounds; + + if (__pSplitPanel->GetDividerDirection() == SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL) + { + firstPaneBounds = FloatRectangle(clientBounds.x -__dividerRectangle.x - __dividerRectangle.width, 0.0f, __dividerRectangle.x, clientBounds.height); + } + else + { + firstPaneBounds = FloatRectangle(0.0f, clientBounds.y -__dividerRectangle.y - __dividerRectangle.height, clientBounds.width, __dividerRectangle.y); + } + + dividerBounds = __dividerRectangle; + dividerBounds.x = -__dividerRectangle.width; + + __pSplitPanel->SetDividerVisualElementBounds(dividerBounds); + } + else + { + if (__pSplitPanel->GetDividerDirection() == SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL) + { + firstPaneBounds = FloatRectangle(0.0f, 0.0f, __dividerRectangle.x, clientBounds.height); + secondPaneBounds = FloatRectangle(__dividerRectangle.x + __dividerRectangle.width, 0.0f, clientBounds.width - __dividerRectangle.x - __dividerRectangle.width,clientBounds.height); + } + else + { + firstPaneBounds = FloatRectangle(0.0f, 0.0f, clientBounds.width, __dividerRectangle.y); + secondPaneBounds = FloatRectangle(0.0f, __dividerRectangle.y + __dividerRectangle.height, clientBounds.width, clientBounds.height - __dividerRectangle.y - __dividerRectangle.height); + } + } + + if (pFirstPaneParent != null) + { + r = pFirstPaneParent->SetBounds(firstPaneBounds); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + + if (pSecondPaneParent != null) + { + r = pSecondPaneParent->SetBounds(secondPaneBounds); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + + //set Pane bounds + if (pFirstPane != null) + { + if (pFirstPane->IsResizable()) + { + r = pFirstPane->SetBounds(firstPaneBounds); + if (IsFailed(r)) + { + SysLog(NID_UI_CTRL, "[%s] SetBounds failed.", GetErrorMessage(r)); + } + } + + r = pFirstPane->SetPosition(Point(0.0f, 0.0f)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + + if (pSecondPane != null) + { + if (pSecondPane->IsResizable()) + { + r = pSecondPane->SetBounds(secondPaneBounds); + if (IsFailed(r)) + { + SysLog(NID_UI_CTRL, "[%s] SetBounds failed.", GetErrorMessage(r)); + } + } + + r = pSecondPane->SetPosition(Point(0.0f, 0.0f)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + + if ((pFirstPane != null) && (pSecondPane != null)) + { + if (__setFirstDividerPositionChangeEvent) + { + __setFirstDividerPositionChangeEvent = false; + __pSplitPanel->SendSplitPanelEvent(_SPLIT_PANEL_EVENT_DIVIDER_POSITION_CHANGE); + } + + pFirstPane->Invalidate(true); + pSecondPane->Invalidate(true); + } + + return r; +} + +void +_SplitPanelPresenter::AdjustDividerRectangle(void) +{ + float dividerPosition = 0.0f; + float width = 0.0f; + float height = 0.0f; + FloatRectangle clientBounds(0.0f, 0.0f, 0.0f, 0.0f); + _ControlOrientation orientation = _CONTROL_ORIENTATION_PORTRAIT; + Bitmap* pThumbBitmap = null; + + orientation = _ControlManager::GetInstance()->GetOrientation(); + + dividerPosition = __pSplitPanel->GetDividerPosition(); + clientBounds = __pSplitPanel->GetBoundsF(); + + pThumbBitmap = __pDividerThumbBitmap; + + if (GetDividerStyle() == SPLIT_PANEL_DIVIDER_STYLE_MOVABLE) + { + GET_SHAPE_CONFIG(SPLITPANEL::MOVABLE_DIVIDER_THICKNESS, orientation, width); + GET_SHAPE_CONFIG(SPLITPANEL::MOVABLE_DIVIDER_THICKNESS, orientation, height); + } + else + { + GET_SHAPE_CONFIG(SPLITPANEL::FIXED_DIVIDER_THICKNESS, orientation, width); + GET_SHAPE_CONFIG(SPLITPANEL::FIXED_DIVIDER_THICKNESS, orientation, height); + } + + if (__pSplitPanel->GetDividerDirection() == SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL) + { + height = clientBounds.height; + + if (height > 0.0f) + { + __dividerRectangle = FloatRectangle(dividerPosition, 0.0f, width, height); + __dividerThumbRectangle = FloatRectangle(dividerPosition, ((height - pThumbBitmap->GetHeightF()) / 2.0f), pThumbBitmap->GetWidthF(), pThumbBitmap->GetHeightF()); + } + } + else + { + width = clientBounds.width; + + if (width > 0.0f) + { + __dividerRectangle = FloatRectangle(0.0f, dividerPosition, width, height); + __dividerThumbRectangle = FloatRectangle(((width - pThumbBitmap->GetWidth()) / 2.0f), dividerPosition, pThumbBitmap->GetWidthF(), pThumbBitmap->GetHeightF()); + } + } + + __pSplitPanel->SetDividerVisualElementBounds(__dividerRectangle); +} + +result +_SplitPanelPresenter::AnimateDivider(int destination) +{ + result r = E_SUCCESS; + FloatRectangle dividerBoundsStart(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle dividerBoundsEnd(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle dividerBounds(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle clientBounds(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle firstPaneBounds(0.0f, 0.0f, 0.0f, 0.0f); + _Control* pFirstPaneParent = null; + + VisualElement* pVisualElementDivider = null; + VisualElementPropertyAnimation* pAnimationDivider = null; + + pFirstPaneParent = __pSplitPanel->GetPaneParent(SPLIT_PANEL_PANE_ORDER_FIRST); + SysTryReturnResult(NID_UI_CTRL, pFirstPaneParent != null, GetLastResult(), "Propagating."); + + pVisualElementDivider = __pSplitPanel->GetDividerVisualElement(); + SysTryReturnResult(NID_UI_CTRL, pVisualElementDivider != null, GetLastResult(), "Propagating."); + + pVisualElementDivider->RemoveAllAnimations(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, GetLastResult(), "Propagating."); + + pAnimationDivider = GetVisualElementAnimation(L"bounds", destination); + SysTryReturnResult(NID_UI_CTRL, pAnimationDivider != null, GetLastResult(), "Propagating."); + + dividerBounds = pVisualElementDivider->GetBounds(); + clientBounds = __pSplitPanel->GetBoundsF(); + firstPaneBounds = pFirstPaneParent->GetBoundsF(); + dividerBoundsStart = dividerBounds; + + clientBounds.x = clientBounds.y = 0.0f; + + switch (destination) + { + case _SPLIT_PANEL_ANIMATION_RIGHT: + { + dividerBoundsStart.x = firstPaneBounds.x + firstPaneBounds.width; + + dividerBoundsEnd = dividerBounds; + dividerBoundsEnd.x = clientBounds.width; + } + break; + case _SPLIT_PANEL_ANIMATION_LEFT: + { + dividerBoundsStart.x = firstPaneBounds.x + firstPaneBounds.width; + + dividerBoundsEnd = dividerBounds; + dividerBoundsEnd.x = clientBounds.x - dividerBounds.width; + } + break; + case _SPLIT_PANEL_ANIMATION_TOP: + { + dividerBoundsStart.y = firstPaneBounds.y + firstPaneBounds.height; + + dividerBoundsEnd = dividerBounds; + dividerBoundsEnd.y = clientBounds.y - dividerBounds.height; + } + break; + case _SPLIT_PANEL_ANIMATION_BOTTOM: + { + dividerBoundsStart.y = firstPaneBounds.y + firstPaneBounds.height; + + dividerBoundsEnd = dividerBounds; + dividerBoundsEnd.y = clientBounds.height; + } + break; + case _SPLIT_PANEL_ANIMATION_RESTORE_HORIZONTAL: + { + dividerBounds = __dividerRectangle; + + dividerBoundsStart = dividerBounds; + dividerBoundsEnd = dividerBounds; + + if (__pSplitPanelModel->GetMaximizedPaneOrder() == SPLIT_PANEL_PANE_ORDER_FIRST) + { + dividerBoundsStart.y = clientBounds.height; + } + else + { + dividerBoundsStart.y = clientBounds.y - dividerBounds.height; + } + } + break; + case _SPLIT_PANEL_ANIMATION_RESTORE_VERTICAL: + { + dividerBounds = __dividerRectangle; + + dividerBoundsStart = dividerBoundsEnd = dividerBounds; + + if (__pSplitPanelModel->GetMaximizedPaneOrder() == SPLIT_PANEL_PANE_ORDER_FIRST) + { + dividerBoundsStart.x = clientBounds.width; + } + else + { + dividerBoundsStart.x = clientBounds.x - dividerBounds.width; + } + } + break; + } + + r = pAnimationDivider->SetStartValue(dividerBoundsStart); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Propagating."); + + r = pAnimationDivider->SetEndValue(dividerBoundsEnd); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Propagating."); + + pVisualElementDivider->AddAnimation(L"Bounds", *pAnimationDivider); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , GetLastResult(), "Propagating."); + +CATCH: + + delete pAnimationDivider; + + return r; +} + +result +_SplitPanelPresenter::AnimatePane(int destination) +{ + Rectangle clientBounds(0, 0, 0, 0); + Rectangle firstPaneBounds(0, 0, 0, 0); + Rectangle secondPaneBounds(0, 0, 0, 0); + Rectangle dividerRectangle(0, 0, 0, 0); + Control* pFirstPaneControl = null; + Control* pSecondPaneControl = null; + ControlAnimator* pControlAnimatorFirstPane = null; + ControlAnimator* pControlAnimatorSecondPane = null; + + 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); + + pControlAnimatorFirstPane = pFirstPaneControl->GetControlAnimator(); + pControlAnimatorSecondPane = pSecondPaneControl->GetControlAnimator(); + + clientBounds = __pSplitPanel->GetBounds(); + firstPaneBounds = pFirstPaneControl->GetBounds(); + secondPaneBounds = pSecondPaneControl->GetBounds(); + + clientBounds.x = clientBounds.y = 0; + + dividerRectangle = _CoordinateSystemUtils::ConvertToInteger(__dividerRectangle); + + switch (destination) + { + case _SPLIT_PANEL_ANIMATION_RIGHT: + { + Rectangle secondPaneEndBounds = secondPaneBounds; + secondPaneEndBounds.x = clientBounds.width + dividerRectangle.width; + + RectangleAnimation maximizeFirstPane = RectangleAnimation(firstPaneBounds, clientBounds, animationDuration, __controlAnimatorInterpolator); + + if (pControlAnimatorFirstPane != null && pFirstPaneControl->IsResizable()) + { + pControlAnimatorFirstPane->StartUserAnimation(ANIMATION_TARGET_SIZE, maximizeFirstPane); + } + + if (pControlAnimatorFirstPane != null && !pFirstPaneControl->GetShowState()) + { + pControlAnimatorFirstPane->StartUserAnimation(ANIMATION_TARGET_ALPHA, showPane); + } + + if (pControlAnimatorSecondPane != null && pSecondPaneControl->GetShowState()) + { + pControlAnimatorSecondPane->StartUserAnimation(ANIMATION_TARGET_ALPHA, hidePane); + } + } + break; + case _SPLIT_PANEL_ANIMATION_LEFT: + { + Rectangle firstPaneEndBounds = firstPaneBounds; + firstPaneEndBounds.x = -(firstPaneBounds.width + dividerRectangle.width); + + RectangleAnimation animationMaximizeSecondPane = RectangleAnimation(secondPaneBounds, clientBounds, animationDuration, __controlAnimatorInterpolator); + + if (pControlAnimatorSecondPane != null && pSecondPaneControl->IsResizable()) + { + pControlAnimatorSecondPane->StartUserAnimation(ANIMATION_TARGET_SIZE, animationMaximizeSecondPane); + } + + if (pControlAnimatorSecondPane != null && !pSecondPaneControl->GetShowState()) + { + pControlAnimatorSecondPane->StartUserAnimation(ANIMATION_TARGET_ALPHA, showPane); + } + + if (pControlAnimatorFirstPane != null && pFirstPaneControl->GetShowState()) + { + pControlAnimatorFirstPane->StartUserAnimation(ANIMATION_TARGET_ALPHA, hidePane); + } + } + break; + case _SPLIT_PANEL_ANIMATION_TOP: + { + Rectangle firstPaneEndBounds = firstPaneBounds; + firstPaneEndBounds.y = -(firstPaneBounds.height + dividerRectangle.height); + + RectangleAnimation animationMaximizeSecondPane = RectangleAnimation(secondPaneBounds, clientBounds, animationDuration, __controlAnimatorInterpolator); + + if (pControlAnimatorSecondPane != null && pSecondPaneControl->IsResizable()) + { + pControlAnimatorSecondPane->StartUserAnimation(ANIMATION_TARGET_SIZE, animationMaximizeSecondPane); + } + + if (pControlAnimatorSecondPane != null && !pSecondPaneControl->GetShowState()) + { + pControlAnimatorSecondPane->StartUserAnimation(ANIMATION_TARGET_ALPHA, showPane); + } + + if (pControlAnimatorFirstPane != null && pFirstPaneControl->GetShowState()) + { + pControlAnimatorFirstPane->StartUserAnimation(ANIMATION_TARGET_ALPHA, hidePane); + } + } + break; + case _SPLIT_PANEL_ANIMATION_BOTTOM: + { + Rectangle secondPaneEndBounds = secondPaneBounds; + secondPaneEndBounds.y = clientBounds.height + dividerRectangle.height; + + RectangleAnimation maximizeFirstPane = RectangleAnimation(firstPaneBounds, clientBounds, animationDuration, __controlAnimatorInterpolator); + + if (pControlAnimatorFirstPane != null && pFirstPaneControl->IsResizable()) + { + pControlAnimatorFirstPane->StartUserAnimation(ANIMATION_TARGET_SIZE, maximizeFirstPane); + } + + if (pControlAnimatorFirstPane != null && !pFirstPaneControl->GetShowState()) + { + pControlAnimatorFirstPane->StartUserAnimation(ANIMATION_TARGET_ALPHA, showPane); + } + + if (pControlAnimatorSecondPane != null && pSecondPaneControl->GetShowState()) + { + pControlAnimatorSecondPane->StartUserAnimation(ANIMATION_TARGET_ALPHA, hidePane); + } + } + break; + case _SPLIT_PANEL_ANIMATION_RESTORE_HORIZONTAL: + { + Rectangle firstPaneEndBounds = _CoordinateSystemUtils::ConvertToInteger(GetRestorePaneBounds(SPLIT_PANEL_PANE_ORDER_FIRST)); + Rectangle secondPaneEndBounds = _CoordinateSystemUtils::ConvertToInteger(GetRestorePaneBounds(SPLIT_PANEL_PANE_ORDER_SECOND)); + + secondPaneEndBounds.x = secondPaneEndBounds.y = 0; + + RectangleAnimation animationRestoreFirstPane = RectangleAnimation(firstPaneBounds, firstPaneEndBounds, animationDuration, __controlAnimatorInterpolator); + RectangleAnimation animationRestoreSecondPane = RectangleAnimation(secondPaneBounds, secondPaneEndBounds, animationDuration, __controlAnimatorInterpolator); + + if (pControlAnimatorFirstPane != null && pFirstPaneControl->IsResizable()) + { + pControlAnimatorFirstPane->StartUserAnimation(ANIMATION_TARGET_SIZE, animationRestoreFirstPane); + } + + if (pControlAnimatorSecondPane != null && pSecondPaneControl->IsResizable()) + { + pControlAnimatorSecondPane->StartUserAnimation(ANIMATION_TARGET_SIZE, animationRestoreSecondPane); + } + + if (__pSplitPanelModel->GetMaximizedPaneOrder() == SPLIT_PANEL_PANE_ORDER_FIRST) + { + if (pControlAnimatorSecondPane != null && !pSecondPaneControl->GetShowState()) + { + pControlAnimatorSecondPane->StartUserAnimation(ANIMATION_TARGET_ALPHA, showPane); + } + } + else + { + if (pControlAnimatorFirstPane != null && !pFirstPaneControl->GetShowState()) + { + pControlAnimatorFirstPane->StartUserAnimation(ANIMATION_TARGET_ALPHA, showPane); + } + } + } + break; + case _SPLIT_PANEL_ANIMATION_RESTORE_VERTICAL: + { + Rectangle firstPaneEndBounds = _CoordinateSystemUtils::ConvertToInteger(GetRestorePaneBounds(SPLIT_PANEL_PANE_ORDER_FIRST)); + Rectangle secondPaneEndBounds = _CoordinateSystemUtils::ConvertToInteger(GetRestorePaneBounds(SPLIT_PANEL_PANE_ORDER_SECOND)); + + secondPaneEndBounds.x = secondPaneEndBounds.y = 0; + + RectangleAnimation animationRestoreFirstPane = RectangleAnimation(firstPaneBounds, firstPaneEndBounds, animationDuration, __controlAnimatorInterpolator); + RectangleAnimation animationRestoreSecondPane = RectangleAnimation(secondPaneBounds, secondPaneEndBounds, animationDuration, __controlAnimatorInterpolator); + + if (pControlAnimatorFirstPane != null && pFirstPaneControl->IsResizable()) + { + pControlAnimatorFirstPane->StartUserAnimation(ANIMATION_TARGET_SIZE, animationRestoreFirstPane); + } + + if (pControlAnimatorSecondPane != null && pSecondPaneControl->IsResizable()) + { + pControlAnimatorSecondPane->StartUserAnimation(ANIMATION_TARGET_SIZE, animationRestoreSecondPane); + } + + if (__pSplitPanelModel->GetMaximizedPaneOrder() == SPLIT_PANEL_PANE_ORDER_FIRST) + { + if (pControlAnimatorSecondPane != null && !pSecondPaneControl->GetShowState()) + { + pControlAnimatorSecondPane->StartUserAnimation(ANIMATION_TARGET_ALPHA, showPane); + } + } + else + { + if (pControlAnimatorFirstPane != null && !pFirstPaneControl->GetShowState()) + { + pControlAnimatorFirstPane->StartUserAnimation(ANIMATION_TARGET_ALPHA, showPane); + } + } + } + break; + } + + return E_SUCCESS; +} + +result +_SplitPanelPresenter::AnimatePaneParent(int destination) +{ + result r = E_SUCCESS; + _Control* pFirstPane = null; + _Control* pSecondPane = null; + VisualElement* pVEFirstPane = null; + VisualElement* pVESecondPane = null; + VisualElementPropertyAnimation* pAnimationFirstPane = null; + VisualElementPropertyAnimation* pAnimationSecondPane = null; + + FloatRectangle clientBounds(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle firstPaneBounds(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle secondPaneBounds(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle dividerRectangle(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle firstPaneStartBounds(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle firstPaneEndBounds(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle secondPaneStartBounds(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle secondPaneEndBounds(0.0f, 0.0f, 0.0f, 0.0f); + + pFirstPane = __pSplitPanel->GetPaneParent(SPLIT_PANEL_PANE_ORDER_FIRST); + SysTryReturnResult(NID_UI_CTRL, pFirstPane != null, GetLastResult(), "Propagating."); + + pSecondPane = __pSplitPanel->GetPaneParent(SPLIT_PANEL_PANE_ORDER_SECOND); + SysTryReturnResult(NID_UI_CTRL, pSecondPane != null, GetLastResult(), "Propagating."); + + pVEFirstPane = pFirstPane->GetVisualElement(); + SysTryReturnResult(NID_UI_CTRL, pVEFirstPane != null, GetLastResult(), "Propagating."); + + pVEFirstPane->RemoveAllAnimations(); + + pVESecondPane = pSecondPane->GetVisualElement(); + SysTryReturnResult(NID_UI_CTRL, pVESecondPane != null, GetLastResult(), "Propagating."); + + pVESecondPane->RemoveAllAnimations(); + + pAnimationFirstPane = GetVisualElementAnimation(L"bounds", destination); + SysTryReturnResult(NID_UI_CTRL, pAnimationFirstPane != null, GetLastResult(), "Propagating."); + + pAnimationSecondPane = GetVisualElementAnimation(L"bounds", destination); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, pAnimationSecondPane != null, , r, "[%s] Propagating.", GetErrorMessage(r)); + + clientBounds = __pSplitPanel->GetBoundsF(); + firstPaneBounds = pFirstPane->GetBoundsF(); + secondPaneBounds = pSecondPane->GetBoundsF(); + + clientBounds.x = clientBounds.y = 0.0f; + + dividerRectangle = __dividerRectangle; + + switch (destination) + { + case _SPLIT_PANEL_ANIMATION_RIGHT: + { + firstPaneStartBounds = firstPaneBounds; + firstPaneEndBounds = clientBounds; + + secondPaneStartBounds = secondPaneBounds; + secondPaneEndBounds = secondPaneBounds; + secondPaneEndBounds.x = clientBounds.width + dividerRectangle.width; + } + break; + case _SPLIT_PANEL_ANIMATION_LEFT: + { + firstPaneStartBounds = firstPaneBounds; + firstPaneEndBounds = firstPaneBounds; + firstPaneEndBounds.x = -(firstPaneBounds.width + dividerRectangle.width); + + secondPaneStartBounds = secondPaneBounds; + secondPaneEndBounds = clientBounds; + } + break; + case _SPLIT_PANEL_ANIMATION_TOP: + { + firstPaneStartBounds = firstPaneBounds; + firstPaneEndBounds = firstPaneBounds; + firstPaneEndBounds.y = -(firstPaneBounds.height + dividerRectangle.height); + + secondPaneStartBounds = secondPaneBounds; + secondPaneEndBounds = clientBounds; + } + break; + case _SPLIT_PANEL_ANIMATION_BOTTOM: + { + firstPaneStartBounds = firstPaneBounds; + firstPaneEndBounds = clientBounds; + + secondPaneStartBounds = secondPaneBounds; + secondPaneEndBounds = secondPaneBounds; + secondPaneEndBounds.y = clientBounds.height + dividerRectangle.height; + } + break; + case _SPLIT_PANEL_ANIMATION_RESTORE_HORIZONTAL: + { + firstPaneStartBounds = firstPaneBounds; + firstPaneEndBounds = GetRestorePaneBounds(SPLIT_PANEL_PANE_ORDER_FIRST); + + secondPaneStartBounds = secondPaneBounds; + secondPaneEndBounds = GetRestorePaneBounds(SPLIT_PANEL_PANE_ORDER_SECOND); + } + break; + case _SPLIT_PANEL_ANIMATION_RESTORE_VERTICAL: + { + firstPaneStartBounds = firstPaneBounds; + firstPaneEndBounds = GetRestorePaneBounds(SPLIT_PANEL_PANE_ORDER_FIRST); + + secondPaneStartBounds = secondPaneBounds; + secondPaneEndBounds = GetRestorePaneBounds(SPLIT_PANEL_PANE_ORDER_SECOND); + } + break; + } + + //Animate first pane + r = pAnimationFirstPane->SetStartValue(firstPaneStartBounds); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Propagating."); + + r = pAnimationFirstPane->SetEndValue(firstPaneEndBounds); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Propagating."); + + pFirstPane->SetBounds(firstPaneEndBounds); + + pVEFirstPane->AddAnimation(L"Bounds", *pAnimationFirstPane); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , GetLastResult(), "Propagating."); + + //Animate second pane + r = pAnimationSecondPane->SetStartValue(secondPaneStartBounds); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Propagating."); + + r = pAnimationSecondPane->SetEndValue(secondPaneEndBounds); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Propagating."); + + pSecondPane->SetBounds(secondPaneEndBounds); + + pVESecondPane->AddAnimation(L"Bounds", *pAnimationSecondPane); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , GetLastResult(), "Propagating."); + +CATCH: + + delete pAnimationFirstPane; + delete pAnimationSecondPane; + + return r; +} + +Control* +_SplitPanelPresenter::GetPaneControl(SplitPanelPaneOrder paneOrder) +{ + _ControlImpl* pControlImpl = null; + _SplitPanelImpl* pSplitPanelImpl = null; + Control* pControl = null; + + pControlImpl = static_cast<_ControlImpl*>(__pSplitPanel->GetUserData()); + SysTryReturn(NID_UI_CTRL, pControlImpl != null, null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. _ControlImpl is null."); + + pSplitPanelImpl = dynamic_cast<_SplitPanelImpl*>(pControlImpl); + SysTryReturn(NID_UI_CTRL, pSplitPanelImpl != null, null, E_SYSTEM, "[E_SYSTEM]A system error has occurred. _SplitPanelImpl is null."); + + SplitPanel& splitPanelPublic = pSplitPanelImpl->GetPublic(); + + pControl = splitPanelPublic.GetPane(paneOrder); + SysTryReturn(NID_UI_CTRL, pControl != null, null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + return pControl; +} + +AnimationTransactionStatus +_SplitPanelPresenter::GetTransactionStatus(void) +{ + if (AnimationTransaction::GetStatus(__transactionIdMaximize) == ANIMATION_TRANSACTION_STATUS_STOPPED && + AnimationTransaction::GetStatus(__transactionIdRestore) == ANIMATION_TRANSACTION_STATUS_STOPPED) + { + return ANIMATION_TRANSACTION_STATUS_STOPPED; + } + + return ANIMATION_TRANSACTION_STATUS_PLAYING; +} + +FloatRectangle +_SplitPanelPresenter::GetRestorePaneBounds(SplitPanelPaneOrder paneOrder) +{ + float width = 0.0f; + float height = 0.0f; + float dividerPosition = 0.0f; + + FloatRectangle clientBounds(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle firstPaneBounds(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle secondPaneBounds(0.0f, 0.0f, 0.0f, 0.0f); + _ControlOrientation orientation = _CONTROL_ORIENTATION_PORTRAIT; + + dividerPosition = __pSplitPanel->GetDividerPosition(); + + clientBounds = __pSplitPanel->GetBoundsF(); + + orientation = _ControlManager::GetInstance()->GetOrientation(); + + if (GetDividerStyle() == SPLIT_PANEL_DIVIDER_STYLE_MOVABLE) + { + GET_SHAPE_CONFIG(SPLITPANEL::MOVABLE_DIVIDER_THICKNESS, orientation, width); + GET_SHAPE_CONFIG(SPLITPANEL::MOVABLE_DIVIDER_THICKNESS, orientation, height); + } + else + { + GET_SHAPE_CONFIG(SPLITPANEL::FIXED_DIVIDER_THICKNESS, orientation, width); + GET_SHAPE_CONFIG(SPLITPANEL::FIXED_DIVIDER_THICKNESS, orientation, height); + } + + if (__pSplitPanel->GetDividerDirection() == SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL) + { + height = clientBounds.height; + + if (height > 0.0f) + { + __dividerRectangle = FloatRectangle(dividerPosition, 0.0f, width, height); + } + } + else + { + width = clientBounds.width; + + if (width > 0.0f) + { + __dividerRectangle = FloatRectangle(0.0f, dividerPosition, width, height); + } + } + + if (__pSplitPanel->GetDividerDirection() == SPLIT_PANEL_DIVIDER_DIRECTION_VERTICAL) + { + firstPaneBounds = FloatRectangle(0.0f, 0.0f, __dividerRectangle.x, clientBounds.height); + secondPaneBounds = FloatRectangle(__dividerRectangle.x + __dividerRectangle.width, 0.0f, clientBounds.width - __dividerRectangle.x - __dividerRectangle.width, clientBounds.height); + } + else + { + firstPaneBounds = FloatRectangle(0.0f, 0.0f, clientBounds.width, __dividerRectangle.y); + secondPaneBounds = FloatRectangle(0.0f, __dividerRectangle.y + __dividerRectangle.height, clientBounds.width, clientBounds.height - __dividerRectangle.y - __dividerRectangle.height); + } + + if (paneOrder == SPLIT_PANEL_PANE_ORDER_FIRST) + { + return firstPaneBounds; + } + + return secondPaneBounds; +} + +VisualElementPropertyAnimation* +_SplitPanelPresenter::GetVisualElementAnimation(String propertyName, int destination) +{ + result r = E_SUCCESS; + VisualElementPropertyAnimation* pAnimation = null; + + const IVisualElementAnimationTimingFunction* pTimingFunction = VisualElementAnimation::GetTimingFunctionByName(__visualElementInterpolator); + SysTryReturn(NID_UI_CTRL, pTimingFunction != null, null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + pAnimation = new (std::nothrow) VisualElementPropertyAnimation(); + SysTryReturn(NID_UI_CTRL, pAnimation != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = pAnimation->SetPropertyName(propertyName); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Propagating."); + + r = pAnimation->SetDuration(GetAnimationDuration(destination)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "Propagating."); + + pAnimation->SetTimingFunction(pTimingFunction); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , GetLastResult(), "Propagating."); + + return pAnimation; + +CATCH: + delete pAnimation; + + 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) +{ + if (transactionId == __transactionIdRestore) + { + VisualElement* pDividerVE = __pSplitPanel->GetDividerVisualElement(); + if (pDividerVE != null) + { + pDividerVE->SetShowState(true); + } + } + + return; +} + +void +_SplitPanelPresenter::OnAnimationTransactionStopped(int transactionId) +{ + return; +} + +void +_SplitPanelPresenter::OnAnimationTransactionFinished(int transactionId) +{ + if (transactionId == __transactionIdMaximize) + { + VisualElement* pDividerVE = __pSplitPanel->GetDividerVisualElement(); + if (pDividerVE != null) + { + pDividerVE->SetShowState(false); + } + } + + return; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_Tab.cpp b/src/ui/controls/FUiCtrl_Tab.cpp new file mode 100644 index 0000000..66c9a48 --- /dev/null +++ b/src/ui/controls/FUiCtrl_Tab.cpp @@ -0,0 +1,1709 @@ +// +// 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_Tab.cpp + * @brief This is the implementation file for the _Tab class. + */ + +#include +#include +#include +#include "FUi_ResourceManager.h" +#include "FUi_UiTouchEvent.h" +#include "FUi_AccessibilityContainer.h" +#include "FUi_AccessibilityElement.h" +#include "FUi_TouchLongPressGestureDetector.h" +#include "FUiCtrl_Tab.h" +#include "FUi_CoordinateSystemUtils.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Base::Runtime; + +namespace Tizen { namespace Ui { namespace Controls { + +_Tab::_Tab(void) + : __pTabPresenter(null) + , __isInFocusMode(false) + , __style(_TAB_STYLE_TEXT) + , __currentHighlightedItemIndex(-1) + , __tabStatus(_TAB_STATUS_NORMAL) + , __pActionEvent(null) + , __pGestureLongPress(null) + , __pFlickGesture(null) + , __pBackgroundBitmap(null) + , __pDisabledBackgroundBitmap(null) + , __pPressedItemBackgroundBitmap(null) + , __pPressedItemBackgroundEffectBitmap(null) + , __pSelectedItemBackgroundBitmap(null) + , __pHighlightedItemBackgroundBitmap(null) +{ + ClearLastResult(); + result r = E_SUCCESS; + + __tabItems.Construct(); + + GET_COLOR_CONFIG(TAB::ITEM_BG_NORMAL, __itemBgColor[_TAB_STATUS_NORMAL]); + GET_COLOR_CONFIG(TAB::ITEM_BG_PRESSED, __itemBgColor[_TAB_STATUS_PRESSED]); + GET_COLOR_CONFIG(TAB::ITEM_BG_SELECTED, __itemBgColor[_TAB_STATUS_SELECTED]); + GET_COLOR_CONFIG(TAB::ITEM_BG_HIGHLIGHTED, __itemBgColor[_TAB_STATUS_HIGHLIGHTED]); + GET_COLOR_CONFIG(TAB::ITEM_BG_DISABLED, __itemBgColor[_TAB_STATUS_DISABLED]); + + GET_COLOR_CONFIG(TAB::ITEM_TEXT_NORMAL, __itemTextColor[_TAB_STATUS_NORMAL]); + GET_COLOR_CONFIG(TAB::ITEM_TEXT_PRESSED, __itemTextColor[_TAB_STATUS_PRESSED]); + GET_COLOR_CONFIG(TAB::ITEM_TEXT_SELECTED, __itemTextColor[_TAB_STATUS_SELECTED]); + GET_COLOR_CONFIG(TAB::ITEM_TEXT_HIGHLIGHTED, __itemTextColor[_TAB_STATUS_HIGHLIGHTED]); + GET_COLOR_CONFIG(TAB::ITEM_TEXT_DISABLED, __itemTextColor[_TAB_STATUS_DISABLED]); + + r = LoadBitmap(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to load bitmap."); + + _Control::SetResizable(false); + _Control::SetMovable(false); + + _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); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _TabPresenter instance could not be set."); + + r = pPresenter->Construct(*this); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _TabPresenter instance construct failed."); + +} + +_Tab::~_Tab(void) +{ + delete __pTabPresenter; + __pTabPresenter = null; + + delete __pActionEvent; + __pActionEvent = null; + + __tabItems.RemoveAll(true); + + if (__pFlickGesture != null) + { + __pFlickGesture->RemoveGestureListener(*this); + RemoveGestureDetector(*__pFlickGesture); + + delete __pFlickGesture; + __pFlickGesture = null; + } + + if (__pGestureLongPress != null) + { + __pGestureLongPress->RemoveGestureListener(*this); + RemoveGestureDetector(*__pGestureLongPress); + + delete __pGestureLongPress; + __pGestureLongPress = null; + } + + delete __pBackgroundBitmap; + __pBackgroundBitmap = null; + + delete __pDisabledBackgroundBitmap; + __pDisabledBackgroundBitmap = null; + + delete __pPressedItemBackgroundBitmap; + __pPressedItemBackgroundBitmap = null; + + delete __pPressedItemBackgroundEffectBitmap; + __pPressedItemBackgroundEffectBitmap = null; + + delete __pSelectedItemBackgroundBitmap; + __pSelectedItemBackgroundBitmap = null; + + delete __pHighlightedItemBackgroundBitmap; + __pHighlightedItemBackgroundBitmap = null; + + RemoveAllAccessibilityElement(); +} + +_Tab* +_Tab::CreateTabN(void) +{ + result r = E_SUCCESS; + + _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())) + { + goto CATCH; + } + + pTab->AcquireHandle(); + + 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); + pTab->AddGestureDetector(*(pTab->__pGestureLongPress)); + 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(); + SysTryCatch(NID_UI_CTRL, pTab->__pFlickGesture, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = pTab->AddGestureDetector(*(pTab->__pFlickGesture)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating", GetErrorMessage(r)); + + r = pTab->__pFlickGesture->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."); + + return pTab; + +CATCH: + if (pTab->__pGestureLongPress != null) + { + pTab->__pGestureLongPress->RemoveGestureListener(*pTab); + pTab->RemoveGestureDetector(*pTab->__pGestureLongPress); + + delete pTab->__pGestureLongPress; + pTab->__pGestureLongPress = null; + } + if (pTab->__pFlickGesture != null) + { + pTab->__pFlickGesture->RemoveGestureListener(*pTab); + pTab->RemoveGestureDetector(*pTab->__pFlickGesture); + + delete pTab->__pFlickGesture; + pTab->__pFlickGesture = null; + } + + delete pTab; + return null; +} + +result +_Tab::SetPresenter(const _TabPresenter& tabPresenter) +{ + ClearLastResult(); + __pTabPresenter = const_cast<_TabPresenter*>(&tabPresenter); + + return E_SUCCESS; +} + +result +_Tab::AddItem(const Bitmap& icon, const String& text, int actionId) +{ + if (actionId < _TAB_ACTION_ID_MIN || actionId > _TAB_ACTION_ID_MAX) + { + SysLog(NID_UI_CTRL, "[E_OUT_OF_RANGE] The actionId (%d) is out of range.", actionId); + return E_OUT_OF_RANGE; + } + + if (!((__style == _TAB_STYLE_TEXT) || (__style == _TAB_STYLE_ICON_TEXT))) + { + return E_SYSTEM; + } + + __style = _TAB_STYLE_ICON_TEXT; + + bool isDuplicate = CheckDuplicatedActionId(actionId); + SysTryReturnResult(NID_UI_CTRL, isDuplicate == false, E_SYSTEM, "A system error has occurred. The tab already has an item with same action id (%d).", actionId); + + int itemCount = __tabItems.GetCount(); + + 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(); + SysTryReturnResult(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, "Memory allocation failed."); + + pItem->SetIcon(icon); + pItem->SetText(text); + pItem->SetActionId(actionId); + pItem->SetUpdateState(true); + + if (itemCount > 0) + { + pItem->SetStatus(_TABITEM_STATUS_NORMAL); + } + else + { + pItem->SetStatus(_TABITEM_STATUS_SELECTED); + } + + __pTabPresenter->SetRecalculateItemBounds(true); + + if (__pTabPresenter->GetItemStatus(__currentHighlightedItemIndex) == _TABITEM_STATUS_HIGHLIGHTED) + { + __pTabPresenter->SetItemStatus(__currentHighlightedItemIndex, _TABITEM_STATUS_NORMAL); + } + __currentHighlightedItemIndex = 0; + + AddAccessibilityElement(pItem->GetItemBounds(), pItem->GetText(), pItem->GetStatus()); + + return __tabItems.Add(*pItem); +} + +result +_Tab::AddItem(const Bitmap& icon, int actionId) +{ + if (actionId < _TAB_ACTION_ID_MIN || actionId > _TAB_ACTION_ID_MAX) + { + SysLog(NID_UI_CTRL, "[E_OUT_OF_RANGE] The actionId (%d) is out of range.", actionId); + return E_OUT_OF_RANGE; + } + + if (__style != _TAB_STYLE_ICON) + { + return E_SYSTEM; + } + + bool isDuplicate = CheckDuplicatedActionId(actionId); + SysTryReturnResult(NID_UI_CTRL, isDuplicate == false, E_SYSTEM, "A system error has occurred. The tab already has an item with same action id (%d).", actionId); + + int itemCount = __tabItems.GetCount(); + + 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(); + SysTryReturnResult(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, "Memory allocation failed."); + + pItem->SetIcon(icon); + pItem->SetActionId(actionId); + pItem->SetUpdateState(true); + + if (itemCount > 0) + { + pItem->SetStatus(_TABITEM_STATUS_NORMAL); + } + else + { + pItem->SetStatus(_TABITEM_STATUS_SELECTED); + } + + __pTabPresenter->SetRecalculateItemBounds(true); + + if (__pTabPresenter->GetItemStatus(__currentHighlightedItemIndex) == _TABITEM_STATUS_HIGHLIGHTED) + { + __pTabPresenter->SetItemStatus(__currentHighlightedItemIndex, _TABITEM_STATUS_NORMAL); + } + __currentHighlightedItemIndex = 0; + + AddAccessibilityElement(pItem->GetItemBounds(), pItem->GetText(), pItem->GetStatus()); + + return __tabItems.Add(*pItem); +} + +result +_Tab::AddItem(const String& text, int actionId) +{ + if (actionId < _TAB_ACTION_ID_MIN || actionId > _TAB_ACTION_ID_MAX) + { + SysLog(NID_UI_CTRL, "[E_OUT_OF_RANGE] The actionId (%d) is out of range.", actionId); + return E_OUT_OF_RANGE; + } + + if (!((__style == _TAB_STYLE_TEXT) || (__style == _TAB_STYLE_ICON_TEXT))) + { + return E_SYSTEM; + } + + bool isDuplicate = CheckDuplicatedActionId(actionId); + SysTryReturnResult(NID_UI_CTRL, isDuplicate == false, E_SYSTEM, "A system error has occurred. The tab already has an item with same action id (%d).", actionId); + + int itemCount = __tabItems.GetCount(); + + 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(); + SysTryReturnResult(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, "Memory allocation failed."); + + pItem->SetText(text); + pItem->SetActionId(actionId); + pItem->SetUpdateState(true); + + if (itemCount > 0) + { + pItem->SetStatus(_TABITEM_STATUS_NORMAL); + } + else + { + pItem->SetStatus(_TABITEM_STATUS_SELECTED); + } + + __pTabPresenter->SetRecalculateItemBounds(true); + + if (__pTabPresenter->GetItemStatus(__currentHighlightedItemIndex) == _TABITEM_STATUS_HIGHLIGHTED) + { + __pTabPresenter->SetItemStatus(__currentHighlightedItemIndex, _TABITEM_STATUS_NORMAL); + } + __currentHighlightedItemIndex = 0; + + AddAccessibilityElement(pItem->GetItemBounds(), pItem->GetText(), pItem->GetStatus()); + + return __tabItems.Add(*pItem); +} + +result +_Tab::InsertItemAt(int index, const Bitmap& icon, const String& text, int actionId) +{ + result r = E_SUCCESS; + bool isSelected = false; + + if (actionId < _TAB_ACTION_ID_MIN || actionId > _TAB_ACTION_ID_MAX) + { + SysLog(NID_UI_CTRL, "[E_OUT_OF_RANGE] The actionId (%d) is out of range.", actionId); + return E_OUT_OF_RANGE; + } + + if (!((__style == _TAB_STYLE_TEXT) || (__style == _TAB_STYLE_ICON_TEXT))) + { + return E_SYSTEM; + } + + __style = _TAB_STYLE_ICON_TEXT; + + bool isDuplicate = CheckDuplicatedActionId(actionId); + SysTryReturnResult(NID_UI_CTRL, isDuplicate == false, E_SYSTEM, "A system error has occurred.The tab already has an item with same action id (%d).", actionId); + + int itemCount = __tabItems.GetCount(); + + 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(); + SysTryReturnResult(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, "Memory allocation failed."); + + pItem->SetIcon(icon); + pItem->SetText(text); + pItem->SetActionId(actionId); + pItem->SetUpdateState(true); + + int selectedIndex = GetSelectedItemIndex(); + + if (selectedIndex >= index) + { + _TabItem* pSelectedItem = null; + pSelectedItem = GetItemAt(selectedIndex); + if (pSelectedItem != null) + { + isSelected = true; + pSelectedItem->SetStatus(_TABITEM_STATUS_NORMAL); + } + } + else + { + pItem->SetStatus(_TABITEM_STATUS_NORMAL); + } + + __pTabPresenter->SetRecalculateItemBounds(true); + + r = __tabItems.InsertAt(*pItem, index); + + if (isSelected) + { + SetSelectedItemIndex(selectedIndex); + } + + if (__pTabPresenter->GetItemStatus(__currentHighlightedItemIndex) == _TABITEM_STATUS_HIGHLIGHTED) + { + __pTabPresenter->SetItemStatus(__currentHighlightedItemIndex, _TABITEM_STATUS_NORMAL); + } + __currentHighlightedItemIndex = 0; + + InsertAccessibilityElementAt(index, pItem->GetItemBounds(), pItem->GetText(), pItem->GetStatus()); + + return r; +} + +result +_Tab::InsertItemAt(int index, const Bitmap& icon, int actionId) +{ + result r = E_SUCCESS; + bool isSelected = false; + + if (actionId < _TAB_ACTION_ID_MIN || actionId > _TAB_ACTION_ID_MAX) + { + SysLog(NID_UI_CTRL, "[E_OUT_OF_RANGE] The actionId (%d) is out of range.", actionId); + return E_OUT_OF_RANGE; + } + + if (__style != _TAB_STYLE_ICON) + { + return E_SYSTEM; + } + + bool isDuplicate = CheckDuplicatedActionId(actionId); + SysTryReturnResult(NID_UI_CTRL, isDuplicate == false, E_SYSTEM, "A system error has occurred.The tab already has an item with same action id (%d).", actionId); + + int itemCount = __tabItems.GetCount(); + + 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(); + SysTryReturnResult(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, "Memory allocation failed."); + + pItem->SetIcon(icon); + pItem->SetActionId(actionId); + pItem->SetUpdateState(true); + int selectedIndex = GetSelectedItemIndex(); + + if (selectedIndex >= index) + { + _TabItem* pSelectedItem = null; + pSelectedItem = GetItemAt(selectedIndex); + if (pSelectedItem != null) + { + isSelected = true; + pSelectedItem->SetStatus(_TABITEM_STATUS_NORMAL); + } + } + else + { + pItem->SetStatus(_TABITEM_STATUS_NORMAL); + } + + __pTabPresenter->SetRecalculateItemBounds(true); + + r = __tabItems.InsertAt(*pItem, index); + + if (isSelected) + { + SetSelectedItemIndex(selectedIndex); + } + + if (__pTabPresenter->GetItemStatus(__currentHighlightedItemIndex) == _TABITEM_STATUS_HIGHLIGHTED) + { + __pTabPresenter->SetItemStatus(__currentHighlightedItemIndex, _TABITEM_STATUS_NORMAL); + } + __currentHighlightedItemIndex = 0; + + InsertAccessibilityElementAt(index, pItem->GetItemBounds(), pItem->GetText(), pItem->GetStatus()); + + return r; +} + +result +_Tab::InsertItemAt(int index, const String& text, int actionId) +{ + result r = E_SUCCESS; + bool isSelected = false; + + if (actionId < _TAB_ACTION_ID_MIN || actionId > _TAB_ACTION_ID_MAX) + { + SysLog(NID_UI_CTRL, "[E_OUT_OF_RANGE] The actionId (%d) is out of range.", actionId); + return E_OUT_OF_RANGE; + } + + bool isDuplicate = CheckDuplicatedActionId(actionId); + SysTryReturnResult(NID_UI_CTRL, isDuplicate == false, E_SYSTEM, "A system error has occurred.The tab already has an item with same action id (%d).", actionId); + + if (!((__style == _TAB_STYLE_TEXT) || (__style == _TAB_STYLE_ICON_TEXT))) + { + return E_SYSTEM; + } + + int itemCount = __tabItems.GetCount(); + + 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(); + SysTryReturnResult(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, "Memory allocation failed."); + + pItem->SetText(text); + pItem->SetActionId(actionId); + pItem->SetUpdateState(true); + int selectedIndex = GetSelectedItemIndex(); + + if (selectedIndex >= index) + { + _TabItem* pSelectedItem = null; + pSelectedItem = GetItemAt(selectedIndex); + if (pSelectedItem != null) + { + isSelected = true; + pSelectedItem->SetStatus(_TABITEM_STATUS_NORMAL); + } + } + else + { + pItem->SetStatus(_TABITEM_STATUS_NORMAL); + } + + __pTabPresenter->SetRecalculateItemBounds(true); + + r = __tabItems.InsertAt(*pItem, index); + + if (isSelected) + { + SetSelectedItemIndex(selectedIndex); + } + + if (__pTabPresenter->GetItemStatus(__currentHighlightedItemIndex) == _TABITEM_STATUS_HIGHLIGHTED) + { + __pTabPresenter->SetItemStatus(__currentHighlightedItemIndex, _TABITEM_STATUS_NORMAL); + } + __currentHighlightedItemIndex = 0; + + InsertAccessibilityElementAt(index, pItem->GetItemBounds(), pItem->GetText(), pItem->GetStatus()); + + return r; +} + +result +_Tab::SetItemAt(int index, const Bitmap& icon, const String& text, int actionId) +{ + if (actionId < _TAB_ACTION_ID_MIN || actionId > _TAB_ACTION_ID_MAX) + { + SysLog(NID_UI_CTRL, "[E_OUT_OF_RANGE] The actionId (%d) is out of range.", actionId); + return E_OUT_OF_RANGE; + } + + if (!((__style == _TAB_STYLE_TEXT) || (__style == _TAB_STYLE_ICON_TEXT))) + { + return E_SYSTEM; + } + + __style = _TAB_STYLE_ICON_TEXT; + + int itemCount = __tabItems.GetCount(); + + if ((index < 0) || (index >= itemCount)) + { + return E_OUT_OF_RANGE; + } + + SysTryReturnResult(NID_UI_CTRL, itemCount < _TAB_ITEM_MAXCOUNT, E_SYSTEM, "A system error has occurred. The tab has maximum number of items."); + + if (GetItemIndex(actionId) != index) + { + return E_SYSTEM; + } + + _TabItem* pItem = static_cast<_TabItem*>(__tabItems.GetAt(index)); + result r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, pItem != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + pItem->SetIcon(icon); + pItem->SetText(text); + pItem->SetActionId(actionId); + pItem->SetUpdateState(true); + + UpdateAccessibilityLabel(index, text); + + return E_SUCCESS; +} + +result +_Tab::SetItemAt(int index, const Bitmap& icon, int actionId) +{ + if (actionId < _TAB_ACTION_ID_MIN || actionId > _TAB_ACTION_ID_MAX) + { + SysLog(NID_UI_CTRL, "[E_OUT_OF_RANGE] The actionId (%d) is out of range.", actionId); + return E_OUT_OF_RANGE; + } + + if (__style != _TAB_STYLE_ICON) + { + return E_SYSTEM; + } + + int itemCount = __tabItems.GetCount(); + + if ((index < 0) || (index >= itemCount)) + { + return E_OUT_OF_RANGE; + } + + SysTryReturnResult(NID_UI_CTRL, itemCount < _TAB_ITEM_MAXCOUNT, E_SYSTEM, "A system error has occurred. The tab has maximum number of items."); + + if (GetItemIndex(actionId) != index) + { + return E_SYSTEM; + } + + _TabItem* pItem = static_cast<_TabItem*>(__tabItems.GetAt(index)); + result r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, pItem != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + pItem->SetIcon(icon); + pItem->SetActionId(actionId); + pItem->SetUpdateState(true); + + return E_SUCCESS; +} + +result +_Tab::SetItemAt(int index, const String& text, int actionId) +{ + if (actionId < _TAB_ACTION_ID_MIN || actionId > _TAB_ACTION_ID_MAX) + { + SysLog(NID_UI_CTRL, "[E_OUT_OF_RANGE] The actionId (%d) is out of range.", actionId); + return E_OUT_OF_RANGE; + } + + if (!((__style == _TAB_STYLE_TEXT) || (__style == _TAB_STYLE_ICON_TEXT))) + { + return E_SYSTEM; + } + + int itemCount = __tabItems.GetCount(); + + if ((index < 0) || (index >= itemCount)) + { + return E_OUT_OF_RANGE; + } + + SysTryReturnResult(NID_UI_CTRL, itemCount < _TAB_ITEM_MAXCOUNT, E_SYSTEM, "A system error has occurred. The tab has maximum number of items."); + + if (GetItemIndex(actionId) != index) + { + return E_SYSTEM; + } + + _TabItem* pItem = static_cast<_TabItem*>(__tabItems.GetAt(index)); + result r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, pItem != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + pItem->SetText(text); + pItem->SetActionId(actionId); + pItem->SetUpdateState(true); + + UpdateAccessibilityLabel(index, text); + + return E_SUCCESS; +} + +result +_Tab::RemoveItemAt(int index) +{ + result r = E_SUCCESS; + int selectedIndex = GetSelectedItemIndex(); + + if (selectedIndex >= index) + { + _TabItem* pSelectedItem = null; + pSelectedItem = GetItemAt(selectedIndex); + if (pSelectedItem != null) + { + pSelectedItem->SetStatus(_TABITEM_STATUS_NORMAL); + } + } + __pTabPresenter->SetRecalculateItemBounds(true); + + r = __tabItems.RemoveAt(index, true); + + SetSelectedItemIndex(0); + + if (__pTabPresenter->GetItemStatus(__currentHighlightedItemIndex) == _TABITEM_STATUS_HIGHLIGHTED) + { + __pTabPresenter->SetItemStatus(__currentHighlightedItemIndex, _TABITEM_STATUS_NORMAL); + } + if (GetItemCount() > 0) + { + __currentHighlightedItemIndex = 0; + } + else + { + __currentHighlightedItemIndex = -1; + } + + RemoveAccessibilityElementAt(index); + + return r; +} + +result +_Tab::RemoveAllItems(void) +{ + if (__pTabPresenter->GetItemStatus(__currentHighlightedItemIndex) == _TABITEM_STATUS_HIGHLIGHTED) + { + __pTabPresenter->SetItemStatus(__currentHighlightedItemIndex, _TABITEM_STATUS_NORMAL); + } + __currentHighlightedItemIndex = -1; + + __pTabPresenter->SetRecalculateItemBounds(true); + SetSelectedItemIndex(0); + SetFirstDrawnItemIndex(-1); + + __tabItems.RemoveAll(true); + + RemoveAllAccessibilityElement(); + + return E_SUCCESS; +} + +bool +_Tab::ChangeItemAt(const int srcIndex, const int destIndex) +{ + _TabItem* pItem = null; + pItem = GetItemAt(srcIndex); + + __tabItems.InsertAt(*pItem, destIndex); + + if (srcIndex > destIndex) + { + __tabItems.RemoveAt((srcIndex + 1), false); + } + else + { + __tabItems.RemoveAt(srcIndex, false); + } + + return true; +} + +int +_Tab::GetItemIndex(int actionId) +{ + int itemCount = __tabItems.GetCount(); + + _TabItem* pItem = null; + + for (int i = 0; i < itemCount; i++) + { + pItem = GetItemAt(i); + + if ((pItem != null) && (actionId == pItem->GetActionId())) + { + return i; + } + } + + return -1; +} + +bool +_Tab::CheckDuplicatedActionId(int actionId) +{ + int itemIndex = GetItemIndex(actionId); + + if (itemIndex >= 0) + { + return true; + } + + return false; +} + +result +_Tab::LoadBitmap(void) +{ + result r = E_SUCCESS; + Color pressedEffectColor; + GET_COLOR_CONFIG(TAB::ITEM_BG_EFFECT_PRESSED, pressedEffectColor); + + 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."); + + + 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."); + + + 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."); + + 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."); + + 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."); + + 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."); + + return r; +} + +result +_Tab::SetBadgeIcon(int actionId, const Bitmap* pBadgeIcon) +{ + result r = E_SUCCESS; + + if (actionId < _TAB_ACTION_ID_MIN || actionId > _TAB_ACTION_ID_MAX) + { + SysLog(NID_UI_CTRL, "[E_OUT_OF_RANGE] The actionId (%d) is out of range.", actionId); + return E_OUT_OF_RANGE; + } + + int itemIndex = GetItemIndexFromActionId(actionId); + + _TabItem* pItem = null; + + if (itemIndex < 0) + { + SysLog(NID_UI_CTRL, "[E_INVALID_ARG] Invalid argument(s) is used. The specified actionId is not found."); + return E_INVALID_ARG; + } + + pItem = dynamic_cast<_TabItem*>(__tabItems.GetAt(itemIndex)); + + if (pItem != null) + { + pItem->SetBadgeIcon(*pBadgeIcon); + + r = __tabItems.SetAt(*pItem, itemIndex, false); + } + + return r; +} + +int +_Tab::GetItemCount(void) const +{ + return __tabItems.GetCount(); +} + +int +_Tab::GetItemIndexFromActionId(int actionId) const +{ + if (actionId < _TAB_ACTION_ID_MIN || actionId > _TAB_ACTION_ID_MAX) + { + SysLog(NID_UI_CTRL, "[E_OUT_OF_RANGE] The actionId (%d) is out of range.", actionId); + return -1; + } + + int index = 0; + int itemCount = __tabItems.GetCount(); + + for (index = 0; index < itemCount; index++) + { + const _TabItem* pItem = dynamic_cast(__tabItems.GetAt(index)); + + if (pItem != null) + { + if (pItem->GetActionId() == actionId) + { + return index; + } + } + } + + return -1; +} + +int +_Tab::GetItemActionIdAt(int index) const +{ + if (__tabItems.GetAt(index) == null) + { + return -1; + } + + 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(); +} + +_TabItem* +_Tab::GetItemAt(int index) +{ + if (__tabItems.GetAt(index) == null) + { + return null; + } + + _TabItem* pItem = static_cast<_TabItem*>(__tabItems.GetAt(index)); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pItem != null, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + return pItem; +} + +void +_Tab::SetSelectedItemIndex(int index) +{ + __pTabPresenter->SetSelectedItemIndex(index); + return; +} + +int +_Tab::GetSelectedItemIndex(void) const +{ + return __pTabPresenter->GetSelectedItemIndex(); +} + +void +_Tab::SetFirstDrawnItemIndex(int index) +{ + __pTabPresenter->SetFirstDrawnItemIndex(index); + return; +} + +int +_Tab::GetFirstDrawnItemIndex(void) const +{ + return __pTabPresenter->GetFirstDrawnItemIndex(); +} + +void +_Tab::SetEditModeEnabled(bool isEnabled) +{ + return __pTabPresenter->SetEditModeEnabled(isEnabled); +} + +bool +_Tab::IsEditModeEnabled(void) const +{ + return __pTabPresenter->IsEditModeEnabled(); +} + +bool +_Tab::IsInFocusMode(void) const +{ + return __isInFocusMode; +} + +result +_Tab::SetBackgroundBitmap(const Bitmap& bitmap) +{ + ClearLastResult(); + + Tizen::Graphics::Bitmap* pBitmap = _BitmapImpl::CloneN(bitmap); + + SysTryReturn(NID_UI_CTRL, (pBitmap), GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + if (__pBackgroundBitmap != null) + { + delete __pBackgroundBitmap; + __pBackgroundBitmap = null; + } + + __pBackgroundBitmap = pBitmap; + + if (__pDisabledBackgroundBitmap != null) + { + delete __pDisabledBackgroundBitmap; + __pDisabledBackgroundBitmap = null; + } + + return E_SUCCESS; +} + +Bitmap* +_Tab::GetBackgroundBitmap(void) const +{ + return __pBackgroundBitmap; +} + +Bitmap* +_Tab::GetDisabledBackgroundBitmap(void) const +{ + return __pDisabledBackgroundBitmap; +} + +Bitmap* +_Tab::GetPressedItemBackgroundBitmap(void) const +{ + return __pPressedItemBackgroundBitmap; +} + +Bitmap* +_Tab::GetPressedItemBackgroundEffectBitmap(void) const +{ + return __pPressedItemBackgroundEffectBitmap; +} + +result +_Tab::SetSelectedItemBackgroundBitmap(const Bitmap& bitmap) +{ + ClearLastResult(); + + Tizen::Graphics::Bitmap* pBitmap = _BitmapImpl::CloneN(bitmap); + + SysTryReturn(NID_UI_CTRL, (pBitmap), GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + if (__pSelectedItemBackgroundBitmap != null) + { + delete __pSelectedItemBackgroundBitmap; + __pSelectedItemBackgroundBitmap = null; + } + __pSelectedItemBackgroundBitmap = pBitmap; + __pTabPresenter->FreeHorizontalLineBitmap(); + + return E_SUCCESS; +} + + +Bitmap* +_Tab::GetSelectedItemBackgroundBitmap(void) const +{ + return __pSelectedItemBackgroundBitmap; +} + +result +_Tab::SetHighlightedItemBackgroundBitmap(const Bitmap& bitmap) +{ + ClearLastResult(); + + Tizen::Graphics::Bitmap* pBitmap = _BitmapImpl::CloneN(bitmap); + + SysTryReturn(NID_UI_CTRL, (pBitmap), GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + if (__pHighlightedItemBackgroundBitmap != null) + { + delete __pHighlightedItemBackgroundBitmap; + __pHighlightedItemBackgroundBitmap = null; + } + + __pHighlightedItemBackgroundBitmap = pBitmap; + + return E_SUCCESS; +} + +Bitmap* +_Tab::GetHighlightedItemBackgroundBitmap(void) const +{ + return __pHighlightedItemBackgroundBitmap; +} + +void +_Tab::SetItemBackgroundColor(Color color) +{ + __itemBgColor[_TAB_STATUS_NORMAL] = color; + return; +} + +Color +_Tab::GetItemBackgroundColor(void) const +{ + return __itemBgColor[_TAB_STATUS_NORMAL]; +} + +Color +_Tab::GetPressedItemBackgroundColor(void) const +{ + return __itemBgColor[_TAB_STATUS_PRESSED]; +} + +void +_Tab::SetSelectedItemBackgroundColor(Color color) +{ + __itemBgColor[_TAB_STATUS_SELECTED] = color; + return; +} + +Color +_Tab::GetSelectedItemBackgroundColor(void) const +{ + return __itemBgColor[_TAB_STATUS_SELECTED]; +} + +void +_Tab::SetHighlightedItemBackgroundColor(Color color) +{ + __itemBgColor[_TAB_STATUS_HIGHLIGHTED] = color; + return; +} + +Color +_Tab::GetHighlightedItemBackgroundColor(void) const +{ + return __itemBgColor[_TAB_STATUS_HIGHLIGHTED]; +} + +Color +_Tab::GetDisabledItemBackgroundColor(void) const +{ + return __itemBgColor[_TAB_STATUS_DISABLED]; +} + +void +_Tab::SetTextColor(const Color& textColor) +{ + __itemTextColor[_TAB_STATUS_NORMAL] = textColor; + return; +} + +Color +_Tab::GetTextColor(void) const +{ + return __itemTextColor[_TAB_STATUS_NORMAL]; +} + +Color +_Tab::GetDisabledTextColor(void) const +{ + return __itemTextColor[_TAB_STATUS_DISABLED]; +} + +void +_Tab::SetPressedTextColor(const Color& textColor) +{ + __itemTextColor[_TAB_STATUS_PRESSED] = textColor; + return; +} + +Color +_Tab::GetPressedTextColor(void) const +{ + return __itemTextColor[_TAB_STATUS_PRESSED]; +} + +void +_Tab::SetSelectedTextColor(const Color& textColor) +{ + __itemTextColor[_TAB_STATUS_SELECTED] = textColor; + return; +} + +Color +_Tab::GetSelectedTextColor(void) const +{ + return __itemTextColor[_TAB_STATUS_SELECTED]; +} + +void +_Tab::SetHighlightedTextColor(const Color& color) +{ + __itemTextColor[_TAB_STATUS_HIGHLIGHTED] = color; + return; +} + +Color +_Tab::GetHighlightedTextColor(void) const +{ + return __itemTextColor[_TAB_STATUS_HIGHLIGHTED]; +} + +void +_Tab::SetStyle(int style) +{ + __style = style; + return; +} + +_TabStyle +_Tab::GetStyle(void) const +{ + return _TabStyle(__style); +} + +int +_Tab::GetCurrentHighlightedItemIndex(void) const +{ + return __currentHighlightedItemIndex; +} + +void +_Tab::AddActionEventListener(const _IActionEventListener& listener) +{ + ClearLastResult(); + + if (__pActionEvent == null) + { + __pActionEvent = _ActionEvent::CreateInstanceN(*this); + + if (__pActionEvent == null || IsFailed(GetLastResult())) + { + SetLastResult(E_SYSTEM); + delete __pActionEvent; + return; + } + } + __pActionEvent->AddListener(listener); + return; +} + +void +_Tab::RemoveActionEventListener(const _IActionEventListener& listener) +{ + ClearLastResult(); + + __pActionEvent->RemoveListener(listener); + return; +} + +bool +_Tab::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + if (this != &source) + { + return true; + } + return __pTabPresenter->OnTouchPressed(source, touchinfo); +} + +bool +_Tab::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + if (this != &source) + { + return true; + } + + __pTabPresenter->OnTouchReleased(source, touchinfo); + + int index = __pTabPresenter->GetItemIndexFromPosition(touchinfo.GetCurrentPosition()); + + _TabItem* pItem = __pTabPresenter->GetItemAt(index); + + if (pItem == null) + { + return true; + } + + if (__pActionEvent != null) + { + IEventArg* pEventArg = _ActionEvent::CreateActionEventArgN(pItem->GetActionId()); + SysTryReturn(NID_UI_CTRL, pEventArg, GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + __pActionEvent->Fire(*pEventArg); + } + + return true; +} + +bool +_Tab::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + if (this != &source) + { + return true; + } + + return __pTabPresenter->OnTouchMoved(source, touchinfo); +} + +bool +_Tab::OnLongPressGestureDetected(_TouchLongPressGestureDetector& gesture) +{ + return __pTabPresenter->OnLongPressGestureDetected(); +} + +bool +_Tab::OnLongPressGestureCanceled(_TouchLongPressGestureDetector& gesture) +{ + return false; +} + +bool +_Tab::OnFlickGestureDetected(_TouchFlickGestureDetector& gesture) +{ + + return __pTabPresenter->OnFlickGestureDetected(gesture); +} + +bool +_Tab::OnFlickGestureCanceled(_TouchFlickGestureDetector& gesture) +{ + return false; +} + +void +_Tab::OnDraw(void) +{ + ClearLastResult(); + __pTabPresenter->Draw(); + return; + +} + +void +_Tab::OnBoundsChanged(void) +{ + __pTabPresenter->OnBoundsChanged(); +} + +result +_Tab::OnAttachedToMainTree(void) +{ + _AccessibilityContainer* pContainer = null; + + pContainer = GetAccessibilityContainer(); + + if (pContainer != null) + { + pContainer->Activate(true); + pContainer->AddListener(*this); + } + + return E_SUCCESS; +} + +void +_Tab::OnFontChanged(Font* pFont) +{ + __pTabPresenter->OnFontChanged(pFont); + return; +} + +void +_Tab::OnFontInfoRequested(unsigned long& style, float& size) +{ + __pTabPresenter->OnFontInfoRequested(style, size); + return; +} + +bool +_Tab::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) +{ + if (this != &source) + { + return false; + } + _KeyCode keyCode = keyInfo.GetKeyCode(); + int itemCount = __pTabPresenter->GetItemCount(); + if (itemCount == 0 || !__isInFocusMode) + { + return false; + } + + if (keyCode == _KEY_RIGHT) + { + if (__currentHighlightedItemIndex < (itemCount - 1)) + { + if (__pTabPresenter->GetItemStatus(__currentHighlightedItemIndex) != _TABITEM_STATUS_SELECTED) + { + __pTabPresenter->SetItemStatus(__currentHighlightedItemIndex, _TABITEM_STATUS_NORMAL); + } + + __currentHighlightedItemIndex++; + + if (__pTabPresenter->GetItemStatus(__currentHighlightedItemIndex) != _TABITEM_STATUS_SELECTED) + { + __pTabPresenter->SetItemStatus(__currentHighlightedItemIndex, _TABITEM_STATUS_HIGHLIGHTED); + } + __pTabPresenter->ShiftToFocusedItem(__currentHighlightedItemIndex, _FOCUS_DIRECTION_MOVE_RIGHT); + } + return true; + } + + if (keyCode == _KEY_LEFT) + { + if (__currentHighlightedItemIndex >= -1) + { + if (__pTabPresenter->GetItemStatus(__currentHighlightedItemIndex) != _TABITEM_STATUS_SELECTED) + { + __pTabPresenter->SetItemStatus(__currentHighlightedItemIndex, _TABITEM_STATUS_NORMAL); + } + if (__currentHighlightedItemIndex == -1) + { + __currentHighlightedItemIndex = 0; + } + if (__currentHighlightedItemIndex > 0) + { + __currentHighlightedItemIndex--; + } + if (__pTabPresenter->GetItemStatus(__currentHighlightedItemIndex) != _TABITEM_STATUS_SELECTED) + { + __pTabPresenter->SetItemStatus(__currentHighlightedItemIndex, _TABITEM_STATUS_HIGHLIGHTED); + } + __pTabPresenter->ShiftToFocusedItem(__currentHighlightedItemIndex, _FOCUS_DIRECTION_MOVE_LEFT); + } + return true; + } + + if (keyCode == _KEY_ENTER && __currentHighlightedItemIndex != -1) + { + __pTabPresenter->SetItemStatus(__currentHighlightedItemIndex, _TABITEM_STATUS_SELECTED); + __pTabPresenter->SetSelectedItemIndex(__currentHighlightedItemIndex); + Invalidate(); + return true; + } + return false; +} + +bool +_Tab::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) +{ + return false; +} + +void +_Tab::OnDrawFocus(void) +{ + if (__pTabPresenter->GetItemCount() > 0) + { + __currentHighlightedItemIndex = 0; + } + else + { + __currentHighlightedItemIndex = -1; + } + if (__pTabPresenter->GetItemStatus(__currentHighlightedItemIndex) != _TABITEM_STATUS_SELECTED) + { + __pTabPresenter->SetItemStatus(__currentHighlightedItemIndex, _TABITEM_STATUS_HIGHLIGHTED); + } + __pTabPresenter->ShiftToFocusedItem(__currentHighlightedItemIndex, _FOCUS_DIRECTION_MOVE_LEFT); + __isInFocusMode = true; + return; +} + +void +_Tab::OnFocusModeStateChanged(void) +{ + if (__pTabPresenter->GetItemStatus(__currentHighlightedItemIndex) == _TABITEM_STATUS_HIGHLIGHTED) + { + __pTabPresenter->SetItemStatus(__currentHighlightedItemIndex, _TABITEM_STATUS_NORMAL); + } + __currentHighlightedItemIndex = -1; + __isInFocusMode = false; + Invalidate(); +} + +void +_Tab::AddAccessibilityElement(const FloatRectangle& itemBounds, const String& itemText, _TabItemStatus status) +{ + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + SysTryReturnVoidResult(NID_UI_CTRL, (pContainer != null), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _AccessibilityElement* pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true); + SysTryReturnVoidResult(NID_UI_CTRL, pAccessibilityElement != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pAccessibilityElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_TAB_T_TTS"); + pAccessibilityElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_MOVE_TO_CONTENT_T_TTS"); + + if (GetStyle() != _TAB_STYLE_ICON) + { + pAccessibilityElement->SetLabel(itemText); + } + + if (status == _TABITEM_STATUS_SELECTED) + { + pAccessibilityElement->SetStatusWithStringId("IDS_TPLATFORM_BODY_SELECTED_T_TTS"); + pAccessibilityElement->SetHintDisabled(true); + } + else + { + pAccessibilityElement->SetStatus(""); + pAccessibilityElement->SetHintDisabled(false); + } + + pContainer->AddElement(*pAccessibilityElement); + __accessibilityElements.Add(pAccessibilityElement); + + return; +} + +void +_Tab::InsertAccessibilityElementAt(int index, const FloatRectangle& itemBounds, const String& itemText, _TabItemStatus status) +{ + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + SysTryReturnVoidResult(NID_UI_CTRL, (pContainer != null), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _AccessibilityElement* pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true); + SysTryReturnVoidResult(NID_UI_CTRL, pAccessibilityElement != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pAccessibilityElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_TAB_T_TTS"); + pAccessibilityElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_MOVE_TO_CONTENT_T_TTS"); + + if (GetStyle() != _TAB_STYLE_ICON) + { + pAccessibilityElement->SetLabel(itemText); + } + + if (status == _TABITEM_STATUS_SELECTED) + { + pAccessibilityElement->SetStatusWithStringId("IDS_TPLATFORM_BODY_SELECTED_T_TTS"); + pAccessibilityElement->SetHintDisabled(true); + } + else + { + pAccessibilityElement->SetStatus(""); + pAccessibilityElement->SetHintDisabled(false); + } + + pContainer->InsertElement(*pAccessibilityElement, index); + __accessibilityElements.InsertAt(pAccessibilityElement, index); + + return; +} + +void +_Tab::RemoveAccessibilityElementAt(int index) +{ + _AccessibilityElement* pAccessibilityElement = null; + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + SysTryReturnVoidResult(NID_UI_CTRL, (pContainer != null), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + if ((__accessibilityElements.GetAt(index, pAccessibilityElement)) == E_SUCCESS) + { + __accessibilityElements.RemoveAt(index); + pContainer->RemoveElement(*pAccessibilityElement); + } + + return; +} + +void +_Tab::RemoveAllAccessibilityElement(void) +{ + _AccessibilityElement* pAccessibilityElement = null; + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + SysTryReturnVoidResult(NID_UI_CTRL, (pContainer != null), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + while (__accessibilityElements.GetCount() > 0) + { + if ((__accessibilityElements.GetAt(0, pAccessibilityElement)) == E_SUCCESS) + { + __accessibilityElements.RemoveAt(0); + pContainer->RemoveElement(*pAccessibilityElement); + } + } + + return; +} + +void +_Tab::UpdateAccessibilityElement(void) +{ + _TabItemStatus itemStatus = _TABITEM_STATUS_NORMAL; + _TabItem* pItem = null; + _AccessibilityElement* pAccessibilityElement = null; + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + SysTryReturnVoidResult(NID_UI_CTRL, (pContainer != null), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + int count = __accessibilityElements.GetCount(); + + FloatRectangle bounds(0.0f, 0.0f, 0.0f, 0.0f); + + for (int i = 0; i < count; i++) + { + if ((__accessibilityElements.GetAt(i, pAccessibilityElement)) == E_SUCCESS) + { + pItem = GetItemAt(i); + if (pItem != null) + { + bounds = pItem->GetItemBounds(); + itemStatus = pItem->GetStatus(); + } + + if (pAccessibilityElement != null) + { + pAccessibilityElement->SetBounds(bounds); + + if (itemStatus == _TABITEM_STATUS_SELECTED) + { + pAccessibilityElement->SetStatusWithStringId("IDS_TPLATFORM_BODY_SELECTED_T_TTS"); + pAccessibilityElement->SetHintDisabled(true); + } + else + { + pAccessibilityElement->SetStatus(""); + pAccessibilityElement->SetHintDisabled(false); + } + } + } + } + + return; +} + +void +_Tab::UpdateAccessibilityLabel(int index, const String& text) +{ + _AccessibilityElement* pAccessibilityElement = null; + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + SysTryReturnVoidResult(NID_UI_CTRL, (pContainer != null), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + if ((__accessibilityElements.GetAt(index, pAccessibilityElement)) == E_SUCCESS) + { + if (pAccessibilityElement != null) + { + pAccessibilityElement->SetLabel(text); + } + } + + return; +} + +void +_Tab::OnChangeLayout(_ControlOrientation orientation) +{ + __pTabPresenter->OnChangeLayout(orientation); + + return; +} + +bool +_Tab::OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_Tab::OnAccessibilityFocusMovedPrevious(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_Tab::OnAccessibilityReadingElement(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} +bool +_Tab::OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_Tab::OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + FloatRectangle bounds = element.GetBounds(); + + if (bounds.x < 0) + { + if (bounds.x == -bounds.width) + { + __pTabPresenter->MovePrevious(); + } + else + { + __pTabPresenter->MoveToFirst(); + } + } + else if (bounds.x + bounds.width > GetBounds().width) + { + if (bounds.x == GetBounds().width) + { + __pTabPresenter->MoveNext(); + } + else + { + __pTabPresenter->MoveToLast(bounds.x); + } + } + + return true; +} + +bool +_Tab::OnAccessibilityFocusOut(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_Tab::OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_Tab::OnAccessibilityValueIncreased(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_Tab::OnAccessibilityValueDecreased(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +}}} // Tizen::Ui::Controls + diff --git a/src/ui/controls/FUiCtrl_TabBar.cpp b/src/ui/controls/FUiCtrl_TabBar.cpp new file mode 100644 index 0000000..6dc49a7 --- /dev/null +++ b/src/ui/controls/FUiCtrl_TabBar.cpp @@ -0,0 +1,819 @@ +// +// 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_TabBar.cpp + * @brief This is the implementation file for the _TabBar class. + */ + + +#include +#include +#include "FUi_AccessibilityContainer.h" +#include "FUi_AccessibilityElement.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_ResourceManager.h" +#include "FUi_UiTouchEvent.h" + +#include "FUiCtrl_TabBar.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Ui; + +namespace Tizen { namespace Ui { namespace Controls +{ + +IMPLEMENT_PROPERTY(_TabBar); + +_TabBar::_TabBar() + : __pTabBarPresenter(null) + , __pActionEvent(null) +{ + GET_COLOR_CONFIG(TABBAR::BG_NORMAL, __color); + + GET_COLOR_CONFIG(TABBAR::ITEM_BG_NORMAL, __itemColor[ITEM_STATUS_NORMAL]); + GET_COLOR_CONFIG(TABBAR::ITEM_BG_SELECTED, __itemColor[ITEM_STATUS_SELECTED]); + GET_COLOR_CONFIG(TABBAR::ITEM_BG_PRESSED, __itemColor[ITEM_STATUS_PRESSED]); + GET_COLOR_CONFIG(TABBAR::ITEM_BG_DISABLED, __itemColor[ITEM_STATUS_DISABLED]); + + GET_COLOR_CONFIG(TABBAR::ITEM_TEXT_NORMAL, __itemTextColor[ITEM_STATUS_NORMAL]); + GET_COLOR_CONFIG(TABBAR::ITEM_TEXT_SELECTED, __itemTextColor[ITEM_STATUS_SELECTED]); + GET_COLOR_CONFIG(TABBAR::ITEM_TEXT_PRESSED, __itemTextColor[ITEM_STATUS_PRESSED]); + GET_COLOR_CONFIG(TABBAR::ITEM_TEXT_DISABLED, __itemTextColor[ITEM_STATUS_DISABLED]); +} + +_TabBar::~_TabBar(void) +{ + delete __pTabBarPresenter; + __pTabBarPresenter = null; + + if (__pActionEvent) + { + delete __pActionEvent; + __pActionEvent = null; + } + + RemoveAllAccessibilityElement(); +} + +_TabBar* +_TabBar::CreateTabBarN(void) +{ + _TabBar* pTabBar = new (std::nothrow) _TabBar(); + 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)); + + pTabBar->AcquireHandle(); + pTabBar->SetTouchPressThreshold(0.08f); + + if (pTabBar->GetAccessibilityContainer() != null) + { + pTabBar->GetAccessibilityContainer()->Activate(true); + pTabBar->GetAccessibilityContainer()->AddListener(*pTabBar); + } + + return pTabBar; + +CATCH: + delete pTabBar; + SetLastResult(r); + return null; +} + +result +_TabBar::Initialize(void) +{ + _TabBarPresenter* pTabBarPresenter = new (std::nothrow) _TabBarPresenter(*this); + 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)); + + r = SetPresenter(*pTabBarPresenter); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pTabBarPresenter->InitializeFont(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + +CATCH: + __pTabBarPresenter = null; + + delete pTabBarPresenter; + + return r; +} + +result +_TabBar::SetPresenter(const _TabBarPresenter& tabBarPresenter) +{ + __pTabBarPresenter = const_cast<_TabBarPresenter*>(&tabBarPresenter); + + return E_SUCCESS; +} + +result +_TabBar::AddItem(const String& text, int actionId) +{ + return __pTabBarPresenter->AddItem(text, actionId); +} + +result +_TabBar::InsertItemAt(int index, const String& text, int actionId) +{ + return __pTabBarPresenter->InsertItemAt(index, text, actionId); +} + +result +_TabBar::SetItemAt(int index, const String& text, int actionId) +{ + return __pTabBarPresenter->SetItemAt(index, text, actionId); +} + +result +_TabBar::RemoveItemAt(int index) +{ + return __pTabBarPresenter->RemoveItemAt(index); +} + +result +_TabBar::RemoveAllItems(void) +{ + return __pTabBarPresenter->RemoveAllItems(); +} + +result +_TabBar::SetPropertyColor(const Variant& color) +{ + result r = E_SUCCESS; + + r = __pTabBarPresenter->SetReplacementColor(color.ToColor()); + + if (r == E_SUCCESS) + { + __color = color.ToColor(); + } + + return r; +} + +Variant +_TabBar::GetPropertyColor(void) const +{ + return Variant(__color); +} + +result +_TabBar::SetColor(Color color) +{ + return SetProperty("color", Variant(color)); +} + +Color +_TabBar::GetColor(void) const +{ + Variant color = GetProperty("color"); + + return color.ToColor(); +} + +result +_TabBar::SetPropertyNormalItemColor(const Variant& color) +{ + result r = E_SUCCESS; + + r = __pTabBarPresenter->SetItemReplacementColor(ITEM_STATUS_NORMAL, color.ToColor()); + if (r == E_SUCCESS) + { + __itemColor[ITEM_STATUS_NORMAL] = color.ToColor(); + } + + return r; +} + +Variant +_TabBar::GetPropertyNormalItemColor(void) const +{ + return Variant(__itemColor[ITEM_STATUS_NORMAL]); +} + +result +_TabBar::SetPropertySelectedItemColor(const Variant& color) +{ + result r = E_SUCCESS; + + r = __pTabBarPresenter->SetItemReplacementColor(ITEM_STATUS_SELECTED, color.ToColor()); + if (r == E_SUCCESS) + { + __itemColor[ITEM_STATUS_SELECTED] = color.ToColor(); + } + + return r; +} + +Variant +_TabBar::GetPropertySelectedItemColor(void) const +{ + return Variant(__itemColor[ITEM_STATUS_SELECTED]); +} + +result +_TabBar::SetPropertyPressedItemColor(const Variant& color) +{ + result r = E_SUCCESS; + + r = __pTabBarPresenter->SetItemReplacementColor(ITEM_STATUS_PRESSED, color.ToColor()); + if (r == E_SUCCESS) + { + __itemColor[ITEM_STATUS_PRESSED] = color.ToColor(); + } + + return r; +} + +Variant +_TabBar::GetPropertyPressedItemColor(void) const +{ + return Variant(__itemColor[ITEM_STATUS_PRESSED]); +} + +result +_TabBar::SetPropertyDisabledItemColor(const Variant& color) +{ + result r = E_SUCCESS; + + r = __pTabBarPresenter->SetItemReplacementColor(ITEM_STATUS_DISABLED, color.ToColor()); + if (r == E_SUCCESS) + { + __itemColor[ITEM_STATUS_DISABLED] = color.ToColor(); + } + + return r; +} + +Variant +_TabBar::GetPropertyDisabledItemColor(void) const +{ + return Variant(__itemColor[ITEM_STATUS_DISABLED]); +} + +result +_TabBar::SetItemColor(_TabBarItemStatus itemStatus, Color color) +{ + result r = E_SUCCESS; + + if (itemStatus == ITEM_STATUS_NORMAL) + { + r = SetProperty("normalItemColor", Variant(color)); + } + else if (itemStatus == ITEM_STATUS_SELECTED) + { + r = SetProperty("selectedItemColor", Variant(color)); + } + else if (itemStatus == ITEM_STATUS_PRESSED) + { + r = SetProperty("pressedItemColor", Variant(color)); + } + else + { + r = SetProperty("disabledItemColor", Variant(color)); + } + + return r; +} + +Color +_TabBar::GetItemColor(_TabBarItemStatus itemStatus) const +{ + Color itemColor; + + if (itemStatus == ITEM_STATUS_NORMAL) + { + Variant color = GetProperty("normalItemColor"); + itemColor = color.ToColor(); + } + else if (itemStatus == ITEM_STATUS_SELECTED) + { + Variant color = GetProperty("selectedItemColor"); + itemColor = color.ToColor(); + } + else if (itemStatus == ITEM_STATUS_PRESSED) + { + Variant color = GetProperty("pressedItemColor"); + itemColor = color.ToColor(); + } + else + { + Variant color = GetProperty("disabledItemColor"); + itemColor = color.ToColor(); + } + + return itemColor; +} + +result +_TabBar::SetPropertyNormalItemTextColor(const Variant & color) +{ + __itemTextColor[ITEM_STATUS_NORMAL] = color.ToColor(); + + return E_SUCCESS; +} + +Variant +_TabBar::GetPropertyNormalItemTextColor(void) const +{ + return Variant(__itemTextColor[ITEM_STATUS_NORMAL]); +} + +result +_TabBar::SetPropertySelectedItemTextColor(const Variant & color) +{ + __itemTextColor[ITEM_STATUS_SELECTED] = color.ToColor(); + + return E_SUCCESS; +} + +Variant +_TabBar::GetPropertySelectedItemTextColor(void) const +{ + return Variant(__itemTextColor[ITEM_STATUS_SELECTED]); +} + +result +_TabBar::SetPropertyPressedItemTextColor(const Variant & color) +{ + __itemTextColor[ITEM_STATUS_PRESSED] = color.ToColor(); + + return E_SUCCESS; +} + +Variant +_TabBar::GetPropertyPressedItemTextColor(void) const +{ + return Variant(__itemTextColor[ITEM_STATUS_PRESSED]); +} + +result +_TabBar::SetPropertyDisabledItemTextColor(const Variant & color) +{ + __itemTextColor[ITEM_STATUS_DISABLED] = color.ToColor(); + + return E_SUCCESS; +} + +Variant +_TabBar::GetPropertyDisabledItemTextColor(void) const +{ + return Variant(__itemTextColor[ITEM_STATUS_DISABLED]); +} + +void +_TabBar::SetItemTextColor(_TabBarItemStatus status, Color color) +{ + Color itemTextColor; + result r = E_SUCCESS; + + if (status == ITEM_STATUS_NORMAL) + { + r = SetProperty("normalItemTextColor", Variant(color)); + } + else if (status == ITEM_STATUS_SELECTED) + { + r = SetProperty("selectedItemTextColor", Variant(color)); + } + else + { + r = SetProperty("pressedItemTextColor", Variant(color)); + } + + if (r != E_SUCCESS) + { + SysLogException(NID_UI_CTRL, E_INVALID_STATE, "Color is invalid."); + } + +} + +Color +_TabBar::GetItemTextColor(_TabBarItemStatus status) const +{ + Color itemTextColor; + + if (status == ITEM_STATUS_NORMAL) + { + Variant color = GetProperty("normalItemTextColor"); + itemTextColor = color.ToColor(); + } + else if (status == ITEM_STATUS_SELECTED) + { + Variant color = GetProperty("selectedItemTextColor"); + itemTextColor = color.ToColor(); + } + else if (status == ITEM_STATUS_PRESSED) + { + Variant color = GetProperty("pressedItemTextColor"); + itemTextColor = color.ToColor(); + } + else + { + Variant color = GetProperty("disabledItemTextColor"); + itemTextColor = color.ToColor(); + } + + return itemTextColor; +} + +result +_TabBar::SetItemSelected(int index) +{ + return __pTabBarPresenter->SetItemSelected(index); +} + +int +_TabBar::GetSelectedItemIndex(void) const +{ + return __pTabBarPresenter->GetSelectedItemIndex(); +} + +int +_TabBar::GetItemCount(void) const +{ + return __pTabBarPresenter->GetItemCount(); +} + +_TabBarItem* +_TabBar::GetItemFromPosition(const FloatPoint& position) const +{ + return __pTabBarPresenter->GetItemFromPosition(position); +} + +result +_TabBar::SetTopDrawnItemIndex(int index) +{ + return __pTabBarPresenter->SetTopDrawnItemIndex(index); +} + +result +_TabBar::SetWidth(float width) +{ + float height = 0.0f; + GET_SHAPE_CONFIG(TABBAR::HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, height); + + result r = SetSize(FloatDimension(width, height)); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + __pTabBarPresenter->ResetItemPositionX(); + + return r; +} + +void +_TabBar::AddActionEventListener(const _IActionEventListener& listener) +{ + ClearLastResult(); + + if (__pActionEvent == null) + { + __pActionEvent = _ActionEvent::CreateInstanceN(*this); + + if (__pActionEvent == null || IsFailed(GetLastResult())) + { + SysLog(NID_UI_CTRL, "[%s] System error occured.", GetErrorMessage(E_INVALID_STATE)); + SetLastResult(E_INVALID_STATE); + delete __pActionEvent; + return; + } + } + + SetLastResult(E_SUCCESS); + __pActionEvent->AddListener(listener); +} + +void +_TabBar::RemoveActionEventListener(const _IActionEventListener& listener) +{ + 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); +} + +bool +_TabBar::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pTabBarPresenter->OnTouchPressed(source, touchinfo); +} + +bool +_TabBar::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + bool eventFire = __pTabBarPresenter->OnTouchReleased(source, touchinfo); + FloatPoint touchPosition = touchinfo.GetCurrentPosition(); + + if (eventFire == true) + { + int index = __pTabBarPresenter->GetItemIndexFromPosition(touchPosition); + _TabBarItem* pItem = __pTabBarPresenter->GetItemAt(index); + if (pItem != null) + { + if (__pActionEvent) + { + IEventArg* pEventArg = _ActionEvent::CreateActionEventArgN(pItem->GetActionId()); + 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); + } + } + } + + return true; +} + +bool +_TabBar::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pTabBarPresenter->OnTouchCanceled(source, touchinfo); +} + +bool +_TabBar::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pTabBarPresenter->OnTouchMoved(source, touchinfo); +} + +void +_TabBar::OnFontChanged(Font* pFont) +{ + __pTabBarPresenter->OnFontChanged(pFont); +} + +void +_TabBar::OnFontInfoRequested(unsigned long& style, float& size) +{ + __pTabBarPresenter->OnFontInfoRequested(style, size); +} + +void +_TabBar::OnDraw(void) +{ + __pTabBarPresenter->Draw(); + SetAllAccessibilityElement(); +} + +void +_TabBar::OnBoundsChanged(void) +{ + __pTabBarPresenter->OnBoundsChanged(); +} + +bool +_TabBar::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) +{ + if (this != &source) + { + return false; + } + _KeyCode keyCode = keyInfo.GetKeyCode(); + int itemCount = __pTabBarPresenter->GetItemCount(); + if (itemCount == 0 || __isInFocusMode == false) + { + return false; + } + + if (keyCode == _KEY_RIGHT) + { + if (__currentPressedItemIndex < (itemCount - 1)) + { + if (__pTabBarPresenter->GetItemStatus(__currentPressedItemIndex) != ITEM_STATUS_SELECTED) + { + __pTabBarPresenter->SetItemStatus(__currentPressedItemIndex, ITEM_STATUS_NORMAL); + } + + __currentPressedItemIndex++; + + if (__pTabBarPresenter->GetItemStatus(__currentPressedItemIndex) != ITEM_STATUS_SELECTED) + { + __pTabBarPresenter->SetItemStatus(__currentPressedItemIndex, ITEM_STATUS_PRESSED); + } + __pTabBarPresenter->ShiftToFocusedItem(__currentPressedItemIndex, _FOCUS_DIRECTION_MOVE_RIGHT); + } + return true; + } + else if (keyCode == _KEY_LEFT) + { + if (__currentPressedItemIndex >= -1) + { + if (__pTabBarPresenter->GetItemStatus(__currentPressedItemIndex) != ITEM_STATUS_SELECTED) + { + __pTabBarPresenter->SetItemStatus(__currentPressedItemIndex, ITEM_STATUS_NORMAL); + } + if (__currentPressedItemIndex == -1) + { + __currentPressedItemIndex = 0; + } + if (__currentPressedItemIndex > 0) + { + __currentPressedItemIndex--; + } + if (__pTabBarPresenter->GetItemStatus(__currentPressedItemIndex) != ITEM_STATUS_SELECTED) + { + __pTabBarPresenter->SetItemStatus(__currentPressedItemIndex, ITEM_STATUS_PRESSED); + } + __pTabBarPresenter->ShiftToFocusedItem(__currentPressedItemIndex, _FOCUS_DIRECTION_MOVE_LEFT); + } + return true; + } + else if (keyCode == _KEY_ENTER && __currentPressedItemIndex != -1) + { + __pTabBarPresenter->SetItemStatus(__currentPressedItemIndex, ITEM_STATUS_SELECTED); + __pTabBarPresenter->SetItemSelected(__currentPressedItemIndex); + + _TabBarItem* pItem = __pTabBarPresenter->GetItemAt(__currentPressedItemIndex); + if (pItem != null) + { + if (__pActionEvent) + { + IEventArg* pEventArg = _ActionEvent::CreateActionEventArgN(pItem->GetActionId()); + 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); + } + } + + Invalidate(); + return true; + } + else if (keyCode == _KEY_DOWN || keyCode == _KEY_UP || keyCode == _KEY_TAB) + { + if (__pTabBarPresenter->GetItemStatus(__currentPressedItemIndex) == ITEM_STATUS_PRESSED) + { + __pTabBarPresenter->SetItemStatus(__currentPressedItemIndex, ITEM_STATUS_NORMAL); + } + Invalidate(); + } + + return false; +} + +bool +_TabBar::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) +{ + return false; +} + +void +_TabBar::OnDrawFocus(void) +{ + if (__pTabBarPresenter->GetItemCount() > 0) + { + __currentPressedItemIndex = 0; + } + else + { + __currentPressedItemIndex = -1; + } + + if (__pTabBarPresenter->GetItemStatus(__currentPressedItemIndex) != ITEM_STATUS_SELECTED) + { + __pTabBarPresenter->SetItemStatus(__currentPressedItemIndex, ITEM_STATUS_PRESSED); + } + + __pTabBarPresenter->ShiftToFocusedItem(__currentPressedItemIndex, _FOCUS_DIRECTION_MOVE_LEFT); + __isInFocusMode = true; + + return; +} + +void +_TabBar::OnFocusModeStateChanged(void) +{ + if (__pTabBarPresenter->GetItemStatus(__currentPressedItemIndex) == ITEM_STATUS_PRESSED) + { + __pTabBarPresenter->SetItemStatus(__currentPressedItemIndex, ITEM_STATUS_NORMAL); + } + + __currentPressedItemIndex = -1; + __isInFocusMode = false; + + Invalidate(); +} + +_AccessibilityElement* +_TabBar::GetAccessibilityElement(const int mainIndex) const +{ + _AccessibilityElement* pElement = null; + result r = __accessibilityElements.GetAt(mainIndex, pElement); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed at AccessibiltyElement.", GetErrorMessage(r)); + + return pElement; + +CATCH: + delete pElement; + + return null; +} + +void +_TabBar::AddAccessibilityElement(const _AccessibilityElement& element) +{ + __accessibilityElements.Add(const_cast<_AccessibilityElement*>(&element)); +} + +void +_TabBar::SetAllAccessibilityElement(void) +{ + __pTabBarPresenter->SetAllAccessibilityElement(); +} + +void +_TabBar::RemoveAllAccessibilityElement(void) +{ + while (__accessibilityElements.GetCount() > 0) + { + _AccessibilityElement* pElement = null; + if (__accessibilityElements.GetAt(0, pElement) == E_SUCCESS) + { + pElement->GetParent()->RemoveElement(*pElement); + __accessibilityElements.RemoveAt(0); + } + } +} + +bool +_TabBar::OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return __pTabBarPresenter->OnAccessibilityFocusMovedNext(control, element); +} + +bool +_TabBar::OnAccessibilityFocusMovedPrevious(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return __pTabBarPresenter->OnAccessibilityFocusMovedPrevious(control, element); +} + +bool +_TabBar::OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return __pTabBarPresenter->OnAccessibilityReadElement(control, element); +} + +bool +_TabBar::OnAccessibilityReadingElement(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return __pTabBarPresenter->OnAccessibilityReadingElement(control, element); +} + +bool +_TabBar::OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return __pTabBarPresenter->OnAccessibilityFocusIn(control, element); +} + +bool +_TabBar::OnAccessibilityFocusOut(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return __pTabBarPresenter->OnAccessibilityFocusOut(control, element); +} + +bool +_TabBar::OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return __pTabBarPresenter->OnAccessibilityActionPerformed(control, element); +} + +bool +_TabBar::OnAccessibilityValueIncreased(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return __pTabBarPresenter->OnAccessibilityValueIncreased(control, element); +} + +bool +_TabBar::OnAccessibilityValueDecreased(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return __pTabBarPresenter->OnAccessibilityValueDecreased(control, element); +} + +bool +_TabBar::OnAccessibilityItemRefreshed(const _AccessibilityContainer& control, const _AccessibilityElement& element, _AccessibilityFocusDirection direction) +{ + return __pTabBarPresenter->OnAccessibilityItemRefreshed(control, element, direction); +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_TabBarImpl.cpp b/src/ui/controls/FUiCtrl_TabBarImpl.cpp new file mode 100644 index 0000000..d344543 --- /dev/null +++ b/src/ui/controls/FUiCtrl_TabBarImpl.cpp @@ -0,0 +1,447 @@ +// +// 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. +// + +#include +#include +#include +#include "FUiCtrl_TabBarImpl.h" +#include "FUiCtrl_TabBarItem.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_ResourceSizeInfo.h" +#include "FUi_ResourceManager.h" + +//UiBuilder +#include +#include "FUi_UiBuilder.h" + +using namespace Tizen::Ui; +using namespace Tizen::Graphics; +using namespace Tizen::Base; +using namespace Tizen::Ui; +using namespace Runtime; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_TabBarImpl* +_TabBarImpl::GetInstance(TabBar& tabBar) +{ + return static_cast<_TabBarImpl*> (tabBar._pControlImpl); +} + +const _TabBarImpl* +_TabBarImpl::GetInstance(const TabBar& tabBar) +{ + return static_cast (tabBar._pControlImpl); +} + +_TabBarImpl::_TabBarImpl(TabBar* pTabBar, _TabBar* pCore) + : _ControlImpl(pTabBar, pCore) + , __pPublicActionEvent(null) +{ +} + +_TabBarImpl::~_TabBarImpl(void) +{ + if (__pPublicActionEvent) + { + delete __pPublicActionEvent; + __pPublicActionEvent = null; + } +} + +_TabBarImpl* +_TabBarImpl::CreateTabBarImplN(TabBar* pTabBar, const FloatRectangle& bounds) +{ + ClearLastResult(); + 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); + + result r = E_SUCCESS; + + _TabBar* pCore = _TabBar::CreateTabBarN(); + SysTryReturn(NID_UI_CTRL, pCore != null, null, GetLastResult(), "[%s] Memory allocation failed.", GetErrorMessage(GetLastResult())); + + _TabBarImpl* pImpl = new (std::nothrow) _TabBarImpl(pTabBar, pCore); + 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] Failed to set bounds.", GetErrorMessage(r)); + + r = pImpl->SetMinimumSize(FloatDimension(pImpl->GetMinimumSizeF().width, height)); + 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] Failed to set maximum size.", GetErrorMessage(r)); + + return pImpl; + +CATCH: + delete pImpl; + + return null; +} + +result +_TabBarImpl::AddItem(const String& text, int actionId) +{ + int itemMaxCnt = 0; + + 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 String& text, int actionId) +{ + int itemMaxCnt = 0; + + 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); +} + +Color +_TabBarImpl::GetColor(void) const +{ + return GetCore().GetColor(); +} + +int +_TabBarImpl::GetItemCount(void) const +{ + return GetCore().GetItemCount(); +} + +Color +_TabBarImpl::GetSelectedItemColor(void) const +{ + return GetCore().GetItemColor(ITEM_STATUS_SELECTED); +} + +Color +_TabBarImpl::GetItemTextColor(TabBarItemStatus status) const +{ + if (status == TAB_BAR_ITEM_STATUS_NORMAL) + { + return GetCore().GetItemTextColor(ITEM_STATUS_NORMAL); + } + else if (status == TAB_BAR_ITEM_STATUS_SELECTED) + { + return GetCore().GetItemTextColor(ITEM_STATUS_SELECTED); + } + + return Color(0); +} + +int +_TabBarImpl::GetSelectedItemIndex(void) const +{ + return GetCore().GetSelectedItemIndex(); +} + +result +_TabBarImpl::RemoveItemAt(int 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); +} + +result +_TabBarImpl::RemoveAllItems(void) +{ + return GetCore().RemoveAllItems(); +} + +result +_TabBarImpl::SetColor(const Color& color) +{ + return GetCore().SetColor(color); +} + +result +_TabBarImpl::SetItemAt(int index, const String& text, int actionId) +{ + 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); +} + +result +_TabBarImpl::SetItemSelected(int 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 Color& color) +{ + if (status == TAB_BAR_ITEM_STATUS_NORMAL) + { + GetCore().SetItemTextColor(ITEM_STATUS_NORMAL, color); + } + else if (status == TAB_BAR_ITEM_STATUS_SELECTED) + { + GetCore().SetItemTextColor(ITEM_STATUS_SELECTED, color); + } + + return E_SUCCESS; +} + +result +_TabBarImpl::SetSelectedItemColor(const Color& color) +{ + return GetCore().SetItemColor(ITEM_STATUS_SELECTED, color); +} + +result +_TabBarImpl::SetWidth(float width) +{ + return GetCore().SetWidth(width); +} + +void +_TabBarImpl::AddActionEventListener(IActionEventListener& listener) +{ + ClearLastResult(); + + if (__pPublicActionEvent == null) + { + __pPublicActionEvent = _PublicActionEvent::CreateInstanceN(GetPublic()); + + if (__pPublicActionEvent == null || IsFailed(GetLastResult())) + { + SysLogException(NID_UI_CTRL, E_INVALID_STATE, "[%s] __pPublicActionEvent must not be null.", GetErrorMessage(E_INVALID_STATE)); + SetLastResult(E_INVALID_STATE); + delete __pPublicActionEvent; + return; + } + } + + SetLastResult(E_SUCCESS); + + __pPublicActionEvent->AddListener(listener); + + GetCore().AddActionEventListener(*this); +} + +void +_TabBarImpl::RemoveActionEventListener(IActionEventListener& listener) +{ + 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); + + GetCore().RemoveActionEventListener(*this); +} + +TabBar& +_TabBarImpl::GetPublic(void) +{ + return static_cast (_ControlImpl::GetPublic()); +} + +const TabBar& +_TabBarImpl::GetPublic(void) const +{ + return static_cast (_ControlImpl::GetPublic()); +} + +const char* +_TabBarImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Controls::TabBar"; +} + +const _TabBar& +_TabBarImpl::GetCore(void) const +{ + return static_cast (_ControlImpl::GetCore()); +} + +_TabBar& +_TabBarImpl::GetCore(void) +{ + return static_cast <_TabBar&>(_ControlImpl::GetCore()); +} + +void +_TabBarImpl::OnActionPerformed(const _Control& source, int actionId) +{ + if (__pPublicActionEvent != null) + { + __pPublicActionEvent->Fire(*_PublicActionEvent::CreateActionEventArgN(actionId)); + } +} + +class _TabBarMaker + : public _UiBuilderControlMaker +{ +public: + _TabBarMaker(_UiBuilder* uibuilder) + : _UiBuilderControlMaker(uibuilder){}; + virtual ~_TabBarMaker(){}; + + static _UiBuilderControlMaker* + GetInstance(_UiBuilder* uibuilder) + { + _TabBarMaker* pTabBarMaker = new (std::nothrow) _TabBarMaker(uibuilder); + SysTryReturn(NID_UI_CTRL, pTabBarMaker != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + return pTabBarMaker; + }; +protected: + virtual Control* + Make(_UiBuilderControl* pControl) + { + result r = E_SUCCESS; + _UiBuilderControlLayout* pControlProperty = null; + TabBar* pTabBar = null; + FloatRectangle rect; + String elementString; + int opacity = 0; + Color color; + + GetProperty(pControl, &pControlProperty); + if (pControlProperty == null) + { + return null; + } + + rect = pControlProperty->GetRectF(); + + //Construct + pTabBar = new (std::nothrow) TabBar(); + 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) + { + delete pTabBar; + return null; + } + //tabBar item.. + rect = pTabBar->GetBoundsF(); + + if (pControl->GetElement(L"BGColorOpacity", elementString) == true) + { + Base::Integer::Parse(elementString, opacity); + } + + if (pControl->GetElement(L"BGColor", elementString) == true) + { + ConvertStringToColor32(elementString, opacity, color); + pTabBar->SetColor(color); + } + + if (pControl->GetElement(L"backgroundColorOpacity", elementString) == true) + { + Base::Integer::Parse(elementString, opacity); + } + + if (pControl->GetElement(L"backgroundColor", elementString) == true) + { + ConvertStringToColor32(elementString, opacity, color); + pTabBar->SetColor(color); + } + + if (pControl->GetElement(L"normalItemTextColor", elementString) == true) + { + ConvertStringToColor(elementString, color); + pTabBar->SetItemTextColor(TAB_BAR_ITEM_STATUS_NORMAL, color); + } + + if (pControl->GetElement(L"selectedItemTextColor", elementString) == true) + { + ConvertStringToColor(elementString, color); + pTabBar->SetItemTextColor(TAB_BAR_ITEM_STATUS_SELECTED, color); + } + + if (pControl->GetElement(L"selectedItemColor", elementString) == true) + { + ConvertStringToColor(elementString, color); + pTabBar->SetSelectedItemColor(color); + } + + int itemCnt = pControl->GetItemCount(); + for (int i = 0; i < itemCnt; i++) + { + TabBarItem tabBarItem; + int actionId = 0; + if (pControl->GetItemElement(i, "actionId", elementString)) + { + Base::Integer::Parse(elementString, actionId); + } + + if (pControl->GetItemElement(i, "text", elementString)) + { + tabBarItem.Construct(elementString, actionId); + } + pTabBar->AddItem(tabBarItem); + + if (pControl->GetElement(L"accessibilityHint", elementString)) + { + AccessibilityContainer* pContainer = pTabBar->GetAccessibilityContainer(); + if (pContainer) + { + AccessibilityElement* pElement = pContainer->GetElement(L"Category" + Base::Integer::ToString(i+1)); + if (pElement) + { + pElement->SetHint(elementString); + } + } + } + } + + rect = (pControl->GetAttribute(UIBUILDER_ATTRIBUTE_PORTRAIT))->GetRectF(); + (pControl->GetAttribute(UIBUILDER_ATTRIBUTE_PORTRAIT))->SetRect(rect.x, rect.y, rect.width, rect.height); + + rect = (pControl->GetAttribute(UIBUILDER_ATTRIBUTE_LANDSCAPE))->GetRectF(); + (pControl->GetAttribute(UIBUILDER_ATTRIBUTE_LANDSCAPE))->SetRect(rect.x, rect.y, rect.width, rect.height); + + /*r = AddControl(pControl, pTabBar); + if (r != E_SUCCESS) + { + delete pTabBar; + return null; + } +*/ + return pTabBar; + } +}; + +_TabBarRegister::_TabBarRegister() +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->RegisterControl(L"TabBar", _TabBarMaker::GetInstance); +} +_TabBarRegister::~_TabBarRegister() +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->UnregisterControl(L"TabBar"); +} +static _TabBarRegister TabBarRegisterToUiBuilder; +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_TabBarItem.cpp b/src/ui/controls/FUiCtrl_TabBarItem.cpp new file mode 100644 index 0000000..f4252e3 --- /dev/null +++ b/src/ui/controls/FUiCtrl_TabBarItem.cpp @@ -0,0 +1,141 @@ +// +// 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_TabBarItem.cpp + * @brief This is the implementation file for the _TabBarItem class. + */ + + +#include +#include +#include "FUiCtrl_TabBarItem.h" +#include "FUi_ResourceManager.h" +#include "FUi_AccessibilityElement.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Ui; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_TabBarItem::_TabBarItem(_ControlOrientation orientation) + : __actionId(-1) + , __text(L"") + , __status(ITEM_STATUS_MAX) + , __pElement(null) +{ + __bounds.x = 0.0f; + GET_SHAPE_CONFIG(TABBAR::TOP_MARGIN, orientation, __bounds.y); + GET_SHAPE_CONFIG(TABBAR::ITEM_MIN_WIDTH, orientation, __bounds.width); + GET_SHAPE_CONFIG(TABBAR::ITEM_HEIGHT, orientation, __bounds.height); +} + + +_TabBarItem::~_TabBarItem(void) +{ +} + + +void +_TabBarItem::SetActionId(int actionId) +{ + __actionId = actionId; +} + +int +_TabBarItem::GetActionId(void) const +{ + return __actionId; +} + +void +_TabBarItem::SetText(const String& text, _ControlOrientation orientation) +{ + float fontSize = 0.0f; + GET_SHAPE_CONFIG(TABBAR::FONT_SIZE, orientation, fontSize); + FloatDimension bounds(0.0f, 0.0f); + + float minWidth = 0.0f; + float maxWidth = 0.0f; + float fontMargin = 0.0f; + GET_SHAPE_CONFIG(TABBAR::ITEM_MIN_WIDTH, orientation, minWidth); + GET_SHAPE_CONFIG(TABBAR::ITEM_MAX_WIDTH, orientation, maxWidth); + GET_SHAPE_CONFIG(TABBAR::FONT_MARGIN, orientation, fontMargin); + + Font font; + font.Construct(FONT_STYLE_BOLD, fontSize); + font.GetTextExtent(text, text.GetLength(), bounds); + + bounds.width += 2.0f * fontMargin; + __bounds.width = bounds.width; + + if (bounds.width < minWidth) + { + __bounds.width = minWidth; + } + + if (bounds.width > maxWidth) + { + __bounds.width = maxWidth; + } + + __text = text; +} + +String +_TabBarItem::GetText(void) const +{ + return __text; +} + +void +_TabBarItem::SetStatus(_TabBarItemStatus status) +{ + __status = status; +} + +_TabBarItemStatus +_TabBarItem::GetStatus(void) const +{ + return __status; +} + +void +_TabBarItem::SetBounds(const FloatRectangle& bounds) +{ + __bounds = bounds; +} + +FloatRectangle +_TabBarItem::GetBounds(void) const +{ + return __bounds; +} + +void +_TabBarItem::SetAccessibilityElement(_AccessibilityElement* pElement) +{ + __pElement = pElement; +} + +_AccessibilityElement* +_TabBarItem::GetAccessibilityElement(void) +{ + return __pElement; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_TabBarItemImpl.cpp b/src/ui/controls/FUiCtrl_TabBarItemImpl.cpp new file mode 100644 index 0000000..db6aa12 --- /dev/null +++ b/src/ui/controls/FUiCtrl_TabBarItemImpl.cpp @@ -0,0 +1,67 @@ +// +// 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_TabBarItemImpl.cpp +* @brief This file contains implementation of _TabBarItemImpl class +*/ + +#include "FUiCtrl_TabBarItemImpl.h" + + +namespace Tizen { namespace Ui { namespace Controls +{ + +_TabBarItemImpl::_TabBarItemImpl(void) + : __text(L"") + , __actionId(-1) +{ + // Do nothing + +} + +_TabBarItemImpl::~_TabBarItemImpl(void) +{ + // Do nothing + +} + +void +_TabBarItemImpl::SetText(const Tizen::Base::String& text) +{ + __text = text; +} + +Tizen::Base::String +_TabBarItemImpl::GetText(void) const +{ + return __text; +} + +void +_TabBarItemImpl::SetActionId(int actionId) +{ + __actionId = actionId; +} + +int +_TabBarItemImpl::GetActionId(void) const +{ + return __actionId; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_TabBarModel.cpp b/src/ui/controls/FUiCtrl_TabBarModel.cpp new file mode 100644 index 0000000..20500b7 --- /dev/null +++ b/src/ui/controls/FUiCtrl_TabBarModel.cpp @@ -0,0 +1,259 @@ +// +// 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_TabBarModel.cpp + * @brief This is the implementation file for the _TabBarModel class. + */ + +#include +#include +#include "FUiCtrl_TabBarModel.h" + + +using namespace Tizen::Graphics; +using namespace Tizen::Base; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_TabBarModel::_TabBarModel(void) + : __selectedItemIndex(0) + , __firstDrawnItemIndex(0) + , __lastDrawnItemIndex(0) + , __widthOfAllItems(0.0f) +{ + __tabBarItems.Construct(); +} + +_TabBarModel::~_TabBarModel(void) +{ + __tabBarItems.RemoveAll(true); +} + +void +_TabBarModel::SetSelectedItemIndex(int index) +{ + __selectedItemIndex = index; +} + +int +_TabBarModel::GetSelectedItemIndex(void) const +{ + return __selectedItemIndex; +} + +void +_TabBarModel::SetFirstDrawnItemIndex(int index) +{ + __firstDrawnItemIndex = index; +} + +int +_TabBarModel::GetFirstDrawnItemIndex(void) const +{ + return __firstDrawnItemIndex; +} + +void +_TabBarModel::SetLastDrawnItemIndex(int index) +{ + __lastDrawnItemIndex = index; +} + +int +_TabBarModel::GetLastDrawnItemIndex(void) const +{ + return __lastDrawnItemIndex; +} + +int +_TabBarModel::GetItemCount(void) const +{ + return __tabBarItems.GetCount(); +} + +float +_TabBarModel::GetWidthOfAllItems(void) const +{ + return __widthOfAllItems; +} + +result +_TabBarModel::AddItem(const String& text, int actionId, _ControlOrientation orientation) +{ + _TabBarItem* pItem = new (std::nothrow) _TabBarItem(orientation); + SysTryReturnResult(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, "Memory allocation failed."); + + pItem->SetText(text, orientation); + pItem->SetActionId(actionId); + int itemCount = __tabBarItems.GetCount(); + + if (itemCount > 0) + { + pItem->SetStatus(ITEM_STATUS_NORMAL); + } + else + { + pItem->SetStatus(ITEM_STATUS_SELECTED); + __selectedItemIndex = 0; + } + + _TabBarItem* pPreviousItem = GetItemAt(itemCount - 1); + FloatRectangle itemBounds = pItem->GetBounds(); + if (pPreviousItem != null) + { + FloatRectangle previousItemBounds = pPreviousItem->GetBounds(); + float itemMargin = 0.0f; + GET_SHAPE_CONFIG(TABBAR::ITEM_MARGIN, orientation, itemMargin); + itemBounds.x = previousItemBounds.x + previousItemBounds.width + itemMargin; + __widthOfAllItems += itemMargin; + } + else + { + float arrowMargin = 0.0f; + GET_SHAPE_CONFIG(TABBAR::ARROW_MARGIN, orientation, arrowMargin); + itemBounds.x += arrowMargin; + } + pItem->SetBounds(itemBounds); + __widthOfAllItems += itemBounds.width; + + return __tabBarItems.Add(*pItem); +} + +result +_TabBarModel::InsertItemAt(int index, const String& text, int actionId, _ControlOrientation orientation) +{ + 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); + SysTryReturnResult(NID_UI_CTRL, pItem != null, E_OUT_OF_MEMORY, "Memory allocation failed."); + + pItem->SetText(text, orientation); + pItem->SetActionId(actionId); + + _TabBarItem* pPreviousItem = GetItemAt(index - 1); + FloatRectangle itemBounds = pItem->GetBounds(); + if (pPreviousItem != null) + { + FloatRectangle previousItemBounds = pPreviousItem->GetBounds(); + float itemMargin = 0.0f; + GET_SHAPE_CONFIG(TABBAR::ITEM_MARGIN, orientation, itemMargin); + itemBounds.x = previousItemBounds.x + previousItemBounds.width + itemMargin; + pItem->SetBounds(itemBounds); + } + + result r = __tabBarItems.InsertAt(*pItem, index); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = ReCalculateItemPosition(index + 1, orientation); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return E_SUCCESS; +} + +result +_TabBarModel::SetItemAt(int index, const String& text, int actionId, _ControlOrientation orientation) +{ + _TabBarItem* pItem = static_cast <_TabBarItem*>(__tabBarItems.GetAt(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); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return E_SUCCESS; +} + +result +_TabBarModel::RemoveItemAt(int index, _ControlOrientation orientation) +{ + _TabBarItem* pItem = static_cast <_TabBarItem*>(__tabBarItems.GetAt(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); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = ReCalculateItemPosition(index, orientation); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return E_SUCCESS; +} + +void +_TabBarModel::RemoveAllItems(void) +{ + __widthOfAllItems = 0.0f; + __tabBarItems.RemoveAll(true); +} + +_TabBarItem* +_TabBarModel::GetItemAt(int index) const +{ + const _TabBarItem* pItem = static_cast (__tabBarItems.GetAt(index)); + + return const_cast<_TabBarItem*>(pItem); +// return static_cast <_TabBarItem*>(__tabBarItems.GetAt(index)); +} + +result +_TabBarModel::ReCalculateItemPosition(int itemIndex, _ControlOrientation orientation) +{ + 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); + + _TabBarItem* pPreviousItem = null; + _TabBarItem* pCurrentItem = null; + FloatRectangle previousItemBounds; + FloatRectangle currentItemBounds; + for (int i = itemIndex; i < itemCount; i++) + { + pPreviousItem = GetItemAt(i - 1); + pCurrentItem = GetItemAt(i); + if (pCurrentItem == null) + { + break; + } + if (pPreviousItem == null) + { + previousItemBounds.SetBounds(0.0f, 0.0f, 0.0f, 0.0f); + } + else + { + previousItemBounds = pPreviousItem->GetBounds(); + } + currentItemBounds = pCurrentItem->GetBounds(); + currentItemBounds.x = previousItemBounds.x + previousItemBounds.width + itemMargin; + + pCurrentItem->SetBounds(currentItemBounds); + } + __widthOfAllItems = currentItemBounds.x + currentItemBounds.width; + + return E_SUCCESS; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_TabBarPresenter.cpp b/src/ui/controls/FUiCtrl_TabBarPresenter.cpp new file mode 100644 index 0000000..25e362b --- /dev/null +++ b/src/ui/controls/FUiCtrl_TabBarPresenter.cpp @@ -0,0 +1,1167 @@ +// +// 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_TabBarPresenter.cpp + * @brief This is the implementation file for the _TabBarPresenter class. + */ + + +#include +#include +#include +#include +#include +#include "FUi_AccessibilityContainer.h" +#include "FUi_AccessibilityElement.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_Math.h" +#include "FUi_ResourceManager.h" +#include "FUi_UiTouchEvent.h" + +#include "FUiCtrl_TabBarPresenter.h" + + +using namespace Tizen::Ui; +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Graphics::_Text; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_TabBarPresenter::_TabBarPresenter(_TabBar& tabBar) + : __tabBar(tabBar) + , __pTabBarModel(null) + , __pFont(null) + , __pTextObject(null) + , __startPosition(FloatPoint(0.0f, 0.0f)) + , __pressedItemIndex(-1) + , __touchMoved(false) + , __touchBubblingBlocked(true) + , __topMargin(0.0f) + , __sideMargin(0.0f) + , __itemMargin(0.0f) + , __arrowMargin(0.0f) + , __itemMaxWidth(0.0f) + , __pBgBitmapCached(null) + , __pBgEffectBitmapCached(null) + , __pLeftArrowBitmapCached(null) + , __pRightArrowBitmapCached(null) +{ + for (int i = 0; i < ITEM_STATUS_MAX; i++) + { + __pItemBgBitmapCached[i] = null; + } + + GET_SHAPE_CONFIG(TABBAR::TOP_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __topMargin); + GET_SHAPE_CONFIG(TABBAR::SIDE_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __sideMargin); + GET_SHAPE_CONFIG(TABBAR::ITEM_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __itemMargin); + GET_SHAPE_CONFIG(TABBAR::ARROW_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, __arrowMargin); + GET_SHAPE_CONFIG(TABBAR::ITEM_MAX_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, __itemMaxWidth); +} + +_TabBarPresenter::~_TabBarPresenter(void) +{ + delete __pTabBarModel; + __pTabBarModel = null; + + if (__pTextObject) + { + __pTextObject->RemoveAll(); + delete __pTextObject; + __pTextObject = null; + } + + delete __pBgBitmapCached; + __pBgBitmapCached = null; + + delete __pBgEffectBitmapCached; + __pBgEffectBitmapCached = null; + + for (int i = 0; i < ITEM_STATUS_MAX; i++) + { + delete __pItemBgBitmapCached[i]; + __pItemBgBitmapCached[i] = null; + } + + delete __pLeftArrowBitmapCached; + __pLeftArrowBitmapCached = null; + + delete __pRightArrowBitmapCached; + __pRightArrowBitmapCached = null; +} + +result +_TabBarPresenter::Construct(void) +{ + __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, , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + return r; + +CATCH: + delete __pTabBarModel; + __pTabBarModel = null; + + return r; +} + +result +_TabBarPresenter::InitializeFont(void) +{ + result r = E_SUCCESS; + __pFont = __tabBar.GetFallbackFont(); + 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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + __pTextObject->Construct(); + __pTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_CENTER | TEXT_OBJECT_ALIGNMENT_MIDDLE); + __pTextObject->SetFont(__pFont, 0, __pTextObject->GetTextLength()); + + return E_SUCCESS; + +CATCH: + delete __pTextObject; + __pTextObject = null; + + return r; +} + +void +_TabBarPresenter::OnFontChanged(Font* pFont) +{ + __pFont = pFont; +} + +void +_TabBarPresenter::OnFontInfoRequested(unsigned long& style, float& size) +{ + float fontSize = 0.0f; + GET_SHAPE_CONFIG(TABBAR::FONT_SIZE, __tabBar.GetOrientation(), fontSize); + + style = FONT_STYLE_PLAIN; + size = fontSize; +} + +result +_TabBarPresenter::LoadBitmap(void) +{ + + Color arrowColor; + bool isCustomColor; + GET_COLOR_CONFIG(TABBAR::ARROW_BG_NORMAL, arrowColor); + + if (__pBgBitmapCached != null) + { + delete __pBgBitmapCached; + __pBgBitmapCached = null; + } + + if (__pBgEffectBitmapCached != null) + { + delete __pBgEffectBitmapCached; + __pBgEffectBitmapCached = null; + } + + if (__pLeftArrowBitmapCached != null) + { + delete __pLeftArrowBitmapCached; + __pLeftArrowBitmapCached = null; + } + + if (__pRightArrowBitmapCached == null) + { + delete __pRightArrowBitmapCached; + __pRightArrowBitmapCached = null; + } + + for (int i = 0; i < ITEM_STATUS_MAX; i++) + { + if (__pItemBgBitmapCached[i] != null) + { + delete __pItemBgBitmapCached[i]; + __pItemBgBitmapCached[i] = null; + } + } + + result r; + 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_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)); + + 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)); + + 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)); + + 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)); + + 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)); + + + return E_SUCCESS; + +CATCH: + + delete __pBgBitmapCached; + __pBgBitmapCached = null; + + delete __pLeftArrowBitmapCached; + __pLeftArrowBitmapCached = null; + + delete __pRightArrowBitmapCached; + __pRightArrowBitmapCached = null; + + for (int i = 0; i < ITEM_STATUS_MAX; i++) + { + delete __pItemBgBitmapCached[i]; + __pItemBgBitmapCached[i] = null; + } + + return E_OUT_OF_MEMORY; +} + +result +_TabBarPresenter::AddItem(const String& text, int actionId) +{ + return __pTabBarModel->AddItem(text, actionId, _CONTROL_ORIENTATION_PORTRAIT); +} + +result +_TabBarPresenter::InsertItemAt(int index, const String& text, int actionId) +{ + if (index <= __pTabBarModel->GetSelectedItemIndex()) + { + if (__pTabBarModel->GetItemCount() != 0) + { + __pTabBarModel->SetSelectedItemIndex(GetSelectedItemIndex() + 1); + } + } + + result r = __pTabBarModel->InsertItemAt(index, text, actionId, _CONTROL_ORIENTATION_PORTRAIT); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return E_SUCCESS; +} + +result +_TabBarPresenter::SetItemAt(int index, const String& text, int actionId) +{ + return __pTabBarModel->SetItemAt(index, text, actionId, _CONTROL_ORIENTATION_PORTRAIT); +} + +_TabBarItem* +_TabBarPresenter::GetItemAt(int index) const +{ + _TabBarItem* pItem = __pTabBarModel->GetItemAt(index); + return pItem; +} + +result +_TabBarPresenter::RemoveItemAt(int index) +{ + if (index <= GetSelectedItemIndex()) + { + if (__pTabBarModel->GetItemCount() != 0 && GetSelectedItemIndex() != 0) + { + __pTabBarModel->SetSelectedItemIndex(GetSelectedItemIndex() - 1); + } + } + + result r = __pTabBarModel->RemoveItemAt(index, _CONTROL_ORIENTATION_PORTRAIT); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + if (GetItemCount() != 0) + { + r = SetItemSelected(0); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + else + { + __pTabBarModel->SetSelectedItemIndex(0); + } + + return E_SUCCESS; +} + +result +_TabBarPresenter::RemoveAllItems(void) +{ + __pTabBarModel->RemoveAllItems(); + return E_SUCCESS; +} + +result +_TabBarPresenter::SetItemSelected(int index) +{ + + 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) + { + return E_SUCCESS; + } + _TabBarItem* pItem = GetItemAt(oldSelectedItemIndex); + result r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + pItem->SetStatus(ITEM_STATUS_NORMAL); + _AccessibilityElement* pElement = pItem->GetAccessibilityElement(); + if(pElement != null) + { + pElement->SetStatus(L""); + pElement->SetHintDisabled(false); + } + + pItem = GetItemAt(index); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + pItem->SetStatus(ITEM_STATUS_SELECTED); + pElement = pItem->GetAccessibilityElement(); + if(pElement != null) + { + pElement->SetStatusWithStringId("IDS_TPLATFORM_BODY_SELECTED_T_TTS"); + 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; +} + +int +_TabBarPresenter::GetSelectedItemIndex(void) const +{ + return __pTabBarModel->GetSelectedItemIndex(); +} + +int +_TabBarPresenter::GetItemCount(void) const +{ + return __pTabBarModel->GetItemCount(); +} + +int +_TabBarPresenter::GetItemIndexFromPosition(const FloatPoint& point) const +{ + FloatRectangle clientBounds = __tabBar.GetBoundsF(); + + if (point.x < __sideMargin + || point.x > clientBounds.width - __sideMargin + || point.y < __topMargin + || point.y > clientBounds.height - __topMargin) + { + return -1; + } + + int itemIndex = __pTabBarModel->GetFirstDrawnItemIndex(); + _TabBarItem* pItem = __pTabBarModel->GetItemAt(itemIndex); + + while (pItem != null) + { + FloatRectangle itemBounds = pItem->GetBounds(); + + if (point.x - __sideMargin > itemBounds.x + && point.x - __sideMargin < itemBounds.x + itemBounds.width + && point.y - __topMargin > itemBounds.y + && point.y - __topMargin < itemBounds.y + itemBounds.height) + { + return itemIndex; + } + itemIndex++; + pItem = __pTabBarModel->GetItemAt(itemIndex); + } + + return -1; +} + +int +_TabBarPresenter::GetItemIndexFromAbsPosition(const FloatPoint& point) const +{ + FloatRectangle clientBounds = __tabBar.GetBoundsF(); + + int itemIndex = 0; + _TabBarItem* pItem = __pTabBarModel->GetItemAt(itemIndex); + + while (pItem != null) + { + FloatRectangle itemBounds = pItem->GetBounds(); + + if (point.x - __sideMargin > itemBounds.x + && point.x - __sideMargin < itemBounds.x + itemBounds.width + && point.y - __topMargin > itemBounds.y + && point.y - __topMargin < itemBounds.y + itemBounds.height) + { + return itemIndex; + } + itemIndex++; + pItem = __pTabBarModel->GetItemAt(itemIndex); + } + + return -1; +} + +_TabBarItem* +_TabBarPresenter::GetItemFromPosition(const FloatPoint& position) const +{ + SetLastResult(E_SUCCESS); + int index = GetItemIndexFromPosition(position); + 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); +} + +result +_TabBarPresenter::SetTopDrawnItemIndex(int 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(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + float distance = pTopItem->GetBounds().x; + + _TabBarItem* pLastItem = GetItemAt(GetItemCount() - 1); + 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); + if (movableDistance < distance) + { + distance = movableDistance; + } + + r = AdjustItemPositionX(-distance + __arrowMargin); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +_TabBarPresenter::SetItemStatus(int index, _TabBarItemStatus status) +{ + _TabBarItem* pItem = __pTabBarModel->GetItemAt(index); + SysTryReturnResult(NID_UI_CTRL, pItem, E_SYSTEM, "A system error has occurred. Item at index (%d) does not exists.", index); + + pItem->SetStatus(status); + + return E_SUCCESS; +} + +_TabBarItemStatus +_TabBarPresenter::GetItemStatus(int index) const +{ + _TabBarItem* pItem = __pTabBarModel->GetItemAt(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(); + + return status; +} + +result +_TabBarPresenter::AdjustItemPositionX(float distance) +{ + int index = 0; + + while (index < GetItemCount()) + { + _TabBarItem* pItem = __pTabBarModel->GetItemAt(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); + index++; + } + + SetAllAccessibilityElement(); + + return E_SUCCESS; +} + +result +_TabBarPresenter::SetReplacementColor(const Color& color) +{ + Bitmap* pColorReplcedBitmap = null; + + result r; + + 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) + { + delete __pBgBitmapCached; + } + __pBgBitmapCached = pColorReplcedBitmap; + + return E_SUCCESS; +} + +result +_TabBarPresenter::SetItemReplacementColor(_TabBarItemStatus itemStatus, const Color& color) +{ + Bitmap* pColorReplcedBitmap = null; + + result r; + if (itemStatus == ITEM_STATUS_SELECTED) + { + 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_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; + } + + + if (__pItemBgBitmapCached[itemStatus] != null) + { + delete __pItemBgBitmapCached[itemStatus]; + } + __pItemBgBitmapCached[itemStatus] = pColorReplcedBitmap; + + return E_SUCCESS; +} + +void +_TabBarPresenter::Draw(void) +{ + Canvas* pCanvas = __tabBar.GetCanvasN(); + 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(); + + pCanvas->Clear(); + DrawBackground(pCanvas); + DrawArrow(pCanvas); + delete pCanvas; + + FloatRectangle rect(__sideMargin, 0.0f, clientBounds.width - __sideMargin * 2.0f, clientBounds.height); + Canvas* pSubCanvas = __tabBar.GetCanvasN(rect); + + if (pSubCanvas != null) + { + DrawItem(pSubCanvas); + delete pSubCanvas; + } +} + +result +_TabBarPresenter::ShiftToFocusedItem(int itemIndex, _FocusDirectionMove direction) +{ + int firstDrawnItemIndex = __pTabBarModel->GetFirstDrawnItemIndex(); + int index = 0; + result r = E_SUCCESS; + + if (direction == _FOCUS_DIRECTION_MOVE_LEFT) + { + index = itemIndex - 1; + } + else if (direction == _FOCUS_DIRECTION_MOVE_RIGHT) + { + index = itemIndex + 1; + } + + _TabBarItem* pItem = GetItemAt(itemIndex); + SysTryReturnResult(NID_UI_CTRL, pItem != null, E_SYSTEM, "Failed to load an item."); + + FloatRectangle itemBounds = pItem->GetBounds(); + FloatRectangle clientBounds = __tabBar.GetBoundsF(); + if (itemBounds.x < 0.0f || clientBounds.width - __sideMargin * 2.0f < itemBounds.x + (itemBounds.width)) + { + if(index <= firstDrawnItemIndex) + { + r = SetTopDrawnItemIndex(itemIndex); + } + else + { + r = SetTopDrawnItemIndex(firstDrawnItemIndex + 1); + } + + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + + __tabBar.Invalidate(); + + return r; +} + +void +_TabBarPresenter::ResetItemPositionX(void) +{ + int itemCount = GetItemCount(); + if (itemCount < 1) + { + return; + } + + _TabBarItem* pFirstItem = __pTabBarModel->GetItemAt(0); + _TabBarItem* pLastItem = __pTabBarModel->GetItemAt(itemCount - 1); + 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(); + FloatRectangle lastItemBounds = pLastItem->GetBounds(); + + if (!_FloatCompare(firstItemBounds.x, 0.0f) && lastItemBounds.x + lastItemBounds.width - firstItemBounds.x < clientBounds.width - __sideMargin * 2.0f) + { + AdjustItemPositionX(-firstItemBounds.x + __arrowMargin); + } + else if (!_FloatCompare(firstItemBounds.x, 0.0f) && lastItemBounds.x + lastItemBounds.width < clientBounds.width - __sideMargin * 2.0f) + { + AdjustItemPositionX(clientBounds.width - (__sideMargin + __arrowMargin) * 2.0f - (lastItemBounds.x + lastItemBounds.width)); + } +} + +void +_TabBarPresenter::OnBoundsChanged(void) +{ + return ResetItemPositionX(); +} + +void +_TabBarPresenter::DrawItem(Canvas* pCanvas) +{ + 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(); + + _TabBarItem* pDrawItem = null; + FloatRectangle itemBounds(0.0f, 0.0f, 0.0f, 0.0f); + + String drawText(L""); + FloatRectangle textRect(0.0f, 0.0f, 0.0f, 0.0f); + TextSimple* pSimpleText = null; + Color textColor; + + _TabBarItemStatus itemStatus = ITEM_STATUS_NORMAL; + + __pTabBarModel->SetFirstDrawnItemIndex(-1); + __pTabBarModel->SetLastDrawnItemIndex(-1); + int itemCount = GetItemCount(); + for (int i = 0; i < itemCount; i++) + { + pDrawItem = __pTabBarModel->GetItemAt(i); + if (pDrawItem == null) + { + break; + } + + itemBounds = pDrawItem->GetBounds(); + + if (itemBounds.x + itemBounds.width < 0.0f) + { + continue; + } + + if (itemBounds.x > clientBounds.width) + { + break; + } + + if (__pTabBarModel->GetFirstDrawnItemIndex() == -1) + { + __pTabBarModel->SetFirstDrawnItemIndex(i); + } + + __pTabBarModel->SetLastDrawnItemIndex(i); + + itemStatus = pDrawItem->GetStatus(); + + if (!__tabBar.IsEnabled()) + { + textColor = __tabBar.GetItemTextColor(ITEM_STATUS_DISABLED); + if (__pItemBgBitmapCached[ITEM_STATUS_DISABLED] != null) + { + r = DrawBitmap(*pCanvas, itemBounds, *__pItemBgBitmapCached[ITEM_STATUS_DISABLED]); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + else + { + textColor = __tabBar.GetItemTextColor(itemStatus); + if (__pItemBgBitmapCached[itemStatus] != null) + { + r = DrawBitmap(*pCanvas, itemBounds, *__pItemBgBitmapCached[itemStatus]); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + + // draw item text + textRect = FloatRectangle(itemBounds.x, itemBounds.y, itemBounds.width, itemBounds.height); + if (textRect.x < 0.0f) + { + textRect.width += textRect.x; + textRect.x = 0.0f; + } + + if (textRect.x + textRect.width > clientBounds.width) + { + textRect.width = clientBounds.width - textRect.x; + } + + 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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + __pFont = __tabBar.GetFallbackFont(); + SysTryReturnVoidResult(NID_UI_CTRL, __pFont != null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + __pTextObject->AppendElement(*pSimpleText); + + __pTextObject->SetForegroundColor(textColor, 0, __pTextObject->GetTextLength()); + __pTextObject->SetBounds(textRect); + __pTextObject->SetFont(__pFont, 0, __pTextObject->GetTextLength()); + __pTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE); + if (itemBounds.width < __itemMaxWidth) + { + __pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_NONE); + } + else + { + __pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); + __pTextObject->SetTextObjectEllipsisType(TEXT_OBJECT_ELLIPSIS_TYPE_TAIL); + } + __pTextObject->Draw(*_CanvasImpl::GetInstance(*pCanvas)); + } // end for loop +} + +void +_TabBarPresenter::DrawBackground(Canvas* pCanvas) +{ + result r = E_SUCCESS; + FloatRectangle clientBounds = __tabBar.GetBoundsF(); + + if (__pBgBitmapCached != null) + { + r = DrawBitmap(*pCanvas, FloatRectangle(0.0f, 0.0f, clientBounds.width, clientBounds.height), *__pBgBitmapCached); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + bool isCustomBitmap = IS_CUSTOM_BITMAP(TABBAR::BG_NORMAL); + if (__pBgEffectBitmapCached != null && !isCustomBitmap) + { + r = DrawBitmap(*pCanvas, FloatRectangle(0.0f, 0.0f, clientBounds.width, clientBounds.height), *__pBgEffectBitmapCached); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } +} + +void +_TabBarPresenter::DrawArrow(Canvas* pCanvas) +{ + FloatRectangle clientBounds = __tabBar.GetBoundsF(); + + _TabBarItem* pFirstItem = __pTabBarModel->GetItemAt(0); + if (pFirstItem == null) + { + return; + } + + FloatRectangle firstItemBounds = pFirstItem->GetBounds(); + FloatRectangle drawRect(0.0f, 0.0f, 0.0f, 0.0f); + drawRect.width = __sideMargin; + drawRect.height = clientBounds.height; + + // draw left arrow + if (firstItemBounds.x < 0.0f) + { + drawRect.width = __pLeftArrowBitmapCached->GetWidth(); + drawRect.height = __pLeftArrowBitmapCached->GetHeight(); + drawRect.x = (__sideMargin - __pLeftArrowBitmapCached->GetWidth()) / 2.0f; + drawRect.y = (clientBounds.height - __pLeftArrowBitmapCached->GetHeight()) / 2.0f; + DrawBitmap(*pCanvas, drawRect, *__pLeftArrowBitmapCached); + } + + int itemCount = __pTabBarModel->GetItemCount(); + _TabBarItem* pLastItem = __pTabBarModel->GetItemAt(itemCount - 1); + if (pLastItem == null) + { + return; + } + + FloatRectangle lastItemBounds = pLastItem->GetBounds(); + + drawRect.SetBounds(0.0f, 0.0f, 0.0f, 0.0f); + drawRect.x = clientBounds.width - __sideMargin; + drawRect.width = __sideMargin; + drawRect.height = clientBounds.height; + + // draw right arrow + if (lastItemBounds.x + lastItemBounds.width > clientBounds.width - __sideMargin * 2.0f) + { + drawRect.x += (__sideMargin - __pRightArrowBitmapCached->GetWidth()) / 2.0f; + drawRect.y = (clientBounds.height - __pRightArrowBitmapCached->GetHeight()) / 2.0f; + drawRect.width = __pRightArrowBitmapCached->GetWidth(); + drawRect.height = __pRightArrowBitmapCached->GetHeight(); + DrawBitmap(*pCanvas, drawRect, *__pRightArrowBitmapCached); + } +} + +bool +_TabBarPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + FloatPoint touchPosition = touchinfo.GetCurrentPosition(); + __startPosition = touchPosition; + __touchBubblingBlocked = true; + + int index = GetItemIndexFromPosition(touchPosition); + if (index == -1) + { + return true; + } + + __pressedItemIndex = index; + if (GetItemStatus(index) == ITEM_STATUS_SELECTED) + { + return true; + } + + result r = SetItemStatus(index, ITEM_STATUS_PRESSED); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, true, r, "[%s] propagating.", GetErrorMessage(r)); + + Draw(); + + return true; +} + +bool +_TabBarPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + FloatPoint touchPosition = touchinfo.GetCurrentPosition(); + int index = GetItemIndexFromPosition(touchPosition); + int selectedItemIndex = GetSelectedItemIndex(); + bool eventFire = false; + result r = E_SUCCESS; + + if (index != -1 && GetItemStatus(index) != ITEM_STATUS_NORMAL && __touchMoved == false) + { + if (GetItemStatus(index) == ITEM_STATUS_PRESSED) + { + r = SetItemStatus(index, ITEM_STATUS_SELECTED); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, r, "[%s] propagating.", GetErrorMessage(r)); + SetItemSelected(index); + SetItemStatus(selectedItemIndex, ITEM_STATUS_NORMAL); + eventFire = true; + } + } + + for (int i = 0; i < GetItemCount(); i++) + { + if (GetItemStatus(i) == ITEM_STATUS_PRESSED) + { + r = SetItemStatus(i, ITEM_STATUS_NORMAL); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, r, "[%s] propagating.", GetErrorMessage(r)); + } + } + + __pressedItemIndex = -1; + __touchMoved = false; + + Draw(); + + return eventFire; +} + +bool +_TabBarPresenter::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + result r = E_SUCCESS; + + for (int i = 0; i < GetItemCount(); i++) + { + if (GetItemStatus(i) == ITEM_STATUS_PRESSED) + { + r = SetItemStatus(i, ITEM_STATUS_NORMAL); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, r, "[%s] propagating.", GetErrorMessage(r)); + } + } + + __pressedItemIndex = -1; + + Draw(); + + return true; +} + +bool +_TabBarPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + + if (&source != &__tabBar) + { + return false; + } + + FloatRectangle clientBounds = __tabBar.GetBoundsF(); + if (__pTabBarModel->GetWidthOfAllItems() + (__sideMargin * 2.0f) <= clientBounds.width + __arrowMargin * 2.0f) + { + return true; + } + + FloatPoint touchPosition = touchinfo.GetCurrentPosition(); + + if (__touchMoved == false) + { + float distanceX = _Abs((touchPosition).x - __startPosition.x); + float distanceY = _Abs((touchPosition).y - __startPosition.y); + + if (distanceY > distanceX) + { + __touchBubblingBlocked = false; + } + } + + __touchMoved = true; + + float distance = touchPosition.x - __startPosition.x; + + __startPosition = touchPosition; + _TabBarItem* pItem = null; + FloatRectangle itemBounds; + int itemCount = GetItemCount(); + + if (distance > 0) // right move + { + pItem = __pTabBarModel->GetItemAt(0); + if (pItem == null) + { + return true; + } + + itemBounds = pItem->GetBounds(); + + if (itemBounds.x == __arrowMargin) + { + return true; + } + + if (itemBounds.x + distance >= __arrowMargin) + { + distance = __arrowMargin - itemBounds.x; + } + } + else // left move + { + pItem = __pTabBarModel->GetItemAt(itemCount - 1); + if (pItem == null) + { + return true; + } + + itemBounds = pItem->GetBounds(); + if (_FloatCompare(itemBounds.x + itemBounds.width + (__arrowMargin * 2.0f), clientBounds.width - (__sideMargin * 2.0f))) + { + return true; + } + + if (itemBounds.x + itemBounds.width + distance + (__arrowMargin * 2.0f) <= clientBounds.width - (__sideMargin * 2.0f)) + { + distance = (clientBounds.width - (__sideMargin * 2.0f)) - (itemBounds.x + itemBounds.width + (__arrowMargin * 2.0f)); + } + } + + AdjustItemPositionX(distance); + + Draw(); + + return __touchBubblingBlocked; +} + +result +_TabBarPresenter::DrawBitmap(Canvas& canvas, const FloatRectangle& bounds, const Bitmap& bitmap) +{ + 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.") + } + else + { + r = canvas.DrawBitmap(bounds, bitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Fail to draw bitmap.") + } + + return r; +} + +void +_TabBarPresenter::SetAllAccessibilityElement(void) +{ + _AccessibilityContainer* pContainer = __tabBar.GetAccessibilityContainer(); + if (pContainer != null) + { + int itemCount = __pTabBarModel->GetItemCount(); + for (int i = 0; i < itemCount; i++) + { + _TabBarItem* pItem = __pTabBarModel->GetItemAt(i); + if (pItem == null) + { + result r = GetLastResult(); + SysLogException(NID_UI_CTRL, r, "[%s] The current value of pItem is null", GetErrorMessage(r)); + + continue; + } + + _AccessibilityElement* pElement = pItem->GetAccessibilityElement(); + if (pElement == null) + { + pElement = new (std::nothrow) _AccessibilityElement(true); + pElement->Construct(L"", FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f)); + pElement->SetName(L"Category" + Integer::ToString(i + 1)); + pElement->SetLabel(pItem->GetText()); + pElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_CATEGORY"); + FloatRectangle itemBounds = pItem->GetBounds(); + itemBounds.x += __sideMargin; + pElement->SetBounds(itemBounds); + pItem->SetAccessibilityElement(pElement); + pContainer->AddElement(*pElement); + } + else + { + pElement->SetName(L"Category" + Integer::ToString(i + 1)); + pElement->SetLabel(pItem->GetText()); + pElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_CATEGORY"); + FloatRectangle itemBounds = pItem->GetBounds(); + itemBounds.x += __sideMargin; + pElement->SetBounds(itemBounds); + } + + if (pItem->GetStatus() != ITEM_STATUS_SELECTED) + { + pElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_MOVE_TO_CONTENT_T_TTS"); + } + } + } +} + +bool +_TabBarPresenter::OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_TabBarPresenter::OnAccessibilityFocusMovedPrevious(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_TabBarPresenter::OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_TabBarPresenter::OnAccessibilityReadingElement(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + + return false; +} + +bool +_TabBarPresenter::OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_TabBarPresenter::OnAccessibilityFocusOut(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_TabBarPresenter::OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_TabBarPresenter::OnAccessibilityValueIncreased(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_TabBarPresenter::OnAccessibilityValueDecreased(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_TabBarPresenter::OnAccessibilityItemRefreshed(const _AccessibilityContainer& control, const _AccessibilityElement& element, _AccessibilityFocusDirection direction) +{ + FloatRectangle r = element.GetBounds(); + int itemIndex = GetItemIndexFromAbsPosition(FloatPoint(r.x + r.width / 2.0f, r.y + r.height / 2.0f)); + + if (itemIndex < __pTabBarModel->GetFirstDrawnItemIndex() || __pTabBarModel->GetLastDrawnItemIndex() < itemIndex) + { + SetTopDrawnItemIndex(itemIndex); + __tabBar.Draw(); + } + + return false; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_TabImpl.cpp b/src/ui/controls/FUiCtrl_TabImpl.cpp new file mode 100644 index 0000000..842c558 --- /dev/null +++ b/src/ui/controls/FUiCtrl_TabImpl.cpp @@ -0,0 +1,532 @@ +// +// 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_TabImpl.cpp + * @brief This is the implementation file for the _TabImpl class. + */ + + +#include +#include "FUi_ResourceManager.h" +#include "FUiCtrl_TabImpl.h" + +using namespace Tizen::Base; +using namespace Tizen::Ui; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls { + +_TabImpl::_TabImpl(Tab* pPublic, _Tab* pCore) + : _ControlImpl(pPublic, pCore) + , __pActionEvent(null) +{ +} + +_TabImpl::~_TabImpl(void) +{ + if (__pActionEvent) + { + delete __pActionEvent; + __pActionEvent = null; + } +} + +_TabImpl* +_TabImpl::CreateTabImplN(Tab* pPublic) +{ + ClearLastResult(); + result r = E_SUCCESS; + + Rectangle rect(0, 0, 0, 0); + + _Tab* pCore = null; + pCore = _Tab::CreateTabN(); + r = GetLastResult(); + + _TabImpl* pTabImpl = new (std::nothrow) _TabImpl(pPublic, pCore); + SysTryCatch(NID_UI_CTRL, pTabImpl, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + return pTabImpl; + +CATCH: + delete pCore; + return null; +} + + +Tab* +_TabImpl::GetTab(void) +{ + return dynamic_cast(&(_ControlImpl::GetPublic())); +} + + +const char* +_TabImpl::GetPublicClassName(void) const +{ + return "Controls::Tab"; +} + + +const Tab& +_TabImpl::GetPublic(void) const +{ + return static_cast(_ControlImpl::GetPublic()); +} + + +Tab& +_TabImpl::GetPublic(void) +{ + return static_cast(_ControlImpl::GetPublic()); +} + + +const _Tab& +_TabImpl::GetCore(void) const +{ + return static_cast(_ControlImpl::GetCore()); +} + + +_Tab& +_TabImpl::GetCore(void) +{ + return static_cast<_Tab&>(_ControlImpl::GetCore()); +} + + +_TabImpl* +_TabImpl::GetInstance(Tab& pTab) +{ + return static_cast<_TabImpl*>(pTab._pControlImpl); +} + + +const _TabImpl* +_TabImpl::GetInstance(const Tab& pTab) +{ + return static_cast(pTab._pControlImpl); +} + + +Tab* +_TabImpl::CreateTabN(void) +{ + result r = E_SUCCESS; + + 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(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to construct Tab instance."); + + return pTab; +} + +void +_TabImpl::DeleteTab(Tab* pTab) +{ + if (pTab != null) + { + delete pTab; + pTab = null; + } +} + + +bool +_TabImpl::IsMovable(void) const +{ + return false; +} + +bool +_TabImpl::IsResizable(void) const +{ + return false; +} + + +result +_TabImpl::AddItem(const Bitmap& icon, const String& text, int actionId) +{ + ClearLastResult(); + + result r = GetCore().AddItem(icon, text, actionId); + + if (r == E_SYSTEM) + { + SysLog(NID_UI_CTRL, "[E_SYSTEM] A system error has occurred. Failed to add item to tab."); + return E_SYSTEM; + } + + return r; +} + + +result +_TabImpl::AddItem(const Bitmap& icon, int actionId) +{ + ClearLastResult(); + + result r = GetCore().AddItem(icon, actionId); + + if (r == E_SYSTEM) + { + SysLog(NID_UI_CTRL, "[E_SYSTEM] A system error has occurred. Failed to add item to tab."); + return E_SYSTEM; + } + + return r; +} + +result +_TabImpl::AddItem(const String& text, int actionId) +{ + ClearLastResult(); + + result r = GetCore().AddItem(text, actionId); + + if (r == E_SYSTEM) + { + SysLog(NID_UI_CTRL, "[E_SYSTEM] A system error has occurred. Failed to add item to tab."); + return E_SYSTEM; + } + + return r; +} + + +result +_TabImpl::InsertItemAt(int index, const Bitmap& icon, const String& text, int actionId) +{ + ClearLastResult(); + + result r = GetCore().InsertItemAt(index, icon, text, actionId); + + if (r == E_SYSTEM) + { + SysLog(NID_UI_CTRL, "[E_SYSTEM] A system error has occurred. Failed to insert item to tab."); + return E_SYSTEM; + } + + return r; +} + + +result +_TabImpl::InsertItemAt(int index, const Bitmap& icon, int actionId) +{ + ClearLastResult(); + + result r = GetCore().InsertItemAt(index, icon, actionId); + + if (r == E_SYSTEM) + { + SysLog(NID_UI_CTRL, "[E_SYSTEM] A system error has occurred. Failed to insert item to tab."); + return E_SYSTEM; + } + + return r; +} + + +result +_TabImpl::InsertItemAt(int index, const String& text, int actionId) +{ + ClearLastResult(); + + result r = GetCore().InsertItemAt(index, text, actionId); + + if (r == E_SYSTEM) + { + SysLog(NID_UI_CTRL, "[E_SYSTEM] A system error has occurred. Failed to insert item to tab."); + return E_SYSTEM; + } + + return r; +} + + +result +_TabImpl::SetItemAt(int index, const Bitmap& icon, const String& text, int actionId) +{ + ClearLastResult(); + + result r = GetCore().SetItemAt(index, icon, text, actionId); + + if (r == E_SYSTEM) + { + SysLog(NID_UI_CTRL, "[E_SYSTEM] A system error has occurred. Failed to set item to tab."); + return E_SYSTEM; + } + + return r; +} + + +result +_TabImpl::SetItemAt(int index, const Bitmap& icon, int actionId) +{ + ClearLastResult(); + + result r = GetCore().SetItemAt(index, icon, actionId); + + if (r == E_SYSTEM) + { + SysLog(NID_UI_CTRL, "[E_SYSTEM] A system error has occurred. Failed to set item to tab."); + return E_SYSTEM; + } + + return r; +} + + +result +_TabImpl::SetItemAt(int index, const String& text, int actionId) +{ + ClearLastResult(); + + result r = GetCore().SetItemAt(index, text, actionId); + + if (r == E_SYSTEM) + { + SysLog(NID_UI_CTRL, "[E_SYSTEM] A system error has occurred. Failed to set item to tab."); + return E_SYSTEM; + } + + return r; +} + + +result +_TabImpl::RemoveItemAt(int index) +{ + ClearLastResult(); + + return GetCore().RemoveItemAt(index); +} + + +result +_TabImpl::RemoveAllItems(void) +{ + ClearLastResult(); + + return GetCore().RemoveAllItems(); +} + + +result +_TabImpl::SetBadgeIcon(int actionId, const Bitmap* pBadgeIcon) +{ + ClearLastResult(); + + return GetCore().SetBadgeIcon(actionId, pBadgeIcon); +} + + +int +_TabImpl::GetItemCount(void) const +{ + ClearLastResult(); + + return GetCore().GetItemCount(); +} + + +int +_TabImpl::GetItemIndexFromActionId(int actionId) const +{ + ClearLastResult(); + + return GetCore().GetItemIndexFromActionId(actionId); +} + + +int +_TabImpl::GetItemActionIdAt(int index) const +{ + ClearLastResult(); + + return GetCore().GetItemActionIdAt(index); +} + + +void +_TabImpl::SetSelectedItem(int index) +{ + ClearLastResult(); + + GetCore().SetSelectedItemIndex(index); +} + + +int +_TabImpl::GetSelectedItemIndex(void) const +{ + ClearLastResult(); + + return GetCore().GetSelectedItemIndex(); +} + + +void +_TabImpl::SetEditModeEnabled(bool enable) +{ + ClearLastResult(); + + GetCore().SetEditModeEnabled(enable); +} + + +bool +_TabImpl::IsEditModeEnabled(void) const +{ + ClearLastResult(); + + return GetCore().IsEditModeEnabled(); +} + + +result +_TabImpl::SetBackgroundBitmap(const Bitmap& bitmap) +{ + ClearLastResult(); + + return GetCore().SetBackgroundBitmap(bitmap); +} + + +result +_TabImpl::SetFocusedItemBackgroundBitmap(const Bitmap& bitmap) +{ + ClearLastResult(); + + return GetCore().SetSelectedItemBackgroundBitmap(bitmap); +} + + +void +_TabImpl::SetTextColor(const Color& textColor) +{ + ClearLastResult(); + + GetCore().SetTextColor(textColor); +} + + +Color +_TabImpl::GetTextColor(void) const +{ + ClearLastResult(); + + return GetCore().GetTextColor(); +} + + +void +_TabImpl::SetSelectedTextColor(const Color& textColor) +{ + ClearLastResult(); + + GetCore().SetSelectedTextColor(textColor); +} + + +Color +_TabImpl::GetSelectedTextColor(void) const +{ + ClearLastResult(); + + return GetCore().GetSelectedTextColor(); +} + + +result +_TabImpl::SetHighlightedItemBackgroundBitmap(const Bitmap& bitmap) +{ + ClearLastResult(); + + return GetCore().SetHighlightedItemBackgroundBitmap(bitmap); +} + + +void +_TabImpl::SetHighlightedTextColor(const Color& color) +{ + ClearLastResult(); + + GetCore().SetHighlightedTextColor(color); +} + + +Color +_TabImpl::GetHighlightedTextColor(void) const +{ + ClearLastResult(); + + return GetCore().GetHighlightedTextColor(); +} + + +void +_TabImpl::AddActionEventListener(IActionEventListener& listener) +{ + ClearLastResult(); + + if (__pActionEvent == null) + { + __pActionEvent = _PublicActionEvent::CreateInstanceN(GetPublic()); + + if (__pActionEvent == null || IsFailed(GetLastResult())) + { + SysLog(NID_UI_CTRL, "[E_SYSTEM] A system error has occurred. Failed to construct a _PublicActionEvent instance."); + SetLastResult(E_SYSTEM); + delete __pActionEvent; + return; + } + } + + __pActionEvent->AddListener(listener); + + GetCore().AddActionEventListener(*this); +} + + +void +_TabImpl::RemoveActionEventListener(IActionEventListener& listener) +{ + __pActionEvent->RemoveListener(listener); + + GetCore().RemoveActionEventListener(*this); +} + + +void +_TabImpl::OnActionPerformed(const _Control& source, int actionId) +{ + if (__pActionEvent != null) + { + __pActionEvent->Fire(*_PublicActionEvent::CreateActionEventArgN(actionId)); + } +} + + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_TabItem.cpp b/src/ui/controls/FUiCtrl_TabItem.cpp new file mode 100644 index 0000000..6e7c49f --- /dev/null +++ b/src/ui/controls/FUiCtrl_TabItem.cpp @@ -0,0 +1,186 @@ +// +// 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_TabItem.cpp + * @brief This is the header file for the _TabItem class. + * + */ + +#include +#include "FUi_Control.h" +#include "FUi_ResourceManager.h" +#include "FUiCtrl_TabItem.h" + + +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls { + +_TabItem::_TabItem(void) + : __actionId(-1) + , __bUpdate(false) + , __style(_TABITEM_STYLE_TEXT) + , __text(L"") + , __pbmIcon(null) + , __pbmBadge(null) + , __status(_TABITEM_STATUS_NORMAL) +{ + __bounds.x = 0.0f; + __bounds.y = 0.0f; + __bounds.width = 10.0f; + __bounds.height = 10.0f; +} + + +_TabItem::~_TabItem(void) +{ + delete __pbmIcon; + __pbmIcon = null; + + delete __pbmBadge; + __pbmBadge = null; + +} + + +void +_TabItem::SetActionId(int actionId) +{ + __actionId = actionId; +} + + +int +_TabItem::GetActionId(void) const +{ + return __actionId; +} + + +void +_TabItem::SetUpdateState(bool bUpdate) +{ + __bUpdate = bUpdate; +} + + +int +_TabItem::GetUpdateState(void) const +{ + return __bUpdate; +} + + +void +_TabItem::SetText(const Tizen::Base::String& text) +{ + __text = text; +} + + +Tizen::Base::String +_TabItem::GetText(void) const +{ + return __text; +} + + +void +_TabItem::SetIcon(const Bitmap& icon) +{ + + Tizen::Graphics::Bitmap* __pBitmap = _BitmapImpl::CloneN(icon); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, (__pBitmap), r, "[%s] Propagating.", GetErrorMessage(r)); + + __pbmIcon = __pBitmap; + + __pBitmap = null; +} + + +Bitmap* +_TabItem::GetIcon(void) const +{ + return __pbmIcon; +} + + +void +_TabItem::SetBadgeIcon(const Bitmap& icon) +{ + Tizen::Graphics::Bitmap* __pBitmap = _BitmapImpl::CloneN(icon); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, (__pBitmap), r, "[%s] Propagating.", GetErrorMessage(r)); + + __pbmBadge = __pBitmap; + + __pBitmap = null; +} + + +Bitmap* +_TabItem::GetBadgeIcon(void) const +{ + return __pbmBadge; +} + + +void +_TabItem::SetItemBounds(FloatRectangle bounds) +{ + __bounds = bounds; +} + + +FloatRectangle +_TabItem::GetItemBounds(void) const +{ + return __bounds; +} + + +void +_TabItem::SetStatus(_TabItemStatus status) +{ + __status = status; +} + + +_TabItemStatus +_TabItem::GetStatus(void) const +{ + return __status; +} + + +void +_TabItem::SetStyle(int style) +{ + __style = style; +} + + +_TabItemStyle +_TabItem::GetStyle(void) const +{ + return _TabItemStyle(__style); +} + + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_TabModel.cpp b/src/ui/controls/FUiCtrl_TabModel.cpp new file mode 100644 index 0000000..20c2855 --- /dev/null +++ b/src/ui/controls/FUiCtrl_TabModel.cpp @@ -0,0 +1,108 @@ +// +// 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_TabModel.cpp + * @brief This is the implementation file for the _TabModel class. + */ + + +#include +#include +#include "FUiCtrl_TabModel.h" + +namespace Tizen { namespace Ui { namespace Controls { + +_TabModel::_TabModel(void) + : __selectedItemIndex(0) + , __pressedItemIndex(-1) + , __firstDrawnItemIndex(-1) + , __isEditModeEnabled(true) +{ +} + + +_TabModel::~_TabModel(void) +{ +} + + +result +_TabModel::Construct(void) +{ + ClearLastResult(); + + return E_SUCCESS; +} + + +void +_TabModel::SetSelectedItemIndex(int index) +{ + __selectedItemIndex = index; +} + + +int +_TabModel::GetSelectedItemIndex(void) const +{ + return __selectedItemIndex; +} + + +void +_TabModel::SetPressedItemIndex(int index) +{ + __pressedItemIndex = index; +} + + +int +_TabModel::GetPressedItemIndex(void) const +{ + return __pressedItemIndex; +} + + +void +_TabModel::SetFirstDrawnItemIndex(int index) +{ + __firstDrawnItemIndex = index; +} + + +int +_TabModel::GetFirstDrawnItemIndex(void) const +{ + return __firstDrawnItemIndex; +} + + +void +_TabModel::SetEditModeEnabled(bool enable) +{ + __isEditModeEnabled = enable; +} + + +bool +_TabModel::IsEditModeEnabled(void) const +{ + return __isEditModeEnabled; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_TabPresenter.cpp b/src/ui/controls/FUiCtrl_TabPresenter.cpp new file mode 100644 index 0000000..c18fa3e --- /dev/null +++ b/src/ui/controls/FUiCtrl_TabPresenter.cpp @@ -0,0 +1,2899 @@ +// +// 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_TabPresenter.cpp + * @brief This is the implementation file for the _TabPresenter class. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "FUi_AccessibilityElement.h" +#include "FUi_IAccessibilityListener.h" +#include "FUi_AccessibilityContainer.h" +#include "FUiAnim_VisualElement.h" +#include "FUi_UiTouchEvent.h" +#include "FUi_ResourceManager.h" +#include "FUiCtrl_TabPresenter.h" +#include "FUi_CoordinateSystemUtils.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Graphics::_Text; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Ui::Animations; + +namespace Tizen { namespace Ui { namespace Controls { + +struct ReorderAnimationInfo{ + + float xPosition; + int index; + float totalDistance; + float move; + int reorderValue; +}; + +struct TimerInfo{ + + int index; + Timer* pReorderTimer; +}; + +_TabPresenter::_TabPresenter(void) + : __pTab(null) + , __pTabModel(null) + , __pFont(null) + , __pTextObject(null) + , __isRecalculateNeeded(false) + , __isEditMode(false) + , __editItemIndex(-1) + , __pHorizontalLineBitmap(null) + , __pFocusBitmap(null) + , __pFlickAnimationTimer(null) + , __pScrollAnimationTimer(null) + , __flickAnimation() + , __showItemCount(0) + , __width(0.0f) + , __height(0.0f) + , __moveDistance(0.0f) + , __isFlickEnabled(false) + , __itemMaxCount(0) + , __itemWidth(0.0f) + , __itemHeight(0.0f) + , __rearIndex(0) + , __isRightScrollable(false) + , __isLeftScrollable(false) + , __isDirectionRight(true) + , __isTimerCanceled(false) + , __flickMove(0.0f) + , __flickDistance(0.0f) + , __flickFlag(0) + , __reorderDist(0.0f) + , __firstItemIndex(0) + , __lastItemIndex(0) + , __timerCount(0) + , __isTouchMove(false) + , __tabMinimumSize(0.0f) + , __fontChangeItemCount(0) + +{ + __currentTouchPosition = FloatPoint(0.0f, 0.0f); + __dividerLine = FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); + __selectedLine = FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); + + for (int i = 0; i < (_TIMER_COUNT); i++) + { + __pTimerInfo[i] = null; + } + + for (int i = 0; i < _TAB_ITEM_MAXCOUNT; i++) + { + __pAnimInfo[i] = null; + } +} + + +_TabPresenter::~_TabPresenter(void) +{ + if (__pTabModel) + { + delete __pTabModel; + __pTabModel = null; + } + + if (__pTextObject) + { + delete __pTextObject; + __pTextObject = null; + } + + if (__pHorizontalLineBitmap) + { + delete __pHorizontalLineBitmap; + __pHorizontalLineBitmap = null; + } + + if (__pFlickAnimationTimer) + { + delete __pFlickAnimationTimer; + __pFlickAnimationTimer = null; + } + + for (int i = 0; i < (_TIMER_COUNT); i++) + { + if (__pTimerInfo[i]) + { + if (__pTimerInfo[i]->pReorderTimer) + { + delete __pTimerInfo[i]->pReorderTimer; + __pTimerInfo[i]->pReorderTimer = null; + } + delete __pTimerInfo[i]; + __pTimerInfo[i] = null; + } + } + + for (int i = 0; i < _TAB_ITEM_MAXCOUNT; i++) + { + if (__pAnimInfo[i]) + { + delete __pAnimInfo[i]; + __pAnimInfo[i] = null; + } + } + + if (__pScrollAnimationTimer) + { + delete __pScrollAnimationTimer; + __pScrollAnimationTimer = null; + } + + if (__pFocusBitmap) + { + delete __pFocusBitmap; + __pFocusBitmap = null; + } + +} + +result +_TabPresenter::Construct(const _Tab& tab) +{ + result r = E_SUCCESS; + + __pTab = const_cast<_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(); + SysTryReturn(NID_UI_CTRL, pModel, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = SetModel(*pModel); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to set _TabModel instance."); + + 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(); + SysTryCatch(NID_UI_CTRL, __pTextObject, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + __pTextObject->Construct(); + __pTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_CENTER | TEXT_OBJECT_ALIGNMENT_MIDDLE); + __pTextObject->SetFont(__pFont, 0, __pTextObject->GetTextLength()); + + r = LoadBitmap(); + SysTryLog(NID_UI_CTRL, r == E_SUCCESS, "Failed to locate bitmap."); + + GET_FIXED_VALUE_CONFIG(TAB::ITEM_MAX_COUNT, __pTab->GetOrientation(), __itemMaxCount); + GET_SHAPE_CONFIG(TAB::SCREEN_WIDTH, __pTab->GetOrientation(), __width); + GET_SHAPE_CONFIG(TAB::SCREEN_HEIGHT, __pTab->GetOrientation(), __height); + + GET_FIXED_VALUE_CONFIG(TAB::DIVIDER_WIDTH, __pTab->GetOrientation(), __dividerLine.width); + GET_SHAPE_CONFIG(TAB::DIVIDER_HEIGHT, __pTab->GetOrientation(), __dividerLine.height); + + GET_SHAPE_CONFIG(TAB::TAB_MINIMUM_SIZE, __pTab->GetOrientation(), __tabMinimumSize); + + GET_SHAPE_CONFIG(TAB::SELECTED_LINE_HEIGHT, __pTab->GetOrientation(), __selectedLine.height); + GET_FIXED_VALUE_CONFIG(TAB::FONT_CHANGE_ITEM_COUNT, __pTab->GetOrientation(), __fontChangeItemCount); + + __flickAnimation.SetSizeInformation(_CoordinateSystemUtils::ConvertToInteger(__width), _CoordinateSystemUtils::ConvertToInteger(__height), DEVICE_SIZE_HORIZONTAL, DEVICE_SIZE_VERTICAL); + __flickAnimation.SetSensitivity(FLICK_ANIMATION_FPS_TAB, FLICK_ANIMATION_SENSITIVITY_TAB); + __flickAnimation.SetDirection(FD_HORIZONTAL); + + for (int i = 0; i < _TIMER_COUNT; i++) + { + __pTimerInfo[i] = new (std::nothrow) TimerInfo(); + SysTryCatch(NID_UI_CTRL, __pTimerInfo[i], , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + __pTimerInfo[i]->index = -1; + __pTimerInfo[i]->pReorderTimer = null; + } + + return r; + +CATCH: + delete pModel; + pModel = null; + + delete __pTextObject; + __pTextObject = null; + + return r; +} + +result +_TabPresenter::LoadBitmap(void) +{ + result r = E_SUCCESS; + Color focusBgColor(0x00000000); + Color itemSelectedColor(0x00000000); + + 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."); + + 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."); + + return r; + +CATCH: + + delete __pHorizontalLineBitmap; + __pHorizontalLineBitmap = null; + + delete __pFocusBitmap; + __pFocusBitmap = null; + + return r; +} + +void +_TabPresenter::DrawResourceBitmap(Canvas& canvas, const FloatRectangle& bounds, Bitmap* pBitmap) +{ + result r = E_SUCCESS; + + if (pBitmap == null) + { + return; + } + + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pBitmap)) + { + r = canvas.DrawNinePatchedBitmap(bounds, *pBitmap); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + r = canvas.DrawBitmap(bounds, *pBitmap); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + return; +} + +result +_TabPresenter::SetModel(const _TabModel& tabModel) +{ + __pTabModel = const_cast<_TabModel*>(&tabModel); + + return E_SUCCESS; +} + +void +_TabPresenter::SetSelectedItemIndex(int index) +{ + int selectedIndex = GetSelectedItemIndex(); + + SetItemStatus(selectedIndex, _TABITEM_STATUS_NORMAL); + __pTabModel->SetSelectedItemIndex(index); + SetItemStatus(index, _TABITEM_STATUS_SELECTED); + + return; +} + +int +_TabPresenter::GetSelectedItemIndex(void) const +{ + return __pTabModel->GetSelectedItemIndex(); +} + +void +_TabPresenter::SetPressedItemIndex(int index) +{ + __pTabModel->SetPressedItemIndex(index); + return; +} + +int +_TabPresenter::GetPressedItemIndex(void) const +{ + return __pTabModel->GetPressedItemIndex(); +} + +void +_TabPresenter::SetFirstDrawnItemIndex(int index) +{ + __pTabModel->SetFirstDrawnItemIndex(index); + return; +} + +int +_TabPresenter::GetFirstDrawnItemIndex(void) const +{ + + return __pTabModel->GetFirstDrawnItemIndex(); +} + +void +_TabPresenter::SetEditModeEnabled(bool isEnabled) +{ + + return __pTabModel->SetEditModeEnabled(isEnabled); +} + +bool +_TabPresenter::IsEditModeEnabled(void) const +{ + return __pTabModel->IsEditModeEnabled(); +} + +int +_TabPresenter::GetItemCount(void) const +{ + + return __pTab->GetItemCount(); +} + +_TabItem* +_TabPresenter::GetItemAt(int index) +{ + return __pTab->GetItemAt(index); +} + +result +_TabPresenter::SetItemStatus(int index, _TabItemStatus status) +{ + _TabItem* pItem = GetItemAt(index); + SysTryReturn(NID_UI_CTRL, pItem, GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + pItem->SetUpdateState(true); + pItem->SetStatus(status); + + return E_SUCCESS; +} + +_TabItemStatus +_TabPresenter::GetItemStatus(int index) const +{ + + _TabItem* pItem = __pTab->GetItemAt(index); + + if (pItem == null) + { + return _TABITEM_STATUS_NORMAL; + } + + return pItem->GetStatus(); +} + +int +_TabPresenter::GetItemIndexFromPosition(const FloatPoint& point) const +{ + + FloatRectangle itemBounds(0.0f, 0.0f, 0.0f, 0.0f); + + int itemIndex = GetFirstDrawnItemIndex(); + + if ((point.x < 0.0f) || (point.x > __pTab->GetBoundsF().width) + || (point.y < 0.0f) || (point.y > __pTab->GetBoundsF().height)) + { + return -1; + } + + _TabItem* pItem = __pTab->GetItemAt(itemIndex); + if (pItem == null) + { + return -1; + } + + while (pItem != null) + { + itemBounds = pItem->GetItemBounds(); + + if ((point.x > itemBounds.x) && (point.x < itemBounds.x + itemBounds.width) + && (point.y > itemBounds.y) && (point.y < itemBounds.y + itemBounds.height)) + { + return itemIndex; + } + + itemIndex++; + pItem = __pTab->GetItemAt(itemIndex); + if (pItem == null) + { + break; + } + } + + return -1; +} + +void +_TabPresenter::Draw(void) +{ + ClearLastResult(); + + SysTryReturnVoidResult(NID_UI_CTRL, __pTab, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The _Tab instance is null."); + GET_COLOR_CONFIG(TAB::ITEM_BG_NORMAL, backgroundColor); + + if (__isRecalculateNeeded) + { + __isRecalculateNeeded = false; + CalculateItemBounds(); + } + else if (__isFlickEnabled) + { + DrawHorizontal(); + } + + Canvas* pCanvas = __pTab->GetCanvasN(); + SysTryReturnVoidResult(NID_UI_CTRL, pCanvas, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + pCanvas->SetBackgroundColor(backgroundColor); + pCanvas->Clear(); + + if (__pTab->GetStyle() == _TAB_STYLE_TEXT) + { + DrawTextItem(pCanvas); + } + else if (__pTab->GetStyle() == _TAB_STYLE_ICON) + { + DrawIconItem(pCanvas); + } + else // _TAB_STYLE_ICON_TEXT + { + DrawItem(pCanvas); + } + + if (__pTab->GetCurrentHighlightedItemIndex() > -1 && __pTab->IsInFocusMode() == true && GetItemCount() > 0) + { + DrawResourceBitmap(*pCanvas, GetItemAt(__pTab->GetCurrentHighlightedItemIndex())->GetItemBounds(), __pFocusBitmap); + } + + __pTab->UpdateAccessibilityElement(); + + delete pCanvas; + return; +} + +void +_TabPresenter::SetRecalculateItemBounds(bool isRecalculationRequired) +{ + __isRecalculateNeeded = isRecalculationRequired; + return; +} + +void +_TabPresenter::DrawTextItem(Canvas* pCanvas) +{ + ClearLastResult(); + TextSimple* pSimpleText = null; + Rectangle bounds = __pTab->GetBounds(); + + _TabItem* pDrawItem = null; + String itemText(L""); + FloatRectangle itemDrawRect(0.0f, 0.0f, 0.0f, 0.0f); + + const int itemCount = GetItemCount(); + + _TabItemStatus itemStatus = _TABITEM_STATUS_NORMAL; + + bool isMultiline = false; + + float topMargin = 0.0f; + float bottomMargin = 0.0f; + float leftMargin = 0.0f; + float rightMargin = 0.0f; + float lineHeight = 0.0f; + float selectedLineHeight = 0.0f; + GET_SHAPE_CONFIG(TAB::TOP_MARGIN, __pTab->GetOrientation(), topMargin); + GET_SHAPE_CONFIG(TAB::BOTTOM_MARGIN, __pTab->GetOrientation(), bottomMargin); + GET_SHAPE_CONFIG(TAB::ITEM_LEFT_MARGIN, __pTab->GetOrientation(), leftMargin); + GET_SHAPE_CONFIG(TAB::ITEM_RIGHT_MARGIN, __pTab->GetOrientation(), rightMargin); + GET_SHAPE_CONFIG(TAB::HEIGHT, __pTab->GetOrientation(), lineHeight); + GET_SHAPE_CONFIG(TAB::SELECTED_LINE_HEIGHT, __pTab->GetOrientation(), selectedLineHeight); + + SetFirstLoadedItemIndex(); + SetLastLoadedItemIndex(); + + int startIndex = __firstLoadedItemIndex - 1; + int endIndex = __lastLoadedItemIndex + 1; + if (__firstLoadedItemIndex == 0) + { + startIndex = __firstLoadedItemIndex; + } + + if (__lastLoadedItemIndex == (GetItemCount() - 1)) + { + endIndex = __lastLoadedItemIndex; + } + + for (int i = startIndex; i <= endIndex; i++) + { + if (i == __editItemIndex) + { + continue; + } + pDrawItem = GetItemAt(i); + + SysTryReturnVoidResult(NID_UI_CTRL, pDrawItem, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + SetFirstDrawnItemIndex(0); + + itemDrawRect = pDrawItem->GetItemBounds(); + __dividerLine.x = itemDrawRect.x + (itemDrawRect.width - (__dividerLine.width) / 2.0f); + __dividerLine.y = ((itemDrawRect.height - __dividerLine.height) / 2.0f); + + itemStatus = pDrawItem->GetStatus(); + + if (!__pTab->IsEnabled()) + { + itemStatus = _TABITEM_STATUS_DISABLED; + } + + + if (itemStatus == _TABITEM_STATUS_SELECTED) + { + DrawSelectedItemBackground(pCanvas, itemDrawRect); + __selectedLine.width = __itemWidth; + __selectedLine.x = itemDrawRect.x; + } + else if (itemStatus == _TABITEM_STATUS_PRESSED) + { + DrawPressedItemBackground(pCanvas, itemDrawRect); + } + else if (itemStatus == _TABITEM_STATUS_HIGHLIGHTED) + { + DrawHighlightedItemBackground(pCanvas, itemDrawRect); + } + else + { + DrawItemBackground(pCanvas, itemDrawRect); + } + + itemText = pDrawItem->GetText(); + + __pTextObject->RemoveAll(); + pSimpleText = new (std::nothrow)TextSimple(const_cast (itemText.GetPointer()), itemText.GetLength()); + SysTryReturnVoidResult(NID_UI_CTRL, pSimpleText, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + __pTextObject->AppendElement(*pSimpleText); + __pTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_WORD); + __pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); + + itemDrawRect.x = itemDrawRect.x + leftMargin; + itemDrawRect.y = itemDrawRect.y + topMargin; + itemDrawRect.width = itemDrawRect.width - leftMargin - rightMargin; + itemDrawRect.height = itemDrawRect.height - topMargin - bottomMargin; + + __pTextObject->SetBounds(itemDrawRect); + __pTextObject->Compose(); + + const int textRowCount = __pTextObject->GetTotalLineCount(); + + isMultiline = false; + + if (textRowCount >= 2) + { + isMultiline = true; + } + + float fontSize = 0.0f; + + if (__showItemCount < __fontChangeItemCount) + { + if (isMultiline == false) + { + GET_SHAPE_CONFIG(TAB::FONT_SIZE_01, __pTab->GetOrientation(), fontSize); + } + else + { + GET_SHAPE_CONFIG(TAB::MULTILINE_FONT_SIZE_01, __pTab->GetOrientation(), fontSize); + } + } + else if (__showItemCount == __fontChangeItemCount) + { + if (isMultiline == false) + { + GET_SHAPE_CONFIG(TAB::FONT_SIZE_02, __pTab->GetOrientation(), fontSize); + } + else + { + GET_SHAPE_CONFIG(TAB::MULTILINE_FONT_SIZE_02, __pTab->GetOrientation(), fontSize); + } + } + else + { + if (isMultiline == false) + { + GET_SHAPE_CONFIG(TAB::FONT_SIZE_03, __pTab->GetOrientation(), fontSize); + } + else + { + GET_SHAPE_CONFIG(TAB::MULTILINE_FONT_SIZE_03, __pTab->GetOrientation(), fontSize); + } + } + + (_FontImpl::GetInstance(*__pFont))->SetSize(fontSize); + + __pTextObject->SetFont(__pFont, 0, __pTextObject->GetTextLength()); + + if (itemStatus == _TABITEM_STATUS_SELECTED) + { + __pTextObject->SetForegroundColor(__pTab->GetSelectedTextColor(), 0, __pTextObject->GetTextLength()); + __selectedLine.y = lineHeight - selectedLineHeight; + + DrawResourceBitmap(*pCanvas, __selectedLine, __pHorizontalLineBitmap); + + } + else if (itemStatus == _TABITEM_STATUS_PRESSED) + { + __pTextObject->SetForegroundColor(__pTab->GetPressedTextColor(), 0, __pTextObject->GetTextLength()); + } + else if (itemStatus == _TABITEM_STATUS_HIGHLIGHTED) + { + __pTextObject->SetForegroundColor(__pTab->GetHighlightedTextColor(), 0, __pTextObject->GetTextLength()); + } + else if (itemStatus == _TABITEM_STATUS_DISABLED) + { + __pTextObject->SetForegroundColor(__pTab->GetDisabledTextColor(), 0, __pTextObject->GetTextLength()); + } + else + { + __pTextObject->SetForegroundColor(__pTab->GetTextColor(), 0, __pTextObject->GetTextLength()); + } + + __pTextObject->SetBounds(itemDrawRect); + __pTextObject->Draw(*_CanvasImpl::GetInstance(*pCanvas)); + if (i < (itemCount - 1)) + { + DrawItemDivider(*pCanvas, __dividerLine); + } + + DrawBadgeIcon(pDrawItem, pCanvas); + + } + + if (__isEditMode) + { + DrawEditTextItem(pCanvas); + } + + return; +} + +void +_TabPresenter::DrawEditTextItem(Canvas* pCanvas) +{ + ClearLastResult(); + + TextSimple* pSimpleText = null; + Rectangle bounds = __pTab->GetBounds(); + + _TabItem* pDrawItem = null; + String itemText(L""); + FloatRectangle itemDrawRect(0.0f, 0.0f, 0.0f, 0.0f); + + _TabItemStatus itemStatus = _TABITEM_STATUS_NORMAL; + + bool isMultiline = false; + + float topMargin = 0.0f; + float bottomMargin = 0.0f; + float leftMargin = 0.0f; + float rightMargin = 0.0f; + float lineHeight = 0.0f; + float selectedLineHeight = 0.0f; + GET_SHAPE_CONFIG(TAB::TOP_MARGIN, __pTab->GetOrientation(), topMargin); + GET_SHAPE_CONFIG(TAB::BOTTOM_MARGIN, __pTab->GetOrientation(), bottomMargin); + GET_SHAPE_CONFIG(TAB::ITEM_LEFT_MARGIN, __pTab->GetOrientation(), leftMargin); + GET_SHAPE_CONFIG(TAB::ITEM_RIGHT_MARGIN, __pTab->GetOrientation(), rightMargin); + GET_SHAPE_CONFIG(TAB::HEIGHT, __pTab->GetOrientation(), lineHeight); + GET_SHAPE_CONFIG(TAB::SELECTED_LINE_HEIGHT, __pTab->GetOrientation(), selectedLineHeight); + + pDrawItem = GetItemAt(__editItemIndex); + SysTryReturnVoidResult(NID_UI_CTRL, pDrawItem, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + itemDrawRect = pDrawItem->GetItemBounds(); + __dividerLine.x = itemDrawRect.x + (itemDrawRect.width - (__dividerLine.width) / 2.0f); + __dividerLine.y = ((itemDrawRect.height - __dividerLine.height) / 2.0f); + + itemStatus = pDrawItem->GetStatus(); + + if (itemStatus == _TABITEM_STATUS_SELECTED) + { + DrawSelectedItemBackground(pCanvas, itemDrawRect); + __selectedLine.width = __itemWidth; + __selectedLine.x = itemDrawRect.x; + } + else if (itemStatus == _TABITEM_STATUS_PRESSED) + { + DrawPressedItemBackground(pCanvas, itemDrawRect); + } + else if (itemStatus == _TABITEM_STATUS_HIGHLIGHTED) + { + DrawHighlightedItemBackground(pCanvas, itemDrawRect); + } + else + { + DrawItemBackground(pCanvas, itemDrawRect); + } + + itemText = pDrawItem->GetText(); + + __pTextObject->RemoveAll(); + pSimpleText = new (std::nothrow)TextSimple(const_cast (itemText.GetPointer()), itemText.GetLength()); + SysTryReturnVoidResult(NID_UI_CTRL, pSimpleText, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + __pTextObject->AppendElement(*pSimpleText); + __pTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_WORD); + __pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); + + itemDrawRect.x = itemDrawRect.x + leftMargin; + itemDrawRect.y = itemDrawRect.y + topMargin; + itemDrawRect.width = itemDrawRect.width - leftMargin - rightMargin; + itemDrawRect.height = itemDrawRect.height - topMargin - bottomMargin; + + __pTextObject->SetBounds(itemDrawRect); + __pTextObject->Compose(); + + const int textRowCount = __pTextObject->GetTotalLineCount(); + + isMultiline = false; + + if (textRowCount >= 2) + { + isMultiline = true; + } + + float fontSize = 0.0f; + + if (__showItemCount < __fontChangeItemCount) + { + if (isMultiline == false) + { + GET_SHAPE_CONFIG(TAB::FONT_SIZE_01, __pTab->GetOrientation(), fontSize); + } + else + { + GET_SHAPE_CONFIG(TAB::MULTILINE_FONT_SIZE_01, __pTab->GetOrientation(), fontSize); + } + } + else if (__showItemCount == __fontChangeItemCount) + { + if (isMultiline == false) + { + GET_SHAPE_CONFIG(TAB::FONT_SIZE_02, __pTab->GetOrientation(), fontSize); + } + else + { + GET_SHAPE_CONFIG(TAB::MULTILINE_FONT_SIZE_02, __pTab->GetOrientation(), fontSize); + } + } + else + { + if (isMultiline == false) + { + GET_SHAPE_CONFIG(TAB::FONT_SIZE_03, __pTab->GetOrientation(), fontSize); + } + else + { + GET_SHAPE_CONFIG(TAB::MULTILINE_FONT_SIZE_03, __pTab->GetOrientation(), fontSize); + } + } + + (_FontImpl::GetInstance(*__pFont))->SetSize(fontSize); + + __pTextObject->SetFont(__pFont, 0, __pTextObject->GetTextLength()); + + if (itemStatus == _TABITEM_STATUS_SELECTED) + { + __pTextObject->SetForegroundColor(__pTab->GetSelectedTextColor(), 0, __pTextObject->GetTextLength()); + __selectedLine.y = lineHeight - selectedLineHeight; + + DrawResourceBitmap(*pCanvas, __selectedLine, __pHorizontalLineBitmap); + + } + else if (itemStatus == _TABITEM_STATUS_PRESSED) + { + __pTextObject->SetForegroundColor(__pTab->GetPressedTextColor(), 0, __pTextObject->GetTextLength()); + } + else if (itemStatus == _TABITEM_STATUS_HIGHLIGHTED) + { + __pTextObject->SetForegroundColor(__pTab->GetHighlightedTextColor(), 0, __pTextObject->GetTextLength()); + } + else if (itemStatus == _TABITEM_STATUS_DISABLED) + { + __pTextObject->SetForegroundColor(__pTab->GetDisabledTextColor(), 0, __pTextObject->GetTextLength()); + } + else + { + __pTextObject->SetForegroundColor(__pTab->GetTextColor(), 0, __pTextObject->GetTextLength()); + } + + __pTextObject->SetBounds(itemDrawRect); + __pTextObject->Draw(*_CanvasImpl::GetInstance(*pCanvas)); + + DrawBadgeIcon(pDrawItem, pCanvas); + + return; +} + +void +_TabPresenter::DrawItemBackground(Canvas* pCanvas, FloatRectangle& itemRect) +{ + Bitmap* pBackgroundBitmap = __pTab->GetBackgroundBitmap(); + Bitmap* pDisabledBackgroundBitmap = __pTab->GetDisabledBackgroundBitmap(); + + if ((!__pTab->IsEnabled()) && (pDisabledBackgroundBitmap != null)) + { + DrawResourceBitmap(*pCanvas, itemRect, pDisabledBackgroundBitmap); + return; + } + + DrawResourceBitmap(*pCanvas, itemRect, pBackgroundBitmap); + + return; +} + +void +_TabPresenter::DrawPressedItemBackground(Canvas* pCanvas, FloatRectangle& itemRect) +{ + Bitmap* pBackgroundBitmap = __pTab->GetPressedItemBackgroundBitmap(); + Bitmap* pBackgroundEffectBitmap = __pTab->GetPressedItemBackgroundEffectBitmap(); + + DrawResourceBitmap(*pCanvas, itemRect, pBackgroundBitmap); + + DrawResourceBitmap(*pCanvas, itemRect, pBackgroundEffectBitmap); + + return; +} + +void +_TabPresenter::DrawHighlightedItemBackground(Canvas* pCanvas, FloatRectangle& itemRect) +{ + Bitmap* pBackgroundBitmap = __pTab->GetHighlightedItemBackgroundBitmap(); + + DrawResourceBitmap(*pCanvas, itemRect, pBackgroundBitmap); + + return; +} + +void +_TabPresenter::DrawSelectedItemBackground(Canvas* pCanvas, FloatRectangle& itemRect) +{ + Bitmap* pBackgroundBitmap = __pTab->GetSelectedItemBackgroundBitmap(); + + DrawResourceBitmap(*pCanvas, itemRect, pBackgroundBitmap); + + return; +} + +void +_TabPresenter::DrawIconItem(Canvas* pCanvas) +{ + ClearLastResult(); + Rectangle bounds = __pTab->GetBounds(); + + _TabItem* pDrawItem = null; + String itemText(L""); + FloatRectangle itemDrawRect(0.0f, 0.0f, 0.0f, 0.0f); + const int itemCount = GetItemCount(); + + SetFirstLoadedItemIndex(); + SetLastLoadedItemIndex(); + + _TabItemStatus itemStatus = _TABITEM_STATUS_NORMAL; + + float iconWidth = 0.0f; + float iconHeight = 0.0f; + float bottomMargin = 0.0f; + float lineHeight = 0.0f; + float selectedLineHeight = 0.0f; + + GET_SHAPE_CONFIG(TAB::ICON_WIDTH, __pTab->GetOrientation(), iconWidth); + GET_SHAPE_CONFIG(TAB::ICON_HEIGHT, __pTab->GetOrientation(), iconHeight); + GET_SHAPE_CONFIG(TAB::BOTTOM_MARGIN, __pTab->GetOrientation(), bottomMargin); + GET_SHAPE_CONFIG(TAB::HEIGHT, __pTab->GetOrientation(), lineHeight); + GET_SHAPE_CONFIG(TAB::SELECTED_LINE_HEIGHT, __pTab->GetOrientation(), selectedLineHeight); + + int startIndex = __firstLoadedItemIndex - 1; + int endIndex = __lastLoadedItemIndex + 1; + if (__firstLoadedItemIndex == 0) + { + startIndex = __firstLoadedItemIndex; + } + + if (__lastLoadedItemIndex == (GetItemCount() - 1)) + { + endIndex = __lastLoadedItemIndex; + } + + for (int i = startIndex; i <= endIndex; i++) + { + if (i == __editItemIndex) + { + continue; + } + + pDrawItem = GetItemAt(i); + SysTryReturnVoidResult(NID_UI_CTRL, pDrawItem, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + SetFirstDrawnItemIndex(0); + + itemDrawRect = pDrawItem->GetItemBounds(); + __dividerLine.x = itemDrawRect.x + (itemDrawRect.width - (__dividerLine.width) / 2.0f); + __dividerLine.y = ((itemDrawRect.height - __dividerLine.height) / 2.0f); + + itemStatus = pDrawItem->GetStatus(); + + if (!__pTab->IsEnabled()) + { + itemStatus = _TABITEM_STATUS_DISABLED; + } + + if (itemStatus == _TABITEM_STATUS_SELECTED) + { + DrawSelectedItemBackground(pCanvas, itemDrawRect); + __selectedLine.width = __itemWidth; + __selectedLine.x = itemDrawRect.x; + __selectedLine.y = lineHeight - selectedLineHeight; + + DrawResourceBitmap(*pCanvas, __selectedLine, __pHorizontalLineBitmap); + + } + else if (itemStatus == _TABITEM_STATUS_PRESSED) + { + DrawPressedItemBackground(pCanvas, itemDrawRect); + } + else if (itemStatus == _TABITEM_STATUS_HIGHLIGHTED) + { + DrawHighlightedItemBackground(pCanvas, itemDrawRect); + } + else + { + DrawItemBackground(pCanvas, itemDrawRect); + } + + itemDrawRect.x = itemDrawRect.x + ((itemDrawRect.width - iconWidth) / 2.0f); + itemDrawRect.y = itemDrawRect.y + ((itemDrawRect.height - iconHeight) / 2.0f); + itemDrawRect.width = iconWidth; + itemDrawRect.height = iconHeight; + + Bitmap* pIconBitmap = pDrawItem->GetIcon(); + + DrawResourceBitmap(*pCanvas, itemDrawRect, pIconBitmap); + + if (i < itemCount - 1) + { + DrawItemDivider(*pCanvas, __dividerLine); + } + + DrawBadgeIcon(pDrawItem, pCanvas); + } + + if (__isEditMode) + { + DrawEditIconItem(pCanvas); + } + + return; +} + +void +_TabPresenter::DrawEditIconItem(Canvas* pCanvas) +{ + ClearLastResult(); + + Rectangle bounds = __pTab->GetBounds(); + + _TabItem* pDrawItem = null; + String itemText(L""); + FloatRectangle itemDrawRect(0.0f, 0.0f, 0.0f, 0.0f); + + _TabItemStatus itemStatus = _TABITEM_STATUS_NORMAL; + + float iconWidth = 0.0f; + float iconHeight = 0.0f; + float bottomMargin = 0.0f; + float lineHeight = 0.0f; + float selectedLineHeight = 0.0f; + + GET_SHAPE_CONFIG(TAB::ICON_WIDTH, __pTab->GetOrientation(), iconWidth); + GET_SHAPE_CONFIG(TAB::ICON_HEIGHT, __pTab->GetOrientation(), iconHeight); + GET_SHAPE_CONFIG(TAB::BOTTOM_MARGIN, __pTab->GetOrientation(), bottomMargin); + GET_SHAPE_CONFIG(TAB::HEIGHT, __pTab->GetOrientation(), lineHeight); + GET_SHAPE_CONFIG(TAB::SELECTED_LINE_HEIGHT, __pTab->GetOrientation(), selectedLineHeight); + + pDrawItem = GetItemAt(__editItemIndex); + SysTryReturnVoidResult(NID_UI_CTRL, pDrawItem, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + itemDrawRect = pDrawItem->GetItemBounds(); + __dividerLine.x = itemDrawRect.x + (itemDrawRect.width - (__dividerLine.width) / 2.0f); + __dividerLine.y = ((itemDrawRect.height - __dividerLine.height) / 2.0f); + + itemStatus = pDrawItem->GetStatus(); + + if (itemStatus == _TABITEM_STATUS_SELECTED) + { + DrawSelectedItemBackground(pCanvas, itemDrawRect); + __selectedLine.width = __itemWidth; + __selectedLine.x = itemDrawRect.x; + __selectedLine.y = lineHeight - selectedLineHeight; + + DrawResourceBitmap(*pCanvas, __selectedLine, __pHorizontalLineBitmap); + } + else if (itemStatus == _TABITEM_STATUS_PRESSED) + { + DrawPressedItemBackground(pCanvas, itemDrawRect); + } + else if (itemStatus == _TABITEM_STATUS_HIGHLIGHTED) + { + DrawHighlightedItemBackground(pCanvas, itemDrawRect); + } + else + { + DrawItemBackground(pCanvas, itemDrawRect); + } + + itemDrawRect.x = itemDrawRect.x + ((itemDrawRect.width - iconWidth) / 2.0f); + itemDrawRect.y = itemDrawRect.y + ((itemDrawRect.height - iconHeight) / 2.0f); + itemDrawRect.width = iconWidth; + itemDrawRect.height = iconHeight; + + Bitmap* pIconBitmap = pDrawItem->GetIcon(); + + DrawResourceBitmap(*pCanvas, itemDrawRect, pIconBitmap); + + DrawBadgeIcon(pDrawItem, pCanvas); + + return; + +} + +void +_TabPresenter::DrawItem(Canvas* pCanvas) +{ + ClearLastResult(); + + Rectangle bounds = __pTab->GetBounds(); + + TextSimple* pSimpleText = null; + _TabItem* pDrawItem = null; + Rectangle buttonBounds(0, 0, 0, 0); + String itemText(L""); + FloatRectangle itemDrawRect(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle itemDrawIconRect(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle itemDrawTextRect(0.0f, 0.0f, 0.0f, 0.0f); + const int itemCount = GetItemCount(); + + SetFirstLoadedItemIndex(); + SetLastLoadedItemIndex(); + + _TabItemStatus itemStatus = _TABITEM_STATUS_NORMAL; + + bool isMultiline = false; + int textLength = 0; + float topMargin = 0.0f; + float bottomMargin = 0.0f; + float leftMargin = 0.0f; + float rightMargin = 0.0f; + float topMarginTextOnly = 0.0f; + float bottomMarginTextOnly = 0.0f; + float iconWidth = 0.0f; + float iconHeight = 0.0f; + float iconGap = 0.0f; + float lineHeight = 0.0f; + float selectedLineHeight = 0.0f; + + GET_SHAPE_CONFIG(TAB::TOP_MARGIN, __pTab->GetOrientation(), topMarginTextOnly); + GET_SHAPE_CONFIG(TAB::BOTTOM_MARGIN, __pTab->GetOrientation(), bottomMarginTextOnly); + GET_SHAPE_CONFIG(TAB::ICON_TEXT_TOP_MARGIN, __pTab->GetOrientation(), topMargin); + GET_SHAPE_CONFIG(TAB::ICON_TEXT_BOTTOM_MARGIN, __pTab->GetOrientation(), bottomMargin); + GET_SHAPE_CONFIG(TAB::ITEM_LEFT_MARGIN, __pTab->GetOrientation(), leftMargin); + GET_SHAPE_CONFIG(TAB::ITEM_RIGHT_MARGIN, __pTab->GetOrientation(), rightMargin); + GET_SHAPE_CONFIG(TAB::ICON_TEXT_ICON_WIDTH, __pTab->GetOrientation(), iconWidth); + GET_SHAPE_CONFIG(TAB::ICON_TEXT_ICON_HEIGHT, __pTab->GetOrientation(), iconHeight); + GET_FIXED_VALUE_CONFIG(TAB::ICON_TEXT_GAP, __pTab->GetOrientation(), iconGap); + GET_SHAPE_CONFIG(TAB::HEIGHT, __pTab->GetOrientation(), lineHeight); + GET_SHAPE_CONFIG(TAB::SELECTED_LINE_HEIGHT, __pTab->GetOrientation(), selectedLineHeight); + + int startIndex = __firstLoadedItemIndex - 1; + int endIndex = __lastLoadedItemIndex + 1; + if (__firstLoadedItemIndex == 0) + { + startIndex = __firstLoadedItemIndex; + } + + if (__lastLoadedItemIndex == (GetItemCount() - 1)) + { + endIndex = __lastLoadedItemIndex; + } + + for (int i = startIndex; i <= endIndex; i++) + { + if (i == __editItemIndex) + { + continue; + } + + pDrawItem = GetItemAt(i); + SysTryReturnVoidResult(NID_UI_CTRL, pDrawItem, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + SetFirstDrawnItemIndex(0); + + itemDrawRect = pDrawItem->GetItemBounds(); + __dividerLine.x = itemDrawRect.x + (itemDrawRect.width - (__dividerLine.width) / 2.0f); + __dividerLine.y = ((itemDrawRect.height - __dividerLine.height) / 2.0f); + + itemStatus = pDrawItem->GetStatus(); + + if (!__pTab->IsEnabled()) + { + itemStatus = _TABITEM_STATUS_DISABLED; + } + + if (itemStatus == _TABITEM_STATUS_SELECTED) + { + DrawSelectedItemBackground(pCanvas, itemDrawRect); + __selectedLine.width = __itemWidth; + __selectedLine.x = itemDrawRect.x; + } + else if (itemStatus == _TABITEM_STATUS_PRESSED) + { + DrawPressedItemBackground(pCanvas, itemDrawRect); + } + else if (itemStatus == _TABITEM_STATUS_HIGHLIGHTED) + { + DrawHighlightedItemBackground(pCanvas, itemDrawRect); + } + else + { + DrawItemBackground(pCanvas, itemDrawRect); + } + + + itemText = pDrawItem->GetText(); + + __pTextObject->RemoveAll(); + pSimpleText = new (std::nothrow)TextSimple(const_cast (itemText.GetPointer()), itemText.GetLength()); + SysTryReturnVoidResult(NID_UI_CTRL, pSimpleText, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + __pTextObject->AppendElement(*pSimpleText); + + __pTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_WORD); + __pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); + __pTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_CENTER | TEXT_OBJECT_ALIGNMENT_MIDDLE); + textLength = __pTextObject->GetTextLength(); + + if ((pDrawItem->GetIcon()) == null) + { + topMargin = topMarginTextOnly; + bottomMargin = bottomMarginTextOnly; + } + FloatDimension textDim(0.0f, 0.0f); + + float fontSize = 0.0f; + + if (__showItemCount < __fontChangeItemCount) + { + if (isMultiline == false) + { + GET_SHAPE_CONFIG(TAB::ICON_TEXT_FONT_SIZE_01, __pTab->GetOrientation(), fontSize); + } + else + { + GET_SHAPE_CONFIG(TAB::ICON_TEXT_FONT_SIZE_02, __pTab->GetOrientation(), fontSize); + } + } + else if (__showItemCount == __fontChangeItemCount) + { + if (isMultiline == false) + { + GET_SHAPE_CONFIG(TAB::ICON_TEXT_FONT_SIZE_02, __pTab->GetOrientation(), fontSize); + } + else + { + GET_SHAPE_CONFIG(TAB::ICON_TEXT_FONT_SIZE_02, __pTab->GetOrientation(), fontSize); + } + } + else + { + if (isMultiline == false) + { + GET_SHAPE_CONFIG(TAB::ICON_TEXT_FONT_SIZE_03, __pTab->GetOrientation(), fontSize); + } + else + { + GET_SHAPE_CONFIG(TAB::ICON_TEXT_FONT_SIZE_03, __pTab->GetOrientation(), fontSize); + } + } + + (_FontImpl::GetInstance(*__pFont))->SetSize(fontSize); + + __pTextObject->SetFont(__pFont, 0, __pTextObject->GetTextLength()); + + __pFont->GetTextExtent(itemText, itemText.GetLength(), textDim); + + itemDrawTextRect = itemDrawRect; + itemDrawTextRect.x = itemDrawRect.x + leftMargin; + isMultiline = false; + if (textDim.width > (__itemWidth / 2.0f)) + { + isMultiline = true; + textDim.width = (__itemWidth / 2.0f); + textDim.height = textDim.height * 2.0f; + } + itemDrawTextRect.width = textDim.width; + itemDrawTextRect.x = itemDrawRect.x + leftMargin; + itemDrawTextRect.x = itemDrawTextRect.x + ((itemDrawRect.width - leftMargin - rightMargin) - (iconWidth + iconGap + itemDrawTextRect.width)) / 2.0f; + itemDrawTextRect.height = textDim.height; + itemDrawIconRect = itemDrawTextRect; + itemDrawTextRect.x = itemDrawIconRect.x + iconWidth + iconGap; + + if ((pDrawItem->GetIcon()) != null) + { + itemDrawIconRect.height = itemDrawRect.height - topMargin - bottomMargin; + itemDrawIconRect.y = itemDrawIconRect.y + topMargin + (itemDrawIconRect.height - iconHeight) / 2.0f; + + itemDrawIconRect.width = iconWidth; + itemDrawIconRect.height = iconHeight; + Bitmap* pIconBitmap = pDrawItem->GetIcon(); + + DrawResourceBitmap(*pCanvas, itemDrawIconRect, pIconBitmap); + + } + else + { + itemDrawTextRect.x = itemDrawRect.x + leftMargin + (itemDrawRect.width - leftMargin - rightMargin - itemDrawTextRect.width) / 2.0f; + } + + + if (isMultiline == false) + { + itemDrawTextRect.y = itemDrawRect.y + topMargin + (itemDrawRect.height - topMargin - bottomMargin - itemDrawTextRect.height) / 2.0f; + } + else + { + itemDrawTextRect.y = itemDrawRect.y + topMargin + (itemDrawRect.height - topMargin - bottomMargin - itemDrawTextRect.height) / 2.0f; + } + __pTextObject->SetBounds(itemDrawTextRect); + __pTextObject->Compose(); + if (itemStatus == _TABITEM_STATUS_SELECTED) + { + __pTextObject->SetForegroundColor(__pTab->GetSelectedTextColor(), 0, __pTextObject->GetTextLength()); + __selectedLine.y = lineHeight - selectedLineHeight; + + DrawResourceBitmap(*pCanvas, __selectedLine, __pHorizontalLineBitmap); + + } + else if (itemStatus == _TABITEM_STATUS_PRESSED) + { + __pTextObject->SetForegroundColor(__pTab->GetPressedTextColor(), 0, __pTextObject->GetTextLength()); + } + else if (itemStatus == _TABITEM_STATUS_HIGHLIGHTED) + { + __pTextObject->SetForegroundColor(__pTab->GetHighlightedTextColor(), 0, __pTextObject->GetTextLength()); + } + else if (itemStatus == _TABITEM_STATUS_DISABLED) + { + __pTextObject->SetForegroundColor(__pTab->GetDisabledTextColor(), 0, __pTextObject->GetTextLength()); + } + else + { + __pTextObject->SetForegroundColor(__pTab->GetTextColor(), 0, __pTextObject->GetTextLength()); + } + + __pTextObject->SetBounds(itemDrawTextRect); + + __pTextObject->Draw(*_CanvasImpl::GetInstance(*pCanvas)); + + if (i < itemCount - 1) + { + DrawItemDivider(*pCanvas, __dividerLine); + } + DrawBadgeIcon(pDrawItem, pCanvas); + } + + if (__isEditMode) + { + DrawEditIconTextItem(pCanvas); + } + return; +} + +void +_TabPresenter::DrawEditIconTextItem(Canvas* pCanvas) +{ + ClearLastResult(); + + Rectangle bounds = __pTab->GetBounds(); + + TextSimple* pSimpleText = null; + _TabItem* pDrawItem = null; + Rectangle buttonBounds(0, 0, 0, 0); + String itemText(L""); + FloatRectangle itemDrawRect(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle itemDrawIconRect(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle itemDrawTextRect(0.0f, 0.0f, 0.0f, 0.0f); + + _TabItemStatus itemStatus = _TABITEM_STATUS_NORMAL; + + bool isMultiline = false; + + int textLength = 0; + float topMargin = 0.0f; + float bottomMargin = 0.0f; + float leftMargin = 0.0f; + float rightMargin = 0.0f; + float topMarginTextOnly = 0.0f; + float bottomMarginTextOnly = 0.0f; + float iconWidth = 0.0f; + float iconHeight = 0.0f; + float iconGap = 0.0f; + float lineHeight = 0.0f; + float selectedLineHeight = 0.0f; + + GET_SHAPE_CONFIG(TAB::TOP_MARGIN, __pTab->GetOrientation(), topMarginTextOnly); + GET_SHAPE_CONFIG(TAB::BOTTOM_MARGIN, __pTab->GetOrientation(), bottomMarginTextOnly); + GET_SHAPE_CONFIG(TAB::ICON_TEXT_TOP_MARGIN, __pTab->GetOrientation(), topMargin); + GET_SHAPE_CONFIG(TAB::ICON_TEXT_BOTTOM_MARGIN, __pTab->GetOrientation(), bottomMargin); + GET_SHAPE_CONFIG(TAB::ITEM_LEFT_MARGIN, __pTab->GetOrientation(), leftMargin); + GET_SHAPE_CONFIG(TAB::ITEM_RIGHT_MARGIN, __pTab->GetOrientation(), rightMargin); + GET_SHAPE_CONFIG(TAB::ICON_TEXT_ICON_WIDTH, __pTab->GetOrientation(), iconWidth); + GET_SHAPE_CONFIG(TAB::ICON_TEXT_ICON_HEIGHT, __pTab->GetOrientation(), iconHeight); + GET_FIXED_VALUE_CONFIG(TAB::ICON_TEXT_GAP, __pTab->GetOrientation(), iconGap); + GET_SHAPE_CONFIG(TAB::HEIGHT, __pTab->GetOrientation(), lineHeight); + GET_SHAPE_CONFIG(TAB::SELECTED_LINE_HEIGHT, __pTab->GetOrientation(), selectedLineHeight); + + pDrawItem = GetItemAt(__editItemIndex); + SysTryReturnVoidResult(NID_UI_CTRL, pDrawItem, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + SetFirstDrawnItemIndex(0); + + itemDrawRect = pDrawItem->GetItemBounds(); + __dividerLine.x = itemDrawRect.x + (itemDrawRect.width - (__dividerLine.width) / 2.0f); + __dividerLine.y = ((itemDrawRect.height - __dividerLine.height) / 2.0f); + + itemStatus = pDrawItem->GetStatus(); + + if (itemStatus == _TABITEM_STATUS_SELECTED) + { + DrawSelectedItemBackground(pCanvas, itemDrawRect); + __selectedLine.width = __itemWidth; + __selectedLine.x = itemDrawRect.x; + } + else if (itemStatus == _TABITEM_STATUS_PRESSED) + { + DrawPressedItemBackground(pCanvas, itemDrawRect); + } + else if (itemStatus == _TABITEM_STATUS_HIGHLIGHTED) + { + DrawHighlightedItemBackground(pCanvas, itemDrawRect); + } + else + { + DrawItemBackground(pCanvas, itemDrawRect); + } + + itemText = pDrawItem->GetText(); + + __pTextObject->RemoveAll(); + pSimpleText = new (std::nothrow)TextSimple(const_cast (itemText.GetPointer()), itemText.GetLength()); + SysTryReturnVoidResult(NID_UI_CTRL, pSimpleText, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + __pTextObject->AppendElement(*pSimpleText); + + __pTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_WORD); + __pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); + __pTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_CENTER | TEXT_OBJECT_ALIGNMENT_MIDDLE); + textLength = __pTextObject->GetTextLength(); + + if ((pDrawItem->GetIcon()) == null) + { + topMargin = topMarginTextOnly; + bottomMargin = bottomMarginTextOnly; + } + + FloatDimension textDim(0.0f, 0.0f); + + + float fontSize = 0.0f; + + if (__showItemCount < __fontChangeItemCount) + { + if (isMultiline == false) + { + GET_SHAPE_CONFIG(TAB::ICON_TEXT_FONT_SIZE_01, __pTab->GetOrientation(), fontSize); + } + else + { + GET_SHAPE_CONFIG(TAB::ICON_TEXT_FONT_SIZE_02, __pTab->GetOrientation(), fontSize); + } + } + else if (__showItemCount == __fontChangeItemCount) + { + if (isMultiline == false) + { + GET_SHAPE_CONFIG(TAB::ICON_TEXT_FONT_SIZE_02, __pTab->GetOrientation(), fontSize); + } + else + { + GET_SHAPE_CONFIG(TAB::ICON_TEXT_FONT_SIZE_02, __pTab->GetOrientation(), fontSize); + } + } + else + { + if (isMultiline == false) + { + GET_SHAPE_CONFIG(TAB::ICON_TEXT_FONT_SIZE_03, __pTab->GetOrientation(), fontSize); + } + else + { + GET_SHAPE_CONFIG(TAB::ICON_TEXT_FONT_SIZE_03, __pTab->GetOrientation(), fontSize); + } + } + + (_FontImpl::GetInstance(*__pFont))->SetSize(fontSize); + + __pTextObject->SetFont(__pFont, 0, __pTextObject->GetTextLength()); + + __pFont->GetTextExtent(itemText, itemText.GetLength(), textDim); + + itemDrawTextRect = itemDrawRect; + itemDrawTextRect.x = itemDrawRect.x + leftMargin; + isMultiline = false; + + if (textDim.width > (__itemWidth / 2.0f)) + { + isMultiline = true; + textDim.width = (__itemWidth / 2.0f); + textDim.height = textDim.height * 2.0f; + } + + itemDrawTextRect.width = textDim.width; + itemDrawTextRect.x = itemDrawRect.x + leftMargin; + itemDrawTextRect.x = itemDrawTextRect.x + ((itemDrawRect.width - leftMargin - rightMargin) - (iconWidth + iconGap + itemDrawTextRect.width)) / 2.0f; + itemDrawTextRect.height = textDim.height; + itemDrawIconRect = itemDrawTextRect; + itemDrawTextRect.x = itemDrawIconRect.x + iconWidth + iconGap; + + if ((pDrawItem->GetIcon()) != null) + { + itemDrawIconRect.height = itemDrawRect.height - topMargin - bottomMargin; + itemDrawIconRect.y = itemDrawIconRect.y + topMargin + (itemDrawIconRect.height - iconHeight) / 2.0f; + + itemDrawIconRect.width = iconWidth; + itemDrawIconRect.height = iconHeight; + Bitmap* pIconBitmap = pDrawItem->GetIcon(); + + DrawResourceBitmap(*pCanvas, itemDrawIconRect, pIconBitmap); + } + else + { + itemDrawTextRect.x = itemDrawRect.x + leftMargin + (itemDrawRect.width - leftMargin - rightMargin - itemDrawTextRect.width) / 2.0f; + } + + + if (isMultiline == false) + { + itemDrawTextRect.y = itemDrawRect.y + topMargin + (itemDrawRect.height - topMargin - bottomMargin - itemDrawTextRect.height) / 2.0f; + } + else + { + itemDrawTextRect.y = itemDrawRect.y + topMargin + (itemDrawRect.height - topMargin - bottomMargin - itemDrawTextRect.height) / 2.0f; + } + + __pTextObject->SetBounds(itemDrawTextRect); + __pTextObject->Compose(); + if (itemStatus == _TABITEM_STATUS_SELECTED) + { + __pTextObject->SetForegroundColor(__pTab->GetSelectedTextColor(), 0, __pTextObject->GetTextLength()); + __selectedLine.y = lineHeight - selectedLineHeight; + + DrawResourceBitmap(*pCanvas, __selectedLine, __pHorizontalLineBitmap); + } + else if (itemStatus == _TABITEM_STATUS_PRESSED) + { + __pTextObject->SetForegroundColor(__pTab->GetPressedTextColor(), 0, __pTextObject->GetTextLength()); + } + else if (itemStatus == _TABITEM_STATUS_HIGHLIGHTED) + { + __pTextObject->SetForegroundColor(__pTab->GetHighlightedTextColor(), 0, __pTextObject->GetTextLength()); + } + else if (itemStatus == _TABITEM_STATUS_DISABLED) + { + __pTextObject->SetForegroundColor(__pTab->GetDisabledTextColor(), 0, __pTextObject->GetTextLength()); + } + else + { + __pTextObject->SetForegroundColor(__pTab->GetTextColor(), 0, __pTextObject->GetTextLength()); + } + + __pTextObject->SetBounds(itemDrawTextRect); + + __pTextObject->Draw(*_CanvasImpl::GetInstance(*pCanvas)); + + DrawBadgeIcon(pDrawItem, pCanvas); + + return; +} + +void +_TabPresenter::SetEditItemBounds(const FloatPoint& point) +{ + _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())); + + editRect = pTabItem->GetItemBounds(); + + editRect.x = point.x - (__itemWidth / 2.0f); + pTabItem->SetItemBounds(editRect); + + return; +} + +void +_TabPresenter::DrawItemDivider(Canvas& canvas, FloatRectangle& lineRect) +{ + Color dividerLeftHalfColor; + Color dividerRightHalfColor; + + float halfLineWidth = 0.0f; + + GET_COLOR_CONFIG(TAB::DIVIDER_LEFT_HALF, dividerLeftHalfColor); + GET_COLOR_CONFIG(TAB::DIVIDER_RIGHT_HALF, dividerRightHalfColor); + + result r = E_SUCCESS; + halfLineWidth = lineRect.width / 2.0f; + + canvas.SetForegroundColor(dividerLeftHalfColor); + canvas.SetLineWidth(halfLineWidth); + + r = canvas.DrawLine(FloatPoint(lineRect.x, lineRect.y), FloatPoint(lineRect.x, lineRect.y + lineRect.height)); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + canvas.SetForegroundColor(dividerRightHalfColor); + canvas.SetLineWidth(halfLineWidth); + + r = canvas.DrawLine(FloatPoint(lineRect.x + halfLineWidth, lineRect.y), FloatPoint(lineRect.x + halfLineWidth, lineRect.y + lineRect.height)); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + return; +} + +void +_TabPresenter::DrawHorizontal() +{ + ClearLastResult(); + + int itemCount = GetItemCount(); + int boundItemIndex = 0; + if (__moveDistance == 0.0f) + { + return; + } + if (itemCount == 0) + { + SysLog(NID_UI_CTRL, "itemCount is 0."); + return; + } + + //Bound beyond which the item shouldnt move when flicked + boundItemIndex = itemCount - __itemMaxCount; + + _TabItem* pItem = null; + pItem = GetItemAt(boundItemIndex); + SysTryReturnVoidResult(NID_UI_CTRL, pItem, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + FloatRectangle bounds = pItem->GetItemBounds(); + FloatRectangle itemBounds(0.0f, 0.0f, 0.0f, 0.0f); + if ((bounds.x + __moveDistance) < 0.0f) + { + __moveDistance = -bounds.x; + ResetFlickAnimationTimer(); + } + + pItem = GetItemAt(0); + SysTryReturnVoidResult(NID_UI_CTRL, pItem, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + bounds = pItem->GetItemBounds(); + + if ((bounds.x + __moveDistance) > 0.0f) + { + CalculateItemBounds(); + ResetFlickAnimationTimer(); + return; + } + + for (int i = 0; i < itemCount; i++) + { + pItem = GetItemAt(i); + SysTryReturnVoidResult(NID_UI_CTRL, pItem, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + itemBounds = pItem->GetItemBounds(); + + itemBounds.x = itemBounds.x + __moveDistance; + pItem->SetItemBounds(itemBounds); + } + return; +} + +result +_TabPresenter::ShiftToFocusedItem(int itemIndex, _FocusDirectionMove direction) +{ + if (direction == _FOCUS_DIRECTION_MOVE_LEFT && itemIndex == __firstLoadedItemIndex - 1) //left key pressed + { + SetItemFit(__firstLoadedItemIndex - 1); + } + if (direction == _FOCUS_DIRECTION_MOVE_RIGHT && itemIndex == __lastLoadedItemIndex + 1) //right key pressed + { + SetItemFit(__firstLoadedItemIndex + 1); + } + if(itemIndex == 0) //when touched + { + SetItemFit(0); + } + __pTab->Invalidate(); + + return E_SUCCESS; +} + +void +_TabPresenter::DrawBadgeIcon(_TabItem* pDrawItem, Canvas* pCanvas) +{ + Bitmap* pBadgeIcon = null; + float badgeMargin = 0.0f; + GET_SHAPE_CONFIG(TAB::BADGE_ICON_MARGIN, __pTab->GetOrientation(), badgeMargin); + + pBadgeIcon = pDrawItem->GetBadgeIcon(); + + if (pBadgeIcon != null) + { + FloatRectangle badgeRect = pDrawItem->GetItemBounds(); + + badgeRect.x = (badgeRect.x + badgeRect.width) - pBadgeIcon->GetWidthF() - badgeMargin; + badgeRect.y = badgeMargin; + badgeRect.width = pBadgeIcon->GetWidthF(); + badgeRect.height = pBadgeIcon->GetHeightF(); + + DrawResourceBitmap(*pCanvas, badgeRect, pBadgeIcon); + + pBadgeIcon = null; + } + return; +} + +void +_TabPresenter::CalculateItemBounds(void) +{ + ClearLastResult(); + + GET_SHAPE_CONFIG(TAB::SCREEN_WIDTH, __pTab->GetOrientation(), __width); + GET_SHAPE_CONFIG(TAB::SCREEN_HEIGHT, __pTab->GetOrientation(), __height); + + const int itemCount = GetItemCount(); + + if (itemCount == 0) + { + return; + } + + CalculateTabBounds(true); + + FloatRectangle bounds = __pTab->GetBoundsF(); + + _TabItem* pItem = null; + FloatRectangle itemBounds(0.0f, 0.0f, 0.0f, 0.0f); + + if (__itemMaxCount > itemCount) + { + __showItemCount = itemCount; + } + else + { + __showItemCount = __itemMaxCount; + } + + itemBounds.width = bounds.width / __showItemCount; + itemBounds.height = bounds.height; + __itemWidth = itemBounds.width; + __itemHeight = bounds.height; + + + for (int i = 0; i < itemCount; i++) + { + pItem = GetItemAt(i); + SysTryReturnVoidResult(NID_UI_CTRL, pItem, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + __pAnimInfo[i]->xPosition = itemBounds.x; + __pAnimInfo[i]->totalDistance = __itemWidth; + pItem->SetItemBounds(itemBounds); + itemBounds.x = itemBounds.x + itemBounds.width; + } + return; +} + +void +_TabPresenter::CalculateTabBounds(bool isReset) +{ + FloatRectangle bounds = __pTab->GetBoundsF(); + + bool isMovable = __pTab->IsMovable(); + bool isResizable = __pTab->IsResizable(); + + float lineHeight = 0.0f; + float tabLeftMargin = 0.0f; + float tabRightMargin = 0.0f; + GET_SHAPE_CONFIG(TAB::LEFT_MARGIN, __pTab->GetOrientation(), tabLeftMargin); + GET_SHAPE_CONFIG(TAB::RIGHT_MARGIN, __pTab->GetOrientation(), tabRightMargin); + GET_SHAPE_CONFIG(TAB::HEIGHT, __pTab->GetOrientation(), lineHeight); + + __lastItemIndex = (__pTab->GetItemCount() - 1); + + bounds.height = lineHeight; + + for (int i = 0; i < (__pTab->GetItemCount()); i++) + { + if (__pAnimInfo[i] == null) + { + __pAnimInfo[i] = new (std::nothrow) ReorderAnimationInfo(); + SysTryReturnVoidResult(NID_UI_CTRL, __pAnimInfo[i], E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + __pAnimInfo[i]->totalDistance = 0.0f; + __pAnimInfo[i]->move = 0.0f; + __pAnimInfo[i]->reorderValue = 0; + } + } + + __pTab->SetMovable(true); + __pTab->SetResizable(true); + + __pTab->SetBounds(bounds); + + __pTab->SetMovable(isMovable); + __pTab->SetResizable(isResizable); + + return; + +} + +bool +_TabPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + if (GetItemCount() == 0) + { + return true; + } + __currentTouchPosition = touchinfo.GetCurrentPosition(); + SetFirstLoadedItemIndex(); + SetLastLoadedItemIndex(); + ResetScrollAnimationTimer(); + SetRecalculateItemBounds(false); + ResetFlickAnimationTimer(); + + const int index = GetItemIndexFromPosition(__currentTouchPosition); + if (index == -1) + { + return false; + } + + if (GetItemStatus(index) != _TABITEM_STATUS_SELECTED) + { + SetItemStatus(index, _TABITEM_STATUS_PRESSED); + SetPressedItemIndex(index); + } + + __pTab->Invalidate(); + + return true; +} + +bool +_TabPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + if (GetItemCount() == 0) + { + return true; + } + + Rectangle itemBounds(0, 0, 0, 0); + _TabItem* pItem = null; + + ResetReorderTimer(); + ResetScrollAnimationTimer(); + int index = GetItemIndexFromPosition(touchinfo.GetCurrentPosition()); + + int pressedIndex = GetPressedItemIndex(); + __isRightScrollable = false; + + if (index == -1 && !__isFlickEnabled) + { + SetFirstLoadedItemIndex(); + if (GetItemStatus(pressedIndex) == _TABITEM_STATUS_PRESSED) + { + SetItemStatus(pressedIndex, _TABITEM_STATUS_NORMAL); + } + CalculateItemBounds(); + + __moveDistance = -(GetItemAt(__firstLoadedItemIndex)->GetItemBounds().x); + DrawHorizontal(); + __pTab->Invalidate(); + + __rearIndex = 0; + __isEditMode = false; + return false; + } + if (__isEditMode && __editItemIndex == __rearIndex) + { + FloatRectangle bounds(0.0f, 0.0f, 0.0f, 0.0f); + if (__editItemIndex > 0) + { + pItem = GetItemAt((__editItemIndex - 1)); + SysTryReturn(NID_UI_CTRL, pItem, false, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + bounds = pItem->GetItemBounds(); + bounds.x = bounds.x + __itemWidth; + GetItemAt(__editItemIndex)->SetItemBounds(bounds); + } + else + { + CalculateItemBounds(); + } + } + + // Edit Mode - Item Insert + if (__isEditMode && (__editItemIndex != __rearIndex)) + { + index = __rearIndex; + int selectedIndex = GetSelectedItemIndex(); + SetItemStatus(selectedIndex, _TABITEM_STATUS_NORMAL); + + if (__isDirectionRight) + { + index = index + 1; + } + + __pTab->ChangeItemAt(__editItemIndex, (index)); + if (__editItemIndex < index) + { + SetItemStatus((index-1), _TABITEM_STATUS_SELECTED); + SetSelectedItemIndex((index-1)); + } + else if (__editItemIndex > index) + { + SetItemStatus(index, _TABITEM_STATUS_SELECTED); + SetSelectedItemIndex(index); + } + + SetFirstLoadedItemIndex(); + SetLastLoadedItemIndex(); + + + CalculateItemBounds(); + __moveDistance = -(__firstLoadedItemIndex * __itemWidth); + DrawHorizontal(); + } + else + { + // Pressed -> Selected or Normal + if (GetItemStatus(index) == _TABITEM_STATUS_PRESSED && !__isFlickEnabled && !__isTouchMove) + { + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pTab); + int selectedIndex = GetSelectedItemIndex(); + SetItemStatus(selectedIndex, _TABITEM_STATUS_NORMAL); + + SetItemStatus(index, _TABITEM_STATUS_SELECTED); + SetSelectedItemIndex(index); + } + else + { + int pressedIndex = GetPressedItemIndex(); + if (GetItemStatus(pressedIndex) == _TABITEM_STATUS_PRESSED) + { + SetItemStatus(pressedIndex, _TABITEM_STATUS_NORMAL); + } + } + + SetItemFitToLeft(); + } + + __pTab->Invalidate(); + __isTouchMove = false; + __isEditMode = false; + __editItemIndex = -1; + __rearIndex = -1; + + if (__firstItemIndex > 0) + { + __firstItemIndex--; + } + + if (__lastItemIndex < (__pTab->GetItemCount() - 1)) + { + __lastItemIndex++; + } + + return true; +} + +bool +_TabPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + if (GetItemCount() == 0) + { + return true; + } + + _TabItem* pTabItem = null; + _TabItem* pNextItem = null; + _TabItem* pPrevItem = null; + FloatPoint movedPosition = touchinfo.GetCurrentPosition(); + + int index = GetNextItemIndexFromPosition(movedPosition, __editItemIndex); + SetFirstLoadedItemIndex(); + SetLastLoadedItemIndex(); + + //Remove the Pressed Bitmap during Touch Move + int i = GetPressedItemIndex(); + if (!__isEditMode) + { + if (GetItemStatus(i) == _TABITEM_STATUS_PRESSED) + { + SetItemStatus(i, _TABITEM_STATUS_NORMAL); + Draw(); + } + } + + float distance; + distance = movedPosition.x - __currentTouchPosition.x; + __currentTouchPosition.x = movedPosition.x; + + if (!__isEditMode) + { + return false; + } + + if (distance > 0.0f) + { + if (!__isDirectionRight) + { + __isTimerCanceled = true; + __isRightScrollable = false; + __isLeftScrollable = false; + ResetReorderTimer(); + } + + __isDirectionRight = true; + } + else + { + if (__isDirectionRight) + { + __isTimerCanceled = true; + __isLeftScrollable = false; + __isRightScrollable = false; + ResetReorderTimer(); + } + + __isDirectionRight = false; + } + + pTabItem = GetItemAt(__editItemIndex); + SysTryReturn(NID_UI_CTRL, pTabItem, false, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + FloatRectangle bounds = pTabItem->GetItemBounds(); + if (index != -1) + { + if (__isDirectionRight) + { + pNextItem = GetItemAt(index); + SysTryReturn(NID_UI_CTRL, pNextItem, false, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + FloatRectangle boundsNext = pNextItem->GetItemBounds(); + if ((bounds.x + (__itemWidth / 2.0f)) > (boundsNext.x) && ((bounds.x + __itemWidth) < (boundsNext.x + boundsNext.width))) + { + __pTimerInfo[__timerCount]->index = index; + StartReorderTimer(__timerCount); + __timerCount++; + if (__timerCount >= (__itemMaxCount - 1)) + { + __timerCount = 0; + } + + __isTimerCanceled = false; + __rearIndex = index; + } + } + else + { + pPrevItem = GetItemAt(index); + SysTryReturn(NID_UI_CTRL, pPrevItem, false, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + FloatRectangle boundsPrev = pPrevItem->GetItemBounds(); + if ((bounds.x + (__itemWidth / 2.0f)) > (boundsPrev.x + (__itemWidth / 2.0f)) && ((bounds.x + (__itemWidth / 2.0f)) < (boundsPrev.x + boundsPrev.width))) + { + __pTimerInfo[__timerCount]->index = index; + StartReorderTimer(__timerCount); + __timerCount++; + if (__timerCount >= (__itemMaxCount - 1)) + { + __timerCount = 0; + } + + __isTimerCanceled = false; + __rearIndex = index; + + } + } + } + else //Scroll the entire tab when item moves beyond boundary + { + if ((bounds.x + __itemWidth) > (__width - (__itemWidth / 2.0f))) + { + if (__isDirectionRight) + { + _TabItem* pLastItem = GetItemAt(__lastItemIndex); + SysTryReturn(NID_UI_CTRL, pLastItem, false, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + if ((pLastItem->GetItemBounds().x + pLastItem->GetItemBounds().width) > __width) + { + __isRightScrollable = true; + StartScrollAnimationTimer(); + } + } + } + + if (bounds.x < 0.0f) + { + if (!__isDirectionRight) + { + if (GetItemAt(__firstItemIndex)->GetItemBounds().x < __itemWidth) + { + __isLeftScrollable = true; + StartScrollAnimationTimer(); + } + } + } + } + + SetEditItemBounds(movedPosition); + __pTab->Invalidate(); + + return true; +} + +void +_TabPresenter::ShiftItems(void) +{ + int itemCount = GetItemCount(); + float fitDistance = 0.0f; + _TabItem* pTabItem = null; + FloatRectangle bounds(0.0f, 0.0f, 0.0f, 0.0f); + + pTabItem = GetItemAt(0); + SysTryReturnVoidResult(NID_UI_CTRL, pTabItem, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + bounds = pTabItem->GetItemBounds(); + + for (int i = 0; i < itemCount; i++) + { + if (i == __editItemIndex) + { + continue; + } + + if (__isRightScrollable) + { + if (i == __rearIndex + 1) + { + fitDistance = -(2.0f * __itemWidth); + + } + else + { + fitDistance = -__itemWidth; + } + } + else + { + if (i == __rearIndex - 1) + { + fitDistance = (2.0f * __itemWidth); + + } + else + { + fitDistance = __itemWidth; + } + } + + pTabItem = GetItemAt(i); + SysTryReturnVoidResult(NID_UI_CTRL, pTabItem, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + bounds = pTabItem->GetItemBounds(); + bounds.x = bounds.x + fitDistance; + if (i == __firstItemIndex && ( bounds.x ) >= (2.0f * __itemWidth)) + { + return; + } + + pTabItem->SetItemBounds(bounds); + + } + + if (__isRightScrollable) + { + __rearIndex++; + } + + if (__isLeftScrollable) + { + __rearIndex--; + } + + Draw(); + return; +} + +bool +_TabPresenter::OnLongPressGestureDetected(void) +{ + if (!__pTabModel->IsEditModeEnabled()) + { + return true; + } + + const int index = GetItemIndexFromPosition(__currentTouchPosition); + + if (index == -1) + { + return false; + } + + if (GetItemStatus(index) == _TABITEM_STATUS_PRESSED && GetSelectedItemIndex() != index) + { + SetItemStatus(index, _TABITEM_STATUS_NORMAL); + } + + __isEditMode = true; + __editItemIndex = index; + + if (__editItemIndex == __firstItemIndex) + { + __firstItemIndex = __firstItemIndex + 1; + } + + if (__editItemIndex == __lastItemIndex) + { + __lastItemIndex = __lastItemIndex - 1; + } + + __rearIndex = index; + __pTab->Invalidate(); + + return true; +} + +bool +_TabPresenter::OnFlickGestureDetected(_TouchFlickGestureDetector& gesture) +{ + if (GetItemCount() == 0) + { + return true; + } + + if (__isEditMode) + { + return true; + } + + if (gesture.GetDirection() != _FLICK_DIRECTION_RIGHT && gesture.GetDirection() != _FLICK_DIRECTION_LEFT) + { + return false; + } + + float distanceX = 0.0f; + float distanceY = 0.0f; + float xPosition = 0.0f; + int itemsBeyondScreen = 0; + + gesture.GetDistance(distanceX, distanceY); + SetFirstLoadedItemIndex(); + SetLastLoadedItemIndex(); + int itemCount = GetItemCount(); + + if (distanceX < 0.0f) //left + { + itemsBeyondScreen = (itemCount - 1) - __lastLoadedItemIndex; + xPosition = GetItemAt(__lastLoadedItemIndex)->GetItemBounds().x; + if (xPosition < (3.0f * __itemWidth)) + { + __flickDistance = xPosition - (4.0f * __itemWidth); + } + } + else //Right + { + itemsBeyondScreen = __firstLoadedItemIndex; + xPosition = GetItemAt(__firstLoadedItemIndex)->GetItemBounds().x; + if (xPosition < 0.0f) + { + __flickDistance = -xPosition; + } + + } + + if (itemsBeyondScreen >= (__itemMaxCount - 1)) + { + __flickDistance = (3.0f * __itemWidth); + } + else + { + __flickDistance = (itemsBeyondScreen * __itemWidth); + } + + if (distanceX < 0) //Left flick + { + __flickMove = 0.006f; + __flickFlag = 0; + } + else if (distanceX > 0) //Right flick + { + __flickMove = 0.006f; + __flickDistance = -(__flickDistance); + __flickFlag = 0; + } + else + { + __flickMove = 0.0f; + __flickDistance = 0.0f; + __flickFlag = 0; + __moveDistance = 0.0f; + } + + __isFlickEnabled = true; + + StartFlickAnimationTimer(); + + return true; +} + +void +_TabPresenter::StartFlickAnimation(void) +{ + float distance = CalculateProgress(__flickMove); + __moveDistance = -(__flickDistance * distance); + __flickDistance = (__flickDistance + __moveDistance); + __flickMove = __flickMove + 0.006f; + __flickFlag++; + + if (__flickFlag <= FLICK_ANIMATION_COUNT) + { + StartFlickAnimationTimer(); + } + else + { + ResetFlickAnimationTimer(); + SetItemFitToLeft(); + } + + Draw(); + return; +} + +result +_TabPresenter::StartFlickAnimationTimer(void) +{ + result r = E_SUCCESS; + + if (__pFlickAnimationTimer == null) + { + __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); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + __pFlickAnimationTimer->Cancel(); + } + + r = __pFlickAnimationTimer->Start(FLICK_ANIMATION_TIMER_PERIOD); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + +CATCH: + ResetFlickAnimationTimer(); + return r; +} + +result +_TabPresenter::StartScrollAnimationTimer(void) +{ + result r = E_SUCCESS; + ResetReorderTimer(); + if (__pScrollAnimationTimer == null) + { + __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); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + __pScrollAnimationTimer->Cancel(); + } + + r = __pScrollAnimationTimer->Start(SCROLL_ANIMATION_TIMER_PERIOD); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + +CATCH: + ResetScrollAnimationTimer(); + return r; +} + +result +_TabPresenter::ResetScrollAnimationTimer(void) +{ + if (__pScrollAnimationTimer) + { + delete __pScrollAnimationTimer; + __pScrollAnimationTimer = null; + } + return E_SUCCESS; +} + +result +_TabPresenter::ResetFlickAnimationTimer(void) +{ + if (__pFlickAnimationTimer) + { + delete __pFlickAnimationTimer; + __pFlickAnimationTimer = null; + } + + __isFlickEnabled = false; + __moveDistance = 0.0f; + return E_SUCCESS; +} + +void +_TabPresenter::SetItemFit(int index) +{ + Point pt = Point(0, 0); + int itemCount = GetItemCount(); + float fitDistance = 0.0f; + _TabItem* pTabItem = null; + FloatRectangle bounds(0.0f, 0.0f, 0.0f, 0.0f); + + pTabItem = GetItemAt(index); + SysTryReturnVoidResult(NID_UI_CTRL, pTabItem, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + bounds = pTabItem->GetItemBounds(); + fitDistance = -bounds.x; + + for (int i = 0; i < itemCount; i++) + { + pTabItem = GetItemAt(i); + SysTryReturnVoidResult(NID_UI_CTRL, pTabItem, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + bounds = pTabItem->GetItemBounds(); + bounds.x = bounds.x + fitDistance; + pTabItem->SetItemBounds(bounds); + } + + return; +} + +void +_TabPresenter::SetItemFitToLeft(void) +{ + SetItemFit(__firstLoadedItemIndex); + return; +} + +void +_TabPresenter::SetItemFitToRight(void) +{ + SetItemFit(__lastLoadedItemIndex); + return; +} + +void +_TabPresenter::OnTimerExpired(Timer& timer) +{ + if (&timer == __pFlickAnimationTimer) + { + StartFlickAnimation(); + } + + for (int i = 0; i < _TIMER_COUNT; i++) + { + if (!__isTimerCanceled) + { + if (&timer == __pTimerInfo[i]->pReorderTimer) + { + StartReorderAnimation(__pTimerInfo[i]->index, i); + } + } + } + + if (&timer == __pScrollAnimationTimer) + { + _TabItem* pLastItem = GetItemAt(__lastItemIndex); + SysTryReturnVoidResult(NID_UI_CTRL, pLastItem, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + if ((GetItemAt(__firstItemIndex)->GetItemBounds().x >= __itemWidth)) + { + __isRightScrollable = false; + __isLeftScrollable = false; + } + + if ((pLastItem->GetItemBounds().x + pLastItem->GetItemBounds().width) <= __width && __isDirectionRight) + { + __isRightScrollable = false; + __isLeftScrollable = false; + } + + if (__isRightScrollable || __isLeftScrollable) + { + if ((__rearIndex - 1) == __editItemIndex && !__isDirectionRight) + { + if (__isLeftScrollable) + { + __rearIndex--; + } + } + + if ((__rearIndex + 1) == __editItemIndex && __isDirectionRight) + { + if (__isRightScrollable) + { + __rearIndex++; + } + } + + ShiftItems(); + StartScrollAnimationTimer(); + } + else + { + ResetScrollAnimationTimer(); + } + } + return; +} + +float +_TabPresenter::CalculateProgress(float timeProgress) const +{ + const float segments[3][3] = {{0.0f, 0.01f, 0.45f}, {0.45f, 0.80f, 0.908f}, {0.908f, 0.9999f, 1.0f}}; + float loc_5 = timeProgress / 1; + 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; +} + +result +_TabPresenter::StartReorderTimer(int index) +{ + + result r = E_SUCCESS; + if (__pTimerInfo[index]->pReorderTimer == null) + { + __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); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + __pTimerInfo[index]->pReorderTimer->Cancel(); + } + + r = __pTimerInfo[index]->pReorderTimer->Start(REORDER_TIMER_PERIOD); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + +CATCH: + ResetReorderTimer(); + return r; +} + +void +_TabPresenter::FreeHorizontalLineBitmap() +{ + if (__pHorizontalLineBitmap != null) + { + delete __pHorizontalLineBitmap; + __pHorizontalLineBitmap = null; + } + return; +} + + +result +_TabPresenter::ResetReorderTimer() +{ + for (int index = 0; index < (__pTab->GetItemCount()); index++) + { + if (index < _TIMER_COUNT && __pTimerInfo[index]) + { + if (__pTimerInfo[index]->pReorderTimer) + { + __pTimerInfo[index]->pReorderTimer->Cancel(); + } + } + + if (__pAnimInfo[index]) + { + __pAnimInfo[index]->totalDistance = __itemWidth; + __pAnimInfo[index]->move = 0.5f; + __pAnimInfo[index]->reorderValue = 0; + } + } + return E_SUCCESS; +} + +result +_TabPresenter::CancelReorderTimer(int index) +{ + __pAnimInfo[index]->totalDistance = __itemWidth; + __pAnimInfo[index]->move = 0.5f; + __pAnimInfo[index]->reorderValue = 0; + + for (int i = 0; i <_TIMER_COUNT; i++) + { + if (__pTimerInfo[i]) + { + if (__pTimerInfo[i]->pReorderTimer) + { + __pTimerInfo[i]->pReorderTimer->Cancel(); + } + } + } + return E_SUCCESS; +} + +void +_TabPresenter::StartReorderAnimation(int index, int timerIndex) +{ + float dist = CalculateProgress(__pAnimInfo[index]->move); + __reorderDist = -(__pAnimInfo[index]->totalDistance * dist); + + __pAnimInfo[index]->move = __pAnimInfo[index]->move + 0.5f; + __pAnimInfo[index]->totalDistance = (__pAnimInfo[index]->totalDistance + __reorderDist); + + if (!__isDirectionRight) + { + __reorderDist = -__reorderDist; + } + + __pAnimInfo[index]->reorderValue++; + + if (__pAnimInfo[index]->reorderValue <= REORDER_ANIMATION_COUNT) + { + SwapItems(index, __reorderDist); + StartReorderTimer(timerIndex); + + } + else + { + CancelReorderTimer(index); + } + + + Draw(); + return; + +} + +void +_TabPresenter::SwapItems(int indexDest, float distance) +{ + _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())); + + itemBounds = pItem->GetItemBounds(); + itemBounds.x = itemBounds.x + distance; + SetFirstLoadedItemIndex(); + SetLastLoadedItemIndex(); + int animIndex; + int index; + index = GetNextItemIndexFromPosition(FloatPoint(itemBounds.x,itemBounds.y), __editItemIndex); + + if (distance < 0.0f) //Moving Left + { + animIndex = indexDest - __lastLoadedItemIndex; + + if (__pTab->GetItemCount() >= __itemMaxCount) + { + animIndex = animIndex + (__itemMaxCount - 1); + } + else + { + animIndex = animIndex + (__pTab->GetItemCount() - 1); + } + + if ((__lastLoadedItemIndex > __editItemIndex) && (indexDest < __editItemIndex)) + { + animIndex++; + } + + if ((itemBounds.x <= __pAnimInfo[animIndex]->xPosition) && (itemBounds.x >= __pAnimInfo[animIndex-1]->xPosition)) + { + if (index == -1 || index == indexDest) //to avoid overlaping of items on each other + { + pItem->SetItemBounds(itemBounds); + } + } + } + + if (distance > 0.0f) + { + animIndex = indexDest - __firstLoadedItemIndex; + + if ((__firstLoadedItemIndex < __editItemIndex) && (indexDest > __editItemIndex)) + { + animIndex--; + } + + if ((itemBounds.x >= __pAnimInfo[animIndex]->xPosition) && (itemBounds.x <= __pAnimInfo[animIndex+1]->xPosition)) + { + if (index == -1 || index == indexDest) + { + pItem->SetItemBounds(itemBounds); + } + } + } + + Draw(); + return; + +} + +int +_TabPresenter::GetNextItemIndexFromPosition(const FloatPoint& point, int curIndex) const +{ + FloatRectangle itemBounds(0.0f, 0.0f, 0.0f, 0.0f); + + int itemIndex = GetFirstDrawnItemIndex(); + + if ((point.x < 0.0f) || (point.x > __pTab->GetBoundsF().width)) + { + return -1; + } + + _TabItem* pItem = __pTab->GetItemAt(itemIndex); + + if (pItem == null) + { + return -1; + } + + while (pItem != null) + { + itemBounds = pItem->GetItemBounds(); + + if ((point.x > itemBounds.x) && (point.x < itemBounds.x + itemBounds.width)) + { + if (curIndex != itemIndex) + { + return itemIndex; + } + } + + itemIndex++; + pItem = __pTab->GetItemAt(itemIndex); + + if (pItem == null) + { + break; + } + } + + return -1; +} + +void +_TabPresenter::SetFirstLoadedItemIndex() +{ + for (int i = 0; i < __pTab->GetItemCount(); i++) + { + if (__editItemIndex == i) + { + continue; + } + + if ((GetItemAt(i)->GetItemBounds().x + (__itemWidth / 2.0f)) <= __itemWidth) + { + __firstLoadedItemIndex = i; + } + } + return; +} + +void +_TabPresenter::SetLastLoadedItemIndex() +{ + for (int i = 0; i < __pTab->GetItemCount(); i++) + { + int X = GetItemAt(i)->GetItemBounds().x; + + if (__editItemIndex == i) + { + continue; + } + + if ((X + (__itemWidth / 2.0f)) < __width) + { + __lastLoadedItemIndex = i; + } + } + return; +} + +void +_TabPresenter::OnFontChanged(Font* pFont) +{ + __pFont = pFont; + return; +} + +void +_TabPresenter::OnFontInfoRequested(unsigned long& style, float& size) +{ + style = FONT_STYLE_BOLD; + GET_SHAPE_CONFIG(TAB::FONT_SIZE_01, __pTab->GetOrientation(), size); + return; +} + +void +_TabPresenter::OnBoundsChanged() +{ + FloatRectangle bounds = __pTab->GetBoundsF(); + + if (bounds.width <= __tabMinimumSize) + { + bounds.width = __tabMinimumSize; + } + + __pTab->SetBounds(bounds); + SetRecalculateItemBounds(true); + + return; +} + +void +_TabPresenter::OnChangeLayout(_ControlOrientation orientation) +{ + __isEditMode = false; + __isTimerCanceled = true; + __isRightScrollable = false; + __isLeftScrollable = false; + + ResetScrollAnimationTimer(); + ResetReorderTimer(); + ResetFlickAnimationTimer(); + SetRecalculateItemBounds(true); + + return; +} + +void +_TabPresenter::MoveNext(void) +{ + __moveDistance = (__itemWidth) * (-1.0f); + DrawHorizontal(); + __pTab->Draw(); + + return; +} + +void +_TabPresenter::MovePrevious(void) +{ + __moveDistance = __itemWidth; + DrawHorizontal(); + __pTab->Draw(); + + return; +} + +void +_TabPresenter::MoveToFirst(void) +{ + SetRecalculateItemBounds(true); + __pTab->Draw(); + + return; +} + +void +_TabPresenter::MoveToLast(int distance) +{ + __moveDistance = (distance - __itemWidth * (__itemMaxCount - 1)) * (-1.0f); + DrawHorizontal(); + __pTab->Draw(); + + return; +} + +void +_TabPresenter::OnVisualElementAnimationStarted(const VisualElementAnimation& animation, const String& keyName, VisualElement& target) +{ + return; +} + +void +_TabPresenter::OnVisualElementAnimationRepeated(const VisualElementAnimation& animation, const String& keyName, VisualElement& target, long currentRepeatCount) +{ + return; +} + +void +_TabPresenter::OnVisualElementAnimationFinished(const VisualElementAnimation& animation, const String& keyName, VisualElement& target, bool isCompletedNormally) +{ + + return; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_TableView.cpp b/src/ui/controls/FUiCtrl_TableView.cpp new file mode 100644 index 0000000..5e06843 --- /dev/null +++ b/src/ui/controls/FUiCtrl_TableView.cpp @@ -0,0 +1,1564 @@ +// +// 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_TableView.cpp + * @brief This file implements the _TableView class. + */ + +#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" +#include "FUiCtrl_TableViewItem.h" +#include "FUiCtrl_TableViewItemProvider.h" +#include "FUiCtrl_TableViewItemProviderAdaptor.h" +#include "FUiCtrl_UiTableViewItemEvent.h" + + +using namespace Tizen::Base; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Animations; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +IMPLEMENT_PROPERTY(_TableView); + +_TableView::_TableView(void) + : __pTableViewPresenter(null) + , __pFastScroll(null) + , __pTableViewItemEvent(null) + , __itemDividerEnabled(false) + , __sweepEnabled(false) + , __reorderEnabled(false) + , __sectionStyle(false) + , __groupedLookEnable(false) + , __tableViewStyle(TABLE_VIEW_STYLE_SIMPLE) + , __scrollStyle(TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT) + , __pBitmapOfEmptyTableView(null) + , __pBackgroundBitmap(null) + , __textOfEmptyTableView(L"Empty TableView") + , __pExpandGroupAnimation(null) + , __pCollapseGroupAnimation(null) + , __pSweptAnimation(null) + , __pRemoveItemtAnimation(null) +{ + GET_COLOR_CONFIG(TABLEVIEW::SECTIONITEM_BG_NORMAL, __sectionStyleColor); + GET_COLOR_CONFIG(TABLEVIEW::ITEM_DIVIDER_BOTTOM_BG_NORMAL, __itemDividerColor); +} + +_TableView::~_TableView(void) +{ + if (__pTableViewPresenter) + { + __pTableViewPresenter->BlockAnimationCallback(true); + } + + if (GetVisualElement() != null) + { + __pExpandGroupAnimation->SetVisualElementAnimationTickEventListener(null); + __pExpandGroupAnimation->SetVisualElementAnimationStatusEventListener(null); + + __pCollapseGroupAnimation->SetVisualElementAnimationTickEventListener(null); + __pCollapseGroupAnimation->SetVisualElementAnimationStatusEventListener(null); + + __pSweptAnimation->SetVisualElementAnimationTickEventListener(null); + __pSweptAnimation->SetVisualElementAnimationStatusEventListener(null); + + __pRemoveItemtAnimation->SetVisualElementAnimationTickEventListener(null); + __pRemoveItemtAnimation->SetVisualElementAnimationStatusEventListener(null); + + GetVisualElement()->RemoveAllAnimations(); + } + + //SuperClass will delete. + __pTableViewPresenter = null; + + if (__pFastScroll != null) + { + DetachSystemChild(*__pFastScroll); + + delete __pFastScroll; + __pFastScroll = null; + } + + delete __pTableViewItemEvent; + __pTableViewItemEvent = null; + + delete __pExpandGroupAnimation; + __pExpandGroupAnimation = null; + + delete __pCollapseGroupAnimation; + __pCollapseGroupAnimation = null; + + delete __pSweptAnimation; + __pSweptAnimation = null; + + delete __pRemoveItemtAnimation; + __pRemoveItemtAnimation = null; +} + +_TableView* +_TableView::CreateTableViewN(TableViewStyle style, bool itemDivider, TableViewScrollBarStyle scrollStyle) +{ + ClearLastResult(); + result r = E_SUCCESS; + + _TableView* pTableView = null; + + _ControlManager* pControlManager = _ControlManager::GetInstance(); + 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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , E_SYSTEM, "[%s] Propagating", GetErrorMessage(r)); + + pTableView->AcquireHandle(); + + r = pTableView->Initialize(style, itemDivider, scrollStyle); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Failed to Initialize", GetErrorMessage(r)); + + return pTableView; + +CATCH: + delete pTableView; + return null; +} + +result +_TableView::Initialize(TableViewStyle style, bool itemDivider, TableViewScrollBarStyle scrollStyle) +{ + result r = E_SUCCESS; + + _TableViewPresenter* pPresenter = new (std::nothrow) _TableViewPresenter(); + 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)); + + r = _ScrollPanel::Initialize(*pPresenter, false); + SetTableViewPresenter(pPresenter); + SetScrollAreaAutoResizingEnabled(false); + + FloatRectangle rect = GetBoundsF(); + SetScrollAreaBounds(rect); + + SetTableViewStyle(style); + SetScrollStyle(scrollStyle); + SetItemDividerEnabled(itemDivider); + + 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(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pExpandGroupAnimation->SetVisualElementAnimationTickEventListener(__pTableViewPresenter); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pExpandGroupAnimation->SetVisualElementAnimationStatusEventListener(__pTableViewPresenter); + 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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + __pCollapseGroupAnimation->SetTimingFunction(VisualElementAnimation::GetTimingFunctionByName("EaseInOut")); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pCollapseGroupAnimation->SetVisualElementAnimationTickEventListener(__pTableViewPresenter); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pCollapseGroupAnimation->SetVisualElementAnimationStatusEventListener(__pTableViewPresenter); + 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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + __pSweptAnimation->SetTimingFunction(VisualElementAnimation::GetTimingFunctionByName("EaseInOut")); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pSweptAnimation->SetVisualElementAnimationTickEventListener(__pTableViewPresenter); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pSweptAnimation->SetVisualElementAnimationStatusEventListener(__pTableViewPresenter); + 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,"[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + __pRemoveItemtAnimation->SetTimingFunction(VisualElementAnimation::GetTimingFunctionByName("EaseIn")); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pRemoveItemtAnimation->SetVisualElementAnimationTickEventListener(this); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pRemoveItemtAnimation->SetVisualElementAnimationStatusEventListener(this); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + +CATCH: + delete __pExpandGroupAnimation; + __pExpandGroupAnimation = null; + + delete __pCollapseGroupAnimation; + __pCollapseGroupAnimation = null; + + delete __pSweptAnimation; + __pSweptAnimation = null; + + delete __pRemoveItemtAnimation; + __pRemoveItemtAnimation = null; + + return r; +} + +_TableViewPresenter* +_TableView::GetTableViewPresenter(void) const +{ + return __pTableViewPresenter; +} + +void +_TableView::SetTableViewPresenter(const _TableViewPresenter* pPresenter) +{ + __pTableViewPresenter = const_cast<_TableViewPresenter*>(pPresenter); +} + +result +_TableView::SetItemProvider(const _TableViewItemProvider* pProvider) +{ + return __pTableViewPresenter->SetItemProvider(pProvider); +} + +void +_TableView::SetItemProviderAdaptor(_TableViewItemProviderAdaptor* pProviderAdaptor) +{ + __pTableViewPresenter->SetTableViewItemProviderAdaptor(pProviderAdaptor); +} + +_TableViewItemProviderAdaptor* +_TableView::GetItemProviderAdaptor(void) const +{ + return __pTableViewPresenter->GetTableViewItemProviderAdaptor(); +} + +void +_TableView::SetSweepEnabled(bool enable) +{ + __sweepEnabled = enable; +} + +bool +_TableView::IsSweepEnabled(void) const +{ + return __sweepEnabled; +} + +bool +_TableView::IsReorderModeEnabled(void) const +{ + return __reorderEnabled; +} + +result +_TableView::SetReorderModeEnabled(bool enable) +{ + if (__reorderEnabled != enable) + { + __reorderEnabled = enable; + + __pTableViewPresenter->SetReorderMode(enable); + } + + return E_SUCCESS; +} + +void +_TableView::SetAnnexFocused(bool isAnnexFocused) +{ + return __pTableViewPresenter->SetAnnexFocused(isAnnexFocused); +} + +bool +_TableView::IsAnnexFocused(void) +{ + return __pTableViewPresenter->IsAnnexFocused(); +} + +void +_TableView::SetTableViewFocused(bool focusStatus) +{ + return __pTableViewPresenter->SetTableViewFocused(focusStatus); +} + +bool +_TableView::IsTableViewFocused(void) +{ + return __pTableViewPresenter->IsTableViewFocused(); +} + +result +_TableView::GetFocusedItemIndex(int& groupIndex, int& itemIndex) const +{ + return __pTableViewPresenter->GetFocusedItemIndex(groupIndex, itemIndex); +} + +result +_TableView::SetItemChecked(int groupIndex, int itemIndex, bool check) +{ + if (IsOnProcessing()) + { + return E_INVALID_OPERATION; + } + return __pTableViewPresenter->SetItemChecked(groupIndex, itemIndex, check); +} + +bool +_TableView::IsItemChecked(int groupIndex, int itemIndex) const +{ + return __pTableViewPresenter->IsItemChecked(groupIndex, itemIndex); +} + +result +_TableView::SetItemEnabled(int groupIndex, int itemIndex, bool enable) +{ + if (IsOnProcessing()) + { + return E_INVALID_OPERATION; + } + return __pTableViewPresenter->SetItemEnabled(groupIndex, itemIndex, enable); +} + +void +_TableView::CheckItemHeightAndRefreshLayout(int groupIndex, int itemIndex) +{ + TableViewItemTag itemTag = {groupIndex, itemIndex}; + __pTableViewPresenter->CheckItemHeightAndRefreshLayout(itemTag, true); +} + +_TableViewItem* +_TableView::FindItem(int groupIndex, int itemIndex) const +{ + TableViewItemTag itemTag = {groupIndex, itemIndex}; + + return __pTableViewPresenter->FindItem(itemTag); +} + +void +_TableView::UnloadItem(int groupIndex, int itemIndex) +{ + if (IsOnProcessing()) + { + return; + } + return __pTableViewPresenter->UnloadItem(groupIndex, itemIndex); +} + +_TableViewItem* +_TableView::LoadItem(int groupIndex, int itemIndex) +{ + if (IsOnProcessing()) + { + return null; + } + return __pTableViewPresenter->LoadItem(groupIndex, itemIndex); +} + +void +_TableView::RefreshItemLayout(int groupIndex, int itemIndex) +{ + __pTableViewPresenter->RefreshItemLayout(groupIndex, itemIndex); +} + +void +_TableView::GetFirstLoadedItemIndex(int& groupIndex, int& itemIndex) const +{ + __pTableViewPresenter->GetFirstLoadedItemIndex(groupIndex, itemIndex); +} + +void +_TableView::GetLastLoadedItemIndex(int& groupIndex, int& itemIndex) const +{ + __pTableViewPresenter->GetLastLoadedItemIndex(groupIndex, itemIndex); +} + +void +_TableView::ResetSweepItem(void) +{ + __pTableViewPresenter->ResetSweepItem(); +} + +void +_TableView::GetSweepItemIndex(int& groupIndex, int& itemIndex) const +{ + __pTableViewPresenter->GetSweepItemIndex(groupIndex, itemIndex); +} + +int +_TableView::GetPressedItemCount(void) +{ + return __pTableViewPresenter->GetPressedItemCount(); +} + +float +_TableView::GetTopMargin(void) const +{ + return __pTableViewPresenter->GetTopMargin(); +} + +result +_TableView::SetTopMargin(float topMargin) +{ + return __pTableViewPresenter->SetTopMargin(topMargin); +} + +float +_TableView::GetBottomMargin(void) const +{ + return __pTableViewPresenter->GetBottomMargin(); +} + +result +_TableView::SetBottomMargin(float bottomMargin) +{ + return __pTableViewPresenter->SetBottomMargin(bottomMargin); +} + +bool +_TableView::IsItemEnabled(int groupIndex, int itemIndex) const +{ + return __pTableViewPresenter->IsItemEnabled(groupIndex, itemIndex); +} + +result +_TableView::GetTopDrawnItemIndex(int& groupIndex, int& itemIndex) const +{ + groupIndex = -1; + itemIndex = -1; + + return __pTableViewPresenter->GetTopDrawnItemIndex(groupIndex, itemIndex); +} + +result +_TableView::SetTopDrawnItemIndex(int groupIndex, int itemIndex) +{ + if (IsOnProcessing()) + { + return E_INVALID_OPERATION; + } + return __pTableViewPresenter->SetTopDrawnItemIndex(groupIndex, itemIndex); +} + +result +_TableView::GetBottomDrawnItemIndex(int& groupIndex, int& itemIndex) const +{ + groupIndex = -1; + itemIndex = -1; + + return __pTableViewPresenter->GetBottomDrawnItemIndex(groupIndex, itemIndex); +} + +result +_TableView::SetBottomDrawnItemIndex(int groupIndex, int itemIndex) +{ + if (IsOnProcessing()) + { + return E_INVALID_OPERATION; + } + return __pTableViewPresenter->SetBottomDrawnItemIndex(groupIndex, itemIndex); +} + +result +_TableView::ScrollByPixel(float scrollDistance) +{ + return __pTableViewPresenter->ScrollByPixel(scrollDistance); +} + +void +_TableView::SetScrollEnabled(bool enable) +{ + __pTableViewPresenter->SetScrollEnabled(enable); +} + +bool +_TableView::IsScrollEnabled(void) const +{ + return __pTableViewPresenter->IsScrollEnabled(); +} + +result +_TableView::AddTableViewItemEventListener(const _ITableViewItemEventListener& listener) +{ + result r = E_SUCCESS; + + if (__pTableViewItemEvent == null) + { + __pTableViewItemEvent = new (std::nothrow) _UiTableViewItemEvent(); + 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, "[%s] A system error has been occurred. Unable to construct Item Event.", GetErrorMessage(E_SYSTEM)); + } + + r = __pTableViewItemEvent->AddListener(listener); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +result +_TableView::RemoveTableViewItemEventListener(const _ITableViewItemEventListener& listener) +{ + 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); +} + +result +_TableView::AddGroupedTableViewItemEventListener(const _ITableViewItemEventListener& listener) +{ + result r = E_SUCCESS; + + if (__pTableViewItemEvent == null) + { + __pTableViewItemEvent = new (std::nothrow) _UiTableViewItemEvent(); + 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, "[%s] A system error has been occurred. Unable to construct Item Event.", GetErrorMessage(E_SYSTEM)); + } + + r = __pTableViewItemEvent->AddListener(listener); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +result +_TableView::RemoveGroupedTableViewItemEventListener(const _ITableViewItemEventListener& listener) +{ + 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); +} + +result +_TableView::AddSectionTableViewItemEventListener(const _ITableViewItemEventListener& listener) +{ + result r = E_SUCCESS; + + if (__pTableViewItemEvent == null) + { + __pTableViewItemEvent = new (std::nothrow) _UiTableViewItemEvent(); + 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, "[%s] A system error has been occurred. Unable to construct Item Event.", GetErrorMessage(E_SYSTEM)); + } + + r = __pTableViewItemEvent->AddListener(listener); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +result +_TableView::RemoveSectionTableViewItemEventListener(const _ITableViewItemEventListener& listener) +{ + 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); +} + +result +_TableView::AddFastScrollListener(const _IUiFastScrollListener& listener) +{ + 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; +} + +result +_TableView::RemoveFastScrollListener(const _IUiFastScrollListener& listener) +{ + 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; +} + +_FastScroll* +_TableView::GetFastScrollBar(void) const +{ + return __pFastScroll; +} + +result +_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, "[%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; + + const wchar_t* pIndexTextArray = text.GetPointer(); + int indexLenth = 1; + int indexCount = text.GetLength(); + int childOrder = 0; + + // Set the primary index. + _FastScrollIndex* pRootIndex = __pFastScroll->GetIndex(); + if (pRootIndex == null) + { + pRootIndex = _FastScrollIndex::CreateFastScrollIndexN(); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, pRootIndex != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __pFastScroll->SetIndex(pRootIndex); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + pRootIndex->RemoveChildren(true); + } + + if (useSearchIcon == true) + { + Bitmap* pSearchIcon = null; + 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, "[%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, "[%s] Primary Index is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); + + childOrder++; + } + + r = pRootIndex->AddChildTextIndexArray(childOrder, pIndexTextArray, indexLenth, indexCount); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __pFastScroll->UpdateIndex(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + return E_SUCCESS; +} + +result +_TableView::SetScrollStyle(TableViewScrollBarStyle scrollStyle) +{ + __scrollStyle = scrollStyle; + + return E_SUCCESS; +} + +TableViewStyle +_TableView::GetTableViewStyle(void) const +{ + return __tableViewStyle; +} + +void +_TableView::SetTableViewStyle(TableViewStyle style) +{ + if(__tableViewStyle == style) + { + return; + } + + __tableViewStyle = style; + + if (__tableViewStyle == TABLE_VIEW_STYLE_SECTION) + { + int topMargin = 0; + GET_FIXED_VALUE_CONFIG(TABLEVIEW::SECTIONITEM_TOP_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, topMargin); + SetTopMargin(topMargin); + + int x = 0; + GET_SHAPE_CONFIG(TABLEVIEW::GROUPITEM_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, x); + __pTableViewPresenter->SetLeftMargin(x); + + __groupedLookEnable = true; + } +} + +TableViewScrollBarStyle +_TableView::GetScrollStyle(void) const +{ + return __scrollStyle; +} + +int +_TableView::GetGroupCount(void) const +{ + return __pTableViewPresenter->GetGroupCount(); +} + +int +_TableView::GetItemCountAt(int groupIndex) const +{ + 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); + + if (GetTableViewStyle() == TABLE_VIEW_STYLE_SECTION) + { + // sub section footer + if (__pTableViewPresenter->HasSectionFooter(groupIndex) == true) + { + itemCount--; + if (itemCount < 0) + { + itemCount = 0; + } + } + } + + return itemCount; +} + +result +_TableView::RefreshTableView(int groupIndex, int itemIndex, TableViewRefreshType type, bool animation) +{ + if (IsOnProcessing()) + { + return E_INVALID_OPERATION; + } + + return __pTableViewPresenter->RefreshTableView(groupIndex, itemIndex, type, animation); +} + +result +_TableView::RefreshAllItems(void) +{ + if (IsOnProcessing()) + { + return E_INVALID_OPERATION; + } + + return __pTableViewPresenter->RefreshAllItems(); +} + +void +_TableView::RestoreEditCopyPasteManager(void) +{ + __pTableViewPresenter->RestoreEditCopyPasteManager(); +} + +result +_TableView::UpdateTableView(bool isRestoreAnnexFocusValue) +{ + if (IsOnProcessing()) + { + return E_INVALID_OPERATION; + } + return __pTableViewPresenter->UpdateTableView(isRestoreAnnexFocusValue); +} + +result +_TableView::GetItemIndexFromPosition(const Point& position, int& groupIndex, int& itemIndex) const +{ + return __pTableViewPresenter->GetItemIndexFromPosition(_CoordinateSystemUtils::ConvertToFloat(position), groupIndex, itemIndex); +} + +result +_TableView::GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& position, int& groupIndex, int& itemIndex) const +{ + return __pTableViewPresenter->GetItemIndexFromPosition(position, groupIndex, itemIndex); +} + + +result +_TableView::SetPropertySectionColor(const Variant& sectionColor) +{ + __sectionStyleColor = sectionColor.ToColor(); + + return E_SUCCESS; +} + +result +_TableView::SetSectionColor(const Color& color) +{ + if (GetTableViewStyle() != 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; + } + + if (__sectionStyleColor == color) + { + return E_SUCCESS; + } + + result r = SetProperty("sectionColor", Variant(color)); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return __pTableViewPresenter->SetStatusChanged(true); +} + +Variant +_TableView::GetPropertySectionColor(void) const +{ + return Variant(__sectionStyleColor); +} + +Color +_TableView::GetSectionColor(void) const +{ + if (GetTableViewStyle() != TABLE_VIEW_STYLE_SECTION) + { + SetLastResult(E_SUCCESS); + return Color(0); + } + + Variant sectionColor = GetProperty("sectionColor"); + + return sectionColor.ToColor(); +} + +Variant +_TableView::GetPropertyItemDividerColor(void) const +{ + return Variant(__itemDividerColor); +} + +Color +_TableView::GetItemDividerColor(void) const +{ + Variant itemDividerColor = GetProperty("itemDividerColor"); + + return itemDividerColor.ToColor(); +} + +result +_TableView::SetPropertyItemDividerColor(const Variant& itemDividerColor) +{ + if(__itemDividerColor == itemDividerColor.ToColor()) + { + return E_SUCCESS; + } + + __itemDividerColor = itemDividerColor.ToColor(); + + return __pTableViewPresenter->SetStatusChanged(true); +} + +result +_TableView::SetItemDividerColor(const Color& color) +{ + return SetProperty("itemDividerColor", Variant(color)); +} + +bool +_TableView::IsItemDividerEnabled(void) const +{ + return __itemDividerEnabled; +} + +void +_TableView::SetItemDividerEnabled(bool enable) +{ + __itemDividerEnabled = enable; +} + +Bitmap* +_TableView::GetBitmapOfEmptyTableView(void) const +{ + return __pBitmapOfEmptyTableView; +} + +result +_TableView::SetBitmapOfEmptyTableView(const Bitmap* pBitmap) +{ + Bitmap* pCloneBitmap = null; + + if (pBitmap == null) + { + delete __pBitmapOfEmptyTableView; + __pBitmapOfEmptyTableView = null; + + return E_SUCCESS; + } + else + { + pCloneBitmap = _BitmapImpl::CloneN(*pBitmap); + SysTryReturn(NID_UI_CTRL, pCloneBitmap != null, GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + delete __pBitmapOfEmptyTableView; + __pBitmapOfEmptyTableView = pCloneBitmap; + } + + return __pTableViewPresenter->SetStatusChanged(true); +} + +Variant +_TableView::GetPropertyTextColorOfEmptyTableView(void) const +{ + return Variant(__textColorOfEmptyTableView); +} + +Color +_TableView::GetTextColorOfEmptyTableView(void) const +{ + Variant textColorOfEmptyTableView = GetProperty("textColorOfEmptyTableView"); + + return textColorOfEmptyTableView.ToColor(); +} + +result +_TableView::SetPropertyTextColorOfEmptyTableView(const Variant& textColorOfEmptyTableView) +{ + __textColorOfEmptyTableView = textColorOfEmptyTableView.ToColor(); + + return E_SUCCESS; +} + +result +_TableView::SetTextColorOfEmptyTableView(const Color& color) +{ + if (__textColorOfEmptyTableView == color) + { + return E_SUCCESS; + } + + result r = SetProperty("textColorOfEmptyTableView", Variant(color)); + + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return __pTableViewPresenter->SetStatusChanged(true); +} + +Variant +_TableView::GetPropertyTextOfEmptyTableView(void) const +{ + return Variant(__textOfEmptyTableView); +} + +String +_TableView::GetTextOfEmptyTableView(void) const +{ + Variant textOfEmptyTableView = GetProperty("textOfEmptyTableView"); + + return textOfEmptyTableView.ToString(); +} + +result +_TableView::SetPropertyTextOfEmptyTableView(const Variant& textOfEmptyTableView) +{ + __textOfEmptyTableView = textOfEmptyTableView.ToString(); + + return E_SUCCESS; +} + +result +_TableView::SetTextOfEmptyTableView(const String& text) +{ + if (__textOfEmptyTableView == text) + { + return E_SUCCESS; + } + + result r = SetProperty("textOfEmptyTableView", Variant(text)); + + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return __pTableViewPresenter->SetStatusChanged(true); +} + +void +_TableView::FireTableViewItemEvent(int groupIndex, int itemIndex, TableViewNotifyType type, _TableViewItem* pItem) +{ + if (type == TABLEVIEW_NOTIFY_TYPE_ANNEX_CHECK) + { + __pTableViewPresenter->GetModel()->SetItemChecked(groupIndex, itemIndex, true); + } + else if (type == TABLEVIEW_NOTIFY_TYPE_ANNEX_UNCHECK) + { + __pTableViewPresenter->GetModel()->SetItemChecked(groupIndex, itemIndex, false); + } + + if (__pTableViewItemEvent != null) + { + _TableViewItemEventArg* pArg = new (std::nothrow) _TableViewItemEventArg(groupIndex, itemIndex, 0, 0, pItem, type); + SysTryReturnVoidResult(NID_UI_CTRL, pArg, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + __pTableViewItemEvent->Fire(*pArg); + } +} + +void +_TableView::FireTableViewItemSweepEvent(int groupIndex, int itemIndex, TableViewSweepDirection directioin) +{ + 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,"[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + __pTableViewItemEvent->Fire(*pArg); + } +} + +void +_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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + __pTableViewItemEvent->Fire(*pArg); + } +} +void +_TableView::FireTableViewItemReorderEvent(int fromGroupIndex, int fromItemIndex, int toGroupIndex, int toItemIndex) +{ + 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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + __pTableViewItemEvent->Fire(*pArg); + } +} + +void +_TableView::FireTableViewContextItemActivationEvent(int groupIndex, int itemIndex, _TableViewItem* pItem, bool activated) +{ + 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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + __pTableViewItemEvent->Fire(*pArg); + } +} + +result +_TableView::ExpandGroup(int groupIndex) +{ + if (IsOnProcessing()) + { + return E_INVALID_OPERATION; + } + return __pTableViewPresenter->ExpandGroup(groupIndex, true); +} + +result +_TableView::CollapseGroup(int groupIndex) +{ + if (IsOnProcessing()) + { + return E_INVALID_OPERATION; + } + return __pTableViewPresenter->CollapseGroup(groupIndex, true); +} + +bool +_TableView::IsGroupExpanded(int groupIndex) const +{ + return __pTableViewPresenter->IsGroupExpanded(groupIndex); +} + +result +_TableView::ExpandAllGroup(bool animation) +{ + if (IsOnProcessing()) + { + return E_INVALID_OPERATION; + } + + int groupCount = GetGroupCount(); + + for (int i = 0; i < groupCount; i++) + { + __pTableViewPresenter->ExpandGroup(i, false); + } + + return E_SUCCESS; +} + +result +_TableView::CollapseAllGroup(bool animation) +{ + if (IsOnProcessing()) + { + return E_INVALID_OPERATION; + } + + int groupCount = GetGroupCount(); + + for (int i = 0; i < groupCount; i++) + { + __pTableViewPresenter->CollapseGroup(i, false); + } + + return E_SUCCESS; +} + +void +_TableView::StopExpandCollapseAnimation(void) +{ + __pTableViewPresenter->StopExpandCollapseAnimation(); +} + +void +_TableView::SetGroupedLookEnabled(bool enable) +{ + __groupedLookEnable = enable; + + if (__tableViewStyle == TABLE_VIEW_STYLE_SECTION && !__groupedLookEnable) + { + __pTableViewPresenter->SetLeftMargin(0); + } +} + +bool +_TableView::IsGroupedLookEnabled(void) const +{ + return __groupedLookEnable; +} + +bool +_TableView::GetFirstDrawnFlag(void) const +{ + return __pTableViewPresenter->GetFirstDrawnFlag(); +} + +int +_TableView::GetMaxItemCachingSize(void) const +{ + return __pTableViewPresenter->GetMaxItemCachingSize(); +} + +result +_TableView::OpenContextItem(int groupIndex, int itemIndex) +{ + return __pTableViewPresenter->OpenContextItem(groupIndex, itemIndex); +} +result +_TableView::CloseContextItem(int groupIndex, int itemIndex) +{ + return __pTableViewPresenter->CloseContextItem(groupIndex, itemIndex); +} +bool +_TableView::IsContextItemOpened(int groupIndex, int itemIndex) const +{ + return __pTableViewPresenter->IsContextItemOpened(groupIndex, itemIndex); +} + +result +_TableView::SetSectionHeaderTextHorizontalAlignment(int sectionIndex, HorizontalAlignment alignment) +{ + return __pTableViewPresenter->SetSectionHeaderTextHorizontalAlignment(sectionIndex, alignment); +} + +HorizontalAlignment +_TableView::GetSectionHeaderTextHorizontalAlignment(int sectionIndex) const +{ + return __pTableViewPresenter->GetSectionHeaderTextHorizontalAlignment(sectionIndex); +} + +result +_TableView::SetSectionFooterTextHorizontalAlignment(int sectionIndex, HorizontalAlignment alignment) +{ + return __pTableViewPresenter->SetSectionFooterTextHorizontalAlignment(sectionIndex, alignment); +} + +HorizontalAlignment +_TableView::GetSectionFooterTextHorizontalAlignment(int sectionIndex) const +{ + return __pTableViewPresenter->GetSectionFooterTextHorizontalAlignment(sectionIndex); +} + +void +_TableView::FireItemTouchReleasedEventDuringPressing(int groupIndex, int itemIndex) +{ + __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) +{ + __pTableViewPresenter->Draw(); +} + +void +_TableView::OnChildAttached(const _Control& child) +{ + _ScrollPanel::OnChildAttached(child); +} + +void +_TableView::OnChildDetached(const _Control& child) +{ + _ScrollPanel::OnChildDetached(child); +} + +void +_TableView::OnBoundsChanged(void) +{ + if (__scrollStyle == TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL || __scrollStyle == TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL_FIXED || __scrollStyle == TABLE_VIEW_SCROLL_BAR_STYLE_NONE) + { + _Scroll* pScroll = _ScrollPanel::GetScrollBar(); + if (pScroll == null) + { + FloatRectangle bounds = GetBoundsF(); + + pScroll = _Scroll::CreateScrollN(*this, + SCROLL_DIRECTION_VERTICAL, + false, + false, + false, + false, + bounds.height, + bounds.height, + 0); + SysTryReturnVoidResult(NID_UI_CTRL, pScroll != null, GetLastResult(), "[%s] Propagating", GetErrorMessage(GetLastResult())); + + pScroll->EnableScrollingEffect(false); + pScroll->SetVisibleState(false); + _ScrollPanel::SetScrollBar(pScroll); + + pScroll->AddScrollEventListener(*this); + AttachSystemChild(*pScroll); + } + + if (__scrollStyle == TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL || __scrollStyle == TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL_FIXED) + { + if (__pFastScroll == null) + { + if (__scrollStyle == TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL_FIXED) + { + __pFastScroll = _FastScroll::CreateFastScrollN(*this, false); + } + else + { + __pFastScroll = _FastScroll::CreateFastScrollN(*this); + } + + if (__pFastScroll != null) + { + AttachSystemChild(*__pFastScroll); + } + } + else + { + __pFastScroll->OnParentBoundsChanged(); + } + } + } + else + { + _Scroll* pScroll = _ScrollPanel::GetScrollBar(); + + if (pScroll == null) + { + FloatRectangle bounds = GetBoundsF(); + + pScroll = _Scroll::CreateScrollN(*this, + SCROLL_DIRECTION_VERTICAL, + (((__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), + false, + bounds.height, + bounds.height, + 0); + SysTryReturnVoidResult(NID_UI_CTRL, pScroll != null, GetLastResult(), "[%s] Propagating", GetErrorMessage(GetLastResult())); + + pScroll->EnableScrollingEffect(true); + _ScrollPanel::SetScrollBar(pScroll); + + pScroll->AddScrollEventListener(*this); + AttachSystemChild(*pScroll); + } + } + + _ScrollPanel::OnBoundsChanged(); +} + +void +_TableView::OnChangeLayout(_ControlOrientation orientation) +{ + __pTableViewPresenter->OnChangeLayout(orientation); +} + +_UiTouchEventDelivery +_TableView::OnPreviewTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pTableViewPresenter->OnPreviewTouchPressed(source, touchinfo); +} + +_UiTouchEventDelivery +_TableView::OnPreviewTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pTableViewPresenter->OnPreviewTouchMoved(source, touchinfo); +} + +_UiTouchEventDelivery +_TableView::OnPreviewTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pTableViewPresenter->OnPreviewTouchReleased(source, touchinfo); +} + +_UiTouchEventDelivery +_TableView::OnPreviewTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pTableViewPresenter->OnPreviewTouchCanceled(source, touchinfo); +} + +bool +_TableView::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pTableViewPresenter->OnTouchPressed(source, touchinfo); +} + +bool +_TableView::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pTableViewPresenter->OnTouchMoved(source, touchinfo); +} + +bool +_TableView::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pTableViewPresenter->OnTouchReleased(source, touchinfo); +} + +bool +_TableView::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + return __pTableViewPresenter->OnTouchCanceled(source, touchinfo); +} + +bool +_TableView::OnFocusGained(const _Control& source) +{ + __pTableViewPresenter->SetTableViewFocused(true); + + 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) +{ + return __pTableViewPresenter->OnFlickGestureDetected(gesture); +} + +bool +_TableView::OnFlickGestureCanceled(_TouchFlickGestureDetector& gesture) +{ + return __pTableViewPresenter->OnFlickGestureCanceled(gesture); +} + +result +_TableView::SetTableViewStatusChanged(bool changed) +{ + return __pTableViewPresenter->SetStatusChanged(changed); +} + +bool +_TableView::IsOnProcessing(void) +{ + _TableViewItemProviderAdaptor* pProviderAdapter = __pTableViewPresenter->GetTableViewItemProviderAdaptor(); + if (pProviderAdapter != null) + { + if (pProviderAdapter->IsOnProcessing()) + { + return true; + } + } + + return false; +} + +VisualElementValueAnimation* +_TableView::GetVisualElementValueAnimation(const Tizen::Base::String& keyName) const +{ + ClearLastResult(); + + VisualElementValueAnimation* pAnimation = null; + + if (keyName == L"EXPAND_GROUP_ANIMATION") + { + pAnimation = __pExpandGroupAnimation; + } + else if (keyName == L"COLLAPSE_GROUP_ANIMATION") + { + pAnimation = __pCollapseGroupAnimation; + } + else if (keyName == L"SWEEP_ITEM_ANIMATION") + { + pAnimation = __pSweptAnimation; + } + else if (keyName == L"REMOVE_ITEM_ANIMATION") + { + pAnimation = __pRemoveItemtAnimation; + } + + return pAnimation; +} + +void +_TableView::SetFocusDuringOrientationChange(void) +{ + __pTableViewPresenter->SetFocusDuringOrientationChange(); +} + +bool +_TableView::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) +{ + return __pTableViewPresenter->OnKeyPressed(source, keyInfo); +} + +bool +_TableView::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) +{ + return __pTableViewPresenter->OnKeyReleased(source, keyInfo); +} + +bool +_TableView::IsChildControlFocusManage(void) const +{ + return true; +} + +void +_TableView::OnDrawFocus(void) +{ + return __pTableViewPresenter->OnDrawFocus(); +} + +void +_TableView::OnFocusModeStateChanged(void) +{ + return __pTableViewPresenter->OnFocusModeStateChanged(); +} + +void +_TableView::OnVisibleStateChanged(void) +{ + return __pTableViewPresenter->OnVisibleStateChanged(); +} + +void +_TableView::OnAncestorEnableStateChanged(const _Control& control) +{ + return __pTableViewPresenter->OnAncestorEnableStateChanged(control); +} + +void +_TableView::OnAncestorVisibleStateChanged(const _Control& control) +{ + return __pTableViewPresenter->OnAncestorVisibleStateChanged(control); +} + +void +_TableView::OnFocusableStateChanged(bool focusalbeState) +{ + return __pTableViewPresenter->OnFocusableStateChanged(focusalbeState); +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_TableViewImpl.cpp b/src/ui/controls/FUiCtrl_TableViewImpl.cpp new file mode 100644 index 0000000..bdebd6d --- /dev/null +++ b/src/ui/controls/FUiCtrl_TableViewImpl.cpp @@ -0,0 +1,1568 @@ +// +// 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_TableViewImpl.cpp +* @brief This file contains implementation of _TableViewImpl class +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "FUiCtrl_TableViewImpl.h" +#include "FUiCtrl_TableViewItemEventArg.h" +#include "FUiCtrl_TableViewItemProvider.h" +#include "FUiCtrl_FastScrollEvent.h" +#include "FUiCtrl_FastScrollEventArg.h" +#include "FUiCtrl_ScrollEvent.h" +#include "FUiCtrl_ScrollEventArg.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_UiBuilder.h" +#include "FUi_ResourceSizeInfo.h" +#include "FUi_ResourceManager.h" + +using namespace Tizen::Ui; +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +Tizen::Graphics::Dimension +_TableViewImpl::TableViewSizeInfo::GetDefaultMinimumSize(_ControlOrientation orientation) const +{ + 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] A system error has been occurred.", GetErrorMessage(r)); + return dimension; +} + +_TableViewImpl* +_TableViewImpl::GetInstance(TableView& tableView) +{ + return static_cast <_TableViewImpl*>(tableView._pControlImpl); +} + +const _TableViewImpl* +_TableViewImpl::GetInstance(const TableView& tableView) +{ + return static_cast (tableView._pControlImpl); +} + + +_TableViewImpl* +_TableViewImpl::GetInstance(GroupedTableView& tableView) +{ + return static_cast <_TableViewImpl*>(tableView._pControlImpl); +} + +const _TableViewImpl* +_TableViewImpl::GetInstance(const GroupedTableView& tableView) +{ + return static_cast (tableView._pControlImpl); +} + + +_TableViewImpl* +_TableViewImpl::GetInstance(SectionTableView& tableView) +{ + return static_cast <_TableViewImpl*>(tableView._pControlImpl); +} + +const _TableViewImpl* +_TableViewImpl::GetInstance(const SectionTableView& tableView) +{ + return static_cast (tableView._pControlImpl); +} + +_TableViewImpl::_TableViewImpl(Container* pTableView, _TableView* pCore) + : _ContainerImpl(pTableView, pCore) + , __pTableViewEvent(null) + , __pScrollEvent(null) + , __pFastScrollEvent(null) + , __useSearchIcon(false) + , __tableViewPublic() +{ +} + +_TableViewImpl::~_TableViewImpl() +{ + if (__pScrollEvent != null) + { + delete __pScrollEvent; + __pScrollEvent = null; + } + + if (__pFastScrollEvent != null) + { + delete __pFastScrollEvent; + __pFastScrollEvent = null; + } + + if (__pTableViewEvent != null) + { + delete __pTableViewEvent; + __pTableViewEvent = null; + } +} + +const char* +_TableViewImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Controls::TableView"; +} + +const _TableView& +_TableViewImpl::GetCore(void) const +{ + return static_cast (_ControlImpl::GetCore()); +} + +_TableView& +_TableViewImpl::GetCore(void) +{ + return static_cast <_TableView&>(_ControlImpl::GetCore()); +} + + _TableViewImpl* +_TableViewImpl::CreateTableViewImplN(Container* pPublic, FloatRectangle bounds, TableViewStyle style, bool itemDivider, TableViewScrollBarStyle scrollStyle) +{ + result r = E_SUCCESS; + ClearLastResult(); + + r = GET_SIZE_INFO(TableView).CheckInitialSizeValidF(FloatDimension(bounds.width, bounds.height), _CONTROL_ORIENTATION_PORTRAIT); + 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, "[%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, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + + pImpl->SetPublic(style, pPublic); + + SetLastResult(r); + + return pImpl; + +CATCH: + delete pCore; + + return null; +} + +void +_TableViewImpl::SetPublic(TableViewStyle style, Container *pPublic) +{ + __tableViewPublic.style = style; + + if (style == TABLE_VIEW_STYLE_SIMPLE) + { + __tableViewPublic.pTableView = static_cast (pPublic); + } + else if (style == TABLE_VIEW_STYLE_GROUPED) + { + __tableViewPublic.pGroupedTableView = static_cast (pPublic); + } + else + { + __tableViewPublic.pSectionTableView = static_cast (pPublic); + } +} + + +result +_TableViewImpl::SetSimpleStyleItemProvider(ITableViewItemProvider* pProvider) +{ + TableViewStyle style = GetCore().GetTableViewStyle(); + 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, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + result r = pItemProvider->SetSimpleStyleItemProvider(pProvider); + if (r != E_SUCCESS) + { + delete pItemProvider; + SysTryReturn(NID_UI_CTRL, false, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + + return GetCore().SetItemProvider(pItemProvider); +} + +result +_TableViewImpl::SetGroupedStyleItemProvider(IGroupedTableViewItemProvider* pProvider) +{ + TableViewStyle style = GetCore().GetTableViewStyle(); + 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, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + + result r = pItemProvider->SetGroupedStyleItemProvider(pProvider); + if (r != E_SUCCESS) + { + delete pItemProvider; + SysTryReturn(NID_UI_CTRL, false, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + + return GetCore().SetItemProvider(pItemProvider); +} + +result +_TableViewImpl::SetSectionStyleItemProvider(ISectionTableViewItemProvider* pProvider) +{ + TableViewStyle style = GetCore().GetTableViewStyle(); + 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, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + + result r = pItemProvider->SetSectionStyleItemProvider(pProvider); + if (r != E_SUCCESS) + { + delete pItemProvider; + SysTryReturn(NID_UI_CTRL, false, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + + return GetCore().SetItemProvider(pItemProvider); +} + +result +_TableViewImpl::SetSimpleStyleItemProviderF(ITableViewItemProviderF* pProvider) +{ + TableViewStyle style = GetCore().GetTableViewStyle(); + 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, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + result r = pItemProvider->SetSimpleStyleItemProviderF(pProvider); + if (r != E_SUCCESS) + { + delete pItemProvider; + SysTryReturn(NID_UI_CTRL, false, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + + return GetCore().SetItemProvider(pItemProvider); +} + +result +_TableViewImpl::SetGroupedStyleItemProviderF(IGroupedTableViewItemProviderF* pProvider) +{ + TableViewStyle style = GetCore().GetTableViewStyle(); + 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, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + result r = pItemProvider->SetGroupedStyleItemProviderF(pProvider); + if (r != E_SUCCESS) + { + delete pItemProvider; + SysTryReturn(NID_UI_CTRL, false, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + + return GetCore().SetItemProvider(pItemProvider); + +} + +result +_TableViewImpl::SetSectionStyleItemProviderF(ISectionTableViewItemProviderF* pProvider) +{ + TableViewStyle style = GetCore().GetTableViewStyle(); + 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, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + result r = pItemProvider->SetSectionStyleItemProviderF(pProvider); + if (r != E_SUCCESS) + { + delete pItemProvider; + SysTryReturn(NID_UI_CTRL, false, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + + return GetCore().SetItemProvider(pItemProvider); +} + +result +_TableViewImpl::AddTableViewItemEventListener(ITableViewItemEventListener& listener) +{ + result r = E_SUCCESS; + + if (__pTableViewEvent == null) + { + __pTableViewEvent = new (std::nothrow) _TableViewItemEvent(); + 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)); + } + + r = __pTableViewEvent->AddListener(listener); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GetCore().AddTableViewItemEventListener(*this); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +_TableViewImpl::RemoveTableViewItemEventListener(ITableViewItemEventListener& listener) +{ + 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); +} + +result +_TableViewImpl::AddGroupedTableViewItemEventListener(IGroupedTableViewItemEventListener& listener) +{ + result r = E_SUCCESS; + + if (__pTableViewEvent == null) + { + __pTableViewEvent = new (std::nothrow) _TableViewItemEvent(); + 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)); + } + + r = __pTableViewEvent->AddListener(listener); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GetCore().AddGroupedTableViewItemEventListener(*this); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +_TableViewImpl::RemoveGroupedTableViewItemEventListener(IGroupedTableViewItemEventListener& listener) +{ + 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); +} + +result +_TableViewImpl::AddSectionTableViewItemEventListener(ISectionTableViewItemEventListener& listener) +{ + result r = E_SUCCESS; + + if (__pTableViewEvent == null) + { + __pTableViewEvent = new (std::nothrow) _TableViewItemEvent(); + 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)); + } + + r = __pTableViewEvent->AddListener(listener); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GetCore().AddSectionTableViewItemEventListener(*this); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +_TableViewImpl::RemoveSectionTableViewItemEventListener(ISectionTableViewItemEventListener& listener) +{ + 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); +} + +result +_TableViewImpl::AddFastScrollListener(IFastScrollListener& listener) +{ + ClearLastResult(); + + 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, "[%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, "[%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)); + } + + __pFastScrollEvent->AddListener(listener); + + return GetCore().AddFastScrollListener(*this); +} + +result +_TableViewImpl::RemoveFastScrollListener(IFastScrollListener& listener) +{ + ClearLastResult(); + + if (__pFastScrollEvent == null) + { + return E_INVALID_OPERATION; + } + + return __pFastScrollEvent->RemoveListener(listener); +} + +result +_TableViewImpl::AddScrollEventListener(IScrollEventListener& listener) +{ + ClearLastResult(); + + result r = E_SUCCESS; + + if (__pScrollEvent == null) + { + __pScrollEvent = new (std::nothrow) _ScrollEvent(); + 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)); + } + r = __pScrollEvent->AddListener(listener); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + GetCore().AddScrollEventListener(*this); + + return GetLastResult(); +} + +result +_TableViewImpl::RemoveScrollEventListener(IScrollEventListener& listener) +{ + ClearLastResult(); + + if (__pScrollEvent == null) + { + return E_INVALID_OPERATION; + } + + return __pScrollEvent->RemoveListener(listener); +} + +result +_TableViewImpl::AddScrollEventListener(IScrollEventListenerF& listener) +{ + ClearLastResult(); + + result r = E_SUCCESS; + + if (__pScrollEvent == null) + { + __pScrollEvent = new (std::nothrow) _ScrollEvent(); + 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)); + } + r = __pScrollEvent->AddListener(listener); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + GetCore().AddScrollEventListener(*this); + + return GetLastResult(); +} + +result +_TableViewImpl::RemoveScrollEventListener(IScrollEventListenerF& listener) +{ + ClearLastResult(); + + if (__pScrollEvent == null) + { + return E_INVALID_OPERATION; + } + + return __pScrollEvent->RemoveListener(listener); +} + +result +_TableViewImpl::SetSweepEnabled(bool enable) +{ + GetCore().SetSweepEnabled(enable); + + return E_SUCCESS; +} + +result +_TableViewImpl::SetFastScrollIndex(const String& text, bool useSearchIcon) +{ + __useSearchIcon = useSearchIcon; + + return GetCore().SetFastScrollIndex(text, useSearchIcon); +} + +result +_TableViewImpl::GetTopDrawnItemIndex(int& groupIndex, int& itemIndex) const +{ + return GetCore().GetTopDrawnItemIndex(groupIndex, itemIndex); +} + +result +_TableViewImpl::GetBottomDrawnItemIndex(int& groupIndex, int& itemIndex) const +{ + return GetCore().GetBottomDrawnItemIndex(groupIndex, itemIndex); +} + +result +_TableViewImpl::ScrollToItem(int groupIndex, int itemIndex, TableViewScrollItemAlignment itemAlignment) +{ + if (itemAlignment == TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_TOP) + { + return GetCore().SetTopDrawnItemIndex(groupIndex, itemIndex); + } + else if (itemAlignment == TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_BOTTOM) + { + return GetCore().SetBottomDrawnItemIndex(groupIndex, itemIndex); + } + + return E_OUT_OF_RANGE; +} + +result +_TableViewImpl::ScrollByPixel(float scrollDistance) +{ + return GetCore().ScrollByPixel(scrollDistance); +} + +float +_TableViewImpl::GetCurrentScrollPosition(void) const +{ + return GetCore().GetScrollPosition(); +} + +void +_TableViewImpl::SetScrollEnabled(bool enable) +{ + GetCore().SetScrollEnabled(enable); +} + +bool +_TableViewImpl::IsScrollEnabled(void) const +{ + return GetCore().IsScrollEnabled(); +} + +result +_TableViewImpl::SetItemChecked(int groupIndex, int itemIndex, bool check) +{ + return GetCore().SetItemChecked(groupIndex, itemIndex, check); +} + +bool +_TableViewImpl::IsItemChecked(int groupIndex, int itemIndex) const +{ + return GetCore().IsItemChecked(groupIndex, itemIndex); +} + +result +_TableViewImpl::SetItemEnabled(int groupIndex, int itemIndex, bool enable) +{ + return GetCore().SetItemEnabled(groupIndex, itemIndex, enable); +} + +bool +_TableViewImpl::IsItemEnabled(int groupIndex, int itemIndex) const +{ + return GetCore().IsItemEnabled(groupIndex, itemIndex); +} + +int +_TableViewImpl::GetGroupCount(void) const +{ + return GetCore().GetGroupCount(); +} + +int +_TableViewImpl::GetItemCountAt(int groupIndex) const +{ + return GetCore().GetItemCountAt(groupIndex); +} + +result +_TableViewImpl::RefreshTableView(int groupIndex, int itemIndex, TableViewRefreshType type) +{ + return GetCore().RefreshTableView(groupIndex, itemIndex, type); +} + +result +_TableViewImpl::RefreshAllItems(void) +{ + return GetCore().RefreshAllItems(); +} + +result +_TableViewImpl::UpdateTableView(void) +{ + return GetCore().UpdateTableView(); +} + +result +_TableViewImpl::GetItemIndexFromPosition(const Point& position, int& groupIndex, int& itemIndex) const +{ + return GetItemIndexFromPosition(_CoordinateSystemUtils::ConvertToFloat(position), groupIndex, itemIndex); +} + +result +_TableViewImpl::GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& position, int& groupIndex, int& itemIndex) const +{ + return GetCore().GetItemIndexFromPosition(position, groupIndex, itemIndex); +} + +result +_TableViewImpl::SetSectionColor(const Color& color) +{ + return GetCore().SetSectionColor(color); +} + +Color +_TableViewImpl::GetSectionColor(void) const +{ + return GetCore().GetSectionColor(); +} + +result +_TableViewImpl::SetItemDividerColor(const Color& color) +{ + return GetCore().SetItemDividerColor(color); +} + +Color +_TableViewImpl::GetItemDividerColor(void) const +{ + return GetCore().GetItemDividerColor(); +} + +result +_TableViewImpl::SetBitmapOfEmptyTableView(const Bitmap* pBitmap) +{ + return GetCore().SetBitmapOfEmptyTableView(pBitmap); +} + +result +_TableViewImpl::SetTextOfEmptyTableView(const String& text) +{ + return GetCore().SetTextOfEmptyTableView(text); +} + +String +_TableViewImpl::GetTextOfEmptyTableView(void) const +{ + return GetCore().GetTextOfEmptyTableView(); +} + +result +_TableViewImpl::SetTextColorOfEmptyTableView(const Color& color) +{ + return GetCore().SetTextColorOfEmptyTableView(color); +} + +Color +_TableViewImpl::GetTextColorOfEmptyTableView(void) const +{ + return GetCore().GetTextColorOfEmptyTableView(); +} + +// Item Expand / Collapse +result +_TableViewImpl::ExpandGroup(int groupIndex) +{ + return GetCore().ExpandGroup(groupIndex); +} + +result +_TableViewImpl::CollapseGroup(int groupIndex) +{ + return GetCore().CollapseGroup(groupIndex); +} + +bool +_TableViewImpl::IsGroupExpanded(int groupIndex) const +{ + return GetCore().IsGroupExpanded(groupIndex); +} + +result +_TableViewImpl::ExpandAllGroup(void) +{ + return GetCore().ExpandAllGroup(true); +} + +result +_TableViewImpl::CollapseAllGroup(void) +{ + return GetCore().CollapseAllGroup(true); +} + +result +_TableViewImpl::SetGroupedLookEnabled(bool enable) +{ + TableViewStyle style = GetCore().GetTableViewStyle(); + 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); + + return E_SUCCESS; +} + +bool +_TableViewImpl::IsGroupedLookEnabled(void) const +{ + return GetCore().IsGroupedLookEnabled(); +} + +result +_TableViewImpl::BeginReorderingMode(void) +{ + TableViewStyle style = GetCore().GetTableViewStyle(); + 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); +} + +result +_TableViewImpl::EndReorderingMode(void) +{ + TableViewStyle style = GetCore().GetTableViewStyle(); + 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); +} + +bool +_TableViewImpl::IsInReorderingMode(void) const +{ + return GetCore().IsReorderModeEnabled(); +} + + +void +_TableViewImpl::OnTableViewItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status) +{ + 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, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + __pTableViewEvent->Fire(*pArg); + } +} + +void +_TableViewImpl::OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::_TableView& tableView, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pContextItem, bool activated) +{ + 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, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + __pTableViewEvent->Fire(*pArg); + } +} + +void +_TableViewImpl::OnTableViewItemReordered(Tizen::Ui::Controls::_TableView& tableView, int itemIndexFrom, int itemIndexTo) +{ + 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, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + __pTableViewEvent->Fire(*pArg); + } +} + +void +_TableViewImpl::OnGroupedTableViewGroupItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status) +{ + 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, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + __pTableViewEvent->Fire(*pArg); + } +} + +void +_TableViewImpl::OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status) +{ + 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, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + __pTableViewEvent->Fire(*pArg); + } +} + +void +_TableViewImpl::OnGroupedTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pContextItem, bool activated) +{ + 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, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + __pTableViewEvent->Fire(*pArg); + } +} + +void +_TableViewImpl::OnGroupedTableViewItemReordered(Tizen::Ui::Controls::_TableView& tableView, int groupIndexFrom, int itemIndexFrom, int groupIndexTo, int itemIndexTo) +{ + 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, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + __pTableViewEvent->Fire(*pArg); + } +} + + +void +_TableViewImpl::OnSectionTableViewItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int sectionIndex, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status) +{ + 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, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + __pTableViewEvent->Fire(*pArg); + } +} + +void +_TableViewImpl::OnSectionTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::_TableView& tableView, int sectionIndex, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pContextItem, bool activated) +{ + 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, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + __pTableViewEvent->Fire(*pArg); + } +} + +void +_TableViewImpl::OnTableViewItemSwept(Tizen::Ui::Controls::_TableView& TableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewSweepDirection direction) +{ + // It's not used public method. +} + +void +_TableViewImpl::OnScrollEndReached(_Control& source, ScrollEndEvent type) +{ + if (__pScrollEvent != null) + { + _ScrollEventArg* pEventArg = _ScrollEventArg::GetScrollEventArgN(GetPublic(), type); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pScrollEvent->Fire(*pEventArg); + } +} + +void +_TableViewImpl::OnScrollPositionChanged(_Control& source, float scrollPosition) +{ + if (__pScrollEvent != null) + { + _ScrollEventArg* pEventArg = _ScrollEventArg::GetScrollEventArgN(GetPublic(), scrollPosition); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pScrollEvent->Fire(*pEventArg); + } +} + +void +_TableViewImpl::OnScrollStopped(_Control& source) +{ + if (__pScrollEvent != null) + { + _ScrollEventArg* pEventArg = _ScrollEventArg::GetScrollEventArgN(GetPublic()); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pScrollEvent->Fire(*pEventArg); + } +} + +void +_TableViewImpl::OnUiFastScrollIndexSelected(_Control& source, Tizen::Ui::Controls::_FastScrollIndex& index) +{ + if (__pFastScrollEvent != null) + { + Tizen::Base::String* pIndexText = index.GetIndexText(); + if (pIndexText != null) + { + _FastScrollEventArg* pEventArg = new (std::nothrow) _FastScrollEventArg(GetPublic(), *pIndexText); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + __pFastScrollEvent->Fire(*pEventArg); + } + } +} + +void +_TableViewImpl::SetScrollInputMode(ScrollInputMode mode) +{ + GetCore().SetScrollInputMode(mode); +} + +ScrollInputMode +_TableViewImpl::GetScrollInputMode(void) const +{ + return GetCore().GetScrollInputMode(); +} + +result +_TableViewImpl::OpenContextItem(int groupIndex, int itemIndex) +{ + return GetCore().OpenContextItem(groupIndex, itemIndex); +} +result +_TableViewImpl::CloseContextItem(int groupIndex, int itemIndex) +{ + return GetCore().CloseContextItem(groupIndex, itemIndex); +} +bool +_TableViewImpl::IsContextItemOpened(int groupIndex, int itemIndex) const +{ + return GetCore().IsContextItemOpened(groupIndex, itemIndex); +} + +result +_TableViewImpl::SetSectionHeaderTextHorizontalAlignment(int sectionIndex, HorizontalAlignment alignment) +{ + return GetCore().SetSectionHeaderTextHorizontalAlignment(sectionIndex, alignment); +} + +HorizontalAlignment +_TableViewImpl::GetSectionHeaderTextHorizontalAlignment(int sectionIndex) const +{ + return GetCore().GetSectionHeaderTextHorizontalAlignment(sectionIndex); +} + +result +_TableViewImpl::SetSectionFooterTextHorizontalAlignment(int sectionIndex, HorizontalAlignment alignment) +{ + return GetCore().SetSectionFooterTextHorizontalAlignment(sectionIndex, alignment); +} + +HorizontalAlignment +_TableViewImpl::GetSectionFooterTextHorizontalAlignment(int sectionIndex) const +{ + return GetCore().GetSectionFooterTextHorizontalAlignment(sectionIndex); +} + +class _TableViewMaker + : public _UiBuilderControlMaker +{ +public: + _TableViewMaker(_UiBuilder* uibuilder) + : _UiBuilderControlMaker(uibuilder){}; + virtual ~_TableViewMaker(){}; + static _UiBuilderControlMaker* GetInstance(_UiBuilder* uibuilder) + { + _TableViewMaker* pTableViewMaker = new (std::nothrow) _TableViewMaker(uibuilder); + SysTryReturn(NID_UI_CTRL, pTableViewMaker, null, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + return pTableViewMaker; + }; +protected: + virtual Control* Make(_UiBuilderControl* pControl) + { + result r = E_SYSTEM; + _UiBuilderControlLayout* pControlProperty = null; + TableView* pTableView = null; + FloatRectangle rect; + + Tizen::Base::String elementString; + bool itemDividerState = true; + TableViewScrollBarStyle scrollStyle = TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT; + int opacity = 100; + Color color; + + GetProperty(pControl, &pControlProperty); + if (pControlProperty == null) + { + return null; + } + + pTableView = new (std::nothrow) TableView(); + SysTryReturn(NID_UI_CTRL, pTableView, null, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + rect = pControlProperty->GetRectF(); + + //Construct + if (pControl->GetElement("itemDivider", elementString)) + { + if (elementString.Equals(L"true", false)) + { + itemDividerState = true; + } + else + { + itemDividerState = false; + } + } + + if (pControl->GetElement("scrollBarStyle", elementString)) + { + if (elementString.Equals(L"TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT", false)) + { + scrollStyle = TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT; + } + else if (elementString.Equals(L"TABLE_VIEW_SCROLL_BAR_STYLE_FIXED", false)) + { + scrollStyle = TABLE_VIEW_SCROLL_BAR_STYLE_FIXED; + } + else if (elementString.Equals(L"TABLE_VIEW_SCROLL_BAR_STYLE_JUMP_TO_TOP", false)) + { + scrollStyle = TABLE_VIEW_SCROLL_BAR_STYLE_JUMP_TO_TOP; + } + else if (elementString.Equals(L"TABLE_VIEW_SCROLL_BAR_STYLE_THUMB", false)) + { + scrollStyle = TABLE_VIEW_SCROLL_BAR_STYLE_THUMB; + } + else if (elementString.Equals(L"TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL", false)) + { + scrollStyle = TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL; + } + else if (elementString.Equals(L"TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL_FIXED", false)) + { + scrollStyle = TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL_FIXED; + } + else + { + scrollStyle = TABLE_VIEW_SCROLL_BAR_STYLE_NONE; + } + } + + r = pTableView->Construct(rect, itemDividerState, scrollStyle); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + if (scrollStyle == TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL + || scrollStyle == TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL_FIXED) + { + Tizen::Base::String fastScrollIndex; + bool useSearchIcon = false; + + if (pControl->GetElement("fastScrollIndex", elementString)) + { + fastScrollIndex = elementString; + } + + if (pControl->GetElement("useSearchIcon", elementString)) + { + if (elementString.Equals(L"true", false)) + { + useSearchIcon = true; + } + } + + r = pTableView->SetFastScrollIndex(fastScrollIndex, useSearchIcon); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + if (pControl->GetElement("backgroundColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + + if (pControl->GetElement("backgroundColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + pTableView->SetBackgroundColor(color); + } + + if (pControl->GetElement("itemDividerColor", elementString)) + { + ConvertStringToColor(elementString, color); + pTableView->SetItemDividerColor(color); + } + + if (pControl->GetElement("scrollInputMode", elementString)) + { + ScrollInputMode scrollInputMode = SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION; + + if (elementString.Equals(L"SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION", false)) + { + scrollInputMode = SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION; + } + else if (elementString.Equals(L"SCROLL_INPUT_MODE_RESTRICT_TO_INITIAL_DIRECTION", false)) + { + scrollInputMode = SCROLL_INPUT_MODE_RESTRICT_TO_INITIAL_DIRECTION; + } + + pTableView->SetScrollInputMode(scrollInputMode); + } + + return pTableView; + + CATCH: + delete pTableView; + + return null; + } + +}; // _TableViewMaker + +class _GroupedTableViewMaker + : public _UiBuilderControlMaker +{ +public: + _GroupedTableViewMaker(_UiBuilder* uibuilder) + : _UiBuilderControlMaker(uibuilder){}; + virtual ~_GroupedTableViewMaker(){}; + static _UiBuilderControlMaker* GetInstance(_UiBuilder* uibuilder) + { + _GroupedTableViewMaker* pTableViewMaker = new (std::nothrow) _GroupedTableViewMaker(uibuilder); + SysTryReturn(NID_UI_CTRL, pTableViewMaker, null, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + return pTableViewMaker; + }; +protected: + virtual Control* Make(_UiBuilderControl* pControl) + { + result r = E_SYSTEM; + _UiBuilderControlLayout* pControlProperty = null; + GroupedTableView* pTableView = null; + FloatRectangle rect; + + Tizen::Base::String elementString; + bool itemDividerState = true; + TableViewScrollBarStyle scrollStyle = TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT; + int opacity = 100; + Color color; + + GetProperty(pControl, &pControlProperty); + if (pControlProperty == null) + { + return null; + } + + pTableView = new (std::nothrow) GroupedTableView(); + SysTryReturn(NID_UI_CTRL, pTableView, null, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + rect = pControlProperty->GetRectF(); + + //Construct + if (pControl->GetElement("itemDivider", elementString)) + { + if (elementString.Equals(L"true", false)) + { + itemDividerState = true; + } + else + { + itemDividerState = false; + } + } + + if (pControl->GetElement("scrollBarStyle", elementString)) + { + if (elementString.Equals(L"TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT", false)) + { + scrollStyle = TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT; + } + else if (elementString.Equals(L"TABLE_VIEW_SCROLL_BAR_STYLE_FIXED", false)) + { + scrollStyle = TABLE_VIEW_SCROLL_BAR_STYLE_FIXED; + } + else if (elementString.Equals(L"TABLE_VIEW_SCROLL_BAR_STYLE_JUMP_TO_TOP", false)) + { + scrollStyle = TABLE_VIEW_SCROLL_BAR_STYLE_JUMP_TO_TOP; + } + else if (elementString.Equals(L"TABLE_VIEW_SCROLL_BAR_STYLE_THUMB", false)) + { + scrollStyle = TABLE_VIEW_SCROLL_BAR_STYLE_THUMB; + } + else if (elementString.Equals(L"TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL", false)) + { + scrollStyle = TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL; + } + else if (elementString.Equals(L"TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL_FIXED", false)) + { + scrollStyle = TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL_FIXED; + } + else + { + scrollStyle = TABLE_VIEW_SCROLL_BAR_STYLE_NONE; + } + } + + r = pTableView->Construct(rect, itemDividerState, scrollStyle); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + if (scrollStyle == TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL + || scrollStyle == TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL_FIXED) + { + Tizen::Base::String fastScrollIndex; + bool useSearchIcon = false; + + if (pControl->GetElement("fastScrollIndex", elementString)) + { + fastScrollIndex = elementString; + } + + if (pControl->GetElement("useSearchIcon", elementString)) + { + if (elementString.Equals(L"true", false)) + { + useSearchIcon = true; + } + else + { + useSearchIcon = false; + } + } + + r = pTableView->SetFastScrollIndex(fastScrollIndex, useSearchIcon); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + if (pControl->GetElement("backgroundColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + + if (pControl->GetElement("backgroundColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + pTableView->SetBackgroundColor(color); + } + + if (pControl->GetElement("itemDividerColor", elementString)) + { + ConvertStringToColor(elementString, color); + pTableView->SetItemDividerColor(color); + } + + if (pControl->GetElement("groupedLookEnabled", elementString)) + { + bool groupedLookEnabled = false; + + if (elementString.Equals(L"true", false)) + { + groupedLookEnabled = true; + } + + pTableView->SetGroupedLookEnabled(groupedLookEnabled); + } + + if (pControl->GetElement("collapseByPinchEnabled", elementString)) + { + bool collapseByPinchEnabled = false; + + if (elementString.Equals(L"true", false)) + { + collapseByPinchEnabled = true; + } + + pTableView->SetCollapseByPinchGestureEnabled(collapseByPinchEnabled); + } + + if (pControl->GetElement("scrollInputMode", elementString)) + { + ScrollInputMode scrollInputMode = SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION; + + if (elementString.Equals(L"SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION", false)) + { + scrollInputMode = SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION; + } + else if (elementString.Equals(L"SCROLL_INPUT_MODE_RESTRICT_TO_INITIAL_DIRECTION", false)) + { + scrollInputMode = SCROLL_INPUT_MODE_RESTRICT_TO_INITIAL_DIRECTION; + } + + pTableView->SetScrollInputMode(scrollInputMode); + } + + return pTableView; + + CATCH: + delete pTableView; + + return null; + } + +}; // _GroupedTableViewMaker + +class _SectionTableViewMaker + : public _UiBuilderControlMaker +{ +public: + _SectionTableViewMaker(_UiBuilder* uibuilder) + : _UiBuilderControlMaker(uibuilder){}; + virtual ~_SectionTableViewMaker(){}; + static _UiBuilderControlMaker* GetInstance(_UiBuilder* uibuilder) + { + _SectionTableViewMaker* pTableViewMaker = new (std::nothrow) _SectionTableViewMaker(uibuilder); + SysTryReturn(NID_UI_CTRL, pTableViewMaker, null, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + return pTableViewMaker; + }; +protected: + virtual Control* Make(_UiBuilderControl* pControl) + { + result r = E_SYSTEM; + _UiBuilderControlLayout* pControlProperty = null; + SectionTableView* pTableView = null; + FloatRectangle rect; + + Tizen::Base::String elementString; + bool itemDividerState = true; + TableViewScrollBarStyle scrollStyle = TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT; + int opacity = 100; + Color color; + + GetProperty(pControl, &pControlProperty); + if (pControlProperty == null) + { + return null; + } + + pTableView = new (std::nothrow) SectionTableView(); + SysTryReturn(NID_UI_CTRL, pTableView, null, E_OUT_OF_MEMORY, "[%s] Memory allocation Failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + rect = pControlProperty->GetRectF(); + + //Construct + if (pControl->GetElement("itemDivider", elementString)) + { + if (elementString.Equals(L"true", false)) + { + itemDividerState = true; + } + else + { + itemDividerState = false; + } + } + + if (pControl->GetElement("scrollBarStyle", elementString)) + { + if (elementString.Equals(L"TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT", false)) + { + scrollStyle = TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT; + } + else if (elementString.Equals(L"TABLE_VIEW_SCROLL_BAR_STYLE_FIXED", false)) + { + scrollStyle = TABLE_VIEW_SCROLL_BAR_STYLE_FIXED; + } + else if (elementString.Equals(L"TABLE_VIEW_SCROLL_BAR_STYLE_JUMP_TO_TOP", false)) + { + scrollStyle = TABLE_VIEW_SCROLL_BAR_STYLE_JUMP_TO_TOP; + } + else if (elementString.Equals(L"TABLE_VIEW_SCROLL_BAR_STYLE_THUMB", false)) + { + scrollStyle = TABLE_VIEW_SCROLL_BAR_STYLE_THUMB; + } + else if (elementString.Equals(L"TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL", false)) + { + scrollStyle = TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL; + } + else if (elementString.Equals(L"TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL_FIXED", false)) + { + scrollStyle = TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL_FIXED; + } + else + { + scrollStyle = TABLE_VIEW_SCROLL_BAR_STYLE_NONE; + } + } + + r = pTableView->Construct(rect, itemDividerState, scrollStyle); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + if (scrollStyle == TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL + || scrollStyle == TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL_FIXED) + { + Tizen::Base::String fastScrollIndex; + bool useSearchIcon = false; + + if (pControl->GetElement("fastScrollIndex", elementString)) + { + fastScrollIndex = elementString; + } + + if (pControl->GetElement("useSearchIcon", elementString)) + { + if (elementString.Equals(L"true", false)) + { + useSearchIcon = true; + } + else + { + useSearchIcon = false; + } + } + + r = pTableView->SetFastScrollIndex(fastScrollIndex, useSearchIcon); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + if (pControl->GetElement("backgroundColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + + if (pControl->GetElement("backgroundColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + pTableView->SetBackgroundColor(color); + } + + if (pControl->GetElement("itemDividerColor", elementString)) + { + ConvertStringToColor(elementString, color); + pTableView->SetItemDividerColor(color); + } + + if (pControl->GetElement("groupedLookEnabled", elementString)) + { + bool groupedLookEnabled = false; + + if (elementString.Equals(L"true", false)) + { + groupedLookEnabled = true; + } + + pTableView->SetGroupedLookEnabled(groupedLookEnabled); + } + + if (pControl->GetElement("sectionColor", elementString)) + { + ConvertStringToColor(elementString, color); + pTableView->SetSectionColor(color); + } + + if (pControl->GetElement("scrollInputMode", elementString)) + { + ScrollInputMode scrollInputMode = SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION; + + if (elementString.Equals(L"SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION", false)) + { + scrollInputMode = SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION; + } + else if (elementString.Equals(L"SCROLL_INPUT_MODE_RESTRICT_TO_INITIAL_DIRECTION", false)) + { + scrollInputMode = SCROLL_INPUT_MODE_RESTRICT_TO_INITIAL_DIRECTION; + } + + pTableView->SetScrollInputMode(scrollInputMode); + } + + return pTableView; + + CATCH: + delete pTableView; + + return null; + } + +}; // _SectionTableViewMaker + + +_TableViewRegister::_TableViewRegister() +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->RegisterControl(L"TableView", _TableViewMaker::GetInstance); +} +_TableViewRegister::~_TableViewRegister() +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->UnregisterControl(L"TableView"); +} + +_GroupedTableViewRegister::_GroupedTableViewRegister() +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->RegisterControl(L"GroupedTableView", _GroupedTableViewMaker::GetInstance); +} +_GroupedTableViewRegister::~_GroupedTableViewRegister() +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->UnregisterControl(L"GroupedTableView"); +} + +_SectionTableViewRegister::_SectionTableViewRegister() +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->RegisterControl(L"SectionTableView", _SectionTableViewMaker::GetInstance); +} +_SectionTableViewRegister::~_SectionTableViewRegister() +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->UnregisterControl(L"SectionTableView"); +} + + +static _TableViewRegister TableViewRegisterToUiBuilder; +static _GroupedTableViewRegister GroupedTableViewRegisterToUiBuilder; +static _SectionTableViewRegister SectionTableViewRegisterToUiBuilder; + + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_TableViewItem.cpp b/src/ui/controls/FUiCtrl_TableViewItem.cpp new file mode 100644 index 0000000..ff5ae91 --- /dev/null +++ b/src/ui/controls/FUiCtrl_TableViewItem.cpp @@ -0,0 +1,5525 @@ +// +// 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_TableViewItem.cpp + * @brief This is the implementation file for _TableViewItem class. + * + * This file contains the implementation of _TableViewItem class. + */ + +#include +#include +#include "FUi_ResourceManager.h" +#include "FUi_UiTouchEvent.h" +#include "FUiAnim_VisualElement.h" +#include "FUiAnim_ControlVisualElement.h" +#include "FUiCtrl_TableViewItem.h" +#include "FUiCtrl_TableView.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_Math.h" +#include "FUiCtrl_LabelImpl.h" +#include "FUi_Window.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Base::Collection; +using namespace Tizen::Ui::Animations; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_TableViewItemControl::_TableViewItemControl(void) + :__pBackgroundBitmap(null) +{ +} + +_TableViewItemControl::~_TableViewItemControl(void) +{ + if (__pBackgroundBitmap) + { + delete __pBackgroundBitmap; + __pBackgroundBitmap = null; + } + ClearLastResult(); +} + +void +_TableViewItemControl::OnDraw(void) +{ + Bitmap* pBitmap = GetBackgroundBitmap(); + + FloatRectangle bounds(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height); // +++ check floating + + Color bgColor = GetBackgroundColor(); + + Canvas* pCanvas = null; + + if (pBitmap != null) + { + pCanvas = GetCanvasN(); + if (pCanvas == null) + { + SysLog(NID_UI_CTRL, "Cannot get a canvas."); + + return; + } + + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pBitmap)) + { + pCanvas->DrawNinePatchedBitmap(bounds, *pBitmap); + } + else + { + FloatRectangle drawingRect(0.0f, 0.0f, bounds.width, bounds.height); + pCanvas->DrawBitmap(drawingRect, *pBitmap); + } + + } + else + { + if (IsCalledGetCanvasN() == false) + { + GetVisualElement()->SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255, (float)bgColor.GetGreen() / 255, (float)bgColor.GetBlue() / 255, (float)bgColor.GetAlpha() / 255)); + } + else + { + pCanvas = GetCanvasN(); + if (pCanvas == null) + { + SysLog(NID_UI_CTRL, "Cannot get a canvas."); + + return; + } + + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + pCanvas->FillRectangle(GetBackgroundColor(), bounds); // +++ check floating + } + } + + if (pCanvas) + { + delete pCanvas; + } + + return; +} + +HitTestResult +_TableViewItemControl::HitTest(const Graphics :: FloatPoint & point) +{ + return HIT_TEST_NOWHERE; +} + +_TableViewItemControl* +_TableViewItemControl::CreateTableViewItemControlN(void) +{ + _TableViewItemControl* pItemControl = new (std::nothrow) _TableViewItemControl(); + 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(); + + return pItemControl; + +CATCH: + delete pItemControl; + return null; +} + +result +_TableViewItemControl::SetBackgroundBitmap(const Bitmap& bitmap) +{ + result r = E_SYSTEM; + + Bitmap* pClonedBitmap = _BitmapImpl::CloneN(bitmap); + + if (pClonedBitmap) + { + if (__pBackgroundBitmap != null) + { + delete __pBackgroundBitmap; + } + + __pBackgroundBitmap = pClonedBitmap; + + r = E_SUCCESS; + } + + return r; +} + +Bitmap* +_TableViewItemControl::GetBackgroundBitmap(void) const +{ + return __pBackgroundBitmap; +} + +_TableViewItem::_TableViewItem(float itemHeight) + : _Control() + , __pAppInfo(null) + , __refCount(1) + , __itemHeight(itemHeight) + , __itemGroupIndex(-1) + , __itemIndex(-1) + , __checkedState(false) + , __enabledState(true) + , __itemChanged(true) + , __reorderMode(false) + , __itemSelected(false) + , __itemTouchMoved(false) + , __childMarginState(false) + , __annexStyle(TABLE_VIEW_ANNEX_STYLE_NORMAL) + , __drawingStatus(TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL) + , __selectionStyle(TABLE_VIEW_ITEM_SELECTION_STYLE_WHOLE) + , __itemType(TABLE_VIEW_ITEM_TYPE_NONE) + , __pContextItem(null) + , __isContextItem(false) + , __isContextItemActivated(false) + , __checkItemHeightNeeded(false) + , __pItemDivider(null) + , __pItemTopDivider(null) + , __pItemAnnex(null) + , __pItemCover(null) + , __pItemAnnexLeftDivider(null) + , __pItemAnnexRightDivider(null) + , __itemWidth(0.0f) + , __pDrawingProperty(null) + , __itemDividerEnabled(true) + , __pSimpleItemText(null) + , __pSimpleItemBitmap(null) + , __simpleItemTextSize(0) + , __pHeaderFooterItemText(null) + , __pDimLayer(null) + , __touchStartPosition(0.0f, 0.0f) + , __annexTouchStartPosition(0) + , __annexOnOffHandlerMoved(false) + , __annexOnOffHandlerPositionX(0.0f) + , __childControlCenterAlign(false) + , __customHeight(0.0f) + , __animationCount(0) + , __pAccessibilityElement(null) + , __pAccessibilityOnOffElement(null) + , __pPressedTimer(null) + , __pReleasedTimer(null) + , __isPressedTimerEnabled(false) + , __isReleasedTimerEnabled(false) + , __pressedControl(TABLE_VIEW_ITEM_PRESSED_NONE) + , __releasedControl(TABLE_VIEW_ITEM_PRESSED_NONE) + , __pCheckedTimer(null) + , __isCheckedTimerEnabled(false) + , __isCheckedAnimationEnabled(false) + , __checkedCount(0) + , __checkedBounds(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f)) + , __isItemLayoutEnabled(false) + , __isMoveItemAnimationEnabled(false) + , __isZoomInOutItemAnimationEnabled(false) + , __isFadeInOutItemAnimationEnabled(false) + , __isAnimationCallbackBlocked(false) + , __isItemTapSoundEnabled(true) + , __isTabSoundPlayed(false) + , __isSelectedDetailButton(false) + , __isSimpleLastItem(false) + , __isSectionItem(false) + , __isTouchPressOnScroll(false) + , __isTouchCancelOnPressRelease(false) + , __pHighlightVisualElement(null) + , __pBitmapVisualElement(null) + , __pMoveItemAnimation(null) + , __pZoomInOutItemAnimation(null) + , __pFadeInOutItemtAnimation(null) +{ + for (int i = 0; i < 3; i++) + { + __pItemBgBitmap[i] = null; + } + + GET_COLOR_CONFIG(TABLEVIEW::ITEM_BG_NORMAL, __colorItemBg[TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL]); // for support opacity 0x00 + GET_COLOR_CONFIG(TABLEVIEW::ITEM_BG_PRESSED, __colorItemBg[TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED]); + GET_COLOR_CONFIG(TABLEVIEW::ITEM_BG_HIGHLIGHTED, __colorItemBg[TABLE_VIEW_ITEM_DRAWING_STATUS_HIGHLIGHTED]); + + GET_COLOR_CONFIG(TABLEVIEW::ITEM_TEXT_NORMAL, __simpleItemTextColor[TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL]); + GET_COLOR_CONFIG(TABLEVIEW::ITEM_TEXT_PRESSED, __simpleItemTextColor[TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED]); + GET_COLOR_CONFIG(TABLEVIEW::ITEM_TEXT_HIGHLIGHTED, __simpleItemTextColor[TABLE_VIEW_ITEM_DRAWING_STATUS_HIGHLIGHTED]); + GET_COLOR_CONFIG(TABLEVIEW::GROUPITEM_TEXT_NORMAL, __simpleItemTextColor[TABLE_VIEW_GROUPITEM_DRAWING_STATUS_NORMAL]); + GET_COLOR_CONFIG(TABLEVIEW::GROUPITEM_TEXT_PRESSED, __simpleItemTextColor[TABLE_VIEW_GROUPITEM_DRAWING_STATUS_PRESSED]); + GET_COLOR_CONFIG(TABLEVIEW::ITEM_TEXT_DISABLED, __simpleItemTextColor[TABLE_VIEW_SIMPLEITEM_DRAWING_STATUS_DISABLED]); + + + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + if (pContainer) + { + pContainer->Activate(true); + pContainer->AddListener(*this); + } +} + +_TableViewItem::~_TableViewItem() +{ + __isAnimationCallbackBlocked = true; + + StopTouchPressedTimer(true); + delete __pPressedTimer; + __pPressedTimer = null; + + StopTouchReleasedTimer(true); + delete __pReleasedTimer; + __pReleasedTimer = null; + + _VisualElement* pVisualElement = GetVisualElement(); + if (pVisualElement != null) + { + if (__pMoveItemAnimation != null) + { + __pMoveItemAnimation->SetVisualElementAnimationTickEventListener(null); + __pMoveItemAnimation->SetVisualElementAnimationStatusEventListener(null); + } + + if (__pZoomInOutItemAnimation != null) + { + __pZoomInOutItemAnimation->SetVisualElementAnimationTickEventListener(null); + __pZoomInOutItemAnimation->SetVisualElementAnimationStatusEventListener(null); + } + + if (__pFadeInOutItemtAnimation != null) + { + __pFadeInOutItemtAnimation->SetVisualElementAnimationTickEventListener(null); + __pFadeInOutItemtAnimation->SetVisualElementAnimationStatusEventListener(null); + } + pVisualElement->RemoveAllAnimations(); + } + + for (int j = 0; j < 3; j++) + { + delete __pItemBgBitmap[j]; + __pItemBgBitmap[j] = null; + } + + if (__pHighlightVisualElement != null) + { + __pHighlightVisualElement->RemoveAllAnimations(); + __pHighlightVisualElement->SetAnimationProvider(null); + __pHighlightVisualElement->Destroy(); + __pHighlightVisualElement = null; + } + + if (__pBitmapVisualElement != null) + { + __pBitmapVisualElement->RemoveAllAnimations(); + __pBitmapVisualElement->SetAnimationProvider(null); + __pBitmapVisualElement->Destroy(); + __pBitmapVisualElement = null; + } + + DetachAllChildren(); + + if (GetParent() != null && __isContextItem == true) + { + GetParent()->DetachChild(*this); + } + + delete __pItemDivider; + __pItemDivider = null; + + delete __pItemTopDivider; + __pItemTopDivider = null; + + delete __pItemAnnexLeftDivider; + __pItemAnnexLeftDivider = null; + + delete __pItemAnnexRightDivider; + __pItemAnnexRightDivider = null; + + delete __pItemAnnex; + __pItemAnnex = null; + + delete __pDimLayer; + __pDimLayer = null; + + delete __pItemCover; + __pItemCover = null; + + delete __pHeaderFooterItemText; + __pHeaderFooterItemText = null; + + delete __pMoveItemAnimation; + __pMoveItemAnimation = null; + + delete __pZoomInOutItemAnimation; + __pZoomInOutItemAnimation = null; + + delete __pFadeInOutItemtAnimation; + __pFadeInOutItemtAnimation = null; + + if (__isCheckedTimerEnabled) + { + __pCheckedTimer->Cancel(); + } + + delete __pCheckedTimer; + __pCheckedTimer = null; + + if (__pAccessibilityElement) + { + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + if (pContainer) + { + pContainer->RemoveAllElement(); + } + __pAccessibilityElement = null; + + if (__pAccessibilityOnOffElement) + { + __pAccessibilityOnOffElement = null; + } + } +} + +_TableViewItem* +_TableViewItem::CreateTableViewItemN(float itemHeight) +{ + result r = E_SUCCESS; + + _TableViewItem* pItem = null; + pItem = new (std::nothrow) _TableViewItem(itemHeight); + 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, "[%s] A system error has been occurred.", GetErrorMessage(E_SYSTEM)); + + + return pItem; + +CATCH: + delete pItem; + + return null; +} + +result +_TableViewItem::Initialize(void) +{ + GetVisualElement()->SetSurfaceOpaque(false); + + result r = E_SUCCESS; + + __pHighlightVisualElement = new (std::nothrow) _VisualElement(); + 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)); + + r = __pHighlightVisualElement->SetSurfaceOpaque(false); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to set surface opaque.", GetErrorMessage(r)); + + __pHighlightVisualElement->SetImplicitAnimationEnabled(false); + + r = GetVisualElement()->AttachChild(*__pHighlightVisualElement); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to attach child to the control VisualElement.", GetErrorMessage(r)); + + r = SetItemHighlightBounds(*__pHighlightVisualElement, CalculateItemHighlightBounds()); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to set bounds.", GetErrorMessage(r)); + + __pHighlightVisualElement->SetBackgroundColor(_Colorf(0.0f, 0.0f, 0.0f, 0.0f)); + __pHighlightVisualElement->SetShowState(true); + + r = __individualSelectionControls.Construct(DEFAULT_CAPTURED_CONTROL_COUNT); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to construct ArrayList", GetErrorMessage(r)); + + SetTouchPressThreshold(SENSITIVE); + + if (!_FloatCompare(__itemHeight, 0.0f)) + { + SetAccessibilityElement(); + } + + GetAccessibilityContainer()->Activate(false); + + return r; + +CATCH: + if (__pHighlightVisualElement != null) + { + __pHighlightVisualElement->RemoveAllAnimations(); + __pHighlightVisualElement->SetAnimationProvider(null); + __pHighlightVisualElement->Destroy(); + __pHighlightVisualElement = null; + } + + return r; +} + +_TableViewItem* +_TableViewItem::GetContextItem(void) const +{ + return __pContextItem; +} + +void +_TableViewItem::SetContextItem(_TableViewItem* pContextItem) +{ + if (pContextItem != null) + { + pContextItem->__isContextItem = true; + } + + __pContextItem = pContextItem; +} + +bool +_TableViewItem::IsContextItem(void) const +{ + return __isContextItem; +} + +void +_TableViewItem::SetContextItemActivation(bool activated) +{ + __isContextItemActivated = activated; +} + +bool +_TableViewItem::IsContextItemActivated(void) const +{ + return __isContextItemActivated; +} + +result +_TableViewItem::CreateItemDimLayer(void) +{ + result r = E_SUCCESS; + + if (__pDimLayer == null) + { + __pDimLayer = _Label::CreateLabelN(); + + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, __pDimLayer != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pDimLayer->SetBackgroundColor(Color(0, 0, 0, BACKGROUND_DIMMED_OPACITY * 0xff)); + __pDimLayer->SetVisibleState(false); + + AttachSystemChild(*__pDimLayer); + } + + return r; +} + +result +_TableViewItem::CreateItemDivider(void) +{ + result r = E_SUCCESS; + + if (__pItemDivider == null) + { + __pItemDivider = _TableViewItemControl::CreateTableViewItemControlN(); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, __pItemDivider != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + __pItemDivider->SetFocusable(false); + AttachSystemChild(*__pItemDivider); + + _AccessibilityContainer* pContainer = __pItemDivider->GetAccessibilityContainer(); + pContainer->Activate(false); + } + + if (__pItemTopDivider == null) + { + __pItemTopDivider = _TableViewItemControl::CreateTableViewItemControlN(); + SysTryReturn(NID_UI_CTRL, __pItemTopDivider != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + __pItemTopDivider->SetFocusable(false); + AttachSystemChild(*__pItemTopDivider); + + _AccessibilityContainer* pContainer = __pItemTopDivider->GetAccessibilityContainer(); + pContainer->Activate(false); + } + + return r; +} + +result +_TableViewItem::CreateItemAnnexDivider(void) +{ + result r = E_SUCCESS; + + if (__pItemAnnexLeftDivider == null) + { + __pItemAnnexLeftDivider = _TableViewItemControl::CreateTableViewItemControlN(); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, __pItemAnnexLeftDivider != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + __pItemAnnexLeftDivider->SetFocusable(false); + AttachSystemChild(*__pItemAnnexLeftDivider); + } + + if (__pItemAnnexRightDivider == null) + { + __pItemAnnexRightDivider = _TableViewItemControl::CreateTableViewItemControlN(); + SysTryReturn(NID_UI_CTRL, __pItemAnnexRightDivider != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + __pItemAnnexRightDivider->SetFocusable(false); + AttachSystemChild(*__pItemAnnexRightDivider); + } + + return r; +} + +result +_TableViewItem::CreateItemCover(void) +{ + result r = E_SUCCESS; + + if (__pItemCover == null) + { + __pItemCover = _TableViewItemControl::CreateTableViewItemControlN(); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, __pItemCover != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + __pItemCover->SetFocusable(false); + AttachSystemChild(*__pItemCover); + } + + return r; +} + +result +_TableViewItem::CreateCheckBox(void) +{ + result r = E_SUCCESS; + + if (__pItemAnnex == null) + { + float annexWidth = 0.0f; + float annexHeight = 0.0f; + GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, annexWidth); + GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, annexHeight); + + __pItemAnnex = new (std::nothrow) Label(); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, __pItemAnnex != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + float leftMargin = 0.0f; + GET_SHAPE_CONFIG(TABLEVIEW::ITEM_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, leftMargin); + + float itemHeight = ((__customHeight > 0) ? __customHeight : GetBoundsF().height); + __pItemAnnex->Construct(FloatRectangle(leftMargin, ((itemHeight - annexHeight) / 2), annexWidth, annexHeight), L""); + __pItemAnnex->SetBackgroundColor(Color(0, 0, 0, 0)); + GetLabelCore(__pItemAnnex)->SetFocusable(true); + + AttachSystemChild(*GetLabelCore(__pItemAnnex)); + } + + return r; +} + + +result +_TableViewItem::CreateRadioBox(void) +{ + result r = E_SUCCESS; + + if (__pItemAnnex == null) + { + float annexWidth = 0.0f; + float annexHeight = 0.0f; + GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, annexWidth); + GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, annexHeight); + + __pItemAnnex = new (std::nothrow) Label(); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, __pItemAnnex != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + float leftMargin = 0.0f; + GET_SHAPE_CONFIG(TABLEVIEW::ITEM_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, leftMargin); + + float itemHeight = ((__customHeight > 0) ? __customHeight : GetBoundsF().height); + __pItemAnnex->Construct(FloatRectangle(leftMargin, ((itemHeight - annexHeight) / 2), annexWidth, annexHeight), L""); + __pItemAnnex->SetBackgroundColor(Color(0, 0, 0, 0)); + GetLabelCore(__pItemAnnex)->SetFocusable(true); + + AttachSystemChild(*GetLabelCore(__pItemAnnex)); + } + + return r; +} + +result +_TableViewItem::CreateOnOffButton(void) +{ + result r = E_SUCCESS; + + if (__pItemAnnex == null) + { + float annexWidth = 0.0f; + float annexHeight = 0.0f; + + GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_ONOFF_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, annexWidth); + GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_ONOFF_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, annexHeight); + + __pItemAnnex = new (std::nothrow) Label(); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, __pItemAnnex != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + float leftMargin = 0.0f; + GET_SHAPE_CONFIG(TABLEVIEW::ITEM_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, leftMargin); + + leftMargin += __pDrawingProperty->scrollMargin; + + float itemHeight = ((__customHeight > 0) ? __customHeight : GetBoundsF().height); + __pItemAnnex->Construct(FloatRectangle((GetBoundsF().width - annexWidth - leftMargin), ((itemHeight - annexHeight) / 2), annexWidth, annexHeight), L""); + __pItemAnnex->SetBackgroundColor(Color(0, 0, 0, 0)); + GetLabelCore(__pItemAnnex)->SetFocusable(true); + + AttachSystemChild(*GetLabelCore(__pItemAnnex)); + } + + return r; +} + +result +_TableViewItem::CreateDetailButton(void) +{ + result r = E_SUCCESS; + + if (__pItemAnnex == null) + { + float annexWidth = 0.0f; + float annexHeight = 0.0f; + + GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_MORE_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, annexWidth); + GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_MORE_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, annexHeight); + __pItemAnnex = new (std::nothrow) Label(); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, __pItemAnnex != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + float leftMargin = 0.0f; + GET_SHAPE_CONFIG(TABLEVIEW::ITEM_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, leftMargin); + + leftMargin += __pDrawingProperty->scrollMargin; + float itemHeight = ((__customHeight > 0) ? __customHeight : GetBoundsF().height); + __pItemAnnex->Construct(FloatRectangle((GetBoundsF().width - annexWidth - leftMargin), ((itemHeight - annexHeight) / 2), annexWidth, annexHeight), L""); + __pItemAnnex->SetBackgroundColor(Color(0, 0, 0, 0)); + GetLabelCore(__pItemAnnex)->SetFocusable(true); + + AttachSystemChild(*GetLabelCore(__pItemAnnex)); + } + + return r; +} + +_Label* +_TableViewItem::GetLabelCore(Label* pLabel) +{ + if (pLabel == null) + { + return null; + } + + _LabelImpl* pImpl = _LabelImpl::GetInstance(*pLabel); + return &pImpl->GetCore(); +} + +void +_TableViewItem::ExposeContextItem(FloatRectangle itemBounds, float targetWidth) +{ + DrawItemDivider(); + if (__pDimLayer == null) + { + if (CreateItemDimLayer() != E_SUCCESS) + { + return; + } + } + + SetBounds(itemBounds); + + bool visible = true; + + if ((itemBounds.width <= 0) || (itemBounds.width >= targetWidth)) // +++ check floating + { + visible = false; + } + + if (visible) + { + float rightMargin = 0.0f; + float dimLayerOpacity = 0.0f; + + GET_SHAPE_CONFIG(TABLEVIEW::CONTEXTITEM_RIGHT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, rightMargin); + + dimLayerOpacity = BACKGROUND_DIMMED_OPACITY - ((itemBounds.width * BACKGROUND_DIMMED_OPACITY) / (targetWidth - rightMargin)); + dimLayerOpacity = ((dimLayerOpacity < 0) ? 0 : dimLayerOpacity); // +++ check floating + + __pDimLayer->SetBounds(FloatRectangle(0.0f, 0.0f, itemBounds.width, itemBounds.height)); + __pDimLayer->SetBackgroundColor(Color(0.0f, 0.0f, 0.0f, dimLayerOpacity * 0xff)); + } + + __pDimLayer->SetVisibleState(visible); + +} + +void +_TableViewItem::DrawItemDimLayer(bool visible) +{ + if (__pDimLayer == null) + { + if (CreateItemDimLayer() != E_SUCCESS) + { + return; + } + } + + if (visible) + { + FloatDimension itemSize = GetSizeF(); + __pDimLayer->SetBounds(FloatRectangle(0.0f, 0.0f, itemSize.width, itemSize.height)); + __pDimLayer->SetBackgroundColor(Color(0, 0, 0, BACKGROUND_DISABLED_OPACITY * 0xff)); + } + + __pDimLayer->SetVisibleState(visible); +} + +void +_TableViewItem::SetItemWidth(float width) +{ + __itemWidth = width; +} + +bool +_TableViewItem::SetItemBackgroundBitmap(ListItemState itemState, const Bitmap* pBitmap) +{ + Bitmap* pCopyBitmap = null; + + pCopyBitmap = _BitmapImpl::CloneN(*pBitmap); + 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; + + + if (__pItemBgBitmap[TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL] == null && + __pItemBgBitmap[TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED] == null && + __pItemBgBitmap[TABLE_VIEW_ITEM_DRAWING_STATUS_HIGHLIGHTED] == null) + { + if (__pBitmapVisualElement != null) + { + __pBitmapVisualElement->Destroy(); + __pBitmapVisualElement = null; + } + } + else + { + if (__pBitmapVisualElement == null) + { + FloatRectangle bounds = GetBoundsF(); + result r = E_SUCCESS; + + __pBitmapVisualElement = new (std::nothrow) _VisualElement(); + 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)); + + __pBitmapVisualElement->SetSurfaceOpaque(false); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to set surface opaque.", GetErrorMessage(r)); + + __pBitmapVisualElement->SetImplicitAnimationEnabled(false); + __pBitmapVisualElement->SetBounds(FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height)); + __pBitmapVisualElement->SetShowState(true); + + GetVisualElement()->AttachChild(*__pBitmapVisualElement); + } + } + + SetItemChanged(true); + return true; +CATCH: + if (__pBitmapVisualElement != null) + { + __pBitmapVisualElement->RemoveAllAnimations(); + __pBitmapVisualElement->SetAnimationProvider(null); + __pBitmapVisualElement->Destroy(); + __pBitmapVisualElement = null; + } + return false; +} + +Tizen::Graphics::Bitmap* +_TableViewItem::GetItemBackgroundBitmap(ListItemState itemState) const +{ + return __pItemBgBitmap[itemState]; +} + +void +_TableViewItem::SetItemBackgroundColor(ListItemState itemState, const Color bgColor) +{ + if (__colorItemBg[itemState] == bgColor) + { + return; + } + + __colorItemBg[itemState] = bgColor; + + SetItemChanged(true); +} + +Color +_TableViewItem::GetItemBackgroundColor(ListItemState itemState) const +{ + return __colorItemBg[itemState]; +} + +void +_TableViewItem::SetItemStyle(TableViewAnnexStyle style) +{ + if (__annexStyle == style) + { + return; + } + + __annexStyle = style; +} + +result +_TableViewItem::SetSelectionStyle(TableViewItemSelectionStyle style) +{ + __selectionStyle = style; + + return E_SUCCESS; +} + +TableViewItemSelectionStyle +_TableViewItem::GetSelectionStyle(void) const +{ + return __selectionStyle; +} + +float +_TableViewItem::GetItemHeight(void) const +{ + return GetSizeF().height; +} + +void +_TableViewItem::SetItemHeight(int itemHeight) +{ + SetItemHeight(_CoordinateSystemUtils::ConvertToFloat(itemHeight)); +} + +void +_TableViewItem::SetItemHeight(float itemHeight) +{ + if (_FloatCompare(GetSizeF().height, itemHeight)) + { + return; + } + + SetSize(FloatDimension(GetSizeF().width, itemHeight)); +} + +void +_TableViewItem::SetChecked(bool checked) +{ + if (__checkedState == checked) + { + return; + } + + __checkedState = checked; + + SetItemChanged(true); +} + +bool +_TableViewItem::IsChecked(void) const +{ + return __checkedState; +} + +void +_TableViewItem::SetCheckedAnimationEnabled(bool enabled) +{ + if (__isCheckedAnimationEnabled == enabled) + { + return; + } + + __isCheckedAnimationEnabled = enabled; + + if (__isCheckedAnimationEnabled == false) + { + StopCheckBoxAnimation(); + } +} + +void +_TableViewItem::SetItemEnabled(bool enabled) +{ + if (__enabledState == enabled) + { + return; + } + + __enabledState = enabled; + + SetEnableState(enabled); + + SetItemChanged(true); + + Invalidate(); + + return; +} + +bool +_TableViewItem::IsItemEnabled(void) const +{ + return __enabledState; +} + +void +_TableViewItem::SetItemType(const TableViewItemType itemType) +{ + if (__itemType == itemType) + { + return; + } + + __itemType = itemType; + + if (__pContextItem != null) + { + __pContextItem->SetItemType(__itemType); + } + + if (itemType == TABLE_VIEW_ITEM_TYPE_TITLE) + { + Color titleColor; + GET_COLOR_CONFIG(TABLEVIEW::ITEM_BG_PRESSED, titleColor); + if (titleColor == __colorItemBg[TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED]) + { + GET_COLOR_CONFIG(TABLEVIEW::GROUPITEM_BG_PRESSED, __colorItemBg[TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED]); + } + GetAccessibilityContainer()->Activate(true); + } +} + +void +_TableViewItem::SetItemIndex(int groupIndex, int itemIndex) +{ + __itemGroupIndex = groupIndex; + __itemIndex = itemIndex; +} + +void +_TableViewItem::GetItemIndex(int& groupIndex, int& itemIndex) const +{ + groupIndex = __itemGroupIndex; + itemIndex = __itemIndex; +} + + +TableViewItemType +_TableViewItem::GetItemType(void) const +{ + return __itemType; +} + +bool +_TableViewItem::IsReorderMode(void) const +{ + return __reorderMode; +} + +void +_TableViewItem::SetReorderMode(bool enabled) +{ + __reorderMode = enabled; +} + +void +_TableViewItem::SetAppInfo(const void* pAppInfo) +{ + __pAppInfo = const_cast(pAppInfo); +} + +void* +_TableViewItem::GetAppInfo(void) const +{ + return __pAppInfo; +} + +void +_TableViewItem::SetItemChanged(bool changed) +{ + __itemChanged = changed; +} + +bool +_TableViewItem::IsItemChanged(void) const +{ + return __itemChanged; +} + +bool +_TableViewItem::IsAnnexOnOffSliding(void) +{ + return __annexOnOffHandlerMoved; +} + +TableViewAnnexStyle +_TableViewItem::GetItemStyle(void) const +{ + return __annexStyle; +} + +bool +_TableViewItem::DrawItem(FloatRectangle& rcItem, ListItemState itemState, bool itemDivider) +{ + return true; +} + +bool +_TableViewItem::SetItemTapSoundEnabled(bool tapSoundEnabled) +{ + bool oldValue = __isItemTapSoundEnabled; + __isItemTapSoundEnabled = tapSoundEnabled; + return oldValue; +} + +bool +_TableViewItem::GetItemTapSoundEnabled(void) +{ + return __isItemTapSoundEnabled; +} + +void +_TableViewItem::DrawAnnexFocus(void) +{ + if (__pItemAnnex) + { + __pItemAnnex->SetFocus(); + } + return; +} + +Tizen::Graphics::Canvas* +_TableViewItem::OnCanvasRequestedN(const Tizen::Graphics::FloatRectangle& bounds) +{ + Canvas* pCanvas = null; + + if (__pBitmapVisualElement != null && __pBitmapVisualElement->GetImageSource().IsEmpty()) + { + Bitmap* pDrawBitmap = __pItemBgBitmap[__drawingStatus]; + if (pDrawBitmap != null) + { + pCanvas = __pBitmapVisualElement->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(); + + pDrawBitmap->IsNinePatchedBitmap(); + DrawBitmap(*pCanvas, FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height), *pDrawBitmap); + } + } + +CATCH: + + return pCanvas; +} + +void +_TableViewItem::FireItemEvent(bool selectedItem) +{ + if (!HasParent() + || IsContextItem() + || __itemType == TABLE_VIEW_ITEM_TYPE_HEADER + || __itemType == TABLE_VIEW_ITEM_TYPE_FOOTER) + { + return; + } + + _TableView* pParent = dynamic_cast<_TableView*>(GetParent()); + if (pParent == null) + { + return; + } + + TableViewNotifyType eventType = TABLEVIEW_NOTIFY_TYPE_SELECTED_ITEM; + + if ((__annexStyle == TABLE_VIEW_ANNEX_STYLE_MARK) + || (__annexStyle == TABLE_VIEW_ANNEX_STYLE_RADIO) + || (__annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING)) + { + if (IsChecked()) + { + eventType = TABLEVIEW_NOTIFY_TYPE_ANNEX_CHECK; + } + else + { + eventType = TABLEVIEW_NOTIFY_TYPE_ANNEX_UNCHECK; + } + } + else if (__annexStyle == TABLE_VIEW_ANNEX_STYLE_DETAILED) + { + if (!selectedItem) + { + eventType = TABLEVIEW_NOTIFY_TYPE_ANNEX_MORE; + } + } + else if (__annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER) + { + if (selectedItem) + { + eventType = TABLEVIEW_NOTIFY_TYPE_SELECTED_ITEM; + } + else + { + if (IsChecked()) + { + eventType = TABLEVIEW_NOTIFY_TYPE_ANNEX_CHECK; + } + else + { + eventType = TABLEVIEW_NOTIFY_TYPE_ANNEX_UNCHECK; + } + } + } + + if (__isItemTapSoundEnabled) + { + if (!__isTabSoundPlayed) + { + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, this); + } + } + + __isTabSoundPlayed = false; + __checkItemHeightNeeded = true; + + int groupIndex = -1; + int itemIndex = -1; + GetItemIndex(groupIndex, itemIndex); + pParent->FireTableViewItemEvent(groupIndex, itemIndex, eventType, this); +} + +void +_TableViewItem::FireItemSweepEvent(TableViewSweepDirection direction) +{ + if (HasParent() == false) + { + return; + } + + _TableView* pParent = dynamic_cast<_TableView*>(GetParent()); + if (pParent == null) + { + return; + } + + int groupIndex = -1; + int itemIndex = -1; + GetItemIndex(groupIndex, itemIndex); + + pParent->FireTableViewItemSweepEvent(groupIndex, itemIndex, direction); +} + +bool +_TableViewItem::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + __isTouchCancelOnPressRelease = false; + + if (IsContextItem() || + __isContextItemActivated || + IsAnimationPlaying() || + IsReorderMode()) + { + return true; + } + + if (IsTouchPressOnScroll()) + { + return true; + } + + __annexOnOffHandlerMoved = false; + __touchStartPosition = touchinfo.GetCurrentPosition(); + + if (&source == this) + { + __pressedControl = TABLE_VIEW_ITEM_PRESSED_ITEM; + } + else if (&source == GetLabelCore(__pItemAnnex)) + { + __pressedControl = TABLE_VIEW_ITEM_PRESSED_ANNEX; + + if (__annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING || + __annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER) + { + __annexTouchStartPosition = touchinfo.GetCurrentPosition().x; + } + } + else if (IsIndividualSelectionEnabled(source)) + { + __pressedControl = TABLE_VIEW_ITEM_PRESSED_INDIVIDUAL; + } + else + { + __pressedControl = TABLE_VIEW_ITEM_PRESSED_NONE; + } + + if (__isReleasedTimerEnabled) + { + StopTouchReleasedTimer(); + + _TableView* pParent = dynamic_cast<_TableView*>(GetParent()); + if (pParent != null) + { + int groupIndex = -1; + int itemIndex = -1; + GetItemIndex(groupIndex, itemIndex); + pParent->FireItemTouchReleasedEventDuringPressing(groupIndex, itemIndex); + } + } + else + { + if (!IsIndividualSelectionEnabled(source)) + { + __itemSelected = true; + if (unlikely((_AccessibilityManager::IsActivated()))) + { + FireItemTouchPressed(); + } + else + { + StartTouchPressedTimer(source, touchinfo); + } + } + } + + return true; +} + +bool +_TableViewItem::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + if (IsReorderMode()) + { + return true; + } + + if (IsTouchPressOnScroll()) + { + SetTouchPressOnScroll(false); + return true; + } + + if (&source == this) + { + __releasedControl = TABLE_VIEW_ITEM_PRESSED_ITEM; + } + else if (&source == GetLabelCore(__pItemAnnex)) + { + __releasedControl = TABLE_VIEW_ITEM_PRESSED_ANNEX; + } + else if (IsIndividualSelectionEnabled(source)) + { + __releasedControl = TABLE_VIEW_ITEM_PRESSED_INDIVIDUAL; + } + else + { + __releasedControl = TABLE_VIEW_ITEM_PRESSED_NONE; + } + + __isTabSoundPlayed = IS_PLAYED_FEEDBACK(); + + if (!__itemTouchMoved && __isPressedTimerEnabled) + { + StopTouchPressedTimer(); + + if (!IsContextItem()) + { + FireItemTouchPressed(); + } + + StartTouchReleasedTimer(); + return true; + } + + FireItemTouchReleased(); + return true; +} + +void +_TableViewItem::FireItemTouchPressed() +{ + if (__isTouchCancelOnPressRelease == true) + { + return; + } + + if (__pressedControl == TABLE_VIEW_ITEM_PRESSED_ITEM) + { + __drawingStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED; + SetItemChanged(true); + Invalidate(true); + } + else if (__pressedControl == TABLE_VIEW_ITEM_PRESSED_ANNEX) + { + if (__annexStyle == TABLE_VIEW_ANNEX_STYLE_DETAILED) + { + __drawingStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL; + __isSelectedDetailButton = true; + DrawAnnexStyle(); + } + else if (__annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING || + __annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER) + { + __drawingStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL; + } + else + { + __drawingStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED; + SetItemChanged(true); + Invalidate(true); + } + } + else + { + if (__pressedControl != TABLE_VIEW_ITEM_PRESSED_INDIVIDUAL) + { + __drawingStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED; + SetItemChanged(true); + Invalidate(true); + } + } +} + +void +_TableViewItem::FireItemTouchReleased(bool isTouchRelease) +{ + if (__isTouchCancelOnPressRelease == true) + { + return; + } + + bool fireItemEvent = false; + bool selectedItem = true; + + __drawingStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL; + + if (__itemSelected == true) + { + bool checked = IsChecked(); + fireItemEvent = true; + + if (__releasedControl == TABLE_VIEW_ITEM_PRESSED_ITEM) + { + if ((__annexStyle == TABLE_VIEW_ANNEX_STYLE_RADIO) + || (__annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING)) + { + SetChecked(!checked); + } + else if (__annexStyle == TABLE_VIEW_ANNEX_STYLE_MARK) + { + SetChecked(!checked); + SetCheckedAnimationEnabled(!checked); + } + } + else if (__releasedControl == TABLE_VIEW_ITEM_PRESSED_ANNEX) + { + if (__annexStyle == TABLE_VIEW_ANNEX_STYLE_DETAILED) + { + __isSelectedDetailButton = false; + DrawAnnexStyle(); + selectedItem = false; + } + else if (__annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING || + __annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER) + { + bool isPreviousChecked = IsChecked(); + AdjustAnnexOnOffHandlerPosition(); + selectedItem = false; + if (isPreviousChecked == IsChecked()) + { + fireItemEvent = false; + } + } + else + { + SetChecked(!checked); + SetCheckedAnimationEnabled(!checked); + } + } + else + { + if (__releasedControl != TABLE_VIEW_ITEM_PRESSED_INDIVIDUAL) + { + if ((__annexStyle == TABLE_VIEW_ANNEX_STYLE_MARK) + || (__annexStyle == TABLE_VIEW_ANNEX_STYLE_RADIO) + || (__annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING)) + { + SetChecked(!checked); + SetCheckedAnimationEnabled(!checked); + } + } + else + { + fireItemEvent = false; + } + } + + SetItemChanged(true); + Invalidate(true); + } + else + { + if (__releasedControl == TABLE_VIEW_ITEM_PRESSED_ANNEX) + { + if (__annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING || + __annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER) + { + bool isPreviousChecked = IsChecked(); + AdjustAnnexOnOffHandlerPosition(); + fireItemEvent = true; + if (isPreviousChecked == IsChecked()) + { + fireItemEvent = false; + } + } + } + } + + __itemSelected = false; + __annexOnOffHandlerMoved = false; + __itemTouchMoved = false; + + 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); + } +} + +bool +_TableViewItem::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + if (IsReorderMode()) + { + return false; + } + + if (IsTouchPressOnScroll()) + { + SetTouchPressOnScroll(false); + } + + if (__isPressedTimerEnabled) + { + StopTouchPressedTimer(); + } + + bool retVal = false; + + if (&source == this) + { + __itemSelected = false; + __drawingStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL; + + SetItemChanged(true); + Invalidate(true); + } + else if (&source == GetLabelCore(__pItemAnnex)) + { + if (__annexStyle == TABLE_VIEW_ANNEX_STYLE_DETAILED) + { + __isSelectedDetailButton = false; + __itemSelected = false; + DrawAnnexStyle(); + } + else if (__annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING || + __annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER) + { + __annexOnOffHandlerMoved = true; + DrawAnnexOnOffHandler(touchinfo.GetCurrentPosition().x); + retVal = true; + } + else + { + __itemSelected = false; + __drawingStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL; + + SetItemChanged(true); + Invalidate(true); + } + } + else + { + if (!IsIndividualSelectionEnabled(source)) + { + __itemSelected = false; + __drawingStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL; + + SetItemChanged(true); + Invalidate(true); + } + } + + __itemTouchMoved = true; + + return retVal; +} + +bool +_TableViewItem::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + __isTouchCancelOnPressRelease = true; + + if (__isPressedTimerEnabled) + { + StopTouchPressedTimer(); + } + + __annexOnOffHandlerMoved = false; + __itemTouchMoved = false; + + ResetItemState(); + + if (&source != this) + { + return false; + } + + return true; +} + +_UiTouchEventDelivery +_TableViewItem::OnPreviewTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + if (IsTouchPressOnScroll()) + { + SetTouchPressOnScroll(false); + return _UI_TOUCH_EVENT_DELIVERY_NO; + } + return _UI_TOUCH_EVENT_DELIVERY_FORCED_YES; +} + +_UiTouchEventDelivery +_TableViewItem::OnPreviewTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + return _UI_TOUCH_EVENT_DELIVERY_FORCED_YES; +} + +_UiTouchEventDelivery +_TableViewItem::OnPreviewTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + return _UI_TOUCH_EVENT_DELIVERY_YES; +} + +_UiTouchEventDelivery +_TableViewItem::OnPreviewTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + return _UI_TOUCH_EVENT_DELIVERY_FORCED_YES; +} + +void +_TableViewItem::OnDraw(void) +{ + if (IsItemChanged() == true) + { + DrawItemBackground(); + DrawAnnexStyle(); + DrawItemDivider(); + DrawSimpleItem(); + DrawSectionStyleBackgroundCover(); + + SetItemChanged(false); + } +} + +void +_TableViewItem::OnChildAttached(const _Control& child) +{ + _Control* pControl = const_cast<_Control*>(&child); + _AccessibilityContainer* pContainer = pControl->GetAccessibilityContainer(); + + if (__individualSelectionControls.Contains(child)) + { + pContainer->Activate(true); + } + else + { + pContainer->Activate(false); + + if (!(pControl == static_cast<_Control*>(__pItemAnnexLeftDivider) + || pControl == static_cast<_Control*>(__pItemAnnexRightDivider) + || pControl == static_cast<_Control*>(__pItemCover) + || pControl == static_cast<_Control*>(__pItemDivider) + || pControl== static_cast<_Control*>(__pItemTopDivider))) + { + GetAccessibilityContainer()->Activate(true); + } + } + + DeactivateChildAccessibilityContainer(child); + + pControl->SetTouchPressThreshold(SENSITIVE); + + FloatRectangle bounds = child.GetBoundsF(); + + if (__pDrawingProperty != null && __pDrawingProperty->groupedLookEnabled) + { + float groupedBarMargin = 0.0f; + GET_SHAPE_CONFIG(TABLEVIEW::GROUPITEM_BAR_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, groupedBarMargin); + + bounds.x += groupedBarMargin; + } + + if ((__annexStyle == TABLE_VIEW_ANNEX_STYLE_MARK) || (__annexStyle == TABLE_VIEW_ANNEX_STYLE_RADIO)) + { + if (GetLabelCore(__pItemAnnex) == &child || + GetLabelCore(__pSimpleItemBitmap) == &child || + GetLabelCore(__pSimpleItemText) == &child) + { + return; + } + + float leftMargin = 0.0f; + float annexWidth = 0.0f; + + GET_SHAPE_CONFIG(TABLEVIEW::ITEM_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, leftMargin); + GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, annexWidth); + + bounds.x += (leftMargin * 2) + annexWidth; + } + + pControl->SetBounds(bounds); +} + +void +_TableViewItem::OnChildDetached(const _Control& child) +{ + if (__individualSelectionControls.Contains(child)) + { + __individualSelectionControls.Remove(child, false); + } + + _Label* pSimpleItemTextCore = GetLabelCore(__pSimpleItemText); + _Label* pSimpleItemBitmapCore = GetLabelCore(__pSimpleItemBitmap); + + if (&child == pSimpleItemTextCore) + { + delete __pSimpleItemText; + __pSimpleItemText = null; + } + + if (&child == pSimpleItemBitmapCore) + { + delete __pSimpleItemBitmap; + __pSimpleItemBitmap = null; + } +} + +void +_TableViewItem::OnTimerExpired(Tizen::Base::Runtime::Timer& timer) +{ + result r = E_SUCCESS; + + if (&timer == __pCheckedTimer) + { + if (__checkedCount < MAX_CHECKED_COUNT) + { + r = __pCheckedTimer->Start(CHECKED_ANIMATION_DURATION); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + r = PlayCheckBoxAnimation(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (__checkedCount < MAX_CHECKED_COUNT) + { + __checkedCount++; + } + else + { + __checkedCount = 0; + __isCheckedAnimationEnabled = false; + __isCheckedTimerEnabled = false; + } + } + else if (&timer == __pPressedTimer) + { + __isPressedTimerEnabled = false; + FireItemTouchPressed(); + } + else if (&timer == __pReleasedTimer) + { + __isReleasedTimerEnabled = false; + FireItemTouchReleased(); + } +} + +result +_TableViewItem::StartTouchPressedTimer(const _Control& source, const _TouchInfo& touchinfo) +{ + result r = E_SUCCESS; + + if (__pPressedTimer == null) + { + __pPressedTimer = new (std::nothrow) Timer(); + 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); + } + + if (__isPressedTimerEnabled == false) + { + r = __pPressedTimer->Start(TOUCH_PRESSED_DURATION); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + __isPressedTimerEnabled = true; + } + + return r; + +CATCH: + if (__isPressedTimerEnabled && __pPressedTimer != null) + { + __pPressedTimer->Cancel(); + } + + delete __pPressedTimer; + __pPressedTimer = null; + + return r; +} + +void +_TableViewItem::StopTouchPressedTimer(bool forceStop) +{ + result r = E_SUCCESS; + + if (__pPressedTimer == null) + { + return; + } + + if (__isPressedTimerEnabled || forceStop) + { + r = __pPressedTimer->Cancel(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + __isPressedTimerEnabled = false; + + return; +} + +result +_TableViewItem::StartTouchReleasedTimer() +{ + result r = E_SUCCESS; + + if (__pReleasedTimer == null) + { + __pReleasedTimer = new (std::nothrow) Timer(); + 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); + } + + if (!__isReleasedTimerEnabled) + { + r = __pReleasedTimer->Start(TOUCH_RELEASED_DURATION); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + __isReleasedTimerEnabled = true; + + return r; + +CATCH: + if (__isReleasedTimerEnabled && __pReleasedTimer != null) + { + __pReleasedTimer->Cancel(); + } + + delete __pReleasedTimer; + __pReleasedTimer = null; + + return r; +} + +void +_TableViewItem::StopTouchReleasedTimer(bool forceStop) +{ + result r = E_SUCCESS; + + if (__pReleasedTimer == null) + { + return; + } + + if (__isReleasedTimerEnabled || forceStop) + { + r = __pReleasedTimer->Cancel(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + __isReleasedTimerEnabled = false; + + return; +} + +void +_TableViewItem::OnAncestorInputEnableStateChanged(const _Control& control) +{ + if (__isPressedTimerEnabled) + { + StopTouchPressedTimer(); + } + + __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(); +} + +result +_TableViewItem::StartCheckBoxAnimation(void) +{ + result r = E_SUCCESS; + + if (__pCheckedTimer == null) + { + __pCheckedTimer = new (std::nothrow) Timer(); + 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); + } + + if (__isCheckedTimerEnabled == false) + { + r = __pCheckedTimer->Start(CHECKED_ANIMATION_DURATION); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + __isCheckedTimerEnabled = true; + } + + return r; + +CATCH: + if (__isCheckedTimerEnabled) + { + __pCheckedTimer->Cancel(); + } + + delete __pCheckedTimer; + __pCheckedTimer = null; + + return r; +} + +void +_TableViewItem::StopCheckBoxAnimation(void) +{ + result r = E_SUCCESS; + + SysTryReturnVoidResult(NID_UI_CTRL, __pCheckedTimer != null, E_SYSTEM, "[%s] A system error has been occurred. Timer is invalid.", GetErrorMessage(E_SYSTEM)); + + + if (__isCheckedTimerEnabled) + { + r = __pCheckedTimer->Cancel(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + __checkedCount = 0; + __isCheckedAnimationEnabled = false; + __isCheckedTimerEnabled = false; + + return; +} + +result +_TableViewItem::PlayCheckBoxAnimation(void) +{ + Bitmap* pCheckBox = null; + Bitmap* pCheckBoxBg = null; + Bitmap* pMergeBitmap = null; + Canvas* pCanvas = null; + result r = E_SUCCESS; + + FloatRectangle bounds; + + float annexWidth = 0.0f; + float annexHeight = 0.0f; + + if (__drawingStatus == TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL) + { + r = GET_BITMAP_CONFIG_N(TABLEVIEW::CHECKBOX_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pCheckBoxBg); + } + else if ((__drawingStatus == TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED) || (__drawingStatus == TABLE_VIEW_ITEM_DRAWING_STATUS_HIGHLIGHTED)) + { + r = GET_BITMAP_CONFIG_N(TABLEVIEW::CHECKBOX_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pCheckBoxBg); + } + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pCheckBoxBg != null), , E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + r = GET_BITMAP_CONFIG_N(TABLEVIEW::CHECKBOX_CHECK_MARK_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pCheckBox); + SysTryCatch(NID_UI_CTRL,(r == E_SUCCESS) && (pCheckBox != null), , E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, annexWidth); + GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + r = pCanvas->Construct(bounds); + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + + DrawBitmap(*pCanvas, CalculateAnnexBitmapBounds(annexWidth, annexHeight, *pCheckBoxBg), *pCheckBoxBg); + + __checkedBounds = CalculateAnnexBitmapBounds(annexWidth, annexHeight, *pCheckBox); + if (IsChecked() == true) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pCheckBox)) + { + FloatRectangle drawingRect(__checkedBounds.x, __checkedBounds.y, __checkedBounds.width, __checkedBounds.height); + r = pCanvas->DrawNinePatchedBitmap(drawingRect, *pCheckBox); // +++ check floating + } + else + { + FloatRectangle bitmapSourceRect(0.0f, 0.0f, pCheckBox->GetWidthF()*__checkedCount * 0.1, pCheckBox->GetHeightF()); + FloatRectangle drawingRect(__checkedBounds.x, __checkedBounds.y, __checkedBounds.width * __checkedCount * 0.1, __checkedBounds.height); + r = pCanvas->DrawBitmap(drawingRect, *pCheckBox, bitmapSourceRect); // +++ check floating + } + } + + pMergeBitmap = new (std::nothrow) Bitmap(); + 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); + + if (__pItemAnnex) + { + __pItemAnnex->SetBackgroundBitmap(*pMergeBitmap); + __pItemAnnex->Invalidate(false); + } + +CATCH: + delete pCheckBox; + delete pCheckBoxBg; + delete pMergeBitmap; + delete pCanvas; + + return r; +} + +void +_TableViewItem::SetItemLayoutEnabled(bool enabled) +{ + __isItemLayoutEnabled = enabled; +} + +bool +_TableViewItem::GetItemLayoutEnabled(void) +{ + return __isItemLayoutEnabled; +} + +void +_TableViewItem::OnBoundsChanged(void) +{ + if (__checkItemHeightNeeded && HasParent()) + { + _TableView* pParent = dynamic_cast<_TableView*>(GetParent()); + if (pParent != null) + { + int groupIndex = -1; + int itemIndex = -1; + GetItemIndex(groupIndex, itemIndex); + + pParent->CheckItemHeightAndRefreshLayout(groupIndex, itemIndex); + } + + __checkItemHeightNeeded = false; + } + + AdjustAnnexBounds(); + + SetItemHighlightBounds(*__pHighlightVisualElement, CalculateItemHighlightBounds()); + + if (__pHeaderFooterItemText != null) + { + FloatRectangle textBounds = __pHeaderFooterItemText->GetBoundsF(); + textBounds.width = GetBoundsF().width; + + if (__itemType == TABLE_VIEW_ITEM_TYPE_FOOTER) + { + textBounds.x -= __pDrawingProperty->scrollMargin; + } + + __pHeaderFooterItemText->SetBounds(textBounds); + } + + if (__pBitmapVisualElement != null) + { + FloatRectangle bounds = GetBoundsF(); + __pBitmapVisualElement->SetBounds(FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height)); + } + + if (__pAccessibilityElement != null) + { + __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, "[%s] Invalid argument(s) is used. The pDrawingProperty is null.", GetErrorMessage(E_INVALID_ARG)); + + __pDrawingProperty = pDrawingProperty; + + if (__pDrawingProperty->sectionStyleEnabled == true && + !IsContextItem()) + { + CreateItemCover(); + } + + if (__pDrawingProperty->itemDividerEnabled) + { + CreateItemDivider(); + } + + CreateAnnexStyle(); +} + +_ItemDrawingProperty* +_TableViewItem::GetDrawingProperty(void) +{ + return __pDrawingProperty; +} + +void +_TableViewItem::DrawItemBackground(void) +{ + Canvas* pCanvas = null; + Bitmap* pDrawBitmap = __pItemBgBitmap[__drawingStatus]; + Color bgColor = __colorItemBg[__drawingStatus]; + FloatRectangle bounds = GetBoundsF(); + + SetItemHighlightBounds(*__pHighlightVisualElement, CalculateItemHighlightBounds()); + __pHighlightVisualElement->SetBackgroundColor(_Colorf(0.0f, 0.0f, 0.0f, 0.0f)); + + if (pDrawBitmap != null && __enabledState) + { + if (__pBitmapVisualElement == null) + { + return; + } + + String imagePath = null; + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pDrawBitmap) == false) + { + imagePath = _BitmapImpl::GetInstance(*pDrawBitmap)->GetFileName(); + } + + if (imagePath.IsEmpty() == false) + { + __pBitmapVisualElement->SetBackgroundColor(_Colorf((float)bgColor.GetRed() /255, (float)bgColor.GetGreen() / 255, (float)bgColor.GetBlue() / 255, (float)bgColor.GetAlpha() / 255)); + __pBitmapVisualElement->SetImageSource(imagePath); + } + else + { + pCanvas = __pBitmapVisualElement->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), *pDrawBitmap); + } + } + + if (IsContextItem()) + { + DrawContextItemBackground(); + } + else if (__pDrawingProperty->sectionStyleEnabled == true) + { + DrawSectionStyleBackground(); + } + else + { + if (__enabledState) + { + if (__itemType == TABLE_VIEW_ITEM_TYPE_HEADER || __itemType == TABLE_VIEW_ITEM_TYPE_FOOTER) + { + SetBackgroundColor(Color(0, 0, 0, 0)); + __pHighlightVisualElement->SetBackgroundColor(_Colorf(0.0f, 0.0f, 0.0f, 0.0f)); + } + else if (__itemType == TABLE_VIEW_ITEM_TYPE_TITLE) + { + __pHighlightVisualElement->SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255.0f, (float)bgColor.GetGreen() / 255.0f, (float)bgColor.GetBlue() / 255.0f, (float)bgColor.GetAlpha() / 255.0f)); + } + else + { + SetBackgroundColor(__colorItemBg[TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL]); + + __pHighlightVisualElement->SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255.0f, (float)bgColor.GetGreen() / 255.0f, (float)bgColor.GetBlue() / 255.0f, (float)bgColor.GetAlpha() / 255.0f)); + + if (__pDrawingProperty->groupedLookEnabled == true) + { + DrawGroupedLook(); + } + } + } + else + { + GET_COLOR_CONFIG(TABLEVIEW::ITEM_BG_DISABLED, bgColor); + SetBackgroundColor(bgColor); + __pHighlightVisualElement->SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255.0f, (float)bgColor.GetGreen() / 255.0f, (float)bgColor.GetBlue() / 255.0f, (float)bgColor.GetAlpha() / 255.0f)); + + if (__pDrawingProperty->groupedLookEnabled == true) + { + DrawGroupedLook(); + } + } + } + + delete pCanvas; + return; + +CATCH: + + if (__pBitmapVisualElement != null) + { + __pBitmapVisualElement->RemoveAllAnimations(); + __pBitmapVisualElement->SetAnimationProvider(null); + __pBitmapVisualElement->Destroy(); + __pBitmapVisualElement = null; + } +} + +void +_TableViewItem::DrawGroupedLook(void) +{ + if (IsTitleStyleItem() || IsContextItem()) + { + return; + } + + Color barColor; + Color outlineColor = __pDrawingProperty->dividerColor; + + float barWidth = 0.0f; + + Canvas* pCanvas = GetVisualElement()->GetCanvasN(); + SysTryReturnVoidResult(NID_UI_CTRL, pCanvas != null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + FloatRectangle bounds = GetBoundsF(); + pCanvas->SetBackgroundColor(GetBackgroundColor()); + pCanvas->Clear(); + + GET_COLOR_CONFIG(TABLEVIEW::GROUPITEM_BAR_NORMAL, barColor); + GET_SHAPE_CONFIG(TABLEVIEW::GROUPITEM_BAR_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, barWidth); + + pCanvas->FillRectangle(barColor, FloatRectangle(0.0f, 0.0f, barWidth, bounds.height)); + + if (__pDrawingProperty->sectionStyleEnabled == true) + { + pCanvas->FillRectangle(outlineColor, FloatRectangle(bounds.width - 1.0f, 0.0f, 1.0f, bounds.height)); + + if (__itemType == TABLE_VIEW_ITEM_TYPE_TOP || __itemType == TABLE_VIEW_ITEM_TYPE_ONE) + { + pCanvas->FillRectangle(outlineColor, FloatRectangle(0.0f, 0.0f, bounds.width, 1.0f)); + } + } + + delete pCanvas; +} + +void +_TableViewItem::DrawSectionStyleBackground(void) +{ + Canvas* pCanvas = null; + Bitmap* pReplacementSectionPressBg = null; + Bitmap* pReplacementSectionBg = null; + Bitmap* pReplacementSectionDisabledBg = null; + Color bgColor = __colorItemBg[__drawingStatus]; + FloatRectangle bounds = GetBoundsF(); + float dividerHeight = 0.0f; + + result r = E_SUCCESS; + + pCanvas = GetVisualElement()->GetCanvasN(); + SysTryReturnVoidResult(NID_UI_CTRL, pCanvas != null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(r)); + + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + + if (bgColor != null) + { + 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 + { + 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, "[%s] A system error has been occurred. SectionStyle image load failed", GetErrorMessage(E_SYSTEM)); + + if (__enabledState) + { + if (__drawingStatus == TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED || __drawingStatus == TABLE_VIEW_ITEM_DRAWING_STATUS_HIGHLIGHTED) + { + if (__itemType == TABLE_VIEW_ITEM_TYPE_ONE) + { + if (IS_CUSTOM_BITMAP(TABLEVIEW::SECTIONITEM_SINGLE_BG_PRESSED)) + { + 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_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_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_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 (pReplacementSectionPressBg) + { + DrawBitmap(*pCanvas, FloatRectangle(0.0f, dividerHeight, bounds.width, bounds.height - (dividerHeight * 2)), *pReplacementSectionPressBg); + } + else + { + DrawBitmap(*pCanvas, FloatRectangle(0.0f, dividerHeight, bounds.width, bounds.height - (dividerHeight * 2)), *pReplacementSectionBg); + } + } + else + { + 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_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_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_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_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)); + } + } + + if (pReplacementSectionDisabledBg) + { + DrawBitmap(*pCanvas, FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height), *pReplacementSectionDisabledBg); + } + else + { + DrawBitmap(*pCanvas, FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height), *pReplacementSectionBg); + } + } + + if (__pDrawingProperty->groupedLookEnabled == true) + { + Color barColor; + + float barWidth = 0.0f; + float barMargin = 0.0f; + + GET_COLOR_CONFIG(TABLEVIEW::GROUPITEM_BAR_NORMAL, barColor); + GET_SHAPE_CONFIG(TABLEVIEW::GROUPITEM_BAR_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, barWidth); + GET_SHAPE_CONFIG(TABLEVIEW::GROUPITEM_BAR_TOP_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, barMargin); + + pCanvas->FillRectangle(barColor, FloatRectangle(0.0f, barMargin, barWidth, bounds.height-barMargin)); + } + +CATCH: + delete pReplacementSectionPressBg; + delete pReplacementSectionBg; + delete pReplacementSectionDisabledBg; + delete pCanvas; +} + +void +_TableViewItem::DrawSectionStyleBackgroundCover(void) +{ + if (!__pDrawingProperty->sectionStyleEnabled || + __pItemCover == null) + { + return; + } + + Bitmap* pReplacementSectionBgEf = null; + Bitmap* pReplacementSectionBg = 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_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_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_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_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, "[%s] A system error has been occurred. SectionStyle image load failed", GetErrorMessage(E_SYSTEM)); + + if (__itemType == TABLE_VIEW_ITEM_TYPE_ONE) + { + 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_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_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_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, "[%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)); + + pCanvas = new (std::nothrow) Canvas(); + 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(); + + DrawBitmap(*pCanvas, FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height), *pReplacementSectionBg); + 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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + pMergeBitmap->Construct(*pCanvas, FloatRectangle(0.0f, 0.0f, bounds.width, bounds.height)); + + _BitmapImpl::ConvertToNonpremultiplied(*pMergeBitmap, true); + + __pItemCover->SetBackgroundBitmap(*pMergeBitmap); + +CATCH: + delete pReplacementSectionBgEf; + delete pReplacementSectionBg; + delete pCanvas; + delete pMergeBitmap; +} + +void +_TableViewItem::DrawContextItemBackground(void) +{ + Canvas* pCanvas = null; + Bitmap* pContextBgEf = null; + Bitmap* pReplacementContextBg = null; + Color bgColor = __colorItemBg[__drawingStatus]; + + FloatRectangle bounds = GetBoundsF(); + result r = E_SUCCESS; + + if (__enabledState) + { + if (bgColor == null) + { + GET_COLOR_CONFIG(TABLEVIEW::CONTEXTITEM_BG_NORMAL, bgColor); + } + } + else + { + GET_COLOR_CONFIG(TABLEVIEW::ITEM_BG_DISABLED, bgColor); + } + + 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 pContextBgEf; + delete pReplacementContextBg; +} + + +void +_TableViewItem::CreateAnnexStyle(void) +{ + switch (__annexStyle) + { + case TABLE_VIEW_ANNEX_STYLE_MARK: + CreateCheckBox(); + break; + case TABLE_VIEW_ANNEX_STYLE_RADIO: + CreateRadioBox(); + break; + case TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING: + CreateOnOffButton(); + break; + case TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER: + CreateItemAnnexDivider(); + CreateOnOffButton(); + break; + case TABLE_VIEW_ANNEX_STYLE_DETAILED: + CreateDetailButton(); + break; + default: + break; + } +} + +void +_TableViewItem::DrawAnnexStyle(void) +{ + switch (__annexStyle) + { + case TABLE_VIEW_ANNEX_STYLE_MARK: + DrawCheckBox(); + break; + case TABLE_VIEW_ANNEX_STYLE_RADIO: + DrawRadioBox(); + break; + case TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING: + DrawOnOffButton(); + break; + case TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER: + DrawItemAnnexDivider(); + DrawOnOffButton(); + break; + case TABLE_VIEW_ANNEX_STYLE_DETAILED: + DrawDetailButton(); + break; + default: + break; + } +} + +void +_TableViewItem::DrawCheckBox(void) +{ + Bitmap* pCheckBox = null; + Bitmap* pCheckBoxBg = null; + Bitmap* pMergeBitmap = null; + Canvas* pCanvas = null; + result r = E_SUCCESS; + + FloatRectangle bounds; + float annexWidth = 0.0f; + float annexHeight = 0.0f; + + if (__enabledState) + { + if (__drawingStatus == TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL) + { + r = GET_BITMAP_CONFIG_N(TABLEVIEW::CHECKBOX_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pCheckBoxBg); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pCheckBoxBg != null), , E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + r = GET_BITMAP_CONFIG_N(TABLEVIEW::CHECKBOX_CHECK_MARK_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pCheckBox); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pCheckBox != null), , E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + } + else if ((__drawingStatus == TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED) || (__drawingStatus == TABLE_VIEW_ITEM_DRAWING_STATUS_HIGHLIGHTED)) + { + r = GET_BITMAP_CONFIG_N(TABLEVIEW::CHECKBOX_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pCheckBoxBg); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pCheckBoxBg != null), , E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + r = GET_BITMAP_CONFIG_N(TABLEVIEW::CHECKBOX_CHECK_MARK_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pCheckBox); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pCheckBox != null), , E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + } + + } + else + { + r = GET_BITMAP_CONFIG_N(TABLEVIEW::CHECKBOX_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pCheckBoxBg); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pCheckBoxBg != null), , E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + r = GET_BITMAP_CONFIG_N(TABLEVIEW::CHECKBOX_CHECK_MARK_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pCheckBox); + SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS) && (pCheckBox != null), , E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + } + + GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, annexWidth); + GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, annexHeight); + + bounds.SetBounds(0.0f, 0.0f, annexWidth, annexHeight); + + pCanvas = new (std::nothrow) Canvas(); + 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)); + pCanvas->Clear(); + + DrawBitmap(*pCanvas, CalculateAnnexBitmapBounds(annexWidth, annexHeight, *pCheckBoxBg), *pCheckBoxBg); + + if (__isCheckedAnimationEnabled == true) + { + StartCheckBoxAnimation(); + } + else + { + if (IsChecked() == true && pCheckBox != null) + { + DrawBitmap(*pCanvas, CalculateAnnexBitmapBounds(annexWidth, annexHeight, *pCheckBox), *pCheckBox); + } + } + + pMergeBitmap = new (std::nothrow) Bitmap(); + 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); + + __pItemAnnex->SetBackgroundBitmap(*pMergeBitmap); + __pItemAnnex->Invalidate(false); + +CATCH: + delete pCheckBox; + delete pCheckBoxBg; + delete pMergeBitmap; + delete pCanvas; + + return; +} + +void +_TableViewItem::DrawRadioBox(void) +{ + Bitmap* pRadioButton = null; + Bitmap* pRadioButtonBg = null; + Bitmap* pMergeBitmap = null; + Canvas* pCanvas = null; + result r = E_SUCCESS; + + FloatRectangle bounds; + float annexWidth = 0.0f; + float annexHeight = 0.0f; + + if (__enabledState) + { + 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, "[%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, "[%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, "[%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, "[%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, "[%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, "[%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); + GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, annexHeight); + bounds.SetBounds(0.0f, 0.0f, annexWidth, annexHeight); + + pCanvas = new (std::nothrow) Canvas(); + 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)); + pCanvas->Clear(); + + DrawBitmap(*pCanvas, CalculateAnnexBitmapBounds(annexWidth, annexHeight, *pRadioButtonBg), *pRadioButtonBg); + + if (pRadioButton != null && IsChecked() == true) + { + DrawBitmap(*pCanvas, CalculateAnnexBitmapBounds(annexWidth, annexHeight, *pRadioButton), *pRadioButton); + } + + pMergeBitmap = new (std::nothrow) Bitmap(); + 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); + + __pItemAnnex->SetBackgroundBitmap(*pMergeBitmap); + __pItemAnnex->Invalidate(false); + +CATCH: + delete pRadioButton; + delete pRadioButtonBg; + delete pMergeBitmap; + delete pCanvas; + + return; +} + +void +_TableViewItem::DrawOnOffButton(void) +{ + Bitmap* pOnOffButton = null; + Bitmap* pOnOffButtonHandler = null; + Bitmap* pMergeBitmap = null; + Canvas* pCanvas = null; + result r = E_SUCCESS; + + FloatRectangle bounds; + FloatRectangle backgroundBounds; + FloatRectangle handlerBounds; + float annexWidth = 0.0f; + float annexHeight = 0.0f; + float annexMargin = 0.0f; + + if (IsChecked() == true) + { + if (__enabledState) + { + r = GET_BITMAP_CONFIG_N(TABLEVIEW::ONOFFBUTTON_ON_HANDLER, BITMAP_PIXEL_FORMAT_ARGB8888, pOnOffButtonHandler); + } + else + { + r = GET_BITMAP_CONFIG_N(TABLEVIEW::ONOFFBUTTON_ON_HANDLER_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pOnOffButtonHandler); + } + } + else + { + if (__enabledState) + { + r = GET_BITMAP_CONFIG_N(TABLEVIEW::ONOFFBUTTON_OFF_HANDLER, BITMAP_PIXEL_FORMAT_ARGB8888, pOnOffButtonHandler); + } + else + { + 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, "[%s] A system error has been occurred. OnOffButtonHandler image load failed", GetErrorMessage(E_SYSTEM)); + + if (__enabledState) + { + r = GET_BITMAP_CONFIG_N(TABLEVIEW::ONOFFBUTTON_BG, BITMAP_PIXEL_FORMAT_ARGB8888, pOnOffButton); + } + else + { + 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, "[%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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + pCanvas->Construct(bounds); + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + + backgroundBounds = CalculateAnnexBitmapBounds(annexWidth, annexHeight, *pOnOffButton); + DrawBitmap(*pCanvas, backgroundBounds, *pOnOffButton); + + handlerBounds = CalculateAnnexBitmapBounds(annexWidth, annexHeight, *pOnOffButtonHandler); + GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_ONOFF_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, annexMargin); + if (IsChecked() == true) + { + handlerBounds.x = backgroundBounds.width - handlerBounds.width - annexMargin; + } + else + { + handlerBounds.x = backgroundBounds.x + annexMargin; + } + + DrawBitmap(*pCanvas, handlerBounds, *pOnOffButtonHandler); + + pMergeBitmap = new (std::nothrow) Bitmap(); + 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); + + __pItemAnnex->SetBackgroundBitmap(*pMergeBitmap); + __pItemAnnex->Invalidate(false); + +CATCH: + delete pOnOffButton; + delete pOnOffButtonHandler; + delete pMergeBitmap; + delete pCanvas; + + return; +} + +void +_TableViewItem::AdjustAnnexOnOffHandlerPosition() +{ + float annexWidth = 0.0f; + float annexHeight = 0.0f; + float annexMargin = 0.0f; + + float annexStartPositionX = 0.0f; + float annexEndPositionX = 0.0f; + float handlerPositionX = 0.0f; + FloatRectangle handlerBounds; + result r = E_SUCCESS; + + GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_ONOFF_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, annexMargin); + + Bitmap* pOnOffButtonHandler = null; + if (IsChecked() == true) + { + r = GET_BITMAP_CONFIG_N(TABLEVIEW::ONOFFBUTTON_ON_HANDLER, BITMAP_PIXEL_FORMAT_ARGB8888, pOnOffButtonHandler); + } + else + { + 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, "[%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); + + annexStartPositionX = __pItemAnnex->GetBoundsF().x; + annexEndPositionX = annexStartPositionX + annexWidth + annexMargin; + + handlerBounds = CalculateAnnexBitmapBounds(annexWidth, annexHeight, *pOnOffButtonHandler); + + if (__annexOnOffHandlerMoved) + { + if (annexStartPositionX <= __annexOnOffHandlerPositionX + && annexEndPositionX >= __annexOnOffHandlerPositionX) + { + if (((annexEndPositionX - annexStartPositionX) / 2) < (__annexOnOffHandlerPositionX + (handlerBounds.width / 2)) - annexStartPositionX) + { + handlerPositionX = annexEndPositionX; + SetChecked(true); + } + else + { + handlerPositionX = annexStartPositionX; + SetChecked(false); + } + } + } + else + { + SetChecked(!IsChecked()); + if (IsChecked()) + { + handlerPositionX = annexEndPositionX; + } + else + { + handlerPositionX = annexStartPositionX; + } + } + + DrawAnnexOnOffHandler(handlerPositionX); + + delete pOnOffButtonHandler; + + return; +} + +void +_TableViewItem::DrawAnnexOnOffHandler(float touchEndPosition) +{ + if (__pItemAnnex == null) + { + return; + } + + Bitmap* pOnOffButton = null; + Bitmap* pOnOffButtonHandler = null; + Bitmap* pMergeBitmap = null; + Canvas* pCanvas = null; + result r = E_SUCCESS; + + FloatRectangle backgroundBounds; + FloatRectangle handlerBounds; + float annexWidth = 0.0f; + float annexHeight = 0.0f; + float annexMargin = 0.0f; + float annexX = 0.0f; + 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, "[%s] A system error has been occurred. OnOffButton image load failed", GetErrorMessage(E_SYSTEM)); + + if (IsChecked() == true) + { + r = GET_BITMAP_CONFIG_N(TABLEVIEW::ONOFFBUTTON_ON_HANDLER, BITMAP_PIXEL_FORMAT_ARGB8888, pOnOffButtonHandler); + } + else + { + 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, "[%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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + pCanvas->Construct(FloatRectangle(0, 0, annexWidth, annexHeight)); + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + + backgroundBounds = CalculateAnnexBitmapBounds(annexWidth, annexHeight, *pOnOffButton); + DrawBitmap(*pCanvas, backgroundBounds, *pOnOffButton); + + handlerBounds = CalculateAnnexBitmapBounds(annexWidth, annexHeight, *pOnOffButtonHandler); + handlerBounds.y = backgroundBounds.y; + + if (IsChecked()) + { + handlerBounds.x = backgroundBounds.width - handlerBounds.width - annexMargin; + } + else + { + handlerBounds.x = backgroundBounds.x + annexMargin; + } + + nextHandlerX = handlerBounds.x + (touchEndPosition - __annexTouchStartPosition); + annexX = __pItemAnnex->GetBoundsF().x; + + if ((annexX + nextHandlerX + handlerBounds.width) < (annexX + annexWidth + annexMargin) + && (annexX + nextHandlerX) > annexX) + { + handlerBounds.x = nextHandlerX; + } + else if (_FloatCompareGE((annexX + nextHandlerX + handlerBounds.width), (annexX + annexWidth + annexMargin))) + { + handlerBounds.x = backgroundBounds.width - handlerBounds.width - annexMargin; + } + else if (_FloatCompareLE((annexX + nextHandlerX), annexX)) + { + handlerBounds.x = backgroundBounds.x + annexMargin; + } + + __annexOnOffHandlerPositionX = annexX + handlerBounds.x; + DrawBitmap(*pCanvas, handlerBounds, *pOnOffButtonHandler); + + pMergeBitmap = new (std::nothrow) Bitmap(); + 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); + + __pItemAnnex->SetBackgroundBitmap(*pMergeBitmap); + __pItemAnnex->Invalidate(false); + +CATCH: + delete pOnOffButton; + delete pOnOffButtonHandler; + delete pMergeBitmap; + delete pCanvas; + + return; +} + +void +_TableViewItem::DrawDetailButton(void) +{ + Bitmap* pDetailBgEffect = null; + Bitmap* pDetailEffect = null; + Bitmap* pReplacementDetail = null; + Bitmap* pReplacementDetailBg = null; + Bitmap* pMergeBitmap = null; + Canvas* pCanvas = null; + Color replacementNewColor; + Color replacementNewBgColor; + result r = E_SUCCESS; + + FloatRectangle bounds; + float annexWidth = 0.0f; + float annexHeight = 0.0f; + bool themeBackgroundBitmap = false; + + themeBackgroundBitmap = IS_CUSTOM_BITMAP(TABLEVIEW::CIRCLE_BUTTON_BG_NORMAL); + + if (__enabledState) + { + 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, "[%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,"[%s] A system error has been occurred. Detail button image load failed", GetErrorMessage(E_SYSTEM)); + } + + 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 + { + 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, "[%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, "[%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_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, "[%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, "[%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_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)); + + 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)); + } + + 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); + + bounds.SetBounds(0, 0, annexWidth, annexHeight); + + pCanvas = new (std::nothrow) Canvas(); + 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)); + pCanvas->Clear(); + + DrawBitmap(*pCanvas, CalculateAnnexBitmapBounds(annexWidth, annexHeight, *pReplacementDetailBg), *pReplacementDetailBg); + if (pDetailBgEffect) + { + DrawBitmap(*pCanvas, CalculateAnnexBitmapBounds(annexWidth, annexHeight, *pDetailBgEffect), *pDetailBgEffect); + } + DrawBitmap(*pCanvas, CalculateAnnexBitmapBounds(annexWidth, annexHeight, *pReplacementDetail), *pReplacementDetail); + if (pDetailEffect) + { + DrawBitmap(*pCanvas, CalculateAnnexBitmapBounds(annexWidth, annexHeight, *pDetailEffect), *pDetailEffect); + } + + pMergeBitmap = new (std::nothrow) Bitmap(); + 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); + + __pItemAnnex->SetBackgroundBitmap(*pMergeBitmap); + __pItemAnnex->Invalidate(false); + +CATCH: + delete pDetailBgEffect; + delete pDetailEffect; + delete pReplacementDetail; + delete pReplacementDetailBg; + delete pMergeBitmap; + delete pCanvas; + + return; +} + +void +_TableViewItem::DrawItemDivider(void) +{ + if (__pItemDivider == null || __pItemTopDivider == null) + { + return; + } + + if (__pDrawingProperty->itemDividerEnabled == false || + __itemType == TABLE_VIEW_ITEM_TYPE_HEADER || + __itemType == TABLE_VIEW_ITEM_TYPE_FOOTER || + __itemDividerEnabled == false || + __isSectionItem) + { + __pItemDivider->SetVisibleState(false); + __pItemTopDivider->SetVisibleState(false); + + return; + } + + FloatRectangle dividerBottomBounds; + FloatRectangle dividerTopBounds; + Color topLineColor; + Color bottomLineColor; + Color customDividerColor; + FloatRectangle bounds; + FloatPoint bottomPoint; + + __pItemDivider->SetVisibleState(true); + __pItemTopDivider->SetVisibleState(true); + + if ( __drawingStatus == TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED || + __drawingStatus == TABLE_VIEW_ITEM_DRAWING_STATUS_HIGHLIGHTED) + { + if (__colorItemBg[TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL] != __colorItemBg[TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED]) + { + if (__itemType != TABLE_VIEW_ITEM_TYPE_TITLE) + { + __pItemDivider->SetVisibleState(false); + } + + __pItemTopDivider->SetVisibleState(false); + } + } + + if (__itemType == TABLE_VIEW_ITEM_TYPE_TITLE) + { + if (__pItemBgBitmap[__drawingStatus] != null) + { + __pItemDivider->SetVisibleState(false); + } + else + { + float lineHeight = 0.0f; + float lineLeftMargin = 0.0f; + bounds = GetBoundsF(); + + if (__drawingStatus == TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL) + { + GET_COLOR_CONFIG(TABLEVIEW::GROUPITEM_INDEX_BAR_NORMAL, bottomLineColor); + } + else + { + GET_COLOR_CONFIG(TABLEVIEW::GROUPITEM_INDEX_BAR_PRESSED, bottomLineColor); + } + + 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); + + lineHeight = Tizen::Graphics::CoordinateSystem::ConvertToLogicalY(lineHeight); + bottomPoint = Tizen::Graphics::CoordinateSystem::AlignToDevice(FloatPoint(lineLeftMargin, bounds.height)); + dividerBottomBounds = FloatRectangle(bottomPoint.x, bottomPoint.y - lineHeight, bounds.width - lineLeftMargin * 2.0f, lineHeight); + } + } + else + { + float lineLeftMargin = 0.0f; + float lineHeight = 0.0f; + bounds = GetBoundsF(); + + if (!IsContextItem()) + { + if (!__isSimpleLastItem) + { + if (__itemType == TABLE_VIEW_ITEM_TYPE_BOTTOM || __itemType == TABLE_VIEW_ITEM_TYPE_ONE) + { + __pItemDivider->SetVisibleState(false); + __pItemTopDivider->SetVisibleState(false); + } + } + } + + customDividerColor = __pDrawingProperty->dividerColor; + GET_COLOR_CONFIG(TABLEVIEW::ITEM_DIVIDER_TOP_BG_NORMAL, topLineColor); + GET_COLOR_CONFIG(TABLEVIEW::ITEM_DIVIDER_BOTTOM_BG_NORMAL, bottomLineColor); + GET_FIXED_VALUE_CONFIG(TABLEVIEW::ITEM_DIVIDER_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, lineLeftMargin); + GET_FIXED_VALUE_CONFIG(TABLEVIEW::ITEM_DIVIDER_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, lineHeight); + + lineLeftMargin = Tizen::Graphics::CoordinateSystem::ConvertToLogicalX(lineLeftMargin); + lineHeight = Tizen::Graphics::CoordinateSystem::ConvertToLogicalY(lineHeight); + bottomPoint = Tizen::Graphics::CoordinateSystem::AlignToDevice(FloatPoint(lineLeftMargin, (bounds.height))); + + 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); + } + + if (__pItemDivider->GetVisibleState()) + { + __pItemDivider->SetBounds(dividerBottomBounds); + if (customDividerColor == bottomLineColor || __itemType == TABLE_VIEW_ITEM_TYPE_TITLE) + { + __pItemDivider->SetBackgroundColor(bottomLineColor); + } + else + { + __pItemDivider->SetBackgroundColor(customDividerColor); + __pItemDivider->GetVisualElement()->SetOpacity(ITEM_BOTTOM_DIVIDER_OPACITY); + } + __pItemDivider->Invalidate(); + } + + if (__pItemTopDivider->GetVisibleState()) + { + __pItemTopDivider->SetBounds(dividerTopBounds); + if (customDividerColor == bottomLineColor) + { + __pItemTopDivider->SetBackgroundColor(topLineColor); + } + else + { + __pItemTopDivider->SetBackgroundColor(customDividerColor); + __pItemTopDivider->GetVisualElement()->SetOpacity(ITEM_TOP_DIVIDER_OPACITY); + } + __pItemTopDivider->Invalidate(); + } +} + +void +_TableViewItem::DrawItemAnnexDivider(void) +{ + if (__itemType == TABLE_VIEW_ITEM_TYPE_HEADER || __itemType == TABLE_VIEW_ITEM_TYPE_FOOTER) + { + if (__pItemAnnexLeftDivider != null) + { + __pItemAnnexLeftDivider->SetVisibleState(false); + } + + if (__pItemAnnexRightDivider != null) + { + __pItemAnnexRightDivider->SetVisibleState(false); + } + } + else + { + Color dividerLeftColor; + Color dividerRightColor; + Color customDividerColor; + Color bottomLineColor; + FloatRectangle bounds = GetBoundsF(); + float dividerHeight = 0; + float itemHeight = 0; + float dividerWidth = 0.0f; + float dividerTopMargin = 0.0f; + float annexWidth = 0.0f; + float annexLeftMargin = 0.0f; + float itemLeftMargin = 0.0f; + + customDividerColor = __pDrawingProperty->dividerColor; + GET_SHAPE_CONFIG(TABLEVIEW::ITEM_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, itemLeftMargin); + GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, annexLeftMargin); + GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_ONOFF_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, annexWidth); + GET_COLOR_CONFIG(TABLEVIEW::ITEM_ANNEX_DIVIDER_LEFT_BG_NORMAL, dividerLeftColor); + GET_COLOR_CONFIG(TABLEVIEW::ITEM_ANNEX_DIVIDER_RIGHT_BG_NORMAL, dividerRightColor); + GET_COLOR_CONFIG(TABLEVIEW::ITEM_DIVIDER_BOTTOM_BG_NORMAL, bottomLineColor); + GET_FIXED_VALUE_CONFIG(TABLEVIEW::ITEM_ANNEX_DIVIDER_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, dividerWidth); + GET_FIXED_VALUE_CONFIG(TABLEVIEW::ITEM_ANNEX_DIVIDER_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, dividerTopMargin); + + itemLeftMargin += __pDrawingProperty->scrollMargin; + itemHeight = ((__customHeight > 0) ? __customHeight : GetBoundsF().height); + dividerHeight = itemHeight - (dividerTopMargin*2); + dividerHeight = (dividerHeight > 0) ? dividerHeight : 0; + __pItemAnnexLeftDivider->SetBounds(FloatRectangle((GetBoundsF().width - annexWidth - (itemLeftMargin + annexLeftMargin) - (dividerWidth*2)), dividerTopMargin, dividerWidth, dividerHeight)); + __pItemAnnexRightDivider->SetBounds(FloatRectangle((GetBoundsF().width - annexWidth - (itemLeftMargin + annexLeftMargin) - dividerWidth), dividerTopMargin, dividerWidth, dividerHeight)); + + if (customDividerColor == bottomLineColor) + { + __pItemAnnexLeftDivider->SetBackgroundColor(dividerLeftColor); + } + else + { + __pItemAnnexLeftDivider->SetBackgroundColor(customDividerColor); + __pItemAnnexLeftDivider->GetVisualElement()->SetOpacity(ITEM_TOP_DIVIDER_OPACITY); + } + + if (customDividerColor == bottomLineColor) + { + __pItemAnnexRightDivider->SetBackgroundColor(dividerRightColor); + } + else + { + __pItemAnnexRightDivider->SetBackgroundColor(customDividerColor); + __pItemAnnexRightDivider->GetVisualElement()->SetOpacity(ITEM_BOTTOM_DIVIDER_OPACITY); + } + + __pItemAnnexLeftDivider->Invalidate(); + __pItemAnnexRightDivider->Invalidate(); + } + + if (__pItemAnnexLeftDivider != null) + { + _AccessibilityContainer* pContainer = __pItemAnnexLeftDivider->GetAccessibilityContainer(); + pContainer->Activate(false); + } + + if (__pItemAnnexRightDivider != null) + { + _AccessibilityContainer* pContainer = __pItemAnnexRightDivider->GetAccessibilityContainer(); + pContainer->Activate(false); + } +} + + +result +_TableViewItem::DrawBitmap(Canvas& canvas, const FloatRectangle& bounds, const Bitmap& bitmap) +{ + 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."); + } + else + { + r = canvas.DrawBitmap(bounds, bitmap); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Fail to draw bitmap."); + } + + return r; +} + +result +_TableViewItem::SetItemHighlightBounds(_VisualElement& highlightVisualElement, const FloatRectangle& bounds) +{ + return highlightVisualElement.SetBounds(bounds); +} + +FloatRectangle +_TableViewItem::CalculateItemHighlightBounds(void) +{ + FloatRectangle itemBounds = GetBoundsF(); + return FloatRectangle(0.0f, 0.0f, itemBounds.width, itemBounds.height); +} + +FloatRectangle +_TableViewItem::CalculateAnnexBitmapBounds(float annexWidth, float annexHeight, const Bitmap& bitmap) +{ + FloatRectangle bounds; + float width = 0; + float height = 0; + float leftMargin = 0; + float topMargin = 0; + + if (annexWidth > bitmap.GetWidthF()) + { + leftMargin = (annexWidth - bitmap.GetWidthF()) / 2; + width = bitmap.GetWidthF(); + } + else + { + width = annexWidth; + } + + if (annexHeight > bitmap.GetHeightF()) + { + topMargin = (annexHeight - bitmap.GetHeightF()) / 2; + height = bitmap.GetHeightF(); + } + else + { + height = annexHeight; + } + + bounds.SetBounds(leftMargin, topMargin, width, height); + + return bounds; +} + +bool +_TableViewItem::IsTitleStyleItem(void) const +{ + if (__itemType == TABLE_VIEW_ITEM_TYPE_TITLE || __itemType == TABLE_VIEW_ITEM_TYPE_HEADER || __itemType == TABLE_VIEW_ITEM_TYPE_FOOTER) + { + return true; + } + + return false; +} + +bool +_TableViewItem::IsValidSelectionState(void) +{ + _TableView* pParent = dynamic_cast<_TableView*>(GetParent()); + if (pParent == null) + { + return true; + } + + if (pParent->GetPressedItemCount() > 0) + { + return false; + } + + return true; +} + +void +_TableViewItem::DrawSimpleItem(void) +{ + if (__pSimpleItemText != null) + { + Color textColor = __simpleItemTextColor[__drawingStatus]; + if (!IsEnabled()) + { + textColor = __simpleItemTextColor[TABLE_VIEW_SIMPLEITEM_DRAWING_STATUS_DISABLED]; + } + + if (__itemType == TABLE_VIEW_ITEM_TYPE_TITLE) + { + if (__drawingStatus == TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL) + { + textColor = __simpleItemTextColor[TABLE_VIEW_GROUPITEM_DRAWING_STATUS_NORMAL]; + } + else + { + textColor = __simpleItemTextColor[TABLE_VIEW_GROUPITEM_DRAWING_STATUS_PRESSED]; + } + } + + __pSimpleItemText->SetTextColor(textColor); + __pSimpleItemText->Invalidate(false); + } +} +result +_TableViewItem::SetSimpleItemContents(const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBitmap, bool groupType) +{ + result r = E_SUCCESS; + bool textOnly = true; + + if (pBitmap != null) + { + textOnly = false; + } + + r = CreateSimpleItemContents(textOnly); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + FloatRectangle bitmapRect = FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); + FloatRectangle textRect = FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); + float leftMargin = 0.0f; + float annexMargin = 0.0f; + float elementWidth = 0; + float elementHeight = 0; + float itemHeight = GetBoundsF().height; + float itemWidth = GetBoundsF().width; + float annexWidth = GetAnnexWidth(__annexStyle); + + if (groupType) + { + if (__simpleItemTextSize == 0) + { + GET_SHAPE_CONFIG(TABLEVIEW::GROUPITEM_DEFAULT_FONT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, __simpleItemTextSize); + } + GET_SHAPE_CONFIG(TABLEVIEW::GROUPITEM_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, leftMargin); + } + else + { + if (__simpleItemTextSize == 0) + { + GET_SHAPE_CONFIG(TABLEVIEW::ITEM_DEFAULT_FONT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, __simpleItemTextSize); + } + GET_SHAPE_CONFIG(TABLEVIEW::ITEM_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, leftMargin); + } + + if (!textOnly) + { + elementWidth = itemHeight * SIMPLE_ITEM_ELEMENT_BITMAP_SIZE_RATIO; + elementHeight = elementWidth; + + bitmapRect.x = leftMargin; + bitmapRect.y = (itemHeight - elementHeight) / 2; + bitmapRect.width = elementWidth; + bitmapRect.height = elementHeight; + } + + if (__annexStyle == TABLE_VIEW_ANNEX_STYLE_NORMAL) + { + textRect.x = bitmapRect.x + elementWidth + leftMargin; + elementWidth = itemWidth - textRect.x - leftMargin; + } + else + { + GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, annexMargin); + if (__annexStyle == TABLE_VIEW_ANNEX_STYLE_MARK || __annexStyle == TABLE_VIEW_ANNEX_STYLE_RADIO) + { + bitmapRect.x = leftMargin + annexWidth + annexMargin; + textRect.x = bitmapRect.x + elementWidth + leftMargin; + elementWidth = itemWidth - textRect.x - leftMargin; + } + else + { + textRect.x = bitmapRect.x + elementWidth + leftMargin; + elementWidth = itemWidth - textRect.x - annexWidth - leftMargin - annexMargin; + } + } + + textRect.y = 0.0f; + textRect.width = elementWidth < 0 ? 0 : elementWidth;; + textRect.height = itemHeight; + + if (__pSimpleItemBitmap != null && pBitmap != null) + { + __pSimpleItemBitmap->SetBackgroundBitmap(*pBitmap); + __pSimpleItemBitmap->SetBounds(bitmapRect); + + _Label* pSimpleItemBitmapCore = GetLabelCore(__pSimpleItemBitmap); + if (!pSimpleItemBitmapCore->HasParent()) + { + r = AttachChild(*pSimpleItemBitmapCore); + SysTryReturn(NID_UI_CTRL, __pSimpleItemBitmap != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + + if (__pSimpleItemText != null) + { + __pSimpleItemText->SetTextConfig(__simpleItemTextSize, LABEL_TEXT_STYLE_NORMAL); + __pSimpleItemText->SetText(text); + __pSimpleItemText->SetBounds(textRect); + + _Label* pSimpleItemTextCore = GetLabelCore(__pSimpleItemText); + if (!pSimpleItemTextCore->HasParent()) + { + r = AttachChild(*pSimpleItemTextCore); + SysTryReturn(NID_UI_CTRL, __pSimpleItemText != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + + return E_SUCCESS; +} + +result +_TableViewItem::CreateSimpleItemContents(bool textOnly) +{ + result r = E_SUCCESS; + + if (__pSimpleItemText == null) + { + __pSimpleItemText = new (std::nothrow) Label(); + + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, __pSimpleItemText != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pSimpleItemText->Construct(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f), L""); + + __pSimpleItemText->SetTextHorizontalAlignment(ALIGNMENT_LEFT); + __pSimpleItemText->SetTextVerticalAlignment(ALIGNMENT_MIDDLE); + if (__itemType == TABLE_VIEW_ITEM_TYPE_TITLE) + { + __pSimpleItemText->SetTextColor(__simpleItemTextColor[TABLE_VIEW_GROUPITEM_DRAWING_STATUS_NORMAL]); + } + else + { + __pSimpleItemText->SetTextColor(__simpleItemTextColor[TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL]); + } + __pSimpleItemText->SetBackgroundColor(Color(0, 0, 0, 0)); + GetLabelCore(__pSimpleItemText)->SetFocusable(true); + + } + + if (!textOnly) + { + if (__pSimpleItemBitmap == null) + { + __pSimpleItemBitmap = new (std::nothrow) Label(); + + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, __pSimpleItemBitmap != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pSimpleItemBitmap->Construct(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f), L""); + __pSimpleItemBitmap->SetBackgroundColor(Color(0, 0, 0, 0)); + GetLabelCore(__pSimpleItemBitmap)->SetFocusable(true); + } + + } + else + { + if (__pSimpleItemBitmap != null) + { + delete __pSimpleItemBitmap; + __pSimpleItemBitmap = null; + } + } + + return E_SUCCESS; +} + +result +_TableViewItem::SetSimpleTextColor(const Tizen::Graphics::Color& color, TableViewItemDrawingStatus status) +{ + __simpleItemTextColor[status] = color; + + return E_SUCCESS; +} + +Tizen::Graphics::Color +_TableViewItem::GetSimpleItemTextColor(TableViewItemDrawingStatus status) const +{ + return __simpleItemTextColor[status]; +} + +result +_TableViewItem::SetSimpleGroupItemTextColor(const Tizen::Graphics::Color& color, TableViewItemDrawingStatus status) +{ + if (status == TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL) + { + __simpleItemTextColor[TABLE_VIEW_GROUPITEM_DRAWING_STATUS_NORMAL] = color; + } + else if (status == TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED) + { + __simpleItemTextColor[TABLE_VIEW_GROUPITEM_DRAWING_STATUS_PRESSED] = color; + } + + return E_SUCCESS; +} + +Tizen::Graphics::Color +_TableViewItem::GetSimpleGroupItemTextColor(TableViewItemDrawingStatus status) const +{ + if (status == TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED) + { + return __simpleItemTextColor[TABLE_VIEW_GROUPITEM_DRAWING_STATUS_PRESSED]; + } + else + { + return __simpleItemTextColor[TABLE_VIEW_GROUPITEM_DRAWING_STATUS_NORMAL]; + } +} + +result +_TableViewItem::SetSimpleItemTextSize(int size) +{ + if (__simpleItemTextSize == size) + { + return E_SUCCESS; + } + + __simpleItemTextSize = size; + + if (__pSimpleItemText != null) + { + __pSimpleItemText->SetTextConfig(__simpleItemTextSize, LABEL_TEXT_STYLE_NORMAL); + } + return E_SUCCESS; +} + +int +_TableViewItem::GetSimpleItemTextSize(void) const +{ + return __simpleItemTextSize; +} + +result +_TableViewItem::SetSectionHeaderFooterContents(const Tizen::Base::String& text, HorizontalAlignment alignment, bool isHeader) +{ + if (__pHeaderFooterItemText == null) + { + result r = E_SUCCESS; + float contentsHeight = 0.0f; + float positionY = 0.0f; + Color textColor; + + GET_COLOR_CONFIG(TABLEVIEW::GROUPITEM_TEXT_NORMAL, textColor); + GET_SHAPE_CONFIG(TABLEVIEW::GROUPITEM_DEFAULT_TEXT_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, contentsHeight); + + __pHeaderFooterItemText = new (std::nothrow) Label(); + + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, __pHeaderFooterItemText != null, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (isHeader) + { + positionY = GetBoundsF().height - contentsHeight; + } + __pHeaderFooterItemText->Construct(FloatRectangle(0.0f, positionY, GetBoundsF().width, contentsHeight), text); + __pHeaderFooterItemText->SetTextHorizontalAlignment(alignment); + __pHeaderFooterItemText->SetTextColor(textColor); + __pHeaderFooterItemText->SetBackgroundColor(Color(0, 0, 0, 0)); + + _Label* pHeaderFooterItemTextCore = GetLabelCore(__pHeaderFooterItemText); + pHeaderFooterItemTextCore->SetFocusable(false); + AttachChild(*pHeaderFooterItemTextCore); + } + + return E_SUCCESS; +} + +result +_TableViewItem::SetSectionHeaderFooterAlignment(HorizontalAlignment alignment) +{ + if (__pHeaderFooterItemText != null) + { + __pHeaderFooterItemText->SetTextHorizontalAlignment(alignment); + __pHeaderFooterItemText->Invalidate(false); + } + + return E_SUCCESS; +} + +float +_TableViewItem::GetAnnexWidth(TableViewAnnexStyle style) +{ + float annexWidth = 0.0f; + float annexDividerWidth = 0.0f; + + switch (style) + { + case TABLE_VIEW_ANNEX_STYLE_NORMAL: + annexWidth = 0.0f; + break; + + case TABLE_VIEW_ANNEX_STYLE_MARK: + GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, annexWidth); + break; + + case TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING: + GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_ONOFF_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, annexWidth); + break; + + case TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER: + GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, annexDividerWidth); + GET_FIXED_VALUE_CONFIG(TABLEVIEW::ITEM_ANNEX_DIVIDER_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, annexDividerWidth); + GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_ONOFF_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, annexWidth); + annexWidth = annexWidth + (annexDividerWidth*2) + annexDividerWidth; + break; + + case TABLE_VIEW_ANNEX_STYLE_DETAILED: + GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_MORE_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, annexWidth); + break; + + case TABLE_VIEW_ANNEX_STYLE_RADIO: + GET_SHAPE_CONFIG(TABLEVIEW::ITEM_ANNEX_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, annexWidth); + break; + + default: + break; + } + + return annexWidth; +} + +void +_TableViewItem::SetDrawingStatus(TableViewItemDrawingStatus status) +{ + __drawingStatus = status; +} + +TableViewItemDrawingStatus +_TableViewItem::GetDrawingStatus(void) +{ + return __drawingStatus; +} + +void +_TableViewItem::SetPressedControl(TableViewItemPressedControl pressedControl) +{ + __pressedControl = pressedControl; + + if (__pressedControl == TABLE_VIEW_ITEM_PRESSED_ITEM) + { + __drawingStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED; + } + else if (__pressedControl == TABLE_VIEW_ITEM_PRESSED_ANNEX) + { + if (__annexStyle == TABLE_VIEW_ANNEX_STYLE_DETAILED) + { + __isSelectedDetailButton = true; + __drawingStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL; + } + else if (__annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING || + __annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER) + { + __drawingStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL; + } + else + { + __drawingStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED; + } + } + else + { + if (__pressedControl != TABLE_VIEW_ITEM_PRESSED_INDIVIDUAL) + { + __drawingStatus = TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED; + } + } +} + +TableViewItemPressedControl +_TableViewItem::GetPressedControl(void) +{ + return __pressedControl; +} + +void +_TableViewItem::AdjustChildControlMargin(void) +{ + if (__childMarginState) + { + return; + } + + if (IsTitleStyleItem()) + { + return; + } + + __childMarginState = true; + + float margin = 0; + + if (__pDrawingProperty->groupedLookEnabled) + { + float groupedBarMargin = 0.0f; + GET_SHAPE_CONFIG(TABLEVIEW::GROUPITEM_BAR_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, groupedBarMargin); + + margin = margin + groupedBarMargin; + } + + if (margin > 0) + { + _VisualElement* pVisualElement = GetVisualElement(); + + if (pVisualElement != null) + { + FloatPoint position; + + position.SetPosition(margin, 0.0f); + pVisualElement->ScrollByPoint(position, false); + } + } +} + +void +_TableViewItem::AdjustContextItemBounds(void) +{ + _TableViewItem* pContextItem = GetContextItem(); + + if (pContextItem == null) + { + return; + } + + FloatDimension contextItemSize = pContextItem->GetSizeF(); + FloatDimension itemSize = GetSizeF(); + + if (!_FloatCompare(contextItemSize.height, itemSize.height)) + { + contextItemSize.height = itemSize.height; + + pContextItem->SetSize(contextItemSize); + } + + pContextItem->AdjustChildControlCenterAlign(); +} + +void +_TableViewItem::AdjustAnnexBounds(void) +{ + if (__pItemAnnex == null || __isMoveItemAnimationEnabled || __isZoomInOutItemAnimationEnabled ||__isFadeInOutItemAnimationEnabled) + { + return; + } + + // h align + if (__annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING || __annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER || __annexStyle == TABLE_VIEW_ANNEX_STYLE_DETAILED) + { + _Label* pAnnexCore = GetLabelCore(__pItemAnnex); + if (pAnnexCore->HasParent()) + { + FloatRectangle annexBounds = __pItemAnnex->GetBoundsF(); + float annexPositionX = annexBounds.x; + float leftMargin = 0.0f; + + GET_SHAPE_CONFIG(TABLEVIEW::ITEM_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, leftMargin); + + 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)) + { + __pItemAnnex->SetPosition(FloatPoint(annexPositionX, annexBounds.y)); + + if (__pAccessibilityOnOffElement != null) + { + __pAccessibilityOnOffElement->SetBounds(__pItemAnnex->GetBoundsF()); + } + } + } + } + + // v align + FloatRectangle itemBounds = GetBoundsF(); + FloatRectangle annexBounds = __pItemAnnex->GetBoundsF(); + + if (__customHeight > 0) + { + itemBounds.height = __customHeight; + } + + annexBounds.y = (itemBounds.height - annexBounds.height) / 2; + __pItemAnnex->SetPosition(FloatPoint(annexBounds.x, annexBounds.y)); + if (__pAccessibilityOnOffElement != null) + { + __pAccessibilityOnOffElement->SetBounds(__pItemAnnex->GetBoundsF()); + } +} + +void +_TableViewItem::SetItemCustomHeight(float height) +{ + __customHeight = height; +} + +float +_TableViewItem::GetItemCustomHeight(void) +{ + return __customHeight; +} + +void +_TableViewItem::AdjustChildControlCenterAlign(void) +{ + if (__childControlCenterAlign) + { + FloatDimension itemSize = GetSizeF(); + + int childControlCount = GetChildCount(); + + for (int i = 0; i < childControlCount; i++) + { + _Control* pChildControl = GetChild(i); + + if (pChildControl == null) + { + continue; + } + + if (__pItemDivider == pChildControl) + { + float positionX = pChildControl->GetPositionF().x; + pChildControl->SetPosition(FloatPoint(positionX, itemSize.height - 1)); + continue; + } + + if (__pItemTopDivider == pChildControl) + { + float positionX = pChildControl->GetPositionF().x; + pChildControl->SetPosition(FloatPoint(positionX, 0)); + continue; + } + + FloatRectangle itemBounds = pChildControl->GetBoundsF(); + + itemBounds.y = (itemSize.height - itemBounds.height) / 2; + + pChildControl->SetPosition(FloatPoint(itemBounds.x, itemBounds.y)); + } + } +} + +void +_TableViewItem::SetChildControlCenterAlign(bool centerAlign) +{ + __childControlCenterAlign = centerAlign; +} + +Point +_TableViewItem::GetLastTouchPressedPosition(void) +{ + return _CoordinateSystemUtils::ConvertToInteger(__touchStartPosition); +} + +FloatPoint +_TableViewItem::GetLastTouchPressedPositionF(void) +{ + return __touchStartPosition; +} + +void +_TableViewItem::SetLastTouchPressedPosition(FloatPoint position) +{ + // This function was made to modify of ListView::RefreshList(). + // This function could adversely affect touch event handling. So, you should be used with caution. + __touchStartPosition = position; +} + +void +_TableViewItem::SetLastTouchPressedPosition(Point position) +{ + // This function was made to modify of ListView::RefreshList(). + // This function could adversely affect touch event handling. So, you should be used with caution. + __touchStartPosition = _CoordinateSystemUtils::ConvertToFloat(position); +} + +bool +_TableViewItem::GetSelectionState(void) +{ + return __itemSelected; +} + +void +_TableViewItem::SetSelectionState(bool selected) +{ + // This function was made to modify of ListView::RefreshList(). + // This function could adversely affect touch event handling. So, you should be used with caution. + __itemSelected = selected; +} + +bool +_TableViewItem::MoveItem(FloatPoint position, int duration, int delay) +{ + _VisualElement* pVisualElement = GetVisualElement(); + VisualElementValueAnimation* pAnimation = null; + String animationName = L"MOVE_ITEM"; + FloatPoint itemPosition = GetPositionF(); + result r = E_SUCCESS; + + if (position == itemPosition) + { + return false; + } + + if (__pMoveItemAnimation == null) + { + __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(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pMoveItemAnimation->SetVisualElementAnimationStatusEventListener(this); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + pAnimation = __pMoveItemAnimation; + + pAnimation->SetTimingFunction(VisualElementAnimation::GetTimingFunctionByName("EaseInOut")); + pAnimation->SetDuration(duration); + pAnimation->SetDelay(delay); + pAnimation->SetStartValue(Variant(GetPositionF())); + pAnimation->SetEndValue(Variant(position)); + + if (pVisualElement->AddAnimation(animationName, *pAnimation) != E_SUCCESS) + { + return false; + } + + __animationCount++; + + return true; + +CATCH: + + delete __pMoveItemAnimation; + __pMoveItemAnimation = null; + + return false; +} + +bool +_TableViewItem::ZoomInOutItem(bool zoomOut, int duration, int delay) +{ + _VisualElement* pVisualElement = GetVisualElement(); + VisualElementValueAnimation* pAnimation = null; + String animationName = L"ZOOM_IN_OUT_ITEM"; + FloatDimension itemSize = GetSizeF(); + FloatDimension startValue; + FloatDimension endValue; + result r = E_SUCCESS; + + if (__pZoomInOutItemAnimation == null) + { + __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(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pZoomInOutItemAnimation->SetVisualElementAnimationStatusEventListener(this); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + pAnimation = __pZoomInOutItemAnimation; + + if (zoomOut) + { + startValue = itemSize; + endValue = FloatDimension(itemSize.width, itemSize.height / 2); + pAnimation->SetTimingFunction(VisualElementAnimation::GetTimingFunctionByName(L"EaseOut")); + } + else + { + startValue = FloatDimension(itemSize.width, itemSize.height / 2); + endValue = itemSize; + pAnimation->SetTimingFunction(VisualElementAnimation::GetTimingFunctionByName(L"EaseIn")); + } + + pAnimation->SetDuration(duration); + pAnimation->SetDelay(delay); + pAnimation->SetStartValue(Variant(startValue)); + pAnimation->SetEndValue(Variant(endValue)); + + if (pVisualElement->AddAnimation(animationName, *pAnimation) != E_SUCCESS) + { + return false; + } + + __animationCount++; + + return true; + +CATCH: + delete __pZoomInOutItemAnimation; + __pZoomInOutItemAnimation = null; + + return false; +} + +bool +_TableViewItem::FadeInOutItem(bool fadeOut, int duration, int delay) +{ + _VisualElement* pVisualElement = GetVisualElement(); + VisualElementValueAnimation* pAnimation = null; + String animationName = L"FADE_IN_OUT_ITEM"; + float startValue = 0.0f; + float endValue = 1.0f; + result r = E_SUCCESS; + + if (__pFadeInOutItemtAnimation == null) + { + __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(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pFadeInOutItemtAnimation->SetVisualElementAnimationStatusEventListener(this); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + pAnimation = __pFadeInOutItemtAnimation; + + if (fadeOut) + { + startValue = 1.0f; + endValue = 0.0f; + pAnimation->SetTimingFunction(VisualElementAnimation::GetTimingFunctionByName(L"EaseOut")); + } + else + { + pAnimation->SetTimingFunction(VisualElementAnimation::GetTimingFunctionByName(L"EaseIn")); + } + + pAnimation->SetTimingFunction(VisualElementAnimation::GetTimingFunctionByName("EaseIn")); + pAnimation->SetDuration(duration); + pAnimation->SetDelay(delay); + pAnimation->SetStartValue(Variant(startValue)); + pAnimation->SetEndValue(Variant(endValue)); + + if (pVisualElement->AddAnimation(animationName, *pAnimation) != E_SUCCESS) + { + return false; + } + + pVisualElement->SetOpacity(startValue); + + __animationCount++; + + return true; + +CATCH: + + delete __pFadeInOutItemtAnimation; + __pFadeInOutItemtAnimation = null; + + return false; +} + +result +_TableViewItem::SetIndividualSelectionEnabled(const _Control& control, bool enable) +{ + result r = E_SUCCESS; + if (enable) + { + if (!__individualSelectionControls.Contains(control)) + { + r = __individualSelectionControls.Add(control); + } + + _AccessibilityContainer* pContainer = const_cast<_Control*>(&control)->GetAccessibilityContainer(); + pContainer->Activate(true); + int controlCount = 0; + for (int i=0; i(__pItemAnnexLeftDivider) + || pChildControl == static_cast<_Control*>(__pItemAnnexRightDivider) + || pChildControl == static_cast<_Control*>(__pItemCover) + || pChildControl == static_cast<_Control*>(__pItemDivider) + || pChildControl== static_cast<_Control*>(__pItemTopDivider)) + { + continue; + } + + controlCount++; + } + + GetAccessibilityContainer()->Activate(true); + } + else + { + if (__individualSelectionControls.Contains(control)) + { + r = __individualSelectionControls.Remove(control, false); + } + } + return r; +} + +bool +_TableViewItem::IsIndividualSelectionEnabled(const _Control& control) +{ + return __individualSelectionControls.Contains(control); +} + +int +_TableViewItem::AddRef(void) +{ + return ++__refCount; +} + +int +_TableViewItem::Release(void) +{ + --__refCount; + if (__refCount <= 0) + { + delete this; + return 0; + } + + return __refCount; +} + +bool +_TableViewItem::IsAnimationPlaying(void) +{ + if (__animationCount > 0) + { + return true; + } + + return false; +} + +void +_TableViewItem::StopAllAnimation(void) +{ + _VisualElement* pVisualElement = GetVisualElement(); + + pVisualElement->RemoveAllAnimations(); +} + +void +_TableViewItem::SetItemDividerEnabled(bool enable) +{ + __itemDividerEnabled = enable; +} + +void +_TableViewItem::OnTickOccurred(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, const Tizen::Ui::Variant& currentValue) +{ + if (keyName == L"MOVE_ITEM") + { + 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") + { + float opacity = currentValue.ToFloat(); + + _VisualElement* pVisualElement = GetVisualElement(); + + if (pVisualElement != null) + { + pVisualElement->SetOpacity(opacity); + } + } + else if (keyName == L"ZOOM_IN_OUT_ITEM") + { + FloatDimension size = currentValue.ToFloatDimension(); + SetSize(size); + } +} + +void +_TableViewItem::OnVisualElementAnimationStarted(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target) +{ + if (keyName == L"MOVE_ITEM") + { + __isMoveItemAnimationEnabled = true; + } + else if (keyName == L"FADE_IN_OUT_ITEM") + { + __isFadeInOutItemAnimationEnabled = true; + } + else if (keyName == L"ZOOM_IN_OUT_ITEM") + { + __isZoomInOutItemAnimationEnabled = true; + } +} + +void +_TableViewItem::OnVisualElementAnimationRepeated(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, long currentRepeatCount) +{ +} + +void +_TableViewItem::OnVisualElementAnimationFinished(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, bool completedNormally) +{ + if (__isAnimationCallbackBlocked) + { + return; + } + + bool tableViewItemAnimation = true; + const VisualElementValueAnimation *pAnimation = dynamic_cast(&(animation)); + + if (keyName == L"MOVE_ITEM") + { + if (pAnimation != null) + { + FloatPoint position = pAnimation->GetEndValue().ToFloatPoint(); + + SetPosition(position); + } + __isMoveItemAnimationEnabled = false; + } + else if (keyName == L"FADE_IN_OUT_ITEM") + { + if (pAnimation != null) + { + float opacity = pAnimation->GetEndValue().ToFloat(); + + _VisualElement* pVisualElement = GetVisualElement(); + + if (pVisualElement != null) + { + pVisualElement->SetOpacity(opacity); + Invalidate(); + } + } + __isFadeInOutItemAnimationEnabled = false; + } + else if (keyName == L"ZOOM_IN_OUT_ITEM") + { + if (pAnimation != null) + { + FloatDimension size = pAnimation->GetEndValue().ToFloatDimension(); + + SetSize(size); + } + __isZoomInOutItemAnimationEnabled = false; + } + else + { + tableViewItemAnimation = false; + } + + 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; +} + +result +_TableViewItem::OnAttachedToMainTree(void) +{ + if (!_FloatCompare(GetBoundsF().height, 0.0f)) + { + SetAccessibilityElement(); + } + + return E_SUCCESS; +} + +void +_TableViewItem::SetAccessibilityElement(void) +{ + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + + if (pContainer != null) + { + if (__pAccessibilityElement == null) + { + __pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true); + 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"); + + pContainer->AddElement(*__pAccessibilityElement); + } + __pAccessibilityElement->SetBounds(FloatRectangle(0.0f,0.0f, GetBoundsF().width, GetBoundsF().height)); + + if (__pAccessibilityOnOffElement == null && __annexStyle == TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER) + { + __pAccessibilityOnOffElement = new (std::nothrow) _AccessibilityElement(true); + 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->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)); + } + } +} + +_AccessibilityElement* +_TableViewItem::GetAccessibilityElement(void) +{ + return __pAccessibilityElement; +} + +void +_TableViewItem::SetAccessibilityElementTrait(void) +{ + if (__pAccessibilityElement == null) + { + return; + } + int groupIndex = -1; + int itemIndex = -1; + + switch (__annexStyle) + { + case TABLE_VIEW_ANNEX_STYLE_NORMAL: + GetItemIndex(groupIndex, itemIndex); + if (groupIndex != -1 && itemIndex == -1) + { + __pAccessibilityElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_GROUP_INDEX"); + } + break; + + case TABLE_VIEW_ANNEX_STYLE_MARK: + __pAccessibilityElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_TICKBOX_T_TTS"); + break; + + case TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING: + __pAccessibilityElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_ON_OFF_BUTTON_T_TTS"); + break; + + case TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER: + break; + + case TABLE_VIEW_ANNEX_STYLE_DETAILED: + __pAccessibilityElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_BUTTON_T_TTS"); + break; + + case TABLE_VIEW_ANNEX_STYLE_RADIO: + __pAccessibilityElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_RADIO_BUTTON_T_TTS"); + break; + + default: + break; + } +} +void +_TableViewItem::SetAccessibilityElementValue(void) +{ + if (__pAccessibilityElement == null) + { + return; + } + + switch (__annexStyle) + { + case TABLE_VIEW_ANNEX_STYLE_MARK: + if (IsChecked()) + { + __pAccessibilityElement->SetValueWithStringId("IDS_TPLATFORM_BODY_TICK_T_TTS"); + } + else + { + __pAccessibilityElement->SetValueWithStringId("IDS_TPLATFORM_BODY_UNTICK_T_TTS"); + } + break; + + case TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING: + if (IsChecked()) + { + __pAccessibilityElement->SetValueWithStringId("IDS_TPLATFORM_BODY_ON"); + } + else + { + __pAccessibilityElement->SetValueWithStringId("IDS_TPLATFORM_BODY_OFF"); + } + break; + + case TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER: + if (IsChecked()) + { + if (__pAccessibilityOnOffElement != null) + { + __pAccessibilityOnOffElement->SetValueWithStringId("IDS_TPLATFORM_BODY_ON"); + } + } + else + { + if (__pAccessibilityOnOffElement != null) + { + __pAccessibilityOnOffElement->SetValueWithStringId("IDS_TPLATFORM_BODY_OFF"); + } + } + break; + + case TABLE_VIEW_ANNEX_STYLE_RADIO: + if (IsChecked()) + { + __pAccessibilityElement->SetValueWithStringId("IDS_TPLATFORM_BODY_SELECTED_T_TTS"); + } + else + { + __pAccessibilityElement->SetValueWithStringId("IDS_TPLATFORM_BODY_NOT_SELECTED_T_TTS"); + } + break; + + default: + break; + } +} +void +_TableViewItem::SetAccessibilityElementLabel(void) +{ + if (__pAccessibilityElement == null) + { + return; + } + + if (__pAccessibilityElement->IsPublicLabelUpdated()) + { + return; + } + + String accessibilityLabel; + String space = L" "; + int childControlCount = GetChildCount(); + + for (int i = 0; i < childControlCount; i++) + { + _Control* pChildControl = GetChild(i); + + if (pChildControl == null) + { + continue; + } + + if (__pItemDivider == pChildControl || __pItemTopDivider == pChildControl || __pItemCover == pChildControl) + { + continue; + } + + accessibilityLabel += GetChildAccessibilityLabelContent(*pChildControl); + accessibilityLabel += space; + } + + __pAccessibilityElement->SetLabel(accessibilityLabel); +} + + +bool +_TableViewItem::OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_TableViewItem::OnAccessibilityFocusMovedPrevious(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_TableViewItem::OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_TableViewItem::OnAccessibilityReadingElement(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + SetAccessibilityElementLabel(); + SetAccessibilityElementTrait(); + SetAccessibilityElementValue(); + return false; +} + +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; +} + +bool +_TableViewItem::OnAccessibilityFocusOut(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_TableViewItem::OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + switch (__annexStyle) + { + case TABLE_VIEW_ANNEX_STYLE_NORMAL: + break; + + case TABLE_VIEW_ANNEX_STYLE_MARK: + if (IsChecked()) + { + String string; + GET_STRING_CONFIG(IDS_TPLATFORM_BODY_TICK_T_TTS,string); + _AccessibilityManager::GetInstance()->ReadContent(string); + } + else + { + String string; + GET_STRING_CONFIG(IDS_TPLATFORM_BODY_UNTICK_T_TTS,string); + _AccessibilityManager::GetInstance()->ReadContent(string); + } + break; + case TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING: + if (IsChecked()) + { + String string; + GET_STRING_CONFIG(IDS_TPLATFORM_BODY_ON,string); + _AccessibilityManager::GetInstance()->ReadContent(string); + } + else + { + String string; + GET_STRING_CONFIG(IDS_TPLATFORM_BODY_OFF,string); + _AccessibilityManager::GetInstance()->ReadContent(string); + } + break; + + case TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING_WITH_DIVIDER: + if (&element == __pAccessibilityOnOffElement && IsEnabled()) + { + if (IsChecked()) + { + SetChecked(false); + String string; + GET_STRING_CONFIG(IDS_TPLATFORM_BODY_OFF,string); + _AccessibilityManager::GetInstance()->ReadContent(string); + } + else + { + SetChecked(true); + String string; + GET_STRING_CONFIG(IDS_TPLATFORM_BODY_ON,string); + _AccessibilityManager::GetInstance()->ReadContent(string); + } + } + break; + + case TABLE_VIEW_ANNEX_STYLE_DETAILED: + break; + + case TABLE_VIEW_ANNEX_STYLE_RADIO: + if (IsChecked()) + { + String string; + GET_STRING_CONFIG(IDS_TPLATFORM_OPT_SELECT,string); + _AccessibilityManager::GetInstance()->ReadContent(string); + } + else + { + String string; + GET_STRING_CONFIG(IDS_TPLATFORM_BODY_NOT_SELECTED_T_TTS,string); + _AccessibilityManager::GetInstance()->ReadContent(string); + } + break; + default: + break; + } + + return false; +} + +bool +_TableViewItem::OnAccessibilityValueIncreased(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} + +bool +_TableViewItem::OnAccessibilityValueDecreased(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + 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) +{ + __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(); + SysTryReturn(NID_UI_CTRL, pFocusList != null, true, GetLastResult(), "[%s] propagating.", GetErrorMessage(GetLastResult())); + + _Control* pChildControl = null; + _Control* pFocusedControl = null; + _Window* pTop = source.GetRootWindow(); + + if (pTop) + { + pFocusedControl = pTop->GetCurrentFocusControl(); + if (pFocusedControl) + { + _Control* pFocusTraversalControl = pTop->GetFocusTraversalControl(pFocusedControl); + if (pFocusTraversalControl != GetParent()) + { + return false; + } + } + } + + int count = pFocusList->GetCount(); + + if (pFocusedControl == null) + { + return false; + } + + switch (keyCode) + { + case _KEY_LEFT: + if (!IsFocused()) + { + for (int i=count-1; i>=0; i--) + { + pFocusList->GetAt(i, pChildControl); + if (pChildControl == null) + { + continue; + } + + if (pChildControl->IsFocused()) + { + if (i == 0) + { + pChildControl = null; + break; + } + + for (int j=i-1; j>=0; j--) + { + pFocusList->GetAt(j, pChildControl); + if (pChildControl == null) + { + continue; + } + + if (pChildControl->IsFocusable() && pChildControl->GetEnableState() + && pChildControl->GetVisibleState()) + { + break; + } + else + { + pChildControl = null; + } + } + break; + } + } + + if (pChildControl && pChildControl->GetEnableState() + && pChildControl->GetVisibleState() && pChildControl->IsFocusable()) + { + if (pParent != null) + { + pParent->SetAnnexFocused(true); + } + DrawFocusOnInternalItem(pChildControl); + } + else + { + _Control* pParentControl = pFocusedControl->GetParent(); + _TableViewItem* pItem = dynamic_cast<_TableViewItem*>(pParentControl); + + if (pItem != null && pItem->GetEnableState() && !pItem->IsFocused() + && pItem->GetVisibleState() && pItem->IsFocusable()) + { + if (pParent != null) + { + pParent->SetAnnexFocused(false); + } + pItem->SetFocused(true); + pItem->DrawFocus(); + } + } + } + break; + + case _KEY_RIGHT: + if (IsFocused()) + { + if (pChildControl == null) + { + for (int i=0; iGetAt(i, pChildControl); + if (pChildControl == null) + { + continue; + } + + if (pChildControl->IsFocusable() && pChildControl->GetEnableState() + && pChildControl->GetVisibleState()) + { + break; + } + else + { + pChildControl = null; + } + } + } + } + else + { + for (int i=0; iGetAt(i, pChildControl); + if (pChildControl == null) + { + continue; + } + + if (pChildControl->IsFocused()) + { + if (i == count -1) + { + pChildControl = null; + break; + } + + for (int j=i+1; jGetAt(j, pChildControl); + if (pChildControl == null) + { + continue; + } + + if (pChildControl->IsFocusable() && pChildControl->GetEnableState() + && pChildControl->GetVisibleState()) + { + break; + } + else + { + pChildControl = null; + } + } + break; + } + } + } + + if (pChildControl && pChildControl->GetEnableState() && pChildControl->GetVisibleState() + && pChildControl->IsFocusable()) + { + if (IsFocused() && __drawingStatus == TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED) + { + ResetItemState(); + } + + if (pParent != null) + { + pParent->SetAnnexFocused(true); + } + DrawFocusOnInternalItem(pChildControl); + } + break; + + case _KEY_ENTER: + if (&source == this) + { + __pressedControl = TABLE_VIEW_ITEM_PRESSED_ITEM; + } + else if (&source == GetLabelCore(__pItemAnnex)) + { + __pressedControl = TABLE_VIEW_ITEM_PRESSED_ANNEX; + } + else if (IsIndividualSelectionEnabled(source)) + { + __pressedControl = TABLE_VIEW_ITEM_PRESSED_INDIVIDUAL; + } + else + { + __pressedControl = TABLE_VIEW_ITEM_PRESSED_NONE; + } + __itemSelected = true; + FireItemTouchPressed(); + break; + + default: + if (__itemSelected) + { + __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(); + } + return false; + } + + return true; +} + +bool +_TableViewItem::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) +{ + if (!IsFocusModeStateEnabled() || !IsVisible() || !IsEnabled()) + { + return false; + } + + if (IsReorderMode() || IsAnimationPlaying()) + { + return false; + } + + _KeyCode keyCode = keyInfo.GetKeyCode(); + + if (keyCode == _KEY_ENTER) + { + _TableView* pParent = dynamic_cast<_TableView*>(GetParent()); + SysTryReturn(NID_UI_CTRL, pParent != null, true, GetLastResult(), "[%s] propagating.", GetErrorMessage(GetLastResult())); + + pParent->StopExpandCollapseAnimation(); + if (&source == this) + { + __releasedControl = TABLE_VIEW_ITEM_PRESSED_ITEM; + } + else if (&source == GetLabelCore(__pItemAnnex)) + { + __releasedControl = TABLE_VIEW_ITEM_PRESSED_ANNEX; + } + else if (IsIndividualSelectionEnabled(source)) + { + __releasedControl = TABLE_VIEW_ITEM_PRESSED_INDIVIDUAL; + } + else + { + __releasedControl = TABLE_VIEW_ITEM_PRESSED_NONE; + } + FireItemTouchReleased(false); + return true; + } + else if (keyCode == _KEY_LEFT || keyCode == _KEY_RIGHT) + { + return true; + } + + 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) +{ + _Control* pParentControl = null; + float sourcePosition = 0.0f; + + _Control* pSource = const_cast<_Control*>(&source); + _TableViewItem* pItem = dynamic_cast<_TableViewItem*>(pSource); + if (pItem != null) + { + pParentControl = pSource; + sourcePosition = pParentControl->GetBoundsF().width; + } + else + { + pParentControl = source.GetParent(); + sourcePosition = source.GetBoundsF().x; + } + + if (pParentControl == null) + { + return null; + } + + int childControlCount = pParentControl->GetChildCount(); + float position = 0.0f; + _Control* destination = null; + + for (int i=0; iGetChild(i); + if (pChildControl != null && pChildControl->IsFocusable()) + { + float childPosition = pChildControl->GetBoundsF().x; + if (childPosition < sourcePosition) + { + if (childPosition > position) + { + position = childPosition; + destination = pChildControl; + } + else if (_FloatCompare(position, 0.0f)) + { + position = childPosition; + destination = pChildControl; + } + } + } + } + return destination; +} + +_Control* +_TableViewItem::GetNextFocusChildControl(const _Control& source) +{ + _Control* pParentControl = null; + float sourcePosition = 0.0f; + + _Control* pSource = const_cast<_Control*>(&source); + _TableViewItem* pItem = dynamic_cast<_TableViewItem*>(pSource); + if (pItem != null) + { + pParentControl = pSource; + sourcePosition = 0.0f; + } + else + { + pParentControl = source.GetParent(); + sourcePosition = source.GetBoundsF().x; + } + + if (pParentControl == null) + { + return null; + } + + int childControlCount = pParentControl->GetChildCount(); + float position = 0.0f; + _Control* destination = null; + + for (int i=0; iGetChild(i); + if (pChildControl != null && pChildControl->IsFocusable()) + { + float childPosition = pChildControl->GetBoundsF().x; + if (childPosition > sourcePosition) + { + if (childPosition < position) + { + position = childPosition; + destination = pChildControl; + } + else if (_FloatCompare(position, 0.0f)) + { + position = childPosition; + destination = pChildControl; + } + } + } + } + return destination; +} + +bool +_TableViewItem::IsChildControlFocusManage(void) const +{ + return true; +} + +void +_TableViewItem::SetSimpleLastItemEnabled(bool enable) +{ + __isSimpleLastItem = enable; +} + +void +_TableViewItem::SetSectionItem(bool isSectionItem) +{ + __isSectionItem = isSectionItem; +} + +void +_TableViewItem::SetTouchPressOnScroll(bool isTouch) +{ + __isTouchPressOnScroll = isTouch; +} + +bool +_TableViewItem::IsTouchPressOnScroll(void) const +{ + return __isTouchPressOnScroll; +} + +void +_TableViewItem::OnVisibleStateChanged(void) +{ + if (IsFocused() && !GetVisibleState()) + { + RemoveFocusRing(); + } +} + +void +_TableViewItem::OnAncestorEnableStateChanged(const _Control& control) +{ + if (IsFocused() && !IsEnabled()) + { + RemoveFocusRing(); + } +} + +void +_TableViewItem::OnAncestorVisibleStateChanged(const _Control& control) +{ + if (IsFocused() && !IsVisible()) + { + RemoveFocusRing(); + } +} + +void +_TableViewItem::OnFocusableStateChanged(bool focusableState) +{ + if (IsFocused() && !focusableState) + { + RemoveFocusRing(); + } +} + +void +_TableViewItem::SetPublicLabelUpdate(bool resetPublicLabelUpdate) +{ + if (__pAccessibilityElement) + { + __pAccessibilityElement->SetPublicLabelUpdate(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 new file mode 100644 index 0000000..6d72bcc --- /dev/null +++ b/src/ui/controls/FUiCtrl_TableViewItemEvent.cpp @@ -0,0 +1,486 @@ +// +// 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. +// + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "FUiCtrl_TableViewItem.h" +#include "FUiCtrl_TableViewItemEvent.h" +#include "FUiCtrl_TableViewItemEventArg.h" + + +// using namespace +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_TableViewItemEvent::_TableViewItemEvent(void) + : __pSource(null) + , __invokeTableViewItemCallback(true) + , __style(TABLE_VIEW_STYLE_SIMPLE) +{ + // nothing +} + +_TableViewItemEvent::~_TableViewItemEvent(void) +{ + // nothing +} + +result +_TableViewItemEvent::Construct(Tizen::Ui::Control* pSource, TableViewStyle style) +{ + result r = _Event::Initialize(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "Could not construct TableViewItemEvent!"); + + __pSource = pSource; + + __style = style; + + return r; +} + +Tizen::Ui::Control* +_TableViewItemEvent::GetSource(void) const +{ + return __pSource; +} + +void +_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, "[%s] Invalid Event argument is used. ", GetErrorMessage(E_INVALID_ARG)); + + + int index1 = pEventArg->GetArg1(); + int index2 = pEventArg->GetArg2(); + int index3 = pEventArg->GetArg3(); + int index4 = pEventArg->GetArg4(); + + bool activated = pEventArg->GetActivated(); + bool tempInvokeTableViewItemCallback = __invokeTableViewItemCallback; + __invokeTableViewItemCallback = true; + + if (index2 < 0) + { + index2 = -1; + } + + switch (pEventArg->GetNotifyType()) + { + case TABLEVIEW_NOTIFY_TYPE_SELECTED_ITEM: + if (tempInvokeTableViewItemCallback == true) + { + _TableViewItem* pItem = pEventArg->GetItem(); + 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, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG)); + + TableView* pTableView = dynamic_cast(GetSource()); + 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, "[%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, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG)); + + GroupedTableView* pTableView = dynamic_cast(GetSource()); + 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, "[%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, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); + + pItemListener->OnGroupedTableViewItemStateChanged(*pTableView, index1, index2, pItem, TABLE_VIEW_ITEM_STATUS_SELECTED); + } + } + else + { + ISectionTableViewItemEventListener* pItemListener = dynamic_cast(&listener); + 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, "[%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, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); + + pItemListener->OnSectionTableViewItemStateChanged(*pTableView, index1, index2, pItem, TABLE_VIEW_ITEM_STATUS_SELECTED); + } + } + break; + + case TABLEVIEW_NOTIFY_TYPE_HIGHLIGHED_ITEM: + if (tempInvokeTableViewItemCallback == true) + { + _TableViewItem* pItem = pEventArg->GetItem(); + 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, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG)); + + TableView* pTableView = dynamic_cast(GetSource()); + 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, "[%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, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG)); + + GroupedTableView* pTableView = dynamic_cast(GetSource()); + 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, "[%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, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); + + pItemListener->OnGroupedTableViewItemStateChanged(*pTableView, index1, index2, pItem, TABLE_VIEW_ITEM_STATUS_HIGHLIGHTED); + } + } + else + { + ISectionTableViewItemEventListener* pItemListener = dynamic_cast(&listener); + 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, "[%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, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); + + pItemListener->OnSectionTableViewItemStateChanged(*pTableView, index1, index2, pItem, TABLE_VIEW_ITEM_STATUS_HIGHLIGHTED); + } + } + break; + + case TABLEVIEW_NOTIFY_TYPE_ANNEX_CHECK: + if (tempInvokeTableViewItemCallback == true) + { + _TableViewItem* pItem = pEventArg->GetItem(); + 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, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG)); + + TableView* pTableView = dynamic_cast(GetSource()); + 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, "[%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, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG)); + + GroupedTableView* pTableView = dynamic_cast(GetSource()); + 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,"[%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, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); + + pItemListener->OnGroupedTableViewItemStateChanged(*pTableView, index1, index2, pItem, TABLE_VIEW_ITEM_STATUS_CHECKED); + } + } + else + { + ISectionTableViewItemEventListener* pItemListener = dynamic_cast(&listener); + 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, "[%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, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); + + pItemListener->OnSectionTableViewItemStateChanged(*pTableView, index1, index2, pItem, TABLE_VIEW_ITEM_STATUS_CHECKED); + } + } + break; + + case TABLEVIEW_NOTIFY_TYPE_ANNEX_UNCHECK: + if (tempInvokeTableViewItemCallback == true) + { + _TableViewItem* pItem = pEventArg->GetItem(); + 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, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG)); + + TableView* pTableView = dynamic_cast(GetSource()); + 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, "[%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, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG)); + + GroupedTableView* pTableView = dynamic_cast(GetSource()); + 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, "[%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,"[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); + + pItemListener->OnGroupedTableViewItemStateChanged(*pTableView, index1, index2, pItem, TABLE_VIEW_ITEM_STATUS_UNCHECKED); + } + } + else + { + ISectionTableViewItemEventListener* pItemListener = dynamic_cast(&listener); + 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, "[%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, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); + + pItemListener->OnSectionTableViewItemStateChanged(*pTableView, index1, index2, pItem, TABLE_VIEW_ITEM_STATUS_UNCHECKED); + } + } + break; + + case TABLEVIEW_NOTIFY_TYPE_ANNEX_MORE: + if (tempInvokeTableViewItemCallback == true) + { + _TableViewItem* pItem = pEventArg->GetItem(); + 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, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG)); + + TableView* pTableView = dynamic_cast(GetSource()); + 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, "[%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, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG)); + + GroupedTableView* pTableView = dynamic_cast(GetSource()); + 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, "[%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, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); + + pItemListener->OnGroupedTableViewItemStateChanged(*pTableView, index1, index2, pItem, TABLE_VIEW_ITEM_STATUS_MORE); + } + } + else + { + ISectionTableViewItemEventListener* pItemListener = dynamic_cast(&listener); + 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, "[%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, "[%s] This instance is in an invalid state.", GetErrorMessage(E_INVALID_STATE)); + + pItemListener->OnSectionTableViewItemStateChanged(*pTableView, index1, index2, pItem, TABLE_VIEW_ITEM_STATUS_MORE); + } + } + break; + + case TABLEVIEW_NOTIFY_TYPE_ITEM_SWEPT: +// if (tempInvokeTableViewItemCallback == true) +// { +// if (index3 == TABLE_VIEW_SWEEP_DIRECTION_LEFT) +// { +// pItemListener->OnTableViewItemSwept(*pTableView, itemTag, TABLE_VIEW_SWEEP_DIRECTION_LEFT); +// } +// else +// { +// pItemListener->OnTableViewItemSwept(*pTableView, itemTag, TABLE_VIEW_SWEEP_DIRECTION_RIGHT); +// } +// } + break; + + case TABLEVIEW_NOTIFY_TYPE_TOUCH_LONG_PRESSED: +// pItemListener->OnTableViewItemLongPressed(*pTableView, itemTag, __invokeTableViewItemCallback); + break; + + case TABLEVIEW_NOTIFY_TYPE_REORDERED_ITEM: + if (tempInvokeTableViewItemCallback == true) + { + if (__style == TABLE_VIEW_STYLE_SIMPLE) + { + ITableViewItemEventListener* pItemListener = dynamic_cast(&listener); + 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, "[%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, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG)); + + GroupedTableView* pTableView = dynamic_cast(GetSource()); + 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); + } + } + break; + + case TABLEVIEW_NOTIFY_TYPE_CONTEXT_ITEM_ACTIVATION: + if (tempInvokeTableViewItemCallback == true) + { + _TableViewItem* pItem = pEventArg->GetItem(); + 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, "[%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, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG)); + + TableView* pTableView = dynamic_cast(GetSource()); + 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, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG)); + + GroupedTableView* pTableView = dynamic_cast(GetSource()); + 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, "[%s] Invalid Listener argument is used. ", GetErrorMessage(E_INVALID_ARG)); + + SectionTableView* pTableView = dynamic_cast(GetSource()); + 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); + } + } + break; + + default: + return; + } + + return; +} + +}}} // Tizen::Ui::Controls + diff --git a/src/ui/controls/FUiCtrl_TableViewItemEventArg.cpp b/src/ui/controls/FUiCtrl_TableViewItemEventArg.cpp new file mode 100644 index 0000000..3c332a4 --- /dev/null +++ b/src/ui/controls/FUiCtrl_TableViewItemEventArg.cpp @@ -0,0 +1,87 @@ +// +// 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. +// + +#include +#include +#include "FUiCtrl_TableViewItemEventArg.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_TableViewItemEventArg::_TableViewItemEventArg(int arg1, int arg2, int arg3, int arg4, _TableViewItem* pItem, TableViewNotifyType type, bool activated) + : __arg1(arg1) + , __arg2(arg2) + , __arg3(arg3) + , __arg4(arg4) + , __pItem(pItem) + , __type(type) + , __activated(activated) +{ + // nothing +} + +_TableViewItemEventArg::~_TableViewItemEventArg(void) +{ + // nothing +} + +int +_TableViewItemEventArg::GetArg1(void) const +{ + return __arg1; +} + +int +_TableViewItemEventArg::GetArg2(void) const +{ + return __arg2; +} + +int +_TableViewItemEventArg::GetArg3(void) const +{ + return __arg3; +} + +int +_TableViewItemEventArg::GetArg4(void) const +{ + return __arg4; +} + +_TableViewItem* +_TableViewItemEventArg::GetItem(void) const +{ + return __pItem; +} + +TableViewNotifyType +_TableViewItemEventArg::GetNotifyType(void) const +{ + return __type; +} + +bool +_TableViewItemEventArg::GetActivated(void) const +{ + return __activated; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_TableViewItemImpl.cpp b/src/ui/controls/FUiCtrl_TableViewItemImpl.cpp new file mode 100644 index 0000000..b97b3ec --- /dev/null +++ b/src/ui/controls/FUiCtrl_TableViewItemImpl.cpp @@ -0,0 +1,336 @@ +// +// 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_TableViewItemImpl.cpp + * @brief This is the implementation file for _TableViewItemImpl class. + * + * This file contains the implementation of _TableViewItemImpl class. + */ + +#include +#include +#include +#include "FUiCtrl_TableViewItemImpl.h" +#include "FUiCtrl_TableViewItem.h" +#include "FUi_LayoutImpl.h" +#include "FUi_ResourceManager.h" +#include "FUi_ResourceSizeInfo.h" +#include "FUi_ResourceManager.h" +#include "FUi_CoordinateSystemUtils.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +Tizen::Graphics::Dimension +_TableViewItemImpl::TableViewItemSizeInfo::GetDefaultMinimumSize(_ControlOrientation orientation) const +{ + return Dimension(0.0f, 0.0f); +} + +Tizen::Graphics::FloatDimension +_TableViewItemImpl::TableViewItemSizeInfo::GetDefaultMinimumSizeF(_ControlOrientation orientation) const +{ + return FloatDimension(0.0f, 0.0f); +} + +_TableViewItemImpl* +_TableViewItemImpl::GetInstance(TableViewItemBase& tableViewItem) +{ + return static_cast <_TableViewItemImpl*>(tableViewItem._pControlImpl); +} + +const _TableViewItemImpl* +_TableViewItemImpl::GetInstance(const TableViewItemBase& tableViewItem) +{ + return static_cast (tableViewItem._pControlImpl); +} + +_TableViewItemImpl::_TableViewItemImpl(TableViewItemBase* pPublic, _TableViewItem* pCore, Layout* pPublicPortraitLayout, Layout* pPublicLandscapeLayout) + : _ContainerImpl(pPublic, pCore, pPublicPortraitLayout, pPublicLandscapeLayout) +{ + if (pPublicPortraitLayout != null || pPublicLandscapeLayout != null) + { + GetCore().SetItemLayoutEnabled(true); + } +} + +_TableViewItemImpl::~_TableViewItemImpl(void) +{ + +} + +const char* +_TableViewItemImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Controls::TableViewItem"; +} + +const TableViewItem& +_TableViewItemImpl::GetPublic(void) const +{ + return static_cast (_ContainerImpl::GetPublic()); +} + +TableViewItem& +_TableViewItemImpl::GetPublic(void) +{ + return static_cast (_ContainerImpl::GetPublic()); +} + +const _TableViewItem& +_TableViewItemImpl::GetCore(void) const +{ + return static_cast (_ControlImpl::GetCore()); +} + +_TableViewItem& +_TableViewItemImpl::GetCore(void) +{ + return static_cast <_TableViewItem&>(_ControlImpl::GetCore()); +} + +_TableViewItemImpl* +_TableViewItemImpl::CreateTableViewItemImplN(TableViewItemBase* pPublic, const Tizen::Graphics::FloatDimension& itemSize, TableViewAnnexStyle style, Layout* pPublicPortraitLayout, Layout* pPublicLandscapeLayout) +{ + result r = E_SUCCESS; + + r = GET_SIZE_INFO(TableViewItem).CheckInitialSizeValidF(FloatDimension(itemSize.width, itemSize.height), _CONTROL_ORIENTATION_PORTRAIT); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (pPublicPortraitLayout != null) + { + _LayoutImpl* pPortraitLayoutImpl = _LayoutImpl::GetInstance(*pPublicPortraitLayout); + 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, "[%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, "[%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, "[%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)); + + r = pImpl->SetSize(itemSize); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return pImpl; + +CATCH: + delete pImpl; + delete pCore; + return null; +} + +result +_TableViewItemImpl::Construct(const FloatDimension& itemSize, const TableViewAnnexStyle style) +{ + result r = E_SUCCESS; + + 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); + + return r; +} + +result +_TableViewItemImpl::SetContextItem(_TableViewItemImpl* pItem) +{ + if (pItem == null) + { + GetCore().SetContextItem(null); + return E_SUCCESS; + } + + GetCore().SetContextItem(&pItem->GetCore()); + + _TableViewItemImpl* pItemImpl = pItem; + + TableViewContextItem* pContextItem = static_cast (&pItemImpl->_ContainerImpl::GetPublic()); + pItemImpl->GetCore().SetAppInfo(pContextItem); + + return E_SUCCESS; +} + +result +_TableViewItemImpl::SetSelectionStyle(TableViewItemSelectionStyle style) +{ + return GetCore().SetSelectionStyle(style); +} + +TableViewItemSelectionStyle +_TableViewItemImpl::GetSelectionStyle(void) const +{ + return GetCore().GetSelectionStyle(); +} + +result +_TableViewItemImpl::SetBackgroundBitmap(TableViewItemDrawingStatus status, const Bitmap* pBitmap) +{ + SysTryReturn(NID_UI_CTRL, pBitmap, E_INVALID_ARG, E_INVALID_ARG, "[%s] Invalid argument is used. ", GetErrorMessage(E_INVALID_ARG)); + ListItemState itemState; + + switch (status) + { + case TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL: + itemState = LIST_ITEM_STATE_NORMAL; + break; + + case TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED: + itemState = LIST_ITEM_STATE_PRESSED; + break; + + case TABLE_VIEW_ITEM_DRAWING_STATUS_HIGHLIGHTED: + itemState = LIST_ITEM_STATE_HIGHLIGHTED; + break; + + default: + return E_SYSTEM; + } + + GetCore().SetItemBackgroundBitmap(itemState, pBitmap); + + return E_SUCCESS; +} + +result +_TableViewItemImpl::SetBackgroundColor(TableViewItemDrawingStatus status, const Color& color) +{ + ListItemState itemState; + + switch (status) + { + case TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL: + itemState = LIST_ITEM_STATE_NORMAL; + break; + + case TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED: + itemState = LIST_ITEM_STATE_PRESSED; + break; + + case TABLE_VIEW_ITEM_DRAWING_STATUS_HIGHLIGHTED: + itemState = LIST_ITEM_STATE_HIGHLIGHTED; + break; + + default: + return E_SYSTEM; + } + + GetCore().SetItemBackgroundColor(itemState, color); + + return E_SUCCESS; +} + +Color +_TableViewItemImpl::GetBackgroundColor(TableViewItemDrawingStatus status) const +{ + ListItemState itemState; + switch (status) + { + case TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL: + itemState = LIST_ITEM_STATE_NORMAL; + break; + + case TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED: + itemState = LIST_ITEM_STATE_PRESSED; + break; + + case TABLE_VIEW_ITEM_DRAWING_STATUS_HIGHLIGHTED: + itemState = LIST_ITEM_STATE_HIGHLIGHTED; + break; + + default: + return Color(0); + } + + return GetCore().GetItemBackgroundColor(itemState); +} + +result +_TableViewItemImpl::SetSimpleItemContents(const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBitmap, bool groupType) +{ + return GetCore().SetSimpleItemContents(text, pBitmap, groupType); +} + +result +_TableViewItemImpl::SetSimpleItemTextColor(const Tizen::Graphics::Color& color, TableViewItemDrawingStatus status) +{ + return GetCore().SetSimpleTextColor(color, status); +} + +Tizen::Graphics::Color +_TableViewItemImpl::GetSimpleItemTextColor(TableViewItemDrawingStatus status) const +{ + return GetCore().GetSimpleItemTextColor(status); +} + +result +_TableViewItemImpl::SetSimpleItemTextSize(int size) +{ + return GetCore().SetSimpleItemTextSize(size); +} + +int +_TableViewItemImpl::GetSimpleItemTextSize(void) const +{ + return GetCore().GetSimpleItemTextSize(); +} + +float +_TableViewItemImpl::GetAnnexWidth(TableViewAnnexStyle style) +{ + return _TableViewItem::GetAnnexWidth(style); +} + +result +_TableViewItemImpl::SetIndividualSelectionEnabled(const Tizen::Ui::_ControlImpl& controlImpl, bool enable) +{ + return GetCore().SetIndividualSelectionEnabled(controlImpl.GetCore(), enable); +} + +bool +_TableViewItemImpl::IsIndividualSelectionEnabled(const Tizen::Ui::_ControlImpl& controlImpl) +{ + return GetCore().IsIndividualSelectionEnabled(controlImpl.GetCore()); +} + +result +_TableViewItemImpl::SetSimpleGroupItemTextColor(const Tizen::Graphics::Color& color, TableViewItemDrawingStatus status) +{ + return GetCore().SetSimpleGroupItemTextColor(color, status); +} + +Tizen::Graphics::Color +_TableViewItemImpl::GetSimpleGroupItemTextColor(TableViewItemDrawingStatus status) const +{ + return GetCore().GetSimpleGroupItemTextColor(status); +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_TableViewItemProvider.cpp b/src/ui/controls/FUiCtrl_TableViewItemProvider.cpp new file mode 100644 index 0000000..6cd5cd7 --- /dev/null +++ b/src/ui/controls/FUiCtrl_TableViewItemProvider.cpp @@ -0,0 +1,716 @@ +// +// 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_TableViewItemProvider.cpp + * @brief This file implements the _TableViewItemProvider class. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "FUiCtrl_TableViewItemProvider.h" +#include "FUi_ResourceManager.h" +#include "FUi_CoordinateSystemUtils.h" + +using namespace Tizen::Base; +using namespace Tizen::Ui; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_TableViewItemProvider::_TableViewItemProvider(TableViewStyle style, bool useFloatingPoint) + : __pSimpleProvider(null) + , __pGroupedProvider(null) + , __pSectionProvider(null) + , __pSimpleProviderF(null) + , __pGroupedProviderF(null) + , __pSectionProviderF(null) + , __style(style) + , __onProcessing(false) + , __useFloatingPoint(useFloatingPoint) +{ + +} + +_TableViewItemProvider::~_TableViewItemProvider(void) +{ + __pSimpleProvider = null; + __pGroupedProvider = null; + __pSectionProvider = null; +} + +_TableViewItemProvider* +_TableViewItemProvider::CreateTableViewItemProviderN(TableViewStyle style, bool useFloatingPoint) +{ + ClearLastResult(); + + _TableViewItemProvider* pProvider = new (std::nothrow) _TableViewItemProvider(style, useFloatingPoint); + SysTryReturn(NID_UI_CTRL, pProvider != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + return pProvider; +} + +result +_TableViewItemProvider::SetSimpleStyleItemProvider(ITableViewItemProvider* pProvider) +{ + 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_SECTION"); + + if (__useFloatingPoint) + { + return E_INVALID_OPERATION; + } + + __pSimpleProvider = pProvider; + + return E_SUCCESS; +} + +result +_TableViewItemProvider::SetGroupedStyleItemProvider(IGroupedTableViewItemProvider* pProvider) +{ + 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_SECTION"); + + if (__useFloatingPoint) + { + return E_INVALID_OPERATION; + } + + __pGroupedProvider = pProvider; + + return E_SUCCESS; +} + +result +_TableViewItemProvider::SetSectionStyleItemProvider(ISectionTableViewItemProvider* pProvider) +{ + 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"); + + if (__useFloatingPoint) + { + return E_INVALID_OPERATION; + } + + __pSectionProvider = pProvider; + + return E_SUCCESS; +} + +result +_TableViewItemProvider::SetSimpleStyleItemProviderF(ITableViewItemProviderF* pProvider) +{ + 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_SECTION"); + + if (!__useFloatingPoint) + { + return E_INVALID_OPERATION; + } + + __pSimpleProviderF = pProvider; + + return E_SUCCESS; +} + +result +_TableViewItemProvider::SetGroupedStyleItemProviderF(IGroupedTableViewItemProviderF* pProvider) +{ + 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_SECTION"); + + if (!__useFloatingPoint) + { + return E_INVALID_OPERATION; + } + + __pGroupedProviderF = pProvider; + + return E_SUCCESS; +} + +result +_TableViewItemProvider::SetSectionStyleItemProviderF(ISectionTableViewItemProviderF* pProvider) +{ + 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"); + + if (!__useFloatingPoint) + { + return E_INVALID_OPERATION; + } + + __pSectionProviderF = pProvider; + + return E_SUCCESS; +} + + +int +_TableViewItemProvider::GetGroupCount(void) +{ + int count = 0; + __onProcessing = true; + + if (__useFloatingPoint) + { + switch (__style) + { + case TABLE_VIEW_STYLE_SIMPLE: + count = 1; + break; + + case TABLE_VIEW_STYLE_GROUPED: + count = __pGroupedProviderF->GetGroupCount(); + break; + + case TABLE_VIEW_STYLE_SECTION: + count = __pSectionProviderF->GetSectionCount(); + break; + } + } + else + { + switch (__style) + { + case TABLE_VIEW_STYLE_SIMPLE: + count = 1; + break; + + case TABLE_VIEW_STYLE_GROUPED: + count = __pGroupedProvider->GetGroupCount(); + break; + + case TABLE_VIEW_STYLE_SECTION: + count = __pSectionProvider->GetSectionCount(); + break; + } + } + + __onProcessing = false; + + return count; +} + +int +_TableViewItemProvider::GetItemCount(int groupIndex) +{ + int count = 0; + + __onProcessing = true; + + if (__useFloatingPoint) + { + switch (__style) + { + case TABLE_VIEW_STYLE_SIMPLE: + count = __pSimpleProviderF->GetItemCount(); + break; + + case TABLE_VIEW_STYLE_GROUPED: + count = __pGroupedProviderF->GetItemCount(groupIndex); + break; + + case TABLE_VIEW_STYLE_SECTION: + count = __pSectionProviderF->GetItemCount(groupIndex); + break; + } + } + else + { + switch (__style) + { + case TABLE_VIEW_STYLE_SIMPLE: + count = __pSimpleProvider->GetItemCount(); + break; + + case TABLE_VIEW_STYLE_GROUPED: + count = __pGroupedProvider->GetItemCount(groupIndex); + break; + + case TABLE_VIEW_STYLE_SECTION: + count = __pSectionProvider->GetItemCount(groupIndex); + break; + } + } + + __onProcessing = false; + + return count; +} + +float +_TableViewItemProvider::GetGroupItemHeight(int groupIndex) +{ + return GetDefaultGroupItemHeight(); +} + +float +_TableViewItemProvider::GetItemHeight(const TableViewItemTag& itemTag) +{ + return GetDefaultItemHeight(); +} + +float +_TableViewItemProvider::GetDefaultItemHeight(void) +{ + float height = 0.0f; + + __onProcessing = true; + + if (__useFloatingPoint) + { + switch (__style) + { + case TABLE_VIEW_STYLE_SIMPLE: + height = __pSimpleProviderF->GetDefaultItemHeight(); + break; + + case TABLE_VIEW_STYLE_GROUPED: + height = __pGroupedProviderF->GetDefaultItemHeight(); + break; + + case TABLE_VIEW_STYLE_SECTION: + height = __pSectionProviderF->GetDefaultItemHeight(); + break; + } + } + else + { + int heightInt = 0; + switch (__style) + { + case TABLE_VIEW_STYLE_SIMPLE: + heightInt = __pSimpleProvider->GetDefaultItemHeight(); + break; + + case TABLE_VIEW_STYLE_GROUPED: + heightInt = __pGroupedProvider->GetDefaultItemHeight(); + break; + + case TABLE_VIEW_STYLE_SECTION: + heightInt = __pSectionProvider->GetDefaultItemHeight(); + break; + } + + height = _CoordinateSystemUtils::ConvertToFloat(heightInt); + } + + __onProcessing = false; + + return height; +} + +float +_TableViewItemProvider::GetDefaultGroupItemHeight(void) +{ + float height = 0.0f; + int heightInt = 0; + + __onProcessing = true; + + switch (__style) + { + case TABLE_VIEW_STYLE_SIMPLE: + height = 0.0f; + break; + + case TABLE_VIEW_STYLE_GROUPED: + if (__useFloatingPoint) + { + height = __pGroupedProviderF->GetDefaultGroupItemHeight(); + } + else + { + heightInt = __pGroupedProvider->GetDefaultGroupItemHeight(); + + height = _CoordinateSystemUtils::ConvertToFloat(heightInt); + } + break; + + case TABLE_VIEW_STYLE_SECTION: + { + GET_SHAPE_CONFIG(TABLEVIEW::GROUPITEM_DEFAULT_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, height); + } + break; + } + + __onProcessing = false; + + return height; +} + + +TableViewGroupItem* +_TableViewItemProvider::CreateGroupItem(int groupIndex, float itemWidth) +{ + TableViewGroupItem* pItem = null; + + __onProcessing = true; + + switch (__style) + { + case TABLE_VIEW_STYLE_SIMPLE: + pItem = null; + break; + + case TABLE_VIEW_STYLE_GROUPED: + if (__useFloatingPoint) + { + pItem = __pGroupedProviderF->CreateGroupItem(groupIndex, itemWidth); + } + else + { + int itemWidthInt = _CoordinateSystemUtils::ConvertToInteger(itemWidth); + pItem = __pGroupedProvider->CreateGroupItem(groupIndex, itemWidthInt); + } + break; + + case TABLE_VIEW_STYLE_SECTION: + pItem = null; + break; + } + + __onProcessing = false; + + return pItem; +} + +bool +_TableViewItemProvider::DeleteGroupItem(int groupIndex, TableViewGroupItem* pItem) +{ + bool value = false; + + __onProcessing = true; + + switch (__style) + { + case TABLE_VIEW_STYLE_SIMPLE: + delete pItem; + value = true; + break; + + case TABLE_VIEW_STYLE_GROUPED: + if (__useFloatingPoint) + { + value = __pGroupedProviderF->DeleteGroupItem(groupIndex, pItem); + } + else + { + value = __pGroupedProvider->DeleteGroupItem(groupIndex, pItem); + } + break; + case TABLE_VIEW_STYLE_SECTION: + delete pItem; + value = true; + break; + } + __onProcessing = false; + + return value; +} + +TableViewItem* +_TableViewItemProvider::CreateItem(const TableViewItemTag& itemTag, float itemWidth) +{ + TableViewItem* pItem = null; + + __onProcessing = true; + + if (__useFloatingPoint) + { + switch (__style) + { + case TABLE_VIEW_STYLE_SIMPLE: + pItem = __pSimpleProviderF->CreateItem(itemTag.itemIndex, itemWidth); + break; + + case TABLE_VIEW_STYLE_GROUPED: + pItem = __pGroupedProviderF->CreateItem(itemTag.groupIndex, itemTag.itemIndex, itemWidth); + break; + + case TABLE_VIEW_STYLE_SECTION: + pItem = __pSectionProviderF->CreateItem(itemTag.groupIndex, itemTag.itemIndex, itemWidth); + break; + } + } + else + { + int itemWidthInt = _CoordinateSystemUtils::ConvertToInteger(itemWidth); + + switch (__style) + { + case TABLE_VIEW_STYLE_SIMPLE: + pItem = __pSimpleProvider->CreateItem(itemTag.itemIndex, itemWidthInt); + break; + + case TABLE_VIEW_STYLE_GROUPED: + pItem = __pGroupedProvider->CreateItem(itemTag.groupIndex, itemTag.itemIndex, itemWidthInt); + break; + + case TABLE_VIEW_STYLE_SECTION: + pItem = __pSectionProvider->CreateItem(itemTag.groupIndex, itemTag.itemIndex, itemWidthInt); + break; + } + } + + __onProcessing = false; + + return pItem; +} + +bool +_TableViewItemProvider::DeleteItem(const TableViewItemTag& itemTag, TableViewItem* pItem) +{ + bool value = false; + + __onProcessing = true; + + if (__useFloatingPoint) + { + switch (__style) + { + case TABLE_VIEW_STYLE_SIMPLE: + value = __pSimpleProviderF->DeleteItem(itemTag.itemIndex, pItem); + break; + + case TABLE_VIEW_STYLE_GROUPED: + value = __pGroupedProviderF->DeleteItem(itemTag.groupIndex, itemTag.itemIndex, pItem); + break; + + case TABLE_VIEW_STYLE_SECTION: + value = __pSectionProviderF->DeleteItem(itemTag.groupIndex, itemTag.itemIndex, pItem); + break; + } + } + else + { + switch (__style) + { + case TABLE_VIEW_STYLE_SIMPLE: + value = __pSimpleProvider->DeleteItem(itemTag.itemIndex, pItem); + break; + + case TABLE_VIEW_STYLE_GROUPED: + value = __pGroupedProvider->DeleteItem(itemTag.groupIndex, itemTag.itemIndex, pItem); + break; + + case TABLE_VIEW_STYLE_SECTION: + value = __pSectionProvider->DeleteItem(itemTag.groupIndex, itemTag.itemIndex, pItem); + break; + } + } + + __onProcessing = false; + + return value; +} + +bool +_TableViewItemProvider::UpdateItem(const TableViewItemTag& itemTag, TableViewItem *pItem) +{ + __onProcessing = true; + + if (__useFloatingPoint) + { + switch (__style) + { + case TABLE_VIEW_STYLE_SIMPLE: + __pSimpleProviderF->UpdateItem(itemTag.itemIndex, pItem); + break; + + case TABLE_VIEW_STYLE_GROUPED: + __pGroupedProviderF->UpdateItem(itemTag.groupIndex, itemTag.itemIndex, pItem); + break; + + case TABLE_VIEW_STYLE_SECTION: + __pSectionProviderF->UpdateItem(itemTag.groupIndex, itemTag.itemIndex, pItem); + break; + } + } + else + { + switch (__style) + { + case TABLE_VIEW_STYLE_SIMPLE: + __pSimpleProvider->UpdateItem(itemTag.itemIndex, pItem); + break; + + case TABLE_VIEW_STYLE_GROUPED: + __pGroupedProvider->UpdateItem(itemTag.groupIndex, itemTag.itemIndex, pItem); + break; + + case TABLE_VIEW_STYLE_SECTION: + __pSectionProvider->UpdateItem(itemTag.groupIndex, itemTag.itemIndex, pItem); + break; + } + } + + __onProcessing = false; + + return true; +} + +bool +_TableViewItemProvider::UpdateGroupItem(int groupIndex, TableViewGroupItem *pItem) +{ + bool value = false; + __onProcessing = true; + + switch (__style) + { + case TABLE_VIEW_STYLE_SIMPLE: + value = false; + break; + + case TABLE_VIEW_STYLE_GROUPED: + if (__useFloatingPoint) + { + __pGroupedProviderF->UpdateGroupItem(groupIndex, pItem); + } + else + { + __pGroupedProvider->UpdateGroupItem(groupIndex, pItem); + } + value = true; + break; + + case TABLE_VIEW_STYLE_SECTION: + value = false; + break; + } + + __onProcessing = false; + + return value; +} + +bool +_TableViewItemProvider::IsReorderable(int groupIndexFrom, int groupIndexTo) +{ + bool value = false; + + switch (__style) + { + case TABLE_VIEW_STYLE_SIMPLE: + value = false; + break; + + case TABLE_VIEW_STYLE_GROUPED: + if (__useFloatingPoint) + { + value = __pGroupedProviderF->IsReorderable(groupIndexFrom, groupIndexTo); + } + else + { + value = __pGroupedProvider->IsReorderable(groupIndexFrom, groupIndexTo); + } + break; + case TABLE_VIEW_STYLE_SECTION: + value = false; + break; + } + + return value; +} + +bool +_TableViewItemProvider::IsOnProcessing() +{ + return __onProcessing; +} + +Tizen::Base::String +_TableViewItemProvider::GetSectionHeader(int groupIndex) +{ + SysTryReturn(NID_UI_CTRL, __style == TABLE_VIEW_STYLE_SECTION, String(""), E_INVALID_OPERATION, "[E_INVALID_OPERATION] The style of TableView is not TABLE_VIEW_STYLE_SECTION"); + + String sectionHeader; + + if (__useFloatingPoint) + { + sectionHeader = __pSectionProviderF->GetSectionHeader(groupIndex); + } + else + { + sectionHeader = __pSectionProvider->GetSectionHeader(groupIndex); + } + + return sectionHeader; +} + +bool +_TableViewItemProvider::HasSectionHeader(int groupIndex) +{ + SysTryReturn(NID_UI_CTRL, __style == TABLE_VIEW_STYLE_SECTION, false, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The style of TableView is not TABLE_VIEW_STYLE_SECTION"); + + bool hasSectionHeader; + + if (__useFloatingPoint) + { + hasSectionHeader = __pSectionProviderF->HasSectionHeader(groupIndex); + } + else + { + hasSectionHeader = __pSectionProvider->HasSectionHeader(groupIndex); + } + + return hasSectionHeader; +} + +Tizen::Base::String +_TableViewItemProvider::GetSectionFooter(int groupIndex) +{ + SysTryReturn(NID_UI_CTRL, __style == TABLE_VIEW_STYLE_SECTION, String(""), E_INVALID_OPERATION, "[E_INVALID_OPERATION] The style of TableView is not TABLE_VIEW_STYLE_SECTION"); + + String sectionFooter; + + if (__useFloatingPoint) + { + sectionFooter = __pSectionProviderF->GetSectionFooter(groupIndex); + } + else + { + sectionFooter = __pSectionProvider->GetSectionFooter(groupIndex); + } + + return sectionFooter; +} + +bool +_TableViewItemProvider::HasSectionFooter(int groupIndex) +{ + SysTryReturn(NID_UI_CTRL, __style == TABLE_VIEW_STYLE_SECTION, false, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The style of TableView is not TABLE_VIEW_STYLE_SECTION"); + + bool hasSectionFooter; + + if (__useFloatingPoint) + { + hasSectionFooter = __pSectionProviderF->HasSectionFooter(groupIndex); + } + else + { + hasSectionFooter = __pSectionProvider->HasSectionFooter(groupIndex); + } + + return hasSectionFooter; +} + +}}} // Tizen::Ui::Controls + diff --git a/src/ui/controls/FUiCtrl_TableViewItemProviderAdaptor.cpp b/src/ui/controls/FUiCtrl_TableViewItemProviderAdaptor.cpp new file mode 100644 index 0000000..210c1dd --- /dev/null +++ b/src/ui/controls/FUiCtrl_TableViewItemProviderAdaptor.cpp @@ -0,0 +1,520 @@ +// +// 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_TableViewItemProviderAdaptor.cpp + * @brief This is the implementation file for _TableViewItemProviderAdaptor class. + * + * This file contains the implementation of _TableViewItemProviderAdaptor class. + */ + +#include +#include +#include +#include "FUiCtrl_TableViewItemProviderAdaptor.h" +#include "FUiCtrl_TableViewItem.h" +#include "FUiCtrl_TableViewItemProvider.h" +#include "FUiCtrl_TableViewPresenter.h" +#include "FUiCtrl_TableViewItemImpl.h" +#include "FUiCtrl_ListViewModel.h" +#include "FUiCtrl_IListItemCommon.h" +#include "FUiCtrl_LabelImpl.h" +#include "FUi_CoordinateSystemUtils.h" + +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_TableViewItemProviderAdaptor::_TableViewItemProviderAdaptor() + : __pTableViewProvider(null) + , __pDefaultItem(null) + , __pTableViewPresenter(null) + , __listWidth(0.0f) + , __style(0) +{ +} + +_TableViewItemProviderAdaptor::~_TableViewItemProviderAdaptor() +{ + delete __pDefaultItem; + __pDefaultItem = null; + + delete __pTableViewProvider; + __pTableViewProvider = null; +} + +void +_TableViewItemProviderAdaptor::SetItemProvider(_TableViewItemProvider* pProvider) +{ + if (__pTableViewProvider != pProvider) + { + delete __pTableViewProvider; + } + + __pTableViewProvider = pProvider; +} + +_TableViewItemProvider* +_TableViewItemProviderAdaptor::GetItemProvider() const +{ + return __pTableViewProvider; +} + +bool +_TableViewItemProviderAdaptor::IsItemProvider() const +{ + if (__pTableViewProvider != null) + { + return true; + } + else + { + return false; + } +} + +int +_TableViewItemProviderAdaptor::GetItemCount(int groupIndex) const +{ + 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) + { + if (__pTableViewProvider->HasSectionFooter(groupIndex) == true) + { + return __pTableViewProvider->GetItemCount(groupIndex) + 1; + } + } + + return __pTableViewProvider->GetItemCount(groupIndex); +} + +int +_TableViewItemProviderAdaptor::GetGroupCount(void) const +{ + 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) + { + return 1; + } + + return __pTableViewProvider->GetGroupCount(); +} + +_IListItemCommon* +_TableViewItemProviderAdaptor::LoadItem(int groupIndex, int itemIndex) +{ + 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; + TableViewItemTag index = {groupIndex, itemIndex}; + + if (itemIndex == -1) + { + if (__style == TABLE_VIEW_STYLE_SIMPLE) + { + GetDefaultItem()->SetItemHeight(0); + return GetDefaultItem(); + } + else if (__style == TABLE_VIEW_STYLE_GROUPED) + { + pGroupItem = __pTableViewProvider->CreateGroupItem(groupIndex, __listWidth); + + if (pGroupItem == null) + { + GetDefaultItem()->SetAppInfo(null); + return __pDefaultItem; + } + } + else // (__style == TABLE_VIEW_STYLE_SECTION) + { + if (!HasSectionHeader(groupIndex)) + { + _TableViewItem* pHeaderItem = _TableViewItem::CreateTableViewItemN(0); + if (pHeaderItem == null) + { + GetDefaultItem()->SetAppInfo(null); + __pDefaultItem->SetFocusable(false); + return __pDefaultItem; + } + + pHeaderItem->SetFocusable(false); + return pHeaderItem; + } + + pGroupItem = new (std::nothrow) TableViewGroupItem(); + if (pGroupItem == null) + { + GetDefaultItem()->SetAppInfo(null); + __pDefaultItem->SetFocusable(false); + return __pDefaultItem; + } + + float itemHeight = 0.0f; + GET_SHAPE_CONFIG(TABLEVIEW::GROUPITEM_DEFAULT_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, itemHeight); + + pGroupItem->Construct(FloatDimension(__listWidth, itemHeight)); + + _TableViewItemImpl* pImpl = _TableViewItemImpl::GetInstance(*pGroupItem); + if (pImpl != null) + { + _TableViewItem* pItemCore = &pImpl->GetCore(); + if (pItemCore != null) + { + Tizen::Base::String contents = __pTableViewProvider->GetSectionHeader(groupIndex); + HorizontalAlignment contentsAlignment = __pTableViewPresenter->GetSectionHeaderTextHorizontalAlignment(groupIndex); + pItemCore->SetSectionHeaderFooterContents(contents, contentsAlignment, true); + pItemCore->SetFocusable(false); + } + } + } + } + else if ((__style == TABLE_VIEW_STYLE_SECTION) && (itemIndex == __pTableViewPresenter->GetItemCountAt(groupIndex) - 1) && HasSectionFooter(groupIndex)) + { + pItem = new (std::nothrow) TableViewItem(); + if (pItem == null) + { + GetDefaultItem()->SetAppInfo(null); + __pDefaultItem->SetFocusable(false); + return __pDefaultItem; + } + + float itemHeight = 0.0f; + GET_SHAPE_CONFIG(TABLEVIEW::GROUPITEM_DEFAULT_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, itemHeight); + + pItem->Construct(FloatDimension(__listWidth, itemHeight)); + + _TableViewItemImpl* pImpl = _TableViewItemImpl::GetInstance(*pItem); + if (pImpl != null) + { + _TableViewItem* pItemCore = &pImpl->GetCore(); + if (pItemCore != null) + { + Tizen::Base::String contents = __pTableViewProvider->GetSectionFooter(groupIndex); + HorizontalAlignment contentsAlignment = __pTableViewPresenter->GetSectionFooterTextHorizontalAlignment(groupIndex); + pItemCore->SetSectionHeaderFooterContents(contents, contentsAlignment, false); + pItemCore->SetFocusable(false); + } + } + } + else + { + pItem = __pTableViewProvider->CreateItem(index, __listWidth); + + if (pItem == null) + { + GetDefaultItem()->SetAppInfo(null); + return __pDefaultItem; + } + } + + _TableViewItem* pItemCore = null; + _TableViewItemImpl* pImpl = null; + if (itemIndex == -1) + { + if ((pImpl = _TableViewItemImpl::GetInstance(*pGroupItem)) == null) + { + if (!(__pTableViewProvider->DeleteGroupItem(groupIndex, pGroupItem))) + { + delete pGroupItem; + pGroupItem = null; + } + + GetDefaultItem()->SetAppInfo(null); + return __pDefaultItem; + } + else + { + pItemCore = &pImpl->GetCore(); + } + } + else + { + if ((pImpl = _TableViewItemImpl::GetInstance(*pItem)) == null) + { + if (!(__pTableViewProvider->DeleteItem(index, pItem))) + { + delete pItem; + pItem = null; + } + + GetDefaultItem()->SetAppInfo(null); + return __pDefaultItem; + } + else + { + pItemCore = &pImpl->GetCore(); + } + } + + if (pItemCore == null) + { + if (itemIndex == -1) + { + if ((__pTableViewProvider->DeleteGroupItem(groupIndex, pGroupItem)) == false) + { + delete pGroupItem; + pGroupItem = null; + } + } + else + { + if ((__pTableViewProvider->DeleteItem(index, pItem)) == false) + { + delete pItem; + pItem = null; + } + } + + GetDefaultItem()->SetAppInfo(null); + return __pDefaultItem; + } + + if (itemIndex == -1) + { + pItemCore->SetAppInfo(pGroupItem); + } + else + { + pItemCore->SetAppInfo(pItem); + } + + return pItemCore; +} + +result +_TableViewItemProviderAdaptor::UnloadItem(_IListItemCommon* pItemCore, int groupIndex, int itemIndex) +{ + 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}; + + _TableViewItem* pCoreItem = static_cast <_TableViewItem*>(pItemCore); + if (pCoreItem->GetParent() != null) + { + pCoreItem->GetParent()->DetachChild(*pCoreItem); + } + + // default item case + if (pItem == null) + { + return E_SUCCESS; + } + +// if (pItem->GetParent() != null) +// { +// pItem->GetParent()->RemoveControl(*pItem); +// } + +// pItemCore->Release(); + + pItemCore->SetAppInfo(null); + if (itemIndex == -1) + { + if (__pTableViewProvider->DeleteGroupItem(groupIndex, (TableViewGroupItem*) pItem) == false) + { + delete pItem; + pItem = null; + } + } + else + { + if (__pTableViewProvider->DeleteItem(index, pItem) == false) + { + delete pItem; + pItem = null; + } + } + + return E_SUCCESS; +} + +result +_TableViewItemProviderAdaptor::DeleteItem(_IListItemCommon* pItemCore, int groupIndex, int itemIndex) +{ + 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()); + + _TableViewItem* pCoreItem = static_cast <_TableViewItem*>(pItemCore); + if (pCoreItem->GetParent() != null) + { + pCoreItem->GetParent()->DetachChild(*pCoreItem); + } + + // default item case + if (pItem == null) + { + return E_SUCCESS; + } + +// pItemCore->Release(); + + delete pItem; + pItem = null; + + return E_SUCCESS; +} + +bool +_TableViewItemProviderAdaptor::UpdateItem(_IListItemCommon* pItemCore, int groupIndex, int itemIndex) +{ + 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; + + if (itemIndex == -1) + { + TableViewGroupItem* pItem = static_cast (pItemCore->GetAppInfo()); + + if (pItem != null) + { + ret = __pTableViewProvider->UpdateGroupItem(itemTag.groupIndex, pItem); + } + } + else + { + TableViewItem* pItem = static_cast (pItemCore->GetAppInfo()); + + if (pItem != null) + { + ret = __pTableViewProvider->UpdateItem(itemTag, pItem); + } + } + + return ret; +} + +result +_TableViewItemProviderAdaptor::SetListWidth(float width) +{ + __listWidth = width; + + return E_SUCCESS; +} + +float +_TableViewItemProviderAdaptor::GetListWidth(void) +{ + return __listWidth; +} + +result +_TableViewItemProviderAdaptor::SetTableViewStyle(int style) +{ + __style = style; + + return E_SUCCESS; +} + +void +_TableViewItemProviderAdaptor::SetTableViewPresenter(_TableViewPresenter* pPresenter) +{ + __pTableViewPresenter = pPresenter; +} + +bool +_TableViewItemProviderAdaptor::HasSectionHeader(int groupIndex) const +{ + SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, false, E_INVALID_OPERATION, "[%s] This instance has not provider.", GetErrorMessage(E_INVALID_OPERATION)); + + return __pTableViewProvider->HasSectionHeader(groupIndex); +} + +bool +_TableViewItemProviderAdaptor::HasSectionFooter(int groupIndex) const +{ + SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, false, E_INVALID_OPERATION, "[%s] This instance has not provider.", GetErrorMessage(E_INVALID_OPERATION)); + + return __pTableViewProvider->HasSectionFooter(groupIndex); +} + +float +_TableViewItemProviderAdaptor::GetItemHeight(int groupIndex, int itemIndex) +{ + SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, 0, E_INVALID_OPERATION, "[%s] This instance has not provider.", GetErrorMessage(E_INVALID_OPERATION)); + + float itemHeight = 0.0f; + + if (itemIndex == -1) + { + itemHeight = __pTableViewProvider->GetGroupItemHeight(groupIndex); + } + else + { + TableViewItemTag itemTag = {groupIndex, itemIndex}; + itemHeight = __pTableViewProvider->GetItemHeight(itemTag); + } + + return itemHeight; +} + +float +_TableViewItemProviderAdaptor::GetDefaultItemHeight(void) +{ + SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, 0, E_INVALID_OPERATION, "[%s] This instance has not provider.", GetErrorMessage(E_INVALID_OPERATION)); + + return __pTableViewProvider->GetDefaultItemHeight(); +} + +float +_TableViewItemProviderAdaptor::GetDefaultGroupItemHeight(void) +{ + SysTryReturn(NID_UI_CTRL, __pTableViewProvider != null, 0, E_INVALID_OPERATION, "[%s] This instance has not provider.", GetErrorMessage(E_INVALID_OPERATION)); + + return __pTableViewProvider->GetDefaultGroupItemHeight(); +} + +bool +_TableViewItemProviderAdaptor::IsReorderable(int groupIndexFrom, int groupIndexTo) +{ + 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); +} + +bool +_TableViewItemProviderAdaptor::IsOnProcessing() +{ + if (__pTableViewProvider != null) + { + return __pTableViewProvider->IsOnProcessing(); + } + return false; +} + +_TableViewItem* +_TableViewItemProviderAdaptor::GetDefaultItem(void) +{ + if (__pDefaultItem == null) + { + __pDefaultItem = _TableViewItem::CreateTableViewItemN(0.0f); + __pDefaultItem->SetFocusable(false); + } + + return __pDefaultItem; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_TableViewPresenter.cpp b/src/ui/controls/FUiCtrl_TableViewPresenter.cpp new file mode 100644 index 0000000..9fc8556 --- /dev/null +++ b/src/ui/controls/FUiCtrl_TableViewPresenter.cpp @@ -0,0 +1,6565 @@ +// +// 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_TableViewPresenter.cpp + * @brief This is the header file for the _TableViewPresenter class. + * + * This file contains the declarations of the _TableViewPresenter class. + */ + +#include +#include +#include "FUi_ResourceManager.h" +#include "FUi_UiTouchEvent.h" +#include "FUi_ResourceManager.h" +#include "FUiAnim_VisualElement.h" +#include "FUiCtrl_FastScroll.h" +#include "FUiCtrl_Scroll.h" +#include "FUiCtrl_TableView.h" +#include "FUiCtrl_TableViewItem.h" +#include "FUiCtrl_TableViewPresenter.h" +#include "FUiCtrl_TableViewItemProviderAdaptor.h" +#include "FUi_CoordinateSystemUtils.h" +#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; +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Ui::Controls; + +namespace Tizen { namespace Ui { namespace Controls +{ +const float _TableViewPresenter::REORDER_SCROLL_ANIMATION_DISTANCE = 10.0f; +const float _TableViewPresenter::TABLEVIEW_DEFAULT_ITEM_HEIGHT_VALUE = 12.3456f; + +_TableViewPresenter::_TableViewPresenter() + : __pTableView(null) + , __pListModel(null) + , __pProviderAdaptor(null) + , __topMargin(0.0f) + , __bottomMargin(0.0f) + , __leftMargin(0.0f) + , __modelInitialized(false) + , __firstDrawnFlag(true) + , __statusChangedFlag(true) + , __scrolling(true) + , __pItemDrawingProperty(null) + , __pBaseVisualElement(null) + , __sweepOccured(false) + , __sweptItemPosition() + , __reservedScrollItemAlignment(TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_TOP) + , __firstTouchMoved(false) + , __pReorderScrollTimer(null) + , __reorderInfo() + , __itemTotalHeight(0.0f) + , __pCapturedItemVisualElement(null) + , __pFastScrollTimer(null) + , __isFastScrollTimerEnabled(false) + , __scrollHeightOnFlickStarted(0) + , __scrollPositionOnFlickStarted(0) + , __isAnimationCallbackBlocked(false) + , __lockLoadItemWithScroll(false) + , __isRestoreFocus(false) + , __isAnnexFocused(false) + , __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; + + __reservedScrollItemIndex.itemIndex = -1; + __reservedScrollItemIndex.groupIndex = -1; + + __expandableItemTag.groupIndex = -1; + __expandableItemTag.itemIndex = -1; + + __focusItemTag.groupIndex = -1; + __focusItemTag.itemIndex = -1; + + __focusItemTagOnTraversal.groupIndex = -1; + __focusItemTagOnTraversal.itemIndex = -1; + + __accessibilityTag.groupIndex = -1; + __accessibilityTag.itemIndex = -1; +} + +_TableViewPresenter::~_TableViewPresenter() +{ + Dispose(); +} + +_TableView* +_TableViewPresenter::GetView() const +{ + return __pTableView; +} + +_ListViewModel* +_TableViewPresenter::GetModel(void) const +{ + return __pListModel; +} + +bool +_TableViewPresenter::Initialize(_TableView* pTableView) +{ + _ScrollPanelPresenter::Initialize(*pTableView); + + __pTableView = pTableView; + __pBaseVisualElement = __pTableView->GetVisualElement(); + __pBaseVisualElement->SetClipChildrenEnabled(true); + __pBaseVisualElement->SetSurfaceOpaque(false); + + result r = __itemHeightList.Construct(); + 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,"[%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, "[%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, "[%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, "[%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)); + + return true; + +CATCH: + if (__isFastScrollTimerEnabled) + { + __pFastScrollTimer->Cancel(); + } + + delete __pFastScrollTimer; + __pFastScrollTimer = null; + + return false; +} + +result +_TableViewPresenter::Construct(_TableView* pTableView) +{ + result r = E_SUCCESS; + bool init = false; + + // Create Model + init = Initialize(pTableView); + SysTryCatch(NID_UI_CTRL, init == true, , r = GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + return r; + +CATCH: + Dispose(); + return r; +} + +void +_TableViewPresenter::Dispose(void) +{ + DeleteItemHeightList(); + DeleteSectionAlignmentList(); + DetachContextItem(__sweptItemTag); + + delete __pListModel; + __pListModel = null; + + delete __pProviderAdaptor; + __pProviderAdaptor = null; + + delete __pItemDrawingProperty; + __pItemDrawingProperty = null; + + delete __pReorderScrollTimer; + __pReorderScrollTimer = null; + + if (__isFastScrollTimerEnabled) + { + __pFastScrollTimer->Cancel(); + } + + delete __pFastScrollTimer; + __pFastScrollTimer = null; + + if (__pCapturedItemVisualElement) + { + GetView()->GetVisualElement()->DetachChild(*__pCapturedItemVisualElement); + __pCapturedItemVisualElement->Destroy(); + } + __pCapturedItemVisualElement = null; +} + +result +_TableViewPresenter::SetItemProvider(const _TableViewItemProvider* pProvider) +{ + result r = E_SUCCESS; + + _TableViewItemProviderAdaptor* pProviderAdaptor = static_cast <_TableViewItemProviderAdaptor*>(__pListModel->GetItemProviderAdaptor()); + if(pProviderAdaptor != null) + { + _TableViewItemProvider* provider = pProviderAdaptor->GetItemProvider(); + if(provider != null && provider == pProvider) + { + return r; + } + } + + if (pProviderAdaptor == null) + { + pProviderAdaptor = new (std::nothrow) _TableViewItemProviderAdaptor(); + 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); + } + + _TableViewItemProvider* pNewProvider = null; + + if (pProvider != null) + { + pNewProvider = const_cast <_TableViewItemProvider*>(pProvider); + } + else + { + __pListModel->RemoveAllItem(false); + } + + pProviderAdaptor->SetItemProvider(pNewProvider); + pProviderAdaptor->SetListWidth(__pTableView->GetBoundsF().width - (GetLeftMargin() * 2)); + pProviderAdaptor->SetTableViewStyle(__pTableView->GetTableViewStyle()); + + return r; +} + +result +_TableViewPresenter::GetItemFromPosition(const Tizen::Graphics::FloatPoint& position, TableViewItemTag& itemPos) const +{ + _TableViewItem* pItem = null; + TableViewItemTag lastItemPos = {-1, -1}; + + __pListModel->GetFirstLoadedItemIndex(itemPos.groupIndex, itemPos.itemIndex); + __pListModel->GetLastLoadedItemIndex(lastItemPos.groupIndex, lastItemPos.itemIndex); + + do + { + pItem = static_cast <_TableViewItem*>(__pListModel->LoadItem(itemPos.groupIndex, itemPos.itemIndex)); + 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)) + { + return E_SUCCESS; + } + + if ((itemPos.itemIndex == lastItemPos.itemIndex) && (itemPos.groupIndex == lastItemPos.groupIndex)) + { + break; + } + + } while (GetNextItemPosition(itemPos, itemPos)); + +CATCH: + itemPos.itemIndex = -1; + itemPos.groupIndex = -1; + + return E_OUT_OF_RANGE; +} + +result +_TableViewPresenter::GetTopDrawnItemIndex(int& groupIndex, int& itemIndex) const +{ + result r = E_SUCCESS; + + TableViewItemTag itemPos; + r = GetTopDrawnItem(itemPos); + + groupIndex = itemPos.groupIndex; + itemIndex = itemPos.itemIndex; + + return r; +} + +result +_TableViewPresenter::SetTopDrawnItemIndex(int groupIndex, int itemIndex) +{ + if (IsEmpty()) + { + return E_INVALID_ARG; + } + + if ((groupIndex < 0) || (groupIndex >= GetGroupCount()) || (itemIndex < -1) || (itemIndex >= GetItemCountAt(groupIndex))) + { + return E_OUT_OF_RANGE; + } + + ScrollToItem(groupIndex, itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_TOP); + + return E_SUCCESS; +} + +result +_TableViewPresenter::GetBottomDrawnItemIndex(int& groupIndex, int& itemIndex) const +{ + result r = E_SUCCESS; + + TableViewItemTag itemPos; + r = GetBottomDrawnItem(itemPos); + + groupIndex = itemPos.groupIndex; + itemIndex = itemPos.itemIndex; + + return r; +} + +result +_TableViewPresenter::SetBottomDrawnItemIndex(int groupIndex, int itemIndex) +{ + if (IsEmpty()) + { + return E_INVALID_ARG; + } + + if ((groupIndex < 0) || (groupIndex >= GetGroupCount()) || (itemIndex < -1) || (itemIndex >= GetItemCountAt(groupIndex))) + { + return E_OUT_OF_RANGE; + } + + ScrollToItem(groupIndex, itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_BOTTOM); + + return E_SUCCESS; +} + +int +_TableViewPresenter::GetGroupCount(void) const +{ + return __pListModel->GetAllGroupCount(); +} + + +int +_TableViewPresenter::GetItemCountAt(int groupIndex) const +{ + return __pListModel->GetItemCountInGroup(groupIndex); +} + +bool +_TableViewPresenter::HasSectionHeader(int groupIndex) const +{ + if (__pProviderAdaptor == null || __pTableView->GetTableViewStyle() != TABLE_VIEW_STYLE_SECTION) + { + return false; + } + + return __pProviderAdaptor->HasSectionHeader(groupIndex); +} + +bool +_TableViewPresenter::HasSectionFooter(int groupIndex) const +{ + if (__pProviderAdaptor == null || __pTableView->GetTableViewStyle() != TABLE_VIEW_STYLE_SECTION) + { + return false; + } + + return __pProviderAdaptor->HasSectionFooter(groupIndex); +} + +int +_TableViewPresenter::GetItemCount(void) const +{ + return __pListModel->GetAllItemCount(); +} + +result +_TableViewPresenter::RefreshTableView(int groupIndex, int itemIndex, TableViewRefreshType type, bool animation) +{ + _TableViewItemProviderAdaptor* pProviderAdaptor = __pProviderAdaptor; + + SysTryReturn(NID_UI_CTRL, pProviderAdaptor != null, E_INVALID_STATE, E_INVALID_STATE, + "[%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, "[%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, "[%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; + } + + TableViewItemTag topDrawnItemPos = {-1, -1}; + TableViewItemTag refreshItemPos = {groupIndex, itemIndex}; + float prevScrollAreaHeight = GetScrollAreaBounds().height; + float prevScrollPosition = GetScrollPosition(); + + GetTopDrawnItem(topDrawnItemPos); + + ResetSweepItem(); + + switch (type) + { + case TABLE_VIEW_REFRESH_TYPE_ITEM_ADD: + if (itemIndex == -1) + { + bool emptyState = IsEmpty(); + + int itemCount = pProviderAdaptor->GetItemCount(groupIndex); + if (__pListModel->InsertGroup(groupIndex, itemCount, false) != E_SUCCESS) + { + SysLogException(NID_UI_CTRL, E_SYSTEM, "[%s] A system error has been occurred. Unable to add Group item.", GetErrorMessage(E_SYSTEM)); + return E_SYSTEM; + } + + if (emptyState) + { + GetFirstItem(topDrawnItemPos); + } + else if (groupIndex <= topDrawnItemPos.groupIndex) + { + topDrawnItemPos.groupIndex++; + } + } + else + { + bool emptyState = IsEmpty(); + + if (__pListModel->InsertItemToGroup(null, groupIndex, itemIndex) != E_SUCCESS) + { + SysLogException(NID_UI_CTRL, E_SYSTEM, "[%s] A system error has been occurred. Unable to add item.", GetErrorMessage(E_SYSTEM)); + return E_SYSTEM; + } + + if (emptyState) + { + GetFirstItem(topDrawnItemPos); + } + } + + RefreshItemHeightList(groupIndex, itemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_ADD); + RefreshSectionAlignmentList(groupIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_ADD); + + if (__pListModel->GetAllItemCount() == 1) + { + SetStatusChanged(true); + } + + if (!__pTableView->IsFocusNavigateEnabled() && (!IsEmpty())) + { + __pTableView->SetFocusNavigateEnabled(true); + } + + break; + + case TABLE_VIEW_REFRESH_TYPE_ITEM_REMOVE: + if (itemIndex == -1) + { + if (groupIndex == GetGroupCount()) + { + 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; + } + + RefreshItemHeightList(groupIndex, itemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_REMOVE); + RefreshSectionAlignmentList(groupIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_REMOVE); + + if (__pListModel->RemoveGroup(groupIndex) != E_SUCCESS) + { + SysLogException(NID_UI_CTRL, E_SYSTEM, "[%s] A system error has been occurred. Unable to remove group.", GetErrorMessage(E_SYSTEM)); + return E_SYSTEM; + } + + if (groupIndex == topDrawnItemPos.groupIndex) + { + topDrawnItemPos.itemIndex = -1; + } + + if (groupIndex < topDrawnItemPos.groupIndex) + { + topDrawnItemPos.groupIndex--; + } + + if ((groupIndex == GetGroupCount()) && (GetGroupCount() > 0)) + { + topDrawnItemPos.groupIndex--; + topDrawnItemPos.itemIndex = GetItemCountAt(GetGroupCount() - 1) - 1; + } + } + else + { + if (itemIndex == GetItemCountAt(groupIndex)) + { + 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, "[%s] A system error has been occurred. Unable to remove group.", GetErrorMessage(E_SYSTEM)); + return E_SYSTEM; + } + + if ((groupIndex == topDrawnItemPos.groupIndex) && (itemIndex < topDrawnItemPos.itemIndex)) + { + GetPreviousItemPosition(topDrawnItemPos, topDrawnItemPos); + } + + RefreshItemHeightList(groupIndex, itemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_REMOVE); + } + + if (GetModel()->IsValidItem(topDrawnItemPos.groupIndex, topDrawnItemPos.itemIndex) == false) + { + GetPreviousItemPosition(topDrawnItemPos, topDrawnItemPos); + } + + if (__pListModel->GetAllItemCount() == 0) + { + SetStatusChanged(true); + } + + if (__pTableView->IsFocusNavigateEnabled() && IsEmpty()) + { + __pTableView->SetFocusNavigateEnabled(false); + } + + break; + + case TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY: + { + TableViewItemTag itemTag = {groupIndex, itemIndex}; + _TableViewItem* pTableViewItem = FindItem(itemTag); + + if (pTableViewItem == null) + { + return E_SUCCESS; + } + + if (pProviderAdaptor->UpdateItem(pTableViewItem, itemTag.groupIndex, itemTag.itemIndex)) + { + FloatRectangle itemBounds = pTableViewItem->GetBoundsF(); + FloatDimension itemDim = Tizen::Graphics::CoordinateSystem::AlignToDevice(FloatDimension(itemBounds.width, itemBounds.height)); + itemBounds.height = itemDim.height; + pTableViewItem->SetBounds(itemBounds); + + CheckItemHeightAndRefreshLayout(itemTag, true); + + if (__sweptItemTag.groupIndex != itemTag.groupIndex || __sweptItemTag.itemIndex != itemTag.itemIndex) + { + ResetSweptItem(); + } + + pTableViewItem->SetPublicLabelUpdate(false); + pTableViewItem->SetItemChanged(true); + pTableViewItem->Invalidate(); + pTableViewItem->AdjustContextItemBounds(); + + return E_SUCCESS; + } + } + break; + + default: + SysLogException(NID_UI_CTRL, E_SYSTEM, "[%s] A system error has been occurred. Unable to refresh list.", GetErrorMessage(E_SYSTEM)); + return E_SYSTEM; + break; + } + + __lockLoadItemWithScroll = true; + + AdjustClientAreaBounds(true); + + __lockLoadItemWithScroll = false; + + if ((topDrawnItemPos.groupIndex > refreshItemPos.groupIndex) + ||((topDrawnItemPos.groupIndex == refreshItemPos.groupIndex)&&(topDrawnItemPos.itemIndex > refreshItemPos.itemIndex))) + { + RefreshItemLayout(topDrawnItemPos, refreshItemPos, type, false); + + float newScrollPosition = prevScrollPosition - (prevScrollAreaHeight - GetScrollAreaBounds().height); + + __lockLoadItemWithScroll = true; + + SetScrollPosition(newScrollPosition, false); + + __lockLoadItemWithScroll = false; + } + else + { + RefreshItemLayout(topDrawnItemPos, refreshItemPos, type, animation); + } + + RestoreEditCopyPasteManager(); + + return E_SUCCESS; +} + +result +_TableViewPresenter::RefreshAllItems(void) +{ + result r = E_SUCCESS; + TableViewItemTag itemTag = {-1, -1}; + TableViewItemTag lastLoadedItemTag = {-1, -1}; + + __pListModel->GetLastLoadedItemIndex(lastLoadedItemTag.groupIndex, lastLoadedItemTag.itemIndex); + __pListModel->GetFirstLoadedItemIndex(itemTag.groupIndex, itemTag.itemIndex); + + do + { + _TableViewItem* pItem = FindItem(itemTag); + + if (pItem == null) + { + continue; + } + + r = RefreshTableView(itemTag.groupIndex, itemTag.itemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY, false); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + if ((itemTag.itemIndex == lastLoadedItemTag.itemIndex) && (itemTag.groupIndex == lastLoadedItemTag.groupIndex)) + { + break; + } + } while (GetNextItemPosition(itemTag, itemTag)); + + return r; +} + +result +_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) + { + pVisualElement->RemoveAllAnimations(); + } + + + if (__modelInitialized == false) + { + SetItemDrawingProperty(); + + PreloadItem(); + } + else + { + if (IsEmpty()) + { + __pListModel->RemoveAllItem(false, false); + + PreloadItem(); + } + else + { + TableViewItemTag topDrawnTag = {-1, -1}; + float shiftingDistance = 0; + + ResetSweepItem(); + + GetTopDrawnItem(topDrawnTag); + + if (__pListModel->IsValidItem(topDrawnTag.groupIndex, topDrawnTag.itemIndex)) + { + _TableViewItem* pItem = FindItem(topDrawnTag); + + if (pItem != null) + { + shiftingDistance = GetScrollPosition() - pItem->GetBoundsF().y; + } + } + + _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); + + if (__isRestoreFocus) + { + __pTableView->SetFocused(true); + __pTableView->DrawFocus(); + __isRestoreFocus = false; + } + + __statusChangedFlag = true; + + if (__itemTouchReleasedEventState == TABLE_VIEW_ITEM_TOUCH_RELEASED_EVENT_FIRE) + { + __itemTouchReleasedEventState = TABLE_VIEW_ITEM_TOUCH_RELEASED_EVENT_UPDATE_TABLE_VIEW; + } + } + } + + if (IsEmpty() == true) + { + __pTableView->SetFocusNavigateEnabled(false); + } + else + { + __pTableView->SetFocusNavigateEnabled(true); + } + + __isUpdatingTableView = false; + + return E_SUCCESS; +} + +void +_TableViewPresenter::AdjustLayoutItems(float scrollPosition) +{ + TableViewItemTag lastLoadedItemPos = {-1, -1}; + TableViewItemTag firstLoadedItemPos = {-1, -1}; + TableViewItemTag currentItemPos = {-1, -1}; + _TableViewItem* pItem = null; + + __pListModel->GetFirstLoadedItemIndex(firstLoadedItemPos.groupIndex, firstLoadedItemPos.itemIndex); + __pListModel->GetLastLoadedItemIndex(lastLoadedItemPos.groupIndex, lastLoadedItemPos.itemIndex); + + pItem = FindItem(firstLoadedItemPos); + + if (pItem != null) + { + float positionY = pItem->GetPositionF().y; + + currentItemPos = firstLoadedItemPos; + + while (!_FloatCompareLE(positionY, scrollPosition) && GetPreviousItemPosition(currentItemPos, currentItemPos)) + { + pItem = LoadItem(currentItemPos.groupIndex, currentItemPos.itemIndex); + + if (pItem == null) + { + break; + } + + positionY = pItem->GetPositionF().y; + } + } + + pItem = FindItem(lastLoadedItemPos); + + if (pItem != null) + { + float positionY = pItem->GetPositionF().y; + float itemHeight = pItem->GetBoundsF().height; + float limitScreenArea = scrollPosition + __pTableView->GetBoundsF().height; + currentItemPos = lastLoadedItemPos; + + while ((positionY + itemHeight < limitScreenArea) && GetNextItemPosition(currentItemPos, currentItemPos)) + { + pItem = LoadItem(currentItemPos.groupIndex, currentItemPos.itemIndex); + + if (pItem == null) + { + break; + } + + positionY = pItem->GetPositionF().y; + itemHeight = pItem->GetBoundsF().height; + } + } +} + +void +_TableViewPresenter::ResetItemLayout(TableViewItemTag& topDrawnItemTag, float shiftingDistance) +{ + if (__pListModel->IsValidItem(topDrawnItemTag.groupIndex, topDrawnItemTag.itemIndex) == false) + { + return; + } + + DetachAllItem(true); + + _TableViewItem* pItem = LoadItem(topDrawnItemTag.groupIndex, topDrawnItemTag.itemIndex); + + if (pItem == null) + { + return; + } + + TableViewItemTag currentItem = topDrawnItemTag; + TableViewItemTag itemPos = topDrawnItemTag; + float screenAreaHeight = __pTableView->GetBoundsF().height + shiftingDistance; + float loadedItemTotalHeight = 0.0f; + FloatRectangle itemBounds = pItem->GetBoundsF(); + + itemBounds.y = CalculateItemPositionY(itemPos.groupIndex, itemPos.itemIndex); + pItem->SetBounds(itemBounds); + CheckItemHeightAndRefreshLayout(itemPos, true); + + loadedItemTotalHeight += itemBounds.height; + + while (loadedItemTotalHeight < screenAreaHeight && GetNextItemPosition(currentItem, itemPos)) + { + pItem = LoadItem(itemPos.groupIndex, itemPos.itemIndex); + + if (pItem == null) + { + break; + } + + currentItem = itemPos; + loadedItemTotalHeight += pItem->GetBoundsF().height; + } + + if (loadedItemTotalHeight < screenAreaHeight) + { + __pListModel->GetFirstLoadedItemIndex(itemPos.groupIndex, itemPos.itemIndex); + currentItem = itemPos; + + while (loadedItemTotalHeight < screenAreaHeight && GetPreviousItemPosition(currentItem, itemPos)) + { + pItem = LoadItem(itemPos.groupIndex, itemPos.itemIndex); + + if (pItem == null) + { + break; + } + + currentItem = itemPos; + loadedItemTotalHeight += pItem->GetBoundsF().height; + } + } +} + +bool +_TableViewPresenter::IsCachingItemsTotalHeightLessThanViewHeight(void) +{ + int currentCachingsize = GetMaxItemCachingSize(); + int loadedItemCount = 0; + float itemTotalHeight = 0.0f; + float viewHeight = __pTableView->GetBoundsF().height; + float lastItemHeight = 0.0f; + + TableViewItemTag lastLoadedItemPos = {-1, -1}; + TableViewItemTag firstLoadedItemPos = {-1, -1}; + + __pListModel->GetFirstLoadedItemIndex(firstLoadedItemPos.groupIndex, firstLoadedItemPos.itemIndex); + __pListModel->GetLastLoadedItemIndex(lastLoadedItemPos.groupIndex, lastLoadedItemPos.itemIndex); + + do + { + _TableViewItem* pItem = FindItem(firstLoadedItemPos); + + if (pItem != null) + { + itemTotalHeight = itemTotalHeight + pItem->GetSizeF().height; + lastItemHeight = pItem->GetSizeF().height; + loadedItemCount++; + } + + if ((firstLoadedItemPos.itemIndex == lastLoadedItemPos.itemIndex) && (firstLoadedItemPos.groupIndex == lastLoadedItemPos.groupIndex)) + { + break; + } + } while (GetNextItemPosition(firstLoadedItemPos, firstLoadedItemPos)); + + if (loadedItemCount < currentCachingsize || viewHeight < (itemTotalHeight - lastItemHeight)) + { + return false; + } + + return true; +} + +void +_TableViewPresenter::GetFirstLoadedItemIndex(int& groupIndex, int& itemIndex) const +{ + __pListModel->GetFirstLoadedItemIndex(groupIndex, itemIndex); +} + +void +_TableViewPresenter::GetLastLoadedItemIndex(int& groupIndex, int& itemIndex) const +{ + __pListModel->GetLastLoadedItemIndex(groupIndex, itemIndex); +} + +void +_TableViewPresenter::RefreshItemLayout(int groupIndex, int itemIndex) +{ + TableViewItemTag itemTag = {groupIndex, itemIndex}; + + ResetSweepItem(); + + RefreshItemLayout(itemTag, itemTag, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY, false); +} + +void +_TableViewPresenter::RefreshItemLayout(TableViewItemTag& topDrawnItemTag, TableViewItemTag& refreshItemTag, TableViewRefreshType type, bool animation) +{ + if (!__pListModel->IsValidItem(topDrawnItemTag.groupIndex, topDrawnItemTag.itemIndex)) + { + return; + } + + if (refreshItemTag.itemIndex == -1) + { + animation = false; + } + + _TableViewItem* pItem = null; + + TableViewItemTag itemPos = {-1, -1}; + TableViewItemTag currentItem = {-1, -1}; + + int loadItemCount = 0; + int maxLoadItemCount = GetMaxItemCachingSize(); + FloatRectangle itemBounds(0.0f, 0.0f, 0.0f, 0.0f); + + StopAllItemAnimation(); + + __pListModel->GetFirstLoadedItemIndex(itemPos.groupIndex, itemPos.itemIndex); + + if (itemPos.groupIndex == -1 && itemPos.itemIndex == -1) + { + itemPos = topDrawnItemTag; + } + + currentItem = itemPos; + + float itemPositionY = CalculateItemPositionY(itemPos.groupIndex, itemPos.itemIndex); + + do + { + pItem = LoadItem(itemPos.groupIndex, itemPos.itemIndex); + + if (pItem == null) + { + break; + } + + if (pItem->HasParent()) + { + pItem->SetDrawingProperty(__pItemDrawingProperty); + SetItemType(pItem, itemPos); + } + + itemBounds = pItem->GetBoundsF(); + itemBounds.y = itemPositionY; + + if (animation) + { + if (type == TABLE_VIEW_REFRESH_TYPE_ITEM_ADD) + { + if (itemPos.groupIndex == refreshItemTag.groupIndex && itemPos.itemIndex == refreshItemTag.itemIndex) + { + pItem->SetBounds(itemBounds); + pItem->FadeInOutItem(false, ADD_ITEM_ANIMATION_DURATION, REFRESH_ITEM_ANIMATION_DELAY); + pItem->ZoomInOutItem(false, ADD_ITEM_ANIMATION_DURATION, REFRESH_ITEM_ANIMATION_DELAY); + } + else + { + if (!pItem->MoveItem(FloatPoint(itemBounds.x, itemBounds.y), ADD_ITEM_ANIMATION_DURATION, 0)) + { + pItem->SetBounds(itemBounds); + } + } + } + else + { + if (!pItem->MoveItem(FloatPoint(itemBounds.x, itemBounds.y), REMOVE_ITEM_MOVE_ANIMATION_DURATION, REFRESH_ITEM_ANIMATION_DELAY)) + { + pItem->SetBounds(itemBounds); + } + } + } + else + { + pItem->SetBounds(itemBounds); + } + + currentItem = itemPos; + itemPositionY = itemBounds.y + itemBounds.height; + + loadItemCount++; + + } while (loadItemCount < maxLoadItemCount && GetNextItemPosition(currentItem, itemPos)); + + if (loadItemCount < maxLoadItemCount) + { + __pListModel->GetFirstLoadedItemIndex(itemPos.groupIndex, itemPos.itemIndex); + currentItem = itemPos; + + while (loadItemCount < maxLoadItemCount && GetPreviousItemPosition(currentItem, itemPos)) + { + pItem = LoadItem(itemPos.groupIndex, itemPos.itemIndex); + + if (pItem == null) + { + break; + } + + currentItem = itemPos; + + loadItemCount++; + } + } + + if (refreshItemTag.itemIndex == -1) + { + ScrollToItem(topDrawnItemTag.groupIndex, topDrawnItemTag.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_TOP); + } +} + +void +_TableViewPresenter::RefreshItemBounds(_TableViewItem* pItem, TableViewItemTag& itemPos) +{ + FloatRectangle itemBounds; + + if (pItem == null) + { + return; + } + + itemBounds = pItem->GetBoundsF(); + + itemBounds.y = CalculateItemPositionY(itemPos.groupIndex, itemPos.itemIndex); + + if (itemPos.itemIndex != -1) + { + float itemMargin = GetLeftMargin(); + itemBounds.x = itemMargin; + itemBounds.width = __pItemDrawingProperty->width - itemBounds.x - itemMargin; + } + else + { + itemBounds.x = 0.0f; + itemBounds.width = __pItemDrawingProperty->width; + } + + pItem->SetBounds(itemBounds); +} + +result +_TableViewPresenter::GetItemIndexFromPosition(const FloatPoint& position, int& groupIndex, int& itemIndex) const +{ + result r = E_SUCCESS; + TableViewItemTag itemPos; + + FloatPoint targetPosition = position; + float scrollPosition = GetScrollPosition(); + targetPosition.y += scrollPosition; + + r = GetItemFromPosition(targetPosition, itemPos); + + if (r != E_SUCCESS) + { + groupIndex = -1; + itemIndex = -1; + return r; + } + + groupIndex = itemPos.groupIndex; + itemIndex = itemPos.itemIndex; + + return r; +} + + +bool +_TableViewPresenter::PreloadItem(void) +{ + if (GetModel() == null || __pProviderAdaptor == null) + { + return false; + } + + __modelInitialized = true; + + if (__pListModel->GetAllGroupCount() == 0 && (__pProviderAdaptor != null)) + { + int itemCount = 0; + int groupCount = __pProviderAdaptor->GetGroupCount(); + + for (int i = 0; i < groupCount; i++) + { + itemCount = __pProviderAdaptor->GetItemCount(i); + __pListModel->AddGroup(itemCount, false); + } + } + + __pListModel->RestoreItemStatus(); + + CreateItemHeightList(TABLEVIEW_DEFAULT_ITEM_HEIGHT_VALUE, TABLEVIEW_DEFAULT_ITEM_HEIGHT_VALUE); + CreateSectionAlignmentList(); + + int cachingSize = 0; + + if (GetItemCount() > TABLEVIEW_MAX_ITEM_COUNT) + { + cachingSize = TABLEVIEW_MAX_ITEM_COUNT; + } + else if (__pListModel->GetMaxCachingSize() < TABLEVIEW_MAX_ITEM_COUNT) + { + cachingSize = __pListModel->GetMaxCachingSize(); + } + else + { + cachingSize = GetItemCount(); + } + + TableViewItemTag itemPos = {-1, -1}; + GetFirstItem(itemPos); + + _TableViewItem* pItem = null; + for (int i = 0; i < cachingSize; i++) + { + pItem = LoadItem(itemPos.groupIndex, itemPos.itemIndex); + + if (pItem == null) + { + break; + } + + if (GetNextItemPosition(itemPos, itemPos) == false) + { + break; + } + } + + if (IsCachingItemsTotalHeightLessThanViewHeight()) + { + AdjustLayoutItems(0.0f); + } + + PresetItemHeightList(); + AdjustClientAreaBounds(true); + + 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()); + } + } + else if (scrollStyle != TABLE_VIEW_SCROLL_BAR_STYLE_NONE) + { + if (IsScrollable()) + { + FadeInScrollBar(); + } + } + + return true; +} + +bool +_TableViewPresenter::PreloadItem(int topDrawnGroupIndex, int topDrawnItemIndex, float shiftingDistance) +{ + if (GetModel() == null || __pProviderAdaptor == null) + { + return false; + } + + __modelInitialized = true; + + if (__pListModel->GetAllGroupCount() == 0 && (__pProviderAdaptor != null)) + { + int itemCount = 0; + int groupCount = __pProviderAdaptor->GetGroupCount(); + + for (int i = 0; i < groupCount; i++) + { + itemCount = __pProviderAdaptor->GetItemCount(i); + __pListModel->AddGroup(itemCount, false); + } + } + + float defaultGroupHeight = __pProviderAdaptor->GetDefaultGroupItemHeight(); + float defaultItemHeight = __pProviderAdaptor->GetDefaultItemHeight(); + + if (_FloatCompareLE(defaultGroupHeight, 0.0f)) + { + defaultGroupHeight = TABLEVIEW_DEFAULT_ITEM_HEIGHT_VALUE; + } + + if (_FloatCompareLE(defaultItemHeight, 0.0f)) + { + defaultItemHeight = TABLEVIEW_DEFAULT_ITEM_HEIGHT_VALUE; + } + + __pListModel->RestoreItemStatus(); + + RestoreItemHeightList(defaultGroupHeight, defaultItemHeight); + + DeleteSectionAlignmentList(); + CreateSectionAlignmentList(); + + if (!__pListModel->IsValidItem(topDrawnGroupIndex, topDrawnItemIndex)) + { + TableViewItemTag firstItemTag = {-1, -1}; + + GetFirstItem(firstItemTag); + + topDrawnGroupIndex = firstItemTag.groupIndex; + topDrawnItemIndex = firstItemTag.itemIndex; + + shiftingDistance = 0.0f; + } + + AdjustClientAreaBounds(true); + + ScrollToItem(topDrawnGroupIndex, topDrawnItemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_TOP, shiftingDistance); + + if (IsCachingItemsTotalHeightLessThanViewHeight()) + { + AdjustLayoutItems(GetScrollPosition()); + } + + if (__pTableView->GetScrollStyle() == TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL + || __pTableView->GetScrollStyle() == TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL_FIXED) + { + _FastScroll* pFastScroll = __pTableView->GetFastScrollBar(); + if (pFastScroll != null) + { + pFastScroll->UpdateIndex(); + pFastScroll->SetScrollVisibility(IsScrollable()); + } + } + + return true; +} + +bool +_TableViewPresenter::IsItemChecked(int groupIndex, int itemIndex) const +{ + if ((groupIndex < 0) || (groupIndex >= GetGroupCount()) || (itemIndex < -1) || (itemIndex >= GetItemCountAt(groupIndex))) + { + return false; + } + + return __pListModel->IsItemChecked(groupIndex, itemIndex); +} + +result +_TableViewPresenter::SetItemChecked(int groupIndex, int itemIndex, bool checked) +{ + if ((groupIndex < 0) || (groupIndex >= GetGroupCount()) || (itemIndex < -1) || (itemIndex >= GetItemCountAt(groupIndex))) + { + return E_OUT_OF_RANGE; + } + + if (__modelInitialized == false) + { + return E_INVALID_STATE; + } + + bool enabled = __pListModel->IsItemEnabled(groupIndex, itemIndex); + 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) + { + return E_SUCCESS; + } + + TableViewItemTag itemTag = {groupIndex, itemIndex}; + _TableViewItem* pItem = FindItem(itemTag); + + TableViewItemTag topDrawnItemTag = {-1, -1}; + GetTopDrawnItem(topDrawnItemTag); + + TableViewItemTag bottomDrawnItemTag = {-1, -1}; + GetBottomDrawnItem(bottomDrawnItemTag); + + if (pItem != null) + { + if (((itemTag.groupIndex == topDrawnItemTag.groupIndex && itemTag.itemIndex >= topDrawnItemTag.itemIndex) + || itemTag.groupIndex > topDrawnItemTag.groupIndex) && + ((itemTag.groupIndex == bottomDrawnItemTag.groupIndex && itemTag.itemIndex <= bottomDrawnItemTag.itemIndex) + || itemTag.groupIndex < bottomDrawnItemTag.groupIndex)) + { + pItem->SetCheckedAnimationEnabled(checked); + } + } + + result r = __pListModel->SetItemChecked(groupIndex, itemIndex, checked); + + return r; +} + +bool +_TableViewPresenter::IsItemEnabled(int groupIndex, int itemIndex) const +{ + if ((groupIndex < 0) || (groupIndex >= GetGroupCount()) || (itemIndex < -1) || (itemIndex >= GetItemCountAt(groupIndex))) + { + return false; + } + + return __pListModel->IsItemEnabled(groupIndex, itemIndex); +} + +result +_TableViewPresenter::SetItemEnabled(int groupIndex, int itemIndex, bool enabled) +{ + if ((groupIndex < 0) || (groupIndex >= GetGroupCount()) || (itemIndex < -1) || (itemIndex >= GetItemCountAt(groupIndex))) + { + return E_OUT_OF_RANGE; + } + + if (__pListModel->IsItemEnabled(groupIndex, itemIndex) == enabled) + { + return E_SUCCESS; + } + + result r = __pListModel->SetItemEnabled(groupIndex, itemIndex, enabled); + + return r; +} + +result +_TableViewPresenter::SetStatusChanged(bool changed) +{ + __statusChangedFlag = changed; + + if (__statusChangedFlag == true) + { + SetItemDrawingProperty(); + + if ((__pItemDrawingProperty != null) && (__pItemDrawingProperty->propertyChanged == true)) + { + __pListModel->SetAllLoadedItemStateChanged(true); + } + } + + return E_SUCCESS; +} + +bool +_TableViewPresenter::IsStatusChanged(void) const +{ + return __statusChangedFlag; +} + +float +_TableViewPresenter::GetTopMargin(void) const +{ + return __topMargin; +} + +result +_TableViewPresenter::SetTopMargin(float topMargin) +{ + __topMargin = topMargin; + + return E_SUCCESS; +} + +float +_TableViewPresenter::GetBottomMargin(void) const +{ + return __bottomMargin; +} + +result +_TableViewPresenter::SetBottomMargin(float bottomMargin) +{ + __bottomMargin = bottomMargin; + + return E_SUCCESS; +} + +float +_TableViewPresenter::GetLeftMargin(void) const +{ + return __leftMargin; +} + +result +_TableViewPresenter::SetLeftMargin(float leftMargin) +{ + __leftMargin = leftMargin; + + return E_SUCCESS; +} + +void +_TableViewPresenter::SetAnnexFocused(bool isAnnexFocused) +{ + __isAnnexFocused = isAnnexFocused; +} + +bool +_TableViewPresenter::IsAnnexFocused(void) +{ + return __isAnnexFocused; +} + +void +_TableViewPresenter::SetTableViewFocused(bool focusStatus) +{ + if (focusStatus == false) + { + __focusItemTag.groupIndex = -1; + __focusItemTag.itemIndex = -1; + __isRestoreFocus = false; + __isAnnexFocused = false; + } + __isTableViewFocused = focusStatus; +} + +bool +_TableViewPresenter::IsTableViewFocused(void) +{ + return __isTableViewFocused; +} + +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) +{ + TableViewStyle style = __pTableView->GetTableViewStyle(); + + if (itemPosition.itemIndex == -1) + { + if (style == TABLE_VIEW_STYLE_SECTION) + { + pItem->SetItemType(TABLE_VIEW_ITEM_TYPE_HEADER); + } + else + { + pItem->SetItemType(TABLE_VIEW_ITEM_TYPE_TITLE); + } + } + else + { + int itemCount = GetItemCountAt(itemPosition.groupIndex); + if (style == TABLE_VIEW_STYLE_SIMPLE) + { + if (itemCount == 1 || (itemCount > 1 && (itemPosition.itemIndex == itemCount - 1))) + { + pItem->SetSimpleLastItemEnabled(true); + } + else + { + pItem->SetSimpleLastItemEnabled(false); + } + } + if (style == TABLE_VIEW_STYLE_SECTION) + { + pItem->SetSectionItem(true); + } + + if (itemPosition.itemIndex == 0) + { + if (HasSectionFooter(itemPosition.groupIndex)) + { + if (itemCount == 1) + { + pItem->SetItemType(TABLE_VIEW_ITEM_TYPE_FOOTER); + } + else if (itemCount == 2) + { + pItem->SetItemType(TABLE_VIEW_ITEM_TYPE_ONE); + } + else + { + pItem->SetItemType(TABLE_VIEW_ITEM_TYPE_TOP); + } + } + else + { + if (itemCount == 1) + { + pItem->SetItemType(TABLE_VIEW_ITEM_TYPE_ONE); + } + else + { + pItem->SetItemType(TABLE_VIEW_ITEM_TYPE_TOP); + } + } + } + else + { + int lastItemIndex = itemCount - 1; + + if (HasSectionFooter(itemPosition.groupIndex)) + { + if (itemPosition.itemIndex == lastItemIndex) + { + pItem->SetItemType(TABLE_VIEW_ITEM_TYPE_FOOTER); + } + else if (itemPosition.itemIndex == lastItemIndex - 1) + { + pItem->SetItemType(TABLE_VIEW_ITEM_TYPE_BOTTOM); + } + else + { + pItem->SetItemType(TABLE_VIEW_ITEM_TYPE_MIDDLE); + } + } + else + { + if (itemPosition.itemIndex == lastItemIndex) + { + pItem->SetItemType(TABLE_VIEW_ITEM_TYPE_BOTTOM); + } + else + { + pItem->SetItemType(TABLE_VIEW_ITEM_TYPE_MIDDLE); + } + } + } + } +} + +void +_TableViewPresenter::SetItemLayout(_TableViewItem* pItem, TableViewItemTag& itemPos) +{ + _TableViewItem* pSeriesItem = null; + TableViewItemTag seriesItemPos = {-1, -1}; + FloatRectangle seriesItemBounds; + FloatRectangle itemBounds; + bool validBounds = false; + bool downScroll = true; + + if (itemPos.itemIndex == -1 && __pTableView->GetTableViewStyle() != TABLE_VIEW_STYLE_SECTION) + { + itemBounds.x = 0; + itemBounds.width = __pItemDrawingProperty->width; + } + else + { + float itemMargin = GetLeftMargin(); + itemBounds.x = itemMargin; + itemBounds.width = __pItemDrawingProperty->width - itemBounds.x - itemMargin; + } + + FloatDimension itemDimension = Tizen::Graphics::CoordinateSystem::AlignToDevice(FloatDimension(pItem->GetSizeF().width, pItem->GetSizeF().height)); + itemBounds.height = itemDimension.height; + + if (itemPos.groupIndex == 0 && itemPos.itemIndex == -1) + { + itemBounds.y = GetTopMargin(); + validBounds = true; + } + else + { + if (GetPreviousItemPosition(itemPos, seriesItemPos)) + { + if (__pListModel->IsLoadedItem(seriesItemPos.groupIndex, seriesItemPos.itemIndex)) + { + pSeriesItem = static_cast<_TableViewItem*>(__pListModel->LoadItem(seriesItemPos.groupIndex, seriesItemPos.itemIndex)); + if ((pSeriesItem != null) && pSeriesItem->HasParent()) + { + if (__pTableView->IsReorderModeEnabled() && (__reorderInfo.groupIndex == seriesItemPos.groupIndex && __reorderInfo.itemIndex == seriesItemPos.itemIndex)) + { + seriesItemBounds = __reorderInfo.itemBounds; + } + else + { + seriesItemBounds = pSeriesItem->GetBoundsF(); + } + + itemBounds.y = seriesItemBounds.y + seriesItemBounds.height; + + validBounds = true; + } + } + } + + if ((!validBounds) && GetNextItemPosition(itemPos, seriesItemPos)) + { + if (__pListModel->IsLoadedItem(seriesItemPos.groupIndex, seriesItemPos.itemIndex)) + { + pSeriesItem = static_cast<_TableViewItem*>(__pListModel->LoadItem(seriesItemPos.groupIndex, seriesItemPos.itemIndex)); + if ((pSeriesItem != null) && pSeriesItem->HasParent()) + { + if (__pTableView->IsReorderModeEnabled() && (__reorderInfo.groupIndex == seriesItemPos.groupIndex && __reorderInfo.itemIndex == seriesItemPos.itemIndex)) + { + seriesItemBounds = __reorderInfo.itemBounds; + } + else + { + seriesItemBounds = pSeriesItem->GetBoundsF(); + } + + itemBounds.y = seriesItemBounds.y - itemBounds.height; + + validBounds = true; + downScroll = false; + } + } + } + } + + if (validBounds) + { + pItem->SetBounds(itemBounds); + + CheckItemHeightAndRefreshLayout(itemPos, downScroll); + } + else + { + itemBounds.y = CalculateItemPositionY(itemPos.groupIndex, itemPos.itemIndex); + pItem->SetBounds(itemBounds); + + CheckItemHeightAndRefreshLayout(itemPos, true); + } + + if (__pTableView->IsReorderModeEnabled() && __reorderInfo.itemIndex != -1) + { + TableViewItemTag reorderSelectedItemTag = {__reorderInfo.groupIndex, __reorderInfo.itemIndex}; + _TableViewItem* pReorderSelectedItem = FindItem(reorderSelectedItemTag); + + if (pReorderSelectedItem != null) + { + pReorderSelectedItem->GetVisualElement()->SetZOrder(null, true); + } + } + + if (pItem->GetItemLayoutEnabled()) + { + pItem->PartialUpdateLayout(); + } +} + +_TableViewItem* +_TableViewPresenter::LoadItem(int groupIndex, int itemIndex) +{ + _TableViewItem* pItem = static_cast<_TableViewItem*>(__pListModel->LoadItem(groupIndex, itemIndex)); + + if ((pItem != null) && !pItem->HasParent()) + { + __lockLoadItemWithScroll = true; + + __pTableView->AttachChild(*pItem); + + pItem->SetDrawingProperty(__pItemDrawingProperty); + + TableViewItemTag itemPosition = {groupIndex, itemIndex}; + SetItemType(pItem, itemPosition); + SetItemLayout(pItem, itemPosition); + pItem->SetReorderMode(__pTableView->IsReorderModeEnabled()); + + __lockLoadItemWithScroll = false; + } + + return pItem; +} + +_TableViewItem* +_TableViewPresenter::FindItem(TableViewItemTag& itemTag) +{ + if (__pListModel->IsLoadedItem(itemTag.groupIndex, itemTag.itemIndex)) + { + return static_cast<_TableViewItem*>(__pListModel->LoadItem(itemTag.groupIndex, itemTag.itemIndex)); + } + return null; +} + +void +_TableViewPresenter::UnloadItem(int groupIndex, int itemIndex) +{ + __pListModel->UnloadItem(groupIndex, itemIndex); +} + +void +_TableViewPresenter::UnloadItem(TableViewItemTag& itemTag) +{ + __pListModel->UnloadItem(itemTag.groupIndex, itemTag.itemIndex); + + return; +} + +void +_TableViewPresenter::DetachItem(TableViewItemTag& itemTag) +{ + _TableViewItem* pItem = FindItem(itemTag); + + if (pItem != null && pItem->HasParent()) + { + pItem->GetParent()->DetachChild(*pItem); + } +} + +void +_TableViewPresenter::DetachContextItem(TableViewItemTag& itemTag) +{ + _TableViewItem* pItem = FindItem(itemTag); + if (pItem == null) + { + return; + } + + _TableViewItem* contextItem = pItem->GetContextItem(); + if (contextItem != null && contextItem->HasParent()) + { + contextItem->GetParent()->DetachChild(*pItem); + } +} + +void +_TableViewPresenter::DetachAllItem(bool removeItem) +{ + TableViewItemTag itemPos = {-1, -1}; + TableViewItemTag lastItemPos = {-1, -1}; + + __pListModel->GetFirstLoadedItemIndex(itemPos.groupIndex, itemPos.itemIndex); + __pListModel->GetLastLoadedItemIndex(lastItemPos.groupIndex, lastItemPos.itemIndex); + + if (itemPos.groupIndex == -1 && itemPos.itemIndex == -1) + { + return; + } + + do + { + DetachItem(itemPos); + + if (removeItem) + { + UnloadItem(itemPos); + } + + if (itemPos.itemIndex == lastItemPos.itemIndex && itemPos.groupIndex == lastItemPos.groupIndex) + { + break; + } + } while (GetNextItemPosition(itemPos, itemPos)); +} + +void +_TableViewPresenter::SetItemDrawingProperty(void) +{ + if (__pItemDrawingProperty != null) + { + __pItemDrawingProperty->propertyChanged = false; + + if (__pItemDrawingProperty->itemDividerEnabled != __pTableView->IsItemDividerEnabled()) + { + __pItemDrawingProperty->itemDividerEnabled = __pTableView->IsItemDividerEnabled(); + __pItemDrawingProperty->propertyChanged = true; + } + + if (__pItemDrawingProperty->dividerColor != __pTableView->GetItemDividerColor()) + { + __pItemDrawingProperty->dividerColor = __pTableView->GetItemDividerColor(); + __pItemDrawingProperty->propertyChanged = true; + } + + if (__pItemDrawingProperty->sectionStyleEnabled != (__pTableView->GetTableViewStyle() == TABLE_VIEW_STYLE_SECTION)) + { + __pItemDrawingProperty->sectionStyleEnabled = (__pTableView->GetTableViewStyle() == TABLE_VIEW_STYLE_SECTION); + __pItemDrawingProperty->propertyChanged = true; + } + + if (__pItemDrawingProperty->sectionStyleBgColor != __pTableView->GetSectionColor()) + { + __pItemDrawingProperty->sectionStyleBgColor = __pTableView->GetSectionColor(); + __pItemDrawingProperty->propertyChanged = true; + } + + if (__pTableView->GetTableViewStyle() != TABLE_VIEW_STYLE_SIMPLE) + { + if (__pItemDrawingProperty->groupedLookEnabled != __pTableView->IsGroupedLookEnabled()) + { + __pItemDrawingProperty->groupedLookEnabled = __pTableView->IsGroupedLookEnabled(); + __pItemDrawingProperty->propertyChanged = true; + } + } + + if (__pItemDrawingProperty->reorderMode != __pTableView->IsReorderModeEnabled()) + { + __pItemDrawingProperty->reorderMode = __pTableView->IsReorderModeEnabled(); + __pItemDrawingProperty->propertyChanged = true; + } + + if (!_FloatCompare(__pItemDrawingProperty->leftMargin, __leftMargin)) + { + __pItemDrawingProperty->leftMargin = __leftMargin; + __pItemDrawingProperty->propertyChanged = true; + } + + if (__pTableView->GetScrollStyle() == TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL_FIXED) + { + GET_SHAPE_CONFIG(TABLEVIEW::FASTSCROLL_INDEX_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, + __pItemDrawingProperty->scrollMargin); + } + else + { + __pItemDrawingProperty->scrollMargin = 0; + } + + if (!_FloatCompare(__pItemDrawingProperty->width, __pTableView->GetBoundsF().width)) + { + __pItemDrawingProperty->width = __pTableView->GetBoundsF().width; + __pItemDrawingProperty->propertyChanged = true; + } + } +} + +void +_TableViewPresenter::OnBoundsChanged(void) +{ + float listWidth = __pTableView->GetBoundsF().width - (GetLeftMargin() * 2); + + if (__pProviderAdaptor != null && __modelInitialized) + { + StopExpandCollapseAnimation(); + + StopAllItemAnimation(); + + if (__pTableView->IsReorderModeEnabled() && __reorderInfo.itemIndex != -1) + { + ResetReorderItem(__reorderInfo.groupIndex, __reorderInfo.itemIndex); + } + + if (!_FloatCompare(listWidth, __pProviderAdaptor->GetListWidth())) + { + __pProviderAdaptor->SetListWidth(listWidth); + + SetItemDrawingProperty(); + + AdjustLoadedItemWidth(); + + __pTableView->UpdateLayout(); + } + + SetClientAreaHeight(__itemTotalHeight); + ResetSweepItem(); + + AdjustLayoutItems(GetScrollPosition()); + } + else + { + if (__pProviderAdaptor != null) + { + __pProviderAdaptor->SetListWidth(listWidth); + } + + 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 +_TableViewPresenter::Draw(void) +{ + result r = _ScrollPanelPresenter::Draw(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (__modelInitialized == false) + { + SetItemDrawingProperty(); + + if (PreloadItem() == false) + { + __pTableView->SetFocusNavigateEnabled(false); + return E_SUCCESS; + } + + if (__reservedScrollItemIndex.groupIndex != -1 && __reservedScrollItemIndex.itemIndex != -1) + { + ScrollToItem(__reservedScrollItemIndex.groupIndex, __reservedScrollItemIndex.itemIndex, __reservedScrollItemAlignment); + + __reservedScrollItemIndex.groupIndex = -1; + __reservedScrollItemIndex.itemIndex = -1; + + return E_SUCCESS; + } + } + + __firstDrawnFlag = false; + + // Draw empty list + if (IsEmpty() == true) + { + __pTableView->SetFocusNavigateEnabled(false); + return DrawEmptyTableView(); + } + else + { + __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) + { + return response; + } + + TableViewItemTag itemPos = {-1, -1}; + + pItem->GetItemIndex(itemPos.groupIndex, itemPos.itemIndex); + + if (itemPos.groupIndex == -1 && itemPos.itemIndex == -1) + { + return response; + } + + if (IsScrollAnimationRunning() && (GetScrollPosition() == GetScrollPositionInternal())) + { + pItem->SetTouchPressOnScroll(true); + return response; + } + + if (__pTableView->IsReorderModeEnabled()) + { + __firstTouchMoved = true; + + if (SelectReorderItem(itemPos.groupIndex, itemPos.itemIndex, false)) + { + __reorderInfo.touchPressedPositionY = touchInfo.GetCurrentPosition().y; + __reorderInfo.blockedTouchReleaseState = true; + } + } + + return response; +} + +_UiTouchEventDelivery +_TableViewPresenter::OnPreviewTouchMoved(const _Control& source, const _TouchInfo& touchInfo) +{ + if (__pTableView->IsReorderModeEnabled()) + { + if (__reorderInfo.itemIndex != -1) + { + if (!DragSelectedItem(touchInfo.GetCurrentPosition().y - __reorderInfo.touchPressedPositionY, true)) + { + __firstTouchMoved = false; + + ResetReorderItem(__reorderInfo.groupIndex, __reorderInfo.itemIndex); + } + + return _UI_TOUCH_EVENT_DELIVERY_NO; + } + } + + return _ScrollPanelPresenter::OnPreviewTouchMoved(source, touchInfo); +} + +_UiTouchEventDelivery +_TableViewPresenter::OnPreviewTouchReleased(const _Control& source, const _TouchInfo& touchInfo) +{ + if (__pTableView->IsReorderModeEnabled() && __reorderInfo.itemIndex != -1) + { + ResetReorderItem(__reorderInfo.groupIndex, __reorderInfo.itemIndex); + + if (__reorderInfo.blockedTouchReleaseState) + { + __reorderInfo.blockedTouchReleaseState = false; + + _TableViewItem* pItem = GetTableViewItemFromControl(source); + if (pItem != null) + { + pItem->ResetTextSlide(); + } + + return _UI_TOUCH_EVENT_DELIVERY_NO; + } + } + + return _ScrollPanelPresenter::OnPreviewTouchReleased(source, touchInfo); +} + +_UiTouchEventDelivery +_TableViewPresenter::OnPreviewTouchCanceled(const _Control& source, const _TouchInfo& touchInfo) +{ + return _ScrollPanelPresenter::OnPreviewTouchCanceled(source, touchInfo); +} + +bool +_TableViewPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& touchInfo) +{ + __firstTouchMoved = true; + + _TableViewItem* pItem = GetTableViewItemFromControl(source); + + if (pItem == null) + { + StopExpandCollapseAnimation(); + return _ScrollPanelPresenter::OnTouchPressed(source, touchInfo); + } + + TableViewItemTag itemPos = {-1, -1}; + pItem->GetItemIndex(itemPos.groupIndex, itemPos.itemIndex); + + if (!(pItem->IsContextItem() + || pItem->IsItemEnabled() == false + || pItem->GetItemType() == TABLE_VIEW_ITEM_TYPE_TITLE + || pItem->GetItemType() == TABLE_VIEW_ITEM_TYPE_HEADER + || pItem->GetItemType() == TABLE_VIEW_ITEM_TYPE_FOOTER) + && ((itemPos.groupIndex != __sweptItemTag.groupIndex) + || (itemPos.itemIndex != __sweptItemTag.itemIndex))) + { + ResetSweptItem(); + } + + __sweepOccured = false; + + StopExpandCollapseAnimation(); + + return _ScrollPanelPresenter::OnTouchPressed(source, touchInfo); +} + +bool +_TableViewPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchInfo) +{ + if (__pTableView->IsReorderModeEnabled()) + { + if (__reorderInfo.blockedScroll) + { + return true; + } + + return _ScrollPanelPresenter::OnTouchMoved(source, touchInfo); + } + + _TableViewItem* pItem = GetTableViewItemFromControl(source); + if (pItem == null + || pItem->IsItemEnabled() == false + || pItem->GetItemType() == TABLE_VIEW_ITEM_TYPE_TITLE + || pItem->GetItemType() == TABLE_VIEW_ITEM_TYPE_HEADER + || pItem->GetItemType() == TABLE_VIEW_ITEM_TYPE_FOOTER + || pItem->IsAnnexOnOffSliding()) + { + return _ScrollPanelPresenter::OnTouchMoved(source, touchInfo);; + } + + if (__firstTouchMoved) + { + FloatPoint prevTouchPosition = GetPreviousTouchPosition(); + FloatPoint currTouchPosition = GetCurrentTouchPosition(); + float moveDistanceX = currTouchPosition.x - prevTouchPosition.x; + float moveDistanceY = currTouchPosition.y - prevTouchPosition.y; + + if ((pItem->GetContextItem() != null && abs(moveDistanceX) > abs(moveDistanceY * 2)) || pItem->IsContextItem()) + { + if (!pItem->IsContextItem() && !pItem->IsAnimationPlaying()) + { + pItem->GetItemIndex(__sweptItemTag.groupIndex, __sweptItemTag.itemIndex); + __sweptItemPosition = pItem->GetPositionF(); + + pItem->AdjustContextItemBounds(); + } + + __sweepOccured = true; + } + else if (pItem->GetContextItem() == null && __pTableView->IsSweepEnabled()) + { + __sweepOccured = true; + } + else + { + ResetSweptItem(); + } + } + + __firstTouchMoved = false; + + if (__sweepOccured) + { + FloatPoint prevTouchPosition = GetPreviousTouchPosition(); + FloatPoint currTouchPosition = GetCurrentTouchPosition(); + + SweepItem(currTouchPosition.x - prevTouchPosition.x); + + return true; + } + + return _ScrollPanelPresenter::OnTouchMoved(source, touchInfo); +} + +bool +_TableViewPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchInfo) +{ + _TableViewItem* pItem = GetTableViewItemFromControl(source); + + if (pItem == null + || pItem->GetItemType() == TABLE_VIEW_ITEM_TYPE_TITLE + || pItem->GetItemType() == TABLE_VIEW_ITEM_TYPE_HEADER + || pItem->GetItemType() == TABLE_VIEW_ITEM_TYPE_FOOTER) + { + return _ScrollPanelPresenter::OnTouchReleased(source, touchInfo); + } + + if(__sweepOccured) + { + if (pItem->IsContextItem()) + { + pItem = static_cast<_TableViewItem*>(__pListModel->LoadItem(__sweptItemTag.groupIndex, __sweptItemTag.itemIndex)); + } + _TableViewItem* pContextItem = pItem->GetContextItem(); + + // Swept event fire + if (pContextItem == null && __pTableView->IsSweepEnabled()) + { + FloatPoint prevPos = _ScrollPanelPresenter::GetPreviousTouchPosition(); + + if (prevPos.x > touchInfo.GetCurrentPosition().x) + { + pItem->FireItemSweepEvent(TABLE_VIEW_SWEEP_DIRECTION_LEFT); + } + else if (prevPos.x < touchInfo.GetCurrentPosition().x) + { + pItem->FireItemSweepEvent(TABLE_VIEW_SWEEP_DIRECTION_RIGHT); + } + + ResetSweptItem(); + } + else if (pContextItem != null) + { + AdjustSweptItemPosition(true); + } + } + + return _ScrollPanelPresenter::OnTouchReleased(source, touchInfo); +} + +bool +_TableViewPresenter::OnTouchCanceled(const _Control& source, const _TouchInfo& touchInfo) +{ + if (__sweepOccured) + { + ResetSweptItem(); + } + + if (__pTableView->IsReorderModeEnabled() && __reorderInfo.itemIndex != -1) + { + ResetReorderItem(__reorderInfo.groupIndex, __reorderInfo.itemIndex); + return true; + } + + return _ScrollPanelPresenter::OnTouchCanceled(source, touchInfo); +} + +bool +_TableViewPresenter::OnFlickGestureDetected(_TouchFlickGestureDetector& gesture) +{ + if (__pTableView->IsReorderModeEnabled() && __reorderInfo.itemIndex != -1) + { + return true; + } + + _FlickDirection flickDirection = gesture.GetDirection(); + + if (flickDirection != _FLICK_DIRECTION_RIGHT && flickDirection != _FLICK_DIRECTION_LEFT) + { + return _ScrollPanelPresenter::OnFlickGestureDetected(gesture); + } + + _Control* gestureControl = gesture.GetControl(); + + if (gestureControl == null) + { + return _ScrollPanelPresenter::OnFlickGestureDetected(gesture); + } + + _TableViewItem* pItem = GetTableViewItemFromControl(*gestureControl); + + if (pItem == null) + { + return _ScrollPanelPresenter::OnFlickGestureDetected(gesture); + } + + if (flickDirection == _FLICK_DIRECTION_RIGHT) + { + // event fire + if (pItem->GetContextItem() == null && __pTableView->IsSweepEnabled()) + { + pItem->FireItemSweepEvent(TABLE_VIEW_SWEEP_DIRECTION_RIGHT); + } + else + { + if (pItem->GetContextItem() != null) + { + AdjustSweptItemPosition(); + } + } + } + else if (flickDirection == _FLICK_DIRECTION_LEFT) + { + // event fire + if (pItem->GetContextItem() == null && __pTableView->IsSweepEnabled()) + { + pItem->FireItemSweepEvent(TABLE_VIEW_SWEEP_DIRECTION_LEFT); + } + else + { + if (pItem->GetContextItem() != null) + { + AdjustSweptItemPosition(); + } + } + } + + return true; +} + +bool +_TableViewPresenter::OnFlickGestureCanceled(_TouchFlickGestureDetector& gesture) +{ + return _ScrollPanelPresenter::OnFlickGestureCanceled(gesture); +} + +bool +_TableViewPresenter::OnPreviewFlickGestureDetected(_TouchFlickGestureDetector& gesture) +{ + if (__pTableView->IsReorderModeEnabled() && __reorderInfo.itemIndex != -1) + { + return true; + } + + _FlickDirection flickDirection = gesture.GetDirection(); + if (flickDirection != _FLICK_DIRECTION_RIGHT && flickDirection != _FLICK_DIRECTION_LEFT) + { + return _ScrollPanelPresenter::OnFlickGestureDetected(gesture); + } + + return true; +} + +void +_TableViewPresenter::OnTimerExpired(Tizen::Base::Runtime::Timer& timer) +{ + _ScrollPanelPresenter::OnTimerExpired(timer); + + if (&timer == __pReorderScrollTimer) + { + float distance = 0.0f; + + if (__reorderInfo.isScrollDirectionUp) + { + distance = -REORDER_SCROLL_ANIMATION_DISTANCE; + } + else + { + distance = REORDER_SCROLL_ANIMATION_DISTANCE; + } + + DragSelectedItem(distance, false); + + distance = ScrollTo(distance + GetScrollPosition()); + + StartReorderScrollTimer(); + } + else if (&timer == __pFastScrollTimer) + { + __isFastScrollTimerEnabled = false; + + _FastScroll* pFastScroll = __pTableView->GetFastScrollBar(); + + if (pFastScroll != null && !_ScrollPanelPresenter::IsScrollAnimationRunning()) + { + pFastScroll->SetScrollVisibility(false); + } + } +} + +result +_TableViewPresenter::StartFastScrollTimer(void) +{ + result r = E_SUCCESS; + + SysTryReturn(NID_UI_CTRL, + __pTableView->GetScrollStyle() == 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)); + 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, "Propagating."); + + __isFastScrollTimerEnabled = true; + + return r; +} + +void +_TableViewPresenter::StopFastScrollTimer(void) +{ + result r = E_SUCCESS; + + 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)); + + __isFastScrollTimerEnabled = false; + + return; +} + +bool +_TableViewPresenter::IsEmpty(void) const +{ + if (__pTableView->GetTableViewStyle() == TABLE_VIEW_STYLE_SIMPLE) + { + if (GetItemCountAt(0) <= 0) + { + return true; + } + } + else + { + if (GetGroupCount() <= 0) + { + return true; + } + } + + return false; +} + +result +_TableViewPresenter::DrawEmptyTableView(void) +{ + return E_SUCCESS; +} + +bool +_TableViewPresenter::GetFirstItem(TableViewItemTag& firstItem) const +{ + if (IsEmpty()) + { + firstItem.groupIndex = -1; + firstItem.itemIndex = -1; + } + else + { + firstItem.groupIndex = 0; + firstItem.itemIndex = -1; + } + + return true; +} + +bool +_TableViewPresenter::GetLastItem(TableViewItemTag& lastItem) const +{ + if (IsEmpty()) + { + lastItem.groupIndex = -1; + lastItem.itemIndex = -1; + } + else + { + lastItem.groupIndex = GetGroupCount() - 1; + lastItem.itemIndex = GetItemCountAt(lastItem.groupIndex) - 1; + } + + return true; +} + +result +_TableViewPresenter::GetTopDrawnItem(TableViewItemTag& itemPos) const +{ + _TableViewItem* pItem = null; + TableViewItemTag lastItemPos = {-1, -1}; + float scrollPosition = 0.0f; + + scrollPosition = GetScrollPosition(); + + __pListModel->GetFirstLoadedItemIndex(itemPos.groupIndex, itemPos.itemIndex); + __pListModel->GetLastLoadedItemIndex(lastItemPos.groupIndex, lastItemPos.itemIndex); + + do + { + pItem = static_cast <_TableViewItem*>(__pListModel->LoadItem(itemPos.groupIndex, itemPos.itemIndex)); + if (pItem == null) + { + break; + } + + FloatRectangle itemBounds = pItem->GetBoundsF(); + + if (scrollPosition < (itemBounds.y + itemBounds.height)) + { + return E_SUCCESS; + } + + if ((itemPos.itemIndex == lastItemPos.itemIndex) && (itemPos.groupIndex == lastItemPos.groupIndex)) + { + break; + } + + } while (GetNextItemPosition(itemPos, itemPos) == true); + + + itemPos.itemIndex = -1; + itemPos.groupIndex = -1; + + return E_OBJ_NOT_FOUND; +} + +result +_TableViewPresenter::GetBottomDrawnItem(TableViewItemTag& itemPos) const +{ + _TableViewItem* pItem = null; + TableViewItemTag lastItemPos = {-1, -1}; + + if (IsEmpty()) + { + itemPos.itemIndex = -1; + itemPos.groupIndex = -1; + + return E_OBJ_NOT_FOUND; + } + + float scrollPosition = GetScrollPosition() + __pTableView->GetBoundsF().height; + + __pListModel->GetFirstLoadedItemIndex(itemPos.groupIndex, itemPos.itemIndex); + __pListModel->GetLastLoadedItemIndex(lastItemPos.groupIndex, lastItemPos.itemIndex); + + do + { + static bool onProcessingByProvider = true; + pItem = static_cast <_TableViewItem*>(__pListModel->LoadItem(itemPos.groupIndex, itemPos.itemIndex)); + onProcessingByProvider = false; + if (pItem == null) + { + break; + } + + FloatRectangle itemBounds = pItem->GetBoundsF(); + + if (itemBounds.y <= scrollPosition && scrollPosition <= (itemBounds.y + itemBounds.height)) + { + break; + } + + if ((itemPos.itemIndex == lastItemPos.itemIndex) && (itemPos.groupIndex == lastItemPos.groupIndex)) + { + break; + } + + } while (GetNextItemPosition(itemPos, itemPos) == true); + + return E_SUCCESS; +} + +bool +_TableViewPresenter::GetPreviousItemPosition(const TableViewItemTag& currentItemPos, TableViewItemTag& prevItem) const +{ + if (IsEmpty()) + { + return false; + } + + // check validation of group index + if ((currentItemPos.groupIndex < 0) || (currentItemPos.groupIndex >= __pListModel->GetAllGroupCount())) + { + return false; + } + + // if the current item is the first item + if (currentItemPos.groupIndex == 0 && currentItemPos.itemIndex == -1) + { + return false; + } + + if (currentItemPos.itemIndex == -1) + { + if (__pListModel->IsGroupExpanded(currentItemPos.groupIndex - 1) == false) + { + prevItem.groupIndex = currentItemPos.groupIndex - 1; + prevItem.itemIndex = -1; + + 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.itemIndex >= 0) + { + prevItem.groupIndex = currentItemPos.groupIndex; + prevItem.itemIndex = -1; + } + + return true; + } + + if (currentItemPos.itemIndex == -1) // group title item + { + prevItem.groupIndex = currentItemPos.groupIndex - 1; + prevItem.itemIndex = __pListModel->GetItemCountInGroup(prevItem.groupIndex) - 1; + } + else + { + prevItem.groupIndex = currentItemPos.groupIndex; + prevItem.itemIndex = currentItemPos.itemIndex - 1; + } + + return true; +} + +bool +_TableViewPresenter::GetNextItemPosition(const TableViewItemTag& currentItem, TableViewItemTag& nextItem) const +{ + if (IsEmpty()) + { + return false; + } + + int lastGroup = __pListModel->GetAllGroupCount() - 1; + int lastItemInCurrentGroup = __pListModel->GetItemCountInGroup(currentItem.groupIndex) - 1; + int lastItem = __pListModel->GetItemCountInGroup(lastGroup) - 1; + + // check validation of group index + if ((currentItem.groupIndex < 0) || (currentItem.groupIndex > lastGroup)) + { + return false; + } + + // if the current item is the last item. + if ((currentItem.groupIndex == lastGroup) && (currentItem.itemIndex == lastItem)) + { + return false; + } + + if (__pListModel->IsGroupExpanded(currentItem.groupIndex) == false) + { + if (currentItem.groupIndex == lastGroup) + { + return false; + } + + nextItem.groupIndex = currentItem.groupIndex + 1; + nextItem.itemIndex = -1; + + return true; + } + + if (lastItemInCurrentGroup == currentItem.itemIndex) + { + nextItem.groupIndex = currentItem.groupIndex + 1; + nextItem.itemIndex = -1; + } + else + { + nextItem.groupIndex = currentItem.groupIndex; + nextItem.itemIndex = currentItem.itemIndex + 1; + } + + return true; +} + +float +_TableViewPresenter::GetHeightOfAllItems(void) const +{ + int groupCount = GetGroupCount(); + float totalHeight = 0; + + for (int i = 0; i < groupCount; i++) + { + TableViewItemTag itemTag = {i, -1}; + + totalHeight += GetItemHeight(itemTag); + + if (!IsGroupExpanded(i)) + { + continue; + } + + int itemCount = GetItemCountAt(i); + + for (int j = 0; j < itemCount; j++) + { + itemTag.itemIndex = j; + + totalHeight += GetItemHeight(itemTag); + } + } + + return totalHeight; +} + +void +_TableViewPresenter::SetTableViewItemProviderAdaptor(_TableViewItemProviderAdaptor* pProviderAdaptor) +{ + __pListModel->RegisterItemProviderAdaptor(pProviderAdaptor); + + __pProviderAdaptor = pProviderAdaptor; + + if (__pProviderAdaptor != null) + { + __pProviderAdaptor->SetTableViewPresenter(this); + } +} + +_TableViewItemProviderAdaptor* +_TableViewPresenter::GetTableViewItemProviderAdaptor(void) const +{ + return __pProviderAdaptor; +} + +result +_TableViewPresenter::ExpandGroup(int groupIndex, bool withAnimation) +{ + if ((groupIndex < 0) || (groupIndex >= GetGroupCount())) + { + return E_OUT_OF_RANGE; + } + + if (__modelInitialized == false) + { + return E_INVALID_STATE; + } + + if (IsGroupExpanded(groupIndex) == true) + { + return E_SUCCESS; + } + + TableViewItemTag topTag; + GetTopDrawnItem(topTag); + + TableViewItemTag bottomTag; + GetBottomDrawnItem(bottomTag); + + float screenPosition = GetScrollPosition(); + + __pListModel->SetGroupExpandState(groupIndex, true); + + ResetSweepItem(); + + _TableViewItem* pItem = null; + TableViewItemTag itemTag = {-1, -1}; + float groupTotalHeight = 0.0f; + int itemCount = GetItemCountAt(groupIndex); + for (int i = 0; i < itemCount; i++) + { + pItem = static_cast<_TableViewItem*>(__pListModel->GetItemFromTemporaryBuffer(groupIndex, i)); + groupTotalHeight += pItem->GetItemHeight(); + itemTag.groupIndex = groupIndex; + itemTag.itemIndex = i; + SetItemHeight(itemTag, pItem->GetItemHeight()); + } + AdjustClientAreaBounds(false, groupTotalHeight); + + if (groupIndex < topTag.groupIndex || groupIndex > bottomTag.groupIndex) + { + _TableViewItem* pItem = FindItem(topTag); + if (pItem != null) + { + FloatRectangle itemBounds = pItem->GetBoundsF(); + itemBounds.y = CalculateItemPositionY(topTag.groupIndex, topTag.itemIndex); + pItem->SetBounds(itemBounds); + AttachNextItemsToBottom(topTag); + if (groupIndex < topTag.groupIndex) + { + ScrollTo(screenPosition + groupTotalHeight); + } + } + + int firstLoadedGroupIndex = -1; + int firstLoadedItemIndex = -1; + __pListModel->GetFirstLoadedItemIndex(firstLoadedGroupIndex, firstLoadedItemIndex); + + for (int j = firstLoadedGroupIndex; j <= topTag.groupIndex; j++) + { + int itemCount = GetItemCountAt(j); + + for (int i = -1; i < itemCount; i++) + { + if (i >= topTag.itemIndex && j == topTag.groupIndex) + { + break; + } + + UnloadItem(j, i); + } + } + return E_SUCCESS; + } + + itemTag.groupIndex = groupIndex; + itemTag.itemIndex = -1; + + __expandableItemTag.groupIndex = groupIndex; + __expandableItemTag.itemIndex = -1; + + if (withAnimation) + { + _TableViewItem* pItem = FindItem(itemTag); + if (pItem == null) + { + return E_SUCCESS; + } + + FloatRectangle itemBounds = pItem->GetBoundsF(); + float startPosition = itemBounds.y + itemBounds.height; + + float endPosition = startPosition + groupTotalHeight; + if (endPosition > screenPosition + __pTableView->GetBoundsF().height) + { + endPosition = screenPosition + __pTableView->GetBoundsF().height; + } + + _VisualElement* pVisualElement = __pTableView->GetVisualElement(); + String animationName(L"EXPAND_GROUP_ANIMATION"); + + VisualElementValueAnimation* pAnimation = __pTableView->GetVisualElementValueAnimation(animationName); + pAnimation->SetStartValue(Variant(startPosition)); + pAnimation->SetEndValue(Variant(endPosition)); + pAnimation->SetDuration(EXPAND_GROUP_ANIMATION_DURATION); + pVisualElement->AddAnimation(animationName, *pAnimation); + } + else + { + ExpandGroupAnimationFinished(false); + } + + return E_SUCCESS; +} + +result +_TableViewPresenter::CollapseGroup(int groupIndex, bool withAnimation) +{ + if ((groupIndex < 0) || (groupIndex >= GetGroupCount())) + { + return E_OUT_OF_RANGE; + } + + if (__modelInitialized == false) + { + return E_INVALID_STATE; + } + + if (IsGroupExpanded(groupIndex) == false) + { + return E_SUCCESS; + } + + TableViewItemTag itemTag; + GetTopDrawnItem(itemTag); + + TableViewItemTag bottomTag; + GetBottomDrawnItem(bottomTag); + float screenPosition = GetScrollPosition(); + + __pListModel->SetGroupExpandState(groupIndex, false); + + ResetSweepItem(); + + if (groupIndex < itemTag.groupIndex || groupIndex > bottomTag.groupIndex) + { + _TableViewItem* pItem = null; + TableViewItemTag itemTag = {-1, -1}; + float groupTotalHeight = 0; + int itemCount = GetItemCountAt(groupIndex); + for (int i = 0; i < itemCount; i++) + { + _TableViewItem* pItem = static_cast<_TableViewItem*>(__pListModel->GetItemFromTemporaryBuffer(groupIndex, i)); + groupTotalHeight += pItem->GetItemHeight(); + itemTag.groupIndex = groupIndex; + itemTag.itemIndex = i; + SetItemHeight(itemTag, pItem->GetItemHeight()); + } + + TableViewItemTag firstLoadedItemTag; + __pListModel->GetFirstLoadedItemIndex(firstLoadedItemTag.groupIndex, firstLoadedItemTag.itemIndex); + + if (firstLoadedItemTag.groupIndex == groupIndex) + { + SetLoadedItemsVisibleInGroup(groupIndex, false); + firstLoadedItemTag.groupIndex = groupIndex + 1; + firstLoadedItemTag.itemIndex = -1; + } + + for (int i = 0; i < itemCount; i++) + { + UnloadItem(groupIndex, i); + } + + __pListModel->GetFirstLoadedItemIndex(firstLoadedItemTag.groupIndex, firstLoadedItemTag.itemIndex); + pItem = FindItem(firstLoadedItemTag); + if (pItem != null) + { + FloatRectangle itemBounds = pItem->GetBoundsF(); + itemBounds.y = CalculateItemPositionY(firstLoadedItemTag.groupIndex, firstLoadedItemTag.itemIndex); + pItem->SetBounds(itemBounds); + AttachNextItemsToBottom(firstLoadedItemTag); + if (groupIndex < itemTag.groupIndex) + { + ScrollTo(screenPosition - groupTotalHeight); + } + } + + AdjustClientAreaBounds(false, -groupTotalHeight); + + return E_SUCCESS; + } + + if (itemTag.groupIndex < groupIndex) + { + itemTag.groupIndex = groupIndex; + itemTag.itemIndex = -1; + } + __expandableItemTag.groupIndex = itemTag.groupIndex; + __expandableItemTag.itemIndex = itemTag.itemIndex; + + if(__firstDrawnFlag) + { + withAnimation = false; + } + + if (withAnimation) + { + _TableViewItem* pItem = FindItem(itemTag); + if (pItem == null) + { + return E_SUCCESS; + } + + FloatRectangle itemBounds = pItem->GetBoundsF(); + float startPosition = 0; + if (itemTag.itemIndex == -1) + { + startPosition = itemBounds.y + itemBounds.height; + } + else + { + startPosition = GetScrollPosition(); + } + + if (bottomTag.groupIndex > groupIndex) + { + bottomTag.groupIndex = groupIndex+1; + bottomTag.itemIndex = -1; + } + + pItem = FindItem(bottomTag); + if (pItem == null) + { + return E_SUCCESS; + } + + itemBounds = pItem->GetBoundsF(); + float endPosition = itemBounds.y; + if (bottomTag.groupIndex != groupIndex +1) + { + endPosition += itemBounds.height; + } + + if (endPosition > screenPosition + __pTableView->GetBoundsF().height) + { + endPosition = screenPosition + __pTableView->GetBoundsF().height; + } + + _VisualElement* pVisualElement = __pTableView->GetVisualElement(); + String animationName(L"COLLAPSE_GROUP_ANIMATION"); + + VisualElementValueAnimation* pAnimation = __pTableView->GetVisualElementValueAnimation(animationName); + pAnimation->SetStartValue(Variant(endPosition)); + pAnimation->SetEndValue(Variant(startPosition)); + pAnimation->SetDuration(COLLAPSE_GROUP_ANIMATION_DURATION); + pVisualElement->AddAnimation(animationName, *pAnimation); + } + else + { + CollapseGroupAnimationFinished(false); + } + + return E_SUCCESS; +} + +bool +_TableViewPresenter::IsGroupExpanded(int groupIndex) const +{ + return __pListModel->IsGroupExpanded(groupIndex); +} + +void +_TableViewPresenter::StopExpandCollapseAnimation(void) +{ + _VisualElement* pVisualElement = __pTableView->GetVisualElement(); + String animationName(L"EXPAND_GROUP_ANIMATION"); + VisualElementValueAnimation* pExpandGroupAnimation = dynamic_cast(pVisualElement->GetAnimationN(animationName)); + if (pExpandGroupAnimation != null) + { + pVisualElement->RemoveAnimation(animationName); + delete pExpandGroupAnimation; + } + + animationName = L"COLLAPSE_GROUP_ANIMATION"; + VisualElementValueAnimation* pCollapseGroupAnimation = dynamic_cast(pVisualElement->GetAnimationN(animationName)); + if (pCollapseGroupAnimation != null) + { + pVisualElement->RemoveAnimation(animationName); + delete pCollapseGroupAnimation; + } +} + +int +_TableViewPresenter::LoadAllItemsInGroup(int groupIndex, bool downward) +{ + int itemCountInGroup = __pListModel->GetItemCountInGroup(groupIndex); + _TableViewItem* pItem = null; + + if (downward) + { + for (int i = 0; i < itemCountInGroup; i++) + { + pItem = LoadItem(groupIndex, i); + + if (pItem == null) + { + SysLogException(NID_UI_CTRL, E_SYSTEM, "[%s] A system error has been occurred. Unable to load item.", GetErrorMessage(E_SYSTEM)); + } + } + } + else + { + for (int i = itemCountInGroup-1; i >= 0; i--) + { + pItem = LoadItem(groupIndex, i); + + if (pItem == null) + { + SysLogException(NID_UI_CTRL, E_SYSTEM, "[%s] A system error has been occurred. Unable to load item.", GetErrorMessage(E_SYSTEM)); + } + } + } + + return itemCountInGroup; +} + +void +_TableViewPresenter::SetLoadedItemsVisibleInGroup(int groupIndex, bool visible) +{ + int itemCountInGroup = __pListModel->GetItemCountInGroup(groupIndex); + _TableViewItem* pItem = null; + TableViewItemTag itemTag; + itemTag.groupIndex = groupIndex; + + int firstLoadedGroupIndex = -1; + int firstLoadedItemIndex = -1; + __pListModel->GetFirstLoadedItemIndex(firstLoadedGroupIndex, firstLoadedItemIndex); + + if (firstLoadedGroupIndex > groupIndex) + { + return; + } + + int startIndex = 0; + if (groupIndex == firstLoadedGroupIndex && firstLoadedItemIndex > 0) + { + startIndex = firstLoadedItemIndex; + } + + for (int i = startIndex; i < itemCountInGroup; i++) + { + itemTag.itemIndex = i; + pItem = FindItem(itemTag); + if (pItem == null) + { + continue; + } + + pItem->SetVisibleState(visible); + } +} + +TableViewItemTag +_TableViewPresenter::LoadItemsToBeVisible(const TableViewItemTag& from) +{ + TableViewItemTag bottomTag = from; + TableViewItemTag current; + TableViewItemTag next; + + _TableViewItem* pItem = LoadItem(from.groupIndex, from.itemIndex); + + if (pItem == null) + { + return from; + } + + FloatRectangle itemBounds = pItem->GetBoundsF(); + float viewHeight = __pTableView->GetBoundsF().height; + float scrollPosition = GetScrollPosition(); + float itemPosition = itemBounds.y + itemBounds.height - scrollPosition; + + while (viewHeight >= itemPosition) + { + current.groupIndex = bottomTag.groupIndex; + current.itemIndex = bottomTag.itemIndex; + if (!GetNextItemPosition(current, next)) + { + break; + } + + pItem = LoadItem(next.groupIndex, next.itemIndex); + bottomTag.groupIndex = next.groupIndex; + bottomTag.itemIndex = next.itemIndex; + itemPosition += pItem->GetBoundsF().height; + } + + return bottomTag; +} + +void +_TableViewPresenter::AttachNextItemsToBottom(const TableViewItemTag& anchor) +{ + TableViewItemTag itemTag = anchor; + TableViewItemTag current; + TableViewItemTag next; + + _TableViewItem* pItem = FindItem(itemTag); + if (pItem == null) + { + return; + } + + FloatRectangle itemBounds = pItem->GetBoundsF(); + float itemPosition = itemBounds.y + itemBounds.height; + + current.groupIndex = itemTag.groupIndex; + current.itemIndex = itemTag.itemIndex; + while (GetNextItemPosition(current, next)) + { + pItem = FindItem(next); + if (pItem == null) + { + current = next; + continue; + } + + itemBounds = pItem->GetBoundsF(); + itemBounds.y = itemPosition; + pItem->SetBounds(itemBounds); + itemPosition += itemBounds.height; + current = next; + } +} + +bool +_TableViewPresenter::IsAnyItemInGroupLoaded(int groupIndex) const +{ + int startGroupIndex = 0; + int endGroupIndex = 0; + int index = 0; + + __pListModel->GetFirstLoadedItemIndex(startGroupIndex, index); + __pListModel->GetLastLoadedItemIndex(endGroupIndex, index); + + return groupIndex >= startGroupIndex && groupIndex <= endGroupIndex; +} + +void +_TableViewPresenter::ScrollToHideNonClientArea(TableViewItemTag& bottomTag) +{ + _TableViewItem* pItem = FindItem(bottomTag); + if (pItem == null) + { + return ; + } + + FloatRectangle itemBounds = pItem->GetBoundsF(); + float viewHeight = __pTableView->GetBoundsF().height; + float scrollPosition = GetScrollPosition(); + float itemBottom = itemBounds.y + itemBounds.height - scrollPosition; + + if (itemBottom < viewHeight) + { + scrollPosition -= viewHeight - itemBottom; + if (scrollPosition < 0) + { + scrollPosition = 0; + } + + SetScrollPosition(scrollPosition, false); + } +} + +void +_TableViewPresenter::AdjustClientAreaBounds(bool reset, float dist) +{ + float clientHeight = 0; + + if (reset) + { + __itemTotalHeight = GetHeightOfAllItems(); + clientHeight = __itemTotalHeight; + } + else + { + __itemTotalHeight = __itemTotalHeight + dist; + clientHeight = __itemTotalHeight; + } + + SetClientAreaHeight(clientHeight); +} + +void +_TableViewPresenter::SetClientAreaHeight(float height) +{ + FloatRectangle screenBounds = __pTableView->GetBoundsF(); + FloatRectangle clientBounds = screenBounds; + + clientBounds.height = height; + + if (clientBounds.height < screenBounds.height) + { + clientBounds.height = screenBounds.height; + } + + SetScrollAreaBounds(clientBounds); + + _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); + } +} + +void +_TableViewPresenter::UnloadInvisibleItems(void) +{ + float scrollPosition = GetScrollPosition(); + TableViewItemTag itemTag; + __pListModel->GetFirstLoadedItemIndex(itemTag.groupIndex, itemTag.itemIndex); + + _TableViewItem* pItem = null; + FloatRectangle bounds; + + while ((pItem = FindItem(itemTag)) != null) + { + if (itemTag.itemIndex != -1) + { + bounds = pItem->GetBoundsF(); + if (bounds.y + bounds.height < scrollPosition) + { + UnloadItem(itemTag); + } + else + { + break; + } + } + __pListModel->GetFirstLoadedItemIndex(itemTag.groupIndex, itemTag.itemIndex); + } + + __pListModel->GetLastLoadedItemIndex(itemTag.groupIndex, itemTag.itemIndex); + scrollPosition += __pTableView->GetBoundsF().height; + + while ((pItem = FindItem(itemTag)) != null) + { + if (itemTag.itemIndex != -1) + { + bounds = pItem->GetBoundsF(); + if (bounds.y > scrollPosition) + { + UnloadItem(itemTag); + } + else + { + break; + } + } + __pListModel->GetLastLoadedItemIndex(itemTag.groupIndex, itemTag.itemIndex); + } + +} + +float +_TableViewPresenter::ScrollToInternal(float newPosition) +{ + if (!IsScrollEnabled()) + { + return 0.0f; + } + + if (IsScrollAnimationRunning()) + { + if (__scrollPositionOnFlickStarted > newPosition) + { + newPosition += GetScrollAreaBounds().height - __scrollHeightOnFlickStarted; + } + } + + float currentScrollPosition = GetScrollPosition(); + float currentscrollAreaHeight = GetScrollAreaBounds().height; + float newScrollPosition = (newPosition < 0) ? 0 : (newPosition > currentscrollAreaHeight ? currentscrollAreaHeight : newPosition); + float newScrollAreaHeight = 0; + + if (IsModelUpdating()) + { + currentScrollPosition = GetScrollPositionInternal(); + } + + if (!__lockLoadItemWithScroll) + { + LoadItemWithScrollPosition(currentScrollPosition, newScrollPosition); + + if (currentScrollPosition > newScrollPosition) + { + newScrollAreaHeight = GetScrollAreaBounds().height; + newScrollPosition += newScrollAreaHeight - currentscrollAreaHeight; + } + } + + //scroll effect for _ScrollPanel + if (newPosition < 0.0f || newPosition > currentscrollAreaHeight - __pTableView->GetBoundsF().height) + { + newScrollPosition = newPosition; + } + + return _ScrollPanelPresenter::ScrollToInternal(newScrollPosition); +} + +void +_TableViewPresenter::LoadItemWithScrollPosition(float previousScrollPosition, float currentScrollPos) +{ + ClearLastResult(); + + TableViewItemTag lastLoadedItemPos = {-1, -1}; + TableViewItemTag firstLoadedItemPos = {-1, -1}; + __pListModel->GetLastLoadedItemIndex(lastLoadedItemPos.groupIndex, lastLoadedItemPos.itemIndex); + __pListModel->GetFirstLoadedItemIndex(firstLoadedItemPos.groupIndex, firstLoadedItemPos.itemIndex); + + if (currentScrollPos > previousScrollPosition && lastLoadedItemPos.groupIndex != -1) + { + _TableViewItem* pLastItem = FindItem(lastLoadedItemPos); + if (pLastItem == null) + { + return; + } + + while (pLastItem && (pLastItem->GetBoundsF().y <= currentScrollPos + __pTableView->GetBoundsF().height)) + { + TableViewItemTag nextItemPos = {-1, -1}; + if (GetNextItemPosition(lastLoadedItemPos, nextItemPos)) + { + if (nextItemPos.itemIndex == -1) + { + LoadItem(nextItemPos.groupIndex, nextItemPos.itemIndex); + + if (!GetNextItemPosition(nextItemPos, nextItemPos)) + { + break; + } + } + + if (nextItemPos.groupIndex != -1) + { + _TableViewItem* pItem = LoadItem(nextItemPos.groupIndex, nextItemPos.itemIndex); + if (pItem == null) + { + return; + } + + FloatRectangle scrollAreaBounds = GetScrollAreaBounds(); + if (pItem->GetBoundsF().y + pItem->GetBoundsF().height >= scrollAreaBounds.height) + { + AdjustClientAreaBounds(true); + } + } + } + else + { + break; + } + + lastLoadedItemPos = nextItemPos; + pLastItem = static_cast<_TableViewItem*>(__pListModel->LoadItem(lastLoadedItemPos.groupIndex, lastLoadedItemPos.itemIndex)); + } + } + + if (currentScrollPos < previousScrollPosition && firstLoadedItemPos.groupIndex != -1) + { + _TableViewItem* pFirstItem = FindItem(firstLoadedItemPos); + if (pFirstItem == null) + { + return; + } + + float scrollOffsetFromBottom = GetScrollAreaBounds().height - currentScrollPos; + + while (pFirstItem) + { + FloatRectangle scrollAreaBounds = GetScrollAreaBounds(); + float itemOffsetFromBottom = scrollAreaBounds.height - (pFirstItem->GetBoundsF().y + pFirstItem->GetBoundsF().height); + + if (scrollOffsetFromBottom < itemOffsetFromBottom) + { + break; + } + + TableViewItemTag prevItemPos = {-1, -1}; + if (GetPreviousItemPosition(firstLoadedItemPos, prevItemPos)) + { + if (prevItemPos.itemIndex == -1) + { + LoadItem(prevItemPos.groupIndex, prevItemPos.itemIndex); + + if (!GetPreviousItemPosition(prevItemPos, prevItemPos)) + { + break; + } + } + + if (prevItemPos.groupIndex != -1) + { + LoadItem(prevItemPos.groupIndex, prevItemPos.itemIndex); + } + } + else + { + break; + } + + firstLoadedItemPos = prevItemPos; + pFirstItem = FindItem(firstLoadedItemPos); + } + } +} + +void +_TableViewPresenter::ScrollToItem(int groupIndex, int itemIndex, TableViewScrollItemAlignment itemAlignment, float shiftingDistance) +{ + _VisualElement* pVisualElement = __pTableView->GetVisualElement(); + String animationName(L"EXPAND_GROUP_ANIMATION"); + VisualElementValueAnimation* pExpandGroupAnimation = dynamic_cast(pVisualElement->GetAnimationN(animationName)); + if (pExpandGroupAnimation != null) + { + __scrollToItemTag.groupIndex = groupIndex; + __scrollToItemTag.itemIndex = itemIndex; + __scrollToItemTag.itemAlignment = itemAlignment; + __scrollToItemTag.shiftingDistance = shiftingDistance; + __scrollToItemTag.startedAnimation = true; + delete pExpandGroupAnimation; + return; + } + + animationName = L"COLLAPSE_GROUP_ANIMATION"; + VisualElementValueAnimation* pCollapseGroupAnimation = dynamic_cast(pVisualElement->GetAnimationN(animationName)); + if (pCollapseGroupAnimation != null) + { + __scrollToItemTag.groupIndex = groupIndex; + __scrollToItemTag.itemIndex = itemIndex; + __scrollToItemTag.itemAlignment = itemAlignment; + __scrollToItemTag.shiftingDistance = shiftingDistance; + __scrollToItemTag.startedAnimation = true; + delete pCollapseGroupAnimation; + return; + } + + if (IsGroupExpanded(groupIndex) == false) + { + itemIndex = -1; + } + + TableViewItemTag itemPos = {groupIndex, itemIndex}; + + StopAllItemAnimation(); + ResetSweepItem(); + + if (!__pListModel->IsLoadedItem(groupIndex, itemIndex)) + { + ResetItemLayout(itemPos, shiftingDistance); + } + + _TableViewItem* pItem = FindItem(itemPos); + + if (pItem == null) + { + return; + } + + float scrollPosition = pItem->GetBoundsF().y; + + scrollPosition = scrollPosition + shiftingDistance; + + SetScrollPosition(scrollPosition, false); + + if (itemAlignment == TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_BOTTOM) + { + SetScrollPosition(scrollPosition - (__pTableView->GetBoundsF().height - pItem->GetBoundsF().height), false); + } +} + +result +_TableViewPresenter::ScrollByPixel(float scrollDistance) +{ + FadeInScrollBar(); + result r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + ResetSweepItem(); + + ScrollTo(scrollDistance + GetScrollPosition()); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + RollbackBouncing(true); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + FadeOutScrollBar(); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +void +_TableViewPresenter::SetScrollEnabled(bool enable) +{ + __scrolling = enable; +} + +bool +_TableViewPresenter::IsScrollEnabled(void) const +{ + return __scrolling; +} + +bool +_TableViewPresenter::GetFirstDrawnFlag(void) const +{ + return __firstDrawnFlag; +} + +int +_TableViewPresenter::GetMaxItemCachingSize(void) const +{ + return __pListModel->GetMaxCachingSize(); +} + +void +_TableViewPresenter::ResetSweepItem(void) +{ + if (__sweptItemTag.groupIndex != -1 && __sweptItemTag.itemIndex != -1) + { + ResetSweptItem(); + } +} + +void +_TableViewPresenter::GetSweepItemIndex(int& groupIndex, int& itemIndex) const +{ + groupIndex = __sweptItemTag.groupIndex; + itemIndex = __sweptItemTag.itemIndex; +} + +int +_TableViewPresenter::GetPressedItemCount(void) +{ + _TableViewItem* pItem = null; + TableViewItemTag itemPos = {-1, -1}; + TableViewItemTag lastItemPos = {-1, -1}; + int count = 0; + + __pListModel->GetFirstLoadedItemIndex(itemPos.groupIndex, itemPos.itemIndex); + __pListModel->GetLastLoadedItemIndex(lastItemPos.groupIndex, lastItemPos.itemIndex); + + do + { + pItem = static_cast <_TableViewItem*>(__pListModel->LoadItem(itemPos.groupIndex, itemPos.itemIndex)); + if (pItem == null) + { + continue; + } + + if (pItem->GetDrawingStatus() == TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED) + { + count++; + } + + if ((itemPos.itemIndex == lastItemPos.itemIndex) && (itemPos.groupIndex == lastItemPos.groupIndex)) + { + break; + } + } while (GetNextItemPosition(itemPos, itemPos) == true); + + return count; +} + +void +_TableViewPresenter::BlockAnimationCallback(bool blocked) +{ + __isAnimationCallbackBlocked = blocked; +} + +float +_TableViewPresenter::CalculateItemPositionY(int groupIndex, int itemIndex) +{ + TableViewItemTag itemPos = {-1, -1}; + TableViewItemTag currentItemPos = {-1, -1}; + float positionY = 0.0f; + + GetFirstItem(itemPos); + + if (itemPos.groupIndex == -1 && itemPos.itemIndex == -1) + { + return 0; + } + + if (__pProviderAdaptor == null) + { + return -1; + } + + positionY = GetTopMargin(); + + while ((itemPos.groupIndex < groupIndex) || ((itemPos.groupIndex == groupIndex) && (itemPos.itemIndex < itemIndex))) + { + currentItemPos = itemPos; + + float itemHeight = GetItemHeight(itemPos); + + positionY += itemHeight; + + if (!GetNextItemPosition(currentItemPos, itemPos)) + { + break; + } + } + + return positionY; +} + +void +_TableViewPresenter::FadeInScrollBar(void) +{ + TableViewScrollBarStyle scrollStyle = __pTableView->GetScrollStyle(); + + if (scrollStyle == TABLE_VIEW_SCROLL_BAR_STYLE_NONE) + { + _Scroll* pScroll = __pTableView->GetScrollBar(); + + if (pScroll != null) + { + pScroll->SetVisibleState(false); + } + } + else if (scrollStyle == TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL) + { + _Scroll* pScroll = __pTableView->GetScrollBar(); + + if (pScroll != null) + { + pScroll->SetVisibleState(false); + } + + _FastScroll* pFastScroll = __pTableView->GetFastScrollBar(); + + if (pFastScroll != null) + { + pFastScroll->SetScrollVisibility(true); + } + } + else + { + _ScrollPanelPresenter::FadeInScrollBar(); + } +} + +void +_TableViewPresenter::FadeOutScrollBar(void) +{ + TableViewScrollBarStyle scrollStyle = __pTableView->GetScrollStyle(); + if (scrollStyle == TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL) + { + StopFastScrollTimer(); + + if (!_ScrollPanelPresenter::IsScrollAnimationRunning()) + { + StartFastScrollTimer(); + } + } + else if (scrollStyle == TABLE_VIEW_SCROLL_BAR_STYLE_FIXED) + { + _Scroll* pScroll = __pTableView->GetScrollBar(); + + if (pScroll != null) + { + pScroll->SetScrollingEffectVisibility(false); + } + } + else + { + _ScrollPanelPresenter::FadeOutScrollBar(); + } +} + +void +_TableViewPresenter::SweepItem(float x) +{ + if (!_FloatCompare(x, 0.0f)) + { + _TableViewItem* pItem = static_cast<_TableViewItem*>(__pListModel->LoadItem(__sweptItemTag.groupIndex, __sweptItemTag.itemIndex)); + + if (pItem != null) + { + _TableViewItem* pContextItem = pItem->GetContextItem(); + + if (pContextItem != null) + { + float currentPosition = __sweptItemPosition.x + x; + float sweepDistance = __pTableView->GetBoundsF().width; + float sweepMargin = 0.0f; + float contextItemWidth = pItem->GetBoundsF().width; + bool activated = pItem->IsContextItemActivated(); + bool needToFireEvent = false; + + GET_SHAPE_CONFIG(TABLEVIEW::CONTEXTITEM_RIGHT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, sweepMargin); + + if (currentPosition >= (sweepDistance - sweepMargin)) + { + currentPosition = (sweepDistance - sweepMargin); + needToFireEvent = !activated; + } + else if (currentPosition <= __leftMargin) + { + currentPosition = __leftMargin; + needToFireEvent = activated; + } + + __sweptItemPosition.x = currentPosition; + + // Set TableViewItem bounds + pItem->SetPosition(__sweptItemPosition); + + // Set TableViewContextItem bounds + if (!__pTableView->IsAncestorOf(*pContextItem)) + { + pContextItem->SetDrawingProperty(__pItemDrawingProperty); + __pTableView->InsertChildToBottom(*pContextItem); + __pTableView->UpdateLayout(); + } + + contextItemWidth = ((contextItemWidth > (__sweptItemPosition.x - __leftMargin)) ? (__sweptItemPosition.x - __leftMargin) : contextItemWidth); + + 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); + + activated = !activated; // ContextItem Activation State Changed + + __pTableView->FireTableViewContextItemActivationEvent(__sweptItemTag.groupIndex, __sweptItemTag.itemIndex, pContextItem, activated); + pItem->SetContextItemActivation(activated); + + if (!activated) + { + ResetSweepItem(); + } + } + } + } + } +} + +void +_TableViewPresenter::ResetSweptItem(void) +{ + _TableViewItem* pItem = static_cast<_TableViewItem*>(__pListModel->LoadItem(__sweptItemTag.groupIndex, __sweptItemTag.itemIndex)); + + if (pItem != null) + { + _VisualElement* pVisualElement = __pTableView->GetVisualElement(); + + if (pVisualElement != null) + { + String animationName(L"SWEEP_ITEM_ANIMATION"); + VisualElementAnimation* pContextItemAnimation = pVisualElement->GetAnimationN(animationName); + if (pContextItemAnimation != null) + { + pVisualElement->RemoveAnimation(animationName); + + delete pContextItemAnimation; + } + } + + pItem->SetPosition(FloatPoint(__leftMargin, __sweptItemPosition.y)); + + _TableViewItem* pContextItem = pItem->GetContextItem(); + if (pContextItem != null) + { + if (__pTableView->IsAncestorOf(*pContextItem)) + { + __pTableView->DetachChild(*pContextItem); + } + + if (pItem->IsContextItemActivated()) + { + __pTableView->FireTableViewContextItemActivationEvent(__sweptItemTag.groupIndex, __sweptItemTag.itemIndex, pContextItem, false); + pItem->SetContextItemActivation(false); + } + } + } + + __sweptItemTag.itemIndex = -1; + __sweptItemTag.groupIndex = -1; + + __sweptItemPosition.SetPosition(-1.0f, -1.0f); + __sweepOccured = false; +} + +void +_TableViewPresenter::AdjustSweptItemPosition(bool withAnimation) +{ + float itemWidth = __pTableView->GetBoundsF().width; + float sweepDistance = 0.0f; + + if (_FloatCompare(__sweptItemPosition.x, __leftMargin)) + { + ResetSweptItem(); + return; + } + + float sweepMargin = 0.0f; + GET_SHAPE_CONFIG(TABLEVIEW::CONTEXTITEM_RIGHT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, sweepMargin); + + if (__sweptItemPosition.x > (itemWidth - sweepMargin) / 2) + { + sweepDistance = itemWidth - __sweptItemPosition.x; + } + else + { + sweepDistance = -__sweptItemPosition.x; + } + + if (!withAnimation) + { + SweepItem(sweepDistance); + } + else + { + _TableViewItem* pItem = static_cast<_TableViewItem*>(__pListModel->LoadItem(__sweptItemTag.groupIndex, __sweptItemTag.itemIndex)); + + if (pItem != null) + { + _VisualElement* pVisualElement = __pTableView->GetVisualElement(); + + if (pVisualElement != null) + { + String animationName(L"SWEEP_ITEM_ANIMATION"); + float startValue = __sweptItemPosition.x; + float endValue = 0.0f; + + if(sweepDistance > 0) + { + endValue = itemWidth - sweepMargin; + } + else + { + if(_FloatCompare(itemWidth, __sweptItemPosition.x)) + { + endValue = itemWidth - sweepMargin; + } + else + { + endValue = __leftMargin; + } + } + + pVisualElement->SetImplicitAnimationEnabled(false); + + VisualElementValueAnimation* pAnimation = __pTableView->GetVisualElementValueAnimation(animationName); + pAnimation->SetStartValue(Variant(startValue)); + pAnimation->SetEndValue(Variant(endValue)); + pAnimation->SetDuration(SWEEP_ITEM_ANIMATION_DURATION); + pVisualElement->AddAnimation(animationName, *pAnimation); + } + } + } +} + +void +_TableViewPresenter::AdjustLoadedItemWidth(void) +{ + TableViewItemTag lastLoadedItemPos = {-1, -1}; + TableViewItemTag firstLoadedItemPos = {-1, -1}; + __pListModel->GetLastLoadedItemIndex(lastLoadedItemPos.groupIndex, lastLoadedItemPos.itemIndex); + __pListModel->GetFirstLoadedItemIndex(firstLoadedItemPos.groupIndex, firstLoadedItemPos.itemIndex); + + do + { + _TableViewItem* pItem = FindItem(firstLoadedItemPos); + + if (pItem == null) + { + continue; + } + + FloatDimension itemSize = pItem->GetSizeF(); + itemSize.width = __pProviderAdaptor->GetListWidth(); + + pItem->SetItemChanged(true); + pItem->SetSize(itemSize); + + if ((firstLoadedItemPos.itemIndex == lastLoadedItemPos.itemIndex) && (firstLoadedItemPos.groupIndex == lastLoadedItemPos.groupIndex)) + { + break; + } + } while (GetNextItemPosition(firstLoadedItemPos, firstLoadedItemPos)); +} + +result +_TableViewPresenter::OpenContextItem(int groupIndex, int itemIndex) +{ + 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, "[%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(); + + __sweptItemTag.groupIndex = groupIndex; + __sweptItemTag.itemIndex = itemIndex; + __sweptItemPosition = pItem->GetPositionF(); + + pItem->AdjustContextItemBounds(); + __sweepOccured = true; + + _VisualElement* pVisualElement = __pTableView->GetVisualElement(); + + if (pVisualElement != null) + { + float itemWidth = __pTableView->GetBoundsF().width; + float sweepMargin = 0.0f; + GET_SHAPE_CONFIG(TABLEVIEW::CONTEXTITEM_RIGHT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, sweepMargin); + + String animationName(L"SWEEP_ITEM_ANIMATION"); + float startValue = __sweptItemPosition.x; + float endValue = itemWidth - sweepMargin; + + pVisualElement->SetImplicitAnimationEnabled(false); + + VisualElementValueAnimation* pAnimation = __pTableView->GetVisualElementValueAnimation(animationName); + pAnimation->SetStartValue(Variant(startValue)); + pAnimation->SetEndValue(Variant(endValue)); + pAnimation->SetDuration(SWEEP_ITEM_ANIMATION_DURATION); + pVisualElement->AddAnimation(animationName, *pAnimation); + } + + return E_SUCCESS; +} + +result +_TableViewPresenter::CloseContextItem(int groupIndex, int itemIndex) +{ + 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, "[%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(); + + return E_SUCCESS; +} + +bool +_TableViewPresenter::IsContextItemOpened(int groupIndex, int itemIndex) const +{ + 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) + { + return false; + } + + if (__sweptItemTag.groupIndex == groupIndex && __sweptItemTag.itemIndex == itemIndex) + { + return true; + } + + return false; +} + +result +_TableViewPresenter::SetSectionHeaderTextHorizontalAlignment(int sectionIndex, HorizontalAlignment alignment) +{ + 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; + + __sectionAlignmentList.GetAt(sectionIndex, newAlignment); + newAlignment.headerHorizontalAlignment = alignment; + __sectionAlignmentList.SetAt(newAlignment, sectionIndex); + + TableViewItemTag itemTag = {sectionIndex, -1}; + _TableViewItem* pItem = FindItem(itemTag); + + if (pItem != null) + { + pItem->SetSectionHeaderFooterAlignment(alignment); + } + + return E_SUCCESS; +} + +HorizontalAlignment +_TableViewPresenter::GetSectionHeaderTextHorizontalAlignment(int sectionIndex) const +{ + 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); + + return alignment.headerHorizontalAlignment; +} + +result +_TableViewPresenter::SetSectionFooterTextHorizontalAlignment(int sectionIndex, HorizontalAlignment alignment) +{ + 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; + + __sectionAlignmentList.GetAt(sectionIndex, newAlignment); + newAlignment.footerHorizontalAlignment= alignment; + __sectionAlignmentList.SetAt(newAlignment, sectionIndex); + + TableViewItemTag itemTag = {sectionIndex, GetItemCountAt(sectionIndex) - 1}; + _TableViewItem* pItem = FindItem(itemTag); + + if (pItem != null) + { + pItem->SetSectionHeaderFooterAlignment(alignment); + } + + return E_SUCCESS; +} + +HorizontalAlignment +_TableViewPresenter::GetSectionFooterTextHorizontalAlignment(int sectionIndex) const +{ + 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); + + return alignment.footerHorizontalAlignment; +} + +bool +_TableViewPresenter::IsValidDrawnItem(int groupIndex, int itemIndex) +{ + TableViewItemTag currentItemTag = {groupIndex, itemIndex}; + TableViewItemTag itemTag = {-1, -1}; + + if (GetNextItemPosition(currentItemTag, itemTag)) + { + if (__pListModel->IsLoadedItem(itemTag.groupIndex, itemTag.itemIndex)) + { + return true; + } + } + + if (GetPreviousItemPosition(currentItemTag, itemTag)) + { + if (__pListModel->IsLoadedItem(itemTag.groupIndex, itemTag.itemIndex)) + { + return true; + } + } + + return false; +} + +void +_TableViewPresenter::StopAllItemAnimation(void) +{ + TableViewItemTag currentItemTag = {-1, -1}; + TableViewItemTag lastItemTag = {-1, -1}; + + __pListModel->GetFirstLoadedItemIndex(currentItemTag.groupIndex, currentItemTag.itemIndex); + __pListModel->GetLastLoadedItemIndex(lastItemTag.groupIndex, lastItemTag.itemIndex); + + do + { + _TableViewItem* pItem = FindItem(currentItemTag); + if (pItem != null) + { + pItem->StopAllAnimation(); + } + + if (currentItemTag.groupIndex == lastItemTag.groupIndex && currentItemTag.itemIndex == lastItemTag.itemIndex) + { + break; + } + + }while (GetNextItemPosition(currentItemTag, currentItemTag)); +} + +bool +_TableViewPresenter::GetTableViewItemPosition(_TableViewItem& item, TableViewItemTag& itemTag) +{ + TableViewItemTag lastLoadedItemPos = {-1, -1}; + TableViewItemTag firstLoadedItemPos = {-1, -1}; + __pListModel->GetLastLoadedItemIndex(lastLoadedItemPos.groupIndex, lastLoadedItemPos.itemIndex); + __pListModel->GetFirstLoadedItemIndex(firstLoadedItemPos.groupIndex, firstLoadedItemPos.itemIndex); + + _TableViewItem* pCurrentItem = null; + do + { + pCurrentItem = static_cast<_TableViewItem*>(__pListModel->LoadItem(firstLoadedItemPos.groupIndex, firstLoadedItemPos.itemIndex)); + if (pCurrentItem == &item) + { + itemTag.groupIndex = firstLoadedItemPos.groupIndex; + itemTag.itemIndex = firstLoadedItemPos.itemIndex; + return true; + } + + if ((firstLoadedItemPos.itemIndex == lastLoadedItemPos.itemIndex) && (firstLoadedItemPos.groupIndex == lastLoadedItemPos.groupIndex)) + { + break; + } + } while (GetNextItemPosition(firstLoadedItemPos, firstLoadedItemPos)); + + return false; +} + +float +_TableViewPresenter::GetItemHeight(TableViewItemTag itemTag) const +{ + float itemHeight = 0.0f; + + if (__pTableView->GetTableViewStyle() == TABLE_VIEW_STYLE_SECTION && itemTag.itemIndex != -1) + { + if (HasSectionFooter(itemTag.groupIndex)) + { + if (itemTag.itemIndex == GetItemCountAt(itemTag.groupIndex) - 1) + { + GET_SHAPE_CONFIG(TABLEVIEW::GROUPITEM_DEFAULT_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, itemHeight); + return itemHeight; + } + } + } + + if (__pProviderAdaptor == null) + { + return -1; + } + + int startIndex = 0; + for (int i = 0; i < itemTag.groupIndex; i++) + { + int itemCount = GetItemCountAt(i); + + startIndex = startIndex + itemCount + 1; + } + + itemTag.itemIndex++; + itemTag.itemIndex = startIndex + itemTag.itemIndex; + + _TableViewItemHeight itemHeightListEntry; + __itemHeightList.GetAt(itemTag.itemIndex, itemHeightListEntry); + + 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++) + { + int itemCount = GetItemCountAt(i); + + startIndex = startIndex + itemCount + 1; + } + + itemTag.itemIndex++; + itemTag.itemIndex = startIndex + itemTag.itemIndex; + + __itemHeightList.GetAt(itemTag.itemIndex, oldHeightEntry); + + itemHeightListEntry.isFooterItem = oldHeightEntry.isFooterItem; + + __itemHeightList.SetAt(itemHeightListEntry, itemTag.itemIndex); + + return oldHeightEntry.itemHeight; +} + +result +_TableViewPresenter::SetReorderMode(bool enabled) +{ + ResetSweepItem(); + + __reorderInfo.itemIndex = -1; + __reorderInfo.groupIndex = -1; + + _TableViewItem* pItem = null; + TableViewItemTag itemPos = {-1, -1}; + TableViewItemTag lastItemPos = {-1, -1}; + + __pListModel->GetFirstLoadedItemIndex(itemPos.groupIndex, itemPos.itemIndex); + __pListModel->GetLastLoadedItemIndex(lastItemPos.groupIndex, lastItemPos.itemIndex); + + do + { + pItem = FindItem(itemPos); + + if (pItem != null) + { + if(pItem->IsReorderMode() == enabled) + { + break; + } + + pItem->SetReorderMode(enabled); + + if (enabled && itemPos.itemIndex != -1) + { + if (pItem->GetDrawingStatus() == TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED) + { + if (SelectReorderItem(itemPos.groupIndex, itemPos.itemIndex, true)) + { + FloatPoint itemPosition = pItem->GetPositionF(); + FloatPoint touchPosition = pItem->GetLastTouchPressedPositionF(); + + __reorderInfo.touchPressedPositionY = itemPosition.y + touchPosition.y - GetScrollPosition(); + __reorderInfo.blockedTouchReleaseState = true; + } + } + } + } + + if ((itemPos.itemIndex == lastItemPos.itemIndex) && (itemPos.groupIndex == lastItemPos.groupIndex)) + { + break; + } + + } while (GetNextItemPosition(itemPos, itemPos) == true); + + return E_SUCCESS; +} + +bool +_TableViewPresenter::SelectReorderItem(int groupIndex, int itemIndex, bool directSelection) +{ + if (itemIndex == -1 || (!directSelection && GetPressedItemCount() > 0)) + { + return false; + } + + TableViewItemTag itemPos = {groupIndex, itemIndex}; + _TableViewItem* pItem = FindItem(itemPos); + + if (pItem == null) + { + return false; + } + + pItem->SetDrawingStatus(TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED); + pItem->SetItemChanged(true); + pItem->Invalidate(); + + __reorderInfo.blockedScroll = false; + __reorderInfo.itemBounds = pItem->GetBoundsF(); + __reorderInfo.itemIndex = itemIndex; + __reorderInfo.groupIndex = groupIndex; + __reorderInfo.originGroupIndex = groupIndex; + __reorderInfo.originItemIndex = itemIndex; + __reorderInfo.itemBasisPositionY = __reorderInfo.itemBounds.y; + + Tizen::System::SystemTime::GetTicks(__reorderInfo.touchPressedTick); + + pItem->GetVisualElement()->SetZOrder(null, true); + + if (GetScrollAreaBounds().height < __pTableView->GetBoundsF().height) + { + float itemHeight = pItem->GetBoundsF().height; + + __pListModel->GetLastLoadedItemIndex(itemPos.groupIndex, itemPos.itemIndex); + + pItem = FindItem(itemPos); + + if (pItem != null) + { + FloatRectangle itemBounds = pItem->GetBoundsF(); + __reorderInfo.nonScrollableLimitArea = itemBounds.y + itemBounds.height - itemHeight; + } + } + else + { + __reorderInfo.nonScrollableLimitArea = 0; + } + + return true; +} + +bool +_TableViewPresenter::ResetReorderItem(int groupIndex, int itemIndex) +{ + TableViewItemTag itemPos = {groupIndex, itemIndex}; + _TableViewItem* pItem = FindItem(itemPos); + + if (pItem == null) + { + return false; + } + + pItem->SetDrawingStatus(TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL); + pItem->SetItemChanged(true); + pItem->Invalidate(); + + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_LIST_REORDER, pItem); + + FloatPoint position = FloatPoint(__reorderInfo.itemBounds.x, __reorderInfo.itemBounds.y); + pItem->SetPosition(position); + + if (__reorderInfo.originGroupIndex != __reorderInfo.groupIndex || __reorderInfo.originItemIndex != __reorderInfo.itemIndex) + { + if (__pTableView->GetTableViewStyle() == TABLE_VIEW_STYLE_SIMPLE) + { + __pTableView->FireTableViewItemReorderEvent(__reorderInfo.originItemIndex, __reorderInfo.itemIndex); + } + else if (__pTableView->GetTableViewStyle() == TABLE_VIEW_STYLE_GROUPED) + { + __pTableView->FireTableViewItemReorderEvent(__reorderInfo.originGroupIndex, __reorderInfo.originItemIndex, __reorderInfo.groupIndex, __reorderInfo.itemIndex); + } + } + + __reorderInfo.groupIndex = -1; + __reorderInfo.itemIndex = -1; + __reorderInfo.originGroupIndex = -1; + __reorderInfo.originItemIndex = -1; + __reorderInfo.nonScrollableLimitArea = 0; + + StopReorderScrollTimer(); + + return true; +} + +bool +_TableViewPresenter::CheckReorderItemScrollAnimation(_TableViewItem *pItem) +{ + float currentScrollPosition = GetScrollPosition(); + float limitTopPositionY = currentScrollPosition; + float limitBottomPositionY = currentScrollPosition + __pTableView->GetBoundsF().height - __reorderInfo.itemBounds.height; + + float itemPositionY = pItem->GetPositionF().y; + + if (itemPositionY < limitTopPositionY) + { + if (__pReorderScrollTimer == null) + { + __reorderInfo.isScrollDirectionUp = true; + + return true; + } + } + else if (itemPositionY > limitBottomPositionY) + { + if (__pReorderScrollTimer == null) + { + __reorderInfo.isScrollDirectionUp = false; + + return true; + } + } + + return false; +} + +bool +_TableViewPresenter::DragSelectedItem(float distance, bool relativeCoordinate) +{ + TableViewItemTag itemPos = {__reorderInfo.groupIndex, __reorderInfo.itemIndex}; + _TableViewItem* pItem = FindItem(itemPos); + + if (pItem == null) + { + return false; + } + + if (__firstTouchMoved) + { + long long currentTick = 0; + Tizen::System::SystemTime::GetTicks(currentTick); + + if (currentTick - __reorderInfo.touchPressedTick < REORDER_TOUCH_UIACTIVATE_DURATION) + { + return false; + } + + __firstTouchMoved = false; + } + + FloatPoint itemPosition = pItem->GetPositionF(); + + if (relativeCoordinate) + { + itemPosition.y = __reorderInfo.itemBasisPositionY + distance; + } + else + { + itemPosition.y += distance; + + __reorderInfo.itemBasisPositionY += distance; + } + + if (itemPosition.y < 0) + { + __reorderInfo.itemBasisPositionY += (0 - itemPosition.y); + itemPosition.y = 0; + } + + float scrollAreaHeight = GetScrollAreaBounds().height; + float screenHeight = __pTableView->GetBoundsF().height; + float limitBottomPositionY = 0.0f; + + if (scrollAreaHeight < screenHeight) + { + limitBottomPositionY = __reorderInfo.nonScrollableLimitArea; + } + else + { + limitBottomPositionY = scrollAreaHeight - __reorderInfo.itemBounds.height; + } + + if (itemPosition.y > limitBottomPositionY) + { + __reorderInfo.itemBasisPositionY -= (itemPosition.y - limitBottomPositionY); + itemPosition.y = limitBottomPositionY; + } + + pItem->SetPosition(itemPosition); + + // check scroll + if (CheckReorderItemScrollAnimation(pItem)) + { + if (__pReorderScrollTimer == null) + { + StartReorderScrollTimer(); + } + } + else + { + if (__pReorderScrollTimer != null) + { + StopReorderScrollTimer(); + } + } + + // check swap + TableViewItemTag moveItemTag = {-1, -1}; + + if (CheckReorderItemPosition(pItem, moveItemTag)) + { + if (moveItemTag.itemIndex == -1) + { + int destGroupIndex = moveItemTag.groupIndex; + + if (destGroupIndex != 0 && destGroupIndex == __reorderInfo.groupIndex) + { + destGroupIndex--; + } + + if (moveItemTag.groupIndex == 0 || !__pProviderAdaptor->IsReorderable(__reorderInfo.groupIndex, destGroupIndex)) + { + __reorderInfo.blockedScroll = true; + + return false; + } + } + + ReorderItem(moveItemTag.groupIndex, moveItemTag.itemIndex); + } + + return true; +} + +bool +_TableViewPresenter::CheckReorderItemPosition(_TableViewItem* pItem, TableViewItemTag& reorderItemTag) +{ + TableViewItemTag currentItemTag = {__reorderInfo.groupIndex, __reorderInfo.itemIndex}; + TableViewItemTag previousItemTag = {-1, -1}; + TableViewItemTag nextItemTag = {-1, -1}; + + FloatRectangle itemBounds = pItem->GetBoundsF(); + + if (GetPreviousItemPosition(currentItemTag, previousItemTag)) + { + _TableViewItem* pPreviousItem = LoadItem(previousItemTag.groupIndex, previousItemTag.itemIndex); + + if (pPreviousItem != null) + { + FloatRectangle previousItemBounds = pPreviousItem->GetBoundsF(); + + if (itemBounds.y < previousItemBounds.y + (previousItemBounds.height / 2)) + { + //return previousItemIndex; + reorderItemTag.groupIndex = previousItemTag.groupIndex; + reorderItemTag.itemIndex = previousItemTag.itemIndex; + + return true; + } + } + } + + if (GetNextItemPosition(currentItemTag, nextItemTag)) + { + _TableViewItem* pNextItem = LoadItem(nextItemTag.groupIndex, nextItemTag.itemIndex); + + if (pNextItem != null) + { + FloatRectangle nextItemBounds = pNextItem->GetBoundsF(); + + if (itemBounds.y + itemBounds.height > nextItemBounds.y + (nextItemBounds.height / 2)) + { + //return nextItemIndex; + reorderItemTag.groupIndex = nextItemTag.groupIndex; + reorderItemTag.itemIndex = nextItemTag.itemIndex; + + return true; + } + } + } + + reorderItemTag.groupIndex = -1; + reorderItemTag.itemIndex = -1; + + return false; +} + +bool +_TableViewPresenter::ReorderItem(int destinationGroupIndex, int destinationItemIndex) +{ + TableViewItemTag itemPos = {destinationGroupIndex, destinationItemIndex}; + + _TableViewItem* pItem = FindItem(itemPos); + + if (pItem == null) + { + return false; + } + + if (pItem->IsAnimationPlaying()) + { + return false; + } + + FloatRectangle destinationItemBounds = pItem->GetBoundsF(); + + FloatPoint destinationItemPosition = FloatPoint(destinationItemBounds.x, 0.0f); + + if (__reorderInfo.itemIndex > destinationItemIndex && __reorderInfo.groupIndex == destinationGroupIndex) + { + destinationItemPosition.y = __reorderInfo.itemBounds.y + __reorderInfo.itemBounds.height - destinationItemBounds.height; + __reorderInfo.itemBounds.y = destinationItemBounds.y; + + if (destinationItemIndex == -1) + { + destinationGroupIndex--; + int itemCount = GetItemCountAt(destinationGroupIndex); + destinationItemIndex = itemCount; + } + } + else + { + destinationItemPosition.y = __reorderInfo.itemBounds.y; + __reorderInfo.itemBounds.y = destinationItemBounds.y + destinationItemBounds.height - __reorderInfo.itemBounds.height; + + if (destinationItemIndex == -1) + { + destinationItemIndex = 0; + } + } + + __pListModel->MoveItem(__reorderInfo.groupIndex, __reorderInfo.itemIndex, destinationGroupIndex, destinationItemIndex); + + if (!pItem->MoveItem(destinationItemPosition, REORDER_ITEM_MOVE_ANIMATION_DURATION, 0)) + { + pItem->SetPosition(destinationItemPosition); + } + + __reorderInfo.itemIndex = destinationItemIndex; + __reorderInfo.groupIndex = destinationGroupIndex; + + return true; +} + +void +_TableViewPresenter::StartReorderScrollTimer(void) +{ + StopReorderScrollTimer(); + + __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)); + + r = __pReorderScrollTimer->Start(REORDER_SCROLL_ANIMATION_TIMER_DURATION); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return; + +CATCH: + StopReorderScrollTimer(); +} + +void +_TableViewPresenter::StopReorderScrollTimer(void) +{ + delete __pReorderScrollTimer; + __pReorderScrollTimer = null; + +} + +void +_TableViewPresenter::UpdateLayout(void) +{ + // nothing +} + +bool +_TableViewPresenter::CheckItemHeightAndRefreshLayout(TableViewItemTag itemTag, bool downScroll) +{ + _TableViewItem* pItem = FindItem(itemTag); + + if (pItem == null) + { + return false; + } + + if (pItem->IsAnimationPlaying()) + { + return false; + } + + FloatRectangle itemBounds = pItem->GetBoundsF(); + + if (_FloatCompare(GetItemHeight(itemTag), itemBounds.height)) + { + return false; + } + + float newHeight = itemBounds.height; + float originHeight = SetItemHeight(itemTag, newHeight); + float dist = newHeight - originHeight; + + AdjustClientAreaBounds(false, dist); + + if (!downScroll) + { + itemBounds.y += dist; + pItem->SetBounds(itemBounds); + } + + AttachNextItemsToBottom(itemTag); + + return true; +} + +bool +_TableViewPresenter::CreateItemHeightList(float defaultGroupItemHeight, float defaultItemHeight) +{ + 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) + { + itemHeightEntry.itemIndex = -1; + itemHeightEntry.itemHeight = 0.0f; + itemHeightEntry.isFooterItem = false; + __itemHeightList.Add(itemHeightEntry); + } + else + { + itemHeightEntry.itemIndex = -1; + itemHeightEntry.itemHeight = defaultGroupItemHeight; + itemHeightEntry.isFooterItem = false; + __itemHeightList.Add(itemHeightEntry); + } + + for (int j = 0; j < itemCount; j++) + { + itemHeightEntry.itemIndex = j; + itemHeightEntry.itemHeight = defaultItemHeight; + itemHeightEntry.isFooterItem = false; + if (HasSectionFooter(i) && j == (itemCount - 1)) + { + itemHeightEntry.isFooterItem = true; + } + __itemHeightList.Add(itemHeightEntry); + } + } + + return true; + +CATCH: + DeleteItemHeightList(); + + 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) +{ + __itemHeightList.RemoveAll(); +} + +bool +_TableViewPresenter::RefreshItemHeightList(int groupIndex, int itemIndex, TableViewRefreshType refreshType) +{ + float defaultItemHeight = __pProviderAdaptor->GetDefaultItemHeight(); + float defaultGroupItemHeight = __pProviderAdaptor->GetDefaultGroupItemHeight(); + + _TableViewItemHeight itemHeightEntry; + int startIndex = 0; + + for (int i = 0; i < groupIndex; i++) + { + int itemCount = GetItemCountAt(i); + startIndex = startIndex + itemCount + 1; + } + + int targetIndex = startIndex + itemIndex + 1; + + if (refreshType == TABLE_VIEW_REFRESH_TYPE_ITEM_ADD) + { + if (itemIndex == -1) + { + result r = __itemHeightList.SetCapacity(GetItemCount()); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, r, "[%s] Propagating.", GetErrorMessage(r)); + + int itemCount = GetItemCountAt(groupIndex); + for (int i = 0; i < itemCount; i++) + { + 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); + } + + 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 + { + 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) + { + if (itemIndex == -1) + { + int itemCount = GetItemCountAt(groupIndex) + 1; + + for (int i = 0; i < itemCount; i++) + { + __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); + } + } + } + + return true; +} + +bool +_TableViewPresenter::CreateSectionAlignmentList(void) +{ + if (__pTableView->GetTableViewStyle() != TABLE_VIEW_STYLE_SECTION) + { + return false; + } + + int groupCount = GetGroupCount(); + + result r = __sectionAlignmentList.SetCapacity(GetGroupCount()); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, r, "[%s] Propagating.", GetErrorMessage(r)); + + _TableViewSectionStringAlignment alignment; + alignment.headerHorizontalAlignment = ALIGNMENT_LEFT; + alignment.footerHorizontalAlignment = ALIGNMENT_RIGHT; + + for (int i = 0; i < groupCount; i++) + { + __sectionAlignmentList.Add(alignment); + } + + return true; +} + +void +_TableViewPresenter::DeleteSectionAlignmentList(void) +{ + __sectionAlignmentList.RemoveAll(); +} + +bool +_TableViewPresenter::RefreshSectionAlignmentList(int groupIndex, TableViewRefreshType refreshType) +{ + if (__pTableView->GetTableViewStyle() != TABLE_VIEW_STYLE_SECTION) + { + return false; + } + + if (refreshType == TABLE_VIEW_REFRESH_TYPE_ITEM_ADD) + { + _TableViewSectionStringAlignment alignment; + alignment.headerHorizontalAlignment = ALIGNMENT_LEFT; + alignment.footerHorizontalAlignment = ALIGNMENT_RIGHT; + + __sectionAlignmentList.InsertAt(alignment, groupIndex); + } + else if (refreshType == TABLE_VIEW_REFRESH_TYPE_ITEM_REMOVE) + { + __sectionAlignmentList.RemoveAt(groupIndex); + } + + return true; +} + +void +_TableViewPresenter::CaptureAndStartRemoveItemAnimation(int groupIndex, int itemIndex) +{ + TableViewItemTag itemTag = {groupIndex, itemIndex}; + _TableViewItem* pItem = FindItem(itemTag); + + if (pItem == null) + { + return; + } + + FloatRectangle itemBounds = pItem->GetBoundsF(); + result r = E_SUCCESS; + + _VisualElement* pVisualElement = null; + String animationName(L"REMOVE_ITEM_ANIMATION"); + Canvas* pCanvas = null; + VisualElementValueAnimation* pAnimation = __pTableView->GetVisualElementValueAnimation(animationName); + + FloatDimension startValue(100.0f, itemBounds.height); + FloatDimension endValue(0.0f, 0.0f); + + Tizen::Graphics::Bitmap* pBitmap = pItem->GetCapturedBitmapN(true); + + if (pBitmap == null) + { + return; + } + + pCanvas = null; + pVisualElement = new (std::nothrow) _VisualElement(); + 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)); + + pVisualElement->SetImplicitAnimationEnabled(false); + pVisualElement->SetSurfaceOpaque(false); + pVisualElement->SetBounds(FloatRectangle(itemBounds.x, itemBounds.y, itemBounds.width, itemBounds.height)); + pVisualElement->SetShowState(true); + + pCanvas = pVisualElement->GetCanvasN(); + 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); + + pAnimation->SetDelay(0); + pAnimation->SetStartValue(Variant(startValue)); + pAnimation->SetEndValue(Variant(endValue)); + pAnimation->SetDuration(REMOVE_ITEM_MOVE_ANIMATION_DURATION); + + r = pVisualElement->AddAnimation(animationName, *pAnimation); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + delete pAnimation; + delete pCanvas; + delete pBitmap; + + return; + +CATCH: + delete pCanvas; + delete pBitmap; + pVisualElement->Destroy(); +} + +void +_TableViewPresenter::PresetItemHeightList(void) +{ + int groupCount = GetGroupCount(); + float defaultGroupItemHeight = __pProviderAdaptor->GetDefaultGroupItemHeight(); + float defaultItemHeight = __pProviderAdaptor->GetDefaultItemHeight(); + + for (int i = 0; i < groupCount; i++) + { + TableViewItemTag itemTag = {i, -1}; + int itemCount = GetItemCountAt(i); + + if (_FloatCompare(GetItemHeight(itemTag), TABLEVIEW_DEFAULT_ITEM_HEIGHT_VALUE)) + { + SetItemHeight(itemTag, defaultGroupItemHeight); + } + + for (int j = 0; j < itemCount; j++) + { + itemTag.itemIndex = j; + + if (_FloatCompare(GetItemHeight(itemTag), TABLEVIEW_DEFAULT_ITEM_HEIGHT_VALUE)) + { + SetItemHeight(itemTag, defaultItemHeight); + } + } + } +} + +_TableViewItem* +_TableViewPresenter::GetTableViewItemFromControl(const _Control& source) +{ + _Control* currentControl = const_cast<_Control*>(&source); + _TableViewItem* pItem = null; + + while (__pTableView != currentControl) + { + pItem = dynamic_cast<_TableViewItem*>(currentControl); + + if ((pItem != null) || (currentControl == null)) + { + break; + } + + currentControl = currentControl->GetParent(); + } + + return pItem; +} + +void +_TableViewPresenter::ShowTableViewCapturedItem(int groupIndex, int itemIndex, float height) +{ + TableViewItemTag itemTag = {groupIndex, itemIndex}; + _TableViewItem* pItem = FindItem(itemTag); + + if ((pItem == null) || _FloatCompare(height, 0.0f)) + { + return; + } + + result r = E_SUCCESS; + Canvas* pCanvas = null; + FloatRectangle itemBounds = pItem->GetBoundsF(); + + bool visibleState = pItem->GetVisibleState(); + pItem->SetVisibleState(true); + Bitmap* pBitmap = pItem->GetCapturedBitmapN(true); + pItem->SetVisibleState(visibleState); + + if (pBitmap == null) + { + return; + } + + if (__pCapturedItemVisualElement == null) + { + __pCapturedItemVisualElement = new (std::nothrow) _VisualElement(); + 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)); + + r = GetView()->GetVisualElement()->AttachChild(*__pCapturedItemVisualElement); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to attach child to the control VisualElement.", GetErrorMessage(r)); + + __pCapturedItemVisualElement->SetSurfaceOpaque(false); + __pCapturedItemVisualElement->SetImplicitAnimationEnabled(false); + } + + __pCapturedItemVisualElement->SetShowState(true); + __pCapturedItemVisualElement->SetBounds(FloatRectangle(itemBounds.x, itemBounds.y, itemBounds.width, height)); + + pCanvas = __pCapturedItemVisualElement->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(); + pCanvas->DrawBitmap(FloatPoint(0.0f, 0.0f), *pBitmap); + + delete pCanvas; + delete pBitmap; + + return; + +CATCH: + delete pBitmap; + + __pCapturedItemVisualElement->Destroy(); +} + +void +_TableViewPresenter::SetLoadedItemsVisibleFromPosition(float position, bool visible) +{ + _TableViewItem* pItem; + FloatRectangle itemBounds; + TableViewItemTag current; + current.groupIndex = __expandableItemTag.groupIndex; + current.itemIndex = __expandableItemTag.itemIndex; + + int itemCountInGroup = __pListModel->GetItemCountInGroup(__expandableItemTag.groupIndex); + + for (int i = 0; i < itemCountInGroup; i++) + { + current.itemIndex = i; + + if (visible) + { + pItem = LoadItem(current.groupIndex, current.itemIndex); + if (pItem == null) + { + break; + } + } + else + { + pItem = FindItem(current); + if (pItem == null) + { + continue; + } + } + + itemBounds = pItem->GetBoundsF(); + + if (visible) + { + if ((position >= itemBounds.y) && (position < itemBounds.y + itemBounds.height)) + { + ShowTableViewCapturedItem(current.groupIndex, current.itemIndex, position - itemBounds.y); + pItem->SetVisibleState(false); + break; + } + else + { + pItem->SetVisibleState(true); + } + } + else + { + if (position < itemBounds.y) + { + UnloadItem(current); + } + else if ((position >= itemBounds.y) && (position < itemBounds.y + itemBounds.height)) + { + pItem->SetVisibleState(false); + ShowTableViewCapturedItem(current.groupIndex, current.itemIndex, position - itemBounds.y); + } + else + { + pItem->SetVisibleState(true); + } + } + } +} + +void +_TableViewPresenter::MoveLoadedItemsFromPosition(float position) +{ + FloatRectangle itemBounds; + float itemPosition = position; + + TableViewItemTag current; + TableViewItemTag next; + + current.groupIndex = __expandableItemTag.groupIndex; + current.itemIndex = __pListModel->GetItemCountInGroup(__expandableItemTag.groupIndex) -1; + + float screenPosition = GetScrollPosition(); + FloatRectangle screenBounds = __pTableView->GetBoundsF(); + screenPosition += screenBounds.height; + + _TableViewItem* pItem = null; + while (GetNextItemPosition(current, next)) + { + if (screenPosition > itemPosition) + { + pItem = LoadItem(next.groupIndex, next.itemIndex); + } + else + { + pItem = FindItem(next); + } + + if (pItem == null) + { + break; + } + + itemBounds = pItem->GetBoundsF(); + itemBounds.y = itemPosition; + pItem->SetBounds(itemBounds); + itemPosition += itemBounds.height; + + current = next; + } +} + +void +_TableViewPresenter::ExpandGroupAnimationFinished(bool completedNormally) +{ + if (completedNormally == false) + { + TableViewItemTag current; + TableViewItemTag next; + + current.groupIndex = __expandableItemTag.groupIndex; + current.itemIndex = -1; + + _TableViewItem* pNextItem = null; + _TableViewItem* pCurrentItem = null; + pCurrentItem = LoadItem(current.groupIndex, current.itemIndex); + + if (pCurrentItem == null) + { + return; + } + + FloatRectangle itemBounds; + FloatRectangle screenBounds = __pTableView->GetBoundsF(); + float screenPosition = GetScrollPosition() + screenBounds.height; + float nextItemPositionY = pCurrentItem->GetBoundsF().y + pCurrentItem->GetBoundsF().height; + + while (GetNextItemPosition(current, next)) + { + if (screenPosition >= nextItemPositionY) + { + pCurrentItem = LoadItem(current.groupIndex, current.itemIndex); + if (pCurrentItem == null) + { + break; + } + pNextItem = LoadItem(next.groupIndex, next.itemIndex); + if (pNextItem == null) + { + break; + } + pNextItem->SetVisibleState(true); + itemBounds = pNextItem->GetBoundsF(); + itemBounds.y = pCurrentItem->GetBoundsF().y + pCurrentItem->GetBoundsF().height; + pNextItem->SetBounds(itemBounds); + nextItemPositionY = itemBounds.y + itemBounds.height; + } + else + { + UnloadItem(next.groupIndex, next.itemIndex); + } + + current = next; + } + } + else + { + int currentGroupIndex = -1; + int currentItemIndex = -1; + GetBottomDrawnItemIndex(currentGroupIndex, currentItemIndex); + + int lastLoadedGroupIndex = -1; + int lastLoadedItemIndex = -1; + __pListModel->GetLastLoadedItemIndex(lastLoadedGroupIndex, lastLoadedItemIndex); + + TableViewItemTag current; + current.groupIndex = currentGroupIndex; + current.itemIndex = currentItemIndex; + + _TableViewItem* pCurrentItem; + pCurrentItem = FindItem(current); + if (pCurrentItem != null) + { + pCurrentItem->SetVisibleState(true); + } + + for (int j = currentGroupIndex; j <= lastLoadedGroupIndex; j++) + { + int itemCount = GetItemCountAt(j); + + for (int i = -1; i < itemCount; i++) + { + if (i <= currentItemIndex && j == currentGroupIndex) + { + continue; + } + + UnloadItem(j, i); + } + } + } +} + +void +_TableViewPresenter::CollapseGroupAnimationFinished(bool completedNormally) +{ + _TableViewItem* pItem = null; + TableViewItemTag itemTag = {-1, -1}; + float groupTotalHeight = 0; + int itemCountInGroup = __pListModel->GetItemCountInGroup(__expandableItemTag.groupIndex); + for (int i = 0; i < itemCountInGroup; i++) + { + pItem = static_cast<_TableViewItem*>(__pListModel->GetItemFromTemporaryBuffer(__expandableItemTag.groupIndex, i)); + groupTotalHeight += pItem->GetItemHeight(); + itemTag.groupIndex = __expandableItemTag.groupIndex; + itemTag.itemIndex = i; + SetItemHeight(itemTag, pItem->GetItemHeight()); + } + + if (completedNormally == false) + { + TableViewItemTag current; + TableViewItemTag next; + + current.groupIndex = __expandableItemTag.groupIndex; + current.itemIndex = -1; + + for (int i = 0; i < itemCountInGroup; i++) + { + UnloadItem(__expandableItemTag.groupIndex, i); + } + + _TableViewItem* pCurrentItem = LoadItem(current.groupIndex, current.itemIndex); + FloatRectangle itemBounds = pCurrentItem->GetBoundsF(); + itemBounds.y = CalculateItemPositionY(current.groupIndex, current.itemIndex); + pCurrentItem->SetBounds(itemBounds); + + float nextItemPositionY = pCurrentItem->GetBoundsF().y + pCurrentItem->GetBoundsF().height; + + FloatRectangle screenBounds = __pTableView->GetBoundsF(); + float screenPosition = GetScrollPosition() + screenBounds.height; + + while (GetNextItemPosition(current, next)) + { + current = next; + if (screenPosition >= nextItemPositionY) + { + pCurrentItem = LoadItem(current.groupIndex, current.itemIndex); + if (pCurrentItem == null) + { + break; + } + + pCurrentItem->SetVisibleState(true); + itemBounds = pCurrentItem->GetBoundsF(); + itemBounds.y = nextItemPositionY; + pCurrentItem->SetBounds(itemBounds); + nextItemPositionY = pCurrentItem->GetBoundsF().y + pCurrentItem->GetBoundsF().height; + } + else + { + UnloadItem(current.groupIndex, current.itemIndex); + } + } + + int currentGroupIndex = -1; + int currentItemIndex = -1; + GetTopDrawnItemIndex(currentGroupIndex, currentItemIndex); + if (__expandableItemTag.groupIndex < currentGroupIndex) + { + SetScrollPosition(GetScrollPosition() - groupTotalHeight, false); + } + } + else + { + int currentGroupIndex = -1; + int currentItemIndex = -1; + GetTopDrawnItemIndex(currentGroupIndex, currentItemIndex); + + int firstLoadedGroupIndex = -1; + int firstLoadedItemIndex = -1; + __pListModel->GetFirstLoadedItemIndex(firstLoadedGroupIndex, firstLoadedItemIndex); + + for (int j = firstLoadedGroupIndex; j <= currentGroupIndex; j++) + { + int itemCount = GetItemCountAt(j); + + for (int i = -1; i < itemCount; i++) + { + if (i >= currentItemIndex && j == currentGroupIndex) + { + break; + } + + UnloadItem(j, i); + } + } + + for (int i = 0; i < itemCountInGroup; i++) + { + UnloadItem(__expandableItemTag.groupIndex, i); + } + + GetTopDrawnItemIndex(currentGroupIndex, currentItemIndex); + TableViewItemTag currentItemTag; + currentItemTag.groupIndex = currentGroupIndex; + currentItemTag.itemIndex = currentItemIndex; + + _TableViewItem* pItem = FindItem(currentItemTag); + if (pItem != null) + { + FloatRectangle itemBounds = pItem->GetBoundsF(); + itemBounds.y = CalculateItemPositionY(currentGroupIndex, currentItemIndex); + pItem->SetBounds(itemBounds); + AttachNextItemsToBottom(currentItemTag); + if (__expandableItemTag.groupIndex < currentGroupIndex) + { + SetScrollPosition(itemBounds.y, false); + } + } + } + + AdjustClientAreaBounds(false, -groupTotalHeight); +} + +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") + { + return; + } + + if (keyName == L"SCROLL_PANEL_SCROLLING_ANIMATION") + { + __scrollHeightOnFlickStarted = GetScrollAreaBounds().height; + __scrollPositionOnFlickStarted = GetScrollPosition(); + } + + _ScrollPanelPresenter::OnVisualElementAnimationStarted(animation, keyName, target); +} + +void +_TableViewPresenter::OnVisualElementAnimationRepeated(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, long currentRepeatCount) +{ + if (keyName == L"REMOVE_ITEM_ANIMATION") + { + return; + } + _ScrollPanelPresenter::OnVisualElementAnimationRepeated(animation, keyName, target, currentRepeatCount); +} + +void +_TableViewPresenter::OnVisualElementAnimationFinished(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, bool completedNormally) +{ + if (__isAnimationCallbackBlocked) + { + return; + } + + if (keyName == L"REMOVE_ITEM_ANIMATION") + { + _VisualElement* pVisualElement = GetView()->GetVisualElement(); + + pVisualElement->DetachChild(target); + + target.Destroy(); + return; + } + else if (keyName == L"EXPAND_GROUP_ANIMATION") + { + if (__pCapturedItemVisualElement) + { + __pCapturedItemVisualElement->SetShowState(false); + } + ExpandGroupAnimationFinished(completedNormally); + + if (__scrollToItemTag.startedAnimation) + { + __scrollToItemTag.startedAnimation = false; + ScrollToItem(__scrollToItemTag.groupIndex, __scrollToItemTag.itemIndex, __scrollToItemTag.itemAlignment, __scrollToItemTag.shiftingDistance); + } + RestoreEditCopyPasteManager(); + return; + } + else if (keyName == L"COLLAPSE_GROUP_ANIMATION") + { + if (__pCapturedItemVisualElement) + { + __pCapturedItemVisualElement->SetShowState(false); + } + CollapseGroupAnimationFinished(completedNormally); + + if (__scrollToItemTag.startedAnimation) + { + __scrollToItemTag.startedAnimation = false; + ScrollToItem(__scrollToItemTag.groupIndex, __scrollToItemTag.itemIndex, __scrollToItemTag.itemAlignment, __scrollToItemTag.shiftingDistance); + } + RestoreEditCopyPasteManager(); + return; + } + + _ScrollPanelPresenter::OnVisualElementAnimationFinished(animation, keyName, target, completedNormally); +} + +void +_TableViewPresenter::OnTickOccurred(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, const Tizen::Ui::Variant& currentValue) +{ + _VisualElement* pVisualElement = __pTableView->GetVisualElement(); + + if (&target != pVisualElement) + { + return; + } + + if (keyName == L"REMOVE_ITEM_ANIMATION") + { + Dimension value = currentValue.ToDimension(); + target.SetOpacity(value.width); + + FloatRectangle bounds = target.GetBounds(); + bounds.height = value.height; + target.SetBounds(bounds); + + target.SetFlushNeeded(); + + return; + } + else if (keyName == L"EXPAND_GROUP_ANIMATION") + { + float currentPosition = currentValue.ToFloat(); + SetLoadedItemsVisibleFromPosition(currentPosition, true); + MoveLoadedItemsFromPosition(currentPosition); + + RestoreEditCopyPasteManager(); + return; + } + else if (keyName == L"COLLAPSE_GROUP_ANIMATION") + { + float currentPosition = currentValue.ToFloat(); + SetLoadedItemsVisibleFromPosition(currentPosition, false); + MoveLoadedItemsFromPosition(currentPosition); + + RestoreEditCopyPasteManager(); + return; + } + else if (keyName == L"SWEEP_ITEM_ANIMATION") + { + float currentPosition = currentValue.ToFloat(); + float moveDestance = currentPosition - __sweptItemPosition.x; + SweepItem(moveDestance); + + return; + } + + _ScrollPanelPresenter::OnTickOccurred(animation, keyName, target, currentValue); +} + +bool +_TableViewPresenter::OnAccessibilityItemRefreshed(const _AccessibilityContainer& control, const _AccessibilityElement& element, _AccessibilityFocusDirection direction) +{ + TableViewItemTag itemPos = {-1, -1}; + + if (direction == _ACCESSIBILITY_FOCUS_DIRECTION_NEXT) + { + GetFirstItem(itemPos); + if (GetAccessibilityElementFocusedState() == false && FindItem(itemPos) == null) + { + ScrollToItem(itemPos.groupIndex, itemPos.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_TOP); + + return true; + } + } + else if (direction == _ACCESSIBILITY_FOCUS_DIRECTION_PREVIOUS) + { + GetLastItem(itemPos); + + if (IsGroupExpanded(itemPos.groupIndex) == false) + { + itemPos.itemIndex = -1; + } + + if (GetAccessibilityElementFocusedState() == false && FindItem(itemPos) == null) + { + ScrollToItem(itemPos.groupIndex, itemPos.itemIndex, TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_BOTTOM); + + return true; + } + } + + return false; +} + +bool +_TableViewPresenter::OnOcurredOverflowItems(const int currentCashSize, const int overflowCount) +{ + return IsCachingItemsTotalHeightLessThanViewHeight(); +} + +bool +_TableViewPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) +{ + if (!__pTableView->IsFocusModeStateEnabled() || !__pTableView->IsVisible() || !__pTableView->IsEnabled() || !__pTableView->IsFocusable()) + { + return false; + } + + _KeyCode keyCode = keyInfo.GetKeyCode(); + _Control* pFocusedControl = null; + _Window* pTop = source.GetRootWindow(); + if (pTop) + { + pFocusedControl = pTop->GetCurrentFocusControl(); + if (pFocusedControl) + { + _Control* pFocusTraversalControl = pTop->GetFocusTraversalControl(pFocusedControl); + if (pFocusTraversalControl != __pTableView) + { + return false; + } + } + } + + _TableViewItem* pItem = null; + TableViewItemTag itemPos = {-1, -1}; + + 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); + TableViewItemTag firstItemPos = {-1, -1}; + GetFirstItem(firstItemPos); + if (itemPos.groupIndex == firstItemPos.groupIndex && itemPos.itemIndex == firstItemPos.itemIndex) + { + SetTableViewFocused(false); + return false; + } + + while (GetPreviousItemPosition(itemPos, itemPos)) + { + if (__pTableView->GetTableViewStyle() == TABLE_VIEW_STYLE_SIMPLE) + { + TableViewItemTag firstItemPos = {-1, -1}; + GetFirstItem(firstItemPos); + if (itemPos.groupIndex == firstItemPos.groupIndex && itemPos.itemIndex == firstItemPos.itemIndex) + { + SetTableViewFocused(false); + return false; + } + } + + if (IsGroupExpanded(itemPos.groupIndex) == false) + { + itemPos.itemIndex = -1; + } + + pItem = LoadItem(itemPos.groupIndex, itemPos.itemIndex); + if (pItem == null) + { + SetTableViewFocused(false); + return false; + } + + if (!pItem->GetVisibleState() || !pItem->GetEnableState() + || !pItem->IsFocusable()) + { + TableViewItemTag firstItemPos = {-1, -1}; + GetFirstItem(firstItemPos); + if (itemPos.groupIndex == firstItemPos.groupIndex && itemPos.itemIndex == firstItemPos.itemIndex) + { + SetTableViewFocused(false); + return false; + } + + continue; + } + + 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()) + { + SetItemFocus(pItem, itemPos); + break; + } + } + } + else + { + SetTableViewFocused(false); + return false; + } + } + 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 || __pListModel->IsGroupExpanded(itemPos.groupIndex) == false)) + { + SetTableViewFocused(false); + return false; + } + + while (GetNextItemPosition(itemPos, itemPos)) + { + if (__pTableView->GetTableViewStyle() == TABLE_VIEW_STYLE_SIMPLE && itemPos.itemIndex == -1) + { + itemPos.itemIndex = 0; + } + + pItem = LoadItem(itemPos.groupIndex, itemPos.itemIndex); + if (pItem == null) + { + SetTableViewFocused(false); + return false; + } + + if (!pItem->GetVisibleState() || !pItem->GetEnableState() + || !pItem->IsFocusable()) + { + TableViewItemTag lastItemPos = {-1, -1}; + GetLastItem(lastItemPos); + + if (itemPos.groupIndex == lastItemPos.groupIndex && (itemPos.itemIndex == lastItemPos.itemIndex + || __pListModel->IsGroupExpanded(itemPos.groupIndex) == false)) + { + SetTableViewFocused(false); + return false; + } + + continue; + } + 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()) + { + SetItemFocus(pItem, itemPos); + break; + } + } + } + else + { + SetTableViewFocused(false); + return false; + } + } + break; + + case _KEY_TAB: + SetTableViewFocused(false); + return false; + + default: + return false; + } + + return true; +} + +bool +_TableViewPresenter::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) +{ + if (!__pTableView->IsFocusModeStateEnabled() || !__pTableView->IsVisible() || !__pTableView->IsEnabled() || !__pTableView->IsFocusable()) + { + return false; + } + + _KeyCode keyCode = keyInfo.GetKeyCode(); + + if (keyCode == _KEY_UP || keyCode == _KEY_DOWN) + { + return true; + } + + return false; +} + +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()) + { + return; + } + + if (__pTableView->GetRootWindow()) + { + if(!__pTableView->GetRootWindow()->IsActivated()) + { + return; + } + } + + _Control* pFocusedControl = null; + _Window* pTop = __pTableView->GetRootWindow(); + if (pTop) + { + pFocusedControl = pTop->GetCurrentFocusControl(); + } + + _TableView* pTableView = null; + _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) + { + if (pItem->GetEnableState() && pItem->GetVisibleState() && pItem->IsFocusable()) + { + if (__isAnnexFocused) + { + pItem->DrawAnnexFocus(); + } + else + { + pItem->SetFocused(true); + pItem->DrawFocus(); + } + } + + __isRestoreFocus = false; + return; + } + + 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) + { + 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)) + { + TableViewItemTag topDrawnItemIndex = {-1, -1}; + GetTopDrawnItem(topDrawnItemIndex); + if ((topDrawnItemIndex.groupIndex < itemPos.groupIndex) || + (topDrawnItemIndex.groupIndex == itemPos.groupIndex && topDrawnItemIndex.itemIndex <= itemPos.itemIndex)) + { + TableViewItemTag bottomDrawnItemIndex = {-1, -1}; + GetBottomDrawnItem(bottomDrawnItemIndex); + if ((bottomDrawnItemIndex.groupIndex > itemPos.groupIndex) || + (bottomDrawnItemIndex.groupIndex == itemPos.groupIndex && bottomDrawnItemIndex.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_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 + { + 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 + { + 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 + { + 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; + __isAnnexFocused = false; + + _Window* pTop = __pTableView->GetRootWindow(); + + if (pTop != null) + { + _Control* pFocusedControl = pTop->GetCurrentFocusControl(); + + if (pFocusedControl != null) + { + pFocusedControl->RemoveFocusRing(); + } + } +} + +void +_TableViewPresenter::OnVisibleStateChanged(void) +{ + //reset focus + if (__pTableView->IsFocused()) + { + __pTableView->RemoveFocusRing(); + } +} + +void +_TableViewPresenter::OnAncestorEnableStateChanged(const _Control& control) +{ + //reset focus + if (__pTableView->IsFocused()) + { + __pTableView->RemoveFocusRing(); + } +} + +void +_TableViewPresenter::OnAncestorVisibleStateChanged(const _Control& control) +{ + //reset focus + if (__pTableView->IsFocused()) + { + __pTableView->RemoveFocusRing(); + } +} + +void +_TableViewPresenter::OnFocusableStateChanged(bool focusableState) +{ + if (!focusableState) + { + //reset focus + if (__pTableView->IsFocused()) + { + __pTableView->RemoveFocusRing(); + } + } +} + +bool +_TableViewPresenter::GetAccessibilityElementFocusedState(void) +{ + _TableViewItem* pItem = null; + TableViewItemTag itemPos = {-1, -1}; + TableViewItemTag lastItemPos = {-1, -1}; + + __pListModel->GetFirstLoadedItemIndex(itemPos.groupIndex, itemPos.itemIndex); + __pListModel->GetLastLoadedItemIndex(lastItemPos.groupIndex, lastItemPos.itemIndex); + + do + { + pItem = static_cast <_TableViewItem*>(__pListModel->LoadItem(itemPos.groupIndex, itemPos.itemIndex)); + 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; + + if (pContainer != null) + { + pElement = pContainer->GetCurrentFocusedElement(); + if (pElement != null) + { + return true; + } + } + + if ((itemPos.itemIndex == lastItemPos.itemIndex) && (itemPos.groupIndex == lastItemPos.groupIndex)) + { + break; + } + + } while (GetNextItemPosition(itemPos, itemPos) == true); + + return false; +} + +void +_TableViewPresenter::FireItemTouchReleasedEventDuringPressing(int groupIndex, int itemIndex) +{ + TableViewItemTag fireItemPos; + fireItemPos.groupIndex = groupIndex; + fireItemPos.itemIndex = itemIndex; + + __itemTouchReleasedEventState = TABLE_VIEW_ITEM_TOUCH_RELEASED_EVENT_FIRE; + _TableViewItem* pItem = FindItem(fireItemPos); + if (pItem != null) + { + pItem->FireItemTouchReleased(); + } + + // for new item after UpdateTableView. + pItem = FindItem(fireItemPos); + if (pItem != null) + { + if (__itemTouchReleasedEventState == TABLE_VIEW_ITEM_TOUCH_RELEASED_EVENT_UPDATE_TABLE_VIEW) + { + __itemTouchReleasedEventState = TABLE_VIEW_ITEM_TOUCH_RELEASED_EVENT_NORMAL; + } + else + { + pItem->SetSelectionState(true); + pItem->FireItemTouchPressed(); + } + } +} + +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 +{ + if (headerHorizontalAlignment == rhs.headerHorizontalAlignment && footerHorizontalAlignment == rhs.footerHorizontalAlignment) + { + return true; + } + + return false; +} + +bool +_TableViewSectionStringAlignment::operator!= (const _TableViewSectionStringAlignment& rhs) const +{ + if (headerHorizontalAlignment == rhs.headerHorizontalAlignment && footerHorizontalAlignment == rhs.footerHorizontalAlignment) + { + 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 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 new file mode 100644 index 0000000..c33f626 --- /dev/null +++ b/src/ui/controls/FUiCtrl_TextBlockEvent.cpp @@ -0,0 +1,186 @@ +// +// 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_TextBlockEvent.cpp +* @brief This is the implementation for the _TextBlockEvent class. +* @version 1.0 +*/ + +// includes +#include +#include +#include +#include "FUiCtrl_TextBlockEvent.h" +#include "FUiCtrl_ITextBlockEventListener.h" + +// using namespace +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @class _TextBlockEventArg + * @brief This class is used as the argument to change event listener. + * + * This class is used as the argument to change event listener. When an change event is generated + * (such as when a button is pressed) the TextBlockEvent calls TextBlockEventListener's OnTextd + * with an instance of this class as an argument. + * + * From this class, one can find out, the (event) source object and the change ID. + */ +class _OSP_EXPORT_ _TextBlockEventArg + : public IEventArg + , public Object +{ +// Lifecycle +public: + /** + * This is the default class constructor. + * + */ + _TextBlockEventArg(int start, int end); + + /** + * This is the class destructor. + * + */ + virtual ~_TextBlockEventArg(void); + + +// Access +public: + const int GetStartPosition(void) const; + + const int GetEndPosition(void) const; + +// Attribute +private: + /** + * Start position. + */ + int __start; + + /** + * End position. + */ + int __end; +}; // _TextBlockEventArg + +//////////////////////////////////////////////////////////////////////////////// +/// _TextBlockEventArg class Lifecycle + +_TextBlockEventArg::_TextBlockEventArg(int start, int end) + : __start(start) + , __end(end) +{ + // Nothing +} + +_TextBlockEventArg::~_TextBlockEventArg(void) +{ + // Nothing. +} + +const int +_TextBlockEventArg::GetStartPosition(void) const +{ + return __start; +} + +const int +_TextBlockEventArg::GetEndPosition(void) const +{ + return __end; +} + +//////////////////////////////////////////////////////////////////////////////// +/// _TextBlockEvent class Lifecycle +_TextBlockEvent::_TextBlockEvent(const _Control& source) + : __pSource(null) +{ + result r = _Event::Initialize(); + + // Set event source + if (r == E_SUCCESS) + { + __pSource = &source; + } +} + +_TextBlockEvent::~_TextBlockEvent(void) +{ + // Nothing. +} + +_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 allocation failed."); + + if (IsFailed(GetLastResult())) + { + goto CATCH; + } + + return pCoreTextBlockEvent; + +CATCH: + delete pCoreTextBlockEvent; + return null; +} + +// Accessors + +const _Control* +_TextBlockEvent::GetSource(void) const +{ + return __pSource; +} + +// Operations + +void +_TextBlockEvent::FireImpl(IEventListener& listener, const IEventArg& arg) +{ + _ITextBlockEventListener* pTextBlockEventListener = dynamic_cast <_ITextBlockEventListener*>(&listener); + 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, "[E_INVALID_ARG] The Invalid Event Argument is given."); + + pTextBlockEventListener->OnTextBlockSelected(const_cast <_Control&>(*__pSource), + pTextBlockEventArg->GetStartPosition(), pTextBlockEventArg->GetEndPosition()); + + SetLastResult(E_SUCCESS); + + return; +} + +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 allocation failed."); + + return pEventArg; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_TextBoxImpl.cpp b/src/ui/controls/FUiCtrl_TextBoxImpl.cpp new file mode 100644 index 0000000..fe98d84 --- /dev/null +++ b/src/ui/controls/FUiCtrl_TextBoxImpl.cpp @@ -0,0 +1,846 @@ +// +// 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_TextBoxImpl.cpp +* @brief This is the implementation file for _TextBoxImpl class. +*/ + +#include +#include +#include +#include +#include +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_UiBuilder.h" +#include "FUiCtrl_TextBoxImpl.h" +#include "FUiCtrl_PublicTextBlockEvent.h" +#include "FUiCtrl_PublicLinkEvent.h" +#include "FUi_CoordinateSystemUtils.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Base::Utility; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; + +namespace Tizen { namespace Ui { namespace Controls +{ + +const int TEXTBOX_LENGTH_MAX = 2048; + +_TextBoxImpl::_TextBoxImpl(TextBox* pPublic, _Edit* pCore) + : _ControlImpl(pPublic, pCore) + , __pEdit(pCore) + , __pPublicTextBlockEvent(null) + , __pPublicLinkEvent(null) + , __autoLinkMask(LINK_TYPE_NONE) +{ +} + +_TextBoxImpl::~_TextBoxImpl(void) +{ + if (__pPublicTextBlockEvent) + { + delete __pPublicTextBlockEvent; + __pPublicTextBlockEvent = null; + } + + if (__pPublicLinkEvent) + { + delete __pPublicLinkEvent; + __pPublicLinkEvent = null; + } +} + +_TextBoxImpl* +_TextBoxImpl::CreateTextBoxImplN(TextBox* pPublic) +{ + ClearLastResult(); + result r = E_SUCCESS; + + _Edit* pCore = _Edit::CreateEditN(); + SysTryReturn(NID_UI_CTRL, pCore, null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(r)); + + _TextBoxImpl* pImpl = new (std::nothrow) _TextBoxImpl(pPublic, pCore); + + r = _ControlImpl::CheckConstruction(pCore, pImpl); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return pImpl; + +CATCH: + delete pCore; + delete pImpl; + return null; +} + +const char* +_TextBoxImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Controls::TextBox"; +} + +const TextBox& +_TextBoxImpl::GetPublic(void) const +{ + return static_cast (_ControlImpl::GetPublic()); +} + +TextBox& +_TextBoxImpl::GetPublic(void) +{ + return static_cast (_ControlImpl::GetPublic()); +} + +const _Edit& +_TextBoxImpl::GetCore(void) const +{ + return static_cast (_ControlImpl::GetCore()); +} + +_Edit& +_TextBoxImpl::GetCore(void) +{ + return static_cast <_Edit&>(_ControlImpl::GetCore()); +} + +result +_TextBoxImpl::Initialize(TextBoxBorder border) +{ + result r = E_SUCCESS; + + r = __pEdit->Initialize(EDIT_STYLE_VIEWER, INPUT_STYLE_OVERLAY, TEXTBOX_LENGTH_MAX); + + if (border == TEXT_BOX_BORDER_ROUNDED) + { + __pEdit->SetBorderRoundStyleEnabled(true); + } + else + { + __pEdit->SetBorderRoundStyleEnabled(false); + } + + if (r != E_SUCCESS) + { + goto CATCH; + } + + __pEdit->SetAutoLinkMask(LINK_TYPE_URL | LINK_TYPE_EMAIL | LINK_TYPE_TEL_NUM); + + return r; + +CATCH: + Dispose(); + return r; +} + +result +_TextBoxImpl::Dispose(void) +{ + result r = E_SUCCESS; + + if (__pEdit) + { + delete __pEdit; + __pEdit = null; + } + + return r; +} + +result +_TextBoxImpl::SetAutoLinkMask(unsigned long autoLinks) +{ + __autoLinkMask = autoLinks; + + return __pEdit->SetAutoLinkMask(autoLinks); +} + +unsigned long +_TextBoxImpl::GetAutoLinkMask(void) const +{ + return __autoLinkMask; +} + +result +_TextBoxImpl::AddUiLinkEventListener(IUiLinkEventListener& listener) +{ + if (__pPublicLinkEvent == null) + { + __pPublicLinkEvent = _PublicLinkEvent::CreateInstanceN(GetPublic()); + + if (IsFailed(GetLastResult())) + { + SysLogException(NID_UI_CTRL, E_SYSTEM, "[E_SYSTEM] System error occurred."); + delete __pPublicLinkEvent; + return E_SYSTEM; + } + } + + __pPublicLinkEvent->AddListener(listener); + __pEdit->AddUiLinkEventListener(*this); + + return E_SUCCESS; +} + +result +_TextBoxImpl::RemoveUiLinkEventListener(IUiLinkEventListener& listener) +{ + SysTryReturn(NID_UI_CTRL, __pPublicLinkEvent, E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] This instance isn't constructed.") + + __pPublicLinkEvent->RemoveListener(listener); + __pEdit->RemoveUiLinkEventListener(*this); + + return E_SUCCESS; +} + +result +_TextBoxImpl::AppendCharacter(const Character& character) +{ + return __pEdit->AppendCharacter(character); +} + +result +_TextBoxImpl::AppendText(const String& text) +{ + return __pEdit->AppendText(text); +} + +result +_TextBoxImpl::Clear(void) +{ + return __pEdit->ClearText(); +} + +int +_TextBoxImpl::GetLineCount(void) const +{ + return __pEdit->GetTextLineCount(); +} + +String +_TextBoxImpl::GetText(void) const +{ + return __pEdit->GetText(); +} + +String +_TextBoxImpl::GetText(int start, int end) const +{ + return __pEdit->GetText(start, end); +} + +int +_TextBoxImpl::GetTextLength(void) const +{ + return __pEdit->GetTextLength(); +} + +result +_TextBoxImpl::InsertCharacterAt(int index, const Character& character) +{ + result r = __pEdit->InsertCharacterAt(index, character); + + if (r == E_INVALID_ARG) + { + r = E_OUT_OF_RANGE; + } + + return r; +} + +result +_TextBoxImpl::InsertTextAt(int index, const String& text) +{ + result r = __pEdit->InsertTextAt(index, text); + + if (r == E_INVALID_ARG) + { + r = E_OUT_OF_RANGE; + } + + return r; +} + +result +_TextBoxImpl::SetText(const String& text) +{ + return __pEdit->SetText(text); +} + +int +_TextBoxImpl::GetLineSpacing(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetLineSpacingF()); +} + +float +_TextBoxImpl::GetLineSpacingF(void) const +{ + return __pEdit->GetLineSpacingF(); +} + +result +_TextBoxImpl::SetLineSpacing(int multiplier, int extra) +{ + return SetLineSpacing(multiplier, _CoordinateSystemUtils::ConvertToFloat(extra)); +} + +result +_TextBoxImpl::SetLineSpacing(int multiplier, float extra) +{ + SysTryReturn(NID_UI_CTRL, multiplier >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The invalid argument is given."); + SysTryReturn(NID_UI_CTRL, extra >= 0.0f, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The invalid argument is given."); + + return __pEdit->SetLineSpacing(DEFAULT_LINE_SPACE * multiplier + extra); +} + +HorizontalAlignment +_TextBoxImpl::GetTextAlignment(void) const +{ + return __pEdit->GetTextAlignment(); +} + +result +_TextBoxImpl::SetTextAlignment(HorizontalAlignment alignment) +{ + return __pEdit->SetTextAlignment(alignment); +} + +int +_TextBoxImpl::GetTextSize(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetTextSizeF()); +} + +float +_TextBoxImpl::GetTextSizeF(void) const +{ + return __pEdit->GetTextSizeF(); +} + +result +_TextBoxImpl::SetTextSize(int size) +{ + return __pEdit->SetTextSize(_CoordinateSystemUtils::ConvertToFloat(size)); +} + +result +_TextBoxImpl::SetTextSize(float size) +{ + return __pEdit->SetTextSize(size); +} + +int +_TextBoxImpl::GetTextTotalHeight(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetTextTotalHeightF()); +} + +float +_TextBoxImpl::GetTextTotalHeightF(void) const +{ + return __pEdit->GetTextTotalHeightF(); +} + +result +_TextBoxImpl::GetFontType(String& typefaceName, unsigned long& styleMask) const +{ + __pEdit->GetFontType(typefaceName, styleMask); + + return E_SUCCESS; +} + +unsigned long +_TextBoxImpl::GetTextStyle(void) const +{ + return __pEdit->GetTextStyle(); +} + +result +_TextBoxImpl::SetFontType(const String& typefaceName, unsigned long styleMask) +{ + return __pEdit->SetFontType(typefaceName, styleMask); +} + +result +_TextBoxImpl::SetTextStyle(unsigned long style) +{ + return __pEdit->SetTextStyle(style); +} + +result +_TextBoxImpl::SetFont(const Font& font) +{ + return __pEdit->SetFont(font); +} + +result +_TextBoxImpl::ReleaseBlock(void) +{ + return __pEdit->ReleaseTextBlock(); +} + +result +_TextBoxImpl::GetBlockRange(int& start, int& end) const +{ + __pEdit->GetBlockRange(start, end); + + return E_SUCCESS; +} + +result +_TextBoxImpl::SetBlockRange(int start, int end) +{ + 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, + "The invalid argument is given."); + + return __pEdit->SetBlockRange(start, end); +} + +result +_TextBoxImpl::AddTextBlockEventListener(ITextBlockEventListener& listener) +{ + if (__pPublicTextBlockEvent == null) + { + __pPublicTextBlockEvent = _PublicTextBlockEvent::CreateInstanceN(GetPublic()); + + if (IsFailed(GetLastResult())) + { + SysLogException(NID_UI_CTRL, E_SYSTEM, "[E_SYSTEM] System error occurred."); + delete __pPublicTextBlockEvent; + return E_SYSTEM; + } + } + + __pPublicTextBlockEvent->AddListener(listener); + __pEdit->AddTextBlockEventListener(*this); + + return E_SUCCESS; +} + +result +_TextBoxImpl::RemoveTextBlockEventListener(ITextBlockEventListener& listener) +{ + SysTryReturn(NID_UI_CTRL, __pPublicTextBlockEvent, E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] This instance isn't constructed.") + + __pPublicTextBlockEvent->RemoveListener(listener); + __pEdit->RemoveTextBlockEventListener(*this); + + return E_SUCCESS; +} + +Color +_TextBoxImpl::GetColor(TextBoxStatus status) const +{ + return __pEdit->GetColor(ConvertStatus(status)); +} + +Color +_TextBoxImpl::GetTextColor(TextBoxTextColor type) const +{ + if (type == TEXT_BOX_TEXT_COLOR_BLOCKED) + { + return __pEdit->GetBlockTextColor(); + } + else + { + return __pEdit->GetTextColor(ConvertTextColorType(type)); + } +} + +result +_TextBoxImpl::SetColor(TextBoxStatus status, const Color& color) +{ + if (status == TEXT_BOX_STATUS_HIGHLIGHTED) + { + __pEdit->SetColor(EDIT_STATUS_PRESSED, color); + } + + return __pEdit->SetColor(ConvertStatus(status), color); +} + +result +_TextBoxImpl::SetTextColor(TextBoxTextColor type, const Color& color) +{ + if (type == TEXT_BOX_TEXT_COLOR_BLOCKED) + { + return __pEdit->SetBlockTextColor(color); + } + else + { + return __pEdit->SetTextColor(ConvertTextColorType(type), color); + } +} + +result +_TextBoxImpl::SetBackgroundBitmap(TextBoxStatus status, const Bitmap& bitmap) +{ + if (status == TEXT_BOX_STATUS_HIGHLIGHTED) + { + __pEdit->SetBackgroundBitmap(EDIT_STATUS_PRESSED, bitmap); + } + + return __pEdit->SetBackgroundBitmap(ConvertStatus(status), bitmap); +} + +EditTextColor +_TextBoxImpl::ConvertTextColorType(TextBoxTextColor type) const +{ + EditTextColor editTextColorType = EDIT_TEXT_COLOR_NORMAL; + + switch (type) + { + case TEXT_BOX_TEXT_COLOR_NORMAL: + editTextColorType = EDIT_TEXT_COLOR_NORMAL; + break; + + case TEXT_BOX_TEXT_COLOR_HIGHLIGHTED: + editTextColorType = EDIT_TEXT_COLOR_HIGHLIGHTED; + break; + + case TEXT_BOX_TEXT_COLOR_DISABLED: + editTextColorType = EDIT_TEXT_COLOR_DISABLED; + break; + + case TEXT_BOX_TEXT_COLOR_LINK: + editTextColorType = EDIT_TEXT_COLOR_LINK; + break; + + case TEXT_BOX_TEXT_COLOR_BLOCKED: + default: + editTextColorType = EDIT_TEXT_COLOR_NORMAL; + break; + } + + return editTextColorType; +} + +EditStatus +_TextBoxImpl::ConvertStatus(TextBoxStatus status) const +{ + EditStatus editStatus = EDIT_STATUS_NORMAL; + + switch (status) + { + case TEXT_BOX_STATUS_NORMAL: + editStatus = EDIT_STATUS_NORMAL; + break; + + case TEXT_BOX_STATUS_HIGHLIGHTED: + editStatus = EDIT_STATUS_HIGHLIGHTED; + break; + + case TEXT_BOX_STATUS_DISABLED: + editStatus = EDIT_STATUS_DISABLED; + break; + + default: + editStatus = EDIT_STATUS_NORMAL; + break; + } + + return editStatus; +} + +result +_TextBoxImpl::OnBoundsChanged(const Rectangle& oldRect, const Rectangle& newRect) +{ + return E_SUCCESS; +} + +result +_TextBoxImpl::OnBoundsChanged(const FloatRectangle& oldRect, const FloatRectangle& newRect) +{ + return E_SUCCESS; +} + +void +_TextBoxImpl::OnLinkClicked(_Control& source, const String& text, LinkType linkType, + const String& link) +{ + if (__pPublicLinkEvent != null) + { + IEventArg* pLinkEventArg = _PublicLinkEvent::CreateLinkEventArgN(text, linkType, link); + SysTryReturnVoidResult(NID_UI_CTRL, pLinkEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.Memory allocation failed."); + + __pPublicLinkEvent->Fire(*pLinkEventArg); + } +} + +void +_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] Memory allocation failed."); + + __pPublicTextBlockEvent->Fire(*pTextBlockEventArg); + } +} + +FloatDimension +_TextBoxImpl::GetContentSizeF(bool horizontalMode, bool verticalMode) const +{ + return __pEdit->GetContentSizeInternalF(horizontalMode, verticalMode); +} + +_TextBoxImpl* +_TextBoxImpl::GetInstance(TextBox& textBox) +{ + return static_cast<_TextBoxImpl*> (textBox._pControlImpl); +} + +const _TextBoxImpl* +_TextBoxImpl::GetInstance(const TextBox& textBox) +{ + return static_cast (textBox._pControlImpl); +} + +class _TextBoxMaker + : public _UiBuilderControlMaker +{ +public: + _TextBoxMaker(_UiBuilder* uibuilder) + : _UiBuilderControlMaker(uibuilder){}; + virtual ~_TextBoxMaker(){}; + static _UiBuilderControlMaker* GetInstance(_UiBuilder* uibuilder) + { + _TextBoxMaker* pTextBoxMaker = new (std::nothrow) _TextBoxMaker(uibuilder); + return pTextBoxMaker; + }; + +protected: + virtual Control* Make(_UiBuilderControl* pControl) + { + result r = E_SUCCESS; + + FloatRectangle rect; + + TextBox* pTextBox = null; + _UiBuilderControlLayout* pControlProperty = null; + HorizontalAlignment textAlignment = ALIGNMENT_LEFT; + TextBoxBorder textboxBorder = TEXT_BOX_BORDER_ROUNDED; + String text; + Color color; + int opacity = 100; + float textSize = 0.0f; + float lineSpacingExtra = 0.0f; + int lineSpacingMultiplier = 1; + String elementString; + + GetProperty(pControl, &pControlProperty); + if (pControlProperty == null) + { + return null; + } + + pTextBox = new (std::nothrow) TextBox(); + if (pTextBox == null) + { + return null; + } + + rect = pControlProperty->GetRectF(); + if (pControl->GetElement("textboxBorder", elementString)) + { + if (elementString.Equals(L"TEXT_BOX_BORDER_NONE", false)) + { + textboxBorder = TEXT_BOX_BORDER_NONE; + } + else if (elementString.Equals(L"TEXT_BOX_BORDER_ROUNDED", false)) + { + textboxBorder = TEXT_BOX_BORDER_ROUNDED; + } + else if (elementString.Equals(L"TEXT_BOX_BORDER_LINE", false)) + { + textboxBorder = TEXT_BOX_BORDER_ROUNDED; + } + } + + r = pTextBox->Construct(rect, textboxBorder); + if (r != E_SUCCESS) + { + return null; + } + + if (pControl->GetElement("textAlignment", elementString)) + { + if (elementString.Equals(L"ALIGNMENT_LEFT", false)) + { + textAlignment = ALIGNMENT_LEFT; + } + else if (elementString.Equals(L"ALIGNMENT_RIGHT", false)) + { + textAlignment = ALIGNMENT_RIGHT; + } + else if (elementString.Equals(L"ALIGNMENT_CENTER", false)) + { + textAlignment = ALIGNMENT_CENTER; + } + + r = pTextBox->SetTextAlignment(textAlignment); + } + + if (pControl->GetElement("textSize", elementString)) + { + textSize = _LocalizedNumParser::ToDouble(elementString, "C"); + _ICoordinateSystemTransformer* pTransform = GetTransformer(); + if (pTransform) + { + textSize = pTransform->Transform(textSize); + } + r = pTextBox->SetTextSize(textSize); + } + + if (pControl->GetElement("lineSpacingExtra", elementString)) + { + lineSpacingExtra =_LocalizedNumParser::ToDouble(elementString, "C"); + if (pControl->GetElement("lineSpacingMultiplier", elementString)) + { + Base::Integer::Parse(elementString, lineSpacingMultiplier); + r = pTextBox->SetLineSpacing(lineSpacingMultiplier, lineSpacingExtra); + } + } + + if (pControl->GetElement("text", elementString)) + { + r = pTextBox->SetText(elementString); + } + + if (pControl->GetElement("disabledBackgroundBitmapPath", elementString)) + { + Bitmap* pBackGroundBitmap = null; + pBackGroundBitmap = LoadBitmapN(elementString); + if (pBackGroundBitmap != null) + { + pTextBox->SetBackgroundBitmap(TEXT_BOX_STATUS_DISABLED, *pBackGroundBitmap); + delete pBackGroundBitmap; + } + } + + if (pControl->GetElement("highlightedBackgroundBitmapPath", elementString)) + { + Bitmap* pBackGroundBitmap = null; + pBackGroundBitmap = LoadBitmapN(elementString); + if (pBackGroundBitmap != null) + { + pTextBox->SetBackgroundBitmap(TEXT_BOX_STATUS_HIGHLIGHTED, *pBackGroundBitmap); + delete pBackGroundBitmap; + } + } + + if (pControl->GetElement("normalBackgroundBitmapPath", elementString)) + { + Bitmap* pBackGroundBitmap = null; + pBackGroundBitmap = LoadBitmapN(elementString); + if (pBackGroundBitmap != null) + { + pTextBox->SetBackgroundBitmap(TEXT_BOX_STATUS_NORMAL, *pBackGroundBitmap); + delete pBackGroundBitmap; + } + } + + if (pControl->GetElement("disabledTextColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + pTextBox->SetTextColor(TEXT_BOX_TEXT_COLOR_DISABLED, color); + } + + if (pControl->GetElement("highlightedTextColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + pTextBox->SetTextColor(TEXT_BOX_TEXT_COLOR_HIGHLIGHTED, color); + } + + if (pControl->GetElement("normalTextColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + pTextBox->SetTextColor(TEXT_BOX_TEXT_COLOR_NORMAL, color); + } + + if (pControl->GetElement("disabledColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + if (pControl->GetElement("disabledColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + pTextBox->SetColor(TEXT_BOX_STATUS_DISABLED, color); + } + + if (pControl->GetElement("highlightedColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + if (pControl->GetElement("highlightedColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + pTextBox->SetColor(TEXT_BOX_STATUS_HIGHLIGHTED, color); + } + + if (pControl->GetElement("normalColorOpacity", elementString)) + { + Base::Integer::Parse(elementString, opacity); + } + if (pControl->GetElement("normalColor", elementString)) + { + ConvertStringToColor32(elementString, opacity, color); + pTextBox->SetColor(TEXT_BOX_STATUS_NORMAL, color); + } + + if (pControl->GetElement(L"accessibilityHint", elementString)) + { + AccessibilityContainer* pContainer = pTextBox->GetAccessibilityContainer(); + if (pContainer) + { + AccessibilityElement* pElement = pContainer->GetElement(L"EditText"); + if (pElement) + { + pElement->SetHint(elementString); + } + } + } + + return pTextBox; + } +}; + +_TextBoxRegister::_TextBoxRegister() +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->RegisterControl(L"TextBox", _TextBoxMaker::GetInstance); +} +_TextBoxRegister::~_TextBoxRegister() +{ + _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance(); + pUiBuilderControlTableManager->UnregisterControl(L"TextBox"); +} +static _TextBoxRegister TextBoxRegisterToUiBuilder; +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_TextEvent.cpp b/src/ui/controls/FUiCtrl_TextEvent.cpp new file mode 100644 index 0000000..6203ac6 --- /dev/null +++ b/src/ui/controls/FUiCtrl_TextEvent.cpp @@ -0,0 +1,195 @@ +// +// 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_TextEvent.cpp +* @brief This is the implementation for the TextEvent class. +* @version 1.0 +*/ + +// includes +#include +#include +#include +#include "FUiCtrl_ITextEventListener.h" +#include "FUiCtrl_TextEvent.h" + + +// using namespace +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @class _TextEventArg + * @brief This class is used as the argument to action event listener. + * + * This class is used as the argument to action event listener. When an action event is generated + * (such as when a button is pressed) the TextEvent calls TextEventListener's OnActionPerformed + * with an instance of this class as an argument. + * + * From this class, one can find out, the (event) source object and the action ID. + */ +class _OSP_EXPORT_ _TextEventArg + : public IEventArg + , public Object +{ +// Lifecycle +public: + /** + * This is the default class constructor. + * + * @param[in] source A pointer to the Object instance which contains this instance. + * @param[in] actionId Action Id. + */ + _TextEventArg(CoreTextEventStatus status); + + /** + * This is the class destructor. + * + */ + virtual ~_TextEventArg(void); + + +// Access +public: + /** + * This method returns the TextEventStatus which the event initially occurred. + * + * @return See the comment above. + */ + CoreTextEventStatus GetStatus(void) const; + + +// Attribute +private: + /** + * Action Id. + */ + CoreTextEventStatus __status; +}; // _TextEventArg + +_TextEventArg::_TextEventArg(CoreTextEventStatus status) + : __status(status) +{ + // nothing +} + +_TextEventArg::~_TextEventArg(void) +{ + // nothing +} + +//////////////////////////////////////////////////////////////////////////////// +/// _TextEventArg class Access + +CoreTextEventStatus +_TextEventArg::GetStatus(void) const +{ + return __status; +} + + +//////////////////////////////////////////////////////////////////////////////// +/// _TextEvent class Lifecycle + +_TextEvent::_TextEvent(const _Control& source) + : __pSource(null) +{ + result r = _Event::Initialize(); + + // set event source + if (r == E_SUCCESS) + { + __pSource = &source; + } +} + +_TextEvent::~_TextEvent(void) +{ + // nothing +} + +_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 allocation failed."); + + if (IsFailed(GetLastResult())) + { + goto CATCH; + } + + return pCoreTextEvent; + +CATCH: + delete pCoreTextEvent; + return null; +} + +//////////////////////////////////////////////////////////////////////////////// +/// _WindowEvent class Accessor + +const _Control* +_TextEvent::GetSource(void) const +{ + return __pSource; +} + +//////////////////////////////////////////////////////////////////////////////// +/// _TextEvent class Operation + +void +_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."); + + // 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."); + + CoreTextEventStatus stauts = pArg->GetStatus(); + if (stauts == CORE_TEXT_EVENT_CHANGED) + { + pTextListener->OnTextValueChanged(*__pSource); + } + else if (stauts == CORE_TEXT_EVENT_CANCELED) + { + pTextListener->OnTextValueChangeCanceled(*__pSource); + } + + SetLastResult(E_SUCCESS); + + return; +} + +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 allocation failed."); + + return pEventArg; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_TimePickerImpl.cpp b/src/ui/controls/FUiCtrl_TimePickerImpl.cpp new file mode 100644 index 0000000..561889e --- /dev/null +++ b/src/ui/controls/FUiCtrl_TimePickerImpl.cpp @@ -0,0 +1,371 @@ +// +// 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_TimePickerImpl.cpp + * @brief This is the implementation file for the _TimePickerImpl class. + */ + +#include +#include "FUiCtrl_DateTimePicker.h" +#include "FUiCtrl_TimePickerImpl.h" +#include "FUiCtrl_FrameImpl.h" +#include "FUi_ControlImplManager.h" +#include "FUi_ResourceSizeInfo.h" +#include "FUi_ResourceManager.h" +#include "FUiCtrl_Form.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ + +FloatDimension +_TimePickerImpl::TimePickerSizeInfo::GetDefaultMinimumSizeF(_ControlOrientation orientation) const +{ + FloatDimension pickerSize(0.0f, 0.0f); + FloatDimension screenSize(0.0f, 0.0f); + + screenSize = _ControlManager::GetInstance()->GetScreenSizeF(); + pickerSize = screenSize; + if (orientation == _CONTROL_ORIENTATION_LANDSCAPE) + { + pickerSize.width = screenSize.height; + pickerSize.height = screenSize.width; + } + + return pickerSize; +} + +FloatDimension +_TimePickerImpl::TimePickerSizeInfo::GetDefaultMaximumSizeF(_ControlOrientation orientation) const +{ + FloatDimension pickerSize(0.0f, 0.0f); + FloatDimension screenSize(0.0f, 0.0f); + + screenSize = _ControlManager::GetInstance()->GetScreenSizeF(); + pickerSize = screenSize; + if (orientation == _CONTROL_ORIENTATION_LANDSCAPE) + { + pickerSize.width = screenSize.height; + pickerSize.height = screenSize.width; + } + + return pickerSize; +} + +_TimePickerImpl::_TimePickerImpl(TimePicker* pPublic, _DateTimePicker* pCore) + : _WindowImpl(pPublic, pCore) + , __pPublicDateTimeChangeEvent(null) +{ +} + +_TimePickerImpl::~_TimePickerImpl(void) +{ + if (__pPublicDateTimeChangeEvent != null) + { + delete __pPublicDateTimeChangeEvent; + __pPublicDateTimeChangeEvent = null; + } +} + +_TimePickerImpl* +_TimePickerImpl::CreateTimePickerImplN(TimePicker* pControl, const String& title) +{ + ClearLastResult(); + + result r = E_SUCCESS; + + _DateTimePicker* pCore = _DateTimePicker::CreateDateTimePickerN(DATETIME_OUTPUT_STYLE_TIME, title); + SysTryReturn(NID_UI_CTRL, (pCore != null), null, r, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + _TimePickerImpl* pPickerImpl = new (std::nothrow) _TimePickerImpl(pControl, pCore); + r = CheckConstruction(pCore, pPickerImpl); + SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), null, r, "[%s] Propagating.", GetErrorMessage(r)); + + pPickerImpl->__pPublicDateTimeChangeEvent = new (std::nothrow) _PublicDateTimeChangeEvent(*pControl); + SysTryCatch(NID_UI_CTRL, (pPickerImpl->__pPublicDateTimeChangeEvent != null), , E_OUT_OF_MEMORY, + "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = pPickerImpl->InitializeBoundsProperties(GET_SIZE_INFO(TimePicker), pCore->GetOrientation()); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pCore->AddDateTimeChangeEventListener(*pPickerImpl); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return pPickerImpl; + +CATCH: + delete pPickerImpl; + + return null; +} + +const char* +_TimePickerImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Controls::TimePicker"; +} + +const TimePicker& +_TimePickerImpl::GetPublic(void) const +{ + return static_cast (_ControlImpl::GetPublic()); +} + +TimePicker& +_TimePickerImpl::GetPublic(void) +{ + return static_cast (_ControlImpl::GetPublic()); +} + +const _DateTimePicker& +_TimePickerImpl::GetCore(void) const +{ + return static_cast (_ControlImpl::GetCore()); +} + +_DateTimePicker& +_TimePickerImpl::GetCore(void) +{ + return static_cast <_DateTimePicker&>(_ControlImpl::GetCore()); +} + +_TimePickerImpl* +_TimePickerImpl::GetInstance(TimePicker& timePicker) +{ + return static_cast<_TimePickerImpl*> (_ControlImpl::GetInstance(timePicker)); +} + +const _TimePickerImpl* +_TimePickerImpl::GetInstance(const TimePicker& timePicker) +{ + return static_cast (_ControlImpl::GetInstance(timePicker)); +} + +result +_TimePickerImpl::AddTimeChangeEventListener(Tizen::Ui::ITimeChangeEventListener& listener) +{ + ClearLastResult(); + + SysTryReturnResult(NID_UI_CTRL, (__pPublicDateTimeChangeEvent != null), E_SYSTEM, + "A system error has occurred. The _PublicDateTimeChangeEvent instance is null."); + + result r = __pPublicDateTimeChangeEvent->AddListener(listener); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +result +_TimePickerImpl::RemoveTimeChangeEventListener(Tizen::Ui::ITimeChangeEventListener& listener) +{ + ClearLastResult(); + + SysTryReturnResult(NID_UI_CTRL, (__pPublicDateTimeChangeEvent != null), E_SYSTEM, + "A system error has occurred. The _PublicDateTimeChangeEvent instance is null."); + + result r = __pPublicDateTimeChangeEvent->RemoveListener(listener); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +int +_TimePickerImpl::GetHour(void) const +{ + ClearLastResult(); + + Variant hourValue = GetCore().GetPropertyHour(); + + return hourValue.ToInt(); +} + +int +_TimePickerImpl::GetMinute(void) const +{ + ClearLastResult(); + + Variant minuteValue = GetCore().GetPropertyMinute(); + + return minuteValue.ToInt(); +} + +DateTime +_TimePickerImpl::GetTime(void) const +{ + ClearLastResult(); + + Variant dateTimeValue = GetCore().GetPropertyDateTime(); + + return dateTimeValue.ToDateTime(); +} + +void +_TimePickerImpl::Set24HourNotationEnabled(bool enable) +{ + ClearLastResult(); + + Variant envaluedValue(enable); + + GetCore().SetProperty24HourNotation(envaluedValue); +} + +result +_TimePickerImpl::SetHour(int hour) +{ + ClearLastResult(); + + Variant hourValue(hour); + + return GetCore().SetPropertyHour(hourValue); +} + + +result +_TimePickerImpl::SetMinute(int minute) +{ + ClearLastResult(); + + Variant minuteValue(minute); + + return GetCore().SetPropertyMinute(minuteValue); +} + +void +_TimePickerImpl::SetTime(const DateTime& time) +{ + ClearLastResult(); + + Variant dateTimeValue(time); + + GetCore().SetPropertyDateTime(dateTimeValue); + + SetYear(0); + SetMonth(0); + SetDay(0); +} + +void +_TimePickerImpl::SetCurrentTime(void) +{ + ClearLastResult(); + + GetCore().SetCurrentDateTime(); + + SetYear(0); + SetMonth(0); + SetDay(0); +} + +result +_TimePickerImpl::SetYear(int year) +{ + Variant yearValue(year); + + return GetCore().SetPropertyYear(yearValue); +} + +result +_TimePickerImpl::SetMonth(int month) +{ + Variant monthValue(month); + + return GetCore().SetPropertyMonth(monthValue); +} + +result +_TimePickerImpl::SetDay(int day) +{ + Variant dayValue(day); + + return GetCore().SetPropertyDay(dayValue); +} + +void +_TimePickerImpl::OnDateTimeChanged(const Tizen::Ui::_Control& source, int year, int month, int day, int hour, int minute) +{ + ClearLastResult(); + + if (__pPublicDateTimeChangeEvent == null) + { + return; + } + + _PublicDateTimeChangeEventArg* pEventArg = new (std::nothrow) _PublicDateTimeChangeEventArg(TIME_PUBLIC_CHANGE_SAVED); + SysTryReturnVoidResult(NID_UI_CTRL, (pEventArg != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pEventArg->SetDate(year, month, day); + pEventArg->SetTime(hour, minute); + + __pPublicDateTimeChangeEvent->Fire(*pEventArg); +} + +void +_TimePickerImpl::OnDateTimeChangeCanceled(const Tizen::Ui::_Control& source) +{ + ClearLastResult(); + + if (__pPublicDateTimeChangeEvent == null) + { + return; + } + + _PublicDateTimeChangeEventArg* pEventArg = new (std::nothrow) _PublicDateTimeChangeEventArg(TIME_PUBLIC_CHANGE_CANCELED); + SysTryReturnVoidResult(NID_UI_CTRL, (pEventArg != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + __pPublicDateTimeChangeEvent->Fire(*pEventArg); +} + +void +_TimePickerImpl::OnChangeLayout(Tizen::Ui::_ControlOrientation orientation) +{ + ClearLastResult(); + + InitializeBoundsProperties(GET_SIZE_INFO(TimePicker), orientation); + _ControlImpl::OnChangeLayout(orientation); +} + +result +_TimePickerImpl::OnAttachedToMainTree(void) +{ + result r = E_SUCCESS; + + if (GetOwner() == null) + { + _FrameImpl* pFrameImpl = dynamic_cast <_FrameImpl*>(_ControlImplManager::GetInstance()->GetCurrentFrame()); + SysTryReturn(NID_UI_CTRL, (pFrameImpl != null), E_SYSTEM, E_SYSTEM, + "[E_SYSTEM] A system error has occurred. Failed to get frame instance."); + + _Form* pForm = pFrameImpl->GetCore().GetCurrentForm(); + if (pForm != null) + { + GetCore().SetOwner(pForm); + } + else + { + GetCore().SetOwner(&pFrameImpl->GetCore()); + } + } + SetVisibleState(true); + + _WindowImpl::OnAttachedToMainTree(); + return r; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_TokenEdit.cpp b/src/ui/controls/FUiCtrl_TokenEdit.cpp new file mode 100644 index 0000000..396e522 --- /dev/null +++ b/src/ui/controls/FUiCtrl_TokenEdit.cpp @@ -0,0 +1,766 @@ +// +// 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_TokenEdit.cpp + * @brief This is the implementation file for the _TokenEdit class. + */ + +#include +#include "FUiCtrl_TokenEdit.h" +#include "FUiCtrl_TokenEditPresenter.h" + +#include "FUi_AccessibilityContainer.h" +#include "FUi_AccessibilityElement.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; + +namespace Tizen { namespace Ui { namespace Controls +{ + +IMPLEMENT_PROPERTY(_TokenEdit); + +_TokenEdit::_TokenEdit(void) + : _Edit() + , __pTokenEditPresenter(null) + , __isSelectedTokenTextColorSet(false) + , __pTokenFilter(null) + , __pTitleTextAccessibilityElement(null) + , __pCursorAccessibilityElement(null) +{ + GET_COLOR_CONFIG(TOKENEDIT::BG_NORMAL, __tokenColor[TOKEN_EDIT_STATUS_NORMAL]); + GET_COLOR_CONFIG(TOKENEDIT::BG_SELECTED, __tokenColor[TOKEN_EDIT_STATUS_SELECTED]); + GET_COLOR_CONFIG(TOKENEDIT::BG_HIGHLIGHTED, __tokenColor[TOKEN_EDIT_STATUS_HIGHLIGHTED]); + GET_COLOR_CONFIG(TOKENEDIT::BG_DISABLED, __tokenColor[TOKEN_EDIT_STATUS_DISABLED]); + GET_COLOR_CONFIG(TOKENEDIT::TEXT_NORMAL, __tokenTextColor[EXPANDABLE_EDIT_AREA_TOKEN_STATUS_NORMAL]); + GET_COLOR_CONFIG(TOKENEDIT::TEXT_SELECTED, __tokenTextColor[EXPANDABLE_EDIT_AREA_TOKEN_STATUS_SELECTED]); + + _AccessibilityContainer* pContainer = null; + pContainer = GetAccessibilityContainer(); + if (pContainer) + { + pContainer->Activate(true); + } +} + +_TokenEdit::~_TokenEdit(void) +{ +} + +_TokenEdit* +_TokenEdit::CreateTokenEditN(void) +{ + _TokenEditPresenter* pPresenter = _TokenEditPresenter::CreateTokenEditPresenterN(); + result r = GetLastResult(); + 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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + SysTryCatch(NID_UI_CTRL, GetLastResult() == E_SUCCESS, , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + pTokenEdit->AcquireHandle(); + + pTokenEdit->SetPresenter(*pPresenter); + pTokenEdit->__pTokenEditPresenter = pPresenter; + + return pTokenEdit; + +CATCH: + delete pPresenter; + delete pTokenEdit; + return null; +} + +void +_TokenEdit::OnDraw(void) +{ + result r = E_SUCCESS; + + if (__pTokenEditPresenter == null) + { + return; + } + + r = __pTokenEditPresenter->Draw(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + return; +} + +result +_TokenEdit::SetTokenFilter(const _ITokenFilter* pFilter) +{ + result r = E_SUCCESS; + + __pTokenFilter = const_cast< _ITokenFilter* >(pFilter); + + return r; +} + +_ITokenFilter* +_TokenEdit::GetTokenFilter(void) const +{ + return __pTokenFilter; +} + +result +_TokenEdit::AppendToken(const String& token) +{ + result r = E_SUCCESS; + + SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance must not be null."); + + r = __pTokenEditPresenter->AppendToken(token); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +result +_TokenEdit::InsertTokenAt(int index, const String& token) +{ + result r = E_SUCCESS; + + SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance must not be null."); + + r = __pTokenEditPresenter->InsertTokenAt(index, token, true); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + return r; +} + +String +_TokenEdit::GetTokenAt(int index) const +{ + SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance must not be null."); + + return __pTokenEditPresenter->GetTokenAt(index); +} + +int +_TokenEdit::GetTokenCount(void) const +{ + SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance must not be null."); + + return __pTokenEditPresenter->GetTokenCount(true); +} + +int +_TokenEdit::GetSelectedTokenIndex(void) const +{ + SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance must not be null."); + + return __pTokenEditPresenter->GetSelectedTokenIndex(); +} + +bool +_TokenEdit::IsTokenEditModeEnabled(void) const +{ + SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance must not be null."); + + Variant var = GetProperty("tokenEditModeEnabled"); + + return var.ToBool(); +} + +result +_TokenEdit::RemoveTokenAt(int index) +{ + SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance must not be null."); + + return __pTokenEditPresenter->RemoveTokenAt(index, true); +} + +result +_TokenEdit::SetTokenSelected(int index, bool selected) +{ + SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance must not be null."); + + return __pTokenEditPresenter->SetTokenSelected(index, selected); +} + +result +_TokenEdit::SetTokenEditModeEnabled(bool enable) +{ + SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance must not be null."); + + Variant var(enable); + + return SetProperty("tokenEditModeEnabled", var); +} + +Color +_TokenEdit::GetTokenColor(TokenEditStatus status) const +{ + Variant var; + + switch (status) + { + case TOKEN_EDIT_STATUS_NORMAL: + var = GetProperty("normalTokenColor"); + break; + + case TOKEN_EDIT_STATUS_SELECTED: + var = GetProperty("selectedTokenColor"); + break; + + case TOKEN_EDIT_STATUS_HIGHLIGHTED: + var = GetProperty("highlightedTokenColor"); + break; + + case TOKEN_EDIT_STATUS_DISABLED: + var = GetProperty("disabledTokenColor"); + break; + + default: + break; + } + + return var.ToColor(); +} + +Color +_TokenEdit::GetTokenTextColor(void) const +{ + Variant var = GetProperty("tokenTextColor"); + + return var.ToColor(); +} + +result +_TokenEdit::SetTokenColor(TokenEditStatus status, const Color& color) +{ + result r = E_SUCCESS; + Variant var(color); + + switch (status) + { + case TOKEN_EDIT_STATUS_NORMAL: + r = SetProperty("normalTokenColor", var); + break; + + case TOKEN_EDIT_STATUS_SELECTED: + r = SetProperty("selectedTokenColor", var); + break; + + case TOKEN_EDIT_STATUS_HIGHLIGHTED: + r = SetProperty("highlightedTokenColor", var); + break; + + case TOKEN_EDIT_STATUS_DISABLED: + r = SetProperty("disabledTokenColor", var); + break; + default: + break; + } + + return r; +} + +result +_TokenEdit::SetTokenTextColor(const Color& color) +{ + Variant var(color); + return SetProperty("tokenTextColor", var); +} + +Color +_TokenEdit::GetSelectedTokenTextColor(void) const +{ + Variant var = GetProperty("selectedTokenTextColor"); + + return var.ToColor(); +} + +result +_TokenEdit::SetSelectedTokenTextColor(const Color& color) +{ + Variant var(color); + + return SetProperty("selectedTokenTextColor", var); +} + +result +_TokenEdit::SetTitleText(const String& title) +{ + result r = E_SUCCESS; + + SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance must not be null."); + + __pTokenEditPresenter->SetTitleText(title); + + r = __pTokenEditPresenter->CalculateTitleTextRect(title); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = __pTokenEditPresenter->CalculateTokenPositionFromIndex(0); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = __pTokenEditPresenter->SetInitialBounds(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + Invalidate(true); + return r; +} + +String +_TokenEdit::GetTitleText(void) const +{ + SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance must not be null."); + + return __pTokenEditPresenter->GetTitleText(); +} + +void +_TokenEdit::SetAutoShrinkModeEnabled(bool enable) +{ + SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance must not be null."); + + __pTokenEditPresenter->SetAutoShrinkModeEnabled(enable); + + return; +} + +bool +_TokenEdit::IsAutoShrinkModeEnabled(void) const +{ + SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance must not be null."); + + return __pTokenEditPresenter->IsAutoShrinkModeEnabled(); +} + +result +_TokenEdit::ProcessTokenFiltering(const String& inputString, String& replaceString, bool& enable) +{ + if (__pTokenFilter) + { + enable = __pTokenFilter->ReplaceToken(inputString, replaceString); + } + + return E_SUCCESS; +} + +bool +_TokenEdit::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + if (&source != this) + { + return false; + } + + if (__pTokenEditPresenter == null) + { + return false; + } + return __pTokenEditPresenter->OnTouchPressed(source, touchinfo); +} + +bool +_TokenEdit::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + if (&source != this) + { + return false; + } + if (__pTokenEditPresenter == null) + { + return false; + } + return __pTokenEditPresenter->OnTouchReleased(source, touchinfo); +} + +bool +_TokenEdit::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + if (&source != this) + { + return false; + } + if (__pTokenEditPresenter == null) + { + return false; + } + return __pTokenEditPresenter->OnTouchMoved(source, touchinfo); +} + +result +_TokenEdit::SetPropertyNormalTokenColor(const Variant& color) +{ + ClearLastResult(); + + SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance is null"); + + __tokenColor[TOKEN_EDIT_STATUS_NORMAL] = color.ToColor(); + + return __pTokenEditPresenter->LoadTokenBgBitmap(TOKEN_EDIT_STATUS_NORMAL); +} + +Variant +_TokenEdit::GetPropertyNormalTokenColor(void) const +{ + ClearLastResult(); + + return Variant(__tokenColor[TOKEN_EDIT_STATUS_NORMAL]); +} + +result +_TokenEdit::SetPropertySelectedTokenColor(const Variant& color) +{ + ClearLastResult(); + + SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance is null"); + + __tokenColor[TOKEN_EDIT_STATUS_SELECTED] = color.ToColor(); + + return __pTokenEditPresenter->LoadTokenBgBitmap(TOKEN_EDIT_STATUS_SELECTED); +} + +Variant +_TokenEdit::GetPropertySelectedTokenColor(void) const +{ + ClearLastResult(); + + return Variant(__tokenColor[TOKEN_EDIT_STATUS_SELECTED]); +} + +result +_TokenEdit::SetPropertyHighlightedTokenColor(const Variant& color) +{ + ClearLastResult(); + + SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance is null"); + + __tokenColor[TOKEN_EDIT_STATUS_HIGHLIGHTED] = color.ToColor(); + + return __pTokenEditPresenter->LoadTokenBgBitmap(TOKEN_EDIT_STATUS_HIGHLIGHTED); +} + +Variant +_TokenEdit::GetPropertyHighlightedTokenColor(void) const +{ + ClearLastResult(); + + return Variant(__tokenColor[TOKEN_EDIT_STATUS_HIGHLIGHTED]); +} + +result +_TokenEdit::SetPropertyDisabledTokenColor(const Variant& color) +{ + ClearLastResult(); + + SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance is null"); + + __tokenColor[TOKEN_EDIT_STATUS_DISABLED] = color.ToColor(); + + return __pTokenEditPresenter->LoadTokenBgBitmap(TOKEN_EDIT_STATUS_DISABLED); +} + +Variant +_TokenEdit::GetPropertyDisabledTokenColor(void) const +{ + ClearLastResult(); + + return Variant(__tokenColor[TOKEN_EDIT_STATUS_DISABLED]); +} + +result +_TokenEdit::SetPropertyTokenTextColor(const Variant& color) +{ + ClearLastResult(); + + __tokenTextColor[EXPANDABLE_EDIT_AREA_TOKEN_STATUS_NORMAL] = color.ToColor(); + if (!__isSelectedTokenTextColorSet) + { + __tokenTextColor[EXPANDABLE_EDIT_AREA_TOKEN_STATUS_SELECTED] = color.ToColor(); + } + + return E_SUCCESS; +} + +Variant +_TokenEdit::GetPropertyTokenTextColor(void) const +{ + ClearLastResult(); + + return Variant(__tokenTextColor[EXPANDABLE_EDIT_AREA_TOKEN_STATUS_NORMAL]); +} + +result +_TokenEdit::SetPropertySelectedTokenTextColor(const Variant& color) +{ + ClearLastResult(); + + __isSelectedTokenTextColorSet = true; + + __tokenTextColor[EXPANDABLE_EDIT_AREA_TOKEN_STATUS_SELECTED] = color.ToColor(); + + return E_SUCCESS; +} + +Variant +_TokenEdit::GetPropertySelectedTokenTextColor(void) const +{ + ClearLastResult(); + + return Variant(__tokenTextColor[EXPANDABLE_EDIT_AREA_TOKEN_STATUS_SELECTED]); +} + +result +_TokenEdit::SetPropertyTokenEditModeEnabled(const Variant& enable) +{ + SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance must not be null."); + + ClearLastResult(); + + return __pTokenEditPresenter->SetTokenEditModeEnabled(enable.ToBool()); +} + +Variant +_TokenEdit::GetPropertyTokenEditModeEnabled(void) const +{ + SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance must not be null."); + + ClearLastResult(); + + bool enabled = __pTokenEditPresenter->IsTokenEditModeEnabled(); + + return Variant(enabled); +} + +result +_TokenEdit::OnAttachedToMainTree(void) +{ + _AccessibilityContainer* pContainer = null; + pContainer = GetAccessibilityContainer(); + if (pContainer) + { + if (__pTitleTextAccessibilityElement) + { + return E_SUCCESS; + } + pContainer->AddListener(*this); + UpdateAccessibilityElement(EDIT_ACCESSIBILITY_ELEMENT_TYPE_TEXT); + } + + return E_SUCCESS; +} + +void +_TokenEdit::OnBoundsChanged(void) +{ + SysAssertf(__pTokenEditPresenter != null, "_TokenEditPresenter instance must not be null."); + + __pTokenEditPresenter->OnBoundsChanged(); + + return; +} + +bool +_TokenEdit::OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return __pTokenEditPresenter->OnAccessibilityFocusIn(control, element); +} + +bool +_TokenEdit::OnAccessibilityFocusOut(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return __pTokenEditPresenter->OnAccessibilityFocusOut(control, element); +} + +bool +_TokenEdit::OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return __pTokenEditPresenter->OnAccessibilityActionPerformed(control, element); +} + +void +_TokenEdit::UpdateAccessibilityElement(EditAccessibilityElementType type) +{ + _AccessibilityElement* pTextAccessibilityElement = _Edit::GetTextAccessibilityElement(); + String spaceString(L" "); + switch (type) + { + case EDIT_ACCESSIBILITY_ELEMENT_TYPE_TEXT: + if (pTextAccessibilityElement) + { + pTextAccessibilityElement->SetBounds(FloatRectangle(0.0f, 0.0f, GetBoundsF().width, GetBoundsF().height)); + if (GetTokenCount()) + { + pTextAccessibilityElement->SetLabel(GetTitleText() + spaceString + __pTokenEditPresenter->GetTextAccessibilityElementText()); + } + else + { + pTextAccessibilityElement->SetLabel(GetTitleText() + spaceString + GetGuideText() + GetText()); + } + pTextAccessibilityElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_EDIT_T_TTS"); + + pTextAccessibilityElement->SetSupportOperatingGesture(false); + } + break; + + default: + break; + } + + return; +} + +_AccessibilityElement* +_TokenEdit::GetTitleTextAccessibilityElement(void) const +{ + return __pTitleTextAccessibilityElement; +} + +_AccessibilityElement* +_TokenEdit::GetCursorAccessibilityElement(void) const +{ + return __pCursorAccessibilityElement; +} + +result +_TokenEdit::AddTitleAccessibilityElement(void) +{ + result r = E_SUCCESS; + + if (!(GetEditStyle() & EDIT_STYLE_TITLE_LEFT)) + { + return r; + } + + if (__pTitleTextAccessibilityElement) + { + return r; + } + + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + + if (pContainer) + { + _AccessibilityElement* pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true); + SysTryReturnResult(NID_UI_CTRL, pAccessibilityElement != null, E_OUT_OF_MEMORY, "Memory allocation failed."); + + String labelText = GetTitleText(); + pAccessibilityElement->SetBounds(__pTokenEditPresenter->GetTitleTextRect()); + pAccessibilityElement->SetLabel(labelText); + pContainer->AddElement(*pAccessibilityElement); + __pTitleTextAccessibilityElement = pAccessibilityElement; + } + + return r; +} + +result +_TokenEdit::AddCursorAccessibilityElement(void) +{ + result r = E_SUCCESS; + + if (__pCursorAccessibilityElement) + { + return r; + } + + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + + if (pContainer) + { + _AccessibilityElement* pAccessibilityElement = new (std::nothrow) _AccessibilityElement(true); + SysTryReturnResult(NID_UI_CTRL, pAccessibilityElement != null, E_OUT_OF_MEMORY, "Memory allocation failed."); + + if (GetTextLength()) + { + pAccessibilityElement->SetLabel(GetText()); + } + else + { + pAccessibilityElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_EDIT_FIELD_M_NOUN_T_TTS"); + } + + pContainer->AddElement(*pAccessibilityElement); + + __pCursorAccessibilityElement = pAccessibilityElement; + + SetCursorAccessibilityBounds(__pTokenEditPresenter->GetTextBoundsF()); + } + + return r; +} + +result +_TokenEdit::SetCursorAccessibilityBounds(const FloatRectangle& cursorBounds) +{ + if (!__pCursorAccessibilityElement) + { + return E_SUCCESS; + } + __pCursorAccessibilityElement->SetBounds(cursorBounds); + + return E_SUCCESS; +} + +void +_TokenEdit::RemoveTitleAccessibilityElement(void) +{ + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + if (pContainer) + { + if (__pTitleTextAccessibilityElement) + { + pContainer->RemoveElement(*__pTitleTextAccessibilityElement); + __pTitleTextAccessibilityElement = null; + } + } + + return; +} + +void +_TokenEdit::RemoveCursorAccessibilityElement(void) +{ + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + if (pContainer) + { + if (__pCursorAccessibilityElement) + { + pContainer->RemoveElement(*__pCursorAccessibilityElement); + __pCursorAccessibilityElement = null; + } + } + + return; +} + +void +_TokenEdit::OnDrawFocus(void) +{ + //Exit Token editing/pressed mode + __pTokenEditPresenter->PrepareFocusUiMode(); + + __pTokenEditPresenter->SetDrawFocusState(true); + + return; +} + +void +_TokenEdit::OnFocusModeStateChanged(void) +{ + //Reset focus index here + __pTokenEditPresenter->SetDrawFocusState(false); + + return; +} + +}}} //Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_TokenEditModel.cpp b/src/ui/controls/FUiCtrl_TokenEditModel.cpp new file mode 100644 index 0000000..ced08d8 --- /dev/null +++ b/src/ui/controls/FUiCtrl_TokenEditModel.cpp @@ -0,0 +1,35 @@ +// +// 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_TokenEditModel.cpp + * @brief This is the implementation file for the _TokenEditModel class. + */ + +#include "FUiCtrl_TokenEditModel.h" + +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 new file mode 100644 index 0000000..394288d --- /dev/null +++ b/src/ui/controls/FUiCtrl_TokenEditPresenter.cpp @@ -0,0 +1,4857 @@ +// +// 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_TokenEditPresenter.cpp + * @brief This is the implementation file for the _TokenEditPresenter class. + */ +#include +#include +#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" +#include "FUi_Math.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_AccessibilityContainer.h" +#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; +using namespace Tizen::Ui::Animations; +using namespace Tizen::Graphics; +using namespace Tizen::Graphics::_Text; + +namespace Tizen { namespace Ui { namespace Controls +{ + +float +SineTimingFunction::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 timeProgressValue = timeProgress; + int segmentsLength = 3; //Length of the segments array + int index = (int) floor(segmentsLength * timeProgressValue); + if (index >= segmentsLength) + { + index = segmentsLength - 1; + } + + float progressValue = (timeProgressValue - index * (1.0 / segmentsLength)) * segmentsLength; + float segmentAtIndex[3]; + for (int i = 0; i < 3; i++) + { + segmentAtIndex[i] = segments[index][i]; + } + float ret = 0 + 1 * (segmentAtIndex[0] + progressValue * (2 * (1 - progressValue) * (segmentAtIndex[1] - segmentAtIndex[0]) + progressValue * (segmentAtIndex[2] - segmentAtIndex[0]))); + + return ret; +} + +class _Token + : public Object +{ +public: + _Token(void); + result Construct(const String& text, Font* pEditFont); + virtual ~_Token(void); + float GetTextPixelWidth(void) const; + wchar_t* GetText(void) const; + result ResetToken(const String& text); + result SetBounds(FloatRectangle bounds); + _VisualElement* GetVisualElement(void) const; + _Token(const _Token& src); + _Token& operator =(const _Token& value); + +public: + FloatRectangle displayRect; + TextObject* pTextObject; + Font* pFont; + int currTokenLength; + bool isImplicitAnimation; + bool isTextCut; +private: + wchar_t* __pTextBuffer; + float __textPixelWidth; + float __textPixelHeight; + _VisualElement* __pVisualElement; +}; // _Token + +_Token::_Token(void) + : pTextObject(null) + , pFont(null) + , currTokenLength(0) + , isImplicitAnimation(true) + , isTextCut(false) + , __pTextBuffer(null) + , __textPixelWidth(0.0f) + , __textPixelHeight(0.0f) + , __pVisualElement(null) +{ +} + +result +_Token::Construct(const String& text, Font* pEditFont) +{ + result r = E_SUCCESS; + + currTokenLength = text.GetLength(); + float tokenFontSize = 0.0f; + + pTextObject = new (std::nothrow) TextObject(); + SysTryReturnResult(NID_UI_CTRL, pTextObject != null, E_OUT_OF_MEMORY, "Memory allocation failed."); + + // for default initialize. + r = pTextObject->Construct(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT | TEXT_OBJECT_ALIGNMENT_MIDDLE); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_TEXT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, tokenFontSize); + + pFont = _FontImpl::CloneN(*pEditFont); + r = GetLastResult(); + SysTryCatch(NID_UI_CTRL, pFont != null, , r, "[%s] Propagating.", GetErrorMessage(r)); + + (_FontImpl::GetInstance(*pFont))->SetStyle(FONT_STYLE_PLAIN); + (_FontImpl::GetInstance(*pFont))->SetSize(tokenFontSize); + + r = pTextObject->SetFont(pFont, 0, pTextObject->GetTextLength()); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + 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, "[%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)); + + __pVisualElement->SetImplicitAnimationEnabled(false); + __pVisualElement->SetOpacity(0.0f); + + return r; + +CATCH: + delete pTextObject; + pTextObject = null; + + if (__pVisualElement != null) + { + __pVisualElement->Destroy(); + __pVisualElement = null; + } + + delete pFont; + pFont = null; + + return r; +} + +result +_Token::ResetToken(const String& text) +{ + result r = E_SUCCESS; + FloatDimension textSize; + + if (__pTextBuffer != null) + { + delete[] __pTextBuffer; + __pTextBuffer = null; + } + + int length = text.GetLength(); + wchar_t* pTempString = const_cast< wchar_t* >(text.GetPointer()); + SysTryReturnResult(NID_UI_CTRL, pTempString != null, E_SYSTEM, "A system error has occurred. Token text string is null."); + + __pTextBuffer = new (std::nothrow) wchar_t[(length + 1) * (sizeof(wchar_t))]; + SysTryReturnResult(NID_UI_CTRL, __pTextBuffer != null, E_OUT_OF_MEMORY, "Memory allocation failed."); + + for (int i = 0; i < length; i++) + { + __pTextBuffer[i] = pTempString[i]; + } + __pTextBuffer[length] = 0; + + 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, "[%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)); + + textSize = pTextObject->GetTextExtentF(0, length); + __textPixelWidth = textSize.width; + __textPixelHeight = textSize.height; + + r = pTextObject->Compose(); + + currTokenLength = length; + + return E_SUCCESS; + +CATCH: + delete[] __pTextBuffer; + __pTextBuffer = null; + + delete pSimpleText; + pSimpleText = null; + + return E_SYSTEM; +} + +result +_Token::SetBounds(FloatRectangle bounds) +{ + result r = E_SUCCESS; + displayRect = bounds; + if (__pVisualElement != null) + { + __pVisualElement->SetBounds(bounds); + } + return r; +} + +_VisualElement* +_Token::GetVisualElement(void) const +{ + return __pVisualElement; +} + +_Token::~_Token(void) +{ + delete pTextObject; + pTextObject = null; + + delete pFont; + pFont = null; + + delete[] __pTextBuffer; + __pTextBuffer = null; + + if (__pVisualElement != null) + { + __pVisualElement->Destroy(); + __pVisualElement = null; + } +} + +float +_Token::GetTextPixelWidth(void) const +{ + return __textPixelWidth; +} + +wchar_t* +_Token::GetText(void) const +{ + return __pTextBuffer; +} + +_TokenEditPresenter::_TokenEditPresenter(void) + : __pTokenEdit(null) + , __pTokenList(null) + , __pReplacedTokenBgNormalBitmap(null) + , __pReplacedTokenBgSelectedBitmap(null) + , __pReplacedTokenBgHighlightedBitmap(null) + , __pReplacedTokenBgDisabledBitmap(null) + , __pTokenBgNormalEffectBitmap(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) + , __pTitleTextVisualElement(null) + , __pFocusRingVisualElement(null) + , __pTitleTextObject(null) + , __isTokenEditingFinished(false) + , __prevScrollValue(0.0f) + , __scrollValue(0.0f) + , __isTokenScrolling(false) + , __isNeedToScroll(false) + , __maxScrollValue(0.0f) + , __autoShrink(false) + , __titleText(String()) + , __isPopupVisible(false) + , __isLongPressed(false) + , __lineSpacing(0.0f) + , __animatingIndex(-1) + , __lastTokenIndex(-1) + , __pTimingFunction(null) + , __titleTextRectForScroll(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f)) + , __previousTitleWidth(-1.0f) + , __isTokenEditPresenterInitialized(false) + , __isFocus(false) + , __previousCursorPosition(0) + , __isScrollValueChanged(false) + , __lineAdded(0) + , __isScrollValueModified(false) + , __isTouchMoveInProgress(false) + , __isTitleSliding(false) + , __touchPressInfo(FloatPoint(-1.0f, -1.0f)) + , __editContentFontSize(0.0f) + , __trackTokenIndex(-1) + , __isAnimationInProgress(false) + , __focusOutIndex(-1) + , __accessibilityElements() + , __focusedTokenIndex(-1) + , __drawFocusState(false) + , __accessibilityFocusIn(false) + , __transactionId(0) + , __isDestroyed(false) +{ +} + +result +_TokenEditPresenter::InitializeTitleText(void) +{ + result r = E_SUCCESS; + + __pTitleTextObject = new (std::nothrow) TextObject(); + SysTryReturnResult(NID_UI_CTRL, __pTitleTextObject != null, E_OUT_OF_MEMORY, "Memory allocation failed."); + + // for default initialize. + r = __pTitleTextObject->Construct(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __pTitleTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_CENTER | TEXT_OBJECT_ALIGNMENT_MIDDLE); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __pTitleTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + +CATCH: + + delete __pTitleTextObject; + __pTitleTextObject = null; + + return r; +} + +_TokenEditPresenter::~_TokenEditPresenter(void) +{ + DisposeTokenEditPresenter(); +} + +result +_TokenEditPresenter::DisposeTokenEditPresenter(void) +{ + _VisualElement* pEditVisualElement = __pTokenEdit->GetVisualElement(); + _VisualElement* pCursorVisualElement = GetCursorVisualElement(); + + if (pEditVisualElement != null && pCursorVisualElement != null) + { + VisualElement* pCursorParent = pCursorVisualElement->GetParent(); + if (pCursorParent != pEditVisualElement) + { + if (pCursorParent != null) + { + pCursorParent->DetachChild(*pCursorVisualElement); + pEditVisualElement->AttachChild(*pCursorVisualElement); + } + } + } + + __isDestroyed = true; + AnimationTransaction::Stop(__transactionId); //Stop the animation transaction + + if (__pTokenList != null) + { + __pTokenList->RemoveAll(true); + delete __pTokenList; + __pTokenList = null; + } + + delete __pReplacedTokenBgNormalBitmap; + __pReplacedTokenBgNormalBitmap = null; + + delete __pReplacedTokenBgSelectedBitmap; + __pReplacedTokenBgSelectedBitmap = null; + + delete __pReplacedTokenBgHighlightedBitmap; + __pReplacedTokenBgHighlightedBitmap = null; + + delete __pReplacedTokenBgDisabledBitmap; + __pReplacedTokenBgDisabledBitmap = null; + + delete __pTokenBgNormalEffectBitmap; + __pTokenBgNormalEffectBitmap = null; + + delete __pTokenBgSelectedEffectBitmap; + __pTokenBgSelectedEffectBitmap = null; + + delete __pTokenBgHighlightedEffectBitmap; + __pTokenBgHighlightedEffectBitmap = null; + + if (__pTitleTextVisualElement != null) + { + __pTitleTextVisualElement->Destroy(); + __pTitleTextVisualElement = null; + } + + if (__pFocusRingVisualElement != null) + { + __pFocusRingVisualElement->Destroy(); + __pFocusRingVisualElement = null; + } + + delete __pTitleTextObject; + __pTitleTextObject = null; + + delete __pTimingFunction; + __pTimingFunction = null; + + RemoveChildAccessibilityElements(); + + return E_SUCCESS; +} + +_TokenEditPresenter* +_TokenEditPresenter::CreateTokenEditPresenterN(void) +{ + _TokenEditPresenter* pPresenter = new (std::nothrow) _TokenEditPresenter(); + SysTryReturn(NID_UI_CTRL, pPresenter != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + return pPresenter; +} + +result +_TokenEditPresenter::Initialize(const _Control& control) +{ + result r = E_SUCCESS; + + r = _EditPresenter::Initialize(control); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + 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_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 _TokenEdit instance is null."); + + _TokenEditModel* pTokenEditModel = new (std::nothrow) _TokenEditModel(); + SysTryReturnResult(NID_UI_CTRL, pTokenEditModel != null, E_OUT_OF_MEMORY, "Memory allocation failed."); + + SetModel(*pTokenEditModel); + + SetKeypadEnabled(true); + + // set title text default colors + Color titleTextNormalColor; + GET_COLOR_CONFIG(TOKENEDIT::TITLE_TEXT_NORMAL, titleTextNormalColor); + __pTokenEdit->SetTitleTextColor(EDIT_STATUS_NORMAL, titleTextNormalColor); + + Color titleTextPressedColor; + GET_COLOR_CONFIG(TOKENEDIT::TITLE_TEXT_PRESSED, titleTextPressedColor); + __pTokenEdit->SetTitleTextColor(EDIT_STATUS_PRESSED, titleTextPressedColor); + + Color titleTextHighlightedColor; + GET_COLOR_CONFIG(TOKENEDIT::TITLE_TEXT_HIGHLIGHTED, titleTextHighlightedColor); + __pTokenEdit->SetTitleTextColor(EDIT_STATUS_HIGHLIGHTED, titleTextHighlightedColor); + + Color titleTextDisabledColor; + GET_COLOR_CONFIG(TOKENEDIT::TITLE_TEXT_DISABLED, titleTextDisabledColor); + __pTokenEdit->SetTitleTextColor(EDIT_STATUS_DISABLED, titleTextDisabledColor); + + Color tokenEditBgNormal; + GET_COLOR_CONFIG(TOKENEDIT::EDIT_BG_NORMAL, tokenEditBgNormal); + __pTokenEdit->SetColor(EDIT_STATUS_NORMAL, tokenEditBgNormal); + + Color tokenEditBgPressed; + GET_COLOR_CONFIG(TOKENEDIT::EDIT_BG_PRESSED, tokenEditBgPressed); + __pTokenEdit->SetColor(EDIT_STATUS_PRESSED, tokenEditBgPressed); + + Color tokenEditBgHighlighted; + GET_COLOR_CONFIG(TOKENEDIT::EDIT_BG_HIGHLIGHTED, tokenEditBgHighlighted); + __pTokenEdit->SetColor(EDIT_STATUS_HIGHLIGHTED, tokenEditBgHighlighted); + + Color tokenEditBgDisabled; + GET_COLOR_CONFIG(TOKENEDIT::EDIT_BG_DISABLED, tokenEditBgDisabled); + __pTokenEdit->SetColor(EDIT_STATUS_DISABLED, tokenEditBgDisabled); + + Color tokenEditTextNormal; + GET_COLOR_CONFIG(TOKENEDIT::EDIT_TEXT_NORMAL, tokenEditTextNormal); + __pTokenEdit->SetTextColor(EDIT_TEXT_COLOR_NORMAL, tokenEditTextNormal); + + Color tokenEditTextHighlighted; + GET_COLOR_CONFIG(TOKENEDIT::EDIT_TEXT_HIGHLIGHTED, tokenEditTextHighlighted); + __pTokenEdit->SetTextColor(EDIT_TEXT_COLOR_HIGHLIGHTED, tokenEditTextHighlighted); + + Color tokenEditTextDisabled; + GET_COLOR_CONFIG(TOKENEDIT::EDIT_TEXT_DISABLED, tokenEditTextDisabled); + __pTokenEdit->SetTextColor(EDIT_TEXT_COLOR_DISABLED, tokenEditTextDisabled); + + Color tokenGuideTextNormal; + GET_COLOR_CONFIG(TOKENEDIT::GUIDE_TEXT_NORMAL, tokenGuideTextNormal); + __pTokenEdit->SetGuideTextColor(tokenGuideTextNormal); + + float leftMargin = 0.0f; + float rightMargin = 0.0f; + float tokenTopMargin = 0.0f; + float tokenBottomMargin = 0.0f; + float tokenHeight = 0.0f; + _ControlOrientation orientation = __pTokenEdit->GetOrientation(); + 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); + + // For drawing token in specific area + __clientRect.x = leftMargin; + __clientRect.y = tokenTopMargin; + __clientRect.width = __pTokenEdit->GetBoundsF().width - leftMargin - rightMargin; + __clientRect.height = __pTokenEdit->GetBoundsF().height - tokenTopMargin - tokenBottomMargin; + + __initTextRect = GetTextBoundsF(); + + FloatRectangle tempDspRect(__initTextRect.x, __initTextRect.y, __clientRect.width, tokenHeight); + SetTextBounds(tempDspRect); + + float textSize = 0.0f; + GET_SHAPE_CONFIG(TOKENEDIT::TEXT_SIZE, orientation, textSize); + + __editContentFontSize = textSize; + + _EditPresenter::SetTextSize(__editContentFontSize); + + __pTokenList = new (std::nothrow) Collection::LinkedList(); + SysTryCatch(NID_UI_CTRL, __pTokenList != null, , r = E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + __delimiter = L"\n"; + + 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)); + + 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)); + + 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)); + + 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)); + + 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)); + + 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; + + __previousCursorPosition = GetCursorPosition(); + + return r; + +CATCH: + + delete pTokenEditModel; + pTokenEditModel = null; + + delete __pReplacedTokenBgNormalBitmap; + __pReplacedTokenBgNormalBitmap = null; + + delete __pReplacedTokenBgSelectedBitmap; + __pReplacedTokenBgSelectedBitmap = null; + + delete __pReplacedTokenBgHighlightedBitmap; + __pReplacedTokenBgHighlightedBitmap = null; + + delete __pReplacedTokenBgDisabledBitmap; + __pReplacedTokenBgDisabledBitmap = null; + + delete __pTokenBgNormalEffectBitmap; + __pTokenBgNormalEffectBitmap = null; + + delete __pTokenBgSelectedEffectBitmap; + __pTokenBgSelectedEffectBitmap = null; + + return r; +} + +void +_TokenEditPresenter::DrawText(void) +{ + bool isCustomBitmap = IS_CUSTOM_BITMAP(TOKENEDIT::BG_NORMAL); + //Checking IsBlocked() is additional check for handler movement in token edit mode + if ((__isEditingToken) && (__editingTokenIndex >= 0)) + { + _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex)); + if (pToken != null) + { + _VisualElement* pTokenVisualElement = pToken->GetVisualElement(); + 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, "[%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); + if (__pReplacedTokenBgSelectedBitmap != null) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pReplacedTokenBgSelectedBitmap)) + { + pTokenCanvas->DrawNinePatchedBitmap(tokenRect, *__pReplacedTokenBgSelectedBitmap); + } + else + { + pTokenCanvas->DrawBitmap(tokenRect, *__pReplacedTokenBgSelectedBitmap); + } + } + else + { + pTokenCanvas->FillRectangle(selectedTokenColor, tokenRect); + } + + if (__pTokenBgSelectedEffectBitmap != null && (!isCustomBitmap)) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pTokenBgSelectedEffectBitmap)) + { + pTokenCanvas->DrawNinePatchedBitmap(tokenRect, *__pTokenBgSelectedEffectBitmap); + } + else + { + pTokenCanvas->DrawBitmap(tokenRect, *__pTokenBgSelectedEffectBitmap); + } + } + + _EditPresenter::DrawText(*pTokenCanvas); + + delete pTokenCanvas; + pTokenCanvas = null; + } + } + else + { + _VisualElement* pTextVisualElement = null; + pTextVisualElement = GetTextVisualElement(); + if (pTextVisualElement != null) + { + _EditPresenter::DrawText(); + } + else + { + Canvas* pCanvas = __pTokenEdit->GetCanvasN(); + 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); + + delete pCanvas; + pCanvas = null; + } + } + + return; +} + +result +_TokenEditPresenter::Draw(void) +{ + result r = E_SUCCESS; + _VisualElement* pEditVisualElement = null; + _VisualElement* pCursorVisualElement = null; + _Token* pToken = null; + _VisualElement* pTokenVisualElement = null; + + if (!IsInitialized()) + { + InitializeAtFirstDrawing(); + + if (IsCurrentFocused()) + { + ShowKeypad(false); + } + } + + //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."); + + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + + DrawBackground(*pCanvas); + + DrawScrollBar(); + + if (__pTitleTextObject->GetTextLength() != 0) + { + DrawTitleText(); + } + + if (GetTokenCount() != 0) + { + DrawToken(); + } + + pEditVisualElement = __pTokenEdit->GetVisualElement(); + SysTryCatch(NID_UI_CTRL, pEditVisualElement, , r = E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get _TokenEdit 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."); + + pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex)); + + if (pToken != null) + { + 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(); + 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); + + InitializeCursor(); + + delete pTokenCanvas; + pTokenCanvas = null; + } + else + { + DrawText(); + InitializeCursor(); + } + } + else + { + SysTryCatch(NID_UI_CTRL, !__isEditingToken, , r = E_SYSTEM, "[E_SYSTEM] An invalid argument is given."); + + DrawText(); + InitializeCursor(); + } + + if (__isTokenEditingFinished) + { + __isEditingToken = false; + __editingTokenIndex = -1; + _EditPresenter::SetTextSize(__editContentFontSize); + + __isTokenEditingFinished = false; + } + + RestoreCopyPasteManager(); + + //fall through +CATCH: + delete pCanvas; + + return r; +} + +bool +_TokenEditPresenter::DrawToken(int count) +{ + int drawStartIndex = 0; + int tokenCount = 0; + float tokenTextLeftMargin = 0.0f; + float tokenVerticalSpacing = 0.0f; + bool isCustomBitmap = false; + bool isCustomFocusBitmap = false; + + 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(); + + GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_TEXT_LEFT_MARGIN, orientation, tokenTextLeftMargin); + GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_VERTICAL_SPACING, orientation, tokenVerticalSpacing); + + isCustomBitmap = IS_CUSTOM_BITMAP(TOKENEDIT::BG_NORMAL); + isCustomFocusBitmap = IS_CUSTOM_BITMAP(TOKENEDIT::BG_FOCUS); + + if (count == -1) + { + tokenCount = __pTokenList->GetCount(); + } + else + { + tokenCount = count; + } + + Color normalTokenColor; + Color selectedTokenColor; + Color disabledTokenColor; + + for (int i = drawStartIndex; i < tokenCount; i++) + { + Bitmap* pReplacementColorBackgroundBitmap = null; + + _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(i)); + 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(); + 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(); + 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 (__pReplacedTokenBgSelectedBitmap != null) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pReplacedTokenBgSelectedBitmap)) + { + pTokenCanvas->DrawNinePatchedBitmap(tokenRect, *__pReplacedTokenBgSelectedBitmap); + } + else + { + pTokenCanvas->DrawBitmap(tokenRect, *__pReplacedTokenBgSelectedBitmap); + } + } + else + { + pTokenCanvas->FillRectangle(selectedTokenColor, tokenRect); + } + + if (__pTokenBgSelectedEffectBitmap != null && (!isCustomBitmap)) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pTokenBgSelectedEffectBitmap)) + { + pTokenCanvas->DrawNinePatchedBitmap(tokenRect, *__pTokenBgSelectedEffectBitmap); + } + else + { + pTokenCanvas->DrawBitmap(tokenRect, *__pTokenBgSelectedEffectBitmap); + } + } + + isSelected = true; + } + else + { + Color tokenBgColor = normalTokenColor; + pReplacementColorBackgroundBitmap = __pReplacedTokenBgNormalBitmap; + + if (GetCurrentStatus() == EDIT_STATUS_DISABLED) + { + tokenBgColor = disabledTokenColor; + pReplacementColorBackgroundBitmap = __pReplacedTokenBgDisabledBitmap; + } + + if (pReplacementColorBackgroundBitmap != null) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pReplacementColorBackgroundBitmap)) + { + pTokenCanvas->DrawNinePatchedBitmap(tokenRect, *pReplacementColorBackgroundBitmap); + } + else + { + pTokenCanvas->DrawBitmap(tokenRect, *pReplacementColorBackgroundBitmap); + } + } + else + { + pTokenCanvas->FillRectangle(tokenBgColor, tokenRect); + } + + + if (__pTokenBgNormalEffectBitmap != null && (!isCustomBitmap)) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pTokenBgNormalEffectBitmap)) + { + pTokenCanvas->DrawNinePatchedBitmap(tokenRect, *__pTokenBgNormalEffectBitmap); + } + else + { + pTokenCanvas->DrawBitmap(tokenRect, *__pTokenBgNormalEffectBitmap); + } + } + } + + if (__focusedTokenIndex == i && __drawFocusState && (!__isEditingToken)) + { + if (__pReplacedTokenBgHighlightedBitmap != null) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pReplacedTokenBgHighlightedBitmap)) + { + pTokenCanvas->DrawNinePatchedBitmap(tokenRect, *__pReplacedTokenBgHighlightedBitmap); + } + else + { + pTokenCanvas->DrawBitmap(tokenRect, *__pReplacedTokenBgHighlightedBitmap); + } + } + + if (__pTokenBgHighlightedEffectBitmap != null && (!isCustomFocusBitmap)) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pTokenBgHighlightedEffectBitmap)) + { + pTokenCanvas->DrawNinePatchedBitmap(tokenRect, *__pTokenBgHighlightedEffectBitmap); + } + else + { + pTokenCanvas->DrawBitmap(tokenRect, *__pTokenBgHighlightedEffectBitmap); + } + } + + } + + pTokenElement->SetAnimationProvider(null); + if (pToken->isImplicitAnimation) + { + VisualElementAnimation* pAnimation = CreateAnimationN(*pTokenElement); + pTokenElement->AddAnimation(*pAnimation); + delete pAnimation; + pToken->isImplicitAnimation = false; + } + + if (!__isEditingToken || __pressedTokenIndex != i) + { + Color textColor; + FloatRectangle textRect(0.0f, 0.0f, pToken->displayRect.width - ((tokenTextLeftMargin * 2.0f)), pToken->displayRect.height - tokenVerticalSpacing); + + textRect.x += tokenTextLeftMargin; + textRect.y += (tokenVerticalSpacing / 2.0f); + + if (isSelected) + { + textColor = GetTokenEditTextColor(TOKEN_EDIT_STATUS_SELECTED); + } + else + { + textColor = GetTokenEditTextColor(TOKEN_EDIT_STATUS_NORMAL); + } + + pToken->pTextObject->SetForegroundColor(textColor, 0, pToken->pTextObject->GetTextLength()); + pToken->pTextObject->SetBounds(textRect); + pToken->pTextObject->Compose(); + pToken->pTextObject->Draw(*_CanvasImpl::GetInstance(*pTokenCanvas)); + } + + pTokenElement->SetFlushNeeded(); + delete pTokenCanvas; + } + return true; +} + +Color +_TokenEditPresenter::GetTokenEditColor(const TokenEditStatus status) const +{ + 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); +} + +Color +_TokenEditPresenter::GetTokenEditTextColor(const TokenEditStatus status) const +{ + 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; + + if (status == TOKEN_EDIT_STATUS_NORMAL) + { + color = __pTokenEdit->GetTokenTextColor(); + } + else + { + color = __pTokenEdit->GetSelectedTokenTextColor(); + } + + return color; +} + +result +_TokenEditPresenter::MakeToken(const String& tokenString) +{ + SysTryReturnResult(NID_UI_CTRL, __pTokenEdit != null, E_INVALID_STATE, "__pTokenEdit must not be null."); + result r = E_SUCCESS; + + int tokenCount = 0; + int index = -1; + int tokenLength = tokenString.GetLength(); + SysTryReturnResult(NID_UI_CTRL, tokenLength, E_INVALID_ARG, "Invalid argument is used. Token length is (%d)", tokenLength); + + String inputTokenString = tokenString; + String replacementString = inputTokenString; + bool enable = false; + + __pTokenEdit->ProcessTokenFiltering(inputTokenString, replacementString, enable); + + if (enable) + { + inputTokenString = replacementString; + } + + if (inputTokenString.GetLength() <= 0) + { + r = ClearText(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to clear text object."); + + SysTryReturnResult(NID_UI_CTRL, false, E_INVALID_ARG, "Invalid argument is used. Input tokenString length is 0."); + } + + _Token* pToken = new (std::nothrow) _Token(); + SysTryReturnResult(NID_UI_CTRL, pToken != null, E_OUT_OF_MEMORY, "Memory allocation failed."); + + r = pToken->Construct(inputTokenString, GetFont()); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to construct token.", GetErrorMessage(r)); + + r = __pTokenList->Add(static_cast< Object& >(*pToken)); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + tokenCount = __pTokenList->GetCount(); + index = tokenCount - 1; + + r = CalculateTokenPositionFromIndex(index); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to calculate token position.", GetErrorMessage(r)); + + r = TrimTokenAndAdjustEllipsisAt(index); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to trim token.", GetErrorMessage(r)); + + r = InitializeTokenVisibilityAt(index); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to initialize token visibility.", GetErrorMessage(r)); + + r = SetInitialBounds(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to set bounds.", GetErrorMessage(r)); + + r = ClearText(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to clear text object.", GetErrorMessage(r)); + + r = AdjustFlexibleHeight(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to process to resize.", GetErrorMessage(r)); + + r = CheckTokenScrolling(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to process scroll.", GetErrorMessage(r)); + + AppendTokenAccessibilityElement(); + UpdateTokenAccessibilityBounds(); + + return r; + +CATCH: + __pTokenList->Remove(*pToken); + + delete pToken; + pToken = null; + + return r; +} + +result +_TokenEditPresenter::MakeToken(void) +{ + result r = E_SUCCESS; + + String tempToken(GetText()); + r = MakeToken(tempToken); + + return r; +} + +result +_TokenEditPresenter::AppendToken(const Tizen::Base::String& token) +{ + result r = E_SUCCESS; + + r = MakeToken(token); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + if (__editingTokenIndex >= 0) + { + SetEditingTokenTextBounds(__editingTokenIndex); + _EditPresenter::SetCursorPosition(__previousCursorPosition); + } + + return r; +} + +result +_TokenEditPresenter::InsertTokenAt(int index, const String& token, bool isUser) +{ + SysTryReturnResult(NID_UI_CTRL, index >= 0, E_INVALID_ARG, "Invalid argument is used. index is (%d).", index); + SysTryReturnResult(NID_UI_CTRL, token.GetLength() > 0, E_INVALID_ARG, "Invalid argument is used. Token length is (%d).", token.GetLength()); + + result r = E_SUCCESS; + + _Token* pToken = new (std::nothrow) _Token(); + SysTryReturnResult(NID_UI_CTRL, pToken != null, E_OUT_OF_MEMORY, "Memory allocation failed."); + + r = pToken->Construct(token, GetFont()); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to construct token.", GetErrorMessage(r)); + + r = __pTokenList->InsertAt(*pToken, index); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to insert token.", GetErrorMessage(r)); + + r = ClearText(); + + r = CalculateTokenPositionFromIndex(index); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to calculate token position.", GetErrorMessage(r)); + + r = TrimTokenAndAdjustEllipsisAt(index); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to trim token.", GetErrorMessage(r)); + + r = InitializeTokenVisibilityAt(index); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to initialize token visibility.", GetErrorMessage(r)); + + r = SetInitialBounds(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to set bounds.", GetErrorMessage(r)); + + r = AdjustFlexibleHeight(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to process to resize.", GetErrorMessage(r)); + + r = CheckTokenScrolling(); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Failed to process scroll.", GetErrorMessage(r)); + + for (int i = 0; i < GetTokenCount(); i++) + { + pToken = static_cast< _Token* >(__pTokenList->GetAt(i)); + 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)); + } + + InsertTokenAccessibilityElementAt(index); + UpdateTokenAccessibilityBounds(); + + if (isUser) + { + if (__editingTokenIndex >= 0) + { + if (index <= __editingTokenIndex) + { + __editingTokenIndex++; + } + __pressedTokenIndex = __editingTokenIndex; + + SetEditingTokenTextBounds(__editingTokenIndex); + _EditPresenter::SetCursorPosition(__previousCursorPosition); + } + else if (__pressedTokenIndex >= index) + { + __pressedTokenIndex++; + } + else if ((__focusedTokenIndex >= index) && __drawFocusState) + { + __focusedTokenIndex++; + } + } + + return r; + +CATCH: + __pTokenList->Remove(*pToken); + + delete pToken; + pToken = null; + + return r; +} + +String +_TokenEditPresenter::GetTokenAt(int index) const +{ + String tempString; + 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)); + if (pToken != null) + { + tempString = pToken->GetText(); + } + + return tempString; +} + +int +_TokenEditPresenter::GetTokenCount(bool isInvokedByApp) const +{ + if (!isInvokedByApp) + { + return __pTokenList->GetCount(); + } + else + { + if (__isAnimationInProgress) + { + return __pTokenList->GetCount() - 1; + } + else + { + return __pTokenList->GetCount(); + } + } +} + +int +_TokenEditPresenter::GetSelectedTokenIndex(void) const +{ + if (__drawFocusState) + { + return __focusedTokenIndex; + } + + return __pressedTokenIndex; +} + +bool +_TokenEditPresenter::IsTokenEditModeEnabled(void) const +{ + return __isEditModeEnabled; +} + +result +_TokenEditPresenter::RemoveTokenAt(int index, bool isClearText) +{ + result r = E_SUCCESS; + SysTryReturnResult(NID_UI_CTRL, index >= 0 && index < __pTokenList->GetCount(), E_OUT_OF_RANGE, "index (%d) is out of range.", index); + + if (index == __editingTokenIndex && isClearText) + { + _VisualElement* pEditVisualElement = __pTokenEdit->GetVisualElement(); + 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."); + + r = pCursorVisualElement->GetParent()->DetachChild(*pCursorVisualElement); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = pEditVisualElement->AttachChild(*pCursorVisualElement); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + __editingTokenIndex = -1; + __isEditingToken = false; + __pressedTokenIndex = -1; + __isTokenEditingFinished = true; + + r = ClearText(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "Failed to clear text object."); + + _EditPresenter::SetTextSize(__editContentFontSize); + } + + r = __pTokenList->RemoveAt(index, true); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to remove token."); + + 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."); + + _Token* pToken = null; + + for (int i = 0; i < GetTokenCount(); i++) + { + pToken = static_cast< _Token* >(__pTokenList->GetAt(i)); + SysTryReturnResult(NID_UI_CTRL, pToken != null, E_SYSTEM, "A system error has occurred. The _Token instance is null"); + + r = pToken->SetBounds(pToken->displayRect); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set bounds"); + } + + r = AdjustFlexibleHeight(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to process to resize."); + + r = CheckTokenScrolling(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to process scroll."); + + RemoveTokenAccessibilityElementAt(index); + UpdateTokenAccessibilityBounds(); + + if (isClearText) + { + if (index > __editingTokenIndex) + { + SetEditingTokenTextBounds(__editingTokenIndex); + _EditPresenter::SetCursorPosition(__previousCursorPosition); + } + if (index < __editingTokenIndex) + { + if (__editingTokenIndex > 0) + { + __editingTokenIndex--; + __pressedTokenIndex = __editingTokenIndex; + + SetEditingTokenTextBounds(__editingTokenIndex); + _EditPresenter::SetCursorPosition(__previousCursorPosition); + } + } + else if (index == __pressedTokenIndex) + { + __pressedTokenIndex = -1; + StopCursorTimer(); + SetCursorDisabled(false); + StartCursorTimer(); + } + else if (index >= 0 && index < __pressedTokenIndex) + { + __pressedTokenIndex--; + } + + if (__drawFocusState) + { + if (index == __focusedTokenIndex) + { + __focusedTokenIndex = -1; + StopCursorTimer(); + SetCursorDisabled(false); + StartCursorTimer(); + } + else if(index >= 0 && index < __focusedTokenIndex) + { + __focusedTokenIndex--; + } + } + } + else if (index == __pressedTokenIndex) + { + __pressedTokenIndex = -1; + StopCursorTimer(); + SetCursorDisabled(false); + StartCursorTimer(); + } + else if ((index == __focusedTokenIndex) && __drawFocusState) + { + __focusedTokenIndex = -1; + StopCursorTimer(); + SetCursorDisabled(false); + StartCursorTimer(); + } + + return r; +} + +result +_TokenEditPresenter::SetTokenSelected(int index, bool selected) +{ + result r = E_SUCCESS; + + SysTryReturnResult(NID_UI_CTRL, index >= 0 && index < __pTokenList->GetCount(), E_OUT_OF_RANGE, "index (%d) is out of range."); + + SetDrawFocusState(false); // Manual simulation of pressed token. + + if (!selected) + { + __pressedTokenIndex = -1; + } + else + { + __pressedTokenIndex = index; + } + + return r; +} + +result +_TokenEditPresenter::SetTokenEditModeEnabled(bool enable) +{ + result r = E_SUCCESS; + + __isEditModeEnabled = enable; + + return r; +} + +result +_TokenEditPresenter::CalculateTokenPositionFromIndex(int startIndex, bool leftWard) +{ + result r = E_SUCCESS; + + int tokenCount = __pTokenList->GetCount(); + + float leftMargin = 0.0f; + float rightMargin = 0.0f; + float tokenTopMargin = 0.0f; + float tokenBottomMargin = 0.0f; + float tokenHeight = 0.0f; + float tokenVerticalSpacing = 0.0f; + float tokenHorizontalSpacing = 0.0f; + float tokenTextLeftMargin = 0.0f; + float tokenTextRightMargin = 0.0f; + float titleTextRightMargin = 0.0f; + _ControlOrientation orientation = __pTokenEdit->GetOrientation(); + + 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_SHAPE_CONFIG(TOKENEDIT::TOKEN_VERTICAL_SPACING, orientation, tokenVerticalSpacing); + 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, titleTextRightMargin); + + 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; + + int index = startIndex; + + FloatRectangle tokenEditBounds = __pTokenEdit->GetBoundsF(); + String titleText = __pTokenEdit->GetTitleText(); + + if (!_FloatCompare(GetTitleTextRect().width, __previousTitleWidth)) + { + __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, "[%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 = __titleTextRectForScroll.x + __titleTextRectForScroll.width + titleTextRightMargin; + pToken->displayRect.y = __titleTextRectForScroll.y + __scrollValue; + } + else // Set description text. + { + pToken->displayRect.x = leftMargin + __pTokenEdit->GetHorizontalMarginF(EDIT_TEXT_LEFT_MARGIN); + pToken->displayRect.y = tokenTopMargin + __scrollValue + __pTokenEdit->GetVerticalMarginF(EDIT_TEXT_TOP_MARGIN) + __lineSpacing; + + } + pToken->displayRect.width = tokenTextLeftMargin + pToken->GetTextPixelWidth() + tokenTextRightMargin; + + } + else + { + if (findPrevTokenLoopFlag) + { + pPreviousToken = static_cast< _Token* >(__pTokenList->GetAt(index - 1)); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, pPreviousToken != null, r, "Propagating."); + + findPrevTokenLoopFlag = false; + } + + float tempTextWidth = tokenEditBounds.width - pPreviousToken->displayRect.x - pPreviousToken->displayRect.width - tokenHorizontalSpacing - rightMargin - __pTokenEdit->GetHorizontalMarginF(EDIT_TEXT_RIGHT_MARGIN); + if (tokenTextLeftMargin + pToken->GetTextPixelWidth() + tokenTextRightMargin > tempTextWidth) // Line change + { + pToken->displayRect.x = leftMargin + __pTokenEdit->GetHorizontalMarginF(EDIT_TEXT_LEFT_MARGIN); + pToken->displayRect.y = pPreviousToken->displayRect.y + tokenHeight + tokenVerticalSpacing + __lineSpacing; + __lineAdded++; + } + else + { + pToken->displayRect.x = pPreviousToken->displayRect.x + pPreviousToken->displayRect.width + + tokenHorizontalSpacing; + pToken->displayRect.y = pPreviousToken->displayRect.y; + } + + pToken->displayRect.width = tokenTextLeftMargin + pToken->GetTextPixelWidth() + tokenTextRightMargin; + } + + pToken->displayRect.height = tokenHeight; + + pPreviousToken = pToken; + } + + for (int i = 0; i < __pTokenList->GetCount(); i++) + { + TrimTokenAndAdjustEllipsisAt(i); + InitializeTokenVisibilityAt(i); + } + return r; +} + +result +_TokenEditPresenter::InitializeTokenVisibilityAt(int ndex) +{ + result r = E_SUCCESS; + + _Token* pToken = null; + pToken = static_cast< _Token* >(__pTokenList->GetAt(ndex)); + 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, "[%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, "[%s] A system error has occurred. Failed to get token _VisualElement.", GetErrorMessage(E_SYSTEM)); + + pVisualElement->SetShowState(true); + + r = pRootElement->AttachChild(*pVisualElement); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Failed to add child", GetErrorMessage(r)); + + return r; +} + +float +_TokenEditPresenter::GetMaxTextHeight(void) +{ + Font* pFont = null; + float maxHeight = __editContentFontSize; + + pFont = GetFont(); + 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(); + + return maxHeight; +} + +void +_TokenEditPresenter::ResetTextBounds(void) +{ + if (!__isEditingToken) + { + result r = SetInitialBounds(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[%s] A system error has occured. Failed to set margin.", GetErrorMessage(E_SYSTEM)); + } + return; +} + +result +_TokenEditPresenter::SetInitialBounds(void) +{ + result r = E_SUCCESS; + + float leftMargin = 0.0f; + float rightMargin = 0.0f; + float tokenTopMargin = 0.0f; + float tokenHeight = 0.0f; + float tokenMinWidth = 0.0f; + float tokenVerticalSpacing = 0.0f; + float tokenHorizontalSpacing = 0.0f; + float tokenTextLeftMargin = 0.0f; + float tokenTextRightMargin = 0.0f; + float textBoundsAlignValue = 0.0f; + float titleTextRightMargin = 0.0f; + _ControlOrientation orientation = GetEditView()->GetOrientation(); + + 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::TOKEN_HEIGHT, orientation, tokenHeight); + GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_MIN_WIDTH, orientation, tokenMinWidth); + GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_VERTICAL_SPACING, orientation, tokenVerticalSpacing); + 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, titleTextRightMargin); + + float textObjectMaxHeight = GetMaxTextHeight(); + textBoundsAlignValue = (tokenHeight - textObjectMaxHeight) / 2.0f; + + if (__pTokenList != null) + { + int tokenCount = __pTokenList->GetCount(); + + FloatRectangle tokenEditBounds = __pTokenEdit->GetBoundsF(); + FloatRectangle tokenTextRect = tokenEditBounds; + + if (tokenCount == 0) + { + if (__pTokenEdit->GetTitleText().GetLength()) + { + FloatRectangle titleTextRect = GetTitleTextRect(); + tokenTextRect.x = titleTextRect.x + titleTextRect.width + titleTextRightMargin; + } + else + { + tokenTextRect.x = leftMargin + __pTokenEdit->GetHorizontalMargin(EDIT_TEXT_LEFT_MARGIN); + } + + tokenTextRect.y = tokenTopMargin + __pTokenEdit->GetVerticalMarginF(EDIT_TEXT_TOP_MARGIN) + textBoundsAlignValue; + tokenTextRect.width -= tokenTextRect.x + rightMargin + __pTokenEdit->GetHorizontalMarginF(EDIT_TEXT_RIGHT_MARGIN); + tokenTextRect.height = textObjectMaxHeight; + + SetTextBounds(tokenTextRect); + + //set cursor bounds with tokenTextRect + __pTokenEdit->SetCursorAccessibilityBounds(tokenTextRect); + return r; + } + + _Token* pToken = null; + // SetTextBounds from last token + pToken = static_cast< _Token* >(__pTokenList->GetAt(tokenCount - 1)); + 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 && __pTokenEdit->IsFocusable() && __pTokenEdit->IsEnabled()) // Line change + { + tokenTextRect.x = leftMargin + __pTokenEdit->GetHorizontalMarginF(EDIT_TEXT_LEFT_MARGIN); + tokenTextRect.y = pToken->displayRect.y + tokenHeight + tokenVerticalSpacing + __lineSpacing + textBoundsAlignValue; + } + else + { + tokenTextRect.x = pToken->displayRect.x + pToken->displayRect.width + tokenHorizontalSpacing; + tokenTextRect.y = pToken->displayRect.y + textBoundsAlignValue; + } + + tokenTextRect.width -= tokenTextRect.x + rightMargin + __pTokenEdit->GetHorizontalMarginF(EDIT_TEXT_RIGHT_MARGIN); + tokenTextRect.height = textObjectMaxHeight; + + SetTextBounds(tokenTextRect); + + if (__pressedTokenIndex < 0) // Set cursor as global focused element if no token is selected + { + __pTokenEdit->SetCursorAccessibilityBounds(tokenTextRect); + } + } + else + { + r = _EditPresenter::SetInitialBounds(); + } + + return r; +} + +result +_TokenEditPresenter::SetTitleTextRect(const FloatRectangle& rect) +{ + result r = E_SUCCESS; + + __titleTextRect = rect; + + return r; +} + +FloatRectangle +_TokenEditPresenter::GetTitleTextRect() const +{ + return __titleTextRect; +} + +Rectangle +_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, "[%s] A system error has occurred. Unable to get valid token.", GetErrorMessage(E_SYSTEM)); + + _ControlOrientation orientation = __pTokenEdit->GetOrientation(); + float tokenTextLeftMargin = 0.0f; + float tokenTextVerticalMargin = 0.0f; + GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_TEXT_LEFT_MARGIN, orientation, tokenTextLeftMargin); + GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_VERTICAL_SPACING, orientation, tokenTextVerticalMargin); + + FloatRectangle textBoundsF(pToken->displayRect.x + tokenTextLeftMargin, pToken->displayRect.y + (tokenTextVerticalMargin / 2.0f), pToken->displayRect.width - (tokenTextLeftMargin * 2.0f), pToken->displayRect.height - tokenTextVerticalMargin); + Rectangle textBounds = _CoordinateSystemUtils::ConvertToInteger(textBoundsF); + + return textBounds; + } + else + { + return _EditPresenter::GetTextBounds(); + } +} + +FloatRectangle +_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, "[%s] A system error has occurred. Unable to get valid token.", GetErrorMessage(E_SYSTEM)); + + _ControlOrientation orientation = __pTokenEdit->GetOrientation(); + int tokenTextLeftMargin = 0; + int tokenTextVerticalMargin = 0; + GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_TEXT_LEFT_MARGIN, orientation, tokenTextLeftMargin); + GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_VERTICAL_SPACING, orientation, tokenTextVerticalMargin); + + FloatRectangle textBounds(pToken->displayRect.x + tokenTextLeftMargin, pToken->displayRect.y + (tokenTextVerticalMargin / 2.0f), pToken->displayRect.width - (tokenTextLeftMargin * 2.0f), pToken->displayRect.height - tokenTextVerticalMargin); + + return textBounds; + } + else + { + return _EditPresenter::GetTextBoundsF(); + } +} + +result +_TokenEditPresenter::CutText(void) +{ + if (__isEditingToken) + { + _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex)); + SysTryReturnResult(NID_UI_CTRL, pToken != null, E_SYSTEM, "A system error has occurred. The _Token instance is null"); + + pToken->isTextCut = true; + } + return _EditPresenter::CutText(); +} + +result +_TokenEditPresenter::SetLineSpacing(int linePixelGap) +{ + __lineSpacing = linePixelGap; + + return E_SUCCESS; +} + +result +_TokenEditPresenter::SetLineSpacing(float linePixelGap) +{ + __lineSpacing = linePixelGap; + + return E_SUCCESS; +} + +int +_TokenEditPresenter::GetLineSpacing(void) const +{ + int lineSpacing = _CoordinateSystemUtils::ConvertToInteger(__lineSpacing); + return lineSpacing; +} + +float +_TokenEditPresenter::GetLineSpacingF(void) const +{ + return __lineSpacing; +} + +VisualElementAnimation* +_TokenEditPresenter::CreateAnimationN(VisualElement& source) +{ + VisualElementAnimation* pAnimation = null; + VisualElementAnimationGroup* pAnimationGroup = new (std::nothrow) VisualElementAnimationGroup(); + 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, "[%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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + pOpacityAnimation->SetPropertyName("opacity"); + + pOpacityAnimation->SetStartValue(Variant(0.0f)); + pOpacityAnimation->SetEndValue(Variant(1.0f)); + + pOpacityAnimation->SetDuration(ANIMATION_DURATION_OPACITY); + pOpacityAnimation->SetTimingFunction(__pTimingFunction); + pAnimationGroup->AddAnimation(*pOpacityAnimation); + delete pOpacityAnimation; + + VisualElementPropertyAnimation* pBoundsAnimation = new (std::nothrow) VisualElementPropertyAnimation(); + 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(); + startValue.x = startValue.x + startValue.width * 0.05; + startValue.y = startValue.y + startValue.height * 0.05; + startValue.width = startValue.width * 0.9; + startValue.height = startValue.height * 0.9; + + pBoundsAnimation->SetStartValue(Variant(startValue)); + pBoundsAnimation->SetEndValue(Variant(source.GetBounds())); + + pBoundsAnimation->SetDuration(ANIMATION_DURATION_BOUNDS); + pBoundsAnimation->SetTimingFunction(__pTimingFunction); + pAnimationGroup->AddAnimation(*pBoundsAnimation); + + delete pBoundsAnimation; + + pAnimation = pAnimationGroup; + } + return pAnimation; +} + +result +_TokenEditPresenter::CalculateTitleTextRect(const String& titleText) +{ + result r = E_SUCCESS; + + TextSimple* pSimpleText = null; + float leftMargin = 0.0f; + float tokenTopMargin = 0.0f; + float tokenHeight = 0.0f; + float tokenVerticalSpacing = 0.0f; + 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); + GET_SHAPE_CONFIG(TOKENEDIT::LEFT_MARGIN, orientation, leftMargin); + GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_HEIGHT, orientation, tokenHeight); + GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_VERTICAL_SPACING, orientation, tokenVerticalSpacing); + GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_TEXT_LEFT_MARGIN, orientation, tokenTextLeftMargin); + GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_TEXT_RIGHT_MARGIN, orientation, tokenTextRightMargin); + GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_TITLE_RECT_WIDTH, orientation, tokenTitleWidth); + + int length = titleText.GetLength(); + FloatDimension textSize; + + wchar_t* pTempString = const_cast< wchar_t* >(titleText.GetPointer()); + + SysAssertf(__pTitleTextObject != null, "The TextObject instance is null."); + + __pTitleTextObject->RemoveAll(true); + pSimpleText = new (std::nothrow) TextSimple(pTempString, length, TEXT_ELEMENT_SOURCE_TYPE_INTERNAL); + __pTitleTextObject->AppendElement(*pSimpleText); + + 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); + + 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; + __pTitleTextObject->SetTextObjectEllipsisType(TEXT_OBJECT_ELLIPSIS_TYPE_TAIL); + } + + __titleTextRect.width = tokenTextLeftMargin + textSize.width + tokenTextRightMargin; + __titleTextRect.height = tokenHeight; + __pTitleTextObject->SetBounds(__titleTextRect); + + if (__pTitleTextObject->IsChanged()) + { + _EditPresenter::StopTitleSlidingTimer(); + __isTitleSliding = false; + } + + r = __pTitleTextObject->Compose(); + + return r; +} + +bool +_TokenEditPresenter::IsGuideTextActivated(void) const +{ + bool isGuideTextActivated = _EditPresenter::IsGuideTextActivated(); + + if (__isTokenEditPresenterInitialized) + { + if (GetTokenCount()) + { + return false; + } + } + + return isGuideTextActivated; +} + +bool +_TokenEditPresenter::DrawTitleText(void) +{ + result r = E_SUCCESS; + FloatRectangle tempTitleTextRect; + FloatRectangle titleTextRect(__titleTextRect); + Canvas* pTitleTextCanvas = null; + + Font* pDescriptionFont = null; + TextObjectActionType titleAction; + _VisualElement* pRootElement = null; + + if (__pTitleTextObject->GetFont(0)->GetFaceName() != GetTitleFontFaceName()) + { + 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(titleTextSize); + + 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, "[%s] A system error has occurred. Failed to get _TokenEdit visual element.", GetErrorMessage(E_SYSTEM)); + + if (__pTitleTextVisualElement == null) + { + __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(*__pTitleTextVisualElement); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + titleTextRect.y = __titleTextRectForScroll.y + __scrollValue; + __pTitleTextVisualElement->SetBounds(titleTextRect); + UpdateTitleAccessibilityBounds(titleTextRect); // Update title accessibility bounds to same as TitleTextVisualElement bounds + + 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)); + + tempTitleTextRect = __titleTextRect; + tempTitleTextRect.x = 0.0f; + tempTitleTextRect.y = 0.0f; + + titleAction = __pTitleTextObject->GetAction(); + + pTitleTextCanvas->SetBackgroundColor(Color(0)); + pTitleTextCanvas->Clear(); + __pTitleTextObject->SetForegroundColor(__pTokenEdit->GetTitleTextColor(GetCurrentStatus()), 0, __pTitleTextObject->GetTextLength()); + + if (IsFocused()) + { + + if (titleAction != TEXT_OBJECT_ACTION_TYPE_SLIDE_LEFT) + { + __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 (__pTitleTextObject->IsActionOn()) + { + _EditPresenter::StartTitleSlidingTimer(); + __isTitleSliding = true; + } + } + } + else + { + if (titleAction != TEXT_OBJECT_ACTION_TYPE_ABBREV) + { + __pTitleTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); + __pTitleTextObject->Compose(); + } + + // Draw title text + __pTitleTextObject->SetBounds(tempTitleTextRect); + __pTitleTextObject->Draw(*_CanvasImpl::GetInstance(*pTitleTextCanvas)); + } + + delete pTitleTextCanvas; + + return true; + +CATCH: + if (__pTitleTextVisualElement != null) + { + __pTitleTextVisualElement->Destroy(); + __pTitleTextVisualElement = null; + } + + return false; +} + +result +_TokenEditPresenter::TrimTokenAndAdjustEllipsisAt(int index) +{ + result r = E_SUCCESS; + + float rightMargin = 0.0f; + float tokenMinimumSize = 0.0f; + + _ControlOrientation orientation = __pTokenEdit->GetOrientation(); + GET_SHAPE_CONFIG(TOKENEDIT::RIGHT_MARGIN, orientation, rightMargin); + GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_MIN_WIDTH, orientation, tokenMinimumSize); + + _Token* pToken = null; + pToken = static_cast< _Token* >(__pTokenList->GetAt(index)); + 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; + + float remainWidth = tokenEditBounds.width - rightMargin - __pTokenEdit->GetHorizontalMarginF(EDIT_TEXT_RIGHT_MARGIN); + + float dspTokenWidth = tokenRect.x + tokenRect.width; + float dspTokenGap = dspTokenWidth - remainWidth; + + if (dspTokenGap > 0.0f) + { + if (pToken->displayRect.width >= tokenMinimumSize) + { + if ((pToken->displayRect.width - dspTokenGap) < tokenMinimumSize) + { + pToken->displayRect.width = tokenMinimumSize; + } + else + { + pToken->displayRect.width -= dspTokenGap; + } + } + + // Adjust ellipsis + pToken->pTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); + pToken->pTextObject->SetTextObjectEllipsisType(TEXT_OBJECT_ELLIPSIS_TYPE_TAIL); + } + + return r; +} + +int +_TokenEditPresenter::GetTokenIndexFromCoordinate(const FloatPoint point) const +{ + int tokenIndex = -1; + + int tokenCount = __pTokenList->GetCount(); + for (int i = 0; i < tokenCount; i++) + { + _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(i)); + if (pToken != null) + { + FloatRectangle tokenRect = pToken->displayRect; + if (tokenRect.Contains(point)) + { + tokenIndex = i; + break; + } + } + } + return tokenIndex; +} + +result +_TokenEditPresenter::SetEditingTokenTextBounds(int index, bool isSetText) +{ + result r = E_SUCCESS; + + float tokenHeight = 0.0f; + float tokenVerticalSpacing = 0.0f; + float tokenTextLeftMargin = 0.0f; + float tokenFontSize = 0.0f; + _ControlOrientation orientation = __pTokenEdit->GetOrientation(); + + GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_HEIGHT, orientation, tokenHeight); + GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_VERTICAL_SPACING, orientation, tokenVerticalSpacing); + GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_TEXT_LEFT_MARGIN, orientation, tokenTextLeftMargin); + GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_TEXT_SIZE, orientation, tokenFontSize); + + _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(index)); + SysTryReturnResult(NID_UI_CTRL, pToken != null, E_SYSTEM, "A system error has occurred. The _Token instance is null"); + + FloatRectangle tempTextDspRect; + tempTextDspRect.x += tokenTextLeftMargin; + tempTextDspRect.y += tokenVerticalSpacing / 2.0f; + tempTextDspRect.width = pToken->displayRect.width - (tokenTextLeftMargin * 2.0f); + tempTextDspRect.height = tokenHeight - tokenVerticalSpacing; + + if (isSetText) + { + if (!pToken->isTextCut) + { + SetText(pToken->GetText()); + } + pToken->pTextObject->RemoveAll(true); + } + + _EditPresenter::SetTextSize(tokenFontSize); + + SetTextBounds(tempTextDspRect); + + return r; +} + +result +_TokenEditPresenter::RecalculateTokenBounds(float position) +{ + result r = E_SUCCESS; + + __scrollValue = -position; + + 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) + { + __titleTextRect.y = __titleTextRectForScroll.y + __scrollValue; + } + + __pTokenEdit->Invalidate(); + + r = SetInitialBounds(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set bounds."); + + return r; +} + +result +_TokenEditPresenter::SetTokenBoundsByTouchInfo(const _TouchInfo& touchinfo) +{ + result r = E_SUCCESS; + float currentYPosition = touchinfo.GetCurrentPosition().y; + + if (!IsHorizontalDirection(touchinfo)) + { + if (_FloatCompare(__prevScrollValue, 0.0f)) + { + __prevScrollValue = currentYPosition; + } + else // Adjust moved y position to all tokens. + { + if (__isNeedToScroll) // Need to scroll + { + float tempDefference = __prevScrollValue - currentYPosition; + + __prevScrollValue = currentYPosition; + __scrollValue -= tempDefference; + + if (__scrollValue < -__maxScrollValue) + { + __scrollValue = -__maxScrollValue; + + return E_SUCCESS; + } + + if (__scrollValue > 0.0f) + { + __scrollValue = 0.0f; + + 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) + { + __titleTextRect.y = __titleTextRectForScroll.y + __scrollValue; + } + + __pTokenEdit->Invalidate(); + } + else + { + __prevScrollValue = 0.0f; + __scrollValue = 0.0f; + } + } + + r = SetInitialBounds(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Failed to set bounds."); + } + + return r; +} + +result +_TokenEditPresenter::ProcessTokeningByTouchEvent(const _Control& source, const _TouchInfo& touchinfo) +{ + int tokenIndex = GetTokenIndexFromCoordinate(touchinfo.GetCurrentPosition()); + + //Reset "longPressed" when Touch released on a different token after long gesture on a token + if (__trackTokenIndex != tokenIndex) + { + __isLongPressed = false; + return E_SUCCESS; //If already pressed on a token and released elsewhere. + } + + int prevPressedTokenIndex = __pressedTokenIndex; + int prevEditedTokenIndex = __editingTokenIndex; + + result r = E_SUCCESS; + if (IsFocused()) + { + if (__isEditModeEnabled && __pressedTokenIndex != -1 && __pressedTokenIndex == tokenIndex) + { + //Comment below to Block Copy & Paste functionality in Token Edit mode + __editingTokenIndex = __pressedTokenIndex; + __isEditingToken = true; + __isTokenEditingFinished = false; + if (prevEditedTokenIndex != __editingTokenIndex) + { + SetEditingTokenTextBounds(__editingTokenIndex); + } + SetCursorDisabled(false); + } + } + + if (tokenIndex != -1) + { + if (__isEditingToken && (prevPressedTokenIndex != tokenIndex)) // Selected another token while editing. + { + __isPopupVisible = false; + __isLongPressed = false; + + _VisualElement* pEditVisualElement = __pTokenEdit->GetVisualElement(); + SysTryReturnResult(NID_UI_CTRL, pEditVisualElement, E_SYSTEM, "A system error has occurred. Failed to get root visual element."); + + _VisualElement* pCursorVisualElement = GetCursorVisualElement(); + SysTryReturnResult(NID_UI_CTRL, pCursorVisualElement, E_SYSTEM, "A system error has occurred. Failed to get cursor visual element."); + + _Token* pToken = null; + _VisualElement* pTokenVisualElement = null; + + pToken = static_cast< _Token* >(__pTokenList->GetAt(prevPressedTokenIndex)); + + bool isParentChanged = false; + if (pToken != null) + { + pTokenVisualElement = pToken->GetVisualElement(); + SysTryReturnResult(NID_UI_CTRL, pTokenVisualElement, E_SYSTEM, "A system error has occurred. Failed to get token visual element."); + + if (pCursorVisualElement->GetParent() == pTokenVisualElement) + { + isParentChanged = true; + result r = E_SUCCESS; + r = pTokenVisualElement->DetachChild(*pCursorVisualElement); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = pEditVisualElement->AttachChild(*pCursorVisualElement); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + } + + String inputTokenString = GetText(); + String replacementString = inputTokenString; + bool enable = false; + + __pTokenEdit->ProcessTokenFiltering(inputTokenString, replacementString, enable); + if (enable) + { + inputTokenString = replacementString; + } + + __pressedTokenIndex = tokenIndex; + + r = RemoveTokenAt(prevPressedTokenIndex); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + if (inputTokenString.GetLength() > 0) + { + r = InsertTokenAt(prevPressedTokenIndex, inputTokenString); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + pToken = static_cast< _Token* >(__pTokenList->GetAt(prevPressedTokenIndex)); + if (pToken != null) + { + pToken->currTokenLength = inputTokenString.GetLength(); + } + } + + ClearText(); + //Flex height adjusted since token can move to another line + AdjustFlexibleHeight(); + __editingTokenIndex = -1; + __isTokenEditingFinished = true; + __isEditingToken = false; + _EditPresenter::SetTextSize(__editContentFontSize); + + SetCursorDisabled(true); + } + else + { + __pressedTokenIndex = tokenIndex; + if (GetText().GetLength() > 0 && __pressedTokenIndex != prevPressedTokenIndex) + { + r = MakeToken(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + + if ((__isEditingToken) && (__pressedTokenIndex != -1)) + { + r = AttachCursorToToken(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + + if (!__isEditingToken) + { + SetCursorDisabled(true); + } + } + } + else + { + __isPopupVisible = false; + __isLongPressed = false; + + _VisualElement* pEditVisualElement = __pTokenEdit->GetVisualElement(); + SysTryReturnResult(NID_UI_CTRL, pEditVisualElement, E_SYSTEM, "A system error has occurred. Failed to get root visual element."); + + _VisualElement* pCursorVisualElement = GetCursorVisualElement(); + SysTryReturnResult(NID_UI_CTRL, pCursorVisualElement, E_SYSTEM, "A system error has occurred. Failed to get cursor visual element."); + + if (__isEditingToken) + { + _Token* pToken = null; + _VisualElement* pTokenVisualElement = null; + + pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex)); + + bool isParentChanged = false; + if (pToken != null) + { + pTokenVisualElement = pToken->GetVisualElement(); + SysTryReturnResult(NID_UI_CTRL, pTokenVisualElement, E_SYSTEM, "A system error has occurred. Failed to get token visual element."); + + if (pCursorVisualElement->GetParent() == pTokenVisualElement) + { + isParentChanged = true; + result r = E_SUCCESS; + r = pTokenVisualElement->DetachChild(*pCursorVisualElement); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = pEditVisualElement->AttachChild(*pCursorVisualElement); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + } + + String inputTokenString = GetText(); + String replacementString = inputTokenString; + bool enable = false; + + __pTokenEdit->ProcessTokenFiltering(inputTokenString, replacementString, enable); + if (enable) + { + inputTokenString = replacementString; + } + __pressedTokenIndex = tokenIndex; + + RemoveTokenAt(__editingTokenIndex); + + if (inputTokenString.GetLength() > 0) + { + InsertTokenAt(__editingTokenIndex, inputTokenString); + + if (isParentChanged) + { + pToken->currTokenLength = inputTokenString.GetLength(); + } + } + + __isEditingToken = false; + __editingTokenIndex = -1; + _EditPresenter::SetTextSize(__editContentFontSize); + __isTokenEditingFinished = false; + + ClearText(); + + //Flex height adjusted since token can move to another line + AdjustFlexibleHeight(); + + SysTryReturnResult(NID_UI_CTRL, (inputTokenString.GetLength() > 0), E_INVALID_ARG, "Invalid argument is used. Token length is (%d)", inputTokenString.GetLength()); + + DrawText(); + } + else + { + __pressedTokenIndex = tokenIndex; + if (pCursorVisualElement->GetParent() != pEditVisualElement) + { + r = (pCursorVisualElement->GetParent())->DetachChild(*pCursorVisualElement); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = pEditVisualElement->AttachChild(*pCursorVisualElement); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + } + + SetCursorDisabled(false); + } + + for (int i = 0; i < __pTokenList->GetCount(); i++) + { + TrimTokenAndAdjustEllipsisAt(i); + InitializeTokenVisibilityAt(i); + } + + return E_SUCCESS; +} + +result +_TokenEditPresenter::CheckTokenScrolling(bool scrollToCursorPosition) +{ + bool needToScroll = false; + float tokenTopMargin = 0.0f; + float tokenBottomMargin = 0.0f; + _ControlOrientation orientation = __pTokenEdit->GetOrientation(); + + GET_SHAPE_CONFIG(TOKENEDIT::TOP_MARGIN, orientation, tokenTopMargin); + GET_SHAPE_CONFIG(TOKENEDIT::BOTTOM_MARGIN, orientation, tokenBottomMargin); + + int tokenCount = GetTokenCount(); + if (tokenCount == 0) // There is no token to scroll + { + __isNeedToScroll = false; + __maxScrollValue = 0.0f; + __isTokenScrolling = false; + + return E_SUCCESS; + } + + _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(tokenCount - 1)); + 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; + + if (scrollToCursorPosition) + { + FloatRectangle cursorBounds; + GetCursorBounds(false, cursorBounds); + newScrollValue = cursorBounds.y + cursorBounds.height - __scrollValue + tokenBottomMargin - __pTokenEdit->GetBoundsF().height; + __isScrollValueModified = true; + } + else + { + newScrollValue = GetTextBoundsF().y + GetTextBoundsF().height - __scrollValue + tokenBottomMargin - __pTokenEdit->GetBoundsF().height; + __isScrollValueModified = true; + } + + needToScroll = (newScrollValue > 0.0f) ? (true) : (false); + + __isNeedToScroll = needToScroll; + + if (__isNeedToScroll) + { + __maxScrollValue = newScrollValue; + __isTokenScrolling = true; + + RecalculateTokenBounds(__maxScrollValue); + } + else + { + if (!_FloatCompare(__scrollValue, 0.0f)) + { + __scrollValue = 0.0f; + __maxScrollValue = 0.0f; // To prevent unnecessary token scrolling. + RecalculateTokenBounds(__scrollValue); + __isTokenScrolling = false; + } + } + + return E_SUCCESS; +} + +result +_TokenEditPresenter::SetTokenVisualElementBounds(int index, const FloatRectangle& bounds) +{ + _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(index)); + SysTryReturnResult(NID_UI_CTRL, pToken != null, E_SYSTEM, "A system error has occurred. The _Token instance is null."); + + return pToken->SetBounds(pToken->displayRect); +} + +result +_TokenEditPresenter::AdjustFlexibleHeight(void) +{ + result r = E_SUCCESS; + + FloatRectangle editRect = __pTokenEdit->GetBoundsF(); + FloatRectangle displayScrollBounds = GetDisplayScrollBoundsF(); + float calcHeight = CalculateFlexibleHeightF(); + + if (!_FloatCompare(editRect.height, calcHeight)) + { + displayScrollBounds.height = calcHeight; + SetScrollBarBounds(displayScrollBounds); + + editRect.height = calcHeight; + if (!__isEditingToken) + { + FloatRectangle editRectBounds = CoordinateSystem::AlignToDevice(editRect); + r = SetFlexBounds(editRectBounds); + } + } + + return r; +} + +float +_TokenEditPresenter::CalculateFlexibleHeightF(void) +{ + float tokenHeight = 0.0f; + float tokenVerticalSpacing = 0.0f; + float tokenTopMargin = 0.0f; + float tokenBottomMargin = 0.0f; + _ControlOrientation orientation = __pTokenEdit->GetOrientation(); + + GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_HEIGHT, orientation, tokenHeight); + GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_VERTICAL_SPACING, orientation, tokenVerticalSpacing); + GET_SHAPE_CONFIG(TOKENEDIT::TOP_MARGIN, orientation, tokenTopMargin); + GET_SHAPE_CONFIG(TOKENEDIT::BOTTOM_MARGIN, orientation, tokenBottomMargin); + + float height = 0.0f; + int maxLinecount = GetMaxLineCount(); + float expectedEditHeight = GetTextBoundsF().y + GetTextBoundsF().height - __scrollValue + tokenBottomMargin; + float initialHeight = GetInitialBoundsF().height; + float maximumLineHeight = tokenTopMargin + maxLinecount * tokenHeight + tokenVerticalSpacing * (maxLinecount - 1) + tokenBottomMargin; + + if (initialHeight < expectedEditHeight) + { + if (expectedEditHeight > maximumLineHeight) + { + height = maximumLineHeight; + } + else + { + height = expectedEditHeight; + } + } + else + { + height = initialHeight; + } + + FloatDimension flexHeightDim = CoordinateSystem::AlignToDevice(FloatDimension(0, height)); + return flexHeightDim.height; +} + +result +_TokenEditPresenter::DrawScrollBar(void) +{ + result r = E_SUCCESS; + + _Scroll* pScroll = GetScrollBar(); + if (pScroll == null) + { + return E_SYSTEM; + } + + if (!IsFocused()) + { + if (!__isTouchMoveInProgress) + { + pScroll->SetScrollVisibility(false); + return E_SUCCESS; + } + } + + _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(GetTokenCount() - 1)); + if (pToken == null) + { + return E_SUCCESS; + } + + float tokenBottomMargin = 0.0f; + GET_SHAPE_CONFIG(TOKENEDIT::BOTTOM_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, tokenBottomMargin); + + float totalHeight = GetTextBoundsF().y + GetTextBoundsF().height - __scrollValue + tokenBottomMargin; + float dspHeight = __pTokenEdit->GetBoundsF().height; + float firstDspY = -__scrollValue; + + if (totalHeight <= dspHeight) + { + pScroll->SetScrollVisibility(false); + pScroll->SetScrollRange(1, 1); + pScroll->SetScrollPosition(0.0f); + + SetScrollBarVisible(false); + SetPreviousScrollBarPosition(0.0f); + SetMaximumPreviousScrollBarPosition(0.0f); + } + else + { + if (firstDspY > 0.0f) + { + pScroll->SetScrollRange(dspHeight, totalHeight); + pScroll->SetScrollPosition(firstDspY); + SetMaximumPreviousScrollBarPosition(totalHeight - dspHeight); + } + else + { + pScroll->SetScrollRange(dspHeight, totalHeight); + pScroll->SetScrollPosition(0.0f); + SetMaximumPreviousScrollBarPosition(0.0f); + } + + if (pScroll->GetScrollVisibility()) + { + SetScrollBarVisible(true); + } + + SetPreviousScrollBarPosition(firstDspY); + } + + return r; +} + +void +_TokenEditPresenter::SetAutoShrinkModeEnabled(bool enable) +{ + __autoShrink = enable; + + return; +} + +bool +_TokenEditPresenter::IsAutoShrinkModeEnabled(void) const +{ + return __autoShrink; +} + +void +_TokenEditPresenter::SetTitleText(String titleText) +{ + __titleText = titleText; + + return; +} + +String +_TokenEditPresenter::GetTitleText(void) const +{ + return __titleText; +} + +int +_TokenEditPresenter::CalculateVisibleTokenCount(void) +{ + int visibleTokenCount = 0; + + FloatRectangle intialBounds = GetInitialBoundsF(); + FloatRectangle tempInitialBounds = intialBounds; + FloatRectangle hiddenTokenDisplayBounds; + int tokenCount = GetTokenCount(); + + for (int i = 0; i < tokenCount; i++) + { + tempInitialBounds = intialBounds; + _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(i)); + 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)) + { + break; + } + visibleTokenCount++; + } + return visibleTokenCount; +} + +bool +_TokenEditPresenter::OnFocusGained(void) +{ + __isTitleSliding = false; + if (__autoShrink) + { + float tempHeight = CalculateFlexibleHeightF(); + FloatRectangle tempRect = GetInitialBoundsF(); + tempRect.height = tempHeight; + + _Token* pToken = null; + int tokenCount = GetTokenCount(); + + for (int i = 0; i < tokenCount; i++) + { + pToken = static_cast< _Token* >(__pTokenList->GetAt(i)); + + if (pToken != null) + { + _VisualElement* pTokenVisualElement = pToken->GetVisualElement(); + if (pTokenVisualElement != null) + { + pTokenVisualElement->SetShowState(true); + } + } + } + + SetFlexBounds(tempRect); + + SetEditingTokenTextBounds(__editingTokenIndex, false); + + if (!__isFocus) + { + __titleTextRect.y = __titleTextRectForScroll.y + __scrollValue; + __isFocus = true; + } + + if (__isScrollValueChanged && !__isScrollValueModified) + { + __maxScrollValue = __maxScrollValue - (__pTokenEdit->GetBoundsF().height - GetInitialBoundsF().height); + __isScrollValueChanged = false; + } + } + + if (GetTokenCount()) + { + CheckTokenScrolling(); + } + + if (__pressedTokenIndex < 0) + { + StopCursorTimer(); + SetCursorDisabled(false); + StartCursorTimer(); + } + + RefreshAccessibilityElements(); + + return _EditPresenter::OnFocusGained(); +} + +bool +_TokenEditPresenter::OnFocusLost(void) +{ + result r = E_SUCCESS; + __isFocus = false; + + _EditPresenter::StopTitleSlidingTimer(); + __isTitleSliding = false; + + if (__editingTokenIndex >= 0) + { + OnTextCommitted(L"\n"); + } + else + { + //Remove pressed state on focus lost + __pressedTokenIndex = -1; + + if (GetText().GetLength() > 0) + { + OnTextCommitted(L"\n"); + } + } + + if (__autoShrink) + { + _Scroll* pScroll = GetScrollBar(); + if (pScroll != null) + { + pScroll->SetScrollVisibility(false); + } + __scrollValue = 0.0f; + + int tokenCount = GetTokenCount(); + _Token* pToken = null; + for (int i = 0; i < tokenCount; i++) + { + pToken = static_cast< _Token* >(__pTokenList->GetAt(i)); + if (pToken != null) + { + pToken->SetBounds(pToken->displayRect); + } + } + + r = SetInitialBounds(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, r, "[%s] Propagating", GetErrorMessage(r)); + + UpdateTokenAccessibilityBounds(); + + __scrollValue = 0.0f; + r = CalculateTokenPositionFromIndex(0); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, false, r, "[%s] Propagating.", GetErrorMessage(r)); + + int visibleTokenCount = CalculateVisibleTokenCount(); + + for (int i = visibleTokenCount; i < tokenCount; i++) + { + pToken = static_cast< _Token* >(__pTokenList->GetAt(i)); + if (pToken != null) + { + _VisualElement* pTokenVisualElement = pToken->GetVisualElement(); + if (pTokenVisualElement != null) + { + pTokenVisualElement->SetShowState(false); + } + } + } + + float totalScrollValue = __maxScrollValue + (__pTokenEdit->GetBoundsF().height - GetInitialBoundsF().height); + + if (totalScrollValue > 0) + { + __isNeedToScroll = true; + __maxScrollValue = totalScrollValue; + __isTokenScrolling = true; + if (__lineAdded > 0) + { + __isScrollValueChanged = true; + __isScrollValueModified = false; + } + } + + FloatRectangle intialWindowBounds = GetInitialBoundsF(); + SetFlexBounds(intialWindowBounds); + + SetEditingTokenTextBounds(__editingTokenIndex, false); + + __titleTextRect.y = __titleTextRectForScroll.y + __scrollValue; + } + else + { + ScrollPanelToCursorPosition(); + } + + RemoveChildAccessibilityElements(); + __pTokenEdit->UpdateAccessibilityElement(EDIT_ACCESSIBILITY_ELEMENT_TYPE_TEXT); + SetDrawFocusState(false); + + return _EditPresenter::OnFocusLost(); +} + +result +_TokenEditPresenter::SetFlexBounds(const FloatRectangle& bounds) +{ + if (__pTokenEdit->GetBoundsF().height > bounds.height) + { + if (__lineAdded > 0) + { + __lineAdded--; + } + } + return _EditPresenter::SetFlexBounds(bounds); +} + +result +_TokenEditPresenter::SetTextSize(const int size) +{ + result r = E_SUCCESS; + __editContentFontSize = size; + + if (!__isEditingToken) + { + r = _EditPresenter::SetTextSize(size); + r = SetInitialBounds(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + + return r; +} + +result +_TokenEditPresenter::SetTextSize(const float size) +{ + result r = E_SUCCESS; + __editContentFontSize = size; + + if (!__isEditingToken) + { + r = _EditPresenter::SetTextSize(size); + r = SetInitialBounds(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + + return r; +} + +bool +_TokenEditPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + //Remove token focus on touch press + __focusedTokenIndex = -1; + + int tokenIndex = GetTokenIndexFromCoordinate(touchinfo.GetCurrentPosition()); + __trackTokenIndex = tokenIndex; + + _TouchInfo TouchInfo(touchinfo); + if (tokenIndex != -1) + { + if (tokenIndex == __editingTokenIndex) + { + __touchPressInfo.x = touchinfo.GetCurrentPosition().x; + __touchPressInfo.y = touchinfo.GetCurrentPosition().y; + + _Token* pToken = null; + pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex)); + if (pToken != null) + { + float tokenX = pToken->displayRect.x; + float tokenY = pToken->displayRect.y; + FloatPoint point(__touchPressInfo.x - tokenX, __touchPressInfo.y - tokenY); + TouchInfo.SetTouchInfo(touchinfo.GetPointId(), touchinfo.GetTouchStatus(), point, touchinfo.IsFlicked(), touchinfo.GetTimeStamp()); + } + } + } + + return _EditPresenter::OnTouchPressed(source, TouchInfo); +} + +bool +_TokenEditPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + __touchPressInfo = FloatPoint(-1.0f, -1.0f); + + ProcessTokeningByTouchEvent(source, touchinfo); + if (GetTokenCount()) + { + //Set token bounds appropriately On Fast flick of scroll bar + if (!(__isEditingToken || __editingTokenIndex >= 0)) + { + SetTokenBoundsByTouchInfo(touchinfo); + } + } + + _Scroll* pScroll = GetScrollBar(); + if (pScroll != null) + { + pScroll->SetScrollVisibility(false); + } + + if (__prevScrollValue) + { + __prevScrollValue = 0.0f; + __isTokenScrolling = false; + } + + _TouchInfo TouchInfo(touchinfo); + _Token* pToken = null; + if (__editingTokenIndex >= 0 && !_EditPresenter::IsDragAndDropStarted()) + { + pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex)); + if (pToken != null) + { + int tokenX = _CoordinateSystemUtils::ConvertToInteger(pToken->displayRect.x); + int tokenY = _CoordinateSystemUtils::ConvertToInteger(pToken->displayRect.y); + Point point(_CoordinateSystemUtils::ConvertToInteger(touchinfo.GetCurrentPosition()).x - tokenX, _CoordinateSystemUtils::ConvertToInteger(touchinfo.GetCurrentPosition()).y - tokenY); + TouchInfo.SetTouchInfo(touchinfo.GetPointId(), touchinfo.GetTouchStatus(), point, touchinfo.IsFlicked(), touchinfo.GetTimeStamp()); + } + _EditPresenter::OnTouchReleased(source, TouchInfo); + __previousCursorPosition = GetCursorPosition(); + } + else + { + _EditPresenter::OnTouchReleased(source, touchinfo); + } + + __isTouchMoveInProgress = false; + __trackTokenIndex = -1; + __pTokenEdit->Invalidate(); + + return false; +} + +void +_TokenEditPresenter::OnInputConnectionTextCommitted(InputConnection& source, const String& committedText) +{ + OnTextCommitted(committedText); + + return; +} + +void +_TokenEditPresenter::OnTextCommitted(const String& commitText) +{ + char enterText[2] = {'\n', }; + String enterTextComma(","); + String enterTextSemiColon(";"); + + //OnTextCommitted blocked for these cases + //1. Tab text not to be handled + //2. Token is focused + char tapText[2] = {'\t', }; + if (commitText == tapText) + { + return; + } + + if ((commitText == enterText) || (commitText == enterTextComma) || (commitText == enterTextSemiColon)) + { + CoreKeypadAction keypadaction = GetKeypadAction(); + __pTokenEdit->SendKeypadEvent(keypadaction, CORE_KEYPAD_EVENT_STATUS_ENTERACTION); + + if (__editingTokenIndex != -1) + { + ExitTokenEditingMode(); + } + + if (GetText().GetLength() > 0) + { + MakeToken(); + } + + for (int i = 0; i < __pTokenList->GetCount(); i++) + { + TrimTokenAndAdjustEllipsisAt(i); + InitializeTokenVisibilityAt(i); + } + + if (__pressedTokenIndex < 0 && __focusedTokenIndex < 0) + { + SetCursorDisabled(true); + __pTokenEdit->Draw(); + SetCursorDisabled(false); + StartCursorTimer(); + } + // when pressed enter while editing a token, set cursor as global focused element. + _AccessibilityElement* pCursorAccessibilityElement = __pTokenEdit->GetCursorAccessibilityElement(); + if (pCursorAccessibilityElement && __accessibilityFocusIn) + { + _AccessibilityManager* pAccessibilityManager = _AccessibilityManager::GetInstance(); + pAccessibilityManager->SetGlobalFocusedElement(*pCursorAccessibilityElement); + pAccessibilityManager->RequestToDrawFocusUi(); + } + + //Adjust the scroll panel if already added so that the cursor is in the visible area. + ScrollPanelToCursorPosition(); + + return; + } + + _EditPresenter::OnTextCommitted(commitText); + __previousCursorPosition = GetCursorPosition(); + + _Token* pToken = null; + if (__editingTokenIndex >= 0) + { + pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex)); + 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); + + float tokenHeight = 0.0f; + float tokenVerticalSpacing = 0.0f; + float tokenTextLeftMargin = 0.0f; + + _ControlOrientation orientation = __pTokenEdit->GetOrientation(); + GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_HEIGHT, orientation, tokenHeight); + GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_VERTICAL_SPACING, orientation, tokenVerticalSpacing); + GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_TEXT_LEFT_MARGIN, orientation, tokenTextLeftMargin); + + FloatRectangle tempTextDspRect; + tempTextDspRect.x += tokenTextLeftMargin; + tempTextDspRect.y += tokenVerticalSpacing / 2.0f; + tempTextDspRect.width = pToken->displayRect.width - (tokenTextLeftMargin * 2.0f); + tempTextDspRect.height = tokenHeight - tokenVerticalSpacing; + + SetTextBounds(tempTextDspRect); + + if (GetCursorPosition() > pToken->currTokenLength) + { + _EditPresenter::SetCursorPosition(pToken->currTokenLength); + } + else + { + _EditPresenter::SetCursorPosition(GetCursorPosition()); + } + } + else + { + if (!__isEditingToken) + { + __pressedTokenIndex = -1; + __focusedTokenIndex = -1; + SetCursorDisabled(false); + } + + float tokenTopMargin = 0.0f; + _ControlOrientation orientation = __pTokenEdit->GetOrientation(); + GET_SHAPE_CONFIG(TOKENEDIT::TOP_MARGIN, orientation, tokenTopMargin); + + FloatRectangle textBounds = GetTextBoundsF(); + textBounds.height = GetMaxTextHeight(); + SetTextBounds(textBounds); + } + + if (__editingTokenIndex < 0) + { + CheckTokenScrolling(); + } + __pTokenEdit->Invalidate(); + + return; +} + +void +_TokenEditPresenter::DeleteSurroundingText(InputConnection& source, int offset, int charCount) +{ + OnSurroundingTextDeleted(offset, charCount); + + return; +} + +void +_TokenEditPresenter::OnSurroundingTextDeleted(int offset, int charCount) +{ + __lastTokenIndex = GetTokenCount() - 1; + int cursorPosition = 0; + int start = 0; + int end = 0; + + if ((offset == -1) && (charCount == 1)) + { + if (GetTextLength() == 0 && GetTokenCount()) // There is no candidate token. + { + if (__isEditingToken) + { + _VisualElement* pEditVisualElement = __pTokenEdit->GetVisualElement(); + 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, "[%s] A system error has occurred. Failed to get cursor visual element.", GetErrorMessage(E_SYSTEM)); + + _Token* pToken = null; + _VisualElement* pTokenVisualElement = null; + + pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex)); + + if (pToken != null) + { + pTokenVisualElement = pToken->GetVisualElement(); + 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) + { + result r = E_SUCCESS; + r = pCursorVisualElement->GetParent()->DetachChild(*pCursorVisualElement); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating", GetErrorMessage(r)); + + r = pEditVisualElement->AttachChild(*pCursorVisualElement); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating", GetErrorMessage(r)); + } + } + + _EditPresenter::SetTextSize(__editContentFontSize); + RemoveTokenAt(__editingTokenIndex); + + CalculateTokenPositionFromIndex(__editingTokenIndex); + for (int i = __editingTokenIndex; i < __lastTokenIndex + 1; i++) + { + _Token* pToken = null; + pToken = static_cast< _Token* >(__pTokenList->GetAt(i)); + if (pToken != null) + { + pToken->SetBounds(pToken->displayRect); + } + } + + __pressedTokenIndex = -1; + __editingTokenIndex = -1; + __isEditingToken = false; + __isTokenEditingFinished = false; + + AdjustFlexibleHeight(); + CheckTokenScrolling(); + } + else if (__pressedTokenIndex != -1) + { + _VisualElement* pEditVisualElement = __pTokenEdit->GetVisualElement(); + 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, "[%s] A system error has occurred. Failed to get cursor visual element.", GetErrorMessage(E_SYSTEM)); + + _Token* pToken = null; + _VisualElement* pTokenVisualElement = null; + + pToken = static_cast< _Token* >(__pTokenList->GetAt(__pressedTokenIndex)); + + if (pToken != null) + { + pTokenVisualElement = pToken->GetVisualElement(); + 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) + { + result r = E_SUCCESS; + r = pCursorVisualElement->GetParent()->DetachChild(*pCursorVisualElement); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating", GetErrorMessage(r)); + + r = pEditVisualElement->AttachChild(*pCursorVisualElement); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating", GetErrorMessage(r)); + } + } + + RemoveTokenAt(__pressedTokenIndex); + + CalculateTokenPositionFromIndex(__pressedTokenIndex); + for (int i = __pressedTokenIndex; i < __lastTokenIndex + 1; i++) + { + _Token* pToken = null; + pToken = static_cast< _Token* >(__pTokenList->GetAt(i)); + + if (pToken != null) + { + pToken->SetBounds(pToken->displayRect); + } + } + + } + else if (__focusedTokenIndex != -1) + { + RemoveTokenAt(__focusedTokenIndex); + } + else + { + _VisualElement* pEditVisualElement = __pTokenEdit->GetVisualElement(); + 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, "[%s] A system error has occurred. Failed to get cursor visual element.", GetErrorMessage(E_SYSTEM)); + + _Token* pToken = null; + _VisualElement* pTokenVisualElement = null; + + if (__animatingIndex == (GetTokenCount() - 1)) + { + pToken = static_cast< _Token* >(__pTokenList->GetAt(GetTokenCount() - 1)); + if (pToken != null) + { + pTokenVisualElement = pToken->GetVisualElement(); + 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(); + } + } + + pToken = static_cast< _Token* >(__pTokenList->GetAt(GetTokenCount() - 1)); + if (pToken != null) + { + pTokenVisualElement = pToken->GetVisualElement(); + 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) + { + result r = E_SUCCESS; + r = pCursorVisualElement->GetParent()->DetachChild(*pCursorVisualElement); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating", GetErrorMessage(r)); + + r = pEditVisualElement->AttachChild(*pCursorVisualElement); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating", GetErrorMessage(r)); + } + } + + __animatingIndex = GetTokenCount() - 1; + + if (pTokenVisualElement && __animatingIndex >= 0) + { + __isAnimationInProgress = true; + PerformRemoveTokenAnimation(*pTokenVisualElement); + } + } + + __pTokenEdit->UpdateAccessibilityElement(EDIT_ACCESSIBILITY_ELEMENT_TYPE_TEXT); + + DrawText(); + __pTokenEdit->Invalidate(); + return; + } + } + + if (__pressedTokenIndex >= 0 && __editingTokenIndex < 0 && !__isEditingToken) + { + RemoveTokenAt(__pressedTokenIndex); + __pTokenEdit->Invalidate(); + return; + } + else if (__focusedTokenIndex >= 0 && __editingTokenIndex < 0 && !__isEditingToken) + { + RemoveTokenAt(__focusedTokenIndex); + __pTokenEdit->Invalidate(); + return; + } + + //Backspace on Blocked text, delete full block + if (IsBlocked()) + { + GetBlockRange(start, end); + } + else + { + cursorPosition = GetCursorPosition(); + start = cursorPosition + offset; + if (start < 0) + { + return; + } + end = start + charCount; + if (end > GetTextLength()) + { + return; + } + } + + DeleteText(start, end); + __previousCursorPosition = start; + + if (IsCopyPasteManagerExist()) + { + InitializeCopyPasteManager(); + } + if (IsBlocked()) + { + ReleaseTextBlock(); + } + if (!__isEditingToken) + { + DrawText(); + } + + __pTokenEdit->SendTextEvent(CORE_TEXT_EVENT_CHANGED); + +#if 0 //ORIGINAL + cursorPosition = GetCursorPosition(); + start = cursorPosition + offset; + if (start < 0) + { + return; + } + end = start + charCount; + if (end > GetTextLength()) + { + return; + } + + Rectangle currBounds = __pTokenEdit->GetBounds(); + DeleteText(start, end); + __previousCursorPosition = start; + if (!__isEditingToken) + { + DrawText(); + } +#endif + + _Token* pToken = null; + + if (__editingTokenIndex >= 0 && __isEditingToken) + { + pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex)); + + if (pToken != null) + { + float tokenHeight = 0.0f; + float tokenVerticalSpacing = 0.0f; + float tokenTextLeftMargin = 0.0f; + + SetCursorPosition(__previousCursorPosition); + + _ControlOrientation orientation = __pTokenEdit->GetOrientation(); + GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_HEIGHT, orientation, tokenHeight); + GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_VERTICAL_SPACING, orientation, tokenVerticalSpacing); + GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_TEXT_LEFT_MARGIN, orientation, tokenTextLeftMargin); + + FloatRectangle tempTextDspRect; + tempTextDspRect.x += tokenTextLeftMargin; + tempTextDspRect.y += tokenVerticalSpacing / 2.0f; + tempTextDspRect.width = pToken->displayRect.width - (tokenTextLeftMargin * 2.0f); + tempTextDspRect.height = tokenHeight - tokenVerticalSpacing; + + SetTextBounds(tempTextDspRect); + _EditPresenter::SetCursorPosition(start); + + pToken->ResetToken(GetText()); + TrimTokenAndAdjustEllipsisAt(__editingTokenIndex); + } + } + + __pTokenEdit->Draw(); + + return; +} + +bool +_TokenEditPresenter::OnTapGestureDetected(void) +{ + if (__editingTokenIndex >= 0) + { + __isPopupVisible = true; + } + + //Uncomment below to Block Copy & Paste functionality in Token Edit mode + if (__pressedTokenIndex != -1) + { + return true; + } + return _EditPresenter::OnTapGestureDetected(); +} + +bool +_TokenEditPresenter::CheckCopyPastePopupShowStatus(void) +{ + if (__editingTokenIndex < 0) + { + float controlHeight = __pTokenEdit->GetBoundsF().height; + FloatRectangle cursorBounds; + GetCursorBounds(false, cursorBounds); + if (cursorBounds.y > controlHeight) + { + return true; + } + } + + return false; +} + +bool +_TokenEditPresenter::OnLongPressGestureDetected(void) +{ + if (CheckCopyPastePopupShowStatus()) + { + //TextBounds bigger than control height. Dont show Copy paste popup + return true; + } + + //Discard all long press that is detected after Touch press on a token + if (__trackTokenIndex >= 0) + { + return true; + } + + __isLongPressed = true; + + //Uncomment below to Block Copy & Paste functionality in Token Edit mode + if (__pressedTokenIndex != -1) + { + return true; + } + return _EditPresenter::OnLongPressGestureDetected(); +} + +void +_TokenEditPresenter::OnCursorTimerExpired(void) +{ + if (__editingTokenIndex != -1) + { + if (!IsFocused()) + { + StopCursorTimer(); + return; + } + + FloatRectangle cursorRect; + + _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex)); + 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(); + + if (CalculateCursorBounds(cursorDspRect, cursorRect) != E_SUCCESS) + { + StartCursorTimer(); + return; + } + + _VisualElement* pCursorVisualElement = GetCursorVisualElement(); + 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, "[%s] A system error has occurred. Failed to get canvas of cursor visual element.", GetErrorMessage(E_SYSTEM)); + + bool cursorEnable = IsCursorEnabled(); + + pCursorVisualElement->SetBounds(cursorRect); + DrawCursor(*pCursorCanvas, cursorRect, cursorEnable); + + if (cursorEnable) + { + cursorEnable = false; + } + else + { + cursorEnable = true; + } + SetCursorEnabled(cursorEnable); + + pCursorCanvas->Show(); + delete pCursorCanvas; + + StartCursorTimer(); + } + else + { + _EditPresenter::OnCursorTimerExpired(); + } + + return; +} + +bool +_TokenEditPresenter::IsTextBlockedInTokenEdit(void) const +{ + if ((IsBlocked()) && (__isEditingToken) && (__editingTokenIndex >= 0)) + { + return true; + } + return false; +} + +bool +_TokenEditPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + __isTouchMoveInProgress = true; + float tempPrevScrollValue = __prevScrollValue; + + if (GetTokenCount() && !_EditPresenter::IsDragAndDropStarted()) + { + //Scrolling is blocked when a popup is visible or when a text is blocked + if (IsBlocked() || __isLongPressed) + { + return false; + } + + //Allow touch move only in horizontal direction when editing token + _TouchInfo TouchInfo(touchinfo); + _Token* pToken = null; + if (__editingTokenIndex >= 0) + { + if (__touchPressInfo.y > 0.0f) + { + pToken = static_cast< _Token* >(__pTokenList->GetAt(__editingTokenIndex)); + if (pToken != null) + { + float tokenX = pToken->displayRect.x; + float tokenY = pToken->displayRect.y; + FloatPoint point(touchinfo.GetCurrentPosition().x - tokenX, __touchPressInfo.y - tokenY); + TouchInfo.SetTouchInfo(touchinfo.GetPointId(), touchinfo.GetTouchStatus(), point, touchinfo.IsFlicked(), touchinfo.GetTimeStamp()); + } + + bool retValue = _EditPresenter::OnTouchMoved(source, TouchInfo); + __previousCursorPosition = GetCursorPosition(); + + return retValue; + } + else + { + return false; + } + } + + SetTokenBoundsByTouchInfo(touchinfo); + + if (!(__pTokenEdit->GetEditStyle() & EDIT_STYLE_NOSCROLL)) + { + _Scroll* pScroll = GetScrollBar(); + if (pScroll != null) + { + float tokenBottomMargin = 0.0f; + GET_SHAPE_CONFIG(TOKENEDIT::BOTTOM_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, tokenBottomMargin); + + float totalHeight = GetTextBoundsF().y + GetTextBoundsF().height - __scrollValue + tokenBottomMargin; + float controlHeight = __pTokenEdit->GetBoundsF().height; + + if (totalHeight > controlHeight && (!IsHorizontalDirection(touchinfo))) + { + pScroll->SetScrollVisibility(true); + } + else + { + pScroll->SetScrollVisibility(false); + } + } + } + + if ((__scrollValue < 0.0f && __scrollValue > -__maxScrollValue) || !tempPrevScrollValue) + { + _EditPresenter::OnTouchMoved(source, touchinfo); + return true; + } + + return _EditPresenter::OnTouchMoved(source, touchinfo); + } + else + { + return _EditPresenter::OnTouchMoved(source, touchinfo); + } + +} + +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); + + for (int i = GetTokenCount() - 1; i < GetTokenCount() - 1 + 1; i++) + { + _Token* pToken = null; + pToken = static_cast< _Token* >(__pTokenList->GetAt(i)); + + if (pToken != null) + { + pToken->SetBounds(pToken->displayRect); + } + } + + if (__lastTokenIndex == __pressedTokenIndex) + { + __pressedTokenIndex--; + } + + if (GetTokenCount() == 0 && __animatingIndex == 0) + { + DrawText(); + } + __animatingIndex = -1; + InitializeCursor(); + + DrawToken(); + + __pTokenEdit->UpdateAccessibilityElement(EDIT_ACCESSIBILITY_ELEMENT_TYPE_TEXT); + __transactionId = 0; + + return; +} + +void +_TokenEditPresenter::OnTickOccurred(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, const Tizen::Ui::Variant& currentValue) +{ + VisualElementValueAnimation* pAnimation = dynamic_cast< VisualElementValueAnimation* >(const_cast< VisualElementAnimation* >(&animation)); + VisualElement* pPresentation = const_cast< VisualElement* >(target.AcquirePresentationInstance()); + + if (pPresentation != null && pAnimation != null) + { + float diffX = 0.0f; + float diffY = 0.0f; + + diffX = pPresentation->GetBounds().x; + diffY = pPresentation->GetBounds().y; + + Variant newBounds(FloatRectangle(diffX, diffY, currentValue.ToFloatRectangle().width, currentValue.ToFloatRectangle().height)); + _VisualElementImpl::GetInstance(*pPresentation)->SetProperty(VePropBounds, newBounds); + } + else + { + SysLogException(NID_UI_CTRL, E_SYSTEM, "[%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* pTitleTextCanvas = null; + + if (onTimer == __pTitleSlidingTimer) + { + if (!IsFocused()) + { + _EditPresenter::StopTitleSlidingTimer(); + __isTitleSliding = false; + return; + } + + FloatRectangle tempTitleTextRect = __titleTextRect; + tempTitleTextRect.x = 0.0f; + tempTitleTextRect.y = 0.0f; + + pTitleTextCanvas = __pTitleTextVisualElement->GetCanvasN(); + SysTryReturnVoidResult(NID_UI_CTRL, pTitleTextCanvas, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + pTitleTextCanvas->SetBackgroundColor(Color(0)); + pTitleTextCanvas->Clear(); + __pTitleTextObject->SetBounds(tempTitleTextRect); + __pTitleTextObject->DrawWithOffset(*_CanvasImpl::GetInstance(*pTitleTextCanvas)); + Rectangle titleTextRect = _CoordinateSystemUtils::ConvertToInteger(tempTitleTextRect); + pTitleTextCanvas->Show(titleTextRect); + + delete pTitleTextCanvas; + + _EditPresenter::StartTitleSlidingTimer(); + __isTitleSliding = true; + } + else + { + _EditPresenter::OnTimerExpired(timer); + } + + return; +} + +result +_TokenEditPresenter::ChangeInternalLayout(_ControlOrientation orientation) +{ + result r = E_SUCCESS; + + __scrollValue = 0.0f; + __maxScrollValue = 0.0f; + float tokenBottomMargin = 0.0f; + float newScrollValue = 0.0f; + + FloatRectangle windowBounds = GetInitialBoundsF(); + + GET_SHAPE_CONFIG(TOKENEDIT::BOTTOM_MARGIN, orientation, tokenBottomMargin); + + r = CalculateTokenPositionFromIndex(0); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = SetInitialBounds(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + if (__isEditingToken) + { + if (__editingTokenIndex >= 0 && __editingTokenIndex < GetTokenCount()) + { + String inputTokenString = GetText(); + String replacementString = inputTokenString; + bool enable = false; + + __pTokenEdit->ProcessTokenFiltering(inputTokenString, replacementString, enable); + if (enable) + { + inputTokenString = replacementString; + } + + int index = __editingTokenIndex; + RemoveTokenAt(__editingTokenIndex, true); + if (inputTokenString.GetLength() > 0) + { + InsertTokenAt(index, inputTokenString); + } + } + } + + if (__pTokenEdit->IsAttachedToMainTree() && IsFocused()) + { + r = AdjustFlexibleHeight(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = CheckTokenScrolling(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + else + { + if (!__autoShrink) + { + r = AdjustFlexibleHeight(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + windowBounds = __pTokenEdit->GetBoundsF(); + } + + newScrollValue = GetTextBoundsF().y + GetTextBoundsF().height - __scrollValue + tokenBottomMargin - windowBounds.height; + if (newScrollValue > 0.0f) + { + __maxScrollValue = newScrollValue; + __isNeedToScroll = true; + } + } + + return r; +} + +result +_TokenEditPresenter::ChangeLayout(_ControlOrientation orientation) +{ + result r = E_SUCCESS; + + r = _EditPresenter::ChangeLayout(orientation); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = ChangeInternalLayout(orientation); + + return r; +} + +void +_TokenEditPresenter::OnBoundsChanged(void) +{ + if (!__isTokenEditPresenterInitialized) + { + return; + } + + _ControlOrientation orientation = __pTokenEdit->GetOrientation(); + FloatRectangle tokenEditBounds = __pTokenEdit->GetBoundsF(); + + if (IsUpdateInitialBounds()) + { + SetControlInitialBounds(tokenEditBounds); + } + ChangeInternalLayout(orientation); + + __pTokenEdit->UpdateAccessibilityElement(EDIT_ACCESSIBILITY_ELEMENT_TYPE_TEXT); + + return; +} + +result +_TokenEditPresenter::AttachCursorToToken(void) +{ + result r = E_SUCCESS; + + if (__pressedTokenIndex != -1) + { + _VisualElement* pEditVisualElement = __pTokenEdit->GetVisualElement(); + 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."); + + _Token* pToken = null; + _VisualElement* pTokenVisualElement = null; + + pToken = static_cast <_Token*>(__pTokenList->GetAt(__pressedTokenIndex)); + if (pToken != null) + { + pTokenVisualElement = pToken->GetVisualElement(); + SysTryReturnResult(NID_UI_CTRL, pTokenVisualElement, E_SYSTEM, "A system error has occurred. Failed to get token visual element."); + + if (pCursorVisualElement->GetParent() != pTokenVisualElement) + { + r = (pCursorVisualElement->GetParent())->DetachChild(*pCursorVisualElement); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + r = pTokenVisualElement->AttachChild(*pCursorVisualElement); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + } + } + + return r; +} + +result +_TokenEditPresenter::DetachCursorFromToken(void) +{ + result r = E_SUCCESS; + + if (__pressedTokenIndex != -1) + { + _VisualElement* pEditVisualElement = __pTokenEdit->GetVisualElement(); + 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, "A system error has occurred. Failed to get cursor visual element."); + + _Token* pToken = null; + _VisualElement* pTokenVisualElement = null; + + pToken = static_cast <_Token*>(__pTokenList->GetAt(__pressedTokenIndex)); + + if (pToken != null) + { + pTokenVisualElement = pToken->GetVisualElement(); + 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, "Propagating."); + + r = pEditVisualElement->AttachChild(*pCursorVisualElement); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "Propagating."); + } + } + } + return r; +} + +void +_TokenEditPresenter::ExitTokenEditingMode(void) +{ + result r = E_SUCCESS; + + _VisualElement* pEditVisualElement = __pTokenEdit->GetVisualElement(); + 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, "[%s] A system error has occurred. Failed to get cursor visual element.", GetErrorMessage(E_SYSTEM)); + + _Token* pToken = null; + _VisualElement* pTokenVisualElement = null; + + pToken = static_cast <_Token*>(__pTokenList->GetAt(__editingTokenIndex)); + + if (pToken != null) + { + pTokenVisualElement = pToken->GetVisualElement(); + 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) + { + r = pCursorVisualElement->GetParent()->DetachChild(*pCursorVisualElement); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + r = pEditVisualElement->AttachChild(*pCursorVisualElement); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + } + } + + String inputTokenString = GetText(); + String replacementString = inputTokenString; + bool enable = false; + + __pTokenEdit->ProcessTokenFiltering(inputTokenString, replacementString, enable); + if (enable) + { + inputTokenString = replacementString; + } + + _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, "[%s] A system error has occurred. The _Token instance must not be null.", GetErrorMessage(E_SYSTEM)); + + pToken->currTokenLength = inputTokenString.GetLength(); + } + + CalculateTokenPositionFromIndex(0); + int lastTokenIndex = GetTokenCount() - 1; + for (int i = 0; i < lastTokenIndex + 1; i++) + { + _Token* pToken = null; + pToken = static_cast <_Token*>(__pTokenList->GetAt(i)); + + if (pToken != null) + { + pToken->SetBounds(pToken->displayRect); + } + } + + AdjustFlexibleHeight(); + __pressedTokenIndex = -1; + __isTokenEditingFinished = true; + __editingTokenIndex = -1; + __isEditingToken = false; + + CheckTokenScrolling(); + SetCursorDisabled(false); + + if (inputTokenString.GetLength() <= 0) + { + SysLog(NID_UI_CTRL, "[%s] Invalid argument is used. Token length is (%d)", GetErrorMessage(E_INVALID_ARG), inputTokenString.GetLength()); + } + + return; +} + +bool +_TokenEditPresenter::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) +{ + _KeyCode keyCode = keyInfo.GetKeyCode(); + bool focusChanged = false; + int tokenCount = GetTokenCount(); + int lastTokenIndex = tokenCount - 1; + + if (IsUsbKeyboardConnected() && (keyInfo.GetKeyModifier() & _KEY_MODIFIER_CTRL)) + { + switch (keyCode) + { + case _KEY_A: + case _KEY_C: + case _KEY_X: + case _KEY_V: + if (__isEditingToken) + { + return true; + } + break; + + default: + break; + } + } + + if ((keyCode == _KEY_NUM_LEFT) || (keyCode == _KEY_LEFT)) + { + if (__drawFocusState && (!__isEditingToken) && (tokenCount > 0)) + { + if (__focusedTokenIndex == -1) + { + if (GetCursorPosition() == 0) + { + __focusedTokenIndex = lastTokenIndex; + if (GetTextLength() > 0) + { + MakeToken(); + StopCursorTimer(); + SetCursorDisabled(true); + __pTokenEdit->Invalidate(); + + StartCursorTimer(); + + return _EditPresenter::OnKeyPressed(source, keyInfo); + } + focusChanged = true; + } + } + else + { + if (__focusedTokenIndex > 0) + { + __focusedTokenIndex--; + focusChanged = true; + } + } + } + } + + if ((keyCode == _KEY_NUM_RIGHT) || (keyCode == _KEY_RIGHT)) + { + if (__drawFocusState && (!__isEditingToken) && (tokenCount > 0)) + { + if (__focusedTokenIndex != -1) + { + if (__focusedTokenIndex == lastTokenIndex) + { + __focusedTokenIndex = -1; + focusChanged = true; + } + else + { + __focusedTokenIndex++; + focusChanged = true; + } + } + } + } + + if (focusChanged) + { + StopCursorTimer(); + + if (__focusedTokenIndex != -1) + { + SetCursorDisabled(true); + ScrollToFocusedToken(); + } + else + { + SetCursorDisabled(false); + CheckTokenScrolling(); + } + + __pTokenEdit->Invalidate(); + + StartCursorTimer(); + } + + return _EditPresenter::OnKeyPressed(source, keyInfo); +} + +String +_TokenEditPresenter::GetTextAccessibilityElementText(void) const +{ + String tokenText; + String spaceText = " "; + _Token* pToken = null; + int tokenCount = GetTokenCount(); + static const int readTokenCount = 2; + if (tokenCount > 0) + { + for (int index = 0; index < readTokenCount; index++) + { + pToken = static_cast< _Token* >(__pTokenList->GetAt(index)); + 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)) + { + tokenText += pToken->GetText() + spaceText; + } + else + { + String moreTokenText; + int moreTokenCount = tokenCount - readTokenCount; + if (moreTokenCount > 0) + { + moreTokenText.Format(15, L"and %d more", moreTokenCount); + } + tokenText += pToken->GetText() + spaceText + moreTokenText; + } + } + } + return tokenText; +} + +void +_TokenEditPresenter::RefreshAccessibilityElements(void) +{ + RemoveChildAccessibilityElements(); + AddChildAccessibilityElements(); + + return; +} + +result +_TokenEditPresenter::AddChildAccessibilityElements(void) +{ + //Accessibility Elements added to the container upon focus gained + //1.Title + //2.Token(s) + //3. __accessibilityElements 0 - title 1 - token 0 + + result r = E_SUCCESS; + _AccessibilityContainer* pContainer = __pTokenEdit->GetAccessibilityContainer(); + + __pTokenEdit->AddTitleAccessibilityElement(); + int tokenCount = GetTokenCount(); + + 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, "[%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, "Memory allocation failed."); + + String labelText = pToken->GetText(); + pAccessibilityElement->SetBounds(pToken->displayRect); + pAccessibilityElement->SetLabel(labelText); + pContainer->AddElement(*pAccessibilityElement); + __accessibilityElements.Add(pAccessibilityElement); + } + } + + __pTokenEdit->AddCursorAccessibilityElement(); + + return r; +} + +void +_TokenEditPresenter::RemoveChildAccessibilityElements(void) +{ + _AccessibilityContainer* pContainer = __pTokenEdit->GetAccessibilityContainer(); + _AccessibilityElement* pAccessibilityElement = null; + + __pTokenEdit->RemoveTitleAccessibilityElement(); + + while (__accessibilityElements.GetCount() > 0) + { + if ((__accessibilityElements.GetAt(0, pAccessibilityElement)) == E_SUCCESS) + { + __accessibilityElements.RemoveAt(0); + pContainer->RemoveElement(*pAccessibilityElement); + } + } + + __pTokenEdit->RemoveCursorAccessibilityElement(); + + return; +} + +result +_TokenEditPresenter::AppendTokenAccessibilityElement(void) +{ + result r = E_SUCCESS; + int tokenCount = GetTokenCount(); + + _AccessibilityContainer* pContainer = __pTokenEdit->GetAccessibilityContainer(); + + _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(tokenCount - 1)); + 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, "Memory allocation failed."); + + String labelText = pToken->GetText(); + pAccessibilityElement->SetBounds(pToken->displayRect); + pAccessibilityElement->SetLabel(labelText); + pAccessibilityElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_EDIT_T_TTS"); + pContainer->AddElement(*pAccessibilityElement); + __accessibilityElements.Add(pAccessibilityElement); + } + + return r; +} + +result +_TokenEditPresenter::InsertTokenAccessibilityElementAt(int index) +{ + result r = E_SUCCESS; + + _AccessibilityContainer* pContainer = __pTokenEdit->GetAccessibilityContainer(); + _Token* pToken = static_cast< _Token* >(__pTokenList->GetAt(index)); + 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, "Memory allocation failed."); + + String labelText = pToken->GetText(); + pAccessibilityElement->SetBounds(pToken->displayRect); + pAccessibilityElement->SetLabel(labelText); + pContainer->InsertElement(*pAccessibilityElement, index); + __accessibilityElements.InsertAt(pAccessibilityElement, index); + } + + return r; +} + +void +_TokenEditPresenter::RemoveTokenAccessibilityElementAt(int index) +{ + _AccessibilityContainer* pContainer = __pTokenEdit->GetAccessibilityContainer(); + _AccessibilityElement* pAccessibilityElement = null; + + if (pContainer != null) + { + if (__accessibilityElements.GetCount() > 0) + { + if ((__accessibilityElements.GetAt(index, pAccessibilityElement)) == E_SUCCESS) + { + __accessibilityElements.RemoveAt(index); + pContainer->RemoveElement(*pAccessibilityElement); + } + } + } + return; +} + +result +_TokenEditPresenter::UpdateTokenAccessibilityBounds(void) +{ + result r = E_SUCCESS; + int tokenCount = GetTokenCount(); + _AccessibilityElement* pAccessibilityElement = null; + + 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, "[%s] A system error has occurred. The _Token instance must not be null.", GetErrorMessage(E_SYSTEM)); + + if ((__accessibilityElements.GetAt(index, pAccessibilityElement)) == E_SUCCESS) + { + if (pAccessibilityElement != null) + { + pAccessibilityElement->SetBounds(pToken->displayRect); + } + } + } + return r; +} + +result +_TokenEditPresenter::UpdateTitleAccessibilityBounds(const FloatRectangle& titleBounds) +{ + _AccessibilityElement* pTitleAccessibilityElement = __pTokenEdit->GetTitleTextAccessibilityElement(); + + if (pTitleAccessibilityElement == null) + { + return E_SUCCESS; + } + + pTitleAccessibilityElement->SetBounds(titleBounds); + + return E_SUCCESS; +} + +result +_TokenEditPresenter::ScrollToFocusedTokenAccessibilityElement(const _AccessibilityElement& element) +{ + result r = E_SUCCESS; + int focusedTokenIndex = -1; + int tokenCount = GetTokenCount(); + FloatRectangle focusedTokenRectangle; + float newScrollValue = 0.0f; + float tokenTopMargin = 0.0f; + float tokenBottomMargin = 0.0f; + float tokenHeight = 0.0f; + float textBoundsAlignValue = 0.0f; + _ControlOrientation orientation = __pTokenEdit->GetOrientation(); + _AccessibilityElement* pAccessibilityElement = null; + + GET_SHAPE_CONFIG(TOKENEDIT::TOP_MARGIN, orientation, tokenTopMargin); + GET_SHAPE_CONFIG(TOKENEDIT::BOTTOM_MARGIN, orientation, tokenBottomMargin); + GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_HEIGHT, orientation, tokenHeight); + + FloatRectangle tokenEditRect = __pTokenEdit->GetBoundsF(); + float textObjectMaxHeight = GetMaxTextHeight(); + textBoundsAlignValue = (tokenHeight - textObjectMaxHeight) / 2.0f; + + pAccessibilityElement = const_cast< _AccessibilityElement* >(&element); + r = __accessibilityElements.IndexOf(pAccessibilityElement, focusedTokenIndex); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + if ((focusedTokenIndex > -1) && (focusedTokenIndex < tokenCount)) + { + _Token* pToken = null; + pToken = static_cast< _Token* >(__pTokenList->GetAt(focusedTokenIndex)); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, pToken != null, r, "Propagating."); + + focusedTokenRectangle = pToken->displayRect; + + float focusedTokenPosition = focusedTokenRectangle.y + focusedTokenRectangle.height; + + if ((focusedTokenRectangle.y > 0) && (focusedTokenPosition < tokenEditRect.height)) + { + DrawToken(); + } + else + { + if (focusedTokenRectangle.y < 0) + { + newScrollValue = focusedTokenRectangle.y - tokenTopMargin - __scrollValue; + } + else + { + newScrollValue = focusedTokenPosition - textBoundsAlignValue - tokenEditRect.height + tokenBottomMargin - __scrollValue; + } + + r = RecalculateTokenBounds(newScrollValue); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + + r = __accessibilityElements.GetAt(focusedTokenIndex, pAccessibilityElement); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + + _AccessibilityManager* pAccessibilityManager = _AccessibilityManager::GetInstance(); + pAccessibilityManager->SetGlobalFocusedElement(*pAccessibilityElement); + pAccessibilityManager->RequestToDrawFocusUi(); + } + + return r; +} + +result +_TokenEditPresenter::ScrollToTitleAccessibilityElement(void) +{ + _AccessibilityElement* pTitleAccessibilityElement = __pTokenEdit->GetTitleTextAccessibilityElement(); + if (pTitleAccessibilityElement != null) + { + FloatRectangle titleTextBounds = pTitleAccessibilityElement->GetBounds(); + if (titleTextBounds.y < 0) + { + float tokenTopMargin = 0.0f; + _ControlOrientation orientation = __pTokenEdit->GetOrientation(); + GET_SHAPE_CONFIG(TOKENEDIT::TOP_MARGIN, orientation, tokenTopMargin); + float newScrollValue = titleTextBounds.y - tokenTopMargin - __scrollValue; + result r = RecalculateTokenBounds(newScrollValue); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + } + + return E_SUCCESS; +} + +bool +_TokenEditPresenter::OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + result r = E_SUCCESS; + _AccessibilityElement* pTitleAccessibilityElement = __pTokenEdit->GetTitleTextAccessibilityElement(); + + __accessibilityFocusIn = true; + + if (__focusOutIndex < 0) // Not a token accessibility element + { + if (pTitleAccessibilityElement != &element) + { + return false; + } + } + + _Token* pToken = null; + _AccessibilityElement* pCurrentElement = const_cast< _AccessibilityElement* >(&element); + _AccessibilityElement* pPreviousAccessibilityElement = null; + _AccessibilityElement* pNextAccessibilityElement = null; + if (pTitleAccessibilityElement == &element) + { + ScrollToTitleAccessibilityElement(); + UpdateTokenAccessibilityBounds(); + return false; + } + r = __accessibilityElements.GetAt(__focusOutIndex, pPreviousAccessibilityElement); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, true, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (pPreviousAccessibilityElement != null && pPreviousAccessibilityElement->GetAbsoluteBounds().y > element.GetAbsoluteBounds().y) //Left flick + { + pToken = static_cast< _Token* >(__pTokenList->GetAt(__focusOutIndex - 1)); + if (pToken != null) + { + if (pToken->displayRect.y < 0.0f && __focusOutIndex > 0) + { + r = __accessibilityElements.GetAt(__focusOutIndex - 1, pNextAccessibilityElement); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, true, r, "[%s] Propagating.", GetErrorMessage(r)); + + ScrollToFocusedTokenAccessibilityElement(*pNextAccessibilityElement); + } + } + } + + if (pPreviousAccessibilityElement != null && pPreviousAccessibilityElement->GetAbsoluteBounds().y < element.GetAbsoluteBounds().y) //Right flick + { + pToken = static_cast< _Token* >(__pTokenList->GetAt(__focusOutIndex + 1)); + if (pToken != null) + { + if (pToken->displayRect.y + pToken->displayRect.height > __pTokenEdit->GetBoundsF().height) + { + r = __accessibilityElements.GetAt(__focusOutIndex + 1, pNextAccessibilityElement); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, true, r, "[%s] Propagating.", GetErrorMessage(r)); + + ScrollToFocusedTokenAccessibilityElement(*pNextAccessibilityElement); + } + } + } + + if (pToken == null) //Draw Cursor Accessibility Element + { + _AccessibilityElement* pCursorAccessibilityElement = __pTokenEdit->GetCursorAccessibilityElement(); + if (pCursorAccessibilityElement != null && pPreviousAccessibilityElement != null && pCursorAccessibilityElement != pPreviousAccessibilityElement) + { + if (GetTextBoundsF().y - pPreviousAccessibilityElement->GetBounds().y > pPreviousAccessibilityElement->GetBounds().height) //check for different lines + { + float height = GetTextBoundsF().height + pPreviousAccessibilityElement->GetBounds().y + pPreviousAccessibilityElement->GetBounds().height; + if (pCurrentElement == pCursorAccessibilityElement && height > __pTokenEdit->GetBoundsF().height) + { + float tokenBottomMargin = 0.0f; + GET_SHAPE_CONFIG(TOKENEDIT::BOTTOM_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, tokenBottomMargin); + float newScrollValue = GetTextBoundsF().height + tokenBottomMargin - __scrollValue; + RecalculateTokenBounds(newScrollValue); + _AccessibilityManager::GetInstance()->SetGlobalFocusedElement(*(__pTokenEdit->GetCursorAccessibilityElement())); + _AccessibilityManager::GetInstance()->RequestToDrawFocusUi(); + } + } + } + } + + __focusOutIndex = -1; + UpdateTokenAccessibilityBounds(); + + return false; +} + +bool +_TokenEditPresenter::OnAccessibilityFocusOut(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + _AccessibilityElement* pAccessibilityElement = null; + pAccessibilityElement = const_cast< _AccessibilityElement* >(&element); + __accessibilityElements.IndexOf(pAccessibilityElement, __focusOutIndex); + __accessibilityFocusIn = false; + + return false; +} + +bool +_TokenEditPresenter::OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + _AccessibilityElement* pTextAccessibilityElement = __pTokenEdit->GetTextAccessibilityElement(); + if (pTextAccessibilityElement != null) + { + if (pTextAccessibilityElement == &element) + { + __pTokenEdit->SetFocused(true); + if (__pTokenEdit->IsInternalFocused()) // Set cursor as global focus accessibility element only in focused mode. + { + _AccessibilityElement* pCursorAccessibilityElement = __pTokenEdit->GetCursorAccessibilityElement(); + if (pCursorAccessibilityElement != null) + { + _AccessibilityManager::GetInstance()->SetGlobalFocusedElement(*pCursorAccessibilityElement); + _AccessibilityManager::GetInstance()->RequestToDrawFocusUi(); + } + } + } + } + + return false; +} + +result +_TokenEditPresenter::ScrollToFocusedToken(void) +{ + result r = E_SUCCESS; + FloatRectangle focussedTokenRectangle; + float newScrollValue = 0.0f; + float tokenTopMargin = 0.0f; + float tokenBottomMargin = 0.0f; + float tokenHeight = 0.0f; + float textBoundsAlignValue = 0.0f; + _ControlOrientation orientation = __pTokenEdit->GetOrientation(); + + + GET_SHAPE_CONFIG(TOKENEDIT::TOP_MARGIN, orientation, tokenTopMargin); + GET_SHAPE_CONFIG(TOKENEDIT::BOTTOM_MARGIN, orientation, tokenBottomMargin); + GET_SHAPE_CONFIG(TOKENEDIT::TOKEN_HEIGHT, orientation, tokenHeight); + + FloatRectangle tokenEditRect = __pTokenEdit->GetBoundsF(); + float textObjectMaxHeight = GetMaxTextHeight(); + textBoundsAlignValue = (tokenHeight - textObjectMaxHeight) / 2.0f; + + if (__focusedTokenIndex == -1) + { + //Focus bitmap to be reset when no token is focused. + DrawToken(); + } + else + { + _Token* pToken = null; + pToken = static_cast <_Token*>(__pTokenList->GetAt(__focusedTokenIndex)); + r = GetLastResult(); + SysTryReturnResult(NID_UI_CTRL, pToken != null, r, "Propagating."); + + focussedTokenRectangle = pToken->displayRect; + + float focussedTokenPosition= focussedTokenRectangle.y + focussedTokenRectangle.height ; + + if ((focussedTokenRectangle.y > 0) && (focussedTokenPosition < tokenEditRect.height)) + { + //Focused token is within the tokenEdit boundary + DrawToken(); + } + else + { + if (focussedTokenRectangle.y < 0) + { + //Focused token is above the upper boundary + newScrollValue = focussedTokenRectangle.y - tokenTopMargin - __scrollValue; + } + else + { + //Focused token is below the lower boundary + newScrollValue = focussedTokenPosition - textBoundsAlignValue - tokenEditRect.height + tokenBottomMargin - __scrollValue; + } + + r = RecalculateTokenBounds(newScrollValue); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, r, "Propagating."); + } + } + + return r; +} + +void +_TokenEditPresenter::SetDrawFocusState(bool focusState) +{ + if (!focusState) + { + __focusedTokenIndex = -1; + } + __drawFocusState = focusState; + + return; +} + +int +_TokenEditPresenter::GetFocusedTokenIndex(void) const +{ + return __focusedTokenIndex; +} + +void +_TokenEditPresenter::PrepareFocusUiMode(void) +{ + if (__editingTokenIndex != -1) + { + ExitTokenEditingMode(); + } + else if (__pressedTokenIndex != -1) + { + __pressedTokenIndex = -1; + DetachCursorFromToken(); + StopCursorTimer(); + SetCursorDisabled(false); + __pTokenEdit->Invalidate(); + StartCursorTimer(); + } + + return; +} + +void +_TokenEditPresenter::PerformRemoveTokenAnimation(VisualElement& source) +{ + FloatRectangle startValue(0.0f, 0.0f, 0.0f, 0.0f); + + if (__pTimingFunction == null) + { + __pTimingFunction = new (std::nothrow) SineTimingFunction(); + SysTryReturnVoidResult(NID_UI_CTRL, __pTimingFunction, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + } + + VisualElementPropertyAnimation* pOpacityAnimation = new (std::nothrow) VisualElementPropertyAnimation(); + 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)); + pOpacityAnimation->SetEndValue(Variant(0.0f)); + + pOpacityAnimation->SetDuration(ANIMATION_DURATION_OPACITY); + 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, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + pBoundsAnimation->SetTimingFunction(__pTimingFunction); + startValue = source.GetBounds(); + startValue.x = startValue.x + startValue.width * 0.05; + startValue.y = startValue.y + startValue.height * 0.05; + startValue.width = startValue.width * 0.9; + startValue.height = startValue.height * 0.9; + + pBoundsAnimation->SetStartValue(Variant(source.GetBounds())); + pBoundsAnimation->SetEndValue(Variant(startValue)); + pBoundsAnimation->SetVisualElementAnimationStatusEventListener(this); + pBoundsAnimation->SetVisualElementAnimationTickEventListener(this); + pBoundsAnimation->SetDuration(ANIMATION_DURATION_BOUNDS); + + AnimationTransaction::Begin(__transactionId); + source.AddAnimation(L"BoundsAnimation", *pBoundsAnimation); + source.AddAnimation("OpacityAnimation", *pOpacityAnimation); + AnimationTransaction::Commit(); + + delete pBoundsAnimation; + // fall through +CATCH: + delete pOpacityAnimation; + + 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 new file mode 100644 index 0000000..30b5782 --- /dev/null +++ b/src/ui/controls/FUiCtrl_Toolbar.cpp @@ -0,0 +1,10552 @@ +// +// 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_Toolbar.cpp + * @brief This is the implementation file for the _Toolbar class. + */ + +#include +#include +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_AccessibilityContainer.h" +#include "FUi_AccessibilityElement.h" +#include "FUi_AccessibilityManager.h" +#include "FUi_IAccessibilityListener.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_TouchLongPressGestureDetector.h" +#include "FUi_ResourceManager.h" +#include "FUiCtrl_ActionEvent.h" +#include "FUiCtrl_Toolbar.h" +#include "FUiCtrl_ToolbarPresenter.h" +#include "FUiCtrl_Label.h" +#include "FUiCtrl_Form.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Base::Utility; + +namespace +{ +class FooterItemAccessibilityListener + : public _IAccessibilityListener +{ +public: + FooterItemAccessibilityListener(const Tizen::Ui::Controls::_Toolbar* toolbar) + :__pToolbar(null) + { + __pToolbar = const_cast(toolbar); + } + virtual ~FooterItemAccessibilityListener(void){} + virtual bool OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element){return false;} + virtual bool OnAccessibilityFocusMovedPrevious(const _AccessibilityContainer& control, const _AccessibilityElement& element){return false;} + virtual bool OnAccessibilityReadingElement(const _AccessibilityContainer& control, const _AccessibilityElement& element){return false;} + virtual bool OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element){return false;} + virtual bool OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element) + { + 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) + { + __pToolbar->GetPresenter()->AdjustItemPositionX(-(rect.x)); + __pToolbar->Invalidate(true); + } + else if (rect.x + rect.width > screenW) + { + float adjustX = 0.0f; + if (rect.x + rect.width > screenW) + { + adjustX = -(rect.x + rect.width - screenW); + } + else + { + adjustX = -rect.x; + } + __pToolbar->GetPresenter()->AdjustItemPositionX(adjustX); + __pToolbar->Invalidate(true); + } + return true; + } + virtual bool OnAccessibilityFocusOut(const _AccessibilityContainer& control, const _AccessibilityElement& element){return false;} + virtual bool OnAccessibilityValueIncreased(const _AccessibilityContainer& control, const _AccessibilityElement& element){return false;} + virtual bool OnAccessibilityValueDecreased(const _AccessibilityContainer& control, const _AccessibilityElement& element){return false;} + virtual bool OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element) + { + _AccessibilityManager::GetInstance()->RequestAutoReading(_ACCESSIBILITY_AUTO_READING_MODE_FIRST_ITEM_OF_CONTENTS); + return true; + } +private: + Tizen::Ui::Controls::_Toolbar* __pToolbar; +}; +} + +namespace Tizen { namespace Ui { namespace Controls +{ + +IMPLEMENT_PROPERTY(_Toolbar); + +_Toolbar::_Toolbar(void) + : __header(false) + , __pToolbarPresenter(null) + , __pActionEventListener(null) + , __pBackEventListener(null) + , __pMenuEventListener(null) + , __pLongPressGesture(null) + , __pFlickGesture(null) + , __pToolbarBackgroundBitmap(null) + , __pToolbarBackgroundEffectBitmap(null) + , __pTitleIcon(null) + , __titleText(L"") + , __descriptionText(L"") + , __titleTextAlignment(ALIGNMENT_LEFT) + , __pItems(null) + , __pTitleBadgeIcon(null) + , __backActionId(-1) + , __menuActionId(-1) + , __itemCount(0) + , __style(TOOLBAR_TITLE) + , __transparent(false) + , __isUserBackgroundBitmap(false) + , __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) + , __pAccessibilityListener(null) +{ + _AccessibilityContainer* pContainer = null; + + __pButtonItems[LEFT_BUTTON] = null; + __pButtonItems[RIGHT_BUTTON] = null; + __pButtonItems[MIDDLE_BUTTON] = null; + + for (int i = 0; i < TOOLBAR_ANIMATION_POSITION_MAX; i++) + { + __pAnimation[i] = null; + __pAnimationFrameList[i] = null; + } + + Color bgColor; + + if (__header == true) + { + GET_COLOR_CONFIG(HEADER::BG_NORMAL, bgColor); + } + else + { + GET_COLOR_CONFIG(FOOTER::BG_NORMAL, bgColor); + } + + SetColor(bgColor); + + _Control::SetResizable(false); + + _Control::SetMovable(false); + + _ToolbarPresenter* pPresenter = new (std::nothrow) _ToolbarPresenter(); + + SetPresenter(*pPresenter); + + pPresenter->Construct(*this); + + pPresenter->Install(); + + pContainer = GetAccessibilityContainer(); + + if (pContainer) + { + pContainer->Activate(true); + } + + for (int i = 0; i < TOOLBAR_ITEM_MAX_STATE_COUNT; i++) + { + __isItemBgColorSetByUser[i] = false; + __isItemTextColorSetByUser[i] = false; + } + + for (int i = 0; i < TOOLBAR_BUTTON_MAX_STATE_COUNT; i++) + { + __isButtonBgColorSetByUser[i] = false; + __isButtonTextColorSetByUser[i] = false; + } + __pAccessibilityListener = new (std::nothrow) FooterItemAccessibilityListener(this); + + SetFocusNavigateEnabled(false); +} + +_Toolbar::~_Toolbar(void) +{ + __isEnterKeyPressed = false; + RemoveAllItems(); //__pMoreButton would be deleted in this function + RemoveAllButtons(); + + if (__pToolbarPresenter) + { + delete __pToolbarPresenter; + __pToolbarPresenter = null; + } + + if (__pActionEventListener) + { + __pActionEventListener = null; + } + + if (__pBackEventListener) + { + __pBackEventListener = null; + } + + if (__pMenuEventListener) + { + __pMenuEventListener = null; + } + + if (__pLongPressGesture != null) + { + __pLongPressGesture->RemoveGestureListener(*this); + RemoveGestureDetector(*__pLongPressGesture); + + delete __pLongPressGesture; + __pLongPressGesture = null; + } + + if (__pFlickGesture != null) + { + __pFlickGesture->RemoveGestureListener(*this); + RemoveGestureDetector(*__pFlickGesture); + + delete __pFlickGesture; + __pFlickGesture = null; + } + + if (__pToolbarBackgroundBitmap) + { + delete __pToolbarBackgroundBitmap; + __pToolbarBackgroundBitmap = null; + } + + if (__pToolbarBackgroundEffectBitmap) + { + delete __pToolbarBackgroundEffectBitmap; + __pToolbarBackgroundEffectBitmap = null; + } + + if (__pTitleIcon) + { + delete __pTitleIcon; + __pTitleIcon = null; + } + + for (int i = 0; i < TOOLBAR_ANIMATION_POSITION_MAX; i++) + { + if (__pAnimationFrameList[i]) + { + __pAnimationFrameList[i]->RemoveAll(true); + + delete __pAnimationFrameList[i]; + __pAnimationFrameList[i] = null; + } + } + + if (__pAnimation[TOOLBAR_ANIMATION_POSITION_TITLE]) + { + DetachChild(*__pAnimation[TOOLBAR_ANIMATION_POSITION_TITLE]); + delete __pAnimation[TOOLBAR_ANIMATION_POSITION_TITLE]; + __pAnimation[TOOLBAR_ANIMATION_POSITION_TITLE] = null; + } + + if (__pTitleBadgeIcon) + { + DetachChild(*__pTitleBadgeIcon); + + delete __pTitleBadgeIcon; + __pTitleBadgeIcon = null; + } + + if (__pTitleTextElement) + { + __pTitleTextElement->Activate(false); + __pTitleTextElement = null; + } + + if (__pAccessibilityListener) + { + delete __pAccessibilityListener; + __pAccessibilityListener = null; + } + ClearLastResult(); +} + +_Toolbar* +_Toolbar::CreateToolbarN(bool header) +{ + _Toolbar* pToolbar = new (std::nothrow) _Toolbar(); + SysTryReturn(NID_UI_CTRL, pToolbar, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + pToolbar->Initialize(header); + pToolbar->AcquireHandle(); + + pToolbar->SetTouchPressThreshold(SENSITIVE); + + return pToolbar; +} + +result +_Toolbar::Initialize(bool header) +{ + __header = header; + + return E_SUCCESS; +} + +bool +_Toolbar::IsHeader(void) +{ + return __header; +} + +result +_Toolbar::InitToolbarColor(void) +{ + if (__header == true) + { + if (__transparent == true) // header && transparent + { + GET_COLOR_CONFIG(HEADER::TRANSLUCENT_TITLE_TEXT_NORMAL, __transTitleTextColor); + GET_COLOR_CONFIG(HEADER::TRANSLUCENT_DESCRIPTION_TEXT_NORMAL, __transDescriptionTextColor); + + if (__style == TOOLBAR_TEXT || __style == TOOLBAR_ICON || __style == TOOLBAR_ICON_TEXT || __style == TOOLBAR_COMMAND) + { + GET_COLOR_CONFIG(HEADER::BUTTON_ITEM_TRANSLUCENT_BG_NORMAL, __itemTransBackgroundColor[_BUTTON_STATUS_NORMAL]); + GET_COLOR_CONFIG(HEADER::BUTTON_ITEM_TRANSLUCENT_BG_DISABLED, __itemTransBackgroundColor[_BUTTON_STATUS_DISABLED]); + GET_COLOR_CONFIG(HEADER::BUTTON_ITEM_TRANSLUCENT_BG_PRESSED, __itemTransBackgroundColor[_BUTTON_STATUS_PRESSED]); + GET_COLOR_CONFIG(HEADER::BUTTON_ITEM_TRANSLUCENT_BG_HIGHLIGHTED, __itemTransBackgroundColor[_BUTTON_STATUS_HIGHLIGHTED]); + //GET_COLOR_CONFIG(FOOTER::BUTTON_ITEM_TRANSLUCENT_BG_SELECTED, __itemTransBackgroundColor[_BUTTON_STATUS_SELECTED]); + + GET_COLOR_CONFIG(HEADER::BUTTON_ITEM_TRANSLUCENT_TEXT_NORMAL, __itemTransTextColor[_BUTTON_STATUS_NORMAL]); + GET_COLOR_CONFIG(HEADER::BUTTON_ITEM_TRANSLUCENT_TEXT_DISABLED, __itemTransTextColor[_BUTTON_STATUS_DISABLED]); + GET_COLOR_CONFIG(HEADER::BUTTON_ITEM_TRANSLUCENT_TEXT_PRESSED, __itemTransTextColor[_BUTTON_STATUS_PRESSED]); + GET_COLOR_CONFIG(HEADER::BUTTON_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED, __itemTransTextColor[_BUTTON_STATUS_HIGHLIGHTED]); + //GET_COLOR_CONFIG(FOOTER::BUTTON_ITEM_TRANSLUCENT_TEXT_SELECTED, __itemTransTextColor[_BUTTON_STATUS_SELECTED]); + } + else if (__style == TOOLBAR_TAB || __style == TOOLBAR_TAB_WITH_TITLE || __style == TOOLBAR_TAB_LARGE) + { + GET_COLOR_CONFIG(HEADER::TAB_ITEM_TRANSLUCENT_BG_NORMAL, __itemTransBackgroundColor[_BUTTON_STATUS_NORMAL]); + GET_COLOR_CONFIG(HEADER::TAB_ITEM_TRANSLUCENT_BG_DISABLED, __itemTransBackgroundColor[_BUTTON_STATUS_DISABLED]); + GET_COLOR_CONFIG(HEADER::TAB_ITEM_TRANSLUCENT_BG_PRESSED, __itemTransBackgroundColor[_BUTTON_STATUS_PRESSED]); + GET_COLOR_CONFIG(HEADER::TAB_ITEM_TRANSLUCENT_BG_HIGHLIGHTED, __itemTransBackgroundColor[_BUTTON_STATUS_HIGHLIGHTED]); + GET_COLOR_CONFIG(HEADER::TAB_ITEM_TRANSLUCENT_BG_SELECTED, __itemTransBackgroundColor[_BUTTON_STATUS_SELECTED]); + + GET_COLOR_CONFIG(HEADER::TAB_ITEM_TRANSLUCENT_TEXT_NORMAL, __itemTransTextColor[_BUTTON_STATUS_NORMAL]); + GET_COLOR_CONFIG(HEADER::TAB_ITEM_TRANSLUCENT_TEXT_DISABLED, __itemTransTextColor[_BUTTON_STATUS_DISABLED]); + GET_COLOR_CONFIG(HEADER::TAB_ITEM_TRANSLUCENT_TEXT_PRESSED, __itemTransTextColor[_BUTTON_STATUS_PRESSED]); + GET_COLOR_CONFIG(HEADER::TAB_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED, __itemTransTextColor[_BUTTON_STATUS_HIGHLIGHTED]); + GET_COLOR_CONFIG(HEADER::TAB_ITEM_TRANSLUCENT_TEXT_SELECTED, __itemTransTextColor[_BUTTON_STATUS_SELECTED]); + } + else // TOOLBAR_TITLE, TOOLBAR_HEADER_SEGMENTED, TOOLBAR_HEADER_SEGMENTED_WITH_TITLE + { + GET_COLOR_CONFIG(HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_NORMAL, __itemTransBackgroundColor[_BUTTON_STATUS_NORMAL]); + GET_COLOR_CONFIG(HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_DISABLED, __itemTransBackgroundColor[_BUTTON_STATUS_DISABLED]); + GET_COLOR_CONFIG(HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_PRESSED, __itemTransBackgroundColor[_BUTTON_STATUS_PRESSED]); + GET_COLOR_CONFIG(HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_HIGHLIGHTED, __itemTransBackgroundColor[_BUTTON_STATUS_HIGHLIGHTED]); + GET_COLOR_CONFIG(HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_SELECTED, __itemTransBackgroundColor[_BUTTON_STATUS_SELECTED]); + + GET_COLOR_CONFIG(HEADER::SEGMENTED_ITEM_TRANSLUCENT_TEXT_NORMAL, __itemTransTextColor[_BUTTON_STATUS_NORMAL]); + GET_COLOR_CONFIG(HEADER::SEGMENTED_ITEM_TRANSLUCENT_TEXT_DISABLED, __itemTransTextColor[_BUTTON_STATUS_DISABLED]); + GET_COLOR_CONFIG(HEADER::SEGMENTED_ITEM_TRANSLUCENT_TEXT_PRESSED, __itemTransTextColor[_BUTTON_STATUS_PRESSED]); + GET_COLOR_CONFIG(HEADER::SEGMENTED_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED, __itemTransTextColor[_BUTTON_STATUS_HIGHLIGHTED]); + GET_COLOR_CONFIG(HEADER::SEGMENTED_ITEM_TRANSLUCENT_TEXT_SELECTED, __itemTransTextColor[_BUTTON_STATUS_SELECTED]); + } + + __itemTransBackgroundColor[_BUTTON_STATUS_NORMAL].SetAlpha(0x00); + __itemTransBackgroundColor[_BUTTON_STATUS_DISABLED].SetAlpha(0x00); + __itemTransBackgroundColor[_BUTTON_STATUS_PRESSED].SetAlpha(0x7F); + __itemTransBackgroundColor[_BUTTON_STATUS_HIGHLIGHTED].SetAlpha(0xFF); + __itemTransBackgroundColor[_BUTTON_STATUS_SELECTED].SetAlpha(0x00); + + GET_COLOR_CONFIG(HEADER::BUTTON_TRANSLUCENT_BG_NORMAL, __buttonTransBackgroundColor[_BUTTON_STATUS_NORMAL]); + GET_COLOR_CONFIG(HEADER::BUTTON_TRANSLUCENT_BG_DISABLED, __buttonTransBackgroundColor[_BUTTON_STATUS_DISABLED]); + GET_COLOR_CONFIG(HEADER::BUTTON_TRANSLUCENT_BG_PRESSED, __buttonTransBackgroundColor[_BUTTON_STATUS_PRESSED]); + GET_COLOR_CONFIG(HEADER::BUTTON_TRANSLUCENT_BG_HIGHLIGHTED, __buttonTransBackgroundColor[_BUTTON_STATUS_HIGHLIGHTED]); + + __buttonTransBackgroundColor[_BUTTON_STATUS_NORMAL].SetAlpha(0x00); + __buttonTransBackgroundColor[_BUTTON_STATUS_DISABLED].SetAlpha(0x00); + __buttonTransBackgroundColor[_BUTTON_STATUS_PRESSED].SetAlpha(0x7F); + __buttonTransBackgroundColor[_BUTTON_STATUS_HIGHLIGHTED].SetAlpha(0xFF); + + GET_COLOR_CONFIG(HEADER::BUTTON_TRANSLUCENT_TEXT_NORMAL, __buttonTransTextColor[_BUTTON_STATUS_NORMAL]); + GET_COLOR_CONFIG(HEADER::BUTTON_TRANSLUCENT_TEXT_DISABLED, __buttonTransTextColor[_BUTTON_STATUS_DISABLED]); + GET_COLOR_CONFIG(HEADER::BUTTON_TRANSLUCENT_TEXT_PRESSED, __buttonTransTextColor[_BUTTON_STATUS_PRESSED]); + GET_COLOR_CONFIG(HEADER::BUTTON_TRANSLUCENT_TEXT_HIGHLIGHTED, __buttonTransTextColor[_BUTTON_STATUS_HIGHLIGHTED]); + } + else // header && not transparent + { + GET_COLOR_CONFIG(HEADER::TITLE_TEXT_NORMAL, __titleTextColor); + GET_COLOR_CONFIG(HEADER::DESCRIPTION_TEXT_NORMAL, __descriptionTextColor); + + if (__style == TOOLBAR_TEXT || __style == TOOLBAR_ICON || __style == TOOLBAR_ICON_TEXT || __style == TOOLBAR_COMMAND) + { + if (!__isItemBgColorSetByUser[_BUTTON_STATUS_NORMAL]) + { + GET_COLOR_CONFIG(HEADER::BUTTON_ITEM_BG_NORMAL, __itemBackgroundColor[_BUTTON_STATUS_NORMAL]); + } + if (!__isItemBgColorSetByUser[_BUTTON_STATUS_DISABLED]) + { + GET_COLOR_CONFIG(HEADER::BUTTON_ITEM_BG_DISABLED, __itemBackgroundColor[_BUTTON_STATUS_DISABLED]); + } + if (!__isItemBgColorSetByUser[_BUTTON_STATUS_PRESSED]) + { + GET_COLOR_CONFIG(HEADER::BUTTON_ITEM_BG_PRESSED, __itemBackgroundColor[_BUTTON_STATUS_PRESSED]); + } + if (!__isItemBgColorSetByUser[_BUTTON_STATUS_HIGHLIGHTED]) + { + GET_COLOR_CONFIG(HEADER::BUTTON_ITEM_BG_HIGHLIGHTED, __itemBackgroundColor[_BUTTON_STATUS_HIGHLIGHTED]); + } + //if (!__isItemBgColorSetByUser[_BUTTON_STATUS_SELECTED]) + //{ + // GET_COLOR_CONFIG(FOOTER::BUTTON_ITEM_BG_SELECTED, __itemBackgroundColor[_BUTTON_STATUS_SELECTED]); + //} + + if (!__isItemTextColorSetByUser[_BUTTON_STATUS_NORMAL]) + { + GET_COLOR_CONFIG(HEADER::BUTTON_ITEM_TEXT_NORMAL, __itemTextColor[_BUTTON_STATUS_NORMAL]); + } + if (!__isItemTextColorSetByUser[_BUTTON_STATUS_DISABLED]) + { + GET_COLOR_CONFIG(HEADER::BUTTON_ITEM_TEXT_DISABLED, __itemTextColor[_BUTTON_STATUS_DISABLED]); + } + if (!__isItemTextColorSetByUser[_BUTTON_STATUS_PRESSED]) + { + GET_COLOR_CONFIG(HEADER::BUTTON_ITEM_TEXT_PRESSED, __itemTextColor[_BUTTON_STATUS_PRESSED]); + } + if (!__isItemTextColorSetByUser[_BUTTON_STATUS_HIGHLIGHTED]) + { + GET_COLOR_CONFIG(HEADER::BUTTON_ITEM_TEXT_HIGHLIGHTED, __itemTextColor[_BUTTON_STATUS_HIGHLIGHTED]); + } + //if (!__isItemTextColorSetByUser[_BUTTON_STATUS_SELECTED]) + //{ + // GET_COLOR_CONFIG(FOOTER::BUTTON_ITEM_TEXT_SELECTED, __itemTextColor[_BUTTON_STATUS_SELECTED]); + //} + } + else if (__style == TOOLBAR_TAB || __style == TOOLBAR_TAB_WITH_TITLE || __style == TOOLBAR_TAB_LARGE) // header + { + if (!__isItemBgColorSetByUser[_BUTTON_STATUS_NORMAL]) + { + GET_COLOR_CONFIG(HEADER::TAB_ITEM_BG_NORMAL, __itemBackgroundColor[_BUTTON_STATUS_NORMAL]); + } + if (!__isItemBgColorSetByUser[_BUTTON_STATUS_DISABLED]) + { + GET_COLOR_CONFIG(HEADER::TAB_ITEM_BG_DISABLED, __itemBackgroundColor[_BUTTON_STATUS_DISABLED]); + } + if (!__isItemBgColorSetByUser[_BUTTON_STATUS_PRESSED]) + { + GET_COLOR_CONFIG(HEADER::TAB_ITEM_BG_PRESSED, __itemBackgroundColor[_BUTTON_STATUS_PRESSED]); + } + if (!__isItemBgColorSetByUser[_BUTTON_STATUS_HIGHLIGHTED]) + { + GET_COLOR_CONFIG(HEADER::TAB_ITEM_BG_HIGHLIGHTED, __itemBackgroundColor[_BUTTON_STATUS_HIGHLIGHTED]); + } + if (!__isItemBgColorSetByUser[_BUTTON_STATUS_SELECTED]) + { + GET_COLOR_CONFIG(HEADER::TAB_ITEM_BG_SELECTED, __itemBackgroundColor[_BUTTON_STATUS_SELECTED]); + } + + if (!__isItemTextColorSetByUser[_BUTTON_STATUS_NORMAL]) + { + GET_COLOR_CONFIG(HEADER::TAB_ITEM_TEXT_NORMAL, __itemTextColor[_BUTTON_STATUS_NORMAL]); + } + if (!__isItemTextColorSetByUser[_BUTTON_STATUS_DISABLED]) + { + GET_COLOR_CONFIG(HEADER::TAB_ITEM_TEXT_DISABLED, __itemTextColor[_BUTTON_STATUS_DISABLED]); + } + if (!__isItemTextColorSetByUser[_BUTTON_STATUS_PRESSED]) + { + GET_COLOR_CONFIG(HEADER::TAB_ITEM_TEXT_PRESSED, __itemTextColor[_BUTTON_STATUS_PRESSED]); + } + if (!__isItemTextColorSetByUser[_BUTTON_STATUS_HIGHLIGHTED]) + { + GET_COLOR_CONFIG(HEADER::TAB_ITEM_TEXT_HIGHLIGHTED, __itemTextColor[_BUTTON_STATUS_HIGHLIGHTED]); + } + if (!__isItemTextColorSetByUser[_BUTTON_STATUS_SELECTED]) + { + GET_COLOR_CONFIG(HEADER::TAB_ITEM_TEXT_SELECTED, __itemTextColor[_BUTTON_STATUS_SELECTED]); + } + } + else // TOOLBAR_TITLE, TOOLBAR_HEADER_SEGMENTED, TOOLBAR_HEADER_SEGMENTED_WITH_TITLE, + { + if (!__isItemBgColorSetByUser[_BUTTON_STATUS_NORMAL]) + { + GET_COLOR_CONFIG(HEADER::SEGMENTED_ITEM_BG_NORMAL, __itemBackgroundColor[_BUTTON_STATUS_NORMAL]); + } + if (!__isItemBgColorSetByUser[_BUTTON_STATUS_DISABLED]) + { + GET_COLOR_CONFIG(HEADER::SEGMENTED_ITEM_BG_DISABLED, __itemBackgroundColor[_BUTTON_STATUS_DISABLED]); + } + if (!__isItemBgColorSetByUser[_BUTTON_STATUS_PRESSED]) + { + GET_COLOR_CONFIG(HEADER::SEGMENTED_ITEM_BG_PRESSED, __itemBackgroundColor[_BUTTON_STATUS_PRESSED]); + } + if (!__isItemBgColorSetByUser[_BUTTON_STATUS_HIGHLIGHTED]) + { + GET_COLOR_CONFIG(HEADER::SEGMENTED_ITEM_BG_HIGHLIGHTED, __itemBackgroundColor[_BUTTON_STATUS_HIGHLIGHTED]); + } + if (!__isItemBgColorSetByUser[_BUTTON_STATUS_SELECTED]) + { + GET_COLOR_CONFIG(HEADER::SEGMENTED_ITEM_BG_SELECTED, __itemBackgroundColor[_BUTTON_STATUS_SELECTED]); + } + + if (!__isItemTextColorSetByUser[_BUTTON_STATUS_NORMAL]) + { + GET_COLOR_CONFIG(HEADER::SEGMENTED_ITEM_TEXT_NORMAL, __itemTextColor[_BUTTON_STATUS_NORMAL]); + } + if (!__isItemTextColorSetByUser[_BUTTON_STATUS_DISABLED]) + { + GET_COLOR_CONFIG(HEADER::SEGMENTED_ITEM_TEXT_DISABLED, __itemTextColor[_BUTTON_STATUS_DISABLED]); + } + if (!__isItemTextColorSetByUser[_BUTTON_STATUS_PRESSED]) + { + GET_COLOR_CONFIG(HEADER::SEGMENTED_ITEM_TEXT_PRESSED, __itemTextColor[_BUTTON_STATUS_PRESSED]); + } + if (!__isItemTextColorSetByUser[_BUTTON_STATUS_HIGHLIGHTED]) + { + GET_COLOR_CONFIG(HEADER::SEGMENTED_ITEM_TEXT_HIGHLIGHTED, __itemTextColor[_BUTTON_STATUS_HIGHLIGHTED]); + } + if (!__isItemTextColorSetByUser[_BUTTON_STATUS_SELECTED]) + { + GET_COLOR_CONFIG(HEADER::SEGMENTED_ITEM_TEXT_SELECTED, __itemTextColor[_BUTTON_STATUS_SELECTED]); + } + } + + if (!__isButtonBgColorSetByUser[_BUTTON_STATUS_NORMAL]) + { + GET_COLOR_CONFIG(HEADER::BUTTON_BG_NORMAL, __buttonBackgroundColor[_BUTTON_STATUS_NORMAL]); + } + if (!__isButtonBgColorSetByUser[_BUTTON_STATUS_DISABLED]) + { + GET_COLOR_CONFIG(HEADER::BUTTON_BG_DISABLED, __buttonBackgroundColor[_BUTTON_STATUS_DISABLED]); + } + if (!__isButtonBgColorSetByUser[_BUTTON_STATUS_PRESSED]) + { + GET_COLOR_CONFIG(HEADER::BUTTON_BG_PRESSED, __buttonBackgroundColor[_BUTTON_STATUS_PRESSED]); + } + if (!__isButtonBgColorSetByUser[_BUTTON_STATUS_HIGHLIGHTED]) + { + GET_COLOR_CONFIG(HEADER::BUTTON_BG_HIGHLIGHTED, __buttonBackgroundColor[_BUTTON_STATUS_HIGHLIGHTED]); + } + + if (!__isButtonTextColorSetByUser[_BUTTON_STATUS_NORMAL]) + { + GET_COLOR_CONFIG(HEADER::BUTTON_TEXT_NORMAL, __buttonTextColor[_BUTTON_STATUS_NORMAL]); + } + if (!__isButtonTextColorSetByUser[_BUTTON_STATUS_DISABLED]) + { + GET_COLOR_CONFIG(HEADER::BUTTON_TEXT_DISABLED, __buttonTextColor[_BUTTON_STATUS_DISABLED]); + } + if (!__isButtonTextColorSetByUser[_BUTTON_STATUS_PRESSED]) + { + GET_COLOR_CONFIG(HEADER::BUTTON_TEXT_PRESSED, __buttonTextColor[_BUTTON_STATUS_PRESSED]); + } + if (!__isButtonTextColorSetByUser[_BUTTON_STATUS_HIGHLIGHTED]) + { + GET_COLOR_CONFIG(HEADER::BUTTON_TEXT_HIGHLIGHTED, __buttonTextColor[_BUTTON_STATUS_HIGHLIGHTED]); + } + } + } + else + { + if (__transparent == true) // footer && transparent + { + if (__style == TOOLBAR_TEXT || __style == TOOLBAR_ICON || __style == TOOLBAR_ICON_TEXT || __style == TOOLBAR_COMMAND) + { + GET_COLOR_CONFIG(FOOTER::BUTTON_ITEM_TRANSLUCENT_BG_NORMAL, __itemTransBackgroundColor[_BUTTON_STATUS_NORMAL]); + GET_COLOR_CONFIG(FOOTER::BUTTON_ITEM_TRANSLUCENT_BG_DISABLED, __itemTransBackgroundColor[_BUTTON_STATUS_DISABLED]); + GET_COLOR_CONFIG(FOOTER::BUTTON_ITEM_TRANSLUCENT_BG_PRESSED, __itemTransBackgroundColor[_BUTTON_STATUS_PRESSED]); + GET_COLOR_CONFIG(FOOTER::BUTTON_ITEM_TRANSLUCENT_BG_HIGHLIGHTED, __itemTransBackgroundColor[_BUTTON_STATUS_HIGHLIGHTED]); + //GET_COLOR_CONFIG(FOOTER::BUTTON_ITEM_TRANSLUCENT_BG_SELECTED, __itemTransBackgroundColor[_BUTTON_STATUS_SELECTED]); + + GET_COLOR_CONFIG(FOOTER::BUTTON_ITEM_TRANSLUCENT_TEXT_NORMAL, __itemTransTextColor[_BUTTON_STATUS_NORMAL]); + GET_COLOR_CONFIG(FOOTER::BUTTON_ITEM_TRANSLUCENT_TEXT_DISABLED, __itemTransTextColor[_BUTTON_STATUS_DISABLED]); + GET_COLOR_CONFIG(FOOTER::BUTTON_ITEM_TRANSLUCENT_TEXT_PRESSED, __itemTransTextColor[_BUTTON_STATUS_PRESSED]); + GET_COLOR_CONFIG(FOOTER::BUTTON_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED, __itemTransTextColor[_BUTTON_STATUS_HIGHLIGHTED]); + //GET_COLOR_CONFIG(FOOTER::BUTTON_ITEM_TRANSLUCENT_TEXT_SELECTED, __itemTransTextColor[_BUTTON_STATUS_SELECTED]); + } + else if (__style == TOOLBAR_TAB || __style == TOOLBAR_TAB_LARGE) + { + GET_COLOR_CONFIG(FOOTER::TAB_ITEM_TRANSLUCENT_BG_NORMAL, __itemTransBackgroundColor[_BUTTON_STATUS_NORMAL]); + GET_COLOR_CONFIG(FOOTER::TAB_ITEM_TRANSLUCENT_BG_DISABLED, __itemTransBackgroundColor[_BUTTON_STATUS_DISABLED]); + GET_COLOR_CONFIG(FOOTER::TAB_ITEM_TRANSLUCENT_BG_PRESSED, __itemTransBackgroundColor[_BUTTON_STATUS_PRESSED]); + GET_COLOR_CONFIG(FOOTER::TAB_ITEM_TRANSLUCENT_BG_HIGHLIGHTED, __itemTransBackgroundColor[_BUTTON_STATUS_HIGHLIGHTED]); + GET_COLOR_CONFIG(FOOTER::TAB_ITEM_TRANSLUCENT_BG_SELECTED, __itemTransBackgroundColor[_BUTTON_STATUS_SELECTED]); + + GET_COLOR_CONFIG(FOOTER::TAB_ITEM_TRANSLUCENT_TEXT_NORMAL, __itemTransTextColor[_BUTTON_STATUS_NORMAL]); + GET_COLOR_CONFIG(FOOTER::TAB_ITEM_TRANSLUCENT_TEXT_DISABLED, __itemTransTextColor[_BUTTON_STATUS_DISABLED]); + GET_COLOR_CONFIG(FOOTER::TAB_ITEM_TRANSLUCENT_TEXT_PRESSED, __itemTransTextColor[_BUTTON_STATUS_PRESSED]); + GET_COLOR_CONFIG(FOOTER::TAB_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED, __itemTransTextColor[_BUTTON_STATUS_HIGHLIGHTED]); + GET_COLOR_CONFIG(FOOTER::TAB_ITEM_TRANSLUCENT_TEXT_SELECTED, __itemTransTextColor[_BUTTON_STATUS_SELECTED]); + } + else // TOOLBAR_SEGMENTED + { + GET_COLOR_CONFIG(FOOTER::SEGMENTED_ITEM_TRANSLUCENT_BG_NORMAL, __itemTransBackgroundColor[_BUTTON_STATUS_NORMAL]); + GET_COLOR_CONFIG(FOOTER::SEGMENTED_ITEM_TRANSLUCENT_BG_DISABLED, __itemTransBackgroundColor[_BUTTON_STATUS_DISABLED]); + GET_COLOR_CONFIG(FOOTER::SEGMENTED_ITEM_TRANSLUCENT_BG_PRESSED, __itemTransBackgroundColor[_BUTTON_STATUS_PRESSED]); + GET_COLOR_CONFIG(FOOTER::SEGMENTED_ITEM_TRANSLUCENT_BG_HIGHLIGHTED, __itemTransBackgroundColor[_BUTTON_STATUS_HIGHLIGHTED]); + GET_COLOR_CONFIG(FOOTER::SEGMENTED_ITEM_TRANSLUCENT_BG_SELECTED, __itemTransBackgroundColor[_BUTTON_STATUS_SELECTED]); + + GET_COLOR_CONFIG(FOOTER::SEGMENTED_ITEM_TRANSLUCENT_TEXT_NORMAL, __itemTransTextColor[_BUTTON_STATUS_NORMAL]); + GET_COLOR_CONFIG(FOOTER::SEGMENTED_ITEM_TRANSLUCENT_TEXT_DISABLED, __itemTransTextColor[_BUTTON_STATUS_DISABLED]); + GET_COLOR_CONFIG(FOOTER::SEGMENTED_ITEM_TRANSLUCENT_TEXT_PRESSED, __itemTransTextColor[_BUTTON_STATUS_PRESSED]); + GET_COLOR_CONFIG(FOOTER::SEGMENTED_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED, __itemTransTextColor[_BUTTON_STATUS_HIGHLIGHTED]); + GET_COLOR_CONFIG(FOOTER::SEGMENTED_ITEM_TRANSLUCENT_TEXT_SELECTED, __itemTransTextColor[_BUTTON_STATUS_SELECTED]); + } + + __itemTransBackgroundColor[_BUTTON_STATUS_NORMAL].SetAlpha(0x00); + __itemTransBackgroundColor[_BUTTON_STATUS_DISABLED].SetAlpha(0x00); + __itemTransBackgroundColor[_BUTTON_STATUS_PRESSED].SetAlpha(0x7F); + __itemTransBackgroundColor[_BUTTON_STATUS_HIGHLIGHTED].SetAlpha(0xFF); + __itemTransBackgroundColor[_BUTTON_STATUS_SELECTED].SetAlpha(0x00); + + + GET_COLOR_CONFIG(FOOTER::BUTTON_TRANSLUCENT_BG_NORMAL, __buttonTransBackgroundColor[_BUTTON_STATUS_NORMAL]); + GET_COLOR_CONFIG(FOOTER::BUTTON_TRANSLUCENT_BG_DISABLED, __buttonTransBackgroundColor[_BUTTON_STATUS_DISABLED]); + GET_COLOR_CONFIG(FOOTER::BUTTON_TRANSLUCENT_BG_PRESSED, __buttonTransBackgroundColor[_BUTTON_STATUS_PRESSED]); + GET_COLOR_CONFIG(FOOTER::BUTTON_TRANSLUCENT_BG_HIGHLIGHTED, __buttonTransBackgroundColor[_BUTTON_STATUS_HIGHLIGHTED]); + + __buttonTransBackgroundColor[_BUTTON_STATUS_NORMAL].SetAlpha(0x00); + __buttonTransBackgroundColor[_BUTTON_STATUS_DISABLED].SetAlpha(0x00); + __buttonTransBackgroundColor[_BUTTON_STATUS_PRESSED].SetAlpha(0x7F); + __buttonTransBackgroundColor[_BUTTON_STATUS_HIGHLIGHTED].SetAlpha(0xFF); + + GET_COLOR_CONFIG(FOOTER::BUTTON_TRANSLUCENT_TEXT_NORMAL, __buttonTransTextColor[_BUTTON_STATUS_NORMAL]); + GET_COLOR_CONFIG(FOOTER::BUTTON_TRANSLUCENT_TEXT_DISABLED, __buttonTransTextColor[_BUTTON_STATUS_DISABLED]); + GET_COLOR_CONFIG(FOOTER::BUTTON_TRANSLUCENT_TEXT_PRESSED, __buttonTransTextColor[_BUTTON_STATUS_PRESSED]); + GET_COLOR_CONFIG(FOOTER::BUTTON_TRANSLUCENT_TEXT_HIGHLIGHTED, __buttonTransTextColor[_BUTTON_STATUS_HIGHLIGHTED]); + } + else // footer && not transparent + { + if (__style == TOOLBAR_TEXT || __style == TOOLBAR_ICON || __style == TOOLBAR_ICON_TEXT || __style == TOOLBAR_COMMAND) + { + if (!__isItemBgColorSetByUser[_BUTTON_STATUS_NORMAL]) + { + GET_COLOR_CONFIG(FOOTER::BUTTON_ITEM_BG_NORMAL, __itemBackgroundColor[_BUTTON_STATUS_NORMAL]); + } + if (!__isItemBgColorSetByUser[_BUTTON_STATUS_DISABLED]) + { + GET_COLOR_CONFIG(FOOTER::BUTTON_ITEM_BG_DISABLED, __itemBackgroundColor[_BUTTON_STATUS_DISABLED]); + } + if (!__isItemBgColorSetByUser[_BUTTON_STATUS_PRESSED]) + { + GET_COLOR_CONFIG(FOOTER::BUTTON_ITEM_BG_PRESSED, __itemBackgroundColor[_BUTTON_STATUS_PRESSED]); + } + if (!__isItemBgColorSetByUser[_BUTTON_STATUS_HIGHLIGHTED]) + { + GET_COLOR_CONFIG(FOOTER::BUTTON_ITEM_BG_HIGHLIGHTED, __itemBackgroundColor[_BUTTON_STATUS_HIGHLIGHTED]); + } + //if (!__isItemBgColorSetByUser[_BUTTON_STATUS_SELECTED]) + //{ + // GET_COLOR_CONFIG(FOOTER::BUTTON_ITEM_BG_SELECTED, __itemBackgroundColor[_BUTTON_STATUS_SELECTED]); + //} + + if (!__isItemTextColorSetByUser[_BUTTON_STATUS_NORMAL]) + { + GET_COLOR_CONFIG(FOOTER::BUTTON_ITEM_TEXT_NORMAL, __itemTextColor[_BUTTON_STATUS_NORMAL]); + } + if (!__isItemTextColorSetByUser[_BUTTON_STATUS_DISABLED]) + { + GET_COLOR_CONFIG(FOOTER::BUTTON_ITEM_TEXT_DISABLED, __itemTextColor[_BUTTON_STATUS_DISABLED]); + } + if (!__isItemTextColorSetByUser[_BUTTON_STATUS_PRESSED]) + { + GET_COLOR_CONFIG(FOOTER::BUTTON_ITEM_TEXT_PRESSED, __itemTextColor[_BUTTON_STATUS_PRESSED]); + } + if (!__isItemTextColorSetByUser[_BUTTON_STATUS_HIGHLIGHTED]) + { + GET_COLOR_CONFIG(FOOTER::BUTTON_ITEM_TEXT_HIGHLIGHTED, __itemTextColor[_BUTTON_STATUS_HIGHLIGHTED]); + } + //if (!__isItemTextColorSetByUser[_BUTTON_STATUS_SELECTED]) + //{ + // GET_COLOR_CONFIG(FOOTER::BUTTON_ITEM_TEXT_SELECTED, __itemTextColor[_BUTTON_STATUS_SELECTED]); + //} + } + else if (__style == TOOLBAR_TAB || __style == TOOLBAR_TAB_LARGE) + { + if (!__isItemBgColorSetByUser[_BUTTON_STATUS_NORMAL]) + { + GET_COLOR_CONFIG(FOOTER::TAB_ITEM_BG_NORMAL, __itemBackgroundColor[_BUTTON_STATUS_NORMAL]); + } + if (!__isItemBgColorSetByUser[_BUTTON_STATUS_DISABLED]) + { + GET_COLOR_CONFIG(FOOTER::TAB_ITEM_BG_DISABLED, __itemBackgroundColor[_BUTTON_STATUS_DISABLED]); + } + if (!__isItemBgColorSetByUser[_BUTTON_STATUS_PRESSED]) + { + GET_COLOR_CONFIG(FOOTER::TAB_ITEM_BG_PRESSED, __itemBackgroundColor[_BUTTON_STATUS_PRESSED]); + } + if (!__isItemBgColorSetByUser[_BUTTON_STATUS_HIGHLIGHTED]) + { + GET_COLOR_CONFIG(FOOTER::TAB_ITEM_BG_HIGHLIGHTED, __itemBackgroundColor[_BUTTON_STATUS_HIGHLIGHTED]); + } + if (!__isItemBgColorSetByUser[_BUTTON_STATUS_SELECTED]) + { + GET_COLOR_CONFIG(FOOTER::TAB_ITEM_BG_SELECTED, __itemBackgroundColor[_BUTTON_STATUS_SELECTED]); + } + + if (!__isItemTextColorSetByUser[_BUTTON_STATUS_NORMAL]) + { + GET_COLOR_CONFIG(FOOTER::TAB_ITEM_TEXT_NORMAL, __itemTextColor[_BUTTON_STATUS_NORMAL]); + } + if (!__isItemTextColorSetByUser[_BUTTON_STATUS_DISABLED]) + { + GET_COLOR_CONFIG(FOOTER::TAB_ITEM_TEXT_DISABLED, __itemTextColor[_BUTTON_STATUS_DISABLED]); + } + if (!__isItemTextColorSetByUser[_BUTTON_STATUS_PRESSED]) + { + GET_COLOR_CONFIG(FOOTER::TAB_ITEM_TEXT_PRESSED, __itemTextColor[_BUTTON_STATUS_PRESSED]); + } + if (!__isItemTextColorSetByUser[_BUTTON_STATUS_HIGHLIGHTED]) + { + GET_COLOR_CONFIG(FOOTER::TAB_ITEM_TEXT_HIGHLIGHTED, __itemTextColor[_BUTTON_STATUS_HIGHLIGHTED]); + } + if (!__isItemTextColorSetByUser[_BUTTON_STATUS_SELECTED]) + { + GET_COLOR_CONFIG(FOOTER::TAB_ITEM_TEXT_SELECTED, __itemTextColor[_BUTTON_STATUS_SELECTED]); + } + } + else // TOOLBAR_SEGMENTED + { + if (!__isItemBgColorSetByUser[_BUTTON_STATUS_NORMAL]) + { + GET_COLOR_CONFIG(FOOTER::SEGMENTED_ITEM_BG_NORMAL, __itemBackgroundColor[_BUTTON_STATUS_NORMAL]); + } + if (!__isItemBgColorSetByUser[_BUTTON_STATUS_DISABLED]) + { + GET_COLOR_CONFIG(FOOTER::SEGMENTED_ITEM_BG_DISABLED, __itemBackgroundColor[_BUTTON_STATUS_DISABLED]); + } + if (!__isItemBgColorSetByUser[_BUTTON_STATUS_PRESSED]) + { + GET_COLOR_CONFIG(FOOTER::SEGMENTED_ITEM_BG_PRESSED, __itemBackgroundColor[_BUTTON_STATUS_PRESSED]); + } + if (!__isItemBgColorSetByUser[_BUTTON_STATUS_HIGHLIGHTED]) + { + GET_COLOR_CONFIG(FOOTER::SEGMENTED_ITEM_BG_HIGHLIGHTED, __itemBackgroundColor[_BUTTON_STATUS_HIGHLIGHTED]); + } + if (!__isItemBgColorSetByUser[_BUTTON_STATUS_SELECTED]) + { + GET_COLOR_CONFIG(FOOTER::SEGMENTED_ITEM_BG_SELECTED, __itemBackgroundColor[_BUTTON_STATUS_SELECTED]); + } + + if (!__isItemTextColorSetByUser[_BUTTON_STATUS_NORMAL]) + { + GET_COLOR_CONFIG(FOOTER::SEGMENTED_ITEM_TEXT_NORMAL, __itemTextColor[_BUTTON_STATUS_NORMAL]); + } + if (!__isItemTextColorSetByUser[_BUTTON_STATUS_DISABLED]) + { + GET_COLOR_CONFIG(FOOTER::SEGMENTED_ITEM_TEXT_DISABLED, __itemTextColor[_BUTTON_STATUS_DISABLED]); + } + if (!__isItemTextColorSetByUser[_BUTTON_STATUS_PRESSED]) + { + GET_COLOR_CONFIG(FOOTER::SEGMENTED_ITEM_TEXT_PRESSED, __itemTextColor[_BUTTON_STATUS_PRESSED]); + } + if (!__isItemTextColorSetByUser[_BUTTON_STATUS_HIGHLIGHTED]) + { + GET_COLOR_CONFIG(FOOTER::SEGMENTED_ITEM_TEXT_HIGHLIGHTED, __itemTextColor[_BUTTON_STATUS_HIGHLIGHTED]); + } + if (!__isItemTextColorSetByUser[_BUTTON_STATUS_SELECTED]) + { + GET_COLOR_CONFIG(FOOTER::SEGMENTED_ITEM_TEXT_SELECTED, __itemTextColor[_BUTTON_STATUS_SELECTED]); + } + } + + if (!__isButtonBgColorSetByUser[_BUTTON_STATUS_NORMAL]) + { + GET_COLOR_CONFIG(FOOTER::BUTTON_BG_NORMAL, __buttonBackgroundColor[_BUTTON_STATUS_NORMAL]); + } + if (!__isButtonBgColorSetByUser[_BUTTON_STATUS_DISABLED]) + { + GET_COLOR_CONFIG(FOOTER::BUTTON_BG_DISABLED, __buttonBackgroundColor[_BUTTON_STATUS_DISABLED]); + } + if (!__isButtonBgColorSetByUser[_BUTTON_STATUS_PRESSED]) + { + GET_COLOR_CONFIG(FOOTER::BUTTON_BG_PRESSED, __buttonBackgroundColor[_BUTTON_STATUS_PRESSED]); + } + if (!__isButtonBgColorSetByUser[_BUTTON_STATUS_HIGHLIGHTED]) + { + GET_COLOR_CONFIG(FOOTER::BUTTON_BG_HIGHLIGHTED, __buttonBackgroundColor[_BUTTON_STATUS_HIGHLIGHTED]); + } + + if (!__isButtonTextColorSetByUser[_BUTTON_STATUS_NORMAL]) + { + GET_COLOR_CONFIG(FOOTER::BUTTON_TEXT_NORMAL, __buttonTextColor[_BUTTON_STATUS_NORMAL]); + } + if (!__isButtonTextColorSetByUser[_BUTTON_STATUS_DISABLED]) + { + GET_COLOR_CONFIG(FOOTER::BUTTON_TEXT_DISABLED, __buttonTextColor[_BUTTON_STATUS_DISABLED]); + } + if (!__isButtonTextColorSetByUser[_BUTTON_STATUS_PRESSED]) + { + GET_COLOR_CONFIG(FOOTER::BUTTON_TEXT_PRESSED, __buttonTextColor[_BUTTON_STATUS_PRESSED]); + } + if (!__isButtonTextColorSetByUser[_BUTTON_STATUS_HIGHLIGHTED]) + { + GET_COLOR_CONFIG(FOOTER::BUTTON_TEXT_HIGHLIGHTED, __buttonTextColor[_BUTTON_STATUS_HIGHLIGHTED]); + } + } + } + + return E_SUCCESS; +} + +result +_Toolbar::InitializeLongPressGesture(void) +{ + result r = E_SUCCESS; + + __pLongPressGesture = new (std::nothrow) _TouchLongPressGestureDetector(); + SysTryReturn(NID_UI_CTRL, __pLongPressGesture, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to create touch long press gesture."); + + __pLongPressGesture->SetDuration(500); + + r = AddGestureDetector(*__pLongPressGesture); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Failed to add gesture detector", GetErrorMessage(r)); + + r = __pLongPressGesture->AddGestureListener(*(dynamic_cast<_ITouchLongPressGestureEventListener*>(this))); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Failed to add gesture listener", GetErrorMessage(r)); + + return r; +} + +result +_Toolbar::InitializeFlickGesture(void) +{ + result r = E_SUCCESS; + + __pFlickGesture = new (std::nothrow) _TouchFlickGestureDetector(); + SysTryReturn(NID_UI_CTRL, __pFlickGesture, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to create flick gesture."); + + r = AddGestureDetector(*__pFlickGesture); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Failed to add gesture detector", GetErrorMessage(r)); + + r = __pFlickGesture->AddGestureListener(*(dynamic_cast<_ITouchFlickGestureEventListener*>(this))); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Failed to add gesture listener", GetErrorMessage(r)); + + return r; +} + +result +_Toolbar::Construct(void) +{ + result r = E_SUCCESS; + + return r; +} + +result +_Toolbar::AddItem(_Button* pButton) +{ + SysTryReturnResult(NID_UI_CTRL, (__itemCount < TAB_ITEM_MAX), E_MAX_EXCEEDED, + "[E_MAX_EXCEEDED] The number of items have exceeded the maximum limit."); + + if (__pActionEventListener != null) + { + pButton->AddActionEventListener(*__pActionEventListener); + } + + __pItems.push_back(pButton); + __itemCount++; + + SetFocusNavigateEnabled(true); + + AttachChild(*pButton); + + ApplyUserGUI(TOOLBAR_ITEM, pButton); + + RearrangeItems(); + + AddAccessibilityElement(pButton); + + return E_SUCCESS; +} + +Bitmap* +_Toolbar::GetBackgroundBitmap(void) const +{ + result r = E_SUCCESS; + + _Toolbar* pToolbar = const_cast<_Toolbar*>(this); + + if (!pToolbar->__pToolbarBackgroundBitmap) + { + 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)); + } + else + { + r = GET_BITMAP_CONFIG_N(FOOTER::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pToolbar->__pToolbarBackgroundBitmap); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + + return pToolbar->__pToolbarBackgroundBitmap; +} + +Bitmap* +_Toolbar::GetBackgroundEffectBitmap(void) const +{ + result r = E_SUCCESS; + + _Toolbar* pToolbar = const_cast<_Toolbar*>(this); + + if (!pToolbar->__pToolbarBackgroundEffectBitmap) + { + if (__header == true) + { + bool customTheme = IS_CUSTOM_BITMAP(HEADER::BG_NORMAL); + if (customTheme == false) + { + r = GET_BITMAP_CONFIG_N(HEADER::BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pToolbar->__pToolbarBackgroundEffectBitmap); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + else + { + bool customTheme = IS_CUSTOM_BITMAP(FOOTER::BG_NORMAL); + if (customTheme == false) + { + r = GET_BITMAP_CONFIG_N(FOOTER::BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pToolbar->__pToolbarBackgroundEffectBitmap); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + } + + return pToolbar->__pToolbarBackgroundEffectBitmap; +} + +_Button* +_Toolbar::GetButton(ToolbarButton position) const +{ + SysTryReturn(NID_UI_CTRL, (position >= LEFT_BUTTON && position < BUTTON_MAX), null, E_OUT_OF_RANGE, + ("[E_OUT_OF_RANGE] The position is out of range.")); + + return __pButtonItems[position]; +} + +_Label* +_Toolbar::GetTitleBadgeIcon(void) const +{ + return __pTitleBadgeIcon; +} + +Color +_Toolbar::GetButtonColor(_ButtonStatus status) const +{ + Variant color; + + switch (status) + { + case _BUTTON_STATUS_NORMAL: + color = GetProperty(L"normalButtonColor"); + break; + case _BUTTON_STATUS_DISABLED: + color = GetProperty(L"disabledButtonColor"); + break; + case _BUTTON_STATUS_PRESSED: + color = GetProperty(L"pressedButtonColor"); + break; + case _BUTTON_STATUS_HIGHLIGHTED: + color = GetProperty(L"highlightedButtonColor"); + break; + default: + color = GetProperty(L"normalButtonColor"); + break; + } + + return color.ToColor(); +} + +_ButtonStatus +_Toolbar::GetButtonStatus(ToolbarButton position) const +{ + return __pButtonItems[position]->GetButtonStatus(); +} + +Color +_Toolbar::GetButtonTextColor(_ButtonStatus status) const +{ + Variant color; + + switch (status) + { + case _BUTTON_STATUS_NORMAL: + color = GetProperty(L"normalButtonTextColor"); + break; + case _BUTTON_STATUS_DISABLED: + color = GetProperty(L"disabledButtonTextColor"); + break; + case _BUTTON_STATUS_PRESSED: + color = GetProperty(L"pressedButtonTextColor"); + break; + case _BUTTON_STATUS_HIGHLIGHTED: + color = GetProperty(L"highlightedButtonTextColor"); + break; + default: + color = GetProperty(L"normalButtonTextColor"); + break; + } + + return color.ToColor(); +} + +Color +_Toolbar::GetColor(void) const +{ + Variant color = GetProperty(L"color"); + + return color.ToColor(); +} + +String +_Toolbar::GetDescriptionText(void) const +{ + Variant text = GetProperty(L"descriptionText"); + + return text.ToString(); +} + +Color +_Toolbar::GetDescriptionTextColor(void) const +{ + Variant color = GetProperty(L"descriptionTextColor"); + + return color.ToColor(); +} + +int +_Toolbar::GetFirstEnabledItemIndex(void) const +{ + int firstEnabledItemIndex = -1; + + for (int i = 0; i < __itemCount; i++) + { + if (__pItems.at(i)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + firstEnabledItemIndex = i; + break; + } + } + + return firstEnabledItemIndex; +} + +_Button* +_Toolbar::GetItem(int itemIndex) const +{ + if (__pItems.at(itemIndex) == null) + { + SysLogException(NID_UI_CTRL, E_SYSTEM, "[E_SYSTEM] Unable to get item."); + return null; + } + + return __pItems.at(itemIndex); +} + +Color +_Toolbar::GetItemColor(_ButtonStatus status) const +{ + Variant color; + + switch (status) + { + case _BUTTON_STATUS_NORMAL: + color = GetProperty(L"normalItemColor"); + break; + case _BUTTON_STATUS_DISABLED: + color = GetProperty(L"disabledItemColor"); + break; + case _BUTTON_STATUS_PRESSED: + color = GetProperty(L"pressedItemColor"); + break; + case _BUTTON_STATUS_HIGHLIGHTED: + color = GetProperty(L"highlightedItemColor"); + break; + case _BUTTON_STATUS_SELECTED: + color = GetProperty(L"selectedItemColor"); + break; + default: + color = GetProperty(L"normalItemColor"); + break; + } + + return color.ToColor(); +} + +int +_Toolbar::GetItemCount(void) const +{ + return __itemCount; +} + +int +_Toolbar::GetItemIndexFromPosition(const FloatPoint& point) const +{ + if (__itemCount <= 0) + { + return -1; + } + + for (int i = 0; i < __itemCount; i++) + { + FloatRectangle bounds = __pItems.at(i)->GetBoundsF(); + + if (bounds.Contains(point) && __pItems.at(i)->GetVisibleState() == true) + { + return i; + } + } + + return -1; +} + +result +_Toolbar::GetItemStatus(int itemIndex, _ButtonStatus& status) const +{ + status = _BUTTON_STATUS_NORMAL; + + SysTryReturnResult(NID_UI_CTRL, (itemIndex >= 0 && itemIndex <= __itemCount), E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] The itemIndex is out of range."); + + status = __pItems.at(itemIndex)->GetButtonStatus(); + + return E_SUCCESS; +} + +Color +_Toolbar::GetItemTextColor(_ButtonStatus status) const +{ + Variant color; + + switch (status) + { + case _BUTTON_STATUS_NORMAL: + color = GetProperty(L"normalItemTextColor"); + break; + case _BUTTON_STATUS_DISABLED: + color = GetProperty(L"disabledItemTextColor"); + break; + case _BUTTON_STATUS_PRESSED: + color = GetProperty(L"pressedItemTextColor"); + break; + case _BUTTON_STATUS_HIGHLIGHTED: + color = GetProperty(L"highlightedItemTextColor"); + break; + case _BUTTON_STATUS_SELECTED: + color = GetProperty(L"selectedItemTextColor"); + break; + default: + color = GetProperty(L"normalItemTextColor"); + break; + } + + return color.ToColor(); +} + +int +_Toolbar::GetSelectedItemIndex(void) const +{ + return __pToolbarPresenter->GetSelectedItemIndex(); +} + +ToolbarStyle +_Toolbar::GetStyle(void) const +{ + return ToolbarStyle(__style); +} + +Bitmap* +_Toolbar::GetTitleIcon(void) const +{ + return __pTitleIcon; +} + +String +_Toolbar::GetTitleText(void) const +{ + Variant text = GetProperty(L"titleText"); + return text.ToString(); +} + +Color +_Toolbar::GetTitleTextColor(void) const +{ + Variant color = GetProperty(L"titleTextColor"); + return color.ToColor(); +} + +HorizontalAlignment +_Toolbar::GetTitleTextHorizontalAlignment(void) const +{ + return __titleTextAlignment; +} + +bool +_Toolbar::IsInitialDraw(void) const +{ + return __pToolbarPresenter->IsInitialDraw(); +} + +bool +_Toolbar::IsTabEditModeEnabled(void) const +{ + return __pToolbarPresenter->IsTabEditModeEnabled(); +} + +bool +_Toolbar::IsTransparent(void) const +{ + return __transparent; +} + + +AnimationStatus +_Toolbar::GetWaitingAnimationStatus(ToolbarAnimationPosition animationPos) const +{ + if (animationPos < TOOLBAR_ANIMATION_POSITION_TITLE || animationPos >= TOOLBAR_ANIMATION_POSITION_MAX) + { + return ANIMATION_STOPPED; + } + + if (__pAnimation[animationPos] == null) + { + return ANIMATION_STOPPED; + } + + return __pAnimation[animationPos]->GetStatus(); +} + +result +_Toolbar::InsertItemAt(int itemIndex, _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 (__pActionEventListener != null) + { + pButton->AddActionEventListener(*__pActionEventListener); + } + + __pItems.insert(__pItems.begin() + itemIndex, pButton); + __itemCount++; + + SetFocusNavigateEnabled(true); + + AttachChild(*pButton); + + ApplyUserGUI(TOOLBAR_ITEM, pButton); + + RearrangeItems(); + + AddAccessibilityElement(pButton); + + if (__highlightedItemIndex != -1 && itemIndex <= __highlightedItemIndex) + { + __highlightedItemIndex++; + } + + return E_SUCCESS; +} + +bool +_Toolbar::IsButtonSet(ToolbarButton position) const +{ + if (__pButtonItems[position] != null) + { + return true; + } + + return false; +} + +result +_Toolbar::MoveItem(const int srcIndex, const int destIndex) +{ + if (srcIndex == destIndex) + { + SetItemSelected(destIndex, true, false); + + return E_SUCCESS; + } + + if (srcIndex < 0 || destIndex < 0 || srcIndex > __itemCount || destIndex > __itemCount) + { + return E_INVALID_OPERATION; + } + + _Button* pSrcButton = null; + pSrcButton = GetItem(srcIndex); + SysTryReturnResult(NID_UI_CTRL, pSrcButton, E_INVALID_STATE, "[E_INVALID_ARG] No item at the pressed index."); + + _Button* pDestButton = null; + pDestButton = GetItem(destIndex); + SysTryReturnResult(NID_UI_CTRL, pDestButton, E_INVALID_STATE, "[E_INVALID_ARG] No item at the released index."); + + if (pDestButton->GetButtonStatus() == _BUTTON_STATUS_DISABLED) + { + SetItemSelected(GetSelectedItemIndex(), true, false); + + return E_INVALID_OPERATION; + } + + __pItems.erase(__pItems.begin() + destIndex); + __pItems.insert(__pItems.begin() + destIndex, pSrcButton); + + __pItems.erase(__pItems.begin() + srcIndex); + __pItems.insert(__pItems.begin() + srcIndex, pDestButton); + + for (int i = 0; i < __itemCount; i++) + { + if (__pItems.at(i)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(i)->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + + _AccessibilityElement* pElement = __pItems.at(i)->GetAccessibilityContainer()->GetChildElement(0); + if (pElement) + { + pElement->SetStatus(L""); + pElement->SetHintDisabled(false); + } + } + + SetItemSelected(destIndex, true, false); + + RearrangeItems(); + + Invalidate(true); + + return E_SUCCESS; +} + +result +_Toolbar::PauseWaitingAnimation(ToolbarAnimationPosition animationPos) +{ + SysTryReturnResult(NID_UI_CTRL, + (TOOLBAR_ANIMATION_POSITION_TITLE <= animationPos && animationPos < TOOLBAR_ANIMATION_POSITION_MAX), E_INVALID_ARG, + "[E_INVALID_ARG] The animationPos is invalid."); + SysTryReturnResult(NID_UI_CTRL, (__pAnimation[animationPos]), E_INVALID_STATE, + "[E_INVALID_STATE] __pAnimation isn't constructed."); + + __pAnimation[animationPos]->Pause(); + + return E_SUCCESS; +} + +result +_Toolbar::PlayWaitingAnimation(ToolbarAnimationPosition animationPos) +{ + SysTryReturnResult(NID_UI_CTRL, + (TOOLBAR_ANIMATION_POSITION_TITLE <= animationPos && animationPos < TOOLBAR_ANIMATION_POSITION_MAX), E_INVALID_ARG, + "[E_INVALID_ARG] The animationPos is invalid."); + + if ((animationPos == TOOLBAR_ANIMATION_POSITION_TITLE && __style != TOOLBAR_TITLE) + || (animationPos == TOOLBAR_ANIMATION_POSITION_BUTTON_LEFT && __pButtonItems[LEFT_BUTTON] == null) + || (animationPos == TOOLBAR_ANIMATION_POSITION_BUTTON_RIGHT && __pButtonItems[RIGHT_BUTTON] == null)) + { + return E_UNSUPPORTED_OPERATION; + } + + if (__pAnimation[animationPos]) + { + if (__pAnimation[animationPos]->GetStatus() == ANIMATION_PLAYING) + { + return E_SUCCESS; + } + } + else + { + SetAnimation(animationPos); + } + + if (__pAnimation[animationPos]) + { + __pAnimation[animationPos]->Play(); + } + + return E_SUCCESS; +} + +result +_Toolbar::RemoveAllButtons(void) +{ + for (int i = 0; i < BUTTON_MAX; i++) + { + if (i == LEFT_BUTTON) + { + RemoveButtonAt(LEFT_BUTTON); + } + else if (i == RIGHT_BUTTON) + { + RemoveButtonAt(RIGHT_BUTTON); + } + } + + return E_SUCCESS; +} + +result +_Toolbar::RemoveAllItems(void) +{ + int itemCount = __pItems.size(); + + // frees item nodes from the memory + if (itemCount > 0) + { + for (int i = itemCount - 1; i >= 0; i--) + { + RemoveItemAt(i); + } + } + + // clears vector + __pItems.clear(); + + __pToolbarPresenter->SetInitialDrawState(true); + + SetItemSelected(-1); + + return E_SUCCESS; +} + +result +_Toolbar::RemoveButtonAt(ToolbarButton position) +{ + if (__pButtonItems[position] != null) + { + if (position == LEFT_BUTTON) + { + if (__pAnimation[TOOLBAR_ANIMATION_POSITION_BUTTON_LEFT] != null) + { + StopWaitingAnimation(TOOLBAR_ANIMATION_POSITION_BUTTON_LEFT); + } + } + else if (position == RIGHT_BUTTON) + { + if (__pAnimation[TOOLBAR_ANIMATION_POSITION_BUTTON_RIGHT] != null) + { + StopWaitingAnimation(TOOLBAR_ANIMATION_POSITION_BUTTON_RIGHT); + } + } + + if (__pButtonItems[position]->GetChildCount() != 0) + { + _Label* pTempBadgeIcon = dynamic_cast<_Label*>(__pButtonItems[position]->GetChild(0)); + SysTryReturnResult(NID_UI_CTRL, pTempBadgeIcon, E_INVALID_STATE, "[E_INVALID_STATE] Couldn't get a badge icon."); + + __pButtonItems[position]->DetachChild(*pTempBadgeIcon); + + delete pTempBadgeIcon; + pTempBadgeIcon = null; + } + + 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) + { + SetFocusNavigateEnabled(false); + } + + RearrangeItems(); + + return E_SUCCESS; +} + +result +_Toolbar::RemoveItemAt(int itemIndex) +{ + SysTryReturnResult(NID_UI_CTRL, (__itemCount > 0 && itemIndex < __itemCount && itemIndex >= 0), E_INVALID_ARG, + "[E_INVALID_ARG] itemIndex is invalid."); + + _Button* pItem = __pItems.at(itemIndex); + + SysTryReturnResult(NID_UI_CTRL, (pItem != null), E_INVALID_STATE, "[E_INVALID_ARG] No item at the designated index."); + + 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; + } + + // Free 'pItem' from the item nodes + DetachChild(*pItem); + 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) + { + SetFocusNavigateEnabled(false); + } + + __pItems.erase(__pItems.begin() + itemIndex); + + RearrangeItems(); + + return E_SUCCESS; +} + +result +_Toolbar::SetBackgroundBitmap(const Bitmap& bitmap) +{ + result r = E_SYSTEM; + + Bitmap* pClonedBitmap = _BitmapImpl::CloneN(bitmap); + + if (pClonedBitmap) + { + if (__pToolbarBackgroundBitmap) + { + delete __pToolbarBackgroundBitmap; + } + + __pToolbarBackgroundBitmap = pClonedBitmap; + __isUserBackgroundBitmap = true; + + r = E_SUCCESS; + } + + return r; +} + +bool +_Toolbar::IsUserBackgroundBitmap() const +{ + return __isUserBackgroundBitmap; +} + +result +_Toolbar::SetButton(ToolbarButton position, _Button* pButton) +{ + SysTryReturnResult(NID_UI_CTRL, (pButton), E_INVALID_ARG, "[E_INVALID_ARG] The pButton is invalid."); + + float buttonWidth = pButton->GetSizeF().width; + + float toolbarWidth = GetBoundsF().width; + + if (CalculateMinimumToolbarWidth() > toolbarWidth) + { + toolbarWidth = CalculateMinimumToolbarWidth(); + } + + float horizontalMargin = 0.0f; + float verticalMargin = 0.0f; + + if (__header == true && __style != TOOLBAR_TEXT) + { + float buttonItemGap = 0.0f; + float buttonTopMargin = 0.0f; + + GET_SHAPE_CONFIG(HEADER::BUTTON_ITEM_TOP_MARGIN, GetOrientation(), buttonTopMargin); + GET_SHAPE_CONFIG(HEADER::BUTTON_ITEM_GAP, GetOrientation(), buttonItemGap); + + switch (position) + { + case RIGHT_BUTTON: + if (__pButtonItems[LEFT_BUTTON]) + { + pButton->SetPosition(FloatPoint(toolbarWidth - buttonWidth , buttonTopMargin)); + __pButtonItems[LEFT_BUTTON]->SetPosition(FloatPoint(toolbarWidth - buttonWidth *2 - buttonItemGap, buttonTopMargin)); + } + else + { + pButton->SetPosition(FloatPoint(toolbarWidth - buttonWidth , buttonTopMargin)); + } + break; + case LEFT_BUTTON: + if (__pButtonItems[RIGHT_BUTTON]) + { + pButton->SetPosition(FloatPoint(toolbarWidth - buttonWidth * 2 - buttonItemGap, buttonTopMargin)); + } + else + { + pButton->SetPosition(FloatPoint(toolbarWidth - buttonWidth, buttonTopMargin)); + } + break; + + default: + break; + } + } + else // footer or HEADER_STYLE_BUTTON + { + switch (position) + { + case LEFT_BUTTON: + pButton->SetPosition(FloatPoint(horizontalMargin, verticalMargin)); + break; + + case RIGHT_BUTTON: + pButton->SetPosition(FloatPoint(toolbarWidth - buttonWidth - horizontalMargin, verticalMargin)); + break; + + case MIDDLE_BUTTON: + pButton->SetPosition(FloatPoint((toolbarWidth - buttonWidth - horizontalMargin)/2, verticalMargin)); + break; + + default: + break; + } + } + + if (__pActionEventListener != null) + { + pButton->AddActionEventListener(*__pActionEventListener); + } + + if (__pButtonItems[position]) + { + if (position == LEFT_BUTTON) + { + if (__pAnimation[TOOLBAR_ANIMATION_POSITION_BUTTON_LEFT] != null) + { + StopWaitingAnimation(TOOLBAR_ANIMATION_POSITION_BUTTON_LEFT); + } + } + else if (position == RIGHT_BUTTON) + { + if (__pAnimation[TOOLBAR_ANIMATION_POSITION_BUTTON_RIGHT] != null) + { + StopWaitingAnimation(TOOLBAR_ANIMATION_POSITION_BUTTON_RIGHT); + } + } + + if (__pButtonItems[position]->GetChildCount() != 0) + { + _Label* pTempBadgeIcon = dynamic_cast<_Label*>(__pButtonItems[position]->GetChild(0)); + SysTryReturnResult(NID_UI_CTRL, pTempBadgeIcon, E_INVALID_STATE, "[E_INVALID_STATE] Couldn't get a badge icon."); + + __pButtonItems[position]->DetachChild(*pTempBadgeIcon); + + delete pTempBadgeIcon; + pTempBadgeIcon = null; + } + + DetachChild(*__pButtonItems[position]); + + delete __pButtonItems[position]; + __pButtonItems[position] = null; + } + + __pButtonItems[position] = pButton; + + AttachChild(*pButton); + + SetFocusNavigateEnabled(true); + + if (__style != TOOLBAR_SOFTKEY) + { + ApplyUserGUI(TOOLBAR_BUTTON, __pButtonItems[position]); + } + + RearrangeItems(); + AddAccessibilityElement(position, pButton); + return E_SUCCESS; +} + +result +_Toolbar::SetButtonColor(_ButtonStatus status, const Color& color) +{ + switch (status) + { + case _BUTTON_STATUS_NORMAL: + __isButtonBgColorSetByUser[_BUTTON_STATUS_NORMAL] = true; + return SetProperty(L"normalButtonColor", Variant(color)); + break; + case _BUTTON_STATUS_DISABLED: + __isButtonBgColorSetByUser[_BUTTON_STATUS_DISABLED] = true; + return SetProperty(L"disabledButtonColor", Variant(color)); + break; + case _BUTTON_STATUS_PRESSED: + __isButtonBgColorSetByUser[_BUTTON_STATUS_PRESSED] = true; + return SetProperty(L"pressedButtonColor", Variant(color)); + break; + case _BUTTON_STATUS_HIGHLIGHTED: + __isButtonBgColorSetByUser[_BUTTON_STATUS_HIGHLIGHTED] = true; + return SetProperty(L"highlightedButtonColor", Variant(color)); + break; + default: + __isButtonBgColorSetByUser[_BUTTON_STATUS_NORMAL] = true; + return SetProperty(L"normalButtonColor", Variant(color)); + break; + } +} + +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) +{ + SysTryReturnResult(NID_UI_CTRL, __pButtonItems[position], E_INVALID_OPERATION, + "[E_INVALID_OPERATION] No button item is at the position."); + + if (enabled) + { + 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) + { + pElement->SetStatus(L""); + pElement->SetHintDisabled(false); + } + } + 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) + { + pElement->SetStatus(L""); + pElement->SetHintDisabled(false); + } + } + + return E_SUCCESS; +} + +result +_Toolbar::SetButtonTextColor(_ButtonStatus status, const Color& color) +{ + switch (status) + { + case _BUTTON_STATUS_NORMAL: + __isButtonTextColorSetByUser[_BUTTON_STATUS_NORMAL] = true; + return SetProperty(L"normalButtonTextColor", Variant(color)); + break; + case _BUTTON_STATUS_DISABLED: + __isButtonTextColorSetByUser[_BUTTON_STATUS_DISABLED] = true; + return SetProperty(L"disabledButtonTextColor", Variant(color)); + break; + case _BUTTON_STATUS_PRESSED: + __isButtonTextColorSetByUser[_BUTTON_STATUS_PRESSED] = true; + return SetProperty(L"pressedButtonTextColor", Variant(color)); + break; + case _BUTTON_STATUS_HIGHLIGHTED: + __isButtonTextColorSetByUser[_BUTTON_STATUS_HIGHLIGHTED] = true; + return SetProperty(L"highlightedButtonTextColor", Variant(color)); + break; + default: + __isButtonTextColorSetByUser[_BUTTON_STATUS_NORMAL] = true; + return SetProperty(L"normalButtonTextColor", Variant(color)); + break; + } +} + +result +_Toolbar::SetButtonBadgeIcon(ToolbarButton position, const Bitmap* pBadgeIcon) +{ + int childCount = 0; + + childCount = __pButtonItems[position]->GetChildCount(); + + if (childCount != 0) + { + for(int i = 0; i < childCount; i++) + { + _Label* pTempBadgeIcon = dynamic_cast<_Label*>(__pButtonItems[position]->GetChild(i)); + + if (pTempBadgeIcon) + { + __pButtonItems[position]->DetachChild(*pTempBadgeIcon); + + delete pTempBadgeIcon; + pTempBadgeIcon = null; + } + } + } + + if (pBadgeIcon == null) + { + return E_SUCCESS; + } + + FloatRectangle bounds = __pButtonItems[position]->GetBoundsF(); + + float height = 0.0f; + + GET_SHAPE_CONFIG(HEADER::BADGE_HEIGHT, GetOrientation(), height); + + _Label* pBadgeIconLabel = _Label::CreateLabelN(); + + if (pBadgeIconLabel) + { + pBadgeIconLabel->SetBounds(FloatRectangle(bounds.width - height, 0, height, height)); + pBadgeIconLabel->SetBackgroundBitmap(*pBadgeIcon); + + __pButtonItems[position]->AttachChild(*pBadgeIconLabel); + __pButtonItems[position]->SetChildAlwaysOnTop(*pBadgeIconLabel); + } + + return E_SUCCESS; +} + +result +_Toolbar::SetButtonNumberedBadgeIcon(ToolbarButton position, int number) +{ + int childCount = 0; + + childCount = __pButtonItems[position]->GetChildCount(); + + _Label* existingBadgeIcon = null; + + if (number == 0) + { + if (childCount != 0) + { + for(int i = 0; i < childCount; i++) + { + existingBadgeIcon = dynamic_cast<_Label*>(__pButtonItems[position]->GetChild(i)); + + if (existingBadgeIcon) + { + __pButtonItems[position]->DetachChild(*existingBadgeIcon); + + delete existingBadgeIcon; + existingBadgeIcon = null; + } + } + } + else + { + return E_SUCCESS; + } + } + else + { + bool needToCreateNewIcon = true; + float sideMargin = 0.0f; + + GET_SHAPE_CONFIG(HEADER::BADGE_SIDE_MARGIN, GetOrientation(), sideMargin); + + if (childCount != 0) + { + for(int i = 0; i < childCount; i++) + { + existingBadgeIcon = dynamic_cast<_Label*>(__pButtonItems[position]->GetChild(i)); + + if (existingBadgeIcon) + { + if (existingBadgeIcon->GetText() == L"") + { + __pButtonItems[position]->DetachChild(*existingBadgeIcon); + + delete existingBadgeIcon; + existingBadgeIcon = null; + + needToCreateNewIcon = true; + } + else + { + needToCreateNewIcon = false; + } + } + } + } + + if (needToCreateNewIcon) + { + _Label* pLabel = _Label::CreateLabelN(); + + SysTryReturnResult(NID_UI_CTRL, pLabel, E_INVALID_STATE, + "[E_INVALID_STATE] The badge icon instance isn't constructed."); + + Bitmap* pNumberedBadgeIconBitmap = null; + Bitmap* pNumberedBadgeIconEffectBitmap = null; + Bitmap* pColorReplacedBitmap = null; + Color badgeIconBgNormalColor; + Color badgeIconTextNormalColor; + + GET_BITMAP_CONFIG_N(HEADER::BADGE_ICON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pNumberedBadgeIconBitmap); + + bool customTheme = IS_CUSTOM_BITMAP(HEADER::BADGE_ICON_BG_NORMAL); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::BADGE_ICON_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pNumberedBadgeIconEffectBitmap); + } + + GET_COLOR_CONFIG(HEADER::BADGE_ICON_BG_NORMAL, badgeIconBgNormalColor); + GET_COLOR_CONFIG(HEADER::BADGE_ICON_TEXT_NORMAL, badgeIconTextNormalColor); + + if (pNumberedBadgeIconBitmap) + { + pColorReplacedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pNumberedBadgeIconBitmap, + Color::GetColor(COLOR_ID_MAGENTA), badgeIconBgNormalColor); + + pLabel->SetBackgroundBitmap(*pColorReplacedBitmap); + + delete pColorReplacedBitmap; + delete pNumberedBadgeIconBitmap; + } + + if (pNumberedBadgeIconEffectBitmap) + { + pLabel->SetBackgroundEffectBitmap(*pNumberedBadgeIconEffectBitmap); + + delete pNumberedBadgeIconEffectBitmap; + } + + pLabel->SetTextHorizontalAlignment(ALIGNMENT_CENTER); + pLabel->SetTextVerticalAlignment(ALIGNMENT_MIDDLE); + pLabel->SetTextColor(badgeIconTextNormalColor); + pLabel->SetMargin(sideMargin, 0.0f, sideMargin, 0.0f); + + __pButtonItems[position]->AttachChild(*pLabel); + __pButtonItems[position]->SetChildAlwaysOnTop(*pLabel); + + existingBadgeIcon = pLabel; + } + + SysTryReturnResult(NID_UI_CTRL, (existingBadgeIcon), E_INVALID_STATE, "[E_INVALID_STATE] Failed to set a BadgeIcon."); + + FloatRectangle bounds = __pButtonItems[position]->GetBoundsF(); + + if (existingBadgeIcon) + { + 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); + + + 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)); + } + } + + return E_SUCCESS; +} + +result +_Toolbar::SetColor(const Color& color) +{ + return SetProperty(L"color", Variant(color)); +} + +result +_Toolbar::SetDescriptionText(const String& text) +{ + return SetProperty(L"descriptionText", Variant(text)); +} + +result +_Toolbar::SetDescriptionTextColor(const Color& color) +{ + return SetProperty(L"descriptionTextColor", Variant(color)); +} + +result +_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) + { + SysLog(NID_UI_CTRL, "[E_INVALID_ARG] The actionId is invalid."); + return E_OUT_OF_RANGE; + } + + SysTryReturnResult(NID_UI_CTRL, (null != __pItems.at(itemIndex)), E_INVALID_OPERATION, + "[E_INVALID_OPERATION] No button item is at the position."); + + if (__pItems.at(itemIndex)->GetChildCount() != 0) + { + _Label* pTempBadgeIcon = dynamic_cast<_Label*>(__pItems.at(itemIndex)->GetChild(0)); + SysTryReturnResult(NID_UI_CTRL, pTempBadgeIcon, E_INVALID_STATE, "[E_INVALID_STATE] Couldn't get a badge icon."); + + __pItems.at(itemIndex)->DetachChild(*pTempBadgeIcon); + + delete pTempBadgeIcon; + pTempBadgeIcon = null; + } + + __pItems.at(itemIndex)->SetText(pButton->GetText()); + __pItems.at(itemIndex)->SetActionId(pButton->GetActionId()); + + Bitmap* pIconBitmap = null; + FloatPoint iconPosition(0.0f, 0.0f); + + pIconBitmap = const_cast(pButton->GetBitmap(_BUTTON_STATUS_NORMAL)); + + if (pIconBitmap) + { + iconPosition = pButton->GetBitmapPositionF(_BUTTON_STATUS_NORMAL); + + __pItems.at(itemIndex)->SetBitmap(_BUTTON_STATUS_NORMAL, iconPosition, *pIconBitmap); + __pItems.at(itemIndex)->SetBitmap(_BUTTON_STATUS_PRESSED, iconPosition, *pIconBitmap); + __pItems.at(itemIndex)->SetBitmap(_BUTTON_STATUS_SELECTED, iconPosition, *pIconBitmap); + __pItems.at(itemIndex)->SetBitmap(_BUTTON_STATUS_HIGHLIGHTED, iconPosition, *pIconBitmap); + __pItems.at(itemIndex)->SetBitmap(_BUTTON_STATUS_DISABLED, iconPosition, *pIconBitmap); + } + + pIconBitmap = const_cast(pButton->GetBitmap(_BUTTON_STATUS_PRESSED)); + + if (pIconBitmap) + { + iconPosition = pButton->GetBitmapPositionF(_BUTTON_STATUS_PRESSED); + + __pItems.at(itemIndex)->SetBitmap(_BUTTON_STATUS_PRESSED, iconPosition, *pIconBitmap); + } + + pIconBitmap = const_cast(pButton->GetBitmap(_BUTTON_STATUS_SELECTED)); + + if (pIconBitmap) + { + iconPosition = pButton->GetBitmapPositionF(_BUTTON_STATUS_SELECTED); + + __pItems.at(itemIndex)->SetBitmap(_BUTTON_STATUS_SELECTED, iconPosition, *pIconBitmap); + } + + pIconBitmap = const_cast(pButton->GetBitmap(_BUTTON_STATUS_HIGHLIGHTED)); + + if (pIconBitmap) + { + iconPosition = pButton->GetBitmapPositionF(_BUTTON_STATUS_HIGHLIGHTED); + + __pItems.at(itemIndex)->SetBitmap(_BUTTON_STATUS_HIGHLIGHTED, iconPosition, *pIconBitmap); + } + + pIconBitmap = const_cast(pButton->GetBitmap(_BUTTON_STATUS_DISABLED)); + + if (pIconBitmap) + { + iconPosition = pButton->GetBitmapPositionF(_BUTTON_STATUS_DISABLED); + + __pItems.at(itemIndex)->SetBitmap(_BUTTON_STATUS_DISABLED, iconPosition, *pIconBitmap); + } + + ApplyUserGUI(TOOLBAR_ITEM, __pItems.at(itemIndex)); + + RearrangeItems(); + + RealignItem(__pItems.at(itemIndex), __pItems.at(itemIndex)->GetTextExtentSizeF()); + + delete pButton; + + return E_SUCCESS; +} + +result +_Toolbar::SetItemBadgeIcon(int itemIndex, const Bitmap* pBadgeIcon) +{ + SysTryReturnResult(NID_UI_CTRL, (itemIndex >= 0 && itemIndex < __itemCount), E_INVALID_ARG, + "[E_INVALID_ARG] The itemIndex is invalid."); + + SysTryReturnResult(NID_UI_CTRL, (__pItems.at(itemIndex)), E_INVALID_STATE, + "[E_INVALID_STATE] The badge icon instance isn't constructed."); + + if (__pItems.at(itemIndex)->GetChildCount() != 0) + { + _Label* pTempBadgeIcon = dynamic_cast<_Label*>(__pItems.at(itemIndex)->GetChild(0)); + + if (pTempBadgeIcon) + { + __pItems.at(itemIndex)->DetachChild(*pTempBadgeIcon); + + delete pTempBadgeIcon; + pTempBadgeIcon = null; + } + } + + if (pBadgeIcon == null) + { + return E_SUCCESS; + } + + FloatRectangle bounds = __pItems.at(itemIndex)->GetBoundsF(); + + _Label* pBadgeIconLabel = _Label::CreateLabelN(); + + float height = 0.0f; + + GET_SHAPE_CONFIG(HEADER::BADGE_HEIGHT, GetOrientation(), height); + + if (pBadgeIconLabel) + { + pBadgeIconLabel->SetBounds(FloatRectangle(bounds.width - height, 0.0f, height, height)); + pBadgeIconLabel->SetBackgroundBitmap(*pBadgeIcon); + + __pItems.at(itemIndex)->AttachChild(*pBadgeIconLabel); + __pItems.at(itemIndex)->SetChildAlwaysOnTop(*pBadgeIconLabel); + } + + return E_SUCCESS; +} + +result +_Toolbar::SetItemColor(_ButtonStatus status, const Color& color) +{ + switch (status) + { + case _BUTTON_STATUS_NORMAL: + __isItemBgColorSetByUser[_BUTTON_STATUS_NORMAL] = true; + return SetProperty(L"normalItemColor", Variant(color)); + break; + case _BUTTON_STATUS_DISABLED: + __isItemBgColorSetByUser[_BUTTON_STATUS_DISABLED] = true; + return SetProperty(L"disabledItemColor", Variant(color)); + break; + case _BUTTON_STATUS_PRESSED: + __isItemBgColorSetByUser[_BUTTON_STATUS_PRESSED] = true; + return SetProperty(L"pressedItemColor", Variant(color)); + break; + case _BUTTON_STATUS_HIGHLIGHTED: + __isItemBgColorSetByUser[_BUTTON_STATUS_HIGHLIGHTED] = true; + return SetProperty(L"highlightedItemColor", Variant(color)); + break; + case _BUTTON_STATUS_SELECTED: + __isItemBgColorSetByUser[_BUTTON_STATUS_SELECTED] = true; + return SetProperty(L"selectedItemColor", Variant(color)); + break; + default: + __isItemBgColorSetByUser[_BUTTON_STATUS_NORMAL] = true; + return SetProperty(L"normalItemColor", Variant(color)); + break; + } +} + +result +_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); + if (pElement) + { + pElement->SetStatus(L""); + pElement->SetHintDisabled(false); + } + + 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 + { + _AccessibilityElement* pElement = __pItems.at(itemIndex)->GetAccessibilityContainer()->GetChildElement(0); + if (pElement) + { + pElement->SetStatus(L""); + pElement->SetHintDisabled(true); + } + + 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; +} + +result +_Toolbar::SetItemNumberedBadgeIcon(int itemIndex, int number) +{ + SysTryReturnResult(NID_UI_CTRL, (itemIndex >= 0 && itemIndex < __itemCount), E_INVALID_ARG, + "[E_INVALID_ARG] The itemIndex is invalid."); + + SysTryReturnResult(NID_UI_CTRL, (number >= 0 && number < 100000), E_INVALID_ARG, + "[E_INVALID_ARG] The number is out of bounds."); + + SysTryReturnResult(NID_UI_CTRL, (__pItems.at(itemIndex)), E_INVALID_STATE, + "[E_INVALID_STATE] The badge icon instance isn't constructed."); + + if (number == 0) + { + if (__pItems.at(itemIndex)->GetChildCount() != 0) + { + _Label* existingBadgeIcon = dynamic_cast<_Label*>(__pItems.at(itemIndex)->GetChild(0)); + + if (existingBadgeIcon) + { + __pItems.at(itemIndex)->DetachChild(*existingBadgeIcon); + + delete existingBadgeIcon; + existingBadgeIcon = null; + } + } + else + { + return E_SUCCESS; + } + } + else + { + float sideMargin = 0.0f; + + GET_SHAPE_CONFIG(HEADER::BADGE_SIDE_MARGIN, GetOrientation(), sideMargin); + + if (__pItems.at(itemIndex)->GetChildCount() == 0) + { + _Label* pLabel = _Label::CreateLabelN(); + + SysTryReturnResult(NID_UI_CTRL, pLabel, E_INVALID_STATE, + "[E_INVALID_STATE] The badge icon instance isn't constructed."); + + Bitmap* pNumberedBadgeIconBitmap = null; + Bitmap* pNumberedBadgeIconEffectBitmap = null; + Bitmap* pColorReplacedBitmap = null; + Color badgeIconBgNormalColor; + Color badgeIconTextNormalColor; + + GET_BITMAP_CONFIG_N(HEADER::BADGE_ICON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pNumberedBadgeIconBitmap); + + bool customTheme = IS_CUSTOM_BITMAP(HEADER::BADGE_ICON_BG_NORMAL); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::BADGE_ICON_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pNumberedBadgeIconEffectBitmap); + } + + GET_COLOR_CONFIG(HEADER::BADGE_ICON_BG_NORMAL, badgeIconBgNormalColor); + GET_COLOR_CONFIG(HEADER::BADGE_ICON_TEXT_NORMAL, badgeIconTextNormalColor); + + if (pNumberedBadgeIconBitmap) + { + pColorReplacedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pNumberedBadgeIconBitmap, + Color::GetColor(COLOR_ID_MAGENTA), badgeIconBgNormalColor); + + pLabel->SetBackgroundBitmap(*pColorReplacedBitmap); + + delete pColorReplacedBitmap; + delete pNumberedBadgeIconBitmap; + } + + if (pNumberedBadgeIconEffectBitmap) + { + pLabel->SetBackgroundEffectBitmap(*pNumberedBadgeIconEffectBitmap); + + delete pNumberedBadgeIconEffectBitmap; + } + + pLabel->SetTextHorizontalAlignment(ALIGNMENT_CENTER); + pLabel->SetTextVerticalAlignment(ALIGNMENT_MIDDLE); + pLabel->SetTextColor(badgeIconTextNormalColor); + pLabel->SetMargin(sideMargin, 0.0f, sideMargin, 0.0f); + + __pItems.at(itemIndex)->AttachChild(*pLabel); + __pItems.at(itemIndex)->SetChildAlwaysOnTop(*pLabel); + } + + // SetItemNumberedBadgeIcon + + _Label* existingBadgeIcon = dynamic_cast<_Label*>(__pItems.at(itemIndex)->GetChild(0)); + + FloatRectangle bounds = __pItems.at(itemIndex)->GetBoundsF(); + + if (existingBadgeIcon) + { + 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); + + 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)); + + } + } + + return E_SUCCESS; +} + +result +_Toolbar::SetItemSelected(int itemIndex, bool fire, bool adjust) +{ + SysTryReturnResult(NID_UI_CTRL, (itemIndex >= -1 && itemIndex < __itemCount), E_INVALID_STATE, + "[E_INVALID_STATE] Failed to process SetItemSelected()"); + + result r = E_SUCCESS; + + int currentSelectedItemIndex = 0; + currentSelectedItemIndex = GetSelectedItemIndex(); + + r = __pToolbarPresenter->SetItemSelected(itemIndex, adjust); + + if (itemIndex != -1 && itemIndex == currentSelectedItemIndex && __pItems.at(itemIndex) != null) // same item selected + { + if (!IsInitialDraw() && fire) + { + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pItems.at(itemIndex)); + } + + if (currentSelectedItemIndex != __highlightedItemIndex || !__isEnterKeyPressed) + { + __pItems.at(itemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, fire); + } + + for (int i = 0; i < __itemCount; i++) + { + __pItems.at(i)->ShowUnderlineBitmap(false); + } + + __pItems.at(itemIndex)->ShowUnderlineBitmap(true); + + _AccessibilityElement* pElement = __pItems.at(currentSelectedItemIndex)->GetAccessibilityContainer()->GetChildElement(0); + if (pElement) + { + pElement->SetStatusWithStringId("IDS_TPLATFORM_BODY_SELECTED_T_TTS"); + pElement->SetHintDisabled(true); + } + + return r; + } + + if (__itemCount == 0 || __itemCount > TAB_ITEM_MAX || itemIndex == -1) + { + return r; + } + + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_INVALID_STATE, "[E_INVALID_STATE] Failed to process SetItemSelected()"); + + if (__pItems.at(itemIndex) != null) + { + if (!IsInitialDraw() && fire) + { + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pItems.at(itemIndex)); + } + __pItems.at(itemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, fire); + __pItems.at(itemIndex)->ShowUnderlineBitmap(true); + + _AccessibilityElement* pElement = __pItems.at(itemIndex)->GetAccessibilityContainer()->GetChildElement(0); + if (pElement) + { + pElement->SetStatusWithStringId("IDS_TPLATFORM_BODY_SELECTED_T_TTS"); + pElement->SetHintDisabled(true); + } + } + + if (__itemCount == 0 || __itemCount > TAB_ITEM_MAX || itemIndex == -1) + { + return r; + } + + if (currentSelectedItemIndex != -1 && __pItems.at(currentSelectedItemIndex) != null) + { + 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) + { + pElement->SetStatus(L""); + pElement->SetHintDisabled(false); + } + } + + if (__pItems.at(itemIndex) != null) + { + __pItems.at(itemIndex)->Draw(); + } + + return r; +} + +result +_Toolbar::SetItemHighlighted(int itemIndex, bool fire, bool adjust) +{ + SysTryReturnResult(NID_UI_CTRL, (itemIndex >= -1 && itemIndex < __itemCount), E_INVALID_STATE, + "[E_INVALID_STATE] Failed to process SetItemHighlighted()"); + + result r = E_SUCCESS; + + int currentSelectedItemIndex = 0; + currentSelectedItemIndex = GetSelectedItemIndex(); + + r = __pToolbarPresenter->SetItemSelected(itemIndex, adjust); + + if (itemIndex != -1 && itemIndex == currentSelectedItemIndex && __pItems.at(itemIndex) != null) // same item selected + { + if (!IsInitialDraw() && fire) + { + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pItems.at(itemIndex)); + } + + __pItems.at(itemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, fire); + __pItems.at(itemIndex)->ShowUnderlineBitmap(true); + __pItems.at(itemIndex)->Draw(); + + __highlightedItemIndex = itemIndex; + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + + _AccessibilityElement* pElement = __pItems.at(currentSelectedItemIndex)->GetAccessibilityContainer()->GetChildElement(0); + if (pElement) + { + pElement->SetStatus(L"Highlighted"); + pElement->SetHintDisabled(true); + } + + return r; + } + + if (__itemCount == 0 || __itemCount > TAB_ITEM_MAX || itemIndex == -1) + { + return r; + } + + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_INVALID_STATE, "[E_INVALID_STATE] Failed to process SetItemHighlighted()"); + + if (__pItems.at(itemIndex) != null) + { + if (!IsInitialDraw() && fire) + { + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pItems.at(itemIndex)); + } + + __pItems.at(itemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, fire); + __pItems.at(itemIndex)->Draw(); + + for (int i = 0; i < __itemCount; i++) + { + __pItems.at(i)->ShowUnderlineBitmap(false); + } + + __pItems.at(itemIndex)->ShowUnderlineBitmap(true); + __pItems.at(itemIndex)->Draw(); + + __highlightedItemIndex = itemIndex; + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + + _AccessibilityElement* pElement = __pItems.at(itemIndex)->GetAccessibilityContainer()->GetChildElement(0); + if (pElement) + { + pElement->SetStatus(L"Highlighted"); + pElement->SetHintDisabled(true); + } + } + + if (__itemCount == 0 || __itemCount > TAB_ITEM_MAX || itemIndex == -1) + { + return r; + } + + if (currentSelectedItemIndex != -1 && __pItems.at(currentSelectedItemIndex) != null) + { + __pItems.at(currentSelectedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL); + __pItems.at(currentSelectedItemIndex)->ShowUnderlineBitmap(false); + __pItems.at(currentSelectedItemIndex)->Draw(); + + _AccessibilityElement* pElement = __pItems.at(currentSelectedItemIndex)->GetAccessibilityContainer()->GetChildElement(0); + if (pElement) + { + pElement->SetStatus(L""); + pElement->SetHintDisabled(false); + } + } + + return r; +} + +result +_Toolbar::SetItemTextColor(_ButtonStatus status, const Color& color) +{ + switch(status) + { + case _BUTTON_STATUS_NORMAL: + __isItemTextColorSetByUser[_BUTTON_STATUS_NORMAL] = true; + return SetProperty(L"normalItemTextColor", Variant(color)); + break; + case _BUTTON_STATUS_DISABLED: + __isItemTextColorSetByUser[_BUTTON_STATUS_DISABLED] = true; + return SetProperty(L"disabledItemTextColor", Variant(color)); + break; + case _BUTTON_STATUS_PRESSED: + __isItemTextColorSetByUser[_BUTTON_STATUS_PRESSED] = true; + return SetProperty(L"pressedItemTextColor", Variant(color)); + break; + case _BUTTON_STATUS_HIGHLIGHTED: + __isItemTextColorSetByUser[_BUTTON_STATUS_HIGHLIGHTED] = true; + return SetProperty(L"highlightedItemTextColor", Variant(color)); + break; + case _BUTTON_STATUS_SELECTED: + __isItemTextColorSetByUser[_BUTTON_STATUS_SELECTED] = true; + return SetProperty(L"selectedItemTextColor", Variant(color)); + break; + default: + __isItemTextColorSetByUser[_BUTTON_STATUS_NORMAL] = true; + return SetProperty(L"normalItemTextColor", Variant(color)); + break; + } +} + +result +_Toolbar::SetStyle(ToolbarStyle style) +{ + __style = style; + + __pToolbarPresenter->SetInitialDrawState(true); + + if (__style == TOOLBAR_TAB || __style == TOOLBAR_TAB_WITH_TITLE || __style == TOOLBAR_TAB_LARGE) + { + SetTabEditModeEnabled(true); + } + + AdjustToolbarBounds(); + + InitToolbarColor(); + + __titleText = L""; + + __descriptionText = L""; + + __highlightedItemIndex = -1; + __lastHighlightedItemIndex = -1; + __highlighted = false; + + if (__pTitleTextElement) + { + GetAccessibilityContainer()->RemoveElement(*__pTitleTextElement); + __pTitleTextElement = null; + } + + if (__itemCount == 0 && __pButtonItems[LEFT_BUTTON] == null && __pButtonItems[RIGHT_BUTTON] == null) + { + SetFocusNavigateEnabled(false); + } + else + { + SetFocusNavigateEnabled(true); + } + + return E_SUCCESS; +} + +result +_Toolbar::AdjustToolbarBounds(void) +{ + float width = 0.0f; + float height = 0.0f; + + const FloatDimension portraitSize = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF(); + const FloatDimension landscapeSize = FloatDimension(portraitSize.height, portraitSize.width); + + if (GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT) + { + width = portraitSize.width; + } + else + { + width = landscapeSize.width; + } + + SetResizable(true); + + if (__header == true) + { + if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_TAB_WITH_TITLE) + { + //GET_SHAPE_CONFIG(HEADER::WIDTH, GetOrientation(), width); + GET_SHAPE_CONFIG(HEADER::TITLE_TOTAL_HEIGHT_WITH_SEGMENTED_ITEM, GetOrientation(), height); + SetSize(FloatDimension(width, height)); + } + else if (__style == TOOLBAR_TEXT && GetOrientation() == _CONTROL_ORIENTATION_LANDSCAPE) // sip & landscape => footer height + { + //GET_SHAPE_CONFIG(HEADER::WIDTH, GetOrientation(), width); + GET_SHAPE_CONFIG(FOOTER::HEIGHT, GetOrientation(), height); + SetSize(FloatDimension(width, height)); + } + else if (__style == TOOLBAR_TAB_LARGE) + { + //GET_SHAPE_CONFIG(HEADER::WIDTH, GetOrientation(), width); + GET_SHAPE_CONFIG(HEADER::TAB_LARGE_HEIGHT, GetOrientation(), height); + SetSize(FloatDimension(width, height)); + } + else + { + //GET_SHAPE_CONFIG(HEADER::WIDTH, GetOrientation(), width); + GET_SHAPE_CONFIG(HEADER::HEIGHT, GetOrientation(), height); + SetSize(FloatDimension(width, height)); + } + } + else + { + //GET_SHAPE_CONFIG(FOOTER::WIDTH, GetOrientation(), width); + + if (__style == TOOLBAR_SOFTKEY) + { + GET_SHAPE_CONFIG(FOOTER::SOFTKEY_HEIGHT, GetOrientation(), height); + } + else if (__style == TOOLBAR_TAB_LARGE) + { + GET_SHAPE_CONFIG(FOOTER::TAB_LARGE_HEIGHT, GetOrientation(), height); + } + else + { + GET_SHAPE_CONFIG(FOOTER::HEIGHT, GetOrientation(), height); + } + + SetSize(FloatDimension(width, height)); + } + + SetResizable(false); + + _Form* pParent = dynamic_cast<_Form*>(GetParent()); + + if (pParent != null) + { + pParent->AdjustClientBounds(); + + if (__header == false) + { + FloatRectangle bounds(0.0f, pParent->GetClientBoundsF().y + pParent->GetClientBoundsF().height, width, height); + FloatDimension dimension(width, height); + dimension = pParent->TranslateSize(dimension); + bounds.height = dimension.height; + + if ((__transparent == true || !GetVisibleState()) && __style != TOOLBAR_COMMAND) + { + bounds.y -= bounds.height; + } + + pParent->SetFooterBounds(bounds); + } + } + + return E_SUCCESS; +} + +result +_Toolbar::SetTabEditModeEnabled(bool enable) +{ + return __pToolbarPresenter->SetTabEditModeEnabled(enable); +} + +result +_Toolbar::SetTitleIcon(const Bitmap& bitmap) +{ + result r = E_SYSTEM; + + Bitmap* pClonedBitmap = _BitmapImpl::CloneN(bitmap); + + if (pClonedBitmap) + { + if (__pTitleIcon) + { + delete __pTitleIcon; + } + + __pTitleIcon = pClonedBitmap; + + r = E_SUCCESS; + } + + return r; +} + +result +_Toolbar::SetTitleText(const String& text, HorizontalAlignment alignment) +{ + result r = E_SYSTEM; + __titleText = text; + __titleTextAlignment = alignment; + + RearrangeItems(); + + r = __pToolbarPresenter->SetTitleText(__titleText, __titleTextAlignment); + + if (__pTitleTextElement == null) + { + __pTitleTextElement = new (std::nothrow) _AccessibilityElement(true); + SysTryReturnResult(NID_UI_CTRL, __pTitleTextElement, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + GetAccessibilityContainer()->SetPriority(ACCESSIBILITY_PRIORITY_TOP); + GetAccessibilityContainer()->AddElement(*__pTitleTextElement); + } + + __pTitleTextElement->SetBounds(__titleTextArea); + + __pTitleTextElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_TITLE"); + __pTitleTextElement->SetName(L"HeaderTitleText"); + + return r; +} + +result +_Toolbar::SetTitleTextColor(const Color& color) +{ + __titleTextColor = color; + + return E_SUCCESS; +} + +#if 1 +result +_Toolbar::SetTransparent(bool transparent) +{ + if (__style == TOOLBAR_SOFTKEY) + { + return E_SUCCESS; + } + + __transparent = transparent; + + InitToolbarColor(); + + __isUserBackgroundBitmap = true; + + + Bitmap* pMagentaBackgroundBitmap = null; + + if (__pToolbarBackgroundBitmap) + { + delete __pToolbarBackgroundBitmap; + __pToolbarBackgroundBitmap = null; + } + + if (__pToolbarBackgroundEffectBitmap) + { + delete __pToolbarBackgroundEffectBitmap; + __pToolbarBackgroundEffectBitmap = null; + } + + + if (__transparent == true) + { + if (__header == true) + { + GET_BITMAP_CONFIG_N(HEADER::TRANSLUCENT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pMagentaBackgroundBitmap); + + bool customTheme = IS_CUSTOM_BITMAP(HEADER::TRANSLUCENT_BG_NORMAL); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::TRANSLUCENT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pToolbarBackgroundEffectBitmap); + } + } + else + { + GET_BITMAP_CONFIG_N(FOOTER::TRANSLUCENT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pMagentaBackgroundBitmap); + + bool customTheme = IS_CUSTOM_BITMAP(FOOTER::TRANSLUCENT_BG_NORMAL); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(FOOTER::TRANSLUCENT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pToolbarBackgroundEffectBitmap); + } + } + } + else + { + if (__header == true) + { + GET_BITMAP_CONFIG_N(HEADER::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pMagentaBackgroundBitmap); + + bool customTheme = IS_CUSTOM_BITMAP(HEADER::BG_NORMAL); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pToolbarBackgroundEffectBitmap); + } + } + else + { + GET_BITMAP_CONFIG_N(FOOTER::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pMagentaBackgroundBitmap); + + bool customTheme = IS_CUSTOM_BITMAP(FOOTER::BG_NORMAL); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(FOOTER::BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pToolbarBackgroundEffectBitmap); + } + } + } + + if (__transparent == true) + { + Color tempColor; + + if (__header == true) + { + GET_COLOR_CONFIG(HEADER::TRANSLUCENT_BG_NORMAL, tempColor); + } + else + { + GET_COLOR_CONFIG(FOOTER::TRANSLUCENT_BG_NORMAL, tempColor); + } + + if (pMagentaBackgroundBitmap) + { + __pToolbarBackgroundBitmap = _BitmapImpl::GetColorReplacedBitmapN(*(pMagentaBackgroundBitmap), + Color::GetColor(COLOR_ID_MAGENTA), tempColor); + + if (__pToolbarBackgroundBitmap) + { + __pToolbarBackgroundBitmap->SetAlphaConstant(0x7F); + } + } + + SetTitleTextColor(__transTitleTextColor); + SetDescriptionTextColor(__transDescriptionTextColor); + + for (int i = 0; i < __itemCount ; i ++) + { + if (__pItems.at(i) != null) + { + ApplyUserGUI(TOOLBAR_ITEM, __pItems.at(i)); + } + } + + for (int i = 0; i < BUTTON_MAX; i++) + { + if (__pButtonItems[i] != null) + { + ApplyUserGUI(TOOLBAR_BUTTON, __pButtonItems[i]); + } + } + } + else // not transparent + { + __pToolbarBackgroundBitmap = _BitmapImpl::GetColorReplacedBitmapN(*(pMagentaBackgroundBitmap), + Color::GetColor(COLOR_ID_MAGENTA), GetColor()); + + SetTitleTextColor(__titleTextColor); + SetDescriptionTextColor(__descriptionTextColor); + + for (int i = 0; i < __itemCount ; i ++) + { + if (__pItems.at(i) != null) + { + ApplyUserGUI(TOOLBAR_ITEM, __pItems.at(i)); + } + } + + for (int i = 0; i < BUTTON_MAX; i++) + { + if (__pButtonItems[i] != null) + { + ApplyUserGUI(TOOLBAR_BUTTON, __pButtonItems[i]); + } + } + } + + delete pMagentaBackgroundBitmap; + + return E_SUCCESS; +} +#endif + +#if 0 +result +_Toolbar::SetTransparent(bool transparent) +{ + if (__style == TOOLBAR_SOFTKEY) + { + return E_SUCCESS; + } + + __transparent = transparent; + + InitToolbarColor(); + + Bitmap* pMagentaBackgroundBitmap = null; + + if (__isUserBackgroundBitmap == false) + { + if (__pToolbarBackgroundBitmap) + { + delete __pToolbarBackgroundBitmap; + __pToolbarBackgroundBitmap = null; + } + + if (__pToolbarBackgroundEffectBitmap) + { + delete __pToolbarBackgroundEffectBitmap; + __pToolbarBackgroundEffectBitmap = null; + } + + if (__transparent == true) + { + if (__header == true) + { + GET_BITMAP_CONFIG_N(HEADER::TRANSLUCENT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pMagentaBackgroundBitmap); + + bool customTheme = IS_CUSTOM_BITMAP(HEADER::TRANSLUCENT_BG_NORMAL); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::TRANSLUCENT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pToolbarBackgroundEffectBitmap); + } + } + else + { + GET_BITMAP_CONFIG_N(FOOTER::TRANSLUCENT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pMagentaBackgroundBitmap); + + bool customTheme = IS_CUSTOM_BITMAP(FOOTER::TRANSLUCENT_BG_NORMAL); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(FOOTER::TRANSLUCENT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pToolbarBackgroundEffectBitmap); + } + } + } + else + { + if (__header == true) + { + GET_BITMAP_CONFIG_N(HEADER::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pMagentaBackgroundBitmap); + + bool customTheme = IS_CUSTOM_BITMAP(HEADER::BG_NORMAL); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pToolbarBackgroundEffectBitmap); + } + } + else + { + GET_BITMAP_CONFIG_N(FOOTER::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pMagentaBackgroundBitmap); + + bool customTheme = IS_CUSTOM_BITMAP(FOOTER::BG_NORMAL); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(FOOTER::BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pToolbarBackgroundEffectBitmap); + } + } + } + + if (__transparent == true) + { + __isUserBackgroundBitmap = true; + + Color tempColor; + + if (__header == true) + { + GET_COLOR_CONFIG(HEADER::TRANSLUCENT_BG_NORMAL, tempColor); + } + else + { + GET_COLOR_CONFIG(FOOTER::TRANSLUCENT_BG_NORMAL, tempColor); + } + + if (pMagentaBackgroundBitmap) + { + __pToolbarBackgroundBitmap = _BitmapImpl::GetColorReplacedBitmapN(*(pMagentaBackgroundBitmap), + Color::GetColor(COLOR_ID_MAGENTA), tempColor); + + if (__pToolbarBackgroundBitmap) + { + __pToolbarBackgroundBitmap->SetAlphaConstant(0x7F); + } + } + + SetTitleTextColor(__transTitleTextColor); + SetDescriptionTextColor(__transDescriptionTextColor); + + for (int i = 0; i < __itemCount ; i ++) + { + if (__pItems.at(i) != null) + { + ApplyUserGUI(TOOLBAR_ITEM, __pItems.at(i)); + } + } + + for (int i = 0; i < BUTTON_MAX; i++) + { + if (__pButtonItems[i] != null) + { + ApplyUserGUI(TOOLBAR_BUTTON, __pButtonItems[i]); + } + } + } + else // not transparent + { + __isUserBackgroundBitmap = false; + + __pToolbarBackgroundBitmap = _BitmapImpl::GetColorReplacedBitmapN(*(pMagentaBackgroundBitmap), + Color::GetColor(COLOR_ID_MAGENTA), GetColor()); + + SetTitleTextColor(__titleTextColor); + SetDescriptionTextColor(__descriptionTextColor); + + for (int i = 0; i < __itemCount ; i ++) + { + if (__pItems.at(i) != null) + { + ApplyUserGUI(TOOLBAR_ITEM, __pItems.at(i)); + } + } + + for (int i = 0; i < BUTTON_MAX; i++) + { + if (__pButtonItems[i] != null) + { + ApplyUserGUI(TOOLBAR_BUTTON, __pButtonItems[i]); + } + } + } + } + else // __isUserBackgroundBitmap == true + { + if (__transparent == true) + { + SetTitleTextColor(__transTitleTextColor); + SetDescriptionTextColor(__transDescriptionTextColor); + + for (int i = 0; i < __itemCount ; i ++) + { + if (__pItems.at(i) != null) + { + ApplyUserGUI(TOOLBAR_ITEM, __pItems.at(i)); + } + } + + for (int i = 0; i < BUTTON_MAX; i++) + { + if (__pButtonItems[i] != null) + { + ApplyUserGUI(TOOLBAR_BUTTON, __pButtonItems[i]); + } + } + } + else // not transparent + { + SetTitleTextColor(__titleTextColor); + SetDescriptionTextColor(__descriptionTextColor); + + for (int i = 0; i < __itemCount ; i ++) + { + if (__pItems.at(i) != null) + { + ApplyUserGUI(TOOLBAR_ITEM, __pItems.at(i)); + } + } + + for (int i = 0; i < BUTTON_MAX; i++) + { + if (__pButtonItems[i] != null) + { + ApplyUserGUI(TOOLBAR_BUTTON, __pButtonItems[i]); + } + } + } + } + + delete pMagentaBackgroundBitmap; + + return E_SUCCESS; +} +#endif + +result +_Toolbar::SetWaitingAnimationPosition(ToolbarAnimationPosition animationPos, float x, float y) +{ + if (__pAnimation[animationPos]) + { + __pAnimation[animationPos]->SetPosition(FloatPoint(x, y)); + } + + return E_SUCCESS; +} + +result +_Toolbar::StopWaitingAnimation(ToolbarAnimationPosition animationPos) +{ + SysTryReturnResult(NID_UI_CTRL, + (TOOLBAR_ANIMATION_POSITION_TITLE <= animationPos && animationPos < TOOLBAR_ANIMATION_POSITION_MAX), E_INVALID_ARG, + "[E_INVALID_ARG] The animationPos is invalid."); + SysTryReturnResult(NID_UI_CTRL, (__pAnimation[animationPos]), E_INVALID_STATE, + "[E_INVALID_STATE] __pAnimation isn't constructed."); + + __pAnimation[animationPos]->Stop(); + + if (animationPos == TOOLBAR_ANIMATION_POSITION_TITLE) + { + DetachChild(*__pAnimation[animationPos]); + } + else if (animationPos == TOOLBAR_ANIMATION_POSITION_BUTTON_LEFT && __pButtonItems[LEFT_BUTTON] != null) + { + __pButtonItems[LEFT_BUTTON]->DetachChild(*__pAnimation[animationPos]); + } + else if (animationPos == TOOLBAR_ANIMATION_POSITION_BUTTON_RIGHT && __pButtonItems[RIGHT_BUTTON] != null) + { + __pButtonItems[RIGHT_BUTTON]->DetachChild(*__pAnimation[animationPos]); + } + + delete __pAnimation[animationPos]; + __pAnimation[animationPos] = null; + + return E_SUCCESS; +} + +void +_Toolbar::OnAnimationStopped(const _Control& source) +{ + ClearLastResult(); + + if (&source == __pAnimation[TOOLBAR_ANIMATION_POSITION_BUTTON_LEFT]) + { + __pAnimation[TOOLBAR_ANIMATION_POSITION_BUTTON_LEFT]->Play(); + } + else if (&source == __pAnimation[TOOLBAR_ANIMATION_POSITION_BUTTON_RIGHT]) + { + __pAnimation[TOOLBAR_ANIMATION_POSITION_BUTTON_RIGHT]->Play(); + } + else if (__pAnimation[TOOLBAR_ANIMATION_POSITION_TITLE]) + { + __pAnimation[TOOLBAR_ANIMATION_POSITION_TITLE]->Play(); + } + + return; +} + +result +_Toolbar::OnAttachedToMainTree(void) +{ + __isAttachedToMainTree = true; + + return E_SUCCESS; +} + +void +_Toolbar::AddAccessibilityElement(ToolbarButton position, _Button* pButton) +{ + String name = L""; + switch(position) + { + case LEFT_BUTTON: + name = L"LeftButtonText"; + break; + case RIGHT_BUTTON: + name = L"RightButtonText"; + break; + case MIDDLE_BUTTON: + name = L"MiddleButtonText"; + break; + default: + return; + break; + } + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + _AccessibilityElement* pButtonElement = null; + + _AccessibilityContainer* pButtonContainer = pButton->GetAccessibilityContainer(); + + if (pButtonContainer) + { + pButtonContainer->SetPriority(__header?ACCESSIBILITY_PRIORITY_TOP:ACCESSIBILITY_PRIORITY_BOTTOM); + pContainer->AddChildContainer(*pButtonContainer); + pButtonElement = pButtonContainer->GetChildElement(L"ButtonText"); + } + + if (pButtonElement) + { + pButtonElement->SetName(name); + + pButtonElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_BUTTON_T_TTS"); + pButtonElement->SetBounds(FloatRectangle(0.0f, 0.0f, pButton->GetBoundsF().width, pButton->GetBoundsF().height)); + } +} + +void +_Toolbar::AddAccessibilityElement(_Button* pButton) +{ + _AccessibilityContainer* pContainer = GetAccessibilityContainer(); + if (pContainer == null) + { + return; + } + + int priorty = 0; + if (__header == true) + { + priorty = ACCESSIBILITY_PRIORITY_TOP; + } + else + { + priorty = ACCESSIBILITY_PRIORITY_BOTTOM; + } + pContainer->SetPriority(priorty); + + ToolbarStyle style = GetStyle(); + String trait = L""; + String name = L""; + switch (style) + { + case TOOLBAR_HEADER_SEGMENTED: + //fall through + case TOOLBAR_HEADER_SEGMENTED_WITH_TITLE: + //fall through + case TOOLBAR_SEGMENTED: + name = L"Segment" + Integer::ToString(__itemCount); + name.Append(L"Text"); + trait = L"Segmented control"; + break; + case TOOLBAR_TAB_WITH_TITLE: + //fall through + case TOOLBAR_TAB_LARGE: + //fall through + case TOOLBAR_TAB: + name = L"Tab" + Integer::ToString(__itemCount); + name.Append(L"Text"); + trait = L"Tab"; + break; + default: + name = L"Button" + Integer::ToString(__itemCount); + name.Append(L"Text"); + trait = L"Button"; + break; + } + + if (pButton != null) + { + _AccessibilityElement* pElement = null; + _AccessibilityContainer* pButtonContainer = pButton->GetAccessibilityContainer(); + + if (pButtonContainer) + { + pButtonContainer->SetPriority(priorty); + pContainer->AddChildContainer(*pButtonContainer); + pElement = pButtonContainer->GetChildElement(L"ButtonText"); + } + + if (pElement) + { + pElement->SetName(name); + pElement->SetTrait(trait); + 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) + { + pElement->SetHintWithStringId("IDS_TPLATFORM_BODY_DOUBLE_TAP_TO_MOVE_TO_CONTENT_T_TTS"); + pButton->GetAccessibilityContainer()->AddListener(*__pAccessibilityListener); + } + } + } + + return; +} + +void +_Toolbar::OnBoundsChanged(void) +{ + RearrangeItems(); + return; +} + +void +_Toolbar::OnFontChanged(Font* pFont) +{ + __pToolbarPresenter->OnFontChanged(pFont); + + return; +} + +void +_Toolbar::OnFontInfoRequested(unsigned long& style, int& size) +{ + __pToolbarPresenter->OnFontInfoRequested(style, size); + + return; +} + +void +_Toolbar::OnAncestorVisibleStateChanged(const _Control& control) +{ + __pToolbarPresenter->OnAncestorVisibleStateChanged(control); + + _Control::OnAncestorVisibleStateChanged(control); + return; +} + +void +_Toolbar::OnDrawFocus(void) +{ + if (IsFocusModeStateEnabled() == true) + { + if (__itemCount == 0) + { + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__highlightedItemIndex == __itemCount) + { + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + } + } + else if (__highlightedItemIndex == __itemCount + 1) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + } + } + } + else + { + if (__highlightedItemIndex == __itemCount) + { + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + } + } + } + } + else + { + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__highlightedItemIndex == __itemCount) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + } + } + } + } + } + else // __itemCount != 0 + { + if (__highlightedItemIndex < __itemCount) + { + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + } + } + } + else + { + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__highlightedItemIndex == __itemCount) + { + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + } + } + else if (__highlightedItemIndex == __itemCount + 1) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + } + } + } + else + { + if (__highlightedItemIndex == __itemCount) + { + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + } + } + } + } + else + { + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__highlightedItemIndex == __itemCount) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + } + } + } + } + } + } + } + + Invalidate(true); + + return; +} //_Toolbar::OnDrawFocus(void) + +void +_Toolbar::OnChildControlFocusMoved(const _Control& control) +{ + __pToolbarPresenter->OnChildControlFocusMoved(control); + + return; +} + +bool +_Toolbar::IsChildControlFocusManage(void) const +{ + __pToolbarPresenter->IsChildControlFocusManage(); + + return true; +} + +void +_Toolbar::OnFocusableStateChanged(bool focusalbeState) +{ + __pToolbarPresenter->OnFocusableStateChanged(focusalbeState); + + return; +} + +void +_Toolbar::OnFocusModeStateChanged(void) +{ + if (__itemCount == 0) + { + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__highlightedItemIndex == __itemCount) + { + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + __pButtonItems[LEFT_BUTTON]->Invalidate(); + } + } + else if (__highlightedItemIndex == __itemCount + 1) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + __pButtonItems[RIGHT_BUTTON]->Invalidate(); + } + } + } + else + { + if (__highlightedItemIndex == __itemCount) + { + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + __pButtonItems[LEFT_BUTTON]->Invalidate(); + } + } + } + } + else + { + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__highlightedItemIndex == __itemCount) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + __pButtonItems[RIGHT_BUTTON]->Invalidate(); + } + } + } + } + } + else // __itemCount != 0 + { + if (__highlightedItemIndex < __itemCount) + { + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL); + __pItems.at(__highlightedItemIndex)->Invalidate(); + } + } + } + else + { + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__highlightedItemIndex == __itemCount) + { + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + __pButtonItems[LEFT_BUTTON]->Invalidate(); + } + } + else if (__highlightedItemIndex == __itemCount + 1) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + __pButtonItems[RIGHT_BUTTON]->Invalidate(); + } + } + } + else + { + if (__highlightedItemIndex == __itemCount) + { + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + __pButtonItems[LEFT_BUTTON]->Invalidate(); + } + } + } + } + else + { + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__highlightedItemIndex == __itemCount) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + __pButtonItems[RIGHT_BUTTON]->Invalidate(); + } + } + } + } + } + + int selectedItemIndex = GetSelectedItemIndex(); + + if (selectedItemIndex != -1 && __pItems.at(selectedItemIndex)) + { + __pItems.at(selectedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false); + __pItems.at(selectedItemIndex)->Invalidate(); + } + + } + + 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 + +bool +_Toolbar::OnFocusGained(const _Control& source) +{ + if (IsFocusModeStateEnabled() == true) + { + if (__header == true && __style != TOOLBAR_TEXT) // right align + { + if (__itemCount != 0) + { + 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 + { + if (__isEnterKeyPressed) + { + __isEnterKeyPressed = false; + } + else + { + __highlightedItemIndex = 0; + } + } + } + else + { + if (__isEnterKeyPressed) + { + __isEnterKeyPressed = false; + } + else if (__pButtonItems[LEFT_BUTTON] || __pButtonItems[RIGHT_BUTTON]) + { + __highlightedItemIndex = 0; + } + } + + OnHeaderFocusGained(source); + } + else + { + if (__itemCount != 0) + { + 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 + { + if (__isEnterKeyPressed) + { + __isEnterKeyPressed = false; + } + else + { + __highlightedItemIndex = 0; + } + } + } + else + { + if (__isEnterKeyPressed) + { + __isEnterKeyPressed = false; + } + else if (__pButtonItems[LEFT_BUTTON] || __pButtonItems[RIGHT_BUTTON]) + { + __highlightedItemIndex = 0; + } + } + + OnFooterFocusGained(source); + } + } + + Invalidate(true); + + return true; +} // OnFocusGained + +result +_Toolbar::OnHeaderFocusGained(const _Control& source) +{ + if (__itemCount == 0) + { + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__highlightedItemIndex == __itemCount) + { + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + } + else + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + __highlightedItemIndex++; + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + } + } + } + else if (__highlightedItemIndex == __itemCount + 1) + { + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + } + } + } + } + else + { + if (__highlightedItemIndex == __itemCount) + { + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + } + } + } + } + else + { + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__highlightedItemIndex == __itemCount) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + } + } + } + } + } + else // itemCount != 0 + { + if (__highlightedItemIndex != -1 && (__highlightedItemIndex < __itemCount) && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + } + else + { + if (__highlightedItemIndex < __itemCount - 1) + { + __highlightedItemIndex++; + + OnHeaderFocusGained(source); + } + else if (__highlightedItemIndex == __itemCount - 1) + { + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + + __highlightedItemIndex = __itemCount; + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + } + else + { + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + + __highlightedItemIndex = __itemCount + 1; + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + } + } + } + } + else if (__pButtonItems[RIGHT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + + __highlightedItemIndex = __itemCount; + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + } + } + } + } + } + } + + return E_SUCCESS; +} + +result +_Toolbar::OnFooterFocusGained(const _Control& source) +{ + if (__itemCount == 0) + { + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + + __highlightedItemIndex = __itemCount; + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + } + else + { + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + + __highlightedItemIndex = __itemCount + 1; + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + } + } + } + } + else if (__pButtonItems[RIGHT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + + __highlightedItemIndex = __itemCount; + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + } + } + } + else // itemCount != 0 + { + 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(); + + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + } + } + } + else // not segmented + { + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + + __highlightedItemIndex = __itemCount; + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + } + else + { + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + } + else + { + for (__highlightedItemIndex = 0; __highlightedItemIndex < __itemCount; __highlightedItemIndex++) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + + break; + } + } + + if (__highlightedItemIndex == __itemCount) + { + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + + __highlightedItemIndex = __itemCount + 1; + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + } + } + } + } + } + } + } + else + { + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + } + else + { + for (__highlightedItemIndex = 0; __highlightedItemIndex < __itemCount; __highlightedItemIndex++) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + + break; + } + } + + if (__highlightedItemIndex == __itemCount) + { + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + + __highlightedItemIndex = __itemCount; + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + } + } + } + } + } + } + } + } + + return E_SUCCESS; +} + +bool +_Toolbar::OnFocusLost(const _Control& source) +{ + if (__itemCount == 0) + { + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__highlightedItemIndex == __itemCount) + { + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + } + else if (__highlightedItemIndex == __itemCount + 1) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + } + } + else + { + if (__highlightedItemIndex == __itemCount) + { + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + } + } + } + else + { + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__highlightedItemIndex == __itemCount) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + } + } + } + } + else // __itemCount != 0 + { + if (__highlightedItemIndex < __itemCount) + { + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + } + } + else + { + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__highlightedItemIndex == __itemCount) + { + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + } + else if (__highlightedItemIndex == __itemCount + 1) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + } + } + else + { + if (__highlightedItemIndex == __itemCount) + { + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + } + } + } + else + { + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__highlightedItemIndex == __itemCount) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + } + } + } + } + + int selectedItemIndex = GetSelectedItemIndex(); + + if (selectedItemIndex != -1 && __pItems.at(selectedItemIndex)) + { + if (__pItems.at(selectedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(selectedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false); + } + } + } + + if (!__isEnterKeyPressed) + { + __highlightedItemIndex = -1; + __isEnterKeyPressed = false; + } + + Invalidate(true); + + return true; +} // OnFocusLost + +bool +_Toolbar::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) +{ + _KeyCode keyCode = keyInfo.GetKeyCode(); + + int selectedItemIndex = GetSelectedItemIndex(); + + if (IsFocusModeStateEnabled() == true && keyCode == _KEY_RIGHT) + { + __highlighted = false; + __isEnterKeyPressed = false; + + if (__header == true && __style != TOOLBAR_TEXT) // right align + { + if (__itemCount != 0) + { + if (__highlightedItemIndex < (__itemCount - 1)) // 0,1 + { + if (__highlightedItemIndex == selectedItemIndex) + { + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false); + } + } + } + else + { + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + } + } + + __highlightedItemIndex++; + + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + + if (__highlightedItemIndex - __pToolbarPresenter->GetFirstLoadedItemIndex() == SEGMENTED_ITEM_MAX) + { + if (__style == TOOLBAR_TAB || __style == TOOLBAR_TAB_WITH_TITLE || __style == TOOLBAR_TAB_LARGE) + { + __pToolbarPresenter->SetItemFit(__highlightedItemIndex - (SEGMENTED_ITEM_MAX - 1)); + } + } + } + else + { + OnKeyReleased(source, keyInfo); + } + } + } + else // 2, L, R, B, + { + if (__pButtonItems[LEFT_BUTTON] || __pButtonItems[RIGHT_BUTTON]) + { + if (__highlightedItemIndex == __itemCount - 1) + { + if (__highlightedItemIndex == selectedItemIndex) + { + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false); + } + } + } + else + { + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + } + } + } + } + + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__highlightedItemIndex == __itemCount - 1) + { + __highlightedItemIndex++; + + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + } + else + { + OnKeyReleased(source, keyInfo); + } + } + else if (__highlightedItemIndex == __itemCount) + { + __highlightedItemIndex++; + + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + } + else + { + OnKeyReleased(source, keyInfo); + } + } + } + else + { + if (__highlightedItemIndex == __itemCount - 1) + { + __highlightedItemIndex++; + + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + } + else + { + OnKeyReleased(source, keyInfo); + } + } + } + } + else + { + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__highlightedItemIndex == __itemCount - 1) + { + __highlightedItemIndex++; + + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + } + else + { + OnKeyReleased(source, keyInfo); + } + } + } + } + } + + if (__highlighted == false) + { + __highlightedItemIndex = __lastHighlightedItemIndex; + + if (__highlightedItemIndex < __itemCount) + { + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + } + } + } + else if (__highlightedItemIndex == __itemCount) + { + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + } + } + else if (__pButtonItems[RIGHT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + } + } + } + else if (__highlightedItemIndex == __itemCount + 1) + { + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + } + } + } + + __highlighted = true; + } + } + else // itemCount == 0 + { + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__highlightedItemIndex == 0) + { + __highlightedItemIndex++; + + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + } + else + { + OnKeyReleased(source, keyInfo); + } + } + } + } + + if (__highlighted == false) + { + __highlightedItemIndex = __lastHighlightedItemIndex; + + if (__highlightedItemIndex == __itemCount) + { + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + } + } + else if (__pButtonItems[RIGHT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + } + } + } + else if (__highlightedItemIndex == __itemCount + 1) + { + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + } + } + } + + __highlighted = true; + } + } + } + else // footer // right key + { + if (__itemCount != 0) + { + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]) // L Item R + { + if (__highlightedItemIndex == __itemCount) + { + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + + __highlightedItemIndex = 0; + + if (__pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + } + else + { + OnKeyReleased(source, keyInfo); + } + } + } + else if (__highlightedItemIndex < __itemCount - 1) + { + if (__highlightedItemIndex == selectedItemIndex) + { + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false); + } + } + } + else + { + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + } + } + + __highlightedItemIndex++; + + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + } + else + { + OnKeyReleased(source, keyInfo); + } + } + } + else if (__highlightedItemIndex == __itemCount -1) + { + if (__highlightedItemIndex == selectedItemIndex) + { + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false); + } + } + } + else + { + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + } + } + + __highlightedItemIndex = __itemCount + 1; + + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + } + else + { + OnKeyReleased(source, keyInfo); + } + } + } + } + else // L, M Item + { + if (__highlightedItemIndex == __itemCount) + { + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + + __highlightedItemIndex = 0; + + if (__pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + } + else + { + OnKeyReleased(source, keyInfo); + } + } + } + else if (__highlightedItemIndex < __itemCount - 1) + { + if (__highlightedItemIndex == selectedItemIndex) + { + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false); + } + } + } + else + { + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + } + } + + __highlightedItemIndex++; + + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + } + else + { + OnKeyReleased(source, keyInfo); + } + } + } + } + } + else // L is null + { + if (__pButtonItems[RIGHT_BUTTON]) // Item R, B + { + if (__highlightedItemIndex < __itemCount - 1) + { + if (__highlightedItemIndex == selectedItemIndex) + { + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false); + } + } + } + else + { + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + } + } + + __highlightedItemIndex++; + + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + } + else + { + OnKeyReleased(source, keyInfo); + } + } + } + else if (__highlightedItemIndex == __itemCount -1) + { + if (__highlightedItemIndex == selectedItemIndex) + { + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false); + } + } + } + else + { + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + } + } + + __highlightedItemIndex++; + + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + } + else + { + OnKeyReleased(source, keyInfo); + } + } + } + } + else // Item + { + if (__highlightedItemIndex < __itemCount - 1) + { + if (__highlightedItemIndex == selectedItemIndex) + { + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false); + } + } + } + else + { + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + } + } + + __highlightedItemIndex++; + + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + + if (__highlightedItemIndex - __pToolbarPresenter->GetFirstLoadedItemIndex() == SEGMENTED_ITEM_MAX) + { + if (__style == TOOLBAR_TAB || __style == TOOLBAR_TAB_WITH_TITLE || __style == TOOLBAR_TAB_LARGE) + { + __pToolbarPresenter->SetItemFit(__highlightedItemIndex - (SEGMENTED_ITEM_MAX - 1)); + } + } + } + else + { + OnKeyReleased(source, keyInfo); + } + } + } + } + } + + if (__highlighted == false) + { + __highlightedItemIndex = __lastHighlightedItemIndex; + + if (__highlightedItemIndex < __itemCount) + { + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + } + } + } + else if (__highlightedItemIndex == __itemCount) + { + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + } + } + else if (__pButtonItems[RIGHT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + } + } + } + else if (__highlightedItemIndex == __itemCount + 1) + { + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + } + } + } + + __highlighted = true; + } + } + else // __itemCount = 0 + { + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__highlightedItemIndex == 0) + { + __highlightedItemIndex++; + + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + } + + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + } + else + { + OnKeyReleased(source, keyInfo); + } + } + } + } + } + + if (__highlighted == false) + { + __highlightedItemIndex = __lastHighlightedItemIndex; + + if (__highlightedItemIndex == __itemCount) + { + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + } + } + else if (__pButtonItems[RIGHT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + } + } + } + else if (__highlightedItemIndex == __itemCount + 1) + { + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + } + } + } + + __highlighted = true; + } + } + } + + Invalidate(true); + } + else if (IsFocusModeStateEnabled() == true && keyCode == _KEY_LEFT) + { + __highlighted = false; + __isEnterKeyPressed = false; + + if (__header == true && __style != TOOLBAR_TEXT) // right align + { + if (__itemCount != 0) + { + if (__highlightedItemIndex == __itemCount + 1) + { + __highlightedItemIndex--; + + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + } + + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + } + else + { + OnKeyReleased(source, keyInfo); + } + } + else if (__highlightedItemIndex == __itemCount) + { + __highlightedItemIndex--; + + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + } + else if (__pButtonItems[RIGHT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + } + + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + } + else + { + OnKeyReleased(source, keyInfo); + } + } + } + else if (__highlightedItemIndex > 0) + { + if (__highlightedItemIndex == selectedItemIndex) + { + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false); + } + } + } + else + { + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + } + } + + __highlightedItemIndex--; + + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + + if (__pToolbarPresenter->GetFirstLoadedItemIndex() > __highlightedItemIndex) + { + if (__style == TOOLBAR_TAB || __style == TOOLBAR_TAB_WITH_TITLE || __style == TOOLBAR_TAB_LARGE) + { + __pToolbarPresenter->SetItemFit(__highlightedItemIndex); + } + } + } + else + { + OnKeyReleased(source, keyInfo); + } + } + } + + if (__highlighted == false) + { + __highlightedItemIndex = __lastHighlightedItemIndex; + + if (__highlightedItemIndex < __itemCount) + { + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + } + } + } + else if (__highlightedItemIndex == __itemCount) + { + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + } + } + else if (__pButtonItems[RIGHT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + } + } + } + else if (__highlightedItemIndex == __itemCount + 1) + { + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + } + } + } + + __highlighted = true; + } + } + else // __itemCount == 0 + { + if (__highlightedItemIndex == __itemCount + 1) + { + __highlightedItemIndex--; + + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + } + + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + } + else + { + OnKeyReleased(source, keyInfo); + } + } + + if (__highlighted == false) + { + __highlightedItemIndex = __lastHighlightedItemIndex; + + if (__highlightedItemIndex == __itemCount) + { + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + } + } + else if (__pButtonItems[RIGHT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + } + } + } + else if (__highlightedItemIndex == __itemCount + 1) + { + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + } + } + } + + __highlighted = true; + } + } + } + else // footer << leftkey + { + if (__itemCount != 0) + { + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]) // L Item R + { + if (__highlightedItemIndex == 0) + { + if (__highlightedItemIndex == selectedItemIndex) + { + if (__pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false); + } + } + } + else + { + if (__pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + } + } + + __highlightedItemIndex = __itemCount; + + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + } + else + { + //empty + } + } + } + else if (__highlightedItemIndex < __itemCount) + { + if (__highlightedItemIndex == selectedItemIndex) + { + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false); + } + } + } + else + { + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + } + } + + __highlightedItemIndex--; + + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + } + else + { + OnKeyReleased(source, keyInfo); + } + } + } + else if (__highlightedItemIndex == __itemCount + 1) + { + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + } + + __highlightedItemIndex = __itemCount - 1; + + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + } + else + { + OnKeyReleased(source, keyInfo); + } + } + } + } + else // L, M Item + { + if (__highlightedItemIndex == 0) + { + if (__highlightedItemIndex == selectedItemIndex) + { + if (__pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false); + } + } + } + else + { + if (__pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + } + } + + __highlightedItemIndex = __itemCount; + + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + } + else + { + //empty + } + } + } + else if (__highlightedItemIndex < __itemCount) + { + if (__highlightedItemIndex == selectedItemIndex) + { + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false); + } + } + } + else + { + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + } + } + + __highlightedItemIndex--; + + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + } + else + { + OnKeyReleased(source, keyInfo); + } + } + } + } + } + else // L is null + { + if (__pButtonItems[RIGHT_BUTTON]) // Item R + { + if (__highlightedItemIndex == 0) + { + // empty + } + else if (__highlightedItemIndex < __itemCount) + { + if (__highlightedItemIndex == selectedItemIndex) + { + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false); + } + } + } + else + { + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + } + } + + __highlightedItemIndex--; + + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + } + else + { + OnKeyReleased(source, keyInfo); + } + } + } + else if (__highlightedItemIndex == __itemCount) + { + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + } + + __highlightedItemIndex--; + + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + } + else + { + OnKeyReleased(source, keyInfo); + } + } + } + } + else // Item + { + if (__highlightedItemIndex == 0) + { + // empty + } + else if (__highlightedItemIndex < __itemCount) + { + if (__highlightedItemIndex == selectedItemIndex) + { + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, false); + } + } + } + else + { + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + } + } + + __highlightedItemIndex--; + + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + + if (__pToolbarPresenter->GetFirstLoadedItemIndex() > __highlightedItemIndex) + { + if (__style == TOOLBAR_TAB || __style == TOOLBAR_TAB_WITH_TITLE || __style == TOOLBAR_TAB_LARGE) + { + __pToolbarPresenter->SetItemFit(__highlightedItemIndex); + } + } + } + else + { + OnKeyReleased(source, keyInfo); + } + } + } + } + } + + if (__highlighted == false) + { + __highlightedItemIndex = __lastHighlightedItemIndex; + + if (__highlightedItemIndex < __itemCount) + { + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + } + } + } + else if (__highlightedItemIndex == __itemCount) + { + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + } + } + else if (__pButtonItems[RIGHT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + } + } + } + else if (__highlightedItemIndex == __itemCount + 1) + { + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + } + } + } + + __highlighted = true; + } + } + else // __itemCount == 0 + { + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__highlightedItemIndex == __itemCount + 1) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + + __highlightedItemIndex--; + + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + } + else + { + //empty + } + } + } + } + } + + if (__highlighted == false) + { + __highlightedItemIndex = __lastHighlightedItemIndex; + + if (__highlightedItemIndex == __itemCount) + { + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + } + } + else if (__pButtonItems[RIGHT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + } + } + } + else if (__highlightedItemIndex == __itemCount + 1) + { + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED, false); + } + } + } + + __highlighted = true; + } + } + } + + Invalidate(true); + } + else if (IsFocusModeStateEnabled() == true && keyCode == _KEY_ENTER) + { + if (__itemCount != 0) + { + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]) // L Item R + { + if (__highlightedItemIndex < __itemCount) + { + if (__style == TOOLBAR_HEADER_SEGMENTED || __style ==TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_SEGMENTED + || __style == TOOLBAR_TAB || __style == TOOLBAR_TAB_WITH_TITLE || __style == TOOLBAR_TAB_LARGE) + { + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + SetItemHighlighted(__highlightedItemIndex, true, false); + } + } + } + else + { + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL); + __pItems.at(__highlightedItemIndex)->Invalidate(); + + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED); + } + } + } + } + else if (__highlightedItemIndex == __itemCount) + { + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + __pButtonItems[LEFT_BUTTON]->Invalidate(); + + __lastHighlightedItemIndex = __highlightedItemIndex = __itemCount; + __highlighted = true; + + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED); + } + } + } + else if (__highlightedItemIndex == __itemCount + 1) + { + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + __pButtonItems[RIGHT_BUTTON]->Invalidate(); + + __lastHighlightedItemIndex = __highlightedItemIndex = __itemCount + 1; + __highlighted = true; + + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED); + } + } + } + } + else // L Item + { + if (__highlightedItemIndex < __itemCount) + { + if (__style == TOOLBAR_HEADER_SEGMENTED || __style ==TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_SEGMENTED + || __style == TOOLBAR_TAB || __style == TOOLBAR_TAB_WITH_TITLE || __style == TOOLBAR_TAB_LARGE) + { + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + SetItemHighlighted(__highlightedItemIndex, true, false); + } + } + } + else + { + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL); + __pItems.at(__highlightedItemIndex)->Invalidate(); + + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED); + } + } + } + } + else if (__highlightedItemIndex == __itemCount) + { + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + __pButtonItems[LEFT_BUTTON]->Invalidate(); + + __lastHighlightedItemIndex = __highlightedItemIndex = __itemCount; + __highlighted = true; + + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED); + } + } + } + } + } + else // L is null + { + if (__pButtonItems[RIGHT_BUTTON]) // Item R + { + if (__highlightedItemIndex < __itemCount) + { + if (__style == TOOLBAR_HEADER_SEGMENTED || __style ==TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_SEGMENTED + || __style == TOOLBAR_TAB || __style == TOOLBAR_TAB_WITH_TITLE || __style == TOOLBAR_TAB_LARGE) + { + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + SetItemHighlighted(__highlightedItemIndex, true, false); + } + } + } + else + { + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL); + __pItems.at(__highlightedItemIndex)->Invalidate(); + + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED); + } + } + } + } + else if (__highlightedItemIndex == __itemCount) + { + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + __pButtonItems[RIGHT_BUTTON]->Invalidate(); + + __lastHighlightedItemIndex = __highlightedItemIndex = __itemCount; + __highlighted = true; + + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED); + } + } + } + } + else // Item + { + if (__highlightedItemIndex < __itemCount) + { + if (__style == TOOLBAR_HEADER_SEGMENTED || __style ==TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_SEGMENTED + || __style == TOOLBAR_TAB || __style == TOOLBAR_TAB_WITH_TITLE || __style == TOOLBAR_TAB_LARGE) + { + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + SetItemHighlighted(__highlightedItemIndex, true, false); + } + } + } + else + { + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL); + __pItems.at(__highlightedItemIndex)->Invalidate(); + + __lastHighlightedItemIndex = __highlightedItemIndex; + __highlighted = true; + + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED); + } + } + } + } + } + } + } + else // __itemCount == 0 + { + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]) // L R + { + if (__highlightedItemIndex == 0) + { + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + __pButtonItems[LEFT_BUTTON]->Invalidate(); + + __lastHighlightedItemIndex = __highlightedItemIndex = __itemCount; + __highlighted = true; + + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED); + } + } + } + else if (__highlightedItemIndex == 1) + { + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + __pButtonItems[RIGHT_BUTTON]->Invalidate(); + + __lastHighlightedItemIndex = __highlightedItemIndex = __itemCount + 1; + __highlighted = true; + + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED); + } + } + } + } + else // L + { + if (__highlightedItemIndex == 0) + { + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + __pButtonItems[LEFT_BUTTON]->Invalidate(); + + __lastHighlightedItemIndex = __highlightedItemIndex = __itemCount; + __highlighted = true; + + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED); + } + } + } + } + } + else // L is null + { + if (__pButtonItems[RIGHT_BUTTON]) // R + { + if (__highlightedItemIndex == 0) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_NORMAL); + __pButtonItems[RIGHT_BUTTON]->Invalidate(); + + __lastHighlightedItemIndex = __highlightedItemIndex = __itemCount; + __highlighted = true; + + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED); + } + } + } + } + } + } + + return false; +} // OnKeyReleased + +void +_Toolbar::OnChangeLayout(_ControlOrientation orientationStatus) +{ + float toolbarWidth = GetBoundsF().width; + + if (CalculateMinimumToolbarWidth() > toolbarWidth) + { + toolbarWidth = CalculateMinimumToolbarWidth(); + } + + AdjustToolbarBounds(); + + RearrangeItems(); + + __pToolbarPresenter->OnChangeLayout(orientationStatus); + + return; +} + +void +_Toolbar::OnDraw(void) +{ + ClearLastResult(); + + if (__isAttachedToMainTree) + { + __isAttachedToMainTree = false; + AdjustToolbarBounds(); + } + + __pToolbarPresenter->Draw(); + + return; +} + +bool +_Toolbar::OnLongPressGestureDetected(_TouchLongPressGestureDetector& gesture) +{ + return __pToolbarPresenter->OnLongPressGestureDetected(); +} + +bool +_Toolbar::OnLongPressGestureCanceled(_TouchLongPressGestureDetector& gesture) +{ + return false; +} + +bool +_Toolbar::OnFlickGestureDetected(_TouchFlickGestureDetector& gesture) +{ + return __pToolbarPresenter->OnFlickGestureDetected(gesture); +} + +bool +_Toolbar::OnFlickGestureCanceled(_TouchFlickGestureDetector& gesture) +{ + return false; +} + +bool +_Toolbar::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + ClearLastResult(); + if (__isEnterKeyPressed) + { + __highlightedItemIndex = -1; + __isEnterKeyPressed = false; + } + + return __pToolbarPresenter->OnTouchPressed(source, touchinfo); +} + +bool +_Toolbar::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + ClearLastResult(); + + return __pToolbarPresenter->OnTouchReleased(source, touchinfo); +} + +bool +_Toolbar::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + ClearLastResult(); + + return __pToolbarPresenter->OnTouchMoved(source, touchinfo); +} + +bool +_Toolbar::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + ClearLastResult(); + + return __pToolbarPresenter->OnTouchCanceled(source, touchinfo); +} + +bool +_Toolbar::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) +{ + _KeyCode keyCode = keyInfo.GetKeyCode(); + + if (IsFocusModeStateEnabled() == true && keyCode == _KEY_ENTER) + { + __isEnterKeyPressed = true; + if (__itemCount != 0) + { + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]) // L Item R + { + if (__highlightedItemIndex < __itemCount) + { + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_PRESSED); + } + } + } + else if (__highlightedItemIndex == __itemCount) + { + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_PRESSED); + } + } + } + else if (__highlightedItemIndex == __itemCount + 1) + { + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_PRESSED); + } + } + } + } + else // L Item + { + if (__highlightedItemIndex < __itemCount) + { + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_PRESSED); + } + } + } + else if (__highlightedItemIndex == __itemCount) + { + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_PRESSED); + } + } + } + } + } + else // L is null + { + if (__pButtonItems[RIGHT_BUTTON]) // Item R + { + if (__highlightedItemIndex < __itemCount) + { + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_PRESSED); + } + } + } + else if (__highlightedItemIndex == __itemCount) + { + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_PRESSED); + } + } + } + } + else // Item + { + if (__highlightedItemIndex < __itemCount) + { + if (__highlightedItemIndex != -1 && __pItems.at(__highlightedItemIndex)) + { + if (__pItems.at(__highlightedItemIndex)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pItems.at(__highlightedItemIndex)->SetButtonStatus(_BUTTON_STATUS_PRESSED); + } + } + } + } + } + } + else // __itemCount == 0 + { + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]) // L R + { + if (__highlightedItemIndex == 0) + { + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_PRESSED); + } + } + } + else if (__highlightedItemIndex == 1) + { + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_PRESSED); + } + } + } + } + else // L + { + if (__highlightedItemIndex == 0) + { + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[LEFT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[LEFT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_PRESSED); + } + } + } + } + } + else // L is null + { + if (__pButtonItems[RIGHT_BUTTON]) // R + { + if (__highlightedItemIndex == 0) + { + if (__pButtonItems[RIGHT_BUTTON]->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + __pButtonItems[RIGHT_BUTTON]->SetButtonStatus(_BUTTON_STATUS_PRESSED); + } + } + } + } + } + } + + Invalidate(true); + + return false; +} + +void +_Toolbar::AddActionEventListener(const Controls::_IActionEventListener& listener) +{ + __pActionEventListener = const_cast(&listener); + + for (int i = 0; i < __itemCount; i++) + { + __pItems.at(i)->AddActionEventListener(listener); + } + + for (int j = 0; j <= MIDDLE_BUTTON; j++) + { + if (__pButtonItems[j]) + { + __pButtonItems[j]->AddActionEventListener(listener); + } + } + + return; +} + +void +_Toolbar::RemoveActionEventListener(const Controls::_IActionEventListener& listener) +{ + __pActionEventListener = null; + + //for (int i = 0; i < __itemCount; i++) + //{ + //__pItems.at(i)->RemoveActionEventListener(listener); + //} + + //for (int j = 0; j < MIDDLE_BUTTON; j++) + //{ + // if (__pButtonItems[j]) + // { + // __pButtonItems[j]->RemoveActionEventListener(listener); + // } + //} + + return; + +} + +void +_Toolbar::SetBackEventListener(const Controls::_IActionEventListener& listener, int actionId) +{ + __backActionId = actionId; + __pBackEventListener = const_cast<_IActionEventListener*>(&listener); + + return; +} + +void +_Toolbar::SetMenuEventListener(const Controls::_IActionEventListener& listener, int actionId) +{ + __menuActionId = actionId; + __pMenuEventListener = const_cast<_IActionEventListener*>(&listener); + + return; +} + +result +_Toolbar::SetPresenter(const _ToolbarPresenter& toolbarPresenter) +{ + __pToolbarPresenter = const_cast<_ToolbarPresenter*>(&toolbarPresenter); + + return E_SUCCESS; +} + +_ToolbarPresenter* +_Toolbar::GetPresenter(void) const +{ + return __pToolbarPresenter; +} + +result +_Toolbar::ApplyUserGUI(ButtonType buttonType, _Button* pButton) +{ + SysTryReturnResult(NID_UI_CTRL, pButton, E_INVALID_ARG, "[E_INVALID_ARG] The pButton is invalid."); + + if (TOOLBAR_BUTTON == buttonType) + { + Bitmap* pNormalBackgroundBitmap = null; + Bitmap* pDisabledBackgroundBitmap = null; + Bitmap* pPressedBackgroundBitmap = null; + Bitmap* pHighlightedBackgroundBitmap = null; + + Bitmap* pNormalBackgroundEffectBitmap = null; + Bitmap* pDisabledBackgroundEffectBitmap = null; + Bitmap* pPressedBackgroundEffectBitmap = null; + Bitmap* pHighlightedBackgroundEffectBitmap = null; + + Bitmap* pColorReplacedBitmap = null; + + bool customTheme = false; + + if (__header == true) + { + if (__transparent == true) + { + GET_BITMAP_CONFIG_N(HEADER::BUTTON_TRANSLUCENT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pNormalBackgroundBitmap); + GET_BITMAP_CONFIG_N(HEADER::BUTTON_TRANSLUCENT_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pDisabledBackgroundBitmap); + GET_BITMAP_CONFIG_N(HEADER::BUTTON_TRANSLUCENT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pPressedBackgroundBitmap); + GET_BITMAP_CONFIG_N(HEADER::BUTTON_TRANSLUCENT_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pHighlightedBackgroundBitmap); + + customTheme = IS_CUSTOM_BITMAP(HEADER::BUTTON_TRANSLUCENT_BG_NORMAL); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::BUTTON_TRANSLUCENT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pNormalBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(HEADER::BUTTON_TRANSLUCENT_BG_DISABLED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::BUTTON_TRANSLUCENT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pDisabledBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(HEADER::BUTTON_TRANSLUCENT_BG_PRESSED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::BUTTON_TRANSLUCENT_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pPressedBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(HEADER::BUTTON_TRANSLUCENT_BG_HIGHLIGHTED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::BUTTON_TRANSLUCENT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pHighlightedBackgroundEffectBitmap); + } + } + else + { + GET_BITMAP_CONFIG_N(HEADER::BUTTON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pNormalBackgroundBitmap); + GET_BITMAP_CONFIG_N(HEADER::BUTTON_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pDisabledBackgroundBitmap); + GET_BITMAP_CONFIG_N(HEADER::BUTTON_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pPressedBackgroundBitmap); + GET_BITMAP_CONFIG_N(HEADER::BUTTON_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pHighlightedBackgroundBitmap); + + customTheme = IS_CUSTOM_BITMAP(HEADER::BUTTON_BG_NORMAL); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::BUTTON_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pNormalBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(HEADER::BUTTON_BG_DISABLED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::BUTTON_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pDisabledBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(HEADER::BUTTON_BG_PRESSED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::BUTTON_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pPressedBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(HEADER::BUTTON_BG_HIGHLIGHTED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::BUTTON_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pHighlightedBackgroundEffectBitmap); + } + } + } + else + { + if (__transparent == true) + { + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_TRANSLUCENT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pNormalBackgroundBitmap); + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_TRANSLUCENT_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pDisabledBackgroundBitmap); + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_TRANSLUCENT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pPressedBackgroundBitmap); + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_TRANSLUCENT_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pHighlightedBackgroundBitmap); + + customTheme = IS_CUSTOM_BITMAP(FOOTER::BUTTON_TRANSLUCENT_BG_NORMAL); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_TRANSLUCENT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pNormalBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(FOOTER::BUTTON_TRANSLUCENT_BG_DISABLED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_TRANSLUCENT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pDisabledBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(FOOTER::BUTTON_TRANSLUCENT_BG_PRESSED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_TRANSLUCENT_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pPressedBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(FOOTER::BUTTON_TRANSLUCENT_BG_HIGHLIGHTED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_TRANSLUCENT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pHighlightedBackgroundEffectBitmap); + } + } + else + { + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pNormalBackgroundBitmap); + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pDisabledBackgroundBitmap); + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pPressedBackgroundBitmap); + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pHighlightedBackgroundBitmap); + + customTheme = IS_CUSTOM_BITMAP(FOOTER::BUTTON_BG_NORMAL); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pNormalBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(FOOTER::BUTTON_BG_DISABLED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pDisabledBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(FOOTER::BUTTON_BG_PRESSED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pPressedBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(FOOTER::BUTTON_BG_HIGHLIGHTED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pHighlightedBackgroundEffectBitmap); + } + } + } + + if (__transparent == true) + { + pButton->SetTextColor(_BUTTON_STATUS_NORMAL, __buttonTransTextColor[_BUTTON_STATUS_NORMAL]); + pButton->SetTextColor(_BUTTON_STATUS_DISABLED, __buttonTransTextColor[_BUTTON_STATUS_DISABLED]); + pButton->SetTextColor(_BUTTON_STATUS_PRESSED, __buttonTransTextColor[_BUTTON_STATUS_PRESSED]); + pButton->SetTextColor(_BUTTON_STATUS_HIGHLIGHTED, __buttonTransTextColor[_BUTTON_STATUS_HIGHLIGHTED]); + + if (pNormalBackgroundBitmap) + { + pColorReplacedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pNormalBackgroundBitmap, + Color::GetColor(COLOR_ID_MAGENTA), __buttonTransBackgroundColor[_BUTTON_STATUS_NORMAL]); + pButton->SetBackgroundBitmap(_BUTTON_STATUS_NORMAL, *pColorReplacedBitmap); + + delete pColorReplacedBitmap; + delete pNormalBackgroundBitmap; + } + + if (pDisabledBackgroundBitmap) + { + pColorReplacedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDisabledBackgroundBitmap, + Color::GetColor(COLOR_ID_MAGENTA), __buttonTransBackgroundColor[_BUTTON_STATUS_DISABLED]); + pButton->SetBackgroundBitmap(_BUTTON_STATUS_DISABLED, *pColorReplacedBitmap); + + delete pColorReplacedBitmap; + delete pDisabledBackgroundBitmap; + } + + if (pPressedBackgroundBitmap) + { + pColorReplacedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pPressedBackgroundBitmap, + Color::GetColor(COLOR_ID_MAGENTA), __buttonTransBackgroundColor[_BUTTON_STATUS_PRESSED]); + pButton->SetBackgroundBitmap(_BUTTON_STATUS_PRESSED, *pColorReplacedBitmap); + + delete pColorReplacedBitmap; + delete pPressedBackgroundBitmap; + } + + if (pHighlightedBackgroundBitmap) + { + pColorReplacedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pHighlightedBackgroundBitmap, + Color::GetColor(COLOR_ID_MAGENTA), __buttonTransBackgroundColor[_BUTTON_STATUS_HIGHLIGHTED]); + pButton->SetBackgroundBitmap(_BUTTON_STATUS_HIGHLIGHTED, *pColorReplacedBitmap); + + delete pColorReplacedBitmap; + delete pHighlightedBackgroundBitmap; + } + } + else + { + pButton->SetTextColor(_BUTTON_STATUS_NORMAL, __buttonTextColor[_BUTTON_STATUS_NORMAL]); + pButton->SetTextColor(_BUTTON_STATUS_DISABLED, __buttonTextColor[_BUTTON_STATUS_DISABLED]); + pButton->SetTextColor(_BUTTON_STATUS_PRESSED, __buttonTextColor[_BUTTON_STATUS_PRESSED]); + pButton->SetTextColor(_BUTTON_STATUS_HIGHLIGHTED, __buttonTextColor[_BUTTON_STATUS_HIGHLIGHTED]); + + if (pNormalBackgroundBitmap) + { + pColorReplacedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pNormalBackgroundBitmap, + Color::GetColor(COLOR_ID_MAGENTA), __buttonBackgroundColor[_BUTTON_STATUS_NORMAL]); + pButton->SetBackgroundBitmap(_BUTTON_STATUS_NORMAL, *pColorReplacedBitmap); + + delete pColorReplacedBitmap; + delete pNormalBackgroundBitmap; + } + + if (pDisabledBackgroundBitmap) + { + pColorReplacedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDisabledBackgroundBitmap, + Color::GetColor(COLOR_ID_MAGENTA), __buttonBackgroundColor[_BUTTON_STATUS_DISABLED]); + pButton->SetBackgroundBitmap(_BUTTON_STATUS_DISABLED, *pColorReplacedBitmap); + + delete pColorReplacedBitmap; + delete pDisabledBackgroundBitmap; + } + + if (pPressedBackgroundBitmap) + { + pColorReplacedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pPressedBackgroundBitmap, + Color::GetColor(COLOR_ID_MAGENTA), __buttonBackgroundColor[_BUTTON_STATUS_PRESSED]); + pButton->SetBackgroundBitmap(_BUTTON_STATUS_PRESSED, *pColorReplacedBitmap); + + delete pColorReplacedBitmap; + delete pPressedBackgroundBitmap; + } + + if (pHighlightedBackgroundBitmap) + { + pColorReplacedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pHighlightedBackgroundBitmap, + Color::GetColor(COLOR_ID_MAGENTA), __buttonBackgroundColor[_BUTTON_STATUS_HIGHLIGHTED]); + pButton->SetBackgroundBitmap(_BUTTON_STATUS_HIGHLIGHTED, *pColorReplacedBitmap); + + delete pColorReplacedBitmap; + delete pHighlightedBackgroundBitmap; + } + } + + if (__style != TOOLBAR_SOFTKEY) + { + if (pNormalBackgroundEffectBitmap) + { + // pButton->SetBackgroundEffectBitmap(_BUTTON_STATUS_NORMAL, *pNormalBackgroundEffectBitmap); + delete pNormalBackgroundEffectBitmap; + } + if (pDisabledBackgroundEffectBitmap) + { + // pButton->SetBackgroundEffectBitmap(_BUTTON_STATUS_DISABLED, *pDisabledBackgroundEffectBitmap); + delete pDisabledBackgroundEffectBitmap; + } + if (pPressedBackgroundEffectBitmap) + { + pButton->SetBackgroundEffectBitmap(_BUTTON_STATUS_PRESSED, *pPressedBackgroundEffectBitmap); + delete pPressedBackgroundEffectBitmap; + } + if (pHighlightedBackgroundEffectBitmap) + { + // pButton->SetBackgroundEffectBitmap(_BUTTON_STATUS_HIGHLIGHTED, *pHighlightedBackgroundEffectBitmap); + delete pHighlightedBackgroundEffectBitmap; + } + } + + if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE) + { + Bitmap* pSubTitleEffectBitmap = null; + Bitmap* pReColorSubTitleEffectBitmap = null; + + Color subTitleEffectColor; + + GET_BITMAP_CONFIG_N(HEADER::SUB_TITLE_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, pSubTitleEffectBitmap); + GET_COLOR_CONFIG(HEADER::SUB_TITLE_EFFECT_NORMAL, subTitleEffectColor); + + pReColorSubTitleEffectBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pSubTitleEffectBitmap, Color::GetColor(COLOR_ID_MAGENTA), subTitleEffectColor); + + if (pReColorSubTitleEffectBitmap) + { + pButton->SetSubTitleEffectBitmap(*pReColorSubTitleEffectBitmap); + } + + delete pSubTitleEffectBitmap; + delete pReColorSubTitleEffectBitmap; + } + } //if (TOOLBAR_BUTTON == buttonType) + else if (TOOLBAR_ITEM == buttonType) + { + Bitmap* pNormalBackgroundBitmap = null; + Bitmap* pDisabledBackgroundBitmap = null; + Bitmap* pPressedBackgroundBitmap = null; + Bitmap* pHighlightedBackgroundBitmap = null; + Bitmap* pSelectedBackgroundBitmap = null; + + Bitmap* pNormalBackgroundEffectBitmap = null; + Bitmap* pDisabledBackgroundEffectBitmap = null; + Bitmap* pPressedBackgroundEffectBitmap = null; + Bitmap* pHighlightedBackgroundEffectBitmap = null; + Bitmap* pSelectedBackgroundEffectBitmap = null; + + Bitmap* pColorReplacedBitmap = null; + + bool customTheme = false; + + if (__style == TOOLBAR_TEXT || __style == TOOLBAR_ICON || __style == TOOLBAR_ICON_TEXT || __style == TOOLBAR_COMMAND) + { + if (__header == true) + { + if (__transparent == true) + { + GET_BITMAP_CONFIG_N(HEADER::BUTTON_ITEM_TRANSLUCENT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pNormalBackgroundBitmap); + GET_BITMAP_CONFIG_N(HEADER::BUTTON_ITEM_TRANSLUCENT_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pDisabledBackgroundBitmap); + GET_BITMAP_CONFIG_N(HEADER::BUTTON_ITEM_TRANSLUCENT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pPressedBackgroundBitmap); + GET_BITMAP_CONFIG_N(HEADER::BUTTON_ITEM_TRANSLUCENT_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pHighlightedBackgroundBitmap); + + customTheme = IS_CUSTOM_BITMAP(HEADER::BUTTON_ITEM_TRANSLUCENT_BG_NORMAL); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::BUTTON_ITEM_TRANSLUCENT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pNormalBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(HEADER::BUTTON_ITEM_TRANSLUCENT_BG_DISABLED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::BUTTON_ITEM_TRANSLUCENT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pDisabledBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(HEADER::BUTTON_ITEM_TRANSLUCENT_BG_PRESSED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::BUTTON_ITEM_TRANSLUCENT_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pPressedBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(HEADER::BUTTON_ITEM_TRANSLUCENT_BG_HIGHLIGHTED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::BUTTON_ITEM_TRANSLUCENT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pHighlightedBackgroundEffectBitmap); + } + } + else + { + GET_BITMAP_CONFIG_N(HEADER::BUTTON_ITEM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pNormalBackgroundBitmap); + GET_BITMAP_CONFIG_N(HEADER::BUTTON_ITEM_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pDisabledBackgroundBitmap); + GET_BITMAP_CONFIG_N(HEADER::BUTTON_ITEM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pPressedBackgroundBitmap); + GET_BITMAP_CONFIG_N(HEADER::BUTTON_ITEM_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pHighlightedBackgroundBitmap); + + customTheme = IS_CUSTOM_BITMAP(HEADER::BUTTON_ITEM_BG_NORMAL); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::BUTTON_ITEM_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pNormalBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(HEADER::BUTTON_ITEM_BG_DISABLED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::BUTTON_ITEM_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pDisabledBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(HEADER::BUTTON_ITEM_BG_PRESSED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::BUTTON_ITEM_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pPressedBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(HEADER::BUTTON_ITEM_BG_HIGHLIGHTED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::BUTTON_ITEM_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pHighlightedBackgroundEffectBitmap); + } + } + } + else + { + if (__transparent == true) + { + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_ITEM_TRANSLUCENT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pNormalBackgroundBitmap); + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_ITEM_TRANSLUCENT_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pDisabledBackgroundBitmap); + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_ITEM_TRANSLUCENT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pPressedBackgroundBitmap); + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_ITEM_TRANSLUCENT_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pHighlightedBackgroundBitmap); + + customTheme = IS_CUSTOM_BITMAP(FOOTER::BUTTON_ITEM_TRANSLUCENT_BG_NORMAL); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_ITEM_TRANSLUCENT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pNormalBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(FOOTER::BUTTON_ITEM_TRANSLUCENT_BG_DISABLED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_ITEM_TRANSLUCENT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pDisabledBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(FOOTER::BUTTON_ITEM_TRANSLUCENT_BG_PRESSED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_ITEM_TRANSLUCENT_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pPressedBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(FOOTER::BUTTON_ITEM_TRANSLUCENT_BG_HIGHLIGHTED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_ITEM_TRANSLUCENT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pHighlightedBackgroundEffectBitmap); + } + } + else + { + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_ITEM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pNormalBackgroundBitmap); + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_ITEM_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pDisabledBackgroundBitmap); + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_ITEM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pPressedBackgroundBitmap); + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_ITEM_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pHighlightedBackgroundBitmap); + + customTheme = IS_CUSTOM_BITMAP(FOOTER::BUTTON_ITEM_BG_NORMAL); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_ITEM_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pNormalBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(FOOTER::BUTTON_ITEM_BG_DISABLED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_ITEM_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pDisabledBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(FOOTER::BUTTON_ITEM_BG_PRESSED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_ITEM_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pPressedBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(FOOTER::BUTTON_ITEM_BG_HIGHLIGHTED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_ITEM_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pHighlightedBackgroundEffectBitmap); + } + } + } + } + else if (__style == TOOLBAR_HEADER_SEGMENTED || __style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE + || __style == TOOLBAR_SEGMENTED || __style == TOOLBAR_TITLE) + { + if (__header == true) + { + if (__transparent == true) + { + GET_BITMAP_CONFIG_N(HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pNormalBackgroundBitmap); + GET_BITMAP_CONFIG_N(HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pDisabledBackgroundBitmap); + GET_BITMAP_CONFIG_N(HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pPressedBackgroundBitmap); + GET_BITMAP_CONFIG_N(HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pHighlightedBackgroundBitmap); + GET_BITMAP_CONFIG_N(HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, pSelectedBackgroundBitmap); + + + customTheme = IS_CUSTOM_BITMAP(HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_NORMAL); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pNormalBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_DISABLED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pDisabledBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_PRESSED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pPressedBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_HIGHLIGHTED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pHighlightedBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_SELECTED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pSelectedBackgroundEffectBitmap); + } + } + else + { + GET_BITMAP_CONFIG_N(HEADER::SEGMENTED_ITEM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pNormalBackgroundBitmap); + GET_BITMAP_CONFIG_N(HEADER::SEGMENTED_ITEM_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pDisabledBackgroundBitmap); + GET_BITMAP_CONFIG_N(HEADER::SEGMENTED_ITEM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pPressedBackgroundBitmap); + GET_BITMAP_CONFIG_N(HEADER::SEGMENTED_ITEM_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pHighlightedBackgroundBitmap); + GET_BITMAP_CONFIG_N(HEADER::SEGMENTED_ITEM_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, pSelectedBackgroundBitmap); + + customTheme = IS_CUSTOM_BITMAP(HEADER::SEGMENTED_ITEM_BG_NORMAL); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::SEGMENTED_ITEM_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pNormalBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(HEADER::SEGMENTED_ITEM_BG_DISABLED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::SEGMENTED_ITEM_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pDisabledBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(HEADER::SEGMENTED_ITEM_BG_PRESSED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::SEGMENTED_ITEM_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pPressedBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(HEADER::SEGMENTED_ITEM_BG_HIGHLIGHTED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::SEGMENTED_ITEM_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pHighlightedBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(HEADER::SEGMENTED_ITEM_BG_SELECTED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::SEGMENTED_ITEM_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pSelectedBackgroundEffectBitmap); + } + } + } + else + { + if (__transparent == true) + { + GET_BITMAP_CONFIG_N(FOOTER::SEGMENTED_ITEM_TRANSLUCENT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pNormalBackgroundBitmap); + GET_BITMAP_CONFIG_N(FOOTER::SEGMENTED_ITEM_TRANSLUCENT_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pDisabledBackgroundBitmap); + GET_BITMAP_CONFIG_N(FOOTER::SEGMENTED_ITEM_TRANSLUCENT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pPressedBackgroundBitmap); + GET_BITMAP_CONFIG_N(FOOTER::SEGMENTED_ITEM_TRANSLUCENT_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pHighlightedBackgroundBitmap); + GET_BITMAP_CONFIG_N(FOOTER::SEGMENTED_ITEM_TRANSLUCENT_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, pSelectedBackgroundBitmap); + + customTheme = IS_CUSTOM_BITMAP(HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_NORMAL); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pNormalBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_DISABLED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pDisabledBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_PRESSED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pPressedBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_HIGHLIGHTED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pHighlightedBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_SELECTED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pSelectedBackgroundEffectBitmap); + } + } + else + { + GET_BITMAP_CONFIG_N(FOOTER::SEGMENTED_ITEM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pNormalBackgroundBitmap); + GET_BITMAP_CONFIG_N(FOOTER::SEGMENTED_ITEM_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pDisabledBackgroundBitmap); + GET_BITMAP_CONFIG_N(FOOTER::SEGMENTED_ITEM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pPressedBackgroundBitmap); + GET_BITMAP_CONFIG_N(FOOTER::SEGMENTED_ITEM_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pHighlightedBackgroundBitmap); + GET_BITMAP_CONFIG_N(FOOTER::SEGMENTED_ITEM_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, pSelectedBackgroundBitmap); + + customTheme = IS_CUSTOM_BITMAP(HEADER::SEGMENTED_ITEM_BG_NORMAL); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::SEGMENTED_ITEM_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pNormalBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(HEADER::SEGMENTED_ITEM_BG_DISABLED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::SEGMENTED_ITEM_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pDisabledBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(HEADER::SEGMENTED_ITEM_BG_PRESSED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::SEGMENTED_ITEM_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pPressedBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(HEADER::SEGMENTED_ITEM_BG_HIGHLIGHTED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::SEGMENTED_ITEM_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pHighlightedBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(HEADER::SEGMENTED_ITEM_BG_SELECTED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::SEGMENTED_ITEM_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pSelectedBackgroundEffectBitmap); + } + } + } + } + else if (__style == TOOLBAR_TAB || __style == TOOLBAR_TAB_WITH_TITLE || __style == TOOLBAR_TAB_LARGE) + { + if (__header == true) + { + if (__transparent == true) + { + GET_BITMAP_CONFIG_N(HEADER::TAB_ITEM_TRANSLUCENT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pNormalBackgroundBitmap); + GET_BITMAP_CONFIG_N(HEADER::TAB_ITEM_TRANSLUCENT_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pDisabledBackgroundBitmap); + GET_BITMAP_CONFIG_N(HEADER::TAB_ITEM_TRANSLUCENT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pPressedBackgroundBitmap); + GET_BITMAP_CONFIG_N(HEADER::TAB_ITEM_TRANSLUCENT_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pHighlightedBackgroundBitmap); + GET_BITMAP_CONFIG_N(HEADER::TAB_ITEM_TRANSLUCENT_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, pSelectedBackgroundBitmap); + + customTheme = IS_CUSTOM_BITMAP(HEADER::TAB_ITEM_TRANSLUCENT_BG_NORMAL); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::TAB_ITEM_TRANSLUCENT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pNormalBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(HEADER::TAB_ITEM_TRANSLUCENT_BG_DISABLED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::TAB_ITEM_TRANSLUCENT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pDisabledBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(HEADER::TAB_ITEM_TRANSLUCENT_BG_PRESSED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::TAB_ITEM_TRANSLUCENT_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pPressedBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(HEADER::TAB_ITEM_TRANSLUCENT_BG_HIGHLIGHTED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::TAB_ITEM_TRANSLUCENT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pHighlightedBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(HEADER::TAB_ITEM_TRANSLUCENT_BG_SELECTED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::TAB_ITEM_TRANSLUCENT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pSelectedBackgroundEffectBitmap); + } + } + else + { + GET_BITMAP_CONFIG_N(HEADER::TAB_ITEM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pNormalBackgroundBitmap); + GET_BITMAP_CONFIG_N(HEADER::TAB_ITEM_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pDisabledBackgroundBitmap); + GET_BITMAP_CONFIG_N(HEADER::TAB_ITEM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pPressedBackgroundBitmap); + GET_BITMAP_CONFIG_N(HEADER::TAB_ITEM_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pHighlightedBackgroundBitmap); + GET_BITMAP_CONFIG_N(HEADER::TAB_ITEM_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, pSelectedBackgroundBitmap); + + customTheme = IS_CUSTOM_BITMAP(HEADER::TAB_ITEM_BG_NORMAL); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::TAB_ITEM_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pNormalBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(HEADER::TAB_ITEM_BG_DISABLED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::TAB_ITEM_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pDisabledBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(HEADER::TAB_ITEM_BG_PRESSED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::TAB_ITEM_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pPressedBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(HEADER::TAB_ITEM_BG_HIGHLIGHTED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::TAB_ITEM_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pHighlightedBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(HEADER::TAB_ITEM_BG_SELECTED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::TAB_ITEM_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pSelectedBackgroundEffectBitmap); + } + } + } + else + { + if (__transparent == true) + { + GET_BITMAP_CONFIG_N(FOOTER::TAB_ITEM_TRANSLUCENT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pNormalBackgroundBitmap); + GET_BITMAP_CONFIG_N(FOOTER::TAB_ITEM_TRANSLUCENT_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pDisabledBackgroundBitmap); + GET_BITMAP_CONFIG_N(FOOTER::TAB_ITEM_TRANSLUCENT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pPressedBackgroundBitmap); + GET_BITMAP_CONFIG_N(FOOTER::TAB_ITEM_TRANSLUCENT_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pHighlightedBackgroundBitmap); + GET_BITMAP_CONFIG_N(FOOTER::TAB_ITEM_TRANSLUCENT_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, pSelectedBackgroundBitmap); + + customTheme = IS_CUSTOM_BITMAP(HEADER::TAB_ITEM_TRANSLUCENT_BG_NORMAL); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::TAB_ITEM_TRANSLUCENT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pNormalBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(HEADER::TAB_ITEM_TRANSLUCENT_BG_DISABLED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::TAB_ITEM_TRANSLUCENT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pDisabledBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(HEADER::TAB_ITEM_TRANSLUCENT_BG_PRESSED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::TAB_ITEM_TRANSLUCENT_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pPressedBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(HEADER::TAB_ITEM_TRANSLUCENT_BG_HIGHLIGHTED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::TAB_ITEM_TRANSLUCENT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pHighlightedBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(HEADER::TAB_ITEM_TRANSLUCENT_BG_SELECTED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::TAB_ITEM_TRANSLUCENT_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pSelectedBackgroundEffectBitmap); + } + } + else + { + GET_BITMAP_CONFIG_N(FOOTER::TAB_ITEM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pNormalBackgroundBitmap); + GET_BITMAP_CONFIG_N(FOOTER::TAB_ITEM_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, pDisabledBackgroundBitmap); + GET_BITMAP_CONFIG_N(FOOTER::TAB_ITEM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pPressedBackgroundBitmap); + GET_BITMAP_CONFIG_N(FOOTER::TAB_ITEM_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, pHighlightedBackgroundBitmap); + GET_BITMAP_CONFIG_N(FOOTER::TAB_ITEM_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, pSelectedBackgroundBitmap); + + customTheme = IS_CUSTOM_BITMAP(HEADER::TAB_ITEM_BG_NORMAL); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::TAB_ITEM_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pNormalBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(HEADER::TAB_ITEM_BG_DISABLED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::TAB_ITEM_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pDisabledBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(HEADER::TAB_ITEM_BG_PRESSED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::TAB_ITEM_BG_EFFECT_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, pPressedBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(HEADER::TAB_ITEM_BG_HIGHLIGHTED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::TAB_ITEM_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pHighlightedBackgroundEffectBitmap); + } + + customTheme = IS_CUSTOM_BITMAP(HEADER::TAB_ITEM_BG_SELECTED); + if (customTheme == false) + { + GET_BITMAP_CONFIG_N(HEADER::TAB_ITEM_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pSelectedBackgroundEffectBitmap); + } + } + } + } + + if (__transparent == true) + { + pButton->SetTextColor(_BUTTON_STATUS_NORMAL, __itemTransTextColor[_BUTTON_STATUS_NORMAL]); + pButton->SetTextColor(_BUTTON_STATUS_DISABLED, __itemTransTextColor[_BUTTON_STATUS_DISABLED]); + pButton->SetTextColor(_BUTTON_STATUS_PRESSED, __itemTransTextColor[_BUTTON_STATUS_PRESSED]); + pButton->SetTextColor(_BUTTON_STATUS_HIGHLIGHTED, __itemTransTextColor[_BUTTON_STATUS_HIGHLIGHTED]); + pButton->SetTextColor(_BUTTON_STATUS_SELECTED, __itemTransTextColor[_BUTTON_STATUS_SELECTED]); + + if (pNormalBackgroundBitmap) + { + pColorReplacedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pNormalBackgroundBitmap, + Color::GetColor(COLOR_ID_MAGENTA), __itemTransBackgroundColor[_BUTTON_STATUS_NORMAL]); + pButton->SetBackgroundBitmap(_BUTTON_STATUS_NORMAL, *pColorReplacedBitmap); + + delete pColorReplacedBitmap; + delete pNormalBackgroundBitmap; + } + + if (pDisabledBackgroundBitmap) + { + pColorReplacedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDisabledBackgroundBitmap, + Color::GetColor(COLOR_ID_MAGENTA), __itemTransBackgroundColor[_BUTTON_STATUS_DISABLED]); + pButton->SetBackgroundBitmap(_BUTTON_STATUS_DISABLED, *pColorReplacedBitmap); + + delete pColorReplacedBitmap; + delete pDisabledBackgroundBitmap; + } + + if (pPressedBackgroundBitmap) + { + pColorReplacedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pPressedBackgroundBitmap, + Color::GetColor(COLOR_ID_MAGENTA), __itemTransBackgroundColor[_BUTTON_STATUS_PRESSED]); + pButton->SetBackgroundBitmap(_BUTTON_STATUS_PRESSED, *pColorReplacedBitmap); + + delete pColorReplacedBitmap; + delete pPressedBackgroundBitmap; + } + + if (pHighlightedBackgroundBitmap) + { + pColorReplacedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pHighlightedBackgroundBitmap, + Color::GetColor(COLOR_ID_MAGENTA), __itemTransBackgroundColor[_BUTTON_STATUS_HIGHLIGHTED]); + pButton->SetBackgroundBitmap(_BUTTON_STATUS_HIGHLIGHTED, *pColorReplacedBitmap); + + delete pColorReplacedBitmap; + delete pHighlightedBackgroundBitmap; + } + + if (pSelectedBackgroundBitmap) + { + pColorReplacedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pSelectedBackgroundBitmap, + Color::GetColor(COLOR_ID_MAGENTA), __itemTransBackgroundColor[_BUTTON_STATUS_SELECTED]); + pButton->SetBackgroundBitmap(_BUTTON_STATUS_SELECTED, *pColorReplacedBitmap); + + delete pColorReplacedBitmap; + delete pSelectedBackgroundBitmap; + } + } + else + { + pButton->SetTextColor(_BUTTON_STATUS_NORMAL, __itemTextColor[_BUTTON_STATUS_NORMAL]); + pButton->SetTextColor(_BUTTON_STATUS_DISABLED, __itemTextColor[_BUTTON_STATUS_DISABLED]); + pButton->SetTextColor(_BUTTON_STATUS_PRESSED, __itemTextColor[_BUTTON_STATUS_PRESSED]); + pButton->SetTextColor(_BUTTON_STATUS_HIGHLIGHTED, __itemTextColor[_BUTTON_STATUS_HIGHLIGHTED]); + pButton->SetTextColor(_BUTTON_STATUS_SELECTED, __itemTextColor[_BUTTON_STATUS_SELECTED]); + + if (pNormalBackgroundBitmap) + { + pColorReplacedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pNormalBackgroundBitmap, + Color::GetColor(COLOR_ID_MAGENTA), __itemBackgroundColor[_BUTTON_STATUS_NORMAL]); + pButton->SetBackgroundBitmap(_BUTTON_STATUS_NORMAL, *pColorReplacedBitmap); + + delete pColorReplacedBitmap; + delete pNormalBackgroundBitmap; + } + + if (pDisabledBackgroundBitmap) + { + pColorReplacedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pDisabledBackgroundBitmap, + Color::GetColor(COLOR_ID_MAGENTA), __itemBackgroundColor[_BUTTON_STATUS_DISABLED]); + pButton->SetBackgroundBitmap(_BUTTON_STATUS_DISABLED, *pColorReplacedBitmap); + + delete pColorReplacedBitmap; + delete pDisabledBackgroundBitmap; + } + + if (pPressedBackgroundBitmap) + { + pColorReplacedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pPressedBackgroundBitmap, + Color::GetColor(COLOR_ID_MAGENTA), __itemBackgroundColor[_BUTTON_STATUS_PRESSED]); + pButton->SetBackgroundBitmap(_BUTTON_STATUS_PRESSED, *pColorReplacedBitmap); + + delete pColorReplacedBitmap; + delete pPressedBackgroundBitmap; + } + + if (pHighlightedBackgroundBitmap) + { + pColorReplacedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pHighlightedBackgroundBitmap, + Color::GetColor(COLOR_ID_MAGENTA), __itemBackgroundColor[_BUTTON_STATUS_HIGHLIGHTED]); + pButton->SetBackgroundBitmap(_BUTTON_STATUS_HIGHLIGHTED, *pColorReplacedBitmap); + + delete pColorReplacedBitmap; + delete pHighlightedBackgroundBitmap; + } + + if (pSelectedBackgroundBitmap) + { + pColorReplacedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pSelectedBackgroundBitmap, + Color::GetColor(COLOR_ID_MAGENTA), __itemBackgroundColor[_BUTTON_STATUS_SELECTED]); + pButton->SetBackgroundBitmap(_BUTTON_STATUS_SELECTED, *pColorReplacedBitmap); + + delete pColorReplacedBitmap; + delete pSelectedBackgroundBitmap; + } + } + + if (__style != TOOLBAR_SOFTKEY) + { + if (pNormalBackgroundEffectBitmap) + { + // pButton->SetBackgroundEffectBitmap(_BUTTON_STATUS_NORMAL, *pNormalBackgroundEffectBitmap); + delete pNormalBackgroundEffectBitmap; + } + if (pDisabledBackgroundEffectBitmap) + { + // pButton->SetBackgroundEffectBitmap(_BUTTON_STATUS_DISABLED, *pDisabledBackgroundEffectBitmap); + delete pDisabledBackgroundEffectBitmap; + } + if (pPressedBackgroundEffectBitmap) + { + pButton->SetBackgroundEffectBitmap(_BUTTON_STATUS_PRESSED, *pPressedBackgroundEffectBitmap); + delete pPressedBackgroundEffectBitmap; + } + if (pHighlightedBackgroundEffectBitmap) + { + // pButton->SetBackgroundEffectBitmap(_BUTTON_STATUS_HIGHLIGHTED, *pHighlightedBackgroundEffectBitmap); + delete pHighlightedBackgroundEffectBitmap; + } + if (pSelectedBackgroundEffectBitmap) + { + // pButton->SetBackgroundEffectBitmap(_BUTTON_STATUS_SELECTED, *pSelectedBackgroundEffectBitmap); + delete pSelectedBackgroundEffectBitmap; + } + } + + if (__style == TOOLBAR_TAB_LARGE || __style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_TAB_WITH_TITLE) + { + pButton->SetTabTextSlide(true); + + Bitmap* pTabTextDimLeftBitmap = null; + Bitmap* pTabTextDimRightBitmap = null; + Bitmap* pReColorTabTextDimLeftBitmap = null; + Bitmap* pReColorTabTextDimRightBitmap = null; + + Color tabTextDimColor; + + if (__header == true) + { + GET_BITMAP_CONFIG_N(HEADER::TAB_TEXT_DIM_EFFECT_LEFT, BITMAP_PIXEL_FORMAT_ARGB8888, pTabTextDimLeftBitmap); + GET_BITMAP_CONFIG_N(HEADER::TAB_TEXT_DIM_EFFECT_RIGHT, BITMAP_PIXEL_FORMAT_ARGB8888, pTabTextDimRightBitmap); + if (__transparent == true) + { + GET_COLOR_CONFIG(HEADER::TAB_TEXT_DIM_TRANSLUCENT_NORMAL, tabTextDimColor); + tabTextDimColor.SetAlpha(0x00); + } + else + { + GET_COLOR_CONFIG(HEADER::TAB_TEXT_DIM_NORMAL, tabTextDimColor); + tabTextDimColor.SetAlpha(0x00); + } + } + else + { + GET_BITMAP_CONFIG_N(FOOTER::TAB_TEXT_DIM_EFFECT_LEFT, BITMAP_PIXEL_FORMAT_ARGB8888, pTabTextDimLeftBitmap); + GET_BITMAP_CONFIG_N(FOOTER::TAB_TEXT_DIM_EFFECT_RIGHT, BITMAP_PIXEL_FORMAT_ARGB8888, pTabTextDimRightBitmap); + if (__transparent == true) + { + GET_COLOR_CONFIG(FOOTER::TAB_TEXT_DIM_TRANSLUCENT_NORMAL, tabTextDimColor); + tabTextDimColor.SetAlpha(0x00); + } + else + { + GET_COLOR_CONFIG(FOOTER::TAB_TEXT_DIM_NORMAL, tabTextDimColor); + tabTextDimColor.SetAlpha(0x00); + } + } + + pReColorTabTextDimLeftBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pTabTextDimLeftBitmap, Color::GetColor(COLOR_ID_MAGENTA), tabTextDimColor); + pReColorTabTextDimRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pTabTextDimRightBitmap, Color::GetColor(COLOR_ID_MAGENTA), tabTextDimColor); + + if (pReColorTabTextDimLeftBitmap) + { + pButton->SetTabTextDimLeftBitmap(*pReColorTabTextDimLeftBitmap); + } + + if (pReColorTabTextDimRightBitmap) + { + pButton->SetTabTextDimRightBitmap(*pReColorTabTextDimRightBitmap); + } + + delete pTabTextDimLeftBitmap; + delete pTabTextDimRightBitmap; + delete pReColorTabTextDimLeftBitmap; + delete pReColorTabTextDimRightBitmap; + } + + if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_TAB_WITH_TITLE) + { + Bitmap* pSubTitleEffectBitmap = null; + Bitmap* pReColorSubTitleEffectBitmap = null; + + Color subTitleEffectColor; + + GET_BITMAP_CONFIG_N(HEADER::SUB_TITLE_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, pSubTitleEffectBitmap); + GET_COLOR_CONFIG(HEADER::SUB_TITLE_EFFECT_NORMAL, subTitleEffectColor); + + pReColorSubTitleEffectBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pSubTitleEffectBitmap, Color::GetColor(COLOR_ID_MAGENTA), subTitleEffectColor); + + if (pReColorSubTitleEffectBitmap) + { + pButton->SetSubTitleEffectBitmap(*pReColorSubTitleEffectBitmap); + } + + delete pSubTitleEffectBitmap; + delete pReColorSubTitleEffectBitmap; + } + } //if (TOOLBAR_ITEM == buttonType) + + return E_SUCCESS; +} + +int +_Toolbar::CalculateMinimumToolbarWidth(void) +{ + float totalWidth = 0.0f; + float itemMinimumWidth = 0.0f; + float horizontalMargin = 0.0f; + + if (__header == true && __style == TOOLBAR_TEXT) + { + if (IsButtonSet(LEFT_BUTTON)) + { + //if (__pButtonItems[LEFT_BUTTON]->GetText().IsEmpty()) + //{ + GET_SHAPE_CONFIG(HEADER::BUTTON_ITEM_WIDTH, GetOrientation(), itemMinimumWidth); + //} + //else + //{ + // GET_SHAPE_CONFIG(HEADER::BUTTON_ITEM_WIDTH_WITH_TEXT, GetOrientation(), itemMinimumWidth); + //} + + totalWidth += itemMinimumWidth; + } + if (IsButtonSet(RIGHT_BUTTON)) + { + //if (__pButtonItems[RIGHT_BUTTON]->GetText().IsEmpty()) + //{ + GET_SHAPE_CONFIG(HEADER::BUTTON_ITEM_WIDTH, GetOrientation(), itemMinimumWidth); + //} + //else + //{ + // GET_SHAPE_CONFIG(HEADER::BUTTON_ITEM_WIDTH_WITH_TEXT, GetOrientation(), itemMinimumWidth); + //} + + totalWidth += itemMinimumWidth; + } + } + else // footer or HEADER_TITLE_BUTTON + { + if (IsButtonSet(LEFT_BUTTON)) + { + GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_WIDTH, GetOrientation(), itemMinimumWidth); + totalWidth += itemMinimumWidth; + } + + if (IsButtonSet(RIGHT_BUTTON)) + { + GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_WIDTH, GetOrientation(), itemMinimumWidth); + totalWidth += itemMinimumWidth; + } + } + + if (__style == TOOLBAR_TITLE) + { + GET_SHAPE_CONFIG(HEADER::TITLE_MINIMUM_WIDTH, GetOrientation(), itemMinimumWidth); + totalWidth += itemMinimumWidth; + } + else if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_HEADER_SEGMENTED) + { + GET_SHAPE_CONFIG(HEADER::ITEM_MINIMUM_WIDTH, GetOrientation(), itemMinimumWidth); + GET_SHAPE_CONFIG(HEADER::COMMON_MINIMUM_MARGIN, GetOrientation(), horizontalMargin); + totalWidth += itemMinimumWidth * __itemCount + horizontalMargin * 2; + } + else if (__style == TOOLBAR_SEGMENTED) + { + GET_SHAPE_CONFIG(FOOTER::ITEM_MINIMUM_WIDTH, GetOrientation(), itemMinimumWidth); + GET_SHAPE_CONFIG(FOOTER::COMMON_MINIMUM_MARGIN, GetOrientation(), horizontalMargin); + totalWidth += itemMinimumWidth * __itemCount + horizontalMargin * 2; + } + else + { + GET_SHAPE_CONFIG(FOOTER::ITEM_MINIMUM_WIDTH, GetOrientation(), itemMinimumWidth); + + if ((__style == TOOLBAR_TAB || __style == TOOLBAR_TAB_WITH_TITLE || __style == TOOLBAR_TAB_LARGE) && __itemCount > 4) + { + totalWidth += itemMinimumWidth * 4; + } + else + { + totalWidth += itemMinimumWidth * __itemCount; + } + } + + return totalWidth; +} + +float +_Toolbar::CalculateMinimumToolbarWidthF(void) +{ + float totalWidth = 0.0f; + float itemMinimumWidth = 0.0f; + float horizontalMargin = 0.0f; + + if (__header == true && __style == TOOLBAR_TEXT) + { + if (IsButtonSet(LEFT_BUTTON)) + { + //if (__pButtonItems[LEFT_BUTTON]->GetText().IsEmpty()) + //{ + GET_SHAPE_CONFIG(HEADER::BUTTON_ITEM_WIDTH, GetOrientation(), itemMinimumWidth); + //} + //else + //{ + // GET_SHAPE_CONFIG(HEADER::BUTTON_ITEM_WIDTH_WITH_TEXT, GetOrientation(), itemMinimumWidth); + //} + + totalWidth += itemMinimumWidth; + } + if (IsButtonSet(RIGHT_BUTTON)) + { + //if (__pButtonItems[RIGHT_BUTTON]->GetText().IsEmpty()) + //{ + GET_SHAPE_CONFIG(HEADER::BUTTON_ITEM_WIDTH, GetOrientation(), itemMinimumWidth); + //} + //else + //{ + // GET_SHAPE_CONFIG(HEADER::BUTTON_ITEM_WIDTH_WITH_TEXT, GetOrientation(), itemMinimumWidth); + //} + + totalWidth += itemMinimumWidth; + } + } + else // footer or HEADER_TITLE_BUTTON + { + if (IsButtonSet(LEFT_BUTTON)) + { + GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_WIDTH, GetOrientation(), itemMinimumWidth); + totalWidth += itemMinimumWidth; + } + + if (IsButtonSet(RIGHT_BUTTON)) + { + GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_WIDTH, GetOrientation(), itemMinimumWidth); + totalWidth += itemMinimumWidth; + } + } + + if (__style == TOOLBAR_TITLE) + { + GET_SHAPE_CONFIG(HEADER::TITLE_MINIMUM_WIDTH, GetOrientation(), itemMinimumWidth); + totalWidth += itemMinimumWidth; + } + else if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_HEADER_SEGMENTED) + { + GET_SHAPE_CONFIG(HEADER::ITEM_MINIMUM_WIDTH, GetOrientation(), itemMinimumWidth); + GET_SHAPE_CONFIG(HEADER::COMMON_MINIMUM_MARGIN, GetOrientation(), horizontalMargin); + totalWidth += itemMinimumWidth * __itemCount + horizontalMargin * 2; + } + else if (__style == TOOLBAR_SEGMENTED) + { + GET_SHAPE_CONFIG(FOOTER::ITEM_MINIMUM_WIDTH, GetOrientation(), itemMinimumWidth); + GET_SHAPE_CONFIG(FOOTER::COMMON_MINIMUM_MARGIN, GetOrientation(), horizontalMargin); + totalWidth += itemMinimumWidth * __itemCount + horizontalMargin * 2; + } + else + { + GET_SHAPE_CONFIG(FOOTER::ITEM_MINIMUM_WIDTH, GetOrientation(), itemMinimumWidth); + + if ((__style == TOOLBAR_TAB || __style == TOOLBAR_TAB_WITH_TITLE || __style == TOOLBAR_TAB_LARGE) && __itemCount > 4) + { + totalWidth += itemMinimumWidth * 4; + } + else + { + totalWidth += itemMinimumWidth * __itemCount; + } + } + + return totalWidth; +} + +result +_Toolbar::RealignItem(_Button* pButton, float textExtentSize) +{ + SysTryReturnResult(NID_UI_CTRL, pButton, E_INVALID_STATE, "[E_INVALID_STATE] pButton doesn't exist."); + + float buttonItemWidth = pButton->GetSizeF().width; + float buttonItemHeight = pButton->GetSizeF().height; + float sideMargin = 0.0f; + float buttonTextTopMargin = 0.0f; + float iconTextGap = 0.0f; + float contentLength = 0.0f; + float segmentedTextAreaHeight = 0.0f; + float revisedTopMargin = 5.0f; + float largeTabTopMargin = 0.0f; + float largeTabTextHeight = 0.0f; + + GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_TEXT_LEFT_MARGIN, GetOrientation(), sideMargin); + GET_SHAPE_CONFIG(HEADER::ICON_TEXT_GAP, GetOrientation(), iconTextGap); + GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_HEIGHT, GetOrientation(), segmentedTextAreaHeight); + GET_SHAPE_CONFIG(HEADER::TAB_LARGE_TOP_MARGIN, GetOrientation(), largeTabTopMargin); + GET_SHAPE_CONFIG(HEADER::TAB_LARGE_TEXT_HEIGHT, GetOrientation(), largeTabTextHeight); + + if (__style == TOOLBAR_TEXT || __style == TOOLBAR_ICON || __style == TOOLBAR_ICON_TEXT || __style == TOOLBAR_COMMAND) + { + GET_SHAPE_CONFIG(FOOTER::FOOTER_ITEM_BUTTON_STYLE_SIDE_MARGIN, GetOrientation(), sideMargin); + GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_TEXT_TOP_MARGIN, GetOrientation(), buttonTextTopMargin); + } + else if (__style == TOOLBAR_HEADER_SEGMENTED || __style == TOOLBAR_SEGMENTED || __style == TOOLBAR_TAB || __style == TOOLBAR_TAB_LARGE) + { + GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_TEXT_LEFT_MARGIN, GetOrientation(), sideMargin); + + buttonTextTopMargin = (buttonItemHeight - segmentedTextAreaHeight) / 2 - revisedTopMargin; + } + else if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_TAB_WITH_TITLE) + { + GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_TEXT_LEFT_MARGIN, GetOrientation(), sideMargin); + + buttonTextTopMargin = 0; + } + + if (pButton->GetText() != L"") + { + float iconAreaWidth = 0.0f; + + if (pButton->GetBitmap(_BUTTON_STATUS_NORMAL) != null) + { + iconAreaWidth = pButton->GetBitmap(_BUTTON_STATUS_NORMAL)->GetWidthF(); + contentLength = iconAreaWidth + iconTextGap + textExtentSize; + + if (contentLength > buttonItemWidth - sideMargin * 2) + { + contentLength = buttonItemWidth - sideMargin * 2; + } + + if (__style == TOOLBAR_TAB_LARGE) + { + pButton->SetBitmap(_BUTTON_STATUS_NORMAL, + FloatPoint((buttonItemWidth - iconAreaWidth) / 2, largeTabTopMargin), + *(pButton->GetBitmap(_BUTTON_STATUS_NORMAL))); + } + else + { + pButton->SetBitmap(_BUTTON_STATUS_NORMAL, + FloatPoint((buttonItemWidth - contentLength) / 2, (buttonItemHeight - (pButton->GetBitmap(_BUTTON_STATUS_NORMAL))->GetHeightF()) / 2), + *(pButton->GetBitmap(_BUTTON_STATUS_NORMAL))); + } + } + if (pButton->GetBitmap(_BUTTON_STATUS_PRESSED) != null) + { + iconAreaWidth = pButton->GetBitmap(_BUTTON_STATUS_PRESSED)->GetWidthF(); + contentLength = iconAreaWidth + iconTextGap + textExtentSize; + + if (contentLength > buttonItemWidth - sideMargin * 2) + { + contentLength = buttonItemWidth - sideMargin * 2; + } + + if (__style == TOOLBAR_TAB_LARGE) + { + pButton->SetBitmap(_BUTTON_STATUS_PRESSED, + FloatPoint((buttonItemWidth - iconAreaWidth) / 2, largeTabTopMargin), + *(pButton->GetBitmap(_BUTTON_STATUS_PRESSED))); + } + else + { + pButton->SetBitmap(_BUTTON_STATUS_PRESSED, + FloatPoint((buttonItemWidth - contentLength) / 2, (buttonItemHeight - (pButton->GetBitmap(_BUTTON_STATUS_PRESSED))->GetHeightF()) / 2), + *(pButton->GetBitmap(_BUTTON_STATUS_PRESSED))); + } + } + if (pButton->GetBitmap(_BUTTON_STATUS_SELECTED) != null) + { + iconAreaWidth = pButton->GetBitmap(_BUTTON_STATUS_SELECTED)->GetWidthF(); + contentLength = iconAreaWidth + iconTextGap + textExtentSize; + + if (contentLength > buttonItemWidth - sideMargin * 2) + { + contentLength = buttonItemWidth - sideMargin * 2; + } + + if (__style == TOOLBAR_TAB_LARGE) + { + pButton->SetBitmap(_BUTTON_STATUS_SELECTED, + FloatPoint((buttonItemWidth - iconAreaWidth) / 2, largeTabTopMargin), + *(pButton->GetBitmap(_BUTTON_STATUS_SELECTED))); + } + else + { + pButton->SetBitmap(_BUTTON_STATUS_SELECTED, + FloatPoint((buttonItemWidth - contentLength) / 2, (buttonItemHeight - (pButton->GetBitmap(_BUTTON_STATUS_SELECTED))->GetHeightF()) / 2), + *(pButton->GetBitmap(_BUTTON_STATUS_SELECTED))); + } + } + if (pButton->GetBitmap(_BUTTON_STATUS_HIGHLIGHTED) != null) + { + iconAreaWidth = pButton->GetBitmap(_BUTTON_STATUS_HIGHLIGHTED)->GetWidthF(); + contentLength = iconAreaWidth + iconTextGap + textExtentSize; + + if (contentLength > buttonItemWidth - sideMargin * 2) + { + contentLength = buttonItemWidth - sideMargin * 2; + } + + if (__style == TOOLBAR_TAB_LARGE) + { + pButton->SetBitmap(_BUTTON_STATUS_HIGHLIGHTED, + FloatPoint((buttonItemWidth - iconAreaWidth) / 2, largeTabTopMargin), + *(pButton->GetBitmap(_BUTTON_STATUS_HIGHLIGHTED))); + } + else + { + pButton->SetBitmap(_BUTTON_STATUS_HIGHLIGHTED, + FloatPoint((buttonItemWidth - contentLength) / 2, (buttonItemHeight - (pButton->GetBitmap(_BUTTON_STATUS_HIGHLIGHTED))->GetHeightF()) / 2), + *(pButton->GetBitmap(_BUTTON_STATUS_HIGHLIGHTED))); + } + } + if (pButton->GetBitmap(_BUTTON_STATUS_DISABLED) != null) + { + iconAreaWidth = pButton->GetBitmap(_BUTTON_STATUS_DISABLED)->GetWidthF(); + contentLength = iconAreaWidth + iconTextGap + textExtentSize; + + if (contentLength > buttonItemWidth - sideMargin * 2) + { + contentLength = buttonItemWidth - sideMargin * 2; + } + + if (__style == TOOLBAR_TAB_LARGE) + { + pButton->SetBitmap(_BUTTON_STATUS_DISABLED, + FloatPoint((buttonItemWidth - iconAreaWidth) / 2, largeTabTopMargin), + *(pButton->GetBitmap(_BUTTON_STATUS_DISABLED))); + } + else + { + pButton->SetBitmap(_BUTTON_STATUS_DISABLED, + FloatPoint((buttonItemWidth - contentLength) / 2, (buttonItemHeight - (pButton->GetBitmap(_BUTTON_STATUS_DISABLED))->GetHeightF()) / 2), + *(pButton->GetBitmap(_BUTTON_STATUS_DISABLED))); + } + } + + if (iconAreaWidth != 0) + { + if (__style == TOOLBAR_TAB_LARGE) + { + pButton->SetTextHorizontalAlignment(ALIGNMENT_CENTER); + pButton->SetUserDefinedTextArea(FloatRectangle(sideMargin, largeTabTopMargin + iconAreaWidth, + buttonItemWidth - sideMargin * 2, largeTabTextHeight)); + } + else if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_TAB_WITH_TITLE) + { + pButton->SetTextHorizontalAlignment(ALIGNMENT_LEFT); + pButton->SetUserDefinedTextArea(FloatRectangle((buttonItemWidth - contentLength) / 2 + iconAreaWidth + iconTextGap, (buttonItemHeight - largeTabTextHeight) / 2, + buttonItemWidth - iconAreaWidth - iconTextGap - sideMargin * 2, largeTabTextHeight)); + } + else + { + pButton->SetTextHorizontalAlignment(ALIGNMENT_LEFT); + pButton->SetUserDefinedTextArea(FloatRectangle((buttonItemWidth - contentLength) / 2 + iconAreaWidth + iconTextGap, + buttonTextTopMargin, buttonItemWidth - iconAreaWidth - iconTextGap - sideMargin * 2, buttonItemHeight - buttonTextTopMargin * 2)); + } + } + else + { + if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_TAB_WITH_TITLE) + { + pButton->SetUserDefinedTextArea(FloatRectangle(sideMargin, (buttonItemHeight - largeTabTextHeight) / 2, + buttonItemWidth - sideMargin * 2, largeTabTextHeight)); + } + else + { + pButton->SetUserDefinedTextArea(FloatRectangle(sideMargin, buttonTextTopMargin, buttonItemWidth - sideMargin * 2, buttonItemHeight - buttonTextTopMargin * 2)); + } + } + } + else + { + if (pButton->GetBitmap(_BUTTON_STATUS_NORMAL) != null) + { + pButton->SetBitmap(_BUTTON_STATUS_NORMAL, + FloatPoint((buttonItemWidth - (pButton->GetBitmap(_BUTTON_STATUS_NORMAL))->GetWidthF()) / 2, + (buttonItemHeight - (pButton->GetBitmap(_BUTTON_STATUS_NORMAL))->GetHeightF()) / 2), + *(pButton->GetBitmap(_BUTTON_STATUS_NORMAL))); + } + if (pButton->GetBitmap(_BUTTON_STATUS_PRESSED) != null) + { + pButton->SetBitmap(_BUTTON_STATUS_PRESSED, + FloatPoint((buttonItemWidth - (pButton->GetBitmap(_BUTTON_STATUS_PRESSED))->GetWidthF()) / 2, + (buttonItemHeight - (pButton->GetBitmap(_BUTTON_STATUS_PRESSED))->GetHeightF()) / 2), + *(pButton->GetBitmap(_BUTTON_STATUS_PRESSED))); + } + if (pButton->GetBitmap(_BUTTON_STATUS_HIGHLIGHTED) != null) + { + pButton->SetBitmap(_BUTTON_STATUS_HIGHLIGHTED, + FloatPoint((buttonItemWidth - (pButton->GetBitmap(_BUTTON_STATUS_HIGHLIGHTED))->GetWidthF()) / 2, + (buttonItemHeight - (pButton->GetBitmap(_BUTTON_STATUS_HIGHLIGHTED))->GetHeightF()) / 2), + *(pButton->GetBitmap(_BUTTON_STATUS_HIGHLIGHTED))); + } + if (pButton->GetBitmap(_BUTTON_STATUS_DISABLED) != null) + { + pButton->SetBitmap(_BUTTON_STATUS_DISABLED, + FloatPoint((buttonItemWidth - (pButton->GetBitmap(_BUTTON_STATUS_DISABLED))->GetWidthF()) / 2, + (buttonItemHeight - (pButton->GetBitmap(_BUTTON_STATUS_DISABLED))->GetHeightF()) / 2), + *(pButton->GetBitmap(_BUTTON_STATUS_DISABLED))); + } + if (pButton->GetBitmap(_BUTTON_STATUS_SELECTED) != null) + { + pButton->SetBitmap(_BUTTON_STATUS_SELECTED, + FloatPoint((buttonItemWidth - (pButton->GetBitmap(_BUTTON_STATUS_SELECTED))->GetWidthF()) / 2, + (buttonItemHeight - (pButton->GetBitmap(_BUTTON_STATUS_SELECTED))->GetHeightF()) / 2), + *(pButton->GetBitmap(_BUTTON_STATUS_SELECTED))); + } + + pButton->SetMargin(sideMargin, buttonTextTopMargin, sideMargin, buttonTextTopMargin); + } + + return E_SUCCESS; +} + +result +_Toolbar::RealignButtonItem(_Button* pButton) +{ + SysTryReturnResult(NID_UI_CTRL, pButton, E_INVALID_STATE, "[E_INVALID_STATE] pButton doesn't exist."); + + float buttonItemWidth = pButton->GetSizeF().width; + float buttonItemHeight = pButton->GetSizeF().height; + + if (pButton->GetBitmap(_BUTTON_STATUS_NORMAL) != null) + { + pButton->SetBitmap(_BUTTON_STATUS_NORMAL, + FloatPoint((buttonItemWidth - (pButton->GetBitmap(_BUTTON_STATUS_NORMAL))->GetWidthF()) / 2, + (buttonItemHeight - (pButton->GetBitmap(_BUTTON_STATUS_NORMAL))->GetHeightF()) / 2), + *(pButton->GetBitmap(_BUTTON_STATUS_NORMAL))); + } + if (pButton->GetBitmap(_BUTTON_STATUS_PRESSED) != null) + { + pButton->SetBitmap(_BUTTON_STATUS_PRESSED, + FloatPoint((buttonItemWidth - (pButton->GetBitmap(_BUTTON_STATUS_PRESSED))->GetWidthF()) / 2, + (buttonItemHeight - (pButton->GetBitmap(_BUTTON_STATUS_PRESSED))->GetHeightF()) / 2), + *(pButton->GetBitmap(_BUTTON_STATUS_PRESSED))); + } + if (pButton->GetBitmap(_BUTTON_STATUS_HIGHLIGHTED) != null) + { + pButton->SetBitmap(_BUTTON_STATUS_HIGHLIGHTED, + FloatPoint((buttonItemWidth - (pButton->GetBitmap(_BUTTON_STATUS_HIGHLIGHTED))->GetWidthF()) / 2, + (buttonItemHeight - (pButton->GetBitmap(_BUTTON_STATUS_HIGHLIGHTED))->GetHeightF()) / 2), + *(pButton->GetBitmap(_BUTTON_STATUS_HIGHLIGHTED))); + } + if (pButton->GetBitmap(_BUTTON_STATUS_DISABLED) != null) + { + pButton->SetBitmap(_BUTTON_STATUS_DISABLED, + FloatPoint((buttonItemWidth - (pButton->GetBitmap(_BUTTON_STATUS_DISABLED))->GetWidthF()) / 2, + (buttonItemHeight - (pButton->GetBitmap(_BUTTON_STATUS_DISABLED))->GetHeightF()) / 2), + *(pButton->GetBitmap(_BUTTON_STATUS_DISABLED))); + } + if (pButton->GetBitmap(_BUTTON_STATUS_SELECTED) != null) + { + pButton->SetBitmap(_BUTTON_STATUS_SELECTED, + FloatPoint((buttonItemWidth - (pButton->GetBitmap(_BUTTON_STATUS_SELECTED))->GetWidthF()) / 2, + (buttonItemHeight - (pButton->GetBitmap(_BUTTON_STATUS_SELECTED))->GetHeightF()) / 2), + *(pButton->GetBitmap(_BUTTON_STATUS_SELECTED))); + } + + if (pButton->GetEffectBitmap(_BUTTON_STATUS_NORMAL) != null) + { + pButton->SetEffectBitmap(_BUTTON_STATUS_NORMAL, + FloatPoint((buttonItemWidth - (pButton->GetEffectBitmap(_BUTTON_STATUS_NORMAL))->GetWidthF()) / 2, + (buttonItemHeight - (pButton->GetEffectBitmap(_BUTTON_STATUS_NORMAL))->GetHeightF()) / 2), + *(pButton->GetEffectBitmap(_BUTTON_STATUS_NORMAL))); + } + + if (pButton->GetEffectBitmap(_BUTTON_STATUS_PRESSED) != null) + { + pButton->SetEffectBitmap(_BUTTON_STATUS_PRESSED, + FloatPoint((buttonItemWidth - (pButton->GetEffectBitmap(_BUTTON_STATUS_PRESSED))->GetWidthF()) / 2, + (buttonItemHeight - (pButton->GetEffectBitmap(_BUTTON_STATUS_PRESSED))->GetHeightF()) / 2), + *(pButton->GetEffectBitmap(_BUTTON_STATUS_PRESSED))); + } + if (pButton->GetEffectBitmap(_BUTTON_STATUS_HIGHLIGHTED) != null) + { + pButton->SetEffectBitmap(_BUTTON_STATUS_HIGHLIGHTED, + FloatPoint((buttonItemWidth - (pButton->GetEffectBitmap(_BUTTON_STATUS_HIGHLIGHTED))->GetWidthF()) / 2, + (buttonItemHeight - (pButton->GetEffectBitmap(_BUTTON_STATUS_HIGHLIGHTED))->GetHeightF()) / 2), + *(pButton->GetEffectBitmap(_BUTTON_STATUS_HIGHLIGHTED))); + } + if (pButton->GetEffectBitmap(_BUTTON_STATUS_DISABLED) != null) + { + pButton->SetEffectBitmap(_BUTTON_STATUS_DISABLED, + FloatPoint((buttonItemWidth - (pButton->GetEffectBitmap(_BUTTON_STATUS_DISABLED))->GetWidthF()) / 2, + (buttonItemHeight - (pButton->GetEffectBitmap(_BUTTON_STATUS_DISABLED))->GetHeightF()) / 2), + *(pButton->GetEffectBitmap(_BUTTON_STATUS_DISABLED))); + } + if (pButton->GetEffectBitmap(_BUTTON_STATUS_SELECTED) != null) + { + pButton->SetEffectBitmap(_BUTTON_STATUS_SELECTED, + FloatPoint((buttonItemWidth - (pButton->GetEffectBitmap(_BUTTON_STATUS_SELECTED))->GetWidthF()) / 2, + (buttonItemHeight - (pButton->GetEffectBitmap(_BUTTON_STATUS_SELECTED))->GetHeightF()) / 2), + *(pButton->GetEffectBitmap(_BUTTON_STATUS_SELECTED))); + } + + return E_SUCCESS; +} + +result +_Toolbar::RearrangeItems(void) +{ + __titleTextArea = _Control::GetBoundsF(); + + const FloatDimension portraitSize = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF(); + const FloatDimension landscapeSize = FloatDimension(portraitSize.height, portraitSize.width); + + if (CalculateMinimumToolbarWidth() > __titleTextArea.width) + { + __titleTextArea.width = CalculateMinimumToolbarWidth(); + } + + if (GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT) + { + if (__titleTextArea.width > portraitSize.width) + { + __titleTextArea.width = portraitSize.width; + } + } + else + { + if (__titleTextArea.width > landscapeSize.width) + { + __titleTextArea.width = landscapeSize.width; + } + } + + __itemArea = __titleTextArea; + + if (__header == true && __style != TOOLBAR_TEXT) // right align + { + float headerLeftButtonWidth = 0.0f; + float headerRightButtonWidth = 0.0f; + float headerTopMargin = 0.0f; + float vmargin = 0.0f; + float buttonItemGap = 0.0f; + float headerButtonItemHeight = 0.0f; + float headerLeftMargin = 0.0f; + float headerRightMargin = 0.0f; + + GET_SHAPE_CONFIG(HEADER::TOP_MARGIN, GetOrientation(), headerTopMargin); + GET_SHAPE_CONFIG(HEADER::BUTTON_ITEM_GAP, GetOrientation(), buttonItemGap); + GET_SHAPE_CONFIG(HEADER::LEFT_MARGIN, GetOrientation(), headerLeftMargin); + GET_SHAPE_CONFIG(HEADER::RIGHT_MARGIN, GetOrientation(), headerRightMargin); + + if (__pButtonItems[LEFT_BUTTON]) + { + headerLeftButtonWidth = CoordinateSystem::AlignToDevice(__pButtonItems[LEFT_BUTTON]->GetSizeF()).width; + } + + if (__pButtonItems[RIGHT_BUTTON]) + { + headerRightButtonWidth = CoordinateSystem::AlignToDevice(__pButtonItems[RIGHT_BUTTON]->GetSizeF()).width; + } + + if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE) + { + GET_SHAPE_CONFIG(HEADER::TITLE_HEIGHT_WITH_SEGMENTED_ITEM, GetOrientation(), vmargin); + GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_HEIGHT, GetOrientation(), headerButtonItemHeight); + __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 + { + GET_SHAPE_CONFIG(HEADER::BUTTON_ITEM_TOP_MARGIN, GetOrientation(), vmargin); + GET_SHAPE_CONFIG(HEADER::BUTTON_ITEM_HEIGHT, GetOrientation(), headerButtonItemHeight); + } + + __titleTextArea.x = headerLeftMargin; + __titleTextArea.y = headerTopMargin; + + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__pButtonItems[LEFT_BUTTON]) + { + __pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth, vmargin, + headerRightButtonWidth, headerButtonItemHeight)); + __pButtonItems[LEFT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth - buttonItemGap - headerLeftButtonWidth , vmargin, + headerLeftButtonWidth, headerButtonItemHeight)); + + if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE) + { + __itemArea.width -= (headerLeftButtonWidth + buttonItemGap + headerRightButtonWidth); + } + else + { + __titleTextArea.width -= (headerLeftButtonWidth + buttonItemGap + headerRightButtonWidth); + + if (__style != TOOLBAR_TAB_WITH_TITLE) + { + __itemArea.width -= (headerLeftButtonWidth + buttonItemGap + headerRightButtonWidth); + } + } + } + else + { + __pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerRightButtonWidth, vmargin, + headerRightButtonWidth, headerButtonItemHeight)); + + if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE) + { + __itemArea.width -= (headerRightButtonWidth); + } + else + { + __titleTextArea.width -= (headerRightButtonWidth); + + if (__style != TOOLBAR_TAB_WITH_TITLE) + { + __itemArea.width -= (headerRightButtonWidth); + } + } + } + } + else if (__pButtonItems[LEFT_BUTTON]) + { + __pButtonItems[LEFT_BUTTON]->SetBounds(FloatRectangle(__titleTextArea.width - headerLeftButtonWidth, vmargin, + headerLeftButtonWidth, headerButtonItemHeight)); + + if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE) + { + __itemArea.width -= (headerLeftButtonWidth); + } + else + { + __titleTextArea.width -= (headerLeftButtonWidth); + + if (__style != TOOLBAR_TAB_WITH_TITLE) + { + __itemArea.width -= (headerLeftButtonWidth); + } + } + } + + if ((__style == TOOLBAR_HEADER_SEGMENTED || __style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE) + && __pButtonItems[LEFT_BUTTON] == null && __pButtonItems[RIGHT_BUTTON] == null) + { + // segment style with no button's right margin is same as left + __titleTextArea.width -= (headerLeftMargin + headerRightMargin); + __itemArea.width -= (headerLeftMargin + headerLeftMargin); + } + else if (!(__style == TOOLBAR_TAB || __style == TOOLBAR_TAB_WITH_TITLE || __style == TOOLBAR_TAB_LARGE)) + { + __titleTextArea.width -= (headerLeftMargin + headerRightMargin); + __itemArea.width -= (headerLeftMargin + headerRightMargin); + } + + if (__style == TOOLBAR_TAB_WITH_TITLE) + { + __titleTextArea.width -= (headerLeftMargin + headerRightMargin); + } + + float processingAnimationIconSize = 0.0f; + + GET_SHAPE_CONFIG(HEADER::PROCESSING_ANIMATION_ICON_SIZE, GetOrientation(), processingAnimationIconSize); + + if (__pButtonItems[LEFT_BUTTON] && GetWaitingAnimationStatus(TOOLBAR_ANIMATION_POSITION_BUTTON_LEFT) != ANIMATION_STOPPED) + { + SetWaitingAnimationPosition(TOOLBAR_ANIMATION_POSITION_BUTTON_LEFT, + (__pButtonItems[LEFT_BUTTON]->GetSizeF().width - processingAnimationIconSize) / 2, + (__pButtonItems[LEFT_BUTTON]->GetSizeF().height - processingAnimationIconSize) / 2); + } + + if (__pButtonItems[RIGHT_BUTTON] && GetWaitingAnimationStatus(TOOLBAR_ANIMATION_POSITION_BUTTON_RIGHT) != ANIMATION_STOPPED) + { + SetWaitingAnimationPosition(TOOLBAR_ANIMATION_POSITION_BUTTON_RIGHT, + (__pButtonItems[RIGHT_BUTTON]->GetSizeF().width - processingAnimationIconSize) / 2, + (__pButtonItems[RIGHT_BUTTON]->GetSizeF().height - processingAnimationIconSize) / 2); + } + } + else // footer or edit or HEADER_STYLE_BUTTON // side align + { + float footerButtonItemWidth = 0.0f; + float footerButtonItemHeight = 0.0f; + float sipButtonItemTopMargin = 0.0f; + float footerLeftMargin = 0.0f; + FloatDimension softkeyDimension(0.0f, 0.0f); + + if (__header == true && __style == TOOLBAR_TEXT) + { + GET_SHAPE_CONFIG(HEADER::BUTTON_ITEM_WIDTH, GetOrientation(), footerButtonItemWidth); + + if (GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT) // sip && portrait + { + GET_SHAPE_CONFIG(HEADER::BUTTON_ITEM_HEIGHT, GetOrientation(), footerButtonItemHeight); + } + else + { + GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_HEIGHT, GetOrientation(), footerButtonItemHeight); + } + } + else + { + GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_WIDTH, GetOrientation(), footerButtonItemWidth); + GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_HEIGHT, GetOrientation(), footerButtonItemHeight); + } + + GET_SHAPE_CONFIG(HEADER::SIP_BUTTON_ITEM_TOP_MARGIN, GetOrientation(), sipButtonItemTopMargin); + GET_SHAPE_CONFIG(FOOTER::LEFT_MARGIN, GetOrientation(), footerLeftMargin); + GET_DIMENSION_CONFIG(FOOTER::SOFTKEY_RECT_WITH_TEXT, GetOrientation(), softkeyDimension); + + if (__pButtonItems[MIDDLE_BUTTON]) + { + __pButtonItems[MIDDLE_BUTTON]->SetPosition(FloatPoint((__itemArea.width - __pButtonItems[MIDDLE_BUTTON]->GetSizeF().width) / 2, + __itemArea.height - __pButtonItems[MIDDLE_BUTTON]->GetSizeF().height)); + } + + // footer or edit or HEADER_STYLE_BUTTON // side align + if (__pButtonItems[RIGHT_BUTTON]) + { + if (__pButtonItems[LEFT_BUTTON]) + { + if (__style != TOOLBAR_SOFTKEY) + { + __pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__itemArea.width - footerButtonItemWidth, + 0.0f, footerButtonItemWidth + 1, footerButtonItemHeight)); + + __pButtonItems[LEFT_BUTTON]->SetBounds(FloatRectangle(0.0f, 0.0f, + footerButtonItemWidth, footerButtonItemHeight)); + } + else + { + if (__pButtonItems[RIGHT_BUTTON]->GetText() == L"") + { + __pButtonItems[RIGHT_BUTTON]->SetPosition(FloatPoint(__itemArea.width - __pButtonItems[RIGHT_BUTTON]->GetSizeF().width, + __itemArea.height - __pButtonItems[RIGHT_BUTTON]->GetSizeF().height)); + } + else + { + __pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__itemArea.width - softkeyDimension.width, __itemArea.height - softkeyDimension.height, + softkeyDimension.width + 1, softkeyDimension.height)); + } + + if (__pButtonItems[LEFT_BUTTON]->GetText() == L"") + { + __pButtonItems[LEFT_BUTTON]->SetPosition(FloatPoint(0.0f, __itemArea.height - __pButtonItems[LEFT_BUTTON]->GetSizeF().height)); + } + else + { + __pButtonItems[LEFT_BUTTON]->SetBounds(FloatRectangle(0.0f, __itemArea.height - softkeyDimension.height, + softkeyDimension.width, softkeyDimension.height)); + } + } + } + else + { + if (__style != TOOLBAR_SOFTKEY) + { + __pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__itemArea.width - footerButtonItemWidth, + 0.0f, footerButtonItemWidth + 1, footerButtonItemHeight)); + } + else + { + if (__pButtonItems[RIGHT_BUTTON]->GetText() == L"") + { + __pButtonItems[RIGHT_BUTTON]->SetPosition(FloatPoint(__itemArea.width - __pButtonItems[RIGHT_BUTTON]->GetSizeF().width, + __itemArea.height - __pButtonItems[RIGHT_BUTTON]->GetSizeF().height)); + } + else + { + __pButtonItems[RIGHT_BUTTON]->SetBounds(FloatRectangle(__itemArea.width - softkeyDimension.width, __itemArea.height - softkeyDimension.height, + softkeyDimension.width + 1, softkeyDimension.height)); + } + } + } + } + else if (__pButtonItems[LEFT_BUTTON]) + { + if (__style != TOOLBAR_SOFTKEY) + { + __pButtonItems[LEFT_BUTTON]->SetBounds(FloatRectangle(0.0f, 0.0f, + footerButtonItemWidth, footerButtonItemHeight)); + } + else + { + if (__pButtonItems[LEFT_BUTTON]->GetText() == L"") + { + __pButtonItems[LEFT_BUTTON]->SetPosition(FloatPoint(0.0f, __itemArea.height - __pButtonItems[LEFT_BUTTON]->GetSizeF().height)); + } + else + { + __pButtonItems[LEFT_BUTTON]->SetBounds(FloatRectangle(0.0f, __itemArea.height - softkeyDimension.height, + softkeyDimension.width, softkeyDimension.height)); + } + } + } + } + + if (__style != TOOLBAR_SOFTKEY) + { + for (int i = 0; i < BUTTON_MAX; i++) + { + if (__pButtonItems[i] != null) + { + RealignButtonItem(__pButtonItems[i]); + } + } + } + + __pToolbarPresenter->SetUsableAreaBounds(__titleTextArea); + + if (__pTitleTextElement) + { + __pTitleTextElement->SetBounds(__titleTextArea); + } + + if (0 == __itemCount) + { + return E_SUCCESS; + } + + switch (__style) + { + case TOOLBAR_HEADER_SEGMENTED: + //fall through + case TOOLBAR_HEADER_SEGMENTED_WITH_TITLE: + RearrangeHeaderSegmentedItems(); + break; + + case TOOLBAR_SEGMENTED: + RearrangeFooterSegmentedItems(); + break; + + case TOOLBAR_TAB: + //fall through + case TOOLBAR_TAB_LARGE: + //fall through + case TOOLBAR_TAB_WITH_TITLE: + RearrangeTabItmes(); + break; + + default: + RearrangeButtonItems(); + break; + } + + return E_SUCCESS; +} + +result +_Toolbar::RearrangeHeaderSegmentedItems(void) +{ + float segmentedItemHeight = 0.0f; + float leftMargin = 0.0f; + float vmargin = 0.0f; + float blockWidth[__itemCount]; + float fontSize = 0.0f; + float multilineFontSize = 0.0f; + + GET_SHAPE_CONFIG(HEADER::LEFT_MARGIN, GetOrientation(), leftMargin); + + if (__style == TOOLBAR_HEADER_SEGMENTED) + { + segmentedItemHeight = __itemArea.height; + GET_SHAPE_CONFIG(HEADER::BUTTON_ITEM_TOP_MARGIN, GetOrientation(), vmargin); + } + else if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE) + { + GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_HEIGHT, GetOrientation(), segmentedItemHeight); + GET_SHAPE_CONFIG(HEADER::TITLE_HEIGHT_WITH_SEGMENTED_ITEM, GetOrientation(), vmargin); + } + + if (__itemCount == 1 || __itemCount == 2) + { + if (!(__pButtonItems[LEFT_BUTTON] || __pButtonItems[RIGHT_BUTTON])) // no button + { + blockWidth[0] = blockWidth[1] = GetSizeF().width / 2; + } + else + { + blockWidth[0] = blockWidth[1] = (__itemArea.width + leftMargin) / 2; + } + + for (int i = 0; i < __itemCount ; i++) + { + __pItems.at(i)->SetBounds(FloatRectangle(blockWidth[0] * i, vmargin, blockWidth[i], segmentedItemHeight)); + + if (__pItems.at(i)->GetChildCount() != 0) + { + _Label* existingBadgeIcon = dynamic_cast<_Label*>(__pItems.at(i)->GetChild(0)); + + if (existingBadgeIcon) + { + existingBadgeIcon->SetPosition(FloatPoint(blockWidth[1] - existingBadgeIcon->GetSizeF().width, 0)); + existingBadgeIcon = null; + } + } + } + + GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_FONT_SIZE, GetOrientation(), fontSize); // 30 + + if (__style == TOOLBAR_HEADER_SEGMENTED) + { + GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_MULTILINE_FONT_SIZE, GetOrientation(), multilineFontSize); // 28 + } + else if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE) + { + GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_FONT_SIZE_4_ITEM, GetOrientation(), multilineFontSize); // 24 + } + } + else if (__itemCount == 3) + { + if (!(__pButtonItems[LEFT_BUTTON] || __pButtonItems[RIGHT_BUTTON])) // no button + { + blockWidth[0] = blockWidth[1] = blockWidth[2] = GetSizeF().width / 3; + + __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], segmentedItemHeight)); + } + else + { + blockWidth[0] = blockWidth[1] = blockWidth[2] = (__itemArea.width + leftMargin) / 3; + + __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], + 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++) + { + if (__pItems.at(i)->GetChildCount() != 0) + { + _Label* existingBadgeIcon = dynamic_cast<_Label*>(__pItems.at(i)->GetChild(0)); + + if (existingBadgeIcon) + { + existingBadgeIcon->SetPosition(FloatPoint(blockWidth[i] - existingBadgeIcon->GetSizeF().width, 0)); + existingBadgeIcon = null; + } + } + } + + GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_FONT_SIZE_3_ITEM, GetOrientation(), fontSize); // 26 + + if (__style == TOOLBAR_HEADER_SEGMENTED) + { + GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_FONT_SIZE_3_ITEM, GetOrientation(), multilineFontSize); // 26 + } + else if (__style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE) + { + GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_FONT_SIZE_4_ITEM, GetOrientation(), multilineFontSize); //24 + } + } + else if (__itemCount == 4) + { + if (!(__pButtonItems[LEFT_BUTTON] || __pButtonItems[RIGHT_BUTTON])) // no button + { + blockWidth[0] = blockWidth[1] = blockWidth[2] = blockWidth[3] = GetSizeF().width / 4; + + __pItems.at(0)->SetBounds(FloatRectangle(0, vmargin, blockWidth[0], segmentedItemHeight)); + __pItems.at(1)->SetBounds(FloatRectangle(blockWidth[0], vmargin, blockWidth[1], segmentedItemHeight)); + __pItems.at(2)->SetBounds(FloatRectangle(blockWidth[0] + blockWidth[1], + vmargin, blockWidth[2], segmentedItemHeight)); + __pItems.at(3)->SetBounds(FloatRectangle(blockWidth[0] + blockWidth[1] + blockWidth[2], + vmargin, blockWidth[3], segmentedItemHeight)); + } + else + { + blockWidth[0] = blockWidth[1] = blockWidth[2] = blockWidth[3] = (__itemArea.width + leftMargin) / 4; + + __pItems.at(0)->SetBounds(FloatRectangle(0, vmargin, blockWidth[0], segmentedItemHeight)); + __pItems.at(1)->SetBounds(FloatRectangle(blockWidth[0], vmargin, blockWidth[1], segmentedItemHeight)); + __pItems.at(2)->SetBounds(FloatRectangle(blockWidth[0] + blockWidth[1], + vmargin, blockWidth[2], segmentedItemHeight)); + __pItems.at(3)->SetBounds(FloatRectangle(blockWidth[0] + blockWidth[1] + blockWidth[2], + vmargin, blockWidth[3], segmentedItemHeight)); + } + + for (int i = 0; i < __itemCount ; i++) + { + if (__pItems.at(i)->GetChildCount() != 0) + { + _Label* existingBadgeIcon = dynamic_cast<_Label*>(__pItems.at(i)->GetChild(0)); + + if (existingBadgeIcon) + { + existingBadgeIcon->SetPosition(FloatPoint(blockWidth[i] - existingBadgeIcon->GetSizeF().width, 0)); + existingBadgeIcon = null; + } + } + } + + GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_FONT_SIZE_4_ITEM, GetOrientation(), fontSize); + GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_FONT_SIZE_4_ITEM, GetOrientation(), multilineFontSize); + } + + for (int i = 0; i < __itemCount; i++) + { + __pItems.at(i)->SetTextSize(fontSize, FONT_STYLE_BOLD); + __pItems.at(i)->SetMultilineTextSize(multilineFontSize); + + RealignItem(__pItems.at(i), __pItems.at(i)->GetTextExtentSizeF()); + } + + return E_SUCCESS; +} + +result +_Toolbar::RearrangeFooterSegmentedItems(void) +{ + float segmentedItemHeight = __itemArea.height; + + float leftMargin = 0.0f; + float rightMargin = 0.0f; + float footerLeftMargin = 0.0f; + float iconSize = 0.0f; + float blockWidth[__itemCount]; + float fontSize = 0.0f; + float multilineFontSize = 0.0f; + + float itemButtonLeftGap = 0.0f; + float itemButtonRightGap = 0.0f; + + float dividerWidth = 0.0f; + + + GET_SHAPE_CONFIG(HEADER::LEFT_MARGIN, GetOrientation(), leftMargin); + GET_SHAPE_CONFIG(FOOTER::LEFT_MARGIN, GetOrientation(), footerLeftMargin); + GET_SHAPE_CONFIG(FOOTER::FOOTER_ITEM_ICON_SIZE, GetOrientation(), iconSize); + GET_SHAPE_CONFIG(HEADER::DIVIDER_WIDTH, GetOrientation(), dividerWidth); + + rightMargin = leftMargin; + + if (__itemCount == 1) + { + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]) + { + leftMargin = footerLeftMargin; + itemButtonLeftGap = footerLeftMargin; + __itemArea.width -= ((leftMargin + iconSize + itemButtonLeftGap) * 2); + } + else + { + leftMargin = footerLeftMargin; + itemButtonLeftGap = footerLeftMargin; + __itemArea.width -= (iconSize + itemButtonLeftGap + rightMargin); + } + } + else + { + if (__pButtonItems[RIGHT_BUTTON]) + { + rightMargin = footerLeftMargin; + itemButtonRightGap = footerLeftMargin; + __itemArea.width -= (itemButtonRightGap + iconSize + rightMargin); + } + + iconSize = 0; + leftMargin = 0; + itemButtonLeftGap = 0; + } + + blockWidth[0] = __itemArea.width; + + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]) + { + __pItems.at(0)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + dividerWidth, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0] - dividerWidth * 2, segmentedItemHeight)); + } + else + { + __pItems.at(0)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + dividerWidth, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0] - dividerWidth, segmentedItemHeight)); + } + } + else + { + if (__pButtonItems[RIGHT_BUTTON]) + { + __pItems.at(0)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0] - dividerWidth, segmentedItemHeight)); + } + else + { + __pItems.at(0)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0], segmentedItemHeight)); + } + } + + for (int i = 0; i < __itemCount ; i++) + { + if (__pItems.at(i)->GetChildCount() != 0) + { + _Label* existingBadgeIcon = dynamic_cast<_Label*>(__pItems.at(i)->GetChild(0)); + + if (existingBadgeIcon) + { + existingBadgeIcon->SetPosition(FloatPoint(blockWidth[i] - existingBadgeIcon->GetSizeF().width, 0)); + existingBadgeIcon = null; + } + } + } + + 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) + { + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]) + { + leftMargin = footerLeftMargin; + itemButtonLeftGap = footerLeftMargin; + __itemArea.width -= ((leftMargin + iconSize + itemButtonLeftGap) * 2); + } + else + { + leftMargin = footerLeftMargin; + itemButtonLeftGap = footerLeftMargin; + __itemArea.width -= (iconSize + itemButtonLeftGap + rightMargin); + } + } + else + { + if (__pButtonItems[RIGHT_BUTTON]) + { + rightMargin = footerLeftMargin; + itemButtonRightGap = footerLeftMargin; + __itemArea.width -= (itemButtonRightGap + iconSize + rightMargin); + } + + iconSize = 0; + leftMargin = 0; + itemButtonLeftGap = 0; + } + + blockWidth[0] = blockWidth[1] = __itemArea.width / 2; + + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]) + { + __pItems.at(0)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + dividerWidth, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0] - dividerWidth, segmentedItemHeight)); + __pItems.at(1)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1] - dividerWidth, segmentedItemHeight)); + } + else + { + __pItems.at(0)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + dividerWidth, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0] - dividerWidth, segmentedItemHeight)); + __pItems.at(1)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1] + 1, segmentedItemHeight)); + } + } + else + { + if (__pButtonItems[RIGHT_BUTTON]) + { + __pItems.at(0)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0], segmentedItemHeight)); + __pItems.at(1)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1] - dividerWidth, segmentedItemHeight)); + } + else + { + __pItems.at(0)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0], segmentedItemHeight)); + __pItems.at(1)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1], segmentedItemHeight)); + } + } + + + for (int i = 0; i < __itemCount ; i++) + { + if (__pItems.at(i)->GetChildCount() != 0) + { + _Label* existingBadgeIcon = dynamic_cast<_Label*>(__pItems.at(i)->GetChild(0)); + + if (existingBadgeIcon) + { + existingBadgeIcon->SetPosition(FloatPoint(blockWidth[i] - existingBadgeIcon->GetSizeF().width, 0)); + existingBadgeIcon = null; + } + } + } + + GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_FONT_SIZE, GetOrientation(), fontSize); + GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_MULTILINE_FONT_SIZE, GetOrientation(), multilineFontSize); + } + else if (__itemCount == 3) + { + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]) + { + leftMargin = footerLeftMargin; + itemButtonLeftGap = footerLeftMargin; + __itemArea.width -= ((leftMargin + iconSize + itemButtonLeftGap) * 2); + } + else + { + leftMargin = footerLeftMargin; + itemButtonLeftGap = footerLeftMargin; + __itemArea.width -= (iconSize + itemButtonLeftGap + rightMargin); + } + } + else + { + if (__pButtonItems[RIGHT_BUTTON]) + { + rightMargin = footerLeftMargin; + itemButtonRightGap = footerLeftMargin; + __itemArea.width -= (itemButtonRightGap + iconSize + rightMargin); + } + + iconSize = 0; + leftMargin = 0; + itemButtonLeftGap = 0; + } + + 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]) + { + if (__pButtonItems[RIGHT_BUTTON]) + { + __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], + (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], segmentedItemHeight)); + } + } + else + { + if (__pButtonItems[RIGHT_BUTTON]) + { + __pItems.at(0)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0], segmentedItemHeight)); + __pItems.at(1)->SetBounds(FloatRectangle(leftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1], segmentedItemHeight)); + __pItems.at(2)->SetBounds(FloatRectangle(__itemArea.width - blockWidth[2], + (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], 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) + { + _Label* existingBadgeIcon = dynamic_cast<_Label*>(__pItems.at(i)->GetChild(0)); + + if (existingBadgeIcon) + { + existingBadgeIcon->SetPosition(FloatPoint(blockWidth[i] - existingBadgeIcon->GetSizeF().width, 0)); + existingBadgeIcon = null; + } + } + } + + GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_FONT_SIZE_3_ITEM, GetOrientation(), fontSize); + GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_FONT_SIZE_3_ITEM, GetOrientation(), multilineFontSize); + } + else if (__itemCount == 4) + { + leftMargin = 0; + + blockWidth[0] = blockWidth[1] = blockWidth[2] = blockWidth[3] = __itemArea.width / 4; + + __pItems.at(0)->SetBounds(FloatRectangle(leftMargin, (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[0], segmentedItemHeight)); + __pItems.at(1)->SetBounds(FloatRectangle(leftMargin + blockWidth[0], (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[1], segmentedItemHeight)); + __pItems.at(2)->SetBounds(FloatRectangle(leftMargin + blockWidth[0] + blockWidth[1], + (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[2], segmentedItemHeight)); + __pItems.at(3)->SetBounds(FloatRectangle(leftMargin + blockWidth[0] + blockWidth[1] + blockWidth[2], + (GetSizeF().height - segmentedItemHeight) / 2, blockWidth[3], segmentedItemHeight)); + + for (int i = 0; i < __itemCount ; i++) + { + if (__pItems.at(i)->GetChildCount() != 0) + { + _Label* existingBadgeIcon = dynamic_cast<_Label*>(__pItems.at(i)->GetChild(0)); + + if (existingBadgeIcon) + { + existingBadgeIcon->SetPosition(FloatPoint(blockWidth[i] - existingBadgeIcon->GetSizeF().width, 0)); + existingBadgeIcon = null; + } + } + } + + GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_FONT_SIZE_4_ITEM, GetOrientation(), fontSize); + GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_FONT_SIZE_4_ITEM, GetOrientation(), multilineFontSize); + } + + for (int i = 0; i < __itemCount ; i++) + { + __pItems.at(i)->SetTextSize(fontSize, FONT_STYLE_BOLD); + __pItems.at(i)->SetMultilineTextSize(multilineFontSize); + + RealignItem(__pItems.at(i), __pItems.at(i)->GetTextExtentSizeF()); + } + + return E_SUCCESS; +} + +result +_Toolbar::RearrangeTabItmes(void) +{ + float itemWidth[__itemCount]; + float fontSize = 0.0f; + float multilineFontSize = 0.0f; + float segmentedItemHeight = 0.0f; + float vmargin = 0.0f; + + if (__style == TOOLBAR_TAB || __style == TOOLBAR_TAB_LARGE) + { + segmentedItemHeight = __itemArea.height; + } + else if (__style == TOOLBAR_TAB_WITH_TITLE) + { + GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_HEIGHT, GetOrientation(), segmentedItemHeight); + GET_SHAPE_CONFIG(HEADER::TITLE_HEIGHT_WITH_SEGMENTED_ITEM, GetOrientation(), vmargin); + } + + if (__itemCount == 1) + { + itemWidth[0] = __itemArea.width; + __pItems.at(0)->SetBounds(FloatRectangle(0.0f, vmargin, itemWidth[0], segmentedItemHeight)); + + + GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE, GetOrientation(), fontSize); // 30 + + if (__style == TOOLBAR_TAB || __style == TOOLBAR_TAB_LARGE) + { + GET_SHAPE_CONFIG(HEADER::TAB_ITEM_MULTILINE_FONT_SIZE, GetOrientation(), multilineFontSize); // 28 + } + else if (__style == TOOLBAR_TAB_WITH_TITLE) + { + GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE_4_ITEM, GetOrientation(), multilineFontSize); // 24 + } + } + else if (__itemCount == 2) + { + itemWidth[0] = itemWidth[1] = __itemArea.width / 2; + + __pItems.at(0)->SetBounds(FloatRectangle(0.0f, vmargin, itemWidth[0], segmentedItemHeight)); + __pItems.at(1)->SetBounds(FloatRectangle(itemWidth[0], vmargin, itemWidth[1], segmentedItemHeight)); + + GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE, GetOrientation(), fontSize); // 30 + + if (__style == TOOLBAR_TAB || __style == TOOLBAR_TAB_LARGE) + { + GET_SHAPE_CONFIG(HEADER::TAB_ITEM_MULTILINE_FONT_SIZE, GetOrientation(), multilineFontSize); // 28 + } + else if (__style == TOOLBAR_TAB_WITH_TITLE) + { + GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE_4_ITEM, GetOrientation(), multilineFontSize); // 24 + } + } + else if (__itemCount == 3) + { + + 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], 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 + + if (__style == TOOLBAR_TAB || __style == TOOLBAR_TAB_LARGE) + { + GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE_3_ITEM, GetOrientation(), multilineFontSize); // 26 + } + else if (__style == TOOLBAR_TAB_WITH_TITLE) + { + GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE_4_ITEM, GetOrientation(), multilineFontSize); // 24 + } + } + else + { + itemWidth[0] = itemWidth[1] = itemWidth[2] = itemWidth[3] = __itemArea.width / 4; + + __pItems.at(0)->SetBounds(FloatRectangle(0.0f, vmargin, itemWidth[0], segmentedItemHeight)); + __pItems.at(1)->SetBounds(FloatRectangle(itemWidth[0], vmargin, itemWidth[1], segmentedItemHeight)); + __pItems.at(2)->SetBounds(FloatRectangle(itemWidth[0] + itemWidth[1], vmargin, itemWidth[2], segmentedItemHeight)); + __pItems.at(3)->SetBounds(FloatRectangle(itemWidth[0] + itemWidth[1] + itemWidth[2], vmargin, itemWidth[3], segmentedItemHeight)); + + GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE_4_ITEM, GetOrientation(), fontSize); // 24 + GET_SHAPE_CONFIG(HEADER::TAB_ITEM_FONT_SIZE_4_ITEM, GetOrientation(), multilineFontSize); // 24 + } + + for (int i = 4; i < __itemCount ; i++) + { + itemWidth[i] = itemWidth[0]; + + __pItems.at(i)->SetBounds(FloatRectangle(__pItems.at(i-1)->GetBoundsF().x + itemWidth[i], vmargin, itemWidth[i], segmentedItemHeight)); + } + + for (int i = 0; i < __itemCount ; i++) + { + __pItems.at(i)->SetTextSize(fontSize, FONT_STYLE_BOLD); + __pItems.at(i)->SetMultilineTextSize(multilineFontSize); + + if (__pItems.at(i)->GetChildCount() != 0) + { + _Label* existingBadgeIcon = dynamic_cast<_Label*>(__pItems.at(i)->GetChild(0)); + + if (existingBadgeIcon) + { + existingBadgeIcon->SetPosition(FloatPoint(__pItems.at(i)->GetSizeF().width - existingBadgeIcon->GetSizeF().width, 0)); + existingBadgeIcon = null; + } + } + + RealignItem(__pItems.at(i), __pItems.at(i)->GetTextExtentSizeF()); + } + + return E_SUCCESS; +} + +result +_Toolbar::RearrangeButtonItems(void) +{ + float itemHeight = 0.0f; + float sideMargin = 0.0f; + float itemButtonLeftGap = 0.0f; + float itemButtonRightGap = 0.0f; + float iconSize = 0.0f; + float footerLeftMargin = 0.0f; + float segmentedItemHeight = 0.0f; + float headerLeftMargin = 0.0f; + float blockWidth[__itemCount]; + float fontSize = 0.0f; + float multilineFontSize = 0.0f; + float dividerWidth = 0.0f; + + GET_SHAPE_CONFIG(FOOTER::FOOTER_ITEM_ICON_SIZE, GetOrientation(), iconSize); + GET_SHAPE_CONFIG(FOOTER::LEFT_MARGIN, GetOrientation(), footerLeftMargin); + GET_SHAPE_CONFIG(FOOTER::FOOTER_ITEM_BUTTON_STYLE_SIDE_MARGIN, GetOrientation(), sideMargin); + GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_HEIGHT, GetOrientation(), segmentedItemHeight); + GET_SHAPE_CONFIG(HEADER::LEFT_MARGIN, GetOrientation(), headerLeftMargin); + GET_SHAPE_CONFIG(HEADER::DIVIDER_WIDTH, GetOrientation(), dividerWidth); + + itemHeight = GetSizeF().height; + + if (__itemCount == 1) + { + float textExtentSize_0 = __pItems.at(0)->GetTextExtentSizeF(); + + if (__style == TOOLBAR_TITLE) // item 1, HEADER_STYLE_TITLE_BUTTON + { + if (__pButtonItems[LEFT_BUTTON] || __pButtonItems[RIGHT_BUTTON]) + { + blockWidth[0] = __itemArea.width + headerLeftMargin; + } + else + { + blockWidth[0] = GetSizeF().width; + } + + __pItems.at(0)->SetBounds(FloatRectangle(0, (GetSizeF().height - itemHeight) / 2, blockWidth[0], itemHeight)); + __pItems.at(0)->SetMargin(0.0f, 0.0f, 0.0f, 0.0f); + } + else + { + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]) + { + itemButtonLeftGap = footerLeftMargin; + __itemArea.width -= ((footerLeftMargin + iconSize + itemButtonLeftGap) * 2); + } + else + { + itemButtonLeftGap = footerLeftMargin; + __itemArea.width -= (footerLeftMargin + iconSize + itemButtonLeftGap); + } + } + else + { + if (__pButtonItems[RIGHT_BUTTON]) + { + itemButtonRightGap = footerLeftMargin; + __itemArea.width -= (itemButtonRightGap + iconSize + footerLeftMargin); + } + } + + blockWidth[0] = __itemArea.width; + + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]) + { + __pItems.at(0)->SetBounds(FloatRectangle(footerLeftMargin + iconSize + itemButtonLeftGap + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[0] - dividerWidth * 2, itemHeight)); + } + else + { + __pItems.at(0)->SetBounds(FloatRectangle(footerLeftMargin + iconSize + itemButtonLeftGap + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[0] - dividerWidth, itemHeight)); + } + } + else + { + if (__pButtonItems[RIGHT_BUTTON]) + { + __pItems.at(0)->SetBounds(FloatRectangle(0.0f, (GetSizeF().height - itemHeight) / 2, blockWidth[0] - dividerWidth, itemHeight)); + } + else + { + __pItems.at(0)->SetBounds(FloatRectangle(0.0f, (GetSizeF().height - itemHeight) / 2, blockWidth[0], itemHeight)); + } + } + } + + for (int i = 0; i < __itemCount; i++) + { + if (__pItems.at(i)->GetChildCount() != 0) + { + _Label* existingBadgeIcon = dynamic_cast<_Label*>(__pItems.at(i)->GetChild(0)); + + if (existingBadgeIcon) + { + existingBadgeIcon->SetPosition(FloatPoint(blockWidth[i] - existingBadgeIcon->GetSizeF().width, 0)); + existingBadgeIcon = null; + } + } + } + + RealignItem(__pItems.at(0), textExtentSize_0); + } + else if (__itemCount == 2) + { + float textExtentSize_0 = __pItems.at(0)->GetTextExtentSizeF(); + float textExtentSize_1 = __pItems.at(1)->GetTextExtentSizeF(); + + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]) + { + itemButtonLeftGap = footerLeftMargin; + __itemArea.width -= ((footerLeftMargin + iconSize + itemButtonLeftGap) * 2); + } + else + { + itemButtonLeftGap = footerLeftMargin; + __itemArea.width -= (footerLeftMargin + iconSize + itemButtonLeftGap); + } + } + else + { + if (__pButtonItems[RIGHT_BUTTON]) + { + itemButtonRightGap = footerLeftMargin; + __itemArea.width -= (itemButtonRightGap + iconSize + footerLeftMargin); + } + } + + blockWidth[0] = blockWidth[1] = __itemArea.width / 2; + + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]) + { + __pItems.at(0)->SetBounds(FloatRectangle(footerLeftMargin + iconSize + itemButtonLeftGap + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[0] - dividerWidth, itemHeight)); + __pItems.at(1)->SetBounds(FloatRectangle(footerLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1] - dividerWidth, itemHeight)); + } + else + { + __pItems.at(0)->SetBounds(FloatRectangle(footerLeftMargin + iconSize + itemButtonLeftGap + dividerWidth, (GetSizeF().height - itemHeight) / 2, blockWidth[0] - dividerWidth, itemHeight)); + __pItems.at(1)->SetBounds(FloatRectangle(footerLeftMargin + iconSize + itemButtonLeftGap + blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1] + 1, itemHeight)); + } + } + else + { + if (__pButtonItems[RIGHT_BUTTON]) + { + __pItems.at(0)->SetBounds(FloatRectangle(0.0f, (GetSizeF().height - itemHeight) / 2, blockWidth[0], itemHeight)); + __pItems.at(1)->SetBounds(FloatRectangle(blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1] - dividerWidth, itemHeight)); + } + else + { + __pItems.at(0)->SetBounds(FloatRectangle(0.0f, (GetSizeF().height - itemHeight) / 2, blockWidth[0], itemHeight)); + __pItems.at(1)->SetBounds(FloatRectangle(blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight)); + } + } + + for (int i = 0; i < __itemCount; i++) + { + if (__pItems.at(i)->GetChildCount() != 0) + { + _Label* existingBadgeIcon = dynamic_cast<_Label*>(__pItems.at(i)->GetChild(0)); + + if (existingBadgeIcon) + { + existingBadgeIcon->SetPosition(FloatPoint(blockWidth[i] - existingBadgeIcon->GetSizeF().width, 0)); + existingBadgeIcon = null; + } + } + } + + RealignItem(__pItems.at(0), textExtentSize_0); + RealignItem(__pItems.at(1), textExtentSize_1); + } + else if (__itemCount == 3) + { + if (__pButtonItems[LEFT_BUTTON]) + { + if (__pButtonItems[RIGHT_BUTTON]) + { + itemButtonLeftGap = footerLeftMargin; + __itemArea.width -= ((footerLeftMargin + iconSize + itemButtonLeftGap) * 2); + } + else + { + itemButtonLeftGap = footerLeftMargin; + __itemArea.width -= (footerLeftMargin + iconSize + itemButtonLeftGap); + } + } + else + { + if (__pButtonItems[RIGHT_BUTTON]) + { + itemButtonRightGap = footerLeftMargin; + __itemArea.width -= (itemButtonRightGap + iconSize + footerLeftMargin); + } + else + { + ;//empty + } + } + + 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]) + { + if (__pButtonItems[RIGHT_BUTTON]) + { + __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], + (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], itemHeight)); + } + } + else + { + if (__pButtonItems[RIGHT_BUTTON]) + { + __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, 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], 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) + { + _Label* existingBadgeIcon = dynamic_cast<_Label*>(__pItems.at(i)->GetChild(0)); + + if (existingBadgeIcon) + { + existingBadgeIcon->SetPosition(FloatPoint(blockWidth[i] - existingBadgeIcon->GetSizeF().width, 0)); + existingBadgeIcon = null; + } + } + + RealignItem(__pItems.at(i), __pItems.at(i)->GetTextExtentSizeF()); + } + } + else if (__itemCount == 4) + { + blockWidth[0] = blockWidth[1] = blockWidth[2] = blockWidth[3] = __itemArea.width / 4; + + __pItems.at(0)->SetBounds(FloatRectangle(0.0f, (GetSizeF().height - itemHeight) / 2, blockWidth[0], itemHeight)); + __pItems.at(1)->SetBounds(FloatRectangle(blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight)); + __pItems.at(2)->SetBounds(FloatRectangle(blockWidth[0] + blockWidth[1], + (GetSizeF().height - itemHeight) / 2, blockWidth[2], itemHeight)); + __pItems.at(3)->SetBounds(FloatRectangle(blockWidth[0] + blockWidth[1] + blockWidth[2], + (GetSizeF().height - itemHeight) / 2, blockWidth[3], itemHeight)); + + for (int i = 0; i < __itemCount; i++) + { + if (__pItems.at(i)->GetChildCount() != 0) + { + _Label* existingBadgeIcon = dynamic_cast<_Label*>(__pItems.at(i)->GetChild(0)); + + if (existingBadgeIcon) + { + existingBadgeIcon->SetPosition(FloatPoint(blockWidth[i] - existingBadgeIcon->GetSizeF().width, 0)); + existingBadgeIcon = null; + } + } + + RealignItem(__pItems.at(i), __pItems.at(i)->GetTextExtentSizeF()); + } + } + else if (__itemCount == 5) + { + blockWidth[0] = blockWidth[1] = blockWidth[2] = blockWidth[3] = blockWidth[4] = __itemArea.width / 5; + + __pItems.at(0)->SetBounds(FloatRectangle(0.0f, (GetSizeF().height - itemHeight) / 2, blockWidth[0], itemHeight)); + __pItems.at(1)->SetBounds(FloatRectangle(blockWidth[0], (GetSizeF().height - itemHeight) / 2, blockWidth[1], itemHeight)); + __pItems.at(2)->SetBounds(FloatRectangle(blockWidth[0] + blockWidth[1], + (GetSizeF().height - itemHeight) / 2, blockWidth[2], itemHeight)); + __pItems.at(3)->SetBounds(FloatRectangle(blockWidth[0] + blockWidth[1] + blockWidth[2], + (GetSizeF().height - itemHeight) / 2, blockWidth[3], itemHeight)); + __pItems.at(4)->SetBounds(FloatRectangle(blockWidth[0] + blockWidth[1] + blockWidth[2] + blockWidth[3], + (GetSizeF().height - itemHeight) / 2, blockWidth[4], itemHeight)); + + for (int i = 0; i < __itemCount; i++) + { + if (__pItems.at(i)->GetChildCount() != 0) + { + _Label* existingBadgeIcon = dynamic_cast<_Label*>(__pItems.at(i)->GetChild(0)); + + if (existingBadgeIcon) + { + existingBadgeIcon->SetPosition(FloatPoint(blockWidth[i] - existingBadgeIcon->GetSizeF().width, 0)); + existingBadgeIcon = null; + } + } + + RealignItem(__pItems.at(i), __pItems.at(i)->GetTextExtentSizeF()); + } + } + + 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++) + { + if (__style == TOOLBAR_ICON_TEXT && (__pItems.at(i)->GetBitmap(_BUTTON_STATUS_NORMAL) || __pItems.at(i)->GetBitmap(_BUTTON_STATUS_PRESSED))) + { + if (__itemCount == 5) + { + GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_5_WITH_ICON, GetOrientation(), multilineFontSize);//20 + } + else + { + GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_3_WITH_ICON, GetOrientation(), multilineFontSize);//24 + } + } + else + { + if (__itemCount == 5) + { + GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_5, GetOrientation(), multilineFontSize);//24 + } + else + { + GET_SHAPE_CONFIG(FOOTER::BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_3, GetOrientation(), multilineFontSize);//26 + } + } + + __pItems.at(i)->SetTextSize(fontSize, FONT_STYLE_BOLD); + __pItems.at(i)->SetMultilineTextSize(multilineFontSize); + } + + return E_SUCCESS; +} + +result +_Toolbar::SetAnimation(ToolbarAnimationPosition animationPos) +{ + SysTryReturnResult(NID_UI_CTRL, (0 <= animationPos && animationPos < 3), E_INVALID_ARG, + "[E_INVALID_ARG] The animationPos is invalid."); + + if (__pAnimation[animationPos]) + { + if (__pAnimation[animationPos]->GetStatus() == ANIMATION_PLAYING) + { + return E_SUCCESS; + } + } + + if (__pAnimationFrameList[animationPos]) + { + __pAnimationFrameList[animationPos]->RemoveAll(true); + + delete __pAnimationFrameList[animationPos]; + __pAnimationFrameList[animationPos] = null; + } + + result r = GET_ANIMATION_CONFIG_N(HEADER::PROCESSING_ANIMATION, __pAnimationFrameList[animationPos]); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] Couldn't get an animationframe."); + + delete __pAnimation[animationPos]; + __pAnimation[animationPos] = null; + + __pAnimation[animationPos] = _Animation::CreateAnimationN(); + + float processingAnimationIconSize = 0.0f; + + GET_SHAPE_CONFIG(HEADER::PROCESSING_ANIMATION_ICON_SIZE, GetOrientation(), processingAnimationIconSize); + + if (__pAnimation[animationPos]) + { + __pAnimation[animationPos]->SetSize(FloatDimension(processingAnimationIconSize, processingAnimationIconSize)); + + if (__pAnimationFrameList[animationPos]) + { + __pAnimation[animationPos]->SetAnimationFrames(*__pAnimationFrameList[animationPos]); + __pAnimation[animationPos]->SetImageCount(__pAnimationFrameList[animationPos]->GetCount()); + __pAnimation[animationPos]->SetRepeatCount(100); + __pAnimation[animationPos]->AddAnimationEventListener(*this); + } + + if (animationPos == TOOLBAR_ANIMATION_POSITION_TITLE) + { + AttachChild(*__pAnimation[animationPos]); + } + else if (animationPos == TOOLBAR_ANIMATION_POSITION_BUTTON_LEFT) + { + __pButtonItems[LEFT_BUTTON]->AttachChild(*__pAnimation[animationPos]); + + SetWaitingAnimationPosition(TOOLBAR_ANIMATION_POSITION_BUTTON_LEFT, + (__pButtonItems[LEFT_BUTTON]->GetSizeF().width - processingAnimationIconSize) / 2, + (__pButtonItems[LEFT_BUTTON]->GetSizeF().height - processingAnimationIconSize) / 2); + } + else if (animationPos == TOOLBAR_ANIMATION_POSITION_BUTTON_RIGHT) + { + __pButtonItems[RIGHT_BUTTON]->AttachChild(*__pAnimation[animationPos]); + + SetWaitingAnimationPosition(TOOLBAR_ANIMATION_POSITION_BUTTON_RIGHT, + (__pButtonItems[RIGHT_BUTTON]->GetSizeF().width - processingAnimationIconSize) / 2, + (__pButtonItems[RIGHT_BUTTON]->GetSizeF().height - processingAnimationIconSize) / 2); + } + _AccessibilityContainer* pContainer = __pAnimation[animationPos]->GetAccessibilityContainer(); + if (pContainer) + { + pContainer->Activate(false); + } + } + + return E_SUCCESS; +} + +result +_Toolbar::SetColorReplacedBitmap(_Button* pButton, const _ButtonStatus status, + const Color& color, const Bitmap* pBitmap) +{ + SysTryReturnResult(NID_UI_CTRL, pButton, E_INVALID_ARG, "[E_INVALID_ARG] The button pointer is null."); + SysTryReturnResult(NID_UI_CTRL, pBitmap, E_INVALID_ARG, "[E_INVALID_ARG] The bitmap pointer is null."); + + Bitmap* __pColorReplacedBitmap = null; + + __pColorReplacedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pBitmap, Color::GetColor(COLOR_ID_MAGENTA), color); + + if (__pColorReplacedBitmap) + { + if (color.GetAlpha() != 0xFF) + { + __pColorReplacedBitmap->SetAlphaConstant(color.GetAlpha()); + } + + pButton->SetBackgroundBitmap(status, *__pColorReplacedBitmap); + delete __pColorReplacedBitmap; + } + + return E_SUCCESS; +} + +result +_Toolbar::SetPropertyColor(const Variant& color) +{ + result r = E_SUCCESS; + + _Control::SetBackgroundColor(color.ToColor()); + + return r; +} + +Variant +_Toolbar::GetPropertyColor(void) const +{ + return Variant(_Control::GetBackgroundColor()); +} + +result +_Toolbar::SetPropertyDescriptionText(const Variant& text) +{ + __descriptionText = text.ToString(); + + result r = E_SUCCESS; + + r = __pToolbarPresenter->SetDescriptionText(__descriptionText); + + if (__pTitleTextElement) + { + if (text.IsEmpty()) + { + __pTitleTextElement->SetLabel(__titleText); + } + else + { + __pTitleTextElement->SetLabel(__titleText + L", " + __descriptionText); + } + } + + return r; +} + +Variant +_Toolbar::GetPropertyDescriptionText(void) const +{ + return Variant(__descriptionText); +} + +result +_Toolbar::SetPropertyDescriptionTextColor(const Variant& color) +{ + __descriptionTextColor = color.ToColor(); + + return E_SUCCESS; +} + +Variant +_Toolbar::GetPropertyDescriptionTextColor(void) const +{ + return Variant(__descriptionTextColor); +} + +result +_Toolbar::SetPropertyTitleText(const Variant& text) +{ + __titleText = text.ToString(); + + if (__pTitleTextElement) + { + __pTitleTextElement->SetLabel(__titleText); + } + + return E_SUCCESS; +} + +Variant +_Toolbar::GetPropertyTitleText(void) const +{ + return Variant(__titleText); +} + +result +_Toolbar::SetPropertyTitleTextColor(const Variant& color) +{ + __titleTextColor = color.ToColor(); + + return E_SUCCESS; +} + +Variant +_Toolbar::GetPropertyTitleTextColor(void) const +{ + return Variant(__titleTextColor); +} + +result +_Toolbar::SetPropertyDisabledButtonColor(const Variant& color) +{ + __buttonBackgroundColor[_BUTTON_STATUS_DISABLED] = color.ToColor(); + + Bitmap* __pBaseBackgroundBitmap = null; + + if (__header == true) + { + if (__transparent == true) + { + GET_BITMAP_CONFIG_N(HEADER::BUTTON_TRANSLUCENT_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + else + { + GET_BITMAP_CONFIG_N(HEADER::BUTTON_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + } + else + { + if (__transparent == true) + { + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_TRANSLUCENT_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + else + { + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + } + + for (int i = 0; i < BUTTON_MAX; i++) + { + if (__pButtonItems[i] != null) + { + if (__pBaseBackgroundBitmap) + { + SetColorReplacedBitmap(__pButtonItems[i], _BUTTON_STATUS_DISABLED, __buttonBackgroundColor[_BUTTON_STATUS_DISABLED], __pBaseBackgroundBitmap); + } + } + } + + delete __pBaseBackgroundBitmap; + + return E_SUCCESS; +} + +Variant +_Toolbar::GetPropertyDisabledButtonColor(void) const +{ + return Variant(__buttonBackgroundColor[_BUTTON_STATUS_DISABLED]); +} + +result +_Toolbar::SetPropertyDisabledButtonTextColor(const Variant& color) +{ + __buttonTextColor[_BUTTON_STATUS_DISABLED] = color.ToColor(); + + for (int i = 0; i < BUTTON_MAX; i++) + { + if (__pButtonItems[i] != null) + { + __pButtonItems[i]->SetTextColor(_BUTTON_STATUS_DISABLED, __buttonTextColor[_BUTTON_STATUS_DISABLED]); + } + } + + return E_SUCCESS; +} + +Variant +_Toolbar::GetPropertyDisabledButtonTextColor(void) const +{ + return Variant(__buttonTextColor[_BUTTON_STATUS_DISABLED]); +} + +result +_Toolbar::SetPropertyHighlightedButtonColor(const Variant& color) +{ + __buttonBackgroundColor[_BUTTON_STATUS_HIGHLIGHTED] = color.ToColor(); + + Bitmap* __pBaseBackgroundBitmap = null; + + if (__header == true) + { + if (__transparent == true) + { + GET_BITMAP_CONFIG_N(HEADER::BUTTON_TRANSLUCENT_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + else + { + GET_BITMAP_CONFIG_N(HEADER::BUTTON_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + } + else + { + if (__transparent == true) + { + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_TRANSLUCENT_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + else + { + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + } + + for (int i = 0; i < BUTTON_MAX; i++) + { + if (__pButtonItems[i] != null) + { + if (__pBaseBackgroundBitmap) + { + SetColorReplacedBitmap(__pButtonItems[i], _BUTTON_STATUS_HIGHLIGHTED, __buttonBackgroundColor[_BUTTON_STATUS_HIGHLIGHTED], __pBaseBackgroundBitmap); + } + } + } + + delete __pBaseBackgroundBitmap; + + return E_SUCCESS; +} + +Variant +_Toolbar::GetPropertyHighlightedButtonColor(void) const +{ + return Variant(__buttonBackgroundColor[_BUTTON_STATUS_HIGHLIGHTED]); +} + +result +_Toolbar::SetPropertyHighlightedButtonTextColor(const Variant& color) +{ + __buttonTextColor[_BUTTON_STATUS_HIGHLIGHTED] = color.ToColor(); + + for (int i = 0; i < BUTTON_MAX; i++) + { + if (__pButtonItems[i] != null) + { + __pButtonItems[i]->SetTextColor(_BUTTON_STATUS_HIGHLIGHTED, __buttonTextColor[_BUTTON_STATUS_HIGHLIGHTED]); + } + } + + return E_SUCCESS; +} + +Variant +_Toolbar::GetPropertyHighlightedButtonTextColor(void) const +{ + return Variant(__buttonTextColor[_BUTTON_STATUS_HIGHLIGHTED]); +} + +result +_Toolbar::SetPropertyNormalButtonColor(const Variant& color) +{ + __buttonBackgroundColor[_BUTTON_STATUS_NORMAL] = color.ToColor(); + + Bitmap* __pBaseBackgroundBitmap = null; + + if (__header == true) + { + if (__transparent == true) + { + GET_BITMAP_CONFIG_N(HEADER::BUTTON_TRANSLUCENT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + else + { + GET_BITMAP_CONFIG_N(HEADER::BUTTON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + } + else + { + if (__transparent == true) + { + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_TRANSLUCENT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + else + { + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + } + + for (int i = 0; i < BUTTON_MAX; i++) + { + if (__pButtonItems[i] != null) + { + if (__pBaseBackgroundBitmap) + { + SetColorReplacedBitmap(__pButtonItems[i], _BUTTON_STATUS_NORMAL, __buttonBackgroundColor[_BUTTON_STATUS_NORMAL], __pBaseBackgroundBitmap); + } + } + } + + delete __pBaseBackgroundBitmap; + + return E_SUCCESS; +} + +Variant +_Toolbar::GetPropertyNormalButtonColor(void) const +{ + return Variant(__buttonBackgroundColor[_BUTTON_STATUS_NORMAL]); +} + +result +_Toolbar::SetPropertyNormalButtonTextColor(const Variant& color) +{ + __buttonTextColor[_BUTTON_STATUS_NORMAL] = color.ToColor(); + + for (int i = 0; i < BUTTON_MAX; i++) + { + if (__pButtonItems[i] != null) + { + __pButtonItems[i]->SetTextColor(_BUTTON_STATUS_NORMAL, __buttonTextColor[_BUTTON_STATUS_NORMAL]); + } + } + + return E_SUCCESS; +} + +Variant +_Toolbar::GetPropertyNormalButtonTextColor(void) const +{ + return Variant(__buttonTextColor[_BUTTON_STATUS_NORMAL]); +} + +result +_Toolbar::SetPropertyPressedButtonColor(const Variant& color) +{ + __buttonBackgroundColor[_BUTTON_STATUS_PRESSED] = color.ToColor(); + + Bitmap* __pBaseBackgroundBitmap = null; + + if (__header == true) + { + if (__transparent == true) + { + GET_BITMAP_CONFIG_N(HEADER::BUTTON_TRANSLUCENT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + else + { + GET_BITMAP_CONFIG_N(HEADER::BUTTON_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + } + else + { + if (__transparent == true) + { + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_TRANSLUCENT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + else + { + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + } + + for (int i = 0; i < BUTTON_MAX; i++) + { + if (__pButtonItems[i] != null) + { + if (__pBaseBackgroundBitmap) + { + SetColorReplacedBitmap(__pButtonItems[i], _BUTTON_STATUS_PRESSED, __buttonBackgroundColor[_BUTTON_STATUS_PRESSED], __pBaseBackgroundBitmap); + } + } + } + + delete __pBaseBackgroundBitmap; + + return E_SUCCESS; +} + +Variant +_Toolbar::GetPropertyPressedButtonColor(void) const +{ + return Variant(__buttonBackgroundColor[_BUTTON_STATUS_PRESSED]); +} + +result +_Toolbar::SetPropertyPressedButtonTextColor(const Variant& color) +{ + __buttonTextColor[_BUTTON_STATUS_PRESSED] = color.ToColor(); + + for (int i = 0; i < BUTTON_MAX; i++) + { + if (__pButtonItems[i] != null) + { + __pButtonItems[i]->SetTextColor(_BUTTON_STATUS_PRESSED, __buttonTextColor[_BUTTON_STATUS_PRESSED]); + } + } + + return E_SUCCESS; +} + +Variant +_Toolbar::GetPropertyPressedButtonTextColor(void) const +{ + return Variant(__buttonTextColor[_BUTTON_STATUS_PRESSED]); +} + +result +_Toolbar::SetPropertyDisabledItemColor(const Variant& color) +{ + __itemBackgroundColor[_BUTTON_STATUS_DISABLED] = color.ToColor(); + + Bitmap* __pBaseBackgroundBitmap = null; + + if (__style == TOOLBAR_TEXT || __style == TOOLBAR_ICON || __style == TOOLBAR_ICON_TEXT || __style == TOOLBAR_COMMAND) + { + if (__header == true) + { + if (__transparent == true) + { + GET_BITMAP_CONFIG_N(HEADER::BUTTON_ITEM_TRANSLUCENT_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + else + { + GET_BITMAP_CONFIG_N(HEADER::BUTTON_ITEM_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + } + else + { + if (__transparent == true) + { + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_ITEM_TRANSLUCENT_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + else + { + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_ITEM_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + } + } + else if (__style == TOOLBAR_HEADER_SEGMENTED || __style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_SEGMENTED || __style == TOOLBAR_TITLE) + { + if (__header == true) + { + if (__transparent == true) + { + GET_BITMAP_CONFIG_N(HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + else + { + GET_BITMAP_CONFIG_N(HEADER::SEGMENTED_ITEM_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + } + else + { + if (__transparent == true) + { + GET_BITMAP_CONFIG_N(FOOTER::SEGMENTED_ITEM_TRANSLUCENT_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + else + { + GET_BITMAP_CONFIG_N(FOOTER::SEGMENTED_ITEM_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + } + } + else if (__style == TOOLBAR_TAB || __style == TOOLBAR_TAB_WITH_TITLE || __style == TOOLBAR_TAB_LARGE) + { + if (__header == true) + { + if (__transparent == true) + { + GET_BITMAP_CONFIG_N(HEADER::TAB_ITEM_TRANSLUCENT_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + else + { + GET_BITMAP_CONFIG_N(HEADER::TAB_ITEM_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + } + else + { + if (__transparent == true) + { + GET_BITMAP_CONFIG_N(FOOTER::TAB_ITEM_TRANSLUCENT_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + else + { + GET_BITMAP_CONFIG_N(FOOTER::TAB_ITEM_BG_DISABLED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + } + } + + for (int i = 0; i < __itemCount; i++) + { + if (__pItems.at(i) != null) + { + if (__pBaseBackgroundBitmap) + { + SetColorReplacedBitmap(__pItems.at(i), _BUTTON_STATUS_DISABLED, __itemBackgroundColor[_BUTTON_STATUS_DISABLED], __pBaseBackgroundBitmap); + } + } + } + + delete __pBaseBackgroundBitmap; + + return E_SUCCESS; +} + +Variant +_Toolbar::GetPropertyDisabledItemColor(void) const +{ + return Variant(__itemBackgroundColor[_BUTTON_STATUS_DISABLED]); +} + +result +_Toolbar::SetPropertyDisabledItemTextColor(const Variant& color) +{ + __itemTextColor[_BUTTON_STATUS_DISABLED] = color.ToColor(); + + for (int i = 0; i < __itemCount; i++) + { + if (__pItems.at(i) != null) + { + __pItems.at(i)->SetTextColor(_BUTTON_STATUS_DISABLED, __itemTextColor[_BUTTON_STATUS_DISABLED]); + } + } + + return E_SUCCESS; +} + +Variant +_Toolbar::GetPropertyDisabledItemTextColor(void) const +{ + return Variant(__itemTextColor[_BUTTON_STATUS_DISABLED]); +} + +result +_Toolbar::SetPropertyHighlightedItemColor(const Variant& color) +{ + __itemBackgroundColor[_BUTTON_STATUS_HIGHLIGHTED] = color.ToColor(); + + Bitmap* __pBaseBackgroundBitmap = null; + + if (__style == TOOLBAR_TEXT || __style == TOOLBAR_ICON || __style == TOOLBAR_ICON_TEXT || __style == TOOLBAR_COMMAND) + { + if (__header == true) + { + if (__transparent == true) + { + GET_BITMAP_CONFIG_N(HEADER::BUTTON_ITEM_TRANSLUCENT_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + else + { + GET_BITMAP_CONFIG_N(HEADER::BUTTON_ITEM_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + } + else + { + if (__transparent == true) + { + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_ITEM_TRANSLUCENT_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + else + { + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_ITEM_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + } + } + else if (__style == TOOLBAR_HEADER_SEGMENTED || __style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_SEGMENTED || __style == TOOLBAR_TITLE) + { + if (__header == true) + { + if (__transparent == true) + { + GET_BITMAP_CONFIG_N(HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + else + { + GET_BITMAP_CONFIG_N(HEADER::SEGMENTED_ITEM_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + } + else + { + if (__transparent == true) + { + GET_BITMAP_CONFIG_N(FOOTER::SEGMENTED_ITEM_TRANSLUCENT_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + else + { + GET_BITMAP_CONFIG_N(FOOTER::SEGMENTED_ITEM_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + } + } + else if (__style == TOOLBAR_TAB || __style == TOOLBAR_TAB_WITH_TITLE || __style == TOOLBAR_TAB_LARGE) + { + if (__header == true) + { + if (__transparent == true) + { + GET_BITMAP_CONFIG_N(HEADER::TAB_ITEM_TRANSLUCENT_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + else + { + GET_BITMAP_CONFIG_N(HEADER::TAB_ITEM_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + } + else + { + if (__transparent == true) + { + GET_BITMAP_CONFIG_N(FOOTER::TAB_ITEM_TRANSLUCENT_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + else + { + GET_BITMAP_CONFIG_N(FOOTER::TAB_ITEM_BG_HIGHLIGHTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + } + } + + for (int i = 0; i < __itemCount; i++) + { + if (__pItems.at(i) != null) + { + if (__pBaseBackgroundBitmap) + { + SetColorReplacedBitmap(__pItems.at(i), _BUTTON_STATUS_HIGHLIGHTED, __itemBackgroundColor[_BUTTON_STATUS_HIGHLIGHTED], __pBaseBackgroundBitmap); + } + } + } + + delete __pBaseBackgroundBitmap; + + return E_SUCCESS; +} + +Variant +_Toolbar::GetPropertyHighlightedItemColor(void) const +{ + return Variant(__itemBackgroundColor[_BUTTON_STATUS_HIGHLIGHTED]); +} + +result +_Toolbar::SetPropertyHighlightedItemTextColor(const Variant& color) +{ + __itemTextColor[_BUTTON_STATUS_HIGHLIGHTED] = color.ToColor(); + + for (int i = 0; i < __itemCount; i++) + { + if (__pItems.at(i) != null) + { + __pItems.at(i)->SetTextColor(_BUTTON_STATUS_HIGHLIGHTED, __itemTextColor[_BUTTON_STATUS_HIGHLIGHTED]); + } + } + + return E_SUCCESS; +} + +Variant +_Toolbar::GetPropertyHighlightedItemTextColor(void) const +{ + return Variant(__itemTextColor[_BUTTON_STATUS_HIGHLIGHTED]); +} + +result +_Toolbar::SetPropertyNormalItemColor(const Variant& color) +{ + __itemBackgroundColor[_BUTTON_STATUS_NORMAL] = color.ToColor(); + + Bitmap* __pBaseBackgroundBitmap = null; + + if (__style == TOOLBAR_TEXT || __style == TOOLBAR_ICON || __style == TOOLBAR_ICON_TEXT || __style == TOOLBAR_COMMAND) + { + if (__header == true) + { + if (__transparent == true) + { + GET_BITMAP_CONFIG_N(HEADER::BUTTON_ITEM_TRANSLUCENT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + else + { + GET_BITMAP_CONFIG_N(HEADER::BUTTON_ITEM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + } + else + { + if (__transparent == true) + { + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_ITEM_TRANSLUCENT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + else + { + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_ITEM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + } + } + else if (__style == TOOLBAR_HEADER_SEGMENTED || __style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_SEGMENTED || __style == TOOLBAR_TITLE) + { + if (__header == true) + { + if (__transparent == true) + { + GET_BITMAP_CONFIG_N(HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + else + { + GET_BITMAP_CONFIG_N(HEADER::SEGMENTED_ITEM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + } + else + { + if (__transparent == true) + { + GET_BITMAP_CONFIG_N(FOOTER::SEGMENTED_ITEM_TRANSLUCENT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + else + { + GET_BITMAP_CONFIG_N(FOOTER::SEGMENTED_ITEM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + } + } + else if (__style == TOOLBAR_TAB || __style == TOOLBAR_TAB_WITH_TITLE || __style == TOOLBAR_TAB_LARGE) + { + if (__header == true) + { + if (__transparent == true) + { + GET_BITMAP_CONFIG_N(HEADER::TAB_ITEM_TRANSLUCENT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + else + { + GET_BITMAP_CONFIG_N(HEADER::TAB_ITEM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + } + else + { + if (__transparent == true) + { + GET_BITMAP_CONFIG_N(FOOTER::TAB_ITEM_TRANSLUCENT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + else + { + GET_BITMAP_CONFIG_N(FOOTER::TAB_ITEM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + } + } + + for (int i = 0; i < __itemCount; i++) + { + if (__pItems.at(i) != null) + { + if (__pBaseBackgroundBitmap) + { + SetColorReplacedBitmap(__pItems.at(i), _BUTTON_STATUS_NORMAL, __itemBackgroundColor[_BUTTON_STATUS_NORMAL], __pBaseBackgroundBitmap); + } + } + } + + delete __pBaseBackgroundBitmap; + + return E_SUCCESS; +} + +Variant +_Toolbar::GetPropertyNormalItemColor(void) const +{ + return Variant(__itemBackgroundColor[_BUTTON_STATUS_NORMAL]); +} + +result +_Toolbar::SetPropertyNormalItemTextColor(const Variant& color) +{ + __itemTextColor[_BUTTON_STATUS_NORMAL] = color.ToColor(); + + for (int i = 0; i < __itemCount; i++) + { + if (__pItems.at(i) != null) + { + __pItems.at(i)->SetTextColor(_BUTTON_STATUS_NORMAL, __itemTextColor[_BUTTON_STATUS_NORMAL]); + } + } + + return E_SUCCESS; +} + +Variant +_Toolbar::GetPropertyNormalItemTextColor(void) const +{ + return Variant(__itemTextColor[_BUTTON_STATUS_NORMAL]); +} + +result +_Toolbar::SetPropertyPressedItemColor(const Variant& color) +{ + __itemBackgroundColor[_BUTTON_STATUS_PRESSED] = color.ToColor(); + + Bitmap* __pBaseBackgroundBitmap = null; + + if (__style == TOOLBAR_TEXT || __style == TOOLBAR_ICON || __style == TOOLBAR_ICON_TEXT || __style == TOOLBAR_COMMAND) + { + if (__header == true) + { + if (__transparent == true) + { + GET_BITMAP_CONFIG_N(HEADER::BUTTON_ITEM_TRANSLUCENT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + else + { + GET_BITMAP_CONFIG_N(HEADER::BUTTON_ITEM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + } + else + { + if (__transparent == true) + { + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_ITEM_TRANSLUCENT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + else + { + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_ITEM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + } + } + else if (__style == TOOLBAR_HEADER_SEGMENTED || __style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_SEGMENTED || __style == TOOLBAR_TITLE) + { + if (__header == true) + { + if (__transparent == true) + { + GET_BITMAP_CONFIG_N(HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + else + { + GET_BITMAP_CONFIG_N(HEADER::SEGMENTED_ITEM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + } + else + { + if (__transparent == true) + { + GET_BITMAP_CONFIG_N(FOOTER::SEGMENTED_ITEM_TRANSLUCENT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + else + { + GET_BITMAP_CONFIG_N(FOOTER::SEGMENTED_ITEM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + } + } + else if (__style == TOOLBAR_TAB || __style == TOOLBAR_TAB_WITH_TITLE || __style == TOOLBAR_TAB_LARGE) + { + if (__header == true) + { + if (__transparent == true) + { + GET_BITMAP_CONFIG_N(HEADER::TAB_ITEM_TRANSLUCENT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + else + { + GET_BITMAP_CONFIG_N(HEADER::TAB_ITEM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + } + else + { + if (__transparent == true) + { + GET_BITMAP_CONFIG_N(FOOTER::TAB_ITEM_TRANSLUCENT_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + else + { + GET_BITMAP_CONFIG_N(FOOTER::TAB_ITEM_BG_PRESSED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + } + } + + for (int i = 0; i < __itemCount; i++) + { + if (__pItems.at(i) != null) + { + if (__pBaseBackgroundBitmap) + { + SetColorReplacedBitmap(__pItems.at(i), _BUTTON_STATUS_PRESSED, __itemBackgroundColor[_BUTTON_STATUS_PRESSED], __pBaseBackgroundBitmap); + } + } + } + + delete __pBaseBackgroundBitmap; + + return E_SUCCESS; +} + +Variant +_Toolbar::GetPropertyPressedItemColor(void) const +{ + return Variant(__itemBackgroundColor[_BUTTON_STATUS_PRESSED]); +} + +result +_Toolbar::SetPropertyPressedItemTextColor(const Variant& color) +{ + __itemTextColor[_BUTTON_STATUS_PRESSED] = color.ToColor(); + + for (int i = 0; i < __itemCount; i++) + { + if (__pItems.at(i) != null) + { + __pItems.at(i)->SetTextColor(_BUTTON_STATUS_PRESSED, __itemTextColor[_BUTTON_STATUS_PRESSED]); + } + } + + return E_SUCCESS; +} + +Variant +_Toolbar::GetPropertyPressedItemTextColor(void) const +{ + return Variant(__itemTextColor[_BUTTON_STATUS_PRESSED]); +} + +result +_Toolbar::SetPropertySelectedItemColor(const Variant& color) +{ + __itemBackgroundColor[_BUTTON_STATUS_SELECTED] = color.ToColor(); + + Bitmap* __pBaseBackgroundBitmap = null; + + if (__style == TOOLBAR_TEXT || __style == TOOLBAR_ICON || __style == TOOLBAR_ICON_TEXT || __style == TOOLBAR_COMMAND) + { + if (__header == true) + { + if (__transparent == true) + { + GET_BITMAP_CONFIG_N(HEADER::BUTTON_ITEM_TRANSLUCENT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + else + { + GET_BITMAP_CONFIG_N(HEADER::BUTTON_ITEM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + } + else + { + if (__transparent == true) + { + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_ITEM_TRANSLUCENT_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + else + { + GET_BITMAP_CONFIG_N(FOOTER::BUTTON_ITEM_BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + } + } + else if (__style == TOOLBAR_HEADER_SEGMENTED || __style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || __style == TOOLBAR_SEGMENTED || __style == TOOLBAR_TITLE) + { + if (__header == true) + { + if (__transparent == true) + { + GET_BITMAP_CONFIG_N(HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + else + { + GET_BITMAP_CONFIG_N(HEADER::SEGMENTED_ITEM_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + } + else + { + if (__transparent == true) + { + GET_BITMAP_CONFIG_N(FOOTER::SEGMENTED_ITEM_TRANSLUCENT_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + else + { + GET_BITMAP_CONFIG_N(FOOTER::SEGMENTED_ITEM_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + } + } + else if (__style == TOOLBAR_TAB || __style == TOOLBAR_TAB_WITH_TITLE || __style == TOOLBAR_TAB_LARGE) + { + if (__header == true) + { + if (__transparent == true) + { + GET_BITMAP_CONFIG_N(HEADER::TAB_ITEM_TRANSLUCENT_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + else + { + GET_BITMAP_CONFIG_N(HEADER::TAB_ITEM_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + } + else + { + if (__transparent == true) + { + GET_BITMAP_CONFIG_N(FOOTER::TAB_ITEM_TRANSLUCENT_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + else + { + GET_BITMAP_CONFIG_N(FOOTER::TAB_ITEM_BG_SELECTED, BITMAP_PIXEL_FORMAT_ARGB8888, __pBaseBackgroundBitmap); + } + } + } + + for (int i = 0; i < __itemCount; i++) + { + if (__pItems.at(i) != null) + { + if (__pBaseBackgroundBitmap) + { + SetColorReplacedBitmap(__pItems.at(i), _BUTTON_STATUS_SELECTED, __itemBackgroundColor[_BUTTON_STATUS_SELECTED], __pBaseBackgroundBitmap); + } + } + } + + delete __pBaseBackgroundBitmap; + + return E_SUCCESS; +} + +Variant +_Toolbar::GetPropertySelectedItemColor(void) const +{ + return Variant(__itemBackgroundColor[_BUTTON_STATUS_SELECTED]); +} + +result +_Toolbar::SetPropertySelectedItemTextColor(const Variant& color) +{ + __itemTextColor[_BUTTON_STATUS_SELECTED] = color.ToColor(); + + for (int i = 0; i < __itemCount; i++) + { + if (__pItems.at(i) != null) + { + __pItems.at(i)->SetTextColor(_BUTTON_STATUS_SELECTED, __itemTextColor[_BUTTON_STATUS_SELECTED]); + } + } + + return E_SUCCESS; +} + +Variant +_Toolbar::GetPropertySelectedItemTextColor(void) const +{ + return Variant(__itemTextColor[_BUTTON_STATUS_SELECTED]); +} + +Rectangle +_Toolbar::GetButtonBounds(ToolbarButton position) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetButtonBoundsF(position)); +} + +FloatRectangle +_Toolbar::GetButtonBoundsF(ToolbarButton position) const +{ + FloatRectangle bounds = __pButtonItems[position]->GetBoundsF(); + + return bounds; +} + +result +_Toolbar::SetTitleBadgeIcon(const Bitmap* pBadgeIcon) +{ + if (pBadgeIcon == null) + { + return E_SUCCESS; + } + + if (__pTitleBadgeIcon) + { + DetachChild(*__pTitleBadgeIcon); + + delete __pTitleBadgeIcon; + __pTitleBadgeIcon = null; + } + + float height = 0.0f; + GET_SHAPE_CONFIG(HEADER::BADGE_HEIGHT, GetOrientation(), height); + + __pTitleBadgeIcon = _Label::CreateLabelN(); + + if (__pTitleBadgeIcon) + { + __pTitleBadgeIcon->SetBounds(FloatRectangle(0.0f, 0.0f, height, height)); + __pTitleBadgeIcon->SetBackgroundBitmap(*pBadgeIcon); + + AttachChild(*__pTitleBadgeIcon); + SetChildAlwaysOnTop(*__pTitleBadgeIcon); + } + + return E_SUCCESS; +} + +result +_Toolbar::SetTitleNumberedBadgeIcon(int number) +{ + SysTryReturnResult(NID_UI_CTRL, (number >= 0 && number < 100000), E_INVALID_ARG, + "[E_INVALID_ARG] The number is out of bounds."); + + if (__pTitleBadgeIcon) + { + DetachChild(*__pTitleBadgeIcon); + + delete __pTitleBadgeIcon; + __pTitleBadgeIcon = null; + } + + if (number != 0) + { + __pTitleBadgeIcon = _Label::CreateLabelN(); + + SysTryReturnResult(NID_UI_CTRL, __pTitleBadgeIcon, E_INVALID_STATE, "[E_INVALID_STATE] The badge icon instance isn't constructed."); + + Bitmap* pNumberedBadgeIconBitmap = null; + Bitmap* pNumberedBadgeIconEffectBitmap = null; + 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) + { + GET_BITMAP_CONFIG_N(HEADER::BADGE_ICON_BG_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, pNumberedBadgeIconEffectBitmap); + } + + GET_COLOR_CONFIG(HEADER::BADGE_ICON_BG_NORMAL, badgeIconBgNormalColor); + GET_COLOR_CONFIG(HEADER::BADGE_ICON_TEXT_NORMAL, badgeIconTextNormalColor); + + if (pNumberedBadgeIconBitmap) + { + pColorReplacedBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pNumberedBadgeIconBitmap, + Color::GetColor(COLOR_ID_MAGENTA), badgeIconBgNormalColor); + + __pTitleBadgeIcon->SetBackgroundBitmap(*pColorReplacedBitmap); + + delete pColorReplacedBitmap; + delete pNumberedBadgeIconBitmap; + } + + if (pNumberedBadgeIconEffectBitmap) + { + __pTitleBadgeIcon->SetBackgroundEffectBitmap(*pNumberedBadgeIconEffectBitmap); + + delete pNumberedBadgeIconEffectBitmap; + } + + __pTitleBadgeIcon->SetTextHorizontalAlignment(ALIGNMENT_CENTER); + __pTitleBadgeIcon->SetTextVerticalAlignment(ALIGNMENT_MIDDLE); + __pTitleBadgeIcon->SetTextColor(badgeIconTextNormalColor); + __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); + + __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); + } + + return E_SUCCESS; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_ToolbarModel.cpp b/src/ui/controls/FUiCtrl_ToolbarModel.cpp new file mode 100644 index 0000000..66435fb --- /dev/null +++ b/src/ui/controls/FUiCtrl_ToolbarModel.cpp @@ -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 FUiCtrl_ToolbarModel.cpp + * @brief This is the implementation file for the _ToolbarModel class. + */ + +#include +#include +#include "FUiCtrl_ToolbarModel.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + + +_ToolbarModel::~_ToolbarModel(void) +{ +} + +result +_ToolbarModel::Construct(void) +{ + return E_SUCCESS; +} + +int +_ToolbarModel::GetSelectedItemIndex(void) const +{ + return __selectedIndex; +} + +result +_ToolbarModel::SetSelectedItemIndex(int itemIndex) +{ + __selectedIndex = itemIndex; + + return E_SUCCESS; +} + +_ToolbarModel::_ToolbarModel(void) + : __selectedIndex(-1) +{ +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_ToolbarPresenter.cpp b/src/ui/controls/FUiCtrl_ToolbarPresenter.cpp new file mode 100644 index 0000000..36e84e0 --- /dev/null +++ b/src/ui/controls/FUiCtrl_ToolbarPresenter.cpp @@ -0,0 +1,2592 @@ +// +// 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_ToolbarPresenter.cpp + * @brief This is the implementation file for the _ToolbarPresenter class. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "FUiAnim_VisualElementImpl.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_UiTouchEvent.h" +#include "FUi_ResourceManager.h" +#include "FUiCtrl_Label.h" +#include "FUiCtrl_ToolbarPresenter.h" +#include "FUiCtrl_ToolbarModel.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Graphics; +using namespace Tizen::Graphics::_Text; +using namespace Tizen::Ui::Animations; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_ToolbarPresenter::_ToolbarPresenter(void) + : __pToolbar(null) + , __pToolbarModel(null) + , __initialDraw(true) + , __tabEditEnabled(false) + , __beingEdited(false) + , __touchInitiatedInToolbar(false) + , __editItemIndex(-1) + , __pressedItemIndex(-1) + , __initialPressesItemStatus(_BUTTON_STATUS_NORMAL) + , __pEditItem(null) + , __pTitleBackgroundBitmap(null) + , __pTitleSlideTimer(null) + , __pFlickAnimationTimer(null) + , __titleRect(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f)) + , __descriptionRect(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f)) + , __titleText(L"") + , __pTitleTextFont(null) + , __pTextFont(null) + , __pDescriptionTextObject(null) + , __pTitleTextObject(null) + , __pDividerVe(null) + , __flickAnimation() + , __moveDistance(0.0f) + , __flickMove(0.0f) + , __flickDistance(0.0f) + , __flickFlag(0) + , __firstLoadedItemIndex(0) + , __lastLoadedItemIndex(0) + , __tabSlideLeft(false) + , __tabSlideRight(false) + , __portraitSize(FloatDimension(0.0f, 0.0f)) + , __landscapeSize(FloatDimension(0.0f, 0.0f)) + , __fontStyle(0) + , __fontSize(0.0f) + , __tabMoved(false) + , __titlePressed(false) + , __titleSliding(false) +{ + __currentTouchPosition = FloatPoint(0.0f, 0.0f); +} + +_ToolbarPresenter::~_ToolbarPresenter(void) +{ + if (__pToolbarModel) + { + delete __pToolbarModel; + __pToolbarModel = null; + } + + if (__pEditItem) + { + __pToolbar->DetachChild(*__pEditItem); + delete __pEditItem; + __pEditItem = null; + } + + if (__pTitleBackgroundBitmap) + { + delete __pTitleBackgroundBitmap; + __pTitleBackgroundBitmap = null; + } + + if (__pTitleSlideTimer) + { + delete __pTitleSlideTimer; + __pTitleSlideTimer = null; + } + + if (__pFlickAnimationTimer) + { + delete __pFlickAnimationTimer; + __pFlickAnimationTimer = null; + } + + if (__pDescriptionTextObject) + { + delete __pDescriptionTextObject; + __pDescriptionTextObject = null; + } + + if (__pTitleTextObject) + { + delete __pTitleTextObject; + __pTitleTextObject = null; + } + + if (__pDividerVe) + { + __pDividerVe->RemoveAllAnimations(); + __pDividerVe->Destroy(); + __pDividerVe = null; + } +} + +result +_ToolbarPresenter::Construct(const _Toolbar& toolbar) +{ + __pToolbar = const_cast<_Toolbar*>(&toolbar); + + float width = 0.0f; + float height = 0.0f; + + __fontStyle = FONT_STYLE_BOLD; + + __portraitSize = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF(); + __landscapeSize = FloatDimension(__portraitSize.height, __portraitSize.width); + + if (__pToolbar->GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT) + { + width = __portraitSize.width; + height = __portraitSize.height; + } + else + { + width = __landscapeSize.width; + height = __landscapeSize.height; + } + + __flickAnimation.SetSizeInformation(width, height, DEVICE_SIZE_HORIZONTAL, DEVICE_SIZE_VERTICAL); + __flickAnimation.SetSensitivity(FLICK_ANIMATION_FPS_TAB, FLICK_ANIMATION_SENSITIVITY_TAB); + __flickAnimation.SetDirection(FD_HORIZONTAL); + + return E_SUCCESS; +} + +result +_ToolbarPresenter::Install(void) +{ + _ToolbarModel* pModel = new (std::nothrow) _ToolbarModel(); + + _SetModel(*pModel); + + result r = pModel->Construct(); + + return r; +} + +result +_ToolbarPresenter::Draw(void) +{ + result r = E_SUCCESS; + + ToolbarStyle style = __pToolbar->GetStyle(); + + DrawBackground(); + + DrawItems(); + + Canvas* pCanvas = __pToolbar->GetCanvasN(); + + if (pCanvas == null) + { + SysLog(NID_UI_CTRL, "Cannot get a canvas."); + + return E_SYSTEM; + } + + float fontSize = 0.0f; + + if (style == TOOLBAR_TITLE || style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || style == TOOLBAR_TAB_WITH_TITLE) + { + if (__pTitleBackgroundBitmap) + { + delete __pTitleBackgroundBitmap; + __pTitleBackgroundBitmap = null; + } + + if (style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || style == TOOLBAR_TAB_WITH_TITLE) + { + GET_SHAPE_CONFIG(HEADER::TITLE_FONT_SIZE_WITH_SEGMENTED, __pToolbar->GetOrientation(), fontSize); + + if (!__titleText.IsEmpty()) + { + __fontSize = fontSize; + + __pTitleTextFont = __pToolbar->GetFallbackFont(); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, __pTitleTextFont, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pTitleTextObject->SetFont(__pTitleTextFont, 0, __pTitleTextObject->GetTextLength()); + } + } + else if (style == TOOLBAR_TITLE && __pToolbar->GetDescriptionText() != L"" + && __pToolbar->GetWaitingAnimationStatus(TOOLBAR_ANIMATION_POSITION_TITLE) == ANIMATION_STOPPED) + { + GET_SHAPE_CONFIG(HEADER::TITLE_TOP_MARGIN_WITH_DESCRIPTION, __pToolbar->GetOrientation(), __titleRect.y); + __titleRect.height = _FontImpl::GetInstance(*__pTitleTextFont)->GetLeadingF(); + GET_SHAPE_CONFIG(HEADER::TITLE_FONT_SIZE_WITH_DESCRIPTION, __pToolbar->GetOrientation(), fontSize); + + DrawDescriptionText(); + + if (!__titleText.IsEmpty()) + { + __fontSize = fontSize; + + __pTitleTextFont = __pToolbar->GetFallbackFont(); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, __pTitleTextFont, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pTitleTextObject->SetFont(__pTitleTextFont, 0, __pTitleTextObject->GetTextLength()); + } + } + + __pTitleBackgroundBitmap = new (std::nothrow) Bitmap(); + __pTitleBackgroundBitmap->Construct(*pCanvas, __titleRect); + + DrawTitleText(pCanvas); + } + + DrawDivider(); + + if (__initialDraw) + { + if ((style == TOOLBAR_TAB || style == TOOLBAR_TAB_WITH_TITLE || style == TOOLBAR_TAB_LARGE + || style == TOOLBAR_SEGMENTED || style == TOOLBAR_HEADER_SEGMENTED || style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE) + && __pToolbar->GetItemCount() > 0 && __pToolbarModel->GetSelectedItemIndex() == -1) + { + int firstEnabledItemIndex = __pToolbar->GetFirstEnabledItemIndex(); + + if (firstEnabledItemIndex != -1) + { + __pToolbar->SetItemSelected(firstEnabledItemIndex, true, false); + } + } + + __initialDraw = false; + } + + delete pCanvas; + + return E_SUCCESS; +} + +void +_ToolbarPresenter::DrawDivider(void) +{ + ToolbarStyle style = __pToolbar->GetStyle(); + + if (style == TOOLBAR_SOFTKEY) + { + return ; + } + + float buttonItemGap = 0.0f; + float dividerBaseHeight = 0.0f; + float dividerHeight = 0.0f; + float dividerTopMargin = 0.0f; + + int itemCount = __pToolbar->GetItemCount(); + + GET_SHAPE_CONFIG(HEADER::DIVIDER_WIDTH, __pToolbar->GetOrientation(), buttonItemGap); + + if (style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || style == TOOLBAR_TAB_WITH_TITLE) + { + GET_SHAPE_CONFIG(HEADER::SEGMENTED_ITEM_HEIGHT, __pToolbar->GetOrientation(), dividerBaseHeight); + GET_SHAPE_CONFIG(HEADER::TITLE_HEIGHT_WITH_SEGMENTED_ITEM, __pToolbar->GetOrientation(), dividerTopMargin); + } + else + { + GET_SHAPE_CONFIG(HEADER::HEIGHT, __pToolbar->GetOrientation(), dividerBaseHeight); + } + + if (style == TOOLBAR_TAB_LARGE) + { + GET_SHAPE_CONFIG(HEADER::TAB_LARGE_DIVIDER_HEIGHT, __pToolbar->GetOrientation(), dividerHeight); + } + 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); + + if (__pToolbar->GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT) + { + if (bounds.width > __portraitSize.width) + { + bounds.width = __portraitSize.width; + } + } + else + { + if (bounds.width > __landscapeSize.width) + { + bounds.width = __landscapeSize.width; + } + } + + Canvas* pCanvas = null; + int Z_ORDER_GROUP_CONTROL = 2001; + + if (__pDividerVe == null) + { + __pDividerVe = new (std::nothrow) VisualElement(); + SysTryReturnVoidResult(NID_UI_CTRL, __pDividerVe, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + __pDividerVe->Construct(); + __pDividerVe->SetName(L"DividerEffect"); + } + + __pDividerVe->SetBounds(FloatRectangle(0.0f, 0.0f, __pToolbar->GetBoundsF().width, __pToolbar->GetBoundsF().height)); + __pDividerVe->SetShowState(true); + __pDividerVe->SetImplicitAnimationEnabled(false); + + _VisualElementImpl::GetInstance(*__pDividerVe)->SetZOrderGroup(Z_ORDER_GROUP_CONTROL + 1); + __pToolbar->GetVisualElement()->AttachChild(*__pDividerVe); + + pCanvas = __pDividerVe->GetCanvasN(); + + if (!pCanvas) + { + __pDividerVe->Destroy(); + __pDividerVe = null; + + SysLog(NID_UI_CTRL, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + return; + } + + Color backgroundColor(0, 0, 0, 0); + pCanvas->SetBackgroundColor(backgroundColor); + pCanvas->Clear(); + + //buttonItem Divider + if (style == TOOLBAR_TITLE || style == TOOLBAR_HEADER_SEGMENTED) + { + if (__pToolbar->GetButton(RIGHT_BUTTON)) + { + if (__pToolbar->GetButton(LEFT_BUTTON)) + { + DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(RIGHT_BUTTON)->GetBoundsF().width - buttonItemGap / 2, + (__pToolbar->GetBoundsF().height - dividerHeight) / 2), pCanvas); + + DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(RIGHT_BUTTON)->GetBoundsF().width - buttonItemGap + - __pToolbar->GetButton(LEFT_BUTTON)->GetBoundsF().width - buttonItemGap / 2, + (__pToolbar->GetBoundsF().height - dividerHeight) / 2), pCanvas); + } + else + { + DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(RIGHT_BUTTON)->GetBoundsF().width - buttonItemGap / 2, + (__pToolbar->GetBoundsF().height - dividerHeight) / 2), pCanvas); + } + } + else + { + if (__pToolbar->GetButton(LEFT_BUTTON)) + { + DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(LEFT_BUTTON)->GetBoundsF().width - buttonItemGap / 2, + (__pToolbar->GetBoundsF().height - dividerHeight) / 2), pCanvas); + } + } + } + else if (style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE) + { + if (__pToolbar->GetButton(RIGHT_BUTTON)) + { + if (__pToolbar->GetButton(LEFT_BUTTON)) + { + DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(RIGHT_BUTTON)->GetBoundsF().width - buttonItemGap / 2, + dividerTopMargin + (dividerBaseHeight - dividerHeight) / 2), pCanvas); + + DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(RIGHT_BUTTON)->GetBoundsF().width - buttonItemGap + - __pToolbar->GetButton(LEFT_BUTTON)->GetBoundsF().width - buttonItemGap / 2, + dividerTopMargin + (dividerBaseHeight - dividerHeight) / 2), pCanvas); + } + else + { + DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(RIGHT_BUTTON)->GetBoundsF().width - buttonItemGap / 2, + dividerTopMargin + (dividerBaseHeight - dividerHeight) / 2), pCanvas); + } + } + else + { + if (__pToolbar->GetButton(LEFT_BUTTON)) + { + DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(LEFT_BUTTON)->GetBoundsF().width - buttonItemGap / 2, + dividerTopMargin + (dividerBaseHeight - dividerHeight) / 2), pCanvas); + } + } + } + else if (style == TOOLBAR_TAB_WITH_TITLE) + { + if (__pToolbar->GetButton(RIGHT_BUTTON)) + { + if (__pToolbar->GetButton(LEFT_BUTTON)) + { + DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(RIGHT_BUTTON)->GetBoundsF().width - buttonItemGap / 2, + (dividerTopMargin - dividerHeight) / 2), pCanvas); + + DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(RIGHT_BUTTON)->GetBoundsF().width - buttonItemGap + - __pToolbar->GetButton(LEFT_BUTTON)->GetBoundsF().width - buttonItemGap / 2, + (dividerTopMargin - dividerHeight) / 2), pCanvas); + } + else + { + DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(RIGHT_BUTTON)->GetBoundsF().width - buttonItemGap / 2, + (dividerTopMargin - dividerHeight) / 2), pCanvas); + } + } + else + { + if (__pToolbar->GetButton(LEFT_BUTTON)) + { + DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(LEFT_BUTTON)->GetBoundsF().width - buttonItemGap / 2, + (dividerTopMargin - dividerHeight) / 2), pCanvas); + } + } + } + else if (style == TOOLBAR_SEGMENTED || style == TOOLBAR_TEXT || style == TOOLBAR_ICON || style == TOOLBAR_ICON_TEXT || style == TOOLBAR_COMMAND) + { + if (__pToolbar->GetButton(RIGHT_BUTTON)) + { + DrawDividerLine(FloatPoint(bounds.width - __pToolbar->GetButton(RIGHT_BUTTON)->GetBoundsF().width - buttonItemGap / 2, + (__pToolbar->GetBoundsF().height - dividerHeight) / 2), pCanvas); + } + + if (__pToolbar->GetButton(LEFT_BUTTON)) + { + DrawDividerLine(FloatPoint(__pToolbar->GetButton(LEFT_BUTTON)->GetBoundsF().width + buttonItemGap / 2, + (__pToolbar->GetBoundsF().height - dividerHeight) / 2), pCanvas); + } + } + + // Headeritem, FooterItemDivider + if (itemCount == 1) + { + ; // empty + } + else + { + if (style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || style == TOOLBAR_TAB_WITH_TITLE) + { + for (int i = 0; i < itemCount - 1 ; i++) + { + if (i < itemCount - 2) + { + DrawDividerLine(FloatPoint(__pToolbar->GetItem(i)->GetBoundsF().x + __pToolbar->GetItem(i)->GetBoundsF().width, + dividerTopMargin + (dividerBaseHeight - dividerHeight) / 2), pCanvas); + } + else // i == (itemCount - 2) + { + DrawDividerLine(FloatPoint(__pToolbar->GetItem(i + 1)->GetBoundsF().x, + dividerTopMargin + (dividerBaseHeight - dividerHeight) / 2), pCanvas); + } + } + } + else + { + for (int i = 0; i < itemCount - 1 ; i++) + { + if (i < itemCount - 2) + { + DrawDividerLine(FloatPoint(__pToolbar->GetItem(i)->GetBoundsF().x + __pToolbar->GetItem(i)->GetBoundsF().width, + (__pToolbar->GetBoundsF().height - dividerHeight) / 2), pCanvas); + } + else // i == (itemCount - 2) + { + DrawDividerLine(FloatPoint(__pToolbar->GetItem(i + 1)->GetBoundsF().x, + (__pToolbar->GetBoundsF().height - dividerHeight) / 2), pCanvas); + } + } + } + } + + delete pCanvas; + + return; +} + +void +_ToolbarPresenter::DrawBackground(void) +{ + Canvas* pCanvas = __pToolbar->GetCanvasN(); + + if (pCanvas == null) + { + SysLog(NID_UI_CTRL, "Cannot get a canvas."); + + return; + } + + ToolbarStyle style = __pToolbar->GetStyle(); + + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(); + + if (style == TOOLBAR_SOFTKEY) + { + delete pCanvas; + + return; + } + + Bitmap* pReplacementColorBackgroundBitmap = null; + Bitmap* pBackgroundBitmap = null; + //Bitmap* pBackgroundEffectBitmap = null; + + FloatRectangle bounds(0.0f, 0.0f, __pToolbar->GetBoundsF().width, __pToolbar->GetBoundsF().height); + + __portraitSize = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF(); + __landscapeSize = FloatDimension(__portraitSize.height, __portraitSize.width); + + if (__pToolbar->GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT) + { + if (bounds.width > __portraitSize.width) + { + bounds.width = __portraitSize.width; + } + } + else + { + if (bounds.width > __landscapeSize.width) + { + bounds.width = __landscapeSize.width; + } + } + + pBackgroundBitmap = __pToolbar->GetBackgroundBitmap(); + //pBackgroundEffectBitmap = __pToolbar->GetBackgroundEffectBitmap(); + + pReplacementColorBackgroundBitmap = + _BitmapImpl::GetColorReplacedBitmapN(*pBackgroundBitmap, Color::GetColor(COLOR_ID_MAGENTA), __pToolbar->GetColor()); + + if (__pToolbar->IsUserBackgroundBitmap()) + { + if (pBackgroundBitmap) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pBackgroundBitmap)) + { + pCanvas->DrawNinePatchedBitmap(bounds, *pBackgroundBitmap); + } + else + { + pCanvas->DrawBitmap(bounds, *pBackgroundBitmap, FloatRectangle(0.0f, 0.0f, pBackgroundBitmap->GetWidthF(), pBackgroundBitmap->GetHeightF())); + } + } + else + { + pCanvas->FillRectangle(__pToolbar->GetColor(), bounds); + } + } + else + { + if (pReplacementColorBackgroundBitmap) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pReplacementColorBackgroundBitmap)) + { + pCanvas->DrawNinePatchedBitmap(bounds, *pReplacementColorBackgroundBitmap); + } + else + { + pCanvas->DrawBitmap(bounds, *pReplacementColorBackgroundBitmap, FloatRectangle(0.0f, 0.0f, pReplacementColorBackgroundBitmap->GetWidthF(), pReplacementColorBackgroundBitmap->GetHeightF())); + } + } + else + { + pCanvas->FillRectangle(__pToolbar->GetColor(), bounds); + } + + //if (pBackgroundEffectBitmap) + //{ + // if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pBackgroundEffectBitmap)) + // { + // pCanvas->DrawNinePatchedBitmap(bounds, *pBackgroundEffectBitmap); + // } + // else + // { + // pCanvas->DrawBitmap(bounds, *pBackgroundEffectBitmap, FloatRectangle(0.0f, 0.0f, pBackgroundEffectBitmap->GetWidthF(), pBackgroundEffectBitmap->GetHeightF())); + // } + //} + } + + if (style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || style == TOOLBAR_TAB_WITH_TITLE) + { + Bitmap* pSubTitleEffectBitmap = null; + Color subTitleEffectColor; + float topMargin = 0.0f; + + GET_BITMAP_CONFIG_N(HEADER::SUB_TITLE_EFFECT, BITMAP_PIXEL_FORMAT_ARGB8888, pSubTitleEffectBitmap); + GET_COLOR_CONFIG(HEADER::SUB_TITLE_EFFECT_NORMAL, subTitleEffectColor); + GET_SHAPE_CONFIG(HEADER::TITLE_HEIGHT_WITH_SEGMENTED_ITEM, __pToolbar->GetOrientation(), topMargin); + + FloatRectangle subTitleEffectBounds(0.0f, topMargin, __pToolbar->GetBoundsF().width, __pToolbar->GetBoundsF().height - topMargin); + + Bitmap* pReColorSubTitleEffectBitmap = null; + + pReColorSubTitleEffectBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pSubTitleEffectBitmap, Color::GetColor(COLOR_ID_MAGENTA), subTitleEffectColor); + + if (pReColorSubTitleEffectBitmap) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pReColorSubTitleEffectBitmap)) + { + pCanvas->DrawNinePatchedBitmap(subTitleEffectBounds, *pReColorSubTitleEffectBitmap); + } + else + { + pCanvas->DrawBitmap(subTitleEffectBounds, *pReColorSubTitleEffectBitmap, FloatRectangle(0.0f, 0.0f, pReColorSubTitleEffectBitmap->GetWidthF(), pReColorSubTitleEffectBitmap->GetHeightF())); + } + } + + delete pReColorSubTitleEffectBitmap; + delete pSubTitleEffectBitmap; + } + + delete pCanvas; + delete pReplacementColorBackgroundBitmap; + + return; +} + +void +_ToolbarPresenter::DrawDescriptionText(void) +{ + result r = E_SUCCESS; + + float textAreaHeight = 0.0f; + float fontSize = 0.0f; + float titleIconWidth = 0.0f; + + GET_SHAPE_CONFIG(HEADER::DESCRIPTION_TEXT_HEIGHT, __pToolbar->GetOrientation(), textAreaHeight); + GET_SHAPE_CONFIG(HEADER::DESCRIPTION_TEXT_FONT_SIZE, __pToolbar->GetOrientation(), fontSize); + GET_SHAPE_CONFIG(HEADER::ICON_WIDTH, __pToolbar->GetOrientation(), titleIconWidth); + + __fontSize = fontSize; + + __pTextFont = __pToolbar->GetFallbackFont(); + r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, __pTextFont, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (__pToolbar->GetTitleIcon() != null) + { + __descriptionRect.x = __toolbarUsableArea.x + titleIconWidth + __toolbarUsableArea.x; + } + else + { + __descriptionRect.x = __toolbarUsableArea.x; + } + + __descriptionRect.y = __titleRect.y + __titleRect.height; + + if (__titleText.IsEmpty()) + { + __descriptionRect.width = __toolbarUsableArea.width; + } + else + { + __descriptionRect.width = __titleRect.width; + } + + __descriptionRect.height = textAreaHeight; + + Canvas* pCanvas = __pToolbar->GetCanvasN(); + + if (__pDescriptionTextObject) + { + __pDescriptionTextObject->SetFont(__pTextFont, 0, __pDescriptionTextObject->GetTextLength()); + __pDescriptionTextObject->SetForegroundColor(__pToolbar->GetDescriptionTextColor(), 0, __pDescriptionTextObject->GetTextLength()); + __pDescriptionTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); + __pDescriptionTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT); + __pDescriptionTextObject->SetBounds(__descriptionRect); + __pDescriptionTextObject->Compose(); + __pDescriptionTextObject->Draw(*_CanvasImpl::GetInstance(*pCanvas)); + } + + delete pCanvas; + + return; +} + +void +_ToolbarPresenter::DrawEditItem(const FloatPoint& point) +{ + if (__pEditItem == null) + { + return; + } + + FloatPoint anchor = FloatPoint(0.0f, 0.0f); + + anchor.x = point.x - (__pEditItem->GetSizeF().width / 2); + anchor.y = point.y - (__pEditItem->GetSizeF().height / 2); + + __pEditItem->SetPosition(anchor); + + __pToolbar->Invalidate(true); + + return; +} + +void +_ToolbarPresenter::DrawDividerLine(const FloatPoint& point, Canvas* pCanvas) +{ + float dividerWidth = 0.0f; + float dividerHeight = 0.0f; + Color dividerLeftColor; + //Color dividerRightColor; + + ToolbarStyle style = __pToolbar->GetStyle(); + + GET_SHAPE_CONFIG(HEADER::DIVIDER_WIDTH, __pToolbar->GetOrientation(), dividerWidth); + + if (style == TOOLBAR_TAB_LARGE) + { + GET_SHAPE_CONFIG(HEADER::TAB_LARGE_DIVIDER_HEIGHT, __pToolbar->GetOrientation(), dividerHeight); + } + 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) + { + if (!__pToolbar->IsTransparent()) + { + GET_COLOR_CONFIG(HEADER::DIVIDER_LINE_LEFT_NORMAL, dividerLeftColor); + //GET_COLOR_CONFIG(HEADER::DIVIDER_LINE_RIGHT_NORMAL, dividerRightColor); + } + else + { + GET_COLOR_CONFIG(HEADER::DIVIDER_LINE_LEFT_TRANSLUCENT_NORMAL, dividerLeftColor); + //GET_COLOR_CONFIG(HEADER::DIVIDER_LINE_RIGHT_TRANSLUCENT_NORMAL, dividerRightColor); + } + } + else + { + if (!__pToolbar->IsTransparent()) + { + GET_COLOR_CONFIG(FOOTER::DIVIDER_LINE_LEFT_NORMAL, dividerLeftColor); + //GET_COLOR_CONFIG(FOOTER::DIVIDER_LINE_RIGHT_NORMAL, dividerRightColor); + } + else + { + GET_COLOR_CONFIG(FOOTER::DIVIDER_LINE_LEFT_TRANSLUCENT_NORMAL, dividerLeftColor); + //GET_COLOR_CONFIG(FOOTER::DIVIDER_LINE_RIGHT_TRANSLUCENT_NORMAL, dividerRightColor); + } + } + + pCanvas->SetForegroundColor(dividerLeftColor); + pCanvas->SetLineWidth(dividerWidth); + + pCanvas->DrawLine(FloatPoint(point.x, point.y), FloatPoint(point.x, point.y + dividerHeight)); + + return; +} + +void +_ToolbarPresenter::DrawItems(void) +{ + result r = E_SUCCESS; + + Canvas* pCanvas = __pToolbar->GetCanvasN(); + + SysTryReturnVoidResult(NID_UI_CTRL, pCanvas, E_INVALID_STATE, "[E_INVALID_STATE] System error occurred."); + + ToolbarStyle style = __pToolbar->GetStyle(); + + FloatRectangle usableArea = __toolbarUsableArea; + + Bitmap* pTitleIcon = __pToolbar->GetTitleIcon(); + + _Label* pTitleBadgeIcon = __pToolbar->GetTitleBadgeIcon(); + + float iconWidth = 0.0f; + float iconRightMargin = 0.0f; + float titleDisplayHeight = 0.0f; + float leftMargin = 0.0f; + float headerTopMargin = 0.0f; + float processingAnimationIconSize = 0.0f; + float processingAnimationIconGap = 0.0f; + float titleCharacterCount = 0.0f; + float titleBadgeIconGap = 0.0f; + float titleBadgeIconTopMargin = 0.0f; + float fontSize = 0.0f; + FloatDimension titleTextDimension(0.0f, 0.0f); + float totalWidth = 0.0f; + float titleHeight = 0.0f; + + GET_SHAPE_CONFIG(HEADER::LEFT_MARGIN, __pToolbar->GetOrientation(), leftMargin); + GET_SHAPE_CONFIG(HEADER::PROCESSING_ANIMATION_ICON_SIZE, __pToolbar->GetOrientation(), processingAnimationIconSize); + GET_SHAPE_CONFIG(HEADER::PROCESSING_ANIMATION_ICON_GAP, __pToolbar->GetOrientation(), processingAnimationIconGap); + + GET_SHAPE_CONFIG(HEADER::TITLE_BADGE_ICON_GAP, __pToolbar->GetOrientation(), titleBadgeIconGap); + GET_SHAPE_CONFIG(HEADER::TITLE_BADGE_TOP_MARGIN, __pToolbar->GetOrientation(), titleBadgeIconTopMargin); + + if (style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || style == TOOLBAR_TAB_WITH_TITLE) + { + GET_SHAPE_CONFIG(HEADER::TITLE_TOP_MARGIN_WITH_SEGMENTED_ITEM, __pToolbar->GetOrientation(), headerTopMargin); + GET_SHAPE_CONFIG(HEADER::TITLE_DISPLAY_HEIGHT_WITH_SEGMENTED_ITEM, __pToolbar->GetOrientation(), titleDisplayHeight); + } + else + { + GET_SHAPE_CONFIG(HEADER::TOP_MARGIN, __pToolbar->GetOrientation(), headerTopMargin); + GET_SHAPE_CONFIG(HEADER::TITLE_DISPLAY_HEIGHT, __pToolbar->GetOrientation(), titleDisplayHeight); + } + + GET_SHAPE_CONFIG(HEADER::ICON_WIDTH, __pToolbar->GetOrientation(), iconWidth); + GET_SHAPE_CONFIG(HEADER::ICON_RIGHT_MARGIN, __pToolbar->GetOrientation(), iconRightMargin); + + if (!__titleText.IsEmpty()) + { + titleCharacterCount = __titleText.GetLength(); // alphabet count + + if (style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || style == TOOLBAR_TAB_WITH_TITLE) + { + r = GET_SHAPE_CONFIG(HEADER::TITLE_FONT_SIZE_WITH_SEGMENTED, __pToolbar->GetOrientation(), fontSize); + } + else if (style == TOOLBAR_TITLE && __pToolbar->GetDescriptionText() != L"" + && __pToolbar->GetWaitingAnimationStatus(TOOLBAR_ANIMATION_POSITION_TITLE) == ANIMATION_STOPPED) + { + r = GET_SHAPE_CONFIG(HEADER::TITLE_FONT_SIZE_WITH_DESCRIPTION, __pToolbar->GetOrientation(), fontSize); + } + else + { + r = GET_SHAPE_CONFIG(HEADER::TITLE_FONT_SIZE, __pToolbar->GetOrientation(), fontSize); + } + + if (IsFailed(r)) + { + delete pCanvas; + + return; + } + + __fontSize = fontSize; + + __pTitleTextFont = __pToolbar->GetFallbackFont(); + r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_CTRL, __pTitleTextFont, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pTitleTextObject->SetFont(__pTitleTextFont, 0, __pTitleTextObject->GetTextLength()); + + __pTitleTextFont->GetTextExtent(__titleText, titleCharacterCount, titleTextDimension); + + totalWidth = titleTextDimension.width; // pixel + titleHeight = titleTextDimension.height; // pixel + + __titleRect.height = _FontImpl::GetInstance(*__pTitleTextFont)->GetLeadingF(); + + if (pTitleIcon) + { + pTitleIcon->Scale(FloatDimension(iconWidth, iconWidth)); + } + + if (pTitleIcon) + { + totalWidth += (pTitleIcon->GetWidthF() + iconRightMargin); + } + + + if (pTitleBadgeIcon) + { + totalWidth += pTitleBadgeIcon->GetBoundsF().width + titleBadgeIconGap; + } + else if ((__pToolbar->GetWaitingAnimationStatus(TOOLBAR_ANIMATION_POSITION_TITLE)) != ANIMATION_STOPPED) + { + totalWidth += processingAnimationIconSize + processingAnimationIconGap; + } + + if (totalWidth > usableArea.width) + { + __titleRect.width = titleTextDimension.width - (totalWidth - usableArea.width); + + if (pTitleIcon) + { + pCanvas->DrawBitmap(FloatPoint(usableArea.x, headerTopMargin + (titleDisplayHeight - pTitleIcon->GetHeightF()) / 2), *(pTitleIcon)); + + __titleRect.x = usableArea.x + pTitleIcon->GetWidthF() + iconRightMargin; + __titleRect.y = headerTopMargin + (titleDisplayHeight - titleHeight) / 2; + + if (__pToolbar->GetWaitingAnimationStatus(TOOLBAR_ANIMATION_POSITION_TITLE) != ANIMATION_STOPPED) + { + __pToolbar->SetWaitingAnimationPosition(TOOLBAR_ANIMATION_POSITION_TITLE, + usableArea.x + (pTitleIcon->GetWidthF() + processingAnimationIconGap) + __titleRect.width + processingAnimationIconGap, + headerTopMargin + (titleDisplayHeight - processingAnimationIconSize) / 2); + } + + if (pTitleBadgeIcon) + { + pTitleBadgeIcon->SetPosition(FloatPoint(usableArea.x + (pTitleIcon->GetWidthF() + processingAnimationIconGap) + __titleRect.width + titleBadgeIconGap, + titleBadgeIconTopMargin)); + } + } + else + { + __titleRect.x = usableArea.x; + __titleRect.y = headerTopMargin + (titleDisplayHeight - titleHeight) / 2; + + if (__pToolbar->GetWaitingAnimationStatus(TOOLBAR_ANIMATION_POSITION_TITLE) != ANIMATION_STOPPED) + { + __pToolbar->SetWaitingAnimationPosition(TOOLBAR_ANIMATION_POSITION_TITLE, + usableArea.x + __titleRect.width + processingAnimationIconGap, + headerTopMargin + (titleDisplayHeight - processingAnimationIconSize) / 2); + } + + if (pTitleBadgeIcon) + { + pTitleBadgeIcon->SetPosition(FloatPoint(usableArea.x + __titleRect.width + titleBadgeIconGap, titleBadgeIconTopMargin)); + } + } + } + else + { + __titleRect.width = usableArea.width; + + if (pTitleIcon) + { + __titleRect.x = leftMargin + pTitleIcon->GetWidthF() + iconRightMargin; + __titleRect.y = headerTopMargin + (titleDisplayHeight - titleHeight) / 2; + + if (__pTitleTextObject->GetAlignment() & TEXT_OBJECT_ALIGNMENT_CENTER) + { + leftMargin = (__titleRect.width - titleTextDimension.width) / 2; + } + else if (__pTitleTextObject->GetAlignment() & TEXT_OBJECT_ALIGNMENT_RIGHT) + { + leftMargin = __titleRect.width - titleTextDimension.width - iconRightMargin * 2; + } + + pCanvas->DrawBitmap(FloatPoint(leftMargin, headerTopMargin + (titleDisplayHeight - pTitleIcon->GetHeightF()) / 2), *(pTitleIcon)); + + if (__pToolbar->GetWaitingAnimationStatus(TOOLBAR_ANIMATION_POSITION_TITLE) != ANIMATION_STOPPED) + { + __pToolbar->SetWaitingAnimationPosition(TOOLBAR_ANIMATION_POSITION_TITLE, + usableArea.x + (pTitleIcon->GetWidthF() + processingAnimationIconGap) + titleTextDimension.width + processingAnimationIconGap, + headerTopMargin + (titleDisplayHeight - processingAnimationIconSize) / 2); + } + + if (pTitleBadgeIcon) + { + pTitleBadgeIcon->SetPosition(FloatPoint(usableArea.x + (pTitleIcon->GetWidthF() + processingAnimationIconGap) + titleTextDimension.width + titleBadgeIconGap, + titleBadgeIconTopMargin)); + } + + __titleRect.width -= (pTitleIcon->GetWidthF() + iconRightMargin); + } + else + { + __titleRect.x = leftMargin; + __titleRect.y = headerTopMargin + (titleDisplayHeight - titleHeight) / 2; + + if (__pToolbar->GetWaitingAnimationStatus(TOOLBAR_ANIMATION_POSITION_TITLE) != ANIMATION_STOPPED) + { + __pToolbar->SetWaitingAnimationPosition(TOOLBAR_ANIMATION_POSITION_TITLE, + leftMargin + titleTextDimension.width + processingAnimationIconGap, + headerTopMargin + (titleDisplayHeight - processingAnimationIconSize) / 2); + } + + if (pTitleBadgeIcon) + { + pTitleBadgeIcon->SetPosition(FloatPoint(leftMargin + titleTextDimension.width + titleBadgeIconGap, titleBadgeIconTopMargin)); + } + } + } + } + else // empty title + { + if (pTitleIcon && __pToolbar->GetWaitingAnimationStatus(TOOLBAR_ANIMATION_POSITION_TITLE) != ANIMATION_STOPPED) + { + pTitleIcon->Scale(FloatDimension(iconWidth, iconWidth)); + + if (__pToolbar->GetTitleTextHorizontalAlignment() == ALIGNMENT_CENTER) + { + leftMargin = (leftMargin + usableArea.width - (pTitleIcon->GetWidthF() + processingAnimationIconGap + processingAnimationIconSize)) / 2; + } + else if (__pToolbar->GetTitleTextHorizontalAlignment() == ALIGNMENT_RIGHT) + { + leftMargin = leftMargin + usableArea.width - (pTitleIcon->GetWidthF() + processingAnimationIconGap + processingAnimationIconSize); + } + + pCanvas->DrawBitmap(FloatPoint(leftMargin, headerTopMargin + (titleDisplayHeight - pTitleIcon->GetHeightF()) / 2), *(pTitleIcon)); + + __pToolbar->SetWaitingAnimationPosition(TOOLBAR_ANIMATION_POSITION_TITLE, + leftMargin + processingAnimationIconGap + processingAnimationIconSize, + headerTopMargin + (titleDisplayHeight - processingAnimationIconSize) / 2); + + if (pTitleBadgeIcon) + { + pTitleBadgeIcon->SetPosition(FloatPoint(leftMargin + processingAnimationIconGap + titleBadgeIconGap, titleBadgeIconTopMargin)); + } + } + else if (pTitleIcon) + { + pTitleIcon->Scale(FloatDimension(iconWidth, iconWidth)); + + if (__pToolbar->GetTitleTextHorizontalAlignment() == ALIGNMENT_CENTER) + { + leftMargin = usableArea.width / 2; + } + else if (__pToolbar->GetTitleTextHorizontalAlignment() == ALIGNMENT_RIGHT) + { + leftMargin = usableArea.width - pTitleIcon->GetWidthF(); + } + + pCanvas->DrawBitmap(FloatPoint(leftMargin, headerTopMargin + (titleDisplayHeight - pTitleIcon->GetHeightF()) / 2), *(pTitleIcon)); + } + else + { + if (__pToolbar->GetTitleTextHorizontalAlignment() == ALIGNMENT_CENTER) + { + leftMargin = (usableArea.width - (processingAnimationIconGap + processingAnimationIconSize))/ 2; + } + else if (__pToolbar->GetTitleTextHorizontalAlignment() == ALIGNMENT_RIGHT) + { + leftMargin = usableArea.width - (processingAnimationIconGap + processingAnimationIconSize); + } + + __pToolbar->SetWaitingAnimationPosition(TOOLBAR_ANIMATION_POSITION_TITLE, + leftMargin, headerTopMargin + (titleDisplayHeight - processingAnimationIconSize) / 2); + + if (pTitleBadgeIcon) + { + pTitleBadgeIcon->SetPosition(FloatPoint(leftMargin, titleBadgeIconTopMargin)); + } + } + } + + delete pCanvas; + + return; +} + +result +_ToolbarPresenter::DrawTitleText(Canvas* pCanvas) +{ + TimerForTitleSlideInit(); + + if (__titleText.IsEmpty()) + { + return E_SUCCESS; + } + + __pTitleTextObject->SetForegroundColor(__pToolbar->GetTitleTextColor(), 0, __pTitleTextObject->GetTextLength()); + __pTitleTextObject->SetBounds(__titleRect); + //__pTitleTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE); + __pTitleTextObject->Compose(); + + if (__pTitleTextObject->IsActionOn() == true) + { + __pTitleTextObject->DrawWithOffset(*_CanvasImpl::GetInstance(*pCanvas)); + + DrawTitleTextDimBitmap(); + + TimerForTitleSlideStart(); + } + else + { + __pTitleTextObject->Draw(*_CanvasImpl::GetInstance(*pCanvas)); + } + + return E_SUCCESS; +} + +int +_ToolbarPresenter::GetSelectedItemIndex(void) const +{ + return __pToolbarModel->GetSelectedItemIndex(); +} + +bool +_ToolbarPresenter::IsInitialDraw(void) const +{ + return __initialDraw; +} + +bool +_ToolbarPresenter::IsTabEditModeEnabled(void) const +{ + return __tabEditEnabled; +} + +result +_ToolbarPresenter::SetDescriptionText(const String& description) +{ + result r = E_SUCCESS; + + float length = description.GetLength(); + float fontSize = 0.0f; + + wchar_t* tempString = const_cast(description.GetPointer()); + + // description text + if (__pDescriptionTextObject != null) + { + delete __pDescriptionTextObject; + __pDescriptionTextObject = null; + } + + __pDescriptionTextObject = new (std::nothrow) TextObject(); + + if (__pDescriptionTextObject == null) + { + 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); + + GET_SHAPE_CONFIG(HEADER::DESCRIPTION_TEXT_FONT_SIZE, __pToolbar->GetOrientation(), fontSize); + + __fontSize = fontSize; + + __pTextFont = __pToolbar->GetFallbackFont(); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, __pTextFont, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pDescriptionTextObject->SetFont(__pTextFont, 0, __pDescriptionTextObject->GetTextLength()); + + return r; +} + +result +_ToolbarPresenter::SetItemSelected(int itemIndex, bool adjust) +{ + if (adjust == true) + { + ToolbarStyle style = __pToolbar->GetStyle(); + + if ((style == TOOLBAR_TAB || style == TOOLBAR_TAB_WITH_TITLE || style == TOOLBAR_TAB_LARGE) && __pToolbar->GetItemCount() > SEGMENTED_ITEM_MAX) + { + if (itemIndex <= __pToolbar->GetItemCount() - SEGMENTED_ITEM_MAX) + { + SetItemFit(itemIndex); + } + else + { + SetItemFit(__pToolbar->GetItemCount() - SEGMENTED_ITEM_MAX); + } + } + } + + return __pToolbarModel->SetSelectedItemIndex(itemIndex); +} + +result +_ToolbarPresenter::SetInitialDrawState(bool state) +{ + //DrawBackground(); // remove since 2.1 + __initialDraw = state; + __titleText = L""; + __titlePressed = false; + __titleSliding = false; + __tabEditEnabled = false; + + __firstLoadedItemIndex = 0; + __lastLoadedItemIndex = 0; + + return E_SUCCESS; +} + +result +_ToolbarPresenter::SetTabEditModeEnabled(bool enable) +{ + __tabEditEnabled = enable; + + return E_SUCCESS; +} + +result +_ToolbarPresenter::SetTitleText(const String& title, HorizontalAlignment alignment) +{ + result r = E_SUCCESS; + + float length = title.GetLength(); + + __titleText = String(title); + wchar_t* tempString = const_cast(__titleText.GetPointer()); + + // title text + if (__pTitleTextObject != null) + { + delete __pTitleTextObject; + __pTitleTextObject = null; + } + + __pTitleTextObject = new (std::nothrow) TextObject(); + + if (__pTitleTextObject == null) + { + return E_OUT_OF_MEMORY; + } + __pTitleTextObject->Construct(); + __pTitleTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE); + + TextSimple* pSimpleText = new (std::nothrow) TextSimple(tempString, length, TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL); + + pSimpleText->SetTextShadowEnabled(true); + pSimpleText->SetTextShadowOffset(FloatPoint(0.0f, 2.0f)); + + __pTitleTextObject->AppendElement(*pSimpleText); + __pTitleTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); + + __titleSliding = false; + + switch (alignment) + { + case ALIGNMENT_LEFT: + __pTitleTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT); + break; + case ALIGNMENT_CENTER: + __pTitleTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_CENTER); + break; + case ALIGNMENT_RIGHT: + __pTitleTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_RIGHT); + break; + default: + __pTitleTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT); + break; + } + + float fontSize = 0.0f; + + r = GET_SHAPE_CONFIG(HEADER::TITLE_FONT_SIZE, __pToolbar->GetOrientation(), fontSize); + + __fontSize = fontSize; + + __pTitleTextFont = __pToolbar->GetFallbackFont(); + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, __pTitleTextFont, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pTitleTextObject->SetFont(__pTitleTextFont, 0, __pTitleTextObject->GetTextLength()); + + //__pTitleTextObject->Compose(); + + return r; +} + +result +_ToolbarPresenter::SetUsableAreaBounds(const FloatRectangle& rect) +{ + __toolbarUsableArea = rect; + + return E_SUCCESS; +} + +bool +_ToolbarPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + ResetFlickAnimationTimer(); + + SetFirstLoadedItemIndex(); + SetLastLoadedItemIndex(); + + __touchInitiatedInToolbar = true; + + __currentTouchPosition = touchinfo.GetCurrentPosition(); + + ToolbarStyle style = __pToolbar->GetStyle(); + + if (__titleRect.Contains(__currentTouchPosition) + && (style == TOOLBAR_TITLE || style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || style == TOOLBAR_TAB_WITH_TITLE)) + { + __titlePressed = true; + } + else + { + __titlePressed = false; + } + + __pressedItemIndex = __pToolbar->GetItemIndexFromPosition(__currentTouchPosition); + + if (__pressedItemIndex == -1) + { + _Label* pLabel = dynamic_cast<_Label*>(const_cast<_Control*>(&source)); + + if (pLabel != null) + { + if (__pToolbar->GetButton(LEFT_BUTTON) != null && __pToolbar->GetButton(LEFT_BUTTON)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + _Label* pTempBadgeIcon = dynamic_cast<_Label*>(__pToolbar->GetButton(LEFT_BUTTON)->GetChild(0)); + + if (pLabel == pTempBadgeIcon) + { + __pToolbar->GetButton(LEFT_BUTTON)->SetButtonStatus(_BUTTON_STATUS_PRESSED, false); + } + } + + if (__pToolbar->GetButton(RIGHT_BUTTON) != null && __pToolbar->GetButton(RIGHT_BUTTON)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + _Label* pTempBadgeIcon = dynamic_cast<_Label*>(__pToolbar->GetButton(RIGHT_BUTTON)->GetChild(0)); + + if (pLabel == pTempBadgeIcon) + { + __pToolbar->GetButton(RIGHT_BUTTON)->SetButtonStatus(_BUTTON_STATUS_PRESSED, false); + } + } + } + } + else + { + _Button* pPressedButton = __pToolbar->GetItem(__pressedItemIndex); + + __initialPressesItemStatus = pPressedButton->GetButtonStatus(); + + if (__initialPressesItemStatus == _BUTTON_STATUS_DISABLED) + { + return true; + } + + pPressedButton->SetButtonStatus(_BUTTON_STATUS_PRESSED); + } + + if (__titlePressed) + { + __pToolbar->Invalidate(false); + } + else + { + __pToolbar->Invalidate(true); + } + + return true; +} + +bool +_ToolbarPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + if (!__touchInitiatedInToolbar) + { + return false; + } + + FloatPoint touchPoint = touchinfo.GetCurrentPosition(); + + if (__titlePressed && __titleRect.Contains(touchPoint)) + { + if (__titleSliding == true) + { + __pTitleTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); + __pTitleTextObject->Compose(); + + __titleSliding = false; + } + else + { + __pTitleTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_SLIDE_LEFT); + __pTitleTextObject->Compose(); + + __titleSliding = true; + + TimerForTitleSlideStart(); + } + } + + SetFirstLoadedItemIndex(); + SetLastLoadedItemIndex(); + + ToolbarStyle style = __pToolbar->GetStyle(); + + __touchInitiatedInToolbar = false; + + int releasedItemIndex = __pToolbar->GetItemIndexFromPosition(touchPoint); + + if ((style == TOOLBAR_TAB || style == TOOLBAR_TAB_WITH_TITLE || style == TOOLBAR_TAB_LARGE) && __beingEdited == true) + { + __beingEdited = false; + + if (releasedItemIndex == -1) + { + if (__pEditItem) + { + __pToolbar->DetachChild(*__pEditItem); + + delete __pEditItem; + __pEditItem = null; + } + + if (__pressedItemIndex != -1) + { + __pToolbar->GetItem(__pressedItemIndex)->SetButtonStatus(__initialPressesItemStatus); + } + } + else + { + __pToolbar->MoveItem(__editItemIndex, releasedItemIndex); + + AdjustItemPositionX(-__pToolbar->GetItem(__firstLoadedItemIndex)->GetBoundsF().x); // move auto focus + + if (__pEditItem) + { + __pToolbar->DetachChild(*__pEditItem); + + delete __pEditItem; + __pEditItem = null; + } + } + } + else + { + if ((style == TOOLBAR_TAB || style == TOOLBAR_TAB_WITH_TITLE || style == TOOLBAR_TAB_LARGE) + && __pToolbar->GetItemCount() > SEGMENTED_ITEM_MAX) + { + if (__pressedItemIndex != -1) + { + if (releasedItemIndex == __pressedItemIndex) + { + if (__initialPressesItemStatus != _BUTTON_STATUS_DISABLED && __tabMoved != true) + { + __pToolbar->SetItemSelected(releasedItemIndex, true, false); + } + else + { + __pToolbar->GetItem(__pressedItemIndex)->SetButtonStatus(__initialPressesItemStatus, false); + } + } + else + { + __pToolbar->GetItem(__pressedItemIndex)->SetButtonStatus(__initialPressesItemStatus, false); + } + } + } + else + { + if (__pressedItemIndex != -1 && (releasedItemIndex != __pressedItemIndex)) + { + __pToolbar->GetItem(__pressedItemIndex)->SetButtonStatus(__initialPressesItemStatus, false); + } + else + { + if (__pressedItemIndex != -1 && __initialPressesItemStatus != _BUTTON_STATUS_DISABLED) + { + if (style == TOOLBAR_HEADER_SEGMENTED || style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE + || style == TOOLBAR_TAB || style == TOOLBAR_TAB_WITH_TITLE || style == TOOLBAR_SEGMENTED || style == TOOLBAR_TAB_LARGE) + { + __pToolbar->SetItemSelected(releasedItemIndex, true, false); + } + else + { + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pToolbar->GetItem(releasedItemIndex)); + __pToolbar->GetItem(releasedItemIndex)->SetButtonStatus(_BUTTON_STATUS_SELECTED, true); + __pToolbar->GetItem(releasedItemIndex)->SetButtonStatus(_BUTTON_STATUS_NORMAL, false); + } + } + else + { + _Label* pLabel = dynamic_cast<_Label*>(const_cast<_Control*>(&source)); + + if (pLabel != null) + { + if (__pToolbar->GetButton(LEFT_BUTTON) != null && __pToolbar->GetButton(LEFT_BUTTON)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + _Label* pTempBadgeIcon = dynamic_cast<_Label*>(__pToolbar->GetButton(LEFT_BUTTON)->GetChild(0)); + + if (pLabel == pTempBadgeIcon) + { + FloatRectangle buttonItemBounds = __pToolbar->GetButton(LEFT_BUTTON)->GetBoundsF(); + + if (buttonItemBounds.Contains(touchPoint)) + { + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pToolbar->GetButton(LEFT_BUTTON)); + __pToolbar->GetButton(LEFT_BUTTON)->SetButtonStatus(_BUTTON_STATUS_SELECTED, true); + } + + __pToolbar->GetButton(LEFT_BUTTON)->SetButtonStatus(_BUTTON_STATUS_NORMAL, false); + } + } + + if (__pToolbar->GetButton(RIGHT_BUTTON) != null && __pToolbar->GetButton(RIGHT_BUTTON)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + _Label* pTempBadgeIcon = dynamic_cast<_Label*>(__pToolbar->GetButton(RIGHT_BUTTON)->GetChild(0)); + + if (pLabel == pTempBadgeIcon) + { + FloatRectangle buttonItemBounds = __pToolbar->GetButton(RIGHT_BUTTON)->GetBoundsF(); + + if (buttonItemBounds.Contains(touchPoint)) + { + PLAY_FEEDBACK(_RESOURCE_FEEDBACK_PATTERN_TAP, __pToolbar->GetButton(RIGHT_BUTTON)); + __pToolbar->GetButton(RIGHT_BUTTON)->SetButtonStatus(_BUTTON_STATUS_SELECTED, true); + } + + __pToolbar->GetButton(RIGHT_BUTTON)->SetButtonStatus(_BUTTON_STATUS_NORMAL, false); + } + } + } + } + + if (__titlePressed) + { + __pToolbar->Invalidate(false); + } + else + { + __pToolbar->Invalidate(true); + } + + return true; + } + } + } + + __tabMoved = false; + + // Restore status of other buttons to _BUTTON_STATUS_NORMAL // this can be removed + int itemCount = __pToolbar->GetItemCount(); + + for (int j = 0; j < itemCount; j++) + { + if (__pToolbar->GetItem(j) != null && __pToolbar->GetItem(j)->GetButtonStatus() == _BUTTON_STATUS_PRESSED) + { + __pToolbar->GetItem(j)->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + } + + // Update children + if (__titlePressed) + { + __pToolbar->Invalidate(false); + } + else + { + __pToolbar->Invalidate(true); + } + + return true; +} + +bool +_ToolbarPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + if (!__touchInitiatedInToolbar) + { + return false; + } + + SetFirstLoadedItemIndex(); + SetLastLoadedItemIndex(); + + ToolbarStyle style = __pToolbar->GetStyle(); + FloatPoint touchPoint = touchinfo.GetCurrentPosition(); + + if (__pressedItemIndex == -1) + { + _Label* pLabel = dynamic_cast<_Label*>(const_cast<_Control*>(&source)); + + if (pLabel != null) + { + if (__pToolbar->GetButton(LEFT_BUTTON) != null && __pToolbar->GetButton(LEFT_BUTTON)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + _Label* pTempBadgeIcon = dynamic_cast<_Label*>(__pToolbar->GetButton(LEFT_BUTTON)->GetChild(0)); + + if (pLabel == pTempBadgeIcon) + { + FloatRectangle buttonItemBounds = __pToolbar->GetButton(LEFT_BUTTON)->GetBoundsF(); + + if (buttonItemBounds.Contains(touchPoint)) + { + __pToolbar->GetButton(LEFT_BUTTON)->SetButtonStatus(_BUTTON_STATUS_PRESSED); + } + else + { + __pToolbar->GetButton(LEFT_BUTTON)->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + } + } + + if (__pToolbar->GetButton(RIGHT_BUTTON) != null && __pToolbar->GetButton(RIGHT_BUTTON)->GetButtonStatus() != _BUTTON_STATUS_DISABLED) + { + _Label* pTempBadgeIcon = dynamic_cast<_Label*>(__pToolbar->GetButton(RIGHT_BUTTON)->GetChild(0)); + + if (pLabel == pTempBadgeIcon) + { + FloatRectangle buttonItemBounds = __pToolbar->GetButton(RIGHT_BUTTON)->GetBoundsF(); + + if (buttonItemBounds.Contains(touchPoint)) + { + __pToolbar->GetButton(RIGHT_BUTTON)->SetButtonStatus(_BUTTON_STATUS_PRESSED); + } + else + { + __pToolbar->GetButton(RIGHT_BUTTON)->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + } + } + } + + if (__titlePressed) + { + __pToolbar->Invalidate(false); + } + else + { + __pToolbar->Invalidate(true); + } + + return true; + } + + _Button* pCurrentButton = __pToolbar->GetItem(__pressedItemIndex); + + if (pCurrentButton == null) + { + return true; + } + + FloatRectangle itemBounds = pCurrentButton->GetBoundsF(); + + if ((style == TOOLBAR_TAB || style == TOOLBAR_TAB_WITH_TITLE || style == TOOLBAR_TAB_LARGE) && __pToolbar->GetItemCount() > SEGMENTED_ITEM_MAX) + { + if (itemBounds.Contains(touchPoint)) + { + __tabMoved = true; + } + } + + if ((style == TOOLBAR_TAB || style == TOOLBAR_TAB_WITH_TITLE || style == TOOLBAR_TAB_LARGE) && __beingEdited == true) + { + DrawEditItem(touchinfo.GetCurrentPosition()); + } + else + { + if (__tabMoved) + { + pCurrentButton->SetButtonStatus(__initialPressesItemStatus, false); + } + else + { + if (__initialPressesItemStatus == _BUTTON_STATUS_DISABLED) + { + return false; + } + + if (itemBounds.Contains(touchPoint)) + { + pCurrentButton->SetButtonStatus(_BUTTON_STATUS_PRESSED); + } + else + { + pCurrentButton->SetButtonStatus(__initialPressesItemStatus, false); + } + } + + pCurrentButton->Invalidate(false); + } + + if (__tabMoved) + { + float distance = (touchinfo.GetCurrentPosition()).x - __currentTouchPosition.x; + + FloatRectangle clientBounds = __pToolbar->GetBoundsF(); + + __portraitSize = _ControlManager::GetInstance()->_ControlManager::GetScreenSizeF(); + __landscapeSize = FloatDimension(__portraitSize.height, __portraitSize.width); + + if (__pToolbar->GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT) + { + if (clientBounds.width > __portraitSize.width) + { + clientBounds.width = __portraitSize.width; + } + } + else + { + if (clientBounds.width > __landscapeSize.width) + { + clientBounds.width = __landscapeSize.width; + } + } + + __currentTouchPosition = touchinfo.GetCurrentPosition(); + + _Button* pItem = null; + FloatRectangle itemBounds; + int itemCount = __pToolbar->GetItemCount(); + + if (distance > 0) // right move + { + pItem = __pToolbar->GetItem(0); + if (pItem == null) + { + return true; + } + + itemBounds = pItem->GetBoundsF(); + + if (itemBounds.x + distance >= 0.0f && !__beingEdited) + { + distance = 0.0f - itemBounds.x; + } + } + else if (distance < 0) + { + pItem = __pToolbar->GetItem(itemCount - 1); + + if (pItem == null) + { + return true; + } + + itemBounds = pItem->GetBoundsF(); + + if (itemBounds.x + itemBounds.width + distance <= clientBounds.width && !__beingEdited) + { + distance = clientBounds.width - (itemBounds.x + itemBounds.width); + } + } + + if (__beingEdited) + { + if (distance > 0) // right move + { + __tabSlideRight = false; + + if (__pToolbar->GetItem(__lastLoadedItemIndex - 1)->GetBoundsF().x <= __pEditItem->GetBoundsF().x) + { + __tabSlideLeft = true; + } + + if (__tabSlideLeft && __pToolbar->GetItem(itemCount-1)->GetBoundsF().x + __pToolbar->GetItem(itemCount-1)->GetBoundsF().width > clientBounds.width) + { + AdjustItemPositionX(-distance * 5); // move auto focus + } + } + else if (distance < 0) + { + __tabSlideLeft = false; + + if (__pToolbar->GetItem(__firstLoadedItemIndex + 1)->GetBoundsF().x >= __pEditItem->GetBoundsF().x) + { + __tabSlideRight = true; + } + + if (__tabSlideRight && __pToolbar->GetItem(0)->GetBoundsF().x < 0.0f) + { + AdjustItemPositionX(-distance * 5); // move auto focus + } + } + } + else + { + AdjustItemPositionX(distance); + } + + Draw(); + } + + return false; +} + +bool +_ToolbarPresenter::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + __touchInitiatedInToolbar = false; + __beingEdited = false; + + // Restore status of other buttons to _BUTTON_STATUS_NORMAL // this can be removed + int itemCount = __pToolbar->GetItemCount(); + + for (int i = 0; i < itemCount; i++) + { + if (__pToolbar->GetItem(i) != null && __pToolbar->GetItem(i)->GetButtonStatus() == _BUTTON_STATUS_PRESSED) + { + __pToolbar->GetItem(i)->SetButtonStatus(_BUTTON_STATUS_NORMAL); + } + } + + if (__pEditItem) + { + __pToolbar->DetachChild(*__pEditItem); + + delete __pEditItem; + __pEditItem = null; + } + + // Update children + if (__titlePressed) + { + __pToolbar->Invalidate(false); + } + else + { + __pToolbar->Invalidate(true); + } + + return true; +} + +void +_ToolbarPresenter::OnChangeLayout(Tizen::Ui::_ControlOrientation orientation) +{ + ResetFlickAnimationTimer(); + + return; +} + +bool +_ToolbarPresenter::OnLongPressGestureDetected(void) +{ + if (__pToolbar->IsTabEditModeEnabled() == true) + { + int longPressedItemIndex = __pToolbar->GetItemIndexFromPosition(__currentTouchPosition); + + if (longPressedItemIndex == -1) + { + return false; + } + + _Button* pButton = null; + pButton = __pToolbar->GetItem(longPressedItemIndex); + SysTryReturn(NID_UI_CTRL, pButton, true, E_INVALID_STATE, "[E_INVALID_STATE] Unable to retrieve a button"); + + if (pButton->GetButtonStatus() == _BUTTON_STATUS_DISABLED) + { + return false; + } + + __editItemIndex = longPressedItemIndex; + __beingEdited = true; + + pButton->SetButtonStatus(_BUTTON_STATUS_NORMAL); + + FloatRectangle itemBounds = pButton->GetBoundsF(); + + if (__pEditItem) + { + __pToolbar->DetachChild(*__pEditItem); + + delete __pEditItem; + __pEditItem = null; + } + + __pEditItem = _Label::CreateLabelN(); + 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."); + + Bitmap* pEditItemBitmap = new (std::nothrow) Bitmap(); + result r = pEditItemBitmap->Construct(*pCanvas, FloatRectangle(0.0f, 0.0f, itemBounds.width, itemBounds.height)); + + if (IsFailed(r)) + { + delete pEditItemBitmap; + pEditItemBitmap = null; + + delete pCanvas; + + goto CATCH; + } + + __pEditItem->SetBounds(itemBounds); + __pEditItem->SetBackgroundBitmap(*pEditItemBitmap); + + delete pCanvas; + delete pEditItemBitmap; + + __pToolbar->AttachChild(*__pEditItem); + __pToolbar->SetChildAlwaysOnTop(*__pEditItem); + + __pToolbar->Draw(); + } + + return true; + +CATCH: + if (__pEditItem) + { + delete __pEditItem; + __pEditItem = null; + } + + return true; +} + +bool +_ToolbarPresenter::OnFlickGestureDetected(_TouchFlickGestureDetector& gesture) +{ + ToolbarStyle style = __pToolbar->GetStyle(); + + if (!(style == TOOLBAR_TAB || style == TOOLBAR_TAB_WITH_TITLE || style == TOOLBAR_TAB_LARGE) || __pToolbar->GetItemCount() <= SEGMENTED_ITEM_MAX || __beingEdited == true || __tabMoved == false) + { + return true; + } + + if (gesture.GetDirection() != _FLICK_DIRECTION_RIGHT && gesture.GetDirection() != _FLICK_DIRECTION_LEFT) + { + return false; + } + + float distanceX = 0.0f; + float distanceY = 0.0f; + float xPosition = 0.0f; + float itemsBeyondScreen = 0.0f; + + gesture.GetDistance(distanceX, distanceY); + SetFirstLoadedItemIndex(); + SetLastLoadedItemIndex(); + int itemCount = __pToolbar->GetItemCount(); + float itemWidth = __pToolbar->GetItem(0)->GetBoundsF().width; + + if (distanceX < 0) //left + { + itemsBeyondScreen = (itemCount - 1) - __lastLoadedItemIndex; + xPosition = __pToolbar->GetItem(__lastLoadedItemIndex)->GetBoundsF().x; + if (xPosition < (3 * itemWidth)) + { + __flickDistance = xPosition - (4 * itemWidth); + } + } + else //Right + { + itemsBeyondScreen = __firstLoadedItemIndex; + xPosition = __pToolbar->GetItem(__firstLoadedItemIndex)->GetBoundsF().x; + if (xPosition < 0) + { + __flickDistance = -xPosition; + } + + } + + int itemMaxCount = 4; + + if (itemsBeyondScreen >= (itemMaxCount - 1)) + { + __flickDistance = (3 * itemWidth); + } + else + { + __flickDistance = (itemsBeyondScreen * itemWidth); + } + + if (distanceX < 0) //Left flick + { + __flickMove = 0.006f; + __flickFlag = 0; + } + else if (distanceX > 0) //Right flick + { + __flickMove = 0.006f; + __flickDistance = -(__flickDistance); + __flickFlag = 0; + } + else + { + __flickMove = 0.0f; + __flickDistance = 0.0f; + __flickFlag = 0; + __moveDistance = 0.0f; + } + + StartFlickAnimationTimer(); + + return true; +} + +void +_ToolbarPresenter::OnTimerExpired(Timer& timer) +{ + Timer* onTimer = &timer; + + if (onTimer == __pTitleSlideTimer) + { + TimerForTitleSlideTimeout(); + } + + if (onTimer == __pFlickAnimationTimer) + { + StartFlickAnimation(); + } + + return; +} + +void +_ToolbarPresenter::OnDrawFocus(void) +{ + return; +} + +void +_ToolbarPresenter::OnChildControlFocusMoved(const _Control& control) +{ + return; +} + +bool +_ToolbarPresenter::IsChildControlFocusManage(void) const +{ + return true; +} + +void +_ToolbarPresenter::OnFocusableStateChanged(bool focusalbeState) +{ + return; +} + +void +_ToolbarPresenter::OnFocusModeStateChanged(void) +{ + return; +} + +bool +_ToolbarPresenter::OnFocusGained(const _Control& source) +{ + //__focusPrevStatus = __pButton->GetButtonStatus(); + //__pButton->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED); + //__pButton->Invalidate(); + + return false; +} + +bool +_ToolbarPresenter::OnFocusLost(const _Control& source) +{ + //__pButton->SetButtonStatus(__focusPrevStatus); + //__pButton->Invalidate(); + + return true; +} + +result +_ToolbarPresenter::TimerForTitleSlideInit(void) +{ + result r = E_SUCCESS; + + if (__pTitleSlideTimer != null) + { + delete __pTitleSlideTimer; + __pTitleSlideTimer = null; + } + + return r; +} + +result +_ToolbarPresenter::TimerForTitleSlideStart(void) +{ + result r = E_SUCCESS; + + if (__pTitleSlideTimer == null) + { + __pTitleSlideTimer = new (std::nothrow) Timer(); + if (__pTitleSlideTimer == null) + { + r = E_OUT_OF_MEMORY; + goto CATCH; + } + + r = __pTitleSlideTimer->Construct(*this); + + if (IsFailed(r)) + { + delete __pTitleSlideTimer; + goto CATCH; + } + } + + r = __pTitleSlideTimer->Start(100); + + if (IsFailed(r)) + { + goto CATCH; + } + +CATCH: + return r; +} + +result +_ToolbarPresenter::TimerForTitleSlideTimeout(void) +{ + Canvas* pCanvas = __pToolbar->GetCanvasN(); + SysTryReturnResult(NID_UI_CTRL, pCanvas, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] pCanvas is invalid!"); + + pCanvas->SetBackgroundColor(Color(0, 0, 0, 0)); + pCanvas->Clear(__titleRect); + + if (__pTitleBackgroundBitmap) + { + pCanvas->DrawBitmap(CoordinateSystem::AlignToDevice(__titleRect), *__pTitleBackgroundBitmap); + } + + if (__pTitleTextObject->IsChanged()) + { + DrawTitleText(pCanvas); + } + + if (__pTitleTextObject->IsActionOn() == true) + { + __pTitleTextObject->DrawWithOffset(*_CanvasImpl::GetInstance(*pCanvas)); + + DrawTitleTextDimBitmap(); + + if (__pTitleTextObject->GetRepeatCount() < 3) + { + TimerForTitleSlideStart(); + } + } + else + { + __pTitleTextObject->Draw(*_CanvasImpl::GetInstance(*pCanvas)); + } + + delete pCanvas; + + return E_SUCCESS; +} + +void +_ToolbarPresenter::DrawTitleTextDimBitmap(void) +{ + if (__pToolbar->IsUserBackgroundBitmap()) + { + return; + } + + Canvas* pCanvas = __pToolbar->GetCanvasN(); + + if (pCanvas == null) + { + SysLog(NID_UI_CTRL, "Cannot get a canvas."); + return; + } + + float textDimWidth = 0.0f; + float textDimHeight = 0.0f; + float leftMargin = 0.0f; + + GET_SHAPE_CONFIG(HEADER::TAB_TEXT_DIM_WIDTH, __pToolbar->GetOrientation(), textDimWidth); + GET_SHAPE_CONFIG(HEADER::LEFT_MARGIN, __pToolbar->GetOrientation(), leftMargin); + + ToolbarStyle style = __pToolbar->GetStyle(); + + if (style == TOOLBAR_HEADER_SEGMENTED_WITH_TITLE || style == TOOLBAR_TAB_WITH_TITLE) + { + GET_SHAPE_CONFIG(HEADER::TITLE_HEIGHT_WITH_SEGMENTED_ITEM, __pToolbar->GetOrientation(), textDimHeight); + } + else + { + if (__pToolbar->GetDescriptionText() != L"") + { + textDimHeight = __titleRect.height + __titleRect.y; + } + else + { + textDimHeight = __pToolbar->GetBoundsF().height; + } + } + + //Color titleTextDimColor; + //GET_COLOR_CONFIG(HEADER::TITLE_TEXT_DIM_NORMAL, titleTextDimColor); + + Bitmap* pTitleTextDimLeftBitmap = null; + GET_BITMAP_CONFIG_N(HEADER::TITLE_TEXT_DIM_EFFECT_LEFT, BITMAP_PIXEL_FORMAT_ARGB8888, pTitleTextDimLeftBitmap); + + Bitmap* pReColorTitleTextDimLeftBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pTitleTextDimLeftBitmap, + Color::GetColor(COLOR_ID_MAGENTA), __pToolbar->GetColor()); + + if (pReColorTitleTextDimLeftBitmap) + { + FloatRectangle bounds = FloatRectangle(0.0f, 0.0f, textDimWidth, textDimHeight); + + if (__pToolbar->GetTitleIcon() != null) + { + bounds.x += __titleRect.x; + } + + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pReColorTitleTextDimLeftBitmap)) + { + pCanvas->DrawNinePatchedBitmap(bounds, *pReColorTitleTextDimLeftBitmap); + } + else + { + pCanvas->DrawBitmap(bounds, *pReColorTitleTextDimLeftBitmap, + FloatRectangle(0.0f, 0.0f, pReColorTitleTextDimLeftBitmap->GetWidthF(), pReColorTitleTextDimLeftBitmap->GetHeightF())); + } + + delete pReColorTitleTextDimLeftBitmap; + } + + Bitmap* pTitleTextDimRightBitmap = null; + GET_BITMAP_CONFIG_N(HEADER::TITLE_TEXT_DIM_EFFECT_RIGHT, BITMAP_PIXEL_FORMAT_ARGB8888, pTitleTextDimRightBitmap); + + Bitmap* pReColorTitleTextDimRightBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pTitleTextDimRightBitmap, + Color::GetColor(COLOR_ID_MAGENTA), __pToolbar->GetColor()); + + if (pReColorTitleTextDimRightBitmap) + { + FloatRectangle bounds = FloatRectangle(__titleRect.width, 0.0f, textDimWidth, textDimHeight); + + if (__pToolbar->GetTitleIcon() != null) + { + bounds.x += (__titleRect.x - leftMargin); + } + + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pReColorTitleTextDimRightBitmap)) + { + pCanvas->DrawNinePatchedBitmap(bounds, *pReColorTitleTextDimRightBitmap); + } + else + { + pCanvas->DrawBitmap(bounds, *pReColorTitleTextDimRightBitmap, + FloatRectangle(0.0f, 0.0f, pReColorTitleTextDimRightBitmap->GetWidthF(), pReColorTitleTextDimRightBitmap->GetHeightF())); + } + + delete pReColorTitleTextDimRightBitmap; + } + + delete pCanvas; + + return; +} + +result +_ToolbarPresenter::AdjustItemPositionX(float distance) +{ + int index = 0; + int itemCount = __pToolbar->GetItemCount(); + _Button* pItem = __pToolbar->GetItem(index); + + FloatRectangle itemBounds(0.0f, 0.0f, 0.0f, 0.0f); + + if (itemCount < 5) + { + return E_SUCCESS; + } + if (distance > 0) + { + itemBounds = __pToolbar->GetItem(0)->GetBoundsF(); + if (itemBounds.x + distance > 0.0f) + { + distance = 0.0f; + } + } + else + { + itemBounds = __pToolbar->GetItem(itemCount - 4)->GetBoundsF(); + if (itemBounds.x + distance < 0.0f) + { + distance = 0.0f; + } + } + + while (pItem != null) + { + FloatRectangle bounds = pItem->GetBoundsF(); + bounds.x += distance; + pItem->SetBounds(bounds); + index++; + + if (index < itemCount) + { + pItem = __pToolbar->GetItem(index); + } + else + { + break; + } + } + + return E_SUCCESS; +} + +FloatRectangle +_ToolbarPresenter::GetTitleTextBoundsF(void) const +{ + return __titleRect; +} + +FloatRectangle +_ToolbarPresenter::GetDescriptionBoundsF(void) const +{ + return __descriptionRect; +} + +result +_ToolbarPresenter::_SetModel(const _ToolbarModel& toolbarModel) +{ + __pToolbarModel = const_cast<_ToolbarModel*>(&toolbarModel); + + return E_SUCCESS; +} + +void +_ToolbarPresenter::OnFontChanged(Font* pFont) +{ + __pTextFont = pFont; + __pTitleTextFont = pFont; + + return; +} + +void +_ToolbarPresenter::OnFontInfoRequested(unsigned long& style, int& size) +{ + style = __fontStyle; + size = _CoordinateSystemUtils::ConvertToInteger(__fontSize); + + return; +} + +void +_ToolbarPresenter::OnFontInfoRequested(unsigned long& style, float& size) +{ + style = __fontStyle; + size = __fontSize; + + return; +} + +void +_ToolbarPresenter::OnAncestorVisibleStateChanged(const _Control& control) +{ + if (__pTitleTextObject != null) + { + __pTitleTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV); + __pTitleTextObject->Compose(); + } + + __titleSliding = false; + + return ; +} + +void +_ToolbarPresenter::SetFontInfo(unsigned long style, float size) +{ + __fontStyle = style; + __fontSize = size; + + return; +} + +void +_ToolbarPresenter::StartFlickAnimation(void) +{ + float distance = CalculateProgress(__flickMove); + + __moveDistance = -(__flickDistance * distance); + __flickDistance = (__flickDistance + __moveDistance); + __flickMove = __flickMove + 0.006; + __flickFlag++; + + if (__flickFlag <= FLICK_ANIMATION_COUNT) + { + StartFlickAnimationTimer(); + } + else + { + ResetFlickAnimationTimer(); + SetItemFit(__firstLoadedItemIndex); + } + + AdjustItemPositionX(__moveDistance); + + SetFirstLoadedItemIndex(); + SetLastLoadedItemIndex(); + + Draw(); + + return; +} + +result +_ToolbarPresenter::StartFlickAnimationTimer(void) +{ + result r = E_SUCCESS; + + if (__pFlickAnimationTimer == null) + { + __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); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + __pFlickAnimationTimer->Cancel(); + } + + r = __pFlickAnimationTimer->Start(FLICK_ANIMATION_TIMER_PERIOD); + SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + +CATCH: + ResetFlickAnimationTimer(); + return r; +} + +result +_ToolbarPresenter::ResetFlickAnimationTimer(void) +{ + if (__pFlickAnimationTimer) + { + delete __pFlickAnimationTimer; + __pFlickAnimationTimer = null; + } + + __moveDistance = 0.0f; + + return E_SUCCESS; +} + +void +_ToolbarPresenter::SetFirstLoadedItemIndex(void) +{ + int itemCount = __pToolbar->GetItemCount(); + + for (int i = 0; i < itemCount; i++) + { + if (__pToolbar->GetItem(i)->GetBoundsF().x + (__pToolbar->GetItem(i)->GetBoundsF().width / 2) <= __pToolbar->GetItem(i)->GetBoundsF().width) + { + __firstLoadedItemIndex = i; + } + } + + return; +} + +int +_ToolbarPresenter::GetFirstLoadedItemIndex(void) +{ + return __firstLoadedItemIndex; +} + +void +_ToolbarPresenter::SetLastLoadedItemIndex(void) +{ + float width = 0.0f; + int itemCount = __pToolbar->GetItemCount(); + + if (__pToolbar->GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT) + { + width = __portraitSize.width; + } + else + { + width = __landscapeSize.width; + } + + for (int i = 0; i < itemCount; i++) + { + float X = __pToolbar->GetItem(i)->GetBoundsF().x; + + if ((X + (__pToolbar->GetItem(i)->GetBoundsF().width / 2)) < width) + { + __lastLoadedItemIndex = i; + } + } + + return; +} + +float +_ToolbarPresenter::CalculateProgress(float timeProgress) const +{ + const float segments[3][3] = {{0.0f, 0.01f, 0.45f}, {0.45f, 0.80f, 0.908f}, {0.908f, 0.9999f, 1.0f}}; + float loc_5 = timeProgress / 1; + 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; +} + +void +_ToolbarPresenter::SetItemFit(int index) +{ + if (index < 0) + { + return; + } + + FloatPoint pt(0.0f, 0.0f); + FloatRectangle bounds(0.0f, 0.0f, 0.0f, 0.0f); + + float fitDistance = 0.0f; + int itemCount = __pToolbar->GetItemCount(); + + _Button* pItem = __pToolbar->GetItem(index); + SysTryReturnVoidResult(NID_UI_CTRL, pItem, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + bounds = pItem->GetBoundsF(); + + fitDistance = -bounds.x; + + for (int i = 0; i < itemCount; i++) + { + pItem = __pToolbar->GetItem(i); + SysTryReturnVoidResult(NID_UI_CTRL, pItem, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + bounds = pItem->GetBoundsF(); + bounds.x = bounds.x + fitDistance; + pItem->SetBounds(bounds); + } + + SetFirstLoadedItemIndex(); + SetLastLoadedItemIndex(); + + Draw(); + + return; +} + +void +_ToolbarPresenter::OnVisualElementAnimationStarted(const VisualElementAnimation& animation, const String& keyName, VisualElement& target) +{ + return; +} + +void +_ToolbarPresenter::OnVisualElementAnimationRepeated(const VisualElementAnimation& animation, const String& keyName, VisualElement& target, long currentRepeatCount) +{ + return; +} + +void +_ToolbarPresenter::OnVisualElementAnimationFinished(const VisualElementAnimation& animation, const String& keyName, VisualElement& target, bool completedNormally) +{ + return; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_UiFastScrollEvent.cpp b/src/ui/controls/FUiCtrl_UiFastScrollEvent.cpp new file mode 100644 index 0000000..f9070a1 --- /dev/null +++ b/src/ui/controls/FUiCtrl_UiFastScrollEvent.cpp @@ -0,0 +1,90 @@ +// +// 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_UiFastScrollEvent.cpp +* @brief This is the implementation for the _UiFastScrollEvent class. +*/ + +// includes +#include +#include "FUiCtrl_UiFastScrollEvent.h" +#include "FUiCtrl_UiFastScrollEventArg.h" +#include "FUiCtrl_IFastScrollListener.h" + +// using namespace +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; + +namespace Tizen { namespace Ui { namespace Controls +{ + +//////////////////////////////////////////////////////////////////////////////// +/// __ExpandableItemEvent class Lifecycle + +_UiFastScrollEvent::_UiFastScrollEvent(void) + : __pSource(null) +{ + // nothing +} + +_UiFastScrollEvent::~_UiFastScrollEvent(void) +{ + // nothing +} + +result +_UiFastScrollEvent::Construct(const Tizen::Ui::_Control& source) +{ + result r = _Event::Initialize(); + + // set event source + if (r == E_SUCCESS) + { + __pSource = const_cast <_Control*>(&source); + } + + return r; +} + + +//////////////////////////////////////////////////////////////////////////////// +/// __WindowEvent class Accessor + +const Tizen::Ui::_Control* +_UiFastScrollEvent::GetSource(void) const +{ + return __pSource; +} + +//////////////////////////////////////////////////////////////////////////////// +/// __ExpandableItemEvent class Operation + +void +_UiFastScrollEvent::FireImpl(IEventListener& listener, const IEventArg& arg) +{ + // cast to IFastScrollListener + _IUiFastScrollListener* pFastScrollListener = dynamic_cast <_IUiFastScrollListener*>(&listener); + 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, "[%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_UiFastScrollEventArg.cpp b/src/ui/controls/FUiCtrl_UiFastScrollEventArg.cpp new file mode 100644 index 0000000..ca1482c --- /dev/null +++ b/src/ui/controls/FUiCtrl_UiFastScrollEventArg.cpp @@ -0,0 +1,57 @@ +// +// 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_UiFastScrollEventArg.cpp +* @brief This is the implementation for the _UiFastScrollEventArg class. +*/ + +// includes +#include "FUiCtrl_UiFastScrollEventArg.h" + +// using namespace +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_UiFastScrollEventArg::_UiFastScrollEventArg(const Tizen::Ui::_Control& source, const Tizen::Ui::Controls::_FastScrollIndex& index) + : __pSource(const_cast <_Control*>(&source)) + , __index(index) +{ + // nothing +} + +_UiFastScrollEventArg::~_UiFastScrollEventArg(void) +{ + // nothing +} + +_Control* +_UiFastScrollEventArg::GetSource(void) +{ + return __pSource; +} + +const Tizen::Ui::Controls::_FastScrollIndex& +_UiFastScrollEventArg::GetIndex(void) +{ + return __index; +} + +}}} diff --git a/src/ui/controls/FUiCtrl_UiIconListItemEvent.cpp b/src/ui/controls/FUiCtrl_UiIconListItemEvent.cpp new file mode 100644 index 0000000..1f52dac --- /dev/null +++ b/src/ui/controls/FUiCtrl_UiIconListItemEvent.cpp @@ -0,0 +1,90 @@ +// +// 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_UiIconListItemEvent.cpp + * @brief This is the implementation file for the _UiIconListItemEvent class. + */ + +#include + +#include "FUiCtrl_IconListView.h" +#include "FUiCtrl_IconListViewItemEventArg.h" +#include "FUiCtrl_IIconListItemEventListener.h" +#include "FUiCtrl_UiIconListItemEvent.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +_UiIconListItemEvent::_UiIconListItemEvent(void) + : __pSource(null) +{ +} + +_UiIconListItemEvent::~_UiIconListItemEvent(void) +{ +} + +result +_UiIconListItemEvent::Construct(const _IconListView& source) +{ + result r = _Event::Initialize(); + + // set event source + if (r == E_SUCCESS) + { + __pSource = const_cast <_IconListView*>(&source); + } + + return r; +} + +const _IconListView* +_UiIconListItemEvent::GetSource(void) const +{ + return __pSource; +} + +void +_UiIconListItemEvent::FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg) +{ + // cast to IIconListItemEventListener + _IIconListItemEventListener* pItemListener = dynamic_cast<_IIconListItemEventListener*>(&listener); + SysTryReturnVoidResult(NID_UI_CTRL, (pItemListener != null), E_INVALID_ARG, "[E_INVALID_ARG] Invalid listener is used."); + + // cast to _UiIconListItemEventArg + const _IconListViewItemEventArg* pItemEventArg = dynamic_cast(&arg); + SysTryReturnVoidResult(NID_UI_CTRL, (pItemEventArg != null), E_INVALID_ARG, + "[E_INVALID_ARG] Invalid event argument is used."); + + switch (pItemEventArg->GetEventType()) + { + case EVENT_TYPE_ITEM_SELECTED: + pItemListener->OnIconListItemStateChanged(const_cast<_IconListViewItemEventArg*>(pItemEventArg)); + break; + case EVENT_TYPE_OVERLAY_BITMAP_SELECTED: + pItemListener->OnIconListViewOverlayBitmapSelected(const_cast<_IconListViewItemEventArg*>(pItemEventArg)); + break; + case EVENT_TYPE_ITEM_REORDERED: + pItemListener->OnIconListViewItemReordered(const_cast<_IconListViewItemEventArg*>(pItemEventArg)); + break; + } + + SetLastResult(E_SUCCESS); +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_UiListViewItemEvent.cpp b/src/ui/controls/FUiCtrl_UiListViewItemEvent.cpp new file mode 100644 index 0000000..2b00b75 --- /dev/null +++ b/src/ui/controls/FUiCtrl_UiListViewItemEvent.cpp @@ -0,0 +1,88 @@ +// +// 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_UiListViewItemEvent.cpp + * @brief This is the implementation file for _UiListViewItemEvent class. + * + * This file contains the implementation of _UiListViewItemEvent class. + */ + +#include +#include +#include "FUiCtrl_IUiListViewItemEventListener.h" +#include "FUiCtrl_UiListViewItemEvent.h" +#include "FUiCtrl_UiListViewItemEventArg.h" + +using namespace Tizen::Base::Runtime; +using namespace Tizen::Ui; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_UiListViewItemEvent::_UiListViewItemEvent(void) +{ + +} + +_UiListViewItemEvent::~_UiListViewItemEvent(void) +{ + +} + +void +_UiListViewItemEvent::SetSource(_Control* pSource) // temporary code +{ + __pSource = pSource; +} + +void +_UiListViewItemEvent::FireImpl(IEventListener& listener, const IEventArg& arg) +{ + // cast to _ItemEventArg + _UiListViewItemEventArg* pEventArg = dynamic_cast<_UiListViewItemEventArg*>(const_cast(&arg)); + SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, E_INVALID_ARG, ("[E_INVALID_ARG] event argument is invalid type.")); + + int index1 = pEventArg->GetArg1(); + int index2 = pEventArg->GetArg2(); + int index3 = pEventArg->GetArg3(); + + if (index3 < 0) + { + index3 = -1; + } + + _IUiListViewItemEventListener* pListener = dynamic_cast<_IUiListViewItemEventListener*>(&listener); + SysTryReturnVoidResult(NID_UI_CTRL, pListener != null, E_INVALID_ARG, ("[E_INVALID_ARG] invalid listener type.")); + + switch (pEventArg->GetNotifyType()) + { + case NOTIFY_TYPE_CONTEXTITEM_SELCTED: + pListener->OnListViewContextItemStateChanged(*__pSource, index1, index2, index3, LIST_CONTEXT_ITEM_STATUS_SELECTED); + break; + + case NOTIFY_TYPE_CONTEXTITEM_HIGHLIGHTED: + pListener->OnListViewContextItemStateChanged(*__pSource, index1, index2, index3, LIST_CONTEXT_ITEM_STATUS_HIGHLIGHTED); + break; + + default: + return; + } +} + +}}} // Tizen::Ui::Controls + diff --git a/src/ui/controls/FUiCtrl_UiListViewItemEventArg.cpp b/src/ui/controls/FUiCtrl_UiListViewItemEventArg.cpp new file mode 100644 index 0000000..9df0a7a --- /dev/null +++ b/src/ui/controls/FUiCtrl_UiListViewItemEventArg.cpp @@ -0,0 +1,72 @@ +// +// 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_UiListViewItemEventArg.cpp + * @brief This is the implementation file for _UiListViewItemEventArg class. + * + * This file contains the implementation of _UiListViewItemEventArg class. + */ + +#include +#include "FUiCtrl_UiListViewItemEventArg.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_UiListViewItemEventArg::_UiListViewItemEventArg(int arg1, int arg2, int arg3, ListViewItemEventNotifyType type) + : __arg1(arg1) + , __arg2(arg2) + , __arg3(arg3) + , __type(type) +{ + +} + +_UiListViewItemEventArg::~_UiListViewItemEventArg(void) +{ + +} + +int +_UiListViewItemEventArg::GetArg1(void) const +{ + return __arg1; +} + +int +_UiListViewItemEventArg::GetArg2(void) const +{ + return __arg2; +} + +int +_UiListViewItemEventArg::GetArg3(void) const +{ + return __arg3; +} + +ListViewItemEventNotifyType +_UiListViewItemEventArg::GetNotifyType(void) const +{ + return __type; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_UiScrollEvent.cpp b/src/ui/controls/FUiCtrl_UiScrollEvent.cpp new file mode 100644 index 0000000..c58b239 --- /dev/null +++ b/src/ui/controls/FUiCtrl_UiScrollEvent.cpp @@ -0,0 +1,105 @@ +// +// 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_UiScrollEvent.cpp +* @brief This is the implementation for the _UiScrollEvent class. +*/ + +#include +#include +#include "FUiCtrl_UiScrollEvent.h" +#include "FUiCtrl_UiScrollEventArg.h" +#include "FUiCtrl_IScrollEventListener.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; + +namespace Tizen { namespace Ui { namespace Controls +{ + +//////////////////////////////////////////////////////////////////////////////// +/// _UiScrollEvent class Lifecycle + +_UiScrollEvent::_UiScrollEvent(void) + : __pSource(null) +{ + // nothing +} + +_UiScrollEvent::~_UiScrollEvent(void) +{ + // nothing +} + +result +_UiScrollEvent::Construct(const Tizen::Ui::_Control& source) +{ + ClearLastResult(); + result r = _Event::Initialize(); + SysTryReturnResult(NID_UI, (r == E_SUCCESS), r, "Propagating."); + + // set event source + __pSource = const_cast <_Control*>(&source); + + return r; +} + +//////////////////////////////////////////////////////////////////////////////// +/// __WindowEvent class Accessor + +Tizen::Ui::_Control* +_UiScrollEvent::GetSource(void) const +{ + ClearLastResult(); + return __pSource; +} + +//////////////////////////////////////////////////////////////////////////////// +/// _UiScrollEvent class Operation + +void +_UiScrollEvent::FireImpl(IEventListener& listener, const IEventArg& arg) +{ + _IScrollEventListener* pScrollEventListener = dynamic_cast <_IScrollEventListener*>(&listener); + 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, "[%s] Invalid argument is used. The event argument is not valid.", GetErrorMessage(E_INVALID_ARG)); + + switch (pArg->GetEventType()) + { + case SCROLL_EVENT_ON_SCROLL_STOPPED: + pScrollEventListener->OnScrollStopped(*pArg->GetSource()); + break; + case SCROLL_EVENT_ON_SCROLL_POSITION_CHANGED: + pScrollEventListener->OnScrollPositionChanged(*pArg->GetSource(), pArg->GetScrollPosition()); + break; + case SCROLL_EVENT_ON_SCROLL_END_REACHED: + pScrollEventListener->OnScrollEndReached(*pArg->GetSource(), pArg->GetScrollType()); + break; + case SCROLL_EVENT_ON_SCROLL_JUMP_TO_TOP: + pScrollEventListener->OnScrollJumpToTop(*pArg->GetSource()); + break; + default: + SysTryReturnVoidResult(NID_UI_CTRL, false, E_INVALID_ARG, "[%s] Invalid argument is used. The event argument is not valid.", GetErrorMessage(E_INVALID_ARG)); + break; + } +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_UiScrollEventArg.cpp b/src/ui/controls/FUiCtrl_UiScrollEventArg.cpp new file mode 100644 index 0000000..352aa6c --- /dev/null +++ b/src/ui/controls/FUiCtrl_UiScrollEventArg.cpp @@ -0,0 +1,115 @@ +// +// 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_UiScrollEventArg.cpp +* @brief This is the implementation for the _UiScrollEventArg class. +*/ + +#include +#include "FUiCtrl_UiScrollEventArg.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; + +namespace Tizen { namespace Ui { namespace Controls +{ + +//////////////////////////////////////////////////////////////////////////////// +/// _UiScrollEventArg class Lifecycle + +_UiScrollEventArg::_UiScrollEventArg(_ScrollEventType eventType, const _Control& source, float scrollPosition, ScrollEndEvent scrollType) + : __eventType(eventType) + , __pSource(const_cast <_Control*>(&source)) + , __scrollPosition(scrollPosition) + , __scrollType(scrollType) +{ + // nothing +} + +_UiScrollEventArg::~_UiScrollEventArg(void) +{ + // nothing +} + +_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] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + return pEventArg; +} + +_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] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + return pEventArg; +} + +_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] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + return pEventArg; +} + +_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] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + + return pEventArg; +} + +//////////////////////////////////////////////////////////////////////////////// +/// _UiScrollEventArg class Access +_ScrollEventType +_UiScrollEventArg::GetEventType(void) const +{ + ClearLastResult(); + return __eventType; +} + +_Control* +_UiScrollEventArg::GetSource(void) const +{ + ClearLastResult(); + return __pSource; +} + +ScrollEndEvent +_UiScrollEventArg::GetScrollType(void) const +{ + ClearLastResult(); + return __scrollType; +} + +float +_UiScrollEventArg::GetScrollPosition(void) const +{ + ClearLastResult(); + return __scrollPosition; +} + +}}} // Tizen::Ui::Controls diff --git a/src/ui/controls/FUiCtrl_UiTableViewItemEvent.cpp b/src/ui/controls/FUiCtrl_UiTableViewItemEvent.cpp new file mode 100644 index 0000000..58ca42d --- /dev/null +++ b/src/ui/controls/FUiCtrl_UiTableViewItemEvent.cpp @@ -0,0 +1,298 @@ +// +// 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. +// + +#include +#include +#include +#include +#include +#include "FUiCtrl_ITableViewItemEventListener.h" +#include "FUiCtrl_UiTableViewItemEvent.h" +#include "FUiCtrl_TableViewItemEventArg.h" + + +// using namespace +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; + +namespace Tizen { namespace Ui { namespace Controls +{ + +_UiTableViewItemEvent::_UiTableViewItemEvent(void) + : __pSource(null) + , __invokeTableViewItemCallback(true) + , __style(TABLE_VIEW_STYLE_SIMPLE) +{ + // nothing +} + +_UiTableViewItemEvent::~_UiTableViewItemEvent(void) +{ + // nothing +} + +result +_UiTableViewItemEvent::Construct(Tizen::Ui::_Control* pSource, TableViewStyle style) +{ + result r = _Event::Initialize(); + SysTryReturnResult(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, "Could not construct TableViewItemEvent!"); + + // set event source + __pSource = pSource; + + __style = style; + + return r; +} + +Tizen::Ui::_Control* +_UiTableViewItemEvent::GetSource(void) const +{ + return __pSource; +} + +void +_UiTableViewItemEvent::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.")); + + int index1 = pEventArg->GetArg1(); + int index2 = pEventArg->GetArg2(); + int index3 = pEventArg->GetArg3(); + int index4 = pEventArg->GetArg4(); + bool activated = pEventArg->GetActivated(); + + bool tempInvokeTableViewItemCallback = __invokeTableViewItemCallback; + __invokeTableViewItemCallback = true; + + _ITableViewItemEventListener* pItemListener = dynamic_cast<_ITableViewItemEventListener*>(&listener); + SysTryReturnVoidResult(NID_UI_CTRL, pItemListener != null, E_INVALID_ARG, ("[E_INVALID_ARG] invalid listener type.")); + + _TableView* pTableView = dynamic_cast<_TableView*>(GetSource()); + SysTryReturnVoidResult(NID_UI_CTRL, pTableView != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed.")); + + if (index2 < 0) + { + index2 = -1; + } + + switch (pEventArg->GetNotifyType()) + { + case TABLEVIEW_NOTIFY_TYPE_SELECTED_ITEM: + if (tempInvokeTableViewItemCallback == true) + { + _TableViewItem* pItem =pEventArg->GetItem(); + SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed.")); + + if (__style == TABLE_VIEW_STYLE_SIMPLE) + { + pItemListener->OnTableViewItemStateChanged(*pTableView, index2, pItem, TABLE_VIEW_ITEM_STATUS_SELECTED); + } + else if (__style == TABLE_VIEW_STYLE_GROUPED) + { + if (index2 == -1) + { + pItemListener->OnGroupedTableViewGroupItemStateChanged(*pTableView, index1, pItem, TABLE_VIEW_ITEM_STATUS_SELECTED); + } + else + { + pItemListener->OnGroupedTableViewItemStateChanged(*pTableView, index1, index2, pItem, TABLE_VIEW_ITEM_STATUS_SELECTED); + } + } + else + { + pItemListener->OnSectionTableViewItemStateChanged(*pTableView, index1, index2, pItem, TABLE_VIEW_ITEM_STATUS_SELECTED); + } + } + break; + + case TABLEVIEW_NOTIFY_TYPE_HIGHLIGHED_ITEM: + if (tempInvokeTableViewItemCallback == true) + { + _TableViewItem* pItem =pEventArg->GetItem(); + SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed.")); + + if (__style == TABLE_VIEW_STYLE_SIMPLE) + { + pItemListener->OnTableViewItemStateChanged(*pTableView, index2, pItem, TABLE_VIEW_ITEM_STATUS_HIGHLIGHTED); + } + else if (__style == TABLE_VIEW_STYLE_GROUPED) + { + if (index2 == -1) + { + pItemListener->OnGroupedTableViewGroupItemStateChanged(*pTableView, index1, pItem, TABLE_VIEW_ITEM_STATUS_HIGHLIGHTED); + } + else + { + pItemListener->OnGroupedTableViewItemStateChanged(*pTableView, index1, index2, pItem, TABLE_VIEW_ITEM_STATUS_HIGHLIGHTED); + } + } + else + { + pItemListener->OnSectionTableViewItemStateChanged(*pTableView, index1, index2, pItem, TABLE_VIEW_ITEM_STATUS_HIGHLIGHTED); + } + } + break; + + case TABLEVIEW_NOTIFY_TYPE_ANNEX_CHECK: + if (tempInvokeTableViewItemCallback == true) + { + _TableViewItem* pItem =pEventArg->GetItem(); + SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed.")); + + if (__style == TABLE_VIEW_STYLE_SIMPLE) + { + pItemListener->OnTableViewItemStateChanged(*pTableView, index2, pItem, TABLE_VIEW_ITEM_STATUS_CHECKED); + } + else if (__style == TABLE_VIEW_STYLE_GROUPED) + { + if (index2 == -1) + { + pItemListener->OnGroupedTableViewGroupItemStateChanged(*pTableView, index1, pItem, TABLE_VIEW_ITEM_STATUS_CHECKED); + } + else + { + pItemListener->OnGroupedTableViewItemStateChanged(*pTableView, index1, index2, pItem, TABLE_VIEW_ITEM_STATUS_CHECKED); + } + } + else + { + pItemListener->OnSectionTableViewItemStateChanged(*pTableView, index1, index2, pItem, TABLE_VIEW_ITEM_STATUS_CHECKED); + } + } + break; + + case TABLEVIEW_NOTIFY_TYPE_ANNEX_UNCHECK: + if (tempInvokeTableViewItemCallback == true) + { + _TableViewItem* pItem =pEventArg->GetItem(); + SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed.")); + + if (__style == TABLE_VIEW_STYLE_SIMPLE) + { + pItemListener->OnTableViewItemStateChanged(*pTableView, index2, pItem, TABLE_VIEW_ITEM_STATUS_UNCHECKED); + } + else if (__style == TABLE_VIEW_STYLE_GROUPED) + { + if (index2 == -1) + { + pItemListener->OnGroupedTableViewGroupItemStateChanged(*pTableView, index1, pItem, TABLE_VIEW_ITEM_STATUS_UNCHECKED); + } + else + { + pItemListener->OnGroupedTableViewItemStateChanged(*pTableView, index1, index2, pItem, TABLE_VIEW_ITEM_STATUS_UNCHECKED); + } + } + else + { + pItemListener->OnSectionTableViewItemStateChanged(*pTableView, index1, index2, pItem, TABLE_VIEW_ITEM_STATUS_UNCHECKED); + } + } + break; + + case TABLEVIEW_NOTIFY_TYPE_ANNEX_MORE: + if (tempInvokeTableViewItemCallback == true) + { + _TableViewItem* pItem =pEventArg->GetItem(); + SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed.")); + + if (__style == TABLE_VIEW_STYLE_SIMPLE) + { + pItemListener->OnTableViewItemStateChanged(*pTableView, index2, pItem, TABLE_VIEW_ITEM_STATUS_MORE); + } + else if (__style == TABLE_VIEW_STYLE_GROUPED) + { + if (index2 == -1) + { + pItemListener->OnGroupedTableViewGroupItemStateChanged(*pTableView, index1, pItem, TABLE_VIEW_ITEM_STATUS_MORE); + } + else + { + pItemListener->OnGroupedTableViewItemStateChanged(*pTableView, index1, index2, pItem, TABLE_VIEW_ITEM_STATUS_MORE); + } + } + else + { + pItemListener->OnSectionTableViewItemStateChanged(*pTableView, index1, index2, pItem, TABLE_VIEW_ITEM_STATUS_MORE); + } + } + break; + + case TABLEVIEW_NOTIFY_TYPE_ITEM_SWEPT: + if (tempInvokeTableViewItemCallback == true) + { + if (index3 == TABLE_VIEW_SWEEP_DIRECTION_LEFT) + { + pItemListener->OnTableViewItemSwept(*pTableView, index1, index2, TABLE_VIEW_SWEEP_DIRECTION_LEFT); + } + else + { + pItemListener->OnTableViewItemSwept(*pTableView, index1, index2, TABLE_VIEW_SWEEP_DIRECTION_RIGHT); + } + } + break; + + case TABLEVIEW_NOTIFY_TYPE_TOUCH_LONG_PRESSED: +// pItemListener->OnTableViewItemLongPressed(*pTableView, itemTag, __invokeTableViewItemCallback); + break; + + case TABLEVIEW_NOTIFY_TYPE_REORDERED_ITEM: + if (tempInvokeTableViewItemCallback == true) + { + if (__style == TABLE_VIEW_STYLE_SIMPLE) + { + pItemListener->OnTableViewItemReordered(*pTableView, index1, index2); + } + else if (__style == TABLE_VIEW_STYLE_GROUPED) + { + pItemListener->OnGroupedTableViewItemReordered(*pTableView, index1, index2, index3, index4); + } + } + break; + + case TABLEVIEW_NOTIFY_TYPE_CONTEXT_ITEM_ACTIVATION: + if (tempInvokeTableViewItemCallback == true) + { + _TableViewItem* pItem =pEventArg->GetItem(); + SysTryReturnVoidResult(NID_UI_CTRL, pItem != null, E_INVALID_STATE, ("[E_INVALID_STATE] This instance isn't constructed.")); + + if (__style == TABLE_VIEW_STYLE_SIMPLE) + { + pItemListener->OnTableViewContextItemActivationStateChanged(*pTableView, index2, pItem, activated); + } + else if (__style == TABLE_VIEW_STYLE_GROUPED) + { + pItemListener->OnGroupedTableViewContextItemActivationStateChanged(*pTableView, index1, index2, pItem, activated); + } + else + { + pItemListener->OnSectionTableViewContextItemActivationStateChanged(*pTableView, index1, index2, pItem, activated); + } + } + break; + + default: + return; + } + + return; +} + +}}} // Tizen::Ui::Controls + 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/FUiEffectsEffect.cpp b/src/ui/effects/FUiEffectsEffect.cpp new file mode 100644 index 0000000..8fc4016 --- /dev/null +++ b/src/ui/effects/FUiEffectsEffect.cpp @@ -0,0 +1,316 @@ +// +// 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 FUiEffectsEffect.cpp + * @brief This file contains implementation of Effect class. + */ + +#include + +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "FUiEffects_EffectManagerImpl.h" +#include +#include "FUiEffects_EffectErrorMessages.h" +#include +#include +#include + +using namespace Tizen::Ui::Controls; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Ui; +using namespace Tizen::Base::Collection; + +using namespace Tizen::Ui::Effects::_Runtime; +using namespace Tizen::Ui::Effects::_Renderer; +using namespace Tizen::Ui::Effects::_Parser; +using namespace Tizen::Ui::Effects; +using namespace Tizen::Ui::Effects::_Utils; +using namespace std; + +using namespace Tizen::Graphics; +using namespace Tizen::Base; + +namespace Tizen { namespace Ui { namespace Effects +{ + +result +Effect::Start(void) +{ + SysAssertf(__pEffectImpl != null, _UiEffectError::INTERNAL_ERROR); + + SetLastResult(E_SUCCESS); + + ArrayList emptyList; + result r = emptyList.Construct(); + SysTryReturn(NID_UI_EFFECT, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __pEffectImpl->Start(emptyList); + SysTryReturn(NID_UI_EFFECT, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + return r; +} + +result +Effect::Start(const Tizen::Base::Collection::IList& effectStartInfo) +{ + SysAssertf(__pEffectImpl != null, _UiEffectError::INTERNAL_ERROR); + + SetLastResult(E_SUCCESS); + result r = __pEffectImpl->Start(effectStartInfo); + SysTryReturn(NID_UI_EFFECT, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + return r; +} + +result +Effect::Stop(void) +{ + SysAssertf(__pEffectImpl != null, _UiEffectError::INTERNAL_ERROR); + + SetLastResult(E_SUCCESS); + result r = __pEffectImpl->Stop(); + SysTryReturn(NID_UI_EFFECT, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + return r; +} + +result +Effect::SetRenderTarget(Tizen::Ui::Control* pControl) +{ + SysAssertf(__pEffectImpl != null, _UiEffectError::INTERNAL_ERROR); + + SetLastResult(E_SUCCESS); + result r = __pEffectImpl->SetRenderTarget(pControl); + SysTryReturn(NID_UI_EFFECT, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +Effect::FeedTouchPressEvent(const Tizen::Ui::TouchEventInfo& touchEventInfo, const Point& offset) +{ + SysAssertf(__pEffectImpl != null, _UiEffectError::INTERNAL_ERROR); + + SetLastResult(E_SUCCESS); + result r = __pEffectImpl->FeedTouchPressEvent(touchEventInfo, offset); + SysTryReturn(NID_UI_EFFECT, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + return r; +} + +result +Effect::FeedTouchPressEvent(const Tizen::Ui::TouchEventInfo& touchEventInfo) +{ + SysAssertf(__pEffectImpl != null, _UiEffectError::INTERNAL_ERROR); + + SetLastResult(E_SUCCESS); + result r = __pEffectImpl->FeedTouchPressEvent(touchEventInfo, Point(0, 0)); + SysTryReturn(NID_UI_EFFECT, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + return r; +} + +result +Effect::FeedTouchMoveEvent(const Tizen::Ui::TouchEventInfo& touchEventInfo, const Point& offset) +{ + SysAssertf(__pEffectImpl != null, _UiEffectError::INTERNAL_ERROR); + + SetLastResult(E_SUCCESS); + result r = __pEffectImpl->FeedTouchMoveEvent(touchEventInfo, offset); + SysTryReturn(NID_UI_EFFECT, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + return r; +} + +result +Effect::FeedTouchMoveEvent(const Tizen::Ui::TouchEventInfo& touchEventInfo) +{ + SysAssertf(__pEffectImpl != null, _UiEffectError::INTERNAL_ERROR); + + SetLastResult(E_SUCCESS); + result r = __pEffectImpl->FeedTouchMoveEvent(touchEventInfo, Point(0, 0)); + SysTryReturn(NID_UI_EFFECT, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + return r; +} + +result +Effect::FeedTouchReleaseEvent(const Tizen::Ui::TouchEventInfo& touchEventInfo, const Point& offset) +{ + SysAssertf(__pEffectImpl != null, _UiEffectError::INTERNAL_ERROR); + + SetLastResult(E_SUCCESS); + result r = __pEffectImpl->FeedTouchReleaseEvent(touchEventInfo, offset); + SysTryReturn(NID_UI_EFFECT, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + return r; +} + +result +Effect::FeedTouchReleaseEvent(const Tizen::Ui::TouchEventInfo& touchEventInfo) +{ + SysAssertf(__pEffectImpl != null, _UiEffectError::INTERNAL_ERROR); + + SetLastResult(E_SUCCESS); + result r = __pEffectImpl->FeedTouchReleaseEvent(touchEventInfo, Point(0, 0)); + SysTryReturn(NID_UI_EFFECT, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + return r; +} + +result +Effect::FeedTouchDoublePressEvent(const Tizen::Ui::TouchEventInfo& touchEventInfo, const Point& offset) +{ + SysAssertf(__pEffectImpl != null, _UiEffectError::INTERNAL_ERROR); + + SetLastResult(E_SUCCESS); + result r = __pEffectImpl->FeedTouchDoublePressEvent(touchEventInfo, offset); + SysTryReturn(NID_UI_EFFECT, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + return r; +} + +result +Effect::FeedTouchDoublePressEvent(const Tizen::Ui::TouchEventInfo& touchEventInfo) +{ + SysAssertf(__pEffectImpl != null, _UiEffectError::INTERNAL_ERROR); + + SetLastResult(E_SUCCESS); + result r = __pEffectImpl->FeedTouchDoublePressEvent(touchEventInfo, Point(0, 0)); + SysTryReturn(NID_UI_EFFECT, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + return r; +} + +result +Effect::SetBitmap(long bitmapId, const Tizen::Graphics::Bitmap& bitmap) +{ + SysAssertf(__pEffectImpl != null, _UiEffectError::INTERNAL_ERROR); + + SetLastResult(E_SUCCESS); + result r = __pEffectImpl->SetBitmap(bitmapId, bitmap); + SysTryReturn(NID_UI_EFFECT, !(r == E_OUT_OF_MEMORY), E_OPERATION_FAILED, E_OPERATION_FAILED, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturn(NID_UI_EFFECT, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + return r; +} + +bool +Effect::IsRunning(void) const +{ + SysAssertf(__pEffectImpl != null, _UiEffectError::INTERNAL_ERROR); + + SetLastResult(E_SUCCESS); + bool isRunning = __pEffectImpl->IsRunning(); + result r = GetLastResult(); + SysTryReturn(NID_UI_EFFECT, r == E_SUCCESS, isRunning, r, "[%s] Propagating.", GetErrorMessage(r)); + return isRunning; +} + +EffectType +Effect::GetType(void) const +{ + SysAssertf(__pEffectImpl != null, _UiEffectError::INTERNAL_ERROR); + + SetLastResult(E_SUCCESS); + EffectType effectType = __pEffectImpl->GetType(); + result r = GetLastResult(); + SysTryReturn(NID_UI_EFFECT, r == E_SUCCESS, effectType, r, "[%s] Propagating.", GetErrorMessage(r)); + return effectType; +} + +String +Effect::GetName(void) const +{ + SysAssertf(__pEffectImpl != null, _UiEffectError::INTERNAL_ERROR); + + SetLastResult(E_SUCCESS); + String effectName = __pEffectImpl->GetName(); + result r = GetLastResult(); + SysTryReturn(NID_UI_EFFECT, r == E_SUCCESS, effectName, r, "[%s] Propagating.", GetErrorMessage(r)); + return effectName; +} + +void +Effect::SetEffectEventListener(IEffectEventListener* pListener) +{ + SysAssertf(__pEffectImpl != null, _UiEffectError::INTERNAL_ERROR); + + SetLastResult(E_SUCCESS); + __pEffectImpl->SetEffectEventListener(pListener); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_EFFECT, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +IEffectEventListener* +Effect::GetEffectEventListener(void) const +{ + SysAssertf(__pEffectImpl != null, _UiEffectError::INTERNAL_ERROR); + + SetLastResult(E_SUCCESS); + IEffectEventListener* listener = null; + listener = __pEffectImpl->GetEffectEventListener(); + result r = GetLastResult(); + SysTryReturn(NID_UI_EFFECT, r == E_SUCCESS, listener, r, "[%s] Propagating.", GetErrorMessage(r)); + return listener; +} + +void +Effect::SetResourceProvider(IEffectResourceProvider* pProvider) +{ + SysAssertf(__pEffectImpl != null, _UiEffectError::INTERNAL_ERROR); + + SetLastResult(E_SUCCESS); + __pEffectImpl->SetResourceProvider(pProvider); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_EFFECT, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +IEffectResourceProvider* +Effect::GetResourceProvider(void) const +{ + SysAssertf(__pEffectImpl != null, _UiEffectError::INTERNAL_ERROR); + + SetLastResult(E_SUCCESS); + IEffectResourceProvider* provider = null; + provider = __pEffectImpl->GetResourceProvider(); + result r = GetLastResult(); + SysTryReturn(NID_UI_EFFECT, r == E_SUCCESS, provider, r, "[%s] Propagating.", GetErrorMessage(r)); + return provider; +} + +Effect::Effect(void) + : __pEffectImpl(null) +{ + __pEffectImpl = new (std::nothrow) _EffectImpl(*this); + SysTryReturnVoidResult(NID_UI_EFFECT, __pEffectImpl != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + + __pEffectImpl->InitializeEffect(); +} + + +Effect::~Effect(void) +{ + if (__pEffectImpl != null) + { + delete __pEffectImpl; + __pEffectImpl = null; + } +} + +}}} // Tizen::Ui::Effects diff --git a/src/ui/effects/FUiEffectsEffectManager.cpp b/src/ui/effects/FUiEffectsEffectManager.cpp new file mode 100644 index 0000000..d4fed88 --- /dev/null +++ b/src/ui/effects/FUiEffectsEffectManager.cpp @@ -0,0 +1,90 @@ +// +// 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 FUiEffectsEffectManager.cpp + * @brief This is the source file for the EffectManager class + */ + +#include + +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Effects +{ + +EffectManager* +EffectManager::GetInstance(void) +{ + return _EffectManagerImpl::GetInstance().first; +} + +void +EffectManager::DestroyInstance(void) +{ + _EffectManagerImpl::DestroyInstance(); + return; +} + +Effect* +EffectManager::CreateEffect(const Tizen::Base::String& filePath) +{ + //Get and store current locale: + char* pCurrentLocale = setlocale(LC_ALL, null); + char* pCurrentLocaleDuplicated = null; + if (pCurrentLocale != null) + { + pCurrentLocaleDuplicated = strdup(pCurrentLocale); + //Set minimal "C" locale: + setlocale(LC_ALL,"C"); + } + + Effect* pEffect = _EffectManagerImpl::GetInstance().second->CreateEffect(filePath); + + if (pCurrentLocaleDuplicated != null) + { + //Restore previously saved locale: + setlocale(LC_ALL, pCurrentLocaleDuplicated); + free(pCurrentLocaleDuplicated); + } + + return pEffect; +} + +void +EffectManager::DestroyEffect(Effect& effect) +{ + _EffectManagerImpl::GetInstance().second->DestroyEffect(effect); +} + +// This default constructor is intentionally declared as private to implement the Singleton semantic. +EffectManager::EffectManager(void) + : __pEffectManagerImpl(null) +{ + +} + +// This destructor is intentionally declared as private to implement the Singleton semantic. +EffectManager::~EffectManager(void) +{ + +} + +}}} // Tizen::Ui::Effects diff --git a/src/ui/effects/FUiEffectsEffectTouchInfo.cpp b/src/ui/effects/FUiEffectsEffectTouchInfo.cpp new file mode 100644 index 0000000..c002b11 --- /dev/null +++ b/src/ui/effects/FUiEffectsEffectTouchInfo.cpp @@ -0,0 +1,93 @@ +// +// 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 FUiEffectsEffectTouchInfo.cpp + * @brief This file contains implementation of EffectTouchInfo class + */ + +#include +#include +#include + +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Effects +{ + +EffectTouchInfo::EffectTouchInfo(Point currentPosition, + Point startPosition, + unsigned long touchId) + : __currentPosition(currentPosition) + , __startPosition(startPosition) + , __touchId(touchId) +{ + return; +} + +EffectTouchInfo::EffectTouchInfo(void) + : __currentPosition() + , __startPosition() + , __touchId(std::numeric_limits::max()) +{ + return; +} + +EffectTouchInfo::~EffectTouchInfo(void) +{ + return; +} + +void +EffectTouchInfo::SetCurrentPosition(const Point& curPos) +{ + __currentPosition = curPos; + return; +} + +void +EffectTouchInfo::SetStartPosition(const Point& startPos) +{ + __startPosition = startPos; + return; +} + +Point +EffectTouchInfo::GetCurrentPosition(void) const +{ + return __currentPosition; +} + +Point +EffectTouchInfo::GetStartPosition(void) const +{ + return __startPosition; +} + +void +EffectTouchInfo::SetTouchId(unsigned long touchId) +{ + __touchId = touchId; + return; +} + +unsigned long +EffectTouchInfo::GetTouchId(void) const +{ + return __touchId; +} + +}}} // Tizen::Ui::Effects diff --git a/src/ui/effects/FUiEffectsEffectTouchInfo.h b/src/ui/effects/FUiEffectsEffectTouchInfo.h new file mode 100644 index 0000000..cf29c25 --- /dev/null +++ b/src/ui/effects/FUiEffectsEffectTouchInfo.h @@ -0,0 +1,150 @@ +// +// 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 FUiEffectsEffectTouchInfo.h + * @brief This is the header file for the EffectTouchInfo class + */ +#ifndef _FUI_EFFECTS_EFFECTTOUCHINFO_H_ +#define _FUI_EFFECTS_EFFECTTOUCHINFO_H_ + +#include + +namespace Tizen { namespace Graphics { + class Point; +} } // Tizen::Graphics + +namespace Tizen { namespace Ui { namespace Effects +{ + +/** +* @class EffectTouchInfo +* @brief This class is used for construction touch event extended info +* +* @since 2.0 +* +*/ +class EffectTouchInfo +{ +public: + /** + * Constructor + * + * @since 2.0 + * + */ + EffectTouchInfo(void); + + /** + * Constructor + * + * @since 2.0 + * + */ + EffectTouchInfo(Tizen::Graphics::Point currentPosition, + Tizen::Graphics::Point startPosition, + unsigned long touchId); + + /** + * Destructor + * + * @since 2.0 + * + */ + virtual ~EffectTouchInfo(void); + + /** + * Sets current position of touch + * + * @since 2.0 + * + */ + void SetCurrentPosition(const Tizen::Graphics::Point& currentPosition); + + /** + * Sets start position of touch + * + * @since 2.0 + * + */ + void SetStartPosition(const Tizen::Graphics::Point& startPosition); + + /** + * Gets current position of touch + * + * @since 2.0 + * + */ + Tizen::Graphics::Point GetCurrentPosition(void) const; + + /** + * Returns start position of touch + * + * @since 2.0 + * + */ + Tizen::Graphics::Point GetStartPosition(void) const; + + /** + * Sets touch id + * + * @since 2.0 + * + */ + void SetTouchId(unsigned long touchId); + + /** + * Gets touch id + * + * @since 2.0 + * + */ + unsigned long GetTouchId(void) const; + +protected: + +private: + + /** + * Hidden copy constructor + * + * @since 2.0 + * + */ + EffectTouchInfo(const EffectTouchInfo &rhs); + + /** + * Hidden assignment operator + * + * @since 2.0 + * + */ + EffectTouchInfo &operator=(const EffectTouchInfo &rhs); + + +public: + +protected: + +private: + Tizen::Graphics::Point __currentPosition; /**< means the current point of some touch event */ + Tizen::Graphics::Point __startPosition; /**< means the start (first) point of some touch event */ + unsigned long __touchId; +}; + +} } } // Tizen::Ui::Effects + +#endif //_FUI_EFFECTS_EFFECTTOUCHINFO_H_ diff --git a/src/ui/effects/FUiEffects_EffectErrorMessages.cpp b/src/ui/effects/FUiEffects_EffectErrorMessages.cpp new file mode 100644 index 0000000..f4960af --- /dev/null +++ b/src/ui/effects/FUiEffects_EffectErrorMessages.cpp @@ -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 FUiEffects_EffectErrorMessages.cpp + * @brief This is the source file for the _UiEffectError class + */ +#include "FUiEffects_EffectErrorMessages.h" + +namespace Tizen { namespace Ui { namespace Effects +{ +const char* _UiEffectError::NOT_CONSTRUCTED_MANAGER = "Effect Manager is not fully constructed"; +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 = "[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"; + +const char* _UiEffectError::INTERNAL_ERROR = "Effects_internal_error"; +const char* _UiEffectError::LUA_INTERNAL_ERROR = "Lua runtime internal error in effect [%i, %s]"; +const char* _UiEffectError::LUA_RUNTIME_ERROR = "There are some errors in lua script"; +const char* _UiEffectError::NURBSGS_INTERNAL_ERROR = "NURBS Graphical Surface runtime internal error"; + +const char* _UiEffectError::EP_XML_PARSING_FAILED = "Parsing of an xml file hasn't finished successfully"; +const char* _UiEffectError::EP_EXTRACTING_MODEL_FILES_FAILED = "Failed to unzip an effect file"; +const char* _UiEffectError::EP_ATTRIBUTE_NOT_FOUND = "Missing one of expected attributes in an xml model file"; +const char* _UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE = "Attribute value doesn't match the predefined range"; +const char* _UiEffectError::EP_MEMBER_NOT_INITIALIZED = "A member variable of effect parser is not initialized"; +const char* _UiEffectError::EP_ERROR_IN_LOGIC = "An error in the logic of effect parser occurred"; +} } } // Tizen::Ui::Effects diff --git a/src/ui/effects/FUiEffects_EffectErrorMessages.h b/src/ui/effects/FUiEffects_EffectErrorMessages.h new file mode 100644 index 0000000..b490887 --- /dev/null +++ b/src/ui/effects/FUiEffects_EffectErrorMessages.h @@ -0,0 +1,64 @@ +// +// 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 FUiEffects_EffectErrorMessages.h + * @brief This is the header file for the _UiEffectError + */ + +#ifndef _FUI_EFFECRTS_INTERNAL_EFFECT_ERROR_MESSAGES_H_ +#define _FUI_EFFECRTS_INTERNAL_EFFECT_ERROR_MESSAGES_H_ + +#include + +namespace Tizen { namespace Ui { namespace Effects +{ + +/** +* @class _UiEffectError +* @brief Class for message texts +* +* @since 2.0 +* +*/ +class _UiEffectError + : public Tizen::Ui::_UiError +{ +public: + static const char* NOT_CONSTRUCTED_MANAGER; + static const char* NO_EFFECT_FILE; + static const char* EFFECT_FILE_ERROR; + static const char* NO_EFFECT; + static const char* FEED_TOUCH_IS_BLOCKED; + static const char* OUT_OF_MEMORY; + static const char* INTERNAL_ERROR; + static const char* LUA_INTERNAL_ERROR; + static const char* LUA_RUNTIME_ERROR; + static const char* NURBSGS_INTERNAL_ERROR; + static const char* LISTENER_IS_NOT_ASSIGNED; + static const char* PROVIDER_IS_NOT_ASSIGNED; + + static const char* EP_XML_PARSING_FAILED; + static const char* EP_EXTRACTING_MODEL_FILES_FAILED; + static const char* EP_ATTRIBUTE_NOT_FOUND; + static const char* EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE; + static const char* EP_MEMBER_NOT_INITIALIZED; + static const char* EP_ERROR_IN_LOGIC; +}; + +} } } // Tizen::Ui::Effects + +#endif // _FUI_EFFECRTS_INTERNAL_EFFECT_ERROR_MESSAGES_H_ diff --git a/src/ui/effects/FUiEffects_EffectImpl.cpp b/src/ui/effects/FUiEffects_EffectImpl.cpp new file mode 100644 index 0000000..3b2959a --- /dev/null +++ b/src/ui/effects/FUiEffects_EffectImpl.cpp @@ -0,0 +1,653 @@ +// +// 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 FUiEffects_EffectImpl.cpp + * @brief This is the source file for the _EffectImpl class + */ + +#include "FUiEffects_EffectImpl.h" + +#include +#include +#include + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "FUiEffects_EffectManagerImpl.h" +#include +#include "FUiEffects_EffectErrorMessages.h" +#include +#include + +#include "FUiEffects_RuntimeRenderDataScene.h" + +using namespace Tizen::Ui::Controls; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Ui; +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Base::Collection; + +using namespace Tizen::Ui::Effects::_Runtime; +using namespace Tizen::Ui::Effects::_Renderer; +using namespace Tizen::Ui::Effects::_Parser; +using namespace Tizen::Ui::Effects; +using namespace Tizen::Ui::Effects::_Utils; +using namespace std; + +namespace Tizen { namespace Ui { namespace Effects +{ + +EffectsSet _EffectImpl::__effects = EffectsSet(); +RenderControlsMap _EffectImpl::__renderControls = RenderControlsMap(); +EffectsControlsMap _EffectImpl::__effectsControlsMapRegistered = EffectsControlsMap(); +ControlsSet _EffectImpl::__controlsSetPerforming = ControlsSet(); +long _EffectImpl::__effectsCount = 0; + +_EffectImpl::_EffectImpl(Effect& effect) + : __pEffect(&effect) + , __pModel(null) + , __pRenderer(null) + , __pEventListener(null) + , __pResourceProvider(null) + , __modelTimer() + , __renderTargetSet(false) +{ + ++__effectsCount; + __pEffect->__pEffectImpl = this; +} + +_EffectImpl::~_EffectImpl(void) +{ + Stop(); // <-- checking for result is not necessary (Effect must be stopped before deleting) + + __effects.erase(__pEffect); + --__effectsCount; + + //surface deleting if it is not used in other effects + EffectsControlsMap::const_iterator itEffectControl; + itEffectControl = __effectsControlsMapRegistered.find(__pEffect); + + //if render target is set then release render target (delete GLSurface and pointers) + if (itEffectControl != __effectsControlsMapRegistered.end()) + { + ReleaseRenderTarget(*(itEffectControl->second)); + } +} + +void +_EffectImpl::ReleaseRenderTarget(const Control& control) +{ + RenderControlsMap::const_iterator itRenderControl = __renderControls.find(&control); + SysAssertf(itRenderControl != __renderControls.end(), _UiEffectError::INTERNAL_ERROR); + __effectsControlsMapRegistered.erase(__pEffect); + bool isDelete = true; + if (!__effectsControlsMapRegistered.empty()) + { + for (EffectsControlsMap::const_iterator itEffectControl = __effectsControlsMapRegistered.begin(); + itEffectControl != __effectsControlsMapRegistered.end(); + ++itEffectControl) + { + if (itEffectControl->second == itRenderControl->first) + { + isDelete = false; + break; + } + } + } + if (isDelete) + { + __pRenderer->ReleaseCache(); + __pRenderer->surface = EGL_NO_SURFACE; + EffectRenderer::DeleteSurface(itRenderControl->second); + __renderControls.erase(itRenderControl->first); + } +} + +result +_EffectImpl::SetRenderTarget(const Tizen::Ui::Control* pControl) +{ + SysTryLogReturn(NID_UI_EFFECT, __pRenderer != null, E_OPERATION_FAILED, "Rendering is unavailable for this effect"); + + //checking for effect running + SysTryReturn(NID_UI_EFFECT, !IsRunning(), E_IN_PROGRESS, E_IN_PROGRESS, + "Effects. [E_IN_PROGRESS] Effect is running now"); + + //if render target was set earlier + EffectsControlsMap::const_iterator itEffectsControlsMap = __effectsControlsMapRegistered.find(__pEffect); + if (itEffectsControlsMap != __effectsControlsMapRegistered.end()) + { + const Control* pControlOld = itEffectsControlsMap->second; + if (pControl == null) + { + ReleaseRenderTarget(*pControlOld); + return E_SUCCESS; + } + //if new and old controls are the same + if (pControlOld == pControl) + { + return E_SUCCESS; + } + return SetRenderTargetInternal(*pControl, *pControlOld); + } + else//if render target wasn't set earlier + { + if (pControl == null) + { + return E_SUCCESS; + } + else + { + return SetRenderTargetInternal(*pControl, *pControl); + } + } +} + +result +_EffectImpl::SetRenderTargetInternal(const Control& control, const Control& controlOld) +{ + __pRenderer->surface = FindGlesSurface(&control); + + if (__pRenderer->surface == EGL_NO_SURFACE) + { + __pRenderer->surface = EffectRenderer::CreateSurface((EGLNativeWindowType)&control); + SysTryReturn(NID_UI_EFFECT, __pRenderer->surface != EGL_NO_SURFACE, E_OPERATION_FAILED, E_OPERATION_FAILED, "Creation of OpenGL surface for effect \"%s\" failed", __pModel->GetName().c_str()); + SysLog(NID_UI_EFFECT, "Effects. EGL surface is created successfully"); + if (&controlOld != &control) + { + ReleaseRenderTarget(controlOld); + } + __renderControls.insert(RenderControlsMapPair(&control, __pRenderer->surface)); + } + + __pRenderer->SetScreen(control); + + //Reserve memory for texture for less latency on bitmap upload + Dimension realControlSize = _CoordinateSystemUtils::Transform(control.GetSize()); + const RenderDataSurfaceCollection& renderData = __pModel->GetRenderingData()->GetRenderDataSurfaceCollection(); + RenderDataSurfaceCollection::const_iterator it = renderData.begin(); + RenderDataSurfaceCollection::const_iterator itend = renderData.end(); + for (; it != itend; ++it) + { + __pRenderer->SetBitmap((*it)->bitmapId, null, realControlSize.width, realControlSize.height); + } + + __pRenderer->BuildCache(); + + __effectsControlsMapRegistered.insert(std::make_pair(__pEffect, &control)); + + return E_SUCCESS; +} + +result +_EffectImpl::Start(const Tizen::Base::Collection::IList& effectStartInfo) +{ + START_PROFILER(PROFLOG_StartEffect) + + int countCollection = effectStartInfo.GetCount(); + EffectsVector effectStartInfoVector(countCollection); + for (int i = 0; i < countCollection; ++i) + { + effectStartInfoVector[i] = static_cast(effectStartInfo.GetAt(i))->ToFloat(); + } + + SysAssertf(__pModel != null, _UiEffectError::INTERNAL_ERROR); + + if (__pEventListener == null) + { + SysLog(NID_UI_EFFECT, _UiEffectError::LISTENER_IS_NOT_ASSIGNED, __pModel->GetName().c_str()); + } + if (__pResourceProvider == null) + { + SysLog(NID_UI_EFFECT, _UiEffectError::PROVIDER_IS_NOT_ASSIGNED, __pModel->GetName().c_str()); + } + + _EffectState effState = __pModel->GetState(); + SysTryReturn(NID_UI_EFFECT, effState != _EFFECT_STATE_RUNTIME_ERROR, E_OPERATION_FAILED, E_OPERATION_FAILED, "Attempt to Start an Effect with RUNTIME_ERROR state, effect \"%s\"", __pModel->GetName().c_str()); + SysTryReturn(NID_UI_EFFECT, effState != _EFFECT_STATE_RUNNING, E_INVALID_STATE, E_INVALID_STATE, "Attempt to Start an Effect that is currently running, effect \"%s\"", __pModel->GetName().c_str()); + SysTryReturn(NID_UI_EFFECT, effState == _EFFECT_STATE_RUNNABLE, E_OPERATION_FAILED, E_OPERATION_FAILED, "Attempt to Start an Effect that is not runnable, effect \"%s\"", __pModel->GetName().c_str()); + + EffectsControlsMap::iterator iterRegistered = __effectsControlsMapRegistered.find(__pEffect); + + __renderTargetSet = __pRenderer != null && iterRegistered != __effectsControlsMapRegistered.end(); + if (!__renderTargetSet) + { + SysLog(NID_UI_EFFECT, "Effect has no attached surface for rendering, effect \"%s\" ", __pModel->GetName().c_str()); + } + else + { + for (ControlsSet::iterator iterPerforming = __controlsSetPerforming.begin(); iterPerforming != __controlsSetPerforming.end(); ++iterPerforming) + { + SysTryReturn(NID_UI_EFFECT, iterRegistered->second != *iterPerforming, E_ALREADY_SET, E_ALREADY_SET, "Attempt to Start more than one Effect on the same Control, effect \"%s\" ", __pModel->GetName().c_str()); + } + __controlsSetPerforming.insert(iterRegistered->second); + } + + int startResult = 0; + SysTryCatch(NID_UI_EFFECT, SETJMP == 0, , GetLastResult(), "[%s] Propagating", GetErrorMessage(GetLastResult())); + + startResult = __pModel->Start(effectStartInfoVector); + switch (startResult) + { + case 0: + SysLog(NID_UI_EFFECT, "Effect [%i, %s] was started successfully", __pModel->GetId(), __pModel->GetName().c_str()); + break; + case 1: + SysLogException(NID_UI_EFFECT, E_OPERATION_FAILED, "The effect [%i, %s] is not runnable", __pModel->GetId(), __pModel->GetName().c_str()); + return E_OPERATION_FAILED; + case 2: + SysLogException(NID_UI_EFFECT, E_OPERATION_FAILED, _UiEffectError::LUA_INTERNAL_ERROR, __pModel->GetId(), __pModel->GetName().c_str()); + return E_OPERATION_FAILED; + case 3: + SysLogException(NID_UI_EFFECT, E_OPERATION_FAILED, "Some error was appeared in function SetBitmap of resources provider for effect [%i, %s]", __pModel->GetId(), __pModel->GetName().c_str()); + return E_OPERATION_FAILED; + default: + SysLogException(NID_UI_EFFECT, E_OPERATION_FAILED, "Unknown error in effect [%i, %s]", __pModel->GetId(), __pModel->GetName().c_str()); + return E_OPERATION_FAILED; + } + + __modelTimer.Reset(); + __modelTimer.Start(1); + + END_PROFILER(PROFLOG_StartEffect) + + return E_SUCCESS; + + CATCH: + { + __pModel->Stop(true, false); + return E_OPERATION_FAILED; + } +} + +result +_EffectImpl::Stop(void) +{ + if (__pModel == null) + { + return E_SUCCESS; + } + + if (__pModel->GetState() == _EFFECT_STATE_RUNNING) + { + __pModel->Stop(false, true); + EffectModelTimerStop(); + + return E_SUCCESS; + } + else + { + return E_INVALID_STATE; + } +} + +result +_EffectImpl::FeedTouchPressEvent(const Tizen::Ui::TouchEventInfo& touchEventInfo, const Tizen::Graphics::Point& offset) +{ + SysAssertf(__pModel != null, _UiEffectError::INTERNAL_ERROR); + + SysTryLogReturn(NID_UI_EFFECT, __pRenderer != null, E_OPERATION_FAILED, "Rendering is unavailable for this effect"); + + TouchEventScript touchEventScript = {__pRenderer->TransformScreenToWorld(Vec2f(touchEventInfo.GetCurrentPosition().x, touchEventInfo.GetCurrentPosition().y)), + __pRenderer->TransformScreenToWorld(Vec2f(touchEventInfo.GetStartPosition().x, touchEventInfo.GetStartPosition().y)), + touchEventInfo.GetPointId()}; + + __pModel->FeedTouchPressEvent(touchEventScript); + return GetLastResult(); +} + +result +_EffectImpl::FeedTouchMoveEvent(const Tizen::Ui::TouchEventInfo& touchEventInfo, const Tizen::Graphics::Point& offset) +{ + SysAssertf(__pModel != null, _UiEffectError::INTERNAL_ERROR); + + SysTryLogReturn(NID_UI_EFFECT, __pRenderer != null, E_OPERATION_FAILED, "Rendering is unavailable for this effect"); + + TouchEventScript touchEventScript = {__pRenderer->TransformScreenToWorld(Vec2f(touchEventInfo.GetCurrentPosition().x, touchEventInfo.GetCurrentPosition().y)), + __pRenderer->TransformScreenToWorld(Vec2f(touchEventInfo.GetStartPosition().x, touchEventInfo.GetStartPosition().y)), + touchEventInfo.GetPointId()}; + + __pModel->FeedTouchMoveEvent(touchEventScript); + return GetLastResult(); +} + +result +_EffectImpl::FeedTouchReleaseEvent(const Tizen::Ui::TouchEventInfo& touchEventInfo, const Tizen::Graphics::Point& offset) +{ + SysAssertf(__pModel != null, _UiEffectError::INTERNAL_ERROR); + + SysTryLogReturn(NID_UI_EFFECT, __pRenderer != null, E_OPERATION_FAILED, "Rendering is unavailable for this effect"); + + TouchEventScript touchEventScript = {__pRenderer->TransformScreenToWorld(Vec2f(touchEventInfo.GetCurrentPosition().x, touchEventInfo.GetCurrentPosition().y)), + __pRenderer->TransformScreenToWorld(Vec2f(touchEventInfo.GetStartPosition().x, touchEventInfo.GetStartPosition().y)), + touchEventInfo.GetPointId()}; + + __pModel->FeedTouchReleaseEvent(touchEventScript); + return GetLastResult(); +} + +result +_EffectImpl::FeedTouchDoublePressEvent(const Tizen::Ui::TouchEventInfo& touchEventInfo, const Tizen::Graphics::Point& offset) +{ + SysAssertf(__pModel != null, _UiEffectError::INTERNAL_ERROR); + + SysTryLogReturn(NID_UI_EFFECT, __pRenderer != null, E_OPERATION_FAILED, "Rendering is unavailable for this effect"); + + TouchEventScript touchEventScript = {__pRenderer->TransformScreenToWorld(Vec2f(touchEventInfo.GetCurrentPosition().x, touchEventInfo.GetCurrentPosition().y)), + __pRenderer->TransformScreenToWorld(Vec2f(touchEventInfo.GetStartPosition().x, touchEventInfo.GetStartPosition().y)), + touchEventInfo.GetPointId()}; + + __pModel->FeedTouchDoublePressEvent(touchEventScript); + return GetLastResult(); +} + +result +_EffectImpl::SetBitmap(long bitmapId, const Bitmap& bitmap) +{ + SysTryLogReturn(NID_UI_EFFECT, __pRenderer != null, E_OPERATION_FAILED, "Rendering is unavailable for this effect"); + + bool resOk = false; + + // Analysing non existing bitmap ID in Effect Project [with E_OBJ_NOT_FOUND] + const RenderDataSurfaceCollection& renderData = __pModel->GetRenderingData()->GetRenderDataSurfaceCollection(); + RenderDataSurfaceCollection::const_iterator it = renderData.begin(); + RenderDataSurfaceCollection::const_iterator itend = renderData.end(); + for (; it != itend; ++it) + { + if ((*it)->bitmapId == bitmapId) + { + resOk = true; + break; + } + } + SysTryReturn(NID_UI_EFFECT, resOk, E_OPERATION_FAILED, E_OPERATION_FAILED, "Bitmap with specified id does not exist"); + + resOk = __pRenderer->SetBitmap(bitmapId, const_cast(bitmap)); + return (resOk ? E_SUCCESS : E_OPERATION_FAILED); +} + +bool +_EffectImpl::IsRunning(void) const +{ + SysAssertf(__pModel != null, _UiEffectError::INTERNAL_ERROR); + + _EffectState effectState = __pModel->GetState(); + return (effectState == _EFFECT_STATE_RUNNING); +} + +EffectType +_EffectImpl::GetType(void) const +{ + SysAssertf(__pModel != null, _UiEffectError::INTERNAL_ERROR); + return __pModel->GetType(); +} + +String +_EffectImpl::GetName(void) const +{ + return String(__pModel->GetName().c_str()); +} + +void +_EffectImpl::SetEffectEventListener(IEffectEventListener* pListener) +{ + __pEventListener = pListener; + return; +} + +IEffectEventListener* +_EffectImpl::GetEffectEventListener(void) const +{ + return __pEventListener; +} + +void +_EffectImpl::SetResourceProvider(IEffectResourceProvider* pProvider) +{ + __pResourceProvider = pProvider; + return; +} + +IEffectResourceProvider* +_EffectImpl::GetResourceProvider(void) const +{ + return __pResourceProvider; +} + +EGLSurface +_EffectImpl::FindGlesSurface(const Control* pControl) const +{ + RenderControlsMap::const_iterator it = __renderControls.find(pControl); + + if (it != __renderControls.end()) + { + return it->second; + } + + return EGL_NO_SURFACE; +} + +void +_EffectImpl::EffectModelTimerStop(void) +{ + __modelTimer.Stop(); + + return; +} + +void +_EffectImpl::OnTimerExpired(Timer& timer) +{ + _EffectTimer* pEffectTimer = dynamic_cast<_EffectTimer*>(&timer); + SysAssertf(pEffectTimer != null, _UiEffectError::INTERNAL_ERROR); + SysAssertf(__pModel != null, _UiEffectError::INTERNAL_ERROR); + + if (__pModel->GetState() == _EFFECT_STATE_RUNNING) + { + __modelTimer.Start(); + __pModel->Calculate(pEffectTimer->CalculationTimeStep()); // actual time period between calls OnTimerExpied function + + if (__pModel->GetState() != _EFFECT_STATE_RUNNING) + { + __modelTimer.Stop(); + } + + if ((__renderTargetSet) && (__pModel->GetState() == _EFFECT_STATE_RUNNING)) + { + __pModel->UpdateGraphicalSurfaces(); + if (SETJMP == 0) + { + __pRenderer->Update(); + + UpdateScreen(); + __pRenderer->Draw(); + } + else + { + __pModel->Stop(true, false); + __modelTimer.Stop(); + SysLogException(NID_UI_EFFECT, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + } + } + } + else + { + __modelTimer.Stop(); + } + + return; +} + +void +_EffectImpl::UpdateScreen(void) +{ + EffectsControlsMap::const_iterator itEffCtrl = __effectsControlsMapRegistered.find(__pEffect); + SysAssertf(itEffCtrl != __effectsControlsMapRegistered.end(), _UiEffectError::INTERNAL_ERROR); + + __pRenderer->TrackScreenSizeChanges(*itEffCtrl->second); + + return; +} + +void +_EffectImpl::OnEffectStarted(void) +{ + if (__renderTargetSet) + { + __pModel->UpdateGraphicalSurfaces(); + __pRenderer->Update(); + + UpdateScreen(); + __pRenderer->Draw(); + } + + if (__pEventListener != null) + { + __pEventListener->OnEffectStarted(*__pEffect); + } + else + { + ; + } + + return; +} + +void +_EffectImpl::OnEffectFinished(EffectResult effectResult, const LastShownBitmapIdCollection& bitmapsTargetId) +{ + SysAssertf(__pModel != null, _UiEffectError::INTERNAL_ERROR); + + if (__renderTargetSet && __pModel->GetState() != _EFFECT_STATE_RUNTIME_ERROR) + { + __pModel->UpdateGraphicalSurfaces(); + __pRenderer->Update(); + + UpdateScreen(); + __pRenderer->Draw(); + } + + EffectsControlsMap::iterator it = __effectsControlsMapRegistered.find(__pEffect); + if (it != __effectsControlsMapRegistered.end()) + { + __controlsSetPerforming.erase(it->second); + } + + if (__pEventListener != null) + { + ArrayList lastShownBitmapId; + result res = lastShownBitmapId.Construct(); + SysAssertf(res != E_INVALID_ARG, _UiEffectError::INTERNAL_ERROR); + + if (res == E_SUCCESS) + { + for (LastShownBitmapIdCollection::const_iterator it = bitmapsTargetId.begin(); it != bitmapsTargetId.end(); ++it) + { + Long* pLong = new (std::nothrow) Long(*it); + if (pLong != null) + { + lastShownBitmapId.Add(*pLong); + } + else + { + SetLastResult(E_OUT_OF_MEMORY); + break; + } + } + } + + __pEventListener->OnEffectFinished(*__pEffect, effectResult, lastShownBitmapId); + + lastShownBitmapId.RemoveAll(true); + } + else + { + ; + } + + return; +} + +bool +_EffectImpl::OnBitmapRequested(long bitmapId) +{ + if (__pResourceProvider != null) + { + return __pResourceProvider->SetBitmap(*__pEffect, bitmapId) == E_SUCCESS; + } + else + { + return true; + } +} + +void +_EffectImpl::InitializeEffect(void) +{ + Tizen::App::App* pApp = Tizen::App::App::GetInstance(); + 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()); + + SysAssertf(_EffectManagerImpl::__pPathToEffectFile != null, _UiEffectError::INTERNAL_ERROR); + + int modelTimerTimeout; + IEffectModelManager* pModelTemp; + EffectRenderer* pRendererTemp; + result res = EffectParser::ParseEffectFileLoadModel(_EffectManagerImpl::__pPathToEffectFile, dataDirStr.c_str(), this, __effectsCount, pModelTemp, pRendererTemp, modelTimerTimeout); + _EffectManagerImpl::__pPathToEffectFile = null; + + //E_OUT_OF_MEMORY or E_PARSING_FAILED: + if ((res != E_SUCCESS) && (res != E_OUT_OF_MEMORY)) + { + res = E_PARSING_FAILED; + } + SysTryReturnVoidResult(NID_UI_EFFECT, res == E_SUCCESS, res, "[%s] Propagating", GetErrorMessage(res)); + + __pModel.reset(pModelTemp); + __pRenderer.reset(pRendererTemp); + + SysAssertf(__pModel != null, _UiEffectError::INTERNAL_ERROR); + SysAssertf(modelTimerTimeout > 0, _UiEffectError::INTERNAL_ERROR); + + res = __modelTimer.Construct(*this, __pModel->GetId(), modelTimerTimeout); + res = (res == E_SYSTEM ? E_PARSING_FAILED : res); + SysTryReturnVoidResult(NID_UI_EFFECT, res == E_SUCCESS, res, "[%s] Propagating", GetErrorMessage(res)); + + std::pair resultInsert = __effects.insert(__pEffect); + SysAssertf(resultInsert.second == true, _UiEffectError::INTERNAL_ERROR); + + bool isLuaError = (__pModel->GetState() != _EFFECT_STATE_RUNNABLE); + 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/FUiEffects_EffectImpl.h b/src/ui/effects/FUiEffects_EffectImpl.h new file mode 100644 index 0000000..7b90f23 --- /dev/null +++ b/src/ui/effects/FUiEffects_EffectImpl.h @@ -0,0 +1,454 @@ +// +// 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 FUiEffects_EffectImpl.h + * @brief This is the header file for the _EffectImpl class. + */ + +#ifndef _FUI_EFFECTS_INTERNAL_EFFECT_IMPL_H_ +#define _FUI_EFFECTS_INTERNAL_EFFECT_IMPL_H_ + +#include +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui { +class Control; +class TouchEventInfo; +}} // Tizen::Ui + +namespace Tizen { namespace Base { namespace Collection { +class IList; +}}} // Tizen::Base::Collection + +namespace Tizen { namespace Graphics { +class Point; +class Bitmap; +}} // Tizen::Graphics + +namespace Tizen { namespace Ui { namespace Effects +{ + +class Effect; +class IEffectEventListener; +class IEffectResourceProvider; +class _EffectInstance; +class _EffectImpl; + +typedef std::set EffectsSet; + +typedef void* EGLSurface; +typedef std::map RenderControlsMap; +typedef std::pair RenderControlsMapPair; + +typedef std::map EffectsControlsMap; +typedef std::set ControlsSet; + +class _EffectImpl + : public Tizen::Base::Runtime::ITimerEventListener + , public Tizen::Ui::Effects::_Runtime::IEffectModelListener + , virtual public Tizen::Base::Runtime::IEventListener +{ +public: + + /** + * Binds the effect to Tizen::UI::Control for rendering effect. + * + * @since 2.0 + * + * @return An error code + * @param [in] control Tizen::UI::Control whose content is filled by the effect + * @exception E_SUCCESS The specified effect is bound with @c control successfully. + * @exception E_OPERATION_FAILED The system has failed to initialize the 3D system. + * @exception E_INVALID_STATE The specified effect has already started. + */ + result SetRenderTarget(const Tizen::Ui::Control* pControl); + + /** + * Starts Effect + * + * @since 2.0 + * + * @return An error code + * @param [in] effectStartInfo List of input arguments to be passed to OnEffectStarted function of the scripts. + * All arguments should be represented in float data type + * @exception E_INVALID_STATE The effect specified started already + * @exception E_OPERATION_FAILED The system failed to start the effect specified. + * The effect has a runtime error in script or the render target for this effect is not available + * @exception E_SUCCESS The effect specified was successfully started + * + */ + result Start(const Tizen::Base::Collection::IList& effectStartInfo); + + /** + * Stops Effect + * + * @since 2.0 + * + * @return An error code + * @exception E_INVALID_STATE The effect specified didn't start yet + * @exception E_SUCCESS The effect specified was successfully stopped + * + */ + result Stop(void); + + /** + * Informs an effect of a TouchPress event + * + * @since 2.0 + * + * @return An error code + * @param [in] touchEventInfo The touch event information + * @param [in] offset The effect manager will regard the touch position in @c touchEventInfo translated by the @c offset + * @exception E_INVALID_STATE The effect specified didn't start yet + * @exception E_OPERATION_FAILED There was a runtime error in the OnTouchPressed script function or the effect is time-based + * @exception E_SUCCESS Effect with such ID was successfully fed with TouchPress + * + */ + result FeedTouchPressEvent(const Tizen::Ui::TouchEventInfo& touchEventInfo, const Tizen::Graphics::Point& offset); + + /** + * Informs an effect of a TouchMove event + * + * @since 2.0 + * + * @return An error code + * @param [in] touchEventInfo The touch event information + * @param [in] offset The effect manager will regard the touch position in @c touchEventInfo translated by the @c offset + * @exception E_INVALID_STATE The effect specified didn't start yet + * @exception E_OPERATION_FAILED There was a runtime error in the OnTouchPressed script function or the effect is time-based + * @exception E_SUCCESS Effect with such ID was successfully fed with TouchMove + * + */ + result FeedTouchMoveEvent(const Tizen::Ui::TouchEventInfo& touchEventInfo, const Tizen::Graphics::Point& offset); + + /** + * Informs an effect of a TouchRelease event + * + * @since 2.0 + * + * @return An error code + * @param [in] touchEventInfo The touch event information + * @param [in] offset The effect manager will regard the touch position in @c touchEventInfo translated by the @c offset + * @exception E_INVALID_STATE The effect specified didn't start yet + * @exception E_OPERATION_FAILED There was a runtime error in the OnTouchPressed script function or the effect is time-based + * @exception E_SUCCESS Effect with such ID was successfully fed with TouchRelease + * + */ + result FeedTouchReleaseEvent(const Tizen::Ui::TouchEventInfo& touchEventInfo, const Tizen::Graphics::Point& offset); + + /** + * Informs an effect of a TouchDoublePress event + * + * @since 2.0 + * + * @return An error code + * @param [in] touchEventInfo The touch event information + * @param [in] offset The effect manager will regard the touch position in @c touchEventInfo translated by the @c offset + * @exception E_INVALID_STATE The effect specified didn't start yet + * @exception E_OPERATION_FAILED There was a runtime error in the OnTouchPressed script function or the effect is time-based + * @exception E_SUCCESS Effect with such ID was successfully fed with TouchDoublePress + * + */ + result FeedTouchDoublePressEvent(const Tizen::Ui::TouchEventInfo& touchEventInfo, const Tizen::Graphics::Point& offset); + + /** + * Updates the effect's bitmap which is used as a graphical surface in scripts + * + * @since 2.0 + * + * @return An error code + * @param [in] bitmapId Id of a bitmap to be updated + * @param [in] bitmap Bitmap content + * @exception E_OPERATION_FAILED Updating bitmap contents failed + * @exception E_SUCCESS Bitmap was successfully updated + * + */ + result SetBitmap(long bitmapId, const Tizen::Graphics::Bitmap& bitmap); + + /** + * Gets the current state of the effect specified + * + * @since 2.0 + * + * @return @c true if the effect is running; @c false, otherwise + * @exception E_SUCCESS The effect state is successfully retrieved + * + */ + bool IsRunning(void) const; + + /** + * Gets Effect type + * + * @since 2.0 + * + * @return Type of effect + * @exception E_SUCCESS The effect type is successfully retrieved + * + */ + EffectType GetType(void) const; + + /** + * Gets the name of an effect + * + * @since 2.0 + * + * @return The name of the effect specified + * @exception E_SUCCESS The effect name is successfully retrieved + * + */ + Tizen::Base::String GetName(void) const; + + /** + * Sets the IEffectsEventListener instance to get notified when the state of the effect is changed + * + * @since 2.0 + * + * @return An error code + * @param [in] pListener The event listener to be set + * @exception E_SUCCESS The effect listener was successfully set + * + */ + void SetEffectEventListener(IEffectEventListener* pListener); + + /** + * Gets the IEffectsEventListener instance. + * + * @since 2.0 + * + * @return The event listener for specified effect. + */ + IEffectEventListener* GetEffectEventListener(void) const; + + /** + * Sets the IEffectsResourceProvider instance to get notified when resources are needed by the effect + * + * @since 2.0 + * + * @return An error code + * @param [in] pProvider The resource provider to provide the effect with bitmap resources + * @exception E_SUCCESS The effect resource provider was successfully set + * + */ + void SetResourceProvider(IEffectResourceProvider* pProvider); + + /** + * Gets the IEffectsResourceProvider instance. + * + * @since 2.0 + * + * @return The resource provider for specified effect. + */ + IEffectResourceProvider* GetResourceProvider(void) const; + +private: + + /** + * The constructor + * + * @since 2.0 + */ + _EffectImpl(Effect& effect); + + /** + * The destructor + * + * @since 2.0 + */ + virtual ~_EffectImpl(void); + + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + _EffectImpl(const _EffectImpl& rhs); + + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + _EffectImpl& operator=(const _EffectImpl& rhs); + + /** + * Finds OpenGLES surface by Control's pointer + * + * @since 2.0 + * + * @return EGLSurface OpenGL surface created for given control, EGL_NO_SURFACE if not found + * @param [in] Control UI Control + * + */ + EGLSurface FindGlesSurface(const Tizen::Ui::Control* pControl) const; + + /** + * Stops Effect Computing + * + * @since 2.0 + * + * @param [in] effect Effect instance + * @exception E_SYSTEM + * + */ + void EffectModelTimerStop(void); + + /** + * Implementation of ITimerEventListener::OnTimerExpired method - Triggering Effect Computing and Rendering + * + * @since 2.0 + * + * @param [in] timer Tizen::Ui::Runtime::Timer instance + * @exception E_FILE_NOT_FOUND Effect with such ID doesn't exist + * @exception E_SYSTEM + * + */ + void OnTimerExpired(Tizen::Base::Runtime::Timer& timer); + + /** + * Implementation of IEffectModelListener::OnEffectStarted method + * + * @since 2.0 + * + * @param [in] effectId Id of an effect that requires handling + * @exception E_FILE_NOT_FOUND Effect with such ID doesn't exist + * @exception E_NOT_JOINED EventListener is not assigned + * @exception E_SYSTEM + * @see IEffectModelListener in "FUiEffects_RuntimeIEffectModelListener.h" + * + */ + void OnEffectStarted(void); + + /** + * Implementation of IEffectModelListener::OnEffectFinished method + * + * @since 2.0 + * + * @param [in] effectId Id of an effect that requires handling + * @param [in] effectResult One of possible options of Effect finishing + * @param [in] bitmapId Bitmap(s) which acts as Target after Effect finishing + * @exception E_FILE_NOT_FOUND Effect with such ID doesn't exist + * @exception E_NOT_JOINED EventListener is not assigned + * @exception E_SYSTEM + * @see IEffectModelListener in "FUiEffects_RuntimeIEffectModelListener.h" + * + */ + void OnEffectFinished(EffectResult effectResult, const Tizen::Ui::Effects::_Runtime::LastShownBitmapIdCollection& bitmapsTargetId); //TODO: List of bitmaps + + /** + * Implementation of IEffectModelListener::OnBitmapRequested method + * + * @since 2.0 + * + * @return true If User in C++ Application in IEffectResourceProvider::OnBitmapRequested implementation returns E_SUCCESS + * false If User in C++ Application in IEffectResourceProvider::OnBitmapRequested implementation doesn't return E_SUCCESS + * @param [in] effectId Id of an effect that requires handling + * @param [in] bitmapId Bitmap that has to be updated + * @exception E_FILE_NOT_FOUND Effect with such ID doesn't exist + * @exception E_NOT_JOINED ResourceProvider is not assigned + * @exception E_SYSTEM + * @see IEffectModelListener in "FUiEffects_RuntimeIEffectModelListener.h" + * + */ + bool OnBitmapRequested(long bitmapId); + + /** + * Creates a new effect from specialised effect file + * + * @since 2.0 + * + * @return True if effect was initialised successfully and false otherwise + * @see EffectManager::CreateEffect() + * + */ + void InitializeEffect(void); + + /** + * Updates information about screen size if it was changed + * + * @since 2.0 + * + * @see SetScreen() + * + */ + void UpdateScreen(void); + + /** + * Removes a pair (effect*, control*) from a accordingly container and deletes GL surface if it does not need more + * + * @since 2.0 + * + */ + void ReleaseRenderTarget(const Control& control); + + /** + * Tries set a new render target for an effect. + * Releases old render target if successful (calls function ReleaseRenderTarget) + * + * @since 2.0 + * + */ + result SetRenderTargetInternal(const Tizen::Ui::Control& control, const Tizen::Ui::Control& controlOld); + +private: + Effect* __pEffect; + + static EffectsSet __effects; + static RenderControlsMap __renderControls; + static EffectsControlsMap __effectsControlsMapRegistered; + static ControlsSet __controlsSetPerforming; + static long __effectsCount; + + /** + * @brief Model instance + * + */ + std::unique_ptr<_Runtime::IEffectModelManager> __pModel; + + + /** + * @brief Renderer instance + * + */ + _Renderer::EffectRendererUniquePtr __pRenderer; + + /** + * @brief Event Listener + * + */ + IEffectEventListener* __pEventListener; + + /** + * @brief Resource Provider + * + */ + IEffectResourceProvider* __pResourceProvider; + + /** + * @brief Timer for model updates + * + */ + _EffectTimer __modelTimer; + + /** + * @brief Internal usage + * + */ + bool __renderTargetSet; + + friend class _EffectManagerImpl; + friend class Effect; +}; // _EffectImpl + +}}} // Tizen::Ui::Effects + +#endif // _FUI_EFFECTS_INTERNAL_EFFECT_IMPL_H_ diff --git a/src/ui/effects/FUiEffects_EffectManagerImpl.cpp b/src/ui/effects/FUiEffects_EffectManagerImpl.cpp new file mode 100644 index 0000000..8b239cd --- /dev/null +++ b/src/ui/effects/FUiEffects_EffectManagerImpl.cpp @@ -0,0 +1,206 @@ +// +// 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 FUiEffects_EffectManagerImpl.cpp + * @brief This is the source file for the _EffectManagerImpl class + */ + +#include + +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include "FUiEffects_EffectImpl.h" +#include "FUiEffects_EffectManagerImpl.h" +#include +#include +#include +#include "FUiEffects_EffectErrorMessages.h" + +using namespace Tizen::Ui::Controls; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Ui; +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Base::Collection; + +using namespace Tizen::Ui::Effects::_Runtime; +using namespace Tizen::Ui::Effects::_Renderer; +using namespace Tizen::Ui::Effects::_Parser; +using namespace Tizen::Ui::Effects; +using namespace Tizen::Ui::Effects::_Utils; +using namespace std; + +using namespace Tizen::Ui::Effects::_Parser; + +namespace Tizen { namespace Ui { namespace Effects +{ + +_EffectManagerImpl* pEffectManagerImpl = null; +EffectManager* pEffectManager = null; +pthread_once_t once_block = PTHREAD_ONCE_INIT; + +const char* _EffectManagerImpl::__pPathToEffectFile = null; + +Effect* +_EffectManagerImpl::CreateEffect(const Tizen::Base::String& filePath) +{ + SetLastResult(E_SUCCESS); + + bool fileExists = false; + std::fstream fin; + + std::wstring tempWStr(filePath.GetPointer()); + std::string filePathStr(tempWStr.begin(), tempWStr.end()); + fin.open(filePathStr.c_str(), std::ios::in); + fileExists = fin.is_open(); + fin.close(); + + SysTryReturn(NID_UI_EFFECT, fileExists, null, E_FILE_NOT_FOUND, _UiEffectError::NO_EFFECT_FILE, filePathStr.c_str()); + + __pPathToEffectFile = filePathStr.c_str(); + + Effect* pEffect = new (std::nothrow) Effect(); + SysTryReturn(NID_UI_EFFECT, pEffect != null, null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + + result r = GetLastResult(); + SysTryCatch(NID_UI_EFFECT, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + SysLog(NID_UI_EFFECT, "Effect from file '%ls' is loaded successfully", filePath.GetPointer()); + return pEffect; + +CATCH: + delete pEffect; + return null; +} + +void +_EffectManagerImpl::DestroyEffect(Effect& effect) +{ + SetLastResult(E_SUCCESS); + + if (_EffectImpl::__effects.find(&effect) != _EffectImpl::__effects.end()) + { + SysLog(NID_UI_EFFECT, "The effect [%ls] is destroying now", effect.GetName().GetPointer()); + delete &effect; + SysLog(NID_UI_EFFECT, "The effect is destroyed successfully"); + } + else + { + SysLog(NID_UI_EFFECT, "The effect was destroyed before"); + } + + return; +} + +_EffectManagerImpl::_EffectManagerImpl(void) +{ + if (EffectRenderer::InitOpenGL()) + { + SysLog(NID_UI_EFFECT, "Effects. OpenGL initialization is successful!"); + } + else + { + SysLogException(NID_UI_EFFECT, E_OPERATION_FAILED, "[E_OPERATION_FAILED] OpenGL initialization failed"); + } +} + +_EffectManagerImpl::~_EffectManagerImpl(void) +{ + // destroy all effects + // operator while is here because in Effect class destuctor we erase element from container __effects + while (true) + { + if (_EffectImpl::__effects.empty()) + { + break; + } + delete *(_EffectImpl::__effects.begin()); + } + + _EffectImpl::__renderControls.clear(); + _EffectImpl::__controlsSetPerforming.clear(); + + EffectRenderer::CloseOpenGL(); +} + +void +_EffectManagerImpl::InitSingleton(void) +{ + SysAssertf(pEffectManagerImpl == null, _UiEffectError::INTERNAL_ERROR); + SysAssertf(pEffectManager == null, _UiEffectError::INTERNAL_ERROR); + + std::unique_ptr<_EffectManagerImpl> pEffectManagerImplTemp(new (std::nothrow) _EffectManagerImpl()); + SysTryReturnVoidResult(NID_UI_EFFECT, pEffectManagerImplTemp.get() != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + + pEffectManager = new (std::nothrow) EffectManager(); + SysTryReturnVoidResult(NID_UI_EFFECT, pEffectManager != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + + pEffectManagerImpl = pEffectManagerImplTemp.release(); +} + +_EffectManagerImpl::ManagerAndImplPair +_EffectManagerImpl::GetInstance(void) +{ + SetLastResult(E_SUCCESS); + + static result res = E_SUCCESS; + + if (pEffectManagerImpl == null) + { + SysAssertf(pEffectManager == null, _UiEffectError::INTERNAL_ERROR); + pthread_once(&once_block, InitSingleton); + res = GetLastResult(); + } + + SysTryReturn(NID_UI_EFFECT, !(res == E_OUT_OF_MEMORY), std::make_pair(static_cast(null), static_cast<_EffectManagerImpl*>(null)), res, "[%s] Propagating.", GetErrorMessage(res)); + + SysTryReturn(NID_UI_EFFECT, !(res == E_OPERATION_FAILED), std::make_pair(pEffectManager, pEffectManagerImpl), res, "[%s] Propagating.", GetErrorMessage(res)); + + return std::make_pair(pEffectManager, pEffectManagerImpl); +} + +void +_EffectManagerImpl::DestroyInstance(void) +{ + SetLastResult(E_SUCCESS); + if (pEffectManagerImpl != null) + { + SysAssertf(pEffectManager != null, _UiEffectError::INTERNAL_ERROR); + delete pEffectManagerImpl; + delete pEffectManager; + pEffectManagerImpl = null; + pEffectManager = null; + once_block = PTHREAD_ONCE_INIT; + } + return; +} + +} } } //Tizen::Ui::Effects diff --git a/src/ui/effects/FUiEffects_EffectManagerImpl.h b/src/ui/effects/FUiEffects_EffectManagerImpl.h new file mode 100644 index 0000000..8589abe --- /dev/null +++ b/src/ui/effects/FUiEffects_EffectManagerImpl.h @@ -0,0 +1,123 @@ +// +// 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 FUiEffects_EffectManagerImpl.h + * @brief This is the header file for the _EffectManagerImpl class + */ + +#ifndef _FUI_EFFECTS_INTERNAL_EFFECTS_MANAGER_IMPL_H_ +#define _FUI_EFFECTS_INTERNAL_EFFECTS_MANAGER_IMPL_H_ + +#include +#include + +namespace Tizen { namespace Base { +class String; +}} // Tizen::Base + +namespace Tizen { namespace Ui { namespace Effects +{ + +class Effect; +class EffectManager; + +class _EffectManagerImpl +{ + typedef std::pair ManagerAndImplPair; +public: + + /** + * Gets the effect manager instance. + * + * @since 2.0 + * + * @return A pointer to the %EffectManager instance + * @exception E_SUCCESS The %EffectManager instance is constructed successfully. + * @exception E_OUT_OF_MEMORY The memory is insufficient. + * @exception E_OPERATION_FAILED The system has failed to initialize the 3D system. + */ + static ManagerAndImplPair GetInstance(void); + + /** + * Destroys all previously created effects and their resources. @n + * Application can use OpenGL APIs only after invoking this method. + * + * @since 2.0 + */ + static void DestroyInstance(void); + + /** + * Creates a new effect from specialised effect file + * + * @since 2.0 + * + * @return If success - pointer to effect; if failed - null + * @param [in] filePath The file path of the effect + * @exception E_OUT_OF_MEMORY Insufficient memory + * @exception E_FILE_NOT_FOUND The effect file specified doesn't exist + * @exception E_PARSING_FAILED Syntax Error in the effect file (structure or script) + * @see UnregisterEffectFile() + * + */ + Effect* CreateEffect(const Tizen::Base::String& filePath); + + /** + * Deletes an effect specified + * + * @since 2.0 + * + * @return An error code + * @param [in] effect Reference to effect to be destroyed + * @exception E_SUCCESS The effect specified was successfully destroyed + * @see RegisterEffectFile() + * + */ + void DestroyEffect(Effect& effect); + +private: + /** + * Constructor + * + * @since 2.0 + * + * @exception E_OUT_OF_MEMORY _EffectManagerImpl instance can not be created + * + */ + _EffectManagerImpl(void); + + /** + * Destructor for _EffectManagerImpl + * + * @since 2.0 + * + * + */ + ~_EffectManagerImpl(void); + + static void InitSingleton(void); + +private: + + static const char* __pPathToEffectFile; + + friend class _EffectImpl; // <-- for access to private area of class _EffectManagerImpl from class Effect + friend class boost::default_delete<_EffectManagerImpl>; //for deleting unique_ptr<_EffectManagerImpl> instance in InitSingleton function +}; + +} } } //Tizen::Ui::Effects + +#endif // _FUI_EFFECTS_INTERNAL_EFFECTS_MANAGER_IMPL_H_ diff --git a/src/ui/effects/FUiEffects_EffectTimer.h b/src/ui/effects/FUiEffects_EffectTimer.h new file mode 100644 index 0000000..7054b16 --- /dev/null +++ b/src/ui/effects/FUiEffects_EffectTimer.h @@ -0,0 +1,206 @@ +// +// 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 FUiEffects_EffectTimer.h + * @brief This is the header file for the _EffectTimer class + */ + +#ifndef FUI_EFFECTS_INTERNAL_EFFECTTIMER_H_ +#define FUI_EFFECTS_INTERNAL_EFFECTTIMER_H_ + +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Effects +{ + +/** + * @class _EffectTimer + * @brief Class for effect timer + * + * @since 2.0 + */ +class _EffectTimer + : public Tizen::Base::Runtime::Timer +{ +public: + + /** + * Constructor + * + * @since 2.0 + * + * @param [in] _type Set type of this timer + * + */ + _EffectTimer(void): __effectID(-1), __timeout(-1), __t1(-1), __countGreater(0), __count(0) + { + + } + + /** + * Timer Initialisation + * + * @since 2.0 + * + * @param [in] TimerEventListener OnTimerExpired event listener + * @param [in] _effectID id of effect assigned to this timer + * @param [in] _timeout A __timeout interval in milliseconds + * + */ + result Construct(Tizen::Base::Runtime::ITimerEventListener &TimerEventListener, long effectID, int timeout) + { + __effectID = effectID; + __timeout = timeout; + return Tizen::Base::Runtime::Timer::Construct(TimerEventListener); + } + + /** + * Gets Id of Effect assigned to this timer + * + * @since 2.0 + * + * @return EffectIDType Effect id + */ + long GetEffectIdType(void) + { + return __effectID; + } + + /** + * Stores current system time for next realtime interval calculation + * + * @since 2.0 + * + * @see _EffectTimer::CalculationTimeStep + */ + void Reset(void) + { + Tizen::System::SystemTime::GetTicks(__t1); + __countGreater = 0; + __count = 0; + + return; + } + + /** + * Starts the timer + * + * @since 2.0 + * + */ + void Start(int t = 0) + { + if (t == 0) + { + Timer::Start(__timeout); + } + else + { + Timer::Start(t); + } + IncreaseCount(); + + return; + } + + /** + * Increases the variable count means a number of calling function OnTimerExpired + * + * @since 2.0 + * + */ + void IncreaseCount() + { + __count++; + + return; + } + + /** + * Stops the timer + * + * @since 2.0 + * + */ + void Stop() + { + if (__countGreater != 0) + { + int c = (int)(__countGreater * 1.f / __count * 100); + SysLog(NID_UI_EFFECT, "Timer timeout for effect with %i ID is greater than a threshold in %i%% of cases.", __effectID, c); + } + Tizen::Base::Runtime::Timer::Cancel(); + return; + } + + + /** + * Resets and then starts. Use this method for first run + * + * @since 2.0 + * + */ + void Restart() + { + Reset(); + Start(); + + return; + } + + + /** + * Precise realtime interval calculation. + * + * @since 2.0 + * + * @return float + */ + float CalculationTimeStep(void) + { + const long long t0 = __t1; + Tizen::System::SystemTime::GetTicks(__t1); + + int sub = __t1 - t0; + + if (sub > 3*__timeout) + { + sub = 3*__timeout; + if (__countGreater == 0) + { + SysLogException(NID_UI_EFFECT, E_TIMEOUT, "Timer timeout for effect with %i ID is too small! Your device is too slow for specified timeout. You may increase the timer time.", __effectID); + } + __countGreater++; + } + + return sub * 0.001f; + } + +private: + long __effectID; /**< id of parent effect */ + int __timeout; /**< period in milliseconds */ + long long __t1; /**< internal use */ + long __countGreater; + long __count; +}; + +} } } // Tizen::Ui::Effects + +#endif //FUI_EFFECTS_INTERNAL_EFFECTTIMER_H_ diff --git a/src/ui/effects/inc/FUiEffects_LoggingProfiler.h b/src/ui/effects/inc/FUiEffects_LoggingProfiler.h new file mode 100644 index 0000000..f85371f --- /dev/null +++ b/src/ui/effects/inc/FUiEffects_LoggingProfiler.h @@ -0,0 +1,135 @@ +// +// 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 FUiEffects_LoggingProfiler.h + * @brief This is the header file for the profiling defines + */ + +#ifndef FUIEXTEFF3D_ELOGPROFILER_H_ +#define FUIEXTEFF3D_ELOGPROFILER_H_ + +#ifdef USE_PROFILER + +#include + +#ifdef __linux__ +#include +#ifndef CLOCK_MONOTONIC_RAW +#error Undefined CLOCK_MONOTONIC_RAW +#endif +#define HIRES_COUNTER_ID CLOCK_MONOTONIC_RAW +#else +#error Unknown platform +#endif + +namespace Tizen { namespace Ui { namespace Effects { namespace _EffectsLogging +{ +//instant measure +#define START_PROFILER(Name)\ + static timespec Name##_prof_t1, Name##_prof_t2;\ + static long Name##_prof_dt = 0;\ + clock_gettime(HIRES_COUNTER_ID, &Name##_prof_t1); + +#define END_PROFILER(Name) \ + clock_gettime(HIRES_COUNTER_ID, &Name##_prof_t2); \ + Name##_prof_dt = (Name##_prof_t2.tv_sec - Name##_prof_t1.tv_sec) * 1000000 + (Name##_prof_t2.tv_nsec - Name##_prof_t1.tv_nsec) / 1000; \ + SysLog(NID_UI_EFFECT, #Name" = %.3f ms", (float) Name##_prof_dt * 0.001f); + +#define PROFILER_EXPR(expression, Name) \ + START_PROFILER(Name) \ + expression \ + END_PROFILER(Name) + +#define PROFILER_EXPR0(expression, Name) expression + +//average measure +#define START_PROFILER_AV(Name, N) \ + static timespec Name##_prof_av_t1, Name##_prof_av_t2; \ + static long Name##_prof_av_tmin = 999999999, Name##_prof_av_tmax = -1;\ + static long Name##_prof_av_dt = 0;\ + static unsigned int Name##_prof_av_count = N, Name##_prof_av_N = N; \ + clock_gettime(HIRES_COUNTER_ID, &Name##_prof_av_t1); + +#define END_PROFILER_AV(Name) \ + if (Name##_prof_av_count > 0) \ + { \ + clock_gettime(HIRES_COUNTER_ID, &Name##_prof_av_t2); \ + long dt = (Name##_prof_av_t2.tv_sec - Name##_prof_av_t1.tv_sec) * 1000000 + (Name##_prof_av_t2.tv_nsec - Name##_prof_av_t1.tv_nsec) / 1000;\ + if(dt > Name##_prof_av_tmax) Name##_prof_av_tmax = dt; \ + if(dt < Name##_prof_av_tmin) Name##_prof_av_tmin = dt; \ + Name##_prof_av_dt += dt; \ + Name##_prof_av_count--; \ + } \ + else \ + {\ + SysLog(NID_UI_EFFECT, #Name" = %.3f ms (min = %.3f, max = %.3f)", float(Name##_prof_av_dt / Name##_prof_av_N) * 0.001f, (float) Name##_prof_av_tmin * 0.001f, (float) Name##_prof_av_tmax * 0.001f);\ + Name##_prof_av_count = Name##_prof_av_N;\ + Name##_prof_av_dt = 0; \ + Name##_prof_av_tmin = 999999999; \ + Name##_prof_av_tmax = -1;\ + } + +#define PROFILER_EXPR_AV(expression, Name, N) \ + START_PROFILER_AV(Name, N) \ + expression \ + END_PROFILER_AV(Name) + +#define PROFILER_EXPR_AV0(expression, Name, N) expression + +//checkpoint entrance +#define PROFILER_CHECKPOINT(Name, N) \ + static timespec Name##_prof_checkp_t1, Name##_prof_checkp_t2;\ + static long Name##_prof_checkp_tmin = 999999999, Name##_prof_checkp_tmax = -1;\ + static long Name##_prof_checkp_dt = 0;\ + static unsigned int Name##_prof_checkp_count = 0, Name##_prof_checkp_N = N;\ + \ + if (Name##_prof_checkp_count > 0) \ + { \ + clock_gettime(HIRES_COUNTER_ID, &Name##_prof_checkp_t2); \ + long dt = (Name##_prof_checkp_t2.tv_sec - Name##_prof_checkp_t1.tv_sec) * 1000000 + (Name##_prof_checkp_t2.tv_nsec - Name##_prof_checkp_t1.tv_nsec) / 1000; \ + clock_gettime(HIRES_COUNTER_ID, &Name##_prof_checkp_t1); \ + if(dt > Name##_prof_checkp_tmax) Name##_prof_checkp_tmax = dt; \ + if(dt < Name##_prof_checkp_tmin) Name##_prof_checkp_tmin = dt; \ + Name##_prof_checkp_dt += dt; \ + Name##_prof_checkp_count--; \ + } \ + else \ + {\ + clock_gettime(HIRES_COUNTER_ID, &Name##_prof_checkp_t1); \ + SysLog(NID_UI_EFFECT, #Name" = %.3f ms (min = %.3f, max = %.3f)", float(Name##_prof_checkp_dt / Name##_prof_checkp_N) * 0.001f, (float) Name##_prof_checkp_tmin * 0.001f, (float) Name##_prof_checkp_tmax * 0.001f);\ + Name##_prof_checkp_count = Name##_prof_checkp_N;\ + Name##_prof_checkp_dt = 0;\ + Name##_prof_checkp_tmin = 999999999; \ + Name##_prof_checkp_tmax = -1;\ + } + +} } } } // Tizen::Ui::Effects::_EffectsLogging +#else //USE_PROFILER +#define START_PROFILER(Name) +#define END_PROFILER(Name) +#define PROFILER_EXPR(expression, Name) expression +#define PROFILER_EXPR0(expression, Name) expression + +#define START_PROFILER_AV(Name, N) +#define END_PROFILER_AV(Name) +#define PROFILER_EXPR_AV(expression, Name, N) expression +#define PROFILER_EXPR_AV0(expression, Name, N) expression + +#define PROFILER_CHECKPOINT(Name, N) +#endif //USE_PROFILER + +#endif // FUIEXTEFF3D_ELOGPROFILER_H_ diff --git a/src/ui/effects/inc/FUiEffects_Parser.h b/src/ui/effects/inc/FUiEffects_Parser.h new file mode 100644 index 0000000..0fe1fe6 --- /dev/null +++ b/src/ui/effects/inc/FUiEffects_Parser.h @@ -0,0 +1,28 @@ +// +// 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 FUiEffects_Parser.h +* @brief This is the header file for the Tizen::Ui::Ext::Effects3d::_Parser namespace. +*/ + +#ifndef FUI_EFFECTS_INTERNAL_PARSER_H_ +#define FUI_EFFECTS_INTERNAL_PARSER_H_ + +#include "FUiEffects_ParserEffectParser.h" +#include "FUiEffects_ParserXMLParser.h" + +#endif //FUI_EFFECTS_INTERNAL_PARSER_H_ diff --git a/src/ui/effects/inc/FUiEffects_ParserEffectParser.h b/src/ui/effects/inc/FUiEffects_ParserEffectParser.h new file mode 100644 index 0000000..0885fbe --- /dev/null +++ b/src/ui/effects/inc/FUiEffects_ParserEffectParser.h @@ -0,0 +1,290 @@ +// +// 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 FUiEffects_ParserEffectParser.h + * @brief This file contains a declaration of EffectParser class + */ + +#ifndef _FUI_EFFECTS_INTERNAL_PARSER_EFFECTPARSER_H_ +#define _FUI_EFFECTS_INTERNAL_PARSER_EFFECTPARSER_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { +class EffectRenderer; +} } } } + +/** + * @namespace _Parser + * @brief This namespace contains classes that provide methods for parsing an effect file + * and building the effect +*/ +namespace Tizen { namespace Ui { namespace Effects { namespace _Parser +{ + +/** + * @class EffectParser + * @brief A static method only class that performs unzipping of an effect file, + * parsing of xml-files of the model and may create or not the model itself + * + * @since 2.0 + * + */ +class EffectParser +{ +public: + /** + * Handles an open-tag of an XML-element in a file being parsed by XMLParser + * + * @since 2.0 + * + * @param [in] elementName - the name of the XML-element + * @exception E_OUT_OF_MEMORY Insufficient memory + * @remarks Can only be called from XMLParser and from friends + */ + void StartElement(const char* pElementName); + + /** + * Handles an close-tag of an XML-element in a file being parsed by XMLParser + * + * @since 2.0 + * + * @param[in] elementName the name of the XML-element + * @exception E_INVALID_STATE The instance buffers occurred to be in an invalid state + * @exception E_INVALID_ARG An unexpected argument passed + * @remarks Can only be called from XMLParser and from friends + */ + void EndElement(const char* pElementName); + + /** + * Handles presence of an attribute in an XML-element + * in a file being parsed by XMLParser + * + * @since 2.0 + * + * @param[in] attributeName - the name of the attribute of an XML-element + * @param[in] attributeValue - the value of the attribute of an XML-element + * @exception E_INVALID_STATE The instance buffers occurred to be in an invalid state + * @remarks Can only be called from XMLParser and from friends + */ + void Attribute(const char* pAttributeName, const char* pAttributeValue); + + /** + * Unzips and checks content of an effect file, performs XML-parsing + * of the corresponding files + * + * @since 2.0 + * + * @return A boolean result of both: effect file parsing and XML-parsing + * @param[in] path a full path to the input effect file (a zip-archive) + * @exception OUT_OF_MEMORY Insufficient memory + * @exception E_INVALID_ARG An invalid argument passed to the XmlParser instantiator + * @exception E_ALREADY_BOUND The passed parent doesn't match the current parent + * of a created XmlParser singleton object + * @exception E_OPERATION_FAILED Extraction of model files from an effect file hasn't finished successfully + */ + static bool ParseEffectFile(const char* pEffectFilePath, const char* pModelFilesDirectoryPath); + + /** + * Performs unziping of an effect file, checks out its content,performs + * XML-parsing and constructs according to the effect file EffectInstance object + * + * @since 2.0 + * + * @return A pointer to the constructed _EffectInstance or null if parsing failed + * at some point + * @param[in] path - a full path to the input effect file (a zip-archive) + * @param[in] effectsManager a pointer to the object that should call this method + * @param[in] effectModelID an ID of the effect to be constructed + * @exception OUT_OF_MEMORY Insufficient memory + * @exception E_INVALID_ARG An invalid argument passed to the XmlParser instantiator + * @exception E_ALREADY_BOUND The passed parent doesn't match the current parent + * of a created XmlParser singleton object + * @exception E_OPERATION_FAILED Extraction of model files from an effect file hasn't finished successfully + * @exception E_PARSING_FAILED XML parsing hasn't been successful + * @exception E_KEY_NOT_FOUND Missing an attribute or an error model attributes + * @exception E_INVALID_CONDITION A member variable of effect parser was not initialized + * @exception E_INVALID_FORMAT An error in the logic of effect parser occurred + */ + static result ParseEffectFileLoadModel(const char* pEffectFilePath, const char* pModelFilesDirectoryPath, + Tizen::Ui::Effects::_Runtime::IEffectModelListener* pEffectManager, long effectModelID, + Tizen::Ui::Effects::_Runtime::IEffectModelManager*& pEffectModel, Tizen::Ui::Effects::_Renderer::EffectRenderer*& pEffectRenderer, int& modelTimerTimeout); + +private: + /** + * @brief class constructor + * @remarks accessible only from static methods and from friends + */ + EffectParser(void); + + /** + * @brief class destructor + * @remarks accessible only from static methods and from friends + */ + ~EffectParser(void); + + // Hidden copy constructor + EffectParser(const EffectParser& rhs); + + // Hidden assignment operator + EffectParser& operator=(const EffectParser& rhs); + + // Container of attibutes of an xml element + typedef std::map TypeXmlElementAttributes; + + // type of an xml element containing its name and attributes + struct XmlElement + { + std::string name; + TypeXmlElementAttributes attributes; + }; + + struct SceneData + { + unsigned int timerTimeout; + Tizen::Ui::Effects::_Utils::Vec3f ambientColor; + float intensity; + float attenuation; + SceneData(); + }; + + struct ViewportData + { + float x; + float y; + float z; + float width; + float height; + float near; + float far; + float angle; + bool perspective; + ViewportData(); + }; + + // Container of pointers to objects of ElementSurface + typedef std::vector TypePElementSurfaceCollection; + + // Container of pointers to objects of UnitLight + typedef std::vector TypePUnitLightCollection; + + // Container of objects of XmlElement + typedef std::vector TypeXmlElementCollection; + + // Container that maps indices of PointSurfaceNurbs objects in the model file to indices of those in + // the appropriate container of this class + typedef std::map, unsigned int> TypeNurbsPointIndexDistributor; + + // Container of pointers to objects of ModelSurface + typedef std::vector TypePModelSurfaceCollection; + + bool ExtractModelFiles(const char* pPath); + void ClearModelFiles(void); + void ClearBuffers(void); + + Tizen::Ui::Effects::_PhysicsEngine::PointSurface* FindPointSurfaceById(long pointId) const; + Tizen::Ui::Effects::_PhysicsEngine::PointSurfaceNurbs* FindPointSurfaceNurbsByIndices(unsigned int row, unsigned int col) const; + + bool CreatePointLight(XmlElement&); + bool CreateSpotLight(XmlElement&); + bool CreateDirectionalLight(XmlElement&); + bool CreatePointSurface(XmlElement&); + bool CreateSpringSurface(XmlElement&); + bool CreateRodSurface(XmlElement&); + bool CreateRodSurfaceNurbs(XmlElement&); + bool CreateGraphicalSurface(XmlElement&); + bool CreatePointSurfaceNurbs(XmlElement&); + bool CreateGraphicalSurfaceKnot(XmlElement&); + bool PriorReadModelSurfaceData(void); + bool PriorReadGraphicalSurfaceData(void); + bool CreateModelSurface(XmlElement&); + bool CreateEffectModel(XmlElement&); + bool CreateGravityForce(XmlElement&); + bool ReadViewportData(XmlElement&); + bool PriorReadSceneData(void); + bool ReadManifestData(XmlElement&); + Tizen::Ui::Effects::_Utils::Vec3f StringHexToRgb(const std::string&); + +private: + + static EffectParser* __pInstance; + std::unique_ptr __pXmlParser; + + std::string __currentModelFilesDirectoryPath; + static const std::string __MANIFEST_FILE_NAME; + static const std::string __SCENE_FILE_NAME; + static const std::string __SCRIPT_FILE_NAME; + + TypeXmlElementCollection __elementBuffer; + TypeNurbsPointIndexDistributor __pointSurfaceNurbsIndices; + TypePElementSurfaceCollection __elementSurfaceBuffer; + TypePUnitLightCollection __unitLightBuffer; + std::unique_ptr __pCurrentGraphicalSurface; + Tizen::Ui::Effects::_Utils::Vec3f __currentGravityForce; + float __currentGravityForceValue; + std::unique_ptr __pCurrentVectorXBuffer; + std::unique_ptr __pCurrentVectorYBuffer; + TypePModelSurfaceCollection __modelSurfaceBuffer; + + int __lastSceneXMLElementIndex; + int __lastModelSurfaceXMLElementIndex; + int __lastGraphicalSurfaceXMLElementIndex; + std::unique_ptr __pCurrentEffectModel; + Tizen::Ui::Effects::_Runtime::IEffectModelListener* __pCurrentEffectManager; //agrigation pointer + + long __currentEffectId; + Tizen::Ui::Effects::EffectType __currentModelBehaviourType; + Tizen::Ui::Effects::_Runtime::TypeTimeEffect __currentEffectDuration; + std::string __currentEffectInstanceName; + + SceneData __currentSceneData; + ViewportData __currentViewportData; + + float __currentModelSurfaceX; + float __currentModelSurfaceY; + unsigned int __currentGraphicalSurfaceDimCtrlX; + unsigned int __currentGraphicalSurfaceDimCtrlY; + + bool __insideGraphicalSurface; + bool __rightAfterSceneStart; + bool __rightAfterModelSurfaceStart; + bool __rightAfterGraphicalSurfaceStart; + bool __insideVectorX; + bool __insideVectorY; + bool __buildingModelFailed; + bool __insideElementsPool; +}; // EffectParser + +} } } } // Tizen::Ui::Effects::_Parser + +#endif // _FUI_EFFECTS_INTERNAL_PARSER_EFFECTPARSER_H_ diff --git a/src/ui/effects/inc/FUiEffects_ParserXMLParser.h b/src/ui/effects/inc/FUiEffects_ParserXMLParser.h new file mode 100644 index 0000000..47eba2b --- /dev/null +++ b/src/ui/effects/inc/FUiEffects_ParserXMLParser.h @@ -0,0 +1,119 @@ +// +// 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 FUiEffects_ParserXMLParser.h + * @brief This file contains a declaration of XmlParser class + */ + +#ifndef _FUI_EFFECTS_INTERNAL_PARSER_XMLPARSER_H_ +#define _FUI_EFFECTS_INTERNAL_PARSER_XMLPARSER_H_ + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Parser +{ + +class EffectParser; + +/** + * @class XmlParser + * @brief An intermediate functionality between tizen's xmlSAXHandler and EffectParser class + * Uses the former for parsing an .xml file and sends information to the latter + * Implemented according to the singleton pattern + * + * @since 2.0 + * + */ +class XmlParser +{ +public: + + /** + * Class constructor + * + * @since 2.0 + * + */ + XmlParser(EffectParser* pParent); + + /** + * Class destructor + * + * @since 2.0 + * + */ + virtual ~XmlParser(void); + + /** + * Performs a complete parsing of an .xml file by usage xmlSAXHandler + * + * @since 2.0 + * + * @return A boolean result of XML-parsing only + * @param[in] pFilePath - a full path to the input file + * @param[in] sendcallbacks - determines whether to send information to EffectParser + * or just to parse the input file + * @exception E_PARSING_FAILED XML parsing hasn't been successful + */ + bool Parse(const char* pFilePath, bool sendCallbacks); + + /** + * Unzips a .zip-archive + * + * @since 2.0 + * + * @param[in] pArchivePath - a full path to the archive + * @param[in] pDestinationPath - a path to the directory for the archive + * to be extracted to + */ + static bool ExtractFromArchive(const char* pArchivePath, const char* pDestinationPath); + +protected: + +private: + + // Hidden copy constructor + XmlParser(const XmlParser& rhs); + + // Hidden assignment operator + XmlParser& operator=(const XmlParser& rhs); + + // SAX callback that handles an opening tag of a new element + static void StartElementNs(void * pCtx, const xmlChar* pLocalName, const xmlChar* pPrefix, const xmlChar* pUri, + int namespaceCount, const xmlChar** ppNamespaces, int attributeCount, int defaultedCount, const xmlChar** ppAttributes); + + // SAX callback that handles a closing tag of an element + static void EndElementNs(void* pCtx, const xmlChar* pLocalName, const xmlChar* pPrefix, const xmlChar* pUri); + + // SAX callback that handles precense of a text line inside some element + static void CharactersM(void* pCtx, const xmlChar* pCh, int len); + + // SAX callback that handles a sax error message + static void Error(void* pCtx, const char* pMsg, ... ); + + // SAX callback that handles a sax warning + static void Warning(void* pCtx, const char* pMsg, ... ); + +private: + + static EffectParser* __pCurrentParent; + static bool __justParse; +}; + +} } } } // Tizen::Ui::Effects::_Parser + +#endif //_FUI_EFFECTS_INTERNAL_PARSER_XMLPARSER_H_ diff --git a/src/ui/effects/inc/FUiEffects_Pe.h b/src/ui/effects/inc/FUiEffects_Pe.h new file mode 100644 index 0000000..fc8695d --- /dev/null +++ b/src/ui/effects/inc/FUiEffects_Pe.h @@ -0,0 +1,32 @@ +// +// 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 FUiEffects_Pe.h +* @brief This is the header file for the %_PhysicsEngine namespace +*/ + +#ifndef _FUI_EFFECTS_INTERNAL_PE_H_ +#define _FUI_EFFECTS_INTERNAL_PE_H_ + +#include "FUiEffects_PeElementSurface.h" +#include "FUiEffects_PePointSurface.h" +#include "FUiEffects_PePointSurfaceNURBS.h" +#include "FUiEffects_PeRodSurface.h" +#include "FUiEffects_PeRodSurfaceNURBS.h" +#include "FUiEffects_PeSpringSurface.h" + +#endif //_FUI_EFFECTS_INTERNAL_PE_H_ diff --git a/src/ui/effects/inc/FUiEffects_PeElementSurface.h b/src/ui/effects/inc/FUiEffects_PeElementSurface.h new file mode 100644 index 0000000..1ac2ca6 --- /dev/null +++ b/src/ui/effects/inc/FUiEffects_PeElementSurface.h @@ -0,0 +1,187 @@ +// +// 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 FUiEffects_PeElementSurface.h +* @brief This is the header file for the ElementSurface class +*/ + +#ifndef _FUI_EFFECTS_INTERNAL_PE_ELEMENTSURFACE_H_ +#define _FUI_EFFECTS_INTERNAL_PE_ELEMENTSURFACE_H_ + +#include +#include "FUiEffects_RuntimeModel.h" +#include "FUiEffects_RuntimePropertyCast.h" + +namespace Tizen { namespace Ui { namespace Effects { namespace _PhysicsEngine +{ + +/** + * @class ElementSurface + * @brief Abstract class for all physics model elements + * + * @since 2.0 + * + */ +class ElementSurface +{ +public: + /** + * Class constructor + * + * @since 2.0 + * + * @param[in] objId physical element's id. Must be unique for all objects + * + */ + ElementSurface(long objId); + + /** + * Class destructor + * + * @since 2.0 + * + */ + virtual ~ElementSurface(void); + + /** + * Sets object into the initial state + * + * @since 2.0 + * + */ + virtual void Initialize(void) = 0; + + /** + * Performs calculation step with given delta time + * + * @since 2.0 + * + * @param[in] timeStep simulation time step + * + */ + virtual void Calculate(float timeStep) = 0; + + /** + * Gets object's id + * + * @since 2.0 + * + * @return object's id + * + */ + long GetId(void) const; + + /** + * Gets object's type + * + * @since 2.0 + * + * @return enum value that corresponds to object's type + * + */ + virtual Tizen::Ui::Effects::_Runtime::ESurface GetType(void) const = 0; + + /** + * Gets element property value + * + * @since 2.0 + * + * @return struct that contains property type and value + * @param[in] property enum value for necessary property + * + */ + virtual Tizen::Ui::Effects::_Runtime::PropertyCast GetProperty( + Tizen::Ui::Effects::_Runtime::ElementProperty property + ) const; + + /** + * Sets element bool property values + * + * @since 2.0 + * + * @return true if set successful, false if failed + * @param[in] property property name + * @param[in] boolValue new bool value for property + * + */ + virtual bool SetProperty( + Tizen::Ui::Effects::_Runtime::ElementProperty property, + bool boolValue + ); + + /** + * Sets element numeric property values + * + * @since 2.0 + * + * @return true if set successful, false if failed + * @param[in] property property name + * @param[in] numericValue new numeric value for property + * + */ + virtual bool SetProperty( + Tizen::Ui::Effects::_Runtime::ElementProperty property, + LUA_NUMBER numericValue + ); + + /** + * Sets element vector property values + * + * @since 2.0 + * + * @return true if set successful, false if failed + * @param[in] property property name + * @param[in] vectorValue new vector value for property + * + */ + virtual bool SetProperty( + Tizen::Ui::Effects::_Runtime::ElementProperty property, + const Tizen::Ui::Effects::_Utils::Vec3f &vectorValue + ); + +protected: + /** + * Hidden copy constructor + * + * @since 2.0 + * + */ + ElementSurface(const ElementSurface &rhs) : __objId(0) + { } + +private: + /** + * Hidden assignment operator + * + * @since 2.0 + * + */ + ElementSurface& operator=(const ElementSurface &rhs) ; + +public: + +protected: + +private: + // object's id + const long __objId; + +}; // ElementSurface + +} } } } // Tizen::Ui::Effects::_PhysicsEngine + +#endif // _FUI_EFFECTS_INTERNAL_PE_ELEMENTSURFACE_H_ diff --git a/src/ui/effects/inc/FUiEffects_PePointSurface.h b/src/ui/effects/inc/FUiEffects_PePointSurface.h new file mode 100644 index 0000000..ce698f4 --- /dev/null +++ b/src/ui/effects/inc/FUiEffects_PePointSurface.h @@ -0,0 +1,264 @@ +// +// 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 FUiEffects_PePointSurface.h +* @brief This is the header file for the pointSurface class +*/ + +#ifndef _FUI_EFFECTS_INTERNAL_PE_POINTSURFACE_H_ +#define _FUI_EFFECTS_INTERNAL_PE_POINTSURFACE_H_ +#pragma once + +#include "FUiEffects_PeElementSurface.h" + +namespace Tizen { namespace Ui { namespace Effects { namespace _PhysicsEngine +{ + +/** + * @class PointSurface + * @brief Class for physical element: point(node) + * + * @since 2.0 + * + */ +class PointSurface + : public ElementSurface +{ + +// Member functions + +public: + /** + * PointSurface class constructor + * + * @since 2.0 + * + * @param[in] objId physical element's id + * @param[in] positionInit point initial position + * @param[in] massInit point initial mass + * @param[in] fixed point fixation setting + * + */ + PointSurface( + long objId, + Tizen::Ui::Effects::_Utils::Vec3f& positionInit, + float massInit, + float pointEnvResist, + bool fixed + ); + + /** + * Class destructor + * + * @since 2.0 + * + */ + virtual ~PointSurface(void); + + /** + * Gets object's type + * + * @since 2.0 + * + * @return enum value that corresponds to object's type + * + */ + virtual Tizen::Ui::Effects::_Runtime::ESurface GetType(void) const; + + /** + * Sets object into the initial state + * + * @since 2.0 + * + */ + virtual void Initialize(void); + + /** + * Binds point with model parameters + * + * @since 2.0 + * + * @return binding result, successful - true, failed - false + * @exception E_SYSTEM One of pointers (pEnvResist, pGravAcc, pGroundLevel) is null + * @param[in] pEnvResist pointer to environmental resistance value + * @param[in] pGravAcc pointer to gravity acceleration vector + * @param[in] pGroundLevel pointer to model ground level value + * + */ + virtual bool Construct( + const float* pEnvResist, + const Tizen::Ui::Effects::_Utils::Vec3f* pGravAcc, + const float* pGroundLevel + ); + + /** + * Performs simulation step with given delta time + * + * @since 2.0 + * + * @param[in] timeStep simulation time step + * + */ + virtual void Calculate(float timeStep); + + /** + * Gives info on whether the point is fixed + * + * @since 2.0 + * + * @return fixed point returns true, non fixed - false + * + */ + bool IsFixed(void) const; + + /** + * Gets element property value + * + * @since 2.0 + * + * @return struct that contains property type and value + * @param[in] property enum value for necessary property + * + */ + virtual Tizen::Ui::Effects::_Runtime::PropertyCast GetProperty( + Tizen::Ui::Effects::_Runtime::ElementProperty property + ) const; + + /** + * Sets element bool property values + * + * @since 2.0 + * + * @return true if set successful, false if failed + * @param[in] property property name + * @param[in] boolValue new bool value for property + * + */ + virtual bool SetProperty( + Tizen::Ui::Effects::_Runtime::ElementProperty property, + bool boolValue + ); + + /** + * Sets element numeric property values + * + * @since 2.0 + * + * @return true if set successful, false if failed + * @param[in] property property name + * @param[in] numericValue new numeric value for property + * + */ + virtual bool SetProperty( + Tizen::Ui::Effects::_Runtime::ElementProperty property, + LUA_NUMBER numericValue + ); + + /** + * Sets element vector property values + * + * @since 2.0 + * + * @return true if set successful, false if failed + * @param[in] property property name + * @param[in] vectorValue new vector value for property + * + */ + virtual bool SetProperty( + Tizen::Ui::Effects::_Runtime::ElementProperty property, + const Tizen::Ui::Effects::_Utils::Vec3f& vectorValue + ); + + /** + * Gets current position of the point + * + * @since 2.0 + * + * @return vector value - current position + * + */ + const Tizen::Ui::Effects::_Utils::Vec3f& GetPosition(void) const; + + /** + * Gets current velocity of the point + * + * @since 2.0 + * + * @return vector value - current velocity + * + */ + const Tizen::Ui::Effects::_Utils::Vec3f& GetVelocity(void) const; + + /** + * Adds force vector to point on current timestep + * + * @since 2.0 + * + * @param[in] appliedForce vector of force applied + * + */ + void AddForce(Tizen::Ui::Effects::_Utils::Vec3f appliedForce); + + /** + * Adds velocity vector to point on current timestep + * + * @since 2.0 + * + * @param[in] newVelocity vector of velocity added + * + */ + void AddVelocity(Tizen::Ui::Effects::_Utils::Vec3f newVelocity); + +protected: + +private: + // internal initialize function + void InitPoint(void); + +public: + +protected: + +private: + // initial values + const Tizen::Ui::Effects::_Utils::Vec3f __positionInit; + const float __massInit; + + // simulation values + Tizen::Ui::Effects::_Utils::Vec3f __position; + Tizen::Ui::Effects::_Utils::Vec3f __positionPrev; + Tizen::Ui::Effects::_Utils::Vec3f __velocity; + + Tizen::Ui::Effects::_Utils::Vec3f __force; + Tizen::Ui::Effects::_Utils::Vec3f __forceUser; + + float __mass; + float __pointEnvResist; + + // simulation values from model + const float *__pEnvResist; + const Tizen::Ui::Effects::_Utils::Vec3f *__pGravityAcc; + + const float *__pGroundLevel; + + bool __fixed; + +}; // PointSurface + +} } } } // Tizen::Ui::Effects::_PhysicsEngine + +#endif //_FUI_EFFECTS_INTERNAL_PE_POINTSURFACE_H_ diff --git a/src/ui/effects/inc/FUiEffects_PePointSurfaceNURBS.h b/src/ui/effects/inc/FUiEffects_PePointSurfaceNURBS.h new file mode 100644 index 0000000..89e6ab9 --- /dev/null +++ b/src/ui/effects/inc/FUiEffects_PePointSurfaceNURBS.h @@ -0,0 +1,234 @@ +// +// 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 FUiEffects_PePointSurfaceNURBS.h +* @brief This is the header file for the PointSurfaceNurbs class +*/ + +#ifndef _FUI_EFFECTS_INTERNAL_PE_POINTSURFACENURBS_H_ +#define _FUI_EFFECTS_INTERNAL_PE_POINTSURFACENURBS_H_ +#pragma once + +#include "FUiEffects_PePointSurface.h" + +namespace Tizen { namespace Ui { namespace Effects { namespace _PhysicsEngine +{ + +/** + * @class PointSurfaceNURBS + * @brief Class for graphical element: nurbs point + * + * @since 2.0 + * + */ +class PointSurfaceNurbs + : public PointSurface +{ + +public: + + /** + * PointSurfaceNURBS class constructor + * + * simce 3.0 + * + * @param[in] objId physical element's id + * @param[in] positionInit point initial position + * @param[in] massInit point initial mass + * @param[in] weightInit NURBS initial weight + * @param[in] fixed point fixation setting + * @param[in] row row number in grid + * @param[in] col column number in grid + * + */ + PointSurfaceNurbs( + long objId, + Tizen::Ui::Effects::_Utils::Vec3f positionInit, + float massInit, + float pointEnvResist, + float weightInit, + bool fixed, + unsigned int row, + unsigned int col + ); + + /** + * Class destructor + * + * @since 2.0 + * + */ + virtual ~PointSurfaceNurbs(); + + /** + * Gets object's type + * + * @since 2.0 + * + * @return enum value that corresponds to object's type + * + */ + virtual Tizen::Ui::Effects::_Runtime::ESurface GetType(void) const; + + /** + * Sets object into the initial state + * + * @since 2.0 + * + */ + virtual void Initialize(void); + + /** + * Binds point with model parameters + * + * @since 2.0 + * + * @return binding result, successful - true, failed - false + * @param[in] pEnvResist pointer to environmental resistance value + * @param[in] pGravAcc pointer to gravity acceleration vector + * @param[in] pGroundLevel pointer to model ground level value + * + */ + virtual bool Construct( + const float* pEnvResist, + const Tizen::Ui::Effects::_Utils::Vec3f* pGravAcc, + const float* pGroundLevel + ); + + /** + * Performs simulation step with given delta time + * + * @since 2.0 + * + * @param[in] timeStep simulation time step + * + */ + virtual void Calculate(float timeStep); + + /** + * Gets element property value + * + * @since 2.0 + * + * @return struct that contains property type and value + * @param[in] property enum value for necessary property + * + */ + virtual Tizen::Ui::Effects::_Runtime::PropertyCast GetProperty( + Tizen::Ui::Effects::_Runtime::ElementProperty property + ) const; + + /** + * Sets element bool property values + * + * @since 2.0 + * + * @return true if set successful, false if failed + * @param[in] property property name + * @param[in] boolValue new bool value for property + * + */ + virtual bool SetProperty( + Tizen::Ui::Effects::_Runtime::ElementProperty property, + bool boolValue + ); + + /** + * Sets element numeric property values + * + * @since 2.0 + * + * @return true if set successful, false if failed + * @param[in] property property name + * @param[in] numericValue new numeric value for property + * + */ + virtual bool SetProperty( + Tizen::Ui::Effects::_Runtime::ElementProperty property, + LUA_NUMBER numericValue + ); + + /** + * Sets element vector property values + * + * @since 2.0 + * + * @return true if set successful, false if failed + * @param[in] property property name + * @param[in] vectorValue new vector value for property + * + */ + virtual bool SetProperty( + Tizen::Ui::Effects::_Runtime::ElementProperty property, + const Tizen::Ui::Effects::_Utils::Vec3f & vectorValue + ); + + /** + * Gets NURBS weight + * + * @since 2.0 + * + * @return NURBS weight value + * + */ + float GetWeight(void) const; + + /** + * Gets grid row which contains this point + * + * @since 2.0 + * + * @return grid row number + * + */ + unsigned int GetRow(void) const; + + /** + * Gets grid column which contains this point + * + * @since 2.0 + * + * @return grid column number + * + */ + unsigned int GetCol(void) const; + +protected: + +private: + // internal initialize function + void InitPointNurbs(void); + +public: + +protected: + +private: + // initial values + const float __nurbsWeightInit; + + // current simulation values + float __nurbsWeight; + + unsigned int __row; + unsigned int __col; + +}; // PointSurfaceNURBS + +} } } } // Tizen::Ui::Effects::_PhysicsEngine + +#endif //_FUI_EFFECTS_INTERNAL_PE_POINTSURFACENURBS_H_ diff --git a/src/ui/effects/inc/FUiEffects_PeRodSurface.h b/src/ui/effects/inc/FUiEffects_PeRodSurface.h new file mode 100644 index 0000000..f9aa272 --- /dev/null +++ b/src/ui/effects/inc/FUiEffects_PeRodSurface.h @@ -0,0 +1,191 @@ +// +// 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 FUiEffects_PeRodSurface.h +* @brief This is the header file for the RodSurface class +*/ + +#ifndef _FUI_EFFECTS_INTERNAL_PE_RODSURFACE_H_ +#define _FUI_EFFECTS_INTERNAL_PE_RODSURFACE_H_ +#pragma once + +#include "FUiEffects_PeElementSurface.h" +#include "FUiEffects_PePointSurface.h" + +namespace Tizen { namespace Ui { namespace Effects { namespace _PhysicsEngine +{ + +/** + * @class RodSurface + * @brief Class for physical element: rod + * + * @since 2.0 + * + */ +class RodSurface + : public ElementSurface +{ + +public: + /** + * RodSurface class constructor + * + * @since 2.0 + * + * @param[in] objId physical element's id + * @param[in] stiffness rod coefficient of rigidity + * @param[in] pPoint1 pointer to connected point 1 (edge) + * @param[in] pPoint2 pointer to connected point 2 (center) + * @param[in] pPoint3 pointer to connected point 3 (edge) + * + */ + RodSurface( + long objId, + float stiffness, + PointSurface* pPoint1, + PointSurface* pPoint2, + PointSurface* pPoint3 + ); + + /** + * Class destructor + * + * @since 2.0 + * + */ + virtual ~RodSurface(void); + + /** + * Gets object's type + * + * @since 2.0 + * + * @return enum value that corresponds to object's type + * + */ + virtual Tizen::Ui::Effects::_Runtime::ESurface GetType(void) const; + + /** + * Sets object into the initial state + * + * @since 2.0 + * + */ + virtual void Initialize(void); + + /** + * Performs simulation step with given delta time + * + * @since 2.0 + * + * @param[in] timeStep simulation time step + * + */ + virtual void Calculate(float timeStep); + + /** + * Gets element property value + * + * @since 2.0 + * + * @return struct that contains property type and value + * @param[in] property enum value for necessary property + * + */ + virtual Tizen::Ui::Effects::_Runtime::PropertyCast GetProperty( + Tizen::Ui::Effects::_Runtime::ElementProperty property + ) const; + + /** + * Sets element bool property values + * + * @since 2.0 + * + * @return true if set successful, false if failed + * @param[in] property property name + * @param[in] boolValue new bool value for property + * + */ + virtual bool SetProperty( + Tizen::Ui::Effects::_Runtime::ElementProperty property, + bool boolValue + ); + + /** + * Sets element numeric property values + * + * @since 2.0 + * + * @return true if set successful, false if failed + * @param[in] property property name + * @param[in] numericValue new numeric value for property + * + */ + virtual bool SetProperty( + Tizen::Ui::Effects::_Runtime::ElementProperty property, + LUA_NUMBER numericValue + ); + + /** + * Sets element vector property values + * + * @since 2.0 + * + * @return true if set successful, false if failed + * @param[in] property property name + * @param[in] vectorValue new vector value for property + * + */ + virtual bool SetProperty( + Tizen::Ui::Effects::_Runtime::ElementProperty property, + const Tizen::Ui::Effects::_Utils::Vec3f & vectorValue + ); + +protected: + +private: + // internal init method + void InitRod(void); + + // internal calculate methods + // (may implement different models) + void UseStretchModel(float timeStep); + void UseUnbendModel(float timeStep); + +public: + +protected: + // points that are connected by rod + PointSurface* _pPoint1; // edge point 1 + PointSurface* _pPoint2; // center point + PointSurface* _pPoint3; // edge point 2 + + float _deformationAngle; + +private: + // initial values + const float __stiffnessInit; // Initial rod coefficient of rigidity + + // simulation values + float __stiffness; // Rod coefficient of rigidity + + +}; // RodSurface + +} } } } // Tizen::Ui::Effects::_PhysicsEngine + +#endif //_FUI_EFFECTS_INTERNAL_PE_RODSURFACE_H_ diff --git a/src/ui/effects/inc/FUiEffects_PeRodSurfaceNURBS.h b/src/ui/effects/inc/FUiEffects_PeRodSurfaceNURBS.h new file mode 100644 index 0000000..2decfaf --- /dev/null +++ b/src/ui/effects/inc/FUiEffects_PeRodSurfaceNURBS.h @@ -0,0 +1,179 @@ +// +// 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 FUiEffects_PeRodSurfaceNURBS.h +* @brief This is the header file for the ElementSurface class +*/ + +#ifndef _FUI_EFFECTS_INTERNAL_PE_RODSURFACENURBS_H_ +#define _FUI_EFFECTS_INTERNAL_PE_RODSURFACENURBS_H_ +#pragma once + +#include "FUiEffects_PePointSurfaceNURBS.h" +#include "FUiEffects_PeRodSurface.h" + +namespace Tizen { namespace Ui { namespace Effects { namespace _PhysicsEngine +{ + +/** + * @class RodSurfaceNURBS + * @brief Class for graphical element: nurbs rod (for regular grid) + * + * @since 2.0 + * + */ +class RodSurfaceNurbs + : public RodSurface +{ + +public: + /** + * RodSurfaceNURBS class constructor + * + * @since 2.0 + * + * @param [in] objId physical element's id + * @param [in] stiffness rod coefficient of rigidity + * @param [in] pPoint1 pointer to connected point 1 (edge) + * @param [in] pPoint2 pointer to connected point 2 (center) + * @param [in] pPoint3 pointer to connected point 3 (edge) + * @param [in] pPointN pointer to neighbor point + * + */ + RodSurfaceNurbs( + long objId, + float stiffness, + PointSurfaceNurbs* pPoint1, + PointSurfaceNurbs* pPoint2, + PointSurfaceNurbs* pPoint3, + PointSurfaceNurbs* pPointN + ); + + /** + * Class destructor + * + * @since 2.0 + * + */ + virtual ~RodSurfaceNurbs(void); + + /** + * Gets object's type + * @return enum value that corresponds to object's type + * + * @since 2.0 + * + */ + virtual Tizen::Ui::Effects::_Runtime::ESurface GetType(void) const; + + /** + * Sets object into the initial state + * + * @since 2.0 + * + */ + virtual void Initialize(void); + + /** + * Performs simulation step with given delta time + * @param [in] timeStep simulation time step + * + * @since 2.0 + * + */ + virtual void Calculate(float timeStep); + + /** + * Gets element property value + * + * @since 2.0 + * + * @return struct that contains property type and value + * @param [in] property enum value for necessary property + * + */ + virtual Tizen::Ui::Effects::_Runtime::PropertyCast GetProperty( + Tizen::Ui::Effects::_Runtime::ElementProperty property + ) const; + + /** + * Sets element bool property values + * + * @since 2.0 + * + * @return true if set successful, false if failed + * @param [in] property property name + * @param [in] boolValue new bool value for property + * + */ + virtual bool SetProperty( + Tizen::Ui::Effects::_Runtime::ElementProperty property, + bool boolValue + ); + + /** + * Sets element numeric property values + * + * @since 2.0 + * + * @return true if set successful, false if failed + * @param [in] property property name + * @param [in] numericValue new numeric value for property + * + */ + virtual bool SetProperty( + Tizen::Ui::Effects::_Runtime::ElementProperty property, + LUA_NUMBER numericValue + ); + + /** + * Sets element vector property values + * + * @since 2.0 + * + * @return true if set successful, false if failed + * @param [in] property property name + * @param [in] vectorValue new vector value for property + * + */ + virtual bool SetProperty( + Tizen::Ui::Effects::_Runtime::ElementProperty property, + const Tizen::Ui::Effects::_Utils::Vec3f& vectorValue + ); + +protected: + +private: + // internal init method + void InitRodNurbs(void); + + // method to get approximate normal to surface at middle point + const Tizen::Ui::Effects::_Utils::Vec3f GetSurfaceNormal(void) const; + +public: + +protected: + +private: + // neighbor point + PointSurfaceNurbs* __pPointNeighb; + +}; // RodSurfaceNURBS + +} } } }//Tizen::Ui::Ext::Effects3d::_PhysicsEngine + +#endif //_FUI_EFFECTS_INTERNAL_PE_RODSURFACENURBS_H_ diff --git a/src/ui/effects/inc/FUiEffects_PeSpringSurface.h b/src/ui/effects/inc/FUiEffects_PeSpringSurface.h new file mode 100644 index 0000000..40e9e33 --- /dev/null +++ b/src/ui/effects/inc/FUiEffects_PeSpringSurface.h @@ -0,0 +1,179 @@ +// +// 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 FUiEffects_PeSpringSurface.h +* @brief This is the header file for the SpringSurface class +*/ + +#ifndef _FUI_EFFECTS_INTERNAL_PE_SPRINGSURFACE_H_ +#define _FUI_EFFECTS_INTERNAL_PE_SPRINGSURFACE_H_ +#pragma once + +#include "FUiEffects_PeElementSurface.h" +#include "FUiEffects_PePointSurface.h" + +namespace Tizen { namespace Ui { namespace Effects { namespace _PhysicsEngine +{ + +/** + * @class SpringSurface + * @brief Class for physical element: spring + * + * @since 2.0 + * + */ +class SpringSurface + : public ElementSurface +{ + +public: + /** + * SpringSurface class constructor + * + * @since 2.0 + * + * @param[in] objId physical element's id + * @param[in] stiffness spring coefficient of rigidity + * @param[in] pPoint1 pointer to connected point 1 + * @param[in] pPoint2 pointer to connected point 2 + * + */ + SpringSurface( + long objId, + float stiffness, + PointSurface* pPoint1, + PointSurface* pPoint2 + ); + + /** + * Class destructor + * + * @since 2.0 + * + */ + virtual ~SpringSurface(void); + + /** + * @brief Gets object's type + * @return enum value that corresponds to object's type + * + */ + virtual Tizen::Ui::Effects::_Runtime::ESurface GetType(void) const; + + /** + * Sets object into the initial state + * + * @since 2.0 + * + */ + virtual void Initialize(void); + + /** + * Performs simulation step with given delta time + * + * @since 2.0 + * + * @param[in] timeStep simulation time step + * + */ + virtual void Calculate(float timeStep); + + /** + * Gets element property value + * + * @since 2.0 + * + * @return struct that contains property type and value + * @param[in] property enum value for necessary property + * + */ + virtual Tizen::Ui::Effects::_Runtime::PropertyCast GetProperty( + Tizen::Ui::Effects::_Runtime::ElementProperty property + ) const; + + /** + * Sets element bool property values + * + * @since 2.0 + * + * @return true if set successful, false if failed + * @param[in] property property name + * @param[in] boolValue new bool value for property + * + */ + virtual bool SetProperty( + Tizen::Ui::Effects::_Runtime::ElementProperty property, + bool boolValue + ); + + /** + * Sets element numeric property values + * + * @since 2.0 + * + * @return true if set successful, false if failed + * @param[in] property property name + * @param[in] numericValue new numeric value for property + * + */ + virtual bool SetProperty( + Tizen::Ui::Effects::_Runtime::ElementProperty property, + LUA_NUMBER numericValue + ); + + /** + * Sets element vector property values + * + * @since 2.0 + * + * @return true if set successful, false if failed + * @param[in] property property name + * @param[in] vectorValue new vector value for property + * + */ + virtual bool SetProperty( + Tizen::Ui::Effects::_Runtime::ElementProperty property, + const Tizen::Ui::Effects::_Utils::Vec3f& vectorValue + ); + +protected: + +private: + // internal init method + void InitSpring(void); + +public: + +protected: + +private: + // initial values + const float __stiffnessInit; // Initial spring coefficient of rigidity + + // simulation values + float __restLength; // Length of the unstrained spring + float __stiffness; // Spring coefficient of rigidity + + // points that are connected by spring + PointSurface* __pPoint1; + PointSurface* __pPoint2; + +}; // SpringSurface + +} } } } // Tizen::Ui::Effects::_PhysicsEngine + +#endif //_FUI_EFFECTS_INTERNAL_PE_SPRINGSURFACE_H_ diff --git a/src/ui/effects/inc/FUiEffects_Renderer.h b/src/ui/effects/inc/FUiEffects_Renderer.h new file mode 100644 index 0000000..c8dde83 --- /dev/null +++ b/src/ui/effects/inc/FUiEffects_Renderer.h @@ -0,0 +1,34 @@ +// +// 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 FUiEffects_Renderer.h +* @brief This is the header file for the Tizen::Ui::Ext::Effects3d::_EffectRenderer namespace. +*/ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_H_ + +#include "FUiEffects_RendererDirectionalLight.h" +#include "FUiEffects_RendererEffectRenderer.h" +#include "FUiEffects_RendererEffectShader.h" +#include "FUiEffects_RendererMemoryTexture2DProperty.h" +#include "FUiEffects_RendererRendererGeometry.h" +#include "FUiEffects_RendererRendererObject.h" +#include "FUiEffects_RendererLog.h" +#include "FUiEffects_RendererViewport.h" + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_H_ diff --git a/src/ui/effects/inc/FUiEffects_RendererDirectionalLight.h b/src/ui/effects/inc/FUiEffects_RendererDirectionalLight.h new file mode 100644 index 0000000..766f5a5 --- /dev/null +++ b/src/ui/effects/inc/FUiEffects_RendererDirectionalLight.h @@ -0,0 +1,195 @@ +// +// 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 FUiEffects_RendererDirectionalLight.h + * @brief This is the header file for the DirectionalLight class + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_DIRECTIONALLIGHT_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_DIRECTIONALLIGHT_H_ + +#include + +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer +{ + +/** + * @class DirectionalLight + * @brief This class contains data for directional light in scene + * + */ +class DirectionalLight +{ +public: + + /** + * Constructor + * + * @remark Sets default values for members + */ + DirectionalLight(void) + { + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_EFFECT, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + __direction = EngineModel::Vector3fPropertyHolderPtr(new (std::nothrow) EngineModel::Vector3fPropertyHolder); + __colorI = EngineModel::Vector3fPropertyHolderPtr(new (std::nothrow) EngineModel::Vector3fPropertyHolder); + + r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_EFFECT, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI_EFFECT, System::GetImpl(__direction) != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + SysTryReturnVoidResult(NID_UI_EFFECT, System::GetImpl(__colorI) != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + + __direction->Set(Math::Vector3f(0.f, 0.f, -1.f)); + __color.set(1.f, 0.f, 0.f); + __intensity = 1.f; + __enabled = true; + + UpdateColorI(); + } + + /** + * Sets direction vector property + * + * @param [in] direction New direction vector + * + * @return void + */ + void SetDirection(const Tizen::Ui::Effects::_Utils::Vec3f& direction) + { + __direction->Set(Math::Vector3f(direction.x, direction.y, direction.z).Normalize()); + + return; + } + + /** + * Sets color property + * + * @param [in] color New color value + * + * @return void + */ + void SetColor(const Tizen::Ui::Effects::_Utils::Vec3f& color) + { + __color = color; + UpdateColorI(); + + return; + } + + /** + * Sets intensity property + * + * @param [in] intensity New intensity value + * + * @return void + */ + void SetIntensity(float intensity) + { + __intensity = intensity; + UpdateColorI(); + + return; + } + + /** + * Sets enabled value + * + * @param [in] enabled New enabled value + * + * @return void + */ + void SetEnabled(bool enabled) + { + __enabled = enabled; + + return; + } + + /** + * Gets direction vector property + * + * @return direction vector property + */ + EngineModel::Vector3fPropertyHolderPtr GetDirectionHolder(void) const + { + return __direction; + } + + /** + * Gets color*intensity value property + * + * @return color*intensity value property + */ + EngineModel::Vector3fPropertyHolderPtr GetColorIHolder(void) const + { + return __colorI; + } + + /** + * Gets enabled value + * + * @return enabled value + */ + bool GetEnabled(void) const + { + return __enabled; + } + +private: + + /** + * Hidden copy constructor + */ + DirectionalLight(const DirectionalLight &rhs); + + + /** + * Hidden assignment operator + */ + DirectionalLight& operator=(const DirectionalLight &rhs); + + /** + * Sets colorI property which is premultiplied color x intensity for use in shader + * + * @return void + */ + void UpdateColorI(void) + { + __colorI->Set(__color.x * __intensity, __color.y * __intensity, __color.z * __intensity); + + return; + } + +private: + _Utils::Vec3f __color; + float __intensity; + bool __enabled; + + EngineModel::Vector3fPropertyHolderPtr __direction; + EngineModel::Vector3fPropertyHolderPtr __colorI; /**< __color x __intensity */ +}; // DirectionalLight + +typedef System::SmartPtr DirectionalLightPtr; + +} } } } // Tizen::Ui::Effects::_EffectRenderer + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_DIRECTIONALLIGHT_H_ diff --git a/src/ui/effects/inc/FUiEffects_RendererEffectRenderer.h b/src/ui/effects/inc/FUiEffects_RendererEffectRenderer.h new file mode 100644 index 0000000..323e70b --- /dev/null +++ b/src/ui/effects/inc/FUiEffects_RendererEffectRenderer.h @@ -0,0 +1,380 @@ +// +// 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 FUiEffects_RendererEffectRenderer.h + * @brief This is the header file for the EffectRenderer class + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_EFFECTRENDERER_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_EFFECTRENDERER_H_ + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "FUiEffects_RendererViewport.h" +#include "FUiEffects_RuntimeRenderDataScene.h" +#include "FUiEffects_RendererRendererObject.h" +#include "FUiEffects_RendererPointLight.h" +#include "FUiEffects_RendererSpotLight.h" +#include "FUiEffects_RendererDirectionalLight.h" +#include "FUiEffects_RendererLightingParameters.h" +#include "FUiEffects_RendererMemoryTexture2DProperty.h" + +#include +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer +{ + +extern const EGLint RENDERER_EGL_DEFAULT_CONFIG_ATTRIBS[]; + +/** + * @class EffectRenderer + * @brief This class for model visualization + * + */ +class EffectRenderer +{ +public: + + /** + * Constructor + */ + EffectRenderer(void); + + /** + * Destructor + */ + ~EffectRenderer(void); + + /** + * Initializes OpenGL for this device + * + * @param [in] config Specifies attributes required to match by configs + * @return bool true on success, otherwise false + */ + static bool InitOpenGL(const EGLint* pConfig = RENDERER_EGL_DEFAULT_CONFIG_ATTRIBS); + + /** + * Closes OpenGL for this device + * + * @return void + */ + static void CloseOpenGL(void); + + /** + * OpenGL status + * + * @return bool true on success, otherwise false + */ + static bool CheckOpenGlesInitialized(void); + + /** + * Creates OpenGL surface + * + * @param [in] wnd Specifies the native window + * @return EGLSurface Result of eglCreateWindowSurface (EGL_NO_SURFACE if failed) + */ + static EGLSurface CreateSurface(EGLNativeWindowType wnd); + + /** + * Deletes OpenGL surface + * + * @param [in] surface Surface to delete + * @return void + */ + static void DeleteSurface(EGLSurface surface); + + /** + * Creates OpenGL context + * + * @param [in] ShareContext Sharable context + * @return EGLContext Result of eglCreateContext (EGL_NO_CONTEXT if failed) + */ + static EGLContext CreateContext(EGLContext shareContext = EGL_NO_CONTEXT); + + /** + * Deletes OpenGL context + * + * @param [in] context Surface to delete + * @return void + */ + static void DeleteContext(EGLContext context); + + /** + * Initializes renderer from data: scene graph, objects etc. Clears previous content. + * + * @param [in] _renderDataCollection Array of data pointers + * @return void + * + * @remark It saves pointer to EffectRenderer::renderDataCollection for further updates (see EffectRenderer::Update). @n + * @remark So it's assumed that content of _renderDataCollection (pointers values and their order in array) @n + * @remark is constant through all the life cycle of the renderer + */ + void Construct(Tizen::Ui::Effects::_Runtime::RenderDataScene &renderDataCollection); + + /** + * Updates renderer objects + * + * @return void + * + * @remark The source for updates is EffectRenderer::renderDataCollection. See comments for EffectRenderer::Construct + */ + void Update(void); + + /** + * Initialize OpenGL context state (Clear color etc) + * + * @return void + */ + void InitializeContext(void) const; + + /** + * Draw scene + * + * @return void + */ + void Draw(void); + + /** + * Sets borders of visible scene (in model (world) space) for coordinates calculation + * + * @param [in] worldLeft, worldRight, worldBottom, worldTop - coordinates of world sides related to screen + * @param [in] worldZ - Z level of screen viewport + * @param [in] worldNearDist, worldFarDist - distances to camera clipping planes in world coordinates + * @param [in] FOV_Y_deg - Full angle, in degrees, in the vertical direction + * @param [in] perspectiveProjection - true = use perspective projection, false = use orthographic projection + * + * @return bool true on valid arguments and success execution + * @see SetScreen + */ + bool SetWorld(float worldLeft, float worldRight, float worldBottom, float worldTop, float worldZ, float worldNearDist, float worldFarDist, float FOV_Y_deg, bool perspectiveProjection); + + /** + * Transforms window coordinates to model space + * + * @param [in] p point on screen + * + * @return Vec3f Point in model space + * @see SetScreen, SetWorld + */ + Tizen::Ui::Effects::_Utils::Vec3f TransformScreenToWorld(Tizen::Ui::Effects::_Utils::Vec2f p) const; + + /** + * Sets image for texture + * + * @param [in] bitmapID id of image + * @param [in] bitmap Image bitmap + * + * @return bool True on success, otherwise false + */ + bool SetBitmap(long bitmapID, Tizen::Graphics::Bitmap &bitmap); + + /** + * Sets image for texture + * + * @param [in] ptr pointer to bitmap data + * @param [in] width width in pixels + * @param [in] height height in pixels + * + * @return bool True on success, otherwise false + * + * @remark If ptr = null empty texture of width*height size will be allocated in memory for faster response on next call to this method + */ + bool SetBitmap(long bitmapID, const void* ptr, size_t width, size_t height); + + /** + * Sets borders of native screen (in pixels) for coordinates calculation + * + * @return void + */ + void SetScreen(const Tizen::Ui::Control& control); + + /** + * Tracks screen size changes + * + * @return void + */ + void TrackScreenSizeChanges(const Tizen::Ui::Control& control); + + /** + * Prebuild OpenGL data caches for fast response on Draw() method + * + * @return void + */ + void BuildCache(); + + /** + * Frees OpenGL related data + * + * @return void + */ + void ReleaseCache(); + +private: + + /** + * Hidden copy constructor + */ + EffectRenderer(const EffectRenderer &rhs); + + /** + * Hidden assignment operator + */ + EffectRenderer& operator=(const EffectRenderer &rhs); + + /** + * Initializes renderer lighting data: point, spot and directional lights, ambient parameters, etc. + * + * @param [in] _renderDataCollection Array of data pointers + * @return void + * + * @remark It saves pointer to EffectRenderer::renderDataCollection for further updates (see EffectRenderer::Update). @n + * @remark So it's assumed that content of _renderDataCollection (pointers values and their order in array) @n + * @remark is constant through all the life cycle of the renderer + */ + void ConstructLighting(void); + + /** + * Updates scene lighting + * + * @return void + */ + void UpdateLighting(void); + + /** + * Initializes renderer object from given data + * + * @param [in] index object index in EffectRenderer::objects + * @param [in] rdata Data for initialization + * @return void + * + * @remark This method is for internal use only + */ + void InitRObjectFromData(Tizen::Ui::Effects::_Runtime::RenderDataSurfaceCollection::size_type index, Tizen::Ui::Effects::_Runtime::RenderDataSurface &rdata); + + /** + * Updates renderer object + * + * @param [in] index object index in EffectRenderer::objects + * @param [in] rdata Data for update + * @return void + * + * @remark This method is for internal use only + */ + void UpdateRObject(Tizen::Ui::Effects::_Runtime::RenderDataSurfaceCollection::size_type index, Tizen::Ui::Effects::_Runtime::RenderDataSurface &rdata); + + /** + * Looks for texture in EffectRenderer::textures by its id. + * + * @param [in] bitmapID ID of texture + * @return MemoryTexture2DPropertyPtr Texture object + * + * @remark If ID not found method creates and returns empty texture for further usage filled with some noticeable color (violet [255 0 128]) + */ + MemoryTexture2DPropertyPtr FindTexture(long bitmapID); + + /** + * Sets borders of native screen (in pixels) for coordinates calculation + * + * @param [in] screenLeft, screenRight, screenBottom, screenTop - coordinates of screen sides in pixels. @n + * Used for screen-to-world transformation in touch events handlers. For example commonly screenTop = 0, screenBottom = window height + * + * @return void + */ + void SetScreen(float screenLeft, float screenRight, float screenBottom, float screenTop, int displayWidth, int displayHeight); + + /** + * (Re)Creates shader considering scene lighting parameters and count of different light types + * + * @return void + */ + void CreateShader(); + + /** + * Makes this renderer context current + * + * @return void + */ + void MakeCurrent(void); + + /** + * Restores initial OpenGL context saved in MakeCurrent method + * + * @return void + */ + void RestorePreviousContext(void); + +public: + + EGLSurface surface; /**< OpenGL surface */ + +private: + typedef std::map TexturesMap; + typedef std::map PointLightsList; + typedef std::map SpotLightsList; + typedef std::map DirectionalLightsList; + + static EGLDisplay __eglDisplay; + static EGLConfig __eglConfig; + static EGLint __glMajorVer; + static EGLint __glMinorVer; + static bool __OpenGLInitialized; + EGLContext __context, __previousContext; + bool __previousContextSaved; + Viewport __viewport; + float __FOV_Y_deg; + bool __perspectiveProjection; + + TexturesMap __textures; + std::vector __objects; + Tizen::Ui::Effects::_Runtime::RenderDataScene* __renderDataScene; + Tizen::Ui::Effects::_Runtime::RenderDataSurfaceCollection* __pRenderDataSurfaceCollection; + + // 3DFx + GraphicsEngine::RenderPtr __renderer; + EngineModel::GroupPtr __root; + EngineModel::CameraPtr __camera; + EngineModel::ShaderHolderProgramPropertyPtr __program; + + Tizen::Graphics::Dimension __dimensionPreviousControl; + + // Lighting + LightingParameters __lightingParameters; + PointLightsList __pointLights; + SpotLightsList __spotLights; + DirectionalLightsList __directionalLights; + + +}; // EffectRenderer + +typedef std::unique_ptr EffectRendererUniquePtr; + +} } } } // Tizen::Ui::Effects::_EffectRenderer + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_EFFECTRENDERER_H_ diff --git a/src/ui/effects/inc/FUiEffects_RendererEffectShader.h b/src/ui/effects/inc/FUiEffects_RendererEffectShader.h new file mode 100644 index 0000000..dcf8b63 --- /dev/null +++ b/src/ui/effects/inc/FUiEffects_RendererEffectShader.h @@ -0,0 +1,124 @@ +// +// 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 FUiEffects_RendererEffectShader.h + * @brief This is the header file for the effects library shaders + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_EFFECTSHADER_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_EFFECTSHADER_H_ + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer +{ + +#ifdef _DEBUG +#define PRINT_DEBUG(name, str) printstring(name, str) +#else +#define PRINT_DEBUG(name, str) +#endif + +/** + * Replaces all occurrences of string "what" in "str" with new string "with" + * + * @return void + */ +void replace(std::string &str, const std::string what, const std::string with); + +/** + * Prints string "str" to log output line by line. Each line is prefixed with "name" @n + * Works only in debug mode + * + * @return void + */ +void printstring(const std::string name, const std::string &str); + +#define SHADER_IN_POSITION_STR "in_Position" +#define SHADER_IN_NORMAL_STR "in_Normal" +#define SHADER_IN_TEXCOORDS_STR "in_TexCoords" +#define MAIN_TEX_STR "TEX_MAIN" + +#define LIGHTING_AMBIENTCOLORI_STR "lightingParameters.ambientColorI" +#define LIGHTING_ATTENUATION_STR "lightingParameters.attenuation" + +#define POINTLIGHT_DEFPOS_STR "/*POINTL DEF*/ \n" +#define POINTLIGHT_SRCPOS_STR "/*POINTL SRC*/ \n" +#define POINTLIGHT_DEF_STR "uniform PointLight pointLight%n;\n" +#define POINTLIGHT_ATTSRC_STR " lightdir = pointLight%n.position - Position; \n" \ + " att = 1.0 - length(lightdir) * pointLight%n.Rk; \n" \ + " if(att > 0.0) \n" \ + " color += pointLight%n.colorI * max(0.0, dot(normalize(lightdir), normal)) * att; \n" \ + " \n" +#define POINTLIGHT_NOATTSRC_STR " color += pointLight%n.colorI * max(0.0, dot(normalize(pointLight%n.position - Position), normal)); \n" \ + " \n" +#define POINTLIGHT_STR "pointLight" +#define POINTLIGHT_POSITION_STR ".position" +#define POINTLIGHT_COLORI_STR ".colorI" +#define POINTLIGHT_RK_STR ".Rk" + + +#define SPOTLIGHT_DEFPOS_STR "/*SPOTL DEF*/ \n" +#define SPOTLIGHT_SRCPOS_STR "/*SPOTL SRC*/ \n" +#define SPOTLIGHT_DEF_STR "uniform SpotLight spotLight%n;\n" +#define SPOTLIGHT_ATTSRC_STR " lightdir = normalize(Position - spotLight%n.position); \n" \ + " att = min((dot(spotLight%n.direction, lightdir) - spotLight%n.k1) * spotLight%n.k2, 1.0) * (1.0 - length(Position - spotLight%n.position) * spotLight%n.Rk); \n" \ + " if(att > 0.0) \n" \ + " color += spotLight%n.colorI * att * max(0.0, dot(-lightdir, normal)); \n" \ + " \n" +#define SPOTLIGHT_NOATTSRC_STR " lightdir = normalize(Position - spotLight%n.position); \n" \ + " att = min((dot(spotLight%n.direction, lightdir) - spotLight%n.k1) * spotLight%n.k2, 1.0); \n" \ + " if(att > 0.0) \n" \ + " color += spotLight%n.colorI * att * max(0.0, dot(-lightdir, normal)); \n" \ + " \n" +#define SPOTLIGHT_STR "spotLight" +#define SPOTLIGHT_POSITION_STR ".position" +#define SPOTLIGHT_DIRECTION_STR ".direction" +#define SPOTLIGHT_K1_STR ".k1" +#define SPOTLIGHT_K2_STR ".k2" +#define SPOTLIGHT_COLORI_STR ".colorI" +#define SPOTLIGHT_RK_STR ".Rk" + + +#define DIRECTIOALLIGHT_DEFPOS_STR "/*DIRL DEF*/ \n" +#define DIRECTIOALLIGHT_SRCPOS_STR "/*DIRL SRC*/ \n" +#define DIRECTIOALLIGHT_DEF_STR "uniform DirectionalLight directionalLight%n;\n" +#define DIRECTIOALLIGHT_SRC_STR " color += directionalLight%n.colorI * max(0.0, dot(-directionalLight%n.direction, normal)); \n" \ + " \n" +#define DIRECTIOALLIGHT_STR "directionalLight" +#define DIRECTIOALLIGHT_DIRECTION_STR ".direction" +#define DIRECTIOALLIGHTLIGHT_COLORI_STR ".colorI" + +#define MODEL_MTR_STR "ModelMtr" +#define NORMAL_MTR_STR "NormalMtr" +#define OPACITY_STR "opacity" + +#define BLUR_WEIGHTS_N 20 + +extern const char* const EFFECT_VERTEX_SHADER_STR; +extern const char* const EFFECT_FRAGMENT_SHADER_STR; +extern const char* const EFFECT_DUMMY_FRAGMENT_SHADER_STR; + +extern const char* const BLUR_VS; +extern const char* const BLUR_HORIZ_FS; +extern const char* const BLUR_VERT_FS; + + + +} } } } // Tizen::Ui::Effects::_EffectRenderer + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_EFFECTSHADER_H_ diff --git a/src/ui/effects/inc/FUiEffects_RendererLightingParameters.h b/src/ui/effects/inc/FUiEffects_RendererLightingParameters.h new file mode 100644 index 0000000..658ea69 --- /dev/null +++ b/src/ui/effects/inc/FUiEffects_RendererLightingParameters.h @@ -0,0 +1,157 @@ +// +// 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 FUiEffects_RendererLightingParameters.h + * @brief This is the header file for the LightingParameters class + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_LIGHTINGPARAMETERS_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_LIGHTINGPARAMETERS_H_ + +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer +{ + +/** + * @class LightingParameters + * @brief This class contains data for ambient light in scene + * + */ +class LightingParameters +{ +public: + + /** + * Constructor + * + * @remark Sets default values for members + */ + LightingParameters(void) + { + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_EFFECT, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + __ambientColorI = EngineModel::Vector3fPropertyHolderPtr(new (std::nothrow) EngineModel::Vector3fPropertyHolder); + __attenuation = System::FloatPtr(new (std::nothrow) float); + + r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_EFFECT, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI_EFFECT, System::GetImpl(__ambientColorI) != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + SysTryReturnVoidResult(NID_UI_EFFECT, System::GetImpl(__attenuation) != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + + __ambientColor.set(1.f, 0.f, 0.f); + __ambientIntensity = 1.f; + *__attenuation = 0.08f; + + UpdateAmbientColorI(); + } + + /** + * Sets ambient color value + * + * @param [in] color New color ambient color value + * + * @return void + */ + void SetAmbientColor(const Tizen::Ui::Effects::_Utils::Vec3f& ambientColor) + { + __ambientColor = ambientColor; + UpdateAmbientColorI(); + + return; + } + + /** + * Sets ambient intensity value + * + * @param [in] intensity New ambient intensity value + * + * @return void + */ + void SetAmbientIntensity(float ambientIntensity) + { + __ambientIntensity = ambientIntensity; + UpdateAmbientColorI(); + + return; + } + + void SetAttenuation(float attenuation) + { + *__attenuation = attenuation; + + return; + } + + /** + * Gets ambient color*intensity value property + * + * @return ambient color*intensity value property + */ + EngineModel::Vector3fPropertyHolderPtr GetAmbientColorIHolder(void) const + { + return __ambientColorI; + } + + System::FloatPtr GetAttenuation(void) const + { + return __attenuation; + } + +private: + + /** + * Hidden copy constructor + */ + LightingParameters(const LightingParameters &rhs); + + + /** + * Hidden assignment operator + */ + LightingParameters& operator=(const LightingParameters &rhs); + + /** + * Sets ambient colorI property which is premultiplied color x intensity for use in shader + * + * @return void + */ + void UpdateAmbientColorI(void) + { + __ambientColorI->Set(__ambientColor.x * __ambientIntensity, __ambientColor.y * __ambientIntensity, __ambientColor.z * __ambientIntensity); + + return; + } + +private: + _Utils::Vec3f __ambientColor; + float __ambientIntensity; + + EngineModel::Vector3fPropertyHolderPtr __ambientColorI; /**< __ambientColor * __ambientIntensity */ + System::FloatPtr __attenuation; +}; // LightingParameters + +typedef System::SmartPtr LightingParametersPtr; + +} } } } // Tizen::Ui::Effects::_EffectRenderer + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_LIGHTINGPARAMETERS_H_ diff --git a/src/ui/effects/inc/FUiEffects_RendererLog.h b/src/ui/effects/inc/FUiEffects_RendererLog.h new file mode 100644 index 0000000..7eab31b --- /dev/null +++ b/src/ui/effects/inc/FUiEffects_RendererLog.h @@ -0,0 +1,67 @@ +// +// 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 FUiEffects_RendererLog.h + * @brief This is the header file for renderer logging definitions + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_LOG_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_LOG_H_ + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer +{ + +/** + * Checks whether there was EGL operation errors + * + * @return true on success othrwise false + */ +bool CheckEglNoErrors(void); + +/** + * Checks whether there was GL operation errors + * + * @return true on success othrwise false + */ +bool CheckGlNoErrors(void); + +#ifdef _DEBUG +#define EGL_ASSERT_NOERRORS \ + { \ + if (!CheckEglNoErrors()) \ + { \ + SysAssertf(false, "Execution stopped on CheckEglNoErrors fail"); \ + } \ + } + +#define GL_ASSERT_NOERRORS \ + { \ + if (!CheckGlNoErrors()) \ + { \ + SysLog(NID_UI_EFFECT, "%s::%d", __PRETTY_FUNCTION__, __LINE__);\ + SysAssertf(false, "Execution stopped on CheckGlNoErrors fail"); \ + } \ + } +#else // #ifdef _DEBUG +#define EGL_ASSERT_NOERRORS +#define GL_ASSERT_NOERRORS +#endif + +} } } } // Tizen::Ui::Effects::_EffectRenderer + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_LOG_H_*/ diff --git a/src/ui/effects/inc/FUiEffects_RendererMemoryTexture2DProperty.h b/src/ui/effects/inc/FUiEffects_RendererMemoryTexture2DProperty.h new file mode 100644 index 0000000..fbb1150 --- /dev/null +++ b/src/ui/effects/inc/FUiEffects_RendererMemoryTexture2DProperty.h @@ -0,0 +1,161 @@ +// +// 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 FUiEffects_RendererMemoryTexture2DProperty.h + * @brief This is the header file for the MemoryTexture2DProperty class + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_MEMORYTEXTURE2DPROPERTY_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_MEMORYTEXTURE2DPROPERTY_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer +{ + +/** + * @class MemoryTexture2DProperty + * @brief This class for texture material property, constructed from bitmap located in memory. Only BGRA pixel format. + * + */ +class MemoryTexture2DProperty + : public EngineModel::Texture2dProperty +{ +public: + + /** + * Constructor + */ + MemoryTexture2DProperty(void); + + + /** + * Destructor + */ + ~MemoryTexture2DProperty(void); + + EngineModel::TextureProperty::InternalFormat::Value GetInternalFormat(void) const + { + return EngineModel::TextureProperty::InternalFormat::RGBA; + } + + EngineModel::TextureProperty::DataFormat::Value GetDataFormat(void) const + { + return EngineModel::TextureProperty::DataFormat::RGBA; + } + + EngineModel::TextureProperty::DataType::Value GetDataType(void) const + { + return EngineModel::TextureProperty::DataType::UNSIGNED_BYTE; + } + + EngineModel::TextureProperty::FilterType::Value GetMinFilter(void) const + { + return EngineModel::TextureProperty::FilterType::LINEAR; + } + + EngineModel::TextureProperty::FilterType::Value GetMagFilter(void) const + { + return EngineModel::TextureProperty::FilterType::LINEAR; + } + + EngineModel::TextureProperty::WrapType::Value GetWrapS(void) const + { + return EngineModel::TextureProperty::WrapType::CLAMP_TO_EDGE; + } + + EngineModel::TextureProperty::WrapType::Value GetWrapT(void) const + { + return EngineModel::TextureProperty::WrapType::CLAMP_TO_EDGE; + } + + EngineModel::TextureProperty::WrapType::Value GetWrapR(void) const + { + return EngineModel::TextureProperty::WrapType::CLAMP_TO_EDGE; + } + + size_t GetNumMipmaps(void) const + { + return 1; + } + + void* GetData(size_t aMipNumber) + { + return &__data[0]; + } + + size_t GetWidth(size_t aMipNumber) const + { + return __width; + } + + size_t GetHeight(size_t aMipNumber) const + { + return __height; + } + + bool GenerateMipmaps(void) const + { + return false; + } + + + /** + * Copies bitmap data from specified location + * + * @param [in] ptr Pointer to data location. BGRA format. + * @param [in] width Width in pixels + * @param [in] height Height in pixels + * + * @return void + */ + void SetData(const void* ptr, size_t width, size_t height); + +private: + + /** + * Hidden copy constructor + */ + MemoryTexture2DProperty(const MemoryTexture2DProperty &rhs); + + + /** + * Hidden assignment operator + */ + MemoryTexture2DProperty& operator =(const MemoryTexture2DProperty &rhs); + + + /** + * Gets count of bytes per pixel for current format + * + * @return int Count of bytes per pixel + */ + int GetFormatSize(void); + +private: + System::Data __data; + size_t __width; + size_t __height; +}; + +typedef System::SmartPtr MemoryTexture2DPropertyPtr; + +} } } } // Tizen::Ui::Effects::_EffectRenderer + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_MEMORYTEXTURE2DPROPERTY_H_ diff --git a/src/ui/effects/inc/FUiEffects_RendererPointLight.h b/src/ui/effects/inc/FUiEffects_RendererPointLight.h new file mode 100644 index 0000000..3e140ea --- /dev/null +++ b/src/ui/effects/inc/FUiEffects_RendererPointLight.h @@ -0,0 +1,256 @@ +// +// 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 FUiEffects_RendererPointLight.h + * @brief This is the header file for the PointLight class + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_POINTLIGHT_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_POINTLIGHT_H_ + +#include + +#include + +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer +{ + +/** + * @class PointLight + * @brief This class contains data for point light in scene + * + */ +class PointLight +{ +public: + + /** + * Constructor + * + * @param [in] attenuation Global attenuation pointer + * + * @remark Sets default values for members + */ + PointLight(System::FloatPtr attenuation) + { + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_EFFECT, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI_EFFECT, System::GetImpl(attenuation) != null, E_INVALID_ARG, "[E_INVALID_ARG] PointLight attenuation equals null"); + + __position = EngineModel::Vector3fPropertyHolderPtr(new (std::nothrow) EngineModel::Vector3fPropertyHolder); + __colorI = EngineModel::Vector3fPropertyHolderPtr(new (std::nothrow) EngineModel::Vector3fPropertyHolder); + __Rk = EngineModel::FloatPropertyHolderPtr(new (std::nothrow) EngineModel::FloatPropertyHolder); + + r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_EFFECT, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI_EFFECT, System::GetImpl(__position) != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + SysTryReturnVoidResult(NID_UI_EFFECT, System::GetImpl(__colorI) != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + SysTryReturnVoidResult(NID_UI_EFFECT, System::GetImpl(__Rk) != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + + __position->Set(0.f, 0.f, 0.f); + __color.set(1.f, 0.f, 0.f); + __intensity = 1.f; + __enabled = true; + __attenuation = attenuation; + __maxCi = 0.0f; + + UpdateColorI(); + } + + /** + * Sets position property + * + * @param [in] position New position + * + * @return void + */ + void SetPosition(const Tizen::Ui::Effects::_Utils::Vec3f& position) + { + __position->Set(position.x, position.y, position.z); + + return; + } + + /** + * Sets color property + * + * @param [in] color New color value + * + * @return void + */ + void SetColor(const Tizen::Ui::Effects::_Utils::Vec3f& color) + { + __color = color; + UpdateColorI(); + + return; + } + + /** + * Sets intensity property + * + * @param [in] intensity New intensity value + * + * @return void + */ + void SetIntensity(float intensity) + { + __intensity = intensity; + UpdateColorI(); + + return; + } + + /** + * Sets enabled value + * + * @param [in] enabled New enabled value + * + * @return void + */ + void SetEnabled(bool enabled) + { + __enabled = enabled; + + return; + } + + /** + * Gets position property + * + * @return position property + */ + EngineModel::Vector3fPropertyHolderPtr GetPositionHolder(void) const + { + return __position; + } + + /** + * Gets color*intensity value property + * + * @return color*intensity value property + */ + EngineModel::Vector3fPropertyHolderPtr GetColorIHolder(void) const + { + return __colorI; + } + + + /** + * Gets Rk value holder + * + * @return Rk value holder + */ + EngineModel::FloatPropertyHolderPtr GetRkHolder(void) const + { + return __Rk; + } + + /** + * Gets enabled value + * + * @return enabled value + */ + bool GetEnabled(void) const + { + return __enabled; + } + + /** + * Does source emitt any light? + * + * @return true if color*intensity = 0 + */ + bool IsBlack(void) const + { + return __maxCi <= std::numeric_limits::epsilon() || __Rk->Get() <= std::numeric_limits::epsilon(); + } + + /** + * Updates precalculated values related to Attenuation + * + * @return void + */ + void UpdateAttenuation(void) + { + UpdateRk(); + } + +private: + + /** + * Hidden copy constructor + */ + PointLight(const PointLight &rhs); + + + /** + * Hidden assignment operator + */ + PointLight& operator=(const PointLight &rhs); + + /** + * Sets colorI property which is premultiplied color x intensity for use in shader. @n + * Also calculates 1 / Rmax, where Rmax is maxim distance light value is >= 1/255 + * + * @return void + */ + void UpdateColorI(void) + { + __colorI->Set(__color.x * __intensity, __color.y * __intensity, __color.z * __intensity); + __maxCi = Math::EffectsAbs((float)__intensity * Math::EffectsMax(__color.x, Math::EffectsMax(__color.y, __color.z))); + + UpdateRk(); + + return; + } + + /** + * Updates precalculated values related to light emission radius + * + * @return void + */ + void UpdateRk(void) + { + if(__maxCi > std::numeric_limits::epsilon()) + { + __Rk->Set(Math::EffectsSqrt(*__attenuation * (1.0f/255.f) / __maxCi)); + } + } + +private: + _Utils::Vec3f __color; + float __intensity; + bool __enabled; + float __maxCi; + + EngineModel::Vector3fPropertyHolderPtr __position; + EngineModel::Vector3fPropertyHolderPtr __colorI; /**< __color * __intensity */ + EngineModel::FloatPropertyHolderPtr __Rk; + System::FloatPtr __attenuation; +}; // PointLight + +typedef System::SmartPtr PointLightPtr; + +} } } } // Tizen::Ui::Effects::_EffectRenderer + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_POINTLIGHT_H_ diff --git a/src/ui/effects/inc/FUiEffects_RendererRendererGeometry.h b/src/ui/effects/inc/FUiEffects_RendererRendererGeometry.h new file mode 100644 index 0000000..725a9a7 --- /dev/null +++ b/src/ui/effects/inc/FUiEffects_RendererRendererGeometry.h @@ -0,0 +1,294 @@ +// +// 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 FUiEffects_RendererRendererGeometry.h + * @brief This is the header file for the RendererGeometry class + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_RENDERERGEOMETRY_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_RENDERERGEOMETRY_H_ + +#include +#include +#include +#include +#include + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer +{ + +/** + * @class RendererGeometry + * @brief Class for renderer object geometry. Holds pointers to pData locations in memory. + * + */ +class RendererGeometry + : public EngineModel::Geometry +{ +public: + + /** + * Constructor + */ + RendererGeometry(void); + + + /** + * Destructor + */ + ~RendererGeometry(void); + + EngineModel::BufferPtr GetBuffer(const std::string& aName) const; + + EngineModel::BufferPtr GetIndexBuffer(void) const + { + return __indexTriangles; + } + + EngineModel::IndexBuffer::PrimitiveType::Value GetPrimitiveType(void) const + { + return __indexTriangles->GetPrimitiveType(); + } + + const EngineModel::Aabb& GetBoundBox(void) const + { + return __bBox; + } + + + /** + * Set vertex pData pointer + * + * @param [in] newdata Vertex pData + * + * @return void + */ + void SetVertData(Tizen::Ui::Effects::_Runtime::VertexDataCollection& newdata) + { + __composite->pData = &newdata; + InvalidateVertexData(); + + return; + } + + + /** + * Set indices pData pointer + * + * @param [in] newdata Indices pData + * + * @return void + */ + void SetIndices(Tizen::Ui::Effects::_Runtime::IndicesCollection& newdata) + { + __indexTriangles->pData = &newdata; + InvalidateIndices(); + + return; + } + + + /** + * Invalidates vertex pData + * + * @return void + */ + void InvalidateVertexData(void) + { + if (__composite->GetCache() != 0) + { + __composite->GetCache()->Invalidate(); + } + + return; + } + + + /** + * Invalidates indices pData + * + * @return void + */ + void InvalidateIndices(void) + { + if(__indexTriangles->GetCache() != 0) + { + __indexTriangles->GetCache()->Invalidate(); + } + + return; + } + +private: + + /** + * Hidden copy constructor + */ + RendererGeometry(const RendererGeometry &rhs); + + + /** + * Hidden assignment operator + */ + RendererGeometry& operator=(const RendererGeometry &rhs); + +private: + class _Buffer_UShortIndex + : public EngineModel::IndexBuffer + { + public: + _Buffer_UShortIndex(void) + : pData(null) + { + } + + ~_Buffer_UShortIndex(void) + { + } + + EngineModel::TypedBufferStrategy::DataType::Value GetDataType(void) const + { + return EngineModel::TypedBufferStrategy::DataType::UNSIGNED_SHORT; + } + + void* GetData(void) + { + return &(*pData)[0]; + } + + size_t GetSize(void) const + { + return pData->size() * sizeof(Tizen::Ui::Effects::_Runtime::IndicesCollection::value_type); + } + + EngineModel::SolidBufferStrategy::BufferUsage::Value GetUsage(void) const + { + return EngineModel::SolidBufferStrategy::BufferUsage::STATIC_DRAW; + } + + EngineModel::IndexBuffer::PrimitiveType::Value GetPrimitiveType(void) const + { + return EngineModel::IndexBuffer::PrimitiveType::TRIANGLES; + } + + Tizen::Ui::Effects::_Runtime::IndicesCollection* pData; + }; + typedef System::SmartPtr<_Buffer_UShortIndex> Buffer_UIntIndexPtr; + + class _Buffer_CompositeFloatVertex + : public EngineModel::CompositeVertexBuffer + { + public: + _Buffer_CompositeFloatVertex(void) + : pData(null) + { + } + + ~_Buffer_CompositeFloatVertex(void) + { + } + + EngineModel::TypedBufferStrategy::DataType::Value GetDataType(void) const + { + return EngineModel::TypedBufferStrategy::DataType::FLOAT; + } + + void* GetData(void) + { + return &(*pData)[0]; + } + + size_t GetSize(void) const + { + return pData->size() * sizeof(Tizen::Ui::Effects::_Runtime::VertexData); + } + + EngineModel::SolidBufferStrategy::BufferUsage::Value GetUsage(void) const + { + return EngineModel::SolidBufferStrategy::BufferUsage::DYNAMIC_DRAW; + } + + Tizen::Ui::Effects::_Runtime::VertexDataCollection* pData; + }; + typedef System::SmartPtr<_Buffer_CompositeFloatVertex> Buffer_CompositeFloatVertexPtr; + + + class _Buffer_VertexAttribute + : public EngineModel::PartVertexBuffer + { + public: + _Buffer_VertexAttribute(EngineModel::CompositeVertexBufferPtr aBuffer, size_t aComponents, size_t aOffset, size_t aStride): + __stride(aStride), __offset(aOffset), __components(aComponents), __buffer(aBuffer) + { + } + + ~_Buffer_VertexAttribute(void) + { + } + + EngineModel::TypedBufferStrategy::DataType::Value GetDataType(void) const + { + return __buffer->GetDataType(); + } + + size_t GetStride(void) const + { + return __stride; + } + + size_t GetOffset(void) const + { + return __offset; + } + + EngineModel::CompositeVertexBufferPtr GetCompositeBuffer(void) const + { + return __buffer; + } + + size_t GetComponentsPerElement(void) const + { + return __components; + } + + private: + size_t __stride; + size_t __offset; + size_t __components; + EngineModel::CompositeVertexBufferPtr __buffer; + }; + typedef System::SmartPtr<_Buffer_VertexAttribute> Buffer_VertexAttributePtr; + + +private: + Buffer_CompositeFloatVertexPtr __composite; + Buffer_VertexAttributePtr __partVertex; + Buffer_VertexAttributePtr __partNormal; + Buffer_VertexAttributePtr __partTexCoords; + Buffer_UIntIndexPtr __indexTriangles; + + EngineModel::Aabb __bBox; +}; + + +typedef System::SmartPtr RendererGeometryPtr; + +} } } } // Tizen::Ui::Effects::_EffectRenderer + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_RENDERERGEOMETRY_H_ diff --git a/src/ui/effects/inc/FUiEffects_RendererRendererObject.h b/src/ui/effects/inc/FUiEffects_RendererRendererObject.h new file mode 100644 index 0000000..163597d --- /dev/null +++ b/src/ui/effects/inc/FUiEffects_RendererRendererObject.h @@ -0,0 +1,166 @@ +// +// 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 FUiEffects_RendererRendererObject.h + * @brief This is the header file for the RendererObject class + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_RENDEREROBJECT_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_RENDEREROBJECT_H_ + +#include +#include +#include +#include +#include +#include + +#include "FUiEffects_RendererEffectShader.h" +#include "FUiEffects_RendererRendererGeometry.h" +#include "FUiEffects_RendererMemoryTexture2DProperty.h" + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer +{ + +/** + * @class RendererObject + * @brief This class represents renderer object + * + */ +class RendererObject + : public EngineModel::Drawable +{ +public: + + /** + * Constructor + */ + RendererObject(void) + { + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_EFFECT, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + opacity = EngineModel::FloatPropertyHolderPtr(new (std::nothrow) EngineModel::FloatPropertyHolder); + alphablend = EngineModel::AlphaBlendPropertyPtr(new (std::nothrow) EngineModel::AlphaBlendProperty); + normalMtr = EngineModel::Matrix4fPropertyHolderPtr(new (std::nothrow) EngineModel::Matrix4fPropertyHolder); + modelMtr = EngineModel::Matrix4fPropertyHolderPtr(new (std::nothrow) EngineModel::Matrix4fPropertyHolder); + setMaterial(EngineModel::PropertyHolderMaterialPtr(new (std::nothrow) EngineModel::PropertyHolderMaterial)); + + r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_EFFECT, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI_EFFECT, System::GetImpl(opacity) != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + SysTryReturnVoidResult(NID_UI_EFFECT, System::GetImpl(alphablend) != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + SysTryReturnVoidResult(NID_UI_EFFECT, System::GetImpl(normalMtr) != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + SysTryReturnVoidResult(NID_UI_EFFECT, System::GetImpl(modelMtr) != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + SysTryReturnVoidResult(NID_UI_EFFECT, System::GetImpl(__mat) != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + + + normalMtr->Set(Math::Matrix4f::GetIdentity()); + modelMtr->Set(Math::Matrix4f::GetIdentity()); + + __mat->AddProperty(OPACITY_STR, opacity); + __mat->AddProperty("AlphaBlendProp", alphablend); + __mat->AddProperty(MODEL_MTR_STR, modelMtr); + __mat->AddProperty(NORMAL_MTR_STR, normalMtr); + } + + + /** + * Destructor + */ + ~RendererObject(void) + { + } + + + /** + * Sets new geometry for drawable + * + * @param [in] aGeom New geometry + * + * @return void + */ + void setGeometry(RendererGeometryPtr aGeom) + { + EngineModel::Drawable::SetGeometry(aGeom); + __geom = aGeom; + } + + /** + * Sets new material for drawable + * + * @param [in] aGeom New material + * + * @return void + */ + void setMaterial(EngineModel::PropertyHolderMaterialPtr aMat) + { + EngineModel::Drawable::SetMaterial(aMat); + __mat = aMat; + } + + /** + * Gets current geometry of drawable + * + * @return RendererGeometryPtr + */ + RendererGeometryPtr GetGeom(void) const + { + return __geom; + } + + /** + * Gets current material of drawable + * + * @return EngineModel::PropertyHolderMaterialPtr + */ + EngineModel::PropertyHolderMaterialPtr GetMat(void) const + { + return __mat; + } + +private: + + /** + * Hidden copy constructor + */ + RendererObject(const RendererObject &rhs); + + /** + * Hidden assignment operator + */ + RendererObject& operator=(const RendererObject &rhs); + +public: + EngineModel::Matrix4fPropertyHolderPtr normalMtr; + EngineModel::Matrix4fPropertyHolderPtr modelMtr; + + EngineModel::FloatPropertyHolderPtr opacity; + EngineModel::AlphaBlendPropertyPtr alphablend; + +private: + RendererGeometryPtr __geom; + EngineModel::PropertyHolderMaterialPtr __mat; +}; + +typedef System::SmartPtr RendererObjectPtr; + +} } } } // Tizen::Ui::Effects::_EffectRenderer + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_RENDEREROBJECT_H_ diff --git a/src/ui/effects/inc/FUiEffects_RendererSpotLight.h b/src/ui/effects/inc/FUiEffects_RendererSpotLight.h new file mode 100644 index 0000000..337d959 --- /dev/null +++ b/src/ui/effects/inc/FUiEffects_RendererSpotLight.h @@ -0,0 +1,359 @@ +// +// 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 FUiEffects_RendererSpotLight.h + * @brief This is the header file for the SpotLight class + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_SPOTLIGHT_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_SPOTLIGHT_H_ + +#include + +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer +{ + +/** + * @class SpotLight + * @brief This class contains data for spot light in scene + * + */ +class SpotLight +{ +public: + + /** + * Constructor + * + * * @param [in] attenuation Global attenuation pointer + * + * @remark Sets default values for members + */ + SpotLight(System::FloatPtr attenuation) + { + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_EFFECT, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI_EFFECT, System::GetImpl(attenuation) != null, E_INVALID_ARG, "[E_INVALID_ARG] PointLight attenuation equals null"); + + __position = EngineModel::Vector3fPropertyHolderPtr(new (std::nothrow) EngineModel::Vector3fPropertyHolder); + __direction = EngineModel::Vector3fPropertyHolderPtr(new (std::nothrow) EngineModel::Vector3fPropertyHolder); + __k1 = EngineModel::FloatPropertyHolderPtr(new (std::nothrow) EngineModel::FloatPropertyHolder); + __k2 = EngineModel::FloatPropertyHolderPtr(new (std::nothrow) EngineModel::FloatPropertyHolder); + __colorI = EngineModel::Vector3fPropertyHolderPtr(new (std::nothrow) EngineModel::Vector3fPropertyHolder); + __Rk = EngineModel::FloatPropertyHolderPtr(new (std::nothrow) EngineModel::FloatPropertyHolder); + + r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_EFFECT, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI_EFFECT, System::GetImpl(__position) != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + SysTryReturnVoidResult(NID_UI_EFFECT, System::GetImpl(__direction) != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + SysTryReturnVoidResult(NID_UI_EFFECT, System::GetImpl(__k1) != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + SysTryReturnVoidResult(NID_UI_EFFECT, System::GetImpl(__k2) != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + SysTryReturnVoidResult(NID_UI_EFFECT, System::GetImpl(__colorI) != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + SysTryReturnVoidResult(NID_UI_EFFECT, System::GetImpl(__Rk) != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + + __position->Set(0.f, 0.f, 0.f); + __target.set(0.f, 0.f, -1.f); + __direction->Set(0.f, 0.f, -1.f); + __halfOpeningAngle = 0.6f; + __fadeOutAngle = 0.1f; + __color.set(1.f, 0.f, 0.f); + __intensity = 1.f; + __enabled = true; + __attenuation = attenuation; + __maxCi = 0.0f; + + UpdateColorI(); + UpdateK1K2(); + } + + /** + * Sets position property + * + * @param [in] position New position + * + * @return void + */ + void SetPosition(const Tizen::Ui::Effects::_Utils::Vec3f& position) + { + __position->Set(position.x, position.y, position.z); + __direction->Set(Math::Vector3f(__target.x - __position->Get().X(), __target.y - __position->Get().Y(), __target.z - __position->Get().Z()).Normalize()); + + return; + } + + /** + * Sets target property + * + * @param [in] target New target + * + * @return void + */ + void SetTarget(const Tizen::Ui::Effects::_Utils::Vec3f& target) + { + __target = target; + __direction->Set(Math::Vector3f(__target.x - __position->Get().X(), __target.y - __position->Get().Y(), __target.z - __position->Get().Z()).Normalize()); + + return; + } + + /** + * Sets opening angle value + * + * @param [in] openingAngle New opening angle + * + * @return void + */ + void SetOpeningAngle(float openingAngle) + { + __halfOpeningAngle = openingAngle * 0.5f; + UpdateK1K2(); + + return; + } + + /** + * Sets fadeout angle value + * + * @param [in] fadeOutAngle New fadeout angle + * + * @return void + */ + void SetFadeOutAngle(float fadeOutAngle) + { + __fadeOutAngle = fadeOutAngle; + UpdateK1K2(); + + return; + } + + /** + * Sets color property + * + * @param [in] color New color value + * + * @return void + */ + void SetColor(const Tizen::Ui::Effects::_Utils::Vec3f& color) + { + __color = color; + UpdateColorI(); + + return; + } + + /** + * Sets intensity property + * + * @param [in] intensity New intensity value + * + * @return void + */ + void SetIntensity(float intensity) + { + __intensity = intensity; + UpdateColorI(); + + return; + } + + /** + * Sets enabled value + * + * @param [in] enabled New enabled value + * + * @return void + */ + void SetEnabled(bool enabled) + { + __enabled = enabled; + + return; + } + + /** + * Gets position property + * + * @return position property + */ + EngineModel::Vector3fPropertyHolderPtr GetPositionHolder(void) const + { + return __position; + } + + /** + * Gets direction vector property + * + * @return direction vector property + */ + EngineModel::Vector3fPropertyHolderPtr GetDirectionHolder(void) const + { + return __direction; + } + + /** + * Gets k1 property + * + * @return k1 property + */ + EngineModel::FloatPropertyHolderPtr GetK1Holder(void) const + { + return __k1; + } + + /** + * Gets k2 property + * + * @return k2 property + */ + EngineModel::FloatPropertyHolderPtr GetK2Holder(void) const + { + return __k2; + } + + /** + * Gets color*intensity value property + * + * @return color*intensity value property + */ + EngineModel::Vector3fPropertyHolderPtr GetColorIHolder(void) const + { + return __colorI; + } + + /** + * Gets enabled value + * + * @return enabled value + */ + bool GetEnabled(void) const + { + return __enabled; + } + + /** + * Gets Rk value holder + * + * @return Rk value holder + */ + EngineModel::FloatPropertyHolderPtr GetRkHolder(void) const + { + return __Rk; + } + + /** + * Does source emitt any light? + * + * @return true if color*intensity = 0 + */ + bool IsBlack(void) const + { + return __maxCi <= std::numeric_limits::epsilon() || __Rk->Get() <= std::numeric_limits::epsilon(); + } + + /** + * Updates precalculated values related to Attenuation + * + * @return void + */ + void UpdateAttenuation(void) + { + UpdateRk(); + } + +private: + + /** + * Hidden copy constructor + */ + SpotLight(const SpotLight &rhs); + + + /** + * Hidden assignment operator + */ + SpotLight& operator=(const SpotLight &rhs); + + /** + * Calculates parameters for shader + * + * @return void + */ + void UpdateK1K2(void) + { + __k1->Set(Math::EffectsCos(__halfOpeningAngle + __fadeOutAngle)); + __k2->Set(1.0f / (Math::EffectsCos(__halfOpeningAngle) - __k1->Get())); + + return; + } + + /** + * Sets colorI property which is premultiplied color x intensity for use in shader. @n + * Also calculates 1 / Rmax, where Rmax is maxim distance light value is >= 1/255 + * + * @return void + */ + void UpdateColorI(void) + { + __colorI->Set(__color.x * __intensity, __color.y * __intensity, __color.z * __intensity); + __maxCi = Math::EffectsAbs(__intensity * Math::EffectsMax(__color.x, Math::EffectsMax(__color.y, __color.z))); + + UpdateRk(); + + return; + } + + /** + * Updates precalculated values related to light emission radius + * + * @return void + */ + void UpdateRk(void) + { + if(__maxCi > std::numeric_limits::epsilon()) + { + __Rk->Set(Math::EffectsSqrt(*__attenuation * (1.0f/255.f) / __maxCi)); + } + } + +private: + Tizen::Ui::Effects::_Utils::Vec3f __target; + float __halfOpeningAngle; + float __fadeOutAngle; + _Utils::Vec3f __color; + float __intensity; + bool __enabled; + float __maxCi; + + EngineModel::Vector3fPropertyHolderPtr __position; + EngineModel::Vector3fPropertyHolderPtr __direction; + EngineModel::FloatPropertyHolderPtr __k1; /**< precalculated parameter = cos(OpeningAngle/2 + FadeOutAngle) */ + EngineModel::FloatPropertyHolderPtr __k2; /**< precalculated parameter = 1 / (cos(OpeningAngle/2) - __k1) */ + EngineModel::Vector3fPropertyHolderPtr __colorI; /**< __color * __intensity */ + EngineModel::FloatPropertyHolderPtr __Rk; + System::FloatPtr __attenuation; +}; // SpotLight + +typedef System::SmartPtr SpotLightPtr; + +} } } } // Tizen::Ui::Effects::_EffectRenderer + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_DIRECTIONALLIGHT_H_ diff --git a/src/ui/effects/inc/FUiEffects_RendererViewport.h b/src/ui/effects/inc/FUiEffects_RendererViewport.h new file mode 100644 index 0000000..82654a3 --- /dev/null +++ b/src/ui/effects/inc/FUiEffects_RendererViewport.h @@ -0,0 +1,77 @@ +// +// 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 FUiEffects_RendererViewport.h + * @brief This is the header file for the Viewport class + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_VIEWPORT_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_VIEWPORT_H_ + +#include +#include "FUiEffects_RendererLog.h" + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer +{ + +/** + * @class Viewport + * @brief This class for scene viewport and coordinates transformations. Currently for orto projection ONLY!!!!!!, Z = 0 + * + */ +struct Viewport +{ + /** + * Transforms window coordinates to model space + * + * @param [in] p point on screen + * + * @return Vec3f Point in model space + */ + Tizen::Ui::Effects::_Utils::Vec3f TransformScreenToWorld(Tizen::Ui::Effects::_Utils::Vec2f p) const + { + if ((fabsf(screenRight - screenLeft) > std::numeric_limits::epsilon()) && (fabsf(screenTop - screenBottom) > std::numeric_limits::epsilon())) + { + return Tizen::Ui::Effects::_Utils::Vec3f((p.x - screenLeft) * (worldRight - worldLeft) / (screenRight - screenLeft) + worldLeft, + p.y * (worldTop - worldBottom) / (screenBottom - screenTop) + worldBottom, + 0.0f); + } + else + { + return Tizen::Ui::Effects::_Utils::Vec3f(0.0f, 0.0f, 0.0f); + } + } + + float screenLeft; + float screenRight; + float screenTop; + float screenBottom; + float worldLeft; + float worldRight; + float worldTop; + float worldBottom; + float worldZ; + float worldNearDist; + float worldFarDist; + + int displayWidth; + int displayHeight; +}; + +} } } } // Tizen::Ui::Effects::_EffectRenderer + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_VIEWPORT_H_ diff --git a/src/ui/effects/inc/FUiEffects_Runtime.h b/src/ui/effects/inc/FUiEffects_Runtime.h new file mode 100644 index 0000000..a262046 --- /dev/null +++ b/src/ui/effects/inc/FUiEffects_Runtime.h @@ -0,0 +1,40 @@ +// +// 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 FUiEffects_Runtime.h +* @brief This is the header file for the Tizen::Ui::Ext::Effects3d::_Runtime namespace. +*/ + +#ifndef _FUI_EFFECTS_INTERNAL_RUNTIME_H_ +#define _FUI_EFFECTS_INTERNAL_RUNTIME_H_ + +#include "FUiEffects_RuntimeEffectModel.h" +#include "FUiEffects_RuntimeEffectModelScript.h" +#include "FUiEffects_RuntimeGraphicalSurface.h" +#include "FUiEffects_RuntimeIEffectModelListener.h" +#include "FUiEffects_RuntimeIEffectModelManager.h" +#include "FUiEffects_RuntimeIEffectModelScript.h" +#include "FUiEffects_RuntimeIScriptProcessing.h" +#include "FUiEffects_RuntimeLuaProcessing.h" +#include "FUiEffects_RuntimeModel.h" +#include "FUiEffects_RuntimeModelSurface.h" +#include "FUiEffects_RuntimeGraphicalSurfaceNurbs.h" +#include "FUiEffects_RuntimePropertyCast.h" +#include "FUiEffects_RuntimeRenderDataSurface.h" +#include "FUiEffects_RuntimeScriptProcessing.h" + +#endif //_FUI_EFFECTS_INTERNAL_RUNTIME_H_ diff --git a/src/ui/effects/inc/FUiEffects_RuntimeDirectionalLight.h b/src/ui/effects/inc/FUiEffects_RuntimeDirectionalLight.h new file mode 100644 index 0000000..41d1f57 --- /dev/null +++ b/src/ui/effects/inc/FUiEffects_RuntimeDirectionalLight.h @@ -0,0 +1,165 @@ +// +// 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 FUiEffects_RuntimeDirectionalLight.h + * @brief This is the header file for a directional light + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RUNTIME_DIRECTIONAL_LIGHT_H_ +#define _FUI_EFFECTS_INTERNAL_RUNTIME_DIRECTIONAL_LIGHT_H_ + +#include +#include +#include "FUiEffects_RuntimeUnitLight.h" + +namespace Tizen { namespace Ui { namespace Effects { namespace _Runtime +{ + +//tolua_begin <--(!do not edit!)the beginning of export part to lua +class DirectionalLight + : public UnitLight +{ +//tolua_end <--(!do not edit!)the ending of export part to lua +public: + + /** + * Returns a pointer to created directional light + * + * @since 2.0 + * + */ + static DirectionalLight* CreateDirectionalLight(const std::string& name); +#if 0 + static DirectionalLight* CreateDirectionalLight(const string& name); //tolua_export <--(!do not edit!)the exporting line to lua +#endif + + /** + * Returns a pointer to created directional light + * + * @since 2.0 + * + */ + static DirectionalLight* CreateDirectionalLight(bool enabled, + const std::string& name, + const Tizen::Ui::Effects::_Utils::Vec3f& colour, + float intensity, + const Tizen::Ui::Effects::_Utils::Vec3f& direction + ); + + /** + * Returns a direction of a directional light + * + * @since 2.0 + * + */ + const Tizen::Ui::Effects::_Utils::Vec3f& GetDirection(void) const; +#if 0 + const Vector3& GetDirection(void) const; //tolua_export <--(!do not edit!)the exporting line to lua +#endif + + /** + * Sets a direction of a directional light + * + * @since 2.0 + * + */ + void SetDirection(const Tizen::Ui::Effects::_Utils::Vec3f& direction); +#if 0 + void SetDirection(const Vector3& direction); //tolua_export <--(!do not edit!)the exporting line to lua +#endif + + /** + * Sets a direction of a directional light + * + * @since 2.0 + * + */ + void SetDirection(float x, float y, float z); //tolua_export <--(!do not edit!)the exporting line to lua + + /** + * Returns a type of a directional light as variable of enumeration type + * + * @since 2.0 + * + */ + virtual TypeUnitLight GetType(void) const; + + /** + * Resets all signs for this instance of class (e.g. isDirectionChanged, isColourChanged) + * + * @since 2.0 + * + */ + virtual void ResetSigns(void); + +protected: + + /** + * Class constructor + * + * @since 2.0 + * + * @remarks Clients of this class can create DirectionalLight objects with using Create methods only + * + */ + DirectionalLight(const std::string& name); + + /** + * Class constructor + * + * @since 2.0 + * + * @remarks Clients of this class can create DirectionalLight objects with using Create methods only + * + */ + DirectionalLight(bool isEnabled, + const std::string& name, + const Tizen::Ui::Effects::_Utils::Vec3f& colour, + float intensity, + const Tizen::Ui::Effects::_Utils::Vec3f& direction + ); + + /** + * Class destructor + * + * @since 2.0 + * + * @remarks Clients of this class can not destroy instances of this class (for purpose to avoid the sending an invalid unit light into scene) + * + */ + ~DirectionalLight(void); + +private: + + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + DirectionalLight(const DirectionalLight& rhs); + // The implementation of this assignment operator is intentionally blank and declared as private to prohibit copying of objects. + DirectionalLight& operator=(const DirectionalLight& rhs); + +public: + + bool isDirectionChanged; + +private: + + Tizen::Ui::Effects::_Utils::Vec3f __direction; /**< a direction for a directional light*/ + +}; //DirectionalLight //tolua_export <--(!do not edit!)the exporting line to lua + +} } } } // Tizen::Ui::Effects::_Runtime + +#endif //_FUI_EFFECTS_INTERNAL_RUNTIME_DIRECTIONAL_LIGHT_H_ diff --git a/src/ui/effects/inc/FUiEffects_RuntimeEffectModel.h b/src/ui/effects/inc/FUiEffects_RuntimeEffectModel.h new file mode 100644 index 0000000..ad3b2f5 --- /dev/null +++ b/src/ui/effects/inc/FUiEffects_RuntimeEffectModel.h @@ -0,0 +1,531 @@ +// +// 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 FUiEffects_RuntimeEffectModel.h + * @brief This is the header file for the EffectModel class. + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RUNTIME_EFFECT_MODEL_H_ +#define _FUI_EFFECTS_INTERNAL_RUNTIME_EFFECT_MODEL_H_ + +#include +#include +#include +#include +#include +#include +#include "FUiEffects_RuntimeIScriptProcessing.h" +#include "FUiEffects_RuntimeScriptProcessing.h" +#include "FUiEffects_RuntimeIEffectModelListener.h" +#include "FUiEffects_RuntimeModel.h" +#include "FUiEffects_RuntimePropertyCast.h" +#include "FUiEffects_RuntimeRenderDataSurface.h" +#include "FUiEffects_RuntimeIEffectModelScript.h" +#include "FUiEffects_RuntimeIEffectModelManager.h" + +namespace Tizen { namespace Ui { namespace Effects { namespace _Runtime +{ + +class GraphicalSurface; +class ModelSurface; +class UnitLight; + +/** +* The map type for pointers to ElementSurface abstract class. +* +*/ +typedef std::map TypeMapElements; + +/** +* The map type for pointers to GraphicalSurface abstract class. +* +*/ +typedef std::map TypeMapGSurface; + +/** +* The list type for pointers to model surfaces. +* +*/ +typedef std::list TypeMSurfacesCollection; + +/** +* The type for denoting the time in model runtime (seconds). +* +*/ +typedef float TypeTimeEffect; + +struct ModelSurfacesCollectionDeleter +{ + void operator()(TypeMSurfacesCollection* pMSurfacesCollection); +}; + +/** + * @class EffectModel + * @brief This class contains the collection of model surfaces, transmits events to relevant classes. + * + * @since 2.0 + * + */ +class EffectModel + : public IEffectModelScript + , public IEffectModelManager +{ +public: + /** + * EffectModel class constructor + * + * @since 2.0 + * + */ + EffectModel(long effectID, const std::string& name, const char* pPathToScript, IEffectModelListener* pEMListener, ::Tizen::Ui::Effects::EffectType effectType, TypeTimeEffect effectDuration); + + /** + * Class destructor + * + * @since 2.0 + * + */ + virtual ~EffectModel(void); + + /** + * Adds a pointer to model surface into model surfaces collection + * + * @since 2.0 + * + * @remarks It is called from parser + */ + void AddModelSurface(ModelSurface* pMSurface); + + /** + * Links classes after creating effect by parser (constructs the elements map and render data collection) + * + * @since 2.0 + * + * @remarks It is called from up level (by parser or effects manager); + * after linking calls script function Initialize + */ + void Construct(void); + + /** + * Calls script function OnEffectStart, prepares effect to starting + * + * @since 2.0 + * + * @remarks For example, script function OnEffectStart fixes cover points for PTE effect + */ + virtual int Start(const EffectsVector& effectStartInfo); + + /** + * Stops effect performing and initializes (if not breakdown) + * + * @since 2.0 + * + * @remarks Sends to up level about effect stop; + * it is called from up level in case of forced stop + */ + virtual void Stop(bool isBreakdown, bool isInterruptedFromApplication); + + /** + * Calculating effect's elements + * + * @since 2.0 + * + * @remarks It is called from up level by timer; + * calls script function OnEffectCalculate + * and after calls function Calculate of all model surfaces, + * and then, if effect is EFFECT_TYPE_INTERACTIVE, + * calls script function IsEffectFinished + */ + virtual void Calculate(float dt); + + virtual long GetId(void) const; + virtual std::string GetName(void) const; + + /** + * Event touch pressed handler + * + * @since 2.0 + * + * @remarks It is called from up level by corresponding event handler, + * transmits event to script + */ + virtual void FeedTouchPressEvent(const TouchEventScript &pos3); + + /** + * Event touch moved handler + * + * @since 2.0 + * + * @remarks It is called from up level by corresponding event handler, + * transmits event to script + */ + virtual void FeedTouchMoveEvent(const TouchEventScript &pos3); + + /** + * Event touch released handler + * + * @since 2.0 + * + * @remarks It is called from up level by corresponding event handler, + * transmits event to script + */ + virtual void FeedTouchReleaseEvent(const TouchEventScript &pos3); + + /** + * Event touch double pressed handler + * + * @since 2.0 + * + * @remarks It is called from up level by corresponding event handler, + * transmits event to script + */ + virtual void FeedTouchDoublePressEvent(const TouchEventScript &pos3); + + /** + * Returns time passed from the effect beginning + * + * @since 2.0 + * + */ + virtual float GetCalculationPeriodForTimer(void) const; + + /** + * Returns current effect state (see enumeration _EffectState) + * + * @since 2.0 + * + */ + virtual _EffectState GetState(void) const; + + /** + * Returns effect behaviour type (see enumeration EffectType) + * + * @since 2.0 + * + */ + virtual EffectType GetType(void) const; + + /** + * Returns the pointer to the collection of structure RenderData elements to up level (to renderer) + * + * @since 2.0 + * + * @remarks The size of this collection is equal to quantity of graphical surfaces; + * this function is called once from up level for renderer + */ + virtual RenderDataScene* GetRenderingData(void) const; + + /** + * Updates all graphical surfaces + * + * @since 2.0 + * + * @remarks It is called for updating graphical points based on physical points + */ + virtual void UpdateGraphicalSurfaces(void); + + /** + * Transmits event SetProperty for boolean values from script to class-inheritor of ElementSurface interface + * + * @since 2.0 + * + * @remarks Function is inherited from IEffectModelScript class + */ + virtual bool ScriptSetProperty(long objID, ElementProperty property, bool value); + + /** + * Transmits event SetProperty for lua_Number values (floating point or integer) + * from script to class-inheritor of ElementSurface interface + * + * @since 2.0 + * + * @remarks Function is inherited from IEffectModelScript class + */ + virtual bool ScriptSetProperty(long objID, ElementProperty property, LUA_NUMBER value); + + /** + * Transmits event SetProperty for Vec3f values from script to class-inheritor of ElementSurface interface + * + * @since 2.0 + * + * @remarks Function is inherited from IEffectModelScript class + */ + virtual bool ScriptSetProperty(long objID, ElementProperty property, const Tizen::Ui::Effects::_Utils::Vec3f &value); + + /** + * Transmits event SetPropertyGroup for some group of elements from script to specified model surface + * + * @since 2.0 + * + */ + virtual bool ScriptSetPropertyGroup(long objID, GroupElements group, ElementProperty property, LUA_NUMBER value); + + /** + * Transmits event GetProperty from script to class-inheritor of ElementSurface interface + * + * @since 2.0 + * + * @remarks Function is inherited from IEffectModelScript class; + * if ID is equals 0, then the owner of property is EffectModel + */ + virtual PropertyCast ScriptGetProperty(long objID, ElementProperty property) const; + + /** + * Transmits event UpdateBitmap from script to up level (to class-inheritor of IEffectModelListener interface) + * + * @since 2.0 + * + * @remarks Function is inherited from IEffectModelScript class + */ + virtual bool ScriptUpdateBitmap(long graphicalSurfaceID, long bitmapID); + + /** + * Transmits event GetNearestGPoint from script to corresponding graphical surface; + * finds the vector of vectors of nearest points to specified point of graphical surface + * + * since 3.0 + * + */ + virtual PropertyCast ScriptGetNearestPointsIds(long graphicalSurfaceID, Tizen::Ui::Effects::_Utils::Vec3f &position) const; + + /** + * Transmits event RotateModelMatrix from script to corresponding graphical surface; + * rotates model matrix of corresponding graphical surface + * + * @since 2.0 + * + */ + virtual bool ScriptRotateSurface(long graphicalSurfaceID, float angle, _Axis axis, _Point point, + float ax, float ay, float az, float x0, float y0, float z0); + + /** + * Transmits event ScaleModelMatrix from script to corresponding graphical surface; + * scales model matrix of corresponding graphical surface + * + * @since 2.0 + * + */ + virtual bool ScriptScaleSurface(long graphicalSurfaceID, float ax, float ay, float az, _Point point, + float x0, float y0, float z0); + + /** + * Transmits event TranslateModelMatrix from script to corresponding graphical surface; + * translates model matrix of corresponding graphical surface + * + * @since 2.0 + * + */ + virtual bool ScriptMoveSurface(long graphicalSurfaceID, float x0, float y0, float z0); + + /** + * Transmits event ResetModelMatrix from script to corresponding graphical surface; + * sets identity model matrix for corresponding graphical surface + * + * @since 2.0 + * + */ + virtual bool ScriptResetSurfaceTransformation(long graphicalSurfaceID); + + /** + * Transmits event DistanceFromGround from script to corresponding model surface + * + * @since 2.0 + * + */ + virtual PropertyCast ScriptGetDistanceFromGround(long modelSurfaceID) const; + + /** + * Transmits event SetModelMatrix from script to corresponding graphical surface; + * sets model matrix for corresponding graphical surface + * + * @since 2.0 + * + */ + virtual bool ScriptSetTransformationMatrix(long graphicalSurfaceID, const Tizen::Ui::Effects::_Utils::LuaMatrix4& luaMatrix4); + + /** + * Adds new unit light to scene + * + * @since 2.0 + * + * @remarks Returns true if addition was succeeded and false otherwise + */ + virtual bool ScriptAddUnitLight(UnitLight& unitLight); + + /** + * Excludes specified unit light from scene with using unique name of it + * + * @since 2.0 + * + * @remarks Returns true if addition was succeeded and false otherwise + */ + virtual bool ScriptRemoveUnitLight(const std::string& name); + + /** + * Excludes all units light of specified type from scene + * + * @since 2.0 + * + * @remarks Returns true if addition was succeeded and false otherwise + */ + virtual bool ScriptRemoveAllUnitsLightType(TypeUnitLight typeUnitLight); + + /** + * Returns specified unit light with using unique name of it + * + * @since 2.0 + * + */ + virtual PropertyCast ScriptGetUnitLight(const std::string& name) const; + + /** + * Sets ambient colour for scene + * + * @since 2.0 + * + */ + virtual void ScriptSetLightAmbientColour(const Tizen::Ui::Effects::_Utils::Vec3f& ambientColour); + + /** + * Sets ambient colour for scene + * + * @since 2.0 + * + */ + virtual void ScriptSetLightAmbientColour(float red, float green, float blue); + + /** + * Sets light intensity for scene + * + * @since 2.0 + * + */ + virtual void ScriptSetLightIntensity(float intensity); + + /** + * Sets attenuation for units light on scene + * + * @since 2.0 + * + */ + virtual void ScriptSetLightAttenuation(float attenuation); + + /** + * Returns ambient colour of scene + * + * @since 2.0 + * + */ + virtual const Tizen::Ui::Effects::_Utils::Vec3f& ScriptGetLightAmbientColour(void) const; + + /** + * Returns light intensity of scene + * + * @since 2.0 + * + */ + virtual float ScriptGetLightIntensity(void) const; + + /** + * Returns attenuation for units light on scene + * + * @since 2.0 + * + */ + virtual float ScriptGetLightAttenuation(void) const; + +protected: + +private: + /** + * Hidden copy constructor + * + * @since 2.0 + * + */ + EffectModel(const EffectModel& rhs); + + /** + * Hidden assignment operator + * + * @since 2.0 + * + */ + EffectModel &operator=(const EffectModel& rhs); + + /** + * Finds an element in elements map by index + * + * @since 2.0 + * + * @remarks If element with specified index not exists, the function returns false + */ + bool FindElement(long objID, TypeMapElements::iterator& it) const; + + /** + * Finds an element in graphical surfaces map by index + * + * @since 2.0 + * + * @remarks If graphical surface with specified index not exists, the function returns false + */ + bool FindGraphicalSurface(long objID, TypeMapGSurface::iterator& it) const; + + /** + * Initializes some class parameters and calls function Initialize from script + * + * @since 2.0 + * + */ + void InitEffectModel(void); + + /** + * Initializes all effect parameters + * + * @since 2.0 + * + * @remarks Effect's initialization after finishing + */ + void EffectInitialize(void); + +private: + + std::unique_ptr __pScript; /**< pointer to script processing (for performing some functions in scripts)*/ + + IEffectModelListener* __pEMListener; /**< pointer to effect model listener (for sending events to up level)*/ + _EffectState __state; /**< current effect state*/ + ::Tizen::Ui::Effects::EffectType __effectType; /**< effect behaviour type*/ + EffectResultS __effectResult; /**< result of effect performing*/ + + std::unique_ptr __pMapElements; /**< elements map (for quick searching the element by index)*/ + std::unique_ptr __pMapGSurface; /**< graphical surfaces map (for quick searching the graphical surface by index and access from effect model instance to graphical surface directly)*/ + + std::unique_ptr __pMSurfacesCollection; /**< model surfaces collection*/ + + const long __effectID; /**< ID of effect (for sending event to up level with ID of effect which generates this event)*/ + const std::string __name; + + TypeTimeEffect __effectTimePassed; /**< elapsed time from effect beginning (in seconds)*/ + TypeTimeEffect __effectDuration; /**< the effect duration (is needed for time based effect) (in seconds)*/ + + std::unique_ptr __pRenderDataScene; /**< a pointer to render data for scene */ + +}; // EffectModel + +} } } } // Tizen::Ui::Effects::_Runtime + +#endif //_FUI_EFFECTS_INTERNAL_RUNTIME_EFFECT_MODEL_H_ diff --git a/src/ui/effects/inc/FUiEffects_RuntimeEffectModelScript.h b/src/ui/effects/inc/FUiEffects_RuntimeEffectModelScript.h new file mode 100644 index 0000000..2928cf9 --- /dev/null +++ b/src/ui/effects/inc/FUiEffects_RuntimeEffectModelScript.h @@ -0,0 +1,429 @@ +// +// 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 FUiEffects_RuntimeEffectModelScript.h + * @brief This is the header file for the EffectModelScript class. + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RUNTIME_EFFECT_MODEL_SCRIPT_H_ +#define _FUI_EFFECTS_INTERNAL_RUNTIME_EFFECT_MODEL_SCRIPT_H_ + +#include "utils/FUiEffects_UtilsLuaMat4.h" +#include "FUiEffects_RuntimeModel.h" +#include "FUiEffects_RuntimeEffectModel.h" +#include "FUiEffects_RuntimePropertyCast.h" + +namespace Tizen { namespace Ui { namespace Effects { namespace _Runtime +{ + +class EffectModel; +class IEffectModelScript; +class UnitLight; + +/** + * @class EffectModelScript + * @brief This class is used by toLua subsystem for binding Lua with EffectModel + * + * @since 2.0 + * + */ + +//tolua_begin <--(!do not edit!)the beginning of export part to lua +class EffectModelScript +{ +//tolua_end <--(!do not edit!)the ending of export part to lua + +public: + /** + * EffectModelScript class constructor + * + * @since 2.0 + * + */ + EffectModelScript(IEffectModelScript* pEModel); + + /** + * EffectModelScript class destructor + * + * @since 2.0 + * + */ + ~EffectModelScript(void); + +//tolua_begin <--(!do not edit!)the beginning of export part to lua + /** + * Returns EffectModel's element's property + * + * @since 2.0 + * + * @remarks Transmits event GetProperty from script functions to up level + * via interface IEffectModelScript + */ + PropertyCast GetProperty(long objID, ElementProperty property) const; + + /** + * Sets EffectModel's element's property of boolean type. + * + * @since 2.0 + * + * @remarks Transmits event SetProperty from script functions to up level + * via interface IEffectModelScript + */ + bool SetProperty(long objID, ElementProperty property, bool value); + + /** + * Sets EffectModel's element's property of lua_Number type (floating point or integer). + * + * @since 2.0 + * + * @remarks Transmits event SetProperty from script functions to up level + * via interface IEffectModelScript + */ + bool SetProperty(long objID, ElementProperty property, LUA_NUMBER value); + + /** + * Sets EffectModel's element's property of Vec3f type. + * + * @since 2.0 + * + * @remarks Transmits event SetProperty from script functions to up level + * via interface IEffectModelScript + */ + //tolua_end <--(!do not edit!)the ending of export part to lua + bool SetProperty(long objID, ElementProperty property, const Tizen::Ui::Effects::_Utils::Vec3f &value); + //tolua_begin <--(!do not edit!)the beginning of export part to lua +#if 0 + bool SetProperty(long objID, ElementProperty property, const Vector3 &value); //for export to lua, should be ignored by c++ compiler +#endif + + /** + * Sets property's value for elements group + * + * @since 2.0 + * + */ + bool SetPropertyGroup(long modelSurfaceID, GroupElements group, ElementProperty property, LUA_NUMBER value); + + /** + * Calculates distance from specified model surface to its ground level + * + * @since 2.0 + * + */ + PropertyCast GetDistanceFromGround(long modelSurfaceID) const; + + /** + * Generates request for bitmap updating. + * + * @since 2.0 + * + * @remarks Transmits event UpdateBitmap from script functions to up level + * via interface IEffectModelScript + */ + bool UpdateBitmap(long graphicalSurfaceID, long bitmapID); + + /** + * Returns a vector of vectors of nearest points ID to specified point of graphical surface + * + * @since 2.0 + * + * @remarks Transmits event GetNearestGPoint from script functions to up level + * via interface IEffectModelScript + */ + //tolua_end <--(!do not edit!)the ending of export part to lua + PropertyCast GetNearestPointsIds(long graphicalSurfaceID, Tizen::Ui::Effects::_Utils::Vec3f &position) const; + //tolua_begin <--(!do not edit!)the beginning of export part to lua +#if 0 + PropertyCast GetNearestPointsIds(long graphicalSurfaceID, Vector3 &position) const; //for export to lua, should be ignored by c++ compiler +#endif + + /** + * Returns a vector of vectors of nearest points ID to specified point of graphical surface + * + * @since 2.0 + * + * @remarks Transmits event GetNearestGPoint from script functions to up level + * via interface IEffectModelScript + */ + PropertyCast GetNearestPointsIds(long graphicalSurfaceID, float posX, float posY, float posZ) const; + + /** + * Rotates model matrix by the Angle around Axis drawn from the Point + * + * @since 2.0 + * + * @return Returns true if model matrix was changed successfully and false otherwise + * @param [in] GraphicalSurfaceID: ID of graphical surface which matrix has to be rotated + * @param [in] Angle: The angle of rotation (radians) + * @param [in] Axis: One of the axes (X, Y, Z, ARBITRARY) around which rotation will be performed + * @param [in] Point: Base point on graphical surface which coordinates are not change + * @param [in] ax, ay, az: The coordinates of axis around which rotation will be performed (in case Axis=AXIS_ARBITRARY) + * @param [in] x0, y0, z0: Base point which coordinates are not change (in case Point=POINT_ARBITRARY) + * + */ + bool RotateSurfaceN(long graphicalSurfaceID, float angle, _Axis axis, _Point point, + float ax = 0.f, float ay = 0.f, float az = 1.f, float x0 = 0.f, float y0 = 0.f, float z0 = 0.f); + + /** + * Rotates model matrix by the Angle around Axis drawn from the Point + * + * @since 2.0 + * + * @return Returns true if model matrix was changed successfully and false otherwise + * @param [in] GraphicalSurfaceID: ID of graphical surface which matrix has to be rotated + * @param [in] Angle: The angle of rotation (radians) + * @param [in] Axis: One of the axes (X, Y, Z, ARBITRARY) around which rotation will be performed + * @param [in] Point: Base point on graphical surface which coordinates are not change + * @param [in] vAxis: The axis as vector around which rotation will be performed (in case Axis=AXIS_ARBITRARY) + * @param [in] vBasePoint0: Base point which coordinates are not change (in case Point=POINT_ARBITRARY) + * + */ + //tolua_end <--(!do not edit!)the ending of export part to lua + bool RotateSurfaceV(long graphicalSurfaceID, float angle, _Axis axis, _Point point, + const Tizen::Ui::Effects::_Utils::Vec3f &axisArbit = Tizen::Ui::Effects::_Utils::Vec3f(0.f, 0.f, 1.f), const Tizen::Ui::Effects::_Utils::Vec3f &basePointArbit = Tizen::Ui::Effects::_Utils::Vec3f(0.f, 0.f, 0.f)); + //tolua_begin <--(!do not edit!)the beginning of export part to lua +#if 0 + bool RotateSurfaceV(long graphicalSurfaceID, float angle, _Axis axis, _Point point, + const Vector3 &axisArbit = Vector3(0.f, 0.f, 1.f), const Vector3 &basePointArbit = Vector3(0.f, 0.f, 0.f)); //for export to lua, should be ignored by c++ compiler +#endif + + /** + * Scales model matrix by the factors ax, ay, az relative to the axes + * + * @since 2.0 + * + * @return Returns true if model matrix was changed successfully and false otherwise + * @param [in] GraphicalSurfaceID: ID of graphical surface which matrix has to be scaled + * @param [in] ax, ay, az: Multipliers for scaling along the axes + * @param [in] Point: Base point on graphical surface which coordinates are not change + * @param [in] x0, y0, z0: Base point which coordinates are not change (in case point=POINT_ARBITRARY) + * + */ + bool ScaleSurface(long graphicalSurfaceID, float ax, float ay, float az, _Point point, + float x0 = 0.f, float y0 = 0.f, float z0 = 0.f); + + /** + * Scales model matrix by the factors encapsulated in vector vMultiplier + * + * @since 2.0 + * + * @return Returns true if model matrix was changed successfully and false otherwise + * @param [in] GraphicalSurfaceID: ID of graphical surface which matrix has to be scaled + * @param [in] vMultiplier: Vector of multipliers for scaling along the axes + * @param [in] Point: Base point on graphical surface which coordinates are not change (the coordinates of this point do not change) + * @param [in] vBasePopint0: Base point which coordinates are not change (if case point=POINT_ARBITRARY) + * + */ + //tolua_end <--(!do not edit!)the ending of export part to lua + bool ScaleSurface(long graphicalSurfaceID, const Tizen::Ui::Effects::_Utils::Vec3f &multipliers, _Point point, + const ::Tizen::Ui::Effects::_Utils::Vec3f &basePoint = Tizen::Ui::Effects::_Utils::Vec3f(0.f, 0.f, 0.f)); + //tolua_begin <--(!do not edit!)the beginning of export part to lua +#if 0 + bool ScaleSurface(long graphicalSurfaceID, const Vector3 &multipliers, _Point point, + const Vector3 &basePoint = Vector3(0.f, 0.f, 0.f)); //for export to lua, should be ignored by c++ compiler +#endif + + /** + * Translates model matrix by values x0, y0 and z0 relative to the axes + * + * @since 2.0 + * + * @return Returns true if model matrix was changed successfully and false otherwise + * @param [in] GraphicalSurfaceID: ID of graphical surface which matrix has to be translated + * @param [in] x0, y0, z0: the coordinates of destination point + * + */ + bool MoveSurface(long graphicalSurfaceID, float x0, float y0, float z0); + + /** + * Translates model matrix by vector vPointTarget + * + * @since 2.0 + * + * @return Returns true if model matrix was changed successfully and false otherwise + * @param [in] GraphicalSurfaceID: ID of graphical surface which matrix has to be translated + * @param [in] vPointTarget: destination point + * + */ + //tolua_end <--(!do not edit!)the ending of export part to lua + bool MoveSurface(long graphicalSurfaceID, const Tizen::Ui::Effects::_Utils::Vec3f &pointTarget); + //tolua_begin <--(!do not edit!)the beginning of export part to lua +#if 0 + bool MoveSurface(long graphicalSurfaceID, const Vector3 &pointTarget); //for export to lua, should be ignored by c++ compiler +#endif + + /** + * Sets identity model matrix + * + * @since 2.0 + * + * @return Returns true if model matrix was changed successfully and false otherwise + */ + bool ResetSurfaceTransformation(long graphicalSurfaceID); + + /** + * Function for redirection of lua print information + * + * @since 2.0 + * + * @remarks Is called from lua function print(...) + */ + static void PrintLuaInfo(const char* pStr); + + /** + * Sets the model matrix for specified graphical surface + * + * @since 2.0 + */ + // tolua_end <--(!do not edit!)the ending of export part to lua + bool SetTransformationMatrix(long graphicalSurfaceID, const Tizen::Ui::Effects::_Utils::LuaMatrix4& luaMatrix4); + // tolua_begin <--(!do not edit!)the beginning of export part to lua +#if 0 + bool SetTransformationMatrix(long graphicalSurfaceID, const LuaMatrix4& luaMatrix4); +#endif + +// tolua_end <--(!do not edit!)the ending of export part to lua + + /** + * Adds new unit light to scene + * + * @since 2.0 + * + * @remarks Returns true if addition was succeeded and false otherwise + */ + bool AddUnitLight(UnitLight& unitLight); //tolua_export + + /** + * Excludes specified unit light from scene with using unique name of it + * + * @since 2.0 + * + * @remarks Returns true if addition was succeeded and false otherwise + */ + bool RemoveUnitLight(const std::string& name); +#if 0 + bool RemoveUnitLight(const string& name); //tolua_export +#endif + + /** + * Excludes all units light of specified type from scene + * + * @since 2.0 + * + * @remarks Returns true if addition was succeeded and false otherwise + */ + bool RemoveAllUnitsLightType(TypeUnitLight typeUnitLight); //tolua_export + + /** + * Returns specified unit light with using unique name of it + * + * @since 2.0 + * + */ + PropertyCast GetUnitLight(const std::string& name) const; +#if 0 + PropertyCast GetUnitLight(const string& name) const; //tolua_export +#endif + + /** + * Sets ambient colour for scene + * + * @since 2.0 + * + */ + void SetLightAmbientColour(const Tizen::Ui::Effects::_Utils::Vec3f& ambientColour); +#if 0 + void SetLightAmbientColour(const Vector3& ambientColour); //tolua_export +#endif + + /** + * Sets ambient colour for scene + * + * @since 2.0 + * + */ + void SetLightAmbientColour(float red, float green, float blue); //tolua_export + + /** + * Sets light intensity for scene + * + * @since 2.0 + * + */ + void SetLightIntensity(float intensity); //tolua_export + + /** + * Sets attenuation for units light on scene + * + * @since 2.0 + * + */ + void SetLightAttenuation(float attenuation); //tolua_export + + /** + * Returns ambient colour of scene + * + * @since 2.0 + * + */ + const Tizen::Ui::Effects::_Utils::Vec3f& GetLightAmbientColour(void) const; +#if 0 + const Vector3& GetLightAmbientColour(void) const; //tolua_export +#endif + + /** + * Returns intensity of units light in a scene (as property of entire scene) + * + * @since 2.0 + * + */ + float GetLightIntensity(void) const; //tolua_export + + /** + * Returns attenuation for units light on scene + * + * @since 2.0 + * + */ + float GetLightAttenuation(void) const; //tolua_export + +private: + /** + * Hidden copy constructor + * + * @since 2.0 + * + */ + EffectModelScript(const EffectModelScript &rhs); + + /** + * Hidden assignment operator + * + * @since 2.0 + * + */ + EffectModelScript &operator=(const EffectModelScript &rhs); + +private: + + IEffectModelScript* __pEModel; /**< pointer to interface IEffectModelScript (for transmitting events from script to up level)*/ + +}; // EffectModelScript //tolua_export <--(!do not edit!)exporting one line to lua + +} } } } // Tizen::Ui::Effects::_Runtime + +#endif //_FUI_EFFECTS_INTERNAL_RUNTIME_EFFECT_MODEL_SCRIPT_H_ diff --git a/src/ui/effects/inc/FUiEffects_RuntimeGraphicalSurface.h b/src/ui/effects/inc/FUiEffects_RuntimeGraphicalSurface.h new file mode 100644 index 0000000..cd21276 --- /dev/null +++ b/src/ui/effects/inc/FUiEffects_RuntimeGraphicalSurface.h @@ -0,0 +1,270 @@ +// +// 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 FUiEffects_RuntimeGraphicalSurface.h + * @brief This is the header file for the GraphicalSurface class. + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RUNTIME_GRAPHICAL_SURFACE_H_ +#define _FUI_EFFECTS_INTERNAL_RUNTIME_GRAPHICAL_SURFACE_H_ + +#include +#include +#include "FUiEffects_RuntimeModelSurface.h" +#include "FUiEffects_RuntimeRenderDataSurface.h" + +namespace Tizen { namespace Ui { namespace Effects { namespace _Runtime +{ + +/** + * @class GraphicalSurface + * @brief This class is an abstract for any graphical surface + * + * @since 2.0 + * + */ +class GraphicalSurface + : public ::Tizen::Ui::Effects::_PhysicsEngine::ElementSurface +{ +public: + /** + * GraphicalSurface class constructor + * + * @since 2.0 + * + */ + GraphicalSurface(long objId, long bitmapID_, float transpar_); + + /** + * GraphicalSurface class destructor + * + * @since 2.0 + * + */ + virtual ~GraphicalSurface(void); + + /** + * Initializes GraphicalSurface's internal parameters and resets accumulated parameters to zero + * + * @since 2.0 + * + * @remarks Function is inherited from ElementSurface interface + */ + virtual void Initialize(void); + + /** + * Updates graphical points based on physical points + * + * @since 2.0 + * + */ + virtual void Update(void) = 0; + + /** + * Constructs render data collection + * + * @since 2.0 + * + */ + virtual void Construct(TypeElemSurfaceCollection* pElemSurfaceCollection, RenderDataSurfaceCollection* pRenderDataSurfaceCollection); + + /** + * Constructs z-coordinate of position + * based on intersection point of the ray (from camera to point with coordinates (position.x, position.y)) with some triangle of the surface + * + * @since 2.0 + * + * @remarks The algorithm consists of several steps: + * 1. Finds triangles from RenderData structure which are crossed by the ray (position.x, position.y) + * 2. Builds planes passing through 3 vertexes triangles which were found on previous step + * 3. Finds z-coordinate of ray with coordinates (position.x, position.y) + * which crosses planes which were built on previous step (for receive maximal z-coordinate) + */ + virtual PropertyCast GetNearestPointsIds(Tizen::Ui::Effects::_Utils::Vec3f &position) const; + + /** + * Returns the ID of current bitmap for this graphical surface + * + * @since 2.0 + * + */ + long GetBitmapId(void) const; + + /** + * Sets the bitmap ID for this graphical surface + * + * @since 2.0 + * + */ + void SetBitmapId(long bitmapID); + + /** + * Provides reading access to GraphicalSurface's properties values from user's scripts + * + * @since 2.0 + * + */ + virtual PropertyCast GetProperty(ElementProperty propName) const; + + /** + * Provides writing access to GraphicalSurface's properties values of + * boolean type from user's scripts + * + * @since 2.0 + * + */ + virtual bool SetProperty(ElementProperty propName, bool PropValue); + + /** + * Provides writing access to GraphicalSurface's properties values of + * lua_Number type (double or float, or integer etc) from user's scripts + * + * @since 2.0 + * + */ + virtual bool SetProperty(ElementProperty propName, LUA_NUMBER propValue); + + /** + * Provides writing access to GraphicalSurface's properties values of + * Vec3f type from user's scripts + * + * @since 2.0 + * + */ + virtual bool SetProperty(ElementProperty propName, const Tizen::Ui::Effects::_Utils::Vec3f &propValue); + + /** + * Rotates model matrix by Angle around Axis or (ax, ay, az) in case Axis=AXIS_ARBITRARY + * + * @since 2.0 + * + * @param [in] Point: Base point for rotation (the coordinates of this point are not changed) + * @param [in] ax, ay, az: The coordinates of axis around which rotation is performed (in case Axis=AXIS_ARBITRARY) + * @param [in] x0, y0, z0: Base point coordinates in case point=POINT_ARBITRARY + */ + virtual bool RotateSurface(float angle, _Axis axis, _Point point, + float ax, float ay, float az, float x0, float y0, float z0) = 0; + + /** + * Scales model matrix by multipliers ax, ay, az on the relevant axes + * with base Point or (x0, y0, z0) in case Point = POINT_ARBITRARY + * + * @since 2.0 + * + * @remarks Note that the base point coordinates do not change + */ + virtual bool ScaleSurface(float ax, float ay, float az, _Point point, + float x0, float y0, float z0) = 0; + + /** + * Translates model matrix to position (x0, y0, z0) + * + * @since 2.0 + * + */ + void MoveSurface(float x0, float y0, float z0); + + /** + * Sets identity model matrix + * + * @since 2.0 + * + */ + void ResetSurfaceTransformation(void); + + /** + * Sets model matrix for this graphical surface + * + * @since 2.0 + * + */ + void SetTransformationMatrix(const Tizen::Ui::Effects::_Utils::LuaMatrix4& luaMatrix4); + +protected: + /** + * Rotates model matrix by Angle around Axis or (ax, ay, az) in case Axis=AXIS_ARBITRARY + * + * @since 2.0 + * + * @remarks Differs from previous function that do not uses variable Point + * (it variable already taken into account in variables x0, y0, z0) + */ + bool RotateSurface(float angle, _Axis axis, + float ax, float ay, float az, float x0, float y0, float z0); + + /** + * Scales model matrix by multipliers ax, ay, az on the relevant axes + * with base point (x0, y0, z0) + * + * @since 2.0 + * + * @remarks Note that the base point coordinates are not changed + */ + bool ScaleSurface(float ax, float ay, float az, float x0, float y0, float z0); + +private: + /** + * Hidden copy constructor + * + * @since 2.0 + * + */ + GraphicalSurface(const GraphicalSurface& rhs); + + /** + * Hidden assignment operator + * + * @since 2.0 + * + */ + GraphicalSurface &operator=(const GraphicalSurface& rhs); + + /** + * Determines whether a point lies inside the triangle with vertexes which are specified by indices + * + * @since 2.0 + * + * @param [in] pos The point Cartesian coordinates + * @param [in] i1, i2, i3 The triangle vertex indices + * (is represented in RenderData::IndicesCollection) + * @return Returns true if point pos lies in the triangle and false otherwise + */ + bool InTriangle(const Tizen::Ui::Effects::_Utils::Vec3f& pos, short i1, short i2, short i3) const; + + /** + * Finds the the z-coordinate of the point pos on + * the plane passing through the points with indices i1, i2, i3 + * + * @since 2.0 + * + */ + float ZInPlane(const Tizen::Ui::Effects::_Utils::Vec3f& pos, short i1, short i2, short i3) const; + +protected: + + std::unique_ptr _pRenderData; /**< pointer to data for rendering (for this concrete surface)*/ + +private: + float __initTransparency; /**< initial value of surface transparency*/ + long __initBitmapID; /**< initial value of bitmap ID*/ + Tizen::Ui::Effects::_Utils::Mat4f __initModelMtr; + +}; // GraphicalSurface + +} } } } // Tizen::Ui::Effects::_Runtime + +#endif //_FUI_EFFECTS_INTERNAL_RUNTIME_GRAPHICAL_SURFACE_H_ diff --git a/src/ui/effects/inc/FUiEffects_RuntimeGraphicalSurfaceNurbs.h b/src/ui/effects/inc/FUiEffects_RuntimeGraphicalSurfaceNurbs.h new file mode 100644 index 0000000..193a059 --- /dev/null +++ b/src/ui/effects/inc/FUiEffects_RuntimeGraphicalSurfaceNurbs.h @@ -0,0 +1,364 @@ +// +// 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 FUiEffects_RuntimeGraphicalSurfaceNurbs.h + * @brief This is the header file for the GraphicalSurfaceNurbs class. + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RUNTIME_GRAPHICAL_SURFACE_NURBS_H_ +#define _FUI_EFFECTS_INTERNAL_RUNTIME_GRAPHICAL_SURFACE_NURBS_H_ + +#include +#include "FUiEffects_RuntimeGraphicalSurface.h" + +namespace Tizen { namespace Ui { namespace Effects { namespace _Runtime +{ + +/** +* Weight assignment for every control point of NURBS +* +* @since 2.0 +* +*/ +struct _DataPointWeight +{ + float weight; /**< the weight of control point (physical point of effect model) in NURBS algorithm (influence of it on corresponding graphical point) */ + const Tizen::Ui::Effects::_Utils::Vec3f* pPoint; /**< the pointer to physical point (control point in accordance NURBS theory)*/ +}; + +/** +* The vector type for storing knots for NURBS algorithm. +* +* @since 2.0 +* +*/ +typedef std::vector TypeKnots; + +/** +* The vector type for storing PointSurfaceNURBS pointers. +* +* @since 2.0 +* +*/ +typedef std::vector TypePSurfaceNURBSCollection; + +/** +* The vector type for storing NURBS coefficients. +* +* @since 2.0 +* +*/ +typedef std::vector<_DataPointWeight> TypeNURBSCoeffsCollection; + +/** +* The vector type for storing a coordinates of graphical surface corners (as rectangle). +* +* @since 2.0 +* +*/ +typedef std::vector TypeCornerGrapSurPointsCollection; + +/** +* The vector type for storing a coordinates of "physical" surface corners (as rectangle). +* +* @since 2.0 +* +*/ +typedef std::vector TypeCornerPhysSurPointsCollection; + +/** +* The type for storing vector of vectors of ID (is needed for finding nearest points algorithm). +* +* @since 2.0 +* +*/ +typedef EffectsVector > TypeNearestPointsCollection; + +/** + * @class GraphicalSurfaceNurbs + * @brief This class specifies graphical surface as mesh of Graphical Points, + * which are controlled by NURBS algorithm + * + * @since 2.0 + * + */ +class GraphicalSurfaceNurbs + : public GraphicalSurface +{ +public: + /** + * GraphicalSurfaceNurbs class constructor + * + * @since 2.0 + * + */ + GraphicalSurfaceNurbs(long objID, + long bitmapID_, + int dimCtrlX_, + int dimCtrlY_, + int orderX_, + int orderY_, + int dimGraphX_, + int dimGraphY_, + std::unique_ptr pKnotsX_, + std::unique_ptr pKnotsY_, + float transparency_); + + /** + * GraphicalSurfaceNurbs class destructor + * + * @since 2.0 + * + */ + virtual ~GraphicalSurfaceNurbs(void); + + /** + * Empty function for this class (should be implemented because it is abstract in base class) + * + * @since 2.0 + * + */ + virtual void Calculate(float timeStep); + + /** + * Provides reading access to GraphicalSurfaceNurbs's properties values from user's scripts + * + * @since 2.0 + * + */ + virtual PropertyCast GetProperty(ElementProperty propName) const; + + /** + * Provides writing access to GraphicalSurfaceNurbs's properties values of + * boolean type from user's scripts + * + * @since 2.0 + * + */ + virtual bool SetProperty(ElementProperty propName, bool propValue); + + /** + * Provides writing access to GraphicalSurfaceNurbs's properties values of + * lua_Number type (floating point or integer) from user's scripts + * + * @since 2.0 + * + */ + virtual bool SetProperty(ElementProperty propName, LUA_NUMBER propValue); + + /** + * Provides writing access to GraphicalSurfaceNurbs's properties values of + * Vec3f type from user's scripts + * + * @since 2.0 + * + */ + virtual bool SetProperty(ElementProperty propName, const Tizen::Ui::Effects::_Utils::Vec3f &propValue); + + /** + * Initializes GraphicalSurfaceNurbs's internal parameters and resets accumulated parameters to zero + * + * @since 2.0 + * + */ + virtual void Initialize(void); + + /** + * Synchronizes the render data (vertexes and normals) and physical (PointSurfaceNURBS) points; + * recalculates the normals for vertexes + * + * @since 2.0 + * + * @remarks Must be called after CalcIndices and CalcNURBSCoeffs functions + */ + virtual void Update(void); + + /** + * It is performed after building objects for creating links between them; prepares class instance to work + * + * @since 2.0 + * + * @remarks Specifies connections with pointSurfaceNURBS objects, + * performs indexes, NURBS coefficients, texture coordinates calculation, + * constructs render data collection + */ + virtual void Construct(TypeElemSurfaceCollection* pElemSurfaceCollection, RenderDataSurfaceCollection* pRenderDataSurfaceCollection); + + /** + * Gets object's type + * + * @since 2.0 + * + */ + virtual ESurface GetType(void) const; + + /** + * Returns the vector of vectors of nearest points to specified point of graphical surface + * + * @since 2.0 + * + */ + virtual PropertyCast GetNearestPointsIds(Tizen::Ui::Effects::_Utils::Vec3f &position) const; + + /** + * Rotates model matrix by Angle around Axis or (ax, ay, az) in case Axis=AXIS_ARBITRARY + * + * @since 2.0 + * + * @param [in] Point: Base point for rotation (the coordinates of this point are not changed) + * @param [in] ax, ay, az: The coordinates of axis around which rotation is performed (in case Axis=AXIS_ARBITRARY) + * @param [in] x0, y0, z0: Base point coordinates in case point=POINT_ARBITRARY + */ + virtual bool RotateSurface(float angle, _Axis axis, _Point point, + float ax, float ay, float az, float x0, float y0, float z0); + + /** + * Scales model matrix by multipliers ax, ay, az on the relevant axes + * with base Point or (x0, y0, z0) in case Point = POINT_ARBITRARY + * + * @since 2.0 + * + * @remarks Note that the base point coordinates do not change + */ + virtual bool ScaleSurface(float ax, float ay, float az, _Point point, + float x0, float y0, float z0); + +protected: + +private: + /** + * Hidden copy constructor + * + * @since 2.0 + * + */ + GraphicalSurfaceNurbs(const GraphicalSurfaceNurbs& rhs); + + /** + * Hidden assignment operator + * + * @since 2.0 + * + */ + GraphicalSurfaceNurbs &operator=(const GraphicalSurfaceNurbs& rhs); + + /** + * Basis function of rational B-spline (NURBS) to the relevant direction + * + * @since 2.0 + * + */ + float NurbsSingleBasisFunction(long i, long order, float u, const TypeKnots& knots) const; + + /** + * Denominator in formula for NURBS coefficients calculation (see NURBS theory) + * + * @since 2.0 + * + */ + float SummaryForNurbs(float u, float w) const; + + /** + * NURBS coefficients calculation + * + * @since 2.0 + * + * @remarks Is performed once in construct function + */ + void CalculationNurbsCoefficients(void); + + /** + * Applying the threshold to NURBS coefficients: + * if the absolute value of some coefficient less or equals to threshold, + * then this coefficient is not involved in calculation (is needed for optimization) + * + * @since 2.0 + * + * @remarks Is performed once in construct function after calculation NURBS coefficients + */ + void WeightsApplyThreshold(float threshold); + + /** + * Calculation of triangle indices (is needed for rendering surface) + * + * @since 2.0 + * + * @remarks Is performed once in construct function + */ + void CalcIndices(void); + + /** + * Calculations of normals for vertexes (is needed for surface lighting) + * + * @since 2.0 + * + * @remarks Is performed in update function after points position recalculation + */ + void CalcNormals(void); + + /** + * Calculations of textures coordinates (is needed for surface lighting) + * + * @since 2.0 + * + * @remarks Is performed once in construct function after update + */ + void CalcTexCoords(void); + + /** + * Calculates the point pointOnModel base on value of _Point enumeration. + * + * @since 2.0 + * + * @remarks If _Point is POINT_ARBITRARY then PointOnModel = (x0, y0, z0) + */ + bool DefinePointOnModel(_Point point, Tizen::Ui::Effects::_Utils::Vec3f &pointOnModel, + float x0, float y0, float z0) const; + +private: + int __dimGraphX; /**< number of graphical points on X-direction*/ + int __dimGraphY; /**< number of graphical points on Y-direction*/ + + int __dimCtrlX; /**< number of control points on X-direction*/ + int __dimCtrlY; /**< number of control points on Y-direction*/ + + int __orderX; /**< surface order on X-direction*/ + int __orderY; /**< surface order on Y-direction*/ + + //pointers to knots vectors (see NURBS theory) + //the size of these vectors is equal to the sum of order and control points quantity for corresponding direction + std::unique_ptr __pKnotsX; + std::unique_ptr __pKnotsY; + + std::unique_ptr __pNURBSCoeffsCollection; /**< collection of NURBS coefficients (see NURBS theory) */ + + std::unique_ptr __pPSurfaceNURBSCollection; /**< pointers collection on control points (PointSurfaceNURBS objects) */ + + std::unique_ptr __pCornerPointsGraphSurface; /**< pointers to four corner points of graphical surface */ + std::unique_ptr __pCornerPointsPhysicalSurface; /**< pointers to four corner points of "physical" surface */ + + //pointers collection for returning into scripts; + //[0][0] is a nearest point to specified point, + //[1][...] -- first zone, + //[2][...] -- second zone, etc. + std::unique_ptr __pNearestPointsCollection; + +}; // GraphicalSurfaceNurbs + +} } } } // Tizen::Ui::Effects::_Runtime + +#endif //_FUI_EFFECTS_INTERNAL_RUNTIME_GRAPHICAL_SURFACE_NURBS_H_ diff --git a/src/ui/effects/inc/FUiEffects_RuntimeIEffectModelListener.h b/src/ui/effects/inc/FUiEffects_RuntimeIEffectModelListener.h new file mode 100644 index 0000000..a995f28 --- /dev/null +++ b/src/ui/effects/inc/FUiEffects_RuntimeIEffectModelListener.h @@ -0,0 +1,81 @@ +// +// 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 FUiEffects_RuntimeIEffectModelListener.h + * @brief This is the header file for the IEffectModelListener class. + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RUNTIME_IEFFECT_MODEL_LISTENER_H_ +#define _FUI_EFFECTS_INTERNAL_RUNTIME_IEFFECT_MODEL_LISTENER_H_ + +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Runtime +{ + +/** + * @class IEffectModelListener + * @brief This class is an interface between EffectModel and _EffectImpl + * for handling EffectModel events by _EffectImpl + * + * @since 2.0 + * + */ +class IEffectModelListener +{ +public: + /** + * Class destructor + * + * @since 2.0 + * + */ + virtual ~IEffectModelListener(void) + { + } + + /** + * Informs effect impl about effect model started + * + * @since 2.0 + * + */ + virtual void OnEffectStarted(void) = 0; + + /** + * Informs effect impl about effect model finished and it's results + * + * @since 2.0 + * + */ + virtual void OnEffectFinished(Tizen::Ui::Effects::EffectResult result, const LastShownBitmapIdCollection& bitmapTargetId) = 0; + + /** + * Request to effect impl for bitmap resource updating + * + * @since 2.0 + * + * @return bool true on success and false otherwise + */ + virtual bool OnBitmapRequested(long bitmapId) = 0; + +}; // IEffectModelListener + +} } } } // Tizen::Ui::Effects::_Runtime + +#endif //_FUI_EFFECTS_INTERNAL_RUNTIME_IEFFECT_MODEL_LISTENER_H_ diff --git a/src/ui/effects/inc/FUiEffects_RuntimeIEffectModelManager.h b/src/ui/effects/inc/FUiEffects_RuntimeIEffectModelManager.h new file mode 100644 index 0000000..1f4540d --- /dev/null +++ b/src/ui/effects/inc/FUiEffects_RuntimeIEffectModelManager.h @@ -0,0 +1,162 @@ +// +// 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 FUiEffects_RuntimeIEffectModelManager.h + * @brief This is the header file for the IEffectModelManager class. + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RUNTIME_IEFFECT_MODEL_MANAGER_H_ +#define _FUI_EFFECTS_INTERNAL_RUNTIME_IEFFECT_MODEL_MANAGER_H_ + +namespace Tizen { namespace Ui { namespace Effects { namespace _Runtime +{ + +class RenderDataScene; + +/** + * @class IEffectModelManager + * @brief This class is an interface between EffectModel and _EffectImpl + * for handling _EffectImpl events by EffectModel + * + * @since 2.0 + */ +class IEffectModelManager +{ +public: + /** + * Virtual interface destructor + * + * @since 2.0 + * + */ + virtual ~IEffectModelManager(void) + { + } + + /** + * Calls script function OnEffectStart, preparing effect to starting + * + * @since 2.0 + * + */ + virtual int Start(const EffectsVector& effectStartInfo) = 0; + + /** + * Stops effect performing and initializes it + * + * @since 2.0 + * + */ + virtual void Stop(bool isBreakdown, bool isInterruptedFromApplication) = 0; + + /** + * Calculates effect + * + * @since 2.0 + * + */ + virtual void Calculate(float dt) = 0; + + /** + * Event touch pressed handler + * + * @since 2.0 + * + * @remarks It is called from up level from corresponding event handler + */ + virtual void FeedTouchPressEvent(const TouchEventScript &pos3) = 0; + + /** + * Event touch moved handler + * + * @since 2.0 + * + * @remarks It is called from up level from corresponding event handler, + */ + virtual void FeedTouchMoveEvent(const TouchEventScript &pos3) = 0; + + /** + * Event touch released handler + * + * @since 2.0 + * + * @remarks It is called from up level from corresponding event handler, + */ + virtual void FeedTouchReleaseEvent(const TouchEventScript &pos3) = 0; + + /** + * Event touch double pressed handler + * + * @since 2.0 + * + * @remarks It is called from up level from corresponding event handler, + */ + virtual void FeedTouchDoublePressEvent(const TouchEventScript &pos3) = 0; + + /** + * Returns time passed from the effect beginning + * + * @since 2.0 + * + */ + virtual float GetCalculationPeriodForTimer(void) const = 0; + + /** + * Returns current effect state (see enumeration _EffectState) + * + * @since 2.0 + * + */ + virtual _EffectState GetState(void) const = 0; + + /** + * Returns effect behaviour type (see enumeration EffectType) + * + * @since 2.0 + * + */ + virtual EffectType GetType(void) const = 0; + + /** + * Returns the pointer to collection of structure RenderData elements + * to up level (to renderer) + * + * @since 2.0 + * + * @remarks The size of this collection is equal to quantity of graphical surfaces; + * this function is called once from up level for renderer + */ + virtual RenderDataScene* GetRenderingData(void) const = 0; + + /** + * Updates all graphical surfaces + * + * @since 2.0 + * + * @remarks It is called by renderer timer + * for updating graphical points + */ + virtual void UpdateGraphicalSurfaces(void) = 0; + + virtual long GetId(void) const = 0; + virtual std::string GetName(void) const = 0; + +}; // IEffectModelManager + +} } } } // Tizen::Ui::Effects::_Runtime + +#endif //_FUI_EFFECTS_INTERNAL_RUNTIME_IEFFECT_MODEL_MANAGER_H_ diff --git a/src/ui/effects/inc/FUiEffects_RuntimeIEffectModelScript.h b/src/ui/effects/inc/FUiEffects_RuntimeIEffectModelScript.h new file mode 100644 index 0000000..b9c86a1 --- /dev/null +++ b/src/ui/effects/inc/FUiEffects_RuntimeIEffectModelScript.h @@ -0,0 +1,260 @@ +// +// 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 FUiEffects_RuntimeIEffectModelScript.h + * @brief This is the header file for the IEffectModelScript class. + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RUNTIME_IEFFECT_MODEL_SCRIPT_H_ +#define _FUI_EFFECTS_INTERNAL_RUNTIME_IEFFECT_MODEL_SCRIPT_H_ + +#include "utils/FUiEffects_Utils.h" + +namespace _Utils { template class LuaMat4; } + +namespace Tizen { namespace Ui { namespace Effects { namespace _Runtime +{ + +class UnitLight; + +/** + * @class IEffectModelScript + * @brief This class is an interface between ScriptProcessing and EffectModel – + * API for EffectModel access from user's scripts + * + * @since 2.0 + * + */ +class IEffectModelScript +{ + +public: + /** + * Class destructor + * + * @since 2.0 + * + */ + virtual ~IEffectModelScript(void) + { + } + + /** + * Called by ScriptProcessing to modify the element's property of boolean type + * + * @since 2.0 + * + */ + virtual bool ScriptSetProperty(long objID, ElementProperty property, bool value) = 0; + + /** + * Called by ScriptProcessing to modify the element's property of lua_Number type + * (floating point or integer) + * + * @since 2.0 + * + */ + virtual bool ScriptSetProperty(long objID, ElementProperty property, LUA_NUMBER value) = 0; + + /** + * Called by ScriptProcessing to modify the element's property of Vec3f type + * + * @since 2.0 + * + */ + virtual bool ScriptSetProperty(long objID, ElementProperty property, const Tizen::Ui::Effects::_Utils::Vec3f &value) = 0; + + /** + * Called by ScriptProcessing to modify some group of elements + * for specified model surface + * + * @since 2.0 + * + */ + virtual bool ScriptSetPropertyGroup(long modelSurfaceID, GroupElements group, ElementProperty property, LUA_NUMBER value) = 0; + + /** + * Called by ScriptProcessing to get distance from ground for model surface + * + * @since 2.0 + * + */ + virtual PropertyCast ScriptGetDistanceFromGround(long modelSurfaceID) const = 0; + + /** + * Called by ScriptProcessing to get the element's property of any type, + * specified in class PropertyCast + * + * @since 2.0 + * + */ + virtual PropertyCast ScriptGetProperty(long objID, ElementProperty property) const = 0; + + /** + * Called by ScriptProcessing to modify bitmap resource + * + * @since 2.0 + * + */ + virtual bool ScriptUpdateBitmap(long graphicalSurfaceID, long bitmapID) = 0; + + /** + * Called by ScriptProcessing to get the IDs of vector of vectors of nearest points for specified GraphicalSurface + * + * @since 2.0 + * + */ + virtual PropertyCast ScriptGetNearestPointsIds(long graphicalSurfaceID, Tizen::Ui::Effects::_Utils::Vec3f &position) const = 0; + + /** + * Called by ScriptProcessing to modify model matrix (rotation) + * + * @since 2.0 + * + */ + virtual bool ScriptRotateSurface(long graphicalSurfaceID, float angle, _Axis axis, _Point point, + float ax, float ay, float az, float x0, float y0, float z0) = 0; + + /** + * Called by ScriptProcessing to modify model matrix (scaling) + * + * @since 2.0 + * + */ + virtual bool ScriptScaleSurface(long graphicalSurfaceID, float ax, float ay, float az, _Point point, + float x0, float y0, float z0) = 0; + + /** + * Called by ScriptProcessing to modify model matrix (translating) + * + * @since 2.0 + * + */ + virtual bool ScriptMoveSurface(long graphicalSurfaceID, float x0, float y0, float z0) = 0; + + /** + * Called by ScriptProcessing to modify model matrix (sets identity matrix) + * + * @since 2.0 + * + */ + virtual bool ScriptResetSurfaceTransformation(long graphicalSurfaceID) = 0; + + /** + * Called by ScriptProcessing to modify model matrix + * + * @since 2.0 + * + */ + virtual bool ScriptSetTransformationMatrix(long graphicalSurfaceID, const Tizen::Ui::Effects::_Utils::LuaMatrix4& luaMatrix4) = 0; + + /** + * Adds new unit light to scene + * + * @since 2.0 + * + * @remarks Returns true if addition was succeeded and false otherwise + */ + virtual bool ScriptAddUnitLight(UnitLight& unitLight) = 0; + + /** + * Excludes specified unit light from scene with using unique name of it + * + * @since 2.0 + * + * @remarks Returns true if addition was succeeded and false otherwise + */ + virtual bool ScriptRemoveUnitLight(const std::string& name) = 0; + + /** + * Excludes all units light of specified type from scene + * + * @since 2.0 + * + * @remarks Returns true if addition was succeeded and false otherwise + */ + virtual bool ScriptRemoveAllUnitsLightType(TypeUnitLight typeUnitLight) = 0; + + /** + * Returns specified unit light with using unique name of it + * + * @since 2.0 + * + */ + virtual PropertyCast ScriptGetUnitLight(const std::string& name) const = 0; + + /** + * Sets ambient colour for scene + * + * @since 2.0 + * + */ + virtual void ScriptSetLightAmbientColour(const Tizen::Ui::Effects::_Utils::Vec3f& ambientColour) = 0; + + /** + * Sets ambient colour for scene + * + * @since 2.0 + * + */ + virtual void ScriptSetLightAmbientColour(float red, float green, float blue) = 0; + + /** + * Sets light intensity for scene + * + * @since 2.0 + * + */ + virtual void ScriptSetLightIntensity(float intensity) = 0; + + /** + * Sets attenuation for units light on scene + * + * @since 2.0 + * + */ + virtual void ScriptSetLightAttenuation(float attenuation) = 0; + + /** + * Returns ambient colour of scene + * + * @since 2.0 + * + */ + virtual const Tizen::Ui::Effects::_Utils::Vec3f& ScriptGetLightAmbientColour(void) const = 0; + + /** + * Returns light intensity of scene + * + * @since 2.0 + * + */ + virtual float ScriptGetLightIntensity(void) const = 0; + + /** + * Returns attenuation for units light on scene + * + * @since 2.0 + * + */ + virtual float ScriptGetLightAttenuation(void) const = 0; + +}; // IEffectModelScript + +} } } } // Tizen::Ui::Effects::_Runtime + +#endif //_FUI_EFFECTS_INTERNAL_RUNTIME_IEFFECT_MODEL_SCRIPT_H_ diff --git a/src/ui/effects/inc/FUiEffects_RuntimeIScriptProcessing.h b/src/ui/effects/inc/FUiEffects_RuntimeIScriptProcessing.h new file mode 100644 index 0000000..4f35c06 --- /dev/null +++ b/src/ui/effects/inc/FUiEffects_RuntimeIScriptProcessing.h @@ -0,0 +1,124 @@ +// +// 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 FUiEffects_RuntimeIScriptProcessing.h + * @brief This is the header file for the IScriptProcessing class. + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RUNTIME_ISCRIPT_PROCESSING_H_ +#define _FUI_EFFECTS_INTERNAL_RUNTIME_ISCRIPT_PROCESSING_H_ + +#include +#include +#include "FUiEffects_RuntimeModel.h" + +namespace Tizen { namespace Ui { namespace Effects { namespace _Runtime +{ + +/** + * @class IScriptProcessing + * @brief This class is an interface between EffectModel and ScriptProcessing module - + * for calling script functions by EffectModel + * + * @since 2.0 + * + */ +class IScriptProcessing +{ + +public: + /** + * Class destructor + * + * @since 2.0 + * + * @remarks In case if in the future be needed do the memory allocation of + * class-inheritor under the pointer to base class (memory leak prevention) + */ + virtual ~IScriptProcessing(void) + { + } + + /** + * Calls Initialize script function for Initialize event handling + * + * @since 2.0 + * + */ + virtual bool Initialize(void) = 0; + + /** + * Calls OnEffectStart script function for OnEffectStart event handling + * + * @since 2.0 + * + */ + virtual bool OnEffectStart(const EffectsVector& effectStartInfo) = 0; + + /** + * Calls OnEffectCalculate script function for OnEffectCalculate event handling + * + * @since 2.0 + * + */ + virtual bool OnEffectCalculate(float dt) = 0; + + /** + * Calls OnTouchPressed script function for OnTouchPressed event handling + * + * @since 2.0 + * + */ + virtual bool OnTouchPressed(const TouchEventScript &position) = 0; + + /** + * Calls OnTouchDoublePressed script function for OnTouchDoublePressed event handling + * + * @since 2.0 + * + */ + virtual bool OnTouchDoublePressed(const TouchEventScript &position) = 0; + + /** + * Calls OnTouchMoved script function for OnTouchMoved event handling + * + * @since 2.0 + * + */ + virtual bool OnTouchMoved(const TouchEventScript &position) = 0; + + /** + * Calls OnTouchReleased script function for OnTouchReleased event handling + * + * @since 2.0 + * + */ + virtual bool OnTouchReleased(const TouchEventScript &position) = 0; + + /** + * Calls IsEffectFinished script function for IsEffectFinished event handling + * + * @since 2.0 + * + */ + virtual ::Tizen::Ui::Effects::_Runtime::EffectResultS IsEffectFinished(void) = 0; + +}; // IScriptProcessing + +} } } } // Tizen::Ui::Effects::_Runtime + +#endif //_FUI_EFFECTS_INTERNAL_RUNTIME_ISCRIPT_PROCESSING_H_ diff --git a/src/ui/effects/inc/FUiEffects_RuntimeLuaProcessing.h b/src/ui/effects/inc/FUiEffects_RuntimeLuaProcessing.h new file mode 100644 index 0000000..cd366be --- /dev/null +++ b/src/ui/effects/inc/FUiEffects_RuntimeLuaProcessing.h @@ -0,0 +1,215 @@ +// +// 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 FUiEffects_RuntimeLuaProcessing.h + * @brief This is the header file for the LuaProcessing class. + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RUNTIME_LUA_PROCESSING_H_ +#define _FUI_EFFECTS_INTERNAL_RUNTIME_LUA_PROCESSING_H_ + +#include +#include +#include +#include +#include +#include +#include "FUiEffects_RuntimeIScriptProcessing.h" +#include "FUiEffects_RuntimeModel.h" +#include "FUiEffects_RuntimeEffectModelScript.h" +#include "FUiEffects_RuntimeIEffectModelScript.h" + +namespace Tizen { namespace Ui { namespace Effects { namespace _Runtime +{ + +struct LuaClose +{ + void operator()(lua_State* pLua) const + { + lua_close(pLua); + } +}; + +class EffectModel; +class EffectModelScript; + +/** + * @class LuaProcessing + * @brief This class executes relevant lua script functions + * + * @since 2.0 + * + */ +class LuaProcessing + : public IScriptProcessing +{ + +public: + /** + * LuaProcessing default class constructor + * + * @since 2.0 + * + */ + LuaProcessing(void); + + /** + * LuaProcessing class constructor + * + * @since 2.0 + * + */ + LuaProcessing(const char* pPathToScript, IEffectModelScript* pEModel); + + /** + * LuaProcessing class destructor + * + * @since 2.0 + * + */ + virtual ~LuaProcessing(void); + + /** + * Calls OnEffectStart function from script + * + * @since 2.0 + * + * @remarks Function is inherited from IScriptProcessing interface; + * if script function performs successfully (with no errors), + * the function returns true, otherwise returns false + */ + virtual bool OnEffectStart(const EffectsVector& effectStartInfo); + + /** + * Calls OnEffectCalculate function from script + * + * @since 2.0 + * + * @remarks Function is inherited from IScriptProcessing interface; + * if script function performs successfully (with no errors), + * the function returns true, otherwise returns false + */ + virtual bool OnEffectCalculate(float dt); + + /** + * Calls OnTouchPressed function from script for handling touch pressed event + * + * @since 2.0 + * + * @remarks Function is inherited from IScriptProcessing interface; + * if script function performs successfully (with no errors), + * the function returns true, otherwise returns false + */ + virtual bool OnTouchPressed(const TouchEventScript& position); + + /** + * Calls OnTouchDoublePressed function from script for handling touch double pressed event + * + * @since 2.0 + * + * @remarks Function is inherited from IScriptProcessing interface; + * if script function performs successfully (with no errors), + * the function returns true, otherwise returns false + */ + virtual bool OnTouchDoublePressed(const TouchEventScript& position); + + /** + * Calls OnTouchMoved function from script for handling touch moved event + * + * @since 2.0 + * + * @remarks Function is inherited from IScriptProcessing interface; + * if script function performs successfully (with no errors), + * the function returns true, otherwise returns false + */ + virtual bool OnTouchMoved(const TouchEventScript& position); + + /** + * Calls OnTouchReleased function from script for handling touch released event + * + * @since 2.0 + * + * @remarks Function is inherited from IScriptProcessing interface; + * if script function performs successfully (with no errors), + * the function returns true, otherwise returns false + */ + virtual bool OnTouchReleased(const TouchEventScript& position); + + /** + * Calls IsEffectFinished function from script + * + * @since 2.0 + * + */ + virtual ::Tizen::Ui::Effects::_Runtime::EffectResultS IsEffectFinished(void); + + /** + * Calls Initialize function from script + * + * @since 2.0 + * + * @remarks Function is inherited from IScriptProcessing interface; + * if script function performs successfully (with no errors), + * the function returns true, otherwise returns false + */ + virtual bool Initialize(void); + +private: + /** + * Hidden copy constructor + * + * @since 2.0 + * + */ + LuaProcessing(const LuaProcessing& rhs); + + /** + * Hidden assignment operator + * + * @since 2.0 + * + */ + LuaProcessing &operator=(const LuaProcessing& rhs); + + /** + * Auxiliary function for calling touch events handling script functions + * + * @since 2.0 + * + */ + bool OnTouchEvent(const char* pFunName, const TouchEventScript& position); + + /** + * Function for calling lua script function + * + * @since 2.0 + * + */ + static int CallFunction(const char* pFunctionName, int argsCount, int resultsCount, lua_State* pLua); + +private: + + std::unique_ptr __pLua; /**< pointer to structure that keeps the whole state of a Lua interpreter*/ + std::unique_ptr __pEMScript; /**< pointer to instance of class EffectModelScript (for calling C++ functions from scripts)*/ + + static const char* __pStringLua; /**< contains a simple lua code for transmitting to lua-global variable the pointer to EffectModelScript (performs once in constructor)*/ + +}; // LuaProcessing + +} } } } // Tizen::Ui::Effects::_Runtime + +#endif //_FUI_EFFECTS_INTERNAL_RUNTIME_LUA_PROCESSING_H_ diff --git a/src/ui/effects/inc/FUiEffects_RuntimeModel.h b/src/ui/effects/inc/FUiEffects_RuntimeModel.h new file mode 100644 index 0000000..f082791 --- /dev/null +++ b/src/ui/effects/inc/FUiEffects_RuntimeModel.h @@ -0,0 +1,273 @@ +// +// 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 FUiEffects_RuntimeModel.h + * @brief This file contains the basic enumerations and structures for working with model + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RUNTIME_MODEL_H_ +#define _FUI_EFFECTS_INTERNAL_RUNTIME_MODEL_H_ + +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Runtime +{ + +const float EFFECT_EPSILONF = std::numeric_limits::epsilon(); + +//tolua_begin <--(!do not edit!)the beginning of export part to lua + +enum TypeUnitLight +{ + TYPE_UNIT_LIGHT_POINT, + TYPE_UNIT_LIGHT_SPOT, + TYPE_UNIT_LIGHT_DIRECTIONAL +}; + +/** +* @enum _EffectResult +* +* Defines possible options of Effect finishing +* @since 2.0 +*/ +enum _EffectResult +{ + EFFECT_CONTINUED = 1, // Effect continued + EFFECT_FINISHED // Effect finished +}; //_EffectResult + +/** +* @enum ElementProperty +* +* For access to Effect's objects property (read, write) from scripts +* @since 2.0 +* +*/ +enum ElementProperty +{ + //PointSurface property: + B_IS_FIXED, /**< Boolean property is involved into physics calculation*/ + N_POS_X, /**< Numeric property: the X coordinate of point*/ + N_POS_Y, /**< Numeric property: the Y coordinate of point*/ + N_POS_Z, /**< Numeric property: the Z coordinate of point*/ + N_POS_X_INIT, /**< Numeric property: the initial X coordinate of point*/ + N_POS_Y_INIT, /**< Numeric property: the initial Y coordinate of point*/ + N_POS_Z_INIT, /**< Numeric property: the initial Z coordinate of point*/ + N_MASS, /**< Numeric property: the mass of point*/ + N_FUSER_X, /**< Numeric property: the X coordinate of user force*/ + N_FUSER_Y, /**< Numeric property: the Y coordinate of user force*/ + N_FUSER_Z, /**< Numeric property: the Z coordinate of user force*/ + N_POINT_RESISTANCE, /**< Numeric property: the resistance of point movement*/ + V_POS, /**< Userdata property (Vector3): the position of point*/ + V_POS_INIT, /**< Userdata property (Vector3): the initial position of point*/ + V_FUSER, /**< Userdata property (Vector3): the user force vector*/ + + //PointSurfaceNURBS property: + N_NURBS_WEIGHT, /**< Numeric property: the weight of point (for rendering)*/ + + //RodSurface and SpringSurface property: + N_STIFFNESS, /**< Numeric property: the stiffness of spring or rod*/ + + //ModelSurface property: + N_ENV_RESISTANCE, /**< Numeric property: the environment resistance to movement*/ + N_NUMBER_ITERATIONS, /**< Numeric property: number of iterations per one calculation event (not change speed, but more stability)*/ + N_MODEL_SPEED, /**< Numeric property: model speed as animation multiplier*/ + N_GRAVITY_ACCEL_VALUE, /**< Numeric property: the length of gravity acceleration vector*/ + V_GRAVITY_ACCELERATION, /**< Numeric property: gravity acceleration*/ + + //GraphicalSurface property: + N_TRANSPARENCY, /**< Numeric property: the surface transparency (from 0 (no transparency) to 1)*/ + + //EffectModel property + N_EFFECT_TIME_PASSED, /**< Numeric property: time passed from effect beginning*/ + N_EFFECT_DURATION /**< Numeric property: effect duration time*/ + +}; // ElementProperty + + +/** +* @enum GroupElements +* +* Enumeration for choosing specified group of elements. @n +* For example, is used in function SetPropertyGroup for denoting of group +* @since 2.0 +*/ +enum GroupElements +{ + ALL_POINTS, /**< means that property will be applied for all points in the model*/ + ALL_SPRINGS, /**< means that property will be applied for all springs in the model*/ + ALL_RODS /**< means that property will be applied for all rods in the model*/ +}; // GroupElements + +/** +* @enum _Axis +* +* enumeration for choosing specified axis for rotation around it +* @since 2.0 +*/ +enum _Axis +{ + AXIS_X, /**< denote the X axis */ + AXIS_Y, /**< denote the Y axis */ + AXIS_Z, /**< denote the Z axis */ + AXIS_ARBITRARY /**< for denoting arbitrary axis (in case then user may set own arbitrary axis) */ +}; // _Axis + +/** +* @enum _Point +* +* Enumeration for base point on graphical surface specification @n +* for using in various transformations such as rotation and scaling +* @since 2.0 +* +*/ +enum _Point +{ + POINT_LEFT_TOP, /**< left of horizontal and top of vertical point on a rectangular graphical surface */ + POINT_CENTER_TOP, /**< center of horizontal and top of vertical point on a rectangular graphical surface */ + POINT_RIGHT_TOP, /**< right of horizontal and top of vertical point on a rectangular graphical surface */ + POINT_LEFT_CENTER, /**< left of horizontal and center of vertical point on a rectangular graphical surface */ + POINT_CENTER_CENTER, /**< center of horizontal and center of vertical point on a rectangular graphical surface */ + POINT_RIGHT_CENTER, /**< right of horizontal and center of vertical point on a rectangular graphical surface */ + POINT_LEFT_BOTTOM, /**< left of horizontal and bottom of vertical point on a rectangular graphical surface */ + POINT_CENTER_BOTTOM, /**< center of horizontal and bottom of vertical point on a rectangular graphical surface */ + POINT_RIGHT_BOTTOM, /**< right of horizontal and bottom of vertical point on a rectangular graphical surface */ + POINT_ARBITRARY /**< means that user may specify arbitrary point by it's coordinates */ +}; // _Point + + +/** +* @class TouchEventScript +* +* Structure for working in scripts-handlers of user's touch events +* +* @since 2.0 +* +*/ +struct TouchEventScript +{ + //tolua_end + Tizen::Ui::Effects::_Utils::Vec3f currentPosition; /**< current position in touch event info */ + Tizen::Ui::Effects::_Utils::Vec3f startPosition; /**< first position in touch event info */ + unsigned long touchId; + //tolua_begin +#if 0 + Vector3 currentPosition; // for export to lua, must be ignored by c++ compiler + Vector3 startPosition; // for export to lua, must be ignored by c++ compiler + unsigned long touchId; // for export to lua, must be ignored by c++ compiler +#endif +}; // TouchEventScript +//tolua_end <--(!do not edit!)the ending of export part to lua + +/** +* @enum _EffectState +* +* Defines all possible states of an effect +* @since 2.0 +* +*/ +enum _EffectState +{ + _EFFECT_STATE_RUNNABLE, /**< Ready to start */ + _EFFECT_STATE_RUNNING, /**< Running */ + _EFFECT_STATE_RUNTIME_ERROR, /**< Runtime error occurred */ + _EFFECT_STATE_INITIALIZING, /**< Being initialized */ + _EFFECT_STATE_STARTING, /**< Starting */ + _EFFECT_STATE_FINISHING /**< Finishing */ +}; // _EffectState + +/** +* @enum ESurface +* +* Enumeration for denoting element surface (returning value by function ElementSurface::GetType). @n +* The value sequence is important (see ModelSurface::Construct) +* @since 2.0 +* +*/ +enum ESurface +{ + ESURFACE_MODEL_SURFACE = 0, + ESURFACE_GRAPHICAL_SURFACE, + ESURFACE_GRAPHICAL_SURFACE_NURBS, + ESURFACE_SPRING_SURFACE, + ESURFACE_ROD_SURFACE, + ESURFACE_POINT_SURFACE, + ESURFACE_POINT_SURFACE_NURBS +}; // ESurface + + +typedef std::list LastShownBitmapIdCollection; + +/** +* @class EffectResultS +* +* Structure is used in EffectModel instances for runtime result storage +* +* @since 2.0 +* +*/ +struct EffectResultS +{ + EffectResultS(Tizen::Ui::Effects::EffectResult effectResult_ = static_cast(0), + LastShownBitmapIdCollection lastShownBitmapsId_ = LastShownBitmapIdCollection(1, -1)) + : effectResult(effectResult_) + , lastShownBitmapsId(lastShownBitmapsId_) + { + } + + Tizen::Ui::Effects::EffectResult effectResult; + LastShownBitmapIdCollection lastShownBitmapsId; +}; + +template class EffectsVector + : public std::vector +{ +public: + explicit EffectsVector(void) : std::vector() + { + } + + explicit EffectsVector(long n, const T& value = T()) : std::vector(n, value) + { + } + + EffectsVector(const EffectsVector& rhs) :std::vector(rhs) + { + } + + template + EffectsVector(InputIterator first, InputIterator last) : std::vector(first, last) + { + } + + virtual ~EffectsVector(void) + { + } + + long GetSize(void) const + { + return this->size(); + } +}; + +} } } } // Tizen::Ui::Effects::_Runtime + +#endif //_FUI_EFFECTS_INTERNAL_RUNTIME_MODEL_H_ diff --git a/src/ui/effects/inc/FUiEffects_RuntimeModelSurface.h b/src/ui/effects/inc/FUiEffects_RuntimeModelSurface.h new file mode 100644 index 0000000..544547d --- /dev/null +++ b/src/ui/effects/inc/FUiEffects_RuntimeModelSurface.h @@ -0,0 +1,275 @@ +// +// 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 FUiEffects_RuntimeModelSurface.h + * @brief This is the header file for the ModelSurface class. + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RUNTIME_MODEL_SURFACE_H_ +#define _FUI_EFFECTS_INTERNAL_RUNTIME_MODEL_SURFACE_H_ + +#include +#include +#include "FUiEffects_RuntimeEffectModel.h" +#include "FUiEffects_RuntimeRenderDataSurface.h" + +namespace Tizen { namespace Ui { namespace Effects { namespace _PhysicsEngine +{ +class PointSurface; +class SpringSurface; +class RodSurface; +} } } } // Tizen::Ui::Effects:_PhysicsEngine + +namespace Tizen { namespace Ui { namespace Effects { namespace _Runtime +{ + +class GraphicalSurface; + +/** + * The list type for storing ElementSurface pointers. + * + * @since 2.0 + * + */ +typedef std::list TypeElemSurfaceCollection; + +/** + * The list type for storing PointSurface pointers. + * + * @since 2.0 + * + */ +typedef std::list TypePointSurfaceCollection; + +/** + * The list type for storing SpringSurface pointers. + * + * @since 2.0 + * + */ +typedef std::list TypeSpringSurfaceCollection; + +/** + * The list type for storing RodSurface pointers. + * + * @since 2.0 + * + */ +typedef std::list TypeRodSurfaceCollection; + +struct ElementsSurfaceContainerDeleter +{ + void operator()(TypeElemSurfaceCollection* pElemSurfaceCollection); +}; + +/** + * @class ModelSurface + * @brief This class contains one 3D object + * + * @since 2.0 + */ +class ModelSurface + : public ::Tizen::Ui::Effects::_PhysicsEngine::ElementSurface +{ +public: + /** + * ModelSurface class constructor + * + * @since 2.0 + * + */ + ModelSurface(long objId, + unsigned short iterationCount_, + unsigned short modelSpeed_, + float envResistance_, + const Tizen::Ui::Effects::_Utils::Vec3f &gravityAccelerationIdentity_, + float gravityAccelerationValue_, + float groundLevel_); + + /** + * ModelSurface class destructor + * + * @since 2.0 + * + */ + virtual ~ModelSurface(void); + + /** + * Sends to all element surfaces event Calculate + * + * @since 2.0 + * + */ + virtual void Calculate(float timeStep); + + /** + * Returns specified property value of any type (see class PropertyCast) + * + * @since 2.0 + * + */ + virtual PropertyCast GetProperty(ElementProperty propName) const; + + /** + * Sets ModelSurface's property which is specified in enumeration ElementProperty + * of boolean type + * + * @since 2.0 + * + */ + virtual bool SetProperty(ElementProperty propName, bool propValue); + + /** + * Sets ModelSurface's property which is specified in enumeration ElementProperty + * of floating point type (float or integer) + * + * @since 2.0 + * + */ + virtual bool SetProperty(ElementProperty propName, LUA_NUMBER propValue); + + /** + * Sets ModelSurface's property which is specified in enumeration ElementProperty + * of Vector3 type + * + * @since 2.0 + * + */ + virtual bool SetProperty(ElementProperty propName, const Tizen::Ui::Effects::_Utils::Vec3f &propValue); + + /** + * Sets specified property value for group of elements + * + * @since 2.0 + * + * @remarks Returns true if setting was successful and false otherwise + */ + bool SetPropertyGroup(GroupElements group, ElementProperty property, LUA_NUMBER value); + + /** + * Sends event Initialize to all elements of the surface + * + * @since 2.0 + * + */ + virtual void Initialize(void); + + /** + * Gets object's type + * + * @since 2.0 + * + */ + virtual ESurface GetType(void) const; + + /** + * GraphicalSurface object assigning during register effect file procedure + * + * @since 2.0 + * + */ + void AddGraphicalSurface(std::unique_ptr pGraphicalSurface); + + /** + * ElementSurface object addition during register effect file procedure + * + * @since 2.0 + * + */ + void AddElementSurface(::Tizen::Ui::Effects::_PhysicsEngine::ElementSurface* pElementSurface); + + /** + * Constructs the elements map for fast searching object in EffectModel, + * constructs RenderDataSurfaceCollection object, + * links the ModelSurface and PointSurface instances + * + * @since 2.0 + * + * @remarks Must be called after parser performing + */ + bool Construct(TypeMapElements* pMapElements, TypeMapGSurface* pMapGSurface, RenderDataSurfaceCollection* pRenderDataSurfaceCollection); + + /** + * Transmits event UpdateGraphicalSurface from EffectModel to GraphicalSurface + * + * @since 2.0 + * + * @remarks It is called from EffectModel by timer + * for building graphical points based on physical points + */ + void UpdateGraphicalSurface(void); + + /** + * Calculates distance from this model surface to its ground level + * + * @since 2.0 + * + */ + float GetDistanceFromGround(void) const; + +private: + /** + * Hidden copy constructor + * + * @since 2.0 + * + */ + ModelSurface(const ModelSurface& rhs); + + /** + * Hidden assignment operator + * + * @since 2.0 + * + */ + ModelSurface &operator=(const ModelSurface& rhs); + + /** + * Sets specified property value for group of elements + * + * @since 2.0 + * + * @return Returns true if setting was successful and false otherwise + * @remarks Is needed for internal use only + */ + template + bool SetPropertyGroup(T* pDataPointer, ElementProperty property, LUA_NUMBER value); + +private: + + std::unique_ptr __pElemSurfaceCollection; /**< collection of surface elements (3D object)*/ + + std::unique_ptr __pGraphicalSurface; /**< pointer to graphical surface*/ + + unsigned short __iterationCount; /**< number of iterations per one calculation event (no speed change, but more stability)*/ + unsigned short __modelSpeed; /**< model speed as animation multiplier*/ + + float __envResistance; /**< environment resistance (for physics calculation)*/ + Tizen::Ui::Effects::_Utils::Vec3f __gravityAccelerationIdentity; /**< identity vector (length of vector equals 1) of gravity acceleration (for physics calculation)*/ + float __gravityAccelerationValue; /**< length of gravity acceleration vector (for physics calculation)*/ + Tizen::Ui::Effects::_Utils::Vec3f __gravityAccelerationVector; /**< gravity acceleration vector (for physics calculation)*/ + float __groundLevel; + + std::unique_ptr __pPointsCollection; /**< pointers collection to model surface points*/ + std::unique_ptr __pSpringsCollection; /**< pointers collection to model surface springs*/ + std::unique_ptr __pRodsCollection; /**< pointers collection to model surface rods*/ + +}; // ModelSurface + +} } } } // Tizen::Ui::Effects::_Runtime + +#endif //_FUI_EFFECTS_INTERNAL_RUNTIME_MODEL_SURFACE_H_ diff --git a/src/ui/effects/inc/FUiEffects_RuntimePointLight.h b/src/ui/effects/inc/FUiEffects_RuntimePointLight.h new file mode 100644 index 0000000..4a16ac4 --- /dev/null +++ b/src/ui/effects/inc/FUiEffects_RuntimePointLight.h @@ -0,0 +1,164 @@ +// +// 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 FUiEffects_RuntimePointLight.h + * @brief This is the header file for a point light + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RUNTIME_POINT_LIGHT_H_ +#define _FUI_EFFECTS_INTERNAL_RUNTIME_POINT_LIGHT_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Runtime +{ + +//tolua_begin <--(!do not edit!)the beginning of export part to lua +class PointLight + : public UnitLight +{ +//tolua_end <--(!do not edit!)the ending of export part to lua +public: + + /** + * Returns a pointer to created point light + * + * @since 2.0 + * + */ + static PointLight* CreatePointLight(const std::string& name); +#if 0 + static PointLight* CreatePointLight(const string& name); //tolua_export <--(!do not edit!)the exporting line to lua +#endif + + /** + * Returns a pointer to created point light + * + * @since 2.0 + * + */ + static PointLight* CreatePointLight(bool enabled, + const std::string& name, + const Tizen::Ui::Effects::_Utils::Vec3f& colour, + float intensity, + const Tizen::Ui::Effects::_Utils::Vec3f& position); + + /** + * Returns a position of a point light + * + * @since 2.0 + * + */ + const Tizen::Ui::Effects::_Utils::Vec3f& GetPosition(void) const; +#if 0 + const Vector3& GetPosition(void) const; //tolua_export <--(!do not edit!)the exporting line to lua +#endif + + /** + * Sets a position for a point light + * + * @since 2.0 + * + */ + void SetPosition(const Tizen::Ui::Effects::_Utils::Vec3f& position); +#if 0 + void SetPosition(const Vector3& position); //tolua_export <--(!do not edit!)the exporting line to lua +#endif + + /** + * Sets a position for a point light + * + * @since 2.0 + * + */ + void SetPosition(float x, float y, float z); //tolua_export <--(!do not edit!)the exporting line to lua + + /** + * Returns a type of a point light as variable of enumeration type + * + * @since 2.0 + * + */ + virtual TypeUnitLight GetType(void) const; + + /** + * Resets all signs for this instance of class (e.g. isPositionChanged, isColourChanged) + * + * @since 2.0 + * + */ + virtual void ResetSigns(void); + +protected: + + /** + * Class constructor + * + * @since 2.0 + * + * @remarks Clients of this class can create PointLight objects with using Create methods only + * + */ + PointLight(const std::string& name); + + /** + * Class constructor + * + * @since 2.0 + * + * @remarks Clients of this class can create PointLight objects with using Create methods only + * + */ + PointLight(bool enabled, + const std::string& name, + const Tizen::Ui::Effects::_Utils::Vec3f& colour, + float intensity, + const Tizen::Ui::Effects::_Utils::Vec3f& position + ); + + /** + * Class destructor + * + * @since 2.0 + * + * @remarks Clients of this class can not destroy instances of this class (for purpose to avoid the sending an invalid unit light into scene) + * + */ + virtual ~PointLight(void); + +private: + + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + PointLight(const PointLight& rhs); + // The implementation of this assignment operator is intentionally blank and declared as private to prohibit copying of objects. + PointLight& operator=(const PointLight& rhs); + +public: + + bool isPositionChanged; + +private: + + Tizen::Ui::Effects::_Utils::Vec3f __position; /**< position of a point light on a scene (scene's coordinates) */ + +}; //PointLight //tolua_export <--(!do not edit!)the exporting line to lua + +} } } } // Tizen::Ui::Effects::_Runtime + +#endif // _FUI_EFFECTS_INTERNAL_RUNTIME_POINT_LIGHT_H_ diff --git a/src/ui/effects/inc/FUiEffects_RuntimePropertyCast.h b/src/ui/effects/inc/FUiEffects_RuntimePropertyCast.h new file mode 100644 index 0000000..dfa1bac --- /dev/null +++ b/src/ui/effects/inc/FUiEffects_RuntimePropertyCast.h @@ -0,0 +1,91 @@ +// +// 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 FUiEffects_RuntimePropertyCast.h + * @brief This is the header file for the PropertyCast structure. + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RUNTIME_PROPERTY_CAST_H_ +#define _FUI_EFFECTS_INTERNAL_RUNTIME_PROPERTY_CAST_H_ + +#include +#include +#include + + +namespace Tizen { namespace Ui { namespace Effects { namespace _Runtime +{ + +class PointLight; +class SpotLight; +class DirectionalLight; +template class EffectsVector; + +/** + * @struct PropertyCast + * @brief The instances of this structure are needed for + * returning a property value from model to lua + * + * @since 2.0 + * + */ +// tolua_begin <--(!do not edit!)the beginning of export part to lua +struct PropertyCast +{ + enum + { + NO_PROPERTY, /**< means absence property*/ + NUMBER, /**< for parameters of float, double, integer and similar types*/ + BOOL, /**< for parameters of boolean type*/ + VEC3, /**< for parameters of vector3 type*/ + VECTOR_VECTOR, /**< for vector > type from algorithm of finding nearest points to specified*/ + POINT_LIGHT, + SPOT_LIGHT, + DIRECTIONAL_LIGHT + } type; + + union TypeValue + { + LUA_NUMBER numberValue; /**< stores a parameter of float or double, or integer, or similar type*/ + bool boolValue; +// tolua_end <--(!do not edit!)the ending of export part to lua + const _Utils::Vec3f* vec3Value; + const EffectsVector >* vecVecValue; /**< for vector > type from algorithm of finding nearest points to specified*/ +// tolua_begin <--(!do not edit!)the beginning of export part to lua +#if 0 + tolua_readonly Vector3* vec3Value; /**< for lua code, should be ignored by c++ compiler*/ + tolua_readonly EffectsVector >* vecVecValue; /**< for lua code, should be ignored by c++ compiler*/ +#endif +// tolua_end + const PointLight* pPointLight; + const SpotLight* pSpotLight; + const DirectionalLight* pDirectionalLight; +// tolua_begin +#if 0 + PointLight* pPointLight; + SpotLight* pSpotLight; + DirectionalLight* pDirectionalLight; +#endif + }; + + TypeValue value; +}; // PropertyCast +// tolua_end <--(!do not edit!)the ending of export part to lua + +} } } } // Tizen::Ui::Effects::_Runtime + +#endif //_FUI_EFFECTS_INTERNAL_RUNTIME_PROPERTY_CAST_H_ diff --git a/src/ui/effects/inc/FUiEffects_RuntimeRenderDataScene.h b/src/ui/effects/inc/FUiEffects_RuntimeRenderDataScene.h new file mode 100644 index 0000000..1f67521 --- /dev/null +++ b/src/ui/effects/inc/FUiEffects_RuntimeRenderDataScene.h @@ -0,0 +1,322 @@ +// +// 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 FUiEffects_RuntimeRenderDataScene.h + * @brief This is the header file for the render structures for all scene (for EffectModel instance entire) + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RUNTIME_RENDER_DATA_SCENE_H_ +#define _FUI_EFFECTS_INTERNAL_RUNTIME_RENDER_DATA_SCENE_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Runtime +{ + +class UnitLight; + +class RenderDataScene +{ +public: + + /** + * Adds specified unit light into scene + * + * @since 2.0 + * + * @remarks For using in lua also + * + */ + bool AddUnitLight(UnitLight& unitLight); + + /** + * Excludes specified unit light from scene with using unique unit light name + * + * @since 2.0 + * + * @remarks For using in lua also + * + */ + bool RemoveUnitLight(const std::string& name); + + /** + * Excludes all units light of specified type from scene + * + * @since 2.0 + * + * @remarks For using in lua also + * + */ + bool RemoveAllUnitsLightType(TypeUnitLight typeUnitLight); + + /** + * Returns specified unit light to a client with using unique unit light name + * + * @since 2.0 + * + * @remarks For using in lua also + * + */ + PropertyCast GetUnitLight(const std::string& name) const; + + /** + * Sets ambient colour for entire scene + * + * @since 2.0 + * + * @remarks For using in lua also + * + */ + void SetLightAmbientColour(const Tizen::Ui::Effects::_Utils::Vec3f& ambientColour); + + /** + * Sets ambient colour for entire scene + * + * @since 2.0 + * + * @remarks For using in lua also + * + */ + void SetLightAmbientColour(float red, float green, float blue); + + /** + * Sets light intensity for entire scene + * + * @since 2.0 + * + * @remarks For using in lua also + * + */ + void SetLightIntensity(float intensity); + + /** + * Sets attenuation for units light as environment variable (How far does unit light can light?) + * + * @since 2.0 + * + * @remarks For using in lua also + * + */ + void SetLightAttenuation(float attenuation); + + /** + * Returns attenuation for units light as environment variable + * + * @since 2.0 + * + * @remarks For using in lua also + * + */ + const Tizen::Ui::Effects::_Utils::Vec3f& GetLightAmbientColour(void) const; + + /** + * Returns intensity for units light as environment variable + * + * @since 2.0 + * + * @remarks For using in lua also + * + */ + float GetLightIntensity(void) const; + + /** + * Returns attenuation for units light as environment variable + * + * @since 2.0 + * + * @remarks For using in lua also + * + */ + float GetLightAttenuation(void) const; + + /** + * Returns size of units light container + * + * @since 2.0 + * + * @remarks For working with units light collection + * + */ + long GetSizeUnitLightContainer(void) const; + + /** + * Returns type of current units light from units light container + * + * @since 2.0 + * + * @remarks For working with units light collection + * + */ + TypeUnitLight GetTypeOfCurrentUnitLight(void) const; + + /** + * Returns a pointer to current units light from units light container + * + * @since 2.0 + * + * @remarks For working with units light collection + * + */ + template const T* GetCurrentUnitLight(void) const; + + /** + * Assignments next value for internal iterator for access to next unit light in units light container + * + * @since 2.0 + * + * @remarks For working with units light collection + * Returns true if transition was succeeded and false otherwise + * + */ + bool GoToNextUnitLight(void); + + /** + * Locks units light container for future work with units light from it + * + * @since 2.0 + * + * @remarks For working with units light collection + * Return true if the locking was succeeded and false otherwise + * Without performing this function client can not performs any action on units light from units light container + * + */ + bool LockUnitsLightContainer(void); + + /** + * Unlocks units light container with purpose to prohibit any future actions on units light container + * + * @since 2.0 + * + * @remarks For working with units light collection + * This function calls automatically when client adds or removes some unit light from scene + * + */ + void UnlockUnitsLightContainer(void); + + /** + * Returns true if units light container is locked and false otherwise + * + * @since 2.0 + * + * @remarks For working with units light collection + * + */ + bool GetIsLockedUnitsLightContainer(void) const; + + /** + * Resets all signs for current unit light (e.g. isIntensityChanged, isColourChanged) + * + * @since 2.0 + * + */ + bool ResetSignsCurrentUnitLight(void); + + /** + * Returns a reference to collection of render data for each graphical surface + * + * @since 2.0 + * + */ + RenderDataSurfaceCollection& GetRenderDataSurfaceCollection(void); + +private: + + /** + * Class constructor + * + * @since 2.0 + * + */ + RenderDataScene(void); + + /** + * Class destructor + * + * @since 2.0 + * + */ + ~RenderDataScene(void); + + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + RenderDataScene(const RenderDataScene& rhs); + // The implementation of this assignment operator is intentionally blank and declared as private to prohibit copying of objects. + RenderDataScene& operator=(const RenderDataScene& rhs); + + /** + * For internal purposes only + * + * @since 2.0 + * + */ + template const T* GetCurrentUnitLightInternal(void) const; + + /** + * For internal purposes only + * + * @since 2.0 + * + */ + PropertyCast GetConcreteUnitLight(const UnitLight& unitLight) const; + + /** + * For internal purposes only + * + * @since 2.0 + * + */ + void RemoveUnitLight(UnitLight& unitLight); + +public: + + bool isAmbientColourChanged; + bool isIntensityChanged; + bool isAttenuationChanged; + bool isSomethingChanged; + +private: + + typedef std::map UnitLightNameTree; + typedef std::list UnitLightCollection; + + RenderDataSurfaceCollection __renderDataSurfaceCollection; /**< a container of pointers to graphical surfaces render data*/ + + UnitLightCollection __unitsLight; /**< units light container*/ + UnitLightCollection::iterator __iteratorCurrentUnitLight; /**< an iterator to point to current units light*/ + bool __isLockedUnitsLightContainer; /**< is units light container locked or not*/ + + UnitLightNameTree __unitLightNameTree; /*< a map for quick search need unit light with using a name of it */ + + Tizen::Ui::Effects::_Utils::Vec3f __ambientColour; /**< ambient colour*/ + float __intensity; /**< intensity for units light as environment variable*/ + float __attenuation; /**< attenuation for units light as environment variable (this variable has no influence on directionals light)*/ + + friend class EffectModel; //for building the container __renderDataSurfaceCollection + friend class boost::default_delete;//for deleting RenderDataScene instance +}; + +} } } } // Tizen::Ui::Effects::_Runtime + +#endif // _FUI_EFFECTS_INTERNAL_RUNTIME_RENDER_DATA_SCENE_H_ diff --git a/src/ui/effects/inc/FUiEffects_RuntimeRenderDataSurface.h b/src/ui/effects/inc/FUiEffects_RuntimeRenderDataSurface.h new file mode 100644 index 0000000..ef29574 --- /dev/null +++ b/src/ui/effects/inc/FUiEffects_RuntimeRenderDataSurface.h @@ -0,0 +1,135 @@ +// +// 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 FUiEffects_RuntimeRenderDataSurface.h + * @brief This is the header file for the RenderData structure + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RUNTIME_RENDER_DATA_H_ +#define _FUI_EFFECTS_INTERNAL_RUNTIME_RENDER_DATA_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Runtime +{ + +/** + * @struct VertexData + * @brief Structure of vertex attributes + * + * @since 2.0 + * + */ +struct VertexData +{ + static inline unsigned int Stride(void) + { + return sizeof(VertexData); + } + static inline unsigned int OffsetPos(void) + { + return 0; + } + static inline unsigned int OffsetNorm(void) + { + // pos + return sizeof(Tizen::Ui::Effects::_Utils::Vec3f); + } + static inline unsigned int OffsetTexCoords(void) + { + // pos norm + return sizeof(Tizen::Ui::Effects::_Utils::Vec3f) + sizeof(Tizen::Ui::Effects::_Utils::Vec3f); + } + + Tizen::Ui::Effects::_Utils::Vec3f pos; + Tizen::Ui::Effects::_Utils::Vec3f norm; + Tizen::Ui::Effects::_Utils::Vec2f texcoords; +}; // VertexData + +/** +* The vector type for storing position, normal and texture coordinates for point. +* +* @since 2.0 +* +*/ +typedef std::vector VertexDataCollection; + +/** +* The vector type for storing indexes (is needed for triangles rendering by OpenGL). +* +* @since 2.0 +* +*/ +typedef std::vector IndicesCollection; + + +/** + * @struct RenderData + * @brief Data for renderer object. Set value of member XXXChanged to true to indicate, that appropriate @n + * data member had been changed and should be updated. As soon as data becomes updated XXXChanged is set to false by updater + * + * @since 2.0 + * + */ +struct RenderDataSurface +{ + RenderDataSurface(unsigned int sizeVnt, unsigned int sizeIndices): + vertexDataChanged(false), + indicesChanged(false), + modelMtr(Tizen::Ui::Effects::_Utils::Mat4f::getIdentity()), + modelMtrChanged(false), + bitmapId(-1), + bitmapIdChanged(false), + transparency(0.0f), + transparencyChanged(false) + { + VertexData vertexData = {Tizen::Ui::Effects::_Utils::Vec3f(0.f, 0.f, 0.f), + Tizen::Ui::Effects::_Utils::Vec3f(0.f, 0.f, 0.f), + Tizen::Ui::Effects::_Utils::Vec2f(0.f, 0.f)}; + vnt.resize(sizeVnt, vertexData); + indices.resize(sizeIndices, 0); + } + + VertexDataCollection vnt; /**< VertexCoords-Normal-TexCoords per vertex */ + IndicesCollection indices; /**< for triangles construction */ + + bool vertexDataChanged; /**< Indicates changes in vnt data */ + bool indicesChanged; /**< Indicates changes in Indices data */ + + Tizen::Ui::Effects::_Utils::Mat4f modelMtr; /**< Model matrix of an object */ + bool modelMtrChanged; + + long bitmapId; /**< Texture id */ + bool bitmapIdChanged; + + float transparency; /**< Transparency level = [0 .. 1] */ + bool transparencyChanged; +}; // RenderData + +/** +* The vector type for storing RenderData pointers for each graphical surface in model. +* +* @since 2.0 +* +*/ +typedef std::vector RenderDataSurfaceCollection; + +} } } } // Tizen::Ui::Effects::_Runtime + +#endif //_FUI_EFFECTS_INTERNAL_RUNTIME_RENDER_DATA_H_ diff --git a/src/ui/effects/inc/FUiEffects_RuntimeScriptProcessing.h b/src/ui/effects/inc/FUiEffects_RuntimeScriptProcessing.h new file mode 100644 index 0000000..fe7c26f --- /dev/null +++ b/src/ui/effects/inc/FUiEffects_RuntimeScriptProcessing.h @@ -0,0 +1,37 @@ +// +// 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 FUiEffects_RuntimeScriptProcessing.h + * @brief This file is needed for including in EffectModel.h file + * with an aim to abstracting from usage lua scripts + * (EffectModel may uses any script language) + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RUNTIME_SCRIPT_PROCESSING_H_ +#define _FUI_EFFECTS_INTERNAL_RUNTIME_SCRIPT_PROCESSING_H_ + +#include "FUiEffects_RuntimeLuaProcessing.h" + +namespace Tizen { namespace Ui { namespace Effects { namespace _Runtime +{ + +typedef class LuaProcessing ScriptProcessing; + +} } } } // Tizen::Ui::Effects::_Runtime + +#endif //_FUI_EFFECTS_INTERNAL_RUNTIME_SCRIPT_PROCESSING_H_ diff --git a/src/ui/effects/inc/FUiEffects_RuntimeSpotLight.h b/src/ui/effects/inc/FUiEffects_RuntimeSpotLight.h new file mode 100644 index 0000000..5f82d1b --- /dev/null +++ b/src/ui/effects/inc/FUiEffects_RuntimeSpotLight.h @@ -0,0 +1,209 @@ +// +// 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 FUiEffects_RuntimeSpotLight.h + * @brief This is the header file for a spot light + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RUNTIME_SPOT_LIGHT_H_ +#define _FUI_EFFECTS_INTERNAL_RUNTIME_SPOT_LIGHT_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Runtime +{ + +//tolua_begin <--(!do not edit!)the beginning of export part to lua +class SpotLight + : public PointLight +{ +//tolua_end <--(!do not edit!)the ending of export part to lua +public: + + /** + * Returns a pointer to created spot light + * + * @since 2.0 + * + */ + static SpotLight* CreateSpotLight(const std::string& name); +#if 0 + static SpotLight* CreateSpotLight(const string& name); //tolua_export <--(!do not edit!)the exporting line to lua +#endif + + /** + * Returns a pointer to created spot light + * + * @since 2.0 + * + */ + static SpotLight* CreateSpotLight(bool enabled, + const std::string& name, + const Tizen::Ui::Effects::_Utils::Vec3f& colour, + float intensity, + const Tizen::Ui::Effects::_Utils::Vec3f& position, + const Tizen::Ui::Effects::_Utils::Vec3f& target, + float angleOpening, + float angleFadeOut + ); + + /** + * Returns a target point of a spot (Where does spot shine?) + * + * @since 2.0 + * + */ + const Tizen::Ui::Effects::_Utils::Vec3f& GetTarget(void) const; +#if 0 + const Vector3& GetTarget(void) const; //tolua_export <--(!do not edit!)the exporting line to lua +#endif + + /** + * Returns an opening angle of spot (an angle between opposite forming lines of a spot cone) + * + * @since 2.0 + * + */ + float GetAngleOpening(void) const; //tolua_export <--(!do not edit!)the exporting line to lua + + /** + * Returns an angle of fade out for spot + * (an angle between some forming line of a spot cone and a some ray from a position of spot which not lies in spot cone) + * + * @since 2.0 + * + * @remarks This angle determines how spot light attenuates with angle growing if angle is great than angle opening + * + */ + float GetAngleFadeOut(void) const; //tolua_export <--(!do not edit!)the exporting line to lua + + /** + * Sets a target point for a spot + * + * @since 2.0 + * + */ + void SetTarget(const Tizen::Ui::Effects::_Utils::Vec3f& target); +#if 0 + void SetTarget(const Vector3& target); //tolua_export <--(!do not edit!)the exporting line to lua +#endif + + /** + * Sets target point for spot + * + * @since 2.0 + * + */ + void SetTarget(float x, float y, float z); //tolua_export <--(!do not edit!)the exporting line to lua + + /** + * Sets an angle opening for a spot + * + * @since 2.0 + * + */ + bool SetAngleOpening(float angleOpening); //tolua_export <--(!do not edit!)the exporting line to lua + + /** + * Sets an angle of fade out for a spot + * + * @since 2.0 + * + */ + bool SetAngleFadeOut(float angleFadeOut); //tolua_export <--(!do not edit!)the exporting line to lua + + /** + * Returns a type of a spot light as variable of enumeration type + * + * @since 2.0 + * + */ + virtual TypeUnitLight GetType(void) const; + + /** + * Resets all signs for this instance of class (e.g. isTargetChanged, isColourChanged) + * + * @since 2.0 + * + */ + virtual void ResetSigns(void); + +protected: + + /** + * Class constructor + * + * @since 2.0 + * + * @remarks Clients of this class can create SpotLight objects with using Create methods only + * + */ + SpotLight(const std::string& name); + + /** + * Class constructor + * + * @since 2.0 + * + * @remarks Clients of this class can create SpotLight objects with using Create methods only + * + */ + SpotLight(bool enabled, + const std::string& name, + const Tizen::Ui::Effects::_Utils::Vec3f& colour, + float intensity, + const Tizen::Ui::Effects::_Utils::Vec3f& position, + const Tizen::Ui::Effects::_Utils::Vec3f& target, + float angleOpening, + float angleFadeOut + ); + + /** + * Class destructor + * + * @since 2.0 + * + * @remarks Clients of this class can not destroy instances of this class (for purpose to avoid the sending an invalid unit light into scene) + * + */ + virtual ~SpotLight(void); + +private: + + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + SpotLight(const SpotLight& rhs); + // The implementation of this assignment operator is intentionally blank and declared as private to prohibit copying of objects. + SpotLight& operator=(const SpotLight& rhs); + +public: + + bool isTargetChanged; + bool isAngleOpeningChanged; + bool isAngleFadeOutChanged; + +private: + + Tizen::Ui::Effects::_Utils::Vec3f __target; /**< a target point for a spot (Where does spot shine?) */ + float __angleOpening; /**< an angle opening for a spot */ + float __angleFadeOut; /**< an angle of fade out for a spot */ +}; //SpotLight //tolua_export <--(!do not edit!)the exporting line to lua + +} } } } // Tizen::Ui::Effects::_Runtime + +#endif //_FUI_EFFECTS_INTERNAL_RUNTIME_SPOT_LIGHT_H_ diff --git a/src/ui/effects/inc/FUiEffects_RuntimeUnitLight.h b/src/ui/effects/inc/FUiEffects_RuntimeUnitLight.h new file mode 100644 index 0000000..3f06e6f --- /dev/null +++ b/src/ui/effects/inc/FUiEffects_RuntimeUnitLight.h @@ -0,0 +1,194 @@ +// +// 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 FUiEffects_RuntimeUnitLight.h + * @brief This is the header file for a unit light + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RUNTIME_UNIT_LIGHT_H_ +#define _FUI_EFFECTS_INTERNAL_RUNTIME_UNIT_LIGHT_H_ + +#include +#include +#include +#include "FUiEffects_RuntimeModel.h" + +namespace Tizen { namespace Ui { namespace Effects { namespace _Runtime +{ + +//tolua_begin <--(!do not edit!)the beginning of export part to lua +class UnitLight +{ +//tolua_end <--(!do not edit!)the ending of export part to lua +public: + + /** + * Returns current state of an unit light (is it turned on or turned off) + * + * @since 2.0 + * + */ + bool GetEnabled(void) const; //tolua_export <--(!do not edit!)the exporting line to lua + + /** + * Returns a colour of an unit light + * + * @since 2.0 + * + */ + const Tizen::Ui::Effects::_Utils::Vec3f& GetColour(void) const; +#if 0 + const Vector3& GetColour(void) const; //tolua_export <--(!do not edit!)the exporting line to lua +#endif + + /** + * Returns an intensity of an unit light + * + * @since 2.0 + * + */ + float GetIntensity(void) const; //tolua_export <--(!do not edit!)the exporting line to lua + + /** + * Returns a name of an unit light + * + * @since 2.0 + * + */ + const std::string& GetName(void) const; //tolua_export <--(!do not edit!)the exporting line to lua + + /** + * Turns on or turns off a unit light + * + * @since 2.0 + * + */ + void SetEnabled(bool isEnabled); //tolua_export <--(!do not edit!)the exporting line to lua + + /** + * Sets a colour for a unit light + * + * @since 2.0 + * + */ + void SetColour(const Tizen::Ui::Effects::_Utils::Vec3f& colour); +#if 0 + void SetColour(const Vector3& colour); //tolua_export <--(!do not edit!)the exporting line to lua +#endif + + /** + * Sets a colour for a unit light + * + * @since 2.0 + * + */ + void SetColour(float red, float green, float blue); //tolua_export <--(!do not edit!)the exporting line to lua + + /** + * Sets an intensity for a unit light + * + * @since 2.0 + * + */ + void SetIntensity(float intensity); //tolua_export <--(!do not edit!)the exporting line to lua + + /** + * Returns type of an unit light + * + * @since 2.0 + * + */ + virtual TypeUnitLight GetType(void) const = 0; + + /** + * Resets all signs for this instance of class (e.g. isColourChanged, isIntensityChanged) + * + * @since 2.0 + * + */ + virtual void ResetSigns(void); + + static void ReleaseObjectsPool(void); + +protected: + + /** + * UnitLight class constructor + * + * @since 2.0 + * + */ + UnitLight(const std::string& name); + + /** + * UnitLight class constructor + * + * @since 2.0 + * + */ + UnitLight(bool enabled, + const std::string& name, + const Tizen::Ui::Effects::_Utils::Vec3f& colour, + float intensity + ); + + /** + * Class destructor + * + * @since 2.0 + * + */ + virtual ~UnitLight(void); + + typedef std::list ObjectsPool; + + static void AddUnitLightToPool(UnitLight* unitLigth); + +private: + + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + UnitLight(const UnitLight& rhs); + // The implementation of this assignment operator is intentionally blank and declared as private to prohibit copying of objects. + UnitLight& operator=(const UnitLight& rhs); + + typedef std::pair DoesExistsInPool; + + static DoesExistsInPool IsUnitLightInPool(UnitLight& unitLight); + static void RemoveUnitLightFromPool(ObjectsPool::iterator it); + +public: + + bool isEnabledChanged; + bool isColourChanged; + bool isIntensityChanged; + bool isSomethingChanged; + +private: + + bool __enabled; /**< is an unit light turned on or turned off*/ + std::string __name; /**< a name of an unit light*/ + Tizen::Ui::Effects::_Utils::Vec3f __colour; /**< a colour of an unit light*/ + float __intensity; /**< an intensity of an unit light*/ + + friend class RenderDataScene; //for deleting UnitLight's objects + + static ObjectsPool __objectsPool; +}; //UnitLight //tolua_export <--(!do not edit!)the exporting line to lua + +} } } } // Tizen::Ui::Effects::_Runtime + +#endif //_FUI_EFFECTS_INTERNAL_RUNTIME_UNIT_LIGHT_H_ diff --git a/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelAabb.h b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelAabb.h new file mode 100644 index 0000000..ffcce52 --- /dev/null +++ b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelAabb.h @@ -0,0 +1,84 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiEffects_RendererEngineModelAabb.h + * @brief Class of Axis-Aligned Bounding Box for efficient geometry objects occlusion culling + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_AABB_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_AABB_H_ + +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +class Aabb //DUMMY +{ +public: + void Identity(void) + { + minimum.Set(0.0f); + maximum.Set(0.0f); + return; + } + + void Extend(const Aabb& other) + { + minimum.X() = Math::EffectsMin(minimum.X(), other.minimum.X()); + minimum.Y() = Math::EffectsMin(minimum.Y(), other.minimum.Y()); + minimum.Z() = Math::EffectsMin(minimum.Z(), other.minimum.Z()); + + maximum.X() = Math::EffectsMax(maximum.X(), other.maximum.X()); + maximum.Y() = Math::EffectsMax(maximum.Y(), other.maximum.Y()); + maximum.Z() = Math::EffectsMax(maximum.Z(), other.maximum.Z()); + + return; + } + + Aabb GetTransformed(const Math::Matrix4f& tran) const + { + Aabb result; + + result.minimum = minimum * tran; + result.maximum = maximum * tran; + if (result.minimum.X() > result.maximum.X()) + { + std::swap(result.minimum.X(), result.maximum.X()); + } + if (result.minimum.Y() > result.maximum.Y()) + { + std::swap(result.minimum.Y(), result.maximum.Y()); + } + if (result.minimum.Z() > result.maximum.Z()) + { + std::swap(result.minimum.Z(), result.maximum.Z()); + } + + return result; + } + + Math::Vector3f minimum; + Math::Vector3f maximum; +}; + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_AABB_H_ diff --git a/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelAlphaBlendProperty.h b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelAlphaBlendProperty.h new file mode 100644 index 0000000..d9b372d --- /dev/null +++ b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelAlphaBlendProperty.h @@ -0,0 +1,90 @@ +// +// 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 FUiEffects_RendererEngineModelAlphaBlendProperty.h + * @brief Alpha blending properties class + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_ALPHA_BLEND_PROPERTY_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_ALPHA_BLEND_PROPERTY_H_ + +#include + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ +class PropertyVisitor; + +class AlphaBlendProperty: + public Property +{ +public: + class BlendFactor + { + public: + enum BlendFactorEnum + { + ZERO = 0 , + ONE , + SRC_COLOR , + ONE_MINUS_SRC_COLOR , + DST_COLOR , + ONE_MINUS_DST_COLOR , + SRC_ALPHA , + ONE_MINUS_SRC_ALPHA , + DST_ALPHA , + ONE_MINUS_DST_ALPHA , + CONSTANT_COLOR , + ONE_MINUS_CONSTANT_COLOR , + CONSTANT_ALPHA , + ONE_MINUS_CONSTANT_ALPHA , + SRC_ALPHA_SATURATE + }; + typedef BlendFactorEnum Value; + }; + + AlphaBlendProperty(void); + virtual ~AlphaBlendProperty(void); + + virtual void Visit(PropertyVisitor& v); + + virtual bool IsEnable(void); + virtual BlendFactor::Value GetSourceFactor(void); + virtual BlendFactor::Value GetDestinationFactor(void); + + virtual void SetFactors(BlendFactor::Value source, BlendFactor::Value destination); + virtual void Enable(bool isEnabled); + + virtual CachePtr GetCache(void); + virtual void SetCache(CachePtr cache); + virtual void TouchCache(void); + +private: + CachePtr __cache; + BlendFactor::Value __source; + BlendFactor::Value __destination; + bool __isEnabled; +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr AlphaBlendPropertyPtr; + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_ALPHA_BLEND_PROPERTY_H_ diff --git a/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelAttribute.h b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelAttribute.h new file mode 100644 index 0000000..938873f --- /dev/null +++ b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelAttribute.h @@ -0,0 +1,37 @@ +// +// 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 FUiEffects_RendererEngineModelAttribute.h + * @brief Common class for shader attributes + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_ATTRIBUTE_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_ATTRIBUTE_H_ + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ +template struct Attribute +{ + T value; + bool invalid; +}; + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_ATTRIBUTE_H_ diff --git a/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelBuffer.h b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelBuffer.h new file mode 100644 index 0000000..d6165bb --- /dev/null +++ b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelBuffer.h @@ -0,0 +1,235 @@ +// +// 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 FUiEffects_RendererEngineModelBuffer.h + * @brief Shaders attributes data buffers + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_BUFFER_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_BUFFER_H_ + +#include +#include +#include + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ +class Buffer +{ +public: + Buffer(void); + virtual ~Buffer(void); + + virtual void Visit(BufferVisitor& v) + { + v.OnBuffer(*this); + return; + } +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr BufferPtr; + +class SolidBufferStrategy +{ +public: + class BufferUsage + { + public: + enum BufferUsageEnum + { + STREAM_DRAW = 0, + STREAM_READ , + STREAM_COPY , + STATIC_DRAW , + STATIC_READ , + STATIC_COPY , + DYNAMIC_DRAW , + DYNAMIC_READ , + DYNAMIC_COPY + }; + typedef BufferUsageEnum Value; + }; + + SolidBufferStrategy(void) {} + virtual ~SolidBufferStrategy(void) + { + if (_pCache) + { + _pCache->Die(); + } + } + + virtual void* GetData(void) = 0; + virtual size_t GetSize(void) const = 0; + virtual BufferUsage::Value GetUsage(void) const = 0; + virtual CachePtr GetCache(void) + { + return _pCache; + } + virtual void SetCache(CachePtr aCache) + { + if (_pCache) + { + _pCache->Die(); + } + _pCache = aCache; + } + +protected: + CachePtr _pCache; +}; + +class TypedBufferStrategy +{ +public: + class DataType + { + public: + enum DataTypeEnum + { + BYTE = 0 , + UNSIGNED_BYTE , + SHORT , + UNSIGNED_SHORT , + INT , + UNSIGNED_INT , + FLOAT , + DOUBLE + }; + typedef DataTypeEnum Value; + }; + + TypedBufferStrategy(void) {} + virtual ~TypedBufferStrategy(void) {} + + virtual DataType::Value GetDataType(void) const = 0; +}; + +class VertexBuffer: public Buffer, public SolidBufferStrategy, public TypedBufferStrategy +{ +public: + VertexBuffer(void) {} + virtual ~VertexBuffer(void) {} + + virtual void Visit(BufferVisitor& v) { v.OnVertexBuffer(*this); } + virtual size_t GetComponentsPerElement(void) const = 0; +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr VertexBufferPtr; + +class IndexBuffer: + public Buffer, + public SolidBufferStrategy, + public TypedBufferStrategy +{ +public: + class PrimitiveType + { + public: + enum PrimitiveTypeEnum + { + POINTS = 0 , + LINE_STRIP , + LINE_LOOP , + LINES , + TRIANGLE_STRIP , + TRIANGLE_FAN , + TRIANGLES , + QUAD_STRIP , + QUADS , + POLYGON + }; + typedef PrimitiveTypeEnum Value; + }; + + IndexBuffer(void) {} + virtual ~IndexBuffer(void) {} + + virtual void Visit(BufferVisitor& v) { v.OnIndexBuffer(*this); } + virtual PrimitiveType::Value GetPrimitiveType() const = 0; +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr IndexBufferPtr; + +class CompositeVertexBuffer: + public Buffer, + public SolidBufferStrategy, + public TypedBufferStrategy +{ +public: + CompositeVertexBuffer(void) {} + virtual ~CompositeVertexBuffer(void) {} + + virtual void Visit(BufferVisitor& v) + { + v.OnCompositeVertexBuffer(*this); + return; + } +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr CompositeVertexBufferPtr; + +class PartVertexBuffer: + public Buffer, + public TypedBufferStrategy +{ +public: + PartVertexBuffer(void) {} + virtual ~PartVertexBuffer(void) + { + if (_pCache) + { + _pCache->Die(); + } + } + + virtual void Visit(BufferVisitor& v) + { + v.OnPartVertexBuffer(*this); + return; + } + + virtual CachePtr GetCache(void) {return _pCache;} + + virtual void SetCache(CachePtr pCache) + { + if (_pCache) + { + _pCache->Die(); + } + _pCache = pCache; + return; + } + + virtual size_t GetStride(void) const = 0; + virtual size_t GetOffset(void) const = 0; + virtual CompositeVertexBufferPtr GetCompositeBuffer(void) const = 0; + virtual size_t GetComponentsPerElement(void) const = 0; + +protected: + CachePtr _pCache; +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr PartVertexBufferPtr; + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_BUFFER_H_ diff --git a/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelBufferVisitor.h b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelBufferVisitor.h new file mode 100644 index 0000000..f7afe8c --- /dev/null +++ b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelBufferVisitor.h @@ -0,0 +1,51 @@ +// +// 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 FUiEffects_RendererEngineModelBufferVisitor.h + * @brief Base class for buffer visitor + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_BUFFER_VISITOR_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_BUFFER_VISITOR_H_ + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +class Buffer; +class VertexBuffer; +class CompositeVertexBuffer; +class PartVertexBuffer; +class IndexBuffer; + +class BufferVisitor +{ +public: + BufferVisitor(void) {} + virtual ~BufferVisitor(void) {} + + virtual void OnBuffer(Buffer&) {} + virtual void OnVertexBuffer(VertexBuffer&) {} + virtual void OnCompositeVertexBuffer(CompositeVertexBuffer&) {} + virtual void OnPartVertexBuffer(PartVertexBuffer&) {} + virtual void OnIndexBuffer(IndexBuffer&) {} +}; + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_BUFFER_VISITOR_H_ diff --git a/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelCache.h b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelCache.h new file mode 100644 index 0000000..c12c801 --- /dev/null +++ b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelCache.h @@ -0,0 +1,48 @@ +// +// 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 FUiEffects_RendererEngineModelCache.h + * @brief Base class for caches implementations + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_CACHE_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_CACHE_H_ + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ +class Cache: + private Tizen::Ui::Effects::_Renderer::System::NonCopyable +{ +public: + Cache(void): _invalid(true) {} + virtual ~Cache(void) {} + + virtual void Invalidate() { _invalid = true; } + virtual bool Valid(void) { return !_invalid; } + + virtual void Die(void) = 0; + +protected: + bool _invalid; +}; +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_CACHE_H_ diff --git a/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelCamera.h b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelCamera.h new file mode 100644 index 0000000..dc39baf --- /dev/null +++ b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelCamera.h @@ -0,0 +1,75 @@ +// +// 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 FUiEffects_RendererEngineModelCamera.h + * @brief Camera class defines onscreen projection of 3D data + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_CAMERA_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_CAMERA_H_ + +#include +#include +#include +#include + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ +class Camera: + public Node +{ +public: + Camera(void); + virtual ~Camera(void); + + virtual void Visit(Visitor& v); + + virtual const Math::Matrix4f& GetProj(void); + virtual void SetProj(const Math::Matrix4f& arg); + virtual void SetLocal(const Math::Matrix4f& arg); + virtual void SetWorld(const Math::Matrix4f& arg); + + virtual void SetViewport(const Math::Vector2f& minPos, const Math::Vector2f& maxPos); + virtual const Math::Vector2f& GetViewportMin(void); + virtual const Math::Vector2f& GetViewportMax(void); + + virtual void SetClearColor(const Math::Vector4f& color); + virtual const Math::Vector4f& GetClearColor(void); + + virtual bool AttachedToParent(Group* pParent); + virtual bool RemoveFromParent(Group* pParent); + virtual void ParentMoved(Group* pParent); + + virtual const Frustum& GetFrustum(void); + +protected: + virtual void ValidateFrustum(void); + + Math::Vector4f _clearColor; + Math::Vector2f _minPos; + Math::Vector2f _maxPos; + Attribute _proj; + Attribute _frustum; +}; + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_CAMERA_H_ diff --git a/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelDrawable.h b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelDrawable.h new file mode 100644 index 0000000..44a6c8f --- /dev/null +++ b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelDrawable.h @@ -0,0 +1,71 @@ +// +// 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 FUiEffects_RendererEngineModelDrawable.h + * @brief Class of single graphical object which will be displayed on screen. + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_DRAWABLE_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_DRAWABLE_H_ + +#include +#include +#include +#include +#include + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +class Drawable: + public Node +{ +public: + Drawable(void); + virtual ~Drawable(void); + + virtual void Visit(Visitor& v) { v.OnDrawable(*this); } + + virtual void SetGeometry(GeometryPtr pGeom); + virtual GeometryPtr GetGeometry(void); + + virtual void SetMaterial(MaterialPtr pMat); + virtual MaterialPtr GetMaterial(void); + + virtual const Aabb& GetBoundBox(void); + virtual void InvalidateCache(void); + virtual void InvalidateBoundBox(void); + + virtual CachePtr GetCache(void); + virtual void SetCache(CachePtr pCache); + +protected: + virtual void ValidateBoundBox(void); + + GeometryPtr _pGeometry; + MaterialPtr _pMaterial; + + CachePtr _pCache; +}; + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_DRAWABLE_H_ diff --git a/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelExternalRenderInterface.h b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelExternalRenderInterface.h new file mode 100644 index 0000000..e0e5e44 --- /dev/null +++ b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelExternalRenderInterface.h @@ -0,0 +1,42 @@ +// +// 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 FUiEffects_RendererEngineModelExternalRenderInterface.h + * @brief Parent class for external (offscreen) rendering + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_EXTERNAL_RENDER_INTERFACE_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_EXTERNAL_RENDER_INTERFACE_H_ + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +class ExternalRenderInterface +{ +public: + ExternalRenderInterface(void) {} + virtual ~ExternalRenderInterface(void) {} + + virtual bool NeedRedraw(void) = 0; + virtual void Draw(void) = 0; +}; + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_EXTERNAL_RENDER_INTERFACE_H_ diff --git a/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelFloatArrayProperty.h b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelFloatArrayProperty.h new file mode 100644 index 0000000..0f185c8 --- /dev/null +++ b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelFloatArrayProperty.h @@ -0,0 +1,45 @@ +// +// 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 FUiEffects_RendererEngineModelFloatArrayProperty.h + * @brief Array of float shader property + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_FLOAT_ARRAY_PROPERTY_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_FLOAT_ARRAY_PROPERTY_H_ + +#include + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +class FloatArrayProperty: + public TypedArrayProperty +{ +public: + virtual void Visit(PropertyVisitor& v); +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr FloatArrayPropertyPtr; + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_FLOAT_ARRAY_PROPERTY_H_ diff --git a/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelFloatProperty.h b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelFloatProperty.h new file mode 100644 index 0000000..5935a38 --- /dev/null +++ b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelFloatProperty.h @@ -0,0 +1,52 @@ +// +// 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 FUiEffects_RendererEngineModelFloatProperty.h + * @brief Float shader property + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_FLOAT_PROPERTY_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_FLOAT_PROPERTY_H_ + +#include + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ +class FloatProperty: + public Property +{ +public: + virtual void Visit(PropertyVisitor& v) + { + v.OnFloatProperty(*this); + return; + } + + FloatProperty(void) {} + virtual ~FloatProperty(void) {} + + virtual float Get(void) const = 0; +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr FloatPropertyPtr; +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_FLOAT_PROPERTY_H_ diff --git a/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelFloatPropertyHolder.h b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelFloatPropertyHolder.h new file mode 100644 index 0000000..802ebca --- /dev/null +++ b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelFloatPropertyHolder.h @@ -0,0 +1,52 @@ +// +// 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 FUiEffects_RendererEngineModelFloatPropertyHolder.h + * @brief Class with data for float shader property + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_FLOAT_PROPERTY_HOLDER_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_FLOAT_PROPERTY_HOLDER_H_ + +#include + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +class FloatPropertyHolder: + public FloatProperty +{ +public: + FloatPropertyHolder(void); + virtual ~FloatPropertyHolder(void); + + virtual float Get(void) const; + void Set(float value); + +private: + float __value; +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr FloatPropertyHolderPtr; + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_FLOAT_PROPERTY_HOLDER_H_ diff --git a/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelForwardDeclaration.h b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelForwardDeclaration.h new file mode 100644 index 0000000..79856d5 --- /dev/null +++ b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelForwardDeclaration.h @@ -0,0 +1,75 @@ +// +// 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 FUiEffects_RendererEngineModelForwardDeclaration.h + * @brief Forward declarations of engine model classes + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_FORWARD_DECLARATION_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_FORWARD_DECLARATION_H_ + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +class Visitor; + +class Node; +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr NodePtr; + +class Group; +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr GroupPtr; + +class Camera; +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr CameraPtr; + +class Drawable; +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr DrawablePtr; + +class Cache; +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr CachePtr; + +class DrawableCache; +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr DrawableCachePtr; + +class BufferCache; +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr BufferCachePtr; + +class MaterialCache; +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr MaterialCachePtr; + +class PropertyCache; +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr PropertyCachePtr; + +class Material; +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr MaterialPtr; + +class Property; +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr PropertyPtr; + +class Geometry; +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr GeometryPtr; + +class Buffer; +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr BufferPtr; + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_FORWARD_DECLARATION_H_ diff --git a/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelFrustum.h b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelFrustum.h new file mode 100644 index 0000000..d2389f7 --- /dev/null +++ b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelFrustum.h @@ -0,0 +1,47 @@ +// +// 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 FUiEffects_RendererEngineModelFrustum.h + * @brief Class of frusrum for viewing camera + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_FRUSTUM_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_FRUSTUM_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +class Frustum +{ +public: + Frustum(void) {} + void Build(const Math::Matrix4f& proj, const Math::Matrix4f& world) { return; } + bool InIn(const Math::Vector3f& point) { return true; } + bool InIn(const Aabb& boundBox) { return true; } +protected: + Math::Vector4f _planes[6]; +}; + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_FRUSTUM_H_ diff --git a/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelGeometry.h b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelGeometry.h new file mode 100644 index 0000000..97fea7f --- /dev/null +++ b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelGeometry.h @@ -0,0 +1,64 @@ +// +// 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 FUiEffects_RendererEngineModelGeometry.h + * @brief Class with geometry data for rendering + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_GEOMETRY_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_GEOMETRY_H_ + +#include +#include +#include +#include + +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +class Geometry +{ +public: + Geometry(void) {} + virtual ~Geometry(void) {} + + virtual BufferPtr GetBuffer(const std::string& name) const = 0; + virtual BufferPtr GetIndexBuffer(void) const = 0; + virtual IndexBuffer::PrimitiveType::Value GetPrimitiveType(void) const = 0; + virtual const Aabb& GetBoundBox(void) const = 0; + + virtual void AttachedToDrawable(Drawable*); + virtual void RemovedFromDrawable(Drawable*); + virtual void TouchDrawables(void); + virtual void TouchDrawablesBoundBox(void); + +protected: + typedef std::vector DrawablesListType; + typedef DrawablesListType::iterator DrawablesListIteratorType; + typedef DrawablesListType::size_type DrawablesListSizeType; + + DrawablesListType _drawables; +}; + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_GEOMETRY_H_ diff --git a/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelGroup.h b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelGroup.h new file mode 100644 index 0000000..75e127e --- /dev/null +++ b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelGroup.h @@ -0,0 +1,79 @@ +// +// 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 FUiEffects_RendererEngineModelGroup.h + * @brief Class represents Node which can hold child nodes + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_GROUP_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_GROUP_H_ + +#include +#include +#include + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +class Group: + public Node +{ +public: + typedef std::vector ChildrenListType; + typedef ChildrenListType::size_type ChildrenListSizeType; + + Group(void); + + virtual ~Group(void); + + virtual void Visit(Visitor& v); + + virtual bool AddChild(NodePtr pChild); + virtual bool RemoveChild(NodePtr pChild); + virtual void Clear(void); + virtual ChildrenListSizeType ChildrenCount(); + virtual bool RemoveChild(ChildrenListSizeType index); + virtual NodePtr GetChild(ChildrenListSizeType index); + + virtual void InvalidateBoundBox(void); //called to inform that child bounds or position changed + virtual const Aabb& GetBoundBox(void); + + virtual void SetWorld(const Math::Matrix4f& arg); + virtual void SetLocal(const Math::Matrix4f& arg); + + virtual bool AttachedToParent(Group* pParent); + virtual bool RemoveFromParent(Group* pParent); + virtual void ParentMoved(Group* pParent); + +protected: + virtual void ValidateBoundBox(void); + +private: + void InternalRemoveChild(ChildrenListSizeType index); + +protected: + bool _invalidBoundBox; + ChildrenListType _children; +}; + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_GROUP_H_ diff --git a/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelIntProperty.h b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelIntProperty.h new file mode 100644 index 0000000..294034e --- /dev/null +++ b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelIntProperty.h @@ -0,0 +1,52 @@ +// +// 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 FUiEffects_RendererEngineModelIntProperty.h + * @brief Int shader property + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_INT_PROPERTY_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_INT_PROPERTY_H_ + +#include + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ +class IntProperty: + public Property +{ +public: + virtual void Visit(PropertyVisitor& v) + { + v.OnIntProperty(*this); + return; + } + + IntProperty(void) {} + virtual ~IntProperty(void) {} + + virtual long Get(void) const = 0; +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr IntPropertyPtr; +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_INT_PROPERTY_H_ diff --git a/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelIntPropertyHolder.h b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelIntPropertyHolder.h new file mode 100644 index 0000000..aa9259a --- /dev/null +++ b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelIntPropertyHolder.h @@ -0,0 +1,69 @@ +// +// 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 FUiEffects_RendererEngineModelIntPropertyHolder.h + * @brief Class with data for long shader property + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_INT_PROPERTY_HOLDER_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_INT_PROPERTY_HOLDER_H_ + +#include + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +class IntPropertyHolder: + public IntProperty +{ +public: + IntPropertyHolder(void) + : __value(0.0f) + { + + } + + virtual ~IntPropertyHolder(void) + { + + } + + virtual long Get(void) const + { + return __value; + } + + void Set(long value) + { + __value = value; + + return; + } + +private: + long __value; +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr IntPropertyHolderPtr; + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_INT_PROPERTY_HOLDER_H_ diff --git a/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelMaterial.h b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelMaterial.h new file mode 100644 index 0000000..0d6ff7b --- /dev/null +++ b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelMaterial.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 FUiEffects_RendererEngineModelMaterial.h + * @brief Represents shader with its properties for rendering drawable objects in scene + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_MATERIAL_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_MATERIAL_H_ + +#include +#include + +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +class Material +{ +public: + Material(void) {} + virtual ~Material(void) {} + + virtual PropertyPtr GetProperty(const std::string&) = 0; + virtual PropertyPtr GetProperty(size_t index) = 0; + virtual size_t GetNumProperties(void) = 0; + + virtual void AttachedToDrawable(Drawable*); + virtual void RemovedFromDrawable(Drawable*); + virtual void TouchDrawables(void); + +protected: + typedef std::vector DrawablesListType; + typedef DrawablesListType::iterator DrawablesListIteratorType; + typedef DrawablesListType::size_type DrawablesListSizeType; + + DrawablesListType _drawables; +}; + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_MATERIAL_H_ diff --git a/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelMatrix4fProperty.h b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelMatrix4fProperty.h new file mode 100644 index 0000000..0d757e8 --- /dev/null +++ b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelMatrix4fProperty.h @@ -0,0 +1,57 @@ +// +// 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 FUiEffects_RendererEngineModelMatrix4fProperty.h + * @brief mat4 shader property class + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_MATRIX4F_PROPERTY_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_MATRIX4F_PROPERTY_H_ + +#include +#include + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +class Matrix4fProperty: + public Property +{ +public: + typedef Math::Matrix4f MatrixType; + + virtual void Visit(PropertyVisitor& v) + { + v.OnMatrix4fProperty(*this); + return; + } + + Matrix4fProperty(void) {} + virtual ~Matrix4fProperty(void) {} + + virtual const MatrixType& Get(void) const = 0; +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr MatrixPropertyPtr; + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_MATRIX4F_PROPERTY_H_ diff --git a/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelMatrix4fPropertyHolder.h b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelMatrix4fPropertyHolder.h new file mode 100644 index 0000000..68244a2 --- /dev/null +++ b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelMatrix4fPropertyHolder.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 FUiEffects_RendererEngineModelMatrix4fPropertyHolder.h + * @brief Class with data for Matrix4fProperty + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_MATRIX4F_PROPERTY_HOLDER_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_MATRIX4F_PROPERTY_HOLDER_H_ + +#include + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +class Matrix4fPropertyHolder: + public Matrix4fProperty +{ +public: + typedef Matrix4fProperty::MatrixType MatrixType; + + Matrix4fPropertyHolder(void); + virtual ~Matrix4fPropertyHolder(void); + + virtual const MatrixType& Get(void) const; + + void Set(const MatrixType& matrix); + void Set(const float a11, const float a12, const float a13, const float a14, + const float a21, const float a22, const float a23, const float a24, + const float a31, const float a32, const float a33, const float a34, + const float a41, const float a42, const float a43, const float a44); + +private: + MatrixType __matrix; +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr Matrix4fPropertyHolderPtr; + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_MATRIX4F_PROPERTY_HOLDER_H_ diff --git a/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelNode.h b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelNode.h new file mode 100644 index 0000000..64d6477 --- /dev/null +++ b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelNode.h @@ -0,0 +1,90 @@ +// +// 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 FUiEffects_RendererEngineModelNode.h + * @brief Base class for single object in scene tree for rendering. Has its own transformation matrix; + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_NODE_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_NODE_H_ + +#include + +#include +#include +#include +#include + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +class Node: + private Tizen::Ui::Effects::_Renderer::System::NonCopyable +{ +public: + class TransformationType + { + public: + enum TransformationTypeEnum + { + WORLD = 0, + RELATED + }; + typedef TransformationTypeEnum Value; + }; + + Node(void); + virtual ~Node(void); + + virtual void Visit(Visitor& visitor); + + virtual const Math::Matrix4f& GetLocal(void); + virtual void SetLocal(const Math::Matrix4f& arg); + + virtual const Math::Matrix4f& GetWorld(void); + virtual void SetWorld(const Math::Matrix4f& arg); + + virtual const Aabb& GetBoundBox(void); + virtual Aabb GetBoundBoxInParentSpace(void); //get bound box transformed in _pParent space + + virtual bool AttachedToParent(Group* pParent); //called when inserted in _pParent (call from _pParent) + virtual bool RemoveFromParent(Group* pParent); //called when removed from _pParent (call from _pParent) + virtual void ParentMoved(Group* pParent); //called when _pParent position changed (call from _pParent) + + virtual void TouchParentBoundBox(); //call when position or bound box changed + +protected: + virtual void ValidateLocal(void); + virtual void ValidateWorld(void); + + Group* _pParent; + + Attribute _relatedTransform; + Attribute _worldTransform; + Attribute _boundBox; + + TransformationType::Value _transformType; + Math::Matrix4f _transformMatrix; +}; + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_NODE_H_ diff --git a/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelProgramProperty.h b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelProgramProperty.h new file mode 100644 index 0000000..3bf04e5 --- /dev/null +++ b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelProgramProperty.h @@ -0,0 +1,77 @@ +// +// 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 FUiEffects_RendererEngineModelProgramProperty.h + * @brief Shader property for material + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_PROGRAM_PROPERTY_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_PROGRAM_PROPERTY_H_ + +#include +#include +#include +#include +#include + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +class ProgramProperty: + public Property +{ +public: + virtual void Visit(PropertyVisitor& v) {v.OnProgramProperty(*this);} + + ProgramProperty(void) {} + virtual ~ProgramProperty() + { + if (__pCache) + { + __pCache->Die(); + } + } + + virtual ShaderPropertyPtr GetShader(ShaderProperty::ShaderType::Value type) = 0; + + virtual CachePtr GetCache(void) + { + return __pCache; + } + virtual void SetCache(CachePtr pCache) + { + if (__pCache) + { + __pCache->Die(); + } + __pCache = pCache; + return; + } + +private: + CachePtr __pCache; +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr ProgramPropertyPtr; + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_PROGRAM_PROPERTY_H_ diff --git a/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelProperty.h b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelProperty.h new file mode 100644 index 0000000..e569a5c --- /dev/null +++ b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelProperty.h @@ -0,0 +1,49 @@ +// +// 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 FUiEffects_RendererEngineModelProperty.h + * @brief Base class for material property + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_PROPERTY_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_PROPERTY_H_ + +#include +#include +#include + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +class Property +{ +public: + Property(void); + virtual ~Property(void); + + virtual void Visit(PropertyVisitor& v); +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr PropertyPtr; + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_PROPERTY_H_ diff --git a/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelPropertyHolderMaterial.h b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelPropertyHolderMaterial.h new file mode 100644 index 0000000..7421125 --- /dev/null +++ b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelPropertyHolderMaterial.h @@ -0,0 +1,61 @@ +// +// 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 FUiEffects_RendererEngineModelPropertyHolderMaterial.h + * @brief Class which holds _properties of material + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_PROPERTY_HOLDER_MATERIAL_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_PROPERTY_HOLDER_MATERIAL_H_ + +#include +#include + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +class PropertyHolderMaterial: + public Material +{ +public: + typedef std::vector > PropertyListType; + typedef PropertyListType::size_type PropertyListSizeType; + + PropertyHolderMaterial(void); + virtual ~PropertyHolderMaterial(void); + + virtual PropertyPtr GetProperty(const std::string&); + virtual PropertyPtr GetProperty(PropertyListSizeType index); + virtual PropertyListSizeType GetNumProperties(); + + void AddProperty(const std::string& name, PropertyPtr pProperty); + void RemoveProperty(const std::string& name); + void RemoveProperty(PropertyListSizeType index); + +protected: + PropertyListType _properties; +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr PropertyHolderMaterialPtr; + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_PROPERTY_HOLDER_MATERIAL_H_ diff --git a/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelPropertyVisitor.h b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelPropertyVisitor.h new file mode 100644 index 0000000..5eafab5 --- /dev/null +++ b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelPropertyVisitor.h @@ -0,0 +1,75 @@ +// +// 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 FUiEffects_RendererEngineModelPropertyVisitor.h + * @brief Base class for property visitor + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_PROPERTY_VISITOR_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_PROPERTY_VISITOR_H_ + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +class Property; +class TextureProperty; +class Texture2dProperty; +class Texture2dAttachmentProperty; +class Texture2DNativeProperty; +class Texture2DVideoProperty; +class ShaderProperty; +class ProgramProperty; +class Matrix4fProperty; +class Vector2fProperty; +class Vector3fProperty; +class Vector4fProperty; +class IntProperty; +class FloatProperty; +class AlphaBlendProperty; +class Texture2DNativeSwitcherProperty; +class FloatArrayProperty; + +class PropertyVisitor +{ +public: + PropertyVisitor(void) {} + virtual ~PropertyVisitor(void) {} + + virtual void OnProperty(Property&) {} + virtual void OnTextureProperty(TextureProperty&) {} + virtual void OnTexture2DProperty(Texture2dProperty&) {} + virtual void OnTexture2DAttachmentProperty(Texture2dAttachmentProperty&) {} + virtual void OnTexture2DNativeProperty(Texture2DNativeProperty&) {} + virtual void OnTexture2DVideoProperty(Texture2DVideoProperty&) {} + virtual void OnShaderProperty(ShaderProperty&) {} + virtual void OnProgramProperty(ProgramProperty&) {} + virtual void OnMatrix4fProperty(Matrix4fProperty&) {} + virtual void OnVector2fProperty(Vector2fProperty&) {} + virtual void OnVector3fProperty(Vector3fProperty&) {} + virtual void OnVector4fProperty(Vector4fProperty&) {} + virtual void OnIntProperty(IntProperty&) {} + virtual void OnFloatProperty(FloatProperty&) {} + virtual void OnAlphaBlendProperty(AlphaBlendProperty&) {} + virtual void OnTexture2DNativeSwitcherProperty(Texture2DNativeSwitcherProperty&) {} + virtual void OnFloatArrayProperty(FloatArrayProperty&) {} +}; + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_PROPERTY_VISITOR_H_ diff --git a/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelRenderTarget.h b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelRenderTarget.h new file mode 100644 index 0000000..360c591 --- /dev/null +++ b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelRenderTarget.h @@ -0,0 +1,129 @@ +// +// 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 FUiEffects_RendererEngineModelRenderTarget.h + * @brief Base class for representing renderer output instance e.g. for offscreen rendering + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_RENDER_TARGET_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_RENDER_TARGET_H_ + +#include +#include +#include + +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +class RenderTargetVisitor; + +class RenderTarget +{ +public: + class Attachment + { + public: + enum AttachmentEnum + { + COLOR_0 = 0 , + COLOR_1 , + COLOR_2 , + COLOR_3 , + COLOR_4 , + COLOR_5 , + COLOR_6 , + COLOR_7 , + DEPTH , + STENCIL , + ATTACHMENT_MAX + }; + typedef AttachmentEnum Value; + }; + + struct AttachInfo: private Tizen::Ui::Effects::_Renderer::System::NonCopyable + { + public: + enum TextureType {TEXTURE_2D = 0, STUB}; + AttachInfo(void) {} + + void Set(Texture2dAttachmentProperty* pTexture, size_t mipLevel) + { + textureType = TEXTURE_2D; + textureInfo.texture2D.pTexture = pTexture; + textureInfo.texture2D.mipLevel = mipLevel; + return; + } + + void Set(StubAttachment* pStub) + { + textureType = STUB; + textureInfo.stub.pStub = pStub; + return; + } + + TextureType textureType; + union _textureInfo + { + struct _Texture2D + { + Texture2dAttachmentProperty* pTexture; + size_t mipLevel; + } texture2D; + struct _Stub + { + StubAttachment* pStub; + } stub; + } textureInfo; + }; + + RenderTarget(void); + virtual ~RenderTarget(void); + + virtual void Visit(RenderTargetVisitor& v); + + virtual void AttachTexture2D(Attachment::Value attachment, Texture2DAttachmentPropertyPtr pTexture, size_t mipLevel); + virtual void AttachStub(Attachment::Value attachment, StubAttachmentPtr pStub); + virtual void Detach(Attachment::Value attachment); + virtual AttachInfo* GetAttachment(Attachment::Value attachment); + + unsigned int GetWidth(void); + unsigned int GetHeight(void); + void SetSize(unsigned int width, unsigned int height); + + virtual CachePtr GetCache(void); + virtual void SetCache(CachePtr pCache); + +protected: + unsigned int _width; + unsigned int _height; + AttachInfo _attachments[RenderTarget::Attachment::ATTACHMENT_MAX]; + TextureAttachmentPtr _pTextures[RenderTarget::Attachment::ATTACHMENT_MAX]; + +private: + CachePtr __pCache; +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr RenderTargetPtr; + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_RENDER_TARGET_H_ diff --git a/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelRenderTargetExternalRender.h b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelRenderTargetExternalRender.h new file mode 100644 index 0000000..1e33171 --- /dev/null +++ b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelRenderTargetExternalRender.h @@ -0,0 +1,53 @@ +// +// 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 FUiEffects_RendererEngineModelRenderTargetExternalRender.h + * @brief Class for rendering with external renderer + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_RENDER_TARGET_EXTERNAL_RENDER_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_RENDER_TARGET_EXTERNAL_RENDER_H_ + +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +class RenderTargetExternalRender: + public RenderTarget +{ +public: + RenderTargetExternalRender(void); + virtual ~RenderTargetExternalRender(void); + + virtual void Visit(RenderTargetVisitor& v); + + virtual void SetExternalRender(ExternalRenderInterface* pExternalRender); + virtual ExternalRenderInterface* GetExternalRender(void); + +protected: + ExternalRenderInterface* _pExternalRender; +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr RenderTargetExternalRenderPtr; + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_RENDER_TARGET_EXTERNAL_RENDER_H_ diff --git a/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelRenderTargetVisitor.h b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelRenderTargetVisitor.h new file mode 100644 index 0000000..7ca2055 --- /dev/null +++ b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelRenderTargetVisitor.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 FUiEffects_RendererEngineModelRenderTargetVisitor.h + * @brief Base class for renderer target visitor + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_RENDER_TARGET_VISITOR_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_RENDER_TARGET_VISITOR_H_ + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +class RenderTarget; +class RenderTargetExternalRender; +class RenderTargetFromCamera; + +class RenderTargetVisitor +{ +public: + RenderTargetVisitor(void) {} + virtual ~RenderTargetVisitor(void) {} + + virtual void OnRenderTarget(RenderTarget&) {} + virtual void OnRenderTargetExternalRender(RenderTargetExternalRender&) {} +}; + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_RENDER_TARGET_VISITOR_H_ diff --git a/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelShaderHolderProgramProperty.h b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelShaderHolderProgramProperty.h new file mode 100644 index 0000000..7bb8784 --- /dev/null +++ b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelShaderHolderProgramProperty.h @@ -0,0 +1,52 @@ +// +// 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 FUiEffects_RendererEngineModelShaderHolderProgramProperty.h + * @brief Class for particular shader (vertex, fragment, ...) of rendering program ("shader") + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_SHADER_HOLDER_PROGRAM_PROPERTY_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_SHADER_HOLDER_PROGRAM_PROPERTY_H_ + +#include + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +class ShaderHolderProgramProperty: + public ProgramProperty +{ +public: + ShaderHolderProgramProperty(ShaderPropertyPtr pVertexShader, ShaderPropertyPtr pFragmentShader); + virtual ~ShaderHolderProgramProperty(void); + + virtual ShaderPropertyPtr GetShader(ShaderProperty::ShaderType::Value type); + +protected: + ShaderPropertyPtr _pVertexShader; + ShaderPropertyPtr _pFragmentShader; +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr ShaderHolderProgramPropertyPtr; + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_SHADER_HOLDER_PROGRAM_PROPERTY_H_ diff --git a/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelShaderProperty.h b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelShaderProperty.h new file mode 100644 index 0000000..a08c4f8 --- /dev/null +++ b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelShaderProperty.h @@ -0,0 +1,105 @@ +// +// 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 FUiEffects_RendererEngineModelShaderProperty.h + * @brief Class for shader source property + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_SHADER_PROPERTY_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_SHADER_PROPERTY_H_ + +#include +#include +#include +#include + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +class ShaderProperty: + public Property +{ +public: + class DataType + { + public: + enum DataTypeEnum + { + SOURCE_CODE = 0, + BINARY_DATA + }; + typedef DataTypeEnum Value; + }; + + class ShaderType + { + public: + enum ShaderTypeEnum + { + VERTEX = 0, + FRAGMENT + }; + typedef ShaderTypeEnum Value; + }; + + virtual void Visit(PropertyVisitor& v) + { + v.OnShaderProperty(*this); + return; + } + + ShaderProperty(void) {} + virtual ~ShaderProperty(void) + { + if (__pCache) + { + __pCache->Die(); + } + } + + virtual const void* GetData(void) = 0; + virtual DataType::Value GetDataType(void) = 0; + virtual ShaderType::Value GetShaderType(void) = 0; + + virtual CachePtr GetCache(void) + { + return __pCache; + } + + virtual void SetCache(CachePtr pCache) + { + if (__pCache) + { + __pCache->Die(); + } + __pCache = pCache; + return; + } + +private: + CachePtr __pCache; +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr ShaderPropertyPtr; + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_SHADER_PROPERTY_H_ diff --git a/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelStringShaderProperty.h b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelStringShaderProperty.h new file mode 100644 index 0000000..f05db1a --- /dev/null +++ b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelStringShaderProperty.h @@ -0,0 +1,56 @@ +// +// 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 FUiEffects_RendererEngineModelStringShaderProperty.h + * @brief Class for shader string _source property + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_STRING_SHADER_PROPERTY_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_STRING_SHADER_PROPERTY_H_ + +#include + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +class StringShaderProperty: + public ShaderProperty +{ +public: + StringShaderProperty(ShaderProperty::ShaderType::Value shaderType, const std::string& source); + virtual ~StringShaderProperty(void); + + virtual const void* GetData(void); + std::string GetSource(void) const; + void SetSource(std::string source); + virtual DataType::Value GetDataType(void); + virtual ShaderType::Value GetShaderType(void); + +protected: + ShaderProperty::ShaderType::Value _shaderType; + std::string _source; +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr StringShaderPropertyPtr; + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_STRING_SHADER_PROPERTY_H_ diff --git a/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelStubAttachment.h b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelStubAttachment.h new file mode 100644 index 0000000..4f3f0b6 --- /dev/null +++ b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelStubAttachment.h @@ -0,0 +1,58 @@ +// +// 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 FUiEffects_RendererEngineModelStubAttachment.h + * @brief Stub texture for renderer target + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_STUB_ATTACHMENT_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_STUB_ATTACHMENT_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +class StubAttachment: + public TextureAttachment +{ +public: + StubAttachment(TextureProperty::InternalFormat::Value internalFormat = TextureProperty::InternalFormat::DEPTH_COMPONENT_16); + virtual ~StubAttachment(void); + + virtual CachePtr GetCache(void); + virtual void SetCache(CachePtr pCache); + virtual void TouchCache(void); + + virtual TextureProperty::InternalFormat::Value GetInternalFormat(void); + +protected: + TextureProperty::InternalFormat::Value _internalFormat; + +private: + CachePtr __pCache; +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr StubAttachmentPtr; + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_STUB_ATTACHMENT_H_ diff --git a/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelTexture2DAttachmentProperty.h b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelTexture2DAttachmentProperty.h new file mode 100644 index 0000000..8ad5627 --- /dev/null +++ b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelTexture2DAttachmentProperty.h @@ -0,0 +1,88 @@ +// +// 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 FUiEffects_RendererEngineModelTexture2DAttachmentProperty.h + * @brief Texture property for renderer target + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_TEXTURE2D_ATTACHMENT_PROPERTY_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_TEXTURE2D_ATTACHMENT_PROPERTY_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +class Texture2dAttachmentProperty: + public TextureProperty, + public TextureAttachment +{ +public: + virtual void Visit(PropertyVisitor& v); + + Texture2dAttachmentProperty( + bool generateMipmaps = false, + InternalFormat::Value internalFormat = InternalFormat::RGB, + DataFormat::Value dataFormat = DataFormat::RGB, + DataType::Value dataType = DataType::UNSIGNED_BYTE, + FilterType::Value minFilter = FilterType::LINEAR, + FilterType::Value magFilter = FilterType::LINEAR, + WrapType::Value wrapS = WrapType::CLAMP_TO_EDGE, + WrapType::Value wrapT = WrapType::CLAMP_TO_EDGE); + + virtual ~Texture2dAttachmentProperty(void); + + void SetMipmapGeneration(bool generateMipmaps); + + bool GetGenerateMipmaps(void) const; + + virtual InternalFormat::Value GetInternalFormat(void) const; + virtual DataFormat::Value GetDataFormat(void) const; + virtual DataType::Value GetDataType(void) const; + virtual FilterType::Value GetMinFilter(void) const; + virtual FilterType::Value GetMagFilter(void) const; + virtual WrapType::Value GetWrapS(void) const; + virtual WrapType::Value GetWrapT(void) const; + virtual WrapType::Value GetWrapR(void) const; + + virtual CachePtr GetCache(void); + virtual void SetCache(CachePtr pCache); + virtual void TouchCache(void); + +protected: + bool _generateMipmaps; + InternalFormat::Value _internalFormat; + DataFormat::Value _dataFormat; + DataType::Value _dataType; + FilterType::Value _minFilter; + FilterType::Value _magFilter; + WrapType::Value _wrapS; + WrapType::Value _wrapT; + +private: + CachePtr __pCache; +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr Texture2DAttachmentPropertyPtr; + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_TEXTURE2D_ATTACHMENT_PROPERTY_H_ diff --git a/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelTexture2DProperty.h b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelTexture2DProperty.h new file mode 100644 index 0000000..73e284e --- /dev/null +++ b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelTexture2DProperty.h @@ -0,0 +1,63 @@ +// +// 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 FUiEffects_RendererEngineModelTexture2DProperty.h + * @brief 2D texture property in material + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_TEXTURE2D_PROPERTY_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_TEXTURE2D_PROPERTY_H_ + +#include +#include +#include +#include + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ +class Texture2dProperty: + public TextureProperty +{ +public: + virtual void Visit(PropertyVisitor& v); + + Texture2dProperty(void); + virtual ~Texture2dProperty(void); + + virtual size_t GetNumMipmaps(void) const = 0; + virtual void* GetData(size_t mipNumber) = 0; + virtual size_t GetWidth(size_t mipNumber) const = 0; + virtual size_t GetHeight(size_t mipNumber) const = 0; + virtual bool GenerateMipmaps(void) const = 0; + + virtual CachePtr GetCache(void); + virtual void SetCache(CachePtr pCache); + virtual void TouchCache(void); + +private: + CachePtr __pCache; +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr Texture2DPropertyPtr; + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_TEXTURE2D_PROPERTY_H_ diff --git a/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelTextureAttachment.h b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelTextureAttachment.h new file mode 100644 index 0000000..e0fbf86 --- /dev/null +++ b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelTextureAttachment.h @@ -0,0 +1,57 @@ +// +// 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 FUiEffects_RendererEngineModelTextureAttachment.h + * @brief Texture attachment for renderer target + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_TEXTURE_ATTACHMENT_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_TEXTURE_ATTACHMENT_H_ + +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +class RenderTarget; + +class TextureAttachment +{ +public: + TextureAttachment(void) {} + virtual ~TextureAttachment(void) {} + + typedef std::vector RenderTargetListType; + typedef RenderTargetListType::size_type RenderTargetListSizeType; + + virtual bool AttachedToRenderTarget(RenderTarget* pRenderTarget); + virtual bool RemovedFromRenderTarget(RenderTarget* pRenderTarget); + virtual RenderTargetListSizeType GetNumRenderTargets(void); + virtual RenderTarget* GetRenderTarget(RenderTargetListSizeType index); + +protected: + RenderTargetListType _targets; +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr TextureAttachmentPtr; + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_TEXTURE_ATTACHMENT_H_ diff --git a/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelTextureProperty.h b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelTextureProperty.h new file mode 100644 index 0000000..43a5582 --- /dev/null +++ b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelTextureProperty.h @@ -0,0 +1,139 @@ +// +// 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 FUiEffects_RendererEngineModelTextureProperty.h + * @brief Texture property in material + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_TEXTURE_PROPERTY_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_TEXTURE_PROPERTY_H_ + +#include +#include + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +class TextureProperty: + public Property +{ +public: + virtual void Visit(PropertyVisitor& v); + + class InternalFormat + { + public: + enum InternalFormatEnum //Number of colour components + { + ONE_COMPONENT = 0 , + TWO_COMPONENTS , + THREE_COMPONENTS , + FOUR_COMPONENTS , + DEPTH_COMPONENT , + DEPTH_COMPONENT_16 , + DEPTH_COMPONENT_24 , + DEPTH_COMPONENT_32 , + RGB , + RGBA , + BGRA + }; + typedef InternalFormatEnum Value; + }; + + class DataFormat + { + public: + enum DataFormatEnum //Format of the pixel data + { + RGB = 0 , + BGR , + RGBA , + BGRA , + LUMINANCE , + LUMINANCE_ALPHA + }; + typedef DataFormatEnum Value; + }; + + class DataType + { + public: + enum DataTypeEnum //Data type of pixel data + { + UNSIGNED_BYTE = 0 , + BYTE , + UNSIGNED_SHORT , + SHORT , + UNSIGNED_INT , + INT , + FLOAT , + UNSIGNED_SHORT_565 + }; + typedef DataTypeEnum Value; + }; + + class FilterType + { + public: + enum FilterTypeEnum + { + NEAREST = 0 , + LINEAR , + NEAREST_MIPMAP_NEAREST , + LINEAR_MIPMAP_NEAREST , + NEAREST_MIPMAP_LINEAR , + LINEAR_MIPMAP_LINEAR + }; + typedef FilterTypeEnum Value; + }; + + class WrapType + { + public: + enum WrapTypeEnum + { + CLAMP = 0 , + CLAMP_TO_BORDER , + CLAMP_TO_EDGE , + MIRRORED_REPEAT , + REPEAT + }; + typedef WrapTypeEnum Value; + }; + + TextureProperty(void); + virtual ~TextureProperty(void); + + virtual InternalFormat::Value GetInternalFormat(void) const = 0; + virtual DataFormat::Value GetDataFormat(void) const = 0; + virtual DataType::Value GetDataType(void) const = 0; + virtual FilterType::Value GetMinFilter(void) const = 0; + virtual FilterType::Value GetMagFilter(void) const = 0; + virtual WrapType::Value GetWrapS(void) const = 0; + virtual WrapType::Value GetWrapT(void) const = 0; + virtual WrapType::Value GetWrapR(void) const = 0; +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr TexturePropertyPtr; + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_TEXTURE_PROPERTY_H_ diff --git a/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelTypedArrayProperty.h b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelTypedArrayProperty.h new file mode 100644 index 0000000..61415d0 --- /dev/null +++ b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelTypedArrayProperty.h @@ -0,0 +1,49 @@ +// +// 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 FUiEffects_RendererEngineModelTypedArrayProperty.h + * @brief Array of some type property + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_TYPED_ARRAY_PROPERTY_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_TYPED_ARRAY_PROPERTY_H_ + +#include + +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +template +class TypedArrayProperty: + public Property +{ +public: + typedef T HoldedType; + typedef unsigned int SizeType; + + virtual T* GetData(void) = 0; + virtual SizeType GetNumElements(void) = 0; +}; + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_TYPED_ARRAY_PROPERTY_H_ diff --git a/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelTypedArrayPropertyHolder.h b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelTypedArrayPropertyHolder.h new file mode 100644 index 0000000..81ceb64 --- /dev/null +++ b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelTypedArrayPropertyHolder.h @@ -0,0 +1,79 @@ +// +// 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 FUiEffects_RendererEngineModelTypedArrayPropertyHolder.h + * @brief Class with data for array of some type property + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_TYPED_ARRAY_PROPERTY_HOLDER_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_TYPED_ARRAY_PROPERTY_HOLDER_H_ + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +template +class TypedArrayPropertyHolder: + public Base +{ +public: + typedef typename Base::HoldedType ValueType; + typedef typename Base::SizeType SizeType; + typedef typename SmartPtr> BufferPtr; + + TypedArrayPropertyHolder(SizeType elementsCount): + _elementsMaxCount(elementsCount), + _elementsCount(elementsCount), + bufferPtr(new (std::nothrow) BufferPtr) + { + _TryJmp(GetImpl(bufferPtr) != null, E_OUT_OF_MEMORY, "TypedArrayPropertyHolder buffer = null"); + + bufferPtr->resize(_elementsMaxCount); + } + + virtual ~TypedArrayPropertyHolder(void) + { + + } + + virtual ValueType* GetData(void) + { + return &(*bufferPtr)[0]; + } + + virtual SizeType GetNumElements(void) + { + return _elementsCount; + } + + virtual void SetActualSize(SizeType elementsCount) + { + _elementsCount = elementsCount > _elementsMaxCount ? _elementsMaxCount : elementsCount; + } + +protected: + SizeType _elementsMaxCount; + SizeType _elementsCount; + BufferPtr bufferPtr; +}; + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_TYPED_ARRAY_PROPERTY_HOLDER_H_ diff --git a/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelVector2fProperty.h b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelVector2fProperty.h new file mode 100644 index 0000000..b4da316 --- /dev/null +++ b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelVector2fProperty.h @@ -0,0 +1,57 @@ +// +// 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 FUiEffects_RendererEngineModelVector2fProperty.h + * @brief vec2 shader property + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_VECTOR2F_PROPERTY_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_VECTOR2F_PROPERTY_H_ + +#include +#include + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +class Vector2fProperty: + public Property +{ +public: + typedef Math::Vector2f VectorType; + + virtual void Visit(PropertyVisitor& v) + { + v.OnVector2fProperty(*this); + return; + } + + Vector2fProperty(void) {} + virtual ~Vector2fProperty(void) {} + + virtual const VectorType& Get(void) const = 0; +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr Vector2fPropertyPtr; + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_VECTOR2F_PROPERTY_H_ diff --git a/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelVector2fPropertyHolder.h b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelVector2fPropertyHolder.h new file mode 100644 index 0000000..61a461f --- /dev/null +++ b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelVector2fPropertyHolder.h @@ -0,0 +1,56 @@ +// +// 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 FUiEffects_RendererEngineModelVector2fPropertyHolder.h + * @brief Class with data for vec2 shader property + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_VECTOR2F_PROPERTY_HOLDER_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_VECTOR2F_PROPERTY_HOLDER_H_ + +#include +#include + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +class Vector2fPropertyHolder: + public Vector2fProperty +{ +public: + typedef Vector2fProperty::VectorType VectorType; + + Vector2fPropertyHolder(void); + virtual ~Vector2fPropertyHolder(void); + + virtual const VectorType& Get(void) const; + void Set(const VectorType& vector); + void Set(float x, float y); + +private: + VectorType __vector; +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr Vector2fPropertyHolderPtr; + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_VECTOR2F_PROPERTY_HOLDER_H_ diff --git a/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelVector3fProperty.h b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelVector3fProperty.h new file mode 100644 index 0000000..af97c3a --- /dev/null +++ b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelVector3fProperty.h @@ -0,0 +1,57 @@ +// +// 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 FUiEffects_RendererEngineModelVector3fProperty.h + * @brief vec3 shader property + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_VECTOR3F_PROPERTY_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_VECTOR3F_PROPERTY_H_ + +#include +#include + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +class Vector3fProperty: + public Property +{ +public: + typedef Math::Vector3f VectorType; + + virtual void Visit(PropertyVisitor& v) + { + v.OnVector3fProperty(*this); + return; + } + + Vector3fProperty(void) {} + virtual ~Vector3fProperty(void) {} + + virtual const VectorType& Get(void) const = 0; +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr Vector3fPropertyPtr; + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_VECTOR3F_PROPERTY_H_ diff --git a/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelVector3fPropertyHolder.h b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelVector3fPropertyHolder.h new file mode 100644 index 0000000..099e762 --- /dev/null +++ b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelVector3fPropertyHolder.h @@ -0,0 +1,56 @@ +// +// 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 FUiEffects_RendererEngineModelVector3fPropertyHolder.h + * @brief Class with data for vec3 shader property + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_VECTOR3F_PROPERTY_HOLDER_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_VECTOR3F_PROPERTY_HOLDER_H_ + +#include +#include + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +class Vector3fPropertyHolder: + public Vector3fProperty +{ +public: + typedef Vector3fProperty::VectorType VectorType; + + Vector3fPropertyHolder(void); + virtual ~Vector3fPropertyHolder(void); + + virtual const VectorType& Get(void) const; + void Set(const VectorType& vector); + void Set(float x, float y, float z); + +private: + VectorType __vector; +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr Vector3fPropertyHolderPtr; + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_VECTOR3F_PROPERTY_HOLDER_H_ diff --git a/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelVector4fProperty.h b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelVector4fProperty.h new file mode 100644 index 0000000..2fdd6ee --- /dev/null +++ b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelVector4fProperty.h @@ -0,0 +1,57 @@ +// +// 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 FUiEffects_RendererEngineModelVector4fProperty.h + * @brief vec3 shader property + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_VECTOR4F_PROPERTY_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_VECTOR4F_PROPERTY_H_ + +#include +#include + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +class Vector4fProperty: + public Property +{ +public: + typedef Math::Vector4f VectorType; + + virtual void Visit(PropertyVisitor& v) + { + v.OnVector4fProperty(*this); + return; + } + + Vector4fProperty(void) {} + virtual ~Vector4fProperty(void) {} + + virtual const VectorType& Get(void) const = 0; +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr Vector4fPropertyPtr; + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_VECTOR4F_PROPERTY_H_ diff --git a/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelVector4fPropertyHolder.h b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelVector4fPropertyHolder.h new file mode 100644 index 0000000..04d235a --- /dev/null +++ b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelVector4fPropertyHolder.h @@ -0,0 +1,56 @@ +// +// 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 FUiEffects_RendererEngineModelVector4fPropertyHolder.h + * @brief Class with data for vec4 shader property + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_VECTOR4F_PROPERTY_HOLDER_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_VECTOR4F_PROPERTY_HOLDER_H_ + +#include +#include + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +class Vector4fPropertyHolder: + public Vector4fProperty +{ +public: + typedef Vector4fProperty::VectorType VectorType; + + Vector4fPropertyHolder(void); + virtual ~Vector4fPropertyHolder(void); + + virtual const VectorType& Get(void) const; + void Set(const VectorType& vector); + void Set(float x, float y, float z, float w); + +private: + VectorType __vector; +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr Vector4fPropertyHolderPtr; + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_VECTOR4F_PROPERTY_HOLDER_H_ diff --git a/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelVisitor.h b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelVisitor.h new file mode 100644 index 0000000..b8c4738 --- /dev/null +++ b/src/ui/effects/inc/renderer/engine-model/FUiEffects_RendererEngineModelVisitor.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 FUiEffects_RendererEngineModelVisitor.h + * @brief Base visitor class + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_VISITOR_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_VISITOR_H_ + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +class Visitor +{ +public: + Visitor(void) {} + virtual ~Visitor(void) {} + + virtual void OnNode(Node&) {} + virtual void OnGroup(Group&) {} + virtual void OnCamera(Camera&) {} + virtual void OnDrawable(Drawable&) {} +}; + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_ENGINE_MODEL_VISITOR_H_ diff --git a/src/ui/effects/inc/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineOpenGLImplementation.h b/src/ui/effects/inc/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineOpenGLImplementation.h new file mode 100644 index 0000000..5567e9e --- /dev/null +++ b/src/ui/effects/inc/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineOpenGLImplementation.h @@ -0,0 +1,67 @@ +// +// 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 FUiEffects_RendererGraphicsEngineOpenGLImplementation.h + * @brief OpenGL platform defines + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_OPENGL_IMPLEMENTATION_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_OPENGL_IMPLEMENTATION_H_ + +#include + +#if defined(_EFFECTS_SYSTEM_WINDOWS_) || defined(_EFFECTS_SYSTEM_LINUX_) +#define _EFFECTS_GRAPHICSENGINE_OPENGL_DESKTOP_ 1 +#ifndef GLEW_NO_GLU +#define GLEW_NO_GLU +#endif +#include +#if defined(_EFFECTS_SYSTEM_WINDOWS_) +#include +#elif defined(_EFFECTS_SYSTEM_LINUX_) +#include +#endif +#elif defined(_EFFECTS_SYSTEM_ANDROID_) || defined(_EFFECTS_SYSTEM_SLP_) +#define _EFFECTS_GRAPHICSENGINE_OPENGL_ES_ 1 +#ifndef GL_GLEXT_PROTOTYPES +#define GL_GLEXT_PROTOTYPES +#endif +#ifndef EGL_EGLEXT_PROTOTYPES +#define EGL_EGLEXT_PROTOTYPES +#endif +#ifndef GL_EXT_texture_format_BGRA8888 +#define GL_EXT_texture_format_BGRA8888 +#endif + +#include +#include +#include +#include +#include +#include + +#elif defined(_EFFECTS_SYSTEM_TIZEN_) // ps +#define _EFFECTS_GRAPHICSENGINE_OPENGL_ES_ 1 +#include +using namespace Tizen::Graphics::Opengl; + +#define GL_BGRA_EXT GL_BGRA +#endif + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_OPENGL_IMPLEMENTATION_H_ diff --git a/src/ui/effects/inc/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRender.h b/src/ui/effects/inc/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRender.h new file mode 100644 index 0000000..d8b4db3 --- /dev/null +++ b/src/ui/effects/inc/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRender.h @@ -0,0 +1,146 @@ +// +// 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 FUiEffects_RendererGraphicsEngineRender.h + * @brief Class for rendering scene tree + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_GRAPHICS_ENGINE_RENDER_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_GRAPHICS_ENGINE_RENDER_H_ + +#include +#include + +#include +#include +#include + +#include + +#include + +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace GraphicsEngine +{ + +class RenderDrawableCache; + +class Render: + public Tizen::Ui::Effects::_Renderer::EngineModel::Visitor +{ +public: + Render(void); + virtual ~Render(void); + + virtual void Draw(Tizen::Ui::Effects::_Renderer::EngineModel::Node& root, Tizen::Ui::Effects::_Renderer::EngineModel::Camera& camera); + virtual void Draw(Tizen::Ui::Effects::_Renderer::EngineModel::Node& root); + + virtual void ContextLost(void); + virtual void KillCache(RenderCacheImpl* pCache); + + GLenum& GetAlphaBlendSource() { return __alphaBlendSource; } + GLenum& GetAlphaBlendDestination() { return __alphaBlendDestination; } + void SetDefaultDepthTestState(bool isEnable); + + + //implementation dependent functions + virtual void OnGroup(Tizen::Ui::Effects::_Renderer::EngineModel::Group&); + virtual void OnDrawable(Tizen::Ui::Effects::_Renderer::EngineModel::Drawable&); + + void BuildCache(Tizen::Ui::Effects::_Renderer::EngineModel::Drawable&); + void BuildCache(Tizen::Ui::Effects::_Renderer::EngineModel::VertexBuffer&); + void BuildCache(Tizen::Ui::Effects::_Renderer::EngineModel::IndexBuffer&); + void BuildCache(Tizen::Ui::Effects::_Renderer::EngineModel::CompositeVertexBuffer&); + void BuildCache(Tizen::Ui::Effects::_Renderer::EngineModel::PartVertexBuffer&); + + void BuildCache(Tizen::Ui::Effects::_Renderer::EngineModel::Texture2dProperty&, GLuint); + void BuildCache(Tizen::Ui::Effects::_Renderer::EngineModel::ShaderProperty&); + void BuildCache(Tizen::Ui::Effects::_Renderer::EngineModel::ProgramProperty&); + + void BuildCache(Tizen::Ui::Effects::_Renderer::EngineModel::RenderTargetExternalRender&); + void BuildCache(Tizen::Ui::Effects::_Renderer::EngineModel::Texture2dAttachmentProperty&, GLuint); + void BuildCache(Tizen::Ui::Effects::_Renderer::EngineModel::StubAttachment&); + + void BuildCache(Tizen::Ui::Effects::_Renderer::EngineModel::AlphaBlendProperty&); + + void ManageCache(RenderCacheImplPtr pCache); + + RenderCommandPtr GetDefaultRenderCommand(const RenderProgramCache::UniformListValueType*); + + const Math::Matrix4f& GetWorldViewProjection(void); + + void InternalCollectInfo(Tizen::Ui::Effects::_Renderer::EngineModel::Node&); + +private: + void InternalKillDeadCaches(void); + void InternalPreDraw(void); + void InternalDraw(void); + void InternalPostDraw(void); + void InternalFindCameras(Tizen::Ui::Effects::_Renderer::EngineModel::Node&); + + Math::Matrix4f __worldViewProjection; + + typedef std::vector DrawableListType; + typedef std::map ExternalRenderTargetListType; + + ExternalRenderTargetListType __externalRenderTargets; + DrawableListType __drawables; + DrawableListType __blendDrawables; + Tizen::Ui::Effects::_Renderer::EngineModel::Camera* __pCamera; + bool __findCameraPass; + + typedef std::vector CacheListType; + typedef CacheListType::size_type CacheListSizeType; + CacheListType __caches; + + typedef std::vector DeadCacheListType; + typedef DeadCacheListType::size_type DeadCacheListSizeType; + DeadCacheListType __deadCaches; + + //States + GLenum __alphaBlendSource; + GLenum __alphaBlendDestination; + + bool __depthTestState; + + GLint __currentFrameBuffer; +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr RenderPtr; + +class SetWorldViewProjection: + public RenderCommand +{ +public: + SetWorldViewProjection(GLuint aLocation); + virtual ~SetWorldViewProjection() {} + + virtual void Apply(Render*); +private: + GLuint __location; +}; + +}}}}} //Tizen::Ui::Effects::_Renderer::GraphicsEngine + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_GRAPHICS_ENGINE_RENDER_H_ + diff --git a/src/ui/effects/inc/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderBufferCache.h b/src/ui/effects/inc/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderBufferCache.h new file mode 100644 index 0000000..d276cca --- /dev/null +++ b/src/ui/effects/inc/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderBufferCache.h @@ -0,0 +1,165 @@ +// +// 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 FUiEffects_RendererGraphicsEngineRenderBufferCache.h + * @brief Class for buffer caching + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_GRAPHICS_ENGINE_RENDER_BUFFER_CACHE_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_GRAPHICS_ENGINE_RENDER_BUFFER_CACHE_H_ + +#include +#include +#include + +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace GraphicsEngine +{ + +class Render; + +class IBufferCache: + public RenderCache +{ +public: + IBufferCache(Render* pRender); + virtual ~IBufferCache(void); + + static GLenum GetGlUsage(Tizen::Ui::Effects::_Renderer::EngineModel::SolidBufferStrategy::BufferUsage::Value usage); + static GLenum GetGlDataType(Tizen::Ui::Effects::_Renderer::EngineModel::TypedBufferStrategy::DataType::Value dataType); + static GLsizei GetGlDataTypeSize(Tizen::Ui::Effects::_Renderer::EngineModel::TypedBufferStrategy::DataType::Value dataType); + + virtual void DropCache(void); + virtual void DestroyCache(void); + +protected: + GLuint _bufferId; + GLenum _dataType; +}; + +class IndexBufferCache: + public IBufferCache +{ +public: + IndexBufferCache(Render* pRender, Tizen::Ui::Effects::_Renderer::EngineModel::IndexBuffer* pBuffer); + virtual ~IndexBufferCache(void); + + static GLenum GetGlPrimitiveType(Tizen::Ui::Effects::_Renderer::EngineModel::IndexBuffer::PrimitiveType::Value primitiveType); + + virtual void Die(void); + virtual void Validate(Render*); + virtual void DestroyCache(void); + + void DrawElements(Render*); + +private: + GLsizei __elementsCount; + GLenum __primitiveType; + Tizen::Ui::Effects::_Renderer::EngineModel::IndexBuffer* __pBuffer; +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr IndexBufferCachePtr; + +class VertexBufferCache: + public IBufferCache +{ +public: + VertexBufferCache(Render* pRender): IBufferCache(pRender) {} + virtual ~VertexBufferCache(void) {} + + virtual void BindToAttrib(Render*, GLuint index) = 0; + virtual void BindAsVertices(Render*) = 0; + virtual void BindAsColor(Render*) = 0; + virtual void BindAsTexCoord(Render*, GLuint stage) = 0; +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr VertexBufferCachePtr; + +class SolidVertexBufferCache: + public VertexBufferCache +{ +public: + SolidVertexBufferCache(Render *pRender, Tizen::Ui::Effects::_Renderer::EngineModel::VertexBuffer* pBuffer); + virtual ~SolidVertexBufferCache(void); + + virtual void Die(void); + virtual void Validate(Render*); + virtual void DestroyCache(); + + void BindToAttrib(Render*, GLuint index); + void BindAsVertices(Render*); + void BindAsColor(Render*); + void BindAsTexCoord(Render*, GLuint stage); + +private: + GLint __componentsPerElement; + Tizen::Ui::Effects::_Renderer::EngineModel::VertexBuffer* __pBuffer; +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr SolidVertexBufferCachePtr; + +class PartVertexBufferCache: + public VertexBufferCache +{ +public: + PartVertexBufferCache(Render *pRender, Tizen::Ui::Effects::_Renderer::EngineModel::PartVertexBuffer* pBuffer); + virtual ~PartVertexBufferCache(void); + + virtual void Die(void); + virtual void Validate(Render*); + virtual void DestroyCache(void); + + void BindToAttrib(Render*, GLuint index); + void BindAsVertices(Render*); + void BindAsColor(Render*); + void BindAsTexCoord(Render*, GLuint stage); + +private: + GLint __componentsPerElement; + GLsizei __stride; + GLvoid* __pOffset; + Tizen::Ui::Effects::_Renderer::EngineModel::PartVertexBuffer* __pBuffer; +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr PartVertexBufferCachePtr; + +class CompositeVertexBufferCache: + public IBufferCache +{ +public: + CompositeVertexBufferCache(Render *pRender, Tizen::Ui::Effects::_Renderer::EngineModel::CompositeVertexBuffer* pBuffer); + virtual ~CompositeVertexBufferCache(void); + + virtual void Die(void); + virtual void Validate(Render*); + virtual void DestroyCache(void); + + void Bind(Render*); + +private: + Tizen::Ui::Effects::_Renderer::EngineModel::CompositeVertexBuffer* __pBuffer; +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr CompositeVertexBufferCachePtr; + +}}}}} // Tizen::Ui::Effects::_Renderer::GraphicsEngine + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_GRAPHICS_ENGINE_RENDER_BUFFER_CACHE_H_ diff --git a/src/ui/effects/inc/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderCache.h b/src/ui/effects/inc/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderCache.h new file mode 100644 index 0000000..c9845e2 --- /dev/null +++ b/src/ui/effects/inc/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderCache.h @@ -0,0 +1,91 @@ +// +// 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 FUiEffects_RendererGraphicsEngineRenderCache.h + * @brief Class for rendering cache + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_GRAPHICS_ENGINE_RENDER_CACHE_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_GRAPHICS_ENGINE_RENDER_CACHE_H_ + +#include + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace GraphicsEngine +{ + +class Render; + +class RenderCacheImpl +{ +public: + RenderCacheImpl(Render* pRender): __pCreator(pRender), __cacheIndex(static_cast(0)) {} + virtual ~RenderCacheImpl(void) {} + +protected: + void InternalForceToDie(void); //need to be called when cache stops to be need + virtual void Validate(Render*) = 0; //called by renderer to validate / rebuild cache + bool InternalAlive(void) { return null != __pCreator; } + + virtual void InvalidateImpl(void) = 0; + + void InternalDestroyCache(void); + void InternalDropCache(void); + + virtual void DropCache(void) {} //called by renderer when cache must be dropped (not destroyed). On this call all 3D handlers must be forgotten. + virtual void DestroyCache(void) {} //called by renderer when cache must be destroyed. All 3D handlers must be destroyed correctly. + +private: + friend class Render; + + Render* __pCreator; + size_t __cacheIndex; +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr RenderCacheImplPtr; + +template +class RenderCacheMix: + public RenderCacheImpl, public ConcreteModelCache +{ +public: + RenderCacheMix(Render* pRender) : RenderCacheImpl(pRender) {} + virtual ~RenderCacheMix(void) {} + + virtual void Die(void) + { + RenderCacheImpl::InternalForceToDie(); + return; + } + +protected: + virtual void InvalidateImpl(void) + { + ConcreteModelCache::Invalidate(); + return; + } +}; + +typedef RenderCacheMix RenderCache; +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr RenderCachePtr; + +}}}}} //Tizen::Ui::Effects::_Renderer::GraphicsEngine + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_GRAPHICS_ENGINE_RENDER_CACHE_H_ diff --git a/src/ui/effects/inc/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderCommand.h b/src/ui/effects/inc/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderCommand.h new file mode 100644 index 0000000..08ba389 --- /dev/null +++ b/src/ui/effects/inc/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderCommand.h @@ -0,0 +1,47 @@ +// +// 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 FUiEffects_RendererGraphicsEngineRenderCommand.h + * @brief Base class for render command (single OpenGL command) + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_GRAPHICS_ENGINE_RENDER_COMMAND_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_GRAPHICS_ENGINE_RENDER_COMMAND_H_ + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace GraphicsEngine +{ + +class Render; + +class RenderCommand +{ +public: + RenderCommand(void) {} + virtual ~RenderCommand(void) {} + + virtual void Apply(Render*) = 0; +}; + +typedef System::SmartPtr RenderCommandPtr; + +}}}}} //Tizen::Ui::Effects::_Renderer::GraphicsEngine + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_GRAPHICS_ENGINE_RENDER_COMMAND_H_ diff --git a/src/ui/effects/inc/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderDrawableCache.h b/src/ui/effects/inc/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderDrawableCache.h new file mode 100644 index 0000000..69e23ab --- /dev/null +++ b/src/ui/effects/inc/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderDrawableCache.h @@ -0,0 +1,294 @@ +// +// 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 FUiEffects_RendererGraphicsEngineRenderDrawableCache.h + * @brief Class for drawable objects cache + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_GRAPHICS_ENGINE_RENDER_DRAWABLE_CACHE_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_GRAPHICS_ENGINE_RENDER_DRAWABLE_CACHE_H_ + +#include +#include + +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace GraphicsEngine +{ + +class Render; +class IndexBufferCache; +class VertexBufferCache; +class VertexBufferCache; +class VertexBufferCache; +class CompositeVertexBufferCache; +class CompositeVertexBufferCache; +class CompositeVertexBufferCache; +class RenderTexture2dCache; +class RenderProgramCache; + +class UseProgram: + public RenderCommand +{ +public: + UseProgram(RenderProgramCache* pProgram); + virtual ~UseProgram(void) {} + + virtual void Apply(Render*); + +private: + RenderProgramCache* __pProgram; +}; + +class DisableProgramAttributers: + public RenderCommand +{ +public: + DisableProgramAttributers(RenderProgramCache* pProgram); + virtual ~DisableProgramAttributers(void) {} + + virtual void Apply(Render*); + +private: + RenderProgramCache* __pProgram; +}; + +class Sampler2dUniform: + public RenderCommand +{ +public: + Sampler2dUniform(RenderTexture2dCache* pTexture, GLuint unit); + virtual ~Sampler2dUniform(void) {} + + virtual void Apply(Render*); + +private: + RenderTexture2dCache* __pTexture; + GLuint __stage; +}; + +class Sampler2dAttachmentUniform: + public RenderCommand +{ +public: + Sampler2dAttachmentUniform(Texture2dAttachmentCache* pTexture, GLuint unit); + virtual ~Sampler2dAttachmentUniform(void) {} + +virtual void Apply(Render*); + +private: + Texture2dAttachmentCache* __pTexture; + GLuint __stage; +}; + +class Matrix4fUniform: + public RenderCommand +{ +public: + Matrix4fUniform(Tizen::Ui::Effects::_Renderer::EngineModel::Matrix4fProperty* pUniform, GLuint location); + virtual ~Matrix4fUniform(void) {} + + virtual void Apply(Render*); + +private: + Tizen::Ui::Effects::_Renderer::EngineModel::Matrix4fProperty* __pUniform; + GLuint __location; +}; + +class IntUniform: + public RenderCommand +{ +public: + IntUniform(Tizen::Ui::Effects::_Renderer::EngineModel::IntProperty* pUniform, GLuint location); + virtual ~IntUniform(void) {} + + virtual void Apply(Render*); + +private: + Tizen::Ui::Effects::_Renderer::EngineModel::IntProperty* __pUniform; + GLuint __location; +}; + +class FloatUniform: + public RenderCommand +{ +public: + FloatUniform(Tizen::Ui::Effects::_Renderer::EngineModel::FloatProperty* pUniform, GLuint location); + virtual ~FloatUniform(void) {} + + virtual void Apply(Render*); + +private: + Tizen::Ui::Effects::_Renderer::EngineModel::FloatProperty* __pUniform; + GLuint __location; +}; + +class FloatArrayUniform: + public RenderCommand +{ +public: + FloatArrayUniform(Tizen::Ui::Effects::_Renderer::EngineModel::FloatArrayProperty* pUniform, GLuint location); + virtual ~FloatArrayUniform(void) {} + + virtual void Apply(Render*); + +private: + Tizen::Ui::Effects::_Renderer::EngineModel::FloatArrayProperty* __pUniform; + GLuint __location; +}; + +class Vector2fUniform: + public RenderCommand +{ +public: + Vector2fUniform(Tizen::Ui::Effects::_Renderer::EngineModel::Vector2fProperty* pUniform, GLuint location); + virtual ~Vector2fUniform(void) {} + + virtual void Apply(Render*); + +private: + Tizen::Ui::Effects::_Renderer::EngineModel::Vector2fProperty* __pUniform; + GLuint __location; +}; + +class Vector3fUniform: + public RenderCommand +{ +public: + Vector3fUniform(Tizen::Ui::Effects::_Renderer::EngineModel::Vector3fProperty* pUniform, GLuint location); + virtual ~Vector3fUniform(void) {} + + virtual void Apply(Render*); + +private: + Tizen::Ui::Effects::_Renderer::EngineModel::Vector3fProperty* __pUniform; + GLuint __location; +}; + +class Vector4fUniform: + public RenderCommand +{ +public: + Vector4fUniform(Tizen::Ui::Effects::_Renderer::EngineModel::Vector4fProperty* pUniform, GLuint location); + virtual ~Vector4fUniform(void) {} + + virtual void Apply(Render*); + +private: + Tizen::Ui::Effects::_Renderer::EngineModel::Vector4fProperty* _pUniform; + GLuint __location; +}; + +class ProgramAttribute: + public RenderCommand +{ +public: + ProgramAttribute(VertexBufferCache* pAttribute, GLuint location); + virtual ~ProgramAttribute(void) {} + + virtual void Apply(Render*); + +private: + VertexBufferCache* __pAttribute; + GLuint __location; +}; + +class BindBuffer: + public RenderCommand +{ +public: + BindBuffer(CompositeVertexBufferCache* pBuffer); + virtual ~BindBuffer(void) {} + + virtual void Apply(Render*); + +private: + CompositeVertexBufferCache* __pBuffer; +}; + +class DrawIndexed: + public RenderCommand +{ +public: + DrawIndexed(IndexBufferCache* pBuffer); + virtual ~DrawIndexed(void) {} + + virtual void Apply(Render*); + +private: + IndexBufferCache* __pBuffer; +}; + +class SetState: + public RenderCommand +{ +public: + SetState(RenderStateCache* pState); + virtual ~SetState(void) {} + + virtual void Apply(Render*); + +private: + RenderStateCache* __pState; +}; + +class RenderDrawableCache: + public RenderCache +{ +public: + typedef std::vector RenderCommandsListType; + typedef RenderCommandsListType::size_type RenderCommandsListSizeType; + + typedef std::vector ExternalTexturesListType; + typedef ExternalTexturesListType::size_type ExternalTexturesListSizeType; + + RenderDrawableCache(Render* pRender, Tizen::Ui::Effects::_Renderer::EngineModel::Drawable* pDrawable); + virtual ~RenderDrawableCache(void); + + virtual void Die(void); + virtual void DropCache(void); + virtual void DestroyCache(void); + + virtual void Validate(Render*); + + void Draw(Render*); + const Math::Matrix4f& GetWorld(void); + bool HasAlphaBlend(Render*); + + ExternalTexturesListSizeType NumExternalTextures(void); + Tizen::Ui::Effects::_Renderer::EngineModel::TextureAttachment* GetExternalTexture(ExternalTexturesListSizeType index); + +private: + RenderCommandsListType __commands; + RenderCommandsListType __ownCommands; + Tizen::Ui::Effects::_Renderer::EngineModel::Drawable* __pDrawable; + ExternalTexturesListType __externalTextures; + + RenderStateCache* __pAlphaBlend; +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr RenderDrawableCachePtr; + +}}}}} //Tizen::Ui::Effects::_Renderer::GraphicsEngine + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_GRAPHICS_ENGINE_RENDER_DRAWABLE_CACHE_H_ diff --git a/src/ui/effects/inc/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderRenderTargetCache.h b/src/ui/effects/inc/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderRenderTargetCache.h new file mode 100644 index 0000000..2c58e87 --- /dev/null +++ b/src/ui/effects/inc/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderRenderTargetCache.h @@ -0,0 +1,117 @@ +// +// 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 FUiEffects_RendererGraphicsEngineRenderRenderTargetCache.h + * @brief Class for render targets cache + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_GRAPHICS_ENGINE_RENDER_RENDER_TARGET_CACHE_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_GRAPHICS_ENGINE_RENDER_RENDER_TARGET_CACHE_H_ + +#include +#include +#include +#include + +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace GraphicsEngine +{ + +class Render; + +class StubAttachmentCache: + public RenderCache +{ +public: + StubAttachmentCache(Render *pRender, Tizen::Ui::Effects::_Renderer::EngineModel::StubAttachment* pStubAttachment); + virtual ~StubAttachmentCache(void); + + void AttachToFrameBuffer(Render* pRender, GLenum attachment, GLuint width, GLuint height); + + virtual void Die(void); + virtual void DropCache(void); + virtual void DestroyCache(void); + + virtual void Validate(Render* pRender); + +protected: + GLuint _width; + GLuint _height; + Tizen::Ui::Effects::_Renderer::EngineModel::StubAttachment* _pStubAttachment; + GLuint _id; +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr StubAttachmentCachePtr; + +class Texture2dAttachmentCache: + public RenderCache +{ +public: + Texture2dAttachmentCache(Render *pRender, Tizen::Ui::Effects::_Renderer::EngineModel::Texture2dAttachmentProperty* pTexture2DAttachmentProperty); + virtual ~Texture2dAttachmentCache(); + + void AttachToFrameBuffer(Render* pRender, GLenum attachment, GLuint width, GLuint height, GLuint mipmap); + void Bind(Render* pRender, GLuint stage); + + virtual void Die(void); + virtual void DropCache(void); + virtual void DestroyCache(void); + + virtual void Validate(Render*); + void Validate(Render* aRender, GLuint aStage); + +protected: + GLuint _width; + GLuint _height; + Tizen::Ui::Effects::_Renderer::EngineModel::Texture2dAttachmentProperty* _pTexture2DAttachmentProperty; + GLuint _id; +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr Texture2DAttachmentCachePtr; + +class RenderTargetExternalRenderCache: + public RenderCache +{ +public: + RenderTargetExternalRenderCache(Render *pRender, Tizen::Ui::Effects::_Renderer::EngineModel::RenderTargetExternalRender* pRenderTargetExternalRender); + virtual ~RenderTargetExternalRenderCache(void); + + void Draw(Render* pRender); + + virtual void Die(void); + virtual void DropCache(void); + virtual void DestroyCache(void); + + virtual void Validate(Render* pRender); + +protected: + Tizen::Ui::Effects::_Renderer::EngineModel::RenderTargetExternalRender* _pRenderTargetExternalRender; + GLuint _id; + int _ppp; + GLuint _numColorBuffers; + GLenum _colorBuffers[EngineModel::RenderTarget::Attachment::ATTACHMENT_MAX]; +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr RenderTargetExternalRenderCachePtr; + +}}}}} //Tizen::Ui::Effects::_Renderer::GraphicsEngine + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_GRAPHICS_ENGINE_RENDER_RENDER_TARGET_CACHE_H_ diff --git a/src/ui/effects/inc/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderShaderCache.h b/src/ui/effects/inc/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderShaderCache.h new file mode 100644 index 0000000..222578b --- /dev/null +++ b/src/ui/effects/inc/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderShaderCache.h @@ -0,0 +1,116 @@ +// +// 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 FUiEffects_RendererGraphicsEngineRenderShaderCache.h + * @brief Class for render shaders cache + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_GRAPHICS_ENGINE_RENDER_SHADER_CACHE_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_GRAPHICS_ENGINE_RENDER_SHADER_CACHE_H_ + +#include +#include +#include +#include + +#include +#include + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace GraphicsEngine +{ + +class Render; + +class RenderShaderCache: + public RenderCache +{ +public: + RenderShaderCache(Render *pRender, Tizen::Ui::Effects::_Renderer::EngineModel::ShaderProperty* pShader); + virtual ~RenderShaderCache(void); + + static GLenum GetShaderType(Tizen::Ui::Effects::_Renderer::EngineModel::ShaderProperty::ShaderType::Value shaderType); + static bool IsBinary(Tizen::Ui::Effects::_Renderer::EngineModel::ShaderProperty::DataType::Value dataType); + + virtual void Die(void); + virtual void DropCache(void); + virtual void DestroyCache(void); + + virtual void Validate(Render*); + + void AttachToProgram(Render*, GLuint programId); + +protected: + GLuint _shaderId; + Tizen::Ui::Effects::_Renderer::EngineModel::ShaderProperty* _pShader; +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr RenderShaderCachePtr; + +class RenderProgramCache: + public RenderCache +{ +public: + struct GlInfo + { + GLuint location; + GLenum type; + GLint size; + }; + + typedef std::vector > AttribuleListType; + typedef AttribuleListType UniformListType; + typedef AttribuleListType::size_type AttribuleListSizeType; + typedef AttribuleListSizeType UniformListSizeType; + typedef AttribuleListType::value_type AttribuleListValueType; + typedef AttribuleListValueType UniformListValueType; + + RenderProgramCache(Render *pRender, Tizen::Ui::Effects::_Renderer::EngineModel::ProgramProperty* pProgram); + virtual ~RenderProgramCache(void); + + virtual void Die(void); + virtual void DropCache(void); + virtual void DestroyCache(void); + + virtual void Validate(Render*); + + void UseProgram(Render*); + void DisableAttributes(Render*); + void EnableAttributes(Render*); + const AttribuleListValueType& GetAttribute(AttribuleListSizeType index); + AttribuleListSizeType GetNumAttributes(void); + const UniformListValueType& GetUniform(UniformListSizeType index); + UniformListSizeType GetNumUniforms(void); + +protected: + AttribuleListType _attributes; + UniformListType _uniforms; + + GLuint _programId; + RenderShaderCache* _pVertexShader; + RenderShaderCache* _pFragmentShader; + Tizen::Ui::Effects::_Renderer::EngineModel::ProgramProperty* _pProgram; +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr RenderProgramCachePtr; + +}}}}} //Tizen::Ui::Effects::_Renderer::GraphicsEngine + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_GRAPHICS_ENGINE_RENDER_SHADER_CACHE_H_ diff --git a/src/ui/effects/inc/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderStateCache.h b/src/ui/effects/inc/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderStateCache.h new file mode 100644 index 0000000..58d5c30 --- /dev/null +++ b/src/ui/effects/inc/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderStateCache.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 FUiEffects_RendererGraphicsEngineRenderStateCache.h + * @brief Class for render states cache + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_GRAPHICS_ENGINE_RENDER_STATE_CACHE_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_GRAPHICS_ENGINE_RENDER_STATE_CACHE_H_ + +#include + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace GraphicsEngine +{ + +class Render; + +class RenderStateCache: + public RenderCache +{ +public: + RenderStateCache(Render* pRender): RenderCache(pRender) {} + virtual ~RenderStateCache(void) {} + + virtual bool IsEnable(Render*) = 0; + virtual void Set(Render*) = 0; +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr RenderStateCachePtr; + +class RenderAlphaBlendCache: + public RenderStateCache +{ +public: + static GLenum GetGlBlendFactor(Tizen::Ui::Effects::_Renderer::EngineModel::AlphaBlendProperty::BlendFactor::Value value); + + RenderAlphaBlendCache(Render* pRender, Tizen::Ui::Effects::_Renderer::EngineModel::AlphaBlendProperty* pState); + virtual ~RenderAlphaBlendCache(void); + + virtual void Validate(Render*); + + bool IsEnable(Render*); + void Set(Render*); + +private: + Tizen::Ui::Effects::_Renderer::EngineModel::AlphaBlendProperty* __pState; + GLenum __source; + GLenum __destination; + bool __isEnabled; +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr RenderAlphaBlendCachePtr; + +}}}}} //Tizen::Ui::Effects::_Renderer::GraphicsEngine + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_GRAPHICS_ENGINE_RENDER_STATE_CACHE_H_ diff --git a/src/ui/effects/inc/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderTextureCache.h b/src/ui/effects/inc/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderTextureCache.h new file mode 100644 index 0000000..7360eef --- /dev/null +++ b/src/ui/effects/inc/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderTextureCache.h @@ -0,0 +1,85 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiEffects_RendererGraphicsEngineRenderTextureCache.h + * @brief Class for render textures cache + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_GRAPHICS_ENGINE_RENDER_TEXTURE_CACHE_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_GRAPHICS_ENGINE_RENDER_TEXTURE_CACHE_H_ + +#include +#include +#include +#include + +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace GraphicsEngine +{ + +class RenderTextureCache: + public RenderCache +{ +public: + RenderTextureCache(Render* pRender); + virtual ~RenderTextureCache(void); + + static GLenum GetGlInternalFormat(Tizen::Ui::Effects::_Renderer::EngineModel::TextureProperty::InternalFormat::Value internalFormat); + static GLenum GetGlDataFormat(Tizen::Ui::Effects::_Renderer::EngineModel::TextureProperty::DataFormat::Value dataFormat); + static GLenum GetGlDataType(Tizen::Ui::Effects::_Renderer::EngineModel::TextureProperty::DataType::Value dataType); + static GLenum GetGlFilterType(Tizen::Ui::Effects::_Renderer::EngineModel::TextureProperty::FilterType::Value filterType); + static GLenum GetGlWrapType(Tizen::Ui::Effects::_Renderer::EngineModel::TextureProperty::WrapType::Value wrapType); + + virtual void DropCache(void); + virtual void DestroyCache(void); + + virtual void Bind(Render*, GLuint stage) = 0; + +protected: + GLuint _textureId; +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr RenderTextureCachePtr; + +class RenderTexture2dCache: + public RenderTextureCache +{ +public: + RenderTexture2dCache(Render* pRender, Tizen::Ui::Effects::_Renderer::EngineModel::Texture2dProperty* pTexture); + virtual ~RenderTexture2dCache(void); + + virtual void Validate(Render*); + void Validate(Render*, GLuint stage); + + virtual void Bind(Render*, GLuint stage); + + virtual void Die(void); + virtual void DestroyCache(void); + +private: + Tizen::Ui::Effects::_Renderer::EngineModel::Texture2dProperty* __pTexture; +}; + +typedef Tizen::Ui::Effects::_Renderer::System::SmartPtr RenderTexture2DCachePtr; + +}}}}} //Tizen::Ui::Effects::_Renderer::GraphicsEngine + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_GRAPHICS_ENGINE_RENDER_TEXTURE_CACHE_H_ diff --git a/src/ui/effects/inc/renderer/math/FUiEffects_RendererMathAdapterFunctions.h b/src/ui/effects/inc/renderer/math/FUiEffects_RendererMathAdapterFunctions.h new file mode 100644 index 0000000..6c95382 --- /dev/null +++ b/src/ui/effects/inc/renderer/math/FUiEffects_RendererMathAdapterFunctions.h @@ -0,0 +1,290 @@ +// +// 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 FUiEffects_RendererMathAdapterFunctions.h + * @brief The adapter math functions for user types + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_MATH_ADAPTER_FUNCTIONS_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_MATH_ADAPTER_FUNCTIONS_H_ + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace Math +{ + +inline float EffectsSqrt(float value); +inline double EffectsSqrt(double value); + +inline float EffectsCos(float angle); +inline double EffectsCos(double angle); +inline float EffectsAcos(float angle); +inline double EffectsAcos(double angle); + +inline float EffectsSin(float angle); +inline double EffectsSin(double angle); +inline float EffectsAsin(float angle); +inline double EffectsAsin(double angle); + +template inline T EffectsAbs(const T& value); +inline float EffectsAbs(const float& value); +inline double EffectsAbs(const double& value); + +inline float EffectsAtan2(float x, float y); +inline double EffectsAtan2(double x, double y); + +inline float EffectsAtan(float value); +inline double EffectsAtan(double value); + +template struct EffectsEpsilon +{ + static inline const T& Epsilon(void) + { + return get_epsilon(static_cast(0)); + } +}; + +template<> struct EffectsEpsilon +{ + static inline const float& Epsilon(void) + { + return F_EPS; + } +}; + +template<> struct EffectsEpsilon +{ + static inline const double& Epsilon(void) + { + return D_EPS; + } +}; + +inline bool EffectsEqual(const float& lhv, const float& rhv, const float& epsilon = F_EPS); +inline bool EffectsEqual(const double& lhv, const double& rhv, const double& epsilon = D_EPS); + +template inline void EffectsSwap(T& lhv, T& rhv); +inline void EffectsSwap(float& lhv, float& rhv); +inline void EffectsSwap(double& lhv, double& rhv); + +template inline T EffectsClamp(const T& value, const T& min, const T& max); +inline float EffectsClamp(const float& value, const float& min, const float& max); +inline double EffectsClamp(const double& value, const double& min, const double& max); + +template inline T EffectsLerp(const T& from, const T& to, const T& coeff); +inline float EffectsLerp(const float& from, const float& to, const float& coeff); +inline double EffectsLerp(const double& from, const double& to, const double& coeff); +inline int EffectsLerp(const int& from, const int& to, const int& coeff); +inline unsigned int EffectsLerp(const unsigned int& from, const unsigned int& to, const unsigned int& coeff); + +template inline T EffectsMin(const T& a1, const T& a2); +template inline T EffectsMin3(const T& a1, const T& a2, const T& a3); +template inline T EffectsMax(const T& a1, const T& a2); +template inline T EffectsMax3(const T& a1, const T& a2, const T& a3); + +inline float EffectsSqrt(float value) +{ + return sqrtf(value); +} +inline double EffectsSqrt(double value) +{ + return sqrt(value); +} + +template inline bool EffectsEqual(const T& lhv, const T& rhv, const T& epsilon = EffectsEpsilon::epsilon()) +{ + return lhv == rhv; +} +inline bool EffectsEqual(const float& lhv, const float& rhv, const float& epsilon) +{ + return (lhv + epsilon >= rhv) && (lhv - epsilon <= rhv); +} +inline bool EffectsEqual(const double& lhv, const double& rhv, const double& epsilon) +{ + return (lhv + epsilon >= rhv) && (lhv - epsilon <= rhv); +} + +inline float EffectsCos(float angle) +{ + return cosf(angle); +} +inline double EffectsCos(double angle) +{ + return cos(angle); +} +inline float EffectsAcos(float angle) +{ + return acosf(angle); +} +inline double EffectsAcos(double angle) +{ + return acos(angle); +} + +inline float EffectsSin(float angle) +{ + return sinf(angle); +} +inline double EffectsSin(double angle) +{ + return sin(angle); +} + +inline float EffectsAsin(float angle) +{ + return asinf(angle); +} +inline double EffectsAsin(double angle) +{ + return asin(angle); +} + +template inline T EffectsAbs(const T& value) +{ + return abs(value); +} +inline float EffectsAbs(const float &value) +{ + return fabsf(value); +} +inline double EffectsAbs(const double &value) +{ + return fabs(value); +} + +inline float EffectsAtan2(float x, float y) +{ + return atan2f(x, y); +} +inline double EffectsAtan2(double x, double y) +{ + return atan2(x, y); +} + +inline float EffectsAtan(float value) +{ + return atanf(value); +} +inline double EffectsAtan(double value) +{ + return atan(value); +} + +template inline void EffectsSwap(T& lhv, T& rhv) +{ + T temp(lhv); + lhv = rhv; + rhv = temp; +} +inline void EffectsSwap(float& lhv, float& rhv) +{ + std::swap(lhv, rhv); +} +inline void EffectsSwap(double& lhv, double& rhv) +{ + std::swap(lhv, rhv); +} + +template inline T EffectsClamp(const T& value, const T& min, const T& max) +{ + if (value < min) + { + return min; + } + if (value > max) + { + return max; + } + return value; +} +inline float EffectsClamp(const float& value, const float& min, const float& max) +{ + if (value < min) + { + return min; + } + if (value > max) + { + return max; + } + return value; +} +inline double EffectsClamp(const double& value, const double& min, const double& max) +{ + if (value < min) + { + return min; + } + if (value > max) + { + return max; + } + return value; +} + +template inline T EffectsLerp(const T& from, const T& to, const T& coeff) +{ + return from + (to - from) * coeff; +} +inline float EffectsLerp(const float& from, const float& to, const float& coeff) +{ + return from + (to - from) * coeff; +} +inline double EffectsLerp(const double& from, const double& to, const double& coeff) +{ + return from + (to - from) * coeff; +} +inline int EffectsLerp(const int& from, const int& to, const int& coeff) +{ + return from + (((to - from) * coeff) >> 8); +} +inline unsigned int EffectsLerp(const unsigned int& from, const unsigned int& to, const unsigned int& coeff) +{ + return from + (((to - from) * coeff) >> 8); +} + +template inline T EffectsMin(const T& a1, const T& a2) +{ + if (a1 < a2) + { + return a1; + } + return a2; +} +template inline T EffectsMin3(const T& a1, const T& a2, const T& a3) +{ + return EffectsMin(EffectsMin(a1, a2), a3); +} +template inline T EffectsMax(const T& a1, const T& a2) +{ + if (a1 < a2) + { + return a2; + } + + return a1; +} +template inline T EffectsMax3(const T& a1, const T& a2, const T& a3) +{ + return EffectsMax(EffectsMax(a1, a2), a3); +} + +}}}}} //Tizen::Ui::Effects::_Renderer::Math + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_MATH_ADAPTER_FUNCTIONS_H_ diff --git a/src/ui/effects/inc/renderer/math/FUiEffects_RendererMathCommon.h b/src/ui/effects/inc/renderer/math/FUiEffects_RendererMathCommon.h new file mode 100644 index 0000000..46a8c2d --- /dev/null +++ b/src/ui/effects/inc/renderer/math/FUiEffects_RendererMathCommon.h @@ -0,0 +1,61 @@ +// +// 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 FUiEffects_RendererMathCommon.h + * @brief The common math functions and constants + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_MATH_COMMON_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_MATH_COMMON_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace Math +{ + +const float F_EPS = std::numeric_limits::epsilon(); +const double D_EPS = std::numeric_limits::epsilon(); + +const double D_PI_2 = 6.283185307179586232; +const double D_PI = D_PI_2 * 0.5; +const float F_PI_2 = float(D_PI_2); +const float F_PI = float(D_PI); + +const double D_DEG_2_RAD_COEFF = D_PI / 180.0; +const double D_RAD_2_DEG_COEFF = 180.0 / D_PI; +const float F_DEG_2_RAD_COEFF = float(D_DEG_2_RAD_COEFF); +const float F_RAD_2_DEG_COEFF = float(D_RAD_2_DEG_COEFF); + +inline double D_Deg_2_Rad(double deg) { return deg * D_DEG_2_RAD_COEFF; } +inline float F_Deg_2_Rad(float deg) { return deg * F_DEG_2_RAD_COEFF; } +inline double D_Rad_2_Deg(double rad) { return rad * D_RAD_2_DEG_COEFF; } +inline float F_Rad_2_Deg(float rad) { return rad * F_RAD_2_DEG_COEFF; } + +enum RotationOrder3 {ROTATION_XYZ = 0, ROTATION_XZY, ROTATION_YXZ, ROTATION_YZX, ROTATION_ZXY, ROTATION_ZYX, ROTATION3_MAX}; + +template inline bool IsPowerOf2(T value) //only for positive integers +{ + return (value & (value - T(1))) == T(0); +} + +}}}}} //Tizen::Ui::Effects::_Renderer::Math + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_MATH_COMMON_H_ diff --git a/src/ui/effects/inc/renderer/math/FUiEffects_RendererMathMatrix.h b/src/ui/effects/inc/renderer/math/FUiEffects_RendererMathMatrix.h new file mode 100644 index 0000000..6d37008 --- /dev/null +++ b/src/ui/effects/inc/renderer/math/FUiEffects_RendererMathMatrix.h @@ -0,0 +1,1088 @@ +// +// 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 FUiEffects_RendererMathMatrix.h + * @brief The Matrix class + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_MATH_MATRIX_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_MATH_MATRIX_H_ + +#include +#include +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace Math +{ +template +class Matrix : + public MatrixTraits +{ +public: + typedef Matrix MatrixType; + typedef Vector VectorType; + typedef MatrixTraitsBase MatrixTraitsBaseType; + typedef typename MatrixTraitsBaseType::TypeReference TypeReference; + + using MatrixTraitsBaseType::data; + using MatrixTraits::Set; + using MatrixTraits::CreateScale; + using MatrixTraits::MakeScale; + using MatrixTraits::Scale; + using MatrixTraits::SetScale; + using MatrixTraits::ApplyTransform; + using MatrixTraits::GetAppliedTransform; + + inline Matrix(void); + inline explicit Matrix(const TypeReference value); + inline Matrix(const TypeReference a11, const TypeReference a12, + const TypeReference a21, const TypeReference a22); + + inline Matrix(const TypeReference a11, const TypeReference a12, const TypeReference a13, + const TypeReference a21, const TypeReference a22, const TypeReference a23, + const TypeReference a31, const TypeReference a32, const TypeReference a33); + + inline Matrix(const TypeReference a11, const TypeReference a12, const TypeReference a13, const TypeReference a14, + const TypeReference a21, const TypeReference a22, const TypeReference a23, const TypeReference a24, + const TypeReference a31, const TypeReference a32, const TypeReference a33, const TypeReference a34, + const TypeReference a41, const TypeReference a42, const TypeReference a43, const TypeReference a44); + + inline Matrix(const VectorType& i, const VectorType& j); + inline Matrix(const VectorType& i, const VectorType& j, const VectorType& k); + inline Matrix(const VectorType& i, const VectorType& j, const VectorType& k, const VectorType& c); + + inline Matrix(const MatrixType& other); + + inline MatrixType& operator = (const MatrixType& rhv); + + inline MatrixType& Set(const MatrixType& other); + inline MatrixType& Set(const TypeReference value); + + inline MatrixType& FillFromArray(const T* pArray); + static inline MatrixType MakeFromArray(const T* pArray); + + inline MatrixType& Identity(void); + inline bool IsIdentity(void) const; + + inline MatrixType operator-(void) const; + inline MatrixType& Inverse(void); + inline MatrixType GetInversed(void) const; + + inline MatrixType& Transpose(void); + inline MatrixType GetTransposed(void) const; + + inline MatrixType& operator+=(const MatrixType& rhv); + inline MatrixType& operator+=(const TypeReference rhv); + inline MatrixType& operator-=(const MatrixType& rhv); + inline MatrixType& operator-=(const TypeReference rhv); + inline MatrixType& operator*=(const MatrixType& rhv); + inline MatrixType& operator*=(const TypeReference rhv); + inline MatrixType& operator/=(const TypeReference rhv); + inline MatrixType GetMultipliedByMember(const MatrixType& rhv) const; + inline MatrixType& MultiplyByMember(const MatrixType& rhv); + static inline MatrixType CreateMultipliedByMember(const MatrixType& lhv, const MatrixType& rhv); + inline MatrixType GetDividedByMember(const MatrixType& rhv) const; + inline MatrixType& DivideByMember(const MatrixType& rhv); + static inline MatrixType CreateDividedByMember(const MatrixType& lhv, const MatrixType& rhv); + + inline T* GetPointer(void); + inline const T* GetPointer(void) const; + inline TypeReference Get(unsigned int row, unsigned int column); + inline const TypeReference Get(unsigned int row, unsigned int column) const; + inline TypeReference Get(unsigned int absIndex); + inline const TypeReference Get(unsigned int absIndex) const; + inline MatrixType& Set(unsigned int row, unsigned int column, const TypeReference value); + inline MatrixType& Set(unsigned int absIndex, const TypeReference value); + inline VectorType GetColumn(unsigned int column) const; + inline MatrixType& SetColumn(unsigned int column, const VectorType& value); + inline VectorType& GetRow(unsigned int row); + inline const VectorType& GetRow(unsigned int row) const; + inline MatrixType& SetRow(unsigned int row, const VectorType& value); + inline TypeReference operator()(unsigned int row, unsigned int column); + inline const TypeReference operator()(unsigned int row, unsigned int column) const; + inline TypeReference operator()(unsigned int absIndex); + inline const TypeReference operator()(unsigned int absIndex) const; + inline TypeReference operator[](unsigned int absIndex); + inline const TypeReference operator[](unsigned int absIndex) const; + + inline MatrixType& Lerp(const MatrixType& to, const TypeReference coeff); + inline MatrixType GetLerped(const MatrixType& to, const TypeReference coeff) const; + inline MatrixType& MakeLerped(const MatrixType& from, const MatrixType& to, const TypeReference coeff); + static inline MatrixType CreateLerped(const MatrixType& from, const MatrixType& to, const TypeReference coeff); + + inline TypeReference Magnitude(void) const; + inline TypeReference MagnitudeSqr(void) const; + inline TypeReference Trace(void) const; + inline Matrix MinorMatrix(unsigned int row, unsigned int column) const; + + inline TypeReference Determinant(void) const; + + inline VectorType& ApplyTransform(VectorType& vector) const; + inline VectorType GetAppliedTransform(const VectorType& vector) const; + + template + inline MatrixType& MakeScale(const Vector& scale); + template + inline MatrixType& SetScale(const Vector& scale); + template + static inline MatrixType CreateScale(const Vector& scale); + template + inline MatrixType& Scale(const Vector& scale); + + inline bool IsEqual(const Matrix& rhv, const TypeReference epsilon = EffectsEpsilon::epsilon()) const; +}; + +template +inline bool IsEqual(const Matrix& lhv, const Matrix& rhv, const typename Matrix::TypeReference epsilon); +template inline Matrix operator+(const Matrix& lhv, const Matrix& rhv); +template inline Matrix operator+(const Matrix& lhv, const typename Matrix::TypeReference rhv); +template inline Matrix operator+(const typename Matrix::TypeReference lhv, const Matrix& rhv); +template inline Matrix operator-(const Matrix& lhv, const Matrix& rhv); +template inline Matrix operator-(const Matrix& lhv, const typename Matrix::TypeReference rhv); +template inline Matrix operator-(const typename Matrix::TypeReference lhv, const Matrix& rhv); +template inline Matrix operator*(const Matrix& lhv, const Matrix& rhv); +template inline Matrix operator*(const Matrix& lhv, const typename Matrix::TypeReference rhv); +template inline Matrix operator*(const typename Matrix::TypeReference lhv, const Matrix& rhv); +template inline Vector operator*(const Matrix& lhv, const Vector& rhv); +template inline Vector operator*(const Vector& lhv, const Matrix& rhv); +template inline Vector operator*(const Matrix& lhv, const Vector& rhv); +template inline Vector operator*(const Vector& lhv, const Matrix& rhv); +template inline Matrix operator/(const Matrix& lhv, const typename Matrix::TypeReference rhv); +template inline Matrix operator/(const typename Matrix::TypeReference lhv, const Matrix& rhv); +template inline bool operator==(const Matrix& lhv, const Matrix& rhv); +template inline bool operator==(const Matrix& lhv, const typename Matrix::TypeReference rhv); +template inline bool operator==(const typename Matrix::TypeReference lhv, const Matrix& rhv); +template inline bool operator!=(const Matrix& lhv, const Matrix& rhv); +template inline bool operator!=(const Matrix& lhv, const typename Matrix::TypeReference rhv); +template inline bool operator!=(const typename Matrix::TypeReference lhv, const Matrix& rhv); + +typedef Matrix Matrix1f; +typedef Matrix Matrix1d; +typedef Matrix Matrix2f; +typedef Matrix Matrix2d; +typedef Matrix Matrix3f; +typedef Matrix Matrix3d; +typedef Matrix Matrix4f; +typedef Matrix Matrix4d; + +template +Matrix::Matrix(void) +{ + +} + +template +Matrix::Matrix(const TypeReference value) +{ + for (int i = 0; i < Dimension; i++) + { + data[i] = VectorType(value); + } +} + +template +Matrix::Matrix(const TypeReference a11, const TypeReference a12, + const TypeReference a21, const TypeReference a22) +{ + EffectsStaticAssert(Dimension == 2); + + data[0].Set(a11, a12); + data[1].Set(a21, a22); +} + +template +Matrix::Matrix(const TypeReference a11, const TypeReference a12, const TypeReference a13, + const TypeReference a21, const TypeReference a22, const TypeReference a23, + const TypeReference a31, const TypeReference a32, const TypeReference a33) +{ + EffectsStaticAssert(Dimension == 3); + + data[0].Set(a11, a12, a13); + data[1].Set(a21, a22, a23); + data[2].Set(a31, a32, a33); +} + +template +Matrix::Matrix(const TypeReference a11, const TypeReference a12, const TypeReference a13, const TypeReference a14, + const TypeReference a21, const TypeReference a22, const TypeReference a23, const TypeReference a24, + const TypeReference a31, const TypeReference a32, const TypeReference a33, const TypeReference a34, + const TypeReference a41, const TypeReference a42, const TypeReference a43, const TypeReference a44) +{ + EffectsStaticAssert(Dimension == 4); + + data[0].Set(a11, a12, a13, a14); + data[1].Set(a21, a22, a23, a24); + data[2].Set(a31, a32, a33, a34); + data[3].Set(a41, a42, a43, a44); +} + +template +Matrix::Matrix(const VectorType& i, const VectorType& j) +{ + EffectsStaticAssert(Dimension == 2); + data[0] = i; + data[1] = j; +} + +template +Matrix::Matrix(const VectorType& i, const VectorType& j, const VectorType& k) +{ + EffectsStaticAssert(Dimension == 3); + data[0] = i; + data[1] = j; + data[2] = k; +} + +template +Matrix::Matrix(const VectorType& i, const VectorType& j, const VectorType& k, const VectorType& c) +{ + EffectsStaticAssert(Dimension == 4); + + data[0] = i; + data[1] = j; + data[2] = k; + data[3] = c; +} + +template +Matrix::Matrix(const MatrixType& other) +{ + for (int i = 0; i < Dimension; i++) + { + data[i] = other.data[i]; + } +} + +template +Matrix& Matrix::operator=(const MatrixType& rhv) +{ + for (int i = 0; i < Dimension; i++) + { + data[i] = rhv.data[i]; + } + return *this; +} + +template +typename Matrix::MatrixType& Matrix::Set(const MatrixType& other) +{ + for (int i = 0; i < Dimension; i++) + { + data[i] = other.data[i]; + } + return *this; +} + +template +typename Matrix::MatrixType& Matrix::Set(const TypeReference value) +{ + for (int i = 0; i < Dimension; i++) + { + data[i] = VectorType(value); + } + return *this; +} + +template +typename Matrix::MatrixType& Matrix::FillFromArray(const T* pValue) +{ + for (int i = 0; i < Dimension; i++) + { + data[i] = VectorType::MakeFromArray(&pValue[Dimension * i]); + } + + return *this; +} + +template +typename Matrix::MatrixType Matrix::MakeFromArray(const T* pValue) +{ + MatrixType result; + result.FillFromArray(pValue); + return result; +} + +template +typename Matrix::MatrixType& Matrix::Identity(void) +{ + *this = MatrixType::GetIdentity(); + return *this; +} + +template +bool Matrix::IsIdentity(void) const +{ + return *this == MatrixType::GetIdentity(); +} + +template +typename Matrix::MatrixType Matrix::operator-(void) const +{ + MatrixType result; + for (int i = 0; i < Dimension; ++i) + { + result.data[i] = -data[i]; + } + return result; +} + +template +typename Matrix::MatrixType& Matrix::Inverse(void) +{ + static const T t0(0.0f); + static const T t1(1.0f); + + T det = Determinant(); + if (EffectsEqual(det, t0)) return *this; + + det = t1 / det; + MatrixType result; + for (int i = 0; i < Dimension; ++i) + { + for (int j = 0; j < Dimension; ++j) + { + result.data[i].data[j] = ((i+j) % 2 == 0 ? 1 : -1) * det * MinorMatrix(j, i).Determinant(); + } + } + return *this = result; +} + +template +typename Matrix::MatrixType Matrix::GetInversed(void) const +{ + MatrixType result(*this); + return result.Inverse(); +} + +template +typename Matrix::MatrixType& Matrix::Transpose(void) +{ + for (int i = 0; i < Dimension; ++i) + { + for (int j = i + 1; j < Dimension; ++j) + { + EffectsSwap(data[j].data[i], data[i].data[j]); + } + } + return *this; +} + +template +typename Matrix::MatrixType Matrix::GetTransposed(void) const +{ + MatrixType trasposed = *this; + return trasposed.Transpose(); +} + +template +typename Matrix::MatrixType& Matrix::operator+=(const MatrixType& rhv) +{ + for (int i = 0; i < Dimension; ++i) + { + data[i] += rhv.data[i]; + } + return *this; +} + +template +typename Matrix::MatrixType& Matrix::operator+=(const TypeReference rhv) +{ + for (int i = 0; i < Dimension; ++i) + { + data[i] += rhv; + } + return *this; +} + +template +typename Matrix::MatrixType& Matrix::operator-=(const MatrixType& rhv) +{ + for (int i = 0; i < Dimension; ++i) + { + data[i] -= rhv.data[i]; + } + return *this; +} + +template +typename Matrix::MatrixType& Matrix::operator-=(const TypeReference rhv) +{ + for (int i = 0; i < Dimension; ++i) + { + data[i] -= rhv; + } + return *this; +} + +template +typename Matrix::MatrixType& Matrix::operator*=(const MatrixType& rhv) +{ + MatrixType result(T(0.0f)); + for (int i = 0; i < Dimension; ++i) + { + for (int j = 0; j < Dimension; ++j) + { + for (int k = 0; k < Dimension; ++k) + result.data[i].data[j] += data[i].data[k] * rhv.data[k].data[j]; + } + } + *this = result; + return *this; +} + +template +typename Matrix::MatrixType& Matrix::operator*=(const TypeReference rhv) +{ + for (int i = 0; i < Dimension; ++i) + { + data[i] *= rhv; + } + return *this; +} + +template +typename Matrix::MatrixType& Matrix::operator/=(const TypeReference rhv) +{ + for (int i = 0; i < Dimension; ++i) + { + data[i] /= rhv; + } + return *this; +} + +template +typename Matrix::MatrixType Matrix::GetMultipliedByMember(const MatrixType& rhv) const +{ + MatrixType result; + for (int i = 0; i < Dimension; ++i) + { + result.data[i].Set(data[i] * rhv.data[i]); + } + return result; +} + +template +typename Matrix::MatrixType& Matrix::MultiplyByMember(const MatrixType& rhv) +{ + for (int i = 0; i < Dimension; ++i) + { + data[i] = data[i] * rhv.data[i]; + } + return *this; +} + +template +typename Matrix::MatrixType Matrix::CreateMultipliedByMember(const MatrixType& lhv, const MatrixType& rhv) +{ + MatrixType temp(lhv); + temp.MultiplyByMember(rhv); + return temp; +} + +template +typename Matrix::MatrixType Matrix::GetDividedByMember(const MatrixType& rhv) const +{ + MatrixType result; + for (int i = 0; i < Dimension; ++i) + { + result.data[i].Set(data[i] / rhv.data[i]); + } + return result; +} + +template +typename Matrix::MatrixType& Matrix::DivideByMember(const MatrixType& rhv) +{ + for (int i = 0; i < Dimension; ++i) + { + data[i] = data[i] / rhv.data[i]; + } + return *this; +} + +template +typename Matrix::MatrixType Matrix::CreateDividedByMember(const MatrixType& lhv, const MatrixType& rhv) +{ + MatrixType temp(lhv); + temp.DivideByMember(rhv); + return temp; +} + +template +T* Matrix::GetPointer(void) +{ + return data[0].GetPointer(); +} + +template +const T* Matrix::GetPointer(void) const +{ + return data[0].GetPointer(); +} + +template +typename Matrix::TypeReference Matrix::Get(unsigned int row, unsigned int column) +{ + return operator()(row, column); +} + +template +const typename Matrix::TypeReference Matrix::Get(unsigned int row, unsigned int column) const +{ + return operator()(row, column); +} + +template +typename Matrix::TypeReference Matrix::Get(unsigned int absIndex) +{ + return operator()(absIndex); +} + +template +const typename Matrix::TypeReference Matrix::Get(unsigned int absIndex) const +{ + return operator()(absIndex); +} + +template +typename Matrix::MatrixType& Matrix::Set(unsigned int row, unsigned int column, const TypeReference value) +{ + data[row].data[column] = value; + return *this; +} + +template +typename Matrix::MatrixType& Matrix::Set(unsigned int absIndex, const TypeReference value) +{ + data[absIndex / Dimension].data[absIndex % Dimension] = value; + return *this; +} + +template +typename Matrix::VectorType Matrix::GetColumn(unsigned int column) const +{ + VectorType result; + for (int i = 0; i < Dimension; ++i) + { + result.data[i] = data[i].data[column]; + } + return result; +} + +template +typename Matrix::MatrixType& Matrix::SetColumn(unsigned int column, const VectorType& value) +{ + for (int i = 0; i < Dimension; ++i) + { + data[i].data[column] = value.data[i]; + } + + return *this; +} + +template +typename Matrix::VectorType& Matrix::GetRow(unsigned int row) +{ + return data[row]; +} + +template +const typename Matrix::VectorType& Matrix::GetRow(unsigned int row) const +{ + return data[row]; +} + +template +typename Matrix::MatrixType& Matrix::SetRow(unsigned int row, const VectorType& value) +{ + data[row] = value; + return *this; +} + +template +typename Matrix::TypeReference Matrix::operator()(unsigned int row, unsigned int column) +{ + return data[row].data[column]; +} + +template +const typename Matrix::TypeReference Matrix::operator()(unsigned int row, unsigned int column) const +{ + return data[row].data[column]; +} + +template +typename Matrix::TypeReference Matrix::operator()(unsigned int absIndex) +{ + return operator[](absIndex); +} + +template +const typename Matrix::TypeReference Matrix::operator()(unsigned int absIndex) const +{ + return operator[](absIndex); +} + +template +typename Matrix::TypeReference Matrix::operator[](unsigned int absIndex) +{ + return data[absIndex / Dimension].data[absIndex % Dimension]; +} + +template +const typename Matrix::TypeReference Matrix::operator[](unsigned int absIndex) const +{ + return data[absIndex / Dimension].data[absIndex % Dimension]; +} + +template +typename Matrix::MatrixType& Matrix::Lerp(const MatrixType& to, const TypeReference coeff) +{ + for (int i = 0; i < Dimension; ++i) + { + data[i].Lerp(to.data[i], coeff); + } + return *this; +} + +template +typename Matrix::MatrixType Matrix::GetLerped(const MatrixType& to, const TypeReference coeff) const +{ + MatrixType result; + for (int i = 0; i < Dimension; ++i) + { + result.data[i] = data[i].GetLerped(to.data[i], coeff); + } + return result; +} + +template +typename Matrix::MatrixType& Matrix::MakeLerped(const MatrixType& from, const MatrixType& to, const TypeReference coeff) +{ + for (int i = 0; i < Dimension; ++i) + { + data[i] = VectorType().MakeLerped(from.data[i], to.data[i], coeff); + } + return *this; +} + +template +typename Matrix::MatrixType Matrix::CreateLerped(const MatrixType& from, const MatrixType& to, const TypeReference coeff) +{ + MatrixType result; + for (int i = 0; i < Dimension; ++i) + { + result.data[i] = VectorType().MakeLerped(from.data[i], to.data[i], coeff); + } + return result; +} + +template +typename Matrix::TypeReference Matrix::Magnitude(void) const +{ + return effects_sqrt(MagnitudeSqr()); +} + +template +typename Matrix::TypeReference Matrix::MagnitudeSqr(void) const +{ + T result = T(0.0f); + for (int i = 0; i < Dimension; ++i) + { + result += data[i].dot(data[i]); + } + return result; +} + +template +typename Matrix::TypeReference Matrix::Trace(void) const +{ + T result = T(0.0f); + for (int i = 0; i < Dimension; ++i) + { + result += data[i].data[i]; + } + return result; +} + +template +Matrix Matrix::MinorMatrix(unsigned int row, unsigned int column) const +{ + Matrix result; + + int columnCounter = 0; + for (unsigned int i = 0; i < Dimension; ++i) + { + if (i != column) + { + int rowCounter = 0; + for (unsigned int j = 0; j < Dimension; ++j) + { + if (j != row) + { + result.data[rowCounter].data[columnCounter] = data[j].data[i]; + ++rowCounter; + } + } + ++columnCounter; + } + } + return result; +} + +template +typename Matrix::TypeReference Matrix::Determinant(void) const +{ + if (Dimension == 1) + { + return data[0].data[0]; + } + + T result = T(0.0f); + for (int i = 0; i < Dimension; ++i) + { + result += (i % 2 == 0 ? 1 : -1) * data[i].data[0] * MinorMatrix(i, 0).Determinant(); + } + return result; +} + +template +typename Matrix::VectorType& Matrix::ApplyTransform(VectorType& vector) const +{ + VectorType temp(vector); + for (int i = 0; i < Dimension; ++i) + { + vector.data[i] = data[i].dot(temp); + } + return vector; +} + +template +typename Matrix::VectorType Matrix::GetAppliedTransform(const VectorType& vector) const +{ + VectorType result(vector); + return ApplyTransform(result); +} + +template +template +typename Matrix::MatrixType& Matrix::MakeScale(const Vector& scale) +{ + Identity(); + for (int i = 0; i < VectorDimension; ++i) + { + if (i < Dimension) + { + data[i].data[i] = scale.data[i]; + } + } + return *this; +}; + +template +template +typename Matrix::MatrixType& Matrix::SetScale(const Vector& scale) +{ + for (int i = 0; i < VectorDimension; ++i) + { + for (int j = 0; j < VectorDimension; ++j) + { + if (i < Dimension && j < Dimension) + { + if (i == j) + data[i].data[i] = scale.data[i]; + else + data[i].data[j] = T(0.0f); + } + } + } + return *this; +}; + +template +template +typename Matrix::MatrixType Matrix::CreateScale(const Vector& scale) +{ + return MatrixType().MakeScale(scale); +}; + +template +template +typename Matrix::MatrixType& Matrix::Scale(const Vector& scale) +{ + for (int i = 0; i < VectorDimension; ++i) + { + for (int j = 0; j < VectorDimension; ++j) + { + if (i < Dimension && j < Dimension) + { + data[i].data[j] *= scale.data[i]; + } + } + } + return *this; +}; + +template +bool Matrix::IsEqual(const MatrixType& rhv, const TypeReference epsilon) const +{ + for (int i = 0; i < Dimension; ++i) + { + if (!data[i].IsEqual(rhv.data[i], epsilon)) + { + return false; + } + } + return true; +} + +template +bool IsEqual(const Matrix& lhv, const Matrix& rhv, const typename Matrix::TypeReference epsilon) +{ + return lhv.IsEqual(rhv, epsilon); +} + +template +Matrix operator+(const Matrix& lhv, const Matrix& rhv) +{ + Matrix result; + for (int i = 0; i < Dimension; ++i) + { + result.data[i] = lhv.data[i] + rhv.data[i]; + } + + return result; +} + +template +Matrix operator+(const Matrix& lhv, const typename Matrix::TypeReference rhv) +{ + Matrix result; + for (int i = 0; i < Dimension; ++i) + { + result.data[i] = lhv.data[i] + rhv; + } + + return result; +} + +template +Matrix operator+(const typename Matrix::TypeReference lhv, const Matrix& rhv) +{ + Matrix result; + for (int i = 0; i < Dimension; ++i) + { + result.data[i] = lhv + rhv.data[i]; + } + + return result; +} + +template +Matrix operator-(const Matrix& lhv, const Matrix& rhv) +{ + Matrix result; + for (int i = 0; i < Dimension; ++i) + { + result.data[i] = lhv.data[i] - rhv.data[i]; + } + + return result; +} + +template Matrix operator-(const Matrix& lhv, const typename Matrix::TypeReference rhv) +{ + Matrix result; + for (int i = 0; i < Dimension; ++i) + { + result.data[i] = lhv.data[i] - rhv; + } + + return result; +} + +template +Matrix operator-(const typename Matrix::TypeReference lhv, const Matrix& rhv) +{ + Matrix result; + for (int i = 0; i < Dimension; ++i) + { + result.data[i] = lhv - rhv.data[i]; + } + + return result; +} + +template +Matrix operator*(const Matrix& lhv, const Matrix& rhv) +{ + Matrix result(lhv); + return result *= rhv; +} + +template +Matrix operator*(const Matrix& lhv, const typename Matrix::TypeReference rhv) +{ + Matrix result(lhv); + return result *= rhv; +} + +template +Matrix operator*(const typename Matrix::TypeReference lhv, const Matrix& rhv) +{ + Matrix result(rhv); + return result *= lhv; +} + +template +Vector operator*(const Matrix& lhv, const Vector& rhv) +{ + Vector result; + for (int i = 0; i < Dimension; ++i) + { + result.data[i] = lhv.data[i].dot(rhv); + } + + return result; +} + +template +Vector operator*(const Vector& lhv, const Matrix& rhv) +{ + Vector temp; + for (int i = 0; i < Dimension; ++i) + { + temp.data[i] = rhv.GetColumn(i).Dot(lhv); + } + return temp; +} + +template +Vector operator*(const Matrix& lhv, const Vector& rhv) +{ + Matrix minor = lhv.MinorMatrix(Dimension - 1, Dimension - 1); + Vector result = minor * rhv; + for (int i = 0; i < Dimension - 1; ++i) + { + result.data[i] += lhv.data[i].data[Dimension - 1]; + } + + return result; +} + +template +Vector operator*(const Vector& lhv, const Matrix& rhv) +{ + Matrix minor = rhv.MinorMatrix(Dimension - 1, Dimension - 1); + Vector result = lhv * minor; + for (int i = 0; i < Dimension - 1; ++i) + { + result.data[i] += rhv.data[i].data[Dimension - 1]; + } + return result; +} + +template +Matrix operator/(const Matrix& lhv, const typename Matrix::TypeReference rhv) +{ + Matrix result; + for (int i = 0; i < Dimension; ++i) + { + result.data[i] = lhv.data[i] / rhv; + } + + return result; +} + +template +Matrix operator/(const typename Matrix::TypeReference lhv, const Matrix& rhv) +{ + Matrix result; + for (int i = 0; i < Dimension; ++i) + { + result.data[i] = lhv / rhv.data[i]; + } + + return result; +} + +template +bool operator==(const Matrix& lhv, const Matrix& rhv) +{ + for (int i = 0; i < Dimension; ++i) + { + if (lhv.data[i] != rhv.data[i]) + { + return false; + } + } + return true; +} + +template +bool operator==(const Matrix& lhv, const typename Matrix::TypeReference rhv) +{ + for (int i = 0; i < Dimension; ++i) + { + if (lhv.data[i] != rhv) + { + return false; + } + } + return true; +} + +template +bool operator==(const typename Matrix::TypeReference lhv, const Matrix& rhv) +{ + for (int i = 0; i < Dimension; ++i) + { + if (lhv != rhv.data[i]) + { + return false; + } + } + return true; +} + +template +bool operator!=(const Matrix& lhv, const Matrix& rhv) +{ + return !(lhv == rhv); +} + +template +bool operator!=(const Matrix& lhv, const typename Matrix::TypeReference rhv) +{ + return !(lhv == rhv); +} + +template +bool operator!=(const typename Matrix::TypeReference lhv, const Matrix& rhv) +{ + return !(lhv == rhv); +} + +}}}}} //Tizen::Ui::Effects::_Renderer::Math + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_MATH_MATRIX_H_ diff --git a/src/ui/effects/inc/renderer/math/FUiEffects_RendererMathMatrix1Traits.h b/src/ui/effects/inc/renderer/math/FUiEffects_RendererMathMatrix1Traits.h new file mode 100644 index 0000000..bb6a79e --- /dev/null +++ b/src/ui/effects/inc/renderer/math/FUiEffects_RendererMathMatrix1Traits.h @@ -0,0 +1,99 @@ +// +// 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 FUiEffects_RendererMathMatrix1Traits.h + * @brief The Matrix1Traits class + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_MATH_MATRIX1_TRAITS_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_MATH_MATRIX1_TRAITS_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace Math +{ + +template +class MatrixTraits : + public MatrixTraitsBase +{ +public: + typedef Matrix MatrixType; + typedef Vector VectorType; + typedef MatrixTraitsBase MatrixTraitsBaseType; + typedef typename MatrixTraitsBaseType::TypeReference TypeReference; + + using MatrixTraitsBaseType::data; + + inline VectorType& I(void); + inline const VectorType& I(void) const; + + inline MatrixType& Set(const VectorType& i); + inline MatrixType& Set(const TypeReference a0); + + inline static MatrixType& GetIdentity(void); + + inline VectorType& ApplyTransform(void) const; + inline VectorType GetAppliedTransform(void) const; + + inline MatrixType& MakeScale(const TypeReference x, const TypeReference y); + inline MatrixType& SetScale(const TypeReference x, const TypeReference y); + static inline MatrixType CreateScale(const TypeReference x, const TypeReference y); + inline MatrixType& Scale(const TypeReference x, const TypeReference y); +}; + +template +typename MatrixTraits::VectorType& MatrixTraits::I(void) +{ + return data[0]; +} + +template +const typename MatrixTraits::VectorType& MatrixTraits::I(void) const +{ + return data[0]; +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::Set(const VectorType& i) +{ + data[0] = i; + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::Set(const TypeReference a0) +{ + data[0].Set(a0); + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::GetIdentity(void) +{ + static MatrixType identityMatrix = MatrixType(T(1.0f)); + return identityMatrix; +} + +}}}}} //Tizen::Ui::Effects::_Renderer::Math + + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_MATH_MATRIX1_TRAITS_H_ diff --git a/src/ui/effects/inc/renderer/math/FUiEffects_RendererMathMatrix2Traits.h b/src/ui/effects/inc/renderer/math/FUiEffects_RendererMathMatrix2Traits.h new file mode 100644 index 0000000..156e35b --- /dev/null +++ b/src/ui/effects/inc/renderer/math/FUiEffects_RendererMathMatrix2Traits.h @@ -0,0 +1,251 @@ +// +// 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 FUiEffects_RendererMathMatrix2Traits.h + * @brief The Matrix2Traits class + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_MATH_MATRIX2_TRAITS_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_MATH_MATRIX2_TRAITS_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace Math +{ + +template +class MatrixTraits : + public MatrixTraitsBase +{ +public: + typedef Matrix MatrixType; + typedef Vector VectorType; + typedef MatrixTraitsBase MatrixTraitsBaseType; + typedef typename MatrixTraitsBaseType::TypeReference TypeReference; + + using MatrixTraitsBaseType::data; + + inline VectorType& I(void); + inline const VectorType& I(void) const; + + inline VectorType& J(void); + inline const VectorType& J(void) const; + + inline MatrixType& Set(const VectorType& i, const VectorType& j); + inline MatrixType& Set(const TypeReference a11, const TypeReference a12, + const TypeReference a21, const TypeReference a22); + + inline static MatrixType& GetIdentity(void); + + inline VectorType& ApplyTransform(void) const; + inline VectorType GetAppliedTransform(void) const; + + inline MatrixType& Slerp(const MatrixType& to, const TypeReference coeff); + inline MatrixType GetSlerped(const MatrixType& to, const TypeReference coeff) const; + inline MatrixType& MakeSlerped(const MatrixType& from, const MatrixType& to, const TypeReference coeff); + static inline MatrixType CreateSlerped(const MatrixType& from, const MatrixType& to, const TypeReference coeff); + + inline MatrixType& MakeRotation(const TypeReference angleRad); + inline MatrixType& Rotate(const TypeReference angleRad); + static inline MatrixType CreateRotation(const TypeReference angleRad); + inline TypeReference GetRotationAngle(void) const; + + inline MatrixType& MakeScale(const TypeReference x, const TypeReference y); + inline MatrixType& SetScale(const TypeReference x, const TypeReference y); + static inline MatrixType CreateScale(const TypeReference x, const TypeReference y); + inline MatrixType& Scale(const TypeReference x, const TypeReference y); +}; + +template +typename MatrixTraits::VectorType& MatrixTraits::I(void) +{ + return data[0]; +} + +template +const typename MatrixTraits::VectorType& MatrixTraits::I(void) const +{ + return data[0]; +} + +template +typename MatrixTraits::VectorType& MatrixTraits::J(void) +{ + return data[1]; +} + +template +const typename MatrixTraits::VectorType& MatrixTraits::J(void) const +{ + return data[1]; +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::Set(const VectorType& i, const VectorType& j) +{ + data[0] = i; + data[1] = j; + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::Set(const TypeReference a11, const TypeReference a12, + const TypeReference a21, const TypeReference a22) +{ + data[0].Set(a11, a12); + data[1].Set(a21, a22); + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::GetIdentity(void) +{ + static MatrixType identityMatrix = MatrixType(T(1.0f), T(0.0f), + T(0.0f), T(1.0f)); + return identityMatrix; +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::Slerp(const MatrixType& to, const TypeReference coeff) +{ + MakeRotation(effects_lerp(GetRotationAngle(), to.GetRotationAngle(), coeff)); + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType MatrixTraits::GetSlerped(const MatrixType& to, const TypeReference coeff) const +{ + MatrixType result; + result.MakeRotation(effects_lerp(GetRotationAngle(), to.GetRotationAngle(), coeff)); + return result; +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::MakeSlerped(const MatrixType& from, const MatrixType& to, const TypeReference coeff) +{ + MakeRotation(effects_lerp(from.GetRotationAngle(), to.GetRotationAngle(), coeff)); + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType MatrixTraits::CreateSlerped(const MatrixType& from, const MatrixType& to, const TypeReference coeff) +{ + return MatrixType().MakeSlerped(from, to, coeff); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::MakeRotation(const TypeReference angleRad) +{ + const T s = effects_sin(angleRad); + const T c = effects_cos(angleRad); + data[0].data[0] = c; + data[0].data[1] = -s; + data[1].data[0] = s; + data[1].data[1] = c; + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::Rotate(const TypeReference angleRad) +{ + const T s = effects_sin(angleRad); + const T c = effects_cos(angleRad); + const T ix = data[0].data[0] * c - data[1].data[0] * s; + const T iy = data[0].data[1] * c - data[1].data[1] * s; + const T jx = data[0].data[0] * s + data[1].data[0] * c; + const T jy = data[0].data[1] * s + data[1].data[1] * c; + data[0].data[0] = ix; + data[0].data[1] = iy; + data[1].data[0] = jx; + data[1].data[1] = jy; + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType MatrixTraits::CreateRotation(const TypeReference angleRad) +{ + return MatrixType().MakeRotation(angleRad); +} + +template +typename MatrixTraits::TypeReference MatrixTraits::GetRotationAngle(void) const +{ + static const T t0(0.0f); + static const T t1(1.0f); + + static const VectorType orig_vector = VectorType(t1, t0); + static const VectorType orig_vector_cross = VectorType(t0, t1); + + VectorType rotated = VectorType(orig_vector.data[0] * data[0].data[0] + orig_vector.data[1] * data[0].data[1], + orig_vector.data[0] * data[1].data[0] + orig_vector.data[1] * data[1].data[1]).normalize(); + + const T angleCos = effects_clamp(rotated.dot(orig_vector), -t1, t1); + const T angleCosCross = effects_clamp(rotated.dot(orig_vector_cross), -t1, t1); + + if (angleCosCross > t0) + { + return effects_acos(angleCos); + } + + return -effects_acos(angleCos); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::MakeScale(const TypeReference x, const TypeReference y) +{ + data[0].data[0] = x; + data[1].data[1] = y; + data[0].data[1] = T(0.0f); + data[1].data[0] = T(0.0f); + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::SetScale(const TypeReference x, const TypeReference y) +{ + data[0].data[0] = x; + data[1].data[1] = y; + data[0].data[1] = T(0.0f); + data[1].data[0] = T(0.0f); + return *this; +} + +template +typename MatrixTraits::MatrixType MatrixTraits::CreateScale(const TypeReference x, const TypeReference y) +{ + return MatrixType().MakeScale(x, y); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::Scale(const TypeReference x, const TypeReference y) +{ + data[0].data[0] *= x; + data[0].data[1] *= x; + data[1].data[0] *= y; + data[1].data[1] *= y; + + return *(static_cast(this)); +} + +}}}}} //Tizen::Ui::Effects::_Renderer::Math + + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_MATH_MATRIX2_TRAITS_H_ diff --git a/src/ui/effects/inc/renderer/math/FUiEffects_RendererMathMatrix3Traits.h b/src/ui/effects/inc/renderer/math/FUiEffects_RendererMathMatrix3Traits.h new file mode 100644 index 0000000..03d9282 --- /dev/null +++ b/src/ui/effects/inc/renderer/math/FUiEffects_RendererMathMatrix3Traits.h @@ -0,0 +1,533 @@ +// +// 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 FUiEffects_RendererMathMatrix3Traits.h + * @brief The Matrix3Traits class + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_MATH_MATRIX3_TRAITS_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_MATH_MATRIX3_TRAITS_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace Math +{ + +template +class MatrixTraits : + public MatrixTraitsBase +{ +public: + typedef Matrix MatrixType; + typedef Vector VectorType; + typedef MatrixTraitsBase MatrixTraitsBaseType; + typedef typename MatrixTraitsBaseType::TypeReference TypeReference; + + using MatrixTraitsBaseType::data; + + inline VectorType& I(void); + inline const VectorType& I(void) const; + + inline VectorType& J(void); + inline const VectorType& J(void) const; + + inline VectorType& K(void); + inline const VectorType& K(void) const; + + inline MatrixType& Set(const VectorType& i, const VectorType& j, const VectorType& k); + + inline MatrixType& Set(const TypeReference a11, const TypeReference a12, const TypeReference a13, + const TypeReference a21, const TypeReference a22, const TypeReference a23, + const TypeReference a31, const TypeReference a32, const TypeReference a33); + + inline static MatrixType& GetIdentity(void); + + inline MatrixType& Slerp(const MatrixType& to, const TypeReference coeff); + inline MatrixType GetSlerped(const MatrixType& to, const TypeReference coeff) const; + inline MatrixType& MakeSlerped(const MatrixType& from, const MatrixType& to, const TypeReference coeff); + static inline MatrixType CreateSlerped(const MatrixType& from, const MatrixType& to, const TypeReference coeff); + + inline VectorType& ApplyRotation(VectorType& vector) const; + inline VectorType GetAppliedRotation(const VectorType& vector) const; + inline VectorType& ApplyTranslate(VectorType& vector) const; + inline VectorType GetAppliedTranslate(const VectorType& vector) const; + + inline Vector& ApplyTransform(Vector& vector) const; + inline Vector GetAppliedTransform(const Vector& vector) const; + inline Vector& ApplyRotation(Vector& vector) const; + inline Vector GetAppliedRotation(const Vector& vector) const; + inline Vector& ApplyTranslate(Vector& vector) const; + inline Vector GetAppliedTranslate(const Vector& vector) const; + + inline MatrixType& SetRotation(const TypeReference angleRad); + inline MatrixType& SetRotation(const Matrix& rotation); + inline MatrixType& SetRotation(const MatrixType& rotation); + inline MatrixType& MakeRotation(const TypeReference angleRad); + inline MatrixType& MakeRotation(const Matrix& rotation); + inline MatrixType& MakeRotation(const MatrixType& rotation); + inline MatrixType& Rotate(const TypeReference angleRad); + inline MatrixType& Rotate(const Matrix& rotation); + inline MatrixType& Rotate(const MatrixType& rotation); + static inline MatrixType CreateRotation(const TypeReference angleRad); + static inline MatrixType CreateRotation(const Matrix& rotation); + static inline MatrixType CreateRotation(const MatrixType& rotation); + inline Matrix GetRotation(void) const; + inline TypeReference GetRotationAngle(void) const; + + inline MatrixType& MakeScale(const TypeReference x, const TypeReference y); + inline MatrixType& SetScale(const TypeReference x, const TypeReference y); + static inline MatrixType CreateScale(const TypeReference x, const TypeReference y); + inline MatrixType& Scale(const TypeReference x, const TypeReference y); + + inline MatrixType& SetTranslation(const TypeReference x, const TypeReference y); + inline MatrixType& SetTranslation(const Vector& tran); + inline MatrixType& MakeTranslation(const TypeReference x, const TypeReference y); + inline MatrixType& MakeTranslation(const Vector& tran); + inline MatrixType& Translate(const TypeReference x, const TypeReference y); + inline MatrixType& Translate(const Vector& tran); + static inline MatrixType CreateTranslation(const TypeReference x, const TypeReference y); + static inline MatrixType CreateTranslation(const Vector& tran); + inline Vector GetTranslation(void) const; + inline VectorType GetFullTranslation(void) const; +}; + +template +typename MatrixTraits::VectorType& MatrixTraits::I(void) +{ + return data[0]; +} + +template +const typename MatrixTraits::VectorType& MatrixTraits::I(void) const +{ + return data[0]; +} + +template +typename MatrixTraits::VectorType& MatrixTraits::J(void) +{ + return data[1]; +} + +template +const typename MatrixTraits::VectorType& MatrixTraits::J(void) const +{ + return data[1]; +} + +template +typename MatrixTraits::VectorType& MatrixTraits::K(void) +{ + return data[2]; +} + +template +const typename MatrixTraits::VectorType& MatrixTraits::K(void) const +{ + return data[2]; +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::Set(const VectorType& i, const VectorType& j, const VectorType& k) +{ + data[0] = i; + data[1] = j; + data[2] = k; + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::Set(const TypeReference a11, const TypeReference a12, const TypeReference a13, + const TypeReference a21, const TypeReference a22, const TypeReference a23, + const TypeReference a31, const TypeReference a32, const TypeReference a33) +{ + data[0].Set(a11, a12, a13); + data[1].Set(a21, a22, a23); + data[2].Set(a31, a32, a33); + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::GetIdentity(void) +{ + static MatrixType identityMatrix = MatrixType(T(1.0f), T(0.0f), T(0.0f), + T(0.0f), T(1.0f), T(0.0f), + T(0.0f), T(0.0f), T(1.0f)); + return identityMatrix; +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::Slerp(const MatrixType& to, const TypeReference coeff) +{ + SetRotation(effects_lerp(GetRotationAngle(), to.GetRotationAngle(), coeff)); + VectorType column = VectorType(data[0].data[2], data[1].data[2], data[2].data[2]); + column.lerp(VectorType(to.data[0].data[2], to.data[1].data[2], to.data[2].data[2]), coeff); + data[0].data[2] = column.data[0]; + data[1].data[2] = column.data[1]; + data[2].data[2] = column.data[2]; + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType MatrixTraits::GetSlerped(const MatrixType& to, const TypeReference coeff) const +{ + MatrixType result; + result.MakeRotation(effects_lerp(GetRotationAngle(), to.GetRotationAngle(), coeff)); + VectorType column = VectorType(data[0].data[2], data[1].data[2], data[2].data[2]); + column.lerp(VectorType(to.data[0].data[2], to.data[1].data[2], to.data[2].data[2]), coeff); + result.data[0].data[2] = column.data[0]; + result.data[1].data[2] = column.data[1]; + result.data[2].data[2] = column.data[2]; + return result; +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::MakeSlerped(const MatrixType& from, const MatrixType& to, const TypeReference coeff) +{ + *this = from; + Slerp(to, coeff); + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType MatrixTraits::CreateSlerped(const MatrixType& from, const MatrixType& to, const TypeReference coeff) +{ + return MatrixType().MakeSlerped(from, to, coeff); +} + +template +typename MatrixTraits::VectorType& MatrixTraits::ApplyRotation(VectorType& vector) const +{ + return vector.Set(data[0].data[0] * vector.data[0] + data[0].data[1] * vector.data[1], + data[1].data[0] * vector.data[0] + data[1].data[1] * vector.data[1], + vector.data[2]); +} + +template +typename MatrixTraits::VectorType MatrixTraits::GetAppliedRotation(const VectorType& vector) const +{ + return VectorType(data[0].data[0] * vector.data[0] + data[0].data[1] * vector.data[1], + data[1].data[0] * vector.data[0] + data[1].data[1] * vector.data[1], + vector.data[2]); +} + +template +typename MatrixTraits::VectorType& MatrixTraits::ApplyTranslate(VectorType& vector) const +{ + return vector.Set(vector.data[0] + data[0].data[2] * vector.data[2], + vector.data[1] + data[1].data[2] * vector.data[2], + vector.data[2]); +} + +template +typename MatrixTraits::VectorType MatrixTraits::GetAppliedTranslate(const VectorType& vector) const +{ + return VectorType(vector.data[0] + data[0].data[2] * vector.data[2], + vector.data[1] + data[1].data[2] * vector.data[2], + vector.data[2]); +} + +template +Vector& MatrixTraits::ApplyTransform(Vector& vector) const +{ + return vector.Set(data[0].data[0] * vector.data[0] + data[0].data[1] * vector.data[1] + data[0].data[2], + data[1].data[0] * vector.data[0] + data[1].data[1] * vector.data[1] + data[1].data[2]); +} + +template +Vector MatrixTraits::GetAppliedTransform(const Vector& vector) const +{ + return Vector(data[0].data[0] * vector.data[0] + data[0].data[1] * vector.data[1] + data[0].data[2], + data[1].data[0] * vector.data[0] + data[1].data[1] * vector.data[1] + data[1].data[2]); +} + +template +Vector& MatrixTraits::ApplyRotation(Vector& vector) const +{ + return vector.Set(data[0].data[0] * vector.data[0] + data[0].data[1] * vector.data[1], + data[1].data[0] * vector.data[0] + data[1].data[1] * vector.data[1]); +} + +template +Vector MatrixTraits::GetAppliedRotation(const Vector& vector) const +{ + return Vector(data[0].data[0] * vector.data[0] + data[0].data[1] * vector.data[1], + data[1].data[0] * vector.data[0] + data[1].data[1] * vector.data[1]); +} + +template +Vector& MatrixTraits::ApplyTranslate(Vector& vector) const +{ + return vector.Set(vector.data[0] + data[0].data[2], + vector.data[1] + data[1].data[2]); +} + +template +Vector MatrixTraits::GetAppliedTranslate(const Vector& vector) const +{ + return Vector(vector.data[0] + data[0].data[2], + vector.data[1] + data[1].data[2]); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::SetRotation(const TypeReference angleRad) +{ + const T s = effects_sin(angleRad); + const T c = effects_cos(angleRad); + data[0].data[0] = c; + data[0].data[1] = -s; + data[1].data[0] = s; + data[1].data[1] = c; + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::SetRotation(const Matrix& rotation) +{ + data[0].data[0] = rotation.data[0].data[0]; + data[0].data[1] = rotation.data[0].data[1]; + data[1].data[0] = rotation.data[1].data[0]; + data[1].data[1] = rotation.data[1].data[1]; + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::SetRotation(const MatrixType& rotation) +{ + data[0].data[0] = rotation.data[0].data[0]; + data[0].data[1] = rotation.data[0].data[1]; + data[1].data[0] = rotation.data[1].data[0]; + data[1].data[1] = rotation.data[1].data[1]; + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::MakeRotation(const TypeReference angleRad) +{ + *this = GetIdentity(); + return SetRotation(angleRad); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::MakeRotation(const Matrix& rotation) +{ + *this = GetIdentity(); + return SetRotation(rotation); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::MakeRotation(const MatrixType& rotation) +{ + *this = GetIdentity(); + return SetRotation(rotation); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::Rotate(const TypeReference angleRad) +{ + const T s = effects_sin(angleRad); + const T c = effects_cos(angleRad); + const T ix = data[0].data[0] * c - data[1].data[0] * s; + const T iy = data[0].data[1] * c - data[1].data[1] * s; + const T jx = data[0].data[0] * s + data[1].data[0] * c; + const T jy = data[0].data[1] * s + data[1].data[1] * c; + data[0].data[0] = ix; + data[0].data[1] = iy; + data[1].data[0] = jx; + data[1].data[1] = jy; + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::Rotate(const Matrix& rotation) +{ + const T ix = data[0].data[0] * rotation.data[0].data[0] + data[1].data[0] * rotation.data[0].data[1]; + const T iy = data[0].data[1] * rotation.data[0].data[0] + data[1].data[1] * rotation.data[0].data[1]; + const T jx = data[0].data[0] * rotation.data[1].data[0] + data[1].data[0] * rotation.data[1].data[1]; + const T jy = data[0].data[1] * rotation.data[1].data[0] + data[1].data[1] * rotation.data[1].data[1]; + data[0].data[0] = ix; + data[0].data[1] = iy; + data[1].data[0] = jx; + data[1].data[1] = jy; + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::Rotate(const MatrixType& rotation) +{ + const T ix = data[0].data[0] * rotation.data[0].data[0] + data[1].data[0] * rotation.data[0].data[1]; + const T iy = data[0].data[1] * rotation.data[0].data[0] + data[1].data[1] * rotation.data[0].data[1]; + const T jx = data[0].data[0] * rotation.data[1].data[0] + data[1].data[0] * rotation.data[1].data[1]; + const T jy = data[0].data[1] * rotation.data[1].data[0] + data[1].data[1] * rotation.data[1].data[1]; + data[0].data[0] = ix; + data[0].data[1] = iy; + data[1].data[0] = jx; + data[1].data[1] = jy; + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType MatrixTraits::CreateRotation(const TypeReference angleRad) +{ + return MatrixType().MakeRotation(angleRad); +} + +template +typename MatrixTraits::MatrixType MatrixTraits::CreateRotation(const Matrix& rotation) +{ + return MatrixType().MakeRotation(rotation); +} + +template +typename MatrixTraits::MatrixType MatrixTraits::CreateRotation(const MatrixType& rotation) +{ + return MatrixType().MakeRotation(rotation); +} + +template +Matrix MatrixTraits::GetRotation() const +{ + return Matrix(data[0].data[0], data[0].data[1], data[1].data[0], data[1].data[1]); +} + +template +typename MatrixTraits::TypeReference MatrixTraits::GetRotationAngle() const +{ + static const T t0(0.0f); + static const T t1(1.0f); + + static const Vector orig_vector = Vector(t1, t0); + static const Vector orig_vector_cross = Vector(t0, t1); + + Vector rotated(GetAppliedRotation(orig_vector).normalize()); + const T angleCos = effects_clamp(rotated.dot(orig_vector), -t1, t1); + const T angleCosCross = effects_clamp(rotated.dot(orig_vector_cross), -t1, t1); + + if (angleCosCross > t0) + { + return effects_acos(angleCos); + } + return -effects_acos(angleCos); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::MakeScale(const TypeReference x, const TypeReference y) +{ + *this = GetIdentity(); + return SetScale(x, y); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::SetScale(const TypeReference x, const TypeReference y) +{ + data[0].data[0] = x; + data[1].data[1] = y; + + data[0].data[1] = data[1].data[0] = T(0.0f); + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType MatrixTraits::CreateScale(const TypeReference x, const TypeReference y) +{ + return MatrixType().MakeScale(x, y); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::Scale(const TypeReference x, const TypeReference y) +{ + data[0].data[0] *= x; + data[0].data[1] *= x; + data[1].data[0] *= y; + data[1].data[1] *= y; + + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::SetTranslation(const TypeReference x, const TypeReference y) +{ + data[0].data[2] = x; + data[1].data[2] = y; + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::SetTranslation(const Vector& tran) +{ + return SetTranslation(tran.data[0], tran.data[1]); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::MakeTranslation(const TypeReference x, const TypeReference y) +{ + *this = GetIdentity(); + return SetTranslation(x, y); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::MakeTranslation(const Vector& tran) +{ + return MakeTranslation(tran.data[0], tran.data[1]); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::Translate(const TypeReference x, const TypeReference y) +{ + data[0].data[2] += x; + data[1].data[2] += y; + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::Translate(const Vector& tran) +{ + return Translate(tran.data[0], tran.data[1]); +} + +template +typename MatrixTraits::MatrixType MatrixTraits::CreateTranslation(const TypeReference x, const TypeReference y) +{ + return MatrixType().MakeTranslation(x, y); +} + +template +typename MatrixTraits::MatrixType MatrixTraits::CreateTranslation(const Vector& tran) +{ + return MatrixType().MakeTranslation(tran); +} + +template +Vector MatrixTraits::GetTranslation(void) const +{ + return Vector().Set(data[0].data[2], data[1].data[2]); +} + +template +typename MatrixTraits::VectorType MatrixTraits::GetFullTranslation(void) const +{ + return VectorType().Set(data[0].data[2], data[1].data[2], data[2].data[2]); +}; + +}}}}} //Tizen::Ui::Effects::_Renderer::Math + + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_MATH_MATRIX3_TRAITS_H_ diff --git a/src/ui/effects/inc/renderer/math/FUiEffects_RendererMathMatrixTraits.h b/src/ui/effects/inc/renderer/math/FUiEffects_RendererMathMatrixTraits.h new file mode 100644 index 0000000..7f621b7 --- /dev/null +++ b/src/ui/effects/inc/renderer/math/FUiEffects_RendererMathMatrixTraits.h @@ -0,0 +1,1413 @@ +// +// 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 FUiEffects_RendererMathMatrixTraits.h + * @brief The MatrixTraits class + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_MATH_MATRIX_TRAITS_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_MATH_MATRIX_TRAITS_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace Math +{ + +template +class Vector; +template +class Quaternion; + +template +class MatrixTraits : + public MatrixTraitsBase +{ +public: + typedef Matrix MatrixType; + typedef Vector VectorType; + typedef Vector Vector3; + typedef Matrix Matrix3; + typedef Matrix Matrix2; + + typedef MatrixTraitsBase MatrixTraitsBaseType; + typedef typename MatrixTraitsBaseType::TypeReference TypeReference; + + using MatrixTraitsBaseType::data; + + inline VectorType& I(void); + inline const VectorType& I(void) const; + + inline VectorType& J(void); + inline const VectorType& J(void) const; + + inline VectorType& K(void); + inline const VectorType& K(void) const; + + inline VectorType& C(void); + inline const VectorType& C(void) const; + + inline MatrixType& Set(const VectorType& i, const VectorType& j, const VectorType& k, const VectorType& c); + inline MatrixType& Set(const TypeReference a11, const TypeReference a12, const TypeReference a13, const TypeReference a14, + const TypeReference a21, const TypeReference a22, const TypeReference a23, const TypeReference a24, + const TypeReference a31, const TypeReference a32, const TypeReference a33, const TypeReference a34, + const TypeReference a41, const TypeReference a42, const TypeReference a43, const TypeReference a44); + + inline static const MatrixType& GetIdentity(void); + + inline MatrixType& Slerp(const MatrixType& to, const TypeReference coeff); + inline MatrixType GetSlerped(const MatrixType& to, const TypeReference coeff) const; + inline MatrixType& MakeSlerped(const MatrixType& from, const MatrixType& to, const TypeReference coeff); + static inline MatrixType CreateSlerped(const MatrixType& from, const MatrixType& to, const TypeReference coeff); + + inline VectorType& ApplyRotation(VectorType& vector) const; + inline VectorType GetAppliedRotation(const VectorType& vector) const; + inline VectorType& ApplyTranslate(VectorType& vector) const; + inline VectorType GetAppliedTranslate(const VectorType& vector) const; + + inline Vector3& ApplyTransform(Vector3& vector) const; + inline Vector3 GetAppliedTransform(const Vector3& vector) const; + inline Vector3& ApplyRotation(Vector3& vector) const; + inline Vector3 GetAppliedRotation(const Vector3& vector) const; + inline Vector3& ApplyTranslate(Vector3& vector) const; + inline Vector3 GetAppliedTranslate(const Vector3& vector) const; + + inline Quaternion& ApplyRotation(Quaternion& quaternion) const; + inline Quaternion GetAppliedRotation(const Quaternion& quaternion) const; + + inline MatrixType& SetRotation(const TypeReference xAngleRad, const TypeReference yAngleRad, const TypeReference zAngleRad, RotationOrder3 order = ROTATION_XYZ); + inline MatrixType& SetRotation(const Vector3& anglesRad, RotationOrder3 order = ROTATION_XYZ); + inline MatrixType& SetRotationX(const TypeReference angleRad); + inline MatrixType& SetRotationY(const TypeReference angleRad); + inline MatrixType& SetRotationZ(const TypeReference angleRad); + inline MatrixType& SetRotationAxis(const Vector3& axis, const TypeReference angleRad); + inline MatrixType& SetRotationAxis(const TypeReference xAxis, const TypeReference yAxis, const TypeReference zAxis, const TypeReference angleRad); + inline MatrixType& SetRotation(const Quaternion& rotation); + inline MatrixType& SetRotation(const Matrix3& rotation); + inline MatrixType& MakeRotation(const TypeReference xAngleRad, const TypeReference yAngleRad, const TypeReference zAngleRad, RotationOrder3 order = ROTATION_XYZ); + inline MatrixType& MakeRotation(const Vector3& anglesRad, RotationOrder3 order = ROTATION_XYZ); + inline MatrixType& MakeRotationX(const TypeReference angleRad); + inline MatrixType& MakeRotationY(const TypeReference angleRad); + inline MatrixType& MakeRotationZ(const TypeReference angleRad); + inline MatrixType& MakeRotationAxis(const Vector3& axis, const TypeReference angleRad); + inline MatrixType& MakeRotationAxis(const TypeReference xAxis, const TypeReference yAxis, const TypeReference zAxis, const TypeReference angleRad); + inline MatrixType& MakeRotation(const Quaternion& rotation); + inline MatrixType& MakeRotation(const Matrix3& rotation); + inline MatrixType& Rotate(const TypeReference xAngleRad, const TypeReference yAngleRad, const TypeReference zAngleRad, RotationOrder3 order = ROTATION_XYZ); + inline MatrixType& Rotate(const Vector3& anglesRad, RotationOrder3 order3 = ROTATION_XYZ); + inline MatrixType& RotateX(const TypeReference angleRad); + inline MatrixType& RotateY(const TypeReference angleRad); + inline MatrixType& RotateZ(const TypeReference angleRad); + inline MatrixType& RotateAxis(const Vector3& axis, const TypeReference angleRad); + inline MatrixType& RotateAxis(const TypeReference xAxis, const TypeReference yAxis, const TypeReference zAxis, const TypeReference angleRad); + inline MatrixType& Rotate(const Quaternion& rotation); + inline MatrixType& Rotate(const Matrix3& rotation); + inline MatrixType& Rotate(const MatrixType& rotation); + static inline MatrixType CreateRotation(const TypeReference xAngleRad, const TypeReference yAngleRad, const TypeReference zAngleRad, RotationOrder3 order = ROTATION_XYZ); + static inline MatrixType CreateRotation(const Vector3& anglesRad, RotationOrder3 order = ROTATION_XYZ); + static inline MatrixType CreateRotationX(const TypeReference angleRad); + static inline MatrixType CreateRotationY(const TypeReference angleRad); + static inline MatrixType CreateRotationZ(const TypeReference angleRad); + static inline MatrixType CreateRotationAxis(const Vector3& axis, const TypeReference angleRad); + static inline MatrixType CreateRotationAxis(const TypeReference xAxis, const TypeReference yAxis, const TypeReference zAxis, const TypeReference angleRad); + static inline MatrixType CreateRotation(const Quaternion& rotation); + static inline MatrixType CreateRotation(const Matrix3& rotation); + inline MatrixType& GetRotationAngles(T& xAngleRad, T& yAngeRad, T& zAngleRad, unsigned int solutionNumber = 1); + inline Quaternion GetQuaternion(void) const; + inline Quaternion& GetQuaternion(Quaternion& rotation) const; + inline Matrix3 GetRotation(void) const; + inline Matrix3& GetRotation(Matrix3& rotation) const; + + inline MatrixType& MakeScale(const TypeReference x, const TypeReference y, const TypeReference z); + inline MatrixType& SetScale(const TypeReference x, const TypeReference y, const TypeReference z); + static inline MatrixType CreateScale(const TypeReference x, const TypeReference y, const TypeReference z); + inline MatrixType& Scale(const TypeReference x, const TypeReference y, const TypeReference z); + + inline MatrixType& SetTranslation(const TypeReference x, const TypeReference y, const TypeReference z); + inline MatrixType& SetTranslation(const Vector3& tran); + inline MatrixType& MakeTranslation(const TypeReference x, const TypeReference y, const TypeReference z); + inline MatrixType& MakeTranslation(const Vector3& tran); + inline MatrixType& Translate(const TypeReference x, const TypeReference y, const TypeReference z); + inline MatrixType& Translate(const Vector3& tran); + static inline MatrixType CreateTranslation(const TypeReference x, const TypeReference y, const TypeReference z); + static inline MatrixType CreateTranslation(const Vector3& tran); + inline Vector3 GetTranslation(void) const; + inline VectorType GetFullTranslation(void) const; + + inline MatrixType& MakeLookAtLH(const Vector3& eye, const Vector3& at, const Vector3& up); + inline MatrixType& MakeLookAtRH(const Vector3& eye, const Vector3& at, const Vector3& up); + inline MatrixType& MakeOrthoRH(const TypeReference width, const TypeReference height, const TypeReference zNear, const TypeReference zFar); + inline MatrixType& MakeOrthoLH(const TypeReference width, const TypeReference height, const TypeReference zNear, const TypeReference zFar); + inline MatrixType& MakeOrthoRH(const TypeReference left, const TypeReference right, const TypeReference top, const TypeReference bottom, const TypeReference zNear, const TypeReference zFar); + inline MatrixType& MakeOrthoLH(const TypeReference left, const TypeReference right, const TypeReference top, const TypeReference bottom, const TypeReference zNear, const TypeReference zFar); + inline MatrixType& MakePerspectiveLH(const TypeReference left, const TypeReference right, const TypeReference top, const TypeReference bottom, const TypeReference zNear, const TypeReference zFar); + inline MatrixType& MakePerspectiveRH(const TypeReference left, const TypeReference right, const TypeReference top, const TypeReference bottom, const TypeReference zNear, const TypeReference zFar); + inline MatrixType& MakePerspectiveLH(const TypeReference width, const TypeReference height, const TypeReference zNear, const TypeReference zFar); + inline MatrixType& MakePerspectiveRH(const TypeReference width, const TypeReference height, const TypeReference zNear, const TypeReference zFar); + inline MatrixType& MakePerspectiveFovLH(const TypeReference fovY, const TypeReference aspect, const TypeReference zNear, const TypeReference zFar); + inline MatrixType& MakePerspectiveFovRH(const TypeReference fovY, const TypeReference aspect, const TypeReference zNear, const TypeReference zFar); + static inline MatrixType CreateLookAtLH(const Vector3& eye, const Vector3& at, const Vector3& up); + static inline MatrixType CreateLookAtRH(const Vector3& eye, const Vector3& at, const Vector3& up); + static inline MatrixType CreateOrthoRH(const TypeReference width, const TypeReference height, const TypeReference zNear, const TypeReference zFar); + static inline MatrixType CreateOrthoLH(const TypeReference width, const TypeReference height, const TypeReference zNear, const TypeReference zFar); + static inline MatrixType CreateOrthoRH(const TypeReference left, const TypeReference right, const TypeReference top, const TypeReference bottom, const TypeReference zNear, const TypeReference zFar); + static inline MatrixType CreateOrthoLH(const TypeReference left, const TypeReference right, const TypeReference top, const TypeReference bottom, const TypeReference zNear, const TypeReference zFar); + static inline MatrixType CreatePerspectiveLH(const TypeReference left, const TypeReference right, const TypeReference top, const TypeReference bottom, const TypeReference zNear, const TypeReference zFar); + static inline MatrixType CreatePerspectiveRH(const TypeReference left, const TypeReference right, const TypeReference top, const TypeReference bottom, const TypeReference zNear, const TypeReference zFar); + static inline MatrixType CreatePerspectiveLH(const TypeReference width, const TypeReference height, const TypeReference zNear, const TypeReference zFar); + static inline MatrixType CreatePerspectiveRH(const TypeReference width, const TypeReference height, const TypeReference zNear, const TypeReference zFar); + static inline MatrixType CreatePerspectiveFovLH(const TypeReference fovY, const TypeReference aspect, const TypeReference zNear, const TypeReference zFar); + static inline MatrixType CreatePerspectiveFovRH(const TypeReference fovY, const TypeReference aspect, const TypeReference zNear, const TypeReference zFar); + + inline bool GetOrthoParamsRH(T& left, T& right, T& top, T& bottom, T& zNear, T& zFar) const; + inline bool GetPerspectiveParamsRH(T& left, T& right, T& top, T& bottom, T& zNear, T& zFar) const; + inline bool GetPerspectiveParamsRH(T& fovY, T& aspect, T& zNear, T& zFar) const; + inline bool GetViewParams(Vector3& position, Vector3& direction, Vector3& up, Vector3& right) const; +}; + +template +typename MatrixTraits::VectorType& MatrixTraits::I(void) +{ + return data[0]; +} + +template +const typename MatrixTraits::VectorType& MatrixTraits::I(void) const +{ + return data[0]; +} + +template +typename MatrixTraits::VectorType& MatrixTraits::J(void) +{ + return data[1]; +} + +template +const typename MatrixTraits::VectorType& MatrixTraits::J(void) const +{ + return data[1]; +} + +template +typename MatrixTraits::VectorType& MatrixTraits::K(void) +{ + return data[2]; +} + +template +const typename MatrixTraits::VectorType& MatrixTraits::K(void) const +{ + return data[2]; +} + +template +typename MatrixTraits::VectorType& MatrixTraits::C(void) +{ + return data[3]; +} + +template +const typename MatrixTraits::VectorType& MatrixTraits::C(void) const +{ + return data[3]; +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::Set(const VectorType& i, const VectorType& j, const VectorType& k, const VectorType& c) +{ + data[0] = i; + data[1] = j; + data[2] = k; + data[3] = c; + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::Set(const TypeReference a11, const TypeReference a12, const TypeReference a13, const TypeReference a14, + const TypeReference a21, const TypeReference a22, const TypeReference a23, const TypeReference a24, + const TypeReference a31, const TypeReference a32, const TypeReference a33, const TypeReference a34, + const TypeReference a41, const TypeReference a42, const TypeReference a43, const TypeReference a44) +{ + data[0].Set(a11, a12, a13, a14); + data[1].Set(a21, a22, a23, a24); + data[2].Set(a31, a32, a33, a34); + data[3].Set(a41, a42, a43, a44); + return *(static_cast(this)); +} + +template +const typename MatrixTraits::MatrixType& MatrixTraits::GetIdentity(void) +{ + static const MatrixType identityMatrix = MatrixType(T(1.0f), T(0.0f), T(0.0f), T(0.0f), + T(0.0f), T(1.0f), T(0.0f), T(0.0f), + T(0.0f), T(0.0f), T(1.0f), T(0.0f), + T(0.0f), T(0.0f), T(0.0f), T(1.0f)); + return identityMatrix; +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::Slerp(const MatrixType& to, const TypeReference coeff) +{ + SetRotation(GetQuaternion().Slerp(to.GetQuaternion(), coeff)); + + VectorType column = VectorType(data[0].data[3], data[1].data[3], data[2].data[3], data[3].data[3]); + column.lerp(VectorType(to.data[0].data[3], to.data[1].data[3], to.data[2].data[3], to.data[3].data[3]), coeff); + data[0].data[3] = column.data[0]; + data[1].data[3] = column.data[1]; + data[2].data[3] = column.data[2]; + data[3].data[3] = column.data[3]; + + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType MatrixTraits::GetSlerped(const MatrixType& to, const TypeReference coeff) const +{ + MatrixType result; + result.MakeRotation(GetQuaternion().Slerp(to.GetQuaternion(), coeff)); + + VectorType column = VectorType(data[0].data[3], data[1].data[3], data[2].data[3], data[3].data[3]); + column.lerp(VectorType(to.data[0].data[3], to.data[1].data[3], to.data[2].data[3], to.data[3].data[3]), coeff); + result.data[0].data[3] = column.data[0]; + result.data[1].data[3] = column.data[1]; + result.data[2].data[3] = column.data[2]; + result.data[3].data[3] = column.data[3]; + + return result; +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::MakeSlerped(const MatrixType& from, const MatrixType& to, const TypeReference coeff) +{ + *this = from; + Slerp(to, coeff); + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType MatrixTraits::CreateSlerped(const MatrixType& from, const MatrixType& to, const TypeReference coeff) +{ + return MatrixType().MakeSlerped(from, to, coeff); +} + +template +typename MatrixTraits::VectorType& MatrixTraits::ApplyRotation(VectorType& vector) const +{ + return vector.Set(vector.data[0] * data[0].data[0] + vector.data[1] * data[0].data[1] + vector.data[2] * data[0].data[2], + vector.data[0] * data[1].data[0] + vector.data[1] * data[1].data[1] + vector.data[2] * data[1].data[2], + vector.data[0] * data[2].data[0] + vector.data[1] * data[2].data[1] + vector.data[2] * data[2].data[2], + vector.data[3]); +} + +template +typename MatrixTraits::VectorType MatrixTraits::GetAppliedRotation(const VectorType& vector) const +{ + return VectorType(vector.data[0] * data[0].data[0] + vector.data[1] * data[0].data[1] + vector.data[2] * data[0].data[2], + vector.data[0] * data[1].data[0] + vector.data[1] * data[1].data[1] + vector.data[2] * data[1].data[2], + vector.data[0] * data[2].data[0] + vector.data[1] * data[2].data[1] + vector.data[2] * data[2].data[2], + vector.data[3]); +} + +template +typename MatrixTraits::VectorType& MatrixTraits::ApplyTranslate(VectorType& vector) const +{ + return vector.Set(vector.data[0] + vector.data[3] * data[3].data[0], + vector.data[1] + vector.data[3] * data[3].data[1], + vector.data[2] + vector.data[3] * data[3].data[2], + vector.data[3]); +} + +template +typename MatrixTraits::VectorType MatrixTraits::GetAppliedTranslate(const VectorType& vector) const +{ + return VectorType(vector.data[0] + vector.data[3] * data[3].data[0], + vector.data[1] + vector.data[3] * data[3].data[1], + vector.data[2] + vector.data[3] * data[3].data[2], + vector.data[3]); +} + +template +typename MatrixTraits::Vector3& MatrixTraits::ApplyTransform(Vector3& vector) const +{ + return vector.Set(vector.data[0] * data[0].data[0] + vector.data[1] * data[0].data[1] + vector.data[2] * data[0].data[2] + data[0].data[3], + vector.data[0] * data[1].data[0] + vector.data[1] * data[1].data[1] + vector.data[2] * data[1].data[2] + data[1].data[3], + vector.data[0] * data[2].data[0] + vector.data[1] * data[2].data[1] + vector.data[2] * data[2].data[2] + data[2].data[3]); +} + +template +typename MatrixTraits::Vector3 MatrixTraits::GetAppliedTransform(const Vector3& vector) const +{ + return Vector3().Set(vector.data[0] * data[0].data[0] + vector.data[1] * data[0].data[1] + vector.data[2] * data[0].data[2] + data[0].data[3], + vector.data[0] * data[1].data[0] + vector.data[1] * data[1].data[1] + vector.data[2] * data[1].data[2] + data[1].data[3], + vector.data[0] * data[2].data[0] + vector.data[1] * data[2].data[1] + vector.data[2] * data[2].data[2] + data[2].data[3]); +} + +template +typename MatrixTraits::Vector3& MatrixTraits::ApplyRotation(Vector3& vector) const +{ + return vector.Set(vector.data[0] * data[0].data[0] + vector.data[1] * data[0].data[1] + vector.data[2] * data[0].data[2], + vector.data[0] * data[1].data[0] + vector.data[1] * data[1].data[1] + vector.data[2] * data[1].data[2], + vector.data[0] * data[2].data[0] + vector.data[1] * data[2].data[1] + vector.data[2] * data[2].data[2]); +} + +template +typename MatrixTraits::Vector3 MatrixTraits::GetAppliedRotation(const Vector3& vector) const +{ + return Vector3().Set(vector.data[0] * data[0].data[0] + vector.data[1] * data[0].data[1] + vector.data[2] * data[0].data[2], + vector.data[0] * data[1].data[0] + vector.data[1] * data[1].data[1] + vector.data[2] * data[1].data[2], + vector.data[0] * data[2].data[0] + vector.data[1] * data[2].data[1] + vector.data[2] * data[2].data[2]); +} + +template +typename MatrixTraits::Vector3& MatrixTraits::ApplyTranslate(Vector3& vector) const +{ + return vector.Set(vector.data[0] + data[0].data[3], + vector.data[1] + data[1].data[3], + vector.data[2] + data[2].data[3]); +} + +template +typename MatrixTraits::Vector3 MatrixTraits::GetAppliedTranslate(const Vector3& vector) const +{ + return Vector3(vector.data[0] + data[0].data[3], + vector.data[1] + data[1].data[3], + vector.data[2] + data[2].data[3]); +} + +template +Quaternion& MatrixTraits::ApplyRotation(Quaternion& quaternion) const +{ + return quaternion.Set(GetQuaternion() * quaternion); +} + +template +Quaternion MatrixTraits::GetAppliedRotation(const Quaternion& quaternion) const +{ + return GetQuaternion() * quaternion; +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::SetRotation(const TypeReference xAngleRad, const TypeReference yAngleRad, const TypeReference zAngleRad, RotationOrder3 order) +{ + MatrixType result; + result.MakeRotation(xAngleRad, yAngleRad, zAngleRad, order); + data[0].data[0] = result.data[0].data[0]; + data[0].data[1] = result.data[0].data[1]; + data[0].data[2] = result.data[0].data[2]; + data[1].data[0] = result.data[1].data[0]; + data[1].data[1] = result.data[1].data[1]; + data[1].data[2] = result.data[1].data[2]; + data[2].data[0] = result.data[2].data[0]; + data[2].data[1] = result.data[2].data[1]; + data[2].data[2] = result.data[2].data[2]; + + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::SetRotation(const Vector3& anglesRad, RotationOrder3 order) +{ + return SetRotation(anglesRad.data[0], anglesRad.data[1], anglesRad.data[2], order); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::SetRotationX(const TypeReference angleRad) +{ + const T c = effects_cos(angleRad); + const T s = effects_sin(angleRad); + data[0].data[0] = T(1.0f); + data[0].data[1] = data[0].data[2] = data[1].data[0] = data[2].data[0] = T(0.0f); + data[1].data[1] = c; + data[1].data[2] = -s; + data[2].data[1] = s; + data[2].data[2] = c; + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::SetRotationY(const TypeReference angleRad) +{ + const T c = effects_cos(angleRad); + const T s = effects_sin(angleRad); + data[1].data[1] = T(1.0f); + data[0].data[1] = data[1].data[0] = data[1].data[2] = data[2].data[1] = T(0.0f); + data[0].data[0] = c; + data[0].data[2] = s; + data[2].data[0] = -s; + data[2].data[2] = c; + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::SetRotationZ(const TypeReference angleRad) +{ + const T c = effects_cos(angleRad); + const T s = effects_sin(angleRad); + data[2].data[2] = T(1.0f); + data[0].data[2] = data[2].data[0] = data[1].data[2] = data[2].data[1] = T(0.0f); + data[0].data[0] = c; + data[0].data[1] = -s; + data[1].data[0] = s; + data[1].data[1] = c; + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::SetRotationAxis(const Vector3& axis, const TypeReference angleRad) +{ + return SetRotationAxis(axis.data[0], axis.data[1], axis.data[2], angleRad); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::SetRotationAxis(const TypeReference xAxis, const TypeReference yAxis, const TypeReference zAxis, const TypeReference angleRad) +{ + MatrixType result; + result.MakeRotationAxis(xAxis, yAxis, zAxis, angleRad); + data[0].data[0] = result.data[0].data[0]; + data[0].data[1] = result.data[0].data[1]; + data[0].data[2] = result.data[0].data[2]; + data[1].data[0] = result.data[1].data[0]; + data[1].data[1] = result.data[1].data[1]; + data[1].data[2] = result.data[1].data[2]; + data[2].data[0] = result.data[2].data[0]; + data[2].data[1] = result.data[2].data[1]; + data[2].data[2] = result.data[2].data[2]; + + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::SetRotation(const Quaternion& rotation) +{ + T wx, wy, wz, xx, yy, yz, xy, xz, zz, x2, y2, z2; + T s = T(2.0f) / rotation.lengthSqr(); // 4 mul 3 add 1 div + x2 = rotation.x * s; + y2 = rotation.y * s; + z2 = rotation.z * s; + xx = rotation.x * x2; + xy = rotation.x * y2; + xz = rotation.x * z2; + yy = rotation.y * y2; + yz = rotation.y * z2; + zz = rotation.z * z2; + wx = rotation.w * x2; + wy = rotation.w * y2; + wz = rotation.w * z2; + + const T t1(1.0f); + data[0].data[0] = t1 - (yy + zz); + data[0].data[1] = xy - wz; + data[0].data[2] = xz + wy; + + data[1].data[0] = xy + wz; + data[1].data[1] = t1 - (xx + zz); + data[1].data[2] = yz - wx; + + data[2].data[0] = xz - wy; + data[2].data[1] = yz + wx; + data[2].data[2] = t1 - (xx + yy); + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::SetRotation(const Matrix3& rotation) +{ + data[0].data[0] = rotation.data[0].data[0]; + data[0].data[1] = rotation.data[0].data[1]; + data[0].data[2] = rotation.data[0].data[2]; + data[1].data[0] = rotation.data[1].data[0]; + data[1].data[1] = rotation.data[1].data[1]; + data[1].data[2] = rotation.data[1].data[2]; + data[2].data[0] = rotation.data[2].data[0]; + data[2].data[1] = rotation.data[2].data[1]; + data[2].data[2] = rotation.data[2].data[2]; + + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::MakeRotation(const TypeReference xAngleRad, const TypeReference yAngleRad, const TypeReference zAngleRad, RotationOrder3 order) +{ + switch (order) + { + case ROTATION_XYZ: + MakeRotationX(xAngleRad); + RotateY(yAngleRad); + RotateZ(zAngleRad); + break; + case ROTATION_XZY: + MakeRotationX(xAngleRad); + RotateZ(zAngleRad); + RotateY(yAngleRad); + break; + case ROTATION_YXZ: + MakeRotationY(yAngleRad); + RotateX(xAngleRad); + RotateZ(zAngleRad); + break; + case ROTATION_YZX: + MakeRotationY(yAngleRad); + RotateZ(zAngleRad); + RotateX(xAngleRad); + break; + case ROTATION_ZXY: + MakeRotationZ(zAngleRad); + RotateX(xAngleRad); + RotateY(yAngleRad); + break; + case ROTATION_ZYX: + MakeRotationZ(zAngleRad); + RotateY(yAngleRad); + RotateX(xAngleRad); + break; + default: + break; + }; + + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::MakeRotation(const Vector3& anglesRad, RotationOrder3 order) +{ + return MakeRotation(anglesRad.data[0], anglesRad.data[1], anglesRad.data[2], order); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::MakeRotationX(const TypeReference angleRad) +{ + *this = GetIdentity(); + const T c = effects_cos(angleRad); + const T s = effects_sin(angleRad); + data[1].data[1] = c; + data[1].data[2] = -s; + data[2].data[1] = s; + data[2].data[2] = c; + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::MakeRotationY(const TypeReference angleRad) +{ + *this = GetIdentity(); + const T c = effects_cos(angleRad); + const T s = effects_sin(angleRad); + data[0].data[0] = c; + data[0].data[2] = s; + data[2].data[0] = -s; + data[2].data[2] = c; + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::MakeRotationZ(const TypeReference angleRad) +{ + *this = GetIdentity(); + const T c = effects_cos(angleRad); + const T s = effects_sin(angleRad); + data[0].data[0] = c; + data[0].data[1] = -s; + data[1].data[0] = s; + data[1].data[1] = c; + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::MakeRotationAxis(const Vector3& axis, const TypeReference angleRad) +{ + return MakeRotationAxis(axis.data[0], axis.data[1], axis.data[2], angleRad); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::MakeRotationAxis(const TypeReference xAxis, const TypeReference yAxis, const TypeReference zAxis, const TypeReference angleRad) +{ + static const T t1(1.0f); + + Vector3 v = Vector3(xAxis, yAxis, zAxis); + v.normalize(); + const T sa = effects_sin(angleRad); + const T ca = effects_cos(angleRad); + const T inv_ca = t1 - ca; + + *this = GetIdentity(); + + data[0].data[0] = ca + inv_ca * v.x() * v.x(); + data[0].data[1] = inv_ca * v.x() * v.y() - sa * v.z(); + data[0].data[2] = inv_ca * v.z() * v.x() + sa * v.y(); + + data[1].data[0] = inv_ca * v.x()* v.y()+ sa * v.z(); + data[1].data[1] = ca + inv_ca * v.y()* v.y(); + data[1].data[2] = inv_ca * v.y()* v.z()- sa * v.x(); + + data[2].data[0] = inv_ca * v.z()* v.x()- sa * v.y(); + data[2].data[1] = inv_ca * v.y()* v.z()+ sa * v.x(); + data[2].data[2] = ca + inv_ca * v.z()* v.z(); + + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::MakeRotation(const Quaternion& rotation) +{ + *this = GetIdentity(); + return SetRotation(rotation); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::MakeRotation(const Matrix3& rotation) +{ + *this = GetIdentity(); + return SetRotation(rotation); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::Rotate(const TypeReference xAngleRad, const TypeReference yAngleRad, const TypeReference zAngleRad, RotationOrder3 order) +{ + return Rotate(MatrixType().MakeRotation(xAngleRad, yAngleRad, zAngleRad, order)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::Rotate(const Vector3& anglesRad, RotationOrder3 order3) +{ + return Rotate(MatrixType().MakeRotation(anglesRad, order3)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::RotateX(const TypeReference angleRad) +{ + return Rotate(MatrixType().MakeRotationX(angleRad)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::RotateY(const TypeReference angleRad) +{ + return Rotate(MatrixType().MakeRotationY(angleRad)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::RotateZ(const TypeReference angleRad) +{ + return Rotate(MatrixType().MakeRotationZ(angleRad)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::RotateAxis(const Vector3& axis, const TypeReference angleRad) +{ + return Rotate(MatrixType().MakeRotationAxis(axis, angleRad)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::RotateAxis(const TypeReference xAxis, const TypeReference yAxis, const TypeReference zAxis, const TypeReference angleRad) +{ + return Rotate(MatrixType().MakeRotationAxis(xAxis, yAxis, zAxis, angleRad)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::Rotate(const Quaternion& rotation) +{ + return Rotate(MatrixType().MakeRotation(rotation)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::Rotate(const Matrix3& rotation) +{ + const T _11 = rotation.data[0].data[0] * data[0].data[0] + rotation.data[0].data[1] * data[1].data[0] + rotation.data[0].data[2] * data[2].data[0]; + const T _12 = rotation.data[0].data[0] * data[0].data[1] + rotation.data[0].data[1] * data[1].data[1] + rotation.data[0].data[2] * data[2].data[1]; + const T _13 = rotation.data[0].data[0] * data[0].data[2] + rotation.data[0].data[1] * data[1].data[2] + rotation.data[0].data[2] * data[2].data[2]; + + const T _21 = rotation.data[1].data[0] * data[0].data[0] + rotation.data[1].data[1] * data[1].data[0] + rotation.data[1].data[2] * data[2].data[0]; + const T _22 = rotation.data[1].data[0] * data[0].data[1] + rotation.data[1].data[1] * data[1].data[1] + rotation.data[1].data[2] * data[2].data[1]; + const T _23 = rotation.data[1].data[0] * data[0].data[2] + rotation.data[1].data[1] * data[1].data[2] + rotation.data[1].data[2] * data[2].data[2]; + + const T _31 = rotation.data[2].data[0] * data[0].data[0] + rotation.data[2].data[1] * data[1].data[0] + rotation.data[2].data[2] * data[2].data[0]; + const T _32 = rotation.data[2].data[0] * data[0].data[1] + rotation.data[2].data[1] * data[1].data[1] + rotation.data[2].data[2] * data[2].data[1]; + const T _33 = rotation.data[2].data[0] * data[0].data[2] + rotation.data[2].data[1] * data[1].data[2] + rotation.data[2].data[2] * data[2].data[2]; + + data[0].data[0] = _11; + data[0].data[1] = _12; + data[0].data[2] = _13; + data[1].data[0] = _21; + data[1].data[1] = _22; + data[1].data[2] = _23; + data[2].data[0] = _31; + data[2].data[1] = _32; + data[2].data[2] = _33; + + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::Rotate(const MatrixType& rotation) +{ + const T _11 = rotation.data[0].data[0] * data[0].data[0] + rotation.data[0].data[1] * data[1].data[0] + rotation.data[0].data[2] * data[2].data[0]; + const T _12 = rotation.data[0].data[0] * data[0].data[1] + rotation.data[0].data[1] * data[1].data[1] + rotation.data[0].data[2] * data[2].data[1]; + const T _13 = rotation.data[0].data[0] * data[0].data[2] + rotation.data[0].data[1] * data[1].data[2] + rotation.data[0].data[2] * data[2].data[2]; + + const T _21 = rotation.data[1].data[0] * data[0].data[0] + rotation.data[1].data[1] * data[1].data[0] + rotation.data[1].data[2] * data[2].data[0]; + const T _22 = rotation.data[1].data[0] * data[0].data[1] + rotation.data[1].data[1] * data[1].data[1] + rotation.data[1].data[2] * data[2].data[1]; + const T _23 = rotation.data[1].data[0] * data[0].data[2] + rotation.data[1].data[1] * data[1].data[2] + rotation.data[1].data[2] * data[2].data[2]; + + const T _31 = rotation.data[2].data[0] * data[0].data[0] + rotation.data[2].data[1] * data[1].data[0] + rotation.data[2].data[2] * data[2].data[0]; + const T _32 = rotation.data[2].data[0] * data[0].data[1] + rotation.data[2].data[1] * data[1].data[1] + rotation.data[2].data[2] * data[2].data[1]; + const T _33 = rotation.data[2].data[0] * data[0].data[2] + rotation.data[2].data[1] * data[1].data[2] + rotation.data[2].data[2] * data[2].data[2]; + + data[0].data[0] = _11; + data[0].data[1] = _12; + data[0].data[2] = _13; + data[1].data[0] = _21; + data[1].data[1] = _22; + data[1].data[2] = _23; + data[2].data[0] = _31; + data[2].data[1] = _32; + data[2].data[2] = _33; + + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType MatrixTraits::CreateRotation(const TypeReference xAngleRad, const TypeReference yAngleRad, const TypeReference zAngleRad, RotationOrder3 order) +{ + return MatrixType().MakeRotation(xAngleRad, yAngleRad, zAngleRad, order); +} + +template +typename MatrixTraits::MatrixType MatrixTraits::CreateRotation(const Vector3& anglesRad, RotationOrder3 order) +{ + return MatrixType().MakeRotation(anglesRad, order); +} + +template +typename MatrixTraits::MatrixType MatrixTraits::CreateRotationX(const TypeReference angleRad) +{ + return MatrixType().MakeRotationX(angleRad); +} + +template +typename MatrixTraits::MatrixType MatrixTraits::CreateRotationY(const TypeReference angleRad) +{ + return MatrixType().MakeRotationY(angleRad); +} + +template +typename MatrixTraits::MatrixType MatrixTraits::CreateRotationZ(const TypeReference angleRad) +{ + return MatrixType().MakeRotationZ(angleRad); +} + +template +typename MatrixTraits::MatrixType MatrixTraits::CreateRotationAxis(const Vector3& axis, const TypeReference angleRad) +{ + return MatrixType().MakeRotationAxis(axis, angleRad); +} + +template +typename MatrixTraits::MatrixType MatrixTraits::CreateRotationAxis(const TypeReference xAxis, const TypeReference yAxis, const TypeReference zAxis, const TypeReference angleRad) +{ + return MatrixType().MakeRotationAxis(xAxis, yAxis, zAxis, angleRad); +} + +template +typename MatrixTraits::MatrixType MatrixTraits::CreateRotation(const Quaternion& rotation) +{ + return MatrixType().MakeRotation(rotation); +} + +template +typename MatrixTraits::MatrixType MatrixTraits::CreateRotation(const Matrix3& rotation) +{ + return MatrixType().MakeRotation(rotation); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::GetRotationAngles(T& xAngleRad, T& yAngeRad, T& zAngleRad, unsigned int solutionNumber) +{ + static const T t0(0.0f); + static const T t2(2.0f); + static const T pi(F_PI); + + T& yaw = zAngleRad; + T& pitch = yAngeRad; + T& roll = xAngleRad; + + struct Euler + { + T yaw; + T pitch; + T roll; + }; + + Euler euler_out; + Euler euler_out2; //second solution + + // Check that pitch is not at a singularity + if (EffectsAbs(data[0].data[2]) >= T(1.0f)) + { + euler_out.yaw = t0; + euler_out2.yaw = t0; + + // From difference of angles formula + T delta = effects_atan2(data[0].data[0], data[2].data[0]); + if (data[0].data[2] > 0) //gimbal locked up + { + euler_out.pitch = pi / t2; + euler_out2.pitch = pi / t2; + euler_out.roll = euler_out.pitch + delta; + euler_out2.roll = euler_out.pitch + delta; + } + else // gimbal locked down + { + euler_out.pitch = -pi / t2; + euler_out2.pitch = -pi / t2; + euler_out.roll = -euler_out.pitch + delta; + euler_out2.roll = -euler_out.pitch + delta; + } + } + else + { + euler_out.pitch = - effects_asin(data[0].data[2]); + euler_out2.pitch = pi - euler_out.pitch; + + euler_out.roll = effects_atan2(data[1].data[2] / effects_cos(euler_out.pitch), data[2].data[2] / effects_cos(euler_out.pitch)); + + euler_out2.roll = effects_atan2(data[1].data[2] / effects_cos(euler_out2.pitch), data[2].data[2] / effects_cos(euler_out2.pitch)); + + euler_out.yaw = effects_atan2(data[0].data[1] / effects_cos(euler_out.pitch), data[0].data[0] / effects_cos(euler_out.pitch)); + + euler_out2.yaw = effects_atan2(data[0].data[1] / effects_cos(euler_out2.pitch), data[0].data[0] / effects_cos(euler_out2.pitch)); + } + + if (solutionNumber == 1) + { + yaw = euler_out.yaw; + pitch = euler_out.pitch; + roll = euler_out.roll; + } + else + { + yaw = euler_out2.yaw; + pitch = euler_out2.pitch; + roll = euler_out2.roll; + } + + return *(static_cast(this)); +} + +template +Quaternion MatrixTraits::GetQuaternion(void) const +{ + Quaternion result; + return GetQuaternion(result); +} + +template +Quaternion& MatrixTraits::GetQuaternion(Quaternion& rotation) const +{ + static const T t0(0.0f); + static const T thalf(0.5f); + static const T t1(1.0f); + + Quaternion& result = rotation; + + T tr = data[0].data[0] + data[1].data[1] + data[2].data[2]; // trace of martix + if (tr > t0) + { // if trace positive than "w" is biggest component + result.Set(data[2].data[1] - data[1].data[2], data[0].data[2] - data[2].data[0], data[1].data[0] - data[0].data[1], tr + t1); + result *= (thalf / effects_sqrt(result.w)); // "w" contain the "norm * 4" + + } + else // Some of vector components is bigger + { + if ((data[0].data[0] > data[1].data[1]) && (data[0].data[0] > data[2].data[2])) + { + result.Set(t1 + data[0].data[0] - data[1].data[1] - data[2].data[2], data[0].data[1] + data[1].data[0], data[0].data[2] + data[2].data[0], data[2].data[1] - data[1].data[2]); + result *= (thalf / effects_sqrt(result.x)); + + } + else + { + if (data[1].data[1] > data[2].data[2]) + { + result.Set(data[0].data[1] + data[1].data[0], t1 + data[1].data[1] - data[0].data[0] - data[2].data[2], data[1].data[2] + data[2].data[1], data[0].data[2] - data[2].data[0]); + result *= (thalf / effects_sqrt(result.y)); + + } + else + { + result.Set(data[0].data[2] + data[2].data[0], data[1].data[2] + data[2].data[1], t1 + data[2].data[2] - data[0].data[0] - data[1].data[1], data[1].data[0] - data[0].data[1]); + result *= (thalf / effects_sqrt(result.z)); + + } + } + } + + return result.normalize(); +} + +template +typename MatrixTraits::Matrix3 MatrixTraits::GetRotation(void) const +{ + return Matrix3(data[0].data[0], data[0].data[1], data[0].data[2], + data[1].data[0], data[1].data[1], data[1].data[2], + data[2].data[0], data[2].data[1], data[2].data[2]); +} + +template +typename MatrixTraits::Matrix3& MatrixTraits::GetRotation(Matrix3& rotation) const +{ + return rotation = GetRotation(); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::MakeScale(const TypeReference x, const TypeReference y, const TypeReference z) +{ + *this = GetIdentity(); + return SetScale(x, y, z); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::SetScale(const TypeReference x, const TypeReference y, const TypeReference z) +{ + data[0].data[0] = x; + data[1].data[1] = y; + data[2].data[2] = z; + + data[0].data[1] = data[0].data[2] = data[1].data[0] = data[1].data[2] = data[2].data[0] = data[2].data[1] = T(0.0f); + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType MatrixTraits::CreateScale(const TypeReference x, const TypeReference y, const TypeReference z) +{ + return MatrixType().MakeScale(x, y, z); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::Scale(const TypeReference x, const TypeReference y, const TypeReference z) +{ + data[0].data[0] *= x; + data[1].data[0] *= y; + data[2].data[0] *= z; + data[0].data[1] *= x; + data[1].data[1] *= y; + data[2].data[1] *= z; + data[0].data[2] *= x; + data[1].data[2] *= y; + data[2].data[2] *= z; + + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::SetTranslation(const TypeReference x, const TypeReference y, const TypeReference z) +{ + data[0].data[3] = x; + data[1].data[3] = y; + data[2].data[3] = z; + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::SetTranslation(const Vector3& tran) +{ + return SetTranslation(tran.data[0], tran.data[1], tran.data[2]); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::MakeTranslation(const TypeReference x, const TypeReference y, const TypeReference z) +{ + *this = GetIdentity(); + return SetTranslation(x, y, z); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::MakeTranslation(const Vector3& tran) +{ + return MakeTranslation(tran.data[0], tran.data[1], tran.data[2]); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::Translate(const TypeReference x, const TypeReference y, const TypeReference z) +{ + data[0].data[3] += x; + data[1].data[3] += y; + data[2].data[3] += z; + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::Translate(const Vector3& tran) +{ + return Translate(tran.data[0], tran.data[1], tran.data[2]); +} + +template +typename MatrixTraits::MatrixType MatrixTraits::CreateTranslation(const TypeReference x, const TypeReference y, const TypeReference z) +{ + return MatrixType().MakeTranslation(x, y, z); +} + +template +typename MatrixTraits::MatrixType MatrixTraits::CreateTranslation(const Vector3& tran) +{ + return MatrixType().MakeTranslation(tran); +} + +template +typename MatrixTraits::Vector3 MatrixTraits::GetTranslation(void) const +{ + return Vector3().Set(data[0].data[3], data[1].data[3], data[2].data[3]); +} + +template +typename MatrixTraits::VectorType MatrixTraits::GetFullTranslation(void) const +{ + return VectorType().Set(data[0].data[3], data[1].data[3], data[2].data[3], data[3].data[3]); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::MakeLookAtLH(const Vector3& eye, const Vector3& at, const Vector3& up) +{ + static const T t0(0.0f); + static const T t1(1.0f); + + Vector3 z((at - eye).normalize()); + Vector3 x; + x.makeCrossed(up, z).normalize(); + Vector3 y; + y.makeCrossed(z, x); + + data[0].data[0] = x.x(); + data[1].data[0] = y.x(); + data[2].data[0] = z.x(); + data[3].data[0] = t0; + data[0].data[1] = x.y(); + data[1].data[1] = y.y(); + data[2].data[1] = z.y(); + data[3].data[1] = t0; + data[0].data[2] = x.z(); + data[1].data[2] = y.z(); + data[2].data[2] = z.z(); + data[3].data[2] = t0; + + data[0].data[3] = -x.dot(eye); + data[1].data[3] = -y.dot(eye); + data[2].data[3] = -z.dot(eye); + data[3].data[3] = t1; + + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::MakeLookAtRH(const Vector3& eye, const Vector3& at, const Vector3& up) +{ + static const T t0(0.0f); + static const T t1(1.0f); + + Vector3 z((eye - at).normalize()); + Vector3 x; + x.makeCrossed(up, z).normalize(); + Vector3 y; + y.makeCrossed(z, x); + + data[0].data[0] = x.x(); + data[1].data[0] = y.x(); + data[2].data[0] = z.x(); + data[3].data[0] = t0; + data[0].data[1] = x.y(); + data[1].data[1] = y.y(); + data[2].data[1] = z.y(); + data[3].data[1] = t0; + data[0].data[2] = x.z(); + data[1].data[2] = y.z(); + data[2].data[2] = z.z(); + data[3].data[2] = t0; + + data[0].data[3] = -x.dot(eye); + data[1].data[3] = -y.dot(eye); + data[2].data[3] = -z.dot(eye); + data[3].data[3] = t1; + + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::MakeOrthoRH(const TypeReference width, const TypeReference height, const TypeReference zNear, const TypeReference zFar) +{ + static const T t2(2.0f); + + *this = GetIdentity(); + data[0].data[0] = t2 / width; + data[1].data[1] = t2 / height; + data[2].data[2] = t2 / (zNear - zFar); + data[2].data[3] = (zFar + zNear) / (zNear - zFar); + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::MakeOrthoLH(const TypeReference width, const TypeReference height, const TypeReference zNear, const TypeReference zFar) +{ + MakeOrthoRH(width, height, zNear, zFar); + data[2].data[2] = -data[2].data[2]; + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::MakeOrthoRH(const TypeReference left, const TypeReference right, const TypeReference top, const TypeReference bottom, const TypeReference zNear, const TypeReference zFar) +{ + static const T t2(2.0f); + + *this = GetIdentity(); + + data[0].data[0] = t2 / (right - left); + data[1].data[1] = t2 / (top - bottom); + data[2].data[2] = t2 / (zNear - zFar); + + data[0].data[3] = (left + right) / (left - right); + data[1].data[3] = (top + bottom) / (bottom - top); + data[2].data[3] = (zFar + zNear) / (zNear - zFar); + + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::MakeOrthoLH(const TypeReference left, const TypeReference right, const TypeReference top, const TypeReference bottom, const TypeReference zNear, const TypeReference zFar) +{ + MakeOrthoRH(left, right, top, bottom, zNear, zFar); + data[2].data[2] = -data[2].data[2]; + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::MakePerspectiveLH(const TypeReference left, const TypeReference right, const TypeReference top, const TypeReference bottom, const TypeReference zNear, const TypeReference zFar) +{ + MakePerspectiveRH(left, right, top, bottom, zNear, zFar); + data[2].data[2] = -data[2].data[2]; + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::MakePerspectiveRH(const TypeReference left, const TypeReference right, const TypeReference top, const TypeReference bottom, const TypeReference zNear, const TypeReference zFar) +{ + static const T t0(0.0f); + static const T t1(1.0f); + static const T t2(2.0f); + + *this = GetIdentity(); + data[0].data[0] = t2 * zNear / (right - left); + data[1].data[1] = t2 * zNear / (top - bottom); + data[2].data[2] = (zFar + zNear) / (zNear - zFar); + data[3].data[3] = t0; + + data[3].data[2] = -t1; + data[0].data[2] = (left + right) / (right - left); + data[1].data[2] = (top + bottom) / (top - bottom); + data[2].data[3] = t2 * zNear * zFar / (zNear - zFar); + + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::MakePerspectiveLH(const TypeReference width, const TypeReference height, const TypeReference zNear, const TypeReference zFar) +{ + MakePerspectiveRH(width, height, zNear, zFar); + data[2].data[2] = -data[2].data[2]; + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::MakePerspectiveRH(const TypeReference width, const TypeReference height, const TypeReference zNear, const TypeReference zFar) +{ + static const T t0(0.0f); + static const T t1(1.0f); + static const T t2(2.0f); + + *this = GetIdentity(); + data[0].data[0] = t2 * zNear / width; + data[1].data[1] = t2 * zNear / height; + data[2].data[2] = (zFar + zNear) / (zNear - zFar); + + data[2].data[3] = t2 * zNear * zFar / (zNear - zFar); + data[3].data[2] = -t1; + data[3].data[3] = t0; + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::MakePerspectiveFovLH(const TypeReference fovY, const TypeReference aspect, const TypeReference zNear, const TypeReference zFar) +{ + MakePerspectiveFovRH(fovY, aspect, zNear, zFar); + data[2].data[2] = -data[2].data[2]; + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType& MatrixTraits::MakePerspectiveFovRH(const TypeReference fovY, const TypeReference aspect, const TypeReference zNear, const TypeReference zFar) +{ + static const T t0(0.0f); + static const T t1(1.0f); + static const T t2(2.0f); + + *this = GetIdentity(); + data[1].data[1] = t1 / tan(fovY / t2); + data[0].data[0] = data[1].data[1] / aspect; + data[2].data[2] = (zFar + zNear) / (zNear - zFar); + + data[3].data[2] = -t1; + data[2].data[3] = t2 * (zNear * zFar / (zNear - zFar)); + data[3].data[3] = t0; + return *(static_cast(this)); +} + +template +typename MatrixTraits::MatrixType MatrixTraits::CreateLookAtLH(const Vector3& eye, const Vector3& at, const Vector3& up) +{ + return MatrixType().MakeLookAtLH(eye, at, up); +} + +template +typename MatrixTraits::MatrixType MatrixTraits::CreateLookAtRH(const Vector3& eye, const Vector3& at, const Vector3& up) +{ + return MatrixType().MakeLookAtRH(eye, at, up); +} + +template +typename MatrixTraits::MatrixType MatrixTraits::CreateOrthoRH(const TypeReference width, const TypeReference height, const TypeReference zNear, const TypeReference zFar) +{ + return MatrixType().MakeOrthoRH(width, height, zNear, zFar); +} + +template +typename MatrixTraits::MatrixType MatrixTraits::CreateOrthoLH(const TypeReference width, const TypeReference height, const TypeReference zNear, const TypeReference zFar) +{ + return MatrixType().MakeOrthoLH(width, height, zNear, zFar); +} + +template +typename MatrixTraits::MatrixType MatrixTraits::CreateOrthoRH(const TypeReference left, const TypeReference right, const TypeReference top, const TypeReference bottom, const TypeReference zNear, const TypeReference zFar) +{ + return MatrixType().MakeOrthoRH(left, right, top, bottom, zNear, zFar); +} + +template +typename MatrixTraits::MatrixType MatrixTraits::CreateOrthoLH(const TypeReference left, const TypeReference right, const TypeReference top, const TypeReference bottom, const TypeReference zNear, const TypeReference zFar) +{ + return MatrixType().MakeOrthoLH(left, right, top, bottom, zNear, zFar); +} + +template +typename MatrixTraits::MatrixType MatrixTraits::CreatePerspectiveLH(const TypeReference left, const TypeReference right, const TypeReference top, const TypeReference bottom, const TypeReference zNear, const TypeReference zFar) +{ + return MatrixType().MakePerspectiveLH(left, right, top, bottom, zNear, zFar); +} + +template +typename MatrixTraits::MatrixType MatrixTraits::CreatePerspectiveRH(const TypeReference left, const TypeReference right, const TypeReference top, const TypeReference bottom, const TypeReference zNear, const TypeReference zFar) +{ + return MatrixType().MakePerspectiveRH(left, right, top, bottom, zNear, zFar); +} + +template +typename MatrixTraits::MatrixType MatrixTraits::CreatePerspectiveLH(const TypeReference width, const TypeReference height, const TypeReference zNear, const TypeReference zFar) +{ + return MatrixType().MakePerspectiveLH(width, height, zNear, zFar); +} + +template +typename MatrixTraits::MatrixType MatrixTraits::CreatePerspectiveRH(const TypeReference width, const TypeReference height, const TypeReference zNear, const TypeReference zFar) +{ + return MatrixType().MakePerspectiveRH(width, height, zNear, zFar); +} + +template +typename MatrixTraits::MatrixType MatrixTraits::CreatePerspectiveFovLH(const TypeReference fovY, const TypeReference aspect, const TypeReference zNear, const TypeReference zFar) +{ + return MatrixType().MakePerspectiveFovLH(fovY, aspect, zNear, zFar); +} + +template +typename MatrixTraits::MatrixType MatrixTraits::CreatePerspectiveFovRH(const TypeReference fovY, const TypeReference aspect, const TypeReference zNear, const TypeReference zFar) +{ + return MatrixType().MakePerspectiveFovRH(fovY, aspect, zNear, zFar); +} + +template +bool MatrixTraits::GetOrthoParamsRH(T& left, T& right, T& top, T& bottom, T& zNear, T& zFar) const +{ + static const T t1(1.0f); + + zNear = (data[2].data[3] + t1) / data[2].data[2]; + zFar = (data[2].data[3] - t1) / data[2].data[2]; + + left = -(t1 + data[0].data[3]) / data[0].data[0]; + right = (t1 - data[0].data[3]) / data[0].data[0]; + + bottom = -(t1 + data[1].data[3]) / data[1].data[1]; + top = (t1 - data[1].data[3]) / data[1].data[1]; + + return true; +} + +template +bool MatrixTraits::GetPerspectiveParamsRH(T& left, T& right, T& top, T& bottom, T& zNear, T& zFar) const +{ + static const T t1(1.0f); + + zNear = data[2].data[3] / (data[2].data[2] - t1); + zFar = data[2].data[3] / (t1 + data[2].data[2]); + + left = zNear * (data[0].data[2] - t1) / data[0].data[0]; + right = zNear * (t1 + data[0].data[2]) / data[0].data[0]; + + top = zNear * (t1 + data[1].data[2]) / data[1].data[1]; + bottom = zNear * (data[1].data[2] - t1) / data[1].data[1]; + + return true; +} + +template +bool MatrixTraits::GetPerspectiveParamsRH(T& fovY, T& aspect, T& zNear, T& zFar) const +{ + T left, right, bottom, top; + bool result = GetPerspectiveParamsRH(left, right, top, bottom, zNear, zFar); + if (result) + { + T height = top - bottom; + T width = right - left; + aspect = width / height; + fovY = T(2.0f) * effects_atan(height / zNear * T(0.5f)); + } + return result; +} + +template +bool MatrixTraits::GetViewParams(Vector3& position, Vector3& direction, Vector3& up, Vector3& right) const +{ + right.Set(data[0].data[0], data[0].data[1], data[0].data[2]); + up.Set(data[1].data[0], data[1].data[1], data[1].data[2]); + direction.Set(-data[2].data[0], -data[2].data[1], -data[2].data[2]); + position = direction * data[2].data[3] - right * data[0].data[3] - up * data[1].data[3]; + return true; +} + + +}}}}} //Tizen::Ui::Effects::_Renderer::Math + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_MATH_MATRIX_TRAITS_H_ diff --git a/src/ui/effects/inc/renderer/math/FUiEffects_RendererMathMatrixTraitsBase.h b/src/ui/effects/inc/renderer/math/FUiEffects_RendererMathMatrixTraitsBase.h new file mode 100644 index 0000000..5b9864f --- /dev/null +++ b/src/ui/effects/inc/renderer/math/FUiEffects_RendererMathMatrixTraitsBase.h @@ -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 FUiEffects_RendererMathMatrixTraitsBase.h + * @brief The MatrixTraitsBase class + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_MATH_MATRIX_TRAITS_BASE_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_MATH_MATRIX_TRAITS_BASE_H_ + +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace Math +{ +template +class Matrix; +template +class Vector; + +template +class MatrixTraitsBase +{ +public: + MatrixTraitsBase(void) : data() {} + + typedef Matrix MatrixType; + + typedef typename Tizen::Ui::Effects::_Renderer::System::SelectType::isFundamental, T, T&>::Result TypeReference; + typedef const TypeReference ConstTypeReference; + + typedef Vector ItemType; + typedef ItemType DataType[Dimension]; + + DataType data; +}; +}}}}} //Tizen::Ui::Effects::_Renderer::Math + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_MATH_MATRIX_TRAITS_BASE_H_ diff --git a/src/ui/effects/inc/renderer/math/FUiEffects_RendererMathVector.h b/src/ui/effects/inc/renderer/math/FUiEffects_RendererMathVector.h new file mode 100644 index 0000000..262529d --- /dev/null +++ b/src/ui/effects/inc/renderer/math/FUiEffects_RendererMathVector.h @@ -0,0 +1,686 @@ +// +// 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 FUiEffects_RendererMathVector.h + * @brief The Vector class + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_MATH_VECTOR_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_MATH_VECTOR_H_ + +#include + +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace Math +{ + +template +class Vector : + public VectorTraits +{ +public: + typedef Vector VectorType; + typedef VectorTraitsBase VectorTraitsBaseType; + typedef typename VectorTraitsBaseType::TypeReference TypeReference; + + using VectorTraitsBaseType::data; + using VectorTraits::Set; + + inline Vector(void); + inline explicit Vector(const TypeReference value); + inline Vector(const TypeReference x, const TypeReference y); + inline Vector(const TypeReference x, const TypeReference y, const TypeReference z); + inline Vector(const TypeReference x, const TypeReference y, const TypeReference z, const TypeReference w); + inline Vector(const VectorType& other); + + inline VectorType& operator = (const VectorType& rhv); + + inline VectorType& Set(const VectorType& other); + inline VectorType& Set(const TypeReference value); + + inline VectorType& FillFromArray(const T* array); + static inline VectorType MakeFromArray(const T* array); + + inline VectorType operator - (void) const; + inline VectorType& Inverse(void); + inline VectorType GetInversed(void) const; + + inline VectorType& operator += (const VectorType& rhv); + inline VectorType& operator += (const TypeReference rhv); + inline VectorType& operator -= (const VectorType& rhv); + inline VectorType& operator -= (const TypeReference rhv); + inline VectorType& operator *= (const VectorType& rhv); + inline VectorType& operator *= (const TypeReference rhv); + inline VectorType& operator /= (const VectorType& rhv); + inline VectorType& operator /= (const TypeReference rhv); + + inline T* GetPointer(void); + inline const T* GetPointer(void) const; + + inline VectorType& Normalize(void); + inline VectorType GetNormalized(void) const; + + inline VectorType& Lerp(const VectorType& to, const TypeReference coeff); + inline VectorType GetLerped(const VectorType& to, const TypeReference) const; + inline VectorType& MakeLerped(const VectorType& from, const VectorType& to, const TypeReference); + static inline VectorType CreateLerped(const VectorType& from, const VectorType& to, const TypeReference); + + inline T Dot(const VectorType& other) const; + + inline T LengthSqr(void) const; + inline T Length(void) const; + inline T DistanceSqr(const VectorType& other) const; + inline T Distance(const VectorType& other) const; + + inline Vector Swizzle(unsigned int x, unsigned int y) const; + inline Vector Swizzle(unsigned int x, unsigned int y, unsigned int z) const; + inline Vector Swizzle(unsigned int x, unsigned int y, unsigned int z, unsigned int w) const; + + inline bool IsEqual(const Vector& rhv, const TypeReference epsilon = EffectsEpsilon::epsilon()) const; +}; + +template +inline bool IsEqual(const Vector& lhv, const Vector& rhv, const typename Vector::TypeReference epsilon); + +template inline Vector operator + (const Vector& lhv, const Vector& rhv); +template inline Vector operator + (const Vector& lhv, const typename Vector::TypeReference rhv); +template inline Vector operator + (const typename Vector::TypeReference lhv, const Vector& rhv); +template inline Vector operator - (const Vector& lhv, const Vector& rhv); +template inline Vector operator - (const Vector& lhv, const typename Vector::TypeReference rhv); +template inline Vector operator - (const typename Vector::TypeReference lhv, const Vector& rhv); +template inline Vector operator * (const Vector& lhv, const Vector& rhv); +template inline Vector operator * (const Vector& lhv, const typename Vector::TypeReference rhv); +template inline Vector operator * (const typename Vector::TypeReference lhv, const Vector& rhv); +template inline Vector operator / (const Vector& lhv, const Vector& rhv); +template inline Vector operator / (const Vector& lhv, const typename Vector::TypeReference rhv); +template inline Vector operator / (const typename Vector::TypeReference lhv, const Vector& rhv); +template inline bool operator == (const Vector& lhv, const Vector& rhv); +template inline bool operator == (const Vector& lhv, const typename Vector::TypeReference rhv); +template inline bool operator == (const typename Vector::TypeReference lhv, const Vector& rhv); +template inline bool operator != (const Vector& lhv, const Vector& rhv); +template inline bool operator != (const Vector& lhv, const typename Vector::TypeReference rhv); +template inline bool operator != (const typename Vector::TypeReference lhv, const Vector& rhv); + +typedef Vector Vector1f; +typedef Vector Vector1d; +typedef Vector Vector2f; +typedef Vector Vector2d; +typedef Vector Vector3f; +typedef Vector Vector3d; +typedef Vector Vector4f; +typedef Vector Vector4d; + +template +Vector::Vector(void) +{ +} + +template +Vector::Vector(const TypeReference value) +{ + for (int i = 0; i < Dimension; i++) + { + data[i] = value; + } +} + +template +Vector::Vector(const TypeReference x, const TypeReference y) +{ + EffectsStaticAssert(Dimension >= 2); + data[0] = x; + data[1] = y; +} + +template +Vector::Vector(const TypeReference x, const TypeReference y, const TypeReference z) +{ + EffectsStaticAssert(Dimension >= 3); + data[0] = x; + data[1] = y; + data[2] = z; +} + +template +Vector::Vector(const TypeReference x, const TypeReference y, const TypeReference z, const TypeReference w) +{ + EffectsStaticAssert(Dimension >= 4); + data[0] = x; + data[1] = y; + data[2] = z; + data[3] = w; +} + +template +Vector::Vector(const VectorType& other) +{ + for (int i = 0; i < Dimension; i++) + { + data[i] = other.data[i]; + } +} + +template +Vector& Vector::operator=(const VectorType& rhv) +{ + if (this != &rhv) + { + for (int i = 0; i < Dimension; i++) + { + data[i] = rhv.data[i]; + } + } + return *this; +} + +template +typename Vector::VectorType& Vector::Set(const VectorType& other) +{ + for (int i = 0; i < Dimension; i++) + { + data[i] = other.data[i]; + } + return *this; +} + +template +typename Vector::VectorType& Vector::Set(const TypeReference value) +{ + for (int i = 0; i < Dimension; i++) + { + data[i] = value; + } + return *this; +} + +template +typename Vector::VectorType& Vector::FillFromArray(const T* value) +{ + for (int i = 0; i < Dimension; i++) + { + data[i] = value[i]; + } + return *this; +} + +template +typename Vector::VectorType Vector::MakeFromArray(const T* value) +{ + VectorType result; + result.FillFromArray(value); + return result; +} + + +template +Vector Vector::operator - (void) const +{ + return GetInversed(); +} + +template +Vector& Vector::Inverse(void) +{ + for (int i = 0; i < Dimension; i++) + { + data[i] = -data[i]; + } + return *this; +} + +template +Vector Vector::GetInversed(void) const +{ + VectorType result; + for (int i = 0; i < Dimension; i++) + { + result.data[i] = -data[i]; + } + return result; +} + +template +Vector& Vector::operator += (const Vector& rhv) +{ + for (int i = 0; i < Dimension; i++) + { + data[i] += rhv.data[i]; + } + return *this; +} + +template +Vector& Vector::operator += (const TypeReference rhv) +{ + for (int i = 0; i < Dimension; i++) + { + data[i] += rhv; + } + return *this; +} + +template +Vector& Vector::operator -= (const VectorType& rhv) +{ + for (int i = 0; i < Dimension; i++) + { + data[i] -= rhv.data[i]; + } + return *this; +} + +template +Vector& Vector::operator -= (const TypeReference rhv) +{ + for (int i = 0; i < Dimension; i++) + data[i] -= rhv; + return *this; +} + +template +Vector& Vector::operator *= (const VectorType& rhv) +{ + for (int i = 0; i < Dimension; i++) + { + data[i] *= rhv.data[i]; + } + return *this; +} + +template +Vector& Vector::operator *= (const TypeReference rhv) +{ + for (int i = 0; i < Dimension; i++) + { + data[i] *= rhv; + } + return *this; +} + +template +Vector& Vector::operator /= (const VectorType& rhv) +{ + for (int i = 0; i < Dimension; i++) + { + data[i] /= rhv.data[i]; + } + return *this; +} + +template +Vector& Vector::operator /= (const TypeReference rhv) +{ + for (int i = 0; i < Dimension; i++) + { + data[i] /= rhv; + } + return *this; +} + +template +T* Vector::GetPointer(void) +{ + return &(data[0]); +} + +template +const T* Vector::GetPointer(void) const +{ + return &(data[0]); +} + +template +Vector& Vector::Normalize(void) +{ + const static T t0(0.0f); + + const TypeReference dist = Length(); + if (EffectsEqual(t0, dist)) + { + return *this; + } + + return operator /= (dist); +} + +template +Vector Vector::GetNormalized(void) const +{ + const static T t0(0.0f); + + const T dist = Length(); + if (EffectsEqual(t0, dist)) + { + return *this; + } + + return *this / dist; +} + +template +Vector& Vector::Lerp(const VectorType& to, const TypeReference coeff) +{ + for (int i = 0; i < Dimension; i++) + { + data[i] += (to.data[i] - data[i]) * coeff; + } + return *this; +} + +template +Vector Vector::GetLerped(const VectorType& to, const TypeReference coeff) const +{ + VectorType result(*this); + return result.Lerp(to, coeff); +} + +template +Vector& Vector::MakeLerped(const VectorType& from, const VectorType& to, const TypeReference coeff) +{ + *this = from; + return Lerp(to, coeff); +} + +template +Vector Vector::CreateLerped(const VectorType& from, const VectorType& to, const TypeReference coeff) +{ + return VectorType().MakeLerped(from, to, coeff); +} + +template +T Vector::Dot(const VectorType& other) const +{ + T result = T(); + for (int i = 0; i < Dimension; i++) + { + result += data[i] * other.data[i]; + } + return result; +} + +template +T Vector::LengthSqr(void) const +{ + T result = T(); + for (int i = 0; i < Dimension; i++) + { + result += data[i] * data[i]; + } + return result; +} + +template +T Vector::Length(void) const +{ + return EffectsSqrt(LengthSqr()); +} + +template +T Vector::DistanceSqr(const VectorType& other) const +{ + T result = T(); + for (int i = 0; i < Dimension; i++) + { + T t = data[i] - other.data[i]; + result += t * t; + } + return result; +} + +template +T Vector::Distance(const VectorType& other) const +{ + return effects_sqrt(DistanceSqr(other)); +} + +template +Vector Vector::Swizzle(unsigned int x, unsigned int y) const +{ + return Vector(data[x], data[y]); +} + +template +Vector Vector::Swizzle(unsigned int x, unsigned int y, unsigned int z) const +{ + return Vector(data[x], data[y], data[z]); +} + +template +Vector Vector::Swizzle(unsigned int x, unsigned int y, unsigned int z, unsigned int w) const +{ + return Vector(data[x], data[y], data[z], data[w]); +} + +template +bool Vector::IsEqual(const Vector& rhv, const TypeReference epsilon) const +{ + for (int i = 0; i < Dimension; i++) + { + if (!EffectsEqual(data[i], rhv.data[i], epsilon)) + { + return false; + } + } + + return true; +} + +template +bool IsEqual(const Vector& lhv, const Vector& rhv, const typename Vector::TypeReference epsilon) +{ + return lhv.IsEqual(rhv, epsilon); +} + +template +Vector operator + (const Vector& lhv, const Vector& rhv) +{ + Vector result; + for (int i = 0; i < Dimension; i++) + { + result.data[i] = lhv.data[i] + rhv.data[i]; + } + return result; +} + +template +Vector operator + (const Vector& lhv, const typename Vector::TypeReference rhv) +{ + Vector result; + for (int i = 0; i < Dimension; i++) + { + result.data[i] = lhv.data[i] + rhv; + } + return result; +} + +template +Vector operator + (const typename Vector::TypeReference lhv, const Vector& rhv) +{ + Vector result; + for (int i = 0; i < Dimension; i++) + { + result.data[i] = lhv + rhv.data[i]; + } + return result; +} + +template +Vector operator - (const Vector& lhv, const Vector& rhv) +{ + Vector result; + for (int i = 0; i < Dimension; i++) + { + result.data[i] = lhv.data[i] - rhv.data[i]; + } + return result; +} + +template +Vector operator - (const Vector& lhv, const typename Vector::TypeReference rhv) +{ + Vector result; + for (int i = 0; i < Dimension; i++) + { + result.data[i] = lhv.data[i] - rhv; + } + return result; +} + +template +Vector operator - (const typename Vector::TypeReference lhv, const Vector& rhv) +{ + Vector result; + for (int i = 0; i < Dimension; i++) + { + result.data[i] = lhv - rhv.data[i]; + } + return result; +} + +template +Vector operator * (const Vector& lhv, const Vector& rhv) +{ + Vector result; + for (int i = 0; i < Dimension; i++) + { + result.data[i] = lhv.data[i] * rhv.data[i]; + } + return result; +} + +template +Vector operator * (const Vector& lhv, const typename Vector::TypeReference rhv) +{ + Vector result; + for (int i = 0; i < Dimension; i++) + { + result.data[i] = lhv.data[i] * rhv; + } + return result; +} + +template +Vector operator * (const typename Vector::TypeReference lhv, const Vector& rhv) +{ + Vector result; + for (int i = 0; i < Dimension; i++) + { + result.data[i] = lhv * rhv.data[i]; + } + return result; +} + +template +Vector operator / (const Vector& lhv, const Vector& rhv) +{ + Vector result; + for (int i = 0; i < Dimension; i++) + { + result.data[i] = lhv.data[i] / rhv.data[i]; + } + return result; +} + +template +Vector operator / (const Vector& lhv, const typename Vector::TypeReference rhv) +{ + Vector result; + for (int i = 0; i < Dimension; i++) + { + result.data[i] = lhv.data[i] / rhv; + } + return result; +} + +template +inline Vector operator / (const typename Vector::TypeReference lhv, const Vector& rhv) +{ + Vector result; + for (int i = 0; i < Dimension; i++) + { + result.data[i] = lhv / rhv.data[i]; + } + return result; +} + +template +bool operator == (const Vector& lhv, const Vector& rhv) +{ + for (int i = 0; i < Dimension; i++) + { + if (!EffectsEqual(lhv.data[i], rhv.data[i])) + { + return false; + } + } + return true; +} + +template +bool operator == (const Vector& lhv, const typename Vector::TypeReference rhv) +{ + for (int i = 0; i < Dimension; i++) + { + if (!EffectsEqual(lhv.data[i], rhv)) + { + return false; + } + } + return true; +} + +template +bool operator == (const typename Vector::TypeReference lhv, const Vector& rhv) +{ + for (int i = 0; i < Dimension; i++) + { + if (!EffectsEqual(lhv, rhv.data[i])) + { + return false; + } + } + return true; +} + +template +inline bool operator != (const Vector& lhv, const Vector& rhv) +{ + return !(lhv == rhv); +} + +template +bool operator != (const Vector& lhv, const typename Vector::TypeReference rhv) +{ + return !(lhv == rhv); +} + +template +bool operator != (const typename Vector::TypeReference lhv, const Vector& rhv) +{ + return !(lhv == rhv); +} + +}}}}} //Tizen::Ui::Effects::_Renderer::Math + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_MATH_VECTOR_H_ diff --git a/src/ui/effects/inc/renderer/math/FUiEffects_RendererMathVector1Traits.h b/src/ui/effects/inc/renderer/math/FUiEffects_RendererMathVector1Traits.h new file mode 100644 index 0000000..a64af34 --- /dev/null +++ b/src/ui/effects/inc/renderer/math/FUiEffects_RendererMathVector1Traits.h @@ -0,0 +1,69 @@ +// +// 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 FUiEffects_RendererMathVector1Traits.h + * @brief The Vector1Traits class + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_MATH_VECTOR1_TRAITS_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_MATH_VECTOR1_TRAITS_H_ + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace Math +{ + +template +class VectorTraits : + public VectorTraitsBase +{ +public: + typedef Vector VectorType; + typedef VectorTraitsBase VectorTraitsBaseType; + typedef typename VectorTraitsBaseType::TypeReference TypeReference; + + using VectorTraitsBaseType::data; + + inline T& X(void); + inline const TypeReference X(void) const; + + inline VectorType& Set(void); +}; + +template +T& VectorTraits::X(void) +{ + return data[0]; +} + +template +const typename VectorTraits::TypeReference VectorTraits::X(void) const +{ + return data[0]; +} + +template +typename VectorTraits::VectorType& VectorTraits::Set(void) +{ + return *(static_cast(this)); +} + +}}}}} //Tizen::Ui::Effects::_Renderer::Math + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_MATH_VECTOR1_TRAITS_H_ diff --git a/src/ui/effects/inc/renderer/math/FUiEffects_RendererMathVector2Traits.h b/src/ui/effects/inc/renderer/math/FUiEffects_RendererMathVector2Traits.h new file mode 100644 index 0000000..0b7d1c0 --- /dev/null +++ b/src/ui/effects/inc/renderer/math/FUiEffects_RendererMathVector2Traits.h @@ -0,0 +1,87 @@ +// +// 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 FUiEffects_RendererMathVector2Traits.h + * @brief The Vector2Traits class + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_MATH_VECTOR2_TRAITS_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_MATH_VECTOR2_TRAITS_H_ + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace Math +{ + +template +class VectorTraits : + public VectorTraitsBase +{ +public: + typedef Vector VectorType; + typedef VectorTraitsBase VectorTraitsBaseType; + typedef typename VectorTraitsBaseType::TypeReference TypeReference; + + using VectorTraitsBaseType::data; + + inline T& X(void); + inline const TypeReference X(void) const; + + inline T& Y(void); + inline const TypeReference Y(void) const; + + inline VectorType& Set(const TypeReference x, const TypeReference y); +}; + +template +T& VectorTraits::X(void) +{ + return data[0]; +} + +template +const typename VectorTraits::TypeReference VectorTraits::X(void) const +{ + return data[0]; +} + +template +T& VectorTraits::Y(void) +{ + return data[1]; +} + +template +const typename VectorTraits::TypeReference VectorTraits::Y(void) const +{ + return data[1]; +} + +template +typename VectorTraits::VectorType& VectorTraits::Set(const TypeReference x, const TypeReference y) +{ + data[0] = x; + data[1] = y; + return *(static_cast(this)); +} + +}}}}} //Tizen::Ui::Effects::_Renderer::Math + + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_MATH_VECTOR2_TRAITS_H_ diff --git a/src/ui/effects/inc/renderer/math/FUiEffects_RendererMathVector3Traits.h b/src/ui/effects/inc/renderer/math/FUiEffects_RendererMathVector3Traits.h new file mode 100644 index 0000000..de3f71a --- /dev/null +++ b/src/ui/effects/inc/renderer/math/FUiEffects_RendererMathVector3Traits.h @@ -0,0 +1,133 @@ +// +// 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 FUiEffects_RendererMathVector3Traits.h + * @brief The Vector3Traits class + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_MATH_VECTOR3_TRAITS_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_MATH_VECTOR3_TRAITS_H_ + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace Math +{ + +template +class VectorTraits : + public VectorTraitsBase +{ +public: + typedef Vector VectorType; + typedef VectorTraitsBase VectorTraitsBaseType; + typedef typename VectorTraitsBaseType::TypeReference TypeReference; + + using VectorTraitsBaseType::data; + + inline T& X(void); + inline const TypeReference X(void) const; + + inline T& Y(void); + inline const TypeReference Y(void) const; + + inline T& Z(void); + inline const TypeReference Z(void) const; + + inline VectorType& Set(const TypeReference x, const TypeReference y, const TypeReference z); + + inline VectorType& Cross(const VectorType& other); + inline VectorType GetCrossed(const VectorType& other) const; + inline VectorType& MakeCrossed(const VectorType& first, const VectorType& second); + static inline VectorType CreateCrossed(const VectorType& first, const VectorType& second); +}; + +template +T& VectorTraits::X(void) +{ + return data[0]; +} + +template +const typename VectorTraits::TypeReference VectorTraits::X(void) const +{ + return data[0]; +} + +template +T& VectorTraits::Y(void) +{ + return data[1]; +} + +template +const typename VectorTraits::TypeReference VectorTraits::Y(void) const +{ + return data[1]; +} + +template +T& VectorTraits::Z(void) +{ + return data[2]; +} + +template +const typename VectorTraits::TypeReference VectorTraits::Z(void) const +{ + return data[2]; +} + +template +typename VectorTraits::VectorType& VectorTraits::Set(const TypeReference x, const TypeReference y, const TypeReference z) +{ + data[0] = x; + data[1] = y; + data[2] = z; + return *(static_cast(this)); +} + +template +typename VectorTraits::VectorType& VectorTraits::Cross(const VectorType& other) +{ + return Set((Y() * other.Z() - Z() * other.Y()), (Z() * other.X() - X() * other.Z()), (X() * other.Y() - Y() * other.X())); +} + +template +typename VectorTraits::VectorType VectorTraits::GetCrossed(const VectorType& other) const +{ + VectorType result(X(), Y(), Z()); + return result.Cross(other); +} + +template +typename VectorTraits::VectorType& VectorTraits::MakeCrossed(const VectorType& first, const VectorType& second) +{ + *this = first; + return Cross(second); +} + +template +typename VectorTraits::VectorType VectorTraits::CreateCrossed(const VectorType& first, const VectorType& second) +{ + return VectorTraits().MakeCrossed(first, second); +} + +}}}}} //Tizen::Ui::Effects::_Renderer::Math + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_MATH_VECTOR3_TRAITS_H_ diff --git a/src/ui/effects/inc/renderer/math/FUiEffects_RendererMathVectorTraits.h b/src/ui/effects/inc/renderer/math/FUiEffects_RendererMathVectorTraits.h new file mode 100644 index 0000000..2467866 --- /dev/null +++ b/src/ui/effects/inc/renderer/math/FUiEffects_RendererMathVectorTraits.h @@ -0,0 +1,119 @@ +// +// 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 FUiEffects_RendererMathVectorTraits.h + * @brief The VectorTraits class + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_MATH_VECTOR_TRAITS_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_MATH_VECTOR_TRAITS_H_ + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace Math +{ + +template +class VectorTraits : + public VectorTraitsBase +{ +public: + typedef Vector VectorType; + typedef VectorTraitsBase VectorTraitsBaseType; + typedef typename VectorTraitsBaseType::TypeReference TypeReference; + + using VectorTraitsBaseType::data; + + inline T& X(void); + inline const TypeReference X(void) const; + + inline T& Y(void); + inline const TypeReference Y(void) const; + + inline T& Z(void); + inline const TypeReference Z(void) const; + + inline T& W(void); + inline const TypeReference W(void) const; + + inline VectorType& Set(const TypeReference x, const TypeReference y, const TypeReference z, const TypeReference w); +}; + +template +T& VectorTraits::X(void) +{ + return data[0]; +} + +template +const typename VectorTraits::TypeReference VectorTraits::X(void) const +{ + return data[0]; +} + +template +T& VectorTraits::Y(void) +{ + return data[1]; +} + +template +const typename VectorTraits::TypeReference VectorTraits::Y(void) const +{ + return data[1]; +} + +template +T& VectorTraits::Z(void) +{ + return data[2]; +} + +template +const typename VectorTraits::TypeReference VectorTraits::Z(void) const +{ + return data[2]; +} + +template +T& VectorTraits::W(void) +{ + return data[3]; +} + +template +const typename VectorTraits::TypeReference VectorTraits::W(void) const +{ + return data[3]; +} + +template +typename VectorTraits::VectorType& VectorTraits::Set(const TypeReference x, const TypeReference y, const TypeReference z, const TypeReference w) +{ + data[0] = x; + data[1] = y; + data[2] = z; + data[3] = w; + return *(static_cast(this)); +} + +}}}}} //Tizen::Ui::Effects::_Renderer::Math + + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_MATH_VECTOR_TRAITS_H_ diff --git a/src/ui/effects/inc/renderer/math/FUiEffects_RendererMathVectorTraitsBase.h b/src/ui/effects/inc/renderer/math/FUiEffects_RendererMathVectorTraitsBase.h new file mode 100644 index 0000000..65317b2 --- /dev/null +++ b/src/ui/effects/inc/renderer/math/FUiEffects_RendererMathVectorTraitsBase.h @@ -0,0 +1,51 @@ +// +// 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 FUiEffects_RendererMathVectorTraitsBase.h + * @brief The VectorTraitsBase class + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_MATH_VECTOR_TRAITS_BASE_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_MATH_VECTOR_TRAITS_BASE_H_ + +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace Math +{ + +template +class Vector; + +template +class VectorTraitsBase +{ +public: + typedef Vector VectorType; + + typedef typename Tizen::Ui::Effects::_Renderer::System::SelectType::isFundamental, T, T&>::Result TypeReference; + typedef const TypeReference ConstTypeReference; + + typedef T DataType[Dimension]; + DataType data; +}; + +}}}}} //Tizen::Ui::Effects::_Renderer::Math + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_MATH_VECTOR_TRAITS_BASE_H_ diff --git a/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemConstnessPolicy.h b/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemConstnessPolicy.h new file mode 100644 index 0000000..9342cad --- /dev/null +++ b/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemConstnessPolicy.h @@ -0,0 +1,44 @@ +// +// 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 FUiEffects_RendererSystemConstnessPolicy.h + * @brief The ConstnessPolicy template + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_CONSTNESS_POLICY_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_CONSTNESS_POLICY_H_ + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace System +{ + +template +struct ConstnessPolicyDontConst +{ + typedef T Type; +}; + +template +struct ConstnessPolicyConst +{ + typedef const T Type; +}; + +}}}}} //Tizen::Ui::Effects::_Renderer::System + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_CONSTNESS_POLICY_H_ diff --git a/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemData.h b/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemData.h new file mode 100644 index 0000000..ad2ac53 --- /dev/null +++ b/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemData.h @@ -0,0 +1,459 @@ +// +// 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 FUiEffects_RendererSystemData.h + * @brief The Data class + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_DATA_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_DATA_H_ + +#include + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace System +{ + +/** + * @brief This class represents the data + */ +template +class Data +{ +public: + typedef ITEM_TYPE ItemType; + typedef std::vector ListType; + + typedef typename ListType::reference reference; + typedef typename ListType::const_reference const_reference; + typedef typename ListType::iterator iterator; + typedef typename ListType::const_iterator const_iterator; + typedef typename ListType::size_type size_type; + typedef typename ListType::difference_type difference_type; + typedef typename ListType::value_type value_type; + typedef typename ListType::allocator_type allocator_type; + typedef typename ListType::pointer pointer; + typedef typename ListType::const_pointer const_pointer; + typedef typename ListType::reverse_iterator reverse_iterator; + typedef typename ListType::const_reverse_iterator const_reverse_iterator; + +private: + ListType __list; + +public: + Data(void); + Data(const Data& data); + explicit Data(size_type size, const ItemType value); + explicit Data(size_type size); + + template + Data(InputIterator firstIterator, InputIterator lastIterator); + + virtual ~Data(void); + + Data& operator = (const Data& data); + bool operator == (const Data& data) const; + bool operator != (const Data& data) const; + + iterator Begin(void); + const_iterator Begin(void) const; + iterator End(void); + const_iterator End(void) const; + + reverse_iterator Rbegin(void); + const_reverse_iterator Rbegin(void) const; + reverse_iterator Rend(void); + const_reverse_iterator Rend(void) const; + + size_type Size(void) const; + size_type MaxSize(void) const; + void Resize(size_type size, ItemType value); + void Resize(size_type size); + size_type Capacity(void) const; + bool Empty(void) const; + void Reserve(size_type size); + + reference operator[](size_type position); + const_reference operator[](size_type position) const; + reference At(size_type position); + const_reference At(size_type position) const; + reference Front(void); + const_reference Front(void) const; + reference Back(void); + const_reference Back(void) const; + + template + void Assign(InputIterator firstIterator, InputIterator lastIterator); + + void Assign(size_type size, const ItemType value); + void PushBack(const ItemType value); + void PopBack(void); + iterator Insert(iterator position, const ItemType value); + void Insert(iterator position, size_type size, const ItemType value); + + template + void Insert(iterator position, InputIterator firstIterator, InputIterator lastIterator); + + void Copy(const Data& sourceData, size_type sourcePosition, size_type size, size_type destinationPosition); + void Copy(const void* pSourceData, size_type size, size_type destinationPosition); + + void CopyTo(value_type* pDestination, size_type position, size_type size) const; + + iterator Erase(iterator position); + iterator Erase(iterator firstIterator, iterator lastIterator); + void Swap(Data& data); + void Clear(void); + + allocator_type GetAllocator() const; +}; + +template +template +Data::Data(InputIterator firstIterator, InputIterator lastIterator) : __list(firstIterator, lastIterator) +{ + +} + +template +template +void Data::Assign(InputIterator firstIterator, InputIterator lastIterator) +{ + __list.assign(firstIterator, lastIterator); +} + +template +template +void Data::Insert(iterator position, InputIterator firstIterator, InputIterator lastIterator) +{ + __list.insert(position, firstIterator, lastIterator); +} + +template +Data::Data(void) : __list() +{ + +} + +template +Data::Data(const Data& data) : __list(data.__list) +{ + +} + +template +Data::Data(size_type size, const ItemType value ) : __list(size, value) +{ + +} + +template +Data::Data(size_type size) : __list(size) +{ + +} + +template +Data::~Data(void) +{ + +} + +template +Data& +Data::operator = (const Data& data) +{ + if (this != &data) + { + __list = data.__list; + } + return* this; +} + +template +bool +Data::operator == (const Data& data) const +{ + return __list == data.__list; +} + +template +bool +Data::operator != (const Data& data) const +{ + return __list != data.__list; +} + +template +typename Data::iterator +Data::Begin(void) +{ + return __list.begin(); +} + +template +typename Data::const_iterator +Data::Begin(void) const +{ + return __list.begin(); +} + +template +typename Data::iterator +Data::End(void) +{ + return __list.end(); +} + +template +typename Data::const_iterator +Data::End(void) const +{ + return __list.end(); +} + +template +typename Data::reverse_iterator +Data::Rbegin(void) +{ + return __list.rbegin(); +} + +template +typename Data::const_reverse_iterator +Data::Rbegin(void) const +{ + return __list.rbegin(); +} + +template +typename Data::reverse_iterator +Data::Rend(void) +{ + return __list.rend(); +} + +template +typename Data::const_reverse_iterator +Data::Rend(void) const +{ + return __list.rend(); +} + +template +typename Data::size_type +Data::Size(void) const +{ + return __list.size(); +} + +template +typename Data::size_type +Data::MaxSize(void) const +{ + return __list.max_size(); +} + +template +void +Data::Resize(size_type size, ItemType value) +{ + __list.resize(size, value); +} + +template +void +Data::Resize(size_type size) +{ + __list.resize(size); +} + +template +typename Data::size_type +Data::Capacity(void) const +{ + return __list.capacity(); +} + +template +bool +Data::Empty(void) const +{ + return __list.empty(); +} + +template +void +Data::Reserve(size_type size) +{ + __list.reserve(size); +} + +template +typename Data::reference +Data::operator[](size_type position) +{ + return __list[position]; +} + +template +typename Data::const_reference +Data::operator[](size_type position) const +{ + return __list[position]; +} + +template +typename Data::const_reference +Data::At(size_type position) const +{ + return __list.at(position); +} + +template +typename Data::reference +Data::At(size_type position) +{ + return __list[position]; +} + +template +typename Data::reference +Data::Front(void) +{ + return __list.front(); +} + +template +typename Data::const_reference +Data::Front(void) const +{ + return __list.front(); +} + +template +typename Data::reference +Data::Back(void) +{ + return __list.back(); +} + +template +typename Data::const_reference +Data::Back(void) const +{ + return __list.back(); +} + +template +void +Data::Assign(size_type size, const ItemType value) +{ + __list.assign(size, value); +} + +template +void +Data::PushBack(const ItemType value) +{ + __list.push_back(value); +} + +template +void +Data::PopBack(void) +{ + __list.pop_back(); +} + +template +typename Data::iterator +Data::Insert(iterator position, const ItemType value) +{ + return __list.insert(position, value); +} + +template +void +Data::Insert(iterator position, size_type size, const ItemType value) +{ + __list.insert(position, size, value); +} + +template +void +Data::Copy(const Data& sourceData, size_type sourcePosition, size_type size, size_type destinationPosition) +{ + memcpy(&(operator[](destinationPosition)),& sourceData[sourcePosition], size); +} + +template +void +Data::Copy(const void* pSourceData, size_type size, size_type destinationPosition) +{ + memcpy(&(operator[](destinationPosition)), pSourceData, size); +} + +template +void +Data::CopyTo(value_type* pDestination, size_type position, size_type size) const +{ + memcpy(pDestination,& __list[position], size); +} + +template +typename Data::iterator +Data::Erase(iterator position) +{ + return __list.erase(position); +} + +template +typename Data::iterator +Data::Erase(iterator firstIterator, iterator fastIterator) +{ + return __list.erase(firstIterator, fastIterator); +} + +template +void +Data::Swap(Data& data) +{ + __list.swap(data.__list); +} + +template +void +Data::Clear(void) +{ + __list.clear(); +} + +template +typename Data::allocator_type +Data::GetAllocator(void) const +{ + return __list.get_allocator(); +} + + + +}}}}} //Tizen::Ui::Effects::_Renderer::System + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_DATA_H_ diff --git a/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemDataType.h b/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemDataType.h new file mode 100644 index 0000000..2a095c6 --- /dev/null +++ b/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemDataType.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 FUiEffects_RendererSystemDataType.h + * @brief The define base data types + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_DATA_TYPE_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_DATA_TYPE_H_ + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace System +{ + typedef char int8; + typedef unsigned char uint8; + + typedef short int16; + typedef unsigned short uint16; + + typedef int int32; + typedef unsigned int uint32; + + typedef long long int64; + typedef unsigned long long uint64; + + typedef float float32; + typedef double float64; + +}}}}} //Tizen::Ui::Effects::_Renderer::System + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_DATA_TYPE_H_ diff --git a/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemException.h b/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemException.h new file mode 100644 index 0000000..67c216f --- /dev/null +++ b/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemException.h @@ -0,0 +1,51 @@ +// +// 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 FUiEffects_RendererSystemException.h + * @brief Exceptions + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_EXCEPTION_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_EXCEPTION_H_ + +#include +#include +#include + +#define SETJMP setjmp(::Tizen::Ui::Effects::_Renderer::System::jumpBuffer) +#define JMP(exceptionCode) longjmp(::Tizen::Ui::Effects::_Renderer::System::jumpBuffer, exceptionCode) + +#define _TryJmp(condition, exceptionCode, exceptionMessage) \ + if (!condition) \ + { \ + SysLogException(NID_UI_EFFECT, exceptionCode, exceptionMessage); \ + JMP(exceptionCode); \ + } + +#define ThrowJmp(exceptionMessage) _TryJmp(false, E_SYSTEM, exceptionMessage) + + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace System +{ + + extern jmp_buf jumpBuffer; + +}}}}} //Tizen::Ui::Effects::_Renderer::System + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_EXCEPTION_H_ diff --git a/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemNonCopyable.h b/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemNonCopyable.h new file mode 100644 index 0000000..267257d --- /dev/null +++ b/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemNonCopyable.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 FUiEffects_RendererSystemNonCopyable.h + * @brief The NonCopyable class + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_NONCOPYABLE_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_NONCOPYABLE_H_ + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace System +{ + +/** + * @brief An object to disable copy constructor and assignment operator + */ +class NonCopyable +{ +private: + NonCopyable(const NonCopyable& nonCopyable); + NonCopyable& operator = (const NonCopyable& nonCopyable); + +public: + NonCopyable(void) { } + virtual ~NonCopyable(void) { } +}; + +}}}}} //Tizen::Ui::Effects::_Renderer::System + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_NONCOPYABLE_H_ diff --git a/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemPlatformDefine.h b/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemPlatformDefine.h new file mode 100644 index 0000000..dfe86b2 --- /dev/null +++ b/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemPlatformDefine.h @@ -0,0 +1,48 @@ +// +// 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 FUiEffects_RendererSystemPlatformDefine.h + * @brief The platform's defines + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_PLATFORMDEFINE_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_PLATFORMDEFINE_H_ + +#if defined(_WIN32) && !defined(__TIZEN__) +#define _EFFECTS_SYSTEM_WINDOWS_ 1 +#elif defined(__TIZEN__) +#define _EFFECTS_SYSTEM_TIZEN_ 1 +#elif defined(__ANDROID__) +#define _EFFECTS_SYSTEM_ANDROID_ 1 +#elif defined(__SLP__) +#define _EFFECTS_SYSTEM_SLP_ 1 +#elif defined(__LINUX__) +#define _EFFECTS_SYSTEM_LINUX_ 1 +#else +#define _EFFECTS_SYSTEM_TIZEN_ 1 +#endif + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace System +{ + + const char* GetPlatformName(void); + +}}}}} //Tizen::Ui::Effects::_Renderer::System + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_PLATFORMDEFINE_H_ diff --git a/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemSelectType.h b/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemSelectType.h new file mode 100644 index 0000000..e053e3f --- /dev/null +++ b/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemSelectType.h @@ -0,0 +1,49 @@ +// +// 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 FUiEffects_RendererSystemSelectType.h + * @brief The SelectType template + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_SELECTTYPE_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_SELECTTYPE_H_ + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace System +{ + +/** +* @brief SelectType template +*/ +template +class SelectType +{ +public: + typedef TypeTrue Result; +}; + +template +class SelectType +{ +public: + typedef TypeFalse Result; +}; + +}}}}} //Tizen::Ui::Effects::_Renderer::System + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_SELECTTYPE_H_ diff --git a/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemSmartPtr.h b/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemSmartPtr.h new file mode 100644 index 0000000..01859b5 --- /dev/null +++ b/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemSmartPtr.h @@ -0,0 +1,654 @@ +// +// 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 FUiEffects_RendererSystemSmartPtr.h + * @brief The SmartPtr template + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_SMARTPTR_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_SMARTPTR_H_ + +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace System +{ + +template +< + typename ValueType, + template class OwnershipPolicy = SmartPtrRefCountedMtPolicy, + template class CheckingPolicy = SmartPtrAssertCheckPolicy, + template class StoragePolicy = SmartPtrDefaultStoragePolicy, + template class ConstnessPolicy = ConstnessPolicyDontConst +> +class SmartPtr; + +template +< + typename ValueType, + template class OwnershipPolicy, + template class CheckingPolicy, + template class StoragePolicy, + template class ConstnessPolicy +> +class SmartPtr : + public CheckingPolicy::StoredType>, + public StoragePolicy, + public OwnershipPolicy::InitPointerType> +{ +public: + typedef OwnershipPolicy::InitPointerType> OwnershipPolicyType; + typedef CheckingPolicy::StoredType> CheckingPolicyType; + typedef StoragePolicy StoragePolicyType; + typedef ConstnessPolicy ConstnessPolicyType; + + typedef typename StoragePolicyType::PointerType PointerType; + typedef typename StoragePolicyType::StoredType StoredType; + typedef typename StoragePolicyType::ReferenceType ReferenceType; + + typedef typename ConstnessPolicyType::Type* ConstPointerType; + typedef typename ConstnessPolicyType::Type& ConstReferenceType; + + SmartPtr(void); + + /// constructor by an objects pointer + /// \param value an objects pointer + explicit SmartPtr(ValueType* pValue); + + /// constructor by a SmartPtr + /// \param aSmartPtr an another SmartPtr + SmartPtr(const SmartPtr& smartPtr); + + /// constructor by an another type of SmartPtr + /// \param aSmartPtr an another SmartPtr + template + < + typename ValueType2, + template class OwnershipPolicy2, + template class CheckingPolicy2, + template class StoragePolicy2, + template class ConstnessPolicy2 + > + SmartPtr(const SmartPtr& smartPtr); + + SmartPtr& operator = (const SmartPtr& smartPtr); + + template + < + typename ValueType2, + template class OwnershipPolicy2, + template class CheckingPolicy2, + template class StoragePolicy2, + template class ConstnessPolicy2 + > + SmartPtr& operator = (const SmartPtr& smartPtr); + + virtual ~SmartPtr(void); + + void Swap(SmartPtr& smartPtr); + + PointerType operator -> (void); + + ConstPointerType operator -> (void) const; + + ReferenceType operator * (void); + + ConstReferenceType operator * (void) const; + + operator bool(void) const; + + bool operator ! (void) const; + + template + < + typename ValueType2, + template class OwnershipPolicy2, + template class CheckingPolicy2, + template class StoragePolicy2, + template class ConstnessPolicy2 + > + bool operator == (const SmartPtr& smartPtr) const; + + template + < + typename ValueType2, + template class OwnershipPolicy2, + template class CheckingPolicy2, + template class StoragePolicy2, + template class ConstnessPolicy2 + > + bool operator != (const SmartPtr& smartPtr) const; + + template + < + typename ValueType2, + template class OwnershipPolicy2, + template class CheckingPolicy2, + template class StoragePolicy2, + template class ConstnessPolicy2 + > + bool operator < (const SmartPtr& smartPtr) const; + + template + < + typename ValueType2, + template class OwnershipPolicy2, + template class CheckingPolicy2, + template class StoragePolicy2, + template class ConstnessPolicy2 + > + bool operator > (const SmartPtr& smartPtr) const; + + template + < + typename ValueType2, + template class OwnershipPolicy2, + template class CheckingPolicy2, + template class StoragePolicy2, + template class ConstnessPolicy2 + > + bool operator <= (const SmartPtr& smartPtr) const; + + template + < + typename ValueType2, + template class OwnershipPolicy2, + template class CheckingPolicy2, + template class StoragePolicy2, + template class ConstnessPolicy2 + > + bool operator >= (const SmartPtr& smartPtr) const; + + template + SmartPtr staticCast(void) const; + + template + < + typename ValueType2, + template class OwnershipPolicy2, + template class CheckingPolicy2, + template class StoragePolicy2, + template class ConstnessPolicy2 + > + friend void Reset(SmartPtr& smartPtr); + + template + < + typename ValueType2, + template class OwnershipPolicy2, + template class CheckingPolicy2, + template class StoragePolicy2, + template class ConstnessPolicy2 + > + friend class SmartPtr; + + template + < + typename ValueType2, + template class OwnershipPolicy2, + template class CheckingPolicy2, + template class StoragePolicy2, + template class ConstnessPolicy2 + > + friend class WeakPtr; + +private: + SmartPtr(const CheckingPolicyType& checkingPolicyType, const StoragePolicyType& storagePolicyType, const OwnershipPolicyType& ownershipPolicyType); + +}; + +template +< + typename ValueType, + template class OwnershipPolicy, + template class CheckingPolicy, + template class StoragePolicy, + template class ConstnessPolicy +> +void Reset(SmartPtr& smartPtr); + +template +< + typename ValueType, + template class OwnershipPolicy, + template class CheckingPolicy, + template class StoragePolicy, + template class ConstnessPolicy +> +SmartPtr::SmartPtr(void) +{ + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_EFFECT, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + CheckingPolicyType::OnDefault(GetImpl(*this)); +} + +template +< + typename ValueType, + template class OwnershipPolicy, + template class CheckingPolicy, + template class StoragePolicy, + template class ConstnessPolicy +> +SmartPtr::SmartPtr(ValueType* pValue) : + StoragePolicyType(pValue) +{ + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_EFFECT, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + CheckingPolicyType::OnInit(GetImpl(*this)); +} + +template +< + typename ValueType, + template class OwnershipPolicy, + template class CheckingPolicy, + template class StoragePolicy, + template class ConstnessPolicy +> +SmartPtr::SmartPtr(const SmartPtr& smartPtr) : + CheckingPolicyType(smartPtr), + StoragePolicyType(smartPtr), + OwnershipPolicyType(smartPtr) +{ + GetImplRef(*this) = OwnershipPolicyType::Clone(GetImplRef(smartPtr)); +} + +template +< + typename ValueType, + template class OwnershipPolicy, + template class CheckingPolicy, + template class StoragePolicy, + template class ConstnessPolicy +> +template +< + typename ValueType2, + template class OwnershipPolicy2, + template class CheckingPolicy2, + template class StoragePolicy2, + template class ConstnessPolicy2 +> +SmartPtr::SmartPtr( + const SmartPtr& smartPtr) : + CheckingPolicyType(smartPtr), + StoragePolicyType(smartPtr), + OwnershipPolicyType(smartPtr) +{ + GetImplRef(*this) = OwnershipPolicyType::Clone(GetImplRef(smartPtr)); +} + +template +< + typename ValueType, + template class OwnershipPolicy, + template class CheckingPolicy, + template class StoragePolicy, + template class ConstnessPolicy +> +SmartPtr& + SmartPtr::operator = (const SmartPtr& smartPtr) +{ + if (this != &smartPtr) + { + SmartPtr temp(smartPtr); + temp.Swap(*this); + } + return *this; +} + +template +< + typename ValueType, + template class OwnershipPolicy, + template class CheckingPolicy, + template class StoragePolicy, + template class ConstnessPolicy +> +template +< + typename ValueType2, + template class OwnershipPolicy2, + template class CheckingPolicy2, + template class StoragePolicy2, + template class ConstnessPolicy2 +> +SmartPtr& SmartPtr::operator = + (const SmartPtr& smartPtr) +{ + SmartPtr temp(smartPtr); + temp.Swap(*this); + return *this; +} + +template +< + typename ValueType, + template class OwnershipPolicy, + template class CheckingPolicy, + template class StoragePolicy, + template class ConstnessPolicy +> +SmartPtr::~SmartPtr(void) +{ + if (OwnershipPolicyType::Release(GetImpl(*static_cast(this)))) + { + StoragePolicyType::Destroy(); + } +} + +template +< + typename ValueType, + template class OwnershipPolicy, + template class CheckingPolicy, + template class StoragePolicy, + template class ConstnessPolicy +> +void SmartPtr::Swap(SmartPtr& smartPtr) +{ + CheckingPolicyType::Swap(smartPtr); + OwnershipPolicyType::Swap(smartPtr); + StoragePolicyType::Swap(smartPtr); +} + +template +< + typename ValueType, + template class OwnershipPolicy, + template class CheckingPolicy, + template class StoragePolicy, + template class ConstnessPolicy +> +typename SmartPtr::PointerType + SmartPtr::operator -> (void) +{ + CheckingPolicyType::OnDereference(GetImplRef(*this)); + return StoragePolicyType::operator->(); +} + +template +< + typename ValueType, + template class OwnershipPolicy, + template class CheckingPolicy, + template class StoragePolicy, + template class ConstnessPolicy +> +typename SmartPtr::ConstPointerType + SmartPtr::operator -> (void) const +{ + CheckingPolicyType::OnDereference(GetImplRef(*this)); + return StoragePolicyType::operator->(); +} + +template +< + typename ValueType, + template class OwnershipPolicy, + template class CheckingPolicy, + template class StoragePolicy, + template class ConstnessPolicy +> +typename SmartPtr::ReferenceType + SmartPtr::operator * (void) +{ + CheckingPolicyType::OnDereference(GetImplRef(*this)); + return StoragePolicyType::operator*(); +} + +template +< + typename ValueType, + template class OwnershipPolicy, + template class CheckingPolicy, + template class StoragePolicy, + template class ConstnessPolicy +> +typename SmartPtr::ConstReferenceType + SmartPtr::operator * (void) const +{ + CheckingPolicyType::OnDereference(GetImplRef(*this)); + return StoragePolicyType::operator*(); +} + +template +< + typename ValueType, + template class OwnershipPolicy, + template class CheckingPolicy, + template class StoragePolicy, + template class ConstnessPolicy +> +SmartPtr::operator bool(void) const +{ + if (GetImpl(*this) != null) + { + return true; + } + return false; +} + +template +< + typename ValueType, + template class OwnershipPolicy, + template class CheckingPolicy, + template class StoragePolicy, + template class ConstnessPolicy +> +bool SmartPtr::operator ! (void) const +{ + return GetImpl(*this) == null; +} + +template +< + typename ValueType, + template class OwnershipPolicy, + template class CheckingPolicy, + template class StoragePolicy, + template class ConstnessPolicy +> +template +< + typename ValueType2, + template class OwnershipPolicy2, + template class CheckingPolicy2, + template class StoragePolicy2, + template class ConstnessPolicy2 +> +bool SmartPtr::operator == + (const SmartPtr& smartPtr) const +{ + return GetImpl(*this) == GetImpl(smartPtr); +} + +template +< + typename ValueType, + template class OwnershipPolicy, + template class CheckingPolicy, + template class StoragePolicy, + template class ConstnessPolicy +> +template +< + typename ValueType2, + template class OwnershipPolicy2, + template class CheckingPolicy2, + template class StoragePolicy2, + template class ConstnessPolicy2 +> +bool SmartPtr::operator != + (const SmartPtr& smartPtr) const +{ + return GetImpl(*this) != GetImpl(smartPtr); +} + +template +< + typename ValueType, + template class OwnershipPolicy, + template class CheckingPolicy, + template class StoragePolicy, + template class ConstnessPolicy +> +template +< + typename ValueType2, + template class OwnershipPolicy2, + template class CheckingPolicy2, + template class StoragePolicy2, + template class ConstnessPolicy2 +> +bool SmartPtr::operator < + (const SmartPtr& smartPtr) const +{ + return GetImpl(*this) < GetImpl(smartPtr); +} + +template +< + typename ValueType, + template class OwnershipPolicy, + template class CheckingPolicy, + template class StoragePolicy, + template class ConstnessPolicy +> +template +< + typename ValueType2, + template class OwnershipPolicy2, + template class CheckingPolicy2, + template class StoragePolicy2, + template class ConstnessPolicy2 +> +bool SmartPtr::operator > + (const SmartPtr& smartPtr) const +{ + return GetImpl(*this) > GetImpl(smartPtr); +} + +template +< + typename ValueType, + template class OwnershipPolicy, + template class CheckingPolicy, + template class StoragePolicy, + template class ConstnessPolicy +> +template +< + typename ValueType2, + template class OwnershipPolicy2, + template class CheckingPolicy2, + template class StoragePolicy2, + template class ConstnessPolicy2 +> +bool SmartPtr::operator <= + (const SmartPtr& smartPtr) const +{ + return GetImpl(*this) <= GetImpl(smartPtr); +} + +template +< + typename ValueType, + template class OwnershipPolicy, + template class CheckingPolicy, + template class StoragePolicy, + template class ConstnessPolicy +> +template +< + typename ValueType2, + template class OwnershipPolicy2, + template class CheckingPolicy2, + template class StoragePolicy2, + template class ConstnessPolicy2 +> +bool SmartPtr::operator >= + (const SmartPtr& smartPtr) const +{ + return GetImpl(*this) >= GetImpl(smartPtr); +} + +template +< + typename ValueType, + template class OwnershipPolicy, + template class CheckingPolicy, + template class StoragePolicy, + template class ConstnessPolicy +> +template +SmartPtr + SmartPtr::staticCast(void) const +{ + SmartPtr result(*this, *this, *this); + GetImplRef(result) = static_cast(GetImpl(*this)); + return result; +} + + +template +< + typename ValueType, + template class OwnershipPolicy, + template class CheckingPolicy, + template class StoragePolicy, + template class ConstnessPolicy +> +SmartPtr:: + SmartPtr(const CheckingPolicyType& checkingPolicyType, const StoragePolicyType& storagePolicyType, const OwnershipPolicyType& ownershipPolicyType) : + CheckingPolicyType(checkingPolicyType), + StoragePolicyType(storagePolicyType), + OwnershipPolicyType(ownershipPolicyType) +{ + GetImplRef(*this) = OwnershipPolicyType::Clone(GetImplRef(storagePolicyType)); +} + +template +< + typename ValueType, + template class OwnershipPolicy, + template class CheckingPolicy, + template class StoragePolicy, + template class ConstnessPolicy +> +void Reset(SmartPtr& smartPtr) +{ + SmartPtr temp; + temp.Swap(smartPtr); +} + +// Common types definitions +typedef SmartPtr FloatPtr; + +}}}}} //Tizen::Ui::Effects::_Renderer::System + + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_SMARTPTR_H_ diff --git a/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemSmartPtrAssertCheckPolicy.h b/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemSmartPtrAssertCheckPolicy.h new file mode 100644 index 0000000..99b901b --- /dev/null +++ b/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemSmartPtrAssertCheckPolicy.h @@ -0,0 +1,100 @@ +// +// 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 FUiEffects_RendererSystemSmartPtrAssertCheckPolicy.h + * @brief The SmartPtrAssertCheckPolicy template + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_SMARTPTR_ASSERT_CHECK_POLICY_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_SMARTPTR_ASSERT_CHECK_POLICY_H_ + +#include + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace System +{ +/** + * \brief SmartPtrAssertCheckPolicy + */ +template +class SmartPtrAssertCheckPolicy +{ +public: + SmartPtrAssertCheckPolicy(void); + + template + SmartPtrAssertCheckPolicy(const SmartPtrAssertCheckPolicy& smartPtrAssertCheckPolicy); + + template + SmartPtrAssertCheckPolicy(const SmartPtrNoCheckPolicy& smartPtrNoCheckPolicy); + + static inline void OnDefault(const ValueType& value); + static inline void OnInit(const ValueType& value); + static inline void OnDereference(const ValueType value); + static inline void Swap(SmartPtrAssertCheckPolicy& smartPtrAssertCheckPolicy); +}; + +template +SmartPtrAssertCheckPolicy::SmartPtrAssertCheckPolicy(void) +{ + +} + +template +template +SmartPtrAssertCheckPolicy::SmartPtrAssertCheckPolicy(const SmartPtrAssertCheckPolicy& smartPtrAssertCheckPolicy) +{ + +} + +template +template +SmartPtrAssertCheckPolicy::SmartPtrAssertCheckPolicy(const SmartPtrNoCheckPolicy& smartPtrNoCheckPolicy) +{ + +} + +template +void SmartPtrAssertCheckPolicy::OnDefault(const ValueType& value) +{ + +} + +template +void SmartPtrAssertCheckPolicy::OnInit(const ValueType& value) +{ + +} + +template +void SmartPtrAssertCheckPolicy::OnDereference(const ValueType value) +{ + assert(value); +} + +template +void SmartPtrAssertCheckPolicy::Swap(SmartPtrAssertCheckPolicy& smartPtrAssertCheckPolicy) +{ + +} + +}}}}} //Tizen::Ui::Effects::_Renderer::System + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_SMARTPTR_ASSERT_CHECK_POLICY_H_ diff --git a/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemSmartPtrDefaultStoragePolicy.h b/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemSmartPtrDefaultStoragePolicy.h new file mode 100644 index 0000000..893fd8d --- /dev/null +++ b/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemSmartPtrDefaultStoragePolicy.h @@ -0,0 +1,172 @@ +// +// 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 FUiEffects_RendererSystemSmartPtrDefaultStoragePolicy.h + * @brief The SmartPtrDefaultStoragePolicy template + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_SMARTPTR_DEFAULT_STORAGE_POLICY_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_SMARTPTR_DEFAULT_STORAGE_POLICY_H_ + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace System +{ + +/** + * @brief SmartPtrDefaultStoragePolicy + */ +template +class SmartPtrDefaultStoragePolicy +{ +public: + typedef ValueType* StoredType; + typedef ValueType* InitPointerType; + typedef ValueType* PointerType; + typedef ValueType& ReferenceType; + + inline SmartPtrDefaultStoragePolicy(void); + inline SmartPtrDefaultStoragePolicy(const SmartPtrDefaultStoragePolicy& smartPtrDefaultStoragePolicy); + inline SmartPtrDefaultStoragePolicy(const StoredType& pObject); + + template + inline SmartPtrDefaultStoragePolicy(const SmartPtrDefaultStoragePolicy& smartPtrDefaultStoragePolicy); + + PointerType operator->(void) const; + ReferenceType operator*(void) const; + SmartPtrDefaultStoragePolicy& operator=(const SmartPtrDefaultStoragePolicy& rhs); + + void Swap(SmartPtrDefaultStoragePolicy& smartPtrDefaultStoragePolicy); + + template + friend typename SmartPtrDefaultStoragePolicy::PointerType GetImpl(const SmartPtrDefaultStoragePolicy& smartPtrDefaultStoragePolicy); + + template + friend typename SmartPtrDefaultStoragePolicy::StoredType& GetImplRef(SmartPtrDefaultStoragePolicy& smartPtrDefaultStoragePolicy); + + template + friend const typename SmartPtrDefaultStoragePolicy::StoredType& GetImplRef(const SmartPtrDefaultStoragePolicy& smartPtrDefaultStoragePolicy); + +protected: + void Destroy(void); + +private: + StoredType __pObject; +}; + +template +inline typename SmartPtrDefaultStoragePolicy::PointerType GetImpl(const SmartPtrDefaultStoragePolicy& smartPtrDefaultStoragePolicy); + +template +inline typename SmartPtrDefaultStoragePolicy::StoredType& GetImplRef(SmartPtrDefaultStoragePolicy& smartPtrDefaultStoragePolicy); + +template +inline const typename SmartPtrDefaultStoragePolicy::StoredType& GetImplRef(const SmartPtrDefaultStoragePolicy& smartPtrDefaultStoragePolicy); + +template +SmartPtrDefaultStoragePolicy::SmartPtrDefaultStoragePolicy(void) : + __pObject(null) +{ + +} + +// OwnershipPolicy must init objectPtr +template +SmartPtrDefaultStoragePolicy::SmartPtrDefaultStoragePolicy(const SmartPtrDefaultStoragePolicy& smartPtrDefaultStoragePolicy) : + __pObject(null) +{ + +} + +template +SmartPtrDefaultStoragePolicy::SmartPtrDefaultStoragePolicy(const StoredType& pObject) : + __pObject(pObject) +{ + +} + +// OwnershipPolicy must init objectPtr +template +template +SmartPtrDefaultStoragePolicy::SmartPtrDefaultStoragePolicy(const SmartPtrDefaultStoragePolicy& smartPtrDefaultStoragePolicy) : + __pObject(null) +{ + +} + +template +typename SmartPtrDefaultStoragePolicy::PointerType SmartPtrDefaultStoragePolicy::operator->(void) const +{ + return __pObject; +} + +template +typename SmartPtrDefaultStoragePolicy::ReferenceType SmartPtrDefaultStoragePolicy::operator*(void) const +{ + return *__pObject; +} + +template +SmartPtrDefaultStoragePolicy& SmartPtrDefaultStoragePolicy::operator=(const SmartPtrDefaultStoragePolicy& rhs) +{ + if (this != &rhs) + { + SmartPtrDefaultStoragePolicy temp(rhs); + temp.Swap(*this); + } + return *this; +} + +template +void SmartPtrDefaultStoragePolicy::Swap(SmartPtrDefaultStoragePolicy& smartPtrDefaultStoragePolicy) +{ + std::swap(__pObject, smartPtrDefaultStoragePolicy.__pObject); +} + +template +void SmartPtrDefaultStoragePolicy::Destroy(void) +{ + if (__pObject != null) + { + delete __pObject; + } + __pObject = null; +} + +template +typename SmartPtrDefaultStoragePolicy::PointerType GetImpl(const SmartPtrDefaultStoragePolicy& smartPtrDefaultStoragePolicy) +{ + return smartPtrDefaultStoragePolicy.__pObject; +} + +template +typename SmartPtrDefaultStoragePolicy::StoredType& GetImplRef(SmartPtrDefaultStoragePolicy& smartPtrDefaultStoragePolicy) +{ + return smartPtrDefaultStoragePolicy.__pObject; +} + +template +const typename SmartPtrDefaultStoragePolicy::StoredType& GetImplRef(const SmartPtrDefaultStoragePolicy& smartPtrDefaultStoragePolicy) +{ + return smartPtrDefaultStoragePolicy.__pObject; +} + +}}}}} //Tizen::Ui::Effects::_Renderer::System + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_SMARTPTR_DEFAULT_STORAGE_POLICY_H_ diff --git a/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemSmartPtrNoCheckPolicy.h b/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemSmartPtrNoCheckPolicy.h new file mode 100644 index 0000000..0b667f3 --- /dev/null +++ b/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemSmartPtrNoCheckPolicy.h @@ -0,0 +1,87 @@ +// +// 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 FUiEffects_RendererSystemSmartPtrNoCheckPolicy.h + * @brief The SmartPtrNoCheckPolicy template + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_SMARTPTR_NO_CHECK_POLICY_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_SMARTPTR_NO_CHECK_POLICY_H_ + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace System +{ + +/** + * @brief SmartPtrNoCheckPolicy + */ +template +class SmartPtrNoCheckPolicy +{ +public: + SmartPtrNoCheckPolicy(void); + + template + SmartPtrNoCheckPolicy(const SmartPtrNoCheckPolicy& smartPtrNoCheckPolicy); + + static inline void OnDefault(const ValueType& value); + static inline void OnInit(const ValueType& value); + static inline void OnDereference(const ValueType& value); + static inline void Swap(SmartPtrNoCheckPolicy& smartPtrNoCheckPolicy); +}; + +template +SmartPtrNoCheckPolicy::SmartPtrNoCheckPolicy(void) +{ + +} + +template +template +SmartPtrNoCheckPolicy::SmartPtrNoCheckPolicy(const SmartPtrNoCheckPolicy& smartPtrNoCheckPolicy) +{ + +} + +template +void SmartPtrNoCheckPolicy::OnDefault(const ValueType& value) +{ + +} + +template +void SmartPtrNoCheckPolicy::OnInit(const ValueType& value) +{ + +} + +template +void SmartPtrNoCheckPolicy::OnDereference(const ValueType& value) +{ + +} + +template +void SmartPtrNoCheckPolicy::Swap(SmartPtrNoCheckPolicy& smartPtrNoCheckPolicy) +{ + +} + +}}}}} //Tizen::Ui::Effects::_Renderer::System + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_SMARTPTR_NO_CHECK_POLICY_H_ diff --git a/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemSmartPtrRefCountedMTPolicy.h b/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemSmartPtrRefCountedMTPolicy.h new file mode 100644 index 0000000..f4d5e2f --- /dev/null +++ b/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemSmartPtrRefCountedMTPolicy.h @@ -0,0 +1,178 @@ +// +// 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 FUiEffects_RendererSystemSmartPtrRefCountedMTPolicy.h + * @brief The SmartPtrRefCountedMTPolicy template + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_SMARTPTR_REF_COUNTED_MTPOLICY_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_SMARTPTR_REF_COUNTED_MTPOLICY_H_ + +#include + +#include +#include +#include + +#ifdef _EFFECTS_SYSTEM_WINDOWS_ +#include +#else +#include +#endif + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace System +{ + +/** + * \brief SmartPtrRefCountedMTPolicy + */ +template +class SmartPtrRefCountedMtPolicy +{ +public: + +#ifdef _EFFECTS_SYSTEM_WINDOWS_ + typedef SmartPtrRefCounterHandlerInterlocked RefCounterHandlerType; +#else + typedef SmartPtrRefCounterHandlerAtomic RefCounterHandlerType; +#endif + + typedef RefCounterHandlerType::CounterData CounterData; + typedef RefCounterHandlerType::CounterType CounterType; + + inline SmartPtrRefCountedMtPolicy(void); + inline SmartPtrRefCountedMtPolicy(const SmartPtrRefCountedMtPolicy& smartPtrRefCountedMTPolicy); + + template + inline SmartPtrRefCountedMtPolicy(const SmartPtrRefCountedMtPolicy& smartPtrRefCountedMTPolicy); + + inline ValueType Clone(const ValueType& value); + inline ValueType CloneWeak(const ValueType& value); + + inline bool Release(const ValueType& value); + inline bool ReleaseWeak(const ValueType& value); + + inline void Swap(SmartPtrRefCountedMtPolicy& smartPtrRefCountedMTPolicy); + + enum { destructiveCopy = false }; + + template friend class SmartPtrRefCountedMtPolicy; + + template + friend typename SmartPtrRefCountedMtPolicy::CounterType GetUseCount(const SmartPtrRefCountedMtPolicy& smartPtr); + +protected: + inline void DecreaseUseCount(void); + +private: + CounterData* __pCounterData; +}; + +template +typename SmartPtrRefCountedMtPolicy::CounterType GetUseCount(const SmartPtrRefCountedMtPolicy& smartPtrRefCountedMTPolicy); + +template +SmartPtrRefCountedMtPolicy::SmartPtrRefCountedMtPolicy(void) +{ + __pCounterData = RefCounterHandlerType::NewCounter(); + + _TryJmp(__pCounterData != null, E_OUT_OF_MEMORY, "SmartPtrRefCountedMTPolicy::counterData = null"); + + __pCounterData->useCount = 1; + __pCounterData->ownerCount = 1; +} + +template +SmartPtrRefCountedMtPolicy::SmartPtrRefCountedMtPolicy(const SmartPtrRefCountedMtPolicy& smartPtrRefCountedMTPolicy) +{ + __pCounterData = smartPtrRefCountedMTPolicy.__pCounterData; +} + +template +template +SmartPtrRefCountedMtPolicy::SmartPtrRefCountedMtPolicy(const SmartPtrRefCountedMtPolicy& smartPtrRefCountedMTPolicy) +{ + __pCounterData = smartPtrRefCountedMTPolicy.__pCounterData; +} + +template +ValueType SmartPtrRefCountedMtPolicy::Clone(const ValueType& value) +{ + RefCounterHandlerType::IncrementUse(__pCounterData); + RefCounterHandlerType::IncrementOwner(__pCounterData); + return value; +} + +template +ValueType SmartPtrRefCountedMtPolicy::CloneWeak(const ValueType& value) +{ + RefCounterHandlerType::IncrementOwner(__pCounterData); + return value; +} + +template +bool SmartPtrRefCountedMtPolicy::Release(const ValueType& value) +{ + CounterType currenUse = RefCounterHandlerType::DecrementUse(__pCounterData); + if (RefCounterHandlerType::DecrementOwner(__pCounterData) == 0) + { + RefCounterHandlerType::DeleteCounter(__pCounterData); + } + if (currenUse == 0) + { + return true; + } + return false; +} + +template +bool SmartPtrRefCountedMtPolicy::ReleaseWeak(const ValueType& value) +{ + if (RefCounterHandlerType::DecrementOwner(__pCounterData) == 0) + { + RefCounterHandlerType::DeleteCounter(__pCounterData); + return true; + } + return false; +} + +template +void SmartPtrRefCountedMtPolicy::Swap(SmartPtrRefCountedMtPolicy& smartPtrRefCountedMTPolicy) +{ + std::swap(__pCounterData, smartPtrRefCountedMTPolicy.__pCounterData); +} + +template +void SmartPtrRefCountedMtPolicy::DecreaseUseCount(void) +{ + RefCounterHandlerType::DecrementUse(__pCounterData); +} + +template +typename SmartPtrRefCountedMtPolicy::CounterType GetUseCount(const SmartPtrRefCountedMtPolicy& smartPtrRefCountedMTPolicy) +{ + return smartPtrRefCountedMTPolicy.counterData->useCount; +} + +}}}}} //Tizen::Ui::Effects::_Renderer::System + + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_SMARTPTR_REF_COUNTED_MTPOLICY_H_ diff --git a/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemSmartPtrRefCounter.h b/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemSmartPtrRefCounter.h new file mode 100644 index 0000000..c04c651 --- /dev/null +++ b/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemSmartPtrRefCounter.h @@ -0,0 +1,48 @@ +// +// 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 FUiEffects_RendererSystemSmartPtrRefCounter.h + * @brief The SmartPtrRefCounter template + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_SMARTPTR_REFCOUNTER_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_SMARTPTR_REFCOUNTER_H_ + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace System +{ + +template +class SmartPtrRefCounter +{ +public: + typedef Counter CounterType; + + Counter useCount; + Counter ownerCount; + + SmartPtrRefCounter(void) + { + useCount = 0; + ownerCount = 0; + } +}; + +}}}}} //Tizen::Ui::Effects::_Renderer::System + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_SMARTPTR_REFCOUNTER_H_ diff --git a/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemSmartPtrRefCounterHandlerAtomic.h b/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemSmartPtrRefCounterHandlerAtomic.h new file mode 100644 index 0000000..200850d --- /dev/null +++ b/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemSmartPtrRefCounterHandlerAtomic.h @@ -0,0 +1,84 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiEffects_RendererSystemSmartPtrRefCounterHandlerAtomic.h + * @brief The SmartPtrRefCounterHandlerAtomic template + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_SMARTPTR_REFCOUNTER_HANDLER_ATOMIC_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_SMARTPTR_REFCOUNTER_HANDLER_ATOMIC_H_ + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace System +{ + +class SmartPtrRefCounterHandlerAtomic +{ +public: + typedef long CounterType; + typedef SmartPtrRefCounter CounterData; + + static inline CounterData* NewCounter(void); + static inline void DeleteCounter(CounterData* pCounterData); + + static inline CounterType IncrementUse(CounterData* pCounterData); + static inline CounterType DecrementUse(CounterData* pCounterData); + + static inline CounterType IncrementOwner(CounterData* pCounterData); + static inline CounterType DecrementOwner(CounterData* pCounterData); + +}; + +inline SmartPtrRefCounterHandlerAtomic::CounterData* SmartPtrRefCounterHandlerAtomic::NewCounter(void) +{ + return new (std::nothrow) CounterData; +} + +inline void SmartPtrRefCounterHandlerAtomic::DeleteCounter(CounterData* pCounterData) +{ + if (pCounterData != null) + { + delete pCounterData; + } +} + +inline SmartPtrRefCounterHandlerAtomic::CounterType SmartPtrRefCounterHandlerAtomic::IncrementUse(CounterData* pCounterData) +{ + return ++(pCounterData->useCount); +} + +inline SmartPtrRefCounterHandlerAtomic::CounterType SmartPtrRefCounterHandlerAtomic::DecrementUse(CounterData* pCounterData) +{ + return --(pCounterData->useCount); +} + +inline SmartPtrRefCounterHandlerAtomic::CounterType SmartPtrRefCounterHandlerAtomic::IncrementOwner(CounterData* pCounterData) +{ + return ++(pCounterData->ownerCount); +} + +inline SmartPtrRefCounterHandlerAtomic::CounterType SmartPtrRefCounterHandlerAtomic::DecrementOwner(CounterData* pCounterData) +{ + return --(pCounterData->ownerCount); +} + +}}}}} //Tizen::Ui::Effects::_Renderer::System + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_SMARTPTR_REFCOUNTER_HANDLER_ATOMIC_H_ diff --git a/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemStaticAssert.h b/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemStaticAssert.h new file mode 100644 index 0000000..dc52615 --- /dev/null +++ b/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemStaticAssert.h @@ -0,0 +1,45 @@ +// +// 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 FUiEffects_RendererSystemStaticAssert.h + * @brief The StaticAssert template + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_STATIC_ASSERT_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_STATIC_ASSERT_H_ + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace System +{ + +template +struct EffectsStaticAssertChecker; + +template<> +struct EffectsStaticAssertChecker +{ + +}; + +}} //Tizen::Ui::Effects::_Renderer::System + +#define EffectsStaticAssert(Condition) (Tizen::Ui::Effects::_Renderer::System::EffectsStaticAssertChecker<(Condition) != false>()) + +}}} //Tizen::Ui::Effects + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_STATIC_ASSERT_H_ diff --git a/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemTypeNull.h b/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemTypeNull.h new file mode 100644 index 0000000..890158d --- /dev/null +++ b/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemTypeNull.h @@ -0,0 +1,36 @@ +// +// 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 FUiEffects_RendererSystemTypeNull.h + * @brief The TypeNull template + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_TYPE_NULL_H_ +#define _FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_TYPE_NULL_H_ + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace System +{ + +class TypeNull +{ +}; + +}}}}} //Tizen::Ui::Effects::_Renderer::System + +#endif //_FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_TYPE_NULL_H_ diff --git a/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemTypeTraits.h b/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemTypeTraits.h new file mode 100644 index 0000000..c7b18c1 --- /dev/null +++ b/src/ui/effects/inc/renderer/system/FUiEffects_RendererSystemTypeTraits.h @@ -0,0 +1,184 @@ +// +// 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 FUiEffects_RendererSystemTypeTraits.h + * @brief The TypeTraits template + * + */ + +#ifndef FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_TYPE_TRAITS_H_ +#define FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_TYPE_TRAITS_H_ + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace System +{ + +template +class IsStdSignedInts +{ + public: + enum { VALUE = 0 }; +}; + +template +class IsStdUnsignedInts +{ + public: + enum { VALUE = 0 }; +}; + +template +class IsStdOtherInts +{ + public: + enum { VALUE = 0 }; +}; + +template +class IsStdFloats +{ + public: + enum { VALUE = 0 }; +}; + +template +class TypeTraits +{ + public: + enum {isStdSignedInt = IsStdSignedInts::VALUE }; + enum {isStdUnsignedInt = IsStdUnsignedInts::VALUE }; + enum {isStdOtherInt = IsStdOtherInts::VALUE }; + enum {isStdFloat = IsStdFloats::VALUE }; + + enum {isStdIntegral = isStdSignedInt || isStdUnsignedInt || isStdOtherInt }; + + enum {isStdArith = isStdIntegral || isStdFloat }; + + enum {isStdFundamental = isStdIntegral || isStdFloat }; + + enum {isFundamental = isStdFundamental }; +}; + +template <> +class IsStdSignedInts +{ + public: + enum { VALUE = 1 }; +}; + +template <> +class IsStdSignedInts +{ + public: + enum { VALUE = 1 }; +}; + +template <> +class IsStdSignedInts +{ + public: + enum { VALUE = 1 }; +}; + +template <> +class IsStdSignedInts +{ + public: + enum { VALUE = 1 }; +}; + +template <> +class IsStdSignedInts +{ + public: + enum { VALUE = 1 }; +}; + +template <> +class IsStdUnsignedInts +{ + public: + enum { VALUE = 1 }; +}; + +template <> +class IsStdUnsignedInts +{ + public: + enum { VALUE = 1 }; +}; + +template <> +class IsStdUnsignedInts +{ + public: + enum { VALUE = 1 }; +}; + +template <> +class IsStdUnsignedInts +{ + public: + enum { VALUE = 1 }; +}; + +template <> +class IsStdUnsignedInts +{ + public: + enum { VALUE = 1 }; +}; + +template <> +class IsStdOtherInts +{ + public: + enum { VALUE = 1 }; +}; + +template <> +class IsStdOtherInts +{ + public: + enum { VALUE = 1 }; +}; + +template <> +class IsStdFloats +{ + public: + enum { VALUE = 1 }; +}; + +template <> +class IsStdFloats +{ + public: + enum { VALUE = 1 }; +}; + +template <> +class IsStdFloats +{ + public: + enum { VALUE = 1 }; +}; + +}}}}} //Tizen::Ui::Effects::_Renderer::System + + +#endif // FUI_EFFECTS_INTERNAL_RENDERER_SYSTEM_TYPE_TRAITS_H_ diff --git a/src/ui/effects/inc/utils/FUiEffects_Utils.h b/src/ui/effects/inc/utils/FUiEffects_Utils.h new file mode 100644 index 0000000..635fd4c --- /dev/null +++ b/src/ui/effects/inc/utils/FUiEffects_Utils.h @@ -0,0 +1,36 @@ +// +// 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 FUiEffects_Utils.h + * @brief This is the header file for the Tizen::Ui::Effects::_utils namespace + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_UTILS_H_ +#define _FUI_EFFECTS_INTERNAL_UTILS_H_ + + +#include "FUiEffects_UtilsVector2.h" +#include "FUiEffects_UtilsVector3.h" +#include "FUiEffects_UtilsVector4.h" + +#include "FUiEffects_UtilsMatrix2.h" +#include "FUiEffects_UtilsMatrix3.h" +#include "FUiEffects_UtilsMatrix4.h" + +#endif // _FUI_EFFECTS_INTERNAL_UTILS_H_ diff --git a/src/ui/effects/inc/utils/FUiEffects_UtilsAdapterFunctions.h b/src/ui/effects/inc/utils/FUiEffects_UtilsAdapterFunctions.h new file mode 100644 index 0000000..2f1b4cd --- /dev/null +++ b/src/ui/effects/inc/utils/FUiEffects_UtilsAdapterFunctions.h @@ -0,0 +1,261 @@ +// +// 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 FUiEffects_UtilsAdapterFunctions.h + * @brief The adapter math functions for user types + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_UTILS_ADAPTER_FUNCTIONS_H_ +#define _FUI_EFFECTS_INTERNAL_UTILS_ADAPTER_FUNCTIONS_H_ + +#include +#include "FUiEffects_UtilsCommon.h" + +namespace Tizen { namespace Ui { namespace Effects { namespace _Utils +{ + inline float effects_sqrt(float aValue); + inline double effects_sqrt(double aValue); + + inline float effects_cos(float aAngle); + inline double effects_cos(double aAngle); + inline float effects_acos(float aAngle); + inline double effects_acos(double aAngle); + + inline float effects_sin(float aAngle); + inline double effects_sin(double aAngle); + inline float effects_asin(float aAngle); + inline double effects_asin(double aAngle); + + template inline T EffectsAbs(const T& aValue); + inline float EffectsAbs(const float& aValue); + inline double EffectsAbs(const double& aValue); + + inline float effects_atan2(float x, float y); + inline double effects_atan2(double x, double y); + + inline float effects_atan(float val); + inline double effects_atan(double val); + + template struct effects_epsilon + { + static inline const T& epsilon() {return get_epsilon(static_cast(0));} + }; + template<> struct effects_epsilon + { + static inline const float& epsilon() {return fEPS;} + }; + template<> struct effects_epsilon + { + static inline const double& epsilon() {return dEPS;} + }; + + inline bool EffectsEqual(const float& aLhv, const float& aRhv, const float& aEpsilon = fEPS); + inline bool EffectsEqual(const double& aLhv, const double& aRhv, const double& aEpsilon = dEPS); + + template inline void EffectsSwap(T& aLhv, T& aRhv); + inline void EffectsSwap(float& aLhv, float& aRhv); + inline void EffectsSwap(double& aLhv, double& aRhv); + + template inline T effects_clamp(const T& aValue, const T& aMin, const T& aMax); + inline float effects_clamp(const float& aValue, const float& aMin, const float& aMax); + inline double effects_clamp(const double& aValue, const double& aMin, const double& aMax); + + template inline T effects_lerp(const T& aFrom, const T& aTo, const T& aCoeff); + inline float effects_lerp(const float& aFrom, const float& aTo, const float& aCoeff); + inline double effects_lerp(const double& aFrom, const double& aTo, const double& aCoeff); + inline int effects_lerp(const int& aFrom, const int& aTo, const int& aCoeff); + inline unsigned int effects_lerp(const unsigned int& aFrom, const unsigned int& aTo, const unsigned int& aCoeff); + + template inline T EffectsMin(const T& a1, const T& a2); + template inline T EffectsMin3(const T& a1, const T& a2, const T& a3); + template inline T EffectsMax(const T& a1, const T& a2); + template inline T EffectsMax3(const T& a1, const T& a2, const T& a3); + + inline float effects_sqrt(float aValue) + { + return sqrtf(aValue); + } + inline double effects_sqrt(double aValue) + { + return sqrt(aValue); + } + + template inline bool EffectsEqual(const T& aLhv, const T& aRhv, const T& aEpsilon = effects_epsilon::epsilon()) + { + return aLhv == aRhv; + } + inline bool EffectsEqual(const float& aLhv, const float& aRhv, const float& aEpsilon) + { + return (aLhv + aEpsilon >= aRhv) && (aLhv - aEpsilon <= aRhv); + } + inline bool EffectsEqual(const double& aLhv, const double& aRhv, const double& aEpsilon) + { + return (aLhv + aEpsilon >= aRhv) && (aLhv - aEpsilon <= aRhv); + } + + inline float effects_cos(float aAngle) + { + return cosf(aAngle); + } + inline double effects_cos(double aAngle) + { + return cos(aAngle); + } + inline float effects_acos(float aAngle) + { + return acosf(aAngle); + } + inline double effects_acos(double aAngle) + { + return acos(aAngle); + } + + inline float effects_sin(float aAngle) + { + return sinf(aAngle); + } + inline double effects_sin(double aAngle) + { + return sin(aAngle); + } + + inline float effects_asin(float aAngle) + { + return asinf(aAngle); + } + inline double effects_asin(double aAngle) + { + return asin(aAngle); + } + + template inline T EffectsAbs(const T& aValue) + { + return abs(aValue); + } + inline float EffectsAbs(float aValue) + { + return fabsf(aValue); + } + inline double EffectsAbs(double aValue) + { + return fabs(aValue); + } + + inline float effects_atan2(float x, float y) + { + return atan2f(x, y); + } + inline double effects_atan2(double x, double y) + { + return atan2(x, y); + } + + inline float effects_atan(float val) + { + return atanf(val); + } + inline double effects_atan(double val) + { + return atan(val); + } + + template inline void EffectsSwap(T& aLhv, T& aRhv) + { + T temp(aLhv); + aLhv = aRhv; + aRhv = temp; + } + inline void EffectsSwap(float& aLhv, float& aRhv) + { + std::swap(aLhv, aRhv); + } + inline void EffectsSwap(double& aLhv, double& aRhv) + { + std::swap(aLhv, aRhv); + } + + template inline T effects_clamp(const T& aValue, const T& aMin, const T& aMax) + { + if(aValue < aMin) + return aMin; + if(aValue > aMax) + return aMax; + return aValue; + } + inline float effects_clamp(const float& aValue, const float& aMin, const float& aMax) + { + if(aValue < aMin) + return aMin; + if(aValue > aMax) + return aMax; + return aValue; + } + inline double effects_clamp(const double& aValue, const double& aMin, const double& aMax) + { + if(aValue < aMin) + return aMin; + if(aValue > aMax) + return aMax; + return aValue; + } + + template inline T effects_lerp(const T& aFrom, const T& aTo, const T& aCoeff) + { + return aFrom + (aTo - aFrom) * aCoeff; + } + inline float effects_lerp(const float& aFrom, const float& aTo, const float& aCoeff) + { + return aFrom + (aTo - aFrom) * aCoeff; + } + inline double effects_lerp(const double& aFrom, const double& aTo, const double& aCoeff) + { + return aFrom + (aTo - aFrom) * aCoeff; + } + inline int effects_lerp(const int& aFrom, const int& aTo, const int& aCoeff) + { + return aFrom + (((aTo - aFrom) * aCoeff) >> 8); + } + inline unsigned int effects_lerp(const unsigned int& aFrom, const unsigned int& aTo, const unsigned int& aCoeff) + { + return aFrom + (((aTo - aFrom) * aCoeff) >> 8); + } + + template inline T EffectsMin(const T& a1, const T& a2) + { + if(a1 < a2) + return a1; + return a2; + } + template inline T EffectsMin3(const T& a1, const T& a2, const T& a3) + { + return EffectsMin(EffectsMin(a1, a2), a3); + } + template inline T EffectsMax(const T& a1, const T& a2) + { + if(a1 < a2) + return a2; + return a1; + } + template inline T EffectsMax3(const T& a1, const T& a2, const T& a3) + { + return EffectsMax(EffectsMax(a1, a2), a3); + } +} } } } //Tizen::Ui::Effects::_Utils + +#endif //_FUI_EFFECTS_INTERNAL_UTILS_ADAPTER_FUNCTIONS_H_ diff --git a/src/ui/effects/inc/utils/FUiEffects_UtilsCommon.h b/src/ui/effects/inc/utils/FUiEffects_UtilsCommon.h new file mode 100644 index 0000000..260a4be --- /dev/null +++ b/src/ui/effects/inc/utils/FUiEffects_UtilsCommon.h @@ -0,0 +1,58 @@ +// +// 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 FUiEffects_UtilsCommon.h + * @brief The common math functions and constants + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_UTILS_COMMON_H_ +#define _FUI_EFFECTS_INTERNAL_UTILS_COMMON_H_ + +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Utils +{ + const float fEPS = std::numeric_limits::epsilon(); + const double dEPS = std::numeric_limits::epsilon(); + + const double dPI_2 = 6.283185307179586232; + const double dPI = dPI_2 * 0.5; + const float fPI_2 = float(dPI_2); + const float fPI = float(dPI); + + const double dDEG2RADCoeff = dPI / 180.0; + const double dRAD2DEGCoeff = 180.0 / dPI; + const float fDEG2RADCoeff = float(dDEG2RADCoeff); + const float fRAD2DEGCoeff = float(dRAD2DEGCoeff); + + inline double dDEG2RAD(double aDEG) {return aDEG * dDEG2RADCoeff;} + inline float fDEG2RAD(float aDEG) {return aDEG * fDEG2RADCoeff;} + inline double dRAD2DEG(double aRAD) {return aRAD * dRAD2DEGCoeff;} + inline float fRAD2DEG(float aRAD) {return aRAD * fRAD2DEGCoeff;} + + enum RotationOrder3 {ROTATION_XYZ = 0, ROTATION_XZY, ROTATION_YXZ, ROTATION_YZX, ROTATION_ZXY, ROTATION_ZYX, ROTATION3_MAX}; + + template inline bool isPowerOf2(T aValue) //only for positive integes + { + return (aValue & (aValue - T(1))) == T(0); + } +} } } } //Tizen::Ui::Effects::_Utils + +#endif //_FUI_EFFECTS_INTERNAL_UTILS_COMMON_H_ diff --git a/src/ui/effects/inc/utils/FUiEffects_UtilsLuaMat4.h b/src/ui/effects/inc/utils/FUiEffects_UtilsLuaMat4.h new file mode 100644 index 0000000..b206ca5 --- /dev/null +++ b/src/ui/effects/inc/utils/FUiEffects_UtilsLuaMat4.h @@ -0,0 +1,603 @@ +// +// 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 FUiEffects_UtilsLuaMat4.h + * @brief This file contains a definition of LuaMat4 class template + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_UTILS_LUA_MAT4_H_ +#define _FUI_EFFECTS_INTERNAL_UTILS_LUA_MAT4_H_ + +namespace Tizen { namespace Ui { namespace Effects { namespace _Utils +{ + +template class Matrix4; + +/** + * @template class LuaMat4 + * @brief This class is needed for model matrix manipulations + * from scripts such as rotation, scale, translate and set identity matrix + */ + +template +class LuaMat4 +{ +public: + /** + * @brief LuaMat4 class default constructor + */ + inline LuaMat4(void); + + /** + * @brief LuaMat4 class copy constructor + */ + inline LuaMat4(const LuaMat4& rhs); + + /** + * @brief LuaMat4 class constructor by elements + */ + inline LuaMat4(T m0, T m1, T m2, T m3, + T m4, T m5, T m6, T m7, + T m8, T m9, T m10, T m11, + T m12, T m13, T m14, T m15); + + /** + * @brief LuaMat4 class constructor by one element + */ + inline LuaMat4(T m); + + /** + * @brief LuaMat4 class adaptive constructor from class Matrix4 + */ + inline LuaMat4(const Matrix4 &mat4); + + /** + * @brief Sets identity matrix + */ + inline void SetIdentity(void); + + /** + * @brief Translates model matrix by values X0, Y0 and Z0 relative to the axes + */ + inline void Translate(T x0, T y0, T z0); + + /** + * @brief Scales model matrix by the factors ax, ay, az relative to the axes + * @remark The coordinates of point (0,0,0) do not change + */ + inline bool Scale(T ax, T ay, T az); + + /** + * @brief Scales model matrix by the factors ax, ay, az relative to the axes + * @remark The coordinates of point (x0, y0, z0) do not change + */ + inline bool Scale(T ax, T ay, T az, T x0, T y0, T z0); + + /** + * @brief Rotates model matrix by the Angle around axis Z + * drawn from the point (0,0,0) in global coordinates + */ + inline void RotateAroundAxisZ(T angle); + + /** + * @brief Rotates model matrix by the Angle around axis Z + * drawn from the point (x0, y0, z0) in global coordinates + */ + inline void RotateAroundAxisZ(T angle, T x0, T y0, T z0); + + /** + * @brief Rotates model matrix by the Angle around axis X + * drawn from the point (0, 0, 0) in global coordinates + */ + inline void RotateAroundAxisX(T angle); + + /** + * @brief Rotates model matrix by the Angle around axis X + * drawn from the point (x0, y0, z0) in global coordinates + */ + inline void RotateAroundAxisX(T angle, T x0, T y0, T z0); + + /** + * @brief Rotates model matrix by the Angle around axis Y + * drawn from the point (0, 0, 0) in global coordinates + */ + inline void RotateAroundAxisY(T angle); + + /** + * @brief Rotates model matrix by the Angle around axis Y + * drawn from the point (x0,y0,z0) in global coordinates + */ + inline void RotateAroundAxisY(T angle, T x0, T y0, T z0); + + /** + * @brief Rotates model matrix by the Angle around axis with coordinates Ax, Ay, Az + * drawn from the point (0,0,0) in global coordinates + */ + inline bool RotateAroundAxisArbitrary(T angle, T ax, T ay, T az); + + /** + * @brief Rotates model matrix by the Angle around axis with coordinates Ax, Ay, Az + * drawn from the point (x0, y0, z0) in global coordinates + */ + inline bool RotateAroundAxisArbitrary(T angle, T ax, T ay, T az, T x0, T y0, T z0); + + /** + * @brief Overloading multiplication operator of two matrix as class LuaMat4 instances + */ + inline LuaMat4 operator*(const LuaMat4 &mul) const; + + /** + * @brief Overloading multiplication operator of matrix and number + */ + inline LuaMat4 operator*(T mul) const; + + /** + * @brief Overloading addition operator of two matrix + */ + inline LuaMat4 operator+(const LuaMat4 &add) const; + + /** + * @brief Overloading subtraction operator of two matrix + */ + inline LuaMat4 operator-(const LuaMat4 &sub) const; + + /** + * @brief Overloading the unary minus operator + */ + inline LuaMat4 operator-(void)const; + + /** + * @brief Overloading the assignment operator + */ + inline LuaMat4 &operator=(const LuaMat4 &orig); + + /** + * @brief Casts LuaMat4 class instance to type Matrix4 + */ + inline operator Matrix4(void)const; + +protected: + +private: + + +public: + +protected: + +private: + + T __m[16]; /**< the matrix 4*4 as one dimensional array of type T */ + +}; // LuaMat4 + +typedef LuaMat4 LuaMatrix4; + +} } } } // Tizen::Ui::Effects::_Utils + + +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Utils +{ + + +template inline +LuaMat4::LuaMat4(void) +{ + SetIdentity(); +} + +template inline +LuaMat4::LuaMat4(T m) +{ + for (int i = 0; i < 16; ++i) + { + __m[i] = m; + } +} + +template inline +LuaMat4::LuaMat4(const LuaMat4 &rhs) +{ + memcpy(this->__m, rhs.__m, 16 * sizeof(T)); +} + +template inline +LuaMat4::LuaMat4(const Matrix4 &mat4) +{ + memcpy( __m, &mat4.i, 4 * sizeof(T)); + memcpy(&__m[4], &mat4.j, 4 * sizeof(T)); + memcpy(&__m[8], &mat4.k, 4 * sizeof(T)); + memcpy(&__m[12], &mat4.c, 4 * sizeof(T)); +} + +template inline +LuaMat4::LuaMat4(T m0, T m1, T m2, T m3, + T m4, T m5, T m6, T m7, + T m8, T m9, T m10, T m11, + T m12, T m13, T m14, T m15) +{ + T* pm = __m; + *(pm++) = m0; + *(pm++) = m1; + *(pm++) = m2; + *(pm++) = m3; + *(pm++) = m4; + *(pm++) = m5; + *(pm++) = m6; + *(pm++) = m7; + *(pm++) = m8; + *(pm++) = m9; + *(pm++) = m10; + *(pm++) = m11; + *(pm++) = m12; + *(pm++) = m13; + *(pm++) = m14; + *(pm++) = m15; +} + +template inline void +LuaMat4::SetIdentity(void) +{ + memset(__m, 0, 16 * sizeof(T)); + + T one = static_cast(1); + __m[0] = one; + __m[5] = one; + __m[10] = one; + __m[15] = one; + + return; +} + +template inline void +LuaMat4::Translate(T x0, T y0, T z0) +{ + T* pnt0 = __m; + T* pnt3Init = &(__m[12]); + T* pnt3 = pnt3Init; + + const T* pArg[3] = {&x0, &y0, &z0}; + const T** p = pArg; + for (short i = 0, j = 0; i < 12; ++i, ++j) + { + if (j == 4) + { + j = 0; + p++; + pnt3 = pnt3Init; + } + *pnt0 += *(pnt3++) * (**p); + pnt0++; + } + + return; +} + +template inline bool +LuaMat4::Scale(T aX, T aY, T aZ) +{ + T epsilon = std::numeric_limits::epsilon(); + if (aX <= -epsilon || aY <= -epsilon || aZ <= -epsilon) + { + return false; + } + + T *pnt0 = __m; + const T* pArg[3] = {&aX, &aY, &aZ}; + const T** p = pArg; + for (short i = 0, j = 0; i < 12; ++i, ++j) + { + if (j == 4) + { + j = 0; + ++p; + } + *pnt0 *= (**p); + pnt0++; + } + + return true; +} + +template inline bool +LuaMat4::Scale(T aX, T aY, T aZ, T x0, T y0, T z0) +{ + Translate(-x0, -y0, -z0); + bool res = Scale(aX, aY, aZ); + Translate(x0, y0, z0); + + return res; +} + +template inline void +LuaMat4::RotateAroundAxisZ(T angle) +{ + // ---- for case T==float ---------- + float coi = cosf(angle); + float sii = sinf(angle); + //---------------------------------- + float co = coi; + float si = sii; + + T* pnt1Init = __m; + T* pnt2Init = &(__m[4]); + T* pnt1 = pnt1Init; + T* pnt2 = pnt2Init; + T mTemp[8]; + T* pMTemp = mTemp; + for (short i = 0, j = 0; i < 8; ++i, ++j) + { + if (j == 4) + { + j = 0; + co = -sii; + si = coi; + pnt1 = pnt1Init; + pnt2 = pnt2Init; + } + *pMTemp = (*(pnt1++) * co + *(pnt2++) * si); + pMTemp++; + } + memcpy(__m, mTemp, 8 * sizeof(T)); + + return; +} + +template inline void +LuaMat4::RotateAroundAxisZ(T angle, T x0, T y0, T z0) +{ + Translate(-x0, -y0, -z0); + RotateAroundAxisZ(angle); + Translate(x0, y0, z0); + + return; +} + +template inline void +LuaMat4::RotateAroundAxisX(T angle) +{ + // ---- for case T==float ---------- + float coi = cosf(angle); + float sii = sinf(angle); + //---------------------------------- + float co = coi; + float si = -sii; + + T* pnt1Init = &(__m[4]); + T* pnt2Init = &(__m[8]); + T* pnt1 = pnt1Init; + T* pnt2 = pnt2Init; + T mTemp[8]; + T* pMTemp = mTemp; + for (short i = 0, j = 0; i < 8; ++i, ++j) + { + if (j == 4) + { + j = 0; + co = sii; + si = coi; + pnt1 = pnt1Init; + pnt2 = pnt2Init; + } + *pMTemp = (*(pnt1++) * co + *(pnt2++) * si); + pMTemp++; + } + memcpy(&(__m[4]), mTemp, 8 * sizeof(T)); + + return; +} + +template inline void +LuaMat4::RotateAroundAxisX(T angle, T x0, T y0, T z0) +{ + Translate(-x0, -y0, -z0); + RotateAroundAxisX(angle); + Translate(x0, y0, z0); + + return; +} + +template inline void +LuaMat4::RotateAroundAxisY(T angle) +{ + // ---- for case T==float ---------- + float coi = cosf(angle); + float sii = sinf(angle); + //---------------------------------- + float co = coi; + float si = sii; + + T* pnt1Init = __m; + T* pnt2Init = &(__m[8]); + T* pnt1 = pnt1Init; + T* pnt2 = pnt2Init; + T mTemp[8]; + T* pMTemp = mTemp; + for (short i = 0, j = 0; i < 8; ++i, ++j) + { + if (j == 4) + { + j = 0; + co = -sii; + si = coi; + pnt1 = pnt1Init; + pnt2 = pnt2Init; + } + *pMTemp = (*(pnt1++) * co + *(pnt2++) * si); + pMTemp++; + } + memcpy(__m, mTemp, 4 * sizeof(T)); + memcpy(&(__m[8]), &(mTemp[4]), 4 * sizeof(T)); + + return; +} + +template inline void +LuaMat4::RotateAroundAxisY(T angle, T x0, T y0, T z0) +{ + Translate(-x0, -y0, -z0); + RotateAroundAxisY(angle); + Translate(x0, y0, z0); + + return; +} + +template inline bool +LuaMat4::RotateAroundAxisArbitrary(T angle, T ax, T ay, T az) +{ + // ---- for case T==float ------------------------------------- + float c = cosf(angle); + float s = sinf(angle); + + T len = sqrtf(ax * ax + ay * ay + az * az); + if (fabsf(len) <= std::numeric_limits::epsilon()) + { + return false; + } + //------------------------------------------------------------- + T axn = ax / len; + T ayn = ay / len; + T azn = az / len; + + LuaMat4 res(c + (1 - c) * axn * axn, (1 - c) * axn * ayn - s * azn, (1 - c) * axn * azn + s * ayn, 0, + (1 - c) * ayn * axn + s * azn, c + (1 - c) * ayn * ayn, (1 - c) * ayn * azn - s * axn, 0, + (1 - c) * azn * axn - s * ayn, (1 - c) * azn * ayn + s * axn, c + (1 - c) * azn * azn, 0, + 0, 0, 0, 1); + + *this = res * (*this); + return true; +} + +template inline bool +LuaMat4::RotateAroundAxisArbitrary(T angle, T ax, T ay, T az, T x0, T y0, T z0) +{ + Translate(-x0, -y0, -z0); + bool res = RotateAroundAxisArbitrary(angle, ax, ay, az); + Translate(x0, y0, z0); + + return res; +} + +template inline LuaMat4 +LuaMat4::operator*(const LuaMat4 &rhs) const +{ + LuaMat4 res; + memset(res.__m, 0, 16 * sizeof(T)); + const T* pThis = __m; + const T* pThisC; + const T* pMul = rhs.__m; + const T* pMulC; + T *pRes = res.__m; + short i, j, k; + for (k = 0; k < 4; ++k) + { + for (j = 0; j < 4; ++j) + { + pThisC = pThis; + pMulC = pMul; + for (i = 0; i < 4; ++i) + { + *pRes += *(pThisC++) * (*pMulC); + pMulC += 4; + } + pRes++; + pMul++; + } + pThis += 4; + pMul = rhs.__m; + } + + return res; +} + +template inline LuaMat4 +LuaMat4::operator*(T rhs)const +{ + LuaMat4 res(*this); + T *pRes = res.__m; + + for (short i = 0; i < 15; ++i, ++pRes) + { + *pRes *= rhs; + } + + return res; +} + +template inline LuaMat4 +LuaMat4::operator+(const LuaMat4 &rhs)const +{ + LuaMat4 res; + memset(res.__m, 0, 16*sizeof(T)); + T *pRes = res.__m; + const T* pAdd1 = __m; + const T* pAdd2 = rhs.__m; + + for (short i = 0; i < 15; ++i, ++pRes) + { + *pRes = *(pAdd1++) + *(pAdd2++); + } + + return res; +} + +template inline LuaMat4 +LuaMat4::operator-(void)const +{ + LuaMat4 res(*this); + T *pRes = res.__m; + + for (short i = 0; i < 15; ++i, ++pRes) + { + *pRes = -(*pRes); + } + + return res; +} + +template inline LuaMat4 +LuaMat4::operator-(const LuaMat4 &rhs)const +{ + return *this + (-rhs); +} + +template inline LuaMat4 & +LuaMat4::operator=(const LuaMat4 &rhs) +{ + memcpy(__m, rhs.__m, 16 * sizeof(T)); + return *this; +} + +template inline +LuaMat4::operator Matrix4(void)const +{ + Matrix4 res(__m[0], __m[1], __m[2], __m[3], + __m[4], __m[5], __m[6], __m[7], + __m[8], __m[9], __m[10], __m[11], + __m[12], __m[13], __m[14], __m[15]); + + return res; +} + + +} } } } // Tizen::Ui::Effects::_Utils + +#endif //_FUI_EFFECTS_INTERNAL_UTILS_LUA_MAT4_H_ diff --git a/src/ui/effects/inc/utils/FUiEffects_UtilsMatrix2.h b/src/ui/effects/inc/utils/FUiEffects_UtilsMatrix2.h new file mode 100644 index 0000000..a0a1949 --- /dev/null +++ b/src/ui/effects/inc/utils/FUiEffects_UtilsMatrix2.h @@ -0,0 +1,713 @@ +// +// 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 FUiEffects_UtilsMatrix2.h + * @brief The Matrix2 class + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_UTILS_MATRIX2_H_ +#define _FUI_EFFECTS_INTERNAL_UTILS_MATRIX2_H_ + +#include "FUiEffects_UtilsAdapterFunctions.h" + +namespace Tizen { namespace Ui { namespace Effects { namespace _Utils +{ + template class _Vector2; + template class Quaternion; + + template class Matrix2 + { + private: + typedef Matrix2 SelfType; + + public: + _Vector2 i; + _Vector2 j; + + inline Matrix2(); + inline explicit Matrix2(const T& aValue); + inline explicit Matrix2(const T* aValue); + inline Matrix2(const SelfType& aOther); + inline Matrix2(const _Vector2& aI, const _Vector2& aJ); + inline Matrix2(const T& a11, const T& a12, + const T& a21, const T& a22); + + inline SelfType& operator=(const SelfType& aRhv); + + inline SelfType& set(const T& aValue); + inline SelfType& set(const T* aValue); + inline SelfType& set(const SelfType& aOther); + inline SelfType& set(const _Vector2& aI, const _Vector2& aJ); + inline SelfType& set(const T& a11, const T& a12, + const T& a21, const T& a22); + + inline SelfType& identity(); + inline static const SelfType& getIdentity(); + inline bool isIdentity() const; + + inline SelfType operator-() const; + inline SelfType& inverse(); + inline SelfType getInversed() const; + inline SelfType& transpose(); + inline SelfType getTransposed() const; + + inline SelfType& operator+=(const SelfType& aRhv); + inline SelfType& operator+=(const T& aRhv); + inline SelfType& operator-=(const SelfType& aRhv); + inline SelfType& operator-=(const T& aRhv); + inline SelfType& operator*=(const SelfType& aRhv); + inline SelfType& operator*=(const T& aRhv); + inline SelfType& operator/=(const T& aRhv); + inline SelfType GetMultipliedByMember(const SelfType& aRhv) const; + inline SelfType& multiplyByMember(const SelfType& aRhv); + static inline SelfType createMultipliedByMember(const SelfType& aLhv, const SelfType& aRhv); + inline SelfType getDividedByMember(const SelfType& aRhv) const; + inline SelfType& divideByMember(const SelfType& aRhv); + static inline SelfType createDividedByMember(const SelfType& aLhv, const SelfType& aRhv); + + inline T* getPointer(); + inline const T* getPointer() const; + inline T& get(unsigned int aRow, unsigned int aColumn); + inline const T& get(unsigned int aRow, unsigned int aColumn) const; + inline T& get(unsigned int aAbsIndex); + inline const T& get(unsigned int aAbsIndex) const; + inline SelfType& set(unsigned int aRow, unsigned int aColumn, const T& aValue); + inline SelfType& set(unsigned int aAbsIndex, const T& aValue); + inline _Vector2& getRow(unsigned int aRow); + inline const _Vector2& getRow(unsigned int aRow) const; + inline SelfType& setRow(unsigned int aRow, const _Vector2& aValue); + inline _Vector2 getColumn(unsigned int aColumn) const; + inline SelfType& setColumn(unsigned int aColumn, const _Vector2& aValue); + inline T& operator()(unsigned int aRow, unsigned int aColumn); + inline const T& operator()(unsigned int aRow, unsigned int aColumn) const; + inline T& operator()(unsigned int aAbsIndex); + inline const T& operator()(unsigned int aAbsIndex) const; + inline T& operator[](unsigned int aAbsIndex); + inline const T& operator[](unsigned int aAbsIndex) const; + + inline SelfType& lerp(const SelfType& aTo, const T& aCoeff); + inline SelfType getLerped(const SelfType& aTo, const T& aCoeff) const; + inline SelfType& makeLerped(const SelfType& aFrom, const SelfType& aTo, const T& aCoeff); + static inline SelfType createLerped(const SelfType& aFrom, const SelfType& aTo, const T& aCoeff); + inline SelfType& slerp(const SelfType& aTo, const T& aCoeff); + inline SelfType getSlerped(const SelfType& aTo, const T& aCoeff) const; + inline SelfType& makeSlerped(const SelfType& aFrom, const SelfType& aTo, const T& aCoeff); + static inline SelfType createSlerped(const SelfType& aFrom, const SelfType& aTo, const T& aCoeff); + + inline T determinant() const; + + inline _Vector2& applyTransform(_Vector2& aVector) const; + inline _Vector2 getAppliedTransform(const _Vector2& aVector) const; + + inline SelfType& makeRotation(const T& aAngleRAD); + inline SelfType& rotate(const T& aAngleRAD); + static inline SelfType createRotation(const T& aAngleRAD); + inline T getRotationAngle() const; + + inline SelfType& makeScale(const T& aX, const T& aY); + inline SelfType& makeScale(const _Vector2& aScale); + static inline SelfType createScale(const T& aX, const T& aY); + static inline SelfType createScale(const _Vector2& aScale); + inline SelfType& scale(const T& aX, const T& aY); + inline SelfType& scale(const _Vector2& aScale); + }; + + typedef Matrix2 Mat2f; + typedef Matrix2 Mat2d; + + template inline Matrix2 operator+(const Matrix2& aLhv, const Matrix2& aRhv); + template inline Matrix2 operator+(const Matrix2& aLhv, const T& aRhv); + template inline Matrix2 operator+(const T& aLhv, const Matrix2& aRhv); + template inline Matrix2 operator-(const Matrix2& aLhv, const Matrix2& aRhv); + template inline Matrix2 operator-(const Matrix2& aLhv, const T& aRhv); + template inline Matrix2 operator-(const T& aLhv, const Matrix2& aRhv); + template inline Matrix2 operator*(const Matrix2& aLhv, const Matrix2& aRhv); + template inline Matrix2 operator*(const Matrix2& aLhv, const T& aRhv); + template inline Matrix2 operator*(const T& aLhv, const Matrix2& aRhv); + template inline _Vector2 operator*(const Matrix2& aLhv, const _Vector2& aRhv); + template inline _Vector2 operator*(const _Vector2& aLhv, const Matrix2& aRhv); + template inline Matrix2 operator/(const Matrix2& aLhv, const T& aRhv); + template inline bool operator==(const Matrix2& aLhv, const Matrix2& aRhv); + template inline bool operator==(const T& aLhv, const Matrix2& aRhv); + template inline bool operator==(const Matrix2& aLhv, const T& aRhv); + template inline bool operator!=(const Matrix2& aLhv, const Matrix2& aRhv); + template inline bool operator!=(const T& aLhv, const Matrix2& aRhv); + template inline bool operator!=(const Matrix2& aLhv, const T& aRhv); + + template Matrix2::Matrix2() {} + + template Matrix2::Matrix2(const T& aValue): + i(aValue), j(aValue) {} + + template Matrix2::Matrix2(const T* aValue): + i(aValue[0], aValue[1]), j(aValue[2], aValue[3]) {} + + template Matrix2::Matrix2(const Matrix2& aOther): + i(aOther.i), j(aOther.j) {} + + template Matrix2::Matrix2(const _Vector2& aI, const _Vector2& aJ): + i(aI), j(aJ) {} + + template Matrix2::Matrix2( const T& a11, const T& a12, + const T& a21, const T& a22): + i(a11, a12), j(a21, a22) {} + + template Matrix2& Matrix2::operator=(const Matrix2& aRhv) + { + i = aRhv.i; + j = aRhv.j; + return *this; + } + + template Matrix2& Matrix2::set(const T& aValue) + { + i.set(aValue); + j.set(aValue); + return *this; + } + + template Matrix2& Matrix2::set(const T* aValue) + { + i.set(aValue[0], aValue[1]); + j.set(aValue[2], aValue[3]); + return *this; + } + + template Matrix2& Matrix2::set(const Matrix2& aOther) + { + i = aOther.i; + j = aOther.j; + return *this; + } + + template Matrix2& Matrix2::set(const _Vector2& aI, const _Vector2& aJ) + { + i = aI; + j = aJ; + return *this; + } + + template Matrix2& Matrix2::set(const T& a11, const T& a12, const T& a21, const T& a22) + { + i.set(a11, a12); + j.set(a21, a22); + return *this; + } + + + template inline Matrix2& Matrix2::identity() + { + return operator=(getIdentity()); + } + + template inline const Matrix2& Matrix2::getIdentity() + { + static Matrix2 identityMatrix( + T(1.0f), T(0.0f), + T(0.0f), T(1.0f)); + return identityMatrix; + } + + template inline bool Matrix2::isIdentity() const + { + return *this == getIdentity(); + } + + template inline Matrix2 Matrix2::operator-() const + { + return Matrix2(-i, -j); + } + + template inline Matrix2& Matrix2::inverse() + { + static const T t0(0.0f); + static const T t1(1.0f); + + T s = determinant(); + if(EffectsEqual(s, t0)) + return *this; + T inv_det(t1 / s); + return set(j.y * inv_det, -i.y * inv_det, -j.x * inv_det, i.x * inv_det); + } + template inline Matrix2 Matrix2::getInversed() const + { + static const T t0(0.0f); + static const T t1(1.0f); + + T s = determinant(); + if(EffectsEqual(s, t0)) return *this; + T inv_det(t1 / s); + return Matrix2(j.y * inv_det, -i.y * inv_det, -j.x * inv_det, i.x * inv_det); + } + + template inline T Matrix2::determinant() const + { + return i.x * j.y - j.x * i.y; + } + + template inline Matrix2& Matrix2::transpose() + { + EffectsSwap(i.y, j.x); + return *this; + } + + template inline Matrix2 Matrix2::getTransposed() const + { + return Matrix2(i.x, j.x, i.y, j.y); + } + + template inline Matrix2& Matrix2::operator+=(const Matrix2& aRhv) + { + i += aRhv.i; + j += aRhv.j; + return *this; + } + template inline Matrix2& Matrix2::operator+=(const T& aRhv) + { + i += aRhv; + j += aRhv; + return *this; + } + template inline Matrix2& Matrix2::operator-=(const Matrix2& aRhv) + { + i -= aRhv.i; + j -= aRhv.j; + return *this; + } + template inline Matrix2& Matrix2::operator-=(const T& aRhv) + { + i -= aRhv; + j -= aRhv; + return *this; + } + template inline Matrix2& Matrix2::operator*=(const T& aRhv) + { + i *= aRhv; + j *= aRhv; + return *this; + } + + template inline Matrix2 Matrix2::GetMultipliedByMember(const Matrix2& aRhv) const + { + return Matrix2(i * aRhv.i, j * aRhv.j); + } + + template inline Matrix2& Matrix2::multiplyByMember(const Matrix2& aRhv) + { + i *= aRhv.i; + j *= aRhv.j; + return *this; + } + + template inline Matrix2 Matrix2::createMultipliedByMember(const Matrix2& aLhv, const Matrix2& aRhv) + { + return Matrix2(aLhv.i * aRhv.i, aLhv.j * aRhv.j); + } + + template inline Matrix2& Matrix2::operator*=(const Matrix2& aRhv) + { + set( + i.x * aRhv.i.x + i.y * aRhv.j.x, + i.x * aRhv.i.y + i.y * aRhv.j.y, + + j.x * aRhv.i.x + j.y * aRhv.j.x, + j.x * aRhv.i.y + j.y * aRhv.j.y); + return *this; + } + + template inline Matrix2 Matrix2::getDividedByMember(const Matrix2& aRhv) const + { + return Matrix2(i / aRhv.i, j / aRhv.j); + } + + template inline Matrix2& Matrix2::divideByMember(const Matrix2& aRhv) + { + i /= aRhv.i; + j /= aRhv.j; + return *this; + } + template inline Matrix2 Matrix2::createDividedByMember(const Matrix2& aLhv, const Matrix2& aRhv) + { + return Matrix2(aLhv.i / aRhv.i, aLhv.j / aRhv.j); + } + + template inline Matrix2& Matrix2::operator/=(const T& aRhv) + { + i /= aRhv; + j /= aRhv; + return *this; + } + + template inline T* Matrix2::getPointer() + { + return i.getPointer(); + } + + template inline const T* Matrix2::getPointer() const + { + return i.getPointer(); + } + + template inline T& Matrix2::get(unsigned int aRow, unsigned int aColumn) + { + return operator()(aRow, aColumn); + } + + template inline const T& Matrix2::get(unsigned int aRow, unsigned int aColumn) const + { + return operator()(aRow, aColumn); + } + + template inline T& Matrix2::get(unsigned int aAbsIndex) + { + return operator()(aAbsIndex); + } + + template inline const T& Matrix2::get(unsigned int aAbsIndex) const + { + return operator()(aAbsIndex); + } + + template inline _Vector2& Matrix2::getRow(unsigned int aRow) + { + if(1 == aRow) + return j; + return i; + } + + template inline const _Vector2& Matrix2::getRow(unsigned int aRow) const + { + if(1 == aRow) + return j; + return i; + } + + template inline _Vector2 Matrix2::getColumn(unsigned int aColumn) const + { + if(1 == aColumn) + return _Vector2(i.y, j.y); + return _Vector2(i.x, j.x); + } + + template inline T& Matrix2::operator()(unsigned int aRow, unsigned int aColumn) + { + return operator[]((aRow << 1) + aColumn); + } + + template inline const T& Matrix2::operator()(unsigned int aRow, unsigned int aColumn) const + { + return operator[]((aRow << 1) + aColumn); + } + + template inline T& Matrix2::operator()(unsigned int aAbsIndex) + { + return operator[](aAbsIndex); + } + + template inline const T& Matrix2::operator()(unsigned int aAbsIndex) const + { + return operator[](aAbsIndex); + } + + template inline T& Matrix2::operator[](unsigned int aAbsIndex) + { + return getPointer()[aAbsIndex]; + } + + template inline const T& Matrix2::operator[](unsigned int aAbsIndex) const + { + return getPointer()[aAbsIndex]; + } + + template inline Matrix2& Matrix2::setColumn(unsigned int aColumn, const _Vector2& aValue) + { + switch(aColumn) + { + case 0: + i.x = aValue.x; + j.x = aValue.y; + break; + case 1: + i.y = aValue.x; + j.y = aValue.y; + break; + } + + return *this; + } + + template inline Matrix2& Matrix2::setRow(unsigned int aRow, const _Vector2& aValue) + { + switch(aRow) + { + case 0: + i = aValue; + break; + case 1: + j = aValue; + break; + } + + return *this; + } + + template inline Matrix2& Matrix2::set(unsigned int aRow, unsigned int aColumn, const T& aValue) + { + operator()(aRow, aColumn) = aValue; + return *this; + } + + template inline Matrix2& Matrix2::set(unsigned int aAbsIndex, const T& aValue) + { + operator()(aAbsIndex) = aValue; + return *this; + } + + template inline Matrix2& Matrix2::lerp(const Matrix2& aTo, const T& aCoeff) + { + i.lerp(aTo.i, aCoeff); + j.lerp(aTo.j, aCoeff); + return *this; + } + + template inline Matrix2 Matrix2::getLerped(const Matrix2& aTo, const T& aCoeff) const + { + Matrix2 result(i.getLerped(aTo.i, aCoeff), j.getLerped(aTo.j, aCoeff)); + return result; + } + + template inline Matrix2& Matrix2::makeLerped(const Matrix2& aFrom, const Matrix2& aTo, const T& aCoeff) + { + i.makeLerped(aFrom.i, aTo.i, aCoeff); + j.makeLerped(aFrom.j, aTo.j, aCoeff); + return *this; + } + template inline Matrix2 Matrix2::createLerped(const Matrix2& aFrom, const Matrix2& aTo, const T& aCoeff) + { + return Matrix2().makeLerped(aFrom, aTo, aCoeff); + } + + template inline Matrix2& Matrix2::slerp(const Matrix2& aTo, const T& aCoeff) + { + makeRotation(effects_lerp(getRotationAngle(), aTo.getRotationAngle(), aCoeff)); + return *this; + } + + template inline Matrix2 Matrix2::getSlerped(const Matrix2& aTo, const T& aCoeff) const + { + Matrix2 result; + result.makeRotation(effects_lerp(getRotationAngle(), aTo.getRotationAngle(), aCoeff)); + return result; + } + + template inline Matrix2& Matrix2::makeSlerped(const Matrix2& aFrom, const Matrix2& aTo, const T& aCoeff) + { + makeRotation(effects_lerp(aFrom.getRotationAngle(), aTo.getRotationAngle(), aCoeff)); + return *this; + } + + template inline Matrix2 Matrix2::createSlerped(const Matrix2& aFrom, const Matrix2& aTo, const T& aCoeff) + { + return Matrix2().makeSlerped(aFrom, aTo, aCoeff); + } + + template inline Matrix2& Matrix2::makeRotation(const T& aAngleRAD) + { + const T s = effects_sin(aAngleRAD); + const T c = effects_cos(aAngleRAD); + i.x = c; + i.y = s; + j.x = -s; + j.y = c; + return *this; + } + + template inline Matrix2& Matrix2::rotate(const T& aAngleRAD) + { + const T s = effects_sin(aAngleRAD); + const T c = effects_cos(aAngleRAD); + const T ix = i.x * c - i.y * s; + const T iy = i.x * s + i.y * c; + const T jx = j.x * c - j.y * s; + const T jy = j.x * s + j.y * c; + i.x = ix; + i.y = iy; + j.x = jx; + j.y = jy; + return *this; + } + template inline Matrix2 Matrix2::createRotation(const T& aAngleRAD) + { + return Matrix2().makeRotation(aAngleRAD); + } + + template inline T Matrix2::getRotationAngle() const + { + static const T t0(0.0f); + static const T t1(1.0f); + + static const _Vector2 orig_vector(t1, t0); + static const _Vector2 orig_vector_cross(t0, t1); + + _Vector2 rotated(getAppliedTransform(orig_vector).normalize()); + const T angleCos = effects_clamp(rotated.dot(orig_vector), -t1, t1); + const T angleCosCross = effects_clamp(rotated.dot(orig_vector_cross), -t1, t1); + + if(angleCosCross > t0) + return effects_acos(angleCos); + return -effects_acos(angleCos); + } + + template inline Matrix2& Matrix2::makeScale(const T& aX, const T& aY) + { + i.x = aX; + j.y = aY; + + i.y = j.x = T(0.0f); + return *this; + } + template inline Matrix2& Matrix2::makeScale(const _Vector2& aScale) + { + return makeScale(aScale.x, aScale.y); + } + template inline Matrix2 Matrix2::createScale(const T& aX, const T& aY) + { + return Matrix2().makeScale(aX, aY); + } + template inline Matrix2 Matrix2::createScale(const _Vector2& aScale) + { + return Matrix2().makeScale(aScale); + } + + template inline Matrix2& Matrix2::scale(const T& aX, const T& aY) + { + i.x *= aX; i.y *= aY; + j.x *= aX; j.y *= aY; + + return *this; + } + template inline Matrix2& Matrix2::scale(const _Vector2& aScale) + { + return scale(aScale.x, aScale.y); + } + + template inline _Vector2& Matrix2::applyTransform(_Vector2& aVector) const + { + return aVector.set( + aVector.x * i.x + aVector.y * j.x, + aVector.x * i.y + aVector.y * j.y); + } + + template inline _Vector2 Matrix2::getAppliedTransform(const _Vector2& aVector) const + { + return _Vector2( + aVector.x * i.x + aVector.y * j.x, + aVector.x * i.y + aVector.y * j.y); + } + + template inline bool isEqual(const Matrix2& aLhv, const Matrix2& aRhv, const T& aEpsilon = effects_epsilon::epsilon()) + { + return isEqual(aLhv.i, aRhv.i, aEpsilon) && isEqual(aLhv.j, aRhv.j, aEpsilon); + } + template inline Matrix2 operator+(const Matrix2& aLhv, const Matrix2& aRhv) + { + return Matrix2(aLhv.i + aRhv.i, aLhv.j + aRhv.j); + } + template inline Matrix2 operator+(const Matrix2& aLhv, const T& aRhv) + { + return Matrix2(aLhv.i + aRhv, aLhv.j + aRhv); + } + template inline Matrix2 operator+(const T& aLhv, const Matrix2& aRhv) + { + return Matrix2(aLhv + aRhv.i, aLhv + aRhv.j); + } + template inline Matrix2 operator-(const Matrix2& aLhv, const Matrix2& aRhv) + { + return Matrix2(aLhv.i - aRhv.i, aLhv.j - aRhv.j); + } + template inline Matrix2 operator-(const Matrix2& aLhv, const T& aRhv) + { + return Matrix2(aLhv.i - aRhv, aLhv.j - aRhv); + } + template inline Matrix2 operator-(const T& aLhv, const Matrix2& aRhv) + { + return Matrix2(aLhv - aRhv.i, aLhv - aRhv.j); + } + template inline Matrix2 operator*(const Matrix2& aLhv, const Matrix2& aRhv) + { + return Matrix2( + aLhv.i.x * aRhv.i.x + aLhv.i.y * aRhv.j.x, + aLhv.i.x * aRhv.i.y + aLhv.i.y * aRhv.j.y, + + aLhv.j.x * aRhv.i.x + aLhv.j.y * aRhv.j.x, + aLhv.j.x * aRhv.i.y + aLhv.j.y * aRhv.j.y); + } + template inline Matrix2 operator*(const Matrix2& aLhv, const T& aRhv) + { + return Matrix2(aLhv.i * aRhv, aLhv.j * aRhv); + } + template inline Matrix2 operator*(const T& aLhv, const Matrix2& aRhv) + { + return Matrix2(aLhv * aRhv.i, aLhv * aRhv.j); + } + template inline _Vector2 operator*(const _Vector2& aLhv, const Matrix2& aRhv) + { + return aRhv.getAppliedTransform(aLhv); + } + template inline _Vector2 operator*(const Matrix2& aLhv, const _Vector2& aRhv) + { + return _Vector2( + aLhv.i.x * aRhv.x + aLhv.i.y * aRhv.y, + aLhv.j.x * aRhv.x + aLhv.j.y * aRhv.y); + } + template inline Matrix2 operator/(const Matrix2& aLhv, const T& aRhv) + { + return Matrix2(aLhv.i / aRhv, aLhv.j / aRhv); + } + template inline Matrix2 operator/(const T& aLhv, const Matrix2& aRhv) + { + return Matrix2(aLhv / aRhv.i, aLhv / aRhv.j); + } + template inline bool operator==(const Matrix2& aLhv, const Matrix2& aRhv) + { + return aLhv.i == aRhv.i && aLhv.j == aRhv.j; + } + template inline bool operator==(const Matrix2& aLhv, const T& aRhv) + { + return aLhv.i == aRhv && aLhv.j == aRhv; + } + template inline bool operator==(const T& aLhv, const Matrix2& aRhv) + { + return aLhv == aRhv.i && aLhv == aRhv.j; + } + template inline bool operator!=(const Matrix2& aLhv, const Matrix2& aRhv) + { + return !(aLhv == aRhv); + } + template inline bool operator!=(const Matrix2& aLhv, const T& aRhv) + { + return !(aLhv == aRhv); + } + template inline bool operator!=(const T& aLhv, const Matrix2& aRhv) + { + return !(aLhv == aRhv); + } +} } } } //Tizen::Ui::Effects::_Utils + +#endif //_FUI_EFFECTS_INTERNAL_UTILS_MATRIX2_H_ diff --git a/src/ui/effects/inc/utils/FUiEffects_UtilsMatrix3.h b/src/ui/effects/inc/utils/FUiEffects_UtilsMatrix3.h new file mode 100644 index 0000000..8639416 --- /dev/null +++ b/src/ui/effects/inc/utils/FUiEffects_UtilsMatrix3.h @@ -0,0 +1,1136 @@ +// +// 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 FUiEffects_UtilsMatrix3.h + * @brief The Matrix3 class + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_UTILS_MATRIX3_H_ +#define _FUI_EFFECTS_INTERNAL_UTILS_MATRIX3_H_ + +#include "FUiEffects_UtilsAdapterFunctions.h" + +namespace Tizen { namespace Ui { namespace Effects { namespace _Utils +{ + template class _Vector3; + template class _Vector2; + template class Matrix2; + template class Quaternion; + + template class Matrix3 + { + private: + typedef Matrix3 SelfType; + + public: + _Vector3 i; + _Vector3 j; + _Vector3 k; + + inline Matrix3(); + inline explicit Matrix3(const T& aValue); + inline explicit Matrix3(const T* aValue); + inline Matrix3(const SelfType& aOther); + inline Matrix3(const _Vector3& aI, const _Vector3& aJ, const _Vector3& aC); + inline Matrix3(const _Vector2& aI, const _Vector2& aJ, const _Vector2& aC); + inline Matrix3(const T& a11, const T& a12, const T& a13, + const T& a21, const T& a22, const T& a23, + const T& a31, const T& a32, const T& a33); + + inline SelfType& operator=(const SelfType& aRhv); + + inline SelfType& set(const T& aValue); + inline SelfType& set(const T* aValue); + inline SelfType& set(const SelfType& aOther); + inline SelfType& set(const _Vector3& aI, const _Vector3& aJ, const _Vector3& aC); + inline SelfType& set(const _Vector2& aI, const _Vector2& aJ, const _Vector2& aC); + inline SelfType& set(const T& a11, const T& a12, const T& a13, + const T& a21, const T& a22, const T& a23, + const T& a31, const T& a32, const T& a33); + + inline SelfType& identity(); + inline static const SelfType& getIdentity(); + inline bool isIdentity() const; + + inline SelfType operator-() const; + inline SelfType& inverse(); + inline SelfType getInversed() const; + inline SelfType& transpose(); + inline SelfType getTransposed() const; + + inline SelfType& operator+=(const SelfType& aRhv); + inline SelfType& operator+=(const T& aRhv); + inline SelfType& operator-=(const SelfType& aRhv); + inline SelfType& operator-=(const T& aRhv); + inline SelfType& operator*=(const SelfType& aRhv); + inline SelfType& operator*=(const T& aRhv); + inline SelfType& operator/=(const T& aRhv); + inline SelfType GetMultipliedByMember(const SelfType& aRhv) const; + static inline SelfType createMultipliedByMember(const SelfType& aLhv, const SelfType& aRhv); + inline SelfType& multiplyByMember(const SelfType& aRhv); + inline SelfType getDividedByMember(const SelfType& aRhv) const; + static inline SelfType createDividedByMember(const SelfType& aLhv, const SelfType& aRhv); + inline SelfType& divideByMember(const SelfType& aRhv); + + inline T* getPointer(); + inline const T* getPointer() const; + inline T& get(unsigned int aRow, unsigned int aColumn); + inline const T& get(unsigned int aRow, unsigned int aColumn) const; + inline T& get(unsigned int aAbsIndex); + inline const T& get(unsigned int aAbsIndex) const; + inline SelfType& set(unsigned int aRow, unsigned int aColumn, const T& aValue); + inline SelfType& set(unsigned int aAbsIndex, const T& aValue); + inline _Vector3& getRow(unsigned int aRow); + inline const _Vector3& getRow(unsigned int aRow) const; + inline SelfType& setRow(unsigned int aRow, const _Vector3& aValue); + inline _Vector3 getColumn(unsigned int aColumn) const; + inline SelfType& setColumn(unsigned int aColumn, const _Vector3& aValue); + inline T& operator()(unsigned int aRow, unsigned int aColumn); + inline const T& operator()(unsigned int aRow, unsigned int aColumn) const; + inline T& operator()(unsigned int aAbsIndex); + inline const T& operator()(unsigned int aAbsIndex) const; + inline T& operator[](unsigned int aAbsIndex); + inline const T& operator[](unsigned int aAbsIndex) const; + + inline SelfType& lerp(const SelfType& aTo, const T& aCoeff); + inline SelfType getLerped(const SelfType& aTo, const T& aCoeff) const; + inline SelfType& makeLerped(const SelfType& aFrom, const SelfType& aTo, const T& aCoeff); + static inline SelfType createLerped(const SelfType& aFrom, const SelfType& aTo, const T& aCoeff); + inline SelfType& slerp(const SelfType& aTo, const T& aCoeff); + inline SelfType getSlerped(const SelfType& aTo, const T& aCoeff) const; + inline SelfType& makeSlerped(const SelfType& aFrom, const SelfType& aTo, const T& aCoeff); + static inline SelfType createSlerped(const SelfType& aFrom, const SelfType& aTo, const T& aCoeff); + + inline T determinant() const; + + inline _Vector3& applyTransform(_Vector3& aVector) const; + inline _Vector3 getAppliedTransform(const _Vector3& aVector) const; + inline _Vector3& applyRotation(_Vector3& aVector) const; + inline _Vector3 getAppliedRotation(const _Vector3& aVector) const; + inline _Vector3& applyTranslate(_Vector3& aVector) const; + inline _Vector3 getAppliedTranslate(const _Vector3& aVector) const; + + inline _Vector2& applyTransform(_Vector2& aVector) const; + inline _Vector2 getAppliedTransform(const _Vector2& aVector) const; + inline _Vector2& applyRotation(_Vector2& aVector) const; + inline _Vector2 getAppliedRotation(const _Vector2& aVector) const; + inline _Vector2& applyTranslate(_Vector2& aVector) const; + inline _Vector2 getAppliedTranslate(const _Vector2& aVector) const; + + inline SelfType& setRotation(const T& aAngleRAD); + inline SelfType& setRotation(const Matrix2& aRotation); + inline SelfType& setRotation(const Matrix3& aRotation); + inline SelfType& makeRotation(const T& aAngleRAD); + inline SelfType& makeRotation(const Matrix2& aRotation); + inline SelfType& makeRotation(const Matrix3& aRotation); + inline SelfType& rotate(const T& aAngleRAD); + inline SelfType& rotate(const Matrix2& aRotation); + inline SelfType& rotate(const Matrix3& aRotation); + static inline SelfType createRotation(const T& aAngleRAD); + static inline SelfType createRotation(const Matrix2& aRotation); + static inline SelfType createRotation(const Matrix3& aRotation); + inline Matrix2 getRotation() const; + inline T getRotationAngle() const; + + inline SelfType& makeScale(const T& aX, const T& aY); + inline SelfType& makeScale(const _Vector2& aScale); + inline SelfType& setScale(const T& aX, const T& aY); + inline SelfType& setScale(const _Vector2& aScale); + static inline SelfType createScale(const T& aX, const T& aY); + static inline SelfType createScale(const _Vector2& aScale); + inline SelfType& scale(const T& aX, const T& aY); + inline SelfType& scale(const _Vector2& aScale); + + inline SelfType& setTranslation(const T& aX, const T& aY); + inline SelfType& setTranslation(const _Vector2& aTran); + inline SelfType& makeTranslation(const T& aX, const T& aY); + inline SelfType& makeTranslation(const _Vector2& aTran); + inline SelfType& translate(const T& aX, const T& aY); + inline SelfType& translate(const _Vector2& aTran); + static inline SelfType createTranslation(const T& aX, const T& aY); + static inline SelfType createTranslation(const _Vector2& aTran); + inline _Vector2 getTranslation() const; + inline _Vector3 getFullTranslation() const; + + inline T magnitude() const; + inline T magnitude_sqr() const; + inline T trace() const; + inline Matrix2 minorMatrix(int row, int column) const; + inline SelfType& makeCross(const _Vector3& aVector); + static inline SelfType createCross(const _Vector3& aVector); + + inline const SelfType& QR_Decomposition(SelfType& aQ, SelfType& aR) const; + }; + + typedef Matrix3 Mat3f; + typedef Matrix3 Mat3d; + + template inline Matrix3 operator+(const Matrix3& aLhv, const Matrix3& aRhv); + template inline Matrix3 operator+(const Matrix3& aLhv, const T& aRhv); + template inline Matrix3 operator+(const T& aLhv, const Matrix3& aRhv); + template inline Matrix3 operator-(const Matrix3& aLhv, const Matrix3& aRhv); + template inline Matrix3 operator-(const Matrix3& aLhv, const T& aRhv); + template inline Matrix3 operator-(const T& aLhv, const Matrix3& aRhv); + template inline Matrix3 operator*(const Matrix3& aLhv, const Matrix3& aRhv); + template inline Matrix3 operator*(const Matrix3& aLhv, const T& aRhv); + template inline Matrix3 operator*(const T& aLhv, const Matrix3& aRhv); + template inline _Vector3 operator*(const Matrix3& aLhv, const _Vector3& aRhv); + template inline _Vector3 operator*(const _Vector3& aLhv, const Matrix3& aRhv); + template inline _Vector2 operator*(const Matrix3& aLhv, const _Vector2& aRhv); + template inline _Vector2 operator*(const _Vector2& aLhv, const Matrix3& aRhv); + template inline Matrix3 operator/(const Matrix3& aLhv, const T& aRhv); + template inline Matrix3 operator/(const T& aLhv, const Matrix3& aRhv); + template inline bool operator==(const Matrix3& aLhv, const Matrix3& aRhv); + template inline bool operator==(const T& aLhv, const Matrix3& aRhv); + template inline bool operator==(const Matrix3& aLhv, const T& aRhv); + template inline bool operator!=(const Matrix3& aLhv, const Matrix3& aRhv); + template inline bool operator!=(const T& aLhv, const Matrix3& aRhv); + template inline bool operator!=(const Matrix3& aLhv, const T& aRhv); + + template Matrix3::Matrix3() {} + + template Matrix3::Matrix3(const T& aValue): + i(aValue), j(aValue), k(aValue) {} + + template Matrix3::Matrix3(const T* aValue): + i(aValue[0], aValue[1], aValue[2]), j(aValue[3], aValue[4], aValue[5]), k(aValue[6], aValue[7], aValue[8]) {} + + template Matrix3::Matrix3(const Matrix3& aOther): + i(aOther.i), j(aOther.j), k(aOther.k) {} + + template Matrix3::Matrix3(const _Vector3& aI, const _Vector3& aJ, const _Vector3& aK): + i(aI), j(aJ), k(aK) {} + + template Matrix3::Matrix3(const _Vector2& aI, const _Vector2& aJ, const _Vector2& aK): + i(aI, T(0.0f)), j(aJ, T(0.0f)), k(aK, T(1.0f)) {} + + template Matrix3::Matrix3(const T& a11, const T& a12, const T& a13, + const T& a21, const T& a22, const T& a23, + const T& a31, const T& a32, const T& a33): + i(a11, a12, a13), j(a21, a22, a23), k(a31, a32, a33) {} + + + template Matrix3& Matrix3::operator=(const Matrix3& aRhv) + { + i = aRhv.i; + j = aRhv.j; + k = aRhv.k; + return *this; + } + + template Matrix3& Matrix3::set(const T& aValue) + { + i.set(aValue); + j.set(aValue); + k.set(aValue); + return *this; + } + + template Matrix3& Matrix3::set(const T* aValue) + { + i.set(aValue[0], aValue[1], aValue[2]); + j.set(aValue[3], aValue[4], aValue[5]); + k.set(aValue[6], aValue[7], aValue[8]); + return *this; + } + + template Matrix3& Matrix3::set(const Matrix3& aOther) + { + i = aOther.i; + j = aOther.j; + k = aOther.k; + return *this; + } + + template Matrix3& Matrix3::set(const _Vector3& aI, const _Vector3& aJ, const _Vector3& aK) + { + i = aI; + j = aJ; + k = aK; + return *this; + } + + template Matrix3& Matrix3::set(const _Vector2& aI, const _Vector2& aJ, const _Vector2& aK) + { + i.set(aI, T(0.0f)); + j.set(aJ, T(0.0f)); + k.set(aK, T(1.0f)); + return *this; + } + + template Matrix3& Matrix3::set(const T& a11, const T& a12, const T& a13, + const T& a21, const T& a22, const T& a23, + const T& a31, const T& a32, const T& a33) + { + i.set(a11, a12, a13); + j.set(a21, a22, a23); + k.set(a31, a32, a33); + return *this; + } + + template inline Matrix3& Matrix3::identity() + { + return operator=(getIdentity()); + } + + template inline const Matrix3& Matrix3::getIdentity() + { + static Matrix3 identityMatrix( + T(1.0f), T(0.0f), T(0.0f), + T(0.0f), T(1.0f), T(0.0f), + T(0.0f), T(0.0f), T(1.0f)); + return identityMatrix; + } + + template inline bool Matrix3::isIdentity() const + { + return *this == getIdentity(); + } + + template inline Matrix3 Matrix3::operator-() const + { + return Matrix3(-i, -j, -k); + } + + template inline Matrix3& Matrix3::inverse() + { + static const T t0(0.0f); + static const T t1(1.0f); + + T s = determinant(); + if(EffectsEqual(s, t0)) return *this; + T inv_det(t1 / s); + return set( (j.y * k.z - k.y * j.z) * inv_det, -(i.y * k.z - k.y * i.z) * inv_det, (i.y * j.z - j.y * i.z) * inv_det, + -(j.x * k.z - k.x * j.z) * inv_det, (i.x * k.z - k.x * i.z) * inv_det, -(i.x * j.z - j.x * i.z) * inv_det, + (j.x * k.y - k.x * j.y) * inv_det, -(i.x * k.y - k.x * i.y) * inv_det, (i.x * j.y - j.x * i.y) * inv_det); + } + template inline Matrix3 Matrix3::getInversed() const + { + static const T t0(0.0f); + static const T t1(1.0f); + + T s = determinant(); + if(EffectsEqual(s, t0)) return *this; + T inv_det(t1 / s); + return Matrix3( (j.y * k.z - k.y * j.z) * inv_det, -(i.y * k.z - k.y * i.z) * inv_det, (i.y * j.z - j.y * i.z) * inv_det, + -(j.x * k.z - k.x * j.z) * inv_det, (i.x * k.z - k.x * i.z) * inv_det, -(i.x * j.z - j.x * i.z) * inv_det, + (j.x * k.y - k.x * j.y) * inv_det, -(i.x * k.y - k.x * i.y) * inv_det, (i.x * j.y - j.x * i.y) * inv_det); + } + + template inline T Matrix3::determinant() const + { + return + i.x * (j.y * k.z - j.z * k.y) + - i.y * (j.x * k.z - j.z * k.x) + + i.z * (j.x * k.y - j.y * k.x); + } + + template inline Matrix3& Matrix3::transpose() + { + EffectsSwap(i.y, j.x); + EffectsSwap(i.z, k.x); + EffectsSwap(j.z, k.y); + return *this; + } + + template inline Matrix3 Matrix3::getTransposed() const + { + return Matrix3( i.x, j.x, k.x, + i.y, j.y, k.y, + i.z, j.z, k.z); + } + + template inline T* Matrix3::getPointer() + { + return i.getPointer(); + } + + template inline const T* Matrix3::getPointer() const + { + return i.getPointer(); + } + + template inline T& Matrix3::get(unsigned int aRow, unsigned int aColumn) + { + return operator()(aRow, aColumn); + } + + template inline const T& Matrix3::get(unsigned int aRow, unsigned int aColumn) const + { + return operator()(aRow, aColumn); + } + + template inline T& Matrix3::get(unsigned int aAbsIndex) + { + return operator()(aAbsIndex); + } + + template inline const T& Matrix3::get(unsigned int aAbsIndex) const + { + return operator()(aAbsIndex); + } + + template inline _Vector3& Matrix3::getRow(unsigned int aRow) + { + switch(aRow) + { + case 1: + return j; + case 2: + return k; + } + return i; + } + + template inline const _Vector3& Matrix3::getRow(unsigned int aRow) const + { + switch(aRow) + { + case 1: + return j; + case 2: + return k; + } + return i; + } + + template inline _Vector3 Matrix3::getColumn(unsigned int aColumn) const + { + switch(aColumn) + { + case 1: + return _Vector3(i.y, j.y, k.y); + case 2: + return _Vector3(i.z, j.z, k.z); + } + + return _Vector3(i.x, j.x, k.x); + } + + template inline T& Matrix3::operator()(unsigned int aRow, unsigned int aColumn) + { + return operator[]((aRow * 3) + aColumn); + } + + template inline const T& Matrix3::operator()(unsigned int aRow, unsigned int aColumn) const + { + return operator[]((aRow * 3) + aColumn); + } + + template inline T& Matrix3::operator()(unsigned int aAbsIndex) + { + return operator[](aAbsIndex); + } + + template inline const T& Matrix3::operator()(unsigned int aAbsIndex) const + { + return operator[](aAbsIndex); + } + + template inline T& Matrix3::operator[](unsigned int aAbsIndex) + { + return getPointer()[aAbsIndex]; + } + + template inline const T& Matrix3::operator[](unsigned int aAbsIndex) const + { + return getPointer()[aAbsIndex]; + } + + template inline Matrix3& Matrix3::setColumn(unsigned int aColumn, const _Vector3& aValue) + { + switch(aColumn) + { + case 0: + i.x = aValue.x; + j.x = aValue.y; + k.x = aValue.z; + break; + case 1: + i.y = aValue.x; + j.y = aValue.y; + k.y = aValue.z; + break; + case 2: + i.z = aValue.x; + j.z = aValue.y; + k.z = aValue.z; + break; + } + + return *this; + } + + template inline Matrix3& Matrix3::setRow(unsigned int aRow, const _Vector3& aValue) + { + switch(aRow) + { + case 0: + i = aValue; + break; + case 1: + j = aValue; + break; + case 2: + k = aValue; + break; + } + + return *this; + } + + template inline Matrix3& Matrix3::set(unsigned int aRow, unsigned int aColumn, const T& aValue) + { + operator()(aRow, aColumn) = aValue; + return *this; + } + + template inline Matrix3& Matrix3::set(unsigned int aAbsIndex, const T& aValue) + { + operator()(aAbsIndex) = aValue; + return *this; + } + + + + template inline Matrix3& Matrix3::operator+=(const Matrix3& aRhv) + { + i += aRhv.i; + j += aRhv.j; + k += aRhv.k; + return *this; + } + template inline Matrix3& Matrix3::operator+=(const T& aRhv) + { + i += aRhv; + j += aRhv; + k += aRhv; + return *this; + } + template inline Matrix3& Matrix3::operator-=(const Matrix3& aRhv) + { + i -= aRhv.i; + j -= aRhv.j; + k -= aRhv.k; + return *this; + } + template inline Matrix3& Matrix3::operator-=(const T& aRhv) + { + i -= aRhv; + j -= aRhv; + k -= aRhv; + return *this; + } + template inline Matrix3& Matrix3::operator*=(const T& aRhv) + { + i *= aRhv; + j *= aRhv; + k *= aRhv; + return *this; + } + + template inline Matrix3 Matrix3::GetMultipliedByMember(const Matrix3& aRhv) const + { + return Matrix3(i * aRhv.i, j * aRhv.j, k * aRhv.k); + } + + template inline Matrix3& Matrix3::multiplyByMember(const Matrix3& aRhv) + { + i *= aRhv.i; + j *= aRhv.j; + k *= aRhv.k; + return *this; + } + + template inline Matrix3 Matrix3::createMultipliedByMember(const Matrix3& aLhv, const Matrix3& aRhv) + { + return Matrix3(aLhv.i * aRhv.i, aLhv.j * aRhv.j, aLhv.k * aRhv.k); + } + + template inline Matrix3& Matrix3::operator*=(const Matrix3& aRhv) + { + set( + i.x * aRhv.i.x + i.y * aRhv.j.x + i.z * aRhv.k.x, + i.x * aRhv.i.y + i.y * aRhv.j.y + i.z * aRhv.k.y, + i.x * aRhv.i.z + i.y * aRhv.j.z + i.z * aRhv.k.z, + + j.x * aRhv.i.x + j.y * aRhv.j.x + j.z * aRhv.k.x, + j.x * aRhv.i.y + j.y * aRhv.j.y + j.z * aRhv.k.y, + j.x * aRhv.i.z + j.y * aRhv.j.z + j.z * aRhv.k.z, + + k.x * aRhv.i.x + k.y * aRhv.j.x + k.z * aRhv.k.x, + k.x * aRhv.i.y + k.y * aRhv.j.y + k.z * aRhv.k.y, + k.x * aRhv.i.z + k.y * aRhv.j.z + k.z * aRhv.k.z); + return *this; + } + + template inline Matrix3 Matrix3::getDividedByMember(const Matrix3& aRhv) const + { + return Matrix3(i / aRhv.i, j / aRhv.j, k / aRhv.k); + } + + template inline Matrix3& Matrix3::divideByMember(const Matrix3& aRhv) + { + i /= aRhv.i; + j /= aRhv.j; + k /= aRhv.k; + return *this; + } + template inline Matrix3 Matrix3::createDividedByMember(const Matrix3& aLhv, const Matrix3& aRhv) + { + return Matrix3(aLhv.i / aRhv.i, aLhv.j / aRhv.j, aLhv.k / aRhv.k); + } + + template inline Matrix3& Matrix3::operator/=(const T& aRhv) + { + i /= aRhv; + j /= aRhv; + k /= aRhv; + return *this; + } + + + + template inline _Vector3& Matrix3::applyTransform(_Vector3& aVector) const + { + return aVector.set( + aVector.x * i.x + aVector.y * j.x + aVector.z * k.x, + aVector.x * i.y + aVector.y * j.y + aVector.z * k.y, + aVector.x * i.z + aVector.y * j.z + aVector.z * k.z); + } + + template inline _Vector3 Matrix3::getAppliedTransform(const _Vector3& aVector) const + { + return _Vector3( + aVector.x * i.x + aVector.y * j.x + aVector.z * k.x, + aVector.x * i.y + aVector.y * j.y + aVector.z * k.y, + aVector.x * i.z + aVector.y * j.z + aVector.z * k.z); + } + + template inline _Vector3& Matrix3::applyRotation(_Vector3& aVector) const + { + return aVector.set( + aVector.x * i.x + aVector.y * j.x, + aVector.x * i.y + aVector.y * j.y, + aVector.z); + } + + template inline _Vector3 Matrix3::getAppliedRotation(const _Vector3& aVector) const + { + return _Vector3( + aVector.x * i.x + aVector.y * j.x, + aVector.x * i.y + aVector.y * j.y, + aVector.z); + } + + template inline _Vector3& Matrix3::applyTranslate(_Vector3& aVector) const + { + return aVector.set( + aVector.x + aVector.z * k.x, + aVector.y + aVector.z * k.y, + aVector.z); + } + + template inline _Vector3 Matrix3::getAppliedTranslate(const _Vector3& aVector) const + { + return _Vector3( + aVector.x + aVector.z * k.x, + aVector.y + aVector.z * k.y, + aVector.z); + } + + template inline _Vector2& Matrix3::applyTransform(_Vector2& aVector) const + { + return aVector.set( + aVector.x * i.x + aVector.y * j.x + k.x, + aVector.x * i.y + aVector.y * j.y + k.y); + } + + template inline _Vector2 Matrix3::getAppliedTransform(const _Vector2& aVector) const + { + return _Vector2( + aVector.x * i.x + aVector.y * j.x + k.x, + aVector.x * i.y + aVector.y * j.y + k.y); + } + + template inline _Vector2& Matrix3::applyRotation(_Vector2& aVector) const + { + return aVector.set( + aVector.x * i.x + aVector.y * j.x, + aVector.x * i.y + aVector.y * j.y); + } + + template inline _Vector2 Matrix3::getAppliedRotation(const _Vector2& aVector) const + { + return _Vector2( + aVector.x * i.x + aVector.y * j.x, + aVector.x * i.y + aVector.y * j.y); + } + + template inline _Vector2& Matrix3::applyTranslate(_Vector2& aVector) const + { + return aVector.set( + aVector.x + k.x, + aVector.y + k.y); + } + + template inline _Vector2 Matrix3::getAppliedTranslate(const _Vector2& aVector) const + { + return _Vector2( + aVector.x + k.x, + aVector.y + k.y); + } + + template inline Matrix3& Matrix3::setRotation(const T& aAngleRAD) + { + const T s = effects_sin(aAngleRAD); + const T c = effects_cos(aAngleRAD); + i.x = c; + i.y = s; + j.x = -s; + j.y = c; + return *this; + } + template inline Matrix3& Matrix3::setRotation(const Matrix2& aRotation) + { + i.x = aRotation.i.x; + i.y = aRotation.i.y; + j.x = aRotation.j.x; + j.y = aRotation.j.y; + return *this; + } + template inline Matrix3& Matrix3::setRotation(const Matrix3& aRotation) + { + i.x = aRotation.i.x; + i.y = aRotation.i.y; + j.x = aRotation.j.x; + j.y = aRotation.j.y; + return *this; + } + template inline Matrix3& Matrix3::makeRotation(const T& aAngleRAD) + { + identity(); + return setRotation(aAngleRAD); + } + template inline Matrix3& Matrix3::makeRotation(const Matrix2& aRotation) + { + identity(); + return setRotation(aRotation); + } + template inline Matrix3& Matrix3::makeRotation(const Matrix3& aRotation) + { + identity(); + return setRotation(aRotation); + } + template inline Matrix3& Matrix3::rotate(const T& aAngleRAD) + { + const T s = effects_sin(aAngleRAD); + const T c = effects_cos(aAngleRAD); + const T ix = i.x * c - i.y * s; + const T iy = i.x * s + i.y * c; + const T jx = j.x * c - j.y * s; + const T jy = j.x * s + j.y * c; + i.x = ix; + i.y = iy; + j.x = jx; + j.y = jy; + return *this; + } + template inline Matrix3& Matrix3::rotate(const Matrix2& aRotation) + { + const T ix = i.x * aRotation.i.x + i.y * aRotation.j.x; + const T iy = i.x * aRotation.i.y + i.y * aRotation.j.y; + const T jx = j.x * aRotation.i.x + j.y * aRotation.j.x; + const T jy = j.x * aRotation.i.y + j.y * aRotation.j.y; + i.x = ix; + i.y = iy; + j.x = jx; + j.y = jy; + return *this; + } + template inline Matrix3& Matrix3::rotate(const Matrix3& aRotation) + { + const T ix = i.x * aRotation.i.x + i.y * aRotation.j.x; + const T iy = i.x * aRotation.i.y + i.y * aRotation.j.y; + const T jx = j.x * aRotation.i.x + j.y * aRotation.j.x; + const T jy = j.x * aRotation.i.y + j.y * aRotation.j.y; + i.x = ix; + i.y = iy; + j.x = jx; + j.y = jy; + return *this; + } + template inline Matrix3 Matrix3::createRotation(const T& aAngleRAD) + { + return Matrix3().makeRotation(aAngleRAD); + } + template inline Matrix3 Matrix3::createRotation(const Matrix2& aRotation) + { + return Matrix3().makeRotation(aRotation); + } + template inline Matrix3 Matrix3::createRotation(const Matrix3& aRotation) + { + return Matrix3().makeRotation(aRotation); + } + template inline Matrix2 Matrix3::getRotation() const + { + return Matrix2(i.x, i.y, j.x, j.y); + } + template inline T Matrix3::getRotationAngle() const + { + static const T t0(0.0f); + static const T t1(1.0f); + + static const _Vector2 orig_vector(t1, t0); + static const _Vector2 orig_vector_cross(t0, t1); + + _Vector2 rotated(getAppliedRotation(orig_vector).normalize()); + const T angleCos = effects_clamp(rotated.dot(orig_vector), -t1, t1); + const T angleCosCross = effects_clamp(rotated.dot(orig_vector_cross), -t1, t1); + + if(angleCosCross > t0) + return effects_acos(angleCos); + return -effects_acos(angleCos); + } + + template inline Matrix3& Matrix3::makeScale(const T& aX, const T& aY) + { + identity(); + return setScale(aX, aY); + } + template inline Matrix3& Matrix3::makeScale(const _Vector2& aScale) + { + return makeScale(aScale.x, aScale.y); + } + template inline Matrix3 Matrix3::createScale(const T& aX, const T& aY) + { + return Matrix3().makeScale(aX, aY); + } + template inline Matrix3 Matrix3::createScale(const _Vector2& aScale) + { + return Matrix3().makeScale(aScale); + } + template inline Matrix3& Matrix3::setScale(const T& aX, const T& aY) + { + i.x = aX; + j.y = aY; + + i.y = j.x = T(0.0f); + return *this; + } + template inline Matrix3& Matrix3::setScale(const _Vector2& aScale) + { + return setScale(aScale.x, aScale.y); + } + template inline Matrix3& Matrix3::scale(const T& aX, const T& aY) + { + i.x *= aX; i.y *= aY; + j.x *= aX; j.y *= aY; + + return *this; + } + template inline Matrix3& Matrix3::scale(const _Vector2& aScale) + { + return scale(aScale.x, aScale.y); + } + + template inline Matrix3& Matrix3::setTranslation(const T& aX, const T& aY) + { + k.x = aX; + k.y = aY; + return *this; + } + template inline Matrix3& Matrix3::setTranslation(const _Vector2& aTran) + { + return setTranslation(aTran.x, aTran.y); + } + template inline Matrix3& Matrix3::makeTranslation(const T& aX, const T& aY) + { + identity(); + return setTranslation(aX, aY); + } + template inline Matrix3& Matrix3::makeTranslation(const _Vector2& aTran) + { + return makeTranslation(aTran.x, aTran.y); + } + template inline Matrix3 Matrix3::createTranslation(const T& aX, const T& aY) + { + return Matrix3().makeTranslation(aX, aY); + } + template inline Matrix3 Matrix3::createTranslation(const _Vector2& aTran) + { + return Matrix3().makeTranslation(aTran); + } + template inline Matrix3& Matrix3::translate(const T& aX, const T& aY) + { + k.x += aX; + k.y += aY; + return *this; + } + template inline Matrix3& Matrix3::translate(const _Vector2& aTran) + { + return translate(aTran.x, aTran.y); + } + template inline _Vector2 Matrix3::getTranslation() const + { + return k.swizzle(0, 1); + } + template inline _Vector3 Matrix3::getFullTranslation() const + { + return k; + } + + template inline Matrix3& Matrix3::lerp(const Matrix3& aTo, const T& aCoeff) + { + i.lerp(aTo.i, aCoeff); + j.lerp(aTo.j, aCoeff); + k.lerp(aTo.k, aCoeff); + return *this; + } + + template inline Matrix3 Matrix3::getLerped(const Matrix3& aTo, const T& aCoeff) const + { + Matrix3 result(i.getLerped(aTo.i, aCoeff), + j.getLerped(aTo.j, aCoeff), + k.getLerped(aTo.k, aCoeff)); + return result; + } + + template inline Matrix3& Matrix3::makeLerped(const Matrix3& aFrom, const Matrix3& aTo, const T& aCoeff) + { + i.makeLerped(aFrom.i, aTo.i, aCoeff); + j.makeLerped(aFrom.j, aTo.j, aCoeff); + k.makeLerped(aFrom.k, aTo.k, aCoeff); + return *this; + } + template inline Matrix3 Matrix3::createLerped(const Matrix3& aFrom, const Matrix3& aTo, const T& aCoeff) + { + return Matrix3().makeLerped(aFrom, aTo, aCoeff); + } + + template inline Matrix3& Matrix3::slerp(const Matrix3& aTo, const T& aCoeff) + { + setRotation(effects_lerp(getRotationAngle(), aTo.getRotationAngle(), aCoeff)); + k.lerp(aTo.k, aCoeff); + return *this; + } + + template inline Matrix3 Matrix3::getSlerped(const Matrix3& aTo, const T& aCoeff) const + { + Matrix3 result; + result.makeRotation(effects_lerp(getRotationAngle(), aTo.getRotationAngle(), aCoeff)); + result.k = k.getLerped(aTo.k, aCoeff); + return result; + } + + template inline Matrix3& Matrix3::makeSlerped(const Matrix3& aFrom, const Matrix3& aTo, const T& aCoeff) + { + makeRotation(effects_lerp(aFrom.getRotationAngle(), aTo.getRotationAngle(), aCoeff)); + k.makeLerped(aFrom.k, aTo.k, aCoeff); + return *this; + } + + template inline Matrix3 Matrix3::createSlerped(const Matrix3& aFrom, const Matrix3& aTo, const T& aCoeff) + { + return Matrix3().makeSlerped(aFrom, aTo, aCoeff); + } + + template inline T Matrix3::magnitude_sqr() const + { + return i.dot(i) + j.dot(j) + k.dot(k); + } + template inline T Matrix3::magnitude() const + { + return effects_sqrt(magnitude_sqr()); + } + template inline T Matrix3::trace() const + { + return i.x + j.y + k.z; + } + template inline Matrix2 Matrix3::minorMatrix(int row, int column) const + { + Matrix2 result; + + int row_counter = 0; + int column_counter = 0; + for(int current_row = 0; 3 > current_row; ++current_row) + { + if(current_row == row) + continue; + + column_counter = 0; + for(int current_column = 0; 3 > current_column; ++current_column) + { + if(current_column == column) + continue; + + result(row_counter, column_counter) = this->operator()(current_row, current_column); + ++column_counter; + } + ++row_counter; + } + return result; + } + template inline Matrix3& Matrix3::makeCross(const _Vector3& aVector) + { + static const T t0(0.0f); + + return set( t0, -aVector.z, aVector.y, + aVector.z, t0, -aVector.x, + -aVector.y, aVector.x, t0); + } + template inline Matrix3 Matrix3::createCross(const _Vector3& aVector) + { + return Matrix3().makeCross(aVector); + } + + template inline const Matrix3& Matrix3::QR_Decomposition(Matrix3& aQ, Matrix3& aR) const + { + aR.set(0, 0, 0, 0, 0, 0, 0, 0, 0); + + aQ = *this; + + for (int k = 0; k < 3; ++k) + { + for (int i = 0; i < k; ++i) + { + _Vector3 v1 = aQ.getColumn(i); + _Vector3 v2 = aQ.getColumn(k); + aR(i, k) = v1.dot(v2); + + _Vector3 v3 = aR(i, k) * v1; + _Vector3 v4 = v2 - v3; + aQ.setColumn(k, v4); + } + + _Vector3 qv1 = aQ.getColumn(k); + aR(k, k) = qv1.length(); + + _Vector3 qv2 = qv1 / aR(k, k); + aQ.setColumn(k, qv2); + } + + return *this; + } + + template inline bool isEqual(const Matrix3& aLhv, const Matrix3& aRhv, const T& aEpsilon = effects_epsilon::epsilon()) + { + return isEqual(aLhv.i, aRhv.i, aEpsilon) && isEqual(aLhv.j, aRhv.j, aEpsilon) && isEqual(aLhv.k, aRhv.k, aEpsilon); + } + template inline Matrix3 operator+(const Matrix3& aLhv, const Matrix3& aRhv) + { + return Matrix3(aLhv.i + aRhv.i, aLhv.j + aRhv.j, aLhv.k + aRhv.k); + } + template inline Matrix3 operator+(const Matrix3& aLhv, const T& aRhv) + { + return Matrix3(aLhv.i + aRhv, aLhv.j + aRhv, aLhv.k + aRhv); + } + template inline Matrix3 operator+(const T& aLhv, const Matrix3& aRhv) + { + return Matrix3(aLhv + aRhv.i, aLhv + aRhv.j, aLhv + aRhv.k); + } + template inline Matrix3 operator-(const Matrix3& aLhv, const Matrix3& aRhv) + { + return Matrix3(aLhv.i - aRhv.i, aLhv.j - aRhv.j, aLhv.k - aRhv.k); + } + template inline Matrix3 operator-(const Matrix3& aLhv, const T& aRhv) + { + return Matrix3(aLhv.i - aRhv, aLhv.j - aRhv, aLhv.k - aRhv); + } + template inline Matrix3 operator-(const T& aLhv, const Matrix3& aRhv) + { + return Matrix3(aLhv - aRhv.i, aLhv - aRhv.j, aLhv - aRhv.k); + } + template inline Matrix3 operator*(const Matrix3& aLhv, const Matrix3& aRhv) + { + return Matrix3( + aLhv.i.x * aRhv.i.x + aLhv.i.y * aRhv.j.x + aLhv.i.z * aRhv.k.x, + aLhv.i.x * aRhv.i.y + aLhv.i.y * aRhv.j.y + aLhv.i.z * aRhv.k.y, + aLhv.i.x * aRhv.i.z + aLhv.i.y * aRhv.j.z + aLhv.i.z * aRhv.k.z, + + aLhv.j.x * aRhv.i.x + aLhv.j.y * aRhv.j.x + aLhv.j.z * aRhv.k.x, + aLhv.j.x * aRhv.i.y + aLhv.j.y * aRhv.j.y + aLhv.j.z * aRhv.k.y, + aLhv.j.x * aRhv.i.z + aLhv.j.y * aRhv.j.z + aLhv.j.z * aRhv.k.z, + + aLhv.k.x * aRhv.i.x + aLhv.k.y * aRhv.j.x + aLhv.k.z * aRhv.k.x, + aLhv.k.x * aRhv.i.y + aLhv.k.y * aRhv.j.y + aLhv.k.z * aRhv.k.y, + aLhv.k.x * aRhv.i.z + aLhv.k.y * aRhv.j.z + aLhv.k.z * aRhv.k.z); + } + template inline Matrix3 operator*(const Matrix3& aLhv, const T& aRhv) + { + return Matrix3(aLhv.i * aRhv, aLhv.j * aRhv, aLhv.k * aRhv); + } + template inline Matrix3 operator*(const T& aLhv, const Matrix3& aRhv) + { + return Matrix3(aLhv * aRhv.i, aLhv * aRhv.j, aLhv * aRhv.k); + } + template inline _Vector3 operator*(const _Vector3& aLhv, const Matrix3& aRhv) + { + return aRhv.getAppliedTransform(aLhv); + } + template inline _Vector3 operator*(const Matrix3& aLhv, const _Vector3& aRhv) + { + return _Vector3( aLhv.i.x * aRhv.x + aLhv.i.y * aRhv.y + aLhv.i.z * aRhv.z, + aLhv.j.x * aRhv.x + aLhv.j.y * aRhv.y + aLhv.j.z * aRhv.z, + aLhv.k.x * aRhv.x + aLhv.k.y * aRhv.y + aLhv.k.z * aRhv.z); + } + template inline _Vector2 operator*(const _Vector2& aLhv, const Matrix3& aRhv) + { + return aRhv.getAppliedTransform(aLhv); + } + template inline _Vector2 operator*(const Matrix3& aLhv, const _Vector2& aRhv) + { + return _Vector2( aLhv.i.x * aRhv.x + aLhv.i.y * aRhv.y + aLhv.i.z, + aLhv.j.x * aRhv.x + aLhv.j.y * aRhv.y + aLhv.j.z); + } + template inline Matrix3 operator/(const Matrix3& aLhv, const T& aRhv) + { + return Matrix3(aLhv.i / aRhv, aLhv.j / aRhv, aLhv.k / aRhv); + } + template inline Matrix3 operator/(const T& aLhv, const Matrix3& aRhv) + { + return Matrix3(aLhv / aRhv.i, aLhv / aRhv.j, aLhv / aRhv.k); + } + template inline bool operator==(const Matrix3& aLhv, const Matrix3& aRhv) + { + return aLhv.i == aRhv.i && aLhv.j == aRhv.j && aLhv.k == aRhv.k; + } + template inline bool operator==(const Matrix3& aLhv, const T& aRhv) + { + return aLhv.i == aRhv && aLhv.j == aRhv && aLhv.k == aRhv; + } + template inline bool operator==(const T& aLhv, const Matrix3& aRhv) + { + return aLhv == aRhv.i && aLhv == aRhv.j && aLhv == aRhv.k; + } + template inline bool operator!=(const Matrix3& aLhv, const Matrix3& aRhv) + { + return !(aLhv == aRhv); + } + template inline bool operator!=(const Matrix3& aLhv, const T& aRhv) + { + return !(aLhv == aRhv); + } + template inline bool operator!=(const T& aLhv, const Matrix3& aRhv) + { + return !(aLhv == aRhv); + } +} } } } //Tizen::Ui::Effects::_Utils + +#endif //_FUI_EFFECTS_INTERNAL_UTILS_MATRIX3_H_ diff --git a/src/ui/effects/inc/utils/FUiEffects_UtilsMatrix4.h b/src/ui/effects/inc/utils/FUiEffects_UtilsMatrix4.h new file mode 100644 index 0000000..d07a591 --- /dev/null +++ b/src/ui/effects/inc/utils/FUiEffects_UtilsMatrix4.h @@ -0,0 +1,1833 @@ +// +// 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 FUiEffects_UtilsMatrix4.h + * @brief The Matrix4 class + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_UTILS_MATRIX4_H_ +#define _FUI_EFFECTS_INTERNAL_UTILS_MATRIX4_H_ + +#include "FUiEffects_UtilsAdapterFunctions.h" + +namespace Tizen { namespace Ui { namespace Effects { namespace _Utils +{ + template class Vector4; + template class _Vector3; + template class Matrix3; + template class Quaternion; + + template class Matrix4 + { + private: + typedef Matrix4 SelfType; + + public: + Vector4 i; + Vector4 j; + Vector4 k; + Vector4 c; + + inline Matrix4(); + inline explicit Matrix4(const T& aValue); + inline explicit Matrix4(const T* aValues); + inline Matrix4(const SelfType& aOther); + inline Matrix4(const Vector4& aI, const Vector4& aJ, + const Vector4& aK, const Vector4& aC); + inline Matrix4(const _Vector3& aI, const _Vector3& aJ, + const _Vector3& aK, const _Vector3& aC); + inline Matrix4(const T& a11, const T& a12, const T& a13, const T& a14, + const T& a21, const T& a22, const T& a23, const T& a24, + const T& a31, const T& a32, const T& a33, const T& a34, + const T& a41, const T& a42, const T& a43, const T& a44); + + inline SelfType& operator=(const SelfType& aRhv); + + inline SelfType& set(const T& aValue); + inline SelfType& set(const T* aValues); + inline SelfType& set(const SelfType& aOther); + inline SelfType& set(const Vector4& aI, const Vector4& aJ, + const Vector4& aK, const Vector4& aC); + inline SelfType& set(const _Vector3& aI, const _Vector3& aJ, + const _Vector3& aK, const _Vector3& aC); + inline SelfType& set(const T& a11, const T& a12, const T& a13, const T& a14, + const T& a21, const T& a22, const T& a23, const T& a24, + const T& a31, const T& a32, const T& a33, const T& a34, + const T& a41, const T& a42, const T& a43, const T& a44); + + inline SelfType& identity(); + inline static const SelfType& getIdentity(); + inline bool isIdentity() const; + + inline SelfType operator-() const; + inline SelfType& inverse(); + inline SelfType getInversed() const; + inline SelfType& transpose(); + inline SelfType getTransposed() const; + + inline SelfType& operator+=(const SelfType& aRhv); + inline SelfType& operator+=(const T& aRhv); + inline SelfType& operator-=(const SelfType& aRhv); + inline SelfType& operator-=(const T& aRhv); + inline SelfType& operator*=(const SelfType& aRhv); + inline SelfType& operator*=(const T& aRhv); + inline SelfType& operator/=(const T& aRhv); + inline SelfType GetMultipliedByMember(const SelfType& aRhv) const; + inline SelfType& multiplyByMember(const SelfType& aRhv); + static inline SelfType createMultipliedByMember(const SelfType& aLhv, const SelfType& aRhv); + inline SelfType getDividedByMember(const SelfType& aRhv) const; + inline SelfType& divideByMember(const SelfType& aRhv); + static inline SelfType createDividedByMember(const SelfType& aLhv, const SelfType& aRhv); + + inline T* getPointer(); + inline const T* getPointer() const; + inline T& get(unsigned int aRow, unsigned int aColumn); + inline const T& get(unsigned int aRow, unsigned int aColumn) const; + inline T& get(unsigned int aAbsIndex); + inline const T& get(unsigned int aAbsIndex) const; + inline SelfType& set(unsigned int aRow, unsigned int aColumn, const T& aValue); + inline SelfType& set(unsigned int aAbsIndex, const T& aValue); + inline Vector4& getRow(unsigned int aRow); + inline const Vector4& getRow(unsigned int aRow) const; + inline SelfType& setRow(unsigned int aRow, const Vector4& aValue); + inline Vector4 getColumn(unsigned int aColumn) const; + inline SelfType& setColumn(unsigned int aColumn, const Vector4& aValue); + inline T& operator()(unsigned int aRow, unsigned int aColumn); + inline const T& operator()(unsigned int aRow, unsigned int aColumn) const; + inline T& operator()(unsigned int aAbsIndex); + inline const T& operator()(unsigned int aAbsIndex) const; + inline T& operator[](unsigned int aAbsIndex); + inline const T& operator[](unsigned int aAbsIndex) const; + + inline SelfType& lerp(const SelfType& aTo, const T& aCoeff); + inline SelfType getLerped(const SelfType& aTo, const T& aCoeff) const; + inline SelfType& makeLerped(const SelfType& aFrom, const SelfType& aTo, const T& aCoeff); + static inline SelfType createLerped(const SelfType& aFrom, const SelfType& aTo, const T& aCoeff); + inline SelfType& slerp(const SelfType& aTo, const T& aCoeff); + inline SelfType getSlerped(const SelfType& aTo, const T& aCoeff) const; + inline SelfType& makeSlerped(const SelfType& aFrom, const SelfType& aTo, const T& aCoeff); + static inline SelfType createSlerped(const SelfType& aFrom, const SelfType& aTo, const T& aCoeff); + + inline T determinant() const; + + inline Vector4& applyTransform(Vector4& aVector) const; + inline Vector4 getAppliedTransform(const Vector4& aVector) const; + inline Vector4& applyRotation(Vector4& aVector) const; + inline Vector4 getAppliedRotation(const Vector4& aVector) const; + inline Vector4& applyTranslate(Vector4& aVector) const; + inline Vector4 getAppliedTranslate(const Vector4& aVector) const; + + inline _Vector3& applyTransform(_Vector3& aVector) const; + inline _Vector3 getAppliedTransform(const _Vector3& aVector) const; + inline _Vector3& applyRotation(_Vector3& aVector) const; + inline _Vector3 getAppliedRotation(const _Vector3& aVector) const; + inline _Vector3& applyTranslate(_Vector3& aVector) const; + inline _Vector3 getAppliedTranslate(const _Vector3& aVector) const; + + inline Quaternion& applyRotation(Quaternion& aQuaternion) const; + inline Quaternion getAppliedRotation(const Quaternion& aQuaternion) const; + + inline SelfType& setRotation(const T& aXAngleRAD, const T& aYAngleRAD, const T& aZAngleRAD, RotationOrder3 aOrder = ROTATION_XYZ); + inline SelfType& setRotation(const _Vector3& aAnglesRAD, RotationOrder3 aOrder = ROTATION_XYZ); + inline SelfType& setRotationX(const T& aAngleRAD); + inline SelfType& setRotationY(const T& aAngleRAD); + inline SelfType& setRotationZ(const T& aAngleRAD); + inline SelfType& setRotationAxis(const _Vector3& aAxis, const T& aAngleRAD); + inline SelfType& setRotationAxis(const T& aXAxis, const T& aYAxis, const T& aZAxis, const T& aAngleRAD); + inline SelfType& setRotation(const Quaternion& aRotation); + inline SelfType& setRotation(const Matrix3& aRotation); + inline SelfType& makeRotation(const T& aXAngleRAD, const T& aYAngleRAD, const T& aZAngleRAD, RotationOrder3 aOrder = ROTATION_XYZ); + inline SelfType& makeRotation(const _Vector3& aAnglesRAD, RotationOrder3 aOrder = ROTATION_XYZ); + inline SelfType& makeRotationX(const T& aAngleRAD); + inline SelfType& makeRotationY(const T& aAngleRAD); + inline SelfType& makeRotationZ(const T& aAngleRAD); + inline SelfType& makeRotationAxis(const _Vector3& aAxis, const T& aAngleRAD); + inline SelfType& makeRotationAxis(const T& aXAxis, const T& aYAxis, const T& aZAxis, const T& aAngleRAD); + inline SelfType& makeRotation(const Quaternion& aRotation); + inline SelfType& makeRotation(const Matrix3& aRotation); + inline SelfType& rotate(const T& aXAngleRAD, const T& aYAngleRAD, const T& aZAngleRAD, RotationOrder3 aOrder = ROTATION_XYZ); + inline SelfType& rotate(const _Vector3& aAnglesRAD, RotationOrder3 aOrder3 = ROTATION_XYZ); + inline SelfType& rotateX(const T& aAngleRAD); + inline SelfType& rotateY(const T& aAngleRAD); + inline SelfType& rotateZ(const T& aAngleRAD); + inline SelfType& rotateAxis(const _Vector3& aAxis, const T& aAngleRAD); + inline SelfType& rotateAxis(const T& aXAxis, const T& aYAxis, const T& aZAxis, const T& aAngleRAD); + inline SelfType& rotate(const Quaternion& aRotation); + inline SelfType& rotate(const Matrix3& aRotation); + inline SelfType& rotate(const Matrix4& aRotation); + static inline SelfType createRotation(const T& aXAngleRAD, const T& aYAngleRAD, const T& aZAngleRAD, RotationOrder3 aOrder = ROTATION_XYZ); + static inline SelfType createRotation(const _Vector3& aAnglesRAD, RotationOrder3 aOrder = ROTATION_XYZ); + static inline SelfType createRotationX(const T& aAngleRAD); + static inline SelfType createRotationY(const T& aAngleRAD); + static inline SelfType createRotationZ(const T& aAngleRAD); + static inline SelfType createRotationAxis(const _Vector3& aAxis, const T& aAngleRAD); + static inline SelfType createRotationAxis(const T& aXAxis, const T& aYAxis, const T& aZAxis, const T& aAngleRAD); + static inline SelfType createRotation(const Quaternion& aRotation); + static inline SelfType createRotation(const Matrix3& aRotation); + inline const SelfType& getRotationAngles(T& aXAngleRAD, T& aYAngeRAD, T& aZAngleRAD, unsigned int aSolutionNumber = 1) const; + inline Quaternion getQuaternion() const; + inline Quaternion& getQuaternion(Quaternion& aRotation) const; + inline Matrix3 getRotation() const; + inline Matrix3& getRotation(Matrix3& aRotation) const; + + inline SelfType& makeScale(const T& aX, const T& aY, const T& aZ); + inline SelfType& makeScale(const _Vector3& aScale); + inline SelfType& setScale(const T& aX, const T& aY, const T& aZ); + inline SelfType& setScale(const _Vector3& aScale); + static inline SelfType createScale(const T& aX, const T& aY, const T& aZ); + static inline SelfType createScale(const _Vector3& aScale); + inline SelfType& scale(const T& aX, const T& aY, const T& aZ); + inline SelfType& scale(const _Vector3& aScale); + + inline SelfType& setTranslation(const T& aX, const T& aY, const T& aZ); + inline SelfType& setTranslation(const _Vector3& aTran); + inline SelfType& makeTranslation(const T& aX, const T& aY, const T& aZ); + inline SelfType& makeTranslation(const _Vector3& aTran); + inline SelfType& translate(const T& aX, const T& aY, const T& aZ); + inline SelfType& translate(const _Vector3& aTran); + static inline SelfType createTranslation(const T& aX, const T& aY, const T& aZ); + static inline SelfType createTranslation(const _Vector3& aTran); + inline _Vector3 getTranslation() const; + inline Vector4 getFullTranslation() const; + + inline SelfType& makeLookAtLH(const _Vector3& aEye, const _Vector3& aAt, const _Vector3& aUp); + inline SelfType& makeLookAtRH(const _Vector3& aEye, const _Vector3& aAt, const _Vector3& aUp); + inline SelfType& makeOrthoRH(const T& aWidth, const T& aHeight, const T& aZNear, const T& aZFar); + inline SelfType& makeOrthoLH(const T& aWidth, const T& aHeight, const T& aZNear, const T& aZFar); + inline SelfType& makeOrthoRH(const T& aLeft, const T& aRight, const T& aTop, const T& aBottom, const T& aZNear, const T& aZFar); + inline SelfType& makeOrthoLH(const T& aLeft, const T& aRight, const T& aTop, const T& aBottom, const T& aZNear, const T& aZFar); + inline SelfType& makePerspectiveLH(const T& aLeft, const T& aRight, const T& aTop, const T& aBottom, const T& aZNear, const T& aZFar); + inline SelfType& makePerspectiveRH(const T& aLeft, const T& aRight, const T& aTop, const T& aBottom, const T& aZNear, const T& aZFar); + inline SelfType& makePerspectiveLH(const T& aWidth, const T& aHeight, const T& aZnear, const T& aZFar); + inline SelfType& makePerspectiveRH(const T& aWidth, const T& aHeight, const T& aZnear, const T& aZFar); + inline SelfType& makePerspectiveFovLH(const T& aFovY, const T& aAspect, const T& aZnear, const T& aZFar); + inline SelfType& makePerspectiveFovRH(const T& aFovY, const T& aAspect, const T& aZnear, const T& aZFar); + static inline SelfType createLookAtLH(const _Vector3& aEye, const _Vector3& aAt, const _Vector3& aUp); + static inline SelfType createLookAtRH(const _Vector3& aEye, const _Vector3& aAt, const _Vector3& aUp); + static inline SelfType createOrthoRH(const T& aWidth, const T& aHeight, const T& aZNear, const T& aZFar); + static inline SelfType createOrthoLH(const T& aWidth, const T& aHeight, const T& aZNear, const T& aZFar); + static inline SelfType createOrthoRH(const T& aLeft, const T& aRight, const T& aTop, const T& aBottom, const T& aZNear, const T& aZFar); + static inline SelfType createOrthoLH(const T& aLeft, const T& aRight, const T& aTop, const T& aBottom, const T& aZNear, const T& aZFar); + static inline SelfType createPerspectiveLH(const T& aLeft, const T& aRight, const T& aTop, const T& aBottom, const T& aZNear, const T& aZFar); + static inline SelfType createPerspectiveRH(const T& aLeft, const T& aRight, const T& aTop, const T& aBottom, const T& aZNear, const T& aZFar); + static inline SelfType createPerspectiveLH(const T& aWidth, const T& aHeight, const T& aZnear, const T& aZFar); + static inline SelfType createPerspectiveRH(const T& aWidth, const T& aHeight, const T& aZnear, const T& aZFar); + static inline SelfType createPerspectiveFovLH(const T& aFovY, const T& aAspect, const T& aZnear, const T& aZFar); + static inline SelfType createPerspectiveFovRH(const T& aFovY, const T& aAspect, const T& aZnear, const T& aZFar); + + inline bool getOrthoParamsRH(T& aLeft, T& aRight, T& aTop, T& aBottom, T& aZNear, T& aZFar) const; + inline bool getPerspectiveParamsRH(T& aLeft, T& aRight, T& aTop, T& aBottom, T& aZNear, T& aZFar) const; + inline bool getPerspectiveParamsRH(T& aFovY, T& aAspect, T& aZNear, T& aZFar) const; + inline bool getViewParams(_Vector3& aPosition, _Vector3& aDirection, _Vector3& aUp, _Vector3& aRight) const; + }; + + typedef Matrix4 Mat4f; + typedef Matrix4 Mat4d; + + template inline Matrix4 operator+(const Matrix4& aLhv, const Matrix4& aRhv); + template inline Matrix4 operator+(const Matrix4& aLhv, const T& aRhv); + template inline Matrix4 operator+(const T& aLhv, const Matrix4& aRhv); + template inline Matrix4 operator-(const Matrix4& aLhv, const Matrix4& aRhv); + template inline Matrix4 operator-(const Matrix4& aLhv, const T& aRhv); + template inline Matrix4 operator-(const T& aLhv, const Matrix4& aRhv); + template inline Matrix4 operator*(const Matrix4& aLhv, const Matrix4& aRhv); + template inline Matrix4 operator*(const Matrix4& aLhv, const T& aRhv); + template inline Matrix4 operator*(const T& aLhv, const Matrix4& aRhv); + template inline Vector4 operator*(const Matrix4& aLhv, const Vector4& aRhv); + template inline Vector4 operator*(const Vector4& aLhv, const Matrix4& aRhv); + template inline _Vector3 operator*(const Matrix4& aLhv, const _Vector3& aRhv); + template inline _Vector3 operator*(const _Vector3& aLhv, const Matrix4& aRhv); + template inline Matrix4 operator/(const Matrix4& aLhv, const T& aRhv); + template inline Matrix4 operator/(const T& aLhv, const Matrix4& aRhv); + template inline bool operator==(const Matrix4& aLhv, const Matrix4& aRhv); + template inline bool operator==(const Matrix4& aLhv, const T& aRhv); + template inline bool operator==(const T& aLhv, const Matrix4& aRhv); + template inline bool operator!=(const Matrix4& aLhv, const Matrix4& aRhv); + template inline bool operator!=(const Matrix4& aLhv, const T& aRhv); + template inline bool operator!=(const T& aLhv, const Matrix4& aRhv); + + template inline Matrix4::Matrix4() {} + + template inline Matrix4::Matrix4(const T& aValue): + i(aValue), j(aValue), k(aValue), c(aValue) {} + + template inline Matrix4::Matrix4(const T* aValues): + i(aValues[0], aValues[1], aValues[2], aValues[3]), + j(aValues[4], aValues[5], aValues[6], aValues[7]), + k(aValues[8], aValues[9], aValues[10], aValues[11]), + c(aValues[12], aValues[13], aValues[14], aValues[15]) {} + + template inline Matrix4::Matrix4(const Matrix4& aOther): + i(aOther.i), j(aOther.j), k(aOther.k), c(aOther.c) {} + + template inline Matrix4::Matrix4(const Vector4& aI, const Vector4& aJ, const Vector4& aK, const Vector4& aC): + i(aI), j(aJ), k(aK), c(aC) {} + + template inline Matrix4::Matrix4(const _Vector3& aI, const _Vector3& aJ, const _Vector3& aK, const _Vector3& aC): + i(aI, T(0.0f)), j(aJ, T(0.0f)), k(aK, T(0.0f)), c(aC, T(1.0f)) {} + + template inline Matrix4::Matrix4(const T& a11, const T& a12, const T& a13, const T& a14, + const T& a21, const T& a22, const T& a23, const T& a24, + const T& a31, const T& a32, const T& a33, const T& a34, + const T& a41, const T& a42, const T& a43, const T& a44): + i(a11, a12, a13, a14), j(a21, a22, a23, a24), k(a31, a32, a33, a34), c(a41, a42, a43, a44) {} + + template inline Matrix4& Matrix4::operator=(const Matrix4& aRhv) + { + i = aRhv.i; + j = aRhv.j; + k = aRhv.k; + c = aRhv.c; + return *this; + } + + template inline Matrix4& Matrix4::set(const T& aValue) + { + i.set(aValue); + j.set(aValue); + k.set(aValue); + c.set(aValue); + return *this; + } + + template inline Matrix4& Matrix4::set(const T* aValues) + { + i.set(aValues[0], aValues[1], aValues[2], aValues[3]); + j.set(aValues[4], aValues[5], aValues[6], aValues[7]); + k.set(aValues[8], aValues[9], aValues[10], aValues[11]); + c.set(aValues[12], aValues[13], aValues[14], aValues[15]); + return *this; + } + + template inline Matrix4& Matrix4::set(const Matrix4& aOther) + { + i = aOther.i; + j = aOther.j; + k = aOther.k; + c = aOther.c; + return *this; + } + + template inline Matrix4& Matrix4::set(const Vector4& aI, const Vector4& aJ, + const Vector4& aK, const Vector4& aC) + { + i = aI; + j = aJ; + k = aK; + c = aC; + return *this; + } + + template inline Matrix4& Matrix4::set(const _Vector3& aI, const _Vector3& aJ, + const _Vector3& aK, const _Vector3& aC) + { + i.set(aI, T(0.0f)); + j.set(aJ, T(0.0f)); + k.set(aK, T(0.0f)); + c.set(aC, T(1.0f)); + return *this; + } + + template inline Matrix4& Matrix4::set(const T& a11, const T& a12, const T& a13, const T& a14, + const T& a21, const T& a22, const T& a23, const T& a24, + const T& a31, const T& a32, const T& a33, const T& a34, + const T& a41, const T& a42, const T& a43, const T& a44) + { + i.set(a11, a12, a13, a14); + j.set(a21, a22, a23, a24); + k.set(a31, a32, a33, a34); + c.set(a41, a42, a43, a44); + return *this; + } + + template inline Matrix4& Matrix4::identity() + { + return operator=(getIdentity()); + } + + template inline const Matrix4& Matrix4::getIdentity() + { + static Matrix4 identityMatrix( + T(1.0f), T(0.0f), T(0.0f), T(0.0f), + T(0.0f), T(1.0f), T(0.0f), T(0.0f), + T(0.0f), T(0.0f), T(1.0f), T(0.0f), + T(0.0f), T(0.0f), T(0.0f), T(1.0f)); + return identityMatrix; + } + + template inline Matrix4 Matrix4::operator-() const + { + return Matrix4(-i, -j, -k, -c); + } + + template inline Matrix4& Matrix4::inverse() + { + static const T t0(0.0f); + + T s = determinant(); + if(EffectsEqual(s, t0)) return *this; + set( + (j.y*(k.z*c.w - k.w*c.z) + j.z*(k.w*c.y - k.y*c.w) + j.w*(k.y*c.z - k.z*c.y)) / s, + (k.y*(i.z*c.w - i.w*c.z) + k.z*(i.w*c.y - i.y*c.w) + k.w*(i.y*c.z - i.z*c.y)) / s, + (c.y*(i.z*j.w - i.w*j.z) + c.z*(i.w*j.y - i.y*j.w) + c.w*(i.y*j.z - i.z*j.y)) / s, + (i.y*(j.w*k.z - j.z*k.w) + i.z*(j.y*k.w - j.w*k.y) + i.w*(j.z*k.y - j.y*k.z)) / s, + (j.z*(k.x*c.w - k.w*c.x) + j.w*(k.z*c.x - k.x*c.z) + j.x*(k.w*c.z - k.z*c.w)) / s, + (k.z*(i.x*c.w - i.w*c.x) + k.w*(i.z*c.x - i.x*c.z) + k.x*(i.w*c.z - i.z*c.w)) / s, + (c.z*(i.x*j.w - i.w*j.x) + c.w*(i.z*j.x - i.x*j.z) + c.x*(i.w*j.z - i.z*j.w)) / s, + (i.z*(j.w*k.x - j.x*k.w) + i.w*(j.x*k.z - j.z*k.x) + i.x*(j.z*k.w - j.w*k.z)) / s, + (j.w*(k.x*c.y - k.y*c.x) + j.x*(k.y*c.w - k.w*c.y) + j.y*(k.w*c.x - k.x*c.w)) / s, + (k.w*(i.x*c.y - i.y*c.x) + k.x*(i.y*c.w - i.w*c.y) + k.y*(i.w*c.x - i.x*c.w)) / s, + (c.w*(i.x*j.y - i.y*j.x) + c.x*(i.y*j.w - i.w*j.y) + c.y*(i.w*j.x - i.x*j.w)) / s, + (i.w*(j.y*k.x - j.x*k.y) + i.x*(j.w*k.y - j.y*k.w) + i.y*(j.x*k.w - j.w*k.x)) / s, + (j.x*(k.z*c.y - k.y*c.z) + j.y*(k.x*c.z - k.z*c.x) + j.z*(k.y*c.x - k.x*c.y)) / s, + (k.x*(i.z*c.y - i.y*c.z) + k.y*(i.x*c.z - i.z*c.x) + k.z*(i.y*c.x - i.x*c.y)) / s, + (c.x*(i.z*j.y - i.y*j.z) + c.y*(i.x*j.z - i.z*j.x) + c.z*(i.y*j.x - i.x*j.y)) / s, + (i.x*(j.y*k.z - j.z*k.y) + i.y*(j.z*k.x - j.x*k.z) + i.z*(j.x*k.y - j.y*k.x)) / s); + return *this; + } + + template inline Matrix4 Matrix4::getInversed() const + { + static const T t0(0.0f); + + T s = determinant(); + if(EffectsEqual(s, t0)) return *this; + Matrix4 inverted( + (j.y*(k.z*c.w - k.w*c.z) + j.z*(k.w*c.y - k.y*c.w) + j.w*(k.y*c.z - k.z*c.y)) / s, + (k.y*(i.z*c.w - i.w*c.z) + k.z*(i.w*c.y - i.y*c.w) + k.w*(i.y*c.z - i.z*c.y)) / s, + (c.y*(i.z*j.w - i.w*j.z) + c.z*(i.w*j.y - i.y*j.w) + c.w*(i.y*j.z - i.z*j.y)) / s, + (i.y*(j.w*k.z - j.z*k.w) + i.z*(j.y*k.w - j.w*k.y) + i.w*(j.z*k.y - j.y*k.z)) / s, + (j.z*(k.x*c.w - k.w*c.x) + j.w*(k.z*c.x - k.x*c.z) + j.x*(k.w*c.z - k.z*c.w)) / s, + (k.z*(i.x*c.w - i.w*c.x) + k.w*(i.z*c.x - i.x*c.z) + k.x*(i.w*c.z - i.z*c.w)) / s, + (c.z*(i.x*j.w - i.w*j.x) + c.w*(i.z*j.x - i.x*j.z) + c.x*(i.w*j.z - i.z*j.w)) / s, + (i.z*(j.w*k.x - j.x*k.w) + i.w*(j.x*k.z - j.z*k.x) + i.x*(j.z*k.w - j.w*k.z)) / s, + (j.w*(k.x*c.y - k.y*c.x) + j.x*(k.y*c.w - k.w*c.y) + j.y*(k.w*c.x - k.x*c.w)) / s, + (k.w*(i.x*c.y - i.y*c.x) + k.x*(i.y*c.w - i.w*c.y) + k.y*(i.w*c.x - i.x*c.w)) / s, + (c.w*(i.x*j.y - i.y*j.x) + c.x*(i.y*j.w - i.w*j.y) + c.y*(i.w*j.x - i.x*j.w)) / s, + (i.w*(j.y*k.x - j.x*k.y) + i.x*(j.w*k.y - j.y*k.w) + i.y*(j.x*k.w - j.w*k.x)) / s, + (j.x*(k.z*c.y - k.y*c.z) + j.y*(k.x*c.z - k.z*c.x) + j.z*(k.y*c.x - k.x*c.y)) / s, + (k.x*(i.z*c.y - i.y*c.z) + k.y*(i.x*c.z - i.z*c.x) + k.z*(i.y*c.x - i.x*c.y)) / s, + (c.x*(i.z*j.y - i.y*j.z) + c.y*(i.x*j.z - i.z*j.x) + c.z*(i.y*j.x - i.x*j.y)) / s, + (i.x*(j.y*k.z - j.z*k.y) + i.y*(j.z*k.x - j.x*k.z) + i.z*(j.x*k.y - j.y*k.x)) / s); + return inverted; + } + + template inline Matrix4& Matrix4::transpose() + { + EffectsSwap(i.y, j.x); + EffectsSwap(i.z, k.x); + EffectsSwap(i.w, c.x); + EffectsSwap(j.z, k.y); + EffectsSwap(j.w, c.y); + EffectsSwap(k.w, c.z); + return *this; + } + + template inline Matrix4 Matrix4::getTransposed() const + { + Matrix4 transposed(i.x, j.x, k.x, c.x, + i.y, j.y, k.y, c.y, + i.z, j.z, k.z, c.z, + i.w, j.w, k.w, c.w); + + return transposed; + } + + template inline Matrix4& Matrix4::operator+=(const Matrix4& aRhv) + { + i += aRhv.i; + j += aRhv.j; + k += aRhv.k; + c += aRhv.c; + return *this; + } + template inline Matrix4& Matrix4::operator+=(const T& aRhv) + { + i += aRhv; + j += aRhv; + k += aRhv; + c += aRhv; + return *this; + } + template inline Matrix4& Matrix4::operator-=(const Matrix4& aRhv) + { + i -= aRhv.i; + j -= aRhv.j; + k -= aRhv.k; + c -= aRhv.c; + return *this; + } + template inline Matrix4& Matrix4::operator-=(const T& aRhv) + { + i -= aRhv; + j -= aRhv; + k -= aRhv; + c -= aRhv; + return *this; + } + template inline Matrix4& Matrix4::operator*=(const T& aRhv) + { + i *= aRhv; + j *= aRhv; + k *= aRhv; + c *= aRhv; + return *this; + } + + template inline Matrix4 Matrix4::GetMultipliedByMember(const Matrix4& aRhv) const + { + return Matrix4(i * aRhv.i, j * aRhv.j, k * aRhv.k, c * aRhv.c); + } + + template inline Matrix4& Matrix4::multiplyByMember(const Matrix4& aRhv) + { + i *= aRhv.i; + j *= aRhv.j; + k *= aRhv.k; + c *= aRhv.c; + return *this; + } + + template inline Matrix4 Matrix4::createMultipliedByMember(const Matrix4& aLhv, const Matrix4& aRhv) + { + return Matrix4(aLhv.i * aRhv.i, aLhv.j * aRhv.j, aLhv.k * aRhv.k, aLhv.c * aRhv.c); + } + + template inline Matrix4& Matrix4::operator*=(const Matrix4& aRhv) + { + set( + i.x * aRhv.i.x + i.y * aRhv.j.x + i.z * aRhv.k.x + i.w * aRhv.c.x, + i.x * aRhv.i.y + i.y * aRhv.j.y + i.z * aRhv.k.y + i.w * aRhv.c.y, + i.x * aRhv.i.z + i.y * aRhv.j.z + i.z * aRhv.k.z + i.w * aRhv.c.z, + i.x * aRhv.i.w + i.y * aRhv.j.w + i.z * aRhv.k.w + i.w * aRhv.c.w, + + j.x * aRhv.i.x + j.y * aRhv.j.x + j.z * aRhv.k.x + j.w * aRhv.c.x, + j.x * aRhv.i.y + j.y * aRhv.j.y + j.z * aRhv.k.y + j.w * aRhv.c.y, + j.x * aRhv.i.z + j.y * aRhv.j.z + j.z * aRhv.k.z + j.w * aRhv.c.z, + j.x * aRhv.i.w + j.y * aRhv.j.w + j.z * aRhv.k.w + j.w * aRhv.c.w, + + k.x * aRhv.i.x + k.y * aRhv.j.x + k.z * aRhv.k.x + k.w * aRhv.c.x, + k.x * aRhv.i.y + k.y * aRhv.j.y + k.z * aRhv.k.y + k.w * aRhv.c.y, + k.x * aRhv.i.z + k.y * aRhv.j.z + k.z * aRhv.k.z + k.w * aRhv.c.z, + k.x * aRhv.i.w + k.y * aRhv.j.w + k.z * aRhv.k.w + k.w * aRhv.c.w, + + c.x * aRhv.i.x + c.y * aRhv.j.x + c.z * aRhv.k.x + c.w * aRhv.c.x, + c.x * aRhv.i.y + c.y * aRhv.j.y + c.z * aRhv.k.y + c.w * aRhv.c.y, + c.x * aRhv.i.z + c.y * aRhv.j.z + c.z * aRhv.k.z + c.w * aRhv.c.z, + c.x * aRhv.i.w + c.y * aRhv.j.w + c.z * aRhv.k.w + c.w * aRhv.c.w); + return *this; + } + + template inline Matrix4 Matrix4::getDividedByMember(const Matrix4& aRhv) const + { + return Matrix4(i / aRhv.i, j / aRhv.j, k / aRhv.k, c / aRhv.c); + } + + template inline Matrix4& Matrix4::divideByMember(const Matrix4& aRhv) + { + i /= aRhv.i; + j /= aRhv.j; + k /= aRhv.k; + c /= aRhv.c; + return *this; + } + template inline Matrix4 Matrix4::createDividedByMember(const Matrix4& aLhv, const Matrix4& aRhv) + { + return Matrix4(aLhv.i / aRhv.i, aLhv.j / aRhv.j, aLhv.k / aRhv.k, aLhv.c / aRhv.c); + } + + template inline Matrix4& Matrix4::operator/=(const T& aRhv) + { + i /= aRhv; + j /= aRhv; + k /= aRhv; + c /= aRhv; + return *this; + } + + template inline bool Matrix4::isIdentity() const + { + return *this == getIdentity(); + } + + template inline T* Matrix4::getPointer() + { + return i.getPointer(); + } + + template inline const T* Matrix4::getPointer() const + { + return i.getPointer(); + } + + template inline T& Matrix4::get(unsigned int aRow, unsigned int aColumn) + { + return operator()(aRow, aColumn); + } + + template inline const T& Matrix4::get(unsigned int aRow, unsigned int aColumn) const + { + return operator()(aRow, aColumn); + } + + template inline T& Matrix4::get(unsigned int aAbsIndex) + { + return operator()(aAbsIndex); + } + + template inline const T& Matrix4::get(unsigned int aAbsIndex) const + { + return operator()(aAbsIndex); + } + + template inline Vector4& Matrix4::getRow(unsigned int aRow) + { + switch(aRow) + { + case 1: + return j; + case 2: + return k; + case 3: + return c; + } + return i; + } + + template inline const Vector4& Matrix4::getRow(unsigned int aRow) const + { + switch(aRow) + { + case 1: + return j; + case 2: + return k; + case 3: + return c; + } + return i; + } + + template inline Vector4 Matrix4::getColumn(unsigned int aColumn) const + { + switch(aColumn) + { + case 1: + return Vector4(i.y, j.y, k.y, c.y); + case 2: + return Vector4(i.z, j.z, k.z, c.z); + case 3: + return Vector4(i.w, j.w, k.w, c.w); + } + + return Vector4(i.x, j.x, k.x, c.x); + } + + template inline T& Matrix4::operator()(unsigned int aRow, unsigned int aColumn) + { + return operator[]((aRow << 2) + aColumn); + } + + template inline const T& Matrix4::operator()(unsigned int aRow, unsigned int aColumn) const + { + return operator[]((aRow << 2) + aColumn); + } + + template inline T& Matrix4::operator()(unsigned int aAbsIndex) + { + return operator[](aAbsIndex); + } + + template inline const T& Matrix4::operator()(unsigned int aAbsIndex) const + { + return operator[](aAbsIndex); + } + + template inline T& Matrix4::operator[](unsigned int aAbsIndex) + { + return getPointer()[aAbsIndex]; + } + + template inline const T& Matrix4::operator[](unsigned int aAbsIndex) const + { + return getPointer()[aAbsIndex]; + } + + template inline Matrix4& Matrix4::setColumn(unsigned int aColumn, const Vector4& aValue) + { + switch(aColumn) + { + case 0: + i.x = aValue.x; + j.x = aValue.y; + k.x = aValue.z; + c.x = aValue.w; + break; + case 1: + i.y = aValue.x; + j.y = aValue.y; + k.y = aValue.z; + c.y = aValue.w; + break; + case 2: + i.z = aValue.x; + j.z = aValue.y; + k.z = aValue.z; + c.z = aValue.w; + break; + case 3: + i.w = aValue.x; + j.w = aValue.y; + k.w = aValue.z; + c.w = aValue.w; + break; + } + + return *this; + } + + template inline Matrix4& Matrix4::setRow(unsigned int aRow, const Vector4& aValue) + { + switch(aRow) + { + case 0: + i = aValue; + break; + case 1: + j = aValue; + break; + case 2: + k = aValue; + break; + case 3: + c = aValue; + break; + } + + return *this; + } + + template inline Matrix4& Matrix4::set(unsigned int aRow, unsigned int aColumn, const T& aValue) + { + operator()(aRow, aColumn) = aValue; + return *this; + } + + template inline Matrix4& Matrix4::set(unsigned int aAbsIndex, const T& aValue) + { + operator()(aAbsIndex) = aValue; + return *this; + } + + template inline Matrix4& Matrix4::lerp(const Matrix4& aTo, const T& aCoeff) + { + i.lerp(aTo.i, aCoeff); + j.lerp(aTo.j, aCoeff); + k.lerp(aTo.k, aCoeff); + c.lerp(aTo.c, aCoeff); + return *this; + } + + template inline Matrix4 Matrix4::getLerped(const Matrix4& aTo, const T& aCoeff) const + { + Matrix4 result(i.getLerped(aTo.i, aCoeff), + j.getLerped(aTo.j, aCoeff), + k.getLerped(aTo.k, aCoeff), + c.getLerped(aTo.c, aCoeff)); + return result; + } + + template inline Matrix4& Matrix4::makeLerped(const Matrix4& aFrom, const Matrix4& aTo, const T& aCoeff) + { + i.makeLerped(aFrom.i, aTo.i, aCoeff); + j.makeLerped(aFrom.j, aTo.j, aCoeff); + k.makeLerped(aFrom.k, aTo.k, aCoeff); + c.makeLerped(aFrom.c, aTo.c, aCoeff); + return *this; + } + template inline Matrix4 Matrix4::createLerped(const Matrix4& aFrom, const Matrix4& aTo, const T& aCoeff) + { + return Matrix4().makeLerped(aFrom, aTo, aCoeff); + } + + template inline Matrix4& Matrix4::slerp(const Matrix4& aTo, const T& aCoeff) + { + setRotation(getQuaternion().slerp(aTo.getQuaternion(), aCoeff)); + c.lerp(aTo.c, aCoeff); + return *this; + } + + template inline Matrix4 Matrix4::getSlerped(const Matrix4& aTo, const T& aCoeff) const + { + Matrix4 result; + result.makeRotation(getQuaternion().slerp(aTo.getQuaternion(), aCoeff)); + result.c = c.getLerped(aTo.c, aCoeff); + return result; + } + + template inline Matrix4& Matrix4::makeSlerped(const Matrix4& aFrom, const Matrix4& aTo, const T& aCoeff) + { + makeRotation(aFrom.getQuaternion().slerp(aTo.getQuaternion(), aCoeff)); + c.makeLerped(aFrom.c, aTo.c, aCoeff); + return *this; + } + + template inline Matrix4 Matrix4::createSlerped(const Matrix4& aFrom, const Matrix4& aTo, const T& aCoeff) + { + return Matrix4().makeSlerped(aFrom, aTo, aCoeff); + } + + template inline T Matrix4::determinant() const + { + return (i.x * j.y - i.y * j.x) * (k.z * c.w - k.w * c.z)- + (i.x * j.z - i.z * j.x) * (k.y * c.w - k.w * c.y)+ + (i.x * j.w - i.w * j.x) * (k.y * c.z - k.z * c.y)+ + (i.y * j.z - i.z * j.y) * (k.x * c.w - k.w * c.x)- + (i.y * j.w - i.w * j.y) * (k.x * c.z - k.z * c.x)+ + (i.z * j.w - i.w * j.z) * (k.x * c.y - k.y * c.x); + } + + template inline Vector4& Matrix4::applyTransform(Vector4& aVector) const + { + return aVector.set( + aVector.x * i.x + aVector.y * j.x + aVector.z * k.x + aVector.w * c.x, + aVector.x * i.y + aVector.y * j.y + aVector.z * k.y + aVector.w * c.y, + aVector.x * i.z + aVector.y * j.z + aVector.z * k.z + aVector.w * c.z, + aVector.x * i.w + aVector.y * j.w + aVector.z * k.w + aVector.w * c.w); + } + + template inline Vector4 Matrix4::getAppliedTransform(const Vector4& aVector) const + { + return Vector4( + aVector.x * i.x + aVector.y * j.x + aVector.z * k.x + aVector.w * c.x, + aVector.x * i.y + aVector.y * j.y + aVector.z * k.y + aVector.w * c.y, + aVector.x * i.z + aVector.y * j.z + aVector.z * k.z + aVector.w * c.z, + aVector.x * i.w + aVector.y * j.w + aVector.z * k.w + aVector.w * c.w); + } + + template inline Vector4& Matrix4::applyRotation(Vector4& aVector) const + { + return aVector.set( + aVector.x * i.x + aVector.y * j.x + aVector.z * k.x, + aVector.x * i.y + aVector.y * j.y + aVector.z * k.y, + aVector.x * i.z + aVector.y * j.z + aVector.z * k.z, + aVector.w); + } + + template inline Vector4 Matrix4::getAppliedRotation(const Vector4& aVector) const + { + return Vector4( + aVector.x * i.x + aVector.y * j.x + aVector.z * k.x, + aVector.x * i.y + aVector.y * j.y + aVector.z * k.y, + aVector.x * i.z + aVector.y * j.z + aVector.z * k.z, + aVector.w); + } + + template inline Vector4& Matrix4::applyTranslate(Vector4& aVector) const + { + return aVector.set( + aVector.x + aVector.w * c.x, + aVector.y + aVector.w * c.y, + aVector.z + aVector.w * c.z, + aVector.w); + } + + template inline Vector4 Matrix4::getAppliedTranslate(const Vector4& aVector) const + { + return Vector4( + aVector.x + aVector.w * c.x, + aVector.y + aVector.w * c.y, + aVector.z + aVector.w * c.z, + aVector.w); + } + + template inline _Vector3& Matrix4::applyTransform(_Vector3& aVector) const + { + return aVector.set( + aVector.x * i.x + aVector.y * j.x + aVector.z * k.x + c.x, + aVector.x * i.y + aVector.y * j.y + aVector.z * k.y + c.y, + aVector.x * i.z + aVector.y * j.z + aVector.z * k.z + c.z); + } + + template inline _Vector3 Matrix4::getAppliedTransform(const _Vector3& aVector) const + { + return _Vector3( + aVector.x * i.x + aVector.y * j.x + aVector.z * k.x + c.x, + aVector.x * i.y + aVector.y * j.y + aVector.z * k.y + c.y, + aVector.x * i.z + aVector.y * j.z + aVector.z * k.z + c.z); + } + + template inline _Vector3& Matrix4::applyRotation(_Vector3& aVector) const + { + return aVector.set( + aVector.x * i.x + aVector.y * j.x + aVector.z * k.x, + aVector.x * i.y + aVector.y * j.y + aVector.z * k.y, + aVector.x * i.z + aVector.y * j.z + aVector.z * k.z); + } + + template inline _Vector3 Matrix4::getAppliedRotation(const _Vector3& aVector) const + { + return _Vector3( + aVector.x * i.x + aVector.y * j.x + aVector.z * k.x, + aVector.x * i.y + aVector.y * j.y + aVector.z * k.y, + aVector.x * i.z + aVector.y * j.z + aVector.z * k.z); + } + + template inline _Vector3& Matrix4::applyTranslate(_Vector3& aVector) const + { + return aVector.set( + aVector.x + c.x, + aVector.y + c.y, + aVector.z + c.z); + } + + template inline _Vector3 Matrix4::getAppliedTranslate(const _Vector3& aVector) const + { + return _Vector3( + aVector.x + c.x, + aVector.y + c.y, + aVector.z + c.z); + } + + template inline Quaternion& Matrix4::applyRotation(Quaternion& aQuaternion) const + { + + return aQuaternion.set(getQuaternion() * aQuaternion); + } + + template inline Quaternion Matrix4::getAppliedRotation(const Quaternion& aQuaternion) const + { + return getQuaternion() * aQuaternion; + } + + template inline Matrix4& Matrix4::setRotation(const T& aXAngleRAD, const T& aYAngleRAD, const T& aZAngleRAD, RotationOrder3 aOrder) + { + Matrix4 result; + result.makeRotation(aXAngleRAD, aYAngleRAD, aZAngleRAD, aOrder); + + i.x = result.i.x; i.y = result.i.y; i.z = result.i.z; + j.x = result.j.x; j.y = result.j.y; j.z = result.j.z; + k.x = result.k.x; k.y = result.k.y; k.z = result.k.z; + return *this; + } + + template inline Matrix4& Matrix4::setRotation(const _Vector3& aAnglesRAD, RotationOrder3 aOrder) + { + return setRotation(aAnglesRAD.x, aAnglesRAD.y, aAnglesRAD.z, aOrder); + } + + template inline Matrix4& Matrix4::setRotationX(const T& aAngleRAD) + { + const T c = effects_cos(aAngleRAD); + const T s = effects_sin(aAngleRAD); + i.x = T(1.0f); + i.y = i.z = j.x = k.x = T(0.0f); + j.y = c; + j.z = s; + k.y = -s; + k.z = c; + return *this; + } + + template inline Matrix4& Matrix4::setRotationY(const T& aAngleRAD) + { + const T c = effects_cos(aAngleRAD); + const T s = effects_sin(aAngleRAD); + j.y = T(1.0f); + i.y = j.x = j.z = k.y = T(0.0f); + i.x = c; + i.z = -s; + k.x = s; + k.z = c; + return *this; + } + + template inline Matrix4& Matrix4::setRotationZ(const T& aAngleRAD) + { + const T c = effects_cos(aAngleRAD); + const T s = effects_sin(aAngleRAD); + k.z = T(1.0f); + i.z = j.z = k.x = k.y = T(0.0f); + i.x = c; + i.y = s; + j.x = -s; + j.y = c; + return *this; + } + + template inline Matrix4& Matrix4::setRotationAxis(const _Vector3& aAxis, const T& aAngleRAD) + { + return setRotationAxis(aAxis.x, aAxis.y, aAxis.z, aAngleRAD); + } + + template inline Matrix4& Matrix4::setRotationAxis(const T& aXAxis, const T& aYAxis, const T& aZAxis, const T& aAngleRAD) + { + Matrix4 result; + result.makeRotationAxis(aXAxis, aYAxis, aZAxis, aAngleRAD); + + i.x = result.i.x; i.y = result.i.y; i.z = result.i.z; + j.x = result.j.x; j.y = result.j.y; j.z = result.j.z; + k.x = result.k.x; k.y = result.k.y; k.z = result.k.z; + return *this; + } + + template inline Matrix4& Matrix4::setRotation(const Quaternion& aRotation) + { + T wx, wy, wz, xx, yy, yz, xy, xz, zz, x2, y2, z2; + T s = T(2.0f) / aRotation.lengthSqr(); // 4 mul 3 add 1 div + x2 = aRotation.x * s; y2 = aRotation.y * s; z2 = aRotation.z * s; + xx = aRotation.x * x2; xy = aRotation.x * y2; xz = aRotation.x * z2; + yy = aRotation.y * y2; yz = aRotation.y * z2; zz = aRotation.z * z2; + wx = aRotation.w * x2; wy = aRotation.w * y2; wz = aRotation.w * z2; + + const T t1(1.0f); + i.x = t1 - (yy + zz); + j.x = xy - wz; + k.x = xz + wy; + + i.y = xy + wz; + j.y = t1 - (xx + zz); + k.y = yz - wx; + + i.z = xz - wy; + j.z = yz + wx; + k.z = t1 - (xx + yy); + return *this; + } + + template inline Matrix4& Matrix4::setRotation(const Matrix3& aRotation) + { + i.x = aRotation.i.x; i.y = aRotation.i.y; i.z = aRotation.i.z; + j.x = aRotation.j.x; j.y = aRotation.j.y; j.z = aRotation.j.z; + k.x = aRotation.k.x; k.y = aRotation.k.y; k.z = aRotation.k.z; + return *this; + } + + template inline Matrix4& Matrix4::makeRotation(const T& aXAngleRAD, const T& aYAngleRAD, const T& aZAngleRAD, RotationOrder3 aOrder) + { + switch(aOrder) + { + case ROTATION_XYZ: + makeRotationX(aXAngleRAD); + rotateY(aYAngleRAD); + rotateZ(aZAngleRAD); + break; + case ROTATION_XZY: + makeRotationX(aXAngleRAD); + rotateZ(aZAngleRAD); + rotateY(aYAngleRAD); + break; + case ROTATION_YXZ: + makeRotationY(aYAngleRAD); + rotateX(aXAngleRAD); + rotateZ(aZAngleRAD); + break; + case ROTATION_YZX: + makeRotationY(aYAngleRAD); + rotateZ(aZAngleRAD); + rotateX(aXAngleRAD); + break; + case ROTATION_ZXY: + makeRotationZ(aZAngleRAD); + rotateX(aXAngleRAD); + rotateY(aYAngleRAD); + break; + case ROTATION_ZYX: + makeRotationZ(aZAngleRAD); + rotateY(aYAngleRAD); + rotateX(aXAngleRAD); + break; + default: + break; + } + return *this; + } + + template inline Matrix4& Matrix4::makeRotation(const _Vector3& aAnglesRAD, RotationOrder3 aOrder) + { + return makeRotation(aAnglesRAD.x, aAnglesRAD.y, aAnglesRAD.z, aOrder); + } + + template inline Matrix4& Matrix4::makeRotationX(const T& aAngleRAD) + { + identity(); + const T c = effects_cos(aAngleRAD); + const T s = effects_sin(aAngleRAD); + j.y = c; + j.z = s; + k.y = -s; + k.z = c; + return *this; + } + + template inline Matrix4& Matrix4::makeRotationY(const T& aAngleRAD) + { + identity(); + const T c = effects_cos(aAngleRAD); + const T s = effects_sin(aAngleRAD); + i.x = c; + i.z = -s; + k.x = s; + k.z = c; + return *this; + } + + template inline Matrix4& Matrix4::makeRotationZ(const T& aAngleRAD) + { + identity(); + const T c = effects_cos(aAngleRAD); + const T s = effects_sin(aAngleRAD); + i.x = c; + i.y = s; + j.x = -s; + j.y = c; + return *this; + } + + template inline Matrix4& Matrix4::makeRotationAxis(const _Vector3& aAxis, const T& aAngleRAD) + { + return makeRotationAxis(aAxis.x, aAxis.y, aAxis.z, aAngleRAD); + } + + template inline Matrix4& Matrix4::makeRotationAxis(const T& aXAxis, const T& aYAxis, const T& aZAxis, const T& aAngleRAD) + { + static const T t1(1.0f); + + _Vector3 v(aXAxis, aYAxis, aZAxis); + v.normalize(); + const T sa = effects_sin(aAngleRAD); + const T ca = effects_cos(aAngleRAD); + const T inv_ca = t1 - ca; + + + identity(); + + i.x = ca + inv_ca * v.x * v.x; + i.y = inv_ca * v.x * v.y - sa * v.z; + i.z = inv_ca * v.z * v.x + sa * v.y; + j.x = inv_ca * v.x * v.y + sa * v.z; + j.y = ca + inv_ca * v.y * v.y; + j.z = inv_ca * v.y * v.z - sa * v.x; + k.x = inv_ca * v.z * v.x - sa * v.y; + k.y = inv_ca * v.y * v.z + sa * v.x; + k.z = ca + inv_ca * v.z * v.z; + + return *this; + } + + template inline Matrix4& Matrix4::makeRotation(const Quaternion& aRotation) + { + identity(); + return setRotation(aRotation); + } + + template inline Matrix4& Matrix4::makeRotation(const Matrix3& aRotation) + { + identity(); + return setRotation(aRotation); + } + + template inline Matrix4 Matrix4::createRotation(const T& aXAngleRAD, const T& aYAngleRAD, const T& aZAngleRAD, RotationOrder3 aOrder) + { + return Matrix4().makeRotation(aXAngleRAD, aYAngleRAD, aZAngleRAD, aOrder); + } + + template inline Matrix4 Matrix4::createRotation(const _Vector3& aAnglesRAD, RotationOrder3 aOrder) + { + return Matrix4().makeRotation(aAnglesRAD, aOrder); + } + + template inline Matrix4 Matrix4::createRotationX(const T& aAngleRAD) + { + return Matrix4().makeRotationX(aAngleRAD); + } + + template inline Matrix4 Matrix4::createRotationY(const T& aAngleRAD) + { + return Matrix4().makeRotationY(aAngleRAD); + } + + template inline Matrix4 Matrix4::createRotationZ(const T& aAngleRAD) + { + return Matrix4().makeRotationZ(aAngleRAD); + } + + template inline Matrix4 Matrix4::createRotationAxis(const _Vector3& aAxis, const T& aAngleRAD) + { + return Matrix4().makeRotationAxis(aAxis, aAngleRAD); + } + + template inline Matrix4 Matrix4::createRotationAxis(const T& aXAxis, const T& aYAxis, const T& aZAxis, const T& aAngleRAD) + { + return Matrix4().makeRotationAxis(aXAxis, aYAxis, aZAxis, aAngleRAD); + } + + template inline Matrix4 Matrix4::createRotation(const Quaternion& aRotation) + { + return Matrix4().makeRotation(aRotation); + } + + template inline Matrix4 Matrix4::createRotation(const Matrix3& aRotation) + { + return Matrix4().makeRotation(aRotation); + } + + template inline Matrix4& Matrix4::rotate(const T& aXAngleRAD, const T& aYAngleRAD, const T& aZAngleRAD, RotationOrder3 aOrder) + { + return rotate(Matrix4().makeRotation(aXAngleRAD, aYAngleRAD, aZAngleRAD, aOrder)); + } + template inline Matrix4& Matrix4::rotate(const _Vector3& aAnglesRAD, RotationOrder3 aOrder3) + { + return rotate(Matrix4().makeRotation(aAnglesRAD, aOrder3)); + } + template inline Matrix4& Matrix4::rotateX(const T& aAngleRAD) + { + return rotate(Matrix4().makeRotationX(aAngleRAD)); + } + template inline Matrix4& Matrix4::rotateY(const T& aAngleRAD) + { + return rotate(Matrix4().makeRotationY(aAngleRAD)); + } + template inline Matrix4& Matrix4::rotateZ(const T& aAngleRAD) + { + return rotate(Matrix4().makeRotationZ(aAngleRAD)); + } + template inline Matrix4& Matrix4::rotateAxis(const _Vector3& aAxis, const T& aAngleRAD) + { + return rotate(Matrix4().makeRotationAxis(aAxis, aAngleRAD)); + } + template inline Matrix4& Matrix4::rotateAxis(const T& aXAxis, const T& aYAxis, const T& aZAxis, const T& aAngleRAD) + { + return rotate(Matrix4().makeRotationAxis(aXAxis, aYAxis, aZAxis, aAngleRAD)); + } + template inline Matrix4& Matrix4::rotate(const Quaternion& aRotation) + { + return rotate(Matrix4().makeRotation(aRotation)); + } + template inline Matrix4& Matrix4::rotate(const Matrix3& aRotation) + { + const T _11 = i.x * aRotation.i.x + i.y * aRotation.j.x + i.z * aRotation.k.x; + const T _12 = i.x * aRotation.i.y + i.y * aRotation.j.y + i.z * aRotation.k.y; + const T _13 = i.x * aRotation.i.z + i.y * aRotation.j.z + i.z * aRotation.k.z; + + const T _21 = j.x * aRotation.i.x + j.y * aRotation.j.x + j.z * aRotation.k.x; + const T _22 = j.x * aRotation.i.y + j.y * aRotation.j.y + j.z * aRotation.k.y; + const T _23 = j.x * aRotation.i.z + j.y * aRotation.j.z + j.z * aRotation.k.z; + + const T _31 = k.x * aRotation.i.x + k.y * aRotation.j.x + k.z * aRotation.k.x; + const T _32 = k.x * aRotation.i.y + k.y * aRotation.j.y + k.z * aRotation.k.y; + const T _33 = k.x * aRotation.i.z + k.y * aRotation.j.z + k.z * aRotation.k.z; + + i.x = _11; i.y = _12; i.z = _13; + j.x = _21; j.y = _22; j.z = _23; + k.x = _31; k.y = _32; k.z = _33; + + return *this; + } + template inline Matrix4& Matrix4::rotate(const Matrix4& aRotation) + { + const T _11 = i.x * aRotation.i.x + i.y * aRotation.j.x + i.z * aRotation.k.x; + const T _12 = i.x * aRotation.i.y + i.y * aRotation.j.y + i.z * aRotation.k.y; + const T _13 = i.x * aRotation.i.z + i.y * aRotation.j.z + i.z * aRotation.k.z; + + const T _21 = j.x * aRotation.i.x + j.y * aRotation.j.x + j.z * aRotation.k.x; + const T _22 = j.x * aRotation.i.y + j.y * aRotation.j.y + j.z * aRotation.k.y; + const T _23 = j.x * aRotation.i.z + j.y * aRotation.j.z + j.z * aRotation.k.z; + + const T _31 = k.x * aRotation.i.x + k.y * aRotation.j.x + k.z * aRotation.k.x; + const T _32 = k.x * aRotation.i.y + k.y * aRotation.j.y + k.z * aRotation.k.y; + const T _33 = k.x * aRotation.i.z + k.y * aRotation.j.z + k.z * aRotation.k.z; + + i.x = _11; i.y = _12; i.z = _13; + j.x = _21; j.y = _22; j.z = _23; + k.x = _31; k.y = _32; k.z = _33; + + return *this; + } + template inline const Matrix4& Matrix4::getRotationAngles(T& aXAngleRAD, T& aYAngeRAD, T& aZAngleRAD, unsigned int aSolutionNumber) const + { + static const T t0(0.0f); + static const T t2(2.0f); + static const T pi(fPI); + + T& yaw = aZAngleRAD; + T& pitch = aYAngeRAD; + T& roll = aXAngleRAD; + + struct Euler + { + T yaw; + T pitch; + T roll; + }; + + Euler euler_out; + Euler euler_out2; //second solution + + // Check that pitch is not at a singularity + if(EffectsAbs(k.x) >= T(1.0f)) + { + euler_out.yaw = t0; + euler_out2.yaw = t0; + + // From difference of angles formula + T delta = effects_atan2(i.x, i.z); + if (k.x > 0) //gimbal locked up + { + euler_out.pitch = pi / t2; + euler_out2.pitch = pi / t2; + euler_out.roll = euler_out.pitch + delta; + euler_out2.roll = euler_out.pitch + delta; + } + else // gimbal locked down + { + euler_out.pitch = -pi / t2; + euler_out2.pitch = -pi / t2; + euler_out.roll = -euler_out.pitch + delta; + euler_out2.roll = -euler_out.pitch + delta; + } + } + else + { + euler_out.pitch = - effects_asin(k.x); + euler_out2.pitch = pi - euler_out.pitch; + + euler_out.roll = effects_atan2(k.y / effects_cos(euler_out.pitch), k.z / effects_cos(euler_out.pitch)); + + euler_out2.roll = effects_atan2(k.y / effects_cos(euler_out2.pitch), k.z / effects_cos(euler_out2.pitch)); + + euler_out.yaw = effects_atan2(j.x / effects_cos(euler_out.pitch), i.x / effects_cos(euler_out.pitch)); + + euler_out2.yaw = effects_atan2(j.x / effects_cos(euler_out2.pitch), i.x / effects_cos(euler_out2.pitch)); + } + + if (aSolutionNumber == 1) + { + yaw = euler_out.yaw; + pitch = euler_out.pitch; + roll = euler_out.roll; + } + else + { + yaw = euler_out2.yaw; + pitch = euler_out2.pitch; + roll = euler_out2.roll; + } + return *this; + } + template inline Quaternion& Matrix4::getQuaternion(Quaternion& aRotation) const + { + static const T t0(0.0f); + static const T thalf(0.5f); + static const T t1(1.0f); + + Quaternion& result = aRotation; + + T tr = i.x + j.y + k.z; // trace of martix + if(tr > t0) + { // if trace positive than "w" is biggest component + result.set(j.z - k.y, k.x - i.z, i.y - j.x, tr + t1); + result *= (T(0.5f) / effects_sqrt(result.w)); // "w" contain the "norm * 4" + + } + else // Some of vector components is bigger + { + if((i.x > j.y) && (i.x > k.z)) + { + result.set(t1 + i.x - j.y - k.z, j.x + i.y, k.x + i.z, j.z - k.y); + result *= (thalf / effects_sqrt(result.x)); + + } + else + { + if(j.y > k.z) + { + result.set(j.x + i.y, t1 + j.y - i.x - k.z, k.y + j.z, k.x - i.z); + result *= (thalf / effects_sqrt(result.x)); + + } + else + { + result.set(k.x + i.z, k.y + j.z, t1 + k.z - i.x - j.y, i.y - j.x); + result *= (thalf / effects_sqrt(result.z)); + + } + } + } + return result.normalize(); + } + template inline Quaternion Matrix4::getQuaternion() const + { + Quaternion result; + return getQuaternion(result); + } + template inline Matrix3 Matrix4::getRotation() const + { + return Matrix3(i.x, i.y, i.z, + j.x, j.y, j.z, + k.x, k.y, k.z); + } + + template inline Matrix4& Matrix4::makeScale(const T& aX, const T& aY, const T& aZ) + { + identity(); + return setScale(aX, aY, aZ); + } + template inline Matrix4& Matrix4::makeScale(const _Vector3& aScale) + { + return makeScale(aScale.x, aScale.y, aScale.z); + } + template inline Matrix4 Matrix4::createScale(const T& aX, const T& aY, const T& aZ) + { + return Matrix4().makeScale(aX, aY, aZ); + } + template inline Matrix4 Matrix4::createScale(const _Vector3& aScale) + { + return Matrix4().makeScale(aScale); + } + template inline Matrix4& Matrix4::setScale(const T& aX, const T& aY, const T& aZ) + { + i.x = aX; + j.y = aY; + k.z = aZ; + + i.y = i.z = j.x = j.z = k.x = k.y = T(0.0f); + return *this; + } + template inline Matrix4& Matrix4::setScale(const _Vector3& aScale) + { + return setScale(aScale.x, aScale.y, aScale.z); + } + template inline Matrix4& Matrix4::scale(const T& aX, const T& aY, const T& aZ) + { + i.x *= aX; i.y *= aY; i.z *= aZ; + j.x *= aX; j.y *= aY; j.z *= aZ; + k.x *= aX; k.y *= aY; k.z *= aZ; + + return *this; + } + template inline Matrix4& Matrix4::scale(const _Vector3& aScale) + { + return scale(aScale.x, aScale.y, aScale.z); + } + + template inline Matrix4& Matrix4::setTranslation(const T& aX, const T& aY, const T& aZ) + { + c.x = aX; + c.y = aY; + c.z = aZ; + return *this; + } + template inline Matrix4& Matrix4::setTranslation(const _Vector3& aTran) + { + return setTranslation(aTran.x, aTran.y, aTran.z); + } + template inline Matrix4& Matrix4::makeTranslation(const T& aX, const T& aY, const T& aZ) + { + identity(); + return setTranslation(aX, aY, aZ); + } + template inline Matrix4& Matrix4::makeTranslation(const _Vector3& aTran) + { + return makeTranslation(aTran.x, aTran.y, aTran.z); + } + template inline Matrix4 Matrix4::createTranslation(const T& aX, const T& aY, const T& aZ) + { + return Matrix4().makeTranslation(aX, aY, aZ); + } + template inline Matrix4 Matrix4::createTranslation(const _Vector3& aTran) + { + return Matrix4().makeTranslation(aTran); + } + template inline Matrix4& Matrix4::translate(const T& aX, const T& aY, const T& aZ) + { + c.x += aX; + c.y += aY; + c.z += aZ; + return *this; + } + template inline Matrix4& Matrix4::translate(const _Vector3& aTran) + { + return translate(aTran.x, aTran.y, aTran.z); + } + template inline _Vector3 Matrix4::getTranslation() const + { + return c.swizzle(0, 1, 2); + } + template inline Vector4 Matrix4::getFullTranslation() const + { + return c; + } + + template inline Matrix4& Matrix4::makeLookAtLH(const _Vector3& aEye, const _Vector3& aAt, const _Vector3& aUp) + { + static const T t0(0.0f); + static const T t1(1.0f); + + _Vector3 z((aAt - aEye).normalize()); + _Vector3 x; x.makeCrossed(aUp, z).normalize(); + _Vector3 y; y.makeCrossed(z, x); + + i.x = x.x; i.y = y.x; i.z = z.x; i.w = t0; + j.x = x.y; j.y = y.y; j.z = z.y; j.w = t0; + k.x = x.z; k.y = y.z; k.z = z.z; k.w = t0; + c.x = -x.dot(aEye); + c.y = -y.dot(aEye); + c.z = -z.dot(aEye); + c.w = t1; + return *this; + } + template inline Matrix4& Matrix4::makeLookAtRH(const _Vector3& aEye, const _Vector3& aAt, const _Vector3& aUp) + { + static const T t0(0.0f); + static const T t1(1.0f); + + _Vector3 z((aEye - aAt).normalize()); + _Vector3 x; x.makeCrossed(aUp, z).normalize(); + _Vector3 y; y.makeCrossed(z, x); + + i.x = x.x; i.y = y.x; i.z = z.x; i.w = t0; + j.x = x.y; j.y = y.y; j.z = z.y; j.w = t0; + k.x = x.z; k.y = y.z; k.z = z.z; k.w = t0; + c.x = -x.dot(aEye); + c.y = -y.dot(aEye); + c.z = -z.dot(aEye); + c.w = t1; + return *this; + } + template inline Matrix4& Matrix4::makeOrthoRH(const T& aWidth, const T& aHeight, const T& aZNear, const T& aZFar) + { + static const T t2(2.0f); + + identity(); + i.x = t2 / aWidth; + j.y = t2 / aHeight; + k.z = t2 / (aZNear - aZFar); + c.z = (aZFar + aZNear) / (aZNear - aZFar); + return *this; + } + template inline Matrix4& Matrix4::makeOrthoLH(const T& aWidth, const T& aHeight, const T& aZNear, const T& aZFar) + { + makeOrthoRH(aWidth, aHeight, aZNear, aZFar); + k.z = -k.z; + return *this; + } + template inline Matrix4& Matrix4::makeOrthoRH(const T& aLeft, const T& aRight, const T& aTop, const T& aBottom, const T& aZNear, const T& aZFar) + { + static const T t2(2.0f); + + identity(); + + i.x = t2 / (aRight - aLeft); + j.y = t2 / (aTop - aBottom); + k.z = t2 / (aZNear - aZFar); + + c.x = (aLeft + aRight) / (aLeft - aRight); + c.y = (aTop + aBottom) / (aBottom - aTop); + c.z = (aZFar + aZNear) / (aZNear - aZFar); + + return *this; + } + template inline Matrix4& Matrix4::makeOrthoLH(const T& aLeft, const T& aRight, const T& aTop, const T& aBottom, const T& aZNear, const T& aZFar) + { + makeOrthoRH(aLeft, aRight, aTop, aBottom, aZNear, aZFar); + k.z = -k.z; + return *this; + } + template inline Matrix4& Matrix4::makePerspectiveLH(const T& aLeft, const T& aRight, const T& aTop, const T& aBottom, const T& aZNear, const T& aZFar) + { + makePerspectiveRH(aLeft, aRight, aTop, aBottom, aZNear, aZFar); + k.z = -k.z; + return *this; + } + template inline Matrix4& Matrix4::makePerspectiveRH(const T& aLeft, const T& aRight, const T& aTop, const T& aBottom, const T& aZNear, const T& aZFar) + { + static const T t0(0.0f); + static const T t1(1.0f); + static const T t2(2.0f); + + identity(); + i.x = t2 * aZNear / (aRight - aLeft); + j.y = t2 * aZNear / (aTop - aBottom); + k.z = (aZFar + aZNear) / (aZNear - aZFar); + c.w = t0; + + k.w = -t1; + k.x = (aLeft + aRight) / (aRight - aLeft); + k.y = (aTop + aBottom) / (aTop - aBottom); + c.z = t2 * aZNear * aZFar / (aZNear - aZFar); + + return *this; + } + template inline Matrix4& Matrix4::makePerspectiveLH(const T& aWidth, const T& aHeight, const T& aZNear, const T& aZFar) + { + makePerspectiveRH(aWidth, aHeight, aZNear, aZFar); + k.z = -k.z; + return *this; + } + template inline Matrix4& Matrix4::makePerspectiveRH(const T& aWidth, const T& aHeight, const T& aZNear, const T& aZFar) + { + static const T t0(0.0f); + static const T t1(1.0f); + static const T t2(2.0f); + + identity(); + i.x = t2 * aZNear / aWidth; + j.y = t2 * aZNear / aHeight; + k.z = (aZFar + aZNear) / (aZNear - aZFar); + c.z = t2 * aZNear * aZFar / (aZNear - aZFar); + k.w = -t1; + c.w = t0; + return *this; + } + template inline Matrix4& Matrix4::makePerspectiveFovLH(const T& aFovY, const T& aAspect, const T& aZNear, const T& aZFar) + { + makePerspectiveFovRH(aFovY, aAspect, aZNear, aZFar); + k.z = -k.z; + return *this; + } + template inline Matrix4& Matrix4::makePerspectiveFovRH(const T& aFovY, const T& aAspect, const T& aZNear, const T& aZFar) + { + static const T t0(0.0f); + static const T t1(1.0f); + static const T t2(2.0f); + + identity(); + j.y = t1 / tan(aFovY / t2); + i.x = j.y / aAspect; + k.z = (aZFar + aZNear) / (aZNear - aZFar); + k.w = -t1; + c.z = t2 * (aZNear * aZFar / (aZNear - aZFar)); + c.w = t0; + return *this; + } + + template inline Matrix4 Matrix4::createLookAtLH(const _Vector3& aEye, const _Vector3& aAt, const _Vector3& aUp) + { + return Matrix4().makeLookAtLH(aEye, aAt, aUp); + } + template inline Matrix4 Matrix4::createLookAtRH(const _Vector3& aEye, const _Vector3& aAt, const _Vector3& aUp) + { + return Matrix4().makeLookAtRH(aEye, aAt, aUp); + } + template inline Matrix4 Matrix4::createOrthoRH(const T& aWidth, const T& aHeight, const T& aZNear, const T& aZFar) + { + return Matrix4().makeOrthoRH(aWidth, aHeight, aZNear, aZFar); + } + template inline Matrix4 Matrix4::createOrthoLH(const T& aWidth, const T& aHeight, const T& aZNear, const T& aZFar) + { + return Matrix4().makeOrthoLH(aWidth, aHeight, aZNear, aZFar); + } + template inline Matrix4 Matrix4::createOrthoRH(const T& aLeft, const T& aRight, const T& aTop, const T& aBottom, const T& aZNear, const T& aZFar) + { + return Matrix4().makeOrthoRH(aLeft, aRight, aTop, aBottom, aZNear, aZFar); + } + template inline Matrix4 Matrix4::createOrthoLH(const T& aLeft, const T& aRight, const T& aTop, const T& aBottom, const T& aZNear, const T& aZFar) + { + return Matrix4().makeOrthoLH(aLeft, aRight, aTop, aBottom, aZNear, aZFar); + } + template inline Matrix4 Matrix4::createPerspectiveLH(const T& aLeft, const T& aRight, const T& aTop, const T& aBottom, const T& aZNear, const T& aZFar) + { + return Matrix4().makePerspectiveLH(aLeft, aRight, aTop, aBottom, aZNear, aZFar); + } + template inline Matrix4 Matrix4::createPerspectiveRH(const T& aLeft, const T& aRight, const T& aTop, const T& aBottom, const T& aZNear, const T& aZFar) + { + return Matrix4().makePerspectiveRH(aLeft, aRight, aTop, aBottom, aZNear, aZFar); + } + template inline Matrix4 Matrix4::createPerspectiveLH(const T& aWidth, const T& aHeight, const T& aZnear, const T& aZFar) + { + return Matrix4().makePerspectiveLH(aWidth, aHeight, aZnear, aZFar); + } + template inline Matrix4 Matrix4::createPerspectiveRH(const T& aWidth, const T& aHeight, const T& aZnear, const T& aZFar) + { + return Matrix4().makePerspectiveRH(aWidth, aHeight, aZnear, aZFar); + } + template inline Matrix4 Matrix4::createPerspectiveFovLH(const T& aFovY, const T& aAspect, const T& aZnear, const T& aZFar) + { + return Matrix4().makePerspectiveFovLH(aFovY, aAspect, aZnear, aZFar); + } + template inline Matrix4 Matrix4::createPerspectiveFovRH(const T& aFovY, const T& aAspect, const T& aZnear, const T& aZFar) + { + return Matrix4().makePerspectiveFovRH(aFovY, aAspect, aZnear, aZFar); + } + + template inline bool Matrix4::getOrthoParamsRH(T& aLeft, T& aRight, T& aTop, T& aBottom, T& aZNear, T& aZFar) const + { + static const T t1(1.0f); + + aZNear = (c.z + t1) / k.z; + aZFar = (c.z - t1) / k.z; + + aLeft = -(t1 + c.x) / i.x; + aRight = (t1 - c.x) / i.x; + + aBottom = -(t1 + c.y) / j.y; + aTop = (t1 - c.y) / j.y; + + return true; + } + template inline bool Matrix4::getPerspectiveParamsRH(T& aLeft, T& aRight, T& aTop, T& aBottom, T& aZNear, T& aZFar) const + { + static const T t1(1.0f); + + aZNear = c.z / (k.z - t1); + aZFar = c.z / (t1 + k.z); + + aLeft = aZNear * (k.x - t1) / i.x; + aRight = aZNear * (t1 + k.x) / i.x; + + aTop = aZNear * (t1 + k.y) / j.y; + aBottom = aZNear * (k.y - t1) / j.y; + + return true; + } + template inline bool Matrix4::getPerspectiveParamsRH(T& aFovY, T& aAspect, T& aZNear, T& aZFar) const + { + T left, right, bottom, top; + bool result = getPerspectiveParamsRH(left, right, top, bottom, aZNear, aZFar); + if(result) + { + T height = top - bottom; + T width = right - left; + aAspect = width / height; + aFovY = T(2.0f) * effects_atan(height / aZNear * T(0.5f)); + } + return result; + } + template inline bool Matrix4::getViewParams(_Vector3& aPosition, _Vector3& aDirection, _Vector3& aUp, _Vector3& aRight) const + { + aRight.set(i.x, j.x, k.x); + aUp.set(i.y, j.y, k.y); + aDirection.set(-i.z, -j.z, -k.z); + aPosition = aDirection * c.z - aRight * c.x - aUp * c.y; + return true; + } + + template inline bool isEqual(const Matrix4& aLhv, const Matrix4& aRhv, const T& aEpsilon = effects_epsilon::epsilon()) + { + return isEqual(aLhv.i, aRhv.i, aEpsilon) && isEqual(aLhv.j, aRhv.j, aEpsilon) && isEqual(aLhv.k, aRhv.k, aEpsilon) && isEqual(aLhv.c, aRhv.c, aEpsilon); + } + template inline Matrix4 operator+(const Matrix4& aLhv, const Matrix4& aRhv) + { + return Matrix4(aLhv.i + aRhv.i, aLhv.j + aRhv.j, aLhv.k + aRhv.k, aLhv.c + aRhv.c); + } + template inline Matrix4 operator+(const Matrix4& aLhv, const T& aRhv) + { + return Matrix4(aLhv.i + aRhv, aLhv.j + aRhv, aLhv.k + aRhv, aLhv.c + aRhv); + } + template inline Matrix4 operator+(const T& aLhv, const Matrix4& aRhv) + { + return Matrix4(aLhv + aRhv.i, aLhv + aRhv.j, aLhv + aRhv.k, aLhv + aRhv.c); + } + template inline Matrix4 operator-(const Matrix4& aLhv, const Matrix4& aRhv) + { + return Matrix4(aLhv.i - aRhv.i, aLhv.j - aRhv.j, aLhv.k - aRhv.k, aLhv.c - aRhv.c); + } + template inline Matrix4 operator-(const Matrix4& aLhv, const T& aRhv) + { + return Matrix4(aLhv.i - aRhv, aLhv.j - aRhv, aLhv.k - aRhv, aLhv.c - aRhv); + } + template inline Matrix4 operator-(const T& aLhv, const Matrix4& aRhv) + { + return Matrix4(aLhv - aRhv.i, aLhv - aRhv.j, aLhv - aRhv.k, aLhv - aRhv.c); + } + template inline Matrix4 operator*(const Matrix4& aLhv, const Matrix4& aRhv) + { + return Matrix4( + aLhv.i.x * aRhv.i.x + aLhv.i.y * aRhv.j.x + aLhv.i.z * aRhv.k.x + aLhv.i.w * aRhv.c.x, + aLhv.i.x * aRhv.i.y + aLhv.i.y * aRhv.j.y + aLhv.i.z * aRhv.k.y + aLhv.i.w * aRhv.c.y, + aLhv.i.x * aRhv.i.z + aLhv.i.y * aRhv.j.z + aLhv.i.z * aRhv.k.z + aLhv.i.w * aRhv.c.z, + aLhv.i.x * aRhv.i.w + aLhv.i.y * aRhv.j.w + aLhv.i.z * aRhv.k.w + aLhv.i.w * aRhv.c.w, + + aLhv.j.x * aRhv.i.x + aLhv.j.y * aRhv.j.x + aLhv.j.z * aRhv.k.x + aLhv.j.w * aRhv.c.x, + aLhv.j.x * aRhv.i.y + aLhv.j.y * aRhv.j.y + aLhv.j.z * aRhv.k.y + aLhv.j.w * aRhv.c.y, + aLhv.j.x * aRhv.i.z + aLhv.j.y * aRhv.j.z + aLhv.j.z * aRhv.k.z + aLhv.j.w * aRhv.c.z, + aLhv.j.x * aRhv.i.w + aLhv.j.y * aRhv.j.w + aLhv.j.z * aRhv.k.w + aLhv.j.w * aRhv.c.w, + + aLhv.k.x * aRhv.i.x + aLhv.k.y * aRhv.j.x + aLhv.k.z * aRhv.k.x + aLhv.k.w * aRhv.c.x, + aLhv.k.x * aRhv.i.y + aLhv.k.y * aRhv.j.y + aLhv.k.z * aRhv.k.y + aLhv.k.w * aRhv.c.y, + aLhv.k.x * aRhv.i.z + aLhv.k.y * aRhv.j.z + aLhv.k.z * aRhv.k.z + aLhv.k.w * aRhv.c.z, + aLhv.k.x * aRhv.i.w + aLhv.k.y * aRhv.j.w + aLhv.k.z * aRhv.k.w + aLhv.k.w * aRhv.c.w, + + aLhv.c.x * aRhv.i.x + aLhv.c.y * aRhv.j.x + aLhv.c.z * aRhv.k.x + aLhv.c.w * aRhv.c.x, + aLhv.c.x * aRhv.i.y + aLhv.c.y * aRhv.j.y + aLhv.c.z * aRhv.k.y + aLhv.c.w * aRhv.c.y, + aLhv.c.x * aRhv.i.z + aLhv.c.y * aRhv.j.z + aLhv.c.z * aRhv.k.z + aLhv.c.w * aRhv.c.z, + aLhv.c.x * aRhv.i.w + aLhv.c.y * aRhv.j.w + aLhv.c.z * aRhv.k.w + aLhv.c.w * aRhv.c.w); + } + template inline Matrix4 operator*(const Matrix4& aLhv, const T& aRhv) + { + return Matrix4(aLhv.i * aRhv, aLhv.j * aRhv, aLhv.k * aRhv, aLhv.c * aRhv); + } + template inline Matrix4 operator*(const T& aLhv, const Matrix4& aRhv) + { + return Matrix4(aLhv * aRhv.i, aLhv * aRhv.j, aLhv * aRhv.k, aLhv * aRhv.c); + } + template inline Vector4 operator*(const Matrix4& aLhv, const Vector4& aRhv) + { + return Vector4(aLhv.i.dot(aRhv), aLhv.j.dot(aRhv), aLhv.k.dot(aRhv), aLhv.c.dot(aRhv)); + } + template inline Vector4 operator*(const Vector4& aLhv, const Matrix4& aRhv) + { + return aRhv.getAppliedTransform(aLhv); + } + template inline _Vector3 operator*(const _Vector3& aLhv, const Matrix4& aRhv) + { + return aRhv.getAppliedTransform(aLhv); + } + template inline _Vector3 operator*(const Matrix4& aLhv, const _Vector3& aRhv) + { + return _Vector3( aLhv.i.x * aRhv.x + aLhv.i.y * aRhv.y + aLhv.i.z * aRhv.z + aLhv.i.w, + aLhv.j.x * aRhv.x + aLhv.j.y * aRhv.y + aLhv.j.z * aRhv.z + aLhv.j.w, + aLhv.k.x * aRhv.x + aLhv.k.y * aRhv.y + aLhv.k.z * aRhv.z + aLhv.k.w); + } + template inline Matrix4 operator/(const Matrix4& aLhv, const T& aRhv) + { + return Matrix4(aLhv.i / aRhv, aLhv.j / aRhv, aLhv.k / aRhv, aLhv.c / aRhv); + } + template inline Matrix4 operator/(const T& aLhv, const Matrix4& aRhv) + { + return Matrix4(aLhv / aRhv.i, aLhv / aRhv.j, aLhv / aRhv.k, aLhv / aRhv.c); + } + template inline bool operator==(const Matrix4& aLhv, const Matrix4& aRhv) + { + return aLhv.i == aRhv.i && aLhv.j == aRhv.j && aLhv.k == aRhv.k && aLhv.c == aRhv.c; + } + template inline bool operator==(const Matrix4& aLhv, const T& aRhv) + { + return aLhv.i == aRhv && aLhv.j == aRhv && aLhv.k == aRhv && aLhv.c == aRhv; + } + template inline bool operator==(const T& aLhv, const Matrix4& aRhv) + { + return aLhv == aRhv.i && aLhv == aRhv.j && aLhv == aRhv.k && aLhv == aRhv.c; + } + template inline bool operator!=(const Matrix4& aLhv, const Matrix4& aRhv) + { + return !(aLhv == aRhv); + } + template inline bool operator!=(const Matrix4& aLhv, const T& aRhv) + { + return !(aLhv == aRhv); + } + template inline bool operator!=(const T& aLhv, const Matrix4& aRhv) + { + return !(aLhv == aRhv); + } +} } } } //Tizen::Ui::Effects::_Utils + +#endif //_FUI_EFFECTS_INTERNAL_UTILS_MATRIX4_H_ diff --git a/src/ui/effects/inc/utils/FUiEffects_UtilsVector2.h b/src/ui/effects/inc/utils/FUiEffects_UtilsVector2.h new file mode 100644 index 0000000..3b25b60 --- /dev/null +++ b/src/ui/effects/inc/utils/FUiEffects_UtilsVector2.h @@ -0,0 +1,435 @@ +// +// 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 FUiEffects_UtilsVector2.h + * @brief The _Vector2 class + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_UTILS_VECTOR2_H_ +#define _FUI_EFFECTS_INTERNAL_UTILS_VECTOR2_H_ + +#include "FUiEffects_UtilsAdapterFunctions.h" + +namespace Tizen { namespace Ui { namespace Effects { namespace _Utils +{ + template class _Vector3; + template class Vector4; + + template class _Vector2 + { + private: + typedef _Vector2 SelfType; + + public: + T x; + T y; + + inline _Vector2(); + inline explicit _Vector2(const T& aValue); + inline explicit _Vector2(const T* aValue); + inline _Vector2(const T& aX, const T& aY); + inline _Vector2(const SelfType& aOther); + + inline SelfType& operator=(const SelfType& aRhv); + + inline SelfType& set(const SelfType& aOther); + inline SelfType& set(const T& aX, const T& aY); + inline SelfType& set(const T& aValue); + inline SelfType& set(const T* aValue); + + inline SelfType operator-() const; + inline SelfType& inverse(); + inline SelfType getInversed() const; + + inline SelfType& operator+=(const SelfType& aRhv); + inline SelfType& operator+=(const T& aRhv); + inline SelfType& operator-=(const SelfType& aRhv); + inline SelfType& operator-=(const T& aRhv); + inline SelfType& operator*=(const SelfType& aRhv); + inline SelfType& operator*=(const T& aRhv); + inline SelfType& operator/=(const SelfType& aRhv); + inline SelfType& operator/=(const T& aRhv); + + inline SelfType operator+(const SelfType& aRhv) const; + inline SelfType operator+(const T& aRhv) const; + inline SelfType operator-(const SelfType& aRhv) const; + inline SelfType operator-(const T& aRhv) const; + inline SelfType operator*(const SelfType& aRhv) const; + inline SelfType operator*(const T& aRhv) const; + inline SelfType operator/(const SelfType& aRhv) const; + inline SelfType operator/(const T& aRhv) const; + inline bool operator==(const SelfType& aRhv) const; + + inline T* getPointer(); + inline const T* getPointer() const; + + inline SelfType& normalize(); + inline SelfType getNormalized() const; + + inline SelfType& lerp(const SelfType& aTo, const T& aCoeff); + inline SelfType getLerped(const SelfType& aTo, const T&) const; + inline SelfType& makeLerped(const SelfType& aFrom, const SelfType& aTo, const T&); + static inline SelfType createLerped(const SelfType& aFrom, const SelfType& aTo, const T&); + + inline T dot(const SelfType& aOther) const; + + inline SelfType& cross(const SelfType& aOther); + inline SelfType getCrossed(const SelfType& aOther) const; + inline SelfType& makeCrossed(const SelfType& aFirst, const SelfType& aSecond) const; + static inline SelfType createCrossed(const SelfType& aFirst, const SelfType& aSecond); + + inline T lengthSqr() const; + inline T length() const; + inline T distanceSqr(const SelfType& aOther) const; + inline T distance(const SelfType& aOther) const; + + inline _Vector2 swizzle(unsigned int aX, unsigned int aY) const; + inline _Vector3 swizzle(unsigned int aX, unsigned int aY, unsigned int aZ) const; + inline Vector4 swizzle(unsigned int aX, unsigned int aY, unsigned int aZ, unsigned int aW) const; + }; + + typedef _Vector2 Vec2f; + typedef _Vector2 Vector2; //for use in lua + typedef _Vector2 Vec2d; + + template inline _Vector2 operator+(const T& aLhv, const _Vector2& aRhv); + template inline _Vector2 operator-(const T& aLhv, const _Vector2& aRhv); + template inline _Vector2 operator*(const T& aLhv, const _Vector2& aRhv); + template inline _Vector2 operator/(const T& aLhv, const _Vector2& aRhv); + template inline bool operator==(const _Vector2& aLhv, const T& aRhv); + template inline bool operator==(const T& aLhv, const _Vector2& aRhv); + template inline bool operator!=(const _Vector2& aLhv, const _Vector2& aRhv); + template inline bool operator!=(const _Vector2& aLhv, const T& aRhv); + template inline bool operator!=(const T& aLhv, const _Vector2& aRhv); + + template _Vector2::_Vector2(void) : x(static_cast(0)), y(static_cast(0)) {} + template _Vector2::_Vector2(const T& aValue): x(aValue), y(aValue) {} + template _Vector2::_Vector2(const T* aValue): x(aValue[0]), y(aValue[1]) {} + template _Vector2::_Vector2(const T& aX, const T& aY): x(aX), y(aY) {} + template _Vector2::_Vector2(const _Vector2& aOther): x(aOther.x), y(aOther.y) {} + + template _Vector2& _Vector2::operator=(const _Vector2& aRhv) + { + if (this != &aRhv) + { + x = aRhv.x; + y = aRhv.y; + } + return *this; + } + + template _Vector2& _Vector2::set(const _Vector2& aOther) + { + return *this = aOther; + } + template _Vector2& _Vector2::set(const T& aX, const T& aY) + { + x = aX; + y = aY; + return *this; + } + template _Vector2& _Vector2::set(const T& aValue) + { + x = aValue; + y = aValue; + return *this; + } + template _Vector2& _Vector2::set(const T* aValue) + { + x = aValue[0]; + y = aValue[1]; + return *this; + } + + template _Vector2 _Vector2::operator-() const + { + return getInversed(); + } + template _Vector2& _Vector2::inverse() + { + x = -x; + y = -y; + return *this; + } + template _Vector2 _Vector2::getInversed() const + { + return _Vector2(-x, -y); + } + + template _Vector2& _Vector2::operator+=(const _Vector2& aRhv) + { + x += aRhv.x; + y += aRhv.y; + return *this; + } + template _Vector2& _Vector2::operator+=(const T& aRhv) + { + x += aRhv; + y += aRhv; + return *this; + } + template _Vector2& _Vector2::operator-=(const _Vector2& aRhv) + { + x -= aRhv.x; + y -= aRhv.y; + return *this; + } + template _Vector2& _Vector2::operator-=(const T& aRhv) + { + x -= aRhv; + y -= aRhv; + return *this; + } + template _Vector2& _Vector2::operator*=(const _Vector2& aRhv) + { + x *= aRhv.x; + y *= aRhv.y; + return *this; + } + template _Vector2& _Vector2::operator*=(const T& aRhv) + { + x *= aRhv; + y *= aRhv; + return *this; + } + template _Vector2& _Vector2::operator/=(const _Vector2& aRhv) + { + x /= aRhv.x; + y /= aRhv.y; + return *this; + } + template _Vector2& _Vector2::operator/=(const T& aRhv) + { + x /= aRhv; + y /= aRhv; + return *this; + } + + template T* _Vector2::getPointer() + { + return &x; + } + template const T* _Vector2::getPointer() const + { + return &x; + } + + template _Vector2& _Vector2::normalize() + { + const static T t0(0.0f); + + const T dist = length(); + if(EffectsEqual(t0, dist)) + return *this; + + return operator/=(dist); + } + template _Vector2 _Vector2::getNormalized() const + { + const static T t0(0.0f); + + const T dist = length(); + if(EffectsEqual(t0, dist)) + return *this; + + return *this / dist; + } + + template _Vector2& _Vector2::lerp(const _Vector2& aTo, const T& aCoeff) + { + x += (aTo.x - x) * aCoeff; + y += (aTo.y - y) * aCoeff; + return *this; + } + template _Vector2 _Vector2::getLerped(const _Vector2& aTo, const T& aCoeff) const + { + return _Vector2( + x + (aTo.x - x) * aCoeff, + y + (aTo.y - y) * aCoeff); + } + template _Vector2& _Vector2::makeLerped(const SelfType& aFrom, const SelfType& aTo, const T& aCoeff) + { + return set( + aFrom.x + (aTo.x - aFrom.x) * aCoeff, + aFrom.y + (aTo.y - aFrom.y) * aCoeff); + } + template _Vector2 _Vector2::createLerped(const SelfType& aFrom, const SelfType& aTo, const T& aCoeff) + { + return _Vector2().makeLerped(aFrom, aTo, aCoeff); + } + + template T _Vector2::dot(const _Vector2& aOther) const + { + return x * aOther.x + y * aOther.y; + } + + template _Vector2& _Vector2::cross(const _Vector2& aOther) + { + return set( + y - aOther.y, + aOther.x - x); + } + template _Vector2 _Vector2::getCrossed(const _Vector2& aOther) const + { + return _Vector2( + y - aOther.y, + aOther.x - x); + } + template _Vector2& _Vector2::makeCrossed(const SelfType& aFirst, const SelfType& aSecond) const + { + return set( + aFirst.y - aSecond.y, + aSecond.x - aFirst.x); + } + template _Vector2 _Vector2::createCrossed(const SelfType& aFirst, const SelfType& aSecond) + { + return _Vector2().makeCrossed(aFirst, aSecond); + } + + template T _Vector2::lengthSqr() const + { + return x * x + y * y; + } + template T _Vector2::length() const + { + return effects_sqrt(lengthSqr()); + } + template T _Vector2::distanceSqr(const SelfType& aOther) const + { + const T _x = aOther.x - x; + const T _y = aOther.y - y; + return _x * _x + _y * _y; + } + template T _Vector2::distance(const SelfType& aOther) const + { + return effects_sqrt(distanceSqr(aOther)); + } + + template _Vector2 _Vector2::swizzle(unsigned int aX, unsigned int aY) const + { + const T* pointer = getPointer(); + return _Vector2(pointer[aX], pointer[aY]); + } + + template _Vector3 _Vector2::swizzle(unsigned int aX, unsigned int aY, unsigned int aZ) const + { + const T* pointer = getPointer(); + return _Vector3(pointer[aX], pointer[aY], pointer[aZ]); + } + + template Vector4 _Vector2::swizzle(unsigned int aX, unsigned int aY, unsigned int aZ, unsigned int aW) const + { + const T* pointer = getPointer(); + return Vector4(pointer[aX], pointer[aY], pointer[aZ], pointer[aW]); + } + + + template inline bool isEqual(const _Vector2& aLhv, const _Vector2& aRhv, const T& aEpsilon = effects_epsilon::epsilon()) + { + return EffectsEqual(aLhv.x, aRhv.x, aEpsilon) && EffectsEqual(aLhv.y, aRhv.y, aEpsilon); + } + + template _Vector2 _Vector2::operator+(const _Vector2& aRhv) const + { + return _Vector2(x + aRhv.x, y + aRhv.y); + } + template _Vector2 _Vector2::operator+(const T& aRhv) const + { + return _Vector2(x + aRhv, y + aRhv); + } + + template inline _Vector2 operator+(const T& aLhv, const _Vector2& aRhv) + { + return _Vector2(aLhv + aRhv.x, aLhv + aRhv.y); + } + template _Vector2 _Vector2::operator-(const _Vector2& aRhv) const + { + return _Vector2(x - aRhv.x, y - aRhv.y); + } + template _Vector2 _Vector2::operator-(const T& aRhv) const + { + return _Vector2(x - aRhv, y - aRhv); + } + + template inline _Vector2 operator-(const T& aLhv, const _Vector2& aRhv) + { + return _Vector2(aLhv - aRhv.x, aLhv - aRhv.y); + } + template _Vector2 _Vector2::operator*(const _Vector2& aRhv) const + { + return _Vector2(x * aRhv.x, y * aRhv.y); + } + template _Vector2 _Vector2::operator*(const T& aRhv) const + { + return _Vector2(x * aRhv, y * aRhv); + } + + template inline _Vector2 operator*(const T& aLhv, const _Vector2& aRhv) + { + return _Vector2(aLhv * aRhv.x, aLhv * aRhv.y); + } + template _Vector2 _Vector2::operator/(const _Vector2& aRhv) const + { + if (EffectsEqual(aRhv.x, 0) || EffectsEqual(aRhv.y, 0)) + { + return _Vector2(0, 0); + } + return _Vector2(x / aRhv.x, y / aRhv.y); + } + template _Vector2 _Vector2::operator/(const T& aRhv) const + { + if (EffectsEqual(aRhv, 0)) + { + return _Vector2(0, 0); + } + return _Vector2(x / aRhv, y / aRhv); + } + + template inline _Vector2 operator/(const T& aLhv, const _Vector2& aRhv) + { + return _Vector2(aLhv / aRhv.x, aLhv / aRhv.y); + } + template bool _Vector2::operator==(const _Vector2& aRhv) const + { + return EffectsEqual(x, aRhv.x) && EffectsEqual(y, aRhv.y); + } + + template inline bool operator==(const _Vector2& aLhv, const T& aRhv) + { + return EffectsEqual(aLhv.x, aRhv) && EffectsEqual(aLhv.y, aRhv); + } + template inline bool operator==(const T& aLhv, const _Vector2& aRhv) + { + return EffectsEqual(aLhv, aRhv.x) && EffectsEqual(aLhv, aRhv.x); + } + template inline bool operator!=(const _Vector2& aLhv, const _Vector2& aRhv) + { + return !(aLhv == aRhv); + } + template inline bool operator!=(const _Vector2& aLhv, const T& aRhv) + { + return !(aLhv == aRhv); + } + template inline bool operator!=(const T& aLhv, const _Vector2& aRhv) + { + return !(aLhv == aRhv); + } + } } } } //Tizen::Ui::Effects::_Utils + +#endif //_FUI_EFFECTS_INTERNAL_UTILS_VECTOR2_H_ diff --git a/src/ui/effects/inc/utils/FUiEffects_UtilsVector3.h b/src/ui/effects/inc/utils/FUiEffects_UtilsVector3.h new file mode 100644 index 0000000..b60c874 --- /dev/null +++ b/src/ui/effects/inc/utils/FUiEffects_UtilsVector3.h @@ -0,0 +1,486 @@ +// +// 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 FUiEffects_UtilsVector3.h + * @brief The _Vector3 class + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_UTILS_VECTOR3_H_ +#define _FUI_EFFECTS_INTERNAL_UTILS_VECTOR3_H_ + +#include "FUiEffects_UtilsAdapterFunctions.h" + +namespace Tizen { namespace Ui { namespace Effects { namespace _Utils +{ + template class _Vector2; + template class Vector4; + + template class _Vector3 + { + private: + typedef _Vector3 SelfType; + + public: + T x; + T y; + T z; + + inline _Vector3(); + inline explicit _Vector3(const T& aValue); + inline explicit _Vector3(const T* aValue); + inline _Vector3(const T& aX, const T& aY, const T& aZ); + inline _Vector3(const _Vector2& aXY, const T& aZ); + inline _Vector3(const T& aX, const _Vector2& aYZ); + inline _Vector3(const SelfType& aOther); + + inline SelfType& operator=(const SelfType& aRhv); + + inline SelfType& set(const SelfType& aOther); + inline SelfType& set(const T& aX, const T& aY, const T& aZ); + inline SelfType& set(const _Vector2& aXY, const T& aZ); + inline SelfType& set(const T& aX, const _Vector2& aYZ); + inline SelfType& set(const T& aValue); + inline SelfType& set(const T* aValue); + + inline SelfType operator-() const; + inline SelfType& inverse(); + inline SelfType getInversed() const; + + inline SelfType& operator+=(const SelfType& aRhv); + inline SelfType& operator+=(const T& aRhv); + inline SelfType& operator-=(const SelfType& aRhv); + inline SelfType& operator-=(const T& aRhv); + inline SelfType& operator*=(const SelfType& aRhv); + inline SelfType& operator*=(const T& aRhv); + inline SelfType& operator/=(const SelfType& aRhv); + inline SelfType& operator/=(const T& aRhv); + + inline SelfType operator+(const SelfType& aRhv) const; + inline SelfType operator+(const T& aRhv) const; + inline SelfType operator-(const SelfType& aRhv) const; + inline SelfType operator-(const T& aRhv) const; + inline SelfType operator*(const SelfType& aRhv) const; + inline SelfType operator*(const T& aRhv) const; + inline SelfType operator/(const SelfType& aRhv) const; + inline SelfType operator/(const T& aRhv) const; + inline bool operator==(const SelfType& aRhv) const; + + inline T* getPointer(); + inline const T* getPointer() const; + + inline SelfType& normalize(); + inline SelfType& GetNormalizedVector3(); // for using in lua + inline SelfType getNormalized() const; + + inline SelfType& lerp(const SelfType& aTo, const T& aCoeff); + inline SelfType getLerped(const SelfType& aTo, const T& aCoeff) const; + inline SelfType& makeLerped(const SelfType& aFrom, const SelfType& aTo, const T& aCoeff); + static inline SelfType createLerped(const SelfType& aFrom, const SelfType& aTo, const T& aCoeff); + + inline T dot(const SelfType& aOther) const; + + inline SelfType& cross(const SelfType& aOther); + inline SelfType& GetCrossVector3(const SelfType& aOther); + inline SelfType getCrossed(const SelfType& aOther) const; + inline SelfType& makeCrossed(const SelfType& aFirst, const SelfType& aSecond); + static inline SelfType createCrossed(const SelfType& aFirst, const SelfType& aSecond); + + inline T lengthSqr() const; + inline T length() const; + inline T distanceSqr(const SelfType& aOther) const; + inline T distance(const SelfType& aOther) const; + + inline _Vector2 swizzle(unsigned int aX, unsigned int aY) const; + inline _Vector3 swizzle(unsigned int aX, unsigned int aY, unsigned int aZ) const; + inline Vector4 swizzle(unsigned int aX, unsigned int aY, unsigned int aZ, unsigned int aW) const; + }; + + typedef _Vector3 Vec3f; + typedef _Vector3 Vector3; //for use in lua + typedef _Vector3 Vec3d; + + template inline _Vector3 operator+(const T& aLhv, const _Vector3& aRhv); + template inline _Vector3 operator-(const T& aLhv, const _Vector3& aRhv); + template inline _Vector3 operator*(const T& aLhv, const _Vector3& aRhv); + template inline _Vector3 operator/(const T& aLhv, const _Vector3& aRhv); + template inline bool operator==(const _Vector3& aLhv, const T& aRhv); + template inline bool operator==(const T& aLhv, const _Vector3& aRhv); + template inline bool operator!=(const _Vector3& aLhv, const _Vector3& aRhv); + template inline bool operator!=(const _Vector3& aLhv, const T& aRhv); + template inline bool operator!=(const T& aLhv, const _Vector3& aRhv); + + template _Vector3::_Vector3(void) : x(static_cast(0)), y(static_cast(0)), z(static_cast(0)) {} + template _Vector3::_Vector3(const T& aValue): x(aValue), y(aValue), z(aValue) {} + template _Vector3::_Vector3(const T* aValue): x(aValue[0]), y(aValue[1]), z(aValue[2]) {} + template _Vector3::_Vector3(const T& aX, const T& aY, const T& aZ): x(aX), y(aY), z(aZ) {} + template _Vector3::_Vector3(const _Vector2& aXY, const T& aZ): x(aXY.x), y(aXY.y), z(aZ) {} + template _Vector3::_Vector3(const T& aX, const _Vector2& aYZ): x(aX), y(aYZ.x), z(aYZ.y) {} + template _Vector3::_Vector3(const _Vector3& aOther): x(aOther.x), y(aOther.y), z(aOther.z) {} + + template _Vector3& _Vector3::operator=(const _Vector3& aRhv) + { + if (this != &aRhv) + { + x = aRhv.x; + y = aRhv.y; + z = aRhv.z; + } + return *this; + } + + template _Vector3& _Vector3::set(const _Vector3& aOther) + { + return *this = aOther; + } + template _Vector3& _Vector3::set(const T& aX, const T& aY, const T& aZ) + { + x = aX; + y = aY; + z = aZ; + return *this; + } + template _Vector3& _Vector3::set(const _Vector2& aXY, const T& aZ) + { + x = aXY.x; + y = aXY.y; + z = aZ; + return *this; + } + template _Vector3& _Vector3::set(const T& aX, const _Vector2& aYZ) + { + x = aX; + y = aYZ.x; + z = aYZ.y; + return *this; + } + template _Vector3& _Vector3::set(const T& aValue) + { + x = aValue; + y = aValue; + z = aValue; + return *this; + } + template _Vector3& _Vector3::set(const T* aValue) + { + x = aValue[0]; + y = aValue[1]; + z = aValue[2]; + return *this; + } + + template _Vector3 _Vector3::operator-() const + { + return getInversed(); + } + template _Vector3& _Vector3::inverse() + { + x = -x; + y = -y; + z = -z; + return *this; + } + template _Vector3 _Vector3::getInversed() const + { + return _Vector3(-x, -y, -z); + } + + template _Vector3& _Vector3::operator+=(const _Vector3& aRhv) + { + x += aRhv.x; + y += aRhv.y; + z += aRhv.z; + return *this; + } + template _Vector3& _Vector3::operator+=(const T& aRhv) + { + x += aRhv; + y += aRhv; + z += aRhv; + return *this; + } + template _Vector3& _Vector3::operator-=(const _Vector3& aRhv) + { + x -= aRhv.x; + y -= aRhv.y; + z -= aRhv.z; + return *this; + } + template _Vector3& _Vector3::operator-=(const T& aRhv) + { + x -= aRhv; + y -= aRhv; + z -= aRhv; + return *this; + } + template _Vector3& _Vector3::operator*=(const _Vector3& aRhv) + { + x *= aRhv.x; + y *= aRhv.y; + z *= aRhv.z; + return *this; + } + template _Vector3& _Vector3::operator*=(const T& aRhv) + { + x *= aRhv; + y *= aRhv; + z *= aRhv; + return *this; + } + template _Vector3& _Vector3::operator/=(const _Vector3& aRhv) + { + x /= aRhv.x; + y /= aRhv.y; + z /= aRhv.z; + return *this; + } + template _Vector3& _Vector3::operator/=(const T& aRhv) + { + x /= aRhv; + y /= aRhv; + z /= aRhv; + return *this; + } + + template T* _Vector3::getPointer() + { + return &x; + } + template const T* _Vector3::getPointer() const + { + return &x; + } + + template _Vector3& _Vector3::normalize() + { + const static T t0(0.0f); + + const T dist = length(); + if(EffectsEqual(t0, dist)) + return *this; + + return operator/=(dist); + } + //--- for using in lua --------------------------------------------------------- + template _Vector3& _Vector3::GetNormalizedVector3() + { + return normalize(); + } + //------------------------------------------------------------------------------ + template _Vector3 _Vector3::getNormalized() const + { + const static T t0(0.0f); + + const T dist = length(); + if(EffectsEqual(t0, dist)) + return *this; + + return *this / dist; + } + + template _Vector3& _Vector3::lerp(const _Vector3& aTo, const T& aCoeff) + { + x += (aTo.x - x) * aCoeff; + y += (aTo.y - y) * aCoeff; + z += (aTo.z - z) * aCoeff; + return *this; + } + template _Vector3 _Vector3::getLerped(const _Vector3& aTo, const T& aCoeff) const + { + return _Vector3( + x + (aTo.x - x) * aCoeff, + y + (aTo.y - y) * aCoeff, + z + (aTo.z - z) * aCoeff); + } + template _Vector3& _Vector3::makeLerped(const SelfType& aFrom, const SelfType& aTo, const T& aCoeff) + { + return set( + aFrom.x + (aTo.x - aFrom.x) * aCoeff, + aFrom.y + (aTo.y - aFrom.y) * aCoeff, + aFrom.z + (aTo.z - aFrom.z) * aCoeff); + } + template _Vector3 _Vector3::createLerped(const SelfType& aFrom, const SelfType& aTo, const T& aCoeff) + { + return _Vector3().makeLerped(aFrom, aTo, aCoeff); + } + + template T _Vector3::dot(const _Vector3& aOther) const + { + return x * aOther.x + y * aOther.y + z * aOther.z; + } + + template _Vector3& _Vector3::cross(const _Vector3& aOther) + { + return set( + (y * aOther.z - z * aOther.y), + (z * aOther.x - x * aOther.z), + (x * aOther.y - y * aOther.x)); + } + //--- for using in lua code ----------------------------------------------------------- + template _Vector3& _Vector3::GetCrossVector3(const _Vector3& aOther) + { + return cross(aOther); + } + //-------------------------------------------------------------------------------------- + template _Vector3 _Vector3::getCrossed(const _Vector3& aOther) const + { + return _Vector3( + (y * aOther.z - z * aOther.y), + (z * aOther.x - x * aOther.z), + (x * aOther.y - y * aOther.x)); + } + template _Vector3& _Vector3::makeCrossed(const SelfType& aFirst, const SelfType& aSecond) + { + return set( + (aFirst.y * aSecond.z - aFirst.z * aSecond.y), + (aFirst.z * aSecond.x - aFirst.x * aSecond.z), + (aFirst.x * aSecond.y - aFirst.y * aSecond.x)); + } + template _Vector3 _Vector3::createCrossed(const SelfType& aFirst, const SelfType& aSecond) + { + return _Vector3().makeCrossed(aFirst, aSecond); + } + + template T _Vector3::lengthSqr() const + { + return x * x + y * y + z * z; + } + template T _Vector3::length() const + { + return effects_sqrt(lengthSqr()); + } + template T _Vector3::distanceSqr(const SelfType& aOther) const + { + T _x = aOther.x - x; + T _y = aOther.y - y; + T _z = aOther.z - z; + return _x * _x + _y * _y + _z * _z; + } + template T _Vector3::distance(const SelfType& aOther) const + { + return effects_sqrt(distanceSqr(aOther)); + } + + template _Vector2 _Vector3::swizzle(unsigned int aX, unsigned int aY) const + { + const T* pointer = getPointer(); + return _Vector2(pointer[aX], pointer[aY]); + } + template _Vector3 _Vector3::swizzle(unsigned int aX, unsigned int aY, unsigned int aZ) const + { + const T* pointer = getPointer(); + return _Vector3(pointer[aX], pointer[aY], pointer[aZ]); + } + template Vector4 _Vector3::swizzle(unsigned int aX, unsigned int aY, unsigned int aZ, unsigned int aW) const + { + const T* pointer = getPointer(); + return Vector4(pointer[aX], pointer[aY], pointer[aZ], pointer[aW]); + } + + template inline bool isEqual(const _Vector3& aLhv, const _Vector3& aRhv, const T& aEpsilon = effects_epsilon::epsilon()) + { + return EffectsEqual(aLhv.x, aRhv.x, aEpsilon) && EffectsEqual(aLhv.y, aRhv.y, aEpsilon) && EffectsEqual(aLhv.z, aRhv.z, aEpsilon); + } + template _Vector3 _Vector3::operator+(const _Vector3& aRhv) const + { + return _Vector3(x + aRhv.x, y + aRhv.y, z + aRhv.z); + } + template _Vector3 _Vector3::operator+(const T& aRhv) const + { + return _Vector3(x + aRhv, y + aRhv, z + aRhv); + } + + template inline _Vector3 operator+(const T& aLhv, const _Vector3& aRhv) + { + return _Vector3(aLhv + aRhv.x, aLhv + aRhv.y, aLhv + aRhv.z); + } + template _Vector3 _Vector3::operator-(const _Vector3& aRhv) const + { + return _Vector3(x - aRhv.x, y - aRhv.y, z - aRhv.z); + } + template _Vector3 _Vector3::operator-(const T& aRhv) const + { + return _Vector3(x - aRhv, y - aRhv, z - aRhv); + } + + template inline _Vector3 operator-(const T& aLhv, const _Vector3& aRhv) + { + return _Vector3(aLhv - aRhv.x, aLhv - aRhv.y, aLhv - aRhv.z); + } + template _Vector3 _Vector3::operator*(const _Vector3& aRhv) const + { + return _Vector3(x * aRhv.x, y * aRhv.y, z * aRhv.z); + } + template _Vector3 _Vector3::operator*(const T& aRhv) const + { + return _Vector3(x * aRhv, y * aRhv, z * aRhv); + } + + template inline _Vector3 operator*(const T& aLhv, const _Vector3& aRhv) + { + return _Vector3(aLhv * aRhv.x, aLhv * aRhv.y, aLhv * aRhv.z); + } + template _Vector3 _Vector3::operator/(const _Vector3& aRhv) const + { + if (EffectsEqual(aRhv.x, 0) || EffectsEqual(aRhv.y, 0) || EffectsEqual(aRhv.z, 0)) + { + return _Vector3(0, 0, 0); + } + return _Vector3(x / aRhv.x, y / aRhv.y, z / aRhv.z); + } + template _Vector3 _Vector3::operator/(const T& aRhv) const + { + if (EffectsEqual(aRhv, 0)) + { + return _Vector3(0, 0, 0); + } + return _Vector3(x / aRhv, y / aRhv, z / aRhv); + } + + template inline _Vector3 operator/(const T& aLhv, const _Vector3& aRhv) + { + return _Vector3(aLhv / aRhv.x, aLhv / aRhv.y, aLhv / aRhv.z); + } + template bool _Vector3::operator==(const _Vector3& aRhv) const + { + return EffectsEqual(x, aRhv.x) && EffectsEqual(y, aRhv.y) && EffectsEqual(z, aRhv.z); + } + + template inline bool operator==(const _Vector3& aLhv, const T& aRhv) + { + return EffectsEqual(aLhv.x, aRhv) && EffectsEqual(aLhv.y, aRhv) && EffectsEqual(aLhv.z, aRhv); + } + template inline bool operator==(const T& aLhv, const _Vector3& aRhv) + { + return EffectsEqual(aLhv, aRhv.x) && EffectsEqual(aLhv, aRhv.x) && EffectsEqual(aLhv, aRhv.z); + } + template inline bool operator!=(const _Vector3& aLhv, const _Vector3& aRhv) + { + return !(aLhv == aRhv); + } + template inline bool operator!=(const _Vector3& aLhv, const T& aRhv) + { + return !(aLhv == aRhv); + } + template inline bool operator!=(const T& aLhv, const _Vector3& aRhv) + { + return !(aLhv == aRhv); + } +} } } } //Tizen::Ui::Effects::_Utils + +#endif //_FUI_EFFECTS_INTERNAL_UTILS_VECTOR3_H_ diff --git a/src/ui/effects/inc/utils/FUiEffects_UtilsVector4.h b/src/ui/effects/inc/utils/FUiEffects_UtilsVector4.h new file mode 100644 index 0000000..3dcb9db --- /dev/null +++ b/src/ui/effects/inc/utils/FUiEffects_UtilsVector4.h @@ -0,0 +1,487 @@ +// +// 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 FUiEffects_UtilsVector4.h + * @brief The Vector4 class + * + */ + +#ifndef _FUI_EFFECTS_INTERNAL_UTILS_VECTOR4_H_ +#define _FUI_EFFECTS_INTERNAL_UTILS_VECTOR4_H_ + +#include "FUiEffects_UtilsAdapterFunctions.h" + +namespace Tizen { namespace Ui { namespace Effects { namespace _Utils +{ + template class _Vector2; + template class _Vector3; + + template class Vector4 + { + private: + typedef Vector4 SelfType; + + public: + T x; + T y; + T z; + T w; + + inline Vector4(); + inline explicit Vector4(const T& aValue); + inline explicit Vector4(const T* aValue); + inline Vector4(const T& aX, const T& aY, const T& aZ, const T& aW); + inline Vector4(const _Vector2& aXY, const T& aZ, const T& aW); + inline Vector4(const T& aX, const _Vector2& aYZ, const T& aW); + inline Vector4(const T& aX, const T& aY, const _Vector2& aZW); + inline Vector4(const _Vector3& aXYZ, const T& aW); + inline Vector4(const T& aX, const _Vector3& aYZW); + inline Vector4(const _Vector2& aXY, const _Vector2& aZW); + inline Vector4(const SelfType& aOther); + + inline SelfType& operator=(const SelfType& aRhv); + + inline SelfType& set(const SelfType& aOther); + inline SelfType& set(const T& aX, const T& aY, const T& aZ, const T& aW); + inline SelfType& set(const T& aValue); + inline SelfType& set(const T* aValue); + inline SelfType& set(const _Vector2& aXY, const T& aZ, const T& aW); + inline SelfType& set(const T& aX, const _Vector2& aYZ, const T& aW); + inline SelfType& set(const T& aX, const T& aY, const _Vector2& aZW); + inline SelfType& set(const _Vector3& aXYZ, const T& aW); + inline SelfType& set(const T& aX, const _Vector3& aYZW); + inline SelfType& set(const _Vector2& aXY, const _Vector2& aZW); + + inline SelfType operator-() const; + inline SelfType& inverse(); + inline SelfType getInversed() const; + + inline SelfType& operator+=(const SelfType& aRhv); + inline SelfType& operator+=(const T& aRhv); + inline SelfType& operator-=(const SelfType& aRhv); + inline SelfType& operator-=(const T& aRhv); + inline SelfType& operator*=(const SelfType& aRhv); + inline SelfType& operator*=(const T& aRhv); + inline SelfType& operator/=(const SelfType& aRhv); + inline SelfType& operator/=(const T& aRhv); + + inline T* getPointer(); + inline const T* getPointer() const; + + inline SelfType& normalize(); + inline SelfType getNormalized() const; + + inline SelfType& lerp(const SelfType& aTo, const T& aCoeff); + inline SelfType getLerped(const SelfType& aTo, const T& aCoeff) const; + inline SelfType& makeLerped(const SelfType& aFrom, const SelfType& aTo, const T& aCoeff); + static inline SelfType createLerped(const SelfType& aFrom, const SelfType& aTo, const T& aCoeff); + + inline T dot(const SelfType& aOther) const; + + inline T lengthSqr() const; + inline T length() const; + inline T distanceSqr(const SelfType& aOther) const; + inline T distance(const SelfType& aOther) const; + + inline _Vector2 swizzle(unsigned int aX, unsigned int aY) const; + inline _Vector3 swizzle(unsigned int aX, unsigned int aY, unsigned int aZ) const; + inline Vector4 swizzle(unsigned int aX, unsigned int aY, unsigned int aZ, unsigned int aW) const; + }; + + typedef Vector4 Vec4f; + typedef Vector4 Vec4d; + + template inline Vector4 operator+(const Vector4& aLhv, const Vector4& aRhv); + template inline Vector4 operator+(const Vector4& aLhv, const T& aRhv); + template inline Vector4 operator+(const T& aLhv, const Vector4& aRhv); + template inline Vector4 operator-(const Vector4& aLhv, const Vector4& aRhv); + template inline Vector4 operator-(const Vector4& aLhv, const T& aRhv); + template inline Vector4 operator-(const T& aLhv, const Vector4& aRhv); + template inline Vector4 operator*(const Vector4& aLhv, const Vector4& aRhv); + template inline Vector4 operator*(const Vector4& aLhv, const T& aRhv); + template inline Vector4 operator*(const T& aLhv, const Vector4& aRhv); + template inline Vector4 operator/(const Vector4& aLhv, const Vector4& aRhv); + template inline Vector4 operator/(const Vector4& aLhv, const T& aRhv); + template inline Vector4 operator/(const T& aLhv, const Vector4& aRhv); + template inline bool operator==(const Vector4& aLhv, const Vector4& aRhv); + template inline bool operator==(const Vector4& aLhv, const T& aRhv); + template inline bool operator==(const T& aLhv, const Vector4& aRhv); + template inline bool operator!=(const Vector4& aLhv, const Vector4& aRhv); + template inline bool operator!=(const Vector4& aLhv, const T& aRhv); + template inline bool operator!=(const T& aLhv, const Vector4& aRhv); + + template Vector4::Vector4() {} + template Vector4::Vector4(const T& aValue): x(aValue), y(aValue), z(aValue), w(aValue) {} + template Vector4::Vector4(const T* aValue): x(aValue[0]), y(aValue[1]), z(aValue[2]), w(aValue[3]) {} + template Vector4::Vector4(const T& aX, const T& aY, const T& aZ, const T& aW): x(aX), y(aY), z(aZ), w(aW) {} + template Vector4::Vector4(const Vector4& aOther): x(aOther.x), y(aOther.y), z(aOther.z), w(aOther.w) {} + template Vector4::Vector4(const _Vector2& aXY, const T& aZ, const T& aW): x(aXY.x), y(aXY.y), z(aZ), w(aW) {} + template Vector4::Vector4(const T& aX, const _Vector2& aYZ, const T& aW): x(aX), y(aYZ.x), z(aYZ.y), w(aW) {} + template Vector4::Vector4(const T& aX, const T& aY, const _Vector2& aZW): x(aX), y(aY), z(aZW.x), w(aZW.y) {} + template Vector4::Vector4(const _Vector3& aXYZ, const T& aW): x(aXYZ.x), y(aXYZ.y), z(aXYZ.z), w(aW) {} + template Vector4::Vector4(const T& aX, const _Vector3& aYZW): x(aX), y(aYZW.x), z(aYZW.y), w(aYZW.z) {} + template Vector4::Vector4(const _Vector2& aXY, const _Vector2& aZW): x(aXY.x), y(aXY.y), z(aZW.x), w(aZW.y) {} + + template Vector4& Vector4::operator=(const Vector4& aRhv) + { + x = aRhv.x; + y = aRhv.y; + z = aRhv.z; + w = aRhv.w; + return *this; + } + + template Vector4& Vector4::set(const Vector4& aOther) + { + return *this = aOther; + } + template Vector4& Vector4::set(const T& aX, const T& aY, const T& aZ, const T& aW) + { + x = aX; + y = aY; + z = aZ; + w = aW; + return *this; + } + template Vector4& Vector4::set(const T& aValue) + { + x = aValue; + y = aValue; + z = aValue; + w = aValue; + return *this; + } + template Vector4& Vector4::set(const T* aValue) + { + x = aValue[0]; + y = aValue[1]; + z = aValue[2]; + w = aValue[3]; + return *this; + } + template Vector4& Vector4::set(const _Vector2& aXY, const T& aZ, const T& aW) + { + x = aXY.x; + y = aXY.y; + z = aZ; + w = aW; + return *this; + } + template Vector4& Vector4::set(const T& aX, const _Vector2& aYZ, const T& aW) + { + x = aX; + y = aYZ.x; + z = aYZ.y; + w = aW; + return *this; + } + template Vector4& Vector4::set(const T& aX, const T& aY, const _Vector2& aZW) + { + x = aX; + y = aY; + z = aZW.x; + w = aZW.y; + return *this; + } + template Vector4& Vector4::set(const _Vector3& aXYZ, const T& aW) + { + x = aXYZ.x; + y = aXYZ.y; + z = aXYZ.z; + w = aW; + return *this; + } + template Vector4& Vector4::set(const T& aX, const _Vector3& aYZW) + { + x = aX; + y = aYZW.x; + z = aYZW.y; + w = aYZW.z; + return *this; + } + template Vector4& Vector4::set(const _Vector2& aXY, const _Vector2& aZW) + { + x = aXY.x; + y = aXY.y; + z = aZW.x; + w = aZW.y; + return *this; + } + + template Vector4 Vector4::operator-() const + { + return getInversed(); + } + template Vector4& Vector4::inverse() + { + x = -x; + y = -y; + z = -z; + w = -w; + return *this; + } + template Vector4 Vector4::getInversed() const + { + return Vector4(-x, -y, -z, -w); + } + + template Vector4& Vector4::operator+=(const Vector4& aRhv) + { + x += aRhv.x; + y += aRhv.y; + z += aRhv.z; + w += aRhv.w; + return *this; + } + template Vector4& Vector4::operator+=(const T& aRhv) + { + x += aRhv; + y += aRhv; + z += aRhv; + w += aRhv; + return *this; + } + template Vector4& Vector4::operator-=(const Vector4& aRhv) + { + x -= aRhv.x; + y -= aRhv.y; + z -= aRhv.z; + w -= aRhv.w; + return *this; + } + template Vector4& Vector4::operator-=(const T& aRhv) + { + x -= aRhv; + y -= aRhv; + z -= aRhv; + w -= aRhv; + return *this; + } + template Vector4& Vector4::operator*=(const Vector4& aRhv) + { + x *= aRhv.x; + y *= aRhv.y; + z *= aRhv.z; + w *= aRhv.w; + return *this; + } + template Vector4& Vector4::operator*=(const T& aRhv) + { + x *= aRhv; + y *= aRhv; + z *= aRhv; + w *= aRhv; + return *this; + } + template Vector4& Vector4::operator/=(const Vector4& aRhv) + { + x /= aRhv.x; + y /= aRhv.y; + z /= aRhv.z; + w /= aRhv.w; + return *this; + } + template Vector4& Vector4::operator/=(const T& aRhv) + { + x /= aRhv; + y /= aRhv; + z /= aRhv; + w /= aRhv; + return *this; + } + + template T* Vector4::getPointer() + { + return &x; + } + template const T* Vector4::getPointer() const + { + return &x; + } + + template Vector4& Vector4::normalize() + { + const static T t0(0.0f); + + const T dist = length(); + if(EffectsEqual(t0, dist)) + return *this; + + return operator/=(dist); + } + template Vector4 Vector4::getNormalized() const + { + const static T t0(0.0f); + + const T dist = length(); + if(EffectsEqual(t0, dist)) + return *this; + + return *this / dist; + } + + template Vector4& Vector4::lerp(const Vector4& aTo, const T& aCoeff) + { + x += (aTo.x - x) * aCoeff; + y += (aTo.y - y) * aCoeff; + z += (aTo.z - z) * aCoeff; + w += (aTo.w - w) * aCoeff; + return *this; + } + template Vector4 Vector4::getLerped(const Vector4& aTo, const T& aCoeff) const + { + return Vector4( + x + (aTo.x - x) * aCoeff, + y + (aTo.y - y) * aCoeff, + z + (aTo.z - z) * aCoeff, + w + (aTo.w - w) * aCoeff); + } + template Vector4& Vector4::makeLerped(const SelfType& aFrom, const SelfType& aTo, const T& aCoeff) + { + return set( + aFrom.x + (aTo.x - aFrom.x) * aCoeff, + aFrom.y + (aTo.y - aFrom.y) * aCoeff, + aFrom.z + (aTo.z - aFrom.z) * aCoeff, + aFrom.w + (aTo.w - aFrom.w) * aCoeff); + } + template Vector4 Vector4::createLerped(const SelfType& aFrom, const SelfType& aTo, const T& aCoeff) + { + return Vector4().makeLerped(aFrom, aTo, aCoeff); + } + + template T Vector4::dot(const Vector4& aOther) const + { + return x * aOther.x + y * aOther.y + z * aOther.z + w * aOther.w; + } + + template T Vector4::lengthSqr() const + { + return x * x + y * y + z * z + w * w; + } + template T Vector4::length() const + { + return effects_sqrt(lengthSqr()); + } + template T Vector4::distanceSqr(const SelfType& aOther) const + { + T _x = aOther.x - x; + T _y = aOther.y - y; + T _z = aOther.z - z; + T _w = aOther.w - w; + return _x * _x + _y * _y + _z * _z + _w * _w; + } + template T Vector4::distance(const SelfType& aOther) const + { + return effects_sqrt(distanceSqr(aOther)); + } + + template _Vector2 Vector4::swizzle(unsigned int aX, unsigned int aY) const + { + const T* pointer = getPointer(); + return _Vector2(pointer[aX], pointer[aY]); + } + template _Vector3 Vector4::swizzle(unsigned int aX, unsigned int aY, unsigned int aZ) const + { + const T* pointer = getPointer(); + return _Vector3(pointer[aX], pointer[aY], pointer[aZ]); + } + template Vector4 Vector4::swizzle(unsigned int aX, unsigned int aY, unsigned int aZ, unsigned int aW) const + { + const T* pointer = getPointer(); + return Vector4(pointer[aX], pointer[aY], pointer[aZ], pointer[aW]); + } + + template inline bool isEqual(const Vector4& aLhv, const Vector4& aRhv, const T& aEpsilon = effects_epsilon::epsilon()) + { + return EffectsEqual(aLhv.x, aRhv.x, aEpsilon) && EffectsEqual(aLhv.y, aRhv.y, aEpsilon) && EffectsEqual(aLhv.z, aRhv.z, aEpsilon) && EffectsEqual(aLhv.w, aRhv.w, aEpsilon); + } + template inline Vector4 operator+(const Vector4& aLhv, const Vector4& aRhv) + { + return Vector4(aLhv.x + aRhv.x, aLhv.y + aRhv.y, aLhv.z + aRhv.z, aLhv.w + aRhv.w); + } + template inline Vector4 operator+(const Vector4& aLhv, const T& aRhv) + { + return Vector4(aLhv.x + aRhv, aLhv.y + aRhv, aLhv.z + aRhv, aLhv.w + aRhv); + } + template inline Vector4 operator+(const T& aLhv, const Vector4& aRhv) + { + return Vector4(aLhv + aRhv.x, aLhv + aRhv.y, aLhv + aRhv.z, aLhv + aRhv.w); + } + template inline Vector4 operator-(const Vector4& aLhv, const Vector4& aRhv) + { + return Vector4(aLhv.x - aRhv.x, aLhv.y - aRhv.y, aLhv.z - aRhv.z, aLhv.w - aRhv.w); + } + template inline Vector4 operator-(const Vector4& aLhv, const T& aRhv) + { + return Vector4(aLhv.x - aRhv, aLhv.y - aRhv, aLhv.z - aRhv, aLhv.w - aRhv); + } + template inline Vector4 operator-(const T& aLhv, const Vector4& aRhv) + { + return Vector4(aLhv - aRhv.x, aLhv - aRhv.y, aLhv - aRhv.z, aLhv - aRhv.w); + } + template inline Vector4 operator*(const Vector4& aLhv, const Vector4& aRhv) + { + return Vector4(aLhv.x * aRhv.x, aLhv.y * aRhv.y, aLhv.z * aRhv.z, aLhv.w * aRhv.w); + } + template inline Vector4 operator*(const Vector4& aLhv, const T& aRhv) + { + return Vector4(aLhv.x * aRhv, aLhv.y * aRhv, aLhv.z * aRhv, aLhv.w * aRhv); + } + template inline Vector4 operator*(const T& aLhv, const Vector4& aRhv) + { + return Vector4(aLhv * aRhv.x, aLhv * aRhv.y, aLhv * aRhv.z, aLhv * aRhv.w); + } + template inline Vector4 operator/(const Vector4& aLhv, const Vector4& aRhv) + { + return Vector4(aLhv.x / aRhv.x, aLhv.y / aRhv.y, aLhv.z / aRhv.z, aLhv.w / aRhv.w); + } + template inline Vector4 operator/(const Vector4& aLhv, const T& aRhv) + { + return Vector4(aLhv.x / aRhv, aLhv.y / aRhv, aLhv.z / aRhv, aLhv.w / aRhv); + } + template inline Vector4 operator/(const T& aLhv, const Vector4& aRhv) + { + return Vector4(aLhv / aRhv.x, aLhv / aRhv.y, aLhv / aRhv.z, aLhv / aRhv.w); + } + template inline bool operator==(const Vector4& aLhv, const Vector4& aRhv) + { + return EffectsEqual(aLhv.x, aRhv.x) && EffectsEqual(aLhv.y, aRhv.y) && EffectsEqual(aLhv.z, aRhv.z) && EffectsEqual(aLhv.w, aRhv.w); + } + template inline bool operator==(const Vector4& aLhv, const T& aRhv) + { + return EffectsEqual(aLhv.x, aRhv) && EffectsEqual(aLhv.y, aRhv) && EffectsEqual(aLhv.z, aRhv) && EffectsEqual(aLhv.w, aRhv); + } + template inline bool operator==(const T& aLhv, const Vector4& aRhv) + { + return EffectsEqual(aLhv, aRhv.x) && EffectsEqual(aLhv, aRhv.x) && EffectsEqual(aLhv, aRhv.z) && EffectsEqual(aLhv, aRhv.w); + } + template inline bool operator!=(const Vector4& aLhv, const Vector4& aRhv) + { + return !(aLhv == aRhv); + } + template inline bool operator!=(const Vector4& aLhv, const T& aRhv) + { + return !(aLhv == aRhv); + } + template inline bool operator!=(const T& aLhv, const Vector4& aRhv) + { + return !(aLhv == aRhv); + } +} } } } //Tizen::Ui::Effects::_Utils + +#endif //_FUI_EFFECTS_INTERNAL_UTILS_VECTOR4_H_ diff --git a/src/ui/effects/parser/FUiEffects_ParserEffectParser.cpp b/src/ui/effects/parser/FUiEffects_ParserEffectParser.cpp new file mode 100644 index 0000000..415be17 --- /dev/null +++ b/src/ui/effects/parser/FUiEffects_ParserEffectParser.cpp @@ -0,0 +1,2286 @@ +// +// 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. +// + +#include +#include +#include +#include + +#include +#include +#include "../FUiEffects_EffectErrorMessages.h" + +#include +#include +#include +#include + +using namespace Tizen::Ui::Effects::_Runtime; +using namespace Tizen::Ui::Effects::_PhysicsEngine; +using namespace Tizen::Ui::Effects::_Renderer; +using namespace Tizen::Ui::Effects::_Utils; + +namespace Tizen { namespace Ui { namespace Effects { namespace _Parser +{ + +EffectParser* EffectParser::__pInstance = null; + +const std::string EffectParser::__MANIFEST_FILE_NAME = "manifest.xml"; +const std::string EffectParser::__SCENE_FILE_NAME = "scene.xml"; +const std::string EffectParser::__SCRIPT_FILE_NAME = "script.lua"; + +namespace +{ +bool +FileExists(const char* pPath) +{ + bool result = true; + std::fstream file; + + file.open(pPath, std::fstream::in); + + if (file.is_open()) + { + file.close(); + } + else + { + result = false; + } + + return result; +} +} // namespace + +Vec3f EffectParser::StringHexToRgb(const std::string& stringColor) +{ + Vec3f rgbColor; + unsigned long int bytes = strtoul(stringColor.c_str(), null, 16); + + unsigned char nextByte = bytes; + rgbColor.z = nextByte / float (UCHAR_MAX); + bytes = bytes >> CHAR_BIT; + nextByte = bytes; + rgbColor.y = nextByte / float (UCHAR_MAX); + bytes = bytes >> CHAR_BIT; + nextByte = bytes; + rgbColor.x = nextByte / float (UCHAR_MAX); + + return rgbColor; +} + +EffectParser::SceneData::SceneData() + : timerTimeout(0u) + , ambientColor(Vec3f(1.0f, 1.0f, 1.0f)) + , intensity(1.0f) + , attenuation(0.f) +{ +} + +EffectParser::ViewportData::ViewportData() + : x(0.f) + , y(0.f) + , z(0.f) + , width(0.f) + , height(0.f) + , near(0.f) + , far(0.f) + , angle(0.f) + , perspective(false) +{ +} + +EffectParser::EffectParser(void) + : __pXmlParser(null) + , __currentModelFilesDirectoryPath("") + , __elementBuffer(0) + , __pointSurfaceNurbsIndices() + , __elementSurfaceBuffer(0) + , __unitLightBuffer(0) + , __pCurrentGraphicalSurface(null) + , __currentGravityForce(0, 0, 0) + , __currentGravityForceValue(0.f) + , __modelSurfaceBuffer(0) + , __lastSceneXMLElementIndex(0) + , __lastModelSurfaceXMLElementIndex(0) + , __lastGraphicalSurfaceXMLElementIndex(0) + , __pCurrentEffectModel(null) + , __pCurrentEffectManager(null) + , __currentEffectId(0l) + , __currentModelBehaviourType(EFFECT_TYPE_TIME_BASED) + , __currentEffectDuration(0.f) + , __currentEffectInstanceName("") + , __currentModelSurfaceX(0.f) + , __currentModelSurfaceY(0.f) + , __currentGraphicalSurfaceDimCtrlX(0u) + , __currentGraphicalSurfaceDimCtrlY(0u) + , __insideGraphicalSurface(false) + , __rightAfterSceneStart(false) + , __rightAfterModelSurfaceStart(false) + , __rightAfterGraphicalSurfaceStart(false) + , __insideVectorX(false) + , __insideVectorY(false) + , __buildingModelFailed(false) + , __insideElementsPool(false) +{ + __pXmlParser = std::unique_ptr(new (std::nothrow) XmlParser(this)); + + SysTryReturnVoidResult(NID_UI_EFFECT, + __pXmlParser.get() != null, + E_OUT_OF_MEMORY, + _UiEffectError::OUT_OF_MEMORY + ); +} + +EffectParser::~EffectParser(void) +{ + __pInstance = null; +} + +bool +EffectParser::ExtractModelFiles(const char* pPath) +{ + bool result = true; + + if (!XmlParser::ExtractFromArchive(pPath, __currentModelFilesDirectoryPath.c_str())) + { + SysLogException(NID_UI_EFFECT, result = false, "Effects. Unzipping of \"%s\" failed!", pPath); + } + + if (result) + { + std::string sceneFilePath = __currentModelFilesDirectoryPath + __SCENE_FILE_NAME; + std::string manifestFilePath = __currentModelFilesDirectoryPath + __MANIFEST_FILE_NAME; + std::string scriptFilePath = __currentModelFilesDirectoryPath + __SCRIPT_FILE_NAME; + + if ( !FileExists(sceneFilePath.c_str()) || + !FileExists(manifestFilePath.c_str()) || + !FileExists(scriptFilePath.c_str())) + { + SysLogException(NID_UI_EFFECT, result = false, "Effects. Effect file is incomplete!", pPath); + } + } + + return result; +} + +bool +EffectParser::ParseEffectFile(const char* pEffectFilePath, const char* pModelFilesDirectoryPath) +{ + bool result = true; + std::string sceneFilePath; + std::string manifestFilePath; + + if (__pInstance == null) + { + __pInstance = new (std::nothrow) EffectParser(); + } + + SysTryCatchLabel(NID_UI_EFFECT, __pInstance != null, result = false, CATCH1, E_OUT_OF_MEMORY, Tizen::Ui::Effects::_UiEffectError::OUT_OF_MEMORY); + + SysTryCatchLabel(NID_UI_EFFECT, __pInstance->__pXmlParser != null, result = false, CATCH1, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + __pInstance->__currentModelFilesDirectoryPath = pModelFilesDirectoryPath; + + sceneFilePath = __pInstance->__currentModelFilesDirectoryPath + __SCENE_FILE_NAME; + manifestFilePath = __pInstance->__currentModelFilesDirectoryPath + __MANIFEST_FILE_NAME; + + __pInstance->__buildingModelFailed = false; + + SysTryCatchLabel(NID_UI_EFFECT, __pInstance->ExtractModelFiles(pEffectFilePath), result = false; + __pInstance->ClearModelFiles(); , CATCH2, E_OPERATION_FAILED, Tizen::Ui::Effects::_UiEffectError::EP_EXTRACTING_MODEL_FILES_FAILED); + + result = __pInstance->__pXmlParser->Parse(manifestFilePath.c_str(), false) && __pInstance->__pXmlParser->Parse(sceneFilePath.c_str(), false); + + __pInstance->ClearModelFiles(); // should always go before calling _clearBuffers() + __pInstance->ClearBuffers(); // not necessary unless XMLParser was sending callbacks by mistake + + if (result) + { + SysLog(NID_UI_EFFECT, "Effects. XML-parsing of the XML-files was successful"); + } + else + { + SysLog(NID_UI_EFFECT, "Effects. XML-parsing of one of the XML-files failed"); + } + + delete __pInstance; + __pInstance = null; + + return result; + +CATCH2: + __pInstance->ClearModelFiles(); +CATCH1: + delete __pInstance; + __pInstance = null; + + return result; +} + +result +EffectParser::ParseEffectFileLoadModel(const char* pEffectFilePath, const char* pModelFilesDirectoryPath, + IEffectModelListener* effectsManager, long effectModelID, + IEffectModelManager*& pEffectModel, EffectRenderer*& pEffectRenderer, int& modelTimerTimeout) +{ + std::unique_ptr pEffectModelTemp; + EffectRendererUniquePtr pRenderer; + std::string sceneFilePath; + std::string manifestFilePath; + result res = E_SUCCESS; + + if (__pInstance == null) + { + __pInstance = new (std::nothrow) EffectParser(); + } + + SysTryReturn(NID_UI_EFFECT, __pInstance != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, Tizen::Ui::Effects::_UiEffectError::OUT_OF_MEMORY); + + SysTryCatchLabel(NID_UI_EFFECT, __pInstance->__pXmlParser != null, , CATCH1, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + __pInstance->__currentModelFilesDirectoryPath = pModelFilesDirectoryPath; + + sceneFilePath = __pInstance->__currentModelFilesDirectoryPath + __SCENE_FILE_NAME; + manifestFilePath = __pInstance->__currentModelFilesDirectoryPath + __MANIFEST_FILE_NAME; + + __pInstance->__buildingModelFailed = false; + + SysTryCatchLabel(NID_UI_EFFECT, __pInstance->ExtractModelFiles(pEffectFilePath), , CATCH2, E_OPERATION_FAILED, + Tizen::Ui::Effects::_UiEffectError::EP_EXTRACTING_MODEL_FILES_FAILED); + + __pInstance->__lastSceneXMLElementIndex = -1; + __pInstance->__lastModelSurfaceXMLElementIndex = -1; + __pInstance->__lastGraphicalSurfaceXMLElementIndex = -1; + __pInstance->__pCurrentEffectModel = null; + __pInstance->__pCurrentGraphicalSurface = null; + __pInstance->__pCurrentVectorXBuffer.reset(); + __pInstance->__pCurrentVectorYBuffer.reset(); + __pInstance->__insideGraphicalSurface = false; + __pInstance->__rightAfterSceneStart = false; + __pInstance->__rightAfterModelSurfaceStart = false; + __pInstance->__rightAfterGraphicalSurfaceStart = false; + __pInstance->__insideVectorX = false; + __pInstance->__insideVectorY = false; + __pInstance->__insideElementsPool = false; + __pInstance->__pCurrentEffectManager = effectsManager; + __pInstance->__currentEffectId = effectModelID; + __pInstance->__currentModelBehaviourType = EFFECT_TYPE_TIME_BASED; + __pInstance->__currentEffectDuration = 0.0f; + __pInstance->__currentEffectInstanceName = ""; + __pInstance->__currentSceneData.timerTimeout = 30; + __pInstance->__currentSceneData.ambientColor = Vec3f(0.0f, 0.0f, 0.0f); + __pInstance->__currentSceneData.intensity = 1.0f; + __pInstance->__currentSceneData.attenuation = 0.0f; + __pInstance->__currentViewportData.x = 0.0f; + __pInstance->__currentViewportData.y = 0.0f; + __pInstance->__currentViewportData.z = 0.0f; + __pInstance->__currentViewportData.width = 0.0f; + __pInstance->__currentViewportData.height = 0.0f; + __pInstance->__currentViewportData.near = 0.0f; + __pInstance->__currentViewportData.far = 0.0f; + __pInstance->__currentViewportData.angle = 0.0f; + __pInstance->__currentViewportData.perspective = false; + __pInstance->__currentModelSurfaceX = 0.0f; + __pInstance->__currentModelSurfaceY = 0.0f; + __pInstance->__currentGraphicalSurfaceDimCtrlX = 0; + __pInstance->__currentGraphicalSurfaceDimCtrlY = 0; + __pInstance->__currentGravityForceValue = 0.0f; + + SysTryCatchLabel(NID_UI_EFFECT, __pInstance->__pXmlParser->Parse(manifestFilePath.c_str(), true) && __pInstance->__pXmlParser->Parse(sceneFilePath.c_str(), true), + __pInstance->__buildingModelFailed = true, CATCH2, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + SysTryCatchLabel(NID_UI_EFFECT, !__pInstance->__buildingModelFailed, , CATCH2, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + pEffectModelTemp = std::move(__pInstance->__pCurrentEffectModel); + + SetLastResult(E_SUCCESS); + + if(EffectRenderer::CheckOpenGlesInitialized()) + { + SysTryCatchLabel(NID_UI_EFFECT, SETJMP == 0, pEffectModelTemp.reset(); pRenderer.reset(); , + CATCH2, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult())); + + pRenderer = EffectRendererUniquePtr(new (std::nothrow) EffectRenderer()); + + SysTryCatchLabel(NID_UI_EFFECT, pRenderer != null, pEffectModelTemp.reset();, + CATCH2, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + + res = GetLastResult(); + + SysTryCatchLabel(NID_UI_EFFECT, res == E_SUCCESS || res == E_OPERATION_FAILED, pEffectModelTemp.reset(); pRenderer.reset(); , + CATCH2, res, "[%s] Propagating.", GetErrorMessage(res)); + + if (res == E_OPERATION_FAILED) + { + SysLog(NID_UI_EFFECT, "Renderer has invalid context"); + SetLastResult(E_SUCCESS); + + pRenderer.reset(); + } + else + { + pRenderer->SetWorld( + __pInstance->__currentViewportData.x, + __pInstance->__currentViewportData.x + __pInstance->__currentViewportData.width, + __pInstance->__currentViewportData.y, + __pInstance->__currentViewportData.y + __pInstance->__currentViewportData.height, + __pInstance->__currentViewportData.z, + __pInstance->__currentViewportData.near, + __pInstance->__currentViewportData.far, + __pInstance->__currentViewportData.angle, + __pInstance->__currentViewportData.perspective); + + pRenderer->Construct(*pEffectModelTemp->GetRenderingData()); + + res = GetLastResult(); + SysTryCatchLabel(NID_UI_EFFECT, res == E_SUCCESS, pEffectModelTemp.reset(); pRenderer.reset(); , + CATCH2, res, "[%s] Propagating.", GetErrorMessage(res)); + } + } + + pEffectRenderer = pRenderer.release(); + + modelTimerTimeout = __pInstance->__currentSceneData.timerTimeout; + + __pInstance->ClearModelFiles(); + __pInstance->ClearBuffers(); + delete __pInstance; + __pInstance = null; + + pEffectModel = pEffectModelTemp.release(); + + return GetLastResult(); + +CATCH2: + __pInstance->ClearModelFiles(); + __pInstance->ClearBuffers(); +CATCH1: + delete __pInstance; + __pInstance = null; + + return GetLastResult(); +} + +void +EffectParser::StartElement(const char* pElementName) +{ + if (__buildingModelFailed) + { + return; + } + + std::string elementNameLowerCase(pElementName); + + XmlElement newElement; + newElement.name = elementNameLowerCase; + __elementBuffer.push_back(newElement); + + if (__rightAfterSceneStart) + { + PriorReadSceneData(); + __rightAfterSceneStart = false; + } + + if (__rightAfterModelSurfaceStart) + { + PriorReadModelSurfaceData(); + __rightAfterModelSurfaceStart = false; + } + + if (__rightAfterGraphicalSurfaceStart) + { + PriorReadGraphicalSurfaceData(); + __rightAfterGraphicalSurfaceStart = false; + } + + if (elementNameLowerCase == "Scene") + { + __rightAfterSceneStart = true; + __lastSceneXMLElementIndex = (int) __elementBuffer.size() - 1; + + return; + } + + if (elementNameLowerCase == "Model") + { + __rightAfterModelSurfaceStart = true; + __lastModelSurfaceXMLElementIndex = (int) __elementBuffer.size() - 1; + + return; + } + + if (elementNameLowerCase == "GraphicalSurface") + { + __rightAfterGraphicalSurfaceStart = true; + __lastGraphicalSurfaceXMLElementIndex = (int) __elementBuffer.size() - 1; + __insideGraphicalSurface = true; + + return; + } + + if (elementNameLowerCase == "KnotVectorX") + { + __insideVectorX = true; + __pCurrentVectorXBuffer = std::unique_ptr(new (std::nothrow) TypeKnots()); + + SysTryCatch(NID_UI_EFFECT, __pCurrentVectorXBuffer != null, , E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + + return; + } + + if (elementNameLowerCase == "KnotVectorY") + { + __insideVectorY = true; + __pCurrentVectorYBuffer = std::unique_ptr(new (std::nothrow) TypeKnots()); + + SysTryCatch(NID_UI_EFFECT, __pCurrentVectorYBuffer != null, , E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + + return; + } + + if (elementNameLowerCase == "ElementsPool") + { + __insideElementsPool = true; + + return; + } + + return; + +CATCH: + __buildingModelFailed = true; + return; +} + +void +EffectParser::EndElement(const char* pElementName) +{ + if (__buildingModelFailed) + { + return; + } + + std::string elementName(pElementName); + + if (__elementBuffer.size() == 0) + { + __buildingModelFailed = true; + + SysLogException(NID_UI_EFFECT, E_INVALID_STATE, "Effects. [E_INVALID_STATE] Building a model failed: _elementBuffer.size() == 0"); + + return; + } + + int lastElementIndex = (int) __elementBuffer.size() - 1; + + if (elementName != __elementBuffer[lastElementIndex].name) + { + __buildingModelFailed = true; + + SysLogException(NID_UI_EFFECT, E_INVALID_ARG, "Effects. [E_INVALID_ARG] Building a model failed: elName != lastElement.name"); + + return; + } + + if (elementName == "ElementsPool") + { + __insideElementsPool = false; + __elementBuffer.pop_back(); + + return; + } // ElementsPool + + if (__insideElementsPool) + { + __elementBuffer.pop_back(); + + return; + } // _insideElementsPool but not + + if (elementName == "Point") + { + if (__insideGraphicalSurface) // PointSurfaceNURBS + { + CreatePointSurfaceNurbs(__elementBuffer[lastElementIndex]); + + __elementBuffer.pop_back(); + + return; + } // PointSurfaceNURBS + else // PointSurface + { + CreatePointSurface(__elementBuffer[lastElementIndex]); + + __elementBuffer.pop_back(); + + return; + } // PointSurface + } + + if (elementName == "Spring") + { + CreateSpringSurface(__elementBuffer[lastElementIndex]); + + __elementBuffer.pop_back(); + + return; + } // SpringSurface + + if (elementName == "Rod") + { + CreateRodSurface(__elementBuffer[lastElementIndex]); + + __elementBuffer.pop_back(); + + return; + } // RodSurface + + if (elementName == "PointLight") + { + CreatePointLight(__elementBuffer[lastElementIndex]); + + __elementBuffer.pop_back(); + + return; + } // PointLight + + if (elementName == "SpotLight") + { + CreateSpotLight(__elementBuffer[lastElementIndex]); + + __elementBuffer.pop_back(); + + return; + } // SpotLight + + if (elementName == "DirectionalLight") + { + CreateDirectionalLight(__elementBuffer[lastElementIndex]); + + __elementBuffer.pop_back(); + + return; + } // DirectionalLight + + if (elementName == "ModelsArray") + { + CreateEffectModel(__elementBuffer[lastElementIndex]); + __elementBuffer.pop_back(); + + return; + } // EffectModel + + if (elementName == "GraphicalSurface") + { + if (__insideGraphicalSurface) + { + __insideGraphicalSurface = false; + } + + CreateGraphicalSurface(__elementBuffer[lastElementIndex]); + + __elementBuffer.pop_back(); + + __rightAfterGraphicalSurfaceStart = false; + __lastGraphicalSurfaceXMLElementIndex = -1; + + return; + } // GraphicalSurface + + if (elementName == "KnotVectorX") + { + if (__insideVectorX) + { + __insideVectorX = false; + } + __elementBuffer.pop_back(); + + return; + } // VectorX + + if (elementName == "KnotVectorY") + { + if (__insideVectorY) + { + __insideVectorY = false; + } + __elementBuffer.pop_back(); + + return; + } // VectorY + + if (elementName == "knot") + { + CreateGraphicalSurfaceKnot(__elementBuffer[lastElementIndex]); + __elementBuffer.pop_back(); + + return; + } // knot + + if (elementName == "Viewport") + { + ReadViewportData(__elementBuffer[lastElementIndex]); + __elementBuffer.pop_back(); + + return; + } // Viewport + + if (elementName == "GravityForce") + { + CreateGravityForce(__elementBuffer[lastElementIndex]); + __elementBuffer.pop_back(); + + return; + } // GravityForce + + if (elementName == "Model") + { + CreateModelSurface(__elementBuffer[lastElementIndex]); + __elementBuffer.pop_back(); + + __rightAfterModelSurfaceStart = false; + __currentModelSurfaceX = 0; + __currentModelSurfaceY = 0; + __currentGraphicalSurfaceDimCtrlX = 0; + __currentGraphicalSurfaceDimCtrlY = 0; + __lastModelSurfaceXMLElementIndex = -1; + + return; + } // ModelSurface + + if (elementName == "Scene") + { + __elementBuffer.pop_back(); + + __rightAfterSceneStart = false; + __lastSceneXMLElementIndex = -1; + + return; + } // Scene + + if (elementName == "EffectManifest") + { + ReadManifestData(__elementBuffer[lastElementIndex]); + __elementBuffer.pop_back(); + + return; + } // EffectManifest + + // otherwise + __elementBuffer.pop_back(); + + return; +} + +void +EffectParser::Attribute(const char* pAttributeName, const char* pAttributeValue) +{ + if (__buildingModelFailed) + { + return; + } + + std::string attributeNameLowerCase(pAttributeName); + + if (__elementBuffer.size() == 0) + { + __buildingModelFailed = true; + + SysLogException(NID_UI_EFFECT, E_INVALID_STATE, "Effects. [E_INVALID_STATE] Building a model failed: _elementBuffer.size() == 0 ( %s = %s )", + pAttributeName, pAttributeValue); + + return; + } + + int lastElementIndex = (int) __elementBuffer.size() - 1; + __elementBuffer[lastElementIndex].attributes[attributeNameLowerCase] = pAttributeValue; + + return; +} + +void +EffectParser::ClearBuffers(void) +{ + for (TypePModelSurfaceCollection::iterator it = __modelSurfaceBuffer.begin(); + it != __modelSurfaceBuffer.end(); + ++it) + { + ModelSurface* pNextModelSurface = *it; + if (pNextModelSurface != null) + { + delete pNextModelSurface; + } + else + { + ; + } + } + + for (TypePElementSurfaceCollection::iterator it = __elementSurfaceBuffer.begin(); + it != __elementSurfaceBuffer.end(); + ++it) + { + ElementSurface* pNextElementSurface = *it; + if (pNextElementSurface != null) + { + delete pNextElementSurface; + } + else + { + ; + } + } + + UnitLight::ReleaseObjectsPool(); + + __lastSceneXMLElementIndex = -1; + __lastModelSurfaceXMLElementIndex = -1; + __lastGraphicalSurfaceXMLElementIndex = -1; + __currentModelFilesDirectoryPath = ""; + __modelSurfaceBuffer.clear(); + __elementSurfaceBuffer.clear(); + __unitLightBuffer.clear(); + __elementBuffer.clear(); + __pointSurfaceNurbsIndices.clear(); + __pCurrentEffectManager = null; + __currentEffectId = 0; + __currentModelBehaviourType = EFFECT_TYPE_TIME_BASED; + __currentEffectDuration = 0.0f; + __currentEffectInstanceName = ""; + __currentSceneData.timerTimeout = 0; + __pInstance->__currentSceneData.ambientColor = Vec3f(1.0f, 1.0f, 1.0f); + __pInstance->__currentSceneData.intensity = 1.0f; + __pInstance->__currentSceneData.attenuation = 0.0f; + __currentViewportData.x = 0.0f; + __currentViewportData.y = 0.0f; + __currentViewportData.z = 0.0f; + __currentViewportData.width = 0.0f; + __currentViewportData.height = 0.0f; + __currentViewportData.near = 0.0f; + __currentViewportData.far = 0.0f; + __currentViewportData.angle = 0.0f; + __currentViewportData.perspective = false; + __currentModelSurfaceX = 0.0f; + __currentModelSurfaceY = 0.0f; + __currentGraphicalSurfaceDimCtrlX = 0; + __currentGraphicalSurfaceDimCtrlY = 0; + __currentGravityForceValue = 0.0f; + + if (__buildingModelFailed) + { + __currentGravityForce = Vec3f(0, 0, 0); + } + + __pCurrentVectorXBuffer.reset(); + __pCurrentVectorYBuffer.reset(); + + return; +} + +void +EffectParser::ClearModelFiles(void) +{ + std::string sceneFilePath = __currentModelFilesDirectoryPath + __SCENE_FILE_NAME; + std::string manifestFilePath = __currentModelFilesDirectoryPath + __MANIFEST_FILE_NAME; + std::string scriptFilePath = __currentModelFilesDirectoryPath + __SCRIPT_FILE_NAME; + + remove(sceneFilePath.c_str()); + remove(manifestFilePath.c_str()); + remove(scriptFilePath.c_str()); + + return; +} + +PointSurface* +EffectParser::FindPointSurfaceById(long pointId) const +{ + PointSurface* pResult = null; + + for (TypePElementSurfaceCollection::const_iterator it = __elementSurfaceBuffer.begin(); + it != __elementSurfaceBuffer.end(); + ++it) + { + // It is assumed that all the points are going before any Spring or a rod + if (((*it)->GetType() != ESURFACE_POINT_SURFACE) + && ((*it)->GetType() != ESURFACE_POINT_SURFACE_NURBS)) + { + break; + } + if ((*it)->GetId() == pointId) + { + pResult = dynamic_cast((*it)); + break; + } + } + + return pResult; +} + +PointSurfaceNurbs* +EffectParser::FindPointSurfaceNurbsByIndices(unsigned int row, unsigned int col) const +{ + PointSurfaceNurbs* pResult = null; + for (TypeNurbsPointIndexDistributor::const_iterator it = __pointSurfaceNurbsIndices.begin(); + it != __pointSurfaceNurbsIndices.end(); + ++it) + { + if ((it->first.first == row) && (it->first.second == col)) + { + pResult = dynamic_cast(__elementSurfaceBuffer[it->second]); + break; + } + } + + return pResult; +} + +bool +EffectParser::CreatePointLight(XmlElement& xmlElement) +{ + bool result = true; + Tizen::Ui::Effects::_Runtime::PointLight* newPointLight = null; + + std::string name; + bool isEnabled = false; + float intensity = 0.0f; + Vec3f color(0, 0, 0); + Vec3f position(0, 0, 0); + TypeXmlElementAttributes::iterator foundAttribute; + + foundAttribute = xmlElement.attributes.find("name"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + name = foundAttribute->second.c_str(); + + foundAttribute = xmlElement.attributes.find("x"); + SysTryCatchLabel(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, CATCH, + E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + + // x - coordinate is absolute + position.x = (float) strtod(foundAttribute->second.c_str(), null); + + foundAttribute = xmlElement.attributes.find("y"); + SysTryCatchLabel(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, CATCH, + E_KEY_NOT_FOUND,Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + + // y - coordinate is absolute + position.y = (float) strtod(foundAttribute->second.c_str(), null); + + foundAttribute = xmlElement.attributes.find("z"); + SysTryCatchLabel(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, CATCH, + E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND ); + + // z - coordinate is absolute + position.z = (float) strtod(foundAttribute->second.c_str(), null); + + foundAttribute = xmlElement.attributes.find("enable"); + SysTryCatchLabel(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, CATCH, + E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + + if (foundAttribute->second == std::string("true")) + { + isEnabled = true; + } + else + { + SysTryCatch(NID_UI_EFFECT, foundAttribute->second == std::string("false"), result = false, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + } + + foundAttribute = xmlElement.attributes.find("intensity"); + SysTryCatchLabel(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, CATCH, + E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + intensity = (float) strtod(foundAttribute->second.c_str(), null); + + SysTryCatch(NID_UI_EFFECT, intensity >= 0.0f, result = false, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + + foundAttribute = xmlElement.attributes.find("color"); + SysTryCatchLabel(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, CATCH, + E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + { + std::string stringColor = foundAttribute->second; + SysTryCatchLabel(NID_UI_EFFECT, *(stringColor.begin()) == '#', result = false, CATCH, + E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + SysTryCatchLabel(NID_UI_EFFECT, stringColor.size() == 7, result = false, CATCH, + E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + stringColor.erase(stringColor.begin()); + stringColor = "0x" + stringColor; + color = StringHexToRgb(stringColor); + } + + SysTryCatch(NID_UI_EFFECT, (0.0f <= color.x) && (color.x <= 1.0f), result = false, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + SysTryCatch(NID_UI_EFFECT, (0.0f <= color.y) && (color.y <= 1.0f), result = false, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + SysTryCatch(NID_UI_EFFECT, (0.0f <= color.z) && (color.z <= 1.0f), result = false, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + + // Create a new point light if all the requests for an attribute succeeded + newPointLight = Tizen::Ui::Effects::_Runtime::PointLight::CreatePointLight(isEnabled, name, color, intensity, position); + SysTryReturn(NID_UI_EFFECT, newPointLight != null, result = false, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + + __unitLightBuffer.push_back(newPointLight); + + return result; + +CATCH: + __buildingModelFailed = true; + + return result; +} + +bool +EffectParser::CreateSpotLight(XmlElement& xmlElement) +{ + bool result = true; + Tizen::Ui::Effects::_Runtime::SpotLight* newSpotLight = null; + + std::string name; + bool isEnabled = false; + float intensity = 0.0f; + Vec3f color(0, 0, 0); + Vec3f position(0, 0, 0); + Vec3f direction(0, 0, 0); + float angleOpening = 0.0f; + float angleFadeOut = 0.0f; + + TypeXmlElementAttributes::iterator foundAttribute; + + foundAttribute = xmlElement.attributes.find("name"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + name = foundAttribute->second.c_str(); + + foundAttribute = xmlElement.attributes.find("x"); + SysTryCatchLabel(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, CATCH, + E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + + // x - coordinate is absolute + position.x = (float) strtod(foundAttribute->second.c_str(), null); + + foundAttribute = xmlElement.attributes.find("y"); + SysTryCatchLabel(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, CATCH, + E_KEY_NOT_FOUND,Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + + // y - coordinate is absolute + position.y = (float) strtod(foundAttribute->second.c_str(), null); + + foundAttribute = xmlElement.attributes.find("z"); + SysTryCatchLabel(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, CATCH, + E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND ); + + // z - coordinate is absolute + position.z = (float) strtod(foundAttribute->second.c_str(), null); + + foundAttribute = xmlElement.attributes.find("enable"); + SysTryCatchLabel(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, CATCH, + E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + + if (foundAttribute->second == std::string("true")) + { + isEnabled = true; + } + else + { + SysTryCatch(NID_UI_EFFECT, foundAttribute->second == std::string("false"), result = false, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + } + + foundAttribute = xmlElement.attributes.find("intensity"); + SysTryCatchLabel(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, CATCH, + E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + intensity = (float) strtod(foundAttribute->second.c_str(), null); + + SysTryCatch(NID_UI_EFFECT, intensity >= 0.0f, result = false, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + + foundAttribute = xmlElement.attributes.find("color"); + SysTryCatchLabel(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, CATCH, + E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + { + std::string stringColor = foundAttribute->second; + SysTryCatchLabel(NID_UI_EFFECT, *(stringColor.begin()) == '#', result = false, CATCH, + E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + SysTryCatchLabel(NID_UI_EFFECT, stringColor.size() == 7, result = false, CATCH, + E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + stringColor.erase(stringColor.begin()); + stringColor = "0x" + stringColor; + color = StringHexToRgb(stringColor); + } + + SysTryCatch(NID_UI_EFFECT, (0.0f <= color.x) && (color.x <= 1.0f), result = false, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + SysTryCatch(NID_UI_EFFECT, (0.0f <= color.y) && (color.y <= 1.0f), result = false, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + SysTryCatch(NID_UI_EFFECT, (0.0f <= color.z) && (color.z <= 1.0f), result = false, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + + foundAttribute = xmlElement.attributes.find("targetX"); + SysTryCatchLabel(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, CATCH, + E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + + // x - coordinate is absolute + direction.x = (float) strtod(foundAttribute->second.c_str(), null); + + foundAttribute = xmlElement.attributes.find("targetY"); + SysTryCatchLabel(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, CATCH, + E_KEY_NOT_FOUND,Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + + // y - coordinate is absolute + direction.y = (float) strtod(foundAttribute->second.c_str(), null); + + foundAttribute = xmlElement.attributes.find("targetZ"); + SysTryCatchLabel(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, CATCH, + E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND ); + + // z - coordinate is absolute + direction.z = (float) strtod(foundAttribute->second.c_str(), null); + + foundAttribute = xmlElement.attributes.find("angleOpening"); + SysTryCatchLabel(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, CATCH, + E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + angleOpening = (float) strtod(foundAttribute->second.c_str(), null); + + SysTryCatch(NID_UI_EFFECT, (0.0f <= angleOpening) && (angleOpening <= 360.0f), result = false, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + + foundAttribute = xmlElement.attributes.find("angleFadeOut"); + SysTryCatchLabel(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, CATCH, + E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + angleFadeOut = (float) strtod(foundAttribute->second.c_str(), null); + + SysTryCatch(NID_UI_EFFECT, (0.0f <= angleFadeOut) && (angleFadeOut <= 360.0f), result = false, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + + // Create a new spot light if all the requests for an attribute succeeded + newSpotLight = Tizen::Ui::Effects::_Runtime::SpotLight:: + CreateSpotLight(isEnabled, name, color, intensity, position, direction, angleOpening, angleFadeOut); + SysTryReturn(NID_UI_EFFECT, newSpotLight != null, result = false, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + + __unitLightBuffer.push_back(newSpotLight); + + return result; + +CATCH: + __buildingModelFailed = true; + + return result; +} + +bool +EffectParser::CreateDirectionalLight(XmlElement& xmlElement) +{ + bool result = true; + Tizen::Ui::Effects::_Runtime::DirectionalLight* newDirectionalLight = null; + + std::string name; + bool isEnabled = false; + float intensity = 0.0f; + Vec3f color(0, 0, 0); + Vec3f direction(0, 0, 0); + TypeXmlElementAttributes::iterator foundAttribute; + + foundAttribute = xmlElement.attributes.find("name"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + name = foundAttribute->second.c_str(); + + foundAttribute = xmlElement.attributes.find("directionX"); + SysTryCatchLabel(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, CATCH, + E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + + // x - coordinate is absolute + direction.x = (float) strtod(foundAttribute->second.c_str(), null); + + foundAttribute = xmlElement.attributes.find("directionY"); + SysTryCatchLabel(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, CATCH, + E_KEY_NOT_FOUND,Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + + // y - coordinate is absolute + direction.y = (float) strtod(foundAttribute->second.c_str(), null); + + foundAttribute = xmlElement.attributes.find("directionZ"); + SysTryCatchLabel(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, CATCH, + E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND ); + + // z - coordinate is absolute + direction.z = (float) strtod(foundAttribute->second.c_str(), null); + + foundAttribute = xmlElement.attributes.find("enable"); + SysTryCatchLabel(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, CATCH, + E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + + if (foundAttribute->second == std::string("true")) + { + isEnabled = true; + } + else + { + SysTryCatch(NID_UI_EFFECT, foundAttribute->second == std::string("false"), result = false, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + } + + foundAttribute = xmlElement.attributes.find("intensity"); + SysTryCatchLabel(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, CATCH, + E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + intensity = (float) strtod(foundAttribute->second.c_str(), null); + + SysTryCatch(NID_UI_EFFECT, intensity >= 0.0f, result = false, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + + foundAttribute = xmlElement.attributes.find("color"); + SysTryCatchLabel(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, CATCH, + E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + { + std::string stringColor = foundAttribute->second; + SysTryCatchLabel(NID_UI_EFFECT, *(stringColor.begin()) == '#', result = false, CATCH, + E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + SysTryCatchLabel(NID_UI_EFFECT, stringColor.size() == 7, result = false, CATCH, + E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + stringColor.erase(stringColor.begin()); + stringColor = "0x" + stringColor; + color = StringHexToRgb(stringColor); + } + + SysTryCatch(NID_UI_EFFECT, (0.0f <= color.x) && (color.x <= 1.0f), result = false, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + SysTryCatch(NID_UI_EFFECT, (0.0f <= color.y) && (color.y <= 1.0f), result = false, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + SysTryCatch(NID_UI_EFFECT, (0.0f <= color.z) && (color.z <= 1.0f), result = false, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + + // Create a new directional light if all the requests for an attribute succeeded + newDirectionalLight = Tizen::Ui::Effects::_Runtime::DirectionalLight::CreateDirectionalLight(isEnabled, name, color, intensity, direction); + SysTryReturn(NID_UI_EFFECT, newDirectionalLight != null, result = false, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + + __unitLightBuffer.push_back(newDirectionalLight); + + return result; + +CATCH: + __buildingModelFailed = true; + + return result; +} + +bool +EffectParser::CreatePointSurface(XmlElement& xmlElement) +{ + bool result = true; + PointSurface* newPointSurface = null; + + long id = 0; + Vec3f positionInit(0, 0, 0); + float massInit = 1.0f; + float pointResistance = 0.f; + bool fixed = false; + TypeXmlElementAttributes::iterator foundAttribute; + + foundAttribute = xmlElement.attributes.find("id"); + SysTryCatchLabel(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, CATCH, + E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + id = (long) strtol(foundAttribute->second.c_str(), null, 10); + + foundAttribute = xmlElement.attributes.find("x"); + SysTryCatchLabel(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, CATCH, + E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + + // x - coordinate is related to the ModelSurface's x-coordinate + positionInit.x = __currentModelSurfaceX + (float) strtod(foundAttribute->second.c_str(), null); + + foundAttribute = xmlElement.attributes.find("y"); + SysTryCatchLabel(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, CATCH, + E_KEY_NOT_FOUND,Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + + // y - coordinate is related to the ModelSurface's y-coordinate + positionInit.y = __currentModelSurfaceY + (float) strtod(foundAttribute->second.c_str(), null); + + foundAttribute = xmlElement.attributes.find("z"); + SysTryCatchLabel(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, CATCH, + E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND ); + + // z - coordinate is absolute + positionInit.z = (float) strtod(foundAttribute->second.c_str(), null); + + foundAttribute = xmlElement.attributes.find("mass"); + SysTryCatchLabel(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, CATCH, + E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + massInit = (float) strtod(foundAttribute->second.c_str(), null); + + foundAttribute = xmlElement.attributes.find("pointResistance"); + SysTryCatchLabel(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, CATCH, + E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + pointResistance = (float) strtod(foundAttribute->second.c_str(), null); + + foundAttribute = xmlElement.attributes.find("fixed"); + SysTryCatchLabel(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, CATCH, + E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + + if (foundAttribute->second == std::string("true")) + { + fixed = true; + } + else + { + SysTryCatch(NID_UI_EFFECT, foundAttribute->second == std::string("false"), result = false, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + } + + SysTryCatch(NID_UI_EFFECT, massInit > 0.0f, result = false, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + + // Create a new point if all the requests for an attribute succeeded + newPointSurface = new (std::nothrow) PointSurface(id, positionInit, massInit, pointResistance, fixed); + SysTryReturn(NID_UI_EFFECT, newPointSurface != null, result = false, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + + __elementSurfaceBuffer.push_back(newPointSurface); + + return result; + +CATCH: + __buildingModelFailed = true; + + return result; +} + +bool +EffectParser::CreatePointSurfaceNurbs(XmlElement& xmlElement) +{ + bool result = true; + PointSurfaceNurbs* newPointSurfaceNurbs = null; + + long id = 0; + Vec3f positionInit(0, 0, 0); + float massInit = 1.0f; + float weight = 0.0f; + float pointResistance = 2.f; + bool fixed = false; + unsigned int row = 0; + unsigned int col = 0; + TypeXmlElementAttributes::iterator foundAttribute; + + foundAttribute = xmlElement.attributes.find("id"); + SysTryCatchLabel(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, CATCH1, + E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + id = (long) strtol(foundAttribute->second.c_str(), null, 10); + + foundAttribute = xmlElement.attributes.find("x"); + SysTryCatchLabel(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, CATCH1, + E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + + // x - coordinate is related to the ModelSurface's x-coordinate + positionInit.x = __currentModelSurfaceX + (float) strtod(foundAttribute->second.c_str(), null); + + foundAttribute = xmlElement.attributes.find("y"); + SysTryCatchLabel(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, CATCH1, + E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND ); + + // y - coordinate is related to the ModelSurface's y-coordinate + positionInit.y = __currentModelSurfaceY + (float) strtod(foundAttribute->second.c_str(), null); + + foundAttribute = xmlElement.attributes.find("z"); + SysTryCatchLabel(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, CATCH1, + E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + + // z - coordinate is absolute + positionInit.z = (float) strtod(foundAttribute->second.c_str(), null); + + foundAttribute = xmlElement.attributes.find("mass"); + SysTryCatchLabel(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, CATCH1, + E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND ); + massInit = (float) strtod(foundAttribute->second.c_str(), null); + + foundAttribute = xmlElement.attributes.find("gWeight"); + SysTryCatchLabel(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, CATCH1, + E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + weight = (float) strtod(foundAttribute->second.c_str(), null); + + foundAttribute = xmlElement.attributes.find("fixed"); + SysTryCatchLabel(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, CATCH1, + E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + + if (foundAttribute->second == std::string("true")) + { + fixed = true; + } + else + { + SysTryCatchLabel(NID_UI_EFFECT, foundAttribute->second == std::string("false"), result = false, CATCH1, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + } + + foundAttribute = xmlElement.attributes.find("pointResistance"); + SysTryCatchLabel(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, CATCH1, + E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + pointResistance = (float) strtod(foundAttribute->second.c_str(), null); + + foundAttribute = xmlElement.attributes.find("row"); + SysTryCatchLabel(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, CATCH1, + E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + { + int rowValue = (int) strtol(foundAttribute->second.c_str(), null, 10); + SysTryCatchLabel(NID_UI_EFFECT, rowValue >= 0, result = false, CATCH1, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + + row = (unsigned int) rowValue; + } + + foundAttribute = xmlElement.attributes.find("col"); + SysTryCatchLabel(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, CATCH1, + E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + { + int colValue = (int) strtol(foundAttribute->second.c_str(), null, 10); + SysTryCatchLabel(NID_UI_EFFECT, colValue >= 0, result = false, CATCH1, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + + col = (unsigned int) colValue; + } + + SysTryCatchLabel(NID_UI_EFFECT, massInit > 0.0f, result = false, CATCH1, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + SysTryCatchLabel(NID_UI_EFFECT, weight >= 0.0f, result = false, CATCH1, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + + SysTryCatchLabel(NID_UI_EFFECT,(col < __currentGraphicalSurfaceDimCtrlX) && (row < __currentGraphicalSurfaceDimCtrlY), result = false, CATCH2, + E_INVALID_FORMAT, Tizen::Ui::Effects::_UiEffectError::EP_ERROR_IN_LOGIC); + + SysTryCatchLabel(NID_UI_EFFECT, __pointSurfaceNurbsIndices.find(std::pair(row, col)) == __pointSurfaceNurbsIndices.end(), result = false, CATCH3, + E_INVALID_FORMAT, Tizen::Ui::Effects::_UiEffectError::EP_ERROR_IN_LOGIC); + + newPointSurfaceNurbs = new (std::nothrow) PointSurfaceNurbs(id, positionInit, massInit, pointResistance, weight, fixed, row, col); + SysTryReturn(NID_UI_EFFECT, newPointSurfaceNurbs != null, result = false, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + + __elementSurfaceBuffer.push_back(newPointSurfaceNurbs); + + __pointSurfaceNurbsIndices[std::pair(row, col)] = __elementSurfaceBuffer.size() - 1; + + return true; + +CATCH1: + __buildingModelFailed = true; + + return result; + +CATCH2: + __buildingModelFailed = true; + + return result; + +CATCH3: + __buildingModelFailed = true; + + return result; +} + +bool +EffectParser::CreateSpringSurface(XmlElement& xmlElement) +{ + bool result = true; + SpringSurface* newSpringSurface = null; + + long id = 0; + float stiffness = 0.0f; + PointSurface* pPoint1 = null; + PointSurface* pPoint2 = null; + TypeXmlElementAttributes::iterator foundAttribute; + + foundAttribute = xmlElement.attributes.find("id"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + id = (long) strtol(foundAttribute->second.c_str(), null, 10); + + foundAttribute = xmlElement.attributes.find("pointId1"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND ); + { + long point1ID = (long) strtol(foundAttribute->second.c_str(), null, 10); + pPoint1 = FindPointSurfaceById(point1ID); + } + + foundAttribute = xmlElement.attributes.find("pointId2"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + { + long point2ID = (long) strtol(foundAttribute->second.c_str(), null, 10); + pPoint2 = FindPointSurfaceById(point2ID); + } + + foundAttribute = xmlElement.attributes.find("stiffness"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + stiffness = (float) strtod(foundAttribute->second.c_str(), null); + + SysTryCatch(NID_UI_EFFECT, stiffness >= 0.0f, result = false, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + + // Create a new Spring if all the requests for an attribute succeeded + if ((pPoint1 != null) && (pPoint2 != null) && result) + { + newSpringSurface = new (std::nothrow) SpringSurface(id, stiffness, pPoint1, pPoint2); + SysTryReturn(NID_UI_EFFECT, newSpringSurface != null, result = false, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + + __elementSurfaceBuffer.push_back(newSpringSurface); + } + else + { + result = false; + + __buildingModelFailed = true; + + SysLogException(NID_UI_EFFECT, E_KEY_NOT_FOUND, "Effects. [E_KEY_NOT_FOUND] Building a model failed: error in SpringSurface's attributes"); + } + + return result; + +CATCH: + __buildingModelFailed = true; + + return result; +} + +bool +EffectParser::CreateRodSurface(XmlElement& xmlElement) +{ + bool result = true; + RodSurface* newRodSurface = null; + + long id = 0; + float stiffness = 0.0f; + PointSurface* pPoint1 = null; + PointSurface* pPoint2 = null; + PointSurface* pPoint3 = null; + TypeXmlElementAttributes::iterator foundAttribute; + + foundAttribute = xmlElement.attributes.find("id"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + id = (long) strtol(foundAttribute->second.c_str(), null, 10); + + foundAttribute = xmlElement.attributes.find("pointId1"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + { + long point1ID = (long) strtol(foundAttribute->second.c_str(), null, 10); + pPoint1 = FindPointSurfaceById(point1ID); + } + + foundAttribute = xmlElement.attributes.find("pointId2"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + { + long point2ID = (long) strtol(foundAttribute->second.c_str(), null, 10); + pPoint2 = FindPointSurfaceById(point2ID); + } + + foundAttribute = xmlElement.attributes.find("pointId3"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + { + long point3ID = (long) strtol(foundAttribute->second.c_str(), null, 10); + pPoint3 = FindPointSurfaceById(point3ID); + } + + foundAttribute = xmlElement.attributes.find("stiffness"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + stiffness = (float) strtod(foundAttribute->second.c_str(), null); + + SysTryCatch(NID_UI_EFFECT, stiffness >= 0.0f, result = false, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + + // Create a new rod if all the requests for an attribute succeeded + if ((pPoint1 != null) && (pPoint2 != null) && (pPoint3 != null) && result) + { + newRodSurface = new (std::nothrow) RodSurface(id, stiffness, pPoint1, pPoint2, pPoint3); + SysTryReturn(NID_UI_EFFECT, newRodSurface != null, result = false, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + + __elementSurfaceBuffer.push_back(newRodSurface); + } + else + { + result = false; + + __buildingModelFailed = true; + + SysLogException(NID_UI_EFFECT, E_KEY_NOT_FOUND, "Effects. [E_KEY_NOT_FOUND] Building a model failed: error in RodSurface's attributes"); + } + + return result; + +CATCH: + __buildingModelFailed = true; + + return result; +} + +bool +EffectParser::CreateRodSurfaceNurbs(XmlElement& xmlElement) +{ + bool result = true; + RodSurfaceNurbs* newRodSurfaceNurbs = null; + long id = 0; + float stiffness = 0.0f; + PointSurfaceNurbs* pPoint1 = null; + PointSurfaceNurbs* pPoint2 = null; + PointSurfaceNurbs* pPoint3 = null; + PointSurfaceNurbs* pPoint4 = null; + unsigned int normalPointRowIndex = 0; + unsigned int normalPointColIndex = 0; + TypeXmlElementAttributes::iterator foundAttribute; + + foundAttribute = xmlElement.attributes.find("id"); + SysTryCatch( + NID_UI_EFFECT, + foundAttribute != xmlElement.attributes.end(), + result = false, + E_KEY_NOT_FOUND, + Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + id = (long) strtol(foundAttribute->second.c_str(), null, 10); + + foundAttribute = xmlElement.attributes.find("pointId1"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + { + long point1ID = (long) strtol(foundAttribute->second.c_str(), null, 10); + pPoint1 = dynamic_cast (FindPointSurfaceById(point1ID)); + } + + foundAttribute = xmlElement.attributes.find("pointId2"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + { + long point2ID = (long) strtol(foundAttribute->second.c_str(), null, 10); + pPoint2 = dynamic_cast (FindPointSurfaceById(point2ID)); + } + + foundAttribute = xmlElement.attributes.find("pointId3"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + { + long point3ID = (long) strtol(foundAttribute->second.c_str(), null, 10); + pPoint3 = dynamic_cast (FindPointSurfaceById(point3ID)); + } + + foundAttribute = xmlElement.attributes.find("stiffness"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + stiffness = (float) strtod(foundAttribute->second.c_str(), null); + + SysTryCatch(NID_UI_EFFECT, stiffness >= 0.0f, result = false, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + + if ((pPoint1 != null) && (pPoint2 != null) && (pPoint3 != null)) + { + int tempRow = (int) pPoint2->GetRow() + (int) pPoint2->GetCol() - (int) pPoint1->GetCol(); + int tempCol = (int) pPoint2->GetCol() + (int) pPoint1->GetRow() - (int) pPoint2->GetRow(); + + if (( tempRow < 0 ) || + ((int) __currentGraphicalSurfaceDimCtrlY - 1 < tempRow) || + (tempCol < 0 ) || + ((int) __currentGraphicalSurfaceDimCtrlX - 1 < tempCol)) + { + tempRow = static_cast(pPoint2->GetRow()) + static_cast(pPoint1->GetCol()) - static_cast(pPoint2->GetCol()); + tempCol = static_cast(pPoint2->GetCol()) + static_cast(pPoint2->GetRow()) - static_cast(pPoint1->GetRow()); + } + + normalPointRowIndex = tempRow; + normalPointColIndex = tempCol; + + pPoint4 = FindPointSurfaceNurbsByIndices(normalPointRowIndex, normalPointColIndex); + } + + // Create a new rod if all the requests for an attribute succeeded + if ((pPoint1 != null) && (pPoint2 != null) && (pPoint3 != null) && (pPoint4 != null) && result) + { + newRodSurfaceNurbs = new (std::nothrow) RodSurfaceNurbs(id, stiffness, pPoint1, pPoint2, pPoint3, pPoint4); + SysTryReturn(NID_UI_EFFECT, newRodSurfaceNurbs != null, result = false, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + + __elementSurfaceBuffer.push_back(newRodSurfaceNurbs); + } + else + { + result = false; + + __buildingModelFailed = true; + + SysLogException(NID_UI_EFFECT, E_KEY_NOT_FOUND, "Effects. [E_KEY_NOT_FOUND] Building a model failed: _error in RodSurfaceNURBS's attributes"); + } + + return result; + +CATCH: + __buildingModelFailed = true; + + return result; +} + +bool +EffectParser::CreateGraphicalSurface(XmlElement& xmlElement) +{ + bool result = true; + long id = 0; + float x = 0.0f; + float y = 0.0f; + float width = 0.0f; + float height = 0.0f; + float transparency = 0.0f; + long bitmapId = 0; + unsigned int dimGraphX = 0; + unsigned int dimGraphY = 0; + unsigned int dimCtrlX = 0; + unsigned int dimCtrlY = 0; + unsigned int orderX = 0; + unsigned int orderY = 0; + + TypeXmlElementAttributes::iterator foundAttribute; + + foundAttribute = xmlElement.attributes.find("id"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + id = (long) strtol(foundAttribute->second.c_str(), null, 10); + + foundAttribute = xmlElement.attributes.find("x"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + x = (float) strtod(foundAttribute->second.c_str(), null); + + foundAttribute = xmlElement.attributes.find("y"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + y = (float) strtod(foundAttribute->second.c_str(), null); + + foundAttribute = xmlElement.attributes.find("width"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + width = (float) strtod(foundAttribute->second.c_str(), null); + + foundAttribute = xmlElement.attributes.find("height"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + height = (float) strtod(foundAttribute->second.c_str(), null); + + foundAttribute = xmlElement.attributes.find("transparency"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + transparency = (float) strtod(foundAttribute->second.c_str(), null); + + foundAttribute = xmlElement.attributes.find("bitmapID"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + bitmapId = (long) strtol(foundAttribute->second.c_str(), null, 10); + + foundAttribute = xmlElement.attributes.find("dimGraphX"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + { + int dimGraphXValue = (int) strtol(foundAttribute->second.c_str(), null, 10); + SysTryCatch(NID_UI_EFFECT, dimGraphXValue >= 0, result = false, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + + dimGraphX = (unsigned int) dimGraphXValue; + } + + foundAttribute = xmlElement.attributes.find("dimGraphY"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND ); + { + int dimGraphYValue = (int) strtol(foundAttribute->second.c_str(), null, 10); + SysTryCatch(NID_UI_EFFECT, dimGraphYValue >= 0, result = false, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + + dimGraphY = (unsigned int) dimGraphYValue; + } + + foundAttribute = xmlElement.attributes.find("dimCtrlX"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + { + int dimCtrlXValue = (int) strtol(foundAttribute->second.c_str(), null, 10); + SysTryCatch(NID_UI_EFFECT, dimCtrlXValue >= 0, result = false, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + + dimCtrlX = (unsigned int) dimCtrlXValue; + } + + foundAttribute = xmlElement.attributes.find("dimCtrlY"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + { + int dimCtrlYValue = (int) strtol(foundAttribute->second.c_str(), null, 10); + SysTryCatch(NID_UI_EFFECT, dimCtrlYValue >= 0, result = false, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + + dimCtrlY = (unsigned int) dimCtrlYValue; + } + + foundAttribute = xmlElement.attributes.find("orderX"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + { + int orderXValue = (int) strtol(foundAttribute->second.c_str(), null, 10); + SysTryCatch(NID_UI_EFFECT, orderXValue >= 0, result = false, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + + orderX = (unsigned int) orderXValue; + } + + foundAttribute = xmlElement.attributes.find("orderY"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + { + int orderYValue = (int) strtol(foundAttribute->second.c_str(), null, 10); + SysTryCatch(NID_UI_EFFECT, orderYValue >= 0, result = false, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + + orderY = (unsigned int) orderYValue; + } + + SysTryCatch(NID_UI_EFFECT, width >= 0.0f, result = false, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + SysTryCatch(NID_UI_EFFECT, height >= 0.0f, result = false, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + SysTryCatch(NID_UI_EFFECT, (0.0f <= transparency) && (transparency <= 1.0f), result = false, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + + __pCurrentGraphicalSurface = std::unique_ptr(new (std::nothrow) GraphicalSurfaceNurbs(id, bitmapId, dimCtrlX, dimCtrlY, orderX, orderY, dimGraphX, dimGraphY, + std::move(__pCurrentVectorXBuffer), std::move(__pCurrentVectorYBuffer), transparency)); + + if (__pCurrentGraphicalSurface != null) + { + ; + } + else + { + result = false; + __buildingModelFailed = true; + + SysLogException(NID_UI_EFFECT, E_OUT_OF_MEMORY, "Effects. Effect was not created! Exception E_OUT_OF_MEMORY was appeared while creating of GraphicalSurfaceNurbs instance"); //E_OUT_OF_MEMORY + } + + if (result) + { + __pCurrentVectorXBuffer.reset(); + __pCurrentVectorYBuffer.reset(); + } + + return result; + +CATCH: + __buildingModelFailed = true; + + __pCurrentVectorXBuffer.reset(); + __pCurrentVectorYBuffer.reset(); + + return result; +} + +bool +EffectParser::CreateModelSurface(XmlElement& xmlElement) +{ + bool result = true; + + long id = 0; + float width = 0.0f; + float height = 0.0f; + std::string name; + unsigned short iterationCount = 1; + unsigned short modelSpeed = 1; + float environmentResistance = 0.0f; + float groundLevel = 0.0f; + unsigned int expectedNurbsPointsCount = 0; + ModelSurface* newModelSurface = null; + + TypeXmlElementAttributes::iterator foundAttribute; + + foundAttribute = xmlElement.attributes.find("id"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + id = (long) strtol(foundAttribute->second.c_str(), null, 10); + + foundAttribute = xmlElement.attributes.find("width"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND ); + width = (float) strtod(foundAttribute->second.c_str(), null); + + foundAttribute = xmlElement.attributes.find("height"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + height = (float) strtod(foundAttribute->second.c_str(), null); + + foundAttribute = xmlElement.attributes.find("name"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + name = foundAttribute->second.c_str(); + + foundAttribute = xmlElement.attributes.find("timeoutDivisor"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + iterationCount = (unsigned short) strtod(foundAttribute->second.c_str(), null); + + foundAttribute = xmlElement.attributes.find("speedFactor"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + modelSpeed = (unsigned short) strtod(foundAttribute->second.c_str(), null); + + foundAttribute = xmlElement.attributes.find("environmentResistance"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + environmentResistance = (float) strtod(foundAttribute->second.c_str(), null); + + foundAttribute = xmlElement.attributes.find("groundLevel"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND ); + groundLevel = (float) strtod(foundAttribute->second.c_str(), null); + + SysTryCatch(NID_UI_EFFECT, width >= 0.0f, result = false, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + SysTryCatch(NID_UI_EFFECT, height >= 0.0f, result = false, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + SysTryCatch(NID_UI_EFFECT, environmentResistance >= 0.0f, result = false, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + + // Create a new ModelSurface object if all the requests for an attribute succeded + newModelSurface = new (std::nothrow) ModelSurface( + 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] 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); + __currentGravityForceValue = 0; + + // Now add the ElementSurface objects to a newly created ModelSurface + + expectedNurbsPointsCount = __currentGraphicalSurfaceDimCtrlX * __currentGraphicalSurfaceDimCtrlY; + + if ((unsigned int) __elementSurfaceBuffer.size() < expectedNurbsPointsCount) + { + __buildingModelFailed = true; + + SysLogException(NID_UI_EFFECT, E_INVALID_FORMAT, "Effects. [E_INVALID_FORMAT] Building a model failed : " + "not enough ElementSurface objects in _elementSurfaceBuffer - less then the predefined number of PoiinSurfaceNURBS objects"); + } + else + { + // first add all the PointSurfaceNURBS objects in the right order + TypePElementSurfaceCollection::iterator beginIt = __elementSurfaceBuffer.begin(); + for (unsigned int rowIndex = 0; rowIndex < __currentGraphicalSurfaceDimCtrlY; ++rowIndex) + { + for (unsigned int colIndex = 0; colIndex < __currentGraphicalSurfaceDimCtrlX; ++colIndex) + { + TypeNurbsPointIndexDistributor::iterator indexIt; + + indexIt = __pointSurfaceNurbsIndices.find(std::pair(rowIndex, colIndex)); + if (indexIt != __pointSurfaceNurbsIndices.end()) + { + unsigned int pointNurbsIndex = indexIt->second; + + if (pointNurbsIndex < expectedNurbsPointsCount) + { + TypePElementSurfaceCollection::iterator pointNurbsIterator = + beginIt + pointNurbsIndex; + + if ((*pointNurbsIterator)->GetType() == ESURFACE_POINT_SURFACE_NURBS) + { + newModelSurface->AddElementSurface(*pointNurbsIterator); + } + else + { + __buildingModelFailed = true; + + SysLogException(NID_UI_EFFECT, E_INVALID_FORMAT,"Effects. [E_INVALID_FORMAT] _elementSurfaceBuffer.begin() + %i is not a PointSurfaceNURBS", + pointNurbsIndex); + } + } + else + { + __buildingModelFailed = true; + + SysLogException(NID_UI_EFFECT, E_INVALID_FORMAT, "Effects. [E_INVALID_FORMAT] pointNurbsIndex = %i is >= expectedNumberOfNurbsPoints = %i", + pointNurbsIndex, expectedNurbsPointsCount); + } + } + else + { + __buildingModelFailed = true; + + SysLogException(NID_UI_EFFECT, E_KEY_NOT_FOUND, "Effects. [E_KEY_NOT_FOUND] A pair <%i, %i> not present in _pointSurfaceNurbsIndices", + rowIndex, colIndex); + } + } + } + + // now add all the Elementsurface objects going after PointSurfaceNURBS objects + if (!__buildingModelFailed) + { + for (TypePElementSurfaceCollection::iterator it = __elementSurfaceBuffer.begin() + expectedNurbsPointsCount; + it != __elementSurfaceBuffer.end(); + ++it) + { + newModelSurface->AddElementSurface(*it); + } + } + } + + __pointSurfaceNurbsIndices.clear(); + __elementSurfaceBuffer.clear(); + + // set Graphical surface + newModelSurface->AddGraphicalSurface(std::move(__pCurrentGraphicalSurface)); + + __pCurrentGraphicalSurface = null; + + // Add created ModelSurface to the list + __modelSurfaceBuffer.push_back(newModelSurface); + + return result; + +CATCH: + ; +CATCH1: + __buildingModelFailed = true; + + __pointSurfaceNurbsIndices.clear(); + __elementSurfaceBuffer.clear(); + + return result; +} + +bool +EffectParser::CreateEffectModel(XmlElement& xmlElement) +{ + bool result = true; + + std::string pathToScript = __currentModelFilesDirectoryPath + __SCRIPT_FILE_NAME; + + SetLastResult(E_SUCCESS); + + __pCurrentEffectModel = std::unique_ptr<_Runtime::EffectModel>(new (std::nothrow) _Runtime::EffectModel( + __currentEffectId, __currentEffectInstanceName, pathToScript.c_str(), __pCurrentEffectManager, __currentModelBehaviourType, __currentEffectDuration)); + + if (__pCurrentEffectModel != null) + { + ; + } + else + { + result = false; + + __buildingModelFailed = true; + SysLogException(NID_UI_EFFECT, E_OUT_OF_MEMORY, "Effects. Effect was not created! Exception E_OUT_OF_MEMORY was appeared while creating of EffectModel instance"); //E_OUT_OF_MEMORY + } + + if (GetLastResult() != E_SUCCESS) + { + result = false; + + __buildingModelFailed = true; + SysLogException(NID_UI_EFFECT, GetLastResult(), + "Effects. Building a model failed: error generated by the constructor of EffectModel: %s", GetErrorMessage(GetLastResult())); + } + + if ((__pCurrentEffectModel != null) && (GetLastResult() == E_SUCCESS)) + { + for (TypePModelSurfaceCollection::iterator it = __modelSurfaceBuffer.begin(); + it != __modelSurfaceBuffer.end(); + ++it) + { + __pCurrentEffectModel->AddModelSurface(*it); + } + + __modelSurfaceBuffer.clear(); + + RenderDataScene* pRenderDataScene = __pCurrentEffectModel->GetRenderingData(); + + // in case there was no light sources described inthe scene a single directional light should be set + if (__unitLightBuffer.size() == 0) + { + Tizen::Ui::Effects::_Runtime::DirectionalLight* newDirectionalLight = + Tizen::Ui::Effects::_Runtime::DirectionalLight::CreateDirectionalLight( + true, std::string("DirectionalLight_0"), Vec3f(1.0f, 1.0f, 1.0f), 1.0f, Vec3f(0.0f, 0.0f, -1.0f)); + SysTryReturn(NID_UI_EFFECT, newDirectionalLight != null, result = false, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + + bool addUnitLightResult = pRenderDataScene->AddUnitLight(*newDirectionalLight); + SysTryCatch(NID_UI_EFFECT, addUnitLightResult, result = false, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_MEMBER_NOT_INITIALIZED); + } + else + { + for (TypePUnitLightCollection::iterator it = __unitLightBuffer.begin(); + it != __unitLightBuffer.end(); + ++it) + { + bool addUnitLightResult = pRenderDataScene->AddUnitLight(*(*it)); + SysTryCatch(NID_UI_EFFECT, addUnitLightResult, result = false, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_MEMBER_NOT_INITIALIZED); + } + } + + __unitLightBuffer.clear(); + + pRenderDataScene->SetLightAmbientColour(__currentSceneData.ambientColor); + pRenderDataScene->SetLightIntensity(__currentSceneData.intensity); + pRenderDataScene->SetLightAttenuation(__currentSceneData.attenuation); + + __pCurrentEffectModel->Construct(); + } + + return result; + +CATCH: + __buildingModelFailed = true; + + return result; +} + +bool +EffectParser::CreateGraphicalSurfaceKnot(XmlElement& xmlElement) +{ + bool result = true; + Tizen::Ui::Effects::_Runtime::TypeKnots* pVectorToRefill = null; + unsigned int index = 0; + float value = 0.0f; + TypeXmlElementAttributes::iterator foundAttribute; + + if (__insideVectorX) + { + pVectorToRefill = __pCurrentVectorXBuffer.get(); + } + else if (__insideVectorY) + { + pVectorToRefill = __pCurrentVectorYBuffer.get(); + } + else + { + ; + } + + SysTryCatchLabel(NID_UI_EFFECT, pVectorToRefill != null, result = false, CATCH1, E_INVALID_CONDITION, Tizen::Ui::Effects::_UiEffectError::EP_MEMBER_NOT_INITIALIZED); + + foundAttribute = xmlElement.attributes.find("index"); + SysTryCatchLabel(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, CATCH2, + E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + index = (unsigned int) strtol(foundAttribute->second.c_str(), null, 10); + + foundAttribute = xmlElement.attributes.find("value"); + SysTryCatchLabel(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, CATCH2, + E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + value = (float) strtod(foundAttribute->second.c_str(), null); + + SysTryCatchLabel(NID_UI_EFFECT, index == pVectorToRefill->size(), result = false, CATCH3, E_INVALID_FORMAT, Tizen::Ui::Effects::_UiEffectError::EP_ERROR_IN_LOGIC); + pVectorToRefill->push_back(value); + + return true; + +CATCH1: + __buildingModelFailed = true; + + return result; + +CATCH2: + __buildingModelFailed = true; + + return result; + +CATCH3: + __buildingModelFailed = true; + + return result; +} + +bool +EffectParser::CreateGravityForce(XmlElement& xmlElement) +{ + bool result = true; + Vec3f gravity = Vec3f(0, 0, 0); + float value = 0.0f; + TypeXmlElementAttributes::iterator foundAttribute; + + foundAttribute = xmlElement.attributes.find("x"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + gravity.x = (float) strtod(foundAttribute->second.c_str(), null); + + foundAttribute = xmlElement.attributes.find("y"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + gravity.y = (float) strtod(foundAttribute->second.c_str(), null); + + foundAttribute = xmlElement.attributes.find("z"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + gravity.z = (float) strtod(foundAttribute->second.c_str(), null); + + foundAttribute = xmlElement.attributes.find("abs"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + value = (float) strtod(foundAttribute->second.c_str(), null); + + SysTryCatch(NID_UI_EFFECT, value >= 0.0f, result = false, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + + __currentGravityForce = gravity; + __currentGravityForceValue = value; + + return true; + +CATCH: + __buildingModelFailed = true; + + return result; +} + +bool +EffectParser::ReadViewportData(XmlElement& xmlElement) +{ + bool result = true; + TypeXmlElementAttributes::iterator foundAttribute; + + foundAttribute = xmlElement.attributes.find("x"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + __currentViewportData.x = (float) strtod(foundAttribute->second.c_str(), null); + + foundAttribute = xmlElement.attributes.find("y"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + __currentViewportData.y = (float) strtod(foundAttribute->second.c_str(), null); + + foundAttribute = xmlElement.attributes.find("z"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + __currentViewportData.z = (float) strtod(foundAttribute->second.c_str(), null); + + foundAttribute = xmlElement.attributes.find("width"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + __currentViewportData.width = (float) strtod(foundAttribute->second.c_str(), null); + + foundAttribute = xmlElement.attributes.find("height"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + __currentViewportData.height = (float) strtod(foundAttribute->second.c_str(), null); + + foundAttribute = xmlElement.attributes.find("near"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + __currentViewportData.near = (float) strtod(foundAttribute->second.c_str(), null); + + foundAttribute = xmlElement.attributes.find("far"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + __currentViewportData.far = (float) strtod(foundAttribute->second.c_str(), null); + + foundAttribute = xmlElement.attributes.find("angle"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + __currentViewportData.angle = (float) strtod(foundAttribute->second.c_str(), null); + + foundAttribute = xmlElement.attributes.find("perspective"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + if (foundAttribute->second == std::string("true")) + { + __currentViewportData.perspective = true; + } + else + { + SysTryCatch(NID_UI_EFFECT, foundAttribute->second == std::string("false"), result = false, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + } + + SysTryCatch(NID_UI_EFFECT, __currentViewportData.near < __currentViewportData.far, result = false, E_INVALID_FORMAT, Tizen::Ui::Effects::_UiEffectError::EP_ERROR_IN_LOGIC); + + return true; + +CATCH: + __buildingModelFailed = true; + + return result; +} + +bool +EffectParser::PriorReadModelSurfaceData(void) +{ + bool result = true; + TypeXmlElementAttributes::iterator foundAttribute; + + SysTryCatchLabel(NID_UI_EFFECT, __lastModelSurfaceXMLElementIndex != -1, result = false, CATCH1, E_INVALID_CONDITION, Tizen::Ui::Effects::_UiEffectError::EP_MEMBER_NOT_INITIALIZED); + + foundAttribute = __elementBuffer[__lastModelSurfaceXMLElementIndex].attributes.find("x"); + SysTryCatchLabel(NID_UI_EFFECT, (foundAttribute != __elementBuffer[__lastModelSurfaceXMLElementIndex].attributes.end()), result = false, CATCH2, + E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + __currentModelSurfaceX = (float) strtod(foundAttribute->second.c_str(), null); + + foundAttribute = __elementBuffer[__lastModelSurfaceXMLElementIndex].attributes.find("y"); + SysTryCatchLabel(NID_UI_EFFECT, foundAttribute != __elementBuffer[__lastModelSurfaceXMLElementIndex].attributes.end(), result = false, CATCH2, + E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + __currentModelSurfaceY = (float) strtod(foundAttribute->second.c_str(), null); + + return true; + +CATCH1: + __buildingModelFailed = true; + + return result; + +CATCH2: + __buildingModelFailed = true; + + return result; +} + +bool +EffectParser::PriorReadGraphicalSurfaceData(void) +{ + bool result = true; + TypeXmlElementAttributes::iterator foundAttribute; + + SysTryCatchLabel(NID_UI_EFFECT, __lastGraphicalSurfaceXMLElementIndex != -1, result = false, CATCH1, + E_INVALID_CONDITION, Tizen::Ui::Effects::_UiEffectError::EP_MEMBER_NOT_INITIALIZED); + + foundAttribute = __elementBuffer[__lastGraphicalSurfaceXMLElementIndex].attributes.find("dimCtrlX"); + SysTryCatchLabel(NID_UI_EFFECT, (foundAttribute != __elementBuffer[__lastGraphicalSurfaceXMLElementIndex].attributes.end()), result = false, CATCH2, + E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + __currentGraphicalSurfaceDimCtrlX = (unsigned int) strtol(foundAttribute->second.c_str(), null, 10); + + foundAttribute = __elementBuffer[__lastGraphicalSurfaceXMLElementIndex].attributes.find("dimCtrlY"); + SysTryCatchLabel(NID_UI_EFFECT, foundAttribute != __elementBuffer[__lastGraphicalSurfaceXMLElementIndex].attributes.end(), result = false, CATCH2, + E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + __currentGraphicalSurfaceDimCtrlY = (unsigned int) strtol(foundAttribute->second.c_str(), null, 10); + + return true; + +CATCH1: + __buildingModelFailed = true; + + return result; + +CATCH2: + __buildingModelFailed = true; + + return result; +} + +bool +EffectParser::PriorReadSceneData(void) +{ + bool result = true; + int timerTimeout = 0; + Vec3f ambientColor = __currentSceneData.ambientColor; + float intensity = __currentSceneData.intensity; + float attenuation = __currentSceneData.attenuation; + TypeXmlElementAttributes::iterator foundAttribute; + + SysTryCatch(NID_UI_EFFECT, __lastSceneXMLElementIndex != -1, result = false, E_INVALID_CONDITION, Tizen::Ui::Effects::_UiEffectError::EP_MEMBER_NOT_INITIALIZED); + { + XmlElement& xmlElement = __elementBuffer[__lastSceneXMLElementIndex]; + + foundAttribute = xmlElement.attributes.find("timerTimeout"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + timerTimeout = (int) strtol(foundAttribute->second.c_str(), null, 10); + SysTryCatch(NID_UI_EFFECT, timerTimeout > 0, result = false, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + __currentSceneData.timerTimeout = (unsigned int) timerTimeout; + + foundAttribute = xmlElement.attributes.find("ambientColor"); + if (foundAttribute != xmlElement.attributes.end()) + { + std::string stringColor = foundAttribute->second; + SysTryCatchLabel(NID_UI_EFFECT, *(stringColor.begin()) == '#', result = false, CATCH, + E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + SysTryCatchLabel(NID_UI_EFFECT, stringColor.size() == 7, result = false, CATCH, + E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + stringColor.erase(stringColor.begin()); + stringColor = "0x" + stringColor; + ambientColor = StringHexToRgb(stringColor); + } + + SysTryCatch(NID_UI_EFFECT, (0.0f <= ambientColor.x) && (ambientColor.x <= 1.0f), result = false, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + SysTryCatch(NID_UI_EFFECT, (0.0f <= ambientColor.y) && (ambientColor.y <= 1.0f), result = false, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + SysTryCatch(NID_UI_EFFECT, (0.0f <= ambientColor.z) && (ambientColor.z <= 1.0f), result = false, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + + __currentSceneData.ambientColor = ambientColor; + + foundAttribute = xmlElement.attributes.find("intensity"); + if (foundAttribute != xmlElement.attributes.end()) + { + intensity = (float) strtod(foundAttribute->second.c_str(), null); + SysTryCatch(NID_UI_EFFECT, (0.0f <= intensity) && (intensity <= 1.0f), result = false, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + __currentSceneData.intensity = intensity; + } + + foundAttribute = xmlElement.attributes.find("attenuation"); + if (foundAttribute != xmlElement.attributes.end()) + { + attenuation = (float) strtod(foundAttribute->second.c_str(), null); + SysTryCatch(NID_UI_EFFECT, 0.0f <= attenuation, result = false, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + __currentSceneData.attenuation = attenuation; + } + } + return true; + +CATCH: + __buildingModelFailed = true; + + return result; +} + +bool +EffectParser::ReadManifestData(XmlElement& xmlElement) +{ + bool result = true; + TypeXmlElementAttributes::iterator foundAttribute; + + foundAttribute = xmlElement.attributes.find("name"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + __currentEffectInstanceName = foundAttribute->second; + + foundAttribute = xmlElement.attributes.find("behaviorType"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + if (foundAttribute->second == std::string("User controlled")) + { + __currentModelBehaviourType = EFFECT_TYPE_INTERACTIVE; + } + else + { + SysTryCatch(NID_UI_EFFECT, foundAttribute->second == std::string("Time based"), result = false, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + } + + foundAttribute = xmlElement.attributes.find("timeDuration"); + SysTryCatch(NID_UI_EFFECT, foundAttribute != xmlElement.attributes.end(), result = false, E_KEY_NOT_FOUND, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_NOT_FOUND); + __currentEffectDuration = (TypeTimeEffect) ((float) strtod(foundAttribute->second.c_str(), null) / 1000.0f); + + SysTryCatch(NID_UI_EFFECT, __currentEffectDuration >= 0.0f, result = false, E_INVALID_ARG, Tizen::Ui::Effects::_UiEffectError::EP_ATTRIBUTE_VALUE_OUT_OF_PREDEFINED_RANGE); + + return true; + +CATCH: + __buildingModelFailed = true; + + return result; +} + +} } } } // Tizen::Ui::Effects::_EffectParser diff --git a/src/ui/effects/parser/FUiEffects_ParserXMLParser.cpp b/src/ui/effects/parser/FUiEffects_ParserXMLParser.cpp new file mode 100644 index 0000000..324fdb7 --- /dev/null +++ b/src/ui/effects/parser/FUiEffects_ParserXMLParser.cpp @@ -0,0 +1,182 @@ +// +// 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. +// + +#include +#include +#include +#include +#include "../FUiEffects_EffectErrorMessages.h" + +namespace Tizen { namespace Ui { namespace Effects { namespace _Parser +{ + +EffectParser* XmlParser::__pCurrentParent = null; +bool XmlParser::__justParse = false; + +XmlParser::XmlParser(EffectParser* pParent) +{ + __pCurrentParent = pParent; + + SysLog(NID_UI_EFFECT, "Effects. An object of XMLParser class created!"); +} + +XmlParser::~XmlParser() +{ + __pCurrentParent = null; + __justParse = false; + + SysLog(NID_UI_EFFECT, "Effects. An object of XMLParser class destroyed!"); +} + +void +XmlParser::StartElementNs(void * pCtx, const xmlChar* pLocalName, const xmlChar* pPrefix, const xmlChar* pUri, + int namespaceCount, const xmlChar** ppNamespaces, int attributeCount, int defaultedCount, const xmlChar** ppAttributes) +{ + if (!__justParse) + { + __pCurrentParent->StartElement((const char*)pLocalName); + } + + if (attributeCount > 0) + { + std::string value; + unsigned int index = 0; + + for (int indexAttribute = 0; indexAttribute < attributeCount; ++indexAttribute, index += 5) + { + const xmlChar *pLocalAttributeName = ppAttributes[index]; + std::string attributesName((const char* )pLocalAttributeName); + + const xmlChar *pValueBegin = ppAttributes[index+3]; + std::string attributesValue((const char* )pValueBegin); + + size_t pos = attributesValue.find('"'); + value = attributesValue.substr(0, pos); + + if (!__justParse) + { + __pCurrentParent->Attribute(attributesName.c_str(), value.c_str()); + } + } + } + + return; +} + +void +XmlParser::EndElementNs(void* pCtx, const xmlChar* pLocalName, const xmlChar* pPrefix, const xmlChar* pUri) +{ + if (!__justParse) + { + __pCurrentParent->EndElement((const char*) pLocalName); + } + + return; +} + +void +XmlParser::CharactersM(void* pCtx, const xmlChar* pCh, int len) +{ + std::string wholeDoc = (char*) pCh; + size_t pos1 = wholeDoc.find('<'); + // check whether the character has been found + if (pos1 == std::string::npos) + { + return; + } + + if (!__justParse) + { + __pCurrentParent->Attribute("", wholeDoc.substr(pos1).c_str()); + } + + return; +} + +void +XmlParser::Error(void* pCtx, const char* pMsg, ... ) +{ + char buffer[256]; + va_list args; + va_start(args, pMsg); + vsprintf(buffer, pMsg, args); + va_end(args); + + return; +} + +void +XmlParser::Warning(void* pCtx, const char* pMsg, ... ) +{ + char buffer[256]; + va_list args; + va_start(args, pMsg); + vsprintf(buffer, pMsg, args); + va_end(args); + + return; +} + +bool +XmlParser::ExtractFromArchive(const char* pArchivePath, const char* pDestinationPath) +{ + bool res = true; + Tizen::Base::Utility::FileUnzipper unzipper; + + Tizen::Base::String archivePath = pArchivePath; + Tizen::Base::String destinationPath = pDestinationPath; + + result r = unzipper.Construct(archivePath); + SysTryReturn(NID_APP, !IsFailed(r), false, E_SYSTEM, "unzipper.Construct() failed."); + + if (unzipper.UnzipTo(destinationPath) != E_SUCCESS) + { + res = false; + } + + return res; +} +bool +XmlParser::Parse(const char* pFilePath, bool sendCallbacks) +{ + __justParse = !sendCallbacks; + + xmlSAXHandler saxHandler; + memset(&saxHandler, 0, sizeof(saxHandler)); + + // set SAX callbacks + saxHandler.initialized = XML_SAX2_MAGIC; + saxHandler.startElementNs = StartElementNs; + saxHandler.endElementNs = EndElementNs; + saxHandler.warning = Warning; + saxHandler.error = Error; + saxHandler.characters = CharactersM; + + // perform parsing + int parseResult = xmlSAXUserParseFile(&saxHandler, null, pFilePath); + + SysTryReturn(NID_UI_EFFECT, + parseResult == 0, + false, + E_PARSING_FAILED, + Tizen::Ui::Effects::_UiEffectError::EP_XML_PARSING_FAILED + ); + + return true; +} + +} } } } // Tizen::Ui::Effects::_Parser diff --git a/src/ui/effects/physics-engine/FUiEffects_PeElementSurface.cpp b/src/ui/effects/physics-engine/FUiEffects_PeElementSurface.cpp new file mode 100644 index 0000000..441bdef --- /dev/null +++ b/src/ui/effects/physics-engine/FUiEffects_PeElementSurface.cpp @@ -0,0 +1,84 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiEffects_PeElementSurface.cpp + * @brief This file contains an implementation of ElementSurface class methods + * + */ + +#include + +#include + +using namespace Tizen::Ui::Effects::_Runtime; +using namespace Tizen::Ui::Effects::_Utils; + +namespace Tizen { namespace Ui { namespace Effects { namespace _PhysicsEngine +{ + + +ElementSurface::ElementSurface(long objId) + : __objId(objId) +{ + return; +} + +ElementSurface::~ElementSurface() +{ + return; +} + +long +ElementSurface::GetId(void) const +{ + return __objId; +} + +PropertyCast +ElementSurface::GetProperty(ElementProperty property) const +{ + PropertyCast result; + result.type = PropertyCast::NO_PROPERTY; // failed to find corresponding property + result.value.numberValue = 0.; // value with no sence to init struct + + SysLog(NID_UI_EFFECT, "Bad get property call in element %u.\n", GetId()); + return result; +} + +bool +ElementSurface::SetProperty(ElementProperty property, bool boolValue) +{ + SysLog(NID_UI_EFFECT, "Bad set bool property call in element %u.\n", GetId()); + return false; // set failed +} + +bool +ElementSurface::SetProperty(ElementProperty property, LUA_NUMBER numericValue) +{ + SysLog(NID_UI_EFFECT, "Bad set number property call in element %u.\n", GetId()); + return false; // set failed +} + +bool +ElementSurface::SetProperty(ElementProperty property, const Tizen::Ui::Effects::_Utils::Vec3f & vectorValue) +{ + SysLog(NID_UI_EFFECT, "Bad set vector property call in element %u.\n", GetId()); + return false; // set failed +} + +} } } } // Tizen::Ui::Effects::_PhysicsEngine diff --git a/src/ui/effects/physics-engine/FUiEffects_PePointSurface.cpp b/src/ui/effects/physics-engine/FUiEffects_PePointSurface.cpp new file mode 100644 index 0000000..f797488 --- /dev/null +++ b/src/ui/effects/physics-engine/FUiEffects_PePointSurface.cpp @@ -0,0 +1,326 @@ +// +// 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 FUiEffects_PePointSurface.cpp + * @brief This file contains an implementation of PointSurface class methods + * + */ + +#include +#include +#include +#include "../FUiEffects_EffectErrorMessages.h" + +using namespace Tizen::Ui::Effects::_Runtime; +using namespace Tizen::Ui::Effects::_Utils; + +namespace Tizen { namespace Ui { namespace Effects { namespace _PhysicsEngine +{ + +PointSurface::PointSurface(long objId, Vec3f& positionInit, float massInit, float pointEnvResist, bool fixed) + : ElementSurface(objId), __positionInit(positionInit), __massInit(massInit), __pointEnvResist(pointEnvResist) +{ + this->__fixed = fixed; + + // those must be initialised in PointSurface::Construct + this->__pEnvResist = null; + this->__pGravityAcc = null; + this->__pGroundLevel = null; + + // initialize after creation + InitPoint(); +} + +PointSurface::~PointSurface() +{ + return; +} + +ESurface +PointSurface::GetType(void) const +{ + return ESURFACE_POINT_SURFACE; +} + +void +PointSurface::Initialize(void) +{ + InitPoint(); + return; +} + +bool +PointSurface::Construct(const float* pEnvResist, const Vec3f* pGravAcc, const float* pGroundLevel) +{ + SysAssertf(!(pEnvResist == null || pGravAcc == null || pGroundLevel == null), _UiEffectError::INTERNAL_ERROR); + + this->__pEnvResist = pEnvResist; + this->__pGravityAcc = pGravAcc; + this->__pGroundLevel = pGroundLevel; + return true; +} + +void +PointSurface::Calculate(float timeStep) +{ + // don't move point if fixed setting is enabled + if (__fixed) + { + __force.set(0.0f); + return; + } + + // add user force to total force + __force += __forceUser; + + // apply gravity force (m * g) + __force += __mass * (*__pGravityAcc); + + // apply environment resistance + __force -= __velocity * (__pointEnvResist * (*__pEnvResist)); + + __positionPrev = __position; // save current position + + // a = F(total) / m + // using explicit Euler time integration + // V = V0 + a * dt + // x = x0 + V * dt + __velocity += __force * timeStep / __mass; + __position += __velocity * timeStep; + + // GroundLevel value needs to be specified + if ( __position.z < *__pGroundLevel ) + { + __position.z = *__pGroundLevel; + } + + // reset force for next time step + //_vForceUser.set(0.0f); + __force.set(0.0f); + return; +} + +bool +PointSurface::IsFixed(void) const +{ + return __fixed; +} + +PropertyCast +PointSurface::GetProperty(ElementProperty property) const +{ + PropertyCast result; + switch (property) + { + // position coordinates + case N_POS_X: + result.type = PropertyCast::NUMBER; + result.value.numberValue = __position.x; + break; + case N_POS_Y: + result.type = PropertyCast::NUMBER; + result.value.numberValue = __position.y; + break; + case N_POS_Z: + result.type = PropertyCast::NUMBER; + result.value.numberValue = __position.z; + break; + // initial position coordinates + case N_POS_X_INIT: + result.type = PropertyCast::NUMBER; + result.value.numberValue = __positionInit.x; + break; + case N_POS_Y_INIT: + result.type = PropertyCast::NUMBER; + result.value.numberValue = __positionInit.y; + break; + case N_POS_Z_INIT: + result.type = PropertyCast::NUMBER; + result.value.numberValue = __positionInit.z; + break; + // velocity vector + case V_POS: + result.type = PropertyCast::VEC3; + result.value.vec3Value = &__position; + break; + // initial velocity vector + case V_POS_INIT: + result.type = PropertyCast::VEC3; + result.value.vec3Value = &__positionInit; + break; + // user force coordinates + case N_FUSER_X: + result.type = PropertyCast::NUMBER; + result.value.numberValue = __forceUser.x; + break; + case N_FUSER_Y: + result.type = PropertyCast::NUMBER; + result.value.numberValue = __forceUser.y; + break; + case N_FUSER_Z: + result.type = PropertyCast::NUMBER; + result.value.numberValue = __forceUser.z; + break; + // user force vector + case V_FUSER: + result.type = PropertyCast::VEC3; + result.value.vec3Value = &__forceUser; + break; + // node mass + case N_MASS: + result.type = PropertyCast::NUMBER; + result.value.numberValue = __mass; + break; + // node resistance + case N_POINT_RESISTANCE: + result.type = PropertyCast::NUMBER; + result.value.numberValue = __pointEnvResist; + break; + // fixation setting + case B_IS_FIXED: + result.type = PropertyCast::BOOL; + result.value.boolValue = __fixed; + break; + default: + result = ElementSurface::GetProperty(property); + break; + } + return result; +} + +bool +PointSurface::SetProperty(ElementProperty property, bool boolValue) +{ + bool result = true; // for successful set + switch (property) + { + // fixation setting + case B_IS_FIXED: + __fixed = boolValue; + break; + default: + result = ElementSurface::SetProperty(property, boolValue); + break; + } + return result; +} + +bool +PointSurface::SetProperty(ElementProperty property, LUA_NUMBER numericValue) +{ + bool result = true; // for successful set + switch (property) + { + // position coordinates + case N_POS_X: + __position.x = numericValue; + break; + case N_POS_Y: + __position.y = numericValue; + break; + case N_POS_Z: + __position.z = numericValue; + break; + // user force coordinates + case N_FUSER_X: + __forceUser.x = numericValue; + break; + case N_FUSER_Y: + __forceUser.y = numericValue; + break; + case N_FUSER_Z: + __forceUser.z = numericValue; + break; + // node mass + case N_MASS: + __mass = numericValue; + break; + // node resistance + case N_POINT_RESISTANCE: + __pointEnvResist = numericValue; + break; + default: + result = ElementSurface::SetProperty(property, numericValue); + break; + } + return result; +} + +bool +PointSurface::SetProperty(ElementProperty property, const Vec3f& vectorValue) +{ + bool result = true; // for successful set + switch (property) + { + // velocity vector + case V_POS: + __position = vectorValue; + break; + // user force vector + case V_FUSER: + __forceUser = vectorValue; + break; + default: + result = ElementSurface::SetProperty(property, vectorValue); + break; + } + return result; +} + +const Vec3f& +PointSurface::GetPosition(void) const +{ + return __position; +} + +const Vec3f& +PointSurface::GetVelocity(void) const +{ + return __velocity; +} + +void +PointSurface::AddForce(Vec3f appliedForce) +{ + __force += appliedForce; + return; +} + +void +PointSurface::AddVelocity(Vec3f newVelocity) +{ + __velocity += newVelocity; + return; +} + +void +PointSurface::InitPoint(void) +{ + // setting simulation initial position and mass + __position = __positionPrev = __positionInit; + __mass = __massInit; + + // the point is considered still in the beginning + __velocity.set(0.0f); + __force.set(0.0f); + __forceUser.set(0.0f); + + return; +} + +} } } }//Tizen::Ui::Ext::Effects3d::_PhysicsEngine diff --git a/src/ui/effects/physics-engine/FUiEffects_PePointSurfaceNURBS.cpp b/src/ui/effects/physics-engine/FUiEffects_PePointSurfaceNURBS.cpp new file mode 100644 index 0000000..1741cba --- /dev/null +++ b/src/ui/effects/physics-engine/FUiEffects_PePointSurfaceNURBS.cpp @@ -0,0 +1,152 @@ +// +// 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 FUiEffects_PePointSurfaceNURBS.cpp + * @brief This file contains an implementation of PointSurfaceNURBS class methods + * + */ + +#include + +using namespace Tizen::Ui::Effects::_Runtime; +using namespace Tizen::Ui::Effects::_Utils; + +namespace Tizen { namespace Ui { namespace Effects { namespace _PhysicsEngine +{ + +PointSurfaceNurbs::PointSurfaceNurbs( + long objId, + Vec3f positionInit, + float massInit, + float pointEnvResist, + float weightInit, + bool fixed, + unsigned int row, + unsigned int col +) + : PointSurface(objId, positionInit, massInit, pointEnvResist, fixed), + __nurbsWeightInit(weightInit), + __row(row), __col(col) +{ + // init after creation + InitPointNurbs(); +} + +PointSurfaceNurbs::~PointSurfaceNurbs(void) +{ + return; +} + +ESurface +PointSurfaceNurbs::GetType(void) const +{ + return ESURFACE_POINT_SURFACE_NURBS; +} + +void +PointSurfaceNurbs::Initialize(void) +{ + PointSurface::Initialize(); + InitPointNurbs(); + return; +} + +bool +PointSurfaceNurbs::Construct(const float* pEnvResist, const Vec3f* pGravAcc, const float* pGroundLevel) +{ + return PointSurface::Construct(pEnvResist, pGravAcc, pGroundLevel); +} + +void +PointSurfaceNurbs::Calculate(float timeStep) +{ + PointSurface::Calculate(timeStep); + return; +} + +PropertyCast +PointSurfaceNurbs::GetProperty(ElementProperty property) const +{ + PropertyCast result; + switch (property) + { + case N_NURBS_WEIGHT: + result.type = PropertyCast::NUMBER; + result.value.numberValue = __nurbsWeight; + break; + default: + result = PointSurface::GetProperty(property); + break; + } + return result; +} + +bool +PointSurfaceNurbs::SetProperty(ElementProperty property, bool boolValue) +{ + return PointSurface::SetProperty(property, boolValue); +} + +bool +PointSurfaceNurbs::SetProperty(ElementProperty property, LUA_NUMBER numericValue) +{ + bool result = true; // for successful set + switch (property) + { + case N_NURBS_WEIGHT: + __nurbsWeight = numericValue; + break; + default: + result = PointSurface::SetProperty(property, numericValue); + break; + } + return result; +} + +bool +PointSurfaceNurbs::SetProperty(ElementProperty property, const Vec3f& vectorValue) +{ + return PointSurface::SetProperty(property, vectorValue); +} + +float +PointSurfaceNurbs::GetWeight(void) const +{ + return __nurbsWeight; +} + +unsigned int +PointSurfaceNurbs::GetRow(void) const +{ + return __row; +} + +unsigned int +PointSurfaceNurbs::GetCol(void) const +{ + return __col; +} + + +void +PointSurfaceNurbs::InitPointNurbs(void) +{ + __nurbsWeight = __nurbsWeightInit; + return; +} + +} } } } // Tizen::Ui::Effects::_PhysicsEngine diff --git a/src/ui/effects/physics-engine/FUiEffects_PeRodSurface.cpp b/src/ui/effects/physics-engine/FUiEffects_PeRodSurface.cpp new file mode 100644 index 0000000..e4d1993 --- /dev/null +++ b/src/ui/effects/physics-engine/FUiEffects_PeRodSurface.cpp @@ -0,0 +1,180 @@ +// +// 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 FUiEffects_PeRodSurface.cpp + * @brief This file contains an implementation of RodSurface class methods + * + */ + +#include + +using namespace Tizen::Ui::Effects::_Runtime; +using namespace Tizen::Ui::Effects::_Utils; + +namespace Tizen { namespace Ui { namespace Effects { namespace _PhysicsEngine +{ + +RodSurface::RodSurface( + long objId, + float stiffness, + PointSurface* pPoint1, + PointSurface* pPoint2, + PointSurface* pPoint3 +) + : ElementSurface(objId), + __stiffnessInit(stiffness) +{ + this->_pPoint1 = pPoint1; + this->_pPoint2 = pPoint2; + this->_pPoint3 = pPoint3; + + // init when created + InitRod(); +} + +RodSurface::~RodSurface(void) +{ + return; +} + +ESurface +RodSurface::GetType(void) const +{ + return ESURFACE_ROD_SURFACE; +} + +void +RodSurface::Initialize(void) +{ + InitRod(); + return; +} + +void +RodSurface::Calculate(float timeStep) +{ + UseUnbendModel(timeStep); + return; +} + +PropertyCast +RodSurface::GetProperty(ElementProperty property) const +{ + PropertyCast result; + switch (property) + { + case N_STIFFNESS: + result.type = PropertyCast::NUMBER; + result.value.numberValue = __stiffness; + break; + default: + result = ElementSurface::GetProperty(property); + break; + } + return result; +} + +bool +RodSurface::SetProperty(ElementProperty property, bool boolValue) +{ + return ElementSurface::SetProperty(property, boolValue); +} + +bool +RodSurface::SetProperty(ElementProperty property, LUA_NUMBER numericValue) +{ + bool result = true; // for successful set + switch (property) + { + // coefficient of rigidity + case N_STIFFNESS: + __stiffness = numericValue; + break; + default: + result = ElementSurface::SetProperty(property, numericValue); + break; + } + return result; +} + +bool +RodSurface::SetProperty(ElementProperty property, const Vec3f& vectorValue) +{ + return ElementSurface::SetProperty(property, vectorValue); +} + +void +RodSurface::InitRod(void) +{ + this->_deformationAngle = 0.f; + this->__stiffness = __stiffnessInit; + return; +} + +// old rod model, currently not used +void +RodSurface::UseStretchModel(float timeStep) +{ + Vec3f + direction31 = _pPoint3->GetPosition() - _pPoint1->GetPosition(), + direction21 = _pPoint2->GetPosition() - _pPoint1->GetPosition(), + rodForce; + + direction31.normalize(); + direction21.normalize(); + + // |[AxB]| = |A||B|sin(alpha) (angle between A and B) + // |A| = |B| = 1, so fDeformArc is equal to angle sine + _deformationAngle = direction21.getCrossed(direction31).length(); + float rodForceValue = __stiffness * _deformationAngle; + + rodForce = direction31 * rodForceValue; + + _pPoint3->AddForce( rodForce); + _pPoint1->AddForce(-rodForce); + return; +} + +// new rod model, now in use +void +RodSurface::UseUnbendModel(float timeStep) +{ + Vec3f + direction21 = _pPoint1->GetPosition() - _pPoint2->GetPosition(), + direction23 = _pPoint3->GetPosition() - _pPoint2->GetPosition(); + + direction21.normalize(); + direction23.normalize(); + + Vec3f rodNormal = direction23.getCrossed(direction21); + float deformation = rodNormal.length(), + forceValue = __stiffness * deformation; + + Vec3f forceDirection; + // force for central point + forceDirection = direction21 + direction23; + _pPoint2->AddForce( forceDirection.normalize() * forceValue ); + + // forces for edge points + forceValue *= 0.5f; + _pPoint1->AddForce( rodNormal.getCrossed(direction21).normalize() * forceValue ); + _pPoint3->AddForce( direction23.getCrossed(rodNormal).normalize() * forceValue ); + return; +} + +} } } } // Tizen::Ui::Effects::_PhysicsEngine diff --git a/src/ui/effects/physics-engine/FUiEffects_PeRodSurfaceNURBS.cpp b/src/ui/effects/physics-engine/FUiEffects_PeRodSurfaceNURBS.cpp new file mode 100644 index 0000000..d86739e --- /dev/null +++ b/src/ui/effects/physics-engine/FUiEffects_PeRodSurfaceNURBS.cpp @@ -0,0 +1,113 @@ +// +// 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 FUiEffects_PeRodSurfaceNURBS.cpp + * @brief This file contains an implementation of RodSurface class methods + * + */ + +#include + +using namespace Tizen::Ui::Effects::_Runtime; +using namespace Tizen::Ui::Effects::_Utils; + +namespace Tizen { namespace Ui { namespace Effects { namespace _PhysicsEngine +{ + +RodSurfaceNurbs::RodSurfaceNurbs( + long objId, + float stiffness, + PointSurfaceNurbs* pPoint1, + PointSurfaceNurbs* pPoint2, + PointSurfaceNurbs* pPoint3, + PointSurfaceNurbs* pPointN +) + : RodSurface(objId, stiffness, pPoint1, pPoint2, pPoint3), + __pPointNeighb(pPointN) +{ + // init when created + InitRodNurbs(); +} + +RodSurfaceNurbs::~RodSurfaceNurbs(void) +{ + return; +} + +ESurface +RodSurfaceNurbs::GetType(void) const +{ + return ESURFACE_ROD_SURFACE; +} + +void +RodSurfaceNurbs::Initialize(void) +{ + RodSurface::Initialize(); + InitRodNurbs(); + return; +} + +void +RodSurfaceNurbs::Calculate(float timeStep) +{ + RodSurface::Calculate(timeStep); +} + +PropertyCast +RodSurfaceNurbs::GetProperty(ElementProperty property) const +{ + return RodSurface::GetProperty(property); +} + +bool +RodSurfaceNurbs::SetProperty(ElementProperty property, bool boolValue) +{ + return RodSurface::SetProperty(property, boolValue); +} + +bool +RodSurfaceNurbs::SetProperty(ElementProperty property, LUA_NUMBER numericValue) +{ + return RodSurface::SetProperty(property, numericValue); +} + +bool +RodSurfaceNurbs::SetProperty(ElementProperty property, const Vec3f& vectorValue) +{ + return RodSurface::SetProperty(property, vectorValue); +} + +void +RodSurfaceNurbs::InitRodNurbs(void) +{ + return; +} + +const Vec3f +RodSurfaceNurbs::GetSurfaceNormal(void) const +{ + Vec3f + direction13 = _pPoint1->GetPosition() - _pPoint3->GetPosition(), + direction24 = _pPoint2->GetPosition() - __pPointNeighb->GetPosition(), + normalVec = direction13.getCrossed(direction24); + + normalVec.normalize(); + return normalVec; +} + +} } } } // Tizen::Ui::Effects::_PhysicsEngine diff --git a/src/ui/effects/physics-engine/FUiEffects_PeSpringSurface.cpp b/src/ui/effects/physics-engine/FUiEffects_PeSpringSurface.cpp new file mode 100644 index 0000000..c24a3ac --- /dev/null +++ b/src/ui/effects/physics-engine/FUiEffects_PeSpringSurface.cpp @@ -0,0 +1,151 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +/** + * @file FUiEffects_PeSpringSurface.cpp + * @brief This file contains an implementation of SpringSurface class methods + * + */ + +#include + +using namespace Tizen::Ui::Effects::_Runtime; +using namespace Tizen::Ui::Effects::_Utils; + +namespace Tizen { namespace Ui { namespace Effects { namespace _PhysicsEngine +{ + +SpringSurface::SpringSurface( + long objId, + float stiffness, + PointSurface* pPoint1, + PointSurface* pPoint2 +) + : ElementSurface(objId), + __stiffnessInit(stiffness) +{ + this->__pPoint1 = pPoint1; + this->__pPoint2 = pPoint2; + + // init when created + InitSpring(); +} + +SpringSurface::~SpringSurface(void) +{ + return; +} + +ESurface +SpringSurface::GetType(void) const +{ + return ESURFACE_SPRING_SURFACE; +} + +void +SpringSurface::Initialize(void) +{ + InitSpring(); + return; +} + +void +SpringSurface::Calculate(float timeStep) +{ + float springLength = 0.f; + float deltaLength = 0.f; + Vec3f direction; + Vec3f tempForce; + + // compute current distance between nodes + direction = __pPoint1->GetPosition() - __pPoint2->GetPosition(); + + springLength = direction.length(); + if (springLength > 1.0e-4f) // delta precision + { + direction /= springLength; // normalizing without computing length again + } + + // compute elastic force + // simple Hooke's law: F = k*dx; + deltaLength = springLength - __restLength; + tempForce = direction * (__stiffness * deltaLength); + + // if F is positive - spring is stretched + // if F is negative - compressed + // apply force to nodes + __pPoint1->AddForce(-tempForce); + __pPoint2->AddForce( tempForce); + return; +} + +PropertyCast +SpringSurface::GetProperty(ElementProperty property) const +{ + PropertyCast result; + switch (property) + { + // coefficient of rigidity + case N_STIFFNESS: + result.type = PropertyCast::NUMBER; + result.value.numberValue = __stiffness; + break; + default: + result = ElementSurface::GetProperty(property); + break; + } + return result; +} + +bool +SpringSurface::SetProperty(ElementProperty property, bool boolValue) +{ + return ElementSurface::SetProperty(property, boolValue); +} + +bool +SpringSurface::SetProperty(ElementProperty property, LUA_NUMBER numericValue) +{ + bool result = true; // for successful set + switch (property) + { + // coefficient of rigidity + case N_STIFFNESS: + __stiffness = numericValue; + break; + default: + result = ElementSurface::SetProperty(property, numericValue); + break; + } + return result; +} + +bool +SpringSurface::SetProperty(ElementProperty property, const Vec3f& vectorValue) +{ + return ElementSurface::SetProperty(property, vectorValue); +} + +void +SpringSurface::InitSpring(void) +{ + __stiffness = __stiffnessInit; + // spring is considered unstrained in the beginning + __restLength = (__pPoint1->GetPosition() - __pPoint2->GetPosition()).length(); + return; +} + +} } } } // Tizen::Ui::Effects::_PhysicsEngine diff --git a/src/ui/effects/renderer/FUiEffects_RendererEffectRenderer.cpp b/src/ui/effects/renderer/FUiEffects_RendererEffectRenderer.cpp new file mode 100644 index 0000000..8b2eaab --- /dev/null +++ b/src/ui/effects/renderer/FUiEffects_RendererEffectRenderer.cpp @@ -0,0 +1,1055 @@ +// +// 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 FUiEffects_RendererEffectRenderer.cpp + * @brief This is the source file for the EffectRenderer class + */ + +#include + +#include +#include + +#include +#include +#include + +#include "FUiEffects_RendererEffectShader.h" +#include +#include +#include +#include "../FUiEffects_EffectErrorMessages.h" +#include + +using namespace Tizen::Ui::Effects::_Runtime; +using namespace Tizen::Ui::Effects::_Renderer::EngineModel; +using namespace Tizen::Ui::Effects::_Renderer::Math; +using namespace Tizen::Ui::Effects::_Renderer::GraphicsEngine; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using std::string; + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer +{ + +EGLDisplay EffectRenderer::__eglDisplay = EGL_NO_DISPLAY; +EGLConfig EffectRenderer::__eglConfig = 0; +EGLint EffectRenderer::__glMajorVer = 0; +EGLint EffectRenderer::__glMinorVer = 0; +bool EffectRenderer::__OpenGLInitialized = false; + +const EGLint RENDERER_EGL_DEFAULT_CONFIG_ATTRIBS[] = +{ + EGL_RED_SIZE, 8, + EGL_GREEN_SIZE, 8, + EGL_BLUE_SIZE, 8, + EGL_ALPHA_SIZE, 8, + EGL_DEPTH_SIZE, 8, + EGL_SURFACE_TYPE, EGL_WINDOW_BIT, + EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, + EGL_NONE +}; + +static const EGLint RENDERER_EGL_DEFAULT_CONTEXT_ATTRIBS[] = +{ + EGL_CONTEXT_CLIENT_VERSION, 2, + EGL_NONE +}; + +bool +EffectRenderer::InitOpenGL(const EGLint* pConfig) +{ + //if already initialized + if (__OpenGLInitialized) + { + SysLog(NID_UI_EFFECT, "OpenGL already initialized."); + + return true; + } + + int nconfigs = 0; + eglBindAPI(EGL_OPENGL_ES_API); + + __eglDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY); + SysTryReturn(NID_UI_EFFECT, __eglDisplay != EGL_NO_DISPLAY, false, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Effects. There was an error while performing function eglGetDisplay"); + + + SysTryCatchLabel(NID_UI_EFFECT, eglInitialize(__eglDisplay, &__glMajorVer, &__glMinorVer) == EGL_TRUE, , INIT_ERROR, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Effects. There was an error while performing function eglInitialize"); + //SysLog(NID_UI_EFFECT, "Effects. GL version %d.%d", __glMajorVer, __glMinorVer); + + SysTryCatchLabel(NID_UI_EFFECT, eglChooseConfig(__eglDisplay, pConfig, &__eglConfig, 1, &nconfigs) == EGL_TRUE, , INIT_ERROR, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Effects. There was an error while performing function eglChooseConfig"); + + + SysTryCatchLabel(NID_UI_EFFECT, nconfigs == 1, , INIT_ERROR, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Effects. There is eglChooseConfig matching configurations count error (OpenGL)"); + +//INIT_SUCCESS: + __OpenGLInitialized = CheckEglNoErrors(); + + SysTryReturn(NID_UI_EFFECT, __OpenGLInitialized, false, E_OPERATION_FAILED, "[E_OPERATION_FAILED] There are OpenGL errors during initialization"); + + SysLog(NID_UI_EFFECT, "OpenGL initialized successfully."); + return true; + + +INIT_ERROR: + __OpenGLInitialized = false; + eglTerminate(__eglDisplay); + __eglDisplay = EGL_NO_DISPLAY; + SysLogException(NID_UI_EFFECT, E_OPERATION_FAILED, "[E_OPERATION_FAILED] OpenGL errors were appeared during initialization"); + + return false; +} + +void +EffectRenderer::CloseOpenGL(void) +{ + SysLog(NID_UI_EFFECT, "Effects. OpenGL is closing..."); + + //if already initialized + if (!__OpenGLInitialized) + { + SysLog(NID_UI_EFFECT, "OpenGL not initialized."); + + return; + } + + if (__eglDisplay != EGL_NO_DISPLAY) + { + eglTerminate(__eglDisplay); + __eglDisplay = EGL_NO_DISPLAY; + } + + __OpenGLInitialized = false; + + SysLog(NID_UI_EFFECT, "OpenGL closed!"); + + return; +} + +bool +EffectRenderer::CheckOpenGlesInitialized(void) +{ + return __OpenGLInitialized; +} + +EGLSurface +EffectRenderer::CreateSurface(EGLNativeWindowType wnd) +{ + EGLSurface newSurface = eglCreateWindowSurface(__eglDisplay, __eglConfig, wnd, 0); + + EGL_ASSERT_NOERRORS + + SysTryReturn(NID_UI_EFFECT, newSurface != EGL_NO_SURFACE && CheckEglNoErrors(), EGL_NO_SURFACE, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Effects. There was an error while performing function eglCreateWindowSurface - (%#x)", (unsigned int) newSurface); + + EGL_ASSERT_NOERRORS + return newSurface; +} + +void +EffectRenderer::DeleteSurface(EGLSurface surface) +{ + SysTryReturnVoidResult(NID_UI_EFFECT, surface != EGL_NO_SURFACE, E_OPERATION_FAILED, "[E_OPERATION_FAILED] DeleteSurface EGL_NO_SURFACE"); + + eglDestroySurface(__eglDisplay, surface); + + return; +} + +EGLContext +EffectRenderer::CreateContext(EGLContext shareContext) +{ + EGLContext newContext = eglCreateContext(__eglDisplay, __eglConfig, EGL_NO_CONTEXT, RENDERER_EGL_DEFAULT_CONTEXT_ATTRIBS); + + SysTryReturn(NID_UI_EFFECT, newContext != EGL_NO_CONTEXT && CheckEglNoErrors(), EGL_NO_CONTEXT, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Effects. There was an error while performing function eglCreateContext - (%#x)", (unsigned int) newContext); + EGL_ASSERT_NOERRORS + + return newContext; +} + +void +EffectRenderer::DeleteContext(EGLContext context) +{ + //SysTryLog(NID_UI_EFFECT, context != EGL_NO_CONTEXT, "DeleteContext EGL_NO_CONTEXT"); + + eglDestroyContext(__eglDisplay, context); + + return; +} + +EffectRenderer::EffectRenderer(void) + : __previousContext(EGL_NO_CONTEXT) + , __previousContextSaved(false) + , __FOV_Y_deg(0.f) + , __perspectiveProjection(false) + , __renderDataScene(null) + , __pRenderDataSurfaceCollection(null) + , __dimensionPreviousControl() +{ + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_EFFECT, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + surface = EGL_NO_SURFACE; + __context = CreateContext(); + r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_EFFECT, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + __renderer = RenderPtr(new (std::nothrow) Render); + r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_EFFECT, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI_EFFECT, System::GetImpl(__renderer) != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + + __root = GroupPtr(new (std::nothrow) Group); + r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_EFFECT, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI_EFFECT, System::GetImpl(__root) != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + + __camera = CameraPtr(new (std::nothrow) Camera); + r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_EFFECT, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI_EFFECT, System::GetImpl(__camera) != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + + __camera->SetWorld(Math::Matrix4f().Identity()); + + StringShaderPropertyPtr vertex(new (std::nothrow) StringShaderProperty(ShaderProperty::ShaderType::VERTEX, EFFECT_VERTEX_SHADER_STR)); + SysTryReturnVoidResult(NID_UI_EFFECT, System::GetImpl(vertex) != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + + StringShaderPropertyPtr fragment(new (std::nothrow) StringShaderProperty(ShaderProperty::ShaderType::FRAGMENT, EFFECT_DUMMY_FRAGMENT_SHADER_STR)); + SysTryReturnVoidResult(NID_UI_EFFECT, System::GetImpl(fragment) != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + + __program = ShaderHolderProgramPropertyPtr(new (std::nothrow) ShaderHolderProgramProperty(vertex, fragment)); + r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_EFFECT, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI_EFFECT, System::GetImpl(__program) != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + + __renderer->SetDefaultDepthTestState(true); +} + +EffectRenderer::~EffectRenderer(void) +{ + ReleaseCache(); + DeleteContext(__context); +} + +void +EffectRenderer::MakeCurrent(void) +{ + SysAssertf(__eglDisplay != EGL_NO_DISPLAY, _UiEffectError::INTERNAL_ERROR); + SysAssertf(surface != EGL_NO_SURFACE, _UiEffectError::INTERNAL_ERROR); + + if (!__previousContextSaved) + { + __previousContext = eglGetCurrentContext(); + __previousContextSaved = true; + } + + eglMakeCurrent(__eglDisplay, surface, surface, __context); + + return; +} + +void +EffectRenderer::RestorePreviousContext(void) +{ + if (__previousContextSaved && __eglDisplay != EGL_NO_DISPLAY) + { + if (__previousContext != EGL_NO_CONTEXT && surface != EGL_NO_SURFACE) + { + eglMakeCurrent(__eglDisplay, surface, surface, __previousContext); + } + else + { + eglMakeCurrent(__eglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); + } + } + + __previousContextSaved = false; + + return; +} + +MemoryTexture2DPropertyPtr +EffectRenderer::FindTexture(long bitmapID) +{ + TexturesMap::const_iterator it = __textures.find(bitmapID); + + if (it != __textures.end()) + { + return it->second; + } + + //else (not found) + // create empty placeholder for further texture upload + MemoryTexture2DPropertyPtr tex = MemoryTexture2DPropertyPtr(new (std::nothrow) MemoryTexture2DProperty); + + result r = GetLastResult(); + SysTryReturn(NID_UI_EFFECT, r == E_SUCCESS, tex, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturn(NID_UI_EFFECT, System::GetImpl(tex) != null, tex, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + + __textures.insert(TexturesMap::value_type(bitmapID, tex)); + return tex; +} + +void +EffectRenderer::InitializeContext(void) const +{ + glClearColor(0,0,0,1); + glDisable(GL_CULL_FACE); + + return; +} + +void +EffectRenderer::Construct(RenderDataScene &renderDataCollection) +{ + __renderDataScene = &renderDataCollection; + __pRenderDataSurfaceCollection = &renderDataCollection.GetRenderDataSurfaceCollection(); + + Tizen::Ui::Effects::_Runtime::RenderDataSurfaceCollection::size_type objcount = __pRenderDataSurfaceCollection->size(); + + __root->Clear();// no deletion of children? check destructors + __root->AddChild(__camera); + __objects.clear(); + + ConstructLighting(); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_EFFECT, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + __objects.resize(objcount); + for (RenderDataSurfaceCollection::size_type i = 0; i < objcount; ++i) + { + __objects[i] = RendererObjectPtr(new (std::nothrow) RendererObject); + + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_EFFECT, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI_EFFECT, System::GetImpl(__objects[i]) != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + } + + for (RenderDataSurfaceCollection::size_type i = 0; i < objcount; ++i) + { + InitRObjectFromData(i, *(*__pRenderDataSurfaceCollection)[i]); + } + + return; +} + +void +EffectRenderer::ConstructLighting() +{ + SysAssertf(__renderDataScene != null, _UiEffectError::INTERNAL_ERROR); + + __lightingParameters.SetAmbientColor(__renderDataScene->GetLightAmbientColour()); + __lightingParameters.SetAmbientIntensity(__renderDataScene->GetLightIntensity()); + __lightingParameters.SetAttenuation(__renderDataScene->GetLightAttenuation()); + + if (__renderDataScene->LockUnitsLightContainer()) + { + do + { + switch (__renderDataScene->GetTypeOfCurrentUnitLight()) + { + case TYPE_UNIT_LIGHT_POINT: + { + const _Runtime::PointLight* pModelPointLight = __renderDataScene->GetCurrentUnitLight<_Runtime::PointLight>(); + if (pModelPointLight != null) + { + PointLightPtr pointLight = PointLightPtr(new (std::nothrow) PointLight(__lightingParameters.GetAttenuation())); + SysTryReturnVoidResult(NID_UI_EFFECT, System::GetImpl(pointLight) != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + __pointLights[pModelPointLight->GetName()] = pointLight; + + pointLight->SetPosition(pModelPointLight->GetPosition()); + pointLight->SetColor(pModelPointLight->GetColour()); + pointLight->SetIntensity(pModelPointLight->GetIntensity()); + pointLight->SetEnabled(pModelPointLight->GetEnabled()); + } + } + break; + case TYPE_UNIT_LIGHT_SPOT: + { + const _Runtime::SpotLight* pModelSpotLight = __renderDataScene->GetCurrentUnitLight<_Runtime::SpotLight>(); + if (pModelSpotLight != null) + { + SpotLightPtr spotLight = SpotLightPtr(new (std::nothrow) SpotLight(__lightingParameters.GetAttenuation())); + SysTryReturnVoidResult(NID_UI_EFFECT, System::GetImpl(spotLight) != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + __spotLights[pModelSpotLight->GetName()] = spotLight; + + spotLight->SetPosition(pModelSpotLight->GetPosition()); + spotLight->SetTarget(pModelSpotLight->GetTarget()); + spotLight->SetOpeningAngle(pModelSpotLight->GetAngleOpening()); + spotLight->SetFadeOutAngle(pModelSpotLight->GetAngleFadeOut()); + spotLight->SetColor(pModelSpotLight->GetColour()); + spotLight->SetIntensity(pModelSpotLight->GetIntensity()); + spotLight->SetEnabled(pModelSpotLight->GetEnabled()); + } + } + break; + case TYPE_UNIT_LIGHT_DIRECTIONAL: + { + const _Runtime::DirectionalLight* pModelDirectionalLight = __renderDataScene->GetCurrentUnitLight<_Runtime::DirectionalLight>(); + if (pModelDirectionalLight != null) + { + DirectionalLightPtr directionalLight = DirectionalLightPtr(new (std::nothrow) DirectionalLight); + SysTryReturnVoidResult(NID_UI_EFFECT, System::GetImpl(directionalLight) != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + __directionalLights[pModelDirectionalLight->GetName()] = directionalLight; + + directionalLight->SetDirection(pModelDirectionalLight->GetDirection()); + directionalLight->SetColor(pModelDirectionalLight->GetColour()); + directionalLight->SetIntensity(pModelDirectionalLight->GetIntensity()); + directionalLight->SetEnabled(pModelDirectionalLight->GetEnabled()); + } + } + break; + default: + break; + } + } + while (__renderDataScene->GoToNextUnitLight()); + } + + CreateShader(); + + return; +} + +void +EffectRenderer::UpdateLighting(void) +{ + SysAssertf(__renderDataScene != null, _UiEffectError::INTERNAL_ERROR); + + bool updated = false; + bool needShaderCompilation = false; + + if (__renderDataScene->isSomethingChanged) + { + updated = true; + + if (__renderDataScene->isAmbientColourChanged) + { + __lightingParameters.SetAmbientColor(__renderDataScene->GetLightAmbientColour()); + __renderDataScene->isAmbientColourChanged = false; + } + + if (__renderDataScene->isIntensityChanged) + { + __lightingParameters.SetAmbientIntensity(__renderDataScene->GetLightIntensity()); + __renderDataScene->isIntensityChanged = false; + } + + if (__renderDataScene->isAttenuationChanged) + { + __lightingParameters.SetAttenuation(__renderDataScene->GetLightAttenuation()); + + for (PointLightsList::iterator it = __pointLights.begin(); it != __pointLights.end(); ++it) + { + it->second->UpdateAttenuation(); + } + + for (SpotLightsList::iterator it = __spotLights.begin(); it != __spotLights.end(); ++it) + { + it->second->UpdateAttenuation(); + } + + __renderDataScene->isAttenuationChanged = false; + } + __renderDataScene->isSomethingChanged = false; + } + + if (__renderDataScene->LockUnitsLightContainer()) + { + do + { + const _Runtime::UnitLight *pLight = __renderDataScene->GetCurrentUnitLight<_Runtime::UnitLight>(); + updated = updated || pLight->isSomethingChanged; + + if (pLight->isSomethingChanged) + { + string nameUnitLight = pLight->GetName(); + + switch (pLight->GetType()) + { + case TYPE_UNIT_LIGHT_POINT: + { + const _Runtime::PointLight* pModelPointLight = static_cast(pLight); + PointLight *pPointLight = System::GetImpl(__pointLights[nameUnitLight]); + + if (pModelPointLight->isPositionChanged) + { + pPointLight->SetPosition(pModelPointLight->GetPosition()); + } + + if (pModelPointLight->isColourChanged) + { + pPointLight->SetColor(pModelPointLight->GetColour()); + } + + if (pModelPointLight->isIntensityChanged) + { + pPointLight->SetIntensity(pModelPointLight->GetIntensity()); + } + + if (pModelPointLight->isEnabledChanged) + { + needShaderCompilation = true; + pPointLight->SetEnabled(pModelPointLight->GetEnabled()); + } + + } + break; + case TYPE_UNIT_LIGHT_SPOT: + { + const _Runtime::SpotLight* pModelSpotLight = static_cast(pLight); + SpotLight *pSpotLight = System::GetImpl(__spotLights[nameUnitLight]); + + if (pModelSpotLight->isPositionChanged) + { + pSpotLight->SetPosition(pModelSpotLight->GetPosition()); + } + + if (pModelSpotLight->isTargetChanged) + { + pSpotLight->SetTarget(pModelSpotLight->GetTarget()); + } + + if (pModelSpotLight->isAngleOpeningChanged) + { + pSpotLight->SetOpeningAngle(pModelSpotLight->GetAngleOpening()); + } + + if (pModelSpotLight->isAngleFadeOutChanged) + { + pSpotLight->SetFadeOutAngle(pModelSpotLight->GetAngleFadeOut()); + } + + if (pModelSpotLight->isColourChanged) + { + pSpotLight->SetColor(pModelSpotLight->GetColour()); + } + + if (pModelSpotLight->isIntensityChanged) + { + pSpotLight->SetIntensity(pModelSpotLight->GetIntensity()); + } + + if (pModelSpotLight->isEnabledChanged) + { + needShaderCompilation = true; + pSpotLight->SetEnabled(pModelSpotLight->GetEnabled()); + } + } + break; + case TYPE_UNIT_LIGHT_DIRECTIONAL: + { + const _Runtime::DirectionalLight* pModelDirectionalLight = static_cast(pLight); + DirectionalLight *pDirectionalLight = System::GetImpl(__directionalLights[nameUnitLight]); + + if (pModelDirectionalLight->isDirectionChanged) + { + pDirectionalLight->SetDirection(pModelDirectionalLight->GetDirection()); + } + + if (pModelDirectionalLight->isColourChanged) + { + pDirectionalLight->SetColor(pModelDirectionalLight->GetColour()); + } + + if (pModelDirectionalLight->isIntensityChanged) + { + pDirectionalLight->SetIntensity(pModelDirectionalLight->GetIntensity()); + } + + if (pModelDirectionalLight->isEnabledChanged) + { + needShaderCompilation = true; + pDirectionalLight->SetEnabled(pModelDirectionalLight->GetEnabled()); + } + } + break; + default: + break; + } // switch + + __renderDataScene->ResetSignsCurrentUnitLight(); + + } // if (flags != 0) + } + while (__renderDataScene->GoToNextUnitLight()); + + if (updated) + { + if (needShaderCompilation) + { + CreateShader(); + } + + std::vector::size_type n = __objects.size(); + for (std::vector::size_type i = 0; i < n; ++i) + { + __objects[i]->GetMaterial()->TouchDrawables(); + __objects[i]->InvalidateCache(); + } + } + } + + return; +} + +void +EffectRenderer::CreateShader() +{ + string __fragmentSource = EFFECT_FRAGMENT_SHADER_STR; + + + if (__pointLights.size() > 0) + { + char buffer [30]; + string def_entry; + string src_entry; + + string::size_type defpos = __fragmentSource.find(POINTLIGHT_DEFPOS_STR); + string::size_type srcpos = __fragmentSource.find(POINTLIGHT_SRCPOS_STR); + + SysAssert(defpos != string::npos); + SysAssert(srcpos != string::npos); + + int i = 0; + + for (PointLightsList::const_iterator it = __pointLights.begin(); it != __pointLights.end(); ++it) + { + if (!it->second->GetEnabled()) + { + continue; + } + + def_entry = POINTLIGHT_DEF_STR; + sprintf(buffer, "%d", i); + replace(def_entry, "%n", buffer); + __fragmentSource.insert(defpos, def_entry); + defpos += def_entry.length(); + srcpos += def_entry.length(); + + src_entry = it->second->IsBlack()? POINTLIGHT_NOATTSRC_STR : POINTLIGHT_ATTSRC_STR; + sprintf(buffer, "%d", i); + replace(src_entry, "%n", buffer); + __fragmentSource.insert(srcpos, src_entry); + srcpos += src_entry.length(); + + i++; + } + } + + if (__spotLights.size() > 0) + { + char buffer [30]; + string def_entry; + string src_entry; + + string::size_type defpos = __fragmentSource.find(SPOTLIGHT_DEFPOS_STR); + string::size_type srcpos = __fragmentSource.find(SPOTLIGHT_SRCPOS_STR); + + SysAssert(defpos != string::npos); + SysAssert(srcpos != string::npos); + + int i = 0; + + for (SpotLightsList::const_iterator it = __spotLights.begin(); it != __spotLights.end(); ++it) + { + if (!it->second->GetEnabled()) + { + continue; + } + + def_entry = SPOTLIGHT_DEF_STR; + sprintf(buffer, "%d", i); + replace(def_entry, "%n", buffer); + __fragmentSource.insert(defpos, def_entry); + defpos += def_entry.length(); + srcpos += def_entry.length(); + + src_entry = it->second->IsBlack()? SPOTLIGHT_NOATTSRC_STR : SPOTLIGHT_ATTSRC_STR; + sprintf(buffer, "%d", i); + replace(src_entry, "%n", buffer); + __fragmentSource.insert(srcpos, src_entry); + srcpos += src_entry.length(); + + i++; + } + } + + if (__directionalLights.size() > 0) + { + char buffer [30]; + string def_entry; + string src_entry; + + string::size_type defpos = __fragmentSource.find(DIRECTIOALLIGHT_DEFPOS_STR); + string::size_type srcpos = __fragmentSource.find(DIRECTIOALLIGHT_SRCPOS_STR); + + SysAssert(defpos != string::npos); + SysAssert(srcpos != string::npos); + + int i = 0; + + for (DirectionalLightsList::const_iterator it = __directionalLights.begin(); it != __directionalLights.end(); ++it) + { + if (!it->second->GetEnabled()) + { + continue; + } + + def_entry = DIRECTIOALLIGHT_DEF_STR; + sprintf(buffer, "%d", i); + replace(def_entry, "%n", buffer); + __fragmentSource.insert(defpos, def_entry); + defpos += def_entry.length(); + srcpos += def_entry.length(); + + src_entry = DIRECTIOALLIGHT_SRC_STR; + sprintf(buffer, "%d", i); + replace(src_entry, "%n", buffer); + __fragmentSource.insert(srcpos, src_entry); + srcpos += src_entry.length(); + + i++; + } + } + + __program->GetShader(EngineModel::ShaderProperty::ShaderType::FRAGMENT).staticCast()->SetSource(__fragmentSource); + if (System::GetImpl(__program->GetCache()) != null) + { + __program->GetCache()->Invalidate(); + } + + PRINT_DEBUG("Shader ", __fragmentSource); + + return; +} + +void +EffectRenderer::InitRObjectFromData(RenderDataSurfaceCollection::size_type index, RenderDataSurface &rdata) +{ + SysAssertf(index < __objects.size(), "Effects. Renderer: index < __objects.size()"); + + __objects[index]->opacity->Set(1.0f - rdata.transparency); + __objects[index]->alphablend->Enable(rdata.transparency > 0.0f); + + __objects[index]->GetMat()->AddProperty("Lib Effects Rendering Program", __program); + __objects[index]->GetMat()->AddProperty(MAIN_TEX_STR, FindTexture(rdata.bitmapId)); + __objects[index]->GetMat()->AddProperty(LIGHTING_AMBIENTCOLORI_STR, __lightingParameters.GetAmbientColorIHolder()); + + char buffer [30]; + + int i = 0; + for(PointLightsList::const_iterator it = __pointLights.begin(); it != __pointLights.end(); ++it) + { + sprintf(buffer, "%d", i); + + __objects[index]->GetMat()->AddProperty((string(POINTLIGHT_STR) + buffer + POINTLIGHT_POSITION_STR).c_str(), (*it).second->GetPositionHolder()); + __objects[index]->GetMat()->AddProperty((string(POINTLIGHT_STR) + buffer + POINTLIGHT_COLORI_STR).c_str(), (*it).second->GetColorIHolder()); + __objects[index]->GetMat()->AddProperty((string(POINTLIGHT_STR) + buffer + POINTLIGHT_RK_STR).c_str(), (*it).second->GetRkHolder()); + + i++; + } + + i = 0; + for (DirectionalLightsList::const_iterator it = __directionalLights.begin(); it != __directionalLights.end(); ++it) + { + sprintf(buffer, "%d", i); + + __objects[index]->GetMat()->AddProperty((string(DIRECTIOALLIGHT_STR) + buffer + DIRECTIOALLIGHT_DIRECTION_STR).c_str(), (*it).second->GetDirectionHolder()); + __objects[index]->GetMat()->AddProperty((string(DIRECTIOALLIGHT_STR) + buffer + DIRECTIOALLIGHTLIGHT_COLORI_STR).c_str(), (*it).second->GetColorIHolder()); + + i++; + } + + i = 0; + for (SpotLightsList::const_iterator it = __spotLights.begin(); it != __spotLights.end(); ++it) + { + sprintf(buffer, "%d", i); + + __objects[index]->GetMat()->AddProperty((string(SPOTLIGHT_STR) + buffer + SPOTLIGHT_POSITION_STR).c_str(), (*it).second->GetPositionHolder()); + __objects[index]->GetMat()->AddProperty((string(SPOTLIGHT_STR) + buffer + SPOTLIGHT_DIRECTION_STR).c_str(), (*it).second->GetDirectionHolder()); + __objects[index]->GetMat()->AddProperty((string(SPOTLIGHT_STR) + buffer + SPOTLIGHT_K1_STR).c_str(), (*it).second->GetK1Holder()); + __objects[index]->GetMat()->AddProperty((string(SPOTLIGHT_STR) + buffer + SPOTLIGHT_K2_STR).c_str(), (*it).second->GetK2Holder()); + __objects[index]->GetMat()->AddProperty((string(SPOTLIGHT_STR) + buffer + SPOTLIGHT_COLORI_STR).c_str(), (*it).second->GetColorIHolder()); + __objects[index]->GetMat()->AddProperty((string(SPOTLIGHT_STR) + buffer + SPOTLIGHT_RK_STR).c_str(), (*it).second->GetRkHolder()); + + i++; + } + + RendererGeometryPtr geom(new (std::nothrow) RendererGeometry); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_EFFECT, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI_EFFECT, System::GetImpl(geom) != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + + __objects[index]->setGeometry(geom); + + __objects[index]->GetGeom()->SetVertData(rdata.vnt); + __objects[index]->GetGeom()->SetIndices(rdata.indices); + + __objects[index]->modelMtr->Set(Math::Matrix4f(rdata.modelMtr[0], rdata.modelMtr[4], rdata.modelMtr[8], rdata.modelMtr[12], + rdata.modelMtr[1], rdata.modelMtr[5], rdata.modelMtr[9], rdata.modelMtr[13], + rdata.modelMtr[2], rdata.modelMtr[6], rdata.modelMtr[10], rdata.modelMtr[14], + rdata.modelMtr[3], rdata.modelMtr[7], rdata.modelMtr[11], rdata.modelMtr[15])); + + Math::Matrix4f tmpNormalMtr(Math::Matrix4f::GetIdentity()); + __objects[index]->normalMtr->Set(tmpNormalMtr.SetRotation(__objects[index]->modelMtr->Get().GetRotation().Inverse())); // ".transpose()" is omitted due to "column order" matrix representation in GLSL + + __root->AddChild(__objects[index]); + + return; +} + +void +EffectRenderer::Update(void) +{ + + std::unique_ptr x; + + SysAssertf(__renderDataScene != null, _UiEffectError::INTERNAL_ERROR); + SysAssertf(__pRenderDataSurfaceCollection != null, _UiEffectError::INTERNAL_ERROR); + SysAssertf(__objects.size() == __pRenderDataSurfaceCollection->size(), _UiEffectError::INTERNAL_ERROR); + + Tizen::Ui::Effects::_Runtime::RenderDataSurfaceCollection::size_type objcount = __pRenderDataSurfaceCollection->size(); + + for (RenderDataSurfaceCollection::size_type i = 0; i < objcount; ++i) + { + UpdateRObject(i, *(*__pRenderDataSurfaceCollection)[i]); + } + + UpdateLighting(); + + return; +} + +void +EffectRenderer::UpdateRObject(RenderDataSurfaceCollection::size_type index, RenderDataSurface &rdata) +{ + if (rdata.vertexDataChanged || rdata.indicesChanged) + { + RendererGeometryPtr geometry = __objects[index]->GetGeom(); + + if (rdata.vertexDataChanged) + { + geometry->InvalidateVertexData(); + rdata.vertexDataChanged = false; + } + + if (rdata.indicesChanged) + { + geometry->InvalidateIndices(); + rdata.indicesChanged = false; + } + + geometry->TouchDrawables(); + } + + if (rdata.modelMtrChanged) + { + __objects[index]->modelMtr->Set(Math::Matrix4f(rdata.modelMtr[0], rdata.modelMtr[4], rdata.modelMtr[8], rdata.modelMtr[12], + rdata.modelMtr[1], rdata.modelMtr[5], rdata.modelMtr[9], rdata.modelMtr[13], + rdata.modelMtr[2], rdata.modelMtr[6], rdata.modelMtr[10], rdata.modelMtr[14], + rdata.modelMtr[3], rdata.modelMtr[7], rdata.modelMtr[11], rdata.modelMtr[15])); + + Math::Matrix4f tmpNormalMtr(Math::Matrix4f::GetIdentity()); + + __objects[index]->normalMtr->Set(tmpNormalMtr.SetRotation(__objects[index]->modelMtr->Get().GetRotation().Inverse())); // ".transpose()" is omitted due to "column order" matrix representation in GLSL + __objects[index]->InvalidateCache(); + rdata.modelMtrChanged = false; + } + + if (rdata.bitmapIdChanged || rdata.transparencyChanged) + { + PropertyHolderMaterialPtr material = __objects[index]->GetMat(); + + if (rdata.bitmapIdChanged) + { + material->AddProperty(MAIN_TEX_STR, FindTexture(rdata.bitmapId)); + rdata.bitmapIdChanged = false; + } + + if (rdata.transparencyChanged) + { + __objects[index]->opacity->Set(1.0f - rdata.transparency); + __objects[index]->alphablend->Enable(rdata.transparency > 0.0f); + rdata.transparencyChanged = false; + } + + material->TouchDrawables(); + } + + return; +} + +void +EffectRenderer::Draw(void) +{ + SysAssertf(__eglDisplay != EGL_NO_DISPLAY, _UiEffectError::INTERNAL_ERROR); + SysAssertf(surface != EGL_NO_SURFACE, _UiEffectError::INTERNAL_ERROR); + SysAssertf(__context != EGL_NO_CONTEXT, _UiEffectError::INTERNAL_ERROR); + + MakeCurrent(); + InitializeContext(); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); + __renderer->Draw(*__root); + eglSwapBuffers(__eglDisplay, surface); + + RestorePreviousContext(); + + return; +} + +void +EffectRenderer::SetScreen(float screenLeft, float screenRight, float screenBottom, float screenTop, int displayWidth, int displayHeight) +{ + SysAssertf(screenRight > screenLeft, _UiEffectError::INTERNAL_ERROR); + SysAssertf(screenTop < screenBottom, _UiEffectError::INTERNAL_ERROR); + SysAssertf(displayWidth > 0, _UiEffectError::INTERNAL_ERROR); + SysAssertf(displayHeight > 0, _UiEffectError::INTERNAL_ERROR); + + __viewport.screenLeft = screenLeft; + __viewport.screenRight = screenRight; + __viewport.screenTop = screenTop; + __viewport.screenBottom = screenBottom; + __viewport.displayWidth = displayWidth; + __viewport.displayHeight = displayHeight; + + __camera->SetViewport(Vector2f(0,0), Vector2f(displayWidth, displayHeight)); + + return; +} + +void +EffectRenderer::TrackScreenSizeChanges(const Control& control) +{ + if (__dimensionPreviousControl != control.GetSize()) + { + SetScreen(control); + } + return; +} + +void +EffectRenderer::SetScreen(const Control& control) +{ + Dimension logicalScreenSizeCurrent = control.GetSize(); // not real but logical size of control + Dimension realScreenSize = _CoordinateSystemUtils::Transform(logicalScreenSizeCurrent); // real size of control + SetScreen(0, logicalScreenSizeCurrent.width, logicalScreenSizeCurrent.height, 0, realScreenSize.width, realScreenSize.height); + __dimensionPreviousControl = logicalScreenSizeCurrent; + return; +} + +bool +EffectRenderer::SetWorld(float worldLeft, float worldRight, float worldBottom, float worldTop, float worldZ, float worldNearDist, float worldFarDist, float FOV_Y_deg, bool perspectiveProjection) +{ + SysAssertf(fabs(worldLeft - worldRight) > std::numeric_limits::epsilon(), _UiEffectError::INTERNAL_ERROR); + SysAssertf(fabs(worldTop - worldBottom) > std::numeric_limits::epsilon(), _UiEffectError::INTERNAL_ERROR); + SysAssertf(FOV_Y_deg < 180.0f && FOV_Y_deg > 0.0f, _UiEffectError::INTERNAL_ERROR); + SysAssertf(worldNearDist > 0.0f && worldFarDist > 0.0f && worldNearDist < worldFarDist, _UiEffectError::INTERNAL_ERROR); + + __viewport.worldLeft = worldLeft; + __viewport.worldRight = worldRight; + __viewport.worldTop = worldTop; + __viewport.worldBottom = worldBottom; + __viewport.worldZ = worldZ; + __viewport.worldNearDist = worldNearDist; + __viewport.worldFarDist = worldFarDist; + + __FOV_Y_deg = FOV_Y_deg; + __perspectiveProjection = perspectiveProjection; + + Math::Matrix4f tmpmat; + + if (__perspectiveProjection) + { + float cameraHeight = (__viewport.worldTop - __viewport.worldBottom) / 2 / tan(Math::F_Deg_2_Rad(__FOV_Y_deg)/2.0f) + __viewport.worldZ; + + tmpmat = Math::Matrix4f::CreatePerspectiveFovRH(Math::F_Deg_2_Rad(__FOV_Y_deg), (__viewport.worldRight - __viewport.worldLeft) / (__viewport.worldTop - __viewport.worldBottom), __viewport.worldNearDist, __viewport.worldFarDist); + tmpmat.data[1].data[1] = -tmpmat.data[1].data[1]; + __camera->SetProj(tmpmat); + + tmpmat = Math::Matrix4f::GetIdentity(); + tmpmat.SetTranslation((__viewport.worldRight + __viewport.worldLeft) / 2, (__viewport.worldTop + __viewport.worldBottom) / 2, cameraHeight); + __camera->SetWorld(tmpmat); + } + else + { + tmpmat = Math::Matrix4f::GetIdentity(); + __camera->SetWorld(tmpmat); + + tmpmat = Math::Matrix4f::CreateOrthoRH(__viewport.worldLeft, __viewport.worldRight, __viewport.worldBottom, __viewport.worldTop, -__viewport.worldFarDist, __viewport.worldFarDist); + __camera->SetProj(tmpmat); + } + + return true; +} + +Tizen::Ui::Effects::_Utils::Vec3f +EffectRenderer::TransformScreenToWorld(Tizen::Ui::Effects::_Utils::Vec2f p) const +{ + return __viewport.TransformScreenToWorld(p); +} + +bool +EffectRenderer::SetBitmap(long bitmapID, Tizen::Graphics::Bitmap &bitmap) +{ + MemoryTexture2DPropertyPtr tex = FindTexture(bitmapID); + Tizen::Graphics::_BitmapImpl* pBitmapImpl = Tizen::Graphics::_BitmapImpl::GetInstance(bitmap); + BufferInfo bufferInfo; + + SysTryReturn(NID_UI_EFFECT, pBitmapImpl != null, false, E_OPERATION_FAILED, "[E_OPERATION_FAILED] _BitmapImpl::GetInstance has returned null value"); + + PROFILER_EXPR(pBitmapImpl->LockFast(bufferInfo);, PROFLOG_Lock); + + if (bufferInfo.pPixels == null || bufferInfo.width <= 0 || bufferInfo.height <= 0) + { + bitmap.Unlock(); + return false; + } + + PROFILER_EXPR(tex->SetData((void*) bufferInfo.pPixels, bufferInfo.width, bufferInfo.height);, PROFLOG_Setdata); + PROFILER_EXPR(pBitmapImpl->UnlockFast();, PROFLOG_Unlock); + + return true; +} + +bool +EffectRenderer::SetBitmap(long bitmapID, const void* ptr, size_t width, size_t height) +{ + //ptr = null is OK for texture memory allocation + FindTexture(bitmapID)->SetData(ptr, width, height); + + return true; +} + +void EffectRenderer::BuildCache() +{ + MakeCurrent(); + __renderer->InternalCollectInfo(*__root); + RestorePreviousContext(); +} + +void EffectRenderer::ReleaseCache() +{ + if (surface != EGL_NO_SURFACE) + { + MakeCurrent(); + Reset(__renderer); + RestorePreviousContext(); + } +} + +}}}} //Tizen::Ui::Effects::_Renderer diff --git a/src/ui/effects/renderer/FUiEffects_RendererEffectShader.cpp b/src/ui/effects/renderer/FUiEffects_RendererEffectShader.cpp new file mode 100644 index 0000000..5eb686c --- /dev/null +++ b/src/ui/effects/renderer/FUiEffects_RendererEffectShader.cpp @@ -0,0 +1,216 @@ +// +// 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 FUiEffects_RendererEffectShader.cpp + * @brief This is the file with effects library shaders sources + * + */ + +#include + +#include + +using std::string; + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer +{ + +const char* const EFFECT_VERTEX_SHADER_STR = + "#define SHADER_NAME EffectVertexShader \n" + "attribute vec3 "SHADER_IN_POSITION_STR";\n" + "attribute vec3 "SHADER_IN_NORMAL_STR";\n" + "attribute vec2 "SHADER_IN_TEXCOORDS_STR";\n" + "\n" + "uniform highp mat4 WorldViewProjection;\n" + "uniform highp mat4 ModelMtr; \n" + "uniform mediump mat4 NormalMtr; \n" + "\n" + "varying highp vec3 Position; \n" + "varying mediump vec3 Normal; \n" + "varying mediump vec2 TexCoords;\n" + "\n" + "void main()\n" + "{\n" + " highp vec4 WorldPos = ModelMtr * vec4(in_Position, 1.0); \n" + " gl_Position = WorldViewProjection * WorldPos;\n" + " Position = WorldPos.xyz; \n" + " Normal = (NormalMtr * vec4(in_Normal, 0.0)).xyz; \n" + " TexCoords = in_TexCoords;\n" + "}\n"; + +const char* const EFFECT_FRAGMENT_SHADER_STR = + "#define SHADER_NAME EffectFragmentShader \n" + "//precision highp float;\n" + "//precision highp vec3;\n" + "//precision highp vec4;\n" + "varying highp vec3 Position; \n" + "varying mediump vec3 Normal;\n" + "varying mediump vec2 TexCoords;\n" + "\n" + "uniform mediump sampler2D "MAIN_TEX_STR";\n" + "\n" + "struct LightingParameters \n" + "{ \n" + " mediump vec3 ambientColorI; \n" + " mediump float attenuationR2; \n" + "}; \n" + "\n" + "struct PointLight \n" + "{ \n" + " highp vec3 position; \n" + " mediump vec3 colorI; \n" + " mediump float Rk; \n" + "}; \n" + "\n" + "struct SpotLight \n" + "{ \n" + " highp vec3 position; \n" + " mediump vec3 direction; \n" + " mediump float k1; \n" + " mediump float k2; \n" + " mediump vec3 colorI; \n" + " mediump float Rk; \n" + "}; \n" + "\n" + "struct DirectionalLight \n" + "{ \n" + " mediump vec3 direction; \n" + " mediump vec3 colorI; \n" + "}; \n" + "\n" + "uniform LightingParameters lightingParameters; \n" + POINTLIGHT_DEFPOS_STR + SPOTLIGHT_DEFPOS_STR + DIRECTIOALLIGHT_DEFPOS_STR + "uniform lowp float opacity; \n" + "\n" + "void main ()\n" + "{ \n" + " mediump vec3 normal = normalize(Normal); \n" + " mediump vec3 color = lightingParameters.ambientColorI; \n" + " highp vec3 lightdir; \n" + " mediump float att; \n" + " \n" + POINTLIGHT_SRCPOS_STR + "\n" + SPOTLIGHT_SRCPOS_STR + "\n" + DIRECTIOALLIGHT_SRCPOS_STR + " \n" + " gl_FragColor.rgb = texture2D(TEX_MAIN, TexCoords).bgr * color; \n" + " gl_FragColor.a = opacity; \n" + "}"; + +const char* const EFFECT_DUMMY_FRAGMENT_SHADER_STR = "void main() { gl_FragColor = vec4(0.5, 0.9, 0.2, 1.0); }"; + +const char* const BLUR_VS = + "#define SHADER_NAME BlurVS \n" + "attribute vec3 "SHADER_IN_POSITION_STR";\n" + "attribute vec2 "SHADER_IN_TEXCOORDS_STR";\n" + "\n" + "varying mediump vec2 TexCoords;\n" + "\n" + "void main()\n" + "{\n" + " gl_Position = vec4(in_Position, 1.0);\n" + " TexCoords = in_TexCoords;\n" + "}\n"; + +const char* const BLUR_HORIZ_FS = + "#define SHADER_NAME BlurHorizFS_2 \n" + "varying mediump vec2 TexCoords;\n" + "\n" + "uniform mediump sampler2D "MAIN_TEX_STR";\n" + "uniform mediump float weights[48]; \n" + "uniform mediump float stepx; \n" + "uniform mediump float stepy; \n" + "uniform mediump float size; \n" + "//mediump float weights2[5]; \n" + "\n" + "void main (void)\n" + "{\n" + " /////if(int(size) == 4) gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0); else gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0); \n" + " // weights2[0] = 0.3990503; weights2[1] = 0.24203622; weights2[2] = 0.054005586; weights2[3] = 0.0044330484; \n" + " mediump vec4 result = vec4(0.0); \n" + " mediump vec2 coords1 = TexCoords; \n" + " mediump vec2 coords2 = TexCoords; \n" + " mediump int sizei = int(size); \n" + " mediump vec4 ppp; \n" + " \n" + " for(mediump int i = 1; i < 201; i++){ if(i >= 2) break; ppp = vec4(vec3(weights[i]), 1.0); result = ppp; } \n" + "\n" + " gl_FragColor = result; \n" + "} \n"; + +const char* const BLUR_VERT_FS = + "#define SHADER_NAME BlurVertFS_TEST \n" + "varying lowp vec2 TexCoords;\n" + "void main() { mediump vec4 p = vec4(0.0); gl_FragColor = p; }"; + + +void replace(std::string &str, const std::string what, const std::string with) +{ + if (what.empty()) + { + return; + } + + string::size_type start_pos = str.find(what); + + while (start_pos != string::npos) + { + str.replace(start_pos, what.length(), with); + start_pos += with.length(); + start_pos = str.find(what, start_pos); + } + + return; +} + +void printstring(const std::string name, const std::string &str) +{ + std::string delim = "\n"; + + string::size_type pos = 0; + string::size_type pos2, dlen = delim.length(), slen = str.length(); + int i = 1; + char buffer [30]; + + while (pos < slen && i < 10000) + { + sprintf(buffer, "%d", i); + + pos2 = str.find(delim, pos); + + string sss = name + buffer + ". " + string(str, pos, pos2); + + SysLog(0, "%s", sss.length() == 0? "" : sss.c_str()); + + if (pos2 == string::npos) + { + break; + } + + pos = pos2 + dlen; + i++; + } + + return; +} + +}}}} //Tizen::Ui::Effects::_Renderer diff --git a/src/ui/effects/renderer/FUiEffects_RendererLog.cpp b/src/ui/effects/renderer/FUiEffects_RendererLog.cpp new file mode 100644 index 0000000..9e810e0 --- /dev/null +++ b/src/ui/effects/renderer/FUiEffects_RendererLog.cpp @@ -0,0 +1,121 @@ +// +// 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 FUiEffects_RendererLog.cpp + * @brief This is the source file for the renderer logging functions + */ +#include + +#include +#include +#include +#include + +using namespace Tizen::Graphics::Opengl; + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer +{ + +bool +CheckEglNoErrors(void) +{ + EGLint egl_error_code = eglGetError(); + + switch (egl_error_code) + { + case EGL_SUCCESS: + return true; + case EGL_NOT_INITIALIZED: + SysLog(NID_UI_EFFECT, "[OpenGL] EGL_NOT_INITIALIZED"); + return false; + case EGL_BAD_ACCESS: + SysLog(NID_UI_EFFECT, "[OpenGL] EGL_BAD_ACCESS"); + return false; + case EGL_BAD_ALLOC: + SysLog(NID_UI_EFFECT, "[OpenGL] EGL_BAD_ALLOC"); + return false; + case EGL_BAD_ATTRIBUTE: + SysLog(NID_UI_EFFECT, "[OpenGL] EGL_BAD_ATTRIBUTE"); + return false; + case EGL_BAD_CONTEXT: + SysLog(NID_UI_EFFECT, "[OpenGL] EGL_BAD_CONTEXT"); + return false; + case EGL_BAD_CONFIG: + SysLog(NID_UI_EFFECT, "[OpenGL] EGL_BAD_CONFIG"); + return false; + case EGL_BAD_CURRENT_SURFACE: + SysLog(NID_UI_EFFECT, "[OpenGL] EGL_BAD_CURRENT_SURFACE"); + return false; + case EGL_BAD_DISPLAY: + SysLog(NID_UI_EFFECT, "[OpenGL] EGL_BAD_DISPLAY"); + return false; + case EGL_BAD_SURFACE: + SysLog(NID_UI_EFFECT, "[OpenGL] EGL_BAD_SURFACE"); + return false; + case EGL_BAD_MATCH: + SysLog(NID_UI_EFFECT, "[OpenGL] EGL_BAD_MATCH"); + return false; + case EGL_BAD_PARAMETER: + SysLog(NID_UI_EFFECT, "[OpenGL] EGL_BAD_PARAMETER"); + return false; + case EGL_BAD_NATIVE_PIXMAP: + SysLog(NID_UI_EFFECT, "[OpenGL] EGL_BAD_NATIVE_PIXMAP"); + return false; + case EGL_BAD_NATIVE_WINDOW: + SysLog(NID_UI_EFFECT, "[OpenGL] EGL_BAD_NATIVE_WINDOW"); + return false; + default: + SysLog(NID_UI_EFFECT, "[OpenGL] Unknown eglGetError error code %d", egl_error_code); + return false; + } + + return false; +} + +bool +CheckGlNoErrors(void) +{ + GLint gl_error_code = glGetError(); + + switch (gl_error_code) + { + case GL_NO_ERROR: + return true; + case GL_INVALID_ENUM: + SysLog(NID_UI_EFFECT, "[OpenGL] GL_INVALID_ENUM"); + return false; + case GL_INVALID_VALUE: + SysLog(NID_UI_EFFECT, "[OpenGL] GL_INVALID_VALUE"); + return false; + case GL_INVALID_OPERATION: + SysLog(NID_UI_EFFECT, "[OpenGL] GL_INVALID_OPERATION"); + return false; + case GL_INVALID_FRAMEBUFFER_OPERATION: + SysLog(NID_UI_EFFECT, "[OpenGL] GL_INVALID_FRAMEBUFFER_OPERATION"); + return false; + case GL_OUT_OF_MEMORY: + SysLog(NID_UI_EFFECT, "[OpenGL] GL_OUT_OF_MEMORY"); + return false; + default: + return false; + } + + return false; +} + +} } } } // Tizen::Ui::Effects::_EffectRenderer diff --git a/src/ui/effects/renderer/FUiEffects_RendererMemoryTexture2DProperty.cpp b/src/ui/effects/renderer/FUiEffects_RendererMemoryTexture2DProperty.cpp new file mode 100644 index 0000000..df89e96 --- /dev/null +++ b/src/ui/effects/renderer/FUiEffects_RendererMemoryTexture2DProperty.cpp @@ -0,0 +1,80 @@ +// +// 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 FUiEffects_RendererMemoryTexture2DProperty.cpp + * @brief This is the source file for the MemoryTexture2DProperty class + */ + +#include +#include + +using namespace Tizen::Ui::Effects::_Renderer::EngineModel; + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer +{ + +MemoryTexture2DProperty::MemoryTexture2DProperty(void) +{ + unsigned char pix[4] = {255, 0, 128, 255}; + SetData(pix, 1, 1); +} + +MemoryTexture2DProperty::~MemoryTexture2DProperty(void) +{ + +} + +int +MemoryTexture2DProperty::GetFormatSize(void) +{ + switch (GetDataFormat()) + { + case TextureProperty::DataFormat::RGB: + // fall through + + case TextureProperty::DataFormat::BGR: + return 3; + + case TextureProperty::DataFormat::RGBA: + // fall through + + case TextureProperty::DataFormat::BGRA: + return 4; + + default: ; //ASSERTLOG(0); + return 0; + } +} + +void +MemoryTexture2DProperty::SetData(const void* ptr, size_t width, size_t height) +{ + __width = width; + __height = height; + __data.Resize(__width * __height * GetFormatSize()); + + if (ptr != null) + { + __data.Copy(ptr, __data.Size(), 0); + } + + TouchCache(); + + return; +} + +}}}} //Tizen::Ui::Effects::_Renderer diff --git a/src/ui/effects/renderer/FUiEffects_RendererRendererGeometry.cpp b/src/ui/effects/renderer/FUiEffects_RendererRendererGeometry.cpp new file mode 100644 index 0000000..059c06b --- /dev/null +++ b/src/ui/effects/renderer/FUiEffects_RendererRendererGeometry.cpp @@ -0,0 +1,80 @@ +// +// 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 FUiEffects_RendererRendererGeometry.cpp + * @brief This is the source file for the RendererGeometry class + */ + +#include +#include +#include +#include + +using namespace Tizen::Ui::Effects::_Renderer::Math; +using namespace Tizen::Ui::Effects::_Renderer::EngineModel; +using namespace Tizen::Ui::Effects::_Runtime; + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer +{ + +RendererGeometry::RendererGeometry(void) +{ + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_EFFECT, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + __composite = Buffer_CompositeFloatVertexPtr(new (std::nothrow) _Buffer_CompositeFloatVertex()); + __indexTriangles = Buffer_UIntIndexPtr(new (std::nothrow) _Buffer_UShortIndex()); + + __partVertex = Buffer_VertexAttributePtr(new (std::nothrow) _Buffer_VertexAttribute(__composite, 3, VertexData::OffsetPos(), VertexData::Stride())); + __partNormal = Buffer_VertexAttributePtr(new (std::nothrow) _Buffer_VertexAttribute(__composite, 3, VertexData::OffsetNorm(), VertexData::Stride())); + __partTexCoords = Buffer_VertexAttributePtr(new (std::nothrow) _Buffer_VertexAttribute(__composite, 2, VertexData::OffsetTexCoords(), VertexData::Stride())); + + r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_EFFECT, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnVoidResult(NID_UI_EFFECT, System::GetImpl(__composite) != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + SysTryReturnVoidResult(NID_UI_EFFECT, System::GetImpl(__indexTriangles) != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + SysTryReturnVoidResult(NID_UI_EFFECT, System::GetImpl(__partVertex) != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + SysTryReturnVoidResult(NID_UI_EFFECT, System::GetImpl(__partNormal) != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + SysTryReturnVoidResult(NID_UI_EFFECT, System::GetImpl(__partTexCoords) != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); +} + +RendererGeometry::~RendererGeometry(void) +{ + return; +} + +BufferPtr +RendererGeometry::GetBuffer(const std::string& aName) const +{ + if (aName == SHADER_IN_POSITION_STR) + { + return __partVertex; + } + else if (aName == SHADER_IN_TEXCOORDS_STR ) + { + return __partTexCoords; + } + else if (aName == SHADER_IN_NORMAL_STR) + { + return __partNormal; + } + + return BufferPtr(); +} + +}}}} //Tizen::Ui::Effects::_Renderer diff --git a/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelAlphaBlendProperty.cpp b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelAlphaBlendProperty.cpp new file mode 100644 index 0000000..baf5d61 --- /dev/null +++ b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelAlphaBlendProperty.cpp @@ -0,0 +1,115 @@ +// +// 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 FUiEffects_RendererEngineModelAlphaBlendProperty.cpp + * @brief This file contains implementation of AlphaBlendProperty class + * + */ + +#include +#include + + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +AlphaBlendProperty::AlphaBlendProperty(void): + __source(BlendFactor::SRC_ALPHA), + __destination(BlendFactor::ONE_MINUS_SRC_ALPHA), + __isEnabled(true) +{ + +} + +AlphaBlendProperty::~AlphaBlendProperty(void) +{ + if (__cache) + { + __cache->Die(); + } +} + +void +AlphaBlendProperty::Visit(PropertyVisitor& v) +{ + v.OnAlphaBlendProperty(*this); + return; +} + +bool +AlphaBlendProperty::IsEnable(void) +{ + return __isEnabled; +} + +AlphaBlendProperty::BlendFactor::Value +AlphaBlendProperty::GetSourceFactor(void) +{ + return __source; +} + +AlphaBlendProperty::BlendFactor::Value +AlphaBlendProperty::GetDestinationFactor(void) +{ + return __destination; +} + +void +AlphaBlendProperty::SetFactors(BlendFactor::Value source, BlendFactor::Value destination) +{ + __source = source; + __destination = destination; + TouchCache(); + return; +} +void +AlphaBlendProperty::Enable(bool isEnabled) +{ + __isEnabled = isEnabled; + TouchCache(); + return; +} + +CachePtr +AlphaBlendProperty::GetCache(void) +{ + return __cache; +} + +void +AlphaBlendProperty::SetCache(CachePtr cache) +{ + if (__cache) + { + __cache->Die(); + } + __cache = cache; + return; +} + +void +AlphaBlendProperty::TouchCache(void) +{ + if (__cache) + { + __cache->Invalidate(); + } + return; +} + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel diff --git a/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelBuffer.cpp b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelBuffer.cpp new file mode 100644 index 0000000..164d19b --- /dev/null +++ b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelBuffer.cpp @@ -0,0 +1,41 @@ +// +// 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 FUiEffects_RendererEngineModelBuffer.cpp + * @brief This file contains implementation of Buffer class + * + */ + + +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +Buffer::Buffer(void) +{ + +} + +Buffer::~Buffer(void) +{ + +} + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel diff --git a/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelCache.cpp b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelCache.cpp new file mode 100644 index 0000000..e5fce91 --- /dev/null +++ b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelCache.cpp @@ -0,0 +1,30 @@ +// +// 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 FUiEffects_RendererEngineModelCache.cpp + * @brief This file contains implementation of Cache class + * + */ + + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel diff --git a/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelCamera.cpp b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelCamera.cpp new file mode 100644 index 0000000..2e6aa5e --- /dev/null +++ b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelCamera.cpp @@ -0,0 +1,169 @@ +// +// 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 FUiEffects_RendererEngineModelCamera.cpp + * @brief This file contains implementation of Camera class + * + */ + +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +Camera::Camera(void) +{ + _proj.value.MakePerspectiveFovRH(Math::F_Deg_2_Rad(45.0f), 1.0f, 0.1f, 32000.0f); + _proj.invalid = false; + + _frustum.invalid = true; + + _minPos.Set(0.0f, 0.0f); + _maxPos.Set(0.0f, 0.0f); + + _clearColor.Set(1.0f, 1.0f, 1.0f, 1.0f); +} + +Camera::~Camera(void) +{ +} + +void +Camera::SetViewport(const Math::Vector2f& minPos, const Math::Vector2f& maxPos) +{ + _minPos = minPos; + _maxPos = maxPos; + return; +} + +const Math::Vector2f& +Camera::GetViewportMin(void) +{ + return _minPos; +} + +const Math::Vector2f& +Camera::GetViewportMax(void) +{ + return _maxPos; +} + +void +Camera::Visit(Visitor& v) +{ + v.OnCamera(*this); + return; +} + +const Math::Matrix4f& +Camera::GetProj(void) +{ + return _proj.value; +} + +void +Camera::SetProj(const Math::Matrix4f& arg) +{ + _proj.value = arg; + _proj.invalid = false; + + _frustum.invalid = true; + return; +} + +void +Camera::SetLocal(const Math::Matrix4f& arg) +{ + Node::SetLocal(arg); + _frustum.invalid = true; + return; +} + +void +Camera::SetWorld(const Math::Matrix4f& arg) +{ + Node::SetWorld(arg); + _frustum.invalid = true; + return; +} + +const Frustum& +Camera::GetFrustum(void) +{ + if (_frustum.invalid) + { + ValidateFrustum(); + } + return _frustum.value; +} + +bool +Camera::AttachedToParent(Group* pParent) +{ + if (!Node::AttachedToParent(pParent)) + { + return false; + } + + _frustum.invalid = true; + return true; +} + +bool +Camera::RemoveFromParent(Group* pParent) +{ + if (!Node::RemoveFromParent(pParent)) + { + return false; + } + + _frustum.invalid = true; + return true; +} + +void +Camera::ParentMoved(Group* pParent) +{ + Node::ParentMoved(pParent); + _frustum.invalid = true; + return; +} + +void +Camera::ValidateFrustum(void) +{ + _frustum.value.Build(GetProj(), GetWorld()); + _frustum.invalid = false; + return; +} + +void +Camera::SetClearColor(const Math::Vector4f& color) +{ + _clearColor = color; + return; +} + +const Math::Vector4f& +Camera::GetClearColor(void) +{ + return _clearColor; +} + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel diff --git a/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelDrawable.cpp b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelDrawable.cpp new file mode 100644 index 0000000..613d02c --- /dev/null +++ b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelDrawable.cpp @@ -0,0 +1,149 @@ +// +// 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 FUiEffects_RendererEngineModelDrawable.cpp + * @brief This file contains implementation of Drawable class + * + */ + +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +Drawable::Drawable(void) +{ +} + +Drawable::~Drawable(void) +{ + if (_pCache) + { + _pCache->Die(); + } +} + +void +Drawable::SetGeometry(GeometryPtr pGeom) +{ + if (_pGeometry) + { + _pGeometry->RemovedFromDrawable(this); + } + _pGeometry = pGeom; + + if (_pGeometry) + { + _pGeometry->AttachedToDrawable(this); + } + TouchParentBoundBox(); + InvalidateCache(); + return; +} + +GeometryPtr +Drawable::GetGeometry(void) +{ + return _pGeometry; +} + +void +Drawable::SetMaterial(MaterialPtr pMat) +{ + if (_pMaterial) + { + _pMaterial->RemovedFromDrawable(this); + } + _pMaterial = pMat; + + if (_pMaterial) + { + _pMaterial->AttachedToDrawable(this); + } + InvalidateCache(); + return; +} + +MaterialPtr +Drawable::GetMaterial(void) +{ + return _pMaterial; +} + +void +Drawable::InvalidateCache(void) +{ + if (_pCache) + { + _pCache->Invalidate(); + } + return; +} + +void +Drawable::ValidateBoundBox(void) +{ + if (_pGeometry) + { + _boundBox.value = _pGeometry->GetBoundBox(); + } + else + { + _boundBox.value.Identity(); + } + + _boundBox.invalid = false; + return; +} + +const Aabb& +Drawable::GetBoundBox(void) +{ + if (_boundBox.invalid) + { + ValidateBoundBox(); + } + return _boundBox.value; +} + +CachePtr +Drawable::GetCache(void) +{ + return _pCache; +} + +void +Drawable::SetCache(CachePtr pCache) +{ + if (_pCache) + { + _pCache->Die(); + } + _pCache = pCache; + return; +} + +void +Drawable::InvalidateBoundBox(void) +{ + return; +} + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel diff --git a/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelFloatArrayProperty.cpp b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelFloatArrayProperty.cpp new file mode 100644 index 0000000..4ccc01e --- /dev/null +++ b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelFloatArrayProperty.cpp @@ -0,0 +1,36 @@ +// +// 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 FUiEffects_RendererEngineModelFloatArrayProperty.cpp + * @brief This file contains implementation of FloatArrayProperty class + * + */ + +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +void +FloatArrayProperty::Visit(PropertyVisitor& v) +{ + v.OnFloatArrayProperty(*this); +} + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel diff --git a/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelFloatPropertyHolder.cpp b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelFloatPropertyHolder.cpp new file mode 100644 index 0000000..1174da8 --- /dev/null +++ b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelFloatPropertyHolder.cpp @@ -0,0 +1,52 @@ +// +// 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 FUiEffects_RendererEngineModelFloatPropertyHolder.cpp + * @brief This file contains implementation of FloatPropertyHolder class + * + */ + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +FloatPropertyHolder::FloatPropertyHolder(void) +{ + __value = 0.0f; +} + +FloatPropertyHolder::~FloatPropertyHolder(void) +{ + +} + +float +FloatPropertyHolder::Get(void) const +{ + return __value; +} + +void +FloatPropertyHolder::Set(float value) +{ + __value = value; + return; +} + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel diff --git a/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelGeometry.cpp b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelGeometry.cpp new file mode 100644 index 0000000..9741666 --- /dev/null +++ b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelGeometry.cpp @@ -0,0 +1,80 @@ +// +// 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 FUiEffects_RendererEngineModelGeometry.cpp + * @brief This file contains implementation of Geometry class + * + */ + +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +void +Geometry::AttachedToDrawable(Drawable* drawable) +{ + DrawablesListIteratorType it = std::find(_drawables.begin(), _drawables.end(), drawable); + if (_drawables.end() != it) + { + return; + } + _drawables.push_back(drawable); + return; +} + +void +Geometry::RemovedFromDrawable(Drawable* drawable) +{ + DrawablesListIteratorType it = std::find(_drawables.begin(), _drawables.end(), drawable); + if (_drawables.end() == it) + { + return; + } + + const DrawablesListSizeType len = _drawables.size(); + std::swap(_drawables[len - 1], _drawables[it - _drawables.begin()]); + _drawables.resize(len - 1); + return; +} + +void +Geometry::TouchDrawables(void) +{ + const DrawablesListSizeType len = _drawables.size(); + for (DrawablesListSizeType i = 0; len > i; ++i) + { + _drawables[i]->InvalidateCache(); + } + return; +} + +void +Geometry::TouchDrawablesBoundBox(void) +{ + const DrawablesListSizeType len = _drawables.size(); + for (DrawablesListSizeType i = 0; len > i; ++i) + { + _drawables[i]->InvalidateBoundBox(); + } + return; +} + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel diff --git a/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelGroup.cpp b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelGroup.cpp new file mode 100644 index 0000000..5bed076 --- /dev/null +++ b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelGroup.cpp @@ -0,0 +1,236 @@ +// +// 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 FUiEffects_RendererEngineModelGroup.cpp + * @brief This file contains implementation of Group class + * + */ + +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +Group::Group(void) + : Node() + , _invalidBoundBox(true) + , _children() +{ + +} + +Group::~Group(void) +{ + const ChildrenListSizeType len = _children.size(); + for (ChildrenListSizeType i = 0; len > i; ++i) + { + _children[i]->RemoveFromParent(this); + } +} + +void +Group::Visit(Visitor& v) +{ + v.OnGroup(*this); + return; +} + +bool +Group::AddChild(NodePtr pChild) +{ + if (!pChild->AttachedToParent(this)) + { + return false; + } + + _children.push_back(pChild); + InvalidateBoundBox(); + return true; +} + +bool +Group::RemoveChild(NodePtr pChild) +{ + const ChildrenListSizeType len = _children.size(); + for (ChildrenListSizeType i = 0; len > i; ++i) + { + if (pChild == _children[i]) + { + InternalRemoveChild(i); + return true; + } + } + + return false; +} + +bool +Group::RemoveChild(ChildrenListSizeType index) +{ + if (index >= _children.size()) + { + return false; + } + InternalRemoveChild(index); + return true; +} + +void +Group::Clear(void) +{ + for (ChildrenListType::iterator it = _children.begin(); it != _children.end(); ++it) + { + (*it)->RemoveFromParent(this); + } + _children.clear(); + InvalidateBoundBox(); + return; +} + +void +Group::InternalRemoveChild(ChildrenListSizeType index) +{ + const ChildrenListSizeType len = _children.size(); + NodePtr current = _children[index]; + std::swap(_children[index], _children[len - 1]); + current->RemoveFromParent(this); + InvalidateBoundBox(); + return; +} + +void +Group::InvalidateBoundBox(void) +{ + if (_boundBox.invalid) + { + return; + } + _boundBox.invalid = true; + TouchParentBoundBox(); + return; +} + +const Aabb& +Group::GetBoundBox(void) +{ + if (_boundBox.invalid) + { + ValidateBoundBox(); + } + return _boundBox.value; +} + +void +Group::SetWorld(const Math::Matrix4f& arg) +{ + Node::SetWorld(arg); + const ChildrenListSizeType len = _children.size(); + for (ChildrenListSizeType i = 0; len > i; ++i) + { + _children[i]->ParentMoved(this); + } + return; +} + +void +Group::SetLocal(const Math::Matrix4f& arg) +{ + Node::SetLocal(arg); + const ChildrenListSizeType len = _children.size(); + for (ChildrenListSizeType i = 0; len > i; ++i) + { + _children[i]->ParentMoved(this); + } + return; +} + +void +Group::ValidateBoundBox(void) +{ + _boundBox.value.Identity(); + + const ChildrenListSizeType len = _children.size(); + for (ChildrenListSizeType i = 0; len > i; ++i) + { + _boundBox.value.Extend(_children[i]->GetBoundBoxInParentSpace()); + } + _boundBox.invalid = false; + return; +} + +bool +Group::AttachedToParent(Group* pParent) +{ + if (!Node::AttachedToParent(pParent)) + { + return false; + } + + const ChildrenListSizeType len = _children.size(); + for (ChildrenListSizeType i = 0; len > i; ++i) + { + _children[i]->ParentMoved(this); + } + return true; +} + +bool +Group::RemoveFromParent(Group* pParent) +{ + if (!Node::RemoveFromParent(pParent)) + { + return false; + } + + const ChildrenListSizeType len = _children.size(); + for (ChildrenListSizeType i = 0; len > i; ++i) + { + _children[i]->ParentMoved(this); + } + return true; +} + +void +Group::ParentMoved(Group* pParent) +{ + if (_worldTransform.invalid) + { + return; + } + Node::ParentMoved(pParent); + const ChildrenListSizeType len = _children.size(); + for (ChildrenListSizeType i = 0; len > i; ++i) + { + _children[i]->ParentMoved(this); + } +} + +Group::ChildrenListSizeType +Group::ChildrenCount(void) +{ + return _children.size(); +} + +NodePtr +Group::GetChild(ChildrenListSizeType index) +{ + return _children[index]; +} + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel diff --git a/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelMaterial.cpp b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelMaterial.cpp new file mode 100644 index 0000000..353d5e3 --- /dev/null +++ b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelMaterial.cpp @@ -0,0 +1,68 @@ +// +// 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 FUiEffects_RendererEngineModelMaterial.cpp + * @brief This file contains implementation of Material class + * + */ + +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +void +Material::AttachedToDrawable(Drawable* pDrawable) +{ + DrawablesListIteratorType it = std::find(_drawables.begin(), _drawables.end(), pDrawable); + if (_drawables.end() != it) + { + return; + } + _drawables.push_back(pDrawable); + return; +} + +void +Material::RemovedFromDrawable(Drawable* pDrawable) +{ + DrawablesListIteratorType it = std::find(_drawables.begin(), _drawables.end(), pDrawable); + if (_drawables.end() == it) + { + return; + } + + const DrawablesListSizeType len = _drawables.size(); + std::swap(_drawables[len - 1], _drawables[it - _drawables.begin()]); + _drawables.resize(len - 1); + return; +} + +void +Material::TouchDrawables(void) +{ + const DrawablesListSizeType len = _drawables.size(); + for (DrawablesListSizeType i = 0; len > i; ++i) + { + _drawables[i]->InvalidateCache(); + } + return; +} + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel diff --git a/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelMatrix4fPropertyHolder.cpp b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelMatrix4fPropertyHolder.cpp new file mode 100644 index 0000000..6ec5e1b --- /dev/null +++ b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelMatrix4fPropertyHolder.cpp @@ -0,0 +1,62 @@ +// +// 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 FUiEffects_RendererEngineModelMatrix4fPropertyHolder.cpp + * @brief This file contains implementation of Matrix4fPropertyHolder class + * + */ + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +Matrix4fPropertyHolder::Matrix4fPropertyHolder(void) +{ + __matrix = MatrixType::GetIdentity(); +} + +Matrix4fPropertyHolder::~Matrix4fPropertyHolder(void) +{ + +} + +const Matrix4fPropertyHolder::MatrixType& +Matrix4fPropertyHolder::Get() const +{ + return __matrix; +} + +void +Matrix4fPropertyHolder::Set(const float a11, const float a12, const float a13, const float a14, + const float a21, const float a22, const float a23, const float a24, + const float a31, const float a32, const float a33, const float a34, + const float a41, const float a42, const float a43, const float a44) +{ + __matrix.Set(a11, a12, a13, a14, a21, a22, a23, a24, a31, a32, a33, a34, a41, a42, a43, a44); + return; +} + +void +Matrix4fPropertyHolder::Set(const MatrixType& matrix) +{ + __matrix = matrix; + return; +} + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel diff --git a/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelNode.cpp b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelNode.cpp new file mode 100644 index 0000000..163992c --- /dev/null +++ b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelNode.cpp @@ -0,0 +1,221 @@ +// +// 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 FUiEffects_RendererEngineModelNode.cpp + * @brief This file contains implementation of Node class + * + */ + +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +Node::Node(): + _pParent(null) +{ + _relatedTransform.value.Identity(); + _relatedTransform.invalid = false; + + _worldTransform.value.Identity(); + _worldTransform.invalid = false; + + _boundBox.value.Identity(); + _boundBox.invalid = false; + _boundBox.value.maximum.Set(1.0f, 1.0f, 1.0f); + _boundBox.value.minimum.Set(-1.0f, -1.0f, -1.0f); + + _transformType = TransformationType::RELATED; + _transformMatrix.Identity(); +} + +Node::~Node(void) +{ + +} + +void +Node::Visit(Visitor& visitor) +{ + visitor.OnNode(*this); + return; +} + +void +Node::ValidateLocal(void) +{ + if ((_transformType == TransformationType::RELATED) || !_pParent) + { + _relatedTransform.value = _transformMatrix; + } + else + { + _relatedTransform.value = _pParent->GetWorld().GetInversed() * _transformMatrix; + } + + _relatedTransform.invalid = false; + return; +} + +void +Node::ValidateWorld(void) +{ + if ((_transformType == TransformationType::WORLD) || !_pParent) + { + _worldTransform.value = _transformMatrix; + } + else + { + _worldTransform.value = _pParent->GetWorld() * _transformMatrix; + } + + _worldTransform.invalid = false; + return; +} + +void +Node::SetLocal(const Math::Matrix4f& arg) +{ + _transformType = TransformationType::RELATED; + _transformMatrix = arg; + _relatedTransform.invalid = true; + _worldTransform.invalid = true; + TouchParentBoundBox(); + return; +} + +void +Node::SetWorld(const Math::Matrix4f& arg) +{ + _transformType = TransformationType::WORLD; + _transformMatrix = arg; + _relatedTransform.invalid = true; + _worldTransform.invalid = true; + TouchParentBoundBox(); + return; +} + +void +Node::TouchParentBoundBox(void) +{ + if (_pParent) + { + _pParent->InvalidateBoundBox(); + } + return; +} + +const Math::Matrix4f& +Node::GetLocal(void) +{ + if (_transformType == TransformationType::RELATED) + { + return _transformMatrix; + } + + if (_relatedTransform.invalid) + { + ValidateLocal(); + } + return _relatedTransform.value; +} + +const Math::Matrix4f& +Node::GetWorld(void) +{ + if (_transformType == TransformationType::WORLD) + { + return _transformMatrix; + } + + if (_worldTransform.invalid) + { + ValidateWorld(); + } + return _worldTransform.value; +} + +const Aabb& +Node::GetBoundBox(void) +{ + return _boundBox.value; +} + +Aabb +Node::GetBoundBoxInParentSpace(void) +{ + return GetBoundBox().GetTransformed(GetLocal()); +} + +bool +Node::AttachedToParent(Group* pParent) +{ + if (null != _pParent) + { + return false; + } + _pParent = pParent; + + if (_transformType != TransformationType::WORLD) + { + _worldTransform.invalid = true; + } + + return true; +} + +bool +Node::RemoveFromParent(Group* pParent) +{ + if (pParent != _pParent) + { + return false; + } + + if (_transformType == TransformationType::WORLD) + { + _relatedTransform.invalid = true; + } + else + { + _worldTransform.invalid = true; + } + + _pParent = null; + return true; +} + +void +Node::ParentMoved(Group* pParent) +{ + if (pParent != _pParent) + { + return; + } + + if (_transformType == TransformationType::WORLD) + { + return; + } + + _worldTransform.invalid = true; + return; +} + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel diff --git a/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelProperty.cpp b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelProperty.cpp new file mode 100644 index 0000000..d7187dc --- /dev/null +++ b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelProperty.cpp @@ -0,0 +1,45 @@ +// +// 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 FUiEffects_RendererEngineModelProperty.cpp + * @brief This file contains implementation of Property class + * + */ + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer +{ +namespace EngineModel +{ + +Property::Property(void) +{ +} + +Property::~Property(void) +{ +} + +void +Property::Visit(PropertyVisitor& v) +{ + v.OnProperty(*this); +} + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel diff --git a/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelPropertyHolderMaterial.cpp b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelPropertyHolderMaterial.cpp new file mode 100644 index 0000000..9337ca3 --- /dev/null +++ b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelPropertyHolderMaterial.cpp @@ -0,0 +1,113 @@ +// +// 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 FUiEffects_RendererEngineModelPropertyHolderMaterial.cpp + * @brief This file contains implementation of PropertyHolderMaterial class + * + */ + +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +PropertyHolderMaterial::PropertyHolderMaterial(void) +{ +} + +PropertyHolderMaterial::~PropertyHolderMaterial(void) +{ +} + +PropertyPtr +PropertyHolderMaterial::GetProperty(const std::string& name) +{ + const PropertyListSizeType len = _properties.size(); + for (PropertyListSizeType i = 0; len > i; ++i) + { + if (name == _properties[i].first) + { + return _properties[i].second; + } + } + return PropertyPtr(); +} + +PropertyPtr +PropertyHolderMaterial::GetProperty(PropertyListSizeType index) +{ + if (_properties.size() > index) + { + return _properties[index].second; + } + return PropertyPtr(); +} + +size_t +PropertyHolderMaterial::GetNumProperties(void) +{ + return _properties.size(); +} + +void +PropertyHolderMaterial::AddProperty(const std::string& name, PropertyPtr pProperty) +{ + const PropertyListSizeType len = _properties.size(); + for (PropertyListSizeType i = 0; len > i; ++i) + { + if (name == _properties[i].first) + { + _properties[i].second = pProperty; + return; + } + } + _properties.push_back(std::make_pair(name, pProperty)); + return; +} + +void +PropertyHolderMaterial::RemoveProperty(const std::string& name) +{ + const PropertyListSizeType len = _properties.size(); + for (PropertyListSizeType i = 0; len > i; ++i) + { + if (name == _properties[i].first) + { + _properties[i] = _properties[len - 1]; + _properties.resize(len - 1); + return; + } + } + return; +} + +void +PropertyHolderMaterial::RemoveProperty(PropertyListSizeType index) +{ + const PropertyListSizeType len = _properties.size(); + if (len <= index) + { + return; + } + _properties[index] = _properties[len - 1]; + _properties.resize(len - 1); + return; +} + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel diff --git a/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelRenderTarget.cpp b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelRenderTarget.cpp new file mode 100644 index 0000000..bfcd10a --- /dev/null +++ b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelRenderTarget.cpp @@ -0,0 +1,156 @@ +// +// 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 FUiEffects_RendererEngineModelRenderTarget.cpp + * @brief This file contains implementation of RenderTarget class + * + */ + +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer +{ +namespace EngineModel +{ + +RenderTarget::RenderTarget(): + _width(1), + _height(1) +{ +} + +RenderTarget::~RenderTarget(void) +{ + const unsigned int len = RenderTarget::Attachment::ATTACHMENT_MAX; + for (unsigned int i = 0; len > i; ++i) + { + if (_pTextures[i]) + { + _pTextures[i]->RemovedFromRenderTarget(this); + } + } + + if (__pCache) + { + __pCache->Die(); + } + return; +} + +void +RenderTarget::Visit(RenderTargetVisitor& v) +{ + v.OnRenderTarget(*this); + return; +} + +void +RenderTarget::AttachTexture2D(Attachment::Value attachment, Texture2DAttachmentPropertyPtr pTexture, size_t mipLevel) +{ + _pTextures[attachment] = pTexture; + _attachments[attachment].Set(System::GetImpl(pTexture), mipLevel); + pTexture->AttachedToRenderTarget(this); + if (__pCache) + { + __pCache->Invalidate(); + } + return; +} + +void +RenderTarget::AttachStub(Attachment::Value attachment, StubAttachmentPtr pStub) +{ + _pTextures[attachment] = pStub; + _attachments[attachment].Set(System::GetImpl(pStub)); + pStub->AttachedToRenderTarget(this); + if (__pCache) + { + __pCache->Invalidate(); + } + return; +} + +void +RenderTarget::Detach(Attachment::Value attachment) +{ + if (_pTextures[attachment]) + { + _pTextures[attachment]->RemovedFromRenderTarget(this); + } + System::Reset(_pTextures[attachment]); + + if (__pCache) + { + __pCache->Invalidate(); + } + return; +} + +RenderTarget::AttachInfo* +RenderTarget::GetAttachment(Attachment::Value attachment) +{ + if (!_pTextures[attachment]) + { + return null; + } + return &_attachments[attachment]; +} + +CachePtr +RenderTarget::GetCache(void) +{ + return __pCache; +} + +void +RenderTarget::SetCache(CachePtr pCache) +{ + if (__pCache) + { + __pCache->Die(); + } + __pCache = pCache; + return; +} + +unsigned int +RenderTarget::GetWidth(void) +{ + return _width; +} + +unsigned int +RenderTarget::GetHeight(void) +{ + return _height; +} + +void +RenderTarget::SetSize(unsigned int width, unsigned int height) +{ + _width = width; + _height = height; + if (__pCache) + { + __pCache->Invalidate(); + } + return; +} + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel diff --git a/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelRenderTargetExternalRender.cpp b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelRenderTargetExternalRender.cpp new file mode 100644 index 0000000..747c8b4 --- /dev/null +++ b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelRenderTargetExternalRender.cpp @@ -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 FUiEffects_RendererEngineModelRenderTargetExternalRender.cpp + * @brief This file contains implementation of RenderTargetExternalRender class + * + */ + +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +RenderTargetExternalRender::RenderTargetExternalRender(): + _pExternalRender(null) +{ +} + +RenderTargetExternalRender::~RenderTargetExternalRender(void) +{ +} + +void +RenderTargetExternalRender::Visit(RenderTargetVisitor& v) +{ + v.OnRenderTargetExternalRender(*this); + return; +} + +void +RenderTargetExternalRender::SetExternalRender(ExternalRenderInterface* pExternalRender) +{ + _pExternalRender = pExternalRender; + return; +} + +ExternalRenderInterface* +RenderTargetExternalRender::GetExternalRender(void) +{ + return _pExternalRender; +} + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel diff --git a/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelShaderHolderProgramProperty.cpp b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelShaderHolderProgramProperty.cpp new file mode 100644 index 0000000..75417d4 --- /dev/null +++ b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelShaderHolderProgramProperty.cpp @@ -0,0 +1,52 @@ +// +// 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 FUiEffects_RendererEngineModelShaderHolderProgramProperty.cpp + * @brief This file contains implementation of ShaderHolderProgramProperty class + * + */ + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +ShaderHolderProgramProperty::ShaderHolderProgramProperty(ShaderPropertyPtr pVertexShader, ShaderPropertyPtr pFragmentShader): + _pVertexShader(pVertexShader), + _pFragmentShader(pFragmentShader) +{ +} + +ShaderHolderProgramProperty::~ShaderHolderProgramProperty(void) +{ +} + +ShaderPropertyPtr +ShaderHolderProgramProperty::GetShader(ShaderProperty::ShaderType::Value type) +{ + switch (type) + { + case ShaderProperty::ShaderType::VERTEX: + return _pVertexShader; + case ShaderProperty::ShaderType::FRAGMENT: + return _pFragmentShader; + } + return ShaderPropertyPtr(); +} + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel diff --git a/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelStringShaderProperty.cpp b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelStringShaderProperty.cpp new file mode 100644 index 0000000..67debc7 --- /dev/null +++ b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelStringShaderProperty.cpp @@ -0,0 +1,73 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiEffects_RendererEngineModelStringShaderProperty.cpp + * @brief This file contains implementation of StringShaderProperty class + * + */ + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +StringShaderProperty::StringShaderProperty(ShaderProperty::ShaderType::Value shaderType, const std::string& source): + _shaderType(shaderType), + _source(source) +{ +} + +StringShaderProperty::~StringShaderProperty(void) +{ +} + +const void* +StringShaderProperty::GetData(void) +{ + return _source.c_str(); +} + +std::string +StringShaderProperty::GetSource(void) const +{ + return _source; +} + +void +StringShaderProperty::SetSource(std::string source) +{ + _source = source; + if (System::GetImpl(GetCache()) != null) + { + GetCache()->Invalidate(); + } +} + +ShaderProperty::DataType::Value +StringShaderProperty::GetDataType(void) +{ + return ShaderProperty::DataType::SOURCE_CODE; +} + +ShaderProperty::ShaderType::Value +StringShaderProperty::GetShaderType(void) +{ + return _shaderType; +} + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel diff --git a/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelStubAttachment.cpp b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelStubAttachment.cpp new file mode 100644 index 0000000..7c71a26 --- /dev/null +++ b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelStubAttachment.cpp @@ -0,0 +1,75 @@ +// +// 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 FUiEffects_RendererEngineModelStubAttachment.cpp + * @brief This file contains implementation of StubAttachment class + * + */ + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +StubAttachment::StubAttachment(TextureProperty::InternalFormat::Value aInternalFormat): + _internalFormat(aInternalFormat) +{ +} + +StubAttachment::~StubAttachment(void) +{ + if (__pCache) + { + __pCache->Die(); + } +} + +CachePtr +StubAttachment::GetCache(void) +{ + return __pCache; +} + +void +StubAttachment::SetCache(CachePtr aCache) +{ + if (__pCache) + { + __pCache->Die(); + } + __pCache = aCache; + return; +} + +void +StubAttachment::TouchCache(void) +{ + if (__pCache) + { + __pCache->Invalidate(); + } + return; +} + +TextureProperty::InternalFormat::Value +StubAttachment::GetInternalFormat(void) +{ + return _internalFormat; +} + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel diff --git a/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelTexture2DAttachmentProperty.cpp b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelTexture2DAttachmentProperty.cpp new file mode 100644 index 0000000..5bce851 --- /dev/null +++ b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelTexture2DAttachmentProperty.cpp @@ -0,0 +1,153 @@ +// +// 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 FUiEffects_RendererEngineModelTexture2DAttachmentProperty.cpp + * @brief This file contains implementation of Texture2DAttachmentProperty class + * + */ + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +void +Texture2dAttachmentProperty::Visit(PropertyVisitor& v) +{ + v.OnTexture2DAttachmentProperty(*this); + return; +} + +Texture2dAttachmentProperty::Texture2dAttachmentProperty( + bool generateMipmaps, + InternalFormat::Value internalFormat, + DataFormat::Value dataFormat, + DataType::Value dataType, + FilterType::Value minFilter, + FilterType::Value magFilter, + WrapType::Value wrapS, + WrapType::Value wrapT): + _generateMipmaps(generateMipmaps), + _internalFormat(internalFormat), + _dataFormat(dataFormat), + _dataType(dataType), + _minFilter(minFilter), + _magFilter(magFilter), + _wrapS(wrapS), + _wrapT(wrapT) +{ + +} + +Texture2dAttachmentProperty::~Texture2dAttachmentProperty(void) +{ + if (__pCache) + { + __pCache->Die(); + } +} + +void +Texture2dAttachmentProperty::SetMipmapGeneration(bool generateMipmaps) +{ + _generateMipmaps = generateMipmaps; + return; +} + +bool +Texture2dAttachmentProperty::GetGenerateMipmaps(void) const +{ + return _generateMipmaps; +} + +TextureProperty::InternalFormat::Value +Texture2dAttachmentProperty::GetInternalFormat(void) const +{ + return _internalFormat; +} + +TextureProperty::DataFormat::Value +Texture2dAttachmentProperty::GetDataFormat(void) const +{ + return _dataFormat; +} + +TextureProperty::DataType::Value +Texture2dAttachmentProperty::GetDataType(void) const +{ + return _dataType; +} + +TextureProperty::FilterType::Value +Texture2dAttachmentProperty::GetMinFilter(void) const +{ + return _minFilter; +} + +TextureProperty::FilterType::Value +Texture2dAttachmentProperty::GetMagFilter(void) const +{ + return _magFilter; +} + +TextureProperty::WrapType::Value +Texture2dAttachmentProperty::GetWrapS(void) const +{ + return _wrapS; +} + +TextureProperty::WrapType::Value +Texture2dAttachmentProperty::GetWrapT(void) const +{ + return _wrapT; +} + +TextureProperty::WrapType::Value +Texture2dAttachmentProperty::GetWrapR(void) const +{ + return WrapType::CLAMP_TO_EDGE; +} + +CachePtr +Texture2dAttachmentProperty::GetCache(void) +{ + return __pCache; +} + +void +Texture2dAttachmentProperty::SetCache(CachePtr pCache) +{ + if (__pCache) + { + __pCache->Die(); + } + __pCache = pCache; + return; +} + +void +Texture2dAttachmentProperty::TouchCache(void) +{ + if (__pCache) + { + __pCache->Invalidate(); + } + return; +} + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel diff --git a/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelTexture2DProperty.cpp b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelTexture2DProperty.cpp new file mode 100644 index 0000000..0e9b8ba --- /dev/null +++ b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelTexture2DProperty.cpp @@ -0,0 +1,75 @@ +// +// 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 FUiEffects_RendererEngineModelTexture2DProperty.cpp + * @brief This file contains implementation of Texture2DProperty class + * + */ + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +void +Texture2dProperty::Visit(PropertyVisitor& v) +{ + v.OnTexture2DProperty(*this); + return; +} + +Texture2dProperty::Texture2dProperty(void) +{ +} + +Texture2dProperty::~Texture2dProperty(void) +{ + if (__pCache) + { + __pCache->Die(); + } +} + +CachePtr +Texture2dProperty::GetCache(void) +{ + return __pCache; +} + +void +Texture2dProperty::SetCache(CachePtr pCache) +{ + if (__pCache) + { + __pCache->Die(); + } + __pCache = pCache; + return; +} + +void +Texture2dProperty::TouchCache(void) +{ + if (__pCache) + { + __pCache->Invalidate(); + } + return; +} + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel diff --git a/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelTextureAttachment.cpp b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelTextureAttachment.cpp new file mode 100644 index 0000000..72c5091 --- /dev/null +++ b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelTextureAttachment.cpp @@ -0,0 +1,77 @@ +// +// 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 FUiEffects_RendererEngineModelTextureAttachment.cpp + * @brief This file contains implementation of TextureAttachment class + * + */ + +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +bool +TextureAttachment::AttachedToRenderTarget(RenderTarget* pRenderTarget) +{ + RenderTargetListType::iterator it = std::find(_targets.begin(), _targets.end(), pRenderTarget); + if (_targets.end() != it) + { + return false; + } + + _targets.push_back(pRenderTarget); + return true; +} + +bool +TextureAttachment::RemovedFromRenderTarget(RenderTarget* pRenderTarget) +{ + RenderTargetListType::iterator it = std::find(_targets.begin(), _targets.end(), pRenderTarget); + if (_targets.end() == it) + { + return false; + } + + const RenderTargetListSizeType index = it - _targets.begin(); + const RenderTargetListSizeType len = _targets.size(); + + std::swap(_targets[index], _targets[len - 1]); + _targets.resize(len - 1); + + return true; +} + +TextureAttachment::RenderTargetListSizeType +TextureAttachment::GetNumRenderTargets(void) +{ + return _targets.size(); +} + +RenderTarget* +TextureAttachment::GetRenderTarget(RenderTargetListSizeType index) +{ + if (index >= _targets.size()) + { + return null; + } + return _targets[index]; +} + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel diff --git a/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelTextureProperty.cpp b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelTextureProperty.cpp new file mode 100644 index 0000000..a57ae52 --- /dev/null +++ b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelTextureProperty.cpp @@ -0,0 +1,44 @@ +// +// 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 FUiEffects_RendererEngineModelTextureProperty.cpp + * @brief This file contains implementation of TextureProperty class + * + */ + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +void +TextureProperty::Visit(PropertyVisitor& v) +{ + v.OnTextureProperty(*this); + return; +} + +TextureProperty::TextureProperty(void) +{ +} + +TextureProperty::~TextureProperty(void) +{ +} + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel diff --git a/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelVector2fPropertyHolder.cpp b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelVector2fPropertyHolder.cpp new file mode 100644 index 0000000..e3364f5 --- /dev/null +++ b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelVector2fPropertyHolder.cpp @@ -0,0 +1,58 @@ +// +// 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 FUiEffects_RendererEngineModelVector2fPropertyHolder.cpp + * @brief This file contains implementation of Vector2fPropertyHolder class + * + */ + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +Vector2fPropertyHolder::Vector2fPropertyHolder(void) +{ + __vector = VectorType(0.0f, 0.0f); +} + +Vector2fPropertyHolder::~Vector2fPropertyHolder(void) +{ +} + +const Vector2fPropertyHolder::VectorType& +Vector2fPropertyHolder::Get() const +{ + return __vector; +} + +void +Vector2fPropertyHolder::Set(float x, float y) +{ + __vector.Set(x, y); + return; +} + +void +Vector2fPropertyHolder::Set(const VectorType& vector) +{ + __vector = vector; + return; +} + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel diff --git a/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelVector3fPropertyHolder.cpp b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelVector3fPropertyHolder.cpp new file mode 100644 index 0000000..ade1a1f --- /dev/null +++ b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelVector3fPropertyHolder.cpp @@ -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 FUiEffects_RendererEngineModelVector3fPropertyHolder.cpp + * @brief This file contains implementation of Vector3fPropertyHolder class + * + */ + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +Vector3fPropertyHolder::Vector3fPropertyHolder(void) +{ + __vector = VectorType(0.0f, 0.0f, 0.0f); +} + +Vector3fPropertyHolder::~Vector3fPropertyHolder(void) +{ + +} + +const Vector3fPropertyHolder::VectorType& +Vector3fPropertyHolder::Get() const +{ + return __vector; +} + +void +Vector3fPropertyHolder::Set(float x, float y, float z) +{ + __vector.Set(x, y, z); + return; +} + +void +Vector3fPropertyHolder::Set(const VectorType& vector) +{ + __vector = vector; + return; +} + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel diff --git a/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelVector4fPropertyHolder.cpp b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelVector4fPropertyHolder.cpp new file mode 100644 index 0000000..75183d5 --- /dev/null +++ b/src/ui/effects/renderer/engine-model/FUiEffects_RendererEngineModelVector4fPropertyHolder.cpp @@ -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 FUiEffects_RendererEngineModelVector4fPropertyHolder.cpp + * @brief This file contains implementation of Vector4fPropertyHolder class + * + */ + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace EngineModel +{ + +Vector4fPropertyHolder::Vector4fPropertyHolder(void) +{ + __vector = VectorType(0.0f, 0.0f, 0.0f, 0.0f); +} + +Vector4fPropertyHolder::~Vector4fPropertyHolder(void) +{ + +} + +const Vector4fPropertyHolder::VectorType& +Vector4fPropertyHolder::Get() const +{ + return __vector; +} + +void +Vector4fPropertyHolder::Set(float x, float y, float z, float w) +{ + __vector.Set(x, y, z, w); + return; +} + +void +Vector4fPropertyHolder::Set(const VectorType& vector) +{ + __vector = vector; + return; +} + +}}}}} //Tizen::Ui::Effects::_Renderer::EngineModel diff --git a/src/ui/effects/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRender.cpp b/src/ui/effects/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRender.cpp new file mode 100644 index 0000000..2d3479d --- /dev/null +++ b/src/ui/effects/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRender.cpp @@ -0,0 +1,493 @@ +// +// 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 FUiEffects_RendererGraphicsEngineRender.cpp + * @brief Implementation of class for rendering scene tree + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace GraphicsEngine +{ + +Render::Render(void) + : __worldViewProjection() + , __externalRenderTargets() + , __drawables() + , __blendDrawables() + , __pCamera(null) + , __findCameraPass(false) + , __caches() + , __deadCaches() + , __alphaBlendSource(GL_SRC_ALPHA) + , __alphaBlendDestination(GL_ONE_MINUS_SRC_ALPHA) + , __depthTestState(false) + , __currentFrameBuffer(0) +{ +} + +Render::~Render(void) +{ + const CacheListSizeType len = __caches.size(); + for (CacheListSizeType i = 0; len > i; ++i) + { + __caches[i]->InternalDestroyCache(); + } +} + +void +Render::SetDefaultDepthTestState(bool aIsEnable) +{ + __depthTestState = aIsEnable; + return; +} + +void +Render::Draw(Tizen::Ui::Effects::_Renderer::EngineModel::Node& root, EngineModel::Camera& camera) +{ + InternalKillDeadCaches(); + + __pCamera = &camera; + if (null == __pCamera) + { + ThrowJmp("Render::draw: Can`t render, no active camera"); + } + + InternalPreDraw(); + + InternalCollectInfo(root); + + InternalDraw(); + + InternalPostDraw(); + return; +} + +void +Render::Draw(Tizen::Ui::Effects::_Renderer::EngineModel::Node& root) +{ + InternalFindCameras(root); + + Draw(root, *__pCamera); + return; +} + +void +Render::OnGroup(Tizen::Ui::Effects::_Renderer::EngineModel::Group& prop) +{ + const size_t len = prop.ChildrenCount(); + for (size_t i = 0; len > i; ++i) + { + prop.GetChild(i)->Visit(*this); + } + return; +} + +void +Render::OnDrawable(Tizen::Ui::Effects::_Renderer::EngineModel::Drawable& prop) +{ + EngineModel::Cache* pCache = System::GetImpl(prop.GetCache()); + if (!pCache) + { + BuildCache(prop); + + pCache = System::GetImpl(prop.GetCache()); + if (!pCache) { return; } + } + + RenderDrawableCache* renderCache = dynamic_cast(pCache); + if (renderCache == null) + { + return; + } + + __drawables.push_back(renderCache); + + + const RenderDrawableCache::ExternalTexturesListSizeType numExternalTextures = renderCache->NumExternalTextures(); + + for (RenderDrawableCache::ExternalTexturesListSizeType i = 0; numExternalTextures > i; ++i) + { + + EngineModel::TextureAttachment* attachment = renderCache->GetExternalTexture(i); + if (attachment == null) + { + return; + } + + const EngineModel::TextureAttachment::RenderTargetListSizeType numRenderTargets = attachment->GetNumRenderTargets(); + + for (Tizen::Ui::Effects::_Renderer::EngineModel::TextureAttachment::RenderTargetListSizeType rt = 0; numRenderTargets > rt; ++rt) + { + EngineModel::RenderTargetExternalRender* pRenderTarget = static_cast(attachment->GetRenderTarget(rt)); + if (pRenderTarget == null) + { + return; + } + + RenderTargetExternalRenderCache* cache = static_cast(System::GetImpl(pRenderTarget->GetCache())); + if (!cache) + { + BuildCache(*pRenderTarget); + + cache = static_cast(System::GetImpl(pRenderTarget->GetCache())); + } + __externalRenderTargets[cache] = cache; + } + } + + return; +} + +void +Render::ManageCache(RenderCacheImplPtr pCache) +{ + __caches.push_back(pCache); + pCache->__cacheIndex = __caches.size() - 1; + return; +} + +void +Render::KillCache(RenderCacheImpl* pCache) +{ + __deadCaches.push_back(pCache); + return; +} + +void +Render::InternalKillDeadCaches(void) +{ + const DeadCacheListSizeType len = __deadCaches.size(); + for (DeadCacheListSizeType i = 0; len > i; ++i) + { + __deadCaches[i]->InternalDestroyCache(); + const size_t cacheIndex = __deadCaches[i]->__cacheIndex; + const CacheListSizeType cachesSize = __caches.size(); + __caches[cacheIndex] = __caches[cachesSize - 1]; + __caches[cacheIndex]->__cacheIndex = cacheIndex; + __caches.resize(cachesSize - 1); + } + __deadCaches.clear(); + return; +} + +void +Render::ContextLost(void) +{ + const CacheListSizeType len = __caches.size(); + for (CacheListSizeType i = 0; len > i; ++i) + { + __caches[i]->InternalDropCache(); + } + return; +} + +namespace +{ + struct CameraFinder: public EngineModel::Visitor + { + EngineModel::Camera* pCamera; + CameraFinder(): pCamera(null) {} + + virtual void + OnGroup(Tizen::Ui::Effects::_Renderer::EngineModel::Group& prop) + { + const size_t len = prop.ChildrenCount(); + for (size_t i = 0; len > i; ++i) + { + prop.GetChild(i)->Visit(*this); + } + return; + } + + virtual void + OnCamera(Tizen::Ui::Effects::_Renderer::EngineModel::Camera& prop) + { + pCamera = ∝ + return; + } + }; +} + +void +Render::InternalFindCameras(Tizen::Ui::Effects::_Renderer::EngineModel::Node& prop) +{ + __pCamera = null; + CameraFinder cameraFinder; + prop.Visit(cameraFinder); + __pCamera = cameraFinder.pCamera; + return; +} + +void +Render::InternalPreDraw(void) +{ + __drawables.clear(); + __blendDrawables.clear(); + __externalRenderTargets.clear(); + return; +} + +void +Render::InternalCollectInfo(Tizen::Ui::Effects::_Renderer::EngineModel::Node& prop) +{ + prop.Visit(*this); + return; +} + +void +Render::InternalDraw(void) +{ + Math::Vector2f minPos = __pCamera->GetViewportMin(); + Math::Vector2f maxPos = __pCamera->GetViewportMax(); + glViewport(static_cast(minPos.X()), static_cast(minPos.Y()), static_cast(maxPos.X()), static_cast(maxPos.Y())); + + Math::Matrix4f cameraWorld(__pCamera->GetWorld()); + Math::Matrix4f cameraView(cameraWorld.GetInversed()); //__pCamera world matrix is inverted view matrix + Math::Matrix4f projection(__pCamera->GetProj()); + Math::Matrix4f viewProjection = projection * cameraView; + if (__depthTestState) + { + glEnable(GL_DEPTH_TEST); + } + else + { + glDisable(GL_DEPTH_TEST); + } + + //solid Draw + const size_t len = __drawables.size(); + for (size_t i = 0; len > i; ++i) + { + __worldViewProjection = viewProjection * __drawables[i]->GetWorld(); + __worldViewProjection.Transpose(); + if (static_cast(__drawables[i])->HasAlphaBlend(this)) + { + glEnable(GL_BLEND); + } + else + { + glDisable(GL_BLEND); + } + + static_cast(__drawables[i])->Draw(this); + } + + return; +} + +void +Render::InternalPostDraw(void) +{ + return; +} + +void +Render::BuildCache(Tizen::Ui::Effects::_Renderer::EngineModel::Drawable& prop) +{ + RenderCachePtr cachePtr(new (std::nothrow) RenderDrawableCache(this, &prop)); + _TryJmp(GetImpl(cachePtr) != null, E_OUT_OF_MEMORY, "cache = null"); + + prop.SetCache(cachePtr); + + cachePtr->Validate(this); + + ManageCache(cachePtr); + return; +} + +void +Render::BuildCache(Tizen::Ui::Effects::_Renderer::EngineModel::VertexBuffer& prop) +{ + RenderCachePtr cachePtr(new (std::nothrow) SolidVertexBufferCache(this, &prop)); + _TryJmp(GetImpl(cachePtr) != null, E_OUT_OF_MEMORY, "cache = null"); + + prop.SetCache(cachePtr); + cachePtr->Validate(this); + ManageCache(cachePtr); + return; +} + +void +Render::BuildCache(Tizen::Ui::Effects::_Renderer::EngineModel::IndexBuffer& prop) +{ + RenderCachePtr cachePtr(new (std::nothrow) IndexBufferCache(this, &prop)); + _TryJmp(GetImpl(cachePtr) != null, E_OUT_OF_MEMORY, "cache = null"); + + prop.SetCache(cachePtr); + cachePtr->Validate(this); + ManageCache(cachePtr); + return; +} + +void +Render::BuildCache(Tizen::Ui::Effects::_Renderer::EngineModel::CompositeVertexBuffer& prop) +{ + RenderCachePtr cachePtr(new (std::nothrow) CompositeVertexBufferCache(this, &prop)); + _TryJmp(GetImpl(cachePtr) != null, E_OUT_OF_MEMORY, "pCache = null"); + + prop.SetCache(cachePtr); + cachePtr->Validate(this); + ManageCache(cachePtr); + return; +} + +void +Render::BuildCache(Tizen::Ui::Effects::_Renderer::EngineModel::PartVertexBuffer& prop) +{ + RenderCachePtr cachePtr(new (std::nothrow) PartVertexBufferCache(this, &prop)); + _TryJmp(GetImpl(cachePtr) != null, E_OUT_OF_MEMORY, "pCache = null"); + + prop.SetCache(cachePtr); + cachePtr->Validate(this); + ManageCache(cachePtr); + return; +} + +void +Render::BuildCache(Tizen::Ui::Effects::_Renderer::EngineModel::Texture2dProperty& prop, GLuint stage) +{ + RenderCachePtr cachePtr(new (std::nothrow) RenderTexture2dCache(this, &prop)); + _TryJmp(GetImpl(cachePtr) != null, E_OUT_OF_MEMORY, "pCache = null"); + + prop.SetCache(cachePtr); + cachePtr.staticCast()->Validate(this, stage); + ManageCache(cachePtr); + return; +} + +void +Render::BuildCache(Tizen::Ui::Effects::_Renderer::EngineModel::ShaderProperty& prop) +{ + RenderCachePtr cachePtr(new (std::nothrow) RenderShaderCache(this, &prop)); + _TryJmp(GetImpl(cachePtr) != null, E_OUT_OF_MEMORY, "pCache = null"); + + prop.SetCache(cachePtr); + cachePtr->Validate(this); + ManageCache(cachePtr); + return; +} + +void +Render::BuildCache(Tizen::Ui::Effects::_Renderer::EngineModel::ProgramProperty& prop) +{ + RenderCachePtr cachePtr(new (std::nothrow) RenderProgramCache(this, &prop)); + _TryJmp(GetImpl(cachePtr) != null, E_OUT_OF_MEMORY, "pCache = null"); + + prop.SetCache(cachePtr); + cachePtr->Validate(this); + ManageCache(cachePtr); + return; +} + +void +Render::BuildCache(Tizen::Ui::Effects::_Renderer::EngineModel::RenderTargetExternalRender& prop) +{ + RenderCachePtr cachePtr(new (std::nothrow) RenderTargetExternalRenderCache(this, &prop)); + _TryJmp(GetImpl(cachePtr) != null, E_OUT_OF_MEMORY, "pCache = null"); + + prop.SetCache(cachePtr); + cachePtr->Validate(this); + ManageCache(cachePtr); + return; +} + +void +Render::BuildCache(Tizen::Ui::Effects::_Renderer::EngineModel::Texture2dAttachmentProperty& prop, GLuint stage) +{ + RenderCachePtr cachePtr(new (std::nothrow) Texture2dAttachmentCache(this, &prop)); + _TryJmp(GetImpl(cachePtr) != null, E_OUT_OF_MEMORY, "pCache = null"); + + prop.SetCache(cachePtr); + cachePtr.staticCast()->Validate(this, stage); + ManageCache(cachePtr); + return; +} + +void +Render::BuildCache(Tizen::Ui::Effects::_Renderer::EngineModel::StubAttachment& o) +{ + RenderCachePtr cachePtr(new (std::nothrow) StubAttachmentCache(this, &o)); + _TryJmp(GetImpl(cachePtr) != null, E_OUT_OF_MEMORY, "pCache = null"); + + o.SetCache(cachePtr); + cachePtr->Validate(this); + ManageCache(cachePtr); + return; +} + +void +Render::BuildCache(Tizen::Ui::Effects::_Renderer::EngineModel::AlphaBlendProperty& prop) +{ + RenderCachePtr cachePtr(new (std::nothrow) RenderAlphaBlendCache(this, &prop)); + _TryJmp(GetImpl(cachePtr) != null, E_OUT_OF_MEMORY, "pCache = null"); + + prop.SetCache(cachePtr); + cachePtr->Validate(this); + ManageCache(cachePtr); + return; +} + +RenderCommandPtr +Render::GetDefaultRenderCommand(const RenderProgramCache::UniformListValueType* pInfo) +{ + if (pInfo->second == "WorldViewProjection") + { + RenderCommandPtr result = RenderCommandPtr(new (std::nothrow) SetWorldViewProjection(pInfo->first.location)); + _TryJmp(System::GetImpl(result) != null, E_OUT_OF_MEMORY, "GetDefaultRenderCommand = null"); + + return result; + } + + return RenderCommandPtr(); +} + +SetWorldViewProjection::SetWorldViewProjection(GLuint location): + __location(location) +{ +} + +void +SetWorldViewProjection::Apply(Render* pRender) +{ + glUniformMatrix4fv(__location, 1, GL_FALSE, pRender->GetWorldViewProjection().data[0].data); + return; +} + +const Math::Matrix4f& +Render::GetWorldViewProjection(void) +{ + return __worldViewProjection; +} + +}}}}} //Tizen::Ui::Effects::_Renderer::GraphicsEngine diff --git a/src/ui/effects/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderBufferCache.cpp b/src/ui/effects/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderBufferCache.cpp new file mode 100644 index 0000000..6a261b3 --- /dev/null +++ b/src/ui/effects/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderBufferCache.cpp @@ -0,0 +1,473 @@ +// +// 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 FUiEffects_RendererGraphicsEngineRenderBufferCache.cpp + * @brief Implementation of class for buffer caching + * + */ + + +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace GraphicsEngine +{ + +IBufferCache::IBufferCache(Render* pRender) + : RenderCache(pRender) + , _bufferId(static_cast(0)) + , _dataType(static_cast(0)) +{ +} + +IBufferCache::~IBufferCache() {} + +void +IBufferCache::DropCache(void) +{ + _bufferId = 0; + return; +} + +void +IBufferCache::DestroyCache(void) +{ + if (_bufferId) + { + glDeleteBuffers(1, &_bufferId); + } + + return; +} + +GLenum +IBufferCache::GetGlUsage(Tizen::Ui::Effects::_Renderer::EngineModel::SolidBufferStrategy::BufferUsage::Value usage) +{ + switch (usage) + { + case EngineModel::SolidBufferStrategy::BufferUsage::STREAM_DRAW: + return GL_STREAM_DRAW; + case EngineModel::SolidBufferStrategy::BufferUsage::STREAM_READ: + return GL_STREAM_DRAW; + case EngineModel::SolidBufferStrategy::BufferUsage::STREAM_COPY: + return GL_STREAM_DRAW; + case EngineModel::SolidBufferStrategy::BufferUsage::STATIC_DRAW: + return GL_STATIC_DRAW; + case EngineModel::SolidBufferStrategy::BufferUsage::STATIC_READ: + return GL_STATIC_DRAW; + case EngineModel::SolidBufferStrategy::BufferUsage::STATIC_COPY: + return GL_STATIC_DRAW; + case EngineModel::SolidBufferStrategy::BufferUsage::DYNAMIC_DRAW: + return GL_DYNAMIC_DRAW; + case EngineModel::SolidBufferStrategy::BufferUsage::DYNAMIC_READ: + return GL_DYNAMIC_DRAW; + case EngineModel::SolidBufferStrategy::BufferUsage::DYNAMIC_COPY: + return GL_DYNAMIC_DRAW; + } + return GL_STATIC_DRAW; +} + +GLenum +IBufferCache::GetGlDataType(Tizen::Ui::Effects::_Renderer::EngineModel::TypedBufferStrategy::DataType::Value dataType) +{ + switch (dataType) + { + case EngineModel::TypedBufferStrategy::DataType::BYTE: + return GL_BYTE; + case EngineModel::TypedBufferStrategy::DataType::UNSIGNED_BYTE: + return GL_UNSIGNED_BYTE; + case EngineModel::TypedBufferStrategy::DataType::SHORT: + return GL_SHORT; + case EngineModel::TypedBufferStrategy::DataType::UNSIGNED_SHORT: + return GL_UNSIGNED_SHORT; + case EngineModel::TypedBufferStrategy::DataType::INT: + return GL_INT; + case EngineModel::TypedBufferStrategy::DataType::UNSIGNED_INT: + return GL_UNSIGNED_INT; + case EngineModel::TypedBufferStrategy::DataType::FLOAT: + return GL_FLOAT; + case EngineModel::TypedBufferStrategy::DataType::DOUBLE: + ThrowJmp("GL_DOUBLE is not allowed as buffer data format undel GLES2"); + break; + } + return GL_FLOAT; +} + +GLsizei +IBufferCache::GetGlDataTypeSize(Tizen::Ui::Effects::_Renderer::EngineModel::TypedBufferStrategy::DataType::Value dataType) +{ + switch (dataType) + { + case EngineModel::TypedBufferStrategy::DataType::BYTE: + case EngineModel::TypedBufferStrategy::DataType::UNSIGNED_BYTE: + return 1; + case EngineModel::TypedBufferStrategy::DataType::SHORT: + case EngineModel::TypedBufferStrategy::DataType::UNSIGNED_SHORT: + return 2; + case EngineModel::TypedBufferStrategy::DataType::DOUBLE: + return 8; + case EngineModel::TypedBufferStrategy::DataType::INT: + case EngineModel::TypedBufferStrategy::DataType::UNSIGNED_INT: + case EngineModel::TypedBufferStrategy::DataType::FLOAT: + default: + return 4; + } +} + +GLenum +IndexBufferCache::GetGlPrimitiveType(Tizen::Ui::Effects::_Renderer::EngineModel::IndexBuffer::PrimitiveType::Value primitiveType) +{ + switch (primitiveType) + { + case EngineModel::IndexBuffer::PrimitiveType::POINTS: + return GL_POINTS; + case EngineModel::IndexBuffer::PrimitiveType::LINE_STRIP: + return GL_LINE_STRIP; + case EngineModel::IndexBuffer::PrimitiveType::LINE_LOOP: + return GL_LINE_LOOP; + case EngineModel::IndexBuffer::PrimitiveType::LINES: + return GL_LINES; + case EngineModel::IndexBuffer::PrimitiveType::TRIANGLE_STRIP: + return GL_TRIANGLE_STRIP; + case EngineModel::IndexBuffer::PrimitiveType::TRIANGLE_FAN: + return GL_TRIANGLE_FAN; + case EngineModel::IndexBuffer::PrimitiveType::TRIANGLES: + return GL_TRIANGLES; + case EngineModel::IndexBuffer::PrimitiveType::QUAD_STRIP: + ThrowJmp("GL_QUAD_STRIP - is anasseptable as geometry type under GLES2"); + // fall through + case EngineModel::IndexBuffer::PrimitiveType::QUADS: + ThrowJmp("GL_QUADS - is anasseptable as geometry type under GLES2"); + // fall through + case EngineModel::IndexBuffer::PrimitiveType::POLYGON: + ThrowJmp("GL_POLYGON - is anasseptable as geometry type under GLES2"); + // fall through + } + return GL_POINTS; +} + +IndexBufferCache::IndexBufferCache(Render* pRender, EngineModel::IndexBuffer* pBuffer) + : IBufferCache(pRender) + , __elementsCount(static_cast(0)) + , __primitiveType(static_cast(0)) + , __pBuffer(pBuffer) +{ +} + +IndexBufferCache::~IndexBufferCache() +{} + +void +IndexBufferCache::DestroyCache(void) +{ + if (__pBuffer) + { + __pBuffer->SetCache(IndexBufferCachePtr()); + } + + __pBuffer = null; + IBufferCache::DestroyCache(); + + return; +} + +void +IndexBufferCache::Die(void) +{ + __pBuffer = null; + IBufferCache::Die(); + return; +} + +void +IndexBufferCache::Validate(Render*) +{ + if (!_invalid) + { + return; + } + _dataType = GetGlDataType(__pBuffer->GetDataType()); + __elementsCount = static_cast(__pBuffer->GetSize() / GetGlDataTypeSize(__pBuffer->GetDataType())); + __primitiveType = GetGlPrimitiveType(__pBuffer->GetPrimitiveType()); + void* pData = __pBuffer->GetData(); + if (!pData) + { + ThrowJmp("IndexBufferCache::validate: data buffer is null"); + } + if (!_bufferId) + { + glGenBuffers(1, &_bufferId); + } + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _bufferId); + glBufferData(GL_ELEMENT_ARRAY_BUFFER, __pBuffer->GetSize(), pData, GetGlUsage(__pBuffer->GetUsage())); + _invalid = false; + return; +} + +void +IndexBufferCache::DrawElements(Render* pRender) +{ + if (_invalid) + { + Validate(pRender); + } + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _bufferId); + glDrawElements(__primitiveType, __elementsCount, _dataType, 0); + return; +} + +SolidVertexBufferCache::SolidVertexBufferCache(Render *pRender, EngineModel::VertexBuffer* pBuffer) + : VertexBufferCache(pRender) + , __componentsPerElement(static_cast(0)) + , __pBuffer(pBuffer) +{ +} + +SolidVertexBufferCache::~SolidVertexBufferCache() +{ } + +void +SolidVertexBufferCache::DestroyCache(void) +{ + if (__pBuffer) + { + __pBuffer->SetCache(SolidVertexBufferCachePtr()); + } + + __pBuffer = null; + IBufferCache::DestroyCache(); + + return; +} + +void +SolidVertexBufferCache::Die(void) +{ + __pBuffer = null; + IBufferCache::Die(); + return; +} + +void +SolidVertexBufferCache::Validate(Render*) +{ + if (Valid()) + { + return; + } + __componentsPerElement = static_cast(__pBuffer->GetComponentsPerElement()); + _dataType = GetGlDataType(__pBuffer->GetDataType()); + void* pData = __pBuffer->GetData(); + if (!pData) + { + ThrowJmp("SolidVertexBufferCache::validate: data buffer is null"); + } + if (!_bufferId) + { + glGenBuffers(1, &_bufferId); + } + glBindBuffer(GL_ARRAY_BUFFER, _bufferId); + glBufferData(GL_ARRAY_BUFFER, __pBuffer->GetSize(), pData, GetGlUsage(__pBuffer->GetUsage())); + _invalid = false; + return; +} + +void +SolidVertexBufferCache::BindToAttrib(Render* pRender, GLuint index) +{ + if (_invalid) + { + Validate(pRender); + } + glBindBuffer(GL_ARRAY_BUFFER, _bufferId); + glVertexAttribPointer(index, __componentsPerElement, _dataType, GL_FALSE, 0, 0); + return; +} + +void +SolidVertexBufferCache::BindAsVertices(Render* pRender) +{ + ThrowJmp("SolidVertexBufferCache::bindAsVertices is anasseptable under GLES2"); + return; +} + +void +SolidVertexBufferCache::BindAsColor(Render* pRender) +{ + ThrowJmp("SolidVertexBufferCache::bindAsColor is anasseptable under GLES2"); + return; +} + +void +SolidVertexBufferCache::BindAsTexCoord(Render* pRender, GLuint stage) +{ + ThrowJmp("SolidVertexBufferCache::bindAsTexCoord is anasseptable under GLES2"); + return; +} + +PartVertexBufferCache::PartVertexBufferCache(Render *pRender, EngineModel::PartVertexBuffer* pBuffer) + : VertexBufferCache(pRender) + , __componentsPerElement(static_cast(0)) + , __stride(static_cast(0)) + , __pOffset(null) + , __pBuffer(pBuffer) +{ +} + +PartVertexBufferCache::~PartVertexBufferCache() {} + +void +PartVertexBufferCache::DestroyCache(void) +{ + if (__pBuffer) + { + __pBuffer->SetCache(PartVertexBufferCachePtr()); + } + + __pBuffer = null; + IBufferCache::DestroyCache(); + + return; +} + +void +PartVertexBufferCache::Die(void) +{ + __pBuffer = null; + IBufferCache::Die(); + return; +} + +void +PartVertexBufferCache::Validate(Render*) +{ + if (Valid()) + { + return; + } + EngineModel::CompositeVertexBufferPtr composite = __pBuffer->GetCompositeBuffer(); + if (!composite) + { + ThrowJmp("PartVertexBufferCache::validate: no composite buffer in part buffer"); + } + __pOffset = reinterpret_cast(__pBuffer->GetOffset()); + __stride = static_cast(__pBuffer->GetStride()); + __componentsPerElement = static_cast(__pBuffer->GetComponentsPerElement()); + _dataType = GetGlDataType(composite->GetDataType()); + _invalid = false; + return; +} + +void +PartVertexBufferCache::BindToAttrib(Render* pRender, GLuint index) +{ + if (_invalid) + { + Validate(pRender); + } + glVertexAttribPointer(index, __componentsPerElement, _dataType, GL_FALSE, __stride, __pOffset); + return; +} + +void +PartVertexBufferCache::BindAsVertices(Render* pRender) +{ + ThrowJmp("PartVertexBufferCache::bindAsVertices is anasseptable under GLES2"); + return; +} + +void +PartVertexBufferCache::BindAsColor(Render* pRender) +{ + ThrowJmp("PartVertexBufferCache::bindAsColor is anasseptable under GLES2"); + return; +} + +void +PartVertexBufferCache::BindAsTexCoord(Render* pRender, GLuint stage) +{ + ThrowJmp("PartVertexBufferCache::bindAsColor is anasseptable under GLES2"); + return; +} + +CompositeVertexBufferCache::CompositeVertexBufferCache(Render* pRender, EngineModel::CompositeVertexBuffer* pBuffer): + IBufferCache(pRender), __pBuffer(pBuffer) +{ +} + +CompositeVertexBufferCache::~CompositeVertexBufferCache(void) +{ +} + +void +CompositeVertexBufferCache::DestroyCache(void) +{ + if (__pBuffer) + { + __pBuffer->SetCache(CompositeVertexBufferCachePtr()); + } + + __pBuffer = null; + IBufferCache::DestroyCache(); + + return; +} + +void +CompositeVertexBufferCache::Die(void) +{ + __pBuffer = null; + IBufferCache::Die(); + return; +} + +void +CompositeVertexBufferCache::Validate(Render*) +{ + if (Valid()) + { + return; + } + _dataType = GetGlDataType(__pBuffer->GetDataType()); + void* pData = __pBuffer->GetData(); + if (!pData) + { + ThrowJmp("CompositeVertexBufferCache::validate: data buffer is null"); + } + if (!_bufferId) + { + glGenBuffers(1, &_bufferId); + } + glBindBuffer(GL_ARRAY_BUFFER, _bufferId); + glBufferData(GL_ARRAY_BUFFER, __pBuffer->GetSize(), pData, GetGlUsage(__pBuffer->GetUsage())); + _invalid = false; + return; +} + +void +CompositeVertexBufferCache::Bind(Render* pRender) +{ + if (_invalid) + { + Validate(pRender); + } + glBindBuffer(GL_ARRAY_BUFFER, _bufferId); + return; +} + +}}}}} // Tizen::Ui::Effects::_Renderer::GraphicsEngine diff --git a/src/ui/effects/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderCache.cpp b/src/ui/effects/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderCache.cpp new file mode 100644 index 0000000..5bdde7a --- /dev/null +++ b/src/ui/effects/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderCache.cpp @@ -0,0 +1,58 @@ +// +// 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 FUiEffects_RendererGraphicsEngineRenderCache.cpp + * @brief Implementation of class for rendering cache + * + */ + + +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace GraphicsEngine +{ + +void +RenderCacheImpl::InternalForceToDie(void) +{ + if (__pCreator) + { + __pCreator->KillCache(this); + } + __pCreator = null; + return; +} + +void +RenderCacheImpl::InternalDestroyCache(void) +{ + __pCreator = null; + DestroyCache(); + return; +} + +void +RenderCacheImpl::InternalDropCache(void) +{ + DropCache(); + InvalidateImpl(); + return; +} + +}}}}} // Tizen::Ui::Effects::_Renderer::GraphicsEngine diff --git a/src/ui/effects/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderDrawableCache.cpp b/src/ui/effects/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderDrawableCache.cpp new file mode 100644 index 0000000..bcfd4d7 --- /dev/null +++ b/src/ui/effects/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderDrawableCache.cpp @@ -0,0 +1,732 @@ +// +// 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 FUiEffects_RendererGraphicsEngineRenderDrawableCache.cpp + * @brief Implementation of class for drawable objects cache + * + */ + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace GraphicsEngine +{ + +UseProgram::UseProgram(RenderProgramCache* pProgram): + __pProgram(pProgram) +{ +} + +void +UseProgram::Apply(Render* pRender) +{ + __pProgram->UseProgram(pRender); __pProgram->EnableAttributes(pRender); + + return; +} + +DisableProgramAttributers::DisableProgramAttributers(RenderProgramCache* pProgram): + __pProgram(pProgram) +{ +} + +void +DisableProgramAttributers::Apply(Render* pRender) +{ + __pProgram->DisableAttributes(pRender); + return; +} + +Sampler2dUniform::Sampler2dUniform(RenderTexture2dCache* pTexture, GLuint stage): + __pTexture(pTexture), + __stage(stage) +{ +} + +void +Sampler2dUniform::Apply(Render* pRender) +{ + __pTexture->Bind(pRender, __stage); + return; +} + +void +Sampler2dAttachmentUniform::Apply(Render* pRender) +{ + __pTexture->Bind(pRender, __stage); + return; +} + +Sampler2dAttachmentUniform::Sampler2dAttachmentUniform(Texture2dAttachmentCache* pTexture, GLuint stage): + __pTexture(pTexture), + __stage(stage) +{ +} + +Matrix4fUniform::Matrix4fUniform(Tizen::Ui::Effects::_Renderer::EngineModel::Matrix4fProperty* pUniform, GLuint location): + __pUniform(pUniform), + __location(location) +{ +} + +void +Matrix4fUniform::Apply(Render*) +{ + glUniformMatrix4fv(__location, 1, GL_FALSE, __pUniform->Get().data[0].data); + return; +} + +IntUniform::IntUniform(Tizen::Ui::Effects::_Renderer::EngineModel::IntProperty* pUniform, GLuint location): + __pUniform(pUniform), + __location(location) +{ +} + +void +IntUniform::Apply(Render*) +{ + glUniform1i(__location, __pUniform->Get()); + return; +} + +FloatUniform::FloatUniform(Tizen::Ui::Effects::_Renderer::EngineModel::FloatProperty* pUniform, GLuint location): + __pUniform(pUniform), + __location(location) +{ +} + +void +FloatUniform::Apply(Render*) +{ + glUniform1f(__location, __pUniform->Get()); + return; +} + +FloatArrayUniform::FloatArrayUniform(Tizen::Ui::Effects::_Renderer::EngineModel::FloatArrayProperty* pUniform, GLuint location): + __pUniform(pUniform), + __location(location) +{ +} + +void +FloatArrayUniform::Apply(Render* pRender) +{ + glUniform1fv(__location, __pUniform->GetNumElements(), __pUniform->GetData()); + return; +} + +Vector2fUniform::Vector2fUniform(Tizen::Ui::Effects::_Renderer::EngineModel::Vector2fProperty* pUniform, GLuint location): + __pUniform(pUniform), + __location(location) +{ +} + +void +Vector2fUniform::Apply(Render*) +{ + glUniform2fv(__location, 1, __pUniform->Get().data); + return; +} + +Vector3fUniform::Vector3fUniform(Tizen::Ui::Effects::_Renderer::EngineModel::Vector3fProperty* pUniform, GLuint location): + __pUniform(pUniform), + __location(location) +{ +} + +void +Vector3fUniform::Apply(Render*) +{ + glUniform3fv(__location, 1, __pUniform->Get().data); + return; +} + +Vector4fUniform::Vector4fUniform(Tizen::Ui::Effects::_Renderer::EngineModel::Vector4fProperty* pUniform, GLuint location): + _pUniform(pUniform), + __location(location) +{ +} + +void +Vector4fUniform::Apply(Render*) +{ + glUniform4fv(__location, 1, _pUniform->Get().data); + return; +} + +ProgramAttribute::ProgramAttribute(VertexBufferCache* pAttribute, GLuint location): + __pAttribute(pAttribute), + __location(location) +{ +} + +void +ProgramAttribute::Apply(Render* pRender) +{ + __pAttribute->BindToAttrib(pRender, __location); + return; +} + +BindBuffer::BindBuffer(CompositeVertexBufferCache* pBuffer): + __pBuffer(pBuffer) +{ +} + +void +BindBuffer::Apply(Render* pRender) +{ + __pBuffer->Bind(pRender); + return; +} + +DrawIndexed::DrawIndexed(IndexBufferCache* pBuffer): + __pBuffer(pBuffer) +{ +} + +void +DrawIndexed::Apply(Render* pRender) +{ + __pBuffer->DrawElements(pRender); + return; +} + +SetState::SetState(RenderStateCache* pState): + __pState(pState) +{ +} + +void +SetState::Apply(Render* pRender) +{ + __pState->Set(pRender); + return; +} + +RenderDrawableCache::RenderDrawableCache(Render* pRender, EngineModel::Drawable* pDrawable) : + RenderCache(pRender), + __pDrawable(pDrawable), + __pAlphaBlend(null) +{ +} + +RenderDrawableCache::~RenderDrawableCache(void) +{ + +} + +RenderDrawableCache::ExternalTexturesListSizeType +RenderDrawableCache::NumExternalTextures(void) +{ + return __externalTextures.size(); +} + +EngineModel::TextureAttachment* +RenderDrawableCache::GetExternalTexture(ExternalTexturesListSizeType index) +{ + if (index < __externalTextures.size()) + { + return __externalTextures[index]; + } + return null; +} + +const Math::Matrix4f& +RenderDrawableCache::GetWorld(void) +{ + return __pDrawable->GetWorld(); +} + +void +RenderDrawableCache::DropCache(void) +{ + __ownCommands.clear(); + __commands.clear(); + __externalTextures.clear(); + return; +} + +void +RenderDrawableCache::Die(void) +{ + __pDrawable = null; + RenderCache::Die(); + return; +} + +void +RenderDrawableCache::DestroyCache(void) +{ + if (__pDrawable) + { + __pDrawable->SetCache(RenderDrawableCachePtr()); + } + __pDrawable = null; + DropCache(); + return; +} + +namespace +{ + struct ProgramFinder: EngineModel::PropertyVisitor + { + RenderProgramCache* programCache; + RenderAlphaBlendCache* alphaBlend; + Render* render; + + ProgramFinder(Tizen::Ui::Effects::_Renderer::EngineModel::MaterialPtr& material, Render* pRender): + programCache(null), + alphaBlend(null), + render(pRender) + { + const size_t len = material->GetNumProperties(); + for (size_t i = 0; len > i; ++i) + { + material->GetProperty(i)->Visit(*this); + } + } + + virtual void + OnProgramProperty(Tizen::Ui::Effects::_Renderer::EngineModel::ProgramProperty& prop) + { + programCache = static_cast(System::GetImpl(prop.GetCache())); + if (!programCache) + { + render->BuildCache(prop); + programCache = static_cast(System::GetImpl(prop.GetCache())); + } + + return; + } + + virtual void + OnAlphaBlendProperty(Tizen::Ui::Effects::_Renderer::EngineModel::AlphaBlendProperty& prop) + { + alphaBlend = static_cast(System::GetImpl(prop.GetCache())); + if (!alphaBlend) + { + render->BuildCache(prop); + alphaBlend = static_cast(System::GetImpl(prop.GetCache())); + } + + return; + } + }; + + struct UniformFinder: EngineModel::PropertyVisitor + { + RenderProgramCache* program; + EngineModel::MaterialPtr& material; + RenderDrawableCache::RenderCommandsListType& commands; + RenderDrawableCache::RenderCommandsListType& ownCommands; + std::vector& externalTextures; + Render* pRender; + + const RenderProgramCache::UniformListValueType* currentUniformInfo; + GLuint currentTextureStage; + + UniformFinder(RenderProgramCache* pProgram, EngineModel::MaterialPtr& materialArg, Render* pRenderArg, + RenderDrawableCache::RenderCommandsListType& commandsArg, RenderDrawableCache::RenderCommandsListType& ownCommandsArg, + std::vector& externalTexturesArg): + program(pProgram), + material(materialArg), + commands(commandsArg), + ownCommands(ownCommandsArg), + externalTextures(externalTexturesArg), + pRender(pRenderArg), + currentUniformInfo(null), + currentTextureStage(0) + { + const RenderProgramCache::UniformListSizeType numUniforms = program->GetNumUniforms(); + for (RenderProgramCache::UniformListSizeType i = 0; numUniforms > i; ++i) + { + const RenderProgramCache::UniformListValueType& uniformInfo = program->GetUniform(i); + currentUniformInfo = &uniformInfo; + EngineModel::PropertyPtr property = material->GetProperty(uniformInfo.second); + if (!property) + { + RenderCommandPtr renderCommandPtr = pRenderArg->GetDefaultRenderCommand(currentUniformInfo); + if (System::GetImpl(renderCommandPtr) != null) + { + commands.push_back(renderCommandPtr); + ownCommands.push_back(renderCommandPtr); + } + continue; + } + property->Visit(*this); + } + } + + void + OnTexture2DProperty(Tizen::Ui::Effects::_Renderer::EngineModel::Texture2dProperty& prop) + { + glUniform1i(currentUniformInfo->first.location, currentTextureStage); + + RenderTexture2dCache* cache = static_cast(System::GetImpl(prop.GetCache())); + if (!cache) + { + pRender->BuildCache(prop, currentTextureStage); + cache = static_cast(System::GetImpl(prop.GetCache())); + } + + RenderCommandPtr renderCommandPtr(new (std::nothrow) Sampler2dUniform(cache, currentTextureStage)); + _TryJmp(System::GetImpl(renderCommandPtr) != null, E_OUT_OF_MEMORY, "Sampler2dUniform = null"); + + commands.push_back(renderCommandPtr); + ownCommands.push_back(renderCommandPtr); + ++currentTextureStage; + return; + } + + void + OnTexture2DAttachmentProperty(Tizen::Ui::Effects::_Renderer::EngineModel::Texture2dAttachmentProperty& prop) + { + glUniform1i(currentUniformInfo->first.location, currentTextureStage); + + Texture2dAttachmentCache* cache = static_cast(System::GetImpl(prop.GetCache())); + if (!cache) + { + pRender->BuildCache(prop, currentTextureStage); + cache = static_cast(System::GetImpl(prop.GetCache())); + } + externalTextures.push_back(&prop); + RenderCommandPtr renderCommandPtr(new (std::nothrow) Sampler2dAttachmentUniform(cache, currentTextureStage)); + _TryJmp(System::GetImpl(renderCommandPtr) != null, E_OUT_OF_MEMORY, "Sampler2dAttachmentUniform = null"); + + commands.push_back(renderCommandPtr); + ownCommands.push_back(renderCommandPtr); + ++currentTextureStage; + return; + } + + void + OnMatrix4fProperty(Tizen::Ui::Effects::_Renderer::EngineModel::Matrix4fProperty& prop) + { + RenderCommandPtr renderCommandPtr(new (std::nothrow) Matrix4fUniform(&prop, currentUniformInfo->first.location)); + _TryJmp(System::GetImpl(renderCommandPtr) != null, E_OUT_OF_MEMORY, "Matrix4fUniform = null"); + + commands.push_back(renderCommandPtr); + ownCommands.push_back(renderCommandPtr); + return; + } + + void + OnVector2fProperty(Tizen::Ui::Effects::_Renderer::EngineModel::Vector2fProperty& prop) + { + RenderCommandPtr renderCommandPtr(new (std::nothrow) Vector2fUniform(&prop, currentUniformInfo->first.location)); + _TryJmp(System::GetImpl(renderCommandPtr) != null, E_OUT_OF_MEMORY, "Vector2fUniform = null"); + + commands.push_back(renderCommandPtr); + ownCommands.push_back(renderCommandPtr); + return; + } + + void + OnVector3fProperty(Tizen::Ui::Effects::_Renderer::EngineModel::Vector3fProperty& prop) + { + RenderCommandPtr renderCommandPtr(new (std::nothrow) Vector3fUniform(&prop, currentUniformInfo->first.location)); + _TryJmp(System::GetImpl(renderCommandPtr) != null, E_OUT_OF_MEMORY, "Vector3fUniform = null"); + + commands.push_back(renderCommandPtr); + ownCommands.push_back(renderCommandPtr); + return; + } + + void + OnVector4fProperty(Tizen::Ui::Effects::_Renderer::EngineModel::Vector4fProperty& prop) + { + RenderCommandPtr renderCommandPtr(new (std::nothrow) Vector4fUniform(&prop, currentUniformInfo->first.location)); + _TryJmp(System::GetImpl(renderCommandPtr) != null, E_OUT_OF_MEMORY, "Vector4fUniform = null"); + + commands.push_back(renderCommandPtr); + ownCommands.push_back(renderCommandPtr); + return; + } + + void + OnIntProperty(Tizen::Ui::Effects::_Renderer::EngineModel::IntProperty& prop) + { + RenderCommandPtr renderCommandPtr(new (std::nothrow) IntUniform(&prop, currentUniformInfo->first.location)); + _TryJmp(System::GetImpl(renderCommandPtr) != null, E_OUT_OF_MEMORY, "IntUniform = null"); + + commands.push_back(renderCommandPtr); + ownCommands.push_back(renderCommandPtr); + return; + } + + void + OnFloatProperty(Tizen::Ui::Effects::_Renderer::EngineModel::FloatProperty& prop) + { + RenderCommandPtr renderCommandPtr(new (std::nothrow) FloatUniform(&prop, currentUniformInfo->first.location)); + _TryJmp(System::GetImpl(renderCommandPtr) != null, E_OUT_OF_MEMORY, "FloatUniform = null"); + + commands.push_back(renderCommandPtr); + ownCommands.push_back(renderCommandPtr); + return; + } + + void + OnFloatArrayProperty(Tizen::Ui::Effects::_Renderer::EngineModel::FloatArrayProperty& prop) + { + RenderCommandPtr renderCommandPtr(new (std::nothrow) FloatArrayUniform(&prop, currentUniformInfo->first.location)); + _TryJmp(System::GetImpl(renderCommandPtr) != null, E_OUT_OF_MEMORY, "FloatArrayUniform = null"); + + commands.push_back(renderCommandPtr); + ownCommands.push_back(renderCommandPtr); + return; + } + }; + + + struct GeometryFinder: EngineModel::BufferVisitor + { + RenderProgramCache* pProgram; + EngineModel::GeometryPtr& geometry; + RenderDrawableCache::RenderCommandsListType& commands; + RenderDrawableCache::RenderCommandsListType& ownCommands; + Render* pRender; + + const RenderProgramCache::AttribuleListValueType* pCurrentAttributeInfo; + + GeometryFinder(RenderProgramCache* pProgramArg, EngineModel::GeometryPtr& geometryArg, Render* pRenderArg, + RenderDrawableCache::RenderCommandsListType& commandsArg, RenderDrawableCache::RenderCommandsListType& ownCommandsArg): + pProgram(pProgramArg), + geometry(geometryArg), + commands(commandsArg), + ownCommands(ownCommandsArg), + pRender(pRenderArg), + pCurrentAttributeInfo(null) + { + const RenderProgramCache::AttribuleListSizeType numAttributes = pProgram->GetNumAttributes(); + for (RenderProgramCache::AttribuleListSizeType i = 0; numAttributes > i; ++i) + { + const RenderProgramCache::AttribuleListValueType& attributeInfo = pProgram->GetAttribute(i); + pCurrentAttributeInfo = &attributeInfo; + EngineModel::BufferPtr buffer = geometry->GetBuffer(attributeInfo.second); + if (!buffer) + { + continue; + } + buffer->Visit(*this); + } + + EngineModel::BufferPtr buffer = geometry->GetIndexBuffer(); + if (!buffer) + { + return; + } + buffer->Visit(*this); + return; + } + + void + OnVertexBuffer(Tizen::Ui::Effects::_Renderer::EngineModel::VertexBuffer& prop) + { + VertexBufferCache* cache = static_cast(System::GetImpl(prop.GetCache())); + if (!cache) + { + pRender->BuildCache(prop); + } + + RenderCommandPtr renderCommandPtr(new (std::nothrow) ProgramAttribute(static_cast(System::GetImpl(prop.GetCache())), pCurrentAttributeInfo->first.location)); + _TryJmp(System::GetImpl(renderCommandPtr) != null, E_OUT_OF_MEMORY, "ProgramAttribute = null"); + + commands.push_back(renderCommandPtr); + ownCommands.push_back(renderCommandPtr); + return; + } + + void + OnCompositeVertexBuffer(Tizen::Ui::Effects::_Renderer::EngineModel::CompositeVertexBuffer& prop) + { + CompositeVertexBufferCache* cache = static_cast(System::GetImpl(prop.GetCache())); + if (!cache) + { + pRender->BuildCache(prop); + } + + RenderCommandPtr renderCommandPtr(new (std::nothrow) BindBuffer(static_cast(System::GetImpl(prop.GetCache())))); + _TryJmp(System::GetImpl(renderCommandPtr) != null, E_OUT_OF_MEMORY, "BindBuffer = null"); + + commands.push_back(renderCommandPtr); + ownCommands.push_back(renderCommandPtr); + return; + } + + void + OnPartVertexBuffer(Tizen::Ui::Effects::_Renderer::EngineModel::PartVertexBuffer& prop) + { + prop.GetCompositeBuffer()->Visit(*this); + + VertexBufferCache* cache = static_cast(System::GetImpl(prop.GetCache())); + if (!cache) + { + pRender->BuildCache(prop); + } + + RenderCommandPtr renderCommandPtr(new (std::nothrow) ProgramAttribute(static_cast(System::GetImpl(prop.GetCache())), pCurrentAttributeInfo->first.location)); + _TryJmp(System::GetImpl(renderCommandPtr) != null, E_OUT_OF_MEMORY, "ProgramAttribute = null"); + + commands.push_back(renderCommandPtr); + ownCommands.push_back(renderCommandPtr); + return; + } + + void + OnIndexBuffer(Tizen::Ui::Effects::_Renderer::EngineModel::IndexBuffer& prop) + { + IndexBufferCache* cache = static_cast(System::GetImpl(prop.GetCache())); + if (!cache) + { + pRender->BuildCache(prop); + } + + RenderCommandPtr renderCommandPtr(new (std::nothrow) DrawIndexed(static_cast(System::GetImpl(prop.GetCache())))); + _TryJmp(System::GetImpl(renderCommandPtr) != null, E_OUT_OF_MEMORY, "DrawIndexed = null"); + + commands.push_back(renderCommandPtr); + ownCommands.push_back(renderCommandPtr); + return; + } + }; +} + +void +RenderDrawableCache::Validate(Render* pRender) +{ + RenderCommandPtr renderCommandPtr; + + if (!_invalid) + { + return; + } + if (!__pDrawable) + { + return; + } + + __ownCommands.clear(); + __commands.clear(); + __externalTextures.clear(); + + EngineModel::MaterialPtr material = __pDrawable->GetMaterial(); + if (!material) + { + return; + } + + EngineModel::GeometryPtr geometry = __pDrawable->GetGeometry(); + if (!geometry) + { + return; + } + + //find __pProgram + ProgramFinder programFinder(material, pRender); + RenderProgramCache* pProgram = programFinder.programCache; + if (null == pProgram) + { + return; + } + + renderCommandPtr = RenderCommandPtr(new (std::nothrow) UseProgram(pProgram)); + _TryJmp(System::GetImpl(renderCommandPtr) != null, E_OUT_OF_MEMORY, "UseProgram = null"); + + __commands.push_back(renderCommandPtr); + __ownCommands.push_back(renderCommandPtr); + + //Set states + if (programFinder.alphaBlend) + { + __pAlphaBlend = programFinder.alphaBlend; + renderCommandPtr = RenderCommandPtr(new (std::nothrow) SetState(__pAlphaBlend)); + _TryJmp(System::GetImpl(renderCommandPtr) != null, E_OUT_OF_MEMORY, "SetState = null"); + + __commands.push_back(renderCommandPtr); + __ownCommands.push_back(renderCommandPtr); + } + + //parse uniforms + pProgram->UseProgram(pRender); + UniformFinder uniformFinder(pProgram, material, pRender, __commands, __ownCommands, __externalTextures); + glUseProgram(0); + + //parse geometry + GeometryFinder geometryFinder(pProgram, geometry, pRender, __commands, __ownCommands); + + //DisableAttributes + renderCommandPtr = RenderCommandPtr(new (std::nothrow) DisableProgramAttributers(pProgram)); + _TryJmp(System::GetImpl(renderCommandPtr) != null, E_OUT_OF_MEMORY, "DisableProgramAttributers = null"); + + __commands.push_back(renderCommandPtr); + __ownCommands.push_back(renderCommandPtr); + + _invalid = false; + return; +} + +void +RenderDrawableCache::Draw(Render* pRender) +{ + if (_invalid) + { + Validate(pRender); + } + + const size_t len = __commands.size(); + for (size_t i = 0; len > i; ++i) + { + __commands[i]->Apply(pRender); + } + + return; +} + +bool +RenderDrawableCache::HasAlphaBlend(Render* pRender) +{ + if (!__pAlphaBlend) + { + return false; + } + return __pAlphaBlend->IsEnable(pRender); +} + +}}}}} // Tizen::Ui::Effects::_Renderer::GraphicsEngine diff --git a/src/ui/effects/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderRenderTargetCache.cpp b/src/ui/effects/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderRenderTargetCache.cpp new file mode 100644 index 0000000..6c41c6f --- /dev/null +++ b/src/ui/effects/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderRenderTargetCache.cpp @@ -0,0 +1,404 @@ +// +// 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 FUiEffects_RendererGraphicsEngineRenderRenderTargetCache.cpp + * @brief Implementation of class for render targets cache + * + */ + +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace GraphicsEngine +{ + +StubAttachmentCache::StubAttachmentCache(Render *pRender, EngineModel::StubAttachment* pStubAttachment): + RenderCache(pRender), + _width(1), + _height(1), + _pStubAttachment(pStubAttachment), + _id(0) +{ +} + +StubAttachmentCache::~StubAttachmentCache(void) +{ + +} + +void +StubAttachmentCache::DropCache(void) +{ + _id = 0; + return; +} + +void +StubAttachmentCache::DestroyCache(void) +{ + if (_pStubAttachment) + { + _pStubAttachment->SetCache(StubAttachmentCachePtr()); + } + + _pStubAttachment = null; + + if (_id) + { + glDeleteRenderbuffers(1, &_id); + } + + return; +} + +void +StubAttachmentCache::Die(void) +{ + _pStubAttachment = null; + RenderCache::Die(); + return; +} + +void +StubAttachmentCache::Validate(Render* pRender) +{ + if (!_invalid) + { + return; + } + if (!_pStubAttachment) + { + return; + } + + if (!_id) + { + glGenRenderbuffers(1, &_id); + } + + glBindRenderbuffer(GL_RENDERBUFFER, _id); + glRenderbufferStorage(GL_RENDERBUFFER, RenderTextureCache::GetGlInternalFormat(_pStubAttachment->GetInternalFormat()), _width, _height); + + _invalid = false; + return; +} + +void +StubAttachmentCache::AttachToFrameBuffer(Render* pRender, GLenum attachment, GLuint width, GLuint height) +{ + if (width != _width || height != _height) + { + _width = width; + _height = height; + Invalidate(); + } + if (_invalid) + { + Validate(pRender); + } + glFramebufferRenderbuffer(GL_FRAMEBUFFER, attachment, GL_RENDERBUFFER, _id); + return; +} + + +Texture2dAttachmentCache::Texture2dAttachmentCache(Render *pRender, EngineModel::Texture2dAttachmentProperty* pTexture2DAttachmentProperty): + RenderCache(pRender), + _width(1), + _height(1), + _pTexture2DAttachmentProperty(pTexture2DAttachmentProperty), + _id(0) +{ +} + +Texture2dAttachmentCache::~Texture2dAttachmentCache(void) +{ + +} + +void +Texture2dAttachmentCache::DropCache(void) +{ + _id = 0; + return; +} + +void +Texture2dAttachmentCache::Die(void) +{ + _pTexture2DAttachmentProperty = null; + RenderCache::Die(); + return; +} + +void +Texture2dAttachmentCache::DestroyCache(void) +{ + if (_pTexture2DAttachmentProperty) + { + _pTexture2DAttachmentProperty->SetCache(Texture2DAttachmentCachePtr()); + } + + _pTexture2DAttachmentProperty = null; + + if (_id) + { + glDeleteTextures(1, &_id); + } + + return; +} + +void +Texture2dAttachmentCache::Validate(Render* pRender) +{ + Validate(pRender, 0); + return; +} + +void +Texture2dAttachmentCache::Validate(Render* pRender, GLuint stage) +{ + if (!_invalid) + { + return; + } + if (!_pTexture2DAttachmentProperty) + { + return; + } + if (!_id) + { + glGenTextures(1, &_id); + } + + glActiveTexture(GL_TEXTURE0 + stage); + glBindTexture(GL_TEXTURE_2D, _id); + + GLenum internalFormat = RenderTextureCache::GetGlInternalFormat(_pTexture2DAttachmentProperty->GetInternalFormat()); + GLenum dataFormat = RenderTextureCache::GetGlDataFormat(_pTexture2DAttachmentProperty->GetDataFormat()); + GLenum dataType = RenderTextureCache::GetGlDataType(_pTexture2DAttachmentProperty->GetDataType()); + + glTexImage2D(GL_TEXTURE_2D, 0, internalFormat, + static_cast(_width), + static_cast(_height), + 0, dataFormat, dataType, null); + + if (_pTexture2DAttachmentProperty->GetGenerateMipmaps()) + { + glGenerateMipmap(GL_TEXTURE_2D); + } + + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, RenderTextureCache::GetGlFilterType(_pTexture2DAttachmentProperty->GetMinFilter())); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, RenderTextureCache::GetGlFilterType(_pTexture2DAttachmentProperty->GetMagFilter())); + + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, RenderTextureCache::GetGlWrapType(_pTexture2DAttachmentProperty->GetWrapS())); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, RenderTextureCache::GetGlWrapType(_pTexture2DAttachmentProperty->GetWrapT())); + + glBindTexture(GL_TEXTURE_2D, 0); + + _invalid = false; + return; +} + +void +Texture2dAttachmentCache::AttachToFrameBuffer(Render* pRender, GLenum attachment, GLuint width, GLuint height, GLuint mipmap) +{ + if (width != _width || height != _height) + { + _width = width; + _height = height; + Invalidate(); + } + if (_invalid) + { + Validate(pRender, 0); + } + glFramebufferTexture2D(GL_FRAMEBUFFER, attachment, GL_TEXTURE_2D, _id, mipmap); + return; +} + +void +Texture2dAttachmentCache::Bind(Render* pRender, GLuint stage) +{ + if (_invalid) + { + Validate(pRender, stage); + } + + glActiveTexture(GL_TEXTURE0 + stage); + glBindTexture(GL_TEXTURE_2D, _id); + return; +} + + +RenderTargetExternalRenderCache::RenderTargetExternalRenderCache(Render *pRender, EngineModel::RenderTargetExternalRender* pRenderTargetExternalRender) + : RenderCache(pRender) + , _pRenderTargetExternalRender(pRenderTargetExternalRender) + , _id(0) + , _ppp(0) + , _numColorBuffers(static_cast(0)) +{ + memset(_colorBuffers, 0, EngineModel::RenderTarget::Attachment::ATTACHMENT_MAX * sizeof(GLenum)); +} + +RenderTargetExternalRenderCache::~RenderTargetExternalRenderCache(void) +{ + +} + +void +RenderTargetExternalRenderCache::DropCache(void) +{ + _id = 0; + return; +} + +void +RenderTargetExternalRenderCache::Die(void) +{ + _pRenderTargetExternalRender = null; + RenderCache::Die(); + return; +} + +void +RenderTargetExternalRenderCache::DestroyCache(void) +{ + if (_pRenderTargetExternalRender) + { + _pRenderTargetExternalRender->SetCache(RenderTargetExternalRenderCachePtr()); + } + + _pRenderTargetExternalRender = null; + + if (_id) + { + glDeleteFramebuffers(1, &_id); + } + + return; +} + +namespace +{ +#ifdef _EFFECTS_GRAPHICSENGINE_OPENGL_DESKTOP_ + GLenum _attachments[] = {GL_COLOR_ATTACHMENT0, GL_COLOR_ATTACHMENT1, GL_COLOR_ATTACHMENT2, GL_COLOR_ATTACHMENT3, + GL_COLOR_ATTACHMENT4, GL_COLOR_ATTACHMENT5, GL_COLOR_ATTACHMENT6, GL_COLOR_ATTACHMENT7, + GL_DEPTH_ATTACHMENT, GL_STENCIL_ATTACHMENT}; +#endif + +#ifdef _EFFECTS_GRAPHICSENGINE_OPENGL_ES_ + GLenum _attachments[] = {GL_COLOR_ATTACHMENT0, GL_COLOR_ATTACHMENT0, GL_COLOR_ATTACHMENT0, GL_COLOR_ATTACHMENT0, + GL_COLOR_ATTACHMENT0, GL_COLOR_ATTACHMENT0, GL_COLOR_ATTACHMENT0, GL_COLOR_ATTACHMENT0, + GL_DEPTH_ATTACHMENT, GL_STENCIL_ATTACHMENT}; +#endif +} + +void +RenderTargetExternalRenderCache::Validate(Render* pRender) +{ + if (!_invalid) + { + return; + } + if (!_pRenderTargetExternalRender) + { + return; + } + if (!_id) + { + glGenFramebuffers(1, &_id); + } + _numColorBuffers = 0; + glBindFramebuffer(GL_FRAMEBUFFER, _id); + + GLuint width = _pRenderTargetExternalRender->GetWidth(); + GLuint height = _pRenderTargetExternalRender->GetHeight(); + + for (unsigned short i = EngineModel::RenderTarget::Attachment::COLOR_0; + EngineModel::RenderTarget::Attachment::STENCIL > i; ++i) + { + const EngineModel::RenderTarget::AttachInfo* pAttachment = _pRenderTargetExternalRender->GetAttachment(static_cast(i)); + if (null == pAttachment) + { + continue; + } + switch (pAttachment->textureType) + { + case EngineModel::RenderTarget::AttachInfo::TEXTURE_2D: + { + EngineModel::Texture2dAttachmentProperty* texture = pAttachment->textureInfo.texture2D.pTexture; + Texture2dAttachmentCache* textureTarget = static_cast(System::GetImpl(texture->GetCache())); + if (!textureTarget) + { + pRender->BuildCache(*texture, 0); + textureTarget = static_cast(System::GetImpl(texture->GetCache())); + } + textureTarget->AttachToFrameBuffer(pRender, _attachments[i], width, height, static_cast(pAttachment->textureInfo.texture2D.mipLevel)); + break; + } + case EngineModel::RenderTarget::AttachInfo::STUB: + { + EngineModel::StubAttachment* stub = pAttachment->textureInfo.stub.pStub; + StubAttachmentCache* stubTarget = static_cast(System::GetImpl(stub->GetCache())); + if (!stubTarget) + { + pRender->BuildCache(*stub); + stubTarget = static_cast(System::GetImpl(stub->GetCache())); + } + stubTarget->AttachToFrameBuffer(pRender, _attachments[i], width, height); + break; + } + default: + continue; + } + if (i < EngineModel::RenderTarget::Attachment::DEPTH) + { + _colorBuffers[_numColorBuffers] = _attachments[i]; + ++_numColorBuffers; + } + } + + glBindFramebuffer(GL_FRAMEBUFFER, 0); + + _invalid = false; + return; +} + +void +RenderTargetExternalRenderCache::Draw(Render* pRender) +{ + if (!_pRenderTargetExternalRender->GetExternalRender()->NeedRedraw()) + { + return; + } + if (_invalid) + { + Validate(pRender); + } + glBindFramebuffer(GL_FRAMEBUFFER , _id); +#ifdef _EFFECTS_GRAPHICSENGINE_OPENGL_DESKTOP_ + +#endif + _pRenderTargetExternalRender->GetExternalRender()->Draw(); + return; +} + +}}}}} // Tizen::Ui::Effects::_Renderer::GraphicsEngine diff --git a/src/ui/effects/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderShaderCache.cpp b/src/ui/effects/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderShaderCache.cpp new file mode 100644 index 0000000..7536614 --- /dev/null +++ b/src/ui/effects/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderShaderCache.cpp @@ -0,0 +1,385 @@ +// +// 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 FUiEffects_RendererGraphicsEngineRenderShaderCache.cpp + * @brief Implementation of class for render shaders cache + * + */ + +#include + +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace GraphicsEngine +{ + +GLenum +RenderShaderCache::GetShaderType(Tizen::Ui::Effects::_Renderer::EngineModel::ShaderProperty::ShaderType::Value shaderType) +{ + switch (shaderType) + { + case EngineModel::ShaderProperty::ShaderType::VERTEX: + return GL_VERTEX_SHADER; + case EngineModel::ShaderProperty::ShaderType::FRAGMENT: + return GL_FRAGMENT_SHADER; + } + return GL_VERTEX_SHADER; +} + +bool +RenderShaderCache::IsBinary(Tizen::Ui::Effects::_Renderer::EngineModel::ShaderProperty::DataType::Value dataType) +{ + if (dataType == EngineModel::ShaderProperty::DataType::BINARY_DATA) + { + return true; + } + + return false; +} + +RenderShaderCache::RenderShaderCache(Render *pRender, EngineModel::ShaderProperty* pShader): + RenderCache(pRender), + _shaderId(0), + _pShader(pShader) +{ +} + +RenderShaderCache::~RenderShaderCache(void) +{ + +} + +void +RenderShaderCache::DropCache(void) +{ + _shaderId = 0; + return; +} + +void +RenderShaderCache::Die(void) +{ + _pShader = null; + RenderCache::Die(); + return; +} + +void +RenderShaderCache::DestroyCache(void) +{ + if (_pShader) + { + _pShader->SetCache(RenderShaderCachePtr()); + } + + _pShader = null; + + if (_shaderId) + { + glDeleteShader(_shaderId); + } + + return; +} + +void +RenderShaderCache::Validate(Render* pRender) +{ + if (!_invalid) + { + return; + } + if (null == _pShader) + { + return; + } + if (!_shaderId) + { + _shaderId = glCreateShader(GetShaderType(_pShader->GetShaderType())); + } + + if (!IsBinary(_pShader->GetDataType())) + { + const char* pData = (reinterpret_cast(_pShader->GetData())); + + glShaderSource(_shaderId, 1, &pData, null); + glCompileShader(_shaderId); + + GLint compiled = GL_FALSE; + glGetShaderiv(_shaderId, GL_COMPILE_STATUS, &compiled); + + if (!compiled) + { + int infologLength = 0; + int charsWritten = 0; + + glGetShaderiv(_shaderId, GL_INFO_LOG_LENGTH, &infologLength); + + if (infologLength > 0) + { + std::string infoLog(infologLength, '\0'); + + glGetShaderInfoLog(_shaderId, infologLength, &charsWritten, &infoLog[0]); + SysLogException(NID_UI_EFFECT, E_SYSTEM, "Shader compilation error: %s in \"%s\"", infoLog.c_str(), pData); + } + } + else + { + SysLog(NID_UI_EFFECT, "Shader was compiled successfully"); + } + } + _invalid = false; + return; +} + +void +RenderShaderCache::AttachToProgram(Render* pRender, GLuint programId) +{ + if (_invalid) + { + Validate(pRender); + } + + glAttachShader(programId, _shaderId); + + return; +} + +RenderProgramCache::RenderProgramCache(Render* pRender, EngineModel::ProgramProperty* pProgram) + : RenderCache(pRender) + , _attributes() + , _uniforms() + , _programId(0) + , _pVertexShader(null) + , _pFragmentShader(null) + , _pProgram(pProgram) +{ +} + +RenderProgramCache::~RenderProgramCache(void) +{ + +} + +void +RenderProgramCache::DropCache(void) +{ + _programId = 0; + return; +} + +void +RenderProgramCache::Die(void) +{ + _pProgram = null; + RenderCache::Die(); + return; +} + +void +RenderProgramCache::DestroyCache(void) +{ + if (_pProgram) + { + _pProgram->SetCache(RenderProgramCachePtr()); + } + + _pProgram = null; + + if (_programId) + { + glDeleteProgram(_programId); + } + + return; +} + +void +RenderProgramCache::Validate(Render* pRender) +{ + if (!_invalid) + { + return; + } + if (!_pProgram) + { + return; + } + + EngineModel::ShaderPropertyPtr vertexShaderProperty = _pProgram->GetShader(Tizen::Ui::Effects::_Renderer::EngineModel::ShaderProperty::ShaderType::VERTEX); + if (!vertexShaderProperty) + { + return; + } + + _pVertexShader = static_cast(System::GetImpl(vertexShaderProperty->GetCache())); + if (!_pVertexShader) + { + pRender->BuildCache(*System::GetImpl(vertexShaderProperty)); + _pVertexShader = static_cast(System::GetImpl(vertexShaderProperty->GetCache())); + } + + EngineModel::ShaderPropertyPtr fragmentShaderProperty = _pProgram->GetShader(Tizen::Ui::Effects::_Renderer::EngineModel::ShaderProperty::ShaderType::FRAGMENT); + if (!fragmentShaderProperty) + { + return; + } + _pFragmentShader = static_cast(System::GetImpl(fragmentShaderProperty->GetCache())); + if (!_pFragmentShader) + { + pRender->BuildCache(*System::GetImpl(fragmentShaderProperty)); + _pFragmentShader = static_cast(System::GetImpl(fragmentShaderProperty->GetCache())); + } + + if (_programId != 0) + { + glDeleteProgram(_programId); + } + + _programId = glCreateProgram(); + + _pVertexShader->AttachToProgram(pRender, _programId); + _pFragmentShader->AttachToProgram(pRender, _programId); + glLinkProgram(_programId); + + int isLinked = GL_FALSE; + glGetProgramiv(_programId, GL_LINK_STATUS, (int *)&isLinked); + + if (isLinked == GL_FALSE) + { + int infologLength = 0; + int charsWritten = 0; + + glGetProgramiv(_programId, GL_INFO_LOG_LENGTH, &infologLength); + + if (infologLength > 0) + { + std::string infoLog(infologLength, '\0'); + + glGetProgramInfoLog(_programId, infologLength, &charsWritten, &infoLog[0]); + SysLogException(NID_UI_EFFECT, E_SYSTEM, "Shader program linkage error: %s", infoLog.c_str()); + } + } + else + { + SysLog(NID_UI_EFFECT, "Compiled shader was linked successfully"); + } + + _attributes.clear(); + _uniforms.clear(); + + char nameBuffer[256]; + GLint nameLength = 0; + GLenum type = 0; + GLint size = 0; + + GLint numAttributes = 0; + glGetProgramiv(_programId, GL_ACTIVE_ATTRIBUTES, &numAttributes); + _attributes.resize(numAttributes); + for (GLint i = 0; numAttributes > i; ++i) + { + glGetActiveAttrib(_programId, i, 250, &nameLength, &size, &type, nameBuffer); + nameBuffer[nameLength] = 0; + _attributes[i].first.type = type; + _attributes[i].first.size = size; + _attributes[i].first.location = glGetAttribLocation(_programId, nameBuffer); + _attributes[i].second = nameBuffer; + } + + GLint numUniforms = 0; + glGetProgramiv(_programId, GL_ACTIVE_UNIFORMS, &numUniforms); + _uniforms.resize(numUniforms); + + for (GLint i = 0; numUniforms > i; ++i) + { + glGetActiveUniform(_programId, i, 250, &nameLength, &size, &type, nameBuffer); + nameBuffer[nameLength] = 0; + _uniforms[i].first.type = type; + _uniforms[i].first.size = size; + _uniforms[i].first.location = glGetUniformLocation(_programId, nameBuffer); + _uniforms[i].second = nameBuffer; + } + + _invalid = false; + return; +} + +void +RenderProgramCache::UseProgram(Render* pRender) +{ + if (_invalid) + { + Validate(pRender); + } + + glUseProgram(_programId); + + return; +} + +void +RenderProgramCache::EnableAttributes(Render*) +{ + const AttribuleListSizeType len = _attributes.size(); + for (AttribuleListSizeType i = 0; len > i; ++i) + { + glEnableVertexAttribArray(_attributes[i].first.location); + } + return; +} + +void +RenderProgramCache::DisableAttributes(Render*) +{ + const AttribuleListSizeType len = _attributes.size(); + for (AttribuleListSizeType i = 0; len > i; ++i) + { + glDisableVertexAttribArray(_attributes[i].first.location); + } + return; +} + +const RenderProgramCache::AttribuleListValueType& +RenderProgramCache::GetAttribute(AttribuleListSizeType aIndex) +{ + return _attributes[aIndex]; +} + +RenderProgramCache::AttribuleListSizeType +RenderProgramCache::GetNumAttributes(void) +{ + return _attributes.size(); +} + +const RenderProgramCache::UniformListValueType& +RenderProgramCache::GetUniform(UniformListSizeType aIndex) +{ + return _uniforms[aIndex]; +} + +RenderProgramCache::UniformListSizeType +RenderProgramCache::GetNumUniforms(void) +{ + return _uniforms.size(); +} + + +}}}}} // Tizen::Ui::Effects::_Renderer::GraphicsEngine diff --git a/src/ui/effects/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderStateCache.cpp b/src/ui/effects/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderStateCache.cpp new file mode 100644 index 0000000..6c710ea --- /dev/null +++ b/src/ui/effects/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderStateCache.cpp @@ -0,0 +1,136 @@ +// +// 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 FUiEffects_RendererGraphicsEngineRenderStateCache.cpp + * @brief Implementation of class for render states cache + * + */ + +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace GraphicsEngine +{ + +GLenum +RenderAlphaBlendCache::GetGlBlendFactor(Tizen::Ui::Effects::_Renderer::EngineModel::AlphaBlendProperty::BlendFactor::Value value) +{ + switch (value) + { + case EngineModel::AlphaBlendProperty::BlendFactor::ZERO: + return GL_ZERO; + case EngineModel::AlphaBlendProperty::BlendFactor::ONE: + return GL_ONE; + case EngineModel::AlphaBlendProperty::BlendFactor::SRC_COLOR: + return GL_SRC_COLOR; + case EngineModel::AlphaBlendProperty::BlendFactor::ONE_MINUS_SRC_COLOR: + return GL_ONE_MINUS_SRC_COLOR; + case EngineModel::AlphaBlendProperty::BlendFactor::DST_COLOR: + return GL_DST_COLOR; + case EngineModel::AlphaBlendProperty::BlendFactor::ONE_MINUS_DST_COLOR: + return GL_ONE_MINUS_DST_COLOR; + case EngineModel::AlphaBlendProperty::BlendFactor::SRC_ALPHA: + return GL_SRC_ALPHA; + case EngineModel::AlphaBlendProperty::BlendFactor::ONE_MINUS_SRC_ALPHA: + return GL_ONE_MINUS_SRC_ALPHA; + case EngineModel::AlphaBlendProperty::BlendFactor::DST_ALPHA: + return GL_DST_ALPHA; + case EngineModel::AlphaBlendProperty::BlendFactor::ONE_MINUS_DST_ALPHA: + return GL_ONE_MINUS_DST_ALPHA; + case EngineModel::AlphaBlendProperty::BlendFactor::CONSTANT_COLOR: + return GL_CONSTANT_COLOR; + case EngineModel::AlphaBlendProperty::BlendFactor::ONE_MINUS_CONSTANT_COLOR: + return GL_ONE_MINUS_CONSTANT_COLOR; + case EngineModel::AlphaBlendProperty::BlendFactor::CONSTANT_ALPHA: + return GL_CONSTANT_ALPHA; + case EngineModel::AlphaBlendProperty::BlendFactor::ONE_MINUS_CONSTANT_ALPHA: + return GL_ONE_MINUS_CONSTANT_ALPHA; + case EngineModel::AlphaBlendProperty::BlendFactor::SRC_ALPHA_SATURATE: + return GL_SRC_ALPHA_SATURATE; + } + ThrowJmp("RenderAlphaBlendCache::getGLBlendFactor: unknown blend factor"); +} + +RenderAlphaBlendCache::RenderAlphaBlendCache(Render* pRender, EngineModel::AlphaBlendProperty* pState) + : RenderStateCache(pRender) + , __pState(pState) + , __source(static_cast(0)) + , __destination(static_cast(0)) + , __isEnabled(false) +{ +} + +RenderAlphaBlendCache::~RenderAlphaBlendCache(void) +{ +} + +void +RenderAlphaBlendCache::Validate(Render* pRender) +{ + if (!_invalid) + { + return; + } + if (!__pState) + { + return; + } + if (!(__isEnabled = __pState->IsEnable())) + { + return; + } + __source = GetGlBlendFactor(__pState->GetSourceFactor()); + __destination = GetGlBlendFactor(__pState->GetDestinationFactor()); + _invalid = false; + return; +} + +void +RenderAlphaBlendCache::Set(Render* pRender) +{ + if (_invalid) + { + Validate(pRender); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + } + + if (!__pState->IsEnable()) + { + return; + } + + if (pRender->GetAlphaBlendSource() != __source || pRender->GetAlphaBlendDestination() != __destination) + { + glBlendFunc(__source, __destination); + } + + return; +} + +bool +RenderAlphaBlendCache::IsEnable(Render* pRender) +{ + if (_invalid) + { + Validate(pRender); + } + return __isEnabled; +} + +}}}}} // Tizen::Ui::Effects::_Renderer::GraphicsEngine diff --git a/src/ui/effects/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderTextureCache.cpp b/src/ui/effects/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderTextureCache.cpp new file mode 100644 index 0000000..3565146 --- /dev/null +++ b/src/ui/effects/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderTextureCache.cpp @@ -0,0 +1,278 @@ +// +// 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 FUiEffects_RendererGraphicsEngineRenderTextureCache.cpp + * @brief Implementation of class for render textures cache + * + */ + +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer { namespace GraphicsEngine +{ + +RenderTextureCache::RenderTextureCache(Render *aRender): + RenderCache(aRender), + _textureId(0) +{ +} + +RenderTextureCache::~RenderTextureCache() +{ +} + +void +RenderTextureCache::DropCache(void) +{ + _textureId = 0; + return; +} + +void +RenderTextureCache::DestroyCache(void) +{ + if (_textureId) + { + glDeleteTextures(1, &_textureId); + } + + return; +} + +GLenum +RenderTextureCache::GetGlInternalFormat(Tizen::Ui::Effects::_Renderer::EngineModel::TextureProperty::InternalFormat::Value internalFormat) +{ + switch (internalFormat) + { + case EngineModel::TextureProperty::InternalFormat::ONE_COMPONENT: + return 1; + case EngineModel::TextureProperty::InternalFormat::TWO_COMPONENTS: + return 2; + case EngineModel::TextureProperty::InternalFormat::THREE_COMPONENTS: + return 3; + case EngineModel::TextureProperty::InternalFormat::FOUR_COMPONENTS: + return 4; + case EngineModel::TextureProperty::InternalFormat::DEPTH_COMPONENT: + return GL_DEPTH_COMPONENT; + case EngineModel::TextureProperty::InternalFormat::DEPTH_COMPONENT_16: + return GL_DEPTH_COMPONENT16; + case EngineModel::TextureProperty::InternalFormat::DEPTH_COMPONENT_24: + ThrowJmp("GL_DEPTH_COMPONENT24 not allowed under GLES2"); + // fall through + case EngineModel::TextureProperty::InternalFormat::DEPTH_COMPONENT_32: + ThrowJmp("GL_DEPTH_COMPONENT32 not allowed under GLES2"); + // fall through + case EngineModel::TextureProperty::InternalFormat::RGB: + return GL_RGB; + case EngineModel::TextureProperty::InternalFormat::RGBA: + return GL_RGBA; + case EngineModel::TextureProperty::InternalFormat::BGRA: + return GL_BGRA; + } + return 1; +} + +GLenum +RenderTextureCache::GetGlDataFormat(Tizen::Ui::Effects::_Renderer::EngineModel::TextureProperty::DataFormat::Value dataFormat) +{ + switch (dataFormat) + { + case EngineModel::TextureProperty::DataFormat::RGB: + return GL_RGB; + case EngineModel::TextureProperty::DataFormat::BGR: + ThrowJmp("GL_BGR not allowed under GLES2"); + // fall through + case EngineModel::TextureProperty::DataFormat::RGBA: + return GL_RGBA; + case EngineModel::TextureProperty::DataFormat::BGRA: + return GL_BGRA_EXT; + case EngineModel::TextureProperty::DataFormat::LUMINANCE: + return GL_LUMINANCE; + case EngineModel::TextureProperty::DataFormat::LUMINANCE_ALPHA: + return GL_LUMINANCE_ALPHA; + } + ThrowJmp("RenderTextureCache::getGLDataFormat: unknown data format"); +} + +GLenum +RenderTextureCache::GetGlDataType(Tizen::Ui::Effects::_Renderer::EngineModel::TextureProperty::DataType::Value dataType) +{ + switch (dataType) + { + case EngineModel::TextureProperty::DataType::UNSIGNED_BYTE: + return GL_UNSIGNED_BYTE; + case EngineModel::TextureProperty::DataType::BYTE: + return GL_BYTE; + case EngineModel::TextureProperty::DataType::UNSIGNED_SHORT: + return GL_UNSIGNED_SHORT; + case EngineModel::TextureProperty::DataType::SHORT: + return GL_SHORT; + case EngineModel::TextureProperty::DataType::UNSIGNED_INT: + return GL_UNSIGNED_INT; + case EngineModel::TextureProperty::DataType::INT: + return GL_INT; + case EngineModel::TextureProperty::DataType::FLOAT: + return GL_FLOAT; + case EngineModel::TextureProperty::DataType::UNSIGNED_SHORT_565: + return GL_UNSIGNED_SHORT_5_6_5; + } + ThrowJmp("RenderTextureCache::getGLDataType: unknown data type"); +} + +GLenum +RenderTextureCache::GetGlFilterType(Tizen::Ui::Effects::_Renderer::EngineModel::TextureProperty::FilterType::Value filterType) +{ + switch (filterType) + { + case EngineModel::TextureProperty::FilterType::NEAREST: + return GL_NEAREST; + case EngineModel::TextureProperty::FilterType::LINEAR: + return GL_LINEAR; + case EngineModel::TextureProperty::FilterType::NEAREST_MIPMAP_NEAREST: + return GL_NEAREST_MIPMAP_NEAREST; + case EngineModel::TextureProperty::FilterType::LINEAR_MIPMAP_NEAREST: + return GL_LINEAR_MIPMAP_NEAREST; + case EngineModel::TextureProperty::FilterType::NEAREST_MIPMAP_LINEAR: + return GL_NEAREST_MIPMAP_LINEAR; + case EngineModel::TextureProperty::FilterType::LINEAR_MIPMAP_LINEAR: + return GL_LINEAR_MIPMAP_LINEAR; + } + ThrowJmp("RenderTextureCache::getGLFilterType: unknown filter type"); +} + +GLenum +RenderTextureCache::GetGlWrapType(Tizen::Ui::Effects::_Renderer::EngineModel::TextureProperty::WrapType::Value wrapType) +{ + switch (wrapType) + { + case EngineModel::TextureProperty::WrapType::CLAMP: + ThrowJmp("GL_CLAMP not allowed under GLES2"); + // fall through + case EngineModel::TextureProperty::WrapType::CLAMP_TO_BORDER: + ThrowJmp("GL_CLAMP_TO_BORDER not allowed under GLES2"); + // fall through + case EngineModel::TextureProperty::WrapType::CLAMP_TO_EDGE: + return GL_CLAMP_TO_EDGE; + case EngineModel::TextureProperty::WrapType::MIRRORED_REPEAT: + return GL_MIRRORED_REPEAT; + case EngineModel::TextureProperty::WrapType::REPEAT: + return GL_REPEAT; + } + ThrowJmp("RenderTextureCache::getGLWrapType: unknown wrap type"); +} + + +RenderTexture2dCache::RenderTexture2dCache(Render* pRender, EngineModel::Texture2dProperty* pTexture): + RenderTextureCache(pRender), + __pTexture(pTexture) +{ +} + +RenderTexture2dCache::~RenderTexture2dCache(void) +{ +} + +void +RenderTexture2dCache::Die(void) +{ + __pTexture = null; + RenderCache::Die(); + return; +} + +void +RenderTexture2dCache::DestroyCache(void) +{ + if (__pTexture) + { + __pTexture->SetCache(RenderTexture2DCachePtr()); + } + + __pTexture = null; + RenderTextureCache::DestroyCache(); + + return; +} + +void +RenderTexture2dCache::Validate(Render* pRender) +{ + Validate(pRender, 0); + return; +} + +void +RenderTexture2dCache::Validate(Render*, GLuint stage) +{ + if (!_invalid) + { + return; + } + if (!_textureId) + { + glGenTextures(1, &_textureId); + } + glActiveTexture(GL_TEXTURE0 + stage); + glBindTexture(GL_TEXTURE_2D, _textureId); + const size_t numMipMaps = __pTexture->GetNumMipmaps(); + + GLenum internalFormat = GetGlInternalFormat(__pTexture->GetInternalFormat()); + GLenum dataFormat = GetGlDataFormat(__pTexture->GetDataFormat()); + GLenum dataType = GetGlDataType(__pTexture->GetDataType()); + + for (size_t i = 0; numMipMaps > i; ++i) + { + glTexImage2D(GL_TEXTURE_2D, static_cast(i), internalFormat, + static_cast(__pTexture->GetWidth(i)), + static_cast(__pTexture->GetHeight(i)), + 0, dataFormat, dataType, + __pTexture->GetData(i)); + } + + if (__pTexture->GenerateMipmaps()) + { + glGenerateMipmap(GL_TEXTURE_2D); + } + + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GetGlFilterType(__pTexture->GetMinFilter())); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GetGlFilterType(__pTexture->GetMagFilter())); + + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GetGlWrapType(__pTexture->GetWrapS())); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GetGlWrapType(__pTexture->GetWrapT())); + + _invalid = false; + return; +} + +void +RenderTexture2dCache::Bind(Render* pRender, GLuint stage) +{ + if (_invalid) + { + Validate(pRender, stage); + } + else + { + glActiveTexture(GL_TEXTURE0 + stage); + glBindTexture(GL_TEXTURE_2D, _textureId); + } + return; +} + +}}}}} // Tizen::Ui::Effects::_Renderer::GraphicsEngine diff --git a/src/ui/effects/renderer/system/FUiEffects_RendererSystemData.cpp b/src/ui/effects/renderer/system/FUiEffects_RendererSystemData.cpp new file mode 100644 index 0000000..a300eed --- /dev/null +++ b/src/ui/effects/renderer/system/FUiEffects_RendererSystemData.cpp @@ -0,0 +1,36 @@ +// +// 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 FUiEffects_RendererSystemData.cpp + * @brief This file contains implementation of Data class + * + */ + + +#include + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer +{ +namespace System +{ + + + +}}}}} // Tizen::Ui::Effects::_Renderer::System diff --git a/src/ui/effects/renderer/system/FUiEffects_RendererSystemException.cpp b/src/ui/effects/renderer/system/FUiEffects_RendererSystemException.cpp new file mode 100644 index 0000000..8268bc7 --- /dev/null +++ b/src/ui/effects/renderer/system/FUiEffects_RendererSystemException.cpp @@ -0,0 +1,33 @@ +// +// 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 FUiEffects_RendererSystemException.cpp + * @brief Exceptions + * + */ + + +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer +{ +namespace System +{ + jmp_buf jumpBuffer; + +}}}}} // Tizen::Ui::Effects::_Renderer::System diff --git a/src/ui/effects/renderer/system/FUiEffects_RendererSystemPlatformDefine.cpp b/src/ui/effects/renderer/system/FUiEffects_RendererSystemPlatformDefine.cpp new file mode 100644 index 0000000..d11ff39 --- /dev/null +++ b/src/ui/effects/renderer/system/FUiEffects_RendererSystemPlatformDefine.cpp @@ -0,0 +1,51 @@ +// +// 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 FUiEffects_RendererSystemPlatformDefine.cpp + * @brief The platform's defines + * + */ + + +#include +#include + +namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer +{ +namespace System +{ + +const char* +GetPlatformName(void) +{ +#if defined(_EFFECTS_SYSTEM_WINDOWS_) + static const char* pResult = "Windows"; +#elif defined(_EFFECTS_SYSTEM_ANDROID_) + static const char* pResult = "Android"; +#elif defined(_EFFECTS_SYSTEM_SLP_) + static const char* pResult = "Samsung Linux Platform"; +#elif defined(_EFFECTS_SYSTEM_LINUX_) + static const char* pResult = "Generic Linux"; +#else + static const char* pResult = "Unknown"; +#endif + + return pResult; +} + +}}}}} // Tizen::Ui::Effects::_Renderer::System diff --git a/src/ui/effects/runtime/FUiEffects_RuntimeDirectionalLight.cpp b/src/ui/effects/runtime/FUiEffects_RuntimeDirectionalLight.cpp new file mode 100644 index 0000000..e645929 --- /dev/null +++ b/src/ui/effects/runtime/FUiEffects_RuntimeDirectionalLight.cpp @@ -0,0 +1,124 @@ +// +// 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 FUiEffects_RuntimeDirectionalLight.cpp + * @brief This file contains an implementation of DirectionalLight class methods + * + */ + +#include +#include + +using namespace Tizen::Ui::Effects::_Utils; +using namespace std; + +namespace Tizen { namespace Ui { namespace Effects { namespace _Runtime +{ + +DirectionalLight::DirectionalLight(const string& name) + : UnitLight(name) + , isDirectionChanged(false) + , __direction(0.f, 0.f, -1.f) +{ + +} + +DirectionalLight::DirectionalLight(bool enabled, + const string& name, + const Vec3f& colour, + float intensity, + const Vec3f& direction) + : UnitLight(enabled, name, colour, intensity) + , isDirectionChanged(false) + , __direction(direction) +{ + +} + + +DirectionalLight::~DirectionalLight(void) +{ + +} + +DirectionalLight* +DirectionalLight::CreateDirectionalLight(const string& name) +{ + DirectionalLight* pDirectionalLight = new (std::nothrow) DirectionalLight(name); + AddUnitLightToPool(pDirectionalLight); + return pDirectionalLight; +} + +DirectionalLight* +DirectionalLight::CreateDirectionalLight(bool isEnabled, + const string& name, + const Vec3f& colour, + float intensity, + const Vec3f& direction) +{ + DirectionalLight* pDirectionalLight = new (std::nothrow) DirectionalLight(isEnabled, + name, + colour, + intensity, + direction); + AddUnitLightToPool(pDirectionalLight); + return pDirectionalLight; +} + +const Vec3f& +DirectionalLight::GetDirection(void) const +{ + return __direction; +} + +void +DirectionalLight::SetDirection(const Tizen::Ui::Effects::_Utils::Vec3f& direction) +{ + SetDirection(direction.x, direction.y, direction.z); + return; +} + +void +DirectionalLight::SetDirection(float x, float y, float z) +{ + if (fabs(__direction.x - x) > EFFECT_EPSILONF + || fabs(__direction.y - y) > EFFECT_EPSILONF + || fabs(__direction.z - z) > EFFECT_EPSILONF) + { + __direction.x = x; + __direction.y = y; + __direction.z = z; + isDirectionChanged = true; + isSomethingChanged = true; + } + return; +} + +TypeUnitLight +DirectionalLight::GetType(void) const +{ + return TYPE_UNIT_LIGHT_DIRECTIONAL; +} + +void +DirectionalLight::ResetSigns(void) +{ + UnitLight::ResetSigns(); + isDirectionChanged = false; +} + +} } } } // Tizen::Ui::Effects::_Runtime diff --git a/src/ui/effects/runtime/FUiEffects_RuntimeEffectModel.cpp b/src/ui/effects/runtime/FUiEffects_RuntimeEffectModel.cpp new file mode 100644 index 0000000..f675482 --- /dev/null +++ b/src/ui/effects/runtime/FUiEffects_RuntimeEffectModel.cpp @@ -0,0 +1,708 @@ +// +// 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 FUiEffects_RuntimeEffectModel.cpp + * @brief This file contains an implementation of EffectModel class methods + * + */ + +#include +#include +#include +#include "../FUiEffects_EffectErrorMessages.h" +#include +#include +#include "FUiEffects_RuntimeEffectModel.h" +#include "FUiEffects_RuntimeModelSurface.h" +#include "FUiEffects_RuntimeGraphicalSurface.h" +#include "FUiEffects_RuntimeRenderDataScene.h" + +using namespace Tizen::Ui::Effects; +using namespace Tizen::Ui::Effects::_PhysicsEngine; +using namespace Tizen::Ui::Effects::_Utils; +using namespace std; + +namespace Tizen { namespace Ui { namespace Effects { namespace _Runtime +{ + +void +ModelSurfacesCollectionDeleter::operator()(TypeMSurfacesCollection* pMSurfacesCollection) +{ + TypeMSurfacesCollection::iterator it; + for (it = pMSurfacesCollection->begin(); it != pMSurfacesCollection->end(); ++it) + { + delete *it; + } + delete pMSurfacesCollection; +} + +EffectModel::EffectModel(long effectID_, + const std::string& name, + const char* pPathToScript, + IEffectModelListener* pEMListener, + EffectType effectType_, + TypeTimeEffect effectDuration_) + : __pScript(null) + , __pEMListener(pEMListener) + , __state(_EFFECT_STATE_INITIALIZING) + , __effectType(effectType_) + , __effectResult() + , __pMapElements(null) + , __pMapGSurface(null) + , __pMSurfacesCollection(null) + , __effectID(effectID_) + , __name(name) + , __effectTimePassed(0) + , __effectDuration(effectDuration_) + , __pRenderDataScene(null) +{ + __state = _EFFECT_STATE_RUNTIME_ERROR; + + unique_ptr pScript(new (std::nothrow) ScriptProcessing(pPathToScript, this)); + SysSecureTryReturnVoidResult(NID_UI_EFFECT, pScript.get() != null, E_OUT_OF_MEMORY, "%s", _UiEffectError::OUT_OF_MEMORY); + result res = GetLastResult(); + SysSecureTryReturnVoidResult(NID_UI_EFFECT, res == E_SUCCESS, res, "%s", GetErrorMessage(res)); + + unique_ptr pMSurfacesCollection(new (std::nothrow) TypeMSurfacesCollection, ModelSurfacesCollectionDeleter()); + SysSecureTryReturnVoidResult(NID_UI_EFFECT, pMSurfacesCollection.get() != null, E_OUT_OF_MEMORY, "%s", _UiEffectError::OUT_OF_MEMORY); + + unique_ptr pMapElements(new (std::nothrow) TypeMapElements); + SysSecureTryReturnVoidResult(NID_UI_EFFECT, pMapElements.get() != null, E_OUT_OF_MEMORY, "%s", _UiEffectError::OUT_OF_MEMORY); + + unique_ptr pMapGSurface(new (std::nothrow) TypeMapGSurface); + SysSecureTryReturnVoidResult(NID_UI_EFFECT, pMapGSurface.get() != null, E_OUT_OF_MEMORY, "%s", _UiEffectError::OUT_OF_MEMORY); + + unique_ptr pRenderDataScene(new (std::nothrow) RenderDataScene()); + SysSecureTryReturnVoidResult(NID_UI_EFFECT, pRenderDataScene.get() != null, E_OUT_OF_MEMORY, "%s", _UiEffectError::OUT_OF_MEMORY); + + __state = _EFFECT_STATE_INITIALIZING; + + __pScript = std::move(pScript); + __pMSurfacesCollection = std::move(pMSurfacesCollection); + __pMapElements = std::move(pMapElements); + __pMapGSurface = std::move(pMapGSurface); + __pRenderDataScene = std::move(pRenderDataScene); + + if (pEMListener == null) + { + SysSecureLogException(NID_UI_EFFECT, E_SYSTEM, "The pointer to EffectModelListener is null!"); + __state = _EFFECT_STATE_RUNTIME_ERROR; + } +} + +EffectModel::~EffectModel(void) +{ + +} + +void +EffectModel::AddModelSurface(ModelSurface* pMSurface) +{ + if (__state == _EFFECT_STATE_INITIALIZING) + { + __pMSurfacesCollection->push_back(pMSurface); + } + return; +} + +inline void +EffectModel::EffectInitialize(void) +{ + SysAssertf(__state == _EFFECT_STATE_FINISHING || __state == _EFFECT_STATE_INITIALIZING, _UiEffectError::INTERNAL_ERROR); + + __state = _EFFECT_STATE_INITIALIZING; + + TypeMSurfacesCollection::iterator it; + for (it = __pMSurfacesCollection->begin(); it != __pMSurfacesCollection->end(); ++it) + { + (*it)->Initialize(); + } + + InitEffectModel(); + return; +} + +int +EffectModel::Start(const EffectsVector& effectStartInfo) +{ + if (__state != _EFFECT_STATE_RUNNABLE) + { + return 1; + } + + __state = _EFFECT_STATE_STARTING; + + START_PROFILER(EFFLOG_SCRIPT) + if (!__pScript->OnEffectStart(effectStartInfo)) + { + Stop(true, false); + return 2; + } + END_PROFILER(EFFLOG_SCRIPT) + + //requesting a bitmap for each graphical surface to effect impl + RenderDataSurfaceCollection::const_iterator it; + for (it = __pRenderDataScene->GetRenderDataSurfaceCollection().begin(); it != __pRenderDataScene->GetRenderDataSurfaceCollection().end(); ++it) + { + START_PROFILER(EFFLOG_BITMAP) + if (!__pEMListener->OnBitmapRequested((*it)->bitmapId)) + { + Stop(true, false); + return 3; + } + END_PROFILER(EFFLOG_BITMAP) + } + + //sending event to effect impl about effect started + PROFILER_EXPR(__pEMListener->OnEffectStarted();, EFFLOG_OnEffectStarted); + + __state = _EFFECT_STATE_RUNNING; + return 0; +} + +void +EffectModel::Stop(bool isBreakdown, bool isInterruptedFromApplication) +{ + if (!isBreakdown) + { + if (__state != _EFFECT_STATE_RUNNING) + { + return; + } + + __state = _EFFECT_STATE_FINISHING; + if (isInterruptedFromApplication) + { + __effectResult.effectResult = EFFECT_RESULT_INTERRUPTED; + __effectResult.lastShownBitmapsId = LastShownBitmapIdCollection(1, -1); + } + __pEMListener->OnEffectFinished(__effectResult.effectResult, __effectResult.lastShownBitmapsId); + EffectInitialize(); + } + else + { + __state = _EFFECT_STATE_RUNTIME_ERROR; + __effectResult.effectResult = EFFECT_RESULT_ERROR; + __effectResult.lastShownBitmapsId = LastShownBitmapIdCollection(1, -1); + __pEMListener->OnEffectFinished(__effectResult.effectResult, __effectResult.lastShownBitmapsId); + } + return; +} + +void +EffectModel::Calculate(float dt) +{ + if (__state != _EFFECT_STATE_RUNNING) + { + return; + } + + __effectTimePassed += dt; + if (__effectTimePassed > __effectDuration && __effectDuration > std::numeric_limits::epsilon()) + { + __effectTimePassed = __effectDuration; + } + + START_PROFILER_AV(Calculate_calc_script, 50); + if (!__pScript->OnEffectCalculate(dt)) + { + Stop(true, false); + return; + } + END_PROFILER_AV(Calculate_calc_script); + + TypeMSurfacesCollection::iterator it; + START_PROFILER_AV(Calculate_calc_model, 50); + for (it = __pMSurfacesCollection->begin(); it != __pMSurfacesCollection->end(); ++it) + { + //physics calculations + (*it)->Calculate(dt); + } + END_PROFILER_AV(Calculate_calc_model); + + if (__effectType == EFFECT_TYPE_INTERACTIVE) + { + __effectResult = __pScript->IsEffectFinished(); + } + else if (__effectTimePassed >= __effectDuration && __effectDuration > std::numeric_limits::epsilon()) + { + __effectResult.effectResult = EFFECT_RESULT_FINISHED; + __effectResult.lastShownBitmapsId = LastShownBitmapIdCollection(1, 1); + } + + switch (__effectResult.effectResult) + { + case EFFECT_RESULT_FINISHED: + Stop(false, false); + break; + case EFFECT_RESULT_ERROR: + Stop(true, false); + break; + default: + break; + } + return; +} + +void +EffectModel::FeedTouchPressEvent(const TouchEventScript &pos3) +{ + SysSecureTryReturnVoidResult(NID_UI_EFFECT, __state == _EFFECT_STATE_RUNNING, E_INVALID_STATE, "%s", _UiEffectError::FEED_TOUCH_IS_BLOCKED, __effectID, __name.c_str()); + SysSecureTryReturnVoidResult(NID_UI_EFFECT, __effectType == EFFECT_TYPE_INTERACTIVE, E_OPERATION_FAILED, "%s", _UiEffectError::FEED_TOUCH_IS_BLOCKED, __effectID, __name.c_str()); + + if (!__pScript->OnTouchPressed(pos3)) + { + Stop(true, false); + SysSecureLogException(NID_UI_EFFECT, E_OPERATION_FAILED, "Runtime error in OnEffectsTouchPressed Script for Effect with Id = %i and name \"%s\" is appeared. Effect is blocked!", __effectID, __name.c_str()); + } + return; +} + +void +EffectModel::FeedTouchMoveEvent(const TouchEventScript &pos3) +{ + SysSecureTryReturnVoidResult(NID_UI_EFFECT, __state == _EFFECT_STATE_RUNNING, E_INVALID_STATE, "%s", _UiEffectError::FEED_TOUCH_IS_BLOCKED, __effectID, __name.c_str()); + SysSecureTryReturnVoidResult(NID_UI_EFFECT, __effectType == EFFECT_TYPE_INTERACTIVE, E_OPERATION_FAILED, "%s", _UiEffectError::FEED_TOUCH_IS_BLOCKED, __effectID, __name.c_str()); + + if (!__pScript->OnTouchMoved(pos3)) + { + Stop(true, false); + SysSecureLogException(NID_UI_EFFECT, E_OPERATION_FAILED, "Runtime error in OnEffectsTouchMoved Script for Effect with Id = %i and name \"%s\" is appeared. Effect is blocked!", __effectID, __name.c_str()); + } + return; +} + +void +EffectModel::FeedTouchReleaseEvent(const TouchEventScript &pos3) +{ + SysSecureTryReturnVoidResult(NID_UI_EFFECT, __state == _EFFECT_STATE_RUNNING, E_INVALID_STATE, "%s", _UiEffectError::FEED_TOUCH_IS_BLOCKED, __effectID, __name.c_str()); + SysSecureTryReturnVoidResult(NID_UI_EFFECT, __effectType == EFFECT_TYPE_INTERACTIVE, E_OPERATION_FAILED, "%s", _UiEffectError::FEED_TOUCH_IS_BLOCKED, __effectID, __name.c_str()); + + if (!__pScript->OnTouchReleased(pos3)) + { + Stop(true, false); + SysSecureLogException(NID_UI, E_OPERATION_FAILED, "Runtime error in OnEffectsTouchReleased Script for Effect with Id = %i and name \"%s\" is appeared. Effect is blocked!", __effectID, __name.c_str()); + } + return; +} + +void +EffectModel::FeedTouchDoublePressEvent(const TouchEventScript &pos3) +{ + SysSecureTryReturnVoidResult(NID_UI_EFFECT, __state == _EFFECT_STATE_RUNNING, E_INVALID_STATE, "%s", _UiEffectError::FEED_TOUCH_IS_BLOCKED, __effectID, __name.c_str()); + SysSecureTryReturnVoidResult(NID_UI_EFFECT, __effectType == EFFECT_TYPE_INTERACTIVE, E_OPERATION_FAILED, "%s", _UiEffectError::FEED_TOUCH_IS_BLOCKED, __effectID, __name.c_str()); + + if (!__pScript->OnTouchDoublePressed(pos3)) + { + Stop(true, false); + SysSecureLogException(NID_UI_EFFECT, E_OPERATION_FAILED, "Runtime error in OnEffectsTouchDoublePressed Script for Effect with Id = %i and name \"%s\" is appeared. Effect is blocked!", __effectID, __name.c_str()); + } + return; +} + +float +EffectModel::GetCalculationPeriodForTimer(void)const +{ + return __effectTimePassed; +} + +_EffectState +EffectModel::GetState(void)const +{ + return __state; +} + +EffectType +EffectModel::GetType(void)const +{ + return __effectType; +} + +bool +EffectModel::ScriptSetProperty(long objID, ElementProperty property, bool value) +{ + TypeMapElements::iterator it; + if (!FindElement(objID, it)) + { + return false; + } + return it->second->SetProperty(property, value); +} + +bool +EffectModel::ScriptSetProperty(long objID, ElementProperty property, LUA_NUMBER value) +{ + if (objID == 0) + { + bool res = true; + switch (property) + { + case N_EFFECT_DURATION: + __effectDuration = value; + break; + default: + res = false; + break; + } + return res; + } + + TypeMapElements::iterator it; + if (!FindElement(objID, it)) + { + return false; + } + return it->second->SetProperty(property, value); +} + +bool +EffectModel::ScriptSetProperty(long objID, ElementProperty property, const Vec3f &value) +{ + TypeMapElements::iterator it; + if (!FindElement(objID, it)) + { + return false; + } + return it->second->SetProperty(property, value); +} + +bool +EffectModel::ScriptSetPropertyGroup(long modelSurfaceID, GroupElements group, ElementProperty property, LUA_NUMBER value) +{ + TypeMSurfacesCollection::iterator it; + for (it = __pMSurfacesCollection->begin(); it != __pMSurfacesCollection->end(); ++it) + { + if ((*it)->GetId() == modelSurfaceID) + { + return (*it)->SetPropertyGroup(group, property, value); + } + } + return false; +} + +PropertyCast +EffectModel::ScriptGetDistanceFromGround(long modelSurfaceID) const +{ + PropertyCast propCast = {PropertyCast::NO_PROPERTY, {0} }; + TypeMSurfacesCollection::iterator it; + for (it = __pMSurfacesCollection->begin(); it != __pMSurfacesCollection->end(); ++it) + { + if ((*it)->GetId() == modelSurfaceID) + { + propCast.type = PropertyCast::NUMBER; + propCast.value.numberValue = (*it)->GetDistanceFromGround(); + return propCast; + } + } + propCast.type = PropertyCast::NO_PROPERTY; + return propCast; +} + +PropertyCast +EffectModel::ScriptGetProperty(long objID, ElementProperty property) const +{ + if (objID == 0) + { + PropertyCast propCast = {PropertyCast::NO_PROPERTY, {0}}; + switch (property) + { + case N_EFFECT_TIME_PASSED: + propCast.type = PropertyCast::NUMBER; + propCast.value.numberValue = __effectTimePassed; + break; + case N_EFFECT_DURATION: + propCast.type = PropertyCast::NUMBER; + propCast.value.numberValue = __effectDuration; + break; + default: + propCast.type = PropertyCast::NO_PROPERTY; + break; + } + return propCast; + } + + TypeMapElements::iterator it; + if (!FindElement(objID, it)) + { + PropertyCast propCast = {PropertyCast::NO_PROPERTY, {0} }; + propCast.type = PropertyCast::NO_PROPERTY; + return propCast; + } + else + { + return it->second->GetProperty(property); + } +} + +bool +EffectModel::ScriptUpdateBitmap(long graphicalSurfaceId, long bitmapId) +{ + TypeMapGSurface::iterator it; + if (!FindGraphicalSurface(graphicalSurfaceId, it)) + { + return false; + } + else + { + it->second->SetBitmapId(bitmapId); + } + return __pEMListener->OnBitmapRequested(bitmapId); +} + +RenderDataScene* +EffectModel::GetRenderingData(void) const +{ + return __pRenderDataScene.get(); +} + +PropertyCast +EffectModel::ScriptGetNearestPointsIds(long graphicalSurfaceId, Vec3f &position) const +{ + TypeMapGSurface::iterator it; + if (!FindGraphicalSurface(graphicalSurfaceId, it)) + { + PropertyCast propCast = {PropertyCast::BOOL, {false}}; + return propCast; + } + return it->second->GetNearestPointsIds(position); +} + +void +EffectModel::Construct(void) +{ + if (__state != _EFFECT_STATE_INITIALIZING) + { + return; + } + + TypeMSurfacesCollection::iterator it; + for (it = __pMSurfacesCollection->begin(); it != __pMSurfacesCollection->end(); ++it) + { + (*it)->Construct(__pMapElements.get(), __pMapGSurface.get(), &(__pRenderDataScene->__renderDataSurfaceCollection)); + } + + InitEffectModel(); + return; +} + +void +EffectModel::UpdateGraphicalSurfaces(void) +{ + if (__state == _EFFECT_STATE_RUNNING || __state == _EFFECT_STATE_STARTING || __state == _EFFECT_STATE_FINISHING) + { + TypeMSurfacesCollection::iterator it; + for ( it = __pMSurfacesCollection->begin(); it != __pMSurfacesCollection->end(); ++it ) + { + (*it)->UpdateGraphicalSurface(); + } + } + return; +} + +bool +EffectModel::ScriptRotateSurface(long graphicalSurfaceId, float angle, _Axis axis, _Point point, + float ax, float ay, float az, float x0, float y0, float z0) +{ + TypeMapGSurface::iterator it; + if (!FindGraphicalSurface(graphicalSurfaceId, it)) + { + return false; + } + else + { + return it->second->RotateSurface(angle, axis, point, + ax, ay, az, x0, y0, z0); + } +} + +bool +EffectModel::ScriptScaleSurface(long graphicalSurfaceId, float ax, float ay, float az, _Point point, + float x0, float y0, float z0) +{ + TypeMapGSurface::iterator it; + if (!FindGraphicalSurface(graphicalSurfaceId, it)) + { + return false; + } + else + { + return it->second->ScaleSurface(ax, ay, az, point, + x0, y0, z0); + } +} + +bool +EffectModel::ScriptMoveSurface(long graphicalSurfaceId, float x0, float y0, float z0) +{ + TypeMapGSurface::iterator it; + if (!FindGraphicalSurface(graphicalSurfaceId, it)) + { + return false; + } + else + { + it->second->MoveSurface(x0, y0, z0); + return true; + } +} + +bool +EffectModel::ScriptResetSurfaceTransformation(long graphicalSurfaceID) +{ + TypeMapGSurface::iterator it; + if (!FindGraphicalSurface(graphicalSurfaceID, it)) + { + return false; + } + else + { + it->second->ResetSurfaceTransformation(); + return true; + } +} + +bool +EffectModel::ScriptSetTransformationMatrix(long graphicalSurfaceID, const LuaMatrix4& luaMatrix4) +{ + TypeMapGSurface::iterator it; + if (!FindGraphicalSurface(graphicalSurfaceID, it)) + { + return false; + } + else + { + it->second->SetTransformationMatrix(luaMatrix4); + return true; + } +} + +inline bool +EffectModel::FindElement(long objID, TypeMapElements::iterator &it) const +{ + it = __pMapElements->find(objID); + return (it != __pMapElements->end()); +} + +inline bool +EffectModel::FindGraphicalSurface(long objID, TypeMapGSurface::iterator &it) const +{ + it = __pMapGSurface->find(objID); + return (it != __pMapGSurface->end()); +} + +inline void +EffectModel::InitEffectModel(void) +{ + __effectTimePassed = 0; + __effectResult.effectResult = static_cast(0); + __effectResult.lastShownBitmapsId = LastShownBitmapIdCollection(1, 1); + + if (!__pScript->Initialize()) + { + __state = _EFFECT_STATE_RUNTIME_ERROR; + } + else + { + __state = _EFFECT_STATE_RUNNABLE; + } + return; +} + +//lighting +bool +EffectModel::ScriptAddUnitLight(UnitLight& unitLight) +{ + return __pRenderDataScene->AddUnitLight(unitLight); +} + +bool +EffectModel::ScriptRemoveUnitLight(const string& name) +{ + return __pRenderDataScene->RemoveUnitLight(name); +} + +bool +EffectModel::ScriptRemoveAllUnitsLightType(TypeUnitLight typeUnitLight) +{ + return __pRenderDataScene->RemoveAllUnitsLightType(typeUnitLight); +} + +PropertyCast +EffectModel::ScriptGetUnitLight(const string& name) const +{ + return __pRenderDataScene->GetUnitLight(name); +} + +void +EffectModel::ScriptSetLightAmbientColour(const Vec3f& ambientColour) +{ + __pRenderDataScene->SetLightAmbientColour(ambientColour); + return; +} + +void +EffectModel::ScriptSetLightAmbientColour(float red, float green, float blue) +{ + __pRenderDataScene->SetLightAmbientColour(red, green, blue); + return; +} + +void +EffectModel::ScriptSetLightIntensity(float intensity) +{ + __pRenderDataScene->SetLightIntensity(intensity); + return; +} + +void +EffectModel::ScriptSetLightAttenuation(float attenuation) +{ + __pRenderDataScene->SetLightAttenuation(attenuation); + return; +} + +const Vec3f& +EffectModel::ScriptGetLightAmbientColour(void) const +{ + return __pRenderDataScene->GetLightAmbientColour(); +} + +float +EffectModel::ScriptGetLightIntensity(void) const +{ + return __pRenderDataScene->GetLightIntensity(); +} + +float +EffectModel::ScriptGetLightAttenuation(void) const +{ + return __pRenderDataScene->GetLightAttenuation(); +} +/////////////////////////////////////////////////// +long +EffectModel::GetId(void) const +{ + return __effectID; +} + +std::string +EffectModel::GetName(void) const +{ + return __name; +} + +} } } } // Tizen::Ui::Effects::_Runtime diff --git a/src/ui/effects/runtime/FUiEffects_RuntimeEffectModelScript.cpp b/src/ui/effects/runtime/FUiEffects_RuntimeEffectModelScript.cpp new file mode 100644 index 0000000..c3853c2 --- /dev/null +++ b/src/ui/effects/runtime/FUiEffects_RuntimeEffectModelScript.cpp @@ -0,0 +1,235 @@ +// +// 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 FUiEffects_RuntimeEffectModelScript.cpp + * @brief This file contains an implementation of EffectModelScript class methods + * + */ + +#include +#include +#include "FUiEffects_RuntimeEffectModelScript.h" +#include + +using namespace std; +using namespace Tizen::Ui::Effects; +using namespace Tizen::Ui::Effects::_Utils; + +namespace Tizen { namespace Ui { namespace Effects { namespace _Runtime +{ + +EffectModelScript::EffectModelScript(IEffectModelScript* pEModel) +{ + __pEModel = pEModel; + return; +} + +EffectModelScript::~EffectModelScript(void) +{ + return; +} + +PropertyCast +EffectModelScript::GetProperty(long objID, ElementProperty property) const +{ + return __pEModel->ScriptGetProperty(objID, property); +} + +bool +EffectModelScript::SetProperty(long objID, ElementProperty property, bool value) +{ + return __pEModel->ScriptSetProperty(objID, property, value); +} + +bool +EffectModelScript::SetProperty(long objID, ElementProperty property, LUA_NUMBER value) +{ + return __pEModel->ScriptSetProperty(objID, property, value); +} + +bool +EffectModelScript::SetProperty(long objID, ElementProperty property, const Vec3f &value) +{ + return __pEModel->ScriptSetProperty(objID, property, value); +} + +bool +EffectModelScript::SetPropertyGroup(long objID, GroupElements group, ElementProperty property, LUA_NUMBER value) +{ + return __pEModel->ScriptSetPropertyGroup(objID, group, property, value); +} + +PropertyCast +EffectModelScript::GetDistanceFromGround(long modelSurfaceID) const +{ + return __pEModel->ScriptGetDistanceFromGround(modelSurfaceID); +} + +bool +EffectModelScript::UpdateBitmap(long graphicalSurfaceID, long bitmapID) +{ + return __pEModel->ScriptUpdateBitmap(graphicalSurfaceID, bitmapID); +} + +PropertyCast +EffectModelScript::GetNearestPointsIds(long graphicalSurfaceID, Vec3f &position) const +{ + return __pEModel->ScriptGetNearestPointsIds(graphicalSurfaceID, position); +} + +PropertyCast +EffectModelScript::GetNearestPointsIds(long graphicalSurfaceID, float posX, float posY, float posZ) const +{ + Vec3f tempVec3(posX, posY, posZ); + return __pEModel->ScriptGetNearestPointsIds(graphicalSurfaceID, tempVec3); +} + +bool +EffectModelScript::RotateSurfaceN(long graphicalSurfaceID, float angle, _Axis axis, _Point point, + float ax, float ay, float az, float x0, float y0, float z0) +{ + return __pEModel->ScriptRotateSurface(graphicalSurfaceID, angle, axis, point, + ax, ay, az, x0, y0, z0); +} + +bool +EffectModelScript::RotateSurfaceV(long graphicalSurfaceID, float angle, _Axis axis, _Point point, + const Vec3f &axisArbit, const Vec3f &basePointArbit) +{ + return __pEModel->ScriptRotateSurface(graphicalSurfaceID, angle, axis, point, + axisArbit.x, axisArbit.y, axisArbit.z, basePointArbit.x, basePointArbit.y, basePointArbit.z); +} + +bool +EffectModelScript::ScaleSurface(long graphicalSurfaceID, float ax, float ay, float az, _Point point, + float x0, float y0, float z0) +{ + return __pEModel->ScriptScaleSurface(graphicalSurfaceID, ax, ay, az, point, + x0, y0, z0); +} + +bool +EffectModelScript::ScaleSurface(long graphicalSurfaceID, const Vec3f &multipliers, _Point point, + const Vec3f &basePopintArbit) +{ + return __pEModel->ScriptScaleSurface(graphicalSurfaceID, multipliers.x, multipliers.y, multipliers.z, point, + basePopintArbit.x, basePopintArbit.y, basePopintArbit.z); +} + +bool +EffectModelScript::MoveSurface(long graphicalSurfaceId, float x0, float y0, float z0) +{ + return __pEModel->ScriptMoveSurface(graphicalSurfaceId, x0, y0, z0); +} + +bool +EffectModelScript::MoveSurface(long graphicalSurfaceId, const Vec3f &pointTarget) +{ + return __pEModel->ScriptMoveSurface(graphicalSurfaceId, pointTarget.x, pointTarget.y, pointTarget.z); +} + +bool +EffectModelScript::ResetSurfaceTransformation(long graphicalSurfaceID) +{ + return __pEModel->ScriptResetSurfaceTransformation(graphicalSurfaceID); +} + +void +EffectModelScript::PrintLuaInfo(const char* pStr) +{ + SysLog(NID_UI_EFFECT, "%s", pStr); + return; +} + +bool +EffectModelScript::SetTransformationMatrix(long graphicalSurfaceID, const LuaMatrix4& luaMatrix4) +{ + return __pEModel->ScriptSetTransformationMatrix(graphicalSurfaceID, luaMatrix4); +} + +//lighting +bool +EffectModelScript::AddUnitLight(UnitLight& unitLight) +{ + return __pEModel->ScriptAddUnitLight(unitLight); +} + +bool +EffectModelScript::RemoveUnitLight(const std::string& name) +{ + return __pEModel->ScriptRemoveUnitLight(name); +} + +bool +EffectModelScript::RemoveAllUnitsLightType(TypeUnitLight typeUnitLight) +{ + return __pEModel->ScriptRemoveAllUnitsLightType(typeUnitLight); +} + +PropertyCast +EffectModelScript::GetUnitLight(const string& name) const +{ + return __pEModel->ScriptGetUnitLight(name); +} + +void +EffectModelScript::SetLightAmbientColour(const Vec3f& ambientColour) +{ + __pEModel->ScriptSetLightAmbientColour(ambientColour); + return; +} + +void +EffectModelScript::SetLightAmbientColour(float red, float green, float blue) +{ + __pEModel->ScriptSetLightAmbientColour(red, green, blue); + return; +} + +void +EffectModelScript::SetLightIntensity(float intensity) +{ + __pEModel->ScriptSetLightIntensity(intensity); + return; +} + +void +EffectModelScript::SetLightAttenuation(float attenuation) +{ + __pEModel->ScriptSetLightAttenuation(attenuation); + return; +} + +const Vec3f& +EffectModelScript::GetLightAmbientColour(void) const +{ + return __pEModel->ScriptGetLightAmbientColour(); +} + +float +EffectModelScript::GetLightIntensity(void) const +{ + return __pEModel->ScriptGetLightIntensity(); +} + +float +EffectModelScript::GetLightAttenuation(void) const +{ + return __pEModel->ScriptGetLightAttenuation(); +} + +} } } } // Tizen::Ui::Effects::_Runtime diff --git a/src/ui/effects/runtime/FUiEffects_RuntimeGraphicalSurface.cpp b/src/ui/effects/runtime/FUiEffects_RuntimeGraphicalSurface.cpp new file mode 100644 index 0000000..61027e7 --- /dev/null +++ b/src/ui/effects/runtime/FUiEffects_RuntimeGraphicalSurface.cpp @@ -0,0 +1,373 @@ +// +// 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 FUiEffects_RuntimeGraphicalSurface.cpp + * @brief This file contains an implementation of GraphicalSurface class methods + * + */ + +#include +#include +#include +#include "../FUiEffects_EffectErrorMessages.h" +#include "FUiEffects_RuntimeGraphicalSurface.h" + +using namespace Tizen::Ui::Effects; +using namespace Tizen::Ui::Effects::_Utils; + +namespace Tizen { namespace Ui { namespace Effects { namespace _Runtime +{ + +#define SIGN(x) (((x) >= 0) ? (1) : (-1)) + + +GraphicalSurface::GraphicalSurface(long objId, + long bitmapID, + float transpar) + : ElementSurface(objId) + , _pRenderData(null) + , __initTransparency(transpar) + , __initBitmapID(bitmapID) + , __initModelMtr(Mat4f::getIdentity()) +{ +} + +GraphicalSurface::~GraphicalSurface(void) +{ +} + +long +GraphicalSurface::GetBitmapId(void) const +{ + return _pRenderData->bitmapId; +} + +void +GraphicalSurface::SetBitmapId(long bitmapId) +{ + _pRenderData->bitmapId = bitmapId; + _pRenderData->bitmapIdChanged = true; + return; +} + +void +GraphicalSurface::Construct(TypeElemSurfaceCollection* pElemSurfaceCollection, RenderDataSurfaceCollection* pRenderDataSurfaceCollection) +{ + pRenderDataSurfaceCollection->push_back(_pRenderData.get()); + return; +} + +PropertyCast +GraphicalSurface::GetProperty(ElementProperty propName)const +{ + PropertyCast propCast = {PropertyCast::NO_PROPERTY, {0} }; + switch (propName) + { + case N_TRANSPARENCY: + propCast.value.numberValue = _pRenderData->transparency; + propCast.type = PropertyCast::NUMBER; + break; + default: + propCast.type = PropertyCast::NO_PROPERTY; + break; + } + return propCast; +} + +bool +GraphicalSurface::SetProperty(ElementProperty propName, bool propValue) +{ + return false; +} + +bool +GraphicalSurface::SetProperty(ElementProperty propName, LUA_NUMBER propValue) +{ + switch (propName) + { + case N_TRANSPARENCY: + _pRenderData->transparency = propValue; + _pRenderData->transparencyChanged = true; + return true; + break; + default: + return false; + break; + } +} + +bool +GraphicalSurface::SetProperty(ElementProperty propName, const Vec3f &propValue) +{ + return false; +} + +void +GraphicalSurface::Initialize(void) +{ + _pRenderData->transparency = __initTransparency; + _pRenderData->transparencyChanged = true; + _pRenderData->bitmapId = __initBitmapID; + _pRenderData->bitmapIdChanged = true; + _pRenderData->modelMtr = __initModelMtr; + _pRenderData->modelMtrChanged = true; + return; +} + +PropertyCast +GraphicalSurface::GetNearestPointsIds(Vec3f &position) const +{ + IndicesCollection::iterator itIndex; + IndicesCollection::iterator itIndex1; + IndicesCollection::iterator itIndex2; + IndicesCollection::iterator itIndex3; + std::list listIndeces; + //if there are no crossing with a triangle it returns nil (in scripts) + PropertyCast res = {PropertyCast::NO_PROPERTY, {0}}; + //Finds triangles from RenderData structure which are crossed by + //a ray with position (position.x, position.y) + for (itIndex = _pRenderData->indices.begin(); itIndex != _pRenderData->indices.end(); ) + { + SysAssertf(itIndex != _pRenderData->indices.end(), _UiEffectError::INTERNAL_ERROR); + itIndex1 = itIndex++; + + SysAssertf(itIndex != _pRenderData->indices.end(), _UiEffectError::INTERNAL_ERROR); + itIndex2 = itIndex++; + + SysAssertf(itIndex != _pRenderData->indices.end(), _UiEffectError::INTERNAL_ERROR); + itIndex3 = itIndex++; + + if (InTriangle(position, *itIndex1, *itIndex2, *itIndex3)) + { + listIndeces.push_back(itIndex1); + } + } + + if (listIndeces.empty()) + { + res.type = PropertyCast::NO_PROPERTY; + } + else + { + res.type = PropertyCast::VEC3; + + std::list::iterator itList; + IndicesCollection::iterator itList1; + IndicesCollection::iterator itList2; + IndicesCollection::iterator itList3; + float maxZ = 0.f; + IndicesCollection::iterator itVertexTriangle; + //Finds z-coordinates of crossing planes of triangles from RenderData structure with + //a ray (position.x, position.y) + for (itList = listIndeces.begin(); itList != listIndeces.end(); ++itList) + { + itList1 = *itList; + itList2 = *itList+1; + itList3 = *itList+2; + float curZ = ZInPlane(position, *itList1, *itList2, *itList3); + //finding maximal z-coordinate and storing corresponding triangle + if (maxZ < curZ || itList == listIndeces.begin()) + { + maxZ = curZ; + itVertexTriangle = *itList; + } + } + + position.z = maxZ; + } + + return res; +} + +bool +GraphicalSurface::InTriangle(const Vec3f &pos, short i1, short i2, short i3) const +{ + //If point pos and any triangle vertex lie on opposite sides relatively an other side, + //then point pos lies outside of triangle + + unsigned short i = 0; + unsigned short k = 0; + unsigned short p = 0; + float c = 0.f; + float c1 = 0.f; + for (short ic = 0; ic < 3; ic++) + { + if (ic == 0) + { + i = i1; + k = i2; + p = i3; + } + else if (ic == 1) + { + i = i2; + k = i1; + p = i3; + } + else + { + i = i3; + k = i1; + p = i2; + } + + const Vec3f &point1 = _pRenderData->vnt[k].pos; + const Vec3f &point2 = _pRenderData->vnt[p].pos; + const Vec3f &pointp = _pRenderData->vnt[i].pos; + + if (fabsf(point1.x - point2.x) > std::numeric_limits::epsilon()) + { + c = (pos.x - point2.x) * (point1.y - point2.y) / (point1.x - point2.x) + point2.y; + c1 = (pointp.x - point2.x) * (point1.y-point2.y) / (point1.x - point2.x) + point2.y; + if (SIGN(pos.y - c) != SIGN(pointp.y - c1)) + { + return false; + } + } + else if (fabsf(point1.y - point2.y) > std::numeric_limits::epsilon()) + { + c = (pos.y - point2.y) * (point1.x - point2.x) / (point1.y - point2.y) + point2.x; + c1 = (pointp.y - point2.y) * (point1.x-point2.x) / (point1.y - point2.y) + point2.x; + if (SIGN(pos.x - c) != SIGN(pointp.x - c1)) + { + return false; + } + } + else + { + return false; + } + } + return true; +} + +float +GraphicalSurface::ZInPlane(const Vec3f &pos, short i1, short i2, short i3) const +{ + //restoring the plane passing through 3 triangle vertexes + //z=Ax+By+C + //Kramer's method for solving the linear equations system with 3 equations and 3 variables is used + const Vec3f &p1 = _pRenderData->vnt[i1].pos; + const Vec3f &p2 = _pRenderData->vnt[i2].pos; + const Vec3f &p3 = _pRenderData->vnt[i3].pos; + + float delta = p1.x * p2.y + p3.x * p1.y + p2.x * p3.y - p3.x * p2.y - p1.x * p3.y - p2.x * p1.y; + float deltaA = p2.y * p1.z + p1.y * p3.z + p3.y * p2.z - p2.y * p3.z - p1.y * p2.z - p3.y * p1.z; + float deltaB = p1.x * p2.z + p3.x * p1.z + p2.x * p3.z - p3.x * p2.z - p2.x * p1.z - p1.x * p3.z; + float deltaC = p1.x * p2.y * p3.z + p3.x * p1.y * p2.z + p2.x * p3.y * p1.z - p3.x * p2.y * p1.z - p1.x * p3.y * p2.z - p2.x * p1.y * p3.z; + + float res = 0.f; + //if 3 triangle vertexes lie on vertical plane, returns maximal z-coordinate of one of these points + if (fabsf(delta) <= std::numeric_limits::epsilon()) + { + float t1 = p1.z; + float t2 = p2.z; + float t3 = p3.z; + res = (t1 >= t2 ? (t1 >= t3 ? t1 : t3) : (t2 >= t3 ? t2 : t3)); + } + else + { + float koefA = deltaA / delta; + float koefB = deltaB / delta; + float koefC = deltaC / delta; + + res = koefA * pos.x + koefB * pos.y + koefC; + } + return res; +} + +void +GraphicalSurface::ResetSurfaceTransformation(void) +{ + LuaMat4 matrix4; + _pRenderData->modelMtr = matrix4; + _pRenderData->modelMtrChanged = true; + return; +} + +void +GraphicalSurface::SetTransformationMatrix(const LuaMatrix4& luaMatrix4) +{ + _pRenderData->modelMtr = luaMatrix4; + _pRenderData->modelMtrChanged = true; + return; +} + +void +GraphicalSurface::MoveSurface(float x0, float y0, float z0) +{ + LuaMat4 matrix4(_pRenderData->modelMtr); + matrix4.Translate(x0, y0, z0); + + _pRenderData->modelMtr = matrix4; + _pRenderData->modelMtrChanged = true; + + return; +} + +bool +GraphicalSurface::ScaleSurface(float ax, float ay, float az, float x0, float y0, float z0) +{ + LuaMat4 matrix4(_pRenderData->modelMtr); + bool result = matrix4.Scale(ax, ay, az, x0, y0, z0); + + if (result) + { + _pRenderData->modelMtr = matrix4; + _pRenderData->modelMtrChanged = true; + } + return result; +} + +bool +GraphicalSurface::RotateSurface(float angle, _Axis axis, + float ax, float ay, float az, float x0, float y0, float z0) +{ + bool res = false; + + LuaMat4 matrix4(_pRenderData->modelMtr); + switch (axis) + { + case AXIS_X: + matrix4.RotateAroundAxisX(angle, x0, y0, z0); + res = true; + break; + case AXIS_Y: + matrix4.RotateAroundAxisY(angle, x0, y0, z0); + res = true; + break; + case AXIS_Z: + matrix4.RotateAroundAxisZ(angle, x0, y0, z0); + res = true; + break; + case AXIS_ARBITRARY: + res = matrix4.RotateAroundAxisArbitrary(angle, ax, ay, az, x0, y0, z0); + break; + default: + res = false; + break; + } + + if (res) + { + _pRenderData->modelMtr = matrix4; + _pRenderData->modelMtrChanged = true; + } + return res; +} + +} } } } // Tizen::Ui::Effects::_Runtime diff --git a/src/ui/effects/runtime/FUiEffects_RuntimeGraphicalSurfaceNurbs.cpp b/src/ui/effects/runtime/FUiEffects_RuntimeGraphicalSurfaceNurbs.cpp new file mode 100644 index 0000000..2b42723 --- /dev/null +++ b/src/ui/effects/runtime/FUiEffects_RuntimeGraphicalSurfaceNurbs.cpp @@ -0,0 +1,596 @@ +// +// 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 FUiEffects_RuntimeGraphicalSurfaceNurbs.cpp + * @brief This file contains an implementation of GraphicalSurfaceNurbs class methods + * + */ + +#include +#include +#include +#include +#include +#include "../FUiEffects_EffectErrorMessages.h" +#include +#include "FUiEffects_RuntimeGraphicalSurfaceNurbs.h" + +using namespace Tizen::Ui::Effects; +using namespace Tizen::Ui::Effects::_PhysicsEngine; +using namespace Tizen::Ui::Effects::_Utils; +using namespace std; + +namespace Tizen { namespace Ui { namespace Effects { namespace _Runtime +{ + +GraphicalSurfaceNurbs::GraphicalSurfaceNurbs(long objID, + long bitmapID_, + int dimCtrlX_, + int dimCtrlY_, + int orderX_, + int orderY_, + int dimGraphX_, + int dimGraphY_, + std::unique_ptr pKnotsX_, + std::unique_ptr pKnotsY_, + float transparency_) + : GraphicalSurface(objID, bitmapID_, transparency_) + , __dimGraphX(dimGraphX_), __dimGraphY (dimGraphY_) + , __dimCtrlX(dimCtrlX_), __dimCtrlY(dimCtrlY_) + , __orderX(orderX_), __orderY(orderY_) +{ + __pKnotsX = std::move(pKnotsX_); + __pKnotsY = std::move(pKnotsY_); + + if (__dimGraphX < 2) + { + __dimGraphX = 2; + } + if (__dimGraphY < 2) + { + __dimGraphY = 2; + } + + unique_ptr pPSurfaceNURBSCollection(new (std::nothrow) TypePSurfaceNURBSCollection); + SysTryReturnVoidResult(NID_UI_EFFECT, pPSurfaceNURBSCollection.get() != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + + unique_ptr pNURBSCoeffsCollection(new (std::nothrow) TypeNURBSCoeffsCollection); + SysTryReturnVoidResult(NID_UI_EFFECT, pNURBSCoeffsCollection.get() != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + + unique_ptr pRenderData(new (std::nothrow) RenderDataSurface(__dimGraphX * __dimGraphY, (__dimGraphX - 1) * (__dimGraphY - 1) * 6)); + SysTryReturnVoidResult(NID_UI_EFFECT, pRenderData.get() != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + + unique_ptr pCornerPointsGraphSurface(new (std::nothrow) TypeCornerGrapSurPointsCollection); + SysTryReturnVoidResult(NID_UI_EFFECT, pCornerPointsGraphSurface.get() != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + unique_ptr pCornerPointsPhysicalSurface(new (std::nothrow) TypeCornerPhysSurPointsCollection); + SysTryReturnVoidResult(NID_UI_EFFECT, pCornerPointsPhysicalSurface.get() != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + + unique_ptr pNearestPointsCollection(new (std::nothrow) TypeNearestPointsCollection); + SysTryReturnVoidResult(NID_UI_EFFECT, pNearestPointsCollection.get() != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + + __pPSurfaceNURBSCollection = std::move(pPSurfaceNURBSCollection); + __pPSurfaceNURBSCollection->resize(__dimCtrlX * __dimCtrlY); + __pNURBSCoeffsCollection = std::move(pNURBSCoeffsCollection); + _pRenderData = std::move(pRenderData); + __pCornerPointsGraphSurface = std::move(pCornerPointsGraphSurface); + __pCornerPointsPhysicalSurface = std::move(pCornerPointsPhysicalSurface); + __pNearestPointsCollection = std::move(pNearestPointsCollection); + + _pRenderData->bitmapId = bitmapID_; + _pRenderData->transparency = transparency_; + + TypeNURBSCoeffsCollection::size_type size = __dimCtrlX * __dimCtrlY * __dimGraphX * __dimGraphY; + __pNURBSCoeffsCollection->resize(size); + + __pNearestPointsCollection->resize(__dimCtrlX + __dimCtrlY - 1); + (*__pNearestPointsCollection)[0].reserve(1); + TypeNearestPointsCollection::size_type sizeNearest = __pNearestPointsCollection->size(); + for (TypeNearestPointsCollection::size_type i = 1, n = 0; i < sizeNearest; ++i) + { + if (i <= sizeNearest / 2) + { + n += 4; + } + else + { + n > 4 ? n -= 4 : n = 1; + } + (*__pNearestPointsCollection)[i].reserve(n); + } +} + +GraphicalSurfaceNurbs::~GraphicalSurfaceNurbs() +{ + +} + +void +GraphicalSurfaceNurbs::Construct(TypeElemSurfaceCollection* pElemSurfaceCollection, RenderDataSurfaceCollection* pRenderDataSurfaceCollection) +{ + //constructing the collection of pointers to physical (PointSurfaceNURBS) points + TypeElemSurfaceCollection::iterator it; + TypeElemSurfaceCollection::size_type counter = 0; + for (it = pElemSurfaceCollection->begin(); it != pElemSurfaceCollection->end(); ++it) + { + if ((*it)->GetType() == ESURFACE_POINT_SURFACE_NURBS) + { + PointSurfaceNurbs* p = dynamic_cast(*it); + SysAssertf(p != null, _UiEffectError::INTERNAL_ERROR); + SysAssertf(counter < static_cast(__dimCtrlX * __dimCtrlY), _UiEffectError::INTERNAL_ERROR); + (*__pPSurfaceNURBSCollection)[counter] = p; + ++counter; + } + } + SysAssertf(!__pPSurfaceNURBSCollection->empty(), _UiEffectError::INTERNAL_ERROR); + + //constructing the corners of graphical surface as rectangular area + __pCornerPointsGraphSurface->push_back(&_pRenderData->vnt[0].pos); + __pCornerPointsGraphSurface->push_back(&_pRenderData->vnt[__dimGraphX - 1].pos); + __pCornerPointsGraphSurface->push_back(&_pRenderData->vnt[_pRenderData->vnt.size() - __dimGraphX].pos); + __pCornerPointsGraphSurface->push_back(&_pRenderData->vnt[_pRenderData->vnt.size() - 1].pos); + + //constructing the corners of physical surface as rectangular area + __pCornerPointsPhysicalSurface->push_back(&(*__pPSurfaceNURBSCollection)[0]->GetPosition()); + __pCornerPointsPhysicalSurface->push_back(&(*__pPSurfaceNURBSCollection)[__dimCtrlX - 1]->GetPosition()); + __pCornerPointsPhysicalSurface->push_back(&(*__pPSurfaceNURBSCollection)[__pPSurfaceNURBSCollection->size() - __dimCtrlX]->GetPosition()); + __pCornerPointsPhysicalSurface->push_back(&(*__pPSurfaceNURBSCollection)[__pPSurfaceNURBSCollection->size() - 1]->GetPosition()); + + //--------the order of these two functions is not important------------- + //indices calculation for triangles + CalcIndices(); + //B-spline coefficients calculation + neglecting the coefficients which less then some threshold + CalculationNurbsCoefficients(); + //--------------------------------------------------------------------- + //Synchronizes the collections of graphical and physical points + recalculates of normals + //must be called after CalcIndices(); and CalculationNurbsCoefficients(); + Initialize(); //GraphicalSurface::Initialize() + Update() + //--------------------------------------------------------------------- + //calculates the texture coordinates + //must be called after Update(); + CalcTexCoords(); + //--------------------------------------------------------------------- + + //pRenderDataSurfaceCollection construction + GraphicalSurface::Construct(null, pRenderDataSurfaceCollection); + + return; +} + +void +GraphicalSurfaceNurbs::Initialize(void) +{ + GraphicalSurface::Initialize(); + Update(); + return; +} + +PropertyCast +GraphicalSurfaceNurbs::GetNearestPointsIds(Vec3f &position) const +{ + PropertyCast result = GraphicalSurface::GetNearestPointsIds(position); + if (result.type == PropertyCast::NO_PROPERTY) + { + return result; + } + else + { + float minR2 = 0.f; + TypePSurfaceNURBSCollection::iterator it; + TypePSurfaceNURBSCollection::iterator minIt; + for (it = __pPSurfaceNURBSCollection->begin(); it != __pPSurfaceNURBSCollection->end(); ++it) + { + const Vec3f &point = (*it)->GetPosition(); + float r2 = point.distanceSqr(position); + if (it == __pPSurfaceNURBSCollection->begin() || r2 < minR2) + { + minR2 = r2; + minIt = it; + } + } + + for (TypeNearestPointsCollection::size_type i = 0; i < __pNearestPointsCollection->size(); ++i) + { + (*__pNearestPointsCollection)[i].clear(); + } + + int minRow = (*minIt)->GetRow(); + int minCol = (*minIt)->GetCol(); + for (it = __pPSurfaceNURBSCollection->begin(); it != __pPSurfaceNURBSCollection->end(); ++it) + { + int row = (*it)->GetRow(); + int col = (*it)->GetCol(); + int radious = abs(row - minRow) + abs(col - minCol); + (*__pNearestPointsCollection)[radious].push_back((*it)->GetId()); + } + + result.type = PropertyCast::VECTOR_VECTOR; + result.value.vecVecValue = __pNearestPointsCollection.get(); + } + return result; +} + +void +GraphicalSurfaceNurbs::Calculate(float timeStep) +{ + return; +} + +ESurface +GraphicalSurfaceNurbs::GetType(void) const +{ + return ESURFACE_GRAPHICAL_SURFACE_NURBS; +} + +PropertyCast +GraphicalSurfaceNurbs::GetProperty(ElementProperty propName)const +{ + return GraphicalSurface::GetProperty(propName); +} + +bool +GraphicalSurfaceNurbs::SetProperty(ElementProperty propName, bool propValue) +{ + return GraphicalSurface::SetProperty(propName, propValue); +} + +bool +GraphicalSurfaceNurbs::SetProperty(ElementProperty propName, LUA_NUMBER propValue) +{ + return GraphicalSurface::SetProperty(propName, propValue); +} + +bool +GraphicalSurfaceNurbs::SetProperty(ElementProperty propName, const Tizen::Ui::Effects::_Utils::Vec3f &propValue) +{ + return GraphicalSurface::SetProperty(propName, propValue); +} + +void +GraphicalSurfaceNurbs::Update(void) +{ + VertexDataCollection::iterator itGraph; + unsigned long pointIndex = 0; + unsigned long dataPointsCount = __dimCtrlX * __dimCtrlY; + + for (itGraph = _pRenderData->vnt.begin(); itGraph != _pRenderData->vnt.end(); ++pointIndex, ++itGraph) + { + Vec3f &pos = itGraph->pos; + + //case of corner graphical points + //(the coordinates of corner points of graphical surface and physical surface should be same (see NURBS theory)) + //(there is some inaccuracy in NURBS weights calculation by reason of floating point values precision (whatever float or double)) + bool isCorner = false; + TypeCornerGrapSurPointsCollection::iterator itG = __pCornerPointsGraphSurface->begin(); + TypeCornerPhysSurPointsCollection::iterator itP = __pCornerPointsPhysicalSurface->begin(); + for (; itG != __pCornerPointsGraphSurface->end(); ++itG, ++itP) + { + if (&pos == *itG) + { + pos = **itP; + isCorner = true; + break; + } + } + if (isCorner) + { + continue; + } + + _DataPointWeight* pointWeight = &(*__pNURBSCoeffsCollection)[pointIndex * dataPointsCount]; + + pos.x = 0.0f; + pos.y = 0.0f; + pos.z = 0.0f; + + for (unsigned long ii = 0; ii < dataPointsCount && pointWeight->pPoint != null; ++ii, ++pointWeight) + { + float &weight = pointWeight->weight; + const Vec3f &dataPoint = *pointWeight->pPoint; + + pos.x += dataPoint.x * weight; + pos.y += dataPoint.y * weight; + pos.z += dataPoint.z * weight; + } + } + + //normals recalculation + CalcNormals(); + + _pRenderData->vertexDataChanged = true; + + return; +} + +float +GraphicalSurfaceNurbs::NurbsSingleBasisFunction(long i, long order, float u, const TypeKnots &knots) const +{ + if (order == 1) + { + if (u >= knots[i] && u < knots[i + 1]) + { + return 1.0f; + } + else + { + return 0.0f; + } + } + else + { + float result = 0.0f; + static float epsilon = std::numeric_limits::epsilon(); + + if (fabs(knots[i + order - 1] - knots[i]) > epsilon) + { + result = (u - knots[i])/(knots[i + order - 1] - knots[i]) * NurbsSingleBasisFunction(i, order - 1, u, knots); + } + + if (fabs((knots[i + order] - knots[i + 1])) > epsilon) + { + result += (knots[i + order] - u)/(knots[i + order] - knots[i + 1]) * NurbsSingleBasisFunction(i + 1, order - 1, u, knots); + } + + return result; + } +} + +float +GraphicalSurfaceNurbs::SummaryForNurbs(float u, float w) const +{ + float sum = 0.f; + TypePSurfaceNURBSCollection::iterator it = __pPSurfaceNURBSCollection->begin(); + for (int i1 = 0; i1 < __dimCtrlX; ++i1) + { + for (int j1 = 0; j1 < __dimCtrlY; ++j1) + { + SysAssertf(it != __pPSurfaceNURBSCollection->end(), _UiEffectError::INTERNAL_ERROR); + sum += (*it++)->GetWeight() * NurbsSingleBasisFunction(i1, __orderX, u, *__pKnotsX) * + NurbsSingleBasisFunction(j1, __orderY, w, *__pKnotsY); + } + } + return sum; +} + +void +GraphicalSurfaceNurbs::CalculationNurbsCoefficients(void) +{ + float du = 1.0f / (__dimGraphX - 1); + float dv = 1.0f / (__dimGraphY - 1); + + TypeNURBSCoeffsCollection::iterator itCoeff = __pNURBSCoeffsCollection->begin(); + + float v = 0.0f; + for (int kv = 0; kv < __dimGraphY; ++kv) + { + float u = 0.0f; + for (int ku = 0; ku < __dimGraphX; ++ku) + { + float sum = SummaryForNurbs(u, v); + + TypePSurfaceNURBSCollection::iterator itData = __pPSurfaceNURBSCollection->begin(); + + for (int j = 0; j < __dimCtrlY; ++j) + { + for (int i = 0; i < __dimCtrlX; ++i) + { + SysAssertf(itData != __pPSurfaceNURBSCollection->end(), _UiEffectError::INTERNAL_ERROR); + SysAssertf(itCoeff != __pNURBSCoeffsCollection->end(), _UiEffectError::INTERNAL_ERROR); + + (*itCoeff).weight = (*itData)->GetWeight() * NurbsSingleBasisFunction(i, __orderX, u, *__pKnotsX); + (*itCoeff).weight *= NurbsSingleBasisFunction(j, __orderY, v, *__pKnotsY) / sum; + (*itCoeff).pPoint = &(*itData)->GetPosition(); + ++itCoeff; + ++itData; + } + } + u += du; + } + v += dv; + } + + WeightsApplyThreshold(0.0001f); + + return; +} + +void +GraphicalSurfaceNurbs::WeightsApplyThreshold(float threshold) +{ + TypeNURBSCoeffsCollection::size_type graphicalPointsCount = __dimGraphX * __dimGraphY; + TypeNURBSCoeffsCollection::size_type dataPointsCount = __dimCtrlX * __dimCtrlY; + for (unsigned long pointIndex = 0; pointIndex < graphicalPointsCount; ++pointIndex) + { + long startW = pointIndex * dataPointsCount; + long endW = startW + dataPointsCount - 1; + + for (; startW <= endW; ++startW) + { + if (fabs((*__pNURBSCoeffsCollection)[startW].weight) <= threshold) + { + (*__pNURBSCoeffsCollection)[startW] = (*__pNURBSCoeffsCollection)[endW]; + (*__pNURBSCoeffsCollection)[endW].pPoint = null; + endW--; + startW--; + } + } + } + return; +} + +void +GraphicalSurfaceNurbs::CalcIndices(void) +{ + unsigned long dimGraphXm1 = __dimGraphX - 1; + unsigned long dimGraphYm1 = __dimGraphY - 1; + + IndicesCollection::iterator it = _pRenderData->indices.begin(); + + for (unsigned short i = 0; i < dimGraphYm1; ++i) + { + for (unsigned short j = 0, poffset = __dimGraphX * i; j < dimGraphXm1; ++j, ++poffset) + { + SysAssertf(it != _pRenderData->indices.end(), _UiEffectError::INTERNAL_ERROR); + (*it++) = poffset + __dimGraphX; + + SysAssertf(it != _pRenderData->indices.end(), _UiEffectError::INTERNAL_ERROR); + (*it++) = poffset + 1; + + SysAssertf(it != _pRenderData->indices.end(), _UiEffectError::INTERNAL_ERROR); + (*it++) = poffset; + + SysAssertf(it != _pRenderData->indices.end(), _UiEffectError::INTERNAL_ERROR); + (*it++) = poffset + __dimGraphX; + + SysAssertf(it != _pRenderData->indices.end(), _UiEffectError::INTERNAL_ERROR); + (*it++) = poffset + __dimGraphX + 1; + + SysAssertf(it != _pRenderData->indices.end(), _UiEffectError::INTERNAL_ERROR); + (*it++) = poffset + 1; + } + } + return; +} + +void +GraphicalSurfaceNurbs::CalcNormals(void) +{ + IndicesCollection::iterator itIndex = _pRenderData->indices.begin(); + + unsigned long triCount = (__dimGraphX - 1) * (__dimGraphY - 1) * 2; + std::vector triNormals; + triNormals.resize(triCount); + + //calc normals for each triangle + for (unsigned long i = 0; i < triCount; ++i) + { + SysAssertf(itIndex != _pRenderData->indices.end(), _UiEffectError::INTERNAL_ERROR); + const Vec3f &tempVec0 = _pRenderData->vnt[*itIndex++].pos; + + SysAssertf(itIndex != _pRenderData->indices.end(), _UiEffectError::INTERNAL_ERROR); + const Vec3f &tempVec1 = _pRenderData->vnt[*itIndex++].pos; + + SysAssertf(itIndex != _pRenderData->indices.end(), _UiEffectError::INTERNAL_ERROR); + const Vec3f &tempVec2 = _pRenderData->vnt[*itIndex++].pos; + + triNormals[i] = Vec3f::createCrossed(tempVec2 - tempVec0, tempVec1 - tempVec0); + triNormals[i].normalize(); + } + + itIndex = _pRenderData->indices.begin(); + + //not smoothed normals + for (unsigned long i = 0; i < triCount; ++i) + { + const Vec3f &norm = triNormals[i]; + _pRenderData->vnt[*itIndex++].norm = norm; + _pRenderData->vnt[*itIndex++].norm = norm; + _pRenderData->vnt[*itIndex++].norm = norm; + } + + return; +} + +void +GraphicalSurfaceNurbs::CalcTexCoords(void) +{ + //------------------------the size of model------------------------ + const Vec3f &posBegin = _pRenderData->vnt[0].pos; + unsigned int modelSizeX = _pRenderData->vnt[__dimGraphX - 1].pos.x - posBegin.x; + unsigned int modelSizeY = _pRenderData->vnt[_pRenderData->vnt.size() - 1].pos.y - posBegin.y; + //----------------------------------------------------------------- + + VertexDataCollection::iterator itVnt = _pRenderData->vnt.begin(); + for (; itVnt!=_pRenderData->vnt.end(); ++itVnt) + { + const Vec3f &posCur = itVnt->pos - posBegin; + itVnt->texcoords.x = posCur.x / modelSizeX; + itVnt->texcoords.y = posCur.y / modelSizeY; + } + return; +} + +inline bool +GraphicalSurfaceNurbs::DefinePointOnModel(_Point point, Vec3f &pointOnModel, + float x0, float y0, float z0) const +{ + switch (point) + { + case POINT_LEFT_TOP: + pointOnModel = *(*__pCornerPointsGraphSurface)[2]; + break; + case POINT_CENTER_TOP: + pointOnModel = (*(*__pCornerPointsGraphSurface)[2] + *(*__pCornerPointsGraphSurface)[3]) / 2.f; + break; + case POINT_RIGHT_TOP: + pointOnModel = *(*__pCornerPointsGraphSurface)[3]; + break; + case POINT_LEFT_CENTER: + pointOnModel = (*(*__pCornerPointsGraphSurface)[0] + *(*__pCornerPointsGraphSurface)[2]) / 2.f; + break; + case POINT_CENTER_CENTER: + pointOnModel = (*(*__pCornerPointsGraphSurface)[1] + *(*__pCornerPointsGraphSurface)[2]) / 2.f; + break; + case POINT_RIGHT_CENTER: + pointOnModel = (*(*__pCornerPointsGraphSurface)[1] + *(*__pCornerPointsGraphSurface)[3]) / 2.f; + break; + case POINT_LEFT_BOTTOM: + pointOnModel = *(*__pCornerPointsGraphSurface)[0]; + break; + case POINT_CENTER_BOTTOM: + pointOnModel = (*(*__pCornerPointsGraphSurface)[0] + *(*__pCornerPointsGraphSurface)[1]) / 2.f; + break; + case POINT_RIGHT_BOTTOM: + pointOnModel = *(*__pCornerPointsGraphSurface)[1]; + break; + case POINT_ARBITRARY: + pointOnModel.x = x0; + pointOnModel.y = y0; + pointOnModel.z = z0; + break; + default: + return false; + break; + } + + return true; +} + +bool +GraphicalSurfaceNurbs::RotateSurface(float angle, _Axis axis, _Point point, + float ax, float ay, float az, float x0, float y0, float z0) +{ + Vec3f tempPoint; + if (!DefinePointOnModel(point, tempPoint, x0, y0, z0)) + { + return false; + } + return GraphicalSurface::RotateSurface(angle, axis, ax, ay, az, tempPoint.x, tempPoint.y, tempPoint.z); +} + +bool +GraphicalSurfaceNurbs::ScaleSurface(float ax, float ay, float az, _Point point, + float x0, float y0, float z0) +{ + Vec3f tempPoint; + if (!DefinePointOnModel(point, tempPoint, x0, y0, z0)) + { + return false; + } + return GraphicalSurface::ScaleSurface(ax, ay, az, tempPoint.x, tempPoint.y, tempPoint.z); +} + +} } } } // Tizen::Ui::Effects::_Runtime diff --git a/src/ui/effects/runtime/FUiEffects_RuntimeLuaProcessing.cpp b/src/ui/effects/runtime/FUiEffects_RuntimeLuaProcessing.cpp new file mode 100644 index 0000000..6d7f4de --- /dev/null +++ b/src/ui/effects/runtime/FUiEffects_RuntimeLuaProcessing.cpp @@ -0,0 +1,246 @@ +// +// 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 FUiEffects_RuntimeLuaProcessing.cpp + * @brief This file contains an implementation of LuaProcessing class methods + * + */ +#include +#include +#include +#include +#include +#include +#include +#include <../runtime/lua-cpp-binding/tolua.h> +#include "FUiEffects_RuntimeLuaProcessing.h" +#include "../FUiEffects_EffectErrorMessages.h" + +using namespace std; + +namespace Tizen { namespace Ui { namespace Effects { namespace _Runtime +{ + +const char* LuaProcessing::__pStringLua = " function _MyFunction510693810(scene_) \n" + " scene = scene_ \n" + " end"; + +LuaProcessing::LuaProcessing(void) + : __pLua(null) + , __pEMScript(null) +{ +} + +LuaProcessing::LuaProcessing(const char* pPathToScript, IEffectModelScript* pEModel) + : __pLua(null) + , __pEMScript(null) +{ + std::unique_ptr pLua(luaL_newstate(), LuaClose()); + SysTryReturnVoidResult(NID_UI_EFFECT, pLua.get() != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + + luaL_openlibs(pLua.get()); + tolua__open(pLua.get()); + + static const char* errorString; + switch (luaL_loadfile(pLua.get(), pPathToScript)) + { + case 0: + SysLog(NID_UI_EFFECT, "LuaProcessing: File %s was opened successfully", pPathToScript); + break; + case LUA_ERRFILE: + SysLogException(NID_UI_EFFECT, E_FILE_NOT_FOUND, "LuaProcessing: Can not open/read the file %s", pPathToScript); + break; + case LUA_ERRSYNTAX: + errorString = lua_tostring(pLua.get(), -1); + errorString = (errorString == null ? "error null" : errorString); + SysLogException(NID_UI_EFFECT, E_PARSING_FAILED, "LuaProcessing: There is syntax error during pre-compilation of file %s: %s", pPathToScript, errorString); + break; + case LUA_ERRMEM: + SysLogException(NID_UI_EFFECT, E_OUT_OF_MEMORY, "LuaProcessing: There is memory allocation error while opening the file %s", pPathToScript); + break; + default: + SysLogException(NID_UI_EFFECT, E_FILE_NOT_FOUND, "LuaProcessing: There is unknown error while opening the file %s", pPathToScript); + break; + } + + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI_EFFECT, r == E_SUCCESS, r, GetErrorMessage(r)); + + int res = CallFunction("LuaProcessing", 0, LUA_MULTRET, pLua.get()); + SysTryReturnVoidResult(NID_UI_EFFECT, res == 0, GetLastResult(), GetErrorMessage(GetLastResult())); + + std::unique_ptr pEMScript(new (std::nothrow) EffectModelScript(pEModel)); + SysTryReturnVoidResult(NID_UI_EFFECT, pEMScript.get() != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + + //loading and performing the string __pStringLua + int resLoadString = luaL_dostring(pLua.get(), __pStringLua); + SysAssertf(resLoadString == 0, _UiEffectError::INTERNAL_ERROR); + lua_getfield(pLua.get(), LUA_GLOBALSINDEX, "_MyFunction510693810"); + tolua_pushusertype(pLua.get(), (void*)pEMScript.get(), "EffectModelScript"); + int resCallMyFun = lua_pcall(pLua.get(), 1, 0, 0); + SysAssertf(resCallMyFun == 0, _UiEffectError::INTERNAL_ERROR); + + __pLua = std::move(pLua); + __pEMScript = std::move(pEMScript); +} + +LuaProcessing::~LuaProcessing(void) +{ + +} + +inline bool +LuaProcessing::OnTouchEvent(const char* pFunName, const TouchEventScript& position) +{ + lua_getfield(__pLua.get(), LUA_GLOBALSINDEX, pFunName); + tolua_pushusertype(__pLua.get(), (void*)&position, "TouchEventScript"); + return (CallFunction(pFunName, 1, 0, __pLua.get()) == 0); +} + +bool +LuaProcessing::OnEffectStart(const EffectsVector& effectStartInfo) +{ + lua_getfield(__pLua.get(), LUA_GLOBALSINDEX, "OnEffectStart"); + + bool isVectorEmpty = false; + EffectsVector effectStartInfoTemp(effectStartInfo); + if (effectStartInfo.empty()) + { + isVectorEmpty = true; + effectStartInfoTemp.push_back(0.f); + } + + tolua_pushusertype(__pLua.get(), (void*)&effectStartInfoTemp, "EffectsVector"); + + if (isVectorEmpty) + { + effectStartInfoTemp.clear(); + } + + return (CallFunction("OnEffectStart", 1, 0, __pLua.get()) == 0); +} + +bool +LuaProcessing::OnEffectCalculate(float dt) +{ + lua_getfield(__pLua.get(), LUA_GLOBALSINDEX, "OnEffectCalculate"); + lua_pushnumber(__pLua.get(), dt); + return (CallFunction("OnEffectCalculate", 1, 0, __pLua.get()) == 0); +} + +bool +LuaProcessing::OnTouchPressed(const TouchEventScript &position) +{ + return OnTouchEvent("OnTouchPressed", position); +} + +bool +LuaProcessing::OnTouchDoublePressed(const TouchEventScript &position) +{ + return OnTouchEvent("OnTouchDoublePressed", position); +} + +bool +LuaProcessing::OnTouchMoved(const TouchEventScript& position) +{ + return OnTouchEvent("OnTouchMoved", position); +} + +bool +LuaProcessing::OnTouchReleased(const TouchEventScript& position) +{ + return OnTouchEvent("OnTouchReleased", position); +} + +EffectResultS +LuaProcessing::IsEffectFinished(void) +{ + EffectResultS effectRes; + + lua_getfield(__pLua.get(), LUA_GLOBALSINDEX, "IsEffectFinished"); + if (CallFunction("IsEffectFinished", 0, LUA_MULTRET, __pLua.get()) != 0) + { + effectRes.effectResult = EFFECT_RESULT_ERROR; + return effectRes; + } + + int returnsCount = lua_gettop(__pLua.get()); + effectRes.lastShownBitmapsId.clear(); + if (returnsCount == 0) + { + effectRes.effectResult = EFFECT_RESULT_ERROR; + return effectRes; + } + LUA_NUMBER res = lua_tonumber(__pLua.get(), 1); + for (int i = 2; i <= returnsCount; ++i) + { + effectRes.lastShownBitmapsId.push_back(lua_tonumber(__pLua.get(), i)); + } + lua_pop(__pLua.get(), returnsCount); + + _EffectResult tempRes = static_cast<_EffectResult>(res); + switch (tempRes) + { + case EFFECT_FINISHED: + effectRes.effectResult = EFFECT_RESULT_FINISHED; + break; + case EFFECT_CONTINUED: + effectRes.effectResult = static_cast(0); + break; + default: + effectRes.effectResult = EFFECT_RESULT_ERROR; + break; + } + return effectRes; +} + +bool +LuaProcessing::Initialize(void) +{ + lua_getfield(__pLua.get(), LUA_GLOBALSINDEX, "Initialize"); + return (CallFunction("Initialize", 0, 0, __pLua.get()) == 0); +} + +int +LuaProcessing::CallFunction(const char* pFunctionName, int argsCount, int resultsCount, lua_State* pLua) +{ + static const char* pStringError; + int res = lua_pcall(pLua, argsCount, resultsCount, 0); + switch (res) + { + case 0: + //SysLog(NID_UI_EFFECT, "LuaProcessing, %s: Script function was performed successfully", pFunctionName); + break; + case LUA_ERRRUN: + pStringError = lua_tostring(pLua, -1); + pStringError = (pStringError == null ? "error null" : pStringError); + SysLogException(NID_UI_EFFECT, E_SERVER, "LuaProcessing; %s: There is a runtime error in script: %s", pFunctionName, pStringError); + break; + case LUA_ERRMEM: + SysLogException(NID_UI_EFFECT, E_OUT_OF_MEMORY, "LuaProcessing; %s: There is memory allocation error while performing script", pFunctionName); + break; + case LUA_ERRERR: + SysLogException(NID_UI_EFFECT, E_SERVER, "LuaProcessing; %s: There is an error while running the error handler function for script", pFunctionName); + break; + default: + SysLogException(NID_UI_EFFECT, E_SERVER, "LuaProcessing; %s > There is an unknown error while performing script", pFunctionName); + break; + } + return res; +} + +} } } } // Tizen::Ui::Effects::_Runtime diff --git a/src/ui/effects/runtime/FUiEffects_RuntimeModelSurface.cpp b/src/ui/effects/runtime/FUiEffects_RuntimeModelSurface.cpp new file mode 100644 index 0000000..141ea94 --- /dev/null +++ b/src/ui/effects/runtime/FUiEffects_RuntimeModelSurface.cpp @@ -0,0 +1,335 @@ +// +// 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 FUiEffects_RuntimeModelSurface.cpp + * @brief This file contains an implementation of ModelSurface class methods + * + */ + +#include +#include "../FUiEffects_EffectErrorMessages.h" +#include +#include +#include +#include +#include +#include "FUiEffects_RuntimeModelSurface.h" +#include "FUiEffects_RuntimeGraphicalSurface.h" +#include "FUiEffects_RuntimeModel.h" +#include "FUiEffects_RuntimePropertyCast.h" + +using namespace Tizen::Ui::Effects::_PhysicsEngine; +using namespace Tizen::Ui::Effects::_Utils; +using namespace std; + +namespace Tizen { namespace Ui { namespace Effects { namespace _Runtime +{ + +void +ElementsSurfaceContainerDeleter::operator()(TypeElemSurfaceCollection* pElemSurfaceCollection) +{ + TypeElemSurfaceCollection::iterator it; + for (it = pElemSurfaceCollection->begin(); it != pElemSurfaceCollection->end(); ++it) + { + delete *it; + } + delete pElemSurfaceCollection; +} + +ModelSurface::ModelSurface(long objId, + unsigned short iterationCount_, + unsigned short modelSpeed_, + float envResistance_, + const Vec3f &gravityAccelerationIdentity_, + float gravityAccelerationValue_, + float groundLevel_) + : ElementSurface(objId) + , __pElemSurfaceCollection(null) + , __pGraphicalSurface(null) + , __iterationCount(iterationCount_) + , __modelSpeed(modelSpeed_) + , __envResistance(envResistance_) + , __gravityAccelerationIdentity(gravityAccelerationIdentity_) + , __gravityAccelerationValue(gravityAccelerationValue_) + , __gravityAccelerationVector(gravityAccelerationValue_ * gravityAccelerationIdentity_) + , __groundLevel(groundLevel_) + , __pPointsCollection(null) + , __pSpringsCollection(null) + , __pRodsCollection(null) +{ + unique_ptr pElemSurfaceCollection(new (std::nothrow) TypeElemSurfaceCollection, ElementsSurfaceContainerDeleter()); + SysTryReturnVoidResult(NID_UI_EFFECT, pElemSurfaceCollection.get() != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + + unique_ptr pPointsCollection(new (std::nothrow) TypePointSurfaceCollection); + SysTryReturnVoidResult(NID_UI_EFFECT, pPointsCollection.get() != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + unique_ptr pSpringsCollection(new (std::nothrow) TypeSpringSurfaceCollection); + SysTryReturnVoidResult(NID_UI_EFFECT, pSpringsCollection.get() != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + unique_ptr pRodsCollection(new (std::nothrow) TypeRodSurfaceCollection); + SysTryReturnVoidResult(NID_UI_EFFECT, pRodsCollection.get() != null, E_OUT_OF_MEMORY, _UiEffectError::OUT_OF_MEMORY); + + __pElemSurfaceCollection = std::move(pElemSurfaceCollection); + __pPointsCollection = std::move(pPointsCollection); + __pSpringsCollection = std::move(pSpringsCollection); + __pRodsCollection = std::move(pRodsCollection); +} + +ModelSurface::~ModelSurface(void) +{ + +} + +void +ModelSurface::Calculate(float timeStep) +{ + TypeElemSurfaceCollection::iterator it; + for (int j = 0; j < __modelSpeed; ++j) + { + for (int i = 0; i < __iterationCount; ++i) + { + for (it = __pElemSurfaceCollection->begin(); it != __pElemSurfaceCollection->end(); ++it ) + { + (*it)->Calculate(timeStep / __iterationCount); + } + } + } + return; +} + +PropertyCast +ModelSurface::GetProperty(ElementProperty propName)const +{ + PropertyCast propCast = {PropertyCast::NO_PROPERTY, {0}}; + switch (propName) + { + case N_NUMBER_ITERATIONS: + propCast.type = PropertyCast::NUMBER; + propCast.value.numberValue = __iterationCount; + break; + case N_MODEL_SPEED: + propCast.type = PropertyCast::NUMBER; + propCast.value.numberValue = __modelSpeed; + break; + case N_ENV_RESISTANCE: + propCast.type = PropertyCast::NUMBER; + propCast.value.numberValue = __envResistance; + break; + case N_GRAVITY_ACCEL_VALUE: + propCast.type = PropertyCast::NUMBER; + propCast.value.numberValue = __gravityAccelerationValue; + break; + case V_GRAVITY_ACCELERATION: + propCast.type = PropertyCast::VEC3; + propCast.value.vec3Value = &__gravityAccelerationVector; + break; + default: + propCast.type = PropertyCast::NO_PROPERTY; + break; + } + return propCast; +} + +bool +ModelSurface::SetProperty(ElementProperty propName, bool propValue) +{ + return false; +} + +bool +ModelSurface::SetProperty(ElementProperty propName, LUA_NUMBER propValue) +{ + switch (propName) + { + case N_NUMBER_ITERATIONS: + __iterationCount = propValue; + break; + case N_MODEL_SPEED: + __modelSpeed = propValue; + break; + case N_ENV_RESISTANCE: + __envResistance = propValue; + break; + case N_GRAVITY_ACCEL_VALUE: + __gravityAccelerationValue = propValue; + __gravityAccelerationVector = __gravityAccelerationValue * __gravityAccelerationIdentity; + break; + default: + return false; + break; + } + return true; +} + +bool +ModelSurface::SetProperty(ElementProperty propName, const Vec3f &propValue) +{ + switch (propName) + { + case V_GRAVITY_ACCELERATION: + __gravityAccelerationIdentity = propValue.getNormalized(); + __gravityAccelerationVector = __gravityAccelerationValue * __gravityAccelerationIdentity; + break; + default: + return false; + break; + } + + return true; +} + +bool +ModelSurface::SetPropertyGroup(GroupElements group, ElementProperty property, LUA_NUMBER value) +{ + switch (group) + { + case ALL_POINTS: + return SetPropertyGroup(__pPointsCollection.get(), property, value); + break; + case ALL_SPRINGS: + return SetPropertyGroup(__pSpringsCollection.get(), property, value); + break; + case ALL_RODS: + return SetPropertyGroup(__pRodsCollection.get(), property, value); + break; + default: + return false; + break; + } +} + +template bool +ModelSurface::SetPropertyGroup(T* pDataPointer, ElementProperty property, LUA_NUMBER value) +{ + TIter it; + TIter itBegin = pDataPointer->begin(); + TIter itEnd = pDataPointer->end(); + + if (pDataPointer->empty()) + { + return false; + } + + for (it = itBegin; it != itEnd; ++it) + { + if (!((*it)->SetProperty(property, value))) + { + return false; + } + } + return true; +} + +void +ModelSurface::Initialize(void) +{ + TypeElemSurfaceCollection::iterator it; + for (it = __pElemSurfaceCollection->begin(); it != __pElemSurfaceCollection->end(); ++it) + { + (*it)->Initialize(); + } + + __pGraphicalSurface->Initialize(); + + return; +} + +void +ModelSurface::AddGraphicalSurface(unique_ptr pGraphicalSurface) +{ + __pGraphicalSurface = std::move(pGraphicalSurface); + return; +} + +void +ModelSurface::AddElementSurface(ElementSurface* pElementSurface) +{ + __pElemSurfaceCollection->push_back(pElementSurface); + return; +} + +bool +ModelSurface::Construct(TypeMapElements* pMapElements, TypeMapGSurface* pMapGSurface, RenderDataSurfaceCollection* pRenderDataSurfaceCollection) +{ + pMapElements->insert(std::make_pair(this->GetId(), this)); + pMapElements->insert(std::make_pair(__pGraphicalSurface->GetId(), __pGraphicalSurface.get())); + pMapGSurface->insert(std::make_pair(__pGraphicalSurface->GetId(), __pGraphicalSurface.get())); + TypeElemSurfaceCollection::iterator it; + for (it = __pElemSurfaceCollection->begin(); it != __pElemSurfaceCollection->end(); ++it) + { + pMapElements->insert(std::make_pair((*it)->GetId(), *it)); + + if ((*it)->GetType() >= ESURFACE_POINT_SURFACE) + { + PointSurface* p = dynamic_cast(*it); + SysAssertf(p != null, _UiEffectError::INTERNAL_ERROR); + bool res = p->Construct(&__envResistance, &__gravityAccelerationVector, &__groundLevel); + SysTryReturn(NID_UI_EFFECT, res, false, E_SYSTEM, _UiEffectError::INTERNAL_ERROR); + + __pPointsCollection->push_back(p); + } + else if ((*it)->GetType() == ESURFACE_SPRING_SURFACE) + { + SpringSurface* p = dynamic_cast(*it); + SysAssertf(p != null, _UiEffectError::INTERNAL_ERROR); + __pSpringsCollection->push_back(p); + } + else if ((*it)->GetType() == ESURFACE_ROD_SURFACE) + { + RodSurface* p = dynamic_cast(*it); + SysAssertf(p != null, _UiEffectError::INTERNAL_ERROR); + __pRodsCollection->push_back(p); + } + } + + //constructing the collection of pointers to physical points (PointSurfaceNURBS) and + //constructing data collection for rendering + __pGraphicalSurface->Construct(__pElemSurfaceCollection.get(), pRenderDataSurfaceCollection); + + return true; +} + +void +ModelSurface::UpdateGraphicalSurface(void) +{ + __pGraphicalSurface->Update(); + return; +} + +ESurface +ModelSurface::GetType(void)const +{ + return ESURFACE_MODEL_SURFACE; +} + +float +ModelSurface::GetDistanceFromGround(void) const +{ + TypePointSurfaceCollection::iterator it; + float sum = 0.f; + for (it = __pPointsCollection->begin(); it != __pPointsCollection->end(); ++it) + { + sum += (*it)->GetPosition().z - __groundLevel; + } + + TypePointSurfaceCollection::size_type size = __pPointsCollection->size(); + + return (size == 0 ? sum : sum / size); +} + +} } } } // Tizen::Ui::Effects::_Runtime diff --git a/src/ui/effects/runtime/FUiEffects_RuntimePointLight.cpp b/src/ui/effects/runtime/FUiEffects_RuntimePointLight.cpp new file mode 100644 index 0000000..6c0cd61 --- /dev/null +++ b/src/ui/effects/runtime/FUiEffects_RuntimePointLight.cpp @@ -0,0 +1,124 @@ +// +// 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 FUiEffects_RuntimePointLight.cpp + * @brief This file contains an implementation of PointLight class methods + * + */ + +#include +#include +#include + +using namespace Tizen::Ui::Effects::_Utils; +using namespace std; + +namespace Tizen { namespace Ui { namespace Effects { namespace _Runtime +{ + +PointLight::PointLight(const string& name) + : UnitLight(name) + , isPositionChanged(false) + , __position(0.f, 0.f, 0.f) +{ + +} + +PointLight::PointLight(bool enabled, + const string& name, + const Vec3f& colour, + float intensity, + const Vec3f& position) + : UnitLight(enabled, name, colour, intensity) + , isPositionChanged(false) + , __position(position) +{ + +} + +PointLight::~PointLight(void) +{ + +} + +PointLight* +PointLight::CreatePointLight(const string& name) +{ + PointLight* pPointLight = new (std::nothrow) PointLight(name); + AddUnitLightToPool(pPointLight); + return pPointLight; +} + +PointLight* +PointLight::CreatePointLight(bool isEnabled, + const std::string& name, + const Vec3f& colour, + float intensity, + const Vec3f& position) +{ + PointLight* pPointLight = new (std::nothrow) PointLight(isEnabled, + name, + colour, + intensity, + position); + AddUnitLightToPool(pPointLight); + return pPointLight; +} + +const Vec3f& +PointLight::GetPosition(void) const +{ + return __position; +} + +void +PointLight::SetPosition(const Tizen::Ui::Effects::_Utils::Vec3f& position) +{ + SetPosition(position.x, position.y, position.z); + return; +} + +void +PointLight::SetPosition(float x, float y, float z) +{ + if (fabs(__position.x - x) > EFFECT_EPSILONF + || fabs(__position.y - y) > EFFECT_EPSILONF + || fabs(__position.z - z) > EFFECT_EPSILONF) + { + __position.x = x; + __position.y = y; + __position.z = z; + isPositionChanged = true; + isSomethingChanged = true; + } + return; +} + +TypeUnitLight +PointLight::GetType(void) const +{ + return TYPE_UNIT_LIGHT_POINT; +} + +void +PointLight::ResetSigns(void) +{ + UnitLight::ResetSigns(); + isPositionChanged = false; +} + +} } } } // Tizen::Ui::Effects::_Runtime diff --git a/src/ui/effects/runtime/FUiEffects_RuntimeRenderDataScene.cpp b/src/ui/effects/runtime/FUiEffects_RuntimeRenderDataScene.cpp new file mode 100644 index 0000000..ff4aabb --- /dev/null +++ b/src/ui/effects/runtime/FUiEffects_RuntimeRenderDataScene.cpp @@ -0,0 +1,377 @@ +// +// 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 FUiEffects_RuntimeRenderDataScene.cpp + * @brief This file contains an implementation of light structures for scene + */ + +#include +#include +#include +#include "FUiEffects_RuntimeUnitLight.h" +#include "FUiEffects_RuntimePointLight.h" +#include "FUiEffects_RuntimeSpotLight.h" +#include "FUiEffects_RuntimeDirectionalLight.h" +#include "FUiEffects_RuntimeRenderDataScene.h" + +using namespace Tizen::Ui::Effects::_Utils; +using namespace std; + +namespace Tizen { namespace Ui { namespace Effects { namespace _Runtime +{ + +RenderDataScene::RenderDataScene(void) : + isAmbientColourChanged(false) + , isIntensityChanged(false) + , isAttenuationChanged(false) + , isSomethingChanged(false) + , __renderDataSurfaceCollection() + , __unitsLight() + , __iteratorCurrentUnitLight() + , __isLockedUnitsLightContainer(false) + , __unitLightNameTree() + , __ambientColour(0.f, 0.f, 0.f) + , __intensity(1.f) + , __attenuation(0.f) +{ + +} + +RenderDataScene::~RenderDataScene(void) +{ + while (!__unitsLight.empty()) + { + RemoveUnitLight(**(__unitsLight.begin())); + } +} + +bool +RenderDataScene::AddUnitLight(UnitLight& unitLight) +{ + UnitLight::DoesExistsInPool resExist = UnitLight::IsUnitLightInPool(unitLight); + if (__unitLightNameTree.find(unitLight.GetName()) == __unitLightNameTree.end() + && resExist.first == true) + { + __unitsLight.push_back(&unitLight); + + std::pair resNameInsertion = __unitLightNameTree.insert(std::make_pair(unitLight.GetName(), &unitLight)); + SysAssertf(resNameInsertion.second == true, _UiEffectError::INTERNAL_ERROR); + + UnlockUnitsLightContainer(); + + UnitLight::RemoveUnitLightFromPool(resExist.second); + + return true; + } + return false; +} + +void +RenderDataScene::RemoveUnitLight(UnitLight& unitLight) +{ + UnitLightCollection::iterator itUnitsLight = __unitsLight.begin(); + UnitLightCollection::iterator itUnitsLightEnd = __unitsLight.end(); + for (; itUnitsLight != itUnitsLightEnd; ++itUnitsLight) + { + if (*itUnitsLight == &unitLight) + { + break; + } + } + UnitLightNameTree::iterator itNameTree = __unitLightNameTree.find(unitLight.GetName()); + + __unitsLight.erase(itUnitsLight); + __unitLightNameTree.erase(itNameTree); + + delete &unitLight; + + UnlockUnitsLightContainer(); + + return; +} + +bool +RenderDataScene::RemoveUnitLight(const std::string& name) +{ + UnitLightNameTree::iterator itNameTree = __unitLightNameTree.find(name); + if (itNameTree != __unitLightNameTree.end()) + { + RemoveUnitLight(*(itNameTree->second)); + return true; + } + return false; +} + +bool +RenderDataScene::RemoveAllUnitsLightType(TypeUnitLight typeUnitLight) +{ + if (typeUnitLight != TYPE_UNIT_LIGHT_POINT && + typeUnitLight != TYPE_UNIT_LIGHT_SPOT && + typeUnitLight != TYPE_UNIT_LIGHT_DIRECTIONAL) + { + return false; + } + + UnitLightCollection::iterator itUnitLight = __unitsLight.begin(); + UnitLightCollection::iterator itUnitLightEnd = __unitsLight.end(); + for (; itUnitLight != itUnitLightEnd; ++itUnitLight) + { + if ((*itUnitLight)->GetType() == typeUnitLight) + { + UnitLight* pTemp = *itUnitLight; + --itUnitLight; + RemoveUnitLight(*pTemp); + } + } + + return true; +} + +PropertyCast +RenderDataScene::GetUnitLight(const string& name) const +{ + PropertyCast prop = {PropertyCast::NO_PROPERTY, {0}}; + UnitLightNameTree::const_iterator itNameTree = __unitLightNameTree.find(name); + if (itNameTree != __unitLightNameTree.end()) + { + return GetConcreteUnitLight(*(itNameTree->second)); + } + return prop; +} + +long +RenderDataScene::GetSizeUnitLightContainer(void) const +{ + return __unitsLight.size(); +} + +PropertyCast +RenderDataScene::GetConcreteUnitLight(const UnitLight& unitLight) const +{ + PropertyCast prop = {PropertyCast::NO_PROPERTY, {0}}; + switch (unitLight.GetType()) + { + case TYPE_UNIT_LIGHT_POINT: + { + const PointLight* pPointLight = dynamic_cast(&unitLight); + SysAssertf(pPointLight != null, _UiEffectError::INTERNAL_ERROR); + prop.value.pPointLight = pPointLight; + prop.type = PropertyCast::POINT_LIGHT; + } + break; + case TYPE_UNIT_LIGHT_SPOT: + { + const SpotLight* pSpotLight = dynamic_cast(&unitLight); + SysAssertf(pSpotLight != null, _UiEffectError::INTERNAL_ERROR); + prop.value.pSpotLight = pSpotLight; + prop.type = PropertyCast::SPOT_LIGHT; + } + break; + case TYPE_UNIT_LIGHT_DIRECTIONAL: + { + const DirectionalLight* pDirectionalLight = dynamic_cast(&unitLight); + SysAssertf(pDirectionalLight != null, _UiEffectError::INTERNAL_ERROR); + prop.value.pDirectionalLight = pDirectionalLight; + prop.type = PropertyCast::DIRECTIONAL_LIGHT; + } + break; + default: + break; + } + return prop; +} + +template<> const PointLight* +RenderDataScene::GetCurrentUnitLight(void) const +{ + return GetCurrentUnitLightInternal(); +} + +template<> const SpotLight* +RenderDataScene::GetCurrentUnitLight(void) const +{ + return GetCurrentUnitLightInternal(); +} + +template<> const DirectionalLight* +RenderDataScene::GetCurrentUnitLight(void) const +{ + return GetCurrentUnitLightInternal(); +} + +template<> const UnitLight* +RenderDataScene::GetCurrentUnitLight(void) const +{ + if (__isLockedUnitsLightContainer) + { + return *__iteratorCurrentUnitLight; + } + else + { + return null; + } +} + +template const T* +RenderDataScene::GetCurrentUnitLightInternal(void) const +{ + if (__isLockedUnitsLightContainer) + { + return static_cast(*__iteratorCurrentUnitLight); + } + else + { + return null; + } +} + +TypeUnitLight +RenderDataScene::GetTypeOfCurrentUnitLight(void) const +{ + if (__isLockedUnitsLightContainer) + { + return (*__iteratorCurrentUnitLight)->GetType(); + } + else + { + return static_cast(-1); + } +} + +bool +RenderDataScene::GoToNextUnitLight(void) +{ + if (__isLockedUnitsLightContainer) + { + if (++__iteratorCurrentUnitLight == __unitsLight.end()) + { + --__iteratorCurrentUnitLight; + return false; + } + return true; + } + return false; +} + +bool +RenderDataScene::LockUnitsLightContainer(void) +{ + if (!__unitsLight.empty()) + { + __isLockedUnitsLightContainer = true; + __iteratorCurrentUnitLight = __unitsLight.begin(); + return true; + } + return false; +} + +void +RenderDataScene::UnlockUnitsLightContainer(void) +{ + __isLockedUnitsLightContainer = false; + return; +} + +bool +RenderDataScene::GetIsLockedUnitsLightContainer(void) const +{ + return __isLockedUnitsLightContainer; +} + +RenderDataSurfaceCollection& +RenderDataScene::GetRenderDataSurfaceCollection(void) +{ + return __renderDataSurfaceCollection; +} + +void +RenderDataScene::SetLightAmbientColour(const Vec3f& ambientColour) +{ + SetLightAmbientColour(ambientColour.x, ambientColour.y, ambientColour.z); + return; +} + +void +RenderDataScene::SetLightAmbientColour(float red, float green, float blue) +{ + if (fabs(__ambientColour.x - red) > EFFECT_EPSILONF + || fabs(__ambientColour.y - green) > EFFECT_EPSILONF + || fabs(__ambientColour.z - blue) > EFFECT_EPSILONF) + { + __ambientColour.x = red; + __ambientColour.y = green; + __ambientColour.z = blue; + isAmbientColourChanged = true; + isSomethingChanged = true; + } + return; +} + +void +RenderDataScene::SetLightIntensity(float intensity) +{ + if (fabs(__intensity - intensity) > EFFECT_EPSILONF) + { + __intensity = intensity; + isIntensityChanged = true; + isSomethingChanged = true; + } + return; +} + +void +RenderDataScene::SetLightAttenuation(float attenuation) +{ + if (fabs(__attenuation - attenuation) > EFFECT_EPSILONF) + { + __attenuation = attenuation; + isAttenuationChanged = true; + isSomethingChanged = true; + } + return; +} + +const Vec3f& +RenderDataScene::GetLightAmbientColour(void) const +{ + return __ambientColour; +} + +float +RenderDataScene::GetLightIntensity(void) const +{ + return __intensity; +} + +float +RenderDataScene::GetLightAttenuation(void) const +{ + return __attenuation; +} + +bool +RenderDataScene::ResetSignsCurrentUnitLight(void) +{ + if (__isLockedUnitsLightContainer) + { + (*__iteratorCurrentUnitLight)->ResetSigns(); + return true; + } + return false; +} + +} } } } // Tizen::Ui::Effects::_Runtime diff --git a/src/ui/effects/runtime/FUiEffects_RuntimeSpotLight.cpp b/src/ui/effects/runtime/FUiEffects_RuntimeSpotLight.cpp new file mode 100644 index 0000000..7d3f6ed --- /dev/null +++ b/src/ui/effects/runtime/FUiEffects_RuntimeSpotLight.cpp @@ -0,0 +1,187 @@ +// +// 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 FUiEffects_RuntimeSpotLight.cpp + * @brief This file contains an implementation of SpotLight class methods + * + */ + +#include +#include +#include + +using namespace Tizen::Ui::Effects::_Utils; +using namespace std; + +namespace Tizen { namespace Ui { namespace Effects { namespace _Runtime +{ + +SpotLight::SpotLight(const std::string& name) + : PointLight(name) + , isTargetChanged(false) + , isAngleOpeningChanged(false) + , isAngleFadeOutChanged(false) + , __target(0.f, 0.f, -1.f) + , __angleOpening(30.f / 180.f * M_PI) + , __angleFadeOut(5.f / 180.f * M_PI) +{ + +} + +SpotLight::SpotLight(bool isEnabled, + const string& name, + const Vec3f& colour, + float intensity, + const Vec3f& position, + const Vec3f& target, + float angleOpening, + float angleFadeOut) + : PointLight(isEnabled, name, colour, intensity, position) + , isTargetChanged(false) + , isAngleOpeningChanged(false) + , isAngleFadeOutChanged(false) + , __target(target) + , __angleOpening(angleOpening) + , __angleFadeOut(angleFadeOut) +{ + +} + +SpotLight::~SpotLight(void) +{ + +} + +SpotLight* +SpotLight::CreateSpotLight(const std::string& name) +{ + SpotLight* pSpotLight = new (std::nothrow) SpotLight(name); + AddUnitLightToPool(pSpotLight); + return pSpotLight; +} + +SpotLight* +SpotLight::CreateSpotLight(bool isEnabled, + const std::string& name, + const Vec3f& colour, + float intensity, + const Vec3f& position, + const Vec3f& target, + float angleOpening, + float angleFadeOut) +{ + SpotLight* pSpotLight = new (std::nothrow) SpotLight(isEnabled, + name, + colour, + intensity, + position, + target, + angleOpening, + angleFadeOut); + AddUnitLightToPool(pSpotLight); + return pSpotLight; +} + +const Vec3f& +SpotLight::GetTarget(void) const +{ + return __target; +} + +float +SpotLight::GetAngleOpening(void) const +{ + return __angleOpening; +} + +float +SpotLight::GetAngleFadeOut(void) const +{ + return __angleFadeOut; +} + +void +SpotLight::SetTarget(const Vec3f& target) +{ + SetTarget(target.x, target.y, target.z); + return; +} + +void +SpotLight::SetTarget(float x, float y, float z) +{ + if (fabs(__target.x - x) > EFFECT_EPSILONF + || fabs(__target.y - y) > EFFECT_EPSILONF + || fabs(__target.z - z) > EFFECT_EPSILONF) + { + __target.x = x; + __target.y = y; + __target.z = z; + isTargetChanged = true; + isSomethingChanged = true; + } + return; +} + +bool +SpotLight::SetAngleOpening(float angleOpening) +{ + if (fabs(__angleOpening - angleOpening) > EFFECT_EPSILONF) + { + if (angleOpening < 0 || angleOpening > 2 * M_PI) + { + return false; + } + __angleOpening = angleOpening; + isAngleOpeningChanged = true; + isSomethingChanged = true; + } + return true; +} + +bool +SpotLight::SetAngleFadeOut(float angleFadeOut) +{ + if (fabs(__angleFadeOut - angleFadeOut) > EFFECT_EPSILONF) + { + if (angleFadeOut < 0 || angleFadeOut > M_PI - __angleOpening / 2.f) + { + return false; + } + __angleFadeOut = angleFadeOut; + isAngleFadeOutChanged = true; + isSomethingChanged = true; + } + return true; +} + +TypeUnitLight +SpotLight::GetType(void) const +{ + return TYPE_UNIT_LIGHT_SPOT; +} + +void +SpotLight::ResetSigns(void) +{ + PointLight::ResetSigns(); + isTargetChanged = false; + isAngleOpeningChanged = false; + isAngleFadeOutChanged = false; +} + +} } } } // Tizen::Ui::Effects::_Runtime diff --git a/src/ui/effects/runtime/FUiEffects_RuntimeUnitLight.cpp b/src/ui/effects/runtime/FUiEffects_RuntimeUnitLight.cpp new file mode 100644 index 0000000..d360b51 --- /dev/null +++ b/src/ui/effects/runtime/FUiEffects_RuntimeUnitLight.cpp @@ -0,0 +1,201 @@ +// +// 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 FUiEffects_RuntimeUnitLight.cpp + * @brief This file contains an implementation of UnitLight class methods + * + */ + +#include +#include +#include + +using namespace Tizen::Ui::Effects::_Utils; +using namespace std; + +namespace Tizen { namespace Ui { namespace Effects { namespace _Runtime +{ + +UnitLight::ObjectsPool UnitLight::__objectsPool = UnitLight::ObjectsPool(); + +UnitLight::UnitLight(const string& name) : + isEnabledChanged(false) + , isColourChanged(false) + , isIntensityChanged(false) + , isSomethingChanged(false) + , __enabled(true) + , __name(name) + , __colour(1.f, 0.f, 0.f) + , __intensity(1.f) +{ + +} + +UnitLight::UnitLight(bool enabled, + const string& name, + const Vec3f& colour, + float intensity) : + isEnabledChanged(false) + , isColourChanged(false) + , isIntensityChanged(false) + , isSomethingChanged(false) + , __enabled(enabled) + , __name(name) + , __colour(colour) + , __intensity(intensity) +{ + +} + +UnitLight::~UnitLight(void) +{ + +} + +bool +UnitLight::GetEnabled(void) const +{ + return __enabled; +} + +const Vec3f& +UnitLight::GetColour(void) const +{ + return __colour; +} + +float +UnitLight::GetIntensity(void) const +{ + return __intensity; +} + +const string& +UnitLight::GetName(void) const +{ + return __name; +} + +void +UnitLight::SetEnabled(bool enabled) +{ + if (__enabled != enabled) + { + __enabled = enabled; + if (!isEnabledChanged) + { + isEnabledChanged = true; + isSomethingChanged = true; + } + else + { + isEnabledChanged = false; + } + } + return; +} + +void +UnitLight::SetColour(const Vec3f& colour) +{ + SetColour(colour.x, colour.y, colour.z); + return; +} + +void +UnitLight::SetColour(float red, float green, float blue) +{ + if (fabs(__colour.x - red) > EFFECT_EPSILONF + || fabs(__colour.y - green) > EFFECT_EPSILONF + || fabs(__colour.z - blue) > EFFECT_EPSILONF) + { + __colour.x = red; + __colour.y = green; + __colour.z = blue; + isColourChanged = true; + isSomethingChanged = true; + } + return; +} + +void +UnitLight::SetIntensity(float intensity) +{ + if (fabs(__intensity - intensity) > EFFECT_EPSILONF) + { + __intensity = intensity; + isIntensityChanged = true; + isSomethingChanged = true; + } +} + +void +UnitLight::ResetSigns(void) +{ + isEnabledChanged = false; + isColourChanged = false; + isIntensityChanged = false; + isSomethingChanged = false; +} + +void +UnitLight::AddUnitLightToPool(UnitLight* unitLigth) +{ + if (unitLigth == null) + { + return; + } + + SysAssertf(IsUnitLightInPool(*unitLigth).first == false, _UiEffectError::INTERNAL_ERROR); + __objectsPool.push_back(unitLigth); + + return; +} + +void +UnitLight::ReleaseObjectsPool(void) +{ + ObjectsPool::iterator it = __objectsPool.begin(); + for (; it != __objectsPool.end(); ++it) + { + SysAssertf(*it != null, _UiEffectError::INTERNAL_ERROR); + delete *it; + } + __objectsPool.clear(); +} + +UnitLight::DoesExistsInPool +UnitLight::IsUnitLightInPool(UnitLight& unitLight) +{ + ObjectsPool::iterator it = __objectsPool.begin(); + for (; it != __objectsPool.end(); ++it) + { + if (&unitLight == *it) + { + return make_pair(true, it); + } + } + return make_pair(false, __objectsPool.end()); +} + +void +UnitLight::RemoveUnitLightFromPool(ObjectsPool::iterator it) +{ + __objectsPool.erase(it); +} + +} } } } // Tizen::Ui::Effects::_Runtime diff --git a/src/ui/effects/runtime/lua-cpp-binding/tolua.cpp b/src/ui/effects/runtime/lua-cpp-binding/tolua.cpp new file mode 100644 index 0000000..bf66849 --- /dev/null +++ b/src/ui/effects/runtime/lua-cpp-binding/tolua.cpp @@ -0,0 +1,6872 @@ +// +// 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. +// + +#ifndef __cplusplus +#include "stdlib.h" +#endif +#include "string.h" + +#include "tolua++.h" + +/* Exported function */ +TOLUA_API int tolua__open (lua_State* tolua_S); + +#include +#include +#include +#include "../../inc/FUiEffects_RuntimeEffectModelScript.h" +#include "../../inc/FUiEffects_RuntimeModel.h" +#include "../../inc/FUiEffects_RuntimePropertyCast.h" +#include "../../inc/FUiEffects_RuntimeUnitLight.h" +#include "../../inc/FUiEffects_RuntimePointLight.h" +#include "../../inc/FUiEffects_RuntimeSpotLight.h" +#include "../../inc/FUiEffects_RuntimeDirectionalLight.h" +#ifndef _DEBUG +#define TOLUA_RELEASE +#endif +using namespace Tizen::Ui::Effects::_Utils; +using namespace Tizen::Ui::Effects::_Runtime; +using namespace Tizen::Ui::Effects; +using namespace std; + + static int SetMetatable(lua_State* tolua_S, const char* type, const char* operation, lua_CFunction func) +{ + char ctype[128] = "const "; + strncat(ctype, type, sizeof(ctype)-1); + const char* types[2] = {type, ctype}; + + for (short i = 0; i < 2; ++i) + { + luaL_getmetatable(tolua_S, types[i]); + lua_pushstring(tolua_S, operation); + lua_pushcfunction(tolua_S, func); + lua_rawset(tolua_S, -3); + lua_pop(tolua_S, 1); + } + + return 1; +} + +/* function to release collected object via destructor */ +#ifdef __cplusplus + +static int tolua_collect_PropertyCast (lua_State* tolua_S) +{ + PropertyCast* self = (PropertyCast*) tolua_tousertype(tolua_S,1,0); + Mtolua_delete(self); + return 0; +} + +static int tolua_collect_Vector2 (lua_State* tolua_S) +{ + Vector2* self = (Vector2*) tolua_tousertype(tolua_S,1,0); + Mtolua_delete(self); + return 0; +} + +static int tolua_collect_LuaMatrix4 (lua_State* tolua_S) +{ + LuaMatrix4* self = (LuaMatrix4*) tolua_tousertype(tolua_S,1,0); + Mtolua_delete(self); + return 0; +} + +static int tolua_collect_EffectsVector_long_ (lua_State* tolua_S) +{ + EffectsVector* self = (EffectsVector*) tolua_tousertype(tolua_S,1,0); + Mtolua_delete(self); + return 0; +} + +static int tolua_collect_Vector3 (lua_State* tolua_S) +{ + Vector3* self = (Vector3*) tolua_tousertype(tolua_S,1,0); + Mtolua_delete(self); + return 0; +} +#endif + + +/* function to register type */ +static void tolua_reg_types (lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"LuaMatrix4"); + tolua_usertype(tolua_S,"EffectsVector"); + tolua_usertype(tolua_S,"PropertyCast"); + tolua_usertype(tolua_S,"EffectsVector >"); + tolua_usertype(tolua_S,"SpotLight"); + tolua_usertype(tolua_S,"Vector2"); + tolua_usertype(tolua_S,"EffectModelScript"); + tolua_usertype(tolua_S,"PointLight"); + tolua_usertype(tolua_S,"Vector3"); + tolua_usertype(tolua_S,"TouchEventScript"); + tolua_usertype(tolua_S,"EffectsVector"); + tolua_usertype(tolua_S,"DirectionalLight"); + tolua_usertype(tolua_S,"PropertyCast::TypeValue"); + tolua_usertype(tolua_S,"UnitLight"); +} + +/* method: GetProperty of class EffectModelScript */ +#ifndef TOLUA_DISABLE_tolua__EffectModelScript_GetProperty00 +static int tolua__EffectModelScript_GetProperty00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const EffectModelScript",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnoobj(tolua_S,4,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const EffectModelScript* self = (const EffectModelScript*) tolua_tousertype(tolua_S,1,0); + long objID = ((long) tolua_tonumber(tolua_S,2,0)); + ElementProperty property = ((ElementProperty) (int) tolua_tonumber(tolua_S,3,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetProperty'", NULL); +#endif + { + PropertyCast tolua_ret = (PropertyCast) self->GetProperty(objID,property); + { +#ifdef __cplusplus + void* tolua_obj = Mtolua_new((PropertyCast)(tolua_ret)); + tolua_pushusertype(tolua_S,tolua_obj,"PropertyCast"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#else + void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(PropertyCast)); + tolua_pushusertype(tolua_S,tolua_obj,"PropertyCast"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#endif + } + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'GetProperty'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: SetProperty of class EffectModelScript */ +#ifndef TOLUA_DISABLE_tolua__EffectModelScript_SetProperty00 +static int tolua__EffectModelScript_SetProperty00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"EffectModelScript",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isboolean(tolua_S,4,0,&tolua_err) || + !tolua_isnoobj(tolua_S,5,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + EffectModelScript* self = (EffectModelScript*) tolua_tousertype(tolua_S,1,0); + long objID = ((long) tolua_tonumber(tolua_S,2,0)); + ElementProperty property = ((ElementProperty) (int) tolua_tonumber(tolua_S,3,0)); + bool value = ((bool) tolua_toboolean(tolua_S,4,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetProperty'", NULL); +#endif + { + bool tolua_ret = (bool) self->SetProperty(objID,property,value); + tolua_pushboolean(tolua_S,(bool)tolua_ret); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'SetProperty'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: SetProperty of class EffectModelScript */ +#ifndef TOLUA_DISABLE_tolua__EffectModelScript_SetProperty01 +static int tolua__EffectModelScript_SetProperty01(lua_State* tolua_S) +{ + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"EffectModelScript",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnoobj(tolua_S,5,&tolua_err) + ) + goto tolua_lerror; + else + { + EffectModelScript* self = (EffectModelScript*) tolua_tousertype(tolua_S,1,0); + long objID = ((long) tolua_tonumber(tolua_S,2,0)); + ElementProperty property = ((ElementProperty) (int) tolua_tonumber(tolua_S,3,0)); + LUA_NUMBER value = ((LUA_NUMBER) tolua_tonumber(tolua_S,4,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetProperty'", NULL); +#endif + { + bool tolua_ret = (bool) self->SetProperty(objID,property,value); + tolua_pushboolean(tolua_S,(bool)tolua_ret); + } + } + return 1; +tolua_lerror: + return tolua__EffectModelScript_SetProperty00(tolua_S); +} +#endif //#ifndef TOLUA_DISABLE + +/* method: SetProperty of class EffectModelScript */ +#ifndef TOLUA_DISABLE_tolua__EffectModelScript_SetProperty02 +static int tolua__EffectModelScript_SetProperty02(lua_State* tolua_S) +{ + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"EffectModelScript",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"const Vector3",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,5,&tolua_err) + ) + goto tolua_lerror; + else + { + EffectModelScript* self = (EffectModelScript*) tolua_tousertype(tolua_S,1,0); + long objID = ((long) tolua_tonumber(tolua_S,2,0)); + ElementProperty property = ((ElementProperty) (int) tolua_tonumber(tolua_S,3,0)); + const Vector3* value = ((const Vector3*) tolua_tousertype(tolua_S,4,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetProperty'", NULL); +#endif + { + bool tolua_ret = (bool) self->SetProperty(objID,property,*value); + tolua_pushboolean(tolua_S,(bool)tolua_ret); + } + } + return 1; +tolua_lerror: + return tolua__EffectModelScript_SetProperty01(tolua_S); +} +#endif //#ifndef TOLUA_DISABLE + +/* method: SetPropertyGroup of class EffectModelScript */ +#ifndef TOLUA_DISABLE_tolua__EffectModelScript_SetPropertyGroup00 +static int tolua__EffectModelScript_SetPropertyGroup00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"EffectModelScript",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnoobj(tolua_S,6,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + EffectModelScript* self = (EffectModelScript*) tolua_tousertype(tolua_S,1,0); + long modelSurfaceID = ((long) tolua_tonumber(tolua_S,2,0)); + GroupElements group = ((GroupElements) (int) tolua_tonumber(tolua_S,3,0)); + ElementProperty property = ((ElementProperty) (int) tolua_tonumber(tolua_S,4,0)); + LUA_NUMBER value = ((LUA_NUMBER) tolua_tonumber(tolua_S,5,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetPropertyGroup'", NULL); +#endif + { + bool tolua_ret = (bool) self->SetPropertyGroup(modelSurfaceID,group,property,value); + tolua_pushboolean(tolua_S,(bool)tolua_ret); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'SetPropertyGroup'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: GetDistanceFromGround of class EffectModelScript */ +#ifndef TOLUA_DISABLE_tolua__EffectModelScript_GetDistanceFromGround00 +static int tolua__EffectModelScript_GetDistanceFromGround00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const EffectModelScript",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const EffectModelScript* self = (const EffectModelScript*) tolua_tousertype(tolua_S,1,0); + long modelSurfaceID = ((long) tolua_tonumber(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetDistanceFromGround'", NULL); +#endif + { + PropertyCast tolua_ret = (PropertyCast) self->GetDistanceFromGround(modelSurfaceID); + { +#ifdef __cplusplus + void* tolua_obj = Mtolua_new((PropertyCast)(tolua_ret)); + tolua_pushusertype(tolua_S,tolua_obj,"PropertyCast"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#else + void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(PropertyCast)); + tolua_pushusertype(tolua_S,tolua_obj,"PropertyCast"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#endif + } + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'GetDistanceFromGround'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: UpdateBitmap of class EffectModelScript */ +#ifndef TOLUA_DISABLE_tolua__EffectModelScript_UpdateBitmap00 +static int tolua__EffectModelScript_UpdateBitmap00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"EffectModelScript",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnoobj(tolua_S,4,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + EffectModelScript* self = (EffectModelScript*) tolua_tousertype(tolua_S,1,0); + long graphicalSurfaceID = ((long) tolua_tonumber(tolua_S,2,0)); + long bitmapID = ((long) tolua_tonumber(tolua_S,3,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'UpdateBitmap'", NULL); +#endif + { + bool tolua_ret = (bool) self->UpdateBitmap(graphicalSurfaceID,bitmapID); + tolua_pushboolean(tolua_S,(bool)tolua_ret); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'UpdateBitmap'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: GetNearestPointsIds of class EffectModelScript */ +#ifndef TOLUA_DISABLE_tolua__EffectModelScript_GetNearestPointsIds00 +static int tolua__EffectModelScript_GetNearestPointsIds00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const EffectModelScript",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"Vector3",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,4,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const EffectModelScript* self = (const EffectModelScript*) tolua_tousertype(tolua_S,1,0); + long graphicalSurfaceID = ((long) tolua_tonumber(tolua_S,2,0)); + Vector3* position = ((Vector3*) tolua_tousertype(tolua_S,3,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetNearestPointsIds'", NULL); +#endif + { + PropertyCast tolua_ret = (PropertyCast) self->GetNearestPointsIds(graphicalSurfaceID,*position); + { +#ifdef __cplusplus + void* tolua_obj = Mtolua_new((PropertyCast)(tolua_ret)); + tolua_pushusertype(tolua_S,tolua_obj,"PropertyCast"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#else + void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(PropertyCast)); + tolua_pushusertype(tolua_S,tolua_obj,"PropertyCast"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#endif + } + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'GetNearestPointsIds'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: GetNearestPointsIds of class EffectModelScript */ +#ifndef TOLUA_DISABLE_tolua__EffectModelScript_GetNearestPointsIds01 +static int tolua__EffectModelScript_GetNearestPointsIds01(lua_State* tolua_S) +{ + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const EffectModelScript",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnoobj(tolua_S,6,&tolua_err) + ) + goto tolua_lerror; + else + { + const EffectModelScript* self = (const EffectModelScript*) tolua_tousertype(tolua_S,1,0); + long graphicalSurfaceID = ((long) tolua_tonumber(tolua_S,2,0)); + float posX = ((float) tolua_tonumber(tolua_S,3,0)); + float posY = ((float) tolua_tonumber(tolua_S,4,0)); + float posZ = ((float) tolua_tonumber(tolua_S,5,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetNearestPointsIds'", NULL); +#endif + { + PropertyCast tolua_ret = (PropertyCast) self->GetNearestPointsIds(graphicalSurfaceID,posX,posY,posZ); + { +#ifdef __cplusplus + void* tolua_obj = Mtolua_new((PropertyCast)(tolua_ret)); + tolua_pushusertype(tolua_S,tolua_obj,"PropertyCast"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#else + void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(PropertyCast)); + tolua_pushusertype(tolua_S,tolua_obj,"PropertyCast"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#endif + } + } + } + return 1; +tolua_lerror: + return tolua__EffectModelScript_GetNearestPointsIds00(tolua_S); +} +#endif //#ifndef TOLUA_DISABLE + +/* method: RotateSurfaceN of class EffectModelScript */ +#ifndef TOLUA_DISABLE_tolua__EffectModelScript_RotateSurfaceN00 +static int tolua__EffectModelScript_RotateSurfaceN00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"EffectModelScript",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnumber(tolua_S,6,1,&tolua_err) || + !tolua_isnumber(tolua_S,7,1,&tolua_err) || + !tolua_isnumber(tolua_S,8,1,&tolua_err) || + !tolua_isnumber(tolua_S,9,1,&tolua_err) || + !tolua_isnumber(tolua_S,10,1,&tolua_err) || + !tolua_isnumber(tolua_S,11,1,&tolua_err) || + !tolua_isnoobj(tolua_S,12,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + EffectModelScript* self = (EffectModelScript*) tolua_tousertype(tolua_S,1,0); + long graphicalSurfaceID = ((long) tolua_tonumber(tolua_S,2,0)); + float angle = ((float) tolua_tonumber(tolua_S,3,0)); + _Axis axis = ((_Axis) (int) tolua_tonumber(tolua_S,4,0)); + _Point point = ((_Point) (int) tolua_tonumber(tolua_S,5,0)); + float ax = ((float) tolua_tonumber(tolua_S,6,0.f)); + float ay = ((float) tolua_tonumber(tolua_S,7,0.f)); + float az = ((float) tolua_tonumber(tolua_S,8,1.f)); + float x0 = ((float) tolua_tonumber(tolua_S,9,0.f)); + float y0 = ((float) tolua_tonumber(tolua_S,10,0.f)); + float z0 = ((float) tolua_tonumber(tolua_S,11,0.f)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RotateSurfaceN'", NULL); +#endif + { + bool tolua_ret = (bool) self->RotateSurfaceN(graphicalSurfaceID,angle,axis,point,ax,ay,az,x0,y0,z0); + tolua_pushboolean(tolua_S,(bool)tolua_ret); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'RotateSurfaceN'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: RotateSurfaceV of class EffectModelScript */ +#ifndef TOLUA_DISABLE_tolua__EffectModelScript_RotateSurfaceV00 +static int tolua__EffectModelScript_RotateSurfaceV00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"EffectModelScript",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnoobj(tolua_S,6,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + EffectModelScript* self = (EffectModelScript*) tolua_tousertype(tolua_S,1,0); + long graphicalSurfaceID = ((long) tolua_tonumber(tolua_S,2,0)); + float angle = ((float) tolua_tonumber(tolua_S,3,0)); + _Axis axis = ((_Axis) (int) tolua_tonumber(tolua_S,4,0)); + _Point point = ((_Point) (int) tolua_tonumber(tolua_S,5,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RotateSurfaceV'", NULL); +#endif + { + bool tolua_ret = (bool) self->RotateSurfaceV(graphicalSurfaceID,angle,axis,point); + tolua_pushboolean(tolua_S,(bool)tolua_ret); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'RotateSurfaceV'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: RotateSurfaceV of class EffectModelScript */ +#ifndef TOLUA_DISABLE_tolua__EffectModelScript_RotateSurfaceV01 +static int tolua__EffectModelScript_RotateSurfaceV01(lua_State* tolua_S) +{ + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"EffectModelScript",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + (tolua_isvaluenil(tolua_S,6,&tolua_err) || !tolua_isusertype(tolua_S,6,"const Vector3",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,7,&tolua_err) + ) + goto tolua_lerror; + else + { + EffectModelScript* self = (EffectModelScript*) tolua_tousertype(tolua_S,1,0); + long graphicalSurfaceID = ((long) tolua_tonumber(tolua_S,2,0)); + float angle = ((float) tolua_tonumber(tolua_S,3,0)); + _Axis axis = ((_Axis) (int) tolua_tonumber(tolua_S,4,0)); + _Point point = ((_Point) (int) tolua_tonumber(tolua_S,5,0)); + const Vector3* axisArbit = ((const Vector3*) tolua_tousertype(tolua_S,6,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RotateSurfaceV'", NULL); +#endif + { + bool tolua_ret = (bool) self->RotateSurfaceV(graphicalSurfaceID,angle,axis,point,*axisArbit); + tolua_pushboolean(tolua_S,(bool)tolua_ret); + } + } + return 1; +tolua_lerror: + return tolua__EffectModelScript_RotateSurfaceV00(tolua_S); +} +#endif //#ifndef TOLUA_DISABLE + +/* method: RotateSurfaceV of class EffectModelScript */ +#ifndef TOLUA_DISABLE_tolua__EffectModelScript_RotateSurfaceV02 +static int tolua__EffectModelScript_RotateSurfaceV02(lua_State* tolua_S) +{ + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"EffectModelScript",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + (tolua_isvaluenil(tolua_S,6,&tolua_err) || !tolua_isusertype(tolua_S,6,"const Vector3",0,&tolua_err)) || + (tolua_isvaluenil(tolua_S,7,&tolua_err) || !tolua_isusertype(tolua_S,7,"const Vector3",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,8,&tolua_err) + ) + goto tolua_lerror; + else + { + EffectModelScript* self = (EffectModelScript*) tolua_tousertype(tolua_S,1,0); + long graphicalSurfaceID = ((long) tolua_tonumber(tolua_S,2,0)); + float angle = ((float) tolua_tonumber(tolua_S,3,0)); + _Axis axis = ((_Axis) (int) tolua_tonumber(tolua_S,4,0)); + _Point point = ((_Point) (int) tolua_tonumber(tolua_S,5,0)); + const Vector3* axisArbit = ((const Vector3*) tolua_tousertype(tolua_S,6,0)); + const Vector3* basePointArbit = ((const Vector3*) tolua_tousertype(tolua_S,7,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RotateSurfaceV'", NULL); +#endif + { + bool tolua_ret = (bool) self->RotateSurfaceV(graphicalSurfaceID,angle,axis,point,*axisArbit,*basePointArbit); + tolua_pushboolean(tolua_S,(bool)tolua_ret); + } + } + return 1; +tolua_lerror: + return tolua__EffectModelScript_RotateSurfaceV01(tolua_S); +} +#endif //#ifndef TOLUA_DISABLE + +/* method: ScaleSurface of class EffectModelScript */ +#ifndef TOLUA_DISABLE_tolua__EffectModelScript_ScaleSurface00 +static int tolua__EffectModelScript_ScaleSurface00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"EffectModelScript",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnumber(tolua_S,6,0,&tolua_err) || + !tolua_isnumber(tolua_S,7,1,&tolua_err) || + !tolua_isnumber(tolua_S,8,1,&tolua_err) || + !tolua_isnumber(tolua_S,9,1,&tolua_err) || + !tolua_isnoobj(tolua_S,10,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + EffectModelScript* self = (EffectModelScript*) tolua_tousertype(tolua_S,1,0); + long graphicalSurfaceID = ((long) tolua_tonumber(tolua_S,2,0)); + float ax = ((float) tolua_tonumber(tolua_S,3,0)); + float ay = ((float) tolua_tonumber(tolua_S,4,0)); + float az = ((float) tolua_tonumber(tolua_S,5,0)); + _Point point = ((_Point) (int) tolua_tonumber(tolua_S,6,0)); + float x0 = ((float) tolua_tonumber(tolua_S,7,0.f)); + float y0 = ((float) tolua_tonumber(tolua_S,8,0.f)); + float z0 = ((float) tolua_tonumber(tolua_S,9,0.f)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ScaleSurface'", NULL); +#endif + { + bool tolua_ret = (bool) self->ScaleSurface(graphicalSurfaceID,ax,ay,az,point,x0,y0,z0); + tolua_pushboolean(tolua_S,(bool)tolua_ret); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'ScaleSurface'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: ScaleSurface of class EffectModelScript */ +#ifndef TOLUA_DISABLE_tolua__EffectModelScript_ScaleSurface01 +static int tolua__EffectModelScript_ScaleSurface01(lua_State* tolua_S) +{ + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"EffectModelScript",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnoobj(tolua_S,5,&tolua_err) + ) + goto tolua_lerror; + else + { + EffectModelScript* self = (EffectModelScript*) tolua_tousertype(tolua_S,1,0); + long graphicalSurfaceID = ((long) tolua_tonumber(tolua_S,2,0)); + const Vector3* multipliers = ((const Vector3*) tolua_tousertype(tolua_S,3,0)); + _Point point = ((_Point) (int) tolua_tonumber(tolua_S,4,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ScaleSurface'", NULL); +#endif + { + bool tolua_ret = (bool) self->ScaleSurface(graphicalSurfaceID,*multipliers,point); + tolua_pushboolean(tolua_S,(bool)tolua_ret); + } + } + return 1; +tolua_lerror: + return tolua__EffectModelScript_ScaleSurface00(tolua_S); +} +#endif //#ifndef TOLUA_DISABLE + +/* method: ScaleSurface of class EffectModelScript */ +#ifndef TOLUA_DISABLE_tolua__EffectModelScript_ScaleSurface02 +static int tolua__EffectModelScript_ScaleSurface02(lua_State* tolua_S) +{ + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"EffectModelScript",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + (tolua_isvaluenil(tolua_S,5,&tolua_err) || !tolua_isusertype(tolua_S,5,"const Vector3",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,6,&tolua_err) + ) + goto tolua_lerror; + else + { + EffectModelScript* self = (EffectModelScript*) tolua_tousertype(tolua_S,1,0); + long graphicalSurfaceID = ((long) tolua_tonumber(tolua_S,2,0)); + const Vector3* multipliers = ((const Vector3*) tolua_tousertype(tolua_S,3,0)); + _Point point = ((_Point) (int) tolua_tonumber(tolua_S,4,0)); + const Vector3* basePoint = ((const Vector3*) tolua_tousertype(tolua_S,5,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ScaleSurface'", NULL); +#endif + { + bool tolua_ret = (bool) self->ScaleSurface(graphicalSurfaceID,*multipliers,point,*basePoint); + tolua_pushboolean(tolua_S,(bool)tolua_ret); + } + } + return 1; +tolua_lerror: + return tolua__EffectModelScript_ScaleSurface01(tolua_S); +} +#endif //#ifndef TOLUA_DISABLE + +/* method: MoveSurface of class EffectModelScript */ +#ifndef TOLUA_DISABLE_tolua__EffectModelScript_MoveSurface00 +static int tolua__EffectModelScript_MoveSurface00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"EffectModelScript",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnoobj(tolua_S,6,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + EffectModelScript* self = (EffectModelScript*) tolua_tousertype(tolua_S,1,0); + long graphicalSurfaceID = ((long) tolua_tonumber(tolua_S,2,0)); + float x0 = ((float) tolua_tonumber(tolua_S,3,0)); + float y0 = ((float) tolua_tonumber(tolua_S,4,0)); + float z0 = ((float) tolua_tonumber(tolua_S,5,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'MoveSurface'", NULL); +#endif + { + bool tolua_ret = (bool) self->MoveSurface(graphicalSurfaceID,x0,y0,z0); + tolua_pushboolean(tolua_S,(bool)tolua_ret); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'MoveSurface'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: MoveSurface of class EffectModelScript */ +#ifndef TOLUA_DISABLE_tolua__EffectModelScript_MoveSurface01 +static int tolua__EffectModelScript_MoveSurface01(lua_State* tolua_S) +{ + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"EffectModelScript",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,4,&tolua_err) + ) + goto tolua_lerror; + else + { + EffectModelScript* self = (EffectModelScript*) tolua_tousertype(tolua_S,1,0); + long graphicalSurfaceID = ((long) tolua_tonumber(tolua_S,2,0)); + const Vector3* pointTarget = ((const Vector3*) tolua_tousertype(tolua_S,3,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'MoveSurface'", NULL); +#endif + { + bool tolua_ret = (bool) self->MoveSurface(graphicalSurfaceID,*pointTarget); + tolua_pushboolean(tolua_S,(bool)tolua_ret); + } + } + return 1; +tolua_lerror: + return tolua__EffectModelScript_MoveSurface00(tolua_S); +} +#endif //#ifndef TOLUA_DISABLE + +/* method: ResetSurfaceTransformation of class EffectModelScript */ +#ifndef TOLUA_DISABLE_tolua__EffectModelScript_ResetSurfaceTransformation00 +static int tolua__EffectModelScript_ResetSurfaceTransformation00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"EffectModelScript",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + EffectModelScript* self = (EffectModelScript*) tolua_tousertype(tolua_S,1,0); + long graphicalSurfaceID = ((long) tolua_tonumber(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ResetSurfaceTransformation'", NULL); +#endif + { + bool tolua_ret = (bool) self->ResetSurfaceTransformation(graphicalSurfaceID); + tolua_pushboolean(tolua_S,(bool)tolua_ret); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'ResetSurfaceTransformation'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: PrintLuaInfo of class EffectModelScript */ +#ifndef TOLUA_DISABLE_tolua__EffectModelScript_PrintLuaInfo00 +static int tolua__EffectModelScript_PrintLuaInfo00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"EffectModelScript",0,&tolua_err) || + !tolua_isstring(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const char* pStr = ((const char*) tolua_tostring(tolua_S,2,0)); + { + EffectModelScript::PrintLuaInfo(pStr); + } + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'PrintLuaInfo'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: SetTransformationMatrix of class EffectModelScript */ +#ifndef TOLUA_DISABLE_tolua__EffectModelScript_SetTransformationMatrix00 +static int tolua__EffectModelScript_SetTransformationMatrix00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"EffectModelScript",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const LuaMatrix4",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,4,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + EffectModelScript* self = (EffectModelScript*) tolua_tousertype(tolua_S,1,0); + long graphicalSurfaceID = ((long) tolua_tonumber(tolua_S,2,0)); + const LuaMatrix4* luaMatrix4 = ((const LuaMatrix4*) tolua_tousertype(tolua_S,3,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetTransformationMatrix'", NULL); +#endif + { + bool tolua_ret = (bool) self->SetTransformationMatrix(graphicalSurfaceID,*luaMatrix4); + tolua_pushboolean(tolua_S,(bool)tolua_ret); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'SetTransformationMatrix'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: AddUnitLight of class EffectModelScript */ +#ifndef TOLUA_DISABLE_tolua__EffectModelScript_AddUnitLight00 +static int tolua__EffectModelScript_AddUnitLight00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"EffectModelScript",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"UnitLight",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + EffectModelScript* self = (EffectModelScript*) tolua_tousertype(tolua_S,1,0); + UnitLight* unitLight = ((UnitLight*) tolua_tousertype(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'AddUnitLight'", NULL); +#endif + { + bool tolua_ret = (bool) self->AddUnitLight(*unitLight); + tolua_pushboolean(tolua_S,(bool)tolua_ret); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'AddUnitLight'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: RemoveUnitLight of class EffectModelScript */ +#ifndef TOLUA_DISABLE_tolua__EffectModelScript_RemoveUnitLight00 +static int tolua__EffectModelScript_RemoveUnitLight00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"EffectModelScript",0,&tolua_err) || + !tolua_iscppstring(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + EffectModelScript* self = (EffectModelScript*) tolua_tousertype(tolua_S,1,0); + const string name = ((const string) tolua_tocppstring(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RemoveUnitLight'", NULL); +#endif + { + bool tolua_ret = (bool) self->RemoveUnitLight(name); + tolua_pushboolean(tolua_S,(bool)tolua_ret); + tolua_pushcppstring(tolua_S,(const char*)name); + } + } + return 2; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'RemoveUnitLight'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: RemoveAllUnitsLightType of class EffectModelScript */ +#ifndef TOLUA_DISABLE_tolua__EffectModelScript_RemoveAllUnitsLightType00 +static int tolua__EffectModelScript_RemoveAllUnitsLightType00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"EffectModelScript",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + EffectModelScript* self = (EffectModelScript*) tolua_tousertype(tolua_S,1,0); + TypeUnitLight typeUnitLight = ((TypeUnitLight) (int) tolua_tonumber(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RemoveAllUnitsLightType'", NULL); +#endif + { + bool tolua_ret = (bool) self->RemoveAllUnitsLightType(typeUnitLight); + tolua_pushboolean(tolua_S,(bool)tolua_ret); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'RemoveAllUnitsLightType'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: GetUnitLight of class EffectModelScript */ +#ifndef TOLUA_DISABLE_tolua__EffectModelScript_GetUnitLight00 +static int tolua__EffectModelScript_GetUnitLight00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const EffectModelScript",0,&tolua_err) || + !tolua_iscppstring(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const EffectModelScript* self = (const EffectModelScript*) tolua_tousertype(tolua_S,1,0); + const string name = ((const string) tolua_tocppstring(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetUnitLight'", NULL); +#endif + { + PropertyCast tolua_ret = (PropertyCast) self->GetUnitLight(name); + { +#ifdef __cplusplus + void* tolua_obj = Mtolua_new((PropertyCast)(tolua_ret)); + tolua_pushusertype(tolua_S,tolua_obj,"PropertyCast"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#else + void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(PropertyCast)); + tolua_pushusertype(tolua_S,tolua_obj,"PropertyCast"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#endif + } + tolua_pushcppstring(tolua_S,(const char*)name); + } + } + return 2; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'GetUnitLight'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: SetLightAmbientColour of class EffectModelScript */ +#ifndef TOLUA_DISABLE_tolua__EffectModelScript_SetLightAmbientColour00 +static int tolua__EffectModelScript_SetLightAmbientColour00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"EffectModelScript",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + EffectModelScript* self = (EffectModelScript*) tolua_tousertype(tolua_S,1,0); + const Vector3* ambientColour = ((const Vector3*) tolua_tousertype(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetLightAmbientColour'", NULL); +#endif + { + self->SetLightAmbientColour(*ambientColour); + } + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'SetLightAmbientColour'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: SetLightAmbientColour of class EffectModelScript */ +#ifndef TOLUA_DISABLE_tolua__EffectModelScript_SetLightAmbientColour01 +static int tolua__EffectModelScript_SetLightAmbientColour01(lua_State* tolua_S) +{ + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"EffectModelScript",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnoobj(tolua_S,5,&tolua_err) + ) + goto tolua_lerror; + else + { + EffectModelScript* self = (EffectModelScript*) tolua_tousertype(tolua_S,1,0); + float red = ((float) tolua_tonumber(tolua_S,2,0)); + float green = ((float) tolua_tonumber(tolua_S,3,0)); + float blue = ((float) tolua_tonumber(tolua_S,4,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetLightAmbientColour'", NULL); +#endif + { + self->SetLightAmbientColour(red,green,blue); + } + } + return 0; +tolua_lerror: + return tolua__EffectModelScript_SetLightAmbientColour00(tolua_S); +} +#endif //#ifndef TOLUA_DISABLE + +/* method: SetLightIntensity of class EffectModelScript */ +#ifndef TOLUA_DISABLE_tolua__EffectModelScript_SetLightIntensity00 +static int tolua__EffectModelScript_SetLightIntensity00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"EffectModelScript",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + EffectModelScript* self = (EffectModelScript*) tolua_tousertype(tolua_S,1,0); + float intensity = ((float) tolua_tonumber(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetLightIntensity'", NULL); +#endif + { + self->SetLightIntensity(intensity); + } + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'SetLightIntensity'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: SetLightAttenuation of class EffectModelScript */ +#ifndef TOLUA_DISABLE_tolua__EffectModelScript_SetLightAttenuation00 +static int tolua__EffectModelScript_SetLightAttenuation00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"EffectModelScript",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + EffectModelScript* self = (EffectModelScript*) tolua_tousertype(tolua_S,1,0); + float attenuation = ((float) tolua_tonumber(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetLightAttenuation'", NULL); +#endif + { + self->SetLightAttenuation(attenuation); + } + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'SetLightAttenuation'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: GetLightAmbientColour of class EffectModelScript */ +#ifndef TOLUA_DISABLE_tolua__EffectModelScript_GetLightAmbientColour00 +static int tolua__EffectModelScript_GetLightAmbientColour00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const EffectModelScript",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const EffectModelScript* self = (const EffectModelScript*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetLightAmbientColour'", NULL); +#endif + { + const Vector3& tolua_ret = (const Vector3&) self->GetLightAmbientColour(); + { +#ifdef __cplusplus + void* tolua_obj = Mtolua_new((Vector3)(tolua_ret)); + tolua_pushusertype(tolua_S,tolua_obj,"const Vector3"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#else + void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(const Vector3)); + tolua_pushusertype(tolua_S,tolua_obj,"const Vector3"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#endif + } + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'GetLightAmbientColour'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: GetLightIntensity of class EffectModelScript */ +#ifndef TOLUA_DISABLE_tolua__EffectModelScript_GetLightIntensity00 +static int tolua__EffectModelScript_GetLightIntensity00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const EffectModelScript",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const EffectModelScript* self = (const EffectModelScript*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetLightIntensity'", NULL); +#endif + { + float tolua_ret = (float) self->GetLightIntensity(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'GetLightIntensity'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: GetLightAttenuation of class EffectModelScript */ +#ifndef TOLUA_DISABLE_tolua__EffectModelScript_GetLightAttenuation00 +static int tolua__EffectModelScript_GetLightAttenuation00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const EffectModelScript",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const EffectModelScript* self = (const EffectModelScript*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetLightAttenuation'", NULL); +#endif + { + float tolua_ret = (float) self->GetLightAttenuation(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'GetLightAttenuation'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: currentPosition of class TouchEventScript */ +#ifndef TOLUA_DISABLE_tolua_get_TouchEventScript_currentPosition +static int tolua_get_TouchEventScript_currentPosition(lua_State* tolua_S) +{ + TouchEventScript* self = (TouchEventScript*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'currentPosition'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->currentPosition,"Vector3"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: currentPosition of class TouchEventScript */ +#ifndef TOLUA_DISABLE_tolua_set_TouchEventScript_currentPosition +static int tolua_set_TouchEventScript_currentPosition(lua_State* tolua_S) +{ + TouchEventScript* self = (TouchEventScript*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'currentPosition'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"Vector3",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->currentPosition = *((Vector3*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: startPosition of class TouchEventScript */ +#ifndef TOLUA_DISABLE_tolua_get_TouchEventScript_startPosition +static int tolua_get_TouchEventScript_startPosition(lua_State* tolua_S) +{ + TouchEventScript* self = (TouchEventScript*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'startPosition'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->startPosition,"Vector3"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: startPosition of class TouchEventScript */ +#ifndef TOLUA_DISABLE_tolua_set_TouchEventScript_startPosition +static int tolua_set_TouchEventScript_startPosition(lua_State* tolua_S) +{ + TouchEventScript* self = (TouchEventScript*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'startPosition'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"Vector3",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->startPosition = *((Vector3*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: touchId of class TouchEventScript */ +#ifndef TOLUA_DISABLE_tolua_get_TouchEventScript_unsigned_touchId +static int tolua_get_TouchEventScript_unsigned_touchId(lua_State* tolua_S) +{ + TouchEventScript* self = (TouchEventScript*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'touchId'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->touchId); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: touchId of class TouchEventScript */ +#ifndef TOLUA_DISABLE_tolua_set_TouchEventScript_unsigned_touchId +static int tolua_set_TouchEventScript_unsigned_touchId(lua_State* tolua_S) +{ + TouchEventScript* self = (TouchEventScript*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'touchId'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->touchId = ((unsigned long) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: type of class PropertyCast */ +#ifndef TOLUA_DISABLE_tolua_get_PropertyCast_type +static int tolua_get_PropertyCast_type(lua_State* tolua_S) +{ + PropertyCast* self = (PropertyCast*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'type'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->type); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: numberValue of class TypeValue */ +#ifndef TOLUA_DISABLE_tolua_get_PropertyCast__TypeValue_numberValue +static int tolua_get_PropertyCast__TypeValue_numberValue(lua_State* tolua_S) +{ + PropertyCast::TypeValue* self = (PropertyCast::TypeValue*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'numberValue'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->numberValue); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: numberValue of class TypeValue */ +#ifndef TOLUA_DISABLE_tolua_set_PropertyCast__TypeValue_numberValue +static int tolua_set_PropertyCast__TypeValue_numberValue(lua_State* tolua_S) +{ + PropertyCast::TypeValue* self = (PropertyCast::TypeValue*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'numberValue'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->numberValue = ((LUA_NUMBER) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: boolValue of class TypeValue */ +#ifndef TOLUA_DISABLE_tolua_get_PropertyCast__TypeValue_boolValue +static int tolua_get_PropertyCast__TypeValue_boolValue(lua_State* tolua_S) +{ + PropertyCast::TypeValue* self = (PropertyCast::TypeValue*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'boolValue'",NULL); +#endif + tolua_pushboolean(tolua_S,(bool)self->boolValue); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: boolValue of class TypeValue */ +#ifndef TOLUA_DISABLE_tolua_set_PropertyCast__TypeValue_boolValue +static int tolua_set_PropertyCast__TypeValue_boolValue(lua_State* tolua_S) +{ + PropertyCast::TypeValue* self = (PropertyCast::TypeValue*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'boolValue'",NULL); + if (!tolua_isboolean(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->boolValue = ((bool) tolua_toboolean(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: vec3Value of class TypeValue */ +#ifndef TOLUA_DISABLE_tolua_get_PropertyCast__TypeValue_vec3Value_ptr +static int tolua_get_PropertyCast__TypeValue_vec3Value_ptr(lua_State* tolua_S) +{ + PropertyCast::TypeValue* self = (PropertyCast::TypeValue*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'vec3Value'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)self->vec3Value,"Vector3"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: vecVecValue of class TypeValue */ +#ifndef TOLUA_DISABLE_tolua_get_PropertyCast__TypeValue_vecVecValue_ptr +static int tolua_get_PropertyCast__TypeValue_vecVecValue_ptr(lua_State* tolua_S) +{ + PropertyCast::TypeValue* self = (PropertyCast::TypeValue*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'vecVecValue'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)self->vecVecValue,"EffectsVector >"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: pPointLight of class TypeValue */ +#ifndef TOLUA_DISABLE_tolua_get_PropertyCast__TypeValue_pPointLight_ptr +static int tolua_get_PropertyCast__TypeValue_pPointLight_ptr(lua_State* tolua_S) +{ + PropertyCast::TypeValue* self = (PropertyCast::TypeValue*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'pPointLight'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)self->pPointLight,"PointLight"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: pPointLight of class TypeValue */ +#ifndef TOLUA_DISABLE_tolua_set_PropertyCast__TypeValue_pPointLight_ptr +static int tolua_set_PropertyCast__TypeValue_pPointLight_ptr(lua_State* tolua_S) +{ + PropertyCast::TypeValue* self = (PropertyCast::TypeValue*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'pPointLight'",NULL); + if (!tolua_isusertype(tolua_S,2,"PointLight",0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->pPointLight = ((PointLight*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: pSpotLight of class TypeValue */ +#ifndef TOLUA_DISABLE_tolua_get_PropertyCast__TypeValue_pSpotLight_ptr +static int tolua_get_PropertyCast__TypeValue_pSpotLight_ptr(lua_State* tolua_S) +{ + PropertyCast::TypeValue* self = (PropertyCast::TypeValue*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'pSpotLight'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)self->pSpotLight,"SpotLight"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: pSpotLight of class TypeValue */ +#ifndef TOLUA_DISABLE_tolua_set_PropertyCast__TypeValue_pSpotLight_ptr +static int tolua_set_PropertyCast__TypeValue_pSpotLight_ptr(lua_State* tolua_S) +{ + PropertyCast::TypeValue* self = (PropertyCast::TypeValue*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'pSpotLight'",NULL); + if (!tolua_isusertype(tolua_S,2,"SpotLight",0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->pSpotLight = ((SpotLight*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: pDirectionalLight of class TypeValue */ +#ifndef TOLUA_DISABLE_tolua_get_PropertyCast__TypeValue_pDirectionalLight_ptr +static int tolua_get_PropertyCast__TypeValue_pDirectionalLight_ptr(lua_State* tolua_S) +{ + PropertyCast::TypeValue* self = (PropertyCast::TypeValue*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'pDirectionalLight'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)self->pDirectionalLight,"DirectionalLight"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: pDirectionalLight of class TypeValue */ +#ifndef TOLUA_DISABLE_tolua_set_PropertyCast__TypeValue_pDirectionalLight_ptr +static int tolua_set_PropertyCast__TypeValue_pDirectionalLight_ptr(lua_State* tolua_S) +{ + PropertyCast::TypeValue* self = (PropertyCast::TypeValue*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'pDirectionalLight'",NULL); + if (!tolua_isusertype(tolua_S,2,"DirectionalLight",0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->pDirectionalLight = ((DirectionalLight*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: value of class PropertyCast */ +#ifndef TOLUA_DISABLE_tolua_get_PropertyCast_value +static int tolua_get_PropertyCast_value(lua_State* tolua_S) +{ + PropertyCast* self = (PropertyCast*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'value'",NULL); +#endif + tolua_pushusertype(tolua_S,(void*)&self->value,"PropertyCast::TypeValue"); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: value of class PropertyCast */ +#ifndef TOLUA_DISABLE_tolua_set_PropertyCast_value +static int tolua_set_PropertyCast_value(lua_State* tolua_S) +{ + PropertyCast* self = (PropertyCast*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'value'",NULL); + if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"PropertyCast::TypeValue",0,&tolua_err))) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->value = *((PropertyCast::TypeValue*) tolua_tousertype(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* method: GetEnabled of class UnitLight */ +#ifndef TOLUA_DISABLE_tolua__UnitLight_GetEnabled00 +static int tolua__UnitLight_GetEnabled00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const UnitLight",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const UnitLight* self = (const UnitLight*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetEnabled'", NULL); +#endif + { + bool tolua_ret = (bool) self->GetEnabled(); + tolua_pushboolean(tolua_S,(bool)tolua_ret); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'GetEnabled'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: GetColour of class UnitLight */ +#ifndef TOLUA_DISABLE_tolua__UnitLight_GetColour00 +static int tolua__UnitLight_GetColour00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const UnitLight",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const UnitLight* self = (const UnitLight*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetColour'", NULL); +#endif + { + const Vector3& tolua_ret = (const Vector3&) self->GetColour(); + { +#ifdef __cplusplus + void* tolua_obj = Mtolua_new((Vector3)(tolua_ret)); + tolua_pushusertype(tolua_S,tolua_obj,"const Vector3"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#else + void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(const Vector3)); + tolua_pushusertype(tolua_S,tolua_obj,"const Vector3"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#endif + } + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'GetColour'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: GetIntensity of class UnitLight */ +#ifndef TOLUA_DISABLE_tolua__UnitLight_GetIntensity00 +static int tolua__UnitLight_GetIntensity00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const UnitLight",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const UnitLight* self = (const UnitLight*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetIntensity'", NULL); +#endif + { + float tolua_ret = (float) self->GetIntensity(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'GetIntensity'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: GetName of class UnitLight */ +#ifndef TOLUA_DISABLE_tolua__UnitLight_GetName00 +static int tolua__UnitLight_GetName00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const UnitLight",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const UnitLight* self = (const UnitLight*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetName'", NULL); +#endif + { + const std::string tolua_ret = (const std::string) self->GetName(); + tolua_pushcppstring(tolua_S,(const char*)tolua_ret); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'GetName'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: SetEnabled of class UnitLight */ +#ifndef TOLUA_DISABLE_tolua__UnitLight_SetEnabled00 +static int tolua__UnitLight_SetEnabled00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"UnitLight",0,&tolua_err) || + !tolua_isboolean(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + UnitLight* self = (UnitLight*) tolua_tousertype(tolua_S,1,0); + bool isEnabled = ((bool) tolua_toboolean(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetEnabled'", NULL); +#endif + { + self->SetEnabled(isEnabled); + } + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'SetEnabled'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: SetColour of class UnitLight */ +#ifndef TOLUA_DISABLE_tolua__UnitLight_SetColour00 +static int tolua__UnitLight_SetColour00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"UnitLight",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + UnitLight* self = (UnitLight*) tolua_tousertype(tolua_S,1,0); + const Vector3* colour = ((const Vector3*) tolua_tousertype(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetColour'", NULL); +#endif + { + self->SetColour(*colour); + } + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'SetColour'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: SetColour of class UnitLight */ +#ifndef TOLUA_DISABLE_tolua__UnitLight_SetColour01 +static int tolua__UnitLight_SetColour01(lua_State* tolua_S) +{ + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"UnitLight",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnoobj(tolua_S,5,&tolua_err) + ) + goto tolua_lerror; + else + { + UnitLight* self = (UnitLight*) tolua_tousertype(tolua_S,1,0); + float red = ((float) tolua_tonumber(tolua_S,2,0)); + float green = ((float) tolua_tonumber(tolua_S,3,0)); + float blue = ((float) tolua_tonumber(tolua_S,4,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetColour'", NULL); +#endif + { + self->SetColour(red,green,blue); + } + } + return 0; +tolua_lerror: + return tolua__UnitLight_SetColour00(tolua_S); +} +#endif //#ifndef TOLUA_DISABLE + +/* method: SetIntensity of class UnitLight */ +#ifndef TOLUA_DISABLE_tolua__UnitLight_SetIntensity00 +static int tolua__UnitLight_SetIntensity00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"UnitLight",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + UnitLight* self = (UnitLight*) tolua_tousertype(tolua_S,1,0); + float intensity = ((float) tolua_tonumber(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetIntensity'", NULL); +#endif + { + self->SetIntensity(intensity); + } + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'SetIntensity'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: CreatePointLight of class PointLight */ +#ifndef TOLUA_DISABLE_tolua__PointLight_CreatePointLight00 +static int tolua__PointLight_CreatePointLight00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"PointLight",0,&tolua_err) || + !tolua_iscppstring(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const string name = ((const string) tolua_tocppstring(tolua_S,2,0)); + { + PointLight* tolua_ret = (PointLight*) PointLight::CreatePointLight(name); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"PointLight"); + tolua_pushcppstring(tolua_S,(const char*)name); + } + } + return 2; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'CreatePointLight'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: GetPosition of class PointLight */ +#ifndef TOLUA_DISABLE_tolua__PointLight_GetPosition00 +static int tolua__PointLight_GetPosition00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const PointLight",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const PointLight* self = (const PointLight*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetPosition'", NULL); +#endif + { + const Vector3& tolua_ret = (const Vector3&) self->GetPosition(); + { +#ifdef __cplusplus + void* tolua_obj = Mtolua_new((Vector3)(tolua_ret)); + tolua_pushusertype(tolua_S,tolua_obj,"const Vector3"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#else + void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(const Vector3)); + tolua_pushusertype(tolua_S,tolua_obj,"const Vector3"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#endif + } + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'GetPosition'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: SetPosition of class PointLight */ +#ifndef TOLUA_DISABLE_tolua__PointLight_SetPosition00 +static int tolua__PointLight_SetPosition00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"PointLight",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + PointLight* self = (PointLight*) tolua_tousertype(tolua_S,1,0); + const Vector3* position = ((const Vector3*) tolua_tousertype(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetPosition'", NULL); +#endif + { + self->SetPosition(*position); + } + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'SetPosition'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: SetPosition of class PointLight */ +#ifndef TOLUA_DISABLE_tolua__PointLight_SetPosition01 +static int tolua__PointLight_SetPosition01(lua_State* tolua_S) +{ + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"PointLight",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnoobj(tolua_S,5,&tolua_err) + ) + goto tolua_lerror; + else + { + PointLight* self = (PointLight*) tolua_tousertype(tolua_S,1,0); + float x = ((float) tolua_tonumber(tolua_S,2,0)); + float y = ((float) tolua_tonumber(tolua_S,3,0)); + float z = ((float) tolua_tonumber(tolua_S,4,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetPosition'", NULL); +#endif + { + self->SetPosition(x,y,z); + } + } + return 0; +tolua_lerror: + return tolua__PointLight_SetPosition00(tolua_S); +} +#endif //#ifndef TOLUA_DISABLE + +/* method: CreateSpotLight of class SpotLight */ +#ifndef TOLUA_DISABLE_tolua__SpotLight_CreateSpotLight00 +static int tolua__SpotLight_CreateSpotLight00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"SpotLight",0,&tolua_err) || + !tolua_iscppstring(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const string name = ((const string) tolua_tocppstring(tolua_S,2,0)); + { + SpotLight* tolua_ret = (SpotLight*) SpotLight::CreateSpotLight(name); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"SpotLight"); + tolua_pushcppstring(tolua_S,(const char*)name); + } + } + return 2; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'CreateSpotLight'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: GetTarget of class SpotLight */ +#ifndef TOLUA_DISABLE_tolua__SpotLight_GetTarget00 +static int tolua__SpotLight_GetTarget00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const SpotLight",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const SpotLight* self = (const SpotLight*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetTarget'", NULL); +#endif + { + const Vector3& tolua_ret = (const Vector3&) self->GetTarget(); + { +#ifdef __cplusplus + void* tolua_obj = Mtolua_new((Vector3)(tolua_ret)); + tolua_pushusertype(tolua_S,tolua_obj,"const Vector3"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#else + void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(const Vector3)); + tolua_pushusertype(tolua_S,tolua_obj,"const Vector3"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#endif + } + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'GetTarget'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: GetAngleOpening of class SpotLight */ +#ifndef TOLUA_DISABLE_tolua__SpotLight_GetAngleOpening00 +static int tolua__SpotLight_GetAngleOpening00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const SpotLight",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const SpotLight* self = (const SpotLight*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetAngleOpening'", NULL); +#endif + { + float tolua_ret = (float) self->GetAngleOpening(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'GetAngleOpening'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: GetAngleFadeOut of class SpotLight */ +#ifndef TOLUA_DISABLE_tolua__SpotLight_GetAngleFadeOut00 +static int tolua__SpotLight_GetAngleFadeOut00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const SpotLight",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const SpotLight* self = (const SpotLight*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetAngleFadeOut'", NULL); +#endif + { + float tolua_ret = (float) self->GetAngleFadeOut(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'GetAngleFadeOut'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: SetTarget of class SpotLight */ +#ifndef TOLUA_DISABLE_tolua__SpotLight_SetTarget00 +static int tolua__SpotLight_SetTarget00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"SpotLight",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + SpotLight* self = (SpotLight*) tolua_tousertype(tolua_S,1,0); + const Vector3* target = ((const Vector3*) tolua_tousertype(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetTarget'", NULL); +#endif + { + self->SetTarget(*target); + } + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'SetTarget'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: SetTarget of class SpotLight */ +#ifndef TOLUA_DISABLE_tolua__SpotLight_SetTarget01 +static int tolua__SpotLight_SetTarget01(lua_State* tolua_S) +{ + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"SpotLight",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnoobj(tolua_S,5,&tolua_err) + ) + goto tolua_lerror; + else + { + SpotLight* self = (SpotLight*) tolua_tousertype(tolua_S,1,0); + float x = ((float) tolua_tonumber(tolua_S,2,0)); + float y = ((float) tolua_tonumber(tolua_S,3,0)); + float z = ((float) tolua_tonumber(tolua_S,4,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetTarget'", NULL); +#endif + { + self->SetTarget(x,y,z); + } + } + return 0; +tolua_lerror: + return tolua__SpotLight_SetTarget00(tolua_S); +} +#endif //#ifndef TOLUA_DISABLE + +/* method: SetAngleOpening of class SpotLight */ +#ifndef TOLUA_DISABLE_tolua__SpotLight_SetAngleOpening00 +static int tolua__SpotLight_SetAngleOpening00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"SpotLight",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + SpotLight* self = (SpotLight*) tolua_tousertype(tolua_S,1,0); + float angleOpening = ((float) tolua_tonumber(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetAngleOpening'", NULL); +#endif + { + bool tolua_ret = (bool) self->SetAngleOpening(angleOpening); + tolua_pushboolean(tolua_S,(bool)tolua_ret); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'SetAngleOpening'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: SetAngleFadeOut of class SpotLight */ +#ifndef TOLUA_DISABLE_tolua__SpotLight_SetAngleFadeOut00 +static int tolua__SpotLight_SetAngleFadeOut00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"SpotLight",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + SpotLight* self = (SpotLight*) tolua_tousertype(tolua_S,1,0); + float angleFadeOut = ((float) tolua_tonumber(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetAngleFadeOut'", NULL); +#endif + { + bool tolua_ret = (bool) self->SetAngleFadeOut(angleFadeOut); + tolua_pushboolean(tolua_S,(bool)tolua_ret); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'SetAngleFadeOut'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: CreateDirectionalLight of class DirectionalLight */ +#ifndef TOLUA_DISABLE_tolua__DirectionalLight_CreateDirectionalLight00 +static int tolua__DirectionalLight_CreateDirectionalLight00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"DirectionalLight",0,&tolua_err) || + !tolua_iscppstring(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const string name = ((const string) tolua_tocppstring(tolua_S,2,0)); + { + DirectionalLight* tolua_ret = (DirectionalLight*) DirectionalLight::CreateDirectionalLight(name); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"DirectionalLight"); + tolua_pushcppstring(tolua_S,(const char*)name); + } + } + return 2; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'CreateDirectionalLight'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: GetDirection of class DirectionalLight */ +#ifndef TOLUA_DISABLE_tolua__DirectionalLight_GetDirection00 +static int tolua__DirectionalLight_GetDirection00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const DirectionalLight",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const DirectionalLight* self = (const DirectionalLight*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetDirection'", NULL); +#endif + { + const Vector3& tolua_ret = (const Vector3&) self->GetDirection(); + { +#ifdef __cplusplus + void* tolua_obj = Mtolua_new((Vector3)(tolua_ret)); + tolua_pushusertype(tolua_S,tolua_obj,"const Vector3"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#else + void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(const Vector3)); + tolua_pushusertype(tolua_S,tolua_obj,"const Vector3"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#endif + } + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'GetDirection'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: SetDirection of class DirectionalLight */ +#ifndef TOLUA_DISABLE_tolua__DirectionalLight_SetDirection00 +static int tolua__DirectionalLight_SetDirection00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"DirectionalLight",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + DirectionalLight* self = (DirectionalLight*) tolua_tousertype(tolua_S,1,0); + const Vector3* direction = ((const Vector3*) tolua_tousertype(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetDirection'", NULL); +#endif + { + self->SetDirection(*direction); + } + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'SetDirection'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: SetDirection of class DirectionalLight */ +#ifndef TOLUA_DISABLE_tolua__DirectionalLight_SetDirection01 +static int tolua__DirectionalLight_SetDirection01(lua_State* tolua_S) +{ + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"DirectionalLight",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnoobj(tolua_S,5,&tolua_err) + ) + goto tolua_lerror; + else + { + DirectionalLight* self = (DirectionalLight*) tolua_tousertype(tolua_S,1,0); + float x = ((float) tolua_tonumber(tolua_S,2,0)); + float y = ((float) tolua_tonumber(tolua_S,3,0)); + float z = ((float) tolua_tonumber(tolua_S,4,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetDirection'", NULL); +#endif + { + self->SetDirection(x,y,z); + } + } + return 0; +tolua_lerror: + return tolua__DirectionalLight_SetDirection00(tolua_S); +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: x of class Vector3 */ +#ifndef TOLUA_DISABLE_tolua_get_Vector3_x +static int tolua_get_Vector3_x(lua_State* tolua_S) +{ + Vector3* self = (Vector3*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'x'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->x); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: x of class Vector3 */ +#ifndef TOLUA_DISABLE_tolua_set_Vector3_x +static int tolua_set_Vector3_x(lua_State* tolua_S) +{ + Vector3* self = (Vector3*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'x'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->x = ((float) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: y of class Vector3 */ +#ifndef TOLUA_DISABLE_tolua_get_Vector3_y +static int tolua_get_Vector3_y(lua_State* tolua_S) +{ + Vector3* self = (Vector3*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'y'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->y); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: y of class Vector3 */ +#ifndef TOLUA_DISABLE_tolua_set_Vector3_y +static int tolua_set_Vector3_y(lua_State* tolua_S) +{ + Vector3* self = (Vector3*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'y'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->y = ((float) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: z of class Vector3 */ +#ifndef TOLUA_DISABLE_tolua_get_Vector3_z +static int tolua_get_Vector3_z(lua_State* tolua_S) +{ + Vector3* self = (Vector3*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'z'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->z); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: z of class Vector3 */ +#ifndef TOLUA_DISABLE_tolua_set_Vector3_z +static int tolua_set_Vector3_z(lua_State* tolua_S) +{ + Vector3* self = (Vector3*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'z'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->z = ((float) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new of class Vector3 */ +#ifndef TOLUA_DISABLE_tolua__Vector3_new00 +static int tolua__Vector3_new00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"Vector3",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + { + Vector3* tolua_ret = (Vector3*) Mtolua_new((Vector3)()); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector3"); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new_local of class Vector3 */ +#ifndef TOLUA_DISABLE_tolua__Vector3_new00_local +static int tolua__Vector3_new00_local(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"Vector3",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + { + Vector3* tolua_ret = (Vector3*) Mtolua_new((Vector3)()); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector3"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new of class Vector3 */ +#ifndef TOLUA_DISABLE_tolua__Vector3_new01 +static int tolua__Vector3_new01(lua_State* tolua_S) +{ + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"Vector3",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnoobj(tolua_S,5,&tolua_err) + ) + goto tolua_lerror; + else + { + float _x = ((float) tolua_tonumber(tolua_S,2,0)); + float _y = ((float) tolua_tonumber(tolua_S,3,0)); + float _z = ((float) tolua_tonumber(tolua_S,4,0)); + { + Vector3* tolua_ret = (Vector3*) Mtolua_new((Vector3)(_x,_y,_z)); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector3"); + } + } + return 1; +tolua_lerror: + return tolua__Vector3_new00(tolua_S); +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new_local of class Vector3 */ +#ifndef TOLUA_DISABLE_tolua__Vector3_new01_local +static int tolua__Vector3_new01_local(lua_State* tolua_S) +{ + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"Vector3",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnoobj(tolua_S,5,&tolua_err) + ) + goto tolua_lerror; + else + { + float _x = ((float) tolua_tonumber(tolua_S,2,0)); + float _y = ((float) tolua_tonumber(tolua_S,3,0)); + float _z = ((float) tolua_tonumber(tolua_S,4,0)); + { + Vector3* tolua_ret = (Vector3*) Mtolua_new((Vector3)(_x,_y,_z)); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector3"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + } + } + return 1; +tolua_lerror: + return tolua__Vector3_new00_local(tolua_S); +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new of class Vector3 */ +#ifndef TOLUA_DISABLE_tolua__Vector3_new02 +static int tolua__Vector3_new02(lua_State* tolua_S) +{ + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"Vector3",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else + { + const Vector3* rhs = ((const Vector3*) tolua_tousertype(tolua_S,2,0)); + { + Vector3* tolua_ret = (Vector3*) Mtolua_new((Vector3)(*rhs)); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector3"); + } + } + return 1; +tolua_lerror: + return tolua__Vector3_new01(tolua_S); +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new_local of class Vector3 */ +#ifndef TOLUA_DISABLE_tolua__Vector3_new02_local +static int tolua__Vector3_new02_local(lua_State* tolua_S) +{ + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"Vector3",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else + { + const Vector3* rhs = ((const Vector3*) tolua_tousertype(tolua_S,2,0)); + { + Vector3* tolua_ret = (Vector3*) Mtolua_new((Vector3)(*rhs)); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector3"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + } + } + return 1; +tolua_lerror: + return tolua__Vector3_new01_local(tolua_S); +} +#endif //#ifndef TOLUA_DISABLE + +/* method: delete of class Vector3 */ +#ifndef TOLUA_DISABLE_tolua__Vector3_delete00 +static int tolua__Vector3_delete00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"Vector3",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + Vector3* self = (Vector3*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'delete'", NULL); +#endif + Mtolua_delete(self); + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'delete'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator- of class Vector3 */ +#ifndef TOLUA_DISABLE_tolua__Vector3__sub00 +static int tolua__Vector3__sub00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const Vector3",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const Vector3* self = (const Vector3*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator-'", NULL); +#endif + { + Vector3 tolua_ret = (Vector3) self->operator-(); + { +#ifdef __cplusplus + void* tolua_obj = Mtolua_new((Vector3)(tolua_ret)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector3"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#else + void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector3"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#endif + } + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.sub'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator+ of class Vector3 */ +#ifndef TOLUA_DISABLE_tolua__Vector3__add00 +static int tolua__Vector3__add00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const Vector3",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const Vector3* self = (const Vector3*) tolua_tousertype(tolua_S,1,0); + const Vector3* aRhv = ((const Vector3*) tolua_tousertype(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator+'", NULL); +#endif + { + Vector3 tolua_ret = (Vector3) self->operator+(*aRhv); + { +#ifdef __cplusplus + void* tolua_obj = Mtolua_new((Vector3)(tolua_ret)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector3"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#else + void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector3"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#endif + } + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.add'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator+ of class Vector3 */ +#ifndef TOLUA_DISABLE_tolua__Vector3__add01 +static int tolua__Vector3__add01(lua_State* tolua_S) +{ + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const Vector3",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else + { + const Vector3* self = (const Vector3*) tolua_tousertype(tolua_S,1,0); + const float aRhv = ((const float) tolua_tonumber(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator+'", NULL); +#endif + { + Vector3 tolua_ret = (Vector3) self->operator+(aRhv); + { +#ifdef __cplusplus + void* tolua_obj = Mtolua_new((Vector3)(tolua_ret)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector3"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#else + void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector3"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#endif + } + } + } + return 1; +tolua_lerror: + if ( + !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err) || + !tolua_isnumber(tolua_S,1,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror1; + else + { + const Vector3* self = (const Vector3*) tolua_tousertype(tolua_S,2,0); + const float aRhv = ((const float) tolua_tonumber(tolua_S,1,0)); + #ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator+'", NULL); + #endif + { + Vector3 tolua_ret = (Vector3) self->operator+(aRhv); + { + #ifdef __cplusplus + void* tolua_obj = Mtolua_new((Vector3)(tolua_ret)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector3"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + #else + void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector3"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + #endif + } + } + } + return 1; + tolua_lerror1: + return tolua__Vector3__add00(tolua_S); +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator- of class Vector3 */ +#ifndef TOLUA_DISABLE_tolua__Vector3__sub01 +static int tolua__Vector3__sub01(lua_State* tolua_S) +{ + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const Vector3",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else + { + const Vector3* self = (const Vector3*) tolua_tousertype(tolua_S,1,0); + const Vector3* aRhv = ((const Vector3*) tolua_tousertype(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator-'", NULL); +#endif + { + Vector3 tolua_ret = (Vector3) self->operator-(*aRhv); + { +#ifdef __cplusplus + void* tolua_obj = Mtolua_new((Vector3)(tolua_ret)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector3"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#else + void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector3"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#endif + } + } + } + return 1; +tolua_lerror: + return tolua__Vector3__sub00(tolua_S); +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator- of class Vector3 */ +#ifndef TOLUA_DISABLE_tolua__Vector3__sub02 +static int tolua__Vector3__sub02(lua_State* tolua_S) +{ + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const Vector3",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else + { + const Vector3* self = (const Vector3*) tolua_tousertype(tolua_S,1,0); + const float aRhv = ((const float) tolua_tonumber(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator-'", NULL); +#endif + { + Vector3 tolua_ret = (Vector3) self->operator-(aRhv); + { +#ifdef __cplusplus + void* tolua_obj = Mtolua_new((Vector3)(tolua_ret)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector3"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#else + void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector3"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#endif + } + } + } + return 1; +tolua_lerror: + return tolua__Vector3__sub01(tolua_S); +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator* of class Vector3 */ +#ifndef TOLUA_DISABLE_tolua__Vector3__mul00 +static int tolua__Vector3__mul00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const Vector3",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const Vector3* self = (const Vector3*) tolua_tousertype(tolua_S,1,0); + const Vector3* aRhv = ((const Vector3*) tolua_tousertype(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL); +#endif + { + Vector3 tolua_ret = (Vector3) self->operator*(*aRhv); + { +#ifdef __cplusplus + void* tolua_obj = Mtolua_new((Vector3)(tolua_ret)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector3"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#else + void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector3"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#endif + } + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.mul'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator* of class Vector3 */ +#ifndef TOLUA_DISABLE_tolua__Vector3__mul01 +static int tolua__Vector3__mul01(lua_State* tolua_S) +{ + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const Vector3",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else + { + const Vector3* self = (const Vector3*) tolua_tousertype(tolua_S,1,0); + const float aRhv = ((const float) tolua_tonumber(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL); +#endif + { + Vector3 tolua_ret = (Vector3) self->operator*(aRhv); + { +#ifdef __cplusplus + void* tolua_obj = Mtolua_new((Vector3)(tolua_ret)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector3"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#else + void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector3"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#endif + } + } + } + return 1; +tolua_lerror: + if ( + !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err) || + !tolua_isnumber(tolua_S,1,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror1; + else + { + const Vector3* self = (const Vector3*) tolua_tousertype(tolua_S,2,0); + const float aRhv = ((const float) tolua_tonumber(tolua_S,1,0)); + #ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL); + #endif + { + Vector3 tolua_ret = (Vector3) self->operator*(aRhv); + { + #ifdef __cplusplus + void* tolua_obj = Mtolua_new((Vector3)(tolua_ret)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector3"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + #else + void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector3"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + #endif + } + } + } + return 1; + tolua_lerror1: + return tolua__Vector3__mul00(tolua_S); +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator/ of class Vector3 */ +#ifndef TOLUA_DISABLE_tolua__Vector3__div00 +static int tolua__Vector3__div00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const Vector3",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const Vector3* self = (const Vector3*) tolua_tousertype(tolua_S,1,0); + const Vector3* aRhv = ((const Vector3*) tolua_tousertype(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator/'", NULL); +#endif + { + Vector3 tolua_ret = (Vector3) self->operator/(*aRhv); + { +#ifdef __cplusplus + void* tolua_obj = Mtolua_new((Vector3)(tolua_ret)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector3"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#else + void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector3"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#endif + } + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.div'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator/ of class Vector3 */ +#ifndef TOLUA_DISABLE_tolua__Vector3__div01 +static int tolua__Vector3__div01(lua_State* tolua_S) +{ + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const Vector3",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else + { + const Vector3* self = (const Vector3*) tolua_tousertype(tolua_S,1,0); + const float aRhv = ((const float) tolua_tonumber(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator/'", NULL); +#endif + { + Vector3 tolua_ret = (Vector3) self->operator/(aRhv); + { +#ifdef __cplusplus + void* tolua_obj = Mtolua_new((Vector3)(tolua_ret)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector3"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#else + void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector3"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#endif + } + } + } + return 1; +tolua_lerror: + return tolua__Vector3__div00(tolua_S); +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator== of class Vector3 */ +#ifndef TOLUA_DISABLE_tolua__Vector3__eq00 +static int tolua__Vector3__eq00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const Vector3",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const Vector3* self = (const Vector3*) tolua_tousertype(tolua_S,1,0); + const Vector3* aRhv = ((const Vector3*) tolua_tousertype(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator=='", NULL); +#endif + { + bool tolua_ret = (bool) self->operator==(*aRhv); + tolua_pushboolean(tolua_S,(bool)tolua_ret); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.eq'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: GetCrossVector3 of class Vector3 */ +#ifndef TOLUA_DISABLE_tolua__Vector3_GetCrossVector300 +static int tolua__Vector3_GetCrossVector300(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"Vector3",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + Vector3* self = (Vector3*) tolua_tousertype(tolua_S,1,0); + const Vector3* aOther = ((const Vector3*) tolua_tousertype(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetCrossVector3'", NULL); +#endif + { + Vector3& tolua_ret = (Vector3&) self->GetCrossVector3(*aOther); + { +#ifdef __cplusplus + void* tolua_obj = Mtolua_new((Vector3)(tolua_ret)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector3"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#else + void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector3"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#endif + } + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'GetCrossVector3'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: GetNormalizedVector3 of class Vector3 */ +#ifndef TOLUA_DISABLE_tolua__Vector3_GetNormalizedVector300 +static int tolua__Vector3_GetNormalizedVector300(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"Vector3",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + Vector3* self = (Vector3*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetNormalizedVector3'", NULL); +#endif + { + Vector3& tolua_ret = (Vector3&) self->GetNormalizedVector3(); + { +#ifdef __cplusplus + void* tolua_obj = Mtolua_new((Vector3)(tolua_ret)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector3"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#else + void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector3"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#endif + } + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'GetNormalizedVector3'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: x of class Vector2 */ +#ifndef TOLUA_DISABLE_tolua_get_Vector2_x +static int tolua_get_Vector2_x(lua_State* tolua_S) +{ + Vector2* self = (Vector2*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'x'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->x); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: x of class Vector2 */ +#ifndef TOLUA_DISABLE_tolua_set_Vector2_x +static int tolua_set_Vector2_x(lua_State* tolua_S) +{ + Vector2* self = (Vector2*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'x'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->x = ((float) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* get function: y of class Vector2 */ +#ifndef TOLUA_DISABLE_tolua_get_Vector2_y +static int tolua_get_Vector2_y(lua_State* tolua_S) +{ + Vector2* self = (Vector2*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'y'",NULL); +#endif + tolua_pushnumber(tolua_S,(lua_Number)self->y); + return 1; +} +#endif //#ifndef TOLUA_DISABLE + +/* set function: y of class Vector2 */ +#ifndef TOLUA_DISABLE_tolua_set_Vector2_y +static int tolua_set_Vector2_y(lua_State* tolua_S) +{ + Vector2* self = (Vector2*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'y'",NULL); + if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err); +#endif + self->y = ((float) tolua_tonumber(tolua_S,2,0)) +; + return 0; +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new of class Vector2 */ +#ifndef TOLUA_DISABLE_tolua__Vector2_new00 +static int tolua__Vector2_new00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"Vector2",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector2",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const Vector2* rhs = ((const Vector2*) tolua_tousertype(tolua_S,2,0)); + { + Vector2* tolua_ret = (Vector2*) Mtolua_new((Vector2)(*rhs)); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector2"); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new_local of class Vector2 */ +#ifndef TOLUA_DISABLE_tolua__Vector2_new00_local +static int tolua__Vector2_new00_local(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"Vector2",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector2",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const Vector2* rhs = ((const Vector2*) tolua_tousertype(tolua_S,2,0)); + { + Vector2* tolua_ret = (Vector2*) Mtolua_new((Vector2)(*rhs)); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector2"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new of class Vector2 */ +#ifndef TOLUA_DISABLE_tolua__Vector2_new01 +static int tolua__Vector2_new01(lua_State* tolua_S) +{ + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"Vector2",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnoobj(tolua_S,4,&tolua_err) + ) + goto tolua_lerror; + else + { + float _x = ((float) tolua_tonumber(tolua_S,2,0)); + float _y = ((float) tolua_tonumber(tolua_S,3,0)); + { + Vector2* tolua_ret = (Vector2*) Mtolua_new((Vector2)(_x,_y)); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector2"); + } + } + return 1; +tolua_lerror: + return tolua__Vector2_new00(tolua_S); +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new_local of class Vector2 */ +#ifndef TOLUA_DISABLE_tolua__Vector2_new01_local +static int tolua__Vector2_new01_local(lua_State* tolua_S) +{ + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"Vector2",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnoobj(tolua_S,4,&tolua_err) + ) + goto tolua_lerror; + else + { + float _x = ((float) tolua_tonumber(tolua_S,2,0)); + float _y = ((float) tolua_tonumber(tolua_S,3,0)); + { + Vector2* tolua_ret = (Vector2*) Mtolua_new((Vector2)(_x,_y)); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector2"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + } + } + return 1; +tolua_lerror: + return tolua__Vector2_new00_local(tolua_S); +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new of class Vector2 */ +#ifndef TOLUA_DISABLE_tolua__Vector2_new02 +static int tolua__Vector2_new02(lua_State* tolua_S) +{ + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"Vector2",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else + { + { + Vector2* tolua_ret = (Vector2*) Mtolua_new((Vector2)()); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector2"); + } + } + return 1; +tolua_lerror: + return tolua__Vector2_new01(tolua_S); +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new_local of class Vector2 */ +#ifndef TOLUA_DISABLE_tolua__Vector2_new02_local +static int tolua__Vector2_new02_local(lua_State* tolua_S) +{ + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"Vector2",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else + { + { + Vector2* tolua_ret = (Vector2*) Mtolua_new((Vector2)()); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector2"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + } + } + return 1; +tolua_lerror: + return tolua__Vector2_new01_local(tolua_S); +} +#endif //#ifndef TOLUA_DISABLE + +/* method: delete of class Vector2 */ +#ifndef TOLUA_DISABLE_tolua__Vector2_delete00 +static int tolua__Vector2_delete00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"Vector2",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + Vector2* self = (Vector2*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'delete'", NULL); +#endif + Mtolua_delete(self); + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'delete'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator- of class Vector2 */ +#ifndef TOLUA_DISABLE_tolua__Vector2__sub00 +static int tolua__Vector2__sub00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const Vector2",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const Vector2* self = (const Vector2*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator-'", NULL); +#endif + { + Vector2 tolua_ret = (Vector2) self->operator-(); + { +#ifdef __cplusplus + void* tolua_obj = Mtolua_new((Vector2)(tolua_ret)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector2"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#else + void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector2)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector2"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#endif + } + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.sub'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator+ of class Vector2 */ +#ifndef TOLUA_DISABLE_tolua__Vector2__add00 +static int tolua__Vector2__add00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const Vector2",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector2",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const Vector2* self = (const Vector2*) tolua_tousertype(tolua_S,1,0); + const Vector2* aRhv = ((const Vector2*) tolua_tousertype(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator+'", NULL); +#endif + { + Vector2 tolua_ret = (Vector2) self->operator+(*aRhv); + { +#ifdef __cplusplus + void* tolua_obj = Mtolua_new((Vector2)(tolua_ret)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector2"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#else + void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector2)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector2"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#endif + } + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.add'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator+ of class Vector2 */ +#ifndef TOLUA_DISABLE_tolua__Vector2__add01 +static int tolua__Vector2__add01(lua_State* tolua_S) +{ + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const Vector2",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else + { + const Vector2* self = (const Vector2*) tolua_tousertype(tolua_S,1,0); + const float aRhv = ((const float) tolua_tonumber(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator+'", NULL); +#endif + { + Vector2 tolua_ret = (Vector2) self->operator+(aRhv); + { +#ifdef __cplusplus + void* tolua_obj = Mtolua_new((Vector2)(tolua_ret)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector2"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#else + void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector2)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector2"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#endif + } + } + } + return 1; +tolua_lerror: + if ( + !tolua_isusertype(tolua_S,2,"const Vector2",0,&tolua_err) || + !tolua_isnumber(tolua_S,1,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror1; + else + { + const Vector2* self = (const Vector2*) tolua_tousertype(tolua_S,2,0); + const float aRhv = ((const float) tolua_tonumber(tolua_S,1,0)); + #ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator+'", NULL); + #endif + { + Vector2 tolua_ret = (Vector2) self->operator+(aRhv); + { + #ifdef __cplusplus + void* tolua_obj = Mtolua_new((Vector2)(tolua_ret)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector2"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + #else + void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector2)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector2"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + #endif + } + } + } + return 1; + tolua_lerror1: + return tolua__Vector2__add00(tolua_S); +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator- of class Vector2 */ +#ifndef TOLUA_DISABLE_tolua__Vector2__sub01 +static int tolua__Vector2__sub01(lua_State* tolua_S) +{ + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const Vector2",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector2",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else + { + const Vector2* self = (const Vector2*) tolua_tousertype(tolua_S,1,0); + const Vector2* aRhv = ((const Vector2*) tolua_tousertype(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator-'", NULL); +#endif + { + Vector2 tolua_ret = (Vector2) self->operator-(*aRhv); + { +#ifdef __cplusplus + void* tolua_obj = Mtolua_new((Vector2)(tolua_ret)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector2"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#else + void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector2)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector2"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#endif + } + } + } + return 1; +tolua_lerror: + return tolua__Vector2__sub00(tolua_S); +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator- of class Vector2 */ +#ifndef TOLUA_DISABLE_tolua__Vector2__sub02 +static int tolua__Vector2__sub02(lua_State* tolua_S) +{ + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const Vector2",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else + { + const Vector2* self = (const Vector2*) tolua_tousertype(tolua_S,1,0); + const float aRhv = ((const float) tolua_tonumber(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator-'", NULL); +#endif + { + Vector2 tolua_ret = (Vector2) self->operator-(aRhv); + { +#ifdef __cplusplus + void* tolua_obj = Mtolua_new((Vector2)(tolua_ret)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector2"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#else + void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector2)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector2"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#endif + } + } + } + return 1; +tolua_lerror: + return tolua__Vector2__sub01(tolua_S); +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator* of class Vector2 */ +#ifndef TOLUA_DISABLE_tolua__Vector2__mul00 +static int tolua__Vector2__mul00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const Vector2",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector2",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const Vector2* self = (const Vector2*) tolua_tousertype(tolua_S,1,0); + const Vector2* aRhv = ((const Vector2*) tolua_tousertype(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL); +#endif + { + Vector2 tolua_ret = (Vector2) self->operator*(*aRhv); + { +#ifdef __cplusplus + void* tolua_obj = Mtolua_new((Vector2)(tolua_ret)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector2"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#else + void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector2)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector2"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#endif + } + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.mul'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator* of class Vector2 */ +#ifndef TOLUA_DISABLE_tolua__Vector2__mul01 +static int tolua__Vector2__mul01(lua_State* tolua_S) +{ + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const Vector2",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else + { + const Vector2* self = (const Vector2*) tolua_tousertype(tolua_S,1,0); + const float aRhv = ((const float) tolua_tonumber(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL); +#endif + { + Vector2 tolua_ret = (Vector2) self->operator*(aRhv); + { +#ifdef __cplusplus + void* tolua_obj = Mtolua_new((Vector2)(tolua_ret)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector2"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#else + void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector2)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector2"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#endif + } + } + } + return 1; +tolua_lerror: + if ( + !tolua_isusertype(tolua_S,2,"const Vector2",0,&tolua_err) || + !tolua_isnumber(tolua_S,1,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror1; + else + { + const Vector2* self = (const Vector2*) tolua_tousertype(tolua_S,2,0); + const float aRhv = ((const float) tolua_tonumber(tolua_S,1,0)); + #ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL); + #endif + { + Vector2 tolua_ret = (Vector2) self->operator*(aRhv); + { + #ifdef __cplusplus + void* tolua_obj = Mtolua_new((Vector2)(tolua_ret)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector2"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + #else + void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector2)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector2"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + #endif + } + } + } + return 1; + tolua_lerror1: + return tolua__Vector2__mul00(tolua_S); +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator/ of class Vector2 */ +#ifndef TOLUA_DISABLE_tolua__Vector2__div00 +static int tolua__Vector2__div00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const Vector2",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector2",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const Vector2* self = (const Vector2*) tolua_tousertype(tolua_S,1,0); + const Vector2* aRhv = ((const Vector2*) tolua_tousertype(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator/'", NULL); +#endif + { + Vector2 tolua_ret = (Vector2) self->operator/(*aRhv); + { +#ifdef __cplusplus + void* tolua_obj = Mtolua_new((Vector2)(tolua_ret)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector2"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#else + void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector2)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector2"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#endif + } + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.div'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator/ of class Vector2 */ +#ifndef TOLUA_DISABLE_tolua__Vector2__div01 +static int tolua__Vector2__div01(lua_State* tolua_S) +{ + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const Vector2",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else + { + const Vector2* self = (const Vector2*) tolua_tousertype(tolua_S,1,0); + const float aRhv = ((const float) tolua_tonumber(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator/'", NULL); +#endif + { + Vector2 tolua_ret = (Vector2) self->operator/(aRhv); + { +#ifdef __cplusplus + void* tolua_obj = Mtolua_new((Vector2)(tolua_ret)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector2"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#else + void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector2)); + tolua_pushusertype(tolua_S,tolua_obj,"Vector2"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#endif + } + } + } + return 1; +tolua_lerror: + return tolua__Vector2__div00(tolua_S); +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator== of class Vector2 */ +#ifndef TOLUA_DISABLE_tolua__Vector2__eq00 +static int tolua__Vector2__eq00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const Vector2",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector2",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const Vector2* self = (const Vector2*) tolua_tousertype(tolua_S,1,0); + const Vector2* aRhv = ((const Vector2*) tolua_tousertype(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator=='", NULL); +#endif + { + bool tolua_ret = (bool) self->operator==(*aRhv); + tolua_pushboolean(tolua_S,(bool)tolua_ret); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.eq'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: GetSize of class EffectsVector > */ +#ifndef TOLUA_DISABLE_tolua__EffectsVector_EffectsVector_long____GetSize00 +static int tolua__EffectsVector_EffectsVector_long____GetSize00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const EffectsVector >",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const EffectsVector >* self = (const EffectsVector >*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetSize'", NULL); +#endif + { + long tolua_ret = (long) self->GetSize(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'GetSize'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator[] of class EffectsVector > */ +#ifndef TOLUA_DISABLE_tolua__EffectsVector_EffectsVector_long_____geti00 +static int tolua__EffectsVector_EffectsVector_long_____geti00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const EffectsVector >",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const EffectsVector >* self = (const EffectsVector >*) tolua_tousertype(tolua_S,1,0); + long index = ((long) tolua_tonumber(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator[]'", NULL); +#endif + if (index >= self->GetSize() || index < 0) + { + return luaL_error(tolua_S, "Attempt to get out of the array range (see operator[] calling)"); + } + { + const EffectsVector tolua_ret = (const EffectsVector) self->operator[](index); + { +#ifdef __cplusplus + void* tolua_obj = Mtolua_new((EffectsVector)(tolua_ret)); + tolua_pushusertype(tolua_S,tolua_obj,"const EffectsVector"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#else + void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(const EffectsVector)); + tolua_pushusertype(tolua_S,tolua_obj,"const EffectsVector"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#endif + } + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.geti'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: GetSize of class EffectsVector */ +#ifndef TOLUA_DISABLE_tolua__EffectsVector_long__GetSize00 +static int tolua__EffectsVector_long__GetSize00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const EffectsVector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const EffectsVector* self = (const EffectsVector*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetSize'", NULL); +#endif + { + long tolua_ret = (long) self->GetSize(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'GetSize'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator[] of class EffectsVector */ +#ifndef TOLUA_DISABLE_tolua__EffectsVector_long___geti00 +static int tolua__EffectsVector_long___geti00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const EffectsVector",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const EffectsVector* self = (const EffectsVector*) tolua_tousertype(tolua_S,1,0); + long index = ((long) tolua_tonumber(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator[]'", NULL); +#endif + if (index >= self->GetSize() || index < 0) + { + return luaL_error(tolua_S, "Attempt to get out of the array range (see operator[] calling)"); + } + { + const long tolua_ret = (const long) self->operator[](index); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.geti'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: GetSize of class EffectsVector */ +#ifndef TOLUA_DISABLE_tolua__EffectsVector_float__GetSize00 +static int tolua__EffectsVector_float__GetSize00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const EffectsVector",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const EffectsVector* self = (const EffectsVector*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetSize'", NULL); +#endif + { + long tolua_ret = (long) self->GetSize(); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'GetSize'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator[] of class EffectsVector */ +#ifndef TOLUA_DISABLE_tolua__EffectsVector_float___geti00 +static int tolua__EffectsVector_float___geti00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const EffectsVector",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const EffectsVector* self = (const EffectsVector*) tolua_tousertype(tolua_S,1,0); + long index = ((long) tolua_tonumber(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator[]'", NULL); +#endif + if (index >= self->GetSize() || index < 0) + { + return luaL_error(tolua_S, "Attempt to get out of the array range (see operator[] calling)"); + } + { + const float tolua_ret = (const float) self->operator[](index); + tolua_pushnumber(tolua_S,(lua_Number)tolua_ret); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.geti'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new of class LuaMatrix4 */ +#ifndef TOLUA_DISABLE_tolua__LuaMatrix4_new00 +static int tolua__LuaMatrix4_new00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"LuaMatrix4",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + { + LuaMatrix4* tolua_ret = (LuaMatrix4*) Mtolua_new((LuaMatrix4)()); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"LuaMatrix4"); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new_local of class LuaMatrix4 */ +#ifndef TOLUA_DISABLE_tolua__LuaMatrix4_new00_local +static int tolua__LuaMatrix4_new00_local(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"LuaMatrix4",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + { + LuaMatrix4* tolua_ret = (LuaMatrix4*) Mtolua_new((LuaMatrix4)()); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"LuaMatrix4"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new of class LuaMatrix4 */ +#ifndef TOLUA_DISABLE_tolua__LuaMatrix4_new01 +static int tolua__LuaMatrix4_new01(lua_State* tolua_S) +{ + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"LuaMatrix4",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else + { + float m = ((float) tolua_tonumber(tolua_S,2,0)); + { + LuaMatrix4* tolua_ret = (LuaMatrix4*) Mtolua_new((LuaMatrix4)(m)); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"LuaMatrix4"); + } + } + return 1; +tolua_lerror: + return tolua__LuaMatrix4_new00(tolua_S); +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new_local of class LuaMatrix4 */ +#ifndef TOLUA_DISABLE_tolua__LuaMatrix4_new01_local +static int tolua__LuaMatrix4_new01_local(lua_State* tolua_S) +{ + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"LuaMatrix4",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else + { + float m = ((float) tolua_tonumber(tolua_S,2,0)); + { + LuaMatrix4* tolua_ret = (LuaMatrix4*) Mtolua_new((LuaMatrix4)(m)); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"LuaMatrix4"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + } + } + return 1; +tolua_lerror: + return tolua__LuaMatrix4_new00_local(tolua_S); +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new of class LuaMatrix4 */ +#ifndef TOLUA_DISABLE_tolua__LuaMatrix4_new02 +static int tolua__LuaMatrix4_new02(lua_State* tolua_S) +{ + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"LuaMatrix4",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const LuaMatrix4",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else + { + const LuaMatrix4* rhs = ((const LuaMatrix4*) tolua_tousertype(tolua_S,2,0)); + { + LuaMatrix4* tolua_ret = (LuaMatrix4*) Mtolua_new((LuaMatrix4)(*rhs)); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"LuaMatrix4"); + } + } + return 1; +tolua_lerror: + return tolua__LuaMatrix4_new01(tolua_S); +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new_local of class LuaMatrix4 */ +#ifndef TOLUA_DISABLE_tolua__LuaMatrix4_new02_local +static int tolua__LuaMatrix4_new02_local(lua_State* tolua_S) +{ + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"LuaMatrix4",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const LuaMatrix4",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else + { + const LuaMatrix4* rhs = ((const LuaMatrix4*) tolua_tousertype(tolua_S,2,0)); + { + LuaMatrix4* tolua_ret = (LuaMatrix4*) Mtolua_new((LuaMatrix4)(*rhs)); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"LuaMatrix4"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + } + } + return 1; +tolua_lerror: + return tolua__LuaMatrix4_new01_local(tolua_S); +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new of class LuaMatrix4 */ +#ifndef TOLUA_DISABLE_tolua__LuaMatrix4_new03 +static int tolua__LuaMatrix4_new03(lua_State* tolua_S) +{ + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"LuaMatrix4",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnumber(tolua_S,6,0,&tolua_err) || + !tolua_isnumber(tolua_S,7,0,&tolua_err) || + !tolua_isnumber(tolua_S,8,0,&tolua_err) || + !tolua_isnumber(tolua_S,9,0,&tolua_err) || + !tolua_isnumber(tolua_S,10,0,&tolua_err) || + !tolua_isnumber(tolua_S,11,0,&tolua_err) || + !tolua_isnumber(tolua_S,12,0,&tolua_err) || + !tolua_isnumber(tolua_S,13,0,&tolua_err) || + !tolua_isnumber(tolua_S,14,0,&tolua_err) || + !tolua_isnumber(tolua_S,15,0,&tolua_err) || + !tolua_isnumber(tolua_S,16,0,&tolua_err) || + !tolua_isnumber(tolua_S,17,0,&tolua_err) || + !tolua_isnoobj(tolua_S,18,&tolua_err) + ) + goto tolua_lerror; + else + { + float m0 = ((float) tolua_tonumber(tolua_S,2,0)); + float m1 = ((float) tolua_tonumber(tolua_S,3,0)); + float m2 = ((float) tolua_tonumber(tolua_S,4,0)); + float m3 = ((float) tolua_tonumber(tolua_S,5,0)); + float m4 = ((float) tolua_tonumber(tolua_S,6,0)); + float m5 = ((float) tolua_tonumber(tolua_S,7,0)); + float m6 = ((float) tolua_tonumber(tolua_S,8,0)); + float m7 = ((float) tolua_tonumber(tolua_S,9,0)); + float m8 = ((float) tolua_tonumber(tolua_S,10,0)); + float m9 = ((float) tolua_tonumber(tolua_S,11,0)); + float m10 = ((float) tolua_tonumber(tolua_S,12,0)); + float m11 = ((float) tolua_tonumber(tolua_S,13,0)); + float m12 = ((float) tolua_tonumber(tolua_S,14,0)); + float m13 = ((float) tolua_tonumber(tolua_S,15,0)); + float m14 = ((float) tolua_tonumber(tolua_S,16,0)); + float m15 = ((float) tolua_tonumber(tolua_S,17,0)); + { + LuaMatrix4* tolua_ret = (LuaMatrix4*) Mtolua_new((LuaMatrix4)(m0,m1,m2,m3,m4,m5,m6,m7,m8,m9,m10,m11,m12,m13,m14,m15)); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"LuaMatrix4"); + } + } + return 1; +tolua_lerror: + return tolua__LuaMatrix4_new02(tolua_S); +} +#endif //#ifndef TOLUA_DISABLE + +/* method: new_local of class LuaMatrix4 */ +#ifndef TOLUA_DISABLE_tolua__LuaMatrix4_new03_local +static int tolua__LuaMatrix4_new03_local(lua_State* tolua_S) +{ + tolua_Error tolua_err; + if ( + !tolua_isusertable(tolua_S,1,"LuaMatrix4",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnumber(tolua_S,6,0,&tolua_err) || + !tolua_isnumber(tolua_S,7,0,&tolua_err) || + !tolua_isnumber(tolua_S,8,0,&tolua_err) || + !tolua_isnumber(tolua_S,9,0,&tolua_err) || + !tolua_isnumber(tolua_S,10,0,&tolua_err) || + !tolua_isnumber(tolua_S,11,0,&tolua_err) || + !tolua_isnumber(tolua_S,12,0,&tolua_err) || + !tolua_isnumber(tolua_S,13,0,&tolua_err) || + !tolua_isnumber(tolua_S,14,0,&tolua_err) || + !tolua_isnumber(tolua_S,15,0,&tolua_err) || + !tolua_isnumber(tolua_S,16,0,&tolua_err) || + !tolua_isnumber(tolua_S,17,0,&tolua_err) || + !tolua_isnoobj(tolua_S,18,&tolua_err) + ) + goto tolua_lerror; + else + { + float m0 = ((float) tolua_tonumber(tolua_S,2,0)); + float m1 = ((float) tolua_tonumber(tolua_S,3,0)); + float m2 = ((float) tolua_tonumber(tolua_S,4,0)); + float m3 = ((float) tolua_tonumber(tolua_S,5,0)); + float m4 = ((float) tolua_tonumber(tolua_S,6,0)); + float m5 = ((float) tolua_tonumber(tolua_S,7,0)); + float m6 = ((float) tolua_tonumber(tolua_S,8,0)); + float m7 = ((float) tolua_tonumber(tolua_S,9,0)); + float m8 = ((float) tolua_tonumber(tolua_S,10,0)); + float m9 = ((float) tolua_tonumber(tolua_S,11,0)); + float m10 = ((float) tolua_tonumber(tolua_S,12,0)); + float m11 = ((float) tolua_tonumber(tolua_S,13,0)); + float m12 = ((float) tolua_tonumber(tolua_S,14,0)); + float m13 = ((float) tolua_tonumber(tolua_S,15,0)); + float m14 = ((float) tolua_tonumber(tolua_S,16,0)); + float m15 = ((float) tolua_tonumber(tolua_S,17,0)); + { + LuaMatrix4* tolua_ret = (LuaMatrix4*) Mtolua_new((LuaMatrix4)(m0,m1,m2,m3,m4,m5,m6,m7,m8,m9,m10,m11,m12,m13,m14,m15)); + tolua_pushusertype(tolua_S,(void*)tolua_ret,"LuaMatrix4"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + } + } + return 1; +tolua_lerror: + return tolua__LuaMatrix4_new02_local(tolua_S); +} +#endif //#ifndef TOLUA_DISABLE + +/* method: SetIdentity of class LuaMatrix4 */ +#ifndef TOLUA_DISABLE_tolua__LuaMatrix4_SetIdentity00 +static int tolua__LuaMatrix4_SetIdentity00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"LuaMatrix4",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + LuaMatrix4* self = (LuaMatrix4*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetIdentity'", NULL); +#endif + { + self->SetIdentity(); + } + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'SetIdentity'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: Translate of class LuaMatrix4 */ +#ifndef TOLUA_DISABLE_tolua__LuaMatrix4_Translate00 +static int tolua__LuaMatrix4_Translate00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"LuaMatrix4",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnoobj(tolua_S,5,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + LuaMatrix4* self = (LuaMatrix4*) tolua_tousertype(tolua_S,1,0); + float x0 = ((float) tolua_tonumber(tolua_S,2,0)); + float y0 = ((float) tolua_tonumber(tolua_S,3,0)); + float z0 = ((float) tolua_tonumber(tolua_S,4,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Translate'", NULL); +#endif + { + self->Translate(x0,y0,z0); + } + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'Translate'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: Scale of class LuaMatrix4 */ +#ifndef TOLUA_DISABLE_tolua__LuaMatrix4_Scale00 +static int tolua__LuaMatrix4_Scale00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"LuaMatrix4",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnoobj(tolua_S,5,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + LuaMatrix4* self = (LuaMatrix4*) tolua_tousertype(tolua_S,1,0); + float multiplierX = ((float) tolua_tonumber(tolua_S,2,0)); + float multiplierY = ((float) tolua_tonumber(tolua_S,3,0)); + float multiplierZ = ((float) tolua_tonumber(tolua_S,4,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Scale'", NULL); +#endif + { + bool tolua_ret = (bool) self->Scale(multiplierX,multiplierY,multiplierZ); + tolua_pushboolean(tolua_S,(bool)tolua_ret); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'Scale'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: Scale of class LuaMatrix4 */ +#ifndef TOLUA_DISABLE_tolua__LuaMatrix4_Scale01 +static int tolua__LuaMatrix4_Scale01(lua_State* tolua_S) +{ + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"LuaMatrix4",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnumber(tolua_S,6,0,&tolua_err) || + !tolua_isnumber(tolua_S,7,0,&tolua_err) || + !tolua_isnoobj(tolua_S,8,&tolua_err) + ) + goto tolua_lerror; + else + { + LuaMatrix4* self = (LuaMatrix4*) tolua_tousertype(tolua_S,1,0); + float multiplierX = ((float) tolua_tonumber(tolua_S,2,0)); + float multiplierY = ((float) tolua_tonumber(tolua_S,3,0)); + float multiplierZ = ((float) tolua_tonumber(tolua_S,4,0)); + float x0 = ((float) tolua_tonumber(tolua_S,5,0)); + float y0 = ((float) tolua_tonumber(tolua_S,6,0)); + float z0 = ((float) tolua_tonumber(tolua_S,7,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Scale'", NULL); +#endif + { + bool tolua_ret = (bool) self->Scale(multiplierX,multiplierY,multiplierZ,x0,y0,z0); + tolua_pushboolean(tolua_S,(bool)tolua_ret); + } + } + return 1; +tolua_lerror: + return tolua__LuaMatrix4_Scale00(tolua_S); +} +#endif //#ifndef TOLUA_DISABLE + +/* method: RotateAroundAxisZ of class LuaMatrix4 */ +#ifndef TOLUA_DISABLE_tolua__LuaMatrix4_RotateAroundAxisZ00 +static int tolua__LuaMatrix4_RotateAroundAxisZ00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"LuaMatrix4",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + LuaMatrix4* self = (LuaMatrix4*) tolua_tousertype(tolua_S,1,0); + float angle = ((float) tolua_tonumber(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RotateAroundAxisZ'", NULL); +#endif + { + self->RotateAroundAxisZ(angle); + } + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'RotateAroundAxisZ'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: RotateAroundAxisZ of class LuaMatrix4 */ +#ifndef TOLUA_DISABLE_tolua__LuaMatrix4_RotateAroundAxisZ01 +static int tolua__LuaMatrix4_RotateAroundAxisZ01(lua_State* tolua_S) +{ + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"LuaMatrix4",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnoobj(tolua_S,6,&tolua_err) + ) + goto tolua_lerror; + else + { + LuaMatrix4* self = (LuaMatrix4*) tolua_tousertype(tolua_S,1,0); + float angle = ((float) tolua_tonumber(tolua_S,2,0)); + float x0 = ((float) tolua_tonumber(tolua_S,3,0)); + float y0 = ((float) tolua_tonumber(tolua_S,4,0)); + float z0 = ((float) tolua_tonumber(tolua_S,5,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RotateAroundAxisZ'", NULL); +#endif + { + self->RotateAroundAxisZ(angle,x0,y0,z0); + } + } + return 0; +tolua_lerror: + return tolua__LuaMatrix4_RotateAroundAxisZ00(tolua_S); +} +#endif //#ifndef TOLUA_DISABLE + +/* method: RotateAroundAxisX of class LuaMatrix4 */ +#ifndef TOLUA_DISABLE_tolua__LuaMatrix4_RotateAroundAxisX00 +static int tolua__LuaMatrix4_RotateAroundAxisX00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"LuaMatrix4",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + LuaMatrix4* self = (LuaMatrix4*) tolua_tousertype(tolua_S,1,0); + float angle = ((float) tolua_tonumber(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RotateAroundAxisX'", NULL); +#endif + { + self->RotateAroundAxisX(angle); + } + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'RotateAroundAxisX'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: RotateAroundAxisX of class LuaMatrix4 */ +#ifndef TOLUA_DISABLE_tolua__LuaMatrix4_RotateAroundAxisX01 +static int tolua__LuaMatrix4_RotateAroundAxisX01(lua_State* tolua_S) +{ + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"LuaMatrix4",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnoobj(tolua_S,6,&tolua_err) + ) + goto tolua_lerror; + else + { + LuaMatrix4* self = (LuaMatrix4*) tolua_tousertype(tolua_S,1,0); + float angle = ((float) tolua_tonumber(tolua_S,2,0)); + float x0 = ((float) tolua_tonumber(tolua_S,3,0)); + float y0 = ((float) tolua_tonumber(tolua_S,4,0)); + float z0 = ((float) tolua_tonumber(tolua_S,5,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RotateAroundAxisX'", NULL); +#endif + { + self->RotateAroundAxisX(angle,x0,y0,z0); + } + } + return 0; +tolua_lerror: + return tolua__LuaMatrix4_RotateAroundAxisX00(tolua_S); +} +#endif //#ifndef TOLUA_DISABLE + +/* method: RotateAroundAxisY of class LuaMatrix4 */ +#ifndef TOLUA_DISABLE_tolua__LuaMatrix4_RotateAroundAxisY00 +static int tolua__LuaMatrix4_RotateAroundAxisY00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"LuaMatrix4",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + LuaMatrix4* self = (LuaMatrix4*) tolua_tousertype(tolua_S,1,0); + float angle = ((float) tolua_tonumber(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RotateAroundAxisY'", NULL); +#endif + { + self->RotateAroundAxisY(angle); + } + } + return 0; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'RotateAroundAxisY'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: RotateAroundAxisY of class LuaMatrix4 */ +#ifndef TOLUA_DISABLE_tolua__LuaMatrix4_RotateAroundAxisY01 +static int tolua__LuaMatrix4_RotateAroundAxisY01(lua_State* tolua_S) +{ + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"LuaMatrix4",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnoobj(tolua_S,6,&tolua_err) + ) + goto tolua_lerror; + else + { + LuaMatrix4* self = (LuaMatrix4*) tolua_tousertype(tolua_S,1,0); + float angle = ((float) tolua_tonumber(tolua_S,2,0)); + float x0 = ((float) tolua_tonumber(tolua_S,3,0)); + float y0 = ((float) tolua_tonumber(tolua_S,4,0)); + float z0 = ((float) tolua_tonumber(tolua_S,5,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RotateAroundAxisY'", NULL); +#endif + { + self->RotateAroundAxisY(angle,x0,y0,z0); + } + } + return 0; +tolua_lerror: + return tolua__LuaMatrix4_RotateAroundAxisY00(tolua_S); +} +#endif //#ifndef TOLUA_DISABLE + +/* method: RotateAroundAxisArbitrary of class LuaMatrix4 */ +#ifndef TOLUA_DISABLE_tolua__LuaMatrix4_RotateAroundAxisArbitrary00 +static int tolua__LuaMatrix4_RotateAroundAxisArbitrary00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"LuaMatrix4",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnoobj(tolua_S,6,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + LuaMatrix4* self = (LuaMatrix4*) tolua_tousertype(tolua_S,1,0); + float angle = ((float) tolua_tonumber(tolua_S,2,0)); + float projectionX = ((float) tolua_tonumber(tolua_S,3,0)); + float projectionY = ((float) tolua_tonumber(tolua_S,4,0)); + float projectionZ = ((float) tolua_tonumber(tolua_S,5,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RotateAroundAxisArbitrary'", NULL); +#endif + { + bool tolua_ret = (bool) self->RotateAroundAxisArbitrary(angle,projectionX,projectionY,projectionZ); + tolua_pushboolean(tolua_S,(bool)tolua_ret); + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'RotateAroundAxisArbitrary'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: RotateAroundAxisArbitrary of class LuaMatrix4 */ +#ifndef TOLUA_DISABLE_tolua__LuaMatrix4_RotateAroundAxisArbitrary01 +static int tolua__LuaMatrix4_RotateAroundAxisArbitrary01(lua_State* tolua_S) +{ + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"LuaMatrix4",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnumber(tolua_S,3,0,&tolua_err) || + !tolua_isnumber(tolua_S,4,0,&tolua_err) || + !tolua_isnumber(tolua_S,5,0,&tolua_err) || + !tolua_isnumber(tolua_S,6,0,&tolua_err) || + !tolua_isnumber(tolua_S,7,0,&tolua_err) || + !tolua_isnumber(tolua_S,8,0,&tolua_err) || + !tolua_isnoobj(tolua_S,9,&tolua_err) + ) + goto tolua_lerror; + else + { + LuaMatrix4* self = (LuaMatrix4*) tolua_tousertype(tolua_S,1,0); + float angle = ((float) tolua_tonumber(tolua_S,2,0)); + float projectionX = ((float) tolua_tonumber(tolua_S,3,0)); + float projectionY = ((float) tolua_tonumber(tolua_S,4,0)); + float projectionZ = ((float) tolua_tonumber(tolua_S,5,0)); + float x0 = ((float) tolua_tonumber(tolua_S,6,0)); + float y0 = ((float) tolua_tonumber(tolua_S,7,0)); + float z0 = ((float) tolua_tonumber(tolua_S,8,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RotateAroundAxisArbitrary'", NULL); +#endif + { + bool tolua_ret = (bool) self->RotateAroundAxisArbitrary(angle,projectionX,projectionY,projectionZ,x0,y0,z0); + tolua_pushboolean(tolua_S,(bool)tolua_ret); + } + } + return 1; +tolua_lerror: + return tolua__LuaMatrix4_RotateAroundAxisArbitrary00(tolua_S); +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator* of class LuaMatrix4 */ +#ifndef TOLUA_DISABLE_tolua__LuaMatrix4__mul00 +static int tolua__LuaMatrix4__mul00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const LuaMatrix4",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const LuaMatrix4",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const LuaMatrix4* self = (const LuaMatrix4*) tolua_tousertype(tolua_S,1,0); + const LuaMatrix4* mul = ((const LuaMatrix4*) tolua_tousertype(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL); +#endif + { + LuaMatrix4 tolua_ret = (LuaMatrix4) self->operator*(*mul); + { +#ifdef __cplusplus + void* tolua_obj = Mtolua_new((LuaMatrix4)(tolua_ret)); + tolua_pushusertype(tolua_S,tolua_obj,"LuaMatrix4"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#else + void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(LuaMatrix4)); + tolua_pushusertype(tolua_S,tolua_obj,"LuaMatrix4"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#endif + } + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.mul'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator* of class LuaMatrix4 */ +#ifndef TOLUA_DISABLE_tolua__LuaMatrix4__mul01 +static int tolua__LuaMatrix4__mul01(lua_State* tolua_S) +{ + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const LuaMatrix4",0,&tolua_err) || + !tolua_isnumber(tolua_S,2,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else + { + const LuaMatrix4* self = (const LuaMatrix4*) tolua_tousertype(tolua_S,1,0); + const float mul = ((const float) tolua_tonumber(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL); +#endif + { + LuaMatrix4 tolua_ret = (LuaMatrix4) self->operator*(mul); + { +#ifdef __cplusplus + void* tolua_obj = Mtolua_new((LuaMatrix4)(tolua_ret)); + tolua_pushusertype(tolua_S,tolua_obj,"LuaMatrix4"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#else + void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(LuaMatrix4)); + tolua_pushusertype(tolua_S,tolua_obj,"LuaMatrix4"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#endif + } + } + } + return 1; +tolua_lerror: + if ( + !tolua_isusertype(tolua_S,2,"const LuaMatrix4",0,&tolua_err) || + !tolua_isnumber(tolua_S,1,0,&tolua_err) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror1; + else + { + const LuaMatrix4* self = (const LuaMatrix4*) tolua_tousertype(tolua_S,2,0); + const float aRhv = ((const float) tolua_tonumber(tolua_S,1,0)); + #ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL); + #endif + { + LuaMatrix4 tolua_ret = (LuaMatrix4) self->operator*(aRhv); + { + #ifdef __cplusplus + void* tolua_obj = Mtolua_new((LuaMatrix4)(tolua_ret)); + tolua_pushusertype(tolua_S,tolua_obj,"LuaMatrix4"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + #else + void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(LuaMatrix4)); + tolua_pushusertype(tolua_S,tolua_obj,"LuaMatrix4"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); + #endif + } + } + } + return 1; + tolua_lerror1: + return tolua__LuaMatrix4__mul00(tolua_S); +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator+ of class LuaMatrix4 */ +#ifndef TOLUA_DISABLE_tolua__LuaMatrix4__add00 +static int tolua__LuaMatrix4__add00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const LuaMatrix4",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const LuaMatrix4",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const LuaMatrix4* self = (const LuaMatrix4*) tolua_tousertype(tolua_S,1,0); + const LuaMatrix4* add = ((const LuaMatrix4*) tolua_tousertype(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator+'", NULL); +#endif + { + LuaMatrix4 tolua_ret = (LuaMatrix4) self->operator+(*add); + { +#ifdef __cplusplus + void* tolua_obj = Mtolua_new((LuaMatrix4)(tolua_ret)); + tolua_pushusertype(tolua_S,tolua_obj,"LuaMatrix4"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#else + void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(LuaMatrix4)); + tolua_pushusertype(tolua_S,tolua_obj,"LuaMatrix4"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#endif + } + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.add'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator- of class LuaMatrix4 */ +#ifndef TOLUA_DISABLE_tolua__LuaMatrix4__sub00 +static int tolua__LuaMatrix4__sub00(lua_State* tolua_S) +{ +#ifndef TOLUA_RELEASE + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const LuaMatrix4",0,&tolua_err) || + (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const LuaMatrix4",0,&tolua_err)) || + !tolua_isnoobj(tolua_S,3,&tolua_err) + ) + goto tolua_lerror; + else +#endif + { + const LuaMatrix4* self = (const LuaMatrix4*) tolua_tousertype(tolua_S,1,0); + const LuaMatrix4* sub = ((const LuaMatrix4*) tolua_tousertype(tolua_S,2,0)); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator-'", NULL); +#endif + { + LuaMatrix4 tolua_ret = (LuaMatrix4) self->operator-(*sub); + { +#ifdef __cplusplus + void* tolua_obj = Mtolua_new((LuaMatrix4)(tolua_ret)); + tolua_pushusertype(tolua_S,tolua_obj,"LuaMatrix4"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#else + void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(LuaMatrix4)); + tolua_pushusertype(tolua_S,tolua_obj,"LuaMatrix4"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#endif + } + } + } + return 1; +#ifndef TOLUA_RELEASE + tolua_lerror: + tolua_error(tolua_S,"#ferror in function '.sub'.",&tolua_err); + return 0; +#endif +} +#endif //#ifndef TOLUA_DISABLE + +/* method: operator- of class LuaMatrix4 */ +#ifndef TOLUA_DISABLE_tolua__LuaMatrix4__sub01 +static int tolua__LuaMatrix4__sub01(lua_State* tolua_S) +{ + tolua_Error tolua_err; + if ( + !tolua_isusertype(tolua_S,1,"const LuaMatrix4",0,&tolua_err) || + !tolua_isnoobj(tolua_S,2,&tolua_err) + ) + goto tolua_lerror; + else + { + const LuaMatrix4* self = (const LuaMatrix4*) tolua_tousertype(tolua_S,1,0); +#ifndef TOLUA_RELEASE + if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator-'", NULL); +#endif + { + LuaMatrix4 tolua_ret = (LuaMatrix4) self->operator-(); + { +#ifdef __cplusplus + void* tolua_obj = Mtolua_new((LuaMatrix4)(tolua_ret)); + tolua_pushusertype(tolua_S,tolua_obj,"LuaMatrix4"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#else + void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(LuaMatrix4)); + tolua_pushusertype(tolua_S,tolua_obj,"LuaMatrix4"); + tolua_register_gc(tolua_S,lua_gettop(tolua_S)); +#endif + } + } + } + return 1; +tolua_lerror: + return tolua__LuaMatrix4__sub00(tolua_S); +} +#endif //#ifndef TOLUA_DISABLE + +/* Open function */ +TOLUA_API int tolua__open (lua_State* tolua_S) +{ + tolua_open(tolua_S); + tolua_reg_types(tolua_S); + tolua_module(tolua_S,NULL,0); + tolua_beginmodule(tolua_S,NULL); + tolua_cclass(tolua_S,"EffectModelScript","EffectModelScript","",NULL); + tolua_beginmodule(tolua_S,"EffectModelScript"); + tolua_function(tolua_S,"GetProperty",tolua__EffectModelScript_GetProperty00); + tolua_function(tolua_S,"SetProperty",tolua__EffectModelScript_SetProperty00); + tolua_function(tolua_S,"SetProperty",tolua__EffectModelScript_SetProperty01); + tolua_function(tolua_S,"SetProperty",tolua__EffectModelScript_SetProperty02); + tolua_function(tolua_S,"SetPropertyGroup",tolua__EffectModelScript_SetPropertyGroup00); + tolua_function(tolua_S,"GetDistanceFromGround",tolua__EffectModelScript_GetDistanceFromGround00); + tolua_function(tolua_S,"UpdateBitmap",tolua__EffectModelScript_UpdateBitmap00); + tolua_function(tolua_S,"GetNearestPointsIds",tolua__EffectModelScript_GetNearestPointsIds00); + tolua_function(tolua_S,"GetNearestPointsIds",tolua__EffectModelScript_GetNearestPointsIds01); + tolua_function(tolua_S,"RotateSurfaceN",tolua__EffectModelScript_RotateSurfaceN00); + tolua_function(tolua_S,"RotateSurfaceV",tolua__EffectModelScript_RotateSurfaceV00); + tolua_function(tolua_S,"RotateSurfaceV",tolua__EffectModelScript_RotateSurfaceV01); + tolua_function(tolua_S,"RotateSurfaceV",tolua__EffectModelScript_RotateSurfaceV02); + tolua_function(tolua_S,"ScaleSurface",tolua__EffectModelScript_ScaleSurface00); + tolua_function(tolua_S,"ScaleSurface",tolua__EffectModelScript_ScaleSurface01); + tolua_function(tolua_S,"ScaleSurface",tolua__EffectModelScript_ScaleSurface02); + tolua_function(tolua_S,"MoveSurface",tolua__EffectModelScript_MoveSurface00); + tolua_function(tolua_S,"MoveSurface",tolua__EffectModelScript_MoveSurface01); + tolua_function(tolua_S,"ResetSurfaceTransformation",tolua__EffectModelScript_ResetSurfaceTransformation00); + tolua_function(tolua_S,"PrintLuaInfo",tolua__EffectModelScript_PrintLuaInfo00); + tolua_function(tolua_S,"SetTransformationMatrix",tolua__EffectModelScript_SetTransformationMatrix00); + tolua_function(tolua_S,"AddUnitLight",tolua__EffectModelScript_AddUnitLight00); + tolua_function(tolua_S,"RemoveUnitLight",tolua__EffectModelScript_RemoveUnitLight00); + tolua_function(tolua_S,"RemoveAllUnitsLightType",tolua__EffectModelScript_RemoveAllUnitsLightType00); + tolua_function(tolua_S,"GetUnitLight",tolua__EffectModelScript_GetUnitLight00); + tolua_function(tolua_S,"SetLightAmbientColour",tolua__EffectModelScript_SetLightAmbientColour00); + tolua_function(tolua_S,"SetLightAmbientColour",tolua__EffectModelScript_SetLightAmbientColour01); + tolua_function(tolua_S,"SetLightIntensity",tolua__EffectModelScript_SetLightIntensity00); + tolua_function(tolua_S,"SetLightAttenuation",tolua__EffectModelScript_SetLightAttenuation00); + tolua_function(tolua_S,"GetLightAmbientColour",tolua__EffectModelScript_GetLightAmbientColour00); + tolua_function(tolua_S,"GetLightIntensity",tolua__EffectModelScript_GetLightIntensity00); + tolua_function(tolua_S,"GetLightAttenuation",tolua__EffectModelScript_GetLightAttenuation00); + tolua_endmodule(tolua_S); + tolua_constant(tolua_S,"TYPE_UNIT_LIGHT_POINT",TYPE_UNIT_LIGHT_POINT); + tolua_constant(tolua_S,"TYPE_UNIT_LIGHT_SPOT",TYPE_UNIT_LIGHT_SPOT); + tolua_constant(tolua_S,"TYPE_UNIT_LIGHT_DIRECTIONAL",TYPE_UNIT_LIGHT_DIRECTIONAL); + tolua_constant(tolua_S,"EFFECT_CONTINUED",EFFECT_CONTINUED); + tolua_constant(tolua_S,"EFFECT_FINISHED",EFFECT_FINISHED); + tolua_constant(tolua_S,"B_IS_FIXED",B_IS_FIXED); + tolua_constant(tolua_S,"N_POS_X",N_POS_X); + tolua_constant(tolua_S,"N_POS_Y",N_POS_Y); + tolua_constant(tolua_S,"N_POS_Z",N_POS_Z); + tolua_constant(tolua_S,"N_POS_X_INIT",N_POS_X_INIT); + tolua_constant(tolua_S,"N_POS_Y_INIT",N_POS_Y_INIT); + tolua_constant(tolua_S,"N_POS_Z_INIT",N_POS_Z_INIT); + tolua_constant(tolua_S,"N_MASS",N_MASS); + tolua_constant(tolua_S,"N_FUSER_X",N_FUSER_X); + tolua_constant(tolua_S,"N_FUSER_Y",N_FUSER_Y); + tolua_constant(tolua_S,"N_FUSER_Z",N_FUSER_Z); + tolua_constant(tolua_S,"N_POINT_RESISTANCE",N_POINT_RESISTANCE); + tolua_constant(tolua_S,"V_POS",V_POS); + tolua_constant(tolua_S,"V_POS_INIT",V_POS_INIT); + tolua_constant(tolua_S,"V_FUSER",V_FUSER); + tolua_constant(tolua_S,"N_NURBS_WEIGHT",N_NURBS_WEIGHT); + tolua_constant(tolua_S,"N_STIFFNESS",N_STIFFNESS); + tolua_constant(tolua_S,"N_ENV_RESISTANCE",N_ENV_RESISTANCE); + tolua_constant(tolua_S,"N_NUMBER_ITERATIONS",N_NUMBER_ITERATIONS); + tolua_constant(tolua_S,"N_MODEL_SPEED",N_MODEL_SPEED); + tolua_constant(tolua_S,"N_GRAVITY_ACCEL_VALUE",N_GRAVITY_ACCEL_VALUE); + tolua_constant(tolua_S,"V_GRAVITY_ACCELERATION",V_GRAVITY_ACCELERATION); + tolua_constant(tolua_S,"N_TRANSPARENCY",N_TRANSPARENCY); + tolua_constant(tolua_S,"N_EFFECT_TIME_PASSED",N_EFFECT_TIME_PASSED); + tolua_constant(tolua_S,"N_EFFECT_DURATION",N_EFFECT_DURATION); + tolua_constant(tolua_S,"ALL_POINTS",ALL_POINTS); + tolua_constant(tolua_S,"ALL_SPRINGS",ALL_SPRINGS); + tolua_constant(tolua_S,"ALL_RODS",ALL_RODS); + tolua_constant(tolua_S,"AXIS_X",AXIS_X); + tolua_constant(tolua_S,"AXIS_Y",AXIS_Y); + tolua_constant(tolua_S,"AXIS_Z",AXIS_Z); + tolua_constant(tolua_S,"AXIS_ARBITRARY",AXIS_ARBITRARY); + tolua_constant(tolua_S,"POINT_LEFT_TOP",POINT_LEFT_TOP); + tolua_constant(tolua_S,"POINT_CENTER_TOP",POINT_CENTER_TOP); + tolua_constant(tolua_S,"POINT_RIGHT_TOP",POINT_RIGHT_TOP); + tolua_constant(tolua_S,"POINT_LEFT_CENTER",POINT_LEFT_CENTER); + tolua_constant(tolua_S,"POINT_CENTER_CENTER",POINT_CENTER_CENTER); + tolua_constant(tolua_S,"POINT_RIGHT_CENTER",POINT_RIGHT_CENTER); + tolua_constant(tolua_S,"POINT_LEFT_BOTTOM",POINT_LEFT_BOTTOM); + tolua_constant(tolua_S,"POINT_CENTER_BOTTOM",POINT_CENTER_BOTTOM); + tolua_constant(tolua_S,"POINT_RIGHT_BOTTOM",POINT_RIGHT_BOTTOM); + tolua_constant(tolua_S,"POINT_ARBITRARY",POINT_ARBITRARY); + tolua_cclass(tolua_S,"TouchEventScript","TouchEventScript","",NULL); + tolua_beginmodule(tolua_S,"TouchEventScript"); + tolua_variable(tolua_S,"currentPosition",tolua_get_TouchEventScript_currentPosition,tolua_set_TouchEventScript_currentPosition); + tolua_variable(tolua_S,"startPosition",tolua_get_TouchEventScript_startPosition,tolua_set_TouchEventScript_startPosition); + tolua_variable(tolua_S,"touchId",tolua_get_TouchEventScript_unsigned_touchId,tolua_set_TouchEventScript_unsigned_touchId); + tolua_endmodule(tolua_S); + #ifdef __cplusplus + tolua_cclass(tolua_S,"PropertyCast","PropertyCast","",tolua_collect_PropertyCast); + #else + tolua_cclass(tolua_S,"PropertyCast","PropertyCast","",NULL); + #endif + tolua_beginmodule(tolua_S,"PropertyCast"); + tolua_constant(tolua_S,"NO_PROPERTY",PropertyCast::NO_PROPERTY); + tolua_constant(tolua_S,"NUMBER",PropertyCast::NUMBER); + tolua_constant(tolua_S,"BOOL",PropertyCast::BOOL); + tolua_constant(tolua_S,"VEC3",PropertyCast::VEC3); + tolua_constant(tolua_S,"VECTOR_VECTOR",PropertyCast::VECTOR_VECTOR); + tolua_constant(tolua_S,"POINT_LIGHT",PropertyCast::POINT_LIGHT); + tolua_constant(tolua_S,"SPOT_LIGHT",PropertyCast::SPOT_LIGHT); + tolua_constant(tolua_S,"DIRECTIONAL_LIGHT",PropertyCast::DIRECTIONAL_LIGHT); + tolua_variable(tolua_S,"type",tolua_get_PropertyCast_type,NULL); + tolua_cclass(tolua_S,"TypeValue","PropertyCast::TypeValue","",NULL); + tolua_beginmodule(tolua_S,"TypeValue"); + tolua_variable(tolua_S,"numberValue",tolua_get_PropertyCast__TypeValue_numberValue,tolua_set_PropertyCast__TypeValue_numberValue); + tolua_variable(tolua_S,"boolValue",tolua_get_PropertyCast__TypeValue_boolValue,tolua_set_PropertyCast__TypeValue_boolValue); + tolua_variable(tolua_S,"vec3Value",tolua_get_PropertyCast__TypeValue_vec3Value_ptr,NULL); + tolua_variable(tolua_S,"vecVecValue",tolua_get_PropertyCast__TypeValue_vecVecValue_ptr,NULL); + tolua_variable(tolua_S,"pPointLight",tolua_get_PropertyCast__TypeValue_pPointLight_ptr,tolua_set_PropertyCast__TypeValue_pPointLight_ptr); + tolua_variable(tolua_S,"pSpotLight",tolua_get_PropertyCast__TypeValue_pSpotLight_ptr,tolua_set_PropertyCast__TypeValue_pSpotLight_ptr); + tolua_variable(tolua_S,"pDirectionalLight",tolua_get_PropertyCast__TypeValue_pDirectionalLight_ptr,tolua_set_PropertyCast__TypeValue_pDirectionalLight_ptr); + tolua_endmodule(tolua_S); + tolua_variable(tolua_S,"value",tolua_get_PropertyCast_value,tolua_set_PropertyCast_value); + tolua_endmodule(tolua_S); + tolua_cclass(tolua_S,"UnitLight","UnitLight","",NULL); + tolua_beginmodule(tolua_S,"UnitLight"); + tolua_function(tolua_S,"GetEnabled",tolua__UnitLight_GetEnabled00); + tolua_function(tolua_S,"GetColour",tolua__UnitLight_GetColour00); + tolua_function(tolua_S,"GetIntensity",tolua__UnitLight_GetIntensity00); + tolua_function(tolua_S,"GetName",tolua__UnitLight_GetName00); + tolua_function(tolua_S,"SetEnabled",tolua__UnitLight_SetEnabled00); + tolua_function(tolua_S,"SetColour",tolua__UnitLight_SetColour00); + tolua_function(tolua_S,"SetColour",tolua__UnitLight_SetColour01); + tolua_function(tolua_S,"SetIntensity",tolua__UnitLight_SetIntensity00); + tolua_endmodule(tolua_S); + tolua_cclass(tolua_S,"PointLight","PointLight","UnitLight",NULL); + tolua_beginmodule(tolua_S,"PointLight"); + tolua_function(tolua_S,"CreatePointLight",tolua__PointLight_CreatePointLight00); + tolua_function(tolua_S,"GetPosition",tolua__PointLight_GetPosition00); + tolua_function(tolua_S,"SetPosition",tolua__PointLight_SetPosition00); + tolua_function(tolua_S,"SetPosition",tolua__PointLight_SetPosition01); + tolua_endmodule(tolua_S); + tolua_cclass(tolua_S,"SpotLight","SpotLight","PointLight",NULL); + tolua_beginmodule(tolua_S,"SpotLight"); + tolua_function(tolua_S,"CreateSpotLight",tolua__SpotLight_CreateSpotLight00); + tolua_function(tolua_S,"GetTarget",tolua__SpotLight_GetTarget00); + tolua_function(tolua_S,"GetAngleOpening",tolua__SpotLight_GetAngleOpening00); + tolua_function(tolua_S,"GetAngleFadeOut",tolua__SpotLight_GetAngleFadeOut00); + tolua_function(tolua_S,"SetTarget",tolua__SpotLight_SetTarget00); + tolua_function(tolua_S,"SetTarget",tolua__SpotLight_SetTarget01); + tolua_function(tolua_S,"SetAngleOpening",tolua__SpotLight_SetAngleOpening00); + tolua_function(tolua_S,"SetAngleFadeOut",tolua__SpotLight_SetAngleFadeOut00); + tolua_endmodule(tolua_S); + tolua_cclass(tolua_S,"DirectionalLight","DirectionalLight","UnitLight",NULL); + tolua_beginmodule(tolua_S,"DirectionalLight"); + tolua_function(tolua_S,"CreateDirectionalLight",tolua__DirectionalLight_CreateDirectionalLight00); + tolua_function(tolua_S,"GetDirection",tolua__DirectionalLight_GetDirection00); + tolua_function(tolua_S,"SetDirection",tolua__DirectionalLight_SetDirection00); + tolua_function(tolua_S,"SetDirection",tolua__DirectionalLight_SetDirection01); + tolua_endmodule(tolua_S); + #ifdef __cplusplus + tolua_cclass(tolua_S,"Vector3","Vector3","",tolua_collect_Vector3); + #else + tolua_cclass(tolua_S,"Vector3","Vector3","",NULL); + #endif + tolua_beginmodule(tolua_S,"Vector3"); + tolua_variable(tolua_S,"x",tolua_get_Vector3_x,tolua_set_Vector3_x); + tolua_variable(tolua_S,"y",tolua_get_Vector3_y,tolua_set_Vector3_y); + tolua_variable(tolua_S,"z",tolua_get_Vector3_z,tolua_set_Vector3_z); + tolua_function(tolua_S,"new",tolua__Vector3_new00); + tolua_function(tolua_S,"new_local",tolua__Vector3_new00_local); + tolua_function(tolua_S,".call",tolua__Vector3_new00_local); + tolua_function(tolua_S,"new",tolua__Vector3_new01); + tolua_function(tolua_S,"new_local",tolua__Vector3_new01_local); + tolua_function(tolua_S,".call",tolua__Vector3_new01_local); + tolua_function(tolua_S,"new",tolua__Vector3_new02); + tolua_function(tolua_S,"new_local",tolua__Vector3_new02_local); + tolua_function(tolua_S,".call",tolua__Vector3_new02_local); + tolua_function(tolua_S,"delete",tolua__Vector3_delete00); + tolua_function(tolua_S,".sub",tolua__Vector3__sub00); + SetMetatable(tolua_S, "Vector3", "__add",tolua__Vector3__add00); + SetMetatable(tolua_S, "Vector3", "__add",tolua__Vector3__add01); + tolua_function(tolua_S,".sub",tolua__Vector3__sub01); + tolua_function(tolua_S,".sub",tolua__Vector3__sub02); + SetMetatable(tolua_S, "Vector3", "__mul",tolua__Vector3__mul00); + SetMetatable(tolua_S, "Vector3", "__mul",tolua__Vector3__mul01); + tolua_function(tolua_S,".div",tolua__Vector3__div00); + tolua_function(tolua_S,".div",tolua__Vector3__div01); + tolua_function(tolua_S,".eq",tolua__Vector3__eq00); + tolua_function(tolua_S,"GetCrossVector3",tolua__Vector3_GetCrossVector300); + tolua_function(tolua_S,"GetNormalizedVector3",tolua__Vector3_GetNormalizedVector300); + tolua_endmodule(tolua_S); + #ifdef __cplusplus + tolua_cclass(tolua_S,"Vector2","Vector2","",tolua_collect_Vector2); + #else + tolua_cclass(tolua_S,"Vector2","Vector2","",NULL); + #endif + tolua_beginmodule(tolua_S,"Vector2"); + tolua_variable(tolua_S,"x",tolua_get_Vector2_x,tolua_set_Vector2_x); + tolua_variable(tolua_S,"y",tolua_get_Vector2_y,tolua_set_Vector2_y); + tolua_function(tolua_S,"new",tolua__Vector2_new00); + tolua_function(tolua_S,"new_local",tolua__Vector2_new00_local); + tolua_function(tolua_S,".call",tolua__Vector2_new00_local); + tolua_function(tolua_S,"new",tolua__Vector2_new01); + tolua_function(tolua_S,"new_local",tolua__Vector2_new01_local); + tolua_function(tolua_S,".call",tolua__Vector2_new01_local); + tolua_function(tolua_S,"new",tolua__Vector2_new02); + tolua_function(tolua_S,"new_local",tolua__Vector2_new02_local); + tolua_function(tolua_S,".call",tolua__Vector2_new02_local); + tolua_function(tolua_S,"delete",tolua__Vector2_delete00); + tolua_function(tolua_S,".sub",tolua__Vector2__sub00); + SetMetatable(tolua_S, "Vector2", "__add",tolua__Vector2__add00); + SetMetatable(tolua_S, "Vector2", "__add",tolua__Vector2__add01); + tolua_function(tolua_S,".sub",tolua__Vector2__sub01); + tolua_function(tolua_S,".sub",tolua__Vector2__sub02); + SetMetatable(tolua_S, "Vector2", "__mul",tolua__Vector2__mul00); + SetMetatable(tolua_S, "Vector2", "__mul",tolua__Vector2__mul01); + tolua_function(tolua_S,".div",tolua__Vector2__div00); + tolua_function(tolua_S,".div",tolua__Vector2__div01); + tolua_function(tolua_S,".eq",tolua__Vector2__eq00); + tolua_endmodule(tolua_S); + tolua_cclass(tolua_S,"EffectsVector_EffectsVector_long___","EffectsVector >","",NULL); + tolua_beginmodule(tolua_S,"EffectsVector_EffectsVector_long___"); + tolua_function(tolua_S,"GetSize",tolua__EffectsVector_EffectsVector_long____GetSize00); + tolua_function(tolua_S,".geti",tolua__EffectsVector_EffectsVector_long_____geti00); + tolua_endmodule(tolua_S); + #ifdef __cplusplus + tolua_cclass(tolua_S,"EffectsVector_long_","EffectsVector","",tolua_collect_EffectsVector_long_); + #else + tolua_cclass(tolua_S,"EffectsVector_long_","EffectsVector","",NULL); + #endif + tolua_beginmodule(tolua_S,"EffectsVector_long_"); + tolua_function(tolua_S,"GetSize",tolua__EffectsVector_long__GetSize00); + tolua_function(tolua_S,".geti",tolua__EffectsVector_long___geti00); + tolua_endmodule(tolua_S); + tolua_cclass(tolua_S,"EffectsVector_float_","EffectsVector","",NULL); + tolua_beginmodule(tolua_S,"EffectsVector_float_"); + tolua_function(tolua_S,"GetSize",tolua__EffectsVector_float__GetSize00); + tolua_function(tolua_S,".geti",tolua__EffectsVector_float___geti00); + tolua_endmodule(tolua_S); + #ifdef __cplusplus + tolua_cclass(tolua_S,"LuaMatrix4","LuaMatrix4","",tolua_collect_LuaMatrix4); + #else + tolua_cclass(tolua_S,"LuaMatrix4","LuaMatrix4","",NULL); + #endif + tolua_beginmodule(tolua_S,"LuaMatrix4"); + tolua_function(tolua_S,"new",tolua__LuaMatrix4_new00); + tolua_function(tolua_S,"new_local",tolua__LuaMatrix4_new00_local); + tolua_function(tolua_S,".call",tolua__LuaMatrix4_new00_local); + tolua_function(tolua_S,"new",tolua__LuaMatrix4_new01); + tolua_function(tolua_S,"new_local",tolua__LuaMatrix4_new01_local); + tolua_function(tolua_S,".call",tolua__LuaMatrix4_new01_local); + tolua_function(tolua_S,"new",tolua__LuaMatrix4_new02); + tolua_function(tolua_S,"new_local",tolua__LuaMatrix4_new02_local); + tolua_function(tolua_S,".call",tolua__LuaMatrix4_new02_local); + tolua_function(tolua_S,"new",tolua__LuaMatrix4_new03); + tolua_function(tolua_S,"new_local",tolua__LuaMatrix4_new03_local); + tolua_function(tolua_S,".call",tolua__LuaMatrix4_new03_local); + tolua_function(tolua_S,"SetIdentity",tolua__LuaMatrix4_SetIdentity00); + tolua_function(tolua_S,"Translate",tolua__LuaMatrix4_Translate00); + tolua_function(tolua_S,"Scale",tolua__LuaMatrix4_Scale00); + tolua_function(tolua_S,"Scale",tolua__LuaMatrix4_Scale01); + tolua_function(tolua_S,"RotateAroundAxisZ",tolua__LuaMatrix4_RotateAroundAxisZ00); + tolua_function(tolua_S,"RotateAroundAxisZ",tolua__LuaMatrix4_RotateAroundAxisZ01); + tolua_function(tolua_S,"RotateAroundAxisX",tolua__LuaMatrix4_RotateAroundAxisX00); + tolua_function(tolua_S,"RotateAroundAxisX",tolua__LuaMatrix4_RotateAroundAxisX01); + tolua_function(tolua_S,"RotateAroundAxisY",tolua__LuaMatrix4_RotateAroundAxisY00); + tolua_function(tolua_S,"RotateAroundAxisY",tolua__LuaMatrix4_RotateAroundAxisY01); + tolua_function(tolua_S,"RotateAroundAxisArbitrary",tolua__LuaMatrix4_RotateAroundAxisArbitrary00); + tolua_function(tolua_S,"RotateAroundAxisArbitrary",tolua__LuaMatrix4_RotateAroundAxisArbitrary01); + SetMetatable(tolua_S, "LuaMatrix4", "__mul",tolua__LuaMatrix4__mul00); + SetMetatable(tolua_S, "LuaMatrix4", "__mul",tolua__LuaMatrix4__mul01); + SetMetatable(tolua_S, "LuaMatrix4", "__add",tolua__LuaMatrix4__add00); + tolua_function(tolua_S,".sub",tolua__LuaMatrix4__sub00); + tolua_function(tolua_S,".sub",tolua__LuaMatrix4__sub01); + tolua_endmodule(tolua_S); + + { /* begin embedded lua code */ + int top = lua_gettop(tolua_S); + static const unsigned char B[] = { + 10,102,117,110, 99,116,105,111,110, 32, 71,101,116, 80,114, + 111,112,101,114,116,121, 40,101,108,101,109,101,110,116, 73, + 68, 44, 32,112,114,111,112,101,114,116,121, 41, 13, 10,105, + 102, 32,116,121,112,101, 40,101,108,101,109,101,110,116, 73, + 68, 41, 32,126, 61, 32, 39,110,117,109, 98,101,114, 39, 32, + 116,104,101,110, 13, 10,101,114,114,111,114, 40, 39, 70,105, + 114,115,116, 32, 97,114,103,117,109,101,110,116, 32,102,111, + 114, 32, 71,101,116, 80,114,111,112,101,114,116,121, 32,109, + 117,115,116, 32,104, 97,118,101, 32,116,121,112,101, 32,110, + 117,109, 98,101,114, 32, 40,101,108,101,109,101,110,116, 32, + 73, 68, 41, 39, 44, 32, 50, 41, 13, 10,101,110,100, 13, 10, + 105,102, 32,116,121,112,101, 40,112,114,111,112,101,114,116, + 121, 41, 32,126, 61, 32, 39,110,117,109, 98,101,114, 39, 32, + 116,104,101,110, 13, 10,101,114,114,111,114, 40, 39, 83,101, + 99,111,110,100, 32, 97,114,103,117,109,101,110,116, 32,102, + 111,114, 32, 71,101,116, 80,114,111,112,101,114,116,121, 32, + 109,117,115,116, 32,104, 97,118,101, 32,116,121,112,101, 32, + 110,117,109, 98,101,114, 32, 40, 78, 95, 46, 46, 46, 32,111, + 114, 32, 86, 95, 46, 46, 46, 32,111,114, 32, 66, 95, 46, 46, + 46, 41, 39, 44, 32, 50, 41, 13, 10,101,110,100, 13, 10,108, + 111, 99, 97,108, 32,114,101,115, 32, 61, 32,115, 99,101,110, + 101, 58, 71,101,116, 80,114,111,112,101,114,116,121, 40,101, + 108,101,109,101,110,116, 73, 68, 44, 32,112,114,111,112,101, + 114,116,121, 41, 32, 13, 10,105,102, 32,114,101,115, 46,116, + 121,112,101, 32, 61, 61, 32, 80,114,111,112,101,114,116,121, + 67, 97,115,116, 46, 78, 85, 77, 66, 69, 82, 32,116,104,101, + 110, 13, 10,114,101,116,117,114,110, 32,114,101,115, 46,118, + 97,108,117,101, 46,110,117,109, 98,101,114, 86, 97,108,117, + 101, 13, 10,101,108,115,101,105,102, 32,114,101,115, 46,116, + 121,112,101, 32, 61, 61, 32, 80,114,111,112,101,114,116,121, + 67, 97,115,116, 46, 66, 79, 79, 76, 32,116,104,101,110, 13, + 10,114,101,116,117,114,110, 32,114,101,115, 46,118, 97,108, + 117,101, 46, 98,111,111,108, 86, 97,108,117,101, 13, 10,101, + 108,115,101,105,102, 32,114,101,115, 46,116,121,112,101, 32, + 61, 61, 32, 80,114,111,112,101,114,116,121, 67, 97,115,116, + 46, 86, 69, 67, 51, 32,116,104,101,110, 13, 10,114,101,116, + 117,114,110, 32,114,101,115, 46,118, 97,108,117,101, 46,118, + 101, 99, 51, 86, 97,108,117,101, 13, 10,101,108,115,101, 32, + 13, 10,101,114,114,111,114, 40, 39, 69,114,114,111,114, 32, + 105,110, 32,102,117,110, 99,116,105,111,110, 32, 71,101,116, + 80,114,111,112,101,114,116,121, 58, 32,116,104,101,114,101, + 32,105,115, 32,110,111, 32,115,112,101, 99,105,102,105,101, + 100, 32,112,114,111,112,101,114,116,121, 39, 44, 32, 50, 41, + 13, 10,101,110,100, 13, 10,101,110,100, 13, 10,102,117,110, + 99,116,105,111,110, 32, 83,101,116, 80,114,111,112,101,114, + 116,121, 40,101,108,101,109,101,110,116, 73, 68, 44, 32,112, + 114,111,112,101,114,116,121, 44, 32,118, 97,108,117,101, 41, + 13, 10,105,102, 32,116,121,112,101, 40,101,108,101,109,101, + 110,116, 73, 68, 41, 32,126, 61, 32, 39,110,117,109, 98,101, + 114, 39, 32,116,104,101,110, 13, 10,101,114,114,111,114, 40, + 39, 70,105,114,115,116, 32, 97,114,103,117,109,101,110,116, + 32,102,111,114, 32, 83,101,116, 80,114,111,112,101,114,116, + 121, 32,109,117,115,116, 32,104, 97,118,101, 32,116,121,112, + 101, 32,110,117,109, 98,101,114, 32, 40,101,108,101,109,101, + 110,116, 32, 73, 68, 41, 39, 44, 32, 50, 41, 13, 10,101,110, + 100, 13, 10,105,102, 32,116,121,112,101, 40,112,114,111,112, + 101,114,116,121, 41, 32,126, 61, 32, 39,110,117,109, 98,101, + 114, 39, 32,116,104,101,110, 13, 10,101,114,114,111,114, 40, + 39, 83,101, 99,111,110,100, 32, 97,114,103,117,109,101,110, + 116, 32,102,111,114, 32, 83,101,116, 80,114,111,112,101,114, + 116,121, 32,109,117,115,116, 32,104, 97,118,101, 32,116,121, + 112,101, 32,110,117,109, 98,101,114, 32, 40, 78, 95, 46, 46, + 46, 32,111,114, 32, 86, 95, 46, 46, 46, 32,111,114, 32, 66, + 95, 46, 46, 46, 41, 39, 44, 32, 50, 41, 13, 10,101,110,100, + 13, 10,108,111, 99, 97,108, 32,118, 97,108,117,101, 84,121, + 112,101, 32, 61, 32,116,111,108,117, 97, 46,116,121,112,101, + 40,118, 97,108,117,101, 41, 13, 10,105,102, 32,118, 97,108, + 117,101, 84,121,112,101, 32,126, 61, 32, 39,110,117,109, 98, + 101,114, 39, 32, 97,110,100, 32,118, 97,108,117,101, 84,121, + 112,101, 32,126, 61, 32, 39, 98,111,111,108,101, 97,110, 39, + 32, 97,110,100, 32,118, 97,108,117,101, 84,121,112,101, 32, + 126, 61, 32, 39, 86,101, 99,116,111,114, 51, 39, 32, 97,110, + 100, 32,118, 97,108,117,101, 84,121,112,101, 32,126, 61, 32, + 39, 99,111,110,115,116, 32, 86,101, 99,116,111,114, 51, 39, + 32,116,104,101,110, 13, 10,101,114,114,111,114, 40, 39, 84, + 104,105,114,100, 32, 97,114,103,117,109,101,110,116, 32,102, + 111,114, 32, 83,101,116, 80,114,111,112,101,114,116,121, 32, + 109,117,115,116, 32,104, 97,118,101, 32,111,110,101, 32,111, + 102, 32,116,104,101, 32,116,121,112,101,115, 58, 32,110,117, + 109, 98,101,114, 44, 32, 98,111,111,108,101, 97,110, 44, 32, + 86,101, 99,116,111,114, 51, 44, 32, 99,111,110,115,116, 32, + 86,101, 99,116,111,114, 51, 32, 40, 97, 32,118, 97,108,117, + 101, 32,102,111,114, 32,115,112,101, 99,105,102,105,101,100, + 32,112,114,111,112,101,114,116,121, 41, 39, 44, 32, 50, 41, + 13, 10,101,110,100, 13, 10,108,111, 99, 97,108, 32,114,101, + 115, 32, 61, 32,115, 99,101,110,101, 58, 83,101,116, 80,114, + 111,112,101,114,116,121, 40,101,108,101,109,101,110,116, 73, + 68, 44, 32,112,114,111,112,101,114,116,121, 44, 32,118, 97, + 108,117,101, 41, 13, 10,105,102, 32,114,101,115, 32, 61, 61, + 32,102, 97,108,115,101, 32,116,104,101,110, 13, 10,101,114, + 114,111,114, 40, 39, 69,114,114,111,114, 32,105,110, 32,102, + 117,110, 99,116,105,111,110, 32, 83,101,116, 80,114,111,112, + 101,114,116,121, 58, 32,115,112,101, 99,105,102,105,101,100, + 32,112,114,111,112,101,114,116,121, 32,119, 97,115, 32,110, + 111,116, 32,115,101,116, 39, 44, 32, 50, 41, 13, 10,101,110, + 100, 13, 10,101,110,100, 13, 10,102,117,110, 99,116,105,111, + 110, 32, 83,101,116, 80,114,111,112,101,114,116,121, 71,114, + 111,117,112, 40, 77,111,100,101,108, 83,117,114,102, 97, 99, + 101, 73, 68, 44, 32,103,114,111,117,112, 44, 32,112,114,111, + 112,101,114,116,121, 44, 32,118, 97,108,117,101, 41, 13, 10, + 105,102, 32,116,121,112,101, 40, 77,111,100,101,108, 83,117, + 114,102, 97, 99,101, 73, 68, 41, 32,126, 61, 32, 39,110,117, + 109, 98,101,114, 39, 32,116,104,101,110, 13, 10,101,114,114, + 111,114, 40, 39, 70,105,114,115,116, 32, 97,114,103,117,109, + 101,110,116, 32,102,111,114, 32, 83,101,116, 80,114,111,112, + 101,114,116,121, 71,114,111,117,112, 32,109,117,115,116, 32, + 104, 97,118,101, 32,116,121,112,101, 32,110,117,109, 98,101, + 114, 32, 40, 73, 68, 32,102,111,114, 32,109,111,100,101,108, + 32,115,117,114,102, 97, 99,101, 41, 39, 44, 32, 50, 41, 13, + 10,101,110,100, 13, 10,105,102, 32,116,121,112,101, 40,103, + 114,111,117,112, 41, 32,126, 61, 32, 39,110,117,109, 98,101, + 114, 39, 32,116,104,101,110, 13, 10,101,114,114,111,114, 40, + 39, 83,101, 99,111,110,100, 32, 97,114,103,117,109,101,110, + 116, 32,102,111,114, 32, 83,101,116, 80,114,111,112,101,114, + 116,121, 71,114,111,117,112, 32,109,117,115,116, 32,104, 97, + 118,101, 32,116,121,112,101, 32,110,117,109, 98,101,114, 32, + 40,102,111,114, 32,101,120, 97,109,112,108,101, 32, 65, 76, + 76, 95, 80, 79, 73, 78, 84, 83, 41, 39, 44, 32, 50, 41, 13, + 10,101,110,100, 13, 10,105,102, 32,116,121,112,101, 40,112, + 114,111,112,101,114,116,121, 41, 32,126, 61, 32, 39,110,117, + 109, 98,101,114, 39, 32,116,104,101,110, 13, 10,101,114,114, + 111,114, 40, 39, 84,104,105,114,100, 32, 97,114,103,117,109, + 101,110,116, 32,102,111,114, 32, 83,101,116, 80,114,111,112, + 101,114,116,121, 71,114,111,117,112, 32,109,117,115,116, 32, + 104, 97,118,101, 32,116,121,112,101, 32,110,117,109, 98,101, + 114, 32, 40, 78, 95, 46, 46, 46, 41, 39, 44, 32, 50, 41, 13, + 10,101,110,100, 13, 10,105,102, 32,116,121,112,101, 40,118, + 97,108,117,101, 41, 32,126, 61, 32, 39,110,117,109, 98,101, + 114, 39, 32,116,104,101,110, 13, 10,101,114,114,111,114, 40, + 39, 70,111,117,114,116,104, 32, 97,114,103,117,109,101,110, + 116, 32,102,111,114, 32, 83,101,116, 80,114,111,112,101,114, + 116,121, 71,114,111,117,112, 32,109,117,115,116, 32,104, 97, + 118,101, 32,116,121,112,101, 32,110,117,109, 98,101,114, 32, + 40, 97, 32,118, 97,108,117,101, 32,102,111,114, 32,115,112, + 101, 99,105,102,105,101,100, 32,112,114,111,112,101,114,116, + 121, 41, 39, 44, 32, 50, 41, 13, 10,101,110,100, 13, 10,108, + 111, 99, 97,108, 32,114,101,115, 32, 61, 32,115, 99,101,110, + 101, 58, 83,101,116, 80,114,111,112,101,114,116,121, 71,114, + 111,117,112, 40, 77,111,100,101,108, 83,117,114,102, 97, 99, + 101, 73, 68, 44, 32,103,114,111,117,112, 44, 32,112,114,111, + 112,101,114,116,121, 44, 32,118, 97,108,117,101, 41, 32, 13, + 10,105,102, 32,114,101,115, 32, 61, 61, 32,102, 97,108,115, + 101, 32,116,104,101,110, 13, 10,101,114,114,111,114, 40, 39, + 69,114,114,111,114, 32,105,110, 32,102,117,110, 99,116,105, + 111,110, 32, 83,101,116, 80,114,111,112,101,114,116,121, 71, + 114,111,117,112, 58, 32,115,112,101, 99,105,102,105,101,100, + 32,112,114,111,112,101,114,116,121, 32,119, 97,115, 32,110, + 111,116, 32,115,101,116, 39, 44, 32, 50, 41, 13, 10,101,110, + 100, 13, 10,101,110,100, 13, 10, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45,32 + }; + tolua_dobuffer(tolua_S,(char*)B,sizeof(B),"tolua embedded: ./SetGetProperty.lua"); + lua_settop(tolua_S, top); + } /* end of embedded lua code */ + + + { /* begin embedded lua code */ + int top = lua_gettop(tolua_S); + static const unsigned char B[] = { + 10,102,117,110, 99,116,105,111,110, 32, 77,111,118,101, 83, + 117,114,102, 97, 99,101, 40, 71,114, 97,112,104,105, 99, 97, + 108, 83,117,114,102, 97, 99,101, 73, 68, 44, 32, 88, 48, 44, + 32, 89, 48, 44, 32, 90, 48, 41, 13, 10,105,102, 32,116,121, + 112,101, 40, 71,114, 97,112,104,105, 99, 97,108, 83,117,114, + 102, 97, 99,101, 73, 68, 41, 32,126, 61, 32, 39,110,117,109, + 98,101,114, 39, 32,116,104,101,110, 13, 10,101,114,114,111, + 114, 40, 39, 70,105,114,115,116, 32, 97,114,103,117,109,101, + 110,116, 32,102,111,114, 32, 77,111,118,101, 83,117,114,102, + 97, 99,101, 32,109,117,115,116, 32,104, 97,118,101, 32,116, + 121,112,101, 32,110,117,109, 98,101,114, 32, 40, 73, 68, 32, + 102,111,114, 32,103,114, 97,112,104,105, 99, 97,108, 32,115, + 117,114,102, 97, 99,101, 41, 39, 44, 32, 50, 41, 13, 10,101, + 110,100, 13, 10,108,111, 99, 97,108, 32,114,101,115, 32, 61, + 32,102, 97,108,115,101, 13, 10,108,111, 99, 97,108, 32,116, + 121,112,101, 88, 48, 32, 61, 32,116,111,108,117, 97, 46,116, + 121,112,101, 40, 88, 48, 41, 13, 10,105,102, 32, 40,116,121, + 112,101, 88, 48, 32, 61, 61, 32, 39, 86,101, 99,116,111,114, + 51, 39, 32,111,114, 32,116,121,112,101, 88, 48, 32, 61, 61, + 32, 39, 99,111,110,115,116, 32, 86,101, 99,116,111,114, 51, + 39, 41, 32, 97,110,100, 32, 89, 48, 32, 61, 61, 32,110,105, + 108, 32, 97,110,100, 32, 90, 48, 32, 61, 61, 32,110,105,108, + 32,116,104,101,110, 32, 13, 10,114,101,115, 32, 61, 32,115, + 99,101,110,101, 58, 77,111,118,101, 83,117,114,102, 97, 99, + 101, 40, 71,114, 97,112,104,105, 99, 97,108, 83,117,114,102, + 97, 99,101, 73, 68, 44, 32, 88, 48, 41, 13, 10,101,108,115, + 101,105,102, 32,116,121,112,101, 88, 48, 32, 61, 61, 32, 39, + 110,117,109, 98,101,114, 39, 32, 97,110,100, 32,116,121,112, + 101, 40, 89, 48, 41, 32, 61, 61, 32, 39,110,117,109, 98,101, + 114, 39, 32, 97,110,100, 32,116,121,112,101, 40, 90, 48, 41, + 32, 61, 61, 32, 39,110,117,109, 98,101,114, 39, 32,116,104, + 101,110, 13, 10,114,101,115, 32, 61, 32,115, 99,101,110,101, + 58, 77,111,118,101, 83,117,114,102, 97, 99,101, 40, 71,114, + 97,112,104,105, 99, 97,108, 83,117,114,102, 97, 99,101, 73, + 68, 44, 32, 88, 48, 44, 32, 89, 48, 44, 32, 90, 48, 41, 13, + 10,101,108,115,101, 13, 10,101,114,114,111,114, 40, 39, 83, + 101, 99,111,110,100, 32, 97,114,103,117,109,101,110,116, 32, + 102,111,114, 32, 77,111,118,101, 83,117,114,102, 97, 99,101, + 32,109,117,115,116, 32,104, 97,118,101, 32,116,121,112,101, + 32, 86,101, 99,116,111,114, 51, 32,111,114, 32,115,101, 99, + 111,110,100, 44, 32,116,104,105,114,100, 32, 97,110,100, 32, + 102,111,117,114,116,104, 32, 97,114,103,117,109,101,110,116, + 115, 32,109,117,115,116, 32,104, 97,118,101, 32,116,121,112, + 101, 32,110,117,109, 98,101,114, 39, 44, 32, 50, 41, 13, 10, + 101,110,100, 13, 10,105,102, 32,114,101,115, 32, 61, 61, 32, + 102, 97,108,115,101, 32,116,104,101,110, 13, 10,101,114,114, + 111,114, 40, 39, 69,114,114,111,114, 32,105,110, 32,102,117, + 110, 99,116,105,111,110, 32, 77,111,118,101, 83,117,114,102, + 97, 99,101, 32, 40,109, 97,121, 98,101, 32,121,111,117, 32, + 104, 97,118,101, 32,115,112,101, 99,105,102,105,101,100, 32, + 119,114,111,110,103, 32,105,100, 41, 39, 44, 32, 50, 41, 13, + 10,101,110,100, 13, 10,101,110,100, 13, 10,102,117,110, 99, + 116,105,111,110, 32, 82,111,116, 97,116,101, 83,117,114,102, + 97, 99,101, 40, 71,114, 97,112,104,105, 99, 97,108, 83,117, + 114,102, 97, 99,101, 73, 68, 44, 32, 65,110,103,108,101, 44, + 32, 65,120,105,115, 44, 32, 66, 97,115,101, 80,111,105,110, + 116, 44, 32, 65,120, 44, 32, 65,121, 44, 32, 65,122, 44, 32, + 88, 48, 44, 32, 89, 48, 44, 32, 90, 48, 41, 13, 10,105,102, + 32,116,121,112,101, 40, 71,114, 97,112,104,105, 99, 97,108, + 83,117,114,102, 97, 99,101, 73, 68, 41, 32,126, 61, 32, 39, + 110,117,109, 98,101,114, 39, 32,116,104,101,110, 13, 10,101, + 114,114,111,114, 40, 39, 70,105,114,115,116, 32, 97,114,103, + 117,109,101,110,116, 32,102,111,114, 32, 82,111,116, 97,116, + 101, 83,117,114,102, 97, 99,101, 32,109,117,115,116, 32,104, + 97,118,101, 32,116,121,112,101, 32,110,117,109, 98,101,114, + 32, 40, 73, 68, 32,102,111,114, 32,103,114, 97,112,104,105, + 99, 97,108, 32,115,117,114,102, 97, 99,101, 41, 39, 44, 32, + 50, 41, 13, 10,101,110,100, 13, 10,105,102, 32,116,121,112, + 101, 40, 65,110,103,108,101, 41, 32,126, 61, 32, 39,110,117, + 109, 98,101,114, 39, 32,116,104,101,110, 13, 10,101,114,114, + 111,114, 40, 39, 83,101, 99,111,110,100, 32, 97,114,103,117, + 109,101,110,116, 32,102,111,114, 32, 82,111,116, 97,116,101, + 83,117,114,102, 97, 99,101, 32,109,117,115,116, 32,104, 97, + 118,101, 32,116,121,112,101, 32,110,117,109, 98,101,114, 32, + 40,114,111,116, 97,116,105,111,110, 32, 97,110,103,108,101, + 41, 39, 44, 32, 50, 41, 13, 10,101,110,100, 13, 10,105,102, + 32,116,121,112,101, 40, 65,120,105,115, 41, 32,126, 61, 32, + 39,110,117,109, 98,101,114, 39, 32,116,104,101,110, 13, 10, + 101,114,114,111,114, 40, 39, 84,104,105,114,100, 32, 97,114, + 103,117,109,101,110,116, 32,102,111,114, 32, 82,111,116, 97, + 116,101, 83,117,114,102, 97, 99,101, 32,109,117,115,116, 32, + 104, 97,118,101, 32,116,121,112,101, 32,110,117,109, 98,101, + 114, 32, 40,102,111,114, 32,101,120, 97,109,112,108,101, 32, + 65, 88, 73, 83, 95, 89, 41, 39, 44, 32, 50, 41, 13, 10,101, + 110,100, 13, 10,105,102, 32,116,121,112,101, 40, 66, 97,115, + 101, 80,111,105,110,116, 41, 32,126, 61, 32, 39,110,117,109, + 98,101,114, 39, 32,116,104,101,110, 13, 10,101,114,114,111, + 114, 40, 39, 70,111,117,114,116,104, 32, 97,114,103,117,109, + 101,110,116, 32,102,111,114, 32, 82,111,116, 97,116,101, 83, + 117,114,102, 97, 99,101, 32,109,117,115,116, 32,104, 97,118, + 101, 32,116,121,112,101, 32,110,117,109, 98,101,114, 32, 40, + 102,111,114, 32,101,120, 97,109,112,108,101, 32, 80, 79, 73, + 78, 84, 95, 76, 69, 70, 84, 95, 84, 79, 80, 41, 39, 44, 32, + 50, 41, 13, 10,101,110,100, 13, 10, 13, 10,108,111, 99, 97, + 108, 32,114,101,115, 32, 61, 32,102, 97,108,115,101, 13, 10, + 108,111, 99, 97,108, 32,116,121,112,101, 65,120, 32, 61, 32, + 116,111,108,117, 97, 46,116,121,112,101, 40, 65,120, 41, 13, + 10,105,102, 32,116,121,112,101, 65,120, 32, 61, 61, 32, 39, + 86,101, 99,116,111,114, 51, 39, 32,111,114, 32,116,121,112, + 101, 65,120, 32, 61, 61, 32, 39, 99,111,110,115,116, 32, 86, + 101, 99,116,111,114, 51, 39, 32,116,104,101,110, 13, 10,105, + 102, 32, 65,122, 32, 61, 61, 32,110,105,108, 32, 97,110,100, + 32, 88, 48, 32, 61, 61, 32,110,105,108, 32, 97,110,100, 32, + 89, 48, 32, 61, 61, 32,110,105,108, 32, 97,110,100, 32, 90, + 48, 32, 61, 61, 32,110,105,108, 32,116,104,101,110, 13, 10, + 108,111, 99, 97,108, 32,116,121,112,101, 65,121, 32, 61, 32, + 116,111,108,117, 97, 46,116,121,112,101, 40, 65,121, 41, 13, + 10,105,102, 32,116,121,112,101, 65,121, 32, 61, 61, 32, 39, + 86,101, 99,116,111,114, 51, 39, 32,111,114, 32,116,121,112, + 101, 65,121, 32, 61, 61, 32, 39, 99,111,110,115,116, 32, 86, + 101, 99,116,111,114, 51, 39, 32,116,104,101,110, 13, 10,114, + 101,115, 32, 61, 32,115, 99,101,110,101, 58, 82,111,116, 97, + 116,101, 83,117,114,102, 97, 99,101, 86, 40, 71,114, 97,112, + 104,105, 99, 97,108, 83,117,114,102, 97, 99,101, 73, 68, 44, + 32, 65,110,103,108,101, 44, 32, 65,120,105,115, 44, 32, 66, + 97,115,101, 80,111,105,110,116, 44, 32, 65,120, 44, 32, 65, + 121, 41, 13, 10,101,108,115,101,105,102, 32, 65,121, 32, 61, + 61, 32,110,105,108, 32,116,104,101,110, 13, 10,114,101,115, + 32, 61, 32,115, 99,101,110,101, 58, 82,111,116, 97,116,101, + 83,117,114,102, 97, 99,101, 86, 40, 71,114, 97,112,104,105, + 99, 97,108, 83,117,114,102, 97, 99,101, 73, 68, 44, 32, 65, + 110,103,108,101, 44, 32, 65,120,105,115, 44, 32, 66, 97,115, + 101, 80,111,105,110,116, 44, 32, 65,120, 41, 13, 10,101,108, + 115,101, 13, 10,101,114,114,111,114, 40, 39, 83,105,120,116, + 104, 32, 97,114,103,117,109,101,110,116, 32,102,111,114, 32, + 82,111,116, 97,116,101, 83,117,114,102, 97, 99,101, 32,105, + 115, 32,105,110, 99,111,114,114,101, 99,116, 39, 44, 32, 50, + 41, 32, 13, 10,101,110,100, 13, 10,101,108,115,101, 13, 10, + 101,114,114,111,114, 40, 39, 87,114,111,110,103, 32,110,117, + 109, 98,101,114, 32,111,114, 32,116,121,112,101, 32,111,102, + 32,112, 97,114, 97,109,101,116,101,114,115, 32,102,111,114, + 32, 82,111,116, 97,116,101, 83,117,114,102, 97, 99,101, 32, + 40,115,101,101, 32,102,114,111,109, 32,115,105,120,116,104, + 32,112, 97,114, 97,109,101,116,101,114, 41, 39, 44, 32, 50, + 41, 13, 10,101,110,100, 13, 10, 13, 10,105,102, 32,114,101, + 115, 32, 61, 61, 32,102, 97,108,115,101, 32,116,104,101,110, + 13, 10,101,114,114,111,114, 40, 39, 69,114,114,111,114, 32, + 105,110, 32,102,117,110, 99,116,105,111,110, 32, 82,111,116, + 97,116,101, 83,117,114,102, 97, 99,101, 32, 40,109, 97,121, + 98,101, 32,121,111,117, 32,104, 97,118,101, 32,115,112,101, + 99,105,102,105,101,100, 32,119,114,111,110,103, 32,105,100, + 32,111,114, 32,119,114,111,110,103, 32, 97,120,105,115, 32, + 99,111,110,102,105,103,117,114, 97,116,105,111,110, 41, 39, + 44, 32, 50, 41, 13, 10,101,108,115,101, 13, 10,114,101,116, + 117,114,110, 13, 10,101,110,100, 13, 10,101,110,100, 13, 10, + 105,102, 32,116,121,112,101, 65,120, 32, 61, 61, 32, 39,110, + 117,109, 98,101,114, 39, 32, 97,110,100, 32,116,121,112,101, + 40, 65,121, 41, 32, 61, 61, 32, 39,110,117,109, 98,101,114, + 39, 32, 97,110,100, 32,116,121,112,101, 40, 65,122, 41, 32, + 61, 61, 32, 39,110,117,109, 98,101,114, 39, 32,116,104,101, + 110, 13, 10,105,102, 32,116,121,112,101, 40, 88, 48, 41, 32, + 61, 61, 32, 39,110,117,109, 98,101,114, 39, 32, 97,110,100, + 32,116,121,112,101, 40, 89, 48, 41, 32, 61, 61, 32, 39,110, + 117,109, 98,101,114, 39, 32, 97,110,100, 32,116,121,112,101, + 40, 90, 48, 41, 32, 61, 61, 32, 39,110,117,109, 98,101,114, + 39, 32,116,104,101,110, 13, 10,114,101,115, 32, 61, 32,115, + 99,101,110,101, 58, 82,111,116, 97,116,101, 83,117,114,102, + 97, 99,101, 78, 40, 71,114, 97,112,104,105, 99, 97,108, 83, + 117,114,102, 97, 99,101, 73, 68, 44, 32, 65,110,103,108,101, + 44, 32, 65,120,105,115, 44, 32, 66, 97,115,101, 80,111,105, + 110,116, 44, 32, 65,120, 44, 32, 65,121, 44, 32, 65,122, 44, + 32, 88, 48, 44, 32, 89, 48, 44, 32, 90, 48, 41, 13, 10,101, + 108,115,101,105,102, 32, 88, 48, 32, 61, 61, 32,110,105,108, + 32, 97,110,100, 32, 89, 48, 32, 61, 61, 32,110,105,108, 32, + 97,110,100, 32, 90, 48, 32, 61, 61, 32,110,105,108, 32,116, + 104,101,110, 13, 10,114,101,115, 32, 61, 32,115, 99,101,110, + 101, 58, 82,111,116, 97,116,101, 83,117,114,102, 97, 99,101, + 78, 40, 71,114, 97,112,104,105, 99, 97,108, 83,117,114,102, + 97, 99,101, 73, 68, 44, 32, 65,110,103,108,101, 44, 32, 65, + 120,105,115, 44, 32, 66, 97,115,101, 80,111,105,110,116, 44, + 32, 65,120, 44, 32, 65,121, 44, 32, 65,122, 41, 13, 10,101, + 108,115,101, 13, 10,101,114,114,111,114, 40, 39, 87,114,111, + 110,103, 32,110,117,109, 98,101,114, 32,111,114, 32,116,121, + 112,101, 32,111,102, 32,112, 97,114, 97,109,101,116,101,114, + 115, 32,102,111,114, 32, 82,111,116, 97,116,101, 83,117,114, + 102, 97, 99,101, 32, 40,115,101,101, 32,102,114,111,109, 32, + 101,105,103,104,116,104, 32,112, 97,114, 97,109,101,116,101, + 114, 41, 39, 44, 32, 50, 41, 13, 10,101,110,100, 13, 10,101, + 108,115,101,105,102, 32, 65,120, 32, 61, 61, 32,110,105,108, + 32, 97,110,100, 32, 65,121, 32, 61, 61, 32,110,105,108, 32, + 97,110,100, 32, 65,122, 32, 61, 61, 32,110,105,108, 32, 97, + 110,100, 32, 88, 48, 32, 61, 61, 32,110,105,108, 32, 97,110, + 100, 32, 89, 48, 32, 61, 61, 32,110,105,108, 32, 97,110,100, + 32, 90, 48, 32, 61, 61, 32,110,105,108, 32,116,104,101,110, + 13, 10,114,101,115, 32, 61, 32,115, 99,101,110,101, 58, 82, + 111,116, 97,116,101, 83,117,114,102, 97, 99,101, 78, 40, 71, + 114, 97,112,104,105, 99, 97,108, 83,117,114,102, 97, 99,101, + 73, 68, 44, 32, 65,110,103,108,101, 44, 32, 65,120,105,115, + 44, 32, 66, 97,115,101, 80,111,105,110,116, 41, 13, 10,101, + 108,115,101, 13, 10,101,114,114,111,114, 40, 39, 87,114,111, + 110,103, 32,110,117,109, 98,101,114, 32,111,114, 32,116,121, + 112,101, 32,111,102, 32,112, 97,114, 97,109,101,116,101,114, + 115, 32,102,111,114, 32, 82,111,116, 97,116,101, 83,117,114, + 102, 97, 99,101, 32, 40,115,101,101, 32,102,114,111,109, 32, + 102,105,102,116,104, 32,112, 97,114, 97,109,101,116,101,114, + 41, 39, 44, 32, 50, 41, 13, 10,101,110,100, 13, 10,105,102, + 32,114,101,115, 32, 61, 61, 32,102, 97,108,115,101, 32,116, + 104,101,110, 13, 10,101,114,114,111,114, 40, 39, 69,114,114, + 111,114, 32,105,110, 32,102,117,110, 99,116,105,111,110, 32, + 82,111,116, 97,116,101, 83,117,114,102, 97, 99,101, 32, 40, + 109, 97,121, 98,101, 32,121,111,117, 32,104, 97,118,101, 32, + 115,112,101, 99,105,102,105,101,100, 32,119,114,111,110,103, + 32,105,100, 32,111,114, 32,119,114,111,110,103, 32, 97,120, + 105,115, 32, 99,111,110,102,105,103,117,114, 97,116,105,111, + 110, 41, 39, 44, 32, 50, 41, 13, 10,101,110,100, 13, 10,101, + 110,100, 13, 10,102,117,110, 99,116,105,111,110, 32, 83, 99, + 97,108,101, 83,117,114,102, 97, 99,101, 40, 71,114, 97,112, + 104,105, 99, 97,108, 83,117,114,102, 97, 99,101, 73, 68, 44, + 32, 77,117,108, 88, 44, 32, 77,117,108, 89, 44, 32, 77,117, + 108, 90, 44, 32, 66, 97,115,101, 80,111,105,110,116, 44, 32, + 88, 48, 44, 32, 89, 48, 44, 32, 90, 48, 41, 13, 10,105,102, + 32,116,121,112,101, 40, 71,114, 97,112,104,105, 99, 97,108, + 83,117,114,102, 97, 99,101, 73, 68, 41, 32,126, 61, 32, 39, + 110,117,109, 98,101,114, 39, 32,116,104,101,110, 13, 10,101, + 114,114,111,114, 40, 39, 70,105,114,115,116, 32, 97,114,103, + 117,109,101,110,116, 32,102,111,114, 32, 83, 99, 97,108,101, + 83,117,114,102, 97, 99,101, 32,109,117,115,116, 32,104, 97, + 118,101, 32,116,121,112,101, 32,110,117,109, 98,101,114, 32, + 40, 73, 68, 32,102,111,114, 32,103,114, 97,112,104,105, 99, + 97,108, 32,115,117,114,102, 97, 99,101, 41, 39, 44, 32, 50, + 41, 13, 10,101,110,100, 13, 10, 13, 10,108,111, 99, 97,108, + 32,114,101,115, 32, 61, 32,102, 97,108,115,101, 13, 10,108, + 111, 99, 97,108, 32,116,121,112,101, 77,117,108, 88, 32, 61, + 32,116,111,108,117, 97, 46,116,121,112,101, 40, 77,117,108, + 88, 41, 13, 10,105,102, 32,116,121,112,101, 77,117,108, 88, + 32, 61, 61, 32, 39, 86,101, 99,116,111,114, 51, 39, 32,111, + 114, 32,116,121,112,101, 77,117,108, 88, 32, 61, 61, 32, 39, + 99,111,110,115,116, 32, 86,101, 99,116,111,114, 51, 39, 32, + 116,104,101,110, 13, 10,105,102, 32,116,121,112,101, 40, 77, + 117,108, 89, 41, 32, 61, 61, 32, 39,110,117,109, 98,101,114, + 39, 32,116,104,101,110, 13, 10,108,111, 99, 97,108, 32,116, + 121,112,101, 77,117,108, 90, 32, 61, 32,116,111,108,117, 97, + 46,116,121,112,101, 40, 77,117,108, 90, 41, 13, 10,105,102, + 32,116,121,112,101, 77,117,108, 90, 32, 61, 61, 32, 39, 86, + 101, 99,116,111,114, 51, 39, 32,111,114, 32,116,121,112,101, + 77,117,108, 90, 32, 61, 61, 32, 39, 99,111,110,115,116, 32, + 86,101, 99,116,111,114, 51, 39, 32,116,104,101,110, 13, 10, + 114,101,115, 32, 61, 32,115, 99,101,110,101, 58, 83, 99, 97, + 108,101, 83,117,114,102, 97, 99,101, 40, 71,114, 97,112,104, + 105, 99, 97,108, 83,117,114,102, 97, 99,101, 73, 68, 44, 32, + 77,117,108, 88, 44, 32, 77,117,108, 89, 44, 32, 77,117,108, + 90, 41, 13, 10,101,108,115,101,105,102, 32, 77,117,108, 90, + 32, 61, 61, 32,110,105,108, 32,116,104,101,110, 13, 10,114, + 101,115, 32, 61, 32,115, 99,101,110,101, 58, 83, 99, 97,108, + 101, 83,117,114,102, 97, 99,101, 40, 71,114, 97,112,104,105, + 99, 97,108, 83,117,114,102, 97, 99,101, 73, 68, 44, 32, 77, + 117,108, 88, 44, 32, 77,117,108, 89, 41, 13, 10,101,108,115, + 101, 13, 10,101,114,114,111,114, 40, 39, 70,111,117,114,116, + 104, 32, 97,114,103,117,109,101,110,116, 32,102,111,114, 32, + 83, 99, 97,108,101, 83,117,114,102, 97, 99,101, 32,104, 97, + 115, 32,119,114,111,110,103, 32,116,121,112,101, 39, 44, 32, + 50, 41, 13, 10,101,110,100, 13, 10,101,108,115,101, 13, 10, + 101,114,114,111,114, 40, 39, 84,104,105,114,100, 32, 97,114, + 103,117,109,101,110,116, 32,102,111,114, 32, 83, 99, 97,108, + 101, 83,117,114,102, 97, 99,101, 32,104, 97,115, 32,119,114, + 111,110,103, 32,116,121,112,101, 39, 44, 32, 50, 41, 13, 10, + 101,110,100, 13, 10,105,102, 32,114,101,115, 32, 61, 61, 32, + 102, 97,108,115,101, 32,116,104,101,110, 13, 10,101,114,114, + 111,114, 40, 39, 69,114,114,111,114, 32,105,110, 32,102,117, + 110, 99,116,105,111,110, 32, 83, 99, 97,108,101, 83,117,114, + 102, 97, 99,101, 32, 40,121,111,117, 32,104, 97,118,101, 32, + 115,112,101, 99,105,102,105,101,100, 32,119,114,111,110,103, + 32,105,100, 32,111,114, 32,115,101,110,116, 32,110,101,103, + 97,116,105,118,101, 32,109,117,108,116,105,112,108,105,101, + 114,115, 41, 39, 44, 32, 50, 41, 13, 10,101,108,115,101, 13, + 10,114,101,116,117,114,110, 13, 10,101,110,100, 13, 10,101, + 110,100, 13, 10,105,102, 32,116,121,112,101, 40, 77,117,108, + 88, 41, 32, 61, 61, 32, 39,110,117,109, 98,101,114, 39, 32, + 97,110,100, 32,116,121,112,101, 40, 77,117,108, 89, 41, 32, + 61, 61, 32, 39,110,117,109, 98,101,114, 39, 32, 97,110,100, + 32,116,121,112,101, 40, 77,117,108, 90, 41, 32, 61, 61, 32, + 39,110,117,109, 98,101,114, 39, 32,116,104,101,110, 13, 10, + 105,102, 32,116,121,112,101, 40, 66, 97,115,101, 80,111,105, + 110,116, 41, 32, 61, 61, 32, 39,110,117,109, 98,101,114, 39, + 32,116,104,101,110, 13, 10,105,102, 32,116,121,112,101, 40, + 88, 48, 41, 32, 61, 61, 32, 39,110,117,109, 98,101,114, 39, + 32, 97,110,100, 32,116,121,112,101, 40, 89, 48, 41, 32, 61, + 61, 32, 39,110,117,109, 98,101,114, 39, 32, 97,110,100, 32, + 116,121,112,101, 40, 90, 48, 41, 32, 61, 61, 32, 39,110,117, + 109, 98,101,114, 39, 32,116,104,101,110, 13, 10,114,101,115, + 32, 61, 32,115, 99,101,110,101, 58, 83, 99, 97,108,101, 83, + 117,114,102, 97, 99,101, 40, 71,114, 97,112,104,105, 99, 97, + 108, 83,117,114,102, 97, 99,101, 73, 68, 44, 32, 77,117,108, + 88, 44, 32, 77,117,108, 89, 44, 32, 77,117,108, 90, 44, 32, + 66, 97,115,101, 80,111,105,110,116, 44, 32, 88, 48, 44, 32, + 89, 48, 44, 32, 90, 48, 41, 13, 10,101,108,115,101,105,102, + 32, 88, 48, 32, 61, 61, 32,110,105,108, 32, 97,110,100, 32, + 89, 48, 32, 61, 61, 32,110,105,108, 32, 97,110,100, 32, 90, + 48, 32, 61, 61, 32,110,105,108, 32,116,104,101,110, 13, 10, + 114,101,115, 32, 61, 32,115, 99,101,110,101, 58, 83, 99, 97, + 108,101, 83,117,114,102, 97, 99,101, 40, 71,114, 97,112,104, + 105, 99, 97,108, 83,117,114,102, 97, 99,101, 73, 68, 44, 32, + 77,117,108, 88, 44, 32, 77,117,108, 89, 44, 32, 77,117,108, + 90, 44, 32, 66, 97,115,101, 80,111,105,110,116, 41, 13, 10, + 101,108,115,101, 13, 10,101,114,114,111,114, 40, 39, 87,114, + 111,110,103, 32,110,117,109, 98,101,114, 32,111,114, 32,116, + 121,112,101, 32,111,102, 32,112, 97,114, 97,109,101,116,101, + 114,115, 32,102,111,114, 32, 83, 99, 97,108,101, 83,117,114, + 102, 97, 99,101, 32, 40,115,101,101, 32,102,114,111,109, 32, + 115,105,120,116,104, 32,112, 97,114, 97,109,101,116,101,114, + 41, 39, 44, 32, 50, 41, 13, 10,101,110,100, 13, 10,101,108, + 115,101, 13, 10,101,114,114,111,114, 40, 39, 70,105,102,116, + 104, 32, 97,114,103,117,109,101,110,116, 32,102,111,114, 32, + 83, 99, 97,108,101, 83,117,114,102, 97, 99,101, 32,104, 97, + 115, 32,119,114,111,110,103, 32,116,121,112,101, 39, 44, 32, + 50, 41, 13, 10,101,110,100, 13, 10,101,108,115,101, 13, 10, + 101,114,114,111,114, 40, 39, 87,114,111,110,103, 32,110,117, + 109, 98,101,114, 32,111,114, 32,116,121,112,101, 32,111,102, + 32,112, 97,114, 97,109,101,116,101,114,115, 32,102,111,114, + 32, 83, 99, 97,108,101, 83,117,114,102, 97, 99,101, 32, 40, + 115,101,101, 32,102,114,111,109, 32,115,101, 99,111,110,100, + 32,112, 97,114, 97,109,101,116,101,114, 41, 39, 44, 32, 50, + 41, 13, 10,101,110,100, 13, 10,105,102, 32,114,101,115, 32, + 61, 61, 32,102, 97,108,115,101, 32,116,104,101,110, 13, 10, + 101,114,114,111,114, 40, 39, 69,114,114,111,114, 32,105,110, + 32,102,117,110, 99,116,105,111,110, 32, 83, 99, 97,108,101, + 83,117,114,102, 97, 99,101, 32, 40,109, 97,121, 98,101, 32, + 121,111,117, 32,104, 97,118,101, 32,115,112,101, 99,105,102, + 105,101,100, 32,119,114,111,110,103, 32,105,100, 41, 39, 44, + 32, 50, 41, 13, 10,101,110,100, 13, 10,101,110,100, 13, 10, + 102,117,110, 99,116,105,111,110, 32, 82,101,115,101,116, 83, + 117,114,102, 97, 99,101, 84,114, 97,110,115,102,111,114,109, + 97,116,105,111,110, 40, 71,114, 97,112,104,105, 99, 97,108, + 83,117,114,102, 97, 99,101, 73, 68, 41, 13, 10,105,102, 32, + 116,121,112,101, 40, 71,114, 97,112,104,105, 99, 97,108, 83, + 117,114,102, 97, 99,101, 73, 68, 41, 32,126, 61, 32, 39,110, + 117,109, 98,101,114, 39, 32,116,104,101,110, 13, 10,101,114, + 114,111,114, 40, 39, 65,114,103,117,109,101,110,116, 32,102, + 111,114, 32, 82,101,115,101,116, 83,117,114,102, 97, 99,101, + 84,114, 97,110,115,102,111,114,109, 97,116,105,111,110, 32, + 109,117,115,116, 32,104, 97,118,101, 32,116,121,112,101, 32, + 110,117,109, 98,101,114, 32, 40, 73, 68, 32,102,111,114, 32, + 103,114, 97,112,104,105, 99, 97,108, 32,115,117,114,102, 97, + 99,101, 41, 39, 44, 32, 50, 41, 13, 10,101,110,100, 13, 10, + 108,111, 99, 97,108, 32,114,101,115, 32, 61, 32,115, 99,101, + 110,101, 58, 82,101,115,101,116, 83,117,114,102, 97, 99,101, + 84,114, 97,110,115,102,111,114,109, 97,116,105,111,110, 40, + 71,114, 97,112,104,105, 99, 97,108, 83,117,114,102, 97, 99, + 101, 73, 68, 41, 13, 10,105,102, 32,114,101,115, 32, 61, 61, + 32,102, 97,108,115,101, 32,116,104,101,110, 13, 10,101,114, + 114,111,114, 40, 39, 69,114,114,111,114, 32,105,110, 32,102, + 117,110, 99,116,105,111,110, 32, 82,101,115,101,116, 83,117, + 114,102, 97, 99,101, 84,114, 97,110,115,102,111,114,109, 97, + 116,105,111,110, 32, 40,109, 97,121, 98,101, 32,121,111,117, + 32,104, 97,118,101, 32,115,112,101, 99,105,102,105,101,100, + 32,119,114,111,110,103, 32,105,100, 41, 39, 44, 32, 50, 41, + 13, 10,101,110,100, 13, 10,101,110,100, 13, 10,102,117,110, + 99,116,105,111,110, 32, 83,101,116, 84,114, 97,110,115,102, + 111,114,109, 97,116,105,111,110, 77, 97,116,114,105,120, 40, + 103,114, 97,112,104,105, 99, 97,108, 83,117,114,102, 97, 99, + 101, 73, 68, 44, 32,109, 97,116,114,105,120, 52, 41, 13, 10, + 105,102, 32,116,121,112,101, 40,103,114, 97,112,104,105, 99, + 97,108, 83,117,114,102, 97, 99,101, 73, 68, 41, 32,126, 61, + 32, 39,110,117,109, 98,101,114, 39, 32,116,104,101,110, 13, + 10,101,114,114,111,114, 40, 39, 70,105,114,115,116, 32, 97, + 114,103,117,109,101,110,116, 32,102,111,114, 32, 83,101,116, + 84,114, 97,110,115,102,111,114,109, 97,116,105,111,110, 77, + 97,116,114,105,120, 32,109,117,115,116, 32,104, 97,118,101, + 32,116,121,112,101, 32,110,117,109, 98,101,114, 32, 40, 73, + 68, 32,102,111,114, 32,103,114, 97,112,104,105, 99, 97,108, + 32,115,117,114,102, 97, 99,101, 41, 39, 44, 32, 50, 41, 13, + 10,101,110,100, 13, 10,108,111, 99, 97,108, 32,116,121,112, + 101, 77, 97,116, 52, 32, 61, 32,116,111,108,117, 97, 46,116, + 121,112,101, 40,109, 97,116,114,105,120, 52, 41, 13, 10,105, + 102, 32,116,121,112,101, 77, 97,116, 52, 32,126, 61, 32, 39, + 76,117, 97, 77, 97,116,114,105,120, 52, 39, 32, 97,110,100, + 32,116,121,112,101, 77, 97,116, 52, 32,126, 61, 32, 39, 99, + 111,110,115,116, 32, 76,117, 97, 77, 97,116,114,105,120, 52, + 39, 32,116,104,101,110, 32, 13, 10,101,114,114,111,114, 40, + 39, 83,101, 99,111,110,100, 32, 97,114,103,117,109,101,110, + 116, 32,102,111,114, 32, 83,101,116, 84,114, 97,110,115,102, + 111,114,109, 97,116,105,111,110, 77, 97,116,114,105,120, 32, + 109,117,115,116, 32,104, 97,118,101, 32,116,121,112,101, 32, + 77, 97,116,114,105,120, 52, 32, 40,116,114, 97,110,115,102, + 111,114,109, 97,116,105,111,110, 32,109, 97,116,114,105,120, + 41, 39, 44, 32, 50, 41, 13, 10,101,110,100, 13, 10,108,111, + 99, 97,108, 32,114,101,115, 32, 61, 32,115, 99,101,110,101, + 58, 83,101,116, 84,114, 97,110,115,102,111,114,109, 97,116, + 105,111,110, 77, 97,116,114,105,120, 40,103,114, 97,112,104, + 105, 99, 97,108, 83,117,114,102, 97, 99,101, 73, 68, 44, 32, + 109, 97,116,114,105,120, 52, 41, 13, 10,105,102, 32,114,101, + 115, 32, 61, 61, 32,102, 97,108,115,101, 32,116,104,101,110, + 13, 10,101,114,114,111,114, 40, 39, 69,114,114,111,114, 32, + 105,110, 32,102,117,110, 99,116,105,111,110, 32, 83,101,116, + 84,114, 97,110,115,102,111,114,109, 97,116,105,111,110, 77, + 97,116,114,105,120, 32, 40,109, 97,121, 98,101, 32,121,111, + 117, 32,104, 97,118,101, 32,115,112,101, 99,105,102,105,101, + 100, 32,119,114,111,110,103, 32,105,100, 41, 39, 44, 32, 50, + 41, 13, 10,101,110,100, 13, 10,101,110,100, 13, 10, 45, 45, + 45, 45, 45, 45, 45,32 + }; + tolua_dobuffer(tolua_S,(char*)B,sizeof(B),"tolua embedded: ./ModelMatrixManipulations.lua"); + lua_settop(tolua_S, top); + } /* end of embedded lua code */ + + + { /* begin embedded lua code */ + int top = lua_gettop(tolua_S); + static const unsigned char B[] = { + 10,102,117,110, 99,116,105,111,110, 32, 71,101,116, 68,105, + 115,116, 97,110, 99,101, 70,114,111,109, 71,114,111,117,110, + 100, 40, 77,111,100,101,108, 83,117,114,102, 97, 99,101, 73, + 68, 41, 13, 10,105,102, 32,116,121,112,101, 40, 77,111,100, + 101,108, 83,117,114,102, 97, 99,101, 73, 68, 41, 32,126, 61, + 32, 39,110,117,109, 98,101,114, 39, 32,116,104,101,110, 13, + 10,101,114,114,111,114, 40, 39, 65,114,103,117,109,101,110, + 116, 32,102,111,114, 32, 71,101,116, 68,105,115,116, 97,110, + 99,101, 70,114,111,109, 71,114,111,117,110,100, 32,109,117, + 115,116, 32,104, 97,118,101, 32,116,121,112,101, 32,110,117, + 109, 98,101,114, 32, 40, 73, 68, 32,102,111,114, 32,109,111, + 100,101,108, 32, 99,111,110,116, 97,105,110,101,114, 41, 39, + 44, 32, 50, 41, 13, 10,101,110,100, 13, 10,108,111, 99, 97, + 108, 32,114,101,115, 32, 61, 32,115, 99,101,110,101, 58, 71, + 101,116, 68,105,115,116, 97,110, 99,101, 70,114,111,109, 71, + 114,111,117,110,100, 40, 77,111,100,101,108, 83,117,114,102, + 97, 99,101, 73, 68, 41, 13, 10,105,102, 32,114,101,115, 46, + 116,121,112,101, 32, 61, 61, 32, 80,114,111,112,101,114,116, + 121, 67, 97,115,116, 46, 78, 85, 77, 66, 69, 82, 32,116,104, + 101,110, 13, 10,114,101,116,117,114,110, 32,114,101,115, 46, + 118, 97,108,117,101, 46,110,117,109, 98,101,114, 86, 97,108, + 117,101, 13, 10,101,108,115,101, 13, 10,101,114,114,111,114, + 40, 39, 69,114,114,111,114, 32,105,110, 32,102,117,110, 99, + 116,105,111,110, 32, 71,101,116, 68,105,115,116, 97,110, 99, + 101, 70,114,111,109, 71,114,111,117,110,100, 58, 32,121,111, + 117, 32,115,112,101, 99,105,102,105,101,100, 32,119,114,111, + 110,103, 32,105,100, 39, 44, 32, 50, 41, 13, 10,101,110,100, + 13, 10,101,110,100, 13, 10,102,117,110, 99,116,105,111,110, + 32, 71,101,116, 78,101, 97,114,101,115,116, 80,111,105,110, + 116,115, 73,100,115, 40, 71,114, 97,112,104,105, 99, 97,108, + 83,117,114,102, 97, 99,101, 73, 68, 44, 32, 80,111,115, 88, + 44, 32, 80,111,115, 89, 44, 32, 80,111,115, 90, 41, 13, 10, + 105,102, 32,116,121,112,101, 40, 71,114, 97,112,104,105, 99, + 97,108, 83,117,114,102, 97, 99,101, 73, 68, 41, 32,126, 61, + 32, 39,110,117,109, 98,101,114, 39, 32,116,104,101,110, 13, + 10,101,114,114,111,114, 40, 39, 70,105,114,115,116, 32, 97, + 114,103,117,109,101,110,116, 32,102,111,114, 32, 71,101,116, + 78,101, 97,114,101,115,116, 80,111,105,110,116,115, 73,100, + 115, 32,109,117,115,116, 32,104, 97,118,101, 32,116,121,112, + 101, 32,110,117,109, 98,101,114, 32, 40, 73, 68, 32,102,111, + 114, 32,103,114, 97,112,104,105, 99, 97,108, 32,115,117,114, + 102, 97, 99,101, 41, 39, 44, 32, 50, 41, 13, 10,101,110,100, + 13, 10,108,111, 99, 97,108, 32,114,101,115, 13, 10,105,102, + 32,116,111,108,117, 97, 46,116,121,112,101, 40, 80,111,115, + 88, 41, 32, 61, 61, 32, 39, 86,101, 99,116,111,114, 51, 39, + 32, 97,110,100, 32, 80,111,115, 89, 32, 61, 61, 32,110,105, + 108, 32, 97,110,100, 32, 80,111,115, 90, 32, 61, 61, 32,110, + 105,108, 32,116,104,101,110, 13, 10,114,101,115, 32, 61, 32, + 115, 99,101,110,101, 58, 71,101,116, 78,101, 97,114,101,115, + 116, 80,111,105,110,116,115, 73,100,115, 40, 71,114, 97,112, + 104,105, 99, 97,108, 83,117,114,102, 97, 99,101, 73, 68, 44, + 32, 80,111,115, 88, 41, 13, 10,101,108,115,101,105,102, 32, + 116,121,112,101, 40, 80,111,115, 88, 41, 32, 61, 61, 32, 39, + 110,117,109, 98,101,114, 39, 32, 97,110,100, 32,116,121,112, + 101, 40, 80,111,115, 89, 41, 32, 61, 61, 32, 39,110,117,109, + 98,101,114, 39, 32, 97,110,100, 32,116,121,112,101, 40, 80, + 111,115, 90, 41, 32, 61, 61, 32, 39,110,117,109, 98,101,114, + 39, 32,116,104,101,110, 13, 10,114,101,115, 32, 61, 32,115, + 99,101,110,101, 58, 71,101,116, 78,101, 97,114,101,115,116, + 80,111,105,110,116,115, 73,100,115, 40, 71,114, 97,112,104, + 105, 99, 97,108, 83,117,114,102, 97, 99,101, 73, 68, 44, 32, + 80,111,115, 88, 44, 32, 80,111,115, 89, 44, 32, 80,111,115, + 90, 41, 13, 10,101,108,115,101, 13, 10,101,114,114,111,114, + 40, 39, 87,114,111,110,103, 32,110,117,109, 98,101,114, 32, + 111,114, 32,116,121,112,101, 32,111,102, 32,112, 97,114, 97, + 109,101,116,101,114,115, 32,102,111,114, 32, 71,101,116, 78, + 101, 97,114,101,115,116, 80,111,105,110,116,115, 73,100,115, + 32, 40,115,101,101, 32,102,114,111,109, 32,115,101, 99,111, + 110,100, 32,112, 97,114, 97,109,101,116,101,114, 41, 39, 44, + 32, 50, 41, 32, 13, 10,101,110,100, 32, 13, 10,105,102, 32, + 114,101,115, 46,116,121,112,101, 32, 61, 61, 32, 80,114,111, + 112,101,114,116,121, 67, 97,115,116, 46, 86, 69, 67, 84, 79, + 82, 95, 86, 69, 67, 84, 79, 82, 32,116,104,101,110, 13, 10, + 114,101,116,117,114,110, 32,114,101,115, 46,118, 97,108,117, + 101, 46,118,101, 99, 86,101, 99, 86, 97,108,117,101, 13, 10, + 101,108,115,101,105,102, 32,114,101,115, 46,116,121,112,101, + 32, 61, 61, 32, 80,114,111,112,101,114,116,121, 67, 97,115, + 116, 46, 78, 79, 95, 80, 82, 79, 80, 69, 82, 84, 89, 32,116, + 104,101,110, 13, 10,114,101,116,117,114,110, 32,110,105,108, + 13, 10,101,108,115,101,105,102, 32,114,101,115, 46,116,121, + 112,101, 32, 61, 61, 32, 80,114,111,112,101,114,116,121, 67, + 97,115,116, 46, 66, 79, 79, 76, 32,116,104,101,110, 13, 10, + 101,114,114,111,114, 40, 39, 69,114,114,111,114, 32,105,110, + 32,102,117,110, 99,116,105,111,110, 32, 71,101,116, 78,101, + 97,114,101,115,116, 80,111,105,110,116,115, 73,100,115, 58, + 32,121,111,117, 32,104, 97,118,101, 32,115,112,101, 99,105, + 102,105,101,100, 32,119,114,111,110,103, 32, 73, 68, 32,102, + 111,114, 32,103,114, 97,112,104,105, 99, 97,108, 32,115,117, + 114,102, 97, 99,101, 39, 44, 32, 50, 41, 13, 10,101,110,100, + 13, 10,101,110,100, 13, 10,102,117,110, 99,116,105,111,110, + 32, 85,112,100, 97,116,101, 66,105,116,109, 97,112, 40,103, + 114, 97,112,104,105, 99, 97,108, 83,117,114,102, 97, 99,101, + 73, 68, 44, 32, 98,105,116,109, 97,112, 73, 68, 41, 13, 10, + 105,102, 32,116,121,112,101, 40,103,114, 97,112,104,105, 99, + 97,108, 83,117,114,102, 97, 99,101, 73, 68, 41, 32,126, 61, + 32, 39,110,117,109, 98,101,114, 39, 32,116,104,101,110, 13, + 10,101,114,114,111,114, 40, 39, 70,105,114,115,116, 32, 97, + 114,103,117,109,101,110,116, 32,102,111,114, 32, 85,112,100, + 97,116,101, 66,105,116,109, 97,112, 32,109,117,115,116, 32, + 104, 97,118,101, 32,116,121,112,101, 32,110,117,109, 98,101, + 114, 32, 40, 73, 68, 32,102,111,114, 32,103,114, 97,112,104, + 105, 99, 97,108, 32,115,117,114,102, 97, 99,101, 41, 39, 44, + 32, 50, 41, 13, 10,101,110,100, 13, 10,105,102, 32,116,121, + 112,101, 40, 98,105,116,109, 97,112, 73, 68, 41, 32,126, 61, + 32, 39,110,117,109, 98,101,114, 39, 32,116,104,101,110, 13, + 10,101,114,114,111,114, 40, 39, 83,101, 99,111,110,100, 32, + 97,114,103,117,109,101,110,116, 32,102,111,114, 32, 85,112, + 100, 97,116,101, 66,105,116,109, 97,112, 32,109,117,115,116, + 32,104, 97,118,101, 32,116,121,112,101, 32,110,117,109, 98, + 101,114, 32, 40,110,101,119, 32, 73, 68, 32,102,111,114, 32, + 98,105,116,109, 97,112, 41, 39, 44, 32, 50, 41, 13, 10,101, + 110,100, 13, 10,108,111, 99, 97,108, 32,114,101,115, 32, 61, + 32,115, 99,101,110,101, 58, 85,112,100, 97,116,101, 66,105, + 116,109, 97,112, 40,103,114, 97,112,104,105, 99, 97,108, 83, + 117,114,102, 97, 99,101, 73, 68, 44, 32, 98,105,116,109, 97, + 112, 73, 68, 41, 13, 10,105,102, 32,114,101,115, 32, 61, 61, + 32,102, 97,108,115,101, 32,116,104,101,110, 13, 10,101,114, + 114,111,114, 40, 39, 69,114,114,111,114, 32,105,110, 32,102, + 117,110, 99,116,105,111,110, 32, 85,112,100, 97,116,101, 66, + 105,116,109, 97,112, 58, 32,121,111,117, 32,115,112,101, 99, + 105,102,105,101,100, 32,119,114,111,110,103, 32,103,114, 97, + 112,104,105, 99, 97,108, 32,115,117,114,102, 97, 99,101, 32, + 105,100, 39, 44, 32, 50, 41, 13, 10,101,110,100, 13, 10,101, + 110,100, 13, 10,102,117,110, 99,116,105,111,110, 32, 95,117, + 115,101,114, 95,112,114,105,110,116, 40, 46, 46, 46, 41, 13, + 10,115,116,114, 32, 61, 32, 39, 39, 13, 10,102,111,114, 32, + 105, 32, 61, 32, 49, 44, 32, 97,114,103, 46,110, 45, 49, 32, + 100,111, 13, 10,115,116,114, 32, 61, 32,115,116,114, 32, 46, + 46, 32,116,111,115,116,114,105,110,103, 40, 97,114,103, 91, + 105, 93, 41, 32, 46, 46, 32, 39, 92,116, 39, 13, 10,101,110, + 100, 13, 10,115,116,114, 32, 61, 32,115,116,114, 32, 46, 46, + 32,116,111,115,116,114,105,110,103, 40, 97,114,103, 91, 97, + 114,103, 46,110, 93, 41, 32, 46, 46, 32, 39, 92,110, 39, 13, + 10, 69,102,102,101, 99,116, 77,111,100,101,108, 83, 99,114, + 105,112,116, 58, 80,114,105,110,116, 76,117, 97, 73,110,102, + 111, 40,115,116,114, 41, 13, 10,101,110,100, 13, 10,112,114, + 105,110,116, 32, 61, 32, 95,117,115,101,114, 95,112,114,105, + 110,116, 13, 10,102,117,110, 99,116,105,111,110, 32, 67,114, + 101, 97,116,101, 86,101, 99,116,111,114, 51, 40,120, 44, 32, + 121, 44, 32,122, 41, 13, 10,105,102, 32,116,121,112,101, 40, + 120, 41, 32, 61, 61, 32, 39,110,117,109, 98,101,114, 39, 32, + 97,110,100, 32,116,121,112,101, 40,121, 41, 32, 61, 61, 32, + 39,110,117,109, 98,101,114, 39, 32, 97,110,100, 32,116,121, + 112,101, 40,122, 41, 32, 61, 61, 32, 39,110,117,109, 98,101, + 114, 39, 32,116,104,101,110, 13, 10,114,101,116,117,114,110, + 32, 86,101, 99,116,111,114, 51, 40,120, 44, 32,121, 44, 32, + 122, 41, 13, 10,101,108,115,101, 13, 10,101,114,114,111,114, + 40, 39, 65,108,108, 32, 97,114,103,117,109,101,110,116,115, + 32,102,111,114, 32, 67,114,101, 97,116,101, 86,101, 99,116, + 111,114, 51, 32,109,117,115,116, 32,104, 97,118,101, 32,116, + 121,112,101, 32,110,117,109, 98,101,114, 39, 44, 32, 50, 41, + 13, 10,101,110,100, 13, 10,101,110,100, 13, 10,102,117,110, + 99,116,105,111,110, 32, 67,114,101, 97,116,101, 80,111,105, + 110,116, 40,120, 44, 32,121, 41, 13, 10,105,102, 32,116,121, + 112,101, 40,120, 41, 32, 61, 61, 32, 39,110,117,109, 98,101, + 114, 39, 32, 97,110,100, 32,116,121,112,101, 40,121, 41, 32, + 61, 61, 32, 39,110,117,109, 98,101,114, 39, 32,116,104,101, + 110, 13, 10,114,101,116,117,114,110, 32, 86,101, 99,116,111, + 114, 50, 40,120, 44, 32,121, 41, 13, 10,101,108,115,101, 13, + 10,101,114,114,111,114, 40, 39, 65,108,108, 32, 97,114,103, + 117,109,101,110,116,115, 32,102,111,114, 32, 67,114,101, 97, + 116,101, 80,111,105,110,116, 32,109,117,115,116, 32,104, 97, + 118,101, 32,116,121,112,101, 32,110,117,109, 98,101,114, 39, + 44, 32, 50, 41, 13, 10,101,110,100, 13, 10,101,110,100, 13, + 10,102,117,110, 99,116,105,111,110, 32, 67,114,101, 97,116, + 101, 77, 97,116,114,105,120, 52, 40,109, 48, 44, 32,109, 49, + 44, 32,109, 50, 44, 32,109, 51, 44, 32,109, 52, 44, 32,109, + 53, 44, 32,109, 54, 44, 32,109, 55, 44, 32,109, 56, 44, 32, + 109, 57, 44, 32,109, 49, 48, 44, 32,109, 49, 49, 44, 32,109, + 49, 50, 44, 32,109, 49, 51, 44, 32,109, 49, 52, 44, 32,109, + 49, 53, 41, 13, 10,105,102, 32,109, 48, 32, 61, 61, 32,110, + 105,108, 32,116,104,101,110, 13, 10,114,101,116,117,114,110, + 32, 76,117, 97, 77, 97,116,114,105,120, 52, 58,110,101,119, + 95,108,111, 99, 97,108, 40, 41, 32, 13, 10,101,108,115,101, + 105,102, 32, 40,116,121,112,101, 40,109, 48, 41, 32, 61, 61, + 32, 39,110,117,109, 98,101,114, 39, 32,111,114, 32,116,111, + 108,117, 97, 46,116,121,112,101, 40,109, 48, 41, 32, 61, 61, + 32, 39, 76,117, 97, 77, 97,116,114,105,120, 52, 39, 41, 32, + 97,110,100, 32,109, 49, 32, 61, 61, 32,110,105,108, 32,116, + 104,101,110, 13, 10,114,101,116,117,114,110, 32, 76,117, 97, + 77, 97,116,114,105,120, 52, 58,110,101,119, 95,108,111, 99, + 97,108, 40,109, 48, 41, 13, 10,101,108,115,101,105,102, 32, + 116,121,112,101, 40,109, 48, 41, 32, 61, 61, 32, 39,110,117, + 109, 98,101,114, 39, 32, 97,110,100, 32,116,121,112,101, 40, + 109, 49, 41, 32, 61, 61, 32, 39,110,117,109, 98,101,114, 39, + 32, 97,110,100, 32,116,121,112,101, 40,109, 50, 41, 32, 61, + 61, 32, 39,110,117,109, 98,101,114, 39, 32, 97,110,100, 32, + 116,121,112,101, 40,109, 51, 41, 32, 61, 61, 32, 39,110,117, + 109, 98,101,114, 39, 32, 97,110,100, 32,116,121,112,101, 40, + 109, 52, 41, 32, 61, 61, 32, 39,110,117,109, 98,101,114, 39, + 32, 97,110,100, 32,116,121,112,101, 40,109, 53, 41, 32, 61, + 61, 32, 39,110,117,109, 98,101,114, 39, 32, 97,110,100, 32, + 116,121,112,101, 40,109, 54, 41, 32, 61, 61, 32, 39,110,117, + 109, 98,101,114, 39, 32, 97,110,100, 32,116,121,112,101, 40, + 109, 55, 41, 32, 61, 61, 32, 39,110,117,109, 98,101,114, 39, + 32, 97,110,100, 32,116,121,112,101, 40,109, 56, 41, 32, 61, + 61, 32, 39,110,117,109, 98,101,114, 39, 32, 97,110,100, 32, + 116,121,112,101, 40,109, 57, 41, 32, 61, 61, 32, 39,110,117, + 109, 98,101,114, 39, 32, 97,110,100, 32,116,121,112,101, 40, + 109, 49, 48, 41, 32, 61, 61, 32, 39,110,117,109, 98,101,114, + 39, 32, 97,110,100, 32,116,121,112,101, 40,109, 49, 49, 41, + 32, 61, 61, 32, 39,110,117,109, 98,101,114, 39, 32, 97,110, + 100, 32,116,121,112,101, 40,109, 49, 50, 41, 32, 61, 61, 32, + 39,110,117,109, 98,101,114, 39, 32, 97,110,100, 32,116,121, + 112,101, 40,109, 49, 51, 41, 32, 61, 61, 32, 39,110,117,109, + 98,101,114, 39, 32, 97,110,100, 32,116,121,112,101, 40,109, + 49, 52, 41, 32, 61, 61, 32, 39,110,117,109, 98,101,114, 39, + 32, 97,110,100, 32,116,121,112,101, 40,109, 49, 53, 41, 32, + 61, 61, 32, 39,110,117,109, 98,101,114, 39, 32,116,104,101, + 110, 13, 10,114,101,116,117,114,110, 32, 76,117, 97, 77, 97, + 116,114,105,120, 52, 58,110,101,119, 95,108,111, 99, 97,108, + 40,109, 48, 44, 32,109, 49, 44, 32,109, 50, 44, 32,109, 51, + 44, 32,109, 52, 44, 32,109, 53, 44, 32,109, 54, 44, 32,109, + 55, 44, 32,109, 56, 44, 32,109, 57, 44, 32,109, 49, 48, 44, + 32,109, 49, 49, 44, 32,109, 49, 50, 44, 32,109, 49, 51, 44, + 32,109, 49, 52, 44, 32,109, 49, 53, 41, 13, 10,101,108,115, + 101, 13, 10,101,114,114,111,114, 40, 39, 87,114,111,110,103, + 32,110,117,109, 98,101,114, 32,111,114, 32,116,121,112,101, + 32,111,102, 32,112, 97,114, 97,109,101,116,101,114,115, 32, + 102,111,114, 32, 67,114,101, 97,116,101, 77, 97,116,114,105, + 120, 52, 39, 44, 32, 50, 41, 13, 10,101,110,100, 13, 10,101, + 110,100, 13, 10, 45, 45, 45, 45, 45, 45, 45, 45, 45,32 + }; + tolua_dobuffer(tolua_S,(char*)B,sizeof(B),"tolua embedded: ./OtherFunctions.lua"); + lua_settop(tolua_S, top); + } /* end of embedded lua code */ + + + { /* begin embedded lua code */ + int top = lua_gettop(tolua_S); + static const unsigned char B[] = { + 10,102,117,110, 99,116,105,111,110, 32, 71,101,116, 73,110, + 116,101,114,112,111,108, 97,116,101,100, 86, 97,108,117,101, + 40, 95,115,111,117,114, 99,101, 44, 32, 95,116, 97,114,103, + 101,116, 44, 32, 69,102,102,101, 99,116, 84,105,109,101, 80, + 97,115,115,101,100, 44, 32, 69,102,102,101, 99,116, 68,117, + 114, 97,116,105,111,110, 44, 32, 73,110,116,101,114,112,111, + 108, 97,116,111,114, 41, 13, 10,108,111, 99, 97,108, 32,115, + 111,117,114, 99,101, 84,121,112,101, 32, 61, 32,116,111,108, + 117, 97, 46,116,121,112,101, 40, 95,115,111,117,114, 99,101, + 41, 13, 10,105,102, 32,115,111,117,114, 99,101, 84,121,112, + 101, 32,126, 61, 32, 39,110,117,109, 98,101,114, 39, 32, 97, + 110,100, 32,115,111,117,114, 99,101, 84,121,112,101, 32,126, + 61, 32, 39, 86,101, 99,116,111,114, 51, 39, 32, 97,110,100, + 32,115,111,117,114, 99,101, 84,121,112,101, 32,126, 61, 32, + 39, 99,111,110,115,116, 32, 86,101, 99,116,111,114, 51, 39, + 32, 97,110,100, 32,115,111,117,114, 99,101, 84,121,112,101, + 32,126, 61, 32, 39, 86,101, 99,116,111,114, 50, 39, 32, 97, + 110,100, 32,115,111,117,114, 99,101, 84,121,112,101, 32,126, + 61, 32, 39, 99,111,110,115,116, 32, 86,101, 99,116,111,114, + 50, 39, 32,116,104,101,110, 13, 10,101,114,114,111,114, 40, + 39, 70,105,114,115,116, 32, 97,114,103,117,109,101,110,116, + 32,102,111,114, 32, 71,101,116, 73,110,116,101,114,112,111, + 108, 97,116,101,100, 86, 97,108,117,101, 32,109,117,115,116, + 32,104, 97,118,101, 32,111,110,101, 32,111,102, 32,116,104, + 101, 32,116,121,112,101,115, 58, 32,110,117,109, 98,101,114, + 44, 32, 86,101, 99,116,111,114, 51, 32,111,114, 32, 86,101, + 99,116,111,114, 50, 39, 44, 32, 50, 41, 13, 10,101,110,100, + 13, 10,108,111, 99, 97,108, 32,115,111,117,114, 99,101, 84, + 121,112,101, 67,111,110,115,116, 13, 10,108,111, 99, 97,108, + 32,114,101,115,117,108,116, 83,101, 97, 99,104, 32, 61, 32, + 115,116,114,105,110,103, 46,102,105,110,100, 40,115,111,117, + 114, 99,101, 84,121,112,101, 44, 32, 39, 99,111,110,115,116, + 32, 39, 41, 13, 10,105,102, 32,114,101,115,117,108,116, 83, + 101, 97, 99,104, 32, 61, 61, 32,110,105,108, 32,116,104,101, + 110, 13, 10,115,111,117,114, 99,101, 84,121,112,101, 67,111, + 110,115,116, 32, 61, 32, 39, 99,111,110,115,116, 32, 39, 32, + 46, 46, 32,115,111,117,114, 99,101, 84,121,112,101, 13, 10, + 101,108,115,101, 32, 13, 10,115,111,117,114, 99,101, 84,121, + 112,101, 67,111,110,115,116, 32, 61, 32,115,116,114,105,110, + 103, 46,115,117, 98, 40,115,111,117,114, 99,101, 84,121,112, + 101, 44, 32, 55, 41, 13, 10,101,110,100, 13, 10, 13, 10,108, + 111, 99, 97,108, 32,116, 97,114,103,101,116, 84,121,112,101, + 32, 61, 32,116,111,108,117, 97, 46,116,121,112,101, 40, 95, + 116, 97,114,103,101,116, 41, 13, 10,105,102, 32,116, 97,114, + 103,101,116, 84,121,112,101, 32,126, 61, 32,115,111,117,114, + 99,101, 84,121,112,101, 32, 97,110,100, 32,116, 97,114,103, + 101,116, 84,121,112,101, 32,126, 61, 32,115,111,117,114, 99, + 101, 84,121,112,101, 67,111,110,115,116, 32,116,104,101,110, + 13, 10,101,114,114,111,114, 40, 39, 70,105,114,115,116, 32, + 97,110,100, 32,115,101, 99,111,110,100, 32, 97,114,103,117, + 109,101,110,116,115, 32,102,111,114, 32, 71,101,116, 73,110, + 116,101,114,112,111,108, 97,116,101,100, 86, 97,108,117,101, + 32,109,117,115,116, 32,104, 97,118,101, 32,115, 97,109,101, + 32,116,121,112,101,115, 39, 44, 32, 50, 41, 13, 10,101,110, + 100, 13, 10,105,102, 32,116,121,112,101, 40, 69,102,102,101, + 99,116, 84,105,109,101, 80, 97,115,115,101,100, 41, 32,126, + 61, 32, 39,110,117,109, 98,101,114, 39, 32,116,104,101,110, + 13, 10,101,114,114,111,114, 40, 39, 84,104,105,114,100, 32, + 97,114,103,117,109,101,110,116, 32,102,111,114, 32, 71,101, + 116, 73,110,116,101,114,112,111,108, 97,116,101,100, 86, 97, + 108,117,101, 32,109,117,115,116, 32,104, 97,118,101, 32,110, + 117,109, 98,101,114, 32,116,121,112,101, 39, 44, 32, 50, 41, + 13, 10,101,110,100, 13, 10,105,102, 32,116,121,112,101, 40, + 69,102,102,101, 99,116, 68,117,114, 97,116,105,111,110, 41, + 32,126, 61, 32, 39,110,117,109, 98,101,114, 39, 32,116,104, + 101,110, 13, 10,101,114,114,111,114, 40, 39, 70,111,117,114, + 116,104, 32, 97,114,103,117,109,101,110,116, 32,102,111,114, + 32, 71,101,116, 73,110,116,101,114,112,111,108, 97,116,101, + 100, 86, 97,108,117,101, 32,109,117,115,116, 32,104, 97,118, + 101, 32,110,117,109, 98,101,114, 32,116,121,112,101, 39, 44, + 32, 50, 41, 13, 10,101,110,100, 13, 10, 13, 10,105,102, 32, + 73,110,116,101,114,112,111,108, 97,116,111,114, 32, 61, 61, + 32,110,105,108, 32,116,104,101,110, 13, 10, 73,110,116,101, + 114,112,111,108, 97,116,111,114, 32, 61, 32, 76,105,110,101, + 97,114, 13, 10,101,110,100, 13, 10,105,102, 32,116,121,112, + 101, 40, 73,110,116,101,114,112,111,108, 97,116,111,114, 41, + 32,126, 61, 32, 39,102,117,110, 99,116,105,111,110, 39, 32, + 116,104,101,110, 13, 10,101,114,114,111,114, 40, 39, 70,105, + 102,116,104, 32, 97,114,103,117,109,101,110,116, 32,102,111, + 114, 32, 71,101,116, 73,110,116,101,114,112,111,108, 97,116, + 101,100, 86, 97,108,117,101, 32,115,104,111,117,108,100, 32, + 98,101, 32, 97, 32,102,117,110, 99,116,105,111,110, 32, 40, + 102,111,114, 32,101,120, 97,109,112,108,101, 32, 69, 97,115, + 101, 73,110, 79,117,116, 41, 32,111,114, 32,110,105,108, 39, + 44, 32, 50, 41, 13, 10,101,110,100, 13, 10, 13, 10,105,102, + 32, 69,102,102,101, 99,116, 68,117,114, 97,116,105,111,110, + 32, 62, 32, 49,101, 45, 52, 32,116,104,101,110, 13, 10,114, + 101,116,117,114,110, 32, 95,115,111,117,114, 99,101, 32, 43, + 32, 40, 95,116, 97,114,103,101,116, 32, 45, 32, 95,115,111, + 117,114, 99,101, 41, 32, 42, 32, 40, 73,110,116,101,114,112, + 111,108, 97,116,111,114, 40, 69,102,102,101, 99,116, 84,105, + 109,101, 80, 97,115,115,101,100, 44, 32, 69,102,102,101, 99, + 116, 68,117,114, 97,116,105,111,110, 41, 32, 47, 32, 69,102, + 102,101, 99,116, 68,117,114, 97,116,105,111,110, 41, 13, 10, + 101,108,115,101, 13, 10,101,114,114,111,114, 40, 39, 70,111, + 117,114,116,104, 32, 97,114,103,117,109,101,110,116, 32,102, + 111,114, 32, 71,101,116, 73,110,116,101,114,112,111,108, 97, + 116,101,100, 86, 97,108,117,101, 32, 40,101,102,102,101, 99, + 116, 32,100,117,114, 97,116,105,111,110, 41, 32,115,104,111, + 117,108,100, 32, 98,101, 32, 97, 32,112,111,115,105,116,105, + 118,101, 32, 40,100,117,114, 97,116,105,111,110, 32, 62, 32, + 48, 41, 39, 44, 32, 50, 41, 13, 10,101,110,100, 32, 13, 10, + 101,110,100, 13, 10,102,117,110, 99,116,105,111,110, 32, 76, + 105,110,101, 97,114, 40, 69,102,102,101, 99,116, 84,105,109, + 101, 80, 97,115,115,101,100, 44, 32, 69,102,102,101, 99,116, + 68,117,114, 97,116,105,111,110, 41, 13, 10,105,102, 32,116, + 121,112,101, 40, 69,102,102,101, 99,116, 84,105,109,101, 80, + 97,115,115,101,100, 41, 32,126, 61, 32, 39,110,117,109, 98, + 101,114, 39, 32,116,104,101,110, 13, 10,101,114,114,111,114, + 40, 39, 70,105,114,115,116, 32, 97,114,103,117,109,101,110, + 116, 32,102,111,114, 32, 76,105,110,101, 97,114, 32,109,117, + 115,116, 32,104, 97,118,101, 32,110,117,109, 98,101,114, 32, + 116,121,112,101, 39, 44, 32, 50, 41, 13, 10,101,110,100, 13, + 10,114,101,116,117,114,110, 32, 69,102,102,101, 99,116, 84, + 105,109,101, 80, 97,115,115,101,100, 13, 10,101,110,100, 13, + 10, 13, 10,102,117,110, 99,116,105,111,110, 32, 68,105,115, + 99,114,101,116,101, 40, 69,102,102,101, 99,116, 84,105,109, + 101, 80, 97,115,115,101,100, 44, 32, 69,102,102,101, 99,116, + 68,117,114, 97,116,105,111,110, 41, 13, 10,105,102, 32,116, + 121,112,101, 40, 69,102,102,101, 99,116, 84,105,109,101, 80, + 97,115,115,101,100, 41, 32,126, 61, 32, 39,110,117,109, 98, + 101,114, 39, 32,116,104,101,110, 13, 10,101,114,114,111,114, + 40, 39, 70,105,114,115,116, 32, 97,114,103,117,109,101,110, + 116, 32,102,111,114, 32, 68,105,115, 99,114,101,116,101, 32, + 109,117,115,116, 32,104, 97,118,101, 32,110,117,109, 98,101, + 114, 32,116,121,112,101, 39, 44, 32, 50, 41, 13, 10,101,110, + 100, 13, 10,105,102, 32,116,121,112,101, 40, 69,102,102,101, + 99,116, 68,117,114, 97,116,105,111,110, 41, 32,126, 61, 32, + 39,110,117,109, 98,101,114, 39, 32,116,104,101,110, 13, 10, + 101,114,114,111,114, 40, 39, 83,101, 99,111,110,100, 32, 97, + 114,103,117,109,101,110,116, 32,102,111,114, 32, 68,105,115, + 99,114,101,116,101, 32,109,117,115,116, 32,104, 97,118,101, + 32,110,117,109, 98,101,114, 32,116,121,112,101, 39, 44, 32, + 50, 41, 13, 10,101,110,100, 13, 10, 13, 10,105,102, 32, 69, + 102,102,101, 99,116, 84,105,109,101, 80, 97,115,115,101,100, + 32, 60, 32, 69,102,102,101, 99,116, 68,117,114, 97,116,105, + 111,110, 32,116,104,101,110, 13, 10,114,101,116,117,114,110, + 32, 48, 13, 10,101,108,115,101, 32, 13, 10,114,101,116,117, + 114,110, 32, 69,102,102,101, 99,116, 68,117,114, 97,116,105, + 111,110, 13, 10,101,110,100, 13, 10,101,110,100, 13, 10,102, + 117,110, 99,116,105,111,110, 32, 69, 97,115,101, 73,110, 40, + 69,102,102,101, 99,116, 84,105,109,101, 80, 97,115,115,101, + 100, 44, 32, 69,102,102,101, 99,116, 68,117,114, 97,116,105, + 111,110, 41, 13, 10,105,102, 32,116,121,112,101, 40, 69,102, + 102,101, 99,116, 84,105,109,101, 80, 97,115,115,101,100, 41, + 32,126, 61, 32, 39,110,117,109, 98,101,114, 39, 32,116,104, + 101,110, 13, 10,101,114,114,111,114, 40, 39, 70,105,114,115, + 116, 32, 97,114,103,117,109,101,110,116, 32,102,111,114, 32, + 69, 97,115,101, 73,110, 32,109,117,115,116, 32,104, 97,118, + 101, 32,110,117,109, 98,101,114, 32,116,121,112,101, 39, 44, + 32, 50, 41, 13, 10,101,110,100, 13, 10,105,102, 32,116,121, + 112,101, 40, 69,102,102,101, 99,116, 68,117,114, 97,116,105, + 111,110, 41, 32,126, 61, 32, 39,110,117,109, 98,101,114, 39, + 32,116,104,101,110, 13, 10,101,114,114,111,114, 40, 39, 83, + 101, 99,111,110,100, 32, 97,114,103,117,109,101,110,116, 32, + 102,111,114, 32, 69, 97,115,101, 73,110, 32,109,117,115,116, + 32,104, 97,118,101, 32,110,117,109, 98,101,114, 32,116,121, + 112,101, 39, 44, 32, 50, 41, 13, 10,101,110,100, 13, 10, 13, + 10,105,102, 32, 69,102,102,101, 99,116, 84,105,109,101, 80, + 97,115,115,101,100, 32, 62, 32, 69,102,102,101, 99,116, 68, + 117,114, 97,116,105,111,110, 32,116,104,101,110, 13, 10, 69, + 102,102,101, 99,116, 84,105,109,101, 80, 97,115,115,101,100, + 32, 61, 32, 69,102,102,101, 99,116, 68,117,114, 97,116,105, + 111,110, 13, 10,101,110,100, 13, 10, 13, 10,114,101,116,117, + 114,110, 32, 45,109, 97,116,104, 46,115,113,114,116, 40, 69, + 102,102,101, 99,116, 68,117,114, 97,116,105,111,110, 32, 42, + 32, 69,102,102,101, 99,116, 68,117,114, 97,116,105,111,110, + 32, 45, 32, 69,102,102,101, 99,116, 84,105,109,101, 80, 97, + 115,115,101,100, 32, 42, 32, 69,102,102,101, 99,116, 84,105, + 109,101, 80, 97,115,115,101,100, 41, 32, 43, 32, 69,102,102, + 101, 99,116, 68,117,114, 97,116,105,111,110, 13, 10,101,110, + 100, 13, 10,102,117,110, 99,116,105,111,110, 32, 69, 97,115, + 101, 79,117,116, 40, 69,102,102,101, 99,116, 84,105,109,101, + 80, 97,115,115,101,100, 44, 32, 69,102,102,101, 99,116, 68, + 117,114, 97,116,105,111,110, 41, 13, 10,105,102, 32,116,121, + 112,101, 40, 69,102,102,101, 99,116, 84,105,109,101, 80, 97, + 115,115,101,100, 41, 32,126, 61, 32, 39,110,117,109, 98,101, + 114, 39, 32,116,104,101,110, 13, 10,101,114,114,111,114, 40, + 39, 70,105,114,115,116, 32, 97,114,103,117,109,101,110,116, + 32,102,111,114, 32, 69, 97,115,101, 79,117,116, 32,109,117, + 115,116, 32,104, 97,118,101, 32,110,117,109, 98,101,114, 32, + 116,121,112,101, 39, 44, 32, 50, 41, 13, 10,101,110,100, 13, + 10,105,102, 32,116,121,112,101, 40, 69,102,102,101, 99,116, + 68,117,114, 97,116,105,111,110, 41, 32,126, 61, 32, 39,110, + 117,109, 98,101,114, 39, 32,116,104,101,110, 13, 10,101,114, + 114,111,114, 40, 39, 83,101, 99,111,110,100, 32, 97,114,103, + 117,109,101,110,116, 32,102,111,114, 32, 69, 97,115,101, 79, + 117,116, 32,109,117,115,116, 32,104, 97,118,101, 32,110,117, + 109, 98,101,114, 32,116,121,112,101, 39, 44, 32, 50, 41, 13, + 10,101,110,100, 13, 10, 13, 10,105,102, 32, 69,102,102,101, + 99,116, 84,105,109,101, 80, 97,115,115,101,100, 32, 62, 32, + 69,102,102,101, 99,116, 68,117,114, 97,116,105,111,110, 32, + 116,104,101,110, 13, 10, 69,102,102,101, 99,116, 84,105,109, + 101, 80, 97,115,115,101,100, 32, 61, 32, 69,102,102,101, 99, + 116, 68,117,114, 97,116,105,111,110, 13, 10,101,110,100, 13, + 10, 13, 10,114,101,116,117,114,110, 32,109, 97,116,104, 46, + 115,113,114,116, 40, 69,102,102,101, 99,116, 68,117,114, 97, + 116,105,111,110, 32, 42, 32, 69,102,102,101, 99,116, 68,117, + 114, 97,116,105,111,110, 32, 45, 32, 40, 69,102,102,101, 99, + 116, 84,105,109,101, 80, 97,115,115,101,100, 32, 45, 32, 69, + 102,102,101, 99,116, 68,117,114, 97,116,105,111,110, 41, 32, + 42, 32, 40, 69,102,102,101, 99,116, 84,105,109,101, 80, 97, + 115,115,101,100, 32, 45, 32, 69,102,102,101, 99,116, 68,117, + 114, 97,116,105,111,110, 41, 41, 13, 10,101,110,100, 13, 10, + 102,117,110, 99,116,105,111,110, 32, 69, 97,115,101, 73,110, + 79,117,116, 40, 69,102,102,101, 99,116, 84,105,109,101, 80, + 97,115,115,101,100, 44, 32, 69,102,102,101, 99,116, 68,117, + 114, 97,116,105,111,110, 41, 13, 10,105,102, 32,116,121,112, + 101, 40, 69,102,102,101, 99,116, 84,105,109,101, 80, 97,115, + 115,101,100, 41, 32,126, 61, 32, 39,110,117,109, 98,101,114, + 39, 32,116,104,101,110, 13, 10,101,114,114,111,114, 40, 39, + 70,105,114,115,116, 32, 97,114,103,117,109,101,110,116, 32, + 102,111,114, 32, 69, 97,115,101, 73,110, 79,117,116, 32,109, + 117,115,116, 32,104, 97,118,101, 32,110,117,109, 98,101,114, + 32,116,121,112,101, 39, 44, 32, 50, 41, 13, 10,101,110,100, + 13, 10,105,102, 32,116,121,112,101, 40, 69,102,102,101, 99, + 116, 68,117,114, 97,116,105,111,110, 41, 32,126, 61, 32, 39, + 110,117,109, 98,101,114, 39, 32,116,104,101,110, 13, 10,101, + 114,114,111,114, 40, 39, 83,101, 99,111,110,100, 32, 97,114, + 103,117,109,101,110,116, 32,102,111,114, 32, 69, 97,115,101, + 73,110, 79,117,116, 32,109,117,115,116, 32,104, 97,118,101, + 32,110,117,109, 98,101,114, 32,116,121,112,101, 39, 44, 32, + 50, 41, 13, 10,101,110,100, 13, 10, 13, 10,105,102, 32, 69, + 102,102,101, 99,116, 84,105,109,101, 80, 97,115,115,101,100, + 32, 62, 32, 69,102,102,101, 99,116, 68,117,114, 97,116,105, + 111,110, 32,116,104,101,110, 13, 10, 69,102,102,101, 99,116, + 84,105,109,101, 80, 97,115,115,101,100, 32, 61, 32, 69,102, + 102,101, 99,116, 68,117,114, 97,116,105,111,110, 13, 10,101, + 110,100, 13, 10, 13, 10,108,111, 99, 97,108, 32,100,117,114, + 50, 32, 61, 32, 69,102,102,101, 99,116, 68,117,114, 97,116, + 105,111,110, 32, 47, 32, 50, 13, 10,105,102, 32, 69,102,102, + 101, 99,116, 84,105,109,101, 80, 97,115,115,101,100, 32, 60, + 32,100,117,114, 50, 32,116,104,101,110, 32, 13, 10,114,101, + 116,117,114,110, 32, 45,109, 97,116,104, 46,115,113,114,116, + 40,100,117,114, 50, 32, 42, 32,100,117,114, 50, 32, 45, 32, + 69,102,102,101, 99,116, 84,105,109,101, 80, 97,115,115,101, + 100, 32, 42, 32, 69,102,102,101, 99,116, 84,105,109,101, 80, + 97,115,115,101,100, 41, 32, 43, 32,100,117,114, 50, 13, 10, + 101,108,115,101, 32, 13, 10,114,101,116,117,114,110, 32,109, + 97,116,104, 46,115,113,114,116, 40,100,117,114, 50, 32, 42, + 32,100,117,114, 50, 32, 45, 32, 40, 69,102,102,101, 99,116, + 84,105,109,101, 80, 97,115,115,101,100, 32, 45, 32, 69,102, + 102,101, 99,116, 68,117,114, 97,116,105,111,110, 41, 32, 42, + 32, 40, 69,102,102,101, 99,116, 84,105,109,101, 80, 97,115, + 115,101,100, 32, 45, 32, 69,102,102,101, 99,116, 68,117,114, + 97,116,105,111,110, 41, 41, 32, 43, 32,100,117,114, 50, 13, + 10,101,110,100, 13, 10,101,110,100, 13, 10, 95, 80,111,105, + 110,116, 48, 95, 66,101,122,105,101,114, 32, 61, 32, 86,101, + 99,116,111,114, 50, 40, 48, 44, 32, 48, 41, 13, 10, 95, 80, + 111,105,110,116, 49, 95, 66,101,122,105,101,114, 32, 61, 32, + 86,101, 99,116,111,114, 50, 40, 48, 46, 50, 44, 32, 50, 41, + 13, 10, 95, 80,111,105,110,116, 50, 95, 66,101,122,105,101, + 114, 32, 61, 32, 86,101, 99,116,111,114, 50, 40, 48, 46, 56, + 44, 32, 45, 49, 41, 32, 13, 10, 95, 80,111,105,110,116, 51, + 95, 66,101,122,105,101,114, 32, 61, 32, 86,101, 99,116,111, + 114, 50, 40, 49, 44, 32, 49, 41, 13, 10, 13, 10,102,117,110, + 99,116,105,111,110, 32, 83,101,116, 66,101,115,105,101,114, + 73,110,116,101,114,112,111,108, 97,116,111,114, 40, 80,111, + 105,110,116, 49, 44, 32, 80,111,105,110,116, 50, 41, 13, 10, + 108,111, 99, 97,108, 32,112,111,105,110,116, 49, 84,121,112, + 101, 32, 61, 32,116,111,108,117, 97, 46,116,121,112,101, 40, + 80,111,105,110,116, 49, 41, 13, 10,105,102, 32,112,111,105, + 110,116, 49, 84,121,112,101, 32, 61, 61, 32, 39, 86,101, 99, + 116,111,114, 50, 39, 32,111,114, 32,112,111,105,110,116, 49, + 84,121,112,101, 32, 61, 61, 32, 39, 99,111,110,115,116, 32, + 86,101, 99,116,111,114, 50, 39, 32,116,104,101,110, 13, 10, + 95, 80,111,105,110,116, 49, 95, 66,101,122,105,101,114, 46, + 120, 32, 61, 32, 80,111,105,110,116, 49, 46,120, 13, 10, 95, + 80,111,105,110,116, 49, 95, 66,101,122,105,101,114, 46,121, + 32, 61, 32, 80,111,105,110,116, 49, 46,121, 13, 10,101,108, + 115,101, 13, 10,101,114,114,111,114, 40, 39, 70,105,114,115, + 116, 32, 97,114,103,117,109,101,110,116, 32,102,111,114, 32, + 83,101,116, 66,101,115,105,101,114, 73,110,116,101,114,112, + 111,108, 97,116,111,114, 32,109,117,115,116, 32,104, 97,118, + 101, 32, 86,101, 99,116,111,114, 50, 32,116,121,112,101, 39, + 44, 32, 50, 41, 13, 10,101,110,100, 13, 10, 13, 10,108,111, + 99, 97,108, 32,112,111,105,110,116, 50, 84,121,112,101, 32, + 61, 32,116,111,108,117, 97, 46,116,121,112,101, 40, 80,111, + 105,110,116, 50, 41, 13, 10,105,102, 32,112,111,105,110,116, + 50, 84,121,112,101, 32, 61, 61, 32, 39, 86,101, 99,116,111, + 114, 50, 39, 32,111,114, 32,112,111,105,110,116, 50, 84,121, + 112,101, 32, 61, 61, 32, 39, 99,111,110,115,116, 32, 86,101, + 99,116,111,114, 50, 39, 32,116,104,101,110, 32, 13, 10, 95, + 80,111,105,110,116, 50, 95, 66,101,122,105,101,114, 46,120, + 32, 61, 32, 80,111,105,110,116, 50, 46,120, 13, 10, 95, 80, + 111,105,110,116, 50, 95, 66,101,122,105,101,114, 46,121, 32, + 61, 32, 80,111,105,110,116, 50, 46,121, 13, 10,101,108,115, + 101, 13, 10,101,114,114,111,114, 40, 39, 83,101, 99,111,110, + 100, 32, 97,114,103,117,109,101,110,116, 32,102,111,114, 32, + 83,101,116, 66,101,115,105,101,114, 73,110,116,101,114,112, + 111,108, 97,116,111,114, 32,109,117,115,116, 32,104, 97,118, + 101, 32, 86,101, 99,116,111,114, 50, 32,116,121,112,101, 39, + 44, 32, 50, 41, 13, 10,101,110,100, 13, 10,101,110,100, 13, + 10, 13, 10,102,117,110, 99,116,105,111,110, 32, 66,101,122, + 105,101,114, 40, 69,102,102,101, 99,116, 84,105,109,101, 80, + 97,115,115,101,100, 44, 32, 69,102,102,101, 99,116, 68,117, + 114, 97,116,105,111,110, 41, 13, 10,105,102, 32,116,121,112, + 101, 40, 69,102,102,101, 99,116, 84,105,109,101, 80, 97,115, + 115,101,100, 41, 32,126, 61, 32, 39,110,117,109, 98,101,114, + 39, 32,116,104,101,110, 13, 10,101,114,114,111,114, 40, 39, + 70,105,114,115,116, 32, 97,114,103,117,109,101,110,116, 32, + 102,111,114, 32, 66,101,122,105,101,114, 32,109,117,115,116, + 32,104, 97,118,101, 32,110,117,109, 98,101,114, 32,116,121, + 112,101, 39, 44, 32, 50, 41, 13, 10,101,110,100, 13, 10,105, + 102, 32,116,121,112,101, 40, 69,102,102,101, 99,116, 68,117, + 114, 97,116,105,111,110, 41, 32,126, 61, 32, 39,110,117,109, + 98,101,114, 39, 32,116,104,101,110, 13, 10,101,114,114,111, + 114, 40, 39, 83,101, 99,111,110,100, 32, 97,114,103,117,109, + 101,110,116, 32,102,111,114, 32, 66,101,122,105,101,114, 32, + 109,117,115,116, 32,104, 97,118,101, 32,110,117,109, 98,101, + 114, 32,116,121,112,101, 39, 44, 32, 50, 41, 13, 10,101,110, + 100, 13, 10, 13, 10,105,102, 32, 69,102,102,101, 99,116, 68, + 117,114, 97,116,105,111,110, 32, 60, 32, 49,101, 45, 52, 32, + 116,104,101,110, 13, 10,101,114,114,111,114, 40, 39, 83,101, + 99,111,110,100, 32, 97,114,103,117,109,101,110,116, 32,102, + 111,114, 32, 66,101,122,105,101,114, 32, 40,100,117,114, 97, + 116,105,111,110, 41, 32,115,104,111,117,108,100, 32, 98,101, + 32, 97, 32,112,111,115,105,116,105,118,101, 32, 40,100,117, + 114, 97,116,105,111,110, 32, 62, 32, 48, 41, 39, 44, 32, 50, + 41, 13, 10,101,110,100, 13, 10, 13, 10,105,102, 32, 69,102, + 102,101, 99,116, 84,105,109,101, 80, 97,115,115,101,100, 32, + 62, 32, 69,102,102,101, 99,116, 68,117,114, 97,116,105,111, + 110, 32,116,104,101,110, 13, 10, 69,102,102,101, 99,116, 84, + 105,109,101, 80, 97,115,115,101,100, 32, 61, 32, 69,102,102, + 101, 99,116, 68,117,114, 97,116,105,111,110, 13, 10,101,110, + 100, 13, 10, 13, 10,105,102, 32,116,111,108,117, 97, 46,116, + 121,112,101, 40, 95, 80,111,105,110,116, 48, 95, 66,101,122, + 105,101,114, 41, 32,126, 61, 32, 39, 86,101, 99,116,111,114, + 50, 39, 32,111,114, 32,116,111,108,117, 97, 46,116,121,112, + 101, 40, 95, 80,111,105,110,116, 49, 95, 66,101,122,105,101, + 114, 41, 32,126, 61, 32, 39, 86,101, 99,116,111,114, 50, 39, + 32,111,114, 32,116,111,108,117, 97, 46,116,121,112,101, 40, + 95, 80,111,105,110,116, 50, 95, 66,101,122,105,101,114, 41, + 32,126, 61, 32, 39, 86,101, 99,116,111,114, 50, 39, 32,111, + 114, 32,116,111,108,117, 97, 46,116,121,112,101, 40, 95, 80, + 111,105,110,116, 51, 95, 66,101,122,105,101,114, 41, 32,126, + 61, 32, 39, 86,101, 99,116,111,114, 50, 39, 32,116,104,101, + 110, 13, 10,101,114,114,111,114, 40, 39, 83,121,115,116,101, + 109, 32,101,114,114,111,114, 39, 44, 32, 50, 41, 13, 10,101, + 110,100, 13, 10, 13, 10,108,111, 99, 97,108, 32,116, 32, 61, + 32, 69,102,102,101, 99,116, 84,105,109,101, 80, 97,115,115, + 101,100, 32, 47, 32, 69,102,102,101, 99,116, 68,117,114, 97, + 116,105,111,110, 13, 10,108,111, 99, 97,108, 32,114,101,115, + 32, 61, 32, 40, 49, 32, 45, 32,116, 41, 32, 42, 32, 40, 49, + 32, 45, 32,116, 41, 32, 42, 32, 40, 49, 32, 45, 32,116, 41, + 32, 42, 32, 95, 80,111,105,110,116, 48, 95, 66,101,122,105, + 101,114, 13, 10,114,101,115, 32, 61, 32,114,101,115, 32, 43, + 32, 51, 32, 42, 32,116, 32, 42, 32, 40, 49, 32, 45, 32,116, + 41, 32, 42, 32, 40, 49, 32, 45, 32,116, 41, 32, 42, 32, 69, + 102,102,101, 99,116, 68,117,114, 97,116,105,111,110, 32, 42, + 32, 95, 80,111,105,110,116, 49, 95, 66,101,122,105,101,114, + 13, 10,114,101,115, 32, 61, 32,114,101,115, 32, 43, 32, 51, + 32, 42, 32,116, 32, 42, 32,116, 32, 42, 32, 40, 49, 32, 45, + 32,116, 41, 32, 42, 32, 69,102,102,101, 99,116, 68,117,114, + 97,116,105,111,110, 32, 42, 32, 95, 80,111,105,110,116, 50, + 95, 66,101,122,105,101,114, 13, 10,114,101,115, 32, 61, 32, + 114,101,115, 32, 43, 32,116, 32, 42, 32,116, 32, 42, 32,116, + 32, 42, 32, 69,102,102,101, 99,116, 68,117,114, 97,116,105, + 111,110, 32, 42, 32, 95, 80,111,105,110,116, 51, 95, 66,101, + 122,105,101,114, 13, 10,114,101,116,117,114,110, 32,114,101, + 115, 46,121, 13, 10,101,110,100, 13, 10, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 45,32 + }; + tolua_dobuffer(tolua_S,(char*)B,sizeof(B),"tolua embedded: ./animation.lua"); + lua_settop(tolua_S, top); + } /* end of embedded lua code */ + + + { /* begin embedded lua code */ + int top = lua_gettop(tolua_S); + static const unsigned char B[] = { + 10,102,117,110, 99,116,105,111,110, 32, 65,100,100, 85,110, + 105,116, 76,105,103,104,116, 40,117,110,105,116, 76,105,103, + 104,116, 41, 10,108,111, 99, 97,108, 32,116,121,112,101, 65, + 114,103, 32, 61, 32,116,111,108,117, 97, 46,116,121,112,101, + 40,117,110,105,116, 76,105,103,104,116, 41, 10,105,102, 32, + 116,121,112,101, 65,114,103, 32, 61, 61, 32, 39, 80,111,105, + 110,116, 76,105,103,104,116, 39, 32,111,114, 32,116,121,112, + 101, 65,114,103, 32, 61, 61, 32, 39, 83,112,111,116, 76,105, + 103,104,116, 39, 32,111,114, 32,116,121,112,101, 65,114,103, + 32, 61, 61, 32, 39, 68,105,114,101, 99,116,105,111,110, 97, + 108, 76,105,103,104,116, 39, 32,116,104,101,110, 10,108,111, + 99, 97,108, 32,114,101,115, 32, 61, 32,115, 99,101,110,101, + 58, 65,100,100, 85,110,105,116, 76,105,103,104,116, 40,117, + 110,105,116, 76,105,103,104,116, 41, 10,105,102, 32,114,101, + 115, 32, 61, 61, 32,102, 97,108,115,101, 32,116,104,101,110, + 10,101,114,114,111,114, 40, 39, 69,114,114,111,114, 32,105, + 110, 32,102,117,110, 99,116,105,111,110, 32, 65,100,100, 85, + 110,105,116, 76,105,103,104,116, 58, 32,117,110,105,116, 32, + 108,105,103,104,116, 32,119,105,116,104, 32,115, 97,109,101, + 32,110, 97,109,101, 32,119, 97,115, 32, 97,100,100,101,100, + 32,101, 97,114,108,105,101,114, 39, 44, 32, 50, 41, 10,101, + 110,100, 10,101,108,115,101, 10,101,114,114,111,114, 40, 39, + 65,114,103,117,109,101,110,116, 32,102,111,114, 32, 65,100, + 100, 85,110,105,116, 76,105,103,104,116, 32,109,117,115,116, + 32,104, 97,118,101, 32,111,110,101, 32,111,102, 32,116,104, + 101, 32,116,121,112,101, 58, 32, 80,111,105,110,116, 76,105, + 103,104,116, 44, 32, 83,112,111,116, 76,105,103,104,116, 32, + 111,114, 32, 68,105,114,101, 99,116,105,111,110, 97,108, 76, + 105,103,104,116, 39, 44, 32, 50, 41, 10,101,110,100, 10,101, + 110,100, 10,102,117,110, 99,116,105,111,110, 32, 82,101,109, + 111,118,101, 85,110,105,116, 76,105,103,104,116, 40, 97,114, + 103, 41, 10,105,102, 32,116,121,112,101, 40, 97,114,103, 41, + 32, 61, 61, 32, 39,115,116,114,105,110,103, 39, 32,116,104, + 101,110, 10,108,111, 99, 97,108, 32,114,101,115, 32, 61, 32, + 115, 99,101,110,101, 58, 82,101,109,111,118,101, 85,110,105, + 116, 76,105,103,104,116, 40, 97,114,103, 41, 10,105,102, 32, + 114,101,115, 32, 61, 61, 32,102, 97,108,115,101, 32,116,104, + 101,110, 10,101,114,114,111,114, 40, 39, 69,114,114,111,114, + 32,105,110, 32,102,117,110, 99,116,105,111,110, 32, 82,101, + 109,111,118,101, 85,110,105,116, 76,105,103,104,116, 58, 32, + 117,110,105,116, 32,108,105,103,104,116, 32,119,105,116,104, + 32,115,112,101, 99,105,102,105,101,100, 32,110, 97,109,101, + 32,119, 97,115, 32,110,111,116, 32, 97,100,100,101,100, 32, + 105,110,116,111, 32,115, 99,101,110,101, 39, 44, 32, 50, 41, + 10,101,110,100, 10,101,108,115,101, 10,101,114,114,111,114, + 40, 39, 65,114,103,117,109,101,110,116, 32,102,111,114, 32, + 82,101,109,111,118,101, 85,110,105,116, 76,105,103,104,116, + 32,109,117,115,116, 32,104, 97,118,101, 32,115,116,114,105, + 110,103, 32,116,121,112,101, 39, 44, 32, 50, 41, 10,101,110, + 100, 10,101,110,100, 10,102,117,110, 99,116,105,111,110, 32, + 82,101,109,111,118,101, 65,108,108, 85,110,105,116,115, 76, + 105,103,104,116, 84,121,112,101, 40,115,116,114, 41, 10,108, + 111, 99, 97,108, 32,114,101,115, 32, 61, 32,102, 97,108,115, + 101, 10,105,102, 32,116,121,112,101, 40,115,116,114, 41, 32, + 126, 61, 32, 39,115,116,114,105,110,103, 39, 32,116,104,101, + 110, 10,101,114,114,111,114, 40, 39, 65,114,103,117,109,101, + 110,116, 32,102,111,114, 32, 82,101,109,111,118,101, 65,108, + 108, 85,110,105,116,115, 76,105,103,104,116, 84,121,112,101, + 32,109,117,115,116, 32,104, 97,118,101, 32,115,116,114,105, + 110,103, 32,116,121,112,101, 39, 44, 32, 50, 41, 10,101,108, + 115,101,105,102, 32,115,116,114, 32, 61, 61, 32, 39,112,111, + 105,110,116, 39, 32,116,104,101,110, 10,114,101,115, 32, 61, + 32,115, 99,101,110,101, 58, 82,101,109,111,118,101, 65,108, + 108, 85,110,105,116,115, 76,105,103,104,116, 84,121,112,101, + 40, 84, 89, 80, 69, 95, 85, 78, 73, 84, 95, 76, 73, 71, 72, + 84, 95, 80, 79, 73, 78, 84, 41, 10,101,108,115,101,105,102, + 32,115,116,114, 32, 61, 61, 32, 39,115,112,111,116, 39, 32, + 116,104,101,110, 10,114,101,115, 32, 61, 32,115, 99,101,110, + 101, 58, 82,101,109,111,118,101, 65,108,108, 85,110,105,116, + 115, 76,105,103,104,116, 84,121,112,101, 40, 84, 89, 80, 69, + 95, 85, 78, 73, 84, 95, 76, 73, 71, 72, 84, 95, 83, 80, 79, + 84, 41, 10,101,108,115,101,105,102, 32,115,116,114, 32, 61, + 61, 32, 39,100,105,114,101, 99,116,105,111,110, 97,108, 39, + 32,116,104,101,110, 10,114,101,115, 32, 61, 32,115, 99,101, + 110,101, 58, 82,101,109,111,118,101, 65,108,108, 85,110,105, + 116,115, 76,105,103,104,116, 84,121,112,101, 40, 84, 89, 80, + 69, 95, 85, 78, 73, 84, 95, 76, 73, 71, 72, 84, 95, 68, 73, + 82, 69, 67, 84, 73, 79, 78, 65, 76, 41, 10,101,108,115,101, + 10,101,114,114,111,114, 40, 39, 65,114,103,117,109,101,110, + 116, 32,102,111,114, 32, 82,101,109,111,118,101, 65,108,108, + 85,110,105,116,115, 76,105,103,104,116, 84,121,112,101, 32, + 109,117,115,116, 32,104, 97,118,101, 32,111,110,101, 32,111, + 102, 32,116,104,101, 32,115,116,114,105,110,103, 32,118, 97, + 108,117,101, 58, 32,112,111,105,110,116, 44, 32,115,112,111, + 116, 32,111,114, 32,100,105,114,101, 99,116,105,111,110, 97, + 108, 39, 44, 32, 50, 41, 10,101,110,100, 10,105,102, 32,114, + 101,115, 32, 61, 61, 32,102, 97,108,115,101, 32,116,104,101, + 110, 10,101,114,114,111,114, 40, 39, 73,110,116,101,114,110, + 97,108, 32,101,114,114,111,114, 39, 44, 32, 49, 41, 10,101, + 110,100, 10,101,110,100, 10,102,117,110, 99,116,105,111,110, + 32, 71,101,116, 85,110,105,116, 76,105,103,104,116, 40, 97, + 114,103, 41, 10,105,102, 32,116,121,112,101, 40, 97,114,103, + 41, 32, 61, 61, 32, 39,115,116,114,105,110,103, 39, 32,116, + 104,101,110, 10,108,111, 99, 97,108, 32,114,101,115, 32, 61, + 32,115, 99,101,110,101, 58, 71,101,116, 85,110,105,116, 76, + 105,103,104,116, 40, 97,114,103, 41, 10,105,102, 32,114,101, + 115, 46,116,121,112,101, 32, 61, 61, 32, 80,114,111,112,101, + 114,116,121, 67, 97,115,116, 46, 80, 79, 73, 78, 84, 95, 76, + 73, 71, 72, 84, 32,116,104,101,110, 10,114,101,116,117,114, + 110, 32,114,101,115, 46,118, 97,108,117,101, 46,112, 80,111, + 105,110,116, 76,105,103,104,116, 10,101,108,115,101,105,102, + 32,114,101,115, 46,116,121,112,101, 32, 61, 61, 32, 80,114, + 111,112,101,114,116,121, 67, 97,115,116, 46, 83, 80, 79, 84, + 95, 76, 73, 71, 72, 84, 32,116,104,101,110, 10,114,101,116, + 117,114,110, 32,114,101,115, 46,118, 97,108,117,101, 46,112, + 83,112,111,116, 76,105,103,104,116, 10,101,108,115,101,105, + 102, 32,114,101,115, 46,116,121,112,101, 32, 61, 61, 32, 80, + 114,111,112,101,114,116,121, 67, 97,115,116, 46, 68, 73, 82, + 69, 67, 84, 73, 79, 78, 65, 76, 95, 76, 73, 71, 72, 84, 32, + 116,104,101,110, 10,114,101,116,117,114,110, 32,114,101,115, + 46,118, 97,108,117,101, 46,112, 68,105,114,101, 99,116,105, + 111,110, 97,108, 76,105,103,104,116, 10,101,108,115,101, 10, + 101,114,114,111,114, 40, 39, 69,114,114,111,114, 32,105,110, + 32,102,117,110, 99,116,105,111,110, 32, 71,101,116, 85,110, + 105,116, 76,105,103,104,116, 58, 32,117,110,105,116, 32,108, + 105,103,104,116, 32,119,105,116,104, 32,115,112,101, 99,105, + 102,105,101,100, 32,110, 97,109,101, 32,119, 97,115, 32,110, + 111,116, 32, 97,100,100,101,100, 32,105,110,116,111, 32,115, + 99,101,110,101, 39, 44, 32, 50, 41, 10,101,110,100, 10,101, + 108,115,101, 10,101,114,114,111,114, 40, 39, 65,114,103,117, + 109,101,110,116, 32,102,111,114, 32, 71,101,116, 85,110,105, + 116, 76,105,103,104,116, 32,109,117,115,116, 32,104, 97,118, + 101, 32,115,116,114,105,110,103, 32,116,121,112,101, 39, 44, + 32, 50, 41, 10,101,110,100, 10,101,110,100, 10,102,117,110, + 99,116,105,111,110, 32, 83,101,116, 76,105,103,104,116, 65, + 109, 98,105,101,110,116, 67,111,108,111,117,114, 40,114,101, + 100, 44, 32,103,114,101,101,110, 44, 32, 98,108,117,101, 41, + 10,108,111, 99, 97,108, 32,116,121,112,101, 70,105,114,115, + 116, 65,114,103, 32, 61, 32,116,111,108,117, 97, 46,116,121, + 112,101, 40,114,101,100, 41, 10,105,102, 32,116,121,112,101, + 70,105,114,115,116, 65,114,103, 32, 61, 61, 32, 39, 86,101, + 99,116,111,114, 51, 39, 32,111,114, 32,116,121,112,101, 70, + 105,114,115,116, 65,114,103, 32, 61, 61, 32, 39, 99,111,110, + 115,116, 32, 86,101, 99,116,111,114, 51, 39, 32,116,104,101, + 110, 10,105,102, 32,103,114,101,101,110, 32, 61, 61, 32,110, + 105,108, 32, 97,110,100, 32, 98,108,117,101, 32, 61, 61, 32, + 110,105,108, 32,116,104,101,110, 10,115, 99,101,110,101, 58, + 83,101,116, 76,105,103,104,116, 65,109, 98,105,101,110,116, + 67,111,108,111,117,114, 40,114,101,100, 41, 10,101,108,115, + 101, 10,101,114,114,111,114, 40, 39, 87,114,111,110,103, 32, + 110,117,109, 98,101,114, 32,111,114, 32,116,121,112,101, 32, + 111,102, 32,112, 97,114, 97,109,101,116,101,114,115, 32,102, + 111,114, 32, 83,101,116, 76,105,103,104,116, 65,109, 98,105, + 101,110,116, 67,111,108,111,117,114, 32, 40,115,101,101, 32, + 102,114,111,109, 32,115,101, 99,111,110,100, 32,112, 97,114, + 97,109,101,116,101,114, 41, 39, 44, 32, 50, 41, 10,101,110, + 100, 10,101,108,115,101,105,102, 32,116,121,112,101, 70,105, + 114,115,116, 65,114,103, 32, 61, 61, 32, 39,110,117,109, 98, + 101,114, 39, 32, 97,110,100, 32,116,121,112,101, 40,103,114, + 101,101,110, 41, 32, 61, 61, 32, 39,110,117,109, 98,101,114, + 39, 32, 97,110,100, 32,116,121,112,101, 40, 98,108,117,101, + 41, 32, 61, 61, 32, 39,110,117,109, 98,101,114, 39, 32,116, + 104,101,110, 10,115, 99,101,110,101, 58, 83,101,116, 76,105, + 103,104,116, 65,109, 98,105,101,110,116, 67,111,108,111,117, + 114, 40,114,101,100, 44, 32,103,114,101,101,110, 44, 32, 98, + 108,117,101, 41, 10,101,108,115,101, 10,101,114,114,111,114, + 40, 39, 87,114,111,110,103, 32,110,117,109, 98,101,114, 32, + 111,114, 32,116,121,112,101, 32,111,102, 32,112, 97,114, 97, + 109,101,116,101,114,115, 32,102,111,114, 32, 83,101,116, 76, + 105,103,104,116, 65,109, 98,105,101,110,116, 67,111,108,111, + 117,114, 32, 40,115,101,101, 32,102,114,111,109, 32,102,105, + 114,115,116, 32,112, 97,114, 97,109,101,116,101,114, 41, 39, + 44, 32, 50, 41, 10,101,110,100, 10,101,110,100, 10,102,117, + 110, 99,116,105,111,110, 32, 83,101,116, 76,105,103,104,116, + 73,110,116,101,110,115,105,116,121, 40,105,110,116,101,110, + 115,105,116,121, 41, 10,105,102, 32,116,121,112,101, 40,105, + 110,116,101,110,115,105,116,121, 41, 32, 61, 61, 32, 39,110, + 117,109, 98,101,114, 39, 32,116,104,101,110, 10,115, 99,101, + 110,101, 58, 83,101,116, 76,105,103,104,116, 73,110,116,101, + 110,115,105,116,121, 40,105,110,116,101,110,115,105,116,121, + 41, 10,101,108,115,101, 10,101,114,114,111,114, 40, 39, 65, + 114,103,117,109,101,110,116, 32,102,111,114, 32, 83,101,116, + 76,105,103,104,116, 73,110,116,101,110,115,105,116,121, 32, + 109,117,115,116, 32,104, 97,118,101, 32,110,117,109, 98,101, + 114, 32,116,121,112,101, 32, 40,105,110,116,101,110,115,105, + 116,121, 41, 39, 44, 32, 50, 41, 10,101,110,100, 10,101,110, + 100, 10,102,117,110, 99,116,105,111,110, 32, 83,101,116, 76, + 105,103,104,116, 65,116,116,101,110,117, 97,116,105,111,110, + 40, 97,116,116,101,110,117, 97,116,105,111,110, 41, 10,105, + 102, 32,116,121,112,101, 40, 97,116,116,101,110,117, 97,116, + 105,111,110, 41, 32, 61, 61, 32, 39,110,117,109, 98,101,114, + 39, 32,116,104,101,110, 10,115, 99,101,110,101, 58, 83,101, + 116, 76,105,103,104,116, 65,116,116,101,110,117, 97,116,105, + 111,110, 40, 97,116,116,101,110,117, 97,116,105,111,110, 41, + 10,101,108,115,101, 10,101,114,114,111,114, 40, 39, 65,114, + 103,117,109,101,110,116, 32,102,111,114, 32, 83,101,116, 76, + 105,103,104,116, 65,116,116,101,110,117, 97,116,105,111,110, + 32,109,117,115,116, 32,104, 97,118,101, 32,110,117,109, 98, + 101,114, 32,116,121,112,101, 32, 40, 97,116,116,101,110,117, + 97,116,105,111,110, 41, 39, 44, 32, 50, 41, 10,101,110,100, + 10,101,110,100, 10,102,117,110, 99,116,105,111,110, 32, 71, + 101,116, 76,105,103,104,116, 65,109, 98,105,101,110,116, 67, + 111,108,111,117,114, 40, 41, 10,114,101,116,117,114,110, 32, + 115, 99,101,110,101, 58, 71,101,116, 76,105,103,104,116, 65, + 109, 98,105,101,110,116, 67,111,108,111,117,114, 40, 41, 10, + 101,110,100, 10,102,117,110, 99,116,105,111,110, 32, 71,101, + 116, 76,105,103,104,116, 73,110,116,101,110,115,105,116,121, + 40, 41, 10,114,101,116,117,114,110, 32,115, 99,101,110,101, + 58, 71,101,116, 76,105,103,104,116, 73,110,116,101,110,115, + 105,116,121, 40, 41, 10,101,110,100, 10,102,117,110, 99,116, + 105,111,110, 32, 71,101,116, 76,105,103,104,116, 65,116,116, + 101,110,117, 97,116,105,111,110, 40, 41, 10,114,101,116,117, + 114,110, 32,115, 99,101,110,101, 58, 71,101,116, 76,105,103, + 104,116, 65,116,116,101,110,117, 97,116,105,111,110, 40, 41, + 10,101,110,100, 10,102,117,110, 99,116,105,111,110, 32, 67, + 114,101, 97,116,101, 80,111,105,110,116, 76,105,103,104,116, + 40,110, 97,109,101, 41, 10,105,102, 32,116,121,112,101, 40, + 110, 97,109,101, 41, 32,126, 61, 32, 39,115,116,114,105,110, + 103, 39, 32,116,104,101,110, 10,101,114,114,111,114, 40, 39, + 65,114,103,117,109,101,110,116, 32,102,111,114, 32, 67,114, + 101, 97,116,101, 80,111,105,110,116, 76,105,103,104,116, 32, + 109,117,115,116, 32,104, 97,118,101, 32,115,116,114,105,110, + 103, 32,116,121,112,101, 32, 40,110, 97,109,101, 32,111,102, + 32,112,111,105,110,116, 32,108,105,103,104,116, 41, 39, 44, + 32, 50, 41, 10,101,110,100, 10,108,111, 99, 97,108, 32,114, + 101,115, 32, 61, 32, 80,111,105,110,116, 76,105,103,104,116, + 58, 67,114,101, 97,116,101, 80,111,105,110,116, 76,105,103, + 104,116, 40,110, 97,109,101, 41, 10,105,102, 32,114,101,115, + 32,126, 61, 32,110,105,108, 32,116,104,101,110, 10,114,101, + 116,117,114,110, 32,114,101,115, 10,101,108,115,101, 10,101, + 114,114,111,114, 40, 39, 79,117,116, 32,111,102, 32,109,101, + 109,111,114,121, 32,119,104,105,108,101, 32, 99,114,101, 97, + 116,105,110,103, 32, 80,111,105,110,116, 76,105,103,104,116, + 32,111, 98,106,101, 99,116, 39, 44, 32, 50, 41, 10,101,110, + 100, 10,101,110,100, 10,102,117,110, 99,116,105,111,110, 32, + 67,114,101, 97,116,101, 83,112,111,116, 76,105,103,104,116, + 40,110, 97,109,101, 41, 10,105,102, 32,116,121,112,101, 40, + 110, 97,109,101, 41, 32,126, 61, 32, 39,115,116,114,105,110, + 103, 39, 32,116,104,101,110, 10,101,114,114,111,114, 40, 39, + 65,114,103,117,109,101,110,116, 32,102,111,114, 32, 67,114, + 101, 97,116,101, 83,112,111,116, 76,105,103,104,116, 32,109, + 117,115,116, 32,104, 97,118,101, 32,115,116,114,105,110,103, + 32,116,121,112,101, 32, 40,110, 97,109,101, 32,111,102, 32, + 115,112,111,116, 32,108,105,103,104,116, 41, 39, 44, 32, 50, + 41, 10,101,110,100, 10,108,111, 99, 97,108, 32,114,101,115, + 32, 61, 32, 83,112,111,116, 76,105,103,104,116, 58, 67,114, + 101, 97,116,101, 83,112,111,116, 76,105,103,104,116, 40,110, + 97,109,101, 41, 10,105,102, 32,114,101,115, 32,126, 61, 32, + 110,105,108, 32,116,104,101,110, 10,114,101,116,117,114,110, + 32,114,101,115, 10,101,108,115,101, 10,101,114,114,111,114, + 40, 39, 79,117,116, 32,111,102, 32,109,101,109,111,114,121, + 32,119,104,105,108,101, 32, 99,114,101, 97,116,105,110,103, + 32, 83,112,111,116, 76,105,103,104,116, 32,111, 98,106,101, + 99,116, 39, 44, 32, 50, 41, 10,101,110,100, 10,101,110,100, + 10,102,117,110, 99,116,105,111,110, 32, 67,114,101, 97,116, + 101, 68,105,114,101, 99,116,105,111,110, 97,108, 76,105,103, + 104,116, 40,110, 97,109,101, 41, 10,105,102, 32,116,121,112, + 101, 40,110, 97,109,101, 41, 32,126, 61, 32, 39,115,116,114, + 105,110,103, 39, 32,116,104,101,110, 10,101,114,114,111,114, + 40, 39, 65,114,103,117,109,101,110,116, 32,102,111,114, 32, + 67,114,101, 97,116,101, 68,105,114,101, 99,116,105,111,110, + 97,108, 76,105,103,104,116, 32,109,117,115,116, 32,104, 97, + 118,101, 32,115,116,114,105,110,103, 32,116,121,112,101, 32, + 40,110, 97,109,101, 32,111,102, 32,100,105,114,101, 99,116, + 105,111,110, 97,108, 32,108,105,103,104,116, 41, 39, 44, 32, + 50, 41, 10,101,110,100, 10,108,111, 99, 97,108, 32,114,101, + 115, 32, 61, 32, 68,105,114,101, 99,116,105,111,110, 97,108, + 76,105,103,104,116, 58, 67,114,101, 97,116,101, 68,105,114, + 101, 99,116,105,111,110, 97,108, 76,105,103,104,116, 40, 41, + 10,105,102, 32,114,101,115, 32,126, 61, 32,110,105,108, 32, + 116,104,101,110, 10,114,101,116,117,114,110, 32,114,101,115, + 10,101,108,115,101, 10,101,114,114,111,114, 40, 39, 79,117, + 116, 32,111,102, 32,109,101,109,111,114,121, 32,119,104,105, + 108,101, 32, 99,114,101, 97,116,105,110,103, 32, 68,105,114, + 101, 99,116,105,111,110, 97,108, 76,105,103,104,116, 32,111, + 98,106,101, 99,116, 39, 44, 32, 50, 41, 10,101,110,100, 10, + 101,110,100, 45, 45, 45, 45, 45, 45, 45,32 + }; + tolua_dobuffer(tolua_S,(char*)B,sizeof(B),"tolua embedded: ./light.lua"); + lua_settop(tolua_S, top); + } /* end of embedded lua code */ + + tolua_endmodule(tolua_S); + return 1; +} + + +#if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM >= 501 + TOLUA_API int luaopen_ (lua_State* tolua_S) { + return tolua__open(tolua_S); +}; +#endif + diff --git a/src/ui/effects/runtime/lua-cpp-binding/tolua.h b/src/ui/effects/runtime/lua-cpp-binding/tolua.h new file mode 100644 index 0000000..fb1058b --- /dev/null +++ b/src/ui/effects/runtime/lua-cpp-binding/tolua.h @@ -0,0 +1,20 @@ +// +// 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. +// + +/* Exported function */ +TOLUA_API int tolua__open (lua_State* tolua_S); + diff --git a/src/ui/inc/FUiAnim_DisplayContextImpl.h b/src/ui/inc/FUiAnim_DisplayContextImpl.h new file mode 100644 index 0000000..24656a6 --- /dev/null +++ b/src/ui/inc/FUiAnim_DisplayContextImpl.h @@ -0,0 +1,61 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_DisplayContextImpl.h + * @brief This is the header file for the %_DisplayContextImpl class. + * + * This header file contains declarations of the %_DisplayContextImpl class. + */ + +#ifndef FUI_ANIM_DISPLAY_CONTEXT_IMPL_H +#define FUI_ANIM_DISPLAY_CONTEXT_IMPL_H + +#include + +namespace Tizen { namespace Ui { namespace Animations +{ + +class _NativeLayer; +class VisualElement; +class DisplayContext; + +class _OSP_EXPORT_ _DisplayContextImpl +{ +public: + explicit _DisplayContextImpl(const _NativeLayer& layer); + virtual ~_DisplayContextImpl(void); + result SetPublicInstance(DisplayContext* pInstance); + DisplayContext* GetPublicInstance(void); + result SetNativeLayer(const Tizen::Ui::Animations::_NativeLayer& layer); + _NativeLayer* GetNativeLayer(void) const { return __pLayer;}; + static DisplayContext* CreatePublicInstance(const _NativeLayer& layer); + static result DestroyPublicInstance(const DisplayContext& displayContext); + static _DisplayContextImpl* GetInstance(DisplayContext& displayContext); + static const _DisplayContextImpl* GetInstance(const DisplayContext& displayContext); + + +private: + friend class DisplayContext; + DisplayContext* _pPublicInstance; + Tizen::Ui::Animations::_NativeLayer* __pLayer; +}; + + +}}} //namespace Tizen { namespace Ui { namespace Animations + +#endif //FUI_ANIM_DISPLAY_CONTEXT_IMPL_H diff --git a/src/ui/inc/FUiAnim_DisplayManager.h b/src/ui/inc/FUiAnim_DisplayManager.h new file mode 100644 index 0000000..67205a6 --- /dev/null +++ b/src/ui/inc/FUiAnim_DisplayManager.h @@ -0,0 +1,92 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_DisplayManager.h + * @brief This is the header file for the _DisplayManager class. + * + * This header file contains the declarations of the _DisplayManager class. + */ + +#ifndef _FUI_ANIM_INTERNAL_DISPLAY_MANAGER_H_ +#define _FUI_ANIM_INTERNAL_DISPLAY_MANAGER_H_ + +#include + +// Backend feature +#define VE_EFL +//#define VE_OPENGL +#define VE_VSYNC_UPDATE + +namespace Tizen { namespace Ui { namespace Animations +{ + +class _RootVisualElement; + +class _OSP_EXPORT_ _DisplayManager +{ +public: + static _DisplayManager* GetInstance(void) + { + return _DisplayManager::__pInstance; + } + + static result CreateInstance(void); + static result ReleaseInstance(void); + static bool __wakeUpEventAdded; + + // For restoring gl context + typedef void (*RestoreContextCallback)(void); + static void SetRestoreContextCallback(RestoreContextCallback pRestoreContextCallback); + static void RestoreContext(void); +public: + _RootVisualElement* CreateRoot(void); + + result DestroyRoot(_RootVisualElement& root); + + result RegisterRoot(_RootVisualElement& root); + + result UnregisterRoot(_RootVisualElement& root); + + int GetRootCount(void) const; + + _RootVisualElement* GetRoot(int index) const; + + void AddWakeUpEvent(void); + void RemoveWakeUpEvent(void); + + bool Render(_RootVisualElement& root); + result PostRender(_RootVisualElement& root); + bool RenderAll(void); + result Flush(void); + +private: + _DisplayManager(void); + virtual ~_DisplayManager(void); + +private: + Tizen::Base::Collection::ArrayList __roots; + + static int __eventType; + static void* __pWakeUpEventHandler; + static _DisplayManager* __pInstance; + static RestoreContextCallback __pRestoreContextCallback; +}; // _DisplayManager + +}}} //namespace Tizen { namespace Ui { namespace Animations + +#endif //_FUI_ANIM_INTERNAL_DISPLAY_MANAGER_H_ diff --git a/src/ui/inc/FUiAnim_EflLayer.h b/src/ui/inc/FUiAnim_EflLayer.h new file mode 100644 index 0000000..1c1a192 --- /dev/null +++ b/src/ui/inc/FUiAnim_EflLayer.h @@ -0,0 +1,162 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_EflLayer.h + * @brief This is the header file for the _EflLayer class. + * + * This header file contains the declarations of the _EflLayer class. + */ + +#ifndef _FUI_ANIM_INTERNAL_EFL_LAYER_H_ +#define _FUI_ANIM_INTERNAL_EFL_LAYER_H_ + +#define ECORE_EVAS_ASYNC_VISIBILITY_BUG_HACK + + +#include +#include +#include + +#include +#include "FUiAnim_NativeLayer.h" + +//#define USE_WORKAROUND +//#define XWINDOW_DEBUG + +namespace Tizen { namespace Ui { namespace Animations +{ +class _EflLayerConfiguration; + +class _OSP_EXPORT_ _EflLayer + : public _NativeLayer +{ +public: + _EflLayer(void); + _EflLayer(bool isMainType); + virtual ~_EflLayer(void); + + 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; + virtual void Flush(void); + + + void SetOpacity(float opacity); + float GetOpacity(void); + + result SetOrientationChanged(int orientation); + + void SetOwner(_EflLayer* pOwner); + + _RootVisualElement* GetRootVisualElement(void) const + { + return _pRootVisualElement; + } + + Evas* GetEvas(void) const + { + return _pEvas; + } + + Ecore_Evas* GetEcoreEvas(void) const + { + return _pEcoreEvas; + } + + Evas_Object* GetElmWin(void) const + { + return _pWindow; + } + + bool IsAsyncVisibilityChangeNeeded(void) const + { + return _needAsyncVisibilityChangeRequest; + } + + void SetAsyncVisibilityChangeNeeded(bool asyncVisibilityChange) + { + _needAsyncVisibilityChangeRequest = asyncVisibilityChange; + } + + void SetRenderNeeded(bool needRender) + { + _needRender = needRender; + } + bool IsRenderNeeded() + { + return _needRender; + } + + void SetMapped(bool map) + { + _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); + +protected: + _RootVisualElement* _pRootVisualElement; + Evas* _pEvas; + Ecore_Evas* _pEcoreEvas; + Evas_Object* _pWindow; + bool _needBoundsChangeRequest; + bool _needShowStateChangeRequest; + bool _isShow; + bool _needAsyncVisibilityChangeRequest; + bool _isMainType; + bool _needRender; + bool _isMapped; + bool _isConfigured; + bool _needForceManualRender; + static int _countOfLayer; + Ecore_Event_Handler* _pOnWindowDamagedHandler; + Ecore_Event_Handler* _pOnWindowConfiguredHandler; + Ecore_Event_Handler* _pOnWindowHideHandler; + Ecore_Event_Handler* _pOnWindowShowHandler; +private: + bool __isWinObject; + Tizen::Graphics::FloatRectangle __bounds; + _EflLayerConfiguration* _pConfiguration; + int __orientation; +}; + +}}} //namespace Tizen { namespace Ui { namespace Animations + +#endif //_FUI_ANIM_INTERNAL_EFL_LAYER_H_ diff --git a/src/ui/inc/FUiAnim_EflLayerConfiguration.h b/src/ui/inc/FUiAnim_EflLayerConfiguration.h new file mode 100644 index 0000000..2b27e3e --- /dev/null +++ b/src/ui/inc/FUiAnim_EflLayerConfiguration.h @@ -0,0 +1,46 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_EflLayerConfiguration.h + * @brief This is the header file for the _EflLayerConfiguration class. + * + * This header file contains the declarations of the _EflLayerConfiguration class. + */ + +#ifndef _FUI_ANIM_INTERNAL_EFL_LAYER_CONFIGURATION_H_ +#define _FUI_ANIM_INTERNAL_EFL_LAYER_CONFIGURATION_H_ + +namespace Tizen { namespace Ui { namespace Animations +{ + +class _EflLayerConfiguration +{ +public: + static _EflLayerConfiguration* GetInstance(void); + void ReleaseInstance(void); + void ApplyCustomizedConfig(void* pWin); + +private: + _EflLayerConfiguration(void); + ~_EflLayerConfiguration(void); + int __refCount; +}; // class _EflLayerConfiguration + +}}} //namespace Tizen { namespace Ui { namespace Animations + +#endif //_FUI_ANIM_INTERNAL_EFL_LAYER_CONFIGURATION_H_ diff --git a/src/ui/inc/FUiAnim_EflNode.h b/src/ui/inc/FUiAnim_EflNode.h new file mode 100644 index 0000000..108d290 --- /dev/null +++ b/src/ui/inc/FUiAnim_EflNode.h @@ -0,0 +1,118 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_EflNode.h + * @brief Header file of _EflNode class + * + * This file contains declarations _EflNode class. + */ + +#ifndef FUI_ANIM_INTERNAL_EFLNODE_H_ +#define FUI_ANIM_INTERNAL_EFLNODE_H_ + +#include +#include +#include +#include + +#include "FUi_Colorf.h" +#include "FUiAnim_INativeNode.h" + + +namespace Tizen { namespace Ui { namespace Animations +{ + +class VisualElement; +class _VisualElementImpl; +class VisualElementSurface; +class _NativeLayer; + +class _OSP_EXPORT_ _EflNode + : public _INativeNode +{ +public: + _EflNode(void); + virtual ~_EflNode(void); + + virtual result Construct(void); + virtual result RebuildIfNeeded(const _INativeNode& parent); + +public: + virtual Handle GetGroupContainer(void) const; + virtual result InsertChild(_INativeNode& child, const _INativeNode* pReference, bool above); + virtual result RemoveChild(_INativeNode& child); + virtual result SetFlushNeeded(void); + virtual result Flush(void); + virtual result Reconfigure(VisualElementSurface* pSurface, _VisualElementImpl& element, bool surfaceOnly); + virtual VisualElementSurface* GetSurface(void) const; + + Evas* GetEvas(void) const; + + _Colorf GetBackgroundColor(void) const; + result SetBackgroundColor(const _Colorf& backgroundColor); + + void AddNativeSmartObject(VisualElement& element, Evas_Object* pSmartObject); + void SetNativeObject(VisualElement& element, Evas_Object* pNativeObject); + void RemoveNativeObject(void); + Evas_Object* GetNativeObject(void) const; + +private: + void AdjustEvasObjectOrder(void); + bool AdjustImageHolder(bool useHolder); + + result ReConstruct(const Evas* pEvas); + result ReConstruct(const _NativeLayer& layer); + + result Destruct(void); + +private: + _EflNode(const _EflNode& rhs); // no impl. + _EflNode& operator =(const _EflNode& rhs); // no impl. + +private: + VisualElementSurface* __pSurface; + VisualElementSurface* __pSharedSurface; + Evas* __pEvas; + Evas_Object* __pSmartObject; + Evas_Object* __pClipObject; + Evas_Object* __pRectangleObject; + Evas_Object* __pImageHolder; + Evas_Object* __pNativeSmartObject; + Evas_Map* __pMap; + bool __mapUsed; + VisualElement::RenderOperation __renderOperation; + bool __needEvasObjectSync; + Tizen::Graphics::FloatRectangle __realBounds; + + _Colorf __backgroundColor; + + _NativeLayer* __pLayer; + + static Evas_Smart* __pStaticSmartClass; + static Evas_Smart* __pStaticSmartClassForImageHolder; + + friend class _INativeNode; + friend class _VeDebug; + friend class _VisualElementImpl; + friend class _EflLayer; +}; // _EflNode + + +}}} // Tizen::Ui::Animations + +#endif //FUI_ANIM_INTERNAL_EFLNODE_H_ diff --git a/src/ui/inc/FUiAnim_INativeNode.h b/src/ui/inc/FUiAnim_INativeNode.h new file mode 100644 index 0000000..b2ae416 --- /dev/null +++ b/src/ui/inc/FUiAnim_INativeNode.h @@ -0,0 +1,63 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_INativeNode.h + * @brief Header file of _INativeNode class + * + * This file contains declarations _INativeNode class. + */ + +#ifndef _FUI_ANIM_INTERNAL_INATIVENODE_H_ +#define _FUI_ANIM_INTERNAL_INATIVENODE_H_ + +#include + +namespace Tizen { namespace Ui { namespace Animations +{ + +class _VisualElementImpl; +class VisualElementSurface; + +class _OSP_EXPORT_ _INativeNode +{ +protected: + _INativeNode(void); +public: + virtual ~_INativeNode(void); + static _INativeNode* CreateInstanceN(void); + + virtual result Construct(void) = 0; + virtual result RebuildIfNeeded(const _INativeNode& parent) = 0; + +public: + virtual result InsertChild(_INativeNode& child, const _INativeNode* pReference, bool above) = 0; + virtual result RemoveChild(_INativeNode& child) = 0; + virtual result SetFlushNeeded(void) = 0; + virtual result Flush(void) = 0; + virtual result Reconfigure(VisualElementSurface* pSurface, _VisualElementImpl& element, bool surfaceOnly) = 0; + virtual VisualElementSurface* GetSurface(void) const = 0; + +private: + _INativeNode(const _INativeNode& rhs); // no impl. + _INativeNode& operator =(const _INativeNode& rhs); // no impl. +}; // _INativeNode + + +}}} // Tizen::Ui::Animations + +#endif // _FUI_ANIM_INTERNAL_INATIVENODE_H_ diff --git a/src/ui/inc/FUiAnim_IVisualElementCaptureProvider.h b/src/ui/inc/FUiAnim_IVisualElementCaptureProvider.h new file mode 100644 index 0000000..4228d93 --- /dev/null +++ b/src/ui/inc/FUiAnim_IVisualElementCaptureProvider.h @@ -0,0 +1,45 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_IVisualElementCaptureProvider.h + * @brief Header file of _IVisualElementCaptureProvider class + * + * This file contains declarations _IVisualElementCaptureProvider class. + */ + +#ifndef _FUI_ANIM_INTERNAL_IVISUALELEMENT_CAPTUREPROVIDER_H_ +#define _FUI_ANIM_INTERNAL_IVISUALELEMENT_CAPTUREPROVIDER_H_ + +namespace Tizen { namespace Graphics { +class BufferInfo; +}} +namespace Tizen { namespace Ui { namespace Animations +{ + +class _IVisualElementCaptureProvider +{ +public: + virtual bool OnCaptureAcquire(Tizen::Graphics::BufferInfo& output) = 0; + virtual void OnCaptureReleased(void) = 0; + + virtual ~_IVisualElementCaptureProvider(void){}; +}; + +}}} // Tizen::Ui::Animations + +#endif // _FUI_ANIM_INTERNAL_INATIVENODE_H_ diff --git a/src/ui/inc/FUiAnim_NativeLayer.h b/src/ui/inc/FUiAnim_NativeLayer.h new file mode 100644 index 0000000..f044173 --- /dev/null +++ b/src/ui/inc/FUiAnim_NativeLayer.h @@ -0,0 +1,210 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_NativeLayer.h + * @brief This is the header file for the _NativeLayer class. + * + * This header file contains the declarations of the _NativeLayer class. + */ + +#ifndef _FUI_ANIM_INTERNAL_INATIVE_LAYER_H_ +#define _FUI_ANIM_INTERNAL_INATIVE_LAYER_H_ + +#include +#include + + +namespace Tizen { namespace Ui { namespace Animations +{ +class _RootVisualElement; +class _INativeNode; + +class _OSP_EXPORT_ _NativeLayer +{ +public: + /** + * destructor + * + * @since 2.0 + */ + virtual ~_NativeLayer(void); + + /** + * Factory method of the native layer. + * + * @since 2.0 + * @return instance of the native layer. + * @remarks This method make a instance of native layer by configuration.And call the Construct() method. + */ + static _NativeLayer* CreateInstanceN(void); + + /** + * Factory method of the native layer. + * + * @since 2.0 + * @return instance of the native layer. + * @remarks This method make a instance of native layer by configuration.And call the Construct() method. + */ + static _NativeLayer* CreateInstanceN(bool isMainType); +public: + /** + * Initializes the native layer. It is designed with 2 phase-construction. + * This method invoke the OnConstructed method for constructing. + * @since 2.0 + * @return instance of the native layer. + * + * @see OnConstructed() + */ + result Construct(void); + + _RootVisualElement* GetRootVisualElement(void) const; + + + void SetFlushNeeded(void) + { + __needFlush = true; + } + + void ResetFlushNeeded(void) + { + __needFlush = false; + } + + bool IsFlushNeeded(void) const + { + return __needFlush; + } + + /** + * Sets the position and the size of this instance. + * + * @since 2.0 + * + * @return An error code + */ + 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 + * + * @return An instance of the FloatRectangle that represents the position of top-left corner,@n + * the width, and the height of this instance. It has relative coordinate space to the parent. + */ + virtual Tizen::Graphics::FloatRectangle GetBounds(void) const = 0; + + /** + * Sets the show state of this instance. + * + * @since 2.0 + * + * @return An error code + * @param[in] show Set to @c true if this instance needs to be shown,@n + * else @c false + * @see GetShowState() + */ + virtual result SetShowState(bool show) = 0; + + + /** + * Gets the show state of this instance. + * + * @since 2.0 + * @return The show state of the %VisualElement instance. + * If an exception occurs , return @c false. + * @see SetShowState() + */ + virtual bool GetShowState(void) const = 0; + + + /** + * Flushes native layer on screen. + * + * @since 2.0 + * + */ + virtual void Flush(void) = 0; + +protected: + + virtual result OnConstructed(void) = 0; + /** + * Binds a _RootVisualElement to the native layer. This method should configure the _RootVisualElement. + * + * @since 2.0 + * @return error code. + */ + virtual result Configure(_RootVisualElement& rootElement) = 0; + +protected: + /** + * constructor + * + * @since 2.0 + */ + _NativeLayer(void); + +private: + /** + * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + * + * @since 2.0 + * + */ + _NativeLayer(const _NativeLayer& rhs); + + /** + * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + * + * @since 2.0 + * + */ + _NativeLayer& operator =(const _NativeLayer& rhs); + +protected: + _RootVisualElement* _pRootVisualElement; + +private: + bool __needFlush; + + friend class _RootVisualElement; + +}; + +}}} //namespace Tizen { namespace Ui { namespace Animations + +#endif //_FUI_ANIM_INTERNAL_INATIVE_LAYER_H_ diff --git a/src/ui/inc/FUiAnim_RootVisualElement.h b/src/ui/inc/FUiAnim_RootVisualElement.h new file mode 100644 index 0000000..bd9b1c6 --- /dev/null +++ b/src/ui/inc/FUiAnim_RootVisualElement.h @@ -0,0 +1,81 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +/** + * @file FUiAnim_RootVisualElement.h + * @brief This is the header file for the _RootVisualElement class. + * + * This header file contains the declarations of the _RotateAnimationImpl class. + */ + + +#ifndef _FUI_ANIM_INTERNAL_ROOT_VISUAL_EMENET_H_ +#define _FUI_ANIM_INTERNAL_ROOT_VISUAL_EMENET_H_ + +#include "FUiAnim_VisualElement.h" + +namespace Tizen { namespace Ui { namespace Animations +{ +class _NativeLayer; + +class _OSP_EXPORT_ _RootVisualElement + : public _VisualElement +{ +public: + + _RootVisualElement(void); + + + virtual ~_RootVisualElement(void); + +public: + + bool GetNeedsContentUpdate(void) const + { + return __needsUpdateFromRoot; + } + + + void SetNeedsContentUpdate(bool needsUpdate) + { + __needsUpdateFromRoot = needsUpdate; + } + + _NativeLayer* GetNativeLayer(void) const + { + return __pLayer; + } + + result SetNativeLayer(_NativeLayer* pLayer); + +protected: + _RootVisualElement(const _RootVisualElement& rhs); + + virtual VisualElement* CloneN(void) const; + + + +private: + bool __needsUpdateFromRoot; + bool __isModel; + _NativeLayer* __pLayer; + +}; // _RootVisualElement + +}}} // Tizen::Ui::Animations + +#endif //_FUI_ANIM_INTERNAL_ROOT_VISUAL_EMENET_H_ + diff --git a/src/ui/inc/FUiAnim_TransformMatrix3Df.h b/src/ui/inc/FUiAnim_TransformMatrix3Df.h new file mode 100644 index 0000000..ef5096f --- /dev/null +++ b/src/ui/inc/FUiAnim_TransformMatrix3Df.h @@ -0,0 +1,202 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_TransformMatrix3Df.h + * @brief Header file of _TransformMatrix3Df class + * + * This file contains declarations _TransformMatrix3Df class. + */ + +#ifndef _FUI_ANIM_INTERNAL_TRANSFORM_MATRIX3DF_H_ +#define _FUI_ANIM_INTERNAL_TRANSFORM_MATRIX3DF_H_ + +#include +#include + +namespace Tizen { namespace Ui { namespace Animations { + +enum Matrix4Type +{ + MATRIX4_Identity, + MATRIX4_Translation, + MATRIX4_Scale, + MATRIX4_Generic +}; + +class _OSP_EXPORT_ _TransformMatrix3Df +{ +public: + _TransformMatrix3Df(void); + ~_TransformMatrix3Df(void); + +public: + void Clear(void); + bool SetTransformMatrix(const Tizen::Graphics::FloatMatrix4& transformMatrix); + Tizen::Graphics::FloatMatrix4 GetTransformMatrix(void) const; + Tizen::Graphics::FloatMatrix4 Interpolate(const _TransformMatrix3Df& transformMatrixFrom, float progress) const; + + void UpdateRotationFromEulerAngles(float x, float y, float z); + + void GetEulerAngles(float& x, float& y, float& z) const; + void GetQuaternion(float& x, float& y, float& z, float& w) const; + void GetRotationAnchor(float& x, float& y, float& z) const; + void SetRotationAnchor(float x, float y, float z); + void GetScaleFactors(float& x, float& y, float& z) const; + void SetScaleFactors(float x, float y, float z); + void GetScaleAnchor(float& x, float& y, float& z) const; + void SetScaleAnchor(float x, float y, float z); + void GetShearFactors(float& xy, float& xz, float& yz) const; + void SetShearFactors(float xy, float xz, float yz); + void GetTranslationFactors(float& x, float& y, float& z) const; + void SetTranslationFactors(float x, float y, float z); + void GetPerspectiveFactors(float& x, float& y, float& z, float& w) const; + void SetPerspectiveFactors(float x, float y, float z, float w); + + Matrix4Type GetMatrixType(void) const + { + return __transformType; + } + +private: + class Vector3Df + { + public: + Vector3Df(void) + : x(0.0f), y(0.0f), z(0.0f) + { + } + + float GetSquaredLength(void) const + { + return ((x * x) + (y * y) + (z * z)); + } + + float GetLength(void) const + { + return (sqrtf(GetSquaredLength())); + } + + void Scale(float newLength) + { + float length = GetLength(); + + if (length != 0.0f) + { + x *= newLength / length; + y *= newLength / length; + z *= newLength / length; + } + } + + float Dot(const Vector3Df& vector3D) const + { + return ((x * vector3D.x) + (y * vector3D.y) + (z * vector3D.z)); + } + + Vector3Df Cross(const Vector3Df& vector3D) const + { + Vector3Df cross; + cross.x = (y * vector3D.z) - (z * vector3D.y); + cross.y = (z * vector3D.x) - (x * vector3D.z); + cross.z = (x * vector3D.y) - (y * vector3D.x); + return cross; + } + + static void Combine(Vector3Df& result, const Vector3Df& a, const Vector3Df& b, float ascl, float bscl) + { + result.x = (ascl * a.x) + (bscl * b.x); + result.y = (ascl * a.y) + (bscl * b.y); + result.z = (ascl * a.z) + (bscl * b.z); + } + + + public: + float x, y, z; + }; + + class Vector4Df + { + public: + Vector4Df(void) + : x(0.0f), y(0.0f), z(0.0f), w(0.0f) + { + } + + Vector4Df Transform(const Tizen::Graphics::FloatMatrix4& m) const + { + Vector4Df outputVector; + + /* + outputVector.x = (pin.x * m.Get(0, 0)) + (pin.y * m.Get(1, 0)) + (pin.z * m.Get(2, 0)) + (pin.w * m.Get(3, 0)); + outputVector.y = (pin.x * m.Get(0, 1)) + (pin.y * m.Get(1, 1)) + (pin.z * m.Get(2, 1)) + (pin.w * m.Get(3, 1)); + outputVector.z = (pin.x * m.Get(0, 2)) + (pin.y * m.Get(1, 2)) + (pin.z * m.Get(2, 2)) + (pin.w * m.Get(3, 2)); + outputVector.w = (pin.x * m.Get(0, 3)) + (pin.y * m.Get(1, 3)) + (pin.z * m.Get(2, 3)) + (pin.w * m.Get(3, 3)); + */ + + outputVector.x = (x * m.matrix[0][0]) + (y * m.matrix[0][1]) + (z * m.matrix[0][2]) + (w * m.matrix[0][3]); + outputVector.y = (x * m.matrix[1][0]) + (y * m.matrix[1][1]) + (z * m.matrix[1][2]) + (w * m.matrix[1][3]); + outputVector.z = (x * m.matrix[2][0]) + (y * m.matrix[2][1]) + (z * m.matrix[2][2]) + (w * m.matrix[2][3]); + outputVector.w = (x * m.matrix[3][0]) + (y * m.matrix[3][1]) + (z * m.matrix[3][2]) + (w * m.matrix[3][3]); + + return outputVector; + } + + public: + float x, y, z, w; + }; + + void DoSlerp(float* result, const float* src1, const float* src2, float t) const; +#if 0 + void CalcEulerAngles(void); +#endif +#if 0 + void V4MulPointByMatrix(const _Vector4Df& pin, const Tizen::Graphics::FloatMatrix4& m, _Vector4Df& pout) const; + float V3SquaredLength(const _Vector3Df& v) const; + float V3Length(const _Vector3Df& v) const; + void V3Scale(_Vector3Df& v, float newlen) const; + float V3Dot(const _Vector3Df& a, const _Vector3Df& b) const; + void V3Combine(const _Vector3Df& a, const _Vector3Df& b, _Vector3Df& result, float ascl, float bscl) const; + void V3Cross(const _Vector3Df& a, const _Vector3Df& b, _Vector3Df& c) const; +#endif + + void UpdateMatrixType(bool fullCheck); + +private: + Matrix4Type __transformType; + bool __usePerspective; + bool __useScale; + bool __useShear; + bool __useRotation; + bool __useTranslation; + + float __scaleX, __scaleY, __scaleZ; + float __shearXY, __shearXZ, __shearYZ; + float __quatX, __quatY, __quatZ, __quatW; + float __translationX, __translationY, __translationZ; + float __perspectiveX, __perspectiveY, __perspectiveZ, __perspectiveW; + + float __rotAnchorX, __rotAnchorY, __rotAnchorZ; + float __scaleAnchorX, __scaleAnchorY, __scaleAnchorZ; + + float __rotX, __rotY, __rotZ; // in degree-unit +}; // _TransformMatrix3Df + +}}} // Tizen::Ui::Animations + +#endif // _FUI_ANIM_INTERNAL_TRANSFORM_MATRIX3DF_H_ + diff --git a/src/ui/inc/FUiAnim_VisualElement.h b/src/ui/inc/FUiAnim_VisualElement.h new file mode 100644 index 0000000..78e2e47 --- /dev/null +++ b/src/ui/inc/FUiAnim_VisualElement.h @@ -0,0 +1,156 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +/** + * @file FUiAnim_VisualElement.h + * @brief This is the header file for the _VisualElement class. + * + * This header file contains declarations of the @e _VisualElement class. + */ +#ifndef _FUIANIM_INTERNAL_VISUAL_ELEMENT_H_ +#define _FUIANIM_INTERNAL_VISUAL_ELEMENT_H_ + +#include +#include "FUi_Colorf.h" + +namespace Tizen { namespace Ui { namespace Animations +{ + +class _OSP_EXPORT_ _VisualElement + : public VisualElement +{ + +public: + /** + * This is the default constructor for this class. + * + * @since 2.0 + */ + _VisualElement(void); + + +protected: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~_VisualElement(void); + +public: + IVisualElementAnimationProvider* GetAnimationProvider(void) const; + + IVisualElementContentProvider* GetContentProvider(void) const; + + IVisualElementEventListener* GetVisualElementEventListener(void) const; + +public: + + /** + * Clones the instance of VisualElement. + * + * @since 2.0 + * @return The pointer to the cloned VisualElement instance. + */ + virtual VisualElement* CloneN(void) const; + + /** + * Gets the current background color of the VisualElement. + * + * @since 2.0 + * @return The background color of the VisualElement. + * @see SetBackgroundColor() + */ + _Colorf GetBackgroundColor(void) const; + + /** + * Changes the background color of the VisualElement. + * + * @since 2.0 + * @return An error code + * @param[in] color The new background color. + * @exception E_SUCCESS The method was successful. + * @see GetBackgroundColor() + * + */ + result SetBackgroundColor(const _Colorf& color); + + + /** + * Sets the custom data of the VisualElement. + * + * @since 2.0 + * @param[in] pUserData data to save. + */ + void SetControlUserData(void* pUserData); + + /** + * Gets the custom data of the VisualElement. + * + * @since 2.0 + */ + void* GetControlUserData(void) const; + + /** + * Gets the top-most child ControlVisualElement indicated by @c point. + * + * @since 2.0 + * @return the child ControlVisualElement indicated by point. + * @param[in] point The position to find the child ControlVisualElement. + */ +// _VisualElement* GetControlChildAtPoint(Tizen::Graphics::FloatPoint& point); + + /** + * Overrides this method to check the element can draw. + * + * @since 2.0 + */ + 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); + + Tizen::Graphics::FloatRectangle GetBoundingBox(void); + result SetZOrder(const VisualElement* pReference, bool above); + + result SetImageSource(const Tizen::Base::String& fileName); + Tizen::Base::String GetImageSource(void) const; + result SetContentOpacity(float contentOpacity); + + result ScrollByPoint(const Tizen::Graphics::FloatPoint& pointOffset, bool scrollSelf); + + result Capture(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& boundsToDraw, bool withChilren); + class _INativeNode* GetNativeNode(void) const; + + _VisualElement* GetPresentation(void); + _VisualElement* GetModel(void); + +protected: + _VisualElement(const _VisualElement& rhs); + + +private: + void* __pUserData; +}; // _VisualElement + +}}} // Tizen::Ui::Animations + +#endif //_FUIANIM_INTERNAL_VISUAL_ELEMENT_H_ + diff --git a/src/ui/inc/FUiAnim_VisualElementCanvas.h b/src/ui/inc/FUiAnim_VisualElementCanvas.h new file mode 100644 index 0000000..279a040 --- /dev/null +++ b/src/ui/inc/FUiAnim_VisualElementCanvas.h @@ -0,0 +1,58 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +/** + * @file FUiAnim_VisualElementCanvas.h + * @brief This is the header file for the _VisualElementCanvas class. + * + * This header file contains the declarations of the _VisualElementCanvas class. + */ + +#ifndef _FUI_ANIM_INTERNAL_VISUAL_ELEMENT_CANVAS_H_ +#define _FUI_ANIM_INTERNAL_VISUAL_ELEMENT_CANVAS_H_ + +#include + +namespace Tizen { namespace Ui { namespace Animations +{ + +/* TBD: from WinCanvas...... new class really needed??? */ +//class _VisualElementCanvas : +// public Tizen::Ui::__WinCanvas +//{ +//}; +class VisualElementSurface; + +class _VisualElementCanvas + : public Tizen::Graphics::Canvas +{ +public: + _VisualElementCanvas(void); + virtual ~_VisualElementCanvas(void); + + result Construct(const VisualElementSurface& surface, const Tizen::Graphics::Rectangle& rectangle); + result Construct(const VisualElementSurface& surface, const Tizen::Graphics::FloatRectangle& rectangle); + +private: + _VisualElementCanvas(const _VisualElementCanvas& rhs); + _VisualElementCanvas& operator =(const _VisualElementCanvas& rhs); + +}; // _VisualElementCanvas + +}}} // Tizen::Ui::Animations + +#endif // _FUI_ANIM_INTERNAL_VISUAL_ELEMENT_CANVAS_H_ + diff --git a/src/ui/inc/FUiAnim_VisualElementCoordinateSystem.h b/src/ui/inc/FUiAnim_VisualElementCoordinateSystem.h new file mode 100644 index 0000000..974481d --- /dev/null +++ b/src/ui/inc/FUiAnim_VisualElementCoordinateSystem.h @@ -0,0 +1,226 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_VisualElementCoordinateSystem.h + * @brief This is the header file for the _VisualElementCoordinateSystem class. + * + * This header file contains the declarations of the _VisualElementCoordinateSystem class. + */ + +#ifndef _FUI_ANIM_INTERNAL_VISUAL_ELEMENT_COORDINATE_SYSTEM_H_ +#define _FUI_ANIM_INTERNAL_VISUAL_ELEMENT_COORDINATE_SYSTEM_H_ + +#include + +namespace Tizen { namespace Ui { namespace Animations +{ + +class _OSP_EXPORT_ _VisualElementCoordinateSystem +{ +public: + static void Initialize(void); + + static void MakeIntegralPoint(float& x, float& y) + { + x = floorf(x + floatIntegralEpsilon); + y = floorf(y + floatIntegralEpsilon); + } + + static void MakeIntegralPoint(float x, float y, int& intX, int& intY) + { + intX = int(floorf(x + floatIntegralEpsilon)); + intY = int(floorf(y + floatIntegralEpsilon)); + } + + static void MakeIntegralDimension(float& width, float& height) + { + width = floorf(width + floatIntegralEpsilon); + height = floorf(height + floatIntegralEpsilon); + } + + static void MakeIntegralDimension(float width, float height, int& intWidth, int& intHeight) + { + intWidth = int(floorf(width + floatIntegralEpsilon)); + intHeight = int(floorf(height + floatIntegralEpsilon)); + } + + static void ConvertDimensionToPhysical(float& width, float& height) + { + if (unlikely(needScale)) + { + width *= scaleFactorX; + height *= scaleFactorY; + } + } + + static void ConvertRectangleToPhysical(float& x, float& y, float& width, float& height) + { + if (unlikely(needScale)) + { + ConvertPointToPhysical(x, y); + ConvertDimensionToPhysical(width, height); + } + } + + static void ConvertDimensionToPhysicalIntegral(float& width, float& height) + { + if (unlikely(needScale)) + { + width *= scaleFactorX; + height *= scaleFactorY; + + // WARNING: + // Because auto-scaling coordinate system of graphics ceils only for down-scaling, we do the same ! + // CHECKME: + // Separate Horz/Vert handling ? + } + + MakeIntegralDimension(width, height); + } + + static void ConvertDimensionToPhysicalIntegral(float width, float height, int& intWidth, int& intHeight) + { + ConvertDimensionToPhysicalIntegral(width, height); + intWidth = static_cast< int >(width); + intHeight = static_cast< int >(height); + } + + static void ConvertRectangleToPhysicalIntegral(float& x, float& y, float& width, float& height) + { + if (unlikely(needScale)) + { + ConvertPointToPhysical(x, y); + ConvertDimensionToPhysical(width, height); + } + + MakeIntegralPoint(x, y); + MakeIntegralDimension(width, height); + } + + static void ConvertDimensionToLogicalIntegral(float& width, float& height) + { + if (unlikely(needScale)) + { + width /= scaleFactorX; + height /= scaleFactorY; + + // WARNING: + // Because auto-scaling coordinate system of graphics ceils only for down-scaling, we do the same ! + // CHECKME: + // Separate Horz/Vert handling ? + } + + MakeIntegralDimension(width, height); + } + + static void ConvertDimensionToLogicalIntegral(float width, float height, int& intWidth, int& intHeight) + { + ConvertDimensionToLogicalIntegral(width, height); + intWidth = static_cast< int >(width); + intHeight = static_cast< int >(height); + } + + static void ConvertRectangleToLogicalIntegral(float& x, float& y, float& width, float& height) + { + if (unlikely(needScale)) + { + ConvertPointToLogical(x, y); + ConvertDimensionToLogical(width, height); + } + + MakeIntegralPoint(x, y); + MakeIntegralDimension(width, height); + } + + static void ConvertDimensionToLogical(float& width, float& height) + { + if (unlikely(needScale)) + { + width /= scaleFactorX; + height /= scaleFactorY; + } + } + + static void ConvertRectangleToLogical(float& x, float& y, float& width, float& height) + { + if (unlikely(needScale)) + { + ConvertPointToLogical(x, y); + ConvertDimensionToLogical(width, height); + } + } + + static void ConvertPointToPhysical(float& x, float& y) + { + if (unlikely(needScale)) + { + x *= scaleFactorX; + y *= scaleFactorY; + } + } + + static void ConvertPointToLogical(float& x, float& y) + { + if (unlikely(needScale)) + { + x /= scaleFactorX; + y /= scaleFactorY; + } + } + + static void MakeLogicalWidthForPhysicalOne(float& width) + { + if (unlikely(needScale)) + { + width = 1.0f / scaleFactorX; + } + else + { + width = 1.0f; + } + } + + static void MakeLogicalHeightForPhysicalOne(float& height) + { + if (unlikely(needScale)) + { + height = 1.0f / scaleFactorY; + } + else + { + height = 1.0f; + } + } + +public: + // WARNING: + // Some float functions like sin and cos emit too-much float-error. + // So, the rounding const must be a bigger value than expected. + static const float floatIntegralEpsilon = 0.01f; + + static bool needScale; + static float scaleFactorX; + static float scaleFactorY; + static int logScreenWidth; + static int logScreenHeight; +}; // _VisualElementCoordinateSystem + +}}} // Tizen::Ui::Animations + +#endif // _FUI_ANIM_INTERNAL_VISUAL_ELEMENT_COORDINATE_SYSTEM_H_ + diff --git a/src/ui/inc/FUiAnim_VisualElementImpl.h b/src/ui/inc/FUiAnim_VisualElementImpl.h new file mode 100644 index 0000000..09fbd64 --- /dev/null +++ b/src/ui/inc/FUiAnim_VisualElementImpl.h @@ -0,0 +1,1382 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_VisualElementImpl.h + * @brief This is the header file for the _VisualElementImpl class. + * + * This header file contains the declarations of the _VisualElementImpl class. + */ + +#ifndef _FUI_ANIM_INTERNAL_VISUAL_ELEMENT_IMPL_H_ +#define _FUI_ANIM_INTERNAL_VISUAL_ELEMENT_IMPL_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "FUi_PropertyBase.h" + +#include "FUiAnim_RootVisualElement.h" +#include "FUiAnim_VisualElementSharedData.h" +#include "FUiAnim_TransformMatrix3Df.h" +#include "FUiAnim_VisualElementCoordinateSystem.h" + +#define SUPPORT_CUSTOMIZING_ATTACH_DETACH_ANIMATION + +namespace Tizen { namespace Ui +{ +class _ControlImpl; +class _ControlManagerImpl; +class _EflUiEventManager; +}} + +namespace Tizen { namespace Ui { namespace Controls +{ +class _FrameImpl; +}}} + +namespace Tizen { namespace Web { namespace Controls +{ +class _WebImpl; +}}} + +namespace Tizen { namespace Ui { namespace Animations +{ + +class IVisualElementAnimationProvider; +class IVisualElementContentProvider; +class IVisualElementEventListener; +class _AnimationManager; +class _IVisualElementCaptureProvider; + +extern const wchar_t* VePropBounds; +extern const wchar_t* VePropContentBounds; +extern const wchar_t* VePropContentOpacity; +extern const wchar_t* VePropRenderOperation; +extern const wchar_t* VePropOpacity; +extern const wchar_t* VePropShowState; +extern const wchar_t* VePropAnchor; +extern const wchar_t* VePropAnchorZ; +extern const wchar_t* VePropTransform; +extern const wchar_t* VePropChildrenTransform; +extern const wchar_t* VePropZPosition; +extern const wchar_t* VePropZOrderGroup; +extern const wchar_t* VePropClipToParent; +extern const wchar_t* VePropClipChildren; +extern const wchar_t* VePropName; +extern const wchar_t* VePropSurfaceOpaque; +extern const wchar_t* VePropPropertyPropagationEnabled; +extern const wchar_t* VePropImplicitAnimationEnabled; + +#if defined(SUPPORT_CUSTOMIZING_ATTACH_DETACH_ANIMATION) +extern const wchar_t* VePropActionDetach; +extern const wchar_t* VePropActionInsert; +#endif + +extern const wchar_t* VeSubPropBounds; +extern const wchar_t* VeSubPropBoundsPosition; +extern const wchar_t* VeSubPropBoundsSize; + +extern const wchar_t* VeSubPropTransform; +extern const wchar_t* VeSubPropTransformRotationX; +extern const wchar_t* VeSubPropTransformRotationY; +extern const wchar_t* VeSubPropTransformRotationZ; +extern const wchar_t* VeSubPropTransformScaleX; +extern const wchar_t* VeSubPropTransformScaleY; +extern const wchar_t* VeSubPropTransformScaleZ; +extern const wchar_t* VeSubPropTransformTranslationX; +extern const wchar_t* VeSubPropTransformTranslationY; +extern const wchar_t* VeSubPropTransformTranslationZ; +extern const wchar_t* VeSubPropTransformRotationAnchorX; +extern const wchar_t* VeSubPropTransformRotationAnchorY; +extern const wchar_t* VeSubPropTransformRotationAnchorZ; +extern const wchar_t* VeSubPropTransformScaleAnchorX; +extern const wchar_t* VeSubPropTransformScaleAnchorY; +extern const wchar_t* VeSubPropTransformScaleAnchorZ; + +extern const wchar_t* VeSubPropTransformRotationXY; +extern const wchar_t* VeSubPropTransformScaleXY; +extern const wchar_t* VeSubPropTransformTranslationXY; +extern const wchar_t* VeSubPropTransformRotationAnchorXY; +extern const wchar_t* VeSubPropTransformScaleAnchorXY; + +extern const wchar_t* VeSubPropChildrenTransform; +extern const wchar_t* VeSubPropChildrenTransformRotationX; +extern const wchar_t* VeSubPropChildrenTransformRotationY; +extern const wchar_t* VeSubPropChildrenTransformRotationZ; +extern const wchar_t* VeSubPropChildrenTransformScaleX; +extern const wchar_t* VeSubPropChildrenTransformScaleY; +extern const wchar_t* VeSubPropChildrenTransformScaleZ; +extern const wchar_t* VeSubPropChildrenTransformTranslationX; +extern const wchar_t* VeSubPropChildrenTransformTranslationY; +extern const wchar_t* VeSubPropChildrenTransformTranslationZ; +extern const wchar_t* VeSubPropChildrenTransformRotationAnchorX; +extern const wchar_t* VeSubPropChildrenTransformRotationAnchorY; +extern const wchar_t* VeSubPropChildrenTransformRotationAnchorZ; +extern const wchar_t* VeSubPropChildrenTransformScaleAnchorX; +extern const wchar_t* VeSubPropChildrenTransformScaleAnchorY; +extern const wchar_t* VeSubPropChildrenTransformScaleAnchorZ; + +extern const wchar_t* VeSubPropChildrenTransformRotationXY; +extern const wchar_t* VeSubPropChildrenTransformScaleXY; +extern const wchar_t* VeSubPropChildrenTransformTranslationXY; +extern const wchar_t* VeSubPropChildrenTransformRotationAnchorXY; +extern const wchar_t* VeSubPropChildrenTransformScaleAnchorXY; + +extern const wchar_t* VePrivPropShowOpacity; + + +extern Tizen::Base::String* pVePropBounds; +extern Tizen::Base::String* pVePropContentBounds; +extern Tizen::Base::String* pVePropContentOpacity; +extern Tizen::Base::String* pVePropRenderOperation; +extern Tizen::Base::String* pVePropOpacity; +extern Tizen::Base::String* pVePropShowState; +extern Tizen::Base::String* pVePropAnchor; +extern Tizen::Base::String* pVePropAnchorZ; +extern Tizen::Base::String* pVePropTransform; +extern Tizen::Base::String* pVePropChildrenTransform; +extern Tizen::Base::String* pVePropZPosition; +extern Tizen::Base::String* pVePropZOrderGroup; +extern Tizen::Base::String* pVePropClipToParent; +extern Tizen::Base::String* pVePropClipChildren; +extern Tizen::Base::String* pVePropName; +extern Tizen::Base::String* pVePropSurfaceOpaque; +extern Tizen::Base::String* pVePropPropertyPropagationEnabled; +extern Tizen::Base::String* pVePropImplicitAnimationEnabled; + +#if defined(SUPPORT_CUSTOMIZING_ATTACH_DETACH_ANIMATION) +extern Tizen::Base::String* pVePropActionDetach; +extern Tizen::Base::String* pVePropActionAttach; +#endif + +extern Tizen::Base::String* pVeSubPropBounds; +extern Tizen::Base::String* pVeSubPropBoundsPosition; +extern Tizen::Base::String* pVeSubPropBoundsSize; + +extern Tizen::Base::String* pVeSubPropTransform; +extern Tizen::Base::String* pVeSubPropTransformRotationX; +extern Tizen::Base::String* pVeSubPropTransformRotationY; +extern Tizen::Base::String* pVeSubPropTransformRotationZ; +extern Tizen::Base::String* pVeSubPropTransformScaleX; +extern Tizen::Base::String* pVeSubPropTransformScaleY; +extern Tizen::Base::String* pVeSubPropTransformScaleZ; +extern Tizen::Base::String* pVeSubPropTransformTranslationX; +extern Tizen::Base::String* pVeSubPropTransformTranslationY; +extern Tizen::Base::String* pVeSubPropTransformTranslationZ; +extern Tizen::Base::String* pVeSubPropTransformRotationAnchorX; +extern Tizen::Base::String* pVeSubPropTransformRotationAnchorY; +extern Tizen::Base::String* pVeSubPropTransformRotationAnchorZ; +extern Tizen::Base::String* pVeSubPropTransformScaleAnchorX; +extern Tizen::Base::String* pVeSubPropTransformScaleAnchorY; +extern Tizen::Base::String* pVeSubPropTransformScaleAnchorZ; + +extern Tizen::Base::String* pVeSubPropTransformRotationXY; +extern Tizen::Base::String* pVeSubPropTransformScaleXY; +extern Tizen::Base::String* pVeSubPropTransformTranslationXY; +extern Tizen::Base::String* pVeSubPropTransformRotationAnchorXY; +extern Tizen::Base::String* pVeSubPropTransformScaleAnchorXY; + +extern Tizen::Base::String* pVeSubPropChildrenTransform; +extern Tizen::Base::String* pVeSubPropChildrenTransformRotationX; +extern Tizen::Base::String* pVeSubPropChildrenTransformRotationY; +extern Tizen::Base::String* pVeSubPropChildrenTransformRotationZ; +extern Tizen::Base::String* pVeSubPropChildrenTransformScaleX; +extern Tizen::Base::String* pVeSubPropChildrenTransformScaleY; +extern Tizen::Base::String* pVeSubPropChildrenTransformScaleZ; +extern Tizen::Base::String* pVeSubPropChildrenTransformTranslationX; +extern Tizen::Base::String* pVeSubPropChildrenTransformTranslationY; +extern Tizen::Base::String* pVeSubPropChildrenTransformTranslationZ; +extern Tizen::Base::String* pVeSubPropChildrenTransformRotationAnchorX; +extern Tizen::Base::String* pVeSubPropChildrenTransformRotationAnchorY; +extern Tizen::Base::String* pVeSubPropChildrenTransformRotationAnchorZ; +extern Tizen::Base::String* pVeSubPropChildrenTransformScaleAnchorX; +extern Tizen::Base::String* pVeSubPropChildrenTransformScaleAnchorY; +extern Tizen::Base::String* pVeSubPropChildrenTransformScaleAnchorZ; + +extern Tizen::Base::String* pVeSubPropChildrenTransformRotationXY; +extern Tizen::Base::String* pVeSubPropChildrenTransformScaleXY; +extern Tizen::Base::String* pVeSubPropChildrenTransformTranslationXY; +extern Tizen::Base::String* pVeSubPropChildrenTransformRotationAnchorXY; +extern Tizen::Base::String* pVeSubPropChildrenTransformScaleAnchorXY; + +extern Tizen::Base::String* pVePrivPropShowOpacity; + + +/** +* @class _VisualElementImpl +* @brief This class provides methods to control VisualElement. +* @since 2.0 +*/ + + +class _OSP_EXPORT_ _VisualElementImpl + : public Tizen::Ui::_PropertyBase +{ + DECLARE_CLASS_BEGIN(_VisualElementImpl, Tizen::Ui::_PropertyBase); + DECLARE_PROPERTY(VePropBounds, GetBoundsProperty, SetBoundsProperty); + DECLARE_PROPERTY(VeSubPropBoundsPosition, GetBoundsPositionSubProperty, SetBoundsPositionSubProperty); + DECLARE_PROPERTY(VeSubPropBoundsSize, GetBoundsSizeSubProperty, SetBoundsSizeSubProperty); + DECLARE_PROPERTY(VePropRenderOperation, GetRenderOperationProperty, SetRenderOperationProperty); + DECLARE_PROPERTY(VePropContentBounds, GetContentBoundsProperty, SetContentBoundsProperty); + DECLARE_PROPERTY(VePropContentOpacity, GetContentOpacityProperty, SetContentOpacityProperty); + DECLARE_PROPERTY(VePropOpacity, GetOpacityProperty, SetOpacityProperty); + DECLARE_PROPERTY(VePropShowState, GetShowStateProperty, SetShowStateProperty); + DECLARE_PROPERTY(VePropAnchor, GetAnchorProperty, SetAnchorProperty); + DECLARE_PROPERTY(VePropAnchorZ, GetAnchorZProperty, SetAnchorZProperty); + DECLARE_PROPERTY(VePropTransform, GetTransformMatrixProperty, SetTransformMatrixProperty); + DECLARE_PROPERTY(VeSubPropTransformRotationX, GetTransformRotationXSubProperty, SetTransformRotationXSubProperty); + DECLARE_PROPERTY(VeSubPropTransformRotationY, GetTransformRotationYSubProperty, SetTransformRotationYSubProperty); + DECLARE_PROPERTY(VeSubPropTransformRotationZ, GetTransformRotationZSubProperty, SetTransformRotationZSubProperty); + DECLARE_PROPERTY(VeSubPropTransformRotationAnchorXY, GetTransformRotationAnchorXYSubProperty, SetTransformRotationAnchorXYSubProperty); + DECLARE_PROPERTY(VeSubPropTransformRotationXY, GetTransformRotationXYSubProperty, SetTransformRotationXYSubProperty); + DECLARE_PROPERTY(VeSubPropTransformScaleX, GetTransformScaleXSubProperty, SetTransformScaleXSubProperty); + DECLARE_PROPERTY(VeSubPropTransformScaleY, GetTransformScaleYSubProperty, SetTransformScaleYSubProperty); + DECLARE_PROPERTY(VeSubPropTransformScaleZ, GetTransformScaleZSubProperty, SetTransformScaleZSubProperty); + DECLARE_PROPERTY(VeSubPropTransformScaleAnchorXY, GetTransformScaleAnchorXYSubProperty, SetTransformScaleAnchorXYSubProperty); + DECLARE_PROPERTY(VeSubPropTransformScaleXY, GetTransformScaleXYSubProperty, SetTransformScaleXYSubProperty); + DECLARE_PROPERTY(VeSubPropTransformTranslationX, GetTransformTranslationXSubProperty, SetTransformTranslationXSubProperty); + DECLARE_PROPERTY(VeSubPropTransformTranslationY, GetTransformTranslationYSubProperty, SetTransformTranslationYSubProperty); + DECLARE_PROPERTY(VeSubPropTransformTranslationZ, GetTransformTranslationZSubProperty, SetTransformTranslationZSubProperty); + DECLARE_PROPERTY(VeSubPropTransformTranslationXY, GetTransformTranslationXYSubProperty, SetTransformTranslationXYSubProperty); + DECLARE_PROPERTY(VePropChildrenTransform, GetChildrenTransformMatrixProperty, SetChildrenTransformMatrixProperty); + DECLARE_PROPERTY(VeSubPropChildrenTransformRotationX, GetChildrenTransformRotationXSubProperty, SetChildrenTransformRotationXSubProperty); + DECLARE_PROPERTY(VeSubPropChildrenTransformRotationY, GetChildrenTransformRotationYSubProperty, SetChildrenTransformRotationYSubProperty); + DECLARE_PROPERTY(VeSubPropChildrenTransformRotationZ, GetChildrenTransformRotationZSubProperty, SetChildrenTransformRotationZSubProperty); + DECLARE_PROPERTY(VeSubPropChildrenTransformRotationAnchorXY, GetChildrenTransformRotationAnchorXYSubProperty, SetChildrenTransformRotationAnchorXYSubProperty); + DECLARE_PROPERTY(VeSubPropChildrenTransformRotationXY, GetChildrenTransformRotationXYSubProperty, SetChildrenTransformRotationXYSubProperty); + DECLARE_PROPERTY(VeSubPropChildrenTransformScaleX, GetChildrenTransformScaleXSubProperty, SetChildrenTransformScaleXSubProperty); + DECLARE_PROPERTY(VeSubPropChildrenTransformScaleY, GetChildrenTransformScaleYSubProperty, SetChildrenTransformScaleYSubProperty); + DECLARE_PROPERTY(VeSubPropChildrenTransformScaleZ, GetChildrenTransformScaleZSubProperty, SetChildrenTransformScaleZSubProperty); + DECLARE_PROPERTY(VeSubPropChildrenTransformScaleAnchorXY, GetChildrenTransformScaleAnchorXYSubProperty, SetChildrenTransformScaleAnchorXYSubProperty); + DECLARE_PROPERTY(VeSubPropChildrenTransformScaleXY, GetChildrenTransformScaleXYSubProperty, SetChildrenTransformScaleXYSubProperty); + DECLARE_PROPERTY(VeSubPropChildrenTransformTranslationX, GetChildrenTransformTranslationXSubProperty, SetChildrenTransformTranslationXSubProperty); + DECLARE_PROPERTY(VeSubPropChildrenTransformTranslationY, GetChildrenTransformTranslationYSubProperty, SetChildrenTransformTranslationYSubProperty); + DECLARE_PROPERTY(VeSubPropChildrenTransformTranslationZ, GetChildrenTransformTranslationZSubProperty, SetChildrenTransformTranslationZSubProperty); + DECLARE_PROPERTY(VeSubPropChildrenTransformTranslationXY, GetChildrenTransformTranslationXYSubProperty, SetChildrenTransformTranslationXYSubProperty); + DECLARE_PROPERTY(VePropZPosition, GetZPositionProperty, SetZPositionProperty); + DECLARE_PROPERTY(VePropZOrderGroup, GetZOrderGroupProperty, SetZOrderGroupProperty); + DECLARE_PROPERTY(VePropClipToParent, GetClipToParentProperty, SetClipToParentProperty); + DECLARE_PROPERTY(VePropClipChildren, GetClipChildrenProperty, SetClipChildrenProperty); + DECLARE_PROPERTY(VePropName, GetNameProperty, SetNameProperty); + DECLARE_PROPERTY(VePropSurfaceOpaque, GetSurfaceOpaqueProperty, SetSurfaceOpaqueProperty); + DECLARE_PROPERTY(VePropImplicitAnimationEnabled, GetImplicitAnimationProperty, SetImplicitAnimationProperty); + DECLARE_PROPERTY(VePropPropertyPropagationEnabled, GetPropertyPropagationProperty, SetPropertyPropagationProperty); + + // private and internal property + DECLARE_PROPERTY(VePrivPropShowOpacity, GetShowOpacityPrivateProperty, SetShowOpacityPrivateProperty); + DECLARE_CLASS_END(); + + +public: + IVisualElementAnimationProvider* GetAnimationProvider(void) const; + + result SetAnimationProvider(IVisualElementAnimationProvider* pProvider); + + IVisualElementContentProvider* GetContentProvider(void) const; + + result SetContentProvider(IVisualElementContentProvider* pProvider); + + IVisualElementEventListener* GetVisualElementEventListener(void) const; + + result SetVisualElementEventListener(IVisualElementEventListener* pListener); + + static _VisualElementImpl* GetInstance(VisualElement& element) + { + return element._pVisualElementImpl; + } + + static const _VisualElementImpl* GetInstance(const VisualElement& element) + { + return element._pVisualElementImpl; + } + + static result FlushI(void); + + static const int Z_ORDER_GROUP_ALWAYS_BELOW_BOTTOM = -1000; // lowest drawing gadget.(Background) + static const int Z_ORDER_GROUP_NORMAL = 0; // level of the default group. + static const int Z_ORDER_GROUP_ALWAYS_ON_TOP = 1000; // highest drawing gadget. + + result SetZOrderGroup(int zorderGroup); + int GetZOrderGroup(void) const; + + VisualElementSurface* GetSurfaceN(void) const; + result SetSurface(const VisualElementSurface* pSurface); + + result SetContentBounds(const Tizen::Graphics::FloatRectangle& contentBounds); + Tizen::Graphics::FloatRectangle GetContentBounds(void) const; + + /** + * Checks whether the back buffer is enabled or not. + * + * @since 2.0 + * @return @c true if the back buffer is enabled @n + * @c false, otherwise + */ + bool GetBackBufferEnabled(void) const; + + /** + * Sets whether the back buffer is enabled or not. + * + * @since 2.0 + * @return An error code. + * @param[in] enabled Set to @c true if need to enable the back buffer @n + * @c false, otherwise + */ + result SetBackBufferEnabled(bool enabled); + + /** + * Checks whether the VisualElement will be redrawn or not when resized. + * + * @since 2.0 + * @return @c true if the VisualElement is redrawn @n + * @c false, otherwise + */ + bool GetRedrawOnResizeEnabled(void) const; + + /** + * Sets whether the VisualElement is redrawn or not when resized. + * + * @since 2.0 + * @return An error code. + * @param[in] enabled Set to @c true if need to redraw the VisualElement when resized @n + * @c false, otherwise + */ + result SetRedrawOnResizeEnabled(bool enabled); + + /** + * Gets the bounding box information of the VisualElement. + * + * @since 2.0 + * @return Rectangular coordinates. + */ + Tizen::Graphics::FloatRectangle GetBoundingBox(void) const; + + Tizen::Graphics::FloatRectangle GetBounds(void) const; + result SetBounds(const Tizen::Graphics::FloatRectangle& bounds); + + float GetZPosition(void) const; + result SetZPosition(float zPosition); + + bool IsVisible(void) const; + bool GetShowState(void) const; + result SetShowState(bool show); + + /** + * Gets the current opacity of the VisualElement. + * + * @since 2.0 + * @return The opacity of the VisualElement. + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @see SetOpacity() + */ + float GetContentOpacity(void) const; + + /** + * Changes the opacity of the VisualElement. + * + * @since 2.0 + * @return An error code + * @param[in] contentOpacity The new opacity. + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @see GetOpacity() + * + */ + result SetContentOpacity(float contentOpacity); + + /** + * Gets absolute opacity of the VisualElement . + * + * @since 2.0 + * @return 0.0 ~ 1.0 multiplied by parent's absolute opacity. + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + float GetOpacityFromRoot(void) const; + + float GetOpacity(void) const; + result SetOpacity(float opacity); + + Tizen::Graphics::FloatPoint GetAnchor(void) const; + result SetAnchor(const Tizen::Graphics::FloatPoint& anchor); + + float GetAnchorZ(void) const; + result SetAnchorZ(float anchorZ); + + Tizen::Graphics::FloatMatrix4 GetTransformMatrix(void) const; + result SetTransformMatrix(const Tizen::Graphics::FloatMatrix4& xform); + + Tizen::Graphics::FloatMatrix4 GetChildrenTransformMatrix(void) const; + result SetChildrenTransformMatrix(const Tizen::Graphics::FloatMatrix4& xform); + + /** + * Checks whether the VisualElement has been clipped to parent or not. + * + * @since 2.0 + * @return @c true, if the VisualElement has been clipped @n + * @c false, otherwise + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @see SetClipToParent() + */ + bool IsClipToParent(void) const; + + /** + * Changes the clipping state of the VisualElement. + * + * @since 2.0 + * @return An error code + * @param[in] clipToParent Set to @c true if need to be clipped to the parent VisualElement @n + * @c false, otherwise + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @see IsClipToParent() + * + */ + result SetClipToParent(bool clipToParent); + + bool IsClipChildrenEnabled(void) const; + result SetClipChildrenEnabled(bool clipChildren); + + /** + * Gets the Root of the VisualElementImpl. + * + * @since 2.0 + * @return The root of the VisualElement + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + _VisualElementImpl* GetRoot(void) const; + + + /** + * Gets the Root of the VisualElement. + * + * @since 2.0 + * @return The root of the VisualElement. The return type is _RootVisualElement. + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + + _RootVisualElement* GetRootPublic(void) const + { + if (unlikely(IsPropsInvalidated(HIERARCHY_PROPERTY_COORDINATES))) + { + const_cast< _VisualElementImpl* >(this)->RebuildCoordinates(); + } + + if (unlikely(!__pRoot)) + return null; + + return dynamic_cast< _RootVisualElement* >(__pRoot->__pPublicInstance); + } + + _VisualElementImpl* GetParent(void) const; + + int GetChildrenCount(void) const; + Tizen::Base::Collection::IList* GetPublicChildrenN(void) const; + + bool IsChildOf(const _VisualElementImpl& element) const; + result SetZOrder(const _VisualElementImpl* pReference, bool above); + + result AddChild(_VisualElementImpl& child); + result InsertChild(_VisualElementImpl& child, const _VisualElementImpl* pReference, bool above); + result RemoveChild(_VisualElementImpl& child, bool deallocate = false); + + Tizen::Base::String GetName(void) const; + result SetName(const Tizen::Base::String& name); + + result SetUserData(void* pUserData); + void* GetUserData(void) const; + + _VisualElementImpl* GetChild(const Tizen::Base::String& name, bool searchAllDescendants) const; + + result SetFlushNeeded(void); + result Flush(void); + result InvalidateRectangle(const Tizen::Graphics::FloatRectangle* pRectangle); + + /** + * Gets the rectangular region information was invalidated. + * + * @since 2.0 + * @return The rectangular region information was invalidated. + */ + Tizen::Graphics::FloatRectangle GetInvalidatedRectangle(void) const; + Tizen::Graphics::FloatRectangle GetUpdateRectangle(void) const; + + /** + * Checks whether the VisualElement is opaque or not. + * + * @since 2.0 + * @return @c true, if the VisualElement is opaque @n + * @c false, otherwise + */ + virtual bool IsOpaque(void) const; + + /** + * Checks whether the surface is opaque or not. + * + * @since 2.0 + * @return @c true, if the surface is opaque @n + * @c false, otherwise + */ + bool IsSurfaceOpaque(void) const; + + /** + * Changes the opaque of the surface. + * + * @since 2.0 + * @return An error code + * @param[in] isSurfaceOpaque The new show state. + * @exception E_SUCCESS The method was successful. + * @see IsSurfaceOpaque() + * + */ + result SetSurfaceOpaque(bool isSurfaceOpaque); + + result Draw(void); + Tizen::Graphics::Canvas* GetCanvasN(void); + Tizen::Graphics::Canvas* GetCanvasN(const Tizen::Graphics::Rectangle& bounds); + Tizen::Graphics::Canvas* GetCanvasN(const Tizen::Graphics::FloatRectangle& bounds); + + /** + * Gets the top-most child VisualElement indicated by @c point. + * + * @since 2.0 + * @return the child VisualElement indicated by point. + * @param[in] point The position to find the child VisualElement. + */ + _VisualElementImpl* GetChildAt(const Tizen::Graphics::FloatPoint& point); + + result ConvertCoordinates(Tizen::Graphics::FloatPoint& point, const _VisualElementImpl* pFromElement) const; + result ConvertCoordinates(Tizen::Graphics::FloatRectangle& rectangle, const _VisualElementImpl* pFromElement) const; + + /** + * Converts the specified four 3-dimensional coordinates @c (x, y, z) in @c pFromVisualElement coordinate space to this instance's coordinate space. + * + * @since 2.0 + * + * @return An error code + * @param[in,out] x The values of X-axis to be converted. + * @param[in,out] y The values of Y-axis to be converted. + * @param[in,out] z The values of Z-axis to be converted. + * @param[in] count The number of coordinates in the @c (x, y, z) array. + * @param[in] pFromVisualElement The %VisualElement instance with @c (x, y, z) in its coordinate space. + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The input parameter is incorrect. + * @exception E_SYSTEM A system error has occurred. + * @remarks This instance and @c pFromVisualElement must share a common parent.@n + * If @c null, it is regarded that the @c point is in the root %c VisualElement(%c Frame) coordinate space. + * @see ConvertCoordinates(Tizen::Graphics::FloatRectangle& rectangle, const VisualElement* pFromVisualElement) + * @see ConvertCoordinates(Tizen::Graphics::FloatPoint& point, const VisualElement* pFromVisualElement) + */ + result ConvertCoordinates(float* x, float* y, float* z, int count, const _VisualElementImpl* pFromElement) const; + + Tizen::Graphics::FloatPoint3 TransformVectorFromOrigin(const Tizen::Graphics::FloatPoint3& originPoint, const _VisualElementImpl* pOriginVisualElement) const; + + result AddAnimation(const Tizen::Base::String* keyName, VisualElementAnimation& animation); + result RemoveAnimation(const Tizen::Base::String& keyName); + + VisualElementAnimation* GetAnimationN(const Tizen::Base::String& keyName) const; + + result RemoveAllAnimations(void); + + /** + * Scrolls the VisualElement. + * + * @since 2.0 + * @param[in] pointOffset The new position to scroll + * @param[in] scrollSelf TBD + * @return An error code + * @exception E_SUCCESS The method was successful. + */ + result ScrollByPoint(const Tizen::Graphics::FloatPoint& pointOffset, bool scrollSelf); + + /** + * Gets the VisualElement for presentation. + * + * @since 2.0 + * @return the VisualElement for presentation. + */ + _VisualElementImpl* GetPresentation(void) const + { + ClearLastResult(); + return __pPresentation; + } + + /** + * Gets the VisualElement for presentation. + * + * @since 2.0 + * @return the VisualElement for presentation. + */ + _VisualElementImpl* GetModel(void) const + { + ClearLastResult(); + return __pModel; + } + + // only using in the control + void SetHidingParentNeeded(bool need) + { + __isHidingParent = need; + if(this == __pModel && __pPresentation) + { + __pPresentation->__isHidingParent = need; + } + } + + + // only using in internal instance( RootVisualElement or Dummy) + void SetInternal(bool internal) + { + __isInternal = internal; + if(this == __pModel && __pPresentation) + { + __pPresentation->__isInternal = internal; + } + } + + /** + * Gets the VisualElement's native node. + * + * @since 2.0 + * @return INativeNode , this value Platform dependency . + */ + class _INativeNode* GetNativeNode(void) const + { + return GetSharedData().pNativeNode; + } + + /** + * This method returned the status that the VisualElement could enable the implicit animation to do. + * + * @since 2.0 + * @return true/false implicit animation enable status. + */ + bool GetImplicitAnimationEnabled(void) const; + + /** + * Set enable or disable the implicit animation of the VisualElement . + * + * @since 2.0 + */ + result SetImplicitAnimationEnabled(bool enable); + + /** + * Checks whether the property propagation is enabled or not. + * + * @since 2.0 + * @return @c true if the property propagation is enabled @n + * @c false, otherwise + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + bool GetPropertyPropagationEnabled(void) const; + + /** + * Sets whether the property propagation is enabled or not. + * + * @since 2.0 + * @return An error code. + * @param[in] enable Set to @c true if need to enable the property propagation @n + * @c false, otherwise + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + result SetPropertyPropagationEnabled(bool enable); + + /** + * This method fill the canvas with the drawn surface. + * + * @since 2.0 + * @param[in] canvas capture target. + * @param[in] boundsToDraw capture region of the VisualElement. + * @param[in] withChildren capture with the children. + * @return An error code + */ + result Capture(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& boundsToDraw, bool withChilren); + result Capture(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& boundsToDraw, const Tizen::Graphics::FloatRectangle& boundsSource, bool withChilren); + //Tizen::Graphics::Bitmap* CaptureBitmapN(bool withChildren = false); + + /** + * This method return stored public VisualElement instance pointer. + * + * @since 2.0 + * @return pointer of the public VisualElement instance. + */ + VisualElement* GetPublic(void) const + { + return __pPublicInstance; + } + + + result SetImageSource(const Tizen::Base::String& filePath); + Tizen::Base::String GetImageSource(void) const; + result SetRenderOperation(VisualElement::RenderOperation renderOperation); + + + /** + * Gets the rendering operation of the VisualElement. + * + * @since 2.0 + * @return The rendering operation of the VisualElement. + * @see SetRenderOperation() + */ + VisualElement::RenderOperation GetRenderOperation(void) const; + + result SetPropertyI(const Tizen::Base::String& property, const Variant& value); + result InvokeOnSetPropertyRequested(const Tizen::Base::String& property, const Variant& value); + + Variant InvokeOnGetPropertyRequested(const Tizen::Base::String& property) const + { + if (__pPublicInstance) + { + return __pPublicInstance->OnGetPropertyRequested(property); + } + + return Variant(); + } + /** + * The hit testing default logic. + * + * @since 2.0 + * @return hit test result. + * @param[in] point hit test position. + * @see InvokeHitTest() + */ + int HitTestI(const Tizen::Graphics::FloatPoint& point); + + + /** + * The creating animation for the property. + * + * @since 2.0 + * @return animation instance for the property. + * @param[in] property property name. + * @see InvokeCreateAnimationForProperty() + */ + VisualElementAnimation* CreateAnimationForPropertyI(const Tizen::Base::String& property); + + // Internal callback functions for Window surface + typedef void (*BoundsChangedCallback)(void*); + void SetBoundsChangedCallback(BoundsChangedCallback pCallback, void* pData); + + typedef void (*DestroyedCallback)(void*); + void SetDestroyedCallback(DestroyedCallback pCallback, void* pData); + + void SetCaptureProvider(_IVisualElementCaptureProvider* pProvider); + _IVisualElementCaptureProvider* GetCaptureProvider(void) const; + +protected: +// virtual _VisualElementImpl* CloneN(void); + + void InvalidateHierarchyProps(int invalidProps, bool broadcastToChildren, bool propagateToParentsOnly); + +private: + _VisualElementImpl(void); + _VisualElementImpl(VisualElement& element); + _VisualElementImpl(VisualElement& presentation, _VisualElementImpl& modelImpl); + virtual ~_VisualElementImpl(void); + _VisualElementImpl& operator =(const _VisualElementImpl& rhs); + + result Construct(void); + void Destroy(void); + + + Variant GetBoundsProperty(void) const; + result SetBoundsProperty(const Variant& v); + + Variant GetBoundsPositionSubProperty(void) const; + result SetBoundsPositionSubProperty(const Variant& v); + + Variant GetBoundsSizeSubProperty(void) const; + result SetBoundsSizeSubProperty(const Variant& v); + + Variant GetZPositionProperty(void) const; + result SetZPositionProperty(const Variant& v); + + Variant GetZOrderGroupProperty(void) const; + result SetZOrderGroupProperty(const Variant& v); + + Variant GetShowStateProperty(void) const; + result SetShowStateProperty(const Variant& v); + + Variant GetShowOpacityPrivateProperty(void) const; + result SetShowOpacityPrivateProperty(const Variant& v); + + Variant GetRenderOperationProperty(void) const; + result SetRenderOperationProperty(const Variant& v); + + Variant GetContentOpacityProperty(void) const; + result SetContentOpacityProperty(const Variant& v); + + Variant GetContentBoundsProperty(void) const; + result SetContentBoundsProperty(const Variant& v); + + Variant GetOpacityProperty(void) const; + result SetOpacityProperty(const Variant& v); + + Variant GetAnchorProperty(void) const; + result SetAnchorProperty(const Variant& v); + + Variant GetAnchorZProperty(void) const; + result SetAnchorZProperty(const Variant& v); + + Variant GetTransformMatrixProperty(void) const; + result SetTransformMatrixProperty(const Variant& v); + + Variant GetTransformRotationXSubProperty(void) const; + result SetTransformRotationXSubProperty(const Variant& v); + + Variant GetTransformRotationYSubProperty(void) const; + result SetTransformRotationYSubProperty(const Variant& v); + + Variant GetTransformRotationZSubProperty(void) const; + result SetTransformRotationZSubProperty(const Variant& v); + + Variant GetTransformRotationXYSubProperty(void) const; + result SetTransformRotationXYSubProperty(const Variant& v); + + Variant GetTransformRotationAnchorXSubProperty(void) const; + result SetTransformRotationAnchorXSubProperty(const Variant& v); + + Variant GetTransformRotationAnchorYSubProperty(void) const; + result SetTransformRotationAnchorYSubProperty(const Variant& v); + + Variant GetTransformRotationAnchorZSubProperty(void) const; + result SetTransformRotationAnchorZSubProperty(const Variant& v); + + Variant GetTransformRotationAnchorXYSubProperty(void) const; + result SetTransformRotationAnchorXYSubProperty(const Variant& v); + + Variant GetTransformScaleXSubProperty(void) const; + result SetTransformScaleXSubProperty(const Variant& v); + + Variant GetTransformScaleYSubProperty(void) const; + result SetTransformScaleYSubProperty(const Variant& v); + + Variant GetTransformScaleZSubProperty(void) const; + result SetTransformScaleZSubProperty(const Variant& v); + + Variant GetTransformScaleXYSubProperty(void) const; + result SetTransformScaleXYSubProperty(const Variant& v); + + Variant GetTransformScaleAnchorXSubProperty(void) const; + result SetTransformScaleAnchorXSubProperty(const Variant& v); + + Variant GetTransformScaleAnchorYSubProperty(void) const; + result SetTransformScaleAnchorYSubProperty(const Variant& v); + + Variant GetTransformScaleAnchorZSubProperty(void) const; + result SetTransformScaleAnchorZSubProperty(const Variant& v); + + Variant GetTransformScaleAnchorXYSubProperty(void) const; + result SetTransformScaleAnchorXYSubProperty(const Variant& v); + + Variant GetTransformTranslationXSubProperty(void) const; + result SetTransformTranslationXSubProperty(const Variant& v); + + Variant GetTransformTranslationYSubProperty(void) const; + result SetTransformTranslationYSubProperty(const Variant& v); + + Variant GetTransformTranslationZSubProperty(void) const; + result SetTransformTranslationZSubProperty(const Variant& v); + + Variant GetTransformTranslationXYSubProperty(void) const; + result SetTransformTranslationXYSubProperty(const Variant& v); + + Variant GetChildrenTransformMatrixProperty(void) const; + result SetChildrenTransformMatrixProperty(const Variant& v); + + Variant GetChildrenTransformRotationXSubProperty(void) const; + result SetChildrenTransformRotationXSubProperty(const Variant& v); + + Variant GetChildrenTransformRotationYSubProperty(void) const; + result SetChildrenTransformRotationYSubProperty(const Variant& v); + + Variant GetChildrenTransformRotationZSubProperty(void) const; + result SetChildrenTransformRotationZSubProperty(const Variant& v); + + Variant GetChildrenTransformRotationXYSubProperty(void) const; + result SetChildrenTransformRotationXYSubProperty(const Variant& v); + + Variant GetChildrenTransformRotationAnchorXSubProperty(void) const; + result SetChildrenTransformRotationAnchorXSubProperty(const Variant& v); + + Variant GetChildrenTransformRotationAnchorYSubProperty(void) const; + result SetChildrenTransformRotationAnchorYSubProperty(const Variant& v); + + Variant GetChildrenTransformRotationAnchorZSubProperty(void) const; + result SetChildrenTransformRotationAnchorZSubProperty(const Variant& v); + + Variant GetChildrenTransformRotationAnchorXYSubProperty(void) const; + result SetChildrenTransformRotationAnchorXYSubProperty(const Variant& v); + + Variant GetChildrenTransformScaleXSubProperty(void) const; + result SetChildrenTransformScaleXSubProperty(const Variant& v); + + Variant GetChildrenTransformScaleYSubProperty(void) const; + result SetChildrenTransformScaleYSubProperty(const Variant& v); + + Variant GetChildrenTransformScaleZSubProperty(void) const; + result SetChildrenTransformScaleZSubProperty(const Variant& v); + + Variant GetChildrenTransformScaleXYSubProperty(void) const; + result SetChildrenTransformScaleXYSubProperty(const Variant& v); + + Variant GetChildrenTransformScaleAnchorXSubProperty(void) const; + result SetChildrenTransformScaleAnchorXSubProperty(const Variant& v); + + Variant GetChildrenTransformScaleAnchorYSubProperty(void) const; + result SetChildrenTransformScaleAnchorYSubProperty(const Variant& v); + + Variant GetChildrenTransformScaleAnchorZSubProperty(void) const; + result SetChildrenTransformScaleAnchorZSubProperty(const Variant& v); + + Variant GetChildrenTransformScaleAnchorXYSubProperty(void) const; + result SetChildrenTransformScaleAnchorXYSubProperty(const Variant& v); + + Variant GetChildrenTransformTranslationXSubProperty(void) const; + result SetChildrenTransformTranslationXSubProperty(const Variant& v); + + Variant GetChildrenTransformTranslationYSubProperty(void) const; + result SetChildrenTransformTranslationYSubProperty(const Variant& v); + + Variant GetChildrenTransformTranslationZSubProperty(void) const; + result SetChildrenTransformTranslationZSubProperty(const Variant& v); + + Variant GetChildrenTransformTranslationXYSubProperty(void) const; + result SetChildrenTransformTranslationXYSubProperty(const Variant& v); + + Variant GetClipToParentProperty(void) const; + result SetClipToParentProperty(const Variant& v); + + Variant GetClipChildrenProperty(void) const; + result SetClipChildrenProperty(const Variant& v); + + Variant GetNameProperty(void) const; + result SetNameProperty(const Variant& v); + + Variant GetSurfaceOpaqueProperty(void) const; + result SetSurfaceOpaqueProperty(const Variant& v); + + Variant GetImplicitAnimationProperty(void) const; + result SetImplicitAnimationProperty(const Variant& v); + + Variant GetPropertyPropagationProperty(void) const; + result SetPropertyPropagationProperty(const Variant& v); + + static void AdjustSizeForSurface(float& width, float& height) + { + _VisualElementCoordinateSystem::MakeIntegralDimension(width, height); + } + + result SetBoundsI(const Tizen::Graphics::FloatRectangle& bounds, bool& sizeChanged); + result SetZPositionI(float zPosition); + result SetShowOpacityI(float showOpacity); + result SetShowStateI(bool show); + result SetContentBoundsI(const Tizen::Graphics::FloatRectangle& contentBounds); + result SetContentOpacityI(float contentOpacity); + result SetOpacityI(float opacity); + result SetAnchorI(const Tizen::Graphics::FloatPoint& anchor); + result SetAnchorZI(float anchorZ); + result SetPropertyPropagationEnabledI(bool enable); + result SetTransformMatrixI(const Tizen::Graphics::FloatMatrix4& xform, bool updateDecomposed = true); + result SetChildrenTransformMatrixI(const Tizen::Graphics::FloatMatrix4& xform, bool updateDecomposed = true); + result SetZOrderGroupI(int zOrderGroup); + + bool CheckIfAnimatable(const Tizen::Base::String& property) const; + bool IsSurfaceNeeded(void) const; + void RebuildSurfaces(void); + void ResetSurfaceIfNeeded(void); + _VisualElementImpl* GetRenderTarget(void) const; + _VisualElementImpl* GetClipSource(void) const + { + if (unlikely(IsPropsInvalidated(HIERARCHY_PROPERTY_COORDINATES))) + { + const_cast< _VisualElementImpl* >(this)->RebuildCoordinates(); + } + + return __pClipSource; + } + + int GetChildIndex(const _VisualElementImpl& child) const; + result RemoveChildWithoutReconfiguring(int indexChild, bool invalidate); + result RemoveAllChild(void); + void RemoveFromParent(void); + + void RebuildNativeNodeTree(_VisualElementImpl& parent); + void ExposeRectangle(const Tizen::Graphics::FloatRectangle* pDirtyRectangle, bool invalidate); + + bool IsVisibleI(void) const + { + if (unlikely(IsPropsInvalidated(HIERARCHY_PROPERTY_COORDINATES | HIERARCHY_PROPERTY_SHOWSTATE | HIERARCHY_PROPERTY_OPACITY | HIERARCHY_PROPERTY_CONTENTOPACITY))) + { + const_cast< _VisualElementImpl* >(this)->RebuildVisibility(); + } + + return __isVisible; + } + + void SetRootNeedsContentUpdate(void) + { + if (unlikely(GetSharedData().childrenInvalidated)) + { + _RootVisualElement* pRoot = GetRootPublic(); + if (likely(pRoot)) + { + pRoot->SetNeedsContentUpdate(true); + } + } + } + + bool IsAncestorDestroying(void) const + { + const _VisualElementImpl* pElement = __pParent; + + while (pElement != null) + { + if (pElement->__isDestroying) + { + return true; + } + + pElement = pElement->GetParent(); + } + + return false; + } + // Presentation update method(observer) + void UpdatePresentationWhenZOrderChanged(const _VisualElementImpl* pReferenceModel, bool above); + result UpdatePresentationWhenCustomPropertyChanged(const Tizen::Base::String& property, const Variant& value); + + // invoke the delegation method. + void InvokeOnConstructed(void); + + void InvokeOnDestructing(void); + + result InvokeOnChildAttaching( _VisualElementImpl& child); + + void InvokeOnChildAttached( _VisualElementImpl& child); + + result InvokeOnChildDetaching( _VisualElementImpl& child); + + void InvokeOnChildDetached( _VisualElementImpl& child); + + result InvokeOnAttaching( _VisualElementImpl& parent); + + void InvokeOnAttached(void); + + result InvokeOnDetaching(void); + + void InvokeOnDetached( _VisualElementImpl& parent); + + result InvokeOnAnimationAdded( const VisualElementAnimation* pAnimation); + + result InvokeOnAnimationRemoved( const VisualElementAnimation* pAnimation); + + void InvokeOnShowStateChanged(bool showState); + + /** + * Called when transform matrix is about to be changed. + * + * @since 2.0 + * @param[in] source VisualElement instance to be changed. + * @param[in,out] newTransform Transform matrix to be applied. + */ + result InvokeOnTransformMatrixChanging(Tizen::Graphics::FloatMatrix4& newTransform); + + /** + * Called when transform matrix is changed. + * + * @since 2.0 + * @param[in] source VisualElement instance changed. + * @param[in] oldTransform The old transform matrix + */ + void InvokeOnTransformMatrixChanged(const Tizen::Graphics::FloatMatrix4& oldTransform); + + /** + * Called when transform matrix for children is about to be changed. + * + * @since 2.0 + * @param[in] source VisualElement instance to be changed. + * @param[in,out] newTransform Transform matrix for children to be applied. + */ + result InvokeOnChildrenTransformMatrixChanging(Tizen::Graphics::FloatMatrix4& newTransform); + + /** + * Called when transform matrix for children is changed. + * + * @since 2.0 + * @param[in] source VisualElement instance changed. + * @param[in] oldTransform The old transform matrix + */ + void InvokeOnChildrenTransformMatrixChanged(const Tizen::Graphics::FloatMatrix4& oldTransform); + + /** + * Called when bounds is about to be changed. + * + * @since 2.0 + * @param[in] source VisualElement instance to be changed. + * @param[in,out] newBounds The new bounds + */ + result InvokeOnBoundsChanging(Tizen::Graphics::FloatRectangle& newBounds); + + /** + * Called when bounds is changed. + * + * @since 2.0 + * @param[in] source VisualElement instance changed. + * @param[in] oldBounds The old bounds + */ + void InvokeOnBoundsChanged(const Tizen::Graphics::FloatRectangle& oldBounds); + + /** + * For checking that point is in the VisualElement region. + * + * @since 2.0 + * @param[in] point the point to check in self coordinate system. + * + */ + int InvokeHitTest(const Tizen::Graphics::FloatPoint& point); + + + /** + * Overrides this method to check the element can draw. + * + * @since 2.0 + */ + bool InvokePrepareDraw(void); + + /** + * Overrides this method to provide user-specific draw code. + * + * @since 2.0 + */ + void InvokeOnDraw( Tizen::Graphics::Canvas& canvas); + + /** + * Overrides this method to provide user-specific implicit animation. + * + * return return _Animation instance for the specified property, or null to disable implcit animation for the property. + * @since 2.0 + */ + VisualElementAnimation* InvokeCreateAnimationForProperty(const Tizen::Base::String& property); + + VisualElement* CreateElementForImplicitAnimationN(void) const; + result CreateElementTreeForDetachImplicitAnimation(_VisualElementImpl& child); + + Tizen::Graphics::FloatRectangle GetVisibleRect(void) const; + Tizen::Graphics::FloatRectangle GetDrawableRect(void) const; + + const Tizen::Graphics::FloatRectangle& GetBoundingBoxI(void) const; + const Tizen::Graphics::FloatMatrix4& GetMatrixToSuper(void) const; + const Tizen::Graphics::FloatMatrix4& GetMatrixToTop(void) const; + const Tizen::Graphics::FloatMatrix4& GetMatrixFromTop(void) const; + Tizen::Graphics::FloatMatrix4 CalcMatrixToBase(const _VisualElementImpl& base) const; + const Tizen::Graphics::FloatMatrix4& GetMatrixToClipSource(void) const; + + void DrawRectangleIfNeeded(const Tizen::Graphics::FloatRectangle& drawRect); + void DrawRectangle(const Tizen::Graphics::FloatRectangle& drawRect); + result DrawForAnimation(void); + + void LockInvalidate(bool lock); + void InvalidateHierarchyPropsDownward(int invalidProps, bool broadcastToChildren, bool propagateToParentsOnly); + void InvalidateVisibleRectToRenderTarget(const Tizen::Graphics::FloatRectangle* pDirtyRectangle); + void RebuildCoordinates(void); + void RebuildVisibility(void); + void RebuildHierarchyProps(int props, bool checkSurface, bool reconfSurfaceOnly); + void UpdateHierarchyProps(void); + void FlushNativeChanges(void); + + void SetSurfaceChanged(void); + + bool IsPropsInvalidated(int props) const + { + return (__invalidatedProps & props) != 0; + } + + void SetPropsValidaty(int validProps, int invalidProps) + { + __invalidatedProps &= ~validProps; + __invalidatedProps |= invalidProps; + + if (this == __pPresentation) + GetSharedData().invalidatedNativeProps |= invalidProps; + } + + bool IsDrawingObject(void) const + { + return (this == __pModel); + } + + result InvalidateRectangleI(const Tizen::Graphics::FloatRectangle* pRectangle); + + int GetZOrderGroupIndex(int orderGroup, int& begin, int& end) const; + result ChangeZOrder(_VisualElementImpl& child, const _VisualElementImpl* pReference, bool above, int zorderGroup); + + _VisualElementImpl* GetChildAtPointI(const Tizen::Graphics::FloatPoint& point, int parentHitTest); + + result AddAnimationI(const Tizen::Base::String* pKeyName, VisualElementAnimation& animation); + result AddAnimationGroupI(const Tizen::Base::String* pKeyName, VisualElementAnimation& animation); + + result CaptureI(Tizen::Graphics::Canvas& outputCanvas, const Tizen::Graphics::FloatRectangle& rectDest, _VisualElementImpl& reference, const Tizen::Graphics::FloatRectangle& clipRect, bool withChilren, int depth); + result CaptureI(Tizen::Graphics::Canvas& outputCanvas, const Tizen::Graphics::FloatRectangle& rectDest, _VisualElementImpl& reference, const Tizen::Graphics::FloatRectangle& rectRef, const Tizen::Graphics::FloatRectangle& clipRect, bool withChilren, int depth); + + _VisualElementSharedData& GetSharedData(void) const + { + return *__pSharedData; + } + + bool CreateImplicitAnimationIfNeeded(const Tizen::Base::String& property, const Variant& newValue, const Variant& currentPresntationValue, const Tizen::Base::String** pSubList); + +public: + enum + { + HITTEST_NOWHERE = 0, + HITTEST_NOMORECHILDREN = 1, + HITTEST_MATCH = 2 + }; + +protected: + enum { + HIERARCHY_PROPERTY_COORDINATES = 0x01, + HIERARCHY_PROPERTY_OPACITY = 0x02, + HIERARCHY_PROPERTY_SHOWSTATE = 0x04, + HIERARCHY_PROPERTY_CONTENTOPACITY = 0x08, + HIERARCHY_PROPERTY_NATIVENODE = HIERARCHY_PROPERTY_CONTENTOPACITY, + HIERARCHY_PROPERTY_CONTENTBOUNDS = 0x40, + HIERARCHY_PROPERTY_MASK = 0x4F + }; + + int _zOrderGroup; + +private: + _VisualElementSharedData* __pSharedData; + _VisualElementImpl* __pParent; + _VisualElementImpl* __pModel; + _VisualElementImpl* __pPresentation; + +// _RootVisualElement* __pRoot; + _VisualElementImpl* __pRoot; + bool __isRoot; + bool __isVisible; + float __showOpacity; + + bool __needRecreateSurface; + + Tizen::Graphics::FloatRectangle __bounds; + Tizen::Graphics::FloatDimension __alignedSize; + Tizen::Graphics::FloatRectangle __contentBounds; + bool __useContentBounds; + float __zPosition; + float __contentOpacity; + float __opacity; + Tizen::Graphics::FloatPoint __anchor; + float __anchorZ; + Tizen::Graphics::FloatMatrix4 __transform; + _TransformMatrix3Df __decomposedTransform; + Tizen::Graphics::FloatMatrix4 __childrenTransform; + _TransformMatrix3Df __decomposedChildrenTransform; + + unsigned int __childrenNeedsUpdateProps; + unsigned int __invalidatedProps; + + bool __matrixFromTopValid; + bool __matrixFromTopInvertible; + bool __matrixToSuperValid; + bool __matrixToTopValid; + bool __matrixToClipSourceValid; + bool __boundingBoxValid; + bool __visibleRectValid; + bool __needTransform; + bool __needClipForUntransformed; + bool __isImplicitAnimationEnabled; + + bool __isClipChildren; + + Tizen::Graphics::FloatRectangle __boundingBox; + Tizen::Graphics::FloatRectangle __boundingBoxToClipSource; + Tizen::Graphics::FloatMatrix4 __matrixToSuper; + Tizen::Graphics::FloatMatrix4 __matrixToTop; + Tizen::Graphics::FloatMatrix4 __matrixFromTop; + Tizen::Graphics::FloatMatrix4 __matrixToClipSource; + _VisualElementImpl* __pClipSource; + + Tizen::Graphics::FloatRectangle __visibleRect; + + bool __isPropertyPropagationEnabled; + bool __isDestroying; + bool __isHidingParent; + bool __isInternal; + bool __isAllowedTreeModification; + + class ChildrenListT : public Tizen::Base::Collection::ArrayListT<_VisualElementImpl*> + { + public: + _VisualElementImpl* GetChildAt(int index) const + { + _VisualElementImpl* pChild = null; + if (likely(GetAt(index, pChild) == E_SUCCESS)) + return pChild; + + return null; + } + }; + + ChildrenListT __children; + + VisualElement* __pPublicInstance; // for public class instance pointer + + Tizen::Base::String __imageFilePath; + VisualElement::RenderOperation __renderOperation; + + BoundsChangedCallback __pBoundsChangedCallback; + void* __pBoundsChangedCallbackData; + + DestroyedCallback __pDestroyedCallback; + void* __pDestroyedCallbackData; + + _IVisualElementCaptureProvider* __pCaptureProvider; + + friend class _VeDebug; + friend class _EflNode; + friend class _VisualElementModelObserver; + friend class VisualElement; + friend class _VisualElement; + friend class _ControlVisualElement; + friend class _RootVisualElement; + friend class _AnimationManager; + friend class _TransactionNode; + friend class _DisplayManager; +}; // _VisualElementImpl + +}}} // Tizen::Ui::Animations + +#endif //_FUI_ANIM_INTERNAL_VISUAL_ELEMENT_IMPL_H_ + diff --git a/src/ui/inc/FUiAnim_VisualElementSharedData.h b/src/ui/inc/FUiAnim_VisualElementSharedData.h new file mode 100644 index 0000000..a4e1891 --- /dev/null +++ b/src/ui/inc/FUiAnim_VisualElementSharedData.h @@ -0,0 +1,107 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_VisualElementSharedData.h + * @brief This is the header file for the _VisualElementSharedData class. + * + * This header file contains the declarations of the _VisualElementSharedData class. + */ + +#ifndef _FUI_ANIM_INTERNAL_VISUAL_ELEMENT_SHAREDDATA_H_ +#define _FUI_ANIM_INTERNAL_VISUAL_ELEMENT_SHAREDDATA_H_ + +#include + +#include "FUiAnim_INativeNode.h" + + +namespace Tizen { namespace Ui { namespace Animations +{ + +class IVisualElementAnimationProvider; +class IVisualElementContentProvider; +class IVisualElementEventListener; +class _NativeLayer; +class _OSP_EXPORT_ _VisualElementSharedData +{ +public: + _VisualElementSharedData(void); + virtual ~_VisualElementSharedData(void); + + result Construct(void); + + virtual void AddRef(void); + virtual void Release(void); + int GetReferenceCount(void) const; + + void LockInvalidate(bool lock); + result NodeReconfigure(_VisualElementImpl& presentation, bool surfaceOnly) + { + ClearLastResult(); + SysTryReturn(NID_UI, pNativeNode, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] The Native Node is not valid."); + + return pNativeNode->Reconfigure(pSurface, presentation, surfaceOnly); + } + + result CreateSurface(const Tizen::Graphics::FloatDimension& size, _NativeLayer& layer); + void RemoveSurface(_VisualElementImpl& presentation); + result SetImage(const Tizen::Base::String& fileName); + Tizen::Base::String GetImage(void); + + bool NeedNativeReconfigure(void) const + { + return (invalidatedNativeProps != 0 || childrenSurfaceChanged); + } + + +public: + int invalidatedNativeProps; + bool childrenInvalidated; + bool childrenSurfaceChanged; + bool surfaceChanged; + _INativeNode* pNativeNode; + VisualElementSurface* pSurface; + Tizen::Graphics::FloatRectangle invalidatedRegion; + bool needSurface; + bool redrawOnResize; + bool isSurfaceOpaque; + bool fixedSurfaceSize; + int invalidationLockCount; + Tizen::Graphics::FloatRectangle updateRegion; + + IVisualElementAnimationProvider* pAnimationProvider; + IVisualElementContentProvider* pContentProvider; + IVisualElementEventListener* pEventListener; + + Tizen::Base::String name; + + void* pUserData; + +private: + _VisualElementSharedData(const _VisualElementSharedData& rhs); + _VisualElementSharedData& operator =(const _VisualElementSharedData& rhs); + +private: + int __refCount; +}; // _VisualElementSharedData + + +}}} // Tizen::Ui::Animations + +#endif //_FUI_ANIM_INTERNAL_VISUAL_ELEMENT_SHAREDDATA_H_ + diff --git a/src/ui/inc/FUiAnim_VisualElementSurfaceImpl.h b/src/ui/inc/FUiAnim_VisualElementSurfaceImpl.h new file mode 100644 index 0000000..5c4e939 --- /dev/null +++ b/src/ui/inc/FUiAnim_VisualElementSurfaceImpl.h @@ -0,0 +1,107 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_VisualElementSurfaceImpl.h + * @brief This is the header file for the _VisualElementSurfaceImpl class. + * + * This header file contains the declarations of the _VisualElementSurfaceImpl class. + */ + +#ifndef _FUI_ANIM_INTERNAL_VISUAL_ELEMENT_SURFACE_IMPL_H_ +#define _FUI_ANIM_INTERNAL_VISUAL_ELEMENT_SURFACE_IMPL_H_ + +#include +#include +#include +#include +#include + +// CHECKME: Why 'Handle' is 'int' ? no 64-bit support??? :( + +namespace Tizen { namespace Base +{ + class String; +}} // Tizen::Base + +namespace Tizen { namespace Ui { namespace Animations +{ +class DisplayContext; + +class _OSP_EXPORT_ _VisualElementSurfaceImpl + : public Tizen::Base::Object +{ +protected: + _VisualElementSurfaceImpl(const Tizen::Graphics::Dimension& size); + _VisualElementSurfaceImpl(const Tizen::Graphics::FloatDimension& size); + +public: + virtual ~_VisualElementSurfaceImpl(void); + +public: + static VisualElementSurface* CreateSurfaceN(const Handle handle, const Tizen::Graphics::FloatDimension& size); // create public instance + static VisualElementSurface* CreateSurfaceUsingExistingObjectN(const DisplayContext& displayContext, const Handle handle, const Tizen::Graphics::Dimension& size); + static _VisualElementSurfaceImpl* CreateInstanceN(const DisplayContext& displayContext, const Tizen::Graphics::FloatDimension& size); // create internal instance + + virtual Handle GetNativeHandle(void) const = 0; + virtual result SetImage(const Tizen::Base::String& fileName) = 0; + virtual Tizen::Base::String GetImage(void) const = 0; + virtual result GetBufferInfo(Tizen::Graphics::BufferInfo& bufferInfo) const = 0; + virtual Tizen::Graphics::Dimension GetPhysicalSize(void) const = 0; + + Tizen::Graphics::Dimension GetSize(void) const + { + return __logicalSize; + } + + Tizen::Graphics::FloatDimension GetSizeF(void) const + { + return __logicalSizeF; + } + + virtual bool Equals(const Tizen::Base::Object& obj) const; + virtual int GetHashCode(void) const; + + void AddRef(void); + bool Release(void); + int GetReferenceCount(void) const; + + static _VisualElementSurfaceImpl* GetInstance(VisualElementSurface& surface) + { + return surface.__pVisualElementSurfaceImpl; + } + + static const _VisualElementSurfaceImpl* GetInstance(const VisualElementSurface& surface) + { + return surface.__pVisualElementSurfaceImpl; + } + +private: + _VisualElementSurfaceImpl(void); + _VisualElementSurfaceImpl(const _VisualElementSurfaceImpl& rhs); + _VisualElementSurfaceImpl& operator =(const _VisualElementSurfaceImpl& rhs); + +private: + int __refCount; + Tizen::Graphics::Dimension __logicalSize; + Tizen::Graphics::FloatDimension __logicalSizeF; +}; // _VisualElementSurfaceImpl + +}}} // Tizen::Ui::Animations + +#endif // _FUI_ANIM_INTERNAL_VISUAL_ELEMENT_SURFACE_IMPL_H_ + diff --git a/src/ui/inc/FUiCtrl_ActionEvent.h b/src/ui/inc/FUiCtrl_ActionEvent.h new file mode 100644 index 0000000..5ba6841 --- /dev/null +++ b/src/ui/inc/FUiCtrl_ActionEvent.h @@ -0,0 +1,99 @@ +// +// 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_ActionEvent.h + * @brief This is the header file for _ActionEvent class. + * + * This header file contains declaration of _ActionEvent class. + * The ActionEvent class can call listener's method. So, when event occurred, + * application can handle it appropriately. + * + */ +#ifndef _FUI_CTRL_INTERNAL_ACTION_EVENT_H_ +#define _FUI_CTRL_INTERNAL_ACTION_EVENT_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui +{ +class _Control; +} } // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ +/** +* @class _ActionEvent +* @brief This class handles a action event. It is inherited from Event class. +* +* The Window(root of all widgets) class has an instance of the _ActionEvent class as a member variable. +* Applications can register action event listeners through it. When a action event occurred, +* the _ActionEvent class finds listener and calls the appropriate listener's method. +* +*/ +class _ActionEvent + : public Tizen::Base::Runtime::_Event +{ +public: + /** + * This is the default class destructor. + * + */ + virtual ~_ActionEvent(void); + + static _ActionEvent* CreateInstanceN(const Tizen::Ui::_Control& source); + +public: + /** + * This method returns the owner of this event. + * + * @return See the comment above. + */ + const Tizen::Ui::_Control* GetSource(void) const; + +protected: + /** + * This is the default class constructor. + * + * @remarks After creating an instance of this class, you must explicitly call one of + * construction methods to initialize the instance. + * + */ + _ActionEvent(const Tizen::Ui::_Control& source); + + /** + * This method checks the arg and finds out the type of event. After that this method calls appopriate + * listener's method. + * + * @param[in] listener It is a event listener related to this action event. + * @param[in] arg It is an argument-like instance of action event retransmitted to the listener's method + * as an argument. + * + */ + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + +public: + static Tizen::Base::Runtime::IEventArg* CreateActionEventArgN(int actionId); + +private: + const Tizen::Ui::_Control* __pSource; +}; // _ActionEvent + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_ACTION_EVENT_H_ diff --git a/src/ui/inc/FUiCtrl_AdjustmentEvent.h b/src/ui/inc/FUiCtrl_AdjustmentEvent.h new file mode 100644 index 0000000..87631ee --- /dev/null +++ b/src/ui/inc/FUiCtrl_AdjustmentEvent.h @@ -0,0 +1,64 @@ +// +// 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_AdjustmentEvent.h + * @brief This is the header file for _AdjustmentEvent class. + * + * This header file contains declaration of _AdjustmentEvent class. + */ +#ifndef _FUICTRL_ADJUSTMENT_EVENT_H_ +#define _FUICTRL_ADJUSTMENT_EVENT_H_ + +#include +#include + +namespace Tizen { namespace Ui +{ +class _Control; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ +/** +* @class _AdjustmentEvent +* @brief When cursor change occurred. +* +*/ +class _AdjustmentEvent + : public Tizen::Base::Runtime::_Event +{ +public: + virtual ~_AdjustmentEvent(void); + + const Tizen::Ui::_Control* GetSource(void) const; + + static Tizen::Base::Runtime::IEventArg* CreateAdjustmentEventArgN(int adjustment); + static _AdjustmentEvent* CreateInstanceN(const Tizen::Ui::_Control& source); + +protected: + _AdjustmentEvent(const Tizen::Ui::_Control& source); + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + +private: + const Tizen::Ui::_Control* __pSource; + +}; // _AdjustmentEvent + +}}} // Tizen::Ui::Controls + +#endif // _FUICTRL_ADJUSTMENT_EVENT_H_ diff --git a/src/ui/inc/FUiCtrl_Animation.h b/src/ui/inc/FUiCtrl_Animation.h new file mode 100644 index 0000000..b72a9e6 --- /dev/null +++ b/src/ui/inc/FUiCtrl_Animation.h @@ -0,0 +1,106 @@ +// +// 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_Animation.h + * @brief This is the header file for the _Animation class. + * + * This header file contains the declarations of the %_Animation class. + */ +#ifndef _FUI_CTRL_INTERNAL_ANIMATION_H_ +#define _FUI_CTRL_INTERNAL_ANIMATION_H_ + +#include +#include +#include +#include +#include +#include "FUi_Control.h" +#include "FUiCtrl_AnimationEvent.h" +#include "FUiCtrl_IAnimationEventListener.h" + +namespace Tizen { namespace Ui +{ +class _AccessibilityElement; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _AnimationPresenter; + + +class _Animation + : public Tizen::Ui::_Control + , public Tizen::Base::Runtime::ITimerEventListener + , virtual public Tizen::Base::Runtime::IEventListener + , virtual public Tizen::Ui::_IUiEventListener + , virtual public Tizen::Ui::_IUiEventPreviewer +{ + DECLARE_CLASS_BEGIN(_Animation, Tizen::Ui::_Control); + DECLARE_PROPERTY("repeatCount", GetPropertyRepeatCount, SetPropertyRepeatCount); + DECLARE_CLASS_END(); + +public: + _Animation(void); + virtual ~_Animation(void); + + result SetPropertyRepeatCount(const Tizen::Ui::Variant& repeatCount); + Tizen::Ui::Variant GetPropertyRepeatCount(void) const; + + result AddAnimationEventListener(const _IAnimationEventListener& listener); + result RemoveAnimationEventListener(const _IAnimationEventListener& listener); + result SetAnimationFrames(const Tizen::Base::Collection::IList& animationFrames); + void SetImageCount(int imageCount); + result SetRepeatCount(int count); + Tizen::Base::Collection::IList* GetAnimationFrames(void) const; + int GetRepeatCount(void) const; + int GetImageCount(void) const; + int GetCurrentRepeatedCount(void) const; + result Play(void); + result Stop(void); + result Pause(void); + AnimationStatus GetStatus(void) const; + bool IsInternalAnimation(); + + virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer); + virtual void OnDraw(void); + virtual result OnAttachedToMainTree(void); + virtual void OnBoundsChanged(void); + virtual Tizen::Graphics::Canvas* OnCanvasRequestedN(const Tizen::Graphics::FloatRectangle& bounds); + + 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 + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_ANIMATION_H_ diff --git a/src/ui/inc/FUiCtrl_AnimationEvent.h b/src/ui/inc/FUiCtrl_AnimationEvent.h new file mode 100644 index 0000000..d56b4bf --- /dev/null +++ b/src/ui/inc/FUiCtrl_AnimationEvent.h @@ -0,0 +1,64 @@ +// +// 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_AnimationEvent.h + * @brief This is the header file for _AnimationEvent class. + * + * This header file contains declaration of _AnimationEvent class. + * The AnimationEvent class can call listener's method. So, when event occurred, + * application can handle it appropriately. + * + */ +#ifndef _FUI_CTRL_INTERNAL_ANIMATION_EVENT_H_ +#define _FUI_CTRL_INTERNAL_ANIMATION_EVENT_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui +{ +class _Control; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _AnimationEvent + : public Tizen::Base::Runtime::_Event +{ +public: + virtual ~_AnimationEvent(void); + + const Tizen::Ui::_Control* GetSource(void) const; + + static _AnimationEvent* CreateInstanceN(const Tizen::Ui::_Control& source); + static Tizen::Base::Runtime::IEventArg* CreateAnimationEventArgN(void); + +protected: + _AnimationEvent(const Tizen::Ui::_Control& source); + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + +private: + const Tizen::Ui::_Control* __pSource; + +}; // _AnimationEvent + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_ANIMATION_EVENT_H_ diff --git a/src/ui/inc/FUiCtrl_AnimationFrameImpl.h b/src/ui/inc/FUiCtrl_AnimationFrameImpl.h new file mode 100644 index 0000000..8d50332 --- /dev/null +++ b/src/ui/inc/FUiCtrl_AnimationFrameImpl.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 FUiCtrl_AnimationFrameImpl.h + * @brief This is the header file for the _AnimationFrameImpl class. + * + * This header file contains the declarations of the %_AnimationFrameImpl class. + */ +#ifndef _FUI_CTRL_INTERNAL_ANIMATION_FRAME_IMPL_H_ +#define _FUI_CTRL_INTERNAL_ANIMATION_FRAME_IMPL_H_ + +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _AnimationFrameImpl + : public Tizen::Base::Object +{ +public: + _AnimationFrameImpl(void); + _AnimationFrameImpl(const Tizen::Graphics::Bitmap& frame, long duration); + virtual ~_AnimationFrameImpl(void); + +public: + result SetFrame(const Tizen::Graphics::Bitmap& frame); + const Tizen::Graphics::Bitmap* GetFrame(void) const; + result SetDuration(long duration); + long GetDuration(void) const; + +private: + _AnimationFrameImpl(const _AnimationFrameImpl& rhs); + _AnimationFrameImpl& operator =(const _AnimationFrameImpl& rhs); + +private: + Tizen::Graphics::Bitmap* __pFrame; + long __duration; + +}; // _AnimationFrameImpl + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_ANIMATION_FRAME_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_AnimationImpl.h b/src/ui/inc/FUiCtrl_AnimationImpl.h new file mode 100644 index 0000000..2c13bf2 --- /dev/null +++ b/src/ui/inc/FUiCtrl_AnimationImpl.h @@ -0,0 +1,81 @@ +// +// 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_AnimationImpl.h + * @brief This is the header file for the _AnimationImpl class. + * + * This header file contains the declarations of the %_AnimationImpl class. + */ +#ifndef _FUI_CTRL_INTERNAL_ANIMATION_IMPL_H_ +#define _FUI_CTRL_INTERNAL_ANIMATION_IMPL_H_ + +#include +#include "FUi_ControlImpl.h" +#include "FUiCtrl_IAnimationEventListener.h" +#include "FUiCtrl_PublicAnimationEvent.h" +#include "FUiCtrl_Animation.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _AnimationImpl + : public _ControlImpl + , public _IAnimationEventListener + , virtual public Tizen::Base::Runtime::IEventListener +{ + +public: + virtual ~_AnimationImpl(void); + + result SetAnimationFrames(const Tizen::Base::Collection::IList& animationFrames); + void SetImageCount(int imageCount); + result AddAnimationEventListener(Tizen::Ui::IAnimationEventListener& listener); + result RemoveAnimationEventListener(Tizen::Ui::IAnimationEventListener& listener); + result SetRepeatCount(int count); + int GetRepeatCount(void) const; + int GetCurrentRepeatedCount(void) const; + int GetImageCount(void) const; + result Play(void); + result Stop(void); + result Pause(void); + AnimationStatus GetStatus(void) const; + + virtual const char* GetPublicClassName(void) const; + virtual const Animation& GetPublic(void) const; + virtual Animation& GetPublic(void); + virtual const _Animation& GetCore(void) const; + virtual _Animation& GetCore(void); + virtual void OnAnimationStopped(const Tizen::Ui::_Control& source); + + static _AnimationImpl* CreateAnimationImplN(Animation* pControl); + static _AnimationImpl* GetInstance(Animation& animation); + static const _AnimationImpl* GetInstance(const Animation& animation); + +private: + _AnimationImpl(Animation* pPublic, _Animation* pCore); + _AnimationImpl(const _AnimationImpl& rhs); + _AnimationImpl& operator =(const _AnimationImpl& rhs); + +private: + _PublicAnimationEvent* __pPublicAnimationEvent; + +}; // _AnimationImpl + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_ANIMATION_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_AnimationModel.h b/src/ui/inc/FUiCtrl_AnimationModel.h new file mode 100644 index 0000000..d3d353c --- /dev/null +++ b/src/ui/inc/FUiCtrl_AnimationModel.h @@ -0,0 +1,64 @@ +// +// 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_AnimationModel.h + * @brief This is the header file for the _AnimationModel class. + * + * This header file contains the declarations of the %_AnimationModel class. + */ +#ifndef _FUI_CTRL_INTERNAL_ANIMATION_MODEL_H_ +#define _FUI_CTRL_INTERNAL_ANIMATION_MODEL_H_ + +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _AnimationModel + : public Tizen::Base::Object +{ +public: + _AnimationModel(void); + virtual ~_AnimationModel(void); + +public: + void SetAnimationStatus(AnimationStatus status); + AnimationStatus GetAnimationStatus(void) const; + void SetImageCount(int imageCount); + int GetImageCount(void) const; + void SetRepeatCount(int repeatCount); + int GetRepeatCount(void) const; + void SetCurrentRepeatedCount(int currentRepeatCount); + int GetCurrentRepeatedCount(void) const; + +private: + _AnimationModel(const _AnimationModel& rhs); + _AnimationModel& operator =(const _AnimationModel& rhs); + +private: + AnimationStatus __animationStatus; + int __imageCount; + int __repeatCount; + int __currentRepeatedCount; + +}; //_AnimationModel + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_ANIMATION_MODEL_H_ diff --git a/src/ui/inc/FUiCtrl_AnimationPresenter.h b/src/ui/inc/FUiCtrl_AnimationPresenter.h new file mode 100644 index 0000000..4ea9f03 --- /dev/null +++ b/src/ui/inc/FUiCtrl_AnimationPresenter.h @@ -0,0 +1,85 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiCtrl_AnimationPresenter.h + * @brief This is the header file for the _AnimationPresenter class. + * + * This header file contains the declarations of the %_AnimationPresenter class. + */ +#ifndef _FUI_CTRL_INTERNAL_ANIMATION_PRESENTER_H_ +#define _FUI_CTRL_INTERNAL_ANIMATION_PRESENTER_H_ + +#include +#include +#include +#include "FUi_ControlImpl.h" +#include "FUiAnim_VisualElement.h" + +namespace Tizen { namespace Ui { namespace Controls +{ +class _Animation; +class _AnimationModel; + + +class _AnimationPresenter + : public Tizen::Base::Object +{ +public: + virtual ~_AnimationPresenter(void); + + result Draw(void); + bool IsTimerExpired(Tizen::Base::Runtime::Timer& timer); + void SetImageCount(int imageCount); + result SetAnimationFrames(const Tizen::Base::Collection::IList* pAnimationFrames); + void SetRepeatCount(int count); + int GetRepeatCount(void) const; + int GetCurrentRepeatedCount(void) const; + int GetImageCount(void) const; + result Play(void); + result Stop(void); + result Pause(void); + AnimationStatus GetStatus(void) const; + virtual Tizen::Graphics::Canvas* OnCanvasRequestedN(const Tizen::Graphics::FloatRectangle& bounds); + static _AnimationPresenter* CreateInstanceN(const _Animation& animation); + +private: + _AnimationPresenter(void); + result Initialize(const _Animation& animation); + + AnimationFrame* GetCurrentFrame(void) const; + AnimationFrame* GetNextFrame(void) const; + result Dispose(void); + + _AnimationPresenter(const _AnimationPresenter& rhs); + _AnimationPresenter& operator =(const _AnimationPresenter& rhs); + +private: + _Animation* __pAnimation; + _AnimationModel* __pAnimationModel; + Tizen::Base::Runtime::Timer* __pTimer; + Tizen::Base::Collection::IEnumerator* __pCurrentFrame; + bool __isTimerRunning; + Tizen::Ui::Animations::_VisualElement* __pVisualElement; + bool __lazyDecode; + bool __isPlayCalledBeforeAttach; + +}; // _AnimationPresenter + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_ANIMATION_PRESENTER_H_ diff --git a/src/ui/inc/FUiCtrl_Button.h b/src/ui/inc/FUiCtrl_Button.h new file mode 100644 index 0000000..db484ad --- /dev/null +++ b/src/ui/inc/FUiCtrl_Button.h @@ -0,0 +1,339 @@ +// +// 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_Button.h + * @brief This is the header file for the _Button class. + * + * This header file contains the declarations of the %_Button class. + */ +#ifndef _FUI_CTRL_INTERNAL_BUTTON_H_ +#define _FUI_CTRL_INTERNAL_BUTTON_H_ + +#include +#include "FUi_Control.h" +#include "FUiCtrl_IActionEventListener.h" +#include "FUiCtrl_ActionEvent.h" + +namespace Tizen { namespace Ui +{ +class _AccessibilityElement; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ +class _ButtonPresenter; + +/** + * @class _Button + * @brief + * @since 2.0 + * + * + * + * + */ +enum _ButtonStatus +{ + _BUTTON_STATUS_NORMAL = 0, + _BUTTON_STATUS_DISABLED, + _BUTTON_STATUS_PRESSED, + _BUTTON_STATUS_HIGHLIGHTED, + _BUTTON_STATUS_SELECTED +}; + +enum _ButtonStyle +{ + _BUTTON_STYLE_NORMAL, + _BUTTON_STYLE_SEGMENT +}; + +class _OSP_EXPORT_ _Button + : public Tizen::Ui::_Control + , public _IPropertyChangeEventListener + , virtual public Tizen::Base::Runtime::IEventListener + , virtual public Tizen::Ui::_IUiEventListener + , virtual public Tizen::Ui::_IUiEventPreviewer +{ + DECLARE_CLASS_BEGIN(_Button, _Control); + DECLARE_PROPERTY("normalColor", GetPropertyNormalColor, SetPropertyNormalColor); + DECLARE_PROPERTY("disabledColor", GetPropertyDisabledColor, SetPropertyDisabledColor); + DECLARE_PROPERTY("pressedColor", GetPropertyPressedColor, SetPropertyPressedColor); + DECLARE_PROPERTY("highlightedColor", GetPropertyHighlightedColor, SetPropertyHighlightedColor); + DECLARE_PROPERTY("selectedColor", GetPropertySelectedColor, SetPropertySelectedColor); + DECLARE_PROPERTY("normalTextColor", GetPropertyNormalTextColor, SetPropertyNormalTextColor); + DECLARE_PROPERTY("disabledTextColor", GetPropertyDisabledTextColor, SetPropertyDisabledTextColor); + DECLARE_PROPERTY("pressedTextColor", GetPropertyPressedTextColor, SetPropertyPressedTextColor); + DECLARE_PROPERTY("highlightedTextColor", GetPropertyHighlightedTextColor, SetPropertyHighlightedTextColor); + DECLARE_PROPERTY("selectedTextColor", GetPropertySelectedTextColor, SetPropertySelectedTextColor); + DECLARE_PROPERTY("text", GetPropertyText, SetPropertyText); + DECLARE_PROPERTY("textSize", GetPropertyTextSize, SetPropertyTextSize); + DECLARE_PROPERTY("actionId", GetPropertyActionId, SetPropertyActionId); + DECLARE_CLASS_END(); + + result SetPropertyNormalColor(const Variant& color); + Variant GetPropertyNormalColor(void) const; + result SetPropertyDisabledColor(const Variant& color); + Variant GetPropertyDisabledColor(void) const; + result SetPropertyPressedColor(const Variant& color); + Variant GetPropertyPressedColor(void) const; + result SetPropertyHighlightedColor(const Variant& color); + Variant GetPropertyHighlightedColor(void) const; + result SetPropertySelectedColor(const Variant& color); + Variant GetPropertySelectedColor(void) const; + + result SetPropertyNormalTextColor(const Variant& color); + Variant GetPropertyNormalTextColor(void) const; + result SetPropertyDisabledTextColor(const Variant& color); + Variant GetPropertyDisabledTextColor(void) const; + result SetPropertyPressedTextColor(const Variant& color); + Variant GetPropertyPressedTextColor(void) const; + result SetPropertyHighlightedTextColor(const Variant& color); + Variant GetPropertyHighlightedTextColor(void) const; + result SetPropertySelectedTextColor(const Variant& color); + Variant GetPropertySelectedTextColor(void) const; + + result SetPropertyText(const Variant& text); + Variant GetPropertyText(void) const; + + result SetPropertyTextSize(const Variant& textSize); + Variant GetPropertyTextSize(void) const; + result SetPropertyActionId(const Variant& actionId); + Variant GetPropertyActionId(void) const; + + virtual void OnPropertyChanging(Tizen::Ui::_PropertyBase& source, const Tizen::Base::String& name, const Variant& oldProperty, const Variant& newProperty); + virtual void OnPropertyChanged(Tizen::Ui::_PropertyBase& source, const Tizen::Base::String& name, const Variant& oldProperty, const Variant& newProperty); + +public: + virtual ~_Button(void); + +public: + static _Button* CreateButtonN(void); + + virtual void OnDraw(void); + virtual result OnAttachedToMainTree(void); + 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 OnTouchMoveHandled(const _Control& control); + virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo); + virtual bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo); + virtual void OnBoundsChanged(void); + virtual void OnFontChanged(Tizen::Graphics::Font* pFont); + virtual void OnFontInfoRequested(unsigned long& style, int& size); + virtual void OnFontInfoRequested(unsigned long& style, float& size); + virtual Tizen::Graphics::FloatDimension GetContentSizeF(bool horizontalMode, bool verticalMode) const; + virtual void OnAncestorEnableStateChanged(const _Control& control); + virtual void OnDrawFocus(void); + virtual void OnChildControlFocusMoved(const _Control& control); + virtual bool IsChildControlFocusManage(void) const; + virtual void OnFocusableStateChanged(bool focusalbeState); + virtual void OnFocusModeStateChanged(void); + virtual bool OnFocusGained(const _Control& source); + virtual bool OnFocusLost(const _Control& source); + virtual Tizen::Graphics::Canvas* OnCanvasRequestedN(const Tizen::Graphics::FloatRectangle& bounds); + +public: + result SetText(const Tizen::Base::String& text); + Tizen::Base::String GetText(void) const; + + result SetColor(_ButtonStatus status, const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetColor(_ButtonStatus status) const; + + result AddActionEventListener(const Tizen::Ui::Controls::_IActionEventListener& listener); + result RemoveActionEventListener(const Tizen::Ui::Controls::_IActionEventListener& listener); + + result SetActionId(int actionId); + int GetActionId(void) const; + + result SetTextHorizontalAlignment(HorizontalAlignment alignment); + HorizontalAlignment GetTextHorizontalAlignment(void) const; + result SetTextVerticalAlignment(VerticalAlignment alignment); + VerticalAlignment GetTextVerticalAlignment(void) const; + + result SetTextColor(_ButtonStatus status, const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetTextColor(_ButtonStatus status) const; + + result SetBitmap(_ButtonStatus status, const Tizen::Graphics::Point& position, const Tizen::Graphics::Bitmap& bitmap); + Tizen::Graphics::Bitmap* GetBitmap(_ButtonStatus status) const; + Tizen::Graphics::Point GetBitmapPosition(_ButtonStatus status) const; + + result SetBitmap(_ButtonStatus status, const Tizen::Graphics::FloatPoint& position, const Tizen::Graphics::Bitmap& bitmap); + Tizen::Graphics::FloatPoint GetBitmapPositionF(_ButtonStatus status) const; + + result SetEffectBitmap(_ButtonStatus status, const Tizen::Graphics::Point& position, const Tizen::Graphics::Bitmap& bitmap); + Tizen::Graphics::Bitmap* GetEffectBitmap(_ButtonStatus status) const; + Tizen::Graphics::Point GetEffectBitmapPosition(_ButtonStatus status) const; + + result SetEffectBitmap(_ButtonStatus status, const Tizen::Graphics::FloatPoint& position, const Tizen::Graphics::Bitmap& bitmap); + Tizen::Graphics::FloatPoint GetEffectBitmapPositionF(_ButtonStatus status) const; + + result SetToolbarItemBackgroundBitmap(_ButtonStatus status, const Tizen::Graphics::Bitmap& bitmap); + Tizen::Graphics::Bitmap* GetToolbarItemBackgroundBitmap(_ButtonStatus status) const; + + result SetUnderlineBitmap(const Tizen::Graphics::Bitmap& bitmap); + Tizen::Graphics::Bitmap* GetUnderlineBitmap(void) const; + + result SetTabTextDimLeftBitmap(const Tizen::Graphics::Bitmap& bitmap); + Tizen::Graphics::Bitmap* GetTabTextDimLeftBitmap(void) const; + + result SetTabTextDimRightBitmap(const Tizen::Graphics::Bitmap& bitmap); + Tizen::Graphics::Bitmap* GetTabTextDimRightBitmap(void) const; + + result SetSubTitleEffectBitmap(const Tizen::Graphics::Bitmap& bitmap); + Tizen::Graphics::Bitmap* GetSubTitleEffectBitmap(void) const; + + result SetBackgroundBitmap(_ButtonStatus status, const Tizen::Graphics::Bitmap& bitmap); + Tizen::Graphics::Bitmap* GetBackgroundBitmap(_ButtonStatus status) const; + + result SetBackgroundEffectBitmap(_ButtonStatus status, const Tizen::Graphics::Bitmap& bitmap); + Tizen::Graphics::Bitmap* GetBackgroundEffectBitmap(_ButtonStatus status) const; + + result SetTextSize(int size, unsigned long fontStyle = Tizen::Graphics::FONT_STYLE_PLAIN); + int GetTextSize(void) const; + + result SetTextSize(float size, unsigned long fontStyle = Tizen::Graphics::FONT_STYLE_PLAIN); + float GetTextSizeF(void) const; + + result SetButtonStyle(_ButtonStyle buttonStyle); + _ButtonStyle GetButtonStyle(void) const; + + result SetButtonStatus(_ButtonStatus buttonStatus, bool fire = true); + _ButtonStatus GetButtonStatus(void) const; + + result SetTextMaxLine(int textMaxLine); + int GetTextMaxLine(void) const; + + result UnloadBackgroundBitmap(_ButtonStatus status); + result UnloadBackgroundEffectBitmap(_ButtonStatus status); + bool IsUserBackgroundBitmap(_ButtonStatus status) const; + bool IsUserBackgroundEffectBitmap(_ButtonStatus status) const; + + + result FireActionEvent(void); + + result SetUserDefinedTextArea(const Tizen::Graphics::Rectangle& bounds); + result SetUserDefinedTextArea(const Tizen::Graphics::FloatRectangle& bounds); + Tizen::Graphics::Rectangle GetUserDefinedTextArea(void) const; + Tizen::Graphics::FloatRectangle GetUserDefinedTextAreaF(void) const; + + bool UserDefinedText(void) const; + result ShowUnderlineBitmap(bool show); + + result SetMargin(int leftMargin, int topMargin, int rightMargin, int bottomMargin); + int GetLeftMargin(void) const; + int GetTopMargin(void) const; + int GetRightMargin(void) const; + int GetBottomMargin(void) const; + + result SetMargin(float leftMargin, float topMargin, float rightMargin, float bottomMargin); + float GetLeftMarginF(void) const; + float GetTopMarginF(void) const; + float GetRightMarginF(void) const; + float GetBottomMarginF(void) const; + + Tizen::Graphics::FloatDimension GetContentSizeInternalF(bool horizontalMode, bool verticalMode) const; + int GetTextExtentSize(void) const; + float GetTextExtentSizeF(void) const; + + result SetMultilineTextSize(const Variant& textsize); + float GetMultilineTextSizeF(void) const; + + bool IsMultilineFontSizeSet(void) const; + + result SetTabTextSlide(bool tabTextSlide); + bool IsTabTextSlide(void) const; + bool IsButtonStatusSelected(void) const; + +protected: + result SetPresenter(const _ButtonPresenter& buttonPresenter); + +private: + bool IsTouchAreaChanged(bool currentButtonArea); + void InitializeAccessibilityElement(void); + + _Button(void); + _Button(const _Button& rhs); + _Button& operator =(const _Button& rhs); + +private: + enum + { + NUMBER_OF_BUTTON_STATUS = 5 + }; + +private: + _ButtonPresenter* __pButtonPresenter; + _ActionEvent* __pActionEvent; + + int __actionId; + + Tizen::Base::String __text; + + Tizen::Graphics::Color __textColor[NUMBER_OF_BUTTON_STATUS]; + Tizen::Graphics::Color __color[NUMBER_OF_BUTTON_STATUS]; + + Tizen::Graphics::Bitmap* __pBitmap[NUMBER_OF_BUTTON_STATUS]; + Tizen::Graphics::FloatPoint __bitmapPosition[NUMBER_OF_BUTTON_STATUS]; + + Tizen::Graphics::Bitmap* __pEffectBitmap[NUMBER_OF_BUTTON_STATUS]; + Tizen::Graphics::FloatPoint __effectBitmapPosition[NUMBER_OF_BUTTON_STATUS]; + + Tizen::Graphics::Bitmap* __pToolbarItemBackgroundBitmap[NUMBER_OF_BUTTON_STATUS]; + Tizen::Graphics::Bitmap* __pBackgroundBitmap[NUMBER_OF_BUTTON_STATUS]; + Tizen::Graphics::Bitmap* __pBackgroundEffectBitmap[NUMBER_OF_BUTTON_STATUS]; + Tizen::Graphics::Bitmap* __pUnderlineBitmap; + Tizen::Graphics::Bitmap* __pTabTextDimLeftBitmap; + Tizen::Graphics::Bitmap* __pTabTextDimRightBitmap; + Tizen::Graphics::Bitmap* __pSubTitleEffectBitmap; + + HorizontalAlignment __horizontalAlignment; + VerticalAlignment __verticalAlignment; + + _ButtonStatus __buttonStatus; + _ButtonStyle __buttonStyle; + + float __textSize; + float __multilineFontSize; + int __textMaxLine; + + bool __isSettingMultilineFontSize; + + bool __isUserBackgroundBitmap[NUMBER_OF_BUTTON_STATUS]; + bool __isUserBackgroundEffectBitmap[NUMBER_OF_BUTTON_STATUS]; + + bool __previousTouchArea; + + bool __userDefinedText; + + bool __tabTextSlide; + + float __leftMargin; + float __topMargin; + float __rightMargin; + float __bottomMargin; + + Tizen::Graphics::FloatRectangle __userDefinedTextArea; + + Tizen::Ui::_AccessibilityElement* __pTextElement; + + static const float SENSITIVE = 0.08f; +}; // _Button + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_BUTTON_H_ diff --git a/src/ui/inc/FUiCtrl_ButtonImpl.h b/src/ui/inc/FUiCtrl_ButtonImpl.h new file mode 100644 index 0000000..133ad16 --- /dev/null +++ b/src/ui/inc/FUiCtrl_ButtonImpl.h @@ -0,0 +1,143 @@ +// +// 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_ButtonImpl.h + * @brief This is the header file for the _ButtonImpl class. + * + * This header file contains the declarations of the %_ButtonImpl class. + */ +#ifndef _FUI_CTRL_INTERNAL_BUTTON_IMPL_H_ +#define _FUI_CTRL_INTERNAL_BUTTON_IMPL_H_ + +#include +#include +#include "FUi_ControlImpl.h" +#include "FUiCtrl_Button.h" +#include "FUiCtrl_IActionEventListener.h" +#include "FUiCtrl_PublicActionEvent.h" + +namespace Tizen { namespace Graphics +{ + class Dimension; +}} // Tizen::Graphics + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _ButtonImpl + : public _ControlImpl + , public _IActionEventListener + , virtual public Tizen::Base::Runtime::IEventListener +{ +public: + class ButtonSizeInfo : public _ControlImpl::SizeInfo + { + virtual Tizen::Graphics::Dimension GetDefaultMinimumSize(_ControlOrientation orientation) const; + virtual Tizen::Graphics::FloatDimension GetDefaultMinimumSizeF(_ControlOrientation orientation) const; + }; // ButtonSizeInfo + +public: + virtual ~_ButtonImpl(void); + static _ButtonImpl* CreateButtonImplN(Button* pControl, const Tizen::Graphics::Rectangle& bounds); + static _ButtonImpl* CreateButtonImplN(Button* pControl, const Tizen::Graphics::FloatRectangle& bounds); + + virtual const char* GetPublicClassName(void) const; + virtual const Button& GetPublic(void) const; + virtual Button& GetPublic(void); + virtual const _Button& GetCore(void) const; + virtual _Button& GetCore(void); + +public: + result SetText(const Tizen::Base::String& text); + Tizen::Base::String GetText(void) const; + + result SetColor(ButtonStatus status, const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetColor(ButtonStatus status) const; + + result AddActionEventListener(Tizen::Ui::IActionEventListener& listener); + result RemoveActionEventListener(Tizen::Ui::IActionEventListener& listener); + + result SetActionId(int actionId); + int GetActionId(void) const; + + result SetTextHorizontalAlignment(HorizontalAlignment alignment); + HorizontalAlignment GetTextHorizontalAlignment(void) const; + result SetTextVerticalAlignment(VerticalAlignment alignment); + VerticalAlignment GetTextVerticalAlignment(void) const; + + result SetTextColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetTextColor(void) const; + result SetDisabledTextColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetDisabledTextColor(void) const; + result SetPressedTextColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetPressedTextColor(void) const; + result SetHighlightedTextColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetHighlightedTextColor(void) const; + + result SetNormalBitmap(const Tizen::Graphics::Point& position, const Tizen::Graphics::Bitmap& bitmap); + result SetDisabledBitmap(const Tizen::Graphics::Point& position, const Tizen::Graphics::Bitmap& bitmap); + result SetPressedBitmap(const Tizen::Graphics::Point& position, const Tizen::Graphics::Bitmap& bitmap); + result SetHighlightedBitmap(const Tizen::Graphics::Point& position, const Tizen::Graphics::Bitmap& bitmap); + + result SetNormalBitmap(const Tizen::Graphics::FloatPoint& position, const Tizen::Graphics::Bitmap& bitmap); + result SetDisabledBitmap(const Tizen::Graphics::FloatPoint& position, const Tizen::Graphics::Bitmap& bitmap); + result SetPressedBitmap(const Tizen::Graphics::FloatPoint& position, const Tizen::Graphics::Bitmap& bitmap); + result SetHighlightedBitmap(const Tizen::Graphics::FloatPoint& position, const Tizen::Graphics::Bitmap& bitmap); + + result SetNormalBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap); + result SetDisabledBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap); + result SetPressedBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap); + result SetHighlightedBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap); + + result SetTextSize(int size); + int GetTextSize(void) const; + + result SetTextSize(float size); + float GetTextSizeF(void) const; + + virtual void OnActionPerformed(const Tizen::Ui::_Control& source, int actionId); + virtual result OnAttachedToMainTree(void); + + virtual bool OnTouchPressed(const _ControlImpl& source, const _TouchInfo& touchinfo); + 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 Tizen::Graphics::FloatDimension GetContentSizeF(bool horizontalMode, bool verticalMode) const; + +public: + static const Tizen::Graphics::Color GetColorOnError(void); + + static _ButtonImpl* GetInstance(Button& button); + static const _ButtonImpl* GetInstance(const Button& button); + +protected: + _ButtonStatus ConvertStatus(ButtonStatus status) const; + +private: + _ButtonImpl(Button* pPublic, _Button* pCore); + + _ButtonImpl(const _ButtonImpl& rhs); + _ButtonImpl& operator =(const _ButtonImpl& rhs); + + _PublicActionEvent* __pPublicActionEvent; + +}; // _ButtonImpl + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_BUTTON_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_ButtonItemImpl.h b/src/ui/inc/FUiCtrl_ButtonItemImpl.h new file mode 100644 index 0000000..b4a9593 --- /dev/null +++ b/src/ui/inc/FUiCtrl_ButtonItemImpl.h @@ -0,0 +1,90 @@ +// +// 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_ButtonItemImpl.h + * @brief This is the header file for the %_ButtonItemImpl class. + * + * This header file contains the declarations of the %_ButtonItemImpl class. + */ + +#ifndef _FUI_CTRL_INTERNAL_BUTTON_ITEM_IMPL_H_ +#define _FUI_CTRL_INTERNAL_BUTTON_ITEM_IMPL_H_ + +#include +#include + + +namespace Tizen { namespace Ui { namespace Controls +{ + +static const int BUTTON_ITEM_ACTION_ID_MIN = 0; +static const int BUTTON_ITEM_MAX_STATE_COUNT = 4; + +class _ButtonItemImpl + : public Tizen::Base::Object +{ +public: + _ButtonItemImpl(ButtonItem* pPublic); + + virtual ~_ButtonItemImpl(void); + + static const _ButtonItemImpl* GetInstance(const ButtonItem& buttonItem); + + static _ButtonItemImpl* GetInstance(ButtonItem& buttonItem); + + result Construct(ButtonItemStyle style, int actionId); + + int GetActionId(void) const; + + const Tizen::Graphics::Bitmap* GetBackgroundBitmap(ButtonItemStatus status) const; + + const Tizen::Graphics::Bitmap* GetIcon(ButtonItemStatus status) const; + + Tizen::Base::String GetText(void) const; + + result SetActionId(int actionId); + + result SetBackgroundBitmap(ButtonItemStatus status, const Tizen::Graphics::Bitmap* pBitmap); + + result SetIcon(ButtonItemStatus status, const Tizen::Graphics::Bitmap* pIcon); + + result SetText(const Tizen::Base::String& text); + + void SetAccessibilityHint(const Tizen::Base::String& hint); + +private: + _ButtonItemImpl(const _ButtonItemImpl& buttonItem); + + _ButtonItemImpl& operator =(const _ButtonItemImpl& buttonItem); + + +private: + int __actionId; + ButtonItemStyle __itemStyle; + Tizen::Base::String __itemText; + Tizen::Base::String __accessibilityHint; + const Tizen::Graphics::Bitmap* __pIconBitmap[BUTTON_ITEM_MAX_STATE_COUNT]; + const Tizen::Graphics::Bitmap* __pButtonItemBackgroundBitmap[BUTTON_ITEM_MAX_STATE_COUNT]; + + friend class _FooterImpl; + friend class _HeaderImpl; + +}; + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_BUTTON_ITEM_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_ButtonModel.h b/src/ui/inc/FUiCtrl_ButtonModel.h new file mode 100644 index 0000000..0b53999 --- /dev/null +++ b/src/ui/inc/FUiCtrl_ButtonModel.h @@ -0,0 +1,57 @@ +// +// 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_ButtonModel.h + * @brief This is the header file for the _ButtonModel class. + * + * This header file contains the declarations of the %_ButtonModel class. + */ +#ifndef _FUI_CTRL_INTERNAL_BUTTON_MODEL_H_ +#define _FUI_CTRL_INTERNAL_BUTTON_MODEL_H_ + +#include + +namespace Tizen { namespace Ui { namespace Controls +{ +/** + * @class _ButtonModel + * @brief + * @since 2.0 + * + * + * + * + */ +class _ButtonModel + : public Tizen::Base::Object +{ +public: + _ButtonModel(void); + + virtual ~_ButtonModel(void); + +public: + virtual result Construct(void); + +private: + _ButtonModel(const _ButtonModel& rhs); + _ButtonModel& operator =(const _ButtonModel& rhs); +}; // _ButtonModel + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_BUTTON_MODEL_H_ diff --git a/src/ui/inc/FUiCtrl_ButtonPresenter.h b/src/ui/inc/FUiCtrl_ButtonPresenter.h new file mode 100644 index 0000000..4ccb5fa --- /dev/null +++ b/src/ui/inc/FUiCtrl_ButtonPresenter.h @@ -0,0 +1,142 @@ +// +// 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_ButtonPresenter.h + * @brief This is the header file for the _ButtonPresenter class. + * + * This header file contains the declarations of the %_ButtonPresenter class. + */ +#ifndef _FUI_CTRL_INTERNAL_BUTTON_PRESENTER_H_ +#define _FUI_CTRL_INTERNAL_BUTTON_PRESENTER_H_ + +#include +#include +#include "FUi_Control.h" +#include "FUiCtrl_Button.h" + +namespace Tizen { namespace Ui { namespace Animations +{ +class _VisualElement; +}}} // Tizen::Ui::Animations + +namespace Tizen { namespace Ui { namespace Controls +{ +class _Button; +class _ButtonModel; + +/** + * @class _ButtonPresenter + * @brief + * @since 2.0 + * + * + * + * + */ +class _ButtonPresenter + : public Tizen::Base::Object + , public Tizen::Base::Runtime::ITimerEventListener +{ +public: + _ButtonPresenter(void); + virtual ~_ButtonPresenter(void); + +public: + virtual result Construct(const _Button& button); + virtual result Install(void); + + 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 OnTouchMoveHandled(const _Control& control); + virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo); + virtual bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo); + virtual void OnAncestorEnableStateChanged(const _Control& control); + virtual void OnDrawFocus(void); + virtual void OnChildControlFocusMoved(const _Control& control); + virtual bool IsChildControlFocusManage(void) const; + virtual void OnFocusableStateChanged(bool focusalbeState); + virtual void OnFocusModeStateChanged(void); + virtual bool OnFocusGained(const _Control& source); + virtual bool OnFocusLost(const _Control& source); + virtual Tizen::Graphics::Canvas* OnCanvasRequestedN(const Tizen::Graphics::FloatRectangle& bounds); + virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer); + + void Draw(void); + + void OnFontChanged(Tizen::Graphics::Font* pFont); + void OnFontInfoRequested(unsigned long& style, int& size); + void OnFontInfoRequested(unsigned long& style, float& size); + void SetTextSize(int size, unsigned long fontStyle = Tizen::Graphics::FONT_STYLE_PLAIN); + void SetTextSize(float size, unsigned long fontStyle = Tizen::Graphics::FONT_STYLE_PLAIN); + void SetFontInfo(unsigned long style, int size); + void SetFontInfo(unsigned long style, float size); + + Tizen::Graphics::_Text::TextObject* GetTextObject(void) const; + result InitTextObject(void); + + Tizen::Graphics::Font* GetFont(void) const; + + result ShowUnderlineBitmap(bool show); + +protected: + result SetModel(const _ButtonModel& buttonModel); + +private: + _ButtonPresenter(const _ButtonPresenter& rhs); + _ButtonPresenter& operator =(const _ButtonPresenter& rhs); + + void DrawBackground(void); + void DrawToolbarItemBackground(void); + void DrawBitmap(void); + void DrawText(void); + void DrawUnderlineBitmap(void); + void DrawTabTextDimBitmap(void); + void DrawSubTitleEffectBitmap(void); + + bool IsEnabledStateChanged(void); + + result TimerForTextSlideInit(void); + result TimerForTextSlideStart(void); + result TimerForTextSlideTimeout(void); + +private: + _Button* __pButton; + _ButtonModel* __pButtonModel; + bool __needDraw; + bool __previousEnabledState; + bool __touchMoveHandled; + bool __lazyDecode; + bool __showUnderlineBitmap; + bool __isKeyPressed; + + Tizen::Graphics::Font* __pFont; + Tizen::Graphics::_Text::TextObject* __pTextObject; + + Tizen::Ui::Animations::_VisualElement* __pBase; + unsigned long __fontStyle; + float __fontSize; + + Tizen::Base::Runtime::Timer* __pTextSlideTimer; + Tizen::Graphics::FloatRectangle __textRect; + Tizen::Graphics::Bitmap* __pTextSlideClippedBitmap; +}; // _ButtonPresenter + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_BUTTON_PRESENTER_H_ diff --git a/src/ui/inc/FUiCtrl_CheckButton.h b/src/ui/inc/FUiCtrl_CheckButton.h new file mode 100644 index 0000000..2dc2381 --- /dev/null +++ b/src/ui/inc/FUiCtrl_CheckButton.h @@ -0,0 +1,370 @@ +// +// 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_CheckButton.h + * @brief This is the header file for the _CheckButton class. + * + * This header file contains the declarations of the %_CheckButton class. + */ +#ifndef _FUI_CTRL_INTERNAL_CHECK_BUTTON_H_ +#define _FUI_CTRL_INTERNAL_CHECK_BUTTON_H_ + +#include +#include "FUi_Control.h" +#include "FUiCtrl_IActionEventListener.h" +#include "FUiCtrl_ActionEvent.h" + +namespace Tizen { namespace Ui +{ +class _AccessibilityElement; +class _IAccessibilityListener; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ +class _CheckButtonPresenter; + +/** + * @class _CheckButton + * @brief + * @since 2.0 + * + * + * + * + */ + +enum _CheckButtonStatus +{ + _CHECK_BUTTON_STATUS_NORMAL = 0, + _CHECK_BUTTON_STATUS_DISABLED, + _CHECK_BUTTON_STATUS_PRESSED, + _CHECK_BUTTON_STATUS_HIGHLIGHTED, + _CHECK_BUTTON_STATUS_SELECTED +}; + +class _OSP_EXPORT_ _CheckButton + : public Tizen::Ui::_Control + , virtual public Tizen::Base::Runtime::IEventListener + , virtual public Tizen::Ui::_IUiEventListener + , virtual public Tizen::Ui::_IUiEventPreviewer +{ + DECLARE_CLASS_BEGIN(_CheckButton, _Control); + DECLARE_PROPERTY("normalColor", GetPropertyNormalColor, SetPropertyNormalColor); + DECLARE_PROPERTY("disabledColor", GetPropertyDisabledColor, SetPropertyDisabledColor); + DECLARE_PROPERTY("pressedColor", GetPropertyPressedColor, SetPropertyPressedColor); + DECLARE_PROPERTY("highlightedColor", GetPropertyHighlightedColor, SetPropertyHighlightedColor); + DECLARE_PROPERTY("selectedColor", GetPropertySelectedColor, SetPropertySelectedColor); + DECLARE_PROPERTY("normalTextColor", GetPropertyNormalTextColor, SetPropertyNormalTextColor); + DECLARE_PROPERTY("disabledTextColor", GetPropertyDisabledTextColor, SetPropertyDisabledTextColor); + DECLARE_PROPERTY("pressedTextColor", GetPropertyPressedTextColor, SetPropertyPressedTextColor); + DECLARE_PROPERTY("highlightedTextColor", GetPropertyHighlightedTextColor, SetPropertyHighlightedTextColor); + DECLARE_PROPERTY("selectedTextColor", GetPropertySelectedTextColor, SetPropertySelectedTextColor); + DECLARE_PROPERTY("normalTitleTextColor", GetPropertyNormalTitleTextColor, SetPropertyNormalTitleTextColor); + DECLARE_PROPERTY("disabledTitleTextColor", GetPropertyDisabledTitleTextColor, SetPropertyDisabledTitleTextColor); + DECLARE_PROPERTY("pressedTitleTextColor", GetPropertyPressedTitleTextColor, SetPropertyPressedTitleTextColor); + DECLARE_PROPERTY("highlightedTitleTextColor", GetPropertyHighlightedTitleTextColor, SetPropertyHighlightedTitleTextColor); + DECLARE_PROPERTY("selectedTitleTextColor", GetPropertySelectedTitleTextColor, SetPropertySelectedTitleTextColor); + DECLARE_PROPERTY("checkedActionId", GetPropertyCheckedActionId, SetPropertyCheckedActionId); + DECLARE_PROPERTY("uncheckedActionId", GetPropertyUncheckedActionId, SetPropertyUncheckedActionId); + DECLARE_PROPERTY("selectedActionId", GetPropertySelectedActionId, SetPropertySelectedActionId); + DECLARE_PROPERTY("text", GetPropertyText, SetPropertyText); + DECLARE_PROPERTY("titleText", GetPropertyTitleText, SetPropertyTitleText); + DECLARE_PROPERTY("selected", GetPropertySelected, SetPropertySelected); + DECLARE_CLASS_END(); + + result SetPropertyNormalColor(const Variant& color); + Variant GetPropertyNormalColor(void) const; + result SetPropertyDisabledColor(const Variant& color); + Variant GetPropertyDisabledColor(void) const; + result SetPropertyPressedColor(const Variant& color); + Variant GetPropertyPressedColor(void) const; + result SetPropertyHighlightedColor(const Variant& color); + Variant GetPropertyHighlightedColor(void) const; + result SetPropertySelectedColor(const Variant& color); + Variant GetPropertySelectedColor(void) const; + + result SetPropertyNormalTextColor(const Variant& color); + Variant GetPropertyNormalTextColor(void) const; + result SetPropertyDisabledTextColor(const Variant& color); + Variant GetPropertyDisabledTextColor(void) const; + result SetPropertyPressedTextColor(const Variant& color); + Variant GetPropertyPressedTextColor(void) const; + result SetPropertyHighlightedTextColor(const Variant& color); + Variant GetPropertyHighlightedTextColor(void) const; + result SetPropertySelectedTextColor(const Variant& color); + Variant GetPropertySelectedTextColor(void) const; + + result SetPropertyNormalTitleTextColor(const Variant& color); + Variant GetPropertyNormalTitleTextColor(void) const; + result SetPropertyDisabledTitleTextColor(const Variant& color); + Variant GetPropertyDisabledTitleTextColor(void) const; + result SetPropertyPressedTitleTextColor(const Variant& color); + Variant GetPropertyPressedTitleTextColor(void) const; + result SetPropertyHighlightedTitleTextColor(const Variant& color); + Variant GetPropertyHighlightedTitleTextColor(void) const; + result SetPropertySelectedTitleTextColor(const Variant& color); + Variant GetPropertySelectedTitleTextColor(void) const; + + result SetPropertyCheckedActionId(const Variant& actionId); + Variant GetPropertyCheckedActionId(void) const; + result SetPropertyUncheckedActionId(const Variant& actionId); + Variant GetPropertyUncheckedActionId(void) const; + result SetPropertySelectedActionId(const Variant& actionId); + Variant GetPropertySelectedActionId(void) const; + + result SetPropertyText(const Variant& text); + Variant GetPropertyText(void) const; + + result SetPropertyTitleText(const Variant& titleText); + Variant GetPropertyTitleText(void) const; + + result SetPropertySelected(const Variant& selected); + Variant GetPropertySelected(void) const; + +public: + virtual ~_CheckButton(void); + +public: + static _CheckButton* CreateCheckButtonN(void); + + virtual void OnDraw(void); + virtual result OnAttachedToMainTree(void); + 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 OnTouchMoveHandled(const _Control& control); + virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo); + virtual bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo); + virtual void OnBoundsChanged(void); + virtual void OnFontChanged(Tizen::Graphics::Font* pFont); + virtual void OnFontInfoRequested(unsigned long& style, int& size); + virtual void OnDrawFocus(void); + virtual void OnChildControlFocusMoved(const _Control& control); + virtual bool IsChildControlFocusManage(void) const; + virtual void OnFocusableStateChanged(bool focusalbeState); + virtual void OnFocusModeStateChanged(void); + virtual bool OnFocusGained(const _Control& source); + virtual bool OnFocusLost(const _Control& source); + +public: + result SetSelected(bool select); + bool IsSelected(void) const; + + result AddActionEventListener(const Tizen::Ui::Controls::_IActionEventListener& listener); + result RemoveActionEventListener(const Tizen::Ui::Controls::_IActionEventListener& listener); + + result SetActionId(int checkedActionId, int uncheckedActionId, int selectedActionId = -1); + int GetCheckedActionId(void) const; + int GetUncheckedActionId(void) const; + int GetSelectedActionId(void) const; + + result SetText(const Tizen::Base::String& text); + Tizen::Base::String GetText(void) const; + result SetTitleText(const Tizen::Base::String& title); + Tizen::Base::String GetTitleText(void) const; + + result SetTextHorizontalAlignment(HorizontalAlignment alignment); + HorizontalAlignment GetTextHorizontalAlignment(void) const; + result SetTextVerticalAlignment(VerticalAlignment alignment); + VerticalAlignment GetTextVerticalAlignment(void) const; + + result SetTextColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetTextColor(void) const; + result SetDisabledTextColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetDisabledTextColor(void) const; + result SetPressedTextColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetPressedTextColor(void) const; + result SetHighlightedTextColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetHighlightedTextColor(void) const; + result SetSelectedTextColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetSelectedTextColor(void) const; + + result SetTitleTextColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetTitleTextColor(void) const; + result SetDisabledTitleTextColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetDisabledTitleTextColor(void) const; + result SetPressedTitleTextColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetPressedTitleTextColor(void) const; + result SetHighlightedTitleTextColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetHighlightedTitleTextColor(void) const; + result SetSelectedTitleTextColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetSelectedTitleTextColor(void) const; + + result SetColor(_CheckButtonStatus status, const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetColor(_CheckButtonStatus status) const; + + int GetTextSize(void) const; + int GetTitleTextSize(void) const; + float GetTextSizeF(void) const; + float GetTitleTextSizeF(void) const; + + result SetCheckButtonStyle(const CheckButtonStyle& checkButtonStyle); + result SetBackgroundStyle(const BackgroundStyle& backgroundStyle); + result SetShowTitle(bool showTitle); + result SetGroupStyle(const GroupStyle& groupStyle); + result SetCheckButtonStatus(_CheckButtonStatus checkButtonStatus); + + CheckButtonStyle GetCheckButtonStyle(void) const; + BackgroundStyle GetBackgroundStyle(void) const; + bool GetShowTitle(void) const; + 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; + + Tizen::Graphics::Bitmap* GetOnOffBgBitmap(_CheckButtonStatus checkButtonStatus) const; + Tizen::Graphics::Bitmap* GetOnOffBitmap(_CheckButtonStatus checkButtonStatus) const; + + Tizen::Graphics::Bitmap* GetOnOffSlidingBgBitmap(_CheckButtonStatus checkButtonStatus) const; + Tizen::Graphics::Bitmap* GetOnOffSlidingOnHandlerBitmap(_CheckButtonStatus checkButtonStatus) const; + Tizen::Graphics::Bitmap* GetOnOffSlidingOffHandlerBitmap(_CheckButtonStatus checkButtonStatus) const; + + Tizen::Graphics::Bitmap* GetCircleBitmap(_CheckButtonStatus checkButtonStatus) const; + Tizen::Graphics::Bitmap* GetDetailedRightBitmap(_CheckButtonStatus checkButtonStatus) const; + + Tizen::Graphics::Bitmap* GetCircleNormalEffectBitmap(void) const; + Tizen::Graphics::Bitmap* GetCirclePressedEffectBitmap(void) const; + + Tizen::Graphics::Bitmap* GetDetailedRightNormalEffectBitmap(void) const; + Tizen::Graphics::Bitmap* GetDetailedRightPressedEffectBitmap(void) const; + + Tizen::Graphics::Bitmap* GetBackgroundBitmap(GroupStyle groupStyle, _CheckButtonStatus checkButtonStatus) const; + Tizen::Graphics::Bitmap* GetBackgroundNormalEffectBitmap(GroupStyle groupStyle) const; + Tizen::Graphics::Bitmap* GetBackgroundPressedEffectBitmap(GroupStyle groupStyle) const; + + result AddRadioGroup(const _Control& radioGroup); + result RemoveRadioGroup(void); + + result FireActionEvent(void); + _Control* GetRadioGroup(void); + void SendTouchReleasedEvent(const _Control& control); + +protected: + result SetPresenter(const _CheckButtonPresenter& checkButtonPresenter); + +private: + bool IsTouchAreaChanged(bool currentButtonArea); + void UpdateAccessibilityElement(void); + void UpdateAccessibilityCheckStatus(void); + + _CheckButton(void); + _CheckButton(const _CheckButton& rhs); + _CheckButton& operator =(const _CheckButton& rhs); + +private: + enum + { + NUMBER_OF_CHECK_BUTTON_STATUS = 5 + }; + +public: + CheckButtonStyle __checkButtonStyle; + BackgroundStyle __backgroundStyle; + bool __showTitle; + GroupStyle __groupStyle; + _CheckButtonStatus __checkButtonStatus; + +private: + _CheckButtonPresenter* __pCheckButtonPresenter; + _ActionEvent* __pActionEvent; + + bool __selected; + + int __checkedActionId; + int __uncheckedActionId; + int __selectedActionId; + + Tizen::Base::String __text; + Tizen::Base::String __titleText; + + Tizen::Graphics::Color __normalTextColor; + Tizen::Graphics::Color __disabledTextColor; + Tizen::Graphics::Color __pressedTextColor; + Tizen::Graphics::Color __highlightedTextColor; + Tizen::Graphics::Color __selectedTextColor; + + Tizen::Graphics::Color __normalTitleTextColor; + Tizen::Graphics::Color __disabledTitleTextColor; + Tizen::Graphics::Color __pressedTitleTextColor; + Tizen::Graphics::Color __highlightedTitleTextColor; + Tizen::Graphics::Color __selectedTitleTextColor; + + Tizen::Graphics::Color __normalColor; + Tizen::Graphics::Color __disabledColor; + Tizen::Graphics::Color __pressedColor; + Tizen::Graphics::Color __highlightedColor; + Tizen::Graphics::Color __selectedColor; + + Tizen::Graphics::Bitmap* __pMarkBgBitmap[NUMBER_OF_CHECK_BUTTON_STATUS]; + Tizen::Graphics::Bitmap* __pMarkBitmap[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]; + Tizen::Graphics::Bitmap* __pOnOffSlidingOnHandlerBitmap[NUMBER_OF_CHECK_BUTTON_STATUS]; + Tizen::Graphics::Bitmap* __pOnOffSlidingOffHandlerBitmap[NUMBER_OF_CHECK_BUTTON_STATUS]; + + Tizen::Graphics::Bitmap* __pCircleBitmap[NUMBER_OF_CHECK_BUTTON_STATUS]; + Tizen::Graphics::Bitmap* __pCircleNormalEffectBitmap; + Tizen::Graphics::Bitmap* __pCirclePressedEffectBitmap; + + Tizen::Graphics::Bitmap* __pDetailedRightBitmap[NUMBER_OF_CHECK_BUTTON_STATUS]; + Tizen::Graphics::Bitmap* __pDetailedRightNormalEffectBitmap; + Tizen::Graphics::Bitmap* __pDetailedRightPressedEffectBitmap; + + Tizen::Graphics::Bitmap* __pBackgroundBitmap[NUMBER_OF_CHECK_BUTTON_STATUS]; + Tizen::Graphics::Bitmap* __pBackgroundNormalEffectBitmap; + Tizen::Graphics::Bitmap* __pBackgroundPressedEffectBitmap; + + Tizen::Graphics::Bitmap* __pBackgroundTopBitmap[NUMBER_OF_CHECK_BUTTON_STATUS]; + Tizen::Graphics::Bitmap* __pBackgroundTopNormalEffectBitmap; + Tizen::Graphics::Bitmap* __pBackgroundTopPressedEffectBitmap; + + Tizen::Graphics::Bitmap* __pBackgroundMiddleBitmap[NUMBER_OF_CHECK_BUTTON_STATUS]; + Tizen::Graphics::Bitmap* __pBackgroundMiddleNormalEffectBitmap; + Tizen::Graphics::Bitmap* __pBackgroundMiddlePressedEffectBitmap; + + Tizen::Graphics::Bitmap* __pBackgroundBottomBitmap[NUMBER_OF_CHECK_BUTTON_STATUS]; + Tizen::Graphics::Bitmap* __pBackgroundBottomNormalEffectBitmap; + Tizen::Graphics::Bitmap* __pBackgroundBottomPressedEffectBitmap; + + HorizontalAlignment __horizontalAlignment; + VerticalAlignment __verticalAlignment; + + float __textSize; + float __titleTextSize; + + bool __previousTouchArea; + + _Control* __pRadioGroup; + + Tizen::Ui::_AccessibilityElement* __pButtonElement; + Tizen::Ui::_AccessibilityElement* __pDetailButtonElement; + Tizen::Ui::_IAccessibilityListener* __pAccessibilityListener; + + static const float SENSITIVE = 0.08f; +}; // _CheckButton + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_CHECK_BUTTON_H_ diff --git a/src/ui/inc/FUiCtrl_CheckButtonImpl.h b/src/ui/inc/FUiCtrl_CheckButtonImpl.h new file mode 100644 index 0000000..a2b6485 --- /dev/null +++ b/src/ui/inc/FUiCtrl_CheckButtonImpl.h @@ -0,0 +1,131 @@ +// +// 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_CheckButtonImpl.h + * @brief This is the header file for the _CheckButtonImpl class. + * + * This header file contains the declarations of the %_CheckButtonImpl class. + */ +#ifndef _FUI_CTRL_INTERNAL_CHECK_BUTTON_IMPL_H_ +#define _FUI_CTRL_INTERNAL_CHECK_BUTTON_IMPL_H_ + +#include +#include "FUi_ControlImpl.h" +#include "FUiCtrl_CheckButton.h" +#include "FUiCtrl_IActionEventListener.h" +#include "FUiCtrl_PublicActionEvent.h" + +namespace Tizen { namespace Graphics +{ + class Dimension; +}} // Tizen::Graphics + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _CheckButtonImpl + : public _ControlImpl + , public _IActionEventListener + , virtual public Tizen::Base::Runtime::IEventListener +{ +public: + class CheckButtonSizeInfo : public _ControlImpl::SizeInfo + { + virtual Tizen::Graphics::Dimension GetDefaultMinimumSize(_ControlOrientation orientation) const; + virtual Tizen::Graphics::FloatDimension GetDefaultMinimumSizeF(_ControlOrientation orientation) const; + }; // CheckButtonSizeInfo + +public: + virtual ~_CheckButtonImpl(void); + static _CheckButtonImpl* CreateCheckButtonImplN(CheckButton* pControl, const Tizen::Graphics::Rectangle& bounds); + static _CheckButtonImpl* CreateCheckButtonImplN(CheckButton* pControl, const Tizen::Graphics::FloatRectangle& bounds); + + virtual const char* GetPublicClassName(void) const; + virtual const CheckButton& GetPublic(void) const; + virtual CheckButton& GetPublic(void); + virtual const _CheckButton& GetCore(void) const; + virtual _CheckButton& GetCore(void); + +public: + result SetSelected(bool select); + bool IsSelected(void) const; + + result AddActionEventListener(Tizen::Ui::IActionEventListener& listener); + result RemoveActionEventListener(Tizen::Ui::IActionEventListener& listener); + + result SetActionId(int checkedActionId, int uncheckedActionId, int selectedActionId = -1); + int GetCheckedActionId(void) const; + int GetUncheckedActionId(void) const; + int GetSelectedActionId(void) const; + + result SetText(const Tizen::Base::String& text); + Tizen::Base::String GetText(void) const; + result SetTitleText(const Tizen::Base::String& title); + Tizen::Base::String GetTitleText(void) const; + + result SetTextHorizontalAlignment(HorizontalAlignment alignment); + HorizontalAlignment GetTextHorizontalAlignment(void) const; + result SetTextVerticalAlignment(VerticalAlignment alignment); + VerticalAlignment GetTextVerticalAlignment(void) const; + + result SetTextColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetTextColor(void) const; + result SetDisabledTextColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetDisabledTextColor(void) const; + result SetPressedTextColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetPressedTextColor(void) const; + result SetHighlightedTextColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetHighlightedTextColor(void) const; + + result SetTitleTextColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetTitleTextColor(void) const; + result SetDisabledTitleTextColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetDisabledTitleTextColor(void) const; + result SetPressedTitleTextColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetPressedTitleTextColor(void) const; + result SetHighlightedTitleTextColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetHighlightedTitleTextColor(void) const; + + result SetColor(CheckButtonStatus status, const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetColor(CheckButtonStatus status) const; + + result SetStyle(const CheckButtonStyle& checkButtonStyle, const BackgroundStyle& backgroundStyle, bool showTitle, const GroupStyle& groupStyle); + + virtual void OnActionPerformed(const Tizen::Ui::_Control& source, int actionId); + virtual bool IsLayoutable(void) const; + +public: + static Tizen::Graphics::Color GetColorOnError(void); + + static _CheckButtonImpl* GetInstance(CheckButton& checkButton); + static const _CheckButtonImpl* GetInstance(const CheckButton& checkButton); + +protected: + _CheckButtonStatus ConvertStatus(CheckButtonStatus status) const; + +private: + _CheckButtonImpl(CheckButton* pPublic, _CheckButton* pCore); + + _CheckButtonImpl(const _CheckButtonImpl& rhs); + _CheckButtonImpl& operator =(const _CheckButtonImpl& rhs); + + _PublicActionEvent* __pPublicActionEvent; +}; // _CheckButtonImpl + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_CHECK_BUTTON_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_CheckButtonModel.h b/src/ui/inc/FUiCtrl_CheckButtonModel.h new file mode 100644 index 0000000..0fd8952 --- /dev/null +++ b/src/ui/inc/FUiCtrl_CheckButtonModel.h @@ -0,0 +1,57 @@ +// +// 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_CheckButtonModel.h + * @brief This is the header file for the _CheckButtonModel class. + * + * This header file contains the declarations of the %_CheckButtonModel class. + */ +#ifndef _FUI_CTRL_INTERNAL_CHECK_BUTTON_MODEL_H_ +#define _FUI_CTRL_INTERNAL_CHECK_BUTTON_MODEL_H_ + +#include + +namespace Tizen { namespace Ui { namespace Controls +{ +/** + * @class _CheckButtonModel + * @brief + * @since 2.0 + * + * + * + * + */ +class _CheckButtonModel + : public Tizen::Base::Object +{ +public: + _CheckButtonModel(void); + + virtual ~_CheckButtonModel(void); + +public: + virtual result Construct(void); + +private: + _CheckButtonModel(const _CheckButtonModel& rhs); + _CheckButtonModel& operator =(const _CheckButtonModel& rhs); +}; // _CheckButtonModel + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_CHECK_BUTTON_MODEL_H_ diff --git a/src/ui/inc/FUiCtrl_CheckButtonPresenter.h b/src/ui/inc/FUiCtrl_CheckButtonPresenter.h new file mode 100644 index 0000000..48de954 --- /dev/null +++ b/src/ui/inc/FUiCtrl_CheckButtonPresenter.h @@ -0,0 +1,151 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +/** + * @file FUiCtrl_CheckButtonPresenter.h + * @brief This is the header file for the _CheckButtonPresenter class. + * + * This header file contains the declarations of the %_CheckButtonPresenter class. + */ +#ifndef _FUI_CTRL_INTERNAL_CHECK_BUTTON_PRESENTER_H_ +#define _FUI_CTRL_INTERNAL_CHECK_BUTTON_PRESENTER_H_ + +#include +#include +#include "FUi_Control.h" +#include "FUiCtrl_CheckButton.h" + +namespace Tizen { namespace Ui { namespace Animations +{ +class _VisualElement; +}}} // Tizen::Ui::Animations + +namespace Tizen { namespace Ui { namespace Controls +{ +class _CheckButton; +class _CheckButtonModel; + +/** + * @class _CHeckButtonPresenter + * @brief + * @since 2.0 + * + * + * + * + */ +class _CheckButtonPresenter + : public Tizen::Base::Object + , public Tizen::Base::Runtime::ITimerEventListener +{ +public: + _CheckButtonPresenter(void); + virtual ~_CheckButtonPresenter(void); + +public: + virtual result Construct(const _CheckButton& checkButton); + virtual result Install(void); + + 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 OnTouchMoveHandled(const _Control& control); + virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo); + virtual bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo); + + virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer); + + virtual void OnDrawFocus(void); + virtual void OnChildControlFocusMoved(const _Control& control); + virtual bool IsChildControlFocusManage(void) const; + virtual void OnFocusableStateChanged(bool focusalbeState); + virtual void OnFocusModeStateChanged(void); + virtual bool OnFocusGained(const _Control& source); + virtual bool OnFocusLost(const _Control& source); + + void Draw(void); + + void OnFontChanged(Tizen::Graphics::Font* pFont); + void OnFontInfoRequested(unsigned long& style, int& size); + void OnFontInfoRequested(unsigned long& style, float& size); + void SetFontInfo(unsigned long style, float size); + + Tizen::Graphics::FloatRectangle GetTitleTextBoundsF(void) const; + Tizen::Graphics::FloatRectangle GetTextBoundsF(void) const; + Tizen::Graphics::FloatRectangle GetDefaultButtonBoundsF(void) const; + Tizen::Graphics::FloatRectangle GetOnOffSlidingButtonBoundsF(void) const; + Tizen::Graphics::FloatRectangle GetDetailedButtonBoundsF(void) const; + + result StartCheckAnimationTimer(void); + result ResetCheckAnimationTimer(void); + + result AdjustHandlerPosition(void); + result CalculateButtonBounds(void); + result InitOnOffHandlerMoved(void); +protected: + result SetModel(const _CheckButtonModel& checkButtonModel); + +private: + _CheckButtonPresenter(const _CheckButtonPresenter& rhs); + _CheckButtonPresenter& operator =(const _CheckButtonPresenter& rhs); + + void DrawBackground(void); + void DrawCheckBitmap(void); + void DrawText(void); + + bool IsEnabledStateChanged(void); + result CalculateTitleTextBounds(void); + result CalculateTextBounds(void); + + void DrawMarkAnimation(void); + + void DrawOnOffSlidingHandler(float handlerPosition); +private: + _CheckButton* __pCheckButton; + _CheckButtonModel* __pCheckButtonModel; + bool __previousEnabledState; + bool __touchMoveHandled; + + Tizen::Graphics::Font* __pTextFont; + Tizen::Graphics::Font* __pTitleTextFont; + Tizen::Graphics::_Text::TextObject* __pTextObject; + Tizen::Graphics::_Text::TextObject* __pTitleTextObject; + + Tizen::Graphics::FloatRectangle __titleTextBounds; + Tizen::Graphics::FloatRectangle __textBounds; + Tizen::Graphics::FloatRectangle __defaultButtonBounds; + Tizen::Graphics::FloatRectangle __onOffSlidingButtonBounds; + Tizen::Graphics::FloatRectangle __detailedButtonBounds; + + unsigned long __fontStyle; + float __fontSize; + + static const int CHECK_ACTION_TIMER_PERIOD = 10; + static const int RATIO_MAX = 10; + Tizen::Base::Runtime::Timer* __pCheckAnimationTimer; + int __ratio; + + float __onOffHandlerPosition; + bool __onOffHandlerPressed; + bool __onOffHandlerMoved; + int __highlightedIndex; + bool __detailedPressed; +}; // _CheckButtonPresenter + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_CHECK_BUTTON_PRESENTER_H_ diff --git a/src/ui/inc/FUiCtrl_ColorChangeEvent.h b/src/ui/inc/FUiCtrl_ColorChangeEvent.h new file mode 100644 index 0000000..802f52a --- /dev/null +++ b/src/ui/inc/FUiCtrl_ColorChangeEvent.h @@ -0,0 +1,103 @@ +// +// 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_ColorChangeEvent.h + * @brief This is the header file for _ColorChangeEvent class. + * + * This header file contains declaration of _ColorChangeEvent class. + * The ColorChangeEvent class can call listener's method. So, when event occurred, + * application can handle it appropriately. + * + */ +#ifndef _FUI_CTRL_INTERNAL_COLOR_CHANGE_EVENT_H_ +#define _FUI_CTRL_INTERNAL_COLOR_CHANGE_EVENT_H_ + +#include +#include + +namespace Tizen { namespace Ui +{ +class _Control; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ +/** +* @class _ColorChangeEvent +* @brief This class handles a action event. It is inherited from Event class. +* +* The Window(root of all widgets) class has an instance of the ColorChangeEvent class as a member variable. +* Applications can register action event listeners through it. When a action event occurred, +* the ColorChangeEvent class finds listener and calls the appropriate listener's method. +* +*/ +class _ColorChangeEvent + : public Tizen::Base::Runtime::_Event +{ +public: + // + // This is the default class destructor. + // + virtual ~_ColorChangeEvent(void); + + // + // This method initializes this instance. This method should be called + // after this instance is constructed. + // + // @return The method returns error code. + // @param[in] source A pointer to the Object instance which contains this instance. + // @exception E_SUCCESS - This method is successful. + // @exception E_OUT_OF_MEMORY - The memory is insufficient. + // + static _ColorChangeEvent* CreateInstanceN(const Tizen::Ui::_Control& source); + + // + // This method returns the owner of this event. + // + // @return See the comment above. + // + const Tizen::Ui::_Control* GetSource(void) const; + + static Tizen::Base::Runtime::IEventArg* CreateColorChangeEventArgN(const Tizen::Graphics::Color& color); + +protected: + + // + // This method checks the arg and finds out the type of event. After that this method calls appropriate + // listener's method. + // + // @param[in] pListener It is a event listener related to this ColorChange event. + // @param[in] arg It is an argument-like instance of ColorChange event retransmitted to the listener's method + // as an argument. + // + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + +private: + _ColorChangeEvent(const Tizen::Ui::_Control& source); + + _ColorChangeEvent(const _ColorChangeEvent&); + + _ColorChangeEvent& operator=(const _ColorChangeEvent&); + +private: + const Tizen::Ui::_Control* __pSource; +}; // _ColorChangeEvent + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_COLOR_CHANGE_EVENT_H_ diff --git a/src/ui/inc/FUiCtrl_ColorPicker.h b/src/ui/inc/FUiCtrl_ColorPicker.h new file mode 100644 index 0000000..27eace2 --- /dev/null +++ b/src/ui/inc/FUiCtrl_ColorPicker.h @@ -0,0 +1,184 @@ +// +// 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_ColorPicker.h +* @brief This is the header file for the _ColorPicker class. +* +* This header file contains the declarations of the _ColorPicker class. +*/ +#ifndef _FUI_CTRL_INTERNAL_COLORPICKER_H_ +#define _FUI_CTRL_INTERNAL_COLORPICKER_H_ + +#include "FUi_Control.h" +#include "FUiCtrl_ColorChangeEvent.h" +#include "FUi_IAccessibilityListener.h" +#include "FUiCtrl_ColorPickerPresenter.h" + +namespace Tizen { namespace Ui { +class _AccessibilityElement; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Animations +{ +class _VisualElement; +}}} // Tizen::Ui::Animations + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _IColorChangeEventListener; +class _ColorPickerPresenter; + +class _OSP_EXPORT_ _ColorPicker + : public Tizen::Ui::_Control + , virtual public Tizen::Base::Runtime::IEventListener + , virtual public _IUiEventListener + , virtual public _IUiEventPreviewer + , public _IAccessibilityListener +{ + DECLARE_CLASS_BEGIN(_ColorPicker, Tizen::Ui::_Control); + DECLARE_PROPERTY("color", GetPropertyColor, SetPropertyColor); + DECLARE_PROPERTY("hue", GetPropertyHue, SetPropertyHue); + DECLARE_PROPERTY("saturation", GetPropertySaturation, SetPropertySaturation); + DECLARE_PROPERTY("luminance", GetPropertyLuminance, SetPropertyLuminance); + DECLARE_CLASS_END(); + +// Properties + result SetPropertyColor(const Tizen::Ui::Variant& color); + + result SetPropertyHue(const Tizen::Ui::Variant& hue); + + result SetPropertySaturation(const Tizen::Ui::Variant& saturation); + + result SetPropertyLuminance(const Tizen::Ui::Variant& luminance); + + Variant GetPropertyColor(void) const; + + Variant GetPropertyHue(void) const; + + Variant GetPropertySaturation(void) const; + + Variant GetPropertyLuminance(void) const; + +public: + Tizen::Graphics::Color GetColor(void) const; + + int GetHue(void) const; + + int GetSaturation(void) const; + + int GetLuminance(void) const; + + result SetColor(const Tizen::Graphics::Color& color); + + result SetHue(int hue); + + result SetSaturation(int saturation); + + result SetLuminance(int luminance); + + result AddColorChangeEventListener(const _IColorChangeEventListener& listener); + + result RemoveColorChangeEventListener(const _IColorChangeEventListener& listener); + + result FireColorChangeEvent(const Tizen::Graphics::Color& color); + + Tizen::Ui::Animations::_VisualElement* GetHueHandler(void); + + Tizen::Ui::Animations::_VisualElement* GetSaturationHandler(void); + + Tizen::Ui::Animations::_VisualElement* GetLuminanceHandler(void); + + Tizen::Ui::_AccessibilityElement* GetAccessibilityElement(int elementId); + + result UpdateView(void); + + virtual ~_ColorPicker(void); + + virtual result OnAttachedToMainTree(void); + + void InitializeAccessibilityElement(void); + + virtual void OnBoundsChanged(void); + + virtual void OnChangeLayout(Tizen::Ui::_ControlOrientation orientation); + + virtual void OnDraw(void); + + virtual bool OnTouchPressed(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo); + + virtual bool OnTouchMoved(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo); + + 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); + + static _ColorPicker* CreateColorPickerN(void); + + // accessibility listener + virtual bool OnAccessibilityFocusMovedNext(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return false;} + virtual bool OnAccessibilityFocusMovedPrevious(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return false;} + virtual bool OnAccessibilityReadingElement(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return false;} + virtual bool OnAccessibilityReadElement(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return false;} + virtual bool OnAccessibilityFocusIn(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return false;} + virtual bool OnAccessibilityFocusOut(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return false;} + virtual bool OnAccessibilityActionPerformed(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return false;} + virtual bool OnAccessibilityValueIncreased(const Tizen::Ui::_AccessibilityContainer&, const Tizen::Ui::_AccessibilityElement&); + virtual bool OnAccessibilityValueDecreased(const Tizen::Ui::_AccessibilityContainer&, const Tizen::Ui::_AccessibilityElement&); + + virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo); + + bool OnFocusLost(const _Control& source); + virtual void OnDrawFocus(void); + virtual void OnFocusModeStateChanged(void); + +private: + _ColorPicker(void); + + _ColorPicker(const _ColorPicker&); + + _ColorPicker& operator =(const _ColorPicker&); + +private: + + _ColorPickerPresenter* __pColorPickerPresenter; + + _ColorChangeEvent* __pColorChangeEvent; + + Tizen::Ui::Animations::_VisualElement* __pHueHandler; + + Tizen::Ui::Animations::_VisualElement* __pSaturationHandler; + + Tizen::Ui::Animations::_VisualElement* __pLuminanceHandler; + + Tizen::Ui::_AccessibilityElement* __pHueBarElement; + + Tizen::Ui::_AccessibilityElement* __pSaturationBarElement; + + Tizen::Ui::_AccessibilityElement* __pLuminanceBarElement; + + _ColorPickerComponentType __currentFocusedHandler; + + _ColorPickerComponentType __previousFocusedHandler; + + bool __isInFocusMode; +}; // _ColorPicker + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_COLORPICKER_H_ diff --git a/src/ui/inc/FUiCtrl_ColorPickerImpl.h b/src/ui/inc/FUiCtrl_ColorPickerImpl.h new file mode 100644 index 0000000..d50161c --- /dev/null +++ b/src/ui/inc/FUiCtrl_ColorPickerImpl.h @@ -0,0 +1,104 @@ +// +// 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_ColorPickerImpl.h +* @brief This is the header file for the _ColorPickerImpl class. +* +* This header file contains the declarations of the _ColorPickerImpl class. +*/ +#ifndef _FUI_CTRL_INTERNAL_COLOR_PICKER_IMPL_H_ +#define _FUI_CTRL_INTERNAL_COLOR_PICKER_IMPL_H_ + +#include +#include +#include "FUi_ControlImpl.h" +#include "FUiCtrl_ColorPicker.h" +#include "FUiCtrl_IColorChangeEventListener.h" + +namespace Tizen { namespace Ui { namespace Controls +{ +class _PublicColorChangeEvent; + +class _ColorPickerImpl + : public Tizen::Ui::_ControlImpl + , public _IColorChangeEventListener + , virtual public Tizen::Base::Runtime::IEventListener +{ +public: + class ColorPickerSizeInfo : public _ControlImpl::SizeInfo + { + virtual Tizen::Graphics::Dimension GetDefaultMaximumSize(_ControlOrientation orientation) const; + + virtual Tizen::Graphics::Dimension GetDefaultMinimumSize(_ControlOrientation orientation) const; + }; + +public: + const Tizen::Graphics::Color GetColor(void) const; + + const int GetHue(void) const; + + const int GetSaturation(void) const; + + const int GetLuminance(void) const; + + result SetColor(const Tizen::Graphics::Color& color); + + result SetHue(int hue); + + result SetSaturation(int saturation); + + result SetLuminance(int luminance); + + result AddColorChangeEventListener(Tizen::Ui::IColorChangeEventListener& listener); + + result RemoveColorChangeEventListener(Tizen::Ui::IColorChangeEventListener& listener); + + virtual void OnColorChanged(const Tizen::Ui::_Control& source, const Tizen::Graphics::Color& color); + + virtual const char* GetPublicClassName(void) const; + + virtual ColorPicker& GetPublic(void); + + virtual const ColorPicker& GetPublic(void) const; + + virtual const _ColorPicker& GetCore(void) const; + + virtual _ColorPicker& GetCore(void); + + virtual ~_ColorPickerImpl(void); + + static _ColorPickerImpl* CreateColorPickerImplN(ColorPicker& control); + + static _ColorPickerImpl* GetInstance(ColorPicker& colorPicker); + + static const _ColorPickerImpl* GetInstance(const ColorPicker& colorPicker); + +private: + _ColorPickerImpl(ColorPicker& pPublic, _ColorPicker& pCore); + + _ColorPickerImpl(const _ColorPickerImpl&); + + _ColorPickerImpl& operator =(const _ColorPickerImpl&); + +private: + _PublicColorChangeEvent* __pPublicColorChangeEvent; +}; // _ColorPickerImpl + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_COLOR_PICKER_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_ColorPickerModel.h b/src/ui/inc/FUiCtrl_ColorPickerModel.h new file mode 100644 index 0000000..79c064c --- /dev/null +++ b/src/ui/inc/FUiCtrl_ColorPickerModel.h @@ -0,0 +1,87 @@ +// +// 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_ColorPickerModel.h +* @brief This is the header file for the _ColorPickerModel class. +* +* This header file contains the declarations of the _ColorPickerModel class. +*/ + +#ifndef _FUI_CTRL_INTERNAL_COLORPICKER_MODEL_H_ +#define _FUI_CTRL_INTERNAL_COLORPICKER_MODEL_H_ + +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _ColorPickerModel + : public Tizen::Base::Object +{ +public: + double GetHue(void) const; + + double GetSaturation(void) const; + + double GetLuminance(void) const; + + void SetHue(double hueValue); + + void SetSaturation(double saturationValue); + + void SetLuminance(double luminanceValue); + + Tizen::Graphics::Color GetHueColor(void) const; + + Tizen::Graphics::Color GetSaturationColor(void) const; + + Tizen::Graphics::Color GetColor(void) const; + + void SetColor(const Tizen::Graphics::Color& color); + + virtual ~_ColorPickerModel(void); + + static _ColorPickerModel* CreateInstanceN(void); + +private: + _ColorPickerModel(void); + + _ColorPickerModel(const _ColorPickerModel&); + + _ColorPickerModel& operator =(const _ColorPickerModel&); + + void CalulateColor(void); + + static void ConvertHSLToRGB(double h, double s, double l, Tizen::Graphics::Color& color); + + static void ConvertRGBToHSL(const Tizen::Graphics::Color& color, double& h, double& s, double& l); + +private: + double __hue; + + double __sat; + + double __lum; + + Tizen::Graphics::Color __color; +}; // _ColorPickerModel + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_COLORPICKER_MODEL_H_ diff --git a/src/ui/inc/FUiCtrl_ColorPickerPresenter.h b/src/ui/inc/FUiCtrl_ColorPickerPresenter.h new file mode 100644 index 0000000..cbf14e1 --- /dev/null +++ b/src/ui/inc/FUiCtrl_ColorPickerPresenter.h @@ -0,0 +1,219 @@ +// +// 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_ColorPickerPresenter.h + * @brief This is the header file for the _ColorPicker class. + * + * This header file contains the declarations of the %_ColorPicker class. + */ + +#ifndef _FUI_CTRL_INTERNAL_COLORPICKER_PRESENTER_H_ +#define _FUI_CTRL_INTERNAL_COLORPICKER_PRESENTER_H_ + +#include +#include "FUi_Control.h" + +namespace Tizen { namespace Graphics +{ +class FloatPoint; +class FloatRectangle; +class Canvas; +class Color; +}} //Tizen::Graphics + +namespace Tizen {namespace Ui +{ +class _TouchInfo; +}} //Tizen::Ui + +namespace Tizen { namespace Ui { namespace Animations +{ +class _VisualElement; +}}} // Tizen::Ui::Animations + +namespace Tizen {namespace Ui { namespace Controls +{ + +enum _ColorPickerComponentType +{ + HSL_NOT = -1, + HUE_HANDLER = 0, + SAT_HANDLER, + LUM_HANDLER, + HUE_BAR, + SAT_BAR, + LUM_BAR, + HUE_ARROWLEFT, + HUE_ARROWRIGHT, + SAT_ARROWLEFT, + SAT_ARROWRIGHT, + LUM_ARROWLEFT, + LUM_ARROWRIGHT, + COMPONENT_TYPE_MAX +}; + +class _ColorPickerModel; +class _ColorPicker; + +class _ColorPickerPresenter + : public Tizen::Base::Object + , public Tizen::Base::Runtime::ITimerEventListener + , virtual public Tizen::Base::Runtime::IEventListener +{ +public: + result Draw(void); + + Tizen::Graphics::Color GetColor(void) const; + + int GetHue(void) const; + + int GetSaturation(void) const; + + int GetLuminance(void) const; + + void SetColor(const Tizen::Graphics::Color& color); + + result SetHue(int hue); + + result SetSaturation(int saturation); + + result SetLuminance(int luminance); + + void LoadDrawingProperties(const Tizen::Graphics::FloatRectangle& controlBounds); + + void StepHandler(_ColorPickerComponentType index, bool increase); + + result DrawFocus(_ColorPickerComponentType currentIndex, _ColorPickerComponentType prevIndex); + + result ClearFocus(_ColorPickerComponentType index); + + void OnChangeLayout(Tizen::Ui::_ControlOrientation orientation); + + bool OnTouchPressed(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo); + + bool OnTouchMoved(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo); + + bool OnTouchReleased(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo); + + bool OnTouchCanceled(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo); + + virtual ~_ColorPickerPresenter(void); + + virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer); + + static _ColorPickerPresenter* CreateInstanceN(_ColorPicker& colorPicker); + + Tizen::Ui::Animations::_VisualElement* CreateHandlerN(Tizen::Ui::Animations::_VisualElement& rootElement, _ColorPickerComponentType handlerType); + +private: + + result LoadResource(void); + + result DrawHueSlider(Tizen::Graphics::Canvas& canvas); + + result DrawLuminanceSlider(Tizen::Graphics::Canvas& canvas); + + result DrawSaturationSlider(Tizen::Graphics::Canvas& canvas); + + result DrawLine(Tizen::Graphics::Canvas& canvas); + + result DrawArrowButton(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& rcButton, bool isSelected, bool drawLeftButton); + + result DrawArrowButtons(Tizen::Graphics::Canvas& canvas); + + result MoveHandler(_ColorPickerComponentType handlerType); + + result TouchButton(void); + + result TouchHandler(float x); + + result SetHandlerPosition(_ColorPickerComponentType handlerType, float position); + + result SetHandlerPositionByRatio(_ColorPickerComponentType handlerType, double ratio); + + result ChangeColorFromCurrentHandlerPosition(_ColorPickerComponentType handlerType); + + bool IsLeftButton(_ColorPickerComponentType buttonType); + + Tizen::Graphics::FloatRectangle& GetBarBoundsFromHandler(_ColorPickerComponentType handlerType); + + _ColorPickerComponentType GetTouchActionType(const Tizen::Graphics::FloatPoint& position) const; + + result DrawResourceBitmap(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, Tizen::Graphics::Bitmap* pBitmap, bool isCustomBitmap = false, bool isHandlerBitmap = false); + + _ColorPickerPresenter(_ColorPicker& colorPicker); + + _ColorPickerPresenter(const _ColorPickerPresenter&); + + _ColorPickerPresenter& operator =(const _ColorPickerPresenter&); + +private: + + static const double _MAX_COLOR_VALUE = 255.0; + static const double _MIN_COLOR_VALUE = 0.0; + static const double _HUE_SPACE_RANGE = 6.0; + static const byte _ZERO_SATURATION_RGB_VALUE = 127; + + _ColorPicker* __pColorPicker; + + _ColorPickerModel* __pColorPickerModel; + + _ColorPickerComponentType __eventType; + + float __topMargin; + + float __blockMargin; + + float __blockHeight; + float __dividerMargin; + float __dividerWidth; + + Tizen::Graphics::FloatRectangle __componentBounds[COMPONENT_TYPE_MAX]; + + Tizen::Graphics::Color __hueColor; + + Tizen::Graphics::Color __saturationColor; + + Tizen::Base::Runtime::Timer* __pSlideTimer; + Tizen::Graphics::Bitmap* __pHueSliderBgBitmap; + Tizen::Graphics::Bitmap* __pCustomBitmap; + Tizen::Graphics::Bitmap* __pLuminanceSliderBgBitmap; + Tizen::Graphics::Bitmap* __pSaturationSliderBgBitmap; + Tizen::Graphics::Bitmap* __pColorNormalReplacementBgBitmap; + Tizen::Graphics::Bitmap* __pColorPressedReplacementBgBitmap; + Tizen::Graphics::Bitmap* __pColorDisabledReplacementBgBitmap; + Tizen::Graphics::Bitmap* __pNormalEffectBgBitmap; + Tizen::Graphics::Bitmap* __pPressedEffectBgBitmap; + Tizen::Graphics::Bitmap* __pDisabledEffectBgBitmap; + Tizen::Graphics::Bitmap* __pLeftArrowNormalBitmap; + Tizen::Graphics::Bitmap* __pLeftArrowPressedBitmap; + Tizen::Graphics::Bitmap* __pLeftArrowDisabledBitmap; + Tizen::Graphics::Bitmap* __pRightArrowNormalBitmap; + Tizen::Graphics::Bitmap* __pRightArrowPressedBitmap; + Tizen::Graphics::Bitmap* __pRightArrowDisabledBitmap; + Tizen::Graphics::Bitmap* __pHandlerBitmap; + Tizen::Graphics::Bitmap* __pLandscapeHueSliderBgBitmap; + Tizen::Graphics::Bitmap* __pLandscapeCustomBitmap; + Tizen::Graphics::Bitmap* __pLandscapeLuminanceSliderBgBitmap; + Tizen::Graphics::Bitmap* __pLandscapeSaturationSliderBgBitmap; + Tizen::Graphics::Bitmap* __pFocusBitmap; +}; // _ColorPickerPresenter + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_COLORPICKER_PRESENTER_H_ diff --git a/src/ui/inc/FUiCtrl_ContextMenu.h b/src/ui/inc/FUiCtrl_ContextMenu.h new file mode 100644 index 0000000..d68a911 --- /dev/null +++ b/src/ui/inc/FUiCtrl_ContextMenu.h @@ -0,0 +1,301 @@ +// +// 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_ContextMenu.h + * @brief This is the header file for the _ContextMenu class. + * + * This header file contains the declarations of the %_ContextMenu class. + */ +#ifndef _FUI_CTRL_INTERNAL_CONTEXT_MENU_H_ +#define _FUI_CTRL_INTERNAL_CONTEXT_MENU_H_ + +#include +#include +#include "FUi_Window.h" +#include "FUiCtrl_IContextMenuPresenter.h" +#include "FUiCtrl_ContextMenuGridPresenter.h" +#include "FUiCtrl_ContextMenuListPresenter.h" +#include "FUiCtrl_ActionEvent.h" +#include "FUiCtrl_IActionEventListener.h" +#include "FUiCtrl_IFrameEventListener.h" + +#include "FUiCtrl_ScrollPanel.h" + +namespace Tizen { namespace Ui { +class _AccessibilityElement; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ + +const int CONTEXT_MENU_ITEM_STATUS_COUNT = 3; +const int MAX_CONTEXTMENU_LIST_SHOW_ITEM = 4; + +enum ContextMenuCoreStyle +{ + CONTEXT_MENU_CORE_STYLE_LIST, /**< The style of the vertical list of image + text */ + CONTEXT_MENU_CORE_STYLE_GRID /**< The style of the horizontal list of image + text */ +}; + +enum ContextMenuCoreAlign +{ + CONTEXT_MENU_CORE_ALIGN_LEFT, + CONTEXT_MENU_CORE_ALIGN_RIGHT, + CONTEXT_MENU_CORE_ALIGN_UP, + CONTEXT_MENU_CORE_ALIGN_DOWN, + CONTEXT_MENU_CORE_ALIGN_AUTO +}; + +enum ContextMenuCoreItemStatus +{ + CONTEXT_MENU_CORE_ITEM_STATUS_NORMAL = 0, /**< The normal state */ + CONTEXT_MENU_CORE_ITEM_STATUS_PRESSED, /**< The pressed state */ + CONTEXT_MENU_CORE_ITEM_STATUS_HIGHLIGHTED /**< The highlighted state */ +}; + +// Align Bound Base +enum ContextMenuCoreDropPosition +{ + CONTEXT_MENU_CORE_DROP_POSITION_INVALID = -1, + CONTEXT_MENU_CORE_DROP_POSITION_UP, + CONTEXT_MENU_CORE_DROP_POSITION_DOWN, + CONTEXT_MENU_CORE_DROP_POSITION_LEFT, + CONTEXT_MENU_CORE_DROP_POSITION_RIGHT, + + CONTEXT_MENU_CORE_DROP_POSITION_MAX +}; + +struct _ContextMenuItemInfo; + +/** + * @class _ContextMenu + * @brief + * @since 2.0 + * + * + * + * + */ +class _OSP_EXPORT_ _ContextMenu + : public _Window + , virtual public Tizen::Base::Runtime::IEventListener + , virtual public _IUiEventListener + , virtual public _IUiEventPreviewer + , public _IAccessibilityListener + , virtual public _IFrameEventListener +{ + DECLARE_CLASS_BEGIN(_ContextMenu, _Control); + DECLARE_PROPERTY("color", GetPropertyColor, SetPropertyColor); + DECLARE_PROPERTY("normalItemColor", GetPropertyNormalItemColor, SetPropertyNormalItemColor); + DECLARE_PROPERTY("pressedItemColor", GetPropertyPressedItemColor, SetPropertyPressedItemColor); + DECLARE_PROPERTY("highlightedItemColor", GetPropertyHighlightedItemColor, SetPropertyHighlightedItemColor); + DECLARE_PROPERTY("normalItemTextColor", GetPropertyNormalItemTextColor, SetPropertyNormalItemTextColor); + DECLARE_PROPERTY("pressedItemTextColor", GetPropertyPressedItemTextColor, SetPropertyPressedItemTextColor); + DECLARE_PROPERTY("highlightedItemTextColor", GetPropertyHighlightedItemTextColor, SetPropertyHighlightedItemTextColor); + DECLARE_PROPERTY("maxVisibleItemsCount", GetPropertyMaxVisibleItemsCount, SetPropertyMaxVisibleItemsCount); + DECLARE_CLASS_END(); + +// Properties + result SetPropertyMaxVisibleItemsCount(const Variant& count); + Variant GetPropertyMaxVisibleItemsCount(void) const; + + result SetPropertyColor(const Variant& color); + Variant GetPropertyColor(void) const; + + result SetPropertyNormalItemColor(const Variant& color); + Variant GetPropertyNormalItemColor(void) const; + + result SetPropertyPressedItemColor(const Variant& color); + Variant GetPropertyPressedItemColor(void) const; + + result SetPropertyHighlightedItemColor(const Variant & color); + Variant GetPropertyHighlightedItemColor(void) const; + + result SetPropertyNormalItemTextColor(const Variant& color); + Variant GetPropertyNormalItemTextColor(void) const; + + result SetPropertyPressedItemTextColor(const Variant& color); + Variant GetPropertyPressedItemTextColor(void) const; + + result SetPropertyHighlightedItemTextColor(const Variant & color); + Variant GetPropertyHighlightedItemTextColor(void) const; + +// Lifecycle +public: + _ContextMenu(const Tizen::Graphics::FloatPoint& point, enum ContextMenuCoreStyle style + , enum ContextMenuCoreAlign contextMenuAlign = CONTEXT_MENU_CORE_ALIGN_AUTO); + virtual ~_ContextMenu(void); + static _ContextMenu* CreateContextMenuN(const Tizen::Graphics::FloatPoint& point + , enum ContextMenuCoreStyle style, enum ContextMenuCoreAlign contextMenuAlign); + +// Operation +public: + result Install(void); + result Initialize(void); + result AddItem(const Base::String& text, int actionId, const Tizen::Graphics::Bitmap* pNormalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap); + 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); + 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); + result RemoveItemAt(int index); + result RemoveAllItems(void); + int GetItemCount(void) const; + result SetShowItemCount(int count); + int GetShowItemCount(void) const; + int GetShowItemMaxCount(void) const; + int GetItemIndexAt(int actionId) const; + int GetItemActionIdAt(int index) const; + result SetAnchorPosition(float x, float y); + Tizen::Graphics::FloatPoint GetAnchorPosition(void) const; + result SetWindowRect(const Tizen::Graphics::FloatRectangle& rect); + Tizen::Graphics::FloatRectangle GetWindowRect(void) const; + result SetBodyRect(const Tizen::Graphics::FloatRectangle& rect); + Tizen::Graphics::FloatRectangle GetBodyRect(void) const; + result SetArrowRect(const Tizen::Graphics::FloatRectangle& rect); + Tizen::Graphics::FloatRectangle GetArrowRect(void) const; + result SetItemRect(const Tizen::Graphics::FloatRectangle& rect); + Tizen::Graphics::FloatRectangle GetItemRect(void) const; + result SetTextColor(enum ContextMenuCoreItemStatus status, const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetTextColor(enum ContextMenuCoreItemStatus status) const; + result SetColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetColor(void) const; + result SetItemColor(enum ContextMenuCoreItemStatus status, const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetItemColor(enum ContextMenuCoreItemStatus status) const; + result AddActionEventListener(const Tizen::Ui::Controls::_IActionEventListener& listener); + result RemoveActionEventListener(const Tizen::Ui::Controls::_IActionEventListener& listener); + 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; + _ControlOrientation GetLayout(void) const; + + virtual result OnAttachedToMainTree(void); + virtual result OnDetachingFromMainTree(void); + virtual void OnFrameActivated(const Tizen::Ui::Controls::_Frame& source); + virtual void OnFrameDeactivated(const Tizen::Ui::Controls::_Frame& source); + 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); + virtual _UiTouchEventDelivery OnPreviewTouchReleased(const _Control& source, const _TouchInfo& touchinfo); + virtual _UiTouchEventDelivery OnPreviewTouchCanceled(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 void OnFontChanged(Tizen::Graphics::Font* pFont); + virtual void OnFontInfoRequested(unsigned long& style, float& size); + + virtual void OnVisibleStateChanged(void); + virtual void OnChangeLayout(_ControlRotation rotation); + virtual void OnOwnerChanged(_Control* pOldOwner); + virtual void OnTouchCaptureGained(void); + virtual void OnTouchCaptureLost(void); + + // Focus Ui + 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 OnDrawFocus(void); + virtual void OnFocusModeStateChanged(void); + + virtual bool OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityFocusMovedPrevious(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityReadingElement(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityFocusOut(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityValueIncreased(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityValueDecreased(const _AccessibilityContainer& control, const _AccessibilityElement& element); + + 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; + result SetTopDrawnItemIndex(int index); + + _ScrollPanel* GetScrollPanel(void); + +protected: + result SetPresenter(const _IContextMenuPresenter& ContextMenuPresenter); + +private: + result LoadBitmap(void); + result LoadColorReplacedBitmap(const Tizen::Graphics::Color& color); + void AdjustDropPosition(void); + void RemoveAllAccessibilityElement(void); + +private: + _ContextMenu(const _ContextMenu& rhs); + _ContextMenu& operator =(const _ContextMenu& rhs); + +// Attribute +private: + _IContextMenuPresenter* __pContextMenuPresenter; + enum ContextMenuCoreStyle __style; + enum ContextMenuCoreAlign __align; + int __showItemCount; + int __showItemMaxCount; + bool __isAttachedToMainTree; + bool __ownerInputEnableState; + +// attribute for position fo the window + Tizen::Graphics::FloatPoint __anchorPoint; // anchor point in the whole screen area + Tizen::Graphics::FloatRectangle __windowRect; // ContextMenu window in the whole screen area + Tizen::Graphics::FloatRectangle __bodyRect; // body area relative to window + Tizen::Graphics::FloatRectangle __arrowRect; // arrow area of relative to window + Tizen::Graphics::FloatRectangle __itemRect; // item area relative to window + +// attribute for event + _ActionEvent* __pActionEvent; + +// attribute for drawing + Tizen::Graphics::Bitmap* __pArrowNormalBitmap[CONTEXT_MENU_CORE_DROP_POSITION_MAX]; + 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; + enum _ControlRotation __rotation; + + Tizen::Graphics::Color __backgroundColor; + Tizen::Graphics::Color __textColor[CONTEXT_MENU_ITEM_STATUS_COUNT]; + Tizen::Graphics::Color __itemColor[CONTEXT_MENU_ITEM_STATUS_COUNT]; + + Tizen::Base::Collection::ArrayListT __actionId; + Tizen::Base::Collection::LinkedListT<_AccessibilityElement*> __accessibilityElements; + + _ScrollPanel* __pScrollPanel; +}; // _ContextMenu + +}}} // Tizen::Ui: Control + +#endif //_FUI_CTRL_INTERNAL_CONTEXT_MENU_H_ diff --git a/src/ui/inc/FUiCtrl_ContextMenuGridPresenter.h b/src/ui/inc/FUiCtrl_ContextMenuGridPresenter.h new file mode 100644 index 0000000..0178b84 --- /dev/null +++ b/src/ui/inc/FUiCtrl_ContextMenuGridPresenter.h @@ -0,0 +1,168 @@ +// +// 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_ContextMenuGridPresenter.h + * @brief This is the header file for the _ContextMenuGridPresenter class. + * + * This header file contains the declarations of the %_ContextMenuGridPresenter class. + */ +#ifndef _FUI_CTRL_INTERNAL_CONTEXTMENU_GRID_PRESENTER_H_ +#define _FUI_CTRL_INTERNAL_CONTEXTMENU_GRID_PRESENTER_H_ + +#include +#include "FUi_Control.h" +#include "FUiCtrl_ContextMenu.h" +#include "FUiCtrl_ContextMenuModel.h" +#include "FUiCtrl_IContextMenuPresenter.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _ContextMenu; +class _ContextMenuModel; +class _ContextMenuItem; + +/** + * @class _ContextMenuGridPresenter + * @brief + * @since 2.0 + * + * + * + * + */ +class _ContextMenuGridPresenter + : public _IContextMenuPresenter +{ +// Lifecycle +public: + _ContextMenuGridPresenter(_ContextMenu* pContextMenu); + virtual ~_ContextMenuGridPresenter(void); + +// Operation +public: + virtual result Install(void); + 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* 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); + virtual result CalculateWindowRect(void); + virtual result ApplyColorProperty(void); + + 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); + virtual _UiTouchEventDelivery OnPreviewTouchCanceled(const _Control& source, const _TouchInfo& touchinfo); + + virtual bool OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo); + virtual bool OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo); + virtual bool OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo); + virtual bool OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo); + + // Focus Ui + 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 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); + + virtual void SetAllAccessibilityElement(void); + + 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, bool isAppBitmap = false); + +private: + void LoadShape(void); + result CalculateRect(void); + result AdjustItemLayout(void); + void AdjustItemPosition(void); + Tizen::Graphics::FloatDimension AdjustItemLayoutIconStyle(void); + Tizen::Graphics::FloatDimension AdjustItemLayoutTabStyle(void); + bool IsLayoutBitmapOnly(void); + + _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); + int GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& point) const; + int GetCountPerLine(int count) const; +private: + _ContextMenuGridPresenter(const _ContextMenuGridPresenter& rhs); + _ContextMenuGridPresenter& operator =(const _ContextMenuGridPresenter& rhs); + +// Attribute +private: + _ContextMenu* __pContextMenu; + _ContextMenuModel* __pModel; + + Tizen::Graphics::_Text::TextObject* __pTextObject; + Tizen::Graphics::Font* __pFont; + Tizen::Graphics::FloatDimension __layoutSize; + + bool __touchOutRect; + int __selectedIndex; + int __pressedIndex; + int __showItemCount; + float __maxWidth; + float __minWidth; + float __topMargin; + float __bottomMargin; + float __leftMargin; + float __rightMargin; + float __screenTopMargin; + float __screenBottomMargin; + float __screenLeftMargin; + float __screenRightMargin; + float __arrowTopMargin; + float __arrowBottomMargin; + float __arrowRightMargin; + float __arrowLeftMargin; + float __arrowWidth; + float __arrowHeight; + float __itemWidth; + float __itemHeight; + float __itemMaxWidth; + float __itemTextMargin; + float __itemGap; + float __itemBitmapWidth; + float __itemBitmapHeight; + float __itemFontSize; + float __dividerHeight; + float __bgPressedMargin; + float __anchorPopupOverlap; + + bool __enterKeyPressed; + bool __backKeyPressed; + int __focusedIndex; + bool __focusLost; +}; // _ContextMenuGridPresenter + +}}} // Tizen::Ui: Control + +#endif //_FUI_CTRL_INTERNAL_CONTEXTMENU_GRID_PRESENTER_H_ diff --git a/src/ui/inc/FUiCtrl_ContextMenuImpl.h b/src/ui/inc/FUiCtrl_ContextMenuImpl.h new file mode 100644 index 0000000..7ce0d6e --- /dev/null +++ b/src/ui/inc/FUiCtrl_ContextMenuImpl.h @@ -0,0 +1,118 @@ +// +// 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_ContextMenuImpl.h + * @brief This is the header file for the _ContextMenuImpl class. + * + * This header file contains the declarations of the %_ContextMenuImpl class. + */ +#ifndef _FUI_CTRL_INTERNAL_CONTEXT_MENU_IMPL_H_ +#define _FUI_CTRL_INTERNAL_CONTEXT_MENU_IMPL_H_ + +#include +#include +#include +#include "FUi_WindowImpl.h" +#include "FUiCtrl_ContextMenu.h" +#include "FUiCtrl_IActionEventListener.h" +#include "FUiCtrl_PublicActionEvent.h" + +namespace Tizen { namespace Ui +{ +class _IWindow; +}} + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @class ContextMenuImpl + * @brief + * @since 1.0 + * + * + * + * + */ +class _ContextMenuImpl + : public _WindowImpl + , public _IActionEventListener + , virtual public Tizen::Base::Runtime::IEventListener +{ +// Lifecycle +public: + virtual ~_ContextMenuImpl(void); + static _ContextMenuImpl* CreateContextMenuImplN(ContextMenu* pPublic, const Tizen::Graphics::FloatPoint& point, ContextMenuStyle style, ContextMenuAnchorDirection direction); +// Operation +public: + result AddItem(const Tizen::Base::String& text, int actionId, const Tizen::Graphics::Bitmap* pNormalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap); + 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); + 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); + result RemoveItemAt(int index); + result RemoveAllItems(void); + int GetItemCount(void) const; + result SetMaxVisibleItemsCount(int maxItemsCount); + int GetMaxVisibleItemsCount(void) const; + int GetItemIndexFromActionId(int actionId) const; + int GetItemActionIdAt(int index) const; + result SetAnchorPosition(float x, float y); + Tizen::Graphics::FloatPoint GetAnchorPosition(void) const; + result SetColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetColor(void) const; + result SetItemTextColor(ContextMenuItemStatus status, const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetItemTextColor(ContextMenuItemStatus status) const; + result SetItemColor(ContextMenuItemStatus status, const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetItemColor(ContextMenuItemStatus status) const; + ContextMenuStyle GetPublicStyle(void) const; + result AddActionEventListener(Tizen::Ui::IActionEventListener& listener); + result RemoveActionEventListener(Tizen::Ui::IActionEventListener& listener); + + virtual void OnActionPerformed(const Tizen::Ui::_Control& source, int actionId); + +// Accessor +public: + + static _ContextMenuImpl* GetInstance(ContextMenu& contextMenu); + static const _ContextMenuImpl* GetInstance(const ContextMenu& contextMenu); + + virtual const char* GetPublicClassName(void) const; + virtual const ContextMenu& GetPublic(void) const; + virtual ContextMenu& GetPublic(void); + virtual const _ContextMenu& GetCore(void) const; + virtual _ContextMenu& GetCore(void); + +protected: + result _Dispose(void); + +private: + _ContextMenuImpl(ContextMenu* pPublic, _ContextMenu* pCore, ContextMenuStyle style); + + _ContextMenuImpl(const _ContextMenuImpl& rhs); + _ContextMenuImpl& operator =(const _ContextMenuImpl& rhs); + + +//attribute +private: + ContextMenuStyle __style; + _ContextMenu* __pContextMenu; + _PublicActionEvent* __pPublicActionEvent; + +}; // _ContextMenuImpl + +}}} // Tizen::Ui: Control + +#endif //_FUI_CTRL_INTERNAL_CONTEXT_MENU_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_ContextMenuItem.h b/src/ui/inc/FUiCtrl_ContextMenuItem.h new file mode 100644 index 0000000..171fceb --- /dev/null +++ b/src/ui/inc/FUiCtrl_ContextMenuItem.h @@ -0,0 +1,182 @@ +// +// 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_ContextMenuItem.h + * @brief This is the header file for the _ContextMenuItem class. + * + * This header file contains the declarations of the %_ContextMenuItem class. + */ +#ifndef _FUI_CTRL_INTERNAL_CONTEXTMENU_ITEM_H_ +#define _FUI_CTRL_INTERNAL_CONTEXTMENU_ITEM_H_ + +#include +#include +#include +#include +#include + +#include "FUi_Control.h" +#include "FUiCtrl_Label.h" + + +namespace Tizen { namespace Ui { namespace Controls +{ + +enum ContextMenuItemDrawingStatus +{ + CONTEXT_MENU_ITEM_DRAWING_STATUS_NORMAL = 0, + CONTEXT_MENU_ITEM_DRAWING_STATUS_PRESSED, + CONTEXT_MENU_ITEM_DRAWING_STATUS_HIGHLIGHTED, + CONTEXT_MENU_ITEM_DRAWING_STATUS_MAX +}; + +enum ContextMenuItemDrawingType +{ + CONTEXT_MENU_ITEM_DRAWING_TYPE_NONE = -1, + CONTEXT_MENU_ITEM_DRAWING_TYPE_TEXT, + CONTEXT_MENU_ITEM_DRAWING_TYPE_BITMAP +}; + +/** + * @class _ContextMenuItem + * @brief + * @since 2.0 + * + * + * + * + */ +class _ContextMenuItem + : public Tizen::Ui::_Control +{ +// Lifecycle + +public: + _ContextMenuItem(void); + virtual ~_ContextMenuItem(void); + + static _ContextMenuItem* CreateContextMenuItemN(void); + + void InitializeAccessibilityElement(void); + + void SetType(ContextMenuItemDrawingType type); + ContextMenuItemDrawingType GetType(void) const; + + void SetActionId(int actionId); + int GetActionId(void) const; + + void SetUpperDivider(bool drawDivider); + bool HasUpperDivider(void) const; // first item has no upper divider in List style + void SetLowerDivider(bool drawDivider); + bool HasLowerDivider(void) const; // last item has no lower divider in List style + + void SetTextSize(float size); + + result SetText(const Tizen::Base::String& text); + const Tizen::Base::String& GetText(void) const; + + result SetBitmap(ContextMenuItemDrawingStatus status, const Tizen::Graphics::Bitmap* pBitmap); + const Tizen::Graphics::Bitmap* GetBitmap(ContextMenuItemDrawingStatus status) const; + + void SetSize(Tizen::Graphics::FloatDimension size); + Tizen::Graphics::FloatDimension GetSize(void) const; + + void SetDrawRect(Tizen::Graphics::FloatRectangle rect); + Tizen::Graphics::FloatRectangle GetDrawRect(void) const; + + 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; + + bool IsSelected() const; + + int Release(void); + + void SetAndInvalidate(bool flag); + + virtual void OnBoundsChanged(void); + // draw + virtual void OnDraw(void); + void DrawItem(void); + void SetBitmapLabel(_Label* pLabel); + void SetTextLabel(_Label* pLabel); + void DrawItemUpperDivider(void); + void DrawItemBackground(void); + void DrawItemLowerDivider(void); + + void TouchMoved(const _Control& source, const _TouchInfo& touchinfo); + // event handler for ITouchEventListener + 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); + virtual _UiTouchEventDelivery OnPreviewTouchCanceled(const _Control& source, const _TouchInfo& touchinfo); + + virtual bool OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo); + virtual bool OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo); + virtual bool OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo); + virtual bool OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo); + + virtual void OnFontChanged(Tizen::Graphics::Font* pFont); + virtual void OnFontInfoRequested(unsigned long& style, float& size); + +private: + _ContextMenuItem(const _ContextMenuItem& rhs); + _ContextMenuItem& operator =(const _ContextMenuItem& rhs); + +// Attribute +private: + ContextMenuItemDrawingType __type; + int __actionId; + bool __upperDividerLine; + bool __lowerDividerLine; + + bool __pressed; + bool __selected; + bool __parentScrollEnable; + + float __leftMargin; + float __rightMargin; + float __dividerHeight; + float __bgPressedMargin; + + float __textSize; + Tizen::Base::String __text; + Tizen::Graphics::Bitmap* __pBitmap[CONTEXT_MENU_ITEM_DRAWING_STATUS_MAX]; + Tizen::Graphics::Bitmap* __pNormalBgBitmap; + Tizen::Graphics::Bitmap* __pSelectedBgBitmap; + Tizen::Graphics::FloatDimension __size; + Tizen::Graphics::FloatRectangle __drawRect; + Tizen::Graphics::FloatRectangle __pressedDrawRect; + Tizen::Graphics::Color __selectedBgColor; + Tizen::Graphics::Color __upperDividerLineColor; + Tizen::Graphics::Color __lowerDividerLineColor; + + _Label* __pBitmapLabel; + _Label* __pTextLabel; + _Label* __pUpperDividerLineLabel; + _Label* __pBackgroundLabel; + _Label* __pLowerDividerLineLabel; + +}; // _ContextMenuItem + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_CONTEXTMENU_ITEM_H_ diff --git a/src/ui/inc/FUiCtrl_ContextMenuListPresenter.h b/src/ui/inc/FUiCtrl_ContextMenuListPresenter.h new file mode 100644 index 0000000..b13afdc --- /dev/null +++ b/src/ui/inc/FUiCtrl_ContextMenuListPresenter.h @@ -0,0 +1,162 @@ +// +// 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_ContextMenuListPresenter.h + * @brief This is the header file for the _ContextMenuListPresenter class. + * + * This header file contains the declarations of the %_ContextMenuListPresenter class. + */ +#ifndef _FUI_CTRL_INTERNAL_CONTEXTMENU_LIST_PRESENTER_H_ +#define _FUI_CTRL_INTERNAL_CONTEXTMENU_LIST_PRESENTER_H_ + +#include +#include "FUi_Control.h" +#include "FUiCtrl_ContextMenu.h" +#include "FUiCtrl_ContextMenuModel.h" +#include "FUiCtrl_IContextMenuPresenter.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _ContextMenu; +class _ContextMenuModel; +class _ContextMenuItem; + +/** + * @class _ContextMenuListPresenter + * @brief + * @since 2.0 + * + * + * + * + */ +class _ContextMenuListPresenter + : public _IContextMenuPresenter +{ +// Lifecycle +public: + _ContextMenuListPresenter(_ContextMenu* pContextMenu); + virtual ~_ContextMenuListPresenter(void); + +// Operation +public: + virtual result Install(void); + 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); + void CalculateItemSize(const Base::String& text, ContextMenuItemDrawingType itemType, Tizen::Graphics::FloatDimension &textArea, Tizen::Graphics::FloatDimension &itemSize); + virtual result DeleteItem(int index); + virtual result DeleteItemAll(void); + virtual int CalculateShowItemCount(void); + virtual result CalculateWindowRect(void); + virtual result ApplyColorProperty(void); + + 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); + virtual _UiTouchEventDelivery OnPreviewTouchCanceled(const _Control& source, const _TouchInfo& touchinfo); + + virtual bool OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo); + virtual bool OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo); + virtual bool OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo); + virtual bool OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo); + + // Focus Ui + 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 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); + + virtual void SetAllAccessibilityElement(void); + + 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, bool isAppBitmap = false); + +private: + void LoadShape(void); + result CalculateRect(void); + void AdjustItemLayout(void); + void AdjustItemPosition(void); + Tizen::Graphics::FloatDimension AdjustItemLayoutStyle(void); + + _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); + +private: + _ContextMenuListPresenter(const _ContextMenuListPresenter& rhs); + _ContextMenuListPresenter& operator =(const _ContextMenuListPresenter& rhs); + +// Attribute +private: + _ContextMenu* __pContextMenu; + _ContextMenuModel* __pModel; + + Tizen::Graphics::Font* __pFont; + Tizen::Graphics::FloatDimension __layoutSize; + + bool __touchOutRect; + int __selectedIndex; + bool __scrollEnable; + + float __maxWidth; + float __minWidth; + float __topMargin; + float __bottomMargin; + float __leftMargin; + float __rightMargin; + float __screenTopMargin; + float __screenBottomMargin; + float __screenLeftMargin; + float __screenRightMargin; + float __arrowTopMargin; + float __arrowBottomMargin; + float __arrowRightMargin; + float __arrowLeftMargin; + float __arrowWidth; + float __arrowHeight; + float __itemWidth; + float __itemMinWidth; + float __itemHeight; + float __itemMaxWidth; + float __itemGap; + float __itemBitmapWidth; + float __itemBitmapHeight; + float __itemFontSize; + float __dividerHeight; + float __anchorPopupOverlap; + + bool __enterKeyPressed; + bool __backKeyPressed; + int __focusedIndex; + bool __focusLost; +}; // _ContextMenuListPresenter + +}}} // Tizen::Ui: Control + +#endif //_FUI_CTRL_INTERNAL_CONTEXTMENU_LIST_PRESENTER_H_ diff --git a/src/ui/inc/FUiCtrl_ContextMenuModel.h b/src/ui/inc/FUiCtrl_ContextMenuModel.h new file mode 100644 index 0000000..d30f430 --- /dev/null +++ b/src/ui/inc/FUiCtrl_ContextMenuModel.h @@ -0,0 +1,76 @@ +// +// 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_ContextMenuModel.h + * @brief This is the header file for the _ContextMenuModel class. + * + * This header file contains the declarations of the %_ContextMenuModel class. + */ +#ifndef _FUI_CTRL_INTERNAL_CONTEXTMENU_MODEL_H_ +#define _FUI_CTRL_INTERNAL_CONTEXTMENU_MODEL_H_ + +#include +#include +#include "FUiCtrl_ContextMenuItem.h" + +namespace Tizen { namespace Ui { namespace Controls +{ +/** + * @class _ContextMenuModel + * @brief + * @since 2.0 + * + * + * + * + */ + +class _ContextMenuModel + : public Tizen::Base::Object +{ +// Lifecycle +public: + _ContextMenuModel(void); + virtual ~_ContextMenuModel(void); + +// Operations +public: + result Construct(void); + int GetItemCount(void) const; + _ContextMenuItem* GetItem(int index) const; + result AddItem(_ContextMenuItem* pItem); + result InsertItem(_ContextMenuItem* pItem, int index); + result SetItem(_ContextMenuItem* pItem, int index); + result RemoveItem(int index); + result RemoveAllItem(void); + void ResetAllItem(void); + +private: + bool IsValidItem(_ContextMenuItem *pItem); + +private: + _ContextMenuModel(const _ContextMenuModel& rhs); + _ContextMenuModel& operator =(const _ContextMenuModel& rhs); + +// Attribute +private: + Tizen::Base::Collection::ArrayList __items; +}; // _ContextMenuModel + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_CONTEXTMENU_MODEL_H_ diff --git a/src/ui/inc/FUiCtrl_CustomElement.h b/src/ui/inc/FUiCtrl_CustomElement.h new file mode 100644 index 0000000..8e65c56 --- /dev/null +++ b/src/ui/inc/FUiCtrl_CustomElement.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 FUiCtrl_CustomElement.h + * @brief This is the header file for the _CustomElement class. + * + * This header file contains the declarations of the _CustomElement class. + */ + +#ifndef _FUI_CTRL_INTERNAL_CUSTOM_ELEMENT_H_ +#define _FUI_CTRL_INTERNAL_CUSTOM_ELEMENT_H_ + +#include "FUiCtrl_ICustomElement.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _CustomElement + : public _ICustomElement + , public Tizen::Base::Object +{ +public: + _CustomElement(int elementId); + + ~_CustomElement(void); + +public: + virtual bool DrawElement(Tizen::Graphics::Canvas* pCanvas, Tizen::Graphics::FloatRectangle& rect, ListViewItemDrawingStatus status); + + void SetElement(const Tizen::Ui::Controls::ICustomElement& element); + + void SetElement(const Tizen::Ui::Controls::ICustomElementF& element); + + int GetElementId(void) const; + +private: + Tizen::Ui::Controls::ICustomElement* __pElement; + Tizen::Ui::Controls::ICustomElementF* __pElementF; + int __elementId; + bool __usingFloatingPoint; +}; // _CustomElement + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_CUSTOM_ELEMENT_H_ diff --git a/src/ui/inc/FUiCtrl_CustomItemImpl.h b/src/ui/inc/FUiCtrl_CustomItemImpl.h new file mode 100644 index 0000000..44fa677 --- /dev/null +++ b/src/ui/inc/FUiCtrl_CustomItemImpl.h @@ -0,0 +1,88 @@ +// +// 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_CustomItemImpl.h + * @brief This is the header file for the _CustomItemImpl class. + * + * This header file contains the declarations of the _CustomItemImpl class. + */ + +#ifndef _FUI_CTRL_CUSTOM_ITEM_IMPL_H_ +#define _FUI_CTRL_CUSTOM_ITEM_IMPL_H_ + +#include "FUiCtrl_ListItemBaseImpl.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class ICustomElement; +class ICustomElementF; +class CustomItem; + +class _CustomItemImpl + : public _ListItemBaseImpl +{ +public: + static _CustomItemImpl* CreateCustomItemImplN(CustomItem* pPublic, const Tizen::Graphics::FloatDimension& itemSize, ListAnnexStyle style); + + virtual ~_CustomItemImpl(void); + + virtual CustomItem& GetPublic(void); + + virtual const char* GetPublicClassName(void) const; + + virtual result Construct(const Tizen::Graphics::FloatDimension& itemSize, ListAnnexStyle style); + + result AddElement(const Tizen::Graphics::FloatRectangle& rect, int elementId, const Tizen::Graphics::EnrichedText& text); + + result AddElement(const Tizen::Graphics::FloatRectangle& rect, int elementId, const Tizen::Base::String& text, bool textSliding = true); + + result AddElement(const Tizen::Graphics::FloatRectangle& rect, int elementId, const Tizen::Base::String& text, float textSize, + const Tizen::Graphics::Color& normalTextColor, const Tizen::Graphics::Color& pressedTextColor, + const Tizen::Graphics::Color& highlightedTextColor, bool textSliding = true); + + result AddElement(const Tizen::Graphics::FloatRectangle& rect, int elementId, const Tizen::Graphics::Bitmap& normalBitmap, + const Tizen::Graphics::Bitmap* pPressedBitmap = null, const Tizen::Graphics::Bitmap* pHighlightedBitmap = null); + + result AddElement(const Tizen::Graphics::FloatRectangle& rect, int elementId, const Tizen::Ui::Controls::ICustomElement& element); + + result AddElement(const Tizen::Graphics::FloatRectangle& rect, int elementId, const Tizen::Ui::Controls::ICustomElementF& element); + + result RemoveAllElements(void); + + result RemoveElement(int elementId); + + result SetElementSelectionEnabled(int elementId, bool enable); + + result SetElementTextHorizontalAlignment(int elementId, HorizontalAlignment alignment); + + result SetElementTextVerticalAlignment(int elementId, VerticalAlignment alignment); + + result SetElementAutoLinkMask(int elementId, unsigned long mask); + +private: + _CustomItemImpl(CustomItem* pPublic); + + _CustomItemImpl(const _CustomItemImpl& rhs); + + _CustomItemImpl& operator =(const _CustomItemImpl& rhs); +}; // _CustomItemImpl + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_CUSTOM_ITEM_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_CustomListElements.h b/src/ui/inc/FUiCtrl_CustomListElements.h new file mode 100644 index 0000000..1338722 --- /dev/null +++ b/src/ui/inc/FUiCtrl_CustomListElements.h @@ -0,0 +1,292 @@ +// +// 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_CustomListElements.h + * @brief This is the header file for the classes related to implementing elements in CustomListItem. + * + * This header file contains the declarations of the helper classes of _CustomListItemImpl. + */ + +#ifndef _FUI_CTRL_INTERNAL_CUSTOM_LIST_ELEMENTS_H_ +#define _FUI_CTRL_INTERNAL_CUSTOM_LIST_ELEMENTS_H_ + +#include +#include +#include +#include +#include +#include +#include "FUiCtrl_IListItemCommon.h" +#include "FUiCtrl_ListBaseImpl.h" +#include "FGrp_TextTextObject.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class ICustomListElement; + +enum ListElementType +{ + LIST_ITEM_ELEMENT_TYPE_TEXT, + LIST_ITEM_ELEMENT_TYPE_BITMAP, + LIST_ITEM_ELEMENT_TYPE_CUSTOM, + LIST_ITEM_ELEMENT_TYPE_CHECKBOX +}; + +struct _ElementViewParams +{ + TableViewItemBase* pTableViewItemBase; + class _ElementBaseModel* pElementModel; + class _ElementFormatData* pElementFormatData; + _CustomListItemImpl* pCustomListItemImpl; + + bool isDividerEnabled; + TableViewAnnexStyle annexStyle; + Tizen::Graphics::Bitmap** pCheckBitmaps; + Tizen::Base::Collection::LinkedList* pElementFormat; +}; //_ElementViewParams + +class _ElementBaseModel + : public Tizen::Base::Object +{ +public: + _ElementBaseModel(void); + ~_ElementBaseModel(void); + + virtual void HandleElementEvent(CustomListItemStatus itemStatus); + int GetElementId(void); + CustomListItemStatus GetItemStatus(void); + + virtual result CreateElementView(_ElementViewParams& elementParams) = 0; + +private: + _ElementBaseModel(const _ElementBaseModel& rhs); + _ElementBaseModel& operator =(const _ElementBaseModel& rhs); + +protected: + int _elementId; + ListElementType _elementType; + CustomListItemStatus _itemStatus; + + friend class _CustomListItemImpl; + friend class _TableViewItemData; + friend class _CustomListImpl; + friend class _ExpandableListImpl; + friend class _ListImpl; + friend class _SlidableListImpl; + friend class _GroupedListImpl; + friend class _SlidableGroupedListImpl; + friend class _ListBaseImpl; + +}; //_ElementBaseModel + +class _TextElementModel + : public _ElementBaseModel +{ +public: + _TextElementModel(const Tizen::Base::String& text); + ~_TextElementModel(void); + + void GetData(Tizen::Base::String& text, Tizen::Graphics::Color& textColor, int& textSize) const; + int GetTextSize(void) const; + result CreateElementView(_ElementViewParams& elementParams); + void SetTextSliding(bool enable); + bool GetTextSliding(void); + +private: + _TextElementModel(const _TextElementModel& rhs); + _TextElementModel& operator =(const _TextElementModel& rhs); + +private: + Tizen::Base::String __text; + int __textSize; + bool __slidingEnabled; + Tizen::Graphics::Color __textColor[CUSTOM_LIST_ITEM_STATUS_FOCUSED + 1]; + + friend class _CustomListItemImpl; + friend class _GroupedListImpl; + +}; //_TextElementModel + +class _BitmapElementModel + : public _ElementBaseModel +{ +public: + _BitmapElementModel(void); + ~_BitmapElementModel(void); + + Tizen::Graphics::Bitmap* GetData(void) const; + +private: + _BitmapElementModel(const _BitmapElementModel& rhs); + _BitmapElementModel& operator =(const _BitmapElementModel& rhs); + + result CreateElementView(_ElementViewParams& elementParams); + +private: + Tizen::Graphics::Bitmap* __pBitmap[CUSTOM_LIST_ITEM_STATUS_FOCUSED + 1]; + + friend class _CustomListItemImpl; + friend class _GroupedListImpl; +}; //_BitmapElementModel + + +class _CustomElementModel + : public _ElementBaseModel +{ +public: + _CustomElementModel(void); + ~_CustomElementModel(void); + ICustomListElement* GetData(void) const; + + result CreateElementView(_ElementViewParams& elementParams); + +private: + _CustomElementModel(const _CustomElementModel& rhs); + _CustomElementModel& operator =(const _CustomElementModel& rhs); + +private: + ICustomListElement* __pListElement; + + friend class _CustomListItemImpl; +}; //_CustomElementModel + +class _CheckElementModel + : public _ElementBaseModel +{ +public: + _CheckElementModel(void); + ~_CheckElementModel(void); + void GetData(Tizen::Graphics::Rectangle& bitmapBounds, bool& isDividerEnabled, bool& leftDivider, bool& rightDivider) const; + Tizen::Graphics::Bitmap* GetCheckBitmap(_BitmapType bitmapType) const; + + void SetCheckBoxStatus(_CheckBoxBitmapType checkBoxStatus); + _CheckBoxBitmapType GetCheckBoxStatus(void); + const _CheckBoxBitmapType GetCheckBoxStatus(void) const; + + result CreateElementView(_ElementViewParams& elementParams); + +private: + _CheckElementModel(const _CheckElementModel& rhs); + _CheckElementModel& operator =(const _CheckElementModel& rhs); + +private: + _CheckBoxBitmapType __checkBoxStatus; + Tizen::Graphics::Bitmap** __pCheckBitmaps; + bool __isDividerEnabled; + bool __rightDivider; + bool __leftDivider; + Tizen::Graphics::Rectangle __bitmapBounds; + + friend class _CustomListItemImpl; +}; + +class _ElementBaseView + : public Panel +{ +public: + _ElementBaseView(void); + virtual ~_ElementBaseView(void); + + virtual int GetElementId(void) const; + +private: + _ElementBaseView(const _ElementBaseView& rhs); + _ElementBaseView& operator =(const _ElementBaseView& rhs); + +protected: + _ElementBaseModel* __pElementBaseModel; +}; + +class _TextElementView + : public _ElementBaseView +{ +public: + _TextElementView(Tizen::Graphics::_Text::TextObject* pText); + ~_TextElementView(void); + + result OnDraw(void); + void SetModel(_TextElementModel* pTextElementModel); + + void StartTextSlide(void); + void StopTextSlide(void); + +private: + _TextElementView(const _TextElementView& rhs); + _TextElementView& operator =(const _TextElementView& rhs); + +private: + Tizen::Graphics::_Text::TextObject* __pText; +}; + +class _BitmapElementView + : public _ElementBaseView +{ +public: + _BitmapElementView(void); + ~_BitmapElementView(void); + + result OnDraw(void); + void SetModel(_BitmapElementModel* pBitmapElementModel); + +private: + _BitmapElementView(const _BitmapElementView& rhs); + _BitmapElementView& operator =(const _BitmapElementView& rhs); + +}; + +class _CustomElementView + : public _ElementBaseView +{ +public: + _CustomElementView(void); + ~_CustomElementView(void); + + result OnDraw(void); + void SetModel(_CustomElementModel* pCustomElementModel); + +private: + _CustomElementView(const _CustomElementView& rhs); + _CustomElementView& operator =(const _CustomElementView& rhs); + +}; + +class _CheckElementView + : public _ElementBaseView +{ +public: + _CheckElementView(void); + ~_CheckElementView(void); + + result OnDraw(void); + void SetModel(_CheckElementModel* pCheckElementModel); + void SetPressed(bool pressedState); + +private: + _CheckElementView(const _CheckElementView& rhs); + _CheckElementView& operator =(const _CheckElementView& rhs); + +private: + bool __pressedState; + Tizen::Graphics::Color __leftHalfDividerColor; + Tizen::Graphics::Color __rightHalfDividerColor; +}; + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_CUSTOM_LIST_ELEMENTS_H_ diff --git a/src/ui/inc/FUiCtrl_CustomListImpl.h b/src/ui/inc/FUiCtrl_CustomListImpl.h new file mode 100644 index 0000000..e329ed4 --- /dev/null +++ b/src/ui/inc/FUiCtrl_CustomListImpl.h @@ -0,0 +1,153 @@ +// +// 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_CustomListImpl.h + * @brief This is the header file for the _CustomListImpl class. + * + * This header file contains the declarations of the _CustomListImpl class and its helper classes. + */ + +#ifndef _FUI_CTRL_INTERNAL_CUSTOM_LIST_IMPL_H_ +#define _FUI_CTRL_INTERNAL_CUSTOM_LIST_IMPL_H_ + +#include +#include +#include +#include +#include "FUiCtrl_TableViewItemProvider.h" +#include +#include "FUiCtrl_TableView.h" +#include "FUi_ControlImpl.h" +#include "FUiCtrl_ITableViewItemEventListener.h" +#include "FUiCtrl_ListBaseImpl.h" + +namespace Tizen { namespace Ui { namespace Controls +{ +extern const int INVALID_INDEX; + +class CustomListItem; +class _CustomListImpl; + +class _CustomListItemDataProvider + : public ITableViewItemProvider +{ +public: + _CustomListItemDataProvider(_CustomListImpl* pList); + virtual ~_CustomListItemDataProvider(void); + + virtual int GetItemCount(void); + virtual TableViewItem* CreateItem(int index, int itemWidth); + virtual bool DeleteItem(const int itemIndex, TableViewItem* pItem); + virtual void UpdateItem(int itemIndex, TableViewItem* pItem); + virtual int GetDefaultItemHeight(void); + +private: + _CustomListItemDataProvider(void); + _CustomListItemDataProvider(const _CustomListItemDataProvider& rhs); + _CustomListItemDataProvider& operator =(const _CustomListItemDataProvider& rhs); + +private: + _CustomListImpl* __pList; +}; //_CustomListItemDataProvider + + +class _CustomListImpl + : public _ListBaseImpl + , public _ITableViewItemEventListener +{ +public: + virtual ~_CustomListImpl(void); + virtual const char* GetPublicClassName(void) const; + virtual const CustomList& GetPublic(void) const; + virtual CustomList& GetPublic(void); + virtual const _TableView& GetCore(void) const; + virtual _TableView& GetCore(void); + + result Initialize(void); + result AddCustomItemEventListener(const ICustomItemEventListener& listener); + result RemoveCustomItemEventListener(const ICustomItemEventListener& listener); + result AddItem(const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID); + result SetItemAt(int index, const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID); + result InsertItemAt(int index, const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID); + result RemoveItemAt(int index); + result RemoveAllItems(void); + result SetItemEnabled(int index, bool enable); + bool IsItemEnabled(int index) const; + result SetItemChecked(int index, bool check); + bool IsItemChecked(int index) const; + result SetAllItemsChecked(bool check); + result RemoveAllCheckedItems(void); + int GetFirstCheckedItemIndex(void) const; + int GetLastCheckedItemIndex(void) const; + int GetNextCheckedItemIndexAfter(int index) const; + int GetItemIndexFromItemId(int itemId) const; + void ScrollToBottom(void); + void ScrollToTop(void); + result ScrollToTop(int index); + result RefreshItem(int index); + int GetItemIdAt(int index) const; + result InitializeBounds(const Tizen::Graphics::Rectangle& rect); + + void OnTableViewItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status); + void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::_TableView& tableView, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pContextItem, bool activated); + void OnTableViewItemReordered(Tizen::Ui::Controls::_TableView& tableView, int itemIndexFrom, int itemIndexTo); + void OnGroupedTableViewGroupItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status); + void OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status); + void OnGroupedTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pContextItem, bool activated); + void OnGroupedTableViewItemReordered(_TableView& tableView, int groupIndexFrom, int itemIndexFrom, int groupIndexTo, int itemIndexTo); + void OnSectionTableViewItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int sectionIndex, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status); + void OnSectionTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::_TableView& tableView, int sectionIndex, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pContextItem, bool activated); + void OnTableViewItemSwept(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewSweepDirection direction); + + static _CustomListImpl* CreateCustomListImplN(CustomList* pControl, const Tizen::Graphics::Rectangle& bounds, bool itemDivider); + static _CustomListImpl* GetInstance(CustomList& customList); + static const _CustomListImpl* GetInstance(const CustomList& customList); + + Tizen::Graphics::Bitmap** GetCheckBitmaps(); + result SetItemChecked(int groupIndex, int itemIndex, bool check); + bool IsItemChecked(int groupIndex, int subIndex) const; + +private: + _CustomListImpl(Control* pPublic, _TableView* pCore); + _CustomListImpl(const _CustomListImpl& rhs); + _CustomListImpl& operator =(const _CustomListImpl& rhs); + + void ProcessItemStateChange(int groupIndex, int itemIndex, int elementId, ItemStatus itemStatus); + void ProcessItemStateChange(int groupIndex, int itemIndex, ItemStatus itemStatus); + +private: + _CustomListItemDataProvider* __pItemProvider; + Tizen::Base::Collection::LinkedList __itemListenersList; + bool __directDelete; + + friend class _CustomListItemDataProvider; + friend class _ExpandableListImpl; + friend class _SlidableListImpl; + friend class _GroupedListImpl; + friend class _SlidableGroupedListImpl; + friend class _SlidableListItemProvider; + friend class _SlidableGroupedListItemProvider; + friend class _ListImpl; + friend class _TableViewItemData; + friend class _CustomListItemImpl; + +}; //_CustomListImpl + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_CUSTOM_LIST_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_CustomListItemFormatImpl.h b/src/ui/inc/FUiCtrl_CustomListItemFormatImpl.h new file mode 100644 index 0000000..171de12 --- /dev/null +++ b/src/ui/inc/FUiCtrl_CustomListItemFormatImpl.h @@ -0,0 +1,93 @@ +// +// 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_CustomListItemFormatImpl.h + * @brief This is the header file for the _CustomListItemFormatImpl class. + * + * This header file contains the declarations of the _CustomListItemFormatImpl class and its helper classes. + */ + +#ifndef _FUI_CTRL_INTERNAL_CUSTOM_LIST_ITEM_FORMAT_IMPL_H_ +#define _FUI_CTRL_INTERNAL_CUSTOM_LIST_ITEM_FORMAT_IMPL_H_ + +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _ElementFormatData + : public Tizen::Base::Object +{ +public: + _ElementFormatData(void); + ~_ElementFormatData(void); + +private: + _ElementFormatData(const _ElementFormatData& rhs); + _ElementFormatData& operator =(const _ElementFormatData& rhs); + +public: + int elementId; + Tizen::Graphics::Rectangle rect; + int textSize; + Tizen::Graphics::Color normalTextColor; + Tizen::Graphics::Color focusedTextColor; + Tizen::Graphics::Color highlightedTextColor; + bool enable; +}; //_ElementFormatData + + +class _CustomListItemFormatImpl + : public Tizen::Base::Object +{ +public: + virtual ~_CustomListItemFormatImpl(void); + static _CustomListItemFormatImpl* CreateInstanceN(void); + + result AddElement(int elementId, const Tizen::Graphics::Rectangle& rect); + result AddElement(int elementId, const Tizen::Graphics::Rectangle& rect, int textSize); + result AddElement(int elementId, const Tizen::Graphics::Rectangle& rect, int textSize, const Tizen::Graphics::Color& normalTextColor, const Tizen::Graphics::Color& focusedTextColor); + 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); + + Tizen::Graphics::Rectangle GetElement(int elementId) const; + int GetFirstElementId(void); + int GetFirstEnabledElementId(void); + int GetNextElementId(int elementId); + int GetNextEnabledElementId(int elementId); + int GetPreviousEnabledElementId(int elementId); + bool IsElementEventEnabled(int elementId); + void SetElementEventEnabled(int elementId, bool enable); + + _ElementFormatData* GetElementFormatById(int elementId); + +private: + _CustomListItemFormatImpl(void); + _CustomListItemFormatImpl(const _CustomListItemFormatImpl& rhs); + _CustomListItemFormatImpl& operator =(const _CustomListItemFormatImpl& rhs); + + _ElementFormatData* CreateElementN(int elementId); + +public: + Tizen::Base::Collection::LinkedList elementFormatDataList; +}; //_CustomListItemFormatImpl + +}}} //Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_CUSTOM_LIST_ITEM_FORMAT_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_CustomListItemImpl.h b/src/ui/inc/FUiCtrl_CustomListItemImpl.h new file mode 100644 index 0000000..39771d7 --- /dev/null +++ b/src/ui/inc/FUiCtrl_CustomListItemImpl.h @@ -0,0 +1,215 @@ +// +// 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_CustomListItemImpl.h + * @brief This is the header file for the _CustomListItemImpl class. + * + * This header file contains the declarations of the _CustomListItemImpl class and its helper classes. + */ + +#ifndef _FUI_CTRL_INTERNAL_CUSTOM_LIST_ITEM_IMPL_H_ +#define _FUI_CTRL_INTERNAL_CUSTOM_LIST_ITEM_IMPL_H_ + +#include +#include +#include +#include +#include +#include +#include "FUiCtrl_CustomListElements.h" + + +namespace Tizen { namespace Ui { namespace Controls +{ + +extern const int INVALID_INDEX; + +struct _TableViewItemParams +{ + CustomListItem* pItem; + float width; + int groupIndex; + int itemIndex; + int itemId; + bool isDividerEnabled; + Tizen::Graphics::Bitmap** pCheckBitmaps; + TableViewAnnexStyle annexStyle; +}; // _TableViewItemParams + +struct _TableViewItemUpdateParams +{ + CustomListItem* pItem; + bool isDividerEnabled; + Tizen::Graphics::Bitmap** pCheckBitmaps; + TableViewAnnexStyle annexStyle; +}; // _TableViewItemUpdateParams + +class _ITableViewBaseItemData +{ +public: + virtual ~_ITableViewBaseItemData(void) {} + + virtual void GetIndex(int& mainIndex, int& subIndex) const = 0; +}; //_ITableViewBaseItemData + +class _TableViewItemData + : public TableViewItem + , public _ITableViewBaseItemData +{ +public: + _TableViewItemData(void); + ~_TableViewItemData(void); + + result SetEnabled(bool enable); + + void GetIndex(int& mainIndex, int& subIndex) const; + +private: + _TableViewItemData(const _TableViewItemData& rhs); + _TableViewItemData& operator =(const _TableViewItemData& rhs); + +public: + int itemIndex; + int groupIndex; +}; //_TableViewItemData + +class _TableViewGroupItemData + : public TableViewGroupItem + , public _ITableViewBaseItemData +{ + +public: + _TableViewGroupItemData(); + ~_TableViewGroupItemData(); + + result SetEnabled(bool enable); + + void GetIndex(int& mainIndex, int& subIndex) const; + +private: + _TableViewGroupItemData(const _TableViewGroupItemData& rhs); + _TableViewGroupItemData& operator =(const _TableViewGroupItemData& rhs); + +public: + int groupIndex; +}; // _TableViewGroupItemData + +class _CustomListItemImpl + : public Tizen::Base::Object + , public Tizen::Ui::ITouchEventListener + , public Tizen::Base::Runtime::ITimerEventListener +{ + +public: + virtual ~_CustomListItemImpl(void); + static _CustomListItemImpl* CreateInstanceN(int itemHeight); + void Initialize(int itemHeight); + result SetCheckBox(int elementId); + result SetElement(int elementId, const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pFocusedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap); + result SetElement(int elementId, const Tizen::Base::String& text); + result SetElement(int elementId, const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pFocusedBitmap); + result SetElement(int elementId, const ICustomListElement& element); + void SetFocusedItemBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap); + void SetNormalItemBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap); + void SetHighlightedItemBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap); + void UpdateBitmaps(void); + _CheckElementModel* GetCheckElement(void); + + result SetTextSliding(int elementId, bool enable); + void StartSliding(void); + void StopSliding(void); + + // Timer Callback API + void OnTimerExpired(Tizen::Base::Runtime::Timer& timer); + + static result SetDividerRequired(Tizen::Base::Collection::LinkedList& elementFormatList, Tizen::Graphics::Rectangle& checkElementBounds, bool& leftDivider, bool& rightDivider); + static result CreateTableViewItem(_TableViewItemParams& tableViewItemParams); + static TableViewItemBase* CreateTableViewItemN(_TableViewItemParams& tableViewItemParams); + static TableViewItemBase* CreateTableViewGroupItemN(_TableViewItemParams& tableViewItemParams); + static result UpdateTableViewItem(_TableViewItemUpdateParams& updateItemParams); + + result SetElementData(_ElementBaseModel* pElement); + void SetBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap, TableViewItemDrawingStatus status); + _ElementBaseView* GetViewById(int elementId) const; + + virtual void OnTouchDoublePressed (const Tizen::Ui::Control &source, const Tizen::Graphics::Point ¤tPosition, const Tizen::Ui::TouchEventInfo &touchInfo); + virtual void OnTouchFocusIn (const Tizen::Ui::Control &source, const Tizen::Graphics::Point ¤tPosition, const Tizen::Ui::TouchEventInfo &touchInfo); + virtual void OnTouchFocusOut (const Tizen::Ui::Control &source, const Tizen::Graphics::Point ¤tPosition, const Tizen::Ui::TouchEventInfo &touchInfo); + virtual void OnTouchLongPressed (const Tizen::Ui::Control &source, const Tizen::Graphics::Point ¤tPosition, const Tizen::Ui::TouchEventInfo &touchInfo); + virtual void OnTouchMoved (const Tizen::Ui::Control &source, const Tizen::Graphics::Point ¤tPosition, const Tizen::Ui::TouchEventInfo &touchInfo); + virtual void OnTouchPressed (const Tizen::Ui::Control &source, const Tizen::Graphics::Point ¤tPosition, const Tizen::Ui::TouchEventInfo &touchInfo); + virtual void OnTouchReleased (const Tizen::Ui::Control &source, const Tizen::Graphics::Point ¤tPosition, const Tizen::Ui::TouchEventInfo &touchInfo); + + static _CustomListItemFormatImpl* GetFormatImpl(CustomListItem* pItem); + static _CustomListItemImpl* GetItemImpl(CustomListItem* pItem); + + static void DeleteCustomListItem(Tizen::Base::Object* pObj); + static _ListBaseImpl* GetListBaseImplFromElement(const Control& element); + +private: + _CustomListItemImpl(int itemHeight); + _CustomListItemImpl(const _CustomListItemImpl& rhs); + _CustomListItemImpl& operator =(const _CustomListItemImpl& rhs); + + _ElementBaseModel* GetElementModelById(int elementId) const; + _ElementBaseView* GetElementViewById(int elementId) const; + void RemoveElement(int elementId); + + void UpdateItemBackground(const Control& element, bool isDividerEnabled); + void UpdateElements(const Control &source, int elementId, bool isPressed, bool isDividerEnabled); + bool IsElementEventEnabled(const Control& source); + CustomListItem* GetItemFromElement(const Control& source) const; + void GetIndexFromElement(const Control& source, int& groupIndex, int& itemIndex) const; + + bool IsElementIdValid(Tizen::Base::Collection::LinkedList* pElementFormat, int elementId) const; + + void StartTextSlideTimer(void); + void StopTextSlideTimer(void); +public: + float height; + int itemId; + Tizen::Base::Collection::LinkedList elements; + +private: + static const int TEXT_SLIDING_TIMER_DURATION = 60; + + _TableViewItemData* __pTableViewItemData; + _TableViewGroupItemData* __pTableViewGroupItemData; + Tizen::Base::Collection::ArrayList* __pSubItemsList; + Tizen::Base::Runtime::Timer* __pTextSlideTimer; + Tizen::Graphics::Bitmap* __pBitmaps[CUSTOM_LIST_ITEM_STATUS_FOCUSED + 1]; + bool __isMoved; + + friend class _CustomListImpl; + friend class _ExpandableListImpl; + friend class _ListImpl; + friend class _SlidableListImpl; + friend class _GroupedListImpl; + friend class _SlidableGroupedListImpl; + friend class _ListBaseImpl; + + friend class _GroupedListItemDataProvider; + friend class _CustomListItemDataProvider; + friend class _ExpandableListItemDataProvider; + friend class _SlidableListItemProvider; + friend class _SlidableGroupedListItemProvider; + friend class _ListItemDataProvider; +}; //_CustomListItemImpl + +}}} //Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_CUSTOM_LIST_ITEM_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_DatePickerImpl.h b/src/ui/inc/FUiCtrl_DatePickerImpl.h new file mode 100644 index 0000000..180adc0 --- /dev/null +++ b/src/ui/inc/FUiCtrl_DatePickerImpl.h @@ -0,0 +1,99 @@ +// +// 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_DatePickerImpl.h + * @brief This is the header file for the _DatePickerImpl class. + */ + +#ifndef _FUI_CTRL_INTERNAL_DATEPICKER_IMPL_H_ +#define _FUI_CTRL_INTERNAL_DATEPICKER_IMPL_H_ + +#include +#include "FUi_WindowImpl.h" +#include "FUiCtrl_DateTimePicker.h" +#include "FUiCtrl_IDateTimeChangeEventListener.h" +#include "FUiCtrl_PublicDateTimeChangeEvent.h" + +namespace Tizen { namespace Ui +{ +class IDateChangeEventListener; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _DatePickerImpl + : public _WindowImpl + , public _IDateTimeChangeEventListener + , virtual public Tizen::Base::Runtime::IEventListener +{ +public: + class DatePickerSizeInfo : public _ControlImpl::SizeInfo + { + virtual Tizen::Graphics::FloatDimension GetDefaultMinimumSizeF(_ControlOrientation orientation) const; + virtual Tizen::Graphics::FloatDimension GetDefaultMaximumSizeF(_ControlOrientation orientation) const; + }; + +public: + static _DatePickerImpl* CreateDatePickerImplN(DatePicker* pControl, const Tizen::Base::String& title = L""); + virtual ~_DatePickerImpl(void); + + virtual const char* GetPublicClassName(void) const; + virtual const DatePicker& GetPublic(void) const; + virtual DatePicker& GetPublic(void); + virtual const _DateTimePicker& GetCore(void) const; + virtual _DateTimePicker& GetCore(void); + + result AddDateChangeEventListener(Tizen::Ui::IDateChangeEventListener& listener); + result RemoveDateChangeEventListener(Tizen::Ui::IDateChangeEventListener& listener); + + void SetDate(const Tizen::Base::DateTime& date); + Tizen::Base::DateTime GetDate(void) const; + + void SetCurrentDate(void); + result SetDay(int day); + int GetDay(void) const; + result SetMonth(int month); + int GetMonth(void) const; + result SetYear(int year); + int GetYear(void) const; + + result SetYearRange(int minYear, int maxYear); + result GetYearRange(int& minYear, int& maxYear) const; + + virtual result OnAttachedToMainTree(void); + virtual void OnDateTimeChanged(const Tizen::Ui::_Control& source, int year, int month, int day, int hour, int minute); + virtual void OnDateTimeChangeCanceled(const Tizen::Ui::_Control& source); + virtual void OnChangeLayout(Tizen::Ui::_ControlOrientation orientation); + +public: + static _DatePickerImpl* GetInstance(DatePicker& datePicker); + static const _DatePickerImpl* GetInstance(const DatePicker& datePicker); + +private: + _DatePickerImpl(DatePicker* pPublic, _DateTimePicker* pCore); + _DatePickerImpl(const _DatePickerImpl&); + _DatePickerImpl& operator =(const _DatePickerImpl&); + +private: + _PublicDateTimeChangeEvent* __pPublicDateTimeChangeEvent; +}; // _DatePickerImpl + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_DATEPICKER_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_DateTimeBar.h b/src/ui/inc/FUiCtrl_DateTimeBar.h new file mode 100644 index 0000000..a280ac4 --- /dev/null +++ b/src/ui/inc/FUiCtrl_DateTimeBar.h @@ -0,0 +1,170 @@ +// +// 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_DateTimeBar.h + * @brief This is the header file for the _DateTimeBar class. + * + * This header file contains the declarations of the %_DateTimeBar class. + */ +#ifndef _FUI_CTRL_INTERNAL_DATETIME_BAR_H_ +#define _FUI_CTRL_INTERNAL_DATETIME_BAR_H_ + +#include +#include +#include +#include +#include "FUi_Window.h" +#include "FUi_UiTouchEvent.h" +#include "FUi_IAccessibilityListener.h" +#include "FUi_AccessibilityContainer.h" +#include "FUi_AccessibilityElement.h" +#include "FUiCtrl_IActionEventListener.h" +#include "FUiCtrl_ActionEvent.h" +#include "FUiCtrl_DateTimeDefine.h" +#include "FUiCtrl_DateTimeChangeEvent.h" +#include "FUiCtrl_IDateTimeChangeEventListener.h" +#include "FUi_ITouchFlickGestureEventListener.h" + +namespace Tizen { namespace Ui +{ +class _AccessibilityElement; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ +class _DateTimeBarPresenter; + +class _DateTimeBar + : public _Window + , public _IAccessibilityListener + , virtual public Tizen::Ui::_ITouchFlickGestureEventListener + , virtual public Tizen::Base::Runtime::IEventListener + , virtual public _IUiEventListener + , virtual public _IUiEventPreviewer + , public Tizen::Ui::Animations::IVisualElementAnimationStatusEventListener +{ +public: + virtual ~_DateTimeBar(void); + static _DateTimeBar* CreateDateTimeBarN(_Control&); + +public: + result SetPositionAndAlignment(const Tizen::Graphics::FloatPoint& point, _DateTimeBarAlignment alignment); + + result SetInitialValue(int minValue, int maxValue, int displayValue, _DateTimeId boxId); + result RemoveAllItems(void); + + _DateTimeId GetSelectedBoxId(void) const; + + int GetItemCount(void) const; + + _DateTimeBarAlignment GetAlignment(void) const; + + result AddActionEventListener(const _IActionEventListener& listener); + result RemoveActionEventListener(const _IActionEventListener& listener); + + result AddDateTimeChangeEventListener(const _IDateTimeChangeEventListener& listener); + result RemoveDateTimeChangeEventListener(const _IDateTimeChangeEventListener& listener); + + result CalculateArrowBounds(const Tizen::Graphics::FloatRectangle& bounds); + + result FireActionEvent(int actionId); + result FireDateTimeChangeEvent(_DateTimeChangeStatus status); + + virtual void OnDraw(void); + 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); + virtual bool OnTouchMoved(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo); + virtual bool OnTouchCanceled(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo); + virtual void OnTouchMoveHandled(const Tizen::Ui::_Control& control); + virtual result OnAttachedToMainTree(void); + virtual result OnDetachingFromMainTree(void); + virtual void OnActivated(void); + virtual void OnDeactivated(void); + virtual bool OnFlickGestureDetected(_TouchFlickGestureDetector& gesture); + virtual bool OnFlickGestureCanceled(_TouchFlickGestureDetector& gesture); + void AddAccessibilityElement(const Tizen::Graphics::FloatRectangle& itemBounds, const Tizen::Base::String& itemText); + void InsertAccessibilityElementAt(int index, const Tizen::Graphics::FloatRectangle& itemBounds, const Tizen::Base::String& itemText); + void RemoveAllAccessibilityElement(void); + void RemoveAccessibilityElementAt(int index); + const char* GetAccessibilityTraitValue() const; + Tizen::Base::String GetMonthValue(int month) const; + void SetFont(Tizen::Graphics::Font& pFont); + void SetParentWindowBounds(Tizen::Graphics::FloatRectangle& parentWindowBounds); + Tizen::Graphics::FloatRectangle GetParentWindowBounds() const; + void RefreshItems(void); + void RemoveAllAnimations(void); + + virtual bool OnFocusGained(const _Control &source); + virtual bool OnFocusLost(const _Control &source); + virtual void OnFocusModeStateChanged(void); + void OnDrawFocus(void); + bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo); + bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo); + + // accessibility listener + virtual bool OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityFocusMovedPrevious(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityReadingElement(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityFocusOut(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityValueIncreased(const Tizen::Ui::_AccessibilityContainer&, const Tizen::Ui::_AccessibilityElement&); + virtual bool OnAccessibilityValueDecreased(const Tizen::Ui::_AccessibilityContainer&, const Tizen::Ui::_AccessibilityElement&); + _AccessibilityElement* GetAccessibilityElementAt(int index) const; + int GetIndexFromAccessibilityElementPoint(const Tizen::Graphics::FloatPoint& point) const; + + void CloseDateTimeBar(void); + 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){} + + void ChangeLayout(void); + void ClearPreviousText(void); + +private: + _DateTimeBar(void); + + _DateTimeBar(const _DateTimeBar&); + _DateTimeBar& operator =(const _DateTimeBar&); + + void SetAlignment(_DateTimeBarAlignment alignment); + void SetSelectedBoxId(_DateTimeId boxId); + void InitializeAccessibilityElement(void); + Tizen::Ui::Animations::VisualElementAnimationGroup* CreateAnimationN(Tizen::Ui::Animations::VisualElement& source, bool open); +private: + static const int ANIMATION_DURATION = 167; + static const int POSITION_ANIMATION_VALUE = 20; + + _DateTimeBarPresenter* __pDateTimeBarPresenter; + _ActionEvent* __pActionEvent; + + _DateTimeId __selectedBoxId; + _DateTimeBarAlignment __alignment; + _DateTimeChangeEvent* __pDateTimeChangeEvent; + _TouchFlickGestureDetector* __pGestureFlick; + Tizen::Base::Collection::LinkedListT<_AccessibilityElement*> __accessibilityElements; + Tizen::Graphics::FloatRectangle __parentWindowBounds; + _Control* __pOwner; + int __accessibilityFocusOutIndex; + bool __isAnimating; +}; // _DateTimeBar + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_DATETIME_BAR_H_ diff --git a/src/ui/inc/FUiCtrl_DateTimeBarItem.h b/src/ui/inc/FUiCtrl_DateTimeBarItem.h new file mode 100644 index 0000000..5aaa45e --- /dev/null +++ b/src/ui/inc/FUiCtrl_DateTimeBarItem.h @@ -0,0 +1,68 @@ +// +// 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_DateTimeBarItem.h + * @brief This is the header file for the _DateTimeBarItem class. + * + * This header file contains the declarations of the %_DateTimeBarItem class. + */ +#ifndef _FUI_CTRL_INTERNAL_DATETIMEBAR_ITEM_H_ +#define _FUI_CTRL_INTERNAL_DATETIMEBAR_ITEM_H_ + +#include "FUi_Control.h" +#include "FUiCtrl_DateTimeDefine.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _DateTimeBarItem + : public Tizen::Base::Object +{ +public: + ~_DateTimeBarItem(void); + +public: + static _DateTimeBarItem* CreateInstanceN(_DateTimeBarAlignment alignment, float itemWidth); + void SetActionId(int actionId); + int GetActionId(void) const; + + void SetText(const Tizen::Base::String& text); + Tizen::Base::String GetText(void) const; + + void SetStatus(_DateTimeBarItemStatus status); + _DateTimeBarItemStatus GetStatus(void) const; + + void SetBounds(const Tizen::Graphics::FloatRectangle& bounds); + Tizen::Graphics::FloatRectangle GetBounds(void) const; + +private: + _DateTimeBarItem(void); + + _DateTimeBarItem(const _DateTimeBarItem&); + _DateTimeBarItem& operator =(const _DateTimeBarItem&); + +private: + int __actionId; + Tizen::Base::String __text; + _DateTimeBarItemStatus __status; + Tizen::Graphics::FloatRectangle __bounds; +}; // _DateTimeBarItem + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_DATETIMEBAR_ITEM_H_ diff --git a/src/ui/inc/FUiCtrl_DateTimeBarModel.h b/src/ui/inc/FUiCtrl_DateTimeBarModel.h new file mode 100644 index 0000000..b6c4b45 --- /dev/null +++ b/src/ui/inc/FUiCtrl_DateTimeBarModel.h @@ -0,0 +1,85 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiCtrl_DateTimeBarModel.h + * @brief This is the implementation file for the _DateTimeBarModel class. + */ + +#ifndef _FUI_CTRL_INTERNAL_DATETIMEBAR_MODEL_H_ +#define _FUI_CTRL_INTERNAL_DATETIMEBAR_MODEL_H_ + +#include "FUiCtrl_DateTimeBarItem.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _DateTimeBarModel + : public Tizen::Base::Object +{ +public: + _DateTimeBarModel(void); + virtual ~_DateTimeBarModel(void); + +public: + static _DateTimeBarModel* CreateInstanceN(void); + + void SetSelectedItemIndex(int index); + int GetSelectedItemIndex(void) const; + + void SetFirstDrawnItemIndex(int index); + int GetFirstDrawnItemIndex(void) const; + + int GetItemCount(void) const; + + result AddItem(const Tizen::Base::String& text, int actionId, _DateTimeBarAlignment alignment, float itemWidth, float margin); + result InsertItemAt(int index, const Tizen::Base::String& text, int actionId, _DateTimeBarAlignment alignment, float itemWidth, float margin); + + result RemoveItemAt(int index); + void RemoveAllItems(void); + + const _DateTimeBarItem* GetItemAt(int index) const; + _DateTimeBarItem* GetItemAt(int index); + + int GetMinimumValue(void) const; + void SetMinimumValue(int minValue); + + int GetMaximumValue(void) const; + void SetMaximumValue(int maxValue); + + int GetMaxCachingSize(void) const; + result SetItemStartPosition(float positionX); + +private: + _DateTimeBarModel(const _DateTimeBarModel&); + + _DateTimeBarModel& operator =(const _DateTimeBarModel&); + +private: + Tizen::Base::Collection::ArrayList __dateTimeBarItems; + + int __selectedItemIndex; + int __firstDrawnItemIndex; + int __minValue; + int __maxValue; + int __maxCachingSize; + float __itemStartPositionX; +}; // _DateTimeBarModel + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_DATETIMEBAR_MODEL_H_ diff --git a/src/ui/inc/FUiCtrl_DateTimeBarPresenter.h b/src/ui/inc/FUiCtrl_DateTimeBarPresenter.h new file mode 100644 index 0000000..49eaab3 --- /dev/null +++ b/src/ui/inc/FUiCtrl_DateTimeBarPresenter.h @@ -0,0 +1,186 @@ +// +// 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_DateTimeBarPresenter.h + * @brief This is the header file for the _DateTimeBarPresenter class. + * + * This header file contains the declarations of the %_DateTimeBarPresenter class. + */ + +#ifndef _FUI_CTRL_INTERNAL_DATETIMEBAR_PRESENTER_H_ +#define _FUI_CTRL_INTERNAL_DATETIMEBAR_PRESENTER_H_ + +#include +#include "FUiCtrl_DateTimeBarModel.h" +#include "FUi_ITouchFlickGestureEventListener.h" +#include "FUiCtrl_FlickAnimation.h" + +namespace Tizen { namespace Ui { namespace Controls +{ +class _DateTimeBar; + +class _DateTimeBarPresenter + : public Tizen::Base::Object + , public Tizen::Base::Runtime::ITimerEventListener +{ +public: + _DateTimeBarPresenter(_DateTimeBar* pDateTimeBar); + virtual ~_DateTimeBarPresenter(void); + +public: + static _DateTimeBarPresenter* CreateInstanceN(_DateTimeBar& dateTimeBar); + void AddFlickAnimationInfo(); + + result CalculateWindowBounds(void); + result LoadArrowBitmap(void); + result Draw(void); + + result AddItems(int actionId); + result RemoveAllItems(void); + + Tizen::Graphics::FloatRectangle GetBodyBounds(void) const; + void SetArrowBounds(const Tizen::Graphics::FloatRectangle& bounds); + Tizen::Graphics::FloatRectangle GetWindowBounds(void) const; + Tizen::Graphics::FloatRectangle GetArrowBounds(void) const; + + int GetItemCount(void) const; + _DateTimeBarItem* GetItemAt(int index) const; + + int GetFirstDrawnItemIndex(void) const; + + int GetMinimumValue(void) const; + void SetMinimumValue(int minValue); + + int GetMaximumValue(void) const; + void SetMaximumValue(int maxValue); + + void ChangeFocusStatus(void); + void FocusModeChanged(void); + void SetItemFocused(bool isFocused); + void SetFocusedItemBounds(void); + + float GetItemWidth(void) const; + float GetItemMargin(void) const; + float GetFontSize(void) const; + float GetLeftRightMargin(void) const; + + bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo); + bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo); + virtual bool OnTouchPressed(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo); + virtual bool OnTouchReleased(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo); + virtual bool OnTouchMoved(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo); + virtual bool OnTouchCanceled(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo); + virtual void OnTouchMoveHandled(const Tizen::Ui::_Control& control); + virtual bool OnFlickGestureDetected(int distanceX,int distanceY,int duration); + void StartFlickAnimation(void); + void StartAnimationEffect(void); + void SetInitialAnimationValue(float animationValue); + void SetFont(Tizen::Graphics::Font& pFont); + int GetSelectedItemIndex(void) const; + void MoveNext(void); + void MovePrevious(void); + + 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); + result InsertItem(int index, int actionId); + result DeleteItem(int index); + + result DrawItem(Tizen::Graphics::Canvas& canvas); + result DrawBackground(Tizen::Graphics::Canvas& canvas); + result DrawArrow(Tizen::Graphics::Canvas& canvas); + + result SetItemStatus(int index, _DateTimeBarItemStatus status); + _DateTimeBarItemStatus GetItemStatus(int index) const; + + result LoadItems(); + + result StartFlickAnimationTimer(void); + result ResetFlickAnimationTimer(void); + + void SetItemSelected(int index); + + void SetFirstDrawnItemIndex(int index); + int GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& point) const; + + void SetWindowBounds(const Tizen::Graphics::FloatRectangle& bounds); + void SetBodyBounds(const Tizen::Graphics::FloatRectangle& bounds); + result AdjustItemPosition(float distance); + result AdjustAccessibilityElementPosition(float distance); + void AddAccessibilityElement(void); + void InsertAccessibilityElementAt(int index); + + Tizen::Base::String GetDisplayedText(int value) const; + result LoadResource(void); + + _DateTimeBarPresenter(const _DateTimeBarPresenter&); + _DateTimeBarPresenter& operator =(const _DateTimeBarPresenter&); + + virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer); + void ValidateAndAdjustStartPosition(void); + +private: + _DateTimeBar* __pDateTimeBar; + _DateTimeBarModel* __pDateTimeBarModel; + + Tizen::Graphics::FloatPoint __currentPoint; + bool __isTouchMoved; + bool __touchMoveHandled; + bool __isFlickEnabled; + bool __isFlickInProgress; + float __distance; + Tizen::Base::Runtime::Timer* __pFlickAnimationTimer; + _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; + static const int FLICK_ANIMATION_SENSITIVITY_DATE_TIME_BAR = 30; + static const int FLICK_ANIMATION_VELOCITY_FACTOR_DATE_TIME_BAR = 2; + + Tizen::Graphics::FloatRectangle __bodyAreaBounds; + Tizen::Graphics::FloatRectangle __arrowAreaBounds; + Tizen::Graphics::FloatRectangle __windowAreaBounds; + Tizen::Graphics::Bitmap* __pBgColorReplacementBitmap; + Tizen::Graphics::Bitmap* __pFocusBitmap; + Tizen::Graphics::Bitmap* __pArrowColorReplacementBitmap; + bool __isInitialAnimation; + int __initialAnimationValue; + Tizen::Graphics::Font* __pFont; + bool __isFocused; + int __focusedIndex; + Tizen::Graphics::FloatRectangle __focusBounds; + int __focusedValue; + static const int UPDATE_ITEM_COUNT = 6; + bool __isFlickCanceled; + bool __isChangeLayout; + +}; // _DateTimeBarPresenter + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_DATETIMEBAR_PRESENTER_H_ diff --git a/src/ui/inc/FUiCtrl_DateTimeChangeEvent.h b/src/ui/inc/FUiCtrl_DateTimeChangeEvent.h new file mode 100644 index 0000000..6ec2ef9 --- /dev/null +++ b/src/ui/inc/FUiCtrl_DateTimeChangeEvent.h @@ -0,0 +1,130 @@ +// +// 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_DateTimeChangeEvent.h + * @brief This is the header file for the _DateTimeChangeEvent and _DateTimeChangeEventArg classes. + */ + +#ifndef _FUI_CTRL_INTERNAL_DATETIME_CHANGE_EVENT_H_ +#define _FUI_CTRL_INTERNAL_DATETIME_CHANGE_EVENT_H_ + +#include +#include +#include +#include "FUiCtrl_DateTimeDefine.h" + +namespace Tizen { namespace Ui +{ +class _Control; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _DateTimeChangeEventArg + : public Tizen::Base::Runtime::IEventArg + , public Tizen::Base::Object +{ +public: + _DateTimeChangeEventArg(_DateTimeChangeStatus status); + + ~_DateTimeChangeEventArg(void); + + int GetYear(void) const; + + int GetMonth(void) const; + + int GetDay(void) const; + + int GetHour(void) const; + + int GetMinute(void) const; + + Tizen::Base::DateTime GetDateTime(void) const; + + void SetDateTime(const Tizen::Base::DateTime& dateTime); + + void SetTime(int hour, int minute); + + void SetDate(int year, int month, int day); + + _DateTimeChangeStatus GetStatus(void) const; + +private: + // Attributes + _DateTimeChangeStatus __status; + + int __year; + int __month; + int __day; + int __hour; + int __minute; + + Tizen::Base::DateTime __dateTime; + +}; // _DateTimeChangeEventArg + +/** +* @class _DateTimeChangeEvent +* @brief This class handle a Date change event. +*/ + +class _DateTimeChangeEvent + : public Tizen::Base::Runtime::_Event +{ +public: + /** + * This is the default class constructor. After creating an instance of this + * class, you must explicitly call one of construction methods to initialize + * the instance. + */ + _DateTimeChangeEvent(const Tizen::Ui::_Control& source); + + /** + * This is the class destructor. + */ + virtual ~_DateTimeChangeEvent(void); + + // Operations +protected: + /** + * This method checks the arg and finds out the type of event. After that this method calls appopriate + * pListener's method. + * + * @return This method returns a result code. + * @param[in] pListener It is a event listener related to this item event. + * @param[in] arg It is an argument-like instance of item event retransmitted to the listener's method + * as an argument. + * @exception E_SUCCESS - The method is successful. + * @exception E_ARG_NULL - The listener is null. + * @exception E_INVALID_ARG - The argument passed to a method contains an invalid value.@n + *   The pListener is not the instance of IItemEventListener class or + * the pItemEventArg is not the instance of __FlashEventArg class. + * + */ + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + + // Attributes +private: + Tizen::Ui::_Control* __pSource; +}; // _DateTimeChangeEvent + + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_DATETIME_CHANGE_EVENT_H_ diff --git a/src/ui/inc/FUiCtrl_DateTimeDefine.h b/src/ui/inc/FUiCtrl_DateTimeDefine.h new file mode 100644 index 0000000..0de9aa7 --- /dev/null +++ b/src/ui/inc/FUiCtrl_DateTimeDefine.h @@ -0,0 +1,174 @@ +// +// 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_DateTimeDefine.h + * @brief This is the header file for DateTimePicker defines. + * + * This header file contains the declarations of the %_DateTime picker define type + */ + +#ifndef _FUI_CTRL_INTERNAL_DATETIME_DEFINE_H_ +#define _FUI_CTRL_INTERNAL_DATETIME_DEFINE_H_ + +namespace Tizen { namespace Ui { namespace Controls +{ +const int DATETIME_YEAR_MAX = 9999; +const int DATETIME_YEAR_MIN = 1; + +const int DATETIME_MONTH_MAX = 12; +const int DATETIME_MONTH_MIN = 1; + +const int DATETIME_DAY_MAX = 31; +const int DATETIME_DAY_MIN = 1; + +const int DATETIME_HOUR_MAX = 23; +const int DATETIME_HOUR_MIN = 0; + +const int DATETIME_MINUTE_MAX = 59; +const int DATETIME_MINUTE_MIN = 0; + +const int DATETIME_SECOND_MAX = 59; +const int DATETIME_SECOND_MIN = 0; + +const int DATETIME_HOUR_MAX_FOR_24NOTATION = 12; + +const int DATETIME_FOUR_DIGIT_MAX = 9999; +const int DATETIME_THREE_DIGIT_MAX = 999; +const int DATETIME_TWO_DIGIT_MAX = 99; +const int DATETIME_ONE_DIGIT_MAX = 9; + +const int DATE_TIME_CHANGE_FOCUS_COUNTER_MIN = 0; +const int DATE_TIME_CHANGE_FOCUS_COUNTER_MAX = 4; + +enum _DateTimeInput +{ + DATETIME_INPUT_BEGIN = 1, + DATETIME_INPUT_END = 2 +}; + +enum _DateTimeOutputStyle +{ + DATETIME_OUTPUT_STYLE_INVALID = 0x0, /**< Invalid Style, for error check */ + DATETIME_OUTPUT_STYLE_DATE = 0x1, /**< DatePicker Style */ + DATETIME_OUTPUT_STYLE_TIME = 0x2, /**< TimePicker Style */ + DATETIME_OUTPUT_STYLE_DATETIME = 0x3 /**< DateTimePicker Style */ +}; + +enum _DateTimeArea +{ + DATETIME_AREA_NONE = 10, + DATETIME_AREA_OUTPUT = 20, + DATETIME_AREA_OUTPUT_AMPM = 30, + DATETIME_AREA_FOOTER = 40, + DATETIME_AREA_INPUT = 50 +}; + +enum _DateTimeEventId +{ + DATETIME_EVENT_ID_SAVE = 0, + DATETIME_EVENT_ID_CANCEL +}; + +enum _DateTimeHeaderId +{ + DATETIME_HEADER_NONE = -1, + DATETIME_HEADER_ID = 0, + DATETIME_HEADER_ID_MAX +}; + +/** +* @enum DateChangeStatus +* Defines constants used to identify date&time change status. +*/ +enum _DateTimeChangeStatus +{ + DATE_INTERNAL_CHANGE_SAVED, + DATE_INTERNAL_CHANGE_CANCELED, + DATETIME_INTERNAL_CHANGE_SAVED, + DATETIME_INTERNAL_CHANGE_CANCELED, + TIME_INTERNAL_CHANGE_SAVED, + TIME_INTERNAL_CHANGE_CANCELED +}; + +enum _DateTimeId +{ + DATETIME_ID_NONE = -1, + DATETIME_ID_YEAR = 0, + DATETIME_ID_MONTH, + DATETIME_ID_DAY, + DATETIME_ID_HOUR, + DATETIME_ID_MINUTE, + DATETIME_ID_MAX, + DATETIME_ID_AMPM = 99 +}; + +enum DateTimePickerStatus +{ + DATETIME_STATUS_NORMAL = 0, + DATETIME_STATUS_SELECTED, + DATETIME_STATUS_HIGHLIGHTED, + DATETIME_STATUS_DISABLED, + DATETIME_STATUS_MAX +}; + +enum _DateTimeBarItemStatus +{ + DATETIMEBAR_ITEM_STATUS_NORMAL = 0, + DATETIMEBAR_ITEM_STATUS_SELECTED, + DATETIMEBAR_ITEM_STATUS_HIGHLIGHTED, + DATETIMEBAR_ITEM_STATUS_MAX +}; + +enum _DateTimeBarAlignment +{ + DATETIME_BAR_ALIGN_DOWN = 0, + DATETIME_BAR_ALIGN_UP +}; + +enum _DateDisplayBoxId +{ + DATE_DISPLAY_BOX_LEFT = 0, + DATE_DISPLAY_BOX_CENTER, + DATE_DISPLAY_BOX_RIGHT, + DATE_DISPLAY_BOX_MAX +}; + +enum _InputPadStyle +{ + INPUTPAD_STYLE_NORMAL = 0, + INPUTPAD_STYLE_ALPHA, + INPUTPAD_STYLE_MAX +}; + +enum _DateFormat +{ + DATE_FORMAT_DDMMYYYY = 0, + DATE_FORMAT_MMDDYYYY, + DATE_FORMAT_YYYYMMDD, + DATE_FORMAT_YYYYDDMM +}; + +enum _TimeFormat +{ + TIME_FORMAT_12HOUR = 0, + TIME_FORMAT_24HOUR +}; + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_DATETIME_DEFINE_H_ diff --git a/src/ui/inc/FUiCtrl_DateTimeDisplayBox.h b/src/ui/inc/FUiCtrl_DateTimeDisplayBox.h new file mode 100644 index 0000000..a8d2f39 --- /dev/null +++ b/src/ui/inc/FUiCtrl_DateTimeDisplayBox.h @@ -0,0 +1,88 @@ +// +// 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_DateTimeDisplayBox.h + * @brief This is the header file for the _DateTimeDisplayBox class. + */ + +#ifndef _FUI_CTRL_INTERNAL_DATETIME_DISPLAY_BOX_H_ +#define _FUI_CTRL_INTERNAL_DATETIME_DISPLAY_BOX_H_ + +#include +#include "FUiCtrl_DateTimeDefine.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _DateTimeDisplayBox + : public Tizen::Base::Object +{ +public: + _DateTimeDisplayBox(const Tizen::Graphics::FloatRectangle& bounds, int boxId); + + virtual ~_DateTimeDisplayBox(void); + + void DrawDisplayBox(Tizen::Graphics::Canvas& canvas, DateTimePickerStatus status); + + Tizen::Graphics::FloatRectangle GetDisplayBoxBounds(void) const; + + bool SetText(const Tizen::Base::String& text); + + const Tizen::Base::String& GetText(void) const; + + int GetDisplayBoxId(void) const; + + void SetFocusable(bool focusable); + + void SetBackgroundBitmap(Tizen::Graphics::Bitmap **pBackgroundNormalBitmap, Tizen::Graphics::Bitmap **pBackgroundEffectBitmap); + + void UpdateDisplayBoxBounds(Tizen::Graphics::FloatRectangle& bounds); + + void SetFont(Tizen::Graphics::Font* pFont); + +protected: + void DrawBackground(Tizen::Graphics::Canvas& canvas, DateTimePickerStatus status); + + void DrawText(Tizen::Graphics::Canvas& canvas, DateTimePickerStatus status); + +private: + _DateTimeDisplayBox(const _DateTimeDisplayBox&); + + _DateTimeDisplayBox& operator =(const _DateTimeDisplayBox&); + +private: + Tizen::Graphics::FloatRectangle __windowBounds; + + int __boxId; + + Tizen::Graphics::_Text::TextObject* __pTextObject; + + Tizen::Base::String __text; + + bool __focusable; + + Tizen::Graphics::Color __textColor[DATETIME_STATUS_MAX]; + + Tizen::Graphics::Font* __pFont; + Tizen::Graphics::Bitmap* __pBackgroundNormalBitmap[DATETIME_STATUS_MAX]; + Tizen::Graphics::Bitmap* __pBackgroundEffectBitmap[DATETIME_STATUS_MAX]; +}; // _DateTimeDisplayBox + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_DATETIME_DISPLAY_BOX_H_ diff --git a/src/ui/inc/FUiCtrl_DateTimeModel.h b/src/ui/inc/FUiCtrl_DateTimeModel.h new file mode 100644 index 0000000..3299ba8 --- /dev/null +++ b/src/ui/inc/FUiCtrl_DateTimeModel.h @@ -0,0 +1,90 @@ +// +// 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_DateTimeModel.h + * @brief This is the header file for the _DateTimeModel class. + */ + +#ifndef _FUI_CTRL_INTERNAL_DATETIME_MODEL_H_ +#define _FUI_CTRL_INTERNAL_DATETIME_MODEL_H_ + +#include +#include +#include +#include "FUiCtrl_DateTimeDefine.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _DateTimeModel + : public Tizen::Base::Object +{ +public: + _DateTimeModel(void); + virtual ~_DateTimeModel(void); + +public: + result SetYear(int year); + int GetYear(void) const; + + result SetMonth(int month); + int GetMonth(void) const; + + result SetDay(int day); + int GetDay(void) const; + + result SetHour(int hour); + int GetHour(void) const; + + result SetMinute(int minute); + int GetMinute(void) const; + + result SetMaxYear(int maxYear); + result SetMinYear(int minYear); + result GetYearRange(int& minYear, int& maxYear) const; + + void SetCurrentDateTime(void); + + void SetDateTime(const Tizen::Base::DateTime& time); + Tizen::Base::DateTime GetDateTime(void) const; + +private: + _DateTimeModel(const _DateTimeModel&); + + _DateTimeModel& operator =(const _DateTimeModel&); + + void SetSecond(int second); + int GetSecond(void) const; + +private: + int __year; + int __month; + int __day; + + int __maxYear; + int __minYear; + + int __hour; + int __minute; + int __second; + +}; // _DateTimeModel + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_DATETIME_MODEL_H_ diff --git a/src/ui/inc/FUiCtrl_DateTimePicker.h b/src/ui/inc/FUiCtrl_DateTimePicker.h new file mode 100644 index 0000000..8809016 --- /dev/null +++ b/src/ui/inc/FUiCtrl_DateTimePicker.h @@ -0,0 +1,211 @@ +// +// 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_DateTimePicker.h + * @brief This is the header file for the _DateTimePicker class. + */ + +#ifndef _FUI_CTRL_INTERNAL_DATETIMEPICKER_H_ +#define _FUI_CTRL_INTERNAL_DATETIMEPICKER_H_ + +#include +#include +#include +#include + +#include "FUi_Window.h" +#include "FUiCtrl_IActionEventListener.h" +#include "FUiCtrl_DateTimeDefine.h" +#include "FUiAnim_VisualElement.h" +#include "FUi_IAccessibilityListener.h" + +namespace Tizen { namespace Ui +{ +class _AccessibilityElement; +//class _IAccessibilityListener; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _DateTimePresenter; +class _DateTimeChangeEvent; +class _IDateTimeChangeEventListener; +class _Toolbar; + +class _DateTimePicker + : public Tizen::Ui::_Window + , public _IActionEventListener + , virtual public Tizen::Base::Runtime::IEventListener + , virtual public Tizen::Ui::_IUiEventListener + , virtual public Tizen::Ui::_IUiEventPreviewer + , virtual public Tizen::Ui::_IAccessibilityListener + , virtual public Tizen::System::ISettingEventListener +{ + DECLARE_CLASS_BEGIN(_DateTimePicker, _Control); + DECLARE_PROPERTY("year", GetPropertyYear, SetPropertyYear); + DECLARE_PROPERTY("month", GetPropertyMonth, SetPropertyMonth); + DECLARE_PROPERTY("day", GetPropertyDay, SetPropertyDay); + DECLARE_PROPERTY("hour", GetPropertyHour, SetPropertyHour); + DECLARE_PROPERTY("minute", GetPropertyMinute, SetPropertyMinute); + DECLARE_PROPERTY("24hourNotation", GetProperty24HourNotation, SetProperty24HourNotation); + DECLARE_PROPERTY("minYearRange", GetPropertyMinYearRange, SetPropertyMinYearRange); + DECLARE_PROPERTY("maxYearRange", GetPropertyMaxYearRange, SetPropertyMaxYearRange); + DECLARE_PROPERTY("dateTime", GetPropertyDateTime, SetPropertyDateTime); + DECLARE_CLASS_END(); + + result SetPropertyYear(const Tizen::Ui::Variant& year); + Tizen::Ui::Variant GetPropertyYear(void) const; + + result SetPropertyMonth(const Tizen::Ui::Variant& month); + Tizen::Ui::Variant GetPropertyMonth(void) const; + + result SetPropertyDay(const Tizen::Ui::Variant& day); + Tizen::Ui::Variant GetPropertyDay(void) const; + + result SetPropertyHour(const Tizen::Ui::Variant& hour); + Tizen::Ui::Variant GetPropertyHour(void) const; + + result SetPropertyMinute(const Tizen::Ui::Variant& minute); + Tizen::Ui::Variant GetPropertyMinute(void) const; + + result SetProperty24HourNotation(const Tizen::Ui::Variant& enable); + Tizen::Ui::Variant GetProperty24HourNotation(void) const; + + result SetPropertyMinYearRange(const Tizen::Ui::Variant& minYear); + Tizen::Ui::Variant GetPropertyMinYearRange(void) const; + + result SetPropertyMaxYearRange(const Tizen::Ui::Variant& maxYear); + Tizen::Ui::Variant GetPropertyMaxYearRange(void) const; + + result SetPropertyDateTime(const Tizen::Ui::Variant& dateTime); + Tizen::Ui::Variant GetPropertyDateTime(void) const; + +public: + virtual ~_DateTimePicker(void); + + static _DateTimePicker* CreateDateTimePickerN(int style, const Tizen::Base::String& title = L""); + +public: + result AddDateTimeChangeEventListener(const _IDateTimeChangeEventListener& listener); + result RemoveDateTimeChangeEventListener(const _IDateTimeChangeEventListener& listener); + result FireDateTimeChangeEvent(_DateTimeChangeStatus status, Tizen::Base::DateTime& dateTime); + + result SetYear(int year); + int GetYear(void) const; + + result SetMonth(int month); + int GetMonth(void) const; + + result SetDay(int day); + int GetDay(void) const; + + result SetHour(int hour); + int GetHour(void) const; + + result SetMinute(int minute); + int GetMinute(void) const; + + void Set24HourNotationEnabled(bool enable); + bool Is24HourNotationEnabled(void) const; + + result SetYearRange(int minYear, int maxYear); + result GetYearRange(int& minYear, int& maxYear) const; + + void SetDateTime(const Tizen::Base::DateTime& dateTime); + Tizen::Base::DateTime GetDateTime(void) const; + + void SetCurrentDateTime(void); + + void SetFocusBoxId(int boxId); + + void SetAccessibilityElementText(int index, const Tizen::Base::String& text, bool isAmPm); + + virtual result OnAttachedToMainTree(void); + virtual result OnDetachingFromMainTree(void); + virtual void OnDraw(void); + virtual void OnChangeLayout(Tizen::Ui::_ControlOrientation orientation); + + virtual bool OnTouchPressed(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo); + virtual bool OnTouchMoved(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo); + 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); + + virtual void OnActionPerformed(const Tizen::Ui::_Control& source, int actionId); + + virtual bool OnAccessibilityFocusMovedNext(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return true;} + virtual bool OnAccessibilityFocusMovedPrevious(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return true;} + virtual bool OnAccessibilityReadingElement(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return true;} + virtual bool OnAccessibilityReadElement(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return true;} + virtual bool OnAccessibilityFocusIn(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return true;} + virtual bool OnAccessibilityFocusOut(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return true;} + virtual bool OnAccessibilityValueIncreased(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return true;} + virtual bool OnAccessibilityValueDecreased(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return true;} + virtual bool OnAccessibilityActionPerformed(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element); + + virtual void OnFontChanged(Tizen::Graphics::Font* pFont); + virtual void OnFontInfoRequested(unsigned long& style, float& size); + + virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo); + virtual bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo); + virtual void OnDrawFocus(void); + bool OnFocusGained(const _Control& source); + bool OnFocusLost(const _Control& source); + void OnFocusModeStateChanged(void); + + virtual void OnSettingChanged(Tizen::Base::String& key); + + Tizen::Graphics::Font* GetDateTimeFont(void); + result InitializeFont(void); + + result CreateFooter(void); + result DestroyFooter(void); + + result CreateDisplayVisualElement(void); + void SetDisplayVisualElementBounds(Tizen::Graphics::FloatRectangle bounds); + Tizen::Ui::Animations::_VisualElement* GetDisplayVisualElement(void); + +private: + _DateTimePicker(_DateTimePresenter* pPresenter, const Tizen::Base::String& title = L""); + + _DateTimePicker(const _DateTimePicker&); + _DateTimePicker& operator =(const _DateTimePicker&); + + result CreateAllAccessibilityElements(void); + void RemoveAllAccessibilityElements(void); +private: + _DateTimePresenter* __pPresenter; + + _Toolbar* __pFooter; + Tizen::Base::String __title; + + _DateTimeChangeEvent* __pDateTimeChangeEvent; + + Tizen::Graphics::Font* __pFont; + + Tizen::Ui::Animations::_VisualElement* __pDisplayVisualElement; + + Tizen::Base::Collection::LinkedListT __accessibilityElements; + + bool __isInFocusMode; + +}; // _DateTimePicker + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_DATETIMEPICKER_H_ diff --git a/src/ui/inc/FUiCtrl_DateTimePickerImpl.h b/src/ui/inc/FUiCtrl_DateTimePickerImpl.h new file mode 100644 index 0000000..76d7015 --- /dev/null +++ b/src/ui/inc/FUiCtrl_DateTimePickerImpl.h @@ -0,0 +1,106 @@ +// +// 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_DateTimePickerImpl.h + * @brief This is the header file for the _DateTimePickerImpl class. + */ + +#ifndef _FUI_CTRL_INTERNAL_DATETIMEPICKER_IMPL_H_ +#define _FUI_CTRL_INTERNAL_DATETIMEPICKER_IMPL_H_ + +#include +#include "FUi_WindowImpl.h" +#include "FUiCtrl_DateTimePicker.h" +#include "FUiCtrl_IDateTimeChangeEventListener.h" +#include "FUiCtrl_PublicDateTimeChangeEvent.h" + +namespace Tizen { namespace Ui +{ +class IDateTimeChangeEventListener; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _DateTimePickerImpl + : public _WindowImpl + , public _IDateTimeChangeEventListener + , virtual public Tizen::Base::Runtime::IEventListener +{ +public: + class DateTimePickerSizeInfo : public _ControlImpl::SizeInfo + { + virtual Tizen::Graphics::FloatDimension GetDefaultMinimumSizeF(_ControlOrientation orientation) const; + virtual Tizen::Graphics::FloatDimension GetDefaultMaximumSizeF(_ControlOrientation orientation) const; + }; +public: + static _DateTimePickerImpl* CreateDateTimePickerImplN(DateTimePicker* pControl, const Tizen::Base::String& title = L""); + virtual ~_DateTimePickerImpl(void); + + virtual const char* GetPublicClassName(void) const; + virtual const DateTimePicker& GetPublic(void) const; + virtual DateTimePicker& GetPublic(void); + virtual const _DateTimePicker& GetCore(void) const; + virtual _DateTimePicker& GetCore(void); + + result AddDateTimeChangeEventListener(Tizen::Ui::IDateTimeChangeEventListener& listener); + result RemoveDateTimeChangeEventListener(Tizen::Ui::IDateTimeChangeEventListener& listener); + + void SetDateTime(const Tizen::Base::DateTime& dateTime); + Tizen::Base::DateTime GetDateTime(void) const; + + void SetCurrentDateTime(void); + result SetYear(int year); + int GetYear(void) const; + result SetMonth(int month); + int GetMonth(void) const; + result SetDay(int day); + int GetDay(void) const; + result SetHour(int hour); + int GetHour(void) const; + result SetMinute(int minute); + int GetMinute(void) const; + + void Set24HourNotationEnabled(bool enable); + bool Is24HourNotationEnabled(void) const; + + result SetYearRange(int minYear, int maxYear); + result GetYearRange(int& minYear, int& maxYear) const; + + virtual result OnAttachedToMainTree(void); + virtual void OnDateTimeChanged(const Tizen::Ui::_Control& source, int year, int month, int day, int hour, int minute); + virtual void OnDateTimeChangeCanceled(const Tizen::Ui::_Control& source); + virtual void OnChangeLayout(Tizen::Ui::_ControlOrientation orientation); + +public: + static _DateTimePickerImpl* GetInstance(DateTimePicker& dateTimePicker); + static const _DateTimePickerImpl* GetInstance(const DateTimePicker& dateTimePicker); + +private: + _DateTimePickerImpl(DateTimePicker* pPublic, _DateTimePicker* pCore); + + _DateTimePickerImpl(const _DateTimePickerImpl&); + _DateTimePickerImpl& operator =(const _DateTimePickerImpl&); + +private: + _PublicDateTimeChangeEvent* __pPublicDateTimeChangeEvent; +}; // _DateTimePickerImpl + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_DATETIMEPICKER_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_DateTimePresenter.h b/src/ui/inc/FUiCtrl_DateTimePresenter.h new file mode 100644 index 0000000..e5f749e --- /dev/null +++ b/src/ui/inc/FUiCtrl_DateTimePresenter.h @@ -0,0 +1,248 @@ +// +// 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_DateTimePresenter.h + * @brief This is the header file for the _DateTimePresenter class. + */ + +#ifndef _FUI_CTRL_INTERNAL_DATETIME_PRESENTER_H_ +#define _FUI_CTRL_INTERNAL_DATETIME_PRESENTER_H_ + +#include +#include "FUi_Control.h" +#include "FUiCtrl_DateTimeDefine.h" +#include "FUiCtrl_IInputPadEventListener.h" + +namespace Tizen { namespace Ui { namespace Controls +{ +class _DateTimePicker; +class _DateTimeDisplayBox; +class _DateTimeModel; +class _InputPad; +}}} // Tizen::Ui::Controls + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _DateTimePresenter + : public _IInputPadEventListener + , virtual public Tizen::Base::Runtime::IEventListener +{ +public: + _DateTimePresenter(int pickerStyle, const Tizen::Base::String& title = L""); + + virtual ~_DateTimePresenter(void); + + result Construct(_DateTimePicker& view); + + result SetYear(int year); + + result SetMonth(int month); + + result SetDay(int day); + + result SetHour(int hour); + + result SetMinute(int minute); + + result SetYearRange(int minYear, int maxYear); + + int GetYear(void) const; + + int GetMonth(void) const; + + int GetDay(void) const; + + int GetHour(void) const; + + int GetMinute(void) const; + + result GetYearRange(int& minYear, int& maxYear) const; + + void Set24HourNotationEnabled(bool enable); + + bool Is24HourNotationEnabled(void) const; + + void SetCurrentDateTime(void); + + void SetDateTime(const Tizen::Base::DateTime& dateTime); + + Tizen::Base::DateTime GetDateTime(void) const; + + void SetFocusBoxId(int boxId); + + const _DateTimeDisplayBox* GetDisplayBox(int index) const; + + const _DateTimeDisplayBox* GetAmPmBox(void) const; + + bool Draw(void); + + result SetFont(Tizen::Graphics::Font* pFont); + + void UpdateLocaleDateTimeFormat(void); + + void UpdateTimeFormat(void); + + virtual void OnChangeLayout(Tizen::Ui::_ControlOrientation orientation); + + virtual bool OnTouchPressed(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo); + virtual bool OnTouchMoved(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo); + 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); + + virtual void OnInputPadValueChanged(const Tizen::Ui::_Control& source, int inputPadReturnValue); + + virtual void OnActionPerformed(const Tizen::Ui::_Control& source, int actionId); + + virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo); + virtual bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo); + result DrawFocus(void); + result ReleaseFocus(void); + +private: + void UpdateDateTimeOutputConfig(void); + + void LoadResource(void); + + void DrawColon(Tizen::Graphics::Canvas& canvas); + + void DrawDateTimeDisplayBox(Tizen::Graphics::Canvas& canvas, int index); + + void DrawPm(Tizen::Graphics::Canvas& canvas); + + void DrawBackground(Tizen::Graphics::Canvas& canvas); + + void DrawTitle(Tizen::Graphics::Canvas& canvas); + + void DrawDividers(Tizen::Graphics::Canvas& canvas); + + void ChangeInputPadStyle(int boxId); + + Tizen::Graphics::FloatRectangle GetOutputArea(void); + + int CalculateTouchArea(float posX, float posY); + + int CalculateTouchOutputArea(float posX, float posY); + + int CalculateTwoDigit(int originalNumber, int number); + + int CalculateFourDigit(int originalNumber, int number); + + int SetTwoDigit(int originalNumber, int number); + + int SetFourDigit(int originalNumber, int number); + + void SetNumberInBox(int boxId, int number); + + int GetNumberInBox(int boxId) const; + + void SetFocusBox(int index); + + void LoadPickerData(void); + + void SavePickerData(void); + + void UpdateDisplayData(int boxId); + + void AdjustDisplayValue(int index); + + void AdjustValue(int& value, int minValue, int maxValue); + + void ChangeFocusBox(void); + + void SetAccessibilityElementText(void); + + void HandleInputPadValueChange(int inputPadReturnValue); + + void HandleSaveCancelAction(int actionId); + +private: + _DateTimePresenter(const _DateTimePresenter&); + + _DateTimePresenter& operator =(const _DateTimePresenter&); + + void Dispose(void); + +private: + _DateTimePicker* __pView; + + _DateTimeModel* __pModel; + + int __selectedBoxIndex; + + int __focusedBoxIndex; + + _InputPad* __pInputPad; + + _InputPadStyle __inputPadType; + + int __pickerStyle; + + bool __inputPadEnabled; + + int __outputBoxMaxCount; + + int __year; + + int __month; + + int __day; + + int __hour; + + int __minute; + + bool __is24HourNotation; + + bool __dtp24HourSet; + + bool __isPm; + + bool __isPmButtonPressed; + + bool __isFocusBoxChanged; + + int __inputComposing; + + int __changeFocusCounter; + + Tizen::Base::String __title; + + Tizen::Graphics::Bitmap* __pDisplayBoxNormalBitmap[DATETIME_STATUS_MAX]; + Tizen::Graphics::Bitmap* __pDisplayBoxEffectBitmap[DATETIME_STATUS_MAX]; + + Tizen::Graphics::Bitmap* __pAmPmNormalBitmap[DATETIME_STATUS_MAX]; + Tizen::Graphics::Bitmap* __pAmPmEffectBitmap[DATETIME_STATUS_MAX]; + + Tizen::Graphics::Bitmap* __pColonBitmap; + Tizen::Graphics::Bitmap* __pColonDisabledBitmap; + Tizen::Graphics::Bitmap* __pBgNormalBitmap; + Tizen::Graphics::Bitmap* __pBgEffectBitmap; + + Tizen::Graphics::Font* __pFont; + + _DateTimeDisplayBox* __pDisplayBox[DATETIME_ID_MAX]; + + _DateTimeDisplayBox* __pPmBox; + + bool __keypadEnabled; +}; // _DateTimePresenter + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_DATETIME_PRESENTER_H_ diff --git a/src/ui/inc/FUiCtrl_DateTimeUtils.h b/src/ui/inc/FUiCtrl_DateTimeUtils.h new file mode 100644 index 0000000..8848cd9 --- /dev/null +++ b/src/ui/inc/FUiCtrl_DateTimeUtils.h @@ -0,0 +1,67 @@ +// +// 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_DateTimeUtils.h + * @brief This is the header file for the _DateTimeUtils class. + */ + +#ifndef _FUI_CTRL_INTERNAL_DATETIME_UTILS_H_ +#define _FUI_CTRL_INTERNAL_DATETIME_UTILS_H_ + +#include "FUi_Control.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +enum _AmPmType +{ + AM_TYPE, + PM_TYPE +}; + +class _DateTimeUtils + : public Tizen::Base::Object +{ +// Lifecycle +public: + _DateTimeUtils(void); + + virtual ~_DateTimeUtils(void); + +// Operations +public: + const Tizen::Base::String GetMonthString(int month) const; + const Tizen::Base::String GetEnglishMonthString(int month) const; + const Tizen::Base::String GetFullMonthString(int month) const; + int CalculateMaxDay(int displayYear, int month) const ; + bool IsLeapYear(int year) const; + void GetAmPm(Tizen::Base::String& timeFormat, _AmPmType amPmType) const; + int GetLocaleDateFormat(void) const; + +private: + _DateTimeUtils(const _DateTimeUtils&); + + _DateTimeUtils& operator =(const _DateTimeUtils&); + + static const int LOCALE_DATE_FORMAT_STRING_LENGTH = 8; + +}; + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_DATETIME_UTILS_H_ diff --git a/src/ui/inc/FUiCtrl_Edit.h b/src/ui/inc/FUiCtrl_Edit.h new file mode 100644 index 0000000..8e1a951 --- /dev/null +++ b/src/ui/inc/FUiCtrl_Edit.h @@ -0,0 +1,595 @@ +// +// 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_Edit.h + * @brief This is the header file for the _Edit class. + * + * This header file contains the declarations of the %_Edit class. + */ + +#ifndef _FUI_CTRL_INTERNAL_EDIT_H_ +#define _FUI_CTRL_INTERNAL_EDIT_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "FUi_Control.h" +#include "FUi_ITouchFlickGestureEventListener.h" +#include "FUi_ITouchLongPressGestureEventListener.h" +#include "FUi_ITouchTapGestureEventListener.h" +#include "FUi_ResourceManager.h" +#include "FUi_TouchFlickGestureDetector.h" +#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" +#include "FUiCtrl_LanguageEvent.h" +#include "FUiCtrl_LinkEvent.h" +#include "FUiCtrl_ScrollPanelEvent.h" +#include "FUiCtrl_TextBlockEvent.h" +#include "FUiCtrl_TextEvent.h" + +namespace Tizen { namespace Ui +{ +class _AccessibilityElement; +class _DragAndDropItem; + +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Animations +{ +class _VisualElement; +}}} + +namespace Tizen { namespace Ui { namespace Controls +{ + +struct EditColor +{ + Tizen::Graphics::Color textColor; + Tizen::Graphics::Color titleTextColor; + Tizen::Graphics::Color backgroundColor; +}; + +struct EditBlockTextColor +{ + bool used; + Tizen::Graphics::Color blockTextColor; +}; + +struct EditCutlinkColor +{ + Tizen::Graphics::Color cutlinkFgColor; + Tizen::Graphics::Color cutlinkBgColor; +}; + +enum EditCutLinkType +{ + EDIT_LINK_TYPE_INVALID = -1, + EDIT_LINK_TYPE_URL, + EDIT_LINK_TYPE_EMAIL, + EDIT_LINK_TYPE_PHONE_NUM, + EDIT_LINK_TYPE_STREAMING_URL, + EDIT_LINK_TYPE_MAX +}; + +enum EditTextHorizontalMargin +{ + EDIT_TEXT_LEFT_MARGIN, + EDIT_TEXT_RIGHT_MARGIN, + EDIT_TEXT_HORIZONTAL_MARGIN +}; + +enum EditTextVerticalMargin +{ + EDIT_TEXT_TOP_MARGIN, + EDIT_TEXT_BOTTOM_MARGIN, + EDIT_TEXT_VERTICAL_MARGIN +}; + +enum EditAccessibilityElementType +{ + EDIT_ACCESSIBILITY_ELEMENT_TYPE_TEXT, + EDIT_ACCESSIBILITY_ELEMENT_TYPE_CLEAR_ICON +}; + +const int EDIT_STYLE_SINGLE_LINE = 0x00000001; +const int EDIT_STYLE_NORMAL = 0x00000002; +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_FLEXIBLE = 0x01000000; +const int EDIT_STYLE_TOKEN = 0x02000000; +const int EDIT_COLOR_OPACITY = 100; +const int EDIT_AREA_DEFAULT_LIMIT_LENGTH = 1000; +const int EDIT_FIELD_DEFAULT_LIMIT_LENGTH = 100; + +const int EDIT_COLOR_MAX = 4; +const float DEFAULT_LINE_SPACE = 1.0f; + +/** + * @class _Edit + * @brief + * @since 2.0 + */ + +class _EditPresenter; +class _Form; +class _ScrollPanelItemEvent; +class _EditInternalTouchEventListener; +class _Toolbar; + +class _OSP_EXPORT_ _Edit + : public _Control + , virtual public Tizen::Base::Runtime::IEventListener + , virtual public Tizen::Ui::_IUiEventListener + , virtual public Tizen::Ui::_IUiEventPreviewer + , virtual public Tizen::Ui::_ITouchGestureEventListener + , public _ITouchFlickGestureEventListener + , public _ITouchLongPressGestureEventListener + , public _ITouchTapGestureEventListener + , public IClipboardPopupEventListener + , public _IFormActivationChangeEventListener + , public _IEditTextFilter + , public _IScrollEventListener + , virtual public Tizen::System::ISettingEventListener +{ +public: + DECLARE_CLASS_BEGIN(_Edit, _Control); + DECLARE_PROPERTY("autoResizingEnabled", GetPropertyAutoResizingEnabled, SetPropertyAutoResizingEnabled); + DECLARE_PROPERTY("guideTextColor", GetPropertyGuideTextColor, SetPropertyGuideTextColor); + DECLARE_PROPERTY("normalColor", GetPropertyNormalColor, SetPropertyNormalColor); + DECLARE_PROPERTY("disabledColor", GetPropertyDisabledColor, SetPropertyDisabledColor); + DECLARE_PROPERTY("highlightedColor", GetPropertyHighlightedColor, SetPropertyHighlightedColor); + DECLARE_PROPERTY("pressedColor", GetPropertyPressedColor, SetPropertyPressedColor); + DECLARE_PROPERTY("normalTextColor", GetPropertyNormalTextColor, SetPropertyNormalTextColor); + DECLARE_PROPERTY("disabledTextColor", GetPropertyDisabledTextColor, SetPropertyDisabledTextColor); + DECLARE_PROPERTY("highlightedTextColor", GetPropertyHighlightedTextColor, SetPropertyHighlightedTextColor); + DECLARE_PROPERTY("pressedTextColor", GetPropertyPressedTextColor, SetPropertyPressedTextColor); + DECLARE_PROPERTY("lineSpacing", GetPropertyLineSpacing, SetPropertyLineSpacing); + DECLARE_PROPERTY("textSize", GetPropertyTextSize, SetPropertyTextSize); + DECLARE_PROPERTY("cursorPosition", GetPropertyCursorPosition, SetPropertyCursorPosition); + DECLARE_PROPERTY("guideText", GetPropertyGuideText, SetPropertyGuideText); + DECLARE_PROPERTY("keypadActionEnabled", GetPropertyKeypadActionEnabled, SetPropertyKeypadActionEnabled); + DECLARE_PROPERTY("keypadAction", GetPropertyKeypadAction, SetPropertyKeypadAction); + DECLARE_PROPERTY("keypadEnabled", GetPropertyKeypadEnabled, SetPropertyKeypadEnabled); + DECLARE_PROPERTY("keypadStyle", GetPropertyKeypadStyle, SetPropertyKeypadStyle); + DECLARE_PROPERTY("lowerCaseModeEnabled", GetPropertyLowerCaseModeEnabled, SetPropertyLowerCaseModeEnabled); + DECLARE_PROPERTY("overlayKeypadCommandButtonVisible", GetPropertyOverlayKeypadCommandButtonVisible, SetPropertyOverlayKeypadCommandButtonVisible); + DECLARE_PROPERTY("text", GetPropertyText, SetPropertyText); + DECLARE_PROPERTY("viewModeEnabled", GetPropertyViewModeEnabled, SetPropertyViewModeEnabled); + DECLARE_PROPERTY("autoLinkMask", GetPropertyAutoLinkMask, SetPropertyAutoLinkMask); + DECLARE_PROPERTY("titleText", GetPropertyTitleText, SetPropertyTitleText); + DECLARE_PROPERTY("normalTitleTextColor", GetPropertyNormalTitleTextColor, SetPropertyNormalTitleTextColor); + DECLARE_PROPERTY("disabledTitleTextColor", GetPropertyDisabledTitleTextColor, SetPropertyDisabledTitleTextColor); + DECLARE_PROPERTY("highlightedTitleTextColor", GetPropertyHighlightedTitleTextColor, SetPropertyHighlightedTitleTextColor); + DECLARE_PROPERTY("pressedTitleTextColor", GetPropertyPressedTitleTextColor, SetPropertyPressedTitleTextColor); + DECLARE_PROPERTY("blockedTextColor", GetPropertyBlockedTextColor, SetPropertyBlockedTextColor); + DECLARE_PROPERTY("topMargin", GetPropertyTopMargin, SetPropertyTopMargin); + DECLARE_PROPERTY("bottomMargin", GetPropertyBottomMargin, SetPropertyBottomMargin); + DECLARE_PROPERTY("leftMargin", GetPropertyLeftMargin, SetPropertyLeftMargin); + DECLARE_PROPERTY("rightMargin", GetPropertyRightMargin, SetPropertyRightMargin); + DECLARE_CLASS_END(); + + result SetPropertyAutoResizingEnabled(const Variant& enable); + result SetPropertyGuideTextColor(const Variant& color); + result SetPropertyNormalColor(const Variant& color); + result SetPropertyDisabledColor(const Variant& color); + result SetPropertyHighlightedColor(const Variant& color); + result SetPropertyPressedColor(const Variant& color); + result SetPropertyNormalTextColor(const Variant& color); + result SetPropertyDisabledTextColor(const Variant& color); + result SetPropertyHighlightedTextColor(const Variant& color); + result SetPropertyPressedTextColor(const Variant& color); + result SetPropertyLineSpacing(const Variant& lineSpacing); + result SetPropertyTextSize(const Variant& textSize); + result SetPropertyCursorPosition(const Variant& position); + result SetPropertyGuideText(const Variant& guideText); + result SetPropertyKeypadActionEnabled(const Variant& enabled); + result SetPropertyKeypadAction(const Variant& action); + result SetPropertyKeypadEnabled(const Variant& enabled); + result SetPropertyKeypadStyle(const Variant& style); + result SetPropertyLowerCaseModeEnabled(const Variant& enabled); + result SetPropertyOverlayKeypadCommandButtonVisible(const Variant& visible); + result SetPropertyText(const Variant& text); + result SetPropertyViewModeEnabled(const Variant& enabled); + result SetPropertyAutoLinkMask(const Variant& autoLinks); + result SetPropertyTitleText(const Variant& titleText); + result SetPropertyNormalTitleTextColor(const Variant& color); + result SetPropertyDisabledTitleTextColor(const Variant& color); + result SetPropertyHighlightedTitleTextColor(const Variant& color); + result SetPropertyPressedTitleTextColor(const Variant& color); + result SetPropertyBlockedTextColor(const Variant& color); + result SetPropertyTopMargin(const Variant& margin); + result SetPropertyBottomMargin(const Variant& margin); + result SetPropertyLeftMargin(const Variant& margin); + result SetPropertyRightMargin(const Variant& margin); + + Variant GetPropertyAutoResizingEnabled(void) const; + Variant GetPropertyGuideTextColor(void) const; + Variant GetPropertyNormalColor(void) const; + Variant GetPropertyDisabledColor(void) const; + Variant GetPropertyHighlightedColor(void) const; + Variant GetPropertyPressedColor(void) const; + Variant GetPropertyNormalTextColor(void) const; + Variant GetPropertyDisabledTextColor(void) const; + Variant GetPropertyHighlightedTextColor(void) const; + Variant GetPropertyPressedTextColor(void) const; + Variant GetPropertyLineSpacing(void) const; + Variant GetPropertyTextSize(void) const; + Variant GetPropertyCursorPosition(void) const; + Variant GetPropertyGuideText(void) const; + Variant GetPropertyKeypadActionEnabled(void) const; + Variant GetPropertyKeypadAction(void) const; + Variant GetPropertyKeypadEnabled(void) const; + Variant GetPropertyKeypadStyle(void) const; + Variant GetPropertyLowerCaseModeEnabled(void) const; + Variant GetPropertyOverlayKeypadCommandButtonVisible(void) const; + Variant GetPropertyText(void) const; + Variant GetPropertyViewModeEnabled(void) const; + Variant GetPropertyAutoLinkMask(void) const; + Variant GetPropertyTitleText(void) const; + Variant GetPropertyNormalTitleTextColor(void) const; + Variant GetPropertyDisabledTitleTextColor(void) const; + Variant GetPropertyHighlightedTitleTextColor(void) const; + Variant GetPropertyPressedTitleTextColor(void) const; + Variant GetPropertyBlockedTextColor(void) const; + Variant GetPropertyTopMargin(void) const; + Variant GetPropertyBottomMargin(void) const; + Variant GetPropertyLeftMargin(void) const; + Variant GetPropertyRightMargin(void) const; + +public: + _Edit(void); + virtual ~_Edit(void); + + static _Edit* CreateEditN(void); + virtual result Initialize(int editStyle, InputStyle inputStyle, int limitLength, GroupStyle groupStyle = GROUP_STYLE_NONE); + + result SetAutoLinkMask(unsigned long autoLinks); + result SetAutoResizingEnabled(bool enable); + result SetBackgroundBitmap(EditStatus status, const Tizen::Graphics::Bitmap& bitmap); + result SetBlockRange(int start, int end); + result SetBlockTextColor(const Tizen::Graphics::Color& color); + result SetColor(EditStatus status, const Tizen::Graphics::Color& color); + result SetCurrentLanguage(Tizen::Locales::LanguageCode languageCode); + result SetCursorPosition(int position); + void SetCutlinkColorInfo(EditCutLinkType type, EditCutlinkColor colorInfo); + void SetEllipsisPosition(EllipsisPosition position); + result SetFont(const Tizen::Graphics::Font& font); + result SetFontType(const Tizen::Base::String& typefaceName, unsigned long styleMask); + result SetTextStyle(unsigned long style); + void SetGuideText(const Tizen::Base::String& guideText); + result SetGuideTextColor(const Tizen::Graphics::Color& color); + result SetHorizontalMargin(int margin, EditTextHorizontalMargin marginType = EDIT_TEXT_HORIZONTAL_MARGIN); + result SetHorizontalMargin(float margin, EditTextHorizontalMargin marginType = EDIT_TEXT_HORIZONTAL_MARGIN); + result SetKeypadAction(CoreKeypadAction keypadAction); + result SetKeypadActionEnabled(bool enabled); + void SetKeypadEnabled(bool enable); + result SetKeypadStyle(KeypadStyle keypadStyle); + result SetKeypadNormalNumberStyle(bool enable); + result SetTextPredictionEnabled(bool enable); + result SetLimitLength(int limitLength); + result SetLineSpacing(int linePixelGap); + result SetLineSpacing(float linePixelGap); + void SetLowerCaseModeEnabled(bool enable); + void SetMaxLineCount(int maxLineCount); + result SetKeypadCommandButton(CommandButtonPosition position, const Tizen::Base::String& text, int actionId); + result SetKeypadCommandButtonVisible(bool visible); + _Toolbar* GetKeypadCommandButton(void) const; + result SetText(const Tizen::Base::String& text); + result SetTextAlignment(HorizontalAlignment alignment); + result SetTextColor(EditTextColor type, const Tizen::Graphics::Color& color); + result SetTextSize(int size); + result SetTextSize(float size); + virtual result SetTitleText(const Tizen::Base::String& title); + result SetTitleTextColor(EditStatus status, const Tizen::Graphics::Color& color); + result SetViewModeEnabled(bool enable); + result SetVerticalMargin(int margin, EditTextVerticalMargin marginType = EDIT_TEXT_VERTICAL_MARGIN); + result SetVerticalMargin(float margin, EditTextVerticalMargin marginType = EDIT_TEXT_VERTICAL_MARGIN); + void SetEditStyle(unsigned long style); + void SetBorderRoundStyleEnabled(bool enable); + result SetPasswordVisible(bool visible); + + unsigned long GetAutoLinkMask(void) const; + Tizen::Graphics::Bitmap* GetBackgroundBitmap(EditStatus status) const; + result LoadDefaultBackgroundBitmap(GroupStyle groupStyle); + result ReplaceDefaultBackgroundBitmapForSearchBar(void); + Tizen::Graphics::Bitmap* GetDefaultBackgroundBitmap(EditStatus status) const; + bool IsCustomDefaultBackgroundBitmap(EditStatus status) const; + Tizen::Graphics::Bitmap* GetDefaultBackgroundEffectBitmap(void) const; + void GetBlockRange(int& start, int& end) const; + Tizen::Graphics::Color GetBlockTextColor(void) const; + Tizen::Graphics::Color GetColor(EditStatus status) const; + result GetCurrentLanguage(Tizen::Locales::LanguageCode& language) const; + void GetCurrentTextRange(int& start, int& end) const; + int GetCursorPosition(void) const; + int GetCursorPositionAt(const Tizen::Graphics::FloatPoint& point) const; + result GetCursorBounds(bool isAbsRect, Tizen::Graphics::FloatRectangle& cursorBounds) const; + void GetCutlinkColorInfo(EditCutLinkType type, EditCutlinkColor* colorInfo) const; + EllipsisPosition GetEllipsisPosition(void) const; + void GetFontType(Tizen::Base::String& typefaceName, unsigned long& styleMask) const; + unsigned long GetTextStyle(void) const; + Tizen::Base::String GetGuideText(void) const; + Tizen::Graphics::Color GetGuideTextColor(void) const; + int GetHorizontalMargin(EditTextHorizontalMargin marginType) const; + float GetHorizontalMarginF(EditTextHorizontalMargin marginType) const; + InputStyle GetInputStyle(void) const; + CoreKeypadAction GetKeypadAction(void) const; + bool GetKeypadActionEnabled(void) const; + result GetKeypadBounds(Tizen::Graphics::FloatRectangle& rect) const; + float GetClipboardHeight(void) const; + KeypadStyle GetKeypadStyle(void) const; + int GetTextLimitLength(void) const; + int GetLineSpacing(void) const; + float GetLineSpacingF(void) const; + int GetMaxLineCount(void) const; + int GetKeypadCommandButtonActionId(CommandButtonPosition position) const; + Tizen::Base::String GetKeypadCommandButtonText(CommandButtonPosition position) const; + int GetRemainingLength(void) const; + Tizen::Base::String GetText(void) const; + Tizen::Base::String GetText(int start, int end) const; + HorizontalAlignment GetTextAlignment(void) const; + Tizen::Graphics::Color GetTextColor(EditStatus status) const; + Tizen::Graphics::Color GetTextColor(EditTextColor type) const; + int GetTextLength(void) const; + int GetTextLineCount(void) const; + int GetTextSize(void) const; + float GetTextSizeF(void) const; + int GetTextTotalHeight(void) const; + float GetTextTotalHeightF(void) const; + virtual Tizen::Base::String GetTitleText(void) const; + Tizen::Graphics::Color GetTitleTextColor(EditStatus status) const; + int GetVerticalMargin(EditTextVerticalMargin marginType) const; + float GetVerticalMarginF(EditTextVerticalMargin marginType) const; + unsigned long GetEditStyle(void) const; + void GetWordPosition(int cursorPos, int& startPos, int& endPos) const; + result GetTextImageRangeAt(int postion, int& startPosition, int& endPosition) const; + + result AppendCharacter(const Tizen::Base::Character& character); + result AppendText(const Tizen::Base::String& text); + result BeginTextBlock(void); + bool CalculateAbsoluteCursorBounds(int index, Tizen::Graphics::FloatRectangle& absCursorRect); + result ClearText(void); + result CopyText(void); + result CutText(void); + result DeleteCharacterAt(int index); + result DeleteCharacterAtCursorPosition(void); + void SetCursorDisabled(bool disabled); + result HideKeypad(void); + void InitializeColorInformation(void); + void SetViewModeColorInformation(bool enabled); + result InsertTextAtCursorPosition(const Tizen::Base::String& text); + result InsertCharacterAt(int index, const Tizen::Base::Character& character); + result InsertTextAt(int index, const Tizen::Base::String& text); + result InsertTextAt(int position, const Tizen::Base::String& text, const Tizen::Graphics::Bitmap& textImage); + result AppendText(const Tizen::Base::String& text, const Tizen::Graphics::Bitmap& textImage); + bool IsAutoResizingEnabled(void) const; + bool IsBlocked(void) const; + bool IsClipped(void) const; + bool IsLowerCaseModeEnabled(void) const; + bool IsKeypadCommandButtonVisible(void) const; + bool IsSettingGuideTextColor(void) const; + bool IsViewModeEnabled(void) const; + bool IsKeypadEnabled(void) const; + bool IsTextPredictionEnabled(void) const; + virtual void UpdateAccessibilityElement(EditAccessibilityElementType type); + void SetFullScreenKeypadEdit(bool enabled); + bool IsFullScreenKeypadEdit(void); + bool IsBorderRoundStyleEnabled(void) const; + bool IsUsbKeyboardConnected(void) const; + bool IsKeypadExist(void) const; + bool IsClipboardExist(void) const; + bool CheckKeypadExist(_ControlOrientation orientation); + bool IsDestroyed(void) const; + bool IsPasswordVisible(void) const; + bool IsClearIconPressed(void) const; + + void SetTextEventEnabled(bool enable); + bool IsTextEventEnabled(void) const; + virtual void SetAutoShrinkModeEnabled(bool enable); + virtual bool IsAutoShrinkModeEnabled(void) const; + bool IsTouchMoving(void) const; + + result PasteText(void); + result ReleaseTextBlock(void); + result RemoveTextBlock(void); + result ShowKeypad(void); + + result AddActionEventListener(const _IActionEventListener& listener); + result AddExpandableEditAreaEventListener(const _IExpandableEditAreaEventListener& listener); + result AddKeypadEventListener(const _IKeypadEventListener& listener); + result AddLanguageEventListener(const _ILanguageEventListener& listener); + result AddScrollPanelEventListener(const _IScrollPanelEventListener& listener); + result AddTextBlockEventListener(const _ITextBlockEventListener& listener); + result AddTextEventListener(const _ITextEventListener& listener); + result AddUiLinkEventListener(const _IUiLinkEventListener& listener); + + result RemoveActionEventListener(const _IActionEventListener& listener); + result RemoveExpandableEditAreaEventListener(const _IExpandableEditAreaEventListener& listener); + result RemoveKeypadEventListener(const _IKeypadEventListener& listener); + result RemoveLanguageEventListener(const _ILanguageEventListener& listener); + result RemoveScrollPanelEventListener(const _IScrollPanelEventListener& listener); + result RemoveTextBlockEventListener(const _ITextBlockEventListener& listener); + result RemoveTextEventListener(const _ITextEventListener& listener); + result RemoveUiLinkEventListener(const _IUiLinkEventListener& listener); + + 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); + result SendLinkEvent(const Tizen::Base::String& text, Tizen::Base::Utility::LinkType linkType, const Tizen::Base::String& link); + result SendScrollPanelEvent(CoreScrollPanelStatus eventstatus); + result SendTextBlockEvent(int start, int end); + result SendTextEvent(CoreTextEventStatus textEventStatus); + + void OnScrollPanelBoundsChanged(void); + virtual result OnAttachingToMainTree(const _Control* pParent); + virtual result OnAttachedToMainTree(void); + virtual void OnBoundsChanged(void); + virtual void OnChangeLayout(_ControlRotation rotation); + virtual void OnClipboardPopupClosed(const ClipboardItem* pClipboardItem); + virtual void OnDraw(void); + virtual bool OnFocusGained(const _Control& source); + virtual bool OnFocusLost(const _Control& source); + virtual bool OnFlickGestureDetected(_TouchFlickGestureDetector& gesture); + virtual bool OnFlickGestureCanceled(_TouchFlickGestureDetector& gesture); + virtual bool OnLongPressGestureDetected(_TouchLongPressGestureDetector& gesture); + virtual bool OnLongPressGestureCanceled(_TouchLongPressGestureDetector& gesture); + virtual bool OnTapGestureDetected(_TouchTapGestureDetector& gesture); + virtual bool OnTapGestureCanceled(_TouchTapGestureDetector& gesture); + virtual bool OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo); + virtual bool OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo); + virtual bool OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo); + virtual bool OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo); + virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo); + virtual bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo); + virtual bool OnNotifiedN(const _Control& source, Tizen::Base::Collection::IList* pArgs); + + virtual void OnFontChanged(Tizen::Graphics::Font* pFont); + virtual void OnFontInfoRequested(unsigned long& style, float& size); + + virtual result OnDetachingFromMainTree(void); + virtual void OnVisibleStateChanged(void); + 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; + bool ValidatePastedText(const Tizen::Base::String& pastedText, Tizen::Base::String& replacedText); + void SetEditTextFilter(IEditTextFilter* pFilter); + void SendOpaqueCommand(const Tizen::Base::String& command); + _AccessibilityElement* GetTextAccessibilityElement(void) const; + +protected: + result SetPresenter(const _EditPresenter& pPresenter); + +private: + _Edit(const _Edit&); + _Edit& operator =(const _Edit&); + _EditPresenter* _pEditPresenter; + +private: + float __bottomMargin; + float __leftMargin; + float __lineSpacing; + float __rightMargin; + float __textSize; + float __topMargin; + int __editStyle; + bool __borderRoundStyle; + + EllipsisPosition __ellipsisPosition; + InputStyle __inputStyle; + bool __isConstructed; + + EditColor __color[EDIT_COLOR_MAX]; + EditBlockTextColor __blockTextColor; + EditCutlinkColor __cutlinkColor[EDIT_LINK_TYPE_MAX]; + Tizen::Graphics::Color __guideTextColor; + Tizen::Graphics::Color __pressedGuideTextColor; + bool __isSettingGuideTextColor; + + Tizen::Graphics::Bitmap* __pBackgroundBitmap[EDIT_COLOR_MAX]; + +//Default Bitmap + Tizen::Graphics::Bitmap* __pDefaultBackgroundBitmap[EDIT_COLOR_MAX]; + Tizen::Graphics::Bitmap* __pDefaultBackgroundEffectBitmap; + + Tizen::Ui::_TouchFlickGestureDetector* __pGestureFlick; + Tizen::Ui::_TouchLongPressGestureDetector* __pGestureLongPress; + Tizen::Ui::_TouchTapGestureDetector* __pGestureTap; + Tizen::Ui::Controls::_EditInternalTouchEventListener* __pEditInternalTouchEventListener; + + _ExpandableEditAreaEvent* __pExpandableEditAreaEvent; + _KeypadEvent* __pKeypadEvent; + _LanguageEvent* __pLanguageEvent; + _LinkEvent* __pLinkEvent; + _ScrollPanelEvent* __pScrollPanelEvent; + _TextBlockEvent* __pTextBlockEvent; + _TextEvent* __pTextEvent; + Tizen::Ui::_AccessibilityElement* __pTextAccessibilityElement; + Tizen::Ui::_AccessibilityElement* __pClearButtonTextAccessibilityElement; + Tizen::Ui::_AccessibilityElement* __pToolbarAccessibilityElement; + bool __isAccessibilityCreated; + bool __isFullScreenKeypadEdit; + bool __internalFocus; + _Frame* __pCurrentFrame; + bool __isDestroyed; + IEditTextFilter* __pTextFilter; + Tizen::Graphics::FloatRectangle __previousBounds; + bool __isTouchMoving; + bool __isTextEventEnabled; +}; // _Edit + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_EDIT_H_ diff --git a/src/ui/inc/FUiCtrl_EditAreaImpl.h b/src/ui/inc/FUiCtrl_EditAreaImpl.h new file mode 100644 index 0000000..31b3be4 --- /dev/null +++ b/src/ui/inc/FUiCtrl_EditAreaImpl.h @@ -0,0 +1,221 @@ +// +// 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_EditAreaImpl.h + * @brief This is the header file for the _EditAreaImpl class. + * + * This header file contains the declarations of the %_EditAreaPresenter class. + */ + +#ifndef _FUI_CTRL_INTERNAL_EDIT_AREA_IMPL_H_ +#define _FUI_CTRL_INTERNAL_EDIT_AREA_IMPL_H_ + +#include +#include "FUi_ControlImpl.h" +#include "FUi_IFocusEventListener.h" +#include "FUiCtrl_Edit.h" +#include "FUiCtrl_IActionEventListener.h" +#include "FUiCtrl_IKeypadEventListener.h" +#include "FUiCtrl_ILanguageEventListener.h" +#include "FUiCtrl_IScrollPanelEventListener.h" +#include "FUiCtrl_ITextBlockEventListener.h" +#include "FUiCtrl_ITextEventListener.h" +#include "FUiCtrl_IUiLinkEventListener.h" +#include "FUiCtrl_PublicActionEvent.h" +#include "FUiCtrl_PublicKeypadEvent.h" +#include "FUiCtrl_PublicLanguageEvent.h" +#include "FUiCtrl_PublicLinkEvent.h" +#include "FUiCtrl_PublicScrollPanelEvent.h" +#include "FUiCtrl_PublicTextBlockEvent.h" +#include "FUiCtrl_PublicTextEvent.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _EditAreaImpl + : public _ControlImpl + , virtual public Tizen::Base::Runtime::IEventListener + , public _ITextEventListener + , public _IActionEventListener + , public _IKeypadEventListener + , public _IUiLinkEventListener + , public _ITextBlockEventListener + , public _ILanguageEventListener + , public _IScrollPanelEventListener +{ +public: + class EditAreaSizeInfo : public _ControlImpl::SizeInfo + { + virtual Tizen::Graphics::Dimension GetDefaultMinimumSize(Tizen::Ui::_ControlOrientation orientation) const; + virtual Tizen::Graphics::FloatDimension GetDefaultMinimumSizeF(Tizen::Ui::_ControlOrientation orientation) const; + }; + +public: + _EditAreaImpl(EditArea* pPublic, _Edit* pCore); + virtual ~_EditAreaImpl(void); + + static _EditAreaImpl* CreateEditAreaImplN(EditArea* pControl, const Tizen::Graphics::Rectangle& rect); + static _EditAreaImpl* CreateEditAreaImplN(EditArea* pControl, const Tizen::Graphics::FloatRectangle& rect); + result Initialize(InputStyle inputStyle = INPUT_STYLE_FULLSCREEN, int limitLength = 1000); + + virtual const _Edit& GetCore(void) const; + virtual _Edit& GetCore(void); + virtual const EditArea& GetPublic(void) const; + virtual EditArea& GetPublic(void); + virtual const char* GetPublicClassName(void) const; + + result SetAutoLinkMask(unsigned long autoLinks); + result SetBackgroundBitmap(EditStatus status, const Tizen::Graphics::Bitmap& bitmap); + result SetColor(EditStatus status, const Tizen::Graphics::Color& color); + result SetCurrentInputModeCategory(EditInputModeCategory inputModeCategory); + result SetCurrentLanguage(Tizen::Locales::LanguageCode languageCode); + result SetCursorPosition(int position); + void SetGuideText(const Tizen::Base::String& guideText); + result SetGuideTextColor(const Tizen::Graphics::Color& color); + result SetInputModeCategory(unsigned long categories, bool enable); + result SetKeypadActionEnabled(bool enable); + result SetKeypadAction(Tizen::Ui::KeypadAction keypadAction); + void SetKeypadEnabled(bool enable); + result SetKeypadStyle(KeypadStyle keypadStyle); + result SetLineSpacing(int multiplier, int extra); + result SetLineSpacing(int multiplier, float extra); + void SetLowerCaseModeEnabled(bool enable); + result SetMargin(EditMarginType marginType, int margin); + result SetMargin(EditMarginType marginType, float margin); + result SetOverlayKeypadCommandButton(CommandButtonPosition position, const Tizen::Base::String& text, int actionId); + result SetOverlayKeypadCommandButtonVisible(bool visible); + result SetText(const Tizen::Base::String& text); + result SetTextAlignment(HorizontalAlignment alignment); + result SetTextColor(EditTextColor type, const Tizen::Graphics::Color& color); + result SetTextSize(int size); + result SetTextSize(float size); + result SetViewModeEnabled(bool enable); + result SetTextPredictionEnabled(bool enable); + + unsigned long GetAutoLinkMask(void) const; + void GetBlockRange(int& start, int& end) const; + Tizen::Graphics::Color GetColor(EditStatus status) const; + EditInputModeCategory GetCurrentInputModeCategory(void) const; + result GetCurrentLanguage(Tizen::Locales::LanguageCode& language) const; + void GetCurrentTextRange(int& start, int& end) const; + int GetCursorPosition(void) const; + Tizen::Base::String GetGuideText(void) const; + Tizen::Graphics::Color GetGuideTextColor(void) const; + unsigned long GetInputModeCategory(void) const; + Tizen::Base::String GetText(void) const; + Tizen::Base::String GetText(int start, int end) const; + HorizontalAlignment GetTextAlignment(void) const; + Tizen::Graphics::Color GetTextColor(EditTextColor type) const; + int GetTextLength(void) const; + int GetTextLineCount(void) const; + int GetTextSize(void) const; + float GetTextSizeF(void) const; + Tizen::Ui::KeypadAction GetKeypadAction(void) const; + KeypadStyle GetKeypadStyle(void) const; + int GetLineSpacing(void) const; + float GetLineSpacingF(void) const; + int GetMargin(EditMarginType marginType) const; + float GetMarginF(EditMarginType marginType) const; + int GetOverlayKeypadCommandButtonActionId(CommandButtonPosition position) const; + Tizen::Base::String GetOverlayKeypadCommandButtonText(CommandButtonPosition position) const; + int GetRemainingLength(void) const; + + result AppendCharacter(const Tizen::Base::Character& character); + result AppendText(const Tizen::Base::String& text); + result BeginBlock(void); + result Clear(void); + result Copy(void); + result Cut(void); + result DeleteCharacterAtCursorPosition(void); + result HideKeypad(void); + result InsertTextAtCursorPosition(const Tizen::Base::String& text); + result InsertTextAt(int position, const Tizen::Base::String& text, const Tizen::Graphics::Bitmap& textImage); + result AppendText(const Tizen::Base::String& text, const Tizen::Graphics::Bitmap& textImage); + bool IsBlocked(void) const; + bool IsClipped(void) const; + bool IsKeypadEnabled(void) const; + bool IsKeypadActionEnabled(void) const; + bool IsLowerCaseModeEnabled(void) const; + bool IsOverlayCommandButtonVisible(void) const; + bool IsViewModeEnabled(void) const; + bool IsTextPredictionEnabled(void) const; + + result Paste(void); + result ReleaseBlock(void); + result Remove(void); + result ShowKeypad(void); + + result AddActionEventListener(Tizen::Ui::IActionEventListener& listener); + result AddKeypadEventListener(Tizen::Ui::IKeypadEventListener& listener); + result AddLanguageEventListener(Tizen::Ui::ILanguageEventListener& listener); + result AddScrollPanelEventListener(Tizen::Ui::IScrollPanelEventListener& listener); + result AddTextBlockEventListener(Tizen::Ui::ITextBlockEventListener& listener); + result AddTextEventListener(Tizen::Ui::ITextEventListener& listener); + result AddUiLinkEventListener(Tizen::Ui::IUiLinkEventListener& listener); + result RemoveActionEventListener(Tizen::Ui::IActionEventListener& listener); + result RemoveKeypadEventListener(Tizen::Ui::IKeypadEventListener& listener); + result RemoveLanguageEventListener(Tizen::Ui::ILanguageEventListener& listener); + result RemoveScrollPanelEventListener(Tizen::Ui::IScrollPanelEventListener& listener); + result RemoveTextBlockEventListener(Tizen::Ui::ITextBlockEventListener& listener); + result RemoveTextEventListener(Tizen::Ui::ITextEventListener& listener); + result RemoveUiLinkEventListener(Tizen::Ui::IUiLinkEventListener& listener); + + virtual void OnActionPerformed(const Tizen::Ui::_Control& source, int actionId); + virtual result OnBoundsChanged(const Tizen::Graphics::Rectangle& oldRect, const Tizen::Graphics::Rectangle& newRect); + virtual void OnKeypadActionPerformed(CoreKeypadAction keypadAction); + virtual void OnKeypadClosed(void); + virtual void OnKeypadOpened(void); + virtual void OnKeypadWillOpen(void); + virtual void OnKeypadBoundsChanged(void); + virtual void OnLanguageChanged(Tizen::Locales::LanguageCode oldLanguage, Tizen::Locales::LanguageCode newLanguage); + virtual void OnLinkClicked(Tizen::Ui::_Control& source, const Tizen::Base::String& text, Tizen::Base::Utility::LinkType linkType, const Tizen::Base::String& link); + virtual void OnOtherControlSelected(const Tizen::Ui::_Control& source); + virtual void OnOverlayControlClosed(const Tizen::Ui::_Control& source); + virtual void OnOverlayControlCreated(const Tizen::Ui::_Control& source); + virtual void OnOverlayControlOpened(const Tizen::Ui::_Control& source); + virtual void OnTextBlockSelected(Tizen::Ui::_Control& source, int start, int end); + virtual void OnTextValueChanged(const Tizen::Ui::_Control& source); + virtual void OnTextValueChangeCanceled(const Tizen::Ui::_Control& source); + void SetEditTextFilter(IEditTextFilter* pFilter); + void SendOpaqueCommand (const Tizen::Base::String& command); + +public: + static _EditAreaImpl* GetInstance(EditArea& editArea); + static const _EditAreaImpl* GetInstance(const EditArea& pEditArea); + +private: + _EditAreaImpl(const _EditAreaImpl&); + _EditAreaImpl& operator =(const _EditAreaImpl&); + +private: + _Edit* __pEdit; + unsigned long __inputModeCategory; + EditInputModeCategory __currentInputMode; + + _PublicActionEvent* __pPublicActionEvent; + _PublicKeypadEvent* __pPublicKeypadEvent; + _PublicLanguageEvent* __pPublicLanguageEvent; + _PublicLinkEvent* __pPublicLinkEvent; + _PublicScrollPanelEvent* __pPublicScrollPanelEvent; + _PublicTextBlockEvent* __pPublicTextBlockEvent; + _PublicTextEvent* __pPublicTextEvent; + unsigned long __autoLinkMask; +}; //_EditAreaImpl + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_EDIT_AREA_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_EditCopyPasteEvent.h b/src/ui/inc/FUiCtrl_EditCopyPasteEvent.h new file mode 100644 index 0000000..08fd643 --- /dev/null +++ b/src/ui/inc/FUiCtrl_EditCopyPasteEvent.h @@ -0,0 +1,103 @@ +// +// 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_EditCopyPasteEvent.h +* @brief This is the header file for _EditCopyPasteEvent class. +* +* This header file contains declaration of _EditCopyPasteEvent class. +*/ + +#ifndef _FUI_CTRL_INTERNAL_EDIT_COPY_PASTE_EVENT_H_ +#define _FUI_CTRL_INTERNAL_EDIT_COPY_PASTE_EVENT_H_ + +#include +#include +#include +#include "FUiCtrl_IEditCopyPasteEventListener.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +//forward declaration +class _EditCopyPasteManager; + +/** +* @class _EditCopyPasteEvent +* @brief This class handles an EditCopyPaste event. It is inherited from Event class. +* +*/ +class _EditCopyPasteEvent + : public Tizen::Base::Runtime::_Event +{ +// Lifecycle +public: + /** + * This is the default class destructor. + * + */ + virtual ~_EditCopyPasteEvent(void); + + static _EditCopyPasteEvent* CreateInstanceN(const Tizen::Ui::Controls::_EditCopyPasteManager& source); + +// Accessors +public: + /** + * This method returns the owner of this event. + * + * @return See the comment above. + */ + const Tizen::Ui::Controls::_EditCopyPasteManager* GetSource(void) const; + +// Operations +protected: + + /** + * This is the default class constructor. + * + * @remarks After creating an instance of this class, you must explicitly call one of + * construction methods to initialize the instance. + * + */ + _EditCopyPasteEvent(const Tizen::Ui::Controls::_EditCopyPasteManager& source); + + /** + * This method checks the arg and finds out the type of event. After that this method calls appopriate + * pListener's method. + * + * @param[in] listener It is a event listener related to this item event. + * @param[in] arg It is an argument-like instance of item event retransmitted to the listener's method + * as an argument. + * @exception E_SUCCESS - The method is successful. + * @exception E_ARG_NULL - The listener is null. + * @exception E_INVALID_ARG - The argument passed to a method contains an invalid value.@n + *   The pListener is not the instance of IItemEventListener class or + * the pItemEventArg is not the instance of _CustomItemEventArg class. + * + */ + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + +public: + static Tizen::Base::Runtime::IEventArg* CreateCopyPasteEventArgN(Tizen::Ui::Controls::CoreCopyPasteStatus status, Tizen::Ui::Controls::CoreCopyPasteAction action ); + + //Attributess +private: + const Tizen::Ui::Controls::_EditCopyPasteManager* __pSource; +}; // _EditCopyPasteEvent + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_EDIT_COPY_PASTE_EVENT_H_ diff --git a/src/ui/inc/FUiCtrl_EditCopyPasteManager.h b/src/ui/inc/FUiCtrl_EditCopyPasteManager.h new file mode 100644 index 0000000..534de36 --- /dev/null +++ b/src/ui/inc/FUiCtrl_EditCopyPasteManager.h @@ -0,0 +1,144 @@ +// +// 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_EditCopyPasteManager.h +* @brief This is the header file for _EditCopyPasteManager class. +* +* This header file contains declaration of _EditCopyPasteManager class. +*/ + +#ifndef _FUI_CTRL_INTERNAL_EDIT_COPY_PASTE_MANAGER_H_ +#define _FUI_CTRL_INTERNAL_EDIT_COPY_PASTE_MANAGER_H_ + +#include +#include +#include "FUi_Control.h" +#include "FUiCtrl_ContextMenu.h" +#include "FUiCtrl_Edit.h" +#include "FUiCtrl_IActionEventListener.h" +#include "FUiCtrl_IEditCopyPasteEventListener.h" + +namespace Tizen {namespace Ui {namespace Controls +{ + +//forward declaration +class _EditCopyPasteHandler; +class _EditCopyPasteEvent; + +/** +* @class _EditCopyPasteManager +* @brief This class handles CopyPastePopup and Handler Windows. +* +*/ +class _EditCopyPasteManager + : virtual public Tizen::Base::Runtime::IEventListener + , virtual public Tizen::Ui::_IUiEventListener + , virtual public Tizen::Ui::_IUiEventPreviewer + , public _IActionEventListener +{ +public: + enum HandlerType + { + HANDLER_TYPE_CENTER = 0, + HANDLER_TYPE_LEFT, + HANDLER_TYPE_RIGHT, + HANDLER_TYPE_MAX + }; + + enum HandlerMoveType + { + HANDLER_MOVE_TYPE_LEFT = 0, + HANDLER_MOVE_TYPE_UP, + HANDLER_MOVE_TYPE_DOWN, + HANDLER_MOVE_TYPE_RIGHT + }; + +// Lifecycle +public: + /** + * This is the default class constructor. + * + */ + _EditCopyPasteManager(_Edit& parenEdit); + + /** + * This is the default class destructor. + * + */ + virtual ~_EditCopyPasteManager(void); + +// Operations +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); + void RefreshBlock(bool isLeftHandle = false); + Tizen::Graphics::FloatRectangle GetCursorBoundsF(bool isAbsRect) const; + int GetCursorPositionAt(const Tizen::Graphics::FloatPoint& touchPoint) const; + result SetCursorPosition(int position); + int GetCursorPosition(void) const; + int GetHandlerCursorPosition(HandlerType handlerType) const; + void SendTextBlockEvent(void); + void ReleaseHandle(void); + void ReleaseCopyPastePopup(void); + bool IsCopyPastePopup(const _Control& control) const; + bool IsCopyPasteHandle(const _Control& control) const; + void AdjustBounds(void); + + result AddCopyPasteEventListener(const _IEditCopyPasteEventListener& listener); + result SendCopyPasteEvent(Tizen::Ui::Controls::CoreCopyPasteStatus status, Tizen::Ui::Controls::CoreCopyPasteAction action); + void LaunchSearch(void); + bool GetTextBlockReleaseFlag(void) const; + void SetTextBlockReleaseFlag(bool enabled); + bool IsCopyPasteHandleExist(void) const; + bool IsCopyPasteSingleHandleExist(void) const; + void UpdateCopyPasteMagnifier(void); + +// virtual function + virtual void OnActionPerformed(const Tizen::Ui::_Control& source, int actionId); + _Edit* GetEdit(void) const; + void MoveHandler(HandlerMoveType moveType); + bool IsHandlerMovingEnabled(void) const; + void SetHandlerMovingEnabled(bool enabled); + Tizen::Graphics::Rectangle GetEditVisibleArea(void) const; + 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); + +private: + _ContextMenu* __pCopyPastePopup; + ContextMenuCoreAlign __contextMenuAlign; + _EditCopyPasteHandler* __pHandle[HANDLER_TYPE_MAX]; + _EditCopyPasteEvent* __pCoreCopyPasteEvent; + _Edit* __pEdit; + _EditPresenter* __pEditPresenter; + float __contextMenuHeight; + bool __needToReleaseBlock; + bool __isHandlerMoving; + Tizen::Graphics::FloatRectangle __editVisibleArea; +}; // _EditCopyPasteManager + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_EDIT_COPY_PASTE_MANAGER_H_ diff --git a/src/ui/inc/FUiCtrl_EditDate.h b/src/ui/inc/FUiCtrl_EditDate.h new file mode 100644 index 0000000..71c635a --- /dev/null +++ b/src/ui/inc/FUiCtrl_EditDate.h @@ -0,0 +1,200 @@ +// +// 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_EditDate.h + * @brief This is the header file for the _EditDate class. + * + * This header file contains the declarations of the %_EditDate class. + */ + +#ifndef _FUI_CTRL_INTERNAL_EDITDATE_H_ +#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 +{ +class _AccessibilityElement; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ +class _EditDatePresenter; + +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); + DECLARE_PROPERTY("date", GetPropertyDate, SetPropertyDate); + DECLARE_PROPERTY("minYearRange", GetPropertyMinYearRange, SetPropertyMinYearRange); + DECLARE_PROPERTY("maxYearRange", GetPropertyMaxYearRange, SetPropertyMaxYearRange); + DECLARE_PROPERTY("day", GetPropertyDay, SetPropertyDay); + DECLARE_PROPERTY("month", GetPropertyMonth, SetPropertyMonth); + DECLARE_PROPERTY("year", GetPropertyYear, SetPropertyYear); + DECLARE_PROPERTY("datePickerEnabled", GetPropertyDatePickerEnabled, SetPropertyDatePickerEnabled); + DECLARE_CLASS_END(); + + result SetPropertyDate(const Tizen::Ui::Variant& date); + Tizen::Ui::Variant GetPropertyDate(void) const; + + result SetPropertyMinYearRange(const Tizen::Ui::Variant& minYear); + result SetPropertyMaxYearRange(const Tizen::Ui::Variant& maxYear); + Tizen::Ui::Variant GetPropertyMinYearRange(void) const; + Tizen::Ui::Variant GetPropertyMaxYearRange(void) const; + + result SetPropertyDay(const Tizen::Ui::Variant& day); + Tizen::Ui::Variant GetPropertyDay(void) const; + + result SetPropertyMonth(const Tizen::Ui::Variant& month); + Tizen::Ui::Variant GetPropertyMonth(void) const; + + result SetPropertyYear(const Tizen::Ui::Variant& year); + Tizen::Ui::Variant GetPropertyYear(void) const; + + result SetPropertyDatePickerEnabled(const Tizen::Ui::Variant& enable); + Tizen::Ui::Variant GetPropertyDatePickerEnabled(void) const; + +public: + virtual ~_EditDate(void); + static _EditDate* CreateEditDateN(const Tizen::Base::String& title); + + result AddDateChangeEventListener(const _IDateTimeChangeEventListener& listener); + result RemoveDateChangeEventListener(const _IDateTimeChangeEventListener& listener); + + void SetDate(const Tizen::Base::DateTime& date); + Tizen::Base::DateTime GetDate(void) const; + + result SetDay(int day); + int GetDay(void) const; + + result SetMonth(int month); + int GetMonth(void) const; + + result SetYear(int year); + int GetYear(void) const; + + void SetCurrentDate(void); + + void SetDatePickerEnabled(bool enable); + bool IsDatePickerEnabled(void) const; + + result SetYearRange(int minYear, int maxYear); + result GetYearRange(int& minYear, int& maxYear) const; + + result SetMinYearRange(int minYear); + result SetMaxYearRange(int maxYear); + + int GetMinYearRange(void) const; + int GetMaxYearRange(void) const; + + _DateTimeBar* GetDateTimeBar(void) const; + + virtual void OnDraw(void); + virtual void OnBoundsChanged(void); + 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); + virtual bool OnTouchCanceled(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo); + virtual bool OnTouchMoved(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo); + virtual void OnTouchMoveHandled(const Tizen::Ui::_Control& control); + + virtual void OnDateTimeChanged(const Tizen::Ui::_Control& source, int year, int month, int day, int hour, int minute); + virtual void OnDateTimeChangeCanceled(const Tizen::Ui::_Control& source); + virtual void OnActionPerformed(const Tizen::Ui::_Control& source, int actionId); + virtual void OnChangeLayout(Tizen::Ui::_ControlRotation rotation); + virtual void OnFontChanged(Tizen::Graphics::Font* pFont); + virtual void OnFontInfoRequested(unsigned long& style, float& size); + virtual void OnSettingChanged(Tizen::Base::String& key); + + virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo); + virtual bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo); + + virtual bool OnFocusGained(const _Control& source); + virtual bool OnFocusLost(const _Control& source); + virtual void OnFocusModeStateChanged(void); + virtual void OnDrawFocus(void); + + Tizen::Graphics::FloatRectangle GetParentWindowBounds(void) const; + void SetXmlBoundsExist(bool isXmlBoundsExist); + + void OnVisibleStateChanged(void); + 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); + + _EditDate(const _EditDate&); + _EditDate& operator =(const _EditDate&); + + result CreateDateTimeBar(void); + result CalculateDateTimeBarPosition(void); + result FireDateChangeEvent(_DateTimeChangeStatus status); + void AdjustDay(int year, int month); + void CreateAccessibilityElement(void); + void UpdateAccessibilityElement(void); + +private: + _EditDatePresenter* __pEditDatePresenter; + _DateTimeChangeEvent* __pDateChangeEvent; + _DateTimeBar* __pDateTimeBar; + Tizen::Graphics::FloatRectangle __absoluteBounds; + Tizen::Graphics::FloatDimension __previousSize; + Tizen::Base::String __title; + Tizen::Ui::_AccessibilityElement* __pAccessibilityEditDateElement; + Tizen::Ui::_AccessibilityElement* __pAccessibilityYearElement; + Tizen::Ui::_AccessibilityElement* __pAccessibilityMonthElement; + Tizen::Ui::_AccessibilityElement* __pAccessibilityDayElement; + bool __isCalledBoundsChanged; + bool __isXmlBoundsExist; + static const float _TOUCH_PRESS_THRESHOLD_INSENSITIVE = 0.08f; + _ScrollPanel* __pParentPanel; + bool __isEnterKeyPressed; +}; // _EditDate + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_EDITDATE_H_ diff --git a/src/ui/inc/FUiCtrl_EditDateImpl.h b/src/ui/inc/FUiCtrl_EditDateImpl.h new file mode 100644 index 0000000..f22510f --- /dev/null +++ b/src/ui/inc/FUiCtrl_EditDateImpl.h @@ -0,0 +1,93 @@ +// +// 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_EditDateImpl.h + * @brief This is the header file for the _EditDateImpl class. + * + * This header file contains the declarations of the %_EditDateImpl class. + */ + +#ifndef _FUI_CTRL_INTERNAL_EDITDATE_IMPL_H_ +#define _FUI_CTRL_INTERNAL_EDITDATE_IMPL_H_ + +#include +#include "FUi_ControlImpl.h" +#include "FUiCtrl_EditDate.h" +#include "FUiCtrl_IDateTimeChangeEventListener.h" +#include "FUiCtrl_PublicDateTimeChangeEvent.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _EditDateImpl + : public _ControlImpl + , public _IDateTimeChangeEventListener + , virtual public Tizen::Base::Runtime::IEventListener +{ + +public: + virtual ~_EditDateImpl(void); + static _EditDateImpl* CreateEditDateImplN(EditDate* pControl, const Tizen::Graphics::Point& point, const Tizen::Base::String& title); + static _EditDateImpl* CreateEditDateImplFN(EditDate* pControl, const Tizen::Graphics::FloatPoint& point, const Tizen::Base::String& title); + virtual const char* GetPublicClassName(void) const; + virtual const EditDate& GetPublic(void) const; + virtual EditDate& GetPublic(void); + virtual const _EditDate& GetCore(void) const; + virtual _EditDate& GetCore(void); + +public: + result OnAttachedToMainTree(void); + result AddDateChangeEventListener(Tizen::Ui::IDateChangeEventListener& listener); + result RemoveDateChangeEventListener(Tizen::Ui::IDateChangeEventListener& listener); + Tizen::Base::DateTime GetDate(void) const; + int GetDay(void) const; + int GetMonth(void) const; + int GetYear(void) const; + void SetDate(const Tizen::Base::DateTime& date); + void SetCurrentDate(void); + result SetYear(int year); + result ValidateYear(int year); + result SetMonth(int month); + result SetDay(int day); + void SetDatePickerEnabled(bool enable); + bool IsDatePickerEnabled(void) const; + result SetYearRange(int minYear, int maxYear); + result GetYearRange(int& minYear, int& maxYear) const; + + virtual void OnDateTimeChanged(const Tizen::Ui::_Control& source, int year, int month, int day, int hour, int minute); + virtual void OnDateTimeChangeCanceled(const Tizen::Ui::_Control& source); + bool IsXmlBoundsExist(void); + virtual void OnChangeLayout(_ControlOrientation orientation); + +public: + static _EditDateImpl* GetInstance(EditDate& editDate); + static const _EditDateImpl* GetInstance(const EditDate& editDate); + +private: + _EditDateImpl(EditDate* pPublic, _EditDate* pCore); + + _EditDateImpl(const _EditDateImpl&); + _EditDateImpl& operator =(const _EditDateImpl&); + +private: + _PublicDateTimeChangeEvent* __pPublicDateChangeEvent; +}; // _EditDateImpl + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_EDITDATE_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_EditDatePresenter.h b/src/ui/inc/FUiCtrl_EditDatePresenter.h new file mode 100644 index 0000000..d3a9fbc --- /dev/null +++ b/src/ui/inc/FUiCtrl_EditDatePresenter.h @@ -0,0 +1,152 @@ +// +// 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_EditDatePresenter.h + * @brief This is the header file for the _EditDatePresenter class. + * + * This header file contains the declarations of the %_EditDatePresenter class. + */ + +#ifndef _FUI_CTRL_INTERNAL_EDITDATE_PRESENTER_H_ +#define _FUI_CTRL_INTERNAL_EDITDATE_PRESENTER_H_ + +#include +#include "FUi_Control.h" +#include "FUiCtrl_DateTimeDefine.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _EditDate; +class _DateTimeModel; + +class _EditDatePresenter + : public Tizen::Base::Object +{ +public: + _EditDatePresenter(void); + virtual ~_EditDatePresenter(void); + + static _EditDatePresenter* CreateInstanceN(const _EditDate& editDate, const Tizen::Base::String& title); + + Tizen::Base::DateTime GetDate(void) const; + int GetDay(void) const; + int GetMonth(void) const; + int GetYear(void) const; + void SetDate(const Tizen::Base::DateTime& date); + void SetCurrentDate(void); + result SetYear(int year); + result SetMonth(int month); + result SetDay(int day); + void SetDatePickerEnabled(bool enable); + bool IsDatePickerEnabled(void) const; + result SetMinYear(int minYear); + result SetMaxYear(int maxYear); + int GetMinYear(void) const; + int GetMaxYear(void) const; + result Initialize(void); + + result Draw(void); + result DrawFocus(void); + void UpdateLastSelectedValue(_DateTimeId id, bool isTouchPressed); + + _DateTimeId GetLastSelectedId(void) const; + void SetLastSelectedId(_DateTimeId boxId); + Tizen::Graphics::FloatRectangle GetDateAreaBounds(_DateTimeId id) const; + Tizen::Graphics::FloatRectangle GetTitleBounds(void) const; + void Animate(void); + + 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); + virtual bool OnTouchCanceled(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo); + virtual bool OnTouchMoved(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo); + virtual void OnTouchMoveHandled(const Tizen::Ui::_Control& control); + void OnFontChanged(Tizen::Graphics::Font* pFont); + void OnFontInfoRequested(unsigned long& style, float& size); + void SetFocusState(bool isFocused); + void SetFocusedElement(void); + 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 _KeyCode& keyCode); + + void EndTransaction(void); +private: + _EditDatePresenter(const _EditDatePresenter&); + _EditDatePresenter& operator =(const _EditDatePresenter&); + + void SetTitle(const Tizen::Base::String& title); + result InitializeTextObject(void); + result InitializeTitleObject(void); + float GetElementWidth(const float minWidth, const float maxWidth) const; + result LoadResource(void); + result CalculateAreaBounds(void); + 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, bool isCustomBitmap = false); + _DateTimeId GetBoxIdFromPosition(const Tizen::Graphics::FloatPoint& point) const; + +private: + _DateTimeModel* __pEditDateTimeModel; + _EditDate* __pEditDate; + + Tizen::Graphics::FloatRectangle __dayBounds; + Tizen::Graphics::FloatRectangle __monthBounds; + Tizen::Graphics::FloatRectangle __yearBounds; + Tizen::Graphics::FloatRectangle __dayTouchBounds; + Tizen::Graphics::FloatRectangle __monthTouchBounds; + Tizen::Graphics::FloatRectangle __yearTouchBounds; + Tizen::Graphics::FloatRectangle __titleBounds; + Tizen::Graphics::Bitmap* __pContentBgNormalColorReplacementBitmap; + Tizen::Graphics::Bitmap* __pContentBgDisabledColorReplacementBitmap; + Tizen::Graphics::Bitmap* __pContentBgPressedColorReplacementBitmap; + Tizen::Graphics::Bitmap* __pContentBgHighlightedColorReplacementBitmap; + Tizen::Graphics::Bitmap* __pContentBgEffectNormalBitmap; + Tizen::Graphics::Bitmap* __pContentBgEffectPressedBitmap; + Tizen::Graphics::Bitmap* __pContentBgEffectDisabledBitmap; + + Tizen::Base::String __title; + Tizen::Base::String __lastSelectedValue; + + bool __datePickerEnabled; + + _DateTimeId __selectedId; + _DateTimeId __lastSelectedId; + _DateTimeId __focusId; + bool __touchMoveHandled; + Tizen::Graphics::_Text::TextObject __titleObject; + Tizen::Graphics::_Text::TextObject __textObject; + Tizen::Graphics::Font* __pFont; + float __elementMargin; + float __dividerLineHeight; + float __titleFontSize; + float __dateFontSize; + Tizen::Ui::Animations::VisualElement* __pContentProvider; + bool __isAnimating; + bool __isEditDateInitialized; + float __elementWidth; + static const int __dividerCount = 2; + bool __isEnterKeyPressed; + bool __isFocused; + int __transactionId; +}; // _EditDatePresenter + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_EDITDATE_PRESENTER_H_ diff --git a/src/ui/inc/FUiCtrl_EditFieldImpl.h b/src/ui/inc/FUiCtrl_EditFieldImpl.h new file mode 100644 index 0000000..5b669d1 --- /dev/null +++ b/src/ui/inc/FUiCtrl_EditFieldImpl.h @@ -0,0 +1,241 @@ +// +// 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_EditFieldImpl.h + * @brief This file contains implementation of _EditFieldImpl class + */ + +#ifndef _FUI_CTRL_EDIT_FIELD_IMPL_H_ +#define _FUI_CTRL_EDIT_FIELD_IMPL_H_ + +#include +#include "FUi_ControlImpl.h" +#include "FUiCtrl_Edit.h" +#include "FUiCtrl_IActionEventListener.h" +#include "FUiCtrl_IKeypadEventListener.h" +#include "FUiCtrl_ILanguageEventListener.h" +#include "FUiCtrl_IScrollPanelEventListener.h" +#include "FUiCtrl_ITextBlockEventListener.h" +#include "FUiCtrl_ITextEventListener.h" +#include "FUiCtrl_IUiLinkEventListener.h" + +namespace Tizen { namespace Ui +{ +class ITouchEventListener; +class _IFocusEventListener; +}} + +namespace Tizen { namespace Ui { namespace Controls +{ +class _PublicActionEvent; +class _PublicKeypadEvent; +class _PublicLanguageEvent; +class _PublicLinkEvent; +class _PublicScrollPanelEvent; +class _PublicTextBlockEvent; +class _PublicTextEvent; + +class _EditFieldImpl + : public _ControlImpl + , virtual public Tizen::Base::Runtime::IEventListener + , public _IActionEventListener + , public _IKeypadEventListener + , public _ILanguageEventListener + , public _IScrollPanelEventListener + , public _ITextBlockEventListener + , public _ITextEventListener + , public _IUiLinkEventListener +{ +public: + class EditFieldSizeInfo : public _ControlImpl::SizeInfo + { + public: + EditFieldSizeInfo(void); + virtual Tizen::Graphics::Dimension GetDefaultMinimumSize(Tizen::Ui::_ControlOrientation orientation) const; + virtual Tizen::Graphics::FloatDimension GetDefaultMinimumSizeF(Tizen::Ui::_ControlOrientation orientation) const; + void SetTitleStyle(EditFieldTitleStyle titleStyle); + void SetSmallStyle(bool isSmallStyle); + + private: + EditFieldTitleStyle __titleStyle; + bool __smallStyle; + }; + +public: + _EditFieldImpl(EditField* pPublic, _Edit* pCore); + virtual ~_EditFieldImpl(void); + + static _EditFieldImpl* CreateEditFieldImplN(EditField* pControl, const Tizen::Graphics::Rectangle& rect, EditFieldStyle style, EditFieldTitleStyle titleStyle = EDIT_FIELD_TITLE_STYLE_NONE); + static _EditFieldImpl* CreateEditFieldImplN(EditField* pControl, const Tizen::Graphics::FloatRectangle& rect, EditFieldStyle style, EditFieldTitleStyle titleStyle = EDIT_FIELD_TITLE_STYLE_NONE); + result Initialize(EditFieldStyle style = EDIT_FIELD_STYLE_NORMAL, InputStyle inputStyle = INPUT_STYLE_OVERLAY, EditFieldTitleStyle titleStlye = EDIT_FIELD_TITLE_STYLE_NONE, bool enableClear = false, int limitLength = 100, GroupStyle groupStyle = GROUP_STYLE_NONE); + + virtual const _Edit& GetCore(void) const; + virtual _Edit& GetCore(void); + virtual const EditField& GetPublic(void) const; + virtual EditField& GetPublic(void); + virtual const char* GetPublicClassName(void) const; + + result SetAutoLinkMask(unsigned long autoLinks); + result SetBackgroundBitmap(EditStatus status, const Tizen::Graphics::Bitmap& bitmap); + result SetColor(EditStatus status, const Tizen::Graphics::Color& color); + result SetCurrentInputModeCategory(EditInputModeCategory inputModeCategory); + result SetCurrentLanguage(Tizen::Locales::LanguageCode languageCode); + result SetCursorPosition(int position); + result SetEllipsisPosition(EllipsisPosition position); + void SetGuideText(const Tizen::Base::String& guideText); + result SetGuideTextColor(const Tizen::Graphics::Color& color); + result SetInputModeCategory(unsigned long categories, bool enable); + result SetKeypadActionEnabled(bool enable); + result SetKeypadAction(Tizen::Ui::KeypadAction keypadAction); + void SetKeypadEnabled(bool enable); + void SetLowerCaseModeEnabled(bool enable); + result SetMargin(EditMarginType marginType, int margin); + result SetMargin(EditMarginType marginType, float margin); + result SetOverlayKeypadCommandButton(CommandButtonPosition position, const Tizen::Base::String& text, int actionId); + result SetOverlayKeypadCommandButtonVisible(bool visible); + result SetText(const Tizen::Base::String& text); + result SetTextAlignment(HorizontalAlignment alignment); + result SetTextColor(EditTextColor type, const Tizen::Graphics::Color& color); + result SetTextSize(int size); + result SetTextSize(float size); + result SetTitleText(const Tizen::Base::String& title); + result SetTitleTextColor(EditStatus status, const Tizen::Graphics::Color& color); + result SetViewModeEnabled(bool enable); + result SetTextPredictionEnabled(bool enable); + result SetPasswordVisible(bool visible); + + unsigned long GetAutoLinkMask(void) const; + void GetBlockRange(int& start, int& end) const; + Tizen::Graphics::Color GetColor(EditStatus status) const; + EditInputModeCategory GetCurrentInputModeCategory(void) const; + result GetCurrentLanguage(Tizen::Locales::LanguageCode& language) const; + int GetCursorPosition(void) const; + void GetCurrentTextRange(int& start, int& end) const; + EllipsisPosition GetEllipsisPosition(void) const; + Tizen::Base::String GetGuideText(void) const; + Tizen::Graphics::Color GetGuideTextColor(void) const; + unsigned long GetInputModeCategory(void) const; + Tizen::Ui::KeypadAction GetKeypadAction(void) const; + KeypadStyle GetKeypadStyle(void) const; + int GetMargin(EditMarginType marginType) const; + float GetMarginF(EditMarginType marginType) const; + int GetOverlayKeypadCommandButtonActionId(CommandButtonPosition position) const; + Tizen::Base::String GetOverlayKeypadCommandButtonText(CommandButtonPosition position) const; + int GetRemainingLength(void) const; + Tizen::Base::String GetText(void) const; + Tizen::Base::String GetText(int start, int end) const; + HorizontalAlignment GetTextAlignment(void) const; + Tizen::Graphics::Color GetTextColor(EditTextColor type) const; + int GetTextLength(void) const; + int GetTextSize(void) const; + float GetTextSizeF(void) const; + Tizen::Base::String GetTitleText(void) const; + Tizen::Graphics::Color GetTitleTextColor(EditStatus status) const; + + result AppendCharacter(const Tizen::Base::Character& character); + result AppendText(const Tizen::Base::String& text); + result BeginBlock(void); + result Clear(void); + result Copy(void); + result Cut(void); + result DeleteCharacterAtCursorPosition(void); + result HideKeypad(void); + result InsertTextAtCursorPosition(const Tizen::Base::String& text); + bool IsBlocked(void) const; + bool IsClipped(void) const; + bool IsKeypadEnabled(void) const; + bool IsKeypadActionEnabled(void) const; + bool IsLowerCaseModeEnabled(void) const; + bool IsOverlayCommandButtonVisible(void) const; + bool IsViewModeEnabled(void) const; + bool IsTextPredictionEnabled(void) const; + bool IsPasswordVisible(void) const; + + result Paste(void); + result ReleaseBlock(void); + result Remove(void); + result ShowKeypad(void); + + result AddActionEventListener(Tizen::Ui::IActionEventListener& listener); + result AddKeypadEventListener(Tizen::Ui::IKeypadEventListener& listener); + result AddLanguageEventListener(Tizen::Ui::ILanguageEventListener& listener); + result AddScrollPanelEventListener(Tizen::Ui::IScrollPanelEventListener& listener); + result AddTextBlockEventListener(Tizen::Ui::ITextBlockEventListener& listener); + result AddTextEventListener(Tizen::Ui::ITextEventListener& listener); + result AddUiLinkEventListener(Tizen::Ui::IUiLinkEventListener& listener); + + result RemoveActionEventListener(Tizen::Ui::IActionEventListener& listener); + result RemoveKeypadEventListener(Tizen::Ui::IKeypadEventListener& listener); + result RemoveLanguageEventListener(Tizen::Ui::ILanguageEventListener& listener); + result RemoveScrollPanelEventListener(Tizen::Ui::IScrollPanelEventListener& listener); + result RemoveTextBlockEventListener(Tizen::Ui::ITextBlockEventListener& listener); + result RemoveTextEventListener(Tizen::Ui::ITextEventListener& listener); + result RemoveUiLinkEventListener(Tizen::Ui::IUiLinkEventListener& listener); + + virtual void OnActionPerformed(const Tizen::Ui::_Control& source, int actionId); + virtual result OnBoundsChanged(const Tizen::Graphics::Rectangle& oldRect, const Tizen::Graphics::Rectangle& newRect); + virtual void OnKeypadActionPerformed(CoreKeypadAction keypadAction); + virtual void OnKeypadClosed(void); + virtual void OnKeypadOpened(void); + virtual void OnKeypadWillOpen(void); + virtual void OnKeypadBoundsChanged(void); + virtual void OnLanguageChanged(Tizen::Locales::LanguageCode oldLanguage, Tizen::Locales::LanguageCode newLanguage); + virtual void OnLinkClicked(Tizen::Ui::_Control& source, const Tizen::Base::String& text, Tizen::Base::Utility::LinkType linkType, const Tizen::Base::String& link); + virtual void OnOtherControlSelected(const Tizen::Ui::_Control& source); + virtual void OnOverlayControlClosed(const Tizen::Ui::_Control& source); + virtual void OnOverlayControlCreated(const Tizen::Ui::_Control& source); + virtual void OnOverlayControlOpened(const Tizen::Ui::_Control& source); + virtual void OnTextBlockSelected(Tizen::Ui::_Control& source, int start, int end); + virtual void OnTextValueChanged(const Tizen::Ui::_Control& source); + virtual void OnTextValueChangeCanceled(const Tizen::Ui::_Control& source); + void SetEditTextFilter(IEditTextFilter* pFilter); + void SendOpaqueCommand (const Tizen::Base::String& command); + +public: + static _EditFieldImpl* GetInstance(EditField& editField); + static const _EditFieldImpl* GetInstance(const EditField& editField); + +protected: + virtual result Dispose(void); + +private: + _EditFieldImpl(const _EditFieldImpl&); + _EditFieldImpl& operator =(const _EditFieldImpl&); + +private: + friend class _Edit; + _Edit* __pEdit; + + EditFieldStyle __editFieldStyle; + InputStyle __inputStyle; + unsigned long __inputModeCategory; + EditInputModeCategory __currentInputMode; + + _PublicActionEvent* __pPublicActionEvent; + _PublicKeypadEvent* __pPublicKeypadEvent; + _PublicLanguageEvent* __pPublicLanguageEvent; + _PublicLinkEvent* __pPublicLinkEvent; + _PublicScrollPanelEvent* __pPublicScrollPanelEvent; + _PublicTextBlockEvent* __pPublicTextBlockEvent; + _PublicTextEvent* __pPublicTextEvent; + unsigned long __autoLinkMask; +}; // _EditFieldImpl + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_EDIT_FIELD_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_EditModel.h b/src/ui/inc/FUiCtrl_EditModel.h new file mode 100644 index 0000000..3973e67 --- /dev/null +++ b/src/ui/inc/FUiCtrl_EditModel.h @@ -0,0 +1,362 @@ +// +// 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_EditModel.h + * @brief This is the header file for the _EditModel class. + * + * This header file contains the declarations of the %_EditModel class. + */ + +#ifndef _FUI_CTRL_INTERNAL_EDIT_MODEL_H_ +#define _FUI_CTRL_INTERNAL_EDIT_MODEL_H_ + +#include +#include +#include +#include "FUiCtrl_FooterImpl.h" +#include "FUiCtrl_IKeypadEventListener.h" + + +namespace Tizen { namespace Ui { namespace Controls +{ +/** + * @class _EditModel + * @brief + * @since 2.0 + * + * + * + * + */ +class _EditModel + : public Tizen::Base::Object +{ +// Lifecycle +public: + _EditModel(void); + virtual ~_EditModel(void); + +// Operations +public: + /** + * Sets the auto-link mask. + * + * @since 2.0 + * @return An error code + * @param[in] autoLinks The auto-link mask.@n + * Multiple link types can be combined using bitwise OR (see Tizen::Base::Utility::LinkType). + * For more information, refer to @ref linkAutoLinkDetection "here". + * @exception E_SUCCESS The method was 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 input style is not INPUT_STYLE_OVERLAY. + * @exception E_SYSTEM A system error occurred. + * @remarks When @c autoLinks is set to zero, the auto-link detection is disabled. + * @see Tizen::Base::Utility::LinkType + * @see GetAutoLinkMask() + * @see IsViewModeEnabled() + * @see SetViewModeEnabled() + */ + result SetAutoLinkMask(unsigned long autoLinks); + + /** + * Gets the auto-link mask. + * + * @since 2.0 + * @return The auto-link mask + * @exception E_SUCCESS The method was 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 input style is not INPUT_STYLE_OVERLAY. + * @exception E_SYSTEM A system error occurred. + * @remarks The specific error code can be accessed using the GetLastResult()() method. + * @see SetAutoLinkMask() + */ + unsigned long GetAutoLinkMask(void) const; + + /** + * Determines whether the view mode is enabled. + * + * @since 2.0 + * @return A Boolean value indicating whether the view mode is enabled. + * @exception E_SUCCESS The method was successful. + * @exception E_SYSTEM A system error occurred. + * @remarks The specific error code can be accessed using the GetLastResult() method. + * @see SetViewModeEnabled() + */ + bool IsViewModeEnabled(void) const; + + /** + * Enables or disables the view mode. + * + * @since 2.0 + * @return An error code. + * @param[in] enable The view mode enabled flag + * @exception E_SUCCESS The method was successful. + * @exception E_SYSTEM A system error occurred. + * @remarks When the view mode is enabled, the auto-detected links will be displayed as linked text. + * @see IsViewModeEnabled() + */ + result SetViewModeEnabled(bool enable); + + /** + * Enables or disables the keypad action. + * + * @since 2.0 + * @return An error code. + * @param[in] enable A Boolean value indicating whether the keypad action is enabled. + * @exception E_SUCCESS The method was successful. + */ + result SetKeypadActionEnabled(bool enable); + + /** + * Checks whether the keypad action is enabled. + * + * @since 2.0 + * @return @c true if the keypad action is enabled @n + * @c false, otherwise + */ + bool IsKeypadActionEnabled(void) const; + +// Keypad Action + /** + * Gets the keypad action type. + * + * @since 2.0 + * @return The keypad action + * @exception E_SUCCESS The method was 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 input style is not INPUT_STYLE_OVERLAY. + * @exception E_SYSTEM A system error occurred. + * @remarks The specific error code can be accessed using the GetLastResult()() method. + */ + Tizen::Ui::Controls::CoreKeypadAction GetKeypadAction(void) const; + + /** + * Sets the keypad action type. + * + * @since 2.0 + * @return An error code + * @param[in] keypadAction The keypad action + * @exception E_SUCCESS The method was 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 input style is not INPUT_STYLE_OVERLAY. + * @exception E_SYSTEM A system error occurred. + * @remarks Depending on the value of @c keypadAction specified, the keypad's enter key label will change accordingly. + */ + result SetKeypadAction(Tizen::Ui::Controls::CoreKeypadAction keypadAction); + + /** + * Sets the input language. + * + * @since 2.0 + * @return An error code + * @param[in] language The language to set + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. @n + * -- The specified language is not supported or unavailable. + * @exception E_SYSTEM A system error occurred. + */ + result SetCurrentLanguage(Tizen::Locales::LanguageCode languageCode); + + /** + * Gets the current input language. + * + * @since 2.0 + * @return An error code + * @param[out] language The current input language + * @exception E_SUCCESS The method was successful. + * @exception E_SYSTEM A system error occurred. + */ + result GetCurrentLanguage(Tizen::Locales::LanguageCode& language) const; + + /** + * Sets the input language. + * + * @since 2.0 + * @return An error code + * @param[in] language The inital keypad language to set + * @exception E_SUCCESS The method was successful. + * @exception E_SYSTEM A system error occurred. + */ + result SetInitialKeypadLanguage(Tizen::Locales::LanguageCode languageCode); + + /** + * Gets the current input language. + * + * @since 2.0 + * @return An error code + * @param[out] language The current inital keypad language + * @exception E_SUCCESS The method was successful. + * @exception E_SYSTEM A system error occurred. + */ + result GetInitialKeypadLanguage(Tizen::Locales::LanguageCode& language) const; + + /** + * Enables or disables the keypad. + * + * @since 2.0 + * @param[in] enable A Boolean value indicating whether the keypad is enabled. + */ + void SetKeypadEnabled(bool enable); + + /** + * Checks whether the keypad is enabled. + * + * @since 2.0 + * @return @c true if the keypad is enabled @n + * @c false, otherwise + */ + bool IsKeypadEnabled(void) const; + + /** + * Enables or disables the lowercase mode. + * + * @since 2.0 + * @param[in] enable Set to @c true to enable lowercase mode @n + * @c false, otherwise + */ + void SetLowerCaseModeEnabled(bool enable); + + /** + * Checks whether the lowercase mode is enabled. + * + * @since 2.0 + * @return @c true if the lowercase mode is set @n + * @c false, otherwise + */ + bool IsLowerCaseModeEnabled(void) const; + + /** + * Gets the keypad style. + * + * @since 2.0 + * @return The keypad style + * @exception E_SUCCESS The method was successful. + * @exception E_SYSTEM A system error occurred. + * @remarks The specific error code can be accessed using the GetLastResult()() method. + * @see SetKeypadStyle() + */ + KeypadStyle GetKeypadStyle(void) const; + + /** + * Sets the keypad style. + * + * @since 2.0 + * @return An error code + * @param[in] keypadStyle The keypad style + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. @n + * -- @c keypadStyle cannot be @c KEYPAD_STYLE_PASSWORD. + * @exception E_SYSTEM A system error occurred. + * @remarks Depending on the value of the specified @c keypadStyle, the keypad's layout will change accordingly. + * @see GetKeypadStyle() + */ + result SetKeypadStyle(KeypadStyle keypadStyle); + + result SetTextPredictionEnabled(bool enable); + + bool IsTextPredictionEnabled(void) const; + + /** + * Enables or disables the auto resizing if the candidate word list appears. + * + * @since 2.0 + * @return An error code + * @param[in] enable Set to @c true to enable the auto resizing, @n + * else @c false + * @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 current style of the %ExpandableEditArea does not support the operation. + * @remarks Note that when this option is enabled, the normal style %ExpandableEditArea is auto resized and the line added and removed events are + * 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 + */ + result SetAutoResizingEnabled(bool enable); + + /** + * Checks whether the auto-resizing is enabled. + * + * @since 2.0 + * @return @c true if the auto-resizing is enabled, @n + * else @c false + * @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 current style of the %ExpandableEditArea control does not support the operation. + * @remarks The specific error code can be accessed using the GetLastResult() method. + * @see SetAutoResizingEnabled() + */ + bool IsAutoResizingEnabled(void) const; + + void SetMaxLineCount(int maxLineCount); + + /** + * Gets the maximum line count supported by the flexible text edit. + * + * @since 2.0 + * @return The maximum line count, @n + * else @c -1 if an error occurs + * @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. + */ + int GetMaxLineCount(void) const; + + // command button + result SetCommandButtonItem(CommandButtonPosition buttonPosition, int actionId, const Tizen::Base::String& text); + Tizen::Base::String GetKeypadCommandButtonText(CommandButtonPosition position) const; + int GetKeypadCommandButtonActionId(CommandButtonPosition position) const; + void UpdateKeypadCommandButtonText(void); + +private: + _EditModel(const _EditModel& value); + _EditModel& operator =(const _EditModel& value); + +private: +// Attributes + unsigned long __autoLinkMask; + + bool __keypadActionEnabled; + + bool __viewModeEnabled; + + KeypadStyle __keypadStyle; + + bool __keypadEnabled; + + bool __isLowerCase; + + bool __isTextPredictionEnabled; + + CoreKeypadAction __keypadAction; + + bool __enablePredictiveAutoResizing; + + int __maxLineCount; + + Tizen::Locales::LanguageCode __languageCode; + Tizen::Locales::LanguageCode __initialKeypadLanguageCode; + + int __leftCommandButtonActionId; + int __rightCommandButtonActionId; + Tizen::Base::String __leftCommandButtonText; + Tizen::Base::String __rightCommandButtonText; +}; // _EditModel + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_EDIT_MODEL_H_ diff --git a/src/ui/inc/FUiCtrl_EditPresenter.h b/src/ui/inc/FUiCtrl_EditPresenter.h new file mode 100644 index 0000000..49a16ce --- /dev/null +++ b/src/ui/inc/FUiCtrl_EditPresenter.h @@ -0,0 +1,611 @@ +// +// 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_EditPresenter.h + * @brief This is the header file for the _EditPresenter class. + * + * This header file contains the declarations of the %_EditPresenter class. + */ + +#ifndef _FUI_CTRL_INTERNAL_EDIT_PRESENTER_H_ +#define _FUI_CTRL_INTERNAL_EDIT_PRESENTER_H_ + +#include +#include +#include +#include +#include +#include +#include "FUi_Clipboard.h" +#include "FUi_IClipboardPopupEventListener.h" +#include "FUi_InputConnectionImpl.h" +#include "FUi_UiTouchEvent.h" +#include "FUiCtrl_Edit.h" +#include "FUiCtrl_EditModel.h" +#include "FUiCtrl_IFrameEventListener.h" +#include "FUiCtrl_IEditCopyPasteEventListener.h" +#include "FUiCtrl_Keypad.h" +#include "FUiCtrl_Toolbar.h" + +namespace Tizen { namespace Ui { namespace Controls +{ +const int EDIT_SCROLLFRAME_MAX = 5; +const int EDIT_PASSWORD_BUFFER_MAX = 1024; + +enum _EditFooterVisibleStatus +{ + EDIT_FOOTER_VISIBLE_STATUS_NONE = 0, + EDIT_FOOTER_VISIBLE_STATUS_SHOW, + EDIT_FOOTER_VISIBLE_STATUS_HIDE +}; + +enum _EditTextStatus +{ + EDIT_TEXT_STATUS_COMPOSE_NON = 0, + EDIT_TEXT_STATUS_COMPOSE +}; + +enum _EditTextType +{ + EDIT_TEXT_TYPE_INPUT = 0, + EDIT_TEXT_TYPE_GUIDE, + EDIT_TEXT_TYPE_TITLE +}; + +enum _EditFontChange +{ + EDIT_FONT_CHANGE_CONTENT = 0, + EDIT_FONT_CHANGE_TITLE, + EDIT_FONT_CHANGE_ALL +}; + +struct _EditScrollEffectInfo +{ + float previousY; + float currentY; + float previousX; + float currentX; + float previousAbsX; + float currentAbsX; + float previousAbsY; + float currentAbsY; + float effectGap; + int cursorPosition; + int effectFrame; + int touchScrollFrameLevel[EDIT_SCROLLFRAME_MAX]; +}; + +class _Form; +class _EditCopyPasteManager; +class _FlickAnimation; +class _Frame; +class _Scroll; +class _ScrollPanel; + + +class _EditPresenter + : public Tizen::Base::Object + , virtual public Tizen::Base::Runtime::IEventListener + , public IInputConnectionEventListener + , public IInputConnectionProvider + , public Tizen::Base::Runtime::ITimerEventListener + , public _IEditCopyPasteEventListener + , public _IClipboardPopupEventListener + , virtual public _IFrameEventListener + , public Tizen::Ui::Controls::IEditTextFilter +{ +public: + _EditPresenter(void); + virtual ~_EditPresenter(void); + + static _EditPresenter* CreateInstanceN(void); + virtual result Initialize(const _Control& control); + result AddActionEventListener(const _IActionEventListener& listener); + result RemoveActionEventListener(const _IActionEventListener& listener); + virtual bool OnLongPressGestureDetected(void); + virtual bool OnTapGestureDetected(void); + virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer); + virtual bool OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo); + virtual bool OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo); + virtual bool OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo); + virtual bool OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo); + virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo); + virtual bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo); + + virtual void OnClipboardPopupClosed(const ClipboardItem* pClipboardItem); + virtual result SetInitialBounds(void); + 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); + virtual bool OnFocusGained(void); + virtual bool OnFocusLost(void); + + virtual bool OnNotifiedN(Tizen::Base::Collection::IList* pArgs); + virtual void OnFrameActivated(const Tizen::Ui::Controls::_Frame& source); + virtual void OnFrameDeactivated(const Tizen::Ui::Controls::_Frame& source); + virtual void OnFrameMinimized(const Tizen::Ui::Controls::_Frame& source); + virtual void OnFrameRestored(const Tizen::Ui::Controls::_Frame& source); + + virtual result SetLineSpacing(int linePixelGap); + virtual result SetLineSpacing(float linePixelGap); + virtual int GetLineSpacing(void) const; + virtual float GetLineSpacingF(void) const; + + void OnScrollPanelBoundsChanged(void); + + void OnFontInfoRequested(unsigned long& style, float& size); + void OnFontChanged(Tizen::Graphics::Font* pFont); + + result SetAutoLinkMask(unsigned long autoLinks); + result SetAutoResizingEnabled(bool enable); + result SetBlockRange(int start, int end); + result SetBlockRange(int start, int end, int leftRowIndex, int leftColumnIndex, int rightRowIndex, int rightColumnIndex); + result SetCurrentInputModeCategory(EditInputModeCategory inputModeCategory); + result SetCurrentLanguage(Tizen::Locales::LanguageCode languageCode); + result SetCursorPosition(int position); + result SetCursorPosition(int position,int rowIndex, int columnIndex); + void SetClientBounds(void); + result SetEllipsisPosition(EllipsisPosition position); + virtual result SetFlexBounds(const Tizen::Graphics::FloatRectangle& bounds); + virtual result SetTextSize(const int size); + virtual result SetTextSize(const float size); + result SetFont(const Tizen::Graphics::Font& font); + result AdjustFont(Tizen::Graphics::Font& font, _EditFontChange fontChange = EDIT_FONT_CHANGE_CONTENT); + result SetFontType(const Tizen::Base::String& typefaceName, unsigned long styleMask); + result SetTextStyle(unsigned long style); + result SetGuideText(const Tizen::Base::String& guideText); + result SetInputModeCategory(unsigned long categories, bool enable); + result SetInputModePanelCategory(unsigned long panelCategory); + result SetKeypadActionEnabled(bool enable); + result SetKeypadAction(CoreKeypadAction keypadAction); + void SetKeypadEnabled(bool enable); + result SetKeypadStyle(KeypadStyle keypadStyle); + result SetKeypadNormalNumberStyle(bool enable); + result SetTextPredictionEnabled(bool enable); + result SetTextLimitLength(int limitLength); + void SetLowerCaseModeEnabled(bool enable); + void SetMaxLineCount(int maxLineCount); + result SetKeypadCommandButton(CommandButtonPosition position, const Tizen::Base::String& text, int actionId); + _Toolbar* GetKeypadCommandButton(void) const; + result SetKeypadCommandButtonVisible(bool visible); + result SetText(const Tizen::Base::String& text); + result SetTextAlignment(HorizontalAlignment alignment); + result SetTextBounds(Tizen::Graphics::Rectangle& bounds); + result SetTextBounds(Tizen::Graphics::FloatRectangle& bounds); + result SetTitleText(const Tizen::Base::String& title); + result SetViewModeEnabled(bool enable); + unsigned long GetAutoLinkMask(void) const; + void GetBlockRange(int& start, int& end) const; + EditInputModeCategory GetCurrentInputModeCategory(void) const; + result GetCurrentLanguage(Tizen::Locales::LanguageCode& language) const; + void GetCurrentTextRange(int& start, int& end) const; + int GetCursorPositionAt(const Tizen::Graphics::FloatPoint& touchPoint) const; + int GetCursorPositionAt(const Tizen::Graphics::FloatPoint& touchPoint, int& rowIndex, int& columnIndex, bool isMoving = false); + virtual bool IsTextBlockedInTokenEdit(void) const; + int GetCursorPosition(void) const; + result GetCursorBounds(bool isAbsRect, Tizen::Graphics::FloatRectangle& cursorBounds); + EllipsisPosition GetEllipsisPosition(void) const; + Tizen::Graphics::Font* GetFont(void) const; + Tizen::Graphics::Font* CopyFontN(const Tizen::Graphics::Font* pFont); + Tizen::Graphics::Font* CreateFontN(const Tizen::Graphics::Font* pFont, unsigned long styleMask); + Tizen::Graphics::Font* CreateFontN(const Tizen::Graphics::Font* pFont, unsigned long newStyle, int newSize); + Tizen::Graphics::Font* CreateFontN(const Tizen::Graphics::Font* pSrcFaceFont, const Tizen::Graphics::Font* pSrcStyleFont); + unsigned int GetFontStyle(const Tizen::Graphics::Font* pBaseFont) const; + result GetFontType(Tizen::Base::String& typefaceName, unsigned long& styleMask) const; + Tizen::Base::String GetTitleFontFaceName(void); + unsigned long GetTextStyle(void) const; + Tizen::Base::String GetGuideText(void) const; + int GetTextSize(void) const; + float GetTextSizeF(void) const; + unsigned long GetInputModeCategory(void) const; + CoreKeypadAction GetKeypadAction(void) const; + result GetKeypadBounds(Tizen::Graphics::FloatRectangle& bounds); + void GetKeypadBoundsEx(Tizen::Graphics::FloatRectangle& bounds) const; + float GetClipboardHeight(void) const; + bool CheckKeypadExist(_ControlOrientation orientation); + bool IsKeypadRotating(_ControlOrientation orientation); + KeypadStyle GetKeypadStyle(void) const; + int GetTextLimitLength(void) const; + int GetMaxLineCount(void) const; + int GetKeypadCommandButtonActionId(CommandButtonPosition position) const; + Tizen::Base::String GetKeypadCommandButtonText(CommandButtonPosition position) const; + _Form* GetParentForm(void); + _ScrollPanel* GetParentPanel(void) const; + int GetRemainingLength(void) const; + Tizen::Base::String GetText(void) const; + Tizen::Base::String GetText(int start, int end) const; + HorizontalAlignment GetTextAlignment(void) const; + int GetTextLength(void) const; + int GetTextLineCount(void) const; + int GetTextTotalHeight(void) const; + float GetTextTotalHeightF(void) const; + Tizen::Base::String GetTitleText(void) const; + void GetWordPosition(int cursorPos, int& startPos, int& endPos) const; + result GetTextImageRangeAt(int postion, int& startPosition, int& endPosition) const; + bool IsAutoResizingEnabled(void) const; + bool IsBlocked(void) const; + bool IsClipped(void) const; + bool IsFocused(void) const; + bool IsInternalFocused(void) const; + bool IsKeypadActionEnabled(void) ; + void SetKeypadEventSkipped(bool skip); + bool IsKeypadEnabled(void) ; + bool IsLowerCaseModeEnabled(void) const; + bool IsKeypadCommandButtonVisible(void) const; + bool IsViewModeEnabled(bool internal = true) const; + bool IsTextPredictionEnabled(void) const; + bool IsKeypadExist(void) const; + bool IsClipboardExist(void) const; + void CheckUSBKeyboardStatus(void); + bool IsUsbKeyboardConnected(void) const; + bool IsCurrentFocused(void); + bool InitializeFocusedCondition(void); + void SetSentKeypadEvent(CoreKeypadEventStatus sentKeypadEvent); + CoreKeypadEventStatus GetLastSentKeypadEvent(void); + + result AppendCharacter(const Tizen::Base::Character& character); + result AppendText(const Tizen::Base::String& text); + result BeginTextBlock(void); + 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); + result CopyText(void); + virtual result CutText(void); + result DeleteCharacterAt(int index); + result DeleteCharacterAtCursorPosition(void); + result DeleteText(int startCursorPosition, int endCursorPosition); + void SetCursorDisabled(bool disabled); + result HideKeypad(bool focus = false); + void ChangeKeypadStatus(void); + result InsertCharacterAt(int index, const Tizen::Base::Character& character); + result InsertTextAt(int index, const Tizen::Base::String& text); + result InsertTextAt(int position, const Tizen::Base::String& text, const Tizen::Graphics::Bitmap& textImage); + result InsertTextAtCursorPosition(const Tizen::Base::String& text); + result PasteText(void); + result ReleaseTextBlock(void); + result RemoveTextBlock(void); + result Resize(void); + result ShowKeypad(bool focus = true); + result StartFlickAnimation(const Tizen::Graphics::FloatPoint& flickPosition, int flickTime); + Tizen::Graphics::FloatRectangle GetTextAreaBoundsF(void) const; + Tizen::Graphics::FloatRectangle GetTitleBoundsF(void) const; + Tizen::Graphics::FloatRectangle GetClearIconBoundsF(void) const; + void FinishTextComposition(void); + void InitializeCopyPasteManager(void); + bool IsCopyPasteManagerExist(void) const; + bool GetTextCompositionState(void) const; + bool IsCopyPastePopup(const _Control& control) const; + bool IsCopyPasteHandle(const _Control& control) const; + 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; + result UpdateComponentInformation(void); + void SetCursorChangedFlag(bool enabled); + bool GetCursorChangedFlag(void) const; + void SetAutoShrinkModeEnabled(bool enable); + bool IsAutoShrinkModeEnabled(void) const; + void SetEditGroupStyle(GroupStyle groupStyle); + void ScrollPanelToCursorPosition(bool show = true); + void SetSearchBarFlag(bool enabled); + bool GetSearchBarFlag(void) const; + void PostInternalEvent(const Tizen::Base::String& type); + void ReleaseCopyPastePopup(void); + bool IsCopyPastePopupExist(void) const; + bool IsCopyPasteHandleExist(void) const; + void DeleteFullscreenKeypad(void); + void SetBlockRangeWithShiftArrowkey(_KeyCode keyCode); + void SetBlockRangeWithCtrlShiftArrowkey(_KeyCode keyCode); + void SetEditTextFilter(_IEditTextFilter* pFilter); + virtual bool ValidatePastedText(const Tizen::Base::String& pastedText, Tizen::Base::String& replacedText); + void SendOpaqueCommand (const Tizen::Base::String& command); + Tizen::Ui::Animations::_VisualElement* GetTextVisualElement(void); + bool IsBounded(void) const; + void SetControlInitialBounds(Tizen::Graphics::FloatRectangle initBounds); + void SetControlInitialPosition(Tizen::Graphics::FloatPoint initPosition); + bool IsUpdateInitialBounds(void); + virtual Tizen::Graphics::Rectangle GetTextBounds(void) const; + virtual Tizen::Graphics::FloatRectangle GetTextBoundsF(void) const; + result InitializeCursor(void); + result CalculateCursorBounds(const Tizen::Graphics::FloatRectangle& textBounds, Tizen::Graphics::FloatRectangle& cursorBounds, int curPos = -1); + result CalculateCursorBounds(const Tizen::Graphics::FloatRectangle& textBounds, Tizen::Graphics::FloatRectangle& cursorBounds, int rowIndex, int columnIndex); + virtual void ResetTextBounds(void){} + void UpdateKeypadCommandString(void); + result SetPasswordVisible(bool visible); + bool IsPasswordVisible(void) const; + bool IsClearIconPressed(void) const; + 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); + result StartTitleSlidingTimer(void); + virtual void OnInputConnectionTextCommitted(InputConnection& source, const Tizen::Base::String& committedText); + virtual void DeleteSurroundingText(InputConnection& source, int offset, int chars); + virtual void OnTextCommitted(const Tizen::Base::String& commitText); + virtual void OnSurroundingTextDeleted(int offset, int charCount); + result InitializeAtFirstDrawing(void); + Tizen::Ui::Animations::_VisualElement* GetCursorVisualElement(void) const; + result DrawBackground(Tizen::Graphics::Canvas& canvas, bool drawTitleText = true); + result DrawText(Tizen::Graphics::Canvas& canvas); + bool IsInitialized(void) const; + void StopCursorTimer(void); + result StartCursorTimer(void); + virtual void OnCursorTimerExpired(void); + virtual result SetModel(const _EditModel& editModel); + virtual float CalculateFlexibleHeightF(void); + void SetCursorEnabled(bool enable); + bool IsCursorEnabled(void) const; + void SetScrollBarVisible(bool enable); + void SetScrollBarBounds(const Tizen::Graphics::FloatRectangle& bounds); + Tizen::Graphics::FloatRectangle GetDisplayScrollBoundsF(void) const; + Tizen::Graphics::FloatRectangle GetInitialBoundsF(void) const; + void SetPreviousScrollBarPosition(int position); + void SetPreviousScrollBarPosition(float position); + int GetPreviousScrollPosition(void) const; + float GetPreviousScrollPositionF(void) const; + void SetMaximumPreviousScrollBarPosition(int position); + void SetMaximumPreviousScrollBarPosition(float position); + _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); + virtual void OnInputConnectionPanelShowStateChanged(InputConnection& source, InputPanelShowState showState); + virtual void OnInputConnectionPanelLanguageChanged(InputConnection& source, Tizen::Locales::LanguageCode language); + virtual void OnInputConnectionPanelBoundsChanged(InputConnection& source, const Tizen::Graphics::Rectangle& bounds); + virtual void OnInputConnectionTextPredictionShowStateChanged(InputConnection& source, bool isShown); + virtual void OnInputConnectionTextPredictionBoundsChanged(InputConnection& source, const Tizen::Graphics::Rectangle& bounds); + virtual void OnInputConnectionComposingTextChanged(InputConnection& source, const Tizen::Base::String& composingText, int cursorPosition); + virtual void OnClipboardPopupOpened(Tizen::Graphics::Dimension& clipboardPopupSize); + virtual void OnClipboardPopupBoundsChanged(Tizen::Graphics::Dimension& clipboardPopupSize); + virtual void OnClipboardPopupClosed(void); + virtual void GetPreviousText(InputConnection& source, Tizen::Base::String& text, int& cursorPosition); + void OnComposingTextChanged(const Tizen::Base::String& preeditText, int cursorPosition); + void OnLanguageStateChanged(void* data, Tizen::Locales::LanguageCode newLanguageCode); + result InitializeFlickAnimation(void); + 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); + result SetWrap(Tizen::Graphics::_Text::TextObjectWrapType wrapMode); + bool IsContained(Tizen::Graphics::FloatRectangle& paramRect) const; + float CalculateMaximumFlexibleHeight(void); + result ChangePasswordToEchoCharacter(int cursorPos, int textLength); + result ConvertLinkType(void); + int GetLinkElementOffsetInTextBuffer(int elementIndex) const; + // todo : move to DrawBackground + result DrawBackgroundBitmap(Tizen::Graphics::Canvas& canvas, bool focused); + result DrawChangeableBackground(Tizen::Graphics::Canvas& canvas, bool focused, int bitmapId, int effectBitmapId, bool outLine = false, int outlineBitmapId = 0); + result DrawClearIcon(Tizen::Graphics::Canvas& canvas); + // todo : move to DrawBackground + result DrawSingleLineBackground(Tizen::Graphics::Canvas& canvas, bool drawTitleText); + // todo : move to DrawBackgroundBitmap + result DrawSingleLineBackgroundBitmap(Tizen::Graphics::Canvas& canvas, bool focused); + // todo : move to DrawText + result DrawTextForEntireFontSetting(Tizen::Graphics::Canvas& canvas); + result DrawTitleText(void); + result MoveCursor(const Tizen::Graphics::FloatRectangle& fromRect, const Tizen::Graphics::FloatRectangle& toRect); + result ScrollContentsOnFlick(void); + result ChangePasswordToEchoCharacter(wchar_t* dspStrBuffer, wchar_t echoChar); + // todo : move to PastePasswordEchoCharacter + result ReplaceTextIntoPasswordHyphenString(void); + result ChangePasswordToPlainText(void); + // todo : delete, do not use + result SetFocused(void); + void ScrollText(float distance); + void FadeOutScrollBar(void); + // todo : move to OperateFlickScrollEffect + bool ScrollOnFlick(float moveDistanceY); + result StartFlickTimer(int flickVelocityX, int flickVelocityY); + void StopFlickTimer(void); + void StopPasswordTimer(void); + result StartPasswordTimer(void); + result OnPasswordTimerExpired(void); + result OnTitleSlidingTimerExpired(void); + result OnFlickTimerExpired(void); + bool IsDelimiter(wchar_t character) const; + void AdjustParentPanelHeight(bool restore); + result ChangeLayoutInternal(_ControlOrientation orientation, bool deflateForm = true); + _Button* CreateCommandButtonItemN(int actionId, const Tizen::Base::String& text); + void CheckInitialFooterVisibleState(void); + void SetFooterVisible(bool isVisible); + result ShowFullscreenKeypad(void); + InputPanelAction ConvertKeypadAction(CoreKeypadAction keypadAction); + void ScrollPanelToTop(bool show); + bool IsUnsupportedChracterExist(const KeypadStyle keypadStyle, const Tizen::Base::String& text); + result Dispose(void); + + _EditPresenter(const _EditPresenter&); + _EditPresenter& operator =(const _EditPresenter&); + +protected: + Tizen::Base::Runtime::Timer* __pTitleSlidingTimer; + +private: + _Edit* __pEdit; + wchar_t* __pTextBuffer; + Tizen::Base::String* __pTextString; + _EditModel* __pEditModel; + _Scroll* __pScrollBar; + // todo : check to be needed + _EditScrollEffectInfo* __pScrollEffect; + int __limitLength; + HorizontalAlignment __horizontalAlignment; + HorizontalAlignment __horizontalAlignmentForBidi; + bool __isScrollBarVisible; + Tizen::Graphics::FloatRectangle __scrollBarBounds; + Tizen::Graphics::FloatRectangle __initialBounds; + float __previousScrollBarPos; // First save prev scroll and if scroll pos is changed then draw scroll + float __previousScrollBarMaxPos; // When scroll max value is changed then draw scroll + + _IActionEventListener* __pActionEventListener; + + Tizen::Base::Runtime::Timer* __pCursorTimer; + Tizen::Base::Runtime::Timer* __pFlickAnimationTimer; + Tizen::Base::Runtime::Timer* __pPasswordTimer; + + Tizen::Graphics::Font* __pFont; + + Tizen::Ui::Animations::_VisualElement* __pCursorVisualElement; + Tizen::Ui::Animations::_VisualElement* __pDragAndDropCueVisualElement; + Tizen::Ui::Animations::_VisualElement* __pTextVisualElement; + Tizen::Ui::Animations::_VisualElement* __pTitleTextVisualElement; + + _EditCopyPasteManager* __pCopyPasteManager; + _FlickAnimation* __pFlickAnimation; + _Form* __pParentForm; + _Keypad* __pFullscreenKeypad; + _ScrollPanel* __pParentPanel; + _Toolbar* __pCommandButton; + + _InputConnectionImpl* __pInputConnection; + bool __isInputConnectionBound; + CoreKeypadEventStatus __sentKeypadEvent; + + _Clipboard* __pClipboard; + + Tizen::Base::String __guideText; + Tizen::Base::String __titleText; + + Tizen::Graphics::FloatPoint __pressedPoint; + bool __isCopyPastePopupMoving; + Tizen::Graphics::FloatPoint __pressedAbsolutePoint; + + Tizen::Graphics::FloatRectangle __clearIconBounds; + Tizen::Graphics::FloatRectangle __textBoxBounds; + Tizen::Graphics::FloatRectangle __textObjectBounds; + Tizen::Graphics::FloatRectangle __titleBounds; + Tizen::Graphics::FloatRectangle __clientBounds; + Tizen::Graphics::FloatRectangle __previousCursorBounds; + Tizen::Graphics::FloatRectangle __keypadBounds; + + Tizen::Graphics::_Text::TextObject* __pTextObject; + Tizen::Graphics::_Text::TextObject* __pGuideTextObject; + Tizen::Graphics::_Text::TextObject* __pTitleTextObject; + Tizen::Graphics::_Text::TextObjectActionType __titleSlidingAction; + Tizen::Graphics::_Text::TextObjectWrapType __textObjectWrap; + + bool __isTextBlocked; + bool __isGuideTextColorChanged; + bool __isKeypadCommandButtonVisible; + bool __isKeypadCommandButtonUserSetting; + bool __isTextComposing; + bool __isCopyPasteManagerExist; + bool __isCursorChanged; + bool __isCursorInitialized; + bool __isCursorDisabled; + // todo : check InitAtFirstDrawing + bool __isInitialized; + // todo : check + bool __isMovingCursorByTouchMove; + bool __isTouchMoving; + bool __isTouchPressed; + bool __isClearIconPressed; + bool __isClearIconVisible; + bool __isCursorOpaque; + bool __isTouchReleaseSkipped; + bool __isViewerModeEnabled; + bool __isKeypadNormalNumberStyleEnabled; + bool __isTextCompositionFinished; + bool __isFlexibleHeightFrozen; + bool __isKeypadShowing; + bool __isKeypadHiding; + bool __resizedByKeypadHide; + + int __blockStartPos; + int __cursorPos; + float __prevTotalTextHeight; + int __textLength; + int __composingTextLength; + float __titleWidth; + float __verticalMargin; + bool __isUSBKeyboardConnected; + bool __rotated; + bool __isCutLinkParserEnabled; + + static bool __isKeypadExist; + static bool __isClipboardExist; + static float __initialParentHeight; + static float __clipboardHeight; + static _EditFooterVisibleStatus __initialFooterVisibleStatus; + static bool __footerVisibleChanged; + static unsigned int __latestBoundedContext; + static const float TOUCH_PRESS_THRESHOLD_IN_CLEAR_AREA; + static _ScrollPanel* __pResizedPanel; + + wchar_t __echoChar; + + _EditTextStatus __ContentTextStatus; + + bool __isAutoShrinkEnabled; + + GroupStyle __groupStyle; + + bool __isFontInitialized; + float __contentFontSize; + float __titleFontSize; + float __defaultTouchMoveThreshold; + unsigned long __contentFontStyle; + unsigned long __contentTextStyle; + Tizen::Base::String __titleFontFaceName; + bool __isSearchBar; + _Frame* __pCurrentFrame; + _IEditTextFilter* __pTextFilter; + bool __textBlockMoveLeft; + bool __textBlockMoving; + bool __clipboardConnected; + bool __updateInitialBounds; + Tizen::Graphics::Color __blockTextColor; + int __rowCursorIndex; + int __columnCursorIndex; + bool __isPasswordVisible; + bool __needToCreateCopyPastePopup; + FloatRectangle __calculatedCursorBounds; + bool __dragAndDropStarted; + Tizen::Base::String __dragAndDropString; + bool __isTouchLongPressed; +}; // _EditPresenter + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_EDIT_PRESENTER_H_ diff --git a/src/ui/inc/FUiCtrl_EditTime.h b/src/ui/inc/FUiCtrl_EditTime.h new file mode 100644 index 0000000..8e5a076 --- /dev/null +++ b/src/ui/inc/FUiCtrl_EditTime.h @@ -0,0 +1,195 @@ +// +// 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_EditTime.h + * @brief This is the header file for the _EditTime class. + * + * This header file contains the declarations of the %_EditTime class. + */ + +#ifndef _FUI_CTRL_INTERNAL_EDITTIME_H_ +#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 "FUiCtrl_DateTimeBar.h" +#include "FUiCtrl_ScrollPanel.h" +#include "FUiCtrl_ScrollPanelEvent.h" + +namespace Tizen { namespace Ui +{ +class _AccessibilityElement; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ +class _EditTimePresenter; + +class _OSP_EXPORT_ _EditTime + : public _Control + , 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 + +{ + DECLARE_CLASS_BEGIN(_EditTime, _Control); + DECLARE_PROPERTY("time", GetPropertyTime, SetPropertyTime); + DECLARE_PROPERTY("hour", GetPropertyHour, SetPropertyHour); + DECLARE_PROPERTY("minute", GetPropertyMinute, SetPropertyMinute); + DECLARE_PROPERTY("timePickerEnabled", GetPropertyTimePickerEnabled, SetPropertyTimePickerEnabled); + DECLARE_CLASS_END(); + + result SetPropertyTime(const Tizen::Ui::Variant& time); + Tizen::Ui::Variant GetPropertyTime(void) const; + + result SetPropertyHour(const Tizen::Ui::Variant& hour); + Tizen::Ui::Variant GetPropertyHour(void) const; + + result SetPropertyMinute(const Tizen::Ui::Variant& minute); + Tizen::Ui::Variant GetPropertyMinute(void) const; + + result SetPropertyTimePickerEnabled(const Tizen::Ui::Variant& enable); + Tizen::Ui::Variant GetPropertyTimePickerEnabled(void) const; + +public: + virtual ~_EditTime(void); + static _EditTime* CreateEditTimeN(const Tizen::Base::String& title); + + result AddTimeChangeEventListener(const _IDateTimeChangeEventListener& listener); + result RemoveTimeChangeEventListener(const _IDateTimeChangeEventListener& listener); + + void SetTime(const Tizen::Base::DateTime& time); + Tizen::Base::DateTime GetTime(void) const; + + result SetHour(int hour); + int GetHour(void) const; + + result SetMinute(int minute); + int GetMinute(void) const; + + void SetCurrentTime(void); + + void SetTimePickerEnabled(bool enable); + bool IsTimePickerEnabled(void) const; + + void Set24HourNotationEnabled(bool enable); + bool Is24HourNotationEnabled(void) const; + + result FireTimeChangeEvent(_DateTimeChangeStatus status); + + _DateTimeBar* GetDateTimeBar(void) const; + + virtual void OnDraw(void); + virtual void OnBoundsChanged(void); + 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); + virtual bool OnTouchCanceled(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo); + virtual bool OnTouchMoved(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo); + virtual void OnTouchMoveHandled(const Tizen::Ui::_Control& control); + + virtual void OnDateTimeChanged(const Tizen::Ui::_Control& source, int year, int month, int day, int hour, int minute); + virtual void OnDateTimeChangeCanceled(const Tizen::Ui::_Control& source); + virtual void OnActionPerformed(const Tizen::Ui::_Control& source, int actionId); + virtual void OnChangeLayout(Tizen::Ui::_ControlRotation rotation); + void OnFontChanged(Tizen::Graphics::Font* pFont); + void OnFontInfoRequested(unsigned long& style, float& size); + virtual void OnSettingChanged(Tizen::Base::String& key); + + virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo); + virtual bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo); + bool OnFocusGained(const _Control& source); + bool OnFocusLost(const _Control& source); + virtual void OnFocusModeStateChanged(void); + virtual void OnDrawFocus(void); + + Tizen::Graphics::FloatRectangle GetParentWindowBounds(void) const; + void SetXmlBoundsExist(bool isXmlBoundsExist); + + void OnVisibleStateChanged(void); + void OnAncestorVisibleStateChanged(const _Control& control); + void OnAncestorEnableStateChanged(const _Control& control); + + + void CreateAccessibilityElement(void); + void UpdateAccessibilityElement(void); + + // accessibility listener + virtual bool OnAccessibilityFocusMovedNext(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element); + virtual bool OnAccessibilityFocusMovedPrevious(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element); + virtual bool OnAccessibilityReadingElement(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element); + virtual bool OnAccessibilityReadElement(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element); + virtual bool OnAccessibilityFocusIn(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element); + virtual bool OnAccessibilityFocusOut(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element); + 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); + + _EditTime(const _EditTime&); + _EditTime& operator =(const _EditTime&); + + result CreateDateTimeBar(void); + result CalculateDateTimeBarPosition(void); + +private: + _EditTimePresenter* __pEditTimePresenter; + _DateTimeChangeEvent* __pTimeChangeEvent; + _DateTimeBar* __pDateTimeBar; + Tizen::Graphics::FloatRectangle __absoluteBounds; + Tizen::Graphics::FloatDimension __previousSize; + Tizen::Base::String __title; + Tizen::Ui::_AccessibilityElement* __pAccessibilityEditTimeElement; + Tizen::Ui::_AccessibilityElement* __pAccessibilityHourElement; + Tizen::Ui::_AccessibilityElement* __pAccessibilityMinuteElement; + Tizen::Ui::_AccessibilityElement* __pAccessibilityAmPmElement; + bool __isCalledBoundsChanged; + bool __isXmlBoundsExist; + static const float _TOUCH_PRESS_THRESHOLD_INSENSITIVE = 0.08f; + _ScrollPanel* __pParentPanel; + bool __isEnterKeyPressed; +}; // _EditTime + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_EDITTIME_H_ diff --git a/src/ui/inc/FUiCtrl_EditTimeImpl.h b/src/ui/inc/FUiCtrl_EditTimeImpl.h new file mode 100644 index 0000000..34ea33d --- /dev/null +++ b/src/ui/inc/FUiCtrl_EditTimeImpl.h @@ -0,0 +1,89 @@ +// +// 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_EditTimeImpl.h + * @brief This is the header file for the _EditTimeImpl class. + * + * This header file contains the declarations of the %_EditTimeImpl class. + */ + +#ifndef _FUI_CTRL_INTERNAL_EDITTIME_IMPL_H_ +#define _FUI_CTRL_INTERNAL_EDITTIME_IMPL_H_ + +#include +#include "FUi_ControlImpl.h" +#include "FUiCtrl_EditTime.h" +#include "FUiCtrl_IDateTimeChangeEventListener.h" +#include "FUiCtrl_PublicDateTimeChangeEvent.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _EditTimeImpl + : public _ControlImpl + , public _IDateTimeChangeEventListener + , virtual public Tizen::Base::Runtime::IEventListener +{ + +public: + virtual ~_EditTimeImpl(void); + static _EditTimeImpl* CreateEditTimeImplN(EditTime* pControl, const Tizen::Graphics::Point& point, const Tizen::Base::String& title); + static _EditTimeImpl* CreateEditTimeImplFN(EditTime* pControl, const Tizen::Graphics::FloatPoint& point, const Tizen::Base::String& title); + virtual const char* GetPublicClassName(void) const; + virtual const EditTime& GetPublic(void) const; + virtual EditTime& GetPublic(void); + virtual const _EditTime& GetCore(void) const; + virtual _EditTime& GetCore(void); + +public: + result OnAttachedToMainTree(void); + result AddTimeChangeEventListener(Tizen::Ui::ITimeChangeEventListener& listener); + result RemoveTimeChangeEventListener(Tizen::Ui::ITimeChangeEventListener& listener); + Tizen::Base::DateTime GetTime(void) const; + int GetHour(void) const; + int GetMinute(void) const; + void SetTime(const Tizen::Base::DateTime& time); + void SetCurrentTime(void); + result SetHour(int hour); + result SetMinute(int minute); + void SetTimePickerEnabled(bool enable); + bool IsTimePickerEnabled(void) const; + void Set24HourNotationEnabled(bool enable); + + virtual void OnDateTimeChanged(const Tizen::Ui::_Control& source, int year, int month, int day, int hour, int minute); + virtual void OnDateTimeChangeCanceled(const Tizen::Ui::_Control& source); + + bool IsXmlBoundsExist(void); + virtual void OnChangeLayout(_ControlOrientation orientation); +public: + static _EditTimeImpl* GetInstance(EditTime& editTime); + static const _EditTimeImpl* GetInstance(const EditTime& editTime); + +private: + _EditTimeImpl(EditTime* pPublic, _EditTime* pCore); + + _EditTimeImpl(const _EditTimeImpl&); + _EditTimeImpl& operator =(const _EditTimeImpl&); + +private: + _PublicDateTimeChangeEvent* __pPublicTimeChangeEvent; +}; // _EditTimeImpl + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_EDITTIME_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_EditTimePresenter.h b/src/ui/inc/FUiCtrl_EditTimePresenter.h new file mode 100644 index 0000000..e6b515b --- /dev/null +++ b/src/ui/inc/FUiCtrl_EditTimePresenter.h @@ -0,0 +1,171 @@ +// +// 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_EditTimePresenter.h + * @brief This is the header file for the _EditTimePresenter class. + * + * This header file contains the declarations of the %_EditTimePresenter class. + */ + +#ifndef _FUI_CTRL_INTERNAL_EDITTIME_PRESENTER_H_ +#define _FUI_CTRL_INTERNAL_EDITTIME_PRESENTER_H_ + +#include +#include "FUi_Control.h" +#include "FUiCtrl_DateTimeDefine.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _EditTime; +class _DateTimeModel; + +class _EditTimePresenter + : public Tizen::Base::Object +{ +public: + _EditTimePresenter(const Tizen::Base::String& title); + virtual ~_EditTimePresenter(void); + + static _EditTimePresenter* CreateInstanceN(const _EditTime& editTime, const Tizen::Base::String& title); + + Tizen::Base::DateTime GetTime(void) const; + int GetHour(void) const; + int GetMinute(void) const; + void SetTime(const Tizen::Base::DateTime& time); + void SetCurrentTime(void); + result SetHour(int hour); + result SetMinute(int minute); + void SetTimePickerEnabled(bool enable); + bool IsTimePickerEnabled(void) const; + void Set24HourNotationEnabled(bool enable); + bool Is24HourNotationEnabled(void) const; + + _DateTimeId GetLastSelectedId(void) const; + void SetLastSelectedId(_DateTimeId boxId); + Tizen::Graphics::FloatRectangle GetDisplayAreaBoundsFromHoursStyle(_DateTimeId displayBoxId) const; + float GetTextWidth(_DateTimeId boxId) const; + void SetTitleBounds(void); + Tizen::Graphics::FloatRectangle GetTitleBounds(void) const; + + void SetAmEnabled(bool amEnable); + bool GetAmEnabled(void) const; + + result Draw(void); + void Animate(void); + + void SetFocusedElement(void); + void SetFocusState(bool isFocused); + bool OnFocusLost(const _Control& source); + void OnFocusModeStateChanged(void); + bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo); + bool OnKeyReleased(const _Control& source, const _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); + virtual bool OnTouchCanceled(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo); + virtual bool OnTouchMoved(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo); + virtual void OnTouchMoveHandled(const Tizen::Ui::_Control& control); + void OnFontChanged(Tizen::Graphics::Font* pFont); + void OnFontInfoRequested(unsigned long& style, float& size); + result Initialize(void); + void UpdateTimeFormat(void); + void UpdateLastSelectedValue(_DateTimeId boxId, bool __isTouchPressed); + + result DrawFocus(void); + + void EndTransaction(void); + + +private: + _EditTimePresenter(const _EditTimePresenter&); + _EditTimePresenter& operator =(const _EditTimePresenter&); + + result InitializeTextObject(void); + result InitializeTitleObject(void); + void SetTimeConversion(void); + + result DrawTitle(Tizen::Graphics::Canvas& canvas); + result DrawContentBitmap(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, _DateTimeId displayBoxId); + result DrawText(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, const Tizen::Base::String& text, _DateTimeId displayBoxId, float textSize = 0.0f); + 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, bool isCustomBitmap = false); + float GetTimeElementWidth(void) const; + +private: + _DateTimeModel* __pEditDateTimeModel; + _EditTime* __pEditTime; + + Tizen::Graphics::FloatRectangle __bounds; + Tizen::Graphics::FloatRectangle __titleBounds; + + Tizen::Base::String __ampmString; + Tizen::Base::String __hourString; + Tizen::Base::String __minuteString; + Tizen::Base::String __title; + Tizen::Base::String __lastSelectedValue; + + bool __24hours; + bool __is24hoursSet; + bool __amEnable; + bool __timePickerEnabled; + + _DateTimeId __selectedId; + _DateTimeId __lastSelectedId; + _DateTimeId __focusId; + + bool __touchMoveHandled; + + Tizen::Graphics::Bitmap* __pAmPmBgNormalColorReplacementBitmap; + Tizen::Graphics::Bitmap* __pAmPmBgDisabledColorReplacementBitmap; + Tizen::Graphics::Bitmap* __pAmPmBgPressedColorReplacementBitmap; + Tizen::Graphics::Bitmap* __pAmPmBgHighlightedColorReplacementBitmap; + Tizen::Graphics::Bitmap* __pAmPmBgEffectNomralBitmap; + Tizen::Graphics::Bitmap* __pAmPmBgEffectPressedBitmap; + Tizen::Graphics::Bitmap* __pAmPmBgEffectDisabledBitmap; + Tizen::Graphics::Bitmap* __pColonColorReplacementBitmap; + Tizen::Graphics::Bitmap* __pColonDisabledColorReplacementBitmap; + Tizen::Graphics::Bitmap* __pContentBgNormalColorReplacementBitmap; + Tizen::Graphics::Bitmap* __pContentBgDisabledColorReplacementBitmap; + Tizen::Graphics::Bitmap* __pContentBgPressedColorReplacementBitmap; + Tizen::Graphics::Bitmap* __pContentBgHighlightedColorReplacementBitmap; + Tizen::Graphics::Bitmap* __pContentBgEffectNormalBitmap; + Tizen::Graphics::Bitmap* __pContentBgEffectPressedBitmap; + Tizen::Graphics::Bitmap* __pContentBgEffectDisabledBitmap; + Tizen::Graphics::Bitmap* __pfocusBitmap; + Tizen::Ui::Animations::VisualElement* __pContentProvider; + + Tizen::Graphics::_Text::TextObject __textObject; + Tizen::Graphics::Font* __pFont; + + Tizen::Graphics::_Text::TextObject __titleObject; + float __amPmTextSize; + float __titleFontSize; + float __timeFontSize; + bool __isAnimating; + bool __isEditTimeInitialized; + bool __isEnterKeyPressed; + bool __isFocused; + int __transactionId; +}; // _EditTimePresenter + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_EDITTIME_PRESENTER_H_ diff --git a/src/ui/inc/FUiCtrl_ExpandableEditAreaEvent.h b/src/ui/inc/FUiCtrl_ExpandableEditAreaEvent.h new file mode 100644 index 0000000..820a625 --- /dev/null +++ b/src/ui/inc/FUiCtrl_ExpandableEditAreaEvent.h @@ -0,0 +1,109 @@ +// +// 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_ExpandableEditAreaEvent.h + * @brief This is the header file for _ExpandableEditAreaEvent class. + * + * This header file contains declaration of _ExpandableEditAreaEvent class. + */ +#ifndef _FUICTRL_EXPANDABLE_EDITAREA_EVENT_H_ +#define _FUICTRL_EXPANDABLE_EDITAREA_EVENT_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui +{ +class _Control; +} } // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ + +enum _ExpandableEditAreaEventStatus +{ + _EXPANDABLE_EDITAREA_EVENT_ADDED = 0, + _EXPANDABLE_EDITAREA_EVENT_REMOVED +}; + +/** +* @class _ExpandableEditAreaEvent +* @brief This class handles a action event. It is inherited from Event class. +* +* The Window(root of all widgets) class has an instance of the _ExpandableEditAreaEvent class as a member variable. +* +*/ +class _ExpandableEditAreaEvent + : public Tizen::Base::Runtime::_Event +{ +// Lifecycle +public: + /** + * This is the default class destructor. + * + */ + virtual ~_ExpandableEditAreaEvent(void); + + static _ExpandableEditAreaEvent* CreateInstanceN(const Tizen::Ui::_Control& source); + +// Accessors + + /** + * This method returns the owner of this event. + * + * @return See the comment above. + */ + const Tizen::Ui::_Control* GetSource(void) const; + + static Tizen::Base::Runtime::IEventArg* CreateExpandableEditAreaEventArgN(_ExpandableEditAreaEventStatus status, int newLineCount); + +// Operations +protected: + /** + * This is the default class constructor. + * + * @remarks After creating an instance of this class, you must explicitly call one of + * construction methods to initialize the instance. + * + */ + _ExpandableEditAreaEvent(const Tizen::Ui::_Control& source); + + /** + * This method checks the arg and finds out the type of event. After that this method calls appopriate + * pListener's method. + * + * @param[in] listener It is a event listener related to this action event. + * @param[in] arg It is an argument-like instance of action event retransmitted to the listener's method + * as an argument. + * @exception E_SUCCESS - The method is successful. + * @exception E_ARG_NULL - The listener is null. + * @exception E_INVALID_ARG - The argument passed to a method contains an invalid value.@n + *   The pListener is not the instance of IActionEventListener class or + * the p__ActionEventArg is not the instance of _ActionEventArg class. + * + */ + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + +//Attributess +private: + const Tizen::Ui::_Control* __pSource; +}; // _ExpandableEditAreaEvent + +}}} // Tizen::Ui::Controls + +#endif // _FUICTRL_EXPANDABLE_EDITAREA_EVENT_H_ diff --git a/src/ui/inc/FUiCtrl_ExpandableEditAreaImpl.h b/src/ui/inc/FUiCtrl_ExpandableEditAreaImpl.h new file mode 100644 index 0000000..500a348 --- /dev/null +++ b/src/ui/inc/FUiCtrl_ExpandableEditAreaImpl.h @@ -0,0 +1,228 @@ +// +// 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. +// +#ifndef _FUI_CTRL_INTERNAL_EXPANDABLEEDITAREA_IMPL_H_ +#define _FUI_CTRL_INTERNAL_EXPANDABLEEDITAREA_IMPL_H_ + +#include +#include +#include "FUi_ControlImpl.h" +#include "FUi_IFocusEventListener.h" +#include "FUiCtrl_Edit.h" +#include "FUiCtrl_IExpandableEditAreaEventListener.h" +#include "FUiCtrl_IKeypadEventListener.h" +#include "FUiCtrl_ILanguageEventListener.h" +#include "FUiCtrl_ITextEventListener.h" +#include "FUiCtrl_ITextBlockEventListener.h" +#include "FUiCtrl_ITokenFilter.h" +#include "FUiCtrl_PublicExpandableEditAreaEvent.h" +#include "FUiCtrl_PublicKeypadEvent.h" +#include "FUiCtrl_PublicLanguageEvent.h" +#include "FUiCtrl_PublicTextBlockEvent.h" +#include "FUiCtrl_PublicTextEvent.h" + +namespace Tizen { namespace Ui { namespace Animations +{ +class _VisualElement; +}}} // Tizen::Ui::Animation + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _TokenEdit; +class _Edit; + +class _ExpandableEditAreaImpl + : public _ControlImpl + , virtual public Tizen::Base::Runtime::IEventListener + , public _ITextEventListener + , public _IExpandableEditAreaEventListener + , public _ITextBlockEventListener + , public _IKeypadEventListener + , public _ILanguageEventListener + , public _ITokenFilter +{ +public: + static _ExpandableEditAreaImpl* CreateExpandableEditAreaImplN(ExpandableEditArea* pControl, const Tizen::Graphics::Rectangle& rect, ExpandableEditAreaStyle style, ExpandableEditAreaTitleStyle titleStyle); + static _ExpandableEditAreaImpl* CreateExpandableEditAreaImplFN(ExpandableEditArea* pControl, const Tizen::Graphics::FloatRectangle& fRect, ExpandableEditAreaStyle style, ExpandableEditAreaTitleStyle titleStyle); + _ExpandableEditAreaImpl(ExpandableEditArea* pPublic, _Edit* pCore); + virtual ~_ExpandableEditAreaImpl(void); + + virtual const char* GetPublicClassName(void) const; + virtual const ExpandableEditArea& GetPublic(void) const; + virtual ExpandableEditArea& GetPublic(void); + virtual const _Edit& GetCore(void) const; + virtual _Edit& GetCore(void); + + result Construct(const Tizen::Graphics::Rectangle& rect, ExpandableEditAreaStyle style, ExpandableEditAreaTitleStyle titleStyle, int maxLines = 10); + result Construct(const Tizen::Graphics::FloatRectangle& rect, ExpandableEditAreaStyle style, ExpandableEditAreaTitleStyle titleStyle, int maxLines = 10); + result CreateExpandableEditArea(const Tizen::Graphics::FloatRectangle& fRect, ExpandableEditAreaStyle style, ExpandableEditAreaTitleStyle titleStyle, int maxLines); + int GetMargin(EditMarginType marginType) const; + float GetMarginF(EditMarginType marginType) const; + result SetMargin(EditMarginType marginType, int margin); + result SetMargin(EditMarginType marginType, float margin); + Tizen::Ui::KeypadAction GetKeypadAction(void) const; + result SetKeypadAction(Tizen::Ui::KeypadAction keypadAction); + KeypadStyle GetKeypadStyle(void) const; + result SetKeypadStyle(KeypadStyle keypadStyle); + result HideKeypad(void); + int GetTextSize(void) const; + float GetTextSizeF(void) const; + result SetTextSize(int size); + result SetTextSize(float size); + Tizen::Graphics::Color GetColor(EditStatus status) const; + Tizen::Graphics::Color GetTextColor(EditTextColor type) const; + result SetBackgroundBitmap(EditStatus status, const Tizen::Graphics::Bitmap& bitmap); + result SetColor(EditStatus status, const Tizen::Graphics::Color& color); + result SetTextColor(EditTextColor type, const Tizen::Graphics::Color& color); + Tizen::Base::String GetText(int start, int end) const; + result AddExpandableEditAreaEventListener(IExpandableEditAreaEventListener& listener); + result RemoveExpandableEditAreaEventListener(IExpandableEditAreaEventListener& listener); + result AddKeypadEventListener(Tizen::Ui::IKeypadEventListener& listener); + result RemoveKeypadEventListener(Tizen::Ui::IKeypadEventListener& listener); + result AddTextBlockEventListener(Tizen::Ui::ITextBlockEventListener& listener); + result RemoveTextBlockEventListener(Tizen::Ui::ITextBlockEventListener& listener); + result AddTextEventListener(Tizen::Ui::ITextEventListener& listener); + result AddLanguageEventListener(Tizen::Ui::ILanguageEventListener& listener); + result RemoveLanguageEventListener(Tizen::Ui::ILanguageEventListener& listener); + result RemoveTextEventListener(Tizen::Ui::ITextEventListener& listener); + result SetLowerCaseModeEnabled(bool enable); + bool IsLowerCaseModeEnabled(void) const; + result SetCursorPosition(int position); + int GetCursorPosition(void) const; + Tizen::Base::String GetText(void) const; + int GetTextLength(void) const; + void SetMaxLineCount(int maxLineCount); + int GetMaxLineCount(void) const; + result SetText(const Tizen::Base::String& text); + result InsertTextAt(int index, const Tizen::Base::String& text); + result AppendText(const Tizen::Base::String& text); + result AppendCharacter(const Tizen::Base::Character& character); + result InsertTextAt(int position, const Tizen::Base::String& text, const Tizen::Graphics::Bitmap& textImage); + result AppendText(const Tizen::Base::String& text, const Tizen::Graphics::Bitmap& textImage); + result Clear(void); + result DeleteCharacterAt(int index); + result InsertCharacterAt(int index, const Tizen::Base::Character& character); + result SetTitleText(const Tizen::Base::String& title); + Tizen::Base::String GetTitleText(void) const; + result SetGuideText(const Tizen::Base::String& guideText); + Tizen::Base::String GetGuideText(void) const; + Tizen::Graphics::Color GetGuideTextColor(void) const; + result SetGuideTextColor(const Tizen::Graphics::Color& color); + int GetLineSpacing(void) const; + float GetLineSpacingF(void) const; + result SetLineSpacing(int multiplier, int extra); + result SetLineSpacing(int multiplier, float extra); + Tizen::Graphics::Color GetTitleTextColor(EditStatus status) const; + result SetTitleTextColor(EditStatus status, const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetTokenColor(ExpandableEditAreaTokenStatus status) const; + result SetTokenColor(ExpandableEditAreaTokenStatus status, const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetTokenTextColor(void) const; + Tizen::Graphics::Color GetSelectedTokenTextColor(void) const; + result SetTokenTextColor(const Tizen::Graphics::Color& color); + result SetSelectedTokenTextColor(const Tizen::Graphics::Color& color); + int GetLimitLength(void) const; + result SetLimitLength(int limitLength); + result SetAutoResizingEnabled(bool enable); + bool IsAutoResizingEnabled(void) const; + void SetAutoShrinkModeEnabled(bool enable); + bool IsAutoShrinkModeEnabled(void) const; + + void SetKeypadEnabled(bool enable); + bool IsKeypadEnabled(void) const; + result SetTextPredictionEnabled(bool enable); + bool IsTextPredictionEnabled(void) const; + + result ShowKeypad(void); + int GetTextLineCount(void) const; + result GetBlockRange(int& start, int& end) const; + result ReleaseBlock(void); + result RemoveTextBlock(void); + result SetBlockRange(int start, int end); + + // for token + ITokenFilter* GetTokenFilter(void) const; + result SetTokenFilter(const ITokenFilter* pFilter); + result AppendToken(const Tizen::Base::String& token); + result InsertTokenAt(int index, const Tizen::Base::String& token); + Tizen::Base::String GetTokenAt(int index) const; + int GetTokenCount(void) const; + int GetSelectedTokenIndex(void) const; + bool IsTokenEditModeEnabled(void) const; + result RemoveTokenAt(int index); + result SetTokenSelected(int index, bool selected); + result SetTokenEditModeEnabled(bool enable); + + result GetCurrentLanguage(Tizen::Locales::LanguageCode& language) const; + result SetCurrentLanguage(Tizen::Locales::LanguageCode languageCode); + void SetEditTextFilter(IEditTextFilter* pFilter); + void SendOpaqueCommand (const Tizen::Base::String& command); + +public: + virtual result OnBoundsChanged(const Tizen::Graphics::Rectangle& oldRect, const Tizen::Graphics::Rectangle& newRect); + + virtual void OnTextValueChanged(const Tizen::Ui::_Control& source); + virtual void OnTextValueChangeCanceled(const Tizen::Ui::_Control& source); + + virtual void OnExpandableEditAreaLineAdded(const Tizen::Ui::_Control& source, int newLineCount); + virtual void OnExpandableEditAreaLineRemoved(const Tizen::Ui::_Control& source, int newLineCount); + + virtual void OnTextBlockSelected(Tizen::Ui::_Control& source, int start, int end); + + virtual void OnKeypadWillOpen(void); + virtual void OnKeypadOpened(void); + virtual void OnKeypadClosed(void); + virtual void OnKeypadBoundsChanged(void); + virtual void OnKeypadActionPerformed(CoreKeypadAction keypadAction); + + virtual void OnLanguageChanged(Tizen::Locales::LanguageCode oldLanguage, Tizen::Locales::LanguageCode newLanguage); + + virtual bool ReplaceToken(const Tizen::Base::String& token, Tizen::Base::String& replacement); + +public: + static _ExpandableEditAreaImpl* GetInstance(ExpandableEditArea& expandableEditArea); + static const _ExpandableEditAreaImpl* GetInstance(const ExpandableEditArea& expandableEditArea); + +protected: + virtual result Dispose(void); + +private: + _ExpandableEditAreaImpl(const _ExpandableEditAreaImpl&); + _ExpandableEditAreaImpl& operator =(const _ExpandableEditAreaImpl&); + +private: + friend class _Edit; + _Edit* __pExpandableEditArea; + ExpandableEditAreaStyle __expandableEditAreaStyle; + ExpandableEditAreaTitleStyle __expandableEditAreaTitleStyle; + int __maxLineCount; + + _PublicTextEvent* __pPublicTextEvent; + _PublicExpandableEditAreaEvent* __pPublicExpandableEditAreaEvent; + _PublicTextBlockEvent* __pPublicTextBlockEvent; + _PublicKeypadEvent* __pPublicKeypadEvent; + _PublicLanguageEvent* __pPublicLanguageEvent; + + ITokenFilter* __pTokenFilter; + + static const int EXPANDABLE_EDIT_AREA_DEFAULT_MAX_LINE_COUNT = 10; + static const int EXPANDABLE_EDIT_AREA_TEXT_LENGTH_MAX = 2048; + +}; // _ExpandableEditAreaImpl + +}}} // Tizen::Ui::Controls + +#endif // _FUICTRL__EXPANDABLE_EDIT_AREA_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_ExpandableListImpl.h b/src/ui/inc/FUiCtrl_ExpandableListImpl.h new file mode 100644 index 0000000..dee50b8 --- /dev/null +++ b/src/ui/inc/FUiCtrl_ExpandableListImpl.h @@ -0,0 +1,264 @@ +// +// 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_ExpandableListImpl.h + * @brief This is the header file for the _ExpandableListImpl class. + * + * This header file contains the declarations of the _ExpandableListImpl class and its helper classes. + */ + +#ifndef _FUI_CTRL_INTERNAL_EXPANDABLELIST_IMPL_H_ +#define _FUI_CTRL_INTERNAL_EXPANDABLELIST_IMPL_H_ + +#include +#include "FUiCtrl_CustomListItemImpl.h" +#include +#include +#include "FUiCtrl_TableViewItemProvider.h" +#include +#include "FUiCtrl_TableView.h" +#include "FUiCtrl_ITableViewItemEventListener.h" +#include "FUiCtrl_ListBaseImpl.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _ListView; +class _TableViewGroupItemData; +class _TableViewItemData; +class _CheckBoxElement; +class _ExpandableListImpl; + +class _ExpandableListItemDataProvider + : public Tizen::Ui::Controls::IGroupedTableViewItemProvider +{ +public: + _ExpandableListItemDataProvider(_ExpandableListImpl* pList); + virtual ~_ExpandableListItemDataProvider(void); + + virtual int GetGroupCount(void); + virtual int GetItemCount(int groupIndex); + virtual Tizen::Ui::Controls::TableViewGroupItem* CreateGroupItem(int groupIndex, int itemWidth); + virtual Tizen::Ui::Controls::TableViewItem* CreateItem(int groupIndex, int itemIndex, int itemWidth); + virtual bool DeleteItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem); + virtual bool DeleteGroupItem(int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem); + virtual bool IsReorderable(int groupIndexFrom, int groupIndexTo); + + void UpdateGroupItem(int groupIndex, TableViewGroupItem *pItem); + void UpdateItem(int groupIndex, int itemIndex, TableViewItem *pItem); + int GetDefaultGroupItemHeight(void); + int GetDefaultItemHeight(void); + +private: + _ExpandableListItemDataProvider(const _ExpandableListItemDataProvider& rhs); + _ExpandableListItemDataProvider& operator =(const _ExpandableListItemDataProvider& rhs); + +private: + _ExpandableListImpl* __pListImpl; +}; //_ExpandableListItemDataProvider + + +class _ExpandableListArrowBitmap + : public Tizen::Ui::Controls::Panel +{ + +public: + _ExpandableListArrowBitmap(void); + virtual ~_ExpandableListArrowBitmap(void); + void SetBitmap(const Tizen::Graphics::Bitmap& pNormalBitmap, const Tizen::Graphics::Bitmap* pEffectBitmap = null); + result OnDraw(void); + +private: + _ExpandableListArrowBitmap(const _ExpandableListArrowBitmap& rhs); + _ExpandableListArrowBitmap& operator =(const _ExpandableListArrowBitmap& rhs); + +private: + const Tizen::Graphics::Bitmap*__pNormalBitmap; + const Tizen::Graphics::Bitmap*__pEffectBitmap; +}; + +class _ExpandableListImpl + : public _ListBaseImpl + , public _ITableViewItemEventListener + , virtual public Tizen::Base::Runtime::IEventListener +{ +public: + virtual ~_ExpandableListImpl(void); + static _ExpandableListImpl* CreateExpandableListImplN(ExpandableList* pControl, const Tizen::Graphics::Rectangle& bounds, bool itemDivider); + virtual const char* GetPublicClassName(void) const; + virtual const ExpandableList& GetPublic(void) const; + virtual ExpandableList& GetPublic(void); + virtual const _TableView& GetCore(void) const; + virtual _TableView& GetCore(void); + + //@See doxygen + result AddExpandableItemEventListener(const Tizen::Ui::IExpandableItemEventListener& listener); + //@See doxygen + result RemoveExpandableItemEventListener(const Tizen::Ui::IExpandableItemEventListener& listener); + //@See doxygen + result AddItem(const CustomListItem& item, int itemId); + //@See doxygen + result AddSubItem(int mainIndex, const CustomListItem& item, int itemId); + //@See doxygen + result InsertItemAt(int mainIndex, const CustomListItem& item, int itemId); + //@See doxygen + result SetItemAt(int mainIndex, const CustomListItem& item, int itemId); + //@See doxygen + result RemoveItemAt(int mainIndex); + //@See doxygen + result InsertSubItemAt(int mainIndex, int subIndex, const CustomListItem& item, int itemId); + //@See doxygen + result SetSubItemAt(int mainIndex, int subIndex, const CustomListItem& item, int itemId); + //@See doxygen + result RemoveSubItemAt(int mainIndex, int subIndex); + //@See doxygen + result RemoveAllSubItemsAt(int mainIndex); + //@See doxygen + const CustomListItem* GetSubItemAt(int mainIndex, int subIndex) const; + //@See doxygen + result RemoveAllItems(void); + //@See doxygen + int GetItemCount(void) const; + //@See doxygen + int GetSubItemCount(int mainIndex) const; + //@See doxygen + int GetFirstCheckedItemIndex(void) const; + //@See doxygen + int GetItemIdAt(int mainIndex) const; + //@See doxygen + int GetItemIndexFromItemId(int itemId) const; + //@See doxygen + int GetSubItemIdAt(int mainIndex, int subIndex) const; + //@See doxygen + result SetItemExpanded(int mainIndex, bool expand); + //@See doxygen + result SetItemEnabled(int mainIndex, bool enable); + //@See doxygen + bool IsItemEnabled(int mainIndex) const; + //@See doxygen + bool IsItemExpanded(int mainIndex) const; + //@See doxygen + result SetSubItemEnabled(int mainIndex, int subIndex, bool enable); + //@See doxygen + bool IsSubItemEnabled(int mainIndex, int subIndex) const; + //@See doxygen + result SetItemChecked(int mainIndex, bool check); + //@See doxygen + bool IsItemChecked(int mainIndex) const; + //@See doxygen + result SetSubItemChecked(int mainIndex, int subIndex, bool check); + //@See doxygen + bool IsSubItemChecked(int mainIndex, int subIndex) const; + //@See doxygen + result SetAllSubItemsChecked(int mainIndex, bool check); + //@See doxygen + result RemoveAllCheckedSubItemsAt(int mainIndex); + //@See doxygen + int GetFirstCheckedSubItemIndex(int mainIndex) const; + //@See doxygen + int GetLastCheckedItemIndex(void) const; + //@See doxygen + int GetLastCheckedSubItemIndex(int mainIndex) const; + //@See doxygen + int GetNextCheckedItemIndexAfter(int index) const; + //@See doxygen + int GetNextCheckedSubItemIndexAfter(int mainIndex, int subIndex) const; + //@See doxygen + result GetSubItemIndexFromItemId(int itemId, int& mainIndex, int& subIndex) const; + //@See doxygen + result ScrollToBottom(void); + //@See doxygen + result ScrollToTop(void); + //@See doxygen + result ScrollToTop(int mainIndex, int subIndex); + //@See doxygen + result ScrollToTop(int mainIndex); + //@See doxygen + void SetBgColor(const Tizen::Graphics::Color& color); + result RefreshItem(int index); + //@See doxygen + result RefreshSubItem(int mainIndex, int subIndex); + + result Initialize(void); + result LoadArrowBitmap(void); + result UpdateBounds(const Tizen::Graphics::Rectangle& rect); + result SetItemChecked(int groupIndex, int itemIndex, bool check); + bool IsItemChecked(int groupIndex, int subIndex) const; + + void OnTableViewItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status); + void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::_TableView& tableView, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pContextItem, bool activated); + void OnTableViewItemReordered(Tizen::Ui::Controls::_TableView& tableView, int itemIndexFrom, int itemIndexTo); + void OnGroupedTableViewGroupItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status); + void OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status); + void OnGroupedTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pContextItem, bool activated); + void OnGroupedTableViewItemReordered(_TableView& tableView, int groupIndexFrom, int itemIndexFrom, int groupIndexTo, int itemIndexTo); + void OnSectionTableViewItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int sectionIndex, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status); + void OnSectionTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::_TableView& tableView, int sectionIndex, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pContextItem, bool activated); + void OnTableViewItemSwept(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewSweepDirection direction); + + virtual void OnTouchPressed (const Tizen::Ui::Control &source, const Tizen::Graphics::Point ¤tPosition, const Tizen::Ui::TouchEventInfo &touchInfo); + virtual void OnTouchReleased(const Tizen::Ui::Control &source, const Tizen::Graphics::Point ¤tPosition, const Tizen::Ui::TouchEventInfo &touchInfo); + int GetCheckedItemCount(int mainIndex); + + static _ExpandableListImpl* GetInstance(ExpandableList& expandableList); + static const _ExpandableListImpl* GetInstance(const ExpandableList& expandableList); + + void OnDraw(void); + + static void DeleteExpandStateFlag(Tizen::Base::Object* pObj); + +private: + _ExpandableListImpl(Control* pPublic, _TableView* pCore); + _ExpandableListImpl(const _ExpandableListImpl& rhs); + _ExpandableListImpl& operator =(const _ExpandableListImpl& rhs); + result AddSubItem(int mainIndex, _TableViewItemData* pCustomItemData); + virtual void ProcessItemStateChange(int groupIndex, int itemIndex, int elementId, ItemStatus itemStatus); + virtual void ProcessItemStateChange(int groupIndex,int itemIndex, ItemStatus itemStatus); + + int GetCheckedItemCountAt(int mainIndex) const; + result SetSubItemCheckedMarkOnOff(int mainIndex, int subIndex, bool check); + result SetSubItemCheckedRadio(int mainIndex, int subIndex, bool check); + + result CreateArrowIcon(int groupIndex); + void OnBoundsChanged(void); + +private: + Tizen::Graphics::Bitmap* __pOpenedImage; + Tizen::Graphics::Bitmap* __pClosedImage; + Tizen::Graphics::Bitmap* __pEffectClosedImage; + Tizen::Graphics::Bitmap* __pEffectOpenedImage; + Tizen::Graphics::Bitmap* __pOpenedDisabledImage; + Tizen::Graphics::Bitmap* __pClosedDisabledImage; + Tizen::Graphics::Bitmap* __pOpenedPressedImage; + Tizen::Graphics::Bitmap* __pClosedPressedImage; + + + friend class _ExpandableListItemDataProvider; + _ExpandableListItemDataProvider* __pItemProvider; + Tizen::Base::Collection::LinkedList __itemListenersList; + Tizen::Graphics::Color __subItemBgColor; + bool __directDelete; + Tizen::Base::Collection::ArrayList __groupExpandStateList; + + static const int _EXPANDABLE_ICON_ID = Tizen::Base::Integer::VALUE_MAX; +}; //_ExpandableListImpl + +}}} //Tizen::Ui::Controls + + +#endif //_FUI_CTRL_INTERNAL_EXPANDABLELIST_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_FastScroll.h b/src/ui/inc/FUiCtrl_FastScroll.h new file mode 100644 index 0000000..7496e15 --- /dev/null +++ b/src/ui/inc/FUiCtrl_FastScroll.h @@ -0,0 +1,99 @@ +// +// 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_FastScroll.h + * @brief This is the header file for the _FastScroll class. + * + * This header file contains the declarations of the %_FastScroll class. + */ + +#ifndef _FUICTRL_INTERNAL_FASTSCROLL_H_ +#define _FUICTRL_INTERNAL_FASTSCROLL_H_ + +#include "FUi_Control.h" +#include "FUiCtrl_IFastScrollListener.h" +#include "FUiCtrl_FastScrollPresenter.h" +#include "FUiCtrl_FastScrollIndex.h" +#include "FUi_IAccessibilityListener.h" +#include "FUi_AccessibilityContainer.h" +#include "FUi_AccessibilityElement.h" +#include "FUi_AccessibilityManager.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _OSP_EXPORT_ _FastScroll + : public Tizen::Ui::_Control + , virtual public Tizen::Base::Runtime::IEventListener + , virtual public _IUiEventListener + , virtual public _IUiEventPreviewer +{ +public: + virtual ~_FastScroll(void); + + static _FastScroll* CreateFastScrollN(Tizen::Ui::_Control& parentCtrl, bool enableFadeEffect = true); + + result SetIndex(_FastScrollIndex* pIndex); + _FastScrollIndex* GetIndex(void) const; + result UpdateIndex(void); + + void EnableFadeEffect(bool enable); + bool IsEnabledFadeEffect(void) const; + bool IsOnFadeEffect(void) const; + result SetScrollVisibility(bool visibility); + bool GetScrollVisibility(void) const; + void CancelFadeEffect(void); + result InitializeAccessibility(void); + result AddAccessibilityElement(const Tizen::Ui::_AccessibilityContainer& control, bool onAccessibility); + + void AddFastScrollEventListener(const Tizen::Ui::Controls::_IUiFastScrollListener& listener); + void RemoveFastScrollEventListener(const Tizen::Ui::Controls::_IUiFastScrollListener& listener); + + void OnParentBoundsChanged(void); + + virtual result OnAttachedToMainTree(void); + virtual void OnDraw(void); + 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 OnAncestorVisibleStateChanged(const _Control& control); + virtual void OnAncestorEnableStateChanged(const _Control& control); + virtual void OnAncestorInputEnableStateChanged(const _Control& control); + virtual void OnFontChanged(Tizen::Graphics::Font* pFont); + virtual void OnFontInfoRequested(unsigned long& style, float& size); + virtual Tizen::Ui::Animations::HitTestResult HitTest(const Tizen::Graphics::FloatPoint& point); + +private: + _FastScroll(const _FastScroll& rhs); + _FastScroll& operator =(const _FastScroll& rhs); + + _FastScroll(void); + result Construct(Tizen::Ui::_Control& parentCtrl, bool enableFadeEffect); + + void SetPresenter(_FastScrollPresenter& fastScrollPresenter); + _FastScrollPresenter& GetPresenter(void) const; + +private: + _FastScrollPresenter* __pPresenter; + Tizen::Ui::_IAccessibilityListener* __pAccessibilityListener; +}; + +}}} // Tizen::Ui::Controls + +#endif //_FUICTRL_INTERNAL_FASTSCROLL_H_ diff --git a/src/ui/inc/FUiCtrl_FastScrollEvent.h b/src/ui/inc/FUiCtrl_FastScrollEvent.h new file mode 100644 index 0000000..137fff7 --- /dev/null +++ b/src/ui/inc/FUiCtrl_FastScrollEvent.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 FUiCtrl_FastScrollEvent.h + * @brief This is the header file for _FastScrollEvent class. + * + * This header file contains declaration of _FastScrollEvent class. + * The ItemEvent class can call listener's method. So, when event is occurred, + * application can handle it appropriately. + * + */ +#ifndef _FUICTRL_INTERNAL_FASTSCROLL_EVENT_H_ +#define _FUICTRL_INTERNAL_FASTSCROLL_EVENT_H_ + +#include +#include + +namespace Tizen { namespace Ui +{ +class Control; +} } + +namespace Tizen {namespace Ui { namespace Controls +{ +/** +* @class _FastScrollEvent +* @brief This class handles a slidable event. It is inherited from Event class. +* +*/ +class _FastScrollEvent + : public Tizen::Base::Runtime::_Event +{ +// Lifecycle +public: + /** + * This is the default class constructor. + * + * @remarks After creating an instance of this class, you must explicitly call one of + * construction methods to initialize the instance. + * + */ + _FastScrollEvent(void); + + /** + * This is the default class destructor. + * + */ + virtual ~_FastScrollEvent(void); + + /** + * This method initializes this instance. This method should be called + * after this instance is constructed. + * + * @return The method returns error code. + * @param[in] source A pointer to the Object instance which contains this instance. + * @exception E_SUCCESS - This method is successful. + * @exception E_ARG_NULL - The input source is null. + */ + result Construct(const Tizen::Ui::Control& source); + +// Accessors +public: + /** + * This method returns the owner of this event. + * + * @return See the comment above. + */ + const Tizen::Ui::Control* GetSource(void) const; + +// Operations +protected: + + /** + * This method checks the arg and finds out the type of event. After that this method calls appopriate + * pListener's method. + * + * @return This method returns a result code. + * @param[in] pListener It is a event listener related to this item event. + * @param[in] arg It is an argument-like instance of item event retransmitted to the listener's method + * as an argument. + * @exception E_SUCCESS - The method is successful. + * @exception E_ARG_NULL - The listener is null. + * @exception E_INVALID_ARG - The argument passed to a method contains an invalid value.@n + *   The pListener is not the instance of IItemEventListener class or + * the pItemEventArg is not the instance of _CustomItemEventArg class. + * + */ + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + +//Attributess +private: + Tizen::Ui::Control* __pSource; +}; +}}}; + +#endif diff --git a/src/ui/inc/FUiCtrl_FastScrollEventArg.h b/src/ui/inc/FUiCtrl_FastScrollEventArg.h new file mode 100644 index 0000000..41c1232 --- /dev/null +++ b/src/ui/inc/FUiCtrl_FastScrollEventArg.h @@ -0,0 +1,65 @@ +// +// 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_FastScrollEventArg.h + * @brief This is the header file for _FastScrollEventArg class. + * + * This header file contains declaration of _FastScrollEventArg class. + * + */ +#ifndef _FUICTRL_INTERNAL_FASTSCROLL_EVENT_ARG_H_ +#define _FUICTRL_INTERNAL_FASTSCROLL_EVENT_ARG_H_ + +// Includes +#include +#include +#include + +namespace Tizen { namespace Ui +{ +class Control; +} } + +namespace Tizen {namespace Ui { namespace Controls +{ + +/** + * @class _FastScrollEventArg + * @brief This class is used as the argument to item event listener. + * + * From this class, one can find out, the (event) source object, index and FastScroll event type. + */ +class _FastScrollEventArg + : public Tizen::Base::Runtime::IEventArg + , public Tizen::Base::Object +{ +public: + _FastScrollEventArg(const Tizen::Ui::Control& source, Tizen::Base::String& index); + virtual ~_FastScrollEventArg(void); + Tizen::Ui::Control* GetSource(void); + Tizen::Base::String GetIndex(void); + +private: + Tizen::Ui::Control* __pSource; + Tizen::Base::String& __index; +}; + + +}}} // Tizen::Ui::Controls + +#endif diff --git a/src/ui/inc/FUiCtrl_FastScrollIndex.h b/src/ui/inc/FUiCtrl_FastScrollIndex.h new file mode 100644 index 0000000..ebfee30 --- /dev/null +++ b/src/ui/inc/FUiCtrl_FastScrollIndex.h @@ -0,0 +1,140 @@ +// +// 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_FastScrollIndex.h + * @brief This is the header file for the _FastScrollIndex class. + * + * This header file contains the declarations of the %_FastScrollIndex class. + */ + +#ifndef _FUICTRL_INTERNAL_FASTSCROLL_INDEX_H_ +#define _FUICTRL_INTERNAL_FASTSCROLL_INDEX_H_ + +#include "FBaseObject.h" +#include "FBaseString.h" +#include "FBaseColArrayList.h" +#include "FGrpBitmap.h" + +namespace Tizen { namespace Ui { namespace Controls +{ +class _FastScrollIndex; + +enum _FastScrollIndexType +{ + FAST_SCROLL_INDEX_TYPE_NORMAL = 0, + FAST_SCROLL_INDEX_TYPE_OMISSION, +}; + +class _IFastScrollIndexObserver + : public Tizen::Base::Object +{ +public: + virtual ~_IFastScrollIndexObserver(void){} + + virtual void OnIndexDataUpdated(_FastScrollIndex& updatedIndex) = 0; + virtual void OnIndexDeleted(_FastScrollIndex& deletedIndex) = 0; + virtual void OnChildIndexAttached(_FastScrollIndex& parentIndex, int attachedOrder, _FastScrollIndex& attachedIndex) = 0; + virtual void OnChildIndexDetached(_FastScrollIndex& parentIndex, int detachedOrder, _FastScrollIndex& detachedIndex) = 0; +}; + +class _FastScrollIndex + : public Tizen::Base::Object +{ +public: + virtual ~_FastScrollIndex(void); + + static _FastScrollIndex* CreateFastScrollIndexN(void); + + result SetIndexText(Tizen::Base::String* pText); + Tizen::Base::String* GetIndexText(void) const; + + result SetIndexImage(Tizen::Graphics::Bitmap* pImage); + Tizen::Graphics::Bitmap* GetIndexImage(void) const; + + void SetIndexObserver(_IFastScrollIndexObserver* pIndexListener); + _IFastScrollIndexObserver* GetIndexObserver(void) const; + + result SetOmissionIndex(int indexCountMax); + + _FastScrollIndex* AddChildIndex(Tizen::Base::String* pText, Tizen::Graphics::Bitmap* pImage, + Tizen::Base::Collection::ArrayList* pIndexList = null); + _FastScrollIndex* AddChildIndex(_FastScrollIndex* pChildIndex, + Tizen::Base::Collection::ArrayList* pIndexList = null); + _FastScrollIndex* AddChildIndex(int childOrder, Tizen::Base::String* pText, Tizen::Graphics::Bitmap* pImage, + Tizen::Base::Collection::ArrayList* pIndexList = null); + _FastScrollIndex* AddChildIndex(int childOrder, _FastScrollIndex* pChildIndex, + Tizen::Base::Collection::ArrayList* pIndexList = null); + void AddOmissionChildIndex(_FastScrollIndex* pChildIndex); + result AddChildTextIndexArray(int childOrder, const wchar_t* pTextIndexArray, int textLenth, int indexCount); + + result RemoveChildIndex(int childOrder, bool destroy, Tizen::Base::Collection::ArrayList* pIndexList = null); + result RemoveChildIndex(_FastScrollIndex* pChildIndex, bool destroy, Tizen::Base::Collection::ArrayList* pIndexList = null); + void RemoveChildren(bool destroy, Tizen::Base::Collection::ArrayList* pIndexList = null); + result RemoveOmissionChildren(bool destroy); + + void SetParentIndex(_FastScrollIndex* pParent); + _FastScrollIndex* GetParentIndex(void) const; + + _FastScrollIndex* GetChildIndex(int childOrder, bool omitted = false) const; + _FastScrollIndex* GetChildIndex(int childOrder, Tizen::Base::Collection::ArrayList* pIndexList) const; + int GetChildOrder(const _FastScrollIndex* pChildIndex, bool omitted = false) const; + int GetChildOrder(const _FastScrollIndex* pChildIndex, Tizen::Base::Collection::ArrayList* pIndexList) const; + int GetChildCount(bool omitted = false) const; + int GetChildCount(Tizen::Base::Collection::ArrayList* pIndexList) const; + int GetIndexOrder(bool omitted = false) const; + int GetIndexOrder(Tizen::Base::Collection::ArrayList* pIndexList) const; + + void SetIndexType(_FastScrollIndexType type); + _FastScrollIndexType GetIndexType(void) const; + + void SetCurrentIndexList(Tizen::Base::Collection::ArrayList* pList); + Tizen::Base::Collection::ArrayList* GetCurrentIndexList(void) const; + void SetNextIndexList(Tizen::Base::Collection::ArrayList* pList); + Tizen::Base::Collection::ArrayList* GetNextIndexList(void) const; + void SetPreviousIndexList(Tizen::Base::Collection::ArrayList* pList); + Tizen::Base::Collection::ArrayList* GetPreviousIndexList(void) const; + void SetOmitted(bool omitted); + bool GetOmitted(void) const; + +private: + _FastScrollIndex(const _FastScrollIndex& rhs); + _FastScrollIndex& operator =(const _FastScrollIndex& rhs); + + _FastScrollIndex(void); + result Construct(void); + +private: + Tizen::Graphics::Bitmap* __pImage; + Tizen::Base::String* __pText; + + _FastScrollIndex* __pParentIndex; + Tizen::Base::Collection::ArrayList* __pChildIndexList; + Tizen::Base::Collection::ArrayList* __pChildNextIndexList; + Tizen::Base::Collection::ArrayList* __pChildPreviousIndexList; + Tizen::Base::Collection::ArrayList __childOmittedIndexList; + + _IFastScrollIndexObserver* __pIndexObserver; + + bool __omitted; + _FastScrollIndexType __indexType; + +}; + +} } } // Tizen::Ui::Controls + +#endif //_FUICTRL_INTERNAL_FASTSCROLL_INDEX_H_ diff --git a/src/ui/inc/FUiCtrl_FastScrollIndexNode.h b/src/ui/inc/FUiCtrl_FastScrollIndexNode.h new file mode 100644 index 0000000..0e9a39b --- /dev/null +++ b/src/ui/inc/FUiCtrl_FastScrollIndexNode.h @@ -0,0 +1,80 @@ +// +// 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_FastScrollIndexNode.h + * @brief This is the header file for the _FastScrollIndexNode class. + * + * This header file contains the declarations of the %_FastScrollIndexNode class. + */ + +#ifndef _FUICTRL_INTERNAL_FASTSCROLL_INDEXNODE_H_ +#define _FUICTRL_INTERNAL_FASTSCROLL_INDEXNODE_H_ + +#if 0 + +#include "FBaseString.h" +#include "FGrpBitmap.h" +#include "FUiCtrl_FastScrollIndex.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _FastScrollIndexNode +{ +public: + virtual ~_FastScrollIndexNode(void); + + static _FastScrollIndexNode* CreateFastScrollIndexNodeN(Tizen::Graphics::Bitmap* pImage, Tizen::Base::String* pText); + + Tizen::Graphics::Bitmap* GetIndexNodeImage(void); + Tizen::Base::String* GetIndexNodeText(void); + + result SetIndexNodeOrder(int indexNodeOrder); + int GetIndexNodeOrder(void); + + result SetChildIndex(_FastScrollIndex* pChildIndex); + _FastScrollIndex* GetChildIndex(void); + + result SetOmissionIndex(_FastScrollIndex* pChildIndex); + _FastScrollIndex* GetOmissionIndex(void); + + result RemoveChildIndex(void); + result RemoveOmissionIndex(void); + +private: + _FastScrollIndexNode(const _FastScrollIndexNode& rhs); + _FastScrollModel& operator =(const _FastScrollIndexNode& rhs); + + _FastScrollIndexNode(void); + result Contruct(Tizen::Graphics::Bitmap* pImage, Tizen::Base::String* pText); + +private: + Tizen::Graphics::Bitmap* __pImage; + Tizen::Base::String* __pText; + + int __indexNodeOrder; + + _FastScrollIndex* __pChildIndex; + _FastScrollIndex* __pOmissionIndex; +}; + +} }} // Tizen::Ui::Controls + +#endif + +#endif //_FUICTRL_INTERNAL_FASTSCROLL_INDEXNODE_H_ diff --git a/src/ui/inc/FUiCtrl_FastScrollModel.h b/src/ui/inc/FUiCtrl_FastScrollModel.h new file mode 100644 index 0000000..540dc63 --- /dev/null +++ b/src/ui/inc/FUiCtrl_FastScrollModel.h @@ -0,0 +1,57 @@ +// +// 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_FastScrollModel.h + * @brief This is the header file for the _FastScrollModel class. + * + * This header file contains the declarations of the %_FastScrollModel class. + */ + +#ifndef _FUICTRL_INTERNAL_FASTSCROLL_MODEL_H_ +#define _FUICTRL_INTERNAL_FASTSCROLL_MODEL_H_ + +#include "FUiCtrl_FastScrollIndex.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _FastScrollModel +{ +public: + virtual ~_FastScrollModel(void); + + static _FastScrollModel* CreateFastScrollModelN(void); + + result SetRootIndex(_FastScrollIndex* pIndex); + _FastScrollIndex* GetRootIndex(void) const; + +private: + _FastScrollModel(const _FastScrollModel& rhs); + _FastScrollModel& operator =(const _FastScrollModel& rhs); + + _FastScrollModel(void); + result Construct(void); + +private: + int __visibleIndexNodeCount; + _FastScrollIndex* __pRootIndex; +}; + +} } } // Tizen::Ui::Controls + +#endif //_FUICTRL_INTERNAL_FASTSCROLL_MODEL_H_ diff --git a/src/ui/inc/FUiCtrl_FastScrollPresenter.h b/src/ui/inc/FUiCtrl_FastScrollPresenter.h new file mode 100644 index 0000000..0e0cef6 --- /dev/null +++ b/src/ui/inc/FUiCtrl_FastScrollPresenter.h @@ -0,0 +1,391 @@ +// +// 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_FastScrollPresenter.h + * @brief This is the header file for the _FastScrollPresenter class. + * + * This header file contains the declarations of the %_FastScrollPresenter class. + */ + +#ifndef _FUICTRL_INTERNAL_FASTSCROLL_PRESENTER_H_ +#define _FUICTRL_INTERNAL_FASTSCROLL_PRESENTER_H_ + +#include "FBaseString.h" +#include "FGrpFloatMatrix4.h" + +#include "FGrpBitmap.h" +#include "FGrpRectangle.h" +#include "FGrpColor.h" +#include "FGrpDimension.h" +#include "FGrp_TextTextObject.h" + +#include "FUi_Control.h" +#include "FUiCtrl_IFastScrollListener.h" +#include "FUiCtrl_UiFastScrollEvent.h" + +#include "FUiAnim_VisualElement.h" +#include "FUiAnimVisualElementAnimation.h" +#include "FUiAnimVisualElementAnimationProvider.h" +#include "FUiAnimIVisualElementAnimationStatusEventListener.h" +#include "FUiAnimVisualElementContentProvider.h" +#include "FUiAnimIVisualElementContentProvider.h" + +#include "FUiCtrl_FastScroll.h" +#include "FUiCtrl_FastScrollIndex.h" +#include "FUiCtrl_FastScrollModel.h" + + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _FastScrollViewConfig +{ +public: + virtual ~_FastScrollViewConfig(void); + static _FastScrollViewConfig* CreateFastScrollViewConfigN(Tizen::Ui::_ControlOrientation orientation); + + result ReloadConfig(Tizen::Ui::_ControlOrientation orientation); + void ReleaseResources(void); + +private: + _FastScrollViewConfig(const _FastScrollViewConfig& rhs); + _FastScrollViewConfig& operator =(const _FastScrollViewConfig& rhs); + + _FastScrollViewConfig(void); + result Construct(Tizen::Ui::_ControlOrientation orientation); + +private: + friend class _FastScrollIndexView; + friend class _FastScrollPopupView; + friend class _FastScrollPresenter; + + Tizen::Graphics::Color __indexBgColor; + Tizen::Graphics::Color __indexHighlightColor; + Tizen::Graphics::Color __indexLineColor; + Tizen::Graphics::Color __indexSelectedLineColor; + Tizen::Graphics::Color __indexTextColor; + Tizen::Graphics::Color __indexDividerColor; + Tizen::Graphics::Color __selectedIndexBgColor; + Tizen::Graphics::Color __selectedIndexTextColor; + Tizen::Graphics::Color __popupBgColor; + Tizen::Graphics::Color __popupTextColor; + + Tizen::Graphics::FloatDimension __indexSizeMin; + Tizen::Graphics::FloatDimension __popupSize; + + float __indexMarginTop; + float __indexGap; + + float __indexLeftLineThickness; + float __indexTextSize; + float __indexSeparatorThickness; + float __indexSeparatorWidth; + float __selectedIndexMarginRight; + float __selectedIndexHeight; + float __popupWidthIncrement; + float __popupTextSize; + float __popupShadowRight; + float __popupShadowBottom; + + Tizen::Graphics::Bitmap* __pIndexBgBitmap; + Tizen::Graphics::Bitmap* __pSelectedIndexBgBitmap; + Tizen::Graphics::Bitmap* __pSelectedIndexlineBitmap; + Tizen::Graphics::Bitmap* __pPopupBgBitmap; + Tizen::Graphics::Bitmap* __pPopupBgEffectBitmap; + + Tizen::Graphics::Font* __pFont; + + bool __ignoreTouchEvent; +}; + + +class _FastScrollIndexView + : public Tizen::Base::Object + , public Tizen::Ui::Animations::VisualElementAnimationProvider + , public Tizen::Ui::Animations::VisualElementContentProvider + , public Tizen::Ui::Animations::IVisualElementAnimationStatusEventListener + , virtual public Tizen::Ui::Animations::IVisualElementAnimationProvider + , virtual public _IUiEventListener +{ +public: + virtual ~_FastScrollIndexView(void); + + static _FastScrollIndexView* CreateFastScrollIndexViewN(Tizen::Ui::Animations::_VisualElement& parentVe, _FastScrollViewConfig& viewConfig); + + result FadeOutAndDestroy(void); + + result SetBaseIndex(_FastScrollIndex* pIndex); + _FastScrollIndex* GetBaseIndex(void) const; + + result SetIndexBounds(const Tizen::Graphics::FloatRectangle& indexBounds); + Tizen::Graphics::Rectangle GetIndexBounds(void) const; + Tizen::Graphics::FloatRectangle GetIndexBoundsF(void) const; + + _FastScrollIndex* GetIndexAtPoint(const Tizen::Graphics::FloatPoint& point) const; + _FastScrollIndex* GetOmissionIndexAtPoint(_FastScrollIndex* pIndex, const Tizen::Graphics::FloatPoint& point) const; + float GetIndexHeight(void) const; + result SelectIndex(int indexOrder); + result SelectIndex(_FastScrollIndex* pIndex, bool animation); + void SelectIndexList(bool isNext); + int GetSelectedIndexOrder(void) const; + void SetSelectedIndex(_FastScrollIndex* pIndex); + _FastScrollIndex* GetSelectedIndex(void) const; + void SetSelectedIndexInOmittedIndex(_FastScrollIndex* pIndex); + _FastScrollIndex* GetSelectedIndexInOmittedIndex(void) const; + _FastScrollIndex* GetFormerIndex(void) const; + + bool IsOnAnimation(void) const; + void RemoveAllAnimations(void); + + result SetIndexVisibility(bool visibility); + bool GetIndexVisibility(void) const; + result SetSelectedIndexVisibility(bool visibility, bool bAnimation); + bool GetSelectedIndexVisibility(void) const; + result AddAccessibilityElement(const Tizen::Ui::_AccessibilityContainer& control); + + result UpdateIndex(bool bNeedUpdateBaseIndex); + + void OnDraw(void); + + virtual Tizen::Ui::Animations::VisualElementAnimation* CreateAnimationForProperty(Tizen::Ui::Animations::VisualElement& target, const Tizen::Base::String& property); + 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: + _FastScrollIndexView(const _FastScrollIndexView& rhs); + _FastScrollIndexView& operator =(const _FastScrollIndexView& rhs); + + _FastScrollIndexView(Tizen::Ui::Animations::_VisualElement& parentVe, _FastScrollViewConfig& viewConfig); + result Construct(void); + + Tizen::Graphics::FloatRectangle CalculateSelectedBg(void); + void DrawBaseIndex(void); + void DrawSelectedBg(void); + void DrawSelectedIndex(void); + + result DrawBitmap(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, const Tizen::Graphics::Bitmap& bitmap); + result DrawBitmap(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& srcRect, const + Tizen::Graphics::Bitmap& bitmap, const Tizen::Graphics::FloatRectangle& dstRect); + +private: + Tizen::Ui::Animations::_VisualElement& __parentVe; + _FastScrollViewConfig& __viewConfig; + + _FastScrollIndex* __pBaseIndex; + _FastScrollIndex* __pSelectedIndex; + _FastScrollIndex* __pSelectedIndexInOmittedIndex; + _FastScrollIndex* __pFormerIndex; + Tizen::Ui::Animations::_VisualElement* __pBaseIndexVe; + Tizen::Ui::Animations::_VisualElement* __pSelectedBgVe; + Tizen::Ui::Animations::_VisualElement* __pSelectedIndexVe; + + bool __needUpdateBaseIndex; + bool __needUpdateSelectedIndex; + bool __needDestroySelf; +}; + +class _FastScrollPopupView + : public Tizen::Ui::Animations::VisualElementAnimationProvider + , public Tizen::Ui::Animations::VisualElementContentProvider + , public Tizen::Ui::Animations::IVisualElementAnimationStatusEventListener + , virtual public Tizen::Ui::Animations::IVisualElementAnimationProvider + , virtual public _IUiEventListener +{ +public: + virtual ~_FastScrollPopupView(void); + + static _FastScrollPopupView* CreateFastScrollPopupViewN(Tizen::Ui::Animations::_VisualElement& parentVe, _FastScrollViewConfig& viewConfig); + + result FadeOutAndDestroy(void); + + result SelectIndex(int indexLevel, _FastScrollIndex* pIndex, _FastScrollIndex* pFormerIndex); + result AddPopupIndexVe(int indexLevel); + result RemovePopupIndexVe(int indexLevel); + + result SetPopupBounds(const Tizen::Graphics::FloatRectangle& indexBounds); + result SetPopupIndexBounds(int indexLevel, const _FastScrollIndex* pBaseIndex); + Tizen::Ui::Animations::_VisualElement* GetIndexVe(int indexLevel) const; + int GetIndexVeCount(void) const; + + bool IsOnAnimation(void) const; + void RemoveAllAnimations(void); + + result SetPopupVisibility(bool visibility); + bool GetPopupVisibility(void) const; + void SetPopupVeUpdateNeeded(bool needUpdate); + + result UpdateIndex(void); + + void OnDraw(int indexLevel, const _FastScrollIndex* pBaseIndex, const _FastScrollIndex* pSelectedIndex); + + virtual Tizen::Ui::Animations::VisualElementAnimation* CreateAnimationForProperty(Tizen::Ui::Animations::VisualElement& target, const Tizen::Base::String& property); + 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: + _FastScrollPopupView(const _FastScrollPopupView& rhs); + _FastScrollPopupView& operator =(const _FastScrollPopupView& rhs); + + _FastScrollPopupView(Tizen::Ui::Animations::_VisualElement& parentVe, _FastScrollViewConfig& viewConfig); + result Construct(void); + + void DrawPopupVe(void); + void DrawPopupIndexVe(int indexLevel, const _FastScrollIndex* pBaseIndex, const _FastScrollIndex* pSelectedIndex); + + result DrawBitmap(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, const Tizen::Graphics::Bitmap& bitmap); + result DrawBitmap(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& srcRect, const + Tizen::Graphics::Bitmap& bitmap, const Tizen::Graphics::FloatRectangle& dstRect); +private: + Tizen::Ui::Animations::_VisualElement& __parentVe; + _FastScrollViewConfig& __viewConfig; + + Tizen::Ui::Animations::_VisualElement* __pPopupVe; + Tizen::Base::Collection::ArrayList __indexViews; + + Tizen::Graphics::FloatMatrix4 __matrixOrigin; + Tizen::Graphics::FloatMatrix4 __matrixFadeInStart; + Tizen::Graphics::FloatMatrix4 __matrixFadeOutEnd; + + bool __needUpdatePopupVe; + bool __needUpdatePopupIndexVe; + bool __needDestroySelf; +}; + + +class _FastScroll; + +class _FastScrollPresenter + : public Tizen::Ui::Animations::VisualElementAnimationProvider + , public Tizen::Ui::Animations::VisualElementContentProvider + , public Tizen::Ui::Animations::IVisualElementAnimationStatusEventListener + , public _IFastScrollIndexObserver + , virtual public Tizen::Ui::Animations::IVisualElementAnimationProvider + , virtual public _IUiEventListener +{ +public: + virtual ~_FastScrollPresenter(void); + + static _FastScrollPresenter* CreateFastScrollPresenterN(Tizen::Ui::_Control& parentCtrl, + _FastScroll& fastScroll, + bool enableFadeEffect = true, + bool visibility = false); + + result SetRootIndex(_FastScrollIndex* pIndex); + _FastScrollIndex* GetRootIndex(void) const; + result UpdateIndex(void); + + void EnableFadeEffect(bool enable); + bool IsEnabledFadeEffect(void) const; + bool IsOnFadeEffect(void) const; + bool IsScrollVisible(void) const; + result SetScrollVisibility(bool visibility); + bool GetScrollVisibility(void) const; + void CancelFadeEffect(void); + + void AddFastScrollEventListener(const Tizen::Ui::Controls::_IUiFastScrollListener& listener); + void RemoveFastScrollEventListener(const Tizen::Ui::Controls::_IUiFastScrollListener& listener); + result AddAccessibilityElement(const Tizen::Ui::_AccessibilityContainer& control, bool onAccessibility); + + void OnParentBoundsChanged(void); + + void OnDraw(void); + bool OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo); + bool OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo); + bool OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo); + bool OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo); + void OnAncestorVisibleStateChanged(const _Control& control); + void OnAncestorEnableStateChanged(const _Control& control); + void OnAncestorInputEnableStateChanged(const _Control& control); + void OnFontChanged(Tizen::Graphics::Font* pFont); + void OnFontInfoRequested(unsigned long& style, float& size); + result SetFontInfo(unsigned long style, float size); + Tizen::Ui::Animations::HitTestResult HitTest(const Tizen::Graphics::FloatPoint& point); + + virtual Tizen::Ui::Animations::VisualElementAnimation* CreateAnimationForProperty(Tizen::Ui::Animations::VisualElement& target, const Tizen::Base::String& property); + 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); + + virtual void OnIndexDataUpdated(_FastScrollIndex& updatedIndex); + virtual void OnIndexDeleted(_FastScrollIndex& deletedIndex); + virtual void OnChildIndexAttached(_FastScrollIndex& parentIndex, int attachedOrder, _FastScrollIndex& attachedIndex); + virtual void OnChildIndexDetached(_FastScrollIndex& parentIndex, int detachedOrder, _FastScrollIndex& detachedIndex); + +private: + _FastScrollPresenter(const _FastScrollPresenter& rhs); + _FastScrollPresenter& operator =(const _FastScrollPresenter& rhs); + + _FastScrollPresenter(Tizen::Ui::_Control& parentCtrl, _FastScroll& fastScroll, bool enableFadeEffect, bool visibility); + result Construct(void); + + Tizen::Graphics::FloatRectangle CalculateFastScrollBounds(int indexCount); + Tizen::Graphics::FloatRectangle CalculateIndexBounds(int indexLevel, _FastScrollIndex& pIndex); + Tizen::Graphics::FloatRectangle CalculatePopupBounds(void); + void RelayoutFastScrollChildren(void); + + _FastScrollIndex* SelectOnIndexViews(const Tizen::Graphics::FloatPoint& point, bool isPressed); + result DeselectIndexViews(void); + + result SetPopupIndex(_FastScrollIndex& popupIndex, const Tizen::Graphics::FloatPoint& point); + result ClearPopupIndex(void); + + result FireFastScrollEvent(_FastScrollIndex& selectedIndex); + + bool OnTouchPressedAndMoved(const Tizen::Graphics::FloatPoint& point, bool isPressed); + bool OnTouchReleasedAndCanceled(void); + + result AddIndexView(_FastScrollIndex& baseIndex); + result AddIndexView(int indexLevel, _FastScrollIndex& baseIndex); + result RemoveIndexView(int indexLevel, bool fadeout); + result RemoveAllIndexViews(bool fadeout); + + _FastScrollIndexView* GetIndexView(int indexLevel) const; + int GetIndexViewCount(void) const; + +private: + Tizen::Ui::_Control& __parentCtrl; + _FastScroll& __fastScroll; + Tizen::Ui::Animations::_VisualElement* __pCtrlVe; + + _FastScrollViewConfig* __pViewConfig; + + _UiFastScrollEvent* __pFastScrollEvent; + _FastScrollModel* __pFastScrollModel; + unsigned long __fontStyle; + float __fontSize; + + _FastScrollPopupView* __pPopupView; + Tizen::Base::Collection::ArrayList __indexViews; + + int __focusedIndexLevel; + _FastScrollIndex* __pSelectedIndex; + + bool __enableFadeEffect; + int __indexCountMax; + bool __fadeIn; + bool __fadeOut; + bool __scrollVisibility; + int __fadeEffectDuration_ms; + +}; + +} } } // Tizen::Ui::Controls + +#endif //_FUICTRL_INTERNAL_FASTSCROLL_PRESENTER_H_ diff --git a/src/ui/inc/FUiCtrl_FlickAnimation.h b/src/ui/inc/FUiCtrl_FlickAnimation.h new file mode 100644 index 0000000..43c59dc --- /dev/null +++ b/src/ui/inc/FUiCtrl_FlickAnimation.h @@ -0,0 +1,147 @@ +// +// 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_FlickAnimation.h + * @brief This is the header file for the _FlickAnimation class. + * + * This header file contains the declarations of the _FlickAnimation class. + */ + +#ifndef _FUI_CTRL_INTERNAL_FLICKANIMATION_H_ +#define _FUI_CTRL_INTERNAL_FLICKANIMATION_H_ + +const int DEVICE_SIZE_HORIZONTAL = 56; // LCD Width (mm) +const int DEVICE_SIZE_VERTICAL = 93; // LCD Hight (mm) +const int FLICK_ANIMATION_FPS_PANEL = 30; // Panel FPS +const int FLICK_ANIMATION_SENSITIVITY_PANEL = 30; // Panel Animation Sensitivity + + +namespace Tizen { namespace Ui { namespace Controls +{ + +enum FlickDir +{ + FD_VERTICAL = 0x1, + FD_HORIZONTAL = 0x2, + FD_BOTH = FD_VERTICAL | FD_HORIZONTAL, +}; + +class _FlickAnimation +{ +public: + _FlickAnimation(void); + + virtual ~_FlickAnimation(void); + + // Functions for Setting Parameter + void SetSizeInformation(int resW, int resH, int mmW, int mmH); + + void SetAlignInformation(int alignW, int alignH); + + void SetSensitivity(int fps, int sensitivity); + + void SetDirection(int dir); + + void SetTensionEnable(bool enableX, bool enableY); + + // Check Item Executable or not + bool IsItemExecutable(int flickX, int flickY); + + // Functions For Initializeialization of Flick Animation + void CalculateInitializeVelocity(int flickX, int flickY, int flickTime, int* pFlkVelX, int* pFlkVelY); + + int EstimateInitializeVelocity(int totalDist, int idx = 1); + + // Functions For Flick Animation + void InitializeFlickAmount(int flkVelX, int flkVelY); + + int CalculateNextMove(int* pMoveX, int* pMoveY); + + // For Legacy : Functions For Flick Animation + void InitializeFlickAmount(int flkVel); + + int CalculateNextMove(void); + + bool StartTensionEffect(int pos, int end, int idx = 1); + + // Functions for Getting State Value + int GetCurVelocity(int idx = 1) const; + + int GetCurFriction(int idx = 1) const; + +private: + void InitializeFlick(int flkVelX, int flkVelY); + + void InitializeFlickXY(int flkVel, int idx); + + int CalculateNextMoveXY(int idx); + + void InitializeTension(void); + +private: + // Tuning Parameter + static const int FLK_ANI_TIME_MIN_MSEC = 1500; // Minimum Animation Duration + static const int FLK_ANI_TIME_MAX_MSEC = 3000; // Maximum Animation Duration + static const int FLK_ANI_DEFAULT_ALIGN_RATIO = 6; // Default Item Counts for Virtual Align Height + static const int FLK_ANI_OVERSPEED_START_CNT = 1; // Overspeed starting draw count + static const int FLK_ANI_OVERSPEED_END_CNT = 14; // Overspeed ending draw count + static const int FLK_WEIGHT_VEL = 1; // Flick Velocity weight + static const int FLK_WEIGHT_DIST = 5;//20 // Flick Distance weight + static const int FLK_ALPHA_PER_MM = 240; // mm - Flick Coefficient + static const int FLK_ALPHA_PER_PIXEL = 3; // pixel - Flick Coefficient + static const int FLK_ANI_SPEED_MIN_RATIO = 5; // Flick Animation Minimum Speed Ratio (Vmin=Vmax/Ratio) + static const int FLK_SPEED_MIN = 400; // Minimum Flick Speed for Stage 1 + static const int FLK_SPEED_THRES1 = 2400; // Flick Speed Threshold for Stage 2 + static const int FLK_SPEED_THRES2 = 3000; // Flick Speed Threshold for Stage 3 (Overspeed applied) + static const int FLK_OVERSPEED_STEP = 800; // Acceleration Step for Overspeed + + int __flickDirection; // Flick Direction + int __dimension[2]; // Width/Height Dimension (mm) + int __resolution[2]; // Width/Height Resolution (pixel) + int __align[2]; // Align Width/Height Resolution (pixel) + int __margin[2]; // Margin Width/Height Resolution (pixel) + + int __flickAnimationFPS; + int __flickAnimationFPSRef; + int __flickAnimaionTimeMin; + int __flickAnimationTimeMax; + + int __friction[2]; // Friction Coefficient + int __velocity[2]; // Animation Velocity + + int __frictionMin[2]; // Minimum Friction Coefficient near Stop + int __velocityMin[2]; // Minimum Animation Velocity near Stop + + int __acceleration[2]; // Animation Acceleration Coefficient + int __drawCount; // Drawing Count + + enum + { + TENSION_NA = 0, + TENSION_DONE, + TENSION_COMPRESS, + TENSION_RELEASE + } + + __tensionStatus[2]; // Tension Effect Status + int __tensionDistMax[2]; // Maximum Distance for Tension Effect +}; // _FlickAnimation + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_FLICKANIMATION_H_ diff --git a/src/ui/inc/FUiCtrl_FooterImpl.h b/src/ui/inc/FUiCtrl_FooterImpl.h new file mode 100644 index 0000000..5a3d712 --- /dev/null +++ b/src/ui/inc/FUiCtrl_FooterImpl.h @@ -0,0 +1,202 @@ +// +// 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_FooterImpl.h + * @brief This is the header file for the _FooterImp class. + * + * This header file contains the declarations of the %_FooterImp class. + */ + +#ifndef _FUI_CTRL_INTERNAL_FOOTER_IMPL_H_ +#define _FUI_CTRL_INTERNAL_FOOTER_IMPL_H_ + +#include +#include +#include +#include "FUi_ControlImpl.h" +#include "FUiCtrl_Button.h" +#include "FUiCtrl_Toolbar.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _PublicActionEvent; + +const int FOOTER_MAX_STATE_COUNT = 7; +const int FOOTER_MAX_ITEM_COUNT_WITH_BUTTON = 3; +const int FOOTER_ACTION_ID_MIN = 0; +const int FOOTER_NUMBERD_BADGE_ICON_NUMBER_MAX = 99999; + +class _FooterImpl + : public _ControlImpl + , public _IActionEventListener + , virtual public Tizen::Base::Runtime::IEventListener +{ +public: + static _FooterImpl* CreateFooterImplN(Footer* pControl); + + _FooterImpl(Footer* pPublic, _Toolbar* pCore); + + virtual ~_FooterImpl(void); + + Footer* GetFooter(void) const; + + virtual const char* GetPublicClassName(void) const; + + virtual const Footer& GetPublic(void) const; + + virtual Footer& GetPublic(void); + + virtual const _Toolbar& GetCore(void) const; + + virtual _Toolbar& GetCore(void); + + static const _FooterImpl* GetInstance(const Footer& footer); + + static _FooterImpl* GetInstance(Footer& footer); + + result AddItem(const FooterItem& item); + + Tizen::Graphics::Color GetButtonColor(ButtonItemStatus status) const; + + Tizen::Graphics::Color GetButtonTextColor(ButtonItemStatus status) const; + + ButtonItemStatus GetButtonStatus(ButtonPosition position) const; + + ButtonItemStatus GetBackButtonStatus(void) const; + + Tizen::Graphics::Color GetItemColor(FooterItemStatus status) const; + + int GetItemCount(void) const; + + result GetItemStatus(int itemIndex, FooterItemStatus& status) const; + + Tizen::Graphics::Color GetItemTextColor(FooterItemStatus status) const; + + FooterStyle GetStyle(void) const; + + int GetSelectedItemIndex(void) const; + + Tizen::Graphics::Color GetColor(void) const; + + result InsertItemAt(int itemIndex, const FooterItem& item); + + bool IsButtonSet(ButtonPosition position) const; + + bool IsBackButtonSet(void) const; + + bool IsTabEditModeEnabled(void) const; + + result RemoveAllButtons(void); + + result RemoveButtonAt(ButtonPosition position); + + result RemoveBackButton(void); + + result RemoveAllItems(void); + + result RemoveItemAt(int itemIndex); + + result SetBackButton(void); + + result SetBackgroundBitmap(const Tizen::Graphics::Bitmap* pBitmap); + + result SetButton(ButtonPosition position, const ButtonItem& button); + + result SetButtonColor(ButtonItemStatus status, const Tizen::Graphics::Color& color); + + result SetButtonTextColor(ButtonItemStatus status, const Tizen::Graphics::Color& color); + + result SetButtonEnabled(ButtonPosition position, bool enable); + + result SetBackButtonEnabled(bool enable); + + result SetItemAt(int itemIndex, const FooterItem& item); + + result SetItemColor(FooterItemStatus status, const Tizen::Graphics::Color& color); + + result SetItemEnabled(int itemIndex, bool enable); + + result SetItemBadgeIcon(int itemIndex, const Tizen::Graphics::Bitmap* pBadgeIcon); + + result SetItemTextColor(FooterItemStatus status, const Tizen::Graphics::Color& color); + + result SetItemSelected(int itemIndex); + + result SetItemNumberedBadgeIcon(int itemIndex, int number); + + result SetButtonBadgeIcon(ButtonPosition position, const Tizen::Graphics::Bitmap* pBadgeIcon); + + result SetButtonNumberedBadgeIcon(ButtonPosition position, int number); + + result SetColor(const Tizen::Graphics::Color& color); + + result SetStyle(FooterStyle style); + + result SetTabEditModeEnabled(bool enable); + + result SetTransparent(bool transparent); + + Tizen::Graphics::Rectangle GetButtonBounds(ButtonPosition position) const; + + Tizen::Graphics::FloatRectangle GetButtonBoundsF(ButtonPosition position) const; + + void AddActionEventListener(Tizen::Ui::IActionEventListener& listener); + + void RemoveActionEventListener(Tizen::Ui::IActionEventListener& listener); + + virtual void OnActionPerformed(const Tizen::Ui::_Control& source, int actionId); + + +private: + result CheckItemValidate(const FooterItem& item); + + result CheckItemExceed(const FooterItem& item); + + _Button* ConvertButtonItem(const ButtonItem& buttonItem); + + _Button* ConvertFooterItem(const FooterItem& footerItem); + + ButtonItemStatus ConvertButtonItemStatus(_ButtonStatus status) const; + + FooterItemStatus ConvertFooterItemStatus(_ButtonStatus status) const; + + _ButtonStatus ConvertButtonStatus(ButtonItemStatus status) const; + + _ButtonStatus ConvertButtonStatus(FooterItemStatus status) const; + + ToolbarStyle ConvertFooterStyle(FooterStyle style); + + virtual void OnChangeLayout(_ControlOrientation orientation); + + _FooterImpl(const _FooterImpl&); + + _FooterImpl& operator =(const _FooterImpl&); + + +private: + //bool __calledBySetItemSelected; + + FooterStyle __style; + + _PublicActionEvent* __pPublicActionEvent; + +}; + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_FOOTER_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_FooterItemImpl.h b/src/ui/inc/FUiCtrl_FooterItemImpl.h new file mode 100644 index 0000000..a77d2e7 --- /dev/null +++ b/src/ui/inc/FUiCtrl_FooterItemImpl.h @@ -0,0 +1,89 @@ +// +// 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_FooterItemImpl.h + * @brief This is the header file for the %_FooterItemImpl class. + * + * This header file contains the declarations of the %_FooterItemImpl class. + */ + +#ifndef _FUI_CTRL_INTERNAL_FOOTER_ITEM_IMPL_H_ +#define _FUI_CTRL_INTERNAL_FOOTER_ITEM_IMPL_H_ + +#include +#include + + +namespace Tizen { namespace Ui { namespace Controls +{ + +static const int FOOTER_ITEM_ACTION_ID_MIN = 0; +static const int FOOTER_ITEM_MAX_STATE_COUNT = 5; + +class _FooterItemImpl + : public Tizen::Base::Object +{ + +public: + _FooterItemImpl(FooterItem* pPublic); + + virtual ~_FooterItemImpl(void); + + static const _FooterItemImpl* GetInstance(const FooterItem& footerItem); + + static _FooterItemImpl* GetInstance(FooterItem& footerItem); + + result Construct(int actionId); + + int GetActionId(void) const; + + const Tizen::Graphics::Bitmap* GetBackgroundBitmap(FooterItemStatus status) const; + + const Tizen::Graphics::Bitmap* GetIcon(FooterItemStatus status) const; + + Tizen::Base::String GetText(void) const; + + result SetActionId(int actionId); + + result SetBackgroundBitmap(FooterItemStatus status, const Tizen::Graphics::Bitmap* pBitmap); + + result SetIcon(FooterItemStatus status, const Tizen::Graphics::Bitmap* pIcon); + + result SetText(const Tizen::Base::String& text); + + void SetAccessibilityHint(const Tizen::Base::String& hint); + +private: + _FooterItemImpl(const _FooterItemImpl& footerItem); + + _FooterItemImpl& operator =(const _FooterItemImpl& footerItem); + + +private: + int __actionId; + Tizen::Base::String __itemText; + Tizen::Base::String __accessibilityHint; + const Tizen::Graphics::Bitmap* __pIconBitmap[FOOTER_ITEM_MAX_STATE_COUNT]; + const Tizen::Graphics::Bitmap* __pFooterItemBackgroundBitmap[FOOTER_ITEM_MAX_STATE_COUNT]; + + friend class _FooterImpl; + +}; + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_FOOTER_ITEM_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_Form.h b/src/ui/inc/FUiCtrl_Form.h new file mode 100644 index 0000000..aa8af3b --- /dev/null +++ b/src/ui/inc/FUiCtrl_Form.h @@ -0,0 +1,334 @@ +// +// 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_Form.h + * @brief This is the header file for the %_Form class. + * + * This header file contains the declarations of the %_Form class. + */ +#ifndef _FUI_CTRL_INTERNAL_FORM_H_ +#define _FUI_CTRL_INTERNAL_FORM_H_ + +#include +#include +#include +#include +#include "FUi_Control.h" +#include "FUiCtrl_IActionEventListener.h" +#include "FUi_EcoreEvas.h" + + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _FormPresenter; +class _Toolbar; +class _Tab; +class _Indicator; +class _ActionEvent; +class _OverlayRegionImpl; +class _IFormBackEventListener; +class _IFormMenuEventListener; + +enum _FormStyle +{ + _FORM_STYLE_NORMAL = 0x00000000, /**< The basic form style */ + _FORM_STYLE_TITLE = 0x00000001, /**< @deprecated This enumeration field is deprecated because the use of the Title control is no longer recommended.*/ + _FORM_STYLE_INDICATOR = 0x00000002, /**< The form with the indicator area */ + _FORM_STYLE_SOFTKEY_0 = 0x00000010, /**< @deprecated This enumeration field is deprecated because the use of the Softkey control is no longer recommended.*/ + _FORM_STYLE_SOFTKEY_1 = 0x00000020, /**< @deprecated This enumeration field is deprecated because the use of the Softkey control is no longer recommended.*/ + _FORM_STYLE_OPTIONKEY = 0x00000040, /**< @deprecated This enumeration field is deprecated because the use of the Optionkey control is no longer recommended.*/ + _FORM_STYLE_TEXT_TAB = 0x00000100, /**< @deprecated This enumeration field is deprecated because the use of the Tab control is no longer recommended.*/ + _FORM_STYLE_ICON_TAB = 0x00000200, /**< @deprecated This enumeration field is deprecated because the use of the Tab control is no longer recommended.*/ + _FORM_STYLE_HEADER = 0x00001000, /**< The form with a header @b Since: @b 2.0 */ + _FORM_STYLE_FOOTER = 0x00002000, /**< The form with a footer @b Since: @b 2.0 */ + _FORM_STYLE_INDICATOR_AUTO_HIDE = 0x00010000, /**< The form with a indicator which is hidden. @b Since: @b 2.1 */ + _FORM_STYLE_PORTRAIT_INDICATOR_AUTO_HIDE = _FORM_STYLE_INDICATOR_AUTO_HIDE, /**< The form with a indicator which is hidden. @b Since: @b 2.2 */ + _FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE = 0x00020000 /**< The form with a indicator which is hidden. @b Since: @b 2.2 */ +}; + +enum _Softkey +{ + _SOFTKEY_0, /**< The left softkey */ + _SOFTKEY_1, /**< The right softkey */ + _SOFTKEY_COUNT /**< This is internal. If used in an application, the application can get rejected during the certification process. Define the softkey count */ +}; + +class _IFormOrientationStatusEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ + // Lifecycle + public: + virtual ~_IFormOrientationStatusEventListener(void) {} + + // Operation + public: + virtual Tizen::Ui::OrientationStatus OnFormOrientationStatusRequested(void) = 0; +}; + +/** + * @class _Form + * @brief + * @since 2.0 + */ + +class _OSP_EXPORT_ _Form + : public _Control + , public _IActionEventListener +{ +// Lifecycle +public: + _Form(void); + virtual ~_Form(void); + +// Operations +public: + static _Form* CreateFormN(void); + + void SetFormBackEventListener(_IFormBackEventListener* pFormBackEventListener); + void SetFormMenuEventListener(_IFormMenuEventListener* pFormMenuEventListener); + + unsigned long GetFormStyle(void) const; + _Toolbar* GetFooter(void) const; + _Toolbar* GetHeader(void) const; + _Tab* GetTab(void) const; + _Indicator* GetIndicator(void) const; + Tizen::Base::String GetTitleText(void) const; + HorizontalAlignment GetTitleTextHorizontalAlignment(void) const; + OverlayRegion* GetOverlayRegionN(const Tizen::Graphics::Rectangle& rect, OverlayRegionType regionType); + OverlayRegion* GetOverlayRegionN(const Tizen::Graphics::FloatRectangle& rect, OverlayRegionType regionType); + int GetOverlayRegionCount(void) const; + Tizen::Graphics::Canvas* GetClientAreaCanvasN(void) const; + int GetSoftkeyActionId(_Softkey softkey) const; + int GetOptionkeyActionId(void) const; + Tizen::Base::String GetSoftkeyText(_Softkey softkey) const; + + void SetFormStyle(unsigned long formStyle); + result SetActionBarsTranslucent(unsigned long actionBars, bool translucent); + result SetActionBarsVisible(unsigned long actionBars, bool visible); + result SetTitleIcon(const Tizen::Graphics::Bitmap* pTitleBitmap); + result SetTitleText(const Tizen::Base::String& title, HorizontalAlignment alignment); + result SetSoftkeyEnabled(_Softkey softkey, bool enable); + result SetOptionkeyActionId(int actionId); + result SetSoftkeyActionId(_Softkey softkey, int actionId); + result SetSoftkeyText(_Softkey softkey, const Tizen::Base::String& text); + result SetSoftkeyIcon(_Softkey softkey, const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap); + + bool HasFooter(void) const; + bool HasHeader(void) const; + bool HasIndicator(void) const; + bool HasTitle(void) const; + bool HasTab(void) const; + bool IsIndicatorVisible(void) const; + bool IsHeaderVisible(void) const; + bool IsFooterVisible(void) const; + bool IsIndicatorTranslucent(void) const; + bool IsIndicatorAutoHide(void) const; + bool IsHeaderTranslucent(void) const; + bool IsFooterTranslucent(void) const; + bool IsTabTranslucent(void) const; + bool HasOptionkey(void) const; + bool HasSoftkey(_Softkey softkey) const; + bool IsSoftkeyEnabled(_Softkey softkey) const; + bool CheckSoftkey(_Softkey softkey) const; + virtual bool IsOrientationRoot(void) const; + + Tizen::Graphics::Point TranslateToClientAreaPosition(const Tizen::Graphics::Point& position) const; + Tizen::Graphics::FloatPoint TranslateToClientAreaPosition(const Tizen::Graphics::FloatPoint& position) const; + Tizen::Graphics::Point TranslateFromClientAreaPosition(const Tizen::Graphics::Point& clientPosition) const; + Tizen::Graphics::FloatPoint TranslateFromClientAreaPosition(const Tizen::Graphics::FloatPoint& clientPosition) const; + + bool IsDeflated(void); + bool DeflateClientRectHeight(int height); + bool DeflateClientRectHeight(float height); + + static _Toolbar* CreateHeaderN(void); + static _Toolbar* CreateFooterN(void); + static _Tab* CreateTabN(void); + static _Indicator* CreateIndicatorN(void); + + int GetToolbarHeight(bool header) const; + float GetToolbarHeightF(bool header) const; + int GetTabHeight(void) const; + float GetTabHeightF(void) const; + bool RemoveHeader(void); + bool RemoveFooter(void); + bool RemoveTab(void); + bool RemoveIndicator(void); + result SetHeaderBounds(Tizen::Graphics::Rectangle& bounds); + result SetHeaderBounds(Tizen::Graphics::FloatRectangle& bounds); + result SetFooterBounds(Tizen::Graphics::Rectangle& bounds); + result SetFooterBounds(Tizen::Graphics::FloatRectangle& bounds); + result SetTabBounds(Tizen::Graphics::Rectangle& bounds); + result SetTabBounds(Tizen::Graphics::FloatRectangle& bounds); + Tizen::Graphics::Rectangle GetIndicatorBounds(void) const; + Tizen::Graphics::FloatRectangle GetIndicatorBoundsF(void) const; + + void SetHeader(_Toolbar* pToolbar); + void SetFooter(_Toolbar* pToolbar); + void SetTab(_Tab* pTab); + void CreateSoftkey(unsigned long formStyle); + void SetTabStyle(int style); + + result SetIndicatorShowState(bool state); + void SetIndicatorAutoHide(bool portrait, bool landscape); + result SetIndicatorOpacity(_IndicatorOpacity opacity); + + virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo); + virtual bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo); + + result AdjustClientBounds(void); + + result AddActionEventListener(Tizen::Ui::Controls::_IActionEventListener& listener); + void AddOptionkeyActionListener(Tizen::Ui::Controls::_IActionEventListener& listener); + void AddSoftkeyActionListener(_Softkey softkey, Tizen::Ui::Controls::_IActionEventListener& listener); + result RemoveActionEventListener(Tizen::Ui::Controls::_IActionEventListener& listener); + void RemoveOptionkeyActionListener(Tizen::Ui::Controls::_IActionEventListener& listener); + void RemoveSoftkeyActionListener(_Softkey softkey, Tizen::Ui::Controls::_IActionEventListener& listener); + + result AttachedToMainTree(void); + result DetachingFromMainTree(void); + + result AddIndicatorObject(void); + result DeleteIndicatorObject(void); + + void SetKeypadShowState(bool state); + void SetClipboardShowState(bool state); + + Tizen::Graphics::FloatDimension TranslateSize(Tizen::Graphics::FloatDimension size) const; + + result SetNotificationTrayOpenEnabled(bool enable); + bool IsNotificationTrayOpenEnabled(void) const; + + 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); + virtual void OnChildVisibleStateChanged(const _Control& child); + virtual void OnBoundsChanged(void); + virtual void UpdateClientBounds(const Tizen::Graphics::FloatDimension& size, Tizen::Graphics::FloatRectangle& clientBounds); + virtual void OnVisibleStateChanged(void); + virtual void OnFormActivated(void); + virtual void OnFormDeactivated(void); + +// Focus UI + Tizen::Base::Collection::IListT<_Control*>* GetFocusList(void) const; + void ResetFocusList(void); + _Control* GetFocusTraversalControl(void) const; + void SetFocusTraversalControl(_Control* pControl); + +// Focus + _Control* GetFocusControl(void) const; + void SetFocusControl(const _Control* pControl); + + void SetPartialScreenEnabled(bool enable); + +// Accessor +protected: + result SetPresenter(const _FormPresenter& formPresenter); + +private: + _Form(const _Form& value); + _Form& operator =(const _Form& value); + + void MoveOverlayRegion(bool top); + void UpdateSoftkey(unsigned long formStyle); + + virtual Tizen::Base::String GetDescription(void) const; + + // Attribute +private: + _FormPresenter* __pFormPresenter; + _IFormBackEventListener* __pFormBackEventListener; + _IFormMenuEventListener* __pFormMenuEventListener; + + unsigned long __formStyle; + unsigned long __oldFormStyle; + _ActionEvent* __pActionEvent; + + _Toolbar* __pHeader; + _Toolbar* __pFooter; + _Tab* __pTab; + _Indicator* __pIndicator; + + bool __transparentIndicator; + bool __transparentHeader; + bool __transparentFooter; + bool __transparentTab; + + bool __indicatorShowState; + + bool __deflated; + float __deflatedHeight; + + int __overlayRegionCount; + _OverlayRegionImpl** __pOverlayerRegionImplArray; + + int __softkeyCount; + int __updatedSoftkeyCount; + int __actionId[_SOFTKEY_COUNT + 1]; + bool __enableSoftkey[_SOFTKEY_COUNT + 1]; + bool __showSoftkey[_SOFTKEY_COUNT + 1]; + bool __keypadShowstate; + bool __clipboardShowstate; + bool __alreadyStopKeySent; + + Tizen::Base::String __softkeyText[_SOFTKEY_COUNT + 1]; + + Tizen::Graphics::Bitmap* __pSoftkeyNormalBitmap[_SOFTKEY_COUNT+1]; + Tizen::Graphics::Bitmap* __pSoftkeyDisabledBitmap[_SOFTKEY_COUNT+1]; + Tizen::Graphics::Bitmap* __pSoftkeyPressedBitmap[_SOFTKEY_COUNT+1]; + Tizen::Graphics::Bitmap* __pSoftkeyHighlightedBitmap[_SOFTKEY_COUNT+1]; + + Tizen::Graphics::Bitmap* __pSoftkeyNormalEffectBitmap[_SOFTKEY_COUNT+1]; + Tizen::Graphics::Bitmap* __pSoftkeyPressedEffectBitmap[_SOFTKEY_COUNT+1]; + + Tizen::Graphics::Bitmap* __pTextSoftkeyNormalBitmap[_SOFTKEY_COUNT+1]; + Tizen::Graphics::Bitmap* __pTextSoftkeyDisabledBitmap[_SOFTKEY_COUNT+1]; + Tizen::Graphics::Bitmap* __pTextSoftkeyPressedBitmap[_SOFTKEY_COUNT+1]; + Tizen::Graphics::Bitmap* __pTextSoftkeyHighlightedBitmap[_SOFTKEY_COUNT+1]; + + Tizen::Graphics::Bitmap* __pTextSoftkeyNormalEffectBitmap[_SOFTKEY_COUNT+1]; + Tizen::Graphics::Bitmap* __pTextSoftkeyPressedEffectBitmap[_SOFTKEY_COUNT+1]; + + Tizen::Graphics::Bitmap* __pSoftkeyNormalIcon[_SOFTKEY_COUNT+1]; + Tizen::Graphics::Bitmap* __pSoftkeyDisabledIcon[_SOFTKEY_COUNT+1]; + Tizen::Graphics::Bitmap* __pSoftkeyPressedIcon[_SOFTKEY_COUNT+1]; + Tizen::Graphics::Bitmap* __pSoftkeyHighlightedIcon[_SOFTKEY_COUNT+1]; + + Tizen::Ui::Controls::_IFormOrientationStatusEventListener* __pFormOrientationstatusEventListener; + + //Back button action ID + static const int ID_BACK_BUTTON = -10; + static const int ID_MENU_BUTTON = -20; + + //For Focus UI + mutable std::unique_ptr > __pFocusControlList; + _Control* __pFocusControl; + _Control* __pFocusTraversalControl; + friend class _Frame; + friend class _OverlayRegionImpl; +}; // _Form + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_FORM_H_ \ No newline at end of file diff --git a/src/ui/inc/FUiCtrl_FormImpl.h b/src/ui/inc/FUiCtrl_FormImpl.h new file mode 100644 index 0000000..a2738a6 --- /dev/null +++ b/src/ui/inc/FUiCtrl_FormImpl.h @@ -0,0 +1,197 @@ +// +// 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. +// +#ifndef _FUICTRL_INTERNAL_FORM_IMPL_H_ +#define _FUICTRL_INTERNAL_FORM_IMPL_H_ + +#include +#include "FUi_ContainerImpl.h" +#include "FUiCtrl_Form.h" +#include "FUiCtrl_IFormBackEventListener.h" +#include "FUiCtrl_IFormMenuEventListener.h" + +namespace Tizen { namespace Ui { +class DataBindingContext; +class _OrientationAgent; +class _ImeOrientationAgent; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls { + +class _HeaderImpl; +class _FooterImpl; +class _TabImpl; // Ki-Dong,Hong.Temp +class _PublicActionEvent; + +class _OSP_EXPORT_ _FormImpl + : public _ContainerImpl + , public Tizen::Ui::Controls::_IActionEventListener + , public Tizen::Ui::Controls::_IFormBackEventListener + , public Tizen::Ui::Controls::_IFormMenuEventListener + , virtual public Tizen::Base::Runtime::IEventListener + , public _IFormOrientationStatusEventListener +{ +public: + class FormSizeInfo : public _ControlImpl::SizeInfo + { + virtual Tizen::Graphics::Dimension GetDefaultMinimumSize(_ControlOrientation orientation) const; + virtual Tizen::Graphics::FloatDimension GetDefaultMinimumSizeF(_ControlOrientation orientation) const; + }; // FormSizeInfo + +// Lifecycle +public: + virtual ~_FormImpl(void); + +// Operations + static _FormImpl* CreateFormImplN(Form* pControl, Layout* pPublicPortraitLayout = null, Layout* pPublicLandscapeLayout = null); + + virtual const char* GetPublicClassName(void) const; + virtual const Form& GetPublic(void) const; + virtual Form& GetPublic(void); + virtual const _Form& GetCore(void) const; + virtual _Form& GetCore(void); + + _ControlImpl* GetFocusControl(void); + + void SetFormBackEventListener(const IFormBackEventListener* pFormBackEventListener); + void SetFormMenuEventListener(const IFormMenuEventListener* pFormMenuEventListener); + + unsigned long GetFormStyle(void) const; + _FooterImpl* GetFooter(void) const; + _HeaderImpl* GetHeader(void) const; + _TabImpl* GetTabImpl(void) const; // Ki-Dong,Hong.Temp + Tizen::Base::String GetTitleText(void) const; + HorizontalAlignment GetTitleTextHorizontalAlignment(void) const; + OverlayRegion* GetOverlayRegionN(const Tizen::Graphics::Rectangle& rect, OverlayRegionType regionType); + OverlayRegion* GetOverlayRegionN(const Tizen::Graphics::FloatRectangle& rect, OverlayRegionType regionType); + Tizen::Graphics::Canvas* GetClientAreaCanvasN(void) const; + int GetSoftkeyActionId(Softkey softkey) const; + int GetOptionkeyActionId(void) const; + Tizen::Base::String GetSoftkeyText(Softkey softkey) const; + + void SetFormStyle(unsigned long formStyle); + result SetActionBarsTranslucent(unsigned long actionBars, bool translucent); + result SetActionBarsVisible(unsigned long actionBars, bool visible); + result SetTitleIcon(const Tizen::Graphics::Bitmap* pTitleBitmap); + result SetTitleText(const Tizen::Base::String& title, HorizontalAlignment alignment); + result SetSoftkeyEnabled(Softkey softkey, bool enable); + result SetOptionkeyActionId(int actionId); + result SetSoftkeyActionId(Softkey softkey, int actionId); + result SetSoftkeyText(Softkey softkey, const Tizen::Base::String& text); + result SetSoftkeyIcon(Softkey softkey, const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap); + + bool HasFooter(void) const; + bool HasHeader(void) const; + bool HasIndicator(void) const; + bool HasTitle(void) const; + bool HasTab(void) const; + bool IsIndicatorVisible(void) const; + bool IsHeaderVisible(void) const; + bool IsFooterVisible(void) const; + bool IsIndicatorTranslucent(void) const; + bool IsHeaderTranslucent(void) const; + bool IsFooterTranslucent(void) const; + bool IsTabTranslucent(void) const; // Ki-Dong,Hong.Temp + bool HasOptionkey(void) const; + bool HasSoftkey(Softkey softkey) const; + bool IsSoftkeyEnabled(Softkey softkey) const; + + Tizen::Graphics::Point TranslateToClientAreaPosition(const Tizen::Graphics::Point& position) const; + Tizen::Graphics::FloatPoint TranslateToClientAreaPosition(const Tizen::Graphics::FloatPoint& position) const; + Tizen::Graphics::Point TranslateFromClientAreaPosition(const Tizen::Graphics::Point& clientPosition) const; + Tizen::Graphics::FloatPoint TranslateFromClientAreaPosition(const Tizen::Graphics::FloatPoint& clientPosition) const; + + void AddOrientationEventListener(Tizen::Ui::IOrientationEventListener& listener); + void AddOptionkeyActionListener(const Tizen::Ui::IActionEventListener& listener); + void AddSoftkeyActionListener(Softkey softkey, const Tizen::Ui::IActionEventListener& listener); + void RemoveOrientationEventListener(Tizen::Ui::IOrientationEventListener& listener); + void RemoveOptionkeyActionListener(const Tizen::Ui::IActionEventListener& listener); + void RemoveSoftkeyActionListener(Softkey softkey, const Tizen::Ui::IActionEventListener& listener); + + void SetOrientation(Tizen::Ui::Orientation orientation); + Tizen::Ui::Orientation GetOrientation(void) const; + Tizen::Ui::OrientationStatus GetOrientationStatus(void) const; + void UpdateOrientationStatus(bool draw = false); + void UpdateOrientation(void); + void UpdateOrientation(int angle); + + // Invoked by operations + virtual void OnChangeLayout(Tizen::Ui::_ControlOrientation orientation); + + bool DeflateClientRectHeight(int height); + bool DeflateClientRectHeight(float height); + + virtual void OnDraw(void); + DataBindingContext* GetDataBindingContextN(void) const; + + result SetNotificationTrayOpenEnabled(bool enable); + bool IsNotificationTrayOpenEnabled(void) const; + + virtual result OnAttachedToMainTree(void); + virtual result OnDetachingFromMainTree(void); + virtual result OnAttaching(const _Control* pParent); + virtual bool OnNotifiedN(const _ControlImpl& source, Tizen::Base::Collection::IList* pArgs); + + virtual bool IsOpaque(void) const; + + virtual void OnFormBackRequested(Tizen::Ui::Controls::_Form& source); + virtual void OnFormMenuRequested(Tizen::Ui::Controls::_Form& source); + + virtual Tizen::Ui::OrientationStatus OnFormOrientationStatusRequested(void); + + static const _FormImpl* GetInstance(const Form& form); + + static _FormImpl* GetInstance(Form& form); + +protected: + _FormImpl(Form* pPublic, _Form* pCore, Layout* pPublicPortraitLayout, Layout* pPublicLandscapeLayout); + +private: + static _HeaderImpl* CreateHeaderN(void); + static _FooterImpl* CreateFooterN(void); + static _TabImpl* CreateTabImplN(void); // Ki-Dong,Hong.Temp + + bool RemoveHeader(void); + bool RemoveFooter(void); + bool RemoveTabImpl(void); // Ki-Dong,Hong.Temp + + _Softkey ConvertSoftkey(Softkey softkey) const; + +// key event callback + virtual bool OnKeyReleased(const _ControlImpl& source, _KeyCode keyCode); + + virtual void OnActionPerformed(const Tizen::Ui::_Control& source, int actionId); + +// Attribute +private: + _Form* __pForm; + IFormBackEventListener* __pFormBackEventListener; + IFormMenuEventListener* __pFormMenuEventListener; + + Tizen::Ui::_OrientationAgent* __pOriAgent; + Tizen::Ui::_ImeOrientationAgent* __pImeOriAgent; + Tizen::Ui::Controls::_PublicActionEvent* __pLeftSoftkeyActionEvent; + Tizen::Ui::Controls::_PublicActionEvent* __pRightSoftkeyActionEvent; + Tizen::Ui::Controls::_PublicActionEvent* __pOptionMenuActionEvent; + Tizen::Base::Collection::LinkedList __leftSoftkeyActionList; + Tizen::Base::Collection::LinkedList __rightSoftkeyActionList; + + friend class _FrameImpl; +}; + +}}} // Tizen::Ui::Controls + +#endif // _FUICTRL_INTERNAL_FORM_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_FormModel.h b/src/ui/inc/FUiCtrl_FormModel.h new file mode 100644 index 0000000..1bac39e --- /dev/null +++ b/src/ui/inc/FUiCtrl_FormModel.h @@ -0,0 +1,54 @@ +// +// 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_FormModel.h + * @brief This is the header file for the _FormModel class. + * + * This header file contains the declarations of the %_FormModel class. + */ +#ifndef _FUICTRL_INTERNAL_FORM_MODEL_H_ +#define _FUICTRL_INTERNAL_FORM_MODEL_H_ + +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @class _FormModel + * @brief + * @since 2.0 + */ + +class _FormModel +{ +// Lifecycle +public: + _FormModel(void); + + virtual ~_FormModel(void); + +private: + _FormModel(const _FormModel& value); + + _FormModel& operator =(const _FormModel& value); + +}; // _FormModel + +}}} // Tizen::Ui::Controls + +#endif // _FUICTRL_INTERNAL_FORM_MODEL_H_ diff --git a/src/ui/inc/FUiCtrl_FormPresenter.h b/src/ui/inc/FUiCtrl_FormPresenter.h new file mode 100644 index 0000000..449a36b --- /dev/null +++ b/src/ui/inc/FUiCtrl_FormPresenter.h @@ -0,0 +1,69 @@ +// +// 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_FormPresenter.h + * @brief This is the header file for the _FormPresenter class. + * + * This header file contains the declarations of the %_FormPresenter class. + */ + +#ifndef _FUICTRL_INTERNAL_FORM_PRESENTER_H_ +#define _FUICTRL_INTERNAL_FORM_PRESENTER_H_ + +#include + +namespace Tizen { namespace Ui { namespace Controls +{ +class _Form; +class _FormModel; + +/** + * @class _FormPresenter + * @brief + * @since 2.0 + */ + +class _FormPresenter +{ +// Lifecycle +public: + _FormPresenter(const _Form& form); + + virtual ~_FormPresenter(void); + +// Operations +public: + void Draw(void); + +// Accessor +protected: + result SetModel(const _FormModel& FormModel); + +private: + _FormPresenter(const _FormPresenter& value); + _FormPresenter& operator =(const _FormPresenter& value); + + void _Draw(void); + +private: + _Form* __pForm; + _FormModel* __pFormModel; +}; // _FormPresenter + +}}} // Tizen::Ui::Controls + +#endif // _FUICTRL_INTERNAL_FORM_PRESENTER_H_ diff --git a/src/ui/inc/FUiCtrl_Frame.h b/src/ui/inc/FUiCtrl_Frame.h new file mode 100644 index 0000000..ba41822 --- /dev/null +++ b/src/ui/inc/FUiCtrl_Frame.h @@ -0,0 +1,145 @@ +// +// 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.h + * @brief This is the header file for the _Frame class. + * + * This header file contains the declarations of the %_Frame class. + */ +#ifndef _FUICTRL_INTERNAL_FRAME_H_ +#define _FUICTRL_INTERNAL_FRAME_H_ + +#include +#include "FUi_Window.h" + +namespace Tizen { namespace Ui { namespace Controls { + +class _FramePresenter; +class _FrameEvent; +class _IFrameEventListener; +class _IFormActivationChangeEventListener; +class _Form; + +enum _FormStatus +{ + _FORM_STATUS_ACTIVATING = 0, + _FORM_STATUS_DEACTIVATING, + _FORM_STATUS_ACTIVATED, + _FORM_STATUS_DEACTIVATED, +}; + +/** + * @class _Frame + * @brief + * @since 2.1 + */ + +class _OSP_EXPORT_ _Frame + : public Tizen::Ui::_Window + , virtual public Tizen::Base::Runtime::IEventListener + , virtual public Tizen::Ui::_IUiEventListener + , virtual public Tizen::Ui::_IUiEventPreviewer +{ +// Lifecycle +public: + static _Frame* CreateFrameN(void); + virtual ~_Frame(void); + +// 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); + virtual void OnFrameActivated(void); + virtual void OnFrameDeactivated(void); + virtual void OnFrameMinimized(void); + virtual void OnFrameRestored(void); + virtual result OnBoundsChanging(const Tizen::Graphics::FloatRectangle& bounds); + virtual result OnAttached(void); + virtual void OnBackgroundColorChanged(Tizen::Graphics::Color& backgroundColor); + +// Current form + void SetCurrentForm(const Tizen::Ui::Controls::_Form* pForm); + Tizen::Ui::Controls::_Form* GetCurrentForm(void) const; + +// Orientation + virtual bool IsOrientationRoot(void) const; + void SetRotation(bool rotation); + +// Event listeners + void AddFrameEventListener(const Tizen::Ui::Controls::_IFrameEventListener& listener); + void RemoveFrameEventListener(const Tizen::Ui::Controls::_IFrameEventListener& listener); + result AddFormActivationChangeEventListener(_IFormActivationChangeEventListener& listener); + result RemoveFormActivationChangeEventListener(_IFormActivationChangeEventListener& listener); + +// Floating + void SetFloatingBounds(const Tizen::Graphics::Rectangle& rect); + void SetFloatingBounds(const Tizen::Graphics::FloatRectangle& rect); + void SetFloatingOrientation(Tizen::Ui::_ControlOrientation orientation); + result SetShowMode(FrameShowMode showMode); + FrameShowMode GetShowMode(bool minimize = true) const; + bool IsFrameActivated(void) const; + +// Focus Ui + virtual void ResetFocusList(void); + virtual Tizen::Base::Collection::IListT<_Control*>* GetFocusList(void) const; + virtual _Control* GetFocusTraversalControl(_Control* pControl) const; + virtual void SetFocusTraversalControl(_Control* pControl, bool on); + +// Focus + virtual _Control* GetFocusControl(const _Control* pControl) const; + virtual _Control* GetCurrentFocusControl(void) const; + virtual void SetFocusControl(const _Control* pControl, bool on); + +// Internal + void SetChangingBoundsEnabled(bool enable); + void SetPartialScreenEnabled(bool enable); + +protected: + result SetPresenter(const _FramePresenter& framePresenter); + +private: + _Frame(void); + _Frame(const _Frame&); + _Frame& operator =(const _Frame&); + + virtual bool IsChildAttachable(_Control& child) const; + result FireFormActivationChangeEvent(_Form* pForm, _FormStatus status); + +// Attribute +private: + _FramePresenter* __pFramePresenter; + _FrameEvent* __pFrameEvent; + Tizen::Graphics::FloatRectangle __floatingBounds; + Tizen::Ui::_ControlOrientation __floatingOrientation; + FrameShowMode __showMode; + bool __restore; + bool __minimized; + bool __activated; + bool __constructed; + bool __rotation; + bool __changingBoundsEnabled; + bool __skipSetBounds; + Tizen::Base::Collection::LinkedListT * __pFormActivationChangeEventListeners; +}; // _Frame + +}}} // Tizen::Ui::Controls + +#endif // _FUICTRL_INTERNAL_FRAME_H_ diff --git a/src/ui/inc/FUiCtrl_FrameEvent.h b/src/ui/inc/FUiCtrl_FrameEvent.h new file mode 100644 index 0000000..41fd541 --- /dev/null +++ b/src/ui/inc/FUiCtrl_FrameEvent.h @@ -0,0 +1,112 @@ +// +// 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_FrameEvent.h + * @brief This is the header file for _FrameEvent class. + * @version 1.0 + * + * This header file contains declaration of _FrameEvent class. + * The _FrameEvent class can call listener's method. So, when event occurred, + * application can handle it appropriately. + * + */ +#ifndef _FUI_CTRL_INTERNAL_FRAME_EVENT_H_ +#define _FUI_CTRL_INTERNAL_FRAME_EVENT_H_ + +#include +#include +#include "FBaseRt_Event.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +enum _FrameStatus +{ + _FRAME_STATUS_ACTIVATED = 0, + _FRAME_STATUS_DEACTIVATED, + _FRAME_STATUS_MINIMIZED, + _FRAME_STATUS_RESTORED, +}; + +class _Frame; + +/** + * @class _FrameEvent + * @brief This class handles a frame event. It is inherited from Event class. + * + * The _Frame class has an instance of the _FrameEvent class as a member variable. + * Applications can register frame event listeners through it. When a frame lifecycle event occurs, + * the _FrameEvent class finds listener and calls the appropriate listener's method. + */ +class _FrameEvent + : public Tizen::Base::Runtime::_Event +{ +public: +// Lifecycle + static _FrameEvent* CreateInstanceN(const _Frame& source); + static Tizen::Base::Runtime::IEventArg* CreateFrameEventArgN(const _Frame& source, int frameState); + + /** + * This is the class destructor. + * + */ + virtual ~_FrameEvent(void); + +// Accessor + /** + * This method returns the owner of this event. + * + * @return See the comment above. + */ + const _Frame* GetSource(void) const; + +protected: +// Operation + /** + * This method is Implemented to call the corresponding event listener's method. + * + * @return The method returns the error code + * @param[in] pListener The eventListener instance which is currently processing + * @param[in] arg The event argument that is fired + * @return The method returns error code. + * @exception E_SUCCESS - This method is successful. + * @exception E_INVALID_ARG - The argument passed to a method contains an invalid value. + * @exception E_ARG_NULL - The pointer passed to a method contains a @c null reference. + * @exception E_UNKNOWN - An undetermined error has occurred during operation. + * + */ + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + +private: +// Lifecycle + /** + * This is the default class constructor. + * + * @remarks After creating an instance of this class, you must explicitly call one of + * construction methods to initialize the instance. + * + */ + _FrameEvent(const _Frame& source); + +private: +// Attribute + const _Frame* __pSource; +}; // _FrameEvent + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_FRAME_EVENT_H_ diff --git a/src/ui/inc/FUiCtrl_FrameImpl.h b/src/ui/inc/FUiCtrl_FrameImpl.h new file mode 100644 index 0000000..0242d34 --- /dev/null +++ b/src/ui/inc/FUiCtrl_FrameImpl.h @@ -0,0 +1,121 @@ +// +// 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. +// +#ifndef _FUICTRL_INTERNAL_FRAME_IMPL_H_ +#define _FUICTRL_INTERNAL_FRAME_IMPL_H_ + +#include +#include "FUi_WindowImpl.h" +#include "FUiCtrl_Frame.h" +#include "FUiCtrl_IFrameEventListener.h" + +namespace Tizen { namespace Ui { +class _OrientationAgent; +class _ImeOrientationAgent; +} } // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Animations { +class FrameAnimator; +} } } // Tizen::Ui::Animations + +namespace Tizen { namespace Ui { namespace Controls { + +class _FormImpl; +class _PublicFrameEvent; +class IFrameEventListener; + +class _OSP_EXPORT_ _FrameImpl + : public _WindowImpl + , public _IFrameEventListener +{ +// Lifecycle +public: + static _FrameImpl* CreateFrameImplN(Frame* pControl); + virtual ~_FrameImpl(); + +// Common + virtual const char* GetPublicClassName(void) const; + virtual const Frame& GetPublic(void) const; + virtual Frame& GetPublic(void); + virtual const _Frame& GetCore(void) const; + virtual _Frame& GetCore(void); + +// Form managing + result SetCurrentForm(const _FormImpl& formImpl); + result SetCurrentForm(_FormImpl* pFormImpl); + _FormImpl* GetCurrentForm(void) const; + +// Event listeners + void AddOrientationEventListener(Tizen::Ui::IOrientationEventListener& listener); + void AddFrameEventListener(Tizen::Ui::Controls::IFrameEventListener& listener); + void RemoveOrientationEventListener(Tizen::Ui::IOrientationEventListener& listener); + void RemoveFrameEventListener(Tizen::Ui::Controls::IFrameEventListener& listener); + +// Orientation + Tizen::Ui::Orientation GetOrientation(void) const; + Tizen::Ui::OrientationStatus GetOrientationStatus(void) const; + void SetOrientation(Tizen::Ui::Orientation orientation); + void UpdateOrientationStatus(void); + void UpdateOrientation(void); + void UpdateOrientation(int angle); + +// Callback + virtual void OnDraw(void); + virtual void OnChangeLayout(Tizen::Ui::_ControlOrientation orientation); + virtual void OnChildDetaching(const _Control& child); + virtual void OnChildDetached(const _Control& child); + virtual void OnFrameActivated(const _Frame& source); + virtual void OnFrameDeactivated(const _Frame& source); + virtual void OnFrameMinimized(const _Frame& source); + virtual void OnFrameRestored(const _Frame& source); + virtual void OnBoundsChanged(void); + virtual result OnAttachedToMainTree(void); + virtual result OnDetachingFromMainTree(void); + virtual bool OnNotifiedN(const _ControlImpl& source, Tizen::Base::Collection::IList* pArgs); + +// Animator + Tizen::Ui::Animations::FrameAnimator* GetFrameAnimator(void) const; + +// Drawing + virtual bool IsOpaque(void) const; + +// Floating + void SetFloatingBounds(const Tizen::Graphics::Rectangle& rect); + void SetFloatingBounds(const Tizen::Graphics::FloatRectangle& rect); + result SetShowMode(FrameShowMode showMode); + FrameShowMode GetShowMode(void) const; + + static const _FrameImpl* GetInstance(const Frame& frame); + static _FrameImpl* GetInstance(Frame& frame); + +protected: + _FrameImpl(Frame* pPublic, _Frame* pCore); + void Dispose(void); + +private: + virtual bool IsChildAttachable(Tizen::Ui::_ControlImpl& child) const; + +// Attribute +private: + _PublicFrameEvent* __pFrameEvent; + Tizen::Ui::Animations::FrameAnimator* __pFrameAnimator; + Tizen::Ui::_OrientationAgent* __pOrientationAgent; + Tizen::Ui::_ImeOrientationAgent* __pImeOrientationAgent; +}; // _FrameImpl + +}}} // Tizen::Ui::Controls + +#endif // _FUICTRL_INTERNAL_FRAME_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_FrameModel.h b/src/ui/inc/FUiCtrl_FrameModel.h new file mode 100644 index 0000000..475e388 --- /dev/null +++ b/src/ui/inc/FUiCtrl_FrameModel.h @@ -0,0 +1,54 @@ +// +// 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_FrameModel.h + * @brief This is the header file for the _FrameModel class. + * + * This header file contains the declarations of the %_FrameModel class. + */ +#ifndef _FUICTRL_INTERNAL_FRAME_MODEL_H_ +#define _FUICTRL_INTERNAL_FRAME_MODEL_H_ + +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @class _FrameModel + * @brief + * @since 2.0 + */ + +class _FrameModel +{ +// Lifecycle +public: + _FrameModel(void); + + virtual ~_FrameModel(void); + +private: + _FrameModel(const _FrameModel& value); + + _FrameModel& operator =(const _FrameModel& value); + +}; // _FrameModel + +}}} // Tizen::Ui::Controls + +#endif // _FUICTRL_INTERNAL_FRAME_MODEL_H_ diff --git a/src/ui/inc/FUiCtrl_FramePresenter.h b/src/ui/inc/FUiCtrl_FramePresenter.h new file mode 100644 index 0000000..2cf29f0 --- /dev/null +++ b/src/ui/inc/FUiCtrl_FramePresenter.h @@ -0,0 +1,72 @@ +// +// 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_FramePresenter.h + * @brief This is the header file for the _FramePresenter class. + * + * This header file contains the declarations of the %_FramePresenter class. + */ +#ifndef _FUICTRL_INTERNAL_FRAME_PRESENTER_H_ +#define _FUICTRL_INTERNAL_FRAME_PRESENTER_H_ + +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _Frame; +class _FrameModel; + +/** + * @class _FramePresenter + * @brief + * @since 2.0 + */ + +class _FramePresenter +{ +// Lifecycle +public: + _FramePresenter(const _Frame& frame); + + virtual ~_FramePresenter(void); + +// Operations +public: + void Draw(void); + +// Accessor +protected: + result _SetModel(const _FrameModel& frameModel); + +private: + _FramePresenter(const _FramePresenter& value); + + _FramePresenter& operator =(const _FramePresenter& value); + + void _Draw(void); + +private: + _Frame* __pFrame; + + _FrameModel* __pFrameModel; + +}; // _FramePresenter + +}}} // Tizen::Ui::Controls + +#endif // _FUICTRL_INTERNAL_FRAME_PRESENTER_H_ diff --git a/src/ui/inc/FUiCtrl_Gallery.h b/src/ui/inc/FUiCtrl_Gallery.h new file mode 100644 index 0000000..255fc94 --- /dev/null +++ b/src/ui/inc/FUiCtrl_Gallery.h @@ -0,0 +1,200 @@ +// +// 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. +// +#ifndef _FUI_CTRL_INTERNAL_GALLERY_H_ +#define _FUI_CTRL_INTERNAL_GALLERY_H_ + + +#include +#include "FUi_Control.h" +#include "FUi_ITouchFlickGestureEventListener.h" +#include "FUi_ITouchTapGestureEventListener.h" +#include "FUi_ITouchPinchGestureEventListener.h" +#include "FUi_ITouchLongPressGestureEventListener.h" +#include "FUiCtrl_GalleryTypes.h" + + +namespace Tizen { namespace Base { + +class String; + +}} // Tizen::Base + +namespace Tizen { namespace Graphics { + +class Color; + +}} // Tizen::Graphics + +namespace Tizen { namespace Ui { +class _TouchFlickGestureDetector; +class _TouchTapGestureDetector; +class _TouchPinchGestureDetector; +class _AccessibilityElement; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Effects { +class Effect; +}}} + +namespace Tizen { namespace Ui { namespace Controls { + +class _GalleryBitmap; +class _GalleryRenderer; +class _GalleryPresenter; +class _GalleryViewEvent; +class _IGalleryCoreEventListener; +class _IGalleryRendererNotiListener; +class _GalleryItemProviderAdaptorImpl; + +class _Gallery + : public Tizen::Ui::_Control + , virtual public Tizen::Ui::_ITouchFlickGestureEventListener + , virtual public Tizen::Ui::_ITouchTapGestureEventListener + , virtual public Tizen::Ui::_ITouchPinchGestureEventListener + , virtual public Tizen::Ui::_ITouchLongPressGestureEventListener + , virtual public Tizen::Ui::_IUiEventListener + , virtual public Tizen::Ui::_ITouchGestureEventListener + , virtual public Tizen::Ui::_IUiEventPreviewer + , virtual public Tizen::Base::Runtime::IEventListener + , virtual public Tizen::System::ISettingEventListener +{ +public: + virtual ~_Gallery(void); + static _Gallery* CreateGalleryN(_GalleryItemProviderAdaptorImpl* pGalleryItemProviderAdaptor); + + // presenter access + result SetTextOfEmptyGallery(const Tizen::Base::String& text); + Tizen::Base::String GetTextOfEmptyGallery(void) const; + result SetBitmapOfEmptyGallery(const _GalleryBitmap* pBitmap); + result SetCoreEventListener(const _IGalleryCoreEventListener& coreEventListener); + result RemoveCoreEventListener(const _IGalleryCoreEventListener& coreEventListener); + result SetZoomingEnabled(bool enable); + bool IsZoomingEnabled(void) const; + result SetSlideShowType(_GallerySlideShowType slideShowType); + _GallerySlideShowType GetSlideShowType(void) const; + result SetSlideShowAnimationDuration(int duration); + int GetSlideShowAnimationDuration(void) const; + result SetSlideShowViewDuration(int duration); + int GetSlideShowViewDuration(void) const; + result StartSlideShow(bool repeat); + result StopSlideShow(void); + bool IsSlideShowStarted(void) const; + + // model access + result SetCurrentItemIndex(int itemIndex); + int GetCurrentItemIndex(void) const; + int GetItemCount(void) const; + result RequestToLoadItem(int itemIndex); + result RequestToUnloadItem(int itemIndex); + result RequestToUnloadAllItems(void); + result RequestToUpdateItem(int itemIndex); + result RequestToUpdateAllItems(void); + + // gesture + virtual bool OnFlickGestureDetected(_TouchFlickGestureDetector& gesture); + virtual bool OnFlickGestureCanceled(_TouchFlickGestureDetector& gesture); + virtual bool OnTapGestureDetected(_TouchTapGestureDetector& gesture); + virtual bool OnTapGestureCanceled(_TouchTapGestureDetector& gesture); + virtual bool OnPinchGestureStarted(_TouchPinchGestureDetector& gesture); + virtual bool OnPinchGestureChanged(_TouchPinchGestureDetector& gesture); + virtual bool OnPinchGestureFinished(_TouchPinchGestureDetector& gesture); + virtual bool OnPinchGestureCanceled(_TouchPinchGestureDetector& gesture); + virtual bool OnLongPressGestureDetected(_TouchLongPressGestureDetector& gesture); + virtual bool OnLongPressGestureCanceled(_TouchLongPressGestureDetector& gesture); + + // Touch Event Callbacks + 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); + + // Keyboard Event Callbacks + virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo); + virtual bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo); + + // Windowing Event Callbacks + virtual void OnDraw(void); + virtual void OnBoundsChanged(void); + + // Font Callback + virtual void OnFontInfoRequested(unsigned long& style, int& size); + virtual void OnFontChanged(Tizen::Graphics::Font* pFont); + + void SetEffect(Tizen::Ui::Effects::Effect* pEffect); + Tizen::Ui::Effects::Effect* GetEffect(void); + + virtual result OnAttachedToMainTree(void); + + void ResizeGalleryAccessibilityElement(void); + + 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); + + // Copy constructor + _Gallery(const _Gallery& rhs); + _Gallery& operator=(const _Gallery& rhs); + + void SetRenderer(_GalleryRenderer& galleryRenderer) + { + __pRenderer = &galleryRenderer; + } + + _GalleryRenderer& GetRenderer(void) + { + return *__pRenderer; + } + + void SetPresenter(_GalleryPresenter& galleryPresenter) + { + __pPresenter = &galleryPresenter; + } + + _GalleryPresenter& GetPresenter(void) const + { + return *__pPresenter; + } + + void InitializeAccessibilityElement(void); + void AddGalleryAccessibilityElement(void); + void RemoveGalleryAccessibilityElements(void); + +private: + _GalleryRenderer* __pRenderer; + _GalleryPresenter* __pPresenter; + + _TouchFlickGestureDetector __flickGesture; + _TouchTapGestureDetector __oneTapGesture; + _TouchTapGestureDetector __twoTapGesture; + _TouchPinchGestureDetector __pinchGesture; + _TouchLongPressGestureDetector __longPressGesture; + + bool __modelInitialized; + bool __longPressed; + bool __keyEventProcessing; + + Tizen::Ui::_AccessibilityElement* __pGalleryImageElement; +}; // _Gallery + +}}} +#endif //_FUI_CTRL_INTERNAL_GALLERY_H_ diff --git a/src/ui/inc/FUiCtrl_GalleryBitmap.h b/src/ui/inc/FUiCtrl_GalleryBitmap.h new file mode 100644 index 0000000..0a07e5b --- /dev/null +++ b/src/ui/inc/FUiCtrl_GalleryBitmap.h @@ -0,0 +1,70 @@ +// +// 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. +// +#ifndef _FUI_CTRL_INTERNAL_GALLERY_BITMAP_H_ +#define _FUI_CTRL_INTERNAL_GALLERY_BITMAP_H_ + +#include +#include "FUiCtrl_GalleryTypes.h" + + +namespace Tizen { namespace Graphics { + +class Bitmap; + +}} // Tizen::Graphics + +namespace Tizen { namespace Ui { namespace Controls { + +class _GalleryBitmap + : public Tizen::Base::Object +{ +public: + virtual ~_GalleryBitmap(void); + + static _GalleryBitmap* CloneN(_GalleryBitmap* pBitmap); + static _GalleryBitmap* CreateGalleryBitmapN(Tizen::Graphics::Bitmap* pBitmap); + + result SetSize(const Tizen::Graphics::Dimension& size); + Tizen::Graphics::FloatDimension GetSize(void) const; + + result Initialize(const Tizen::Graphics::FloatDimension& size, _GalleryFittingType fittingType = GALLERY_FITTING_TYPE_FIT); + result AdjustBitmapSize(const Tizen::Graphics::Dimension& size, _GalleryFittingType fittingType); + result AdjustBitmapRotate(void); + + bool IsInitialize(void) const; + + void SetBitmapRotation(_GalleryImageRotation rotation); + _GalleryImageRotation GetBitmapRotation(void) const; + Tizen::Graphics::Bitmap* GetInternalBitmap(void) const; + +private: + _GalleryBitmap(const _GalleryBitmap& rhs); + _GalleryBitmap& operator=(const _GalleryBitmap& rhs); + + _GalleryBitmap(void); + void SetAdjustBitmapFlag(bool initialize); + void SetInternalBitmap(Tizen::Graphics::Bitmap* pBitmap); + +private: + Tizen::Graphics::Bitmap* __pBitmap; + _GalleryImageRotation __rotation; + bool __bitmapSizeAndRotateAdjusted; +}; // _GalleryBitmap + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_GALLERY_BITMAP_H_ diff --git a/src/ui/inc/FUiCtrl_GalleryCanvas.h b/src/ui/inc/FUiCtrl_GalleryCanvas.h new file mode 100644 index 0000000..91337f5 --- /dev/null +++ b/src/ui/inc/FUiCtrl_GalleryCanvas.h @@ -0,0 +1,181 @@ +// +// 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. +// +#ifndef _FUI_CTRL_INTERNAL_GALLERY_CANVAS_H_ +#define _FUI_CTRL_INTERNAL_GALLERY_CANVAS_H_ + +#include +#include +#include "FUi_Control.h" +#include "FUiCtrl_GalleryTypes.h" + +namespace Tizen { namespace Graphics { + +class FloatRectangle; + +}} // Tizen::Graphics + +namespace Tizen { namespace Ui { namespace Animations { + +class VisualElementPropertyAnimation; +class IVisualElementAnimationStatusEventListener; +class IVisualElementAnimationTimingFunction; +class _VisualElement; + +}}} // Tizen::Ui::Animations + +namespace Tizen { namespace Ui { namespace Controls { + +class _GalleryBitmap; +class _GalleryRootCanvas; + +class _GalleryAnimationProvider + : virtual public Tizen::Ui::Animations::VisualElementAnimationProvider +{ +public: + _GalleryAnimationProvider(void); + virtual ~_GalleryAnimationProvider(void); + virtual Tizen::Ui::Animations::VisualElementAnimation* CreateAnimationForProperty(Tizen::Ui::Animations::VisualElement& source, const Tizen::Base::String& property); + + void SetAnimationDelegator(Tizen::Ui::Animations::IVisualElementAnimationStatusEventListener* animationDelegator); + void SetGalleryAnimationTiming(_GalleryAnimationTiming animationTiming); + + const Tizen::Ui::Animations::IVisualElementAnimationTimingFunction* GetTimingFunc(_GalleryAnimationTimingFunction timingFunction) const; + +private: + Tizen::Ui::Animations::IVisualElementAnimationStatusEventListener* __pAnimationDelegator; + _GalleryAnimationTiming __animationTiming; +}; // _GalleryAnimationProvider + +class _GalleryCanvas + : public Tizen::Base::Object +{ +public: + virtual ~_GalleryCanvas(void); + static _GalleryCanvas* CreateGalleryCanvasN(Tizen::Graphics::FloatRectangle& canvasBounds); + + result SetImage(const _GalleryBitmap* pImage, const Tizen::Graphics::FloatRectangle& viewBounds, + _GalleryFittingType fittingType = GALLERY_FITTING_TYPE_FIT); + _GalleryBitmap* GetImage(void) const; + result SetBounds(const Tizen::Graphics::FloatRectangle& bounds); + const Tizen::Graphics::FloatRectangle& GetBounds(void) const; + Tizen::Ui::Animations::_VisualElement& GetImageVisualElement(void) const; + Tizen::Ui::Animations::_VisualElement& GetFrameVisualElement(void) const; + Tizen::Ui::Animations::VisualElementPropertyAnimation& GetAnimation(void) const; + result SetVisibility(bool visibility); + bool IsVisibility(void) const; + result RefreshCanvas(void); + result LoadImage(void); + + result SetVisualElementBounds(const Tizen::Graphics::FloatRectangle& bounds); + Tizen::Graphics::FloatRectangle GetImageVisualElementBounds(void) const; + + void SetImageBounds(const Tizen::Graphics::FloatRectangle& bounds); + Tizen::Graphics::FloatRectangle GetImageBounds(void) const; + Tizen::Graphics::FloatRectangle GetOriginalImageBounds(void) const; + + result SetAnimationDelegator(_GalleryAnimationProvider* pVEDelegator); + void SetRootCanvas(_GalleryRootCanvas& rootCanvas); + + void SetNeedUpdateImage(bool needUpdate); + bool IsNeedUpdateImage(void) const; + + void SetCanvasFactor(float factor); + float GetCanvasFactor(void) const; + + void SetImageAnchor(Tizen::Graphics::FloatPoint); + Tizen::Graphics::FloatPoint GetImageAnchor(void) const; + + Tizen::Graphics::FloatRectangle GetAlignBoundary(void) const; + + void SetClippingOfFrameVisualElement(bool clipping); + + void SetImageAlignment(_GalleryVerticalAlignment imageVerticalAlignment + , _GalleryHorizontalAlignment imageHorizontalAlignment); + void GetImageAlignment(_GalleryVerticalAlignment& imageVerticalAlignment + , _GalleryHorizontalAlignment& imageHorizontalAlignment) const; + + Tizen::Graphics::FloatDimension GetScaledBitmapSize(_GalleryBitmap& galleryBitmap, + const Tizen::Graphics::FloatDimension& size, _GalleryFittingType fittingType) const; + +private: + _GalleryCanvas(_GalleryCanvas& rhs); + _GalleryCanvas& operator=(const _GalleryCanvas& rhs); + + _GalleryCanvas(void); + result Construct(Tizen::Graphics::FloatRectangle& canvasBounds); + + void SetImageVisualElement(Tizen::Ui::Animations::_VisualElement& visualElement); + void SetFrameVisualElement(Tizen::Ui::Animations::_VisualElement& visualElement); + void SetAnimation(Tizen::Ui::Animations::VisualElementPropertyAnimation& animation); + Tizen::Graphics::Bitmap* ScaledBitmapN(Tizen::Graphics::Bitmap* pSourceBitmap, Tizen::Graphics::Dimension scaledSize); + +private: + Tizen::Ui::Animations::_VisualElement* __pImageVisualElement; + Tizen::Ui::Animations::_VisualElement* __pFrameVisualElement; + Tizen::Ui::Animations::VisualElementPropertyAnimation* __pAnimation; + Tizen::Graphics::FloatRectangle __bounds; + _GalleryBitmap* __pImage; + Tizen::Graphics::FloatRectangle __visableRegionOfImage; + bool __needUpdateImage; + bool __visualElementBoundsChanged; + Tizen::Graphics::FloatRectangle __imageBounds; + Tizen::Graphics::FloatRectangle __originalImageBounds; + _GalleryRootCanvas* __pRootCanvas; + float __factor; + Tizen::Graphics::FloatPoint __imageAnchor; + _GalleryVerticalAlignment __imageVerticalAlignment; + _GalleryHorizontalAlignment __imageHorizontalAlignment; +}; // _GalleryCanvas + + +class _GalleryRootCanvas + : public Tizen::Base::Object +{ + +public: + virtual ~_GalleryRootCanvas(void); + static _GalleryRootCanvas* CreateGalleryRootCanvasN(Tizen::Ui::_Control& control); + + result SetBackgroundImage(const _GalleryBitmap* pImage); + _GalleryBitmap* GetBackgroundImage(void) const; + Tizen::Graphics::Color GetBackgroundColor(void) const; + result SetBounds(const Tizen::Graphics::FloatRectangle& bounds); + Tizen::Graphics::FloatRectangle GetBounds(void) const; + Tizen::Graphics::FloatDimension GetControlSize(void) const; + Tizen::Ui::Animations::_VisualElement* GetImageVisualElement(void) const; + result SetVisibility(bool visibility); + bool IsVisibility(void) const; + result AddChildCanvas(_GalleryCanvas& canvas); + result RemoveChildCanvas(_GalleryCanvas& canvas); + result RefreshCanvas(void); + +private: + _GalleryRootCanvas(_Control& control); + + void SetControl(Tizen::Ui::_Control& control); + Tizen::Ui::_Control& GetControl(void) const; + +private: + Tizen::Ui::_Control* __pControl; + Tizen::Graphics::Rectangle __bounds; + _GalleryBitmap* __pBackgroundImage; + bool __needUpdateBackgroundImage; +}; // _GalleryRootCanvas + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_GALLERY_CANVAS_H_ diff --git a/src/ui/inc/FUiCtrl_GalleryCanvasManager.h b/src/ui/inc/FUiCtrl_GalleryCanvasManager.h new file mode 100644 index 0000000..21725fb --- /dev/null +++ b/src/ui/inc/FUiCtrl_GalleryCanvasManager.h @@ -0,0 +1,76 @@ +// +// 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. +// +#ifndef _FUI_CTRL_INTERNAL_GALLERY_CANVAS_MANAGER_H_ +#define _FUI_CTRL_INTERNAL_GALLERY_CANVAS_MANAGER_H_ + +namespace Tizen { namespace Base { namespace Collection { + +class ArrayList; + +}}} // Tizen::Base::Collection + +namespace Tizen { namespace Ui { namespace Controls { + +class _GalleryRootCanvas; +class _GalleryCanvas; +class _GalleryAnimationProvider; + +class _GalleryCanvasManager +{ +public: + virtual ~_GalleryCanvasManager(void); + + static _GalleryCanvasManager* CreateCanvasManagerN(Tizen::Ui::_Control& control, int initialCanvasCount, + Tizen::Graphics::FloatRectangle& initialCanvasBounds, + _GalleryAnimationProvider* pVEDelegator); + + result ResetCanvasManager(int canvasCount, Tizen::Graphics::FloatRectangle& canvasBounds); + int GetCanvasCount(void) const; + _GalleryRootCanvas& GetRootCanvas(void) const; + _GalleryCanvas* GetCanvas(int canvasIndex) const; + result ReleaseAllCanvasResource(void); + result ResetAllCanvas(Tizen::Graphics::FloatRectangle& canvasBounds); + result LoadAllCanvasImage(void); + +private: + _GalleryCanvasManager(_GalleryCanvasManager& rhs); + _GalleryCanvasManager& operator=(const _GalleryCanvasManager& rhs); + + _GalleryCanvasManager(void); + result Construct(Tizen::Ui::_Control& control, int initialCanvasCount, Tizen::Graphics::FloatRectangle& initialCanvasBounds); + + result RemoveAllCanvas(void); + + void SetControl(Tizen::Ui::_Control& control); + Tizen::Ui::_Control& GetControl(void) const; + + void SetRootCanvas(_GalleryRootCanvas& rootCanvas); + + void SetCanvasCount(int canvasCount); + void SetAnimationDelegator(_GalleryAnimationProvider& pVEDelegator); + _GalleryAnimationProvider& GetAnimationDelegator(void) const; + +private: + Tizen::Ui::_Control* __pControl; + _GalleryRootCanvas* __pRootCanvas; + Tizen::Base::Collection::ArrayList __canvasArray; + _GalleryAnimationProvider* __pVEDelegator; +}; // _GalleryCanvasManager + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_GALLERY_CANVAS_MANAGER_H_ diff --git a/src/ui/inc/FUiCtrl_GalleryCoreEvent.h b/src/ui/inc/FUiCtrl_GalleryCoreEvent.h new file mode 100644 index 0000000..e45981f --- /dev/null +++ b/src/ui/inc/FUiCtrl_GalleryCoreEvent.h @@ -0,0 +1,41 @@ +// +// 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. +// +#ifndef _FUI_CTRL_INTERNAL_GALLERY_CORE_EVENT_H_ +#define _FUI_CTRL_INTERNAL_GALLERY_CORE_EVENT_H_ + +#include + +namespace Tizen { namespace Ui { namespace Controls { + +class _GalleryCoreEvent + : public Tizen::Base::Runtime::_Event +{ +public: + _GalleryCoreEvent(void); + virtual ~_GalleryCoreEvent(void); + +protected: + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + +private: + _GalleryCoreEvent(const _GalleryCoreEvent& rhs); + _GalleryCoreEvent& operator=(const _GalleryCoreEvent& rhs); +}; // _GalleryCoreEvent + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_GALLERY_CORE_EVENT_H_ diff --git a/src/ui/inc/FUiCtrl_GalleryCoreEventArg.h b/src/ui/inc/FUiCtrl_GalleryCoreEventArg.h new file mode 100644 index 0000000..eede2af --- /dev/null +++ b/src/ui/inc/FUiCtrl_GalleryCoreEventArg.h @@ -0,0 +1,64 @@ +// +// 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. +// +#ifndef _FUI_CTRL_INTERNAL_GALLERY_CORE_EVENT_ARG_H_ +#define _FUI_CTRL_INTERNAL_GALLERY_CORE_EVENT_ARG_H_ + +#include +#include + +namespace Tizen { namespace Ui { namespace Controls { + +enum _GalleryCoreEventType +{ + GALLERY_CORE_EVENT_CURRENT_ITEM_CHANGED = 0, + GALLERY_CORE_EVENT_ITEM_CLICKED, + GALLERY_CORE_EVENT_SLIDE_SHOW_STARTED, + GALLERY_CORE_EVENT_SLIDE_SHOW_STOPPED, + GALLERY_CORE_EVENT_CREATE_ITEM, + GALLERY_CORE_EVENT_DELETE_ITEM, + GALLERY_CORE_EVENT_GET_ITEM_COUNT +}; + +class _GalleryItem; + +class _GalleryCoreEventArg + : public Tizen::Base::Runtime::IEventArg +{ +public: + _GalleryCoreEventArg(_GalleryCoreEventType eventType, int arg1 = 0, _GalleryItem** arg2 = null, bool arg3 = true); + virtual ~_GalleryCoreEventArg(void); + + int& GetArg1(void) const; + _GalleryItem** GetArg2(void) const; + bool& GetArg3(void) const; + + _GalleryCoreEventType GetEventType(void) const; + +private: + _GalleryCoreEventArg(const _GalleryCoreEventArg& rhs); + _GalleryCoreEventArg& operator=(const _GalleryCoreEventArg& rhs); + +private: + int __arg1; + _GalleryItem** __ppArg2; + bool __arg3; + _GalleryCoreEventType __eventType; +}; // _GalleryCoreEventArg + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_GALLERY_CORE_EVENT_ARG_H_ diff --git a/src/ui/inc/FUiCtrl_GalleryCoreEventListener.h b/src/ui/inc/FUiCtrl_GalleryCoreEventListener.h new file mode 100644 index 0000000..42571f6 --- /dev/null +++ b/src/ui/inc/FUiCtrl_GalleryCoreEventListener.h @@ -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. +// +#ifndef _FUI_CTRL_INTERNAL_GALLERY_CORE_EVENT_LISTENER_H_ +#define _FUI_CTRL_INTERNAL_GALLERY_CORE_EVENT_LISTENER_H_ + +#include "FUiCtrl_IGalleryCoreEventListener.h" + +namespace Tizen { namespace Ui { namespace Controls { + +class IGalleryItemProvider; +class _GalleryImplEvent; +class _GalleryItem; + +class _GalleryCoreEventListener + : public _IGalleryCoreEventListener + , virtual public Tizen::Base::Runtime::IEventListener +{ +public: + _GalleryCoreEventListener(_GalleryImplEvent& implEvent); + virtual ~_GalleryCoreEventListener(void); + + void SetItemProvider(const IGalleryItemProvider* pItemProvider); + IGalleryItemProvider* GetItemProvider(void) const; + + virtual void OnCurrentItemChanged(int currentIndex); + virtual void OnItemClicked(int itemIndex); + virtual void OnSlideShowStarted(void); + virtual void OnSlideShowStopped(void); + +private: + _GalleryCoreEventListener(const _GalleryCoreEventListener& rhs); + _GalleryCoreEventListener& operator=(const _GalleryCoreEventListener& rhs); + +private: + IGalleryItemProvider* __pItemProvider; + _GalleryImplEvent& __implEvent; +}; // _GalleryCoreEventListener + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_GALLERY_CORE_EVENT_LISTENER_H_ diff --git a/src/ui/inc/FUiCtrl_GalleryImageReader.h b/src/ui/inc/FUiCtrl_GalleryImageReader.h new file mode 100644 index 0000000..b5414d2 --- /dev/null +++ b/src/ui/inc/FUiCtrl_GalleryImageReader.h @@ -0,0 +1,63 @@ +// +// 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. +// +#ifndef _FUI_CTRL_INTERNAL_GALLERY_IMAGE_READER_H_ +#define _FUI_CTRL_INTERNAL_GALLERY_IMAGE_READER_H_ + +#include +#include + +namespace Tizen { namespace Graphics { + +class FloatRectangle; +class Bitmap; + +}} // Tizen::Graphics + +namespace Tizen { namespace Ui { namespace Controls { + +class _GalleryModel; +class _GalleryBitmap; + +class _GalleryImageReader + : public Tizen::Base::Object +{ +public: + _GalleryImageReader(_GalleryModel& galleryModel); + virtual ~_GalleryImageReader(void); + + //void SetPartialDecoder(); + _GalleryBitmap* GetPartialImageFromFileN(int index, const Tizen::Graphics::FloatRectangle& partialBounds, + const Tizen::Graphics::FloatDimension& imageSize) const; + _GalleryBitmap* GetItemImage(int index) const; + void ResetLoadedPartialImageIndex(void); + +private: + _GalleryImageReader(const _GalleryImageReader& rhs); + _GalleryImageReader& operator=(const _GalleryImageReader& rhs); + + void LoadPartialImageFromFile(int index, const Tizen::Graphics::FloatDimension& imageSize); + +private: + _GalleryModel& __galleryModel; + Tizen::Graphics::Bitmap* __pTmpFileBitmap; + int __currentLoadBitmapIndex; + Tizen::Graphics::FloatDimension __currentLoadBitmapSize; +}; // _GalleryImageReader + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_GALLERY_IMAGE_READER_H_ diff --git a/src/ui/inc/FUiCtrl_GalleryImpl.h b/src/ui/inc/FUiCtrl_GalleryImpl.h new file mode 100644 index 0000000..d491a5b --- /dev/null +++ b/src/ui/inc/FUiCtrl_GalleryImpl.h @@ -0,0 +1,105 @@ +// +// 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. +// +#ifndef _FUI_CTRL_INTERNAL_GALLERY_IMPL_H_ +#define _FUI_CTRL_INTERNAL_GALLERY_IMPL_H_ + +#include +#include "FUi_ControlImpl.h" +#include "FUiCtrl_Gallery.h" + +namespace Tizen { namespace Ui { namespace Effects +{ +class Effect; +}}} + +namespace Tizen { namespace Ui { namespace Controls { + +class Gallery; +class IGalleryItemProvider; +class IGalleryEventListener; +class _GalleryImplEvent; +class _GalleryCoreEventListener; +class _GalleryItemProviderAdaptorImpl; + +class _GalleryImpl + : public Tizen::Ui::_ControlImpl +{ +public: + virtual ~_GalleryImpl(void); + + static _GalleryImpl* CreateGalleryImplN(Gallery* pGallery); + + virtual const char* GetPublicClassName(void) const; + virtual const Gallery& GetPublic(void) const; + virtual Gallery& GetPublic(void); + virtual const _Gallery& GetCore(void) const; + virtual _Gallery& GetCore(void); + + void AddGalleryEventListener(IGalleryEventListener& listener); + void RemoveGalleryEventListener(IGalleryEventListener& listener); + result SetItemProvider(IGalleryItemProvider& provider); + + result SetCurrentItemIndex(int index); + int GetCurrentItemIndex(void) const; + result SetZoomingEnabled(bool enable); + bool IsZoomingEnabled(void) const; + + result SetTextOfEmptyGallery(const Tizen::Base::String& text); + Tizen::Base::String GetTextOfEmptyGallery(void) const; + result SetBitmapOfEmptyGallery(const Tizen::Graphics::Bitmap* pBitmap); + + result SetSlideShowAnimation(GalleryAnimation animation); + GalleryAnimation GetSlideShowAnimation(void) const; + result SetSlideShowAnimationDuration(int duration); + int GetSlideShowAnimationDuration(void) const; + result SetSlideShowViewDuration(int duration); + int GetSlideShowViewDuration(void) const; + + result StartSlideShow(bool repeat = false); + result StopSlideShow(void) const; + bool IsSlideShowStarted(void) const; + + int GetItemCount(void) const; + + result RefreshGallery(int itemIndex, GalleryRefreshType type); + result UpdateGallery(void); + + static _GalleryImpl* GetInstance(Gallery& gallery); + static const _GalleryImpl* GetInstance(const Gallery& gallery); + + void SetEffect(Tizen::Ui::Effects::Effect* pEffect); + Tizen::Ui::Effects::Effect* GetEffect(void); + +protected: + _GalleryImpl(Gallery* pGallery, _Gallery* pCore, _GalleryImplEvent* pImplEvent, + _GalleryCoreEventListener* pCoreEventListener, _GalleryItemProviderAdaptorImpl* pGalleryItemProviderAdaptor); + +private: + _GalleryImpl(const _GalleryImpl& rhs); + _GalleryImpl& operator=(const _GalleryImpl& rhs); + + void RequestToUnloadAllItems(void); + +private: + _GalleryImplEvent* __pImplEvent; + _GalleryCoreEventListener* __pCoreEventListener; + _GalleryItemProviderAdaptorImpl* __pGalleryItemProviderAdaptor; +}; //_GalleryImpl + +}}} //Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_GALLERY_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_GalleryImplEvent.h b/src/ui/inc/FUiCtrl_GalleryImplEvent.h new file mode 100644 index 0000000..e6c6265 --- /dev/null +++ b/src/ui/inc/FUiCtrl_GalleryImplEvent.h @@ -0,0 +1,49 @@ +// +// 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. +// +#ifndef _FUI_CTRL_INTERNAL_GALLERY_IMPL_EVENT_H_ +#define _FUI_CTRL_INTERNAL_GALLERY_IMPL_EVENT_H_ + +#include +#include + +namespace Tizen { namespace Ui { namespace Controls { + +class Gallery; + +class _GalleryImplEvent + : public Tizen::Base::Runtime::_Event +{ +public: + _GalleryImplEvent(void); + virtual ~_GalleryImplEvent(void); + + result Construct(Gallery* pSource); + +protected: + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + +private: + _GalleryImplEvent(const _GalleryImplEvent& rhs); + _GalleryImplEvent& operator=(const _GalleryImplEvent& rhs); + +private: + Gallery* __pSource; +}; // _GalleryImplEvent + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_GALLERY_IMPL_EVENT_H_ diff --git a/src/ui/inc/FUiCtrl_GalleryImplEventArg.h b/src/ui/inc/FUiCtrl_GalleryImplEventArg.h new file mode 100644 index 0000000..6c9b913 --- /dev/null +++ b/src/ui/inc/FUiCtrl_GalleryImplEventArg.h @@ -0,0 +1,56 @@ +// +// 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. +// +#ifndef _FUI_CTRL_INTERNAL_GALLERY_IMPL_EVENT_ARG_H_ +#define _FUI_CTRL_INTERNAL_GALLERY_IMPL_EVENT_ARG_H_ + +#include +#include + +namespace Tizen { namespace Ui { namespace Controls { + +enum _GalleryEventType +{ + GALLERY_EVENT_CURRENT_ITEM_CHANGED = 0, + GALLERY_EVENT_ITEM_CLICKED, + GALLERY_EVENT_SLIDE_SHOW_STARTED, + GALLERY_EVENT_SLIDE_SHOW_STOPPED +}; + +class _GalleryImplEventArg + : public Tizen::Base::Runtime::IEventArg + , public Tizen::Base::Object +{ +public: + _GalleryImplEventArg(_GalleryEventType eventType, int arg1 = -1); + virtual ~_GalleryImplEventArg(void); + + int GetArg1(void) const; + + _GalleryEventType GetEventType(void) const; + +private: + _GalleryImplEventArg(const _GalleryImplEventArg& rhs); + _GalleryImplEventArg& operator=(const _GalleryImplEventArg& rhs); + +private: + int __arg1; + _GalleryEventType __eventType; +}; // _GalleryImplEventArg + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_GALLERY_IMPL_EVENT_ARG_H_ diff --git a/src/ui/inc/FUiCtrl_GalleryItem.h b/src/ui/inc/FUiCtrl_GalleryItem.h new file mode 100644 index 0000000..140898c --- /dev/null +++ b/src/ui/inc/FUiCtrl_GalleryItem.h @@ -0,0 +1,67 @@ +// +// 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. +// +#ifndef _FUI_CTRL_INTERNAL_GALLERY_ITEM_H_ +#define _FUI_CTRL_INTERNAL_GALLERY_ITEM_H_ + +#include +#include +#include +#include "FUiCtrl_ListItemCommon.h" +#include "FUiCtrl_GalleryTypes.h" + + +namespace Tizen { namespace Ui { namespace Controls { + +class _GalleryBitmap; + +class _GalleryItem + : public _ListItemCommon +{ +public: + _GalleryItem(_GalleryBitmap* pImage = null, Tizen::Base::String imageFilePath = L"", + _GalleryImageRotation rotation = GALLERY_INTERNAL_IMAGE_ROTATION_0); + virtual ~_GalleryItem(void); + + void SetGalleryItemImage(_GalleryBitmap* pImage); + _GalleryBitmap* GetGalleryItemImage(void) const; + void SetGalleryItemFilePath(Tizen::Base::String& filePath); + Tizen::Base::String GetGalleryItemFilePath(void) const; + void SetGalleryRotation(_GalleryImageRotation rotation); + _GalleryImageRotation GetGalleryRotation(void) const; + + virtual bool DrawItem(Tizen::Graphics::Rectangle &rcItem, ListItemState isFocused, bool itemDivider = false) + { + return true; + } + + virtual void SetItemIndex(int groupIndex, int itemIndex); + virtual void GetItemIndex(int& groupIndex, int& itemIndex) const; + +private: + _GalleryItem(const _GalleryItem& rhs); + _GalleryItem& operator=(const _GalleryItem& rhs); + +private: + _GalleryBitmap* __pImage; + Tizen::Base::String __imageFilePath; + _GalleryImageRotation __rotation; + int __itemIndex; +}; // _GalleryItem + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_GALLERY_ITEM_H_ diff --git a/src/ui/inc/FUiCtrl_GalleryItemImpl.h b/src/ui/inc/FUiCtrl_GalleryItemImpl.h new file mode 100644 index 0000000..49fe4d9 --- /dev/null +++ b/src/ui/inc/FUiCtrl_GalleryItemImpl.h @@ -0,0 +1,71 @@ +// +// 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. +// +#ifndef _FUI_CTRL_INTERNAL_GALLERY_ITEM_IMPL_H_ +#define _FUI_CTRL_INTERNAL_GALLERY_ITEM_IMPL_H_ + +#include +#include + +namespace Tizen { namespace Graphics { + +class Bitmap; + +}} // Tizen::Graphics + +namespace Tizen { namespace Base { + +class String; + +}} // Tizen::Base + +namespace Tizen { namespace Ui { namespace Controls { + +class Gallery; +class GalleryItem; +class _GalleryItem; + +class _GalleryItemImpl + : public Tizen::Base::Object +{ +public: + _GalleryItemImpl(GalleryItem* pPublicGalleryItem, _GalleryItem* pCoreGalleryItem); + virtual ~_GalleryItemImpl(void); + + static _GalleryItemImpl* CreateGalleryItemImplN(GalleryItem* pGallery, const Tizen::Graphics::Bitmap& image, + GalleryImageRotation rotation, Tizen::Base::String filePath); + + virtual const char* GetPublicClassName(void) const; + virtual const GalleryItem& GetPublic(void) const; + virtual GalleryItem& GetPublic(void); + virtual const _GalleryItem& GetCore(void) const; + virtual _GalleryItem& GetCore(void); + + static _GalleryItemImpl* GetInstance(GalleryItem& galleryItem); + static const _GalleryItemImpl* GetInstance(const GalleryItem& galleryItem); + +private: + _GalleryItemImpl(const _GalleryItemImpl& rhs); + _GalleryItemImpl& operator=(const _GalleryItemImpl& rhs); + +private: + GalleryItem* __pPublicGalleryItem; + _GalleryItem* __pCoreGalleryItem; +}; // _GalleryItemImpl + +}}} //Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_GALLERY_ITEM_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_GalleryItemProvider.h b/src/ui/inc/FUiCtrl_GalleryItemProvider.h new file mode 100644 index 0000000..13dc4ad --- /dev/null +++ b/src/ui/inc/FUiCtrl_GalleryItemProvider.h @@ -0,0 +1,50 @@ +// +// 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. +// +#ifndef _FUI_CTRL_INTERNAL_GALLERY_ITEM_PROVIDER_H_ +#define _FUI_CTRL_INTERNAL_GALLERY_ITEM_PROVIDER_H_ + +#include "FUiCtrl_IGalleryItemProvider.h" + +namespace Tizen { namespace Ui { namespace Controls { + +class _GalleryCoreEvent; +class _GalleryItemProviderAdaptorImpl; + +class _GalleryItemProvider + : public _IGalleryItemProvider +{ +public: + _GalleryItemProvider(_GalleryCoreEvent& coreEvent, _GalleryItemProviderAdaptorImpl* pGalleryItemProviderAdaptor); + virtual ~_GalleryItemProvider(void); + + virtual _GalleryItem* CreateItem(int index); + virtual bool DeleteItem(int index, _GalleryItem* pItem); + virtual bool UnloadItem(int index, _GalleryItem* pItem); + virtual int GetItemCount(void) const; + +private: + _GalleryItemProvider(const _GalleryItemProvider& rhs); + _GalleryItemProvider& operator=(const _GalleryItemProvider& rhs); + +private: + _GalleryCoreEvent& __coreEvent; + _GalleryItemProviderAdaptorImpl* __pItemProviderAdaptor; +}; // _GalleryItemProvider + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_GALLERY_ITEM_PROVIDER_H_ diff --git a/src/ui/inc/FUiCtrl_GalleryItemProviderAdaptor.h b/src/ui/inc/FUiCtrl_GalleryItemProviderAdaptor.h new file mode 100644 index 0000000..1e87ba4 --- /dev/null +++ b/src/ui/inc/FUiCtrl_GalleryItemProviderAdaptor.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. +// +#ifndef _FUI_CTRL_INTERNAL_GALLERY_ITEM_PROVIDER_ADAPTOR_H_ +#define _FUI_CTRL_INTERNAL_GALLERY_ITEM_PROVIDER_ADAPTOR_H_ + +#include +#include "FUiCtrl_IListItemProviderAdaptor.h" + +namespace Tizen { namespace Ui { namespace Controls { + +class _IGalleryItemProvider; + +class _GalleryItemProviderAdaptor + : public _IListItemProviderAdaptor +{ +public: + // Lifecycle + _GalleryItemProviderAdaptor(_IGalleryItemProvider& itemProvider); + virtual ~_GalleryItemProviderAdaptor(void); + + // Accessor + + result SetGalleryItemProvider(_IGalleryItemProvider& itemProvider); + + virtual _IListItemCommon* LoadItem(int groupIndex, int itemIndex); + virtual result UnloadItem(_IListItemCommon* pItem, int groupIndex, int itemIndex); + virtual int GetItemCount(int groupIndex = 0) const; + virtual int GetGroupCount(void) const + { + return 1; + } + + virtual result DeleteItem(_IListItemCommon* pItem, int groupIndex, int itemIndex); + +private: + _GalleryItemProviderAdaptor(const _GalleryItemProviderAdaptor& rhs); + _GalleryItemProviderAdaptor& operator=(const _GalleryItemProviderAdaptor& rhs); + +private: + _IGalleryItemProvider& __itemProvider; +}; // _GalleryItemProviderAdaptor + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_GALLERY_ITEM_PROVIDER_ADAPTOR_H_ diff --git a/src/ui/inc/FUiCtrl_GalleryItemProviderAdaptorImpl.h b/src/ui/inc/FUiCtrl_GalleryItemProviderAdaptorImpl.h new file mode 100644 index 0000000..783750c --- /dev/null +++ b/src/ui/inc/FUiCtrl_GalleryItemProviderAdaptorImpl.h @@ -0,0 +1,48 @@ +// +// 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. +// +#ifndef _FUI_CTRL_INTERNAL_GALLERY_ITEM_PROVIDER_ADAPTOR_IMPL_H_ +#define _FUI_CTRL_INTERNAL_GALLERY_ITEM_PROVIDER_ADAPTOR_IMPL_H_ + +#include + +namespace Tizen { namespace Ui { namespace Controls { + +class IGalleryItemProvider; +class _GalleryItem; + +class _GalleryItemProviderAdaptorImpl + : public Tizen::Base::Object +{ +public: + _GalleryItemProviderAdaptorImpl(void); + virtual ~_GalleryItemProviderAdaptorImpl(void); + + void SetGalleryItemProvider(const IGalleryItemProvider& itemProvider); + bool HasGalleryItemProvider(void) const; + + virtual _GalleryItem* CreateItem(int index); + virtual bool DeleteItem(int index, _GalleryItem* pItem); + virtual bool UnloadItem(int index, _GalleryItem* pItem); + virtual int GetItemCount(void) const; + +private: + IGalleryItemProvider* __pItemProvider; +}; // _GalleryItemProviderAdaptorImpl + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_GALLERY_ITEM_PROVIDER_ADAPTOR_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_GalleryModel.h b/src/ui/inc/FUiCtrl_GalleryModel.h new file mode 100644 index 0000000..e3e705c --- /dev/null +++ b/src/ui/inc/FUiCtrl_GalleryModel.h @@ -0,0 +1,70 @@ +// +// 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. +// +#ifndef _FUI_CTRL_INTERNAL_GALLERY_MODEL_H_ +#define _FUI_CTRL_INTERNAL_GALLERY_MODEL_H_ + +#include +#include "FUiCtrl_ListViewModel.h" + +namespace Tizen { namespace Ui { namespace Controls { + +class _GalleryItem; +class _IGalleryItemProvider; +class _GalleryItemProviderAdaptor; + +class _GalleryModel + : public Tizen::Base::Object +{ +public: + virtual ~_GalleryModel(void); + + static _GalleryModel* CreateGalleryModelN(_IGalleryItemProvider& galleryItemProvider); + + result RegisterItemProviderAdaptor(_GalleryItemProviderAdaptor* pGalleryItemProviderAdaptor); + + _GalleryItem* GetItem(int index) const; + result SetItemProvider(_IGalleryItemProvider& provider); + int GetItemCount(void) const; + int GetItemCountFromProvider(void) const; + void UpdateItemCount(void); + + result RequestToLoadItem(int index); + result RequestToUnloadItem(int index); + result RequestToUnloadAllItems(void); + result RequestToUpdateItem(int itemIndex); + result RequestToUpdateAllItems(void); + result SetCacheSize(int size); + int GetCacheSize(void) const; + + result AddGroup(void); + +protected: + _GalleryModel(void); + +private: + _GalleryModel(const _GalleryModel& rhs); + _GalleryModel& operator=(const _GalleryModel& rhs); + +private: + _ListViewModel __listViewModel; + _GalleryItemProviderAdaptor* __pGalleryItemProviderAdaptor; + int __itemCount; +}; // _GalleryModel + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_GALLERY_MODEL_H_ diff --git a/src/ui/inc/FUiCtrl_GalleryPresenter.h b/src/ui/inc/FUiCtrl_GalleryPresenter.h new file mode 100644 index 0000000..43c6847 --- /dev/null +++ b/src/ui/inc/FUiCtrl_GalleryPresenter.h @@ -0,0 +1,215 @@ +// +// 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. +// +#ifndef _FUI_CTRL_INTERNAL_GALLERY_PRESENTER_H +#define _FUI_CTRL_INTERNAL_GALLERY_PRESENTER_H + +#include +#include +#include +#include +#include "FUi_PropertyBase.h" +#include "FUiCtrl_GalleryTypes.h" +#include "FUiCtrl_IGalleryRendererNotiListener.h" + +namespace Tizen { namespace Base { namespace Runtime { + +class Timer; + +}}} // Tizen::Base::RunTime + +namespace Tizen { namespace Ui { namespace Controls { + +const int MAX_CANVAS_COUNT = 4; +const int NOT_EXIST_CANVAS = -1; +const int NOT_USED_CANVAS = -1; +const int NO_CURRENT_IMAGE = -1; + +class _GalleryViewEvent; +class _GalleryBitmap; +class _IGalleryRenderer; +class _IGalleryCoreEventListener; +class _GalleryViewEventHandler; +class _GalleryModel; +class _GalleryImageReader; +class _GalleryCoreEvent; +class _GalleryItemProvider; +class _GalleryBitmap; +class _GalleryItemProviderAdaptorImpl; +class _Gallery; + +class _GalleryPresenter + : public Tizen::Ui::_PropertyBase + , public _IGalleryRendererNotiListener + , public Tizen::Ui::_IPropertyChangeEventListener + , public Tizen::Base::Runtime::ITimerEventListener + , virtual public Tizen::Base::Runtime::IEventListener +{ +// Declare Properties + DECLARE_CLASS_BEGIN(_GalleryPresenter, _PropertyBase); + DECLARE_PROPERTY("slideShowViewDuration", GetPropertySlideShowViewDuration, SetPropertySlideShowViewDuration); + DECLARE_PROPERTY("slideShowAnimationDuration", GetPropertySlideShowAnimationDuration, SetPropertySlideShowAnimationDuration); + DECLARE_PROPERTY("textOfEmptyGallery", GetPropertyTextOfEmptyGallery, SetPropertyTextOfEmptyGallery); + DECLARE_PROPERTY("zoomingEnabled", GetPropertyZoomingEnabled, SetPropertyZoomingEnabled); + DECLARE_CLASS_END(); + +public: + virtual ~_GalleryPresenter(void); + + static _GalleryPresenter* CreateGalleryPresenterN(_IGalleryRenderer& galleryRenderer, + _GalleryItemProviderAdaptorImpl* pGalleryItemProviderAdaptor, _Gallery* pGalleryView); + + int GetCurrentItemIndex(void) const; + result SetCurrentItemIndex(int index, bool eventFire = true); + result SetCurrentItem(int index); + + int GetItemCount(void) const; + + void SetItemSpacing(int spacing); + int GetItemSpacing(void) const; + + _GallerySlideShowType GetSlideShowType(void) const; + result SetSlideShowType(_GallerySlideShowType slideShowType); + + int GetSlideShowAnimationDuration(void) const; + result SetSlideShowAnimationDuration(int duration); + + int GetSlideShowViewDuration(void) const; + result SetSlideShowViewDuration(int duration); + + result StartSlideShow(bool repeat = false); + result StopSlideShow(void); + bool IsSlideShowStarted(void) const; + + Tizen::Base::String GetTextOfEmptyGallery(void) const; + result SetTextOfEmptyGallery(const Tizen::Base::String& text); + result SetBitmapOfEmptyGallery(const _GalleryBitmap* pBitmap); + + result SetZoomingEnabled(bool enable); + bool IsZoomingEnabled(void) const; + + bool PostEvent(_GalleryViewEvent& event); + bool OnBoundsChanged(void); + void OnDraw(void); + + result SetCoreEventListener(const _IGalleryCoreEventListener& coreEventListener); + result RemoveCoreEventListener(const _IGalleryCoreEventListener& coreEventListener); + + bool ClickedItem(void); + bool ChangedItem(void); + + int SearchCanvasIndex(int itemIndex); + + // model access + result RequestToLoadItem(int index); + result RequestToUnloadItem(int index); + result RequestToUnloadAllItems(void); + result RequestToUpdateItem(int index); + result RequestToUpdateAllItems(void); + result RequestToUpdateItemCount(void); + + // timer + virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer); + + // renderer noti listener + virtual void OnTransitionCancel(void); + virtual void OnTransitionCompleted(void); + virtual void OnCanvasAnimationCancel(void); + virtual void OnCanvasAnimationCompleted(void); + virtual void OnCanvasAnimationStarted(void); + + // data binding event listener + virtual void OnPropertyChanging(Tizen::Ui::_PropertyBase& source, const Tizen::Base::String& name, const Variant& oldProperty, const Variant& newProperty); + virtual void OnPropertyChanged(Tizen::Ui::_PropertyBase& source, const Tizen::Base::String& name, const Variant& oldProperty, const Variant& newProperty); + + // font function + void SetFontSize(int size); + int GetFontSize(void) const; + void SetFontStyle(Tizen::Graphics::FontStyle style); + Tizen::Graphics::FontStyle GetFontStyle(void) const; + void OnFontChanged(void); + + virtual void OnFontInfoRequested(unsigned long& style, int& size); + + void UpdateEmptyString(void); + +protected: + _GalleryPresenter(_IGalleryRenderer& galleryRenderer); + result Construct(_GalleryItemProviderAdaptorImpl* pGalleryItemProviderAdaptor, _Gallery* pGalleryView); + + // property getter/setter + Variant GetPropertySlideShowViewDuration(void) const; + result SetPropertySlideShowViewDuration(const Variant& variant); + Variant GetPropertySlideShowAnimationDuration(void) const; + result SetPropertySlideShowAnimationDuration(const Variant& variant); + Variant GetPropertyTextOfEmptyGallery(void) const; + result SetPropertyTextOfEmptyGallery(const Variant& variant); + Variant GetPropertyZoomingEnabled(void) const; + result SetPropertyZoomingEnabled(const Variant& variant); + +private: + _GalleryPresenter(const _GalleryPresenter& rhs); + _GalleryPresenter& operator=(const _GalleryPresenter& rhs); + + result SetCanvasImage(int itemIndex); + result SetPartialCanvasImage(void); + int GetEmptyCanvasIndex(void) const; + result SetCanvasIndex(int canvasIndex, int itemIndex); + int ClearCanvasIndex(int currentItemIndex); + void SortItemToCanvasIndex(int itemIndex, bool add); + + result StartSlideShowTimer(int duration); + void StopSlideShowTimer(void); + result PlaySlideShow(void); + +private: + _IGalleryRenderer& __galleryRenderer; + _GalleryViewEventHandler* __pGalleryViewEventHandler; + _GalleryCoreEvent* __pGalleryCoreEvent; + _GalleryItemProvider* __pGalleryItemProvider; + _GalleryModel* __pGalleryModel; + _GalleryImageReader* __pGalleryImageReader; + + //_GalleryBitmap* __pPartialImage; + _GalleryBitmap* __pEmptyGalleryImage; + Tizen::Base::String __emptyText; + int __slideShowAnimationDuration; + int __slideShowViewDuration; + _GallerySlideShowType __gallerySlideShowType; + int __currentItemIndex; + bool __slideShowRepeat; + bool __slideShowStarted; + bool __zoomingEnabled; + Tizen::Base::Runtime::Timer* __pSlideShowTimer; + int __slideShowPlayCount; + int __itemSpacing; + int* __pItemToCanvas; + _GalleryFittingType __fittingType; + _GalleryVerticalAlignment __verticalAlignment; + _GalleryHorizontalAlignment __horizontalAlignment; + + int __emptyFontSize; + Tizen::Graphics::FontStyle __emptyFontStyle; + bool __userSetEmptyText; + + _Gallery* __pGalleryView; + +friend class _GalleryViewEventHandler; +}; // _GalleryPresenter + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_GALLERY_PRESENTER_H diff --git a/src/ui/inc/FUiCtrl_GalleryRenderer.h b/src/ui/inc/FUiCtrl_GalleryRenderer.h new file mode 100644 index 0000000..0ee5674 --- /dev/null +++ b/src/ui/inc/FUiCtrl_GalleryRenderer.h @@ -0,0 +1,175 @@ +// +// 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. +// +#ifndef _FUI_CTRL_INTERNAL_GALLERY_RENDERER_H_ +#define _FUI_CTRL_INTERNAL_GALLERY_RENDERER_H_ + +#include +#include +#include +#include "FUiCtrl_IGalleryRenderer.h" + +namespace Tizen { namespace Graphics { +class Color; +class FloatRectangle; +}} + +namespace Tizen { namespace Ui { +class _Control; +}} + +namespace Tizen { namespace Ui { namespace Animation { +class VisualElement; +}}} + +namespace Tizen { namespace Ui { namespace Controls { + +class _GalleryBitmap; +class _GalleryCanvasManager; +class _GalleryRendererNotifier; +class _IGalleryRendererNotiListener; +class _GalleryAnimationProvider; + +class _GalleryRenderer + : public _IGalleryRenderer + , public Tizen::Ui::Animations::IVisualElementAnimationStatusEventListener + , virtual public Tizen::Base::Runtime::IEventListener + , public Tizen::Ui::Effects::IEffectEventListener + , public Tizen::Ui::Effects::IEffectResourceProvider +{ +public: + virtual ~_GalleryRenderer(void); + static _GalleryRenderer* CreateGalleryRendererN(Tizen::Ui::_Control& control); + + virtual result AddNotiListener(const _IGalleryRendererNotiListener& notiListener); + virtual result RemoveNotiListener(const _IGalleryRendererNotiListener& notiListener); + virtual result SetCanvasMaxCount(int maxCount); + virtual int GetCanvasMaxCount(void) const; + virtual result SetCanvasVisibility(int canvasIndex, bool visibility); + virtual bool IsCanvasVisibility(int canvasIndex) const; + virtual result SetCanvasShowState(int canvasIndex, bool showState); + virtual Tizen::Graphics::FloatRectangle GetViewRect(void) const; + virtual result SetEmptyImage(const _GalleryBitmap* pImage); + virtual result SetEmptyText(const Tizen::Base::String& pText); + virtual result EnableEmptyView(void); + virtual result DisableEmptyView(void); + virtual result SetCanvasImage(int canvasIndex, const _GalleryBitmap* pImage + , _GalleryVerticalAlignment imageVerticalAlignment, _GalleryHorizontalAlignment imageHorizontalAlignment + , _GalleryFittingType fittingType); + virtual result SetCanvasBounds(int canvasIndex, const Tizen::Graphics::FloatRectangle& bounds, + const _GalleryAnimationTiming* pAnimation = null); + virtual Tizen::Graphics::FloatRectangle GetCanvasBounds(int canvasIndex) const; + virtual Tizen::Graphics::FloatRectangle GetCanvasAlignBoundary(int canvasIndex) const; + virtual result SetCanvasImageBounds(int canvasIndex, const Tizen::Graphics::FloatRectangle& bounds); + virtual Tizen::Graphics::FloatRectangle GetCanvasImageBounds(int canvasIndex) const; + virtual result RunCanvasTransition(int startCanvasIndex, int endCanvasIndex, _GalleryTransitionType transition, + const _GalleryAnimationTiming* pAnimation = null); + virtual void StopAllCanvasAnimation(void); + virtual bool IsRunningCanvasTransition(void) const; + virtual bool IsRunningCanvasAnimation(void) const; + virtual bool IsExposed(void) const; + virtual result RefreshView(void); + virtual result ReleaseAllCanvasResource(void); + virtual result ResetAllCanvas(void); + virtual result InitializeCanvasBounds(void); + + result Draw(void); + virtual void GalleryBoundsChanged(int currentCanvasIndex); + + 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); + + void SetEffect(Tizen::Ui::Effects::Effect* effect); + Tizen::Ui::Effects::Effect* GetEffect(void); + + // 3d effect listener + virtual void OnEffectStarted(Tizen::Ui::Effects::Effect& effect); + virtual void OnEffectFinished(Tizen::Ui::Effects::Effect& effect, Tizen::Ui::Effects::EffectResult effectResult, const Tizen::Base::Collection::IList& lastShownBitmapIds); + + // 3d effect provider + virtual result SetBitmap(Tizen::Ui::Effects::Effect& effect, long bitmapId); + +private: + _GalleryRenderer(const _GalleryRenderer& value); + _GalleryRenderer& operator=(const _GalleryRenderer& value); + + _GalleryRenderer(void); + result Construct(Tizen::Ui::_Control& control); + + result ShowEmptyImageAndText(void); + + result RunDissolveTransition(int startCanvasIndex, int endCanvasIndex, const _GalleryAnimationTiming* pAnimation); + result RunZoomTransition(int startCanvasIndex, int endCanvasIndex, const _GalleryAnimationTiming* pAnimation); + result RunPageTransition(int startCanvasIndex, int endCanvasIndex, const _GalleryAnimationTiming* pAnimation); + + void OnAnimationCancel(void); + + void SetControl(Tizen::Ui::_Control& control); + Tizen::Ui::_Control& GetControl(void) const; + + void SetCanvasManager(_GalleryCanvasManager& canvasManager); + _GalleryCanvasManager& GetCanvasManager(void) const; + + void SetRendererNotifier(_GalleryRendererNotifier& rendererNotifier); + _GalleryRendererNotifier& GetRendererNotifier(void) const; + + void SetAnimationDelegator(_GalleryAnimationProvider& galleryVEDelegator); + _GalleryAnimationProvider& GetAnimationDelegator(void) const; + + void SetEmptyCanvasIndex(int emptyCanvasIndex); + int GetEmptyCanvasIndex(void) const; + + void SetSlideShowPlayType(_GallerySlideShowType slideShowType); + _GallerySlideShowType GetSlideShowPlayType(void) const; + + void AddAnimationCount(void); + void ReleaseAnimationCount(void); + void ResetAnimationCount(void); + int GetAnimationCount(void) const; + void StopAllAnimation(void); + + void SetStartCanvasOfPageCurling(int startCanvasIndex); + int GetStartCanvasOfPageCurling(void); + void SetEndCanvasOfPageCurling(int endCanvasIndex); + int GetEndCanvasOfPageCurling(void); + +private: + Tizen::Ui::_Control* __pControl; + _GalleryCanvasManager* __pCanvasManager; + _GalleryRendererNotifier* __pRendererNotifyer; + _GalleryAnimationProvider* __pGalleryAnimationDelegator; + Tizen::Base::String __emptyString; + int __emptyCanvasIndex; + int __slideShowAnimationCount; + _GallerySlideShowType __slideShowPlayType; + bool __showEmptyImage; + bool __animationRunning; + bool __needDrawEmptyCanvas; + int __startCanvasOfPageCurling; + int __endCanvasOfPageCurling; + Tizen::Ui::Effects::Effect* __pEffect; + Tizen::Graphics::Bitmap* __pTransparentBitmap; + Tizen::Graphics::Bitmap* __pPageCurlingBitmap; + Tizen::Graphics::Color __emptyTextColor; +}; // _GalleryRenderer + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_GALLERY_RENDERER_H_ diff --git a/src/ui/inc/FUiCtrl_GalleryRendererNotification.h b/src/ui/inc/FUiCtrl_GalleryRendererNotification.h new file mode 100644 index 0000000..1925be5 --- /dev/null +++ b/src/ui/inc/FUiCtrl_GalleryRendererNotification.h @@ -0,0 +1,62 @@ +// +// 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. +// +#ifndef _FUI_CTRL_INTERNAL_GALLERY_RENDERER_NOTIFICATION_H_ +#define _FUI_CTRL_INTERNAL_GALLERY_RENDERER_NOTIFICATION_H_ + +#include +#include + +namespace Tizen { namespace Ui { namespace Controls { + +enum _GalleryRendererNotiType +{ + GALLERY_RENDERER_NOTI_MIN_COUNT = -1, + GALLERY_RENDERER_NOTI_TRANSITION_CANCEL, + GALLERY_RENDERER_NOTI_TRANSITION_COMPLETED, + GALLERY_RENDERER_NOTI_CANVAS_ANIMATION_CANCEL, + GALLERY_RENDERER_NOTI_CANVAS_ANIMATION_COMPLETED, + GALLERY_RENDERER_NOTI_CANVAS_ANIMATION_STARTED, + GALLERY_RENDERER_NOTI_MAX_COUNT +}; + +class _GalleryRendererNotification + : public Tizen::Base::Runtime::IEventArg + , public Tizen::Base::Object +{ +public: + _GalleryRendererNotification(_GalleryRendererNotiType notificationType) + { + __notificationType = notificationType; + } + + virtual ~_GalleryRendererNotification(void) + { + } + + _GalleryRendererNotiType GetNotificationType(void) const + { + return __notificationType; + } + +private: + _GalleryRendererNotiType __notificationType; +}; // _GalleryRendererNotification + +}}} // Tizen::Ui::Controls + + +#endif // _FUI_CTRL_INTERNAL_GALLERY_IMPL_EVENT_ARG_H_ diff --git a/src/ui/inc/FUiCtrl_GalleryRendererNotifier.h b/src/ui/inc/FUiCtrl_GalleryRendererNotifier.h new file mode 100644 index 0000000..fb5245b --- /dev/null +++ b/src/ui/inc/FUiCtrl_GalleryRendererNotifier.h @@ -0,0 +1,53 @@ +// +// 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. +// +#ifndef _FUI_CTRL_INTERNAL_GALLERY_RENDERER_NOTIFIER_H_ +#define _FUI_CTRL_INTERNAL_GALLERY_RENDERER_NOTIFIER_H_ + +#include + + +namespace Tizen { namespace Base { namespace Runtime { + +class IEventListener; +class IEventArg; + +}}} // Tizen::Base::Runtime + + +namespace Tizen { namespace Ui { namespace Controls { + +class _GalleryRendererNotifier + : public Tizen::Base::Runtime::_Event +{ +public: + _GalleryRendererNotifier(void); + virtual ~_GalleryRendererNotifier(void); + + result Construct(void); + +protected: + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + +private: + _GalleryRendererNotifier(const _GalleryRendererNotifier& rhs); + _GalleryRendererNotifier& operator=(const _GalleryRendererNotifier& rhs); + +}; // _GalleryRendererNotifier + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_GALLERY_RENDERER_NOTIFIER_H_ diff --git a/src/ui/inc/FUiCtrl_GalleryTypes.h b/src/ui/inc/FUiCtrl_GalleryTypes.h new file mode 100644 index 0000000..91db04c --- /dev/null +++ b/src/ui/inc/FUiCtrl_GalleryTypes.h @@ -0,0 +1,83 @@ +// +// 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. +// +#ifndef _FUI_CTRL_INTERNAL_GALLERY_ENUM_H_ +#define _FUI_CTRL_INTERNAL_GALLERY_ENUM_H_ + +namespace Tizen { namespace Ui { namespace Controls { + +enum _GalleryImageRotation +{ + GALLERY_INTERNAL_IMAGE_ROTATION_0 = 0, /**< No rotate */ + GALLERY_INTERNAL_IMAGE_ROTATION_90, /**< The 90 degree clockwise rotation */ + GALLERY_INTERNAL_IMAGE_ROTATION_180, /**< The clockwise rotation */ + GALLERY_INTERNAL_IMAGE_ROTATION_270 /**< The anticlockwise rotation */ +}; + +enum _GallerySlideShowType { + GALLERY_SLIDESHOW_NONE = -1, + GALLERY_SLIDESHOW_DISSOLVE = 0, + GALLERY_SLIDESHOW_ZOOM, + GALLERY_SLIDESHOW_PAGE, +}; + +enum _GalleryAnimationTimingFunction +{ + GALLERY_ANIMATION_TIMING_FUNC_LINEAR = 0, + GALLERY_ANIMATION_TIMING_FUNC_EASEIN, + GALLERY_ANIMATION_TIMING_FUNC_EASEOUT, + GALLERY_ANIMATION_TIMING_FUNC_EASEINOUT +}; + +enum _GalleryVerticalAlignment +{ + GALLERY_VERTICAL_ALIGN_TOP = 0, + GALLERY_VERTICAL_ALIGN_MIDDLE, // default + GALLERY_VERTICAL_ALIGN_BOTTOM, +}; + +enum _GalleryHorizontalAlignment +{ + GALLERY_HORIZONTAL_ALIGN_LEFT = 0, + GALLERY_HORIZONTAL_ALIGN_CENTER, // default + GALLERY_HORIZONTAL_ALIGN_RIGHT, +}; + +enum _GalleryFittingType +{ + GALLERY_FITTING_TYPE_NONE = 0, + GALLERY_FITTING_TYPE_FIT, + GALLERY_FITTING_TYPE_FIT_XY, + GALLERY_FITTING_TYPE_STRECTABLE, + GALLERY_FITTING_TYPE_SHRINKABLE, +}; + + +struct _GalleryAnimationTiming +{ + int duration_ms; + _GalleryAnimationTimingFunction timingFunction; +}; + +struct _GalleryImageAlignment +{ + _GalleryVerticalAlignment verticalAlignment; + _GalleryHorizontalAlignment horizontalAlignment; +}; + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_GALLERY_ENUM_H_ diff --git a/src/ui/inc/FUiCtrl_GalleryViewEvent.h b/src/ui/inc/FUiCtrl_GalleryViewEvent.h new file mode 100644 index 0000000..72bf83a --- /dev/null +++ b/src/ui/inc/FUiCtrl_GalleryViewEvent.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. +// +#ifndef _FUI_CTRL_INTERNAL_GALLERY_VIEW_EVENT_H_ +#define _FUI_CTRL_INTERNAL_GALLERY_VIEW_EVENT_H_ + +#include + +namespace Tizen { namespace Ui { namespace Controls { + +enum GalleryViewEventType +{ + GALLERY_VIEW_EVENT_ERROR = -1, + GALLERY_VIEW_EVENT_BOUNDS_CHANGED, + GALLERY_VIEW_EVENT_TOUCH_PRESSED, + GALLERY_VIEW_EVENT_TOUCH_RELEASED, + GALLERY_VIEW_EVENT_TOUCH_DOUBLE_PRESSED, + GALLERY_VIEW_EVENT_TOUCH_MOVED, + GALLERY_VIEW_EVENT_TOUCH_PINCH_ZOOM, + GALLERY_VIEW_EVENT_TOUCH_FLICK, + GALLERY_VIEW_EVENT_TOUCH_CANCELED +}; + +class _GalleryViewEventInfo; + +class _GalleryViewEvent + : public Tizen::Base::Object +{ +public: + _GalleryViewEvent(GalleryViewEventType eventType, _GalleryViewEventInfo* eventInfo); + virtual ~_GalleryViewEvent(void); + + GalleryViewEventType GetEventType(void) const; + _GalleryViewEventInfo* GetEventInfo(void) const; + +private: + _GalleryViewEvent(const _GalleryViewEvent& rhs); + _GalleryViewEvent& operator=(const _GalleryViewEvent& rhs); + +private: + GalleryViewEventType __eventType; + _GalleryViewEventInfo* __pEventInfo; +}; // _GalleryViewEvent + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_GALLERY_VIEW_EVENT_H_ diff --git a/src/ui/inc/FUiCtrl_GalleryViewEventHandler.h b/src/ui/inc/FUiCtrl_GalleryViewEventHandler.h new file mode 100644 index 0000000..5f092a0 --- /dev/null +++ b/src/ui/inc/FUiCtrl_GalleryViewEventHandler.h @@ -0,0 +1,127 @@ +// +// 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. +// +#ifndef _FUI_CTRL_INTERNAL_GALLERY_VIEW_EVENT_HANDLER_H_ +#define _FUI_CTRL_INTERNAL_GALLERY_VIEW_EVENT_HANDLER_H_ + +#include +#include +#include "FUiCtrl_GalleryTypes.h" +#include "FUiCtrl_IGalleryRendererNotiListener.h" + +namespace Tizen { namespace Graphics { + +class FloatDimension; + +}} // Tizen::Graphics + +namespace Tizen { namespace Ui { namespace Controls { + +enum FlickDirection +{ + FLICK_DIRECTION_NONE = 0, + FLICK_DIRECTION_LEFT, + FLICK_DIRECTION_RIGHT +}; + +enum MoveDirection +{ + MOVE_DIRECTION_NONE = 0, + MOVE_DIRECTION_HORIZONTAL, + MOVE_DIRECTION_VERTICAL +}; + +class _GalleryImageReader; +class _GalleryModel; +class _GalleryPresenter; +class _GalleryViewEventInfo; +class _IGalleryRenderer; + +class _GalleryViewEventHandler + : public Tizen::Base::Object + , public _IGalleryRendererNotiListener + , virtual public Tizen::Base::Runtime::IEventListener +{ +public: + _GalleryViewEventHandler(_GalleryPresenter& galleryPresenter, _IGalleryRenderer& galleryRenderer, _GalleryImageReader& galleryModel); + virtual ~_GalleryViewEventHandler(void); + + result Construct(void); + + bool OnTouchPressed(_GalleryViewEventInfo& eventInfo); + bool OnTouchDoublePressed(_GalleryViewEventInfo& eventInfo); + bool OnTouchReleased(_GalleryViewEventInfo& eventInfo); + bool OnTouchPinchZoom(_GalleryViewEventInfo& eventInfo); + bool OnTouchMoved(_GalleryViewEventInfo& eventInfo); + bool OnTouchFlicked(_GalleryViewEventInfo& eventInfo); + bool OnTouchCanceled(void); + bool ResetTouch(void); + + //notiListener + virtual void OnTransitionCancel(void); + virtual void OnTransitionCompleted(void); + virtual void OnCanvasAnimationCancel(void); + virtual void OnCanvasAnimationCompleted(void); + virtual void OnCanvasAnimationStarted(void); + + void SetZoomFlag(bool zoomMode); + bool IsZoomFlag(void) const; + result SetVisibleCanvas(void); + result AlignCanvas(bool animation = true); + bool CorrectCanvasPosition(Tizen::Graphics::FloatRectangle& canvasBounds, const Tizen::Graphics::FloatRectangle& imageBounds); + +private: + _GalleryViewEventHandler(const _GalleryViewEventHandler& rhs); + _GalleryViewEventHandler& operator=(const _GalleryViewEventHandler& rhs); + + result RefreshView(void); + + result SetInvisibleCanvas(void); + + result FlickToTheRight(void); + result FlickToTheLeft(void); + + result ZoomCanvas(float distance, const Tizen::Graphics::FloatPoint& center, bool zoomIn, _GalleryAnimationTiming* pAnimation = null); + result PinchZoomCanvas(int area, const Tizen::Graphics::FloatPoint& center, bool zoomIn); + result MoveCanvas(const Tizen::Graphics::FloatDimension& distance, _GalleryAnimationTiming* pAnimation = null); + + void SetRollbackCanvas(void); + int CalculateRound(float value); + result SetCurrentItemIndex(int index); + result CallChangeItemIndex(void); + +private: + _GalleryPresenter& __galleryPresenter; + _IGalleryRenderer& __galleryRenderer; + _GalleryImageReader& __galleryImageReader; + Tizen::Graphics::FloatPoint __previousPosition; + Tizen::Graphics::FloatPoint __startPinchCenterPosition; + FlickDirection __flickingDirection; + int __pinchInitialArea; + bool __pressed; + bool __moving; + bool __zoomMode; + bool __zoomAnimationComplete; + bool __pinchMode; + unsigned long __touchPointId; + int __currentItemIndex; + MoveDirection __moveDirection; + bool __endOfRange; +}; // _GalleryViewEventHandler + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_GALLERY_VIEW_EVENT_HANDLER_H_ diff --git a/src/ui/inc/FUiCtrl_GalleryViewEventInfo.h b/src/ui/inc/FUiCtrl_GalleryViewEventInfo.h new file mode 100644 index 0000000..3c39d53 --- /dev/null +++ b/src/ui/inc/FUiCtrl_GalleryViewEventInfo.h @@ -0,0 +1,69 @@ +// +// 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. +// +#ifndef _FUI_CTRL_INTERNAL_GALLERY_VIEW_EVENT_INFO_H_ +#define _FUI_CTRL_INTERNAL_GALLERY_VIEW_EVENT_INFO_H_ + +#include +#include "FUi_UiTouchEvent.h" + +namespace Tizen { namespace Ui { namespace Controls { + +class _GalleryViewEventInfo + : public Tizen::Base::Object +{ +public: + _GalleryViewEventInfo(void); + _GalleryViewEventInfo(_TouchInfo& touchInfo); + virtual ~_GalleryViewEventInfo(void); + + // touch Info access + Tizen::Graphics::FloatPoint GetCurrentPosition(void) const; + + // flick info access + void SetFlicked(bool flicked); + bool IsFlicked(void) const; + void SetFlickPosition(Tizen::Graphics::Point flickPos); + Tizen::Graphics::Point GetFlickPosition(void) const; + void SetFlickTime(int flickTime); + int GetFlickTime(void) const; + + // pinch info access + void SetPinchCenterPosition(Tizen::Graphics::FloatPoint centerPos); + Tizen::Graphics::FloatPoint GetPinchCenterPosition(void) const; + void SetPinchArea(int area); + int GetPinchArea(void) const; + + unsigned long GetPointId(void) const; + +private: + _GalleryViewEventInfo(const _GalleryViewEventInfo& rhs); + _GalleryViewEventInfo& operator=(const _GalleryViewEventInfo& rhs); + +private: + _TouchInfo* __pTouchInfo; + + bool __flicked; + Tizen::Graphics::Point __flickPosition; + int __flickTime; + + Tizen::Graphics::FloatPoint __pinchCenterPosition; + int __PinchArea; +}; // _GalleryViewEventInfo + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_GALLERY_VIEW_EVENT_INFO_H_ diff --git a/src/ui/inc/FUiCtrl_GroupContainer.h b/src/ui/inc/FUiCtrl_GroupContainer.h new file mode 100644 index 0000000..33e127b --- /dev/null +++ b/src/ui/inc/FUiCtrl_GroupContainer.h @@ -0,0 +1,173 @@ +// +// 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_GroupContainer.h + * @brief This is the header file for the _GroupContainer class. + * + * This header file contains the declarations of the _GroupContainer class. + */ + +#ifndef _FUI_CTRL_INTERNAL_GROUP_CONTAINER_H_ +#define _FUI_CTRL_INTERNAL_GROUP_CONTAINER_H_ + +#include "FUi_Control.h" +#include "FUiCtrl_GroupContainerPresenter.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class GroupContainerContentProvider + : public Tizen::Ui::Animations::IVisualElementContentProvider +{ + virtual bool PrepareDraw(Tizen::Ui::Animations::VisualElement& target); + + virtual void DrawContent(Tizen::Ui::Animations::VisualElement& target, Tizen::Graphics::Canvas& canvas); + + virtual Tizen::Ui::Animations::HitTestResult HitTest(Tizen::Ui::Animations::VisualElement& target, const Tizen::Graphics::FloatPoint& point); +}; + +class _GroupContainerPresenter; +class _GroupContainerImpl; + +class _GroupContainer + : public _Control + , virtual public Tizen::Base::Runtime::IEventListener + , virtual public _IUiEventListener + , virtual public _IUiEventPreviewer +{ + +public: + virtual ~_GroupContainer(void); + +public: + static _GroupContainer* CreateGroupContainerN(const Tizen::Graphics::FloatRectangle& rect, int rowCount, int columnCount, float lineWidth); + + result AddControlAt(Tizen::Ui::Control& control, int rowIndex, int columnIndex); + Tizen::Ui::Control* GetControlAt(int rowIndex, int columnIndex); + result RemoveControlAt(int rowIndex, int columnIndex); + result SetColumnWidth(int columnIndex, float width, bool isUser = true); + float GetColumnWidth(int columnIndex); + result SetRowHeight(int rowIndex, float height, bool isUser = true); + float GetRowHeight(int rowIndex); + result Merge(int rowStartIndex, int columnStartIndex, int rowCount, int columnCount); + result SetChildResizingEnabled(int rowIndex, int columnIndex, bool enable); + result SetMargin(int rowIndex, int columnIndex, float leftMargin, float rightMargin, float topMargin, float bottomMargin); + Tizen::Graphics::FloatRectangle GetBoundsAt(int rowIndex, int columnIndex) const; + result Split(int rowIndex, int columnIndex); + result SetColumnStretchable(int columnIndex, bool stretchable); + bool IsColumnStretchable(int columnIndex); + result SetRowStretchable(int rowIndex, bool stretchable); + bool IsRowStretchable(int rowIndex); + void SetLineColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetLineColor(void); + + int GetRowCount(void); + int GetColumnCount(void); + bool IsMerged(int rowIndex, int columnIndex); + bool IsParent(int rowIndex, int columnIndex); + result ResizeControl(int rowIndex, int columnIndex); + float GetLineWidth(void); + void UpdateStretchableCellBounds(Tizen::Graphics::FloatRectangle gridRect, Tizen::Graphics::FloatRectangle controlRect, int columnWidthIndex = -1, int rowHeightIndex = -1); + Tizen::Graphics::FloatRectangle GetGridBounds(void); + Tizen::Ui::_Control* GetSystemChild(void); + void SetImpl(_GroupContainerImpl *pImpl); + +protected: + + _GroupContainer(void); + virtual result Initialize(const Tizen::Graphics::FloatRectangle& rect, int rows, int columns, float lineWidth); + +private: + _GroupContainer(const _GroupContainer& rhs); + _GroupContainer& operator =(const _GroupContainer& rhs); + + virtual void OnDraw(void); + virtual result OnAttachedToMainTree(void); + virtual void OnChildAttached(const Tizen::Ui::_Control& child); + virtual void OnChildDetached(const Tizen::Ui::_Control& child); + Tizen::Ui::_Control* GetControlCoreAt(int rowIndex, int columnIndex); + void CollapseCell(int rowIndex, int columnIndex, int rowStartIndex, int columnStartIndex); + bool HasChild(int rowIndex, int columnIndex); + Tizen::Graphics::Point GetLastChild(int rowIndex, int columnIndex); + + result SetChildPosition(Tizen::Ui::_Control& pControl, int rowIndex, int columnIndex, Tizen::Graphics::FloatPoint position); + result SetChildBounds(Tizen::Ui::_Control& pControl, int rowIndex, int columnIndex, Tizen::Graphics::FloatRectangle bounds); + virtual void OnChildBoundsChanged(const Tizen::Ui::_Control& child); + virtual void OnBoundsChanged(void); + +private: + + static const float ROUNDOFF_VALUE = 0.00001f; + + struct _CellMargin + { + float left; + float right; + float top; + float bottom; + }; + struct _MergeCellIndex + { + int row; + int column; + }; + + struct _CellInfo + { + Tizen::Graphics::FloatRectangle cellBounds; + Tizen::Graphics::FloatDimension actualSize; + _MergeCellIndex parentCell; + _CellMargin cellMargin; + bool isResizeEnabled; + bool isMerged; + _ControlHandle controlHandle; + bool isParent; + int mergedRowCount; + int mergedColumnCount; + bool isBoundsModified; + Tizen::Graphics::FloatPoint childControlPos; + }; + + _CellInfo** __pCellsArray; + _GroupContainerImpl* __pGroupContainerImpl; + _GroupContainerPresenter* __pGroupContainerPresenter; + + int __rowCount; + int __columnCount; + int __childAttachedRowIndex; + int __childAttachedColumnIndex; + float __lineWidth; + Tizen::Graphics::Color __lineColor; + bool __isChildAdding; + + + bool* __pStretchableRowIndex; + bool* __pStretchableColumnIndex; + _Control* __pSystemControl; + GroupContainerContentProvider* __pContentProvider; + + _MergeCellIndex GetParentCell(const Tizen::Ui::_Control& child); + +}; // _GroupContainer + + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_GROUP_CONTAINER_H_ + + diff --git a/src/ui/inc/FUiCtrl_GroupContainerImpl.h b/src/ui/inc/FUiCtrl_GroupContainerImpl.h new file mode 100644 index 0000000..95a8d61 --- /dev/null +++ b/src/ui/inc/FUiCtrl_GroupContainerImpl.h @@ -0,0 +1,100 @@ +// +// 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_GroupContainerImpl.h + * @brief This is the header file for the _GroupContainerImpl class. + * + * This header file contains the declarations of the _GroupContainerImpl class. + */ + +#ifndef _FUI_CTRL_INTERNAL_GROUP_CONTAINER_IMPL_H_ +#define _FUI_CTRL_INTERNAL_GROUP_CONTAINER_IMPL_H_ + +#include +#include "FUi_ContainerImpl.h" +#include "FUiCtrl_GroupContainer.h" + +namespace Tizen { namespace Ui +{ +class DataBindingContext; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _GroupContainerImpl + : public _ContainerImpl +{ + +// Life Cycle +public: + virtual ~_GroupContainerImpl(void); + + static _GroupContainerImpl* CreateGroupContainerImplN(GroupContainer* pControl, const Tizen::Graphics::Rectangle& rect, int rowCount, int columnCount, int lineWidth); + static _GroupContainerImpl* CreateGroupContainerImplFN(GroupContainer* pControl, const Tizen::Graphics::FloatRectangle& rect, int rowCount, int columnCount, float lineWidth); + void Initialize(void); + //Accessor + + static const _GroupContainerImpl* GetInstance(const GroupContainer& grpContainer); + static _GroupContainerImpl* GetInstance(GroupContainer& grpContainer); + + virtual const char* GetPublicClassName(void) const; + virtual const GroupContainer& GetPublic(void) const; + virtual GroupContainer& GetPublic(void); + virtual const _GroupContainer& GetCore(void) const; + virtual _GroupContainer& GetCore(void); + + result AddControlAt(Control& control, int rowIndex, int columnIndex); + Tizen::Ui::Control* GetControlAt(int rowIndex, int columnIndex); + result RemoveControlAt(int rowIndex, int columnIndex); + result SetColumnWidth(int columnIndex, int width); + result SetColumnWidth(int columnIndex, float width); + int GetColumnWidth(int columnIndex); + float GetColumnWidthF(int columnIndex); + result SetRowHeight(int rowIndex, int rowHeight); + result SetRowHeight(int rowIndex, float rowHeight); + int GetRowHeight(int rowIndex); + float GetRowHeightF(int rowIndex); + result Merge(int rowStartIndex, int columnStartIndex, int rowCount, int columnCount); + result SetChildResizingEnabled(int rowIndex, int columnIndex, bool enable); + result SetMargin(int rowIndex, int columnIndex, int leftMargin, int rightMargin, int topMargin, int bottomMargin); + result SetMargin(int rowIndex, int columnIndex, float leftMargin, float rightMargin, float topMargin, float bottomMargin); + result Split(int rowIndex, int columnIndex); + Tizen::Graphics::Rectangle GetBoundsAt(int rowIndex, int columnIndex) const; + Tizen::Graphics::FloatRectangle GetBoundsAtF(int rowIndex, int columnIndex) const; + result SetColumnStretchable(int columnIndex, bool stretchable); + bool IsColumnStretchable(int columnIndex); + result SetRowStretchable(int rowIndex, bool stretchable); + bool IsRowStretchable(int rowIndex); + void SetLineColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetLineColor(void); + +protected: + _GroupContainerImpl(Control* pPublic, _Control* pCore); + +private: + + _GroupContainerImpl(const _GroupContainerImpl& rhs); + _GroupContainerImpl& operator = (const _GroupContainerImpl& rhs); + +}; // _GroupContainerImpl + +}}} //Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_GROUP_CONTAINER_IMPL_H_ + diff --git a/src/ui/inc/FUiCtrl_GroupContainerPresenter.h b/src/ui/inc/FUiCtrl_GroupContainerPresenter.h new file mode 100644 index 0000000..939a054 --- /dev/null +++ b/src/ui/inc/FUiCtrl_GroupContainerPresenter.h @@ -0,0 +1,69 @@ +// +// 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_GroupContainerPresenter.h + * @brief This is the header file for the _GroupContainerPresenter class. + * + * This header file contains the declarations of the %_GroupContainerPresenter class. + */ + +#ifndef _FUI_CTRL_INTERNAL_GROUP_CONTAINER_PRESENTER_H_ +#define _FUI_CTRL_INTERNAL_GROUP_CONTAINER_PRESENTER_H_ + +#include +#include "FUiCtrl_GroupContainer.h" + +namespace Tizen { namespace Ui { namespace Controls +{ +class _GroupContainer; + +class _GroupContainerPresenter + : public Tizen::Base::Object +{ +public: + _GroupContainerPresenter(void); + _GroupContainerPresenter(_GroupContainer& GroupContainer); + virtual ~_GroupContainerPresenter(void); + +public: + + void Draw(void); + result LoadResourceBitmaps(void); + +private: + _GroupContainerPresenter(const _GroupContainerPresenter& rhs); + _GroupContainerPresenter& operator =(const _GroupContainerPresenter& rhs); + void DrawBackgroundBitmapForSystemChild(Tizen::Graphics::Canvas* pCanvas); + void DrawBackgroundBitmapForGroupContainer(Tizen::Graphics::Canvas* pCanvas); + void DrawBackgroundEffectBitmapForSystemChild(Tizen::Graphics::Canvas* pCanvas); + Tizen::Graphics::Color GetParentColor(void) const; + +private: + static const int BORDER_LINE_WIDTH = 1; + _GroupContainer* __pGroupContainer; + Tizen::Graphics::Bitmap* __pSystemChildColorReplacedBgBitmap; + Tizen::Graphics::Bitmap* __pSystemChildBgEffectBitmap; + Tizen::Graphics::Bitmap* __pGroupContainerColorReplacedBgBitmap; + Tizen::Graphics::Color __parentBgColor; + Tizen::Graphics::Color __bgColor; +}; // _GroupContainerPresenter; + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_GROUP_CONTAINER_PRESENTER_H_ + diff --git a/src/ui/inc/FUiCtrl_GroupItemImpl.h b/src/ui/inc/FUiCtrl_GroupItemImpl.h new file mode 100644 index 0000000..fba671c --- /dev/null +++ b/src/ui/inc/FUiCtrl_GroupItemImpl.h @@ -0,0 +1,89 @@ +// +// 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_GroupItemImpl.h + * @brief This is the header file for the GroupItemImpl class. + * + * This header file contains the declarations of the GroupItemImpl class. + */ + +#ifndef _FUI_CTRL_GROUP_ITEM_IMPL_H_ +#define _FUI_CTRL_GROUP_ITEM_IMPL_H_ + +#include "FUiCtrl_ListItemBaseImpl.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class ICustomElement; +class GroupItem; + +class _GroupItemImpl + : public _ListItemBaseImpl +{ +// Lifecycle +public: + static _GroupItemImpl* CreateGroupItemImpN(GroupItem* pPublic, const Tizen::Graphics::FloatDimension& itemSize); + + virtual ~_GroupItemImpl(void); + +// Operation +public: + virtual const char* GetPublicClassName(void) const; + + result Construct(const Tizen::Graphics::FloatDimension& itemSize); + + result SetBackgroundBitmap(const Tizen::Graphics::Bitmap* pBitmap); + + result SetBackgroundColor(const Tizen::Graphics::Color& color); + + Tizen::Graphics::Color GetBackgroundColor(void) const; + + result SetTextColor(const Tizen::Graphics::Color& color); + + Tizen::Graphics::Color GetTextColor(void) const; + + result SetTextSize(float size); + + float GetTextSize(void) const; + + result SetElement(const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBitmap = null); + +public: + static _GroupItemImpl* GetInstance(GroupItem& groupItem); + + static const _GroupItemImpl* GetInstance(const GroupItem& groupItem); + +// Constructor +private: + _GroupItemImpl(GroupItem* pPublic); + + _GroupItemImpl(const _GroupItemImpl& rhs); + + _GroupItemImpl& operator =(const _GroupItemImpl& rhs); + +// Attribute +private: + static const float GROUP_ITEM_ELEMENT_BITMAP_SIZE_RATIO = 0.6f; + float __textSize; + Tizen::Graphics::Color __textColor; +}; // _GroupItemImpl + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_GROUP_ITEM_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_GroupedListImpl.h b/src/ui/inc/FUiCtrl_GroupedListImpl.h new file mode 100644 index 0000000..08d6ae2 --- /dev/null +++ b/src/ui/inc/FUiCtrl_GroupedListImpl.h @@ -0,0 +1,204 @@ +// +// 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_GroupedListImpl.h + * @brief This is the header file for the _GroupedListImpl class. + * + * This header file contains the declarations of the _GroupedListImpl class and its helper classes. + */ + +#ifndef _FUI_CTRL_INTERNAL_GROUPED_LIST_IMPL_H_ +#define _FUI_CTRL_INTERNAL_GROUPED_LIST_IMPL_H_ + +#include +#include +#include +#include +#include +#include "FUiCtrl_CustomListImpl.h" +#include "FUiCtrl_TableView.h" +#include "FUi_ControlImpl.h" +#include "FUiCtrl_ListBaseImpl.h" +#include "FUiCtrl_IFastScrollListener.h" +#include "FUiCtrl_CustomListItemImpl.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _GroupedListItemDataProvider + : public Tizen::Ui::Controls::IGroupedTableViewItemProvider +{ +public: + _GroupedListItemDataProvider(class _GroupedListImpl* pGroupedListImpl); + virtual ~_GroupedListItemDataProvider(void); + + int GetGroupCount(void); + int GetItemCount(int groupIndex); + Tizen::Ui::Controls::TableViewGroupItem* CreateGroupItem(int groupIndex, int itemWidth); + Tizen::Ui::Controls::TableViewItem* CreateItem(int groupIndex, int itemIndex, int itemWidth); + bool DeleteItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem); + bool DeleteGroupItem(int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem); + bool IsReorderable(int groupIndexFrom, int groupIndexTo); + + void UpdateGroupItem(int groupIndex, TableViewGroupItem* pItem); + void UpdateItem(int groupIndex, int itemIndex, TableViewItem* pItem); + int GetDefaultGroupItemHeight(void); + int GetDefaultItemHeight(void); + +private: + _GroupedListItemDataProvider(const _GroupedListItemDataProvider& rhs); + _GroupedListItemDataProvider& operator =(const _GroupedListItemDataProvider& rhs); + +private: + _GroupedListImpl* __pList; +}; //_GroupedListItemDataProvider + +class _GroupedListImpl + : public _ListBaseImpl + , public _ITableViewItemEventListener + , public _IUiFastScrollListener + , virtual public Tizen::Base::Runtime::IEventListener +{ +public: + virtual ~_GroupedListImpl(void); + static _GroupedListImpl* CreateGroupedListImplN(GroupedList* pControl, const Tizen::Graphics::Rectangle& bounds, bool itemDivider = true, bool fastScroll = false); + virtual const char* GetPublicClassName(void) const; + virtual const GroupedList& GetPublic(void) const; + virtual GroupedList& GetPublic(void); + virtual const _TableView& GetCore(void) const; + virtual _TableView& GetCore(void); + result Initialize(void); + //@See doxygen + result AddFastScrollEventListener(const Tizen::Ui::IFastScrollEventListener& listener); + //@See doxygen + result RemoveFastScrollEventListener(const Tizen::Ui::IFastScrollEventListener& listener); + //@See doxygen + result AddGroupedItemEventListener(const Tizen::Ui::IGroupedItemEventListener& listener); + //@See doxygen + result RemoveGroupedItemEventListener(const Tizen::Ui::IGroupedItemEventListener& listener); + result SetItemProvider(void); + //@See doxygen + result AddGroup(const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBackgroundBitmap, int groupId = LIST_ITEM_UNSPECIFIED_ID); + //@See doxygen + result AddItem(int groupIndex, const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID); + //@See doxygen + result SetItemAt(int groupIndex, int itemIndex, const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID); + //@See doxygen + result InsertGroupAt(int groupIndex, const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBackgroundBitmap, int groupId = LIST_ITEM_UNSPECIFIED_ID); + //@See doxygen + result SetGroupAt(int groupIndex, const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBackgroundBitmap, int groupId = LIST_ITEM_UNSPECIFIED_ID); + //@See doxygen + result InsertItemAt(int groupIndex, int itemIndex, const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID); + //@See doxygen + result RemoveItemAt(int groupIndex, int itemIndex); + //@See doxygen + result RemoveAllItemsAt(int groupIndex); + //@See doxygen + result RemoveGroupAt(int groupIndex); + //@See doxygen + result RemoveAllGroups(void); + //@See doxygen + result RemoveAllItems(void); + //@See doxygen + result SetItemEnabled(int groupIndex, int itemIndex, bool enable); + //@See doxygen + bool IsItemEnabled(int groupIndex, int itemIndex) const; + //@See doxygen + result SetItemChecked(int groupIndex, int itemIndex, bool check); + //@See doxygen + bool IsItemChecked(int groupIndex, int itemIndex) const; + //@See doxygen + result SetAllItemsChecked(int groupIndex, bool check); + //@See doxygen + result RemoveAllCheckedItems(void); + //@See doxygen + result RemoveAllCheckedItemsAt(int groupIndex); + //@See doxygen + result GetFirstCheckedItemIndex(int& groupIndex, int& itemIndex) const; + //@See doxygen + result GetLastCheckedItemIndex(int& groupIndex, int& itemIndex) const; + //@See doxygen + result GetNextCheckedItemIndexAfter(int& groupIndex, int& itemIndex) const; + //@See doxygen + int GetGroupIndexFromGroupId(int groupId) const; + //@See doxygen + result GetItemIndexFromItemId(int itemId, int& groupIndex, int& itemIndex) const; + //@See doxygen + result SetFastScrollMainIndex(const Tizen::Base::String& text); + //@See doxygen + void ScrollToBottom(void); + //@See doxygen + void ScrollToTop(void); + //@See doxygen + result ScrollToTop(int groupIndex, int itemIndex); + //@See doxygen + result ScrollToTop(int groupIndex); + //@See doxygen + result RefreshGroup(int groupIndex); + //@See doxygen + result RefreshItem(int groupIndex, int itemIndex); + //@See doxygen + int GetGroupIdAt(int groupIndex) const; + //@See doxygen + int GetItemIdAt(int groupIndex, int itemIndex) const; + + void SetListBackgroundColor(const Tizen::Graphics::Color& bgColor); + + void OnTableViewItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status); + void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::_TableView& tableView, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pContextItem, bool activated); + void OnTableViewItemReordered(Tizen::Ui::Controls::_TableView& tableView, int itemIndexFrom, int itemIndexTo); + void OnGroupedTableViewGroupItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status); + void OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status); + void OnGroupedTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pContextItem, bool activated); + void OnGroupedTableViewItemReordered(_TableView& tableView, int groupIndexFrom, int itemIndexFrom, int groupIndexTo, int itemIndexTo); + void OnSectionTableViewItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int sectionIndex, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status); + void OnSectionTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::_TableView& tableView, int sectionIndex, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pContextItem, bool activated); + void OnTableViewItemSwept(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewSweepDirection direction); + + virtual void OnUiFastScrollIndexSelected(Tizen::Ui::_Control& source, Tizen::Ui::Controls::_FastScrollIndex& index); + virtual void OnBoundsChanged(void); + +public: + static _GroupedListImpl* GetInstance(GroupedList& groupedList); + static const _GroupedListImpl* GetInstance(const GroupedList& groupedList); + +private: + _GroupedListImpl(Control* pPublic, _TableView* pCore); + _GroupedListImpl(const _GroupedListImpl& rhs); + _GroupedListImpl& operator =(const _GroupedListImpl& rhs); + virtual void ProcessItemStateChange(int groupIndex, int itemIndex, ItemStatus itemStatus); + virtual void ProcessItemStateChange(int groupIndex, int itemIndex, int elementId, ItemStatus itemStatus); + + _GroupedListItemDataProvider* __pItemProvider; + Tizen::Ui::IGroupedItemEventListener* __pItemListener; + Tizen::Base::String __mainIndexText; + int __groupItemHeight; + int __groupItemTextFont; + Tizen::Base::Collection::LinkedList __itemListenersList; + Tizen::Base::Collection::LinkedList __fastScrollListenersList; + Tizen::Graphics::Color __bgColor; + bool __directDelete; + CustomListItemFormat* __pItemFormat; + + friend class _GroupedListItemDataProvider; +}; //_GroupedListImpl + +}}} // Tizen::Ui::Controls + + +#endif //_FUI_CTRL_INTERNAL_GROUPED_LIST_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_GroupedListViewImpl.h b/src/ui/inc/FUiCtrl_GroupedListViewImpl.h new file mode 100644 index 0000000..c3cd48b --- /dev/null +++ b/src/ui/inc/FUiCtrl_GroupedListViewImpl.h @@ -0,0 +1,296 @@ +// +// 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_GroupedListViewImpl.h + * @brief This file defines the GroupedListViewImpl class. + * @version 3.0 + * + * This file contains the declarations of GroupedListViewImpl class. + */ + +#ifndef _FUI_CTRL_GROUPED_LIST_VIEW_IMPL_H_ +#define _FUI_CTRL_GROUPED_LIST_VIEW_IMPL_H_ + +#include +#include "FUi_ControlImpl.h" +#include "FUiCtrl_IFastScrollListener.h" +#include "FUiCtrl_IScrollEventListener.h" +#include "FUiCtrl_IUiListViewItemEventListener.h" +#include "FUiCtrl_TableView.h" + +namespace Tizen { namespace Ui +{ +class _AccessibilityElement; +}} + +namespace Tizen { namespace Ui { namespace Controls +{ + +class GroupedListView; +class _FastScrollEvent; +class _Label; +class _ListItemEvent; +class _ListViewItem; +class _PublicLinkEvent; +class _ScrollEvent; + +class _GroupedListViewImpl + : public _ControlImpl + , public _ITableViewItemEventListener + , public _IScrollEventListener + , public _IUiFastScrollListener + , public _IUiListViewItemEventListener + , virtual public Tizen::Base::Runtime::IEventListener +{ +public: + virtual ~_GroupedListViewImpl(void); + + static _GroupedListViewImpl* CreateGroupedListViewImplN(GroupedListView* pControl, GroupedListViewStyle style, + bool itemDivider, ListScrollStyle scrollStyle); + + virtual const char* GetPublicClassName(void) const; + + virtual const GroupedListView& GetPublic(void) const; + + virtual GroupedListView& GetPublic(void); + + virtual const _TableView& GetCore(void) const; + + virtual _TableView& GetCore(void); + +public: + result SetItemProvider(IGroupedListViewItemProvider& provider); + + result SetItemProvider(IGroupedListViewItemProviderF& provider); + + void AddGroupedListViewItemEventListener(IGroupedListViewItemEventListener& listener); + + void RemoveGroupedListViewItemEventListener(IGroupedListViewItemEventListener& listener); + + void AddFastScrollListener(IFastScrollListener& listener); + + void RemoveFastScrollListener(IFastScrollListener& listener); + + void AddScrollEventListener(IScrollEventListener& listener); + + void AddScrollEventListener(IScrollEventListenerF& listener); + + void RemoveScrollEventListener(IScrollEventListener& listener); + + void RemoveScrollEventListener(IScrollEventListenerF& listener); + + void AddUiLinkEventListener(const Tizen::Ui::IUiLinkEventListener& listener); + + void RemoveUiLinkEventListener(const Tizen::Ui::IUiLinkEventListener& listener); + + result SetSweepEnabled(bool enable); + + result SetFastScrollIndex(const Tizen::Base::String& text, bool useSearchIcon); + + result GetTopDrawnItemIndex(int& groupIndex, int& itemIndex) const; + + result GetBottomDrawnItemIndex(int& groupIndex, int& itemIndex) const; + + result ScrollToItem(int groupIndex, int itemIndex, ListScrollItemAlignment itemAlignment); + + result SetItemChecked(int groupIndex, int itemIndex, bool check); + + bool IsItemChecked(int groupIndex, int itemIndex) const; + + result SetItemEnabled(int groupIndex, int itemIndex, bool enable); + + bool IsItemEnabled(int groupIndex, int itemIndex) const; + + int GetGroupCount(void) const; + + int GetItemCountAt(int groupIndex) const; + + result ShowItemDescriptionText(int groupIndex, int itemIndex); + + result HideItemDescriptionText(int groupIndex, int itemIndex); + + result RefreshList(int groupIndex, int itemIndex, ListRefreshType type); + + result RefreshList(int groupIndex, int itemIndex, int elementId); + + result UpdateList(bool isRestoreAnnexFocusValue = false); + + result GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& position, int& groupIndex, int& itemIndex) const; + + result GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& position, int& groupIndex, int& itemIndex, int& elementId) const; + + result SetSectionColor(const Tizen::Graphics::Color& color); + + Tizen::Graphics::Color GetSectionColor(void) const; + + result SetItemDividerColor(const Tizen::Graphics::Color& color); + + Tizen::Graphics::Color GetItemDividerColor(void) const; + + void SetListBackgroundColor(const Tizen::Graphics::Color& color); + + result SetBackgroundBitmap(const Tizen::Graphics::Bitmap* pBitmap); + + result SetBitmapOfEmptyList(const Tizen::Graphics::Bitmap* pBitmap); + + result SetTextOfEmptyList(const Tizen::Base::String& text); + + Tizen::Base::String GetTextOfEmptyList(void) const; + + result SetTextColorOfEmptyList(const Tizen::Graphics::Color& color); + + Tizen::Graphics::Color GetTextColorOfEmptyList(void) const; + + result ExpandGroup(int groupIndex); + + result CollapseGroup(int groupIndex); + + bool IsGroupExpanded(int groupIndex) const; + + result ExpandAllGroups(void); + + result CollapseAllGroups(void); + + result BeginReorderingMode(void); + + result EndReorderingMode(void); + + bool IsInReorderingMode(void) const; + + void SetScrollInputMode(ScrollInputMode mode); + + ScrollInputMode GetScrollInputMode(void) const; + + result OpenContextItem(int groupIndex, int itemIndex); + + result CloseContextItem(int groupIndex, int itemIndex); + + bool IsContextItemOpened(int groupIndex, int itemIndex) const; + + // _IUiListViewItemEventListener + virtual void OnListViewContextItemStateChanged(Tizen::Ui::_Control& source, int groupIndex, int itemIndex, int elementId, + Tizen::Ui::Controls::ListContextItemStatus status); + + // _ITableViewItemEventListener + virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int itemIndex, + Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status) {}; + + virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::_TableView& tableView, int itemIndex, + Tizen::Ui::Controls::_TableViewItem* pContextItem, bool activated) {}; + + virtual void OnTableViewItemReordered(Tizen::Ui::Controls::_TableView& tableView, int itemIndexFrom, int itemIndexTo) {}; + + virtual void OnGroupedTableViewGroupItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, + Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status); + + virtual void OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, int itemIndex, + Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status); + + virtual void OnGroupedTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, + int itemIndex, Tizen::Ui::Controls::_TableViewItem* pContextItem, bool activated); + + virtual void OnGroupedTableViewItemReordered(Tizen::Ui::Controls::_TableView& tableView, int groupIndexFrom, int itemIndexFrom, + int groupIndexTo, int itemIndexTo); + + virtual void OnSectionTableViewItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int sectionIndex, int itemIndex, + Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status); + + virtual void OnSectionTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::_TableView& tableView, int sectionIndex, + int itemIndex, Tizen::Ui::Controls::_TableViewItem* pContextItem, bool activated); + + virtual void OnTableViewItemSwept(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, int itemIndex, + Tizen::Ui::Controls::TableViewSweepDirection direction); + + // _IScrollEventListener + virtual void OnScrollEndReached(Tizen::Ui::_Control& source, ScrollEndEvent type); + + virtual void OnScrollPositionChanged(Tizen::Ui::_Control& source, float scrollPosition); + + virtual void OnScrollStopped(Tizen::Ui::_Control& source); + + // event handler for _IUiFastScrollListener + virtual void OnUiFastScrollIndexSelected(Tizen::Ui::_Control& source, Tizen::Ui::Controls::_FastScrollIndex& index); + + virtual void OnDraw(void); + + virtual void OnChangeLayout(_ControlOrientation orientation); + + virtual void OnBoundsChanged(void); + + virtual void OnFontChanged(Tizen::Graphics::Font* pFont); + + virtual void OnFontInfoRequested(unsigned long& style, int& size); + + virtual void OnFontInfoRequested(unsigned long& style, float& size); + +public: + static _GroupedListViewImpl* GetInstance(GroupedListView& groupedListView); + + static const _GroupedListViewImpl* GetInstance(const GroupedListView& groupedListView); + +private: + _GroupedListViewImpl(GroupedListView* pGroupedList, _TableView* pCore); + + _GroupedListViewImpl(_GroupedListViewImpl& rhs); + + _GroupedListViewImpl& operator =(_GroupedListViewImpl& rhs); + + result SetItemDescriptionTextShowState(int groupIndex, int itemIndex, bool show); + + void AdjustLayoutOfEmptyList(void); + + void CheckEmptyListShowState(void); + + Tizen::Graphics::FloatPoint GetCurrentTouchPosition(void); + + void FireListViewItemEvent(int groupIndex, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pItem, + Tizen::Ui::Controls::TableViewItemStatus status); + + void FireListViewItemLongPressedEvent(void); + + void SetItemNeedsLazyDeletion(_ListViewItem* pItem); + + virtual result OnTouchEventListenerAdded(void); + + virtual result OnTouchEventListenerRemoved(void); + +private: + _ListItemEvent* __pListItemEvent; + _PublicLinkEvent* __pLinkEvent; + _ScrollEvent* __pScrollEvent; + _FastScrollEvent* __pFastScrollEvent; + + _Label* __pEmptyBitmap; + _Label* __pEmptyText; + Tizen::Graphics::Color __emptyTextColor; + Tizen::Ui::_AccessibilityElement* __pAccessibilityElement; + + bool __redrawListView; + bool __isOrientationChanged; + bool __isUpdateListCalled; + bool __needReloadItems; + + class _GroupedListViewPropagatedTouchEventListener; + _GroupedListViewPropagatedTouchEventListener* __pPropagatedTouchEventListener; + + friend class _GroupedListViewPropagatedTouchEventListener; +}; // _GroupedListViewImpl + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_GROUPED_LIST_VIEW_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_GroupedListViewItemProviderAdaptor.h b/src/ui/inc/FUiCtrl_GroupedListViewItemProviderAdaptor.h new file mode 100644 index 0000000..1bf5576 --- /dev/null +++ b/src/ui/inc/FUiCtrl_GroupedListViewItemProviderAdaptor.h @@ -0,0 +1,129 @@ +// +// 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_GroupedListViewItemProviderAdaptor.h + * @brief This is the header file for _GroupedListViewItemProviderAdaptor class. + * + * This header file contains declaration of _GroupedListViewItemProviderAdaptor class. + */ + +#ifndef _FUI_CTRL_INTERNAL_GROUPED_LIST_VIEW_ITEM_PROVIDER_H_ +#define _FUI_CTRL_INTERNAL_GROUPED_LIST_VIEW_ITEM_PROVIDER_H_ + +#include +#include +#include +#include "FUiCtrl_IUiListViewItemEventListener.h" +#include "FUiCtrl_LinkedList.h" +#include "FUiCtrl_TableViewItemProviderAdaptor.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +struct _ListItemPos +{ + int groupIndex; + int itemIndex; +}; + +class _IListItemCommon; +class _ListViewItem; + +class _GroupedListViewItemProviderAdaptor + : public _TableViewItemProviderAdaptor +{ + +public: +// Lifecycle + _GroupedListViewItemProviderAdaptor(const IGroupedListViewItemProvider& provider); + _GroupedListViewItemProviderAdaptor(const IGroupedListViewItemProviderF& provider); + + virtual ~_GroupedListViewItemProviderAdaptor(void); + +// Operation + void SetItemProvider(const IGroupedListViewItemProvider& provider); + void SetItemProvider(const IGroupedListViewItemProviderF& provider); + + IGroupedListViewItemProvider* GetItemProvider(void) const; + IGroupedListViewItemProviderF* GetItemProviderF(void) const; + + virtual _IListItemCommon* LoadItem(int groupIndex, int itemIndex); + + virtual result UnloadItem(_IListItemCommon* pListItem, int groupIndex, int itemIndex); + + virtual result DeleteItem(_IListItemCommon* pListItem, int groupIndex, int itemIndex); + + virtual bool UpdateItem(_IListItemCommon* pItem, int groupIndex, int itemIndex); + + virtual int GetItemCount(int groupIndex = 0) const; + + virtual int GetGroupCount(void) const; + + virtual float GetDefaultItemHeight(void); + + virtual float GetDefaultGroupItemHeight(void); + + virtual bool IsReorderable(int groupIndexFrom, int groupIndexTo); + + virtual bool HasSectionHeader(int groupIndex) const; + + virtual bool HasSectionFooter(int groupIndex) const; + + bool SetDescriptionTextShowState(int groupIndex, int itemIndex, bool show); + + bool IsDescriptionTextShown(int groupIndex, int itemIndex) const; + + void SetListViewItemEventListener(Tizen::Ui::Controls::_IUiListViewItemEventListener& listener); + + void SetItemFont(const Tizen::Base::String& fontName); + + void SetItemNeedsLazyDeletion(_ListViewItem* pItem); + +private: + _GroupedListViewItemProviderAdaptor(const _GroupedListViewItemProviderAdaptor& rhs); + + _GroupedListViewItemProviderAdaptor& operator =(const _GroupedListViewItemProviderAdaptor& rhs); + + void SetItemLazyDeletion(_ListViewItem* pItem); + + _IListItemCommon* GetDefaultItem(void); + +// Variable +private: + IGroupedListViewItemProvider* __pGroupedListViewProvider; + IGroupedListViewItemProviderF* __pGroupedListViewProviderF; + _LinkedList <_ListItemPos> __descriptionTextShowItem; + _IUiListViewItemEventListener* __pEventListener; + Tizen::Base::String __fontName; + float __groupItemAverageHeight; + float __itemAverageHeight; + int __groupItemLoadedCount; + int __itemLoadedCount; + int __countOfAllGroups; + int __countOfAllItems; + _ListViewItem* __pItemNeedsLazyDeletion; + _ListViewItem* __pLazyDeletionItem; + bool __usingFloatingPoint; + + _IListItemCommon* __pDefaultItem; +}; // _GroupedListViewItemProviderAdaptor + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_GROUPED_LIST_VIEW_ITEM_PROVIDER_H_ + diff --git a/src/ui/inc/FUiCtrl_HeaderImpl.h b/src/ui/inc/FUiCtrl_HeaderImpl.h new file mode 100644 index 0000000..54f1cb1 --- /dev/null +++ b/src/ui/inc/FUiCtrl_HeaderImpl.h @@ -0,0 +1,230 @@ +// +// 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_HeaderImpl.h + * @brief This is the header file for the _HeaderImpl class. + * + * This header file contains the declarations of the %_HeaderImpl class. + */ + +#ifndef _FUI_CTRL_INTERNAL_HEADER_IMPL_H_ +#define _FUI_CTRL_INTERNAL_HEADER_IMPL_H_ + +#include +#include +#include "FUi_ControlImpl.h" +#include "FUiCtrl_Button.h" +#include "FUiCtrl_Toolbar.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _PublicActionEvent; + +const int HEADER_MAX_ITEM_COUNT_WITH_BUTTON = 3; +const int HEADER_ITEM_MAX_COUNT = 4; +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_NUMBERD_BADGE_ICON_NUMBER_MAX = 99999; + +class _HeaderImpl + : public _ControlImpl + , public _IActionEventListener + , virtual public Tizen::Base::Runtime::IEventListener +{ +public: + static _HeaderImpl* CreateHeaderImplN(Header* pControl); + + _HeaderImpl(Header* pPublic, _Toolbar* pCore); + + virtual ~_HeaderImpl(void); + + Header* GetHeader(void) const; + + virtual const char* GetPublicClassName(void) const; + + virtual const Header& GetPublic(void) const; + + virtual Header& GetPublic(void); + + virtual const _Toolbar& GetCore(void) const; + + virtual _Toolbar& GetCore(void); + + static const _HeaderImpl* GetInstance(const Header& header); + + static _HeaderImpl* GetInstance(Header& header); + + result AddItem(const HeaderItem& item); + + ButtonItemStatus GetButtonStatus(ButtonPosition position) const; + + Tizen::Graphics::Color GetButtonColor(ButtonItemStatus status) const; + + Tizen::Graphics::Color GetButtonTextColor(ButtonItemStatus status) const; + + Tizen::Base::String GetDescriptionText(void) const; + + Tizen::Graphics::Color GetDescriptionTextColor(void) const; + + Tizen::Graphics::Color GetItemColor(HeaderItemStatus status) const; + + int GetItemCount(void) const; + + result GetItemStatus(int itemIndex, HeaderItemStatus& status) const; + + Tizen::Graphics::Color GetItemTextColor(HeaderItemStatus status) const; + + HeaderStyle GetStyle(void) const; + + int GetSelectedItemIndex(void) const; + + Tizen::Base::String GetTitleText(void) const; + + Tizen::Graphics::Color GetTitleTextColor(void) const; + + Tizen::Graphics::Color GetColor(void) const; + + AnimationStatus GetWaitingAnimationStatus(HeaderAnimationPosition animationPos) const; + + result InsertItemAt(int itemIndex, const HeaderItem& item); + + bool IsButtonSet(ButtonPosition position) const; + + result PauseWaitingAnimation(HeaderAnimationPosition animationPos); + + result PlayWaitingAnimation(HeaderAnimationPosition animationPos); + + result RemoveAllButtons(void); + + result RemoveAllItems(void); + + result RemoveItemAt(int itemIndex); + + result RemoveButtonAt(ButtonPosition position); + + result SetBackgroundBitmap(const Tizen::Graphics::Bitmap* pBitmap); + + result SetButton(ButtonPosition position, const ButtonItem& button); + + result SetButtonColor(ButtonItemStatus status, const Tizen::Graphics::Color& color); + + result SetButtonEnabled(ButtonPosition position, bool enable); + + result SetButtonTextColor(ButtonItemStatus status, const Tizen::Graphics::Color& color); + + result SetButtonBadgeIcon(ButtonPosition position, const Tizen::Graphics::Bitmap* pBadgeIcon); + + result SetButtonNumberedBadgeIcon(ButtonPosition position, int number); + + result SetItemAt(int itemIndex, const HeaderItem& item); + + result SetItemBadgeIcon(int itemIndex, const Tizen::Graphics::Bitmap* pBadgeIcon); + + result SetItemNumberedBadgeIcon(int itemIndex, int number); + + result SetItemColor(HeaderItemStatus status, const Tizen::Graphics::Color& color); + + result SetItemEnabled(int itemIndex, bool enable); + + result SetItemTextColor(HeaderItemStatus status, const Tizen::Graphics::Color& color); + + result SetItemSelected(int itemIndex); + + result SetColor(const Tizen::Graphics::Color& color); + + result SetStyle(HeaderStyle style); + + result SetTitleIcon(const Tizen::Graphics::Bitmap* pIcon); + + result SetTitleText(const Tizen::Base::String& text); + + result SetTitleTextColor(const Tizen::Graphics::Color& color); + + result SetTransparent(bool transparent); + + result SetDescriptionText(const Tizen::Base::String& text); + + result SetDescriptionTextColor(const Tizen::Graphics::Color& color); + + result StopWaitingAnimation(HeaderAnimationPosition animationPos); + + bool IsTabEditModeEnabled(void) const; + + result SetTabEditModeEnabled(bool enable); + + result SetBackButton(void); + + bool IsBackButtonSet(void) const; + + void RemoveBackButton(void); + + result SetBackButtonEnabled(bool enable); + + ButtonItemStatus GetBackButtonStatus(void) const; + + Tizen::Graphics::Rectangle GetButtonBounds(ButtonPosition position) const; + + Tizen::Graphics::FloatRectangle GetButtonBoundsF(ButtonPosition position) const; + + result SetTitleBadgeIcon(const Tizen::Graphics::Bitmap* pBadgeIcon); + + result SetTitleNumberedBadgeIcon(int number); + + void AddActionEventListener(Tizen::Ui::IActionEventListener& listener); + + void RemoveActionEventListener(Tizen::Ui::IActionEventListener& listener); + + virtual void OnActionPerformed(const Tizen::Ui::_Control& source, int actionId); + + +private: + result CheckItemValidate(const HeaderItem& item); + + result CheckItemExceed(const HeaderItem& item); + + ToolbarStyle ConvertHeaderStyle(HeaderStyle style); + + _Button* ConvertButtonItem(const ButtonItem& buttonItem); + + _Button* ConvertHeaderItem(const HeaderItem& headerItem); + + ButtonItemStatus ConvertButtonItemStatus(_ButtonStatus status) const; + + HeaderItemStatus ConvertHeaderItemStatus(_ButtonStatus status) const; + + _ButtonStatus ConvertButtonStatus(ButtonItemStatus status) const; + + _ButtonStatus ConvertButtonStatus(HeaderItemStatus status) const; + + _HeaderImpl(const _HeaderImpl&); + + _HeaderImpl& operator =(const _HeaderImpl&); + + +private: + HeaderStyle __style; + + _PublicActionEvent* __pPublicActionEvent; + + //bool __calledBySetItemSelected; +}; + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_HEADER_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_HeaderItemImpl.h b/src/ui/inc/FUiCtrl_HeaderItemImpl.h new file mode 100644 index 0000000..76d2f04 --- /dev/null +++ b/src/ui/inc/FUiCtrl_HeaderItemImpl.h @@ -0,0 +1,88 @@ +// +// 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_HeaderItemImpl.h + * @brief This is the header file for the %_HeaderItemImpl class. + * + * This header file contains the declarations of the %_HeaderItemImpl class. + */ + +#ifndef _FUI_CTRL_INTERNAL_HEADER_ITEM_IMPL_H_ +#define _FUI_CTRL_INTERNAL_HEADER_ITEM_IMPL_H_ + +#include +#include + + +namespace Tizen { namespace Ui { namespace Controls +{ + +static const int HEADER_ITEM_ACTION_ID_MIN = 0; +static const int HEADER_ITEM_MAX_STATE_COUNT = 5; + +class _HeaderItemImpl + : public Tizen::Base::Object +{ +public: + _HeaderItemImpl(HeaderItem* pPublic); + + virtual ~_HeaderItemImpl(void); + + static const _HeaderItemImpl* GetInstance(const HeaderItem& headerItem); + + static _HeaderItemImpl* GetInstance(HeaderItem& headerItem); + + result Construct(int actionId); + + int GetActionId(void) const; + + const Tizen::Graphics::Bitmap* GetBackgroundBitmap(HeaderItemStatus status) const; + + const Tizen::Graphics::Bitmap* GetIcon(HeaderItemStatus status) const; + + Tizen::Base::String GetText(void) const; + + result SetActionId(int actionId); + + result SetBackgroundBitmap(HeaderItemStatus status, const Tizen::Graphics::Bitmap* pBitmap); + + result SetIcon(HeaderItemStatus status, const Tizen::Graphics::Bitmap* pIcon); + + result SetText(const Tizen::Base::String& text); + + void SetAccessibilityHint(const Tizen::Base::String& hint); + +private: + _HeaderItemImpl(const _HeaderItemImpl& headerItem); + + _HeaderItemImpl& operator =(const _HeaderItemImpl& headerItem); + + +private: + int __actionId; + Tizen::Base::String __itemText; + Tizen::Base::String __accessibilityHint; + const Tizen::Graphics::Bitmap* __pIconBitmap[HEADER_ITEM_MAX_STATE_COUNT]; + const Tizen::Graphics::Bitmap* __pHeaderItemBackgroundBitmap[HEADER_ITEM_MAX_STATE_COUNT]; + + friend class _HeaderImpl; + +}; + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_HEADER_ITEM_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_IActionEventListener.h b/src/ui/inc/FUiCtrl_IActionEventListener.h new file mode 100644 index 0000000..82c8536 --- /dev/null +++ b/src/ui/inc/FUiCtrl_IActionEventListener.h @@ -0,0 +1,72 @@ +// +// 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_IActionEventListener.h + * @brief This is the header file for the _IActionEventListener class. + * + * This header file contains the declarations of the _IActionEventListener class. @n + * If an action event is generated, a method of this class is called. + * So, if the application does some jobs related to the action event, use the methods of this class. + * + */ +#ifndef _FUI_CTRL_INTERNAL_IACTION_EVENT_LISTENER_H_ +#define _FUI_CTRL_INTERNAL_IACTION_EVENT_LISTENER_H_ + +#include +#include + +namespace Tizen { namespace Ui +{ +class _Control; +} } // Tizen::Ui + +namespace Tizen {namespace Ui { namespace Controls +{ +/** + * @interface _IActionEventListener + * @brief This interface implements the listener for _action event. + * @since 2.0 + * + * The listener interface for receiving the action events. The class that processes an action event + * implements this interface, and the object created with that class is registered with a _control, using the _control's + * AddActionEventListener() method. When the action event occurs, the OnActionPerformed() method of that object is invoked. + */ +class _IActionEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~_IActionEventListener(void) {} + + /** + * Notifies when an action event occurs. + * + * @since 2.0 + * @param[in] source The source of the event + * @param[in] actionId The information about the action event + */ + virtual void OnActionPerformed(const Tizen::Ui::_Control& source, int actionId) = 0; + +}; // _IActionEventListener + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_IACTION_EVENT_LISTENER_H_ diff --git a/src/ui/inc/FUiCtrl_IAdjustmentEventListener.h b/src/ui/inc/FUiCtrl_IAdjustmentEventListener.h new file mode 100644 index 0000000..7897b17 --- /dev/null +++ b/src/ui/inc/FUiCtrl_IAdjustmentEventListener.h @@ -0,0 +1,75 @@ +// +// 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_IAdjustmentEventListener.h + * @brief This is the header file for the _IAdjustmentEventListener class. + * + * This header file contains the declarations of the _IAdjustmentEventListener class. + * If a change event is generated, a method of this class is called. + * So, if applications do jobs related to change events, use the methods of this class. + * + */ +#ifndef _FUI_CTRL_INTERNAL_IADJUSTMENT_EVENT_LISTENER_H_ +#define _FUI_CTRL_INTERNAL_IADJUSTMENT_EVENT_LISTENER_H_ + +#include +#include + +namespace Tizen { namespace Ui +{ +class _Control; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ +/** + * @interface _IAdjustmentEventListener + * @brief This interface implements the listener for adjustment events. + * @since 2.0 + * + * The _IAdjustmentEventListener interface receives adjustment events which are fired when the knob of a Slider moves. The class that is + * interested in processing an adjustment event implements this interface, and the object created with that class + * is registered with a UI control, using the control's AddAdjustmentEventListener() method. When adjustment event occurs, + * the object's OnAdjustmentValueChanged() method is invoked. + */ +class _IAdjustmentEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +// Operation +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~_IAdjustmentEventListener(void) {} + + /** + * Notifies when a change event occurs. + * + * @since 2.0 + * @param[in] source The source of the event + * @param[in] adjustment The adjustment value + */ + virtual void OnAdjustmentValueChanged(const Tizen::Ui::_Control& source, int adjustment) = 0; + +}; // _IAdjustmentEventListener + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_IADJUSTMENT_EVENT_LISTENER_H_ diff --git a/src/ui/inc/FUiCtrl_IAnimationEventListener.h b/src/ui/inc/FUiCtrl_IAnimationEventListener.h new file mode 100644 index 0000000..b40d07d --- /dev/null +++ b/src/ui/inc/FUiCtrl_IAnimationEventListener.h @@ -0,0 +1,72 @@ +// +// 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_IAnimationEventListener.h + * @brief This is the header file for the _IAnimationEventListener class. + * + * This header file contains the declarations of the _IAnimationEventListener class. @n + * If an animation event is generated, a method of this class is called. + * So, if the application does some jobs related to the animation event, use the methods of this class. + * + */ +#ifndef _FUI_CTRL_INTERNAL_IANIMATION_EVENT_LISTENER_H_ +#define _FUI_CTRL_INTERNAL_IANIMATION_EVENT_LISTENER_H_ + +#include +#include + +namespace Tizen { namespace Ui +{ +class _Control; +}} // Tizen::Ui + +namespace Tizen {namespace Ui { namespace Controls +{ +/** + * @interface _IAnimationEventListener + * @brief This interface implements the listener for animation event. + * @since 2.1 + * + * The listener interface for receiving the animation events. The class that processes an animation event + * implements this interface, and the object created with that class is registered with a _control, using the _control's + * AddAnimationEventListener() method. When the animation event occurs, the OnAnimationStopped() method of that object is invoked. + */ +class _IAnimationEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~_IAnimationEventListener(void) {} + + /** + * Notifies when an animation event occurs. + * + * @since 2.0 + * @param[in] source The source of the event + */ + virtual void OnAnimationStopped(const Tizen::Ui::_Control& source) = 0; + +}; // _IAnimationEventListener + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_IANIMATION_EVENT_LISTENER_H_ diff --git a/src/ui/inc/FUiCtrl_IColorChangeEventListener.h b/src/ui/inc/FUiCtrl_IColorChangeEventListener.h new file mode 100644 index 0000000..76fd696 --- /dev/null +++ b/src/ui/inc/FUiCtrl_IColorChangeEventListener.h @@ -0,0 +1,78 @@ +// +// 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_IColorChangeEventListener.h + * @brief This is the header file for the _IColorChangeEventListener class. + * + * This header file contains the declarations of the _IColorChangeEventListener class. + * If a change event is generated, a method of this class is called. + * So, if applications do jobs related to change events, use the methods of this class. + * + */ +#ifndef _FUI_CTRL_INTERNAL_ICOLOR_CHANGE_EVENT_LISTENER_H_ +#define _FUI_CTRL_INTERNAL_ICOLOR_CHANGE_EVENT_LISTENER_H_ + +#include +#include + +namespace Tizen { namespace Ui +{ +class _Control; +}} // Tizen::Ui + +namespace Tizen { namespace Graphics +{ +class Color; +}} // Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace Controls +{ +/** + * @interface _IColorChangeEventListener + * @brief This interface implements the listener for color change events. + * @since 2.1 + * + * This is the listener interface for receiving color change events. The class that processes a color change event + * implements this interface, and the object created with that class is registered with a UI control, using the control's + * AddColorChangeEventListener() method. When the color change event occurs, the object's OnColorChanged() method is invoked. + */ +class _IColorChangeEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +// Operation +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~_IColorChangeEventListener(void) {} + + /** + * Notifies when there is a change in Color. The color instance is passed as an input parameter. + * + * @since 2.0 + * @param[in] source The source of the event + * @param[in] color The color + */ + virtual void OnColorChanged(const Tizen::Ui::_Control& source, const Tizen::Graphics::Color& color) = 0; +}; // _IColorChangeEventListener + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_ICOLOR_CHANGE_EVENT_LISTENER_H_ diff --git a/src/ui/inc/FUiCtrl_IContextMenuPresenter.h b/src/ui/inc/FUiCtrl_IContextMenuPresenter.h new file mode 100644 index 0000000..e76b5e8 --- /dev/null +++ b/src/ui/inc/FUiCtrl_IContextMenuPresenter.h @@ -0,0 +1,116 @@ +// +// 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_IContextMenuPresenter.h + * @brief This is the header file for the _ContextMenuListPresenter class. + * + * This header file contains the declarations of the %_ContextMenuListPresenter class. + */ +#ifndef _FUI_CTRL_INTERNAL_ICONTEXTMENU_PRESENTER_H_ +#define _FUI_CTRL_INTERNAL_ICONTEXTMENU_PRESENTER_H_ + +#include +#include +#include +#include +#include +#include "FUi_Control.h" +#include "FUiCtrl_ContextMenu.h" +#include "FUiAnim_VisualElement.h" + +namespace Tizen { namespace Ui +{ +namespace Controls +{ + +class _ContextMenu; +class _ListItem; +class _ContextMenuItem; + +struct _ContextMenuItemInfo +{ + bool bListItem; + _ListItem* pListItem; + _ContextMenuItem* pContextMenuItem; +}; + +/** + * @class _IContextMenuPresenter + * @brief + * @since 2.0 + * + * + * + * + */ +class _IContextMenuPresenter +{ +// Lifecycle +public: + virtual ~_IContextMenuPresenter(void) {} + +// Operation +public: + virtual result Install(void) = 0; + virtual result Draw(void) = 0; + virtual result DrawBackground(Tizen::Graphics::Canvas* pCanvas) = 0; + virtual result DrawArrow(Tizen::Graphics::Canvas* pCanvas) = 0; + virtual result AddItem(const Base::String& text, int actionId, const Tizen::Graphics::Bitmap* normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap) = 0; + 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) = 0; + 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) = 0; + virtual result DeleteItem(int index) = 0; + virtual result DeleteItemAll(void) = 0; + virtual int CalculateShowItemCount(void) = 0; + virtual result CalculateWindowRect(void) = 0; + virtual result ApplyColorProperty(void) = 0; + + virtual _UiTouchEventDelivery OnPreviewTouchPressed(const _Control& source, const _TouchInfo& touchinfo) = 0; + virtual _UiTouchEventDelivery OnPreviewTouchMoved(const _Control& source, const _TouchInfo& touchinfo) = 0; + virtual _UiTouchEventDelivery OnPreviewTouchReleased(const _Control& source, const _TouchInfo& touchinfo) = 0; + virtual _UiTouchEventDelivery OnPreviewTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) = 0; + + virtual bool OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) = 0; + virtual bool OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) = 0; + virtual bool OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) = 0; + virtual bool OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) = 0; + + // Focus Ui + virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) { return false; }; + virtual bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) { return false; }; + 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; + + virtual void SetAllAccessibilityElement(void) = 0; + + 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, bool isAppBitmap = false) = 0; +}; //_IContextMenuPresenter + +} // Control +}} // Tizen::Ui + +#endif //_FUI_CTRL_INTERNAL_ICONTEXTMENU_PRESENTER_H_ diff --git a/src/ui/inc/FUiCtrl_ICustomElement.h b/src/ui/inc/FUiCtrl_ICustomElement.h new file mode 100644 index 0000000..a606811 --- /dev/null +++ b/src/ui/inc/FUiCtrl_ICustomElement.h @@ -0,0 +1,44 @@ +// +// 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_ICustomElement.h + * @brief This is the header file for the _ICustomElement Interface. + * + * This header file contains the declarations of the _ICustomElement Interface. + */ + +#ifndef _FUI_CTRL_INTERNAL_ICUSTOM_ELEMENT_H +#define _FUI_CTRL_INTERNAL_ICUSTOM_ELEMENT_H + +#include +#include "FUiCtrl_ListViewTypes.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _ICustomElement +{ +public: + virtual ~_ICustomElement(void) {} + + virtual bool DrawElement(Tizen::Graphics::Canvas* pCanvas, Tizen::Graphics::FloatRectangle& rect, ListViewItemDrawingStatus status) = 0; +}; + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_ICUSTOM_ELEMENT_H diff --git a/src/ui/inc/FUiCtrl_IDateTimeChangeEventListener.h b/src/ui/inc/FUiCtrl_IDateTimeChangeEventListener.h new file mode 100644 index 0000000..4fb2a3d --- /dev/null +++ b/src/ui/inc/FUiCtrl_IDateTimeChangeEventListener.h @@ -0,0 +1,85 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiCtrl_IDateTimeChangeEventListener.h + * @brief This is the header file for the _IDateTimeChangeEventListener interface. + */ + +#ifndef _FUI_CTRL_INTERNAL_IDATETIME_CHANGE_EVENT_LISTENER_H_ +#define _FUI_CTRL_INTERNAL_IDATETIME_CHANGE_EVENT_LISTENER_H_ + +// Includes +#include +#include + +namespace Tizen { namespace Ui +{ +class _Control; +}} // Tizen::Ui + +namespace Tizen {namespace Ui { namespace Controls +{ + +/** + * @interface _IDateTimeChangeEventListener + * @brief This interface implements the listener for Date and Time change events. + * @since 2.0 + * + * The listener interface for receiving date and time change events. The class that processes date and time change event + * implements this interface, and the object created with that class is registered with a UI control, using the control's + * AddDateTimeChangeEventListener() method. When the action event occurs, that instance's OnDateTimeChanged() method is invoked. + */ +class _IDateTimeChangeEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +// Operation +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~_IDateTimeChangeEventListener(void) {} + + /** + * Notifies when there is a change in DateTime . The changed values of day, month, year, hour and minute are passed as input parameters. + * + * @since 2.0 + * @param[in] source The source of the event + * @param[in] year The year value + * @param[in] month The month value + * @param[in] day The day value + * @param[in] hour The hour value + * @param[in] minute The minute value + * + */ + virtual void OnDateTimeChanged(const Tizen::Ui::_Control& source, int year, int month, int day, int hour, int minute) = 0; + + + /** + * Notifies when date and time change is canceled. + * + * @since 2.0 + * @param[in] source The source of the event + */ + virtual void OnDateTimeChangeCanceled(const Tizen::Ui::_Control& source) = 0; +}; + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_IDATETIME_CHANGE_EVENT_LISTENER_H_ diff --git a/src/ui/inc/FUiCtrl_IEditCopyPasteEventListener.h b/src/ui/inc/FUiCtrl_IEditCopyPasteEventListener.h new file mode 100644 index 0000000..7bac391 --- /dev/null +++ b/src/ui/inc/FUiCtrl_IEditCopyPasteEventListener.h @@ -0,0 +1,78 @@ +// +// 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_IEditCopyPasteEventListener.h + * @brief This is the header file for the _IEditCopyPasteEventListener class. + * + * This header file contains the declarations of the %_IEditCopyPasteEventListener class. + */ + +#ifndef _FUI_CTRL_INTERNAL_IEDIT_COPY_PASTE_EVENT_LISTENER_H_ +#define _FUI_CTRL_INTERNAL_IEDIT_COPY_PASTE_EVENT_LISTENER_H_ + +// includes +#include + +// namespace declaration +namespace Tizen { namespace Ui { namespace Controls +{ + +enum CoreCopyPasteStatus +{ + CORE_COPY_PASTE_STATUS_HIDE = 0, + CORE_COPY_PASTE_STATUS_SHOW, + CORE_COPY_PASTE_STATUS_MAX +}; + +enum CoreCopyPasteAction +{ + CORE_COPY_PASTE_ACTION_SELECT = 0, + CORE_COPY_PASTE_ACTION_SELECT_ALL, + CORE_COPY_PASTE_ACTION_COPY, + CORE_COPY_PASTE_ACTION_CUT, + CORE_COPY_PASTE_ACTION_PASTE, + CORE_COPY_PASTE_ACTION_SEARCH, + CORE_COPY_PASTE_ACTION_CLIPBOARD +}; + +/** + * @interface _IEditCopyPasteEventListener + * @brief This interface implements the listener for CopyPaste events. + * @since 2.0 + * + * The _IEditCopyPasteEventListener interface enables the implementer to receive the + * CopyPaste related events. + */ +class _IEditCopyPasteEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +// Lifecycle +public: + /** + * This is the destructor for this class. + * @since 2.0 + */ + virtual ~_IEditCopyPasteEventListener(void) {} + +public: + + virtual void OnEditCopyPasteStatusChanged(Tizen::Ui::Controls::CoreCopyPasteStatus status, Tizen::Ui::Controls::CoreCopyPasteAction action) = 0; +}; // _IEditCopyPasteEventListener + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_IEDIT_COPY_PASTE_EVENT_LISTENER_H_ diff --git a/src/ui/inc/FUiCtrl_IEditTextFilter.h b/src/ui/inc/FUiCtrl_IEditTextFilter.h new file mode 100644 index 0000000..e39e14b --- /dev/null +++ b/src/ui/inc/FUiCtrl_IEditTextFilter.h @@ -0,0 +1,120 @@ +// +// 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_IEditTextFilter.h + * @brief This is the header file for the %_IEditTextFilter interface. + * + * This header file contains the declarations of the %_IEditTextFilter interface. + * + */ +#ifndef _FUI_CTRL_INTERNAL_IEDIT_TEXT_FILTER_H_ +#define _FUI_CTRL_INTERNAL_IEDIT_TEXT_FILTER_H_ + +#include + +namespace Tizen {namespace Ui { namespace Controls +{ + +/** + * @interface _IEditTextFilter + * @brief This interface defines the text filter. + * + * @since 2.1 + * + * The %_IEditTextFilter interface is the listener interface for handling texts, for example, from EditFields. + * The class that processes a text event implements this interface, and the instance created with that class is registered with a + * UI control, using the control's SetEditTextFilter() method. + * + */ + +class _OSP_EXPORT_ _IEditTextFilter +{ +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. + * + * @since 2.1 + */ + virtual ~_IEditTextFilter(void) {} + + /** + * Checks whether the pasted text by the %Clipboard must be replaced + * + * @since 2.1 + * + * @return @c true if the pasted text needs to be replaced, @n + * else @c false + * @param[in] pastedText The pasted text + * @param[out] replacedText The user-defined replacement text + */ + virtual bool ValidatePastedText(const Tizen::Base::String& pastedText, Tizen::Base::String& replacedText) = 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 _IEditTextFilter_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 _IEditTextFilter_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 _IEditTextFilter_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 _IEditTextFilter_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 _IEditTextFilter_Reserved5(void) {} +}; // _IEditTextFilter + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_IEDIT_TEXT_FILTER_H_ + + diff --git a/src/ui/inc/FUiCtrl_IExpandableEditAreaEventListener.h b/src/ui/inc/FUiCtrl_IExpandableEditAreaEventListener.h new file mode 100644 index 0000000..700c3f6 --- /dev/null +++ b/src/ui/inc/FUiCtrl_IExpandableEditAreaEventListener.h @@ -0,0 +1,84 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +/** + * @file FUiCtrl_IExpandableEditAreaEventListener.h + * @brief This is the header file for the _IExpandableEditAreaEventListener class. + * + * This header file contains the declarations of the _IExpandableEditAreaEventListener class. @n + * If an action event is generated, a method of this class is called. + * So, if the application does some jobs related to the action event, use the methods of this class. + * + */ +#ifndef _FUICTRL_INTERNAL_IEXPANDABLE_EDITAREA_EVENT_LISTENER_H_ +#define _FUICTRL_INTERNAL_IEXPANDABLE_EDITAREA_EVENT_LISTENER_H_ + +// Includes +#include +#include + +namespace Tizen { namespace Ui +{ +class _Control; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @interface _IExpandableEditAreaEventListener + * @brief This interface implements the listener for _kmjaction event. + * @since 2.1 + * + * The interface provides a listener to receive events related to ExpandableEditArea. + * + */ +class _IExpandableEditAreaEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ + +// Operation +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~_IExpandableEditAreaEventListener(void) {} + +public: + /** + * Notifies the application that a new line is added to ExpandableEditArea. + * + * @since 2.0 + * @param[in] source The source of the event + * @param[in] newLineCount The new line count + */ + virtual void OnExpandableEditAreaLineAdded(const Tizen::Ui::_Control& source, int newLineCount) = 0; + + /** + * Notifies the application that a line is removed from ExpandableEditArea. + * + * @since 2.0 + * @param[in] source The source of the event + * @param[in] newLineCount The new line count + */ + virtual void OnExpandableEditAreaLineRemoved(const Tizen::Ui::_Control& source, int newLineCount) = 0; +}; // _IExpandableEditAreaEventListener + +}}} // Tizen::Ui::Controls + +#endif // _FUICTRL_INTERNAL_IEXPANDABLE_EDITAREA_EVENT_LISTENER_H_ diff --git a/src/ui/inc/FUiCtrl_IFastScrollListener.h b/src/ui/inc/FUiCtrl_IFastScrollListener.h new file mode 100644 index 0000000..2914de2 --- /dev/null +++ b/src/ui/inc/FUiCtrl_IFastScrollListener.h @@ -0,0 +1,89 @@ +// +// 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_IFastScrollListener.h + * @brief This is the header file for _IUiFastScrollListener class. + * + * This header file contains declarations of IFastScrollListener class. + * If item event is generated, a method of this class will be called. + * Applications that do some jobs related to item event, they call methods of this class. + * + */ +#ifndef _FUICTRL_INTERNAL_IFASTSCROLL_LISTENER_H_ +#define _FUICTRL_INTERNAL_IFASTSCROLL_LISTENER_H_ + +// Includes +#include +#include +#include "FUiCtrl_FastScrollIndex.h" + +namespace Tizen { namespace Ui +{ +class _Control; +} } + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @interface IFastScrollListener + * @brief This interface implements the listener for fast scroll event. + * @since 2.0 + * + * IFastScrollListerer is an interface which implements a listener for receiving fast scroll events. + * The class that is interested in processing a fast scroll implements this interface, + * and the object created with that class is registered with a UI control, using the control's + * AddFastScrollListener method. When the item event occurs, that object's OnFastScrollIndexChanged method is invoked. + */ +class _IUiFastScrollListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +// Operation +public: + /** + * This is the destructor for this class. + * @since 2.0 + */ + virtual ~_IUiFastScrollListener(void) {} + + /** + * Notifies when an index is selected. + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] index The index + * @remark When the search icon index is enabled, you can check whether the search icon index is touched by comparing @c index @n + * with the string constant FAST_SCROLL_SEARCH_ICON_INDEX_STRING. + * + */ + virtual void OnUiFastScrollIndexSelected(Tizen::Ui::_Control& source, Tizen::Ui::Controls::_FastScrollIndex& index) = 0; + +protected: + // reserved virtual methods for later extension + /* + Following methods are reserved and may change its name at any time without prior notice. + */ + virtual void _IUiFastScrollListener_Reserved1(void) {} + virtual void _IUiFastScrollListener_Reserved2(void) {} + virtual void _IUiFastScrollListener_Reserved3(void) {} +}; + +}; +}; +}; + +#endif diff --git a/src/ui/inc/FUiCtrl_IFormActivationChangeEventListener.h b/src/ui/inc/FUiCtrl_IFormActivationChangeEventListener.h new file mode 100644 index 0000000..ede0498 --- /dev/null +++ b/src/ui/inc/FUiCtrl_IFormActivationChangeEventListener.h @@ -0,0 +1,65 @@ +// +// 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_IFormActivationChangeEventListener.h + * @brief This is the header file for the _IFormActivationChangeEventListener class. + * + * This header file contains the declarations of the _IFormActivationChangeEventListener class. @n + * If a Form activation is changed, a method of this class is called. @n + * So, if an application needs to perform some jobs related to the form event, + * provide the implementation of the methods declared in this interface. + */ +#ifndef _FUI_CTRL_INTERNAL_IFORM_ACTIVATION_CHANGE_EVENT_LISTENER_H_ +#define _FUI_CTRL_INTERNAL_IFORM_ACTIVATION_CHANGE_EVENT_LISTENER_H_ + +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ +class _FormImpl; + +/** + * @interface _IFormActivationChangeEventListener + * @brief This interface implements the listener for the form activation chage event. + * @since 2.0 + * + * The listener interface for receiving form activation change event. + * + */ +class _IFormActivationChangeEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +public: + /** + * This is internal. If used in an application, the application can get rejected during the certification process. + * This is the virtual destructor for this class. + * + * @since 2.0 + */ + virtual ~_IFormActivationChangeEventListener(void) {} + + 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 + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_IFORM_ACTIVATION_CHANGE_EVENT_LISTENER_H_ diff --git a/src/ui/inc/FUiCtrl_IFormBackEventListener.h b/src/ui/inc/FUiCtrl_IFormBackEventListener.h new file mode 100644 index 0000000..ffe8950 --- /dev/null +++ b/src/ui/inc/FUiCtrl_IFormBackEventListener.h @@ -0,0 +1,105 @@ +// +// 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_IFormBackEventListener.h + * @brief This is the header file for the _IFormBackEventListener interface. + * + * This header file contains the declarations of the _IFormBackEventListener interface. + */ +#ifndef _FUI_CTRL_INTERNAL_IFORM_BACK_EVENT_LISTENER_H_ +#define _FUI_CTRL_INTERNAL_IFORM_BACK_EVENT_LISTENER_H_ + +// includes +#include + +// namespace declaration +namespace Tizen { namespace Ui { namespace Controls +{ + +class _Form; + +/** + * @interface _IFormBackEventListener + * @brief This interface implements the listener for Form related events. + * @since 2.0 + * + * The %_IFormBackEventListener interface is the listener interface for receiving Form-related back button events. + * + * For more information on the class features, see Form. + */ +class _IFormBackEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +// Lifecycle +public: + /** + * This is the destructor for this class. + * @since 2.0 + */ + virtual ~_IFormBackEventListener(void) {} + +// Operation +public: + /** + * Called when the current %Form control needs to be closed to revert back to the previous %Form control. + * + * @since 2.0 + * @param[in] source The source of the event + * @remarks This event is fired when the user clicks on the software 'back' button on the Footer control, or the hardware back button on the + * device. + */ + virtual void OnFormBackRequested(Tizen::Ui::Controls::_Form& source) = 0; + +// Reserves +protected: + // + //This method is for internal use only. Using this method can cause behavioral, security-related, + //and consistency-related issues in the application. + // + // Following method is reserved and may change its name at any time without + // prior notice. + // + // @since 2.0 + // + virtual void _IFormBackEventListener_Reserved1(void) { } + + // + //This method is for internal use only. Using this method can cause behavioral, security-related, + //and consistency-related issues in the application. + // + // Following method is reserved and may change its name at any time without + // prior notice. + // + // @since 2.0 + // + virtual void _IFormBackEventListener_Reserved2(void) { } + + // + //This method is for internal use only. Using this method can cause behavioral, security-related, + //and consistency-related issues in the application. + // + // Following method is reserved and may change its name at any time without + // prior notice. + // + // @since 2.0 + // + virtual void _IFormBackEventListener_Reserved3(void) { } +}; // _IFormBackEventListener + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_IFORM_BACK_EVENT_LISTENER_H_ diff --git a/src/ui/inc/FUiCtrl_IFormMenuEventListener.h b/src/ui/inc/FUiCtrl_IFormMenuEventListener.h new file mode 100644 index 0000000..0f8df60 --- /dev/null +++ b/src/ui/inc/FUiCtrl_IFormMenuEventListener.h @@ -0,0 +1,102 @@ +// +// 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_IFormMenuEventListener.h + * @brief This is the header file for the _IFormControlEventListener interface. + * + * This header file contains the declarations of the _IFormMenuEventListener interface. + */ +#ifndef _FUI_CTRL_INTERNAL_IFORM_MENU_EVENT_LISTENER_H_ +#define _FUI_CTRL_INTERNAL_IFORM_MENU_EVENT_LISTENER_H_ + +// includes +#include + +// namespace declaration +namespace Tizen { namespace Ui { namespace Controls +{ + +class _Form; + +/** + * @interface _IFormMenuEventListener + * @brief This interface implements the listener for Form related events. + * @since 2.2 + * + * The %_IFormMenuEventListener interface is the listener interface for receiving Form-related events. + * + * For more information on the class features, see Form. + */ +class _IFormMenuEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +public: + /** + * This is the destructor for this class. + * @since 2.2 + */ + virtual ~_IFormMenuEventListener(void) {} + +public: + /** + * Called when the current %Form control needs to be control the Menu button. + * + * @since 2.2 + * @param[in] source The source of the event + * @remarks This event is fired when the user clicks on the software 'menu' button on the Footer control, or the hardware menu button on the device. + */ + virtual void OnFormMenuRequested(Tizen::Ui::Controls::_Form& 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. + // + // Following method is reserved and may change its name at any time without + // prior notice. + // + // @since 2.2 + // + virtual void _IFormMenuEventListener_Reserved1(void) { } + + // + //This method is for internal use only. Using this method can cause behavioral, security-related, + //and consistency-related issues in the application. + // + // Following method is reserved and may change its name at any time without + // prior notice. + // + // @since 2.2 + // + virtual void _IFormMenuEventListener_Reserved2(void) { } + + // + //This method is for internal use only. Using this method can cause behavioral, security-related, + //and consistency-related issues in the application. + // + // Following method is reserved and may change its name at any time without + // prior notice. + // + // @since 2.2 + // + virtual void _IFormMenuEventListener_Reserved3(void) { } +}; // _IFormControlEventListener + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_IFORM_MENU_EVENT_LISTENER_H_ diff --git a/src/ui/inc/FUiCtrl_IFrameEventListener.h b/src/ui/inc/FUiCtrl_IFrameEventListener.h new file mode 100644 index 0000000..b720fb9 --- /dev/null +++ b/src/ui/inc/FUiCtrl_IFrameEventListener.h @@ -0,0 +1,64 @@ +// +// 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_IFrameEventListener.h + * @brief This is the header file for the _IFrameEventListener class. + * + * This header file contains the declarations of the _IFrameEventListener class. @n + * If a frame lifecycle event is generated, a method of this class is called. @n + * So, if an application needs to perform some jobs related to the frame event, + * provide the implementation of the methods declared in this interface. + */ +#ifndef _FUI_CTRL_INTERNAL_IFRAME_EVENT_LISTENER_H_ +#define _FUI_CTRL_INTERNAL_IFRAME_EVENT_LISTENER_H_ + +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ +class _Frame; + +/** + * @interface _IFrameEventListener + * @brief This interface implements the listener for the frame lifecycle event. + * @since 2.0 + * + * The listener interface for receiving frame lifecycle events. + * + */ +class _IFrameEventListener + : 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. + * + * @since 2.0 + */ + virtual ~_IFrameEventListener(void) {} + + virtual void OnFrameActivated(const Tizen::Ui::Controls::_Frame& source) = 0; + virtual void OnFrameDeactivated(const Tizen::Ui::Controls::_Frame& source) = 0; + virtual void OnFrameMinimized(const Tizen::Ui::Controls::_Frame& source) = 0; + virtual void OnFrameRestored(const Tizen::Ui::Controls::_Frame& source) = 0; + +}; // _IFrameEventListener + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_IFRAME_EVENT_LISTENER_H_ diff --git a/src/ui/inc/FUiCtrl_IGalleryCoreEventListener.h b/src/ui/inc/FUiCtrl_IGalleryCoreEventListener.h new file mode 100644 index 0000000..0f32ebe --- /dev/null +++ b/src/ui/inc/FUiCtrl_IGalleryCoreEventListener.h @@ -0,0 +1,40 @@ +// +// 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. +// +#ifndef _FUI_CTRL_INTERNAL_IGALLERY_CORE_EVENT_LISTENER_H_ +#define _FUI_CTRL_INTERNAL_IGALLERY_CORE_EVENT_LISTENER_H_ + +#include + +namespace Tizen { namespace Ui { namespace Controls { + +class _GalleryItem; + +class _IGalleryCoreEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +public: + virtual ~_IGalleryCoreEventListener(void) {} + + virtual void OnCurrentItemChanged(int currentIndex) = 0; + virtual void OnItemClicked(int itemIndex) = 0; + virtual void OnSlideShowStarted(void) = 0; + virtual void OnSlideShowStopped(void) = 0; +}; // _IGalleryCoreEventListener + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_IGALLERY_CORE_EVENT_LISTENER_H_ diff --git a/src/ui/inc/FUiCtrl_IGalleryItemProvider.h b/src/ui/inc/FUiCtrl_IGalleryItemProvider.h new file mode 100644 index 0000000..f9da8f1 --- /dev/null +++ b/src/ui/inc/FUiCtrl_IGalleryItemProvider.h @@ -0,0 +1,36 @@ +// +// 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. +// +#ifndef _FUI_CTRL_INTERNAL_IGALLERY_ITEM_PROVIDER_H_ +#define _FUI_CTRL_INTERNAL_IGALLERY_ITEM_PROVIDER_H_ + +namespace Tizen { namespace Ui { namespace Controls { + +class _GalleryItem; + +class _IGalleryItemProvider +{ +public: + virtual ~_IGalleryItemProvider(void) {} + virtual _GalleryItem* CreateItem(int index) = 0; + virtual bool DeleteItem(int index, _GalleryItem* pItem) = 0; + virtual bool UnloadItem(int index, _GalleryItem* pItem) = 0; + virtual int GetItemCount(void) const = 0; +}; // _IGalleryItemProvider + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_IGALLERY_ITEM_PROVIDER_H_ diff --git a/src/ui/inc/FUiCtrl_IGalleryRenderer.h b/src/ui/inc/FUiCtrl_IGalleryRenderer.h new file mode 100644 index 0000000..17314f5 --- /dev/null +++ b/src/ui/inc/FUiCtrl_IGalleryRenderer.h @@ -0,0 +1,78 @@ +// +// 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. +// +#ifndef _FUI_CTRL_INTERNAL_IGALLERY_RENDERER_H_ +#define _FUI_CTRL_INTERNAL_IGALLERY_RENDERER_H_ + +#include +#include +#include "FUiCtrl_GalleryTypes.h" + +namespace Tizen { namespace Ui { namespace Controls { + +enum _GalleryTransitionType +{ + GALLERY_TRANSITION_DISSOLVE = 0, + GALLERY_TRANSITION_ZOOM, + GALLERY_TRANSITION_PAGE +}; + +class _GalleryBitmap; +class _IGalleryRendererNotiListener; + +class _IGalleryRenderer +{ +public: + virtual ~_IGalleryRenderer(void) {} + + virtual result AddNotiListener(const _IGalleryRendererNotiListener& notiListener) = 0; + virtual result RemoveNotiListener(const _IGalleryRendererNotiListener& notiListener) = 0; + virtual result SetCanvasMaxCount(int maxCount) = 0; + virtual int GetCanvasMaxCount(void) const = 0; + virtual result SetCanvasVisibility(int canvasIndex, bool visibility) = 0; + virtual result SetCanvasShowState(int canvasIndex, bool showState) = 0; + virtual bool IsCanvasVisibility(int canvasIndex) const = 0; + virtual Tizen::Graphics::FloatRectangle GetViewRect(void) const = 0; + virtual result SetEmptyImage(const _GalleryBitmap* pImage) = 0; + virtual result SetEmptyText(const Tizen::Base::String& pText) = 0; + virtual result EnableEmptyView(void) = 0; + virtual result DisableEmptyView(void) = 0; + virtual result SetCanvasImage(int canvasIndex, const _GalleryBitmap* pImage + , _GalleryVerticalAlignment imageVerticalAlignment, _GalleryHorizontalAlignment imageHorizontalAlignment + , _GalleryFittingType fittingType) = 0; + virtual result SetCanvasBounds(int canvasIndex, const Tizen::Graphics::FloatRectangle& bounds, + const _GalleryAnimationTiming* pAnimation = null) = 0; + virtual Tizen::Graphics::FloatRectangle GetCanvasBounds(int canvasIndex) const = 0; + virtual Tizen::Graphics::FloatRectangle GetCanvasAlignBoundary(int canvasIndex) const = 0; + virtual result SetCanvasImageBounds(int canvasIndex, const Tizen::Graphics::FloatRectangle& bounds) = 0; + virtual Tizen::Graphics::FloatRectangle GetCanvasImageBounds(int canvasIndex) const = 0; + virtual result RunCanvasTransition(int startCanvasIndex, int endCanvasIndex, _GalleryTransitionType transition, + const _GalleryAnimationTiming* pAnimation = null) = 0; + virtual void StopAllCanvasAnimation(void) = 0; + virtual bool IsRunningCanvasTransition(void) const = 0; + virtual bool IsRunningCanvasAnimation(void) const = 0; + virtual bool IsExposed(void) const = 0; + virtual result RefreshView(void) = 0; + virtual result ReleaseAllCanvasResource(void) = 0; + virtual result ResetAllCanvas(void) = 0; + virtual result InitializeCanvasBounds(void) = 0; + virtual result Draw(void) = 0; + virtual void GalleryBoundsChanged(int currentCanvasIndex) = 0; +}; // _IGalleryRenderer + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_IGALLERY_RENDERER_H_ diff --git a/src/ui/inc/FUiCtrl_IGalleryRendererNotiListener.h b/src/ui/inc/FUiCtrl_IGalleryRendererNotiListener.h new file mode 100644 index 0000000..f6934d2 --- /dev/null +++ b/src/ui/inc/FUiCtrl_IGalleryRendererNotiListener.h @@ -0,0 +1,39 @@ +// +// 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. +// +#ifndef _FUI_CTRL_INTERNAL_IGALLERY_RENDERER_NOTI_LISTENER_H_ +#define _FUI_CTRL_INTERNAL_IGALLERY_RENDERER_NOTI_LISTENER_H_ + +#include + +namespace Tizen { namespace Ui { namespace Controls { + +class _IGalleryRendererNotiListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +public: + virtual ~_IGalleryRendererNotiListener(void) {} + + virtual void OnTransitionCancel(void) = 0; + virtual void OnTransitionCompleted(void) = 0; + virtual void OnCanvasAnimationCancel(void) = 0; + virtual void OnCanvasAnimationCompleted(void) = 0; + virtual void OnCanvasAnimationStarted(void) = 0; +}; // _IGalleryRendererNotiListener + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_IGALLERY_RENDERER_NOTI_LISTENER_H_ diff --git a/src/ui/inc/FUiCtrl_IIconListItemEventListener.h b/src/ui/inc/FUiCtrl_IIconListItemEventListener.h new file mode 100644 index 0000000..b6c685e --- /dev/null +++ b/src/ui/inc/FUiCtrl_IIconListItemEventListener.h @@ -0,0 +1,66 @@ +// +// 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_IIconListItemEventListener.h + * @brief This is the header file for the _IIconListItemEventListener class. + * + * This header file contains the declarations of the _IIconListItemEventListener class. @n + * If an item event is generated, a method of this class is called. @n + * So, if an application does some jobs related to the item event, use the methods of this class. + */ + +#ifndef _FUI_CTRL_INTERNAL_IICONLISTITEM_EVENT_LISTENER_H_ +#define _FUI_CTRL_INTERNAL_IICONLISTITEM_EVENT_LISTENER_H_ + +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _IconListViewItemEventArg; + +/** + * @interface _IIconListItemEventListener + * @brief This interface implements the listener for the item event. + * @since 2.0 + * + * The listener interface for receiving item events. The class that processes an item event + * implements this interface, and the instance created with that class is registered with a UI control, using the control's + * AddIIconListViewItemEventListener() method. When the item event occurs, the OnItemStateChanged() method of that instance is invoked. + */ +class _IIconListItemEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~_IIconListItemEventListener(void) {} + + virtual void OnIconListItemStateChanged(_IconListViewItemEventArg* pArg) = 0; + + virtual void OnIconListViewOverlayBitmapSelected(_IconListViewItemEventArg* pArg) {} + + virtual void OnIconListViewItemReordered(_IconListViewItemEventArg* pArg) {} +}; //_IIconListItemEventListener + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_IICONLISTITEM_EVENT_LISTENER_H_ diff --git a/src/ui/inc/FUiCtrl_IInputPadEventListener.h b/src/ui/inc/FUiCtrl_IInputPadEventListener.h new file mode 100644 index 0000000..dc88f74 --- /dev/null +++ b/src/ui/inc/FUiCtrl_IInputPadEventListener.h @@ -0,0 +1,76 @@ +// +// 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 FUiCtrlIInputPadEventListener.h + * @brief This is the header file for the IInputPadEventListener class. + * + * This header file contains the declarations of the IInputPadEventListener class. + * If a change event is generated, a method of this class is called. + * Applications that do jobs related to change events call the methods of this class. + * + */ + +#ifndef _FUI_CTRL_INTERNAL_IINPUTPAD_EVENT_LISTENER_H_ +#define _FUI_CTRL_INTERNAL_IINPUTPAD_EVENT_LISTENER_H_ + +#include +#include + +namespace Tizen { namespace Ui +{ +class _Control; +} } + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @interface IInputPadEventListener + * @brief This interface implements a listener for InputPadPanel events. + * @since 2.0 + * + * The interface implements a listener for receiving changes to the Control's the behavior of the InputPad. + * The class that displays and controls InputPad implements this interface, and the instance created with + * that class is registered with a UI control, using the control's AddInputPadEventListener() method. + */ +class _IInputPadEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + * + */ + virtual ~_IInputPadEventListener(void) {} + + /** + * Notifies when the InputPad reached on one of top, bottom, left or right end + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] inputPadReturnValue The return value + */ + virtual void OnInputPadValueChanged(const Tizen::Ui::_Control& source, int inputPadReturnValue) = 0; +}; // _IInputPadEventListener + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_IINPUTPAD_EVENT_LISTENER_H_ diff --git a/src/ui/inc/FUiCtrl_IKeypadEventListener.h b/src/ui/inc/FUiCtrl_IKeypadEventListener.h new file mode 100644 index 0000000..f42165a --- /dev/null +++ b/src/ui/inc/FUiCtrl_IKeypadEventListener.h @@ -0,0 +1,135 @@ +// +// 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_IKeypadEventListener.h + * @brief This is the header file for the _IKeypadEventListener interface. + * + * This header file contains the declarations of the _IKeypadEventListener interface. + */ +#ifndef _FUI_CTRL_INTERNAL_IKEYPAD_EVENT_LISTENER_H_ +#define _FUI_CTRL_INTERNAL_IKEYPAD_EVENT_LISTENER_H_ + +// includes +#include +#include + +namespace Tizen { namespace Graphics +{ +class Dimension; +}} // Tizen::Graphics + +namespace Tizen { namespace Ui +{ +class _Control; +}} // Tizen::Ui + +// namespace declaration +namespace Tizen { namespace Ui { namespace Controls +{ + +enum CoreKeypadAction +{ + CORE_KEYPAD_ACTION_ENTER, /**< The enter key */ + CORE_KEYPAD_ACTION_GO, /**< The Go key */ + CORE_KEYPAD_ACTION_NEXT, /**< The Next key */ + CORE_KEYPAD_ACTION_SEND, /**< The Send key */ + CORE_KEYPAD_ACTION_SEARCH, /**< The Search key */ + CORE_KEYPAD_ACTION_LOGIN, /**< The Login key */ + CORE_KEYPAD_ACTION_SIGN_IN, /**< The Sign-In key */ + CORE_KEYPAD_ACTION_JOIN, /**< The Join key */ + CORE_KEYPAD_ACTION_DONE /**< The Done key */ +}; +/** + * @interface _IKeypadEventListener + * @brief This interface implements the listener for keypad events. + * @since 2.0 + * + * The _IKeypadEventListener interface enables the implementer to receive the + * software keypad related events. + */ +class _IKeypadEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +// Lifecycle +public: + /** + * This is the destructor for this class. + * @since 2.0 + */ + virtual ~_IKeypadEventListener(void) {} + + +// Operation +public: + /** + * Notifies that the keypad is about to be shown on the screen. + * + * @since 2.0 + * @param[in] source The source of the event + * @remarks When the software keypad appears on screen, the current Form's + * client area is adjusted to account for the space that is taken + * up by the software keypad. + * @see Tizen::Ui::Controls::Form::GetClientAreaBounds() + */ + virtual void OnKeypadWillOpen(void) = 0; + + /** + * Notifies that the keypad is shown on the screen. + * + * @since 2.0 + * @param[in] source The source of the event + * @remarks When the software keypad appears on screen, the current Form's + * client area is adjusted to account for the space that is taken + * up by the software keypad. + * @see Tizen::Ui::Controls::Form::GetClientAreaBounds() + */ + virtual void OnKeypadOpened(void) = 0; + + /** + * Notifies that the keypad is hidden from the screen. + * + * @since 2.0 + * @param[in] source The source of the event + * @see Tizen::Ui::Controls::Form::GetClientAreaBounds() + */ + virtual void OnKeypadClosed(void) = 0; + + /** + * Notifies that the keypad bounds is changed, for instance when the predictive text@n + * which is located in the upper side of the keypad is shown. + * + * @since 2.0 + * + * @param[in] source The source of the event + * @see Tizen::Ui::Controls::Form::GetClientAreaBounds() + */ + virtual void OnKeypadBoundsChanged(void) = 0; + + /** + * Notifies that the keypad action button is pressed. + * + * @since 2.0 + * @param[in] source The source of the event + * @param[in] keypadAction The keypad action + * @see KeypadAction + */ + virtual void OnKeypadActionPerformed(CoreKeypadAction keypadAction) = 0; +}; // _IKeypadEventListener + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_IKEYPAD_EVENT_LISTENER_H_ diff --git a/src/ui/inc/FUiCtrl_ILanguageEventListener.h b/src/ui/inc/FUiCtrl_ILanguageEventListener.h new file mode 100644 index 0000000..9bf27cd --- /dev/null +++ b/src/ui/inc/FUiCtrl_ILanguageEventListener.h @@ -0,0 +1,89 @@ +// +// 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_ILanguageEventListener.h + * @brief This is the header file for the _ILanguageEventListener class. + * + * This header file contains the declarations of the _ILanguageEventListener class. + */ + +#ifndef _FUI_CTRL_INTERNAL_ILANGUAGE_EVENT_LISTENER_H_ +#define _FUI_CTRL_INTERNAL_ILANGUAGE_EVENT_LISTENER_H_ + +// Includes +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @if PRIVCORE + * This is internal. If used in an application, the application can get rejected during the certification process. + * @interface ILanguageEventListener + * @brief This interface implements the listener for the language event. + * @since 2.0 + * + * The ILanguageEventListener interface receives language events. The class that processes a language event + * implements this interface, and the instance created with that class is registered with a UI control, using the control's + * AddLanguageEventListener() method. @n + * + * When the current input language is changed (for example, when the user toggles the input language from the virtual +* keypad, the listener's OnLanguageChanged() method is +* invoked. + */ + +class _ILanguageEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ + +// Operation + +public: + /** + * @if PRIVCORE + * This is the default constructor for this class. + * + * @since 2.0 + */ + _ILanguageEventListener(void) {}; + + /** + * @if PRIVCORE + * This is internal. If used in an application, the application can get rejected during the certification process. + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~_ILanguageEventListener(void) {} + + /** + * @if PRIVCORE + * Notifies when the input language is changed. + * + * @since 2.0 + * @param[in] source The source of the event + * @param[in] previousLanguage The previous input language + * @param[in] currentLanguage The current input language + */ + virtual void OnLanguageChanged(Tizen::Locales::LanguageCode oldLanguage, Tizen::Locales::LanguageCode newLanguage) = 0; +}; // _ILanguageEventListener + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_ILANGUAGE_EVENT_LISTENER_H_ diff --git a/src/ui/inc/FUiCtrl_IListItemCommon.h b/src/ui/inc/FUiCtrl_IListItemCommon.h new file mode 100644 index 0000000..d1d75fc --- /dev/null +++ b/src/ui/inc/FUiCtrl_IListItemCommon.h @@ -0,0 +1,83 @@ +// +// 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_IListItemCommon.h + * @brief This is the header file for the _IListItemCommon Interface. + * + * This header file contains the declarations of the _IListItemCommon interface. + */ + +#ifndef _FUI_CTRL_INTERNAL_ILIST_ITEM_COMMON_H_ +#define _FUI_CTRL_INTERNAL_ILIST_ITEM_COMMON_H_ + +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +enum ListItemState +{ + LIST_ITEM_STATE_NORMAL = 0, + LIST_ITEM_STATE_PRESSED, + LIST_ITEM_STATE_HIGHLIGHTED, + LIST_ITEM_STATE_REORDERED, + LIST_ITEM_STATE_MAX +}; + +enum ListItemType +{ + LIST_ITEM_TYPE_SIMPLE = 0, + LIST_ITEM_TYPE_CUSTOM, + LIST_ITEM_TYPE_GROUP_TITLE +}; + +class _IListItemCommon +{ +public: + virtual ~_IListItemCommon(void) {}; + + virtual void SetChecked(bool checked) = 0; + + virtual bool IsChecked(void) const = 0; + + virtual void SetItemEnabled(bool enabled) = 0; + + virtual bool IsItemEnabled(void) const = 0; + + virtual bool IsReorderMode(void) const = 0; + + virtual void SetReorderMode(bool enabled) = 0; + + virtual void SetItemChanged(bool changed) = 0; + + virtual bool IsItemChanged(void) const = 0; + + virtual void SetAppInfo(const void* pAppInfo) = 0; + + virtual void* GetAppInfo(void) const = 0; + + virtual void SetItemIndex(int groupIndex, int itemIndex) {} + + virtual void GetItemIndex(int& groupIndex, int& itemIndex) const {} + +}; // _IListItemCommon + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_ILIST_ITEM_COMMON_H_ + diff --git a/src/ui/inc/FUiCtrl_IListItemProviderAdaptor.h b/src/ui/inc/FUiCtrl_IListItemProviderAdaptor.h new file mode 100644 index 0000000..090c286 --- /dev/null +++ b/src/ui/inc/FUiCtrl_IListItemProviderAdaptor.h @@ -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 FUiCtrl_IListItemProviderAdaptor.h + * @brief This is the header file for the _IListItemProviderAdaptor Interface. + * + * This header file contains the declarations of the + * _IListItemProviderAdaptor Interface. + */ + + +#ifndef _FUI_CTRL_INTERNAL_ILIST_ITEM_PROVIDER_ADAPTOR_H_ +#define _FUI_CTRL_INTERNAL_ILIST_ITEM_PROVIDER_ADAPTOR_H_ + +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _IListItemCommon; + +class _IListItemProviderAdaptor +{ +public: + virtual ~_IListItemProviderAdaptor(void) {} + + virtual _IListItemCommon* LoadItem(int groupIndex, int itemIndex) = 0; + + virtual result UnloadItem(_IListItemCommon* pListItem, int groupIndex, int itemIndex) = 0; + + virtual result DeleteItem(_IListItemCommon* pListItem, int groupIndex, int itemIndex) = 0; + + virtual int GetItemCount(int groupIndex = 0) const = 0; + + virtual int GetGroupCount(void) const = 0; +}; // _IListItemProviderAdaptor + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_ILIST_ITEM_PROVIDER_ADAPTOR_H_ diff --git a/src/ui/inc/FUiCtrl_IProgressPopupEventListener.h b/src/ui/inc/FUiCtrl_IProgressPopupEventListener.h new file mode 100644 index 0000000..ae2a30b --- /dev/null +++ b/src/ui/inc/FUiCtrl_IProgressPopupEventListener.h @@ -0,0 +1,75 @@ +// +// 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_IProgressPopupEventListener.h + * @brief This is the header file for the _IProgressPopupEventListener class. + * + * This header file contains the declarations of the _IProgressPopupEventListener class. @n + * If a closing ProgressPopup event is generated, a method of this class is called. + * So, if the application does some jobs related to the closing ProgressPopup event, use the methods of this class. + * + */ +#ifndef _FUI_CTRL_INTERNAL_IPROGRESSPOPUP_EVENT_LISTENER_H_ +#define _FUI_CTRL_INTERNAL_IPROGRESSPOPUP_EVENT_LISTENER_H_ + + +#include +#include + + +namespace Tizen { namespace Ui +{ +class _Control; +} } // Tizen::Ui + + +namespace Tizen { namespace Ui { namespace Controls +{ +/** + * @interface _IProgressPopupEventListener + * @brief This interface implements the listener for ProgressPopup event. + * @since 2.1 + * + * The listener interface for receiving event to close the ProgressPopup. 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 event to close ProgressPopup occurs, the OnCanceled() method of that object is invoked. + */ +class _IProgressPopupEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +public: + /** + * This is the destructor for this class. + * + * @since 2.1 + */ + virtual ~_IProgressPopupEventListener(void) {} + + /** + * Notifies when a ProgressPopup event occurs. + * + * @since 2.1 + * @param[in] source The source of the event + */ + virtual void OnProgressPopupCanceled(void) = 0; + +}; // _IProgressPopupEventListener + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_IPROGRESSPOPUP_EVENT_LISTENER_H_ diff --git a/src/ui/inc/FUiCtrl_IScrollEventListener.h b/src/ui/inc/FUiCtrl_IScrollEventListener.h new file mode 100644 index 0000000..364c12d --- /dev/null +++ b/src/ui/inc/FUiCtrl_IScrollEventListener.h @@ -0,0 +1,107 @@ +// +// 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_IScrollEventListener.h + * @brief This is the header file for the _IScrollEventListener class. + * @brief This is the header file for the _ScrollExtraValue class. + * + * This header file contains the declarations of the _IScrollEventListener class. + * If a change event is generated, a method of this class is called. + * Applications that do jobs related to change events call the methods of this class. + */ + +#ifndef _FUICTRL_INTERNAL_ISCROLL_EVENT_LISTENER_H_ +#define _FUICTRL_INTERNAL_ISCROLL_EVENT_LISTENER_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui +{ +class _Control; +}} // Tizen::Ui + +namespace Tizen {namespace Ui { namespace Controls +{ + +/** + * @interface _IScrollEventListener + * @brief This interface implements a listener for scroll events. + * @since 2.0 + * + * The interface implements a listener for receiving changes to the Control's the behavior of the scroll. + * The class that displays and controls scroll implements this interface, and the instance created with + * that class is registered with a UI control, using the control's AddScrollEventListener() method. + */ +class _IScrollEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +// Operation +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + * + */ + virtual ~_IScrollEventListener(void) {} + + /** + * Notifies when the scroll reached on one of top, bottom, left or right end + * + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] type The type of scroll end event + */ + virtual void OnScrollEndReached(Tizen::Ui::_Control& source, ScrollEndEvent type) = 0; + + /** + * Called continuously when the control is being scrolled. + * + * @since 2.1 + * + * @param[in] source The source of the event + * @param[in] scrollPosition The scrolled position + */ + virtual void OnScrollPositionChanged(Tizen::Ui::_Control& source, float scrollPosition) {}; + + /** + * Called when the control's scroll movement has come to a stop. + * + * @since 2.0 + * + * @param[in] source The control being scrolled + */ + virtual void OnScrollStopped(Tizen::Ui::_Control& source) {}; + + /** + * Called when the control's scroll has requested jump to top. + * + * @since 2.1 + * + * @param[in] source The control's scroll + */ + virtual void OnScrollJumpToTop(Tizen::Ui::_Control& source) {}; + +}; + +}}} // Tizen::Ui::Controls + +#endif // _FUICTRL_INTERNAL_ISCROLL_EVENT_LISTENER_H_ diff --git a/src/ui/inc/FUiCtrl_IScrollPanelEventListener.h b/src/ui/inc/FUiCtrl_IScrollPanelEventListener.h new file mode 100644 index 0000000..6fb0555 --- /dev/null +++ b/src/ui/inc/FUiCtrl_IScrollPanelEventListener.h @@ -0,0 +1,98 @@ +// +// 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_IScrollPanelEventListener.h + * @brief This is the header file for the _IScrollPanelEventListener class. + * + * This header file contains the declarations of the _IScrollPanelEventListener class. + * If a change event is generated, a method of this class is called. + * Applications that do jobs related to change events call the methods of this class. + * + */ +#ifndef _FUI_CTRL_INTERNAL_ISCROLLPANEL_EVENT_LISTENER_H_ +#define _FUI_CTRL_INTERNAL_ISCROLLPANEL_EVENT_LISTENER_H_ + +// Includes +#include +#include + +namespace Tizen { namespace Ui +{ +class _Control; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @interface _IScrollPanelEventListener + * @brief This interface implements a listener for ScrollPanel events. + * @since 2.0 + * + * The interface implements a listener for receiving changes to the overlay keypad. The class that + * displays and controls an overlay keypad implements this interface, and the instance created with + * that class is registered with a UI control, using the control's AddScrollPanelEventListener() method. + */ +class _IScrollPanelEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +// Operation +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~_IScrollPanelEventListener(void) {} + + /** + * Notifies when an overlay keypad is created on the ScrollPanel. + * + * @since 2.0 + * @param[in] source The source of the event + */ + virtual void OnOverlayControlCreated(const Tizen::Ui::_Control& source) = 0; + + /** + * Notifies when an overlay keypad is opened on the ScrollPanel. + * + * @since 2.0 + * @param[in] source The source of the event + */ + virtual void OnOverlayControlOpened(const Tizen::Ui::_Control& source) = 0; + + /** + * Notifies when an overlay keypad is closed on the ScrollPanel. + * + * @since 2.0 + * @param[in] source The source of the event + */ + virtual void OnOverlayControlClosed(const Tizen::Ui::_Control& source) = 0; + + /** + * Notifies when a control on the ScrollPanel is selected. + * + * @since 2.0 + * @param[in] source The source of the event + */ + virtual void OnOtherControlSelected(const Tizen::Ui::_Control& source) = 0; +}; // _IScrollPanelEventListener + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_ISCROLLPANEL_EVENT_LISTENER_H_ diff --git a/src/ui/inc/FUiCtrl_IScrollableContainer.h b/src/ui/inc/FUiCtrl_IScrollableContainer.h new file mode 100644 index 0000000..c8a62b2 --- /dev/null +++ b/src/ui/inc/FUiCtrl_IScrollableContainer.h @@ -0,0 +1,62 @@ +// +// 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_IScrollableContainer.h +* @brief This is the implementation for the _IScrollableContainer class. +* +* This header file contains the declarations of the _IScrollableContainer class. +*/ + +#ifndef _FUI_CTRL_INTERNAL_ISCROLLABLE_CONTAINER_H_ +#define _FUI_CTRL_INTERNAL_ISCROLLABLE_CONTAINER_H_ + +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** +* @class _IScrollableContainer +* @brief This class handles a scrollable container. It is inherited from scrollable container interface class. +* +*/ +class _IScrollableContainer +{ +// Lifecycle +public: + virtual ~_IScrollableContainer(void){} + +// Operations +public: + virtual bool ScrollToControl(const _Control& source, bool recursive = false) = 0; + +protected: +// reserved virtual methods for later extension +// Following methods are reserved and may change its name at any time without prior notice. + virtual void _IScrollableContainer_Reserved1(void) {} + virtual void _IScrollableContainer_Reserved2(void) {} + virtual void _IScrollableContainer_Reserved3(void) {} + +// Property +private: +}; // _IScrollableContainer + +}}}// Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_ISCROLLABLE_CONTAINER_H_ + diff --git a/src/ui/inc/FUiCtrl_ISearchBarEventListener.h b/src/ui/inc/FUiCtrl_ISearchBarEventListener.h new file mode 100644 index 0000000..02563dc --- /dev/null +++ b/src/ui/inc/FUiCtrl_ISearchBarEventListener.h @@ -0,0 +1,73 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiCtrl_ISearchBarEventListener.h + * @brief This is the header file for the _ISearchBarEventListener interface. + * + * This header file contains the declarations of the _ISearchBarEventListener + * interface. + */ +#ifndef _FUI_CTRL_INTERNAL_ISEARCH_BAR_EVENT_LISTENER_H_ +#define _FUI_CTRL_INTERNAL_ISEARCH_BAR_EVENT_LISTENER_H_ + +// incluses +#include +#include + +namespace Tizen {namespace Ui { namespace Controls +{ + +class _SearchBar; + +/** + * @interface _ISearchBarEventListener + * @brief This interface implements the listener for SearchBar events. + * @since 2.0 + * + * The _ISearchBarEventListener interface enables the implementer to receive the + * SearchBar events. + */ +class _ISearchBarEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +// Lifecycle +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~_ISearchBarEventListener(void) {} + + +// Operation +public: + /** + * Notifies that the mode of the SearchBar is changed. + * + * @since 2.0 + * @param[in] source The source of the event + * @param[in] mode The current search bar mode. + */ + virtual void OnSearchBarModeChanged(Tizen::Ui::Controls::_SearchBar& source, SearchBarMode mode) = 0; + +}; // _ISearchBarEventListener + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_ISEARCH_BAR_EVENT_LISTENER_H_ diff --git a/src/ui/inc/FUiCtrl_ISliderEventListener.h b/src/ui/inc/FUiCtrl_ISliderEventListener.h new file mode 100644 index 0000000..05779a5 --- /dev/null +++ b/src/ui/inc/FUiCtrl_ISliderEventListener.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 FUiCtrl_ISliderEventListener.h + * @brief This is the header file for the _ISliderEventListener class. + * + * This header file contains the declarations of the _ISliderEventListener class. + * If a change event is generated, a method of this class is called. + * So, if applications do jobs related to change events, use the methods of this class. + * + */ +#ifndef _FUICTRL_INTERNAL_ISLIDER_EVENT_LISTENER_H_ +#define _FUICTRL_INTERNAL_ISLIDER_EVENT_LISTENER_H_ + +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ +class _Slider; + +/** + * @interface _ISliderEventListener + * @brief This interface implements the listener for all slider events. + * @since 2.0 + * + * The _ISliderEventListener interface receives slider events which are fired when the knob of a Slider moves. + * The class that is interested in processing an slider event implements this interface, and the object created + * with that class is registered with a UI control, using the control's AddSliderEventListener() method. + * When slider event occurs, the object's OnSliderBarMoved() method is invoked. + */ +class _ISliderEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +// Operation +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~_ISliderEventListener(void) {} + + /** + * Notifies that the Slider bar moved. + * + * @since 2.0 + * @param[in] source The source of the event + * @param[in] value The current value indicated by the knob + * @remarks This event is fired when the knob is moved until the user releases + * the knob. + */ + virtual void OnSliderBarMoved(Tizen::Ui::Controls::_Slider& source, int value) = 0; + +}; // _ISliderEventListener + +}}} // Tizen::Ui::Controls + +#endif // _FUICTRL_INTERNAL_ISLIDER_EVENT_LISTENER_H_ diff --git a/src/ui/inc/FUiCtrl_ISplitPanelEventListener.h b/src/ui/inc/FUiCtrl_ISplitPanelEventListener.h new file mode 100644 index 0000000..4355385 --- /dev/null +++ b/src/ui/inc/FUiCtrl_ISplitPanelEventListener.h @@ -0,0 +1,84 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiCtrl_ISplitPanelEventListener.h + * @brief This is the header file for the _ISplitPanelEventListener interface. + * + * This header file contains the declarations of the _ISplitPanelEventListener + * interface. + */ +#ifndef _FUI_CTRL_INTERNAL_ISPLIT_PANEL_EVENT_LISTENER_H_ +#define _FUI_CTRL_INTERNAL_ISPLIT_PANEL_EVENT_LISTENER_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ +class _SplitPanel; + +/** + * @interface _ISplitPanelEventListener + * @brief This interface implements the listener for all splitpanel events. + * @since 2.1 + * + * The %_ISplitPanelEventListener interface is the listener interface for receiving SplitPanel events, which are fired when the divider moves or is double pressed. + * The class that processes a SplitPanel event implements this interface, and the instance created with that class is registered with + * a UI control, using the control's AddSplitPanelEventListener() method. When the splitpanle divider is moved, the OnDividerPositionChanged() + * method of that instance is invoked. + * + * For more information on the class features, see SplitPanel. + */ +class _ISplitPanelEventListener + : public Tizen::Base::Runtime::IEventListener +{ +public: + /** + * This is the destructor for this class. + * + * @since 2.1 + */ + virtual ~_ISplitPanelEventListener(void) {} + +public: + /** + * + * Called when the divider moves. + * + * @since 2.1 + * @param[in] source The source of the event + * @param[in] position The position of the divider + */ + virtual void OnDividerPositionChanged(Tizen::Ui::Controls::_SplitPanel& source, int position) = 0; + + /** + * Called when the divider is double pressed. + * + * @since 2.1 + * + * @param[in] source The source of the event + * @remark This method is invoked when an divider is double pressed. + */ + virtual void OnDividerDoublePressed(Tizen::Ui::Controls::_SplitPanel& source) = 0; + +}; // _ISplitPanelEventListener + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_ISPLIT_PANEL_EVENT_LISTENER_H_ diff --git a/src/ui/inc/FUiCtrl_ITableViewItemEventListener.h b/src/ui/inc/FUiCtrl_ITableViewItemEventListener.h new file mode 100644 index 0000000..10b016e --- /dev/null +++ b/src/ui/inc/FUiCtrl_ITableViewItemEventListener.h @@ -0,0 +1,218 @@ +// +// 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_ITableViewItemEventListener.h + * @brief This is the header file for the _ITableViewItemEventListener class. + * + * This header file contains the declarations of the _ITableViewItemEventListener + * class. @n + * If an item event is generated, a method of this class is called. @n + * So, if an application does some jobs related to the item event, + * use the methods of this class. + * + */ + +#ifndef _FUI_CTRL_INTERNAL_ITABLEVIEWITEM_EVENT_LISTENER_H_ +#define _FUI_CTRL_INTERNAL_ITABLEVIEWITEM_EVENT_LISTENER_H_ + +// Includes +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ +class TableViewItem; +class TableViewContextItem; +class TableViewGroupItem; +class _TableView; +class _TableViewItem; + +/** + * @interface _ITableViewItemEventListener + * @brief This interface implements the listener for + * internal item event. + * @since 2.1 + * + * _ITableViewItemEventListener is an interface which implements a listener for receiving + * item change events. The class that is interested in + * processing an item event implements this interface, and the + * instance created with that class is registered with a UI + * control, using the control's AddTableViewItemEventListener() + * method. When the item event occurs, the OnItemStateChanged() + * method of that object is invoked. + */ +class _ITableViewItemEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +// Operation +public: + /** + * This is the destructor for this class. + * + * @since 2.1 + */ + virtual ~_ITableViewItemEventListener(void) {} + + /** + * Called when the state of a TableViewItem in the TableView is changed. + * + * @since 2.1 + * + * @param[in] tableView The source of the event + * @param[in] itemIndex The item index + * @param[in] pItem The target item + * @param[in] status The status of the item + * @remarks This method is called when a TableViewItem in the TableView is checked, unchecked, or selected. + * The application can change @c pItem in this method, but should not keep @c pItem for later use. + */ + virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status) = 0; + + /** + * Called when the TableViewContextItem is opened or closed. + * + * @since 2.1 + * + * @param[in] tableView The source of the event + * @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 + * @c false, otherwise + */ + virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::_TableView& tableView, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pContextItem, bool activated) = 0; + + /** + * Called when the item is reordered. + * + * @since 2.1 + * + * @param[in] tableView The source of the event + * @param[in] itemIndexFrom The start item index of the item + * @param[in] itemIndexTo The final item index of the item + */ + virtual void OnTableViewItemReordered(Tizen::Ui::Controls::_TableView& tableView, int itemIndexFrom, int itemIndexTo) = 0; + + + /** + * Called when the state of a TableViewGroupItem is changed. + * + * @since 2.1 + * + * @param[in] tableView The source of the event + * @param[in] groupIndex The group index + * @param[in] pItem The target item + * @param[in] status The status of the item + * @remarks This method is called when the TableViewGroupItem in the GroupedTableView is checked, unchecked, or selected. + */ + virtual void OnGroupedTableViewGroupItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status) = 0; + + /** + * Called when the state of a TableViewItem in the GroupedTableView is changed. + * + * @since 2.1 + * + * @param[in] tableView The source of the event + * @param[in] groupIndex The group index + * @param[in] itemIndex The item index + * @param[in] pItem The target item + * @param[in] status The status of the item + * @remarks This method is called when the TableViewItem in the GroupedTableView is checked, unchecked, or selected. + */ + virtual void OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status) = 0; + + /** + * Called when the TableViewContextItem is opened or closed. + * + * @since 2.1 + * + * @param[in] tableView The source of the event + * @param[in] groupIndex The group index + * @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 + * @c false, otherwise + */ + virtual void OnGroupedTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pContextItem, bool activated) = 0; + + /** + * Called when the item is reordered. + * + * @since 2.1 + * + * @param[in] tableView 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 OnGroupedTableViewItemReordered(Tizen::Ui::Controls::_TableView& tableView, int groupIndexFrom, int itemIndexFrom, int groupIndexTo, int itemIndexTo) = 0; + + + /** + * Called when the state of a TableViewItem in the SectionTableView is changed. + * + * @since 2.1 + * + * @param[in] tableView The source of the event + * @param[in] sectionIndex The section index + * @param[in] itemIndex The item index + * @param[in] pItem The target item + * @param[in] status The status of the item + * @remarks This method is called when the TableViewItem in the SectionTableView is checked, unchecked, or selected. + */ + virtual void OnSectionTableViewItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int sectionIndex, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status) = 0; + + /** + * Called when the TableViewContextItem is opened or closed. + * + * @since 2.1 + * + * @param[in] tableView The source of the event + * @param[in] sectionIndex The section index + * @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 + * @c false, otherwise + */ + virtual void OnSectionTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::_TableView& tableView, int sectionIndex, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pContextItem, bool activated) = 0; + + + /* + * Called when the TableViewItem is swept. + * + * @since 2.1 + * + * @param[in] tableView The source of the event + * @param[in] groupIndex The item index + * @param[in] itemIndex The item index + * @param[in] direction The sweep direction + */ + virtual void OnTableViewItemSwept(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewSweepDirection direction) = 0; + +protected: + // reserved virtual methods for later extension + // + // Following methods are reserved and may change its name at any time without prior notice. + // + virtual void _ITableViewItemEventListener_Reserved1(void) {} + virtual void _ITableViewItemEventListener_Reserved2(void) {} + virtual void _ITableViewItemEventListener_Reserved3(void) {} +}; // _ITableViewItemEventListener + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_ITABLEVIEWITEM_EVENT_LISTENER_H_ diff --git a/src/ui/inc/FUiCtrl_ITextBlockEventListener.h b/src/ui/inc/FUiCtrl_ITextBlockEventListener.h new file mode 100644 index 0000000..dd36eb67 --- /dev/null +++ b/src/ui/inc/FUiCtrl_ITextBlockEventListener.h @@ -0,0 +1,75 @@ +// +// 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_ITextBlockEventListener.h + * @brief This is the header file for the _ITextBlockEventListener interface. + * + * This header file contains the declarations of the _ITextBlockEventListener interface. + */ +#ifndef _FUI_CTRL_INTERNAL_ITEXT_BLOCK_EVENT_LISTENER_H_ +#define _FUI_CTRL_INTERNAL_ITEXT_BLOCK_EVENT_LISTENER_H_ + +// Includes +#include + +// forward declaration +namespace Tizen { namespace Ui +{ +class _Control; +}} // Tizen::Ui + +// namespace declaration +namespace Tizen { namespace Ui { namespace Controls +{ +/** + * @interface ITextBlockEventListener + * @brief This interface implements the listener for text block events. + * @since 2.0 + * + * The ITextBlockEventListener interface enables the implementer to receive the + * text block selection event. + */ +class _ITextBlockEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +// Lifecycle +public: + /** + * This is the destructor for this class. + * @since 2.0 + */ + virtual ~_ITextBlockEventListener(void) {} + + +// Operation +public: + /** + * Notifies that a text block is selected. + * @since 2.0 + * + * @param[in] source The source of the event + * @param[in] start The starting index of the selected text block. + * @param[in] end The end index of the selected text block. + */ + virtual void OnTextBlockSelected(Tizen::Ui::_Control& source, int start, int end) = 0; + +}; // _ITextBlockEventListener + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_ITEXT_BLOCK_EVENT_LISTENER_H_ diff --git a/src/ui/inc/FUiCtrl_ITextEventListener.h b/src/ui/inc/FUiCtrl_ITextEventListener.h new file mode 100644 index 0000000..dd169c6 --- /dev/null +++ b/src/ui/inc/FUiCtrl_ITextEventListener.h @@ -0,0 +1,108 @@ +// +// 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_ITextEventListener.h + * @brief This is the header file for the _ITextEventListener class. + * + * This header file contains the declarations of the _ITextEventListener class. @n + * If a change event is generated, a method of this class is called. @n + * So, if the applications perform tasks related to change events, use the methods of this class. + * + */ +#ifndef _FUI_CTRL_INTERNAL_ITEXT_EVENT_LISTENER_H_ +#define _FUI_CTRL_INTERNAL_ITEXT_EVENT_LISTENER_H_ + +// Includes +#include +#include + +namespace Tizen { namespace Ui +{ +class _Control; +}} //Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ +/** + * @interface _ITextEventListener + * @brief This interface implements the listener for _kmjaction event. + * @since 2.0 + * + * The listener interface for receiving the action events. The class that processes an action event + * implements this interface, and the object created with that class is registered with a _control, using the _control's + * AddTextEventListener() method. When the action event occurs, the OnTextValueChanged() method of that object is invoked. + */ +class _ITextEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +// Operation +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~_ITextEventListener(void) {} + + /** + * Notifies when a text is changed. + * + * @if OSPCOMPAT + * @brief [Compatibility] + * @endif + * @since 2.0 + * @if OSPCOMPAT + * @compatibility This method has compatibility issues with OSP compatible applications. @n + * For more information, see @ref CompIEventListenerOnTextValueChanged "here". + * @endif + * @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, EditField or EditArea with INPUT_STYLE_OVERLAY input style, + * this method is called whenever the presses a key. + * @remarks Note that when a non-character key is pressed, OnTextValueChanged callback is invoked. + */ + virtual void OnTextValueChanged(const Tizen::Ui::_Control& source) = 0; + + /** + * @if OSPCOMPAT + * @page CompIEventListenerOnTextValueChanged Compatibility for OnTextValueChanged() + * @section CompIEventListenerOnTextValueChangedIssues Issues + * Implementing this method in OSP compatible applications has the following issues: @n + * + * -# When texts are inserted by prediction feature in the predictive input mode of EditArea or EditField, OnTextValueChanged callback is not invoked. + * + * @section CompIEventListenerOnTextValueChanged Resolutions Resolutions + * This issue has been resolved in Tizen. @n + * @endif + */ + + /** + * Notifies 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 style. + */ + virtual void OnTextValueChangeCanceled(const Tizen::Ui::_Control& source) = 0; + +}; // _ITextEventListener + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_ITEXT_EVENT_LISTENER_H_ diff --git a/src/ui/inc/FUiCtrl_ITokenFilter.h b/src/ui/inc/FUiCtrl_ITokenFilter.h new file mode 100644 index 0000000..1e7ae83 --- /dev/null +++ b/src/ui/inc/FUiCtrl_ITokenFilter.h @@ -0,0 +1,53 @@ +// +// 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_ITokenFilter.h + * @brief This is the header file for the _ITokenFilter interface. + * + * This header file contains the declarations of the _ITokenFilter interface. + */ +#ifndef _FUICTRL_INTERNAL_ITOKEN_FILTER_H_ +#define _FUICTRL_INTERNAL_ITOKEN_FILTER_H_ + +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _ITokenFilter +{ +public: + virtual ~_ITokenFilter(void) {}; + + // Operation +public: + /** + * Asks the filter if the text tokenized by the ExpandableEditArea should + * be replaced. + * + * @since 2.1 + * @return @c true if the text of the current token needs to be replaced. + * @c false otherwise + * @param[in] token The current token's text + * @param[out] replacement The user-defined replacement text + */ + virtual bool ReplaceToken(const Tizen::Base::String& token, Tizen::Base::String& replacement) = 0; +}; // _ITokenFilter + +}}} // Tizen::Ui::Controls +#endif diff --git a/src/ui/inc/FUiCtrl_IUiLinkEventListener.h b/src/ui/inc/FUiCtrl_IUiLinkEventListener.h new file mode 100644 index 0000000..6d8611c --- /dev/null +++ b/src/ui/inc/FUiCtrl_IUiLinkEventListener.h @@ -0,0 +1,79 @@ +// +// 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_IUiLinkEventListener.h + * @brief This file defines the _IUiLinkEventListener interface. + * @version 2.0 + * + * This file contains the declarations of _IUiLinkEventListener interface. + */ + +#ifndef _FUI_CTRL_INTERNAL_IUI_LINK_EVENT_LISTENER_H_ +#define _FUI_CTRL_INTERNAL_IUI_LINK_EVENT_LISTENER_H_ + +// includes +#include +#include + +namespace Tizen { namespace Ui +{ +class _Control; +}} // Tizen::Ui + +// namespace declaration +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @interface _IUiLinkEventListener + * @brief This interface implements the listener for link events. + * @since 2.0 + * + * The _IUiLinkEventListener interface enables the implementer to receive the + * link click event. + */ +class _IUiLinkEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +// Lifecycle +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~_IUiLinkEventListener(void) {} + + // Operation +public: + /** + * Notifies that a link is clicked. + * + * @since 2.0 + * @param[in] source The source of the event + * @param[in] text The text. + * @param[in] linkType The link type. + * @param[in] link The optional link text. + * @remarks If clicked link does not contain optional link text then, the value of @c text and @c link will be the same. + */ + virtual void OnLinkClicked(Tizen::Ui::_Control& source, const Tizen::Base::String& text, Tizen::Base::Utility::LinkType linkType, const Tizen::Base::String& link) = 0; +}; // _IUiLinkEventListener + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_IUI_LINK_EVENT_LISTENER_H_ diff --git a/src/ui/inc/FUiCtrl_IUiListViewItemEventListener.h b/src/ui/inc/FUiCtrl_IUiListViewItemEventListener.h new file mode 100644 index 0000000..aa3b2e0 --- /dev/null +++ b/src/ui/inc/FUiCtrl_IUiListViewItemEventListener.h @@ -0,0 +1,78 @@ +// +// 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_IUiListViewItemEventListener.h + * @brief This is the header file for the _IUiListViewItemEventListener class. + * + * This header file contains the declarations of the _IUiListViewItemEventListener + * class. @n + * If an item event is generated, a method of this class is called. @n + * So, if an application does some jobs related to the item event, + * use the methods of this class. + * + */ + +#ifndef _FUI_CTRL_INTERNAL_ILIST_VIEW_ITEM_EVENT_LISTENER_H_ +#define _FUI_CTRL_INTERNAL_ILIST_VIEW_ITEM_EVENT_LISTENER_H_ + +#include +#include +#include "FUi_Control.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _IUiListViewItemEventListener + : 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. + * + * @since 2.1 + */ + virtual ~_IUiListViewItemEventListener(void) {} + + /** + * Notifies when the state of an element in the ListContextItem is changed. + * + * @since 2.1 + * + * @param[in] groupIndex The group index of the list + * @param[in] itemIndex The item index of the list + * @param[in] elementId The element ID + * @param[in] status The status of the element + */ + virtual void OnListViewContextItemStateChanged(Tizen::Ui::_Control& source, int groupIndex, int itemIndex, int elementId, Tizen::Ui::Controls::ListContextItemStatus status) = 0; + +protected: + // reserved virtual methods for later extension + // + // Following methods are reserved and may change its name at any time without prior notice. + // + virtual void _IUiListViewItemEventListener_Reserved1(void) {} + virtual void _IUiListViewItemEventListener_Reserved2(void) {} + virtual void _IUiListViewItemEventListener_Reserved3(void) {} +}; // _IUiListViewItemEventListener + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_ILIST_VIEW_ITEM_EVENT_LISTENER_H_ diff --git a/src/ui/inc/FUiCtrl_IconListData.h b/src/ui/inc/FUiCtrl_IconListData.h new file mode 100644 index 0000000..935d926 --- /dev/null +++ b/src/ui/inc/FUiCtrl_IconListData.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 FUiCtrl_IconListData.h + * @brief This is the header file for the _IconListData class. + * + * This header file contains the declarations of the _IconListData class. + */ + +#ifndef _FUI_CTRL_ICON_LIST_DATA_H_ +#define _FUI_CTRL_ICON_LIST_DATA_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _IconListData + : public Tizen::Base::Object +{ +public: + _IconListData(void); + + ~_IconListData(void); + +public: + const Tizen::Graphics::Bitmap* GetNormalBitmap(void); + + const Tizen::Graphics::Bitmap* GetFocusedBitmap(void); + + const Tizen::Base::String GetLabelText(void); + + int GetItemId(void); + + void SetNormalBitmap(const Tizen::Graphics::Bitmap* pNormalBitmap); + + void SetFocusedBitmap(const Tizen::Graphics::Bitmap* pFocusedBitmap); + + void SetLabelText(const Tizen::Base::String& labelText); + + void SetItemId(int itemId); + +private: + _IconListData(const _IconListData& rhs); + _IconListData& operator =(const _IconListData& rhs); + +private: + Tizen::Graphics::Bitmap* __pNormalBitmap; + Tizen::Graphics::Bitmap* __pFocusedBitmap; + Tizen::Base::String __labelText; + int __itemId; + +}; //_IconListData + +}}} //Tizen::Ui::Controls + +#endif // _FUI_CTRL_ICON_LIST_DATA_H_ diff --git a/src/ui/inc/FUiCtrl_IconListImpl.h b/src/ui/inc/FUiCtrl_IconListImpl.h new file mode 100644 index 0000000..947e059 --- /dev/null +++ b/src/ui/inc/FUiCtrl_IconListImpl.h @@ -0,0 +1,130 @@ +// +// 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_IconListImpl.h + * @brief This is the header file for the _IconListImpl class. + * + * This header file contains the declarations of the _IconListImpl class. + */ + +#ifndef _FUI_CTRL_ICON_LIST_IMPL_H_ +#define _FUI_CTRL_ICON_LIST_IMPL_H_ + +// Includes +#include +#include +#include +#include +#include +#include "FUi_ControlImpl.h" +#include "FUiCtrl_IconListView.h" +#include "FUiCtrl_IconListViewItemEventArg.h" +#include "FUiCtrl_IIconListItemEventListener.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _IconListData; +class _IconListItemProvider; + +class _IconListImpl + : public _ControlImpl + , public _IIconListItemEventListener + , virtual public Tizen::Base::Runtime::IEventListener +{ + +public: + virtual ~_IconListImpl(void); + static _IconListImpl* CreateIconListImplN(IconList* pControl); + virtual const char* GetPublicClassName(void) const; + virtual const IconList& GetPublic(void) const; + virtual IconList& GetPublic(void); + virtual const _IconListView& GetCore(void) const; + virtual _IconListView& GetCore(void); + result SetListener(void); + void AddItemEventListener(Tizen::Ui::IItemEventListener& listener); + void RemoveItemEventListener(Tizen::Ui::IItemEventListener& listener); + void SetBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap); + result SetMargin(int topMargin, int leftMargin); + int GetTopMargin(void) const; + int GetLeftMargin(void) const; + result AddItem(const Tizen::Base::String* pText, const Tizen::Graphics::Bitmap* pNormalBitmap, const Tizen::Graphics::Bitmap* pFocusedBitmap, int itemId = LIST_ITEM_UNSPECIFIED_ID); + result InsertItemAt(int index, const Tizen::Base::String* pText, const Tizen::Graphics::Bitmap* pNormalBitmap, const Tizen::Graphics::Bitmap* pFocusedBitmap, int itemId = LIST_ITEM_UNSPECIFIED_ID); + result SetItemAt(int index, const Tizen::Base::String* pText, const Tizen::Graphics::Bitmap* pNormalBitmap, const Tizen::Graphics::Bitmap* pFocusedBitmap, int itemId = LIST_ITEM_UNSPECIFIED_ID); + result RemoveItemAt(int index); + result RemoveAllItems(void); + int GetColumnCount(void) const; + int GetItemCount(void) const; + result SetItemChecked(int index, bool check); + bool IsItemChecked(int index) const; + result SetAllItemsChecked(bool check); + result RemoveAllCheckedItems(void); + int GetFirstCheckedItemIndex(void) const; + int GetLastCheckedItemIndex(void) const; + int GetNextCheckedItemIndexAfter(int index) const; + int GetItemIndexFromPosition(int x, int y) const; + int GetItemIndexFromPosition(const Tizen::Graphics::Point& position) const; + void SetTextHorizontalAlignment(HorizontalAlignment alignment); + void SetTextVerticalAlignment(VerticalAlignment alignment); + HorizontalAlignment GetTextHorizontalAlignment(void) const; + VerticalAlignment GetTextVerticalAlignment(void) const; + void SetTextOfEmptyList(const Tizen::Base::String& text); + void SetTextColorOfEmptyList(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetTextColorOfEmptyList(void) const; + void SetItemTextColor(const Tizen::Graphics::Color& textColor); + Tizen::Graphics::Color GetItemTextColor(void) const; + void SetTextSize(int size); + int GetTextSize(void) const; + int GetItemIndexFromItemId(int itemId) const; + int GetItemIdAt(int index) const; + void SetCheckBoxPosition(IconListCheckBoxPosition position); + IconListCheckBoxPosition GetCheckBoxPosition(void) const; + void SetFocusAnimationEnabled(bool enable); + void ScrollToBottom(void); + void ScrollToTop(void); + result ScrollToTop(int itemIndex); + result RefreshItem(int index); + virtual void OnIconListItemStateChanged(_IconListViewItemEventArg* pArg); + result SetIconListStyle(IconListStyle style); + result InitializeIconList(int itemWidth, int itemHeight); + result SetItemProvider(void); + result SetNonSlidable(void); + +public: + static _IconListImpl* GetInstance(IconList& iconList); + static const _IconListImpl* GetInstance(const IconList& iconList); + +private: + _IconListImpl(Control* pPublic, _IconListView* pCore); + _IconListImpl(const _IconListImpl& rhs); + _IconListImpl& operator =(const _IconListImpl& rhs); + _IconListData* CreateIconListItemN(const Tizen::Base::String* pText, const Tizen::Graphics::Bitmap* pNormalBitmap, const Tizen::Graphics::Bitmap* pFocusedBitmap, int itemId = LIST_ITEM_UNSPECIFIED_ID); + _IconListImpl* GetIconListImpl(void); + +private: + static const int INVALID_INDEX = -1; + friend class _IconListItemProvider; + _IconListItemProvider* __pIconListItemProvider; + Tizen::Base::Collection::LinkedList __iconList; + Tizen::Base::Collection::LinkedList __iconListenersList; + IconListViewStyle __annexStyle; + +}; //_IconListImpl + +}}} //Tizen::Ui::Controls + +#endif // _FUI_CTRL_ICON_LIST_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_IconListItem.h b/src/ui/inc/FUiCtrl_IconListItem.h new file mode 100644 index 0000000..a5cb144 --- /dev/null +++ b/src/ui/inc/FUiCtrl_IconListItem.h @@ -0,0 +1,153 @@ +// +// 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_IconListItem.h + * @brief This is the header file for the _IconListItem class. + */ + +#ifndef _FUI_CTRL_INTERNAL_ICON_LIST_ITEM_H_ +#define _FUI_CTRL_INTERNAL_ICON_LIST_ITEM_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "FUi_AccessibilityElement.h" +#include "FUiCtrl_LinkedList.h" +#include "FUiCtrl_ListItemCommon.h" + +namespace Tizen { namespace Ui +{ + +namespace Animations +{ +class _VisualElement; +} // Tizen::Ui::Animations + +namespace Controls +{ + +class IconListViewItem; +class _IconListItemDrawingProperty; + +struct _OverlayBitmap +{ + int id; + Tizen::Graphics::Bitmap* pBitmap; + HorizontalAlignment horizontalAlignment; + VerticalAlignment verticalAlignment; + Tizen::Ui::Animations::_VisualElement* pVE; +}; + +class _IconListItem + : public _ListItemCommon +{ +// Lifecycle + +public: + virtual ~_IconListItem(void); + + static _IconListItem* CreateIconListItemN(IconListViewItem* pIconListViewItem); + + // _ListItemCommon + 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; + + result DrawItemTouchAnimation(Tizen::Graphics::FloatRectangle& rect, float ratio); + result DrawItemCheckAnimation(Tizen::Graphics::FloatRectangle& rect, float ratio); + + result SetText(const Tizen::Base::String* pText); + + const Tizen::Base::String& GetText(void) const; + + result SetBitmap(IconListViewItemDrawingStatus status, const Tizen::Graphics::Bitmap* pBitmap); + + const Tizen::Graphics::Bitmap* GetBitmap(IconListViewItemDrawingStatus status) const; + Tizen::Ui::Animations::_VisualElement* GetSelectAniVisualElement(void) const; + Tizen::Ui::Animations::_VisualElement* GetCheckAniVisualElement(void) const; + Tizen::Ui::Animations::_VisualElement* GetCheckBGVisualElement(void) const; + Tizen::Ui::Animations::_VisualElement* GetVisualElement(void) const; + + void ClearVisualElement(void); + + result SetDrawingProperty(_IconListItemDrawingProperty& property); + + result SetOverlayBitmap(int overlayBitmapId, const Tizen::Graphics::Bitmap* pOverlayBitmap, HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment); + + int GetOverlayBitmapIdFromPosition(Tizen::Graphics::FloatPoint& position) const; + + Tizen::Ui::Animations::_VisualElement* GetItemVisualElement(void) const; + + Tizen::Ui::_AccessibilityElement* SetItemAccessibilityElement(Tizen::Graphics::FloatRectangle& rect, int itemIndex = -1, const _AccessibilityElement& pElement = null, bool swapElement = false); + + Tizen::Ui::_AccessibilityElement* GetItemAccessibilityElement(void); + + bool IsDrawn(void) const; + +protected: + result DrawBitmap(Tizen::Graphics::Canvas& canvas, Tizen::Graphics::Bitmap& bitmap, float ratio = 1.0f); + result DrawText(const Tizen::Graphics::Color& color); + result DrawCheck(Tizen::Graphics::Canvas& canvas, float ratio = 1.0f); + result DrawOverlayBitmaps(void); + result DrawBorder(Tizen::Graphics::Canvas& canvas, bool isFocused); + +private: + _IconListItem(Tizen::Ui::Animations::_VisualElement* pBase); + _IconListItem(const _IconListItem& rhs); + _IconListItem& operator =(const _IconListItem& rhs); + + Tizen::Graphics::FloatRectangle GetOverlayBitmapBounds(_OverlayBitmap* pOverlayBitmap, const Tizen::Graphics::FloatRectangle& parentRect, float overlayMargin) const; + +// Inquiry +public: +// Attribute +private: + static const int DEFAULT_GROUP_INDEX = 0; + static const int MAX_ITEM_TEXT_LINE_COUNT = 2; + static const float REFERENCE_FACTOR = 1.0f; + static const int OPAQUE_ALPHA = 255; + + int __itemIndex; + Tizen::Base::String __text; + Tizen::Graphics::Bitmap* __pBitmap[LIST_ITEM_STATE_MAX]; + Tizen::Ui::Animations::_VisualElement* __pBase; + Tizen::Ui::Animations::_VisualElement* __pTextVE; + Tizen::Ui::Animations::_VisualElement* __pCheckVE; + Tizen::Ui::Animations::_VisualElement* __pCheckBgVE; + Tizen::Ui::Animations::_VisualElement* __pTouchAniVE; + Tizen::Ui::Animations::_VisualElement* __pFocusVE; + + _IconListItemDrawingProperty* __pProperty; + ListItemState __foreDrawnState; + bool __isDrawn; + bool __isAlradyDestory; + + Tizen::Graphics::_Text::TextObject* __pTextObject; + _LinkedList <_OverlayBitmap*> __overlayBitmaps; + Tizen::Ui::_AccessibilityElement* __pAccessibilityElement; +}; // _IconListItem + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_ICON_LIST_ITEM_H_ diff --git a/src/ui/inc/FUiCtrl_IconListItemDrawingProperty.h b/src/ui/inc/FUiCtrl_IconListItemDrawingProperty.h new file mode 100644 index 0000000..8d33e24 --- /dev/null +++ b/src/ui/inc/FUiCtrl_IconListItemDrawingProperty.h @@ -0,0 +1,222 @@ +// +// 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_IconListItemDrawingProperty.h + * @brief This is the header file for the _IconListItemDrawingProperty class. + */ + +#ifndef _FUI_CTRL_INTERNAL_ICON_LIST_ITEM_DRAWING_PROPERTY_H_ +#define _FUI_CTRL_INTERNAL_ICON_LIST_ITEM_DRAWING_PROPERTY_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "FUiCtrl_ListItemCommon.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _IconListItemDrawingProperty +{ +// Lifecycle +public: + virtual ~_IconListItemDrawingProperty(void); + + static _IconListItemDrawingProperty* CreateInstanceN(void); + +// Operations +public: + result Initialize(void); + +// Accessor +public: + const Tizen::Graphics::Color GetBackgroundColor(IconListViewItemDrawingStatus status) const; + + result SetTextSize(float size); + + float GetTextSize(void) const; + + result SetFont(Tizen::Graphics::Font* pFont); + + Tizen::Graphics::Font* GetFont(void) const; + + result SetTextColor(IconListViewItemDrawingStatus status, const Tizen::Graphics::Color color); + + const Tizen::Graphics::Color GetTextColor(IconListViewItemDrawingStatus status) const; + + const Tizen::Graphics::Color GetTextBackgroundColor(void) const; + + const Tizen::Graphics::Color GetBorderColor(bool isFocused) const; + + result SetItemLayout(void); + + result SetItemBitmapBounds(const Tizen::Graphics::FloatRectangle bounds); + + Tizen::Graphics::FloatRectangle GetItemBitmapBounds(void) const; + + Tizen::Graphics::FloatDimension GetItemBitmapSize(void) const; + + result SetItemSize(const Tizen::Graphics::FloatDimension size); + + Tizen::Graphics::FloatDimension GetItemSize(void) const; + + float GetTextXPosition(void) const; + + float GetTextYPosition(void) const; + + float GetTwoLineTextYPosition(void) const; + + float GetTextAreaWidth(void) const; + + float GetTextVerticalMargin(void) const; + + result SetCheckBoxPosition(IconListViewCheckBoxPosition position); + + IconListViewCheckBoxPosition GetCheckBoxPosition(void) const; + + result SetBorderStyle(IconListViewItemBorderStyle style); + + IconListViewItemBorderStyle GetBorderStyle(void) const; + + result SetTextHorizontalAlignment(HorizontalAlignment alignment); + + HorizontalAlignment GetTextHorizontalAlignment(void) const; + + result SetTextVerticalAlignment(IconListViewItemTextVerticalAlignment alignment); + + IconListViewItemTextVerticalAlignment GetTextVerticalAlignment(void) const; + + const Tizen::Graphics::Bitmap* GetDropShadowBitmap(void) const; + + const Tizen::Graphics::Bitmap* GetFocusBitmap(void) const; + + float GetDropShadowBorderWidth(void) const; + + float GetDropShadowMargin(void) const; + + Tizen::Graphics::FloatRectangle GetDropShadowBitmapBounds(void) const; + + const Tizen::Graphics::Bitmap* GetCheckBitmap(void) const; + + const Tizen::Graphics::Bitmap* GetCheckedBackgroundBitmap(void) const; + + const Tizen::Graphics::Bitmap* GetUnCheckedBackgroundBitmap(void) const; + + const Tizen::Graphics::Bitmap* GetDisabledCheckBitmap(void) const; + + void SetItemCheckedStyle(bool checkStyle); + + bool IsItemCheckedStyle(void) const; + + float GetCheckMargin(void) const; + + float GetOverlayMargin(void) const; + + float GetSelectBackgroundMargin(void) const; + + void SetDrawingFlag(void); + + bool IsChanged(void) const; + + int AddRef(void); + + int Release(void); + + void SetItemBitmapAsAspectRatio(bool isAspect); + + bool IsItemBitmapAsAspectRatio(void) const; + + void SetAccessibilityEnabled(bool enabled); + + bool IsAccessibilityEnabled(void); + +// Inquiry +public: + +private: + _IconListItemDrawingProperty(void); + _IconListItemDrawingProperty(const _IconListItemDrawingProperty& rhs); + _IconListItemDrawingProperty& operator =(const _IconListItemDrawingProperty& rhs); + +// Attribute +private: + float __textSize; + Tizen::Graphics::Font* __pFont; + + Tizen::Graphics::Color __normalTextColor; + Tizen::Graphics::Color __pressedTextColor; + Tizen::Graphics::Color __highlightedTextColor; + + Tizen::Graphics::FloatDimension __size; + Tizen::Graphics::FloatRectangle __bitmapBounds; + + Tizen::Graphics::Bitmap* __pDropShadowBitmap; + Tizen::Graphics::Bitmap* __pFocusBitmap; + Tizen::Graphics::Bitmap* __pDropShadowBitmapWithReplacementColor; + + float __dropShadowBorderWidth; + float __dropShadowMargin; + + Tizen::Graphics::Bitmap* __pCheckBitmap; + Tizen::Graphics::Bitmap* __pCheckedBackgroundBitmap; + Tizen::Graphics::Bitmap* __pUnCheckedBackgroundBitmap; + Tizen::Graphics::Bitmap* __pDisabledCheckBitmap; + + float __checkMargin; + float __overlayMargin; + + Tizen::Graphics::Color __pressedBackgroundColor; + Tizen::Graphics::Color __normalBorderColor; + Tizen::Graphics::Color __focusBorderColor; + Tizen::Graphics::Color __inTextBackgroundColor; + + float __textYPos; + float __2LineTextYPos; + + IconListViewCheckBoxPosition __checkBoxPosition; + IconListViewItemBorderStyle __borderStyle; + HorizontalAlignment __textHorizontalAlignment; + IconListViewItemTextVerticalAlignment __textVerticalAlignment; + + int __refCount; + + bool __changed; + + bool __asAspectRatio; + bool __checkedStyle; + + float __verticalExtent; + float __insideOneLineTextHeight; + float __insideTwoLineTextHeight; + + float __selectBackgroundMargin; + float __itemTextHorizontalMargin; + float __itemTextVerticalMargin; + + bool __accessibilityEnabled; + bool __customColorSet; +}; // _IconListItemDrawingProperty + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_ICON_LIST_ITEM_DRAWING_PROPERTY_H_ diff --git a/src/ui/inc/FUiCtrl_IconListItemProvider.h b/src/ui/inc/FUiCtrl_IconListItemProvider.h new file mode 100644 index 0000000..9cad487 --- /dev/null +++ b/src/ui/inc/FUiCtrl_IconListItemProvider.h @@ -0,0 +1,57 @@ +// +// 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_IconListItemProvider.h + * @brief This is the header file for the _IconListItemProvider class. + * + * This header file contains the declarations of the _IconListItemProvider class. + */ + +#ifndef _FUI_CTRL_ICON_LIST_PROVIDER_H_ +#define _FUI_CTRL_ICON_LIST_PROVIDER_H_ + +// Includes +#include +#include +// forward declarations +namespace Tizen { namespace Ui { namespace Controls +{ + +class _IconListImpl; + +class _IconListItemProvider + : public IIconListViewItemProvider +{ +public: + _IconListItemProvider(_IconListImpl* pIconList); + virtual ~_IconListItemProvider(void); + + int GetItemCount(void); + IconListViewItem* CreateItem(int index); + bool DeleteItem(int index, IconListViewItem* pItem); + +private: + _IconListItemProvider(const _IconListItemProvider& rhs); + _IconListItemProvider& operator =(const _IconListItemProvider& rhs); + +private: + _IconListImpl* __pIconListImpl; +}; + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_ICON_LIST_PROVIDER_H_ diff --git a/src/ui/inc/FUiCtrl_IconListItemProviderAdaptor.h b/src/ui/inc/FUiCtrl_IconListItemProviderAdaptor.h new file mode 100644 index 0000000..bccfb92 --- /dev/null +++ b/src/ui/inc/FUiCtrl_IconListItemProviderAdaptor.h @@ -0,0 +1,90 @@ +// +// 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_IconListItemProviderAdaptor.h + * @brief This is the header file for the _IconListItemProviderAdaptor class. + */ + +#ifndef _FUI_CTRL_INTERNAL_ICON_LIST_ITEM_PROVIDER_ADAPTOR_H_ +#define _FUI_CTRL_INTERNAL_ICON_LIST_ITEM_PROVIDER_ADAPTOR_H_ + +#include + +#include "FUiCtrl_IListItemProviderAdaptor.h" + +namespace Tizen { namespace Ui +{ + +namespace Animations +{ +class _VisualElement; +} // Tizen::Ui::Animations + +namespace Controls +{ + +class _IconListItemProviderAdaptor + : public _IListItemProviderAdaptor +{ +// Lifecycle +public: + _IconListItemProviderAdaptor(void); + + virtual ~_IconListItemProviderAdaptor(void); + +// Operation + _IListItemCommon* GetBlankItem(void) const; + +// Accessor + virtual void SetItemProvider(void* pProvider); + + IIconListViewItemProvider* GetItemProvider(void) const; + + virtual _IListItemCommon* LoadItem(int groupIndex, int itemIndex); + + virtual result UnloadItem(_IListItemCommon* pListItem, int groupIndex, int itemIndex); + + virtual int GetItemCount(int groupIndex = 0) const; + + virtual int GetGroupCount(void) const; + + virtual result DeleteItem(_IListItemCommon* pListItem, int groupIndex, int itemIndex); + + void SetVisualElement(Tizen::Ui::Animations::_VisualElement* pRoot); + +private: + _IconListItemProviderAdaptor(const _IconListItemProviderAdaptor& rhs); + _IconListItemProviderAdaptor& operator =(const _IconListItemProviderAdaptor& rhs); + +// Attribute +private: + static const int DEFAULT_GROUP_INDEX = 0; + static const int DEFAULT_GROUP_COUNT = 1; + static const int GROUP_TITLE_INDEX = -1; + + IIconListViewItemProvider* __pItemProvider; + + _IListItemCommon* __pBlankItem; + + Tizen::Ui::Animations::_VisualElement* __pRoot; + +}; // _IconListItemProviderAdaptor + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_ICON_LIST_ITEM_PROVIDER_ADAPTOR_H_ diff --git a/src/ui/inc/FUiCtrl_IconListPresenter.h b/src/ui/inc/FUiCtrl_IconListPresenter.h new file mode 100644 index 0000000..b93d51e --- /dev/null +++ b/src/ui/inc/FUiCtrl_IconListPresenter.h @@ -0,0 +1,490 @@ +// +// 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_IconListPresenter.h + * @brief This is the header file for the _IconListPresenter class. + */ + +#ifndef _FUI_CTRL_INTERNAL_ICON_LIST_PRESENTER_H_ +#define _FUI_CTRL_INTERNAL_ICON_LIST_PRESENTER_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "FUi_IAccessibilityListener.h" +#include "FUi_ControlImpl.h" +#include "FUi_UiTouchEvent.h" +#include "FUiCtrl_FlickAnimation.h" +#include "FUiCtrl_IconListUtils.h" +#include "FUiCtrl_IconListViewItemEventArg.h" +#include "FUiCtrl_IScrollEventListener.h" + +namespace Tizen { namespace Ui +{ +class _AccessibilityElement; +}} + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _IconListItem; +class _IconListItemDrawingProperty; +class _IconListItemProviderAdaptor; +class _IconListView; +class _IListItemProviderAdaptor; +class _ListViewModel; + +class _IconListPresenter + : public Tizen::Base::Object + , public Tizen::Base::Runtime::ITimerEventListener + , public _IAccessibilityListener + , virtual public Tizen::Base::Runtime::IEventListener + , virtual public _IScrollEventListener +{ +// Lifecycle +public: + virtual ~_IconListPresenter(void); + + static _IconListPresenter* CreateInstanceN(_IconListView& pIconListView); + +// Operations +public: + result Draw(void); + +// Accessor +public: + result SetItemProvider(const IIconListViewItemProvider& provider); + + result RegisterItemProviderAdaptor(_IListItemProviderAdaptor* pItemProviderAdaptor); + + result SetScrollDirection(IconListViewScrollDirection scrollDirection); + + result SetMargin(MarginType type, float value); + + float GetMargin(MarginType type) const; + + result SetItemSpacing(float horizontalSpacing, float verticalSpacing); + + float GetItemHorizontalSpacing(void) const; + + float GetItemVerticalSpacing(void) const; + + void SetUseCheckedStyle(bool checkedStyle); + + result SetItemChecked(int index, bool check); + + bool IsItemChecked(int index) const; + + int GetItemIndexFromPosition(float x, float y) const; + + int GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& position) const; + + result SetTextHorizontalAlignment(HorizontalAlignment alignment); + + result SetTextVerticalAlignment(IconListViewItemTextVerticalAlignment alignment); + + HorizontalAlignment GetTextHorizontalAlignment(void) const; + + IconListViewItemTextVerticalAlignment GetTextVerticalAlignment(void) const; + + result SetItemTextColor(IconListViewItemDrawingStatus status, const Tizen::Graphics::Color& color); + + const Tizen::Graphics::Color GetItemTextColor(IconListViewItemDrawingStatus status) const; + + result SetItemTextSize(float size); + + float GetItemTextSize(void) const; + + result SetCheckBoxPosition(IconListViewCheckBoxPosition position); + + IconListViewCheckBoxPosition GetCheckBoxPosition(void) const; + + result SetTouchAnimationEnabled(bool enable); + + bool IsTouchAnimationEnabled(void) const; + + result ScrollToItem(int index); + + result ScrollByPixel(float pixel); + + result RefreshList(int index, ListRefreshType type); + + result UpdateList(void); + + result SetItemBitmapBounds(const Tizen::Graphics::FloatRectangle& bounds); + + Tizen::Graphics::FloatRectangle GetItemBitmapBounds(void) const; + + result GetItemBitmapSize(float& width, float& height) const; + + Tizen::Graphics::FloatDimension GetItemBitmapSize(void) const; + + result SetItemSize(const Tizen::Graphics::FloatDimension& size); + + result GetItemSize(float& width, float& height) const; + + Tizen::Graphics::FloatDimension GetItemSize(void) const; + + result SetMagneticScrollSize(int scrollSize); + + int GetMagneticScrollSize(void) const; + + void SetItemCountPerAxis(int itemCountPerAxis); + + int GetItemCountPerAxis(void) const; + + result SetItemLayoutHorizontalAlignment(HorizontalAlignment alignment); + + result SetItemLayoutVerticalAlignment(VerticalAlignment alignment); + + HorizontalAlignment GetItemLayoutHorizontalAlignment(void) const; + + VerticalAlignment GetItemLayoutVerticalAlignment(void) const; + + result SetItemBorderStyle(IconListViewItemBorderStyle borderStyle); + + IconListViewItemBorderStyle GetItemBorderStyle(void) const; + + _IconListItemDrawingProperty* GetItemDrawingProperty(void) const; + + void ClearVisualElement(void); + + result SetNonSlidableList(void); + + result AddItem(_IconListItem* pItem); + + result InsertItemAt(int index, _IconListItem* pItem); + + result SetItemAt(int index, _IconListItem* pItem); + + result RemoveItemAt(int index); + + result RemoveAllItems(void); + + void SetItemBitmapAsAspectRatio(bool isAspect); + + bool IsItemBitmapAsAspectRatio(void) const; + + result SetReorderModeEnabled(bool enable); + + void ScrollFadeOut(bool showEffect = false); + +// Inquiry +public: + // Tizen::Ui::_Control + virtual void OnBoundsChanged(void); + virtual void OnFontInfoRequested(unsigned long& style, float& size); + 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 + virtual bool OnPreviewKeyPressed(const _Control& source, const _KeyInfo& keyInfo); + virtual bool OnPreviewKeyReleased(const _Control& source, const _KeyInfo& keyInfo); + + // Tizen::Ui::_IKeyEventListener + virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo); + virtual bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo); + + // Tizen::Ui::_INotificationEventPreviewer + virtual bool OnPreviewNotifiedN(const _Control& source, Tizen::Base::Collection::IList* pArgs); + + // Tizen::Ui::_INotificationEventListener + virtual bool OnNotifiedN(const _Control& source, Tizen::Base::Collection::IList* pArgs); + + // Tizen::Ui::_ITouchEventPreviewer + virtual _UiTouchEventDelivery OnPreviewTouchReleased(const _Control& source, const _TouchInfo& touchinfo); + + // Tizen::Ui::_ITouchEventListener + 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); + + // GestureListener Callback API + bool OnFlickGestureDetected(bool isFlicked, const Tizen::Graphics::Point& flickPosition, int flickTime); + bool OnLongPressGestureDetected(void); + + // Tizen::Base::Runtime::ITimerEventListener + virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer); + + void OnVisibleStateChanged(void); + void OnInputEnableStateChanged(void); + + // Tizen::Ui::_IScrollEventListener + virtual void OnScrollEndReached(Tizen::Ui::_Control& source, ScrollEndEvent type); + virtual void OnScrollPositionChanged(Tizen::Ui::_Control& source, float scrollPosition); + virtual void OnScrollStopped(Tizen::Ui::_Control& source); + virtual void OnScrollJumpToTop(Tizen::Ui::_Control& source); + + // Osp::Ui::Animations::IAnimationTransactionEventListener + virtual void OnAnimationTransactionStarted(int transactionId); + virtual void OnAnimationTransactionStopped(int transactionId); + virtual void OnAnimationTransactionFinished(int transactionId); + + // Tizen::Ui::Animations::IVisualElementAnimationTickEventListener + virtual void OnTickOccurred(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, const Tizen::Ui::Variant& currentValue); + + // Tizen::Ui::Animations::IVisualElementAnimationStatusEventListener + 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); + + // accessibility listener + virtual bool OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityFocusMovedPrevious(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityReadingElement(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityFocusOut(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityValueIncreased(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityValueDecreased(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityItemRefreshed(const _AccessibilityContainer& control, const _AccessibilityElement& element, _AccessibilityFocusDirection direction); + +protected: + result Dispose(void); + result Initialize(void); + result InitializeFont(void); + +protected: + result AddGroupAndRestoreItem(bool restoreItem); + result DrawEmptyList(void); + result DrawHorizontalScrollList(void); + result DrawVerticalScrollList(void); + + void AdjustLayout(void); + void UpdateDrawnIndex(void); + + void HideItems(int startIndex, int endIndex); + + result RedrawItem(int index, bool drawFocusUi = false, bool doShow = true); + + result FireIconListViewItemEvent(_IconListViewItemEventType eventType, int index, int arg); + result FireScrollEndReachedEvent(ScrollEndEvent type); + result FireScrollPositionChangedEvent(float scrollPosition); + result FireScrollStoppedEvent(); + result FireScrollEvent(); + + bool SetScrollPosition(float position, bool enableFadeEffect = true); + + float GetMagneticScrollPosition(void) const; + float GetMagneticScrollPosition(float scrollPosition) const; + + void TranslateIconListItemPosition(float& x, float& y); + + Tizen::Graphics::FloatRectangle GetItemBounds(int index) const; + + int CalculateFlickAmount(int distance, int duration); + + // visual interaction animation + void StartScrollToAnimation(float targetPosition); + void StopScrollToAnimation(void); + void StopAllAnimations(void); + + void AddAnimation(_IconListItem& item, int index, int delay = 0); + void RemoveAnimation(_IconListItem& item, int index); + void MoveAnimation(_IconListItem& item, Tizen::Graphics::FloatRectangle& bounds, int delay = 0); + void MoveAnimation(_IconListItem& item, Tizen::Graphics::FloatRectangle& bounds, int delay, bool fadeIn); + void MoveAnimation(_IconListItem& item, Tizen::Graphics::FloatRectangle& startBounds, Tizen::Graphics::FloatRectangle& endBounds, int delay = 0); + void RemoveAllAnimation(_IconListItem& item); + + void MoveForward(int index); + void MoveBackward(int index); + bool IsAnimationRunning(int transactionId); + +private: + _IconListPresenter(_IconListView* pIconListView, _ListViewModel* pListModel); + _IconListPresenter(const _IconListPresenter& rhs); + _IconListPresenter& operator =(const _IconListPresenter& rhs); + + virtual bool OnTouchActionActivated(const _Control& source, const _TouchInfo& touchinfo); + +private: + void FireEventAfterTouchRelease(int index); + + void PrepareReordering(void); + void DoReordering(const Tizen::Graphics::FloatPoint& movedPosition); + void CheckAndReorderItem(float movedX, float movedY); + void SwapReorderedItems(int toIndex, bool singleItemChanged); + void FinishReordering(void); + void ClearReorderingInformation(void); + + result StartTouchActionTimer(void); + result ResetTouchActionTimer(void); + + result StartMagneticScrollTimer(void); + result ResetMagneticScrollTimer(void); + + result StartReorderScrollTimer(void); + result ResetReorderScrollTimer(void); + void StartReorderScrollAnimation(void); + + result StartAnimationTimer(int delay); + result ResetAnimationTimer(void); + + result StartRunningAnimationCheckTimer(void); + result ResetRunningAnimationCheckTimer(void); + + result StartFirstShowScrollTimer(void); + result ResetFirstShowScrollTimer(void); + + void StartSelectAnimation(int index); + void StartCheckAnimation(int index); + result DrawCheckAnimation(int index); + void PreDrawCheckAnimation(int index); + + void SetAccessibilityElement(int itemIndex, _IconListItem* pItem); + void MakeDummyAccessibilityElement(int itemIndex, bool ahead); + void RequestToDrawAccessibilityFocusUi(void); + + 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; + static const int INVALID_INDEX = -1; + static const int ITEM_CACHE_SIZE_MULTIPLIER = 5; + static const int MINIMUM_FLICK_EFFECT_TIME = 80; + static const int FLICK_ANIMATION_DURATION = 1000; + static const int FLICK_ANIMATION_TIMER_PERIOD = 10; + static const int MAGNETIC_SCROLL_TIMER_PERIOD = 10; + static const int SELECTION_ANIMATION_TIMER_PERIOD = 30; + static const int TOUCH_ACTION_TIMER_PERIOD = 100; + static const int REORDER_SCROLL_TIMER_PERIOD = 20; + static const float REORDER_SCROLL_ANIMATION_DISTANCE; + static const int ITEM_ANIMATION_DURATION = 333; + static const int ITEM_ANIMATION_DELAY = 334; + static const int MOVE_ITEM_ANIMATION_DURATION = 500; + static const int MOVE_ITEM_ANIMATION_DELAY = 167; + static const int SCREEN_WIDTH = 480; + static const int SCREEN_HEIGHT = 800; + static const int NEEDED_FLICK_COUNT_FOR_FINGER_FASTSCROLL = 3; + static const int OVERSCROLLING_MAX_DISTANCE = 400; + static const int SCROLL_FLICK_IN_PIXEL_UNIT = 1000; + static const int SCROLL_FLICK_WEIGHT_VELOCITY = 1; + static const int SCROLL_FLICK_WEIGHT_DISTANCE = 5; + static const int SCROLL_FLICK_ALPHA_PER_PIXEL = 3; + + _ListViewModel* __pListModel; + _IconListView* __pIconListView; + _IListItemProviderAdaptor* __pItemProviderAdaptor; + Tizen::Graphics::Color __backgroundColor; + Tizen::Ui::_TouchInfo __currentTouchInfo; + int __selectedOverlayBitmapId; + int __selectedIndex; + int __checkedIndex; + int __previousIndex; + int __previousCheckIndex; + int __highlightedIndex; + int __firstDrawnIndex; + int __lastDrawnIndex; + bool __firstDrawnItemFullyDrawn; + bool __lastDrawnItemFullyDrawn; + IconListViewScrollDirection __scrollDirection; + float __topMargin; + float __bottomMargin; + float __leftMargin; + float __rightMargin; + float __horizontalSpacing; + float __verticalSpacing; + int __magneticScrollSize; + int __itemCountPerAxis; + HorizontalAlignment __itemHorizontalAlignment; + VerticalAlignment __itemVerticalAlignment; + float __scrollPosition; + float __unitScrollLength; + float __scrollLength; + float __unitLengthOfAxis; + float __startPosOfAxis; + float __endPosOfAxis; + int __checkedRadioIndex; + bool __isItemChecked; + _IconListItemDrawingProperty* __pItemDrawingProperty; + Tizen::Base::Runtime::Timer* __pTouchActionTimer; + Tizen::Base::Runtime::Timer* __pMagneticScrollTimer; + Tizen::Base::Runtime::Timer* __pAnimationTimer; + Tizen::Base::Runtime::Timer* __pRunningAnimationCheckTimer; + Tizen::Base::Runtime::Timer* __pFirstShowScrollTimer; + _IconListUtils::MagneticScrollAnimation __magneticScrollAnimation; + bool __isTouchAnimationEnabled; + bool __previousTouchAnimatinEnabled; + bool __isLayoutChanged; + bool __isTouchPressed; + bool __onDrawing; + bool __requireNextDrawing; + bool __alreadyDrawn; + bool __enableCustomItemProviderAdaptor; + bool __listStatusChanged; + bool __needBaseCanvas; + bool __isSelectionDelayed; + bool __isCheckAnimationRunning; + bool __isSelectAnimationRunning; + + Tizen::Ui::Animations::_VisualElement* __pPreviousAnimationVE; + Tizen::Ui::Animations::_VisualElement* __pRemoveItemVE; + Tizen::Ui::Animations::_VisualElement* __pEmptyListVE; + Tizen::Ui::Animations::_VisualElement* __pVE; + Tizen::Ui::Animations::_VisualElement* __pSelectAnimationVE; + Tizen::Ui::Animations::_VisualElement* __pCheckAnimationVE; + Tizen::Ui::Animations::_VisualElement* __pPreviousSelectAnimationVE; + Tizen::Ui::Animations::_VisualElement* __pPreviousCheckAnimationVE; + + // reorder + bool __onReordering; + int __reorderFromIndex; + int __reorderToIndex; + Tizen::Graphics::FloatPoint __lastReorderedPosition; + Tizen::Graphics::FloatPoint __lastReorderedDifferences; + Tizen::Graphics::FloatRectangle __reorderItemBounds; + Tizen::Base::Runtime::Timer* __pReorderScrollTimer; + float __reorderScrollAnimationDistance; + float __scrollPositionBeforeScrollAnimation; + + bool __flickRunning; + + int __animationItemIndex; + int __previousAnimationItemIndex; + int __addTransactionId; + int __removeTransactionId; + int __moveTransactionId; + + bool __firstTouchMove; + IconListViewScrollDirection __firstTouchMoveDirection; + bool __RequestToDrawAccessibilityFocusUi; + int __runningAnimationBackupIndex; + bool __lazyDecodeBackGroundBitmap; + bool __lazyDecodeEmptyListBitmap; + bool __needSetAccessibility; +}; // _IconListPresenter + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_ICON_LIST_PRESENTER_H_ diff --git a/src/ui/inc/FUiCtrl_IconListUtils.h b/src/ui/inc/FUiCtrl_IconListUtils.h new file mode 100644 index 0000000..dffece7 --- /dev/null +++ b/src/ui/inc/FUiCtrl_IconListUtils.h @@ -0,0 +1,114 @@ +// +// 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_IconListUtils.h + * @brief This is the header file for the _IconListUtils. + */ + +#ifndef _FUI_CTRL_INTERNAL_ICON_LIST_UTILS_H_ +#define _FUI_CTRL_INTERNAL_ICON_LIST_UTILS_H_ + +#include + +#include "FUiCtrl_ListItemCommon.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +namespace _IconListUtils +{ + +static const int MAGNETIC_SCROLL_EFFECT_DIVIDER = 5; + +class TouchAnimation +{ +public: + TouchAnimation(void); + + virtual ~TouchAnimation(void); + + bool GetTouchAnimationFrame(float& ratio); + + float GetCurrentAnimationFrame(void) const; + + void StartAnimation(void); + +private: + TouchAnimation(const TouchAnimation& rhs); + TouchAnimation& operator =(const TouchAnimation& rhs); + +private: + static const int FRAME_COUNT = 16; + static const float FRAME_RATIO[FRAME_COUNT]; + int __frame; +}; // _TouchAnimation + +class MagneticScrollAnimation +{ +public: + MagneticScrollAnimation(void); + + virtual ~MagneticScrollAnimation(void); + + bool GetMagneticScrollAnimationFrame(float& diff); + + void StartAnimation(float scroll); + +private: + MagneticScrollAnimation(const MagneticScrollAnimation& rhs); + MagneticScrollAnimation& operator =(const MagneticScrollAnimation& rhs); + +private: + float __scroll; +}; // _MagneticScrollAnimation + +class CheckAnimation +{ +public: + CheckAnimation(void); + + virtual ~CheckAnimation(void); + + bool GetCheckAnimationFrame(float& ratio); + + float GetCurrentAnimationFrame(void) const; + + void StartAnimation(void); + +private: + CheckAnimation(const CheckAnimation& rhs); + CheckAnimation& operator =(const CheckAnimation& rhs); + +private: + static const int FRAME_COUNT = 5; + int __frame; +}; // _CheckAnimation + +class EnumConverter +{ +public: + static ListItemState ConvertIconListViewItemDrawingStatusToListItemState(IconListViewItemDrawingStatus status); + + static IconListViewItemDrawingStatus ConvertListItemStateToIconListViewItemDrawingStatus(ListItemState state); +}; // _EnumConverter + +} // Tizen::Ui::Controls::_IconListUtils + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_ICON_LIST_UTILS_H_ diff --git a/src/ui/inc/FUiCtrl_IconListView.h b/src/ui/inc/FUiCtrl_IconListView.h new file mode 100644 index 0000000..78f86cc --- /dev/null +++ b/src/ui/inc/FUiCtrl_IconListView.h @@ -0,0 +1,418 @@ +// +// 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_IconListView.h + * @brief This is the header file for the _IconListView class. + */ + +#ifndef _FUI_CTRL_INTERNAL_ICON_LIST_VIEW_H_ +#define _FUI_CTRL_INTERNAL_ICON_LIST_VIEW_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "FUi_ITouchFlickGestureEventListener.h" +#include "FUi_ITouchLongPressGestureEventListener.h" +#include "FUiCtrl_Scroll.h" + +namespace Tizen { namespace Ui +{ +class _TouchFlickGestureDetector; +class _TouchLongPressGestureDetector; + +namespace Animations +{ +class _VisualElement; +} // Tizen::Ui::Animations + +namespace Controls +{ +class IIconListViewItemProvider; +class _IconListPresenter; +class _IconListItem; +class _IIconListItemEventListener; +class _IListItemProviderAdaptor; +class _UiIconListItemEvent; +class _UiScrollEvent; + +class _OSP_EXPORT_ _IconListView + : public _Control + , public _IPropertyChangeEventListener + , public _ITouchFlickGestureEventListener + , public _ITouchLongPressGestureEventListener + , public Tizen::Ui::Animations::IAnimationTransactionEventListener + , public Tizen::Ui::Animations::IVisualElementAnimationStatusEventListener + , public Tizen::Ui::Animations::IVisualElementAnimationTickEventListener + , virtual public Tizen::Base::Runtime::IEventListener + , virtual public _ITouchGestureEventListener + , virtual public _IUiEventListener + , virtual public _IUiEventPreviewer +{ + DECLARE_CLASS_BEGIN(_IconListView, _Control); + DECLARE_PROPERTY("textColorOfEmptyList", GetPropertyTextColorOfEmptyList, SetPropertyTextColorOfEmptyList); + DECLARE_PROPERTY("textOfEmptyList", GetPropertyTextOfEmptyList, SetPropertyTextOfEmptyList); + DECLARE_PROPERTY("itemTextSize", GetPropertyItemTextSize, SetPropertyItemTextSize); + DECLARE_PROPERTY("textHorizontalAlignment", GetPropertyTextHorizontalAlignment, SetPropertyTextHorizontalAlignment); + DECLARE_PROPERTY("textVerticalAlignment", GetPropertyTextVerticalAlignment, SetPropertyTextVerticalAlignment); + DECLARE_PROPERTY("checkBoxPosition", GetPropertyCheckBoxPosition, SetPropertyCheckBoxPosition); + DECLARE_PROPERTY("touchAnimationEnabled", GetPropertyTouchAnimationEnabled, SetPropertyTouchAnimationEnabled); + DECLARE_PROPERTY("itemLayoutHorizontalAlignment", GetPropertyItemLayoutHorizontalAlignment, SetPropertyItemLayoutHorizontalAlignment); + DECLARE_PROPERTY("itemLayoutVerticalAlignment", GetPropertyItemLayoutVerticalAlignment, SetPropertyItemLayoutVerticalAlignment); + DECLARE_PROPERTY("itemBorderStyle", GetPropertyItemBorderStyle, SetPropertyItemBorderStyle); + DECLARE_PROPERTY("magneticScrollSize", GetPropertyMagneticScrollSize, SetPropertyMagneticScrollSize); + DECLARE_CLASS_END(); + + // Properties + result SetPropertyTextColorOfEmptyList(const Variant& color); + Variant GetPropertyTextColorOfEmptyList(void) const; + + result SetPropertyTextOfEmptyList(const Variant& text); + Variant GetPropertyTextOfEmptyList(void) const; + + result SetPropertyItemTextSize(const Variant& size); + Variant GetPropertyItemTextSize(void) const; + + result SetPropertyTextHorizontalAlignment(const Variant& alignment); + Variant GetPropertyTextHorizontalAlignment(void) const; + + result SetPropertyTextVerticalAlignment(const Variant& alignment); + Variant GetPropertyTextVerticalAlignment(void) const; + + result SetPropertyCheckBoxPosition(const Variant& position); + Variant GetPropertyCheckBoxPosition(void) const; + + result SetPropertyTouchAnimationEnabled(const Variant& enabled); + Variant GetPropertyTouchAnimationEnabled(void) const; + + result SetPropertyItemLayoutHorizontalAlignment(const Variant& alignment); + Variant GetPropertyItemLayoutHorizontalAlignment(void) const; + + result SetPropertyItemLayoutVerticalAlignment(const Variant& alignment); + Variant GetPropertyItemLayoutVerticalAlignment(void) const; + + result SetPropertyItemBorderStyle(const Variant& style); + Variant GetPropertyItemBorderStyle(void) const; + + result SetPropertyMagneticScrollSize(const Variant& alignment); + Variant GetPropertyMagneticScrollSize(void) const; + +// Lifecycle +public: + virtual ~_IconListView(void); + + static _IconListView* CreateIconListViewN(IconListViewStyle style = ICON_LIST_VIEW_STYLE_NORMAL); + + result Dispose(void); + +// Operations +public: + result Initialize(_IconListPresenter& presenter); + +// Accessor +public: + result SetItemProvider(const IIconListViewItemProvider& provider); + + result RegisterItemProviderAdaptor(_IListItemProviderAdaptor* pItemProviderAdaptor); + + result AddIconListItemEventListener(const _IIconListItemEventListener& listener); + + result RemoveIconListItemEventListener(const _IIconListItemEventListener& listener); + + result AddScrollEventListener(const _IScrollEventListener& listener); + + result RemoveScrollEventListener(const _IScrollEventListener& listener); + + result SetStyle(IconListViewStyle style); + + IconListViewStyle GetStyle(void) const; + + result SetScrollDirection(IconListViewScrollDirection scrollDirection); + + result SetScrollStyle(IconListViewScrollStyle scrollStyle); + + IconListViewScrollStyle GetScrollStyle(void) const; + + result SetBackgroundBitmap(const Tizen::Graphics::Bitmap* pBitmap); + + const Tizen::Graphics::Bitmap* GetBackgroundBitmap(void) const; + + result SetMargin(MarginType type, float value); + + float GetMargin(MarginType type) const; + + result SetItemSpacing(float horizontalSpacing, float verticalSpacing); + + float GetItemHorizontalSpacing(void) const; + + float GetItemVerticalSpacing(void) const; + + result SetItemChecked(int index, bool check); + + bool IsItemChecked(int index) const; + + int GetItemIndexFromPosition(float x, float y) const; + + int GetItemIndexFromPosition(const Tizen::Graphics::Point& position) const; + + int GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& position) const; + + result SetTextHorizontalAlignment(HorizontalAlignment alignment); + + result SetTextVerticalAlignment(IconListViewItemTextVerticalAlignment alignment); + + HorizontalAlignment GetTextHorizontalAlignment(void) const; + + IconListViewItemTextVerticalAlignment GetTextVerticalAlignment(void) const; + + result SetTextOfEmptyList(const Tizen::Base::String& text); + + const Tizen::Base::String GetTextOfEmptyList(void) const; + + result SetTextColorOfEmptyList(const Tizen::Graphics::Color& color); + + const Tizen::Graphics::Color GetTextColorOfEmptyList(void) const; + + result SetTextSizeOfEmptyList(float size); + + float GetTextSizeOfEmptyList(void) const; + + result SetItemTextColor(IconListViewItemDrawingStatus status, const Tizen::Graphics::Color& color); + + const Tizen::Graphics::Color GetItemTextColor(IconListViewItemDrawingStatus status) const; + + result SetItemTextSize(float size); + + float GetItemTextSize(void) const; + + result SetCheckBoxPosition(IconListViewCheckBoxPosition position); + + IconListViewCheckBoxPosition GetCheckBoxPosition(void) const; + + result SetTouchAnimationEnabled(bool enable); + + bool IsTouchAnimationEnabled(void) const; + + result ScrollToItem(int index); + + result ScrollByPixel(float pixel); + + result RefreshList(int index, ListRefreshType type); + + result UpdateList(void); + + result SetItemBitmapBounds(const Tizen::Graphics::Rectangle& bounds); + + result SetItemBitmapBounds(const Tizen::Graphics::FloatRectangle& bounds); + + const Tizen::Graphics::FloatRectangle GetItemBitmapBounds(void) const; + + result GetItemBitmapSize(float& width, float& height) const; + + const Tizen::Graphics::FloatDimension GetItemBitmapSize(void) const; + + result SetItemSize(const Tizen::Graphics::FloatDimension& size); + + result GetItemSize(float& width, float& height) const; + + const Tizen::Graphics::FloatDimension GetItemSize(void) const; + + result SetMagneticScrollSize(int scrollSize); + + int GetMagneticScrollSize(void) const; + + int GetItemCountPerAxis(void) const; + + result SetItemLayoutHorizontalAlignment(HorizontalAlignment alignment); + + result SetItemLayoutVerticalAlignment(VerticalAlignment alignment); + + HorizontalAlignment GetItemLayoutHorizontalAlignment(void) const; + + VerticalAlignment GetItemLayoutVerticalAlignment(void) const; + + result SetItemBorderStyle(IconListViewItemBorderStyle borderStyle); + + IconListViewItemBorderStyle GetItemBorderStyle(void) const; + + result SetBitmapOfEmptyList(const Tizen::Graphics::Bitmap* pBitmap); + + const Tizen::Graphics::Bitmap* GetBitmapOfEmptyList(void) const; + + result SetNonSlidableList(void); + + result AddItem(_IconListItem* pItem); + + result InsertItemAt(int index, _IconListItem* pItem); + + result SetItemAt(int index, _IconListItem* pItem); + + result RemoveItemAt(int index); + + result RemoveAllItems(void); + + result SetScroll(const Tizen::Graphics::FloatRectangle& bounds, _ScrollDirection scrollDirection); + + _Scroll* GetScroll(void) const; + + void SetItemBitmapAsAspectRatio(bool isAspect); + + bool IsItemBitmapAsAspectRatio(void) const; + + _UiIconListItemEvent* GetIconListItemEvent(void) const; + + _UiScrollEvent* GetScrollEvent(void) const; + + result SetReorderModeEnabled(bool enable); + + bool IsInReorderingMode(void) const; + + void SetScrollInputMode(ScrollInputMode mode); + + ScrollInputMode GetScrollInputMode(void) const; + + // Event handling APIs + _TouchLongPressGestureDetector* GetLongPressGesture(void) const; + result SetLongPressGesture(_TouchLongPressGestureDetector* pLongPress); + _TouchFlickGestureDetector* GetFlickGesture(void) const; + result SetFlickGesture(_TouchFlickGestureDetector* pFlick); + + Tizen::Ui::Animations::VisualElementValueAnimation* GetScrollingAnimation(void) const; + +// Inquiry +public: + // Tizen::Ui::_Control + virtual void OnBoundsChanged(void); + virtual void OnDraw(void); + virtual void OnAncestorVisibleStateChanged(const _Control& control); + virtual void OnAncestorEnableStateChanged(const _Control& control); + virtual void OnAncestorInputEnableStateChanged(const _Control& control); + virtual void OnChangeLayout(_ControlOrientation orientation); + virtual void OnFontInfoRequested(unsigned long& style, int& size); + virtual void OnFontInfoRequested(unsigned long& style, float& size); + 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 + virtual bool OnPreviewKeyPressed(const _Control& source, const _KeyInfo& keyInfo); + virtual bool OnPreviewKeyReleased(const _Control& source, const _KeyInfo& keyInfo); + + // Tizen::Ui::_IKeyEventListener + virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo); + virtual bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo); + + // Tizen::Ui::_INotificationEventPreviewer + virtual bool OnPreviewNotifiedN(const _Control& source, Tizen::Base::Collection::IList* pArgs); + + // Tizen::Ui::_INotificationEventListener + virtual bool OnNotifiedN(const _Control& source, Tizen::Base::Collection::IList* pArgs); + + // Tizen::Ui::_ITouchEventPreviewer + virtual _UiTouchEventDelivery OnPreviewTouchReleased(const _Control& source, const _TouchInfo& touchinfo); + + // Tizen::Ui::_ITouchEventListener + 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); + + // GestureListener Callback API + virtual bool OnFlickGestureDetected(_TouchFlickGestureDetector& gesture); + virtual bool OnFlickGestureCanceled(_TouchFlickGestureDetector& gesture); + virtual bool OnLongPressGestureDetected(_TouchLongPressGestureDetector& gesture); + virtual bool OnLongPressGestureCanceled(_TouchLongPressGestureDetector& gesture); + + // data binding event listener + virtual void OnPropertyChanging(Tizen::Ui::_PropertyBase& source, const Tizen::Base::String& name, const Variant& oldProperty, const Variant& newProperty); + virtual void OnPropertyChanged(Tizen::Ui::_PropertyBase& source, const Tizen::Base::String& name, const Variant& oldProperty, const Variant& newProperty); + + virtual void OnVisibleStateChanged(void); + + // Tizen::Ui::_IScrollEventListener + virtual void OnScrollEndReached(Tizen::Ui::_Control& source, ScrollEndEvent type); + virtual void OnScrollPositionChanged(Tizen::Ui::_Control& source, float scrollPosition); + virtual void OnScrollStopped(Tizen::Ui::_Control& source); + + // Tizen::Ui::Animations::IAnimationTransactionEventListener + virtual void OnAnimationTransactionStarted(int transactionId); + virtual void OnAnimationTransactionStopped(int transactionId); + virtual void OnAnimationTransactionFinished(int transactionId); + + // Tizen::Ui::Animations::IVisualElementAnimationTickEventListener + virtual void OnTickOccurred(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, const Tizen::Ui::Variant& currentValue); + + // Tizen::Ui::Animations::IVisualElementAnimationStatusEventListener + 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: + _IconListView(void); + _IconListView(const _IconListView& rhs); + _IconListView& operator =(const _IconListView& rhs); + +// Attribute +private: + static const int SCROLL_ANIMATION_DEFAULT_REPEAT_COUNT = 1; + + _IconListPresenter* __pIconListPresenter; + + _Scroll* __pScroll; + + _UiIconListItemEvent* __pIconListItemEvent; + + _UiScrollEvent* __pScrollEvent; + + // Gesture Event + _TouchFlickGestureDetector* __pGestureFlick; + _TouchLongPressGestureDetector* __pGestureLongPress; + + IconListViewStyle __style; + + IconListViewScrollStyle __scrollStyle; + + Tizen::Graphics::Bitmap* __pBackgroundBitmap; + + Tizen::Base::String __textOfEmptyList; + + Tizen::Graphics::Color __textColorOfEmptyList; + + float __textSizeOfEmptyList; + + Tizen::Graphics::Bitmap* __pBitmapOfEmptyList; + + bool __reorderEnabled; + + Tizen::Ui::Animations::VisualElementValueAnimation* __pScrollingAnimation; + + ScrollInputMode __scrollInputMode; +}; + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_ICON_LIST_VIEW_H_ diff --git a/src/ui/inc/FUiCtrl_IconListViewImpl.h b/src/ui/inc/FUiCtrl_IconListViewImpl.h new file mode 100644 index 0000000..987f740 --- /dev/null +++ b/src/ui/inc/FUiCtrl_IconListViewImpl.h @@ -0,0 +1,211 @@ +// +// 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_IconListViewImpl.h + * @brief This is the header file for the _IconListViewImpl class. + */ + +#ifndef _FUI_CTRL_INTERNAL_ICON_LIST_VIEW_IMPL_H_ +#define _FUI_CTRL_INTERNAL_ICON_LIST_VIEW_IMPL_H_ + +#include + +#include "FUi_ControlImpl.h" +#include "FUiCtrl_IIconListItemEventListener.h" +#include "FUiCtrl_IScrollEventListener.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _IconListView; +class _IconListViewItemEvent; +class _IconListViewItemEventArg; +class _ScrollEvent; + +class _IconListViewImpl + : public _ControlImpl + , public _IIconListItemEventListener + , public _IScrollEventListener + , virtual public Tizen::Base::Runtime::IEventListener +{ +// Lifecycle +public: + virtual ~_IconListViewImpl(void); + + static _IconListViewImpl* CreateIconListViewImplN(IconListView* pIconListView); + + virtual const char* GetPublicClassName(void) const; + + virtual IconListView& GetPublic(void); + +// Operations +public: + result Initialize(IconListView* pIconListView, const Tizen::Graphics::FloatDimension& itemBitmapSize, IconListViewStyle style, IconListViewScrollDirection scrollDirection, IconListViewScrollStyle scrollStyle); + +// Accessor +public: + result SetItemProvider(IIconListViewItemProvider& provider); + + void AddIconListViewItemEventListener(IIconListViewItemEventListener& listener); + + void RemoveIconListViewItemEventListener(IIconListViewItemEventListener& listener); + + void AddScrollEventListener(IScrollEventListener& listener); + + void AddScrollEventListener(IScrollEventListenerF& listener); + + void RemoveScrollEventListener(IScrollEventListener& listener); + + void RemoveScrollEventListener(IScrollEventListenerF& listener); + + result SetBackgroundBitmap(const Tizen::Graphics::Bitmap* pBitmap); + + result SetMargin(MarginType type, float value); + + float GetMargin(MarginType type) const; + + result SetItemSpacing(float horizontalSpacing, float verticalSpacing); + + float GetItemHorizontalSpacing(void) const; + + float GetItemVerticalSpacing(void) const; + + result SetItemChecked(int index, bool check); + + bool IsItemChecked(int index) const; + + int GetItemIndexFromPosition(float x, float y) const; + + int GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& position) const; + + result SetTextHorizontalAlignment(HorizontalAlignment alignment); + + result SetTextVerticalAlignment(IconListViewItemTextVerticalAlignment alignment); + + HorizontalAlignment GetTextHorizontalAlignment(void) const; + + IconListViewItemTextVerticalAlignment GetTextVerticalAlignment(void) const; + + result SetTextOfEmptyList(const Tizen::Base::String& text); + + Tizen::Base::String GetTextOfEmptyList(void) const; + + result SetTextColorOfEmptyList(const Tizen::Graphics::Color& color); + + Tizen::Graphics::Color GetTextColorOfEmptyList(void) const; + + result SetItemTextColor(IconListViewItemDrawingStatus status, const Tizen::Graphics::Color& color); + + Tizen::Graphics::Color GetItemTextColor(IconListViewItemDrawingStatus status) const; + + result SetItemTextSize(float size); + + float GetItemTextSize(void) const; + + result SetCheckBoxPosition(IconListViewCheckBoxPosition position); + + IconListViewCheckBoxPosition GetCheckBoxPosition(void) const; + + result SetTouchAnimationEnabled(bool enable); + + bool IsTouchAnimationEnabled(void) const; + + result ScrollToItem(int index); + + result ScrollByPixel(float pixel); + + result RefreshList(int index, ListRefreshType type); + + result UpdateList(void); + + result GetItemBitmapSize(float& width, float& height) const; + + Tizen::Graphics::FloatDimension GetItemBitmapSize(void) const; + + result GetItemSize(float& width, float& height) const; + + Tizen::Graphics::FloatDimension GetItemSize(void) const; + + result SetMagneticScrollSize(int scrollSize); + + int GetMagneticScrollSize(void) const; + + int GetItemCountPerAxis(void) const; + + result SetItemLayoutHorizontalAlignment(HorizontalAlignment alignment); + + result SetItemLayoutVerticalAlignment(VerticalAlignment alignment); + + HorizontalAlignment GetItemLayoutHorizontalAlignment(void) const; + + VerticalAlignment GetItemLayoutVerticalAlignment(void) const; + + result SetItemBorderStyle(IconListViewItemBorderStyle borderStyle); + + IconListViewItemBorderStyle GetItemBorderStyle(void) const; + + result SetBitmapOfEmptyList(const Tizen::Graphics::Bitmap* pBitmap); + + result BeginReorderingMode(void); + + result EndReorderingMode(void); + + bool IsInReorderingMode(void) const; + + void SetScrollInputMode(ScrollInputMode mode); + + ScrollInputMode GetScrollInputMode(void) const; + +// Inquiry +public: + // _IIconListItemEventListener + virtual void OnIconListItemStateChanged(_IconListViewItemEventArg* pArg); + virtual void OnIconListViewOverlayBitmapSelected(_IconListViewItemEventArg* pArg); + virtual void OnIconListViewItemReordered(_IconListViewItemEventArg* pArg); + + // _IScrollEventListener + virtual void OnScrollEndReached(Tizen::Ui::_Control& source, ScrollEndEvent type); + virtual void OnScrollPositionChanged(Tizen::Ui::_Control& source, float scrollPosition); + virtual void OnScrollStopped(Tizen::Ui::_Control& source); + +// Constants +public: + static _IconListViewImpl* GetInstance(IconListView& iconListView); + static const _IconListViewImpl* GetInstance(const IconListView& iconListView); + +// Lifecycle +protected: + result Dispose(void); + +private: + _IconListViewImpl(IconListView* pIconListView, _IconListView* pCore); + _IconListViewImpl(const _IconListViewImpl& rhs); + _IconListViewImpl& operator =(const _IconListViewImpl& rhs); + +// Attribute +private: + static const int ICONLISTVIEW_MAX_VIEW_COUNT = 256; + + _IconListView* __pIconListView; + _IconListViewItemEvent* __pIconListViewItemEvent; + _ScrollEvent* __pScrollEvent; +}; // _IconListViewImpl + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_ICON_LIST_VIEW_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_IconListViewItemEvent.h b/src/ui/inc/FUiCtrl_IconListViewItemEvent.h new file mode 100644 index 0000000..75ce4e4 --- /dev/null +++ b/src/ui/inc/FUiCtrl_IconListViewItemEvent.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 FUiCtrl_IconListViewItemEvent.h + * @brief This is the header file for _IconListViewItemEvent class. + * + * This header file contains declaration of _IconListViewItemEvent class. + * The _IconListViewItemEvent class can call listener's method. So, when event occurred, + * application can handle it appropriately. + * + */ + +#ifndef _FUI_CTRL_INTERNAL_ICON_LIST_VIEW_ITEM_EVENT_H_ +#define _FUI_CTRL_INTERNAL_ICON_LIST_VIEW_ITEM_EVENT_H_ + +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +class IconListView; + +// +// @class _IconListViewItemEvent +// @brief This class handles a item event. It is inherited from _Event class. +// +// The Window(root of all widgets) class has an instance of the ItemEvent class as a member variable. +// Applications can register item event listeners through it. When a item event occurred, +// the ItemEvent class finds listener and calls the appropriate listener's method. +// +class _IconListViewItemEvent + : public Tizen::Base::Runtime::_Event +{ +// Lifecycle +public: + _IconListViewItemEvent(void); + + // This is the default class destructor. + virtual ~_IconListViewItemEvent(void); + + result Construct(const IconListView& source); + +// Accessors +public: + const IconListView* GetSource(void) const; + +// Operations +protected: + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + +//Attributess +private: + IconListView* __pSource; +}; // _IconListViewItemEvent + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_ICON_LIST_VIEW_ITEM_EVENT_H_ diff --git a/src/ui/inc/FUiCtrl_IconListViewItemEventArg.h b/src/ui/inc/FUiCtrl_IconListViewItemEventArg.h new file mode 100644 index 0000000..06d9cc8 --- /dev/null +++ b/src/ui/inc/FUiCtrl_IconListViewItemEventArg.h @@ -0,0 +1,102 @@ +// +// 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_IconListViewItemEventArg.h + * @brief This is the header file for _IconListViewItemEventArg class. + * + * This header file contains declaration of _IconListViewItemEventArg class. + * + */ + +#ifndef _FUI_CTRL_INTERNAL_ICON_LIST_VIEW_ITEM_EVENT_ARG_H_ +#define _FUI_CTRL_INTERNAL_ICON_LIST_VIEW_ITEM_EVENT_ARG_H_ + +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +enum _IconListViewItemEventType +{ + EVENT_TYPE_ITEM_SELECTED = 0, + EVENT_TYPE_OVERLAY_BITMAP_SELECTED, + EVENT_TYPE_ITEM_REORDERED +}; + +// +// @class _IconListViewItemEventArg +// @brief This class is used as the argument to item event listener. +// +// This class is used as the argument to item event listener. When an item event is generated +// (such as when a button is pressed) the ItemEvent calls ItemEventListener's OnItemStateChanged +// with an instance of this class as an argument. +// +// From this class, one can find out, the (event) source object and item event type. +// +class _IconListViewItemEventArg + : public Tizen::Base::Object + , public Tizen::Base::Runtime::IEventArg +{ +// Lifecycle +public: + _IconListViewItemEventArg(int index, _IconListViewItemEventType eventType); + + virtual ~_IconListViewItemEventArg(void); + +// Access +public: + int GetIndex(void) const; + + IconListViewItemStatus GetStatus(void) const; + + void SetStatus(const IconListViewItemStatus status); + + int GetOverlayBitmapId(void) const; + + void SetOverlayBitmapId(const int overlayBitmapId); + + int GetFromIndex(void) const; + + int GetToIndex(void) const; + + void SetToIndex(int toIndex); + + _IconListViewItemEventType GetEventType(void) const; + +// Attribute +private: + // The index of an item + int __itemIndex; + + int __toIndex; + + int __overlayBitmapId; + + // The status of an item + IconListViewItemStatus __itemStatus; + + _IconListViewItemEventType __eventType; +}; // _IconListViewItemEventArg + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_ICON_LIST_VIEW_ITEM_EVENT_ARG_H_ diff --git a/src/ui/inc/FUiCtrl_IconListViewItemImpl.h b/src/ui/inc/FUiCtrl_IconListViewItemImpl.h new file mode 100644 index 0000000..85aa5cb --- /dev/null +++ b/src/ui/inc/FUiCtrl_IconListViewItemImpl.h @@ -0,0 +1,62 @@ +// +// 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_IconListViewItemImpl.h + * @brief This is the header file for the _IconListViewItemImpl class. + */ + +#ifndef _FUI_CTRL_INTERNAL_ICON_LIST_VIEW_ITEM_IMPL_H_ +#define _FUI_CTRL_INTERNAL_ICON_LIST_VIEW_ITEM_IMPL_H_ + +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _IconListItem; + +class _IconListViewItemImpl +{ +// Lifecycle +public: + virtual ~_IconListViewItemImpl(void); + + static _IconListViewItemImpl* CreateIconListViewItemImplN(IconListViewItem& pIconListViewItem, const Tizen::Graphics::Bitmap& bitmap, const Tizen::Base::String* pText, const Tizen::Graphics::Bitmap* pSelectedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap); + + result SetOverlayBitmap(int overlayBitmapId, const Tizen::Graphics::Bitmap* pOverlayBitmap, HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment); + +private: + _IconListViewItemImpl(IconListViewItem* pIconListViewItem, _IconListItem* pItem); + _IconListViewItemImpl(const _IconListViewItemImpl& rhs); + _IconListViewItemImpl& operator =(const _IconListViewItemImpl& rhs); + +// Attribute +private: + friend class _IconListItemProviderAdaptor; + + IconListViewItem* __pIconListViewItem; + _IconListItem* __pIconListItem; +}; // _IconListViewItemImpl + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_ICON_LIST_VIEW_ITEM_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_Indicator.h b/src/ui/inc/FUiCtrl_Indicator.h new file mode 100644 index 0000000..9d90567 --- /dev/null +++ b/src/ui/inc/FUiCtrl_Indicator.h @@ -0,0 +1,130 @@ +// +// 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_Indicator.h + * @brief This is the header file for the %_Indicator class. + * + * This header file contains the declarations of the %_Indicator class. + */ +#ifndef _FUI_CTRL_INTERNAL_INDICATOR_H_ +#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 +{ +class VisualElementSurface; +}}} + +namespace Tizen { namespace Ui +{ +class _Control; +}} + +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); + virtual ~_Indicator(void); + + static _Indicator* CreateIndicator(void); + + result SetIndicatorShowState(bool state); + void SetIndicatorAutoHide(bool portrait, bool landscape); + result SetIndicatorOpacity(_IndicatorOpacity opacity); + bool GetIndicatorShowState(void) const; + _IndicatorOpacity GetIndicatorOpacity(void) const; + bool GetIndicatorAutoHide(void) const; + result AddIndicatorObject(_Control* pControl, _Window* pWindow); + result DeleteIndicatorObject(void); + result ChangeCurrentVisualElement(Tizen::Ui::Animations::_VisualElement* pVisualElement); + + result SetNotificationTrayOpenEnabled(bool enable); + bool IsNotificationTrayOpenEnabled(void) const; + + Tizen::Graphics::Rectangle GetIndicatorBounds(void) const; + Tizen::Graphics::FloatRectangle GetIndicatorBoundsF(void) const; + + 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); + +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; + _Window* __pWindow; + bool __showstate; + bool __portraitautohide; + bool __landscapeautohide; + _IndicatorOpacity __opacity; + Tizen::Ui::_ControlOrientation __orientation; + Tizen::Graphics::FloatPoint __startTouchPoint; + bool __animating; + bool __touchPressed; + unsigned long __pointId; + int __quickpanelOpened; + + Ecore_Event_Handler* __pClientMessageReceived; +}; // _Indicator + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_INDICATOR_H_ diff --git a/src/ui/inc/FUiCtrl_IndicatorManager.h b/src/ui/inc/FUiCtrl_IndicatorManager.h new file mode 100644 index 0000000..d6fd652 --- /dev/null +++ b/src/ui/inc/FUiCtrl_IndicatorManager.h @@ -0,0 +1,98 @@ +// +// 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_IndicatorManager.h + * @brief This is the header file for the _IndicatorManager class. + * + * This header file contains the declarations of the %_IndicatorManager class. + */ + +#ifndef _FUI_CTRL_INTERNAL_INDICATOR_MANAGER_H_ +#define _FUI_CTRL_INTERNAL_INDICATOR_MANAGER_H_ + +namespace Tizen { namespace Ui { +class _Window; +class _Control; +}}; + +namespace Tizen { namespace Base { namespace Collection +{ +template class HashMapT; +}}} + +namespace Tizen { namespace Ui { namespace Animations { +class VisualElementSurface; +}}}; + +namespace Tizen { namespace Ui { namespace Controls +{ + +typedef struct +{ + Evas_Object* pPortraitEvasObject; + Evas_Object* pLandscapeEvasObject; + Tizen::Ui::Animations::VisualElementSurface* pPortraitSurface; + Tizen::Ui::Animations::VisualElementSurface* pLandscapeSurface; + Tizen::Ui::Animations::_VisualElement* pPortraitVisualElement; + Tizen::Ui::Animations::_VisualElement* pLandscapeVisualElement; + bool portraitVisualElementUsed; + bool landscapeVisualElementUsed; + _Control* pControl; +} IndicatorComponent ; + +enum _IndicatorOrientation +{ + _INDICATOR_ORIENTATION_PORTRAIT, + _INDICATOR_ORIENTATION_LANDSCAPE +}; + +class _IndicatorManager +{ +public: + static _IndicatorManager* GetInstance(void); + static void Initialize(void); + static void InitializeInstance(void); + static void ReleaseInstance(void); + + Tizen::Ui::Animations::_VisualElement* GetIndicatorVisualElement(_Window* pWindow, _IndicatorOrientation orientation, _Control* pControl) const; + result ReleaseIndicatorVisualElement(_Window* pWindow, _IndicatorOrientation orientation, Tizen::Ui::Animations::_VisualElement* pVisualElement); + + result AddWindow(_Window* pWindow); + result DeleteWindow(_Window* pWindow); + IndicatorComponent* MakeIndicatorComponentArrayN(_Window* pWindow); + bool IsFull(IndicatorComponent* pIndicatorComponentArray) const; + + Evas_Object* GetEvasObject(_Window* pWindow, _Control* pControl, _IndicatorOrientation orientation)const; + Tizen::Graphics::Dimension GetIndicatorSize(_IndicatorOrientation orientation) const; + Tizen::Graphics::FloatDimension GetIndicatorSizeF(_IndicatorOrientation orientation) const; + +private: + ~_IndicatorManager(void); + _IndicatorManager(void); + + _IndicatorManager(const _IndicatorManager& value); + _IndicatorManager& operator =(const _IndicatorManager& value); + +private: + static _IndicatorManager* __pInstance; + + Tizen::Base::Collection::HashMapT __indicatorMap; +}; // _IndicatorManager + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_INDICATOR_MANAGER_H_ diff --git a/src/ui/inc/FUiCtrl_InputPad.h b/src/ui/inc/FUiCtrl_InputPad.h new file mode 100644 index 0000000..1001de6 --- /dev/null +++ b/src/ui/inc/FUiCtrl_InputPad.h @@ -0,0 +1,84 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiCtrl_InputPad.h + * @brief This is the header file for the _InputPad class. + * + * This header file contains the declarations of the %_InputPad class. + */ + +#ifndef _FUI_CTRL_INTERNAL_INPUTPAD_H_ +#define _FUI_CTRL_INTERNAL_INPUTPAD_H_ + +#include + +#include "FUi_Control.h" +#include "FUi_UiTouchEvent.h" +#include "FUiCtrl_IInputPadEventListener.h" +#include "FUiCtrl_DateTimeDefine.h" + +namespace Tizen { namespace Ui { +class _AccessibilityElement; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ +class _InputPadPresenter; + +class _InputPad + : public Tizen::Ui::_Control + , virtual public Tizen::Base::Runtime::IEventListener + , virtual public _IUiEventListener + , virtual public _IUiEventPreviewer +{ +public: + _InputPad(void); + virtual ~_InputPad(void); + + result Construct(const Tizen::Graphics::FloatRectangle& bounds); + result SetInputPadEventListener(const _IInputPadEventListener& listener); + void SetInputPadStyle(const _InputPadStyle style); + Tizen::Base::String& GetAccessibilityElementMonthName(int number); + void SetFont(Tizen::Graphics::Font* pFont); + + virtual void OnBoundsChanged(void); + virtual void OnDraw(void); + 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); + virtual bool OnTouchCanceled(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo); + virtual void OnChangeLayout(Tizen::Ui::_ControlOrientation orientation); + +private: + _InputPad(const _InputPad&); + _InputPad& operator =(const _InputPad&); + + bool HasAccessibilityElement(void); + void SetAllAccessibilityElement(void); + void SetBoundsAllAccessibilityElement(void); + void RemoveAllAccessibilityElement(void); + void InitializeAccessibilityElementMonthNames(void); + +private: + _InputPadPresenter* __pInputPadPresenter; + Tizen::Base::String __pMonthNames[DATETIME_MONTH_MAX]; + Tizen::Base::Collection::LinkedListT __accessibilityElements; +}; // _InputPad + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_INPUTPAD_H_ diff --git a/src/ui/inc/FUiCtrl_InputPadPresenter.h b/src/ui/inc/FUiCtrl_InputPadPresenter.h new file mode 100644 index 0000000..d67955f --- /dev/null +++ b/src/ui/inc/FUiCtrl_InputPadPresenter.h @@ -0,0 +1,119 @@ +// +// 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_InputPadPresenter.h + * @brief This is the header file for the _InputPadPresenter class. + * + * This header file contains the declarations of the %_InputPadPresenter class. + */ + +#ifndef _FUI_CTRL_INTERNAL_INPUTPAD_PRESENTER_H_ +#define _FUI_CTRL_INTERNAL_INPUTPAD_PRESENTER_H_ + +#include + +#include "FUi_Control.h" +#include "FUiCtrl_IInputPadEventListener.h" +#include "FUiCtrl_DateTimeDefine.h" + +namespace Tizen { namespace Graphics { +class Font; +}} // Tizen::Graphics + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _InputPad; + +class _InputPadPresenter + : public Tizen::Base::Object +{ +public: + _InputPadPresenter(_InputPad* pInputPad); + virtual ~_InputPadPresenter(void); + + result Construct(const Tizen::Graphics::FloatRectangle& bounds); + + result LoadProperties(Tizen::Ui::_ControlOrientation orientation); + result LoadResource(void); + result InitializeTextObjects(void); + + void SetInputPadEventListener(const _IInputPadEventListener& listener); + result SetInputPadStyle(const _InputPadStyle style); + + _InputPadStyle GetInputPadStyle(void) const; + Tizen::Graphics::FloatRectangle GetButtonBounds(int index) const; + int GetReturnValue(int index) const; + + result Draw(void); + + void EnableLayoutChangedFlag(void); + + void SetFont(Tizen::Graphics::Font* pFont); + + 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); + virtual bool OnTouchCanceled(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo); + +private: + result DrawAllButtons(Tizen::Graphics::Canvas& canvas); + result DrawButton(Tizen::Graphics::Canvas& canvas, int index); + result RefreshButton(int index); + int GetIndexFromTouchedPosition(const Tizen::Graphics::FloatPoint& point) const; + + _InputPadPresenter(const _InputPadPresenter&); + _InputPadPresenter& operator =(const _InputPadPresenter&); + +private: + _InputPad* __pInputPad; + _IInputPadEventListener* __pInputPadEventListener; + + Tizen::Graphics::Font* __pFont; + + Tizen::Graphics::Bitmap* __pKeypadBackgroundBitmap; + + Tizen::Graphics::Bitmap* __pKeypadButtonNormalBitmap[DATETIME_STATUS_MAX]; + Tizen::Graphics::Bitmap* __pKeypadButtonEffectBitmap[DATETIME_STATUS_MAX]; + + Tizen::Graphics::_Text::TextObject __textObject; + Tizen::Graphics::_Text::TextObject __guideTextObject; + + _InputPadStyle __inputPadStyle; + + float __buttonWidth; + float __buttonHeight; + float __startX; + float __startY; + float __marginX; + float __marginY; + int __pressedIndex; + + bool __isLayoutChanged; + + static const int INPUTPAD_BUTTON_MAX = 12; + static const int INPUTPAD_BUTTON_COLUMN_MAX = 3; + static const int INPUTPAD_BUTTON_ROW_MAX = 4; + + static const int INPUTPAD_NUMBER_1 = 0; + static const int INPUTPAD_NUMBER_9 = 8; + static const int INPUTPAD_NUMBER_0 = 10; +}; // _InputPadPresenter + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_INPUTPAD_PRESENTER_H_ diff --git a/src/ui/inc/FUiCtrl_Keypad.h b/src/ui/inc/FUiCtrl_Keypad.h new file mode 100644 index 0000000..658330a --- /dev/null +++ b/src/ui/inc/FUiCtrl_Keypad.h @@ -0,0 +1,143 @@ +// +// 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_Keypad.h +* @brief This is the header file for the _Keypad class. +* +* This header file contains the declarations of the _Keypad class. +*/ +#ifndef _FUI_CTRL_INTERNAL_KEYPAD_H_ +#define _FUI_CTRL_INTERNAL_KEYPAD_H_ + +#include +#include +#include "FUi_Window.h" +#include "FUiCtrl_Button.h" +#include "FUiCtrl_Edit.h" +#include "FUiCtrl_IActionEventListener.h" +#include "FUiCtrl_IKeypadEventListener.h" +#include "FUiCtrl_ITextEventListener.h" +#include "FUiCtrl_TextEvent.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +enum LayoutChangeState +{ + LAYOUT_CHANGE_NONE = 0, + LAYOUT_CHANGE_ROTATE, + LAYOUT_CHANGE_KEYPAD_SHOW, + LAYOUT_CHANGE_KEYPAD_HIDE, + LAYOUT_CHANGE_KEYPAD_BOUNDS_CHANGED +}; + +struct _KeypadStyleInfo +{ + KeypadStyle keypadStyle; + bool textPredictionEnabled; + bool isNormalNumberStyle; + bool enterActionEnabled; + bool isLowerCaseModeEnabled; +}; + +class _Indicator; + +class _OSP_EXPORT_ _Keypad + : virtual public Tizen::Base::Runtime::IEventListener + , virtual public Tizen::Ui::_IUiEventListener + , virtual public Tizen::Ui::_IUiEventPreviewer + , public Tizen::Ui::_Window + , public _IActionEventListener + , public _IKeypadEventListener + , virtual public Tizen::System::ISettingEventListener +{ + DECLARE_CLASS_BEGIN(_Keypad, _Control); + DECLARE_PROPERTY("singleLineEnabled", GetPropertySingleLineEnabled, SetPropertySingleLineEnabled); + DECLARE_PROPERTY("text", GetPropertyText, SetPropertyText); + DECLARE_CLASS_END(); + + result SetPropertySingleLineEnabled(const Tizen::Ui::Variant& enabled); + Tizen::Ui::Variant GetPropertySingleLineEnabled(void) const; + + result SetPropertyText(const Tizen::Ui::Variant& text); + Tizen::Ui::Variant GetPropertyText(void) const; + +public: + static _Keypad* CreateKeypadN(void); + virtual ~_Keypad(void); + + result Initialize(int editStyle, _KeypadStyleInfo styleInfo, int limitLength, _Edit* pCallerEdit = null); + virtual void OnDraw(void); + + result SetSingleLineEnabled(bool enabled); + bool IsSingleLineEnabled(void) const; + + Tizen::Base::String GetText(void) const; + void SetText(const Tizen::Base::String& text); + void SetEditTextFilter(IEditTextFilter* pFilter); + void SendOpaqueCommand (const Tizen::Base::String& command); + + result AddTextEventListener(const _ITextEventListener& listener); + result RemoveTextEventListener(const _ITextEventListener& listener); + + virtual result OnAttachedToMainTree(void); + virtual result OnDetachingFromMainTree(void); + virtual void OnActionPerformed(const Tizen::Ui::_Control& source, int actionId); + virtual void OnKeypadWillOpen(void); + virtual void OnKeypadOpened(void); + virtual void OnKeypadClosed(void); + virtual void OnKeypadBoundsChanged(void); + virtual void OnKeypadActionPerformed(CoreKeypadAction keypadAction); + virtual void OnChangeLayout(_ControlOrientation orientation); + virtual void OnNativeWindowActivated(void); + virtual bool IsRotationSynchronized(void) const; + virtual void OnSettingChanged(Tizen::Base::String& key); + + virtual bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo); + + virtual bool IsLayoutChangable(void) const; + + virtual void OnActivated(void); + virtual void OnDeactivated(void); + +private: + _Keypad(void); + _Keypad(const _Keypad&); + _Keypad& operator =(const _Keypad&); + + result Dispose(void); + result ChangeLayoutInternal(LayoutChangeState layoutChangeState); + _Button* CreateButtonItemN(int actionId, const Tizen::Base::String& text); + _Toolbar* CreateFooter(void); + +private: + bool __isFirstCall; + bool __isInitialized; + bool __isSingleLineEnabled; + _Indicator* __pIndicator; + _Edit* __pCallerEdit; + _Edit* __pChildEdit; + _Toolbar* __pFooter; + Tizen::Base::String __text; + _TextEvent* __pTextEvent; + bool __isCommandButtonPressed; + bool __isPredictionWindowOpendInUSBMode; +}; // _Keypad + +} } } // Tizen::Ui::Controls +#endif // _FUI_CTRL_INTERNAL_KEYPAD_H_ diff --git a/src/ui/inc/FUiCtrl_KeypadEvent.h b/src/ui/inc/FUiCtrl_KeypadEvent.h new file mode 100644 index 0000000..48f07b2 --- /dev/null +++ b/src/ui/inc/FUiCtrl_KeypadEvent.h @@ -0,0 +1,114 @@ +// +// 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_KeypadEvent.h +* @brief This is the header file for _KeypadEvent class. +* +* This header file contains declaration of _KeypadEvent class. +* +*/ + +#ifndef _FUI_CTRL_KEYPAD_EVENT_H_ +#define _FUI_CTRL_KEYPAD_EVENT_H_ + +#include +#include +#include +#include "FUiCtrl_IKeypadEventListener.h" + +namespace Tizen { namespace Ui +{ +class _Control; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ + +enum CoreKeypadEventStatus +{ + CORE_KEYPAD_EVENT_STATUS_CREATED, + CORE_KEYPAD_EVENT_STATUS_OPEN, + CORE_KEYPAD_EVENT_STATUS_CLOSE, + CORE_KEYPAD_EVENT_STATUS_BOUNDS_CHANGED, + CORE_KEYPAD_EVENT_STATUS_ENTERACTION +}; + + +/** +* @class _KeypadEvent +* @brief This class handles a keypad event event. It is inherited from Event class. +* +*/ +class _KeypadEvent + : public Tizen::Base::Runtime::_Event +{ +// Lifecycle +public: + /** + * This is the default class destructor. + * + */ + virtual ~_KeypadEvent(void); + + static _KeypadEvent* CreateInstanceN(const Tizen::Ui::_Control& source); + +// Accessors + /** + * This method returns the owner of this event. + * + * @return See the comment above. + */ + const Tizen::Ui::_Control* GetSource(void) const; + + static Tizen::Base::Runtime::IEventArg* CreateKeypadEventArgN(CoreKeypadAction actionId, Tizen::Ui::Controls::CoreKeypadEventStatus status); + + // Operations +protected: + /** + * This is the default class constructor. + * + * @remarks After creating an instance of this class, you must explicitly call one of + * construction methods to initialize the instance. + * + */ + _KeypadEvent(const Tizen::Ui::_Control& source); + + /** + * This method checks the arg and finds out the type of event. After that this method calls appopriate + * pListener's method. + * + * @param[in] listener It is a event listener related to this item event. + * @param[in] arg It is an argument-like instance of item event retransmitted to the listener's method + * as an argument. + * @exception E_SUCCESS - The method is successful. + * @exception E_ARG_NULL - The listener is null. + * @exception E_INVALID_ARG - The argument passed to a method contains an invalid value.@n + *   The pListener is not the instance of IItemEventListener class or + * the pItemEventArg is not the instance of _CustomItemEventArg class. + * + */ + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + + //Attributess +private: + const Tizen::Ui::_Control* __pSource; +}; // _KeypadEvent + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_KEYPAD_EVENT_H_ diff --git a/src/ui/inc/FUiCtrl_KeypadImpl.h b/src/ui/inc/FUiCtrl_KeypadImpl.h new file mode 100644 index 0000000..ec08981 --- /dev/null +++ b/src/ui/inc/FUiCtrl_KeypadImpl.h @@ -0,0 +1,101 @@ +// +// 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_KeypadImpl.h +* @brief This is the header file for the _KeypadImpl class. +* +* This header file contains the declarations of the _KeypadImpl class. +*/ + +#ifndef _FUI_CTRL_INTERNAL_KEYPAD_IMPL_H_ +#define _FUI_CTRL_INTERNAL_KEYPAD_IMPL_H_ + +#include +#include "FUi_WindowImpl.h" +#include "FUiCtrl_ITextEventListener.h" +#include "FUiCtrl_Keypad.h" + +namespace Tizen { namespace Base { namespace Runtime +{ +class IEvent; +}}} // Tizen::Base::Runtime + +namespace Tizen { namespace Ui { namespace Controls +{ +class _PublicTextEvent; + +class _KeypadImpl + : virtual public Tizen::Base::Runtime::IEventListener + , public _WindowImpl + , public _ITextEventListener +{ + +public: + virtual ~_KeypadImpl(void); + + static _KeypadImpl* CreateKeypadImplN(Keypad* pControl); + static _KeypadImpl* GetInstance(Keypad& pKeypad); + static const _KeypadImpl* GetInstance(const Keypad& pKeypad); + + virtual const char* GetPublicClassName(void) const; + virtual const Keypad& GetPublic(void) const; + virtual Keypad& GetPublic(void); + virtual const _Keypad& GetCore(void) const; + virtual _Keypad& GetCore(void); + + result Initialize(KeypadStyle keypadStyle, KeypadInputModeCategory category, int limitLength, bool enabledTextPrediction = true); + + void SetTextPredictionEnabled(bool enable); + + bool IsTextPredictionEnabled(void) const; + + result SetSingleLineEnabled(bool enabled); + + bool IsSingleLineEnabled(void) const; + + result AddTextEventListener(Tizen::Ui::ITextEventListener& listener); + + result RemoveTextEventListener(Tizen::Ui::ITextEventListener& listener); + + Tizen::Base::String GetText(void) const; + void SetText(const Tizen::Base::String& text); + void SetEditTextFilter(IEditTextFilter* pFilter); + void SendOpaqueCommand (const Tizen::Base::String& command); + + virtual result OnAttachedToMainTree(void); + + virtual void OnTextValueChanged(const Tizen::Ui::_Control& source); + + virtual void OnTextValueChangeCanceled(const Tizen::Ui::_Control& source); + +private: + _KeypadImpl(Keypad* pPublic, _Keypad* pCore); + _KeypadImpl(const _KeypadImpl&); + _KeypadImpl& operator =(const _KeypadImpl&); + +private: + _Keypad* __pKeypad; + _KeypadStyleInfo __keypadStyleInfo; + int __limitLength; + Tizen::Base::Runtime::IEvent* __pTextEvent; + _PublicTextEvent* __pPublicTextEvent; +}; // _KeypadImpl + +} } } // OSp::Ui::Controls; + +#endif // _FUI_CTRL_INTERNAL_KEYPAD_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_Label.h b/src/ui/inc/FUiCtrl_Label.h new file mode 100644 index 0000000..f623b09 --- /dev/null +++ b/src/ui/inc/FUiCtrl_Label.h @@ -0,0 +1,170 @@ +// +// 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_Label.h + * @brief This is the header file for the _Label class. + * + * This header file contains the declarations of the %_Label class. + */ +#ifndef _FUI_CTRL_INTERNAL_LABEL_H_ +#define _FUI_CTRL_INTERNAL_LABEL_H_ + +#include +#include "FUi_Control.h" + +namespace Tizen { namespace Ui +{ +class _AccessibilityElement; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ +class _LabelPresenter; + +/** + * @class _Label + * @brief + * @since 2.0 + * + * + * + * + */ + +class _OSP_EXPORT_ _Label + : public Tizen::Ui::_Control + , virtual public Tizen::Base::Runtime::IEventListener + , virtual public Tizen::Ui::_IUiEventListener + , virtual public Tizen::Ui::_IUiEventPreviewer +{ + DECLARE_CLASS_BEGIN(_Label, _Control); + DECLARE_PROPERTY("text", GetPropertyText, SetPropertyText); + DECLARE_PROPERTY("textColor", GetPropertyTextColor, SetPropertyTextColor); + DECLARE_PROPERTY("textSize", GetPropertyTextSize, SetPropertyTextSize); + DECLARE_CLASS_END(); + + result SetPropertyText(const Variant& text); + Variant GetPropertyText(void) const; + result SetPropertyTextColor(const Variant& color); + Variant GetPropertyTextColor(void) const; + result SetPropertyTextSize(const Variant& textSize); + Variant GetPropertyTextSize(void) const; + +public: + virtual ~_Label(void); + +public: + static _Label* CreateLabelN(void); + + virtual void OnDraw(void); + virtual result OnAttachedToMainTree(void); + 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 OnTouchMoveHandled(const _Control& control); + virtual void OnBoundsChanged(void); + virtual void OnFontChanged(Tizen::Graphics::Font* pFont); + virtual void OnFontInfoRequested(unsigned long& style, int& size); + virtual Tizen::Graphics::Canvas* OnCanvasRequestedN(const Tizen::Graphics::FloatRectangle& bounds); + virtual Tizen::Graphics::FloatDimension GetContentSizeF(bool horizontalMode, bool verticalMode) const; + +public: + result SetText(const Tizen::Base::String& text); + Tizen::Base::String GetText(void) const; + + result SetTextConfig(int size, LabelTextStyle style); + result SetTextConfig(float size, LabelTextStyle style); + int GetTextSize(void) const; + float GetTextSizeF(void) const; + LabelTextStyle GetTextStyle(void) const; + + result SetTextHorizontalAlignment(HorizontalAlignment alignment); + HorizontalAlignment GetTextHorizontalAlignment(void) const; + result SetTextVerticalAlignment(VerticalAlignment alignment); + VerticalAlignment GetTextVerticalAlignment(void) const; + + result SetTextColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetTextColor(void) const; + + result SetBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap); + Tizen::Graphics::Bitmap* GetBackgroundBitmap(void) const; + + result SetBackgroundEffectBitmap(const Tizen::Graphics::Bitmap& bitmap); + Tizen::Graphics::Bitmap* GetBackgroundEffectBitmap(void) const; + + unsigned long GetFontStyle(void) const; + + result SetMargin(int topMargin, int leftMargin); + result SetMargin(int leftMargin, int topMargin, int rightMargin, int bottomMargin); + int GetLeftMargin(void) const; + int GetTopMargin(void) const; + int GetRightMargin(void) const; + int GetBottomMargin(void) const; + + result SetMargin(float topMargin, float leftMargin); + result SetMargin(float leftMargin, float topMargin, float rightMargin, float bottomMargin); + float GetLeftMarginF(void) const; + float GetTopMarginF(void) const; + float GetRightMarginF(void) const; + float GetBottomMarginF(void) const; + + int GetTextExtentSize(void) const; + float GetTextExtentSizeF(void) const; + + Tizen::Graphics::FloatDimension GetContentSizeInternalF(bool horizontalMode, bool verticalMode) const; + +protected: + result SetPresenter(const _LabelPresenter& labelPresenter); + +private: + void InitializeAccessibilityElement(void); + + _Label(void); + _Label(const _Label& rhs); + _Label& operator =(const _Label& rhs); + +private: + _LabelPresenter* __pLabelPresenter; + + Tizen::Base::String __text; + float __textSize; + + HorizontalAlignment __horizontalAlignment; + VerticalAlignment __verticalAlignment; + + Tizen::Graphics::Color __textColor; + + Tizen::Graphics::Bitmap* __pBackgroundBitmap; + Tizen::Graphics::Bitmap* __pBackgroundEffectBitmap; + + float __leftMargin; + float __topMargin; + float __rightMargin; + float __bottomMargin; + + bool __contented; + Tizen::Graphics::FloatDimension __contentedDimension; + + Tizen::Ui::_AccessibilityElement* __pTextElement; + + static const float SENSITIVE = 0.08f; +}; // _Label + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_LABEL_H_ diff --git a/src/ui/inc/FUiCtrl_LabelImpl.h b/src/ui/inc/FUiCtrl_LabelImpl.h new file mode 100644 index 0000000..d0b53c5 --- /dev/null +++ b/src/ui/inc/FUiCtrl_LabelImpl.h @@ -0,0 +1,108 @@ +// +// 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_LabelImpl.h + * @brief This is the header file for the _LabelImpl class. + * + * This header file contains the declarations of the %_LabelImpl class. + */ +#ifndef _FUI_CTRL_INTERNAL_LABEL_IMPL_H_ +#define _FUI_CTRL_INTERNAL_LABEL_IMPL_H_ + +#include +#include +#include "FUi_ControlImpl.h" +#include "FUiCtrl_Label.h" + +namespace Tizen { namespace Ui { namespace Animations +{ + class _VisualElement; +}}} // Tizen::Ui::Animations + +namespace Tizen { namespace Graphics +{ + class Dimension; +}} // Tizen::Graphics + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _LabelImpl + : public _ControlImpl +{ +public: + class LabelSizeInfo : public _ControlImpl::SizeInfo + { + virtual Tizen::Graphics::Dimension GetDefaultMinimumSize(_ControlOrientation orientation) const; + virtual Tizen::Graphics::FloatDimension GetDefaultMinimumSizeF(_ControlOrientation orientation) const; + }; // LabelSizeInfo + +public: + virtual ~_LabelImpl(void); + static _LabelImpl* CreateLabelImplN(Label* pControl, const Tizen::Graphics::Rectangle& bounds); + static _LabelImpl* CreateLabelImplN(Label* pControl, const Tizen::Graphics::FloatRectangle& bounds); + + virtual const char* GetPublicClassName(void) const; + virtual const Label& GetPublic(void) const; + virtual Label& GetPublic(void); + virtual const _Label& GetCore(void) const; + virtual _Label& GetCore(void); + +public: + result SetText(const Tizen::Base::String& text); + result SetTextColor(const Tizen::Graphics::Color& color); + result SetBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap); + result SetTextHorizontalAlignment(HorizontalAlignment alignment); + result SetTextVerticalAlignment(VerticalAlignment alignment); + result SetTextConfig(int size, LabelTextStyle style); + result SetTextConfig(float size, LabelTextStyle style); + result SetMargin(int topMargin, int leftMargin); + result SetMargin(float topMargin, float leftMargin); + + Tizen::Base::String GetText(void) const; + HorizontalAlignment GetTextHorizontalAlignment(void) const; + VerticalAlignment GetTextVerticalAlignment(void) const; + Tizen::Graphics::Color GetTextColor(void) const; + int GetTextSize(void) const; + float GetTextSizeF(void) const; + LabelTextStyle GetTextStyle(void) const; + int GetTopMargin(void) const; + float GetTopMarginF(void) const; + int GetLeftMargin(void) const; + float GetLeftMarginF(void) const; + + virtual result OnBoundsChanged(const Tizen::Graphics::Rectangle& oldRect, const Tizen::Graphics::Rectangle& newRect); + virtual result OnBoundsChanged(const Tizen::Graphics::FloatRectangle& oldRect, const Tizen::Graphics::FloatRectangle& newRect); + virtual Tizen::Graphics::FloatDimension GetContentSizeF(bool horizontalMode, bool verticalMode) const; + +public: + static Tizen::Graphics::Color GetColorOnError(void); + + static _LabelImpl* GetInstance(Label& label); + static const _LabelImpl* GetInstance(const Label& label); + +private: + _LabelImpl(Label* pPublic, _Label* pCore); + + _LabelImpl(const _LabelImpl& rhs); + _LabelImpl& operator =(const _LabelImpl& rhs); + +}; // _LabelImpl + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_LABEL_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_LabelModel.h b/src/ui/inc/FUiCtrl_LabelModel.h new file mode 100644 index 0000000..32ddd96 --- /dev/null +++ b/src/ui/inc/FUiCtrl_LabelModel.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 FUiCtrl_LabelModel.h + * @brief This is the header file for the _LabelModel class. + * + * This header file contains the declarations of the %_LabelModel class. + */ +#ifndef _FUI_CTRL_INTERNAL_LABEL_MODEL_H_ +#define _FUI_CTRL_INTERNAL_LABEL_MODEL_H_ + +#include + +namespace Tizen { namespace Ui { namespace Controls +{ +/** + * @class _LabelModel + * @brief + * @since 2.0 + * + * + * + * + */ +class _LabelModel + : public Tizen::Base::Object +{ + +public: + _LabelModel(void); + + virtual ~_LabelModel(void); + +public: + virtual result Construct(void); + +private: + _LabelModel(const _LabelModel& rhs); + + _LabelModel& operator =(const _LabelModel& rhs); + +}; // _LabelModel + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_LABEL_MODEL_H_ diff --git a/src/ui/inc/FUiCtrl_LabelPresenter.h b/src/ui/inc/FUiCtrl_LabelPresenter.h new file mode 100644 index 0000000..e6bb984 --- /dev/null +++ b/src/ui/inc/FUiCtrl_LabelPresenter.h @@ -0,0 +1,113 @@ +// +// 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_LabelPresenter.h + * @brief This is the header file for the _LabelPresenter class. + * + * This header file contains the declarations of the %_LabelPresenter class. + */ +#ifndef _FUI_CTRL_INTERNAL_LABEL_PRESENTER_H_ +#define _FUI_CTRL_INTERNAL_LABEL_PRESENTER_H_ + +#include +#include +#include +#include "FUi_Control.h" + +namespace Tizen { namespace Ui { namespace Animations +{ +class _VisualElement; +}}} // Tizen::Ui::Animations + +namespace Tizen { namespace Ui { namespace Controls +{ +class _Label; +class _LabelModel; + +/** + * @class _LabelPresenter + * @brief + * @since 2.0 + * + * + * + * + */ +class _LabelPresenter + : public Tizen::Base::Object +{ +public: + _LabelPresenter(void); + virtual ~_LabelPresenter(void); + +public: + virtual result Construct(const _Label& label); + virtual result Install(void); + + void Draw(void); + + void OnFontChanged(Tizen::Graphics::Font* pFont); + void OnFontInfoRequested(unsigned long& style, int& size); + void OnFontInfoRequested(unsigned long& style, float& size); + void SetFontInfo(unsigned long style, int size); + void SetFontInfo(unsigned long style, float size); + result SetTextConfig(int size, LabelTextStyle style); + result SetTextConfig(float size, LabelTextStyle style); + LabelTextStyle GetTextStyle(void) const; + + 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 OnTouchMoveHandled(const _Control& control); + virtual Tizen::Graphics::Canvas* OnCanvasRequestedN(const Tizen::Graphics::FloatRectangle& bounds); + + Tizen::Graphics::_Text::TextObject* GetTextObject(void) const; + result InitTextObject(void); + + Tizen::Graphics::Font* GetFont(void) const; + +protected: + result SetModel(const _LabelModel& labelModel); + +private: + _LabelPresenter(const _LabelPresenter& rhs); + _LabelPresenter& operator =(const _LabelPresenter& rhs); + + void DrawBackground(void); + void DrawText(void); + bool IsEnabledStateChanged(void); + +private: + _Label* __pLabel; + _LabelModel* __pLabelModel; + + bool __previousEnabledState; + bool __lazyDecode; + + Tizen::Graphics::Font* __pFont; + Tizen::Graphics::_Text::TextObject* __pTextObject; + + Tizen::Ui::Animations::_VisualElement* __pBase; + LabelTextStyle __textStyle; + unsigned long __fontStyle; + float __fontSize; +}; // _LabelPresenter + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_LABEL_PRESENTER_H_ diff --git a/src/ui/inc/FUiCtrl_LanguageEvent.h b/src/ui/inc/FUiCtrl_LanguageEvent.h new file mode 100644 index 0000000..89e5f78 --- /dev/null +++ b/src/ui/inc/FUiCtrl_LanguageEvent.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 FUiCtrl_LanguageEvent.h + * @brief This is the header file for _LanguageEvent class. + * @version 2.0 + * + * This header file contains declaration of _LanguageEvent class. + */ + +#ifndef _FUI_CTRL_INTERNAL_LANGUAGE_EVENT_H_ +#define _FUI_CTRL_INTERNAL_LANGUAGE_EVENT_H_ + +#include +#include +#include +#include "FUiCtrl_ILanguageEventListener.h" + +namespace Tizen { namespace Ui +{ +class _Control; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ +/** + * @class _FocusEvent + * @brief This class handles a focus event. It is inherited from LowLevelEvent class. + * + * The Control class has an instance of the _LanguageEvent class as a member variable. + * _LanguageEvent notifies the listeners when a Keypad language is changed. + * + * @since 2.0 + */ +class _LanguageEvent + : public Tizen::Base::Runtime::_Event +{ +// Lifecycle +public: + /** + * This is the class destructor. + */ + virtual ~_LanguageEvent(); + + static _LanguageEvent* CreateInstanceN(const Tizen::Ui::_Control& source); + +// Accessors + /** + * This method returns the owner of this event. + * + * @return See the comment above. + */ + const Tizen::Ui::_Control* GetSource(void) const; + + static Tizen::Base::Runtime::IEventArg* CreateLanguageEventArgN(Tizen::Locales::LanguageCode prevLanguageCode, Tizen::Locales::LanguageCode currentLanguageCode); + +protected: + /** + * This is the default class constructor. After creating an instance of this + * class, you must explicitly call one of construction methods to initialize + * the instance. + */ + _LanguageEvent(const Tizen::Ui::_Control& source); + + /** + * This method calls appropriate IKeyEventListener method. + * + * @param[in] listener The IKeyEventListener instance. + * @param[in] arg The _FocusEventArg. + * @exception E_SUCCESS - The method is successful. + * @exception E_INVALID_ARG - The argument passed to a method contains an invalid value. + * @exception E_INVALID_ARG - @c pListener is @c null. + */ + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + +private: + const Tizen::Ui::_Control* __pSource; + +}; // _LanguageEvent +}}} // Tizen::Ui//Controls + +#endif //_FUI_CTRL_INTERNAL_LANGUAGE_EVENT_H_ diff --git a/src/ui/inc/FUiCtrl_LinkEvent.h b/src/ui/inc/FUiCtrl_LinkEvent.h new file mode 100644 index 0000000..28ebe35 --- /dev/null +++ b/src/ui/inc/FUiCtrl_LinkEvent.h @@ -0,0 +1,103 @@ +// +// 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_LinkEvent.h +* @brief This is the header file for _LinkEvent class. +* +* This header file contains declaration of _LinkEvent class. +* +*/ + +#ifndef _FUI_CTRL_LINK_EVENT_H_ +#define _FUI_CTRL_LINK_EVENT_H_ + +#include +#include +#include +#include "FUiCtrl_IUiLinkEventListener.h" + +namespace Tizen { namespace Ui +{ +class _Control; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** +* @class _LinkEvent +* @brief This class handles a keypad event event. It is inherited from Event class. +* +*/ +class _LinkEvent + : public Tizen::Base::Runtime::_Event +{ +// Lifecycle +public: + /** + * This is the default class destructor. + * + */ + virtual ~_LinkEvent(void); + + static _LinkEvent* CreateInstanceN(const Tizen::Ui::_Control& source); + +// Accessors + /** + * This method returns the owner of this event. + * + * @return See the comment above. + */ + const Tizen::Ui::_Control* GetSource(void) const; + + static Tizen::Base::Runtime::IEventArg* CreateLinkEventArgN(Tizen::Base::String text, Tizen::Base::Utility::LinkType linkType, Tizen::Base::String link); + + // Operations +protected: + /** + * This is the default class constructor. + * + * @remarks After creating an instance of this class, you must explicitly call one of + * construction methods to initialize the instance. + * + */ + _LinkEvent(const Tizen::Ui::_Control& source); + + /** + * This method checks the arg and finds out the type of event. After that this method calls appopriate + * pListener's method. + * + * @param[in] listener It is a event listener related to this item event. + * @param[in] arg It is an argument-like instance of item event retransmitted to the listener's method + * as an argument. + * @exception E_SUCCESS - The method is successful. + * @exception E_ARG_NULL - The listener is null. + * @exception E_INVALID_ARG - The argument passed to a method contains an invalid value.@n + *   The pListener is not the instance of IItemEventListener class or + * the pItemEventArg is not the instance of _CustomItemEventArg class. + * + */ + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + + //Attributess +private: + const Tizen::Ui::_Control* __pSource; +}; // _LinkEvent + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_LINK_EVENT_H_ diff --git a/src/ui/inc/FUiCtrl_LinkedList.h b/src/ui/inc/FUiCtrl_LinkedList.h new file mode 100644 index 0000000..7b020bd --- /dev/null +++ b/src/ui/inc/FUiCtrl_LinkedList.h @@ -0,0 +1,650 @@ +// +// 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_LinkedList.h + * @brief This is the header file for the _LinkedList template. + * + * This file contains the declarations and implementation of + * _LinkedList template. + */ + +#ifndef _FUI_CTRL_INTERNAL_LINKEDLIST_H +#define _FUI_CTRL_INTERNAL_LINKEDLIST_H + +#include + +template +class _LinkedList +{ +private: + class _ListNode + { + public: + _ListNode(void) + : pPrev(null) + , pNext(null) + , val(T()) + { + } + + _ListNode* pPrev; + _ListNode* pNext; + T val; + }; // _ListNode + + _ListNode* __pHead; + _ListNode* __pTail; + int __length; + +public: + class _Iterator + { + private: + friend class _LinkedList; + _ListNode* __pPos; + + public: + _Iterator(_ListNode& _lnr) + : __pPos(&_lnr) {} + _Iterator(_ListNode* _p = null) + : __pPos(_p) {} + + _Iterator& operator ++(void) + { + __pPos = __pPos->pNext; + return *this; + } //pre + + _Iterator operator ++(int) + { + _Iterator _retval = *this; + ++*this; + return _retval; + } //post + + _Iterator& operator +(int cnt) + { + while (cnt--) + { + __pPos = __pPos->pNext; + } + return *this; + } + + _Iterator& operator --(void) + { + __pPos = __pPos->pPrev; + return *this; + } //pre + + _Iterator operator --(int) + { + _Iterator _retval = *this; + --*this; + return _retval; + } //post + + _Iterator& operator -(int cnt) + { + while (cnt--) + { + __pPos = __pPos->pPrev; + } + return *this; + } + + T* operator ->() const { return &__pPos->val;} + T& operator *() const { return __pPos->val;} + bool operator ==(const _Iterator& _rhs) const { return __pPos == _rhs.__pPos;} + bool operator !=(const _Iterator& _rhs) const { return __pPos != _rhs.__pPos;} + }; // _Iterator + + class _ReverseIterator + { + private: + friend class _LinkedList; + _ListNode* __pPos; + + public: + _ReverseIterator(_ListNode& _lnr) + : __pPos(&_lnr) {} + _ReverseIterator(_ListNode* _p = null) + : __pPos(_p) {} + + _Iterator base() const + { + _Iterator _retval(__pPos); + return _retval; + } + + _ReverseIterator& operator ++(void) + { + __pPos = __pPos->pPrev; + return *this; + } //pre + + _ReverseIterator operator ++(int) + { + _ReverseIterator _retval = *this; + ++*this; + return _retval; + } //post + + _ReverseIterator& operator --(void) + { + __pPos = __pPos->pNext; + return *this; + } //pre + + _ReverseIterator operator --(int) + { + _ReverseIterator _retval = *this; + --*this; + return _retval; + } //post + + T* operator ->() const { return &__pPos->val;} + T& operator *() const { return __pPos->val;} + bool operator ==(const _ReverseIterator& _rhs) const { return __pPos == _rhs.__pPos;} + bool operator !=(const _ReverseIterator& _rhs) const { return __pPos != _rhs.__pPos;} + }; // _ReverseIterator + + _LinkedList(void); + ~_LinkedList(void); + + _LinkedList& operator =(_LinkedList& rhs) + { + //destruct + clear(); + + delete __pHead; + __pHead = null; + delete __pTail; + __pTail = null; + + // copy + __pHead = rhs.__pHead; + __pTail = rhs.__pTail; + __length = rhs.__length; + + // initializing + rhs.__pHead = new (std::nothrow) _ListNode(); + rhs.__pTail = new (std::nothrow) _ListNode(); + + rhs.__pHead->pNext = rhs.__pTail; + rhs.__pTail->pPrev = rhs.__pHead; + rhs.__length = 0; + + return *this; + } + + void insert(_Iterator&, const T &); + void erase(_Iterator&); + void remove(const T&); + void push_front(const T&); + void push_back(const T&); + void pop_front(void); + void pop_back(void); + void clear(void); + bool empty(void) const; + int size(void) const { return __length;} + void sort(bool (*)(T, T)); + void advance(_Iterator& _where, int _index); + T& front(void) const { return __pHead->pNext->val;} + T& back(void) const { return __pTail->pPrev->val;} + T& at(int) const; + + _Iterator begin(void) const { return _Iterator(__pHead->pNext);} + _Iterator end(void) const { return _Iterator(__pTail);} + _ReverseIterator rbegin(void) const { return _ReverseIterator(__pTail->pPrev);} + _ReverseIterator rend(void) const { return _ReverseIterator(__pHead);} + +private: + void insert_node(_ListNode *, _ListNode *, const T &); + void insert_node(_Iterator&, const T &); + void delete_node(_ListNode *, _ListNode*); + void delete_node(_Iterator&); + void swap_node(_ListNode*, _ListNode*); + void sort_node(bool (*)(T, T), _ListNode *, _ListNode*); + int count_node(_ListNode*, _ListNode*); + +private: + _LinkedList(const _LinkedList& rhs); +}; // _LinkedList + +template +_LinkedList ::_LinkedList(void) + : __pHead(null) + , __pTail(null) + , __length(0) +{ + __pHead = new (std::nothrow) _ListNode(); + __pTail = new (std::nothrow) _ListNode(); + + __pHead->pNext = __pTail; + __pTail->pPrev = __pHead; +} + +template +_LinkedList ::~_LinkedList(void) +{ + clear(); + + delete __pHead; + __pHead = null; + delete __pTail; + __pTail = null; +} + +template +void +_LinkedList ::insert(_Iterator& _where, const T& _val) +{ + insert_node(_where, _val); +} + +template +void +_LinkedList ::erase(_Iterator& _where) +{ + delete_node(_where); +} + +template +void +_LinkedList ::remove(const T& _val) +{ + if (__length <= 0) + { + return; + } + + _ListNode* _pTempNode = __pHead->pNext; + + //while(_val != _pTempNode->val) + while (memcmp(&(_val), &(_pTempNode->val), sizeof(T))) + { + if (_pTempNode == __pTail) + { + _pTempNode = null; + break; + } + + _pTempNode = _pTempNode->pNext; + } + + if ((_pTempNode == __pHead->pNext) && (_pTempNode == __pTail->pPrev)) + { + delete __pHead->pNext; + __pHead->pNext = __pTail; + __pTail->pPrev = __pHead; + } + else if (_pTempNode != null) + { + _pTempNode->pPrev->pNext = _pTempNode->pNext; + _pTempNode->pNext->pPrev = _pTempNode->pPrev; + delete _pTempNode; + _pTempNode = null; + } + else + { + return; + } + + __length--; +} + +template +void +_LinkedList ::push_front(const T& _val) +{ + insert_node(__pHead->pNext, null, _val); +} + +template +void +_LinkedList ::push_back(const T& _val) +{ + insert_node(null, __pTail->pPrev, _val); +} + +template +void +_LinkedList ::pop_front(void) +{ + delete_node(__pHead->pNext, null); +} + +template +void +_LinkedList ::pop_back(void) +{ + delete_node(null, __pTail->pPrev); +} + +template +void +_LinkedList ::clear(void) +{ + _ListNode* _pTempNode; + + while (__pHead->pNext != __pTail) + { + _pTempNode = __pHead->pNext; + __pHead->pNext = __pHead->pNext->pNext; + delete _pTempNode; + _pTempNode = null; + } + + __pTail->pPrev = __pHead; + __length = 0; +} + +template +bool +_LinkedList ::empty(void) const +{ + if (__length <= 0) + { + return true; + } + + return false; +} + +template +void +_LinkedList ::sort(bool (* _compare)(T _a, T _b)) +{ + if (__length <= 0) + { + return; + } + + sort_node(_compare, __pHead->pNext, __pTail->pPrev); +} + +template +void +_LinkedList ::advance(_Iterator& _where, int _index) +{ + while (_index--) + { + ++_where; + } +} + +template +void +_LinkedList ::insert_node(_ListNode* _first, _ListNode* _last, const T& _val) +{ + _ListNode* _pNewNode = new (std::nothrow) _ListNode; + _pNewNode->val = _val; + + if (!_first && !_last) + { + __pHead->pNext = _pNewNode; + __pTail->pPrev = _pNewNode; + } + else if (_first) + { + _pNewNode->pPrev = __pHead; + _pNewNode->pNext = __pHead->pNext; + __pHead->pNext->pPrev = _pNewNode; + __pHead->pNext = _pNewNode; + } + else + { + _pNewNode->pPrev = __pTail->pPrev; + _pNewNode->pNext = __pTail; + __pTail->pPrev->pNext = _pNewNode; + __pTail->pPrev = _pNewNode; + } + + __length++; +} + + +template +void +_LinkedList ::insert_node(_Iterator& _where, const T& _val) +{ + _ListNode* _pNewNode = new (std::nothrow) _ListNode; + _pNewNode->val = _val; + + if (_where.__pPos == __pHead->pNext) + { + _pNewNode->pPrev = __pHead; + _pNewNode->pNext = __pHead->pNext; + __pHead->pNext->pPrev = _pNewNode; + __pHead->pNext = _pNewNode; + } + else if (_where.__pPos == __pTail) + { + _pNewNode->pPrev = __pTail->pPrev; + _pNewNode->pNext = __pTail; + __pTail->pPrev->pNext = _pNewNode; + __pTail->pPrev = _pNewNode; + } + else + { + _pNewNode->pPrev = _where.__pPos->pPrev; + _where.__pPos->pPrev->pNext = _pNewNode; + _pNewNode->pNext = _where.__pPos; + _where.__pPos->pPrev = _pNewNode; + } + + __length++; +} + +template +void +_LinkedList ::delete_node(_ListNode* _first, _ListNode* _last) +{ + if (__length <= 0) + { + return; + } + + if ((_first == __pHead->pNext) && (_first == __pTail->pPrev)) // only one node + { + delete __pHead->pNext; + __pHead->pNext = __pTail; + __pTail->pPrev = __pHead; + } + else if (_first) // pop_front + { + __pHead->pNext = __pHead->pNext->pNext; + delete __pHead->pNext->pPrev; + __pHead->pNext->pPrev = __pHead; + } + else if (_last) // pop_back + { + __pTail->pPrev = __pTail->pPrev->pPrev; + delete __pTail->pPrev->pNext; + __pTail->pPrev->pNext = __pTail; + } + else + { + return; + } + + __length--; +} + +template +void +_LinkedList ::delete_node(_Iterator& _where) +{ + if (__length <= 0) + { + return; + } + + if ((_where.__pPos == __pHead->pNext) && (_where.__pPos == __pTail->pPrev)) + { + delete __pHead->pNext; + __pHead->pNext = __pTail; + __pTail->pPrev = __pHead; + + _where.__pPos = __pTail; + } + else + { + if (_where.__pPos == __pHead->pNext) + { + __pHead->pNext = __pHead->pNext->pNext; + delete __pHead->pNext->pPrev; + __pHead->pNext->pPrev = __pHead; + + _where.__pPos = __pHead->pNext; + } + else if (_where.__pPos == __pTail->pPrev) + { + __pTail->pPrev = __pTail->pPrev->pPrev; + delete __pTail->pPrev->pNext; + __pTail->pPrev->pNext = __pTail; + + _where.__pPos = __pTail; + } + else + { + _ListNode* pDeleteNode = _where.__pPos; + + pDeleteNode->pPrev->pNext = pDeleteNode->pNext; + pDeleteNode->pNext->pPrev = pDeleteNode->pPrev; + _where.__pPos = pDeleteNode->pNext; +// ++_where; + + delete pDeleteNode; + } + } + + __length--; +} + +template +void +_LinkedList ::swap_node(_ListNode* _a, _ListNode* _b) +{ + T _temp; + + _temp = _a->val; + _a->val = _b->val; + _b->val = _temp; +} + +template +void +_LinkedList ::sort_node(bool (* _compare)(T _a, T _b), _ListNode* _low, _ListNode* _hight) +{ + // FIXME : This function implement using quick sort algorithm. + // You should remember that _Iterator is invalid after sorting. + _ListNode* _left, * _right, * _pivot; + + int _total = count_node(_low, _hight); + int _leftCount = 1; + int _rightCount = _total - 1; + + if (_rightCount > 0) + { + _left = _low; + _right = _hight->pPrev; + _pivot = _hight; + + while (1) + { + while (_compare(_left->val, _pivot->val)) + { + _left = _left->pNext; + _leftCount++; + } + + while (!_compare(_right->val, _pivot->val)) + { + if ((_rightCount <= 1) || (_right->pPrev == null)) + { + break; + } + + _right = _right->pPrev; + _rightCount--; + } + + if ((_leftCount >= _rightCount) || (_right->pPrev == null)) + { + break; + } + + swap_node(_left, _right); + + _left = _left->pNext; + _leftCount++; + + _right = _right->pPrev; + _rightCount--; + } + + swap_node(_pivot, _left); + + if ((_left->pPrev != null) && (_leftCount - 1 > 0)) + if ((_left->pNext != _low) && (_low->pPrev != _left)) + sort_node(_compare, _low, _left->pPrev); + + if ((_left->pNext != null) && (_leftCount < _total)) + if ((_left->pPrev != _hight) && (_hight->pNext != _left)) + sort_node(_compare, _left->pNext, _hight); + } +} + +template +int +_LinkedList ::count_node(_ListNode* _left, _ListNode* _right) +{ + int _count = 0; + _ListNode* _pTempNode = _left; + + while (_pTempNode != _right) + { + _pTempNode = _pTempNode->pNext; + _count++; + } + + return ++_count; +} + +template +T& +_LinkedList ::at(int _index) const +{ + if ((__length <= 0) || (_index >= __length)) + { + return __pHead->val; + } + + _ListNode* _pTempNode = __pHead->pNext; + + for (int i = 0; i < _index; i++) + { + _pTempNode = _pTempNode->pNext; + } + + return _pTempNode->val; +} + +#endif // _FUI_CTRL_INTERNAL_LINKEDLIST_H diff --git a/src/ui/inc/FUiCtrl_ListBaseImpl.h b/src/ui/inc/FUiCtrl_ListBaseImpl.h new file mode 100644 index 0000000..0527165 --- /dev/null +++ b/src/ui/inc/FUiCtrl_ListBaseImpl.h @@ -0,0 +1,157 @@ +// +// 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_ListBaseImpl.h + * @brief This is the header file for the _ListBaseImpl class. + * + * This header file contains the declarations of the _ListBaseImpl class and its helper classes. + */ + +#ifndef _FUI_CTRL_INTERNAL_LIST_COMMON_H_ +#define _FUI_CTRL_INTERNAL_LIST_COMMON_H_ + +#include +#include +#include +#include "FUiCtrl_TableView.h" +#include "FUi_ResourceManager.h" +#include "FUi_ContainerImpl.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _Label; + +typedef enum _CheckBoxBitmapType +{ + CHECK_BOX_UNCHECKED = 0, + CHECK_BOX_CHECKED, + CHECK_BOX_MAX +}_CheckBoxStatus; + +enum _BitmapType +{ + BITMAP_CHECKED = 0, + BITMAP_UNCHECKED, + BITMAP_CHECKED_DISABLED, + BITMAP_UNCHECKED_DISABLED, + BITMAP_CHECKED_PRESSED, + BITMAP_UNCHECKED_PRESSED, + BITMAP_MAX +}; + +class _ListBaseImpl + : public _ControlImpl + , public Tizen::Ui::ITouchEventListener +{ +public: + _ListBaseImpl(Control* pList, _TableView* pCore); + ~_ListBaseImpl(void); + + Tizen::Ui::Controls::TableViewAnnexStyle GetAnnexStyle(void); + Tizen::Graphics::Bitmap* CreateMergedBitmapN(Tizen::Graphics::Bitmap& pNormalBitmap, Tizen::Graphics::Bitmap* pSelectedBitmap); + Tizen::Graphics::Bitmap* CreateOnOffMergedBitmapN(Tizen::Graphics::Bitmap& pNormalBitmap, Tizen::Graphics::Bitmap& pSelectedBitmap, _CheckBoxBitmapType status); + + result LoadDefaultBitmap(void); + Tizen::Graphics::Bitmap** GetCheckBitmaps(void); + _TableView& GetCore(void); + const _TableView& GetCore(void) const; + + virtual void OnDraw(void); + virtual result SetListStyle(CustomListStyle style); + + virtual void ProcessItemStateChange(int groupIndex, int itemIndex, int elementId, ItemStatus itemStatus) = 0; + virtual void ProcessItemStateChange(int groupIndex, int itemIndex, ItemStatus itemStatus) = 0; + + virtual result SetItemChecked(int groupIndex, int itemIndex, bool check); + virtual bool IsItemChecked(int groupIndex, int itemIndex) const; + + virtual void SetTextOfEmptyList(const Tizen::Base::String& text); + virtual void SetTextColorOfEmptyList(const Tizen::Graphics::Color& color); + virtual Tizen::Graphics::Color GetTextColorOfEmptyList(void) const; + + virtual result GetTopDrawnItemIndex(int& groupIndex, int& itemIndex) const; + virtual result GetBottomDrawnItemIndex(int& groupIndex, int& itemIndex) const; + + result GetItemIndexFromPosition(const Tizen::Graphics::Point& point, int& groupIndex, int& itemIndex) const; + + virtual void OnTouchDoublePressed (const Tizen::Ui::Control &source, const Tizen::Graphics::Point ¤tPosition, const Tizen::Ui::TouchEventInfo &touchInfo); + virtual void OnTouchFocusIn (const Tizen::Ui::Control &source, const Tizen::Graphics::Point ¤tPosition, const Tizen::Ui::TouchEventInfo &touchInfo); + virtual void OnTouchFocusOut (const Tizen::Ui::Control &source, const Tizen::Graphics::Point ¤tPosition, const Tizen::Ui::TouchEventInfo &touchInfo); + virtual void OnTouchLongPressed (const Tizen::Ui::Control &source, const Tizen::Graphics::Point ¤tPosition, const Tizen::Ui::TouchEventInfo &touchInfo); + virtual void OnTouchMoved (const Tizen::Ui::Control &source, const Tizen::Graphics::Point ¤tPosition, const Tizen::Ui::TouchEventInfo &touchInfo); + virtual void OnTouchPressed (const Tizen::Ui::Control &source, const Tizen::Graphics::Point ¤tPosition, const Tizen::Ui::TouchEventInfo &touchInfo); + virtual void OnTouchReleased (const Tizen::Ui::Control &source, const Tizen::Graphics::Point ¤tPosition, const Tizen::Ui::TouchEventInfo &touchInfo); + + void UpdateElements(const Control &source, CustomListItemStatus itemStatus); + + result InsertIntoItemsList(const CustomListItem& item, int groupIndex, int itemIndex, bool updateIndices = true); + result RemoveFromItemsList(int groupIndex, int itemIndex, bool updateIndices = true); + result SetInItemsList(const CustomListItem& item, int groupIndex, int itemIndex); + + void RemoveAllFromItemsList(void); + + CustomListItem* GetCustomListItemAt(int groupIndex, int itemIndex); + class _TableViewItemData* GetTableViewItemAt(int groupIndex, int itemIndex); + class _TableViewGroupItemData* GetTableViewGroupItemAt(int groupIndex); + + const CustomListItem* GetCustomListItemAt(int groupIndex, int itemIndex) const; + const class _TableViewItemData* GetTableViewItemAt(int groupIndex, int itemIndex) const; + const class _TableViewGroupItemData* GetTableViewGroupItemAt(int groupIndex) const; + + class _CheckElementModel* GetCheckElementAt(int groupIndex, int itemIndex); + const class _CheckElementModel* GetCheckElementAt(int groupIndex, int itemIndex) const; + void DrawItem(int groupIndex, int itemIndex); + virtual int GetTopItemIndex(int groupIndex) const; + + int GetItemCount(void) const; + int GetGroupCount(void) const; + int GetSubItemCountAt(int groupIndex) const; + + result RemoveFromSubItemsList(int groupIndex); + + bool IsItemNew(const CustomListItem& item) const; + + virtual void OnBoundsChanged(void); + +private: + _ListBaseImpl(const _ListBaseImpl& rhs); + _ListBaseImpl& operator =(const _ListBaseImpl& rhs); + + result UpdateIndices(int groupIndex, int itemIndex, int updateBy); + CustomListItem* GetItemFromControl(const Control &source); + +protected: + TableViewAnnexStyle _annexStyle; + Tizen::Graphics::Bitmap* _pCheckBitmaps[BITMAP_MAX]; + int _currentRadioIndex; + int _currentRadioGroupIndex; + bool _isDividerEnabled; + int _defaultItemHeight; + Tizen::Base::Collection::ArrayList _itemsList; + +private: + _Label* __pEmptyText; + Tizen::Graphics::Color __emptyTextColor; + + friend class _CustomListItemImpl; +}; + +}}} //Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_LIST_COMMON_H_ diff --git a/src/ui/inc/FUiCtrl_ListContextItemImpl.h b/src/ui/inc/FUiCtrl_ListContextItemImpl.h new file mode 100644 index 0000000..4e6106f --- /dev/null +++ b/src/ui/inc/FUiCtrl_ListContextItemImpl.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 FUiCtrl_ListContextItemImpl.h + * @brief This is the header file for the _ListContextItemImpl class. + * + * This header file contains the declarations of the _ListContextItemImpl + * class. + */ + +#ifndef _FUI_CTRL_LIST_CONTEXT_ITEM_IMPL_H_ +#define _FUI_CTRL_LIST_CONTEXT_ITEM_IMPL_H_ + +#include "FUiCtrl_ListViewImpl.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class ListContextItem; +class _ListViewContextItem; + +class _ListContextItemImpl + : public Tizen::Base::Object +{ +public: + static _ListContextItemImpl* CreateListContextItemImplN(ListContextItem* pPublic); + + virtual ~_ListContextItemImpl(void); + + virtual const char* GetPublicClassName(void) const; + + virtual const ListContextItem& GetPublic(void) const; + + virtual ListContextItem& GetPublic(void); + + result AddElement(int elementId, const Tizen::Base::String& text, bool enable = true); + + result AddElement(int elementId, const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap& pressedBitmap, + const Tizen::Graphics::Bitmap* pHighlightedBitmap = null, bool enable = true); + + result AddElement(int elementId, const Tizen::Base::String& text, const Tizen::Graphics::Bitmap& normalBitmap, + const Tizen::Graphics::Bitmap& pressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap = null, bool enable = true); + + result SetElementBackgroundColor(int elementId, ListContextItemElementStatus status, const Tizen::Graphics::Color& backgroundColor); + + Tizen::Graphics::Color GetElementBackgroundColor(int elementId, ListContextItemElementStatus status) const; + + result SetElementTextColor(int elementId, ListContextItemElementStatus status, const Tizen::Graphics::Color& textColor); + + Tizen::Graphics::Color GetElementTextColor(int elementId, ListContextItemElementStatus status) const; + + Tizen::Graphics::Color GetBackgroundColor(void) const; + + result SetBackgroundColor(const Tizen::Graphics::Color& color); + + result SetBackgroundBitmap(const Tizen::Graphics::Bitmap* pBitmap); + + _ListViewContextItem* GetContextItem(void) const; + +public: + static _ListContextItemImpl* GetInstance(ListContextItem& listContextItem); + + static const _ListContextItemImpl* GetInstance(const ListContextItem& listContextItem); + +private: + _ListContextItemImpl(ListContextItem* pPublic); + + _ListContextItemImpl(const _ListContextItemImpl& rhs); + + _ListContextItemImpl& operator =(const _ListContextItemImpl& rhs); + + result Construct(void); + +private: + ListContextItem* __pPublic; + _ListViewContextItem* __pContextItem; +}; // _ListContextItemImpl + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_LIST_CONTEXT_ITEM_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_ListImpl.h b/src/ui/inc/FUiCtrl_ListImpl.h new file mode 100644 index 0000000..cdbafc7 --- /dev/null +++ b/src/ui/inc/FUiCtrl_ListImpl.h @@ -0,0 +1,247 @@ +// +// 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_ListImpl.h + * @brief This is the header file for the _ListImpl class. + */ + +#ifndef _FUI_CTRL_LIST_IMPL_H_ +#define _FUI_CTRL_LIST_IMPL_H_ + +#include +#include "FUiCtrl_TableViewItemProvider.h" +#include "FUiCtrl_CustomListItemImpl.h" +#include "FUiCtrl_ITableViewItemEventListener.h" + + +namespace Tizen { namespace Ui { namespace Controls +{ + +extern const int INVALID_INDEX; + +class _ListImpl; + +class _NumberElement + : public ICustomListElement +{ +public: + _NumberElement(void); + ~_NumberElement(void); + + result DrawElement(const Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::Rectangle& rect, Tizen::Ui::Controls::CustomListItemStatus itemStatus); + +private: + _NumberElement(const _NumberElement& rhs); + _NumberElement& operator =(const _NumberElement& rhs); + +public: + int index; + +}; //_NumberElement + +class _ListItemDataProvider + : public ITableViewItemProvider +{ +public: + _ListItemDataProvider(_ListImpl* pListImpl); + virtual ~_ListItemDataProvider(void); + + virtual int GetItemCount(void); + virtual TableViewItem* CreateItem(int index, int itemWidth); + virtual bool DeleteItem(const int itemIndex, TableViewItem* pItem); + virtual int GetDefaultItemHeight(void); + virtual void UpdateItem(int itemIndex, TableViewItem* pItem); + +private: + _ListItemDataProvider(void); + _ListItemDataProvider(const _ListItemDataProvider& rhs); + _ListItemDataProvider& operator =(const _ListItemDataProvider& rhs); + +private: + _ListImpl* __pListImpl; +}; //_ListItemDataProvider + +class _ListImpl + : public _ListBaseImpl + , public _ITableViewItemEventListener +{ +public: + _ListImpl(Control* pList, _TableView* pCore); + ~_ListImpl(void); + + virtual const char* GetPublicClassName(void) const; + virtual const List& GetPublic(void) const; + virtual List& GetPublic(void); + virtual const _TableView& GetCore(void) const; + virtual _TableView& GetCore(void); + static _ListImpl* CreateListImplN(List* pControl, const Tizen::Graphics::Rectangle& bounds); + result Initialize(ListItemFormat itemFormat, int row1Height, int row2Height, int column1Width, int column2Width); + result UpdateBounds(const Tizen::Graphics::Rectangle& rect); + result SetStyle(ListStyle style); + void SetListItemFormat(ListItemFormat itemFormat); + result InitCustomListItemFormat(void); + bool GetTextSlide(ListItemText textIndex); + + //@See doxygen + result AddItemEventListener(const Tizen::Ui::IItemEventListener& listener); + //@See doxygen + result RemoveItemEventListener(const Tizen::Ui::IItemEventListener& listener); + //@See doxygen + result AddItem(const Tizen::Base::String* pText1, const Tizen::Base::String* pText2, const Tizen::Graphics::Bitmap* pBitmap1, const Tizen::Graphics::Bitmap* pBitmap2, int itemId = LIST_ITEM_UNSPECIFIED_ID); + //@See doxygen + result InsertItemAt(int index, const Tizen::Base::String* pText1, const Tizen::Base::String* pText2, const Tizen::Graphics::Bitmap* pBitmap1, const Tizen::Graphics::Bitmap* pBitmap2, int itemId = LIST_ITEM_UNSPECIFIED_ID); + //@See doxygen + result SetItemAt(int index, const Tizen::Base::String* pText1, const Tizen::Base::String* pText2, const Tizen::Graphics::Bitmap* pBitmap1, const Tizen::Graphics::Bitmap* pBitmap2, int itemId = LIST_ITEM_UNSPECIFIED_ID); + //@See doxygen + result RemoveItemAt(int index); + //@See doxygen + result RemoveAllItems(void); + //@See doxygen + result SetItemEnabled(int index, bool enable); + //@See doxygen + bool IsItemEnabled(int index) const; + //@See doxygen + void SetFocusedItemBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap); + //@See doxygen + void SetHighlightedItemBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap); + //@See doxygen + void SetNormalItemBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap); + //@See doxygen + void SetItemTextColor(ListItemText textIndex, const Tizen::Graphics::Color& textColor); + //@See doxygen + Tizen::Graphics::Color GetItemTextColor(ListItemText textIndex) const; + //@See doxygen + void EnableTextSlide(ListItemText textIndex); + //@See doxygen + void DisableTextSlide(void); + //@See doxygen + int GetItemHeight(void) const; + //@See doxygen + int GetRow1Height(void) const; + //@See doxygen + int GetRow2Height(void) const; + //@See doxygen + int GetColumn1Width(void) const; + //@See doxygen + int GetColumn2Width(void) const; + //@See doxygen + result SetRow1Height(int row1Height); + //@See doxygen + result SetRow2Height(int row2Height); + //@See doxygen + result SetColumn1Width(int column1Width); + //@See doxygen + result SetColumn2Width(int column2Width); + //@See doxygen + result SetItemChecked(int index, bool check); + //@See doxygen + bool IsItemChecked(int index) const; + //@See doxygen + result SetAllItemsChecked(bool check); + //@See doxygen + result RemoveAllCheckedItems(void); + //@See doxygen + int GetFirstCheckedItemIndex(void) const; + //@See doxygen + int GetLastCheckedItemIndex(void) const; + //@See doxygen + int GetNextCheckedItemIndexAfter(int index) const; + //@See doxygen + int GetItemIndexFromItemId(int itemId) const; + //@See doxygen + int GetItemIdAt(int index) const; + //@See doxygen + void ScrollToBottom(void); + //@See doxygen + void ScrollToTop(void); + //@See doxygen + result ScrollToTop(int index); + //@See doxygen + result RefreshItem(int index); + + static _ListImpl* GetInstance(List& list); + static const _ListImpl* GetInstance(const List& list); + +private: + _ListImpl(const _ListImpl& rhs); + _ListImpl& operator =(const _ListImpl& rhs); + + virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status); + virtual void OnTableViewItemReordered(Tizen::Ui::Controls::_TableView& tableView, int itemIndexFrom, int itemIndexTo); + virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::_TableView& tableView, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pContextItem, bool activated); + virtual void OnGroupedTableViewGroupItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status); + virtual void OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status); + virtual void OnGroupedTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pContextItem, bool activated); + virtual void OnGroupedTableViewItemReordered(Tizen::Ui::Controls::_TableView& tableView, int groupIndexFrom, int itemIndexFrom, int groupIndexTo, int itemIndexTo); + virtual void OnSectionTableViewItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int sectionIndex, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status); + virtual void OnSectionTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::_TableView& tableView, int sectionIndex, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pContextItem, bool activated); + virtual void OnTableViewItemSwept(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewSweepDirection direction); + + void ProcessItemStateChange(int groupIndex, int itemIndex, ItemStatus itemStatus); + void ProcessItemStateChange(int groupIndex, int itemIndex, int elementId, ItemStatus itemStatus); + + CustomListItem* GetNewItemN(const Tizen::Base::String* pText1, const Tizen::Base::String* pText2, + const Tizen::Graphics::Bitmap* pBitmap1, const Tizen::Graphics::Bitmap* pBitmap2, int itemId, int index); + + void GetElementRects(Tizen::Graphics::Rectangle& text1Rect, Tizen::Graphics::Rectangle& text2Rect, Tizen::Graphics::Rectangle& img1Rect, Tizen::Graphics::Rectangle& img2Rect); + result ReDrawList(void); + void SetBitmap(TableViewItemDrawingStatus itemStatus, const Tizen::Graphics::Bitmap& bitmap); + result UpdateNumbers(int index); + result Refresh(int); + result SetItemChecked(int groupIndex, int itemIndex, bool check); + bool IsItemChecked(int groupIndex, int subIndex) const; + + result InitializeItemSizes(int row1Height, int row2height, int column1Width, int column2Width); + void GetItemMargins(int& leftMargin, int& numberStyleMargin, int& dividerMargin, int& lowerMargin, int& upperMargin); + +private: + static const int ID_FORMAT_TEXT1 = 101; + static const int ID_FORMAT_TEXT2 = 102; + static const int ID_FORMAT_IMAGE1 = 103; + static const int ID_FORMAT_IMAGE2 = 104; + static const int ID_FORMAT_NUMBER = 105; + static const int ID_FORMAT_CHECK = 106; + + Tizen::Base::Collection::LinkedList __itemListeners; + int __row1Height; + int __row2Height; + int __column1Width; + int __column2Width; + Tizen::Graphics::Color __text1Color; + Tizen::Graphics::Color __text2Color; + bool __text1SlideEnabled; + bool __text2SlideEnabled; + ListStyle __listStyle; + ListItemFormat __listItemFormat; + Tizen::Graphics::Bitmap* __pNormalBgBitmap; + Tizen::Graphics::Bitmap* __pHighlightedBgBitmap; + Tizen::Graphics::Bitmap* __pFocusedBgBitmap; + Tizen::Base::Collection::LinkedList* __pNumberElements; + CustomListItemFormat* __pItemFormat; + _ListItemDataProvider* __pItemProvider; + int __maxCount; + bool __isCheckStyle; + bool __directDelete; + + friend class _ListItemDataProvider; + friend class _CustomListItemImpl; + +}; //_ListImpl + +} } } //Tizen::Ui::Controls + +#endif //_FUI_CTRL_LIST_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_ListItemBaseImpl.h b/src/ui/inc/FUiCtrl_ListItemBaseImpl.h new file mode 100644 index 0000000..6e1fc34 --- /dev/null +++ b/src/ui/inc/FUiCtrl_ListItemBaseImpl.h @@ -0,0 +1,117 @@ +// +// 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_ListItemBaseImpl.h + * @brief This is the header file for the _ListItemBaseImpl class. + * + * This header file contains the declarations of the _ListItemBaseImpl class. + */ + +#ifndef _FUI_CTRL_LIST_ITEM_BASE_IMPL_H_ +#define _FUI_CTRL_LIST_ITEM_BASE_IMPL_H_ + +#include +#include "FUiCtrl_IActionEventListener.h" +#include "FUiCtrl_IUiListViewItemEventListener.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class ListItemBase; +class _ListContextItemImpl; +class _ListViewItem; +class _UiListViewItemEvent; + +class _ListItemBaseImpl + : public Tizen::Base::Object + , public Tizen::Ui::Controls::_IActionEventListener + , virtual public Tizen::Base::Runtime::IEventListener +{ + +public: + static _ListItemBaseImpl* CreateListItemBaseImplN(ListItemBase* pPublic, const Tizen::Graphics::FloatDimension& itemSize, ListAnnexStyle style); + + _ListItemBaseImpl(ListItemBase* pPublic); + + virtual ~_ListItemBaseImpl(void); + + virtual const char* GetPublicClassName(void) const; + + virtual const ListItemBase& GetPublic(void) const; + + virtual ListItemBase& GetPublic(void); + + result Construct(const Tizen::Graphics::FloatDimension& itemSize, ListAnnexStyle style); + + _ListViewItem* GetListViewItem(void) const; + + Tizen::Graphics::FloatDimension GetItemSize(void) const; + + result SetBackgroundBitmap(ListItemDrawingStatus status, const Tizen::Graphics::Bitmap* pBitmap); + + result SetBackgroundColor(ListItemDrawingStatus status, const Tizen::Graphics::Color& color); + + Tizen::Graphics::Color GetBackgroundColor(ListItemDrawingStatus status) const; + + result SetContextItem(const _ListContextItemImpl* pItem); + + result SetDescriptionText(const Tizen::Base::String& text); + + result SetDescriptionTextColor(const Tizen::Graphics::Color& color); + + static float GetAnnexWidth(ListAnnexStyle style); + + ListAnnexStyle GetListItemAnnexStyle(void); + + bool SetTextColor(int elementId, Tizen::Graphics::Color textColor); + + bool GetTextColor(int elementId, Tizen::Graphics::Color& textColor) const; + + void AddListViewItemEventListener(_IUiListViewItemEventListener& listener); + + void RemoveListViewItemEventListener(_IUiListViewItemEventListener& listener); + + virtual void OnActionPerformed(const Tizen::Ui::_Control& source, int actionId); + +public: + static _ListItemBaseImpl* GetInstance(ListItemBase& listItemBase); + + static const _ListItemBaseImpl* GetInstance(const ListItemBase& listItemBase); + +private: + _ListItemBaseImpl(const _ListItemBaseImpl& rhs); + + _ListItemBaseImpl& operator =(const _ListItemBaseImpl& rhs); + +protected: + friend class _ListViewItemProviderAdaptor; + friend class _GroupedListViewItemProviderAdaptor; + +private: + ListItemBase* __pPublic; + _ListViewItem* __pListViewItem; + + Tizen::Graphics::FloatDimension __itemSize; + ListAnnexStyle __style; + + _UiListViewItemEvent* __pEvent; +}; // _ListItemBaseImpl + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_LIST_ITEM_BASE_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_ListItemCommon.h b/src/ui/inc/FUiCtrl_ListItemCommon.h new file mode 100644 index 0000000..a3b7167 --- /dev/null +++ b/src/ui/inc/FUiCtrl_ListItemCommon.h @@ -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 FUiCtrl_ListItemCommon.h + * @brief This is the header file for the _ListItemCommon class. + * + * This header file contains the declarations of the _ListItemCommon class. + */ + +#ifndef _FUI_CTRL_INTERNAL_LIST_ITEM_COMMON_H_ +#define _FUI_CTRL_INTERNAL_LIST_ITEM_COMMON_H_ + +#include "FUiCtrl_IListItemCommon.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _OSP_EXPORT_ _ListItemCommon + : public _IListItemCommon +{ +public: + virtual ~_ListItemCommon(void); + + virtual int GetItemHeight(void) const; + + virtual void SetItemHeight(int itemHeight); + + virtual void SetChecked(bool checked); + + virtual bool IsChecked(void) const; + + virtual void SetItemEnabled(bool enabled); + + virtual bool IsItemEnabled(void) const; + + virtual bool IsReorderMode(void) const; + + virtual void SetReorderMode(bool enabled); + + virtual void SetItemChanged(bool changed); + + virtual bool IsItemChanged(void) const; + + virtual void SetAppInfo(const void* pAppInfo); + + virtual void* GetAppInfo(void) const; + + int AddRef(void); + + int Release(void); + +protected: + _ListItemCommon(void); + +private: + void* __pAppInfo; + int __refCount; + int __itemHeight; + bool __checkedState; + bool __enabledState; + bool __itemChanged; + bool __reorderMode; +}; // _ListItemCommon + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_LIST_ITEM_COMMON_H_ diff --git a/src/ui/inc/FUiCtrl_ListItemEvent.h b/src/ui/inc/FUiCtrl_ListItemEvent.h new file mode 100644 index 0000000..2cd101b --- /dev/null +++ b/src/ui/inc/FUiCtrl_ListItemEvent.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 FUiCtrl_ListItemEvent.h + * @brief This is the header file for the _ListItemEvent class. + * + * This header file contains the declarations of the _ListItemEvent class. + */ + +#ifndef _FUI_CTRL_INTERNAL_LIST_ITEM_EVENT_H_ +#define _FUI_CTRL_INTERNAL_LIST_ITEM_EVENT_H_ + +#include +#include +#include +#include "FUiCtrl_ListViewTypes.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +enum ListClassName +{ + CLASSNAME_LISTVIEW = 0, + CLASSNAME_GROUPEDLISTVIEW, + CLASSNAME_NONE = 99 +}; + +class _ListItemEvent + : public Tizen::Base::Runtime::_Event +{ +// Lifecycle +public: + _ListItemEvent(void); + + virtual ~_ListItemEvent(void); + + result Construct(Tizen::Ui::Control& source, ListClassName name); + +// Accessors +public: + Tizen::Ui::Control* GetSource(void) const; + + ListClassName GetListClassName(void) const; + +// Operations +protected: + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + +//Attribute +private: + Tizen::Ui::Control* __pSource; + bool __invokeListViewItemCallback; + bool __invokeGroupedListViewItemCallback; + ListClassName __className; +}; // _ListItemEvent + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_LIST_ITEM_EVENT_H_ diff --git a/src/ui/inc/FUiCtrl_ListItemEventArg.h b/src/ui/inc/FUiCtrl_ListItemEventArg.h new file mode 100644 index 0000000..018f4b8 --- /dev/null +++ b/src/ui/inc/FUiCtrl_ListItemEventArg.h @@ -0,0 +1,93 @@ +// +// 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_ListItemEventArg.h + * @brief This is the header file for the _ListItemEventArg class. + * + * This header file contains the declarations of the _ListItemEventArg class. + */ + +#ifndef _FUI_CTRL_INTERNAL_LIST_ITEM_EVENT_ARG_H_ +#define _FUI_CTRL_INTERNAL_LIST_ITEM_EVENT_ARG_H_ + +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +enum NotifyType +{ + NOTIFY_TYPE_SELECTED_ITEM = 0, + NOTIFY_TYPE_HIGHLIGHED_ITEM, + NOTIFY_TYPE_ANNEX_CHECK, + NOTIFY_TYPE_ANNEX_UNCHECK, + NOTIFY_TYPE_ANNEX_MORE, + NOTIFY_TYPE_LONG_PRESSED_ITEM, + NOTIFY_TYPE_SWEPT_ITEM, + NOTIFY_TYPE_REORDERED_ITEM, + NOTIFY_TYPE_SELCTED_CONTEXT_ITEM +}; + +class _ListItemEventArg + : public Tizen::Base::Runtime::IEventArg +{ +// Lifecycle +public: + _ListItemEventArg(int arg1, int arg2, int arg3, int arg4, NotifyType type); + + virtual ~_ListItemEventArg(void); + +// Accessor + int GetEventArg1(void) const; + + int GetEventArg2(void) const; + + int GetEventArg3(void) const; + + int GetEventArg4(void) const; + + void GetEventArgs(int& arg1, int& arg2, int& arg3, int& arg4); + + NotifyType GetNotifyType(void) const; + +private: + _ListItemEventArg(const _ListItemEventArg& rhs); + _ListItemEventArg& operator=(const _ListItemEventArg& rhs); + +// Attribute +private: + // Case 1. ListView event + // normal event : __arg1 - itemIndex / __arg2 - elementId + // reorder event : __arg1 - itemIndexFrom / __arg2 - itemIndexTo + // Case 2. GroupedListView event + // normal event : __arg1 - groupIndex / __arg2 - itemIndex / __arg3 - elementId + // reorder event : __arg1 - groupIndexFrom / __arg2 - itemIndexFrom / __arg3 - groupIndexTo / __arg4 - itemIndexTo + int __arg1; + int __arg2; + int __arg3; + int __arg4; + NotifyType __type; +}; // _ListItemEventArg + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_LIST_ITEM_EVENT_ARG_H_ diff --git a/src/ui/inc/FUiCtrl_ListListener.h b/src/ui/inc/FUiCtrl_ListListener.h new file mode 100644 index 0000000..f9191af --- /dev/null +++ b/src/ui/inc/FUiCtrl_ListListener.h @@ -0,0 +1,53 @@ +// +// 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_ListListener.h + * @brief This is the header file for the _ListListener class. + * + * This header file contains the declarations of the _ListListener class and its helper classes. + */ + +#ifndef _FUICTRL_LIST_LISTENER_H_ +#define _FUICTRL_LIST_LISTENER_H_ + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _ListListener + : public Tizen::Base::Object +{ + +public: + _ListListener(void) + : pListener(null) + { + } + + virtual ~_ListListener(void) {} + +private: + _ListListener(const _ListListener& rhs); + _ListListener& operator =(const _ListListener& rhs); + +public: + Tizen::Base::Runtime::IEventListener* pListener; +}; //_ListListener + +}}} + +#endif //_FUICTRL_LIST_LISTENER_H_ diff --git a/src/ui/inc/FUiCtrl_ListViewContextItem.h b/src/ui/inc/FUiCtrl_ListViewContextItem.h new file mode 100644 index 0000000..025bc72 --- /dev/null +++ b/src/ui/inc/FUiCtrl_ListViewContextItem.h @@ -0,0 +1,107 @@ +// +// 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_ListViewContextItem.h + * @brief This is the header file for the FUiCtrl_ListViewContextItem class. + * + * This header file contains the declarations of the FUiCtrl_ListViewContextItem class. + */ + +#ifndef _FUI_CTRL_INTERNAL_LIST_VIEW_CONTEXT_ITEM_H_ +#define _FUI_CTRL_INTERNAL_LIST_VIEW_CONTEXT_ITEM_H_ + +#include "FUi_Control.h" +#include "FUiCtrl_Button.h" +#include "FUiCtrl_IActionEventListener.h" +#include "FUiCtrl_LinkedList.h" +#include "FUiCtrl_ListViewTypes.h" +#include "FUiCtrl_TableViewItem.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +struct _ListViewContextItemElement +{ + int elementId; + Tizen::Ui::Controls::_Button* pButton; +}; + +class _ListViewContextItem + : public Tizen::Ui::Controls::_TableViewItem +{ +public: + _ListViewContextItem(float itemHeight); + + virtual ~_ListViewContextItem(void); + + static _ListViewContextItem* CreateListViewContextItemN(float itemHeight); + + bool AddElement(int elementId, const Tizen::Base::String& text, bool enable = true); + + bool AddElement(int elementId, const Tizen::Graphics::Bitmap* pNormalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, + const Tizen::Graphics::Bitmap* pHighlightedBitmap, bool enable = true); + + bool AddElement(int elementId, const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pNormalBitmap, + const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap, bool enable = true); + + bool SetElementTextColor(int elementId, ListViewContextItemElementDrawingStatus status, const Tizen::Graphics::Color& textColor); + + Tizen::Graphics::Color GetElementTextColor(int elementId, ListViewContextItemElementDrawingStatus status) const; + + bool SetElementBackgroundColor(int elementId, ListViewContextItemElementDrawingStatus status, const Tizen::Graphics::Color& backgroundColor); + + Tizen::Graphics::Color GetElementBackgroundColor(int elementId, ListViewContextItemElementDrawingStatus status) const; + + bool HasElement(int elementId); + + int GetElementIdFromPosition(const Tizen::Graphics::FloatPoint& position) const; + + void AddContextItemEventListener(Tizen::Ui::Controls::_IActionEventListener& listener); + + void RemoveContextItemEventListener(Tizen::Ui::Controls::_IActionEventListener& listener); + + void AdjustItemBounds(Tizen::Graphics::FloatRectangle& bounds); + + virtual result OnBoundsChanging(const Tizen::Graphics::FloatRectangle& bounds); + + virtual void OnFontChanged(Tizen::Graphics::Font* pFont); + +private: + _ListViewContextItem(const _ListViewContextItem& rhs); + + _ListViewContextItem& operator =(const _ListViewContextItem& rhs); + + _ListViewContextItemElement* GetElement(int elementId) const; + + void AdjustElementLayout(Tizen::Graphics::FloatRectangle bounds); + + _ButtonStatus GetButtonDrawingStatus(ListViewContextItemElementDrawingStatus status) const; + +private: + _LinkedList <_ListViewContextItemElement> __elements; + + float __itemWidth; + float __elementYPosition; + float __margin; + float __elementSpacing; + float __elementHeight; +}; // _ListContextItem + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_LIST_VIEW_CONTEXT_ITEM_H_ diff --git a/src/ui/inc/FUiCtrl_ListViewImpl.h b/src/ui/inc/FUiCtrl_ListViewImpl.h new file mode 100644 index 0000000..15abe4b --- /dev/null +++ b/src/ui/inc/FUiCtrl_ListViewImpl.h @@ -0,0 +1,275 @@ +// +// 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_ListViewImpl.h + * @brief This file defines the _ListViewImpl class. + * @version 3.0 + * + * This file contains the declarations of _ListViewImpl class. + */ + +#ifndef _FUI_CTRL_INTERNAL_LIST_VIEW_IMPL_H_ +#define _FUI_CTRL_INTERNAL_LIST_VIEW_IMPL_H_ + +#include +#include "FUi_ControlImpl.h" +#include "FUiCtrl_IFastScrollListener.h" +#include "FUiCtrl_IScrollEventListener.h" +#include "FUiCtrl_IUiListViewItemEventListener.h" +#include "FUiCtrl_TableView.h" + +namespace Tizen { namespace Ui +{ +class _AccessibilityElement; +}} + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _FastScrollEvent; +class _Label; +class _ListItemEvent; +class _ListViewItem; +class _PublicLinkEvent; +class _ScrollEvent; + +class _ListViewImpl + : public _ControlImpl + , public _IScrollEventListener + , public _ITableViewItemEventListener + , public _IUiFastScrollListener + , public _IUiListViewItemEventListener + , virtual public Tizen::Base::Runtime::IEventListener +{ +public: + virtual ~_ListViewImpl(void); + + static _ListViewImpl* CreateListViewImplN(ListView* pControl, bool itemDivider, bool fastScroll); + + static _ListViewImpl* CreateListViewImplN(ListView* pControl, bool itemDivider, ListScrollStyle scrollStyle); + + virtual const char* GetPublicClassName(void) const; + + virtual const ListView& GetPublic(void) const; + + virtual ListView& GetPublic(void); + + virtual const _TableView& GetCore(void) const; + + virtual _TableView& GetCore(void); + + result SetItemProvider(IListViewItemProvider& provider); + + result SetItemProvider(IListViewItemProviderF& provider); + + void AddListViewItemEventListener(IListViewItemEventListener& listener); + + void RemoveListViewItemEventListener(IListViewItemEventListener& listener); + + void AddFastScrollListener(IFastScrollListener& listener); + + void RemoveFastScrollListener(IFastScrollListener& listener); + + void AddScrollEventListener(IScrollEventListener& listener); + + void AddScrollEventListener(IScrollEventListenerF& listener); + + void RemoveScrollEventListener(IScrollEventListener& listener); + + void RemoveScrollEventListener(IScrollEventListenerF& listener); + + void AddUiLinkEventListener(const Tizen::Ui::IUiLinkEventListener& listener); + + void RemoveUiLinkEventListener(const Tizen::Ui::IUiLinkEventListener& listener); + + result SetSweepEnabled(bool enable); + + result SetFastScrollIndex(const Tizen::Base::String& text, bool useSearchIcon); + + int GetTopDrawnItemIndex(void) const; + + int GetBottomDrawnItemIndex(void) const; + + result ScrollToItem(int index, ListScrollItemAlignment itemAlignment); + + result SetItemChecked(int index, bool check); + + bool IsItemChecked(int index) const; + + result SetItemEnabled(int index, bool enable); + + bool IsItemEnabled(int index) const; + + int GetItemCount(void) const; + + result ShowItemDescriptionText(int index); + + result HideItemDescriptionText(int index); + + result RefreshList(int index, ListRefreshType type); + + result RefreshList(int index, int elementId); + + result UpdateList(bool isRestoreAnnexFocusValue = false); + + int GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& position) const; + + result GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& position, int& itemIndex, int& elementId) const; + + result SetItemDividerColor(const Tizen::Graphics::Color& color); + + Tizen::Graphics::Color GetItemDividerColor(void) const; + + result SetBitmapOfEmptyList(const Tizen::Graphics::Bitmap* pBitmap); + + result SetTextOfEmptyList(const Tizen::Base::String& text); + + Tizen::Base::String GetTextOfEmptyList(void) const; + + result SetTextColorOfEmptyList(const Tizen::Graphics::Color& color); + + Tizen::Graphics::Color GetTextColorOfEmptyList(void) const; + + result SetListBackgroundColor(const Tizen::Graphics::Color& color); + + result SetBackgroundBitmap(const Tizen::Graphics::Bitmap* pBitmap); + + result BeginReorderingMode(void); + + result EndReorderingMode(void); + + bool IsInReorderingMode(void) const; + + void SetScrollInputMode(ScrollInputMode mode); + + ScrollInputMode GetScrollInputMode(void) const; + + result OpenContextItem(int itemIndex); + + result CloseContextItem(int itemIndex); + + bool IsContextItemOpened(int itemIndex) const; + + virtual void OnListViewContextItemStateChanged(Tizen::Ui::_Control& source, int groupIndex, int itemIndex, int elementId, + Tizen::Ui::Controls::ListContextItemStatus status); + + // _ITableViewItemEventListener + virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int itemIndex, + Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status); + + virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::_TableView& tableView, int itemIndex, + Tizen::Ui::Controls::_TableViewItem* pContextItem, bool activated); + + virtual void OnTableViewItemReordered(Tizen::Ui::Controls::_TableView& tableView, int itemIndexFrom, int itemIndexTo); + + virtual void OnGroupedTableViewGroupItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, + Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status) {}; + + virtual void OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, int itemIndex, + Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status) {}; + + virtual void OnGroupedTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, + int itemIndex, Tizen::Ui::Controls::_TableViewItem* pContextItem, bool activated) {}; + + virtual void OnGroupedTableViewItemReordered(Tizen::Ui::Controls::_TableView& tableView, int groupIndexFrom, int itemIndexFrom, + int groupIndexTo, int itemIndexTo) {}; + + virtual void OnSectionTableViewItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int sectionIndex, int itemIndex, + Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status) {}; + + virtual void OnSectionTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::_TableView& tableView, int sectionIndex, + int itemIndex, Tizen::Ui::Controls::_TableViewItem* pContextItem, bool activated) {}; + + virtual void OnTableViewItemSwept(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, int itemIndex, + Tizen::Ui::Controls::TableViewSweepDirection direction); + + // Event handler for _IScrollEventListener + virtual void OnScrollEndReached(Tizen::Ui::_Control& source, ScrollEndEvent type); + + virtual void OnScrollPositionChanged(Tizen::Ui::_Control& source, float scrollPosition); + + virtual void OnScrollStopped(Tizen::Ui::_Control& source); + + // Event handler for _IUiFastScrollListener + virtual void OnUiFastScrollIndexSelected(Tizen::Ui::_Control& source, Tizen::Ui::Controls::_FastScrollIndex& index); + + virtual void OnDraw(void); + + virtual void OnChangeLayout(_ControlOrientation orientation); + + virtual void OnBoundsChanged(void); + + virtual void OnFontChanged(Tizen::Graphics::Font* pFont); + + virtual void OnFontInfoRequested(unsigned long& style, int& size); + + virtual void OnFontInfoRequested(unsigned long& style, float& size); + +public: + static _ListViewImpl* GetInstance(ListView& listView); + + static const _ListViewImpl* GetInstance(const ListView& listView); + +private: + _ListViewImpl(ListView* pList, _TableView* pCore); + + _ListViewImpl(_ListViewImpl& rhs); + + _ListViewImpl& operator =(_ListViewImpl& rhs); + + result SetItemDescriptionTextShowState(int index, bool show); + + void AdjustLayoutOfEmptyList(void); + + void CheckEmptyListShowState(void); + + Tizen::Graphics::FloatPoint GetCurrentTouchPosition(void); + + void SetItemNeedsLazyDeletion(_ListViewItem* pItem); + + virtual result OnTouchEventListenerAdded(void); + + virtual result OnTouchEventListenerRemoved(void); + + void FireListViewItemLongPressedEvent(void); + +private: + _ListItemEvent* __pListItemEvent; + _PublicLinkEvent* __pLinkEvent; + _ScrollEvent* __pScrollEvent; + _FastScrollEvent* __pFastScrollEvent; + + _Label* __pEmptyBitmap; + _Label* __pEmptyText; + Tizen::Graphics::Color __emptyTextColor; + Tizen::Ui::_AccessibilityElement* __pAccessibilityElement; + + bool __redrawListView; + bool __isOrientationChanged; + bool __isUpdateListCalled; + bool __needReloadItems; + + class _ListViewPropagatedTouchEventListener; + _ListViewPropagatedTouchEventListener* __pPropagatedTouchEventListener; + + friend class _ListViewPropagatedTouchEventListener; +}; // _ListViewImpl + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_LIST_VIEW_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_ListViewItem.h b/src/ui/inc/FUiCtrl_ListViewItem.h new file mode 100644 index 0000000..386d152 --- /dev/null +++ b/src/ui/inc/FUiCtrl_ListViewItem.h @@ -0,0 +1,350 @@ +// +// 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_ListViewItem.h + * @brief This is the header file for the _ListViewItem class. + * + * This header file contains the declarations of the _ListViewItem class. + */ + +#ifndef _FUI_CTRL_INTERNAL_LIST_VIEW_ITEM_H_ +#define _FUI_CTRL_INTERNAL_LIST_VIEW_ITEM_H_ + +#include +#include +#include "FUiCtrl_IActionEventListener.h" +#include "FUiCtrl_ICustomElement.h" +#include "FUiCtrl_LinkedList.h" +#include "FUiCtrl_TableViewItem.h" + +namespace Tizen { namespace Ui +{ +class _AccessibilityElement; +}} + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _Label; +class _ListViewContextItem; + +enum ListViewItemElementType +{ + LISTVIEW_ITEM_ELEMENT_TEXT = 0, + LISTVIEW_ITEM_ELEMENT_BITMAP, + LISTVIEW_ITEM_ELEMENT_OBJ, + LISTVIEW_ITEM_ELEMENT_INVALID +}; + +enum ListViewItemSelectionType +{ + LISTVIEW_ITEM_SELECTED = 0, + LISTVIEW_ITEM_ELEMENT_SELECTED, + LISTVIEW_ITEM_UILINK_SELECTED +}; + +struct _ListViewItemUiLinkInfo +{ + Tizen::Base::String textInfo; + Tizen::Base::Utility::LinkType linkType; + Tizen::Base::String linkInfo; +}; + +struct _ListViewItemStateChangedInfo +{ + ListViewItemSelectionType selectionType; + int elementId; + _ListViewItemUiLinkInfo* pUiLinkInfo; +}; + +struct _ListViewItemElementText +{ + Tizen::Ui::Animations::_VisualElement* pVE; + Tizen::Graphics::_Text::TextObject* pTextObject; + Tizen::Graphics::_EnrichedTextImpl* pEnrichedText; + Tizen::Graphics::Color textColor[LISTVIEW_ITEM_STATUS_MAX]; + float textSize; + bool cutlinkViewModeEnabled; + bool cutlinkParseEnabled; + unsigned long cutlinkMaskType; + bool textSlidingEnabled; +}; + +struct _ListViewItemElementBitmap +{ + Tizen::Ui::Animations::_VisualElement* pVE; + Tizen::Graphics::Bitmap* pBitmap[LISTVIEW_ITEM_STATUS_MAX]; +}; + +struct _ListViewItemElementCustom +{ + Tizen::Ui::Animations::_VisualElement* pVE; + _ICustomElement* pCustom; +}; + +struct _ListViewItemElement +{ + int elementId; + bool actionElement; + bool selectionEnabled; + ListViewItemElementType elementType; + _ListViewItemElementText* pTextElement; + _ListViewItemElementBitmap* pBitmapElement; + _ListViewItemElementCustom* pCustomElement; + Tizen::Graphics::FloatRectangle bounds; +}; + +struct _ListViewItemStatus +{ + TableViewItemPressedControl pressedControl; + TableViewAnnexStyle annexStyle; + bool itemSelected; + bool touchEnabled; + bool elementSelectionEnabled; + int selectedElementId; + Tizen::Graphics::FloatPoint currentTouchPosition; + _ListViewItemStateChangedInfo stateChangedInfo; +}; + +class _ListViewItemHitTestVEDelegator + : public Tizen::Ui::Animations::VisualElementContentProvider +{ +public: + _ListViewItemHitTestVEDelegator(void); + + virtual ~_ListViewItemHitTestVEDelegator(void); + + virtual Tizen::Ui::Animations::HitTestResult HitTest(Tizen::Ui::Animations::VisualElement& target, const Tizen::Graphics::FloatPoint& point); +}; // _ListViewItemHitTestVEDelegator + +class _ListViewItem + : public Tizen::Ui::Controls::_TableViewItem +{ +public: + _ListViewItem(float itemHeight); + + virtual ~_ListViewItem(void); + + static _ListViewItem* CreateListViewItemN(float itemHeight); + + void SetListViewItemType(ListViewItemType type); + + result AddElement(Tizen::Graphics::FloatRectangle& rect, int elementId, const Tizen::Base::String& text, bool textSliding = false); + + result AddElement(Tizen::Graphics::FloatRectangle& rect, int elementId, const Tizen::Graphics::EnrichedText* pEnrichedText); + + result AddElement(Tizen::Graphics::FloatRectangle& rect, int elementId, const Tizen::Graphics::Bitmap* pNormalBitmap, + const Tizen::Graphics::Bitmap* pPressedBitmap = null, const Tizen::Graphics::Bitmap* pHighlightedBitmap = null); + + result AddElement(Tizen::Graphics::FloatRectangle& rect, int elementId, const _ICustomElement* pCustom); + + bool DeleteElement(int elementId); + + void DeleteAllElement(void); + + bool HasElement(int elementId); + + bool RefreshElement(int elementId); + + void SetLastStateChangedInfo(void); + + bool GetLastStateChangedInfo(_ListViewItemStateChangedInfo& changedInfo) const; + + void ClearLastStateChangedInfo(void); + + void SetCurrentStatus(_ListViewItemStatus& currentStatus); + + void GetCurrentStatus(_ListViewItemStatus& currentStatus); + + bool IsItemSelected(void); + + int GetElementIdFromPosition(const Tizen::Graphics::FloatPoint& position) const; + + int GetElementIdFromCurrentTouchPosition(void) const; + + ListViewItemElementType GetElementType(int elementId) const; + + bool SetElementSelectionEnabled(int elementId, bool enable); + + bool GetElementSelectionEnabled(int elementId, bool& enable); + + bool SetTextCutlinkMask(int elementId, unsigned long mask); + + bool SetTextCutlinkViewMode(int elementId, bool cutlinkViewMode, bool cutlinkParseEnable = true); + + bool SetTextAlignment(int elementId, Tizen::Graphics::_Text::TextObjectAlignment textAlignment); + + bool GetTextAlignment(int elementId, Tizen::Graphics::_Text::TextObjectAlignment& textAlignment) const; + + bool SetTextWrapType(int elementId, Tizen::Graphics::_Text::TextObjectWrapType wrapType); + + bool SetTextSize(int elementId, float textSize); + + bool SetTextColor(int elementId, Tizen::Graphics::Color textColor, ListViewItemDrawingStatus status = LISTVIEW_ITEM_STATUS_NORMAL); + + bool GetTextColor(int elementId, Tizen::Graphics::Color& textColor, ListViewItemDrawingStatus status = LISTVIEW_ITEM_STATUS_NORMAL) const; + + bool SetDescriptionText(const Tizen::Base::String& text); + + void SetDescriptionTextColor(const Tizen::Graphics::Color& color); + + void SetDescriptionTextShowState(bool show); + + void SetContextItemEventListener(Tizen::Ui::Controls::_IActionEventListener& listener); + + void SetContextItemActivationState(bool activate); + + // Window event handler + virtual void OnDraw(void); + + virtual result OnBoundsChanging(const Tizen::Graphics::FloatRectangle& bounds); + + virtual void OnBoundsChanged(void); + + virtual void OnFontChanged(Tizen::Graphics::Font* pFont); + + virtual void OnFontInfoRequested(unsigned long& style, int& size); + + virtual void OnFontInfoRequested(unsigned long& style, float& size); + + virtual result OnAttachedToMainTree(void); + + virtual result OnDetachingFromMainTree(void); + + // Touch event handler + 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); + + // Timer Callback API + void OnTimerExpired(Tizen::Base::Runtime::Timer& timer); + + //TextSlide + virtual void ResetTextSlide(void); + +private: + _ListViewItem(const _ListViewItem& rhs); + + _ListViewItem& operator =(const _ListViewItem& rhs); + + void DeleteElement(_ListViewItemElement* pElement); + + _ListViewItemElement* GetElement(int elementId) const; + + Tizen::Graphics::_Text::TextObject* GetTextObjectInElement(int elementId) const; + + _ListViewItemElementText* GetElementText(int elementId) const; + + _ListViewItemElementBitmap* GetElementBitmap(int elementId) const; + + void SetItemDrawingStatus(ListViewItemDrawingStatus status); + + ListViewItemDrawingStatus GetItemDrawingStatus(void); + + void DrawElement(_ListViewItemElement* pElement); + + void DrawElements(void); + + bool DrawText(Tizen::Graphics::FloatRectangle& rect, ListViewItemDrawingStatus status, _ListViewItemElementText* pText); + + bool DrawBitmap(Tizen::Graphics::FloatRectangle& rect, ListViewItemDrawingStatus status, _ListViewItemElementBitmap* pBitmap); + + void DrawDivider(void); + + float GetDescriptionTextHeight(void); + + Tizen::Graphics::Font* GetFont(unsigned long fontStyle, float fontSize); + + // TextSlide + void StartTextSlideTimer(void); + + void StopTextSlideTimer(void); + + bool IsTextSlideTimerRunning(void); + + void OnTextSlideTimerExpired(void); + + // UiLink + bool ParseCutlinkText(_ListViewItemElementText* pText); + + bool IsCutlinkTextSelected(const Tizen::Graphics::FloatPoint& position, int* index, _ListViewItemUiLinkInfo** ppInfo) const; + + bool SetCutlinkTextFocus(const Tizen::Graphics::FloatPoint& position); + + 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; + + _LinkedList <_ListViewItemElement> __elements; + + ListViewItemType __itemType; + + bool __needAlignContextItem; + + bool __touchPressed; + + bool __touchEnabled; + + int __selectedElementId; + + bool __descriptionTextShowState; + + Tizen::Graphics::Color __descriptionTextColor; + + _Label* __pDescriptionText; + + _Label* __pDivider; + + bool __selectionEabled; + + unsigned long __fontStyle; + + float __fontSize; + + Tizen::Base::String __fontName; + + Tizen::Graphics::FloatPoint __prevTouchPos; // for UiLink + + Tizen::Base::Runtime::Timer* __pTextSlideTimer; + + _ListViewItemStateChangedInfo ___stateChangedInfo; // for event fire in _ListViewImpl + + _ListViewItemHitTestVEDelegator __hitTestVEDelegator; + + _IActionEventListener* __pContextItemEventListener; + + Tizen::Ui::_AccessibilityElement* __pAccessibilityElement; + + bool __isContextItemListenerActivated; +}; // _ListViewItem + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_LIST_VIEW_ITEM_H_ diff --git a/src/ui/inc/FUiCtrl_ListViewItemProviderAdaptor.h b/src/ui/inc/FUiCtrl_ListViewItemProviderAdaptor.h new file mode 100644 index 0000000..2ed5ef4 --- /dev/null +++ b/src/ui/inc/FUiCtrl_ListViewItemProviderAdaptor.h @@ -0,0 +1,112 @@ +// +// 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_ListViewItemProviderAdaptor.h + * @brief This is the header file for the __ListViewItemProviderAdaptor class. + * + * This header file contains the declarations of the __ListViewItemProviderAdaptor class. + */ + +#ifndef _FUI_CTRL_INTERNAL_LIST_VIEW_ITEM_PROVIDER_ADAPTOR_H_ +#define _FUI_CTRL_INTERNAL_LIST_VIEW_ITEM_PROVIDER_ADAPTOR_H_ + +#include +#include +#include +#include "FUiCtrl_IUiListViewItemEventListener.h" +#include "FUiCtrl_LinkedList.h" +#include "FUiCtrl_TableViewItemProviderAdaptor.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _IListItemCommon; +class _ListViewItem; + +class _ListViewItemProviderAdaptor + : public _TableViewItemProviderAdaptor +{ +public: +// Lifecycle + _ListViewItemProviderAdaptor(const IListViewItemProvider& provider); + _ListViewItemProviderAdaptor(const IListViewItemProviderF& provider); + + virtual ~_ListViewItemProviderAdaptor(void); + +// Operation + void SetItemProvider(const IListViewItemProvider& provider); + void SetItemProvider(const IListViewItemProviderF& provider); + + IListViewItemProvider* GetItemProvider(void) const; + IListViewItemProviderF* GetItemProviderF(void) const; + + virtual _IListItemCommon* LoadItem(int groupIndex, int itemIndex); + + virtual result UnloadItem(_IListItemCommon* pListItem, int groupIndex, int itemIndex); + + virtual result DeleteItem(_IListItemCommon* pListItem, int groupIndex, int itemIndex); + + virtual bool UpdateItem(_IListItemCommon* pItem, int groupIndex, int itemIndex); + + virtual int GetItemCount(int groupIndex = 0) const; + + virtual int GetGroupCount(void) const; + + virtual float GetDefaultItemHeight(void); + + virtual float GetDefaultGroupItemHeight(void); + + bool SetDescriptionTextShowState(int itemIndex, bool show); + + bool IsDescriptionTextShown(int itemIndex) const; + + void SetListViewItemEventListener(Tizen::Ui::Controls::_IUiListViewItemEventListener& listener); + + void SetItemFont(const Tizen::Base::String& fontName); + + void SetItemNeedsLazyDeletion(_ListViewItem* pItem); + +private: + _ListViewItemProviderAdaptor(const _ListViewItemProviderAdaptor& rhs); + + _ListViewItemProviderAdaptor& operator =(const _ListViewItemProviderAdaptor& rhs); + + void SetItemLazyDeletion(_ListViewItem* pItem); + + _IListItemCommon* GetDefaultItem(void); + +// Variable +private: + IListViewItemProvider* __pListViewProvider; + IListViewItemProviderF* __pListViewProviderF; + _LinkedList __descriptionTextShowItem; + _IUiListViewItemEventListener* __pEventListener; + Tizen::Base::String __fontName; + float __itemAverageHeight; + int __itemLoadedCount; + int __countOfAllItems; + _ListViewItem* __pItemNeedsLazyDeletion; + _ListViewItem* __pLazyDeletionItem; + bool __usingFloatingPoint; + _IListItemCommon* __pDefaultItem; +}; // _ListViewItemProviderAdaptor + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_LIST_VIEW_ITEM_PROVIDER_ADAPTOR_H_ + diff --git a/src/ui/inc/FUiCtrl_ListViewModel.h b/src/ui/inc/FUiCtrl_ListViewModel.h new file mode 100644 index 0000000..d2adf78 --- /dev/null +++ b/src/ui/inc/FUiCtrl_ListViewModel.h @@ -0,0 +1,203 @@ +// +// 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_ListViewModel.h + * @brief This is the header file for the _ListViewModel class. + * + * This header file contains the declarations of the _ListViewModel class. + */ + +#ifndef _FUI_CTRL_INTERNAL_LIST_VIEW_MODEL_H_ +#define _FUI_CTRL_INTERNAL_LIST_VIEW_MODEL_H_ + +#include "FUiCtrl_LinkedList.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _IListItemProviderAdaptor; +class _IListItemCommon; + +struct _ListViewGroupNode +{ + +public: + _ListViewGroupNode(void) + { + __itemCountInGroup = 0; + __radioCheckedItemIndex = -1; + __usingRadioStyle = false; + __itemExpanded = true; + } + +private: + friend class _ListViewModel; + + _LinkedList <_IListItemCommon*> __items; + _LinkedList __checkedItems; + _LinkedList __disabledItems; + int __itemCountInGroup; // except groupItem + int __radioCheckedItemIndex; + bool __usingRadioStyle; + bool __itemExpanded; +}; // _ListViewGroupNode + +class _IListViewModelDelegate +{ +public: + virtual ~_IListViewModelDelegate(){} + + virtual bool OnOcurredOverflowItems(const int currentCashSize, const int overflowCount) = 0; +}; + +class _ListViewModel +{ +public: + _ListViewModel(void); + + virtual ~_ListViewModel(void); + + // Set/Get ItemProviderAdaptor + _IListItemProviderAdaptor* GetItemProviderAdaptor(void) const; + + result RegisterItemProviderAdaptor(const _IListItemProviderAdaptor* pProviderAdaptor); + + void SetListViewModelDelegate(_IListViewModelDelegate* pDelegate); + + //item handling ( Add / Insert / Delete / Get ) + _IListItemCommon* LoadItem(int groupIndex, int itemIndex); + + _IListItemCommon* GetItemFromTemporaryBuffer(int groupIndex, int itemIndex); + + bool IsValidItem(int groupIndex, int itemIndex) const; + + bool IsLoadedItem(int groupIndex, int itemIndex) const; + + result AddGroup(int itemCount = 0, bool usingRadioStyle = false); + + result InsertGroup(int groupIndex, int itemCount = 0, bool usingRadioStyle = false); + + result RemoveGroup(int groupIndex); + + result AddItemToGroup(_IListItemCommon* pItem, int groupIndex); + + result InsertItemToGroup(_IListItemCommon* pItem, int groupIndex, int itemIndex); + + result SetItem(_IListItemCommon& item, int groupIndex, int itemIndex); + + result MoveItem(int originGroupIndex, int originItemIndex, int destinationGroupIndex, int destinationItemIndex); + + result RemoveItemAt(int groupIndex, int itemIndex, bool internalDestroy = false); + + result RemoveAllItem(bool internalDestroy = false, bool backupItemStatus = false); + + void RestoreItemStatus(void); + + result DeleteAllGroupAndItem(void); + + result SetMaxCachingSize(int cachingSize); + + int GetMaxCachingSize(void) const; + + result UnloadItem(int groupIndex, int itemIndex); + + // Focused item & element + bool IsFocusedItem(int groupIndex, int itemIndex) const; + + void GetFocusedItem(int& groupIndex, int& itemIndex) const; + + void SetFocusedItem(int groupIndex, int itemIndex); + + bool IsItemEnabled(int groupIndex, int itemIndex) const; + + result SetItemEnabled(int groupIndex, int itemIndex, bool enable); + + result SetItemChecked(int groupIndex, int itemIndex, bool check); + + bool IsItemChecked(int groupIndex, int itemIndex) const; + + int GetIndexOfRadioCheckedItem(int groupIndex) const; + + //item handling - Group and item + int GetAllItemCount(void) const; + + int GetAllGroupCount(void) const; + + int GetItemCountInGroup(int groupIndex) const; + + // for group Expand/Collapse + result SetGroupExpandState(int groupIndex, bool state); + + bool IsGroupExpanded(int groupIndex) const; + + void SetAllLoadedItemStateChanged(bool state); + + void GetFirstLoadedItemIndex(int& groupIndex, int& itemIndex) const; + + void GetLastLoadedItemIndex(int& groupIndex, int& itemIndex) const; + +private: + void MoveCheckedAndDisabledItemIndex(_ListViewGroupNode* pListGroupNode, int originItemIndex, int destinationItemIndex, bool checked = false, bool enabled = true); + + result LoadItemToContainer(int groupIndex, int itemIndex, _IListItemCommon& item); + + result UnloadAllItem(void); + + // item handling - item states + int GetOverflowCount(void) const; + + result RemoveOverflowItems(bool deleteFromEnd, int removeCount); + + _ListViewGroupNode* GetGroupNode(int groupIndex) const; + + _IListItemCommon* GetItemFromContainer(int groupIndex, int itemIndex) const; + +private: + _ListViewModel(const _ListViewModel& rhs); + + _ListViewModel& operator =(const _ListViewModel& rhs); + +private: + static const int CACHE_SIZE = 30; + + // member variables for view + _LinkedList <_ListViewGroupNode*> __groupNodes; + _LinkedList <_ListViewGroupNode*> __backupGroupNodes; + _IListItemProviderAdaptor* __pListProviderAdaptor; + _IListItemCommon* __pTemporaryItemBuffer; + int __countOfAllGroups; + int __countOfAllItems; + + // member variables for items + int __indexOfFocusedGroup; + int __indexOfFocusedItem; + + // member variables for model + int __sizeOfCachingItems; + bool __overflowItemsRemovingEnabled; + + bool __onRemovingAllItems; + + _IListViewModelDelegate *__pListViewModelDelegate; + +}; // _ListViewModel + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_LIST_VIEW_MODEL_H_ + diff --git a/src/ui/inc/FUiCtrl_ListViewTypes.h b/src/ui/inc/FUiCtrl_ListViewTypes.h new file mode 100644 index 0000000..bfb1beb --- /dev/null +++ b/src/ui/inc/FUiCtrl_ListViewTypes.h @@ -0,0 +1,54 @@ +// +// 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_ListViewTypes.h + * @brief This is the header file for the _ListView enumerations. + * + * This header file contains the declarations of the _ListView enumerations. + */ + +#ifndef _FUI_CTRL_INTERNAL_LIST_VIEW_TYPES_H_ +#define _FUI_CTRL_INTERNAL_LIST_VIEW_TYPES_H_ + +#define LIST_ITEM_RESERVED_ID_1 -1 +#define LIST_ITEM_RESERVED_ID_2 10002 +#define LIST_ITEM_RESERVED_ID_3 10003 + +enum ListViewItemType +{ + LISTVIEW_ITEM_TYPE_SIMPLE = 0, + LISTVIEW_ITEM_TYPE_CUSTOM, + LISTVIEW_ITEM_TYPE_GROUP +}; + +enum ListViewItemDrawingStatus +{ + LISTVIEW_ITEM_STATUS_NORMAL = 0, + LISTVIEW_ITEM_STATUS_PRESSED, + LISTVIEW_ITEM_STATUS_HIGHLIGHTED, + LISTVIEW_ITEM_STATUS_MAX +}; + +enum ListViewContextItemElementDrawingStatus +{ + LISTVIEW_CONTEXTITEM_ELEMENT_STATUS_NORMAL = 0, + LISTVIEW_CONTEXTITEM_ELEMENT_STATUS_PRESSED, + LISTVIEW_CONTEXTITEM_ELEMENT_STATUS_HIGHLIGHTED +}; + +#endif //_FUI_CTRL_INTERNAL_LIST_VIEW_TYPES_H_ diff --git a/src/ui/inc/FUiCtrl_MessageBox.h b/src/ui/inc/FUiCtrl_MessageBox.h new file mode 100644 index 0000000..76014e8 --- /dev/null +++ b/src/ui/inc/FUiCtrl_MessageBox.h @@ -0,0 +1,148 @@ +// +// 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_MessageBox.h + * @brief This is the header file for the _MessageBox class. + * + * This header file contains the declarations of the %_MessageBox class. + */ + +#ifndef _FUI_CTRL_INTERNAL_MESSAGEBOX_H_ +#define _FUI_CTRL_INTERNAL_MESSAGEBOX_H_ + +#include +#include +#include "FUiCtrl_Popup.h" +#include "FUi_IAccessibilityListener.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _MessageBoxPresenter; + +/** + * @class _MessageBox + * @brief + * @since 2.0 + * + * + * + * + */ +class _OSP_EXPORT_ _MessageBox + : public _Popup + , virtual public Tizen::Base::Runtime::IEventListener + , virtual public _IUiEventListener + , virtual public _IUiEventPreviewer + , virtual public Tizen::System::ISettingEventListener + , public _IAccessibilityListener +{ +// Lifecycle +public: + virtual ~_MessageBox(void); + +// Operations +public: + static _MessageBox* CreateMessageBoxN(void); + result Initialize(const Tizen::Base::String& title, const Tizen::Base::String& text, MessageBoxStyle style, unsigned long timeout); + + virtual result ShowAndWait(int& modalResult); + + float GetTotalHeight(void) const; + + virtual void OnDraw(void); + + virtual void OnFontChanged(Tizen::Graphics::Font* pFont); + virtual void OnFontInfoRequested(unsigned long& style, float& size); + + virtual void OnActivated(void); + virtual void OnDeactivated(void); + + virtual void OnChangeLayout(_ControlOrientation orientation); + + virtual void OnBoundsChanged(void); + virtual void OnSettingChanged(Tizen::Base::String& key); + + virtual bool OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityFocusMovedPrevious(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityReadingElement(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityFocusOut(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityValueIncreased(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityValueDecreased(const _AccessibilityContainer& control, const _AccessibilityElement& element); + + bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo){return false;} + bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo); + + Tizen::Graphics::Bitmap* GetButtonBackgroundBitmap(void); + Tizen::Graphics::Bitmap* GetButtonBackgroundEffectBitmap(void); + Tizen::Graphics::Bitmap* GetTitleBackgroundBitmap(void); + Tizen::Graphics::Bitmap* GetTitleBackgroundEffectBitmap(void); +// Accessors +public: + MessageBoxStyle GetMsgBoxStyle(void) const; + + unsigned long GetTimeout(void) const; + + Tizen::Base::String GetText(void) const; + + void SetTextColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetTextColor(void) const; + +protected: + result SetPresenter(const _MessageBoxPresenter& msgboxPresenter); + virtual _PopupPresenter* GetPresenter(void); + + // Touch Event Listener + 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 void InitializeAccessibilityElement(void); + +private: + _MessageBox(void); + + _MessageBox(const _MessageBox& rhs); + _MessageBox& operator =(const _MessageBox& rhs); + +// Attributes +private: + _MessageBoxPresenter* __pMsgboxPresenter; + + MessageBoxStyle __msgboxStyle; + + Tizen::Graphics::Color __textColor; + + + Tizen::Graphics::Bitmap* __pButtonEffectBitmap; + Tizen::Graphics::Bitmap* __pTitleEffectBitmap; + Tizen::Graphics::Bitmap* __pComposedButtonBitmap; + Tizen::Graphics::Bitmap* __pComposedTitleBitmap; + Tizen::Base::String __text; + + unsigned long __timeout; + +}; // _MessageBox + + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_MESSAGEBOX_H_ + diff --git a/src/ui/inc/FUiCtrl_MessageBoxImpl.h b/src/ui/inc/FUiCtrl_MessageBoxImpl.h new file mode 100644 index 0000000..3873245 --- /dev/null +++ b/src/ui/inc/FUiCtrl_MessageBoxImpl.h @@ -0,0 +1,91 @@ +// +// 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_MessageBoxImpl.h + * @brief This is the header file for the _MessageBoxImpl class. + * + * This header file contains the declarations of the %_MessageBoxImpl class. + */ + +#ifndef _FUI_CTRL_MESSAGEBOX_IMPL_H_ +#define _FUI_CTRL_MESSAGEBOX_IMPL_H_ + + +// Includes +#include +#include "FUi_WindowImpl.h" +#include "FUiCtrl_MessageBox.h" + + +namespace Tizen { namespace Ui { namespace Controls +{ + + +class _MessageBoxImpl + : public _WindowImpl +{ +public: + _MessageBoxImpl(MessageBox* pPublic, _MessageBox* pCore); + virtual ~_MessageBoxImpl(void); + + virtual const char* GetPublicClassName(void) const; + virtual const MessageBox& GetPublic(void) const; + virtual MessageBox& GetPublic(void); + virtual const _MessageBox& GetCore(void) const; + virtual _MessageBox& GetCore(void); + +public: + static _MessageBoxImpl* CreateMessageBoxImplN(MessageBox* pControl); + result Initialize(const Tizen::Base::String& title, const Tizen::Base::String& text, MessageBoxStyle style, unsigned long timeout); + + virtual result ShowAndWait(int& modalResult); + + Tizen::Graphics::FloatRectangle GetCenterAlignRect(float width, float height) const; + + virtual void OnChangeLayout(Tizen::Ui::_ControlOrientation orientation); + +public: + void SetColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetColor(void) const; + + void SetTitleTextColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetTitleTextColor(void) const; + + void SetTextColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetTextColor(void) const; + + MessageBoxStyle GetMessageBoxStyle(void) const; + Tizen::Base::String GetTitleText(void) const; + Tizen::Base::String GetText(void) const; + unsigned long GetTimeout(void) const; + int GetMaxTextLength(void) const; + +public: + static _MessageBoxImpl* GetInstance(MessageBox& pMessageBox); + static const _MessageBoxImpl* GetInstance(const MessageBox& pMessageBox); + +private: + _MessageBoxImpl(const _MessageBoxImpl& rhs); + _MessageBoxImpl& operator =(const _MessageBoxImpl& rhs); + +}; // _MessageBoxImpl + + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_MESSAGEBOX_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_MessageBoxPresenter.h b/src/ui/inc/FUiCtrl_MessageBoxPresenter.h new file mode 100644 index 0000000..fa10d8c --- /dev/null +++ b/src/ui/inc/FUiCtrl_MessageBoxPresenter.h @@ -0,0 +1,208 @@ +// +// 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_MessageBoxPresenter.h + * @brief This is the header file for the _MessageBoxPresenter class. + * + * This header file contains the declarations of the %_MessageBoxPresenter class. + */ + +#ifndef _FUI_CTRL_INTERNAL_MESSAGEBOX_PRESENTER_H_ +#define _FUI_CTRL_INTERNAL_MESSAGEBOX_PRESENTER_H_ + + +#include +#include "FUi_UiTouchEvent.h" +#include "FUiCtrl_PopupPresenter.h" + +namespace Tizen { namespace Graphics { namespace _Text { + class TextObject; +}}} // Tizen::Graphics::_Text + +namespace Tizen { namespace Ui { namespace Controls +{ + +class Button; +class _MessageBox; +class _Label; +class _Scroll; +class _ScrollPanel; + +/** + * @class _MessageBoxPresenter + * @brief + * @since 2.0 + * + * + * + * + */ +class _MessageBoxPresenter + : public _PopupPresenter + , virtual public Tizen::Base::Runtime::IEventListener +{ +// Lifecycle +public: + _MessageBoxPresenter(void); + virtual ~_MessageBoxPresenter(void); + +// Operations +public: + result Initialize(_MessageBox& msgbox); + + virtual void Draw(void); + + virtual result ShowAndWait(int& modalResult); + + result OnChangeLayout(_ControlOrientation orientation); + + // get touch event from _MessageBox, for drawing scroll in TextObject + virtual bool OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo); + virtual bool OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo); + virtual bool OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo); + + bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo); + + void UpdateButtonString(void); + + void InitializeAccessibilityElement(void); + + bool OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element); +//Accessor +public: + float GetBodyTextHeight(void) const; + float GetBodyTextObjHeight(void) const; + + Tizen::Graphics::FloatRectangle GetTextBounds(void) const; + +protected: + virtual void ProcessEvent(void); + virtual _Popup* GetCore(void); +private: + _MessageBoxPresenter(const _MessageBoxPresenter& rhs); + _MessageBoxPresenter& operator =(const _MessageBoxPresenter& rhs); + + result CreateButtons(void); + void FindButtonAndResult(const _ControlHandle handle); + + float CalculateButtonAreaHeight(void); + Tizen::Graphics::FloatRectangle CalculateButtonPositionAndSize(int buttonIndex); + + void SetReturnValue(MessageBoxModalResult rtn); + int GetReturnValue(void) const; + + float GetLabelHeight(Tizen::Graphics::_Text::TextObject* textObject, wchar_t* text, int length, float fontSize, FloatRectangle bounds, bool isTitle); + float GetLeftRightLabelMargin(void); + + void GetButtonString(void); + +// Inner class +private: + class _MessageBoxButtonListener + : public ITouchEventListener + , public IKeyEventListener + , virtual public Tizen::Base::Runtime::IEventListener + { +public: + _MessageBoxButtonListener(void); + virtual ~_MessageBoxButtonListener(void); + + _ControlHandle GetClickedButtonHandle(void) const; + bool IsButtonClicked(void); + void SetBeginModal(bool beginModal); + bool GetBeginModal(void); + +protected: + 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 OnTouchReleased(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) {} + virtual void OnKeyPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode); + virtual void OnKeyReleased(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode); + virtual void OnKeyLongPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode) {} + +private: + _ControlHandle __buttonHandle; + + bool __buttonPressFlag; + bool __buttonReleaseState; + bool __beginModal; + + Tizen::Graphics::FloatPoint __point; + + }; // class _MessageBoxButtonListener + + +private: + enum + { + MSGBOX_BUTTON_CLICKED = 0xFF, + MSGBOX_BUTTON_CLOSE, + MSGBOX_BUTTON_CANCEL + }; + +// Attributes +private: + _MessageBox* __pMessageBox; + _MessageBoxButtonListener* __pButtonListener; + MessageBoxModalResult __msgboxResult; + + static const int MSGBOX_MAX_BUTTON_NUM = 3; + + Tizen::Ui::Controls::Button* __pButtons[MSGBOX_MAX_BUTTON_NUM]; + Tizen::Base::String __buttonText[MSGBOX_MAX_BUTTON_NUM]; + + Tizen::Graphics::_Text::TextObject* __pBodyTextObject; + + Tizen::Graphics::FloatRectangle __textBounds; + Tizen::Graphics::FloatRectangle __titleBgBounds; + Tizen::Graphics::FloatRectangle __buttonBgBounds; + + + Tizen::Ui::Controls::_Label* __pLabel; + Tizen::Ui::Controls::_Scroll* __pScroll; + Tizen::Ui::Controls::_ScrollPanel* __pScrollPanel; + + float __scrollPos; + int __buttonNum; + float __prevPositionY; + float __textObjHeight; + + bool __touchPressFlag; + bool __scrollStart; + bool __btnClickFlag; + bool __bodyClickFlag; + bool __touchOutBounds; + bool __beginModal; + +}; // _MessageBoxPresenter + + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_MESSAGEBOX_PRESENTER_H_ diff --git a/src/ui/inc/FUiCtrl_OptionMenu.h b/src/ui/inc/FUiCtrl_OptionMenu.h new file mode 100644 index 0000000..747ae76 --- /dev/null +++ b/src/ui/inc/FUiCtrl_OptionMenu.h @@ -0,0 +1,282 @@ +// +// 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_OptionMenu.h + * @brief This is the header file for the _OptionMenu class. + * + * This header file contains the declarations of the %_OptionMenu class. + */ +#ifndef _FUI_CTRL_INTERNAL_OPTION_MENU_H_ +#define _FUI_CTRL_INTERNAL_OPTION_MENU_H_ + +#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 { +class _AccessibilityElement; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ + +const int OPTION_MENU_ITEM_STATUS_COUNT = 3; + +enum OptionMenuCoreItemStatus +{ + OPTION_MENU_CORE_ITEM_STATUS_NORMAL = 0, /**< The normal state */ + OPTION_MENU_CORE_ITEM_STATUS_PRESSED, /**< The pressed state */ + OPTION_MENU_CORE_ITEM_STATUS_HIGHLIGHTED /**< The highlighted state */ +}; + +struct _OptionMenuItemInfo; + +/** + * @class _OptionMenu + * @brief + * @since 2.2 + * + * + * + * + */ +class _OptionMenuPresenter; +class _ContextMenu; +class _OptionMenuItem; + +class _OSP_EXPORT_ _OptionMenu + : public _Window + , public _IActionEventListener + , virtual public Tizen::Base::Runtime::IEventListener + , virtual public _IUiEventListener + , virtual public _IUiEventPreviewer + , public _IAccessibilityListener + , virtual public _IFrameEventListener + , public Tizen::Ui::Animations::IVisualElementAnimationStatusEventListener +{ + DECLARE_CLASS_BEGIN(_OptionMenu, _Control); + DECLARE_PROPERTY("color", GetPropertyColor, SetPropertyColor); + DECLARE_PROPERTY("normalItemColor", GetPropertyNormalItemColor, SetPropertyNormalItemColor); + DECLARE_PROPERTY("pressedItemColor", GetPropertyPressedItemColor, SetPropertyPressedItemColor); + DECLARE_PROPERTY("highlightedItemColor", GetPropertyHighlightedItemColor, SetPropertyHighlightedItemColor); + DECLARE_PROPERTY("normalItemTextColor", GetPropertyNormalItemTextColor, SetPropertyNormalItemTextColor); + DECLARE_PROPERTY("pressedItemTextColor", GetPropertyPressedItemTextColor, SetPropertyPressedItemTextColor); + DECLARE_PROPERTY("highlightedItemTextColor", GetPropertyHighlightedItemTextColor, SetPropertyHighlightedItemTextColor); + DECLARE_PROPERTY("maxVisibleItemsCount", GetPropertyMaxVisibleItemsCount, SetPropertyMaxVisibleItemsCount); + DECLARE_CLASS_END(); + + result SetPropertyMaxVisibleItemsCount(const Variant& count); + Variant GetPropertyMaxVisibleItemsCount(void) const; + + result SetPropertyColor(const Variant& color); + Variant GetPropertyColor(void) const; + + result SetPropertyNormalItemColor(const Variant& color); + Variant GetPropertyNormalItemColor(void) const; + + result SetPropertyPressedItemColor(const Variant& color); + Variant GetPropertyPressedItemColor(void) const; + + result SetPropertyHighlightedItemColor(const Variant & color); + Variant GetPropertyHighlightedItemColor(void) const; + + result SetPropertyNormalItemTextColor(const Variant& color); + Variant GetPropertyNormalItemTextColor(void) const; + + result SetPropertyPressedItemTextColor(const Variant& color); + Variant GetPropertyPressedItemTextColor(void) const; + + result SetPropertyHighlightedItemTextColor(const Variant & color); + Variant GetPropertyHighlightedItemTextColor(void) const; + +public: + _OptionMenu(void); + virtual ~_OptionMenu(void); + 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); + result InsertItemAt(int mainIndex, const Tizen::Base::String& text, int actionId, const Tizen::Graphics::Bitmap* pNormalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap); + result SetItemAt(int mainIndex, const Tizen::Base::String& text, int actionId, const Tizen::Graphics::Bitmap* pNormalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap); + int GetItemIndexFromActionId(int actionId) const; + result AddSubItem(int mainIndex, const Tizen::Base::String& text, int actionId); + result InsertSubItemAt(int mainIndex, int subIndex, const Tizen::Base::String& text, int actionId); + result SetSubItemAt(int mainIndex, int subIndex, const Tizen::Base::String& text, int actionId); + result RemoveSubItemAt(int mainIndex, int subIndex); + int GetSubItemCount(int mainIndex) const; + int GetSubItemIndexFromActionId(int actionId) const; + int GetSubItemActionIdAt(int mainIndex, int subIndex) const; + result ShowSubMenu(int mainIndex, _OptionMenuItem& item); + bool IsSubMenuShown(void) const; + result DestroySubMenu(void); + 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); + 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); + result RemoveItemAt(int index); + void RemoveAllItems(void); + int GetItemCount(void) const; + result SetShowItemCount(int count); + int GetMaximumVisibleItemsCount(void) const; + int GetItemIndexAt(int actionId) const; + int GetItemActionIdAt(int index) const; + result SetWindowRect(const Tizen::Graphics::FloatRectangle& rect); + Tizen::Graphics::FloatRectangle GetWindowRect(void) const; + result SetBodyRect(const Tizen::Graphics::FloatRectangle& rect); + Tizen::Graphics::FloatRectangle GetBodyRect(void) const; + result SetItemRect(const Tizen::Graphics::FloatRectangle& rect); + Tizen::Graphics::FloatRectangle GetItemRect(void) const; + result SetTextColor(enum OptionMenuCoreItemStatus status, const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetTextColor(enum OptionMenuCoreItemStatus status) const; + result SetColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetColor(void) const; + result SetMaxVisibleItemsCount(int maxItemsCount); + result SetItemColor(enum OptionMenuCoreItemStatus status, const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetItemColor(enum OptionMenuCoreItemStatus status) const; + result AddActionEventListener(const Tizen::Ui::Controls::_IActionEventListener& listener); + result RemoveActionEventListener(const Tizen::Ui::Controls::_IActionEventListener& listener); + result FireActionEvent(int actionId); + Tizen::Ui::Controls::_ActionEvent* GetActionEvent(void) const; + const Tizen::Graphics::Bitmap* GetBackgroundNormalBitmap(void) const; + const Tizen::Graphics::Bitmap* GetBackgroundEffectBitmap(void) const; + _ControlOrientation GetLayout(void) const; + _ControlRotation GetRotation(void) const; + + virtual result OnAttachedToMainTree(void); + virtual result OnDetachingFromMainTree(void); + virtual void OnFrameActivated(const Tizen::Ui::Controls::_Frame& source); + virtual void OnFrameDeactivated(const Tizen::Ui::Controls::_Frame& source); + virtual void OnFrameMinimized(const Tizen::Ui::Controls::_Frame& source); + virtual void OnFrameRestored(const Tizen::Ui::Controls::_Frame& source); + virtual void OnDraw(void); + + 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); + virtual bool OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo); + virtual bool OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo); + + virtual void OnActionPerformed(const Tizen::Ui::_Control& source, int actionId); + + virtual void OnFontChanged(Tizen::Graphics::Font* pFont); + virtual void OnFontInfoRequested(unsigned long& style, float& size); + + virtual void OnChangeLayout(_ControlRotation rotation); + virtual void OnOwnerChanged(_Control* pOldOwner); + void OnActivated(void); + void OnDeactivated(void); + + virtual bool OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityFocusMovedPrevious(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityReadingElement(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityFocusOut(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityValueIncreased(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityValueDecreased(const _AccessibilityContainer& control, const _AccessibilityElement& element); + + 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; + result SetTopDrawnItemIndex(int index); + + _ScrollPanel* GetScrollPanel(void); + + virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo); + virtual bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo); + virtual bool OnFocusGained(const _Control& source); + virtual bool OnFocusLost(const _Control& source); + virtual void OnDrawFocus(void); + virtual void ResetFocus(void); + +protected: + result SetPresenter(const _OptionMenuPresenter& OptionMenuPresenter); + +private: + result LoadBitmap(void); + result LoadColorReplacedBitmap(const Tizen::Graphics::Color& color); + void RemoveAllAccessibilityElement(void); + + _OptionMenu(const _OptionMenu& rhs); + _OptionMenu& operator =(const _OptionMenu& rhs); + +private: + _OptionMenuPresenter* __pOptionMenuPresenter; + int __showItemCount; + bool __isAttachedToMainTree; + 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 + Tizen::Graphics::FloatRectangle __bodyRect; // body area relative to window + Tizen::Graphics::FloatRectangle __itemRect; // item area relative to window + + // attribute for event + _ActionEvent* __pActionEvent; + + // attribute for drawing + Tizen::Graphics::Bitmap* __pBackgroundNormalBitmap; + Tizen::Graphics::Bitmap* __pBackgroundEffectBitmap; + enum _ControlOrientation __layout; + enum _ControlRotation __rotation; + + Tizen::Graphics::Color __backgroundColor; + Tizen::Graphics::Color __textColor[OPTION_MENU_ITEM_STATUS_COUNT]; + Tizen::Graphics::Color __itemColor[OPTION_MENU_ITEM_STATUS_COUNT]; + + Tizen::Base::Collection::ArrayListT __actionId; + Tizen::Base::Collection::LinkedListT<_AccessibilityElement*> __accessibilityElements; + + _ScrollPanel* __pScrollPanel; + _ContextMenu* __pSubMenu; + Tizen::Ui::Controls::_Frame* __pCurrentFrame; + int __subMenuIndex; + +}; // _OptionMenu + +}}} // Tizen::Ui: Control + +#endif //_FUI_CTRL_INTERNAL_OPTION_MENU_H_ diff --git a/src/ui/inc/FUiCtrl_OptionMenuImpl.h b/src/ui/inc/FUiCtrl_OptionMenuImpl.h new file mode 100644 index 0000000..1cce8a9 --- /dev/null +++ b/src/ui/inc/FUiCtrl_OptionMenuImpl.h @@ -0,0 +1,131 @@ +// +// 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_OptionMenuImpl.h + * @brief This is the header file for the _OptionMenuImpl class. + */ + +#ifndef _FUI_CTRL_INTERNAL_OPTION_MENU_IMPL_H_ +#define _FUI_CTRL_INTERNAL_OPTION_MENU_IMPL_H_ + +#include + +#include "FUiCtrl_OptionMenu.h" +#include "FUiCtrl_IActionEventListener.h" +#include "FUi_WindowImpl.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _PublicActionEvent; + +class _OptionMenuImpl + : public Tizen::Ui::_WindowImpl + , public _IActionEventListener + , virtual public Tizen::Base::Runtime::IEventListener +{ +public: + result AddActionEventListener(Tizen::Ui::IActionEventListener& listener); + + result RemoveActionEventListener(Tizen::Ui::IActionEventListener& listener); + + result AddItem(const Tizen::Base::String& text, int actionId, const Tizen::Graphics::Bitmap* pNormalBitmap, + const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap); + + result InsertItemAt(int mainIndex, const Tizen::Base::String& text, int actionId, const Tizen::Graphics::Bitmap* normalBitmap, + const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap); + + result SetItemAt(int mainIndex, const Tizen::Base::String& text, int actionId, const Tizen::Graphics::Bitmap* normalBitmap, + const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap); + + result RemoveItemAt(int mainIndex); + + void RemoveAllItems (void); + + int GetItemCount(void) const; + + int GetItemIndexFromActionId(int actionId) const; + + int GetItemActionIdAt(int mainIndex) const; + + result AddSubItem(int mainIndex, const Tizen::Base::String& text, int actionId); + + result InsertSubItemAt(int mainIndex, int subIndex, const Tizen::Base::String& text, int actionId); + + result SetSubItemAt(int mainIndex, int subIndex, const Tizen::Base::String& text, int actionId); + + result RemoveSubItemAt(int mainIndex, int subIndex); + + int GetSubItemCount(int mainIndex) const; + + int GetSubItemIndexFromActionId(int actionId) const; + + int GetSubItemActionIdAt(int mainIndex, int subIndex) const; + + result SetItemTextColor(OptionMenuItemStatus status, const Tizen::Graphics::Color& color); + + Tizen::Graphics::Color GetItemTextColor(OptionMenuItemStatus status) const; + + result SetItemColor(OptionMenuItemStatus status, const Tizen::Graphics::Color& color); + + Tizen::Graphics::Color GetItemColor(OptionMenuItemStatus status) const; + + result SetColor(const Tizen::Graphics::Color& color); + + Tizen::Graphics::Color GetColor(void) const; + + result SetMaxVisibleItemsCount(int maxItemsCount); + + int GetMaxVisibleItemsCount(void) const; + + virtual const char* GetPublicClassName(void) const; + + virtual const OptionMenu& GetPublic(void) const; + + virtual OptionMenu& GetPublic(void); + + virtual const _OptionMenu& GetCore(void) const; + + virtual _OptionMenu& GetCore(void); + + virtual void OnActionPerformed(const Tizen::Ui::_Control& source, int actionId); + + virtual ~_OptionMenuImpl(void); + + static _OptionMenuImpl* GetInstance(OptionMenu& optionMenu); + + static const _OptionMenuImpl* GetInstance(const OptionMenu& optionMenu); + + static _OptionMenuImpl* CreateOptionMenuImplN(OptionMenu& control); + + virtual result OnAttachedToMainTree(void); + +private: + _OptionMenuImpl(OptionMenu* pPublic, _OptionMenu* pCore); + + _OptionMenuImpl(const _OptionMenuImpl&); + + _OptionMenuImpl& operator =(const _OptionMenuImpl&); + +private: + _PublicActionEvent* __pPublicActionEvent; +}; // _OptionMenuImpl + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_OPTION_MENU_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_OptionMenuItem.h b/src/ui/inc/FUiCtrl_OptionMenuItem.h new file mode 100644 index 0000000..b5a9df7 --- /dev/null +++ b/src/ui/inc/FUiCtrl_OptionMenuItem.h @@ -0,0 +1,209 @@ +// +// 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_OptionMenuItem.h + * @brief This is the header file for the _OptionMenuItem class. + * + * This header file contains the declarations of the %_OptionMenuItem class. + */ +#ifndef _FUI_CTRL_INTERNAL_OPTIONMENU_ITEM_H_ +#define _FUI_CTRL_INTERNAL_OPTIONMENU_ITEM_H_ + +#include +#include +#include +#include +#include + +#include "FUi_Control.h" +#include "FUiCtrl_Label.h" + + +namespace Tizen { namespace Ui { namespace Controls +{ + +enum OptionMenuItemDrawingStatus +{ + OPTION_MENU_ITEM_DRAWING_STATUS_NORMAL = 0, + OPTION_MENU_ITEM_DRAWING_STATUS_PRESSED, + OPTION_MENU_ITEM_DRAWING_STATUS_HIGHLIGHTED, + OPTION_MENU_ITEM_DRAWING_STATUS_MAX +}; + +enum OptionMenuItemDrawingType +{ + OPTION_MENU_ITEM_DRAWING_TYPE_NONE = -1, + OPTION_MENU_ITEM_DRAWING_TYPE_TEXT, + OPTION_MENU_ITEM_DRAWING_TYPE_BITMAP +}; + +/** + * @class _OptionMenuItem + * @brief + * @since 2.2 + * + * + * + * + */ +class _OptionMenuItem + : public Tizen::Ui::_Control +{ + +public: + _OptionMenuItem(void); + virtual ~_OptionMenuItem(void); + + static _OptionMenuItem* CreateOptionMenuItemN(void); + + result InsertSubItemAt(_OptionMenuItem& subItem, int index); + result SetSubItemAt(_OptionMenuItem& subItem, int index); + result RemoveSubItemAt(int index); + bool HasSubItem(void) const; + int GetSubItemCount(void) const; + _OptionMenuItem* GetSubItem(int index); + + void InitializeAccessibilityElement(void); + + void SetType(OptionMenuItemDrawingType type); + OptionMenuItemDrawingType GetType(void) const; + + void SetActionId(int actionId); + int GetActionId(void) const; + + void SetUpperDivider(bool drawDivider); + bool HasUpperDivider(void) const; // first item has no upper divider in List style + void SetLowerDivider(bool drawDivider); + bool HasLowerDivider(void) const; // last item has no lower divider in List style + + void SetTextSize(float size); + + result SetText(const Tizen::Base::String& text); + const Tizen::Base::String& GetText(void) const; + + 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; + + void SetDrawRect(Tizen::Graphics::FloatRectangle rect); + Tizen::Graphics::FloatRectangle GetDrawRect(void) const; + + void SetPressedDrawRect(Tizen::Graphics::FloatRectangle rect); + Tizen::Graphics::FloatRectangle GetPressedDrawRect(void) const; + + void SetParentScrollEnable(bool enable); + bool GetParentScrollEnable(void) const; + + bool IsSelected(void) const; + bool IsHighlighted(void) const; + + void SetHighlighted(bool status); + + int Release(void); + + void SetAndInvalidate(bool flag); + + virtual void OnBoundsChanged(void); + // draw + virtual void OnDraw(void); + void DrawItem(void); + void DrawArrow(void); + void SetBitmapLabel(_Label* pLabel); + void SetTextLabel(_Label* pLabel); + _Label* GetBitmapLabel(void) const; + _Label* GetTextLabel(void) const; + void DrawItemUpperDivider(void); + int GetSubItemIndexFromActionId(int actionId) const; + void DrawItemBackground(void); + void DrawItemBitmap(void); + void DrawItemLowerDivider(void); + + void TouchMoved(const _Control& source, const _TouchInfo& touchinfo); + // event handler for ITouchEventListener + 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); + + virtual bool OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo); + virtual bool OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo); + virtual bool OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo); + + virtual void OnFontChanged(Tizen::Graphics::Font* pFont); + virtual void OnFontInfoRequested(unsigned long& style, float& size); + +private: + _OptionMenuItem(const _OptionMenuItem& rhs); + _OptionMenuItem& operator =(const _OptionMenuItem& rhs); + +private: + OptionMenuItemDrawingType __type; + int __actionId; + bool __upperDividerLine; + bool __lowerDividerLine; + + bool __pressed; + bool __selected; + bool __highlighted; + bool __parentScrollEnable; + + float __leftMargin; + float __rightMargin; + float __dividerHeight; + float __bgPressedMargin; + float __textLeftMargin; + float __textRightMargin; + float __textTopMargin; + float __textBottomMargin; + float __arrowLeftMargin; + float __arrowRightMargin; + float __arrowMargin; + float __itemHeight; + float __bgPressedLeftRightMargin; + float __bgPressedTopBottomMargin; + + float __textSize; + Tizen::Base::String __text; + Tizen::Graphics::Bitmap* __pBitmap[OPTION_MENU_ITEM_DRAWING_STATUS_MAX]; + Tizen::Graphics::Bitmap* __pNormalBgBitmap; + Tizen::Graphics::Bitmap* __pSelectedBgBitmap; + Tizen::Graphics::Bitmap* __pArrowBitmap; + Tizen::Graphics::Bitmap* __pArrowPressedBitmap; + Tizen::Graphics::FloatDimension __size; + Tizen::Graphics::FloatRectangle __drawRect; + Tizen::Graphics::FloatRectangle __pressedDrawRect; + Tizen::Graphics::Color __selectedBgColor; + Tizen::Graphics::Color __upperDividerLineColor; + Tizen::Graphics::Color __lowerDividerLineColor; + + _Label* __pBitmapLabel; + _Label* __pTextLabel; + _Label* __pUpperDividerLineLabel; + _Label* __pBackgroundLabel; + _Label* __pLowerDividerLineLabel; + _Label* __pArrowLabel; + + Tizen::Base::Collection::ArrayList* __pSubItems; + +}; // _OptionMenuItem + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_OPTIONMENU_ITEM_H_ diff --git a/src/ui/inc/FUiCtrl_OptionMenuModel.h b/src/ui/inc/FUiCtrl_OptionMenuModel.h new file mode 100644 index 0000000..ee6a784 --- /dev/null +++ b/src/ui/inc/FUiCtrl_OptionMenuModel.h @@ -0,0 +1,79 @@ +// +// 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_OptionMenuModel.h + * @brief This is the header file for the _OptionMenuModel class. + * + * This header file contains the declarations of the %_OptionMenuModel class. + */ +#ifndef _FUI_CTRL_INTERNAL_OPTIONMENU_MODEL_H_ +#define _FUI_CTRL_INTERNAL_OPTIONMENU_MODEL_H_ + +#include +#include +#include "FUiCtrl_OptionMenuItem.h" + +namespace Tizen { namespace Ui { namespace Controls +{ +/** + * @class _OptionMenuModel + * @brief + * @since 2.2 + * + * + * + * + */ + +class _OptionMenuModel + : public Tizen::Base::Object +{ +public: + _OptionMenuModel(void); + virtual ~_OptionMenuModel(void); + +public: + result Construct(void); + int GetItemCount(void) const; + _OptionMenuItem* GetItem(int mainIndex, int subIndex = -1) const; + result AddItem(_OptionMenuItem* pItem, int mainIndex = -1); + result InsertItemAt(_OptionMenuItem* pItem, int mainIndex, int subIndex = -1); + result SetItemAt(int mainIndex, const Tizen::Base::String& text, int actionId, const Tizen::Graphics::Bitmap* normalBitmap, + const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap, float fontSize, int subIndex = -1); + result RemoveItem(int mainIndex, int subIndex = -1); + result RemoveAllItem(void); + void ResetAllItem(void); + void ResetSelectedItem(int selectedIndex); + int GetSubItemCount(int mainIndex) const; + int GetItemIndexFromActionId(int actionId) const; + int GetSubItemIndexFromActionId(int actionId, int& mainIndex) const; + +private: + bool IsValidItem(_OptionMenuItem *pItem); + +private: + _OptionMenuModel(const _OptionMenuModel& rhs); + _OptionMenuModel& operator =(const _OptionMenuModel& rhs); + +private: + Tizen::Base::Collection::ArrayList __items; + static const int INVALID_INDEX = -1; +}; // _OptionMenuModel + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_OPTIONMENU_MODEL_H_ diff --git a/src/ui/inc/FUiCtrl_OptionMenuPresenter.h b/src/ui/inc/FUiCtrl_OptionMenuPresenter.h new file mode 100644 index 0000000..509a3f2 --- /dev/null +++ b/src/ui/inc/FUiCtrl_OptionMenuPresenter.h @@ -0,0 +1,182 @@ +// +// 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_OptionMenuPresenter.h + * @brief This is the header file for the _OptionMenuPresenter class. + * + * This header file contains the declarations of the %_OptionMenuPresenter class. + */ +#ifndef _FUI_CTRL_INTERNAL_OPTIONMENU_PRESENTER_H_ +#define _FUI_CTRL_INTERNAL_OPTIONMENU_PRESENTER_H_ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "FUi_Control.h" +#include "FUiAnim_VisualElement.h" +#include "FUiCtrl_OptionMenu.h" +#include "FUiCtrl_OptionMenuModel.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _OptionMenu; +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; + _ListItem* pListItem; + _OptionMenuItem* pOptionMenuItem; +}; + +/** + * @class _OptionMenuPresenter + * @brief + * @since 2.0 + * + * + * + * + */ +class _OptionMenuPresenter +{ +// Lifecycle +public: + _OptionMenuPresenter(_OptionMenu* pOptionMenu); + virtual ~_OptionMenuPresenter(void); + +// Operation +public: + virtual result Install(void); + virtual result Draw(void); + result DrawFocus(int index); + void ClearFocus(void); + void OnEnterKeyReleased(int selectedIndex); + virtual result DrawBackground(Tizen::Graphics::Canvas* pCanvas); + virtual result AddItem(const Tizen::Base::String& text, int actionId, const Tizen::Graphics::Bitmap* normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap); + virtual result AddSubItem(int mainIndex, const Tizen::Base::String& text, int actionId); + int GetItemIndexFromActionId(int actionId) const; + int GetItemActionIdAt(int mainIndex) const; + virtual result InsertItem(int mainIndex, const Tizen::Base::String& text, int actionId, const Tizen::Graphics::Bitmap* normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap); + virtual result InsertSubItemAt(int mainIndex, int subIndex, const Tizen::Base::String& text, int actionId); + virtual result SetSubItemAt(int mainIndex, int subIndex, const Tizen::Base::String& text, int actionId); + virtual result RemoveSubItemAt(int mainIndex, int subIndex); + virtual int GetSubItemCount(int mainIndex) const; + 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 DeleteItem(int index); + virtual result DeleteItemAll(void); + virtual result CalculateWindowRect(void); + virtual result ApplyColorProperty(void); + int GetSubItemIndexFromActionId(int actionId) const; + int GetSubItemActionIdAt(int mainIndex, int subIndex) const; + void CalculateItemMaximumWidth(void); + void CalculateItemSize(const Base::String& text, OptionMenuItemDrawingType itemType, Tizen::Graphics::FloatDimension &textArea, Tizen::Graphics::FloatDimension &itemSize); + + virtual _UiTouchEventDelivery OnPreviewTouchPressed(const _Control& source, const _TouchInfo& touchinfo); + virtual _UiTouchEventDelivery OnPreviewTouchMoved(const _Control& source, const _TouchInfo& touchinfo); + virtual _UiTouchEventDelivery OnPreviewTouchReleased(const _Control& source, const _TouchInfo& touchinfo); + + virtual bool OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo); + virtual bool OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo); + virtual bool OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo); + virtual bool OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo); + + virtual void OnActionPerformed(const Tizen::Ui::_Control& source, int actionId); + + virtual void OnFontChanged(Tizen::Graphics::Font* pFont); + virtual void OnFontInfoRequested(unsigned long& style, float& size); + + virtual void SetAllAccessibilityElement(void); + + virtual _OptionMenuItemInfo GetItemFromPosition(const Tizen::Graphics::FloatPoint& position); + virtual _OptionMenuItemInfo 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); + + void ResetSelectedItem(void); + +private: + void LoadShape(void); + result CalculateRect(void); + void AdjustItemLayout(void); + void AdjustItemPosition(void); + Tizen::Graphics::FloatDimension AdjustItemLayoutStyle(void); + + _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; + +private: + _OptionMenuPresenter(const _OptionMenuPresenter& rhs); + _OptionMenuPresenter& operator =(const _OptionMenuPresenter& rhs); + +// Attribute +private: + _OptionMenu* __pOptionMenu; + _OptionMenuModel* __pModel; + + Tizen::Graphics::Font* __pFont; + Tizen::Graphics::FloatDimension __layoutSize; + + bool __touchOutRect; + int __selectedIndex; + bool __scrollEnable; + + float __maxWidth; + float __minWidth; + float __topMargin; + float __bottomMargin; + float __leftMargin; + float __rightMargin; + float __itemWidth; + float __itemMinWidth; + float __itemHeight; + float __itemMaxWidth; + float __itemGap; + float __itemBitmapWidth; + float __itemBitmapHeight; + float __itemFontSize; + float __dividerHeight; + int __focusedIndex; +}; // _OptionMenuListPresenter + +}}} // Tizen::Ui: Control + +#endif //_FUI_CTRL_INTERNAL_OPTIONMENU_PRESENTER_H_ diff --git a/src/ui/inc/FUiCtrl_OverlayAgent.h b/src/ui/inc/FUiCtrl_OverlayAgent.h new file mode 100644 index 0000000..69dd11c --- /dev/null +++ b/src/ui/inc/FUiCtrl_OverlayAgent.h @@ -0,0 +1,275 @@ +// +// 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_OverlayAgent.h + * @brief This is the header file for the _OverlayAgent class. + * + * This header file contains the declarations of the _OverlayAgent class. + * + */ + +#ifndef _FUI_INTERNAL_OVERLAY_AGENT_H_ +#define _FUI_INTERNAL_OVERLAY_AGENT_H_ +#define _FUI_INTERNAL_USE_THRESHOLD_EVENT_TIMER + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Animations +{ +class _VisualElement; +class VisualElementSurface; +} } } // Tizen::Ui::Animations + +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 +{ + OVERLAY_AGENT_EVALUATION_OPTION_GREATER_THAN, + OVERLAY_AGENT_EVALUATION_OPTION_LESS_THAN, +}; + +enum _OverlayAgentRotation +{ + _OVERLAY_AGENT_ROTATION_NONE, + _OVERLAY_AGENT_ROTATION_90, + _OVERLAY_AGENT_ROTATION_180, + _OVERLAY_AGENT_ROTATION_270, + _OVERLAY_AGENT_ROTATION_NONE_LR, + _OVERLAY_AGENT_ROTATION_NONE_UD, + _OVERLAY_AGENT_ROTATION_90_LR, + _OVERLAY_AGENT_ROTATION_90_UD, + _OVERLAY_AGENT_ROTATION_180_LR, + _OVERLAY_AGENT_ROTATION_180_UD, + _OVERLAY_AGENT_ROTATION_270_LR, + _OVERLAY_AGENT_ROTATION_270_UD, + _OVERLAY_AGENT_ROTATION_MAX +}; + +enum _OverlayAgentBufferPixelFormat +{ + _OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_MIN = 0, + _OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_ARGB8888 = 1, + _OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_RGB565, + _OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_YCbCr420_PLANAR, + _OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_NV12, + _OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_UYVY, + _OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_MAX +}; + +enum _OverlayAgentStyle +{ + _OVERLAY_AGENT_STYLE_NONE, + _OVERLAY_AGENT_STYLE_REGION_SW, + _OVERLAY_AGENT_STYLE_REGION_GL, + _OVERLAY_AGENT_STYLE_PANEL_SW, + _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, int pixmapIndex = 0); + result CreateAdditionalPixmap(void); + void UngrabXvPort(void); + result Draw(void); + + Evas_Object* GetRendererImageObject(void) const; + Tizen::Graphics::FloatRectangle GetBounds(void) const; + + result GetBufferInfo(Tizen::Graphics::BufferInfo& bufferInfo) const; + + result SetInputBuffer(const Tizen::Base::ByteBuffer& srcBuffer, const Tizen::Graphics::Dimension& srcDim, _OverlayAgentBufferPixelFormat srcFormat); + result SetRotation(_OverlayAgentRotation rotation); + result SetDestination(const Tizen::Graphics::FloatDimension& dimension); + result SetAspectRatio(bool enable); + 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); + static int GetOverlayAgentCount(void); + static Tizen::Base::Collection::IListT* GetPixelFormatListN(void); + + static int GetDstRectMinWidth(void); + static int GetDstRectMinHeight(void); + static int GetSrcRectMinWidth(void); + static int GetSrcRectMinHeight(void); + static int GetWidthUnit(void); + static int GetHeightUnit(void); + static int GetMaxCount(void); + +private: + _OverlayAgent(_OverlayAgentStyle style, const _Control& parentControl, const Tizen::Graphics::FloatRectangle& logicalBounds, const Tizen::Graphics::Rectangle& physicalBounds); + _OverlayAgent(const _OverlayAgent& rhs); + _OverlayAgent& operator=(const _OverlayAgent& rhs); + + result CreateRendererVisualElement(const _Control& parentControl, const Tizen::Graphics::FloatRectangle& logicalBounds, const Tizen::Graphics::Rectangle& physicalBounds); + result GrabXvPort(void); + result PutXvImage(void); + result PutEvasImage(void); + + int FindFreeBuffer(void); + static int GetValueFromRegistry(const Tizen::Base::String& key); + +private: +#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 + , public Tizen::Base::Runtime::ITimerEventListener + { + public: + _OverlayVisualElement(void); + _OverlayVisualElement(const _OverlayVisualElement& rhs); + + result Construct(void); + Evas_Object* GetImageObject(void) const; + void SetImageObject(Evas_Object* pImageObject); + void SetImageObjectShowStateChanged(void); + + private: + void OnTimerExpired(Tizen::Base::Runtime::Timer& timer); + + virtual ~_OverlayVisualElement(void); + virtual VisualElement* CloneN(void) const; + + static void OnImageObjectShown(void* pData, Evas *pEvas, Evas_Object *pImageObject, void *event_info); + static void OnImageObjectHidden(void* pData, Evas *pEvas, Evas_Object *pImageObject, void *event_info); + + private: + Tizen::Base::Runtime::Timer* __pOverlayTimer; + Evas_Object* __pImageObject; + bool __showStateChanged; + }; + + //VisualElements + _OverlayVisualElement* __pRendererVE; + Tizen::Ui::Animations::_VisualElement* __pParentVE; + + //Renderer property + Evas_Object* __pImageObject; + _OverlayAgentStyle __style; + _OverlayAgentRotation __currentRotation; + unsigned int __savedColorFormat; + _OverlayAgentBufferPixelFormat __currentColorFormat; + Tizen::Graphics::Dimension __currentSourceBufferSize; + Tizen::Graphics::FloatRectangle __standardRendererBounds; + Tizen::Graphics::FloatRectangle __standardParentBounds; + bool __needToRellaocImage; + + //Renderer Buffer + const Tizen::Base::ByteBuffer* __pCurrentSourceBuffer; + Tizen::Base::ByteBuffer* __pConvertedSourceBuffer; + + //(GL-Backend) Renderer Pixmap + 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; + int __currentReadingPixmap; + bool __stopReadingPixmap; + + _UserData __pixmapCallBackData; + Tizen::Base::Runtime::Mutex* __pMutex; + long long __prevTime; + + //(GL-Backend) Xv Property + int __xvPort; + XvImage* __pXvImage; + XShmSegmentInfo* __pShmInfo; + + //(GL-Backend) XvPort variable + static int __baseXvPort; + static bool __isPortGrabbed[_OVERLAY_AGENT_XV_PORT]; + + // static util variable + static int __overlayAgentCount; + static int __dstRectMinWidth; + static int __dstRectMinHegith; + static int __srcRectMinWidth; + static int __srcRectMinHegith; + static int __overlayWidthUnit; + static int __overlayHeightUnit; + static int __overlayMaxCount; + static bool __OverlayAgentBufferPixelFormat[_OVERLAY_AGENT_BUFFER_PIXEL_FORMAT_MAX]; + +}; // _OverlayAgent + +}}} // Tizen::Ui::Controls + +#endif // _FUI_INTERNAL_OVERLAY_AGENT_H_ + diff --git a/src/ui/inc/FUiCtrl_OverlayPanel.h b/src/ui/inc/FUiCtrl_OverlayPanel.h new file mode 100644 index 0000000..3c30065 --- /dev/null +++ b/src/ui/inc/FUiCtrl_OverlayPanel.h @@ -0,0 +1,76 @@ +// +// 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_OverlayPanel.h + * @brief This is the header file for the _OverlayPanel class. + * + * This header file contains the declarations of the _OverlayPanel class. + * + */ +#ifndef _FUI_CTRL_INTERNAL_OVERLAY_PANEL_H_ +#define _FUI_CTRL_INTERNAL_OVERLAY_PANEL_H_ + +#include +#include "FUi_Control.h" + +namespace Tizen { namespace Graphics +{ +class Rectangle; +class Dimension; +}} // Tizen::Graphics + +namespace Tizen { namespace Ui { namespace Controls +{ +class _OverlayAgent; + +class _OverlayPanel + : public _Control + , virtual public Tizen::Base::Runtime::IEventListener + , virtual public Tizen::Ui::_IUiEventListener + , virtual public Tizen::Ui::_IUiEventPreviewer +{ +public: + static _OverlayPanel* CreateOverlayPanelN(void); + + virtual ~_OverlayPanel(void); + + result SetInputBuffer(const Tizen::Graphics::FloatDimension& destDim, const Tizen::Base::ByteBuffer& srcBuffer, + const Tizen::Graphics::Dimension& srcDim, OverlayPanel::BufferPixelFormat srcFormat); + result SetRendererRotation(OverlayPanel::Rotation rotation); + result SetRendererAspectRatio(bool aspectRatio); + result SetRenderSize(const Tizen::Graphics::FloatDimension& dimension); + + result GetBackgroundBufferInfo(Tizen::Graphics::BufferInfo& info) const; + Tizen::Graphics::Color GetMaskingColor(void) const; + + virtual result OnAttachedToMainTree(void); + virtual void OnBoundsChanged(void); + +private: + _OverlayPanel(void); + _OverlayPanel(const _OverlayPanel& rhs); + _OverlayPanel& operator=(const _OverlayPanel& rhs); + +private: + _OverlayAgent* __pOverlayAgent; +}; // _OverlayPanel + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_OVERLAY_PANEL_H_ + diff --git a/src/ui/inc/FUiCtrl_OverlayPanelImpl.h b/src/ui/inc/FUiCtrl_OverlayPanelImpl.h new file mode 100644 index 0000000..be62c9e --- /dev/null +++ b/src/ui/inc/FUiCtrl_OverlayPanelImpl.h @@ -0,0 +1,104 @@ +// +// 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_OverlayPanelImpl.h + * @brief This is the header file for the _OverlayPanelImpl class. + * + * This header file contains the declarations of the _OverlayPanelImpl class. + * + */ +#ifndef _FUI_CTRL_INTERNAL_OVERLAY_PANEL_IMPL_H_ +#define _FUI_CTRL_INTERNAL_OVERLAY_PANEL_IMPL_H_ + +#include +#include "FUi_ContainerImpl.h" +#include "FUiCtrl_OverlayPanel.h" + +namespace Tizen { namespace Graphics +{ +class Canvas; +class Rectangle; +class Dimension; +}} // Tizen::Graphics + +namespace Tizen { namespace Ui { namespace Animations +{ +class _VisualElement; +}}} // Tizen::Ui::Animations + +namespace Tizen { namespace Ui { namespace Controls +{ +class _OverlayPanelImpl + : public _ContainerImpl +{ +public: + class OverlayPanelSizeInfo : public _ControlImpl::SizeInfo + { + virtual Tizen::Graphics::Dimension GetDefaultMinimumSize(_ControlOrientation orientation) const; + virtual Tizen::Graphics::Dimension GetDefaultMaximumSize(_ControlOrientation orientation) const; + }; + + static _OverlayPanelImpl* CreateOverlayPanelImplN(OverlayPanel* pPublic, const Tizen::Graphics::Rectangle& bounds); + static _OverlayPanelImpl* CreateOverlayPanelImplN(OverlayPanel* pPublic, const Tizen::Graphics::FloatRectangle& bounds); + + virtual ~_OverlayPanelImpl(void); + + result SetInputBuffer(const Tizen::Graphics::Dimension& destDim, const Tizen::Base::ByteBuffer& srcBuffer, const Tizen::Graphics::Dimension& srcDim, OverlayPanel::BufferPixelFormat srcFormat); + result SetInputBuffer(const Tizen::Graphics::FloatDimension& destDim, const Tizen::Base::ByteBuffer& srcBuffer, const Tizen::Graphics::Dimension& srcDim, OverlayPanel::BufferPixelFormat srcFormat); + + void SetRendererRotation(OverlayPanel::Rotation rotation); + void SetRendererAspectRatio(bool fix); + result SetRenderSize(const Tizen::Graphics::Dimension& dimension); + result SetRenderSize(const Tizen::Graphics::FloatDimension& dimension); + + result GetBackgroundBufferInfo(Tizen::Graphics::BufferInfo& bufferInfo) const; + Tizen::Graphics::Color GetMaskingColor(void) const; + + virtual result OnAttachedToMainTree(void); + virtual void OnChangeLayout(_ControlOrientation orientation); + virtual const char* GetPublicClassName(void) const; + + virtual const _OverlayPanel& GetCore(void) const; + virtual _OverlayPanel& GetCore(void); + virtual const OverlayPanel& GetPublic(void) const; + virtual OverlayPanel& GetPublic(void); + + static _OverlayPanelImpl* GetInstance(OverlayPanel& overlayPanel); + static const _OverlayPanelImpl* GetInstance(const OverlayPanel& overlayPanel); + + static result SetPixelFormatList(void); + static Tizen::Base::Collection::IListT* GetSupportedBufferPixelFormatListN(void); + static result EvaluateBounds(Tizen::Ui::Controls::OverlayPanelEvaluationOption option, Tizen::Graphics::FloatRectangle& rect, bool& modified); + static int GetWidthUnit(void); + static int GetHeightUnit(void); + static int GetMaxCount(void); + +private: + _OverlayPanelImpl(OverlayPanel* pPublic, _OverlayPanel* pCore); + _OverlayPanelImpl(const _OverlayPanelImpl& rhs); + _OverlayPanelImpl& operator=(const _OverlayPanelImpl& rhs); + + void SetChildBuilderBounds(Tizen::Ui::_ContainerImpl* pContainerImpl, Tizen::Ui::_ControlOrientation controlOrientation); + +private: + static bool __overlayPanelPixelFomatList[]; +}; // _OverlayPanelImpl + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_OVERLAY_PANEL_IMPL_H_ + diff --git a/src/ui/inc/FUiCtrl_OverlayRegionImpl.h b/src/ui/inc/FUiCtrl_OverlayRegionImpl.h new file mode 100644 index 0000000..3ff036b --- /dev/null +++ b/src/ui/inc/FUiCtrl_OverlayRegionImpl.h @@ -0,0 +1,145 @@ +// +// 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_OverlayRegionImpl.h + * @brief This is the header file for the _OverlayRegionImpl class. + * + * This header file contains the declarations of the _OverlayRegionImpl class. + * + */ + +#ifndef _FUI_CTRL_INTERNAL_OVERLAY_REGION_IMPL_H_ +#define _FUI_CTRL_INTERNAL_OVERLAY_REGION_IMPL_H_ + +#include +#include +#include + +namespace +{ + struct xmlParserDeleter + { + void operator()(xmlDoc* pXmlDoc) + { + xmlFreeDoc(pXmlDoc); + } + }; + + class _OverlayRegionMediaCapability + { + public: + _OverlayRegionMediaCapability(void); + virtual ~_OverlayRegionMediaCapability(void); + + result Construct(void); + result ParseCapability(const char* xmlBuffer, int length); + void ParseSection(xmlNodePtr pRoot, const Tizen::Base::String& section); + + int cameraPrimaryDirection; + int cameraPrimaryRotation; + int cameraSecondaryDirection; + int cameraSecondaryRotation; + }; //_OverlayRegionMediaCapability +} + +namespace Tizen { namespace Graphics +{ +class Canvas; +class Rectangle; +class Dimension; +} } + +namespace Tizen { namespace Ui +{ +class _Control; +} } + +namespace Tizen { namespace Ui { namespace Controls +{ +class OverlayRegion; +class _Form; +class _OverlayAgent; +} } } + +namespace Tizen { namespace Ui { namespace Controls +{ + +enum OverlayRegionRotate +{ + OVERLAYREGION_ROTATE_0 = 0, + OVERLAYREGION_ROTATE_90, + OVERLAYREGION_ROTATE_180, + OVERLAYREGION_ROTATE_270, + OVERLAYREGION_ROTATE_NONE +}; + +class _OverlayRegionImpl + : public Tizen::Base::Object +{ +public: + virtual ~_OverlayRegionImpl(void); + + Tizen::Graphics::FloatRectangle GetBounds(void) const; + void GetBounds(float& x, float& y, float& width, float& height) const; + result SetInputBuffer(const Tizen::Base::ByteBuffer& srcBuffer, const Tizen::Graphics::Dimension& srcDim, OverlayRegionBufferPixelFormat srcFormat); + result GetBackgroundBufferInfo(Tizen::Graphics::BufferInfo& info) const; + + result Construct(_Form* pParentForm, OverlayRegionType overlayRegionType, const Tizen::Graphics::FloatRectangle& userDestRect, const Tizen::Graphics::FloatRectangle& overlayLogRect, const Tizen::Graphics::Rectangle& finalPhyRect); + + OverlayRegion* CreateOverlayRegionN(void); + OverlayRegion* GetOverlayRegion(void) const; + void SetFormArrayIndex(int index); + + void GoForeground(void); + void GoBackground(void); + void SetShowState(bool show); + + static result IsValidBounds(const Tizen::Graphics::Rectangle& physicalBounds); + static result SetPixelFormatList(void); + static Tizen::Base::Collection::IListT< OverlayRegionBufferPixelFormat >* GetSupportedBufferPixelFormatListN(void); + + static _OverlayRegionImpl* GetInstance(OverlayRegion& overlayRegion); + static const _OverlayRegionImpl* GetInstance(const OverlayRegion& overlayRegion); + +private: + _OverlayRegionImpl(void); + _OverlayRegionImpl(const _OverlayRegionImpl& rhs); + + _OverlayRegionImpl& operator =(const _OverlayRegionImpl& rhs); + +private: + Tizen::Ui::Controls::_Form* __pParentForm; + Tizen::Ui::Controls::OverlayRegion* __pOverlayRegion; + Tizen::Ui::Controls::OverlayRegionType __overlayRegionType; + Tizen::Ui::Controls::_OverlayAgent* __pOverlayAgent; + Tizen::Graphics::FloatRectangle __destRect; + + int __overlayRegionIndex; + bool __showState; + int __cameraRotation; + + static int __primaryCameraRotation; + static int __secondaryCameraRotation; + static bool __overlayRegionPixelFomatList[OVERLAY_REGION_BUFFER_PIXEL_FORMAT_MAX]; + + friend class _Form; +}; // OverlayRegionImpl + +} } } //Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_OVERLAY_REGION_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_Panel.h b/src/ui/inc/FUiCtrl_Panel.h new file mode 100644 index 0000000..28aa4db --- /dev/null +++ b/src/ui/inc/FUiCtrl_Panel.h @@ -0,0 +1,130 @@ +// +// 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_Panel.h + * @brief This is the header file for the _Panel class. + * + * This header file contains the declarations of the _Panel class. + */ + +#ifndef _FUI_CTRL_INTERNAL_PANEL_H_ +#define _FUI_CTRL_INTERNAL_PANEL_H_ + +#include +#include "FUi_Control.h" +#include "FUiCtrl_PanelPresenter.h" + +namespace Tizen { namespace Graphics +{ + +class Bitmap; + +}} // Tizen::Graphics + +namespace Tizen { namespace Ui { namespace Controls +{ + +enum _PanelBackgroundBitmapHorizontalAlign +{ + PANEL_BACKGROUND_BITMAP_HORIZONTAL_ALIGN_LEFT, + PANEL_BACKGROUND_BITMAP_HORIZONTAL_ALIGN_CENTER, + PANEL_BACKGROUND_BITMAP_HORIZONTAL_ALIGN_RIGHT +}; + +enum _PanelBackgroundBitmapVerticalAlign +{ + PANEL_BACKGROUND_BITMAP_VERTICAL_ALIGN_TOP, + PANEL_BACKGROUND_BITMAP_VERTICAL_ALIGN_MIDDLE, + PANEL_BACKGROUND_BITMAP_VERTICAL_ALIGN_BOTTOM +}; + +class _OSP_EXPORT_ _Panel + : public _Control + , virtual public Tizen::Base::Runtime::IEventListener + , virtual public _IUiEventListener + , virtual public _IUiEventPreviewer +{ +// Lifecycle +public: + virtual ~_Panel(void); + +// Operations +public: + static _Panel* CreatePanelN(const Tizen::Graphics::FloatRectangle& rect, GroupStyle groupStyle = GROUP_STYLE_NONE); + + virtual void OnDraw(void); + + // Accessor + void SetBackgroundColor(const Tizen::Graphics::Color& color); + + GroupStyle GetGroupStyle(void) const; + void SetGroupStyle(GroupStyle groupStyle); + + Tizen::Graphics::Bitmap* GetGroupStyleBitmap(void) const; + Tizen::Graphics::Bitmap* GetGroupStyleBackgroundBitmap(void) const; + + bool IsBackgroundBitmapStretch(void) const; + void SetBackgroundBitmapStretch(bool stretch); + + _PanelBackgroundBitmapHorizontalAlign GetBackgroundBitmapHorizontalAlign(void) const; + void SetBackgroundBitmapHorizontalAlign(_PanelBackgroundBitmapHorizontalAlign align); + + _PanelBackgroundBitmapVerticalAlign GetBackgroundBitmapVerticalAlign(void) const; + void SetBackgroundBitmapVerticalAlign(_PanelBackgroundBitmapVerticalAlign align); + + void SetBackgroundBitmapAlign(_PanelBackgroundBitmapHorizontalAlign horizontalAlign, _PanelBackgroundBitmapVerticalAlign verticalAlign); + + Tizen::Graphics::Bitmap* GetBackgroundBitmap(void) const; + void SetBackgroundBitmap(Tizen::Graphics::Bitmap* bitmap); + +protected: + // Lifecycle + _Panel(void); + + virtual result Initialize(const _PanelPresenter& presenter); + + // Accessor + virtual result SetPanelPresenter(const _PanelPresenter* presenter); + +// Copy constructor +private: + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + _Panel(const _Panel& rhs); + + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + _Panel& operator =(const _Panel& rhs); + +// Attribute +private: + _PanelPresenter* __pPanelPresenter; + + GroupStyle __groupStyle; + Tizen::Graphics::Bitmap* __pGroupStyleBitmap; + Tizen::Graphics::Bitmap* __pGroupStyleBackgroundBitmap; + + bool __backgroundBitmapStretch; + _PanelBackgroundBitmapHorizontalAlign __backgroundBitmapHorizontalAlign; + _PanelBackgroundBitmapVerticalAlign __backgroundBitmapVerticalAlign; + Tizen::Graphics::Bitmap* __pBackgroundBitmap; +}; // _Panel + + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_PANEL_H_ + diff --git a/src/ui/inc/FUiCtrl_PanelImpl.h b/src/ui/inc/FUiCtrl_PanelImpl.h new file mode 100644 index 0000000..218ebb7 --- /dev/null +++ b/src/ui/inc/FUiCtrl_PanelImpl.h @@ -0,0 +1,89 @@ +// +// 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_PanelImpl.h + * @brief This is the header file for the _PanelImpl class. + * + * This header file contains the declarations of the _PanelImpl class. + */ + +#ifndef _FUI_CTRL_INTERNAL_PANEL_IMPL_H_ +#define _FUI_CTRL_INTERNAL_PANEL_IMPL_H_ + +#include +#include "FUi_ContainerImpl.h" +#include "FUiCtrl_Panel.h" + +namespace Tizen { namespace Ui +{ +class DataBindingContext; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _PanelImpl + : public _ContainerImpl +{ + +// Life Cycle +public: + virtual ~_PanelImpl(void); + + static _PanelImpl* CreatePanelImplN(Panel* pControl, const Tizen::Graphics::FloatRectangle& rect, GroupStyle groupStyle, Layout* pPublicPortraitLayout = null, Layout* pPublicLandscapeLayout = null); + +// Accessor +public: + static const _PanelImpl* GetInstance(const Panel& panel); + static _PanelImpl* GetInstance(Panel& panel); + + virtual const char* GetPublicClassName(void) const; + virtual const Panel& GetPublic(void) const; + virtual Panel& GetPublic(void); + virtual const _Panel& GetCore(void) const; + virtual _Panel& GetCore(void); + + virtual result OnAttachedToMainTree(void); + +// Setter/Getter +public: + void SetBackgroundColor(const Tizen::Graphics::Color& color); + + result SetCompositeEnabled(bool enabled); + bool IsCompositeEnabled(void) const; + + DataBindingContext* GetDataBindingContextN(void) const; + +protected: + _PanelImpl(Control* pPublic, _Control* pCore, Layout* pPublicPortraitLayout = null, Layout* pPublicLandscapeLayout = null); + + void SetChildBuilderBounds(_ContainerImpl* pContainerImpl, _ControlOrientation controlOrientation); + +private: + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + _PanelImpl(const _PanelImpl& rhs); + + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + _PanelImpl& operator =(const _PanelImpl& rhs); + +}; // _PanelImpl + +}}} //Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_PANEL_IMPL_H_ + diff --git a/src/ui/inc/FUiCtrl_PanelPresenter.h b/src/ui/inc/FUiCtrl_PanelPresenter.h new file mode 100644 index 0000000..7136688 --- /dev/null +++ b/src/ui/inc/FUiCtrl_PanelPresenter.h @@ -0,0 +1,66 @@ +// +// 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_PanelPresenter.h + * @brief This is the header file for the _PanelPresenter class. + * + * This header file contains the declarations of the %_PanelPresenter class. + */ + +#ifndef _FUI_CTRL_INTERNAL_PANEL_PRESENTER_H_ +#define _FUI_CTRL_INTERNAL_PANEL_PRESENTER_H_ + +#include + +namespace Tizen { namespace Ui { namespace Controls +{ +class _Panel; + +class _PanelPresenter + : public Tizen::Base::Object +{ +// Lifecycle +public: + _PanelPresenter(void); + virtual ~_PanelPresenter(void); + +// Operations +public: + virtual result Initialize(_Panel& panel); + virtual result Draw(void); + +protected: + void DrawBackgrounBitmap(Tizen::Graphics::Canvas* pCanvas); + void DrawGroupStyleBitmap(Tizen::Graphics::Canvas* pCanvas); + void DrawGroupStyleBackgroundBitmap(Tizen::Graphics::Canvas* pCanvas); + +private: + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + _PanelPresenter(const _PanelPresenter& rhs); + + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + _PanelPresenter& operator =(const _PanelPresenter& rhs); + +private: + _Panel* __pPanel; +}; // _PanelPresenter; + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_PANEL_PRESENTER_H_ + diff --git a/src/ui/inc/FUiCtrl_Popup.h b/src/ui/inc/FUiCtrl_Popup.h new file mode 100644 index 0000000..996f10b --- /dev/null +++ b/src/ui/inc/FUiCtrl_Popup.h @@ -0,0 +1,175 @@ +// +// 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_Popup.h + * @brief This is the header file for the _Popup class. + * + * This header file contains the declarations of the %_Popup class. + */ + +#ifndef _FUI_CTRL_INTERNAL_POPUP_H_ +#define _FUI_CTRL_INTERNAL_POPUP_H_ + +#include +#include "FUi_Window.h" + +namespace Tizen { namespace Ui +{ +class _AccessibilityElement; +}} // Tizen::Ui + + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _PopupPresenter; + +enum PopupModalResult +{ + POPUP_RESULT_NONE, + POPUP_RESULT_END_MODAL, /**< The Popup is closed by EndModal() */ + POPUP_RESULT_CANCEL = -1 /**< The Cancel button is selected (ProgressPopup)*/ +}; + +/** + * @class _Popup + * @brief + * @since 2.0 + * + * + * + * + */ +class _OSP_EXPORT_ _Popup + : public _Window + , virtual public Tizen::Base::Runtime::IEventListener + , virtual public _IUiEventListener + , virtual public _IUiEventPreviewer +{ + +//Lifecycle +public: + virtual ~_Popup(void); + +// Operations +public: + static _Popup* CreatePopupN(void); + result Initialize(bool hasTitle, const Tizen::Graphics::FloatRectangle& bounds); + + virtual result DoModal(int& modalResult); + result EndModal(int modalResult); + + bool HasTitle(void) const; + Tizen::Graphics::Canvas* GetClientAreaCanvasN(void) const; + + Tizen::Graphics::FloatPoint TranslateFromClientAreaPosition(const Tizen::Graphics::FloatPoint& clientPosition) const; + Tizen::Graphics::FloatPoint TranslateToClientAreaPosition(const Tizen::Graphics::FloatPoint& position) const; + + Tizen::Graphics::Bitmap* GetTitleBackgroundBitmap(void); + Tizen::Graphics::Bitmap* GetTitleBackgroundEffectBitmap(void); + + virtual void OnDraw(void); + + virtual void OnFontChanged(Tizen::Graphics::Font* pFont); + virtual void OnFontInfoRequested(unsigned long& style, float& size); + + virtual result OnAttachingToMainTree(const Tizen::Ui::_Control* pParent); + virtual result OnAttachedToMainTree(void); + virtual result OnDetachingFromMainTree(void); + + virtual void OnVisibleStateChanged(void); + + // Callbacks for processing dim + virtual void OnActivated(void); + virtual void OnDeactivated(void); + + // Touch Event Listener + virtual bool OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo); + virtual bool OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo); + + virtual result OnBoundsChanging(const Tizen::Graphics::FloatRectangle& bounds); + + virtual void OnBoundsChanged(void); + virtual bool IsLayoutChangable(void) const; + virtual void OnOwnerChanged(_Control* pOldOwner); + virtual void UpdateClientBounds(const Tizen::Graphics::FloatDimension& size, Tizen::Graphics::FloatRectangle& clientBounds); + virtual bool IsRotationSynchronized(void) const; + + virtual void OnChangeLayout(Tizen::Ui::_ControlOrientation orientation); + +// Accessor +public: + void SetColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetColor(void) const; + + void SetTitleTextColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetTitleTextColor(void) const; + + virtual result SetTitleText(const Tizen::Base::String& title); + Tizen::Base::String GetTitleText(void) const; + + const Tizen::Graphics::Bitmap* GetBackgroundBitmap(void) const; + const Tizen::Graphics::Bitmap* GetOutlineBitmap(void) const; + + Tizen::Graphics::FloatRectangle GetPopupClientArea(void) const; + + void SetReturnValue(PopupModalResult rtn); + int GetPopupReturnValue(void) const; + + Tizen::Ui::_AccessibilityElement* GetTitleTextAccessibilityElement(void); + +protected: + _Popup(void); + + result SetPresenter(const _PopupPresenter& popupPresenter); + virtual _PopupPresenter* GetPresenter(void); + + virtual void InitializeAccessibilityElement(void); + +private: + _Popup(const _Popup& rhs); + _Popup& operator =(const _Popup& rhs); + +// Attribute +protected: + bool _titleState; + + Tizen::Base::String _titleText; + + Tizen::Graphics::Color _bgColor; + + Tizen::Graphics::Color _titleTextColor; + + Tizen::Graphics::Bitmap* _pComposedBgBitmap; + Tizen::Graphics::Bitmap* _pOutlineBitmap; + Tizen::Graphics::Bitmap* _pComposedTitleBitmap; + Tizen::Graphics::Bitmap* _pTitleEffectBitmap; + Tizen::Ui::_AccessibilityElement* _pTitleTextAccessibilityElement; + +private: + _PopupPresenter* __pPopupPresenter; + + Tizen::Graphics::FloatRectangle __bounds; + + PopupModalResult __popupResult; +}; // _Popup + + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_POPUP_H_ diff --git a/src/ui/inc/FUiCtrl_PopupImpl.h b/src/ui/inc/FUiCtrl_PopupImpl.h new file mode 100644 index 0000000..4c3613c --- /dev/null +++ b/src/ui/inc/FUiCtrl_PopupImpl.h @@ -0,0 +1,121 @@ +// +// 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_PopupImpl.h + * @brief This is the implementation file for the _PopupImpl class. + * + * This header file contains the declarations of the %_PopupImpl class. + */ + +#ifndef _FUI_CTRL_POPUP_IMPL_H_ +#define _FUI_CTRL_POPUP_IMPL_H_ + + +// Includes +#include +#include "FUi_WindowImpl.h" +#include "FUiCtrl_Popup.h" + + +namespace Tizen { namespace Ui +{ +class DataBindingContext; +}} // Tizen::Ui + + +namespace Tizen { namespace Ui { namespace Controls +{ + + +class _PopupImpl + : public _WindowImpl +{ +public: + class PopupSizeInfo + : public _ControlImpl::SizeInfo + { + virtual Tizen::Graphics::FloatDimension GetDefaultMinimumSizeF(_ControlOrientation orientation) const; + }; // PopupSizeInfo + +public: + _PopupImpl(Popup* pPublic, _Popup* pCore, Layout* pPublicPortraitLayout = null, Layout* pPublicLandscapeLayout = null); + virtual ~_PopupImpl(void); + + virtual const char* GetPublicClassName(void) const; + virtual const Popup& GetPublic(void) const; + virtual Popup& GetPublic(void); + virtual const _Popup& GetCore(void) const; + virtual _Popup& GetCore(void); + +public: + static _PopupImpl* CreatePopupImplN(Popup* pControl, const Tizen::Graphics::FloatDimension& dim, Layout* pPublicPortraitLayout = null, Layout* pPublicLandscapeLayout = null); + result Initialize(bool hasTitle, const Tizen::Graphics::FloatDimension& dim); + + virtual result DoModal(int& modalResult); + result EndModal(int modalResult); + + Tizen::Graphics::Canvas* GetClientAreaCanvasN(void) const; + Tizen::Graphics::FloatRectangle GetClientAreaBounds(void) const; + + Tizen::Graphics::FloatPoint TranslateFromClientAreaPosition(const Tizen::Graphics::FloatPoint& clientPosition) const; + Tizen::Graphics::FloatPoint TranslateToClientAreaPosition(const Tizen::Graphics::FloatPoint& position) const; + + DataBindingContext* GetDataBindingContextN(void) const; + + Tizen::Graphics::FloatRectangle GetCenterAlignedRect(float width, float height) const; + + virtual void OnChangeLayout(Tizen::Ui::_ControlOrientation orientation); + virtual result OnBoundsChanging(const Tizen::Graphics::FloatRectangle& bounds); + virtual void OnBoundsChanged(void); + +public: + result SetColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetColor(void) const; + + virtual result SetTitleText(const Tizen::Base::String& title); + Tizen::Base::String GetTitleText(void) const; + + result SetTitleTextColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetTitleTextColor(void) const; + + bool GetXmlBounds(Tizen::Graphics::FloatRectangle& rect); + +public: + static _PopupImpl* GetInstance(Popup& pPopup); + static const _PopupImpl* GetInstance(const Popup& pPopup); + +private: + _PopupImpl(const _PopupImpl& rhs); + _PopupImpl& operator =(const _PopupImpl& rhs); + +protected: + bool _isModal; + bool _centerAlign; + +private: + bool __init; + bool __callBoundsChange; + Tizen::Graphics::FloatPoint __prevPos; + bool __boundsChangedInternally; + bool __boundsChangedExternally; +}; // _PopupImpl + + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_POPUP_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_PopupPresenter.h b/src/ui/inc/FUiCtrl_PopupPresenter.h new file mode 100644 index 0000000..9a0a415 --- /dev/null +++ b/src/ui/inc/FUiCtrl_PopupPresenter.h @@ -0,0 +1,116 @@ +// +// 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_PopupPresenter.h + * @brief This is the header file for the _PopupPresenter class. + * + * This header file contains the declarations of the _PopupPresenter class. + */ + +#ifndef _FUI_CTRL_INTERNAL_POPUP_PRESENTER_H_ +#define _FUI_CTRL_INTERNAL_POPUP_PRESENTER_H_ + + +#include +#include +#include "FUiCtrl_Popup.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _Popup; + +/** + * @class _PopupPresenter + * @brief + * @since 2.0 + * + * + * + * + */ +class _PopupPresenter + : virtual public Tizen::Base::Runtime::IEventListener + , virtual public _IUiEventListener + , virtual public _IUiEventPreviewer +{ +// Lifecycle +public: + _PopupPresenter(void); + virtual ~_PopupPresenter(void); + +// Operations +public: + void Initialize(_Popup& popup); + + void OnDraw(void); + virtual void Draw(void); + + virtual result DoModal(int& modalResult); + + result SetTitleTextObject(const Tizen::Base::String& title); + + Tizen::Graphics::FloatRectangle GetTitleTextBounds(void) const; + + void UpdateEffectBounds(void); + void UpdateTitleTextBounds(void); + + void OnActivated(void); + void OnBoundsChanged(void); + + void OnFontChanged(Tizen::Graphics::Font* pFont); + void OnFontInfoRequested(unsigned long& style, float& size); + result SetFontInfo(unsigned long style, float size); + + // Touch Event Listener + virtual bool OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo); + virtual bool OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo); + +protected: + virtual void ProcessEvent(void); + result CalculateTitleTextSize(float titleTextSize, float minTitleTextSize); + virtual _Popup* GetCore(void); + +private: + _PopupPresenter(const _PopupPresenter& rhs); + _PopupPresenter& operator =(const _PopupPresenter& rhs); + +//Attribute +protected: + Tizen::Graphics::Font* _pFont; + Tizen::Graphics::FloatRectangle _titleBounds; + Tizen::Graphics::FloatRectangle _titleBgBounds; + + float _titleTextSize; + unsigned long _fontStyle; + float _fontSize; + Tizen::Graphics::_Text::TextObject* _pTitleTextObject; + + +private: + _Popup* __pPopup; + + Tizen::Ui::Animations::_VisualElement* __pPopupVE; + Tizen::Ui::Animations::_VisualElement* __pBackgroundVE; + +}; // _PopupPresenter + + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_POPUP_PRESENTER_H_ diff --git a/src/ui/inc/FUiCtrl_Progress.h b/src/ui/inc/FUiCtrl_Progress.h new file mode 100644 index 0000000..be75397 --- /dev/null +++ b/src/ui/inc/FUiCtrl_Progress.h @@ -0,0 +1,100 @@ +// +// 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_Progress.h + * @brief This is the header file for the _Progress class. + * + * This header file contains the declarations of the %_Progress class. + */ +#ifndef _FUI_CTRL_INTERNAL_PROGRESS_H_ +#define _FUI_CTRL_INTERNAL_PROGRESS_H_ + +#include +#include "FUi_Control.h" + +namespace Tizen { namespace Ui +{ +class _AccessibilityElement; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ +class _ProgressPresenter; + + +class _OSP_EXPORT_ _Progress + : public Tizen::Ui::_Control + , virtual public Tizen::Base::Runtime::IEventListener + , virtual public Tizen::Ui::_IUiEventListener + , virtual public Tizen::Ui::_IUiEventPreviewer +{ + DECLARE_CLASS_BEGIN(_Progress, Tizen::Ui::_Control); + DECLARE_PROPERTY("value", GetPropertyValue, SetPropertyValue); + DECLARE_PROPERTY("minValue", GetPropertyMinValue, SetPropertyMinValue); + DECLARE_PROPERTY("maxValue", GetPropertyMaxValue, SetPropertyMaxValue); + DECLARE_PROPERTY("barColor", GetPropertyBarColor, SetPropertyBarColor); + DECLARE_PROPERTY("barBackgroundColor", GetPropertyBarBackgroundColor, SetPropertyBarBackgroundColor); + DECLARE_CLASS_END(); + +public: + virtual ~_Progress(void); + +public: + result SetValue(int value); + result SetRange(int minValue, int maxValue); + result SetBarColor(const Tizen::Graphics::Color& color); + result SetBarBackgroundColor(const Tizen::Graphics::Color& color); + int GetValue(void) const; + result GetRange(int& minValue, int& maxValue) const; + Tizen::Graphics::Color GetBarColor(void) const; + Tizen::Graphics::Color GetBarBackgroundColor(void) const; + int GetPercentComplete(void) const; + + result SetPropertyValue(const Tizen::Ui::Variant& value); + result SetPropertyMinValue(const Tizen::Ui::Variant& minValue); + result SetPropertyMaxValue(const Tizen::Ui::Variant& maxValue); + result SetPropertyBarColor(const Tizen::Ui::Variant& barColor); + result SetPropertyBarBackgroundColor(const Tizen::Ui::Variant& barColor); + Tizen::Ui::Variant GetPropertyValue(void) const; + Tizen::Ui::Variant GetPropertyMinValue(void) const; + Tizen::Ui::Variant GetPropertyMaxValue(void) const; + Tizen::Ui::Variant GetPropertyBarColor(void) const; + Tizen::Ui::Variant GetPropertyBarBackgroundColor(void) const; + + virtual void OnDraw(void); + virtual result OnAttachedToMainTree(void); + virtual void OnBoundsChanged(void); + static _Progress* CreateProgressN(void); + +private: + _Progress(void); + _Progress(const _Progress&); + _Progress& operator =(const _Progress&); + result InitializeAccessibilityElement(void); + +private: + _ProgressPresenter* __pProgressPresenter; + Tizen::Graphics::Color __barColor; + Tizen::Graphics::Color __barBgColor; + Tizen::Ui::_AccessibilityElement* __pAccessibilityElement; + +}; // _Progress + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_PROGRESS_H_ diff --git a/src/ui/inc/FUiCtrl_ProgressImpl.h b/src/ui/inc/FUiCtrl_ProgressImpl.h new file mode 100644 index 0000000..f7edc26 --- /dev/null +++ b/src/ui/inc/FUiCtrl_ProgressImpl.h @@ -0,0 +1,77 @@ +// +// 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_ProgressImpl.h + * @brief This is the header file for the _ProgressImpl class. + * + * This header file contains the declarations of the %_ProgressImp class. + */ +#ifndef _FUI_CTRL_INTERNAL_PROGRESS_IMPL_H_ +#define _FUI_CTRL_INTERNAL_PROGRESS_IMPL_H_ + +#include "FUi_ControlImpl.h" +#include "FUiCtrl_Progress.h" + +namespace Tizen { namespace Graphics +{ +class Dimension; +}} // Tizen::Graphics + +namespace Tizen { namespace Ui { namespace Controls +{ +class Progress; + + +class _ProgressImpl + : public Tizen::Ui::_ControlImpl +{ +public: + virtual ~_ProgressImpl(void); + +public: + result SetValue(int value); + result SetRange(int minValue, int maxValue); + int GetValue(void) const; + result GetRange(int& minValue, int& maxValue) const; + int GetPercentComplete(void) const; + result SetBarColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetBarColor(void) const; + result SetBarBackgroundColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetBarBackgroundColor(void) const; + + virtual const char* GetPublicClassName(void) const; + virtual const Progress& GetPublic(void) const; + virtual Progress& GetPublic(void); + virtual const _Progress& GetCore(void) const; + virtual _Progress& GetCore(void); + + static _ProgressImpl* CreateProgressImplN(Progress* pControl, const Tizen::Graphics::Rectangle& bounds); + static _ProgressImpl* CreateProgressImplFN(Progress* pControl, const Tizen::Graphics::FloatRectangle& bounds); + static _ProgressImpl* GetInstance(Progress& progress); + static const _ProgressImpl* GetInstance(const Progress& progress); + +private: + _ProgressImpl(Progress* pPublic, _Progress* pCore); + _ProgressImpl(const _ProgressImpl&); + _ProgressImpl& operator =(const _ProgressImpl&); + +}; // _ProgressImpl + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_PROGRESS_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_ProgressModel.h b/src/ui/inc/FUiCtrl_ProgressModel.h new file mode 100644 index 0000000..431a808 --- /dev/null +++ b/src/ui/inc/FUiCtrl_ProgressModel.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 FUiCtrl_ProgressModel.h + * @brief This is the header file for the _ProgressModel class. + * + * This header file contains the declarations of the %_ProgressModel class. + */ +#ifndef _FUI_CTRL_INTERNAL_PROGRESS_MODEL_H_ +#define _FUI_CTRL_INTERNAL_PROGRESS_MODEL_H_ + +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _ProgressModel + : public Tizen::Base::Object +{ +public: + _ProgressModel(void); + virtual ~_ProgressModel(void); + +public: + void SetValue(int value); + void SetMinValue(int minValue); + void SetMaxValue(int maxValue); + int GetValue(void) const; + int GetMinValue(void) const; + int GetMaxValue(void) const; + +private: + _ProgressModel(const _ProgressModel&); + _ProgressModel& operator =(const _ProgressModel&); + +private: + int __minValue; + int __maxValue; + int __currentValue; + +}; // _ProgressModel + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_PROGRESS_MODEL_H_ diff --git a/src/ui/inc/FUiCtrl_ProgressPopup.h b/src/ui/inc/FUiCtrl_ProgressPopup.h new file mode 100644 index 0000000..15b4843 --- /dev/null +++ b/src/ui/inc/FUiCtrl_ProgressPopup.h @@ -0,0 +1,158 @@ +// +// 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_ProgressPopup.h + * @brief This is the header file for the _ProgressPopup class. + * + * This header file contains the declarations of the %_ProgressPopup class. + */ + +#ifndef _FUI_CTRL_INTERNAL_PROGRESS_POPUP_H_ +#define _FUI_CTRL_INTERNAL_PROGRESS_POPUP_H_ + +#include +#include +#include "FUiCtrl_Popup.h" +#include "FUiCtrl_IActionEventListener.h" +#include "FUiCtrl_IProgressPopupEventListener.h" +#include "FUiCtrl_ProgressPopupEvent.h" + + +namespace Tizen { namespace Ui { namespace Controls +{ + +class Button; +class _ProgressPopupPresenter; + +/** + * @class _ProgressPopup + * @brief + * @since 2.1 + * + * + * + * + */ +class _ProgressPopup + : public _Popup + , public _IActionEventListener + , virtual public Tizen::Base::Runtime::IEventListener + , virtual public _IUiEventListener + , virtual public _IUiEventPreviewer + , virtual public Tizen::System::ISettingEventListener +{ + +//Lifecycle +public: + virtual ~_ProgressPopup(void); + +// Operations +public: + static _ProgressPopup* CreateProgressPopupN(void); + result Initialize(bool cancelButton, bool transparent, const Tizen::Graphics::FloatRectangle& animationRect); + + virtual result DoModal(int& modalResult); + + virtual void OnDraw(void); + + virtual void OnFontChanged(Tizen::Graphics::Font* pFont); + virtual void OnFontInfoRequested(unsigned long& style, float& size); + + virtual void OnActivated(void); + virtual void OnDeactivated(void); + + virtual void OnVisibleStateChanged(void); + virtual void OnChangeLayout(Tizen::Ui::_ControlOrientation orientation); + virtual void OnActionPerformed(const Tizen::Ui::_Control& source, int actionId); + virtual bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo); + + virtual void OnBoundsChanged(void); + + // Touch Event Listener + 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 void OnSettingChanged(Tizen::Base::String& key); + +public: + result AddProgressPopupEventListener(const Tizen::Ui::Controls::_IProgressPopupEventListener& listener); + + void FireProgressPopupEvent(void); + + bool HasText(void) const; + bool HasButton(void) const; + bool IsTransparent(void) const; + + virtual result SetTitleText(const Tizen::Base::String& title); + + result SetText(const Tizen::Base::String& text); + Tizen::Base::String GetText(void) const; + + result SetTextColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetTextColor(void) const; + + result UpdateBounds(void); + + float GetTotalHeight(void) const; + Tizen::Graphics::FloatRectangle GetAnimationRect(void) const; + Tizen::Graphics::FloatRectangle GetTitleBounds(void) const; + Tizen::Graphics::Bitmap* GetButtonBackgroundBitmap(void); + Tizen::Graphics::Bitmap* GetButtonBackgroundEffectBitmap(void); + + void SetButtonText(void); + void SetCancelButtonAccessibilityElement(void); + +protected: + result SetPresenter(const _ProgressPopupPresenter& ProgressPopupPresenter); + virtual _PopupPresenter* GetPresenter(void); + + virtual void InitializeAccessibilityElement(void); + +private: + _ProgressPopup(void); + + _ProgressPopup(const _ProgressPopup& rhs); + _ProgressPopup& operator =(const _ProgressPopup& rhs); + +// Attribute +private: + _ProgressPopupPresenter* __pProgressPopupPresenter; + _ProgressPopupEvent* __pProgressPopupEvent; + + Tizen::Ui::Controls::Button* __pButton; + Tizen::Graphics::Bitmap* __pComposedButtonBitmap; + Tizen::Graphics::Bitmap* __pButtonEffectBitmap; + + Tizen::Base::String __text; + Tizen::Graphics::Color __textColor; + + Tizen::Graphics::FloatRectangle __animationRect; + + bool __textState; + bool __buttonState; + bool __isTransparent; + + // Cancel button action ID + static const int ID_PROGRESS_POPUP_CANCEL_BUTTON = 701; + +}; // _ProgressPopup + + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_PROGRESS_POPUP_H_ diff --git a/src/ui/inc/FUiCtrl_ProgressPopupEvent.h b/src/ui/inc/FUiCtrl_ProgressPopupEvent.h new file mode 100644 index 0000000..72fe691 --- /dev/null +++ b/src/ui/inc/FUiCtrl_ProgressPopupEvent.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 FUiCtrl_ProgressPopupEvent.h + * @brief This is the header file for _ProgressPopupEvent class. + * + * This header file contains declaration of _ProgressPopupEvent class. + * The ProgressPopupEvent class can call listener's method. So, when event occurred, + * application can handle it appropriately. + * + */ +#ifndef _FUI_CTRL_INTERNAL_PROGRESSPOPUP_EVENT_H_ +#define _FUI_CTRL_INTERNAL_PROGRESSPOPUP_EVENT_H_ + + +#include +#include +#include + + +namespace Tizen { namespace Ui +{ +class _Control; +} } // Tizen::Ui + + +namespace Tizen { namespace Ui { namespace Controls +{ + + +class _ProgressPopupEvent + : public Tizen::Base::Runtime::_Event +{ +public: + _ProgressPopupEvent(const _Control& source); + virtual ~_ProgressPopupEvent(void); + + static _ProgressPopupEvent* CreateInstanceN(const Tizen::Ui::_Control& source); + +public: + const Tizen::Ui::_Control* GetSource(void) const; + + static Tizen::Base::Runtime::IEventArg* CreateProgressPopupEventArgN(void); + +protected: + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& pListener, const Tizen::Base::Runtime::IEventArg& arg); + +private: + _ProgressPopupEvent(const _ProgressPopupEvent& rhs); + _ProgressPopupEvent& operator=(const _ProgressPopupEvent& rhs); + +private: + const Tizen::Ui::_Control* __pSource; +}; // _ProgressPopupEvent + +}}} // Tizen::Ui::Controls + + +#endif // _FUI_CTRL_INTERNAL_PROGRESSPOPUP_EVENT_H_ diff --git a/src/ui/inc/FUiCtrl_ProgressPopupImpl.h b/src/ui/inc/FUiCtrl_ProgressPopupImpl.h new file mode 100644 index 0000000..9fb643b --- /dev/null +++ b/src/ui/inc/FUiCtrl_ProgressPopupImpl.h @@ -0,0 +1,95 @@ +// +// 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_ProgressPopupImpl.h + * @brief This is the implementation file for the _ProgressPopupImpl class. + * + * This header file contains the declarations of the %_ProgressPopupImpl class. + */ + +#ifndef _FUI_CTRL_PROGRESS_POPUP_IMPL_H_ +#define _FUI_CTRL_PROGRESS_POPUP_IMPL_H_ + +#include +#include "FUiCtrl_PopupImpl.h" +#include "FUiCtrl_ProgressPopup.h" +#include "FUiCtrl_IProgressPopupEventListener.h" +#include "FUiCtrl_PublicProgressPopupEvent.h" + + +namespace Tizen { namespace Ui { namespace Controls +{ + + +class _ProgressPopupImpl + : public _PopupImpl + , public _IProgressPopupEventListener + , virtual public Tizen::Base::Runtime::IEventListener +{ +public: + _ProgressPopupImpl(ProgressPopup* pPublic, _ProgressPopup* pCore); + virtual ~_ProgressPopupImpl(void); + + virtual const char* GetPublicClassName(void) const; + virtual const ProgressPopup& GetPublic(void) const; + virtual ProgressPopup& GetPublic(void); + virtual const _ProgressPopup& GetCore(void) const; + virtual _ProgressPopup& GetCore(void); + +public: + static _ProgressPopupImpl* CreateProgressPopupImplN(ProgressPopup* pControl); + result Initialize(bool cancelButton, bool transparent); + + result AddProgressPopupEventListener(Tizen::Ui::IProgressPopupEventListener& listener); + result RemoveProgressPopupEventListener(Tizen::Ui::IProgressPopupEventListener& listener); + + virtual result OnAttachedToMainTree(void); + virtual void OnProgressPopupCanceled(void); + virtual void OnChangeLayout(Tizen::Ui::_ControlOrientation orientation); + virtual void OnBoundsChanged(void); + +public: + virtual result SetTitleText(const Tizen::Base::String& title); + + result SetText(const Tizen::Base::String& text); + Tizen::Base::String GetText(void) const; + + result SetTextColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetTextColor(void) const; + + int GetMaxTextLength(void) const; + + Tizen::Graphics::FloatRectangle GetCenterAlignedRect(float width, float height) const; + +public: + static _ProgressPopupImpl* GetInstance(ProgressPopup& pProgressPopup); + static const _ProgressPopupImpl* GetInstance(const ProgressPopup& pProgressPopup); + +private: + _ProgressPopupImpl(const _ProgressPopupImpl& rhs); + _ProgressPopupImpl& operator =(const _ProgressPopupImpl& rhs); + +private: + _PublicProgressPopupEvent* __pPublicProgressPopupEvent; + +}; // _ProgressPopupImpl + + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_PROGRESS_POPUP_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_ProgressPopupPresenter.h b/src/ui/inc/FUiCtrl_ProgressPopupPresenter.h new file mode 100644 index 0000000..3fe2fc8 --- /dev/null +++ b/src/ui/inc/FUiCtrl_ProgressPopupPresenter.h @@ -0,0 +1,127 @@ +// +// 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_ProgressPopupPresenter.h + * @brief This is the header file for the _ProgressPopupPresenter class. + * + * This header file contains the declarations of the _ProgressPopupPresenter class. + */ + +#ifndef _FUI_CTRL_INTERNAL_PROGRESS_POPUP_PRESENTER_H_ +#define _FUI_CTRL_INTERNAL_PROGRESS_POPUP_PRESENTER_H_ + + +#include "FUiCtrl_Animation.h" +#include "FUiCtrl_PopupPresenter.h" + + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _ProgressPopup; +class _Label; +class _ScrollPanel; + + +/** + * @class _ProgressPopupPresenter + * @brief + * @since 2.0 + * + * + * + * + */ +class _ProgressPopupPresenter + : public _PopupPresenter + , public Tizen::Ui::Controls::_IAnimationEventListener + , virtual public Tizen::Base::Runtime::IEventListener +{ +// Lifecycle +public: + _ProgressPopupPresenter(void); + virtual ~_ProgressPopupPresenter(void); + +// Operations +public: + result Initialize(_ProgressPopup& ProgressPopup, bool cancelButton, bool transparent, const Tizen::Graphics::FloatRectangle& animationRect); + + void SetTitleTextObject(void); + void SetTextObject(void); + + virtual void Draw(void); + + virtual result DoModal(int& modalResult); + + float GetBodyTextHeight(void) const; + float GetBodyTextObjHeight(void) const; + + Tizen::Graphics::FloatRectangle GetButtonBounds(void); + Tizen::Graphics::FloatRectangle GetTextBounds(void) const; + + result PlayProcessAnimation(void); + result StopProcessAnimation(void); + result SetProcessAnimation(void); + result UpdateProcessAnimation(void); + + // Touch Event Listener + virtual bool OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo); + virtual bool OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo); + virtual bool OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo); + + virtual void OnAnimationStopped(const Tizen::Ui::_Control& source); + + result OnChangeLayout(_ControlOrientation orientation); + + void InitializeAccessibilityElement(void); + +private: + _ProgressPopupPresenter(const _ProgressPopupPresenter& rhs); + _ProgressPopupPresenter& operator =(const _ProgressPopupPresenter& rhs); + virtual _Popup* GetCore(void); +//Attribute +private: + _ProgressPopup* __pProgressPopup; + + Tizen::Graphics::_Text::TextObject* __pBodyTextObject; + + Tizen::Graphics::FloatRectangle __textBounds; + Tizen::Graphics::FloatRectangle __titleBgBounds; + Tizen::Graphics::FloatRectangle __buttonBgBounds; + + Tizen::Ui::Controls::_Label* __pLabel; + Tizen::Ui::Controls::_ScrollPanel* __pScrollPanel; + + _Animation* __pAnimation; + Tizen::Base::Collection::ArrayList* __pAnimationFrameList; + + float __textObjectHeight; + int __currentIndex; + + bool __buttonPressState; + bool __cancelButton; + bool __transparent; + + static const int ANIMATION_REPEAT_COUNT = 100; + +}; // _ProgressPopupPresenter + + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_PROGRESS_POPUP_PRESENTER_H_ diff --git a/src/ui/inc/FUiCtrl_ProgressPresenter.h b/src/ui/inc/FUiCtrl_ProgressPresenter.h new file mode 100644 index 0000000..7a52abd --- /dev/null +++ b/src/ui/inc/FUiCtrl_ProgressPresenter.h @@ -0,0 +1,75 @@ +/// +// 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_ProgressPresenter.h + * @brief This is the header file for the _ProgressPresenter class. + * + * This header file contains the declarations of the %_ProgressPresenter class. + */ +#ifndef _FUI_CTRL_INTERNAL_PROGRESS_PRESENTER_H_ +#define _FUI_CTRL_INTERNAL_PROGRESS_PRESENTER_H_ + +#include + +namespace Tizen { namespace Ui { namespace Controls +{ +class _Progress; +class _ProgressModel; + + +class _ProgressPresenter + : public Tizen::Base::Object +{ +public: + virtual ~_ProgressPresenter(void); + + result Draw(void); + void SetValue(int value); + void SetMinValue(int minValue); + void SetMaxValue(int maxValue); + int GetValue(void) const; + int GetMinValue(void) const; + int GetMaxValue(void) const; + int GetPercentComplete(void) const; + + static _ProgressPresenter* CreateInstanceN(const _Progress& progress); + + result LoadResource(void); + result DrawBitmap(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, Tizen::Graphics::Bitmap* pBitmap); + +private: + _ProgressPresenter(void); + _ProgressPresenter(const _ProgressPresenter&); + _ProgressPresenter& operator =(const _ProgressPresenter&); + +private: + _Progress* __pProgress; + _ProgressModel* __pProgressModel; + + Tizen::Graphics::Bitmap* __pBarResourceEffectBitmap; + Tizen::Graphics::Bitmap* __pBarBgResourceEffectBitmap; + Tizen::Graphics::Bitmap* __pBarColorReplacementBitmap; + Tizen::Graphics::Bitmap* __pBarBgColorReplacementBitmap; + + Tizen::Graphics::Color __currentBarColor; + Tizen::Graphics::Color __currentBarBgColor; +}; // _ProgressPresenter + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_PROGRESS_PRESENTER_H_ diff --git a/src/ui/inc/FUiCtrl_PublicActionEvent.h b/src/ui/inc/FUiCtrl_PublicActionEvent.h new file mode 100644 index 0000000..b9661dd --- /dev/null +++ b/src/ui/inc/FUiCtrl_PublicActionEvent.h @@ -0,0 +1,99 @@ +// +// 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_PublicActionEvent.h + * @brief This is the header file for _PublicActionEvent class. + * + * This header file contains declaration of _PublicActionEvent class. + * The PublicActionEvent class can call listener's method. So, when event occurred, + * application can handle it appropriately. + * + */ +#ifndef _FUI_CTRL_PUBLIC_ACTION_EVENT_H_ +#define _FUI_CTRL_PUBLIC_ACTION_EVENT_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui +{ +class Control; +} } // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ +/** +* @class _PublicActionEvent +* @brief This class handles a action event. It is inherited from Event class. +* +* The Window(root of all widgets) class has an instance of the _PublicActionEvent class as a member variable. +* Applications can register action event listeners through it. When a action event occurred, +* the _PublicActionEvent class finds listener and calls the appropriate listener's method. +* +*/ +class _PublicActionEvent + : public Tizen::Base::Runtime::_Event +{ +public: + /** + * This is the default class destructor. + * + */ + virtual ~_PublicActionEvent(void); + + static _PublicActionEvent* CreateInstanceN(const Tizen::Ui::Control& source); + +public: + /** + * This method returns the owner of this event. + * + * @return See the comment above. + */ + const Tizen::Ui::Control* GetSource(void) const; + +protected: + /** + * This is the default class constructor. + * + * @remarks After creating an instance of this class, you must explicitly call one of + * construction methods to initialize the instance. + * + */ + _PublicActionEvent(const Tizen::Ui::Control& source); + + /** + * This method checks the arg and finds out the type of event. After that this method calls appopriate + * listener's method. + * + * @param[in] listener It is a event listener related to this action event. + * @param[in] arg It is an argument-like instance of action event retransmitted to the listener's method + * as an argument. + * + */ + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + +public: + static Tizen::Base::Runtime::IEventArg* CreateActionEventArgN(int actionId); + +private: + const Tizen::Ui::Control* __pSource; +}; // _PublicActionEvent + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_PUBLIC_ACTION_EVENT_H_ diff --git a/src/ui/inc/FUiCtrl_PublicAdjustmentEvent.h b/src/ui/inc/FUiCtrl_PublicAdjustmentEvent.h new file mode 100644 index 0000000..0d1bdbd --- /dev/null +++ b/src/ui/inc/FUiCtrl_PublicAdjustmentEvent.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 FUiCtrl_PublicAdjustmentEvent.h + * @brief This is the header file for _PublicAdjustmentEvent class. + * + * This header file contains declaration of _PublicAdjustmentEvent class. + */ +#ifndef _FUI_CTRL_PUBLIC_ADJUSTMENT_EVENT_H_ +#define _FUI_CTRL_PUBLIC_ADJUSTMENT_EVENT_H_ + +#include +#include + +namespace Tizen { namespace Ui +{ +class Control; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _PublicAdjustmentEvent + : public Tizen::Base::Runtime::_Event +{ +public: + virtual ~_PublicAdjustmentEvent(void); + + const Tizen::Ui::Control* GetSource(void) const; + + static _PublicAdjustmentEvent* CreateInstanceN(const Tizen::Ui::Control& source); + static Tizen::Base::Runtime::IEventArg* CreateAdjustmentEventArgN(int adjustment); + +protected: + _PublicAdjustmentEvent(const Tizen::Ui::Control& source); + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + +private: + const Tizen::Ui::Control* __pSource; + +}; // _PublicAdjustmentEvent + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_PUBLIC_ADJUSTMENT_EVENT_H_ diff --git a/src/ui/inc/FUiCtrl_PublicAnimationEvent.h b/src/ui/inc/FUiCtrl_PublicAnimationEvent.h new file mode 100644 index 0000000..4460519 --- /dev/null +++ b/src/ui/inc/FUiCtrl_PublicAnimationEvent.h @@ -0,0 +1,64 @@ +// +// 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_PublicAnimationEvent.h + * @brief This is the header file for _PublicAnimationEvent class. + * + * This header file contains declaration of _PublicAnimationEvent class. + * The PublicAnimationEvent class can call listener's method. So, when event occurred, + * application can handle it appropriately. + * + */ +#ifndef _FUI_CTRL_PUBLIC_ANIMATION_EVENT_H_ +#define _FUI_CTRL_PUBLIC_ANIMATION_EVENT_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui +{ +class Control; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _PublicAnimationEvent + : public Tizen::Base::Runtime::_Event +{ +public: + virtual ~_PublicAnimationEvent(void); + + const Tizen::Ui::Control* GetSource(void) const; + + static _PublicAnimationEvent* CreateInstanceN(const Tizen::Ui::Control& source); + static Tizen::Base::Runtime::IEventArg* CreateAnimationEventArgN(void); + +protected: + _PublicAnimationEvent(const Tizen::Ui::Control& source); + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + +private: + const Tizen::Ui::Control* __pSource; + +}; // _PublicAnimationEvent + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_PUBLIC_ANIMATION_EVENT_H_ diff --git a/src/ui/inc/FUiCtrl_PublicClipboardPopupEvent.h b/src/ui/inc/FUiCtrl_PublicClipboardPopupEvent.h new file mode 100644 index 0000000..385492e --- /dev/null +++ b/src/ui/inc/FUiCtrl_PublicClipboardPopupEvent.h @@ -0,0 +1,57 @@ +// +// 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_PublicClipboardPopupEvent.h + * @brief This is the header file containing the declaration of the _PublicClipboardPopupEvent class. + * + * This header file contains the declarations of the _PublicClipboardPopupEvent class. + */ +#ifndef _FUI_CTRL_INTERNAL_PUBLIC_CLIPBOARD_POPUP_EVENT_H_ +#define _FUI_CTRL_INTERNAL_PUBLIC_CLIPBOARD_POPUP_EVENT_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui { +class ClipboardItem; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ +class _PublicClipboardPopupEvent + : public Tizen::Base::Runtime::_Event +{ +public: + static _PublicClipboardPopupEvent* CreateInstanceN(void); + static Tizen::Base::Runtime::IEventArg* CreateClipboardPopupEventArgN(const Tizen::Ui::ClipboardItem* pClipboardItem); + + virtual ~_PublicClipboardPopupEvent(void); + +protected: + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + +private: + _PublicClipboardPopupEvent(void); + + _PublicClipboardPopupEvent(const _PublicClipboardPopupEvent& rhs); + _PublicClipboardPopupEvent& operator =(const _PublicClipboardPopupEvent& rhs); +}; // _PublicClipboardPopupEvent + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_PUBLIC_CLIPBOARD_POPUP_EVENT_H_ \ No newline at end of file diff --git a/src/ui/inc/FUiCtrl_PublicColorChangeEvent.h b/src/ui/inc/FUiCtrl_PublicColorChangeEvent.h new file mode 100644 index 0000000..67cd256 --- /dev/null +++ b/src/ui/inc/FUiCtrl_PublicColorChangeEvent.h @@ -0,0 +1,104 @@ +// +// 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_PublicColorChangeEvent.h + * @brief This is the header file for _PublicColorChangeEvent class. + * + * This header file contains declaration of _PublicColorChangeEvent class. + */ +#ifndef _FUI_CTRL_INTERNAL_PUBLIC_COLOR_CHANGE_EVENT_H_ +#define _FUI_CTRL_INTERNAL_PUBLIC_COLOR_CHANGE_EVENT_H_ + +#include +#include + +namespace Tizen { namespace Graphics +{ +class Color; +}} // Tizen::Graphics + +namespace Tizen { namespace Ui +{ +class Control; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ +/** +* @class _ColorChangeEvent +* @brief This class handles a action event. It is inherited from Event class. +* +* The Window(root of all widgets) class has an instance of the ColorChangeEvent class as a member variable. +* Applications can register action event listeners through it. When a action event occurred, +* the ColorChangeEvent class finds listener and calls the appropriate listener's method. +* +*/ +class _PublicColorChangeEvent + : public Tizen::Base::Runtime::_Event +{ +public: + // + // This is the default class constructor. + // + _PublicColorChangeEvent(void); + + // + // This is the default class destructor. + // + virtual ~_PublicColorChangeEvent(void); + + // + // This method initializes this instance. This method should be called + // after this instance is constructed. + // + // @return The method returns error code. + // @param[in] source A pointer to the Object instance which contains this instance. + // @exception E_SUCCESS - This method is successful. + // @exception E_ARG_NULL - The input source is null. + // + static _PublicColorChangeEvent* CreateInstanceN(const Tizen::Ui::Control& source); + + // + // This method returns the owner of this event. + // + // @return See the comment above. + // + const Tizen::Ui::Control* GetSource(void) const; + + static Tizen::Base::Runtime::IEventArg* CreateColorChangeEventArgN(const Tizen::Graphics::Color& color); + +protected: + _PublicColorChangeEvent(const Tizen::Ui::Control& source); + + // + // This method checks the arg and finds out the type of event. After that this method calls appropriate + // listener's method. + // + // @param[in] pListener It is a event listener related to this ColorChange event. + // @param[in] arg It is an argument-like instance of ColorChange event retransmitted to the listener's method + // as an argument. + // + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + +private: + const Tizen::Ui::Control* __pSource; +}; // _PublicColorChangeEvent + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_PUBLIC_COLOR_CHANGE_EVENT_H_ diff --git a/src/ui/inc/FUiCtrl_PublicDateTimeChangeEvent.h b/src/ui/inc/FUiCtrl_PublicDateTimeChangeEvent.h new file mode 100644 index 0000000..2d1b90a --- /dev/null +++ b/src/ui/inc/FUiCtrl_PublicDateTimeChangeEvent.h @@ -0,0 +1,157 @@ +// +// 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_PublicDateTimeChangeEvent.h + * @brief This is the header file for the _PublicDateTimeChangeEvent and _PublicDateTimeChangeEventArg classes. + */ + +#ifndef _FUI_CTRL_INTERNAL_PUBLIC_DATETIME_CHANGE_EVENT_H_ +#define _FUI_CTRL_INTERNAL_PUBLIC_DATETIME_CHANGE_EVENT_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui +{ +class Control; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ +enum DateTimePublicChangeStatus +{ + DATE_PUBLIC_CHANGE_SAVED, + DATE_PUBLIC_CHANGE_CANCELED, + DATETIME_PUBLIC_CHANGE_SAVED, + DATETIME_PUBLIC_CHANGE_CANCELED, + TIME_PUBLIC_CHANGE_SAVED, + TIME_PUBLIC_CHANGE_CANCELED +}; + +class _PublicDateTimeChangeEventArg + : public Tizen::Base::Runtime::IEventArg + , public Tizen::Base::Object +{ +public: + /** + * This is the default class constructor. + * + * @param[in] source - A pointer to the Object instance which contains this instance. + */ + _PublicDateTimeChangeEventArg(DateTimePublicChangeStatus status); + + /** + * This is the class destructor. + */ + ~_PublicDateTimeChangeEventArg(void); + + int GetYear(void) const; + + int GetMonth(void) const; + + int GetDay(void) const; + + int GetHour(void) const; + + int GetMinute(void) const; + + Tizen::Base::DateTime GetDateTime(void) const; + + void SetDateTime(const Tizen::Base::DateTime& dateTime); + + void SetTime(int hour, int minute); + + void SetDate(int year, int month, int day); + + DateTimePublicChangeStatus GetStatus(void) const; + +private: + // Attributes + DateTimePublicChangeStatus __status; + + int __year; + int __month; + int __day; + int __hour; + int __minute; + + Tizen::Base::DateTime __dateTime1; + +}; // _PublicDateTimeChangeEventArg + +/**l +* @class _PublicDateTimeChangeEvent +* @brief This class handle a Date change event. +*/ + +class _PublicDateTimeChangeEvent + : public Tizen::Base::Runtime::_Event +{ +public: + static Tizen::Base::Runtime::IEventArg* CreateDateTimeChangeEventArgN(DateTimePublicChangeStatus status); + + /** + * This is the default class constructor. After creating an instance of this + * class, you must explicitly call one of construction methods to initialize + * the instance. + */ + _PublicDateTimeChangeEvent(const Tizen::Ui::Control& source); + + /** + * This is the class destructor. + */ + virtual ~_PublicDateTimeChangeEvent(void); + + // Accessors + /** + * This method returns the owner of this event. + * + * @return See the comment above. + */ + const Tizen::Ui::Control* GetSource(void) const; + + + // Operations +protected: + /** + * This method checks the arg and finds out the type of event. After that this method calls appopriate + * pListener's method. + * + * @return This method returns a result code. + * @param[in] pListener It is a event listener related to this item event. + * @param[in] arg It is an argument-like instance of item event retransmitted to the listener's method + * as an argument. + * @exception E_SUCCESS - The method is successful. + * @exception E_ARG_NULL - The listener is null. + * @exception E_INVALID_ARG - The argument passed to a method contains an invalid value.@n + *   The pListener is not the instance of IItemEventListener class or + * the pItemEventArg is not the instance of __FlashEventArg class. + * + */ + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + + // Attributes +private: + Tizen::Ui::Control* __pSource; +}; // _PublicDateTimeChangeEvent + + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_PUBLIC_DATETIME_CHANGE_EVENT_H_ diff --git a/src/ui/inc/FUiCtrl_PublicExpandableEditAreaEvent.h b/src/ui/inc/FUiCtrl_PublicExpandableEditAreaEvent.h new file mode 100644 index 0000000..f779fd4 --- /dev/null +++ b/src/ui/inc/FUiCtrl_PublicExpandableEditAreaEvent.h @@ -0,0 +1,117 @@ +// +// 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_PublicExpandableEditAreaEvent.h + * @brief This is the header file for _PublicExpandableEditAreaEvent class. + * @version 1.0 + * + * This header file contains declaration of _PublicExpandableEditAreaEvent class. + * The PublicExpandableEditAreaEvent class can call listener's method. So, when event occurred, + * application can handle it appropriately. + * + */ +#ifndef _FUICTRL_PUBLIC_EXPANDABLE_EDITAREA_EVENT_H_ +#define _FUICTRL_PUBLIC_EXPANDABLE_EDITAREA_EVENT_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui +{ +class Control; +} } // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ + +enum ExpandableEditAreaEventStatus +{ + EXPANDABLE_EDITAREA_EVENT_ADDED = 0, + EXPANDABLE_EDITAREA_EVENT_REMOVED +// EXPANDABLE_EDITAREA_EVENT_TOKEN_SELECTED +}; + +/** +* @class _PublicExpandableEditAreaEvent +* @brief This class handles a action event. It is inherited from Event class. +* +* The Window(root of all widgets) class has an instance of the _PublicExpandableEditAreaEvent class as a member variable. +* Applications can register action event listeners through it. When a action event occurred, +* the _PublicExpandableEditAreaEvent class finds listener and calls the appropriate listener's method. +* +*/ +class _PublicExpandableEditAreaEvent + : public Tizen::Base::Runtime::_Event +{ +// Lifecycle +public: + /** + * This is the default class destructor. + * + */ + virtual ~_PublicExpandableEditAreaEvent(void); + + static _PublicExpandableEditAreaEvent* CreateInstanceN(const Tizen::Ui::Control& source); + +// Accessors +public: + /** + * This method returns the owner of this event. + * + * @return See the comment above. + */ + const Tizen::Ui::Control* GetSource(void) const; + +// Operations +protected: + /** + * This is the default class constructor. + * + * @remarks After creating an instance of this class, you must explicitly call one of + * construction methods to initialize the instance. + * + */ + _PublicExpandableEditAreaEvent(const Tizen::Ui::Control& source); + + /** + * This method checks the arg and finds out the type of event. After that this method calls appopriate + * pListener's method. + * + * @param[in] listener It is a event listener related to this action event. + * @param[in] arg It is an argument-like instance of action event retransmitted to the listener's method + * as an argument. + * @exception E_SUCCESS - The method is successful. + * @exception E_ARG_NULL - The listener is null. + * @exception E_INVALID_ARG - The argument passed to a method contains an invalid value.@n + *   The pListener is not the instance of IExpandableEditAreaEventListener class or + * the p__ExpandableEditAreaEventArg is not the instance of _ExpandableEditAreaEventArg class. + * + */ + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + +public: + static Tizen::Base::Runtime::IEventArg* CreateExpandableEditAreaEventArgN(ExpandableEditAreaEventStatus status, int newLineCount = 0); + +//Attributess +private: + const Tizen::Ui::Control* __pSource; +}; // _PublicExpandableEditAreaEvent + +}}} // Tizen::Ui::Controls + +#endif // _FUICTRL_PUBLIC_EXPANDABLE_EDITAREA_EVENT_H_ diff --git a/src/ui/inc/FUiCtrl_PublicFrameEvent.h b/src/ui/inc/FUiCtrl_PublicFrameEvent.h new file mode 100644 index 0000000..087c537 --- /dev/null +++ b/src/ui/inc/FUiCtrl_PublicFrameEvent.h @@ -0,0 +1,112 @@ +// +// 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_PublicFrameEvent.h + * @brief This is the header file for _PublicFrameEvent class. + * @version 1.0 + * + * This header file contains declaration of _PublicFrameEvent class. + * The _PublicFrameEvent class can call listener's method. So, when event occurred, + * application can handle it appropriately. + * + */ +#ifndef _FUI_CTRL_INTERNAL_PUBLIC_FRAME_EVENT_H_ +#define _FUI_CTRL_INTERNAL_PUBLIC_FRAME_EVENT_H_ + +#include +#include +#include "FBaseRt_Event.h" + +namespace Tizen { namespace Ui { namespace Controls +{ +/** + * A constant that indicates that Frame is about to be destroyed. + */ +static const int FRAME_STATE_TERMINATING = 0x08; +static const int FRAME_STATE_ACTIVATED = 0x10; +static const int FRAME_STATE_DEACTIVATED = 0x20; +static const int FRAME_STATE_MINIMIZED = 0x40; +static const int FRAME_STATE_RESTORED = 0x80; + +class Frame; + +/** + * @class _PublicFrameEvent + * @brief This class handles a frame event. It is inherited from Event class. + * + * The Frame class has an instance of the _PublicFrameEvent class as a member variable. + * Applications can register frame event listeners through it. When a frame lifecycle event occurs, + * the _PublicFrameEvent class finds listener and calls the appropriate listener's method. + */ +class _PublicFrameEvent + : public Tizen::Base::Runtime::_Event +{ +public: +// Lifecycle + static _PublicFrameEvent* CreateInstanceN(const Frame& source); + static Tizen::Base::Runtime::IEventArg* CreateFrameEventArgN(const Frame& source, int frameState); + + /** + * This is the class destructor. + * + */ + virtual ~_PublicFrameEvent(void); + +// Accessor + /** + * This method returns the owner of this event. + * + * @return See the comment above. + */ + const Frame* GetSource(void) const; + +protected: +// Operation + /** + * This method is Implemented to call the corresponding event listener's method. + * + * @return The method returns the error code + * @param[in] pListener The eventListener instance which is currently processing + * @param[in] arg The event argument that is fired + * @return The method returns error code. + * @exception E_SUCCESS - This method is successful. + * @exception E_INVALID_ARG - The argument passed to a method contains an invalid value. + * @exception E_ARG_NULL - The pointer passed to a method contains a @c null reference. + * @exception E_UNKNOWN - An undetermined error has occurred during operation. + * + */ + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + +private: +// Lifecycle + /** + * This is the default class constructor. + * + * @remarks After creating an instance of this class, you must explicitly call one of + * construction methods to initialize the instance. + * + */ + _PublicFrameEvent(const Frame& source); + +private: +// Attribute + const Frame* __pSource; +}; // _PublicFrameEvent + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_PUBLIC_FRAME_EVENT_H_ diff --git a/src/ui/inc/FUiCtrl_PublicKeypadEvent.h b/src/ui/inc/FUiCtrl_PublicKeypadEvent.h new file mode 100644 index 0000000..ef9d0d2 --- /dev/null +++ b/src/ui/inc/FUiCtrl_PublicKeypadEvent.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 FUiCtrl_PublicKeypadEvent.h +* @brief This is the header file for _PublicKeypadEvent class. +* +* This header file contains declaration of _PublicKeypadEvent class. +*/ + +#ifndef _FUI_CTRL_INTERNAL_PUBLIC_KEYPAD_EVENT_H_ +#define _FUI_CTRL_INTERNAL_PUBLIC_KEYPAD_EVENT_H_ + +#include +#include +#include +#include + +namespace Tizen { namespace Ui +{ +class Control; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ + +enum KeypadEventStatus +{ + KEYPAD_EVENT_STATUS_CREATED, + KEYPAD_EVENT_STATUS_OPEN, + KEYPAD_EVENT_STATUS_CLOSE, + KEYPAD_EVENT_STATUS_BOUNDS_CHANGED, + KEYPAD_EVENT_STATUS_ENTERACTION +}; + +/** +* @class _PublicKeypadEvent +* @brief This class handles a keypad event event. It is inherited from Event class. +* +*/ +class _PublicKeypadEvent + : public Tizen::Base::Runtime::_Event +{ +// Lifecycle +public: + /** + * This is the default class destructor. + * + */ + virtual ~_PublicKeypadEvent(void); + + static _PublicKeypadEvent* CreateInstanceN(const Tizen::Ui::Control& source); + +// Accessors + /** + * This method returns the owner of this event. + * + * @return See the comment above. + */ + const Tizen::Ui::Control* GetSource(void) const; + + static Tizen::Base::Runtime::IEventArg* CreateKeypadEventArgN(const Tizen::Ui::Control& source, Tizen::Ui::KeypadAction actionId, Tizen::Ui::Controls::KeypadEventStatus status); + + // Operations +protected: + /** + * This is the default class constructor. + * + * @remarks After creating an instance of this class, you must explicitly call one of + * construction methods to initialize the instance. + * + */ + _PublicKeypadEvent(const Tizen::Ui::Control& source); + + /** + * This method checks the arg and finds out the type of event. After that this method calls appopriate + * pListener's method. + * + * @param[in] listener It is a event listener related to this item event. + * @param[in] arg It is an argument-like instance of item event retransmitted to the listener's method + * as an argument. + * @exception E_SUCCESS - The method is successful. + * @exception E_ARG_NULL - The listener is null. + * @exception E_INVALID_ARG - The argument passed to a method contains an invalid value.@n + *   The pListener is not the instance of IItemEventListener class or + * the pItemEventArg is not the instance of _CustomItemEventArg class. + * + */ + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + + //Attributess +private: + const Tizen::Ui::Control* __pSource; +}; // _PublicKeypadEvent + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_PUBLIC_KEYPAD_EVENT_H_ diff --git a/src/ui/inc/FUiCtrl_PublicLanguageEvent.h b/src/ui/inc/FUiCtrl_PublicLanguageEvent.h new file mode 100644 index 0000000..2348416 --- /dev/null +++ b/src/ui/inc/FUiCtrl_PublicLanguageEvent.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 FUiCtrl_PublicLanguageEvent.h + * @brief This is the header file for _LanguageEvent class. + * @version 2.0 + * + * This header file contains declaration of _LanguageEvent class. + */ + +#ifndef _FUI_CTRL_INTERNAL_PUBLIC_LANGUAGE_EVENT_H_ +#define _FUI_CTRL_INTERNAL_PUBLIC_LANGUAGE_EVENT_H_ + +#include +#include +#include +#include + +namespace Tizen { namespace Ui +{ +class Control; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ +/** + * @class _PublicLanguageEvent + * @brief This class handles a _PublicLanguageEvent event. It is inherited from LowLevelEvent class. + * + * _LanguageEvent notifies the listeners when a Keypad language is changed. + * + * @since 2.0 + */ +class _PublicLanguageEvent + : public Tizen::Base::Runtime::_Event +{ +// Lifecycle +public: + /** + * This is the class destructor. + */ + virtual ~_PublicLanguageEvent(); + + static _PublicLanguageEvent* CreateInstanceN(const Tizen::Ui::Control& source); + +// Accessors + /** + * This method returns the owner of this event. + * + * @return See the comment above. + */ + const Tizen::Ui::Control* GetSource(void) const; + + static Tizen::Base::Runtime::IEventArg* CreateLanguageEventArgN(const Tizen::Ui::Control& source, Tizen::Locales::LanguageCode prevLanguageCode, Tizen::Locales::LanguageCode currentLanguageCode); + +protected: + /** + * This is the default class constructor. After creating an instance of this + * class, you must explicitly call one of construction methods to initialize + * the instance. + */ + _PublicLanguageEvent(const Tizen::Ui::Control& source); + + /** + * This method calls appropriate IKeyEventListener method. + * + * @param[in] listener The IKeyEventListener instance. + * @param[in] arg The _FocusEventArg. + * @exception E_SUCCESS - The method is successful. + * @exception E_INVALID_ARG - The argument passed to a method contains an invalid value. + * @exception E_INVALID_ARG - @c pListener is @c null. + */ + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + +private: + const Tizen::Ui::Control* __pSource; + +}; // _PublicLanguageEvent + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_PUBLIC_LANGUAGE_EVENT_H_ diff --git a/src/ui/inc/FUiCtrl_PublicLinkEvent.h b/src/ui/inc/FUiCtrl_PublicLinkEvent.h new file mode 100644 index 0000000..ddf777a --- /dev/null +++ b/src/ui/inc/FUiCtrl_PublicLinkEvent.h @@ -0,0 +1,103 @@ +// +// 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_PublicLinkEvent.h +* @brief This is the header file for _PublicLinkEvent class. +* +* This header file contains declaration of _PublicLinkEvent class. +* +*/ + +#ifndef _FUI_CTRL_PUBLIC_LINK_EVENT_H_ +#define _FUI_CTRL_PUBLIC_LINK_EVENT_H_ + +#include +#include +#include +#include + +namespace Tizen { namespace Ui +{ +class Control; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** +* @class _PublicLinkEvent +* @brief This class handles a keypad event event. It is inherited from Event class. +* +*/ +class _PublicLinkEvent + : public Tizen::Base::Runtime::_Event +{ +// Lifecycle +public: + /** + * This is the default class destructor. + * + */ + virtual ~_PublicLinkEvent(void); + + static _PublicLinkEvent* CreateInstanceN(const Tizen::Ui::Control& source); + +// Accessors + /** + * This method returns the owner of this event. + * + * @return See the comment above. + */ + const Tizen::Ui::Control* GetSource(void) const; + + static Tizen::Base::Runtime::IEventArg* CreateLinkEventArgN(Tizen::Base::String text, Tizen::Base::Utility::LinkType linkType, Tizen::Base::String link); + + // Operations +protected: + /** + * This is the default class constructor. + * + * @remarks After creating an instance of this class, you must explicitly call one of + * construction methods to initialize the instance. + * + */ + _PublicLinkEvent(const Tizen::Ui::Control& source); + + /** + * This method checks the arg and finds out the type of event. After that this method calls appopriate + * pListener's method. + * + * @param[in] listener It is a event listener related to this item event. + * @param[in] arg It is an argument-like instance of item event retransmitted to the listener's method + * as an argument. + * @exception E_SUCCESS - The method is successful. + * @exception E_ARG_NULL - The listener is null. + * @exception E_INVALID_ARG - The argument passed to a method contains an invalid value.@n + *   The pListener is not the instance of IItemEventListener class or + * the pItemEventArg is not the instance of _CustomItemEventArg class. + * + */ + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + + //Attributess +private: + const Tizen::Ui::Control* __pSource; +}; // _PublicLinkEvent + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_PUBLIC_LINK_EVENT_H_ diff --git a/src/ui/inc/FUiCtrl_PublicProgressPopupEvent.h b/src/ui/inc/FUiCtrl_PublicProgressPopupEvent.h new file mode 100644 index 0000000..a69901a --- /dev/null +++ b/src/ui/inc/FUiCtrl_PublicProgressPopupEvent.h @@ -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 FUiCtrl_PublicProgressPopupEvent.h + * @brief This is the header file for _PublicProgressPopupEvent class. + * + * This header file contains declaration of _PublicProgressPopupEvent class. + * The PublicActionEvent class can call listener's method. So, when event occurred, + * application can handle it appropriately. + * + */ +#ifndef _FUI_CTRL_PUBLIC_PROGRESSPOPUP_EVENT_H_ +#define _FUI_CTRL_PUBLIC_PROGRESSPOPUP_EVENT_H_ + + +#include +#include +#include + + +namespace Tizen { namespace Ui +{ +class Control; +}} // Tizen::Ui + + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** +* @class _PublicProgressPopupEvent +* @brief This class handles a ProgressPopup event. It is inherited from Event class. +* +* The Window(root of all widgets) class has an instance of the _PublicProgressPopupEvent class as a member variable. +* Applications can register ProgressPopup event listeners through it. When a ProgressPopup event occurred, +* the _PublicProgressPopupEvent class finds listener and calls the appropriate listener's method. +* +*/ +class _PublicProgressPopupEvent + : public Tizen::Base::Runtime::_Event +{ +public: + _PublicProgressPopupEvent(const Tizen::Ui::Control& source); + virtual ~_PublicProgressPopupEvent(void); + + static _PublicProgressPopupEvent* CreateInstanceN(const Tizen::Ui::Control& source); + +public: + const Tizen::Ui::Control* GetSource(void) const; + + static Tizen::Base::Runtime::IEventArg* CreateProgressPopupEventArgN(void); + +protected: + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& pListener, const Tizen::Base::Runtime::IEventArg& arg); + +private: + _PublicProgressPopupEvent(const _PublicProgressPopupEvent& rhs); + _PublicProgressPopupEvent& operator=(const _PublicProgressPopupEvent& rhs); + +private: + const Tizen::Ui::Control* __pSource; +}; // _PublicProgressPopupEvent + +}}} // Tizen::Ui::Controls + + +#endif // _FUI_CTRL_PUBLIC_PROGRESSPOPUP_EVENT_H_ diff --git a/src/ui/inc/FUiCtrl_PublicScrollPanelEvent.h b/src/ui/inc/FUiCtrl_PublicScrollPanelEvent.h new file mode 100644 index 0000000..6aebac5 --- /dev/null +++ b/src/ui/inc/FUiCtrl_PublicScrollPanelEvent.h @@ -0,0 +1,116 @@ +// +// 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_PublicScrollPanelEvent.h +* @brief This is the header file for _PublicScrollPanelEvent class. +* +* This header file contains declaration of _PublicScrollPanelEvent class. +* +*/ + +#ifndef _FUI_CTRL_INTERNAL_PUBLIC_SCROLLPANEL_EVENT_H_ +#define _FUI_CTRL_INTERNAL_PUBLIC_SCROLLPANEL_EVENT_H_ + +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** +* @enum ScrollPanelStatus +* Defines constants used to identify ScrollPanel's Overlay status. @n +* This is used for overlay keypad support. +* +* @since 2.0 +*/ +enum ScrollPanelStatus +{ + OVERLAY_CONTROL_CREATED, /**< An overlay keypad created on top of ScrollPanel */ + OVERLAY_CONTROL_OPENED, /**< An overlay keypad opened on top of ScrollPanel */ + OVERLAY_CONTROL_CLOSED, /**< An overlay keypad closed */ + OTHER_CONTROL_SELECTED /**< Another control in the ScrollPanel is selected */ +}; + +/** +* @class _PublicScrollPanelEvent +* @brief This class handles a text Block event event. It is inherited from Event class. +* +*/ +class _PublicScrollPanelEvent + : public Tizen::Base::Runtime::_Event +{ +// Lifecycle +public: + /** + * This is the default class destructor. + * + */ + virtual ~_PublicScrollPanelEvent(void); + + static _PublicScrollPanelEvent* CreateInstanceN(const Tizen::Ui::Control& source); + +// Accessors +public: + /** + * This method returns the owner of this event. + * + * @return See the comment above. + */ + const Tizen::Ui::Control* GetSource(void) const; + + // Operations +protected: + /** + * This is the default class constructor. + * + * @remarks After creating an instance of this class, you must explicitly call one of + * construction methods to initialize the instance. + * + */ + _PublicScrollPanelEvent(const Tizen::Ui::Control& source); + + /** + * This method checks the arg and finds out the type of event. After that this method calls appopriate + * pListener's method. + * + * @param[in] listener It is a event listener related to this item event. + * @param[in] arg It is an argument-like instance of item event retransmitted to the listener's method + * as an argument. + * @exception E_SUCCESS - The method is successful. + * @exception E_ARG_NULL - The listener is null. + * @exception E_INVALID_ARG - The argument passed to a method contains an invalid value.@n + *   The pListener is not the instance of IItemEventListener class or + * the pItemEventArg is not the instance of _CustomItemEventArg class. + * + */ + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + +public: + static Tizen::Base::Runtime::IEventArg* CreateScrollPanelEventArgN(ScrollPanelStatus status); + + //Attributess +private: + const Tizen::Ui::Control* __pSource; +}; // _PublicScrollPanelEvent + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_PUBLIC_SCROLLPANEL_EVENT_H_ diff --git a/src/ui/inc/FUiCtrl_PublicSearchBarEvent.h b/src/ui/inc/FUiCtrl_PublicSearchBarEvent.h new file mode 100644 index 0000000..c025350 --- /dev/null +++ b/src/ui/inc/FUiCtrl_PublicSearchBarEvent.h @@ -0,0 +1,114 @@ +// +// 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_PublicSearchBarEvent.h + * @brief This is the header file for _PublicSearchBarEvent class. + * @version 1.0 + * + * This header file contains declaration of _PublicSearchBarEvent class. + * The PublicActionEvent class can call listener's method. So, when event occurred, + * application can handle it appropriately. + * + */ +#ifndef _FUI_CTRL_INTERNAL_PUBLIC_SEARCH_BAR_EVENT_H_ +#define _FUI_CTRL_INTERNAL_PUBLIC_SEARCH_BAR_EVENT_H_ + +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +class SearchBar; + +enum SearchBarEventStatus +{ + SEARCH_BAR_EVENT_MODE_CHANGE = 0, + SEARCH_BAR_EVENT_CONTENT_AREA_RESIZE +}; + +/** +* @class _PublicSearchBarEvent +* @brief This class handles a action event. It is inherited from Event class. +* +* The Window(root of all widgets) class has an instance of the _PublicSearchBarEvent class as a member variable. +* Applications can register action event listeners through it. When a action event occurred, +* the _PublicSearchBarEvent class finds listener and calls the appropriate listener's method. +* +*/ +class _PublicSearchBarEvent + : public Tizen::Base::Runtime::_Event +{ +// Lifecycle +public: + /** + * This is the default class destructor. + * + */ + virtual ~_PublicSearchBarEvent(void); + + static _PublicSearchBarEvent* CreateInstanceN(const SearchBar& source); + +// Accessors + /** + * This method returns the owner of this event. + * + * @return See the comment above. + */ + const SearchBar* GetSource(void) const; + + static Tizen::Base::Runtime::IEventArg* CreateSearchBarEventArgN(SearchBarEventStatus status); + +// Operations +protected: + /** + * This is the default class constructor. + * + * @remarks After creating an instance of this class, you must explicitly call one of + * construction methods to initialize the instance. + * + */ + _PublicSearchBarEvent(const SearchBar& source); + + /** + * This method checks the arg and finds out the type of event. After that this method calls appopriate + * pListener's method. + * + * @param[in] listener It is a event listener related to this action event. + * @param[in] arg It is an argument-like instance of action event retransmitted to the listener's method + * as an argument. + * @exception E_SUCCESS - The method is successful. + * @exception E_ARG_NULL - The listener is null. + * @exception E_INVALID_ARG - The argument passed to a method contains an invalid value.@n + *   The pListener is not the instance of IActionEventListener class or + * the p__ActionEventArg is not the instance of _ActionEventArg class. + * + */ + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + +//Attributess +private: + const SearchBar* __pSource; + +}; // _PublicSearchBarEvent + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_PUBLIC_SEARCH_BAR_EVENT_H_ diff --git a/src/ui/inc/FUiCtrl_PublicSliderEvent.h b/src/ui/inc/FUiCtrl_PublicSliderEvent.h new file mode 100644 index 0000000..3d1b74e --- /dev/null +++ b/src/ui/inc/FUiCtrl_PublicSliderEvent.h @@ -0,0 +1,57 @@ +// +// 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_PublicSliderEvent.h + * @brief This is the header file for _PublicSliderEvent class. + * + * This header file contains declaration of _PublicSliderEvent class. + */ +#ifndef _FUI_CTRL_PUBLIC_SLIDER_EVENT_H_ +#define _FUI_CTRL_PUBLIC_SLIDER_EVENT_H_ + +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ +class Slider; + + +class _PublicSliderEvent + : public Tizen::Base::Runtime::_Event +{ +public: + virtual ~_PublicSliderEvent(void); + + const Slider* GetSource(void) const; + + static _PublicSliderEvent* CreateInstanceN(const Slider& source); + static Tizen::Base::Runtime::IEventArg* CreateSliderEventArgN(int value); + +protected: + _PublicSliderEvent(const Slider& source); + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + +private: + Slider* __pSource; + +}; // _PublicSliderEvent + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_PUBLIC_SLIDER_EVENT_H_ diff --git a/src/ui/inc/FUiCtrl_PublicSplitPanelEvent.h b/src/ui/inc/FUiCtrl_PublicSplitPanelEvent.h new file mode 100644 index 0000000..dc331d5 --- /dev/null +++ b/src/ui/inc/FUiCtrl_PublicSplitPanelEvent.h @@ -0,0 +1,112 @@ +// +// 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_PublicSplitPanelEvent.h +* @brief This is the header file for _PublicSplitPanelEvent class. +* +* This header file contains declaration of _PublicSplitPanelEvent class. +* +*/ + +#ifndef _FUI_CTRL_INTERNAL_PUBLIC_SPLIT_PANEL_EVENT_H_ +#define _FUI_CTRL_INTERNAL_PUBLIC_SPLIT_PANEL_EVENT_H_ + +#include +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +class SplitPanel; + +enum SplitPanelEventStatus +{ + SPLIT_PANEL_EVENT_DIVIDER_POSITION_CHANGE = 0, + SPLIT_PANEL_EVENT_DIVIDER_DOUBLE_PRESSED +}; + +/** +* @class _PublicSplitPanelEvent +* @brief This class handles a text Block event event. It is inherited from Event class. +* +*/ +class _PublicSplitPanelEvent + : public Tizen::Base::Runtime::_Event +{ +// Lifecycle +public: + /** + * This is the default class destructor. + * + */ + virtual ~_PublicSplitPanelEvent(void); + + static _PublicSplitPanelEvent* CreateInstanceN(const SplitPanel& source); + +// Accessors +public: + /** + * This method returns the owner of this event. + * + * @return See the comment above. + */ + const SplitPanel* GetSource(void) const; + + // Operations +protected: + /** + * This is the default class constructor. + * + * @remarks After creating an instance of this class, you must explicitly call one of + * construction methods to initialize the instance. + * + */ + _PublicSplitPanelEvent(const SplitPanel& source); + + /** + * This method checks the arg and finds out the type of event. After that this method calls appopriate + * pListener's method. + * + * @return This method returns a result code. + * @param[in] pListener It is a event listener related to this item event. + * @param[in] arg It is an argument-like instance of item event retransmitted to the listener's method + * as an argument. + * @exception E_SUCCESS - The method is successful. + * @exception E_ARG_NULL - The listener is null. + * @exception E_INVALID_ARG - The argument passed to a method contains an invalid value.@n + *   The pListener is not the instance of IItemEventListener class or + * the pItemEventArg is not the instance of _CustomItemEventArg class. + * + */ + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + +public: + static Tizen::Base::Runtime::IEventArg* CreateSplitPanelEventArgN(SplitPanelEventStatus status); + + //Attributess +private: + const SplitPanel* __pSource; +}; // _PublicSplitPanelEvent + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_PUBLIC_SPLIT_PANEL_EVENT_H_ diff --git a/src/ui/inc/FUiCtrl_PublicTextBlockEvent.h b/src/ui/inc/FUiCtrl_PublicTextBlockEvent.h new file mode 100644 index 0000000..b4dd462 --- /dev/null +++ b/src/ui/inc/FUiCtrl_PublicTextBlockEvent.h @@ -0,0 +1,104 @@ +// +// 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_PublicTextBlockEvent.h +* @brief This is the header file for _PublicTextBlockEvent class. +* +* This header file contains declaration of _TextBlockEvent class. +*/ + +#ifndef _FUI_CTRL_INTERNAL_PUBLIC_TEXT_BLOCK_EVENT_H_ +#define _FUI_CTRL_INTERNAL_PUBLIC_TEXT_BLOCK_EVENT_H_ + +#include +#include +#include +#include + +namespace Tizen { namespace Ui +{ +class Control; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ +/** +* @class _PublicTextBlockEvent +* @brief This class handles a text Block event event. It is inherited from Event class. +* +*/ +class _PublicTextBlockEvent + : public Tizen::Base::Runtime::_Event +{ +// Lifecycle +public: + /** + * This is the default class destructor. + * + */ + virtual ~_PublicTextBlockEvent(void); + + static _PublicTextBlockEvent* CreateInstanceN(const Tizen::Ui::Control& source); + +// Accessors +public: + /** + * This method returns the owner of this event. + * + * @return See the comment above. + */ + const Tizen::Ui::Control* GetSource(void) const; + + // Operations +protected: + /** + * This is the default class constructor. + * + * @remarks After creating an instance of this class, you must explicitly call one of + * construction methods to initialize the instance. + * + */ + _PublicTextBlockEvent(const Tizen::Ui::Control& source); + + /** + * This method checks the arg and finds out the type of event. After that this method calls appopriate + * pListener's method. + * + * @param[in] listener It is a event listener related to this item event. + * @param[in] arg It is an argument-like instance of item event retransmitted to the listener's method + * as an argument. + * @exception E_SUCCESS - The method is successful. + * @exception E_ARG_NULL - The listener is null. + * @exception E_INVALID_ARG - The argument passed to a method contains an invalid value.@n + *   The pListener is not the instance of IItemEventListener class or + * the pItemEventArg is not the instance of _CustomItemEventArg class. + * + */ + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + +public: + static Tizen::Base::Runtime::IEventArg* CreateTextBlockEventArgN(int start, int end); + + //Attributess +private: + const Tizen::Ui::Control* __pSource; +}; // _PublicTextBlockEvent + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_PUBLIC_TEXT_BLOCK_EVENT_H_ diff --git a/src/ui/inc/FUiCtrl_PublicTextEvent.h b/src/ui/inc/FUiCtrl_PublicTextEvent.h new file mode 100644 index 0000000..40bf8fb --- /dev/null +++ b/src/ui/inc/FUiCtrl_PublicTextEvent.h @@ -0,0 +1,114 @@ +// +// 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_PublicTextEvent.h + * @brief This is the header file for _PublicTextEvent class. + * + * This header file contains declaration of _PublicTextEvent class. + * The PublicTextEvent class can call listener's method. So, when event occurred, + * application can handle it appropriately. + * + */ +#ifndef _FUI_CTRL_INTERNAL_PUBLIC_TEXT_EVENT_H_ +#define _FUI_CTRL_INTERNAL_PUBLIC_TEXT_EVENT_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui +{ +class Control; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ + +enum TextEventStatus +{ + TEXT_EVENT_CHANGED, + TEXT_EVENT_CANCELED +}; + +/** +* @class _PublicTextEvent +* @brief This class handles a action event. It is inherited from Event class. +* +* The Window(root of all widgets) class has an instance of the _PublicTextEvent class as a member variable. +* Applications can register action event listeners through it. When a action event occurred, +* the _PublicTextEvent class finds listener and calls the appropriate listener's method. +* +*/ +class _PublicTextEvent + : public Tizen::Base::Runtime::_Event +{ +// Lifecycle +public: + /** + * This is the default class destructor. + * + */ + virtual ~_PublicTextEvent(void); + + static _PublicTextEvent* CreateInstanceN(const Tizen::Ui::Control& source); + +// Accessors + /** + * This method returns the owner of this event. + * + * @return See the comment above. + */ + const Tizen::Ui::Control* GetSource(void) const; + + static Tizen::Base::Runtime::IEventArg* CreateTextEventArgN(TextEventStatus status); + +// Operations +protected: + /** + * This is the default class constructor. + * + * @remarks After creating an instance of this class, you must explicitly call one of + * construction methods to initialize the instance. + * + */ + _PublicTextEvent(const Tizen::Ui::Control& source); + + /** + * This method checks the arg and finds out the type of event. After that this method calls appopriate + * pListener's method. + * + * @param[in] listener It is a event listener related to this action event. + * @param[in] arg It is an argument-like instance of action event retransmitted to the listener's method + * as an argument. + * @exception E_SUCCESS - The method is successful. + * @exception E_ARG_NULL - The listener is null. + * @exception E_INVALID_ARG - The argument passed to a method contains an invalid value.@n + *   The pListener is not the instance of ITextEventListener class or + * the p__TextEventArg is not the instance of _TextEventArg class. + * + */ + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + +//Attributess +private: + const Tizen::Ui::Control* __pSource; +}; // _PublicTextEvent + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_PUBLIC_TEXT_EVENT_H_ diff --git a/src/ui/inc/FUiCtrl_RadioGroup.h b/src/ui/inc/FUiCtrl_RadioGroup.h new file mode 100644 index 0000000..87e3c05 --- /dev/null +++ b/src/ui/inc/FUiCtrl_RadioGroup.h @@ -0,0 +1,84 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +/** + * @file FUiCtrl_RadioGroup.h + * @brief This is the header file for the _RadioGroup class. + * + * This header file contains the declarations of the %_RadioGroup class. + */ +#ifndef _FUI_CTRL_INTERNAL_RADIO_GROUP_H_ +#define _FUI_CTRL_INTERNAL_RADIO_GROUP_H_ + +#include +#include "FUi_Control.h" +#include "FUiCtrl_CheckButton.h" + +namespace Tizen { namespace Ui { namespace Controls +{ +class _RadioGroupPresenter; + +/** + * @class _RadioGroup + * @brief + * @since 2.0 + * + * + * + * + */ + +class _OSP_EXPORT_ _RadioGroup + : public Tizen::Ui::_Control + , virtual public Tizen::Base::Runtime::IEventListener + , virtual public Tizen::Ui::_IUiEventListener + , virtual public Tizen::Ui::_IUiEventPreviewer +{ +public: + virtual ~_RadioGroup(void); + +public: + static _RadioGroup* CreateRadioGroupN(void); + +public: + result CreateCheckList(void); + result Add(_CheckButton& checkButton); + result Remove(_CheckButton& checkButton); + virtual bool OnNotifiedN(const _Control& source, Tizen::Base::Collection::IList* pArgs); + + int GetItemCount(void) const; + + result SetSelectedItem(const _CheckButton& checkButton); + const _CheckButton* GetSelectedItem(void) const; + +protected: + result SetPresenter(const _RadioGroupPresenter& radioGroupPresenter); + +private: + _RadioGroup(void); + + _RadioGroup(const _RadioGroup& rhs); + _RadioGroup& operator =(const _RadioGroup& rhs); + +private: + _RadioGroupPresenter* __pRadioGroupPresenter; + Tizen::Base::Collection::ArrayList* __checkList; + +}; // _RadioGroup + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_RADIO_GROUP_H_ diff --git a/src/ui/inc/FUiCtrl_RadioGroupImpl.h b/src/ui/inc/FUiCtrl_RadioGroupImpl.h new file mode 100644 index 0000000..e514921 --- /dev/null +++ b/src/ui/inc/FUiCtrl_RadioGroupImpl.h @@ -0,0 +1,85 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +/** + * @file FUiCtrl_RadioGroupImpl.h + * @brief This is the header file for the _RadioGroupImpl class. + * + * This header file contains the declarations of the %_RadioGroupImpl class. + */ +#ifndef _FUI_CTRL_INTERNAL_RADIO_GROUP_IMPL_H_ +#define _FUI_CTRL_INTERNAL_RADIO_GROUP_IMPL_H_ + +#include +#include "FUi_ControlImpl.h" +#include "FUiCtrl_RadioGroup.h" + +namespace Tizen { namespace Graphics +{ + class Dimension; +}} // Tizen::Graphics + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _RadioGroupImpl + : public _ControlImpl +{ +public: + class RadioGroupSizeInfo : public _ControlImpl::SizeInfo + { + virtual Tizen::Graphics::Dimension GetDefaultMinimumSize(_ControlOrientation orientation) const; + virtual Tizen::Graphics::FloatDimension GetDefaultMinimumSizeF(_ControlOrientation orientation) const; + }; // RadioGroupSizeInfo + +public: + virtual ~_RadioGroupImpl(void); + static _RadioGroupImpl* CreateRadioGroupImplN(RadioGroup* pControl); + + virtual const char* GetPublicClassName(void) const; + virtual const RadioGroup& GetPublic(void) const; + virtual RadioGroup& GetPublic(void); + virtual const _RadioGroup& GetCore(void) const; + virtual _RadioGroup& GetCore(void); + + virtual result OnAttachedToMainTree(void); + +public: + result Add(const CheckButton& checkButton); + result Remove(const CheckButton& checkButton); + + int GetItemCount(void) const; + + result SetSelectedItem(const CheckButton& checkButton); + const CheckButton* GetSelectedItem(void) const; + +public: + static Tizen::Graphics::Color GetColorOnError(void); + + static _RadioGroupImpl* GetInstance(RadioGroup& radioGroup); + static const _RadioGroupImpl* GetInstance(const RadioGroup& radioGroup); + +private: + _RadioGroupImpl(RadioGroup* pPublic, _RadioGroup* pCore); + + _RadioGroupImpl(const _RadioGroupImpl& rhs); + _RadioGroupImpl& operator =(const _RadioGroupImpl& rhs); + +}; // _RadioGroupImpl + +}}} // Tizen::Ui::Controls + +#endif //_ FUI_CTRL_INTERNAL_RADIO_GROUP_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_RadioGroupModel.h b/src/ui/inc/FUiCtrl_RadioGroupModel.h new file mode 100644 index 0000000..fa63417 --- /dev/null +++ b/src/ui/inc/FUiCtrl_RadioGroupModel.h @@ -0,0 +1,57 @@ +// +// 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_RadioGroupModel.h + * @brief This is the header file for the _RadioGroupModel class. + * + * This header file contains the declarations of the %_RadioGroupModel class. + */ +#ifndef _FUI_CTRL_INTERNAL_RADIO_GROUP_MODEL_H_ +#define _FUI_CTRL_INTERNAL_RADIO_GROUP_MODEL_H_ + +#include + +namespace Tizen { namespace Ui { namespace Controls +{ +/** + * @class _RadioGroupModel + * @brief + * @since 2.0 + * + * + * + * + */ +class _RadioGroupModel + : public Tizen::Base::Object +{ +public: + _RadioGroupModel(void); + + virtual ~_RadioGroupModel(void); + +public: + virtual result Construct(void); + +private: + _RadioGroupModel(const _RadioGroupModel& value); + _RadioGroupModel& operator =(const _RadioGroupModel& value); +}; // _RadioGroupModel + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_RADIO_GROUP_MODEL_H_ diff --git a/src/ui/inc/FUiCtrl_RadioGroupPresenter.h b/src/ui/inc/FUiCtrl_RadioGroupPresenter.h new file mode 100644 index 0000000..064b3f4 --- /dev/null +++ b/src/ui/inc/FUiCtrl_RadioGroupPresenter.h @@ -0,0 +1,75 @@ +// +// 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_RadioGroupPresenter.h + * @brief This is the header file for the _RadioGroupPresenter class. + * + * This header file contains the declarations of the %_RadioGroupPresenter class. + */ +#ifndef _FUI_CTRL_INTERNAL_RADIO_GROUP_PRESENTER_H_ +#define _FUI_CTRL_INTERNAL_RADIO_GROUP_PRESENTER_H_ + +#include +#include "FUi_Control.h" + +namespace Tizen { namespace Ui { namespace Animations +{ +class _VisualElement; +}}} // Tizen::Ui::Animations + +namespace Tizen { namespace Ui { namespace Controls +{ +class _RadioGroup; +class _RadioGroupModel; + +/** + * @class _RadioGroupPresenter + * @brief + * @since 2.0 + * + * + * + * + */ +class _RadioGroupPresenter + : public Tizen::Base::Object +{ +public: + _RadioGroupPresenter(void); + virtual ~_RadioGroupPresenter(void); + +public: + virtual result Construct(const _RadioGroup& radioGroup); + virtual result Install(void); + +protected: + result SetModel(const _RadioGroupModel& radioGroupModel); + +private: + _RadioGroupPresenter(const _RadioGroupPresenter& rhs); + _RadioGroupPresenter& operator =(const _RadioGroupPresenter& rhs); + +private: + _RadioGroup* __pRadioGroup; + _RadioGroupModel* __pRadioGroupModel; + + Tizen::Ui::Animations::_VisualElement* __pRoot; +}; // _RadioGroupPresenter + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_RADIO_GROUP_PRESENTER_H_ diff --git a/src/ui/inc/FUiCtrl_Scroll.h b/src/ui/inc/FUiCtrl_Scroll.h new file mode 100644 index 0000000..5d8b359 --- /dev/null +++ b/src/ui/inc/FUiCtrl_Scroll.h @@ -0,0 +1,127 @@ +// +// 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_Scroll.h + * @brief This is the header file for the _Scroll class. + * + * This header file contains the declarations of the %_Scroll class. + */ + +#ifndef _FUICTRL_INTERNAL_SCROLL_H_ +#define _FUICTRL_INTERNAL_SCROLL_H_ + +#include "FUi_Control.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _ScrollPresenter; +class _IScrollEventListener; + +enum _ScrollDirection +{ + SCROLL_DIRECTION_VERTICAL = 0, + SCROLL_DIRECTION_HORIZONTAL +}; + +class _Scroll + : public Tizen::Ui::_Control + , virtual public Tizen::Base::Runtime::IEventListener + , virtual public _IUiEventListener + , virtual public _IUiEventPreviewer +{ +public: + virtual ~_Scroll(void); + static _Scroll* CreateScrollN(Tizen::Ui::_Control& parentCtrl, + _ScrollDirection scrollDir, + bool enableFadeEffect, + bool enableJumpToTop, + bool enableHandler, + bool visibility, + float viewRange, + float scrollRange, + float scrollPosition); + + result SetScrollDirection(_ScrollDirection scrollDir); + _ScrollDirection GetScrollDirection(void) const; + result SetScrollRange(float viewRange, float scrollRange); + void GetScrollRange(float* pViewRange, float* pScrollRange) const; + result SetScrollPosition(float scrollPosition); + float GetScrollPosition(void) const; + result SetContextMenuScrollType(bool isContextMenu); + + void EnableFadeEffect(bool enable); + bool IsEnabledFadeEffect(void) const; + bool IsOnFadeEffect(void) const; + void EnableScrollingEffect(bool enable); + bool IsEnabledScrollingEffect(void) const; + void EnableOverScrollingEffect(bool enable); + bool IsEnabledOverScrollingEffect(void) const; + void SetParentUsingViewport(bool useViewport); + bool IsParentUsingViewport(void) const; + result SetScrollVisibility(bool visibility); + bool GetScrollVisibility(void) const; + void CancelFadeEffect(void); + result SetScrollingEffectVisibility(bool visibility); + + + result EnableJumpToTop(bool enable); + bool IsEnabledJumpToTop(void) const; + + result EnableHandler(bool enable); + bool IsEnabledHandler(void) const; + + void AddScrollEventListener(const Tizen::Ui::Controls::_IScrollEventListener& listener); + void RemoveScrollEventListener(const Tizen::Ui::Controls::_IScrollEventListener& listener); + + void OnParentBoundsChanged(void); + + virtual void OnDraw(void); + 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 void OnTouchMoveHandled(const _Control& control); + virtual Tizen::Ui::Animations::HitTestResult HitTest(const Tizen::Graphics::FloatPoint& point); + +private: + _Scroll(const _Scroll& rhs); + _Scroll& operator =(const _Scroll& rhs); + + _Scroll(void); + result Construct(Tizen::Ui::_Control& parentCtrl, + _ScrollDirection scrollDir, + bool enableFadeEffect, + bool enableJumpToTop, + bool enableHandler, + bool visibility, + float viewRange, + float scrollRange, + float scrollPosition); + + void SetPresenter(_ScrollPresenter& scrollPresenter); + _ScrollPresenter& GetPresenter(void) const; + + +private: + _ScrollPresenter* __pPresenter; + +}; + +}}} // Tizen::Ui::Controls + +#endif //_FUICTRL_INTERNAL_SCROLL_H_ diff --git a/src/ui/inc/FUiCtrl_ScrollEvent.h b/src/ui/inc/FUiCtrl_ScrollEvent.h new file mode 100644 index 0000000..f6fabd7 --- /dev/null +++ b/src/ui/inc/FUiCtrl_ScrollEvent.h @@ -0,0 +1,73 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiCtrl_ScrollEvent.h +* @brief This is the header file for _ScrollEvent class. + * + * This header file contains declaration of _ScrollEvent class. + * The ItemEvent class can call listener's method. So, when event occurred, + * application can handle it appropriately. + * + */ + +#ifndef _FUI_INTERNAL_SCROLL_EVENT_H_ +#define _FUI_INTERNAL_SCROLL_EVENT_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui +{ +class Control; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ +/** +* @class _ScrollEvent +* @brief This class handles a scroll event. It is inherited from Event class. +* +*/ +class _ScrollEvent + : public Tizen::Base::Runtime::_Event +{ +// Lifecycle +public: + _ScrollEvent(void); + + virtual ~_ScrollEvent(void); + + result Construct(const Tizen::Ui::Control& source); + +// Accessors +public: + Tizen::Ui::Control* GetSource(void) const; + +// Operations +protected: + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + +//Attributess +private: + Tizen::Ui::Control* __pSource; +}; // _ScrollEvent + +}}} //Tizen::Ui::Controls + +#endif // _FUI_SCROLL_EVENT_H_ diff --git a/src/ui/inc/FUiCtrl_ScrollEventArg.h b/src/ui/inc/FUiCtrl_ScrollEventArg.h new file mode 100644 index 0000000..96d40b7 --- /dev/null +++ b/src/ui/inc/FUiCtrl_ScrollEventArg.h @@ -0,0 +1,137 @@ +// +// 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_ScrollEventArg.h + * @brief This is the header file for _ScrollEventArg class. + * + * This header file contains declaration of _ScrollEventArg class. + * + */ + +#ifndef _FUI_INTERNAL_SCROLL_EVENT_ARG_H_ +#define _FUI_INTERNAL_SCROLL_EVENT_ARG_H_ + +#include +#include +#include +#include +#include "FUiCtrl_ScrollEventTypes.h" + +namespace Tizen { namespace Ui +{ +class Control; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @class _ScrollEventArg + * @brief This class is used as the argument to item event listener. + * + * From this class, one can find out, the (event) source object, index and Scroll event type. + */ +class _ScrollEventArg + : public Tizen::Base::Runtime::IEventArg + , public Tizen::Base::Object +{ +// Lifecycle +public: + /** + * This is the class destructor. + * + */ + virtual ~_ScrollEventArg(void); + + /** + * General getter for %_ScrollEventArg class object when fire OnScrollStopped event + * + * @param[in] source A pointer to the Object instance which contains this instance + */ + static _ScrollEventArg* GetScrollEventArgN(const Control& source); + + /** + * General getter for %_ScrollEventArg class object when fire OnScrollPositionChanged event + * + * @param[in] source A pointer to the Object instance which contains this instance + * @param[in] scrollPosition A scroll position of the scroll + */ + static _ScrollEventArg* GetScrollEventArgN(const Control& source, float scrollPosition); + + /** + * General getter for %_ScrollEventArg class object when fire OnScrollEndReached event + * + * @param[in] source A pointer to the Object instance which contains this instance + * @param[in] scrollType A direction of the scroll + */ + static _ScrollEventArg* GetScrollEventArgN(const Control& source, ScrollEndEvent scrollType); + +// Accessor +public: + /** + * This method returns the type of firing event + * + * @return See the comment above. + */ + _ScrollEventType GetEventType(void) const; + + /** + * This method returns the object which the event initially occurred. + * + * @return The object which the event initially occurred. + */ + Tizen::Ui::Control* GetSource(void) const; + + /** + * This method returns the scroll position + * + * @return See the comment above. + */ + float GetScrollPosition(void) const; + + /** + * This method returns the ItemStatus + * + * @return See the comment above. + */ + ScrollEndEvent GetScrollType(void) const; + +// Attribute +private: + /** + * This is the default class constructor. + * + * @param[in] source A pointer to the Object instance which contains this instance + * @param[in] eventType A type of firing event + * @param[in] scrollPosition A scroll position of the scroll + * @param[in] scrollType A direction of the scroll + */ + _ScrollEventArg(_ScrollEventType eventType, const Control& source, float scrollPosition = -1.0f, ScrollEndEvent scrollType = SCROLL_END_EVENT_END_TOP); + + + // Event source. + _ScrollEventType __eventType; + Control* __pSource; + float __scrollPosition; + ScrollEndEvent __scrollType; +}; // _ScrollEventArg + + +}}} //Tizen::Ui::Controls + +#endif // _FUI_SCROLL_EVENT_ARG_H_ diff --git a/src/ui/inc/FUiCtrl_ScrollEventTypes.h b/src/ui/inc/FUiCtrl_ScrollEventTypes.h new file mode 100644 index 0000000..43664e0 --- /dev/null +++ b/src/ui/inc/FUiCtrl_ScrollEventTypes.h @@ -0,0 +1,43 @@ +// +// 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_ScrollEventTypes.h + * @brief This is the header file for enumeration using in _ScrollEvent and _UiScrollEvent. + * + * This header file contains declaration of enumeration for _ScrollEvent and _UiScrollEvent. + * + */ + +#ifndef _FUI_CTRL_INTERNAL_SCROLL_EVENT_TYPES_H_ +#define _FUI_CTRL_INTERNAL_SCROLL_EVENT_TYPES_H_ + + +namespace Tizen { namespace Ui { namespace Controls +{ + +enum _ScrollEventType +{ + SCROLL_EVENT_ON_SCROLL_POSITION_CHANGED, + SCROLL_EVENT_ON_SCROLL_END_REACHED, + SCROLL_EVENT_ON_SCROLL_STOPPED, + SCROLL_EVENT_ON_SCROLL_JUMP_TO_TOP +}; + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_SCROLL_EVENT_TYPES_H_ diff --git a/src/ui/inc/FUiCtrl_ScrollPanel.h b/src/ui/inc/FUiCtrl_ScrollPanel.h new file mode 100644 index 0000000..8bc5be7 --- /dev/null +++ b/src/ui/inc/FUiCtrl_ScrollPanel.h @@ -0,0 +1,291 @@ +// +// 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_ScrollPanel.h + * @brief This is the header file for the _ScrollPanel class. + * + * This header file contains the declarations of the _ScrollPanel class. + */ + +#ifndef _FUI_CTRL_INTERNAL_SCROLL_PANEL_H_ +#define _FUI_CTRL_INTERNAL_SCROLL_PANEL_H_ + +#include +#include +#include +#include "FUi_ITouchFlickGestureEventListener.h" +#include "FUi_IAccessibilityListener.h" +#include "FUi_AccessibilityContainer.h" +#include "FUi_AccessibilityElement.h" +#include "FUiCtrl_IScrollableContainer.h" +#include "FUiCtrl_IScrollEventListener.h" +#include "FUiCtrl_ScrollPanelEvent.h" +#include "FUiCtrl_Panel.h" + +namespace Tizen { namespace Ui +{ + +class _Control; +class _ControlImpl; +class _TouchInfo; +class _TouchFlickGestureDetector; + +namespace Animations +{ + +class VisualElementValueAnimation; + +} // Tizen::Ui::Animations + +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _UiScrollEvent; +class _Scroll; +class _ScrollPanelPresenter; + + +class _OSP_EXPORT_ _ScrollPanel + : public _Panel + , public _IScrollEventListener + , public _IScrollableContainer + , public _ITouchFlickGestureEventListener + , public _IAccessibilityListener + , public Tizen::Ui::Animations::IVisualElementAnimationTickEventListener + , public Tizen::Ui::Animations::IVisualElementAnimationStatusEventListener + , virtual public _IUiEventListener + , virtual public _IUiEventPreviewer + , virtual public Tizen::Base::Runtime::IEventListener + , virtual public _ITouchGestureEventListener +{ +// Lifecycle +public: + virtual ~_ScrollPanel(void); + + static _ScrollPanel* CreateScrollPanelN(const Tizen::Graphics::FloatRectangle& rect + , ScrollPanelScrollDirection scrollDirection = SCROLL_PANEL_SCROLL_DIRECTION_VERTICAL + , bool autoResizingEnable = true + , bool pageScrollEnabled = false); +// Operations +public: + // delegateas + virtual void OnDraw(void); + virtual result OnBoundsChanging(const Tizen::Graphics::FloatRectangle& bounds); + virtual void OnBoundsChanged(void); + + // listener + virtual void OnChildAttached(const _Control& child); + virtual void OnChildDetached(const _Control& child); + virtual void OnChildBoundsChanged(const _Control& child); + + // scroll event listener + virtual void OnScrollEndReached(_Control& source, ScrollEndEvent type); + virtual void OnScrollPositionChanged(_Control& source, float scrollPosition); + virtual void OnScrollStopped(_Control& source); + virtual void OnScrollJumpToTop(_Control& source); + + // touch Event Previewer + 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); + virtual _UiTouchEventDelivery OnPreviewTouchCanceled(const _Control& source, const _TouchInfo& touchinfo); + + // touch Event Listener + virtual bool OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo); + virtual bool OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo); + virtual bool OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo); + virtual bool OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo); + virtual void OnTouchMoveHandled(const _Control& control); + + // gestureListener Callback API + virtual bool OnFlickGestureDetected(_TouchFlickGestureDetector& gesture); + virtual bool OnFlickGestureCanceled(_TouchFlickGestureDetector& gesture); + + // accessibility listener + virtual bool OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityFocusMovedPrevious(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityReadingElement(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityFocusOut(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityValueIncreased(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityValueDecreased(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityItemRefreshed(const _AccessibilityContainer& control, const _AccessibilityElement& element, _AccessibilityFocusDirection direction); + + // Focus UI + virtual void OnChildControlFocusMoved(const _Control& control); + virtual void OnDescendantControlFocusMoved(const _Control& control); + + // scroll animation event listener + 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); + virtual void OnTickOccurred(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, const Tizen::Ui::Variant& currentValue); + + // manage scroll event listener + void AddScrollEventListener(const _IScrollEventListener& listener); + void RemoveScrollEventListener(const _IScrollEventListener& listener); + + // scroll operations + void ScrollToBottom(void) const; + void ScrollToTop(void) const; + void ScrollToLeft(void) const; + void ScrollToRight(void) const; + + // scrollable container interface + virtual bool ScrollToControl(const _Control& source, bool recursive = false); + + // Accessor + float GetScrollPosition(void) const; + void SetScrollPosition(float position, bool withAnimation = false); + void SetScrollPosition(Tizen::Graphics::FloatPoint position, bool withAnimation = false); + + // scroll position + float GetVerticalScrollPosition(void) const; + void SetVerticalScrollPosition(float position); + + float GetHorizontalScrollPosition(void) const; + void SetHorizontalScrollPosition(float position); + + float CalculatePagingScrollPosition(float position) const; + + // scroll area type + bool IsScrollAreaAutoResizingEnabled(void) const; + void SetScrollAreaAutoResizingEnabled(bool autoResizingEnable); + + // scroll area bounds + Tizen::Graphics::FloatRectangle GetScrollAreaBounds(void) const; + result SetClientAreaHeight(float height); + result SetClientAreaWidth(float width); + result SetScrollAreaBounds(Tizen::Graphics::FloatRectangle& bounds); + + virtual void UpdateClientBounds(const Tizen::Graphics::FloatDimension& size, Tizen::Graphics::FloatRectangle& clientBounds); + + // scroll direction + ScrollPanelScrollDirection GetScrollDirection(void) const; + void SetScrollDirection(ScrollPanelScrollDirection direction); + + ScrollInputMode GetScrollInputMode(void) const; + void SetScrollInputMode(ScrollInputMode mode); + + // page scroll + bool IsPageScrollEnabled(void) const; + void SetPageScrollEnabled(bool enable); + + Tizen::Graphics::FloatDimension GetPageScrollAlignSize(void) const; + void SetPageScrollAlignSize(Tizen::Graphics::FloatDimension size); + + bool IsPageScrollFlickMoveLimitedOnePage(void) const; + + bool IsScrollAnimationRunning(void) const; + + // store SIP keypad binding control + const _Control* GetControlKeypadBinding(void) const; + void SetControlKeypadBinding(const _Control* pControl); + + // scrollpanel event + _ScrollPanelEvent* GetScrollPanelEvent(void) const; + void SetScrollPanelEvent(const _ScrollPanelEvent* pScrollPanelEvent); + + // _Scroll + bool IsScrollBarVisible(void) const; + void SetScrollBarVisible(bool scrollBarVisible); + + _Scroll* GetScrollBar(void) const; + void SetScrollBar(const _Scroll* pVerticalScrollBar); + + _Scroll* GetVerticalScrollBar(void) const; + void SetVerticalScrollBar(const _Scroll* pVerticalScrollBar); + + _Scroll* GetHorizontalScrollBar(void) const; + void SetHorizontalScrollBar(const _Scroll* pHorizontalScrollBar); + + bool IsFixingClientBoundsEnabled(void) const; + void SetFixingClientBoundsEnabled(bool enable); + + // VE Value Animation + Tizen::Ui::Animations::VisualElementValueAnimation* GetScrollingAnimation(void) const; + + // event fire + result FireOnScrollEndEvent(ScrollEndEvent scrollEndEventType); + result FireOnScrollPositionChangedEvent(void); + result FireOnScrollPositionChangedEvent(float scrollPosition); + result FireOnScrollStoppedEvent(void); + result FireScrollPanelEvent(const _Control& source, CoreScrollPanelStatus scrollPanelStatus); + +// Lifecycle +protected: + _ScrollPanel(void); + + virtual result Initialize(const _ScrollPanelPresenter& presenter, bool acquireHandle = true); + + // Accessor + virtual result SetScrollPanelPresenter(const _ScrollPanelPresenter* presenter); + +private: + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + _ScrollPanel(const _ScrollPanel& rhs); + + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + _ScrollPanel& operator =(const _ScrollPanel& rhs); + +// Attribute +private: + _ScrollPanelPresenter* __pScrollPanelPresenter; + + // Scroll event + _UiScrollEvent* __pScrollEvent; + + // ScrollPanel event + _ScrollPanelEvent* __pCoreScrollPanelEvent; + + // gesture event + _TouchFlickGestureDetector* __pGestureFlick; + + const _Control* __pKeyPadBindingControl; + + // scroll feature + ScrollPanelScrollDirection __scrollDirection; + ScrollInputMode __scrollInputMode; + + // scroll area feature + bool __autoResizingEnable; + + // page scroll + bool __pageScrollEnabled; + Tizen::Graphics::FloatDimension __pageScrollAlignSize; + bool __pageScrollMoveOnlyOnePageOnFlick; + + // scroll bar + bool __scrollBarVisible; + _Scroll* __pHorizontalScrollBar; + _Scroll* __pVerticalScrollBar; + + // scrolling animation + Tizen::Ui::Animations::VisualElementValueAnimation* __pScrollingAnimation; + + bool __fixingClientBoundsEnable; +}; // _ScrollPanel + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_SCROLL_PANEL_H_ + diff --git a/src/ui/inc/FUiCtrl_ScrollPanelEvent.h b/src/ui/inc/FUiCtrl_ScrollPanelEvent.h new file mode 100644 index 0000000..3ed8ce1 --- /dev/null +++ b/src/ui/inc/FUiCtrl_ScrollPanelEvent.h @@ -0,0 +1,121 @@ +// +// 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_ScrollPanelEvent.h +* @brief This is the header file for _ScrollPanelEvent class. +* +* This header file contains declaration of _ScrollPanelEvent class. +* +*/ + +#ifndef _FUI_CTRL_SCROLL_PANEL_EVENT_H_ +#define _FUI_CTRL_SCROLL_PANEL_EVENT_H_ + +#include +#include +#include +#include + +namespace Tizen { namespace Ui +{ +class _Control; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** +* @enum ScrollPanelStatus +* Defines constants used to identify ScrollPanel's Overlay status. @n +* This is used for overlay keypad support. +* +* @since 2.0 +*/ +enum CoreScrollPanelStatus +{ + CORE_OVERLAY_CONTROL_CREATED, /**< An overlay keypad created on top of ScrollPanel */ + CORE_OVERLAY_CONTROL_OPENED, /**< An overlay keypad opened on top of ScrollPanel */ + CORE_OVERLAY_CONTROL_CLOSED, /**< An overlay keypad closed */ + CORE_OTHER_CONTROL_SELECTED /**< Another control in the ScrollPanel is selected */ +}; + +/** +* @class _ScrollPanelEvent +* @brief This class handles a text Block event event. It is inherited from Event class. +* +*/ +class _ScrollPanelEvent + : public Tizen::Base::Runtime::_Event +{ +// Lifecycle +public: + /** + * This is the default class destructor. + * + */ + virtual ~_ScrollPanelEvent(void); + + static _ScrollPanelEvent* CreateScrollPanelEventN(const Tizen::Ui::_Control& source); + +// Accessors +public: + /** + * This method returns the owner of this event. + * + * @return See the comment above. + */ + const Tizen::Ui::_Control* GetSource(void) const; + +public: + static Tizen::Base::Runtime::IEventArg* CreateScrollPanelEventArgN(CoreScrollPanelStatus status); + + // Operations +protected: + /** + * This is the default class constructor. + * + * @remarks After creating an instance of this class, you must explicitly call one of + * construction methods to initialize the instance. + * + */ + _ScrollPanelEvent(const Tizen::Ui::_Control& source); + + /** + * This method checks the arg and finds out the type of event. After that this method calls appopriate + * pListener's method. + * + * @param[in] listener It is a event listener related to this item event. + * @param[in] arg It is an argument-like instance of item event retransmitted to the listener's method + * as an argument. + * @exception E_SUCCESS - The method is successful. + * @exception E_ARG_NULL - The listener is null. + * @exception E_INVALID_ARG - The argument passed to a method contains an invalid value.@n + *   The pListener is not the instance of IItemEventListener class or + * the pItemEventArg is not the instance of _CustomItemEventArg class. + * + */ + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + + //Attributess +private: + const Tizen::Ui::_Control* __pSource; +}; // _ScrollPanelEvent + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_SCROLL_PANEL_EVENT_H_ diff --git a/src/ui/inc/FUiCtrl_ScrollPanelImpl.h b/src/ui/inc/FUiCtrl_ScrollPanelImpl.h new file mode 100644 index 0000000..06f71f4 --- /dev/null +++ b/src/ui/inc/FUiCtrl_ScrollPanelImpl.h @@ -0,0 +1,124 @@ +// +// 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_ScrollPanelImpl.h + * @brief This is the header file for the _ScrollPanelImpl class. + * + * This header file contains the declarations of the _ScrollPanelImpl class. + */ + +#ifndef _FUI_CTRL_INTERNAL_SCROLL_PANEL_IMPL_H_ +#define _FUI_CTRL_INTERNAL_SCROLL_PANEL_IMPL_H_ + +#include +#include "FUiCtrl_IScrollEventListener.h" +#include "FUiCtrl_PanelImpl.h" +#include "FUiCtrl_ScrollPanel.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _ScrollEvent; + +class _ScrollPanelImpl + : public _PanelImpl + , public _IScrollEventListener + , virtual public Tizen::Base::Runtime::IEventListener +{ +// Lifecycle +public: + virtual ~_ScrollPanelImpl(void); + +// Operations +public: + static _ScrollPanelImpl* CreateScrollPanelImplN(ScrollPanel* pPublic, const Tizen::Graphics::FloatRectangle& rect, ScrollPanelScrollDirection scrollDirection, bool autoResizingEnable, Layout* pPublicPortraitLayout = null, Layout* pPublicLandscapeLayout = null); + + // Internal Callbacks + virtual result OnDetachingFromMainTree(void); + + // scroll operations + float GetScrollPosition(void) const; + void SetScrollPosition(float position, bool withAnimation); + + void ScrollToBottom(void) const; + void ScrollToTop(void) const; + + // scroll event listener + void AddScrollEventListener(IScrollEventListener& listener); + void RemoveScrollEventListener(IScrollEventListener& listener); + void AddScrollEventListener(IScrollEventListenerF& listener); + void RemoveScrollEventListener(IScrollEventListenerF& listener); + + + // scroll event listener + virtual void OnScrollEndReached(_Control& source, ScrollEndEvent type); + virtual void OnScrollPositionChanged(_Control& source, float scrollPosition); + virtual void OnScrollStopped(_Control& source); + + Tizen::Graphics::FloatRectangle GetClientAreaBounds(void) const; + result SetClientAreaHeight(float height); + result SetClientAreaWidth(float width); + + ScrollPanelScrollDirection GetScrollDirection(void) const; + + bool IsScrollAreaAutoResizingEnabled(void) const; + + void SetPageScrollEnabled(bool enable); + bool IsPageScrollEnabled(void) const; + + void SetScrollBarVisible(bool visible); + bool IsScrollBarVisible(void) const; + + void SetScrollInputMode(ScrollInputMode mode); + ScrollInputMode GetScrollInputMode(void) const; + + // dirty function for OSP 2.0 + result CloseOverlayWindow(void); + +// Accessor +public: + static const _ScrollPanelImpl* GetInstance(const ScrollPanel& scrollPanel); + static _ScrollPanelImpl* GetInstance(ScrollPanel& scrollPanel); + + virtual const char* GetPublicClassName(void) const; + virtual const ScrollPanel& GetPublic(void) const; + virtual ScrollPanel& GetPublic(void); + virtual const _ScrollPanel& GetCore(void) const; + virtual _ScrollPanel& GetCore(void); + +// Lifecycle +protected: + _ScrollPanelImpl(Control* pPublic, _Control* pCore, Layout* pPublicPortraitLayout = null, Layout* pPublicLandscapeLayout = null); + +private: + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + _ScrollPanelImpl(const _ScrollPanelImpl& rhs); + + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + _ScrollPanelImpl& operator =(const _ScrollPanelImpl& rhs); + +// scroll event +private: + _ScrollEvent* __pScrollEvent; + bool __detached; +}; // _ScrollPanelImpl + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_SCROLL_PANEL_IMPL_H_ + diff --git a/src/ui/inc/FUiCtrl_ScrollPanelModel.h b/src/ui/inc/FUiCtrl_ScrollPanelModel.h new file mode 100644 index 0000000..fb8b21a --- /dev/null +++ b/src/ui/inc/FUiCtrl_ScrollPanelModel.h @@ -0,0 +1,87 @@ +// +// 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_ScrollPanelModel.h + * @brief This is the header file for the _ScrollPanelModel class. + * + * This header file contains the declarations of the _ScrollPanelModel class. + */ + +#ifndef _FUI_CTRL_INTERNAL_SCROLL_PANEL_MODEL_H_ +#define _FUI_CTRL_INTERNAL_SCROLL_PANEL_MODEL_H_ + +#include + +namespace Tizen { namespace Graphics { + +class FloatPoint; +class FloatRectangle; +class FloatDimension; + +}} // Tizen::Graphics + +namespace Tizen { namespace Ui { + +class _Control; + +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _ScrollPanelModel + : public Tizen::Base::Object +{ +// Lifecycle +public: + _ScrollPanelModel(void); + virtual ~_ScrollPanelModel(void); + +// Accessor +public: + Tizen::Graphics::FloatPoint GetCurrentScrollPosition(void) const; + void SetCurrentScrollPosition(float currentScrollHorizontalPosition, float currentScrollVerticalPosition); + void SetCurrentScrollPosition(Tizen::Graphics::FloatPoint& currentScrollPosition); + + float GetCurrentVerticalScrollPosition(void) const; + void SetCurrentVerticalScrollPosition(float currentScrollVerticalPosition); + + float GetCurrentHorizontalScrollPosition(void) const; + void SetCurrentHorizontalScrollPosition(float currentScrollHorizontalPosition); + + void SetScrollAreaBounds(Tizen::Graphics::FloatRectangle& areaBounds); + Tizen::Graphics::FloatRectangle GetScrollAreaBounds(void) const; + +private: + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + _ScrollPanelModel(const _ScrollPanelModel& rhs); + + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + _ScrollPanelModel& operator =(const _ScrollPanelModel& rhs); + +// Attribute +private: + Tizen::Graphics::FloatPoint __currentScrollPosition; // x : horizontal position, y : vertical position + + Tizen::Graphics::FloatRectangle __scrollAreaBounds; +}; // _ScrollPanelModel + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_SCROLL_PANEL_MODEL_H_ + diff --git a/src/ui/inc/FUiCtrl_ScrollPanelPresenter.h b/src/ui/inc/FUiCtrl_ScrollPanelPresenter.h new file mode 100644 index 0000000..0421d98 --- /dev/null +++ b/src/ui/inc/FUiCtrl_ScrollPanelPresenter.h @@ -0,0 +1,271 @@ +// +// 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_ScrollPanelPresenter.h + * @brief This is the header file for the _ScrollPanelPresenter class. + * + * This header file contains the declarations of the _ScrollPanelPresenter class. + */ + +#ifndef _FUI_CTRL_INTERNAL_SCROLL_PANEL_PRESENTER_H_ +#define _FUI_CTRL_INTERNAL_SCROLL_PANEL_PRESENTER_H_ + +#include +#include "FUiCtrl_ScrollPanel.h" +#include "FUiCtrl_PanelPresenter.h" + +namespace Tizen { namespace Ui +{ + +class _Control; +class _TouchInfo; +class _TouchFlickGestureDetector; + +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _ScrollPanelModel; + + +class _ScrollPanelPresenter + : public _PanelPresenter + , public Tizen::Base::Runtime::ITimerEventListener + , virtual public Tizen::Base::Runtime::IEventListener +{ +// Lifecycle +public: + _ScrollPanelPresenter(void); + virtual ~_ScrollPanelPresenter(void); + +// Operations +public: + virtual result Initialize(_ScrollPanel& scrollPanel); + + virtual result Draw(void); + + // Control Delegator + virtual result OnBoundsChanging(const Tizen::Graphics::FloatRectangle& bounds); + virtual void OnBoundsChanged(void); + + // Listener + virtual void OnChildAttached(const _Control& child); + virtual void OnChildDetached(const _Control& child); + virtual void OnChildBoundsChanged(const _Control& child); + + // Touch Event Previewer + 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); + virtual _UiTouchEventDelivery OnPreviewTouchCanceled(const _Control& source, const _TouchInfo& touchinfo); + + // Touch Event Listener + virtual bool OnTouchPressed(const _Control& source, const _TouchInfo& touchInfo); + virtual bool OnTouchMoved(const _Control& source, const _TouchInfo& touchInfo); + virtual bool OnTouchReleased(const _Control& source, const _TouchInfo& touchInfo); + virtual bool OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo); + virtual void OnTouchMoveHandled(const _Control& control); + + // gestureListener callback API + virtual bool OnFlickGestureDetected(_TouchFlickGestureDetector& gesture); + virtual bool OnFlickGestureCanceled(_TouchFlickGestureDetector& gesture); + + // accessibility listener + virtual bool OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityFocusMovedPrevious(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityReadingElement(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityFocusOut(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityItemRefreshed(const _AccessibilityContainer& control, const _AccessibilityElement& element, _AccessibilityFocusDirection direction); + + // Focus UI + virtual void OnChildControlFocusMoved(const _Control& control); + virtual void OnDescendantControlFocusMoved(const _Control& control); + + // scroll event listener + virtual void OnScrollEndReached(_Control& source, ScrollEndEvent type); + virtual void OnScrollPositionChanged(_Control& source, float scrollPosition); + virtual void OnScrollStopped(_Control& source); + virtual void OnScrollJumpToTop(_Control& source); + + // Timer - Tension, FlickGesture + virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer); + + // scroll animation event listener + 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); + + virtual void OnTickOccurred(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, const Tizen::Ui::Variant& currentValue); + + // Scroll Operations + void ScrollToBottom(void); + void ScrollToTop(void); + void ScrollToLeft(void); + void ScrollToRight(void); + + // scrollable container interface + bool ScrollToControl(const _Control& source, bool recursive); + + // Accessor + bool IsScrollable(void) const; + + // scroll area + Tizen::Graphics::FloatRectangle GetScrollAreaBounds(void) const; + result SetClientAreaHeight(float height); + result SetClientAreaWidth(float width); + result SetScrollAreaBounds(Tizen::Graphics::FloatRectangle& bounds); + void SetScrollAreaBoundsInternal(Tizen::Graphics::FloatRectangle& bounds); + + void UpdateClientBounds(const Tizen::Graphics::FloatDimension& size, Tizen::Graphics::FloatRectangle& clientBounds); + + // scroll position + void SetScrollPosition(float position, bool withAnimation); // sets and move + void SetScrollPosition(Tizen::Graphics::FloatPoint position, bool withAnimation); // sets and move + float GetScrollPosition(void) const; + + float GetVerticalScrollPosition(void) const; + void SetVerticalScrollPosition(float position); + + float GetHorizontalScrollPosition(void) const; + void SetHorizontalScrollPosition(float position); + + float CalculatePagingScrollPosition(float position) const; + void StopScrollBarLoadEffectTimer(void); + + bool IsScrollAnimationRunning(void) const; + +protected: + // Update Layout + virtual void UpdateLayout(void); + + // Accessor + const _Control* GetPressedControl(void) const; + Tizen::Graphics::FloatPoint GetPreviousTouchPosition(void) const; + Tizen::Graphics::FloatPoint GetCurrentTouchPosition(void) const; + + float GetScrollPositionInternal(void) const; + bool IsModelUpdating(void) const; + + // Scroll operation + virtual float ScrollToInternal(float targetPosition); + float ScrollTo(float targetPosition); + float ScrollTo(float targetPosition, bool withAnimation); + + // Scrollbar operations + virtual void FadeOutScrollBar(void); + virtual void StopFadeOutScrollBar(void); + virtual void FadeInScrollBar(void); + + // bouncing back + void RollbackBouncing(bool withAnimation); + +private: + // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + _ScrollPanelPresenter(const _ScrollPanelPresenter& rhs); + + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + _ScrollPanelPresenter& operator =(const _ScrollPanelPresenter& rhs); + + // Previous Touch Event + result RunTouchPressed(const _Control& source, const _TouchInfo& touchInfo); + result RunPreviewTouchMoved(const _Control& source, const _TouchInfo& touchInfo); + result RunTouchReleased(const _Control& source, const _TouchInfo& touchInfo); + result RunTouchCanceled(const _Control& source, const _TouchInfo& touchinfo); + + // Adjust Model + void AdjustModel(void); + + // scroll + void SetScrollPositionInternal(float position); + + float GetVerticalScrollPositionInternal(void) const; + void SetVerticalScrollPositionInternal(float position); + + float GetHorizontalScrollPositionInternal(void) const; + void SetHorizontalScrollPositionInternal(float position); + + void StopScrollingAnimation(void); + float FixScrollPositionIntoScrollAreaBounds(float position) const; + float FixScrollPositionIntoScrollAreaBounds(float position, Tizen::Graphics::FloatRectangle bounds, Tizen::Graphics::FloatRectangle scrollArea) const; + + // Scrollbar operations + void ChangeScrollBarRange(void); + void ChangeScrollBarPosition(float position); + + // scroll to ... + bool IsControlOutOfView(const _Control& control) const; + void ScrollToControlWhenOutOfView(const _Control& control); + void ScrollToFocusedControl(void); + + // scroll bar load effect + void DoScrollBarLoadEffect(void); + void StartScrollBarLoadEffectTimer(void); + + // Flick + float CalculateFlickAmount(float flickDistance, float flickDuration); + bool DoFlickGestureRecognized(_TouchFlickGestureDetector& gesture); + bool AccumulateFlickGesture(_FlickDirection direction); + float FlickTo(float targetPosition, float duration); + +// Attribute +private: + enum _ScrollPanelScrollBarLoadEffectStatus + { + _SCROLL_PANEL_SCROLL_BAR_LOAD_EFFECT_UNLOAD, + _SCROLL_PANEL_SCROLL_BAR_LOAD_EFFECT_LOADING, + _SCROLL_PANEL_SCROLL_BAR_LOAD_EFFECT_LOADED + }; + + _ScrollPanel* __pScrollPanel; + _ScrollPanelModel* __pScrollPanelModel; + + float __limitAnimationDistance; + + _Control* __pPressedControl; + bool __subControlMoved; + bool __touchPressed; + bool __scrollOccured; + + Tizen::Graphics::FloatRectangle __previousBounds; + Tizen::Graphics::FloatRectangle __previousScrollAreaBounds; + bool __modelUpdating; + + Tizen::Graphics::FloatPoint __previousTouchedPosition; + Tizen::Graphics::FloatPoint __currentMovedPosition; + + bool __scrollAnimationRunning; + bool __flickRunning; + + Tizen::Base::Runtime::Timer* __pScrollBarLoadEffectTimer; + _ScrollPanelScrollBarLoadEffectStatus __scrollBarLoadEffectStatus; + bool __firstDrawn; + + bool __firstTouchMove; + ScrollPanelScrollDirection __firstScrollMoveDirection; + + bool __jumpToTopRunning; +}; // _ScrollPanelPresenter + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_SCROLL_PANEL_PRESENTER_H_ + diff --git a/src/ui/inc/FUiCtrl_ScrollPresenter.h b/src/ui/inc/FUiCtrl_ScrollPresenter.h new file mode 100644 index 0000000..bcf945c --- /dev/null +++ b/src/ui/inc/FUiCtrl_ScrollPresenter.h @@ -0,0 +1,261 @@ +// +// 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_ScrollPresenter.h + * @brief This is the header file for the _ScrollPresenter class. + * + * This header file contains the declarations of the %_ScrollPresenter class. + */ + +#ifndef _FUICTRL_INTERNAL_FASTSCROLL_PRESENTER_H_ +#define _FUICTRL_INTERNAL_FASTSCROLL_PRESENTER_H_ + +#include + +#include +#include +#include +#include + +#include +#include +#include + +#include "FUi_Control.h" +#include "FUi_UiTouchEvent.h" + +#include "FUiAnim_VisualElement.h" + +#include "FUiCtrl_Scroll.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _UiScrollEvent; +class _IScrollEventListener; + + +class _ScrollPresenter + : public Tizen::Ui::Animations::VisualElementAnimationProvider + , public Tizen::Ui::Animations::IVisualElementAnimationStatusEventListener + , virtual public Tizen::Ui::Animations::IVisualElementAnimationProvider + , virtual public _IUiEventListener +{ +public: + virtual ~_ScrollPresenter(void); + static _ScrollPresenter* CreateScrollPresenterN(Tizen::Ui::_Control& parentCtrl, + _Scroll& scrollCtrl, + _ScrollDirection scrollDirection, + bool enableFadeEffect, + bool enableJumpToTop, + bool enableHandler, + bool visibility, + float viewRange, + float scrollRange, + float scrollPosition); + + result SetScrollDirection(_ScrollDirection scrollDirection); + _ScrollDirection GetScrollDirection(void) const; + result SetScrollRange(float viewRange, float scrollRange); + void GetScrollRange(float* pViewRange, float* pScrollRange) const; + result SetScrollPosition(float scrollPosition); + float GetScrollPosition(void) const; + result SetContextMenuScrollType(bool isContextMenu); + + void EnableFadeEffect(bool enable); + bool IsEnabledFadeEffect(void) const; + bool IsOnFadeEffect(void) const; + void EnableScrollingEffect(bool enable); + bool IsEnabledScrollingEffect(void) const; + void EnableOverScrollingEffect(bool enable); + bool IsEnabledOverScrollingEffect(void) const; + void SetParentUsingViewport(bool useViewPort); + bool IsParentUsingViewport(void) const; + + result SetScrollVisibility(bool visibility); + bool GetScrollVisibility(void) const; + void CancelFadeEffect(void); + + result EnableJumpToTop(bool enable); + bool IsEnabledJumpToTop(void) const; + + result EnableHandler(bool enable); + bool IsEnabledHandler(void) const; + + result SetScrollingEffectVisibility(bool visibility); + + void AddScrollEventListener(const Tizen::Ui::Controls::_IScrollEventListener& listener); + void RemoveScrollEventListener(const Tizen::Ui::Controls::_IScrollEventListener& listener); + + void OnParentBoundsChanged(void); + + void OnDraw(void); + bool OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo); + bool OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo); + bool OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo); + void OnTouchMoveHandled(const _Control& control); + Tizen::Ui::Animations::HitTestResult HitTest(const Tizen::Graphics::FloatPoint& point); + + + virtual Tizen::Ui::Animations::VisualElementAnimation* CreateAnimationForProperty(Tizen::Ui::Animations::VisualElement& target, const Tizen::Base::String& property); + 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: + _ScrollPresenter(const _ScrollPresenter& rhs); + _ScrollPresenter& operator =(const _ScrollPresenter& rhs); + + _ScrollPresenter(void); + result Construct(Tizen::Ui::_Control& parentCtrl, + _Scroll& scrollCtrl, + _ScrollDirection scrollDirection, + bool enableFadeEffect, + bool enableJumpToTop, + bool enableHandler, + bool visibility, + float viewRange, + float scrollRange, + float scrollPosition); + + result LoadResources(_ScrollDirection scrollDirection, _ControlOrientation orientation); + result LoadColorConfig(void); + result LoadBitmapResources(_ScrollDirection scrollDirection); + result LoadShapeConfig(_ScrollDirection scrollDirection, _ControlOrientation orientation); + void ReleaseBitmapResources(void); + + Tizen::Graphics::FloatRectangle CalculateScrollCtrlBounds(_ScrollDirection scrollDirection); + Tizen::Graphics::FloatRectangle CalculateThumbBounds(_ScrollDirection scrollDirection); + Tizen::Graphics::FloatPoint CalculateThumbPosition(_ScrollDirection scrollDirection); + Tizen::Graphics::FloatDimension CalculateThumbSize(_ScrollDirection scrollDirection); + Tizen::Graphics::FloatRectangle CalculateHandlerBounds(_ScrollDirection scrollDirection); + Tizen::Graphics::FloatPoint CalculateHandlerPosition(_ScrollDirection scrollDirection); + Tizen::Graphics::FloatDimension CalculateHandlerSize(_ScrollDirection scrollDirection); + Tizen::Graphics::FloatRectangle CalculateJumpToTopBounds(_ScrollDirection scrollDirection); + Tizen::Graphics::FloatRectangle CalculateScrollingEffectFrontBounds(_ScrollDirection scrollDirection); + Tizen::Graphics::FloatRectangle CalculateScrollingEffectReerBounds(_ScrollDirection scrollDirection); + + result AttachScrollChild(Tizen::Ui::Animations::_VisualElement** ppScrollVe, const Tizen::Graphics::FloatRectangle& bounds, bool visibility); + void DetachScrollChild(Tizen::Ui::Animations::_VisualElement** ppScrollVe, bool destroy); + result RelayoutScrollChildren(_ScrollDirection scrollDirection); + result SetParentBouncing(float rate); + + result SetScrollingEffect(void); + void SetScrollingEffectOpacity(float opacity); + void SetScrollingEffectOpacity(Tizen::Ui::Animations::_VisualElement& Ve, bool isActive, float ratio); + bool IsScrollVisible(void) const; + + void DrawThumb(void); + void DrawJumpToTop(void); + void DrawHandler(void); + void DrawScrollingEffect(void); + result DrawBitmap(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, const Tizen::Graphics::Bitmap& bitmap); + + bool OnTouchPressedJumpToTop(const _Control& source, const _TouchInfo& touchinfo); + bool OnTouchReleasedJumpToTop(const _Control& source, const _TouchInfo& touchinfo); + bool OnTouchMovedJumpToTop(const _Control& source, const _TouchInfo& touchinfo); + bool OnTouchPressedHandler(const _Control& source, const _TouchInfo& touchinfo); + bool OnTouchReleasedHandler(const _Control& source, const _TouchInfo& touchinfo); + bool OnTouchMovedHandler(const _Control& source, const _TouchInfo& touchinfo); + + void SetParentCtrl(Tizen::Ui::_Control& parentCtrl); + Tizen::Ui::_Control& GetParentCtrl(void) const; + + void SetControl(_Scroll& scrollCtrl); + _Scroll& GetControl(void) const; + +private: + Tizen::Ui::_Control* __pParentCtrl; + _Scroll* __pScrollCtrl; + + _ScrollDirection __scrollDirection; + bool __enableFadeEffect; + bool __enableJumpToTop; + bool __enableHandler; + bool __enableScrollingEffect; + bool __enableOverScrollingEffect; + bool __isContextMenuScroll; + bool __parentUsingViewport; + float __viewRange; + float __scrollRange; + float __scrollPositionCurr; + bool __fadeIn; + bool __fadeOut; + bool __scrollVisibility; + bool __scrollingEffectVisibility; + float __parentBouncingRate; + int __fadeEffectDuration_ms; + bool __needUpdateThumb; + bool __needUpdateJumpTopTop; + bool __needUpdateHandler; + bool __needUpdateScrollingEffect; + bool __handlerTouched; + float __handlerTouchedPosition; + bool __jumpToTopPressed; + + _UiScrollEvent* __pScrollEvent; + + Tizen::Ui::Animations::_VisualElement* __pCtrlVe; + Tizen::Ui::Animations::_VisualElement* __pThumbVe; + Tizen::Ui::Animations::_VisualElement* __pJumpToTopVe; + Tizen::Ui::Animations::_VisualElement* __pHandlerVe; + Tizen::Ui::Animations::_VisualElement* __pFrontScrollingEffectVe; + Tizen::Ui::Animations::_VisualElement* __pReerScrollingEffectVe; + + Tizen::Graphics::Color __thumbColor; + Tizen::Graphics::Color __jumpToTopColor; + Tizen::Graphics::Color __jumpToTopColorPressed; + Tizen::Graphics::Color __buttonColor; + Tizen::Graphics::Color __buttonColorPressed; + + Tizen::Graphics::Bitmap* __pThumbBitmap; + Tizen::Graphics::Bitmap* __pThumbEffectBitmap; + Tizen::Graphics::Bitmap* __pJumpToTopBitmap; + Tizen::Graphics::Bitmap* __pJumpToTopPressBitmap; + Tizen::Graphics::Bitmap* __pJumpToTopEfBitmap; + Tizen::Graphics::Bitmap* __pButtonBitmap; + Tizen::Graphics::Bitmap* __pButtonEfBitmap; + Tizen::Graphics::Bitmap* __pButtonPressBitmap; + Tizen::Graphics::Bitmap* __pButtonPressEfBitmap; + Tizen::Graphics::Bitmap* __pHandlerBgBitmap; + Tizen::Graphics::Bitmap* __pHandlerBgEffectBitmap; + Tizen::Graphics::Bitmap* __pHandlerBitmap; + Tizen::Graphics::Bitmap* __pFrontScrollingEffectBitmap; + Tizen::Graphics::Bitmap* __pReerScrollingEffectBitmap; + + Tizen::Graphics::FloatDimension __thumbSizeMin; + float __thumbMargin; + Tizen::Graphics::FloatDimension __jumpToTopSize; + float __jumpToTopMarginRight; + float __jumpToTopMarginTop; + Tizen::Graphics::FloatDimension __handlerSizeMin; + float __handlerMarginLeft; + float __handlerMarginRight; + float __handlerMarginTop; + float __handlerMarginBottom; + float __scrollingEffectWidthLeft; + float __scrollingEffectWidthRight; + float __scrollingEffectHeightTop; + float __scrollingEffectHeightBottom; + Tizen::Base::Collection::HashMap __beforeBouncingMatrixHash; + +}; + +}}} // Tizen::Ui::Controls + +#endif //_FUICTRL_INTERNAL_FASTSCROLL_PRESENTER_H_ diff --git a/src/ui/inc/FUiCtrl_SearchBar.h b/src/ui/inc/FUiCtrl_SearchBar.h new file mode 100644 index 0000000..2a011a0 --- /dev/null +++ b/src/ui/inc/FUiCtrl_SearchBar.h @@ -0,0 +1,345 @@ +// +// 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_SearchBar.h + * @brief This is the header file for the _SearchBar class. + * + * This header file contains the declarations of the %_SearchBar class. + */ + +#ifndef _FUI_CTRL_INTERNAL_SEARCH_BAR_H_ +#define _FUI_CTRL_INTERNAL_SEARCH_BAR_H_ + +#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" + +const int SEARCHBAR_COLOR_MAX = 3; +const int SEARCHBAR_BUTTON_COLOR_MAX = 4; +const int SEARCHBAR_TEXT_LENGTH_MAX = 500; +const int SEARCHBAR_DEFAULT_OPACITY = 100; + +namespace Tizen { namespace Ui { namespace Animations +{ +class _VisualElement; +}}} // Tizen::Ui::Animations + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _Panel; +class _SearchBarPresenter; +class _ActionEvent; +class _TextBlockEvent; +class _TextEvent; + +/** + * @class _SearchBar + * @brief + * @since 2.1 + */ +class _SearchBar + : public _Control + , public _IActionEventListener + , public _IKeypadEventListener + , public _ITextBlockEventListener + , public _ITextEventListener + , virtual public Tizen::Base::Runtime::IEventListener + , virtual public Tizen::Ui::_IUiEventListener + , virtual public Tizen::Ui::_IUiEventPreviewer + , virtual public Tizen::System::ISettingEventListener +{ + DECLARE_CLASS_BEGIN(_SearchBar, _Control); + DECLARE_PROPERTY("buttonActionId", GetPropertyButtonActionId, SetPropertyButtonActionId); + DECLARE_PROPERTY("buttonDisabledColor", GetPropertyButtonDisabledColor, SetPropertyButtonDisabledColor); + DECLARE_PROPERTY("buttonHighlightedColor", GetPropertyButtonHighlightedColor, SetPropertyButtonHighlightedColor); + DECLARE_PROPERTY("buttonNormalColor", GetPropertyButtonNormalColor, SetPropertyButtonNormalColor); + DECLARE_PROPERTY("buttonPressedColor", GetPropertyButtonPressedColor, SetPropertyButtonPressedColor); + DECLARE_PROPERTY("buttonDisabledTextColor", GetPropertyButtonDisabledTextColor, SetPropertyButtonDisabledTextColor); + DECLARE_PROPERTY("buttonHighlightedTextColor", GetPropertyButtonHighlightedTextColor, SetPropertyButtonHighlightedTextColor); + DECLARE_PROPERTY("buttonNormalTextColor", GetPropertyButtonNormalTextColor, SetPropertyButtonNormalTextColor); + DECLARE_PROPERTY("buttonPressedTextColor", GetPropertyButtonPressedTextColor, SetPropertyButtonPressedTextColor); + DECLARE_PROPERTY("searchFieldDisabledColor", GetPropertySearchFieldDisabledColor, SetPropertySearchFieldDisabledColor); + DECLARE_PROPERTY("searchFieldHighlightedColor", GetPropertySearchFieldHighlightedColor, SetPropertySearchFieldHighlightedColor); + DECLARE_PROPERTY("searchFieldNormalColor", GetPropertySearchFieldNormalColor, SetPropertySearchFieldNormalColor); + DECLARE_PROPERTY("searchFieldDisabledTextColor", GetPropertySearchFieldDisabledTextColor, SetPropertySearchFieldDisabledTextColor); + DECLARE_PROPERTY("searchFieldHighlightedTextColor", GetPropertySearchFieldHighlightedTextColor, SetPropertySearchFieldHighlightedTextColor); + DECLARE_PROPERTY("searchFieldNormalTextColor", GetPropertySearchFieldNormalTextColor, SetPropertySearchFieldNormalTextColor); + DECLARE_PROPERTY("color", GetPropertyColor, SetPropertyColor); + DECLARE_PROPERTY("contentAreaSize", GetPropertyContentAreaSize, SetPropertyContentAreaSize); + DECLARE_CLASS_END(); + + result SetPropertyButtonActionId(const Tizen::Ui::Variant& actionId); + Tizen::Ui::Variant GetPropertyButtonActionId(void) const; + result SetPropertyButtonDisabledColor(const Tizen::Ui::Variant& color); + Tizen::Ui::Variant GetPropertyButtonDisabledColor(void) const; + result SetPropertyButtonHighlightedColor(const Tizen::Ui::Variant& color); + Tizen::Ui::Variant GetPropertyButtonHighlightedColor(void) const; + result SetPropertyButtonNormalColor(const Tizen::Ui::Variant& color); + Tizen::Ui::Variant GetPropertyButtonNormalColor(void) const; + result SetPropertyButtonPressedColor(const Tizen::Ui::Variant& color); + Tizen::Ui::Variant GetPropertyButtonPressedColor(void) const; + result SetPropertyButtonDisabledTextColor(const Tizen::Ui::Variant& textColor); + Tizen::Ui::Variant GetPropertyButtonDisabledTextColor(void) const; + result SetPropertyButtonHighlightedTextColor(const Tizen::Ui::Variant& textColor); + Tizen::Ui::Variant GetPropertyButtonHighlightedTextColor(void) const; + result SetPropertyButtonNormalTextColor(const Tizen::Ui::Variant& textColor); + Tizen::Ui::Variant GetPropertyButtonNormalTextColor(void) const; + result SetPropertyButtonPressedTextColor(const Tizen::Ui::Variant& textColor); + Tizen::Ui::Variant GetPropertyButtonPressedTextColor(void) const; + result SetPropertySearchFieldDisabledColor(const Tizen::Ui::Variant& color); + Tizen::Ui::Variant GetPropertySearchFieldDisabledColor(void) const; + result SetPropertySearchFieldHighlightedColor(const Tizen::Ui::Variant& color); + Tizen::Ui::Variant GetPropertySearchFieldHighlightedColor(void) const; + result SetPropertySearchFieldNormalColor(const Tizen::Ui::Variant& color); + Tizen::Ui::Variant GetPropertySearchFieldNormalColor(void) const; + result SetPropertySearchFieldDisabledTextColor(const Tizen::Ui::Variant& textColor); + Tizen::Ui::Variant GetPropertySearchFieldDisabledTextColor(void) const; + result SetPropertySearchFieldHighlightedTextColor(const Tizen::Ui::Variant& textColor); + Tizen::Ui::Variant GetPropertySearchFieldHighlightedTextColor(void) const; + result SetPropertySearchFieldNormalTextColor(const Tizen::Ui::Variant& textColor); + Tizen::Ui::Variant GetPropertySearchFieldNormalTextColor(void) const; + result SetPropertyColor(const Tizen::Ui::Variant& color); + Tizen::Ui::Variant GetPropertyColor(void) const; + result SetPropertyContentAreaSize(const Tizen::Ui::Variant& size); + Tizen::Ui::Variant GetPropertyContentAreaSize(void) const; + +public: + _SearchBar(void); + virtual ~_SearchBar(void); + + 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); + bool IsContentAreaVisible(void) const; + result SetContentAreaSize(const Tizen::Graphics::Dimension& size); + Tizen::Graphics::Dimension GetContentAreaSize(void) const; + SearchBarMode GetMode(void) const; + bool IsModeLocked(void) const; + result SetMode(SearchBarMode mode, bool isCalledByApp = false); + result SetModeLocked(bool modeLocked); + int GetButtonActionId(void) const; + Tizen::Graphics::Color GetButtonColor(SearchBarButtonStatus status) const; + Tizen::Graphics::Color GetButtonTextColor(SearchBarButtonStatus status) const; + SearchBarButtonStatus GetButtonStatus(void) const; + result SetButtonText(const Tizen::Base::String& text); + result SetButtonActionId(int actionId); + result SetButtonEnabled(bool enabled); + result SetButtonColor(SearchBarButtonStatus status, const Tizen::Graphics::Color& color); + result SetButtonTextColor(SearchBarButtonStatus status, const Tizen::Graphics::Color& color); + result AppendCharacter(const Tizen::Base::Character& character); + result AppendText(const Tizen::Base::String& text); + result SetText(const Tizen::Base::String& text); + result InsertCharacterAt(int index, const Tizen::Base::Character& character); + result InsertTextAt(int index, const Tizen::Base::String& text); + result DeleteCharacterAt(int index); + result Clear(void); + int GetTextLength(void) const; + Tizen::Base::String GetText(void) const; + Tizen::Base::String GetText(int start, int end) const; + int GetLimitLength(void) const; + result SetLimitLength(int limitLength); + result ShowKeypad(void) const; + result HideKeypad(void); + float GetSearchFieldTextSizeF(void) const; + result SetSearchFieldTextSize(float size); + result GetBlockRange(int& start, int& end) const; + result ReleaseBlock(void); + result SetBlockRange(int start, int end); + result RemoveTextBlock(void); + Tizen::Graphics::Color GetColor(void) const; + Tizen::Graphics::Color GetSearchFieldColor(SearchFieldStatus status) const; + Tizen::Graphics::Color GetSearchFieldTextColor(SearchFieldStatus status) const; + result SetBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap); + result SetColor(const Tizen::Graphics::Color& color); + result SetSearchFieldColor(SearchFieldStatus status, const Tizen::Graphics::Color& color); + result SetSearchFieldTextColor(SearchFieldStatus status, const Tizen::Graphics::Color& color); + Tizen::Base::String GetGuideText(void) const; + result SetGuideText(const Tizen::Base::String& guideText); + Tizen::Graphics::Color GetGuideTextColor(void) const; + result SetGuideTextColor(const Tizen::Graphics::Color& color); + int GetCursorPosition(void) const; + result SetCursorPosition(int index); + bool IsLowerCaseModeEnabled(void) const; + void SetLowerCaseModeEnabled(bool enable); + EllipsisPosition GetEllipsisPosition(void) const; + result SetEllipsisPosition(EllipsisPosition position); + CoreKeypadAction GetKeypadAction(void) const; + bool IsTextPredictionEnabled(void) const; + result SetTextPredictionEnabled(bool enable); + + result GetCurrentLanguage(Tizen::Locales::LanguageCode& language) const; + result SetCurrentLanguage(Tizen::Locales::LanguageCode languageCode); + + result AddActionEventListener(const _IActionEventListener& listener); + result RemoveActionEventListener(const _IActionEventListener& listener); + result AddKeypadEventListener(const _IKeypadEventListener& listener); + result RemoveKeypadEventListener(const _IKeypadEventListener& listener); + result AddTextBlockEventListener(const _ITextBlockEventListener& listener); + result RemoveTextBlockEventListener(const _ITextBlockEventListener& listener); + result AddTextEventListener(const _ITextEventListener& listener); + result RemoveTextEventListener(const _ITextEventListener& listener); + result AddSearchBarEventListener(const _ISearchBarEventListener& listener); + result RemoveSearchBarEventListener(const _ISearchBarEventListener& listener); + result AddLanguageEventListener(const _ILanguageEventListener& listener); + result RemoveLanguageEventListener(const _ILanguageEventListener& listener); + + void SetContentsArea(void); + + Tizen::Graphics::Bitmap* GetBackgroundBitmap(void) const; + bool IsUsableCancelButton(void) const; + + _Button* GetSearchBarButton(void) const; + _Edit* GetSearchField(void); + _Control* GetSearchBarContainer(void) const; + _Control* GetClippedGroupControl(void) const; + + result SendSearchBarEvent(_SearchBarEventStatus status); + void SetHeaderVisibleState(bool visible); + void SetContentDimming(void); + bool IsContentAttachable(const _Control* pContent); + result ResizeCancelButton(void); + void RecalculateButtonBounds(void); + SearchFieldStatus GetCurrentStatus(void); + void SetEditTextFilter(IEditTextFilter* pFilter); + void SendOpaqueCommand (const Tizen::Base::String& command); + 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); + + virtual void OnKeypadWillOpen(void); + virtual void OnKeypadOpened(void); + virtual void OnKeypadClosed(void); + virtual void OnKeypadBoundsChanged(void); + virtual void OnKeypadActionPerformed(CoreKeypadAction keypadAction); + + virtual void OnTextBlockSelected(Tizen::Ui::_Control& source, int start, int end); + + virtual void OnTextValueChanged(const Tizen::Ui::_Control& source); + virtual void OnTextValueChangeCanceled(const Tizen::Ui::_Control& source); + + virtual void OnBoundsChanged(void); + virtual void OnChangeLayout(_ControlOrientation orientation); + virtual result OnAttachedToMainTree(void); + virtual void OnFontChanged(Tizen::Graphics::Font* pFont); + virtual void OnFontInfoRequested(unsigned long& style, int& size); + virtual bool OnFocusGained(const _Control& source); + 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); + + virtual void OnSettingChanged(Tizen::Base::String& key); + virtual Tizen::Graphics::Canvas* OnCanvasRequestedN(const Tizen::Graphics::FloatRectangle& bounds); + +protected: + virtual void OnDraw(void); + +private: + _SearchBar(const _SearchBar&); + _SearchBar& operator =(const _SearchBar&); + + _ButtonStatus ConvertSearchBarButtonStatus(SearchBarButtonStatus status); + EditStatus ConvertSearchBarStatus(SearchFieldStatus status); + + result CreateSearchField(void); + result CreateCancelButton(void); + result CreateFrontButton(void); + result CreateContentsArea(void); + result CreateClippedGroupControl(void); + void InitializeAccessibility(void); + void FireButtonActionEvent(const Tizen::Ui::_Control& source, int actionId); + + Tizen::Ui::_Control* GetParentForm(void) const; + + _SearchBarPresenter* __pSearchBarPresenter; + + _Control* __pClippedGroupControl; + _Edit* __pEdit; + _Button* __pCancelButton; + _Control* __pContainer; + _Control* __pContentControl; + + int __actionId; + int __searchBarStyle; + + bool __isButtonEnabled; + bool __isUsableCancelButton; + bool __isUserContainerBounds; + bool __isCancelActionInProgress; + bool __isUserGuideTextColor; + bool __isKeypadOpening; + bool __isupdateContentBounds; + bool __isFocusCallbackToBeFired; + bool __isButtonTextChangedByApp; + bool __contentVisibilitySetByApp; + bool __isFocusUiInitialized; + bool __isTouchMoved; + + CoreKeypadAction __keypadAction; + + Tizen::Graphics::Bitmap* __pBackgroundBitmap; + Tizen::Graphics::Color __backgroundColor; + Tizen::Graphics::Color __contentColor; + + Tizen::Graphics::Color __color[SEARCHBAR_COLOR_MAX]; + Tizen::Graphics::Color __textColor[SEARCHBAR_COLOR_MAX]; + Tizen::Graphics::Color __buttonColor[SEARCHBAR_BUTTON_COLOR_MAX]; + Tizen::Graphics::Color __buttonTextColor[SEARCHBAR_BUTTON_COLOR_MAX]; + Tizen::Graphics::Color __guideTextColor[SEARCHBAR_COLOR_MAX]; + + Tizen::Graphics::FloatRectangle __contentAreaBounds; + + _ActionEvent* __pActionEvent; + _KeypadEvent* __pKeypadEvent; + _TextBlockEvent* __pTextBlockEvent; + _TextEvent* __pTextEvent; + _SearchBarEvent* __pSearchBarEvent; + _LanguageEvent* __pLanguageEvent; + + Tizen::Ui::_AccessibilityElement* __pAccessibilitySearchBarElement; + static const byte _SEARCH_CONTENT_DIM_OPACITY = 128; //50% opacity + static const float _TOUCH_PRESS_THRESHOLD_INSENSITIVE = 0.08f; +}; // _SearchBar + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_SEARCH_BAR_H_ diff --git a/src/ui/inc/FUiCtrl_SearchBarEvent.h b/src/ui/inc/FUiCtrl_SearchBarEvent.h new file mode 100644 index 0000000..220cf3a --- /dev/null +++ b/src/ui/inc/FUiCtrl_SearchBarEvent.h @@ -0,0 +1,113 @@ +// +// 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_SearchBarEvent.h + * @brief This is the header file for _SearchBarEvent class. + * @version 1.0 + * + * This header file contains declaration of _SearchBarEvent class. + * The SearchBarEvent class can call listener's method. So, when event occurred, + * application can handle it appropriately. + * + */ +#ifndef _FUI_CTRL_INTERNAL_SEARCH_BAR_EVENT_H_ +#define _FUI_CTRL_INTERNAL_SEARCH_BAR_EVENT_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _SearchBar; + +enum _SearchBarEventStatus +{ + _SEARCH_BAR_EVENT_MODE_CHANGE = 0, + _SEARCH_BAR_EVENT_CONTENT_AREA_RESIZE +}; + +/** +* @class _SearchBarEvent +* @brief This class handles a action event. It is inherited from Event class. +* +* The Window(root of all widgets) class has an instance of the _SearchBarEvent class as a member variable. +* Applications can register searchbar event listeners through it. When a searchbar event occurred, +* the _SearchBarEvent class finds listener and calls the appropriate listener's method. +* +*/ +class _SearchBarEvent + : public Tizen::Base::Runtime::_Event +{ +// Lifecycle +public: + /** + * This is the default class destructor. + * + */ + virtual ~_SearchBarEvent(void); + + static _SearchBarEvent* CreateInstanceN(const _SearchBar& source); + +// Accessors + /** + * This method returns the owner of this event. + * + * @return See the comment above. + */ + const _SearchBar* GetSource(void) const; + + static Tizen::Base::Runtime::IEventArg* CreateSearchBarEventArgN(_SearchBarEventStatus status); + +// Operations +protected: + /** + * This is the default class constructor. + * + * @remarks After creating an instance of this class, you must explicitly call one of + * construction methods to initialize the instance. + * + */ + _SearchBarEvent(const _SearchBar& source); + + /** + * This method checks the arg and finds out the type of event. After that this method calls appopriate + * pListener's method. + * + * @param[in] listener It is a event listener related to this action event. + * @param[in] arg It is an argument-like instance of action event retransmitted to the listener's method + * as an argument. + * @exception E_SUCCESS - The method is successful. + * @exception E_ARG_NULL - The listener is null. + * @exception E_INVALID_ARG - The argument passed to a method contains an invalid value.@n + *   The pListener is not the instance of IActionEventListener class or + * the p__SearchBarEventArg is not the instance of _SearchBarEventArg class. + * + */ + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + +//Attributess +private: + const _SearchBar* __pSource; + +}; // _SearchBarEvent + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_SEARCH_BAR_EVENT_H_ diff --git a/src/ui/inc/FUiCtrl_SearchBarImpl.h b/src/ui/inc/FUiCtrl_SearchBarImpl.h new file mode 100644 index 0000000..a20d48a --- /dev/null +++ b/src/ui/inc/FUiCtrl_SearchBarImpl.h @@ -0,0 +1,225 @@ +// +// 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_SearchBarImpl.h + * @brief This is the header file for the _SearchBarImpl class. + * + * This header file contains the declarations of the %_SearchBarImpl class. + */ + +#ifndef _FUI_CTRL_INTERNAL_SEARCH_BAR_IMPL_H_ +#define _FUI_CTRL_INTERNAL_SEARCH_BAR_IMPL_H_ + +#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" + + +namespace Tizen { namespace Ui { namespace Controls +{ +class _PublicActionEvent; +class _PublicTextEvent; +class _PublicTextBlockEvent; +class EditField; +class _EditFieldImpl; +class _ButtonImpl; + +class _SearchBarImpl + : public _ControlImpl + , public _IActionEventListener + , public _IKeypadEventListener + , public _ILanguageEventListener + , public _ITextBlockEventListener + , public _ITextEventListener + , public _ISearchBarEventListener + , public IKeyEventListener + , public IFocusEventListener +{ +public: + static _SearchBarImpl* CreateSearchBarImplN(SearchBar* pCore, const Tizen::Graphics::Rectangle& bounds, bool enableSearchBarButton = true, KeypadAction keypadAction = KEYPAD_ACTION_SEARCH); + static _SearchBarImpl* CreateSearchBarImplFN(SearchBar* pCore, const Tizen::Graphics::FloatRectangle& bounds, bool enableSearchBarButton = true, KeypadAction keypadAction = KEYPAD_ACTION_SEARCH); + + _SearchBarImpl(SearchBar* pPublic, _SearchBar* pCore); + + virtual ~_SearchBarImpl(void); + + virtual const char* GetPublicClassName(void) const; + virtual const SearchBar& GetPublic(void) const; + virtual SearchBar& GetPublic(void); + virtual const _SearchBar& GetCore(void) const; + virtual _SearchBar& GetCore(void); + + Tizen::Ui::Control* GetContent(void) const; + result SetContent(const Tizen::Ui::Control* pContent); + result UpdateContentArea(bool invalidate = true); + result SetContentAreaVisible(bool visible); + bool IsContentAreaVisible(void) const; + result SetContentAreaSize(const Tizen::Graphics::Dimension& size); + result SetContentAreaSize(const Tizen::Graphics::FloatDimension& size); + Tizen::Graphics::Dimension GetContentAreaSize(void) const; + Tizen::Graphics::FloatDimension GetContentAreaSizeF(void) const; + SearchBarMode GetMode(void) const; + bool IsModeLocked(void) const; + result SetMode(SearchBarMode mode); + result SetModeLocked(bool modeLocked); + int GetButtonActionId(void) const; + Tizen::Graphics::Color GetButtonColor(SearchBarButtonStatus status) const; + Tizen::Graphics::Color GetButtonTextColor(SearchBarButtonStatus status) const; + SearchBarButtonStatus GetButtonStatus(void) const; + result SetButton(const Tizen::Base::String& text, int actionId); + result SetButtonEnabled(bool enabled); + result SetButtonColor(SearchBarButtonStatus status, const Tizen::Graphics::Color& color); + result SetButtonTextColor(SearchBarButtonStatus status, const Tizen::Graphics::Color& color); + result AppendCharacter(const Tizen::Base::Character& character); + result AppendText(const Tizen::Base::String& text); + result SetText(const Tizen::Base::String& text); + result InsertCharacterAt(int index, const Tizen::Base::Character& character); + result InsertTextAt(int index, const Tizen::Base::String& text); + result DeleteCharacterAt(int index); + result Clear(void); + int GetTextLength(void) const; + Tizen::Base::String GetText(void) const; + Tizen::Base::String GetText(int start, int end) const; + int GetLimitLength(void) const; + result SetLimitLength(int limitLength); + result ShowKeypad(void) const; + result HideKeypad(void) const; + int GetSearchFieldTextSize(void) const; + float GetSearchFieldTextSizeF(void) const; + result SetSearchFieldTextSize(int size); + result SetSearchFieldTextSize(float size); + result GetBlockRange(int& start, int& end) const; + result ReleaseBlock(void); + result SetBlockRange(int start, int end); + result RemoveTextBlock(void); + Tizen::Graphics::Color GetColor(void) const; + Tizen::Graphics::Color GetSearchFieldColor(SearchFieldStatus status) const; + Tizen::Graphics::Color GetSearchFieldTextColor(SearchFieldStatus status) const; + result SetBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap); + result SetColor(const Tizen::Graphics::Color& color); + result SetSearchFieldColor(SearchFieldStatus status, const Tizen::Graphics::Color& color); + result SetSearchFieldTextColor(SearchFieldStatus status, const Tizen::Graphics::Color& color); + Tizen::Base::String GetGuideText(void) const; + result SetGuideText(const Tizen::Base::String& guideText); + Tizen::Graphics::Color GetGuideTextColor(void) const; + result SetGuideTextColor(const Tizen::Graphics::Color& color); + int GetCursorPosition(void) const; + result SetCursorPosition(int index); + bool IsLowerCaseModeEnabled(void) const; + void SetLowerCaseModeEnabled(bool enable); + EllipsisPosition GetEllipsisPosition(void) const; + result SetEllipsisPosition(EllipsisPosition position); + KeypadAction GetKeypadAction(void) const; + bool IsTextPredictionEnabled(void) const; + result SetTextPredictionEnabled(bool enable); + + result GetCurrentLanguage(Tizen::Locales::LanguageCode& language) const; + result SetCurrentLanguage(Tizen::Locales::LanguageCode languageCode); + + result AddActionEventListener(Tizen::Ui::IActionEventListener& listener); + result RemoveActionEventListener(Tizen::Ui::IActionEventListener& listener); + result AddTextEventListener(Tizen::Ui::ITextEventListener& listener); + result RemoveTextEventListener(Tizen::Ui::ITextEventListener& listener); + result AddSearchBarEventListener(const ISearchBarEventListener& listener); + result RemoveSearchBarEventListener(const ISearchBarEventListener& listener); + result AddTextBlockEventListener(Tizen::Ui::ITextBlockEventListener& listener); + result RemoveTextBlockEventListener(Tizen::Ui::ITextBlockEventListener& listener); + result AddKeypadEventListener(Tizen::Ui::IKeypadEventListener& listener); + result RemoveKeypadEventListener(Tizen::Ui::IKeypadEventListener& listener); + + result AddLanguageEventListener(Tizen::Ui::ILanguageEventListener& listener); + result RemoveLanguageEventListener(Tizen::Ui::ILanguageEventListener& listener); + + void SetEditTextFilter(IEditTextFilter* pFilter); + void SendOpaqueCommand (const Tizen::Base::String& command); + + virtual void OnActionPerformed(const Tizen::Ui::_Control& source, int actionId); + + virtual void OnKeypadWillOpen(void); + virtual void OnKeypadOpened(void); + virtual void OnKeypadClosed(void); + virtual void OnKeypadBoundsChanged(void); + virtual void OnKeypadActionPerformed(CoreKeypadAction keypadAction); + + virtual void OnTextBlockSelected(Tizen::Ui::_Control& source, int start, int end); + + virtual void OnTextValueChanged(const Tizen::Ui::_Control& source); + virtual void OnTextValueChangeCanceled(const Tizen::Ui::_Control& source); + + virtual void OnSearchBarModeChanged(_SearchBar& source, SearchBarMode mode); + + virtual void OnLanguageChanged(Tizen::Locales::LanguageCode oldLanguage, Tizen::Locales::LanguageCode newLanguage); + + void OnFocusEventListenerAdded(IFocusEventListener& listener); + void OnFocusEventListenerRemoved(IFocusEventListener& listener); + + //Focus Callbacks + virtual void OnFocusGained(const Tizen::Ui::Control& source); + virtual void OnFocusLost(const Tizen::Ui::Control& source); + + //Key event Callbacks + virtual void OnKeyPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode); + virtual void OnKeyReleased(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode); + virtual void OnKeyLongPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode); + + static _SearchBarImpl* GetInstance(SearchBar& searchBar); + static const _SearchBarImpl* GetInstance(const SearchBar& searchBar); + + _EditFieldImpl* GetEditFieldImpl(void) const; + _ButtonImpl* GetButtonImpl(void) const; + +private: + _SearchBarImpl(const _SearchBarImpl&); + _SearchBarImpl& operator =(const _SearchBarImpl&); + + result Initialize(bool enableSearchBarButton, KeypadAction keypadAction); + KeypadAction ConvertKeypadAction(CoreKeypadAction keypadAction) const; + CoreKeypadAction ConvertKeypadAction(KeypadAction keypadAction) const; + + _SearchBar* __pSearchBar; + + EditField* __pEditField; + Button* __pButton; + _EditFieldImpl* __pEditFieldImpl; + _ButtonImpl* __pButtonImpl; + + Control* __pContentControl; + + _PublicActionEvent* __pPublicActionEvent; + _PublicKeypadEvent* __pPublicKeypadEvent; + _PublicTextBlockEvent* __pPublicTextBlockEvent; + _PublicTextEvent* __pPublicTextEvent; + _PublicSearchBarEvent* __pPublicSearchBarEvent; + _PublicLanguageEvent* __pPublicLanguageEvent; + + PublicEventListenerList* __pPublicFocusEventListeners; + +}; // _SearchBarImpl + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_SEARCH_BAR_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_SearchBarModel.h b/src/ui/inc/FUiCtrl_SearchBarModel.h new file mode 100644 index 0000000..e4824a3 --- /dev/null +++ b/src/ui/inc/FUiCtrl_SearchBarModel.h @@ -0,0 +1,147 @@ +// +// 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_SearchBarModel.h + * @brief This is the header file for the _SearchBarModel class. + * + * This header file contains the declarations of the %_SearchBarModel class. + */ + +#ifndef _FUI_CTRL_INTERNAL_SEARCH_BAR_MODEL_H_ +#define _FUI_CTRL_INTERNAL_SEARCH_BAR_MODEL_H_ + +#include +#include "FUiCtrl_SearchBarPresenter.h" + +namespace Tizen { namespace Ui { namespace Controls +{ +/** + * @class _SearchBarModel + * @brief + * @since 2.1 + */ +class _SearchBarModel + : public Tizen::Base::Object +{ +// Lifecycle +public: + /** + * This is default constructor for this class. + * + * @since 2.0 + */ + _SearchBarModel(void); + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~_SearchBarModel(void); + +// Operations + virtual result Construct(void); + + /** + * Sets the visibility state of the content area. + * + * @since 2.0 + * @return An error code + * @param[in] visible The visibility state of the content area. + * @exception E_SUCCESS The method was successful. + * @exception E_SYSTEM A system error occurred. + * @see IsContentAreaVisible() + */ + result SetContentAreaVisible(bool visible); + + /** + * Checks whether the content area is visible. + * + * @since 2.0 + * @return The visibility state of the content area. + * @exception E_SUCCESS The method was successful. + * @see SetContentAreaVisible() + */ + bool IsContentAreaVisible(void) const; + + /** + * Gets the search bar mode. + * + * @since 2.0 + * @return The search bar mode + * @exception E_SUCCESS The method was successful. + * @exception E_SYSTEM A system error occurred. + * @remarks The specific error code can be accessed using the GetLastResult() method. + * @see SetMode() + */ + SearchBarMode GetMode(void) const; + + /** + * Determines whether the search bar mode is locked. + * + * @since 2.0 + * @return @c true if the mode is locked, @n + * else @c false + * @exception E_SUCCESS The method was successful. + * @exception E_SYSTEM A system error occurred. + * @remarks The specific error code can be accessed using the GetLastResult() method. + * @see SetModeLock() + */ + bool IsModeLocked(void) const; + + /** + * Sets the search bar mode. + * + * @since 2.0 + * @return An error code + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation, or the mode is locked. + * @exception E_SYSTEM A system error occurred. + * @see GetMode() + * @see SetModeLock() + */ + result SetMode(SearchBarMode mode); + + /** + * Locks or unlocks the search bar mode. + * + * @since 2.0 + * @return An error code + * @param[in] modeLocked The mode lock + * @exception E_SUCCESS The method was successful. + * @exception E_SYSTEM A system error occurred. + * @see GetMode() + */ + result SetModeLocked(bool modeLocked); + + +private: + _SearchBarModel(const _SearchBarModel& value); + + _SearchBarModel& operator =(const _SearchBarModel& value); + +// Attributes + bool __isContentAreaVisible; + bool __isModeLocked; + SearchBarMode __searchBarMode; + +}; // _SearchBarModel + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_SEARCH_BAR_MODEL_H_ diff --git a/src/ui/inc/FUiCtrl_SearchBarPresenter.h b/src/ui/inc/FUiCtrl_SearchBarPresenter.h new file mode 100644 index 0000000..47a99e4 --- /dev/null +++ b/src/ui/inc/FUiCtrl_SearchBarPresenter.h @@ -0,0 +1,126 @@ +// +// 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_SearchBarPresenter.h + * @brief This is the header file for the _SearchBarPresenter class. + * + * This header file contains the declarations of the %_SearchBarPresenter class. + */ + +#ifndef _FUI_CTRL_INTERNAL_SEARCH_BAR_PRESENTER_H_ +#define _FUI_CTRL_INTERNAL_SEARCH_BAR_PRESENTER_H_ + +#include +#include "FUiCtrl_SearchBar.h" + +namespace Tizen { namespace Ui { namespace Animations +{ +class _VisualElement; +}}} // Tizen::Ui::Animations + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _SearchBar; +class _SearchBarModel; + +/** + * @class _SearchBarPresenter + * @brief + * @since 2.1 + */ +class _SearchBarPresenter + : public Tizen::Base::Object +{ +public: + /** + * This is default constructor for this class. + * + * @since 2.0 + */ + _SearchBarPresenter(void); + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~_SearchBarPresenter(void); + +// Operations + result Construct(const _SearchBar& searchBar); + result Install(void); + result UpdateContentArea(bool invalidate = true); + + result SetContentAreaVisible(bool visible); + bool IsContentAreaVisible(void) const; + SearchBarMode GetMode(void) const; + + bool IsModeLocked(void) const; + + result SetMode(SearchBarMode mode, bool isCalledByApp = false); + result SetModeLocked(bool modeLocked); + void SetHeaderVisibleState(bool visible); + + result Draw(void); + + // callback + void OnBoundsChanged(void); + void OnTouchReleased(const _Control& source); + virtual Tizen::Graphics::Canvas* OnCanvasRequestedN(const Tizen::Graphics::FloatRectangle& bounds); + +private: + _SearchBarPresenter(const _SearchBarPresenter&); + + _SearchBarPresenter& operator =(const _SearchBarPresenter&); + + void SetCancelButtonVisible(bool visible); + void SetContainerVisible(bool visible); + result DrawIcon(void); + result DrawSearchBarDefaultBitmap(void); + + result ChangeMode(SearchBarMode mode, bool isCalledByApp); + void InitializeInputModeLayout(void); + void InitializeViewModeLayout(void); + result LoadSearchBarBitmaps(void); + + _SearchBar* __pSearchBar; + _SearchBarModel* __pSearchBarModel; + + _Button* __pCancelButton; + _Edit* __pEdit; + _Control* __pContainer; + + Tizen::Graphics::FloatRectangle __searchFieldBounds; + + Tizen::Ui::Animations::_VisualElement* __pIconElement; + + Tizen::Graphics::Bitmap* __pReplacedSearchFieldNormalBitmap; + Tizen::Graphics::Bitmap* __pReplacedSearchFieldDisabledBitmap; + Tizen::Graphics::Bitmap* __pReplacedSearchBarBitmap; + Tizen::Graphics::Bitmap* __pSearchFieldEffectBitmap; + Tizen::Graphics::Bitmap* __pSearchBarEffectBitmap; + Tizen::Graphics::Color __currentBgColor; + + bool __lazyDecode; + +}; // _SearchBarPresenter + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_SEARCH_BAR_PRESENTER_H_ diff --git a/src/ui/inc/FUiCtrl_SimpleItemImpl.h b/src/ui/inc/FUiCtrl_SimpleItemImpl.h new file mode 100644 index 0000000..dd834d0 --- /dev/null +++ b/src/ui/inc/FUiCtrl_SimpleItemImpl.h @@ -0,0 +1,66 @@ +// +// 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_SimpleItemImpl.h + * @brief This is the header file for the _SimpleItemImpl class. + * + * This header file contains the declarations of the _SimpleItemImpl class. + */ + +#ifndef _FUI_CTRL_SIMPLE_ITEM_IMPL_H_ +#define _FUI_CTRL_SIMPLE_ITEM_IMPL_H_ + +#include "FUiCtrl_ListItemBaseImpl.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class SimpleItem; + +class _SimpleItemImpl + : public _ListItemBaseImpl +{ +public: + static _SimpleItemImpl* CreateSimpleItemImplN(SimpleItem* pPublic, const Tizen::Graphics::FloatDimension& itemSize, ListAnnexStyle style); + + virtual ~_SimpleItemImpl(void); + + virtual const char* GetPublicClassName(void) const; + + virtual const SimpleItem& GetPublic(void) const; + + virtual SimpleItem& GetPublic(void); + + virtual result Construct(const Tizen::Graphics::FloatDimension& itemSize, ListAnnexStyle style); + + result SetElement(const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBitmap = null); + +private: + _SimpleItemImpl(SimpleItem* pPublic); + + _SimpleItemImpl(const _SimpleItemImpl& rhs); + + _SimpleItemImpl& operator =(const _SimpleItemImpl& rhs); + +private: + static const float SIMPLE_ITEM_ELEMENT_BITMAP_SIZE_RATIO = 0.6f; +}; // _SimpleItemImpl + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_SIMPLE_ITEM_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_SlidableGroupedListImpl.h b/src/ui/inc/FUiCtrl_SlidableGroupedListImpl.h new file mode 100644 index 0000000..2d53f43 --- /dev/null +++ b/src/ui/inc/FUiCtrl_SlidableGroupedListImpl.h @@ -0,0 +1,298 @@ +// +// 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_SlidableGroupedListImpl.h + * @brief This is the header file for _SlidableGroupedListImpl class. + */ + +#ifndef _FUI_CTRL_SLIDABLE_GROUPED_LIST_IMPL_H_ +#define _FUI_CTRL_SLIDABLE_GROUPED_LIST_IMPL_H_ + +#include +#include +#include +#include + +#include "FUi_ControlImpl.h" +#include "FUiCtrl_TableViewItemProvider.h" +#include "FUiCtrl_ITableViewItemEventListener.h" +#include "FUiCtrl_TableView.h" +#include "FUiCtrl_ListBaseImpl.h" +#include "FUiCtrl_IFastScrollListener.h" +#include "FUiCtrl_CustomListItemImpl.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _SlidableGroupedListItemProvider + : public IGroupedTableViewItemProvider +{ + +public: + _SlidableGroupedListItemProvider(class _SlidableGroupedListImpl* pList); + virtual ~_SlidableGroupedListItemProvider(void){} + +public: + int GetGroupCount(void); + int GetItemCount(int groupIndex); + TableViewGroupItem* CreateGroupItem(int groupIndex, int itemWidth); + TableViewItem* CreateItem(int groupIndex, int itemIndex, int itemWidth); + bool DeleteItem(int groupIndex, int itemIndex, TableViewItem* pItem); + bool DeleteGroupItem(int groupIndex, TableViewGroupItem* pItem); + bool IsReorderable(int groupIndexFrom, int groupIndexTo); + + void UpdateGroupItem(int groupIndex, TableViewGroupItem* pItem); + void UpdateItem(int groupIndex, int itemIndex, TableViewItem* pItem); + int GetDefaultGroupItemHeight(void); + int GetDefaultItemHeight(void); + + result UpdateCheckStatus(int groupIndex, int itemIndex); + result CallLoadToTopCb(int groupIndex, int itemIndex); + result ModifyIndicesAfterTopLoad(); + _TableViewItemData* LoadAtTop(int groupIndex, int itemIndex); + result CallLoadToBottomCb(int groupIndex, int itemIndex); + result ModifyIndicesAfterBottomLoad(int groupIndex, int itemIndex); + _TableViewItemData* LoadAtBottom(int groupIndex, int itemIndex); + + bool firstTime; +private: + _SlidableGroupedListItemProvider(const _SlidableGroupedListItemProvider& rhs); + _SlidableGroupedListItemProvider& operator =(const _SlidableGroupedListItemProvider& rhs); + + + _SlidableGroupedListImpl* __pListImpl; + int __bottomListenerIndex; + int __topListenerIndex; +}; //_SlidableGroupedListItemProvider + +class _SlidableGroupObject + : public Tizen::Base::Object +{ + +public: + _SlidableGroupObject(void); + ~_SlidableGroupObject(void); + +private: + _SlidableGroupObject(const _SlidableGroupObject& rhs); + _SlidableGroupObject& operator =(const _SlidableGroupObject& rhs); + + int __itemCount; + int __groupHeight; + int __topIndex; + + Tizen::Base::Collection::ArrayList* __pCheckedList; + + friend class _SlidableGroupedListImpl; + friend class _SlidableGroupedListItemProvider; + +}; //_SlidableGroupObject + +class _SlidableGroupedListImpl + : public _ITableViewItemEventListener + , public _IUiFastScrollListener + , public _ListBaseImpl +{ +public: + _SlidableGroupedListImpl(Control* pList, _TableView* pCore); + ~_SlidableGroupedListImpl(void); + static _SlidableGroupedListImpl* CreateSlidableGroupedListImplN(SlidableGroupedList* pControl, const Tizen::Graphics::Rectangle& bounds, bool itemDivider, bool fastScroll); + + //@See doxygen + void AddSlidableGroupedListEventListener(Tizen::Ui::ISlidableGroupedListEventListener& listener); + //@See doxygen + void RemoveSlidableGroupedListEventListener(Tizen::Ui::ISlidableGroupedListEventListener& listener); + //@See doxygen + void AddFastScrollEventListener(Tizen::Ui::IFastScrollEventListener& listener); + //@See doxygen + result AddGroup(const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBackgroundBitmap, int itemCount, int groupHeight, int groupId); + //@See doxygen + void AddGroupedItemEventListener(Tizen::Ui::IGroupedItemEventListener& listener); + //@See doxygen + result AddItem(int groupIndex, const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID); + //@See doxygen + result GetBottomDrawnItemIndex(int& groupIndex, int& itemIndex) const; + //@See doxygen + result GetFirstCheckedItemIndex(int& groupIndex, int& itemIndex) const; + //@See doxygen + int GetGroupIdAt(int groupIndex) const; + //@See doxygen + int GetGroupIndexFromGroupId(int groupId) const; + //@See doxygen + result GetFirstLoadedItemIndex(int& groupIndex, int& itemIndex) const; + //@See doxygen + result GetLastLoadedItemIndex(int& groupIndex, int& itemIndex) const; + //@See doxygen + result SetFastScrollMainIndex(const Tizen::Base::String& text); + //@See doxygen + result GetItemIndexFromPosition(int x, int y, int& groupIndex, int& itemIndex) const; + //@See doxygen + result GetItemIndexFromPosition(const Tizen::Graphics::Point& position, int& groupIndex, int& itemIndex) const; + //@See doxygen + result InsertGroupAt(int groupIndex, const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBackgroundBitmap, int itemCount, int groupHeight, int groupId); + //@See doxygen + result GetLastCheckedItemIndex(int& groupIndex, int& itemIndex) const; + //@See doxygen + const CustomListItem* GetLoadedItemAt(int groupIndex, int index) const; + //@See doxygen + int GetLoadedItemIdAt(int groupIndex, int index) const; + //@See doxygen + result GetNextCheckedItemIndexAfter(int& groupIndex, int& index) const; + //@See doxygen + result GetTopDrawnItemIndex(int& groupIndex, int& itemIndex) const; + //@See doxygen + bool IsItemChecked(int groupIndex, int index) const; + //@See doxygen + bool IsItemEnabled(int index) const; + //@See doxygen + bool IsItemLoaded(int groupIndex, int itemIndex) const; + //@See doxygen + result RemoveAllGroups(void); + //@See doxygen + result InsertItemAt(int groupIndex, int index, const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID); + //@See doxygen + int GetItemCountAt(int groupIndex) const; + //@See doxygen + result RefreshItem(int groupIndex, int index); + //@See doxygen + result RefreshGroup(int groupIndex); + //@See doxygen + bool IsLoadedItemEnabled(int groupIndex, int index) const; + //@See doxygen + result LoadItemToTop(const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID); + //@See doxygen + result LoadItemToBottom(const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID); + //@See doxygen + result GetLoadedItemIndexFromItemId(int itemId, int& groupIndex, int& itemIndex) const; + //@See doxygen + result UnloadAllItems(void); + //@See doxygen + result RemoveAllCheckedItemsAt(int groupIndex, int itemHeight); + //@See doxygen + result RemoveAllCheckedItems(int itemHeight); + //@See doxygen + result RemoveAllItemsAt(int groupIndex); + //@See doxygen + result RemoveAllItems(void); + //@See doxygen + void RemoveFastScrollEventListener(IFastScrollEventListener& listener); + //@See doxygen + void RemoveGroupedItemEventListener(IGroupedItemEventListener& listener); + //@See doxygen + result RemoveItemAt(int groupIndex, int index, int itemHeight); + //@See doxygen + result RemoveGroupAt(int groupIndex); + //@See doxygen + void ScrollToBottom(void); + //@See doxygen + result ScrollToTop(int index); + //@See doxygen + result ScrollToTop(int groupIndex, int itemIndex); + //@See doxygen + void ScrollToTop(void); + //@See doxygen + result SetAllItemsChecked(int groupIndex, bool check); + //@See doxygen + result SetItemAt(int groupIndex, int itemIndex, const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID); + //@See doxygen + result SetItemChecked(int groupIndex, int index, bool check); + //@See doxygen + result SetItemEnabled(int index, bool enable); + //@See doxygen + result SetLoadedItemEnabled(int groupIndex, int index, bool enable); + //@See doxygen + result SetGroupAt(int groupIndex, const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBackgroundBitmap, int groupId); + + void OnTableViewItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status); + void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::_TableView& tableView, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pContextItem, bool activated); + void OnTableViewItemReordered(Tizen::Ui::Controls::_TableView& tableView, int itemIndexFrom, int itemIndexTo); + void OnGroupedTableViewGroupItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status); + void OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status); + void OnGroupedTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pContextItem, bool activated); + void OnGroupedTableViewItemReordered(Tizen::Ui::Controls::_TableView& tableView, int groupIndexFrom, int itemIndexFrom, int groupIndexTo, int itemIndexTo); + void OnSectionTableViewItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int sectionIndex, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status); + void OnSectionTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::_TableView& tableView, int sectionIndex, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pContextItem, bool activated); + void OnTableViewItemSwept(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewSweepDirection direction); + + void OnUiFastScrollIndexSelected(Tizen::Ui::_Control& source, Tizen::Ui::Controls::_FastScrollIndex& index); + + void OnDraw(void); + + void Initialize(void); + int GetTopItemIndex(int groupIndex) const; + +public: + static _SlidableGroupedListImpl* GetInstance(SlidableGroupedList& slidableGroupedList); + static const _SlidableGroupedListImpl* GetInstance(const SlidableGroupedList& slidableGroupedList); + +private: + _SlidableGroupedListImpl(const _SlidableGroupedListImpl& rhs); + _SlidableGroupedListImpl& operator =(const _SlidableGroupedListImpl& rhs); + + const char* GetPublicClassName(void) const; + const SlidableGroupedList& GetPublic(void) const; + SlidableGroupedList& GetPublic(void); + const _TableView& GetCore(void) const; + _TableView& GetCore(void); + + void ProcessItemStateChange(int groupIndex, int index, int elementId, ItemStatus itemStatus); + void ProcessItemStateChange(int groupIndex, int index, ItemStatus itemStatus); + + void CallUnloadItemCb(int groupIndex, int itemIndex); + + int GetCurrentLoadedCount(void); + result CreateItemProvider(void); + CustomListItem* CreateGroupItemN(const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBackgroundBitmap, int groupId); + + bool IsCheckedStyle(void); + const bool IsCheckedStyle(void) const; + + result CreateGroupObject(int groupIndex, int itemCount, int groupHeight); + result UpdateCheckedList(int groupIndex, int index, bool check); + + result SetItemCheckedMarkOnOff(int groupIndex, int index, bool check); + result SetItemCheckedRadio(int groupIndex, int index, bool check); + + Tizen::Base::Collection::LinkedList __groupsList; + Tizen::Ui::IFastScrollEventListener* __pFastScrollListener; + Tizen::Base::String __mainScrollIndex; + Tizen::Base::String __subScrollIndex; + + int __bottomGroup; + int __topGroup; + int __loadedCount; + bool __isFullUpdate; + _SlidableGroupedListItemProvider* __pItemProvider; + Tizen::Base::Collection::LinkedList __slidableListenersList; + Tizen::Base::Collection::LinkedList __itemListenersList; + bool __isUnloading; + bool __directDelete; + bool __forceScroll; + bool __isCreating; + int __groupItemTextFont; + int __groupItemHeight; + int __itemCacheSize; + CustomListItemFormat* __pItemFormat; + + friend class _SlidableGroupedListItemProvider; +}; //_SlidableGroupedListImpl + +}}} //Tizen::Ui::Controls + +#endif // _FUI_CTRL_SLIDABLE_GROUPED_LIST_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_SlidableListImpl.h b/src/ui/inc/FUiCtrl_SlidableListImpl.h new file mode 100644 index 0000000..cec7ee2 --- /dev/null +++ b/src/ui/inc/FUiCtrl_SlidableListImpl.h @@ -0,0 +1,233 @@ +// +// 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_SlidableListImpl.h + * @brief This is the header file for the _SlidableListImpl class. + */ + +#ifndef _FUI_CTRL_SLIDABLE_LIST_IMPL_H_ +#define _FUI_CTRL_SLIDABLE_LIST_IMPL_H_ + +#include + +#include "FUiCtrl_CustomListItemImpl.h" +#include "FUiCtrl_IFastScrollListener.h" +#include "FUiCtrl_TableView.h" +#include "FUiCtrl_ListBaseImpl.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class CustomListItem; +class _SlidableListImpl; +class _TableViewItemData; + +class _SlidableListItemProvider + : public ITableViewItemProvider +{ +public: + _SlidableListItemProvider(_SlidableListImpl* pList); + virtual ~_SlidableListItemProvider(void){} + +public: + virtual int GetItemCount(void); + virtual TableViewItem* CreateItem(int index, int itemWidth); + virtual bool DeleteItem(const int itemIndex, TableViewItem* pItem); + virtual void UpdateItem(int itemIndex, TableViewItem* pItem); + virtual int GetDefaultItemHeight(void); + + result UpdateCheckStatus(int index); + result CallLoadToTopCb(int index); + _TableViewItemData* LoadAtTop(int index); + result CallLoadToBottomCb(int index); + _TableViewItemData* LoadAtBottom(int index); + + bool firstTime; + int bottomListenerIndex; + int topListenerIndex; + +private: + _SlidableListItemProvider(const _SlidableListItemProvider& rhs); + _SlidableListItemProvider& operator =(const _SlidableListItemProvider& rhs); + _SlidableListImpl* __pListImpl; + + friend class _CustomListItemImpl; + +}; //_SlidableListItemProvider + +class _SlidableListImpl + : public _ListBaseImpl + , public _ITableViewItemEventListener +{ +private: + _SlidableListImpl(Control* pList, _TableView* pCore); + ~_SlidableListImpl(void); + + void ProcessItemStateChange(int groupIndex, int index, int elementId, ItemStatus itemStatus); + void ProcessItemStateChange(int groupIndex, int index, ItemStatus itemStatus); + +public: + static _SlidableListImpl* CreateSlidableListImplN(SlidableList* pControl, const Tizen::Graphics::Rectangle& bounds, bool itemDivider); + + void AddSlidableListEventListener(const Tizen::Ui::ISlidableListEventListener& listener); + void RemoveSlidableListEventListener(const Tizen::Ui::ISlidableListEventListener& listener); + + void AddCustomItemEventListener(const Tizen::Ui::ICustomItemEventListener& listener); + + result AddItem(const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID); + //@See doxygen + int GetBottomDrawnItemIndex(void) const; + //@See doxygen + int GetFirstCheckedItemIndex(void) const; + //@See doxygen + int GetFirstLoadedItemIndex(void) const; + //@See doxygen + int GetLastLoadedItemIndex(void) const; + //@See doxygen + int GetItemCount(void) const; + int GetItemIndexFromItemId(int itemId) const; + //@See doxygen + int GetItemIndexFromPosition(int x, int y) const; + //@See doxygen + int GetItemIndexFromPosition(const Tizen::Graphics::Point& position) const; + //@See doxygen + int GetLastCheckedItemIndex(void) const; + //@See doxygen + const CustomListItem* GetLoadedItemAt(int index) const; + //@See doxygen + int GetLoadedItemIdAt(int index) const; + //@See doxygen + int GetNextCheckedItemIndexAfter(int index) const; + //@See doxygen + int GetTopDrawnItemIndex(void) const; + //@See doxygen + result InsertItemAt(int index, const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID); + //@See doxygen + bool IsItemChecked(int index) const; + //@See doxygen + bool IsItemLoaded(int index) const; + //@See doxygen + bool IsLoadedItemEnabled(int index) const; + //@See doxygen + result LoadItemToTop(const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID); + //@See doxygen + result LoadItemToBottom(const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID); + //@See doxygen + void SetItemCountAndHeight(int count, int listHeight); + + //@See doxygen + int GetLoadedItemIndexFromItemId(int itemId) const; + + //@See doxygen + result UnloadAllItems(void); + //@See doxygen + result RefreshItem(int index); + //@See doxygen + result RemoveAllCheckedItems(int itemHeight); + //@See doxygen + result RemoveAllItems(void); + //@See doxygen + void RemoveCustomItemEventListener(const Tizen::Ui::ICustomItemEventListener& listener); + //@See doxygen + result RemoveItemAt(int index, int itemHeight); + //@See doxygen + void ScrollToBottom(void); + //@See doxygen + result ScrollToTop(int index); + //@See doxygen + void ScrollToTop(void); + //@See doxygen + result SetAllItemsChecked(bool check); + + //@See doxygen + result SetItemAt(int index, const CustomListItem& item, int itemId = LIST_ITEM_UNSPECIFIED_ID); + //@See doxygen + result SetItemChecked(int index, bool check); + result SetItemChecked(int groupindex, int index, bool check); + //@See doxygen + result SetLoadedItemEnabled(int index, bool enable); + + virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status); + + virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::_TableView& tableView, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pContextItem, bool activated); + + virtual void OnTableViewItemReordered(Tizen::Ui::Controls::_TableView& tableView, int itemIndexFrom, int itemIndexTo); + + virtual void OnGroupedTableViewGroupItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status); + + virtual void OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status); + + virtual void OnGroupedTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pContextItem, bool activated); + + virtual void OnGroupedTableViewItemReordered(Tizen::Ui::Controls::_TableView& tableView, int groupIndexFrom, int itemIndexFrom, int groupIndexTo, int itemIndexTo); + + virtual void OnSectionTableViewItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int sectionIndex, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status); + + virtual void OnSectionTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::_TableView& tableView, int sectionIndex, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pContextItem, bool activated); + + virtual void OnTableViewItemSwept(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewSweepDirection direction); + + result Initalize(void); + result UpdateBounds(const Tizen::Graphics::Rectangle& rect); + + void OnDraw(void); + int GetTopItemIndex(void); + bool IsItemChecked(int groupIndex, int subIndex) const; + +public: + static _SlidableListImpl* GetInstance(SlidableList& slidableList); + static const _SlidableListImpl* GetInstance(const SlidableList& slidableList); + +private: + _SlidableListImpl(const _SlidableListImpl& rhs); + _SlidableListImpl& operator =(const _SlidableListImpl& rhs); + + void CallUnloadItemCb(int index); + void HandleItemStateChanged(int index, int elementId, ItemStatus itemStatus); + void HandleItemStateChanged(int index, ItemStatus itemStatus); + bool IsCheckedStyle(void); + const bool IsCheckedStyle(void) const; + + result CreateItemProvider(void); + + const char* GetPublicClassName(void) const; + const SlidableList& GetPublic(void) const; + SlidableList& GetPublic(void); + const _TableView& GetCore(void) const; + _TableView& GetCore(void); + + Tizen::Base::Collection::ArrayList* __pCheckedList; + Tizen::Base::Collection::LinkedList __slidableListenersList; + Tizen::Base::Collection::LinkedList __itemListenersList; + + int __totalItemCount; + int __topIndex; + _SlidableListItemProvider* __pItemProvider; + bool __isFullUpdate; + bool __isCreating; + int __itemCacheSize; + bool __isForcedScroll; + static const int LISTVIEW_MAX_ITEM_COUNT = 30; + static const int LISTVIEW_ITEM_HEIGHT = 100; + friend class _SlidableListItemProvider; + friend class _CustomListItemImpl; +}; //_SlidableListImpl +}}} //Tizen::Ui::Controls + +#endif // _FUI_CTRL_SLIDABLE_LIST_IMPL_H_ + diff --git a/src/ui/inc/FUiCtrl_Slider.h b/src/ui/inc/FUiCtrl_Slider.h new file mode 100644 index 0000000..11d519f --- /dev/null +++ b/src/ui/inc/FUiCtrl_Slider.h @@ -0,0 +1,197 @@ +// +// 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_Slider.h + * @brief This is the header file for the _Slider class. + * + * This header file contains the declarations of the %_Slider class. + */ +#ifndef _FUI_CTRL_INTERNAL_SLIDER_H_ +#define _FUI_CTRL_INTERNAL_SLIDER_H_ + +#include +#include "FUi_Control.h" +#include "FUiCtrl_AdjustmentEvent.h" +#include "FUiCtrl_SliderEvent.h" +#include "FUi_IAccessibilityListener.h" +const int _SLIDER_MAXIMUM_VALUE = 999; +const int _SLIDER_MINIMUM_VALUE = -99; + +namespace Tizen { namespace Ui +{ +class _AccessibilityElement; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ +class _SliderPresenter; +class _ISliderEventListener; +class _IAdjustmentEventListener; + +enum _SliderStyle +{ + _SLIDER_STYLE_NONE = 0x00000000, + _SLIDER_STYLE_OVERLAY = 0x00000001, + _SLIDER_STYLE_TITLE_TEXT = 0x00000002, + _SLIDER_STYLE_NO_BG = 0x00000004 +}; + +class _OSP_EXPORT_ _Slider + : public Tizen::Ui::_Control + , virtual public Tizen::Base::Runtime::IEventListener + , virtual public Tizen::Ui::_IUiEventListener + , virtual public Tizen::Ui::_IUiEventPreviewer + , public Tizen::Ui::_IAccessibilityListener +{ + DECLARE_CLASS_BEGIN(_Slider, Tizen::Ui::_Control); + DECLARE_PROPERTY("value", GetPropertyValue, SetPropertyValue); + DECLARE_PROPERTY("minValue", GetPropertyMinValue, SetPropertyMinValue); + DECLARE_PROPERTY("maxValue", GetPropertyMaxValue, SetPropertyMaxValue); + DECLARE_PROPERTY("barColor", GetPropertyBarColor, SetPropertyBarColor); + DECLARE_PROPERTY("barBackgroundColor", GetPropertyBarBackgroundColor, SetPropertyBarBackgroundColor); + DECLARE_PROPERTY("color", GetPropertyColor, SetPropertyColor); + DECLARE_PROPERTY("titleText", GetPropertyTitleText, SetPropertyTitleText); + DECLARE_PROPERTY("titleTextColor", GetPropertyTitleTextColor, SetPropertyTitleTextColor); + DECLARE_CLASS_END(); + +public: + result SetPropertyValue(const Tizen::Ui::Variant& value); + result SetPropertyMinValue(const Tizen::Ui::Variant& minValue); + result SetPropertyMaxValue(const Tizen::Ui::Variant& maxValue); + result SetPropertyBarColor(const Tizen::Ui::Variant& barColor); + result SetPropertyBarBackgroundColor(const Tizen::Ui::Variant& barBackgroundColor); + result SetPropertyTitleText(const Tizen::Ui::Variant& titleText); + result SetPropertyTitleTextColor(const Tizen::Ui::Variant& titleTextColor); + result SetPropertyColor(const Tizen::Ui::Variant& color); + void SetAccessibilityElementValue(void); + + Tizen::Ui::Variant GetPropertyValue(void) const; + Tizen::Ui::Variant GetPropertyMinValue(void) const; + Tizen::Ui::Variant GetPropertyMaxValue(void) const; + Tizen::Ui::Variant GetPropertyBarColor(void) const; + Tizen::Ui::Variant GetPropertyBarBackgroundColor(void) const; + Tizen::Ui::Variant GetPropertyTitleText(void) const; + Tizen::Ui::Variant GetPropertyTitleTextColor(void) const; + Tizen::Ui::Variant GetPropertyColor(void) const; + +public: + virtual ~_Slider(void); + + void SetStyle(int style); + int GetStyle(void) const; + Tizen::Graphics::Canvas* GetHandleCanvasN(void) const; + Animations::_VisualElement* GetHandle(void) const; + void SetGroupStyle(GroupStyle groupStyle); + result UpdateHandle(const Tizen::Graphics::FloatRectangle& handleRect); + + result SetRange(int minValue, int maxValue); + result GetRange(int& minValue, int& maxValue) const; + result SetValue(int value); + int GetValue(void) const; + result SetIcon(IconPosition position, const Tizen::Graphics::Bitmap& icon); + Tizen::Graphics::Bitmap* GetIcon(IconPosition position) const; + result SetTitleText(const Tizen::Base::String& title); + Tizen::Base::String GetTitleText(void) const; + result SetTitleTextColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetTitleTextColor(void) const; + result AddAdjustmentEventListener(const _IAdjustmentEventListener& listener); + result RemoveAdjustmentEventListener(const _IAdjustmentEventListener& listener); + result AddSliderEventListener(const _ISliderEventListener& listener); + result RemoveSliderEventListener(const _ISliderEventListener& listener); + result SetBarColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetBarColor(void) const; + result SetColor(const Tizen::Graphics::Color& color); + result SetBarBackgroundColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetBarBackgroundColor(void) const; + Tizen::Graphics::Color GetColor(void) const; + Tizen::Base::Runtime::_Event* GetAdjustmentEvent(void) const; + _SliderEvent* GetSliderEvent(void) const; + result SetThumbBitmap(SliderThumbStatus status, const Tizen::Graphics::Bitmap& bitmap); + void SetThumbTextColor(SliderThumbStatus status, const Tizen::Graphics::Color& color); + void FireSliderMoveEvent(int value); + void FireAdjustmentValueEvent(int adjustment); + bool IsKeyPressed(void) const; + + 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); + virtual bool OnTouchMoved(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo); + virtual bool OnTouchCanceled(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo); + virtual void OnDrawFocus(void); + virtual bool OnFocusGained(const _Control& source); + virtual bool OnFocusLost(const _Control &source); + virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo); + virtual bool OnKeyReleased(const _Control &source, const _KeyInfo &keyInfo); + + virtual void OnBoundsChanged(void); + virtual void OnChangeLayout(Tizen::Ui::_ControlOrientation orientation); + virtual void OnDraw(void); + virtual result OnAttachedToMainTree(void); + virtual void OnFocusModeStateChanged(void); + + virtual void OnFontChanged(Tizen::Graphics::Font* pFont); + 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;} + virtual bool OnAccessibilityFocusMovedPrevious(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return false;} + virtual bool OnAccessibilityReadingElement(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return false;} + virtual bool OnAccessibilityReadElement(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return false;} + virtual bool OnAccessibilityFocusIn(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return false;} + virtual bool OnAccessibilityFocusOut(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return false;} + virtual bool OnAccessibilityActionPerformed(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element){return false;} + virtual bool OnAccessibilityValueIncreased(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element); + virtual bool OnAccessibilityValueDecreased(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element); + static _Slider* CreateSliderN(void); + +private: + _Slider(void); + _Slider(const _Slider&); + _Slider& operator =(const _Slider&); + + result Initialize(void); + result InitializeAccessibilityElement(void); + +private: + _SliderPresenter* __pSliderPresenter; + _AdjustmentEvent* __pAdjustmentEvent; + _SliderEvent* __pSliderEvent; + + Tizen::Base::String __titleText; + Tizen::Graphics::Bitmap* __pLeftBitmap; + Tizen::Graphics::Bitmap* __pRightBitmap; + + Tizen::Graphics::Color __bgColor; + Tizen::Graphics::Color __barColor; + Tizen::Graphics::Color __barBgColor; + Tizen::Graphics::Color __titleTextColor; + + int __sliderStyle; + + Tizen::Ui::Animations::_VisualElement* __pBase; + Tizen::Ui::Animations::_VisualElement* __pHandle; + + Tizen::Ui::_AccessibilityElement* __pAccessibilityElement; + bool __isKeyPressed; +}; // _Slider + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_SLIDER_H_ diff --git a/src/ui/inc/FUiCtrl_SliderEvent.h b/src/ui/inc/FUiCtrl_SliderEvent.h new file mode 100644 index 0000000..af807b4 --- /dev/null +++ b/src/ui/inc/FUiCtrl_SliderEvent.h @@ -0,0 +1,56 @@ +// +// 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_SliderEvent.h + * @brief This is the header file for __SliderEvent class. + * + * This header file contains declaration of _SliderEvent class. + */ +#ifndef _FUI_CTRL_INTERNAL_SLIDER_EVENT_H_ +#define _FUI_CTRL_INTERNAL_SLIDER_EVENT_H_ + +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ +class _Slider; + + +class _SliderEvent + : public Tizen::Base::Runtime::_Event +{ +public: + virtual ~_SliderEvent(void); + + const _Slider* GetSource(void) const; + static _SliderEvent* CreateInstanceN(const _Slider& source); + static Tizen::Base::Runtime::IEventArg* CreateSliderEventArgN(int value); + +protected: + _SliderEvent(const _Slider& source); + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + +private: + _Slider* __pSource; + +}; // _SliderEvent + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_SLIDER_EVENT_H_ diff --git a/src/ui/inc/FUiCtrl_SliderImpl.h b/src/ui/inc/FUiCtrl_SliderImpl.h new file mode 100644 index 0000000..15147a4 --- /dev/null +++ b/src/ui/inc/FUiCtrl_SliderImpl.h @@ -0,0 +1,100 @@ +// +// 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_SliderImpl.h + * @brief This is the header file for the _SliderImpl class. + * + * This header file contains the declarations of the %_SliderImpl class. + */ +#ifndef _FUI_CTRL_INTERNAL_SLIDER_IMPL_H_ +#define _FUI_CTRL_INTERNAL_SLIDER_IMPL_H_ + +#include +#include "FUi_ControlImpl.h" +#include "FUiCtrl_Slider.h" +#include "FUiCtrl_IAdjustmentEventListener.h" +#include "FUiCtrl_ISliderEventListener.h" + +namespace Tizen { namespace Graphics +{ +class Dimension; +}} // Tizen::Graphics + +namespace Tizen { namespace Ui { namespace Controls +{ +class _PublicAdjustmentEvent; +class _PublicSliderEvent; + +class _SliderImpl + : public _ControlImpl + , public _IAdjustmentEventListener + , public _ISliderEventListener + , virtual public Tizen::Base::Runtime::IEventListener +{ +public: + virtual ~_SliderImpl(void); + + result Initialize(int minValue, int maxValue, BackgroundStyle bgStyle, int sliderStyle, GroupStyle groupStyle); + result SetRange(int minValue, int maxValue); + result GetRange(int& minValue, int& maxValue) const; + result SetValue(int value); + int GetValue(void) const; + result SetIcon(IconPosition position, const Tizen::Graphics::Bitmap& icon); + result SetTitleText(const Tizen::Base::String& title); + Tizen::Base::String GetTitleText(void) const; + result SetTitleTextColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetTitleTextColor(void) const; + result AddAdjustmentEventListener(Tizen::Ui::IAdjustmentEventListener& listener); + result RemoveAdjustmentEventListener(Tizen::Ui::IAdjustmentEventListener& listener); + result AddSliderEventListener(const ISliderEventListener& listener); + result RemoveSliderEventListener(const ISliderEventListener& listener); + result SetBarColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetBarColor(void) const; + result SetBarBackgroundColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetBarBackgroundColor(void) const; + result SetColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetColor(void) const; + result SetThumbBitmap(SliderThumbStatus status, const Tizen::Graphics::Bitmap& bitmap); + void SetThumbTextColor(SliderThumbStatus status, const Tizen::Graphics::Color& color); + + virtual const char* GetPublicClassName(void) const; + virtual const Slider& GetPublic(void) const; + virtual Slider& GetPublic(void); + virtual const _Slider& GetCore(void) const; + virtual _Slider& GetCore(void); + virtual void OnAdjustmentValueChanged(const Tizen::Ui::_Control& source, int adjustment); + virtual void OnSliderBarMoved(_Slider& source, int value); + + static _SliderImpl* CreateSliderImplN(Slider* pControl, const Tizen::Graphics::Rectangle& rect, int sliderStyle); + static _SliderImpl* CreateSliderImplFN(Slider* pControl, const Tizen::Graphics::FloatRectangle& rect, int sliderStyle); + static _SliderImpl* GetInstance(Slider& slider); + static const _SliderImpl* GetInstance(const Slider& slider); + +private: + _SliderImpl(Slider* pPublic, _Slider* pCore); + _SliderImpl(const _SliderImpl&); + _SliderImpl& operator =(const _SliderImpl&); + + _PublicAdjustmentEvent* __pPublicAdjustmentEvent; + _PublicSliderEvent* __pPublicSliderEvent; + +}; // _SliderImpl + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_SLIDER_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_SliderModel.h b/src/ui/inc/FUiCtrl_SliderModel.h new file mode 100644 index 0000000..0740491 --- /dev/null +++ b/src/ui/inc/FUiCtrl_SliderModel.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 FUiCtrl_SliderModel.h + * @brief This is the header file for the _SliderModel class. + * + * This header file contains the declarations of the %_SliderModel class. + */ +#ifndef _FUI_CTRL_INTERNAL_SLIDER_MODEL_H_ +#define _FUI_CTRL_INTERNAL_SLIDER_MODEL_H_ + +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _SliderModel + : public Tizen::Base::Object +{ +public: + _SliderModel(void); + virtual ~_SliderModel(void); + + void SetMinValue(int minValue); + void SetMaxValue(int maxValue); + int GetMinValue(void) const; + int GetMaxValue(void) const; + void SetValue(int value); + int GetValue(void) const; + +private: + _SliderModel(const _SliderModel&); + _SliderModel& operator =(const _SliderModel&); + +private: + int __minValue; + int __maxValue; + int __currentValue; + +}; // _SliderModel + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_SLIDER_MODEL_H_ diff --git a/src/ui/inc/FUiCtrl_SliderOverlay.h b/src/ui/inc/FUiCtrl_SliderOverlay.h new file mode 100644 index 0000000..adf442d --- /dev/null +++ b/src/ui/inc/FUiCtrl_SliderOverlay.h @@ -0,0 +1,78 @@ +// +// 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_SliderOverlay.h + * @brief This is the header file for the _SliderOverlay class. + * + * This header file contains the declarations of the %_SliderOverlay class. + */ +#ifndef _FUI_CTRL_INTERNAL_SLIDEROVERLAY_H_ +#define _FUI_CTRL_INTERNAL_SLIDEROVERLAY_H_ + +#include "FUi_Window.h" + +namespace Tizen { namespace Ui { namespace Controls +{ +class _SliderPresenter; + + +class _SliderOverlay + : public Tizen::Ui::_Window + , virtual public Tizen::Base::Runtime::IEventListener + , virtual public Tizen::Ui::_IUiEventListener + , virtual public Tizen::Ui::_IUiEventPreviewer +{ +public: + _SliderOverlay(void); + virtual ~_SliderOverlay(void); + + result Construct(_Control& owner); + result SetSliderRect(Tizen::Graphics::FloatRectangle& sliderRect, Tizen::Graphics::FloatRectangle& sliderTouchRect); + void SetFont(Tizen::Graphics::Font* pFont); + result DrawSliderOverlay(int positionX,int handleWidth, int value); + + virtual bool IsActivatedOnOpen(void) const; + virtual result OnAttachedToMainTree(void); + virtual result OnDetachingFromMainTree(void); + virtual bool IsRotationSynchronized(void) const; + +private: + result LoadBitmaps(void); + + _SliderOverlay(const _SliderOverlay&); + _SliderOverlay& operator =(const _SliderOverlay&); + +private: + + Tizen::Graphics::FloatRectangle __sliderRect; + Tizen::Graphics::FloatRectangle __sliderTouchRect; + Tizen::Graphics::FloatRectangle __sliderOverlayRect; + Tizen::Graphics::Bitmap* __pOverlayBgBitmap; + + Tizen::Graphics::Color __overlayBgColor; + Tizen::Graphics::Color __overlayTextColor; + + Tizen::Graphics::Font* __pFont; + _Control* __pOwner; + float __overlayWidth; + +}; // _SliderOverlay + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_SLIDEROVERLAY_H_ diff --git a/src/ui/inc/FUiCtrl_SliderPresenter.h b/src/ui/inc/FUiCtrl_SliderPresenter.h new file mode 100644 index 0000000..1219158 --- /dev/null +++ b/src/ui/inc/FUiCtrl_SliderPresenter.h @@ -0,0 +1,174 @@ +// +// 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_SliderPresenter.h + * @brief This is the header file for the _SliderPresenter class. + * + * This header file contains the declarations of the %_SliderPresenter class. + */ +#ifndef _FUI_CTRL_INTERNAL_SLIDER_PRESENTER_H_ +#define _FUI_CTRL_INTERNAL_SLIDER_PRESENTER_H_ + +#include +#include +#include +#include "FUi_Control.h" + +namespace Tizen { namespace Ui { namespace Controls +{ +class _Slider; +class _SliderModel; +class _SliderOverlay; + + +class _SliderPresenter + : public Tizen::Base::Object +{ +public: + virtual ~_SliderPresenter(void); + + result Draw(void); + void SetMinValue(int minValue); + void SetMaxValue(int maxValue); + int GetMinValue(void) const; + int GetMaxValue(void) const; + void SetValue(int value); + int GetValue(void) const; + void SetNeedUpdate(void); + void SetGroupStyle(GroupStyle groupStyle); + + Tizen::Graphics::FloatRectangle GetTitleTextBounds(void) const; + Tizen::Graphics::FloatRectangle GetIconBounds(IconPosition iconPosition) const; + Tizen::Graphics::FloatRectangle GetTouchBounds(void) const; + + _SliderOverlay* GetSliderOverlay(void) const; + bool IsTouchPressed(void) const; + + 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); + virtual bool OnTouchMoved(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo); + virtual bool OnTouchCanceled(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo); + virtual void OnBoundsChanged(void); + virtual void OnChangeLayout(Tizen::Ui::_ControlOrientation orientation); + + void OnFontChanged(Tizen::Graphics::Font* pFont); + void OnFontInfoRequested(unsigned long& style, float& size); + 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); + +private: + int CalculateSliderValue(float positionX, float offsetX); + result Resize(void); + result LoadBitmap(void); + result DrawSlider(void); + result DrawBackground(Tizen::Graphics::Canvas& canvas); + result DrawSliderBar(Tizen::Graphics::Canvas& canvas); + result DrawTitleText(Tizen::Graphics::Canvas& canvas); + result DrawIcon(Tizen::Graphics::Canvas& canvas); + result DrawSliderOverlay(int value); + result DrawSliderBarNumber(int value); + result DrawBitmap(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, Tizen::Graphics::Bitmap* pBitmap); + + _SliderPresenter(void); + _SliderPresenter(const _SliderPresenter&); + _SliderPresenter& operator =(const _SliderPresenter&); + +private: + + static const int SLIDER_HANDLE_THREE_DIGIT = 3; + static const int SLIDER_HANDLE_TWO_DIGIT = 2; + + _Slider* __pSlider; + _SliderModel* __pSliderModel; + _SliderOverlay* __pSliderOverlay; + Tizen::Graphics::FloatRectangle __rect; + Tizen::Graphics::FloatRectangle __touchRect; + Tizen::Graphics::FloatRectangle __barBgRect; + Tizen::Graphics::FloatRectangle __barRect; + Tizen::Graphics::FloatRectangle __handleRect; + + Tizen::Base::Runtime::Timer* __pSlideTimer; + + Tizen::Graphics::Bitmap* __pBgTopBitmap; + Tizen::Graphics::Bitmap* __pBgMiddleBitmap; + Tizen::Graphics::Bitmap* __pBgBottomBitmap; + Tizen::Graphics::Bitmap* __pBgSingleBitmap; + Tizen::Graphics::Bitmap* __pBgGrpStyleNoneBitmap; + + Tizen::Graphics::Bitmap* __pBgTopEffectBitmap; + Tizen::Graphics::Bitmap* __pBgMiddleEffectBitmap; + Tizen::Graphics::Bitmap* __pBgBottomEffectBitmap; + Tizen::Graphics::Bitmap* __pBgSingleEffectBitmap; + + Tizen::Graphics::Bitmap* __pBarResourceEffectBitmap; + Tizen::Graphics::Bitmap* __pBarBgResourceEffectBitmap; + Tizen::Graphics::Bitmap* __pBarColorReplacementBitmap; + Tizen::Graphics::Bitmap* __pBarBgColorReplacementBitmap; + + Tizen::Graphics::Bitmap* __pHandleNormalBitmap; + Tizen::Graphics::Bitmap* __pHandlePressedBitmap; + Tizen::Graphics::Bitmap* __pHandleDisabledBitmap; + Tizen::Graphics::Bitmap* __pHandleHighlightedBitmap; + + Tizen::Graphics::Bitmap* __pHandleNormalEffectBitmap; + Tizen::Graphics::Bitmap* __pHandlePressedEffectBitmap; + Tizen::Graphics::Bitmap* __pHandleDisabledEffectBitmap; + Tizen::Graphics::Bitmap* __pHandleHighlightedEffectBitmap; + + Tizen::Graphics::Color __currentBarColor; + Tizen::Graphics::Color __currentBarBgColor; + Tizen::Graphics::Color __currentBgColor; + Tizen::Graphics::Color __currentGrpStyleNoneColor; + + Tizen::Graphics::Color __handleTextColor; + Tizen::Graphics::Color __handleTextPressedColor; + Tizen::Graphics::Color __handleTextDisabledColor; + Tizen::Graphics::Color __handleTextHighlightedColor; + + Tizen::Graphics::Font* __pFont; + Tizen::Graphics::_Text::TextObject* __pTitleTextObject; + Tizen::Graphics::_Text::TextObject* __pHandleTextObject; + + int __handleX; + int __handleOffset; + bool __isSliderPressed; + bool __isSetValue; + bool __isFocusModeStateChanged; + + bool __isNeedToBeUpdated; + bool __isResourceLoaded; + bool __isCustomHandle; + bool __isCustomPressedTextColor; + bool __isTouchCanceled; + GroupStyle __groupStyle; + float __fontSize; + float __barOffset; + +}; // _SliderPresenter + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_SLIDER_PRESENTER_H_ diff --git a/src/ui/inc/FUiCtrl_SplitPanel.h b/src/ui/inc/FUiCtrl_SplitPanel.h new file mode 100644 index 0000000..8024b5e --- /dev/null +++ b/src/ui/inc/FUiCtrl_SplitPanel.h @@ -0,0 +1,167 @@ +// +// 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_SplitPanel.h + * @brief This is the header file for the _SplitPanel class. + * + * This header file contains the declarations of the %_SplitPanel class. + */ +#ifndef _FUICTRL_INTERNAL_SPLIT_PANEL_H_ +#define _FUICTRL_INTERNAL_SPLIT_PANEL_H_ + +#include +#include +#include "FUi_Control.h" +#include "FUiCtrl_ISplitPanelEventListener.h" +#include "FUiCtrl_SplitPanelEvent.h" +#include "FUiCtrl_SplitPanelPresenter.h" +#include "FUi_ITouchTapGestureEventListener.h" +#include "FUiAnim_VisualElement.h" + +namespace Tizen { namespace Ui { namespace Controls +{ +class _SplitPanelPresenter; + +enum _SplitPanelDividerState +{ + _SPLIT_PANEL_VERTICAL_DIVIDER_ORIENTATION_LANDSCAPE = 0, + _SPLIT_PANEL_HORIZONTAL_DIVIDER_ORIENTATION_LANDSCAPE, + _SPLIT_PANEL_VERTICAL_DIVIDER_ORIENTATION_PORTRAIT, + _SPLIT_PANEL_HORIZONTAL_DIVIDER_ORIENTATION_PORTRAIT, + + _SPLIT_PANEL_DIVIDER_STATE_MAX +}; + +const int _SPLIT_PANEL_DIVIDER_STATE = 4; + +/** + * @class _SplitPanel + * @brief + * @since 2.0 + * + * + * + * + */ + +class _OSP_EXPORT_ _SplitPanel + : public Tizen::Ui::_Control + , public Tizen::Ui::_ITouchTapGestureEventListener + , virtual public Tizen::Base::Runtime::IEventListener + , virtual public Tizen::Ui::_IUiEventListener + , virtual public Tizen::Ui::_IUiEventPreviewer + , virtual public Tizen::Ui::_ITouchGestureEventListener +{ +public: + virtual ~_SplitPanel(void); + +public: + static _SplitPanel* CreateSplitPanelN(const Tizen::Graphics::FloatRectangle& rect, SplitPanelDividerStyle splitPanelDividerStyle, SplitPanelDividerDirection splitPanelDividerDirection); + result Construct(SplitPanelDividerStyle splitPanelDividerStyle, SplitPanelDividerDirection splitPanelDividerDirection); + + virtual void OnDraw(void); + + virtual void OnChangeLayout(Tizen::Ui::_ControlOrientation orientation); + virtual void OnBoundsChanged(void); + + 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 OnPreviewTouchPressed(const _Control& source, const _TouchInfo& touchinfo); + 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 bool OnTapGestureDetected(_TouchTapGestureDetector& gesture); + virtual bool OnTapGestureCanceled(_TouchTapGestureDetector& gesture); + +public: + result AddSplitPanelEventListener(const _ISplitPanelEventListener& listener); + result RemoveSplitPanelEventListener(const _ISplitPanelEventListener& listener); + + result SetPane(_Control* pControl, SplitPanelPaneOrder paneOrder); + _Control* GetPane(SplitPanelPaneOrder paneOrder) const; + _Control* GetPaneParent(SplitPanelPaneOrder paneOrder) const; + + result SetDividerStyle(SplitPanelDividerStyle splitPanelDividerStyle); + SplitPanelDividerStyle GetDividerStyle(void) const; + + result SetDividerPosition(float position); + float GetDividerPosition(void) const; + + result SetMaximumDividerPosition(float position); + float GetMaximumDividerPosition(void) const; + + result SetMinimumDividerPosition(float position); + float GetMinimumDividerPosition(void) const; + + void SetDividerDirection(SplitPanelDividerDirection dividerDirection); + SplitPanelDividerDirection GetDividerDirection(void) const; + + result MaximizePane(SplitPanelPaneOrder paneOrder); + bool IsPaneMaximized(SplitPanelPaneOrder paneOrder) const; + result RestorePane(void); + + result SendSplitPanelEvent(_SplitPanelEventStatus status); + + void SetTapCount(int count); + int GetTapCount(void) const; + + Tizen::Ui::Animations::VisualElement* GetDividerVisualElement(void); + + void SetDividerVisualElementBounds(Tizen::Graphics::FloatRectangle& bounds); + +protected: + result SetPresenter(const _SplitPanelPresenter& splitPanelPresenter); + +private: + _SplitPanel(void); + + _SplitPanel(const _SplitPanel& rhs); + _SplitPanel& operator =(const _SplitPanel& rhs); + +private: + _SplitPanelPresenter* __pSplitPanelPresenter; + + _TouchTapGestureDetector* __pTapGesture; + + Tizen::Ui::_Control* __pFirstPaneParent; + Tizen::Ui::_Control* __pSecondPaneParent; + Tizen::Ui::_Control* __pFirstPane; + Tizen::Ui::_Control* __pSecondPane; + + float __dividerPosition[_SPLIT_PANEL_DIVIDER_STATE]; + float __minimumDividerPosition[_SPLIT_PANEL_DIVIDER_STATE]; + float __maximumDividerPosition[_SPLIT_PANEL_DIVIDER_STATE]; + + SplitPanelDividerDirection __splitPanelDividerDirection; + + _SplitPanelEvent* __pSplitPanelEvent; + + int __dividerTapCount; + + Tizen::Ui::Animations::VisualElement* __pDividerVisualElement; + +}; // _SplitPanel + +}}} // Tizen::Ui::Controls + +#endif // _FUICTRL_INTERNAL_SPLIT_PANEL_H_ + diff --git a/src/ui/inc/FUiCtrl_SplitPanelEvent.h b/src/ui/inc/FUiCtrl_SplitPanelEvent.h new file mode 100644 index 0000000..f7723b9 --- /dev/null +++ b/src/ui/inc/FUiCtrl_SplitPanelEvent.h @@ -0,0 +1,115 @@ +// +// 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_SplitPanelEvent.h + * @brief This is the header file for _SplitPanelEvent class. + * @version 1.0 + * + * This header file contains declaration of _SplitPanelEvent class. + * The SplitPanelEvent class can call listener's method. So, when event occurred, + * application can handle it appropriately. + * + */ +#ifndef _FUI_CTRL_INTERNAL_SPLIT_PANEL_EVENT_H_ +#define _FUI_CTRL_INTERNAL_SPLIT_PANEL_EVENT_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _SplitPanel; + +enum _SplitPanelEventStatus +{ + _SPLIT_PANEL_EVENT_DIVIDER_POSITION_CHANGE = 0, + _SPLIT_PANEL_EVENT_DIVIDER_DOUBLE_PRESSED +}; + + +/** +* @class _SplitPanelEvent +* @brief This class handles a action event. It is inherited from Event class. +* +* The Window(root of all widgets) class has an instance of the _SplitPanelEvent class as a member variable. +* Applications can register splitpanel event listeners through it. When a splitpanel event occurred, +* the _SplitPanelEvent class finds listener and calls the appropriate listener's method. +* +*/ +class _SplitPanelEvent + : public Tizen::Base::Runtime::_Event +{ +// Lifecycle +public: + /** + * This is the default class destructor. + * + */ + virtual ~_SplitPanelEvent(void); + + static _SplitPanelEvent* CreateInstanceN(const _SplitPanel& source); + +// Accessors + /** + * This method returns the owner of this event. + * + * @return See the comment above. + */ + const _SplitPanel* GetSource(void) const; + + static Tizen::Base::Runtime::IEventArg* CreateSplitPanelEventArgN(_SplitPanelEventStatus status); + +// Operations +protected: + /** + * This is the default class constructor. + * + * @remarks After creating an instance of this class, you must explicitly call one of + * construction methods to initialize the instance. + * + */ + _SplitPanelEvent(const _SplitPanel& source); + + /** + * This method checks the arg and finds out the type of event. After that this method calls appopriate + * pListener's method. + * + * @return This method returns a result code. + * @param[in] pListener It is a event listener related to this action event. + * @param[in] arg It is an argument-like instance of action event retransmitted to the listener's method + * as an argument. + * @exception E_SUCCESS - The method is successful. + * @exception E_ARG_NULL - The listener is null. + * @exception E_INVALID_ARG - The argument passed to a method contains an invalid value.@n + *   The pListener is not the instance of IActionEventListener class or + * the p__SplitPanelEventArg is not the instance of _SplitPanelEventArg class. + * + */ + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + +//Attributess +private: + const _SplitPanel* __pSource; + +}; // _SplitPanelEvent + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_SPLIT_PANEL_EVENT_H_ diff --git a/src/ui/inc/FUiCtrl_SplitPanelImpl.h b/src/ui/inc/FUiCtrl_SplitPanelImpl.h new file mode 100644 index 0000000..4f85998 --- /dev/null +++ b/src/ui/inc/FUiCtrl_SplitPanelImpl.h @@ -0,0 +1,119 @@ +// +// 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_SplitPanelImpl.h + * @brief This is the header file for the _SplitPanelImpl class. + * + * This header file contains the declarations of the %_SplitPanelImpl class. + */ +#ifndef _FUI_CTRL_INTERNAL_SPLIT_PANEL_IMPL_H_ +#define _FUI_CTRL_INTERNAL_SPLIT_PANEL_IMPL_H_ + +#include +#include +#include "FUi_ControlImpl.h" +#include "FUiCtrl_SplitPanel.h" +#include "FUiCtrl_ISplitPanelEventListener.h" +#include "FUiCtrl_PublicSplitPanelEvent.h" + +namespace Tizen { namespace Graphics +{ + class Dimension; +}} //Tizen::Graphics + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _SplitPanelImpl + : public _ControlImpl + , public _ISplitPanelEventListener +{ + +// Lifecycle +public: + virtual ~_SplitPanelImpl(void); + static _SplitPanelImpl* CreateSplitPanelImplN(SplitPanel* pControl, const Tizen::Graphics::Rectangle& rect, SplitPanelDividerStyle splitPanelDividerStyle, SplitPanelDividerDirection splitPanelDividerDirection); + static _SplitPanelImpl* CreateSplitPanelImplFN(SplitPanel* pControl, const Tizen::Graphics::FloatRectangle& rect, SplitPanelDividerStyle splitPanelDividerStyle, SplitPanelDividerDirection splitPanelDividerDirection); + + result Initialize(const Tizen::Graphics::Rectangle& rect); + result InitializeF(const Tizen::Graphics::FloatRectangle& rect); + + virtual const char* GetPublicClassName(void) const; + virtual const SplitPanel& GetPublic(void) const; + virtual SplitPanel& GetPublic(void); + virtual const _SplitPanel& GetCore(void) const; + virtual _SplitPanel& GetCore(void); + +public: + + virtual void OnDividerPositionChanged(_SplitPanel& source, int position); + virtual void OnDividerDoublePressed(_SplitPanel& source); + + result AddSplitPanelEventListener(ISplitPanelEventListener& listener); + result RemoveSplitPanelEventListener(ISplitPanelEventListener& listener); + + result AddSplitPanelEventListener(ISplitPanelEventListenerF& listener); + result RemoveSplitPanelEventListener(ISplitPanelEventListenerF& listener); + + result SetPane(_ControlImpl* pControl, SplitPanelPaneOrder paneOrder); + _ControlImpl* GetPane(SplitPanelPaneOrder paneOrder) const; + + result SetDividerPosition(int position); + int GetDividerPosition(void) const; + + result SetDividerPosition(float position); + float GetDividerPositionF(void) const; + + result SetMaximumDividerPosition(int position); + int GetMaximumDividerPosition(void) const; + + result SetMaximumDividerPosition(float position); + float GetMaximumDividerPositionF(void) const; + + result SetMinimumDividerPosition(int position); + int GetMinimumDividerPosition(void) const; + + result SetMinimumDividerPosition(float position); + float GetMinimumDividerPositionF(void) const; + + result MaximizePane(SplitPanelPaneOrder paneOrder); + bool IsPaneMaximized(SplitPanelPaneOrder paneOrder) const; + result RestorePane(void); + +//Constants +public: + static _SplitPanelImpl* GetInstance(SplitPanel& pSplitPanel); + static const _SplitPanelImpl* GetInstance(const SplitPanel& pSplitPanel); + +private: + _SplitPanelImpl(SplitPanel* pPublic, _SplitPanel* pCore); + + _SplitPanelImpl(const _SplitPanelImpl& rhs); + _SplitPanelImpl& operator =(const _SplitPanelImpl& rhs); + +private: + _SplitPanel* __pSplitPanel; + _PublicSplitPanelEvent* __pPublicSplitPanelEvent; + +}; // _SplitPanelImpl + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_SPLIT_PANEL_IMPL_H_ + + diff --git a/src/ui/inc/FUiCtrl_SplitPanelModel.h b/src/ui/inc/FUiCtrl_SplitPanelModel.h new file mode 100644 index 0000000..6cee52e --- /dev/null +++ b/src/ui/inc/FUiCtrl_SplitPanelModel.h @@ -0,0 +1,69 @@ +// +// 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_SplitPanelModel.h + * @brief This is the header file for the _SplitPanelModel class. + * + * This header file contains the declarations of the %_SplitPanelModel class. + */ +#ifndef _FUICTRL_INTERNAL_SPLIT_PANEL_MODEL_H_ +#define _FUICTRL_INTERNAL_SPLIT_PANEL_MODEL_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _SplitPanelModel + : public Tizen::Base::Object +{ +// Lifecycle +public: + _SplitPanelModel(void); + virtual ~_SplitPanelModel(void); + + result Construct(void); + +// Operations +public: + void SetDividerStyle(SplitPanelDividerStyle splitPanelDividerStyle); + SplitPanelDividerStyle GetDividerStyle(void) const; + + void SetPaneMaximumState(bool bMaximum); + bool GetPaneMaximumState(void) const; + + void SetMaximizedPaneOrder(SplitPanelPaneOrder paneOrder); + SplitPanelPaneOrder GetMaximizedPaneOrder(void) const; + +private: + _SplitPanelModel(const _SplitPanelModel&); + _SplitPanelModel& operator =(const _SplitPanelModel&); + +// Attribute +private: + SplitPanelDividerStyle __dividerStyle; + bool __isPaneMaximized; + SplitPanelPaneOrder __maximizedPaneOrder; + +}; // _SplitPanelModel + +}}} // Tizen::Ui::Controls + +#endif // _FUICTRL_INTERNAL_SPLIT_PANEL_MODEL_H_ diff --git a/src/ui/inc/FUiCtrl_SplitPanelPresenter.h b/src/ui/inc/FUiCtrl_SplitPanelPresenter.h new file mode 100644 index 0000000..78c3b6c --- /dev/null +++ b/src/ui/inc/FUiCtrl_SplitPanelPresenter.h @@ -0,0 +1,154 @@ +// +// 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_SplitPanelPresenter.h + * @brief This is the header file for the _SplitPanelPresenter class. + * + * This header file contains the declarations of the %_SplitPanelPresenter class. + */ + +#ifndef _FUICTRL_INTERNAL_SPLIT_PANEL_PRESENTER_H_ +#define _FUICTRL_INTERNAL_SPLIT_PANEL_PRESENTER_H_ + +#include +#include "FUi_Control.h" +#include "FUiCtrl_SplitPanelModel.h" +#include "FUi_ITouchTapGestureEventListener.h" +#include "FUiAnimations.h" + +namespace Tizen { namespace Ui { namespace Controls +{ +class _SplitPanel; + +enum _SplitPanelAnimationDirection +{ + _SPLIT_PANEL_ANIMATION_RIGHT = 0, + _SPLIT_PANEL_ANIMATION_LEFT, + _SPLIT_PANEL_ANIMATION_TOP, + _SPLIT_PANEL_ANIMATION_BOTTOM, + _SPLIT_PANEL_ANIMATION_RESTORE_HORIZONTAL, + _SPLIT_PANEL_ANIMATION_RESTORE_VERTICAL, + _SPLIT_PANEL_ANIMATION_MAX +}; + +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 + , public Tizen::Ui::_ITouchTapGestureEventListener + , public Tizen::Ui::Animations::IAnimationTransactionEventListener +{ +// Lifecycle +public: + _SplitPanelPresenter(void); + virtual ~_SplitPanelPresenter(void); + +// Operations + virtual result Construct(const _SplitPanel& splitPanel, SplitPanelDividerStyle splitPanelDividerStyle, SplitPanelDividerDirection splitPanelDividerDirection); + bool CheckDividerTouchRegion(float positionX, float positionY); + + 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 bool OnTapGestureDetected(_TouchTapGestureDetector& gesture); + virtual bool OnTapGestureCanceled(_TouchTapGestureDetector& gesture); + + result SetDividerStyle(SplitPanelDividerStyle splitPanelDividerStyle); + SplitPanelDividerStyle GetDividerStyle(void) const; + + Tizen::Graphics::FloatRectangle GetDividerRectangle(void) const; + + result MaximizePane(SplitPanelPaneOrder paneOrder); + bool IsPaneMaximized(SplitPanelPaneOrder paneOrder) const; + result RestorePane(void); + + result Draw(void); + + result LoadBitmap(SplitPanelDividerDirection splitPanelDividerDirection); + + void RecalcSplitPanel(void); + + void OnChangeLayout(Tizen::Ui::_ControlOrientation orientation); + + void OnBoundsChanged(void); + + virtual void OnAnimationTransactionStarted(int transactionId); + virtual void OnAnimationTransactionStopped(int transactionId); + virtual void OnAnimationTransactionFinished(int transactionId); + +protected: + result SetModel(const _SplitPanelModel& splitPanelModel); + +private: + result SetPaneBounds(void); + void AdjustDividerRectangle(void); + + // Animation + void ChangePaneOrder(SplitPanelPaneOrder paneOrder); + result AnimateDivider(int destination); + result AnimatePane(int destination); + result AnimatePaneParent(int destination); + 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, int destination); + long GetAnimationDuration(int destination); + +private: + _SplitPanelPresenter(const _SplitPanelPresenter& value); + _SplitPanelPresenter& operator =(const _SplitPanelPresenter& value); + +private: + _SplitPanel* __pSplitPanel; + _SplitPanelModel* __pSplitPanelModel; + + float __dividerMaximumPosition; + float __dividerMinimumPosition; + bool __splitPanelDividerPressed; + bool __setFirstDividerPositionChangeEvent; + bool __isChangeBounds; + + Tizen::Graphics::FloatRectangle __dividerRectangle; + Tizen::Graphics::FloatRectangle __dividerThumbRectangle; + Tizen::Graphics::Bitmap* __pDividerPressedBackgroundBitmap; + Tizen::Graphics::Bitmap* __pDividerBackgroundBitmap; + Tizen::Graphics::Bitmap* __pDividerBackgroundEffectBitmap; + Tizen::Graphics::Bitmap* __pDividerThumbBitmap; + Tizen::Graphics::Color __dividerBackgroundColor; + Tizen::Graphics::Color __dividerPressedBackgroundColor; + + // Animation + int __transactionIdMaximize; + int __transactionIdRestore; + + Tizen::Ui::Animations::AnimationInterpolatorType __controlAnimatorInterpolator; + Tizen::Base::String __visualElementInterpolator; + +}; // _SplitPanelPresenter; + +}}} // Tizen::Ui::Controls + +#endif // _FUICTRL_INTERNAL_SPLIT_PANEL_PRESENTER_H_ + + + diff --git a/src/ui/inc/FUiCtrl_Tab.h b/src/ui/inc/FUiCtrl_Tab.h new file mode 100644 index 0000000..6d818e7 --- /dev/null +++ b/src/ui/inc/FUiCtrl_Tab.h @@ -0,0 +1,266 @@ +// +// 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_Tab.h + * @brief This is the header file for the _Tab class. + * + * This header file contains the declarations of the %_Tab class. + */ +#ifndef _FUICTRL_INTERNAL_TAB_H_ +#define _FUICTRL_INTERNAL_TAB_H_ + + +#include +#include "FUi_Control.h" +#include "FUi_ITouchLongPressGestureEventListener.h" +#include "FUi_ITouchFlickGestureEventListener.h" +#include "FUi_IAccessibilityListener.h" +#include "FUiCtrl_ActionEvent.h" +#include "FUiCtrl_IActionEventListener.h" +#include "FUiCtrl_TabItem.h" +#include "FUiCtrl_TabPresenter.h" + +const int _TAB_STATE = 6; +const int _TAB_ACTION_ID_MIN = 0; +const int _TAB_ACTION_ID_MAX = 999; +const int _TAB_ITEM_MAXCOUNT = 14; // 3 Line + +namespace Tizen { namespace Ui { namespace Controls { + + class _PublicActionEvent; + class _TabPresenter; + class _TabItem; + +// enum +enum _TabStatus +{ + _TAB_STATUS_NORMAL = 0, /** The normal status */ + _TAB_STATUS_PRESSED, /** The pressed status */ + _TAB_STATUS_SELECTED, /** The selected status */ + _TAB_STATUS_HIGHLIGHTED, /** The focused status */ + _TAB_STATUS_DISABLED, /** The disabled status */ + + _TAB_STATUS_MAX +}; + +enum _TabStyle +{ + _TAB_STYLE_TEXT, + _TAB_STYLE_ICON, + _TAB_STYLE_ICON_TEXT +}; + + +/** + * @class _Tab + * @brief + * @since 2.1 + * + * + * + * + */ +class _OSP_EXPORT_ _Tab + : public Tizen::Ui::_Control + , public Tizen::Ui::_ITouchLongPressGestureEventListener + , public Tizen::Ui::_IAccessibilityListener + , virtual public Tizen::Base::Runtime::IEventListener + , virtual public Tizen::Ui::_IUiEventListener + , virtual public Tizen::Ui::_IUiEventPreviewer + , virtual public Tizen::Ui::_ITouchGestureEventListener + , virtual public Tizen::Ui::_ITouchFlickGestureEventListener +{ +private: + _Tab(const _Tab& value); + _Tab& operator=(const _Tab& value); + +public: + _Tab(void); + virtual ~_Tab(void); + +public: + static _Tab* CreateTabN(void); + +protected: + result SetPresenter(const _TabPresenter& tabPresenter); + + +public: + result AddItem(const Tizen::Graphics::Bitmap& icon, const Tizen::Base::String& text, int actionId); + result AddItem(const Tizen::Graphics::Bitmap& icon, int actionId); + result AddItem(const Tizen::Base::String& text, int actionId); + + result InsertItemAt(int index, const Tizen::Graphics::Bitmap& icon, const Tizen::Base::String& text, int actionId); + result InsertItemAt(int index, const Tizen::Graphics::Bitmap& icon, int actionId); + result InsertItemAt(int index, const Tizen::Base::String& text, int actionId); + + result SetItemAt(int index, const Tizen::Graphics::Bitmap& icon, const Tizen::Base::String& text, int actionId); + result SetItemAt(int index, const Tizen::Graphics::Bitmap& icon, int actionId); + result SetItemAt(int index, const Tizen::Base::String& text, int actionId); + + result RemoveItemAt(int index); + result RemoveAllItems(void); + + bool ChangeItemAt(const int srcIndex, const int destIndex); + + result SetBadgeIcon(int actionId, const Tizen::Graphics::Bitmap* pBadgeIcon); + + int GetItemCount(void) const; + + int GetItemIndexFromActionId(int actionId) const; + int GetItemActionIdAt(int index) const; + + _TabItem* GetItemAt(int index); + + + void SetSelectedItemIndex(int index); + int GetSelectedItemIndex(void) const; + + void SetFirstDrawnItemIndex(int index); + int GetFirstDrawnItemIndex(void) const; + + void SetEditModeEnabled(bool isEnabled); + bool IsEditModeEnabled(void) const; + + bool IsInFocusMode(void) const; + + result SetBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap); + Tizen::Graphics::Bitmap* GetBackgroundBitmap(void) const; + Tizen::Graphics::Bitmap* GetDisabledBackgroundBitmap(void) const; + + Tizen::Graphics::Bitmap* GetPressedItemBackgroundBitmap(void) const; + Tizen::Graphics::Bitmap* GetPressedItemBackgroundEffectBitmap(void) const; + + result SetSelectedItemBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap); + Tizen::Graphics::Bitmap* GetSelectedItemBackgroundBitmap(void) const; + + result SetHighlightedItemBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap); + Tizen::Graphics::Bitmap* GetHighlightedItemBackgroundBitmap(void) const; + + void SetItemBackgroundColor(Tizen::Graphics::Color color); + Tizen::Graphics::Color GetItemBackgroundColor(void) const; + + Tizen::Graphics::Color GetPressedItemBackgroundColor(void) const; + + void SetSelectedItemBackgroundColor(Tizen::Graphics::Color color); + Tizen::Graphics::Color GetSelectedItemBackgroundColor(void) const; + + void SetHighlightedItemBackgroundColor(Tizen::Graphics::Color color); + Tizen::Graphics::Color GetHighlightedItemBackgroundColor(void) const; + + Tizen::Graphics::Color GetDisabledItemBackgroundColor(void) const; + + void SetTextColor(const Tizen::Graphics::Color& textColor); + Tizen::Graphics::Color GetTextColor(void) const; + + Tizen::Graphics::Color GetDisabledTextColor(void) const; + + void SetPressedTextColor(const Tizen::Graphics::Color& textColor); + Tizen::Graphics::Color GetPressedTextColor(void) const; + + void SetSelectedTextColor(const Tizen::Graphics::Color& textColor); + Tizen::Graphics::Color GetSelectedTextColor(void) const; + + void SetHighlightedTextColor(const Tizen::Graphics::Color& textColor); + Tizen::Graphics::Color GetHighlightedTextColor(void) const; + + void SetStyle(int style); + _TabStyle GetStyle(void) const; + + int GetCurrentHighlightedItemIndex(void) const; + + void AddActionEventListener(const Tizen::Ui::Controls::_IActionEventListener& listener); + void RemoveActionEventListener(const Tizen::Ui::Controls::_IActionEventListener& listener); + + 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 OnLongPressGestureDetected(_TouchLongPressGestureDetector& gesture); + virtual bool OnLongPressGestureCanceled(_TouchLongPressGestureDetector& gesture); + + virtual bool OnFlickGestureDetected(_TouchFlickGestureDetector& gesture); + virtual bool OnFlickGestureCanceled(_TouchFlickGestureDetector& gesture); + + virtual void OnDraw(void); + result OnAttachedToMainTree(void); + + virtual void OnFontChanged(Tizen::Graphics::Font* pFont); + virtual void OnFontInfoRequested(unsigned long& style, float& size); + virtual void OnBoundsChanged(void); + + void AddAccessibilityElement(const Tizen::Graphics::FloatRectangle& itemBounds, const Tizen::Base::String& itemText, _TabItemStatus status); + void InsertAccessibilityElementAt(int index, const Tizen::Graphics::FloatRectangle& itemBounds, const Tizen::Base::String& itemText, _TabItemStatus status); + void RemoveAccessibilityElementAt(int index); + void RemoveAllAccessibilityElement(void); + void UpdateAccessibilityElement(void); + void UpdateAccessibilityLabel(int index, const Tizen::Base::String& text); + + virtual void OnChangeLayout(Tizen::Ui::_ControlOrientation orientation); + // accessibility listener + virtual bool OnAccessibilityFocusMovedNext(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element); + virtual bool OnAccessibilityFocusMovedPrevious(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element); + virtual bool OnAccessibilityReadingElement(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element); + virtual bool OnAccessibilityReadElement(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element); + virtual bool OnAccessibilityFocusIn(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element); + virtual bool OnAccessibilityFocusOut(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element); + virtual bool OnAccessibilityActionPerformed(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element); + virtual bool OnAccessibilityValueIncreased(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element); + virtual bool OnAccessibilityValueDecreased(const Tizen::Ui::_AccessibilityContainer& control, const Tizen::Ui::_AccessibilityElement& element); + + virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo); + virtual bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo); + virtual void OnDrawFocus(void); + virtual void OnFocusModeStateChanged(void); + +private: + int GetItemIndex(int actionId); + bool CheckDuplicatedActionId(int actionId); + result LoadBitmap(void); + +private: + _TabPresenter* __pTabPresenter; + + bool __isInFocusMode; + int __style; + int __currentHighlightedItemIndex; + _TabStatus __tabStatus; + Tizen::Base::Collection::ArrayList __tabItems; + + Tizen::Ui::Controls::_ActionEvent* __pActionEvent; + + _TouchLongPressGestureDetector* __pGestureLongPress; + _TouchFlickGestureDetector* __pFlickGesture; + + Tizen::Graphics::Bitmap* __pBackgroundBitmap; + Tizen::Graphics::Bitmap* __pDisabledBackgroundBitmap; + Tizen::Graphics::Bitmap* __pPressedItemBackgroundBitmap; + Tizen::Graphics::Bitmap* __pPressedItemBackgroundEffectBitmap; + Tizen::Graphics::Bitmap* __pSelectedItemBackgroundBitmap; + Tizen::Graphics::Bitmap* __pHighlightedItemBackgroundBitmap; + + Tizen::Graphics::Color __itemBgColor[_TAB_STATE]; + Tizen::Graphics::Color __itemTextColor[_TAB_STATE]; + + Tizen::Base::Collection::LinkedListT<_AccessibilityElement*> __accessibilityElements; +}; + +}}} // Tizen::Ui::Controls + +#endif // _FUICTRL_INTERNAL_TAB_H_ + diff --git a/src/ui/inc/FUiCtrl_TabBar.h b/src/ui/inc/FUiCtrl_TabBar.h new file mode 100644 index 0000000..6cad661 --- /dev/null +++ b/src/ui/inc/FUiCtrl_TabBar.h @@ -0,0 +1,196 @@ +// +// 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_TabBar.h + * @brief This is the header file for the _TabBar class. + * + * This header file contains the declarations of the %_TabBar class. + */ +#ifndef _FUI_CTRL_INTERNAL_TABBAR_H_ +#define _FUI_CTRL_INTERNAL_TABBAR_H_ + + +#include "FUi_Control.h" +#include "FUiCtrl_ActionEvent.h" + +#include "FUi_IAccessibilityListener.h" +#include "FUiCtrl_IActionEventListener.h" + +#include "FUiCtrl_TabBarItem.h" +#include "FUiCtrl_TabBarPresenter.h" + +namespace Tizen { namespace Ui { +class _AccessibilityElement; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _TabBarPresenter; + +/** + * @class _TabBar + * @brief + * @since 2.0 + * + * + * + * + */ +class _OSP_EXPORT_ _TabBar + : public Tizen::Ui::_Control + , virtual public Tizen::Base::Runtime::IEventListener + , virtual public _IUiEventListener + , virtual public _IUiEventPreviewer + , public _IAccessibilityListener +{ + DECLARE_CLASS_BEGIN(_TabBar, _Control); + DECLARE_PROPERTY("color", GetPropertyColor, SetPropertyColor); + DECLARE_PROPERTY("normalItemColor", GetPropertyNormalItemColor, SetPropertyNormalItemColor); + DECLARE_PROPERTY("selectedItemColor", GetPropertySelectedItemColor, SetPropertySelectedItemColor); + DECLARE_PROPERTY("pressedItemColor", GetPropertyPressedItemColor, SetPropertyPressedItemColor); + DECLARE_PROPERTY("disabledItemColor", GetPropertyDisabledItemColor, SetPropertyDisabledItemColor); + DECLARE_PROPERTY("normalItemTextColor", GetPropertyNormalItemTextColor, SetPropertyNormalItemTextColor); + DECLARE_PROPERTY("selectedItemTextColor", GetPropertySelectedItemTextColor, SetPropertySelectedItemTextColor); + DECLARE_PROPERTY("pressedItemTextColor", GetPropertyPressedItemTextColor, SetPropertyPressedItemTextColor); + DECLARE_PROPERTY("disabledItemTextColor", GetPropertyDisabledItemTextColor, SetPropertyDisabledItemTextColor); + DECLARE_CLASS_END(); + +// Properties + result SetPropertyColor(const Variant& color); + Variant GetPropertyColor(void) const; + + result SetPropertyNormalItemColor(const Variant& color); + Variant GetPropertyNormalItemColor(void) const; + + result SetPropertySelectedItemColor(const Variant& color); + Variant GetPropertySelectedItemColor(void) const; + + result SetPropertyPressedItemColor(const Variant& color); + Variant GetPropertyPressedItemColor(void) const; + + result SetPropertyDisabledItemColor(const Variant& color); + Variant GetPropertyDisabledItemColor(void) const; + + result SetPropertyNormalItemTextColor(const Variant& color); + Variant GetPropertyNormalItemTextColor(void) const; + + result SetPropertySelectedItemTextColor(const Variant& color); + Variant GetPropertySelectedItemTextColor(void) const; + + result SetPropertyPressedItemTextColor(const Variant& color); + Variant GetPropertyPressedItemTextColor(void) const; + + result SetPropertyDisabledItemTextColor(const Variant& color); + Variant GetPropertyDisabledItemTextColor(void) const; + +// Lifecycle +public: + virtual ~_TabBar(void); + +// Operations +public: + static _TabBar* CreateTabBarN(void); + result Initialize(void); + result AddItem(const Tizen::Base::String& text, int actionId); + result InsertItemAt(int index, const Tizen::Base::String& text, int actionId); + result SetItemAt(int index, const Tizen::Base::String& text, int actionId); + result RemoveItemAt(int index); + result RemoveAllItems(void); + + result SetColor(Tizen::Graphics::Color color); + Tizen::Graphics::Color GetColor(void) const; + + result SetItemColor(_TabBarItemStatus itemStatus, Tizen::Graphics::Color color); + Tizen::Graphics::Color GetItemColor(_TabBarItemStatus itemStatus) const; + + void SetItemTextColor(_TabBarItemStatus status, Tizen::Graphics::Color color); + Tizen::Graphics::Color GetItemTextColor(_TabBarItemStatus status) const; + + result SetItemSelected(int index); + int GetSelectedItemIndex(void) const; + + _TabBarItem* GetItemFromPosition(const Tizen::Graphics::FloatPoint& position) const; + result SetTopDrawnItemIndex(int index); + + int GetItemCount(void) const; + + result SetWidth(float width); + + void AddActionEventListener(const Tizen::Ui::Controls::_IActionEventListener& listener); + void RemoveActionEventListener(const Tizen::Ui::Controls::_IActionEventListener& listener); + + Tizen::Ui::_AccessibilityElement* GetAccessibilityElement(const int mainIndex) const; + void AddAccessibilityElement(const _AccessibilityElement& element); + + virtual void OnDraw(void); + + virtual void OnFontChanged(Tizen::Graphics::Font* pFont); + virtual void OnFontInfoRequested(unsigned long& style, float& size); + + 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 OnBoundsChanged(void); + + virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo); + virtual bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo); + virtual void OnDrawFocus(void); + virtual void OnFocusModeStateChanged(void); + + virtual bool OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityFocusMovedPrevious(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityReadingElement(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityFocusOut(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityValueIncreased(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityValueDecreased(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityItemRefreshed(const _AccessibilityContainer& control, const _AccessibilityElement& element, _AccessibilityFocusDirection direction); + +protected: + result SetPresenter(const _TabBarPresenter& tabBarPresenter); + +private: + void SetAllAccessibilityElement(void); + void RemoveAllAccessibilityElement(void); + +private: + _TabBar(void); + + _TabBar(const _TabBar& rhs); + _TabBar& operator =(const _TabBar& rhs); + +// Attribute +private: + _TabBarPresenter* __pTabBarPresenter; + + bool __isInFocusMode; + int __currentPressedItemIndex; + _ActionEvent* __pActionEvent; + + Tizen::Graphics::Color __color; + Tizen::Graphics::Color __itemColor[ITEM_STATUS_MAX]; + Tizen::Graphics::Color __itemTextColor[ITEM_STATUS_MAX]; + Tizen::Base::Collection::LinkedListT<_AccessibilityElement*> __accessibilityElements; +}; // _TabBar + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_TABBAR_H_ diff --git a/src/ui/inc/FUiCtrl_TabBarImpl.h b/src/ui/inc/FUiCtrl_TabBarImpl.h new file mode 100644 index 0000000..88fbdf3 --- /dev/null +++ b/src/ui/inc/FUiCtrl_TabBarImpl.h @@ -0,0 +1,98 @@ +// +// 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. +// + +#ifndef _FUI_CTRL_INTERNAL_TABBAR_IMPL_H_ +#define _FUI_CTRL_INTERNAL_TABBAR_IMPL_H_ + +#include +#include +#include "FUi_ControlImpl.h" +#include "FUiCtrl_TabBar.h" +#include "FUiCtrl_IActionEventListener.h" +#include "FUiCtrl_PublicActionEvent.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _TabBarImpl + : public _ControlImpl + , public _IActionEventListener + , virtual public Tizen::Base::Runtime::IEventListener +{ + +//Constants +public: + class TabBarSizeInfo : public _ControlImpl::SizeInfo + { + virtual Tizen::Graphics::Dimension GetDefaultMinimumSize(_ControlOrientation orientation) const; + virtual Tizen::Graphics::FloatDimension GetDefaultMinimumSizeF(_ControlOrientation orientation) const; + }; + +public: + virtual ~_TabBarImpl(void); + + static _TabBarImpl* CreateTabBarImplN(TabBar* pTabBar, const Tizen::Graphics::FloatRectangle& bounds); + + result AddItem(const Tizen::Base::String& text, int actionId); + result InsertItemAt(int index, const Tizen::Base::String& text, int actionId); + result SetItemAt(int index, const Tizen::Base::String& text, int actionId); + result RemoveItemAt(int index); + result RemoveAllItems(void); + + + result SetColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetColor(void) const; + + result SetSelectedItemColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetSelectedItemColor(void) const; + + result SetItemTextColor(TabBarItemStatus status, const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetItemTextColor(TabBarItemStatus status) const; + + result SetItemSelected(int index); + int GetSelectedItemIndex(void) const; + + int GetItemCount(void) const; + + result SetWidth(float width); + + void AddActionEventListener(Tizen::Ui::IActionEventListener& listener); + void RemoveActionEventListener(Tizen::Ui::IActionEventListener& listener); + + static _TabBarImpl* GetInstance(TabBar& tabBar); + static const _TabBarImpl* GetInstance(const TabBar& tabBar); + + virtual TabBar& GetPublic(void); + virtual const TabBar& GetPublic(void) const; + virtual const char* GetPublicClassName(void) const; + virtual const _TabBar& GetCore(void) const; + virtual _TabBar& GetCore(void); + + virtual void OnActionPerformed(const Tizen::Ui::_Control& source, int actionId); + +private: + _TabBarImpl(TabBar* pTabBar, _TabBar* pCore); + + _TabBarImpl(const _TabBarImpl& rhs); + _TabBarImpl& operator =(const _TabBarImpl& rhs); + + _PublicActionEvent* __pPublicActionEvent; +}; // _TabBarImpl + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_TABBAR_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_TabBarItem.h b/src/ui/inc/FUiCtrl_TabBarItem.h new file mode 100644 index 0000000..77cb1a1 --- /dev/null +++ b/src/ui/inc/FUiCtrl_TabBarItem.h @@ -0,0 +1,103 @@ +// +// 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_TabBarItem.h + * @brief This is the header file for the _TabBarItem class. + * + * This header file contains the declarations of the %_TabBarItem class. + */ +#ifndef _FUI_CTRL_INTERNAL_TABBAR_ITEM_H_ +#define _FUI_CTRL_INTERNAL_TABBAR_ITEM_H_ + + +#include +#include +#include +#include "FUi_Control.h" + +namespace Tizen { namespace Ui +{ +class _AccessibilityElement; +}} //namespace Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ + +enum _TabBarItemStatus +{ + ITEM_STATUS_NORMAL = 0, + ITEM_STATUS_SELECTED, + ITEM_STATUS_PRESSED, + ITEM_STATUS_DISABLED, + ITEM_STATUS_MAX +}; +/** + * @class _TabBarItem + * @brief + * @since 1.0 + * + * + * + * + */ +class _TabBarItem + : public Tizen::Base::Object +{ +// Lifecycle +public: + _TabBarItem(_ControlOrientation orientation); + + ~_TabBarItem(void); + +// Operations +public: + void SetActionId(int actionId); + int GetActionId(void) const; + + void SetText(const Tizen::Base::String& text, _ControlOrientation orientation); + Tizen::Base::String GetText(void) const; + + void SetStatus(_TabBarItemStatus status); + _TabBarItemStatus GetStatus(void) const; + + void SetBounds(const Tizen::Graphics::FloatRectangle& bounds); + Tizen::Graphics::FloatRectangle GetBounds(void) const; + + void SetAccessibilityElement(_AccessibilityElement* pElement); + _AccessibilityElement* GetAccessibilityElement(void); + +private: + _TabBarItem(const _TabBarItem& rhs); + _TabBarItem& operator =(const _TabBarItem& rhs); + +// Attribute +private: + int __actionId; + + Tizen::Base::String __text; + + _TabBarItemStatus __status; + + Tizen::Graphics::FloatRectangle __bounds; + + Tizen::Ui::_AccessibilityElement* __pElement; + +}; // _TabBarItem + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_TABBAR_ITEM_H_ diff --git a/src/ui/inc/FUiCtrl_TabBarItemImpl.h b/src/ui/inc/FUiCtrl_TabBarItemImpl.h new file mode 100644 index 0000000..05d1c7b --- /dev/null +++ b/src/ui/inc/FUiCtrl_TabBarItemImpl.h @@ -0,0 +1,52 @@ +// +// 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_TabBarItemImpl.h + * @brief This is the header file for the _TabBarItemImpl class. + * + * This header file contains the declarations of the _TabBarItemImpl class. + */ +#ifndef _FUI_CTRL_INTERNAL_TAB_BAR_ITEM_IMPL_H_ +#define _FUI_CTRL_INTERNAL_TAB_BAR_ITEM_IMPL_H_ + +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _TabBarItemImpl + : public Tizen::Base::Object +{ +public: + _TabBarItemImpl(void); + virtual ~_TabBarItemImpl(void); + + void SetText(const Tizen::Base::String& text); + Tizen::Base::String GetText(void) const; + + void SetActionId(int actionId); + int GetActionId(void) const; + +private: + Tizen::Base::String __text; + int __actionId; + +}; // _TabBarItemImpl + +}}} // Tizen::Ui::Controls +#endif // _FUI_CTRL_INTERNAL_TAB_BAR_ITEM_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_TabBarModel.h b/src/ui/inc/FUiCtrl_TabBarModel.h new file mode 100644 index 0000000..b08bb5e --- /dev/null +++ b/src/ui/inc/FUiCtrl_TabBarModel.h @@ -0,0 +1,88 @@ +// +// 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_TabBarModel.h + * @brief This is the header file for the _TabBarModel class. + * + * This header file contains the declarations of the %_TabBarModel class. + */ +#ifndef _FUI_CTRL_INTERNAL_TABBAR_MODEL_H_ +#define _FUI_CTRL_INTERNAL_TABBAR_MODEL_H_ + + +#include +#include +#include "FUiCtrl_TabBarItem.h" +#include "FUi_ResourceManager.h" + +namespace Tizen { namespace Ui { namespace Controls +{ +/** + * @class _TabBarModel + * @brief + * @since 2.0 + * + * + * + * + */ +class _TabBarModel + : public Tizen::Base::Object +{ +// Lifecycle +public: + _TabBarModel(void); + virtual ~_TabBarModel(void); + +// Operations +public: + void SetSelectedItemIndex(int index); + int GetSelectedItemIndex(void) const; + void SetFirstDrawnItemIndex(int index); + int GetFirstDrawnItemIndex(void) const; + void SetLastDrawnItemIndex(int index); + int GetLastDrawnItemIndex(void) const; + int GetItemCount(void) const; + float GetWidthOfAllItems(void) const; + + result AddItem(const Tizen::Base::String& text, int actionId, _ControlOrientation orientation); + result InsertItemAt(int index, const Tizen::Base::String& text, int actionId, _ControlOrientation orientation); + result SetItemAt(int index, const Tizen::Base::String& text, int actionId, _ControlOrientation orientation); + result RemoveItemAt(int index, _ControlOrientation orientation); + void RemoveAllItems(void); + + _TabBarItem* GetItemAt(int index) const; + +private: + _TabBarModel(const _TabBarModel& rhs); + _TabBarModel& operator =(const _TabBarModel& rhs); + result ReCalculateItemPosition(int itemIndex, _ControlOrientation orientation); + +// Attribute +private: + Tizen::Base::Collection::ArrayList __tabBarItems; + + int __selectedItemIndex; + int __firstDrawnItemIndex; + int __lastDrawnItemIndex; + float __widthOfAllItems; + +}; // _TabBarModel + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_TABBAR_MODEL_H_ diff --git a/src/ui/inc/FUiCtrl_TabBarPresenter.h b/src/ui/inc/FUiCtrl_TabBarPresenter.h new file mode 100644 index 0000000..810549f --- /dev/null +++ b/src/ui/inc/FUiCtrl_TabBarPresenter.h @@ -0,0 +1,157 @@ +// +// 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_TabBarPresenter.h + * @brief This is the header file for the _TabBarPresenter class. + * + * This header file contains the declarations of the %_TabBarPresenter class. + */ +#ifndef _FUI_CTRL_INTERNAL_TABBAR_PRESENTER_H_ +#define _FUI_CTRL_INTERNAL_TABBAR_PRESENTER_H_ + + +#include +#include +#include "FUi_Control.h" +#include "FUiCtrl_TabBar.h" +#include "FUiCtrl_TabBarItem.h" +#include "FUiCtrl_TabBarModel.h" +#include "FUiCtrl_TabPresenter.h" + +namespace Tizen { namespace Ui { namespace Controls +{ +class _TabBar; + + +/** + * @class _TabBarPresenter + * @brief + * @since 2.0 + * + * + * + * + */ +class _TabBarPresenter + : public Tizen::Base::Object +{ +// Lifecycle +public: + _TabBarPresenter(_TabBar& pTabBar); + virtual ~_TabBarPresenter(void); + +// Operations +public: + result Construct(void); + result InitializeFont(void); + + result AddItem(const Tizen::Base::String& text, int actionId); + result InsertItemAt(int index, const Tizen::Base::String& text, int actionId); + result SetItemAt(int index, const Tizen::Base::String& text, int actionId); + _TabBarItem* GetItemAt(int index) const; + result RemoveItemAt(int index); + result RemoveAllItems(void); + + result SetItemSelected(int index); + int GetSelectedItemIndex(void) const; + + int GetItemCount(void) const; + int GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& point) const; + int GetItemIndexFromAbsPosition(const Tizen::Graphics::FloatPoint& point) const; + _TabBarItem* GetItemFromPosition(const Tizen::Graphics::FloatPoint& position) const; + result SetTopDrawnItemIndex(int index); + + result SetReplacementColor(const Tizen::Graphics::Color& color); + result SetItemReplacementColor(_TabBarItemStatus itemStatus, const Tizen::Graphics::Color& color); + + void Draw(void); + void ResetItemPositionX(void); + + virtual void OnFontChanged(Tizen::Graphics::Font* pFont); + virtual void OnFontInfoRequested(unsigned long& style, float& size); + + bool OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo); + bool OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo); + bool OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo); + bool OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo); + void OnBoundsChanged(void); + + _TabBarItemStatus GetItemStatus(int index) const; + result SetItemStatus(int index, _TabBarItemStatus status); + result ShiftToFocusedItem(int itemIndex, _FocusDirectionMove direction); + + void SetAllAccessibilityElement(void); + /* Calling sequence of OnAccessibilityCallbacks + * OnItemRefresh if only scroll with direction + * OnFocusOut if only same control just before, element is also before one + * OnFocusIn + * OnFocusMoveNext / Prev if only scroll with direction + * OnReadingElement + * OnReadedElement if Not read, Not on + */ + bool OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element); + bool OnAccessibilityFocusMovedPrevious(const _AccessibilityContainer& control, const _AccessibilityElement& element); + bool OnAccessibilityReadingElement(const _AccessibilityContainer& control, const _AccessibilityElement& element); + bool OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element); + bool OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element); + bool OnAccessibilityFocusOut(const _AccessibilityContainer& control, const _AccessibilityElement& element); + bool OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element); + bool OnAccessibilityValueIncreased(const _AccessibilityContainer& control, const _AccessibilityElement& element); + bool OnAccessibilityValueDecreased(const _AccessibilityContainer& control, const _AccessibilityElement& element); + bool OnAccessibilityItemRefreshed(const _AccessibilityContainer& control, const _AccessibilityElement& element, _AccessibilityFocusDirection direction); + +private: + result LoadBitmap(void); + result AdjustItemPositionX(float distance); + void DrawBackground(Tizen::Graphics::Canvas* pCanvas); + void DrawItem(Tizen::Graphics::Canvas* pCanvas); + void DrawArrow(Tizen::Graphics::Canvas* pCanvas); + result DrawBitmap(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, const Tizen::Graphics::Bitmap& bitmap); + +private: + _TabBarPresenter(const _TabBarPresenter& rhs); + _TabBarPresenter& operator =(const _TabBarPresenter& rhs); + +private: + _TabBar& __tabBar; + _TabBarModel* __pTabBarModel; + + Tizen::Graphics::Font* __pFont; + Tizen::Graphics::_Text::TextObject* __pTextObject; + Tizen::Graphics::FloatPoint __startPosition; + int __pressedItemIndex; + bool __touchMoved; + bool __touchBubblingBlocked; + + float __topMargin; + float __sideMargin; + float __itemMargin; + float __arrowMargin; + float __itemMaxWidth; + + Tizen::Graphics::Bitmap* __pBgBitmapCached; + Tizen::Graphics::Bitmap* __pBgEffectBitmapCached; + + Tizen::Graphics::Bitmap* __pItemBgBitmapCached[ITEM_STATUS_MAX]; + + Tizen::Graphics::Bitmap* __pLeftArrowBitmapCached; + Tizen::Graphics::Bitmap* __pRightArrowBitmapCached; +}; // _TabBarPresenter + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_TABBAR_PRESENTER_H_ diff --git a/src/ui/inc/FUiCtrl_TabImpl.h b/src/ui/inc/FUiCtrl_TabImpl.h new file mode 100644 index 0000000..6c5f71a --- /dev/null +++ b/src/ui/inc/FUiCtrl_TabImpl.h @@ -0,0 +1,138 @@ +// +// 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_TabImpl.h + * @brief This is the header file for the _TabImpl class. + * + * This header file contains the declarations of the %_TabImpl class. + */ + +#ifndef _FUICTRL_TAB_IMPL_H_ +#define _FUICTRL_TAB_IMPL_H_ + +#include +#include +#include "FUi_ControlImpl.h" +#include "FUiCtrl_Tab.h" +#include "FUiCtrl_IActionEventListener.h" +#include "FUiCtrl_PublicActionEvent.h" + +namespace Tizen { namespace Ui { namespace Controls { + + class _PublicActionEvent; + +/** + * @class _TabImpl + * @brief + * @since 2.1 + * + * + * + * + */ +class _TabImpl + : public _ControlImpl + , public _IActionEventListener + , virtual public Tizen::Base::Runtime::IEventListener +{ +public: + static _TabImpl* CreateTabImplN(Tab* pPublic); + virtual ~_TabImpl(void); + + virtual const char* GetPublicClassName(void) const; + + Tab* GetTab(void); + + virtual Tab& GetPublic(void); + virtual const Tab& GetPublic(void) const; + + virtual const _Tab& GetCore(void) const; + virtual _Tab& GetCore(void); + +private: + _TabImpl(Tab* pPublic, _Tab* pCore); + + _TabImpl(const _TabImpl& value); + _TabImpl& operator =(const _TabImpl& value); + +public: + static _TabImpl* GetInstance(Tab& pControl); + static const _TabImpl* GetInstance(const Tab& pControl); + + static Tab* CreateTabN(void); + static void DeleteTab(Tab* pTab); + + virtual bool IsMovable(void) const; + virtual bool IsResizable(void) const; + + + result AddItem(const Tizen::Graphics::Bitmap& icon, const Tizen::Base::String& text, int actionId); + result AddItem(const Tizen::Graphics::Bitmap& icon, int actionId); + result AddItem(const Tizen::Base::String& text, int actionId); + + result InsertItemAt(int index, const Tizen::Graphics::Bitmap& icon, const Tizen::Base::String& text, int actionId); + result InsertItemAt(int index, const Tizen::Graphics::Bitmap& icon, int actionId); + result InsertItemAt(int index, const Tizen::Base::String& text, int actionId); + + result SetItemAt(int index, const Tizen::Graphics::Bitmap& icon, const Tizen::Base::String& text, int actionId); + result SetItemAt(int index, const Tizen::Graphics::Bitmap& icon, int actionId); + result SetItemAt(int index, const Tizen::Base::String& text, int actionId); + + result RemoveItemAt(int index); + result RemoveAllItems(void); + + result SetBadgeIcon(int actionId, const Tizen::Graphics::Bitmap* pBadgeIcon); + + int GetItemCount(void) const; + + int GetItemIndexFromActionId(int actionId) const; + int GetItemActionIdAt(int index) const; + + void SetSelectedItem(int index); + int GetSelectedItemIndex(void) const; + + void SetEditModeEnabled(bool enable); + bool IsEditModeEnabled(void) const; + + result SetBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap); + result SetFocusedItemBackgroundBitmap (const Tizen::Graphics::Bitmap& bitmap); + + void SetTextColor(const Tizen::Graphics::Color& textColor); + Tizen::Graphics::Color GetTextColor(void) const; + + void SetSelectedTextColor(const Tizen::Graphics::Color& textColor); + Tizen::Graphics::Color GetSelectedTextColor(void) const; + + result SetHighlightedItemBackgroundBitmap (const Tizen::Graphics::Bitmap& bitmap); + + void SetHighlightedTextColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetHighlightedTextColor(void) const; + + void AddActionEventListener(Tizen::Ui::IActionEventListener& listener); + void RemoveActionEventListener(Tizen::Ui::IActionEventListener& listener); + + virtual void OnActionPerformed(const Tizen::Ui::_Control& source, int actionId); + +private: + _PublicActionEvent* __pActionEvent; + +}; + +}}} // Tizen::Ui::Controls + +#endif //_FUICTRL_TAB_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_TabItem.h b/src/ui/inc/FUiCtrl_TabItem.h new file mode 100644 index 0000000..993792f --- /dev/null +++ b/src/ui/inc/FUiCtrl_TabItem.h @@ -0,0 +1,122 @@ +// +// 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_TabItem.h + * @brief This is the header file for the _TabItem class. + * + * This header file contains the declarations of the %_Tab class. + */ + +#ifndef _FUICTRL_INTERNAL_TABITEM_H_ +#define _FUICTRL_INTERNAL_TABITEM_H_ + +#include +#include +#include +#include "FUi_Control.h" + +namespace Tizen { namespace Graphics { + class Bitmap; +}} // Tizen::Graphics + +namespace Tizen { namespace Ui { namespace Controls { + +// enum +enum _TabItemStatus +{ + _TABITEM_STATUS_NORMAL = 0, /** The normal status */ + _TABITEM_STATUS_PRESSED, /** The pressed status */ + _TABITEM_STATUS_SELECTED, /** The selected status */ + _TABITEM_STATUS_HIGHLIGHTED, /** The focused status */ + _TABITEM_STATUS_DISABLED, /** The disabled status */ + + _TABITEM_STATUS_MAX +}; + +enum _TabItemStyle +{ + _TABITEM_STYLE_TEXT, + _TABITEM_STYLE_ICON, + _TABITEM_STYLE_ICON_TEXT +}; + +/** + * @class _TabItem + * @brief + * @since 2.1 + * + * + * + * + */ +class _TabItem + : public Tizen::Base::Object +{ +private: + _TabItem(const _TabItem& value); + _TabItem& operator =(const _TabItem& value); + +public: + _TabItem(void); + virtual ~_TabItem(void); + +public: + void SetActionId(int actionId); + int GetActionId(void) const; + + void SetUpdateState(bool bUpdate); + int GetUpdateState(void) const; + + void SetText(const Tizen::Base::String& text); + Tizen::Base::String GetText(void) const; + + void SetIcon(const Tizen::Graphics::Bitmap& icon); + Tizen::Graphics::Bitmap* GetIcon(void) const; + + void SetBadgeIcon(const Tizen::Graphics::Bitmap& icon); + Tizen::Graphics::Bitmap* GetBadgeIcon(void) const; + + void SetItemBounds(Tizen::Graphics::FloatRectangle bounds); + Tizen::Graphics::FloatRectangle GetItemBounds(void) const; + + void SetStatus(_TabItemStatus status); + _TabItemStatus GetStatus(void) const; + + void SetStyle(int style); + _TabItemStyle GetStyle(void) const; + + +private: + int __actionId; + bool __bUpdate; + + int __style; + + Tizen::Base::String __text; + + Tizen::Graphics::Bitmap* __pbmIcon; + Tizen::Graphics::Bitmap* __pbmBadge; + + Tizen::Graphics::FloatRectangle __bounds; + + _TabItemStatus __status; +}; + +}}} // Tizen::Ui::Controls + +#endif // _FUICTRL_INTERNAL_TABITEM_H_ diff --git a/src/ui/inc/FUiCtrl_TabModel.h b/src/ui/inc/FUiCtrl_TabModel.h new file mode 100644 index 0000000..31a8078 --- /dev/null +++ b/src/ui/inc/FUiCtrl_TabModel.h @@ -0,0 +1,76 @@ +// +// 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_TabModel.h + * @brief This is the header file for the _TabModel class. + * + * This header file contains the declarations of the %_TabModel class. + */ +#ifndef _FUICTRL_INTERNAL_TAB_MODEL_H_ +#define _FUICTRL_INTERNAL_TAB_MODEL_H_ + +#include + +namespace Tizen { namespace Ui { namespace Controls { + +/** + * @class _TabModel + * @brief + * @since 2.1 + * + * + * + * + */ +class _TabModel + : public Tizen::Base::Object +{ +private: + _TabModel(const _TabModel& value); + _TabModel& operator=(const _TabModel& value); + +// Lifecycle +public: + _TabModel(void); + virtual ~_TabModel(void); + +public: + result Construct(void); + + void SetSelectedItemIndex(int index); + int GetSelectedItemIndex(void) const; + + void SetPressedItemIndex(int index); + int GetPressedItemIndex(void) const; + + void SetFirstDrawnItemIndex(int index); + int GetFirstDrawnItemIndex(void) const; + + void SetEditModeEnabled(bool enable); + bool IsEditModeEnabled(void) const; + +private: + int __selectedItemIndex; + int __pressedItemIndex; + int __firstDrawnItemIndex; + bool __isEditModeEnabled; +}; + +}}} // Tizen::Ui::Controls + +#endif // _FUICTRL_INTERNAL_TAB_MODEL_H_ diff --git a/src/ui/inc/FUiCtrl_TabPresenter.h b/src/ui/inc/FUiCtrl_TabPresenter.h new file mode 100644 index 0000000..2565112 --- /dev/null +++ b/src/ui/inc/FUiCtrl_TabPresenter.h @@ -0,0 +1,276 @@ +// +// 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_TabPresenter.h + * @brief This is the header file for the _TabPresenter class. + * + * This header file contains the declarations of the %_TabPresenter class. + */ +#ifndef _FUICTRL_INTERNAL_TAB_PRESENTER_H_ +#define _FUICTRL_INTERNAL_TAB_PRESENTER_H_ + +#include +#include +#include "FUiCtrl_Tab.h" +#include "FUiCtrl_TabModel.h" +#include "FUiCtrl_TabItem.h" +#include "FUiCtrl_FlickAnimation.h" + +namespace Tizen { namespace Ui { namespace Animations { + class _VisualElement; + class VisualElementAnimation; +}}} // Tizen::Ui::Animations + +namespace Tizen { namespace Graphics { + class Bitmap; + class Font; +}} // Tizen::Graphics + +namespace Tizen { namespace Graphics { namespace _Text { + class TextObject; +}}} // Tizen::Graphics::_Text + +namespace Tizen { namespace Base { namespace RunTime { + class Timer; +}}} +namespace Tizen { namespace Ui { namespace Controls { + class _Tab; + class _TabModel; + class _TabItem; + class _FlickAnimation; + +// enum +enum _FocusDirectionMove +{ + _FOCUS_DIRECTION_MOVE_LEFT = 0, /** Move Focus to Left */ + _FOCUS_DIRECTION_MOVE_RIGHT /** Move Focus to Right*/ +}; + +/** + * @class _TabPresenter + * @brief + * @since 2.1 + * + * + * + * + */ +class _TabPresenter + : public Tizen::Base::Object + , public Tizen::Ui::Animations::IVisualElementAnimationStatusEventListener + , public Tizen::Base::Runtime::ITimerEventListener +{ + +public: + _TabPresenter(void); + virtual ~_TabPresenter(void); + +public: + result Construct(const _Tab& tab); + +public: + + void SetSelectedItemIndex(int index); + int GetSelectedItemIndex(void) const; + + void SetPressedItemIndex(int index); + int GetPressedItemIndex(void) const; + + void SetFirstDrawnItemIndex(int index); + int GetFirstDrawnItemIndex(void) const; + + void SetEditModeEnabled(bool isEnable); + bool IsEditModeEnabled(void) const; + + int GetItemCount(void) const; + _TabItem* GetItemAt(int index); + + result SetItemStatus(int index, _TabItemStatus status); + _TabItemStatus GetItemStatus(int index) const; + + int GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& point) const; + int GetNextItemIndexFromPosition(const Tizen::Graphics::FloatPoint& point, int currentIndex) const; + + void Draw(void); + void SetRecalculateItemBounds(bool isRecalculationRequired); + + float CalculateProgress(float timeProgress) const; + + result StartReorderTimer(int); + result CancelReorderTimer(int index = 0); + result ResetReorderTimer(void); + void StartReorderAnimation(int, int); + void FreeHorizontalLineBitmap(); + + 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 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 isCompletedNormally); + + virtual bool OnLongPressGestureDetected(void); + virtual bool OnFlickGestureDetected(_TouchFlickGestureDetector& gesture); + void OnFontChanged(Tizen::Graphics::Font* pFont); + void OnFontInfoRequested(unsigned long& style, float& size); + void OnBoundsChanged(void); + void OnChangeLayout(Tizen::Ui::_ControlOrientation orientation); + void MoveNext(void); + void MovePrevious(void); + void MoveToFirst(void); + void MoveToLast(int distance); + + result ShiftToFocusedItem(int itemIndex, _FocusDirectionMove direction); + +protected: + result SetModel(const _TabModel& tabModel); + +private: + + result LoadBitmap(void); + void DrawResourceBitmap(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, Tizen::Graphics::Bitmap* pBitmap); + + void DrawTextItem(Tizen::Graphics::Canvas* pCanvas); + void DrawEditTextItem(Tizen::Graphics::Canvas* pCanvas); + + void DrawItemBackground(Tizen::Graphics::Canvas* pCanvas, Tizen::Graphics::FloatRectangle& itemRect); + + void DrawPressedItemBackground(Tizen::Graphics::Canvas* pCanvas, Tizen::Graphics::FloatRectangle& itemRect); + void DrawHighlightedItemBackground(Tizen::Graphics::Canvas* pCanvas, Tizen::Graphics::FloatRectangle& itemRect); + void DrawSelectedItemBackground(Tizen::Graphics::Canvas* pCanvas, Tizen::Graphics::FloatRectangle& itemRect); + + void DrawIconItem(Tizen::Graphics::Canvas* pCanvas); + void DrawEditIconItem(Tizen::Graphics::Canvas* pCanvas); + + void DrawItem(Tizen::Graphics::Canvas* pCanvas); + void DrawEditIconTextItem(Tizen::Graphics::Canvas* pCanvas); + + void SetEditItemBounds(const Tizen::Graphics::FloatPoint& point); + void DrawItemDivider(Tizen::Graphics::Canvas& canvas, Tizen::Graphics::FloatRectangle& lineRect); + void DrawHorizontal(void); + void DrawBadgeIcon(_TabItem* pDrawItem, Tizen::Graphics::Canvas* pCanvas); + + + void CalculateItemBounds(void); + void CalculateTabBounds(bool isReset); + + void StartFlickAnimation(void); + result StartFlickAnimationTimer(void); + result ResetFlickAnimationTimer(void); + + result StartScrollAnimationTimer(void); + result ResetScrollAnimationTimer(void); + + void SetItemFit(int); + void SetItemFitToLeft(void); + void SetItemFitToRight(void); + void SwapItems(int indexDest, float distance); + void ShiftItems(void); + + void SetFirstLoadedItemIndex(void); + void SetLastLoadedItemIndex(void); + + virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer); + +private: + _TabPresenter(const _TabPresenter& value); + _TabPresenter& operator=(const _TabPresenter& value); + +private: + _Tab* __pTab; + + _TabModel* __pTabModel; + + Tizen::Graphics::Font* __pFont; + + Tizen::Graphics::_Text::TextObject* __pTextObject; + + Tizen::Graphics::FloatPoint __currentTouchPosition; + Tizen::Graphics::FloatRectangle __dividerLine; + Tizen::Graphics::FloatRectangle __selectedLine; + + static const int _TIMER_COUNT = 3; + static const int _TAB_ITEM_MAXCOUNT = 14; + + struct ReorderAnimationInfo *__pAnimInfo[_TAB_ITEM_MAXCOUNT]; + struct TimerInfo *__pTimerInfo[_TIMER_COUNT]; + bool __isRecalculateNeeded; + bool __isEditMode; + + int __editItemIndex; + + + Tizen::Graphics::Bitmap* __pHorizontalLineBitmap; + + Tizen::Graphics::Bitmap* __pFocusBitmap; + + Tizen::Base::Runtime::Timer* __pFlickAnimationTimer; + Tizen::Base::Runtime::Timer* __pScrollAnimationTimer; + + _FlickAnimation __flickAnimation; + + Tizen::Graphics::Color backgroundColor; + int __startShowIndex; + int __showItemCount; + float __width; + float __height; + static const int FLICK_ANIMATION_TIMER_PERIOD = 3; + static const int FLICK_ANIMATION_FPS_TAB = 30; + static const int FLICK_ANIMATION_SENSITIVITY_TAB = 30; + static const int SCROLL_ANIMATION_TIMER_PERIOD = 500; + static const int FLICK_ANIMATION_COUNT = 50; + static const int REORDER_ANIMATION_COUNT = 50; + static const int OVERSCROLL_ANIMATION_DURATION = 500; + + static const int REORDER_TIMER_PERIOD = 1; + + float __moveDistance; + bool __isFlickEnabled; + int __itemMaxCount; + float __itemWidth; + float __itemHeight; + int __rearIndex; + bool __isRightScrollable; + bool __isLeftScrollable; + + bool __isDirectionRight; + bool __isTimerCanceled; + float __flickMove;; + float __flickDistance; + int __flickFlag; + float __reorderDist; + + int __firstItemIndex; + int __lastItemIndex; + + int __firstLoadedItemIndex; + int __lastLoadedItemIndex; + + int __timerCount; + bool __isTouchMove; + float __tabMinimumSize; + int __fontChangeItemCount; + +}; + +}}} // Tizen::Ui::Controls + +#endif // _FUICTRL_INTERNAL_TAB_PRESENTER_H_ + + diff --git a/src/ui/inc/FUiCtrl_TableView.h b/src/ui/inc/FUiCtrl_TableView.h new file mode 100644 index 0000000..6321f25 --- /dev/null +++ b/src/ui/inc/FUiCtrl_TableView.h @@ -0,0 +1,324 @@ +// +// 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_TableView.h + * @brief This file defines the _TableView class. + * + * This header file contains the declarations of the %_TableView class. + */ + +#ifndef _FUI_CTRL_INTERNAL_TABLE_VIEW_H_ +#define _FUI_CTRL_INTERNAL_TABLE_VIEW_H_ + +#include +#include "FUiCtrl_ScrollPanel.h" +#include "FUiCtrl_TableViewItemEventArg.h" +#include "FUiCtrl_ITableViewItemEventListener.h" + +namespace Tizen { namespace Ui { namespace Controls +{ +class _FastScroll; +class _TableViewItem; +class _TableViewItemProvider; +class _TableViewItemProviderAdaptor; +class _TableViewPresenter; +class _IUiFastScrollListener; +class _UiTableViewItemEvent; + +enum TableViewStyle +{ + TABLE_VIEW_STYLE_SIMPLE = 0, + TABLE_VIEW_STYLE_GROUPED, + TABLE_VIEW_STYLE_SECTION +}; + +struct TableViewItemTag +{ + int groupIndex; + int itemIndex; +}; + +class _OSP_EXPORT_ _TableView + : public _ScrollPanel + , virtual public _ITouchGestureEventListener + , virtual public _IUiEventListener + , virtual public _IUiEventPreviewer + , virtual public Tizen::Base::Runtime::IEventListener +{ + DECLARE_CLASS_BEGIN(_TableView, _ScrollPanel); + DECLARE_PROPERTY("itemDividerColor", GetPropertyItemDividerColor, SetPropertyItemDividerColor); + DECLARE_PROPERTY("textColorOfEmptyTableView", GetPropertyTextColorOfEmptyTableView, SetPropertyTextColorOfEmptyTableView); + DECLARE_PROPERTY("textOfEmptyTableView", GetPropertyTextOfEmptyTableView, SetPropertyTextOfEmptyTableView); + DECLARE_PROPERTY("sectionColor", GetPropertySectionColor, SetPropertySectionColor); + DECLARE_CLASS_END(); + +public: + virtual ~_TableView(void); + + static _TableView* CreateTableViewN(TableViewStyle style, bool itemDivider, TableViewScrollBarStyle scrollStyle); + + result Initialize(TableViewStyle style, bool itemDivider, TableViewScrollBarStyle scrollStyle); + + result SetItemProvider(const _TableViewItemProvider* pProvider); + + void SetItemProviderAdaptor(_TableViewItemProviderAdaptor* pProviderAdaptor); + _TableViewItemProviderAdaptor* GetItemProviderAdaptor(void) const; + + result AddTableViewItemEventListener(const _ITableViewItemEventListener& listener); + result RemoveTableViewItemEventListener(const _ITableViewItemEventListener& listener); + result AddGroupedTableViewItemEventListener(const _ITableViewItemEventListener& listener); + result RemoveGroupedTableViewItemEventListener(const _ITableViewItemEventListener& listener); + result AddSectionTableViewItemEventListener(const _ITableViewItemEventListener& listener); + result RemoveSectionTableViewItemEventListener(const _ITableViewItemEventListener& listener); + + result AddFastScrollListener(const _IUiFastScrollListener& listener); + + result RemoveFastScrollListener(const _IUiFastScrollListener& listener); + + // touch Event Previewer + 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); + virtual _UiTouchEventDelivery OnPreviewTouchCanceled(const _Control& source, const _TouchInfo& touchinfo); + + // event handler for ITouchEventListener + 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); + + //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); + virtual bool OnFlickGestureCanceled(_TouchFlickGestureDetector& gesture); + + void SetSweepEnabled(bool enable); + bool IsSweepEnabled(void) const; + + bool IsReorderModeEnabled(void) const; + result SetReorderModeEnabled(bool enable); + + //Restore list Focus + 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); + + TableViewScrollBarStyle GetScrollStyle(void) const; + result SetScrollStyle(TableViewScrollBarStyle scrollStyle); + + TableViewStyle GetTableViewStyle(void) const; + void SetTableViewStyle(TableViewStyle style); + + result GetTopDrawnItemIndex(int& groupIndex, int& itemIndex) const; + result SetTopDrawnItemIndex(int groupIndex, int itemIndex); // ScrollToItem(); + + result GetBottomDrawnItemIndex(int& groupIndex, int& itemIndex) const; + result SetBottomDrawnItemIndex(int groupIndex, int itemIndex); // ScrollToItem(); + + result ScrollByPixel(float scrollDistance); + void SetScrollEnabled(bool enable); + bool IsScrollEnabled(void) const; + + result SetItemChecked(int groupIndex, int itemIndex, bool check); + bool IsItemChecked(int groupIndex, int itemIndex) const; + + result SetItemEnabled(int groupIndex, int itemIndex, bool enable); + bool IsItemEnabled(int groupIndex, int itemIndex) const; + + int GetGroupCount(void) const; + int GetItemCountAt(int groupIndex) const; + + result RefreshTableView(int groupIndex, int itemIndex, TableViewRefreshType type, bool animation = true); + result RefreshAllItems(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; + + Tizen::Graphics::Color GetItemDividerColor(void) const; + result SetItemDividerColor(const Tizen::Graphics::Color& color); + + bool IsItemDividerEnabled(void) const; + void SetItemDividerEnabled(bool enable); + + Tizen::Graphics::Bitmap* GetBitmapOfEmptyTableView(void) const; + result SetBitmapOfEmptyTableView(const Tizen::Graphics::Bitmap* pBitmap); + + Tizen::Graphics::Color GetTextColorOfEmptyTableView(void) const; + result SetTextColorOfEmptyTableView(const Tizen::Graphics::Color& color); + + Tizen::Base::String GetTextOfEmptyTableView(void) const; + result SetTextOfEmptyTableView(const Tizen::Base::String& text); + + Tizen::Graphics::Color GetSectionColor(void) const; + result SetSectionColor(const Tizen::Graphics::Color& color); + + float GetTopMargin(void) const; + result SetTopMargin(float topMargin); + + float GetBottomMargin(void) const; + result SetBottomMargin(float bottomMargin); + + bool IsItemChecked(int index) const; + result SetItemChecked(int index, bool check); + + bool IsItemEnabled(int index) const; + result SetItemEnabled(int index, bool enable); + + void CheckItemHeightAndRefreshLayout(int groupIndex, int itemIndex); + + _TableViewItem* FindItem(int groupIndex, int itemIndex) const; + void UnloadItem(int groupIndex, int itemIndex); + _TableViewItem* LoadItem(int groupIndex, int itemIndex); + void RefreshItemLayout(int groupIndex, int itemIndex); + void GetFirstLoadedItemIndex(int& groupIndex, int& itemIndex) const; + void GetLastLoadedItemIndex(int& groupIndex, int& itemIndex) const; + void ResetSweepItem(void); + void GetSweepItemIndex(int& groupIndex, int& itemIndex) const; + int GetPressedItemCount(void); + + void FireTableViewItemEvent(int groupIndex, int itemIndex, TableViewNotifyType type, _TableViewItem* pItem); + void FireTableViewItemSweepEvent(int groupIndex, int itemIndex, TableViewSweepDirection directioin); + void FireTableViewItemReorderEvent(int fromItemIndex, int toItemIndex); + void FireTableViewItemReorderEvent(int fromGroupIndex, int fromItemIndex, int toGroupIndex, int toItemIndex); + void FireTableViewContextItemActivationEvent(int groupIndex, int itemIndex, _TableViewItem* pItem, bool activated); + + // Item Expand / Collapse + result ExpandGroup(int groupIndex); + result CollapseGroup(int groupIndex); + bool IsGroupExpanded(int groupIndex) const; + + result ExpandAllGroup(bool animation); + result CollapseAllGroup(bool animation); + void StopExpandCollapseAnimation(void); + + void SetGroupedLookEnabled(bool enable); + bool IsGroupedLookEnabled(void) const; + + bool GetFirstDrawnFlag(void) const; + int GetMaxItemCachingSize(void) const; + + result OpenContextItem(int groupIndex, int itemIndex); + result CloseContextItem(int groupIndex, int itemIndex); + bool IsContextItemOpened(int groupIndex, int itemIndex) const; + + result SetSectionHeaderTextHorizontalAlignment(int sectionIndex, HorizontalAlignment alignment); + HorizontalAlignment GetSectionHeaderTextHorizontalAlignment(int sectionIndex) const; + result SetSectionFooterTextHorizontalAlignment(int sectionIndex, HorizontalAlignment alignment); + HorizontalAlignment GetSectionFooterTextHorizontalAlignment(int sectionIndex) const; + + 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; + + // Focus Ui + 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 OnDrawFocus(void); + virtual void OnFocusModeStateChanged(void); + + //Enable/Visible state change + virtual void OnVisibleStateChanged(void); + virtual void OnAncestorEnableStateChanged(const _Control& control); + virtual void OnAncestorVisibleStateChanged(const _Control& control); + virtual void OnFocusableStateChanged(bool focusalbeState); + +protected: + // Properties + result SetPropertyItemDividerColor(const Variant& itemDividerColor); + Variant GetPropertyItemDividerColor(void) const; + + result SetPropertyTextColorOfEmptyTableView(const Variant& textColorOfEmptyTableView); + Variant GetPropertyTextColorOfEmptyTableView(void) const; + + result SetPropertyTextOfEmptyTableView(const Variant& textOfEmptyTableView); + Variant GetPropertyTextOfEmptyTableView(void) const; + + result SetPropertySectionColor(const Variant& sectionColor); + Variant GetPropertySectionColor(void) const; + +protected: + _TableView(void); + _TableViewPresenter* GetTableViewPresenter(void) const; + void SetTableViewPresenter(const _TableViewPresenter* pPresenter); + +private: + _TableView(_TableView& rhs); + _TableView& operator =(_TableView& rhs); + + bool IsOnProcessing(void); + +// Attribute +private: + _TableViewPresenter* __pTableViewPresenter; + _FastScroll* __pFastScroll; + _UiTableViewItemEvent* __pTableViewItemEvent; + + // property + bool __itemDividerEnabled; + bool __sweepEnabled; + bool __reorderEnabled; + bool __sectionStyle; + bool __groupedLookEnable; + + TableViewStyle __tableViewStyle; + TableViewScrollBarStyle __scrollStyle; + + Tizen::Graphics::Color __itemDividerColor; + Tizen::Graphics::Bitmap* __pBitmapOfEmptyTableView; + Tizen::Graphics::Bitmap* __pBackgroundBitmap; + Tizen::Base::String __textOfEmptyTableView; + Tizen::Graphics::Color __textColorOfEmptyTableView; + Tizen::Graphics::Color __sectionStyleColor; + + Tizen::Ui::Animations::VisualElementValueAnimation* __pExpandGroupAnimation; + Tizen::Ui::Animations::VisualElementValueAnimation* __pCollapseGroupAnimation; + Tizen::Ui::Animations::VisualElementValueAnimation* __pSweptAnimation; + Tizen::Ui::Animations::VisualElementValueAnimation* __pRemoveItemtAnimation; +}; + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_TABLE_VIEW_H_ diff --git a/src/ui/inc/FUiCtrl_TableViewImpl.h b/src/ui/inc/FUiCtrl_TableViewImpl.h new file mode 100644 index 0000000..691174d --- /dev/null +++ b/src/ui/inc/FUiCtrl_TableViewImpl.h @@ -0,0 +1,246 @@ +// +// 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_TableViewImpl.h + * @brief This file defines the TableViewImpl class. + * @version 3.0 + * + * This file contains the declarations of TableViewImpl class. + */ + +#ifndef _FUI_CTRL_INTERNAL_TABLE_VIEW_IMPL_H_ +#define _FUI_CTRL_INTERNAL_TABLE_VIEW_IMPL_H_ + +#include +#include +#include +#include +#include +#include "FUi_ContainerImpl.h" +#include "FUiCtrl_TableView.h" +#include "FUiCtrl_TableViewItemEvent.h" +#include "FUiCtrl_ITableViewItemEventListener.h" +#include "FUiCtrl_IScrollEventListener.h" +#include "FUiCtrl_FastScrollEvent.h" +#include "FUiCtrl_FastScrollEventArg.h" +#include "FUiCtrl_IFastScrollListener.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class ITableViewitemEventListener; +class IGroupedTableViewItemEventListener; +class ISectionTableViewItemEventListener; +class ITableViewItemProvider; +class IGroupedTableViewItemProvider; +class ISectionTableViewItemProvider; +class ITableViewItemProviderF; +class IGroupedTableViewItemProviderF; +class ISectionTableViewItemProviderF; +class _ScrollEvent; +class _FastScrollEvent; + +struct _TableViewPublic +{ + TableViewStyle style; + TableView *pTableView; + GroupedTableView *pGroupedTableView; + SectionTableView *pSectionTableView; + + _TableViewPublic(void) + { + style = TABLE_VIEW_STYLE_SIMPLE; + pTableView = null; + pGroupedTableView = null; + pSectionTableView = null; + } +}; + +class _TableViewImpl + : public _ContainerImpl + , public _ITableViewItemEventListener + , public _IScrollEventListener + , public _IUiFastScrollListener + , virtual public Tizen::Base::Runtime::IEventListener +{ +public: + class TableViewSizeInfo + : public _ControlImpl::SizeInfo + { + virtual Tizen::Graphics::Dimension GetDefaultMinimumSize(_ControlOrientation orientation) const; + }; + +private: + _TableViewImpl(Container* pPublic, _TableView* pCore); +public: + virtual ~_TableViewImpl(void); + + static _TableViewImpl* CreateTableViewImplN(Container* pPublic, Tizen::Graphics::FloatRectangle bounds, TableViewStyle style, bool itemDivider, TableViewScrollBarStyle scrollStyle); + + virtual const char* GetPublicClassName(void) const; +// virtual const _TableViewPublic& GetPublic(void) const; +// virtual _TableViewPublic& GetPublic(void); + virtual const _TableView& GetCore(void) const; + virtual _TableView& GetCore(void); + +public: + result SetSimpleStyleItemProvider(ITableViewItemProvider* pProvider); + result SetGroupedStyleItemProvider(IGroupedTableViewItemProvider* pProvider); + result SetSectionStyleItemProvider(ISectionTableViewItemProvider* pProvider); + + result SetSimpleStyleItemProviderF(ITableViewItemProviderF* pProvider); + result SetGroupedStyleItemProviderF(IGroupedTableViewItemProviderF* pProvider); + result SetSectionStyleItemProviderF(ISectionTableViewItemProviderF* pProvider); + + result AddTableViewItemEventListener(ITableViewItemEventListener& listener); + result RemoveTableViewItemEventListener(ITableViewItemEventListener& listener); + result AddGroupedTableViewItemEventListener(IGroupedTableViewItemEventListener& listener); + result RemoveGroupedTableViewItemEventListener(IGroupedTableViewItemEventListener& listener); + result AddSectionTableViewItemEventListener(ISectionTableViewItemEventListener& listener); + result RemoveSectionTableViewItemEventListener(ISectionTableViewItemEventListener& listener); + + result AddFastScrollListener(IFastScrollListener& listener); + result RemoveFastScrollListener(IFastScrollListener& listener); + result AddScrollEventListener(IScrollEventListener& listener); + result RemoveScrollEventListener(IScrollEventListener& listener); + + result AddScrollEventListener(IScrollEventListenerF& listener); + result RemoveScrollEventListener(IScrollEventListenerF& listener); + + result SetSweepEnabled(bool enable); + result SetFastScrollIndex(const Tizen::Base::String& text, bool useSearchIcon); + + result GetTopDrawnItemIndex(int &groupIndex, int& itemIndex) const; + result GetBottomDrawnItemIndex(int &groupIndex, int& itemIndex) const; + + result ScrollToItem(int groupIndex, int itemIndex, TableViewScrollItemAlignment itemAlignment); + + result ScrollByPixel(float scrollDistance); + float GetCurrentScrollPosition(void) const; + + void SetScrollEnabled(bool enable); + bool IsScrollEnabled(void) const; + + result SetItemChecked(int groupIndex, int itemIndex, bool check); + bool IsItemChecked(int groupIndex, int itemIndex) const; + + result SetItemEnabled(int groupIndex, int itemIndex, bool enable); + bool IsItemEnabled(int groupIndex, int itemIndex) const; + + int GetGroupCount(void) const; + int GetItemCountAt(int groupIndex) const; + + result RefreshTableView(int groupIndex, int itemIndex, TableViewRefreshType type); + result RefreshAllItems(void); + result UpdateTableView(void); + + result GetItemIndexFromPosition(const Tizen::Graphics::Point& position, int& groupIndex, int& itemIndex) const; + result GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& position, int& groupIndex, int& itemIndex) const; + + result SetSectionColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetSectionColor(void) const; + result SetItemDividerColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetItemDividerColor(void) const; + + result SetBitmapOfEmptyTableView(const Tizen::Graphics::Bitmap* pBitmap); + + result SetTextOfEmptyTableView(const Tizen::Base::String& text); + Tizen::Base::String GetTextOfEmptyTableView(void) const; + + result SetTextColorOfEmptyTableView(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetTextColorOfEmptyTableView(void) const; + + // Item Expand / Collapse + result ExpandGroup(int groupIndex); + result CollapseGroup(int groupIndex); + bool IsGroupExpanded(int groupIndex) const; + + result ExpandAllGroup(void); + result CollapseAllGroup(void); + + result SetGroupedLookEnabled(bool enable); + bool IsGroupedLookEnabled(void) const; + + result BeginReorderingMode(void); + result EndReorderingMode(void); + bool IsInReorderingMode(void) const; + + void SetScrollInputMode(ScrollInputMode mode); + ScrollInputMode GetScrollInputMode(void) const; + + result OpenContextItem(int groupIndex, int itemIndex); + result CloseContextItem(int groupIndex, int itemIndex); + bool IsContextItemOpened(int groupIndex, int itemIndex) const; + + result SetSectionHeaderTextHorizontalAlignment(int sectionIndex, HorizontalAlignment alignment); + HorizontalAlignment GetSectionHeaderTextHorizontalAlignment(int sectionIndex) const; + result SetSectionFooterTextHorizontalAlignment(int sectionIndex, HorizontalAlignment alignment); + HorizontalAlignment GetSectionFooterTextHorizontalAlignment(int sectionIndex) const; + + void SetPublic(TableViewStyle style, Container *pPublic); + + // _ITableViewItemEventListener + virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status); + virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::_TableView& tableView, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pContextItem, bool activated); + virtual void OnTableViewItemReordered(Tizen::Ui::Controls::_TableView& tableView, int itemIndexFrom, int itemIndexTo); + virtual void OnGroupedTableViewGroupItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status); + virtual void OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status); + virtual void OnGroupedTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::_TableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pContextItem, bool activated); + virtual void OnGroupedTableViewItemReordered(Tizen::Ui::Controls::_TableView& tableView, int groupIndexFrom, int itemIndexFrom, int groupIndexTo, int itemIndexTo); + virtual void OnSectionTableViewItemStateChanged(Tizen::Ui::Controls::_TableView& tableView, int sectionIndex, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status); + virtual void OnSectionTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::_TableView& tableView, int sectionIndex, int itemIndex, Tizen::Ui::Controls::_TableViewItem* pContextItem, bool activated); + virtual void OnTableViewItemSwept(Tizen::Ui::Controls::_TableView& TableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewSweepDirection direction); +// virtual void OnTableViewItemLongPressed(Tizen::Ui::Controls::_TableView& tableView, const Tizen::Ui::Controls::TableViewItemTag& itemTag, bool& invokeTableViewItemCallback); + + // _IScrollEventListener + virtual void OnScrollEndReached(_Control& source, ScrollEndEvent type); + virtual void OnScrollPositionChanged(_Control& source, float scrollPosition); + virtual void OnScrollStopped(_Control& source); + + // event handler for _IUiFastScrollListener + virtual void OnUiFastScrollIndexSelected(Tizen::Ui::_Control& source, Tizen::Ui::Controls::_FastScrollIndex& index); + + +public: + static _TableViewImpl* GetInstance(TableView& tableView); + static const _TableViewImpl* GetInstance(const TableView& tableView); + + static _TableViewImpl* GetInstance(GroupedTableView& tableView); + static const _TableViewImpl* GetInstance(const GroupedTableView& tableView); + + static _TableViewImpl* GetInstance(SectionTableView& tableView); + static const _TableViewImpl* GetInstance(const SectionTableView& tableView); + +private: + _TableViewImpl(_TableViewImpl& rhs); + _TableViewImpl& operator =(_TableViewImpl& rhs); + + _TableViewItemEvent* __pTableViewEvent; + _ScrollEvent* __pScrollEvent; + _FastScrollEvent* __pFastScrollEvent; + + bool __useSearchIcon; + + _TableViewPublic __tableViewPublic; + + //friend class _TableView; +}; + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_TABLE_VIEW_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_TableViewItem.h b/src/ui/inc/FUiCtrl_TableViewItem.h new file mode 100644 index 0000000..c195849 --- /dev/null +++ b/src/ui/inc/FUiCtrl_TableViewItem.h @@ -0,0 +1,518 @@ +// +// 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_TableViewItem.h + * @brief This is the header file for the _TableViewItem class. + * + * This header file contains the declarations of the _TableViewItem class. + */ + + +#ifndef _FUI_CTRL_INTERNAL_TABLE_VIEW_ITEM_H_ +#define _FUI_CTRL_INTERNAL_TABLE_VIEW_ITEM_H_ + +#include +#include +#include +#include +#include +#include "FUi_Control.h" +#include "FUi_IAccessibilityListener.h" +#include "FUiCtrl_IListItemCommon.h" +#include "FUiCtrl_Label.h" + +namespace Tizen { namespace Ui +{ +class _TouchLongPressGestureDetector; +}} + +namespace Tizen { namespace Ui { namespace Controls +{ + +enum TableViewItemSelectionStyle +{ + TABLE_VIEW_ITEM_SELECTION_STYLE_NONE = 0, + TABLE_VIEW_ITEM_SELECTION_STYLE_WHOLE +}; + +enum TableViewItemType +{ + TABLE_VIEW_ITEM_TYPE_TOP, + TABLE_VIEW_ITEM_TYPE_MIDDLE, + TABLE_VIEW_ITEM_TYPE_BOTTOM, + TABLE_VIEW_ITEM_TYPE_ONE, + TABLE_VIEW_ITEM_TYPE_TITLE, + TABLE_VIEW_ITEM_TYPE_HEADER, + TABLE_VIEW_ITEM_TYPE_FOOTER, + TABLE_VIEW_ITEM_TYPE_NONE +}; + +enum TableViewGroupItemDrawingStatus +{ + TABLE_VIEW_GROUPITEM_DRAWING_STATUS_NORMAL = 3, + TABLE_VIEW_GROUPITEM_DRAWING_STATUS_PRESSED +}; + +enum TableViewSimpleItemDrawingStatus +{ + TABLE_VIEW_SIMPLEITEM_DRAWING_STATUS_DISABLED = 5, +}; + +enum TableViewItemPressedControl +{ + TABLE_VIEW_ITEM_PRESSED_NONE = 0, + TABLE_VIEW_ITEM_PRESSED_ITEM, + TABLE_VIEW_ITEM_PRESSED_ANNEX, + TABLE_VIEW_ITEM_PRESSED_INDIVIDUAL +}; + +struct _ItemDrawingProperty +{ + bool itemDividerEnabled; + Tizen::Graphics::Color dividerColor; + bool sectionStyleEnabled; + Tizen::Graphics::Color sectionStyleBgColor; + bool groupedLookEnabled; + bool reorderMode; + float leftMargin; + float scrollMargin; + float width; + bool propertyChanged; +}; + +// TableViewItemControl +class _TableViewItemControl + : public Tizen::Ui::_Control +{ +public: + virtual ~_TableViewItemControl(void); + virtual void OnDraw(void); + virtual Tizen::Ui::Animations::HitTestResult HitTest(const Tizen::Graphics::FloatPoint& point); + +public: + static _TableViewItemControl* CreateTableViewItemControlN(void); + result SetBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap); + Tizen::Graphics::Bitmap* GetBackgroundBitmap(void) const; + +private: + Tizen::Graphics::Bitmap* __pBackgroundBitmap; + +private: + _TableViewItemControl(void); + _TableViewItemControl(const _TableViewItemControl& rhs); + _TableViewItemControl& operator =(const _TableViewItemControl rhs); +}; + + +class _OSP_EXPORT_ _TableViewItem + : public Tizen::Ui::_Control + , public _IListItemCommon + , public _IAccessibilityListener + , public Tizen::Base::Runtime::ITimerEventListener + , public Tizen::Ui::Animations::IVisualElementAnimationTickEventListener + , public Tizen::Ui::Animations::IVisualElementAnimationStatusEventListener + , virtual public Tizen::Base::Runtime::IEventListener + , virtual public Tizen::Ui::_IUiEventListener + , virtual public Tizen::Ui::_IUiEventPreviewer +{ + +public: + virtual ~_TableViewItem(); + + static _TableViewItem* CreateTableViewItemN(float itemHeight); + + virtual bool DrawItem(Tizen::Graphics::FloatRectangle& rcItem, ListItemState isFocused, bool itemDivider = false); + + virtual float GetItemHeight(void) const; + virtual void SetItemHeight(int itemHeight); // +++ check floating + virtual void SetItemHeight(float itemHeight); + + virtual void SetChecked(bool checked); + virtual bool IsChecked(void) const; + virtual void SetCheckedAnimationEnabled(bool enabled); + + virtual void SetItemEnabled(bool enabled); + virtual bool IsItemEnabled(void) const; + + void SetItemType(const TableViewItemType itemType); + TableViewItemType GetItemType(void) const; + + virtual bool IsReorderMode(void) const; + virtual void SetReorderMode(bool enabled); + + virtual void SetItemChanged(bool changed); + virtual bool IsItemChanged(void) const; + + virtual void SetItemIndex(int groupIndex, int itemIndex); + virtual void GetItemIndex(int& groupIndex, int& itemIndex) const; + + _TableViewItem* GetContextItem(void) const; + void SetContextItem(_TableViewItem* pContextItem); + + bool IsContextItem(void) const; + void SetContextItemActivation(bool activated); + bool IsContextItemActivated(void) const; + + result CreateItemDimLayer(void); + void ExposeContextItem(Tizen::Graphics::FloatRectangle itemBounds, float targetWidth); + void DrawItemDimLayer(bool visible); + + void SetItemStyle(TableViewAnnexStyle style); + TableViewAnnexStyle GetItemStyle(void) const; + + void SetItemWidth(float width); + + bool SetItemBackgroundBitmap(ListItemState itemState, const Tizen::Graphics::Bitmap* pBitmap); + Tizen::Graphics::Bitmap* GetItemBackgroundBitmap(ListItemState itemState) const; + + void SetItemBackgroundColor(ListItemState itemState, const Tizen::Graphics::Color bgColor); + Tizen::Graphics::Color GetItemBackgroundColor(ListItemState itemState) const; + + result SetSelectionStyle(TableViewItemSelectionStyle style); + TableViewItemSelectionStyle GetSelectionStyle(void) const; + + virtual void SetAppInfo(const void* pAppInfo); + virtual void* GetAppInfo(void) const; + + int AddRef(void); + int Release(void); + + void FireItemEvent(bool selectedItem = true); + void FireItemSweepEvent(TableViewSweepDirection direction); + + void SetDrawingProperty(_ItemDrawingProperty* pDrawingProperty); + _ItemDrawingProperty* GetDrawingProperty(void); + + void SetDrawingStatus(TableViewItemDrawingStatus status); + TableViewItemDrawingStatus GetDrawingStatus(void); + + void AdjustChildControlMargin(void); + + void AdjustContextItemBounds(void); + void AdjustChildControlCenterAlign(void); + void SetChildControlCenterAlign(bool centerAlign); + void AdjustAnnexBounds(void); + + //Simple Item + result SetSimpleItemContents(const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBitmap, bool groupType); + result SetSimpleTextColor(const Tizen::Graphics::Color& color, TableViewItemDrawingStatus status); + Tizen::Graphics::Color GetSimpleItemTextColor(TableViewItemDrawingStatus status) const; + result SetSimpleItemTextSize(int size); + int GetSimpleItemTextSize(void) const; + + //Simple group item + result SetSimpleGroupItemTextColor(const Tizen::Graphics::Color& color, TableViewItemDrawingStatus status); + Tizen::Graphics::Color GetSimpleGroupItemTextColor(TableViewItemDrawingStatus status) const; + + result SetSectionHeaderFooterContents(const Tizen::Base::String& text, HorizontalAlignment alignment, bool isHeader); + result SetSectionHeaderFooterAlignment(HorizontalAlignment alignment); + + bool MoveItem(Tizen::Graphics::FloatPoint position, int duration, int delay); + bool FadeInOutItem(bool fadeOut, int duration, int delay); + bool ZoomInOutItem(bool zoomOut, int duration, int delay); + + Tizen::Graphics::Point GetLastTouchPressedPosition(void); + Tizen::Graphics::FloatPoint GetLastTouchPressedPositionF(void); + void SetLastTouchPressedPosition(Tizen::Graphics::Point position); + void SetLastTouchPressedPosition(Tizen::Graphics::FloatPoint position); + + bool GetSelectionState(void); + void SetSelectionState(bool selected); + + result SetIndividualSelectionEnabled(const _Control& control, bool enable); + bool IsIndividualSelectionEnabled(const _Control& control); + + bool IsAnimationPlaying(void); + void StopAllAnimation(void); + + void SetItemDividerEnabled(bool enable); + + result PlayCheckBoxAnimation(void); + result StartCheckBoxAnimation(void); + void StopCheckBoxAnimation(void); + + void SetItemLayoutEnabled(bool enabled); + bool GetItemLayoutEnabled(void); + bool IsAnnexOnOffSliding(void); + static float GetAnnexWidth(TableViewAnnexStyle style); + + 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); + virtual Tizen::Ui::_AccessibilityElement* GetAccessibilityElement(void); + + virtual result OnAttachedToMainTree(void); + + // event handler for ITouchEventListener + 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 OnPreviewTouchPressed(const _Control& source, const _TouchInfo& touchinfo); + 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 void OnDraw(void); + virtual void OnChildAttached(const _Control& child); + virtual void OnChildDetached(const _Control& child); + virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer); + virtual void OnBoundsChanged(void); + + // VisualElement Animation + virtual void OnTickOccurred(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, const Tizen::Ui::Variant& currentValue); + 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); + + // accessibility listener + virtual bool OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityFocusMovedPrevious(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityReadingElement(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityFocusOut(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityValueIncreased(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityValueDecreased(const _AccessibilityContainer& control, const _AccessibilityElement& element); + + // Focus Ui + 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); + + //Enable/Visible state change + virtual void OnVisibleStateChanged(void); + virtual void OnAncestorEnableStateChanged(const _Control& control); + virtual void OnAncestorVisibleStateChanged(const _Control& control); + virtual void OnFocusableStateChanged(bool focusableState); + + //Accessibility + void SetPublicLabelUpdate(bool resetPublicLabelUpdate); + + //TextSlide + virtual void ResetTextSlide(void); + +protected: + _TableViewItem(float nItemHeight); + result Initialize(void); + + virtual void SetAccessibilityElementLabel(void); + virtual void SetAccessibilityElementTrait(void); + virtual void SetAccessibilityElementValue(void); + + void SetPressedControl(TableViewItemPressedControl pressedControl); + TableViewItemPressedControl GetPressedControl(void); + + result StartTouchPressedTimer(const _Control& source, const _TouchInfo& touchinfo); + void StopTouchPressedTimer(bool forceStop = false); + result StartTouchReleasedTimer(void); + void StopTouchReleasedTimer(bool forceStop = false); + + void OnAncestorInputEnableStateChanged(const _Control& control); + + void SetItemCustomHeight(float height); + float GetItemCustomHeight(void); + +private: + _TableViewItem(const _TableViewItem&); + _TableViewItem& operator =(const _TableViewItem&); + +private: + void DrawItemBackground(void); + void DrawSectionStyleBackground(void); + void DrawSectionStyleBackgroundCover(void); + void DrawContextItemBackground(void); + void DrawAnnexStyle(void); + void DrawCheckBox(void); + void DrawRadioBox(void); + void DrawOnOffButton(void); + void DrawAnnexOnOffHandler(float position); + void AdjustAnnexOnOffHandlerPosition(); + void DrawDetailButton(void); + void DrawItemDivider(void); + void DrawItemAnnexDivider(void); + void DrawGroupedLook(void); + + result DrawBitmap (Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& bounds, const Tizen::Graphics::Bitmap& bitmap); + + result SetItemHighlightBounds(Tizen::Ui::Animations::_VisualElement& highlightVisualElement, const Tizen::Graphics::FloatRectangle& bounds); + Tizen::Graphics::FloatRectangle CalculateItemHighlightBounds(void); + Tizen::Graphics::FloatRectangle CalculateAnnexBitmapBounds(float annexWidth, float annexHeight, const Tizen::Graphics::Bitmap& bitmap); + + bool IsTitleStyleItem(void) const; + bool IsValidSelectionState(void); + + //Simple Item + void DrawSimpleItem(void); + result CreateSimpleItemContents(bool textOnly); + + result CreateItemDivider(void); + result CreateItemAnnexDivider(void); + result CreateItemCover(void); + + void CreateAnnexStyle(void); + result CreateCheckBox(void); + result CreateRadioBox(void); + result CreateOnOffButton(void); + result CreateDetailButton(void); + + _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; + float __itemHeight; + int __itemGroupIndex; + int __itemIndex; + + bool __checkedState; + bool __enabledState; + bool __itemChanged; + bool __reorderMode; + bool __itemSelected; + bool __itemTouchMoved; + bool __childMarginState; + + TableViewAnnexStyle __annexStyle; + TableViewItemDrawingStatus __drawingStatus; + TableViewItemSelectionStyle __selectionStyle; + TableViewItemType __itemType; + + _TableViewItem* __pContextItem; + bool __isContextItem; + bool __isContextItemActivated; + bool __checkItemHeightNeeded; + + _TableViewItemControl* __pItemDivider; + _TableViewItemControl* __pItemTopDivider; + Label* __pItemAnnex; + _TableViewItemControl* __pItemCover; + _TableViewItemControl* __pItemAnnexLeftDivider; + _TableViewItemControl* __pItemAnnexRightDivider; + + float __itemWidth; + + Tizen::Graphics::Bitmap* __pItemBgBitmap[3]; + Tizen::Graphics::Color __colorItemBg[3]; + + _ItemDrawingProperty* __pDrawingProperty; + + bool __itemDividerEnabled; + + // Simple Item + Label* __pSimpleItemText; + Label* __pSimpleItemBitmap; + Tizen::Graphics::Color __simpleItemTextColor[6]; + int __simpleItemTextSize; + + // Section header, footer + Label* __pHeaderFooterItemText; + + _Label* __pDimLayer; + + Tizen::Graphics::FloatPoint __touchStartPosition; + float __annexTouchStartPosition; + bool __annexOnOffHandlerMoved; + float __annexOnOffHandlerPositionX; + bool __childControlCenterAlign; + float __customHeight; + int __animationCount; + + Tizen::Base::Collection::ArrayList __individualSelectionControls; + + Tizen::Ui::_AccessibilityElement* __pAccessibilityElement; + Tizen::Ui::_AccessibilityElement* __pAccessibilityOnOffElement; + + Tizen::Base::Runtime::Timer* __pPressedTimer; + Tizen::Base::Runtime::Timer* __pReleasedTimer; + bool __isPressedTimerEnabled; + bool __isReleasedTimerEnabled; + TableViewItemPressedControl __pressedControl; + TableViewItemPressedControl __releasedControl; + + Tizen::Base::Runtime::Timer* __pCheckedTimer; + bool __isCheckedTimerEnabled; + bool __isCheckedAnimationEnabled; + int __checkedCount; + Tizen::Graphics::FloatRectangle __checkedBounds; + + bool __isItemLayoutEnabled; + + bool __isMoveItemAnimationEnabled; + bool __isZoomInOutItemAnimationEnabled; + bool __isFadeInOutItemAnimationEnabled; + bool __isAnimationCallbackBlocked; + + bool __isItemTapSoundEnabled; + bool __isTabSoundPlayed; + bool __isSelectedDetailButton; + bool __isSimpleLastItem; + bool __isSectionItem; + bool __isTouchPressOnScroll; + + bool __isTouchCancelOnPressRelease; + + Tizen::Ui::Animations::_VisualElement* __pHighlightVisualElement; + Tizen::Ui::Animations::_VisualElement* __pBitmapVisualElement; + + Tizen::Ui::Animations::VisualElementValueAnimation* __pMoveItemAnimation; + Tizen::Ui::Animations::VisualElementValueAnimation* __pZoomInOutItemAnimation; + Tizen::Ui::Animations::VisualElementValueAnimation* __pFadeInOutItemtAnimation; + + static const float SIMPLE_ITEM_ELEMENT_BITMAP_SIZE_RATIO = 0.6f; + 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 = 10; + static const int TOUCH_PRESSED_DURATION = 100; + static const int TOUCH_RELEASED_DURATION = 30; + static const int MAX_CHECKED_COUNT = 10; + static const float INSENSITIVE = 0.16f; + static const float SENSITIVE = 0.08f; + static const float ITEM_TOP_DIVIDER_OPACITY = 0.3f; + static const float ITEM_BOTTOM_DIVIDER_OPACITY = 1.0f; +}; + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_TABLE_VIEW_ITEM_H_ diff --git a/src/ui/inc/FUiCtrl_TableViewItemEvent.h b/src/ui/inc/FUiCtrl_TableViewItemEvent.h new file mode 100644 index 0000000..9e5f509 --- /dev/null +++ b/src/ui/inc/FUiCtrl_TableViewItemEvent.h @@ -0,0 +1,63 @@ +// +// 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_TableViewItemEvent.h + * @brief This is the header file for the _TableViewItemEvent class. + * + * This header file contains the declarations of the _TableViewItemEvent class. + */ + +#ifndef _FUI_CTRL_INTERNAL_TABLE_VIEW_ITEM_EVENT_H_ +#define _FUI_CTRL_INTERNAL_TABLE_VIEW_ITEM_EVENT_H_ + +#include +#include +#include +#include "FUiCtrl_TableView.h" + + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _TableViewItemEvent + : public Tizen::Base::Runtime::_Event +{ + +public: + _TableViewItemEvent(void); + virtual ~_TableViewItemEvent(void); + + result Construct(Tizen::Ui::Control* pSource, TableViewStyle style); + +// Accessors + Tizen::Ui::Control* GetSource(void) const; + +// Operations +protected: + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + +//Attribute +private: + Tizen::Ui::Control* __pSource; + bool __invokeTableViewItemCallback; + TableViewStyle __style; +}; // _TableViewItemEvent + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_TABLE_VIEW_ITEM_EVENT_H_ diff --git a/src/ui/inc/FUiCtrl_TableViewItemEventArg.h b/src/ui/inc/FUiCtrl_TableViewItemEventArg.h new file mode 100644 index 0000000..a08709a --- /dev/null +++ b/src/ui/inc/FUiCtrl_TableViewItemEventArg.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 FUiCtrl_TableViewItemEventArg.h + * @brief This is the header file for the _TableViewItemEventArg class. + * + * This header file contains the declarations of the _TableViewItemEventArg class. + */ + +#ifndef _FUI_CTRL_INTERNAL_TABLE_VIEW_ITEM_EVENT_ARG_H_ +#define _FUI_CTRL_INTERNAL_TABLE_VIEW_ITEM_EVENT_ARG_H_ + +#include +#include +#include +#include +#include + +namespace Tizen { +namespace Ui { +namespace Controls { +class _TableViewItem; + +enum TableViewNotifyType { + TABLEVIEW_NOTIFY_TYPE_SELECTED_ITEM = 0, + TABLEVIEW_NOTIFY_TYPE_HIGHLIGHED_ITEM, + TABLEVIEW_NOTIFY_TYPE_ANNEX_CHECK, + TABLEVIEW_NOTIFY_TYPE_ANNEX_UNCHECK, + TABLEVIEW_NOTIFY_TYPE_ANNEX_MORE, + TABLEVIEW_NOTIFY_TYPE_SELCTED_CONTEXT_ITEM, + TABLEVIEW_NOTIFY_TYPE_ITEM_SWEPT, + TABLEVIEW_NOTIFY_TYPE_TOUCH_LONG_PRESSED, + TABLEVIEW_NOTIFY_TYPE_REORDERED_ITEM, + TABLEVIEW_NOTIFY_TYPE_CONTEXT_ITEM_ACTIVATION, + TABLEVIEW_NOTIFY_TYPE_NONE = 0xff +}; + +class _TableViewItemEventArg + : public Tizen::Base::Runtime::IEventArg + , public Tizen::Base::Object +{ +// Lifecycle +public: + _TableViewItemEventArg(int arg1, int arg2, int arg3,int arg4, _TableViewItem* pItem, TableViewNotifyType type, bool activated = false); + + virtual ~_TableViewItemEventArg(void); + +// Accessor + int GetArg1(void) const; + + int GetArg2(void) const; + + int GetArg3(void) const; + + int GetArg4(void) const; + + _TableViewItem* GetItem(void) const; + + TableViewNotifyType GetNotifyType(void) const; + + bool GetActivated(void) const; + +private: + _TableViewItemEventArg(_TableViewItemEventArg& rhs); + _TableViewItemEventArg& operator=(const _TableViewItemEventArg& rhs); + +// Attribute +private: + int __arg1; // use by groupIndex + int __arg2; // use by itemIndex + int __arg3; + int __arg4; + _TableViewItem* __pItem; + TableViewNotifyType __type; + bool __activated; +}; +// _TableViewItemEventArg + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_TABLE_VIEW_ITEM_EVENT_ARG_H_ diff --git a/src/ui/inc/FUiCtrl_TableViewItemImpl.h b/src/ui/inc/FUiCtrl_TableViewItemImpl.h new file mode 100644 index 0000000..1522df9 --- /dev/null +++ b/src/ui/inc/FUiCtrl_TableViewItemImpl.h @@ -0,0 +1,100 @@ +// +// 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_TableViewItemImpl.h + * @brief This is the header file for the _TableViewItemImpl class. + * + * This header file contains the declarations of the _TableViewItemImpl class. + */ + +#ifndef _FUI_CTRL_INTERNAL_TABLE_VIEW_ITEM_IMPL_H_ +#define _FUI_CTRL_INTERNAL_TABLE_VIEW_ITEM_IMPL_H_ + +#include +#include +#include "FUi_ContainerImpl.h" +#include "FUiCtrl_TableViewItem.h" + + +namespace Tizen { namespace Ui { namespace Controls +{ + +class TableViewContextItem; + +class _TableViewItemImpl + : public _ContainerImpl +{ +public: + class TableViewItemSizeInfo + : public _ControlImpl::SizeInfo + { + virtual Tizen::Graphics::Dimension GetDefaultMinimumSize(_ControlOrientation orientation) const; + virtual Tizen::Graphics::FloatDimension GetDefaultMinimumSizeF(_ControlOrientation orientation) const; + }; + +public: + static _TableViewItemImpl* CreateTableViewItemImplN(TableViewItemBase* pPublic, const Tizen::Graphics::FloatDimension& itemSize, TableViewAnnexStyle style=TABLE_VIEW_ANNEX_STYLE_NORMAL, Layout* pPublicPortraitLayout=null, Layout* pPublicLandscapeLayout=null); + virtual ~_TableViewItemImpl(void); + + virtual const char* GetPublicClassName(void) const; + virtual const TableViewItem& GetPublic(void) const; + virtual TableViewItem& GetPublic(void); + virtual const _TableViewItem& GetCore(void) const; + virtual _TableViewItem& GetCore(void); + + virtual result Construct(const Tizen::Graphics::FloatDimension& itemSize, TableViewAnnexStyle style); + + result SetContextItem(_TableViewItemImpl* pItem); + + static float GetAnnexWidth(TableViewAnnexStyle style); + + result SetSelectionStyle(TableViewItemSelectionStyle style); + TableViewItemSelectionStyle GetSelectionStyle(void) const; + + // ItemBase + result SetBackgroundBitmap(TableViewItemDrawingStatus status, const Tizen::Graphics::Bitmap* pBitmap); + result SetBackgroundColor(TableViewItemDrawingStatus status, const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetBackgroundColor(TableViewItemDrawingStatus status) const; + + // Simple Item + result SetSimpleItemContents(const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pBitmap, bool groupType = false); + result SetSimpleItemTextColor(const Tizen::Graphics::Color& color, TableViewItemDrawingStatus status = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL); + Tizen::Graphics::Color GetSimpleItemTextColor(TableViewItemDrawingStatus status = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL) const; + result SetSimpleItemTextSize(int size); + int GetSimpleItemTextSize(void) const; + + result SetIndividualSelectionEnabled(const Tizen::Ui::_ControlImpl& controlImpl, bool enable); + bool IsIndividualSelectionEnabled(const Tizen::Ui::_ControlImpl& controlImpl); + + result SetSimpleGroupItemTextColor(const Tizen::Graphics::Color& color, TableViewItemDrawingStatus status = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL); + Tizen::Graphics::Color GetSimpleGroupItemTextColor(TableViewItemDrawingStatus status = TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL) const; + +public: + static _TableViewItemImpl* GetInstance(TableViewItemBase& tableViewItem); + static const _TableViewItemImpl* GetInstance(const TableViewItemBase& tableViewItem); + +private: + _TableViewItemImpl(TableViewItemBase* pPublic, _TableViewItem* pCore, Layout* pPublicPortraitLayout = null, Layout* pPublicLandscapeLayout = null); + _TableViewItemImpl(const _TableViewItemImpl&); + _TableViewItemImpl& operator=(const _TableViewItemImpl&); +}; + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_TABLE_VIEW_ITEM_IMPL_H_ + diff --git a/src/ui/inc/FUiCtrl_TableViewItemProvider.h b/src/ui/inc/FUiCtrl_TableViewItemProvider.h new file mode 100644 index 0000000..d434d8c --- /dev/null +++ b/src/ui/inc/FUiCtrl_TableViewItemProvider.h @@ -0,0 +1,105 @@ +// +// 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_TableViewItemProvider.h + * @brief This file defines the _TableViewItemProvider class. + * + * This header file contains the declarations of the _TableViewItemProvider class. + */ + +#ifndef _FUI_CTRL_INTERNAL_TABLE_VIEW_ITEM_PROVIDER_H_ +#define _FUI_CTRL_INTERNAL_TABLE_VIEW_ITEM_PROVIDER_H_ + +#include +#include "FUiCtrl_TableView.h" +#include "FUi_Control.h" + +namespace Tizen { namespace Ui { namespace Controls +{ +class TableViewItem; +class TableViewGroupItem; +class ITableViewItemProvider; +class ITableViewItemProviderF; +class IGroupedTableViewItemProvider; +class IGroupedTableViewItemProviderF; +class ISectionTableViewItemProvider; +class ISectionTableViewItemProviderF; +struct TableViewItemTag; + +class _TableViewItemProvider +{ +public: + virtual ~_TableViewItemProvider(void); + + static _TableViewItemProvider* CreateTableViewItemProviderN(TableViewStyle style, bool useFloatingPoint = false); + + result SetSimpleStyleItemProvider(ITableViewItemProvider* pProvider); + result SetGroupedStyleItemProvider(IGroupedTableViewItemProvider* pProvider); + result SetSectionStyleItemProvider(ISectionTableViewItemProvider* pProvider); + + result SetSimpleStyleItemProviderF(ITableViewItemProviderF* pProvider); + result SetGroupedStyleItemProviderF(IGroupedTableViewItemProviderF* pProvider); + result SetSectionStyleItemProviderF(ISectionTableViewItemProviderF* pProvider); + + int GetGroupCount(void); + int GetItemCount(int groupIndex); + float GetGroupItemHeight(int groupIndex); + float GetItemHeight(const TableViewItemTag& itemTag); + TableViewGroupItem* CreateGroupItem(int groupIndex, float itemWidth); + bool DeleteGroupItem(int groupIndex, TableViewGroupItem* pItem); + TableViewItem* CreateItem(const TableViewItemTag& itemTag, float itemWidth); + bool DeleteItem(const TableViewItemTag& itemTag, TableViewItem* pItem); + bool UpdateItem(const TableViewItemTag& itemTag, TableViewItem *pItem); + bool UpdateGroupItem(int groupIndex, TableViewGroupItem *pItem); + Tizen::Base::String GetSectionHeader(int groupIndex); + bool HasSectionHeader(int groupIndex); + Tizen::Base::String GetSectionFooter(int groupIndex); + bool HasSectionFooter(int groupIndex); + float GetDefaultItemHeight(void); + float GetDefaultGroupItemHeight(void); + bool IsReorderable(int groupIndexFrom, int groupIndexTo); + bool IsOnProcessing(); + +protected: + _TableViewItemProvider(TableViewStyle style, bool useFloatingPoint); + +private: + _TableViewItemProvider(_TableViewItemProvider& rhs); + _TableViewItemProvider& operator =(_TableViewItemProvider& rhs); + +// Attribute +private: + ITableViewItemProvider* __pSimpleProvider; + IGroupedTableViewItemProvider* __pGroupedProvider; + ISectionTableViewItemProvider* __pSectionProvider; + + ITableViewItemProviderF* __pSimpleProviderF; + IGroupedTableViewItemProviderF* __pGroupedProviderF; + ISectionTableViewItemProviderF* __pSectionProviderF; + + TableViewStyle __style; + bool __onProcessing; + bool __useFloatingPoint; + +}; // _TableViewItemProvider + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_TABLE_VIEW_ITEM_PROVIDER_H_ + + diff --git a/src/ui/inc/FUiCtrl_TableViewItemProviderAdaptor.h b/src/ui/inc/FUiCtrl_TableViewItemProviderAdaptor.h new file mode 100644 index 0000000..47a18ba --- /dev/null +++ b/src/ui/inc/FUiCtrl_TableViewItemProviderAdaptor.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 FUiCtrl_TableViewItemProviderAdaptor.h + * @brief This is the header file for the __TableViewItemProviderAdaptor class. + * + * This header file contains the declarations of the __TableViewItemProviderAdaptor class. + */ + + +#ifndef _FUI_CTRL_INTERNAL_TABLE_VIEW_ITEM_PROVIDER_ADAPTOR_H_ +#define _FUI_CTRL_INTERNAL_TABLE_VIEW_ITEM_PROVIDER_ADAPTOR_H_ + +#include +#include +#include +#include "FUiCtrl_IListItemProviderAdaptor.h" +#include "FUiCtrl_LinkedList.h" + + +namespace Tizen { namespace Ui { namespace Controls +{ +class _TableViewItem; +class _TableViewItemProvider; +class _TableViewPresenter; + +class _TableViewItemProviderAdaptor + : public _IListItemProviderAdaptor +{ +public: +// Lifecycle + _TableViewItemProviderAdaptor(); + + virtual ~_TableViewItemProviderAdaptor(void); + +// Operation + void SetItemProvider(_TableViewItemProvider* pProvider); + _TableViewItemProvider* GetItemProvider() const; + virtual bool IsItemProvider() const; + virtual int GetGroupCount() const; + virtual int GetItemCount(int groupIndex = 0) const; + virtual _IListItemCommon* LoadItem(int groupIndex, int itemIndex); + virtual result UnloadItem(_IListItemCommon* pItem, int groupIndex, int itemIndex); + virtual result DeleteItem(_IListItemCommon* pItem, int groupIndex, int itemIndex); + + virtual bool UpdateItem(_IListItemCommon* pItem, int groupIndex, int itemIndex); + + float GetItemHeight(int groupIndex, int itemIndex); + virtual float GetDefaultItemHeight(void); + virtual float GetDefaultGroupItemHeight(void); + + virtual bool HasSectionHeader(int groupIndex) const; + virtual bool HasSectionFooter(int groupIndex) const; + virtual bool IsReorderable(int groupIndexFrom, int groupIndexTo); + + bool IsOnProcessing(); + result SetListWidth(float width); + float GetListWidth(void); + result SetTableViewStyle(int style); + void SetTableViewPresenter(_TableViewPresenter* pPresenter); + + _TableViewItem* GetDefaultItem(void); + +// Operation +private: + _TableViewItemProviderAdaptor(const _TableViewItemProviderAdaptor&); + _TableViewItemProviderAdaptor& operator =(const _TableViewItemProviderAdaptor&); + +// Variable +private: + _TableViewItemProvider* __pTableViewProvider; + _TableViewItem* __pDefaultItem; + _TableViewPresenter* __pTableViewPresenter; + + float __listWidth; + int __style; +}; // _TableViewItemProviderAdaptor + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_TABLE_VIEW_ITEM_PROVIDER_ADAPTOR_H_ diff --git a/src/ui/inc/FUiCtrl_TableViewPresenter.h b/src/ui/inc/FUiCtrl_TableViewPresenter.h new file mode 100644 index 0000000..3c8100f --- /dev/null +++ b/src/ui/inc/FUiCtrl_TableViewPresenter.h @@ -0,0 +1,506 @@ +// +// 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_TableViewPresenter.h + * @brief This is the implementation file for _TableViewPresenter class. + * + * This file contains the implementation of _TableViewPresenter class. + */ + + +#ifndef _FUI_CTRL_INTERNAL_TABLE_VIEW_PRESENTER_H_ +#define _FUI_CTRL_INTERNAL_TABLE_VIEW_PRESENTER_H_ + +#include +#include +#include "FUiCtrl_TableViewItem.h" +#include "FUiCtrl_ListViewModel.h" +#include "FUiCtrl_ScrollPanelPresenter.h" + +namespace Tizen { namespace Ui { namespace Animations +{ +class _VisualElement; +}}} + +namespace Tizen { namespace Ui { namespace Controls +{ + +enum ItemAlignment +{ + TABLE_VIEW_ITEM_ALIGNMENT_TOP = 0, + TABLE_VIEW_ITEM_ALIGNMENT_BOTTOM +}; + +enum ItemTouchReleasedEventState +{ + TABLE_VIEW_ITEM_TOUCH_RELEASED_EVENT_NORMAL = 0, + TABLE_VIEW_ITEM_TOUCH_RELEASED_EVENT_FIRE, + TABLE_VIEW_ITEM_TOUCH_RELEASED_EVENT_UPDATE_TABLE_VIEW +}; + +struct _TableViewReorderInfo +{ + int groupIndex; + int itemIndex; + int originGroupIndex; + int originItemIndex; + float touchPressedPositionY; + float itemBasisPositionY; + int isScrollDirectionUp; + float nonScrollableLimitArea; + bool blockedTouchReleaseState; + bool blockedScroll; + long long touchPressedTick; + Tizen::Graphics::FloatRectangle itemBounds; + + _TableViewReorderInfo(void) + : groupIndex(-1) + , itemIndex(-1) + , originGroupIndex(-1) + , originItemIndex(-1) + , touchPressedPositionY(0.0f) + , itemBasisPositionY(0.0f) + , isScrollDirectionUp(false) + , nonScrollableLimitArea(0.0f) + , blockedTouchReleaseState(false) + , blockedScroll(false) + , touchPressedTick(0) + , itemBounds() + { + + } +}; + +struct _TableViewSectionStringAlignment +{ + HorizontalAlignment headerHorizontalAlignment; + HorizontalAlignment footerHorizontalAlignment; + + _TableViewSectionStringAlignment(void) + : headerHorizontalAlignment(ALIGNMENT_LEFT) + , footerHorizontalAlignment(ALIGNMENT_RIGHT) + { + } + + bool operator== (const _TableViewSectionStringAlignment& rhs) const; + 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; + int itemIndex; + TableViewScrollItemAlignment itemAlignment; + float shiftingDistance; + bool startedAnimation; + + _TableViewScrollToItemTag(void) + : groupIndex(-1) + , itemIndex(-1) + , itemAlignment(TABLE_VIEW_SCROLL_ITEM_ALIGNMENT_TOP) + , shiftingDistance(0) + , startedAnimation(false) + { + + } +}; + +class _TableView; +class _ListViewModel; +class _TableViewItemProviderAdaptor; + +class _TableViewPresenter + : public _ScrollPanelPresenter + , public _IListViewModelDelegate + , public Tizen::Ui::Animations::IVisualElementAnimationTickEventListener + , public Tizen::Ui::Animations::IVisualElementAnimationStatusEventListener + , virtual public Tizen::Base::Runtime::IEventListener +{ +public: + _TableViewPresenter(); + virtual ~_TableViewPresenter(void); + + virtual result Construct(_TableView* pTableView); + + bool Initialize(_TableView* pTableView); + + _TableView* GetView(void) const; + + _ListViewModel* GetModel(void) const; + + // set ItemProvider + result SetItemProvider(const _TableViewItemProvider* pProvider); + + void SetTableViewItemProviderAdaptor(_TableViewItemProviderAdaptor* pProviderAdaptor); + + _TableViewItemProviderAdaptor* GetTableViewItemProviderAdaptor(void) const; + + // 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); + 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); + + // Touch Event Listener + virtual bool OnTouchPressed(const _Control& source, const _TouchInfo& touchInfo); + virtual bool OnTouchMoved(const _Control& source, const _TouchInfo& touchInfo); + virtual bool OnTouchReleased(const _Control& source, const _TouchInfo& touchInfo); + virtual bool OnTouchCanceled(const _Control& source, const _TouchInfo& touchInfo); + + // gestureListener Callback API + virtual bool OnFlickGestureDetected(_TouchFlickGestureDetector& gesture); + virtual bool OnFlickGestureCanceled(_TouchFlickGestureDetector& gesture); + virtual bool OnPreviewFlickGestureDetected(_TouchFlickGestureDetector& gesture); + + 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); + virtual void OnTickOccurred(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, const Tizen::Ui::Variant& currentValue); + + // Timer Event + virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer); + + // accessibility + virtual bool OnAccessibilityItemRefreshed(const _AccessibilityContainer& control, const _AccessibilityElement& element, _AccessibilityFocusDirection direction); + + // List model delegate + virtual bool OnOcurredOverflowItems(const int currentCashSize, const int overflowCount); + + // Focus Ui + virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo); + virtual bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo); + virtual void OnDrawFocus(void); + virtual void OnFocusModeStateChanged(void); + + //Enable/Visible state change + void OnVisibleStateChanged(void); + void OnAncestorEnableStateChanged(const _Control& control); + void OnAncestorVisibleStateChanged(const _Control& control); + void OnFocusableStateChanged(bool focusableState); + + void Dispose(void); + + result RefreshTableView(int groupIndex, int itemIndex, TableViewRefreshType type, bool animation); + result RefreshAllItems(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; + + result GetTopDrawnItem(TableViewItemTag& itemPos) const; + result SetTopDrawnItem(TableViewItemTag& itemPos); + + result GetBottomDrawnItem(TableViewItemTag& itemPos) const; + + result GetTopDrawnItemIndex(int& groupIndex, int& itemIndex) const; + result SetTopDrawnItemIndex(int groupIndex, int itemIndex); + + result GetBottomDrawnItemIndex(int& groupIndex, int& itemIndex) const; + result SetBottomDrawnItemIndex(int groupIndex, int itemIndex); + + int GetGroupCount(void) const; + int GetItemCountAt(int groupIndex) const; + bool HasSectionHeader(int groupIndex) const; + bool HasSectionFooter(int groupIndex) const; + + float GetTopMargin(void) const; + result SetTopMargin(float topMargin); + + float GetBottomMargin(void) const; + result SetBottomMargin(float bottomMargin); + + float GetLeftMargin(void) const; + result SetLeftMargin(float leftMargin); + + //Restore Focus + 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); + + bool IsItemEnabled(int groupIndex, int itemIndex) const; + result SetItemEnabled(int groupIndex, int itemIndex, bool enabled); + + _TableViewItem* FindItem(TableViewItemTag& itemTag); + void UnloadItem(int groupIndex, int itemIndex); + _TableViewItem* LoadItem(int groupIndex, int itemIndex); + void RefreshItemLayout(int groupIndex, int itemIndex); + void GetFirstLoadedItemIndex(int& groupIndex, int& itemIndex) const; + void GetLastLoadedItemIndex(int& groupIndex, int& itemIndex) const; + + result SetStatusChanged(bool changed); + bool IsStatusChanged(void) const; + + result ExpandGroup(int groupIndex, bool withAnimation); + result CollapseGroup(int groupIndex, bool withAnimation); + bool IsGroupExpanded(int groupIndex) const; + void StopExpandCollapseAnimation(void); + + result SetReorderMode(bool enabled); + + bool CheckItemHeightAndRefreshLayout(TableViewItemTag itemTag, bool downScroll); + + result ScrollByPixel(float scrollDistance); + void SetScrollEnabled(bool enable); + bool IsScrollEnabled(void) const; + + bool GetFirstDrawnFlag(void) const; + int GetMaxItemCachingSize(void) const; + void ResetSweepItem(void); + void GetSweepItemIndex(int& groupIndex, int& itemIndex) const; + int GetPressedItemCount(void); + + result OpenContextItem(int groupIndex, int itemIndex); + result CloseContextItem(int groupIndex, int itemIndex); + bool IsContextItemOpened(int groupIndex, int itemIndex) const; + + result SetSectionHeaderTextHorizontalAlignment(int sectionIndex, HorizontalAlignment alignment); + HorizontalAlignment GetSectionHeaderTextHorizontalAlignment(int sectionIndex) const; + result SetSectionFooterTextHorizontalAlignment(int sectionIndex, HorizontalAlignment alignment); + HorizontalAlignment GetSectionFooterTextHorizontalAlignment(int sectionIndex) const; + + void BlockAnimationCallback(bool blocked); + + 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); + virtual void FadeOutScrollBar(void); + + // Update Layout + virtual void UpdateLayout(void); + +private: + _TableViewPresenter(const _TableViewPresenter& rhs); + _TableViewPresenter& operator =(const _TableViewPresenter& rhs); + + _TableView* __pTableView; + _ListViewModel* __pListModel; + _TableViewItemProviderAdaptor* __pProviderAdaptor; + + bool PreloadItem(void); + bool PreloadItem(int topDrawnGroupIndex, int topDrawnItemIndex, float shiftingDistance); + + bool GetFirstItem(TableViewItemTag& firstItem) const; + bool GetLastItem(TableViewItemTag& lastItem) const; + bool GetPreviousItemPosition(const TableViewItemTag& currentItem, TableViewItemTag& prevItem) const; + bool GetNextItemPosition(const TableViewItemTag& currentItem, TableViewItemTag& nextItem) const; + int GetItemCount(void) const; + float GetHeightOfAllItems(void) const; + + void SetItemLayout(_TableViewItem* pItem, TableViewItemTag& itemPos); + float CalculateItemPositionY(int groupIndex, int itemIndex); + void AdjustLayoutItems(float scrollPosition); + bool IsCachingItemsTotalHeightLessThanViewHeight(void); + + void ResetItemLayout(TableViewItemTag& topDrawnItemTag, float shiftingDistance); + void RefreshItemLayout(TableViewItemTag& topDrawnItemTag, TableViewItemTag& refreshItemTag, TableViewRefreshType type, bool animation); + void RefreshItemBounds(_TableViewItem* pItem, TableViewItemTag& itemPos); + void ScrollToItem(int groupIndex, int itemIndex, TableViewScrollItemAlignment itemAlignment, float shiftingDistance = 0.0f); + + _TableViewItem* GetTableViewItemFromControl(const _Control& source); + + void UnloadItem(TableViewItemTag& itemTag); + void DetachItem(TableViewItemTag& itemTag); + void DetachContextItem(TableViewItemTag& itemTag); + void DetachAllItem(bool removeItem); + void SetItemDrawingProperty(void); + void SetItemType(_TableViewItem* pItem, TableViewItemTag itemPosition); + + result StartFastScrollTimer(void); + void StopFastScrollTimer(void); + + bool IsEmpty(void) const; + result DrawEmptyTableView(void); + + void LoadItemWithScrollPosition(float previousScrollPosition, float currentScrollPos); + bool GetTableViewItemPosition(_TableViewItem& item, TableViewItemTag& itemTag); // item must exist between from tag and end tag + int LoadAllItemsInGroup(int groupIndex, bool downward); + void SetLoadedItemsVisibleInGroup(int groupIndex, bool visible); + TableViewItemTag LoadItemsToBeVisible(const TableViewItemTag& from); + void AttachNextItemsToBottom(const TableViewItemTag& anchor); + bool IsAnyItemInGroupLoaded(int groupIndex) const; + bool IsAnyItemInLoadedIndex(int groupIndex, int itemIndex); + void ScrollToHideNonClientArea(TableViewItemTag& bottomTag); + void AdjustClientAreaBounds(bool reset, float dist = 0.0f); + void SetClientAreaHeight(float height); + void UnloadInvisibleItems(void); + + // reordering + bool SelectReorderItem(int groupIndex, int itemIndex, bool directSelection); + bool ResetReorderItem(int groupIndex, int itemIndex); + bool DragSelectedItem(float distance, bool relativeCoordinate); + bool CheckReorderItemScrollAnimation(_TableViewItem *pItem); + bool CheckReorderItemPosition(_TableViewItem* pItem, TableViewItemTag& reorderItemTag); + void AdjustReorderItemLimitPositionY(float& positionY); + bool ReorderItem(int destinationGroupIndex, int destinationItemIndex); + void StartReorderScrollTimer(void); + void StopReorderScrollTimer(void); + + // item height + 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); + + bool CreateSectionAlignmentList(void); + void DeleteSectionAlignmentList(void); + bool RefreshSectionAlignmentList(int groupIndex, TableViewRefreshType refreshType); + + void CaptureAndStartRemoveItemAnimation(int groupIndex, int itemIndex); + + void ShowTableViewCapturedItem(int groupIndex, int itemIndex, float height); + void SetLoadedItemsVisibleFromPosition(float position, bool visible); + void MoveLoadedItemsFromPosition(float position); + void ExpandGroupAnimationFinished(bool completedNormally); + void CollapseGroupAnimationFinished(bool completedNormally); + + + void SweepItem(float x); + void ResetSweptItem(void); + void AdjustSweptItemPosition(bool withAnimation = false); + void AdjustLoadedItemWidth(void); + + bool IsValidDrawnItem(int groupIndex, int itemIndex); + void StopAllItemAnimation(void); + + bool GetAccessibilityElementFocusedState(void); + +private: + float __topMargin; + float __bottomMargin; + float __leftMargin; + + bool __modelInitialized; + bool __firstDrawnFlag; + bool __statusChangedFlag; + bool __scrolling; + + _ItemDrawingProperty* __pItemDrawingProperty; + + Tizen::Ui::Animations::_VisualElement* __pBaseVisualElement; + + bool __sweepOccured; + Tizen::Graphics::FloatPoint __sweptItemPosition; + TableViewItemTag __sweptItemTag; + + TableViewItemTag __focusItemTag; + TableViewItemTag __focusItemTagOnTraversal; + TableViewItemTag __accessibilityTag; + + TableViewItemTag __reservedScrollItemIndex; + TableViewScrollItemAlignment __reservedScrollItemAlignment; + + bool __firstTouchMoved; + + Tizen::Base::Runtime::Timer* __pReorderScrollTimer; + + _TableViewReorderInfo __reorderInfo; + + Tizen::Base::Collection::ArrayListT<_TableViewItemHeight> __itemHeightList; + Tizen::Base::Collection::ArrayListT<_TableViewSectionStringAlignment> __sectionAlignmentList; + float __itemTotalHeight; + + TableViewItemTag __expandableItemTag; + Tizen::Ui::Animations::_VisualElement* __pCapturedItemVisualElement; + + Tizen::Base::Runtime::Timer* __pFastScrollTimer; + bool __isFastScrollTimerEnabled; + + float __scrollHeightOnFlickStarted; + float __scrollPositionOnFlickStarted; + + bool __isAnimationCallbackBlocked; + bool __lockLoadItemWithScroll; + + bool __isRestoreFocus; + bool __isAnnexFocused; + bool __isTableViewFocused; + + int __itemTouchReleasedEventState; + + _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; + static const int REORDER_TOUCH_UIACTIVATE_DURATION = 100; + static const int FAST_SCROLL_FADE_OUT_DURATION = 500; + static const float TABLEVIEW_DEFAULT_ITEM_HEIGHT_VALUE; + + //animation + static const int REORDER_ITEM_MOVE_ANIMATION_DURATION = 113; + static const int ADD_ITEM_ANIMATION_DURATION = 333; + static const int REMOVE_ITEM_MOVE_ANIMATION_DURATION = 267; + static const int REFRESH_ITEM_ANIMATION_DELAY = 100; + static const int EXPAND_GROUP_ANIMATION_DURATION = 335; + static const int COLLAPSE_GROUP_ANIMATION_DURATION = 329; + static const int SWEEP_ITEM_ANIMATION_DURATION = 300; +}; + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_TABLE_VIEW_PRESENTER_H_ + diff --git a/src/ui/inc/FUiCtrl_TextBlockEvent.h b/src/ui/inc/FUiCtrl_TextBlockEvent.h new file mode 100644 index 0000000..74e3aa0 --- /dev/null +++ b/src/ui/inc/FUiCtrl_TextBlockEvent.h @@ -0,0 +1,105 @@ +// +// 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_TextBlockEvent.h +* @brief This is the header file for _TextBlockEvent class. +* +* This header file contains declaration of _TextBlockEvent class. +* +*/ + +#ifndef _FUI_CTRL_TEXT_BLOCK_EVENT_H_ +#define _FUI_CTRL_TEXT_BLOCK_EVENT_H_ + +#include +#include +#include +#include + +namespace Tizen { namespace Ui +{ +class _Control; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ +/** +* @class _TextBlockEvent +* @brief This class handles a text Block event event. It is inherited from Event class. +* +*/ +class _TextBlockEvent + : public Tizen::Base::Runtime::_Event +{ +// Lifecycle +public: + /** + * This is the default class destructor. + * + */ + virtual ~_TextBlockEvent(void); + + static _TextBlockEvent* CreateInstanceN(const Tizen::Ui::_Control& source); + +// Accessors +public: + /** + * This method returns the owner of this event. + * + * @return See the comment above. + */ + const Tizen::Ui::_Control* GetSource(void) const; + + // Operations +protected: + /** + * This is the default class constructor. + * + * @remarks After creating an instance of this class, you must explicitly call one of + * construction methods to initialize the instance. + * + */ + _TextBlockEvent(const Tizen::Ui::_Control& source); + + /** + * This method checks the arg and finds out the type of event. After that this method calls appopriate + * pListener's method. + * + * @param[in] listener It is a event listener related to this item event. + * @param[in] arg It is an argument-like instance of item event retransmitted to the listener's method + * as an argument. + * @exception E_SUCCESS - The method is successful. + * @exception E_ARG_NULL - The listener is null. + * @exception E_INVALID_ARG - The argument passed to a method contains an invalid value.@n + *   The pListener is not the instance of IItemEventListener class or + * the pItemEventArg is not the instance of _CustomItemEventArg class. + * + */ + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + +public: + static Tizen::Base::Runtime::IEventArg* CreateTextBlockEventArgN(int start, int end); + + //Attributess +private: + const Tizen::Ui::_Control* __pSource; +}; // _TextBlockEvent + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_TEXT_BLOCK_EVENT_H_ diff --git a/src/ui/inc/FUiCtrl_TextBoxImpl.h b/src/ui/inc/FUiCtrl_TextBoxImpl.h new file mode 100644 index 0000000..e0eb696 --- /dev/null +++ b/src/ui/inc/FUiCtrl_TextBoxImpl.h @@ -0,0 +1,666 @@ +// +// 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_TextBoxImpl.h + * @brief This is the header file for the _TextBoxImpl class. + * + * This header file contains the declarations of the %_EditPresenter class. + */ + +#ifndef _FUI_CTRL_INTERNAL_TEXT_BOX_IMPL_H_ +#define _FUI_CTRL_INTERNAL_TEXT_BOX_IMPL_H_ + +#include +#include +#include +#include +#include "FUi_ControlImpl.h" +#include "FUiCtrl_Edit.h" +#include "FUiCtrl_ITextBlockEventListener.h" +#include "FUiCtrl_IUiLinkEventListener.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +// forward declarations +class _PublicTextBlockEvent; +class _PublicLinkEvent; + +class _TextBoxImpl + : public _ControlImpl + , public _IUiLinkEventListener + , public _ITextBlockEventListener + , virtual public Tizen::Base::Runtime::IEventListener +{ +public: + /** + * This is the default constructor for this class. + * + * @since 2.0 + * + */ + _TextBoxImpl(TextBox* pPublic, _Edit* pCore); + + /** + * This is destructor for this class. + * + * @since 2.0 + */ + virtual ~_TextBoxImpl(void); + + /** + * Creates this instance of the _TextBoxImpl with the specified parameters. + * + * @since 2.0 + * @return An error code + * @param[in] pPublic The pointer of the TextBox control. + */ + static _TextBoxImpl* CreateTextBoxImplN(TextBox* pPublic); + + virtual const char* GetPublicClassName(void) const; + virtual const TextBox& GetPublic(void) const; + virtual TextBox& GetPublic(void); + virtual const _Edit& GetCore(void) const; + virtual _Edit& GetCore(void); + + /** + * Initializes this instance of the TextBox control with the specified parameters. + * + * @since 2.0 + * @return An error code + * @param[in] border The border style + * @exception E_SUCCESS The method was successful. + * @exception E_OUT_OF_MEMORY Insufficient memory. + * @exception E_SYSTEM A system error occurred. + */ + result Initialize(TextBoxBorder border = TEXT_BOX_BORDER_ROUNDED); + + /** + * Sets the auto-link mask. + * + * @since 2.0 + * @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). + * For more information, refer to @ref linkAutoLinkDetection "here". + * @exception E_SUCCESS The method was successful. + * @exception E_SYSTEM A system error occurred. + * @remarks When @c autoLinks is set to zero, the auto-link detection is disabled. + * @see Tizen::Base::Utility::LinkType + * @see GetAutoLinkMask() + */ + result SetAutoLinkMask(unsigned long autoLinks); + + /** + * Gets the auto-link mask. + * + * @since 2.0 + * @return The auto-link mask + * @exception E_SUCCESS The method was successful. + * @exception E_SYSTEM A system error occurred. + * @remarks The specific error code can be accessed using the GetLastResult() method. + * @see SetAutoLinkMask() + */ + unsigned long GetAutoLinkMask(void) const; + + /** + * Adds a link event listener. + * + * @since 2.0 + * @param[in] listener The event listener to add + * @see RemoveUiLinkEventListener() + */ + result AddUiLinkEventListener(Tizen::Ui::IUiLinkEventListener& listener); + + /** + * Removes the specified link event listener. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * @param[in] listener The event listener to remove + * @see AddUiLinkEventListener() + */ + result RemoveUiLinkEventListener(Tizen::Ui::IUiLinkEventListener& listener); + +// Text + /** + * Appends the specified character at the end of the text. + * + * @since 2.0 + * @return An error code + * @param[in] character The character to add + * @exception E_SUCCESS The method was successful. + * @exception E_SYSTEM A system error occurred. + * @remarks The method modifies the text buffer that is managed by the TextBox control. + * To display the changes, the control must be drawn again. + */ + result AppendCharacter(const Tizen::Base::Character& character); + + /** + * Appends the specified text at the end of the text. + * + * @since 2.0 + * @return An error code + * @param[in] text The text to append + * @exception E_SUCCESS The method was successful. + * @exception E_SYSTEM A system error occurred. + * @remarks To denote the end of a line use '\\n'. @n + * The method modifies the text buffer that is managed by the TextBox control. + * To display the changes, the control must be drawn again. + */ + result AppendText(const Tizen::Base::String& text); + + /** + * Clears text that is displayed by the TextBox control. + * + * @since 2.0 + * @return An error code + * @exception E_SUCCESS The method was successful. + * @exception E_SYSTEM A system error occurred. + * @remarks The method modifies the text buffer that is managed by the TextBox control. + * To display the changes, the control must be drawn again. + */ + result Clear(void); + + /** + * Gets the number of the lines contained in the TextBox control. + * + * @since 2.0 + * @return The line count of the text, @n + * else @c -1 if an error occurs + * @exception E_SUCCESS The method was successful. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + int GetLineCount(void) const; + + /** + * Gets the text that is displayed by the TextBox control. + * + * @since 2.0 + * @return The text of the TextBox control, @n + * else an empty string if an error occurs + * @exception E_SUCCESS The method was successful. + * @exception E_OUT_OF_MEMORY Insufficient memory. + * @exception E_SYSTEM A system error occurred. + * @remarks The specific error code can be accessed using the GetLastResult() method. + * @see SetText() + */ + Tizen::Base::String GetText(void) const; + + /** + * Gets a portion of the text that is displayed by the TextBox control. + * + * @since 2.0 + * @return The specified portion of the text, @n + * else an empty string if an error occurs + * @param[in] start The starting index of range + * @param[in] end The last index of range + * @exception E_SUCCESS The method was successful. + * @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or the index is greater + * than the number of elements or less than zero. + * @exception E_SYSTEM A system error occurred. + * @remarks The specific error code can be accessed using the GetLastResult() method. + * @see SetText() + */ + Tizen::Base::String GetText(int start, int end) const; + + /** + * Gets the length of the text that is displayed by the TextBox control. + * + * @since 2.0 + * @return The length of the text, @n + * else @c -1 if an error occurs + * @exception E_SUCCESS The method was successful. + * @exception E_SYSTEM A system error occurred. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + int GetTextLength(void) const; + + /** + * Inserts the character at the specified index. + * + * @since 2.0 + * @return An error code + * @param[in] index The position at which to insert the character + * @param[in] character The character to insert + * @exception E_SUCCESS The method was successful. + * @exception E_OUT_OF_RANGE The specified @c index is outside the bounds of the data structure, or @c index is greater than the number of elements or less than zero. + * @exception E_SYSTEM A system error occurred. + */ + result InsertCharacterAt(int index, const Tizen::Base::Character& character); + + /** + * Inserts the text at the specified index. + * + * @since 2.0 + * @return An error code + * @param[in] index The position at which to insert the text + * @param[in] text The text to insert + * @exception E_SUCCESS The method was successful. + * @exception E_OUT_OF_RANGE The specified @c index is outside the bounds of the data structure, or @c index is greater than the number of elements or less than zero. + * @exception E_SYSTEM A system error occurred. + */ + result InsertTextAt(int index, const Tizen::Base::String& text); + + /** + * Sets the text to display. + * + * @since 2.0 + * @return An error code + * @param[in] text The text to display + * @exception E_SUCCESS The method was successful. + * @exception E_SYSTEM A system error occurred. + * @remarks To denote the end of a line use '\\n'. @n + * The method modifies the text buffer that is managed by the TextBox control. + * To display the changes, the control must be drawn again. + */ + result SetText(const Tizen::Base::String& text); + +// Line Spacing + /** + * Gets the line spacing. + * + * @since 2.0 + * @return The line spacing, @n + * else @c -1 if an error occurs + * @exception E_SUCCESS The method was successful. + * @remarks The specific error code can be accessed using the GetLastResult() method. + * @see SetLineSpacing() + */ + int GetLineSpacing(void) const; + + /** + * Gets the line spacing. + * + * @since 2.1 + * @return The line spacing, @n + * else @c -1 if an error occurs + * @exception E_SUCCESS The method was successful. + * @remarks The specific error code can be accessed using the GetLastResult() method. + * @see SetLineSpacing() + */ + float GetLineSpacingF(void) const; + + /** + * Sets the line spacing. @n + * The line spacing is determined by multiplying @c multiplier to the default line spacing and adding @c extra. + * @code + * The line spacing = (default line spacing) * multiplier + extra + * @endcode + * @since 2.0 + * @return An error code + * @param[in] multiplier The line spacing multiplier + * @param[in] extra The extra line spacing + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_ARG A specified parameter is invalid. @n + * -- The specified line spacing value cannot be supported. + * @exception E_SYSTEM A system error occurred. + * @see GetLineSpacing() + */ + result SetLineSpacing(int multiplier, int extra); + + /** + * Sets the line spacing. @n + * The line spacing is determined by multiplying @c multiplier to the default line spacing and adding @c extra. + * @code + * The line spacing = (default line spacing) * multiplier + extra + * @endcode + * @since 2.1 + * @return An error code + * @param[in] multiplier The line spacing multiplier + * @param[in] extra The extra line spacing + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_ARG A specified parameter is invalid. @n + * -- The specified line spacing value cannot be supported. + * @exception E_SYSTEM A system error occurred. + * @see GetLineSpacingF() + */ + result SetLineSpacing(int multiplier, float extra); + + // Text Alignment + /** + * Gets the horizontal text alignment. + * + * @since 2.0 + * @return The horizontal text alignment + * @exception E_SUCCESS The method was successful. + * @exception E_SYSTEM A system error occurred. + * @remarks The specific error code can be accessed using the GetLastResult() method. + * @see SetTextAlignment() + */ + HorizontalAlignment GetTextAlignment(void) const; + + /** + * Sets the horizontal text alignment. + * + * @since 2.0 + * @return An error code + * @param[in] alignment The horizontal text alignment + * @exception E_SUCCESS The method was successful. + * @exception E_SYSTEM A system error occurred. + * @see GetTextAlignment() + */ + result SetTextAlignment(HorizontalAlignment alignment); + +// Text Size + /** + * Gets the text size of the TextBox control. + * + * @since 2.0 + * @return The size of the text, @n + * else @c -1 if an error occurs + * @exception E_SUCCESS The method was successful. + * @exception E_SYSTEM A system error occurred. + * @remarks The specific error code can be accessed using the GetLastResult() method. + * @see SetTextSize() + */ + int GetTextSize(void) const; + + /** + * Gets the text size of the TextBox control. + * + * @since 2.1 + * @return The size of the text, @n + * else @c -1 if an error occurs + * @exception E_SUCCESS The method was successful. + * @exception E_SYSTEM A system error occurred. + * @remarks The specific error code can be accessed using the GetLastResult() method. + * @see SetTextSize() + */ + float GetTextSizeF(void) const; + + /** + * Gets the text total height of the TextBox control. + * + * @since 2.0 + * @return The total height of the text, @n + * else @c -1 if an error occurs + * @exception E_SUCCESS The method was successful. + * @exception E_SYSTEM A system error occurred. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + int GetTextTotalHeight(void) const; + + /** + * Gets the text total height of the TextBox control. + * + * @since 2.1 + * @return The total height of the text, @n + * else @c -1 if an error occurs + * @exception E_SUCCESS The method was successful. + * @exception E_SYSTEM A system error occurred. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + float GetTextTotalHeightF(void) const; + + /** + * Sets the text size. + * + * @since 2.0 + * @return An error code + * @param[in] size The text size + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_ARG A specified input parameter is invalid.@n + * -- The specified @c size cannot be negative integer. + * @exception E_SYSTEM A system error occurred. + * @see GetTextSize() + */ + result SetTextSize(int size); + + /** + * Sets the text size. + * + * @since 2.1 + * @return An error code + * @param[in] size The text size + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_ARG A specified input parameter is invalid.@n + * -- The specified @c size cannot be negative integer. + * @exception E_SYSTEM A system error occurred. + * @see GetTextSizeF() + */ + result SetTextSize(float size); + +// Text Font + /** + * Gets the font typeface name and the style mask of the TextBox control. + * + * @since 2.0 + * @return An error code + * @param[out] typefaceName The name of the font typeface + * @param[out] style The text style (see TextBoxTextStyle) + * @exception E_SUCCESS The method was successful. + * @exception E_SYSTEM A system error occurred. + * @remarks Multiple styles can be combined using the bitwise OR operator. + * @see SetFontType() + * @see Tizen::Graphics::Font::GetSystemFontListN() + * @see TextBoxTextStyle + */ + result GetFontType(Tizen::Base::String& typefaceName, unsigned long& style) const; + + unsigned long GetTextStyle(void) const; + + /** + * Sets the font and the style mask of the TextBox control. + * + * @since 2.0 + * @return An error code + * @param[in] typefaceName The name of the font typeface + * @param[in] style The text style @n + * Multiple styles can be combined using the bitwise OR operator(see TextBoxTextStyle). + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_ARG A specified input parameter is invalid, or the specified font typeface is not supported. + * @exception E_SYSTEM A system error 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 be applied. + * @see GetFontType() + * @see Tizen::Graphics::Font::GetSystemFontListN() + * @see TextBoxTextStyle + */ + result SetFontType(const Tizen::Base::String& typefaceName, unsigned long style); + + result SetTextStyle(unsigned long style); + + /** + * Sets the font to render the text. + * + * @since 2.0 + * @return An error code + * @param[in] font The text font + * @exception E_SUCCESS The method was successful. + * @exception E_SYSTEM A system error occurred. + * @remarks All previously set text attributes (style, weight, decoration, and size) will be discarded. + */ + result SetFont(const Tizen::Graphics::Font& font); + +// Text Block + /** + * Releases the selection of the current text block. + * + * @since 2.0 + * @return An error code + * @exception E_SUCCESS The method was successful. + * @exception E_SYSTEM A system error occurred. + * @see GetBlockRange() + * @see SetBlockRange() + */ + result ReleaseBlock(void); + + /** + * Gets the start and the end index of the currently selected text block. + * + * @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 + * @exception E_SUCCESS The method was successful. + * @exception E_SYSTEM A system error occurred. + * @remarks The method returns @c start = 0 and @c end = 0 if there is no selected text block. + * @see ReleaseBlock() + * @see SetBlockRange() + */ + result GetBlockRange(int& start, int& end) const; + + /** + * Sets the specified block of the text. + * + * @since 2.0 + * @return An error code + * @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 was successful. + * @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or either the @c start or @c end parameters are greater than the number of elements or less than zero. + * @exception E_SYSTEM A system error occurred. + * @see ReleaseBlock() + * @see GetBlockRange() + */ + result SetBlockRange(int start, int end); + +// Appearances + /** + * Gets the color of the TextBox control for the specified status. + * + * @since 2.0 + * @return The color of the TextBox control, @n + * else RGBA (0,0,0,0) if an error occurs + * @exception E_SUCCESS The method was successful. + * @remarks The specific error code can be accessed using the GetLastResult() method. + * @see SetColor() + */ + Tizen::Graphics::Color GetColor(TextBoxStatus status) const; + + /** + * Gets the text color of the specified text color type. + * + * @since 2.0 + * @return The color, @n + * else RGBA (0,0,0,0) if an error occurs + * @param[in] type The text color type + * @exception E_SUCCESS The method was successful. + * @exception E_SYSTEM A system error occurred. + * @remarks The specific error code can be accessed using the GetLastResult() method. + * @see SetTextColor() + */ + Tizen::Graphics::Color GetTextColor(TextBoxTextColor type) const; + + /** + * Sets the background bitmap of the TextBox control. + * + * @since 2.0 + * @return An error code + * @param[in] status The state of the TextBox control + * @param[in] bitmap The background bitmap + * @exception E_SUCCESS The method was successful. + * @exception E_SYSTEM A system error occurred. + * @see SetBackgroundColor() + */ + result SetBackgroundBitmap(TextBoxStatus status, const Tizen::Graphics::Bitmap& bitmap); + + /** + * Sets the color of the TextBox control for the specified status. + * + * @since 2.0 + * @return An error code + * @param[in] status The state of the TextBox control + * @param[in] color The color to set + * @exception E_SUCCESS The method was successful. + * @exception E_SYSTEM A system error occurred. + * @see GetColor() + */ + result SetColor(TextBoxStatus status, const Tizen::Graphics::Color& color); + + /** + * Sets the text color of the TextBox control for the specified text type. + * + * @since 2.0 + * @return An error code + * @param[in] type The text color type + * @param[in] color The text color to set + * @exception E_SUCCESS The method was successful. + * @exception E_SYSTEM A system error occurred. + * @see GetTextColor() + */ + result SetTextColor(TextBoxTextColor type, const Tizen::Graphics::Color& color); + + /** + * Adds a text block event listener. + * + * @since 2.0 + * @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() + */ + result AddTextBlockEventListener(Tizen::Ui::ITextBlockEventListener& listener); + + /** + * Removes the specified text block event listener. @n + * The removed listener cannot listen to events when they are fired. + * + * @since 2.0 + * @param[in] listener The event listener to remove + * @see AddTextBlockEventListener() + */ + result RemoveTextBlockEventListener(Tizen::Ui::ITextBlockEventListener& listener); + + virtual Tizen::Graphics::FloatDimension GetContentSizeF(bool horizontalMode, bool verticalMode) const; + +// Operation +public: + // callback + virtual result OnBoundsChanged(const Tizen::Graphics::Rectangle& oldRect, const Tizen::Graphics::Rectangle& newRect); + virtual result OnBoundsChanged(const Tizen::Graphics::FloatRectangle& oldRect, const Tizen::Graphics::FloatRectangle& newRect); + virtual void OnLinkClicked(Tizen::Ui::_Control& source, const Tizen::Base::String& text, Tizen::Base::Utility::LinkType linkType, const Tizen::Base::String& link); + virtual void OnTextBlockSelected(Tizen::Ui::_Control& source, int start, int end); + +public: + static _TextBoxImpl* GetInstance(TextBox& textBox); + static const _TextBoxImpl* GetInstance(const TextBox& textBox); + +protected: + + // + // This is internal. If used in an application, the application can get rejected during the certification process. + // Frees the resources allocated by this control and destroys its native window if it is present). + // + virtual result Dispose(void); + + // + // This is internal. Converts text color type between the Edit control and the TextBox control. + // + EditTextColor ConvertTextColorType(TextBoxTextColor color) const; + + // + // This is internal. Converts text color type between the Edit control and the TextBox control. + // + EditStatus ConvertStatus(TextBoxStatus status) const; + +private: + _TextBoxImpl(const _TextBoxImpl&); + _TextBoxImpl& operator =(const _TextBoxImpl&); + +private: + _Edit* __pEdit; + _PublicTextBlockEvent* __pPublicTextBlockEvent; + _PublicLinkEvent* __pPublicLinkEvent; + unsigned long __autoLinkMask; + +}; // _TextBoxImpl + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_TEXT_BOX_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_TextEvent.h b/src/ui/inc/FUiCtrl_TextEvent.h new file mode 100644 index 0000000..f8a05f0 --- /dev/null +++ b/src/ui/inc/FUiCtrl_TextEvent.h @@ -0,0 +1,114 @@ +// +// 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_TextEvent.h + * @brief This is the header file for _TextEvent class. + * @version 2.0 + * + * This header file contains declaration of _TextEvent class. + * + */ +#ifndef _FUI_CTRL_TEXT_EVENT_H_ +#define _FUI_CTRL_TEXT_EVENT_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui +{ +class _Control; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ + +enum CoreTextEventStatus +{ + CORE_TEXT_EVENT_CHANGED, + CORE_TEXT_EVENT_CANCELED +}; + +/** +* @class _TextEvent +* @brief This class handles a action event. It is inherited from Event class. +* +* The Window(root of all widgets) class has an instance of the _TextEvent class as a member variable. +* Applications can register action event listeners through it. When a action event occurred, +* the _ActionEvent class finds listener and calls the appropriate listener's method. +* +*/ +class _TextEvent + : public Tizen::Base::Runtime::_Event +{ +// Lifecycle +public: + /** + * This is the default class destructor. + * + */ + virtual ~_TextEvent(void); + + static _TextEvent* CreateInstanceN(const Tizen::Ui::_Control& source); + +// Accessors +public: + /** + * This method returns the owner of this event. + * + * @return See the comment above. + */ + const Tizen::Ui::_Control* GetSource(void) const; + +// Operations +protected: + /** + * This is the default class constructor. + * + * @remarks After creating an instance of this class, you must explicitly call one of + * construction methods to initialize the instance. + * + */ + _TextEvent(const Tizen::Ui::_Control& source); + + /** + * This method checks the arg and finds out the type of event. After that this method calls appopriate + * pListener's method. + * + * @param[in] listener It is a event listener related to this action event. + * @param[in] arg It is an argument-like instance of action event retransmitted to the listener's method + * as an argument. + * @exception E_SUCCESS - The method is successful. + * @exception E_ARG_NULL - The listener is null. + * @exception E_INVALID_ARG - The argument passed to a method contains an invalid value.@n + *   The pListener is not the instance of IActionEventListener class or + * the p__ActionEventArg is not the instance of _ActionEventArg class. + * + */ + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + +public: + static Tizen::Base::Runtime::IEventArg* CreateTextEventArgN(CoreTextEventStatus status); + +//Attributess +private: + const Tizen::Ui::_Control* __pSource; +}; // _TextEvent + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_TEXT_EVENT_H_ diff --git a/src/ui/inc/FUiCtrl_TimePickerImpl.h b/src/ui/inc/FUiCtrl_TimePickerImpl.h new file mode 100644 index 0000000..64031d2 --- /dev/null +++ b/src/ui/inc/FUiCtrl_TimePickerImpl.h @@ -0,0 +1,98 @@ +// +// 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_TimePickerImpl.h + * @brief This is the header file for the _TimePickerImpl class. + */ + +#ifndef _FUI_CTRL_INTERNAL_TIMEPICKER_IMPL_H_ +#define _FUI_CTRL_INTERNAL_TIMEPICKER_IMPL_H_ + +#include +#include "FUi_WindowImpl.h" +#include "FUiCtrl_DateTimePicker.h" +#include "FUiCtrl_IDateTimeChangeEventListener.h" +#include "FUiCtrl_PublicDateTimeChangeEvent.h" + +namespace Tizen { namespace Ui +{ +class ITimeChangeEventListener; +}} + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _TimePickerImpl + : public _WindowImpl + , public _IDateTimeChangeEventListener + , virtual public Tizen::Base::Runtime::IEventListener +{ +public: + class TimePickerSizeInfo : public _ControlImpl::SizeInfo + { + virtual Tizen::Graphics::FloatDimension GetDefaultMinimumSizeF(_ControlOrientation orientation) const; + virtual Tizen::Graphics::FloatDimension GetDefaultMaximumSizeF(_ControlOrientation orientation) const; + }; + +public: + static _TimePickerImpl* CreateTimePickerImplN(TimePicker* pControl, const Tizen::Base::String& title = L""); + virtual ~_TimePickerImpl(void); + + virtual const char* GetPublicClassName(void) const; + virtual const TimePicker& GetPublic(void) const; + virtual TimePicker& GetPublic(void); + virtual const _DateTimePicker& GetCore(void) const; + virtual _DateTimePicker& GetCore(void); + + result AddTimeChangeEventListener(Tizen::Ui::ITimeChangeEventListener& listener); + result RemoveTimeChangeEventListener(Tizen::Ui::ITimeChangeEventListener& listener); + + void SetCurrentTime(void); + result SetHour(int hour); + int GetHour(void) const; + result SetMinute(int minute); + int GetMinute(void) const; + void SetTime(const Tizen::Base::DateTime& time); + Tizen::Base::DateTime GetTime(void) const; + void Set24HourNotationEnabled(bool enable); + + virtual result OnAttachedToMainTree(void); + virtual void OnDateTimeChanged(const Tizen::Ui::_Control& source, int year, int month, int day, int hour, int minute); + virtual void OnDateTimeChangeCanceled(const Tizen::Ui::_Control& source); + virtual void OnChangeLayout(Tizen::Ui::_ControlOrientation orientation); + +public: + static _TimePickerImpl* GetInstance(TimePicker& timePicker); + static const _TimePickerImpl* GetInstance(const TimePicker& timePicker); + +private: + result SetYear(int year); + result SetMonth(int month); + result SetDay(int day); + + _TimePickerImpl(TimePicker* pPublic, _DateTimePicker* pCore); + _TimePickerImpl(const _TimePickerImpl&); + _TimePickerImpl& operator =(const _TimePickerImpl&); + +private: + _PublicDateTimeChangeEvent* __pPublicDateTimeChangeEvent; +}; // _TimePickerImpl + +}}} // Tizen::Ui::Controls + +#endif //_FUI_CTRL_INTERNAL_TIMEPICKER_IMPL_H_ diff --git a/src/ui/inc/FUiCtrl_TokenEdit.h b/src/ui/inc/FUiCtrl_TokenEdit.h new file mode 100644 index 0000000..54d46fa --- /dev/null +++ b/src/ui/inc/FUiCtrl_TokenEdit.h @@ -0,0 +1,175 @@ +// +// 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_TokenEdit.h + * @brief This is the header file for the _TokenEdit class. + * + * This header file contains the declarations of the %_TokenEdit class. + */ +#ifndef _FUICTRL_INTERNAL_TOKEN_EDIT_H_ +#define _FUICTRL_INTERNAL_TOKEN_EDIT_H_ + +#include +#include "FUiCtrl_Edit.h" +#include "FUiCtrl_ITokenFilter.h" +#include "FUi_IAccessibilityListener.h" + +namespace Tizen { namespace Ui +{ +class _AccessibilityElement; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ +class _TokenEditPresenter; + +const int TOKEN_COLOR_MAX = 4; + +/** + * @enum TokenEditStatus + * + * Defines the possible Token Edit's states. + * + * @since 2.2 + */ +enum TokenEditStatus +{ + TOKEN_EDIT_STATUS_NORMAL, /**< The normal state */ + TOKEN_EDIT_STATUS_SELECTED, /**< The selected state */ + TOKEN_EDIT_STATUS_HIGHLIGHTED, /**< The highlighted state */ + TOKEN_EDIT_STATUS_DISABLED /**< The disabled state */ +}; + +class _TokenEdit + : virtual public Tizen::Base::Runtime::IEventListener + , virtual public Tizen::Ui::_IUiEventListener + , virtual public Tizen::Ui::_IUiEventPreviewer + , virtual public Tizen::Ui::_ITouchGestureEventListener + , public Tizen::Ui::Controls::_Edit + , public Tizen::Ui::_IAccessibilityListener +{ + +public: + _TokenEdit(void); + + virtual ~_TokenEdit(void); + + static _TokenEdit* CreateTokenEditN(void); + + DECLARE_CLASS_BEGIN(_TokenEdit, _Edit); + DECLARE_PROPERTY("normalTokenColor", GetPropertyNormalTokenColor, SetPropertyNormalTokenColor); + DECLARE_PROPERTY("selectedTokenColor", GetPropertySelectedTokenColor, SetPropertySelectedTokenColor); + DECLARE_PROPERTY("highlightedTokenColor", GetPropertyHighlightedTokenColor, SetPropertyHighlightedTokenColor); + DECLARE_PROPERTY("disabledTokenColor", GetPropertyDisabledTokenColor, SetPropertyDisabledTokenColor); + DECLARE_PROPERTY("tokenTextColor", GetPropertyTokenTextColor, SetPropertyTokenTextColor); + DECLARE_PROPERTY("selectedTokenTextColor", GetPropertySelectedTokenTextColor, SetPropertySelectedTokenTextColor); + DECLARE_PROPERTY("tokenEditModeEnabled", GetPropertyTokenEditModeEnabled, SetPropertyTokenEditModeEnabled); + DECLARE_CLASS_END(); + +// Properties + result SetPropertyNormalTokenColor(const Variant& color); + Variant GetPropertyNormalTokenColor(void) const; + result SetPropertySelectedTokenColor(const Variant& color); + Variant GetPropertySelectedTokenColor(void) const; + result SetPropertyHighlightedTokenColor(const Variant& color); + Variant GetPropertyHighlightedTokenColor(void) const; + result SetPropertyDisabledTokenColor(const Variant& color); + Variant GetPropertyDisabledTokenColor(void) const; + result SetPropertyTokenTextColor(const Variant& color); + Variant GetPropertyTokenTextColor(void) const; + result SetPropertySelectedTokenTextColor(const Variant& color); + Variant GetPropertySelectedTokenTextColor(void) const; + result SetPropertyTokenEditModeEnabled(const Variant& enable); + Variant GetPropertyTokenEditModeEnabled(void) const; + + virtual void OnDraw(void); + result SetTokenFilter(const _ITokenFilter* pFilter); + _ITokenFilter* GetTokenFilter(void) const; + result AppendToken(const Tizen::Base::String& token); + result InsertTokenAt(int index, const Tizen::Base::String& token); + Tizen::Base::String GetTokenAt(int index) const; + int GetTokenCount(void) const; + int GetSelectedTokenIndex(void) const; + bool IsTokenEditModeEnabled(void) const; + result RemoveTokenAt(int index); + result SetTokenSelected(int index, bool selected); + result SetTokenEditModeEnabled(bool enable); + Tizen::Graphics::Color GetTokenColor(TokenEditStatus status) const; + Tizen::Graphics::Color GetTokenTextColor(void) const; + result SetTokenColor(TokenEditStatus status, const Tizen::Graphics::Color& color); + result SetTokenTextColor(const Tizen::Graphics::Color& color); + Tizen::Graphics::Color GetSelectedTokenTextColor(void) const; + result SetSelectedTokenTextColor(const Tizen::Graphics::Color& color); + virtual result SetTitleText(const Tizen::Base::String& title); + virtual Tizen::Base::String GetTitleText(void) const; + void SetAutoShrinkModeEnabled(bool enable); + bool IsAutoShrinkModeEnabled(void) const; + result ProcessTokenFiltering(const Tizen::Base::String& inputString, Tizen::Base::String& replaceString, bool& enable); + + // Touch callbacks + 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 result OnAttachedToMainTree(void); + virtual void OnDrawFocus(void); + virtual void OnFocusModeStateChanged(void); + + virtual void UpdateAccessibilityElement(EditAccessibilityElementType type); + _AccessibilityElement* GetTitleTextAccessibilityElement(void) const; + _AccessibilityElement* GetCursorAccessibilityElement(void) const; + result AddTitleAccessibilityElement(void); + result AddCursorAccessibilityElement(void); + result SetCursorAccessibilityBounds(const FloatRectangle& cursorBounds); + void RemoveTitleAccessibilityElement(void); + void RemoveCursorAccessibilityElement(void); + + //_IAccessibilityListener callbacks + virtual bool OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element){return false;} + virtual bool OnAccessibilityFocusMovedPrevious(const _AccessibilityContainer& control, const _AccessibilityElement& element){return false;} + virtual bool OnAccessibilityReadingElement(const _AccessibilityContainer& control, const _AccessibilityElement& element){return false;} + virtual bool OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element){return false;} + virtual bool OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityFocusOut(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityValueIncreased(const _AccessibilityContainer& control, const _AccessibilityElement& element){return false;} + virtual bool OnAccessibilityValueDecreased(const _AccessibilityContainer& control, const _AccessibilityElement& element){return false;} + +private: + _TokenEdit(const _TokenEdit& rhs); + _TokenEdit& operator =(const _TokenEdit& rhs); + + virtual void OnBoundsChanged(void); + +// Attributes +private: + _TokenEditPresenter* __pTokenEditPresenter; + Tizen::Graphics::Color __tokenColor[TOKEN_COLOR_MAX]; + + Tizen::Graphics::Color __tokenTextColor[TOKEN_COLOR_MAX]; + + bool __isSelectedTokenTextColorSet; + + _ITokenFilter* __pTokenFilter; + + Tizen::Ui::_AccessibilityElement* __pTitleTextAccessibilityElement; + Tizen::Ui::_AccessibilityElement* __pCursorAccessibilityElement; +}; // _TokenEdit + +}}} // Tizen::Ui::Controls + +#endif // _FUICTRL_INTERNAL_TOKEN_EDIT_H_ diff --git a/src/ui/inc/FUiCtrl_TokenEditModel.h b/src/ui/inc/FUiCtrl_TokenEditModel.h new file mode 100644 index 0000000..ef4f2f3 --- /dev/null +++ b/src/ui/inc/FUiCtrl_TokenEditModel.h @@ -0,0 +1,42 @@ +// +// 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_TokenEditModel.h + * @brief This is the header file for the _TokenEditModel class. + * + * This header file contains the declarations of the %_TokenEditModel class. + */ +#ifndef _FUICTRL_INTERNAL_TOKEN_EDIT_MODEL_H_ +#define _FUICTRL_INTERNAL_TOKEN_EDIT_MODEL_H_ + +#include "FUiCtrl_EditModel.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _TokenEditModel + : public Tizen::Ui::Controls::_EditModel +{ +public: + _TokenEditModel(void); + + virtual ~_TokenEditModel(void); +}; // _TokenEditModel + +}}} // Tizen::Ui::Controls + +#endif // _FUICTRL_INTERNAL_TOKEN_EDIT_MODEL_H_ diff --git a/src/ui/inc/FUiCtrl_TokenEditPresenter.h b/src/ui/inc/FUiCtrl_TokenEditPresenter.h new file mode 100644 index 0000000..1ef65be --- /dev/null +++ b/src/ui/inc/FUiCtrl_TokenEditPresenter.h @@ -0,0 +1,322 @@ +// +// 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_TokenEditPresenter.h + * @brief This is the header file for the _TokenEditPresenter class. + * + * This header file contains the declarations of the %_TokenEditPresenter class. + */ +#ifndef _FUI_CTRL_INTERNAL_TOKEN_EDIT_PRESENTER_H_ +#define _FUI_CTRL_INTERNAL_TOKEN_EDIT_PRESENTER_H_ + +#include +#include +#include +#include +#include "FUiCtrl_EditPresenter.h" +#include "FUiCtrl_TokenEditModel.h" +#include "FUiCtrl_TokenEdit.h" + +namespace Tizen { namespace Ui { namespace Controls +{ +class _TokenEdit; + +class SineTimingFunction + : public Tizen::Ui::Animations::IVisualElementAnimationTimingFunction +{ +public: + float CalculateProgress(float timeProgress) const; +}; + +class _TokenEditPresenter + : public Tizen::Ui::Controls::_EditPresenter + , virtual public Tizen::Base::Runtime::IEventListener + , public Tizen::Ui::Animations::IVisualElementAnimationStatusEventListener + , public Tizen::Ui::Animations::IVisualElementAnimationTickEventListener +{ +public: + _TokenEditPresenter(void); + + virtual ~_TokenEditPresenter(void); + + result DisposeTokenEditPresenter(void); + + static _TokenEditPresenter* CreateTokenEditPresenterN(void); + + result Initialize(const _Control& control); + + virtual result Draw(void); + + result MakeToken(const Tizen::Base::String& tokenString); + + result MakeToken(void); + + result AppendToken(const Tizen::Base::String& token); + + result InsertTokenAt(int index, const Tizen::Base::String& token, bool isUser = false); + + Tizen::Base::String GetTokenAt(int index) const; + + int GetTokenCount(bool isInvokedByApp = false) const; + + int GetSelectedTokenIndex(void) const; + + bool IsTokenEditModeEnabled(void) const; + + result RemoveTokenAt(int index, bool isClearText = false); + + result SetTokenSelected(int index, bool selected); + + result SetTokenEditModeEnabled(bool enable); + + result CalculateTokenPositionFromIndex(int startIndex, bool leftWard = true); + + virtual result SetInitialBounds(void); + + result CalculateTitleTextRect(const Tizen::Base::String& titleText); + + virtual void OnCursorTimerExpired(void); + + virtual result AdjustFlexibleHeight(void); + + virtual float CalculateFlexibleHeightF(void); + + virtual result DrawScrollBar(void); + + void SetAutoShrinkModeEnabled(bool enable); + + bool IsAutoShrinkModeEnabled(void) const; + + void SetTitleText(Tizen::Base::String titleText); + + Tizen::Base::String GetTitleText(void) const; + + Tizen::Graphics::FloatRectangle GetTextBoundsF(void) const; + + Tizen::Graphics::Rectangle GetTextBounds(void) const; + + virtual result CutText(void); + + virtual result SetLineSpacing(int linePixelGap); + + virtual result SetLineSpacing(float linePixelGap); + + int GetLineSpacing() const; + + float GetLineSpacingF() const; + + Tizen::Ui::Animations::VisualElementAnimation* CreateAnimationN(Tizen::Ui::Animations::VisualElement& source); + + virtual bool IsGuideTextActivated(void) const; + virtual void DrawText(void); + virtual bool IsTextBlockedInTokenEdit(void) const; + + virtual bool OnFocusGained(void); + virtual bool OnFocusLost(void); + + virtual result SetFlexBounds(const Tizen::Graphics::FloatRectangle& bounds); + virtual result SetTextSize(const int size); + virtual result SetTextSize(const float size); + + // Touch callbacks + 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 void OnInputConnectionTextCommitted(InputConnection& source, const Tizen::Base::String& committedText); + virtual void DeleteSurroundingText(InputConnection& source, int offset, int charCount); + virtual void OnTextCommitted(const Tizen::Base::String& commitText); + virtual void OnSurroundingTextDeleted(int offset, int charCount); + + virtual bool OnTapGestureDetected(void); + virtual bool OnLongPressGestureDetected(void); + + virtual void OnVisualElementAnimationFinished(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, bool completedNormally); + virtual void OnVisualElementAnimationRepeated(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, long currentRepeatCount){} + virtual void OnVisualElementAnimationStarted(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target){} + virtual void OnTickOccurred(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, const Tizen::Ui::Variant& currentValue); + + void OnBoundsChanged(void); + + virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer); + virtual result ChangeLayout(_ControlOrientation orientation); + virtual void ResetTextBounds(void); + virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo); + + Tizen::Graphics::FloatRectangle GetTitleTextRect(void) const; + String GetTextAccessibilityElementText(void) const; + void RefreshAccessibilityElements(void); + result AddChildAccessibilityElements(void); + void RemoveChildAccessibilityElements(void); + result AppendTokenAccessibilityElement(void); + result InsertTokenAccessibilityElementAt(int index); + void RemoveTokenAccessibilityElementAt(int index); + result UpdateTokenAccessibilityBounds(void); + result UpdateTitleAccessibilityBounds(const FloatRectangle& titleBounds); + + //Accessibility callbacks + bool OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element); + bool OnAccessibilityFocusOut(const _AccessibilityContainer& control, const _AccessibilityElement& element); + bool OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element); + + result ScrollToFocusedToken(void); + result AttachCursorToToken(void); + result DetachCursorFromToken(void); + void ExitTokenEditingMode(void); + void SetDrawFocusState(bool focusState); + 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 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); + result ProcessTokeningByTouchEvent(const _Control& source, const _TouchInfo& touchinfo); + result SetTokenBoundsByTouchInfo(const _TouchInfo& touchinfo); + result RecalculateTokenBounds(float position); + result CheckTokenScrolling(bool scrollToCursorPosition = false); + result SetTokenVisualElementBounds(int index, const Tizen::Graphics::FloatRectangle& bounds); + int CalculateVisibleTokenCount(void); + result InitializeTitleText(void); + bool CheckCopyPastePopupShowStatus(void); + result ChangeInternalLayout(_ControlOrientation orientation); + float GetMaxTextHeight(void); + result ScrollToFocusedTokenAccessibilityElement(const _AccessibilityElement& element); + result ScrollToTitleAccessibilityElement(void); + +private: + Tizen::Ui::Controls::_TokenEdit* __pTokenEdit; + + Tizen::Base::Collection::LinkedList* __pTokenList; + + Tizen::Base::String __delimiter; + + Tizen::Graphics::Bitmap* __pReplacedTokenBgNormalBitmap; + Tizen::Graphics::Bitmap* __pReplacedTokenBgSelectedBitmap; + Tizen::Graphics::Bitmap* __pReplacedTokenBgHighlightedBitmap; + Tizen::Graphics::Bitmap* __pReplacedTokenBgDisabledBitmap; + Tizen::Graphics::Bitmap* __pTokenBgNormalEffectBitmap; + Tizen::Graphics::Bitmap* __pTokenBgSelectedEffectBitmap; + Tizen::Graphics::Bitmap* __pTokenBgHighlightedEffectBitmap; + + int __pressedTokenIndex; + + bool __isEditingToken; + + int __editingTokenIndex; + + Tizen::Graphics::FloatRectangle __clientRect; + Tizen::Graphics::FloatRectangle __initTextRect; + + bool __isEditModeEnabled; + + Tizen::Ui::Animations::_VisualElement* __pTitleTextVisualElement; + + Tizen::Ui::Animations::_VisualElement* __pFocusRingVisualElement; + + Tizen::Graphics::_Text::TextObject* __pTitleTextObject; + + Tizen::Graphics::FloatRectangle __titleTextRect; + + bool __isTokenEditingFinished; + + float __prevScrollValue; + + float __scrollValue; + + bool __isTokenScrolling; + + bool __isNeedToScroll; + + float __maxScrollValue; + + bool __autoShrink; + + Tizen::Base::String __titleText; + + bool __isPopupVisible; + + bool __isLongPressed; + + float __lineSpacing; + + int __animatingIndex; + + int __lastTokenIndex; + + const Tizen::Ui::Animations::IVisualElementAnimationTimingFunction* __pTimingFunction; + + Tizen::Graphics::FloatRectangle __titleTextRectForScroll; + + float __previousTitleWidth; + + bool __isTokenEditPresenterInitialized; + + bool __isFocus; + + int __previousCursorPosition; + + bool __isScrollValueChanged; + + int __lineAdded; + + bool __isScrollValueModified; + + bool __isTouchMoveInProgress; + + bool __isTitleSliding; + + Tizen::Graphics::FloatPoint __touchPressInfo; + + int __editContentFontSize; + + int __trackTokenIndex; + + bool __isAnimationInProgress; + + static const int ANIMATION_DURATION_BOUNDS = 167; + + static const int ANIMATION_DURATION_OPACITY = 83; + + int __focusOutIndex; + + Tizen::Base::Collection::LinkedListT< _AccessibilityElement* > __accessibilityElements; + + int __focusedTokenIndex; + + bool __drawFocusState; + + bool __accessibilityFocusIn; + + int __transactionId; + + bool __isDestroyed; + +}; // _TokenEditPresenter + +}}} // Tizen::Ui::Controls + +#endif // _FUICTRL_INTERNAL_TOKEN_EDIT_PRESENTER_H_ diff --git a/src/ui/inc/FUiCtrl_Toolbar.h b/src/ui/inc/FUiCtrl_Toolbar.h new file mode 100644 index 0000000..9f97889 --- /dev/null +++ b/src/ui/inc/FUiCtrl_Toolbar.h @@ -0,0 +1,557 @@ +// +// 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_Toolbar.h + * @brief This is the header file for the _Toolbar class. + * + * This header file contains the declarations of the %_Toolbar class. + */ + +#ifndef _FUI_CTRL_INTERNAL_TOOLBAR_H_ +#define _FUI_CTRL_INTERNAL_TOOLBAR_H_ + +#include +#include +#include +#include "FUi_Control.h" +#include "FUi_ITouchLongPressGestureEventListener.h" +#include "FUi_ITouchFlickGestureEventListener.h" +#include "FUi_ITouchEventListener.h" +#include "FUiCtrl_Animation.h" +#include "FUiCtrl_Button.h" +#include "FUiCtrl_Label.h" + +namespace Tizen { namespace Ui +{ +class _TouchLongPressGestureDetector; +}} + +namespace Tizen { namespace Ui +{ +class _AccessibilityElement; +class _IAccessibilityListener; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _ToolbarPresenter; +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 TAB_ITEM_MAX = 15; +const int SEGMENTED_ITEM_MAX = 4; + +enum ToolbarStyle +{ + TOOLBAR_TITLE = 0, + TOOLBAR_HEADER_SEGMENTED, + TOOLBAR_HEADER_SEGMENTED_WITH_TITLE, + TOOLBAR_TAB, + TOOLBAR_TAB_WITH_TITLE, + TOOLBAR_TAB_LARGE, + TOOLBAR_SEGMENTED, + TOOLBAR_TEXT, + TOOLBAR_ICON, + TOOLBAR_ICON_TEXT, + TOOLBAR_SOFTKEY, + TOOLBAR_COMMAND +}; + +enum ToolbarButton +{ + LEFT_BUTTON = 0, + RIGHT_BUTTON, + MIDDLE_BUTTON, + BUTTON_MAX +}; + +enum ButtonType +{ + TOOLBAR_BUTTON = 0, + TOOLBAR_ITEM +}; + +enum ToolbarAnimationPosition +{ + TOOLBAR_ANIMATION_POSITION_TITLE = 0, + TOOLBAR_ANIMATION_POSITION_BUTTON_LEFT, + TOOLBAR_ANIMATION_POSITION_BUTTON_RIGHT, + TOOLBAR_ANIMATION_POSITION_MAX +}; + +/** + * @class _Toolbar + * @brief _Toolbar class is the core class of Header, Footer classes + * @since 2.0 + */ +class _OSP_EXPORT_ _Toolbar + : public Tizen::Ui::_Control + , public Tizen::Ui::_ITouchLongPressGestureEventListener + , public Tizen::Ui::Controls::_IAnimationEventListener + , virtual public Tizen::Base::Runtime::IEventListener + , virtual public Tizen::Ui::_IUiEventListener + , virtual public Tizen::Ui::_IUiEventPreviewer + , virtual public Tizen::Ui::_ITouchGestureEventListener + , virtual public Tizen::Ui::_ITouchFlickGestureEventListener +{ + DECLARE_CLASS_BEGIN(_Toolbar, _Control); + DECLARE_PROPERTY("color", GetPropertyColor, SetPropertyColor); + DECLARE_PROPERTY("descriptionText", GetPropertyDescriptionText, SetPropertyDescriptionText); + DECLARE_PROPERTY("descriptionTextColor", GetPropertyDescriptionTextColor, SetPropertyDescriptionTextColor); + DECLARE_PROPERTY("titleText", GetPropertyTitleText, SetPropertyTitleText); + DECLARE_PROPERTY("titleTextColor", GetPropertyTitleTextColor, SetPropertyTitleTextColor); + DECLARE_PROPERTY("disabledButtonColor", GetPropertyDisabledButtonColor, SetPropertyDisabledButtonColor); + DECLARE_PROPERTY("disabledButtonTextColor", GetPropertyDisabledButtonTextColor, SetPropertyDisabledButtonTextColor); + DECLARE_PROPERTY("highlightedButtonColor", GetPropertyHighlightedButtonColor, SetPropertyHighlightedButtonColor); + DECLARE_PROPERTY("highlightedButtonTextColor", GetPropertyHighlightedButtonTextColor, SetPropertyHighlightedButtonTextColor); + DECLARE_PROPERTY("normalButtonColor", GetPropertyNormalButtonColor, SetPropertyNormalButtonColor); + DECLARE_PROPERTY("normalButtonTextColor", GetPropertyNormalButtonTextColor, SetPropertyNormalButtonTextColor); + DECLARE_PROPERTY("pressedButtonColor", GetPropertyPressedButtonColor, SetPropertyPressedButtonColor); + DECLARE_PROPERTY("pressedButtonTextColor", GetPropertyPressedButtonTextColor, SetPropertyPressedButtonTextColor); + DECLARE_PROPERTY("disabledItemColor", GetPropertyDisabledItemColor, SetPropertyDisabledItemColor); + DECLARE_PROPERTY("disabledItemTextColor", GetPropertyDisabledItemTextColor, SetPropertyDisabledItemTextColor); + DECLARE_PROPERTY("highlightedItemColor", GetPropertyHighlightedItemColor, SetPropertyHighlightedItemColor); + DECLARE_PROPERTY("highlightedItemTextColor", GetPropertyHighlightedItemTextColor, SetPropertyHighlightedItemTextColor); + DECLARE_PROPERTY("normalItemColor", GetPropertyNormalItemColor, SetPropertyNormalItemColor); + DECLARE_PROPERTY("normalItemTextColor", GetPropertyNormalItemTextColor, SetPropertyNormalItemTextColor); + DECLARE_PROPERTY("pressedItemColor", GetPropertyPressedItemColor, SetPropertyPressedItemColor); + DECLARE_PROPERTY("pressedItemTextColor", GetPropertyPressedItemTextColor, SetPropertyPressedItemTextColor); + DECLARE_PROPERTY("selectedItemColor", GetPropertySelectedItemColor, SetPropertySelectedItemColor); + DECLARE_PROPERTY("selectedItemTextColor", GetPropertySelectedItemTextColor, SetPropertySelectedItemTextColor); + DECLARE_CLASS_END(); + + + result SetPropertyColor(const Variant& color); + Variant GetPropertyColor(void) const; + result SetPropertyDescriptionText(const Variant& text); + Variant GetPropertyDescriptionText(void) const; + result SetPropertyDescriptionTextColor(const Variant& color); + Variant GetPropertyDescriptionTextColor(void) const; + result SetPropertyTitleText(const Variant& text); + Variant GetPropertyTitleText(void) const; + result SetPropertyTitleTextColor(const Variant& color); + Variant GetPropertyTitleTextColor(void) const; + result SetPropertyDisabledButtonColor(const Variant& color); + Variant GetPropertyDisabledButtonColor(void) const; + result SetPropertyDisabledButtonTextColor(const Variant& color); + Variant GetPropertyDisabledButtonTextColor(void) const; + result SetPropertyHighlightedButtonColor(const Variant& color); + Variant GetPropertyHighlightedButtonColor(void) const; + result SetPropertyHighlightedButtonTextColor(const Variant& color); + Variant GetPropertyHighlightedButtonTextColor(void) const; + result SetPropertyNormalButtonColor(const Variant& color); + Variant GetPropertyNormalButtonColor(void) const; + result SetPropertyNormalButtonTextColor(const Variant& color); + Variant GetPropertyNormalButtonTextColor(void) const; + result SetPropertyPressedButtonColor(const Variant& color); + Variant GetPropertyPressedButtonColor(void) const; + result SetPropertyPressedButtonTextColor(const Variant& color); + Variant GetPropertyPressedButtonTextColor(void) const; + result SetPropertyDisabledItemColor(const Variant& color); + Variant GetPropertyDisabledItemColor(void) const; + result SetPropertyDisabledItemTextColor(const Variant& color); + Variant GetPropertyDisabledItemTextColor(void) const; + result SetPropertyHighlightedItemColor(const Variant& color); + Variant GetPropertyHighlightedItemColor(void) const; + result SetPropertyHighlightedItemTextColor(const Variant& color); + Variant GetPropertyHighlightedItemTextColor(void) const; + result SetPropertyNormalItemColor(const Variant& color); + Variant GetPropertyNormalItemColor(void) const; + result SetPropertyNormalItemTextColor(const Variant& color); + Variant GetPropertyNormalItemTextColor(void) const; + result SetPropertyPressedItemColor(const Variant& color); + Variant GetPropertyPressedItemColor(void) const; + result SetPropertyPressedItemTextColor(const Variant& color); + Variant GetPropertyPressedItemTextColor(void) const; + result SetPropertySelectedItemColor(const Variant& color); + Variant GetPropertySelectedItemColor(void) const; + result SetPropertySelectedItemTextColor(const Variant& color); + Variant GetPropertySelectedItemTextColor(void) const; + + +public: + _Toolbar(void); + + virtual ~_Toolbar(void); + + static _Toolbar* CreateToolbarN(bool header); + + virtual result Construct(void); + + result AddItem(_Button* pButton); + + Tizen::Graphics::Bitmap* GetBackgroundBitmap(void) const; + + Tizen::Graphics::Bitmap* GetBackgroundEffectBitmap(void) const; + + _Button* GetButton(ToolbarButton position) const; + + _Label* GetTitleBadgeIcon(void) const; + + Tizen::Graphics::Color GetButtonColor(_ButtonStatus status) const; + + _ButtonStatus GetButtonStatus(ToolbarButton position) const; + + Tizen::Graphics::Color GetButtonTextColor(_ButtonStatus status) const; + + Tizen::Graphics::Color GetColor(void) const; + + Tizen::Base::String GetDescriptionText(void) const; + + Tizen::Graphics::Color GetDescriptionTextColor(void) const; + + int GetFirstEnabledItemIndex(void) const; + + _Button* GetItem(int itemIndex) const; + + Tizen::Graphics::Color GetItemColor(_ButtonStatus status) const; + + int GetItemCount(void) const; + + int GetItemIndexFromPosition(const Tizen::Graphics::FloatPoint& point) const; + + result GetItemStatus(int itemIndex, _ButtonStatus& status) const; // Temporarily uses GetItem() instead of this method + + Tizen::Graphics::Color GetItemTextColor(_ButtonStatus status) const; + + int GetSelectedItemIndex(void) const; + + ToolbarStyle GetStyle(void) const; + + Tizen::Graphics::Bitmap* GetTitleIcon(void) const; + + Tizen::Base::String GetTitleText(void) const; + + Tizen::Graphics::Color GetTitleTextColor(void) const; + + HorizontalAlignment GetTitleTextHorizontalAlignment(void) const; + + bool IsInitialDraw(void) const; + + bool IsTabEditModeEnabled(void) const; + + bool IsTransparent(void) const; + + AnimationStatus GetWaitingAnimationStatus(ToolbarAnimationPosition animationPos) const; + + result InsertItemAt(int itemIndex, _Button* pButton); + + bool IsButtonSet(ToolbarButton position) const; + + bool IsUserBackgroundBitmap() const; + + result MoveItem(const int srcIndex, const int destIndex); + + result PauseWaitingAnimation(ToolbarAnimationPosition animationPos); + + result PlayWaitingAnimation(ToolbarAnimationPosition animationPos); + + result RemoveAllButtons(void); + + result RemoveAllItems(void); + + result RemoveButtonAt(ToolbarButton position); + + result RemoveItemAt(int itemIndex); + + result SetBackgroundBitmap(const Tizen::Graphics::Bitmap& bitmap); + + result SetButton(ToolbarButton position, _Button* pButton); + + 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); + + result SetButtonBadgeIcon(ToolbarButton position, const Tizen::Graphics::Bitmap* pBadgeIcon); + + result SetButtonNumberedBadgeIcon(ToolbarButton position, int number); + + result SetColor(const Tizen::Graphics::Color& color); + + result SetTranslucentColor(const Tizen::Graphics::Color& color); + + result SetDescriptionText(const Tizen::Base::String& text); + + result SetDescriptionTextColor(const Tizen::Graphics::Color& color); + + result SetItemAt(int itemIndex, const _Button* pButton); + + result SetItemBadgeIcon(int itemIndex, const Tizen::Graphics::Bitmap* pBadgeIcon); + + result SetItemColor(_ButtonStatus status, const Tizen::Graphics::Color& color); + + result SetItemEnabled(int itemIndex, bool enabled); + + result SetItemNumberedBadgeIcon(int itemIndex, int number); + + result SetItemSelected(int itemIndex, bool fire = false, bool adjust = true); + + result SetItemHighlighted(int itemIndex, bool fire = false, bool adjust = true); + + result SetItemTextColor(_ButtonStatus status, const Tizen::Graphics::Color& color); + + result SetStyle(ToolbarStyle style); + + result SetTabEditModeEnabled(bool enable); + + result SetTitleIcon(const Tizen::Graphics::Bitmap& bitmap); + + result SetTitleText(const Tizen::Base::String& text, HorizontalAlignment alignment = ALIGNMENT_LEFT); + + result SetTitleTextColor(const Tizen::Graphics::Color& color); + + result SetTransparent(bool transparent); + + result SetWaitingAnimationPosition(ToolbarAnimationPosition animationPos, float x, float y); + + result StopWaitingAnimation(ToolbarAnimationPosition animationPos); + + result InitializeLongPressGesture(void); + + result InitializeFlickGesture(void); + + virtual void OnAnimationStopped(const Tizen::Ui::_Control& source); + + virtual void OnBoundsChanged(void); + + virtual void OnChangeLayout(_ControlOrientation orientationStatus); + + virtual void OnDraw(void); + + virtual bool OnLongPressGestureDetected(_TouchLongPressGestureDetector& gesture); + + virtual bool OnLongPressGestureCanceled(_TouchLongPressGestureDetector& gesture); + + virtual bool OnFlickGestureDetected(_TouchFlickGestureDetector& gesture); + + virtual bool OnFlickGestureCanceled(_TouchFlickGestureDetector& gesture); + + 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 bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo); + + virtual bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo); + + void AddActionEventListener(const Tizen::Ui::Controls::_IActionEventListener& listener); + + void RemoveActionEventListener(const Tizen::Ui::Controls::_IActionEventListener& listener); + + void SetBackEventListener(const Tizen::Ui::Controls::_IActionEventListener& listener, int actionId); + + void SetMenuEventListener(const Tizen::Ui::Controls::_IActionEventListener& listener, int actionId); + + virtual result OnAttachedToMainTree(void); + + virtual void OnFontChanged(Tizen::Graphics::Font* pFont); + + virtual void OnFontInfoRequested(unsigned long& style, int& size); + + virtual void OnAncestorVisibleStateChanged(const _Control& control); + + virtual void OnDrawFocus(void); + + virtual void OnChildControlFocusMoved(const _Control& control); + + virtual bool IsChildControlFocusManage(void) const; + + virtual void OnFocusableStateChanged(bool focusalbeState); + + virtual void OnFocusModeStateChanged(void); + + virtual bool OnFocusGained(const _Control& source); + + virtual bool OnFocusLost(const _Control& source); + + Tizen::Graphics::Rectangle GetButtonBounds(ToolbarButton position) const; + + Tizen::Graphics::FloatRectangle GetButtonBoundsF(ToolbarButton position) const; + + result SetTitleBadgeIcon(const Tizen::Graphics::Bitmap* pBadgeIcon); + + result SetTitleNumberedBadgeIcon(int number); + + result RealignItem(_Button* pButton, float textExtentSize); + + result RealignButtonItem(_Button* pButton); + + result RearrangeItems(void); + + bool IsHeader(void); + + _ToolbarPresenter* GetPresenter(void) const; + +protected: + result SetPresenter(const _ToolbarPresenter& toolbarPresenter); + + +private: + _Toolbar(const _Toolbar& value); + + _Toolbar& operator =(const _Toolbar& value); + + result ApplyUserGUI(ButtonType buttonType, _Button* pButton); + + int CalculateMinimumToolbarWidth(void); + + float CalculateMinimumToolbarWidthF(void); + + result RearrangeHeaderSegmentedItems(void); + + result RearrangeFooterSegmentedItems(void); + + result RearrangeTabItmes(void); + + result RearrangeButtonItems(void); + + result SetAnimation(ToolbarAnimationPosition animationPos); + + result SetColorReplacedBitmap(_Button* pButton, const _ButtonStatus status, const Tizen::Graphics::Color& color, const Tizen::Graphics::Bitmap* pBitmap); + + void AddAccessibilityElement(ToolbarButton position, _Button* pButton); + + void AddAccessibilityElement(_Button* pButton); + + result AdjustToolbarBounds(void); + + result Initialize(bool header); + + result InitToolbarColor(void); + + result OnHeaderFocusGained(const _Control& source); + + result OnFooterFocusGained(const _Control& source); + +private: + bool __header; + + _ToolbarPresenter* __pToolbarPresenter; + + Tizen::Ui::Controls::_IActionEventListener* __pActionEventListener; + + Tizen::Ui::Controls::_IActionEventListener* __pBackEventListener; + + Tizen::Ui::Controls::_IActionEventListener* __pMenuEventListener; + + _TouchLongPressGestureDetector* __pLongPressGesture; + + _TouchFlickGestureDetector* __pFlickGesture; + + Tizen::Graphics::Bitmap* __pToolbarBackgroundBitmap; + + Tizen::Graphics::Bitmap* __pToolbarBackgroundEffectBitmap; + + Tizen::Graphics::Bitmap* __pTitleIcon; + + Tizen::Graphics::Color __backgroundColor; + + Tizen::Base::String __titleText; + + Tizen::Base::String __descriptionText; + + Tizen::Graphics::Color __descriptionTextColor; + + Tizen::Graphics::Color __transDescriptionTextColor; + + Tizen::Graphics::Color __titleTextColor; + + Tizen::Graphics::Color __transTitleTextColor; + + Tizen::Graphics::Color __itemBackgroundColor[TOOLBAR_ITEM_MAX_STATE_COUNT]; + + Tizen::Graphics::Color __itemTextColor[TOOLBAR_ITEM_MAX_STATE_COUNT]; + + Tizen::Graphics::Color __itemTransBackgroundColor[TOOLBAR_ITEM_MAX_STATE_COUNT]; + + Tizen::Graphics::Color __itemTransTextColor[TOOLBAR_ITEM_MAX_STATE_COUNT]; + + bool __isItemBgColorSetByUser[TOOLBAR_ITEM_MAX_STATE_COUNT]; + + bool __isItemTextColorSetByUser[TOOLBAR_ITEM_MAX_STATE_COUNT]; + + Tizen::Graphics::Color __buttonBackgroundColor[TOOLBAR_BUTTON_MAX_STATE_COUNT]; + + Tizen::Graphics::Color __buttonTextColor[TOOLBAR_BUTTON_MAX_STATE_COUNT]; + + Tizen::Graphics::Color __buttonTransBackgroundColor[TOOLBAR_BUTTON_MAX_STATE_COUNT]; + + Tizen::Graphics::Color __buttonTransTextColor[TOOLBAR_BUTTON_MAX_STATE_COUNT]; + + bool __isButtonBgColorSetByUser[TOOLBAR_BUTTON_MAX_STATE_COUNT]; + + bool __isButtonTextColorSetByUser[TOOLBAR_BUTTON_MAX_STATE_COUNT]; + + HorizontalAlignment __titleTextAlignment; + + std::vector<_Button*> __pItems; + + _Button* __pButtonItems[BUTTON_MAX]; + + _Label* __pTitleBadgeIcon; + + _Animation* __pAnimation[TOOLBAR_ANIMATION_POSITION_MAX]; + + Tizen::Base::Collection::ArrayList* __pAnimationFrameList[TOOLBAR_ANIMATION_POSITION_MAX]; + + int __backActionId; + + int __menuActionId; + + int __itemCount; + + ToolbarStyle __style; + + bool __transparent; + + bool __isUserBackgroundBitmap; + + int __highlightedItemIndex; + + int __lastHighlightedItemIndex; + + bool __highlighted; + + bool __isEnterKeyPressed; + + bool __isAttachedToMainTree; + + Tizen::Graphics::FloatRectangle __titleTextArea; + + Tizen::Graphics::FloatRectangle __itemArea; + + Tizen::Ui::_AccessibilityElement* __pTitleTextElement; + + _IAccessibilityListener* __pAccessibilityListener; + + static const float SENSITIVE = 0.08f; +}; + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_TOOLBAR_H_ diff --git a/src/ui/inc/FUiCtrl_ToolbarModel.h b/src/ui/inc/FUiCtrl_ToolbarModel.h new file mode 100644 index 0000000..d3078ef --- /dev/null +++ b/src/ui/inc/FUiCtrl_ToolbarModel.h @@ -0,0 +1,66 @@ +// +// 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_ToolbarModel.h + * @brief This is the header file for the _ToolbarModel class. + * + * This header file contains the declarations of the %_ToolbarModel class. + */ + +#ifndef _FUI_CTRL_INTERNAL_TOOLBAR_MODEL_H_ +#define _FUI_CTRL_INTERNAL_TOOLBAR_MODEL_H_ + +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @class _ToolbarModel + * @brief The model class of _Toolbar class + * @since 2.0 + */ +class _ToolbarModel + : public Tizen::Base::Object +{ + +public: + _ToolbarModel(void); + + virtual ~_ToolbarModel(void); + + result Construct(void); + + int GetSelectedItemIndex(void) const; + + result SetSelectedItemIndex(int itemIndex); + + +private: + _ToolbarModel(const _ToolbarModel& value); + + _ToolbarModel& operator =(const _ToolbarModel& value); + + +private: + int __selectedIndex; + +}; + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_TOOLBAR_MODEL_H_ diff --git a/src/ui/inc/FUiCtrl_ToolbarPresenter.h b/src/ui/inc/FUiCtrl_ToolbarPresenter.h new file mode 100644 index 0000000..d4e7b1a --- /dev/null +++ b/src/ui/inc/FUiCtrl_ToolbarPresenter.h @@ -0,0 +1,251 @@ +// +// 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_ToolbarPresenter.h + * @brief This is the header file fo r the _ToolbarPresenter class. + * + * This header file contains the declarations of the %_ToolbarPresenter class. + */ + +#ifndef _FUI_CTRL_INTERNAL_TOOLBAR_PRESENTER_H_ +#define _FUI_CTRL_INTERNAL_TOOLBAR_PRESENTER_H_ + +#include +#include +#include +#include "FUiCtrl_FlickAnimation.h" +#include "FUiCtrl_Toolbar.h" + +namespace Tizen { namespace Ui { namespace Animations { + class VisualElementAnimation; +}}} // Tizen::Ui::Animations + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _Toolbar; +class _ToolbarModel; +class _Label; +class _FlickAnimation; + +/** + * @class _ToolbarPresenter + * @brief The presenter class of _Toolbar class + * @since 2.0 + */ +class _ToolbarPresenter + : public Tizen::Base::Object + , public Tizen::Base::Runtime::ITimerEventListener + , public Tizen::Ui::Animations::IVisualElementAnimationStatusEventListener + , virtual public Tizen::Base::Runtime::IEventListener +{ +public: + _ToolbarPresenter(void); + + virtual ~_ToolbarPresenter(void); + + result Construct(const _Toolbar& toolbar); + + result Install(void); + + result Draw(void); + + void DrawBackground(void); + + void DrawDivider(void); + + void DrawDescriptionText(void); + + void DrawEditItem(const Tizen::Graphics::FloatPoint& point); + + void DrawDividerLine(const Tizen::Graphics::FloatPoint& point, Tizen::Graphics::Canvas* pCanvas); + + void DrawItems(void); + + result DrawTitleText(Tizen::Graphics::Canvas* pCanvas); + + int GetSelectedItemIndex(void) const; + + bool IsInitialDraw(void) const; + + bool IsTabEditModeEnabled(void) const; + + result SetDescriptionText(const Tizen::Base::String& description); + + result SetItemSelected(int itemIndex, bool adjust); + + result SetInitialDrawState(bool state); + + result SetTabEditModeEnabled(bool enable); + + result SetTitleText(const Tizen::Base::String& title, HorizontalAlignment alignment); + + result SetUsableAreaBounds(const Tizen::Graphics::FloatRectangle& rect); + + bool OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo); + + bool OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo); + + bool OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo); + + bool OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo); + + void OnChangeLayout(Tizen::Ui::_ControlOrientation orientation); + + bool OnLongPressGestureDetected(void); + + virtual bool OnFlickGestureDetected(_TouchFlickGestureDetector& gesture); + + virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer); + + virtual void OnDrawFocus(void); + + virtual void OnChildControlFocusMoved(const _Control& control); + + virtual bool IsChildControlFocusManage(void) const; + + virtual void OnFocusableStateChanged(bool focusalbeState); + + virtual void OnFocusModeStateChanged(void); + + virtual bool OnFocusGained(const _Control& source); + + virtual bool OnFocusLost(const _Control& source); + + result TimerForTitleSlideInit(void); + + result TimerForTitleSlideStart(void); + + result TimerForTitleSlideTimeout(void); + + Tizen::Graphics::FloatRectangle GetTitleTextBoundsF(void) const; + + Tizen::Graphics::FloatRectangle GetDescriptionBoundsF(void) const; + + void OnFontChanged(Tizen::Graphics::Font* pFont); + void OnFontInfoRequested(unsigned long& style, int& size); + void OnFontInfoRequested(unsigned long& style, float& size); + void OnAncestorVisibleStateChanged(const _Control& control); + void SetFontInfo(unsigned long style, float size); + + result AdjustItemPositionX(float distance); + void SetItemFit(int); + int GetFirstLoadedItemIndex(void); + +protected: + result _SetModel(const _ToolbarModel& toolbarModel); + +private: + void StartFlickAnimation(void); + result StartFlickAnimationTimer(void); + result ResetFlickAnimationTimer(void); + + void SetFirstLoadedItemIndex(void); + void SetLastLoadedItemIndex(void); + + float CalculateProgress(float timeProgress) const; + + void DrawTitleTextDimBitmap(void); + + 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: + _Toolbar* __pToolbar; + + _ToolbarModel* __pToolbarModel; + + bool __initialDraw; + + bool __tabEditEnabled; + + bool __beingEdited; + + bool __touchInitiatedInToolbar; + + int __editItemIndex; + + int __pressedItemIndex; + + _ButtonStatus __initialPressesItemStatus; + + _Label* __pEditItem; + + Tizen::Graphics::Bitmap* __pTitleBackgroundBitmap; + + Tizen::Base::Runtime::Timer* __pTitleSlideTimer; + + Tizen::Base::Runtime::Timer* __pFlickAnimationTimer; + + Tizen::Graphics::FloatRectangle __titleRect; + + Tizen::Graphics::FloatRectangle __descriptionRect; + + Tizen::Graphics::FloatRectangle __toolbarUsableArea; + + Tizen::Graphics::FloatPoint __currentTouchPosition; + + Tizen::Base::String __titleText; + + Tizen::Graphics::Font* __pTitleTextFont; + + Tizen::Graphics::Font* __pTextFont; + + Tizen::Graphics::_Text::TextObject* __pDescriptionTextObject; + + Tizen::Graphics::_Text::TextObject* __pTitleTextObject; + + Tizen::Ui::Animations::VisualElement* __pDividerVe; + + _FlickAnimation __flickAnimation; + + static const int FLICK_ANIMATION_TIMER_PERIOD = 3; + static const int FLICK_ANIMATION_FPS_TAB = 30; + static const int FLICK_ANIMATION_SENSITIVITY_TAB = 30; + static const int FLICK_ANIMATION_COUNT = 50; + + + float __moveDistance; + float __flickMove; + float __flickDistance; + int __flickFlag; + int __firstLoadedItemIndex; + int __lastLoadedItemIndex; + bool __tabSlideLeft; + bool __tabSlideRight; + + Tizen::Graphics::FloatDimension __portraitSize; + Tizen::Graphics::FloatDimension __landscapeSize; + + unsigned long __fontStyle; + float __fontSize; + bool __tabMoved; + + bool __titlePressed; + bool __titleSliding; + +private: + _ToolbarPresenter(const _ToolbarPresenter& value); + + _ToolbarPresenter& operator =(const _ToolbarPresenter& value); + +}; + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_TOOLBAR_PRESENTER_H_ diff --git a/src/ui/inc/FUiCtrl_UiFastScrollEvent.h b/src/ui/inc/FUiCtrl_UiFastScrollEvent.h new file mode 100644 index 0000000..2ca29d4 --- /dev/null +++ b/src/ui/inc/FUiCtrl_UiFastScrollEvent.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 FUiCtrl_UiFastScrollEvent.h + * @brief This is the header file for _UiFastScrollEvent class. + * + * This header file contains declaration of _UiFastScrollEvent class. + * The ItemEvent class can call listener's method. So, when event occurred, + * application can handle it appropriately. + * + */ +#ifndef _FUICTRL_INTERNAL_UI_FASTSCROLL_EVENT_H_ +#define _FUICTRL_INTERNAL_UI_FASTSCROLL_EVENT_H_ + +#include +#include + +namespace Tizen { namespace Ui +{ +class _Control; +} } + +namespace Tizen {namespace Ui { namespace Controls +{ +/** +* @class _UiFastScrollEvent +* @brief This class handles a slidable event. It is inherited from Event class. +* +*/ +class _UiFastScrollEvent + : public Tizen::Base::Runtime::_Event +{ +// Lifecycle +public: + /** + * This is the default class constructor. + * + * @remarks After creating an instance of this class, you must explicitly call one of + * construction methods to initialize the instance. + * + */ + _UiFastScrollEvent(void); + + /** + * This is the default class destructor. + * + */ + virtual ~_UiFastScrollEvent(void); + + /** + * This method initializes this instance. This method should be called + * after this instance is constructed. + * + * @return The method returns error code. + * @param[in] source A pointer to the Object instance which contains this instance. + * @exception E_SUCCESS - This method is successful. + * @exception E_ARG_NULL - The input source is null. + */ + result Construct(const Tizen::Ui::_Control& source); + +// Accessors +public: + /** + * This method returns the owner of this event. + * + * @return See the comment above. + */ + const Tizen::Ui::_Control* GetSource(void) const; + +// Operations +protected: + + /** + * This method checks the arg and finds out the type of event. After that this method calls appopriate + * pListener's method. + * + * @return This method returns a result code. + * @param[in] pListener It is a event listener related to this item event. + * @param[in] arg It is an argument-like instance of item event retransmitted to the listener's method + * as an argument. + * @exception E_SUCCESS - The method is successful. + * @exception E_ARG_NULL - The listener is null. + * @exception E_INVALID_ARG - The argument passed to a method contains an invalid value.@n + *   The pListener is not the instance of IItemEventListener class or + * the pItemEventArg is not the instance of _CustomItemEventArg class. + * + */ + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + +//Attributess +private: + Tizen::Ui::_Control* __pSource; +}; +}}}; + +#endif diff --git a/src/ui/inc/FUiCtrl_UiFastScrollEventArg.h b/src/ui/inc/FUiCtrl_UiFastScrollEventArg.h new file mode 100644 index 0000000..f021318 --- /dev/null +++ b/src/ui/inc/FUiCtrl_UiFastScrollEventArg.h @@ -0,0 +1,67 @@ +// +// 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_UiFastScrollEventArg.h + * @brief This is the header file for _UiFastScrollEventArg class. + * + * This header file contains declaration of _UiFastScrollEventArg class. + * + */ +#ifndef _FUICTRL_INTERNAL_UI_FASTSCROLL_EVENT_ARG_H_ +#define _FUICTRL_INTERNAL_UI_FASTSCROLL_EVENT_ARG_H_ + +// Includes +#include +#include +//#include "FUiCtrl_IUiFastScrollListener.h" +#include "FUiCtrl_IFastScrollListener.h" +#include "FUiCtrl_FastScrollIndex.h" + +namespace Tizen { namespace Ui +{ +class _Control; +} } + +namespace Tizen {namespace Ui { namespace Controls +{ + +/** + * @class _UiFastScrollEventArg + * @brief This class is used as the argument to item event listener. + * + * From this class, one can find out, the (event) source object, index and FastScroll event type. + */ +class _UiFastScrollEventArg + : public Tizen::Base::Runtime::IEventArg + , public Tizen::Base::Object +{ +public: + _UiFastScrollEventArg(const Tizen::Ui::_Control& source, const Tizen::Ui::Controls::_FastScrollIndex& index); + virtual ~_UiFastScrollEventArg(void); + Tizen::Ui::_Control* GetSource(void); + const Tizen::Ui::Controls::_FastScrollIndex& GetIndex(void); + +private: + Tizen::Ui::_Control* __pSource; + const Tizen::Ui::Controls::_FastScrollIndex& __index; +}; + + +} } } // Tizen::Ui::Controls + +#endif //_FUICTRL_INTERNAL_FASTSCROLL_BAR_EVENT_ARG_H_ diff --git a/src/ui/inc/FUiCtrl_UiIconListItemEvent.h b/src/ui/inc/FUiCtrl_UiIconListItemEvent.h new file mode 100644 index 0000000..8d675a2 --- /dev/null +++ b/src/ui/inc/FUiCtrl_UiIconListItemEvent.h @@ -0,0 +1,65 @@ +// +// 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_UiIconListItemEvent.h + * @brief This is the header file for _UiIconListItemEvent class. + * + * This header file contains declaration of _UiIconListItemEvent class. + * The _UiIconListItemEvent class can call listener's method. So, when event occurred, + * application can handle it appropriately. + * + */ + +#ifndef _FUI_CTRL_INTERNAL_UI_ICON_LIST_ITEM_EVENT_H_ +#define _FUI_CTRL_INTERNAL_UI_ICON_LIST_ITEM_EVENT_H_ + +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _IconListView; + +class _UiIconListItemEvent + : public Tizen::Base::Runtime::_Event +{ +// Lifecycle +public: + _UiIconListItemEvent(void); + + virtual ~_UiIconListItemEvent(void); + + result Construct(const _IconListView& source); + +// Accessors +public: + const _IconListView* GetSource(void) const; + +// Operations +protected: + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + +//Attributess +private: + _IconListView* __pSource; +}; // _UiIconListItemEvent + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_UI_ICON_LIST_ITEM_EVENT_H_ diff --git a/src/ui/inc/FUiCtrl_UiListViewItemEvent.h b/src/ui/inc/FUiCtrl_UiListViewItemEvent.h new file mode 100644 index 0000000..f0dde6b --- /dev/null +++ b/src/ui/inc/FUiCtrl_UiListViewItemEvent.h @@ -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 FUiCtrl_UiListViewItemEvent.h + * @brief This is the header file for the _UiListViewItemEvent class. + * + * This header file contains the declarations of the _UiListViewItemEvent class. + */ + +#ifndef _FUI_CTRL_INTERNAL_UI_LIST_VIEW_ITEM_EVENT_H_ +#define _FUI_CTRL_INTERNAL_UI_LIST_VIEW_ITEM_EVENT_H_ + +#include +#include +#include "FUi_Control.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _UiListViewItemEvent + : public Tizen::Base::Runtime::_Event +{ + +public: + _UiListViewItemEvent(void); + + virtual ~_UiListViewItemEvent(void); + + void SetSource(Tizen::Ui::_Control* pSource); // temporary code + +protected: + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + +private: + Tizen::Ui::_Control* __pSource; +}; // _UiListViewItemEvent + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_UI_LIST_VIEW_ITEM_EVENT_H_ diff --git a/src/ui/inc/FUiCtrl_UiListViewItemEventArg.h b/src/ui/inc/FUiCtrl_UiListViewItemEventArg.h new file mode 100644 index 0000000..8feadbe --- /dev/null +++ b/src/ui/inc/FUiCtrl_UiListViewItemEventArg.h @@ -0,0 +1,72 @@ +// +// 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_UiListViewItemEventArg.h + * @brief This is the header file for the _UiListViewItemEventArg class. + * + * This header file contains the declarations of the _UiListViewItemEventArg class. + */ + +#ifndef _FUI_CTRL_INTERNAL_LIST_VIEW_ITEM_EVENT_ARG_H_ +#define _FUI_CTRL_INTERNAL_LIST_VIEW_ITEM_EVENT_ARG_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Controls +{ + +enum ListViewItemEventNotifyType +{ + NOTIFY_TYPE_CONTEXTITEM_SELCTED = 0, + NOTIFY_TYPE_CONTEXTITEM_HIGHLIGHTED, +}; + +class _UiListViewItemEventArg + : public Tizen::Base::Runtime::IEventArg +{ + +public: + _UiListViewItemEventArg(int arg1, int arg2, int arg3, ListViewItemEventNotifyType type); + + virtual ~_UiListViewItemEventArg(void); + + int GetArg1(void) const; + + int GetArg2(void) const; + + int GetArg3(void) const; + + ListViewItemEventNotifyType GetNotifyType(void) const; + +private: + _UiListViewItemEventArg(const _UiListViewItemEventArg& rhs); + + _UiListViewItemEventArg& operator=(const _UiListViewItemEventArg& rhs); + +private: + int __arg1; // use by groupIndex + int __arg2; // use by itemIndex + int __arg3; // use by elementId + ListViewItemEventNotifyType __type; +}; // _UiListViewItemEventArg + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_LIST_VIEW_ITEM_EVENT_ARG_H_ diff --git a/src/ui/inc/FUiCtrl_UiScrollEvent.h b/src/ui/inc/FUiCtrl_UiScrollEvent.h new file mode 100644 index 0000000..ab96af2 --- /dev/null +++ b/src/ui/inc/FUiCtrl_UiScrollEvent.h @@ -0,0 +1,73 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiCtrl_UiScrollEvent.h + * @brief This is the header file for _UiScrollEvent class. + * + * This header file contains declaration of _UiScrollEvent class. + * The ItemEvent class can call listener's method. So, when event occurred, + * application can handle it appropriately. + * + */ + +#ifndef _FUI_CTRL_INTERNAL_SCROLL_EVENT_H_ +#define _FUI_CTRL_INTERNAL_SCROLL_EVENT_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui +{ +class _Control; +}} // Tizen::Ui + +namespace Tizen { namespace Ui { namespace Controls +{ +/** +* @class _UiScrollEvent +* @brief This class handles a scroll event. It is inherited from Event class. +* +*/ +class _UiScrollEvent + : public Tizen::Base::Runtime::_Event +{ +// Lifecycle +public: + _UiScrollEvent(void); + + virtual ~_UiScrollEvent(void); + + result Construct(const Tizen::Ui::_Control& source); + +// Accessors +public: + Tizen::Ui::_Control* GetSource(void) const; + +// Operations +protected: + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + +//Attributess +private: + Tizen::Ui::_Control* __pSource; +}; // _UiScrollEvent + +}}} //Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_SCROLL_EVENT_H_ diff --git a/src/ui/inc/FUiCtrl_UiScrollEventArg.h b/src/ui/inc/FUiCtrl_UiScrollEventArg.h new file mode 100644 index 0000000..4147e47 --- /dev/null +++ b/src/ui/inc/FUiCtrl_UiScrollEventArg.h @@ -0,0 +1,138 @@ +// +// 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_UiScrollEventArg.h + * @brief This is the header file for _UiScrollEventArg class. + * + * This header file contains declaration of _UiScrollEventArg class. + * + */ + +#ifndef _FUI_CTRL_INTERNAL_SCROLL_EVENT_ARG_H_ +#define _FUI_CTRL_INTERNAL_SCROLL_EVENT_ARG_H_ + +#include +#include +#include +#include +#include "FUiCtrl_IScrollEventListener.h" +#include "FUiCtrl_ScrollEventTypes.h" + +namespace Tizen { namespace Ui { namespace Controls +{ + +/** + * @class _UiScrollEventArg + * @brief This class is used as the argument to item event listener. + * + * From this class, one can find out, the (event) source object, index and Scroll event type. + */ +class _UiScrollEventArg + : public Tizen::Base::Runtime::IEventArg + , public Tizen::Base::Object +{ +// Lifecycle +public: + /** + * This is the class destructor. + * + */ + virtual ~_UiScrollEventArg(void); + + /** + * General getter for %_ScrollEventArg class object when fire OnScrollStopped event + * + * @param[in] source A pointer to the Object instance which contains this instance + */ + static _UiScrollEventArg* GetScrollEventArgN(const _Control& source); + + /** + * General getter for %_ScrollEventArg class object when fire OnScrollJumpToTop event + * + * @param[in] source A pointer to the Object instance which contains this instance + */ + static _UiScrollEventArg* GetScrollJumpToTopEventArgN(const _Control& source); + + /** + * General getter for %_ScrollEventArg class object when fire OnScrollPositionChanged event + * + * @param[in] source A pointer to the Object instance which contains this instance + * @param[in] scrollPosition A scroll position of the scroll + */ + static _UiScrollEventArg* GetScrollEventArgN(const _Control& source, float scrollPosition); + + /** + * General getter for %_ScrollEventArg class object when fire OnScrollEndReached event + * + * @param[in] source A pointer to the Object instance which contains this instance + * @param[in] scrollType A direction of the scroll + */ + static _UiScrollEventArg* GetScrollEventArgN(const _Control& source, ScrollEndEvent scrollType); + +// Access +public: + /** + * This method returns the type of firing event + * + * @return See the comment above. + */ + _ScrollEventType GetEventType(void) const; + + /** + * This method returns the object which the event initially occurred. + * + * @return The object which the event initially occurred. + */ + _Control* GetSource(void) const; + + /** + * This method returns the ItemStatus + * + * @return See the comment above. + */ + ScrollEndEvent GetScrollType(void) const; + + /** + * This method returns the scroll position + * + * @return See the comment above. + */ + float GetScrollPosition(void) const; + +// Attribute +private: + /** + * This is the default class constructor. + * + * @param[in] source A pointer to the Object instance which contains this instance + * @param[in] eventType A type of firing event + * @param[in] scrollPosition A scroll position of the scroll + * @param[in] scrollType A direction of the scroll + */ + _UiScrollEventArg(_ScrollEventType eventType, const _Control& source, float scrollPosition = -1.0f, ScrollEndEvent scrollType = SCROLL_END_EVENT_END_TOP); + + // Event source. + _ScrollEventType __eventType; + _Control* __pSource; + float __scrollPosition; + ScrollEndEvent __scrollType; +}; // _UiScrollEvent + +}}} //Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_SCROLL_EVENT_ARG_H_ diff --git a/src/ui/inc/FUiCtrl_UiTableViewItemEvent.h b/src/ui/inc/FUiCtrl_UiTableViewItemEvent.h new file mode 100644 index 0000000..2cbd2ad --- /dev/null +++ b/src/ui/inc/FUiCtrl_UiTableViewItemEvent.h @@ -0,0 +1,66 @@ +// +// 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_UiTableViewItemEvent.h + * @brief This is the header file for the _UiTableViewItemEvent class. + * + * This header file contains the declarations of the _UiTableViewItemEvent class. + */ + +#ifndef _FUI_CTRL_INTERNAL_UI_TABLE_VIEW_ITEM_EVENT_H_ +#define _FUI_CTRL_INTERNAL_UI_TABLE_VIEW_ITEM_EVENT_H_ + +#include +#include +#include "FUi_Control.h" +#include "FUiCtrl_TableView.h" +//#include "FUiCtrl_TableViewItem.h" + + +namespace Tizen { namespace Ui { namespace Controls +{ + +class _UiTableViewItemEvent + : public Tizen::Base::Runtime::_Event +{ +// Lifecycle +public: + _UiTableViewItemEvent(void); + virtual ~_UiTableViewItemEvent(void); + + result Construct(Tizen::Ui::_Control* pSource, TableViewStyle style); + +// Accessors +public: + Tizen::Ui::_Control* GetSource(void) const; + +// Operations +protected: + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + +//Attribute +private: + Tizen::Ui::_Control* __pSource; + bool __invokeTableViewItemCallback; + TableViewStyle __style; + +}; // _UiTableViewItemEvent + +}}} // Tizen::Ui::Controls + +#endif // _FUI_CTRL_INTERNAL_UI_TABLE_VIEW_ITEM_EVENT_H_ diff --git a/src/ui/inc/FUi_AccessibilityContainer.h b/src/ui/inc/FUi_AccessibilityContainer.h new file mode 100644 index 0000000..898b230 --- /dev/null +++ b/src/ui/inc/FUi_AccessibilityContainer.h @@ -0,0 +1,193 @@ +// +// 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_AccessibilityContainer.h + * @brief This is the header file for the _AccessibilityContainer class. + * + * This header file contains the declarations of the _AccessibilityContainer class. + * + */ +#ifndef _FUI_INTERNAL_ACCESSIBILITY_CONTAINER_H_ +#define _FUI_INTERNAL_ACCESSIBILITY_CONTAINER_H_ + +#include +#include +#include +#include +#include "FUi_AccessibilityManager.h" + +namespace Tizen { namespace Base +{ +class String; +}} //Tizen::Base +namespace Tizen { namespace Graphics +{ +class Point; +class FloatRectangle; +}} //Tizen::Graphics + +namespace Tizen { namespace Ui { + +class IAccessibilityListener; +class _AccessibilityElement; +class _IAccessibilityListener; +class _IAccessibilityFocusHandler; +class _Control; + +enum AccessibilityScreenReaderSpeechRate +{ + ACCESSIBILITY_SCREEN_READER_SPEECH_RATE_SYSTEM_SETTING, /**< The speech rate from system setting */ + ACCESSIBILITY_SCREEN_READER_SPEECH_RATE_VERY_SLOW, /**< The very slow speech rate */ + ACCESSIBILITY_SCREEN_READER_SPEECH_RATE_SLOW, /**< The slow speech rate*/ + ACCESSIBILITY_SCREEN_READER_SPEECH_RATE_NORMAL, /**< The normal speech rate */ + ACCESSIBILITY_SCREEN_READER_SPEECH_RATE_FAST, /**< The fast speech rate */ + ACCESSIBILITY_SCREEN_READER_SPEECH_RATE_VERY_FAST /**< The very fast speech rate */ +}; + +/** + * @enum AccessibilityTraits + * + * Defines the trait of the accessibility element. + * + * @since 2.1 + */ +enum AccessibilityTraits +{ + ACCESSIBILITY_TRAITS_NONE, + ACCESSIBILITY_TRAITS_TITLE, + ACCESSIBILITY_TRAITS_OPTION_HEADER, + ACCESSIBILITY_TRAITS_PICTURE, + ACCESSIBILITY_TRAITS_STATUS_BAR, + ACCESSIBILITY_TRAITS_TEXT_FIELD, + ACCESSIBILITY_TRAITS_RATING, + ACCESSIBILITY_TRAITS_ACTION_BAR, + ACCESSIBILITY_TRAITS_ACTION_BAR_MENU, + ACCESSIBILITY_TRAITS_BACK_BUTTON, + ACCESSIBILITY_TRAITS_BUTTON, + ACCESSIBILITY_TRAITS_LABEL, + ACCESSIBILITY_TRAITS_LIST, + ACCESSIBILITY_TRAITS_DATA_SELECTOR, + ACCESSIBILITY_TRAITS_DRAG_SCROLL, + ACCESSIBILITY_TRAITS_EXPAND_BUTTON, + ACCESSIBILITY_TRAITS_FUNCTION_PANEL, + ACCESSIBILITY_TRAITS_IN_DEPTH_BUTTON, + ACCESSIBILITY_TRAITS_INDEX_SCROLL, + ACCESSIBILITY_TRAITS_IMAGE, + ACCESSIBILITY_TRAITS_INDICATOR, + ACCESSIBILITY_TRAITS_NOTIFICATION, + ACCESSIBILITY_TRAITS_RADIO_BUTTON, + ACCESSIBILITY_TRAITS_SCROLL_BAR, + ACCESSIBILITY_TRAITS_SEARCH_FIELD, + ACCESSIBILITY_TRAITS_SEGMENT, + ACCESSIBILITY_TRAITS_SLIDER, + ACCESSIBILITY_TRAITS_SOFT_KEY, + ACCESSIBILITY_TRAITS_SUB_MENU_TITLE, + ACCESSIBILITY_TRAITS_TAB, + ACCESSIBILITY_TRAITS_TICKBOX, + ACCESSIBILITY_TRAITS_TIME_SELECTOR, + ACCESSIBILITY_TRAITS_VOLUME_SLIDER, + ACCESSIBILITY_TRAITS_HOUR, + ACCESSIBILITY_TRAITS_MINUTE, + ACCESSIBILITY_TRAITS_SECOND, + ACCESSIBILITY_TRAITS_YEAR, + ACCESSIBILITY_TRAITS_MONTH, + ACCESSIBILITY_TRAITS_DAY, + ACCESSIBILITY_TRAITS_END +}; + +const int ACCESSIBILITY_PRIORITY_TOP = 55555; +const int ACCESSIBILITY_PRIORITY_NORMAL = 10000; +const int ACCESSIBILITY_PRIORITY_BOTTOM = 5000; +const int ACCESSIBILITY_PRIORITY_KEYPAD = 1000; + +class _OSP_EXPORT_ _AccessibilityContainer +{ +public: + _AccessibilityContainer(const _Control& owner); + ~_AccessibilityContainer(void); + _Control& GetOwner(void); + const _Control& GetOwner(void) const; + + void AddListener(const _IAccessibilityListener& listener); + Tizen::Base::Collection::IListT<_IAccessibilityListener*>* GetListenerListN(void) const; + void RemoveListener(const _IAccessibilityListener& listener); + + result AddChildContainer(const _AccessibilityContainer& child); + result RemoveChildContainer(const _AccessibilityContainer& child); + const Tizen::Base::Collection::LinkedListT<_AccessibilityContainer*>* GetChildContainerList(void) const; + + result AddElement(const _AccessibilityElement& element); + result AddElements(const Tizen::Base::Collection::IListT<_AccessibilityElement*>& elementList); + result InsertElement(const _AccessibilityElement& element, int index); + result RemoveElement(const _AccessibilityElement& element); + result RemoveAllElement(void); + + _AccessibilityElement* GetChildElement(int index) const; + _AccessibilityElement* GetChildElement(const Tizen::Base::String& name) const; + void GetElements(Tizen::Base::Collection::IListT<_AccessibilityElement*>& list) const; + Tizen::Base::Collection::IListT<_AccessibilityElement*>* GetElementsN(void) const; + bool IsContains(const _AccessibilityElement& element); + result MoveElement(const _AccessibilityElement* pPreviousElement, const _AccessibilityElement& element); + + void SetFocusHandler(_IAccessibilityFocusHandler* pHandler); + bool IsFocusManaged(void); + void SetCurrentFocusedElement(_AccessibilityElement* pElement); + _AccessibilityElement* GetCurrentFocusedElement(void) const; + _AccessibilityElement* Hit(const Tizen::Graphics::Point& point) const; + bool MoveFocus(_AccessibilityFocusDirection direction); + bool MoveFocus(const Tizen::Graphics::Point& point); + void ResetFocus(void); + void SortElements(void); + + bool SetParent(const _AccessibilityContainer* pParent); + _AccessibilityContainer* GetParent(void) const; + _AccessibilityContainer* GetRootParent(void) const; + void SetPriority(int level); + int GetPriority(void); + void SetEnableState(bool enabledState); + bool GetEnableState(void); + void Activate(bool enable); + bool IsActivated(void) const; + Tizen::Graphics::FloatRectangle GetAbsoluteBounds(void) const; + + void ReadingAll(void); + Tizen::Base::String GetCurrentGrammar(void) const; + AccessibilityScreenReaderStatus GetStatus(void) const; + Tizen::Base::_HandleT <_AccessibilityContainer> GetHandle(void) const; + +private: + _AccessibilityContainer(const _AccessibilityContainer& rhs); + _AccessibilityContainer& operator =(const _AccessibilityContainer& rhs); + +private: + Tizen::Base::_HandleT <_AccessibilityContainer> __handle; + _Control* __pOwner; + _AccessibilityContainer* __pParent; + Tizen::Base::Collection::LinkedListT<_AccessibilityElement*> __elementList; + Tizen::Base::Collection::LinkedListT<_AccessibilityContainer*> __childContainerList; + Tizen::Base::Collection::LinkedListT<_IAccessibilityListener*> __listenerList; + int __currentElementIndex; + int __level; + bool __activated; + IAccessibilityListener* __pListener; + bool __enableState; + _IAccessibilityFocusHandler* __pFocusHandler; +}; //class _AccessibilityContainer +}} //Tizen::Ui + +#endif //_FUI_INTERNAL_ACCESSIBILITY_CONTAINER_H_ diff --git a/src/ui/inc/FUi_AccessibilityContainerImpl.h b/src/ui/inc/FUi_AccessibilityContainerImpl.h new file mode 100644 index 0000000..8af2a2f --- /dev/null +++ b/src/ui/inc/FUi_AccessibilityContainerImpl.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 FUi_AccessibilityContainerImpl.h + * @brief This is the header file for the _AccessibilityContainerImpl class. + * + * This header file contains the declarations of the _AccessibilityContainerImpl class. + * + */ +#ifndef _FUI_INTERNAL_ACCESSIBILITY_CONTAINER_IMPL_H_ +#define _FUI_INTERNAL_ACCESSIBILITY_CONTAINER_IMPL_H_ + +#include +#include +#include +#include "FUi_ControlManager.h" +#include "FUi_IAccessibilityListener.h" + +namespace Tizen { namespace Base +{ +class String; +}} //Tizen::Base + +namespace Tizen { namespace Base { namespace Collection +{ +class IList; +}}} //Tizen::Base::Collection + +namespace Tizen { namespace Ui +{ + +class Control; +class AccessibilityContainer; +class _ControlImpl; +class _AccessibilityElementImpl; +class _AccessibilityContainer; + +class _OSP_EXPORT_ _AccessibilityContainerImpl + : public Tizen::Base::Object + , virtual public _IAccessibilityListener +{ +public: + _AccessibilityContainerImpl(const _ControlImpl& controlImpl, const AccessibilityContainer& publicInstance, const _AccessibilityContainer& coreInstance); + virtual ~_AccessibilityContainerImpl(void); + _ControlImpl& GetOwner(void); + AccessibilityContainer& GetPublic(void); + result AddAccessibilityListener(const IAccessibilityListener& listener); + result RemoveAccessibilityListener(const IAccessibilityListener& listener); + + result AddElement(const _AccessibilityElementImpl& element); + result AddElements(const Tizen::Base::Collection::IList& elementList); + + Tizen::Base::Collection::IList* GetElementsN(void); + AccessibilityElement* GetChildElement(const Tizen::Base::String& name); + + result RemoveElement(const _AccessibilityElementImpl& element); + result RemoveAllElement(void); + + result MoveElement(const _AccessibilityElementImpl* pPreviousElement, const _AccessibilityElementImpl& element); + + Tizen::Base::String GetCurrentGrammar(void) const; + AccessibilityScreenReaderStatus GetStatus(void) const; + void ReadingAll(void); + + static AccessibilityContainer* CreateAccessibilityContainerN(const _ControlImpl& controlImpl); + static _AccessibilityContainerImpl* GetInstance(AccessibilityContainer& container); + static const _AccessibilityContainerImpl* GetInstance(const AccessibilityContainer& container); + + virtual bool OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityFocusMovedPrevious(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityReadingElement(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityFocusOut(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element); + virtual bool OnAccessibilityValueIncreased(const _AccessibilityContainer& control, const _AccessibilityElement& element) ; + virtual bool OnAccessibilityValueDecreased(const _AccessibilityContainer& control, const _AccessibilityElement& element); + +private: + _AccessibilityContainerImpl(const _AccessibilityContainerImpl& rhs); + _AccessibilityContainerImpl& operator =(const _AccessibilityContainerImpl& rhs); + + void AddSystemElement(const AccessibilityElement& element); + bool ControlCoreExists(_ControlHandle handle) const; + +private: + _ControlImpl* __pControlImpl; + AccessibilityContainer* __pPublic; + _AccessibilityContainer* __pCore; + Tizen::Base::Collection::LinkedListT __elementList; + Tizen::Base::Collection::LinkedListT __listenerList; + _ControlHandle __coreHandle; +}; //class _AccessibilityContainerImpl +}} //Tizen::Ui + +#endif //_FUI_INTERNAL_ACCESSIBILITY_CONTAINER_IMPL_H_ \ No newline at end of file diff --git a/src/ui/inc/FUi_AccessibilityElement.h b/src/ui/inc/FUi_AccessibilityElement.h new file mode 100644 index 0000000..2f60f75 --- /dev/null +++ b/src/ui/inc/FUi_AccessibilityElement.h @@ -0,0 +1,119 @@ +// +// 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_AccessibilityElement.h + * @brief This is the header file for the _AccessibilityElement class. + * + * This header file contains the declarations of the _AccessibilityElement class. + * + */ +#ifndef _FUI_INTERNAL_ACCESSIBILITY_ELEMENT_H_ +#define _FUI_INTERNAL_ACCESSIBILITY_ELEMENT_H_ + +#include +#include +#include +#include + +namespace Tizen { namespace Ui { + +class _AccessibilityContainer; +class _AccessibilityElementImpl; + +class _OSP_EXPORT_ _AccessibilityElement +{ + +public: + _AccessibilityElement(bool systemElement = false); + virtual ~_AccessibilityElement(void); + result Construct(const Tizen::Base::String& name, const Tizen::Graphics::FloatRectangle& bounds); + result Construct(const Tizen::Base::String& name, const Tizen::Graphics::Rectangle& bounds); + void SetBounds(const Tizen::Graphics::FloatRectangle& bounds); + void SetBounds(const Tizen::Graphics::Rectangle& bounds); + Tizen::Graphics::FloatRectangle GetBounds(void) const; + Tizen::Graphics::FloatRectangle GetAbsoluteBounds(void) const; + void SetName(const Tizen::Base::String& name); + Tizen::Base::String GetName(void) const; + void SetLabel(const Tizen::Base::String& label); + Tizen::Base::String GetLabel(void) const; + void SetHint(const Tizen::Base::String& hint, bool setHintByUser = false); + Tizen::Base::String GetHint(void) const; + void SetStatus(const Tizen::Base::String& guide); + Tizen::Base::String GetStatus(void) const; + void SetTrait(const Tizen::Base::String& trait); + Tizen::Base::String GetTraitString(void) const; + void SetValue(const Tizen::Base::String& value); + Tizen::Base::String GetValue(void) const; + void SetHintDisabled(bool enable); + void Activate(bool enable); + bool IsActivated(void) const; + void SetParent(const _AccessibilityContainer& parent); + _AccessibilityContainer* GetParent(void) const; + void SetUserData(void* pUserData); + void* GetUserData(void) const; + + void SetSupportOperatingGesture(bool set); + bool GetSupportOperatingGesture(void); + + Tizen::Base::String GetReadingContents(void) const; + bool IsSystemElement(void); + bool IsUpdated(void); + + void SetLabelWithStringId(const char* id); + void SetTraitWithStringId(const char* id); + void SetHintWithStringId(const char* id); + void SetStatusWithStringId(const char* id); + void SetValueWithStringId(const char* id); + + void SetPublicLabelUpdate(bool isPublicLabelUpdated); + bool IsPublicLabelUpdated(void); + +private: + _AccessibilityElement(const _AccessibilityElement& rhs); + _AccessibilityElement& operator =(const _AccessibilityElement& rhs); + +private: + Tizen::Base::String __name; + Tizen::Graphics::FloatRectangle __bounds; + Tizen::Graphics::FloatRectangle __absBounds; + Tizen::Base::String __label; + Tizen::Base::String __hint; + Tizen::Base::String __status; + Tizen::Base::String __traitString; + AccessibilityTraits __trait; + Tizen::Base::String __value; + _AccessibilityContainer* __pParent; + + char* __pLabelId; + char* __pTraitId; + char* __pHintId; + char* __pStatusId; + char* __pValueId; + + void* __pUserData; + bool __systemElement; + bool __activated; + bool __supportOperatingGesture; + bool __setHintByUser; + bool __disabledHint; + bool __updateContents; + + bool __publicLabelUpdated; +}; +}} +#endif //_FUI_INTERNAL_ACCESSIBILITY_ELEMENT_H_ diff --git a/src/ui/inc/FUi_AccessibilityElementImpl.h b/src/ui/inc/FUi_AccessibilityElementImpl.h new file mode 100644 index 0000000..b1332e8 --- /dev/null +++ b/src/ui/inc/FUi_AccessibilityElementImpl.h @@ -0,0 +1,87 @@ +// +// 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_AccessibilityElementImpl.h + * @brief This is the header file for the _AccessibilityElementImpl class. + * + * This header file contains the declarations of the _AccessibilityElementImpl class. + * + */ +#ifndef _FUI_INTERNAL_ACCESSIBILITY_ELEMENT_IMPL_H_ +#define _FUI_INTERNAL_ACCESSIBILITY_ELEMENT_IMPL_H_ + +#include +#include + +namespace Tizen { namespace Base +{ +class String; +}} //Tizen::Base +namespace Tizen { namespace Graphics +{ +class FloatRectangle; +}} //Tizen::Graphics +namespace Tizen { namespace Ui +{ + +class AccessibilityElement; +class _AccessibilityElement; +class IAccessibilityListener; + +class _OSP_EXPORT_ _AccessibilityElementImpl +{ +public: + _AccessibilityElementImpl(const AccessibilityElement& element); + _AccessibilityElementImpl(const _AccessibilityElement& element); + virtual ~_AccessibilityElementImpl(void); + result Construct(const Tizen::Base::String& name, const Tizen::Graphics::FloatRectangle& bounds); + void SetBounds(const Tizen::Graphics::FloatRectangle& bounds); + void SetName(const Tizen::Base::String& name); + void SetLabel(const Tizen::Base::String& label); + void SetHint(const Tizen::Base::String& hint); + void SetStatus(const Tizen::Base::String& status); + void SetTrait(const Tizen::Base::String& trait); + void SetValue(const Tizen::Base::String& value); //variant gogogo + + AccessibilityElement& GetPublic(); + const AccessibilityElement& GetPublic() const; + void SetCore(_AccessibilityElement* pCore); + _AccessibilityElement& GetCore(); + const _AccessibilityElement& GetCore() const; + Tizen::Base::String GetName(void) const; + Tizen::Graphics::FloatRectangle GetBounds(void) const; + Tizen::Base::String GetLabel(void) const; + Tizen::Base::String GetHint(void) const; + Tizen::Base::String GetStatus(void) const; + Tizen::Base::String GetTraitString(void) const; + Tizen::Base::String GetValue(void) const; //variant gogogo + + static _AccessibilityElementImpl* GetInstance(AccessibilityElement& element); + static const _AccessibilityElementImpl* GetInstance(const AccessibilityElement& element); + +private: + _AccessibilityElementImpl(const _AccessibilityElementImpl& rhs); + _AccessibilityElementImpl& operator =(const _AccessibilityElementImpl& rhs); + +private: + AccessibilityElement* __pPublic; + _AccessibilityElement* __pCore; +}; //class _AccessibilityElementImpl +}} //Tizen::Ui + +#endif //_FUI_INTERNAL_ACCESSIBILITY_ELEMENT_IMPL_H_ \ No newline at end of file diff --git a/src/ui/inc/FUi_AccessibilityGesture.h b/src/ui/inc/FUi_AccessibilityGesture.h new file mode 100644 index 0000000..24c5308 --- /dev/null +++ b/src/ui/inc/FUi_AccessibilityGesture.h @@ -0,0 +1,83 @@ +// +// 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_AccessibilityGesture.h + * @brief This is the header file for the _AccessibilityGesture class. + * + * This header file contains the declarations of the _AccessibilityGesture class. + * + */ +#ifndef _FUI_INTERNAL_ACCESSIBILITY_GESTURE_H_ +#define _FUI_INTERNAL_ACCESSIBILITY_GESTURE_H_ + +namespace Tizen { namespace Ui { + +enum _AccessibilityGestureType +{ + _ACCESSIBILITY_GESTURE_TYPE_NONE = 0, + _ACCESSIBILITY_GESTURE_TYPE_FLICK_UP, + _ACCESSIBILITY_GESTURE_TYPE_FLICK_DOWN, + _ACCESSIBILITY_GESTURE_TYPE_FLICK_LEFT, + _ACCESSIBILITY_GESTURE_TYPE_FLICK_RIGHT, + _ACCESSIBILITY_GESTURE_TYPE_ONE_FINGER_ONE_TAP, + _ACCESSIBILITY_GESTURE_TYPE_ONE_FINGER_DOUBLE_TAP, + _ACCESSIBILITY_GESTURE_TYPE_ONE_FINGER_LONGPRESS, + _ACCESSIBILITY_GESTURE_TYPE_ONE_FINGER_PANNING_STARTED, + _ACCESSIBILITY_GESTURE_TYPE_ONE_FINGER_PANNING_CHANGED, + _ACCESSIBILITY_GESTURE_TYPE_ONE_FINGER_PANNING_FINISHED, + _ACCESSIBILITY_GESTURE_TYPE_TWO_FINGER_TWO_TAP, + _ACCESSIBILITY_GESTURE_TYPE_TWO_FINGER_DOUBLE_TAP, + _ACCESSIBILITY_GESTURE_TYPE_TWO_FINGER_LONGPRESS, + _ACCESSIBILITY_GESTURE_TYPE_TWO_FINGER_PANNING_STARTED, + _ACCESSIBILITY_GESTURE_TYPE_TWO_FINGER_PANNING_CHANGED, + _ACCESSIBILITY_GESTURE_TYPE_TWO_FINGER_PANNING_FINISHED, + _ACCESSIBILITY_GESTURE_TYPE_THREE_FINGER_THREE_TAP, + _ACCESSIBILITY_GESTURE_TYPE_THREE_FINGER_DOUBLE_TAP, + _ACCESSIBILITY_GESTURE_TYPE_THREE_FINGER_LONGPRESS, + _ACCESSIBILITY_GESTURE_TYPE_THREE_FINGER_PANNING_STARTED, + _ACCESSIBILITY_GESTURE_TYPE_THREE_FINGER_PANNING_CHANGED, + _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 +}; + +class _AccessibilityManager; + +class _AccessibilityGesture +{ +public: + _AccessibilityGesture(_AccessibilityManager& manager); + virtual ~_AccessibilityGesture(void); + static bool ProcessGesture(_AccessibilityGestureType type, float x = 0, float y = 0); +private: + _AccessibilityGesture(const _AccessibilityGesture& rhs); + _AccessibilityGesture& operator =(const _AccessibilityGesture& rhs); + +private: + friend class _AccessibilityManager; + _AccessibilityManager* __pManager; + +}; +}} + +#endif //_FUI_INTERNAL_ACCESSIBILITY_GESTURE_H_ + diff --git a/src/ui/inc/FUi_AccessibilityManager.h b/src/ui/inc/FUi_AccessibilityManager.h new file mode 100644 index 0000000..5609f35 --- /dev/null +++ b/src/ui/inc/FUi_AccessibilityManager.h @@ -0,0 +1,173 @@ +// +// 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_AccessibilityManager.h +* @brief This is the header file for the _AccessibilityManager class. +* +* This header file contains the declarations of the _AccessibilityManager class. +* +*/ +#ifndef _FUI_INTERNAL_ACCESSIBILITY_MANAGER_H_ +#define _FUI_INTERNAL_ACCESSIBILITY_MANAGER_H_ + +#include +#include +#include +#include +#include +#include +#include "FUi_ControlManager.h" +#include "FUi_AccessibilityGesture.h" + +namespace Tizen { namespace Base +{ +class String; +}} //Tizen::Base + +namespace Tizen { namespace Ui { namespace Animations +{ +class VisualElement; +}}} //Tizen::Ui::Animations + +namespace Tizen { namespace Ui +{ + +class _Control; +class _TouchGestureDetector; +class _AccessibilityTtsPlayer; +class _AccessibilitySystemSettingLoader; +class _AccessibilityContainer; +class _AccessibilityElement; + +enum _AccessibilityTtsMode +{ + _ACCESSIBILITY_TTS_MODE_APPEND, + _ACCESSIBILITY_TTS_MODE_REPLACE, +}; + +enum _AccessibilityFocusDirection +{ + _ACCESSIBILITY_FOCUS_DIRECTION_PREVIOUS = -1, + _ACCESSIBILITY_FOCUS_DIRECTION_NONE = 0, + _ACCESSIBILITY_FOCUS_DIRECTION_NEXT = 1 +}; + +enum _AccessibilityAutoReadingMode +{ + _ACCESSIBILITY_AUTO_READING_MODE_FIRST_ITEM_OF_CONTENTS = -1, + _ACCESSIBILITY_AUTO_READING_MODE_FIRST_ITEM = 0, + _ACCESSIBILITY_AUTO_READING_MODE_CURRENT_FOCUS = 1, + _ACCESSIBILITY_AUTO_READING_MODE_RESET = 2 +}; +class _OSP_EXPORT_ _AccessibilityManager +{ +public: + static _AccessibilityManager* GetInstance(void); + static void CreateInstance(void); + static void ReleaseInstance(void); + ~_AccessibilityManager(void); + + AccessibilityScreenReaderStatus GetTtsStatus(void); + void ReadElement(_AccessibilityAutoReadingMode mode); + result ReadElement(const _AccessibilityElement& element); + result ReadContent(const Tizen::Base::String& content); + result ReadingStop(void); + result ReadingPause(void); + result ReadingResume(void); + void OnStartReading(const Tizen::Base::String& grammar); + void OnFinishReading(const Tizen::Base::String& grammar); + + void AddContainer(const _AccessibilityContainer& container); + void RemoveContainer(const _AccessibilityContainer& container); + + bool ProcessGesture(_AccessibilityGestureType type, const Tizen::Graphics::FloatPoint& point); + Tizen::Base::String GetCurrentGrammar(void); + + void OnChangedLocale(void); + void OnAccessibilityScreenReaderIsActivated(bool set); + bool IsScreenReaderActivated(void); + float GetLargeFontSize(void); + + bool IsFirstElementGainedFocus(void); + bool IsLastElementGainedFocus(void); + void ResetFocusInformation(void); + + void NeedRefreshItem(void); + + void RequestToDrawFocusUi(void); + void RequestAutoReading(_AccessibilityAutoReadingMode mode); + + void SetTtsMode(_AccessibilityTtsMode mode); + void SetGlobalFocusedElement(_AccessibilityElement& element); + + Tizen::Base::_HandleT <_AccessibilityContainer> Register(_AccessibilityContainer* pObject); + void Unregister(Tizen::Base::_HandleT <_AccessibilityContainer> handle); + + static bool IsActivated(); +private: + enum GestureMode + { + MODE_NONE, + MODE_TAP, + MODE_FOCUS_MOVE, + MODE_PANNING + }; + _AccessibilityManager(void); + _AccessibilityManager(const _AccessibilityManager& rhs); + _AccessibilityManager& operator =(const _AccessibilityManager& rhs); + static void InitializeInstance(void); + bool MoveFocus(_AccessibilityFocusDirection direction); + void DrawFocusUi(const _AccessibilityElement& element); + void EraseFocusUi(void); + void MakeList(void); + void MakeList(_AccessibilityContainer* container); + void Initialize(void); + void ShowPopup(const Tizen::Base::String& content); + void ShowPopup(void); + void HidePopup(void); + bool IsContainerValid(_AccessibilityContainer* pContainer); + bool IsTargetContainerValid(void); + bool IsVisible(_AccessibilityElement* pElement); + bool IsVisible(_AccessibilityContainer* pContainer); + void SetGestureMode(GestureMode mode); + GestureMode GetGestureMode(void); +private: + + Tizen::Base::_ObjectManagerT <_AccessibilityContainer> __objectManager; + _AccessibilityGesture* __pAccGesture; + _AccessibilityTtsPlayer* __pTtsPlayer; + _AccessibilitySystemSettingLoader* __pSettingLoader; + _AccessibilityContainer* __pTargetContainer; + _AccessibilityElement* __pTargetElement; + _AccessibilityElement* __pTitleElement; + Tizen::Base::Collection::LinkedListT<_AccessibilityContainer*> __containerList; + Tizen::Base::Collection::LinkedListT<_AccessibilityElement*> __candidateList; + GestureMode __mode; + _ControlHandle __targetControlHandle; + _ControlHandle __focusedControlHandle; + _ControlHandle __readingPopupParentHandle; + Tizen::Ui::Animations::VisualElement* __pReadingVe; + Tizen::Ui::Animations::VisualElement* __pFocusVe; + _Control* __pPanningControl; + bool __needRefreshItem; + static bool __screenReaderIsEnabled; +};//class _AccessibilityManager +}} //Tizen::Ui + +#endif //_FUI_INTERNAL_ACCESSIBILITY_MANAGER_H_ + diff --git a/src/ui/inc/FUi_AccessibilitySystemSettingLoader.h b/src/ui/inc/FUi_AccessibilitySystemSettingLoader.h new file mode 100644 index 0000000..8134c20 --- /dev/null +++ b/src/ui/inc/FUi_AccessibilitySystemSettingLoader.h @@ -0,0 +1,71 @@ +// +// 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_AccessibilitySystemSettingLoader.h + * @brief This is the header file for the _AccessibilitySystemSettingLoader class. + * + * This header file contains the declarations of the _AccessibilitySystemSettingLoader class. + * + */ +#ifndef _FUI_INTERNAL_ACCESSIBILITY_SYSTEM_SETTING_LOADER_H_ +#define _FUI_INTERNAL_ACCESSIBILITY_SYSTEM_SETTING_LOADER_H_ + +#include + +namespace Tizen { namespace Base +{ +class String; +}} //Tizen::Base + +namespace Tizen { namespace Locales +{ +class Locale; +}} //Tizen::Locales + +struct _keynode_t; +typedef _keynode_t keynode_t; + +namespace Tizen { namespace Ui { + +class _AccessibilityManager; + +class _AccessibilitySystemSettingLoader + : public Tizen::System::ISettingEventListener +{ +public: + _AccessibilitySystemSettingLoader(_AccessibilityManager& manager); + virtual ~_AccessibilitySystemSettingLoader(void); + + bool IsScreenReaderActivated(void); + float GetLargeFontSize(void); + Tizen::Locales::Locale GetLocale(void); + static void SetSystemSetting(keynode_t* node, void* userData); + + +private: + _AccessibilitySystemSettingLoader(const _AccessibilitySystemSettingLoader& rhs); + _AccessibilitySystemSettingLoader& operator =(const _AccessibilitySystemSettingLoader& rhs); + virtual void OnSettingChanged(Tizen::Base::String& key); + +private: + _AccessibilityManager* __pManager; + friend class _AccessibilityManager; +}; +}} + +#endif //_FUI_INTERNAL_ACCESSIBILITY_SYSTEM_SETTING_LOADER_H_ + diff --git a/src/ui/inc/FUi_AccessibilityTtsPlayer.h b/src/ui/inc/FUi_AccessibilityTtsPlayer.h new file mode 100644 index 0000000..27823d1 --- /dev/null +++ b/src/ui/inc/FUi_AccessibilityTtsPlayer.h @@ -0,0 +1,102 @@ +// +// 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. +// + +/** + * @fileFUi_AccessibilityTtsPlayer.h + * @brief This is the header file for the _AccessibilityTtsPlayer class. + * + * This header file contains the declarations of the _AccessibilityTtsPlayer class. + * + */ +#ifndef _FUI_INTERNAL_ACCESSIBILITY_TTS_PLAYER_H_ +#define _FUI_INTERNAL_ACCESSIBILITY_TTS_PLAYER_H_ + +#include +#include +#include + +namespace Tizen { namespace Base +{ +class String; +}} +namespace Tizen { namespace Locales +{ +class Locale; +}} +namespace Tizen { namespace Ui +{ +class _AccessibilityManager; + +class _AccessibilityTtsPlayer +{ +public: + _AccessibilityTtsPlayer(_AccessibilityManager& manager); + virtual ~_AccessibilityTtsPlayer(void); + result Construct(void); + result ReadGrammar(const Tizen::Base::String& grammar, bool init = true); + result StopReading(void); + + AccessibilityScreenReaderStatus GetStatus(void); + Tizen::Base::String GetCurrentGrammar(void); + + void OnStatusChanged(AccessibilityScreenReaderStatus status); + void OnErrorOccurred(Tizen::Base::String& errorString); + result Activate(void); + result Deactivate(void); + result SetLocale(const Tizen::Locales::Locale& locale); +private: + void SetStatus(AccessibilityScreenReaderStatus status); + + static const char* GetEngineStateMessage(const tts_state_e state); + static const char* GetEngineErrorMessage(const int errorType); + static void TtsStateChangedReceiver(tts_h ttsHandle, tts_state_e previousState, tts_state_e currentState, void* pTtsInstance); + static void TtsStartedReceiver(tts_h ttsHandle, int utteranceId, void* pListener); + static void TtsCompletedReceiver(tts_h ttsHandle, int utteranceId, void* pTtsInstance); + static void TtsErrorReceiver(tts_h ttsHandle, int ttsUtteranceId, tts_error_e error, void* pTtsInstance); + static bool TtsSupportedLocaleListGetter(tts_h ttsHandle, const char* pLanguage, tts_voice_type_e voiceType, void* pLocaleList); + static const char* ConvertTizenLocaleToEngineN(const Tizen::Locales::Locale& locale); + static const Tizen::Locales::Locale* ConvertEngineLocaleToNativeN(const Tizen::Base::String& strSource); + result Speak(const Tizen::Base::String& text); + result Stop(void); + result Pause(void); + result Resume(void); + Tizen::Locales::Locale GetLocale(void) const; + const Tizen::Base::Collection::IList* GetSupportedLocales(void) const; + bool IsLocaleSupported(const Tizen::Locales::Locale& locale) const; + result SetSpeechRate(tts_speed_e speechRate); + +private: + _AccessibilityTtsPlayer(const _AccessibilityTtsPlayer& rhs); + _AccessibilityTtsPlayer& operator =(const _AccessibilityTtsPlayer& rhs); + +private: + bool __initialized; + 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; +}; //class _AccessibilityTtsPlayer +}} //Tizen::Ui + +#endif //_FUI_INTERNAL_ACCESSIBILITY_TTS_PLAYER_H_ diff --git a/src/ui/inc/FUi_BidiUtils.h b/src/ui/inc/FUi_BidiUtils.h new file mode 100644 index 0000000..a306b7d --- /dev/null +++ b/src/ui/inc/FUi_BidiUtils.h @@ -0,0 +1,54 @@ +// +// 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_BidiUtils.h + * @brief This is the header file for the _BidiUtils class. + * + * This header file contains the declarations of the _EditBidiUtils class. + */ + +#ifndef _FUI_INTERNAL_BIDI_UTILS_H_ +#define _FUI_INTERNAL_BIDI_UTILS_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui +{ + +class _BidiUtils +{ +public: + static bool IsRTL(const Tizen::Base::String& text); + static bool IsBidiLanguage(Tizen::Locales::LanguageCode languageCode); + static Tizen::Locales::LanguageCode GetDisplayLanguage(void); + static Tizen::Locales::Locale* GetLocaleLanguageN(void); + static Tizen::Base::String ConvertLanguageCountryCodeString(Tizen::Locales::LanguageCode languageCode); + +private: + _BidiUtils(void); + ~_BidiUtils(void); + + _BidiUtils(const _BidiUtils& rhs); + _BidiUtils& operator =(const _BidiUtils& rhs); +}; //_BidiUtils + +}} // Tizen::Ui + +#endif //_FUI_CTRL_INTERNAL_BIDI_UTILS_H_ diff --git a/src/ui/inc/FUi_ClipboardPopupEvent.h b/src/ui/inc/FUi_ClipboardPopupEvent.h new file mode 100644 index 0000000..1364e89 --- /dev/null +++ b/src/ui/inc/FUi_ClipboardPopupEvent.h @@ -0,0 +1,63 @@ +// +// 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_ClipboardPopupEvent.h + * @brief This is the header file containing the declaration of the _ClipboardPopupEvent class. + * + * This header file contains the declarations of the _ClipboardPopupEvent class. + */ + +#ifndef _FUI_INTERNAL_CLIPBOARD_POPUP_EVENT_H_ +#define _FUI_INTERNAL_CLIPBOARD_POPUP_EVENT_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui +{ + +enum _ClipboardPopupState +{ + _CLIPBOARD_POPUP_STATE_OPENED, + _CLIPBOARD_POPUP_STATE_CLOSED, + _CLIPBOARD_POPUP_STATE_BOUNDS_CHANGED, +}; + +class _ClipboardPopupEvent + : public Tizen::Base::Runtime::_Event +{ +public: + static _ClipboardPopupEvent* CreateInstanceN(void); + static Tizen::Base::Runtime::IEventArg* CreateClipboardPopupEventArgN(_ClipboardPopupState clipboardPopupState, Tizen::Graphics::Dimension& clipboardPopupSize); + + virtual ~_ClipboardPopupEvent(void); + +protected: + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + +private: + _ClipboardPopupEvent(void); + + _ClipboardPopupEvent(const _ClipboardPopupEvent& rhs); + _ClipboardPopupEvent& operator =(const _ClipboardPopupEvent& rhs); +}; // _ClipboardPopupEvent + +}} // Tizen::Ui + +#endif // _FUI_INTERNAL_CLIPBOARD_POPUP_EVENT_H_ \ No newline at end of file diff --git a/src/ui/inc/FUi_Colorf.h b/src/ui/inc/FUi_Colorf.h new file mode 100644 index 0000000..5e0f085 --- /dev/null +++ b/src/ui/inc/FUi_Colorf.h @@ -0,0 +1,107 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_Colorf.h + * @brief Header file of _Colorf class + * + * This file contains declarations _Colorf class. + */ + +#ifndef _FUI_INTERNAL_COLORF_H_ +#define _FUI_INTERNAL_COLORF_H_ + +#include + +namespace Tizen { namespace Ui +{ + +class _Colorf +{ +public: + _Colorf(void) { __r = __g = __b = 0.0f;__a = 1.0f;} + _Colorf(float red, float green, float blue, float alpha) + : __r(red) + , __g(green) + , __b(blue) + , __a(alpha) + { + } + _Colorf(const _Colorf& color) + { + __r = color.__r; + __g = color.__g; + __b = color.__b; + __a = color.__a; + } + + virtual ~_Colorf(void) {} + + _Colorf& operator =(const _Colorf& color) + { + if (&color != this) + { + __r = color.__r; + __g = color.__g; + __b = color.__b; + __a = color.__a; + } + + return *this; + } + + bool operator !=(const _Colorf& color) const + { + return (__r != color.__r) || (__g != color.__g) || (__b != color.__b) || (__a != color.__a); + } + + bool operator ==(const _Colorf& color) const + { + // CHECKME: need float compare ??? + return (__r == color.__r) && (__g == color.__g) && (__b == color.__b) && (__a == color.__a); + } + + result SetRGBAColor(float r, float g, float b, float a) + { + __r = r; + __g = g; + __b = b; + __a = a; + return E_SUCCESS; + } + + float& Red(void) { return __r;} + float& Green(void) { return __g;} + float& Blue(void) { return __b;} + float& Alpha(void) { return __a;} + + float Red(void) const { return __r;} + float Green(void) const { return __g;} + float Blue(void) const { return __b;} + float Alpha(void) const { return __a;} + +private: + float __r; + float __g; + float __b; + float __a; +}; + +}} + +#endif // Tizen::Ui + diff --git a/src/ui/inc/FUi_ContainerImpl.h b/src/ui/inc/FUi_ContainerImpl.h new file mode 100644 index 0000000..9a114f1 --- /dev/null +++ b/src/ui/inc/FUi_ContainerImpl.h @@ -0,0 +1,124 @@ +// +// 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_ContainerImpl.h +* @brief This is the header file for the _ContainerImp interface. +* +* This header file contains the declarations of the %_ContainerImp interface. +*/ + +#ifndef _FUI_INTERNAL_CONTAINER_IMPL_H_ +#define _FUI_INTERNAL_CONTAINER_IMPL_H_ + +#include +#include +#include "FUi_ControlImpl.h" +#include "FUi_SharedPtr.h" + +namespace Tizen { namespace Ui +{ + +class _LayoutImpl; + +class _OSP_EXPORT_ _ContainerImpl + : public _ControlImpl +{ +public: +// Life Cycle + void Initialize(Control* pPublic, _Control* pCore, const Layout* pPublicPortraitLayout, const Layout* pPublicLandscapeLayout); + static _ContainerImpl* CreateContainerImplN(Container* pPublic); + static _ContainerImpl* CreateContainerImplN(Container* pPublic, const Tizen::Graphics::Rectangle& bounds, const Layout* pPublicPortraitLayout, const Layout* pPublicLandscapeLayout, bool resizable, bool movable); + static _ContainerImpl* CreateContainerImplN(Container* pPublic, const Tizen::Graphics::FloatRectangle& bounds, const Layout* pPublicPortraitLayout, const Layout* pPublicLandscapeLayout, bool resizable, bool movable); + virtual ~_ContainerImpl(void); + + static _ContainerImpl* GetInstance(Container& container); + static const _ContainerImpl* GetInstance(const Container& container); +//Operation + // [ToDo] Must consider transforOwnership flags. + virtual result Destroy(void); + result AddChild(_ControlImpl* pChild, bool transferOwnership = true); + result RemoveControl(_ControlImpl* pChild, bool deallocate = true); + result RemoveChild(_ControlImpl* pChild, bool deallocate = true); + result RemoveControl(int index); + result RemoveChild(int index); + void DeleteAllChildren(_ContainerImpl* pChild, bool detachSystemChild = true, Tizen::Base::Collection::ArrayList* pChildrenList = null); + void RemoveAllChildren(bool detachSystemChild = true, bool callOnDetachingFromMainTree = false); + result MoveChildToTop(const _ControlImpl& child); + result MoveChildBefore(const _ControlImpl& targetChild, const _ControlImpl& child); + +// Z-Order + result SetControlAlwaysOnTop(Control& control, bool alwaysOnTop); + result SetControlAlwaysAtBottom(Control& control, bool alwaysAtBottom); + bool IsControlAlwaysAtBottom(const Control& control) const; + bool IsControlAlwaysOnTop(const Control& control) const; + +// Getters/Setters + virtual const char* GetPublicClassName(void) const; + virtual const Container& GetPublic(void) const; + virtual Container& GetPublic(void); + + Tizen::Base::Collection::IList* GetChildrenPublic(void) const; + _ControlImpl* GetChild(int index) const; + + _ControlImpl* SearchControlByName(const Tizen::Base::String& name, bool recursive, bool searchMyself = false) const; + + int GetChildIndex(const _ControlImpl* pChild) const; + int GetChildCount(void) const; + + // [ToDo] It's returning public class instance. OK? + Layout* GetPublicPortraitLayoutN(void) const; + Layout* GetPublicLandscapeLayoutN(void) const; + Layout* GetPublicLayoutN(void) const; + + result SetChildAt(const _ControlImpl* pChild, int index); + bool IsAncestorOf(const _ControlImpl* pChild) const; + +// Internal Callbacks + virtual void OnDraw(void); + virtual void OnChangeLayout(_ControlOrientation orientation); + virtual void OnVisibleStateChanging(void); + virtual void OnVisibleStateChanged(void); + virtual result OnBoundsChanging(const Tizen::Graphics::Rectangle& bounds); + virtual result OnBoundsChanging(const Tizen::Graphics::FloatRectangle& bounds); + virtual void OnBoundsChanged(void); + virtual void OnEvaluateSize(Tizen::Graphics::Dimension& evaluatedSize); + virtual bool OnEvaluateSize(Tizen::Graphics::FloatDimension& evaluatedSize); + + void CallOnDraw(void); + +protected: + _ContainerImpl(Control* pPublic, _Control* pCore, const Layout* pPublicPortraitLayout = null, const Layout* pPublicLandscapeLayout = null); + _ContainerImpl(Control* pPublic, _Control* pCore, const Tizen::Graphics::Rectangle& bounds, const Layout* pPublicPortraitLayout, const Layout* pPublicLandscapeLayout, bool resizable, bool movable); + _ContainerImpl(Control* pPublic, _Control* pCore, const Tizen::Graphics::FloatRectangle& bounds, const Layout* pPublicPortraitLayout, const Layout* pPublicLandscapeLayout, bool resizable, bool movable); + +private: + _ContainerImpl(const _ContainerImpl& rhs); + _ContainerImpl& operator =(const _ContainerImpl& rhs); + + virtual bool IsChildAttachable(_ControlImpl& child) const; + result SetLayout(_Control& core, _ControlOrientation orientation, const Layout* pPublicLayout); + +private: + Tizen::Base::Collection::LinkedList __controlPublics; + _SharedPtr __portraitLayout; + _SharedPtr __landscapeLayout; +}; // _ContainerImpl + +}} // Tizen::Ui + +#endif // _FUI_INTERNAL_CONTAINER_IMPL_H_ diff --git a/src/ui/inc/FUi_Control.h b/src/ui/inc/FUi_Control.h new file mode 100644 index 0000000..5f7f4fb --- /dev/null +++ b/src/ui/inc/FUi_Control.h @@ -0,0 +1,817 @@ +// +// 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_Control.h + * @brief This is the header file for the _Control class. + * + * This header file contains the declarations of the %_Control class. + */ + +#ifndef _FUI_INTERNAL_CONTROL_H_ +#define _FUI_INTERNAL_CONTROL_H_ + +#include +#include +#include +#include "FUi_Types.h" +#include "FUiAnim_VisualElement.h" +#include "FUi_UiEventTypes.h" +#include "FUi_IUiEventListener.h" +#include "FUi_IKeyEventPreviewer.h" +#include "FUi_IKeyEventListener.h" +#include "FUi_ITouchEventPreviewer.h" +#include "FUi_ITouchEventListener.h" +#include "FUi_IFocusEventListener.h" +#include "FUi_INotificationEventPreviewer.h" +#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 { +template class ArrayListT; +template class HashMapT; +}}} + +namespace Tizen { namespace Ui { namespace Animations +{ +class _VisualElement; +class _ControlVisualElement; +class _IVisualElementDelegate; +}}} + +namespace Tizen { namespace Ui { namespace _Layout +{ +class LayoutContainer; +class Layout; +}}} + +namespace Tizen { namespace Ui { + +class _Window; +class _DataBindingContext; +class _AccessibilityContainer; +class _DragAndDropItem; +class _IDragAndDropEventListener; + +class _IControlDelegate +{ +public: + virtual ~_IControlDelegate(void){} + + // Queries + virtual Tizen::Graphics::Dimension GetContentSize(void) const = 0; + virtual Tizen::Graphics::FloatDimension GetContentSizeF(bool horizontalMode, bool verticalMode) const = 0; + virtual Tizen::Ui::Animations::HitTestResult HitTest(const Tizen::Graphics::FloatPoint& point) = 0; + virtual Tizen::Base::String GetDescription(void) const = 0; + + // Invoked by operations + virtual void OnDraw(void) = 0; + virtual Tizen::Graphics::Canvas* OnCanvasRequestedN(const Tizen::Graphics::FloatRectangle& bounds) = 0; + virtual Tizen::Graphics::Bitmap* OnCapturedBitmapRequestedN(void) = 0; + virtual result OnAttaching(const _Control* pParent) = 0; + virtual result OnAttached(void) = 0; + virtual void OnAttachingFailed(const _Control& parent) = 0; // [ToDo] Is this callback still necessary? + virtual result OnAttachingToMainTree(const _Control* pParent) = 0; + virtual result OnPreAttachedToMainTree(void) = 0; + virtual result OnAttachedToMainTree(void) = 0; + virtual result OnDetachingFromMainTree(void) = 0; + virtual result OnDetaching(void) = 0; + virtual result OnBoundsChanging(const Tizen::Graphics::Rectangle& bounds) = 0; + virtual result OnBoundsChanging(const Tizen::Graphics::FloatRectangle& bounds) = 0; + virtual void OnBoundsChanged(void) = 0; + 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; + virtual void OnChildBoundsChanged(const _Control& child) = 0; + virtual void OnChildVisibleStateChanged(const _Control& child) = 0; + virtual void OnChangeLayout(_ControlOrientation orientation) = 0; // [ToDo] Generalize orientation to screen. + virtual void OnChangeLayout(_ControlRotation rotation) = 0; + virtual void OnZOrderChanging(_ControlZOrderUpdate zOrderUpdate) = 0; + virtual void OnVisibleStateChanging(void) = 0; + virtual void OnVisibleStateChanged(void) = 0; + virtual void OnAncestorVisibleStateChanged(const _Control& control) = 0; + virtual void OnAncestorEnableStateChanged(const _Control& control) = 0; + virtual void OnAncestorInputEnableStateChanged(const _Control& control) = 0; + virtual void OnFontChanged(Tizen::Graphics::Font* pFont) = 0; + virtual void OnFontInfoRequested(unsigned long& style, int& size) =0; + virtual void OnFontInfoRequested(unsigned long& style, float& size) =0; + virtual void OnBackgroundColorChanged(Tizen::Graphics::Color& backgroundColor) = 0; + virtual void OnDrawFocus(void) = 0; + virtual void OnChildControlFocusMoved(const _Control& control) = 0; + virtual void OnDescendantControlFocusMoved(const _Control& control) = 0; + 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 + : public _ITouchEventListener + , public _ITouchEventPreviewer +{ +public: + virtual ~_IPropagatedTouchEventListener(void){} + + virtual void OnTouchPressHandled(const _Control& control) = 0; + 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 + : public _IKeyEventListener + , public _IKeyEventPreviewer +{ +public: + virtual ~_IPropagatedKeyEventListener(void){} + virtual bool OnPreviewKeyPressed(const _Control& source, const _KeyInfo& keyInfo) = 0; + virtual bool OnPreviewKeyReleased(const _Control& source, const _KeyInfo& keyInfo) = 0; + virtual bool TranslateKeyEventInfo(const _Control& source, _KeyInfo& keyInfo) = 0; +}; + +class _OSP_EXPORT_ _Control // Temp: export only for test + : public _IControlDelegate + , public _IFocusEventListener + , public _INotificationEventPreviewer + , public _INotificationEventListener + , public _PropertyBase + , virtual public Tizen::Base::Runtime::IEventListener + , virtual public _IUiEventListener + , virtual public _IUiEventPreviewer + , public _IPropagatedTouchEventListener + , public _IPropagatedKeyEventListener +{ +// Declare Properties + DECLARE_CLASS_BEGIN(_Control, _PropertyBase); + DECLARE_PROPERTY("Name", GetPropertyName, SetPropertyName); + DECLARE_CLASS_END(); + +// Property Getters/Setters + result SetPropertyName(const Variant& name); + Variant GetPropertyName(void) const; + +public: +// Constants + enum + { + MAX_LENGTH = 0xFFFF + }; + + enum VisitType + { + VISIT_UPWARD, + VISIT_DOWNWARD, + VISIT_STOP + }; + +// Type definitions + class Visitor + { + public: + virtual ~Visitor(void){} + virtual VisitType Visit(_Control& control) = 0; + }; + + typedef Tizen::Base::Collection::ArrayListT<_Control*> ControlList; + typedef Tizen::Base::Collection::ArrayListT<_Window*> WindowList; + typedef Tizen::Base::Collection::HashMapT<_TouchGestureDetector*, _TouchGestureDetectorState> GestureMap; + +public: +// Life Cycle + static _Control* CreateControlN(void); + virtual ~_Control(void); + +// Event Callbacks + virtual bool OnPreviewKeyPressed(const _Control& source, const _KeyInfo& keyInfo); + virtual bool OnPreviewKeyReleased(const _Control& source, const _KeyInfo& keyInfo); + virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo); + virtual bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo); + virtual bool TranslateKeyEventInfo(const _Control& source, _KeyInfo& keyInfo); + virtual _UiTouchEventDelivery OnPreviewTouchPressed(const _Control& source, const _TouchInfo& touchinfo); + 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 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); + +// Virtual Queries: Do not use directly. Use through delegate (GetControlDelegate()) + virtual Tizen::Graphics::Dimension GetContentSize(void) const; + virtual Tizen::Graphics::FloatDimension GetContentSizeF(bool horizontalMode, bool verticalMode) const; + virtual Tizen::Ui::Animations::HitTestResult HitTest(const Tizen::Graphics::FloatPoint& point); + virtual Tizen::Base::String GetDescription(void) const; + virtual float GetVerticalScrollPosition(void) const; + virtual float GetHorizontalScrollPosition(void) const; + +// Callbacks // [ToDo] Make these callbacks protected. + virtual void OnDraw(void); + virtual Tizen::Graphics::Canvas* OnCanvasRequestedN(const Tizen::Graphics::FloatRectangle& bounds); + virtual Tizen::Graphics::Bitmap* OnCapturedBitmapRequestedN(void); + virtual result OnAttaching(const _Control* pParent); + virtual result OnAttached(void); + virtual result OnAttachingToMainTree(const _Control* pParent); + virtual result OnPreAttachedToMainTree(void); + virtual result OnAttachedToMainTree(void); + virtual result OnDetachingFromMainTree(void); + virtual void OnAttachingFailed(const _Control& parent); + virtual result OnDetaching(void); + virtual result OnBoundsChanging(const Tizen::Graphics::Rectangle& bounds); + virtual result OnBoundsChanging(const Tizen::Graphics::FloatRectangle& bounds); + virtual void OnBoundsChanged(void); + 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); + virtual void OnChildBoundsChanged(const _Control& child); + virtual void OnChildVisibleStateChanged(const _Control& child); + virtual void OnChangeLayout(_ControlOrientation orientation); + virtual void OnChangeLayout(_ControlRotation rotation); + virtual void OnZOrderChanging(_ControlZOrderUpdate zOrderUpdate); + virtual void OnVisibleStateChanging(void); + virtual void OnVisibleStateChanged(void); + virtual void OnAncestorVisibleStateChanged(const _Control& control); + virtual void OnAncestorEnableStateChanged(const _Control& control); + virtual void OnAncestorInputEnableStateChanged(const _Control& control); + virtual void OnTouchPressHandled(const _Control& control); + virtual void OnTouchReleaseHandled(const _Control& control); + virtual void OnTouchMoveHandled(const _Control& control); + virtual void OnTouchCancelHandled(const _Control& control); + virtual void OnFontChanged(Tizen::Graphics::Font* pFont); + virtual void OnFontInfoRequested(unsigned long& style, int& size); + virtual void OnFontInfoRequested(unsigned long& style, float& size); + virtual void OnBackgroundColorChanged(Tizen::Graphics::Color& backgroundColor); + virtual void OnDrawFocus(void); + virtual void OnChildControlFocusMoved(const _Control& control); + virtual void OnDescendantControlFocusMoved(const _Control& control); + virtual bool IsChildControlFocusManage(void) const; + virtual void OnFocusableStateChanged(bool focusalbeState); + virtual void OnFocusModeStateChanged(void); + +// Control Hierarchy - Common + bool HasParent(void) const; + _Control* GetParent(void) const; + _ControlArea GetArea(void) const; + _ControlLayer GetLayer(void) const; + + bool IsAncestorOf(const _Control& control) const; + bool IsAttachedToMainTree(void) const; + _Window* GetRootWindow(void) const; + + void Accept(Visitor& visitor); + void Accept(Visitor& visitor) const; + +// Control Hierarchy + int GetChildIndex(const _Control& child) const; + _Control* GetChild(int index) const; + int GetChildCount(void) const; + + const ControlList& GetChildList(void) const; + ControlList& GetChildList(void); + + result AttachChild(_Control& child); + result InsertChildToBottom(_Control& child); + result InsertChildAfter(const _Control& targetChild, _Control& child); + result InsertChildBefore(const _Control& targetChild, _Control& child); + result DetachChild(_Control& child); + void DetachAllChildren(bool detachSystemChild = true, bool recursive = false); + result MoveChildToTop(const _Control& child); + result MoveChildToBottom(const _Control& child); + result MoveChildAfter(const _Control& targetChild, const _Control& child); + result MoveChildBefore(const _Control& targetChild, const _Control& child); + + result AttachOwnee(_Window& window); + void DetachOwnee(_Window& window); + void DetachAllOwnees(void); + + result SetChildAlwaysOnTop(_Control& child); + result SetChildAlwaysAtBottom(_Control& child); + result ResetChildLayer(_Control& child); + +// Control Hierarchy - System area: For system children, layout is not applyed. + result AttachSystemChild(_Control& child); + result DetachSystemChild(_Control& child); + +// Ownership + int GetOwneeCount(void) const; + _Window* GetOwnee(int index) const; + +// Handle + _ControlHandle GetHandle(void) const; + +// Name + Tizen::Base::String GetName(void) const; + void SetName(const Tizen::Base::String& name); + +// Event previewer/listener + template + T GetEventPreviewer(void) const + { + return GetEventPreviewer(_IntToType()); + } + + template + T GetEventListener(void) const + { + return GetEventListener(_IntToType()); + } + + template + void SetEventPreviewer(const T& t) + { + SetEventPreviewer(_IntToType(), t); + } + + template + void SetEventListener(const T& t) + { + SetEventListener(_IntToType(), t); + } + + void ResetEventListeners(void); + +// Drawing + void Draw(bool recursive = true); + void Show(void); + void Invalidate(void); + void Invalidate(bool recursive); + void Invalidate(const Tizen::Graphics::Rectangle& rect); + void Invalidate(const Tizen::Graphics::FloatRectangle& rect); + Tizen::Graphics::Canvas* GetCanvasN(void) const; + Tizen::Graphics::Canvas* GetCanvasN(const Tizen::Graphics::Rectangle& bounds) const; + Tizen::Graphics::Canvas* GetCanvasN(const Tizen::Graphics::FloatRectangle& bounds) const; + bool IsCalledGetCanvasN(void) const; + Tizen::Graphics::Canvas* GetClientCanvasN(void) const; + Tizen::Graphics::Color GetBackgroundColor(void) const; + void SetBackgroundColor(const Tizen::Graphics::Color& color); + void SetContentAreaBounds(const Tizen::Graphics::Rectangle& rect); + void SetContentAreaBounds(const Tizen::Graphics::FloatRectangle& rect); + Tizen::Graphics::Rectangle GetContentAreaBounds(void) const; + Tizen::Graphics::FloatRectangle GetContentAreaBoundsF(void) const; + Tizen::Graphics::Bitmap* GetCapturedBitmapN(bool includeChildren) const; + Tizen::Graphics::Rectangle GetInvalidatedBounds(void) const; + Tizen::Graphics::FloatRectangle GetInvalidatedBoundsF(void) const; + void SetDrawWhenVisible(bool draw); + bool IsDrawWhenVisible(void) const; + void SetTerminatingOrder(bool postOrderTraversal); + bool IsPostOrderTraversal(void) const; + +// Font + result SetFont(const Tizen::Base::String& fontName); + Tizen::Graphics::Font* GetFallbackFont(void); + Tizen::Base::String GetFont(void) const; + result SetFontFromFile(const Tizen::Base::String& fileName); + Tizen::Base::String GetFontFile(void) const; + +// Enable + bool IsEnabled(void) const; + bool GetEnableState(void) const; + void SetEnableState(bool enableState); + + bool IsEventEnabled(void) const; + void SetEventEnableState(bool enableState); + + bool IsInputEventEnabled(void) const; + bool GetInputEnableState(void) const; + void LockInputEvent(void); + void UnlockInputEvent(void); + +// Visible + bool IsVisible(void) const; + bool GetVisibleState(void) const; + void SetVisibleState(bool visibleState); + +// Focus + bool IsFocusable(void) const; + void SetFocusable(bool focusable); + bool IsFocused(void) const; + result SetFocused(bool on = true); + bool IsNativeObjectFocusable(void) const; + void SetNativeObjectFocusable(bool focusable); + void SetFocusWindowActivationChecked(bool isChecked); + bool IsFocusWindowActivationChecked(void) const; + +// Focus UI + void SetPreviousFocus(_Control* pPreviousFocus); + void SetNextFocus(_Control* pNextFocus); + _Control* GetPreviousFocus() const; + _Control* GetNextFocus() const; + void DrawFocus(void); + Tizen::Base::Collection::IListT<_Control*>* GetFocusListN(void) const; + void RemoveFocusRing(bool needToDelete = false); + bool HasFocusRing(void); + bool IsFocusModeStateEnabled(void) const; + void SetFocusNavigateEnabled(bool enable); + bool IsFocusNavigateEnabled(void) const; + +// Clipping + bool IsClipToParent(void) const; + result SetClipToParent(bool clipToParent); + result SetClipChildrenEnabled(bool clipChildren); + +// Geometry + bool IsMovable(void) const; + bool IsResizable(void) const; + void SetMovable(bool movable); + void SetResizable(bool resizable); + + Tizen::Graphics::Rectangle GetBounds(void) const; + Tizen::Graphics::FloatRectangle GetBoundsF(void) const; + Tizen::Graphics::Point GetPosition(void) const; + Tizen::Graphics::FloatPoint GetPositionF(void) const; + Tizen::Graphics::Dimension GetSize(void) const; + Tizen::Graphics::FloatDimension GetSizeF(void) const; + result SetBounds(const Tizen::Graphics::Rectangle& bounds, bool callBoundsChangeCallbacks = true); + result SetBounds(const Tizen::Graphics::FloatRectangle& bounds, bool callBoundsChangeCallbacks = true); + result SetPosition(const Tizen::Graphics::Point& position); + 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; + Tizen::Graphics::Dimension GetMaximumSize(void) const; + Tizen::Graphics::FloatDimension GetMaximumSizeF(void) const; + result SetMinimumSize(const Tizen::Graphics::Dimension& newMinSize); + result SetMinimumSize(const Tizen::Graphics::FloatDimension& newMinSize); + result SetMaximumSize(const Tizen::Graphics::Dimension& newMaxSize); + result SetMaximumSize(const Tizen::Graphics::FloatDimension& newMaxSize); + Tizen::Graphics::Point ConvertToControlPosition(const Tizen::Graphics::Point& screenPosition) const; + Tizen::Graphics::FloatPoint ConvertToControlPosition(const Tizen::Graphics::FloatPoint& screenPosition) const; + Tizen::Graphics::Point ConvertToScreenPosition(const Tizen::Graphics::Point& controlPosition) const; + Tizen::Graphics::FloatPoint ConvertToScreenPosition(const Tizen::Graphics::FloatPoint& controlPosition) const; + + Tizen::Graphics::Rectangle GetClientBounds(void) const; + Tizen::Graphics::FloatRectangle GetClientBoundsF(void) const; + Tizen::Graphics::Rectangle GetClientBounds(const Tizen::Graphics::Dimension& size) const; + Tizen::Graphics::FloatRectangle GetClientBoundsF(const Tizen::Graphics::FloatDimension& size) const; + Tizen::Graphics::Rectangle GetAbsoluteBounds(bool recalcAlways = false) const; + Tizen::Graphics::FloatRectangle GetAbsoluteBoundsF(bool recalcAlways = false) const; + result SetClientBounds(const Tizen::Graphics::Rectangle& bounds); + result SetClientBounds(const Tizen::Graphics::FloatRectangle& bounds); + 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; + _Control* GetTopmostChildAt(const Tizen::Graphics::Point& point) const; + +// Layout + void PartialUpdateLayout(void); + void UpdateLayout(void); + bool IsLayoutable(void) const; + _Layout::LayoutContainer& GetLayoutContainer(void) const; + _Layout::Layout* GetLayout(void) const; + result AddLayout(_Layout::Layout& layout); + result SetCurrentLayout(_Layout::Layout& layout); + void SetUpdateLayoutState(bool state); + +// Orientation + void ChangeLayout(_ControlOrientation orientation, bool callRotation = true); + void ChangeLayout(_ControlRotation rotation); + _ControlOrientation GetOrientation(void) const; + virtual bool IsLayoutChangable(void) const; + virtual bool IsOrientationRoot(void) const; + +// Touch, Gesture + result AddGestureDetector(const _TouchGestureDetector& gestureDetector); + result RemoveGestureDetector(const _TouchGestureDetector& gestureDetector); + Tizen::Base::Collection::IListT<_TouchGestureDetector*>* GetGestureDetectorList(void) const; + bool IsDelayedTouchEventEnabled(void) const; + bool IsCancelOnGestureSuccess(void) const; + bool IsPossibleToSendDelayedTouchEvent(void) const; + bool IsSentDelayedEvent(void) const; + void SetSentDelayedEvent(bool sent); + void SetSendingDelayedEvent(bool sending); + bool IsSendingDelayedEvent(void) const; + void AddTouchInfo(const _TouchInfo& touchInfo); + Tizen::Base::Collection::IListT<_TouchInfo*>* GetTouchInfoList(void); + result AddStartedGestureDetector(const _TouchGestureDetector& gestureDetector, _TouchGestureDetectorState state); + result ClearStartedGestureDetectorList(void); + result SetStartedGestureDetector(const _TouchGestureDetector& gestureDetector, _TouchGestureDetectorState state); + Tizen::Base::Collection::IMapEnumeratorT <_TouchGestureDetector*, _TouchGestureDetectorState>* GetStartedGestureDetectorEnumeratorN(void) const; + Tizen::Base::Collection::IListT <_TouchGestureDetector*>* GetStartedGestureDetectorListN(void) const; + + void SetMultiTouchEnabled(bool enabled); + bool IsMultiTouchEnabled(void) const; + void SetTouchCapture(bool allowOutOfBounds, bool allowOwnerBounds); + void ReleaseTouchCapture(void); + + bool IsDragEnabled(void) const; + bool IsDropEnabled(void) const; + void SetDragEnabled(bool enabled); + void SetDropEnabled(bool enabled); + + void SetTouchPressThreshold(float distance); + float GetTouchPressThreshold(void) const; + int GetTouchPressThresholdPixel(void) const; + + void SetChangingEventTarget(bool isChangingEventTarget); + bool GetChangingEventTarget(void) const; + +// Feedback + void SetEffectSoundEnabled(bool enable); + bool IsEffectSoundEnabled(void) const; + +// Data binding + _DataBindingContext* GetDataBindingContext(void); + +// Accessibility + _AccessibilityContainer* GetAccessibilityContainer(void); + +// User data: Already used by impl. + void* GetUserData(void) const; + void SetUserData(void* pUserData); + +// Delegate Already used by impl. + void SetControlDelegate(_IControlDelegate& delegate); + void ResetControlDelegate(void); + _IControlDelegate& GetControlDelegate(void) const; + + void SetPropagatedTouchEventListener(_IPropagatedTouchEventListener* pListener); + _IPropagatedTouchEventListener* GetPropagatedTouchEventListener(void) const; + + void SetPropagatedKeyEventListener(_IPropagatedKeyEventListener* pListener); + _IPropagatedKeyEventListener* GetPropagatedKeyEventListener(void) const; + +// Visual element: Do not use visual element directly. + void SetVisualElement(Animations::_ControlVisualElement* pVisualElement); + 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, bool animating = false); + result UpdateBoundsOfVisualElement(const Tizen::Graphics::FloatRectangle& controlBounds); + result AdjustAbsoluteBounds(_Control& control, bool update = true); + result StartAttaching(_Control& child, _ControlArea area); + result EndAttaching(_Control& child); + void SetParent(_Control* pParent); + + bool IsCalledCallAttachingToMainTree(void) const; + void SetCalledCallAttachingToMainTree(bool isAttaching); + bool IsCalledCallPreAttachedToMainTree(void) const; + void SetCalledCallPreAttachedToMainTree(bool isAttached); + 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(_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; + _INotificationEventPreviewer* GetEventPreviewer(_IntToType<_UI_EVENT_NOTIFICAITON>) const; + + _IKeyEventListener* GetEventListener(_IntToType<_UI_EVENT_KEY>) const; + _IFocusEventListener* GetEventListener(_IntToType<_UI_EVENT_FOCUS>) const; + _INotificationEventListener* GetEventListener(_IntToType<_UI_EVENT_NOTIFICAITON>) const; + + void SetEventPreviewer(_IntToType<_UI_EVENT_TOUCH>, _ITouchEventPreviewer* pPreviewer); + void SetEventPreviewer(_IntToType<_UI_EVENT_KEY>, _IKeyEventPreviewer* pPreviewer); + void SetEventPreviewer(_IntToType<_UI_EVENT_NOTIFICAITON>, _INotificationEventPreviewer* pPreviewer); + + 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; + void UpdateFocusList(void); + +private: + bool __needRecalcRootWindow; + bool __needRecalcAbsBounds; + bool __needRecalcAbsBoundsF; + _Window* __pRootWindow; + + _ControlHandle __controlHandle; + Tizen::Base::String __name; + + _Control* __pParent; + ControlList* __pChildren; + WindowList* __pOwnees; + + Tizen::Graphics::FloatRectangle __bounds; + Tizen::Graphics::FloatRectangle __contentAreaBounds; + Tizen::Graphics::FloatRectangle __clientBounds; + Tizen::Graphics::Rectangle __absoluteBounds; + Tizen::Graphics::FloatRectangle __absoluteBoundsF; + Tizen::Graphics::FloatRectangle __invalidatedBounds; + Tizen::Graphics::FloatDimension __minSize; + Tizen::Graphics::FloatDimension __maxSize; + Tizen::Graphics::Color __backgroundColor; + + bool __movable; + bool __resizable; + bool __focusable; + bool __nativeObjectFocusable; + bool __enabledState; + bool __visibleState; + bool __initVisibleState; + bool __clipToParent; + bool __multiTouchEnabled; + bool __dragEnabled; + bool __dropEnabled; + bool __drawWhenVisible; + bool __isPostOrderTraversal; + bool __isCalledCallOnAttachingToMainTree; + bool __isCalledCallOnPreAttachedToMainTree; + bool __isCalledCallOnAttachedToMainTree; + bool __isSetClientBounds; + bool __isCalledGetCanvasN; + bool __isFocusMode; + bool __isNavigatable; + bool __isFocusWindowActivationChecked; + bool __isChangedPositionByUser; + + class ControlVisualElementContentProvider; + ControlVisualElementContentProvider* __pVisualElementContentProvider; + Animations::_ControlVisualElement* __pVisualElement; + + class ControlVisualElementEventListener; + ControlVisualElementEventListener* __pVisualElementEventListener; + + class LayoutItemHandler; + LayoutItemHandler* __pLayoutItemHandler; + _Layout::Layout* __pPortraitLayout; + _Layout::Layout* __pLandscapeLayout; + _Layout::LayoutContainer* __pLayoutContainer; + + _ControlArea __area; + _ControlLayer __layer; + _ControlOrientation __orientation; + _ControlRotation __rotation; + + _ITouchEventPreviewer* __pTouchEventPreviewer; + _IKeyEventPreviewer* __pKeyEventPreviewer; + _INotificationEventPreviewer* __pNotificationEventPreviewer; + + _IKeyEventListener* __pKeyEventListener; + _IFocusEventListener* __pFocusEventListener; + _INotificationEventListener* __pNotificationEventListener; + + Tizen::Base::Collection::IListT<_TouchGestureDetector*>* __pCoreGestureDetectors; + GestureMap* __pDetectStartedGestureMap; + Tizen::Base::Collection::IListT<_TouchInfo*>* __pDelayedTouchInfoList; + int __touchMoveAllowance; + float __pressThresHold; + + int __inputLockRefCount; + int __screenDpi; + bool __isSentDelayedEvent; + bool __isSendingDelayedEvent; + bool __isChangingEventTarget; + + _DataBindingContext* __pDataBindingContext; + _IControlDelegate* __pControlDelegate; + _IPropagatedTouchEventListener* __pPropagatedTouchEventListener; + _IPropagatedKeyEventListener* __pPropagatedKeyEventListener; + void* __pUserData; + _AccessibilityContainer* __pAccessibilityContainer; + + bool __destroying; + bool __isEventEnableState; + + bool __isEffectSoundEnabled; + + bool __isControlFontChanged; + Tizen::Graphics::Font* __pFont; + Tizen::Base::String __fontName; + Tizen::Base::String __fontFileName; + + _Control* __pPreviousFocus; + _Control* __pNextFocus; + + _Window* __pDragWindow; + bool __isDragAndDropSource; + + struct _VisualElementDeleter + { + void operator()(Tizen::Ui::Animations::VisualElement* pVisualElement) + { + if (pVisualElement) + { + pVisualElement->Destroy(); + } + } + }; + std::unique_ptr __pFocusVisualElement; + std::unique_ptr > __pNewBacktrace; + std::unique_ptr > __pDeleteBacktrace; + + std::unique_ptr<_DragAndDropEvent> __pDragAndDropEvent; + + friend class _Window; + friend class _ControlManager; + friend class LayoutItemHandler; +}; // _Control + +}} // Tizen::Ui + +#endif // _FUI_INTERNAL_CONTROL_H_ diff --git a/src/ui/inc/FUi_ControlImpl.h b/src/ui/inc/FUi_ControlImpl.h new file mode 100644 index 0000000..ad5764d --- /dev/null +++ b/src/ui/inc/FUi_ControlImpl.h @@ -0,0 +1,505 @@ +// +// 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_ControlImpl.h + * @brief This is the header file for the _ControlImpl class. + * + * This header file contains the declarations of the %_ControlImpl class. + */ + +#ifndef _FUI_INTERNAL_CONTROL_IMPL_H_ +#define _FUI_INTERNAL_CONTROL_IMPL_H_ + +#include +#include "FUi_Control.h" + +namespace Tizen { namespace Base { namespace Collection +{ +template class LinkedListT; +}}} + +namespace Tizen { namespace Ui { namespace Animations +{ +class VisualElement; +}}} + +namespace Tizen { namespace Ui +{ + +class _ContainerImpl; +class _Control; +class _TouchInfo; +class _TouchLongPressGestureDetector; +class _TouchFlickGestureDetector; +class TouchGestureDetector; +class _AccessibilityContainer; +class _AccessibilityContainerImpl; +class AccessibilityContainer; + +class _OSP_EXPORT_ _ControlImpl + : public Tizen::Base::Object + , public _IControlDelegate +{ +// Size Info +public: + class SizeInfo + { + public: + virtual ~SizeInfo(void); + virtual Tizen::Graphics::Dimension GetDefaultMinimumSize(_ControlOrientation orientation) const; // default: (0, 0) + virtual Tizen::Graphics::FloatDimension GetDefaultMinimumSizeF(_ControlOrientation orientation) const; // default: (0, 0) + virtual Tizen::Graphics::Dimension GetDefaultMaximumSize(_ControlOrientation orientation) const; // default: (short_max, short_max) + virtual Tizen::Graphics::FloatDimension GetDefaultMaximumSizeF(_ControlOrientation orientation) const; // default: (short_max, short_max) + virtual Tizen::Graphics::Dimension GetMinimumSizeLimit(_ControlOrientation orientation) const; // default: (0, 0) + virtual Tizen::Graphics::FloatDimension GetMinimumSizeLimitF(_ControlOrientation orientation) const; // default: (0, 0) + virtual Tizen::Graphics::Dimension GetMaximumSizeLimit(_ControlOrientation orientation) const; // default: (short_max, short_max) + virtual Tizen::Graphics::FloatDimension GetMaximumSizeLimitF(_ControlOrientation orientation) const; // default: (short_max, short_max) + result CheckInitialSizeValid(const Tizen::Graphics::Dimension& size,_ControlOrientation orientation) const; + result CheckInitialSizeValidF(const Tizen::Graphics::FloatDimension& size,_ControlOrientation orientation) const; + }; + +// Constants +public: + static Tizen::Graphics::Rectangle GetErrorBounds(void); + static Tizen::Graphics::FloatRectangle GetErrorBoundsF(void); + static CompositeMode GetErrorCompositeMode(void); + static Tizen::Graphics::Color GetErrorChromaKeyColor(void); + static Tizen::Graphics::Dimension GetErrorMinimumSize(void); + static Tizen::Graphics::FloatDimension GetErrorMinimumSizeF(void); + static Tizen::Graphics::Dimension GetErrorMaximumSize(void); + static Tizen::Graphics::FloatDimension GetErrorMaximumSizeF(void); + static const SizeInfo& GetFullScreenSizeInfo(void); + +// Life Cycle +public: + static _ControlImpl* CreateControlImplN(Control& control); + virtual ~_ControlImpl(void); + + virtual result Destroy(void); + static _ControlImpl* GetInstance(Control& control); + static const _ControlImpl* GetInstance(const Control& control); + +// Common +public: + virtual const char* GetPublicClassName(void) const; + virtual const Control& GetPublic(void) const; + virtual Control& GetPublic(void); + virtual const _Control& GetCore(void) const; + virtual _Control& GetCore(void); + +// Public Event Listeners + result AddFocusEventListener(IFocusEventListener& listener); + result AddKeyEventListener(IKeyEventListener& listener); + result AddTouchEventListener(ITouchEventListener& listener); + result AddDragDropEventListener(IDragDropEventListener& listener); + result AddDragDropEventListener(IDragDropEventListenerF& listener); + result AddTouchModeChangedEventListener(ITouchModeChangedEventListener& listener); + result RemoveFocusEventListener(IFocusEventListener& listener); + result RemoveKeyEventListener(IKeyEventListener& listener); + result RemoveTouchEventListener(ITouchEventListener& listener); + result RemoveDragDropEventListener(IDragDropEventListener& listener); + result RemoveDragDropEventListenerF(IDragDropEventListenerF& listener); + result RemoveTouchModeChangedEventListener(ITouchModeChangedEventListener& listener); + result AddGestureDetector(const TouchGestureDetector& gestureDetector); + result RemoveGestureDetector(const TouchGestureDetector& gestureDetector); + Tizen::Base::Collection::IListT* GetGestureDetectorList(void) const; + + // [ToDo] Rename API: These APIs return collection. + Tizen::Base::Collection::LinkedListT * GetTouchEventListener(void) const; + Tizen::Base::Collection::LinkedListT * GetKeyEventListener(void) const; + Tizen::Base::Collection::LinkedListT * GetDragDropEventListener(void) const; + +// Queries + virtual Tizen::Graphics::Dimension GetContentSize(void) const; + virtual Tizen::Graphics::FloatDimension GetContentSizeF(bool horizontalMode, bool verticalMode) const; + virtual Tizen::Ui::Animations::HitTestResult HitTest(const Tizen::Graphics::FloatPoint& point); + virtual Tizen::Base::String GetDescription(void) const; + +// Callbacks + virtual void OnDraw(void); + virtual Tizen::Graphics::Canvas* OnCanvasRequestedN(const Tizen::Graphics::FloatRectangle& size); + virtual Tizen::Graphics::Bitmap* OnCapturedBitmapRequestedN(void); + virtual result OnAttaching(const _Control* pParent); + virtual void OnAttachingFailed(const _Control& parent); + virtual result OnAttached(void); + virtual result OnAttachingToMainTree(const _Control* pParent); + virtual result OnPreAttachedToMainTree(void); + virtual result OnAttachedToMainTree(void); + virtual result OnDetachingFromMainTree(void); + virtual result OnDetaching(void); + virtual result OnBoundsChanging(const Tizen::Graphics::Rectangle& bounds); + virtual result OnBoundsChanging(const Tizen::Graphics::FloatRectangle& bounds); + virtual void OnBoundsChanged(void); + 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); + virtual void OnChildBoundsChanged(const _Control& child); + virtual void OnChildVisibleStateChanged(const _Control& child); + virtual void OnChangeLayout(_ControlOrientation orientation); + virtual void OnChangeLayout(_ControlRotation rotation); + virtual void OnZOrderChanging(_ControlZOrderUpdate zOrderUpdate); + virtual void OnVisibleStateChanging(void); + virtual void OnVisibleStateChanged(void); + virtual void OnAncestorVisibleStateChanged(const _Control& control); + virtual void OnAncestorEnableStateChanged(const _Control& control); + virtual void OnAncestorInputEnableStateChanged(const _Control& control); + virtual void OnTouchPressHandled(const _Control& control); + virtual void OnTouchReleaseHandled(const _Control& control); + virtual void OnTouchMoveHandled(const _Control& control); + virtual void OnTouchCancelHandled(const _Control& control); + virtual void OnFontChanged(Tizen::Graphics::Font* pFont); + virtual void OnFontInfoRequested(unsigned long& style, int& size); + virtual void OnFontInfoRequested(unsigned long& style, float& size); + virtual void OnBackgroundColorChanged(Tizen::Graphics::Color& backgroundColor); + virtual void OnDrawFocus(void); + virtual void OnChildControlFocusMoved(const _Control& control); + virtual void OnDescendantControlFocusMoved(const _Control& control); + virtual bool IsChildControlFocusManage(void) const; + virtual void OnFocusableStateChanged(bool focusalbeState); + virtual void OnFocusModeStateChanged(void); + +// Event Callbacks + virtual bool TranslateKeyEventInfo(const _ControlImpl& source, _KeyInfo& keyInfo); + virtual bool OnKeyPressed(const _ControlImpl& source, const _KeyInfo& keyInfo); + virtual bool OnKeyReleased(const _ControlImpl& source, const _KeyInfo& keyInfo); + + virtual bool OnPreviewKeyPressed(const _ControlImpl& source, const _KeyInfo& keyInfo); + virtual bool OnPreviewKeyReleased(const _ControlImpl& source, const _KeyInfo& keyInfo); + + virtual bool OnTouchPressed(const _ControlImpl& source, const _TouchInfo& touchinfo); + 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 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; + +// Drawing + result Draw(bool recursive = true); + result Show(void); + void Invalidate(bool recursive); + void Invalidate(const Tizen::Graphics::Rectangle& rect); + void Invalidate(const Tizen::Graphics::FloatRectangle& rect); + Tizen::Graphics::Canvas* GetCanvasN(void) const; + Tizen::Graphics::Canvas* GetCanvasN(const Tizen::Graphics::Rectangle& bounds) const; + Tizen::Graphics::Canvas* GetCanvasN(const Tizen::Graphics::FloatRectangle& bounds) const; + Tizen::Graphics::Canvas* GetClientCanvasN(void) const; + void RequestRedraw(bool show) const; + + virtual bool IsOpaque(void) const; + Tizen::Graphics::Color GetForegroundColor(void) const; + Tizen::Graphics::Color GetBackgroundColor(void) const; + void SetForegroundColor(const Tizen::Graphics::Color& color); + void SetBackgroundColor(const Tizen::Graphics::Color& color); + + int GetFontSize(void) const; + void SetFontSize(int fontSize); + +// Font + result SetFont(const Tizen::Base::String& fontName); + Tizen::Base::String GetFont(void) const; + result SetFontFromFile(const Tizen::Base::String& fileName); + Tizen::Base::String GetFontFile(void) const; + +// Feedback + void SetEffectSoundEnabled(bool enable); + bool IsEffectSoundEnabled(void) const; + +// Enable + bool IsEnabled(void) const; + bool GetEnableState(void) const; + void SetEnableState(bool enableState); + + bool IsInputEventEnabled(void) const; + bool GetInputEnableState(void) const; + +// Visible + bool IsVisible(void) const; + bool GetVisibleState(void) const; + result SetVisibleState(bool visibleState); + +// Focus + bool IsFocusable(void) const; + bool IsFocused(void) const; + void SetFocusableChangable(bool focusableChangable); + result SetFocusable(bool focusable); + result SetFocused(void); + +// Focus UI + void SetPreviousFocus(_ControlImpl* pPreviousFocus); + void SetNextFocus(_ControlImpl* pNextFocus); + _ControlImpl* GetPreviousFocus(void) const; + _ControlImpl* GetNextFocus(void) const; + +// Clipping + bool IsClipToParent(void) const; + result SetClipToParent(bool clipToParent); + +// Geometry + bool IsMovable(void) const; + bool IsResizable(void) const; + + Tizen::Graphics::Rectangle GetBounds(void) const; + Tizen::Graphics::FloatRectangle GetBoundsF(void) const; + Tizen::Graphics::Point GetPosition(void) const; + Tizen::Graphics::FloatPoint GetPositionF(void) const; + Tizen::Graphics::Dimension GetSize(void) const; + Tizen::Graphics::FloatDimension GetSizeF(void) const; + 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 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); + result SetSize(const Tizen::Graphics::FloatDimension& size); + + Tizen::Graphics::Dimension GetMinimumSize(void) const; + Tizen::Graphics::FloatDimension GetMinimumSizeF(void) const; + Tizen::Graphics::Dimension GetMaximumSize(void) const; + Tizen::Graphics::FloatDimension GetMaximumSizeF(void) const; + result SetMinimumSize(const Tizen::Graphics::Dimension& newMinSize); + result SetMinimumSize(const Tizen::Graphics::FloatDimension& newMinSize); + result SetMaximumSize(const Tizen::Graphics::Dimension& newMaxSize); + result SetMaximumSize(const Tizen::Graphics::FloatDimension& newMaxSize); + Tizen::Graphics::Point ConvertToControlPosition(const Tizen::Graphics::Point& screenPosition) const; + Tizen::Graphics::FloatPoint ConvertToControlPosition(const Tizen::Graphics::FloatPoint& screenPosition) const; + Tizen::Graphics::Point ConvertToScreenPosition(const Tizen::Graphics::Point& controlPosition) const; + Tizen::Graphics::FloatPoint ConvertToScreenPosition(const Tizen::Graphics::FloatPoint& controlPosition) const; + + Tizen::Graphics::Rectangle GetClientBounds(void) const; + Tizen::Graphics::FloatRectangle GetClientBoundsF(void) const; + Tizen::Graphics::Rectangle GetAbsoluteBounds(void) const; + Tizen::Graphics::FloatRectangle GetAbsoluteBoundsF(void) const; + result SetClientBounds(const Tizen::Graphics::Rectangle& bounds); + result SetClientBounds(const Tizen::Graphics::FloatRectangle& bounds); + + virtual Tizen::Graphics::Dimension GetMinimumSizeLimit(void) const; + virtual Tizen::Graphics::FloatDimension GetMinimumSizeLimitF(void) const; + virtual Tizen::Graphics::Dimension GetMaximumSizeLimit(void) const; + virtual Tizen::Graphics::FloatDimension GetMaximumSizeLimitF(void) const; + + void SetContentAreaBounds(const Tizen::Graphics::Rectangle& rect); + void SetContentAreaBounds(const Tizen::Graphics::FloatRectangle& rect); + Tizen::Graphics::Rectangle GetContentAreaBounds(void) const; + Tizen::Graphics::FloatRectangle GetContentAreaBoundsF(void) const; + + Tizen::Graphics::Bitmap* GetCapturedBitmapN(void) const; + Tizen::Graphics::Rectangle GetInvalidatedBounds(void) const; + Tizen::Graphics::FloatRectangle GetInvalidatedBoundsF(void) const; + + bool Contains(const Tizen::Graphics::Point& point) const; + bool Contains(const Tizen::Graphics::FloatPoint& point) const; + + bool GetBuilderBounds(_ControlOrientation orientation, Tizen::Graphics::Rectangle& bounds) const; + bool GetBuilderBoundsF(_ControlOrientation orientation, Tizen::Graphics::FloatRectangle& bounds) const; + result SetBuilderBounds(_ControlOrientation orientation, const Tizen::Graphics::Rectangle& bounds); + result SetBuilderBounds(_ControlOrientation orientation, const Tizen::Graphics::FloatRectangle& bounds); + void UpdateBuilderBounds(const Tizen::Graphics::FloatRectangle& bounds); + void UpdateBuilderSize(const Tizen::Graphics::FloatDimension& dimension); + void UpdateBuilderPosition(const Tizen::Graphics::FloatPoint& position); + _ControlOrientation GetUiBuilderOrientation(void) const; + +// Layout + bool IsLayoutable(void) const; + _Layout::LayoutContainer& GetLayoutContainer(void) const; + +// Key, Touch, Gesture + bool IsInTouchMode(void) const; + bool IsDragEnabled(void) const; + bool IsDropEnabled(void) const; + void SetDragEnabled(bool enabled); + void SetDropEnabled(bool enabled); + bool IsMultiTouchEnabled(void) const; + void SetMultiTouchEnabled(bool enabled); + result GenerateKeyEvent(KeyState keyState, _KeyCode keyCode); + result GenerateTouchEvent(const _TouchInfo& touchInfo); + +// Name + Tizen::Base::String GetName(void) const; + void SetName(const Tizen::Base::String& name); + +// Use Event + void SendUserEvent(RequestId requestId, const Tizen::Base::Collection::IList* pArgs) const; + +// Event Consumming + void ConsumeInputEvent(void); + ITouchEventListener* GetDefaultTouchEventListener(void) const; + IKeyEventListener* GetDefaultKeyEventListener(void) const; + void SetDefaultKeyEventListener(IKeyEventListener* pDefaultListener); + void SetDefaultTouchEventListener(ITouchEventListener* pDefaultListener); + +// Control Animator + Animations::ControlAnimator* GetControlAnimator(void) const; + +// Control VisualElement + Tizen::Ui::Animations::VisualElement* GetVisualElement(void) const; + + AccessibilityContainer* GetAccessibilityContainer(void); +// Deprecated APIs + Tizen::Ui::CompositeMode GetCompositeMode(void) const; + result SetCompositeMode(Tizen::Ui::CompositeMode compositeMode); + Tizen::Graphics::Color GetChromaKeyColor(void) const; + result SetChromaKeyColor(Tizen::Graphics::Color chromaKeyColor); + + result SetPublicPropagatedTouchEventListener(IPropagatedTouchEventListener* pListener); + IPropagatedTouchEventListener* GetPublicPropagatedTouchEventListener(void) const; + + result SetPublicPropagatedKeyEventListener(IPropagatedKeyEventListener* pListener); + IPropagatedKeyEventListener* GetPublicPropagatedKeyEventListener(void) const; + + void SetTouchPressThreshold(float distance); + 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. + + typedef Tizen::Base::Collection::LinkedListT PublicEventListenerList; + typedef Tizen::Base::Collection::ArrayListT<_Control*> ControlList; + PublicEventListenerList* CreatePublicEventListenerListN(void) const; + + void SetMovable(bool movable); + void SetResizable(bool resizable); + +// Initializing Impl's bounds + result InitializeBoundsProperties(const SizeInfo& sizeInfo, _ControlOrientation orientation); + result InitializeBoundsProperties(const SizeInfo& sizeInfo, const Tizen::Graphics::Rectangle& bounds, _ControlOrientation orientation); + result InitializeBoundsPropertiesF(const SizeInfo& sizeInfo, const Tizen::Graphics::FloatRectangle& bounds, _ControlOrientation orientation); + result InitializeBoundsProperties(const SizeInfo& sizeInfo, const Tizen::Graphics::Dimension& size, _ControlOrientation orientation); + result InitializeBoundsPropertiesF(const SizeInfo& sizeInfo, const Tizen::Graphics::FloatDimension& size, _ControlOrientation orientation); + + bool IsInputEventConsumed(void) const; + void ResetInputEventConsumed(void); + + virtual result OnTouchEventListenerAdded(void); + virtual result OnTouchEventListenerRemoved(void); + + virtual void OnFocusEventListenerAdded(IFocusEventListener& listener); + virtual void OnFocusEventListenerRemoved(IFocusEventListener& listener); + + bool CallOnTouchPressed(const _Control& source, const _TouchInfo& touchinfo); + bool CallOnTouchReleased(const _Control& source, const _TouchInfo& touchinfo); + bool CallOnTouchMoved(const _Control& source, const _TouchInfo& touchinfo); + bool CallOnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo); + +private: + _ControlImpl(const _ControlImpl& rhs); + _ControlImpl& operator =(const _ControlImpl& rhs); + + bool SendNotification(const _ControlImpl& source, Tizen::Base::Collection::IList* pArgs); + + // [ToDo] If not necessary remove. + bool HasCore(void) const; + result SetCore(_Control& core); + void ResetCore(bool deallocate = false); + + void Dispose(bool deallocateCore); + +private: + Tizen::Graphics::FloatRectangle __oldBounds; + Control* __pControlPublic; + _Control* __pControlCore; + Tizen::Ui::Animations::ControlAnimator* __pControlAnimator; + Tizen::Ui::Animations::VisualElement* __pCustomVisualElement; + + PublicEventListenerList* __pPublicFocusEventListeners; + PublicEventListenerList* __pPublicKeyEventListeners; + PublicEventListenerList* __pPublicTouchEventListeners; + PublicEventListenerList* __pPublicDragDropEventListeners; + PublicEventListenerList* __pPublicTouchModeChangedEventListeners; + + IKeyEventListener* __pDefaultKeyEventListener; + ITouchEventListener* __pDefaultTouchEventListener; + + Tizen::Graphics::Color __foregroundColor; + int __fontSize; + + bool __inputEventConsumed; + bool __focusableChangable; + bool __destroying; + + class CoreEventListener; + CoreEventListener* __pCoreEventListener; + + class CoreKeyEvent; + CoreKeyEvent* __pCoreKeyEvent; + + class CoreTouchEvent; + CoreTouchEvent* __pCoreTouchEvent; + + class CoreFocusEvent; + CoreFocusEvent* __pCoreFocusEvent; + + class CoreGestureEvent; + CoreGestureEvent* __pCoreGestureEvent; + + class _PropagatedTouchEventListener; + _PropagatedTouchEventListener* __pPropagatedTouchEventListener; + + class _PropagatedKeyEventListener; + _PropagatedKeyEventListener* __pPropagatedKeyEventListener; + + Tizen::Graphics::FloatRectangle* __pBuilderPortraitBounds; + Tizen::Graphics::FloatRectangle* __pBuilderLandscapeBounds; + + _TouchFlickGestureDetector* __pFlickGestureDetector; + _TouchLongPressGestureDetector* __pLongPressGestureDetector; + Tizen::Base::Collection::IListT* __pPublicGestureDetectors; + _AccessibilityContainerImpl* __pAccessibilityContainerImpl; + + IPropagatedTouchEventListener* __pPublicPropagatedTouchEventListener; + IPropagatedKeyEventListener* __pPublicPropagatedKeyEventListener; + + friend class _ContainerImpl; +}; // _ControlImpl + +}} // Tizen::Ui + +#endif // _FUI_INTERNAL_CONTROL_IMPL_H_ diff --git a/src/ui/inc/FUi_ControlImplManager.h b/src/ui/inc/FUi_ControlImplManager.h new file mode 100644 index 0000000..2010b9d --- /dev/null +++ b/src/ui/inc/FUi_ControlImplManager.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_ControlImplManager.h + * @brief This is the header file for the _ControlImplManager class. + * + * This header file contains the declarations of the %_ControlImplManager class. + */ + +#ifndef _FUI_INTERNAL_CONTROL_IMPL_MANAGER_H_ +#define _FUI_INTERNAL_CONTROL_IMPL_MANAGER_H_ + +#include +#include "FUi_Types.h" + +extern "C" { +_OSP_EXPORT_ result InitializeUiFramework(void); +_OSP_EXPORT_ void FinalizeUiFramework(void); +} + +namespace Tizen { namespace Ui { + +class _WindowImpl; +class _ControlImpl; + +class _ControlImplManager +{ +public: + static void Initialize(void); + static void Release(void); + static _ControlImplManager* GetInstance(void); + static void InitInstance(void); + + _WindowImpl* GetCurrentFrame(void) const; + + void OnScreenRotated(int rotation); + OrientationStatus GetFormOrientationStatus(const _ControlImpl *pControlImpl) const; + OrientationStatus GetOrientationStatus(Orientation mode) const; + +private: + void SetOrientationStatus(OrientationStatus orientationStatus); + static void RotateScreen(_ControlImpl* pControlImpl, OrientationStatus orientationStatus); + +private: + _ControlImplManager(void); + _ControlImplManager(const _ControlImplManager& rhs); + _ControlImplManager& operator =(const _ControlImplManager& rhs); + ~_ControlImplManager(void); + +private: + _WindowImpl* __pFrameImpl; + static _ControlImplManager* __pInstance; + friend class _OrientationAgent; + friend class _ImeOrientationAgent; +}; // _ControlImplManager + +}} // Tizen::Ui + +#endif // _FUI_INTERNAL_CONTROL_IMPL_MANAGER_H_ diff --git a/src/ui/inc/FUi_ControlManager.h b/src/ui/inc/FUi_ControlManager.h new file mode 100644 index 0000000..9e08397 --- /dev/null +++ b/src/ui/inc/FUi_ControlManager.h @@ -0,0 +1,228 @@ +// +// 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_ControlManager.h + * @brief This is the header file for the _ControlManager class. + * + * This header file contains the declarations of the %_ControlManager class. + */ + +#ifndef _FUI_INTERNAL_CONTROL_MANAGER_H_ +#define _FUI_INTERNAL_CONTROL_MANAGER_H_ + +#include +#include +#include +#include +#include +#include "FUi_Types.h" + +namespace Tizen { namespace Base { namespace Collection +{ +template class LinkedListT; +}}} // Tizen::Base::Collection + +namespace Tizen { namespace Ui +{ + +class _Window; +class _IWindow; +class _IUiEventListener; +class _TouchGestureDetector; +class _IControlManagerEventListener; + +class _OSP_EXPORT_ _ControlManager + : public Tizen::System::ISettingEventListener +{ +public: +// Initialize, Access, Release + static void Initialize(void); + static void Release(void); + static _ControlManager* GetInstance(void); + static void InitInstance(void); + +// Control Handle Management + _ControlHandle Register(_Control* pObject); + _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 + _Window* GetWindow(int index) const; + int GetWindowCount(void) const; + _Window* GetTopWindow(void) const; + _Window* GetTopVisibleWindow(void) const; + _Window* GetTopVisibleWindowAt(const Tizen::Graphics::Point& point) const; + bool IsWindowOnTop(const _Window& window) const; + bool IsWindowAttached(const _Window& window) const; + result OpenWindow(_Window& window, bool invalidate); + result CloseWindow(_Window& window); + +// For control list + _Control* GetControl(int index) const; + int GetControlCount(void) const; + +// Orientation + _ControlOrientation GetOrientation(void) const; + void SetOrientation(_ControlOrientation orientation); + +// Screen Rotation + _ControlRotation GetScreenRotation(void) const; + +// Informations + Tizen::Graphics::Dimension GetScreenSize(void) const; + Tizen::Graphics::FloatDimension GetScreenSizeF(void) const; + void SetScreenDpi(int dpi); + int GetScreenDpi(void) const; + +// Font + result SetDefaultFont(const Tizen::Base::String& appFontName); + Tizen::Base::String GetDefaultFont(void); + bool IsDefaultFontChanged(void) const; + bool IsSystemFontChanged(void) const; + void SetDefaultFontChangeState(bool isDefaultFontChanged); + result SetDefaultFontFromFile(const Tizen::Base::String& fileName); + Tizen::Base::String GetDefaultFontFile(void) const; + +// Coordinate system info + bool IsCoordinateSystemLogical(void) const; + int GetCoordinateSystem(void) const; + Tizen::Graphics::_BaseScreenSize GetLogicalBaseScreenSize(void) const; + +// Focus + _Control* GetFocusControl(void) const; + void SetFocusControl(const _Control& control, bool on = true); + bool TakeFocusFromControl(const _Control& control); + +// Queries + _Control* GetTopmostTouchedControl(const Tizen::Graphics::Point& point, bool activation = false); + _Window* GetCurrentFrame(void) const; + bool IsFrameActivated(void) const; + +// Global Gesture + result AddGestureDetector(const _TouchGestureDetector& gesture); + result RemoveGestureDetector(const _TouchGestureDetector& gesture); + Tizen::Base::Collection::IListT<_TouchGestureDetector*>* GetGestureDetectorList(void) const; + int GetGestureMaxTimeDuration(void) const; + +// Do not use. System only. + void SetOrientationStatus(_ControlRotation orientationStatus); + _ControlRotation GetOrientationStatus(void) const; + void RotateScreen(const _Control& control, _ControlRotation screenRotation); + void OnScreenRotated(int rotation); + void OnWindowRotated(int rotation); + void SetTouchedWindow(unsigned int window); + _Window* GetTouchedWindow(void) const; + result MoveWindowToTop(const _Window& window); + result MoveWindowToBottom(const _Window& window); + void SetClipboardOwner(_Window* pOwner); + _Window* GetClipboardOwner(void) const; + + result AddControlManagerEventListener(_IControlManagerEventListener& listener); + result RemoveControlManagerEventListener(_IControlManagerEventListener& listener); + + _Window* GetAllWindow(int index) const; + int GetAllWindowCount(void) const; + result DetachAllWindow(_Window& window); + +private: + ~_ControlManager(void); + _ControlManager(void); + _ControlManager(const _ControlManager&); + _ControlManager& operator =(const _ControlManager&); + +// Coordinate system info + result GetAppCoordinateSystem(bool& isCoordinateSystemLogical, int& logicalCoordinateSystemInt, Tizen::Graphics::_BaseScreenSize& logicalBaseScreenSize); + + result AttachWindow(_Window& window); + result InsertWindowToBottom(_Window& window); + result InsertWindowAfter(const _Window& targetWindow, _Window& window); + result InsertWindowBefore(const _Window& targetWindow, _Window& window); + result DetachWindow(_Window& window); + void DetachAllWindows(void); + + result MoveWindowAfter(const _Window& targetWindow, const _Window& window); + result MoveWindowBefore(const _Window& targetWindow, const _Window& window); + + result ActivateWindow(_Window& window, bool invalidate); + + result CallOnAttachingToMainTree(_Control& control); + result CallOnPreAttachedToMainTree(_Control& control); + result CallOnAttachedToMainTree(_Control& control); + result CallOnDetachingFromMainTree(_Control& control); + void CallControlManagerEventListener(void); + + 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; + Tizen::Base::Collection::LinkedListT<_Window*>* __pAllWindowList; + Tizen::Base::Collection::LinkedListT<_Control*>* __pAllControlList; + + bool __isCoordinateSystemLogical; + int __logicalCoordinateSystem; + Tizen::Graphics::_BaseScreenSize __logicalBaseScreenSize; + Tizen::Base::Collection::LinkedListT<_Window*>* __pSystemWindowList; + _Control* __pFocusControl; + _ControlRotation __screenRotation; + _ControlRotation __orientationStatus; + _ControlOrientation __orientation; + _Window* __pCurrentFrame; + Tizen::Base::Collection::IListT<_TouchGestureDetector*>* __pGestureList; + int __gestureMaxDuration; + unsigned int __touchedWindow; + bool __isDefaultFontChanged; + bool __isSystemFontChanged; + Tizen::Base::String __defaultFontName; + Tizen::Base::String __defaultFontFileName; + static _ControlManager* __pInstance; + int __screenDpi; + _Window* __pClipboardOwner; + std::unique_ptr > __pControlManagerEventListenerList; + + Tizen::Base::Collection::ArrayListT<_HistoryInfo*>* __pNewHistory; + Tizen::Base::Collection::ArrayListT<_HistoryInfo*>* __pDeleteHistory; +}; // _ControlManager + +}} // Tizen::Ui + +#endif // _FUI_INTERNAL_CONTROL_MANAGER_H_ diff --git a/src/ui/inc/FUi_CoordinateSystemUtils.h b/src/ui/inc/FUi_CoordinateSystemUtils.h new file mode 100644 index 0000000..47c8366 --- /dev/null +++ b/src/ui/inc/FUi_CoordinateSystemUtils.h @@ -0,0 +1,338 @@ +// +// 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_CoordinateSystemUtils.h + * @brief This is the header file for the _CoordinateSystemUtils class. + * + * This header file contains the declarations of the _CoordinateSystemUtils class. + */ + +#ifndef _FUI_INTERNAL_COORDINATE_SYSTEM_UTILS_H_ +#define _FUI_INTERNAL_COORDINATE_SYSTEM_UTILS_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui { + +class _OSP_EXPORT_ _CoordinateSystemUtils +{ +public: + // Convert To Float + static Tizen::Graphics::FloatRectangle + ConvertToFloat(const Tizen::Graphics::Rectangle& rect) + { + return Tizen::Graphics::FloatRectangle(rect.x, rect.y, rect.width, rect.height); + } + + static Tizen::Graphics::FloatRectangle + ConvertToFloat(const Tizen::Graphics::Point& point, const Tizen::Graphics::Dimension& dim) + { + return Tizen::Graphics::FloatRectangle(point.x, point.y, dim.width, dim.height); + } + + static Tizen::Graphics::FloatDimension + ConvertToFloat(const Tizen::Graphics::Dimension& dim) + { + return Tizen::Graphics::FloatDimension(dim.width, dim.height); + } + + static Tizen::Graphics::FloatPoint + ConvertToFloat(const Tizen::Graphics::Point& point) + { + return Tizen::Graphics::FloatPoint(point.x, point.y); + } + + static float + ConvertToFloat(const Tizen::Base::String& floatString) + { + if (floatString.IsEmpty() == true) + { + return 0.0f; + } + float integerPart = 0.0f; + float decimalPart = 0.0f; + float multiple = 1.0f; + float sign = 1.0f; + int index = 0; + bool isDecimal = false; + + if (floatString[index] == L'-') + { + sign = -1.0f; + index ++; + } + else if (floatString[index] == L'+') + { + sign = 1.0f; + index ++; + } + + while (index < floatString.GetLength()) + { + if (floatString[index] == L'.') + { + isDecimal = true; + } + else if (floatString[index] >= L'0' && floatString[index] <= L'9') + { + if (isDecimal) + { + decimalPart = (decimalPart * 10.0f) + (floatString[index] - L'0'); + multiple = 0.1f * multiple; + } + else + { + integerPart = (integerPart * 10.0f) + (floatString[index] - L'0'); + } + } + index ++; + } + decimalPart = decimalPart * multiple; + + return sign * (integerPart + decimalPart); + } + + static float + ConvertToFloat(int scalar) + { + return scalar; + } + + // Convert To Integer + static Tizen::Graphics::Rectangle + ConvertToInteger(const Tizen::Graphics::FloatRectangle& rect) + { + return Tizen::Graphics::Rectangle(floorf(rect.x + __floatIntegralEpsilon), floorf(rect.y + __floatIntegralEpsilon) + , floorf(rect.width + __floatIntegralEpsilon), floorf(rect.height + __floatIntegralEpsilon)); + } + + static Tizen::Graphics::Rectangle + ConvertToInteger(const Tizen::Graphics::FloatPoint& point, const Tizen::Graphics::FloatDimension& dim) + { + return Tizen::Graphics::Rectangle(floorf(point.x + __floatIntegralEpsilon), floorf(point.y + __floatIntegralEpsilon) + , floorf(dim.width + __floatIntegralEpsilon), floorf(dim.height + __floatIntegralEpsilon)); + } + + static Tizen::Graphics::Dimension + ConvertToInteger(const Tizen::Graphics::FloatDimension& dim) + { + return Tizen::Graphics::Dimension(floorf(dim.width + __floatIntegralEpsilon), floorf(dim.height + __floatIntegralEpsilon)); + } + + static Tizen::Graphics::Point + ConvertToInteger(const Tizen::Graphics::FloatPoint& point) + { + return Tizen::Graphics::Point(floorf(point.x + __floatIntegralEpsilon), floorf(point.y + __floatIntegralEpsilon)); + } + + static int + ConvertToInteger(float scalar) + { + return floorf(scalar + __floatIntegralEpsilon); + } + + // Transform Utilities + static Tizen::Graphics::Rectangle + Transform(const Tizen::Graphics::Rectangle& rect) + { + return GetTransformer()->Transform(rect); + } + + static Tizen::Graphics::FloatRectangle + Transform(const Tizen::Graphics::FloatRectangle& rect) + { + return GetTransformer()->Transform(rect); + } + + static Tizen::Graphics::Rectangle + Transform(const Tizen::Graphics::Point& point, const Tizen::Graphics::Dimension& dim) + { + return GetTransformer()->Transform(Tizen::Graphics::Rectangle(point, dim)); + } + + static Tizen::Graphics::FloatRectangle + Transform(const Tizen::Graphics::FloatPoint& point, const Tizen::Graphics::FloatDimension& dim) + { + return GetTransformer()->Transform(Tizen::Graphics::FloatRectangle(point, dim)); + } + + static Tizen::Graphics::Dimension + Transform(const Tizen::Graphics::Dimension& dim) + { + return GetTransformer()->Transform(dim); + } + + static Tizen::Graphics::FloatDimension + Transform(const Tizen::Graphics::FloatDimension& dim) + { + return GetTransformer()->Transform(dim); + } + + static Tizen::Graphics::Point + Transform(const Tizen::Graphics::Point& point) + { + return GetTransformer()->Transform(point); + } + + static Tizen::Graphics::FloatPoint + Transform(const Tizen::Graphics::FloatPoint& point) + { + return GetTransformer()->Transform(point); + } + + static int + HorizontalTransform(int scalar) + { + return GetTransformer()->TransformHorizontal(scalar); + } + + static float + HorizontalTransform(float scalar) + { + return GetTransformer()->TransformHorizontal(scalar); + } + + static int + VerticalTransform(int scalar) + { + return GetTransformer()->TransformVertical(scalar); + } + + static float + VerticalTransform(float scalar) + { + return GetTransformer()->TransformVertical(scalar); + } + + // InverseTransform Utilities + static Tizen::Graphics::Rectangle + InverseTransform(const Tizen::Graphics::Rectangle& rect) + { + return GetInverseTransformer()->Transform(rect); + } + + static Tizen::Graphics::FloatRectangle + InverseTransform(const Tizen::Graphics::FloatRectangle& rect) + { + return GetInverseTransformer()->Transform(rect); + } + + static Tizen::Graphics::Rectangle + InverseTransform(const Tizen::Graphics::Point& point, const Tizen::Graphics::Dimension& dim) + { + return GetInverseTransformer()->Transform(Tizen::Graphics::Rectangle(point, dim)); + } + + static Tizen::Graphics::FloatRectangle + InverseTransform(const Tizen::Graphics::FloatPoint& point, const Tizen::Graphics::FloatDimension& dim) + { + return GetInverseTransformer()->Transform(Tizen::Graphics::FloatRectangle(point, dim)); + } + + static Tizen::Graphics::Dimension + InverseTransform(const Tizen::Graphics::Dimension& dim) + { + return GetInverseTransformer()->Transform(dim); + } + + static Tizen::Graphics::FloatDimension + InverseTransform(const Tizen::Graphics::FloatDimension& dim) + { + return GetInverseTransformer()->Transform(dim); + } + + static Tizen::Graphics::Point + InverseTransform(const Tizen::Graphics::Point& point) + { + return GetInverseTransformer()->Transform(point); + } + + static Tizen::Graphics::FloatPoint + InverseTransform(const Tizen::Graphics::FloatPoint& point) + { + return GetInverseTransformer()->Transform(point); + } + + static int + InverseHorizontalTransform(int scalar) + { + return GetInverseTransformer()->TransformHorizontal(scalar); + } + + static float + InverseHorizontalTransform(float scalar) + { + return GetInverseTransformer()->TransformHorizontal(scalar); + } + + static int + InverseVerticalTransform(int scalar) + { + return GetInverseTransformer()->TransformVertical(scalar); + } + + static float + InverseVerticalTransform(float scalar) + { + return GetInverseTransformer()->TransformVertical(scalar); + } + +private: + _CoordinateSystemUtils(void); + ~_CoordinateSystemUtils(void); + + _CoordinateSystemUtils(const _CoordinateSystemUtils&); + _CoordinateSystemUtils& operator =(const _CoordinateSystemUtils&); + + static Tizen::Graphics::_ICoordinateSystemTransformer* + GetTransformer(void) + { + Tizen::Graphics::_ICoordinateSystemTransformer* pTransform = Tizen::Graphics::_CoordinateSystem::GetInstance()->GetTransformer(); + SysTryReturn(NID_UI, pTransform, null, E_SYSTEM, "[E_SYSTEM] The valid coordinate transformer does not exist."); + + return pTransform; + } + + static Tizen::Graphics::_ICoordinateSystemTransformer* + GetInverseTransformer(void) + { + Tizen::Graphics::_ICoordinateSystemTransformer* pInverseTransform= Tizen::Graphics::_CoordinateSystem::GetInstance()->GetInverseTransformer(); + SysTryReturn(NID_UI, pInverseTransform, null, E_SYSTEM, "[E_SYSTEM] The valid coordinate inverse transformer does not exist."); + + return pInverseTransform; + } + +private: + // WARNING: + // Some float functions like sin and cos emit too-much float-error. + // So, the rounding const must be a bigger value than expected. + static const float __floatIntegralEpsilon = 0.01f; +}; //class _CoordinateSystemUtils + +}} // Tizen::Ui + +#endif //_FUI_INTERNAL_COORDINATE_SYSTEM_UTILS_H_ diff --git a/src/ui/inc/FUi_CustomControlBaseImpl.h b/src/ui/inc/FUi_CustomControlBaseImpl.h new file mode 100644 index 0000000..abdb253 --- /dev/null +++ b/src/ui/inc/FUi_CustomControlBaseImpl.h @@ -0,0 +1,63 @@ +// +// 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_CustomControlBaseImpll.h + * @brief This is the header file for the _CustomControlBaseImpl class. + * + * This header file contains the declarations of the _CustomControlBaseImpl class. + */ + +#ifndef _FUI_INTERNAL_CUSTOM_CONTROL_BASE_IMPL_H_ +#define _FUI_INTERNAL_CUSTOM_CONTROL_BASE_IMPL_H_ + +#include +#include "FUi_ContainerImpl.h" + +namespace Tizen { namespace Ui +{ + +class _CustomControlBaseImpl + : public _ContainerImpl +{ +public: + //Life Cycle + virtual ~_CustomControlBaseImpl(void); + + static _CustomControlBaseImpl* CreateCustomControlBaseImplN(CustomControlBase* pPublic, const Tizen::Graphics::Rectangle& bounds, const Layout* pPublicPortraitLayout, const Layout* pPublicLandscapeLayout, bool resizable, bool movable); + + // Getters/Setters + virtual const char* GetPublicClassName(void) const; + virtual const CustomControlBase& GetPublic(void) const; + virtual CustomControlBase& GetPublic(void); + static _CustomControlBaseImpl* GetInstance(CustomControlBase& pCustomControlBase); + static const _CustomControlBaseImpl* GetInstance(const CustomControlBase& pCustomControlBase); + + //Internal callbacks + virtual result OnBoundsChanging(const Tizen::Graphics::Rectangle& bounds); + virtual void OnBoundsChanged(void); + virtual void OnEvaluateSize(Tizen::Graphics::Dimension& evaluatedSize); + +protected: + _CustomControlBaseImpl(CustomControlBase* pCustomControlBase, _Control* pCore, const Tizen::Graphics::Rectangle& bounds, const Layout* pPublicPortraitLayout, const Layout* pPublicLandscapeLayout, bool resizable, bool movable); + + Tizen::Graphics::Rectangle __oldBounds; +}; // CustomControlBaseImpl + +}} // Tizen::Ui + +#endif //_FUI_INTERNAL_CUSTOM_CONTROL_BASE_IMPL_H_ diff --git a/src/ui/inc/FUi_Dimensionf.h b/src/ui/inc/FUi_Dimensionf.h new file mode 100644 index 0000000..dd3ff27 --- /dev/null +++ b/src/ui/inc/FUi_Dimensionf.h @@ -0,0 +1,84 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_Dimensionf.h + * @brief Header file of _Dimensionf class + * + * This file contains declarations _Dimensionf class. + */ + +#ifndef _FUI_ANIM_INTERNAL_DIMENSIONF_H_ +#define _FUI_ANIM_INTERNAL_DIMENSIONF_H_ + +#include + +namespace Tizen { namespace Ui { namespace Animations +{ + +class _Dimensionf +{ +public: + _Dimensionf(void) + : __width(0.0f) + , __height(0.0f) {} + _Dimensionf(float width, float height) + : __width(width) + , __height(height) {} + _Dimensionf(const _Dimensionf& dim) + : __width(dim.__width) + , __height(dim.__height) {} + virtual ~_Dimensionf(void) {} + + _Dimensionf& SetSize(float width, float height) { __width = width;__height = height; return *this; } + + float Width(void) const { return __width;} + float Height(void) const { return __height;} + float& Width(void) { return __width;} + float& Height(void) { return __height;} + + bool operator !=(const _Dimensionf& dim) const + { + // CHECKME: need float compare ??? + return (__width != dim.__width) || (__height != dim.__height); + } + + bool operator ==(const _Dimensionf& dim) const + { + // CHECKME: need float compare ??? + return (__width == dim.__width) && (__height == dim.__height); + } + + _Dimensionf& operator =(const _Dimensionf& dim) + { + if (&dim != this) + { + __width = dim.__width; + __height = dim.__height; + } + + return *this; + } + +public: + float __width; + float __height; +}; // _Dimensionf + +}}} // Tizen::Ui::Animations + +#endif //_FUI_ANIM_INTERNAL_DIMENSIONF_H_ diff --git a/src/ui/inc/FUi_DimmingLayer.h b/src/ui/inc/FUi_DimmingLayer.h new file mode 100644 index 0000000..c5e3bb5 --- /dev/null +++ b/src/ui/inc/FUi_DimmingLayer.h @@ -0,0 +1,65 @@ +// +// 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_DimmingLayer.h + * @brief This is the header file for the _DimmingLayer class. + * + * This header file contains the declarations of the _DimmingLayer class. + */ + + +#ifndef _FUI_INTERNAL_DIMMINGLAYER_H_ +#define _FUI_INTERNAL_DIMMINGLAYER_H_ + + +#include + +#include "FUi_Control.h" +#include "FUiAnim_VisualElement.h" + +namespace Tizen { namespace Ui +{ + +class _DimmingLayer + : public Tizen::Base::Object +{ +public: + _DimmingLayer(void); + virtual ~_DimmingLayer(void); + + result Construct(_Control& control); + result SetOpacity(float opacity); + float GetOpacity(void) const; + result SetDimmingEnabled(bool enabled); + bool IsDimmingEnabled(void) const; + result Rearrange(void); + result DrawBackground(void); + +private: + _DimmingLayer(const _DimmingLayer& rhs); /* no impl. */ + _DimmingLayer& operator =(const _DimmingLayer& rhs); /* no impl. */ + + bool __enabled; + Tizen::Ui::_Control* __pControl; + Tizen::Ui::Animations::_ControlVisualElement* __pDimmingElement; + Tizen::Ui::Animations::VisualElement::RenderOperation __oldControlRenderOperation; +}; // _DimmingLayer + +}} // Tizen::Ui + +#endif /* _FUI_INTERNAL_DIMMINGLAYER_H_ */ diff --git a/src/ui/inc/FUi_DimmingManager.h b/src/ui/inc/FUi_DimmingManager.h new file mode 100644 index 0000000..402e84f --- /dev/null +++ b/src/ui/inc/FUi_DimmingManager.h @@ -0,0 +1,67 @@ +// +// 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_DimmingManager.h + * @brief This is the header file for the _DimmingManager class. + * + * This header file contains the declarations of the %_DimmingManager class. + */ + +#ifndef _FUI__INTERNAL_DIMMING_MANAGER_H_ +#define _FUIL_INTERNAL_DIMMING_MANAGER_H_ + +#include "FUi_DimmingLayer.h" + +namespace Tizen { namespace Ui { +class _Window; +}}; + +namespace Tizen { namespace Ui +{ + +class _DimmingManager +{ + typedef Tizen::Base::Collection::ArrayListT<_Window*> WindowList; + +public: + static _DimmingManager* GetInstance(void); + static void Initialize(void); + static void InitializeInstance(void); + static void ReleaseInstance(void); + + result RegisterWindow(_Window* pWindow); + result UnRegisterWindow(_Window* pWindow); + + result CreateDimmingLayer(_Window* pWindow); + void DeleteDimmingLayer(_Window* pWindow); + result ShowDimmingLayer(_Window* pWindow); + +private: + ~_DimmingManager(void); + _DimmingManager(void); + + _DimmingManager(const _DimmingManager& value); + _DimmingManager& operator =(const _DimmingManager& value); + +private: + static _DimmingManager* __pInstance; + WindowList* __pWindowList; +}; // _DimmingManager + +}} // Tizen::Ui + +#endif // _FUI__INTERNAL_DIMMING_MANAGER_H_ 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_DragDropEvent.h b/src/ui/inc/FUi_DragDropEvent.h new file mode 100644 index 0000000..194b8de --- /dev/null +++ b/src/ui/inc/FUi_DragDropEvent.h @@ -0,0 +1,157 @@ +// +// 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_DragDropEvent.h + * @brief This is the header file for _DragDropEvent class. + * @version 2.0 + * + * This header file contains declaration of _DragDropEvent class. + */ +#ifndef _FUI_INTERNAL_DRAG_DROP_EVENT_H_ +#define _FUI_INTERNAL_DRAG_DROP_EVENT_H_ + +// includes +#include +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui +{ +class Control; +} } + +namespace Tizen { namespace Ui +{ +/** + * @enum DragDropStatus + * + * Defines constants used to identify drag drop status. + */ +enum DragDropStatus +{ + DRAG_DROP_INDICATED = 0, /**< The touch indicated event type */ + DRAG_DROP_PRESSED, /**< The touch pressed event type */ + DRAG_DROP_LONG_PRESSED, /**< The touch long pressed event type */ + DRAG_DROP_RELEASED, /**< The touch released event type */ + DRAG_DROP_MOVED, /**< The touch moved event type */ + DRAG_DROP_DOUBLE_PRESSED, /**< The touch double pressed event type */ + DRAG_DROP_FOCUS_IN, /**< The touch focus-in event type */ + DRAG_DROP_FOCUS_OUT, /**< The touch focus-out event type */ + DRAG_DROP_FLICKED, /**< The touch flicked event type */ + DRAG_DROP_FLICK_HELD, /**< The touch flick held event type */ + DRAG_DROP_DRAGGED, /**< The touch dragged event type */ + DRAG_DROP_DROPPED /**< The touch dropped event type */ +}; + +/** + * @class _DragDropEvent + * @brief This class handles a touch event. It is inherited from LowLevelEvent class. + * + * The Control class has an instance of the _DragDropEvent class as a member variable. + * _DragDropEvent notifies the listeners when a control receives a touch event. + * + * @since 2.0 + */ +class _OSP_EXPORT_ _DragDropEvent + : public Tizen::Base::Runtime::_Event + , public Tizen::Base::Runtime::IEventFilter +{ +// Lifecycle +public: + /** + * This is the default class constructor. After creating an instance of this + * class, you must explicitly call one of construction methods to initialize + * the instance. + */ + _DragDropEvent(void); + + /** + * This method constructs this _DragDropEvent instance. + * + * @return This method returns the error code. + * @param[in] source The owner of this key event. + * @exception E_SUCCESS - The method is successful. + * @exception E_SYSTEM - The method has failed. + * @exception E_ARG_NULL - @c pSource is @c NULL. + */ + result Construct(const Tizen::Ui::Control& source); + + + /** + * This is the class destructor. + */ + virtual ~_DragDropEvent(void); + + +// Operations +public: + /** + * This method enables/disables this event. A disabled event can not fire notification. + * + * @return This method returns the error code. + * @param[in] enable Determines the state of this event. + * @exception E_SUCCESS - This method is successful. + * @exception E_SYSTEM - This method has failed. + */ + result SetEnabled(bool enable); + + +// Accessors +public: + /** + * This method returns the owner of this event. + * + * @return See the comment above. + */ + const Tizen::Ui::Control* GetSource(void) const; + + + bool Filter(const Tizen::Base::Runtime::IEventArg& eventArg); + + // due to build error + virtual result AddListener(const Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::_EventDispatcher* pEventDispatcher); + virtual result Wait(void); + + +// Operations +protected: + /** + * This method calls appropriate IKeyEventListener method. + * + * @return This method returns the error code. + * @param[in] pListener The IKeyEventListener instance. + * @param[in] arg The _DragDropEventArg. + * @exception E_SUCCESS - The method is successful. + * @exception E_INVALID_ARG - The argument passed to a method contains an invalid value. + * @exception E_INVALID_ARG - @c pListener is @c NULL. + */ + virtual result FireImpl(Tizen::Base::Runtime::IEventListener* pListener, const Tizen::Base::Runtime::IEventArg& arg); + +private: + /** + * The event source. + */ + Tizen::Ui::Control* __pSource; + +}; // _DragDropEvent + +} } // Tizen::Ui + +#endif //_FUI_INTERNAL_DRAG_DROP_EVENT_H_ diff --git a/src/ui/inc/FUi_DragDropEventArg.h b/src/ui/inc/FUi_DragDropEventArg.h new file mode 100644 index 0000000..cdc3efa --- /dev/null +++ b/src/ui/inc/FUi_DragDropEventArg.h @@ -0,0 +1,141 @@ +// +// 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_DragDropEventArg.h +* @brief This is the header file for _DragDropEventArg class. +* @since 2.0 +* +* This header file contains declarations of _DragDropEventArg class. +*/ + +#ifndef _FUI_DRAG_DROP_EVENT_ARG_H_ +#define _FUI_DRAG_DROP_EVENT_ARG_H_ + +// includes +#include +#include +#include +#include +#include +#include +#include "FUi_DragDropEvent.h" + + +namespace Tizen { namespace Ui +{ +/** + * @class _DragDropEventArg + * + * @brief This class is used as the argument to drag drop event listener. + * + * This class is used as the argument of drag drop event listener. When drag drop event event is generated, + * the @c DragDropEvent instance calls the registered IDragDropEventListener with an instance of this + * class as the argument. + * + */ +class _OSP_EXPORT_ _DragDropEventArg + : public Tizen::Base::Object + , public Tizen::Base::Runtime::IEventArg +{ +// Lifecycle +public: + /** + * This is the default class constructor. + * + * @param[in] source - A pointer to the Object instance which contains this instance. + * @param[in] status - DragDropStatus + */ + _DragDropEventArg(const Tizen::Ui::Control& source, DragDropStatus status); + + + /** + * This is the class destructor. + */ + virtual ~_DragDropEventArg(void); + +// Access +public: + /** + * This method returns the object which the event initially occurred. + * + * @return The object which the event initially occurred. + */ + const Tizen::Ui::Control* GetSource(void) const; + + /** + * This method returns the touch status + * + * @return see the above + */ + DragDropStatus GetDragDropStatus(void) const; + + /** + * This method returns the start position of touch pressed event on the window rectangle coordination. + * + * @return see the above + */ + const Tizen::Graphics::FloatPoint GetStartPosition(void) const; + + /** + * This method returns the current position of touch event on the window rectangle coordination. + * + * @return see the above + */ + const Tizen::Graphics::FloatPoint GetCurrentPosition(void) const; + + /** + * This method sets the dragged controls pointer. + * + * @return see the above + */ + + result SetDraggedControl(const Tizen::Ui::Control* pDraggedControl); + + /** + * This method returns the dragged controls pointer. + * + * @return see the above + */ + const Tizen::Ui::Control* GetDraggedControl(void) const; + + /** + * This method sets the positions of touch event on the window rectangle coordination. + * + * @param[in] startX - x coordinate of the original touch pressed event + * @param[in] startY - y coordinate of the original touch pressed event + * @param[in] currentX - x coordinate of the current touch event + * @param[in] currentY - y coordinate of the currenttouch event + * @return The method returns error code. + * @exception E_SUCCESS - This method is successful. + */ + result SetTouchPosition(float startX, float startY, float currentX, float currentY); + + +// Attributes +private: + Tizen::Ui::Control* __pSource; // destination + Tizen::Ui::Control* __pDraggedControl; + + + DragDropStatus __dragDropStatus; + Tizen::Graphics::FloatPoint __startPosition; + Tizen::Graphics::FloatPoint __currentPosition; +}; // _DragDropEventArg + +} } // Tizen::Ui + +#endif // _FUI_DRAG_DROP_EVENT_ARG_H_ diff --git a/src/ui/inc/FUi_EcoreEvas.h b/src/ui/inc/FUi_EcoreEvas.h new file mode 100644 index 0000000..aeadcc3 --- /dev/null +++ b/src/ui/inc/FUi_EcoreEvas.h @@ -0,0 +1,221 @@ +// +// 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_EcoreEvas.h + * @brief This is the header file for the _EcoreEvas class. + * + * This header file contains the declarations of the %_EcoreEvas class. + */ + +#ifndef _FUI_INTERNAL_ECORE_EVAS_H_ +#define _FUI_INTERNAL_ECORE_EVAS_H_ + +#include +#include +#include +#include +#include +#include "FUi_Types.h" + +namespace Tizen { namespace Graphics +{ +class Rectangle; +class FloatRectangle; +}} // Tizen::Graphics + +namespace Tizen { namespace Ui { namespace Animations +{ +class _RootVisualElement; +class _NativeLayer; +class _EflLayer; +}}} // Tizen::Ui::Animations + + +namespace Tizen { namespace Ui +{ +enum _ClipFormat +{ + _CLIP_FORMAT_TARGETS = -1, + _CLIP_FORMAT_NONE = 0x00, + _CLIP_FORMAT_TEXT = 0x01, + _CLIP_FORMAT_MARKUP = 0x02, + _CLIP_FORMAT_IMAGE = 0x04, + _CLIP_FORMAT_VCARD = 0x08, + _CLIP_FORMAT_HTML = 0x10, +}; + +enum _IndicatorOpacity +{ + _INDICATOR_OPACITY_UNKNOWN, + _INDICATOR_OPACITY_OPAQUE, + _INDICATOR_OPACITY_TRANSLUCENT, + _INDICATOR_OPACITY_TRANSPARENT, +}; + +enum _WindowLevel +{ + _WINDOW_LEVEL_UNKNOWN, + _WINDOW_LEVEL_NORMAL, + _WINDOW_LEVEL_NOTIFICATION_MIDDLE, + _WINDOW_LEVEL_NOTIFICATION_HIGH, +}; + +enum _RenderBackend +{ + _RENDER_BACKEND_DEFAULT, + _RENDER_BACKEND_SW, + _RENDER_BACKEND_GL, +}; + +class _Control; +class _Window; + +class _OSP_EXPORT_ _EcoreEvas + : public Tizen::Base::Object +{ +public: + static _EcoreEvas* CreateInstanceN(void); + virtual ~_EcoreEvas(void); + + unsigned int GetActiveWindow(void); + int GetProcessId(unsigned int window); + void SetRenderBackend(_RenderBackend backend); + _RenderBackend GetRenderBackend(void); + void SetOwner(NativeWindowHandle ownee, NativeWindowHandle owner); + void SetOwner(const _Window& ownee, const _Control& owner); + + void ActivateWindow(const _Window& window); + void MinimizeWindow(_Window& window); + + void RotateWindow(const _Window& window, int orientation, bool rotateEvas = true); + int GetWindowRotation(const _Window& window); + void SetWindowPreferredRotation(const _Window& window, int rotation, bool force = false); + void SetWindowAvailabledRotation(const _Window& window, int* rotations, unsigned int count, bool force = false); + void RegisterWindowStateCallback(const _Window& window); + void SetWindowRotationBounds(const _Window& window, int rotation, const Tizen::Graphics::Rectangle& bounds); + void SetWindowRotationBounds(const _Window& window, int rotation, const Tizen::Graphics::FloatRectangle& bounds); + + void SetWindowName(const _Window& window, const Tizen::Base::String& name); + void SetWindowType(const _Window& window, int winType); + result SetFloatingMode(const _Window& window, bool enable); + bool GetFloatingMode(const _Window& window) const; + void SetWindowActivationEnabled(const _Window& window, bool enable); + 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, 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); + + result SetIndicatorShowState(const _Window& window, bool showState); + bool GetIndicatorShowState(const _Window& window) const; + + result CopyClip(_ClipFormat format, const char* pChar); + bool RetrieveClipN(int index, int* format, char** pData); + int GetClipCount(void) const; + bool GetSelectedCbhmItem(Ecore_X_Atom* pDataType, char** pBuffer) const; + void OpenClipboard(unsigned long clipFormats); + void CloseClipboard(void); + bool IsClipboardOpened(void); + Tizen::Base::String ConvertMarkupToUtf8(const Tizen::Base::String& string); + + 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; + result SetIndicatorOpacity(const _Window& window, _IndicatorOpacity opacity); + _IndicatorOpacity GetIndicatorOpacity(const _Window& window) const; + Tizen::Ui::Animations::_RootVisualElement* GetRootVisualElement(void)const; + void SetFrame(const _Control& control); + const _Control* GetFrame(void) const; + Evas* GetEvas(void) const; + Ecore_Evas* GetEcoreEvas(void) const; + Evas_Object* GetWindowObject(void) const; + Ecore_X_Window GetXWindow(void) const; + void SetQuickPanelScrollEnabled(const _Window& window, bool enable); + bool IsQuickPanelScrollEnabled(const _Window& window); + +private: + Tizen::Ui::Animations::_EflLayer* GetEflLayer(const _Window& window) const; + _EcoreEvas(void); + + result InitializeAtomList(void); + bool IsValidClipFormat(_ClipFormat clipFormat); + Ecore_X_Window GetCbhmWindow(void) const; + bool SendCbhmMessage(Ecore_X_Window xwin, const char* pMsg); + bool SetCbhmItem(Ecore_X_Window xwin, Ecore_X_Atom dataType, char* pItemData); + void* GetCbhmReply(Ecore_X_Window xwin, Ecore_X_Atom property, Ecore_X_Atom* pDataType, int* pNum) const; + int GetCbhmItemCount(void) const; + bool GetCbhmItem(int index, Ecore_X_Atom* pDataType, char** pBuffer) const; + + _EcoreEvas(const _EcoreEvas& rhs); + _EcoreEvas& operator =(const _EcoreEvas& rhs); + +private: + Ecore_Event_Handler* __pWindowVisibilityChanged; + Ecore_Event_Handler* __pWindowPropertyChanged; + Ecore_Event_Handler* __pWindowShown; + Ecore_Event_Handler* __pWindowConfigured; + Ecore_Event_Handler* __pClientMessageReceived; + Ecore_Event_Handler* __pClearClip; + Ecore_Event_Handler* __pNotifyClip; + Ecore_Event_Handler* __pClipboardClosed; + + Evas* __pEvas; + Evas_Object* __pForegroundWindow; + 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 + +#endif // _FUI_INTERNAL_ECORE_EVAS_H_ diff --git a/src/ui/inc/FUi_EcoreEvasMgr.h b/src/ui/inc/FUi_EcoreEvasMgr.h new file mode 100644 index 0000000..7448b14 --- /dev/null +++ b/src/ui/inc/FUi_EcoreEvasMgr.h @@ -0,0 +1,63 @@ +// +// 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_EcoreEvasMgr.h + * @brief This is the header file for the _EcoreEvasMgr class. + * + * This header file contains the declarations of the %_EcoreEvasMgr class. + */ +#ifndef _FUI_INTERNAL_ECORE_EVAS_MGR_H_ +#define _FUI_INTERNAL_ECORE_EVAS_MGR_H_ + +#include +#include + +namespace Tizen { namespace Ui +{ +class _EcoreEvas; + +class _OSP_EXPORT_ _EcoreEvasMgr + : public Tizen::Base::Object +{ +public: + _EcoreEvasMgr(void); + + virtual ~_EcoreEvasMgr(void); + + void SetEcoreEvas(const _EcoreEvas& ecoreEvas); + _EcoreEvas* GetEcoreEvas(void) const; + + void BeginMainLoop(void); + void EndMainLoop(void); + + void SetRenderBackend(int backend); + int GetRenderBackend(void); + +private: + _EcoreEvasMgr(const _EcoreEvasMgr& rhs); + _EcoreEvasMgr& operator =(const _EcoreEvasMgr& rhs); + +private: + const _EcoreEvas* __pEcoreEvas; +}; // _EcoreEvasMgr + +_OSP_EXPORT_ void DestroyEcoreEvasMgr(void); +_OSP_EXPORT_ _EcoreEvasMgr* GetEcoreEvasMgr(void); + +}} // Tizen::Ui + +#endif // _FUI_INTERNAL_ECORE_EVAS_MGR_H_ diff --git a/src/ui/inc/FUi_ErrorMessages.h b/src/ui/inc/FUi_ErrorMessages.h new file mode 100644 index 0000000..5418b26 --- /dev/null +++ b/src/ui/inc/FUi_ErrorMessages.h @@ -0,0 +1,32 @@ +// +// 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. +// + +#ifndef _FUI_INTERNAL_ERROR_MESSAGES_H_ +#define _FUI_INTERNAL_ERROR_MESSAGES_H_ + +namespace Tizen { namespace Ui { + +class _UiError +{ +public: + static const char* OUT_OF_MEMORY; + static const char* SYSTEM; +}; + +}} // Tizen::Ui + +#endif // _FUI_INTERNAL_ERROR_MESSAGES_H_ diff --git a/src/ui/inc/FUi_FingerInfo.h b/src/ui/inc/FUi_FingerInfo.h new file mode 100644 index 0000000..0106b5c --- /dev/null +++ b/src/ui/inc/FUi_FingerInfo.h @@ -0,0 +1,161 @@ +// +// 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_FingerInfo.h + * @brief This is the header file for the _FingerInfo class. + * + * This header file contains the declarations of the _FingerInfo class. @n + */ + +#ifndef _FUI_INTERNAL_FINGER_INFO_H +#define _FUI_INTERNAL_FINGER_INFO_H + +#include +#include "FUi_UiTouchEvent.h" + +namespace Tizen { namespace Ui +{ +const unsigned int INVALID_POINT_ID = 999; +const unsigned int SINGLE_POINT_ID = 0; + +class _OSP_EXPORT_ _FingerInfo +{ +public: + /** + * This is the default class constructor. + * + */ + _FingerInfo(void); + + /** + * This is the default class destructor. + * + */ + ~_FingerInfo(void); + +public: + /** + * This method sets device Id + * + * @since 2.0 + */ + void SetDeviceId(unsigned long deviceId); + + /** + * This method sets point Id + * + * @since 2.0 + */ + void SetPointId(unsigned long pointId); + + /** + * This method sets current point + * + * @since 2.0 + */ + void SetPoint(const Tizen::Graphics::FloatPoint& screenPoint, const Tizen::Graphics::FloatPoint& point); + + /** + * This method sets current status + * + * @since 2.0 + */ + void SetStatus(const _TouchStatus status); + + /** + * This method sets start point + * + * @since 2.0 + */ + void SetStartPoint(const Tizen::Graphics::FloatPoint& point); + + /** + * This method sets touch move allowance flag + * this flag is used to check move allowance + * + * @since 2.0 + */ + void SetMoveReady(bool moveReady); + + /** + * This method returns deviceId + * + * @since 2.0 + * @return The deviceId + */ + unsigned long GetDeviceId(void) const; + + /** + * This method returns converted pointId + * + * @since 2.0 + * @return The touch pointId + */ + unsigned long GetPointId(void) const; + + /** + * This method returns touch point + * + * @since 2.0 + * @return The touch point + */ + Tizen::Graphics::FloatPoint GetPoint(void) const; + + /** + * This method returns touch point + * + * @since 2.0 + * @return The touch point + */ + Tizen::Graphics::FloatPoint GetScreenPoint(void) const; + + /** + * This method returns current touch status + * + * @since 2.0 + * @return The touch status + */ + _TouchStatus GetStatus(void) const; + + /** + * This method returns touch start point + * + * @since 2.0 + * @return The touch start point + */ + Tizen::Graphics::FloatPoint GetStartPoint(void) const; + + /** + * This method returns touch move allowance + * + * @since 2.0 + * @return The touch move allowance + */ + bool GetMoveReady(void) const; + +private: + unsigned long __deviceId; + unsigned long __pointId; + _TouchStatus __status; + Tizen::Graphics::FloatPoint __point; + Tizen::Graphics::FloatPoint __startPoint; + Tizen::Graphics::FloatPoint __screenPoint; + bool __touchMoveReady; +}; // _FingerInfo +} } // Tizen::Ui + +#endif // _FUI_INTERNAL_FINGER_INFO_H diff --git a/src/ui/inc/FUi_FocusManagerImpl.h b/src/ui/inc/FUi_FocusManagerImpl.h new file mode 100644 index 0000000..7130e98 --- /dev/null +++ b/src/ui/inc/FUi_FocusManagerImpl.h @@ -0,0 +1,147 @@ +// +// 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_FocusManagerImpl.h + * @brief This is the header file for the _FocusManagerImpl class. + * + * This header file contains the declarations of the _FocusManagerImpl class. @n. + */ +#ifndef _FUI_INTERNAL_FOCUS_MANAGER_IMPL_H_ +#define _FUI_INTERNAL_FOCUS_MANAGER_IMPL_H_ + +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace Animations +{ +class VisualElement; +}}} //Tizen::Ui::Animations + +namespace Tizen { namespace Ui +{ + +class _Control; +class _ControlImpl; +class _WindowImpl; + + +enum FocusDirection +{ + FOCUS_DIRECTION_DOWNWARD, + FOCUS_DIRECTION_UPWARD +}; + + +/** + * @class FocusManager + * @brief This class manages the application's current focus owned by the UI control + * and its ancestor Window. + * @since 2.0 + * + * Use this class to query the application's current focus owner. + */ +class _FocusManagerImpl + : public Tizen::Base::Object + , public Tizen::Ui::_IKeyEventListener + , public Tizen::Ui::_ITouchEventListener +{ +public: + /** + * Returns the pointer to the current focus manager. + * + * @since 2.0 + * @return The current focus manager instance + */ + static _FocusManagerImpl* GetInstance(void); + + + /** + * Gets the current focus owner. + * + * @since 2.0 + * @return The current focus owner + * @remarks The method returns the current focus owner of this application. + */ + _ControlImpl* GetCurrentFocusOwner(void) const; + + + /** + * Gets the current focused Window. + * + * @since 2.0 + * @return The current focused Window + * @remarks The method returns the application's current focus owner's ancestor + * Window or Window that is currently focused. + */ + _WindowImpl* GetCurrentFocusedWindow(void) const; + + static void Initialize(void); + + 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: + /** + * This is the default constructor for this class. + * + * @since 2.0 + */ + _FocusManagerImpl(void); + + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~_FocusManagerImpl(void); + + _FocusManagerImpl(_FocusManagerImpl& rhs); + _FocusManagerImpl& operator=(_FocusManagerImpl& rhs); + + static void InitializeInstance(void); + + virtual bool OnKeyPressed(const Tizen::Ui::_Control& source, const Tizen::Ui::_KeyInfo& keyInfo); + virtual bool OnKeyReleased(const Tizen::Ui::_Control& source, const Tizen::Ui::_KeyInfo& keyInfo); + + 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); + + + void StartFocusTraversal(_Control* pControl, FocusDirection focusDirection); + int GetNextIndex(int currentIndex, FocusDirection focusDirection, const Tizen::Base::Collection::IListT<_Control*>* pFocusControlList) const; + _Control* FindTraversalControlFromChild(_Control* pControl); + +private: + static _FocusManagerImpl* __pInstance; + Tizen::Ui::_Control* __pCurrentFocusUiControl; + bool __isFocusMode; + FocusDirection __focusDirection; +}; // _FocusManagerImpl + +}}//Tizen::Ui + +#endif // _FUI_INTERNAL_FOCUS_MANAGER_IMPL_H_ diff --git a/src/ui/inc/FUi_IAccessibilityFocusHandler.h b/src/ui/inc/FUi_IAccessibilityFocusHandler.h new file mode 100644 index 0000000..08b0dbf --- /dev/null +++ b/src/ui/inc/FUi_IAccessibilityFocusHandler.h @@ -0,0 +1,43 @@ +// +// 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_IAccessibilityFocusHandler.h + * @brief This is the header file for the _IAccessibilityFocusHandler class. + * + * This header file contains the declarations of the %_IAccessibilityFocusHandler class. + */ +#ifndef _FUI_INTERNAL_IACCESSIBILITY_FOCUS_HANDLER_H_ +#define _FUI_INTERNAL_IACCESSIBILITY_FOCUS_HANDLER_H_ + +#include "FUi_AccessibilityManager.h" + +namespace Tizen { namespace Graphics +{ +class Point; +}} //namespace Tizen::Graphics + +namespace Tizen { namespace Ui { + +class _OSP_EXPORT_ _IAccessibilityFocusHandler +{ +public: + virtual ~_IAccessibilityFocusHandler(void){}; + virtual bool OnMoveFocus(_AccessibilityFocusDirection direction) = 0; + virtual bool OnMoveFocus(const Tizen::Graphics::Point& point) = 0; +}; +}} //namespace Tizen::Ui +#endif //_FUI_INTERNAL_IACCESSIBILITY_FOCUS_HANDLER_H_ \ No newline at end of file diff --git a/src/ui/inc/FUi_IAccessibilityListener.h b/src/ui/inc/FUi_IAccessibilityListener.h new file mode 100644 index 0000000..21ae3ae --- /dev/null +++ b/src/ui/inc/FUi_IAccessibilityListener.h @@ -0,0 +1,51 @@ +// +// 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_IAccessibilityListener.h + * @brief This is the header file for the _IAccessibilityListener class. + * + * This header file contains the declarations of the %_IAccessibilityListener class. + */ +#ifndef _FUI_INTERNAL_IACCESSIBILITY_LISTENER_H_ +#define _FUI_INTERNAL_IACCESSIBILITY_LISTENER_H_ + +#include "FUi_AccessibilityManager.h" + +namespace Tizen { namespace Ui { + +class _AccessibilityContainer; +class _AccessibilityElement; + +class _OSP_EXPORT_ _IAccessibilityListener +{ +public: + virtual ~_IAccessibilityListener(void){}; + + virtual bool OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element) = 0; + virtual bool OnAccessibilityFocusMovedPrevious(const _AccessibilityContainer& control, const _AccessibilityElement& element) = 0; + virtual bool OnAccessibilityReadingElement(const _AccessibilityContainer& control, const _AccessibilityElement& element) = 0; + virtual bool OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element) = 0; + virtual bool OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element) = 0; + virtual bool OnAccessibilityFocusOut(const _AccessibilityContainer& control, const _AccessibilityElement& element) = 0; + virtual bool OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element) = 0; + virtual bool OnAccessibilityValueIncreased(const _AccessibilityContainer& control, const _AccessibilityElement& element) = 0; + virtual bool OnAccessibilityValueDecreased(const _AccessibilityContainer& control, const _AccessibilityElement& element) = 0; + virtual bool OnAccessibilityItemRefreshed(const _AccessibilityContainer& control, const _AccessibilityElement& element, _AccessibilityFocusDirection direction){return false;}; +}; +}} + +#endif //_FUI_INTERNAL_IACCESSIBILITY_LISTENER_H_ \ No newline at end of file diff --git a/src/ui/inc/FUi_IClipboardPopupEventListener.h b/src/ui/inc/FUi_IClipboardPopupEventListener.h new file mode 100644 index 0000000..02ff6f3 --- /dev/null +++ b/src/ui/inc/FUi_IClipboardPopupEventListener.h @@ -0,0 +1,79 @@ +// +// 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_IClipboardPopupEventListener.h + * @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 + * The applications that perform tasks related to the item event, must call methods of this interface. + */ + +#ifndef _FUI_INTERNAL_ICLIPBOARD_POPUP_EVENT_LISTENER_H_ +#define _FUI_INTERNAL_ICLIPBOARD_POPUP_EVENT_LISTENER_H_ + +#include +#include + +namespace Tizen { namespace Ui +{ + +class _OSP_EXPORT_ _IClipboardPopupEventListener + : 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. + * + * @since 2.1 + */ + virtual ~_IClipboardPopupEventListener(void) {} + + virtual void OnClipboardPopupOpened(Tizen::Graphics::Dimension& clipboardPopupSize) = 0; + virtual void OnClipboardPopupBoundsChanged(Tizen::Graphics::Dimension& clipboardPopupSize) = 0; + virtual void OnClipboardPopupClosed(void) = 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 _IClipboardPopupEventListener_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 _IClipboardPopupEventListener_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 _IClipboardPopupEventListener_Reserved3(void) {} +}; // _IClipboardPopupEventListener + +}} // Tizen::Ui + +#endif // _FUI_INTERNAL_ICLIPBOARD_POPUP_EVENT_LISTENER_H_ \ No newline at end of file diff --git a/src/ui/inc/FUi_IControlManagerEventListener.h b/src/ui/inc/FUi_IControlManagerEventListener.h new file mode 100644 index 0000000..cb54409 --- /dev/null +++ b/src/ui/inc/FUi_IControlManagerEventListener.h @@ -0,0 +1,42 @@ +// +// 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_IControlManagerEventListener.h + * @brief This is the header file for the _IControlManagerEventListener class. + * + * This header file contains the declarations of the %_IControlManagerEventListener class. + */ + +#ifndef _FUI_INTERNAL_ICONTROL_MANAGER_EVENT_LISTENER_H_ +#define _FUI_INTERNAL_ICONTROL_MANAGER_EVENT_LISTENER_H_ + +#include + +namespace Tizen { namespace Ui +{ + +class _OSP_EXPORT_ _IControlManagerEventListener + : public Tizen::Base::Runtime::IEventListener +{ +public: + virtual ~_IControlManagerEventListener(void) {} + virtual void OnControlManagerTerminating(void) = 0; +}; + +}}//Tizen::Ui + +#endif // _FUI_INTERNAL_ICONTROL_MANAGER_EVENT_LISTENER_H_ 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_IFocusEventListener.h b/src/ui/inc/FUi_IFocusEventListener.h new file mode 100644 index 0000000..c5928ff --- /dev/null +++ b/src/ui/inc/FUi_IFocusEventListener.h @@ -0,0 +1,79 @@ +// +// 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_IFocusEventListener.h + * @brief This is the header file for the _IFocusEventListener class. + * + * This header file contains the declarations of the %_IFocusEventListener class. + */ + +#ifndef _FUI_INTERNAL_IFOCUS_EVENT_LISTENER_H_ +#define _FUI_INTERNAL_IFOCUS_EVENT_LISTENER_H_ + +#include "FUi_IUiEventListener.h" + +namespace Tizen { namespace Ui +{ + +class _Control; + +/** + * @interface _IFocusEventListener + * @brief This interface is used as the argument to focus the event listener. + * @since 2.0 + * + * The listener interface for receiving focus events. 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's + * AddFocusEventListener() method. When the focus event occurs, the OnFocusGained() or OnFocusLost() method of that instance is invoked. + */ +class _IFocusEventListener + : virtual public _IUiEventListener + , virtual public Tizen::Base::Runtime::IEventListener +{ +// Lifecycle +public: + /** + * This is internal. If used in an application, the application can get rejected during the certification process. + * This is the virtual destructor for this class. + * + * @since 2.0 + */ + virtual ~_IFocusEventListener(void) {} + +// Operation +public: + /** + * Notifies when Control gains the input focus. + * + * @since 2.0 + * @param[in] source The source of the event + */ + virtual bool OnFocusGained(const _Control& source) = 0; + + + /** + * Notifies when Control loses the input focus. + * + * @since 2.0 + * @param[in] source The source of the event + */ + virtual bool OnFocusLost(const _Control& source) = 0; +}; + +}}//Tizen::Ui + +#endif // _FUI_INTERNAL_IFOCUS_EVENT_LISTENER_H_ diff --git a/src/ui/inc/FUi_IKeyEventListener.h b/src/ui/inc/FUi_IKeyEventListener.h new file mode 100644 index 0000000..0b053e4 --- /dev/null +++ b/src/ui/inc/FUi_IKeyEventListener.h @@ -0,0 +1,88 @@ +// +// 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_IKeyEventListener.h + * @brief This is the header file for the _IKeyEventListener class. + * + * This header file contains the declarations of the %_IKeyEventListener class. + */ + +#ifndef _FUI_INTERNAL_IKEY_EVENT_LISTENER_H_ +#define _FUI_INTERNAL_IKEY_EVENT_LISTENER_H_ + +#include "FUi_IUiEventListener.h" +#include "FUi_UiKeyEvent.h" + +namespace Tizen {namespace Ui +{ + +class _Control; + +/** + * @interface _IKeyEventListener + * @brief This interface implements the listener for the key event. + * @since 2.0 + * + * @remarks A key event callback is called when key codes corresponding to the physical keys are + * pressed or released. ITextEventListener can be used to get the text value of the key in EditField and EditArea. + * + * The listener interface for receiving key events. The class that + * processes a key event implements this interface, and the instance created with + * that class is registered with a UI control, using the control's AddKeyEventListener() + * method. When the key event occurs, the OnKeyPressed(), OnKeyReleased(), or + * OnKeyLongPressed() method of that instance is invoked. @n + * + * Only the current focus owner can listen to key events. Use the control's SetFocus() + * method to give the input focus to a UI control. + * + */ +class _IKeyEventListener + : virtual public _IUiEventListener + , virtual public Tizen::Base::Runtime::IEventListener +{ +// Operation +public: + /** + * This is internal. If used in an application, the application can get rejected during the certification process. + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~_IKeyEventListener(void) {} + + /** + * Notifies when a key is pressed. + * + * @since 2.0 + * @param[in] source The source of the event + * @param[in] keyCode The key code + */ + virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) = 0; + + /** + * Notifies when a key is released. + * + * @since 2.0 + * @param[in] source The source of the event + * @param[in] keyCode The key code + */ + virtual bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) = 0; +}; // _IKeyEventListener + +}} // Tizen::Ui + +#endif //_FUI_INTERNAL_IKEY_EVENT_LISTENER_H_ diff --git a/src/ui/inc/FUi_IKeyEventPreviewer.h b/src/ui/inc/FUi_IKeyEventPreviewer.h new file mode 100644 index 0000000..1def844 --- /dev/null +++ b/src/ui/inc/FUi_IKeyEventPreviewer.h @@ -0,0 +1,90 @@ +// +// 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_IKeyEventPreviewer.h + * @brief This is the header file for the _IKeyEventPreviewer class. + * + * This header file contains the declarations of the %_IKeyEventListener class. + */ + +#ifndef _FUI_INTERNAL_IKEY_EVENT_PREVIEWER_H_ +#define _FUI_INTERNAL_IKEY_EVENT_PREVIEWER_H_ + +#include "FUi_IUiEventListener.h" +#include "FUi_UiKeyEvent.h" + +namespace Tizen {namespace Ui +{ + +class _Control; + +/** + * @interface _IKeyEventPreviewer + * @brief This interface implements the listener for the key event. + * @since 2.0 + * + * @remarks A key event callback is called when key codes corresponding to the physical keys are + * pressed or released. ITextEventListener can be used to get the text value of the key in EditField and EditArea. + * + * The listener interface for receiving key events. The class that + * processes a key event implements this interface, and the instance created with + * that class is registered with a UI control, using the control's AddKeyEventListener() + * method. When the key event occurs, the OnKeyPressed(), OnKeyReleased(), or + * OnKeyLongPressed() method of that instance is invoked. @n + * + * Only the current focus owner can listen to key events. Use the control's SetFocus() + * method to give the input focus to a UI control. + * + */ +class _IKeyEventPreviewer + : virtual public _IUiEventPreviewer + , virtual public Tizen::Base::Runtime::IEventListener +{ +// Operation +public: + /** + * This is internal. If used in an application, the application can get rejected during the certification process. + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~_IKeyEventPreviewer(void) {} + + + /** + * Notifies when a key is pressed. + * + * @since 2.0 + * @param[in] source The source of the event + * @param[in] keyCode The key code + */ + virtual bool OnPreviewKeyPressed(const _Control& source, const _KeyInfo& keyInfo) = 0; + + + /** + * Notifies when a key is released. + * + * @since 2.0 + * @param[in] source The source of the event + * @param[in] keyCode The key code + */ + virtual bool OnPreviewKeyReleased(const _Control& source, const _KeyInfo& keyInfo) = 0; +}; // _IKeyEventPreviewer + +}} // Tizen::Ui + +#endif //_FUI_INTERNAL_IKEY_EVENT_PREVIEWER_H_ diff --git a/src/ui/inc/FUi_INotificationEventListener.h b/src/ui/inc/FUi_INotificationEventListener.h new file mode 100644 index 0000000..dc7fd93 --- /dev/null +++ b/src/ui/inc/FUi_INotificationEventListener.h @@ -0,0 +1,58 @@ +// +// 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_INotificationEventListener.h + * @brief This is the header file for the _INotificationEventListener class. + * + * This header file contains the declarations of the %_INotificationEventListener class. + */ + +#ifndef _FUI_INTERNAL_INOTIFICATION_EVENT_LISTENER_H_ +#define _FUI_INTERNAL_INOTIFICATION_EVENT_LISTENER_H_ + +#include +#include "FUi_IUiEventListener.h" + +namespace Tizen { namespace Base { namespace Collection +{ +class IList; +} } } + +namespace Tizen { namespace Ui +{ + +class _Control; + +class _INotificationEventListener + : virtual public _IUiEventListener + , virtual public Tizen::Base::Runtime::IEventListener +{ +// Operation +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~_INotificationEventListener(void) {} + + virtual bool OnNotifiedN(const _Control& source, Tizen::Base::Collection::IList* pArgs) = 0; +}; + +}} // Tizen::Ui + +#endif // _FUI_INTERNAL_INOTIFICATION_EVENT_LISTENER_H_ diff --git a/src/ui/inc/FUi_INotificationEventPreviewer.h b/src/ui/inc/FUi_INotificationEventPreviewer.h new file mode 100644 index 0000000..74ab91e --- /dev/null +++ b/src/ui/inc/FUi_INotificationEventPreviewer.h @@ -0,0 +1,58 @@ +// +// 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_INotificationEventPreviewer.h + * @brief This is the header file for the _INotificationEventPreviewer class. + * + * This header file contains the declarations of the %_INotificationEventPreviewer class. + */ + +#ifndef _FUI_INTERNAL_INOTIFICATION_EVENT_PREVIEWER_H_ +#define _FUI_INTERNAL_INOTIFICATION_EVENT_PREVIEWER_H_ + +#include +#include "FUi_IUiEventPreviewer.h" + +namespace Tizen { namespace Base { namespace Collection +{ +class IList; +} } } + +namespace Tizen { namespace Ui +{ + +class _Control; + +class _INotificationEventPreviewer + : virtual public _IUiEventPreviewer + , virtual public Tizen::Base::Runtime::IEventListener +{ +// Operation +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~_INotificationEventPreviewer(void) {} + + virtual bool OnPreviewNotifiedN(const _Control& source, Tizen::Base::Collection::IList* pArgs) = 0; +}; + +}} // Tizen::Ui + +#endif // _FUI_INTERNAL_INOTIFICATION_EVENT_PREVIEWER_H_ diff --git a/src/ui/inc/FUi_IPropertyChangeEventListener.h b/src/ui/inc/FUi_IPropertyChangeEventListener.h new file mode 100644 index 0000000..44b978f --- /dev/null +++ b/src/ui/inc/FUi_IPropertyChangeEventListener.h @@ -0,0 +1,76 @@ +// +// 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_IPropertyChangeEventListener.h + * @brief This is the header file for the _IPropertyChangeEventListener interface. + * + * This header file contains the declarations of the _IPropertyChangeEventListener interface. + */ +#ifndef _FUI_INTERNAL_IPROPERTY_CHANGED_EVENT_LISTENER_H_ +#define _FUI_INTERNAL_IPROPERTY_CHANGED_EVENT_LISTENER_H_ + +#include +#include +#include +#include + +namespace Tizen { namespace Ui +{ +class _PropertyBase; + +/** + * @interface _IPropertyChangeEventListener + * @brief The listener interface for property change event. + * @since 2.0 + */ +class _IPropertyChangeEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +// Operation +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~_IPropertyChangeEventListener(void) {} + + /** + * Notifies when an entity is touch pressed. + * + * @since 2.0 + * @param[in] source The source of the event + * @param[in] oldValue The old property + * @param[in] newValue The new property + */ + virtual void OnPropertyChanging(Tizen::Ui::_PropertyBase& source, const Tizen::Base::String& name, const Variant& oldValue, const Variant& newValue) = 0; + + /** + * Notifies when an entity is touch pressed. + * + * @since 2.0 + * @param[in] source The source of the event + * @param[in] oldValue The old property + * @param[in] newValue The new property + */ + virtual void OnPropertyChanged(Tizen::Ui::_PropertyBase& source, const Tizen::Base::String& name, const Variant& oldValue, const Variant& newValue) = 0; +}; // _IPropertyChangeEventListener + +} } // Tizen::Ui + +#endif // _FUI_INTERNAL_IPROPERTY_CHANGED_EVENT_LISTENER_H_ + diff --git a/src/ui/inc/FUi_ITouchCustomGestureEventListener.h b/src/ui/inc/FUi_ITouchCustomGestureEventListener.h new file mode 100644 index 0000000..52229c5 --- /dev/null +++ b/src/ui/inc/FUi_ITouchCustomGestureEventListener.h @@ -0,0 +1,87 @@ +// +// 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_ITouchCustomGestureEventListener.h +* @brief This is the header file for the %_ITouchCustomGestureEventListener interface. +* +* This header file contains the declarations of the %_ITouchCustomGestureEventListener interface. +*/ +#ifndef _FUI_INTERNAL_ITOUCH_CUSTOM_GESTURE_EVENT_LISTENER_H_ +#define _FUI_INTERNAL_ITOUCH_CUSTOM_GESTURE_EVENT_LISTENER_H_ + +#include "FUi_ITouchGestureEventListener.h" + +namespace Tizen { namespace Ui +{ + +/** + * @interface _ITouchCustomGestureEventListener + * @brief This interface is used as the argument to the gesture custom event listener. + * @since 2.0 + * + * The listener interface for receiving gesture events. The class that processes a custom gesture event + * implements this interface, and the instance created with that class is registered with a UI controls, using the gesture's + * AddGestureEventListener() method. When the gesture is recognized, OnGestureTapRecognized method of that instance is invoked. + */ +class _ITouchCustomGestureEventListener + : virtual public _ITouchGestureEventListener +{ +// Operation +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~_ITouchCustomGestureEventListener(void) {} + + /** + * Notifies when the gesture is recognized. + * + * @since 2.0 + * @param[in] gesture the gesture instance + */ + virtual bool OnCustomGestureStarted(_TouchGestureDetector& gesture) = 0; + + /** + * Notifies when the gesture is recognized. + * + * @since 2.0 + * @param[in] gesture the gesture instance + */ + virtual bool OnCustomGestureChanged(_TouchGestureDetector& gesture) = 0; + + /** + * Notifies when the gesture is recognized. + * + * @since 2.0 + * @param[in] gesture the gesture instance + */ + virtual bool OnCustomGestureFinished(_TouchGestureDetector& gesture) = 0; + + /** + * Notifies when the gesture is recognized. + * + * @since 2.0 + * @param[in] gesture the gesture instance + */ + virtual bool OnCustomGestureCanceled(_TouchGestureDetector& gesture) = 0; +}; // _ITouchCustomGestureEventListener + +} } // Tizen::Ui + +#endif // _FUI_INTERNAL_ITOUCH_CUSTOM_GESTURE_EVENT_LISTENER_H_ diff --git a/src/ui/inc/FUi_ITouchEventListener.h b/src/ui/inc/FUi_ITouchEventListener.h new file mode 100644 index 0000000..ae8ce7a --- /dev/null +++ b/src/ui/inc/FUi_ITouchEventListener.h @@ -0,0 +1,103 @@ +// +// 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_ITouchEventListener.h + * @brief This is the header file for the _ITouchEventListener class. + * + * This header file contains the declarations of the %_ITouchEventListener class. + */ + +#ifndef _FUI_INTERNAL_ITOUCH_EVENT_LISTENER_H_ +#define _FUI_INTERNAL_ITOUCH_EVENT_LISTENER_H_ + +#include +#include +#include "FUi_IUiEventListener.h" + +namespace Tizen { namespace Ui +{ + +class _Control; +class _TouchInfo; + +/** + * @interface _ITouchEventListener + * @brief This interface is used as the argument to the touch event listener. + * @since 2.0 + * + * The listener interface for receiving touch events. 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's + * AddTouchEventListener() method. When the touch event occurs, the OnTouchDoublePressed(), OnTouchFocusIn(), OnTouchFocusOut(), OnTouchLongPressed(), OnTouchLongPressed(), OnTouchMoved(), OnTouchPressed(), or OnTouchReleased() method of that instance is invoked. + */ +class _ITouchEventListener + : virtual public _IUiEventListener +{ +// Operation +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~_ITouchEventListener(void) {} + + /** + * Notifies when an entity is touch pressed. + * + * @since 2.0 + * @param[in] source The source of the event + * @param[in] currentPosition The current position + * @param[in] touchInfo The touch event information + */ + virtual bool OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) = 0; + + /** + * Notifies when an entity is touch released. + * + * @since 2.0 + * @param[in] source The source of the event + * @param[in] currentPosition The current position + * @param[in] touchInfo The touch event information + */ + virtual bool OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) = 0; + + /** + * Notifies when an entity is touch moved. + * + * @since 2.0 + * @param[in] source The source of the event + * @param[in] currentPosition The current position + * @param[in] touchInfo The touch event information + */ + virtual bool OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) = 0; + + /** + * Notifies when an entity is touch cancelled. + * + * @since 2.0 + * @param[in] source The source of the event + * @param[in] currentPosition The current position + * @param[in] touchInfo The touch event information + */ + virtual bool OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) = 0; + + virtual bool OnTouchWheeled(const _Control& source, const _TouchInfo& touchinfo){return false;} +}; // _ITouchEventListener + +}} // Tizen::Ui + +#endif // _FUI_INTERNAL_ITOUCH_EVENT_LISTENER_H_ diff --git a/src/ui/inc/FUi_ITouchEventPreviewer.h b/src/ui/inc/FUi_ITouchEventPreviewer.h new file mode 100644 index 0000000..516f4af --- /dev/null +++ b/src/ui/inc/FUi_ITouchEventPreviewer.h @@ -0,0 +1,104 @@ +// +// 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_ITouchEventPreviewer.h + * @brief This is the header file for the _ITouchEventPreviewer class. + * + * This header file contains the declarations of the %_ITouchEventPreviewer class. + */ + +#ifndef _FUI_INTERNAL_ITOUCH_EVENT_PREVIEWER_H_ +#define _FUI_INTERNAL_ITOUCH_EVENT_PREVIEWER_H_ + +#include +#include +#include "FUi_IUiEventPreviewer.h" +#include "FUi_UiEventTypes.h" + +namespace Tizen { namespace Ui +{ + +class _Control; +class _TouchInfo; + +/** + * @interface _ITouchEventPreviewer + * @brief This interface is used as the argument to the touch event listener. + * @since 2.0 + * + * The listener interface for receiving touch events. 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's + * AddTouchEventListener() method. When the touch event occurs, the OnTouchDoublePressed(), OnTouchFocusIn(), OnTouchFocusOut(), OnTouchLongPressed(), OnTouchLongPressed(), OnTouchMoved(), OnTouchPressed(), or OnTouchReleased() method of that instance is invoked. + */ +class _ITouchEventPreviewer + : virtual public _IUiEventPreviewer +{ +// Operation +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~_ITouchEventPreviewer(void) {} + + /** + * Notifies when an entity is touch pressed. + * + * @since 2.0 + * @param[in] source The source of the event + * @param[in] currentPosition The current position + * @param[in] touchInfo The touch event information + */ + virtual _UiTouchEventDelivery OnPreviewTouchPressed(const _Control& source, const _TouchInfo& touchinfo) = 0; + + /** + * Notifies when an entity is touch released. + * + * @since 2.0 + * @param[in] source The source of the event + * @param[in] currentPosition The current position + * @param[in] touchInfo The touch event information + */ + virtual _UiTouchEventDelivery OnPreviewTouchReleased(const _Control& source, const _TouchInfo& touchinfo) = 0; + + /** + * Notifies when an entity is touch moved. + * + * @since 2.0 + * @param[in] source The source of the event + * @param[in] currentPosition The current position + * @param[in] touchInfo The touch event information + */ + virtual _UiTouchEventDelivery OnPreviewTouchMoved(const _Control& source, const _TouchInfo& touchinfo) = 0; + + /** + * Notifies when an entity is touch cancelled. + * + * @since 2.0 + * @param[in] source The source of the event + * @param[in] currentPosition The current position + * @param[in] touchInfo The touch event information + */ + 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;} +}; // _ITouchEventPreviewer + +}} // Tizen::Ui + +#endif // _FUI_INTERNAL_ITOUCH_EVENT_PREVIEWER_H_ diff --git a/src/ui/inc/FUi_ITouchFlickGestureEventListener.h b/src/ui/inc/FUi_ITouchFlickGestureEventListener.h new file mode 100644 index 0000000..1b02f94 --- /dev/null +++ b/src/ui/inc/FUi_ITouchFlickGestureEventListener.h @@ -0,0 +1,70 @@ +// +// 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_ITouchFlickGestureEventListener.h +* @brief This is the header file for the %_ITouchFlickGestureEventListener interface. +* +* This header file contains the declarations of the %_ITouchFlickGestureEventListener interface. +*/ +#ifndef _FUI_INTERNAL_ITOUCH_FLICK_GESTURE_EVENT_LISTENER_H +#define _FUI_INTERNAL_ITOUCH_FLICK_GESTURE_EVENT_LISTENER_H + +#include "FUi_ITouchGestureEventListener.h" +#include "FUi_TouchFlickGestureDetector.h" + +namespace Tizen { namespace Ui +{ +/** + * @interface _ITouchFlickGestureEventListener + * @brief This interface is used as the argument to the flick gesture event listener. + * @since 2.0 + * + * The listener interface for receiving gesture events. The class that processes a flick gesture event + * implements this interface, and the instance created with that class is registered with a UI controls, using the gesture's + * AddGestureEventListener() method. When the gesture is recognized, OnGestureTapRecognized method of that instance is invoked. + */ +class _ITouchFlickGestureEventListener + : virtual public _ITouchGestureEventListener +{ +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~_ITouchFlickGestureEventListener(void) {} + + /** + * Notifies when the gesture is recognized. + * + * @since 2.0 + * @param[in] gesture the gesture instance + */ + virtual bool OnFlickGestureDetected(_TouchFlickGestureDetector& gesture) = 0; + + /** + * Notifies when the gesture recognition is canceled. + * + * @since 2.0 + * @param[in] gesture the gesture instance + */ + virtual bool OnFlickGestureCanceled(_TouchFlickGestureDetector& gesture) = 0; +}; // _ITouchFlickGestureEventListener + +} } // Tizen::Ui + +#endif // _FUI_INTERNAL_ITOUCH_FLICK_GESTURE_EVENT_LISTENER_H diff --git a/src/ui/inc/FUi_ITouchGestureDelegate.h b/src/ui/inc/FUi_ITouchGestureDelegate.h new file mode 100644 index 0000000..7f96e0e --- /dev/null +++ b/src/ui/inc/FUi_ITouchGestureDelegate.h @@ -0,0 +1,50 @@ +// +// 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_ITouchGestureDelegate.h +* @brief This is the header file for the %_ITouchGestureDelegate interface. +* +* This header file contains the declarations of the %_ITouchGestureDelegate interface. +*/ +#ifndef _FUI_INTERNAL_ITOUCH_GESTURE_DELEGATE_H_ +#define _FUI_INTERNAL_ITOUCH_GESTURE_DELEGATE_H_ + +#include "FUi_ITouchEventListener.h" + +namespace Tizen { namespace Ui +{ +/** + * @interface _IGestureDelegator + * @since 2.0 + * + */ +class _ITouchGestureDelegate + : virtual public _ITouchEventListener +{ +// Operation +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~_ITouchGestureDelegate(void) {} +}; // _ITouchGestureDelegate + +} } // Tizen::Ui + +#endif // _FUI_INTERNAL_ITOUCH_GESTURE_DELEGATE_H_ diff --git a/src/ui/inc/FUi_ITouchGestureEventListener.h b/src/ui/inc/FUi_ITouchGestureEventListener.h new file mode 100644 index 0000000..1fc3cf5 --- /dev/null +++ b/src/ui/inc/FUi_ITouchGestureEventListener.h @@ -0,0 +1,51 @@ +// +// 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_ITouchGestureEventListener.h +* @brief This is the header file for the %_ITouchGestureEventListener interface. +* +* This header file contains the declarations of the %_ITouchGestureEventListener interface. +*/ +#ifndef _FUI_INTERNAL_ITOUCH_GESTURE_EVENT_LISTENER_H_ +#define _FUI_INTERNAL_ITOUCH_GESTURE_EVENT_LISTENER_H_ + +#include "FUi_IUiEventListener.h" + +namespace Tizen { namespace Ui +{ +/** + * @interface _ITouchGestureEventListener + * @brief This interface is used as the argument to the base gesture event listener. + * @since 2.0 + * + */ +class _ITouchGestureEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +// Operation +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~_ITouchGestureEventListener(void) {} +}; // _ITouchGestureEventListener + +} } // Tizen::Ui + +#endif // _FUI_INTERNAL_ITOUCH_GESTURE_EVENT_LISTENER_H_ diff --git a/src/ui/inc/FUi_ITouchGestureStateChangedListener.h b/src/ui/inc/FUi_ITouchGestureStateChangedListener.h new file mode 100644 index 0000000..d61b787 --- /dev/null +++ b/src/ui/inc/FUi_ITouchGestureStateChangedListener.h @@ -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_ITouchGestureStateChangedListener.h +* @brief This is the header file for the %_ITouchGestureStateChangedListener interface. +* +* This header file contains the declarations of the %_ITouchGestureStateChangedListener interface. +*/ +#ifndef _FUI_INTERNAL_ITOUCH_GESTURE_STATE_CHANGED_LISTENER_H_ +#define _FUI_INTERNAL_ITOUCH_GESTURE_STATE_CHANGED_LISTENER_H_ + +#include "FUi_IUiEventListener.h" + +namespace Tizen { namespace Ui +{ +class _TouchGestureDetector; + +/** + * @interface _ITouchGestureStateChangedListener + * @since 2.0 + * + */ +class _ITouchGestureStateChangedListener + : virtual public _IUiEventListener + , virtual public Tizen::Base::Runtime::IEventListener +{ +// Operation +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~_ITouchGestureStateChangedListener(void) {} + + virtual void OnGestureDetectorStateChanged(const _TouchGestureDetector& gestureDetector) = 0; +}; // _ITouchGestureStateChangedListener + +} } // Tizen::Ui + +#endif // _FUI_INTERNAL_ITOUCH_GESTURE_STATE_CHANGED_LISTENER_H_ diff --git a/src/ui/inc/FUi_ITouchLongPressGestureEventListener.h b/src/ui/inc/FUi_ITouchLongPressGestureEventListener.h new file mode 100644 index 0000000..38aa646 --- /dev/null +++ b/src/ui/inc/FUi_ITouchLongPressGestureEventListener.h @@ -0,0 +1,72 @@ +// +// 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_ITouchLongPressGestureEventListener.h +* @brief This is the header file for the %_ITouchLongPressGestureEventListener interface. +* +* This header file contains the declarations of the %_ITouchLongPressGestureEventListener interface. +*/ +#ifndef _FUI_INTERNAL_ITOUCH_LONG_PRESS_GESTURE_EVENT_LISTENER_H_ +#define _FUI_INTERNAL_ITOUCH_LONG_PRESS_GESTURE_EVENT_LISTENER_H_ + +#include "FUi_ITouchGestureEventListener.h" +#include "FUi_TouchLongPressGestureDetector.h" + +namespace Tizen { namespace Ui +{ + +/** + * @interface _ITouchLongPressGestureEventListener + * @brief This interface is used as the argument to the long press gesture event listener. + * @since 2.0 + * + * The listener interface for receiving gesture events. The class that processes a long press gesture event + * implements this interface, and the instance created with that class is registered with a UI controls, using the gesture's + * AddGestureEventListener() method. When the gesture is recognized, OnGestureTapRecognized method of that instance is invoked. + */ +class _ITouchLongPressGestureEventListener + : virtual public _ITouchGestureEventListener +{ +// Operation +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~_ITouchLongPressGestureEventListener(void) {} + + /** + * Notifies when the gesture is recognized. + * + * @since 2.0 + * @param[in] gesture the gesture instance + */ + virtual bool OnLongPressGestureDetected(_TouchLongPressGestureDetector& gesture) = 0; + + /** + * Notifies when the gesture recognition is canceled. + * + * @since 2.0 + * @param[in] gesture the gesture instance + */ + virtual bool OnLongPressGestureCanceled(_TouchLongPressGestureDetector& gesture) = 0; +}; // _ITouchLongPressGestureEventListener + +} } // Tizen::Ui + +#endif // _FUI_INTERNAL_ITOUCH_LONG_PRESS_GESTURE_EVENT_LISTENER_H_ diff --git a/src/ui/inc/FUi_ITouchPanningGestureEventListener.h b/src/ui/inc/FUi_ITouchPanningGestureEventListener.h new file mode 100644 index 0000000..b441a16 --- /dev/null +++ b/src/ui/inc/FUi_ITouchPanningGestureEventListener.h @@ -0,0 +1,83 @@ +// +// 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_ITouchPanningGestureEventListener.h +* @brief This is the header file for the %_ITouchPanningGestureEventListener interface. +* +* This header file contains the declarations of the %_ITouchPanningGestureEventListener interface. +*/ +#ifndef _FUI_INTERNAL_ITOUCH_PANNING_GESTURE_EVENT_LISTENER_H_ +#define _FUI_INTERNAL_ITOUCH_PANNING_GESTURE_EVENT_LISTENER_H_ + +#include "FUi_ITouchGestureEventListener.h" +#include "FUi_TouchPanningGestureDetector.h" + +namespace Tizen { namespace Ui +{ + +/** + * @interface _ITouchPanningGestureEventListener + * @brief This interface is used as the argument to the panning gesture event listener. + * @since 2.0 + * + * The listener interface for receiving gesture events. The class that processes a panning gesture event + * implements this interface, and the instance created with that class is registered with a UI controls, using the gesture's + * AddGestureEventListener() method. When the gesture is recognized, OnGestureTapRecognized method of that instance is invoked. + */ +class _ITouchPanningGestureEventListener + : virtual public _ITouchGestureEventListener +{ +// Operation +public: + virtual ~_ITouchPanningGestureEventListener(void) {} + + /** + * Notifies when the gesture is started to recognition. + * + * @since 2.0 + * @param[in] gesture the gesture instance + */ + virtual bool OnPanningGestureStarted(_TouchPanningGestureDetector& gesture) = 0; + + /** + * Notifies when the gesture is recognized. + * + * @since 2.0 + * @param[in] gesture the gesture instance + */ + virtual bool OnPanningGestureChanged(_TouchPanningGestureDetector& gesture) = 0; + + /** + * Notifies when the gesture recognition is finished. + * + * @since 2.0 + * @param[in] gesture the gesture instance + */ + virtual bool OnPanningGestureFinished(_TouchPanningGestureDetector& gesture) = 0; + + /** + * Notifies when the gesture recognition is canceled. + * + * @since 2.0 + * @param[in] gesture the gesture instance + */ + virtual bool OnPanningGestureCanceled(_TouchPanningGestureDetector& gesture) = 0; +}; // _ITouchPanningGestureEventListener + +} } // Tizen::Ui + +#endif // _FUI_INTERNAL_ITOUCH_PANNING_GESTURE_EVENT_LISTENER_H_ diff --git a/src/ui/inc/FUi_ITouchPinchGestureEventListener.h b/src/ui/inc/FUi_ITouchPinchGestureEventListener.h new file mode 100644 index 0000000..119a24b --- /dev/null +++ b/src/ui/inc/FUi_ITouchPinchGestureEventListener.h @@ -0,0 +1,88 @@ +// +// 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_ITouchPinchGestureEventListener.h +* @brief This is the header file for the %_ITouchPinchGestureEventListener interface. +* +* This header file contains the declarations of the %_ITouchPinchGestureEventListener interface. +*/ +#ifndef _FUI_INTERNAL_ITOUCH_PINCH_GESTURE_EVENT_LISTENER_H_ +#define _FUI_INTERNAL_ITOUCH_PINCH_GESTURE_EVENT_LISTENER_H_ + +#include "FUi_ITouchGestureEventListener.h" +#include "FUi_TouchPinchGestureDetector.h" + +namespace Tizen { namespace Ui +{ + +/** + * @interface _ITouchPinchGestureEventListener + * @brief This interface is used as the argument to the pinch gesture event listener. + * @since 2.0 + * + * The listener interface for receiving gesture events. The class that processes a pinch gesture event + * implements this interface, and the instance created with that class is registered with a UI controls, using the gesture's + * AddGestureEventListener() method. When the gesture is recognized, OnPinchGestureRecognized method of that instance is invoked. + */ +class _ITouchPinchGestureEventListener + : virtual public _ITouchGestureEventListener +{ +// Operation +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~_ITouchPinchGestureEventListener(void) {} + + /** + * Notifies when the gesture is recognized. + * + * @since 2.0 + * @param[in] gesture the gesture instance + */ + virtual bool OnPinchGestureStarted(_TouchPinchGestureDetector& gesture) = 0; + + /** + * Notifies when the gesture is recognized. + * + * @since 2.0 + * @param[in] gesture the gesture instance + */ + virtual bool OnPinchGestureChanged(_TouchPinchGestureDetector& gesture) = 0; + + /** + * Notifies when the gesture is recognized. + * + * @since 2.0 + * @param[in] gesture the gesture instance + */ + virtual bool OnPinchGestureFinished(_TouchPinchGestureDetector& gesture) = 0; + + /** + * Notifies when the gesture is recognized. + * + * @since 2.0 + * @param[in] gesture the gesture instance + */ + virtual bool OnPinchGestureCanceled(_TouchPinchGestureDetector& gesture) = 0; +}; // _ITouchPinchGestureEventListener + +} } // Tizen::Ui + +#endif // _FUI_INTERNAL_ITOUCH_PINCH_GESTURE_EVENT_LISTENER_H_ diff --git a/src/ui/inc/FUi_ITouchRotationGestureEventListener.h b/src/ui/inc/FUi_ITouchRotationGestureEventListener.h new file mode 100644 index 0000000..cff4fd4 --- /dev/null +++ b/src/ui/inc/FUi_ITouchRotationGestureEventListener.h @@ -0,0 +1,88 @@ +// +// 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_ITouchRotationGestureEventListener.h +* @brief This is the header file for the %_ITouchRotationGestureEventListener interface. +* +* This header file contains the declarations of the %_ITouchRotationGestureEventListener interface. +*/ +#ifndef _FUI_INTERNAL_ITOUCH_ROTATION_GESTURE_EVENT_LISTENER_H_ +#define _FUI_INTERNAL_ITOUCH_ROTATION_GESTURE_EVENT_LISTENER_H_ + +#include "FUi_ITouchGestureEventListener.h" +#include "FUi_TouchRotationGestureDetector.h" + +namespace Tizen { namespace Ui +{ + +/** + * @interface _ITouchRotationGestureEventListener + * @brief This interface is used as the argument to the rotation gesture event listener. + * @since 2.0 + * + * The listener interface for receiving gesture events. The class that processes a rotation gesture event + * implements this interface, and the instance created with that class is registered with a UI controls, using the gesture's + * AddGestureEventListener() method. When the gesture is recognized, OnGestureTapRecognized method of that instance is invoked. + */ +class _ITouchRotationGestureEventListener + : virtual public _ITouchGestureEventListener +{ +// Operation +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~_ITouchRotationGestureEventListener(void) {} + + /** + * Notifies when the gesture is recognized. + * + * @since 2.0 + * @param[in] gesture the gesture instance + */ + virtual bool OnRotationGestureStarted(_TouchRotationGestureDetector& gesture) = 0; + + /** + * Notifies when the gesture is recognized. + * + * @since 2.0 + * @param[in] gesture the gesture instance + */ + virtual bool OnRotationGestureChanged(_TouchRotationGestureDetector& gesture) = 0; + + /** + * Notifies when the gesture is recognized. + * + * @since 2.0 + * @param[in] gesture the gesture instance + */ + virtual bool OnRotationGestureFinished(_TouchRotationGestureDetector& gesture) = 0; + + /** + * Notifies when the gesture is recognized. + * + * @since 2.0 + * @param[in] gesture the gesture instance + */ + virtual bool OnRotationGestureCanceled(_TouchRotationGestureDetector& gesture) = 0; +}; // _ITouchRotationGestureEventListener + +} } // Tizen::Ui + +#endif // _FUI_INTERNAL_ITOUCH_ROTATION_GESTURE_EVENT_LISTENER_H_ diff --git a/src/ui/inc/FUi_ITouchTapGestureEventListener.h b/src/ui/inc/FUi_ITouchTapGestureEventListener.h new file mode 100644 index 0000000..8e9d6c0 --- /dev/null +++ b/src/ui/inc/FUi_ITouchTapGestureEventListener.h @@ -0,0 +1,72 @@ +// +// 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_ITouchTapGestureEventListener.h +* @brief This is the header file for the %_ITouchTapGestureEventListener interface. +* +* This header file contains the declarations of the %_ITouchTapGestureEventListener interface. +*/ +#ifndef _FUI_INTERNAL_ITOUCH_TAP_GESTURE_EVENT_LISTENER_H_ +#define _FUI_INTERNAL_ITOUCH_TAP_GESTURE_EVENT_LISTENER_H_ + +#include "FUi_ITouchGestureEventListener.h" +#include "FUi_TouchTapGestureDetector.h" + +namespace Tizen { namespace Ui +{ + +/** + * @interface _ITouchTapGestureEventListener + * @brief This interface is used as the argument to the tap gesture event listener. + * @since 2.0 + * + * The listener interface for receiving gesture events. The class that processes a tap gesture event + * implements this interface, and the instance created with that class is registered with a UI controls, using the gesture's + * AddGestureEventListener() method. When the gesture is recognized, OnTapGestureDetected method of that instance is invoked. + */ +class _ITouchTapGestureEventListener + : virtual public _ITouchGestureEventListener +{ +// Operation +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~_ITouchTapGestureEventListener(void) {} + + /** + * Notifies when the gesture is recognized. + * + * @since 2.0 + * @param[in] gesture the gesture instance + */ + virtual bool OnTapGestureDetected(_TouchTapGestureDetector& gesture) = 0; + + /** + * Notifies when the gesture recognition is canceled. + * + * @since 2.0 + * @param[in] gesture the gesture instance + */ + virtual bool OnTapGestureCanceled(_TouchTapGestureDetector& gesture) = 0; +}; // _ITouchTapGestureEventListener + +} } // Tizen::Ui + +#endif // _FUI_INTERNAL_ITOUCH_TAP_GESTURE_EVENT_LISTENER_H_ diff --git a/src/ui/inc/FUi_IUiEventListener.h b/src/ui/inc/FUi_IUiEventListener.h new file mode 100644 index 0000000..84ae3ed --- /dev/null +++ b/src/ui/inc/FUi_IUiEventListener.h @@ -0,0 +1,48 @@ +// +// 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_IUiEventListener.h + * @brief This is the header file for the _IUiEventListener class. + * + * This header file contains the declarations of the %_IUiEventListener class. + */ + +#ifndef _FUI_INTERNAL_IUI_EVENT_LISTENER_H_ +#define _FUI_INTERNAL_IUI_EVENT_LISTENER_H_ + +#include +#include + +namespace Tizen { namespace Ui +{ + +class _IUiEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +// Operation +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~_IUiEventListener(void) {} +}; + +}} // Tizen::Ui + +#endif // _FUI_INTERNAL_IUI_EVENT_LISTENER_H_ diff --git a/src/ui/inc/FUi_IUiEventManager.h b/src/ui/inc/FUi_IUiEventManager.h new file mode 100644 index 0000000..8da9e79 --- /dev/null +++ b/src/ui/inc/FUi_IUiEventManager.h @@ -0,0 +1,57 @@ +// +// 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_IUiEventManager.h + * @brief This is the header file for the _IUiEventManager class. + * + * This header file contains the declarations of the %_IUiEventManager class. + */ + +#ifndef _FUI_INTERNAL_IUI_EVENT_MANAGER_H_ +#define _FUI_INTERNAL_IUI_EVENT_MANAGER_H_ + +#include + +namespace Tizen { namespace Ui +{ + +class _UiEvent; +class _Control; + +/** +* This is internal. If used in an application, the application can get rejected during the certification process. +* @class _IUiEventManager +* @brief This class impliments _IUiEventManager and +* fire the Window Event object of a Ui Control. +*/ +class _IUiEventManager +{ +public: + virtual ~_IUiEventManager(void) {} + +public: + virtual result RegisterKeyEventHandler(const _Control& control) = 0; + virtual result RegisterTouchEventHandler(const _Control& control) = 0; + 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 + +#endif //_FUI_INTERNAL_IUI_EVENT_MANAGER_H_ diff --git a/src/ui/inc/FUi_IUiEventPreviewer.h b/src/ui/inc/FUi_IUiEventPreviewer.h new file mode 100644 index 0000000..b4b3858 --- /dev/null +++ b/src/ui/inc/FUi_IUiEventPreviewer.h @@ -0,0 +1,48 @@ +// +// 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_IUiEventPreviewer.h + * @brief This is the header file for the _IUiEventPreviewer class. + * + * This header file contains the declarations of the %_IUiEventPreviewer class. + */ + +#ifndef _FUI_INTERNAL_IUI_EVENT_PREVIEWER_H_ +#define _FUI_INTERNAL_IUI_EVENT_PREVIEWER_H_ + +#include +#include + +namespace Tizen { namespace Ui +{ + +class _IUiEventPreviewer + : virtual public Tizen::Base::Runtime::IEventListener +{ +// Operation +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~_IUiEventPreviewer(void) {} +}; + +}} // Tizen::Ui + +#endif // _FUI_INTERNAL_IUI_EVENT_PREVIEWER_H_ diff --git a/src/ui/inc/FUi_IWindow.h b/src/ui/inc/FUi_IWindow.h new file mode 100644 index 0000000..d754b79 --- /dev/null +++ b/src/ui/inc/FUi_IWindow.h @@ -0,0 +1,42 @@ +// +// 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_IWindow.h + * @brief This is the header file for the _IWindow class. + * + * This header file contains the declarations of the %_IWindow class. + */ +#ifndef _FUI_INTERNAL_IWINDOW_H_ +#define _FUI_INTERNAL_IWINDOW_H_ + +#include + +namespace Tizen { namespace Ui +{ +class _Control; + +class _IWindow +{ +public: + virtual ~_IWindow(void) {} + virtual void SetFrame(const _Control& control) = 0; +}; // _IWindow + +}} // Tizen::Ui + +#endif // _FUI_INTERNAL_IWINDOW_H_ diff --git a/src/ui/inc/FUi_KeyEventInfoImpl.h b/src/ui/inc/FUi_KeyEventInfoImpl.h new file mode 100644 index 0000000..6bae00f --- /dev/null +++ b/src/ui/inc/FUi_KeyEventInfoImpl.h @@ -0,0 +1,92 @@ +// +// 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_KeyEventInfoImpl.h +* @brief This is the header file for _KeyEventInfoImpl class. +* @version 3.0 +* +* This header file contains declarations of _KeyEventInfoImpl class. +*/ + +#ifndef _FUI_INTERNAL_KEY_EVENT_INFO_IMPL_H_ +#define _FUI_INTERNAL_KEY_EVENT_INFO_IMPL_H_ + +#include +#include +#include "FUi_UiKeyEvent.h" + +namespace Tizen { namespace Ui +{ + +class KeyEventInfo; +/** + * @class _KeyEventInfoImpl + * + * @brief This class is used as the argument to Key event listener. + * + * This class is used as the argument of Key event listener. When Key event event is generated, + * the @c KeyEvent instance calls the registered IKeyEventListener with an instance of this + * class as the argument. + * + */ +class _KeyEventInfoImpl + : public Tizen::Base::Object +{ +public: + static _KeyEventInfoImpl* CreateInstanceN(KeyEventInfo* pPublic); + + virtual ~_KeyEventInfoImpl(void); + + void SetKeyEventInfo(KeyCode keyCode, int keyModifiers); + + void SetKeyCode(KeyCode keyCode); + + KeyCode GetKeyCode(void) const; + + void SetKeyModifier(int keyModifiers); + + int GetKeyModifier(void) const; + +private: + /** + * This is the default class constructor. + * + * @param[in] source - A pointer to the Object instance which contains this instance. + * @param[in] status - KeyStatus + */ + _KeyEventInfoImpl(KeyEventInfo* pPublic); + + /* + * This is the copy constructor for this class. + */ + _KeyEventInfoImpl(const _KeyEventInfoImpl& rhs); + + /** + * This is the assignment operator for this class. + */ + _KeyEventInfoImpl& operator =(const _KeyEventInfoImpl& rhs); + +// Attributes +private: + KeyEventInfo* __pPublic; + KeyCode __keyCode; + int __keyModifier; +}; // KeyEventInfo + +} } // Tizen::Ui + +#endif // _FUI_INTERNAL_KEY_EVENT_INFO_IMPL_H_ diff --git a/src/ui/inc/FUi_KeyEventManager.h b/src/ui/inc/FUi_KeyEventManager.h new file mode 100644 index 0000000..b8e5f76 --- /dev/null +++ b/src/ui/inc/FUi_KeyEventManager.h @@ -0,0 +1,138 @@ +// +// 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_KeyEventManager.h + * @brief This is the header file for the _KeyEventManager class. + * + * This header file contains the declarations of the _KeyEventManager class. @n. + */ +#ifndef _FUI_KEY_EVENT_MANAGER_H_ +#define _FUI_KEY_EVENT_MANAGER_H_ + +// Includes +#include +#include +#include +#include +#include +#include "FUi_Types.h" +#include "FUi_IKeyEventListener.h" + +// Forward declarations +namespace Tizen { namespace Ui +{ +class Control; +} } + +namespace Tizen {namespace Ui +{ +/** + * @class _KeyEventManager + * @brief This class manages the key events that are fired within this application's context. + * @since 2.0 + * + * The _KeyEventManager listens to all key events that are generated within this application's context. + */ +class _KeyEventManager + : public Tizen::Base::Object +{ +public: + static void Initialize(void); + + /** + * Returns the pointer to the current key event manager. + * + * @since 2.0 + * @return The current _KeyEventManager instance + */ + static _KeyEventManager* GetInstance(void); + + /** + * Adds an application-wide _IKeyEventListener instance. @n + * The added listeners gets notified when a key is pressed, released, or long + * pressed within this application's context. + * + * @since 2.0 + * @param[in] listener The event listener to add + * @remarks The listener is called after the key event is delivered + * to the focused Control's key event listeners, but before the + * key event is passed onto the focused Control itself. @n + * Moreover, if the key needs to be consumed by Control itself, + * the added listeners will not be notified. + * @see Tizen::Ui::_IKeyEventListener::OnKeyPressed() + * @see Tizen::Ui::_IKeyEventListener::OnKeyReleased() + * @see RemoveKeyEventListener () + */ + void AddKeyEventListener(const _IKeyEventListener& listener); + + + /** + * Removes the _IKeyEventListener instance. @n + * The removed listener is not notified even when the key events are fired. + * + * @since 2.0 + * @return listener The current application-wide key event listener to remove + * @see AddKeyEventListener() + */ + void RemoveKeyEventListener(const _IKeyEventListener& listener); + + /** + * Returns the list of key event listeners. @n + * + * @since 2.0 + * @return _IKeyEventListener + */ + Tizen::Base::Collection::LinkedListT* GetKeyEventListener(void) const; + + static void InitializeInstance(void); + static void ReleaseInstance(void); + +private: + /** + * This is the default constructor for this class. + * + * @since 2.0 + */ + _KeyEventManager(void); + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~_KeyEventManager(void); + + /* + * This is the copy constructor for this class. + */ + _KeyEventManager(const _KeyEventManager&); + + /** + * This is the assignment operator for this class. + */ + _KeyEventManager& operator =(const _KeyEventManager&); + +private: + static _KeyEventManager* __pInstance; + Tizen::Base::Collection::LinkedListT* __pKeyEventListeners; + _IKeyEventListener* __pKeyEventListener; + Tizen::Base::Collection::HashMapT<_KeyCode, _ControlHandle>* __pKeyCapturingMap; +}; // _KeyEventManager + +} } // Tizen::Ui + +#endif // _FUI_KEY_EVENT_MANAGER_H_ diff --git a/src/ui/inc/FUi_KeyEventManagerImpl.h b/src/ui/inc/FUi_KeyEventManagerImpl.h new file mode 100644 index 0000000..d21d73f --- /dev/null +++ b/src/ui/inc/FUi_KeyEventManagerImpl.h @@ -0,0 +1,129 @@ +// +// 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_KeyEventManagerImpl.h + * @brief This is the header file for the _KeyEventManagerImpl class. + * + * This header file contains the declarations of the _KeyEventManagerImpl class. @n. + */ +#ifndef _FUI_INTERNAL_KEY_EVENT_MANAGER_IMPL_H_ +#define _FUI_INTERNAL_KEY_EVENT_MANAGER_IMPL_H_ + +// Includes +#include +#include +#include +#include +#include + +namespace Tizen {namespace Ui +{ +class _ControlImpl; + +/** + * @class _KeyEventManagerImpl + * @brief This class manages the key events that are fired within this application's context. + * @since 2.0 + * + * The _KeyEventManagerImpl listens to all key events that are generated within this application's context. + */ +class _KeyEventManagerImpl + : public Tizen::Base::Object +{ +public: + /** + * Returns the pointer to the current key event manager. + * + * @since 2.0 + * @return The current _KeyEventManagerImpl instance + */ + static _KeyEventManagerImpl* GetInstance(void); + + + /** + * Adds an application-wide IKeyEventListener instance. @n + * The added listeners gets notified when a key is pressed, released, or long + * pressed within this application's context. + * + * @since 2.0 + * @param[in] listener The event listener to add + * @remarks The listener is called after the key event is delivered + * to the focused Control's key event listeners, but before the + * key event is passed onto the focused Control itself. @n + * Moreover, if the key needs to be consumed by Control itself, + * the added listeners will not be notified. + * @see Tizen::Ui::IKeyEventListener::OnKeyPressed() + * @see Tizen::Ui::IKeyEventListener::OnKeyReleased() + * @see Tizen::Ui::IKeyEventListener::OnKeyLongPressed() + * @see RemoveKeyEventListener () + */ + void AddKeyEventListener(IKeyEventListener& listener); + + + /** + * Removes the IKeyEventListener instance. @n + * The removed listener is not notified even when the key events are fired. + * + * @since 2.0 + * @return listener The current application-wide key event listener to remove + * @see AddKeyEventListener() + */ + void RemoveKeyEventListener(IKeyEventListener& listener); + + static void Initialize(void); + + static void ReleaseInstance(void); + +private: + /** + * This is the default constructor for this class. + * + * @since 2.0 + */ + _KeyEventManagerImpl(void); + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~_KeyEventManagerImpl(void); + + /* + * This is the copy constructor for this class. + */ + _KeyEventManagerImpl(const _KeyEventManagerImpl&); + + /** + * This is the assignment operator for this class. + */ + _KeyEventManagerImpl& operator =(const _KeyEventManagerImpl&); + + static void InitializeInstance(void); + +private: + static _KeyEventManagerImpl* __pInstance; + + Tizen::Base::Collection::LinkedListT * __pPublicKeyEventListeners; + + class PublicEventListener; + PublicEventListener* __pKeyEventListeners; +}; // _KeyEventManagerImpl + +} } // Tizen::Ui + +#endif // _FUI_INTERNAL_KEY_EVENT_MANAGER_IMPL_H_ diff --git a/src/ui/inc/FUi_LayoutAbsoluteLayout.h b/src/ui/inc/FUi_LayoutAbsoluteLayout.h new file mode 100644 index 0000000..9f00c27 --- /dev/null +++ b/src/ui/inc/FUi_LayoutAbsoluteLayout.h @@ -0,0 +1,63 @@ +// +// 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_LayoutAbsoluteLayout.h + * @brief This is the header file for AbsoluteLayout class. + * + * This header file contains the declaration of AbsoluteLayout class. + */ + +#pragma once + +#ifndef _FUI_INTERNAL_LAYOUT_ABSOLUTE_LAYOUT_H_ +#define _FUI_INTERNAL_LAYOUT_ABSOLUTE_LAYOUT_H_ + +#include "FUi_LayoutLayout.h" + +namespace Tizen { namespace Ui { namespace _Layout +{ + +/** + * @class AbsoluteLayout + * @brief . + * @since 2.0 + * + * . + */ +class _OSP_EXPORT_ AbsoluteLayout + : public Layout +{ +public: + AbsoluteLayout(void); + virtual ~AbsoluteLayout(void); + static AbsoluteLayout* CreateAbsoluteLayoutN(bool defaultMatchParent = false); + virtual result AddItem(LayoutItem& addItem); + +protected: + virtual result OnLayout(float width, float height, bool layoutUpdating); + +private: + AbsoluteLayout(const AbsoluteLayout&); + AbsoluteLayout& operator =(const AbsoluteLayout&); + +private: + bool __defaultMatchParent; +}; // AbsoluteLayout + +}}} // Tizen::Ui::_Layout + +#endif //_FUI_INTERNAL_LAYOUT_ABSOLUTE_LAYOUT_H_ diff --git a/src/ui/inc/FUi_LayoutILayoutItemHandler.h b/src/ui/inc/FUi_LayoutILayoutItemHandler.h new file mode 100644 index 0000000..c4cc0b5 --- /dev/null +++ b/src/ui/inc/FUi_LayoutILayoutItemHandler.h @@ -0,0 +1,56 @@ +// +// 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_LayoutILayoutItemHandler.h + * @brief This is the header file for ILayoutItemHandler interface. + * + * This header file contains the declaration of ILayoutItemHandler interface. + */ + +#ifndef _FUI_INTERNAL_LAYOUT_ILAYOUT_ITEM_HANDLER_H +#define _FUI_INTERNAL_LAYOUT_ILAYOUT_ITEM_HANDLER_H + +#include +#include +#include +#include + +namespace Tizen +{ +namespace Ui +{ +namespace _Layout +{ + +class _OSP_EXPORT_ ILayoutItemHandler +{ +public: + virtual ~ILayoutItemHandler(void) {} + + virtual void SetItemVisibleState(bool visible) = 0; + virtual result SetItemBounds(const Tizen::Graphics::FloatRectangle& rect) = 0; + virtual Tizen::Graphics::FloatRectangle GetItemBounds(void) const = 0; + virtual Tizen::Graphics::FloatRectangle GetItemClientBoundsFromSize(const Tizen::Graphics::FloatDimension& size) const = 0; + virtual Tizen::Graphics::FloatDimension GetItemContentSize(bool horizontalMode, bool verticalMode) const = 0; + virtual Tizen::Graphics::FloatDimension GetItemMinimumSize(void) const = 0; + virtual Tizen::Graphics::FloatDimension GetItemMaximumSize(void) const = 0; + virtual result OnItemMeasure(float& width, float& height) = 0; +}; // ILayoutItemHandler + +}}} + +#endif //_FUI_INTERNAL_LAYOUT_ILAYOUT_ITEM_HANDLER_H diff --git a/src/ui/inc/FUi_LayoutLayout.h b/src/ui/inc/FUi_LayoutLayout.h new file mode 100644 index 0000000..b119a1a --- /dev/null +++ b/src/ui/inc/FUi_LayoutLayout.h @@ -0,0 +1,450 @@ +// +// 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_LayoutLayout.h + * @brief This is the header file for Layout class. + * + * This header file contains the declaration of Layout class. + */ + +#pragma once + +#ifndef _FUI_INTERNAL_LAYOUT_LAYOUT_H_ +#define _FUI_INTERNAL_LAYOUT_LAYOUT_H_ + +#include +#include "FUi_LayoutLayoutContainer.h" + +namespace Tizen { namespace Ui { namespace _Layout +{ + +class ProxyList; +class ProxyListNode; +class LayoutItemProxy; + +enum LayoutUpdateFlag +{ + UPDATEFLAG_ERROR = 0x10000000, + UPDATEFLAG_NO_FLAG = 0x00000000, + UPDATEFLAG_NONE_MODE = 0x00000001, + UPDATEFLAG_MATCH_PARENT = 0x00000002, + UPDATEFLAG_WRAPCONTENT = 0x00000004, + UPDATEFLAG_ALIGNMENT = 0x00000008 +}; + +/** + * @class Layout + * @brief This class is the base class of all the Layout classes. + * @since 2.0 + * + * The Layout is the base class of all the Layout classes. + * The Layout class support common functions. + */ +class _OSP_EXPORT_ Layout + : public Tizen::Base::Object +{ +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~Layout(void); + + /** + * Gets the proxy of the current container. + * + * @return The current container proxy + * @since 2.0 + */ + LayoutItemProxy* GetContainerProxy(void); + + /** + * Sets the specified location and dimension of the layout + * + * @param[in] layoutRect The rectangle value with the specified location and dimension + * @since 2.0 + */ + void SetLayoutRect(const LayoutRect layoutRect); + + /** + * Gets the location and dimension of the layout. + * + * @return The rectangle value with the location and dimension of the layout + * @since 2.0 + */ + LayoutRect GetLayoutRect(void) const; + + /** + * Sets the alignment of the specified item. + * + * @return An error code + * @param[in] item The item for which the alignment is set + * @param[in] align The alignment + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @exception E_INVALID_ARG The alignment parameter is invalid. + * @since 2.0 + */ + result SetItemAlignment(const LayoutItem& item, const ItemAlign align); + + /** + * Gets the alignment of the specified item. + * + * @return An error code + * @param[in] item The item to get the alignment + * @param[out] align The alignment + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @since 2.0 + */ + result GetItemAlignment(const LayoutItem& Item, ItemAlign& align) const; + + /** + * Sets the margin of the specified item. + * + * @return An error code + * @param[in] item The item for which the margin is set + * @param[in] margin The margin + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @since 2.0 + */ + result SetItemMargin(const LayoutItem& item, const ItemMargin margin); + + /** + * Gets the margin of the specified item. + * + * @return An error code + * @param[in] item The item to get the margin + * @param[out] margin The margin + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @since 2.0 + */ + result GetItemMargin(const LayoutItem& item, ItemMargin& margin) const; + + /** + * Sets the width of the specified item with the match policy. + * + * @return An error code + * @param[in] item The item for which the width is set + * @patam[in] matchMode The match policy + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @since 2.0 + */ + result SetItemWidthMatchMode(const LayoutItem& item, const LayoutMatchMode matchMode); + + /** + * Gets the width of the specified item with the match policy. + * + * @return An error code + * @param[in] item The item to get the match policy of the width + * @patam[out] matchMode The match policy + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @since 2.0 + */ + result GetItemWidthMatchMode(const LayoutItem& item, LayoutMatchMode& matchMode) const; + + /** + * Sets the height of the specified item with the match policy. + * + * @return An error code + * @param[in] item The item for which the height is set + * @patam[in] matchMode The match policy + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @since 2.0 + */ + result SetItemHeightMatchMode(const LayoutItem& item, const LayoutMatchMode matchMode); + + /** + * Gets the height of the specified item with the match policy. + * + * @return An error code + * @param[in] item The item to get the match policy of the height + * @patam[out] matchMode The match policy + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @since 2.0 + */ + result GetItemHeightMatchMode(const LayoutItem& item, LayoutMatchMode& matchMode) const; + + /** + * Updates the all layout. + * + * @return An error code + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @since 2.0 + */ + result UpdateLayout(void); + + void SetUpdateState(bool state); + + /** + * Updates the current layout & all affected layout. + * + * @return An error code + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @since 2.0 + */ + result PartialUpdateLayout(void); + + /** + * Adds the item at the end of the list maintained by the layout. + * + * @return An error code + * @param[in] addItem The item to add to the list. + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @since 2.0 + */ + virtual result AddItem(LayoutItem& addItem); + + /** + * Removes the item from the list maintained by the layout. + * + * @return An error code + * @param[in] removeItem The item to remove from list. + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @since 2.0 + */ + result RemoveItem(const LayoutItem& removeItem); + + /** + * + * + * @return An error code + * @param[in] viewPosX The x coordinate + * @param[in] viewPosY The y coordinate + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE The layout have a item instance that is in an invalid state. + * @since 2.0 + */ + result OnChangeViewPosition(int viewPosX, int viewPosY); + + /** + * Sets the base location and dimension of the specified item. + * + * @return An error code + * @param[in] item The item for which the base location and dimension are set + * @patam[in] baseRect The rectangle value with the location and dimension + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @since 2.0 + */ + result SetItemBaseRect(const LayoutItem& item, const LayoutRect baseRect); + + /** + * Gets the base location and dimension of the specified item. + * + * @return An error code + * @param[in] item The item to get the base location and dimension + * @patam[out] baseRect The rectangle value with the location and dimension + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @since 2.0 + */ + result GetItemBaseRect(const LayoutItem& item, LayoutRect& baseRect) const; + + /** + * Checks whether the specified item exists in list. + * + * @return @c true, if the item exists @n + * @c false, otherwise + * @param[in] The item to check. + * @since 2.0 + */ + bool ItemExists(LayoutItem& item); + +protected: + /** + * This is the default constructor for this class. + * + * @since 2.0 + */ + Layout(void); + + /** + * Calculates the bounds of all children for the specified alignment mode. + * + * @return An error code + * @param[in] alignMode + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @since 2.0 + */ + result CalculateAlignment(const LayoutAlignMode alignMode = BOTH); + + /** + * Overrides this method to provide user-specific layouting code. + * + * @return An error code + * @param[in] width + * @param[in] height + * @param[in] layoutUpdating + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @since 2.0 + */ + virtual result OnLayout(float width, float height, bool layoutUpdating) = 0; + + void SetPartialUpdateFlag(bool flag); + void SetItemList(ProxyList* pItemList); + ProxyList* GetProxyList(void) const; + + void AlignToDevice(const LayoutPoint layoutPoint, LayoutPoint& alignedPoint); + void AlignToDevice(const LayoutSize layoutSize, LayoutSize& alignedSize); + void AlignToDevice(const LayoutRect layoutRect, LayoutRect& alignedRect); + +private: + /** + * This is the copy constructor for this class. + * + * @since 2.0 + */ + Layout(const Layout&); + + /** + * This is the substitution operator for this class. + * + * @since 2.0 + */ + Layout& operator =(const Layout&); + + /** + * Set the layout container. + * + * @return An error code + * @param[in] pContainer + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @since 2.0 + */ + result SetContainer(LayoutContainer* pContainer); + + /** + * Creates the layout proxy for the specified item. + * + * @return The created proxy. + * @param[in] item + * @since 2.0 + */ + LayoutItemProxy* CreateProxy(LayoutItem& item); + + /** + * Set the root layout flag. + * + * @param[in] rootCheck + * @since 2.0 + */ + void SetRootLayout(bool rootCheck); + + /** + * Checks the specified item whether it is already in the item list or not. + * + * @return An error code + * @param[in] checkItem The item to check whether it is already in the list or not + * @exception E_SUCCESS The specified item is not in the item list. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @exception E_INVALID_ARG The specified item parameter is null. + * @since 2.0 + */ + result CheckItem(const LayoutItem& checkItem); + + /** + * Internal method of UpdateLayout() and PartialUpdateLayout(). + * + * @return An error code + * @exception + * @since 2.0 + */ + result UpdateLayoutInternal(LayoutUpdateFlag updateFlag); + + /** + * Runs the OnLayout() for pLayout. + * + * @return An error code + * @exception + * @since 2.0 + */ + result OnLayoutTrigger(Layout& layout, bool layoutUpdating); + + /** + * Gets the update flag for parent layout. + * + * @return LayoutUpdateFlag + * @exception + * @since 2.0 + */ + LayoutUpdateFlag CheckParentFlag(void); + + /** + * Gets the update flag for current layout. + * + * @return LayoutUpdateFlag + * @exception + * @since 2.0 + */ + LayoutUpdateFlag CheckCurrentFlag(void); + + /** + * Internal method of CheckParentFlag() and CheckCurrentFlag(). + * + * @return LayoutUpdateFlag + * @exception + * @since 2.0 + */ + LayoutUpdateFlag CheckFlagInternal(LayoutItemProxy& containerProxy); + + /** + * Checks whether the layout has the container. + * + * @return bool + * @exception + * @since 2.0 + */ + bool HasLayoutContainer(void); + + result DetermineWindowRectToAllItem(void); + result OnDetermine(void); + +private: + ProxyList* __pProxyList; + float __x; + float __y; + float __width; + float __height; + + LayoutItemProxy* __pContainerProxy; + bool __rootLayout; + + bool __updateState; + bool __partialUpdateState; + bool __determineState; + + friend class LayoutContainer; +}; // Layout + +}}} // Tizen::Ui::_Layout + +#endif // _FUI_INTERNAL_LAYOUT_LAYOUT_H_ diff --git a/src/ui/inc/FUi_LayoutLayoutContainer.h b/src/ui/inc/FUi_LayoutLayoutContainer.h new file mode 100644 index 0000000..8b49948 --- /dev/null +++ b/src/ui/inc/FUi_LayoutLayoutContainer.h @@ -0,0 +1,246 @@ +// +// 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_LayoutLayoutContainer.h + * @brief This is the header file for LayoutContainer class. + * + * This header file contains the declaration of LayoutContainer class. + */ + +#pragma once + +#ifndef _FUI_INTERNAL_LAYOUT_LAYOUT_CONTAINER_H_ +#define _FUI_INTERNAL_LAYOUT_LAYOUT_CONTAINER_H_ + +#include "FUi_LayoutLayoutItem.h" + +//outer +namespace Tizen +{ +namespace Ui +{ +namespace _Layout +{ + +class LayoutList; + +class _OSP_EXPORT_ LayoutContainer + : public LayoutItem +{ +public: + /** + * This is the default constructor for this class. + * + * @since 2.0 + */ + LayoutContainer(void); + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~LayoutContainer(void); + + /** + * Sets the current layout to specified layout that is in layout list. + * + * @return An error code + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_ARG The input layout is not exist in layout list. + * @since 2.0 + */ + result SetCurrentLayout(Layout& layout); + + /** + * Adds the specified layout to the layout list. + * + * @return An error code + * @param[in] layout The layout to add to list. + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @exception E_OUT_OF_MEMORY Insufficient memory. + * @since 2.0 + */ + result AddLayout(Layout& layout); + + /** + * Gets the current layout of container. + * + * @return The current layout. + * @since 2.0 + */ + Layout* GetLayout(void) const; + + /** + * Sets the default layout to specified layout. + * + * @return An error code + * @param[in] layout The default layout. + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_ARG The input layout is not exist in layout list. + * @since 2.0 + */ + result SetDefaultLayout(Layout& layout); + + /** + * Gets the default layout. + * + * @return The default layout. + * @since 2.0 + */ + Layout* GetDefaultLayout(void) const; + + /** + * Checks whether the specified layout exists in list. + * + * @return @c true, if the layout exists @n + * @c false, otherwise + * @param[in] The layout to check. + * @since 2.0 + */ + bool LayoutExists(Layout& layout); + + /** + * Adds the item to all layout of container. + * + * @return An error code + * @param[in] addItem The item to add the layout. + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @since 2.0 + */ + result AddItem(LayoutItem& addItem); + + /** + * Removes the item from all layout of container. + * + * @return An error code + * @param[in] removeItem The item to remove from the layout. + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @since 2.0 + */ + result RemoveItem(LayoutItem& removeItem); + +private: + /** + * This is the copy constructor for this class. + * + * @since 2.0 + */ + LayoutContainer(const LayoutContainer&); + + /** + * This is the substitution operator for this class. + * + * @since 2.0 + */ + LayoutContainer& operator =(const LayoutContainer&); + + /** + * Sets the intended window size. + * + * @return void + * @param[in] intendedWindowSize + * @since 2.0 + */ + void SetIntendedWindowSize(const LayoutSize intendedWindowSize); + + /** + * Gets the intended window size. + * + * @return Intended window size. + * @since 2.0 + */ + LayoutSize GetIntendedWindowSize(void) const; + + /** + * Determines the basic size for calculating size for all children. + * + * @return An error code + * @param[in] width + * @param[in] height + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @since 2.0 + */ + virtual result Measure(float width, float height); + + /** + * This method is not used currently. + * + * @return An error code + * @param[in] deletedLayout + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @since 2.0 + */ + result OnSetDefaultLayout(Layout& deletedLayout); + + /** + * Removes the item from layout when the item has been destroyed. + * + * @return An error code + * @param[in] deletedLayout The deleted item. + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @since 2.0 + */ + void OnDestroyItem(LayoutItem& item); + + /** + * Removes the layout from list when the layout has been destroyed. + * + * @return An error code + * @param[in] pItem The deleted layout. + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @since 2.0 + */ + void OnDestroyLayout(Layout& layout); + + /** + * Sets the container when the contaier proxy has been destroyed. + * + * @return An error code + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @since 2.0 + */ + void OnDestroyContainerProxy(void); + + LayoutList* GetLayoutList(void); + +// property +private: + //_Control* __pOuterContainer; + Layout* __pCurrentLayout; + LayoutSize __intendedWindowSize; + + LayoutList* __pLayoutList; + + bool __defaultLayoutFlag; + + friend class Layout; + friend class LayoutItem; + friend class LayoutItemProxy; +}; // LayoutContainer + +}}} //Tizen::Ui::_Layout + +#endif // _FUI_INTERNAL_LAYOUT_LAYOUT_CONTAINER_H_ diff --git a/src/ui/inc/FUi_LayoutLayoutItem.h b/src/ui/inc/FUi_LayoutLayoutItem.h new file mode 100644 index 0000000..aa41c45 --- /dev/null +++ b/src/ui/inc/FUi_LayoutLayoutItem.h @@ -0,0 +1,247 @@ +// +// 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_LayoutLayoutItem.h + * @brief This is the header file for LayoutItem class. + * + * This header file contains the declaration of LayoutItem class. + */ + +#pragma once + +#ifndef _FUI_INTERNAL_LAYOUT_LAYOUT_ITEM_H_ +#define _FUI_INTERNAL_LAYOUT_LAYOUT_ITEM_H_ + +#include +#include +#include +#include +#include "FUi_LayoutLayoutTypes.h" +#include "FUi_LayoutILayoutItemHandler.h" + +namespace Tizen { namespace Ui +{ +class _Control; +} } + +namespace Tizen +{ +namespace Ui +{ +namespace _Layout +{ + +class Layout; +class LayoutContainer; + +class _OSP_EXPORT_ LayoutItem + : public Tizen::Base::Object +{ +public: + /** + * This is the default constructor for this class. + * + * @since 2.0 + */ + LayoutItem(void); + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~LayoutItem(void); + + /** + * Gets the layout of parent container. + * + * @return The layout of parent container. + * @since 2.0 + */ + Layout* GetIncludedLayout(void) const; + + /** + * Sets the base rect when the bounds of container has been changed. + * + * @return An error code + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @since 2.0 + */ + result OnChangeBaseRect(void); + + /** + * Sets the item handler. + * + * @return void + * @since 2.0 + */ + void SetItemHandler(ILayoutItemHandler* pOuterControl); + + /** + * Gets the layoutable flag. + * + * @return void + * @since 2.0 + */ + bool GetLayoutable(void); + + /** + * Converts the window bounds to client bounds. + * + * @param[in] windowRect + * @param[out] clientRect + * @since 2.0 + */ + void ConvertWindowToClientBounds(const LayoutRect windowRect, LayoutRect& clientRect); + +protected: + /** + * Determines the basic size for calculating size. + * + * @return An error code + * @param[in] width + * @param[in] height + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @since 2.0 + */ + virtual result Measure(float width, float height); + + /** + * Sets the parent container. + * + * @return void + * @param[in] pParentContainer + * @since 2.0 + */ + void SetParentContainer(LayoutContainer* pParentContainer); + + /** + * Gets the parent container. + * + * @return The parent container. + * @since 2.0 + */ + LayoutContainer* GetParentContainer(void) const; + + /** + * Sets the measured size. + * + * @return void + * @param[in] width + * @param[in] height + * @since 2.0 + */ + void SetMeasuredSize(float width, float height); + + /** + * Gets the measured size. + * + * @return void + * @param[out] width + * @param[out] height + * @since 2.0 + */ + void GetMeasuredSize(float& width, float& height) const; + + /** + * Runs ILayoutItemHandler::OnItemMeasure. + * + * @return void + * @param[inout] width + * @param[inout] height + * @since 2.0 + */ + void RunItemMeasure(float& width, float& height); + + /** + * Gets the minimum size of _Control. + * + * @param[out] minSize + * @since 2.0 + */ + void GetMinSize(LayoutSize& minSize) const; + + /** + * Gets the maximum size of _Control. + * + * @param[out] maxSize + * @since 2.0 + */ + void GetMaxSize(LayoutSize& maxSize) const; + + /** + * Sets the bounds of _Control. + * + * @return An error code + * @param[in] rect + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @since 2.0 + */ + result SetItemWindowRect(const LayoutRect rect); + + /** + * Gets the bounds of _Control. + * + * @param[out] rect + * @since 2.0 + */ + void GetItemWindowRect(LayoutRect& rect) const; + + bool GetContentSizeState(void) const; + +private: + /** + * This is the copy constructor for this class. + * + * @since 2.0 + */ + LayoutItem(const LayoutItem&); + + /** + * This is the substitution operator for this class. + * + * @since 2.0 + */ + LayoutItem& operator =(const LayoutItem&); + + /** + * Sets the visible state. + * + * @return An error code + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @since 2.0 + */ + void Visible(bool visible); + +// property +private: + ILayoutItemHandler* __pOuterControl; + LayoutContainer* __pParentContainer; + + LayoutSize __measuredSize; + bool __contentSizeState; + + friend class LayoutItemProxy; +}; // LayoutItem + +}}} //Tizen::Ui::_Layout + +#endif // _FUI_INTERNAL_LAYOUT_LAYOUT_ITEM_H_ diff --git a/src/ui/inc/FUi_LayoutLayoutMaker.h b/src/ui/inc/FUi_LayoutLayoutMaker.h new file mode 100644 index 0000000..163df68 --- /dev/null +++ b/src/ui/inc/FUi_LayoutLayoutMaker.h @@ -0,0 +1,182 @@ +// +// 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_LayoutLayoutMaker.h + * @brief This is the header file for the %_LayoutMaker class. + * + * This header file contains the declarations of the %_LayoutMaker class. + */ + +#ifndef _FUI_INTERNAL_LAYOUT__MAKER_H_ +#define _FUI_INTERNAL_LAYOUT__MAKER_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "FUi_UiBuilderConfig.h" +#include "FUi_UiBuilderControl.h" +#include "FUi_UiBuilderControlLayout.h" + +namespace Tizen { namespace Ui +{ + +struct UiBuilderRelativeLayout +{ + Tizen::Ui::Control* pBottomRelation; + RectangleEdgeRelation bottomRelationType; + + Tizen::Ui::Control* pLeftRelation; + RectangleEdgeRelation leftRelationType; + + Tizen::Ui::Control* pRightRelation; + RectangleEdgeRelation rightRelationType; + + Tizen::Ui::Control* pTopRelation; + RectangleEdgeRelation topRelationType; + + bool centerHorizontal; + bool centerVertical; + + int height; + FitPolicy verticalFitPolicy; + + float marginBottom; + float marginLeft; + float marginRight; + float marginTop; + + float width; + FitPolicy horizontalFitPolicy; +}; + +struct UiBuilderGridLayoutContainer +{ + int maxColumn; + int maxRow; + float columnSpacing; + float rowSpacing; + bool columnCollapsed; + bool columnShrinkable; + bool columnStretchable; + bool rowCollapsed; + bool rowShrinkable; + bool rowStretchable; +}; + +struct UiBuilderGridLayoutControl +{ + float marginBottom; + float marginLeft; + float marginRight; + float marginTop; + int positionRow; + int positionColumn; + int positionRowSpan; + int positionColumnSpan; + LayoutHorizontalAlignment horizontalAlignment; + LayoutVerticalAlignment verticalAlignment; +}; + +struct UiBuilderHorizontalBoxLayoutContainer +{ + HorizontalDirection direction; +}; + +struct UiBuilderHorizontalBoxLayoutControl +{ + float height; + FitPolicy verticalFitPolicy; + LayoutVerticalAlignment verticalAlignment; + float verticalBottomMargin; + float verticalTopMargin; + float spacing; + float weight; + float width; + FitPolicy horizontalFitPolicy; +}; + +struct UiBuilderVerticalBoxLayoutContainer +{ + VerticalDirection direction; +}; + +struct UiBuilderVerticalBoxLayoutControl +{ + float height; + FitPolicy verticalFitPolicy; + LayoutHorizontalAlignment horizontalAlignment; + float horizontalLeftMargin; + float horizontalRightMargin; + float spacing; + float weight; + float width; + FitPolicy horizontalFitPolicy; +}; + +class _UiBuilder; +/** +* @class _UiBuilderControlMaker +* @brief This class is an implementation of a %_UiBuilderControlMaker. +* @since 2.1 +* +* The %_UiBuilderControlMaker Class contains that information for generating a Control and setting a layout information. +* +* +*/ +class _OSP_EXPORT_ _LayoutMaker + : public Tizen::Base::Object +{ +public: + _LayoutMaker(_UiBuilder* pUibuilder); + virtual ~_LayoutMaker(void); + Tizen::Ui::Container* GetContainer(void) const; + result SetGridLayoutContainerProperty(GridLayout* pLayout, _UiBuilderControlLayout* pControlProperty) const; + void SetGridLayoutControlProperty(GridLayout* pLayout, _UiBuilderControlLayout* pControlProperty, Control* pControl); + void SetHorizontalBoxLayoutProperty(HorizontalBoxLayout* pLayout, _UiBuilderControlLayout* pControlProperty, Control* pControl); + void SetVerticalBoxLayoutProperty(VerticalBoxLayout* pLayout, _UiBuilderControlLayout* pControlProperty, Control* pControl); + void SetRelativeLayoutProperty(RelativeLayout* pLayout, _UiBuilderControlLayout* pControlProperty, Control* pControl); + result SetLayoutProperty(_UiBuilderControl* pUiBuilderControl, Control* pControl); + void SetLayoutOrientation(_UiBuilderControl* pUiBuilderCOntrol, Tizen::Ui::Control* pControl); + void GetProperty(_UiBuilderControl* pControl, _UiBuilderControlLayout** pControlProperty) const; + bool GetLayoutType(_UiBuilderControlLayout* pControlProperty, _UiBuilderLayoutType& layoutType) const; + bool GetParentLayoutType(_UiBuilderControlLayout* pControlProperty, _UiBuilderLayoutType& returnType) const; + result GetGridLayoutN(_UiBuilderControlLayout* pControlProperty, Layout*& pLayout) const; + result GetHorizontalBoxLayoutN(_UiBuilderControlLayout* pControlProperty, Layout*& pLayout) const; + result GetVerticalBoxLayoutN(_UiBuilderControlLayout* pControlProperty, Layout*& pLayout) const; + result GetRelativeLayoutN(_UiBuilderControlLayout* pControlProperty, Layout*& pLayout) const; + result GetCardLayoutN(_UiBuilderControlLayout* pControlProperty, Layout*& pLayout) const; + result GetLayoutN(_UiBuilderControl* pUiBuilderControl, Layout*& pPortraitLayout, Layout*& pLandscapeLayout) const ; + Tizen::Graphics::_ICoordinateSystemTransformer* GetTransformer(void) const; + +private: + _LayoutMaker(const _LayoutMaker& rhs); + _LayoutMaker& operator =(const _LayoutMaker& rhs); + +private: + _UiBuilder* __pUiBuilder; +}; // _LayoutMaker + +} } // Tizen::Ui + +#endif //_FUI_INTERNAL_LAYOUT__MAKER_H_ + + diff --git a/src/ui/inc/FUi_LayoutLayoutTypes.h b/src/ui/inc/FUi_LayoutLayoutTypes.h new file mode 100644 index 0000000..4667efc --- /dev/null +++ b/src/ui/inc/FUi_LayoutLayoutTypes.h @@ -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 FUi_LayoutLayoutTypes.h + * @brief This is the header file for internal layout enumeration. + * + * This is the header file for internal layout enumeration. + */ + +#pragma once + +#ifndef _FUI_INTERNAL_LAYOUT_LAYOUT_ENUM_H_ +#define _FUI_INTERNAL_LAYOUT_LAYOUT_ENUM_H_ + +#include + +namespace Tizen { namespace Ui { namespace _Layout +{ + +#define NOT_SUPPORT_NEGATIVE_SIZE + +struct LayoutRect +{ + float x; + float y; + float w; + float h; +}; + +struct LayoutPoint +{ + float x; + float y; +}; + +struct LayoutSize +{ + float w; + float h; +}; + +struct ItemMargin +{ + float left; + float top; + float right; + float bottom; +}; + +enum HorizontalAlign +{ + ITEM_HORIZONTAL_ALIGN_LEFT = 0, + ITEM_HORIZONTAL_ALIGN_CENTER, + ITEM_HORIZONTAL_ALIGN_RIGHT, + ITEM_HORIZONTAL_ALIGN_LEFT_RIGHT +}; + +enum VerticalAlign +{ + ITEM_VERTICAL_ALIGN_TOP = 0, + ITEM_VERTICAL_ALIGN_MIDDLE, + ITEM_VERTICAL_ALIGN_BOTTOM, + ITEM_VERTICAL_ALIGN_TOP_BOTTOM +}; + +struct ItemAlign +{ + HorizontalAlign HAlign; + VerticalAlign VAlign; +}; + +enum LayoutAlignMode +{ + BOTH = 0, + HORIZONTALONLY, + VERTICALONLY +}; + +enum LayoutMatchMode +{ + NONE_MODE = 0, + MATCH_PARENT, + WRAP_CONTENT +}; + +// Linear Layout +enum LinearLayoutOrientation +{ + LINEAR_NONE_ORIENTATION = -1, + LINEAR_VERTICAL, + LINEAR_HORIZONTAL +}; + +enum LinearLayoutDirection +{ + LINEAR_NONE_DIRECTION = -1, + LINEAR_LEFT_TO_RIGHT, + LINEAR_RIGHT_TO_LEFT, + LINEAR_TOP_TO_BOTTOM, + LINEAR_BOTTOM_TO_TOP +}; + +// Relative Layout +enum RelativeLayoutEdge +{ + EDGE_NONE = -1, + EDGE_LEFT = 0, + EDGE_TOP, + EDGE_RIGHT, + EDGE_BOTTOM, + EDGE_HCENTER, + EDGE_VCENTER, + EDGE_ALL +}; + +}}} // Tizen::Ui::_Layout + +#endif //_FUI_INTERNAL_LAYOUT_LAYOUT_TYPEDEF_H_ diff --git a/src/ui/inc/FUi_LayoutLinearLayout.h b/src/ui/inc/FUi_LayoutLinearLayout.h new file mode 100644 index 0000000..be0fa12 --- /dev/null +++ b/src/ui/inc/FUi_LayoutLinearLayout.h @@ -0,0 +1,381 @@ +// +// 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_LayoutLinearLayout.h + * @brief This is the header file for LinearLayout class. + * + * This header file contains the declaration of LinearLayout class. + */ + +#pragma once + +#ifndef _FUI_INTERNAL_LAYOUT_LINEAR_LAYOUT_H_ +#define _FUI_INTERNAL_LAYOUT_LINEAR_LAYOUT_H_ + +#include "FUi_LayoutLayout.h" + +namespace Tizen { namespace Ui { namespace _Layout +{ + +/** + * @class LinearLayout + * @brief . + * @since 2.0 + * + * . + */ +class _OSP_EXPORT_ LinearLayout + : public Layout +{ +public: + /** + * This is the default constructor for this class. + * + * @since 2.0 + */ + LinearLayout(void); + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~LinearLayout(void); + + /** + * Creates the instance of LinearLayout. + * + * @since 2.0 + * @return The instance of LinearLayout. + * @exception E_SUCCESS The method was successful. + * @exception E_OUT_OF_MEMORY Insufficient memory. + */ + static LinearLayout* CreateLinearLayoutN(void); + + /** + * Checks whether the arguments are valid, and sets the arguments. + * + * @since 2.0 + * @return An error code + * @param[in] orientation The orientation of the linear layout. + * @param[in] direction The direction in which the children are attached. + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + */ + result Initialize(const LinearLayoutOrientation orientation, const LinearLayoutDirection direction); + + /** + * Adds the item to the list according to the index. + * + * @since 2.0 + * @return An error code + * @param[in] addItem The added item. + * @param[in] index The index of list. + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + result AddItemToIndex(LayoutItem& addItem, int index); + + /** + * Moves the item according to the index. + * + * @since 2.0 + * @return An error code + * @param[in] item The item of list. + * @param[in] index The index of list. + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + result MoveItem(LayoutItem& item, int index); + + /** + * Swaps the targetItem and the destItem. + * + * @since 2.0 + * @return An error code + * @param[in] targetItem The target item. + * @param[in] destItem The destination item. + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + */ + result SwapItem(LayoutItem& targetItem, LayoutItem& destItem); + + /** + * Gets the item count of layout. + * + * @since 2.0 + * @return The item count of layout. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + int GetItemCount(void) const; + + /** + * Gets the index of the specified item. + * + * @since 2.0 + * @return An error code + * @param[in] item The layout item. + * @param[out] index The index of item. + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + */ + result GetItemIndex(LayoutItem& item, int& index) const; + + /** + * Sets the orientation. + * + * @since 2.0 + * @return An error code + * @param[in] orientation The orientation of linear layout. + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + */ + result SetOrientation(const LinearLayoutOrientation orientation); + + /** + * Gets the orientation. + * + * @since 2.0 + * @return An error code + * @param[out] orientation The orientation of linear layout. + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + result GetOrientation(LinearLayoutOrientation& orientation) const; + + /** + * Sets the direction. + * + * @since 2.0 + * @return An error code + * @param[in] direction The direction in which the children are attached. + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + */ + result SetDirection(const LinearLayoutDirection direction); + + /** + * Gets the direction. + * + * @since 2.0 + * @return An error code + * @param[out] direction The direction in which the children are attached. + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + result GetDirection(LinearLayoutDirection& direction) const; + + /** + * Sets the weight for specified item. + * + * @since 2.0 + * @return An error code + * @param[in] item The target item. + * @param[in] weight The weight that indicates how much extra space the control occupies in proportion to it. + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + result SetItemWeight(LayoutItem& item, const float weight); + + /** + * Gets the weight for specified item. + * + * @since 2.0 + * @return An error code + * @param[out] item The target item. + * @param[out] weight The weight of target item. + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + result GetItemWeight(const LayoutItem& item, float& weight) const; + + /** + * Sets the spacing for specified item. + * + * @since 2.0 + * @return An error code + * @param[in] item The target item. + * @param[in] spacing The space. + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + result SetItemSpacing(LayoutItem& item, float spacing); + + /** + * Gets the spacing for specified item. + * + * @since 2.0 + * @return An error code + * @param[in] item The target item. + * @param[out] spacing The space of target item. + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + result GetItemSpacing(const LayoutItem& item, float& spacing) const; + +protected: + /** + * Calculates the position and bounds of all chindren, and applies to the control. + * + * @return An error code + * @param[in] width + * @param[in] height + * @param[in] layoutUpdating + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @since 2.0 + */ + virtual result OnLayout(float width, float height, bool layoutUpdating); + +private: + /** + * This is the copy constructor for this class. + * + * @since 2.0 + */ + LinearLayout(const LinearLayout&); + + /** + * This is the substitution operator for this class. + * + * @since 2.0 + */ + LinearLayout& operator =(const LinearLayout&); + + /** + * Calculates the size & position of all children. @n + * Wrapper method of CalcHorizontalPosSize and CalcVerticalPosSize. @n + * Used by OnLayout. + * + * @since 2.0 + * @return An error code + * @param[out] rightBound + * @param[out] bottomBounds + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + result CalculatePositionSize(float& rightBound, float& bottomBound); + + /** + * If orientation is horizontal, Calculates the size & position of all children. @n + * Used by CalcPosSize. + * + * @since 2.0 + * @return An error code + * @param[out] rightBound + * @param[out] bottomBound + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + result CalculateHorizontalPositionSize(float& rightBound, float& bottomBound); + + /** + * If orientation is vertical, Calculates the size & position of all children. @n + * Used by CalcPosSize. + * + * @since 2.0 + * @return An error code + * @param[out] rightBound + * @param[out] bottomBound + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + result CalculateVerticalPositonSize(float& rightBound, float& bottomBound); + + /** + * Calculates the bound in empty space according to weight. @n + * Used by OnLayout. + * + * @since 2.0 + * @return An error code + * @param[out] rightBound + * @param[out] bottomBound + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + result CalculateWeight(float& rightBound, float& bottomBound); + + /** + * If orientation is horizontal, Calculates the bound in empty space according to weight. @n + * Used by CalcWeight. + * @since 2.0 + * @return An error code + * @param[out] emptySpace + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + result CalculateHorizontalWeight(float& emptySpace); + + /** + * If orientation is vertical, Calculates the bound in empty space according to weight. @n + * Used by CalcWeight. + * @since 2.0 + * @return An error code + * @param[in] emptySpace + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + result CalculateVerticalWeight(float& emptySpace); + + /** + * Checks whether container is wrap content mode, and calculate size. @n + * Used by OnLayout. + * @since 2.0 + * @return An error code + * @param[in] rightBound + * @param[in] bottomBound + * @param[in] layoutUpdating + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + result CalculateWrapContent(LayoutItemProxy& containerProxy, float rightBound, float bottomBound, bool layoutUpdating); + + /** + * Checks whether container is match parent mode, and calculate size. @n + * Used by OnLayout. + * @since 2.0 + * @return An error code + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + result CalculateMatchParent(void); + + /** + * Corrects the bounds according to orientation. @n + * Used by OnLayout. + * @since 2.0 + * @return An error code + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + result CalculateCorrectedAlignment(void); + +private: + LinearLayoutOrientation __orientation; + LinearLayoutDirection __direction; + float __weightSum; +}; // LinearLayout + +}}} // Tizen::Ui::_Layout + +#endif //_FUI_INTERNAL_LAYOUT_LINEAR_LAYOUT_H_ diff --git a/src/ui/inc/FUi_LayoutRelativeLayout.h b/src/ui/inc/FUi_LayoutRelativeLayout.h new file mode 100644 index 0000000..a380fdf --- /dev/null +++ b/src/ui/inc/FUi_LayoutRelativeLayout.h @@ -0,0 +1,319 @@ +// +// 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_LayoutRelativeLayout.h + * @brief This is the header file for RelativeLayout class. + * + * This header file contains the declaration of RelativeLayout class. + */ + +#pragma once + +#ifndef _FUI_INTERNAL_LAYOUT_RELATIVE_LAYOUT_H_ +#define _FUI_INTERNAL_LAYOUT_RELATIVE_LAYOUT_H_ + +#include "FUi_LayoutLayout.h" + +namespace Tizen { namespace Ui { namespace _Layout +{ +class RelativeProxyList; + +class _OSP_EXPORT_ RelativeLayout + : public Layout +{ +public: + /** + * This is the default constructor for this class. + * + * @since 2.0 + */ + RelativeLayout(void); + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~RelativeLayout(void); + + /** + * Creates the instance of RelativeLayout. + * + * @since 2.0 + * @return The instance of RelativeLayout. + * @exception E_SUCCESS The method was successful. + * @exception E_OUT_OF_MEMORY Insufficient memory. + */ + static RelativeLayout* CreateRelativeLayoutN(void); + + /** + * Sets the relation of the specified layout item for the edge with other layout item. + * + * @since 2.0 + * @return An error code + * @param[in] pItem The layout item for which the relation is set + * @param[in] itemEdge The edge of pItem. + * @param[in] pTarget The target layout item. + * @param[in] targetEdge The edge of targetEdge. + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_SYSTEM A system error occurred. + */ + result SetRelation(LayoutItem& item, const RelativeLayoutEdge itemEdge, LayoutItem* pTarget = null, const RelativeLayoutEdge targetEdge = EDGE_NONE); + + /** + * Unsets the relation of the specified layout item for the edge. + * + * @since 2.0 + * @return An error code + * @param[in] pItem The layout item for which the relation is unset + * @param[in] itemEdge The edge of pItem. + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_SYSTEM A system error occurred. + */ + result UnsetRelation(LayoutItem& item, const RelativeLayoutEdge itemEdge); + + /** + * Gets the layout itme of the specified layout item for the edge. + * + * @since 2.0 + * @return The layout item of specified edge. + * @param[in] pItem The layout item for which the relation is set + * @param[in] itemEdge The edge of pItem. + * @param[out] targetEdge The edge of target layout item. + */ + LayoutItem* GetRelation(LayoutItem& item, const RelativeLayoutEdge itemEdge, RelativeLayoutEdge* pTargetEdge = null); + +protected: + /** + * Calculates the position and bounds of all chindren, and applies to the control. + * + * @return An error code + * @param[in] width + * @param[in] height + * @param[in] layoutUpdating + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @since 2.0 + */ + virtual result OnLayout(float width, float height, bool updateLayouting); + +private: + /** + * This is the copy constructor for this class. + * + * @since 2.0 + */ + RelativeLayout(const RelativeLayout&); + + /** + * This is the substitution operator for this class. + * + * @since 2.0 + */ + RelativeLayout& operator =(const RelativeLayout&); + + /** + * Increases the reference count. + * + * @return An error code + * @param[in] pNode + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @since 2.0 + */ + result IncreaseReferenceCount(ProxyListNode& node); + + /** + * Decreases the reference count. + * + * @return void + * @param[in] pNode + * @param[in] pTargetNode + * @since 2.0 + */ + void DecreaseReferenceCount(ProxyListNode& node, ProxyListNode& targetNode); + + /** + * Reorders the node list + * + * @return An error code + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @since 2.0 + */ + result AlignItemNodeMaxRefMove(void); + + /** + * Unsets the all relation of the specified node. + * + * @return An error code + * @param[in] pTargetNode + * @param[in] pDeleteNode + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @since 2.0 + */ + result DeleteTargetInfo(ProxyListNode& targetNode, ProxyListNode& deleteNode); + + /** + * Calculates the position of the specified node. + * + * @return An error code + * @param[in] pCurNode + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_SYSTEM A system error occurred. + * @since 2.0 + */ + result CalculatePosition(ProxyListNode& curNode); + + /** + * Calculates the center position of the specified node. + * + * @return An error code + * @param[in] pCurNode + * @param[out] calcPosition + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_SYSTEM A system error occurred. + * @since 2.0 + */ + result CalculateCenter(ProxyListNode& curNode, bool calcPosition); + + /** + * Checks whether the sourceEdge and targetEdge is right. + * + * @return @c true, if the sourceEdge and targetEdge is right @n + @c false, otherwise + * @param[in] sourceEdge + * @param[in] targetEdge + * @since 2.0 + */ + bool CheckTargetEdge(const RelativeLayoutEdge sourceEdge, const RelativeLayoutEdge targetEdge) const; + + /** + * Gets the position of specified item. + * + * @return An error code + * @param[in] pTargetProxy + * @param[in] targetEdge + * @param[out] targetPoint + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_SYSTEM A system error occurred. + * @since 2.0 + */ + result GetTargetPosition(LayoutItemProxy* pTargetProxy, const RelativeLayoutEdge targetEdge, LayoutPoint& targetPoint) const; + + /** + * Sets the relation of the specified node for the edge with pTargetNode. + * + * @return An error code + * @param[in] pSourceNode + * @param[in] sourceEdge + * @param[in] pTargetNode + * @param[in] targetEdge + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @since 2.0 + */ + result SetAlignment(ProxyListNode& sourceNode, const RelativeLayoutEdge sourceEdge, ProxyListNode* pTargetNode, const RelativeLayoutEdge targetEdge); + + /** + * Unsets the relation of the specified node for the edge. + * + * @return An error code + * @param[in] pSourceNode + * @param[in] sourceEdge + * @param[out] ppTargetProxy + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @exception E_SYSTEM A system error occurred. + * @since 2.0 + */ + result UnsetAlignment(ProxyListNode& sourceNode, const RelativeLayoutEdge sourceEdge, LayoutItemProxy** ppTargetProxy); + + /** + * Gets the layout itme proxy of the specified node for the edge. + * + * @return LayoutItemProxy of pSourceNode for sourceEdge + * @param[in] pSourceNode + * @param[in] sourceEdge + * @param[out] targetEdge + * @exception E_OUT_OF_RANGE An edge value is invalid. + * @since 2.0 + */ + LayoutItemProxy* GetAlignment(ProxyListNode& sourceNode, const RelativeLayoutEdge sourceEdge, RelativeLayoutEdge* targetEdge = null); + + /** + * The internal methode of IncreaseRefCount. + * + * @return An error code + * @param[in] pTargetNode + * @param[in] pBaseNode + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @exception E_SYSTEM A system error occurred. + * @since 2.0 + */ + result IncreaseReference(ProxyListNode& targetNode, ProxyListNode& pBaseNode); + + /** + * Gets the node of specified node for edge. + * + * @return ProxyListNode of pNode for the edge + * @param[in] pNode + * @param[in] edge + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @exception E_SYSTEM A system error occurred. + * @since 2.0 + */ + ProxyListNode* GetTargetNode(ProxyListNode& node, const RelativeLayoutEdge edge); + + /** + * Sets the reference count to zero. + * + * @return An error code + * @param[in] pNode + * @param[in] pBaseNode + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @since 2.0 + */ + result SetZeroReference(ProxyListNode& node, ProxyListNode& pBaseNode); + + RelativeProxyList* GetRelativeProxyList(void); + +// property +private: + const LayoutItemProxy* __pTargetParent; + + friend class RelativeProxyList; +}; // RelativeLayout + +}}} //Tizen::Ui::_Layout + +#endif // _FUI_INTERNAL_LAYOUT_RELATIVE_LAYOUT_H_ diff --git a/src/ui/inc/FUi_LayoutTableLayout.h b/src/ui/inc/FUi_LayoutTableLayout.h new file mode 100644 index 0000000..e19bab4 --- /dev/null +++ b/src/ui/inc/FUi_LayoutTableLayout.h @@ -0,0 +1,671 @@ +// +// 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_LayoutTableLayout.h + * @brief This is the header file for TableLayout class. + * + * This header file contains the declaration of TableLayout class. + */ + +#pragma once + +#ifndef _FUI_INTERNAL_LAYOUT_TABLE_LAYOUT_H_ +#define _FUI_INTERNAL_LAYOUT_TABLE_LAYOUT_H_ + +#include +#include "FUi_LayoutLayout.h" + +namespace Tizen { namespace Ui { namespace _Layout +{ + +struct RowInfo +{ + float y; + float height; + bool rowCollapsed; + bool heightShrinkable; + bool heightStretchable; + float heightSpacing; + float maxHeight; + float mergedHeight; +}; + +struct ColumnInfo +{ + float x; + float width; + bool columnCollapsed; + bool widthShrinkable; + bool widthStretchable; + float widthSpacing; + float maxWidth; + float mergedWidth; +}; + +class _OSP_EXPORT_ TableLayout + : public Layout +{ +public: + /** + * This is the default constructor for this class. + * + * @since 2.0 + */ + TableLayout(void); + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~TableLayout(void); + + /** + * Creates the instance of TableLayout. + * + * @since 2.0 + * @return The instance of TableLayout. + * @exception E_SUCCESS The method was successful. + * @exception E_OUT_OF_MEMORY Insufficient memory. + */ + static TableLayout* CreateTableLayoutN(void); + + /** + * Creates the table. + * + * @since 2.0 + * @return An error code + * @param[in] row The number of rows. + * @param[in] column The number of columns. + * @param[in] spacing The space. + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_OUT_OF_MEMORY Insufficient memory. + */ + result CreateTable(int row, int column, float spacing = 0.0f); + + /** + * Merges from the start cell to the end cell. + * + * @since 2.0 + * @return An error code + * @param[in] startRow The start row. + * @param[in] startCol The start column. + * @param[in] endRow The end row. + * @param[in] endCol The end column. + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_SYSTEM A system error occurred. + */ + result Merge(int startRow, int startCol, int endRow, int endCol); + + /** + * Unmerges the specified cell. + * + * @since 2.0 + * @return An error code + * @param[in] row The target row. + * @param[in] column The target column. + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_INVALID_STATE The target is impossible to unmerge. + */ + result Unmerge(int row, int column); + + /** + * Gets the size of merged cell for specified row and column. + * + * @since 2.0 + * @return An error code + * @param[in] row The target row. + * @param[in] column The target column. + * @param[out] rowSize The merged row size. + * @param[out] columnSize The merged column size. + * @exception E_SUCCESS The method was successful. + * @exception E_OUT_OF_RANGE Input Argument value over the max value. + * @exception E_INVALID_STATE The target is merged by other cell. + */ + result GetMergeSize(int row, int column, int& rowSize, int& columnSize) const; + + /** + * Adds the item into the empty cell. + * + * @since 2.0 + * @return An error code + * @param[in] pAddItem The added item. + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_INVALID_STATE The target cell has been already occupied. + */ + result AddItem(LayoutItem& addItem); + + /** + * Adds the item into the specified cell. + * + * @since 2.0 + * @return An error code + * @param[in] pAddItem The added item. + * @param[in] row The target row. + * @param[in] column The target column. + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_INVALID_STATE The target cell has been already occupied. + */ + result AddItem(LayoutItem& addItem, int row, int column, bool mergedState = false); + + /** + * Gets the item of the specified cell. + * + * @since 2.0 + * @return LayoutItem + * @param[in] row The target row. + * @param[in] column The target column. + */ + LayoutItem* GetItem(int row, int column) const; + + /** + * Sets the row and column of specified item. + * + * @since 2.0 + * @return An error code + * @param[in] pItem The item to change the position. + * @param[in] row The target row. + * @param[in] column The target column. + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_INVALID_STATE The target cell has been already occupied. + */ + result SetItemPosition(const LayoutItem& item, int row, int column); + + /** + * Gets the row and column of specified item. + * + * @since 2.0 + * @return An error code + * @param[in] pItem The item to change the position. + * @param[in] row The row of item. + * @param[in] column The column of item. + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + */ + result GetItemPosition(const LayoutItem& item, int& row, int& column) const; + + /** + * Swaps the position between item1 and item2. + * + * @since 2.0 + * @return An error code + * @param[in] pItem1 The target item 1. + * @param[in] pItem2 The target item 2. + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + */ + result SwapItemPosition(LayoutItem& item1, LayoutItem& item2); + + /** + * Adds the row to the table. + * + * @since 2.0 + * @exception E_SUCCESS The method was successful. + * @exception E_OUT_OF_MEMORY Insufficient memory. + * @return void + */ + result AddRow(void); + + /** + * Adds the column to the table. + * + * @since 2.0 + * @exception E_SUCCESS The method was successful. + * @exception E_OUT_OF_MEMORY Insufficient memory. + * @return void + */ + result AddColumn(void); + + /** + * Deletes the specified row from the table. + * + * @since 2.0 + * @return An error code + * @param[in] row The target row. + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_SYSTEM A system error occurred. + */ + result DeleteRow(int row); + + /** + * Deletes the specified column from the table. + * + * @since 2.0 + * @return An error code + * @param[in] column The target column. + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_SYSTEM A system error occurred. + */ + result DeleteColumn(int column); + + /** + * Sets the collapse property for the specified row. + * + * @since 2.0 + * @return An error code + * @param[in] row The target row. + * @param[in] collapsed The collase state. + * @exception E_SUCCESS The method was successful. + * @exception E_OUT_OF_RANGE Input Argument value over the max value. + */ + result SetRowCollapsed(int rowIndex, bool collapsed); + + /** + * Checks whether the row is collapsed. + * + * @since 2.0 + * @return @c true, The row is collapsed @n + @c false, otherwise + * @param[in] row The target row. + */ + bool GetRowCollapsed(int rowIndex) const; + + /** + * Sets the collapse property for the specified column. + * + * @since 2.0 + * @return An error code + * @param[in] column The target column. + * @param[in] collapsed The collase state. + * @exception E_SUCCESS The method was successful. + * @exception E_OUT_OF_RANGE Input Argument value over the max value. + */ + result SetColumnCollapsed(int column, bool collapsed); + + /** + * Checks whether the column is collapsed. + * + * @since 2.0 + * @return @c true, The column is collapsed @n + @c false, otherwise + * @param[in] column The target column. + */ + bool GetColumnCollapsed(int column) const; + + /** + * Sets the shrinkable property for the specified row. + * + * @since 2.0 + * @return An error code + * @param[in] row The target row. + * @param[in] shrinkable The shrinkable state. + * @exception E_SUCCESS The method was successful. + * @exception E_OUT_OF_RANGE Input Argument value over the max value. + */ + result SetRowShrinkable(int row, bool shrinkable); + + /** + * Checks whether the row is shrinkable. + * + * @since 2.0 + * @return @c true, The row is shrinkable @n + @c false, otherwise + * @param[in] row The target row. + * @exception E_OUT_OF_RANGE Input Argument value over the max value. + */ + bool GetRowShrinkable(int row) const; + + /** + * Sets the shrinkable property for the specified column. + * + * @since 2.0 + * @return An error code + * @param[in] column The target column. + * @param[in] shrinkable The shrinkable state. + * @exception E_SUCCESS The method was successful. + * @exception E_OUT_OF_RANGE Input Argument value over the max value. + */ + result SetColumnShrinkable(int column, bool shrinkable); + + /** + * Checks whether the column is shrinkable. + * + * @since 2.0 + * @return @c true, The column is shrinkable @n + @c false, otherwise + * @param[in] column The target column. + * @exception E_OUT_OF_RANGE Input Argument value over the max value. + */ + bool GetColumnShrinkable(int column) const; + + /** + * Sets the stretchable property for the specified row. + * + * @since 2.0 + * @return An error code + * @param[in] row The target row. + * @param[in] stretchable The stretchable state. + * @exception E_SUCCESS The method was successful. + * @exception E_OUT_OF_RANGE Input Argument value over the max value. + */ + result SetRowStretchable(int row, bool stretchable); + + /** + * Checks whether the row is stretchable. + * + * @since 2.0 + * @return @c true, The row is stretchable @n + @c false, otherwise + * @param[in] row The target row. + */ + bool GetRowStretchable(int row) const; + + /** + * Sets the stretchable property for the specified column. + * + * @since 2.0 + * @return An error code + * @param[in] column The target column. + * @param[in] stretchable The stretchable state. + * @exception E_SUCCESS The method was successful. + * @exception E_OUT_OF_RANGE Input Argument value over the max value. + */ + result SetColumnStretchable(int column, bool stretchable); + + /** + * Checks whether the column is stretchable. + * + * @since 2.0 + * @return @c true, The column is stretchable @n + @c false, otherwise + * @param[in] column The target column. + */ + bool GetColumnStretchable(int column) const; + + /** + * Sets the spacing for the specified row. + * + * @since 2.0 + * @return An error code + * @param[in] row The target row. + * @param[in] heightSpacing The space size. + * @exception E_SUCCESS The method was successful. + * @exception E_OUT_OF_RANGE Input Argument value over the max value. + */ + result SetRowSpacing(int row, float heightSpacing); + + /** + * Gets the spacing of the specified row. + * + * @since 2.0 + * @return An error code + * @param[in] row The target row. + * @param[out] spacing The height space of target row. + * @exception E_SUCCESS The method was successful. + * @exception E_OUT_OF_RANGE Input Argument value over the max value. + */ + result GetRowSpacing(int row, float& spacing) const; + + /** + * Sets the spacing for specified column. + * + * @since 2.0 + * @return An error code + * @param[in] column The target column. + * @param[in] widthSpacing The space size. + * @exception E_SUCCESS The method was successful. + * @exception E_OUT_OF_RANGE Input Argument value over the max value. + */ + result SetColumnSpacing(int column, float widthSpacing); + + /** + * Gets the spacing of the specified column. + * + * @since 2.0 + * @return An error code + * @param[in] column The target column. + * @param[out] spacing The width space of target column. + * @exception E_SUCCESS The method was successful. + * @exception E_OUT_OF_RANGE Input Argument value over the max value. + */ + result GetColumnSpacing(int column, float& spacing) const; + + /** + * Sets the fill property for specified cell. + * + * @since 2.0 + * @return An error code + * @param[in] row The target row. + * @param[in] column The target column. + * @param[in] fillWidth The fill width state. + * @param[in] fillHeight The fill height state. + * @exception E_SUCCESS The method was successful. + * @exception E_OUT_OF_RANGE Input Argument value over the max value. + * @exception E_SYSTEM A system error occurred. + */ + result SetFillCell(int row, int column, bool fillWidth, bool fillHeight); + + /** + * Checks whether the cell has fill property. + * + * @since 2.0 + * @return An error code + * @param[in] row The target row. + * @param[in] column The target column. + * @param[out] fillWidth The fill width state of the target cell. + * @param[out] fillHeight The fill height state of the target cell. + * @exception E_SUCCESS The method was successful. + * @exception E_OUT_OF_RANGE Input Argument value over the max value. + * @exception E_SYSTEM A system error occurred. + */ + result GetFillCell(int row, int column, bool& fillWidth, bool& fillHeight) const; + +protected: + /** + * Calculates the position and bounds of all chindren, and applies to the control. + * + * @return An error code + * @param[in] width + * @param[in] height + * @param[in] layoutUpdating + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @since 2.0 + */ + virtual result OnLayout(float widht, float height, bool updateLayouting); + +private: + /** + * This is the copy constructor for this class. + * + * @since 2.0 + */ + TableLayout(const TableLayout&); + + /** + * This is the substitution operator for this class. + * + * @since 2.0 + */ + TableLayout& operator =(const TableLayout&); + + /** + * Calculates the size of the all cell. @n + * Used by OnLayout. + * + * @since 2.0 + * @return An error code + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + */ + result CalculateSize(void); + + /** + * Calculates the size of the all shrinkable cell. @n + * Used by OnLayout. + * + * @since 2.0 + * @return An error code + * @param[in] windowRect + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @exception E_OUT_OF_MEMORY Insufficient memory. + */ + result CalculateShrinkCell(LayoutRect windowRect); + + /** + * Calculates the size of the all stretchable cell. @n + * Used by OnLayout. + * + * @since 2.0 + * @return An error code + * @param[in] windowRect + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_STATE This instance is in an invalid state. + * @exception E_OUT_OF_MEMORY Insufficient memory. + */ + result CalculateStretchCell(LayoutRect windowRect); + + /** + * Calculates the size of the merged cell. @n + * Used by AdjustTableLayout. + * + * @since 2.0 + * @return An error code + * @param[in] row + * @param[in] column + * @param[out] size + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + */ + result CalculateMergeCell(int row, int column, LayoutSize& size); + + /** + * Calculates the size of item for alignment. @n + * Used by AdjustTableLayout. + * + * @since 2.0 + * @return The calculated rect + * @param[in] pItemProxy + * @param[in] cellRect + * @param[in] itemRect + * @param[in] horizonEdge + * @param[in] verticalEdge + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + */ + LayoutRect CalculateAlign(LayoutItemProxy& itemProxy, const LayoutRect cellRect, const LayoutRect itemRect, const HorizontalAlign horizonEdge, const VerticalAlign verticalEdge); + + /** + * Finally, adjusts the size. @n + * Used by OnLayout. + * + * @since 2.0 + * @return An error code + * @param[in] windowRect + * @param[in] updateLayouting + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + */ + result AdjustTableLayout(const LayoutRect windowRect, bool updateLayouting); + + /** + * Gets the node of specified cell. + * + * @since 2.0 + * @return The node for row and column + * @param[in] row + * @param[in] column + */ + ProxyListNode* GetNode(int row, int column) const; + + /** + * Gets the size of the specified cell. + * + * @since 2.0 + * @return An error code + * @param[in] cellIndex The target cell index. + * @param[out] rect The rect of target cell. + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + */ + result GetCellSize(int cellIndex, LayoutRect& rect); + + /** + * Gets the row number from specified cell ID. + * + * @since 2.0 + * @return The row number + * @param[in] id The ID of target cell. + */ + int GetRow(int id) const; + + /** + * Gets the column number from specified cell ID. + * + * @since 2.0 + * @return The column number + * @param[in] id The ID of target cell. + */ + int GetColumn(int id) const; + + /** + * Makes & Gets the cell ID from specified row number and column number. + * + * @since 2.0 + * @return The cell ID + * @param[in] row The row number + * @param[in] column The column number + */ + int MakeCellID(int row, int column) const; + +// property +private: + // Table metrics information + int __row; + int __column; + int __maxRow; + int __maxColumn; + + // Shrink, Stretch Count + int __shrinkRowCount; + int __shrinkColumnCount; + int __stretchRowCount; + int __stretchColumnCount; + + bool __rowShrinkable; + bool __columnShrinkable; + bool __rowStretchable; + bool __columnStretchable; + + // Rows information + RowInfo* __pRowInfo; + // Columns information + ColumnInfo* __pColInfo; + + static const int INVALID_CELL_ID = 0xFFFFFFFF; + static const int NOT_MERGED = 0xFFFFFFFE; + + Tizen::Base::Collection::LinkedList __mergedCellList; + + friend class TableItemInfo; +}; // TableLayout + +}}} //Tizen::Ui::_Layout + +#endif // _FUI_INTERNAL_LAYOUT_TABLE_LAYOUT_H_ diff --git a/src/ui/inc/FUi_Math.h b/src/ui/inc/FUi_Math.h new file mode 100644 index 0000000..17d187a --- /dev/null +++ b/src/ui/inc/FUi_Math.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 FUi_Math.h + * @brief Header file for internal float math functions + * + * This file contains declarations internal float math functions. + */ + + +#ifndef _FUI_INTERNAL_MATH_H_ +#define _FUI_INTERNAL_MATH_H_ + +#include +#include + +namespace Tizen { namespace Ui +{ + +template +inline T +_Abs(const T& t) { return t >= 0 ? t : -t;} + +template +inline const T& +_Min(const T& a, const T& b) +{ + if (a < b) + return a; + return b; +} + +template +inline const T& +_Max(const T& a, const T& b) +{ + if (a < b) + return b; + return a; +} + +#define ALMOST_ZERO_FLOAT 0.00001f +#define ALMOST_ZERO_DOUBLE 0.000000000001 + +// We do not use epsilon but hard-coded value to check if the two values are close "*ENOUGH*". +static inline bool +_FloatCompare(double p1, double p2) +{ + return (p1 == p2 || _Abs(p1 - p2) <= ALMOST_ZERO_DOUBLE * _Min(_Abs(p1), _Abs(p2))); +} + +static inline bool +_FloatCompare(float p1, float p2) +{ + return (p1 == p2 || _Abs(p1 - p2) <= ALMOST_ZERO_FLOAT * _Min(_Abs(p1), _Abs(p2))); +} + +static inline bool +_FloatCompareGE(float p1, float p2) +{ + return (p1 >= p2 || _Abs(p1 - p2) <= ALMOST_ZERO_FLOAT * _Min(_Abs(p1), _Abs(p2))); +} + +static inline bool +_FloatCompareGE(double p1, double p2) +{ + return (p1 >= p2 || _Abs(p1 - p2) <= ALMOST_ZERO_DOUBLE * _Min(_Abs(p1), _Abs(p2))); +} + +static inline bool +_FloatCompareLE(float p1, float p2) +{ + return (p1 <= p2 || _Abs(p1 - p2) <= ALMOST_ZERO_FLOAT * _Min(_Abs(p1), _Abs(p2))); +} + +static inline bool +_FloatCompareLE(double p1, double p2) +{ + return (p1 <= p2 || _Abs(p1 - p2) <= ALMOST_ZERO_DOUBLE * _Min(_Abs(p1), _Abs(p2))); +} + +static inline bool +_FloatHardCompare(double p1, double p2) +{ + return (_Abs(p1 - p2) <= DBL_EPSILON); +} + +static inline bool +_FloatHardCompare(float p1, float p2) +{ + return (_Abs(p1 - p2) <= FLT_EPSILON); +} + +}} // Tizen::Ui + +#endif // _FUI_INTERNAL_MATH_H_ diff --git a/src/ui/inc/FUi_Matrix3Df.h b/src/ui/inc/FUi_Matrix3Df.h new file mode 100644 index 0000000..9868668 --- /dev/null +++ b/src/ui/inc/FUi_Matrix3Df.h @@ -0,0 +1,244 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_Matrix3Df.h + * @brief Header file of _Matrix3Df class + * + * This file contains declarations _Matrix3Df class. + */ + +#ifndef _FUI_ANIM_INTERNAL_MATRIX3DF_H_ +#define _FUI_ANIM_INTERNAL_MATRIX3DF_H_ + +#include + +namespace Tizen { namespace Ui { namespace Animations +{ + +class _Matrix3Df +{ +public: + enum + { + IdentityMatrix = 0x0001, + TranslationMatrix = 0x0002, + ScaleMatrix = 0x0004, + GenericMatrix = 0x0008 + }; + + _Matrix3Df(void); + _Matrix3Df(const _Matrix3Df& rhs) + { + memcpy(__m, rhs.__m, sizeof(__m)); + __complexity = rhs.__complexity; + } + + explicit _Matrix3Df(const float* pValues); + + _Matrix3Df& Assign(const _Matrix3Df& rhs); + + bool operator ==(const _Matrix3Df& rhs) const; + bool operator !=(const _Matrix3Df& rhs) const; + _Matrix3Df& operator =(const _Matrix3Df& rhs); + _Matrix3Df& operator *=(const _Matrix3Df& rhs); + + friend _Matrix3Df operator *(const _Matrix3Df& matrix1, const _Matrix3Df& matrix2); + + void Optimize(void); + bool IsIdentity(void) const { return __complexity == IdentityMatrix;} + bool IsTranslation(void) const { return __complexity == TranslationMatrix;} + bool IsScale(void) const { return __complexity == ScaleMatrix;} + bool IsGeneric(void) const { return __complexity == GenericMatrix;} + + void LoadIdentity(void); + void Transpose(void); + + _Matrix3Df& MultiplyMatrix(const _Matrix3Df& matrix); + _Matrix3Df& Concatenate(const _Matrix3Df* matrix); + _Matrix3Df& Concatenate(const _Matrix3Df& matrix); + + float GetDeterminant(void) const; + bool IsInvertible(void) const; + bool Invert(void); + + void Translate(float x, float y, float z); + void Shear(float xy, float yz, float zx, float yx, float zy, float xz); + void Scale(float sx, float sy, float sz); + void Rotate(float angle, float x, float y, float z); + void MakeOrthogonal(float left, float right, float bottom, float top, float n, float f); + void MakeFrustum(float left, float right, float bottom, float top, float n, float f); + void MakePerspective(float fovy, float aspect, float nearZ, float farZ); + void MakeLookAt(float eyeX, float eyeY, float eyeZ, float centerX, float centerY, float centerZ, float upX, float upY, float upZ); + _Matrix3Df& MakeTransformAtAnchor(float x, float y, float z); + float Normalize(void); + void Transform(float* pX, float* pY, float* pZ) const; + + float operator ()(int row, int col) const { return __m[col][row];} + float GetItem(int row, int col) const { return __m[col][row];} + void SetItem(int row, int col, float value) { __m[col][row] = value; __complexity = GenericMatrix; } + + const float* GetItems(void) const { return __m[0];} + +protected: + float __m[4][4]; // column-major order (for OpenGL awareness...) + int __complexity; // for performance optimization. Most operations will be done with identity matrix. +}; // _Matrix3Df + + +inline _Matrix3Df +operator *(const _Matrix3Df& matrix1, const _Matrix3Df& matrix2) +{ + if (matrix1.__complexity == _Matrix3Df::IdentityMatrix) + return matrix2; + + if (matrix2.__complexity == _Matrix3Df::IdentityMatrix) + return matrix1; + + + if (matrix1.__complexity == _Matrix3Df::TranslationMatrix) + { + if (matrix2.__complexity == _Matrix3Df::TranslationMatrix) + { + _Matrix3Df ret; + + ret.__m[3][0] = matrix2.__m[3][0] + matrix1.__m[3][0] * matrix2.__m[3][3]; + ret.__m[3][1] = matrix2.__m[3][1] + matrix1.__m[3][1] * matrix2.__m[3][3]; + ret.__m[3][2] = matrix2.__m[3][2] + matrix1.__m[3][2] * matrix2.__m[3][3]; + ret.__m[3][3] = matrix1.__m[3][3] * matrix2.__m[3][3]; + + ret.__complexity = _Matrix3Df::TranslationMatrix; + + return ret; + } + } + + /* TODO: Can be optimized more cases....?? (scale??) */ + + + /* Optimization with loop-unrolling.. really effective for this case ??? */ + float m[4][4]; + + m[0][0] = (matrix1.__m[0][0] * matrix2.__m[0][0]) + + (matrix1.__m[1][0] * matrix2.__m[0][1]) + + (matrix1.__m[2][0] * matrix2.__m[0][2]) + + (matrix1.__m[3][0] * matrix2.__m[0][3]); + m[1][0] = (matrix1.__m[0][0] * matrix2.__m[1][0]) + + (matrix1.__m[1][0] * matrix2.__m[1][1]) + + (matrix1.__m[2][0] * matrix2.__m[1][2]) + + (matrix1.__m[3][0] * matrix2.__m[1][3]); + m[2][0] = (matrix1.__m[0][0] * matrix2.__m[2][0]) + + (matrix1.__m[1][0] * matrix2.__m[2][1]) + + (matrix1.__m[2][0] * matrix2.__m[2][2]) + + (matrix1.__m[3][0] * matrix2.__m[2][3]); + m[3][0] = (matrix1.__m[0][0] * matrix2.__m[3][0]) + + (matrix1.__m[1][0] * matrix2.__m[3][1]) + + (matrix1.__m[2][0] * matrix2.__m[3][2]) + + (matrix1.__m[3][0] * matrix2.__m[3][3]); + + m[0][1] = (matrix1.__m[0][1] * matrix2.__m[0][0]) + + (matrix1.__m[1][1] * matrix2.__m[0][1]) + + (matrix1.__m[2][1] * matrix2.__m[0][2]) + + (matrix1.__m[3][1] * matrix2.__m[0][3]); + m[1][1] = (matrix1.__m[0][1] * matrix2.__m[1][0]) + + (matrix1.__m[1][1] * matrix2.__m[1][1]) + + (matrix1.__m[2][1] * matrix2.__m[1][2]) + + (matrix1.__m[3][1] * matrix2.__m[1][3]); + m[2][1] = (matrix1.__m[0][1] * matrix2.__m[2][0]) + + (matrix1.__m[1][1] * matrix2.__m[2][1]) + + (matrix1.__m[2][1] * matrix2.__m[2][2]) + + (matrix1.__m[3][1] * matrix2.__m[2][3]); + m[3][1] = (matrix1.__m[0][1] * matrix2.__m[3][0]) + + (matrix1.__m[1][1] * matrix2.__m[3][1]) + + (matrix1.__m[2][1] * matrix2.__m[3][2]) + + (matrix1.__m[3][1] * matrix2.__m[3][3]); + + m[0][2] = (matrix1.__m[0][2] * matrix2.__m[0][0]) + + (matrix1.__m[1][2] * matrix2.__m[0][1]) + + (matrix1.__m[2][2] * matrix2.__m[0][2]) + + (matrix1.__m[3][2] * matrix2.__m[0][3]); + m[1][2] = (matrix1.__m[0][2] * matrix2.__m[1][0]) + + (matrix1.__m[1][2] * matrix2.__m[1][1]) + + (matrix1.__m[2][2] * matrix2.__m[1][2]) + + (matrix1.__m[3][2] * matrix2.__m[1][3]); + m[2][2] = (matrix1.__m[0][2] * matrix2.__m[2][0]) + + (matrix1.__m[1][2] * matrix2.__m[2][1]) + + (matrix1.__m[2][2] * matrix2.__m[2][2]) + + (matrix1.__m[3][2] * matrix2.__m[2][3]); + m[3][2] = (matrix1.__m[0][2] * matrix2.__m[3][0]) + + (matrix1.__m[1][2] * matrix2.__m[3][1]) + + (matrix1.__m[2][2] * matrix2.__m[3][2]) + + (matrix1.__m[3][2] * matrix2.__m[3][3]); + + m[0][3] = (matrix1.__m[0][3] * matrix2.__m[0][0]) + + (matrix1.__m[1][3] * matrix2.__m[0][1]) + + (matrix1.__m[2][3] * matrix2.__m[0][2]) + + (matrix1.__m[3][3] * matrix2.__m[0][3]); + m[1][3] = (matrix1.__m[0][3] * matrix2.__m[1][0]) + + (matrix1.__m[1][3] * matrix2.__m[1][1]) + + (matrix1.__m[2][3] * matrix2.__m[1][2]) + + (matrix1.__m[3][3] * matrix2.__m[1][3]); + m[2][3] = (matrix1.__m[0][3] * matrix2.__m[2][0]) + + (matrix1.__m[1][3] * matrix2.__m[2][1]) + + (matrix1.__m[2][3] * matrix2.__m[2][2]) + + (matrix1.__m[3][3] * matrix2.__m[2][3]); + m[3][3] = (matrix1.__m[0][3] * matrix2.__m[3][0]) + + (matrix1.__m[1][3] * matrix2.__m[3][1]) + + (matrix1.__m[2][3] * matrix2.__m[3][2]) + + (matrix1.__m[3][3] * matrix2.__m[3][3]); + + return _Matrix3Df((const float*)m); +} + +class _Matrix3DfTr + : public _Matrix3Df +{ +public: + _Matrix3DfTr(float tx, float ty, float tz) + { + SetItem(0, 3, tx); + SetItem(1, 3, ty); + SetItem(2, 3, tz); + __complexity = TranslationMatrix; + } + + _Matrix3DfTr(const _Matrix3DfTr& rhs) + { + Assign(rhs); + } +}; // _Matrix3DfTr + +class _Matrix3DfRot + : public _Matrix3Df +{ +public: + _Matrix3DfRot(float angle, float x, float y, float z) + { + Rotate(angle, x, y, z); + __complexity = GenericMatrix; + } + + _Matrix3DfRot(const _Matrix3DfRot& rhs) + { + Assign(rhs); + } +}; // _Matrix3DfRot + +}}} // Tizen::Ui::Animations + +#endif //_FUI_ANIM_INTERNAL_MATRIX3DF_H_ + diff --git a/src/ui/inc/FUi_ModalLoopManager.h b/src/ui/inc/FUi_ModalLoopManager.h new file mode 100644 index 0000000..12a7675 --- /dev/null +++ b/src/ui/inc/FUi_ModalLoopManager.h @@ -0,0 +1,92 @@ +// +// 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_ModalLoopManager.h + * @brief This is the header file for the _ModalLoopManager class. + * + * This header file contains the declarations of the %_ModalLoopManager class. + */ + +#ifndef _FUI_INTERNAL_MODAL_LOOP_MANAGER_H_ +#define _FUI_INTERNAL_MODAL_LOOP_MANAGER_H_ + +#include +#include + +namespace Tizen { namespace Base { namespace Runtime +{ +class Timer; +}}} + +namespace Tizen { namespace Ui +{ + +class _ModalLoopManager + : public Tizen::Base::Runtime::ITimerEventListener +{ + class _TimerInfo { + public: + _TimerInfo(void); + ~_TimerInfo(void); + + bool operator== (const _TimerInfo& rhs) const; + bool operator!= (const _TimerInfo& rhs) const; + _TimerInfo& operator= (const _TimerInfo& rhs); + + public: + int loopId; + Tizen::Base::Runtime::Timer* pTimer; + int exitCode; + bool expired; + }; + typedef Tizen::Base::Collection::ArrayListT<_TimerInfo> TimerInfoList; + +public: + static void Initialize(void); + static _ModalLoopManager* GetInstance(void); + + int BeginMainLoop(void); + 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); + +private: + ~_ModalLoopManager(void); + _ModalLoopManager(void); + _ModalLoopManager(const _ModalLoopManager& rhs); + _ModalLoopManager& operator =(const _ModalLoopManager& rhs); + +public: + enum { + MODAL_LOOP_EXIT_CODE_APP_TERMINATION = -1, + MODAL_LOOP_EXIT_CODE_CONTINUOUS_TERMINATION = -2 + }; + +private: + static _ModalLoopManager* __pInstance; + TimerInfoList* __pTimerInfoList; + int __nestedMainLoop; + int __lastExitCode; +}; // _ModalLoopManager + +}} // Tizen::Ui + +#endif // _FUI_INTERNAL_MODAL_LOOP_MANAGER_H_ diff --git a/src/ui/inc/FUi_Pointf.h b/src/ui/inc/FUi_Pointf.h new file mode 100644 index 0000000..490c3ed --- /dev/null +++ b/src/ui/inc/FUi_Pointf.h @@ -0,0 +1,106 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_Pointf.h + * @brief Header file of _Pointf class + * + * This file contains declarations _Pointf class. + */ + +#ifndef _FUI_ANIM_INTERNAL_POINTF_H_ +#define _FUI_ANIM_INTERNAL_POINTF_H_ + +#include + +namespace Tizen { namespace Ui { namespace Animations +{ + +class _Pointf +{ +public: + _Pointf(void) + { + x = y = 0.0f; + } + + _Pointf(float _x, float _y) + : x(_x) + , y(_y) + { + } + + _Pointf(const _Pointf& point) { *this = point;} + _Pointf(const Tizen::Graphics::Point& point) { x = point.x; y = point.y;} + + bool operator ==(const _Pointf& point) const + { + return (x == point.x && y == point.y); + } + + bool operator !=(const _Pointf& point) const + { + return !(x == point.x && y == point.y); + } + + _Pointf& operator =(const _Pointf& point) + { + if (likely(&point != this)) + { + x = point.x; + y = point.y; + } + + return *this; + } + + _Pointf operator -(const _Pointf& point) const + { + return _Pointf(x - point.x, y - point.y); + } + + _Pointf operator +(const _Pointf& point) const + { + return _Pointf(x + point.x, y + point.y); + } + + void OffsetPoint(float xDelta, float yDelta) + { + x += xDelta; + y += yDelta; + } + + void SetPoint(float xPoint, float yPoint) + { + x = xPoint; + y = yPoint; + } + + float X(void) const { return x;} + float Y(void) const { return y;} + float& X(void) { return x;} + float& Y(void) { return y;} + +public: + float x; + float y; +}; // _Pointf + +}}} // Tizen::Ui::Animations + +#endif // _FUI_ANIM_INTERNAL_POINTF_H_ + diff --git a/src/ui/inc/FUi_PropertyBase.h b/src/ui/inc/FUi_PropertyBase.h new file mode 100644 index 0000000..1a28146 --- /dev/null +++ b/src/ui/inc/FUi_PropertyBase.h @@ -0,0 +1,338 @@ +// +// 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_PropertyBase.h + * @brief This is the header file for the _PropertyBase class. + * + * This header file contains declarations of the _PropertyBase class. @n + */ +#ifndef _FUI_INTERNAL_PROPERTYBASE_H_ +#define _FUI_INTERNAL_PROPERTYBASE_H_ + +#include +#include +#include +#include +#include +#include +#include "FUi_IPropertyChangeEventListener.h" +#include "FUi_PropertyUtils.h" + +enum _PropertyType +{ + READ_ONLY = 0, + WRITE_ONLY, + READ_WRITE +}; + +namespace Tizen { namespace Ui +{ + +#define DECLARE_CLASS_BEGIN(classType, superClassType) \ +public: \ + typedef classType _THISCLASS; \ + typedef superClassType _SUPERCLASS; \ + class __register_property_class__ \ + : public Tizen::Ui::_RegisterPropertyBase \ + { \ +public: \ + __register_property_class__() \ + { + +#define DECLARE_PROPERTY(Name, GetName, SetName) \ + { \ + _RegisterPropertyBase::RegisterProperty<_THISCLASS>(Name, &_THISCLASS::GetName, &_THISCLASS::SetName); \ + } + +#define DECLARE_READONLY_PROPERTY(Name, GetName) \ + { \ + _RegisterPropertyBase::RegisterProperty<_THISCLASS>(Name, &_THISCLASS::GetName, null); \ + } + +#define DECLARE_WRITEONLY_PROPERTY(Name, SetName) \ + { \ + _RegisterPropertyBase::RegisterProperty<_THISCLASS>(Name, null, &_THISCLASS::SetName); \ + } + +#define DECLARE_CLASS_END() \ + } \ + virtual ~__register_property_class__(void) { } \ + }; \ +public: \ + static __register_property_class__ _registerPropertyClass; \ + virtual result SetProperty(const Tizen::Base::String & name, const Tizen::Ui::Variant &value) \ + { \ + ClearLastResult(); \ + result r = E_SUCCESS; \ + if (IsPropertyChangeEventListenerAdded()) \ + { \ + bool returnValue = _registerPropertyClass.IsPropertyAvailable<_THISCLASS>(this, name); \ + if (returnValue) \ + { \ + Tizen::Ui::Variant oldValue(GetProperty(name)); \ + _PropertyBase::FirePropertyEvent(*this, name, oldValue, value, false); \ + r = _registerPropertyClass.SetProperty<_THISCLASS>(this, name, value); \ + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); \ + _PropertyBase::FirePropertyEvent(*this, name, oldValue, value, true); \ + } \ + else \ + { \ + r = _SUPERCLASS::SetProperty(name, value); \ + return r; \ + } \ + } \ + else \ + { \ + r = _registerPropertyClass.SetProperty<_THISCLASS>(this, name, value); \ + if (r == E_KEY_NOT_FOUND) \ + { \ + r = _SUPERCLASS::SetProperty(name, value); \ + return r; \ + } \ + } \ + if (r != E_KEY_NOT_FOUND) \ + { \ + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); \ + } \ + return r; \ + } \ + virtual Tizen::Ui::Variant GetProperty(const Tizen::Base::String & name) const { \ + ClearLastResult(); \ + Tizen::Ui::Variant returnValue = _registerPropertyClass.GetProperty<_THISCLASS>(this, name); \ + if (GetLastResult() == E_KEY_NOT_FOUND) \ + { \ + returnValue = _SUPERCLASS::GetProperty(name); \ + return returnValue; \ + } \ + else \ + { \ + result r = GetLastResult();\ + SysTryReturn(NID_UI, r == E_SUCCESS, returnValue, r, "[%s] Propagating.", GetErrorMessage(r)); \ + } \ + return returnValue; \ + } + +#define IMPLEMENT_PROPERTY(classType) \ + classType::__register_property_class__ classType::_registerPropertyClass; + +template +class _Property + : public Tizen::Base::Object +{ +public: + typedef result (OwnType::*SetterType)(const Variant& value); + typedef Variant (OwnType::*GetterType)(void) const; + + _Property(void) + : __setter(null) + , __getter(null) + { + } + virtual ~_Property(void) + { + } + + void Register(GetterType getter, SetterType setter) { __setter = setter; __getter = getter; } + Variant GetProperty(const Object* pObject) const + { + return Variant((((OwnType*) pObject)->*__getter)()); + } + result SetProperty(const Object* pObject, const Variant& value) + { + OwnType* pOwnType = (OwnType*) pObject; + return (pOwnType->*__setter)(value); + } + bool IsReadOnly(void) const { return __setter == null; } + bool IsWriteOnly(void) const { return __getter == null; } + +private: + SetterType __setter; + GetterType __getter; +}; // _Property + +class _RegisterPropertyBase + : public Tizen::Base::Object +{ +public: + _RegisterPropertyBase() + { + __pHashMap = null; + } + virtual ~_RegisterPropertyBase(void) + { + if (__pHashMap) + { + __pHashMap->RemoveAll(true); + delete __pHashMap; + } + } + + template + result SetProperty(const Object* pObject, const Tizen::Base::String& name, const Variant& value) + { + ClearLastResult(); + + Tizen::Base::Collection::HashMap* pMap = GetHashMap(); + _Property* pProperty = null; + if (pMap != null) + { + pProperty = static_cast<_Property*>(pMap->GetValue(name)); + if (pProperty != null) + { + SysTryReturn(NID_UI, !pProperty->IsReadOnly(), E_INVALID_OPERATION, E_INVALID_OPERATION, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + return pProperty->SetProperty(pObject, value); + } + } + return E_KEY_NOT_FOUND; + } + + template + Variant GetProperty(const Object* pObject, const Tizen::Base::String& name) const + { + ClearLastResult(); + + Tizen::Base::Collection::HashMap* pMap = GetHashMap(); + _Property* pProperty = null; + if (pMap != null) + { + pProperty = static_cast<_Property*>(pMap->GetValue(name)); + if (pProperty != null) + { + SysTryReturn(NID_UI, !pProperty->IsWriteOnly(), Variant(), E_INVALID_OPERATION, "[%s] Propagating.", GetErrorMessage(GetLastResult())); + return pProperty->GetProperty(pObject); + } + else + { + SetLastResult(E_KEY_NOT_FOUND); + } + } + + return Variant::NULL_VARIANT; + } + + template + bool IsPropertyAvailable(const Object* pObject, const Tizen::Base::String& name) const + { + Tizen::Base::Collection::HashMap* pMap = GetHashMap(); + _Property* pProperty = null; + if (pMap != null) + { + pProperty = static_cast<_Property*>(pMap->GetValue(name)); + if (pProperty != null) + { + return true; + } + } + + return false; + } + + template + void RegisterProperty(const Tizen::Base::String& propertyName, typename _Property::GetterType getter, typename _Property::SetterType setter) + { + ClearLastResult(); + result r = E_SUCCESS; + + Tizen::Base::Collection::HashMap* pMap = GetHashMap(); + if (pMap != null) + { + // create the property name key in the HashMap + bool hasKey = true; + r = pMap->ContainsKey(propertyName, hasKey); + if (!IsFailed(r) && hasKey == false) + { + _Property* pProperty = new (std::nothrow) _Property; + if (pProperty == null) + { + SysLog(NID_UI, "[E_OUT_OF_MEMORY] Unable to create _Property."); + SetLastResult(E_OUT_OF_MEMORY); + return; + } + pProperty->Register(getter, setter); + pMap->Add(*(new (std::nothrow) Tizen::Base::String(propertyName)), *pProperty); + } + } + } + + result InitHashMap(void) + { + result r = E_SUCCESS; + + if (__pHashMap == null) + { + __pHashMap = new (std::nothrow) Tizen::Base::Collection::HashMap; + if (__pHashMap == null) + { + return E_OUT_OF_MEMORY; + } + + r = __pHashMap->Construct(16, 0.75f, *_PropertyUtils::GetInstance()->GetStringHashProvider(), *_PropertyUtils::GetInstance()->GetStringComparer()); + } + + return r; + } + + Tizen::Base::Collection::HashMap* GetHashMap(void) const + { + result r = E_SUCCESS; + + _RegisterPropertyBase& thisObject = const_cast<_RegisterPropertyBase&>(*this); + if (__pHashMap == null) + { + r = thisObject.InitHashMap(); + if (r != E_SUCCESS) + { + SysLog(NID_UI, "[E_OUT_OF_MEMORY] Unable to create HashMap."); + SetLastResult(E_OUT_OF_MEMORY); + return null; + } + } + return __pHashMap; + } + +private: + _RegisterPropertyBase(const _RegisterPropertyBase&); + _RegisterPropertyBase& operator =(const _RegisterPropertyBase&); + Tizen::Base::Collection::HashMap* __pHashMap; +}; // _RegisterPropertyBase + +class _OSP_EXPORT_ _PropertyBase + : public Tizen::Base::Object +{ +public: + _PropertyBase(void); + virtual ~_PropertyBase(void); + + virtual result SetProperty(const Tizen::Base::String& name, const Variant& value); + virtual Variant GetProperty(const Tizen::Base::String& name) const; + + result AddPropertyChangeEventListener(const Tizen::Ui::_IPropertyChangeEventListener& listener); + result RemovePropertyChangeEventListener(const Tizen::Ui::_IPropertyChangeEventListener& listener); + result SetPropertyChangeEventListener(const Tizen::Ui::_IPropertyChangeEventListener* pListener); + bool FirePropertyEvent(const Tizen::Ui::_PropertyBase& source, const Tizen::Base::String& name, const Variant& oldValue, const Variant& newValue, bool isChangedEvent = false); + bool IsPropertyChangeEventListenerAdded(void) const; + +private: + _PropertyBase(const _PropertyBase&); + _PropertyBase& operator =(const _PropertyBase&); + Tizen::Ui::_IPropertyChangeEventListener* __pPropertyChangeEventListener; +}; // _PropertyBase + +} } // Tizen::Ui + +#endif //_FUI_INTERNAL_PROPERTYBASE_H_ + diff --git a/src/ui/inc/FUi_PropertyUtils.h b/src/ui/inc/FUi_PropertyUtils.h new file mode 100644 index 0000000..d68bb80 --- /dev/null +++ b/src/ui/inc/FUi_PropertyUtils.h @@ -0,0 +1,76 @@ +// +// 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_PropertyUtils.h + * @brief This is the header file for the _PropertyUtils class. + * + * This header file contains declarations of the _PropertyUtils class. @n + */ +#ifndef _FUI_INTERNAL_PROPERTY_UTILS_H_ +#define _FUI_INTERNAL_PROPERTY_UTILS_H_ + +#include +#include +#include +#include + +namespace Tizen { namespace Ui +{ + +class _StringComparer + : public Tizen::Base::Collection::IComparer +{ +public: + _StringComparer(void); + virtual ~_StringComparer(void); + virtual result Compare(const Tizen::Base::Object& obj1, const Tizen::Base::Object& obj2, int& cmp) const; +}; // StringComparer + +class _StringHashProvider + : public Tizen::Base::Collection::IHashCodeProvider +{ +public: + _StringHashProvider(void); + virtual ~_StringHashProvider(void); + + virtual int GetHashCode(const Tizen::Base::Object& obj) const; +}; // StringComparer + +class _OSP_EXPORT_ _PropertyUtils + : public Tizen::Base::Object +{ +public: + _PropertyUtils(void); + virtual ~_PropertyUtils(void); + static _PropertyUtils* GetInstance(void); + result Construct(void); + const _StringComparer* GetStringComparer(void) const; + const _StringHashProvider* GetStringHashProvider(void) const; + +private: + _PropertyUtils(const _PropertyUtils&); + _PropertyUtils& operator =(const _PropertyUtils&); + +private: + _StringComparer* __pStringComparer; + _StringHashProvider* __pStringHashProvider; +}; // PropertyUtils + +} } // Tizen::Ui + +#endif // _FUI_INTERNAL_PROPERTY_UTILS_H_ + diff --git a/src/ui/inc/FUi_PublicOrientationEvent.h b/src/ui/inc/FUi_PublicOrientationEvent.h new file mode 100644 index 0000000..052c481 --- /dev/null +++ b/src/ui/inc/FUi_PublicOrientationEvent.h @@ -0,0 +1,71 @@ +// +// 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_PublicOrientationEvent.h + * @brief This is the header file for _PublicOrientationEvent class. + * @version 1.0 + * + * This header file contains declaration of _PublicOrientationEvent class. + * The OrientationEvent class can call listener's method. So, when event occurred, + * application can handle it appropriately. + * + */ +#ifndef _FUI_INTERNAL_PUBLIC_ORIENTATION_EVENT_H_ +#define _FUI_INTERNAL_PUBLIC_ORIENTATION_EVENT_H_ + +#include +#include +#include + +namespace Tizen { namespace Ui +{ +class Control; + +/** + * @class _PublicOrientationEvent + * @brief This class handles a orientation event. It is inherited from Event class. + * + * The Window(root of all widgets) class has an instance of the OrientationEvent class as a member variable. + * Applications can register orientation event listeners through it. When a orientation event occurred, + * the OrientationEvent class finds listener and calls the appropriate listener's method. + */ +class _OSP_EXPORT_ _PublicOrientationEvent + : public Tizen::Base::Runtime::_Event +{ +public: + static _PublicOrientationEvent* CreateInstanceN(const Control& source); + static Tizen::Base::Runtime::IEventArg* CreateOrientationEventArgN(const Control& source, OrientationStatus orientationStatus); + + virtual ~_PublicOrientationEvent(void); + + const Control* GetSource(void) const; + +private: + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + + _PublicOrientationEvent(const Control& source); + + _PublicOrientationEvent(const _PublicOrientationEvent& rhs); + _PublicOrientationEvent& operator =(const _PublicOrientationEvent& rhs); + +private: + const Control* __pSource; +}; // _PublicOrientationEvent + +}} // Tizen::Ui + +#endif // _FUI_INTERNAL_PUBLIC_ORIENTATION_EVENT_H_ diff --git a/src/ui/inc/FUi_Rectanglef.h b/src/ui/inc/FUi_Rectanglef.h new file mode 100644 index 0000000..4bc104b --- /dev/null +++ b/src/ui/inc/FUi_Rectanglef.h @@ -0,0 +1,273 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiAnim_Rectanglef.h + * @brief Header file of _Rectanglef class + * + * This file contains declarations _Rectanglef class. + */ + +#ifndef _FUI_ANIM_INTERNAL_RECTANGLEF_H_ +#define _FUI_ANIM_INTERNAL_RECTANGLEF_H_ + +#include + +#include "FUi_Math.h" +#include "FUi_Pointf.h" +#include "FUi_Dimensionf.h" + +namespace Tizen { namespace Ui { namespace Animations +{ + +class _Rectanglef +{ +public: + _Rectanglef(void) + { + __left = __top = __width = __height = 0.0f; + } + + _Rectanglef(float left, float top, float width, float height) + { + __left = left; + __top = top; + __width = width; + __height = height; + } + + _Rectanglef(const Tizen::Graphics::Rectangle& rt) + { + __left = static_cast(rt.x); + __top = static_cast(rt.y); + __width = static_cast(rt.width); + __height = static_cast(rt.height); + } + + _Rectanglef(const Tizen::Graphics::FloatRectangle& rt) + { + __left = rt.x; + __top = rt.y; + __width = rt.width; + __height = rt.height; + } + + _Rectanglef(const _Rectanglef& rt) { *this = rt;} + + bool operator ==(const _Rectanglef& rt) const + { + return (__left == rt.__left && __top == rt.__top && __width == rt.__width && __height == rt.__height); + } + + bool operator ==(const Tizen::Graphics::FloatRectangle& rt) const + { + return (__left == rt.x && __top == rt.y && __width == rt.width && __height == rt.height); + } + + bool operator !=(const _Rectanglef& rt) const + { + return !(__left == rt.__left && __top == rt.__top && __width == rt.__width && __height == rt.__height); + } + + bool operator !=(const Tizen::Graphics::FloatRectangle& rt) const + { + return !(__left == rt.x && __top == rt.y && __width == rt.width && __height == rt.height); + } + + _Rectanglef& operator =(const _Rectanglef& rt) + { + if (&rt != this) + { + __left = rt.__left; + __top = rt.__top; + __width = rt.__width; + __height = rt.__height; + } + + return *this; + } + + _Rectanglef& operator =(const Tizen::Graphics::FloatRectangle& rt) + { + __left = rt.x; + __top = rt.y; + __width = rt.width; + __height = rt.height; + + return *this; + } + operator Tizen::Graphics::Rectangle(void) const + { + return Tizen::Graphics::Rectangle( + static_cast(__left), + static_cast(__top), + static_cast(__left + __width) - static_cast(__left), + static_cast(__top + __height) - static_cast(__top) + ); + } + + bool IsEmpty(void) const + { + if (__width <= 0.0f || __height <= 0.0f) + return true; + + return false; + } + + void SetEmpty(void) + { + __left = __top = __width = __height = 0.0f; + } + + bool IsIntersected(const _Rectanglef& rt) const + { + if (IsEmpty() || rt.IsEmpty()) + return false; + + if (__left >= rt.Right()) + return false; + + if (__top >= rt.Bottom()) + return false; + + if (Right() <= rt.__left) + return false; + + if (Bottom() <= rt.__top) + return false; + + return true; + } + + /* TODO: rename method names such as MakeIntersect */ + _Rectanglef Intersect(const _Rectanglef& rt) const + { + _Rectanglef retRect; + + if (IsIntersected(rt)) + { + retRect.__left = _Max(__left, rt.__left); + retRect.__top = _Max(__top, rt.__top); + retRect.__width = _Min(Right(), rt.Right()) - retRect.__left; + retRect.__height = _Min(Bottom(), rt.Bottom()) - retRect.__top; + } + + return retRect; + } + + _Rectanglef Union(const _Rectanglef& rt) const + { + _Rectanglef retRect; + + if (IsEmpty()) + { + if (rt.IsEmpty()) + return _Rectanglef(); + + return rt; + } + else + { + if (rt.IsEmpty()) + return *this; + } + + retRect.__left = _Min(__left, rt.__left); + retRect.__top = _Min(__top, rt.__top); + retRect.__width = _Max(Right(), rt.Right()) - retRect.__left; + retRect.__height = _Max(Bottom(), rt.Bottom()) - retRect.__top; + + return retRect; + } + + void OffsetRect(const _Pointf& point) + { + __left += point.X(); + __top += point.Y(); + } + + void OffsetRect(float dx, float dy) + { + __left += dx; + __top += dy; + } + + void InflateRect(float dx, float dy) + { + __left -= dx; + __top -= dy; + __width += dx + dx; + __height += dy + dy; + } + + void SetRect(float l, float t, float w, float h) + { + __left = l; + __top = t; + __width = w; + __height = h; + } + + bool Contains(float x, float y) const + { + return (x >= __left && x < Right() && y >= __top && y < Bottom()); + } + + bool Contains(const _Pointf& pt) const + { + return Contains(pt.x, pt.y); + } + + bool Contains(const _Rectanglef& rt) const + { + return (!rt.IsEmpty() && __left <= rt.__left && __top <= rt.__top && Right() >= rt.Right() && Bottom() >= rt.Bottom()); + } + + _Rectanglef& SetLeftTop(float left, float top) { __left = left;__top = top;return *this;} + _Rectanglef& SetLeftTop(const _Pointf& leftTop) { __left = leftTop.X();__top = leftTop.Y();return *this;} + _Rectanglef& SetSize(const _Dimensionf& size) { __width = size.Width();__height = size.Height();return *this;} + + _Pointf LeftTop(void) const { return _Pointf(__left, __top);} + _Pointf RightBottom(void) const { return _Pointf(__left + __width, __top + __height);} + + float& Left(void) { return __left;} + float& Top(void) { return __top;} + float& Width(void) { return __width;} + float& Height(void) { return __height;} + + float Left(void) const { return __left;} + float Top(void) const { return __top;} + float Right(void) const { return __left + __width;} + float Bottom(void) const { return __top + __height;} + float Width(void) const { return __width;} + float Height(void) const { return __height;} + + int IntegralLeft(void) const { return (int) __left;} + int IntegralTop(void) const { return (int) __top;} + int IntegralWidth(void) const { return (int) Right() - IntegralLeft();} + int IntegralHeight(void) const { return (int) Bottom() - IntegralTop();} + +private: + float __left; + float __top; + float __width; + float __height; +}; // _Rectanglef + +}}} // Tizen::Ui::Animations + +#endif // _FUI_ANIM_INTERNAL_RECTANGLEF_H_ diff --git a/src/ui/inc/FUi_ResourceAccessibilityConfig.h b/src/ui/inc/FUi_ResourceAccessibilityConfig.h new file mode 100644 index 0000000..37ecdf8 --- /dev/null +++ b/src/ui/inc/FUi_ResourceAccessibilityConfig.h @@ -0,0 +1,54 @@ +// +// 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. +// + +#ifndef _FUI_RESOURCE_ACCESSIBILITY_CONFIG_H_ +#define _FUI_RESOURCE_ACCESSIBILITY_CONFIG_H_ + +#include "FUi_ResourceConfigMacro.h" + +DECLARE_UI_CONFIG(ACCESSIBILITY); + + DECLARE_COLOR_CONFIG(TITLE_TEXT, 1); + DECLARE_COLOR_CONFIG(POINT_TEXT, 2); + DECLARE_COLOR_CONFIG(TEXT, 3); + + DECLARE_IMAGE_CONFIG(POPUP_BG, 1); + DECLARE_IMAGE_CONFIG(FOCUS, 2); + + DECLARE_SHAPE_CONFIG(TITLE_FONT_SIZE, 1); + DECLARE_SHAPE_CONFIG(TEXT_FONT_SIZE, 2); + DECLARE_SHAPE_CONFIG(POPUP_WIDTH, 3); + DECLARE_SHAPE_CONFIG(TOP_MARGIN, 4); + DECLARE_SHAPE_CONFIG(BOTTON_MARGIN, 5); + DECLARE_SHAPE_CONFIG(SIDE_MARGIN, 6); + DECLARE_SHAPE_CONFIG(TITLE_HEIGHT, 7); + DECLARE_SHAPE_CONFIG(TEXT_TOP_MARGIN, 8); + DECLARE_SHAPE_CONFIG(TEXT_HEGIHT, 9); + DECLARE_SHAPE_CONFIG(GIANT_FONT_SIZE, 10); + DECLARE_SHAPE_CONFIG(HUGE_FONT_SIZE, 11); + DECLARE_SHAPE_CONFIG(LARGE_FONT_SIZE, 12); + DECLARE_SHAPE_CONFIG(NORMAL_FONT_SIZE, 13); + DECLARE_SHAPE_CONFIG(SMALL_FONT_SIZE, 14); + +DECLARE_END_UI_CONFIG(ACCESSIBILITY); + +DECLARE_UI_CONFIG(BASIC); + DECLARE_COLOR_CONFIG(background, 1); + DECLARE_COLOR_CONFIG(foreground, 2); +DECLARE_END_UI_CONFIG(BASIC); + +#endif //_FUI_RESOURCE_ACCESSIBILITY_CONFIG_H_ \ No newline at end of file diff --git a/src/ui/inc/FUi_ResourceAppWidgetConfig.h b/src/ui/inc/FUi_ResourceAppWidgetConfig.h new file mode 100644 index 0000000..c9e53e2 --- /dev/null +++ b/src/ui/inc/FUi_ResourceAppWidgetConfig.h @@ -0,0 +1,36 @@ +// +// 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_ResourceAppWidgetConfig.h + * @brief This is the implementation file for the properties of Livebox. + */ +#ifndef _FUI_RESOURCE_APPWIDGET_CONFIG_H_ +#define _FUI_RESOURCE_APPWIDGET_CONFIG_H_ + +#include "FUi_ResourceConfigMacro.h" + +DECLARE_UI_CONFIG(APPWIDGET); + DECLARE_IMAGE_CONFIG(POPUP_BG, 1); + DECLARE_IMAGE_CONFIG(POPUP_BG_ARROW_UP, 2); + DECLARE_IMAGE_CONFIG(POPUP_BG_ARROW_DOWN, 3); + DECLARE_SHAPE_CONFIG(POPUP_LEFT_MARGIN, 1); + DECLARE_SHAPE_CONFIG(POPUP_RIGHT_MARGIN, 2); + DECLARE_SHAPE_CONFIG(POPUP_TOP_MARGIN, 3); + DECLARE_SHAPE_CONFIG(POPUP_BOTTOM_MARGIN, 4); +DECLARE_END_UI_CONFIG(APPWIDGET); + +#endif //_FUI_RESOURCE_APPWIDGET_CONFIG_H_ \ No newline at end of file diff --git a/src/ui/inc/FUi_ResourceButtonConfig.h b/src/ui/inc/FUi_ResourceButtonConfig.h new file mode 100644 index 0000000..fa26bbc --- /dev/null +++ b/src/ui/inc/FUi_ResourceButtonConfig.h @@ -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. +// + +#ifndef _FUI_RESOURCE_BUTTON_CONFIG_H_ +#define _FUI_RESOURCE_BUTTON_CONFIG_H_ + +#include "FUi_ResourceConfigMacro.h" + +DECLARE_UI_CONFIG(BUTTON); +// Color Config + DECLARE_COLOR_CONFIG(BG_NORMAL, 1); + DECLARE_COLOR_CONFIG(BG_DISABLED, 2); + DECLARE_COLOR_CONFIG(BG_PRESSED, 3); + DECLARE_COLOR_CONFIG(BG_HIGHLIGHTED, 4); + DECLARE_COLOR_CONFIG(TEXT_NORMAL, 5); + DECLARE_COLOR_CONFIG(TEXT_DISABLED, 6); + DECLARE_COLOR_CONFIG(TEXT_PRESSED, 7); + DECLARE_COLOR_CONFIG(TEXT_HIGHLIGHTED, 8); +// Image Config + DECLARE_IMAGE_CONFIG(BG_NORMAL, 1); + DECLARE_IMAGE_CONFIG(BG_DISABLED, 2); + DECLARE_IMAGE_CONFIG(BG_PRESSED, 3); + DECLARE_IMAGE_CONFIG(BG_HIGHLIGHTED, 4); + DECLARE_IMAGE_CONFIG(BG_EFFECT_NORMAL, 5); + DECLARE_IMAGE_CONFIG(BG_EFFECT_DISABLED, 6); + DECLARE_IMAGE_CONFIG(BG_EFFECT_PRESSED, 7); + DECLARE_IMAGE_CONFIG(BG_EFFECT_HIGHLIGHTED, 8); +// Dimension Config + DECLARE_DIMENSION_CONFIG(MIN_SIZE, 1); +// Shape Config + DECLARE_SHAPE_CONFIG(DEFAULT_FONT_SIZE, 1); + DECLARE_SHAPE_CONFIG(MULTILINE_FONT_SIZE, 2); + DECLARE_SHAPE_CONFIG(LEFT_MARGIN, 3); + DECLARE_SHAPE_CONFIG(TOP_MARGIN, 4); + DECLARE_SHAPE_CONFIG(RIGHT_MARGIN, 5); + DECLARE_SHAPE_CONFIG(BOTTOM_MARGIN, 6); +// Fixed Value Config + DECLARE_FIXED_VALUE_CONFIG(TEXT_MAX_LENGTH, 1); +DECLARE_END_UI_CONFIG(BUTTON) + +#endif //_FUI_RESOURCE_BUTTON_CONFIG_H_ \ No newline at end of file diff --git a/src/ui/inc/FUi_ResourceCheckButtonConfig.h b/src/ui/inc/FUi_ResourceCheckButtonConfig.h new file mode 100644 index 0000000..9a97c7e --- /dev/null +++ b/src/ui/inc/FUi_ResourceCheckButtonConfig.h @@ -0,0 +1,187 @@ +// +// 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. +// + +#ifndef _FUI_RESOURCE_CHECKBUTTON_CONFIG_H_ +#define _FUI_RESOURCE_CHECKBUTTON_CONFIG_H_ + +#include "FUi_ResourceConfigMacro.h" + +DECLARE_UI_CONFIG(CHECKBUTTON); +//Color config + DECLARE_COLOR_CONFIG(BG_NORMAL, 1); + DECLARE_COLOR_CONFIG(BG_DISABLED, 2); + DECLARE_COLOR_CONFIG(BG_PRESSED, 3); + DECLARE_COLOR_CONFIG(BG_HIGHLIGHTED, 4); + DECLARE_COLOR_CONFIG(BG_SELECTED, 5); + DECLARE_COLOR_CONFIG(TEXT_NORMAL, 6); + DECLARE_COLOR_CONFIG(TEXT_DISABLED, 7); + DECLARE_COLOR_CONFIG(TEXT_PRESSED, 8); + DECLARE_COLOR_CONFIG(TEXT_HIGHLIGHTED, 9); + DECLARE_COLOR_CONFIG(TEXT_SELECTED, 10); + DECLARE_COLOR_CONFIG(TITLE_TEXT_NORMAL, 11); + DECLARE_COLOR_CONFIG(TITLE_TEXT_DISABLED, 12); + DECLARE_COLOR_CONFIG(TITLE_TEXT_PRESSED, 13); + DECLARE_COLOR_CONFIG(TITLE_TEXT_HIGHLIGHTED, 14); + DECLARE_COLOR_CONFIG(TITLE_TEXT_SELECTED, 15); + DECLARE_COLOR_CONFIG(DETAILED_ICON_BG_NORMAL, 16); + DECLARE_COLOR_CONFIG(DETAILED_ICON_BG_DISABLED, 17); + DECLARE_COLOR_CONFIG(DETAILED_ICON_BG_PRESSED, 18); + DECLARE_COLOR_CONFIG(DETAILED_ICON_BG_HIGHLIGHTED, 19); + DECLARE_COLOR_CONFIG(DETAILED_ICON_BG_SELECTED, 20); + DECLARE_COLOR_CONFIG(DETAILED_ICON_TEXT_NORMAL, 21); + DECLARE_COLOR_CONFIG(DETAILED_ICON_TEXT_DISABLED, 22); + DECLARE_COLOR_CONFIG(DETAILED_ICON_TEXT_PRESSED, 23); + DECLARE_COLOR_CONFIG(DETAILED_ICON_TEXT_HIGHLIGHTED, 24); + DECLARE_COLOR_CONFIG(DETAILED_ICON_TEXT_SELECTED, 25); + DECLARE_COLOR_CONFIG(DIVIDER_LINE_LEFT_NORMAL, 26); + DECLARE_COLOR_CONFIG(DIVIDER_LINE_RIGHT_NORMAL, 27); +//Image config + DECLARE_IMAGE_CONFIG(MARK_ICON_BG_NORMAL, 1); + DECLARE_IMAGE_CONFIG(MARK_ICON_BG_DISABLED, 2); + DECLARE_IMAGE_CONFIG(MARK_ICON_BG_PRESSED, 3); + DECLARE_IMAGE_CONFIG(MARK_ICON_BG_HIGHLIGHTED, 4); + DECLARE_IMAGE_CONFIG(MARK_ICON_BG_SELECTED, 5); + DECLARE_IMAGE_CONFIG(MARK_ICON_NORMAL, 6); + DECLARE_IMAGE_CONFIG(MARK_ICON_DISABLED, 7); + DECLARE_IMAGE_CONFIG(MARK_ICON_PRESSED, 8); + DECLARE_IMAGE_CONFIG(MARK_ICON_HIGHLIGHTED, 9); + DECLARE_IMAGE_CONFIG(MARK_ICON_SELECTED, 10); + DECLARE_IMAGE_CONFIG(ONOFF_ICON_BG_NORMAL, 11); + DECLARE_IMAGE_CONFIG(ONOFF_ICON_BG_DISABLED, 12); + DECLARE_IMAGE_CONFIG(ONOFF_ICON_BG_PRESSED, 13); + DECLARE_IMAGE_CONFIG(ONOFF_ICON_BG_HIGHLIGHTED, 14); + DECLARE_IMAGE_CONFIG(ONOFF_ICON_BG_SELECTED, 15); + DECLARE_IMAGE_CONFIG(ONOFF_ICON_NORMAL, 16); + DECLARE_IMAGE_CONFIG(ONOFF_ICON_DISABLED, 17); + DECLARE_IMAGE_CONFIG(ONOFF_ICON_PRESSED, 18); + DECLARE_IMAGE_CONFIG(ONOFF_ICON_HIGHLIGHTED, 19); + DECLARE_IMAGE_CONFIG(ONOFF_ICON_SELECTED, 20); + //DECLARE_IMAGE_CONFIG(ONOFF_SLIDING_ON_BG_NORMAL, 21); + //DECLARE_IMAGE_CONFIG(ONOFF_SLIDING_ON_BG_DISABLED, 22); + //DECLARE_IMAGE_CONFIG(ONOFF_SLIDING_ON_BG_PRESSED, 23); + //DECLARE_IMAGE_CONFIG(ONOFF_SLIDING_ON_BG_HIGHLIGHTED, 24); + //DECLARE_IMAGE_CONFIG(ONOFF_SLIDING_ON_BG_SELECTED, 25); + //DECLARE_IMAGE_CONFIG(ONOFF_SLIDING_OFF_BG_NORMAL, 26); + //DECLARE_IMAGE_CONFIG(ONOFF_SLIDING_OFF_BG_DISABLED, 27); + //DECLARE_IMAGE_CONFIG(ONOFF_SLIDING_OFF_BG_PRESSED, 28); + //DECLARE_IMAGE_CONFIG(ONOFF_SLIDING_OFF_BG_HIGHLIGHTED, 29); + //DECLARE_IMAGE_CONFIG(ONOFF_SLIDING_OFF_BG_SELECTED, 30); + //DECLARE_IMAGE_CONFIG(ONOFF_SLIDING_HANDLER_NORMAL, 31); + //DECLARE_IMAGE_CONFIG(ONOFF_SLIDING_HANDLER_DISABLED, 32); + //DECLARE_IMAGE_CONFIG(ONOFF_SLIDING_HANDLER_PRESSED, 33); + //DECLARE_IMAGE_CONFIG(ONOFF_SLIDING_HANDLER_HIGHLIGHTED, 34); + //DECLARE_IMAGE_CONFIG(ONOFF_SLIDING_HANDLER_SELECTED, 35); + DECLARE_IMAGE_CONFIG(DETAILED_BG_NORMAL, 36); + DECLARE_IMAGE_CONFIG(DETAILED_BG_DISABLED, 37); + DECLARE_IMAGE_CONFIG(DETAILED_BG_PRESSED, 38); + DECLARE_IMAGE_CONFIG(DETAILED_BG_HIGHLIGHTED, 39); + DECLARE_IMAGE_CONFIG(DETAILED_BG_SELECTED, 40); + DECLARE_IMAGE_CONFIG(DETAILED_BG_EFFECT_NORMAL, 41); + DECLARE_IMAGE_CONFIG(DETAILED_BG_EFFECT_DISABLED, 42); + DECLARE_IMAGE_CONFIG(DETAILED_BG_EFFECT_PRESSED, 43); + DECLARE_IMAGE_CONFIG(DETAILED_BG_EFFECT_HIGHLIGHTED, 44); + DECLARE_IMAGE_CONFIG(DETAILED_BG_EFFECT_SELECTED, 45); + DECLARE_IMAGE_CONFIG(DETAILED_ICON_NORMAL, 46); + DECLARE_IMAGE_CONFIG(DETAILED_ICON_DISABLED, 47); + DECLARE_IMAGE_CONFIG(DETAILED_ICON_PRESSED, 48); + DECLARE_IMAGE_CONFIG(DETAILED_ICON_HIGHLIGHTED, 49); + DECLARE_IMAGE_CONFIG(DETAILED_ICON_SELECTED, 50); + DECLARE_IMAGE_CONFIG(DETAILED_ICON_EFFECT_NORMAL, 51); + DECLARE_IMAGE_CONFIG(DETAILED_ICON_EFFECT_PRESSED, 52); + + DECLARE_IMAGE_CONFIG(GROUPED_SINGLE_BG_NORMAL, 53); + DECLARE_IMAGE_CONFIG(GROUPED_SINGLE_BG_DISABLED, 54); + DECLARE_IMAGE_CONFIG(GROUPED_SINGLE_BG_PRESSED, 55); + DECLARE_IMAGE_CONFIG(GROUPED_SINGLE_BG_HIGHLIGHTED, 56); + DECLARE_IMAGE_CONFIG(GROUPED_SINGLE_BG_SELECTED, 57); + + DECLARE_IMAGE_CONFIG(GROUPED_SINGLE_BG_EFFECT_NORMAL, 58); + DECLARE_IMAGE_CONFIG(GROUPED_SINGLE_BG_EFFECT_PRESSED, 59); + + DECLARE_IMAGE_CONFIG(GROUPED_TOP_BG_NORMAL, 60); + DECLARE_IMAGE_CONFIG(GROUPED_TOP_BG_DISABLED, 61); + DECLARE_IMAGE_CONFIG(GROUPED_TOP_BG_PRESSED, 62); + DECLARE_IMAGE_CONFIG(GROUPED_TOP_BG_HIGHLIGHTED, 63); + DECLARE_IMAGE_CONFIG(GROUPED_TOP_BG_SELECTED, 64); + + DECLARE_IMAGE_CONFIG(GROUPED_TOP_BG_EFFECT_NORMAL, 65); + DECLARE_IMAGE_CONFIG(GROUPED_TOP_BG_EFFECT_PRESSED, 66); + + DECLARE_IMAGE_CONFIG(GROUPED_MIDDLE_BG_NORMAL, 67); + DECLARE_IMAGE_CONFIG(GROUPED_MIDDLE_BG_DISABLED, 68); + DECLARE_IMAGE_CONFIG(GROUPED_MIDDLE_BG_PRESSED, 69); + DECLARE_IMAGE_CONFIG(GROUPED_MIDDLE_BG_HIGHLIGHTED, 70); + DECLARE_IMAGE_CONFIG(GROUPED_MIDDLE_BG_SELECTED, 71); + + DECLARE_IMAGE_CONFIG(GROUPED_MIDDLE_BG_EFFECT_NORMAL, 72); + DECLARE_IMAGE_CONFIG(GROUPED_MIDDLE_BG_EFFECT_PRESSED, 73); + + DECLARE_IMAGE_CONFIG(GROUPED_BOTTOM_BG_NORMAL, 74); + DECLARE_IMAGE_CONFIG(GROUPED_BOTTOM_BG_DISABLED, 75); + DECLARE_IMAGE_CONFIG(GROUPED_BOTTOM_BG_PRESSED, 76); + DECLARE_IMAGE_CONFIG(GROUPED_BOTTOM_BG_HIGHLIGHTED, 77); + DECLARE_IMAGE_CONFIG(GROUPED_BOTTOM_BG_SELECTED, 78); + + DECLARE_IMAGE_CONFIG(GROUPED_BOTTOM_BG_EFFECT_NORMAL, 79); + DECLARE_IMAGE_CONFIG(GROUPED_BOTTOM_BG_EFFECT_PRESSED, 80); + + DECLARE_IMAGE_CONFIG(ONOFF_SLIDING_BG_NORMAL, 81); + DECLARE_IMAGE_CONFIG(ONOFF_SLIDING_BG_DISABLED, 82); + DECLARE_IMAGE_CONFIG(ONOFF_SLIDING_BG_PRESSED, 83); + DECLARE_IMAGE_CONFIG(ONOFF_SLIDING_BG_HIGHLIGHTED, 84); + DECLARE_IMAGE_CONFIG(ONOFF_SLIDING_BG_SELECTED, 85); + + DECLARE_IMAGE_CONFIG(ONOFF_SLIDING_ON_HANDLER_NORMAL, 86); + DECLARE_IMAGE_CONFIG(ONOFF_SLIDING_ON_HANDLER_DISABLED, 87); + DECLARE_IMAGE_CONFIG(ONOFF_SLIDING_ON_HANDLER_PRESSED, 88); + DECLARE_IMAGE_CONFIG(ONOFF_SLIDING_ON_HANDLER_HIGHLIGHTED, 89); + DECLARE_IMAGE_CONFIG(ONOFF_SLIDING_ON_HANDLER_SELECTED, 90); + + DECLARE_IMAGE_CONFIG(ONOFF_SLIDING_OFF_HANDLER_NORMAL, 91); + DECLARE_IMAGE_CONFIG(ONOFF_SLIDING_OFF_HANDLER_DISABLED, 92); + DECLARE_IMAGE_CONFIG(ONOFF_SLIDING_OFF_HANDLER_PRESSED, 93); + DECLARE_IMAGE_CONFIG(ONOFF_SLIDING_OFF_HANDLER_HIGHLIGHTED, 94); + DECLARE_IMAGE_CONFIG(ONOFF_SLIDING_OFF_HANDLER_SELECTED, 95); + +//Dimension config + DECLARE_DIMENSION_CONFIG(MIN_SIZE, 1); + DECLARE_DIMENSION_CONFIG(MIN_DIMENSION, 2); + DECLARE_DIMENSION_CONFIG(MIN_DIMENSION_WITH_ANNEX, 3); +//Shape Config + DECLARE_SHAPE_CONFIG(TITLE_TEXT_FONT_SIZE, 1); + DECLARE_SHAPE_CONFIG(TEXT_FONT_SIZE, 2); + DECLARE_SHAPE_CONFIG(TITLE_TEXT_HEIGHT, 3); + DECLARE_SHAPE_CONFIG(TEXT_HEIGHT, 4); + DECLARE_SHAPE_CONFIG(LEFT_MARGIN, 5); + DECLARE_SHAPE_CONFIG(TOP_MARGIN, 6); + DECLARE_SHAPE_CONFIG(MARK_BITMAP_WIDTH, 7); + DECLARE_SHAPE_CONFIG(MARK_BITMAP_HEIGHT, 8); + DECLARE_SHAPE_CONFIG(ONOFF_SLIDING_BITMAP_WIDTH, 9); + DECLARE_SHAPE_CONFIG(ONOFF_SLIDING_BITMAP_HEIGHT, 10); + DECLARE_SHAPE_CONFIG(ONOFF_SLIDING_HANDLER_WIDTH, 11); + DECLARE_SHAPE_CONFIG(ONOFF_SLIDING_HANDLER_MARGIN, 12); + DECLARE_SHAPE_CONFIG(DETAILED_BITMAP_WIDTH, 13); + DECLARE_SHAPE_CONFIG(DETAILED_BITMAP_HEIGHT, 14); + DECLARE_SHAPE_CONFIG(DIVIDER_WIDTH, 15); + DECLARE_SHAPE_CONFIG(DIVIDER_TOP_MARGIN, 16); + DECLARE_SHAPE_CONFIG(DIVIDER_RIGHT_MARGIN, 17); +//Fixed Value Config + DECLARE_FIXED_VALUE_CONFIG(TITLE_TEXT_MAX_LENGTH, 1); + DECLARE_FIXED_VALUE_CONFIG(TEXT_MAX_LENGTH, 2); +DECLARE_END_UI_CONFIG(CHECKBUTTON); + +#endif //_FUI_RESOURCE_CHECKBUTTON_CONFIG_H_ diff --git a/src/ui/inc/FUi_ResourceColorPickerConfig.h b/src/ui/inc/FUi_ResourceColorPickerConfig.h new file mode 100644 index 0000000..dbf8147 --- /dev/null +++ b/src/ui/inc/FUi_ResourceColorPickerConfig.h @@ -0,0 +1,79 @@ +// +// 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. +// + +#ifndef _FUI_RESOURCE_COLORPICKER_CONFIG_H_ +#define _FUI_RESOURCE_COLORPICKER_CONFIG_H_ + +#include "FUi_ResourceConfigMacro.h" + +DECLARE_UI_CONFIG(COLORPICKER); +//Color config + DECLARE_COLOR_CONFIG(DIVIDER_TOP_HALF, 1); + DECLARE_COLOR_CONFIG(DIVIDER_BOTTOM_HALF, 2); + DECLARE_COLOR_CONFIG(ARROW_BUTTON_BG_NORMAL, 3); + DECLARE_COLOR_CONFIG(ARROW_BUTTON_BG_PRESSED, 4); + DECLARE_COLOR_CONFIG(ARROW_BUTTON_BG_DISABLED, 5); + DECLARE_COLOR_CONFIG(ARROW_BUTTON_NORMAL, 6); + DECLARE_COLOR_CONFIG(ARROW_BUTTON_PRESSED, 7); + DECLARE_COLOR_CONFIG(ARROW_BUTTON_DISABLED, 8); + DECLARE_COLOR_CONFIG(HANDLER_HIGHLIGHTED, 9); +//Image config + DECLARE_IMAGE_CONFIG(HUE_BAR_PORTRAIT_NORMAL, 1); + DECLARE_IMAGE_CONFIG(LUMINANCE_BAR_PORTRAIT_NORMAL, 2); + DECLARE_IMAGE_CONFIG(SATURATION_BAR_PORTRAIT_NORMAL, 3); + DECLARE_IMAGE_CONFIG(ARROW_BUTTON_BG_NORMAL, 4); + DECLARE_IMAGE_CONFIG(ARROW_BUTTON_BG_PRESSED, 5); + DECLARE_IMAGE_CONFIG(ARROW_BUTTON_BG_DISABLED, 6); + DECLARE_IMAGE_CONFIG(ARROW_BUTTON_BG_EFFECT_NORMAL, 7); + DECLARE_IMAGE_CONFIG(ARROW_BUTTON_BG_EFFECT_PRESSED, 8); + DECLARE_IMAGE_CONFIG(ARROW_BUTTON_BG_EFFECT_DISABLED, 9); + DECLARE_IMAGE_CONFIG(LEFT_ARROW_BUTTON_NORMAL, 10); + DECLARE_IMAGE_CONFIG(LEFT_ARROW_BUTTON_PRESSED, 11); + DECLARE_IMAGE_CONFIG(LEFT_ARROW_BUTTON_DISABLED, 12); + DECLARE_IMAGE_CONFIG(RIGHT_ARROW_BUTTON_NORMAL, 13); + DECLARE_IMAGE_CONFIG(RIGHT_ARROW_BUTTON_PRESSED, 14); + DECLARE_IMAGE_CONFIG(RIGHT_ARROW_BUTTON_DISABLED, 15); + DECLARE_IMAGE_CONFIG(HANDLER_NORMAL, 16); + DECLARE_IMAGE_CONFIG(BAR_BG_PORTRAIT_NORMAL, 17); + DECLARE_IMAGE_CONFIG(HUE_BAR_LANDSCAPE_NORMAL, 18); + DECLARE_IMAGE_CONFIG(LUMINANCE_BAR_LANDSCAPE_NORMAL, 19); + DECLARE_IMAGE_CONFIG(SATURATION_BAR__LANDSCAPE_NORMAL, 20); + DECLARE_IMAGE_CONFIG(BAR_BG_LANDSCAPE_NORMAL, 21); + DECLARE_IMAGE_CONFIG(HANDLER_HIGHLIGHTED, 22); +//Dimension config + DECLARE_DIMENSION_CONFIG(DEFAULT_SIZE, 1); + DECLARE_DIMENSION_CONFIG(ARROW_BUTTON_ARROW_ICON_SIZE, 2); +//Shape config + 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); + DECLARE_SHAPE_CONFIG(SLIDER_HEIGHT, 5); + DECLARE_SHAPE_CONFIG(ARROW_BUTTON_WIDTH, 6); + DECLARE_SHAPE_CONFIG(ARROW_BUTTON_HEIGHT, 7); + DECLARE_SHAPE_CONFIG(HANDLER_WIDTH, 8); + DECLARE_SHAPE_CONFIG(HANDLER_HEIGHT, 9); + DECLARE_SHAPE_CONFIG(BLOCK_HEIGHT, 10); + 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); + +#endif //_FUI_RESOURCE_COLORPICKER_CONFIG_H_ diff --git a/src/ui/inc/FUi_ResourceConfigLoader.h b/src/ui/inc/FUi_ResourceConfigLoader.h new file mode 100644 index 0000000..336db29 --- /dev/null +++ b/src/ui/inc/FUi_ResourceConfigLoader.h @@ -0,0 +1,58 @@ +// +// 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_ResourceConfigLoader.h + * @brief This is the header file for ConfigLoader class. + * @version 3.0 + * + * This header file contains declaration of ConfigLoader class. + * The ActionEvent class can call listener's method. So, when event occurred, + * application can handle it appropriately. + * + */ +#ifndef _FUI_INTERNAL_RESOURCE_CONFIG_LOADER_H_ +#define _FUI_INTERNAL_RESOURCE_CONFIG_LOADER_H_ + +#include +#include "FUi_ResourceMapContainer.h" + +namespace Tizen { namespace Base { + class String; +}}// Tizen::Base + +namespace Tizen { namespace Ui { namespace _Resource +{ +typedef bool (*_Init_Func)(MapContainer& table, const Tizen::Base::String& mode, bool bPreInit); + +class ConfigLoader +{ +public: + void AddInitFunc(_Init_Func func); + int GetInitFuncCount(void) const; + bool GetInitFunc(int index, _Init_Func& func) const; + static ConfigLoader* GetInstance(void); +private: + ConfigLoader(void); + ~ConfigLoader(void); + static void CreateInstance(void); + ConfigLoader(const ConfigLoader&); + ConfigLoader& operator =(const ConfigLoader&); + Tizen::Base::Collection::LinkedListT <_Init_Func> __itemList; +}; +}}}// Tizen::Ui::_Resource + +#endif // _FUI_INTERNAL_RESOURCE_CONFIG_LOADER_H_ \ No newline at end of file diff --git a/src/ui/inc/FUi_ResourceConfigMacro.h b/src/ui/inc/FUi_ResourceConfigMacro.h new file mode 100644 index 0000000..1d3ad80 --- /dev/null +++ b/src/ui/inc/FUi_ResourceConfigMacro.h @@ -0,0 +1,351 @@ +// +// 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_ResourceConfigMacro.h + * @brief This is the header file for resource config macros. + * @version 3.0 + * + * This header file contains declaration of resource config macros.. + * + */ +#ifndef _FUI_RESOURCE_CONFIG_MACRO_H_ +#define _FUI_RESOURCE_CONFIG_MACRO_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "FUi_ResourceConfigLoader.h" +//#include "FUi_ResourceConfigParser.h" +#include "FUi_ResourceMapContainer.h" + +namespace +{ +struct TypeDefined +{ +static const int __BASIC__ = 1; +static const int __ACCESSIBILITY__ = 2; +static const int __BUTTON__ = 3; +static const int __CHECKBUTTON__ = 4; +static const int __COLORPICKER__ = 5; +static const int __CONTEXTMENU__ = 6; +static const int __DATETIMEBAR__ = 7; +static const int __DATETIMEPICKER__ = 8; +static const int __EDIT__ = 9; +static const int __EDITDATE__ = 10; +static const int __EDITTIME__ = 11; +static const int __FASTSCROLL__ = 12; +static const int __FOOTER__ = 13; +static const int __FORM__ = 14; +static const int __GALLERY__ = 15; +static const int __GROUPCONTAINER__ = 16; +static const int __HEADER__ = 17; +static const int __ICONLIST__ = 18; +static const int __INPUTPAD__ = 19; +static const int __LABEL__ = 20; +static const int __LIST__ = 21; +static const int __LISTVIEW__ = 22; +static const int __APPWIDGET__ = 23; +static const int __MESSAGEBOX__ = 24; +static const int __OPTIONMENU__ = 25; +static const int __OVERLAYPANEL__ = 26; +static const int __PANEL__ = 27; +static const int __POPUP__ = 28; +static const int __PROGRESS__ = 29; +static const int __RADIOGROUP__ = 30; +static const int __SCROLL__ = 31; +static const int __SEARCHBAR__ = 32; +static const int __SLIDER__ =33; +static const int __SPLITPANEL__ = 34; +static const int __TABBAR__ = 35; +static const int __TAB__ = 36; +static const int __TABLEVIEW__ = 37; +static const int __TOKENEDIT__ = 38; +static const int __FOCUSUI__ = 39; +static const int __DIMMINGLAYER__ = 40; + + struct TypeResource + { + static const int _COLOR_ = 0x00010000; + static const int _IMAGE_ = 0x00020000; + static const int _SHAPE_ = 0x00030000; + static const int _DIMENSION_ = 0x00040000; + static const int _FIXED_VALUE_ = 0x00050000; + static const int _ANIMATION_ = 0x00060000; + }; +}; +} + +#define DECLARE_UI_CONFIG(x) \ + using namespace Tizen::Base;\ + using namespace Tizen::Base::Collection;\ + using namespace Tizen::Graphics;\ + using namespace Tizen::Ui;\ + namespace Tizen { namespace Ui { namespace _Resource\ + {\ + class _##x {\ + public:\ + _##x()\ + {\ + ConfigLoader::GetInstance()->AddInitFunc(Initialize);\ + }\ + ~_##x(void){};\ + static const char* GetControlName(void)\ + {\ + return #x;\ + }\ + static Tizen::Base::String GetCurrentThemeName(void)\ + {\ + return L"";\ + };\ + static Tizen::Base::String GetAPIVersion(void)\ + {\ + if(Tizen::App::_AppInfo::IsOspCompat())\ + {\ + return L"2.0";\ + }\ + else \ + {\ + return L"";\ + }\ + };\ + static void ConvertStringToColor32(const char* pString, unsigned int & color)\ + {\ + int index = 0;\ + int len = 0;\ + int gap = 0;\ + char ch;\ + unsigned int temp = 0;\ + len = strlen(pString);\ + if (len < 1)\ + {\ + SysLog(NID_UI, "String is empty");\ + return;\ + }\ + for (index = 1; index < len + 1; index++)\ + {\ + ch = pString[index];\ + if ((ch >= '0') && (ch <= '9'))\ + {\ + temp = temp << 4;\ + gap = ch - '0';\ + temp |= gap;\ + }\ + else if ((ch >= 'A') && (ch <= 'F'))\ + {\ + temp = temp << 4;\ + gap = ch - 'A' + 10;\ + temp |= gap;\ + }\ + else if ((ch >= 'a') && (ch <= 'f'))\ + {\ + temp = temp << 4;\ + gap = ch - 'a' + 10;\ + temp |= gap;\ + }\ + }\ + color = temp;\ + };\ + static void AddDimensionConfig(MapContainer & table, int id, float width, float height)\ + {\ + ResourceItem* pItem = null;\ + Map* pDimensionMap = table.GetDimensionMap();\ + if(pDimensionMap != null)\ + {\ + result r = pDimensionMap->GetValue(id, pItem);\ + if(r == E_OBJ_NOT_FOUND)\ + {\ + pItem = new (std::nothrow) ResourceItem(RESOURCE_TYPE_DIMENSION);\ + SysAssert(pItem);\ + pItem->SetRawDataDimension(width, height);\ + pDimensionMap->Add(id, pItem);\ + }\ + else if(r == E_SUCCESS)\ + {\ + pItem->SetRawDataDimension(width, height);\ + }\ + }\ + };\ + static void AddShapeConfig(MapContainer & table, int id, float value)\ + {\ + ResourceItem* pItem = null;\ + Map* pShapeMap = table.GetShapeMap();\ + if(pShapeMap != null)\ + {\ + result r = pShapeMap->GetValue(id, pItem);\ + if(r == E_OBJ_NOT_FOUND)\ + {\ + pItem = new (std::nothrow) ResourceItem(RESOURCE_TYPE_SHAPE);\ + SysAssert(pItem);\ + pItem->SetRawDataFloat(value);\ + pShapeMap->Add(id, pItem);\ + }\ + else if(r == E_SUCCESS)\ + {\ + pItem->SetRawDataFloat(value);\ + }\ + }\ + };\ + static void AddFixedValueConfig(MapContainer & table, int id, float value)\ + {\ + ResourceItem* pItem = null;\ + Map* pFixedValueMap = table.GetFixedValueMap();\ + if(pFixedValueMap != null)\ + {\ + result r = pFixedValueMap->GetValue(id, pItem);\ + if(r == E_OBJ_NOT_FOUND)\ + {\ + pItem = new (std::nothrow) ResourceItem(RESOURCE_TYPE_FIXED_VALUE);\ + SysAssert(pItem);\ + pItem->SetRawDataFloat(value);\ + pFixedValueMap->Add(id, pItem);\ + }\ + else if(r == E_SUCCESS)\ + {\ + pItem->SetRawDataFloat(value);\ + }\ + }\ + };\ + static void AddImageConfig(MapContainer & table, int id, const char* value)\ + {\ + ResourceItem* pItem = null;\ + Map* pImageMap = table.GetImageMap();\ + if(pImageMap != null)\ + {\ + int len = (value + 1 != null) ? mbstowcs(null, value + 1, 0) : 0;\ + wchar_t* pValue = new (std::nothrow) wchar_t[len + 1];\ + len = mbstowcs(pValue, value + 1, len);\ + if (len == -1)\ + {\ + SysLog(NID_UI, "It is failed to add image resource");\ + }\ + pValue[len] = L'\0';\ + pItem = new (std::nothrow) ResourceItem(RESOURCE_TYPE_IMAGE);\ + SysAssert(pItem);\ + pItem->SetImageFileName(pValue);\ + pImageMap->Add(id, pItem);\ + }\ + };\ + static void AddColorConfig(MapContainer & table, int id, const char* value)\ + {\ + ResourceItem* pItem = null;\ + Map* pColorMap = table.GetColorMap();\ + if(pColorMap != null)\ + {\ + if((value[0] == '$'))\ + {\ + int len = strlen(value+1);\ + char* pValue = new (std::nothrow) char [len+8];\ + strncpy(pValue, "BASIC::", 7);\ + strncpy((pValue + 7), value+1, len);\ + pValue[len+7] = '\0';\ + pItem = new (std::nothrow) ResourceItem(RESOURCE_TYPE_COLOR);\ + pItem->SetRawDataString(pValue);\ + SysAssert(pItem);\ + pColorMap->Add(id, pItem);\ + }\ + else\ + {\ + unsigned int color = 0;\ + pItem = new (std::nothrow) ResourceItem(RESOURCE_TYPE_COLOR);\ + SysAssert(pItem);\ + ConvertStringToColor32(value, color);\ + pItem->SetRawDataColor(color);\ + pColorMap->Add(id, pItem);\ + }\ + }\ + };\ + 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(), bPreInit);\ + return true;\ + };\ + static const int _VALUE_ = TypeDefined::__##x##__ << 24; + +#define DECLARE_END_UI_CONFIG(X) };}}} + +#define DECLARE_COLOR_CONFIG(id,value) static const int id##_COLOR = _VALUE_ + TypeDefined::TypeResource::_COLOR_ + value; +#define DECLARE_IMAGE_CONFIG(id,value) static const int id##_IMAGE = _VALUE_ + TypeDefined::TypeResource::_IMAGE_ + value; +#define DECLARE_SHAPE_CONFIG(id,value) static const int id##_SHAPE = _VALUE_ + TypeDefined::TypeResource::_SHAPE_ + value; +#define DECLARE_DIMENSION_CONFIG(id,value) static const int id##_DIMENSION = _VALUE_ + TypeDefined::TypeResource::_DIMENSION_ + value; +#define DECLARE_FIXED_VALUE_CONFIG(id,value) static const int id##_FIXED_VALUE = _VALUE_ + TypeDefined::TypeResource::_FIXED_VALUE_ + value; +#define DECLARE_ANIMATION_CONFIG(id,value) static const int id##_ANIMATION = _VALUE_ + TypeDefined::TypeResource::_ANIMATION_ + value; + + +#define START_UI_CONFIG(control)\ +namespace Tizen { namespace Ui\ +{\ +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, bool bPreInit)\ +{ + +#define START_UI_CONFIG_API_VERSION(ver)\ + if(version == ver)\ + { +#define END_UI_CONFIG_API_VERSION(ver)\ + } + +#define START_UI_CONFIG_MODE(_mode)\ + if (mode == #_mode)\ + { +#define END_UI_CONFIG_MODE(_mode)\ + } + +#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) 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)\ + {\ + ResourceAnimationFrameList* pList = null;\ + pList = new (std::nothrow) ResourceAnimationFrameList;\ + SysAssert(pList); + +#define ADD_ANIMATION_FRAME(frame, duration) \ + {\ + Tizen::Base::String fileName(#frame);\ + fileName.SubString(1,fileName);\ + pList->Add(ResourceAnimationFrame(fileName,duration));\ + } + +#define END_ANIMATION_CONFIG(key)\ + ResourceItem* pItem = new (std::nothrow) ResourceItem(RESOURCE_TYPE_ANIMATION);\ + pItem->SetRawDataAnimation(pList);\ + pAnimationMap->Add(key##_ANIMATION, pItem);\ + }} + +#define END_UI_CONFIG(control)\ +};\ +_##control __config ## control;\ +}}}//Tizen::Ui::_Resource + +#endif // _FUI_RESOURCE_CONFIG_MACRO_H_ diff --git a/src/ui/inc/FUi_ResourceConfigTypes.h b/src/ui/inc/FUi_ResourceConfigTypes.h new file mode 100644 index 0000000..b090b90 --- /dev/null +++ b/src/ui/inc/FUi_ResourceConfigTypes.h @@ -0,0 +1,68 @@ +// +// 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_ResourceConfigTypes.h + * @brief This is the header file for resource config types. + * @version 3.0 + * + * This header file contains declaration of resource config types + * + */ +#ifndef _FUI_RESOURCE_CONFIG_TYPES_H_ +#define _FUI_RESOURCE_CONFIG_TYPES_H_ + +#include "FUi_ResourceAccessibilityConfig.h" +#include "FUi_ResourceButtonConfig.h" +#include "FUi_ResourceCheckButtonConfig.h" +#include "FUi_ResourceColorPickerConfig.h" +#include "FUi_ResourceContextMenuConfig.h" +#include "FUi_ResourceDateTimeBarConfig.h" +#include "FUi_ResourceDateTimePickerConfig.h" +#include "FUi_ResourceDimmingLayerConfig.h" +#include "FUi_ResourceEditConfig.h" +#include "FUi_ResourceEditDateConfig.h" +#include "FUi_ResourceEditTimeConfig.h" +#include "FUi_ResourceFastScrollConfig.h" +#include "FUi_ResourceFocusUiConfig.h" +#include "FUi_ResourceFooterConfig.h" +#include "FUi_ResourceFormConfig.h" +#include "FUi_ResourceGalleryConfig.h" +#include "FUi_ResourceGroupContainerConfig.h" +#include "FUi_ResourceHeaderConfig.h" +#include "FUi_ResourceIconListConfig.h" +#include "FUi_ResourceInputPadConfig.h" +#include "FUi_ResourceLabelConfig.h" +#include "FUi_ResourceListConfig.h" +#include "FUi_ResourceListViewConfig.h" +#include "FUi_ResourceAppWidgetConfig.h" +#include "FUi_ResourceMessageBoxConfig.h" +#include "FUi_ResourceOptionMenuConfig.h" +#include "FUi_ResourceOverlayPanelConfig.h" +#include "FUi_ResourcePanelConfig.h" +#include "FUi_ResourcePopupConfig.h" +#include "FUi_ResourceProgressConfig.h" +#include "FUi_ResourceRadioGroupConfig.h" +#include "FUi_ResourceScrollConfig.h" +#include "FUi_ResourceSearchBarConfig.h" +#include "FUi_ResourceSliderConfig.h" +#include "FUi_ResourceSplitPanelConfig.h" +#include "FUi_ResourceTabBarConfig.h" +#include "FUi_ResourceTabConfig.h" +#include "FUi_ResourceTableViewConfig.h" +#include "FUi_ResourceTokenEditConfig.h" + +#endif // _FUI_RESOURCE_CONFIG_TYPES_H_ diff --git a/src/ui/inc/FUi_ResourceContextMenuConfig.h b/src/ui/inc/FUi_ResourceContextMenuConfig.h new file mode 100644 index 0000000..3aed6d9 --- /dev/null +++ b/src/ui/inc/FUi_ResourceContextMenuConfig.h @@ -0,0 +1,97 @@ +// +// 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. +// + +#ifndef _FUI_RESOURCE_CONTEXTMENU_CONFIG_H_ +#define _FUI_RESOURCE_CONTEXTMENU_CONFIG_H_ + +#include "FUi_ResourceConfigMacro.h" + +DECLARE_UI_CONFIG(CONTEXTMENU); + DECLARE_COLOR_CONFIG(BG_NORMAL, 1); + DECLARE_COLOR_CONFIG(LIST_ITEM_DIVIDER_01_NORMAL, 2); + DECLARE_COLOR_CONFIG(LIST_ITEM_DIVIDER_02_NORMAL, 3); + DECLARE_COLOR_CONFIG(ITEM_BG_NORMAL, 4); + DECLARE_COLOR_CONFIG(ITEM_BG_PRESSED, 5); + DECLARE_COLOR_CONFIG(ITEM_BG_HIGHLIGHTED, 6); + DECLARE_COLOR_CONFIG(ITEM_BG_DISABLED, 7); + DECLARE_COLOR_CONFIG(GRID_ITEM_DIVIDER_01_NORMAL, 8); + DECLARE_COLOR_CONFIG(GRID_ITEM_DIVIDER_02_NORMAL, 9); + DECLARE_COLOR_CONFIG(ITEM_TEXT_NORMAL, 10); + DECLARE_COLOR_CONFIG(ITEM_TEXT_PRESSED, 11); + DECLARE_COLOR_CONFIG(ITEM_TEXT_HIGHLIGHTED, 12); + DECLARE_COLOR_CONFIG(ITEM_TEXT_DISABLED, 13); + DECLARE_IMAGE_CONFIG(BG_NORMAL, 1); + DECLARE_IMAGE_CONFIG(BG_OUTLINE_EFFECT_NORMAL, 2); + DECLARE_IMAGE_CONFIG(ANCHOR_NORMAL_UP, 3); + DECLARE_IMAGE_CONFIG(ANCHOR_NORMAL_DOWN, 4); + DECLARE_IMAGE_CONFIG(ANCHOR_NORMAL_LEFT, 5); + DECLARE_IMAGE_CONFIG(ANCHOR_NORMAL_RIGHT, 6); + DECLARE_IMAGE_CONFIG(ANCHOR_EFFECT_UP, 7); + DECLARE_IMAGE_CONFIG(ANCHOR_EFFECT_DOWN, 8); + DECLARE_IMAGE_CONFIG(ANCHOR_EFFECT_LEFT, 9); + DECLARE_IMAGE_CONFIG(ANCHOR_EFFECT_RIGHT, 10); + DECLARE_IMAGE_CONFIG(ITEM_BG_PRESSED, 11); + DECLARE_SHAPE_CONFIG(ITEM_MAX_COUNT, 1); + DECLARE_SHAPE_CONFIG(LIST_ITEM_FONT_SIZE, 2); + DECLARE_SHAPE_CONFIG(GRID_ITEM_FONT_SIZE, 3); + DECLARE_SHAPE_CONFIG(LIST_ITEM_HEIGHT, 4); + DECLARE_SHAPE_CONFIG(LIST_MIN_WIDTH, 5); + DECLARE_SHAPE_CONFIG(LIST_MAX_WIDTH, 6); + DECLARE_SHAPE_CONFIG(LIST_TOP_MARGIN, 7); + DECLARE_SHAPE_CONFIG(LIST_BOTTOM_MARGIN, 8); + DECLARE_SHAPE_CONFIG(LIST_LEFT_MARGIN, 9); + DECLARE_SHAPE_CONFIG(LIST_RIGHT_MARGIN, 10); + DECLARE_SHAPE_CONFIG(LIST_ICON_WIDTH, 11); + DECLARE_SHAPE_CONFIG(LIST_ICON_HEIGHT, 12); + DECLARE_SHAPE_CONFIG(LIST_TEXT_WIDTH, 13); + DECLARE_SHAPE_CONFIG(LIST_TEXT_HEIGHT, 14); + DECLARE_SHAPE_CONFIG(LIST_ITEM_GAP, 15); + DECLARE_SHAPE_CONFIG(LIST_DIVIDER_HEIGHT, 16); + DECLARE_SHAPE_CONFIG(GRID_MAX_WIDTH, 17); + DECLARE_SHAPE_CONFIG(GRID_MIN_WIDTH, 18); + DECLARE_SHAPE_CONFIG(GRID_ITEM_WIDTH, 19); + DECLARE_SHAPE_CONFIG(GRID_ITEM_HEIGHT, 20); + DECLARE_SHAPE_CONFIG(GRID_ITEM_MAX_WIDTH, 21); + DECLARE_SHAPE_CONFIG(GRID_TEXT_MARGIN, 22); + DECLARE_SHAPE_CONFIG(GRID_DIVIDER_HEIGHT, 23); + DECLARE_SHAPE_CONFIG(GRID_TOP_MARGIN, 24); + DECLARE_SHAPE_CONFIG(GRID_BOTTOM_MARGIN, 25); + DECLARE_SHAPE_CONFIG(GRID_LEFT_MARGIN, 26); + DECLARE_SHAPE_CONFIG(GRID_RIGHT_MARGIN, 27); + DECLARE_SHAPE_CONFIG(GRID_ICON_WIDTH, 28); + DECLARE_SHAPE_CONFIG(GRID_ICON_HEIGHT, 29); + DECLARE_SHAPE_CONFIG(ANCHOR_WIDTH, 30); + DECLARE_SHAPE_CONFIG(ANCHOR_HEIGHT, 31); + DECLARE_SHAPE_CONFIG(ANCHOR_MARGIN, 32); + DECLARE_SHAPE_CONFIG(APPEARING_ANIMATION_DISTANCE_X, 33); + DECLARE_SHAPE_CONFIG(APPEARING_ANIMATION_DISTANCE_Y, 34); + DECLARE_SHAPE_CONFIG(SCREEN_TOP_MARGIN, 35); + DECLARE_SHAPE_CONFIG(SCREEN_BOTTOM_MARGIN, 36); + DECLARE_SHAPE_CONFIG(SCREEN_LEFT_MARGIN, 37); + DECLARE_SHAPE_CONFIG(SCREEN_RIGHT_MARGIN, 38); + DECLARE_SHAPE_CONFIG(ANCHOR_TOP_MARGIN, 39); + DECLARE_SHAPE_CONFIG(ANCHOR_BOTTOM_MARGIN, 40); + DECLARE_SHAPE_CONFIG(ANCHOR_LEFT_MARGIN, 41); + DECLARE_SHAPE_CONFIG(ANCHOR_RIGHT_MARGIN, 42); + DECLARE_SHAPE_CONFIG(ITEM_BG_PRESSED_MARGIN, 43); + DECLARE_SHAPE_CONFIG(ANCHOR_POPUP_OVERLAP, 44); + DECLARE_SHAPE_CONFIG(LIST_TEXT_GAP, 45); + DECLARE_SHAPE_CONFIG(SCROLL_PANEL_MARGIN, 46); + DECLARE_FIXED_VALUE_CONFIG(GRID_ITEM_GAP, 1); +DECLARE_END_UI_CONFIG(CONTEXTMENU); + +#endif //_FUI_RESOURCE_CONTEXTMENU_CONFIG_H_ diff --git a/src/ui/inc/FUi_ResourceDateTimeBarConfig.h b/src/ui/inc/FUi_ResourceDateTimeBarConfig.h new file mode 100644 index 0000000..04a4bef --- /dev/null +++ b/src/ui/inc/FUi_ResourceDateTimeBarConfig.h @@ -0,0 +1,52 @@ +// +// 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_ResourceDateTimeBarConfig.h + * @brief This is the implementation file for the color and shape config of DateTimeBar class. + */ +#ifndef _FUI_RESOURCE_DATETIMEBAR_CONFIG_H_ +#define _FUI_RESOURCE_DATETIMEBAR_CONFIG_H_ + +#include "FUi_ResourceConfigMacro.h" + +DECLARE_UI_CONFIG(DATETIMEBAR); + DECLARE_COLOR_CONFIG(BG_NORMAL, 1); + DECLARE_COLOR_CONFIG(TEXT_NORMAL, 2); + DECLARE_COLOR_CONFIG(TEXT_PRESSED, 3); + DECLARE_IMAGE_CONFIG(TIMEPICKERBAR_BG_NORMAL, 1); + DECLARE_IMAGE_CONFIG(TAIL_DOWN, 2); + DECLARE_IMAGE_CONFIG(TAIL_UP, 3); + DECLARE_DIMENSION_CONFIG(DEFAULT_SIZE, 1); + DECLARE_SHAPE_CONFIG(DAY_ITEM_WIDTH, 2); + DECLARE_SHAPE_CONFIG(MONTH_ITEM_WIDTH, 3); + DECLARE_SHAPE_CONFIG(YEAR_ITEM_WIDTH, 4); + DECLARE_SHAPE_CONFIG(ITEM_HEIGHT, 5); + DECLARE_SHAPE_CONFIG(DAY_ITEM_MARGIN, 6); + DECLARE_SHAPE_CONFIG(MONTH_ITEM_MARGIN, 7); + DECLARE_SHAPE_CONFIG(YEAR_ITEM_MARGIN, 8); + DECLARE_SHAPE_CONFIG(DAY_LEFT_RIGHT_MARGIN, 9); + DECLARE_SHAPE_CONFIG(MONTH_LEFT_RIGHT_MARGIN, 10); + DECLARE_SHAPE_CONFIG(YEAR_LEFT_RIGHT_MARGIN, 11); + DECLARE_SHAPE_CONFIG(ARROW_WIDTH, 12); + DECLARE_SHAPE_CONFIG(ARROW_HEIGHT, 13); + DECLARE_SHAPE_CONFIG(DAY_FONT_SIZE, 14); + DECLARE_SHAPE_CONFIG(MONTH_FONT_SIZE, 15); + DECLARE_SHAPE_CONFIG(YEAR_FONT_SIZE, 1); +DECLARE_END_UI_CONFIG(DATETIMEBAR); + +#endif diff --git a/src/ui/inc/FUi_ResourceDateTimePickerConfig.h b/src/ui/inc/FUi_ResourceDateTimePickerConfig.h new file mode 100644 index 0000000..cfb2f0d --- /dev/null +++ b/src/ui/inc/FUi_ResourceDateTimePickerConfig.h @@ -0,0 +1,102 @@ +// +// 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_ResourceDateTimePickerConfig.h + * @brief This is a configuration file for color, image and shape values of DateTimePicker. + */ + +#ifndef _FUI_RESOURCE_DATETIMEPICKER_CONFIG_H_ +#define _FUI_RESOURCE_DATETIMEPICKER_CONFIG_H_ + +#include "FUi_ResourceConfigMacro.h" + +DECLARE_UI_CONFIG(DATETIMEPICKER); + DECLARE_COLOR_CONFIG(BG_NORMAL, 1) + DECLARE_COLOR_CONFIG(DISPLAY_BG_NORMAL, 2); + DECLARE_COLOR_CONFIG(AMPM_BG_NORMAL, 3) + DECLARE_COLOR_CONFIG(AMPM_BG_PRESSED, 4) + DECLARE_COLOR_CONFIG(AMPM_BG_HIGHLIGHTED, 5) + DECLARE_COLOR_CONFIG(AMPM_BG_DISABLED, 6) + DECLARE_COLOR_CONFIG(TEXT_NORMAL, 7) + DECLARE_COLOR_CONFIG(TEXT_PRESSED, 8) + DECLARE_COLOR_CONFIG(TEXT_HIGHLIGHTED, 9) + DECLARE_COLOR_CONFIG(TEXT_DISABLED, 10) + DECLARE_COLOR_CONFIG(AMPM_TEXT_NORMAL, 11) + DECLARE_COLOR_CONFIG(AMPM_TEXT_PRESSED, 12) + DECLARE_COLOR_CONFIG(AMPM_TEXT_HIGHLIGHTED, 13) + DECLARE_COLOR_CONFIG(AMPM_TEXT_DISABLED, 14) + DECLARE_COLOR_CONFIG(DIVIDER_LEFT_HALF, 15) + DECLARE_COLOR_CONFIG(DIVIDER_RIGHT_HALF, 16) + DECLARE_COLOR_CONFIG(TITLE_NORMAL, 17) + DECLARE_COLOR_CONFIG(TITLE_DISABLED, 18) + DECLARE_COLOR_CONFIG(CONTENT_BG_NORMAL, 19); + DECLARE_COLOR_CONFIG(CONTENT_BG_PRESSED, 20); + DECLARE_COLOR_CONFIG(CONTENT_BG_DISABLED, 21); + DECLARE_COLOR_CONFIG(CONTENT_BG_HIGHLIGHTED, 22); + + DECLARE_IMAGE_CONFIG(AMPM_BG_NORMAL, 1) + DECLARE_IMAGE_CONFIG(AMPM_BG_PRESSED, 2) + DECLARE_IMAGE_CONFIG(AMPM_BG_HIGHLIGHTED, 3) + DECLARE_IMAGE_CONFIG(AMPM_BG_DISABLED, 4) + DECLARE_IMAGE_CONFIG(AMPM_BG_EFFECT_NORMAL, 5) + DECLARE_IMAGE_CONFIG(AMPM_BG_EFFECT_PRESSED, 6) + DECLARE_IMAGE_CONFIG(AMPM_BG_EFFECT_HIGHLIGHTED, 7) + DECLARE_IMAGE_CONFIG(AMPM_BG_EFFECT_DISABLED, 8) + DECLARE_IMAGE_CONFIG(COLON_BG_NORMAL, 9) + DECLARE_IMAGE_CONFIG(BG_NORMAL, 10); + DECLARE_IMAGE_CONFIG(BG_EFFECT, 11); + DECLARE_IMAGE_CONFIG(CONTENT_BG_NORMAL,12); + DECLARE_IMAGE_CONFIG(CONTENT_BG_PRESSED,13); + DECLARE_IMAGE_CONFIG(CONTENT_BG_HIGHLIGHTED,14); + DECLARE_IMAGE_CONFIG(CONTENT_BG_DISABLED,15); + DECLARE_IMAGE_CONFIG(CONTENT_BG_EFFECT_NORMAL,16); + DECLARE_IMAGE_CONFIG(CONTENT_BG_EFFECT_PRESSED,17); + DECLARE_IMAGE_CONFIG(CONTENT_BG_EFFECT_HIGHLIGHTED,18); + DECLARE_IMAGE_CONFIG(CONTENT_BG_EFFECT_DISABLED,19); + + DECLARE_SHAPE_CONFIG(FOOTER_HEIGHT, 1) + DECLARE_SHAPE_CONFIG(INPUTPAD_HEIGHT, 2) + DECLARE_SHAPE_CONFIG(OUTPUT_AREA_HEIGHT, 3) + DECLARE_SHAPE_CONFIG(DATETIME_DISPLAY_BOX_HEIGHT, 4) + DECLARE_SHAPE_CONFIG(AMPM_DISPLAY_BOX_HEIGHT, 5) + DECLARE_SHAPE_CONFIG(TOP_MARGIN, 6) + DECLARE_SHAPE_CONFIG(LEFT_MARGIN, 7) + DECLARE_SHAPE_CONFIG(TITLE_TOP_MARGIN, 8) + DECLARE_SHAPE_CONFIG(TITLE_LEFT_MARGIN, 9) + DECLARE_SHAPE_CONFIG(TITLE_BOTTOM_MARGIN, 10) + DECLARE_SHAPE_CONFIG(TITLE_HEIGHT, 11) + DECLARE_SHAPE_CONFIG(DATE_ELEMENT_WIDTH, 12) + DECLARE_SHAPE_CONFIG(MONTH_ELEMENT_WIDTH, 13) + DECLARE_SHAPE_CONFIG(YEAR_ELEMENT_WIDTH, 14) + DECLARE_SHAPE_CONFIG(TIME_ELEMENT_WIDTH, 15) + DECLARE_SHAPE_CONFIG(AMPM_WIDTH, 16) + DECLARE_SHAPE_CONFIG(COLON_WIDTH, 17) + DECLARE_SHAPE_CONFIG(DATE_ELEMENT_GAP_WIDTH, 18) + DECLARE_SHAPE_CONFIG(TIME_AMPM_MARGIN, 19) + DECLARE_SHAPE_CONFIG(COLON_MARGIN, 20) + DECLARE_SHAPE_CONFIG(DIVIDER_MARGIN, 21) + DECLARE_FIXED_VALUE_CONFIG(DIVIDER_WIDTH, 22) + DECLARE_SHAPE_CONFIG(DIVIDER_HEIGHT, 23) + DECLARE_SHAPE_CONFIG(DATETIME_OUTPUT_LEFT_MARGIN, 24) + DECLARE_SHAPE_CONFIG(TIME_OUTPUT_MARGIN, 25) + DECLARE_SHAPE_CONFIG(FONT_SIZE, 26) + DECLARE_SHAPE_CONFIG(TITLE_FONT_SIZE, 27) + +DECLARE_END_UI_CONFIG(DATETIMEPICKER); + +#endif //_FUI_RESOURCE_DATETIMEPICKER_CONFIG_H_ diff --git a/src/ui/inc/FUi_ResourceDimmingLayerConfig.h b/src/ui/inc/FUi_ResourceDimmingLayerConfig.h new file mode 100644 index 0000000..4c6cdbf --- /dev/null +++ b/src/ui/inc/FUi_ResourceDimmingLayerConfig.h @@ -0,0 +1,31 @@ +// +// 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_ResourceDimmingLayerConfig.h + * @brief This is the implementation file for the properties of DimmingLayer. + */ +#ifndef _FUI_RESOURCE_DIMMING_LAYER_CONFIG_H_ +#define _FUI_RESOURCE_DIMMING_LAYER_CONFIG_H_ + +#include "FUi_ResourceConfigMacro.h" + +DECLARE_UI_CONFIG(DIMMINGLAYER); + DECLARE_IMAGE_CONFIG(BG_PORTRAIT, 1); + DECLARE_IMAGE_CONFIG(BG_LANDSCAPE, 2); +DECLARE_END_UI_CONFIG(DIMMINGLAYER); + +#endif //_FUI_RESOURCE_DIMMING_LAYER_CONFIG_H_ diff --git a/src/ui/inc/FUi_ResourceEditConfig.h b/src/ui/inc/FUi_ResourceEditConfig.h new file mode 100644 index 0000000..276376d --- /dev/null +++ b/src/ui/inc/FUi_ResourceEditConfig.h @@ -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 FUi_ResourceEditConfig.h + * @brief This is the implementation file for the properties of Edit. + */ +#ifndef _FUI_RESOURCE_EDIT_CONFIG_H_ +#define _FUI_RESOURCE_EDIT_CONFIG_H_ + +#include "FUi_ResourceConfigMacro.h" + +DECLARE_UI_CONFIG(EDIT); + DECLARE_COLOR_CONFIG(BG_NORMAL, 1) + DECLARE_COLOR_CONFIG(BG_PRESSED, 2) + DECLARE_COLOR_CONFIG(BG_HIGHLIGHTED, 3) + DECLARE_COLOR_CONFIG(BG_DISABLED, 4) + DECLARE_COLOR_CONFIG(TITLE_TEXT_NORMAL, 5) + DECLARE_COLOR_CONFIG(TITLE_TEXT_PRESSED, 6) + DECLARE_COLOR_CONFIG(TITLE_TEXT_HIGHLIGHTED, 7) + DECLARE_COLOR_CONFIG(TITLE_TEXT_DISABLED, 8) + DECLARE_COLOR_CONFIG(TEXT_NORMAL, 9) + DECLARE_COLOR_CONFIG(TEXT_PRESSED, 10) + DECLARE_COLOR_CONFIG(TEXT_HIGHLIGHTED, 11) + DECLARE_COLOR_CONFIG(TEXT_DISABLED, 12) + DECLARE_COLOR_CONFIG(GUIDE_TEXT_NORMAL, 13) + DECLARE_COLOR_CONFIG(CLEAR_ICON_NORMAL, 14) + DECLARE_COLOR_CONFIG(CLEAR_ICON_PRESSED, 15) + DECLARE_COLOR_CONFIG(CLEAR_ICON_DISABLED, 16) + DECLARE_COLOR_CONFIG(CUT_LINK_TEXT_NORMAL, 17) + DECLARE_COLOR_CONFIG(CUT_LINK_BG_NORMAL, 18) + DECLARE_COLOR_CONFIG(CURSOR_NORMAL, 19) + + DECLARE_IMAGE_CONFIG(BG_NORMAL, 1) + DECLARE_IMAGE_CONFIG(BG_PRESSED, 2) + DECLARE_IMAGE_CONFIG(BG_HIGHLIGHTED, 3) + DECLARE_IMAGE_CONFIG(BG_DISABLED, 4) + DECLARE_IMAGE_CONFIG(BG_EFFECT, 5) + DECLARE_IMAGE_CONFIG(COPY_PASTE_ICON_CENTER_NORMAL, 6) + DECLARE_IMAGE_CONFIG(COPY_PASTE_ICON_REVERSE_CENTER_NORMAL, 7) + DECLARE_IMAGE_CONFIG(COPY_PASTE_ICON_LEFT_NORMAL, 8) + DECLARE_IMAGE_CONFIG(COPY_PASTE_ICON_RIGHT_NORMAL, 9) + DECLARE_IMAGE_CONFIG(COPY_PASTE_ICON_REVERSE_LEFT_NORMAL, 10) + DECLARE_IMAGE_CONFIG(COPY_PASTE_ICON_REVERSE_RIGHT_NORMAL, 11) + DECLARE_IMAGE_CONFIG(COPY_PASTE_SEARCH_ICON, 12) + DECLARE_IMAGE_CONFIG(COPY_PASTE_MAGNIFIER, 13) + DECLARE_IMAGE_CONFIG(COPY_PASTE_MAGNIFIER_MASK, 14) + DECLARE_IMAGE_CONFIG(BG_ROUND_NORMAL, 15) + DECLARE_IMAGE_CONFIG(BG_ROUND_EFFECT, 16) + DECLARE_IMAGE_CONFIG(CLEAR_ICON_NORMAL, 17) + DECLARE_IMAGE_CONFIG(CLEAR_ICON_PRESSED, 18) + DECLARE_IMAGE_CONFIG(CLEAR_ICON_DISABLED, 19) + DECLARE_IMAGE_CONFIG(GROUPED_SINGLE_BG_NORMAL, 20) + DECLARE_IMAGE_CONFIG(GROUPED_SINGLE_BG_EFFECT_NORMAL, 21) + DECLARE_IMAGE_CONFIG(GROUPED_TOP_BG_NORMAL, 22) + DECLARE_IMAGE_CONFIG(GROUPED_TOP_BG_EFFECT_NORMAL, 23) + DECLARE_IMAGE_CONFIG(GROUPED_MIDDLE_BG_NORMAL, 24) + DECLARE_IMAGE_CONFIG(GROUPED_MIDDLE_BG_EFFECT_NORMAL, 25) + DECLARE_IMAGE_CONFIG(GROUPED_BOTTOM_BG_NORMAL, 26) + DECLARE_IMAGE_CONFIG(GROUPED_BOTTOM_BG_EFFECT_NORMAL, 27) + DECLARE_IMAGE_CONFIG(BG_RING_FOCUSED, 28) + + DECLARE_DIMENSION_CONFIG(MIN_SIZE, 1) + DECLARE_DIMENSION_CONFIG(TITLE_STYLE_MIN_SIZE, 2) + DECLARE_DIMENSION_CONFIG(SMALL_STYLE_MIN_SIZE, 3) + + DECLARE_FIXED_VALUE_CONFIG(FONT_MIN_SIZE, 1) + + DECLARE_SHAPE_CONFIG(DEFAULT_FONT_SIZE, 1) + DECLARE_SHAPE_CONFIG(DEFAULT_TITLE_FONT_SIZE, 2) + DECLARE_SHAPE_CONFIG(CLEAR_ICON_HEIGHT, 3) + DECLARE_SHAPE_CONFIG(CLEAR_ICON_WIDTH, 4) + DECLARE_SHAPE_CONFIG(COPYPASTE_HANDLER_WIDTH, 5) + DECLARE_SHAPE_CONFIG(COPYPASTE_HANDLER_HEIGHT, 6) + DECLARE_SHAPE_CONFIG(FIELD_BORDER_WIDTH, 7) + DECLARE_SHAPE_CONFIG(FIELD_LEFT_MARGIN, 8) + DECLARE_SHAPE_CONFIG(FIELD_RIGHT_MARGIN, 9) + DECLARE_SHAPE_CONFIG(FIELD_TOP_MARGIN, 10) + DECLARE_SHAPE_CONFIG(FIELD_BOTTOM_MARGIN, 11) + DECLARE_SHAPE_CONFIG(FIELD_TEXT_LEFT_MARGIN, 12) + DECLARE_SHAPE_CONFIG(FIELD_TEXT_RIGHT_MARGIN, 13) + DECLARE_SHAPE_CONFIG(FIELD_TEXT_TOP_MARGIN, 14) + DECLARE_SHAPE_CONFIG(FIELD_TEXT_BOTTOM_MARGIN, 15) + DECLARE_SHAPE_CONFIG(FIELD_TITLE_TEXT_LEFT_MARGIN, 16) + DECLARE_SHAPE_CONFIG(FIELD_TITLE_TEXT_RIGHT_MARGIN, 17) + DECLARE_SHAPE_CONFIG(FIELD_TITLE_TEXT_TOP_MARGIN, 18) + DECLARE_SHAPE_CONFIG(FIELD_TITLE_TEXT_BOTTOM_MARGIN, 19) + DECLARE_SHAPE_CONFIG(FIELD_TITLE_RECT_WIDTH, 20) + DECLARE_SHAPE_CONFIG(FIELD_TITLE_RECT_HEIGHT, 21) + DECLARE_SHAPE_CONFIG(AREA_LEFT_MARGIN, 22) + DECLARE_SHAPE_CONFIG(AREA_RIGHT_MARGIN, 23) + DECLARE_SHAPE_CONFIG(AREA_TOP_MARGIN, 24) + DECLARE_SHAPE_CONFIG(AREA_BOTTOM_MARGIN, 25) + DECLARE_SHAPE_CONFIG(AREA_TEXT_LEFT_MARGIN, 26) + DECLARE_SHAPE_CONFIG(AREA_TEXT_RIGHT_MARGIN, 27) + DECLARE_SHAPE_CONFIG(AREA_TEXT_TOP_MARGIN, 28) + DECLARE_SHAPE_CONFIG(AREA_TEXT_BOTTOM_MARGIN, 29) + DECLARE_SHAPE_CONFIG(AREA_TITLE_TEXT_LEFT_MARGIN, 30) + DECLARE_SHAPE_CONFIG(AREA_TITLE_TEXT_RIGHT_MARGIN, 31) + DECLARE_SHAPE_CONFIG(AREA_TITLE_TEXT_TOP_MARGIN, 32) + DECLARE_SHAPE_CONFIG(AREA_TITLE_TEXT_BOTTOM_MARGIN, 33) + DECLARE_SHAPE_CONFIG(AREA_TITLE_RECT_WIDTH, 34) + DECLARE_SHAPE_CONFIG(AREA_TITLE_RECT_HEIGHT, 35) + DECLARE_SHAPE_CONFIG(AREA_SCROLL_WIDTH, 36) + DECLARE_SHAPE_CONFIG(CURSOR_WIDTH, 37) + DECLARE_SHAPE_CONFIG(TEXT_OBJECT_MININMUM_WIDTH, 38) + DECLARE_SHAPE_CONFIG(TEXT_OBJECT_MININMUM_HEIGHT, 39) + DECLARE_SHAPE_CONFIG(COPYPASTE_MAGNIFIER_WIDTH, 40) + DECLARE_SHAPE_CONFIG(COPYPASTE_MAGNIFIER_HEIGHT, 41) + DECLARE_SHAPE_CONFIG(COPYPASTE_MAGNIFIER_CAPTURE_WIDTH, 42) + 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_ResourceEditDateConfig.h b/src/ui/inc/FUi_ResourceEditDateConfig.h new file mode 100644 index 0000000..de1936e --- /dev/null +++ b/src/ui/inc/FUi_ResourceEditDateConfig.h @@ -0,0 +1,65 @@ +// +// 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_ResourceEditDateConfig.h + * @brief This is the implementation file for the color and shape config of EditDate class. + */ +#ifndef _FUI_RESOURCE_EDIT_DATE_CONFIG_H_ +#define _FUI_RESOURCE_EDIT_DATE_CONFIG_H_ + +#include "FUi_ResourceConfigMacro.h" + +DECLARE_UI_CONFIG(EDITDATE); + DECLARE_COLOR_CONFIG(TEXT_NORMAL,1); + DECLARE_COLOR_CONFIG(TEXT_PRESSED,2); + DECLARE_COLOR_CONFIG(TEXT_DISABLED,3); + DECLARE_COLOR_CONFIG(TITLE_TEXT_NORMAL,4); + DECLARE_COLOR_CONFIG(TITLE_TEXT_DISABLED,5); + DECLARE_COLOR_CONFIG(CONTENT_BG_NORMAL,6); + DECLARE_COLOR_CONFIG(CONTENT_BG_PRESSED,7); + DECLARE_COLOR_CONFIG(CONTENT_BG_DISABLED,8); + DECLARE_COLOR_CONFIG(CONTENT_BG_HIGHLIGHTED,9); + DECLARE_COLOR_CONFIG(TEXT_HIGHLIGHTED,10); + DECLARE_IMAGE_CONFIG(CONTENT_BG_NORMAL,1); + DECLARE_IMAGE_CONFIG(CONTENT_BG_PRESSED,2); + DECLARE_IMAGE_CONFIG(CONTENT_BG_DISABLED,3); + DECLARE_IMAGE_CONFIG(CONTENT_BG_HIGHLIGHTED,4); + DECLARE_IMAGE_CONFIG(CONTENT_BG_EFFECT_NORMAL,5); + DECLARE_IMAGE_CONFIG(CONTENT_BG_EFFECT_DISABLED,6); + DECLARE_IMAGE_CONFIG(CONTENT_BG_EFFECT_PRESSED,7); + DECLARE_SHAPE_CONFIG(WIDTH,1); + DECLARE_SHAPE_CONFIG(HEIGHT,2); + DECLARE_SHAPE_CONFIG(DATE_HEIGHT,3); + DECLARE_SHAPE_CONFIG(TITLE_HEIGHT,4); + DECLARE_SHAPE_CONFIG(DATE_FONT_SIZE,5); + DECLARE_SHAPE_CONFIG(TEXT_FONT_SIZE,6); + DECLARE_SHAPE_CONFIG(DATE_TEXT_LEFT_MARGIN,7); + DECLARE_SHAPE_CONFIG(MONTH_YEAR_ELEMENT_WIDTH,8); + DECLARE_SHAPE_CONFIG(ITEM_DIVIDER_HEIGHT,9); + DECLARE_SHAPE_CONFIG(TITLE_DATE_MARGIN,10); + DECLARE_SHAPE_CONFIG(DATE_BAR_MARGIN,11); + DECLARE_SHAPE_CONFIG(TITLE_TEXT_LEFT_MARGIN,12); + DECLARE_SHAPE_CONFIG(ELEMENT_MARGIN,13); + DECLARE_SHAPE_CONFIG(DAY_ELEMENT_WIDTH,14); + DECLARE_SHAPE_CONFIG(DAY_ELEMENT_MIN_WIDTH,15); + DECLARE_SHAPE_CONFIG(MONTH_YEAR_ELEMENT_MIN_WIDTH,16); + DECLARE_SHAPE_CONFIG(CONTENT_TEXT_MARGIN,17); + DECLARE_DIMENSION_CONFIG(MIN_SIZE,1); +DECLARE_END_UI_CONFIG(EDITDATE); + +#endif //_FUI_RESOURCE_EDIT_DATE_CONFIG_H_ diff --git a/src/ui/inc/FUi_ResourceEditTimeConfig.h b/src/ui/inc/FUi_ResourceEditTimeConfig.h new file mode 100644 index 0000000..387474e --- /dev/null +++ b/src/ui/inc/FUi_ResourceEditTimeConfig.h @@ -0,0 +1,83 @@ +// +// 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_ResourceEditTimeConfig.h + * @brief This is the implementation file for the color and shape config of EditTime class. + */ +#ifndef _FUI_RESOURCE_EDIT_TIME_CONFIG_H_ +#define _FUI_RESOURCE_EDIT_TIME_CONFIG_H_ + +#include "FUi_ResourceConfigMacro.h" + +DECLARE_UI_CONFIG(EDITTIME); + DECLARE_COLOR_CONFIG(BUTTON_BG_NORMAL,1); + DECLARE_COLOR_CONFIG(BUTTON_BG_PRESSED,2); + DECLARE_COLOR_CONFIG(BUTTON_BG_DISABLED,3); + DECLARE_COLOR_CONFIG(BUTTON_TEXT_NORMAL,4); + DECLARE_COLOR_CONFIG(BUTTON_TEXT_PRESSED,5); + DECLARE_COLOR_CONFIG(BUTTON_TEXT_DISABLED,6); + DECLARE_COLOR_CONFIG(TEXT_NORMAL,7); + DECLARE_COLOR_CONFIG(TEXT_PRESSED,8); + DECLARE_COLOR_CONFIG(TEXT_DISABLED,9); + DECLARE_COLOR_CONFIG(TITLE_TEXT_NORMAL,10); + DECLARE_COLOR_CONFIG(TITLE_TEXT_DISABLED,11); + DECLARE_COLOR_CONFIG(BUTTON_BG_HIGHLIGHTED,12); + DECLARE_COLOR_CONFIG(CONTENT_BG_NORMAL,13); + DECLARE_COLOR_CONFIG(CONTENT_BG_PRESSED,14); + DECLARE_COLOR_CONFIG(CONTENT_BG_DISABLED,15); + DECLARE_COLOR_CONFIG(CONTENT_BG_HIGHLIGHTED,16); + DECLARE_COLOR_CONFIG(BUTTON_TEXT_HIGHLIGHTED, 17); + DECLARE_COLOR_CONFIG(TEXT_HIGHLIGHTED, 18); + DECLARE_IMAGE_CONFIG(COLON_BG_NORMAL,1); + DECLARE_IMAGE_CONFIG(BUTTON_BG_NORMAL,2); + DECLARE_IMAGE_CONFIG(BUTTON_BG_PRESSED,3); + DECLARE_IMAGE_CONFIG(BUTTON_BG_DISABLED,4); + DECLARE_IMAGE_CONFIG(BUTTON_BG_EFFECT_NORMAL,5); + DECLARE_IMAGE_CONFIG(BUTTON_BG_EFFECT_DISABLED,6); + DECLARE_IMAGE_CONFIG(BUTTON_BG_EFFECT_PRESSED,7); + DECLARE_IMAGE_CONFIG(BUTTON_BG_HIGHLIGHTED,8); + DECLARE_IMAGE_CONFIG(CONTENT_BG_NORMAL,9); + DECLARE_IMAGE_CONFIG(CONTENT_BG_PRESSED,10); + DECLARE_IMAGE_CONFIG(CONTENT_BG_DISABLED,11); + DECLARE_IMAGE_CONFIG(CONTENT_BG_HIGHLIGHTED,12); + DECLARE_IMAGE_CONFIG(CONTENT_BG_EFFECT_NORMAL,13); + DECLARE_IMAGE_CONFIG(CONTENT_BG_EFFECT_DISABLED,14); + DECLARE_IMAGE_CONFIG(CONTENT_BG_EFFECT_PRESSED,15); + DECLARE_SHAPE_CONFIG(WIDTH,1); + DECLARE_SHAPE_CONFIG(HEIGHT,2); + DECLARE_SHAPE_CONFIG(TIME_WIDTH,3); + DECLARE_SHAPE_CONFIG(HOUR_MINUTE_WIDTH,4); + DECLARE_SHAPE_CONFIG(TITLE_TIME_MARGIN,5); + DECLARE_SHAPE_CONFIG(TIME_BAR_MARGIN,6); + DECLARE_SHAPE_CONFIG(TIME_HEIGHT,7); + DECLARE_SHAPE_CONFIG(TIME_AMPM_MARGIN,8); + DECLARE_SHAPE_CONFIG(AMPM_WIDTH,9); + DECLARE_SHAPE_CONFIG(AMPM_HEIGHT,10); + DECLARE_SHAPE_CONFIG(TITLE_HEIGHT,11); + DECLARE_SHAPE_CONFIG(TIME_FONT_SIZE,12); + DECLARE_SHAPE_CONFIG(TEXT_FONT_SIZE,13); + DECLARE_SHAPE_CONFIG(AMPM_FONT_SIZE,14); + DECLARE_SHAPE_CONFIG(COLON_WIDTH,15); + DECLARE_SHAPE_CONFIG(COLON_MARGIN,16); + DECLARE_SHAPE_CONFIG(TIME_TEXT_LEFT_MARGIN,17); + DECLARE_SHAPE_CONFIG(TITLE_TEXT_LEFT_MARGIN,18); + DECLARE_SHAPE_CONFIG(HOUR_MINUTE_MIN_WIDTH,19); + DECLARE_DIMENSION_CONFIG(MIN_SIZE,1); +DECLARE_END_UI_CONFIG(EDITTIME); + +#endif //_FUI_RESOURCE_EDIT_TIME_CONFIG_H_ diff --git a/src/ui/inc/FUi_ResourceFastScrollConfig.h b/src/ui/inc/FUi_ResourceFastScrollConfig.h new file mode 100644 index 0000000..eb50453 --- /dev/null +++ b/src/ui/inc/FUi_ResourceFastScrollConfig.h @@ -0,0 +1,54 @@ +// +// 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. +// +#ifndef _FUI_RESOURCE_FAST_SCROLL_CONFIG_H_ +#define _FUI_RESOURCE_FAST_SCROLL_CONFIG_H_ + +#include "FUi_ResourceConfigMacro.h" + +DECLARE_UI_CONFIG(FASTSCROLL); + DECLARE_COLOR_CONFIG(INDEX_BG_NORMAL, 1); + DECLARE_COLOR_CONFIG(INDEX_LINE_PRESSED, 2); + DECLARE_COLOR_CONFIG(INDEX_TEXT_NORMAL, 3); + DECLARE_COLOR_CONFIG(INDEX_DIVIDER_NORMAL, 4); + DECLARE_COLOR_CONFIG(INDEX_BG_PRESSED, 5); + DECLARE_COLOR_CONFIG(INDEX_TEXT_PRESSED, 6); + DECLARE_COLOR_CONFIG(POPUP_BG_NORMAL, 7); + DECLARE_COLOR_CONFIG(POPUP_TEXT_NORMAL, 8); + DECLARE_COLOR_CONFIG(INDEX_LINE_NORMAL, 9); + DECLARE_IMAGE_CONFIG(INDEX_BG_NORMAL, 1); + DECLARE_IMAGE_CONFIG(INDEX_BG_PRESSED, 2); + DECLARE_IMAGE_CONFIG(INDEX_LINE_PRESSED, 3); + DECLARE_IMAGE_CONFIG(POPUP_BG_NORMAL, 4); + DECLARE_IMAGE_CONFIG(POPUP_BG_EFFECT, 5); + DECLARE_SHAPE_CONFIG(INDEX_WIDTH, 1); + DECLARE_SHAPE_CONFIG(INDEX_HEIGHT, 2); + DECLARE_SHAPE_CONFIG(INDEX_TOP_MARGIN, 3); + DECLARE_SHAPE_CONFIG(INDEX_LEFT_LINE_THICKNESS, 4); + DECLARE_SHAPE_CONFIG(INDEX_TEXT_SIZE, 5); + DECLARE_SHAPE_CONFIG(SELECTED_INDEX_RIGHT_MARGIN, 6); + DECLARE_SHAPE_CONFIG(SELECTED_INDEX_HEIGHT, 7); + DECLARE_SHAPE_CONFIG(POPUP_WIDTH, 8); + DECLARE_SHAPE_CONFIG(POPUP_HEIGHT, 9); + DECLARE_SHAPE_CONFIG(POPUP_WIDTH_INCREMENT, 10); + DECLARE_SHAPE_CONFIG(POPUP_RIGHT_SHADOW, 11); + DECLARE_SHAPE_CONFIG(POPUP_BOTTOM_SHADOW, 12); + DECLARE_SHAPE_CONFIG(POPUP_TEXT_SIZE, 13); + DECLARE_SHAPE_CONFIG(INDEX_SEPARATOR_WIDTH, 14); + DECLARE_FIXED_VALUE_CONFIG(INDEX_SEPARATOR_THICKNESS, 1); +DECLARE_END_UI_CONFIG(FASTSCROLL); + +#endif //_FUI_RESOURCE_FAST_SCROLL_CONFIG_H_ diff --git a/src/ui/inc/FUi_ResourceFocusUiConfig.h b/src/ui/inc/FUi_ResourceFocusUiConfig.h new file mode 100644 index 0000000..0e16f1e --- /dev/null +++ b/src/ui/inc/FUi_ResourceFocusUiConfig.h @@ -0,0 +1,31 @@ +// +// 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_ResourceFocusUionfig.h + * @brief This is the implementation file for the color properties of Form. + */ +#ifndef _FUI_RESOURCE_FOCUS_UI_CONFIG_H_ +#define _FUI_RESOURCE_FOCUS_UI_CONFIG_H_ + +#include "FUi_ResourceConfigMacro.h" + +DECLARE_UI_CONFIG(FOCUSUI); + DECLARE_COLOR_CONFIG(CONTENT_BG_HIGHLIGHTED,1); + DECLARE_IMAGE_CONFIG(FOCUS, 1); +DECLARE_END_UI_CONFIG(FOCUSUI); + +#endif //_FUI_RESOURCE_FOCUS_UI_CONFIG_H_ \ No newline at end of file diff --git a/src/ui/inc/FUi_ResourceFooterConfig.h b/src/ui/inc/FUi_ResourceFooterConfig.h new file mode 100644 index 0000000..d77672e --- /dev/null +++ b/src/ui/inc/FUi_ResourceFooterConfig.h @@ -0,0 +1,329 @@ +// +// 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_ResourceFooterConfig.cpp + * @brief This is the implementation file for the properties of Footer. + */ +#ifndef _FUI_RESOURCE_FOOTER_CONFIG_H_ +#define _FUI_RESOURCE_FOOTER_CONFIG_H_ + +#include "FUi_ResourceConfigMacro.h" + +DECLARE_UI_CONFIG(FOOTER); +// COLOR + DECLARE_COLOR_CONFIG(BG_NORMAL, 1); + DECLARE_COLOR_CONFIG(TRANSLUCENT_BG_NORMAL, 2); + DECLARE_COLOR_CONFIG(BUTTON_BG_NORMAL, 3); + DECLARE_COLOR_CONFIG(BUTTON_BG_DISABLED, 4); + DECLARE_COLOR_CONFIG(BUTTON_BG_PRESSED, 5); + DECLARE_COLOR_CONFIG(BUTTON_BG_HIGHLIGHTED, 6); + DECLARE_COLOR_CONFIG(BUTTON_TRANSLUCENT_BG_NORMAL, 7); + DECLARE_COLOR_CONFIG(BUTTON_TRANSLUCENT_BG_DISABLED, 8); + DECLARE_COLOR_CONFIG(BUTTON_TRANSLUCENT_BG_PRESSED, 9); + DECLARE_COLOR_CONFIG(BUTTON_TRANSLUCENT_BG_HIGHLIGHTED, 10); + DECLARE_COLOR_CONFIG(BUTTON_TEXT_NORMAL, 11); + DECLARE_COLOR_CONFIG(BUTTON_TEXT_DISABLED, 12); + DECLARE_COLOR_CONFIG(BUTTON_TEXT_PRESSED, 13); + DECLARE_COLOR_CONFIG(BUTTON_TEXT_HIGHLIGHTED, 14); + DECLARE_COLOR_CONFIG(BUTTON_TRANSLUCENT_TEXT_NORMAL, 15); + DECLARE_COLOR_CONFIG(BUTTON_TRANSLUCENT_TEXT_DISABLED, 16); + DECLARE_COLOR_CONFIG(BUTTON_TRANSLUCENT_TEXT_PRESSED, 17); + DECLARE_COLOR_CONFIG(BUTTON_TRANSLUCENT_TEXT_HIGHLIGHTED, 18); + DECLARE_COLOR_CONFIG(SEGMENTED_ITEM_BG_NORMAL, 19); + DECLARE_COLOR_CONFIG(SEGMENTED_ITEM_BG_DISABLED, 20); + DECLARE_COLOR_CONFIG(SEGMENTED_ITEM_BG_PRESSED, 21); + DECLARE_COLOR_CONFIG(SEGMENTED_ITEM_BG_HIGHLIGHTED, 22); + DECLARE_COLOR_CONFIG(SEGMENTED_ITEM_BG_SELECTED, 23); + DECLARE_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_NORMAL, 24); + DECLARE_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_DISABLED, 25); + DECLARE_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_PRESSED, 26); + DECLARE_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_HIGHLIGHTED, 27); + DECLARE_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_SELECTED, 28); + DECLARE_COLOR_CONFIG(SEGMENTED_ITEM_TEXT_NORMAL, 29); + DECLARE_COLOR_CONFIG(SEGMENTED_ITEM_TEXT_DISABLED, 30); + DECLARE_COLOR_CONFIG(SEGMENTED_ITEM_TEXT_PRESSED, 31); + DECLARE_COLOR_CONFIG(SEGMENTED_ITEM_TEXT_HIGHLIGHTED, 32); + DECLARE_COLOR_CONFIG(SEGMENTED_ITEM_TEXT_SELECTED, 33); + DECLARE_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_TEXT_NORMAL, 34); + DECLARE_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_TEXT_DISABLED, 35); + DECLARE_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_TEXT_PRESSED, 36); + DECLARE_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED, 37); + DECLARE_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_TEXT_SELECTED, 38); + DECLARE_COLOR_CONFIG(TAB_ITEM_BG_NORMAL, 39); + DECLARE_COLOR_CONFIG(TAB_ITEM_BG_DISABLED, 40); + DECLARE_COLOR_CONFIG(TAB_ITEM_BG_PRESSED, 41); + DECLARE_COLOR_CONFIG(TAB_ITEM_BG_HIGHLIGHTED, 42); + DECLARE_COLOR_CONFIG(TAB_ITEM_BG_SELECTED, 43); + DECLARE_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_BG_NORMAL, 44); + DECLARE_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_BG_DISABLED, 45); + DECLARE_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_BG_PRESSED, 46); + DECLARE_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_BG_HIGHLIGHTED, 47); + DECLARE_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_BG_SELECTED, 48); + DECLARE_COLOR_CONFIG(TAB_ITEM_TEXT_NORMAL, 49); + DECLARE_COLOR_CONFIG(TAB_ITEM_TEXT_DISABLED, 50); + DECLARE_COLOR_CONFIG(TAB_ITEM_TEXT_PRESSED, 51); + DECLARE_COLOR_CONFIG(TAB_ITEM_TEXT_HIGHLIGHTED, 52); + DECLARE_COLOR_CONFIG(TAB_ITEM_TEXT_SELECTED, 53); + DECLARE_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_TEXT_NORMAL, 54); + DECLARE_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_TEXT_DISABLED, 55); + DECLARE_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_TEXT_PRESSED, 56); + DECLARE_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED, 57); + DECLARE_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_TEXT_SELECTED, 58); + DECLARE_COLOR_CONFIG(BUTTON_ITEM_BG_NORMAL, 59); + DECLARE_COLOR_CONFIG(BUTTON_ITEM_BG_DISABLED, 60); + DECLARE_COLOR_CONFIG(BUTTON_ITEM_BG_PRESSED, 61); + DECLARE_COLOR_CONFIG(BUTTON_ITEM_BG_HIGHLIGHTED, 62); + DECLARE_COLOR_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_NORMAL, 63); + DECLARE_COLOR_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_DISABLED, 64); + DECLARE_COLOR_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_PRESSED, 65); + DECLARE_COLOR_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_HIGHLIGHTED, 66); + DECLARE_COLOR_CONFIG(BUTTON_ITEM_TEXT_NORMAL, 67); + DECLARE_COLOR_CONFIG(BUTTON_ITEM_TEXT_DISABLED, 68); + DECLARE_COLOR_CONFIG(BUTTON_ITEM_TEXT_PRESSED, 69); + DECLARE_COLOR_CONFIG(BUTTON_ITEM_TEXT_HIGHLIGHTED, 70); + DECLARE_COLOR_CONFIG(BUTTON_ITEM_TRANSLUCENT_TEXT_NORMAL, 71); + DECLARE_COLOR_CONFIG(BUTTON_ITEM_TRANSLUCENT_TEXT_DISABLED, 72); + DECLARE_COLOR_CONFIG(BUTTON_ITEM_TRANSLUCENT_TEXT_PRESSED, 73); + DECLARE_COLOR_CONFIG(BUTTON_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED, 74); + DECLARE_COLOR_CONFIG(BACK_ICON_NORMAL, 75); + DECLARE_COLOR_CONFIG(BACK_ICON_DISABLED, 76); + DECLARE_COLOR_CONFIG(BACK_ICON_PRESSED, 77); + DECLARE_COLOR_CONFIG(BACK_ICON_HIGHLIGHTED, 78); + DECLARE_COLOR_CONFIG(SOFTKEY_BG_NORMAL, 79); + DECLARE_COLOR_CONFIG(SOFTKEY_BG_DISABLED, 80); + DECLARE_COLOR_CONFIG(SOFTKEY_BG_PRESSED, 81); + DECLARE_COLOR_CONFIG(SOFTKEY_BG_HIGHLIGHTED, 82); + DECLARE_COLOR_CONFIG(SOFTKEY_TEXT_NORMAL, 83); + DECLARE_COLOR_CONFIG(SOFTKEY_TEXT_DISABLED, 84); + DECLARE_COLOR_CONFIG(SOFTKEY_TEXT_PRESSED, 85); + DECLARE_COLOR_CONFIG(SOFTKEY_TEXT_HIGHLIGHTED, 86); + DECLARE_COLOR_CONFIG(SOFTKEY_ICON_NORMAL, 87); + DECLARE_COLOR_CONFIG(SOFTKEY_ICON_DISABLED, 88); + DECLARE_COLOR_CONFIG(SOFTKEY_ICON_PRESSED, 89); + DECLARE_COLOR_CONFIG(SOFTKEY_ICON_HIGHLIGHTED, 90); + DECLARE_COLOR_CONFIG(DIVIDER_LINE_LEFT_NORMAL, 91); + DECLARE_COLOR_CONFIG(DIVIDER_LINE_RIGHT_NORMAL, 92); + DECLARE_COLOR_CONFIG(DIVIDER_LINE_LEFT_TRANSLUCENT_NORMAL, 93); + DECLARE_COLOR_CONFIG(DIVIDER_LINE_RIGHT_TRANSLUCENT_NORMAL, 94); + DECLARE_COLOR_CONFIG(MORE_ICON_NORMAL, 95); + DECLARE_COLOR_CONFIG(MORE_ICON_DISABLED, 96); + DECLARE_COLOR_CONFIG(MORE_ICON_PRESSED, 97); + DECLARE_COLOR_CONFIG(MORE_ICON_HIGHLIGHTED, 98); + DECLARE_COLOR_CONFIG(SELECTED_BAR_BG_NORMAL, 99); + DECLARE_COLOR_CONFIG(SELECTED_BAR_TRANSLUCENT_BG_NORMAL, 100); + DECLARE_COLOR_CONFIG(TAB_TEXT_DIM_NORMAL, 101); + DECLARE_COLOR_CONFIG(TAB_TEXT_DIM_TRANSLUCENT_NORMAL, 102); + + // BITMAP + DECLARE_IMAGE_CONFIG(BG_NORMAL, 1); + DECLARE_IMAGE_CONFIG(TRANSLUCENT_BG_NORMAL, 2); + DECLARE_IMAGE_CONFIG(BUTTON_BG_NORMAL, 3); + DECLARE_IMAGE_CONFIG(BUTTON_BG_DISABLED, 4); + DECLARE_IMAGE_CONFIG(BUTTON_BG_PRESSED, 5); + DECLARE_IMAGE_CONFIG(BUTTON_BG_HIGHLIGHTED, 6); + //DECLARE_IMAGE_CONFIG(BG_EFFECT_NORMAL, 7); + //DECLARE_IMAGE_CONFIG(BG_EFFECT_PRESSED, 8); + DECLARE_IMAGE_CONFIG(BACK_ICON_NORMAL, 9); + DECLARE_IMAGE_CONFIG(BACK_ICON_DISABLED, 10); + DECLARE_IMAGE_CONFIG(BACK_ICON_PRESSED, 11); + DECLARE_IMAGE_CONFIG(BACK_ICON_HIGHLIGHTED, 12); + DECLARE_IMAGE_CONFIG(BACK_ICON_EFFECT_NORMAL, 13); + DECLARE_IMAGE_CONFIG(BACK_ICON_EFFECT_PRESSED, 14); + DECLARE_IMAGE_CONFIG(BACK_ICON_EFFECT_NORMAL2, 15); + DECLARE_IMAGE_CONFIG(BACK_ICON_EFFECT_PRESSED2, 16); + DECLARE_IMAGE_CONFIG(BACK_ICON_TRANSLUCENT_EFFECT_NORMAL, 17); + DECLARE_IMAGE_CONFIG(BACK_ICON_TRANSLUCENT_EFFECT_PRESSED, 18); + DECLARE_IMAGE_CONFIG(HIDE_ICON_NORMAL, 19); + DECLARE_IMAGE_CONFIG(HIDE_ICON_DISABLED, 20); + DECLARE_IMAGE_CONFIG(HIDE_ICON_PRESSED, 21); + DECLARE_IMAGE_CONFIG(HIDE_ICON_HIGHLIGHTED, 22); + DECLARE_IMAGE_CONFIG(HIDE_ICON_EFFECT_NORMAL, 23); + DECLARE_IMAGE_CONFIG(HIDE_ICON_EFFECT_PRESSED, 24); + DECLARE_IMAGE_CONFIG(HIDE_ICON_EFFECT_NORMAL2, 25); + DECLARE_IMAGE_CONFIG(HIDE_ICON_EFFECT_PRESSED2, 26); + DECLARE_IMAGE_CONFIG(HIDE_ICON_TRANSLUCENT_EFFECT_NORMAL, 27); + DECLARE_IMAGE_CONFIG(HIDE_ICON_TRANSLUCENT_EFFECT_PRESSED, 28); + DECLARE_IMAGE_CONFIG(MORE_ICON_NORMAL, 29); + DECLARE_IMAGE_CONFIG(MORE_ICON_DISABLED, 30); + DECLARE_IMAGE_CONFIG(MORE_ICON_PRESSED, 31); + DECLARE_IMAGE_CONFIG(MORE_ICON_HIGHLIGHTED, 32); + DECLARE_IMAGE_CONFIG(MORE_ICON_EFFECT_NORMAL, 33); + DECLARE_IMAGE_CONFIG(MORE_ICON_EFFECT_PRESSED, 34); + DECLARE_IMAGE_CONFIG(BUTTON_ITEM_BG_NORMAL, 35); + DECLARE_IMAGE_CONFIG(BUTTON_ITEM_BG_DISABLED, 36); + DECLARE_IMAGE_CONFIG(BUTTON_ITEM_BG_PRESSED, 37); + DECLARE_IMAGE_CONFIG(BUTTON_ITEM_BG_HIGHLIGHTED, 38); + DECLARE_IMAGE_CONFIG(BUTTON_ITEM_BG_EFFECT_NORMAL, 39); + DECLARE_IMAGE_CONFIG(BUTTON_ITEM_BG_EFFECT_PRESSED, 40); + DECLARE_IMAGE_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_NORMAL, 41); + DECLARE_IMAGE_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_DISABLED, 42); + DECLARE_IMAGE_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_PRESSED, 43); + DECLARE_IMAGE_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_HIGHLIGHTED, 44); + DECLARE_IMAGE_CONFIG(SOFTKEY_LEFT_BG_NORMAL, 45); + DECLARE_IMAGE_CONFIG(SOFTKEY_LEFT_BG_DISABLED, 46); + DECLARE_IMAGE_CONFIG(SOFTKEY_LEFT_BG_PRESSED, 47); + DECLARE_IMAGE_CONFIG(SOFTKEY_LEFT_BG_HIGHLIGHTED, 48); + DECLARE_IMAGE_CONFIG(SOFTKEY_LEFT_BG_EFFECT_NORMAL, 49); + DECLARE_IMAGE_CONFIG(SOFTKEY_LEFT_BG_EFFECT_PRESSED, 50); + DECLARE_IMAGE_CONFIG(SOFTKEY_RIGHT_BG_NORMAL, 51); + DECLARE_IMAGE_CONFIG(SOFTKEY_RIGHT_BG_DISABLED, 52); + DECLARE_IMAGE_CONFIG(SOFTKEY_RIGHT_BG_PRESSED, 53); + DECLARE_IMAGE_CONFIG(SOFTKEY_RIGHT_BG_HIGHLIGHTED, 54); + DECLARE_IMAGE_CONFIG(SOFTKEY_RIGHT_BG_EFFECT_NORMAL, 55); + DECLARE_IMAGE_CONFIG(SOFTKEY_RIGHT_BG_EFFECT_PRESSED, 56); + DECLARE_IMAGE_CONFIG(SOFTKEY_LEFT_TEXT_BG_NORMAL, 57); + DECLARE_IMAGE_CONFIG(SOFTKEY_LEFT_TEXT_BG_DISABLED, 58); + DECLARE_IMAGE_CONFIG(SOFTKEY_LEFT_TEXT_BG_PRESSED, 59); + DECLARE_IMAGE_CONFIG(SOFTKEY_LEFT_TEXT_BG_HIGHLIGHTED, 60); + DECLARE_IMAGE_CONFIG(SOFTKEY_LEFT_TEXT_BG_EFFECT_NORMAL, 61); + DECLARE_IMAGE_CONFIG(SOFTKEY_LEFT_TEXT_BG_EFFECT_PRESSED, 62); + DECLARE_IMAGE_CONFIG(SOFTKEY_RIGHT_TEXT_BG_NORMAL, 63); + DECLARE_IMAGE_CONFIG(SOFTKEY_RIGHT_TEXT_BG_DISABLED, 64); + DECLARE_IMAGE_CONFIG(SOFTKEY_RIGHT_TEXT_BG_PRESSED, 65); + DECLARE_IMAGE_CONFIG(SOFTKEY_RIGHT_TEXT_BG_HIGHLIGHTED, 66); + DECLARE_IMAGE_CONFIG(SOFTKEY_RIGHT_TEXT_BG_EFFECT_NORMAL, 67); + DECLARE_IMAGE_CONFIG(SOFTKEY_RIGHT_TEXT_BG_EFFECT_PRESSED, 68); + DECLARE_IMAGE_CONFIG(SOFTKEY_ICON_ADD_NORMAL, 69); + DECLARE_IMAGE_CONFIG(SOFTKEY_ICON_ADD_DISABLED, 70); + DECLARE_IMAGE_CONFIG(SOFTKEY_ICON_ADD_PRESSED, 71); + DECLARE_IMAGE_CONFIG(SOFTKEY_ICON_ADD_HIGHLIGHTED, 72); + DECLARE_IMAGE_CONFIG(SOFTKEY_ICON_ZOOM_NORMAL, 73); + DECLARE_IMAGE_CONFIG(SOFTKEY_ICON_ZOOM_DISABLED, 74); + DECLARE_IMAGE_CONFIG(SOFTKEY_ICON_ZOOM_PRESSED, 75); + DECLARE_IMAGE_CONFIG(SOFTKEY_ICON_ZOOM_HIGHLIGHTED, 76); + DECLARE_IMAGE_CONFIG(OPTIONKEY_BG_NORMAL, 77); + DECLARE_IMAGE_CONFIG(OPTIONKEY_BG_DISABLED, 78); + DECLARE_IMAGE_CONFIG(OPTIONKEY_BG_PRESSED, 79); + DECLARE_IMAGE_CONFIG(OPTIONKEY_BG_HIGHLIGHTED, 80); + DECLARE_IMAGE_CONFIG(OPTIONKEY_HANDLE_MORE_NORMAL, 81); + DECLARE_IMAGE_CONFIG(OPTIONKEY_HANDLE_MORE_DISABLED, 82); + DECLARE_IMAGE_CONFIG(OPTIONKEY_HANDLE_MORE_PRESSED, 83); + DECLARE_IMAGE_CONFIG(OPTIONKEY_HANDLE_MORE_HIGHLIGHTED, 84); + DECLARE_IMAGE_CONFIG(OPTIONKEY_BG_EFFECT_NORMAL, 85); + DECLARE_IMAGE_CONFIG(OPTIONKEY_BG_EFFECT_PRESSED, 86); + DECLARE_IMAGE_CONFIG(TAB_ITEM_BOUNCING_EFFECT_LEFT_VERTICAL, 87); + DECLARE_IMAGE_CONFIG(TAB_ITEM_BOUNCING_EFFECT_RIGHT_VERTICAL, 88); + DECLARE_IMAGE_CONFIG(TAB_ITEM_BOUNCING_EFFECT_LEFT_HORIZONTAL, 89); + DECLARE_IMAGE_CONFIG(TAB_ITEM_BOUNCING_EFFECT_RIGHT_HORIZONTAL, 90); + DECLARE_IMAGE_CONFIG(TAB_ITEM_BG_NORMAL, 91); + DECLARE_IMAGE_CONFIG(TAB_ITEM_BG_DISABLED, 92); + DECLARE_IMAGE_CONFIG(TAB_ITEM_BG_PRESSED, 93); + DECLARE_IMAGE_CONFIG(TAB_ITEM_BG_HIGHLIGHTED, 94); + DECLARE_IMAGE_CONFIG(TAB_ITEM_BG_SELECTED, 95); + DECLARE_IMAGE_CONFIG(TAB_ITEM_TRANSLUCENT_BG_NORMAL, 96); + DECLARE_IMAGE_CONFIG(TAB_ITEM_TRANSLUCENT_BG_DISABLED, 97); + DECLARE_IMAGE_CONFIG(TAB_ITEM_TRANSLUCENT_BG_PRESSED, 98); + DECLARE_IMAGE_CONFIG(TAB_ITEM_TRANSLUCENT_BG_SELECTED, 99); + DECLARE_IMAGE_CONFIG(TAB_ITEM_TRANSLUCENT_BG_HIGHLIGHTED, 100); + DECLARE_IMAGE_CONFIG(SEGMENTED_ITEM_BG_NORMAL, 101); + DECLARE_IMAGE_CONFIG(SEGMENTED_ITEM_BG_DISABLED, 102); + DECLARE_IMAGE_CONFIG(SEGMENTED_ITEM_BG_PRESSED, 103); + DECLARE_IMAGE_CONFIG(SEGMENTED_ITEM_BG_SELECTED, 104); + DECLARE_IMAGE_CONFIG(SEGMENTED_ITEM_BG_HIGHLIGHTED, 105); + DECLARE_IMAGE_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_NORMAL, 106); + DECLARE_IMAGE_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_DISABLED, 107); + DECLARE_IMAGE_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_PRESSED, 108); + DECLARE_IMAGE_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_SELECTED, 109); + DECLARE_IMAGE_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_HIGHLIGHTED, 110); + DECLARE_IMAGE_CONFIG(BUTTON_TRANSLUCENT_BG_NORMAL, 111); + DECLARE_IMAGE_CONFIG(BUTTON_TRANSLUCENT_BG_DISABLED, 112); + DECLARE_IMAGE_CONFIG(BUTTON_TRANSLUCENT_BG_PRESSED, 113); + DECLARE_IMAGE_CONFIG(BUTTON_TRANSLUCENT_BG_HIGHLIGHTED, 114); + //DECLARE_IMAGE_CONFIG(TAB_ITEM_BG_EFFECT_PRESSED, 115); + DECLARE_IMAGE_CONFIG(TAB_ITEM_SELECTED, 116); + + DECLARE_IMAGE_CONFIG(BG_EFFECT_NORMAL, 117); + DECLARE_IMAGE_CONFIG(TRANSLUCENT_BG_EFFECT_NORMAL, 118); + + DECLARE_IMAGE_CONFIG(BUTTON_BG_EFFECT_NORMAL, 119); + DECLARE_IMAGE_CONFIG(BUTTON_BG_EFFECT_PRESSED, 120); + DECLARE_IMAGE_CONFIG(BUTTON_TRANSLUCENT_BG_EFFECT_NORMAL, 121); + DECLARE_IMAGE_CONFIG(BUTTON_TRANSLUCENT_BG_EFFECT_PRESSED, 122); + + DECLARE_IMAGE_CONFIG(SEGMENTED_ITEM_BG_EFFECT_NORMAL, 123); + DECLARE_IMAGE_CONFIG(SEGMENTED_ITEM_BG_EFFECT_PRESSED, 124); + DECLARE_IMAGE_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_EFFECT_NORMAL, 125); + DECLARE_IMAGE_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_EFFECT_PRESSED, 126); + + DECLARE_IMAGE_CONFIG(TAB_ITEM_BG_EFFECT_NORMAL, 127); + DECLARE_IMAGE_CONFIG(TAB_ITEM_BG_EFFECT_PRESSED, 128); + DECLARE_IMAGE_CONFIG(TAB_ITEM_TRANSLUCENT_BG_EFFECT_NORMAL, 129); + DECLARE_IMAGE_CONFIG(TAB_ITEM_TRANSLUCENT_BG_EFFECT_PRESSED, 130); + + DECLARE_IMAGE_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_EFFECT_NORMAL, 131); + DECLARE_IMAGE_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_EFFECT_PRESSED, 132); + + DECLARE_IMAGE_CONFIG(TAB_TEXT_DIM_EFFECT_LEFT, 133); + DECLARE_IMAGE_CONFIG(TAB_TEXT_DIM_EFFECT_RIGHT, 134); + + //SHAPE + DECLARE_SHAPE_CONFIG(HEIGHT, 1); + DECLARE_SHAPE_CONFIG(WIDTH, 2); + DECLARE_SHAPE_CONFIG(LEFT_MARGIN, 3); + DECLARE_SHAPE_CONFIG(VERTICAL_MARGIN, 4); + DECLARE_SHAPE_CONFIG(BUTTON_ITEM_FONT_SIZE, 5); + DECLARE_SHAPE_CONFIG(FOOTER_ITEM_FONT_SIZE, 6); + DECLARE_SHAPE_CONFIG(FOOTER_ITEM_ICON_SIZE, 7); + DECLARE_SHAPE_CONFIG(FOOTER_ITEM_BUTTON_STYLE_ICON_SIZE, 8); + DECLARE_SHAPE_CONFIG(FOOTER_ITEM_BUTTON_STYLE_ICON_SIZE_WITH_TEXT, 9); + DECLARE_SHAPE_CONFIG(FOOTER_ITEM_BUTTON_STYLE_SIDE_MARGIN, 10); + DECLARE_SHAPE_CONFIG(FOOTER_ITEM_BUTTON_STYLE_ITEM_GAP, 11); + DECLARE_SHAPE_CONFIG(FOOTER_ITEM_TEXT_TOP_MARGIN, 12); + DECLARE_SHAPE_CONFIG(FOOTER_ITEM_TEXT_LEFT_MARGIN, 13); + DECLARE_SHAPE_CONFIG(ITEM_MINIMUM_WIDTH, 14); + DECLARE_SHAPE_CONFIG(COMMON_MINIMUM_MARGIN, 15); + DECLARE_SHAPE_CONFIG(BUTTON_ITEM_TEXT_HEIGHT, 16); + DECLARE_SHAPE_CONFIG(BUTTON_ITEM_TEXT_LEFT_MARGIN, 17); + DECLARE_SHAPE_CONFIG(BUTTON_ITEM_TEXT_TOP_MARGIN, 18); + DECLARE_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_3, 19); + DECLARE_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_4, 20); + DECLARE_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_5, 21); + DECLARE_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_3_WITH_ICON, 22); + DECLARE_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_4_WITH_ICON, 23); + DECLARE_SHAPE_CONFIG(BUTTON_ITEM_TEXT_FONT_SIZE_ITEM_5_WITH_ICON, 24); + DECLARE_SHAPE_CONFIG(SEGMENTED_ITEM_FONT_SIZE, 25); + DECLARE_SHAPE_CONFIG(SEGMENTED_ICON_TEXT_GAP, 26); + DECLARE_SHAPE_CONFIG(FOOTER_ITEM_WIDTH_1_MAX, 27); + DECLARE_SHAPE_CONFIG(FOOTER_ITEM_WIDTH_1_MIN, 28); + DECLARE_SHAPE_CONFIG(FOOTER_ITEM_WIDTH_2_MAX, 29); + DECLARE_SHAPE_CONFIG(FOOTER_ITEM_WIDTH_2_MIN, 30); + DECLARE_SHAPE_CONFIG(BUTTON_ITEM_WIDTH, 31); + DECLARE_SHAPE_CONFIG(BUTTON_ITEM_HEIGHT, 32); + DECLARE_SHAPE_CONFIG(BUTTON_ITEM_ICON_SIZE, 33); + //DECLARE_SHAPE_CONFIG(BUTTON_ITEM_LEFT_TOUCH_MARGIN, 34); + //DECLARE_SHAPE_CONFIG(BUTTON_ITEM_TOP_TOUCH_MARGIN, 35); + //DECLARE_SHAPE_CONFIG(BUTTON_ITEM_RIGHT_TOUCH_MARGIN, 36); + //DECLARE_SHAPE_CONFIG(BUTTON_ITEM_BOTTOM_TOUCH_MARGIN, 37); + DECLARE_SHAPE_CONFIG(SOFTKEY_HEIGHT, 38); + DECLARE_SHAPE_CONFIG(SOFTKEY_TEXT_SIZE, 39); + DECLARE_SHAPE_CONFIG(SOFTKEY_0_LEFT_MARGIN, 40); + DECLARE_SHAPE_CONFIG(SOFTKEY_TOP_MARGIN, 41); + DECLARE_SHAPE_CONFIG(SOFTKEY_1_LEFT_MARGIN, 42); + DECLARE_SHAPE_CONFIG(SOFTKEY_ICON_SIZE, 43); + 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); + DECLARE_DIMENSION_CONFIG(SOFTKEY_DISPLAY_RECT_WITH_TEXT, 3); + DECLARE_DIMENSION_CONFIG(OPTIONKEY_RECT, 4); +DECLARE_END_UI_CONFIG(FOOTER); + +#endif //_FUI_RESOURCE_FOOTER_CONFIG_H_ diff --git a/src/ui/inc/FUi_ResourceFormConfig.h b/src/ui/inc/FUi_ResourceFormConfig.h new file mode 100644 index 0000000..b67ca4b --- /dev/null +++ b/src/ui/inc/FUi_ResourceFormConfig.h @@ -0,0 +1,36 @@ +// +// 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_ResourceFormConfig.h + * @brief This is the implementation file for the color properties of Form. + */ +#ifndef _FUI_RESOURCE_FORM_CONFIG_H_ +#define _FUI_RESOURCE_FORM_CONFIG_H_ + +#include "FUi_ResourceConfigMacro.h" + +DECLARE_UI_CONFIG(FORM); + DECLARE_COLOR_CONFIG(BG_NORMAL, 1) + DECLARE_COLOR_CONFIG(INDICATOR_BG_NORMAL, 2) + DECLARE_SHAPE_CONFIG(INDICATOR_WIDTH, 1) + 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_ResourceGalleryConfig.h b/src/ui/inc/FUi_ResourceGalleryConfig.h new file mode 100644 index 0000000..a0f650e --- /dev/null +++ b/src/ui/inc/FUi_ResourceGalleryConfig.h @@ -0,0 +1,33 @@ +// +// 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_ResourceGalleryConfig.h + * @brief This is the implementation file for the properties of Gallery. + */ +#ifndef _FUI_RESOURCE_GALLERY_CONFIG_H_ +#define _FUI_RESOURCE_GALLERY_CONFIG_H_ + +#include "FUi_ResourceConfigMacro.h" + +DECLARE_UI_CONFIG(GALLERY); +// Color config + DECLARE_COLOR_CONFIG(EMPTY_TEXT_NORMAL, 1); +// Shape config + DECLARE_SHAPE_CONFIG(EMPTY_FONT_SIZE, 1); +DECLARE_END_UI_CONFIG(GALLERY); + +#endif //_FUI_RESOURCE_GALLERY_CONFIG_H_ diff --git a/src/ui/inc/FUi_ResourceGroupContainerConfig.h b/src/ui/inc/FUi_ResourceGroupContainerConfig.h new file mode 100644 index 0000000..3885e09 --- /dev/null +++ b/src/ui/inc/FUi_ResourceGroupContainerConfig.h @@ -0,0 +1,37 @@ +// +// 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_ResourceGroupContainerConfig.h + * @brief This is the implementation file for the properties of GroupContainer. + */ +#ifndef _FUI_RESOURCE_GROUP_CONTAINER_CONFIG_H_ +#define _FUI_RESOURCE_GROUP_CONTAINER_CONFIG_H_ + +#include "FUi_ResourceConfigMacro.h" + +DECLARE_UI_CONFIG(GROUPCONTAINER); + DECLARE_COLOR_CONFIG(NORMAL_BG, 1); + DECLARE_COLOR_CONFIG(LINE_COLOR_FG, 2); + DECLARE_IMAGE_CONFIG(BORDER_BG_EFFECT, 1); + DECLARE_IMAGE_CONFIG(SYSTEM_CONTROL_BG, 2); + DECLARE_IMAGE_CONFIG(BG_NORMAL, 3); + DECLARE_FIXED_VALUE_CONFIG(DEFAULT_MARGIN, 1); + DECLARE_DIMENSION_CONFIG(MIN_SIZE, 1); +DECLARE_END_UI_CONFIG(GROUPCONTAINER); + +#endif //_FUI_RESOURCE_GROUP_CONTAINER_CONFIG_H_ \ No newline at end of file diff --git a/src/ui/inc/FUi_ResourceHeaderConfig.h b/src/ui/inc/FUi_ResourceHeaderConfig.h new file mode 100644 index 0000000..0b2b501 --- /dev/null +++ b/src/ui/inc/FUi_ResourceHeaderConfig.h @@ -0,0 +1,307 @@ +// +// 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_ResourceHeaderConfig.h + * @brief This is the implementation file for the properties of Header. + */ +#ifndef _FUI_RESOURCE_HEADER_CONFIG_H_ +#define _FUI_RESOURCE_HEADER_CONFIG_H_ + +#include "FUi_ResourceConfigMacro.h" + +DECLARE_UI_CONFIG(HEADER); + // COLOR + DECLARE_COLOR_CONFIG(BG_NORMAL, 1); + DECLARE_COLOR_CONFIG(TRANSLUCENT_BG_NORMAL, 2); + DECLARE_COLOR_CONFIG(TITLE_TEXT_NORMAL, 3); + DECLARE_COLOR_CONFIG(TRANSLUCENT_TITLE_TEXT_NORMAL, 4); + DECLARE_COLOR_CONFIG(DESCRIPTION_TEXT_NORMAL, 5); + DECLARE_COLOR_CONFIG(TRANSLUCENT_DESCRIPTION_TEXT_NORMAL, 6); + DECLARE_COLOR_CONFIG(BUTTON_BG_NORMAL, 7); + DECLARE_COLOR_CONFIG(BUTTON_BG_DISABLED, 8); + DECLARE_COLOR_CONFIG(BUTTON_BG_PRESSED, 9); + DECLARE_COLOR_CONFIG(BUTTON_BG_HIGHLIGHTED, 10); + DECLARE_COLOR_CONFIG(BUTTON_TRANSLUCENT_BG_NORMAL, 11); + DECLARE_COLOR_CONFIG(BUTTON_TRANSLUCENT_BG_DISABLED, 12); + DECLARE_COLOR_CONFIG(BUTTON_TRANSLUCENT_BG_PRESSED, 13); + DECLARE_COLOR_CONFIG(BUTTON_TRANSLUCENT_BG_HIGHLIGHTED, 14); + DECLARE_COLOR_CONFIG(BUTTON_TEXT_NORMAL, 15); + DECLARE_COLOR_CONFIG(BUTTON_TEXT_DISABLED, 16); + DECLARE_COLOR_CONFIG(BUTTON_TEXT_PRESSED, 17); + DECLARE_COLOR_CONFIG(BUTTON_TEXT_HIGHLIGHTED, 18); + DECLARE_COLOR_CONFIG(BUTTON_TRANSLUCENT_TEXT_NORMAL, 19); + DECLARE_COLOR_CONFIG(BUTTON_TRANSLUCENT_TEXT_DISABLED, 20); + DECLARE_COLOR_CONFIG(BUTTON_TRANSLUCENT_TEXT_PRESSED, 21); + DECLARE_COLOR_CONFIG(BUTTON_TRANSLUCENT_TEXT_HIGHLIGHTED, 22); + DECLARE_COLOR_CONFIG(SEGMENTED_ITEM_BG_NORMAL, 23); + DECLARE_COLOR_CONFIG(SEGMENTED_ITEM_BG_DISABLED, 24); + DECLARE_COLOR_CONFIG(SEGMENTED_ITEM_BG_PRESSED, 25); + DECLARE_COLOR_CONFIG(SEGMENTED_ITEM_BG_HIGHLIGHTED, 26); + DECLARE_COLOR_CONFIG(SEGMENTED_ITEM_BG_SELECTED, 27); + DECLARE_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_NORMAL, 28); + DECLARE_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_DISABLED, 29); + DECLARE_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_PRESSED, 30); + DECLARE_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_HIGHLIGHTED, 31); + DECLARE_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_SELECTED, 32); + DECLARE_COLOR_CONFIG(SEGMENTED_ITEM_TEXT_NORMAL, 33); + DECLARE_COLOR_CONFIG(SEGMENTED_ITEM_TEXT_DISABLED, 34); + DECLARE_COLOR_CONFIG(SEGMENTED_ITEM_TEXT_PRESSED, 35); + DECLARE_COLOR_CONFIG(SEGMENTED_ITEM_TEXT_HIGHLIGHTED, 36); + DECLARE_COLOR_CONFIG(SEGMENTED_ITEM_TEXT_SELECTED, 37); + DECLARE_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_TEXT_NORMAL, 38); + DECLARE_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_TEXT_DISABLED, 39); + DECLARE_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_TEXT_PRESSED, 40); + DECLARE_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED, 41); + DECLARE_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_TEXT_SELECTED, 42); + DECLARE_COLOR_CONFIG(TAB_ITEM_BG_NORMAL, 43); + DECLARE_COLOR_CONFIG(TAB_ITEM_BG_DISABLED, 44); + DECLARE_COLOR_CONFIG(TAB_ITEM_BG_PRESSED, 45); + DECLARE_COLOR_CONFIG(TAB_ITEM_BG_HIGHLIGHTED, 46); + DECLARE_COLOR_CONFIG(TAB_ITEM_BG_SELECTED, 47); + DECLARE_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_BG_NORMAL, 48); + DECLARE_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_BG_DISABLED, 49); + DECLARE_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_BG_PRESSED, 50); + DECLARE_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_BG_HIGHLIGHTED, 51); + DECLARE_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_BG_SELECTED, 52); + DECLARE_COLOR_CONFIG(TAB_ITEM_TEXT_NORMAL, 53); + DECLARE_COLOR_CONFIG(TAB_ITEM_TEXT_DISABLED, 54); + DECLARE_COLOR_CONFIG(TAB_ITEM_TEXT_PRESSED, 55); + DECLARE_COLOR_CONFIG(TAB_ITEM_TEXT_HIGHLIGHTED, 56); + DECLARE_COLOR_CONFIG(TAB_ITEM_TEXT_SELECTED, 57); + DECLARE_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_TEXT_NORMAL, 58); + DECLARE_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_TEXT_DISABLED, 59); + DECLARE_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_TEXT_PRESSED, 60); + DECLARE_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED, 61); + DECLARE_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_TEXT_SELECTED, 62); + DECLARE_COLOR_CONFIG(BADGE_ICON_BG_NORMAL, 63); + //DECLARE_COLOR_CONFIG(BADGE_ICON_BG_DISABLED, 64); + //DECLARE_COLOR_CONFIG(BADGE_ICON_BG_PRESSED, 65); + //DECLARE_COLOR_CONFIG(BADGE_ICON_BG_HIGHLIGHTED, 66); + DECLARE_COLOR_CONFIG(BADGE_ICON_TEXT_NORMAL, 67); + //DECLARE_COLOR_CONFIG(BADGE_ICON_TEXT_DISABLED, 68); + //DECLARE_COLOR_CONFIG(BADGE_ICON_TEXT_PRESSED, 69); + //DECLARE_COLOR_CONFIG(BADGE_ICON_TEXT_HIGHLIGHTED, 70); + DECLARE_COLOR_CONFIG(DIVIDER_LINE_LEFT_NORMAL, 71); + DECLARE_COLOR_CONFIG(DIVIDER_LINE_RIGHT_NORMAL, 72); + DECLARE_COLOR_CONFIG(DIVIDER_LINE_LEFT_TRANSLUCENT_NORMAL, 73); + DECLARE_COLOR_CONFIG(DIVIDER_LINE_RIGHT_TRANSLUCENT_NORMAL, 74); + DECLARE_COLOR_CONFIG(BUTTON_ITEM_BG_NORMAL, 75); + DECLARE_COLOR_CONFIG(BUTTON_ITEM_BG_DISABLED, 76); + DECLARE_COLOR_CONFIG(BUTTON_ITEM_BG_PRESSED, 77); + DECLARE_COLOR_CONFIG(BUTTON_ITEM_BG_HIGHLIGHTED, 78); + DECLARE_COLOR_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_NORMAL, 79); + DECLARE_COLOR_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_DISABLED, 80); + DECLARE_COLOR_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_PRESSED, 81); + DECLARE_COLOR_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_HIGHLIGHTED, 82); + DECLARE_COLOR_CONFIG(BUTTON_ITEM_TEXT_NORMAL, 83); + DECLARE_COLOR_CONFIG(BUTTON_ITEM_TEXT_DISABLED, 84); + DECLARE_COLOR_CONFIG(BUTTON_ITEM_TEXT_PRESSED, 85); + DECLARE_COLOR_CONFIG(BUTTON_ITEM_TEXT_HIGHLIGHTED, 86); + DECLARE_COLOR_CONFIG(BUTTON_ITEM_TRANSLUCENT_TEXT_NORMAL, 87); + DECLARE_COLOR_CONFIG(BUTTON_ITEM_TRANSLUCENT_TEXT_DISABLED, 88); + DECLARE_COLOR_CONFIG(BUTTON_ITEM_TRANSLUCENT_TEXT_PRESSED, 89); + DECLARE_COLOR_CONFIG(BUTTON_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED, 90); + DECLARE_COLOR_CONFIG(SELECTED_BAR_BG_NORMAL, 91); + DECLARE_COLOR_CONFIG(SELECTED_BAR_TRANSLUCENT_BG_NORMAL, 92); + DECLARE_COLOR_CONFIG(BOUNCING_EFFECT, 93); + DECLARE_COLOR_CONFIG(TAB_TEXT_DIM_NORMAL, 94); + DECLARE_COLOR_CONFIG(TAB_TEXT_DIM_TRANSLUCENT_NORMAL, 95); + DECLARE_COLOR_CONFIG(SUB_TITLE_EFFECT_NORMAL, 96); + DECLARE_COLOR_CONFIG(TITLE_TEXT_DIM_NORMAL, 97); + DECLARE_COLOR_CONFIG(TITLE_TEXT_DIM_TRANSLUCENT_NORMAL, 98); + + // BITMAP + DECLARE_IMAGE_CONFIG(BG_NORMAL, 1); + DECLARE_IMAGE_CONFIG(TRANSLUCENT_BG_NORMAL, 2); + DECLARE_IMAGE_CONFIG(BUTTON_BG_NORMAL, 3); + DECLARE_IMAGE_CONFIG(BUTTON_BG_DISABLED, 4); + DECLARE_IMAGE_CONFIG(BUTTON_BG_PRESSED, 5); + DECLARE_IMAGE_CONFIG(BUTTON_BG_HIGHLIGHTED, 6); + //DECLARE_IMAGE_CONFIG(TAB_ITEM_BG_EFFECT_PRESSED, 7); + DECLARE_IMAGE_CONFIG(TAB_ITEM_SELECTED, 8); + DECLARE_IMAGE_CONFIG(TAB_ITEM_BOUNCING_EFFECT_LEFT_VERTICAL, 9); + DECLARE_IMAGE_CONFIG(TAB_ITEM_BOUNCING_EFFECT_RIGHT_VERTICAL, 10); + DECLARE_IMAGE_CONFIG(TAB_ITEM_BOUNCING_EFFECT_LEFT_HORIZONTAL, 11); + DECLARE_IMAGE_CONFIG(TAB_ITEM_BOUNCING_EFFECT_RIGHT_HORIZONTAL, 12); + DECLARE_IMAGE_CONFIG(TITLE_TAB_ITEM_BOUNCING_EFFECT_LEFT, 13); + DECLARE_IMAGE_CONFIG(TITLE_TAB_ITEM_BOUNCING_EFFECT_RIGHT, 14); + DECLARE_IMAGE_CONFIG(BADGE_ICON_BG_NORMAL, 15); + //DECLARE_IMAGE_CONFIG(BADGE_ICON_BG_DISABLED, 16); + //DECLARE_IMAGE_CONFIG(BADGE_ICON_BG_PRESSED, 17); + //DECLARE_IMAGE_CONFIG(BADGE_ICON_BG_HIGHLIGHTED, 18); + DECLARE_IMAGE_CONFIG(BADGE_ICON_BG_EFFECT_NORMAL, 19); + //DECLARE_IMAGE_CONFIG(BADGE_ICON_BG_EFFECT_PRESSED, 20); + DECLARE_IMAGE_CONFIG(DIVIDER_LINE_NORMAL, 21); + DECLARE_IMAGE_CONFIG(DIVIDER_LINE_TRANSLUCENT_NORMAL, 22); + DECLARE_IMAGE_CONFIG(TAB_ITEM_BG_NORMAL, 23); + DECLARE_IMAGE_CONFIG(TAB_ITEM_BG_DISABLED, 24); + DECLARE_IMAGE_CONFIG(TAB_ITEM_BG_PRESSED, 25); + DECLARE_IMAGE_CONFIG(TAB_ITEM_BG_SELECTED, 26); + DECLARE_IMAGE_CONFIG(TAB_ITEM_BG_HIGHLIGHTED, 27); + DECLARE_IMAGE_CONFIG(TAB_ITEM_TRANSLUCENT_BG_NORMAL, 28); + DECLARE_IMAGE_CONFIG(TAB_ITEM_TRANSLUCENT_BG_DISABLED, 29); + DECLARE_IMAGE_CONFIG(TAB_ITEM_TRANSLUCENT_BG_PRESSED, 30); + DECLARE_IMAGE_CONFIG(TAB_ITEM_TRANSLUCENT_BG_SELECTED, 31); + DECLARE_IMAGE_CONFIG(TAB_ITEM_TRANSLUCENT_BG_HIGHLIGHTED, 32); + DECLARE_IMAGE_CONFIG(SEGMENTED_ITEM_BG_NORMAL, 33); + DECLARE_IMAGE_CONFIG(SEGMENTED_ITEM_BG_DISABLED, 34); + DECLARE_IMAGE_CONFIG(SEGMENTED_ITEM_BG_PRESSED, 35); + DECLARE_IMAGE_CONFIG(SEGMENTED_ITEM_BG_SELECTED, 36); + DECLARE_IMAGE_CONFIG(SEGMENTED_ITEM_BG_HIGHLIGHTED, 37); + DECLARE_IMAGE_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_NORMAL, 38); + DECLARE_IMAGE_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_DISABLED, 39); + DECLARE_IMAGE_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_PRESSED, 40); + DECLARE_IMAGE_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_SELECTED, 41); + DECLARE_IMAGE_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_HIGHLIGHTED, 42); + DECLARE_IMAGE_CONFIG(BUTTON_TRANSLUCENT_BG_NORMAL, 43); + DECLARE_IMAGE_CONFIG(BUTTON_TRANSLUCENT_BG_DISABLED, 44); + DECLARE_IMAGE_CONFIG(BUTTON_TRANSLUCENT_BG_PRESSED, 45); + DECLARE_IMAGE_CONFIG(BUTTON_TRANSLUCENT_BG_HIGHLIGHTED, 46); + DECLARE_IMAGE_CONFIG(BUTTON_ITEM_BG_NORMAL, 47); + DECLARE_IMAGE_CONFIG(BUTTON_ITEM_BG_DISABLED, 48); + DECLARE_IMAGE_CONFIG(BUTTON_ITEM_BG_PRESSED, 49); + DECLARE_IMAGE_CONFIG(BUTTON_ITEM_BG_HIGHLIGHTED, 50); + DECLARE_IMAGE_CONFIG(BUTTON_ITEM_BG_EFFECT_NORMAL, 51); + DECLARE_IMAGE_CONFIG(BUTTON_ITEM_BG_EFFECT_PRESSED, 52); + DECLARE_IMAGE_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_NORMAL, 53); + DECLARE_IMAGE_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_DISABLED, 55); + DECLARE_IMAGE_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_PRESSED, 56); + DECLARE_IMAGE_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_HIGHLIGHTED, 57); + + DECLARE_IMAGE_CONFIG(BG_EFFECT_NORMAL, 58); + DECLARE_IMAGE_CONFIG(TRANSLUCENT_BG_EFFECT_NORMAL, 59); + + DECLARE_IMAGE_CONFIG(BUTTON_BG_EFFECT_NORMAL, 60); + DECLARE_IMAGE_CONFIG(BUTTON_BG_EFFECT_PRESSED, 61); + DECLARE_IMAGE_CONFIG(BUTTON_TRANSLUCENT_BG_EFFECT_NORMAL, 62); + DECLARE_IMAGE_CONFIG(BUTTON_TRANSLUCENT_BG_EFFECT_PRESSED, 63); + + DECLARE_IMAGE_CONFIG(SEGMENTED_ITEM_BG_EFFECT_NORMAL, 64); + DECLARE_IMAGE_CONFIG(SEGMENTED_ITEM_BG_EFFECT_PRESSED, 65); + DECLARE_IMAGE_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_EFFECT_NORMAL, 66); + DECLARE_IMAGE_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_EFFECT_PRESSED, 67); + + DECLARE_IMAGE_CONFIG(TAB_ITEM_BG_EFFECT_NORMAL, 68); + DECLARE_IMAGE_CONFIG(TAB_ITEM_BG_EFFECT_PRESSED, 69); + DECLARE_IMAGE_CONFIG(TAB_ITEM_TRANSLUCENT_BG_EFFECT_NORMAL, 70); + DECLARE_IMAGE_CONFIG(TAB_ITEM_TRANSLUCENT_BG_EFFECT_PRESSED, 71); + + DECLARE_IMAGE_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_EFFECT_NORMAL, 72); + DECLARE_IMAGE_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_EFFECT_PRESSED, 73); + + DECLARE_IMAGE_CONFIG(TAB_LARGE_ITEM_BOUNCING_EFFECT_LEFT, 74); + DECLARE_IMAGE_CONFIG(TAB_LARGE_ITEM_BOUNCING_EFFECT_RIGHT, 75); + + DECLARE_IMAGE_CONFIG(TITLE_TEXT_DIM_EFFECT_LEFT, 76); + DECLARE_IMAGE_CONFIG(TITLE_TEXT_DIM_EFFECT_RIGHT, 77); + + DECLARE_IMAGE_CONFIG(TAB_TEXT_DIM_EFFECT_LEFT, 78); + DECLARE_IMAGE_CONFIG(TAB_TEXT_DIM_EFFECT_RIGHT, 79); + + DECLARE_IMAGE_CONFIG(SUB_TITLE_EFFECT, 80); + + + DECLARE_ANIMATION_CONFIG(PROCESSING_ANIMATION, 1); + DECLARE_SHAPE_CONFIG(HEIGHT, 1); + DECLARE_SHAPE_CONFIG(WIDTH, 2); + DECLARE_SHAPE_CONFIG(LEFT_MARGIN, 3); + DECLARE_SHAPE_CONFIG(TOP_MARGIN, 4); + DECLARE_SHAPE_CONFIG(RIGHT_MARGIN, 5); + DECLARE_SHAPE_CONFIG(TITLE_FONT_SIZE, 6); + DECLARE_SHAPE_CONFIG(TITLE_FONT_SIZE_WITH_DESCRIPTION, 7); + DECLARE_SHAPE_CONFIG(TITLE_FONT_SIZE_WITH_SEGMENTED, 8); + DECLARE_SHAPE_CONFIG(DESCRIPTION_TEXT_FONT_SIZE, 9); + DECLARE_SHAPE_CONFIG(BUTTON_ITEM_FONT_SIZE, 10); + DECLARE_SHAPE_CONFIG(SEGMENTED_ITEM_FONT_SIZE, 11); + DECLARE_SHAPE_CONFIG(TAB_ITEM_FONT_SIZE, 12); + 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(TITLE_DISPLAY_HEIGHT, 18); + DECLARE_SHAPE_CONFIG(TITLE_TOP_MARGIN_WITH_DESCRIPTION, 19); + DECLARE_SHAPE_CONFIG(TITLE_DISPLAY_HEIGHT_WITH_DESCRIPTION, 20); + DECLARE_SHAPE_CONFIG(TITLE_TOTAL_HEIGHT_WITH_SEGMENTED_ITEM, 21); + DECLARE_SHAPE_CONFIG(TITLE_TOP_MARGIN_WITH_SEGMENTED_ITEM, 22); + DECLARE_SHAPE_CONFIG(TITLE_HEIGHT_WITH_SEGMENTED_ITEM, 23); + DECLARE_SHAPE_CONFIG(TITLE_DISPLAY_HEIGHT_WITH_SEGMENTED_ITEM, 24); + DECLARE_SHAPE_CONFIG(DESCRIPTION_TEXT_HEIGHT, 25); + DECLARE_SHAPE_CONFIG(BUTTON_ITEM_WIDTH, 26); + DECLARE_SHAPE_CONFIG(BUTTON_ITEM_WIDTH_WITH_TEXT, 27); + DECLARE_SHAPE_CONFIG(BUTTON_ITEM_HEIGHT, 28); + DECLARE_SHAPE_CONFIG(BUTTON_ITEM_GAP, 29); + DECLARE_SHAPE_CONFIG(BUTTON_ITEM_TOP_MARGIN, 30); + //DECLARE_SHAPE_CONFIG(BUTTON_ITEM_ICON_TOP_MARGIN, 31); + DECLARE_SHAPE_CONFIG(BUTTON_ITEM_ICON_SIZE, 32); + //DECLARE_SHAPE_CONFIG(BUTTON_ITEM_LEFT_TOUCH_MARGIN, 33); + //DECLARE_SHAPE_CONFIG(BUTTON_ITEM_TOP_TOUCH_MARGIN, 34); + //DECLARE_SHAPE_CONFIG(BUTTON_ITEM_RIGHT_TOUCH_MARGIN, 35); + //DECLARE_SHAPE_CONFIG(BUTTON_ITEM_BOTTOM_TOUCH_MARGIN, 36); + //DECLARE_SHAPE_CONFIG(SIP_BUTTON_ITEM_LEFT_TOUCH_MARGIN, 37); + //DECLARE_SHAPE_CONFIG(SIP_BUTTON_ITEM_TOP_TOUCH_MARGIN, 38); + //DECLARE_SHAPE_CONFIG(SIP_BUTTON_ITEM_RIGHT_TOUCH_MARGIN, 39); + //DECLARE_SHAPE_CONFIG(SIP_BUTTON_ITEM_BOTTOM_TOUCH_MARGIN, 40); + DECLARE_SHAPE_CONFIG(SEGMENTED_ITEM_HEIGHT, 41); + DECLARE_SHAPE_CONFIG(TAB_ITEM_ICON_SIZE, 42); + DECLARE_SHAPE_CONFIG(TAB_ITEM_ICON_SIZE_WITH_TEXT, 43); + //DECLARE_SHAPE_CONFIG(TAB_LEFT_MARGIN, 44); + DECLARE_SHAPE_CONFIG(SIP_BUTTON_ITEM_TOP_MARGIN, 45); + DECLARE_SHAPE_CONFIG(SIP_FOOTER_ITEM_TOP_MARGIN, 46); + DECLARE_SHAPE_CONFIG(ICON_WIDTH, 47); + DECLARE_SHAPE_CONFIG(ICON_TEXT_GAP, 48); + 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(TITLE_BADGE_ICON_GAP, 58); + DECLARE_SHAPE_CONFIG(TITLE_BADGE_TOP_MARGIN, 59); + DECLARE_SHAPE_CONFIG(HEADER_ITEM_SELECTED_BITMAP_MARGIN, 60); + DECLARE_SHAPE_CONFIG(HEADER_ITEM_SELECTED_BITMAP_HEIGHT, 61); + DECLARE_SHAPE_CONFIG(PROCESSING_ANIMATION_ICON_SIZE, 62); + DECLARE_SHAPE_CONFIG(PROCESSING_ANIMATION_ICON_GAP, 63); + DECLARE_SHAPE_CONFIG(TITLE_MINIMUM_WIDTH, 64); + DECLARE_SHAPE_CONFIG(ITEM_MINIMUM_WIDTH, 65); + DECLARE_SHAPE_CONFIG(COMMON_MINIMUM_MARGIN, 66); + DECLARE_SHAPE_CONFIG(BUTTON_ITEM_MULTILINE_FONT_SIZE, 67); + DECLARE_SHAPE_CONFIG(SEGMENTED_ITEM_FONT_SIZE_3_ITEM, 68); + DECLARE_SHAPE_CONFIG(SEGMENTED_ITEM_FONT_SIZE_4_ITEM, 69); + DECLARE_SHAPE_CONFIG(SEGMENTED_ITEM_MULTILINE_FONT_SIZE, 70); + DECLARE_SHAPE_CONFIG(TAB_ITEM_MULTILINE_FONT_SIZE, 71); + DECLARE_SHAPE_CONFIG(TAB_LARGE_HEIGHT, 72); + DECLARE_SHAPE_CONFIG(TAB_LARGE_TOP_MARGIN, 73); + DECLARE_SHAPE_CONFIG(TAB_LARGE_TEXT_HEIGHT, 74); + DECLARE_SHAPE_CONFIG(TAB_LARGE_DIVIDER_HEIGHT, 75); + DECLARE_SHAPE_CONFIG(BUTTON_ITEM_MARGIN_WITH_TEXT, 76); + DECLARE_SHAPE_CONFIG(TAB_TEXT_DIM_WIDTH, 77); + DECLARE_SHAPE_CONFIG(TITLE_TEXT_DIM_WIDTH, 78); + DECLARE_SHAPE_CONFIG(ICON_RIGHT_MARGIN, 79); + //DECLARE_SHAPE_CONFIG(TAB_BUTTON_ITEM_LEFT_TOUCH_MARGIN, 80); + //DECLARE_SHAPE_CONFIG(TAB_BUTTON_ITEM_TOP_TOUCH_MARGIN, 81); + //DECLARE_SHAPE_CONFIG(TAB_BUTTON_ITEM_RIGHT_TOUCH_MARGIN, 82); + //DECLARE_SHAPE_CONFIG(TAB_BUTTON_ITEM_BOTTOM_TOUCH_MARGIN, 83); + DECLARE_SHAPE_CONFIG(BADGE_MIN_WIDTH, 84); + DECLARE_SHAPE_CONFIG(BADGE_SIDE_MARGIN, 85); + +DECLARE_END_UI_CONFIG(HEADER); + +#endif //_FUI_RESOURCE_HEADER_CONFIG_H_ diff --git a/src/ui/inc/FUi_ResourceIconListConfig.h b/src/ui/inc/FUi_ResourceIconListConfig.h new file mode 100644 index 0000000..54ce26c --- /dev/null +++ b/src/ui/inc/FUi_ResourceIconListConfig.h @@ -0,0 +1,83 @@ +// +// 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_ResourceIconListConfig.h + * @brief This is the implementation file for the shape and color properties of IconListView. + */ +#ifndef _FUI_RESOURCE_ICONLIST_CONFIG_H_ +#define _FUI_RESOURCE_ICONLIST_CONFIG_H_ + +#include "FUi_ResourceConfigMacro.h" + +DECLARE_UI_CONFIG(ICONLIST); + DECLARE_COLOR_CONFIG(EMPTY_TEXT_NORMAL, 1); + DECLARE_COLOR_CONFIG(TEXT_NORMAL, 2); + DECLARE_COLOR_CONFIG(TEXT_PRESSED, 3); + DECLARE_COLOR_CONFIG(TEXT_HIGHLIGHTED, 4); + DECLARE_COLOR_CONFIG(INNER_TEXT_BG_NORMAL, 5); + DECLARE_COLOR_CONFIG(ITEM_BG_PRESSED, 6); + DECLARE_COLOR_CONFIG(ITEM_BORDER_NORMAL, 7); + DECLARE_COLOR_CONFIG(ITEM_BORDER_PRESSED, 8); + DECLARE_COLOR_CONFIG(ITEM_BORDER_HIGHLIGHTED, 9); + DECLARE_COLOR_CONFIG(INNER_TEXT_NORMAL, 10); + DECLARE_COLOR_CONFIG(INNER_TEXT_PRESSED, 11); + DECLARE_COLOR_CONFIG(INNER_TEXT_HIGHLIGHTED, 12); + DECLARE_IMAGE_CONFIG(ITEM_BORDER_NORMAL, 1); + DECLARE_IMAGE_CONFIG(ITEM_BORDER_PRESSED, 2); + DECLARE_IMAGE_CONFIG(ITEM_BORDER_HIGHLIGHTED, 3); + DECLARE_IMAGE_CONFIG(CHECK_BG_NORMAL, 4); + DECLARE_IMAGE_CONFIG(CHECK_BG_SELECTED, 5); + DECLARE_IMAGE_CONFIG(CHECK_SELECTED, 6); + DECLARE_SHAPE_CONFIG(TOP_MARGIN, 1); + DECLARE_SHAPE_CONFIG(BOTTOM_MARGIN, 2); + DECLARE_SHAPE_CONFIG(LEFT_MARGIN, 3); + DECLARE_SHAPE_CONFIG(RIGHT_MARGIN, 4); + DECLARE_SHAPE_CONFIG(HORIZONTAL_LEFT_MARGIN, 5); + DECLARE_SHAPE_CONFIG(HORIZONTAL_RIGHT_MARGIN, 6); + DECLARE_SHAPE_CONFIG(HORIZONTAL_SPACING, 7); + DECLARE_SHAPE_CONFIG(VERTICAL_SPACING, 8); + DECLARE_SHAPE_CONFIG(OUTSIDE_TEXT_TOP_MARGIN, 9); + DECLARE_SHAPE_CONFIG(OUTSIDE_TEXT_BOTTOM_MARGIN, 10); + DECLARE_SHAPE_CONFIG(OUTSIDE_TEXT_LEFT_MARGIN, 11); + DECLARE_SHAPE_CONFIG(OUTSIDE_TEXT_RIGHT_MARGIN, 12); + DECLARE_SHAPE_CONFIG(OUTSIDE_TEXT_VERTICAL_SPACING, 13); + DECLARE_SHAPE_CONFIG(FONT_SIZE, 14); + DECLARE_SHAPE_CONFIG(INSIDE_FONT_SIZE, 15); + DECLARE_SHAPE_CONFIG(OUTSIDE_FONT_SIZE, 16); + DECLARE_SHAPE_CONFIG(EMPTY_FONT_SIZE, 17); + DECLARE_SHAPE_CONFIG(EMPTY_TEXT_HEIGHT, 18); + DECLARE_SHAPE_CONFIG(INSIDE_ONE_LINE_TEXT_HEIGHT, 19); + DECLARE_SHAPE_CONFIG(INSIDE_TWO_LINE_TEXT_HEIGHT, 20); + DECLARE_SHAPE_CONFIG(VERTICAL_EXTENT, 21); + DECLARE_SHAPE_CONFIG(LIST1X_TOP_MARGIN, 22); + DECLARE_SHAPE_CONFIG(LIST1X_LEFT_MARGIN, 23); + DECLARE_SHAPE_CONFIG(LIST1X_RIGHT_MARGIN, 24); + DECLARE_FIXED_VALUE_CONFIG(MINIMUM_FONT_SIZE, 1); + DECLARE_FIXED_VALUE_CONFIG(DROP_SHADOW_WIDTH, 2); + DECLARE_FIXED_VALUE_CONFIG(DROP_SHADOW_HEIGHT, 3); + DECLARE_FIXED_VALUE_CONFIG(DROP_SHADOW_BORDER, 4); + DECLARE_FIXED_VALUE_CONFIG(DROP_SHADOW_MARGIN, 5); + DECLARE_FIXED_VALUE_CONFIG(SELECT_BG_MARGIN, 6); + DECLARE_FIXED_VALUE_CONFIG(TEXT_HORIZONTAL_MARGIN, 7); + DECLARE_FIXED_VALUE_CONFIG(TEXT_VERTICAL_MARGIN, 8); + DECLARE_FIXED_VALUE_CONFIG(OVERLAY_ICON_MARGIN, 9); + DECLARE_FIXED_VALUE_CONFIG(CHECKBOX_MARGIN, 10); + DECLARE_DIMENSION_CONFIG(CHECKBOX_SIZE, 1); +DECLARE_END_UI_CONFIG(ICONLIST); + +#endif //_FUI_RESOURCE_ICONLIST_CONFIG_H_ \ No newline at end of file diff --git a/src/ui/inc/FUi_ResourceInputPadConfig.h b/src/ui/inc/FUi_ResourceInputPadConfig.h new file mode 100644 index 0000000..0a37078 --- /dev/null +++ b/src/ui/inc/FUi_ResourceInputPadConfig.h @@ -0,0 +1,61 @@ +// +// 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_ResourceInputPadConfig.cpp + * @brief This is the implementation file for the color, image and shape config of _InputPad class. + */ +#ifndef _FUI_RESOURCE_INPUT_PAD_CONFIG_H_ +#define _FUI_RESOURCE_INPUT_PAD_CONFIG_H_ + +#include "FUi_ResourceConfigMacro.h" + +DECLARE_UI_CONFIG(INPUTPAD); + DECLARE_COLOR_CONFIG(TEXT_NORMAL, 1); + DECLARE_COLOR_CONFIG(TEXT_PRESSED, 2); + DECLARE_COLOR_CONFIG(TEXT_HIGHLIGHTED, 3); + DECLARE_COLOR_CONFIG(TEXT_DISABLED, 4); + DECLARE_COLOR_CONFIG(GUIDE_TEXT_NORMAL, 5); + DECLARE_COLOR_CONFIG(GUIDE_TEXT_PRESSED, 6); + DECLARE_COLOR_CONFIG(GUIDE_TEXT_DISABLED, 7); + DECLARE_COLOR_CONFIG(BUTTON_BG_NORMAL, 8); + DECLARE_COLOR_CONFIG(BUTTON_BG_PRESSED, 9); + DECLARE_COLOR_CONFIG(BUTTON_BG_HIGHLIGHTED, 10); + DECLARE_COLOR_CONFIG(BUTTON_BG_DISABLED, 11); + DECLARE_IMAGE_CONFIG(BG_NORMAL, 1); + DECLARE_IMAGE_CONFIG(BUTTON_BG_NORMAL, 2); + DECLARE_IMAGE_CONFIG(BUTTON_BG_PRESSED, 3); + DECLARE_IMAGE_CONFIG(BUTTON_BG_HIGHLIGHTED, 4); + DECLARE_IMAGE_CONFIG(BUTTON_BG_DISABLED, 5); + DECLARE_IMAGE_CONFIG(BUTTON_BG_EFFECT_NORMAL, 6); + DECLARE_IMAGE_CONFIG(BUTTON_BG_EFFECT_PRESSED, 7); + DECLARE_IMAGE_CONFIG(BUTTON_BG_EFFECT_HIGHLIGHTED, 8); + DECLARE_IMAGE_CONFIG(BUTTON_BG_EFFECT_DISABLED, 9); + DECLARE_SHAPE_CONFIG(TOP_MARGIN, 1); + DECLARE_SHAPE_CONFIG(BUTTON_HORIZONTAL_MARGIN, 2); + DECLARE_SHAPE_CONFIG(BUTTON_VERTICAL_MARGIN, 3); + DECLARE_SHAPE_CONFIG(NUMERIC_FONT_SIZE, 4); + DECLARE_SHAPE_CONFIG(ALPHA_FONT_SIZE, 5); + DECLARE_SHAPE_CONFIG(GUIDE_FONT_SIZE, 6); + DECLARE_SHAPE_CONFIG(TEXT_CORRECTION_Y, 7); + DECLARE_SHAPE_CONFIG(GUIDE_CORRECTION_X, 8); + DECLARE_SHAPE_CONFIG(BUTTON_WIDTH, 9); + DECLARE_SHAPE_CONFIG(BUTTON_HEIGHT, 10); + DECLARE_FIXED_VALUE_CONFIG(BUTTON_TOUCH_CORRECTION_Y, 1); +DECLARE_END_UI_CONFIG(INPUTPAD); + +#endif //_FUI_RESOURCE_INPUT_PAD_CONFIG_H_ diff --git a/src/ui/inc/FUi_ResourceLabelConfig.h b/src/ui/inc/FUi_ResourceLabelConfig.h new file mode 100644 index 0000000..7693895 --- /dev/null +++ b/src/ui/inc/FUi_ResourceLabelConfig.h @@ -0,0 +1,36 @@ +// +// 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_ResourceLabelConfig.h + * @brief This is the implementation file for the properties of Label. + */ +#ifndef _FUI_RESOURCE_LABEL_CONFIG_H_ +#define _FUI_RESOURCE_LABEL_CONFIG_H_ + +#include "FUi_ResourceConfigMacro.h" + +DECLARE_UI_CONFIG(LABEL); + DECLARE_COLOR_CONFIG(TEXT_NORMAL, 1); + DECLARE_DIMENSION_CONFIG(MIN_SIZE, 1); + DECLARE_SHAPE_CONFIG(TEXT_FONT_SIZE, 1); + DECLARE_SHAPE_CONFIG(LEFT_MARGIN, 2); + DECLARE_SHAPE_CONFIG(TOP_MARGIN, 3); + DECLARE_SHAPE_CONFIG(RIGHT_MARGIN, 4); + DECLARE_SHAPE_CONFIG(BOTTOM_MARGIN, 5); +DECLARE_END_UI_CONFIG(LABEL); + +#endif //_FUI_RESOURCE_LABEL_CONFIG_H_ \ No newline at end of file diff --git a/src/ui/inc/FUi_ResourceListConfig.h b/src/ui/inc/FUi_ResourceListConfig.h new file mode 100644 index 0000000..c4bb556 --- /dev/null +++ b/src/ui/inc/FUi_ResourceListConfig.h @@ -0,0 +1,64 @@ +// +// 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_ResourceListConfig.h + * @brief This is the implementation file for the UI properties of 1.x Lists. + */ +#ifndef _FUI_RESOURCE_LIST_CONFIG_H_ +#define _FUI_RESOURCE_LIST_CONFIG_H_ + +#include "FUi_ResourceConfigMacro.h" + +DECLARE_UI_CONFIG(LIST); + DECLARE_COLOR_CONFIG(LISTITEM_DIVIDER_LEFT_HALF_COLOR, 1); + DECLARE_COLOR_CONFIG(LISTITEM_DIVIDER_RIGHT_HALF_COLOR, 2); + DECLARE_COLOR_CONFIG(EXPANDABLELIST_SUB_ITEM_BG_COLOR, 3); + DECLARE_COLOR_CONFIG(ELEMENT_TEXT_NORMAL, 4); + DECLARE_COLOR_CONFIG(ELEMENT_TEXT_PRESSED, 5); + DECLARE_COLOR_CONFIG(ELEMENT_TEXT_HIGHLIGHTED, 6); + DECLARE_COLOR_CONFIG(ELEMENT_TEXT_DISABLED, 7); + DECLARE_COLOR_CONFIG(EXPANDABLE_ARROW_NORMAL, 8); + DECLARE_COLOR_CONFIG(EXPANDABLE_ARROW_DISABLED, 9); + DECLARE_COLOR_CONFIG(EXPANDABLE_ARROW_PRESSED, 10); + DECLARE_IMAGE_CONFIG(BUTTON_EXPAND_GROUP, 1); + DECLARE_IMAGE_CONFIG(BUTTON_COLLAPSE_GROUP, 2); + DECLARE_IMAGE_CONFIG(BUTTON_EXPAND_CLOSED_EFFECT, 3); + DECLARE_IMAGE_CONFIG(BUTTON_EXPAND_OPENED_EFFECT, 4); + DECLARE_SHAPE_CONFIG(EMPTY_LIST_TEXT_HEIGHT, 1); + DECLARE_SHAPE_CONFIG(LIST_ITEM_TEXT_SIZE, 2); + DECLARE_SHAPE_CONFIG(LIST_STYLE_NUMBER_X, 3); + DECLARE_SHAPE_CONFIG(LIST_STYLE_NUMBER_WIDTH, 4); + DECLARE_SHAPE_CONFIG(LIST_STYLE_NUMBER_HEIGHT, 5); + DECLARE_SHAPE_CONFIG(LIST_CHECK_ITEM_WIDTH, 6); + DECLARE_SHAPE_CONFIG(LIST_CHECK_ITEM_HEIGHT, 7); + DECLARE_SHAPE_CONFIG(LIST_ITEM_NUMBER_STYLE_MARGIN, 8); + DECLARE_SHAPE_CONFIG(LIST_ITEM_LEFT_MARGIN, 9); + DECLARE_SHAPE_CONFIG(LIST_ITEM_DIVIDER_MARGIN, 10); + DECLARE_SHAPE_CONFIG(LIST_ITEM_LOWER_MARGIN, 11); + DECLARE_SHAPE_CONFIG(LIST_ITEM_UPPER_MARGIN, 12); + DECLARE_SHAPE_CONFIG(TEXT_ELEMENT_FONTSIZE_DEFAULT, 13); + DECLARE_SHAPE_CONFIG(CHECK_ELEMENT_DIVIDER_WIDTH, 14); + DECLARE_SHAPE_CONFIG(CHECK_ELEMENT_DIVIDER_MARGIN, 15); + DECLARE_SHAPE_CONFIG(LIST_DEFAULT_ITEM_HEIGHT, 16); + DECLARE_SHAPE_CONFIG(EXPANDABLE_ARROW_X_POSITION, 17); + DECLARE_DIMENSION_CONFIG(LIST_MIN_SIZE, 1); + DECLARE_DIMENSION_CONFIG(GROUPEDLIST_MIN_SIZE, 2); + DECLARE_FIXED_VALUE_CONFIG(LIST_ITEM_MAX_COUNT, 1); +DECLARE_END_UI_CONFIG(LIST); + +#endif //_FUI_RESOURCE_LIST_CONFIG_H_ diff --git a/src/ui/inc/FUi_ResourceListViewConfig.h b/src/ui/inc/FUi_ResourceListViewConfig.h new file mode 100644 index 0000000..6f06a86 --- /dev/null +++ b/src/ui/inc/FUi_ResourceListViewConfig.h @@ -0,0 +1,51 @@ +// +// 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_ResourceListViewConfig.h + * @brief This is the implementation file for the properties of ListView. + */ +#ifndef _FUI_RESOURCE_LISTVIEW_CONFIG_H_ +#define _FUI_RESOURCE_LISTVIEW_CONFIG_H_ + +#include "FUi_ResourceConfigMacro.h" + +DECLARE_UI_CONFIG(LISTVIEW); + DECLARE_SHAPE_CONFIG(EMPTY_LIST_TEXT_HEIGHT, 1); + DECLARE_SHAPE_CONFIG(ITEM_DEFAULT_HEIGHT, 2); + DECLARE_SHAPE_CONFIG(ITEM_DEFAULT_FONT_SIZE, 3); + DECLARE_SHAPE_CONFIG(ITEM_ELEMENT_LEFT_MARGIN, 4); + DECLARE_SHAPE_CONFIG(ITEM_ELEMENT_SPACING, 5); + DECLARE_SHAPE_CONFIG(ITEM_DESCRIPTION_TEXT_LEFT_MARGIN, 6); + DECLARE_SHAPE_CONFIG(ITEM_DESCRIPTION_TEXT_TOP_MARGIN, 7); + DECLARE_SHAPE_CONFIG(ITEM_DESCRIPTION_TEXT_FONT_SIZE, 8); + DECLARE_SHAPE_CONFIG(GROUPITEM_DEFAULT_HEIGHT, 9); + DECLARE_SHAPE_CONFIG(GROUPITEM_DEFAULT_FONT_SIZE, 10); + DECLARE_SHAPE_CONFIG(GROUPITEM_ELEMENT_LEFT_MARGIN, 11); + DECLARE_SHAPE_CONFIG(GROUPITEM_ELEMENT_SPACING, 12); + DECLARE_SHAPE_CONFIG(GROUPITEM_DIVIDER_HEIGHT, 13); + DECLARE_SHAPE_CONFIG(GROUPITEM_DIVIDER_LEFT_MARGIN, 14); + DECLARE_SHAPE_CONFIG(GROUPITEM_DIVIDER_BOTTOM_MARGIN, 15); + DECLARE_SHAPE_CONFIG(CONTEXTITEM_LEFT_MARGIN_ONE, 16); + DECLARE_SHAPE_CONFIG(CONTEXTITEM_LEFT_MARGIN, 17); + DECLARE_SHAPE_CONFIG(CONTEXTITEM_ELEMENT_HEIGHT, 18); + DECLARE_SHAPE_CONFIG(CONTEXTITEM_ELEMENT_SPACING, 19); + DECLARE_SHAPE_CONFIG(CONTEXTITEM_ELEMENT_FONT_SIZE, 20); + DECLARE_SHAPE_CONFIG(EMPTY_LIST_HORIZONTAL_SPACING, 21); + +DECLARE_END_UI_CONFIG(LISTVIEW); + +#endif //_FUI_RESOURCE_LISTVIEW_CONFIG_H_ \ No newline at end of file diff --git a/src/ui/inc/FUi_ResourceManager.h b/src/ui/inc/FUi_ResourceManager.h new file mode 100644 index 0000000..d62c571 --- /dev/null +++ b/src/ui/inc/FUi_ResourceManager.h @@ -0,0 +1,264 @@ +// +// 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_ResourceManager.h + * @brief This is the header file for _ResourceManager class. + * @version 3.0 + * + * This header file contains declaration of _ResourceManager class. + * The ActionEvent class can call listener's method. So, when event occurred, + * application can handle it appropriately. + * + */ +#ifndef _FUI_INTERNAL_RESOURCE_MANAGER_H_ +#define _FUI_INTERNAL_RESOURCE_MANAGER_H_ + +#include +#include +#include +#include "FUi_ControlManager.h" +#include "FUi_ResourceConfigTypes.h" + +namespace Tizen { namespace Base +{ +class Integer; +class Float; +}}//Tizen::Base:: + +namespace Tizen { namespace Base { namespace Collection +{ +template class ArrayListT; +}}} + +namespace Tizen { namespace Graphics +{ +class Bitmap; +class FloatDimension; +class Dimension; +class Color; +class _ICoordinateSystemTransformer; +}}//Tizen::Graphics + +namespace Tizen { namespace Ui { namespace _Resource +{ +class StringLoader; +class ConfigLoader; +class MapContainer; +class ConfigParser; +}}} + +namespace Tizen { namespace Ui +{ + +enum _ResourceFeedbackStatus +{ + _RESOURCE_FEEDBACK_STATUS_INIT = 0, + _RESOURCE_FEEDBACK_STATUS_PLAYED +};// enum _ResourceFeedbackPattern + +enum _ResourceFeedbackPattern +{ + _RESOURCE_FEEDBACK_PATTERN_TAP = 0, + _RESOURCE_FEEDBACK_PATTERN_SIP, + _RESOURCE_FEEDBACK_PATTERN_SIP_BACKSPACE, + _RESOURCE_FEEDBACK_PATTERN_MAX_CHARACTER, + _RESOURCE_FEEDBACK_PATTERN_KEY0, + _RESOURCE_FEEDBACK_PATTERN_KEY1, + _RESOURCE_FEEDBACK_PATTERN_KEY2, + _RESOURCE_FEEDBACK_PATTERN_KEY3, + _RESOURCE_FEEDBACK_PATTERN_KEY4, + _RESOURCE_FEEDBACK_PATTERN_KEY5, + _RESOURCE_FEEDBACK_PATTERN_KEY6, + _RESOURCE_FEEDBACK_PATTERN_KEY7, + _RESOURCE_FEEDBACK_PATTERN_KEY8, + _RESOURCE_FEEDBACK_PATTERN_KEY9, + _RESOURCE_FEEDBACK_PATTERN_KEY_STAR, + _RESOURCE_FEEDBACK_PATTERN_KEY_SHARP, + _RESOURCE_FEEDBACK_PATTERN_HOLD, + _RESOURCE_FEEDBACK_PATTERN_MULTI_TAP, + _RESOURCE_FEEDBACK_PATTERN_HW_TAP, + _RESOURCE_FEEDBACK_PATTERN_HW_HOLD, + _RESOURCE_FEEDBACK_PATTERN_MESSAGE, + _RESOURCE_FEEDBACK_PATTERN_MESSAGE_ON_CALL, + _RESOURCE_FEEDBACK_PATTERN_EMAIL, + _RESOURCE_FEEDBACK_PATTERN_EMAIL_ON_CALL, + _RESOURCE_FEEDBACK_PATTERN_WAKEUP, + _RESOURCE_FEEDBACK_PATTERN_WAKEUP_ON_CALL, + _RESOURCE_FEEDBACK_PATTERN_SCHEDULE, + _RESOURCE_FEEDBACK_PATTERN_SCHEDULE_ON_CALL, + _RESOURCE_FEEDBACK_PATTERN_TIMER, + _RESOURCE_FEEDBACK_PATTERN_TIMER_ON_CALL, + _RESOURCE_FEEDBACK_PATTERN_GENERAL, + _RESOURCE_FEEDBACK_PATTERN_GENERAL_ON_CALL, + _RESOURCE_FEEDBACK_PATTERN_POWERON, + _RESOURCE_FEEDBACK_PATTERN_POWEROFF, + _RESOURCE_FEEDBACK_PATTERN_CHARGERCONN, + _RESOURCE_FEEDBACK_PATTERN_CHARGERCONN_ON_CALL, + _RESOURCE_FEEDBACK_PATTERN_FULLCHARGED, + _RESOURCE_FEEDBACK_PATTERN_FULLCHARGED_ON_CALL, + _RESOURCE_FEEDBACK_PATTERN_LOWBATT, + _RESOURCE_FEEDBACK_PATTERN_LOWBATT_ON_CALL, + _RESOURCE_FEEDBACK_PATTERN_LOCK, + _RESOURCE_FEEDBACK_PATTERN_UNLOCK, + _RESOURCE_FEEDBACK_PATTERN_CALLCONNECT, + _RESOURCE_FEEDBACK_PATTERN_DISCALLCONNECT, + _RESOURCE_FEEDBACK_PATTERN_MINUTEMINDER, + _RESOURCE_FEEDBACK_PATTERN_VIBRATION, + _RESOURCE_FEEDBACK_PATTERN_SHUTTER, + _RESOURCE_FEEDBACK_PATTERN_LIST_REORDER, + _RESOURCE_FEEDBACK_PATTERN_SLIDER_SWEEP +}; // enum _ResourceFeedbackPattern + +#define GET_SHAPE_CONFIG(shapeId, orientation, x)\ + Tizen::Ui::_ResourceManager::GetInstance()->GetShape(Tizen::Ui::_Resource::_##shapeId##_SHAPE, orientation, x) + +#define GET_DIMENSION_CONFIG(dimensionId, orientation, x)\ + Tizen::Ui::_ResourceManager::GetInstance()->GetDimension(Tizen::Ui::_Resource::_##dimensionId##_DIMENSION, orientation, x) + +#define GET_COLOR_CONFIG(colorId, x) \ + Tizen::Ui::_ResourceManager::GetInstance()->GetColor(Tizen::Ui::_Resource::_##colorId##_COLOR, x) + +#define GET_BITMAP_CONFIG_N(bitmapId, pixelFormat, pOutBitmap)\ + Tizen::Ui::_ResourceManager::GetInstance()->GetBitmapN(Tizen::Ui::_Resource::_##bitmapId##_IMAGE, pixelFormat, _CONTROL_ORIENTATION_PORTRAIT, false, 0, pOutBitmap) + +#define GET_REPLACED_BITMAP_CONFIG_N(bitmapId, pixelFormat, color ,pOutBitmap)\ + Tizen::Ui::_ResourceManager::GetInstance()->GetBitmapN(Tizen::Ui::_Resource::_##bitmapId##_IMAGE, pixelFormat, _CONTROL_ORIENTATION_PORTRAIT, true, color, pOutBitmap) + +#define GET_STRING_CONFIG(stringId, string)\ + Tizen::Ui::_ResourceManager::GetInstance()->GetString(#stringId, string) + +#define GET_FIXED_VALUE_CONFIG(fixedValueId, orientation, x)\ + Tizen::Ui::_ResourceManager::GetInstance()->GetFixedValue(Tizen::Ui::_Resource::_##fixedValueId##_FIXED_VALUE, orientation, x) + +#define GET_ANIMATION_CONFIG_N(animationId, x)\ + Tizen::Ui::_ResourceManager::GetInstance()->GetAnimationN(Tizen::Ui::_Resource::_##animationId##_ANIMATION, x) + +#define IS_CUSTOM_BITMAP(bitmapId) \ + Tizen::Ui::_ResourceManager::GetInstance()->IsCustomBitmap(Tizen::Ui::_Resource::_##bitmapId##_IMAGE) + +#define IS_CUSTOM_COLOR(colorId) \ + Tizen::Ui::_ResourceManager::GetInstance()->IsCustomColor(Tizen::Ui::_Resource::_##colorId##_COLOR) + +#define PLAY_FEEDBACK(pattern, control) \ + Tizen::Ui::_ResourceManager::GetInstance()->PlayFeedback(pattern, control) + +#define IS_PLAYED_FEEDBACK() \ + Tizen::Ui::_ResourceManager::GetInstance()->IsFeedbackPlayed() + +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, 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); + result GetFixedValue(int shapeId, _ControlOrientation orientation, int& value); + result GetDimension(int dimensionId, _ControlOrientation orientation, Tizen::Graphics::Dimension& dimension); + result GetShape(int shapeId, _ControlOrientation orientation, float& value); + result GetFixedValue(int shapeId, _ControlOrientation orientation, float& value); + result GetDimension(int dimensionId, _ControlOrientation orientation, Tizen::Graphics::FloatDimension& dimension); + result GetAnimationN(int animationId, Tizen::Base::Collection::ArrayList*& pList); + void GetThemeName(Tizen::Base::String& systemTheme, Tizen::Base::String& userTheme) const; + void ReloadTheme(Tizen::Base::String& themeName, bool userdefine); + bool IsCustomColor(int colorId); + bool IsCustomBitmap(int bitmapId); + result PlayFeedback(_ResourceFeedbackPattern pattern, const _Control* pControl); + bool IsFeedbackPlayed(void); + void AcquireFeedback(void); + void ReleaseFeedback(void); + void ResetFeedback(void); + + Tizen::Graphics::Dimension GetLogicalScreenSizen(void); + +private: + _ResourceManager(void); + ~_ResourceManager(void); + static void CreateInstance(void); + + void PostInitialize(void); + void DoPostInitialization(void); + void SelectConfigTable(void); + + _ResourceManager(const _ResourceManager& rhs); + _ResourceManager& operator =(const _ResourceManager& rhs); + + enum MapContainerType + { + MAP_CONTAINER_TYPE_APP_BASE_PORTRAIT = 0, + MAP_CONTAINER_TYPE_APP_BASE_LANDSCAPE = 1, + MAP_CONTAINER_TYPE_DEFAULT_PORTRAIT = 2, + 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, 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, bool preInit); + _Resource::MapContainer* GetMapContainer(MapContainerType type); + void SetSystemColor(void); + Tizen::Base::String FindImagePath(const Tizen::Base::String& fileName, int& findFolder, bool isCustom); + bool GetDensityDirectory(const Tizen::Base::String& directoryName, float& scaleFactor); + bool GetResolutionDirectory(const Tizen::Base::String& directoryName, float& scaleFactor); + void LoadPaletteInformation(const Tizen::Base::String& systemTheme); + void LoadBlackPalette(void); + void LoadWhitePalette(void); + void LoadDefaultPalette(void); +private: + + struct ResourceFallbackItem + { + float scaleFactor; + Tizen::Base::String directoryName; + }; + + _Resource::StringLoader* __pStringLoader; + _Resource::ConfigParser* __pParser; + _Resource::MapContainer* __pMapContainer[MAP_CONTAINER_TYPE_MAX]; + Tizen::Graphics::_ICoordinateSystemTransformer* __pTransformer; + Tizen::Base::String __appBasePortraitMode; + Tizen::Base::String __appBaseLandscapeMode; + Tizen::Base::String __targetPortraitMode; + Tizen::Base::String __targetLandscapeMode; + Tizen::Base::String __defaultPortraitMode; + Tizen::Base::String __defaultLandscapeMode; + Tizen::Base::String __systemTheme; + Tizen::Base::String __userTheme; + bool __appliedUserTheme; + bool __initializeFeedback; + bool __preInitialize; + bool __postInitialize; + int __appBaseWidth; + int __appBaseHeight; + int __targetWidth; + int __targetHeight; + int __deviceDPI; + int __logicalWidth; + int __logicalHeight; + _ResourceFeedbackStatus __feedbackStatus; + int __feedbackAcquireCount; + Tizen::Base::Collection::ArrayListT* __pFallbackList; +}; + +}}//Tizen::Ui + +#endif // _FUI_INTERNAL_RESOURCE_MANAGER_H_ diff --git a/src/ui/inc/FUi_ResourceMap.h b/src/ui/inc/FUi_ResourceMap.h new file mode 100644 index 0000000..28a01db --- /dev/null +++ b/src/ui/inc/FUi_ResourceMap.h @@ -0,0 +1,784 @@ +// +// 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_ResourceMap.h + * @brief This is the header file for Map class. + * @version 3.0 + * + * This header file contains declaration of Map class. + * The ActionEvent class can call listener's method. So, when event occurred, + * application can handle it appropriately. + * + */ +#ifndef _FUI_INTERNAL_RESOURCE_MAP_H_ +#define _FUI_INTERNAL_RESOURCE_MAP_H_ + +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui { namespace _Resource +{ +enum _ResourceType +{ + RESOURCE_TYPE_NONE, + RESOURCE_TYPE_COLOR, + RESOURCE_TYPE_DIMENSION, + RESOURCE_TYPE_FIXED_VALUE, + RESOURCE_TYPE_FONT, + RESOURCE_TYPE_IMAGE, + RESOURCE_TYPE_SHAPE, + RESOURCE_TYPE_ANIMATION, + RESOURCE_TYPE_MAX, +}; + +class ResourceKey +{ +public: + ResourceKey(void) + :__intKey(0) + , __hash(0) + , __charKey(null) + , __pRefCount(null) + { + } + ResourceKey(int key) + :__intKey(key) + , __hash(0) + , __charKey(null) + , __pRefCount(null) + { + } + ResourceKey(const char* key) + :__intKey(0) + , __hash(0) + , __charKey(null) + , __pRefCount(null) + { + int len = strlen(key); + __charKey = new (std::nothrow) char [len+1]; + strcpy(__charKey, key); + __charKey[len] = '\0'; + __pRefCount = new (std::nothrow) int; + *__pRefCount = 1; + } + ~ResourceKey(void) + { + __intKey = 0; + if (__pRefCount == null) + { + return; + } + if (__pRefCount && *__pRefCount == 1) + { + delete[] __charKey; + delete __pRefCount; + } + else + { + (*__pRefCount)--; + } + __charKey= null; + __pRefCount = null; + } + ResourceKey(const ResourceKey& rhs) + :__intKey(0) + , __hash(0) + , __charKey(null) + , __pRefCount(null) + { + __intKey = rhs.__intKey; + if (rhs.__pRefCount && *(rhs.__pRefCount) > 0) + { + __charKey = rhs.__charKey; + __pRefCount = rhs.__pRefCount; + (*__pRefCount)++; + } + } + ResourceKey& operator =(const ResourceKey& rhs) + { + if (&rhs == this) + { + return *this; + } + __intKey = rhs.__intKey; + if (rhs.__pRefCount && *(rhs.__pRefCount) > 0) + { + __intKey = 0; + if (__pRefCount && *__pRefCount == 1) + { + delete[] __charKey; + delete __pRefCount; + __pRefCount = null; + } + if(__pRefCount) + { + (*__pRefCount)--; + } + __charKey = rhs.__charKey; + __pRefCount = rhs.__pRefCount; + (*__pRefCount)++; + } + return *this; + } + + bool + operator ==(const ResourceKey& rhs) const + { + if(rhs.__intKey != 0 && rhs.__intKey == this->__intKey) + { + return true; + } + if(strcmp(this->__charKey, rhs.__charKey) == 0) + { + return true; + } + return false; + } + + bool operator !=(const ResourceKey& rhs) const + { + return(!(*this).operator ==(rhs)); + } + + int GetHashCode(void) const + { + if (__charKey == null) + { + return __intKey; + } + + int hash = 0; + if (__hash == 0) + { + char* pStr = __charKey; + int len = strlen(pStr); + for (int i = 0; i < len; ++i) + { + hash = (hash << 5) - hash + (int) *pStr++; + } + const_cast(this)->__hash = hash; + } + else + { + hash = __hash; + } + return hash; + } + +//private: + int __intKey; + int __hash; + char* __charKey; + int* __pRefCount; +}; + +class _ResourceHashCodeProvider + : public Tizen::Base::Collection::IHashCodeProviderT +{ +public: + _ResourceHashCodeProvider(void) {} + virtual ~_ResourceHashCodeProvider(void) {} + + virtual int GetHashCode(const ResourceKey& obj) const + { + return obj.GetHashCode(); + } +}; + +class _ResourceComparer + : public Tizen::Base::Collection::IComparerT +{ +public: + _ResourceComparer(void) {} + virtual ~_ResourceComparer(void) {} + virtual result Compare(const ResourceKey& obj1, const ResourceKey& obj2, int& cmp) const + { + if (obj1 == obj2) + { + cmp = 0; + return E_SUCCESS; + } + else + { + cmp = -1; + return E_SUCCESS; + } + } +}; + +class ResourceAnimationFrame +{ +public: + ResourceAnimationFrame(void) + : __fileName(L"") + , __duration(0) + { + } + ResourceAnimationFrame(const Tizen::Base::String& fileName, int duration) + : __fileName(fileName) + , __duration(duration) + { + } + ResourceAnimationFrame(const ResourceAnimationFrame& rhs) + { + __fileName = rhs.__fileName; + __duration = rhs.__duration; + } + ~ResourceAnimationFrame(void) + { + } + ResourceAnimationFrame& operator =(const ResourceAnimationFrame& rhs) + { + __fileName = rhs.__fileName; + __duration = rhs.__duration; + return *this; + } + bool operator ==(const ResourceAnimationFrame& rhs) const + { + if (__duration != rhs.__duration) + { + return false; + } + if (__fileName != rhs.__fileName) + { + return false; + } + return true; + } + + Tizen::Base::String __fileName; + int __duration; +}; + +class ResourceAnimationFrameList +{ +public: + ResourceAnimationFrameList(void) + { + } + ~ResourceAnimationFrameList(void) + { + Clear(); + } + void Clear(void) + { + __list.RemoveAll(); + } + ResourceAnimationFrameList& operator =(const ResourceAnimationFrameList& rhs) + { + __list.RemoveAll(); + __list.InsertItemsFrom(rhs.__list, 0); + return *this; + } + void Add(const ResourceAnimationFrame& frame) + { + __list.Add(frame); + } + Tizen::Base::Collection::IListT* GetAnimationList(void) + { + return &__list; + } +private: + Tizen::Base::Collection::LinkedListT __list; +}; + +typedef union +{ + float valueFloat; + unsigned int valueInt; + mutable wchar_t* valueString; + Tizen::Graphics::FloatDimension* valueDimension; + ResourceAnimationFrameList* valueAnimationList; +} ResourceItemData; + +class ResourceItem +{ +public: + ResourceItem(_ResourceType type) + : __init(false) + , __type(type) + , __pRawString(null) + { + switch (__type) + { + case RESOURCE_TYPE_COLOR: + __data.valueInt = 0; + break; + case RESOURCE_TYPE_DIMENSION: + __data.valueDimension = null; + break; + case RESOURCE_TYPE_FIXED_VALUE: + __data.valueFloat = 0.0f; + break; + case RESOURCE_TYPE_IMAGE: + __data.valueString = null; + break; + case RESOURCE_TYPE_SHAPE: + __data.valueFloat = 0.0f; + break; + case RESOURCE_TYPE_ANIMATION: + __data.valueAnimationList = null; + break; + default: + break; + } + } + ResourceItem(const ResourceItem& rhs) + : __init(rhs.__init) + , __type(rhs.__type) + , __pRawString(null) + { + int len = strlen(rhs.__pRawString); + if (len >0) + { + __pRawString = new (std::nothrow) char [len+1]; + strcpy(__pRawString, rhs.__pRawString); + __pRawString[len] = '\0'; + } + switch (__type) + { + case RESOURCE_TYPE_COLOR: + __data.valueInt = rhs.__data.valueInt; + break; + case RESOURCE_TYPE_DIMENSION: + __data.valueDimension = new (std::nothrow)Tizen::Graphics::FloatDimension; + *__data.valueDimension = *rhs.__data.valueDimension; + break; + case RESOURCE_TYPE_FIXED_VALUE: + __data.valueFloat = rhs.__data.valueFloat; + break; + case RESOURCE_TYPE_IMAGE: + len = wcslen(rhs.__data.valueString); + if (len == 0) + { + break; + } + __data.valueString = new (std::nothrow) wchar_t [len + 1]; + wcsncpy(__data.valueString, rhs.__data.valueString, len); + __data.valueString[len] = '\0'; + break; + case RESOURCE_TYPE_SHAPE: + __data.valueFloat = rhs.__data.valueFloat; + break; + case RESOURCE_TYPE_ANIMATION: + if (rhs.__data.valueAnimationList) + { + __data.valueAnimationList = new (std::nothrow) ResourceAnimationFrameList; + *__data.valueAnimationList = *rhs.__data.valueAnimationList; + } + break; + default: + break; + } + } + ~ResourceItem(void) + { + CleanUp(); + } + ResourceItem& operator =(const ResourceItem& rhs) + { + CleanUp(); + __init = rhs.__init; + + int len = strlen(rhs.__pRawString); + __pRawString = new (std::nothrow) char [len+1]; + strcpy(__pRawString, rhs.__pRawString); + __pRawString[len] = '\0'; + switch (__type) + { + case RESOURCE_TYPE_COLOR: + __data.valueInt = rhs.__data.valueInt; + break; + case RESOURCE_TYPE_DIMENSION: + __data.valueDimension = new (std::nothrow)Tizen::Graphics::FloatDimension; + *__data.valueDimension = *rhs.__data.valueDimension; + break; + case RESOURCE_TYPE_FIXED_VALUE: + __data.valueFloat = rhs.__data.valueFloat; + break; + case RESOURCE_TYPE_IMAGE: + len = wcslen(rhs.__data.valueString); + if (len == 0) + { + break; + } + __data.valueString = new (std::nothrow) wchar_t [len + 1]; + wcsncpy(__data.valueString, rhs.__data.valueString, len); + __data.valueString[len] = '\0'; + break; + case RESOURCE_TYPE_SHAPE: + __data.valueFloat = rhs.__data.valueFloat; + break; + case RESOURCE_TYPE_ANIMATION: + if (rhs.__data.valueAnimationList) + { + __data.valueAnimationList = new (std::nothrow) ResourceAnimationFrameList; + *__data.valueAnimationList = *rhs.__data.valueAnimationList; + } + break; + default: + break; + } + return *this; + } + void CleanUp(void) + { + if(__pRawString) + { + delete []__pRawString; + __pRawString = null; + } + switch (__type) + { + case RESOURCE_TYPE_COLOR: + __data.valueInt = 0; + break; + case RESOURCE_TYPE_DIMENSION: + if (__data.valueDimension) + { + delete __data.valueDimension; + __data.valueDimension = null; + } + break; + case RESOURCE_TYPE_FIXED_VALUE: + __data.valueFloat = -1.0; + break; + case RESOURCE_TYPE_IMAGE: + if (__data.valueString != null) + { + delete [] __data.valueString; + __data.valueString = null; + } + break; + case RESOURCE_TYPE_SHAPE: + __data.valueFloat = -1.0; + break; + case RESOURCE_TYPE_ANIMATION: + if (__data.valueAnimationList) + { + delete __data.valueAnimationList; + __data.valueAnimationList = null; + } + break; + default: + break; + } + __init = false; + __type = RESOURCE_TYPE_NONE; + } + + _ResourceType GetType(void) + { + return __type; + } + + char* GetRawString(void) + { + return __pRawString; + } + + bool isInitialized(void) + { + return __init; + } + + void SetRawDataString(char*& pString) + { + CleanUp(); + __type = RESOURCE_TYPE_COLOR; + std::swap(__pRawString, pString); + } + + void SetRawDataFloat(float value) + { + if (__type == RESOURCE_TYPE_FIXED_VALUE || __type == RESOURCE_TYPE_SHAPE) + { + __init = true; + __data.valueFloat = value; + } + } + + void SetRawDataDimension(float width, float height) + { + if (__type == RESOURCE_TYPE_DIMENSION) + { + __init = true; + if(__data.valueDimension) + { + delete __data.valueDimension; + } + __data.valueDimension= new (std::nothrow) Tizen::Graphics::FloatDimension(width, height); + } + } + + void SetRawDataColor(unsigned int value) + { + if (__type == RESOURCE_TYPE_COLOR) + { + __init = true; + __data.valueInt= value; + } + } + + void SetRawDataAnimation(ResourceAnimationFrameList* pList) + { + if (__type == RESOURCE_TYPE_ANIMATION) + { + __init = true; + if (__data.valueAnimationList) + { + delete __data.valueAnimationList; + } + __data.valueAnimationList= pList; + } + } + + void SetImageFileName(wchar_t*& pString) + { + if (__type == RESOURCE_TYPE_IMAGE) + { + __init = true; + if (__data.valueString) + { + delete [] __data.valueString; + } + std::swap(__data.valueString, pString); + } + } + + float GetFloat(void) + { + if (!__init) + { + return -1.0; + } + + if (__type == RESOURCE_TYPE_FIXED_VALUE || __type == RESOURCE_TYPE_SHAPE) + { + return __data.valueFloat; + } + else + { + return -1.0; + } + } + + unsigned int GetColor(void) + { + if (!__init) + { + return 0; + } + + if (__type == RESOURCE_TYPE_COLOR) + { + return __data.valueInt; + } + else + { + return 0; + } + } + + Tizen::Base::String GetImageName(void) + { + if (!__init) + { + return L""; + } + + if (__type == RESOURCE_TYPE_IMAGE) + { + return Tizen::Base::String(__data.valueString); + } + else + { + return L""; + } + } + + Tizen::Graphics::FloatDimension GetDimension(void) + { + if (!__init) + { + return Tizen::Graphics::FloatDimension(0.0f, 0.0f); + } + + if (__type == RESOURCE_TYPE_DIMENSION) + { + return *(__data.valueDimension); + } + else + { + return Tizen::Graphics::FloatDimension(0.0f, 0.0f); + } + } + + ResourceAnimationFrameList* GetAnimationFrameList(void) + { + if (!__init) + { + return null; + } + + if (__type == RESOURCE_TYPE_ANIMATION) + { + return __data.valueAnimationList; + } + else + { + return null; + } + } + +private: + bool __init; + _ResourceType __type; + mutable char* __pRawString; + ResourceItemData __data; +}; + +class Map + : public Tizen::Base::Collection::HashMapT +{ +public: + Map(_ResourceType type) + : Tizen::Base::Collection::HashMapT() + , __type(type) + { + __pProvider = new (std::nothrow) _ResourceHashCodeProvider; + SysTryReturnVoidResult(NID_UI, __pProvider, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + __pComparer = new (std::nothrow) _ResourceComparer; + 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; + Tizen::Base::Collection::IMapEnumeratorT* pMapEnum = null; + if (Tizen::Base::Collection::HashMapT::GetCount() > 0) + { + pMapEnum = Tizen::Base::Collection::HashMapT::GetMapEnumeratorN(); + SysTryReturn(NID_UI_ANIM, (pMapEnum != null), , E_SYSTEM, "[E_SYSTEM] System Error."); + + Tizen::Base::Collection::MapEntryT value; + while ((pMapEnum->MoveNext() == E_SUCCESS)) + { + r = pMapEnum->GetCurrent(value); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System Error."); + + ResourceItem* pObj = value.GetValue(); + delete pObj; + } + Tizen::Base::Collection::HashMapT::RemoveAll(); + delete pMapEnum; + } + delete __pProvider; + __pProvider = null; + delete __pComparer; + __pComparer = null; + return; + + CATCH: + delete pMapEnum; + } + void Initialize(void) + { + result r = E_SUCCESS; + Tizen::Base::Collection::MapEntryT currentEntry; + Tizen::Base::Collection::IEnumeratorT >* pMapEnumerator = Tizen::Base::Collection::HashMapT::GetMapEnumeratorN(); + + SysTryReturn(NID_UI, pMapEnumerator, , E_SYSTEM, "[E_SYSTEM] Getting enumerator is failed."); + + while ((pMapEnumerator->MoveNext() == E_SUCCESS)) + { + ResourceItem* pObject = null; + r = pMapEnumerator->GetCurrent(currentEntry); + SysTryCatch(NID_UI, r == E_SUCCESS, r = E_SYSTEM, r, "[E_SYSTEM] removing data binding is failed."); + + pObject = currentEntry.GetValue(); + SysTryCatch(NID_UI, pObject, r = E_SYSTEM, r, "[E_SYSTEM] UpdateAllBindings is failed."); + delete pObject; + } + delete pMapEnumerator; + pMapEnumerator = null; + Tizen::Base::Collection::HashMapT::RemoveAll(); + + CATCH: + delete pMapEnumerator; + } + result FindValue(char*& key, ResourceItem*& value) + { + return E_SUCCESS; + } + result ChangeValue(const ResourceKey& key, ResourceItem*& value) + { + __modifiedItemTable.Add(key, true); + return E_SUCCESS; + } + _ResourceType GetMode(void) const + { + return __type; + } + void SetInformation (const Tizen::Base::String& information) + { + __information = information; + } + Tizen::Base::String GetInformation(void) + { + return __information; + } + bool IsUserThemeItem(const ResourceKey key) + { + bool exist = false; + __modifiedItemTable.ContainsKey(key, exist); + return exist; + } + +private: + Map(void); + Map(const Map&); + Map& operator =(const Map&); +private: + const _ResourceType __type; + Tizen::Base::String __information; + Tizen::Base::Collection::HashMapT __modifiedItemTable; + Tizen::Base::Collection::IHashCodeProviderT* __pProvider; + Tizen::Base::Collection::IComparerT* __pComparer; +}; +}}} + +#endif // _FUI_INTERNAL_RESOURCE_MAP_H_ diff --git a/src/ui/inc/FUi_ResourceMapContainer.h b/src/ui/inc/FUi_ResourceMapContainer.h new file mode 100644 index 0000000..d2997b0 --- /dev/null +++ b/src/ui/inc/FUi_ResourceMapContainer.h @@ -0,0 +1,106 @@ +// +// 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_ResourceMapContainer.h + * @brief This is the header file for MapContainer class. + * @version 3.0 + * + * This header file contains declaration of MapContainer class. + * The ActionEvent class can call listener's method. So, when event occurred, + * application can handle it appropriately. + * + */ +#ifndef _FUI_INTERNAL_RESOURCE_MAP_CONTAINER_H_ +#define _FUI_INTERNAL_RESOURCE_MAP_CONTAINER_H_ + +#include +#include +#include +#include "FUi_ResourceMap.h" + +namespace Tizen { namespace Base +{ +class Float; +}}// Tizen::Base + +namespace Tizen { namespace Base { namespace Collection +{ +template class IHashCodeProviderT; +template class IComparerT; +template class LinkedListT; +}}}//Tizen::Base::Collection + +namespace Tizen { namespace Graphics +{ +class Color; +class FloatDimension; +}}//Tizen::Graphics + +namespace Tizen { namespace Ui { namespace _Resource +{ +class MapContainer +{ +public: + MapContainer(void); + ~MapContainer(void); + void CreateMap(_ResourceType type); + void InitializeMap(_ResourceType type); + Map* GetColorMap(void) const; + Map* GetDimensionMap(void) const; + Map* GetFixedValueMap(void) const; + Map* GetImageMap(void) const; + 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); + Tizen::Base::String GetThemeName(void); + void SetResolution(const Tizen::Base::String& resolution); + Tizen::Base::String GetResolution(void); + void SetResolutionForImage(const Tizen::Base::String& resolution); + Tizen::Base::String GetResolutionForImage(void); + +private: + MapContainer(const MapContainer&); + MapContainer& operator =(const MapContainer&); + +private: + Map* __pColorMap; + Map* __pDimensionMap; + Map* __pFixedValueMap; + Map* __pImageMap; + Map* __pShapeMap; + Map* __pAnimationMap; + Map* __pBlackPalette; + Map* __pWhitePalette; + Map* __pDefaultPalette; + Map* __pPalette; + + Tizen::Base::Collection::IHashCodeProviderT* __pProvider; + Tizen::Base::Collection::IComparerT* __pComparer; + + Tizen::Base::String __version; + Tizen::Base::String __themeName; + Tizen::Base::String __resolution; + Tizen::Base::String __resolutionForImage; +}; +}}} + +#endif // _FUI_INTERNAL_RESOURCE_MAP_CONTAINER_H_ \ No newline at end of file diff --git a/src/ui/inc/FUi_ResourceMessageBoxConfig.h b/src/ui/inc/FUi_ResourceMessageBoxConfig.h new file mode 100644 index 0000000..a6a9989 --- /dev/null +++ b/src/ui/inc/FUi_ResourceMessageBoxConfig.h @@ -0,0 +1,86 @@ +// +// 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_ResourceMessageBoxConfig.h + * @brief This is the implementation file for the color/shape properties of MessageBox. + */ +#ifndef _FUI_RESOURCE_MESSAGEBOX_CONFIG_H_ +#define _FUI_RESOURCE_MESSAGEBOX_CONFIG_H_ + +#include "FUi_ResourceConfigMacro.h" + +DECLARE_UI_CONFIG(MESSAGEBOX); + DECLARE_COLOR_CONFIG(BG_NORMAL, 1); + DECLARE_COLOR_CONFIG(TITLE_TEXT_NORMAL, 2); + DECLARE_COLOR_CONFIG(TEXT_NORMAL, 3); + DECLARE_COLOR_CONFIG(BOTTOM_BG_NORMAL, 4); + DECLARE_COLOR_CONFIG(TITLE_BG_NORMAL, 5); + DECLARE_COLOR_CONFIG(BOTTOM_BUTTON_BG_NORMAL, 6); + DECLARE_COLOR_CONFIG(BOTTOM_BUTTON_BG_PRESSED, 7); + DECLARE_COLOR_CONFIG(BOTTOM_BUTTON_BG_DISABLED, 8); + DECLARE_COLOR_CONFIG(BOTTOM_BUTTON_BG_HIGHLIGHTED, 9); + DECLARE_COLOR_CONFIG(BOTTOM_BUTTON_TEXT_NORMAL, 10); + DECLARE_COLOR_CONFIG(BOTTOM_BUTTON_TEXT_PRESSED, 11); + DECLARE_COLOR_CONFIG(BOTTOM_BUTTON_TEXT_DISABLED, 12); + DECLARE_COLOR_CONFIG(BOTTOM_BUTTON_TEXT_HIGHLIGHTED, 13); + DECLARE_IMAGE_CONFIG(BG_NORMAL, 1); + DECLARE_IMAGE_CONFIG(BG_OUTLINE_EFFECT_NORMAL, 2); + DECLARE_IMAGE_CONFIG(BG_BUTTON_AREA, 3); + DECLARE_IMAGE_CONFIG(BG_BUTTON_EFFECT, 4); + DECLARE_IMAGE_CONFIG(BG_TITLE_AREA, 5); + DECLARE_IMAGE_CONFIG(BG_TITLE_EFFECT, 6); + DECLARE_IMAGE_CONFIG(BOTTOM_BUTTON_BG_NORMAL, 7); + DECLARE_IMAGE_CONFIG(BOTTOM_BUTTON_BG_PRESSED, 8); + DECLARE_IMAGE_CONFIG(BOTTOM_BUTTON_BG_DISABLED, 9); + DECLARE_IMAGE_CONFIG(BOTTOM_BUTTON_BG_HIGHLIGHTED, 10); + DECLARE_IMAGE_CONFIG(BOTTOM_BUTTON_NORMAL_EFFECT, 11); + DECLARE_IMAGE_CONFIG(BOTTOM_BUTTON_PRESSED_EFFECT, 12); + DECLARE_IMAGE_CONFIG(BOTTOM_BUTTON_DISABLED_EFFECT, 13); + + DECLARE_FIXED_VALUE_CONFIG(TEXT_MAX_LENGTH, 1); + DECLARE_SHAPE_CONFIG(MIN_WIDTH, 1); + DECLARE_SHAPE_CONFIG(MIN_HEIGHT, 2); + DECLARE_SHAPE_CONFIG(DEFAULT_WIDTH, 3); + DECLARE_SHAPE_CONFIG(MAX_HEIGHT, 4); + DECLARE_SHAPE_CONFIG(TITLE_HEIGHT, 5); + DECLARE_SHAPE_CONFIG(TITLE_TEXT_SIZE, 6); + DECLARE_SHAPE_CONFIG(TITLE_TEXT_TOP_MARGIN, 7); + DECLARE_SHAPE_CONFIG(TITLE_TEXT_LEFT_MARGIN, 8); + DECLARE_SHAPE_CONFIG(TITLE_TEXT_RIGHT_MARGIN, 9); + DECLARE_SHAPE_CONFIG(BOTTOM_HEIGHT, 10); + DECLARE_SHAPE_CONFIG(TEXT_SIZE, 11); + DECLARE_SHAPE_CONFIG(TEXT_LEFT_MARGIN, 12); + DECLARE_SHAPE_CONFIG(TEXT_RIGHT_MARGIN, 13); + DECLARE_SHAPE_CONFIG(TEXT_TOP_MRAGIN_NO_BUTTON, 14); + DECLARE_SHAPE_CONFIG(TEXT_TOP_MRAGIN, 15); + DECLARE_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_TOP_MARGIN, 16); + DECLARE_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_BOTTOM_MARGIN, 17); + DECLARE_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_LEFT_MARGIN, 18); + DECLARE_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_RIGHT_MARGIN, 19); + DECLARE_SHAPE_CONFIG(BUTTON_HEIGHT, 20); + DECLARE_SHAPE_CONFIG(BUTTON_INTERNAL_GAP, 21); + DECLARE_SHAPE_CONFIG(BUTTON_TOP_MARGIN, 22); + DECLARE_SHAPE_CONFIG(BUTTON_BOTTOM_MARGIN, 23); + DECLARE_SHAPE_CONFIG(BUTTON_SIDE_MARGIN_01, 24); + DECLARE_SHAPE_CONFIG(BUTTON_SIDE_MARGIN_02, 25); + DECLARE_SHAPE_CONFIG(BUTTON_SIDE_MARGIN_03, 26); + DECLARE_SHAPE_CONFIG(TEXT_HEIGHT, 27); + DECLARE_SHAPE_CONFIG(MIN_TITLE_TEXT_SIZE, 28); +DECLARE_END_UI_CONFIG(MESSAGEBOX); + +#endif //_FUI_RESOURCE_MESSAGEBOX_CONFIG_H_ diff --git a/src/ui/inc/FUi_ResourceOptionMenuConfig.h b/src/ui/inc/FUi_ResourceOptionMenuConfig.h new file mode 100644 index 0000000..614e2bd --- /dev/null +++ b/src/ui/inc/FUi_ResourceOptionMenuConfig.h @@ -0,0 +1,79 @@ +// +// 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_ResourceOptionMenuConfig.cpp + * @brief This is the implementation file for the color, image and shape properties of OptionMenu. + */ +#ifndef _FUI_RESOURCE_OPTION_MENU_CONFIG_H_ +#define _FUI_RESOURCE_OPTION_MENU_CONFIG_H_ + +#include "FUi_ResourceConfigMacro.h" + +DECLARE_UI_CONFIG(OPTIONMENU); + DECLARE_COLOR_CONFIG(BG_NORMAL, 1); + DECLARE_COLOR_CONFIG(ITEM_BG_NORMAL, 2); + DECLARE_COLOR_CONFIG(ITEM_BG_PRESSED, 3); + DECLARE_COLOR_CONFIG(ITEM_BG_HIGHLIGHTED, 4); + DECLARE_COLOR_CONFIG(ITEM_BG_DISABLED, 5); + DECLARE_COLOR_CONFIG(ITEM_TEXT_NORMAL, 6); + DECLARE_COLOR_CONFIG(ITEM_TEXT_PRESSED, 7); + DECLARE_COLOR_CONFIG(ITEM_TEXT_DISABLED, 8); + DECLARE_COLOR_CONFIG(ITEM_TEXT_HIGHLIGHTED, 9); + DECLARE_COLOR_CONFIG(CONTEXTUAL_POPUP_ARROW_NORMAL, 10); + DECLARE_COLOR_CONFIG(CONTEXTUAL_POPUP_ARROW_PRESSED, 11); + DECLARE_COLOR_CONFIG(CONTEXTUAL_POPUP_ARROW_HIGHLIGHTED, 12); + DECLARE_COLOR_CONFIG(CONTEXTUAL_POPUP_ARROW_DISABLED, 13); + DECLARE_COLOR_CONFIG(LIST_ITEM_DIVIDER_01_NORMAL, 14); + DECLARE_COLOR_CONFIG(LIST_ITEM_DIVIDER_02_NORMAL, 15); + + DECLARE_IMAGE_CONFIG(BG_NORMAL, 1); + DECLARE_IMAGE_CONFIG(BG_EFFECT, 2); + DECLARE_IMAGE_CONFIG(ITEM_BG_PRESSED, 3); + DECLARE_IMAGE_CONFIG(CONTEXTUAL_POPUP_ARROW, 4); + + DECLARE_SHAPE_CONFIG(MAX_VISIBLE_ITEM_COUNT, 1); + DECLARE_SHAPE_CONFIG(TEXT_SIZE, 2); + DECLARE_SHAPE_CONFIG(TEXT_LEFT_MARGIN, 3); + DECLARE_SHAPE_CONFIG(TEXT_RIGHT_MARGIN, 4); + DECLARE_SHAPE_CONFIG(TEXT_TOP_MARGIN, 5); + DECLARE_SHAPE_CONFIG(TEXT_BOTTOM_MARGIN, 6); + DECLARE_SHAPE_CONFIG(LEFT_MARGIN, 7); + DECLARE_SHAPE_CONFIG(RIGHT_MARGIN, 8); + DECLARE_SHAPE_CONFIG(ARROW_MARGIN, 9); + DECLARE_SHAPE_CONFIG(ITEM_HEIGHT, 10); + DECLARE_SHAPE_CONFIG(LIST_MAX_WIDTH, 11); + DECLARE_SHAPE_CONFIG(ITEM_MAX_COUNT, 12); + DECLARE_SHAPE_CONFIG(LIST_MIN_WIDTH, 13); + DECLARE_SHAPE_CONFIG(LIST_ITEM_HEIGHT, 14); + DECLARE_SHAPE_CONFIG(LIST_DIVIDER_HEIGHT, 15); + DECLARE_SHAPE_CONFIG(ITEM_BG_PRESSED_MARGIN, 16); + DECLARE_SHAPE_CONFIG(LIST_ITEM_GAP, 17); + DECLARE_SHAPE_CONFIG(LIST_LEFT_MARGIN, 18); + DECLARE_SHAPE_CONFIG(LIST_RIGHT_MARGIN, 19); + DECLARE_SHAPE_CONFIG(LIST_TOP_MARGIN, 20); + DECLARE_SHAPE_CONFIG(LIST_BOTTOM_MARGIN, 21); + DECLARE_SHAPE_CONFIG(LIST_ICON_WIDTH, 22); + DECLARE_SHAPE_CONFIG(LIST_ICON_HEIGHT, 23); + DECLARE_SHAPE_CONFIG(LIST_ITEM_FONT_SIZE, 24); + DECLARE_SHAPE_CONFIG(ITEM_BG_PRESSED_LEFT_RIGHT_MARGIN, 25); + DECLARE_SHAPE_CONFIG(ITEM_BG_PRESSED_TOP_BOTTOM_MARGIN, 26); + DECLARE_SHAPE_CONFIG(SCROLL_PANEL_MARGIN, 27); + DECLARE_SHAPE_CONFIG(ANIMATION_DISTANCE_Y, 28); + +DECLARE_END_UI_CONFIG(OPTIONMENU); + +#endif //_FUI_RESOURCE_OPTION_MENU_CONFIG_H_ diff --git a/src/ui/inc/FUi_ResourceOverlayPanelConfig.h b/src/ui/inc/FUi_ResourceOverlayPanelConfig.h new file mode 100644 index 0000000..35634be --- /dev/null +++ b/src/ui/inc/FUi_ResourceOverlayPanelConfig.h @@ -0,0 +1,26 @@ +// +// 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. +// +#ifndef _FUI_RESOURCE_OVERLAY_PANEL_CONFIG_H_ +#define _FUI_RESOURCE_OVERLAY_PANEL_CONFIG_H_ + +#include "FUi_ResourceConfigMacro.h" + +DECLARE_UI_CONFIG(OVERLAYPANEL); + DECLARE_SHAPE_CONFIG(MIN_RENDERER_SIZE, 1); +DECLARE_END_UI_CONFIG(OVERLAYPANEL); + +#endif //_FUI_RESOURCE_OVERLAY_PANEL_CONFIG_H_ \ No newline at end of file diff --git a/src/ui/inc/FUi_ResourcePanelConfig.h b/src/ui/inc/FUi_ResourcePanelConfig.h new file mode 100644 index 0000000..aa5f30b --- /dev/null +++ b/src/ui/inc/FUi_ResourcePanelConfig.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. +// +#ifndef _FUI_RESOURCE_PANEL_CONFIG_H_ +#define _FUI_RESOURCE_PANEL_CONFIG_H_ + +#include "FUi_ResourceConfigMacro.h" + +DECLARE_UI_CONFIG(PANEL); + DECLARE_COLOR_CONFIG(GROUPED_STYLE_BG_NORMAL, 1); + DECLARE_COLOR_CONFIG(GROUPED_STYLE_BG_PRESSED, 2); + DECLARE_IMAGE_CONFIG(GROUPED_SINGLE_BG_EFFECT_NORMAL, 1); + DECLARE_IMAGE_CONFIG(GROUPED_SINGLE_BG_EFFECT_PRESSED, 2); + DECLARE_IMAGE_CONFIG(GROUPED_SINGLE_BG_EFFECT_SELECTED, 3); + DECLARE_IMAGE_CONFIG(GROUPED_SINGLE_BG_NORMAL, 4); + DECLARE_IMAGE_CONFIG(GROUPED_SINGLE_BG_DISABLED, 5); + DECLARE_IMAGE_CONFIG(GROUPED_SINGLE_BG_PRESSED, 6); + DECLARE_IMAGE_CONFIG(GROUPED_SINGLE_BG_HIGHLIGHTED, 7); + DECLARE_IMAGE_CONFIG(GROUPED_SINGLE_BG_SELECTED, 8); + DECLARE_IMAGE_CONFIG(GROUPED_TOP_BG_EFFECT_NORMAL, 9); + DECLARE_IMAGE_CONFIG(GROUPED_TOP_BG_EFFECT_PRESSED, 10); + DECLARE_IMAGE_CONFIG(GROUPED_TOP_BG_EFFECT_SELECTED, 11); + DECLARE_IMAGE_CONFIG(GROUPED_TOP_BG_NORMAL, 12); + DECLARE_IMAGE_CONFIG(GROUPED_TOP_BG_DISABLED, 13); + DECLARE_IMAGE_CONFIG(GROUPED_TOP_BG_PRESSED, 14); + DECLARE_IMAGE_CONFIG(GROUPED_TOP_BG_HIGHLIGHTED, 15); + DECLARE_IMAGE_CONFIG(GROUPED_TOP_BG_SELECTED, 16); + DECLARE_IMAGE_CONFIG(GROUPED_MIDDLE_BG_EFFECT_NORMAL, 17); + DECLARE_IMAGE_CONFIG(GROUPED_MIDDLE_BG_EFFECT_PRESSED, 18); + DECLARE_IMAGE_CONFIG(GROUPED_MIDDLE_BG_EFFECT_SELECTED, 19); + DECLARE_IMAGE_CONFIG(GROUPED_MIDDLE_BG_NORMAL, 20); + DECLARE_IMAGE_CONFIG(GROUPED_MIDDLE_BG_DISABLED, 21); + DECLARE_IMAGE_CONFIG(GROUPED_MIDDLE_BG_PRESSED, 22); + DECLARE_IMAGE_CONFIG(GROUPED_MIDDLE_BG_HIGHLIGHTED, 23); + DECLARE_IMAGE_CONFIG(GROUPED_MIDDLE_BG_SELECTED, 24); + DECLARE_IMAGE_CONFIG(GROUPED_BOTTOM_BG_EFFECT_NORMAL, 25); + DECLARE_IMAGE_CONFIG(GROUPED_BOTTOM_BG_EFFECT_PRESSED, 26); + DECLARE_IMAGE_CONFIG(GROUPED_BOTTOM_BG_EFFECT_SELECTED, 27); + DECLARE_IMAGE_CONFIG(GROUPED_BOTTOM_BG_NORMAL, 28); + DECLARE_IMAGE_CONFIG(GROUPED_BOTTOM_BG_DISABLED, 29); + DECLARE_IMAGE_CONFIG(GROUPED_BOTTOM_BG_PRESSED, 30); + DECLARE_IMAGE_CONFIG(GROUPED_BOTTOM_BG_HIGHLIGHTED, 31); + DECLARE_IMAGE_CONFIG(GROUPED_BOTTOM_BG_SELECTED, 32); +DECLARE_END_UI_CONFIG(PANEL); + +#endif //_FUI_RESOURCE_PANEL_CONFIG_H_ diff --git a/src/ui/inc/FUi_ResourcePopupConfig.h b/src/ui/inc/FUi_ResourcePopupConfig.h new file mode 100644 index 0000000..7492c64 --- /dev/null +++ b/src/ui/inc/FUi_ResourcePopupConfig.h @@ -0,0 +1,64 @@ +// +// 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_ResourcePopupConfig.h + * @brief This is the implementation file for the color/shape properties of Popup. + */ +#ifndef _FUI_RESOURCE_POPUP_CONFIG_H_ +#define _FUI_RESOURCE_POPUP_CONFIG_H_ + +#include "FUi_ResourceConfigMacro.h" + +DECLARE_UI_CONFIG(POPUP); + DECLARE_COLOR_CONFIG(BG_NORMAL, 1); + DECLARE_COLOR_CONFIG(TITLE_TEXT_NORMAL, 2); + DECLARE_COLOR_CONFIG(TITLE_BG_NORMAL, 3); + DECLARE_IMAGE_CONFIG(BG_NORMAL, 1); + DECLARE_IMAGE_CONFIG(BG_OUTLINE_EFFECT_NORMAL, 2); + DECLARE_IMAGE_CONFIG(BG_TITLE_AREA, 3); + DECLARE_IMAGE_CONFIG(BG_TITLE_EFFECT, 4); + DECLARE_ANIMATION_CONFIG(PROCESSING_ANIMATION, 1); + DECLARE_DIMENSION_CONFIG(MIN_SIZE, 1); + DECLARE_DIMENSION_CONFIG(MIN_SIZE_WITH_TITLE, 2); + DECLARE_DIMENSION_CONFIG(MIN_SIZE_EXCEPT_TRANSPARENT_MARGIN, 3); + DECLARE_SHAPE_CONFIG(TITLE_HEIGHT, 1); + DECLARE_SHAPE_CONFIG(TITLE_TEXT_SIZE, 2); + DECLARE_SHAPE_CONFIG(TITLE_TEXT_TOP_MARGIN, 3); + DECLARE_SHAPE_CONFIG(TITLE_TEXT_LEFT_MARGIN, 4); + DECLARE_SHAPE_CONFIG(TITLE_TEXT_RIGHT_MARGIN, 5); + DECLARE_SHAPE_CONFIG(TOP_BORDER, 6); + DECLARE_SHAPE_CONFIG(BOTTOM_BORDER, 7); + DECLARE_SHAPE_CONFIG(SIDE_BORDER, 8); + DECLARE_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_TOP_MARGIN, 9); + DECLARE_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_BOTTOM_MARGIN, 10); + DECLARE_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_LEFT_MARGIN, 11); + DECLARE_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_RIGHT_MARGIN, 12); + DECLARE_SHAPE_CONFIG(OUTLINE_BORDER, 13); + DECLARE_SHAPE_CONFIG(PROCESS_ANIMATION_WIDTH, 14); + DECLARE_SHAPE_CONFIG(PROCESS_ANIMATION_NO_TITLE_TOP_MARGIN, 15); + DECLARE_SHAPE_CONFIG(PROCESS_TEXT_TOP_MARGIN, 16); + DECLARE_SHAPE_CONFIG(PROCESS_TEXT_BOTTOM_MARGIN, 17); + DECLARE_SHAPE_CONFIG(BG_OUTLINE_EFFECT_TOP_MARGIN, 18); + DECLARE_SHAPE_CONFIG(BG_OUTLINE_EFFECT_BOTTOM_MARGIN, 19); + DECLARE_SHAPE_CONFIG(BG_OUTLINE_EFFECT_LEFT_MARGIN, 20); + DECLARE_SHAPE_CONFIG(BG_OUTLINE_EFFECT_RIGHT_MARGIN, 21); + DECLARE_SHAPE_CONFIG(BODY_TEXT_HEIGHT, 22); + DECLARE_SHAPE_CONFIG(PROCESS_ANIMATION_WITH_TITLE_TOP_MARGIN, 23); + DECLARE_SHAPE_CONFIG(MIN_TITLE_TEXT_SIZE, 24); +DECLARE_END_UI_CONFIG(POPUP); +#endif //_FUI_RESOURCE_POPUP_CONFIG_H_ diff --git a/src/ui/inc/FUi_ResourceProgressConfig.h b/src/ui/inc/FUi_ResourceProgressConfig.h new file mode 100644 index 0000000..a463eb0 --- /dev/null +++ b/src/ui/inc/FUi_ResourceProgressConfig.h @@ -0,0 +1,41 @@ +// +// 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_ResourceSliderConfig.cpp + * @brief This is a configuration file for color, image and shape values of Slider, Progress. + */ +#ifndef _FUI_RESOURCE_PROGRESS_CONFIG_H_ +#define _FUI_RESOURCE_PROGRESS_CONFIG_H_ + +#include "FUi_ResourceConfigMacro.h" + +DECLARE_UI_CONFIG(PROGRESS); + DECLARE_COLOR_CONFIG(BAR_BG_NORMAL, 1); + DECLARE_COLOR_CONFIG(BAR_NORMAL, 2); + DECLARE_IMAGE_CONFIG(BAR_BG_NORMAL, 1); + DECLARE_IMAGE_CONFIG(BAR_NORMAL, 2); + DECLARE_IMAGE_CONFIG(BAR_BG_EFFECT, 3); + DECLARE_IMAGE_CONFIG(BAR_EFFECT, 4); + DECLARE_SHAPE_CONFIG(BAR_HEIGHT, 1); + DECLARE_SHAPE_CONFIG(BAR_LEFT_MARGIN, 2); + DECLARE_SHAPE_CONFIG(BAR_OFFSET, 3); + DECLARE_SHAPE_CONFIG(MINIMUM_WIDTH, 4); + DECLARE_SHAPE_CONFIG(MINIMUM_HEIGHT, 5); +DECLARE_END_UI_CONFIG(PROGRESS); + +#endif //_FUI_RESOURCE_PROGRESS_CONFIG_H_ \ No newline at end of file diff --git a/src/ui/inc/FUi_ResourceRadioGroupConfig.h b/src/ui/inc/FUi_ResourceRadioGroupConfig.h new file mode 100644 index 0000000..e9bff7b --- /dev/null +++ b/src/ui/inc/FUi_ResourceRadioGroupConfig.h @@ -0,0 +1,30 @@ +// +// 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_ResourceRadioGroupConfig.cpp + * @brief This is the implementation file for the properties of RadioGroup. + */ +#ifndef _FUI_RESOURCE_RADIO_GROUP_CONFIG_H_ +#define _FUI_RESOURCE_RADIO_GROUP_CONFIG_H_ + +#include "FUi_ResourceConfigMacro.h" + +DECLARE_UI_CONFIG(RADIOGROUP); + DECLARE_DIMENSION_CONFIG(MIN_SIZE, 1); +DECLARE_END_UI_CONFIG(RADIOGROUP); + +#endif //_FUI_RESOURCE_RADIO_GROUP_CONFIG_H_ \ No newline at end of file diff --git a/src/ui/inc/FUi_ResourceScrollConfig.h b/src/ui/inc/FUi_ResourceScrollConfig.h new file mode 100644 index 0000000..7926525 --- /dev/null +++ b/src/ui/inc/FUi_ResourceScrollConfig.h @@ -0,0 +1,73 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +#ifndef _FUI_RESOURCE_SCROLL_CONFIG_H_ +#define _FUI_RESOURCE_SCROLL_CONFIG_H_ + +#include "FUi_ResourceConfigMacro.h" + +DECLARE_UI_CONFIG(SCROLL); + DECLARE_COLOR_CONFIG(THUMB_BG_NORMAL, 1); + DECLARE_COLOR_CONFIG(JUMP_TO_TOP_NORMAL, 2); + DECLARE_COLOR_CONFIG(JUMP_TO_TOP_PRESSED, 3); + DECLARE_COLOR_CONFIG(BUTTON_BG_NORMAL, 4); + DECLARE_COLOR_CONFIG(BUTTON_BG_PRESSED, 5); + DECLARE_IMAGE_CONFIG(THUMB_HORIZONTAL_BG_NORMAL, 1); + DECLARE_IMAGE_CONFIG(THUMB_HORIZONTAL_EFFECT, 2); + DECLARE_IMAGE_CONFIG(THUMB_VERTICAL_BG_NORMAL, 3); + DECLARE_IMAGE_CONFIG(THUMB_VERTICAL_EFFECT, 4); + DECLARE_IMAGE_CONFIG(JUMP_TO_TOP_NORMAL, 5); + DECLARE_IMAGE_CONFIG(JUMP_TO_TOP_PRESSED, 6); + DECLARE_IMAGE_CONFIG(JUMP_TO_TOP_EFFECT, 7); + DECLARE_IMAGE_CONFIG(JUMP_TO_LEFT_NORMAL, 8); + DECLARE_IMAGE_CONFIG(JUMP_TO_LEFT_PRESSED, 9); + DECLARE_IMAGE_CONFIG(JUMP_TO_LEFT_EFFECT, 10); + DECLARE_IMAGE_CONFIG(BUTTON_BG_NORMAL, 11); + DECLARE_IMAGE_CONFIG(BUTTON_BG_NORMAL_EFFECT, 12); + DECLARE_IMAGE_CONFIG(BUTTON_BG_PRESSED, 13); + DECLARE_IMAGE_CONFIG(BUTTON_BG_PRESSED_EFFECT, 14); + DECLARE_IMAGE_CONFIG(HANDLER_BG, 15); + DECLARE_IMAGE_CONFIG(HANDLER_BG_EFFECT, 16); + DECLARE_IMAGE_CONFIG(HANDLER_HORIZONTAL, 17); + DECLARE_IMAGE_CONFIG(HANDLER_VERTICAL, 18); + DECLARE_IMAGE_CONFIG(OVERSCROLLING_TOP_BG, 19); + DECLARE_IMAGE_CONFIG(OVERSCROLLING_BOTTOM_BG, 20); + DECLARE_IMAGE_CONFIG(OVERSCROLLING_LEFT_BG, 21); + DECLARE_IMAGE_CONFIG(OVERSCROLLING_RIGHT_BG, 22); + DECLARE_IMAGE_CONFIG(CONTEXTTHUMB_NORMAL, 23); + DECLARE_SHAPE_CONFIG(VERTICAL_THUMB_MIN_WIDTH, 1); + DECLARE_SHAPE_CONFIG(VERTICAL_THUMB_MIN_HEIGHT, 2); + DECLARE_SHAPE_CONFIG(VERTICAL_THUMB_MARGIN, 3); + DECLARE_SHAPE_CONFIG(HORIZONTAL_THUMB_MIN_WIDTH, 4); + DECLARE_SHAPE_CONFIG(HORIZONTAL_THUMB_MIN_HEIGHT, 5); + DECLARE_SHAPE_CONFIG(HORIZONTAL_THUMB_MARGIN, 6); + DECLARE_SHAPE_CONFIG(JUMP_TO_TOP_RIGHT_MARGIN, 7); + DECLARE_SHAPE_CONFIG(JUMP_TO_TOP_TOP_MARGIN, 8); + DECLARE_SHAPE_CONFIG(HANDLER_MARGIN, 9); + DECLARE_SHAPE_CONFIG(HANDLER_MIN_WIDTH, 10); + DECLARE_SHAPE_CONFIG(HANDLER_MIN_HEIGHT, 11); + DECLARE_SHAPE_CONFIG(OVERSCROLLING_TOP_HEIGHT, 12); + DECLARE_SHAPE_CONFIG(OVERSCROLLING_BOTTOM_HEIGHT, 13); + DECLARE_SHAPE_CONFIG(OVERSCROLLING_LEFT_WIDTH, 14); + DECLARE_SHAPE_CONFIG(OVERSCROLLING_RIGHT_WIDTH, 15); + DECLARE_SHAPE_CONFIG(CONTEXTTHUMB_MIN_WIDTH, 16); + DECLARE_SHAPE_CONFIG(CONTEXTTHUMB_MIN_HEIGHT, 17); + DECLARE_SHAPE_CONFIG(CONTEXTTHUMB_MARGIN, 18); + DECLARE_FIXED_VALUE_CONFIG(JUMP_TO_TOP_WIDTH, 1); + DECLARE_FIXED_VALUE_CONFIG(JUMP_TO_TOP_HEIGHT, 2); +DECLARE_END_UI_CONFIG(SCROLL); + +#endif //_FUI_RESOURCE_SCROLL_CONFIG_H_ diff --git a/src/ui/inc/FUi_ResourceSearchBarConfig.h b/src/ui/inc/FUi_ResourceSearchBarConfig.h new file mode 100644 index 0000000..a5aa4fc --- /dev/null +++ b/src/ui/inc/FUi_ResourceSearchBarConfig.h @@ -0,0 +1,81 @@ +// +// 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_ResourceSearchBarConfig.cpp + * @brief This is a configuration file for color, image and shape values of SearchBar. + */ +#ifndef _FUI_RESOURCE_SEARCH_BAR_CONFIG_H_ +#define _FUI_RESOURCE_SEARCH_BAR_CONFIG_H_ + +#include "FUi_ResourceConfigMacro.h" + +DECLARE_UI_CONFIG(SEARCHBAR); + DECLARE_COLOR_CONFIG(BUTTON_BG_NORMAL, 1); + DECLARE_COLOR_CONFIG(BUTTON_BG_PRESSED, 2); + DECLARE_COLOR_CONFIG(BUTTON_BG_DISABLED, 3); + DECLARE_COLOR_CONFIG(BUTTON_BG_HIGHLIGHTED, 4); + DECLARE_COLOR_CONFIG(BUTTON_TEXT_NORMAL, 5); + DECLARE_COLOR_CONFIG(BUTTON_TEXT_PRESSED, 6); + DECLARE_COLOR_CONFIG(BUTTON_TEXT_DISABLED, 7); + DECLARE_COLOR_CONFIG(BUTTON_TEXT_HIGHLIGHTED, 8); + DECLARE_COLOR_CONFIG(EDIT_BG_NORMAL, 9); + DECLARE_COLOR_CONFIG(EDIT_BG_DISABLED, 10); + DECLARE_COLOR_CONFIG(GUIDE_TEXT_NORMAL, 11); + DECLARE_COLOR_CONFIG(GUIDE_TEXT_DISABLED, 12); + DECLARE_COLOR_CONFIG(EDIT_TEXT_PRESSED, 13); + DECLARE_COLOR_CONFIG(ICON_BG_NORMAL, 14); + DECLARE_COLOR_CONFIG(ICON_BG_DISABLED, 15); + DECLARE_COLOR_CONFIG(CONTENT_AREA_BG_NORMAL, 16); + DECLARE_COLOR_CONFIG(EDIT_TEXT_NORMAL, 17); + DECLARE_COLOR_CONFIG(EDIT_TEXT_DISABLED, 18); + DECLARE_COLOR_CONFIG(EDIT_TEXT_HIGHLIGHTED, 19); + DECLARE_COLOR_CONFIG(EDIT_BG_FOCUS, 20); + DECLARE_COLOR_CONFIG(EDIT_BG_PRESSED, 21); + DECLARE_COLOR_CONFIG(EDIT_BG_HIGHLIGHTED, 22); + DECLARE_COLOR_CONFIG(BG_NORMAL, 23); + + DECLARE_IMAGE_CONFIG(EDIT_BG_NORMAL, 1); + DECLARE_IMAGE_CONFIG(EDIT_BG_DISABLED, 2); + DECLARE_IMAGE_CONFIG(EDIT_BG_HIGHLIGHTED, 3); + DECLARE_IMAGE_CONFIG(EDIT_BG_PRESSED, 4); + DECLARE_IMAGE_CONFIG(EDIT_BG_FOCUS, 5); + DECLARE_IMAGE_CONFIG(EDIT_BG_EFFECT, 6); + DECLARE_IMAGE_CONFIG(ICON_NORMAL, 7); + DECLARE_IMAGE_CONFIG(ICON_EFFECT_NORMAL, 8); + DECLARE_IMAGE_CONFIG(ICON_DISABLED, 9); + DECLARE_IMAGE_CONFIG(BG_NORMAL, 10); + DECLARE_IMAGE_CONFIG(BG_NORMAL_EFFECT, 11); + DECLARE_SHAPE_CONFIG(HORIZONTAL_MARGIN, 1); + DECLARE_SHAPE_CONFIG(VERTICAL_MARGIN, 2); + DECLARE_SHAPE_CONFIG(TEXT_HORIZONTAL_MARGIN, 3); + DECLARE_SHAPE_CONFIG(ICON_HORIZONTAL_MARGIN, 4); + DECLARE_SHAPE_CONFIG(ICON_WIDTH, 5); + DECLARE_SHAPE_CONFIG(ICON_HEIGHT, 6); + DECLARE_SHAPE_CONFIG(MIN_HEIGHT, 7); + DECLARE_SHAPE_CONFIG(SEARCH_FIELD_MIN_WIDTH, 8); + DECLARE_SHAPE_CONFIG(BUTTON_WIDTH, 9); + DECLARE_SHAPE_CONFIG(BUTTON_MIN_WIDTH, 10); + DECLARE_SHAPE_CONFIG(BUTTON_HEIGHT, 11); + DECLARE_SHAPE_CONFIG(BUTTON_LEFT_MARGIN, 12); + DECLARE_SHAPE_CONFIG(BUTTON_RIGHT_MARGIN, 13); + DECLARE_SHAPE_CONFIG(EDIT_TEXT_SIZE, 14); + DECLARE_SHAPE_CONFIG(BUTTON_TEXT_SIZE, 15); + DECLARE_SHAPE_CONFIG(SEARCH_FIELD_MIN_WIDTH_NORMAL_MODE, 16); +DECLARE_END_UI_CONFIG(SEARCHBAR); + +#endif //_FUI_RESOURCE_SEARCH_BAR_CONFIG_H_ diff --git a/src/ui/inc/FUi_ResourceSizeInfo.h b/src/ui/inc/FUi_ResourceSizeInfo.h new file mode 100644 index 0000000..42081a1 --- /dev/null +++ b/src/ui/inc/FUi_ResourceSizeInfo.h @@ -0,0 +1,78 @@ +// +// 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_ResourceSizeInfo.h + * @brief This is the header file for _ResourceSizeInfo class. + * @version 3.0 + * + * This header file contains declaration of _ResourceSizeInfo class. + * The ActionEvent class can call listener's method. So, when event occurred, + * application can handle it appropriately. + * + */ +#ifndef _FUI_INTERNAL_RESOURCE_SIZE_INFO_H_ +#define _FUI_INTERNAL_RESOURCE_SIZE_INFO_H_ + +#include +#include +#include "FUi_ControlImpl.h" + + +#define GET_SIZE_INFO(x) Tizen::Ui::_Resource::SizeInfo::Get##x##SizeInfo() +#define FUNC_SIZE_INFO(x) Tizen::Ui::_Resource::SizeInfo::Get##x##SizeInfo + +namespace Tizen { namespace Ui { namespace _Resource +{ + +class _OSP_EXPORT_ SizeInfo +{ +public: + static Tizen::Ui::_ControlImpl::SizeInfo& GetButtonSizeInfo(void); + static Tizen::Ui::_ControlImpl::SizeInfo& GetCheckButtonSizeInfo(void); + static Tizen::Ui::_ControlImpl::SizeInfo& GetLabelSizeInfo(void); + static Tizen::Ui::_ControlImpl::SizeInfo& GetRadioGroupSizeInfo(void); + static Tizen::Ui::_ControlImpl::SizeInfo& GetColorPickerSizeInfo(void); + static Tizen::Ui::_ControlImpl::SizeInfo& GetDatePickerSizeInfo(void); + static Tizen::Ui::_ControlImpl::SizeInfo& GetDateTimePickerSizeInfo(void); + static Tizen::Ui::_ControlImpl::SizeInfo& GetFormSizeInfo(void); + static Tizen::Ui::_ControlImpl::SizeInfo& GetTimePickerSizeInfo(void); + static Tizen::Ui::_ControlImpl::SizeInfo& GetPopupSizeInfo(void); + static Tizen::Ui::_ControlImpl::SizeInfo& GetProgressSizeInfo(void); + static Tizen::Ui::_ControlImpl::SizeInfo& GetSliderSizeInfo(int sliderStyle); + static Tizen::Ui::_ControlImpl::SizeInfo& GetEditAreaSizeInfo(void); + static Tizen::Ui::_ControlImpl::SizeInfo& GetEditFieldSizeInfo(bool isSmallStyle, Tizen::Ui::Controls::EditFieldTitleStyle titleStlye = Tizen::Ui::Controls::EDIT_FIELD_TITLE_STYLE_NONE); + static Tizen::Ui::_ControlImpl::SizeInfo& GetExpandableEditAreaSizeInfo(void); + static Tizen::Ui::_ControlImpl::SizeInfo& GetSearchBarSizeInfo(void); + static Tizen::Ui::_ControlImpl::SizeInfo& GetTabBarSizeInfo(void); + static Tizen::Ui::_ControlImpl::SizeInfo& GetCustomListSizeInfo(void); + static Tizen::Ui::_ControlImpl::SizeInfo& GetExpandableListSizeInfo(void); + static Tizen::Ui::_ControlImpl::SizeInfo& GetGroupedListSizeInfo(void); + static Tizen::Ui::_ControlImpl::SizeInfo& GetListSizeInfo(void); + static Tizen::Ui::_ControlImpl::SizeInfo& GetOverlayPanelSizeInfo(void); + static Tizen::Ui::_ControlImpl::SizeInfo& GetSlidableListSizeInfo(void); + static Tizen::Ui::_ControlImpl::SizeInfo& GetSlidableGroupedListSizeInfo(void); + static Tizen::Ui::_ControlImpl::SizeInfo& GetWebSizeInfo(void); + static Tizen::Ui::_ControlImpl::SizeInfo& GetMapSizeInfo(void); + static Tizen::Ui::_ControlImpl::SizeInfo& GetEditDateSizeInfo(void); + static Tizen::Ui::_ControlImpl::SizeInfo& GetEditTimeSizeInfo(void); + static Tizen::Ui::_ControlImpl::SizeInfo& GetTableViewSizeInfo(void); + static Tizen::Ui::_ControlImpl::SizeInfo& GetTableViewItemSizeInfo(void); +}; + +}}}//Tizen::Ui + +#endif //_FUI_INTERNAL_RESOURCE_SIZE_INFO_H_ diff --git a/src/ui/inc/FUi_ResourceSliderConfig.h b/src/ui/inc/FUi_ResourceSliderConfig.h new file mode 100644 index 0000000..306c915 --- /dev/null +++ b/src/ui/inc/FUi_ResourceSliderConfig.h @@ -0,0 +1,93 @@ +// +// 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_ResourceSliderConfig.h + * @brief This is a configuration file for color, image and shape values of Slider, Progress. + */ +#ifndef _FUI_RESOURCE_SLIDER_CONFIG_H_ +#define _FUI_RESOURCE_SLIDER_CONFIG_H_ +#include "FUi_ResourceConfigMacro.h" + +DECLARE_UI_CONFIG(SLIDER); + DECLARE_COLOR_CONFIG(BG_OTHERS_NORMAL, 1); + DECLARE_COLOR_CONFIG(BG_DEFAULT_NORMAL, 2); + DECLARE_COLOR_CONFIG(BAR_BG_NORMAL, 3); + DECLARE_COLOR_CONFIG(BAR_NORMAL, 4); + DECLARE_COLOR_CONFIG(HANDLE_BG_NORMAL, 5); + DECLARE_COLOR_CONFIG(HANDLE_BG_PRESSED, 6); + DECLARE_COLOR_CONFIG(HANDLE_BG_DISABLED, 7); + DECLARE_COLOR_CONFIG(HANDLE_BG_HIGHLIGHTED, 8); + DECLARE_COLOR_CONFIG(HANDLE_NUMBER_TEXT_DISABLED, 9); + DECLARE_COLOR_CONFIG(HANDLE_NUMBER_TEXT_NORMAL, 10); + DECLARE_COLOR_CONFIG(TITLE_TEXT_NORMAL, 11); + DECLARE_COLOR_CONFIG(OVERLAY_BG_NORMAL, 12); + DECLARE_COLOR_CONFIG(OVERLAY_TEXT_NORMAL, 13); + DECLARE_COLOR_CONFIG(HANDLE_NUMBER_TEXT_PRESSED, 14); + DECLARE_COLOR_CONFIG(HANDLE_NUMBER_TEXT_HIGHLIGHTED, 15); + DECLARE_IMAGE_CONFIG(BAR_BG_NORMAL, 1); + DECLARE_IMAGE_CONFIG(BAR_NORMAL, 2); + DECLARE_IMAGE_CONFIG(BAR_BG_EFFECT, 3); + DECLARE_IMAGE_CONFIG(BAR_EFFECT, 4); + DECLARE_IMAGE_CONFIG(HANDLE_BG_NORMAL, 5); + DECLARE_IMAGE_CONFIG(HANDLE_BG_PRESSED, 6); + DECLARE_IMAGE_CONFIG(HANDLE_BG_DISABLED, 7); + DECLARE_IMAGE_CONFIG(HANDLE_BG_HIGHLIGHTED, 8); + DECLARE_IMAGE_CONFIG(HANDLE_BG_EFFECT_NORMAL, 9); + DECLARE_IMAGE_CONFIG(HANDLE_BG_EFFECT_PRESSED, 10); + DECLARE_IMAGE_CONFIG(HANDLE_BG_EFFECT_DISABLED, 11); + DECLARE_IMAGE_CONFIG(HANDLE_BG_EFFECT_HIGHLIGHTED, 12); + DECLARE_IMAGE_CONFIG(OVERLAY_BG_NORMAL, 13); + DECLARE_IMAGE_CONFIG(GROUPED_TOP_BG_NORMAL, 14); + DECLARE_IMAGE_CONFIG(GROUPED_MIDDLE_BG_NORMAL, 15); + DECLARE_IMAGE_CONFIG(GROUPED_BOTTOM_BG_NORMAL, 16); + DECLARE_IMAGE_CONFIG(GROUPED_TOP_BG_EFFECT_NORMAL, 17); + DECLARE_IMAGE_CONFIG(GROUPED_MIDDLE_BG_EFFECT_NORMAL, 18); + DECLARE_IMAGE_CONFIG(GROUPED_BOTTOM_BG_EFFECT_NORMAL, 19); + DECLARE_IMAGE_CONFIG(GROUPED_SINGLE_BG_NORMAL, 20); + DECLARE_IMAGE_CONFIG(GROUPED_SINGLE_BG_EFFECT_NORMAL, 21); + DECLARE_SHAPE_CONFIG(HANDLE_WIDTH, 1); + DECLARE_SHAPE_CONFIG(HANDLE_HEIGHT, 2); + DECLARE_SHAPE_CONFIG(HANDLE_ONE_DIGIT_TEXT_SIZE, 3); + DECLARE_SHAPE_CONFIG(HANDLE_TWO_DIGIT_TEXT_SIZE, 4); + DECLARE_SHAPE_CONFIG(HANDLE_THREE_DIGIT_TEXT_SIZE, 5); + DECLARE_SHAPE_CONFIG(BAR_HEIGHT, 6); + DECLARE_SHAPE_CONFIG(BAR_LEFT_MARGIN, 7); + DECLARE_SHAPE_CONFIG(TITLE_TEXT_POSITION_Y, 8); + DECLARE_SHAPE_CONFIG(BAR_OFFSET, 9); + DECLARE_SHAPE_CONFIG(ICON_WIDTH, 10); + DECLARE_SHAPE_CONFIG(ICON_HEIGHT, 11); + DECLARE_SHAPE_CONFIG(ICON_LEFT_MARGIN, 12); + DECLARE_SHAPE_CONFIG(ICON_RIGHT_MARGIN, 13); + DECLARE_SHAPE_CONFIG(TITLE_TEXT_POSITION_X, 14); + DECLARE_SHAPE_CONFIG(TITLE_TEXT_SIZE, 15); + DECLARE_SHAPE_CONFIG(TITLE_TEXT_HEIGHT, 16); + DECLARE_SHAPE_CONFIG(OVERLAY_WIDTH, 17); + DECLARE_SHAPE_CONFIG(OVERLAY_HEIGHT, 18); + DECLARE_SHAPE_CONFIG(OVERLAY_HEIGHT_WITHOUT_ARROW, 19); + DECLARE_SHAPE_CONFIG(OVERLAY_BOTTOM_MARGIN, 20); + DECLARE_SHAPE_CONFIG(OVERLAY_MARGIN, 21); + DECLARE_SHAPE_CONFIG(OVERLAY_TEXT_SIZE, 22); + DECLARE_SHAPE_CONFIG(NUMBER_SIZE, 23); + DECLARE_SHAPE_CONFIG(TEXT_SIZE, 24); + DECLARE_SHAPE_CONFIG(MINIMUM_WIDTH_WITHOUT_ICON, 25); + DECLARE_SHAPE_CONFIG(MINIMUM_WIDTH_WITH_ICON, 26); + DECLARE_SHAPE_CONFIG(MINIMUM_HEIGHT, 27); + +DECLARE_END_UI_CONFIG(SLIDER); + +#endif //_FUI_RESOURCE_SLIDER_CONFIG_H_ diff --git a/src/ui/inc/FUi_ResourceSplitPanelConfig.h b/src/ui/inc/FUi_ResourceSplitPanelConfig.h new file mode 100644 index 0000000..107a6c1 --- /dev/null +++ b/src/ui/inc/FUi_ResourceSplitPanelConfig.h @@ -0,0 +1,41 @@ +// +// 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_ResourceSplitPanelConfig.cpp + * @brief This is the implementation file for the color, image and shape properties of SplitPanel. + */ +#ifndef _FUI_RESOURCE_SPLIT_PANEL_CONFIG_H_ +#define _FUI_RESOURCE_SPLIT_PANEL_CONFIG_H_ + +#include "FUi_ResourceConfigMacro.h" + +DECLARE_UI_CONFIG(SPLITPANEL); + DECLARE_COLOR_CONFIG(DIVIDER_BG_NORMAL, 1); + DECLARE_COLOR_CONFIG(DIVIDER_BG_PRESSED, 2); + DECLARE_COLOR_CONFIG(DIVIDER_BG_DISABLED, 3); + DECLARE_IMAGE_CONFIG(DIVIDER_BG_NORMAL, 1); + DECLARE_IMAGE_CONFIG(VERTICAL_DIVIDER_BG_EFFECT, 2); + DECLARE_IMAGE_CONFIG(VERTICAL_DIVIDER_BG_NORMAL, 3); + DECLARE_IMAGE_CONFIG(HORIZONTAL_DIVIDER_BG_EFFECT, 4); + DECLARE_IMAGE_CONFIG(HORIZONTAL_DIVIDER_BG_NORMAL, 5); + DECLARE_SHAPE_CONFIG(FIXED_DIVIDER_THICKNESS, 1); + DECLARE_SHAPE_CONFIG(MOVABLE_DIVIDER_THICKNESS, 2); + DECLARE_SHAPE_CONFIG(EXTENDED_MOVABLE_DIVIDER_TOUCH_MARGIN, 3); +DECLARE_END_UI_CONFIG(SPLITPANEL); + +#endif //_FUI_RESOURCE_SPLIT_PANEL_CONFIG_H_ diff --git a/src/ui/inc/FUi_ResourceStringLoader.h b/src/ui/inc/FUi_ResourceStringLoader.h new file mode 100644 index 0000000..652d408 --- /dev/null +++ b/src/ui/inc/FUi_ResourceStringLoader.h @@ -0,0 +1,52 @@ +// +// 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_ResourceStringLoader.h + * @brief This is the header file for StringLoader class. + * @version 3.0 + * + * This header file contains declaration of StringLoader class. + * The ActionEvent class can call listener's method. So, when event occurred, + * application can handle it appropriately. + * + */ +#ifndef _FUI_INTERNAL_RESOURCE_STRING_LOADER_H_ +#define _FUI_INTERNAL_RESOURCE_STRING_LOADER_H_ + +namespace Tizen { namespace Base { + class String; +}}//Tizen::Base + +namespace Tizen { namespace Ui { namespace _Resource +{ + +class StringLoader +{ +public: + StringLoader(void); + virtual ~StringLoader(void); + + result GetString(const char* stringId, Tizen::Base::String& string); + +private: + //coding idiom. + StringLoader(const StringLoader&); + StringLoader& operator =(const StringLoader&); +}; + +}}}//Tizen::Ui::_Resource +#endif // _FUI_INTERNAL_RESOURCE_STRING_LOADER_H_ \ No newline at end of file diff --git a/src/ui/inc/FUi_ResourceTabBarConfig.h b/src/ui/inc/FUi_ResourceTabBarConfig.h new file mode 100644 index 0000000..d6c2eb5 --- /dev/null +++ b/src/ui/inc/FUi_ResourceTabBarConfig.h @@ -0,0 +1,58 @@ +// +// 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_ResourceTabBarConfig.h + * @brief This is the implementation file for the color properties of TabBar. + */ +#ifndef _FUI_RESOURCE_TAB_BAR_CONFIG_H_ +#define _FUI_RESOURCE_TAB_BAR_CONFIG_H_ + +#include "FUi_ResourceConfigMacro.h" + +DECLARE_UI_CONFIG(TABBAR); + DECLARE_COLOR_CONFIG(BG_NORMAL, 1); + DECLARE_COLOR_CONFIG(ITEM_BG_NORMAL, 2); + DECLARE_COLOR_CONFIG(ITEM_BG_PRESSED, 3); + DECLARE_COLOR_CONFIG(ITEM_BG_SELECTED, 4); + DECLARE_COLOR_CONFIG(ITEM_BG_DISABLED, 5); + DECLARE_COLOR_CONFIG(ITEM_TEXT_NORMAL, 6); + DECLARE_COLOR_CONFIG(ITEM_TEXT_PRESSED, 7); + DECLARE_COLOR_CONFIG(ITEM_TEXT_SELECTED, 8); + DECLARE_COLOR_CONFIG(ITEM_TEXT_DISABLED, 9); + DECLARE_COLOR_CONFIG(ARROW_BG_NORMAL, 10); + DECLARE_IMAGE_CONFIG(BG_NORMAL, 1); + DECLARE_IMAGE_CONFIG(BG_OUTLINE_EFFECT_NORMAL, 2); + DECLARE_IMAGE_CONFIG(LEFT_ARROW_NORMAL, 3); + DECLARE_IMAGE_CONFIG(RIGHT_ARROW_NORMAL, 4); + DECLARE_IMAGE_CONFIG(ITEM_BG_NORMAL, 5); + DECLARE_IMAGE_CONFIG(ITEM_BG_PRESSED, 6); + DECLARE_IMAGE_CONFIG(ITEM_BG_SELECTED, 7); + DECLARE_IMAGE_CONFIG(ITEM_BG_DISABLED, 8); + DECLARE_SHAPE_CONFIG(FONT_SIZE, 1); + DECLARE_SHAPE_CONFIG(FONT_MARGIN, 2); + DECLARE_SHAPE_CONFIG(TOP_MARGIN, 3); + DECLARE_SHAPE_CONFIG(SIDE_MARGIN, 4); + DECLARE_SHAPE_CONFIG(ITEM_MARGIN, 5); + DECLARE_SHAPE_CONFIG(ITEM_MIN_WIDTH, 6); + DECLARE_SHAPE_CONFIG(ITEM_MAX_WIDTH, 7); + DECLARE_SHAPE_CONFIG(ITEM_HEIGHT, 8); + DECLARE_SHAPE_CONFIG(HEIGHT, 9); + 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_ResourceTabConfig.h b/src/ui/inc/FUi_ResourceTabConfig.h new file mode 100644 index 0000000..93c17d3 --- /dev/null +++ b/src/ui/inc/FUi_ResourceTabConfig.h @@ -0,0 +1,90 @@ +// +// 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_ResourceTabConfig.cpp + * @brief This is the implementation file for the color, image and shape properties of Tab. + */ +#ifndef _FUI_RESOURCE_TAB_CONFIG_H_ +#define _FUI_RESOURCE_TAB_CONFIG_H_ + +#include "FUi_ResourceConfigMacro.h" + +DECLARE_UI_CONFIG(TAB); + DECLARE_COLOR_CONFIG(ITEM_BG_NORMAL, 1); + DECLARE_COLOR_CONFIG(ITEM_BG_PRESSED, 2); + DECLARE_COLOR_CONFIG(ITEM_BG_EFFECT_PRESSED, 3); + DECLARE_COLOR_CONFIG(ITEM_BG_SELECTED, 4); + DECLARE_COLOR_CONFIG(ITEM_BG_HIGHLIGHTED, 5); + DECLARE_COLOR_CONFIG(ITEM_BG_DISABLED, 6); + DECLARE_COLOR_CONFIG(ITEM_TEXT_NORMAL, 7); + DECLARE_COLOR_CONFIG(ITEM_TEXT_PRESSED, 8); + DECLARE_COLOR_CONFIG(ITEM_TEXT_SELECTED, 9); + DECLARE_COLOR_CONFIG(ITEM_TEXT_HIGHLIGHTED, 10); + DECLARE_COLOR_CONFIG(ITEM_TEXT_DISABLED, 11); + DECLARE_COLOR_CONFIG(DIVIDER_LEFT_HALF, 12); + DECLARE_COLOR_CONFIG(DIVIDER_RIGHT_HALF, 13); + DECLARE_COLOR_CONFIG(ITEM_SELECTED, 14); + DECLARE_IMAGE_CONFIG(VERTICAL_DIVIDER_NORMAL, 1); + DECLARE_IMAGE_CONFIG(ITEM_SELECTED, 2); + DECLARE_IMAGE_CONFIG(ITEM_BG_NORMAL, 3); + DECLARE_IMAGE_CONFIG(ITEM_BG_PRESSED, 4); + DECLARE_IMAGE_CONFIG(ITEM_BG_SELECTED, 5); + DECLARE_IMAGE_CONFIG(ITEM_BG_HIGHLIGHTED, 6); + DECLARE_IMAGE_CONFIG(ITEM_BG_DISABLED, 7); + DECLARE_IMAGE_CONFIG(ITEM_BG_EFFECT_PRESSED, 8); + DECLARE_IMAGE_CONFIG(ITEM_BG_EFFECT_SELECTED, 9); + DECLARE_IMAGE_CONFIG(ITEM_BG_EFFECT_HIGHLIGHTED, 10); + DECLARE_IMAGE_CONFIG(TAB_BOUNCE_EFFECT_LEFT, 11); + DECLARE_IMAGE_CONFIG(TAB_BOUNCE_EFFECT_RIGHT, 12); + DECLARE_SHAPE_CONFIG(SCREEN_HEIGHT, 1); + DECLARE_SHAPE_CONFIG(SCREEN_WIDTH, 2); + DECLARE_SHAPE_CONFIG(LEFT_MARGIN, 3); + DECLARE_SHAPE_CONFIG(RIGHT_MARGIN, 4); + DECLARE_SHAPE_CONFIG(SELECTED_LINE_LEFT_MARGIN, 5); + DECLARE_SHAPE_CONFIG(SELECTED_LINE_RIGHT_MARGIN, 6); + DECLARE_SHAPE_CONFIG(SELECTED_LINE_HEIGHT, 7); + DECLARE_SHAPE_CONFIG(HEIGHT, 8); + DECLARE_SHAPE_CONFIG(FONT_SIZE_01, 9); + DECLARE_SHAPE_CONFIG(FONT_SIZE_02, 10); + DECLARE_SHAPE_CONFIG(FONT_SIZE_03, 11); + DECLARE_SHAPE_CONFIG(MULTILINE_FONT_SIZE_01, 12); + DECLARE_SHAPE_CONFIG(MULTILINE_FONT_SIZE_02, 13); + DECLARE_SHAPE_CONFIG(MULTILINE_FONT_SIZE_03, 14); + DECLARE_SHAPE_CONFIG(ICON_TEXT_FONT_SIZE_01, 15); + DECLARE_SHAPE_CONFIG(ICON_TEXT_FONT_SIZE_02, 16); + DECLARE_SHAPE_CONFIG(ICON_TEXT_FONT_SIZE_03, 17); + DECLARE_SHAPE_CONFIG(TOP_MARGIN, 18); + DECLARE_SHAPE_CONFIG(BOTTOM_MARGIN, 19); + DECLARE_SHAPE_CONFIG(ITEM_LEFT_MARGIN, 20); + DECLARE_SHAPE_CONFIG(ITEM_RIGHT_MARGIN, 21); + DECLARE_SHAPE_CONFIG(ICON_TEXT_TOP_MARGIN, 22); + DECLARE_SHAPE_CONFIG(ICON_TEXT_ICON_WIDTH, 23); + DECLARE_SHAPE_CONFIG(ICON_TEXT_ICON_HEIGHT, 24); + DECLARE_SHAPE_CONFIG(ICON_TEXT_BOTTOM_MARGIN, 25); + DECLARE_SHAPE_CONFIG(ICON_WIDTH, 26); + DECLARE_SHAPE_CONFIG(ICON_HEIGHT, 27); + DECLARE_SHAPE_CONFIG(BADGE_ICON_MARGIN, 28); + DECLARE_SHAPE_CONFIG(DIVIDER_HEIGHT, 29); + DECLARE_SHAPE_CONFIG(TAB_MINIMUM_SIZE, 30); + DECLARE_FIXED_VALUE_CONFIG(ITEM_MAX_COUNT, 1); + DECLARE_FIXED_VALUE_CONFIG(FONT_CHANGE_ITEM_COUNT, 2); + DECLARE_FIXED_VALUE_CONFIG(ICON_TEXT_GAP, 3); + DECLARE_FIXED_VALUE_CONFIG(DIVIDER_WIDTH, 4); +DECLARE_END_UI_CONFIG(TAB); + +#endif //_FUI_RESOURCE_TAB_CONFIG_H_ diff --git a/src/ui/inc/FUi_ResourceTableViewConfig.h b/src/ui/inc/FUi_ResourceTableViewConfig.h new file mode 100644 index 0000000..70c99e2 --- /dev/null +++ b/src/ui/inc/FUi_ResourceTableViewConfig.h @@ -0,0 +1,165 @@ +// +// 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_ResourceTableViewConfig.cpp + * @brief This is the implementation file for the UI properties of TableView. + */ +#ifndef _FUI_RESOURCE_TABLE_VIEW_CONFIG_H_ +#define _FUI_RESOURCE_TABLE_VIEW_CONFIG_H_ + +#include "FUi_ResourceConfigMacro.h" + +DECLARE_UI_CONFIG(TABLEVIEW); + DECLARE_COLOR_CONFIG(BG_NORMAL, 1); +// DECLARE_COLOR_CONFIG(EXPANDABLE_ARROW_NORMAL, 2); +// DECLARE_COLOR_CONFIG(EXPANDABLE_ARROW_DISABLED, 3); +// DECLARE_COLOR_CONFIG(EXPANDABLE_ARROW_PRESSED, 4); + DECLARE_COLOR_CONFIG(ITEM_DIVIDER_TOP_BG_NORMAL, 5); + DECLARE_COLOR_CONFIG(ITEM_DIVIDER_BOTTOM_BG_NORMAL, 6); + DECLARE_COLOR_CONFIG(ITEM_BG_NORMAL, 7); + DECLARE_COLOR_CONFIG(ITEM_BG_PRESSED, 8); + DECLARE_COLOR_CONFIG(ITEM_BG_HIGHLIGHTED, 9); + DECLARE_COLOR_CONFIG(ITEM_BG_DISABLED, 10); + DECLARE_COLOR_CONFIG(ITEM_TEXT_NORMAL, 11); + DECLARE_COLOR_CONFIG(ITEM_TEXT_PRESSED, 12); + DECLARE_COLOR_CONFIG(ITEM_TEXT_HIGHLIGHTED, 13); + DECLARE_COLOR_CONFIG(ITEM_TEXT_DISABLED, 14); + DECLARE_COLOR_CONFIG(ITEM_DESCRIPTION_TEXT_NORMAL, 15); + DECLARE_COLOR_CONFIG(ITEM_ANNEX_CANVAS_BG_NORMAL, 16); + DECLARE_COLOR_CONFIG(ITEM_ANNEX_DETAIL_NORMAL, 17); + DECLARE_COLOR_CONFIG(ITEM_ANNEX_DETAIL_PRESSED, 18); + DECLARE_COLOR_CONFIG(ITEM_ANNEX_DETAIL_HIGHLIGHTED, 19); + DECLARE_COLOR_CONFIG(ITEM_ANNEX_DETAIL_BG_NORMAL, 20); + DECLARE_COLOR_CONFIG(ITEM_ANNEX_DETAIL_BG_PRESSED, 21); + DECLARE_COLOR_CONFIG(ITEM_ANNEX_DETAIL_BG_HIGHLIGHTED, 22); + DECLARE_COLOR_CONFIG(GROUPITEM_BG_NORMAL, 23); + DECLARE_COLOR_CONFIG(GROUPITEM_TEXT_NORMAL, 24); + DECLARE_COLOR_CONFIG(GROUPITEM_TEXT_PRESSED, 25); + DECLARE_COLOR_CONFIG(GROUPITEM_TEXT_HIGHLIGHTED, 26); + DECLARE_COLOR_CONFIG(GROUPITEM_INDEX_BAR_NORMAL, 27); + DECLARE_COLOR_CONFIG(GROUPITEM_INDEX_BAR_PRESSED, 28); + DECLARE_COLOR_CONFIG(GROUPITEM_INDEX_BAR_HIGHLIGHTED, 29); + DECLARE_COLOR_CONFIG(GROUPITEM_BAR_NORMAL, 30); + DECLARE_COLOR_CONFIG(GROUPITEM_BAR_PRESSED, 31); + DECLARE_COLOR_CONFIG(GROUPITEM_BAR_HIGHLIGHTED, 32); + DECLARE_COLOR_CONFIG(SECTIONITEM_BG_NORMAL, 33); + DECLARE_COLOR_CONFIG(CONTEXTITEM_BG_NORMAL, 34); + DECLARE_COLOR_CONFIG(EMPTY_CONTENTS_TEXT_NORMAL, 35); + DECLARE_COLOR_CONFIG(ITEM_ANNEX_DIVIDER_LEFT_BG_NORMAL, 36); + DECLARE_COLOR_CONFIG(ITEM_ANNEX_DIVIDER_RIGHT_BG_NORMAL, 37); + DECLARE_COLOR_CONFIG(GROUPITEM_BG_PRESSED, 38); + DECLARE_COLOR_CONFIG(GROUPITEM_BG_HIGHLIGHTED, 39); + DECLARE_COLOR_CONFIG(GROUPITEM_BG_DISABLED, 40); + DECLARE_COLOR_CONFIG(GROUPITEM_TEXT_DISABLED, 41); + DECLARE_COLOR_CONFIG(GROUPITEM_INDEX_BAR_DISABLED, 42); + DECLARE_COLOR_CONFIG(GROUPITEM_BAR_DISABLED, 43); + DECLARE_IMAGE_CONFIG(GROUPITEM_BG_NORMAL, 1); + DECLARE_IMAGE_CONFIG(GROUPITEM_BG_EFFECT, 2); + DECLARE_IMAGE_CONFIG(SECTIONITEM_SINGLE_BG_NORMAL, 3); + DECLARE_IMAGE_CONFIG(SECTIONITEM_SINGLE_BG_PRESSED, 4); + DECLARE_IMAGE_CONFIG(SECTIONITEM_SINGLE_BG_HIGHLIGHTED, 5); + DECLARE_IMAGE_CONFIG(SECTIONITEM_SINGLE_COVER_BG_NORMAL, 6); + DECLARE_IMAGE_CONFIG(SECTIONITEM_TOP_BG_NORMAL, 7); + DECLARE_IMAGE_CONFIG(SECTIONITEM_TOP_BG_PRESSED, 8); + DECLARE_IMAGE_CONFIG(SECTIONITEM_TOP_BG_HIGHLIGHTED, 9); + DECLARE_IMAGE_CONFIG(SECTIONITEM_TOP_COVER_BG_NORMAL, 10); + DECLARE_IMAGE_CONFIG(SECTIONITEM_CENTER_BG_NORMAL, 11); + DECLARE_IMAGE_CONFIG(SECTIONITEM_CENTER_BG_PRESSED, 12); + DECLARE_IMAGE_CONFIG(SECTIONITEM_CENTER_BG_HIGHLIGHTED, 13); + DECLARE_IMAGE_CONFIG(SECTIONITEM_CENTER_COVER_BG_NORMAL, 14); + DECLARE_IMAGE_CONFIG(SECTIONITEM_BOTTOM_BG_NORMAL, 15); + DECLARE_IMAGE_CONFIG(SECTIONITEM_BOTTOM_BG_PRESSED, 16); + DECLARE_IMAGE_CONFIG(SECTIONITEM_BOTTOM_BG_HIGHLIGHTED, 17); + DECLARE_IMAGE_CONFIG(SECTIONITEM_BOTTOM_COVER_BG_NORMAL, 18); + DECLARE_IMAGE_CONFIG(CHECKBOX_BG_NORMAL, 19); + DECLARE_IMAGE_CONFIG(CHECKBOX_BG_PRESSED, 20); + DECLARE_IMAGE_CONFIG(CHECKBOX_BG_HIGHLIGHTED, 21); + DECLARE_IMAGE_CONFIG(CHECKBOX_CHECK_MARK_NORMAL, 22); + DECLARE_IMAGE_CONFIG(RADIOBUTTON_NORMAL, 23); + DECLARE_IMAGE_CONFIG(RADIOBUTTON_PRESSED, 24); + DECLARE_IMAGE_CONFIG(RADIOBUTTON_SELECTED, 25); + DECLARE_IMAGE_CONFIG(ONOFFBUTTON_ON_HANDLER, 26); + DECLARE_IMAGE_CONFIG(ONOFFBUTTON_OFF_HANDLER, 27); + DECLARE_IMAGE_CONFIG(ONOFFBUTTON_BG, 28); + DECLARE_IMAGE_CONFIG(CIRCLE_BUTTON_BG_NORMAL, 29); + DECLARE_IMAGE_CONFIG(CIRCLE_BUTTON_BG_PRESSED, 30); + DECLARE_IMAGE_CONFIG(CIRCLE_BUTTON_BG_HIGHLIGHTED, 31); + DECLARE_IMAGE_CONFIG(CIRCLE_BUTTON_BG_EFFECT, 32); +// DECLARE_IMAGE_CONFIG(CIRCLE_BUTTON_REVEAL, 33); + DECLARE_IMAGE_CONFIG(SEARCH_ICON_NORMAL, 34); +// DECLARE_IMAGE_CONFIG(BUTTON_EXPAND_CLOSED_EFFECT, 35); +// DECLARE_IMAGE_CONFIG(BUTTON_EXPAND_OPENED_EFFECT, 36); + DECLARE_IMAGE_CONFIG(CHECKBOX_BG_DISABLED, 37); + DECLARE_IMAGE_CONFIG(CHECKBOX_CHECK_MARK_DISABLED, 38); + DECLARE_IMAGE_CONFIG(RADIOBUTTON_NORMAL_DISABLED, 39); + DECLARE_IMAGE_CONFIG(RADIOBUTTON_SELECTED_DISABLED, 40); + DECLARE_IMAGE_CONFIG(ONOFFBUTTON_ON_HANDLER_DISABLED, 41); + DECLARE_IMAGE_CONFIG(ONOFFBUTTON_OFF_HANDLER_DISABLED, 42); + DECLARE_IMAGE_CONFIG(ONOFFBUTTON_BG_DISABLED, 43); + DECLARE_IMAGE_CONFIG(CIRCLE_BUTTON_BG_EFFECT_DISABLED, 44); + DECLARE_IMAGE_CONFIG(RADIOBUTTON_BUTTON_NORMAL, 45); + DECLARE_IMAGE_CONFIG(RADIOBUTTON_BUTTON_DISABLED, 46); + DECLARE_IMAGE_CONFIG(RADIOBUTTON_BUTTON_PRESSED, 47); + DECLARE_IMAGE_CONFIG(CHECKBOX_CHECK_MARK_PRESSED, 48); + DECLARE_IMAGE_CONFIG(CIRCLE_BUTTON_REVEAL_NORMAL, 49); + DECLARE_IMAGE_CONFIG(CIRCLE_BUTTON_REVEAL_PRESSED, 50); + DECLARE_IMAGE_CONFIG(CIRCLE_BUTTON_REVEAL_HIGHLIGHTED, 51); + DECLARE_IMAGE_CONFIG(CIRCLE_BUTTON_REVEAL_DISABLED, 52); + DECLARE_IMAGE_CONFIG(CIRCLE_BUTTON_BG_DISABLED, 53); + DECLARE_IMAGE_CONFIG(CIRCLE_BUTTON_REVEAL_EFFECT, 54); + DECLARE_IMAGE_CONFIG(SECTIONITEM_SINGLE_COVER_ROUND_BG_NORMAL, 55); + DECLARE_IMAGE_CONFIG(SECTIONITEM_TOP_COVER_ROUND_BG_NORMAL, 56); + DECLARE_IMAGE_CONFIG(SECTIONITEM_CENTER_COVER_ROUND_BG_NORMAL, 57); + DECLARE_IMAGE_CONFIG(SECTIONITEM_BOTTOM_COVER_ROUND_BG_NORMAL, 58); + DECLARE_IMAGE_CONFIG(SECTIONITEM_SINGLE_BG_DISABLED, 59); + DECLARE_IMAGE_CONFIG(SECTIONITEM_TOP_BG_DISABLED, 60); + DECLARE_IMAGE_CONFIG(SECTIONITEM_CENTER_BG_DISABLED, 61); + DECLARE_IMAGE_CONFIG(SECTIONITEM_BOTTOM_BG_DISABLED, 62); + DECLARE_IMAGE_CONFIG(QUICK_MENU_BG_NORMAL, 63); + DECLARE_IMAGE_CONFIG(QUICK_MENU_BG_EFFECT, 64); + + DECLARE_DIMENSION_CONFIG(MIN_SIZE, 1); + DECLARE_SHAPE_CONFIG(ITEM_DEFAULT_FONT_SIZE, 1); + DECLARE_SHAPE_CONFIG(ITEM_LEFT_MARGIN, 2); + DECLARE_SHAPE_CONFIG(ITEM_ANNEX_WIDTH, 3); + DECLARE_SHAPE_CONFIG(ITEM_ANNEX_HEIGHT, 4); + DECLARE_SHAPE_CONFIG(ITEM_ANNEX_MARGIN, 5); + DECLARE_SHAPE_CONFIG(ITEM_ANNEX_ONOFF_WIDTH, 6); + DECLARE_SHAPE_CONFIG(ITEM_ANNEX_ONOFF_HEIGHT, 7); + DECLARE_SHAPE_CONFIG(ITEM_ANNEX_ONOFF_MARGIN, 8); + DECLARE_SHAPE_CONFIG(ITEM_ANNEX_MORE_WIDTH, 9); + DECLARE_SHAPE_CONFIG(ITEM_ANNEX_MORE_HEIGHT, 10); + DECLARE_SHAPE_CONFIG(CONTEXTITEM_RIGHT_MARGIN, 11); + DECLARE_SHAPE_CONFIG(GROUPITEM_DEFAULT_HEIGHT, 12); + DECLARE_SHAPE_CONFIG(GROUPITEM_DEFAULT_TEXT_HEIGHT, 13); + DECLARE_SHAPE_CONFIG(GROUPITEM_DEFAULT_FONT_SIZE, 14); + DECLARE_SHAPE_CONFIG(GROUPITEM_LEFT_MARGIN, 15); + DECLARE_SHAPE_CONFIG(GROUPITEM_BAR_WIDTH, 16); + DECLARE_SHAPE_CONFIG(GROUPITEM_BAR_TOP_MARGIN, 17); + DECLARE_SHAPE_CONFIG(GROUPITEM_INDEX_BAR_HEIGHT, 18); + DECLARE_SHAPE_CONFIG(GROUPITEM_INDEX_BAR_LEFT_MARGIN, 19); + DECLARE_SHAPE_CONFIG(GROUPITEM_INDEX_BAR_BOTTOM_MARGIN, 20); + DECLARE_SHAPE_CONFIG(FASTSCROLL_INDEX_WIDTH, 21); + DECLARE_FIXED_VALUE_CONFIG(ITEM_DIVIDER_HEIGHT, 1); + DECLARE_FIXED_VALUE_CONFIG(SECTIONITEM_TOP_MARGIN, 2); + DECLARE_FIXED_VALUE_CONFIG(ITEM_ANNEX_DIVIDER_WIDTH, 3); + DECLARE_FIXED_VALUE_CONFIG(ITEM_ANNEX_DIVIDER_MARGIN, 4); + DECLARE_FIXED_VALUE_CONFIG(ITEM_DIVIDER_LEFT_MARGIN, 5); +DECLARE_END_UI_CONFIG(TABLEVIEW); + +#endif //_FUI_RESOURCE_TABLE_VIEW_CONFIG_H_ diff --git a/src/ui/inc/FUi_ResourceTokenEditConfig.h b/src/ui/inc/FUi_ResourceTokenEditConfig.h new file mode 100644 index 0000000..22782cc --- /dev/null +++ b/src/ui/inc/FUi_ResourceTokenEditConfig.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_ResourceTokenEditConfig.cpp + * @brief This is the implementation file for the color, image and shape properties of TokenEdit. + */ +#ifndef _FUI_RESOURCE_TOKEN_EDIT_CONFIG_H_ +#define _FUI_RESOURCE_TOKEN_EDIT_CONFIG_H_ + +#include "FUi_ResourceConfigMacro.h" + +DECLARE_UI_CONFIG(TOKENEDIT); + DECLARE_COLOR_CONFIG(BG_NORMAL, 1); + DECLARE_COLOR_CONFIG(BG_SELECTED, 2); + DECLARE_COLOR_CONFIG(TEXT_NORMAL, 3); + DECLARE_COLOR_CONFIG(TEXT_SELECTED, 4); + DECLARE_COLOR_CONFIG(BG_HIGHLIGHTED, 5); + DECLARE_COLOR_CONFIG(BG_DISABLED, 6); + DECLARE_COLOR_CONFIG(TEXT_HIGHLIGHTED, 7); + DECLARE_COLOR_CONFIG(TEXT_DISABLED, 8); + DECLARE_COLOR_CONFIG(TITLE_TEXT_NORMAL, 9); + DECLARE_COLOR_CONFIG(TITLE_TEXT_PRESSED, 10); + DECLARE_COLOR_CONFIG(TITLE_TEXT_HIGHLIGHTED, 11); + DECLARE_COLOR_CONFIG(TITLE_TEXT_DISABLED, 12); + DECLARE_COLOR_CONFIG(EDIT_BG_NORMAL, 13); + DECLARE_COLOR_CONFIG(EDIT_BG_PRESSED, 14); + DECLARE_COLOR_CONFIG(EDIT_BG_HIGHLIGHTED, 15); + DECLARE_COLOR_CONFIG(EDIT_BG_DISABLED, 16); + DECLARE_COLOR_CONFIG(EDIT_TEXT_NORMAL, 17); + DECLARE_COLOR_CONFIG(EDIT_TEXT_PRESSED, 18); + DECLARE_COLOR_CONFIG(EDIT_TEXT_HIGHLIGHTED, 19); + DECLARE_COLOR_CONFIG(EDIT_TEXT_DISABLED, 20); + DECLARE_COLOR_CONFIG(GUIDE_TEXT_NORMAL, 21); + + DECLARE_IMAGE_CONFIG(BG_NORMAL, 1); + DECLARE_IMAGE_CONFIG(BG_NORMAL_EFFECT, 2); + DECLARE_IMAGE_CONFIG(BG_PRESSED_EFFECT, 3); + DECLARE_IMAGE_CONFIG(BG_FOCUS, 4); + DECLARE_IMAGE_CONFIG(BG_FOCUS_EFFECT, 5); + DECLARE_SHAPE_CONFIG(LEFT_MARGIN, 1); + DECLARE_SHAPE_CONFIG(RIGHT_MARGIN, 2); + DECLARE_SHAPE_CONFIG(TOP_MARGIN, 3); + DECLARE_SHAPE_CONFIG(BOTTOM_MARGIN, 4); + DECLARE_SHAPE_CONFIG(TOKEN_TEXT_LEFT_MARGIN, 5); + DECLARE_SHAPE_CONFIG(TOKEN_TEXT_RIGHT_MARGIN, 6); + DECLARE_SHAPE_CONFIG(TOKEN_HEIGHT, 7); + DECLARE_SHAPE_CONFIG(TOKEN_HORIZONTAL_SPACING, 8); + DECLARE_SHAPE_CONFIG(TOKEN_VERTICAL_SPACING, 9); + DECLARE_SHAPE_CONFIG(DESCRIPTION_TEXT_RIGHT_MARGIN, 10); + DECLARE_SHAPE_CONFIG(TOKEN_MIN_WIDTH, 11); + DECLARE_SHAPE_CONFIG(TOKEN_TEXT_SIZE, 12); + DECLARE_SHAPE_CONFIG(DESCRIPTION_TEXT_SIZE, 13); + DECLARE_SHAPE_CONFIG(TEXT_SIZE, 14); + DECLARE_SHAPE_CONFIG(HIDDEN_TOKEN_COUNT_DISPLAY_MARGIN, 15); + DECLARE_SHAPE_CONFIG(HIDDEN_TOKEN_COUNT_DISPLAY_TEXT_SIZE, 16); + DECLARE_SHAPE_CONFIG(HIDDEN_TOKEN_COUNT_DISPLAY_HEIGHT, 17); + DECLARE_SHAPE_CONFIG(TOKEN_TITLE_RECT_WIDTH, 18); +DECLARE_END_UI_CONFIG(TOKENEDIT); +#endif //_FUI_RESOURCE_TOKEN_EDIT_CONFIG_H_ diff --git a/src/ui/inc/FUi_SharedPtr.h b/src/ui/inc/FUi_SharedPtr.h new file mode 100644 index 0000000..47425d0 --- /dev/null +++ b/src/ui/inc/FUi_SharedPtr.h @@ -0,0 +1,177 @@ +// +// 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_SharedPtr.h + * @brief This is the header file for the _SharedPtr class. + * + * This file contains the declarations of the _SharedPtr class. + */ + +#ifndef _FUI_INTERNAL_SHARED_PTR_H_ +#define _FUI_INTERNAL_SHARED_PTR_H_ + +#include + +namespace Tizen { namespace Ui +{ + +template +class _SharedPtr +{ +protected: + BaseType* _pInstance; + unsigned int* _useCount; + +public: + _SharedPtr(void) + : _pInstance(0) + , _useCount(0) + { + } + + explicit _SharedPtr(BaseType* pInstance) + : _pInstance(pInstance) + , _useCount(new (std::nothrow) unsigned int (1)) + { + } + + _SharedPtr(const _SharedPtr& refInstance) + : _pInstance(0) + , _useCount(0) + { + _pInstance = refInstance._pInstance; + _useCount = refInstance._useCount; + + if (_useCount) + ++(*_useCount); + } + + virtual ~_SharedPtr(void) + { + _Release(); + } + + _SharedPtr& operator =(const _SharedPtr& refInstance) + { + if (_pInstance == refInstance._pInstance) + { + return *this; + } + + _Release(); + { + _pInstance = refInstance._pInstance; + _useCount = refInstance._useCount; + if (_useCount) + { + ++(*_useCount); + } + } + + return *this; + } + + inline BaseType& operator *(void) const + { + // assert(_pInstance); + return *_pInstance; + } + + inline BaseType* operator ->(void) const + { + return _pInstance; + } + + inline BaseType* Get(void) const + { + return _pInstance; + } + + void Bind(BaseType* rep) + { + if (!_pInstance && !_useCount) + { + _useCount = new (std::nothrow) unsigned int(1); + _pInstance = rep; + } + } + + inline bool Unique(void) const + { + return (_useCount) ? (*_useCount == 1) : true; + } + + inline unsigned int UseCount() const + { + return (_useCount) ? *_useCount : 0; + } + + inline unsigned int* UseCountPointer(void) const + { + return _useCount; + } + + inline bool IsNull(void) const + { + return (_pInstance == 0); + } + + inline void SetNull(void) + { + if (_pInstance) + { + _Release(); + _pInstance = 0; + _useCount = 0; + } + } + +protected: + inline void _Release(void) + { + if (_useCount) + { + if (--(*_useCount) == 0) + { + _Destroy(); + } + } + } + + virtual void _Destroy(void) + { + delete _pInstance; + delete _useCount; + } +}; + +template inline bool +operator ==(_SharedPtr const& a, _SharedPtr const& b) +{ + return a.Get() == b.Get(); +} + +template inline bool +operator !=(_SharedPtr const& a, _SharedPtr const& b) +{ + return a.Get() != b.Get(); +} + +}} // Tizen::Ui + + +#endif // _FUI_INTERNAL_SHARED_PTR_H_ diff --git a/src/ui/inc/FUi_SystemUtilImpl.h b/src/ui/inc/FUi_SystemUtilImpl.h new file mode 100644 index 0000000..bdb82b0 --- /dev/null +++ b/src/ui/inc/FUi_SystemUtilImpl.h @@ -0,0 +1,164 @@ +// +// 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_SystemUtilImpl.h +* @brief This is the header file for the _SystemUtilImpl +* +* This header file contains the declarations of the _SystemUtilImpl class. +* +*/ + +#ifndef _FUI_SYSTEM_UTIL_IMPL_H_ +#define _FUI_SYSTEM_UTIL_IMPL_H_ + +#include +#include +#include "FUi_UiKeyEvent.h" + +namespace Tizen { namespace Graphics +{ +class Bitmap; +class Point; +class FloatPoint; +}} + +namespace Tizen { namespace Ui +{ + +/** +* @if VISPARTNER-MANUFACTURER +* @class _SystemUtilImpl +* @brief This is a class for system utililty such as touch, key, and capturing screen. It provides +* functionalities to simulate user inputs. +* @since 2.0 +* @final This class is not intended for extension. +* @visibility partner-manufacturer +* +* This class provides methods to generate user's input events such as +* touch and key events for helping test application and to capture current screen. +* @endif +*/ +class _OSP_EXPORT_ _SystemUtilImpl +{ +public: + /** + * @if VISPARTNER-MANUFACTURER + * Generates a key event + * + * @since 2.0 + * @visibility partner-manufacturer + * @privilege %http://tizen.org/privilege/inputmanager + * + * @return An error code + * @param[in] keyEvent The event type of the key to be generated + * @param[in] keyCode The code of the key + * @exception E_SUCCESS The method was successful. + * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. + * @exception E_OPERATION_FAILED An error occurred in the underlying system. + * @exception E_INVALID_ARG The specified @c keyEvent or @c keyCode is not supported. + * @endif + */ + static result GenerateKeyEvent(KeyEventType keyEvent, _KeyCode keyCode); + + /** + * @if VISPARTNER-MANUFACTURER + * Generates a touch event + * + * @since 2.0 + * @visibility partner-manufacturer + * @privilege %http://tizen.org/privilege/inputmanager + * + * @return An error code + * @param[in] touchEvent The event type of the touch to be generated + * @param[in] point The point on which the touch occurs + * @exception E_SUCCESS The method was successful. + * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. + * @exception E_OPERATION_FAILED An error occurred in the underlying system. + * @exception E_INVALID_ARG The specified @c touchEvent is not supported. + * @endif + */ + static result GenerateTouchEvent(TouchEventType touchEvent, const Tizen::Graphics::Point& point); + + /* + * @if VISPARTNER-MANUFACTURER + * Generates a touch event + * + * @since 2.0 + * @visibility partner-manufacturer + * @privilege %http://tizen.org/privilege/inputmanager + * + * @return An error code + * @param[in] touchEvent The event type of the touch to be generated + * @param[in] point The point on which the touch occurs + * @exception E_SUCCESS The method was successful. + * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. + * @exception E_OPERATION_FAILED An error occurred in the underlying system. + * @exception E_INVALID_ARG The specified @c touchEvent is not supported. + * @endif + */ + static result GenerateTouchEvent(TouchEventType touchEvent, const Tizen::Graphics::FloatPoint& point); + + /** + * @if VISPARTNER-MANUFACTURER + * Captures a screen + * + * @since 2.0 + * @visibility partner-manufacturer + * @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 was successful. + * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. + * @exception E_OPERATION_FAILED An error 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 should be deleted by the application after use. + * @endif + */ + static Tizen::Graphics::Bitmap* CaptureScreenN(void); + + static result SendKeyStopMessage(void); + +private: + // + // This default constructor is intentionally declared as private because this class cannot be constructed. + // + _SystemUtilImpl(void); + + // + // This destructor is intentionally declared as private because this class cannot be constructed. + // + _SystemUtilImpl(const _SystemUtilImpl& rhs); + + // + // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + // + _SystemUtilImpl& operator =(const _SystemUtilImpl& rhs); + + // + // This is a destructor for this class. + // This destructor is intentionally declared as private because this class cannot be constructed. + // + ~_SystemUtilImpl(void); + +}; //_SystemUtilImpl + +}} //Tizen::Ui +#endif + diff --git a/src/ui/inc/FUi_TouchEffectImpl.h b/src/ui/inc/FUi_TouchEffectImpl.h new file mode 100644 index 0000000..0d52bdd --- /dev/null +++ b/src/ui/inc/FUi_TouchEffectImpl.h @@ -0,0 +1,105 @@ +// +// Open Service Platform +// Copyright (c) 2012 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_TouchEffectImpl.h +* @brief This is the header file for the _TouchEffectImpl class. +* +* This header file contains the declarations of the _TouchEffectImpl class. +*/ + +#ifndef _FUI_INTERNAL_TOUCHEFFECT_IMPL_H_ +#define _FUI_INTERNAL_TOUCHEFFECT_IMPL_H_ + +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui +{ + +class TouchEffect; + +class _OSP_EXPORT_ _TouchEffectImpl + : public Tizen::Base::Object +{ + +public: + /** + * This is default constructor for the class. + * + * @since 2.2 + */ + _TouchEffectImpl(void); + + /** + * This destructor overrides Tizen::Base::Object::~Object(). + * + * @since 2.2 + */ + virtual ~_TouchEffectImpl(void); + + /** + * Initializes this instance of TouchEffect. @n + * Every application must call Construct() before calling any other TouchEffect API method. + * + * @since 2.2 + * @return An error code + * @exception E_SUCCESS The method was successful. + * @exception E_OPERATION_FAILED Insufficient memory. + */ + result Construct(void); + + /** + * Plays a predefined effect. + * + * @since 2.2 + * @return An error code + * + * @param[in] TouchEffectType The type of the effect to play, like sound or vibration + * @exception E_SUCCESS The method was successful. + * @exception E_SYSTEM A system error occurred. + * @exception E_INVALID_ARG The specified @c type is invalid. + */ + result Play(TouchEffectType type); + + static _TouchEffectImpl* GetInstance(TouchEffect& touchEffect); + static const _TouchEffectImpl* GetInstance(const TouchEffect& touchEffect); + + +private: + /** + * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects. + * + * @since 2.2 + */ + _TouchEffectImpl(const _TouchEffectImpl& value); + + /** + * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects. + * + * @since 2.2 + */ + _TouchEffectImpl& operator =(const _TouchEffectImpl& value); + +}; // _TouchEffectImpl + +} }// Tizen::Ui + +#endif //_FUI_INTERNAL_TOUCHEFFECT_IMPL_H_ diff --git a/src/ui/inc/FUi_TouchEventArg.h b/src/ui/inc/FUi_TouchEventArg.h new file mode 100644 index 0000000..f2bbde2 --- /dev/null +++ b/src/ui/inc/FUi_TouchEventArg.h @@ -0,0 +1,144 @@ +// +// 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_TouchEventArg.h +* @brief This is the header file for _TouchEventArg class. +* @version 2.0 +* +* This header file contains declarations of _TouchEventArg class. +*/ + +#ifndef _FUI_TOUCH_EVENT_ARG_H_ +#define _FUI_TOUCH_EVENT_ARG_H_ + +// includes +#include +#include +#include +#include +#include +#include "FUi_UiTouchEvent.h" + + +namespace Tizen { namespace Ui +{ + +/** + * @class _TouchEventArg + * + * @brief This class is used as tje argument to touch event listener. + * + * This class is used as the argument of touch event listener. When touch event event is generated, + * the @c TouchEvent instance calls the registered ITouchEventListener with an instance of this + * class as the argument. + * + */ +class _TouchEventArg + : public Tizen::Base::Object + , public Tizen::Base::Runtime::IEventArg +{ +// Lifecycle +public: + /** + * This is the default class constructor. + * + * @param[in] source - A pointer to the Object instance which contains this instance. + * @param[in] status - TouchStatus + */ + _TouchEventArg(const Tizen::Ui::Control& source, _TouchStatus status); + + + /** + * This is the class destructor. + */ + virtual ~_TouchEventArg(void); + + +// Access +public: + /** + * This method returns the object which the event initially occurred. + * + * @return The object which the event initially occurred. + */ + const Tizen::Ui::Control* GetSource(void) const; + + /** + * This method sets the positions of touch event on the window rectangle coordination. + * @param[in] PointId - PointId of the touch event + * @param[in] startX - x coordinate of the original touch pressed event + * @param[in] startY - y coordinate of the original touch pressed event + * @param[in] currentX - x coordinate of the current touch event + * @param[in] currentY - y coordinate of the currenttouch event + */ + void SetTouchPosition(unsigned long PointId, float startX, float startY, float currentX, float currentY); + + /** + * This method returns the touch id + * + * @return see the above + */ + unsigned long GetPointId(void) const; + + /** + * This method returns the touch status + * + * @return see the above + */ + _TouchStatus GetTouchStatus(void) const; + + /** + * This method returns the start position of touch pressed event on the window rectangle coordination. + * + * @return see the above + */ + const Tizen::Graphics::FloatPoint GetStartPosition(void) const; + + /** + * This method returns the current position of touch event on the window rectangle coordination. + * + * @return see the above + */ + const Tizen::Graphics::FloatPoint GetCurrentPosition(void) const; + + /** + * This method sets the positions of touch event on the window rectangle coordination. + * + * @param[in] isFlicked - Flag whether it is flicked. + */ + void SetFlickedStatus(bool isFlicked); + + /** + * This method returns the flicked status + * + * @return see the above + */ + bool IsFlicked(void) const; + +// Attributes +private: + unsigned long __PointId; + Tizen::Ui::Control* __pSource; + _TouchStatus __touchStatus; + Tizen::Graphics::FloatPoint __startPosition; + Tizen::Graphics::FloatPoint __currentPosition; + bool __isFlicked; +}; // _TouchEventArg + +} } // Tizen::Ui + +#endif // _FUI_TOUCH_EVENT_ARG_H_ diff --git a/src/ui/inc/FUi_TouchEventInfoImpl.h b/src/ui/inc/FUi_TouchEventInfoImpl.h new file mode 100644 index 0000000..328446d --- /dev/null +++ b/src/ui/inc/FUi_TouchEventInfoImpl.h @@ -0,0 +1,102 @@ +// +// 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_TouchEventInfoImpl.h +* @brief This is the header file for _TouchEventInfoImpl class. +* @version 2.0 +* +* This header file contains declarations of _TouchEventInfoImpl class. +*/ + +#ifndef _FUI_INTERNAL_TOUCH_EVENT_INFO_IMPL_H_ +#define _FUI_INTERNAL_TOUCH_EVENT_INFO_IMPL_H_ + +#include +#include +#include +#include "FUi_UiTouchEvent.h" + +namespace Tizen { namespace Ui +{ + +class TouchEventInfo; +/** + * @class _TouchEventInfoImpl + * + * @brief This class is used as the argument to touch event listener. + * + * This class is used as the argument of touch event listener. When touch event event is generated, + * the @c TouchEvent instance calls the registered ITouchEventListener with an instance of this + * class as the argument. + * + */ +class _TouchEventInfoImpl + : public Tizen::Base::Object +{ +public: + static _TouchEventInfoImpl* CreateInstanceN(TouchEventInfo* pPublic); + + ~_TouchEventInfoImpl(void); + + void SetTouchEventInfo(const _TouchInfo& touchInfo, const Tizen::Graphics::Point startPosition); + + unsigned long GetPointId(void) const; + + Tizen::Graphics::Point GetStartPosition(void) const; + + Tizen::Graphics::FloatPoint GetStartPositionF(void) const; + + Tizen::Graphics::Point GetCurrentPosition(void) const; + + Tizen::Graphics::FloatPoint GetCurrentPositionF(void) const; + + _TouchStatus GetTouchStatus(void) const; + + bool IsFlicked(void) const; + +private: + /** + * This is the default class constructor. + * + * @param[in] source - A pointer to the Object instance which contains this instance. + * @param[in] status - TouchStatus + */ + _TouchEventInfoImpl(TouchEventInfo* pPublic); + + /* + * This is the copy constructor for this class. + */ + _TouchEventInfoImpl(const _TouchEventInfoImpl&); + + /** + * This is the assignment operator for this class. + */ + _TouchEventInfoImpl& operator =(const _TouchEventInfoImpl&); + +// Attributes +private: + TouchEventInfo* __pPublic; + unsigned long __pointId; + _TouchStatus __touchStatus; + Tizen::Graphics::FloatPoint __startPosition; + Tizen::Graphics::FloatPoint __currentPosition; + bool __isFlicked; +}; // TouchEventInfo + +} } // Tizen::Ui + +#endif // _FUI_INTERNAL_TOUCH_EVENT_INFO_IMPL_H_ diff --git a/src/ui/inc/FUi_TouchEventManagerImpl.h b/src/ui/inc/FUi_TouchEventManagerImpl.h new file mode 100644 index 0000000..22eb9c7 --- /dev/null +++ b/src/ui/inc/FUi_TouchEventManagerImpl.h @@ -0,0 +1,63 @@ +// +// 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_TouchEventManagerImpl.h + * @brief This is the header file for the %_TouchEventManagerImpl class. + * + * This header file contains the declarations of the %_TouchEventManagerImpl class. + * + */ + +#ifndef _FUI_INTERNAL_TOUCH_EVENT_MANAGER_IMPL_H_ +#define _FUI_INTERNAL_TOUCH_EVENT_MANAGER_IMPL_H_ + +#include +#include + +namespace Tizen { namespace Ui +{ + +/** + * @class _TouchEventManagerImpl + * @brief This class stores the information of each touch events. + * + * @since 2.0 + * + * @final This class is not intended for extension. + * + * The %_TouchEventManagerImpl class provides the touch event information: touch position, status, ID, and so on. + * @see TouchEventInfo + * + */ +class _OSP_EXPORT_ _TouchEventManagerImpl + : public Tizen::Base::Object +{ +public: + _TouchEventManagerImpl(void); + virtual ~_TouchEventManagerImpl(void); + + Tizen::Base::Collection::IListT* GetTouchInfoListN(void) const; + +private: + _TouchEventManagerImpl(const _TouchEventManagerImpl& value); + _TouchEventManagerImpl& operator =(const _TouchEventManagerImpl& value); +}; // _TouchEventManagerImpl + +} } //Tizen::Ui + +#endif // _FUI_INTERNAL_TOUCH_EVENT_MANAGER_IMPL_H_ \ No newline at end of file diff --git a/src/ui/inc/FUi_TouchFlickGestureDetector.h b/src/ui/inc/FUi_TouchFlickGestureDetector.h new file mode 100644 index 0000000..9444473 --- /dev/null +++ b/src/ui/inc/FUi_TouchFlickGestureDetector.h @@ -0,0 +1,101 @@ +// +// 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_TouchFlickGestureDetector.h + * @brief This is the header file for the %_TouchFlickGestureDetector class. + * + * This header file contains the declarations of the %_TouchFlickGestureDetector class. + * + */ + +#ifndef _FUI_INTERNAL_TOUCH_FLICK_GESTURE_DETECTOR_H_ +#define _FUI_INTERNAL_TOUCH_FLICK_GESTURE_DETECTOR_H_ + +#include "FUi_TouchGestureDetector.h" +#include "FUi_UiTouchEvent.h" + +namespace Tizen { namespace Ui +{ + +enum _FlickDirection +{ + _FLICK_DIRECTION_NONE = -1, + _FLICK_DIRECTION_RIGHT, + _FLICK_DIRECTION_UP, + _FLICK_DIRECTION_LEFT, + _FLICK_DIRECTION_DOWN +}; + +struct _FlickInfo +{ + int x; + int y; + int time; + _TouchStatus touchStatus; +}; + +/** + * @class _TouchFlickGestureDetector + * @brief + * @since 2.0 + * + */ +class _OSP_EXPORT_ _TouchFlickGestureDetector + : public _TouchGestureDetector +{ +public: + _TouchFlickGestureDetector(void); + virtual ~_TouchFlickGestureDetector(void); + + virtual bool OnTouchPressed(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo); + virtual bool OnTouchMoved(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo); + 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 GetDistance(int& x, int &y) const; + void GetDistance(float& x, float &y) const; + + int GetDuration(void) const; + _FlickDirection GetDirection(void) const; + +private: + void CheckMoveMinMax(const int x, const int y); + void ClearVariables(void); + bool FindFlickWindow(const Tizen::Base::Collection::ArrayListT<_FlickInfo*>* pList, const _FlickInfo* pFlickInfo, int* pStartIndex, int* pEndIndex); + bool CalculateFlick(const Tizen::Base::Collection::ArrayListT<_FlickInfo*>* pList, const _FlickInfo* pFlickInfo, _FlickInfo* pReturnFlick); + result OnTouchDown(Tizen::Base::Collection::ArrayListT<_FlickInfo*>* pList, const _FlickInfo* pFlickInfo); + result OnTouchMove(Tizen::Base::Collection::ArrayListT<_FlickInfo*>* pList, const _FlickInfo* pFlickInfo); + result OnTouchUp(Tizen::Base::Collection::ArrayListT<_FlickInfo*>* pList, const _FlickInfo* pFlickInfo, _FlickInfo* pReturnFlick, bool& isFlicked); + + _TouchFlickGestureDetector(const _TouchFlickGestureDetector&); + _TouchFlickGestureDetector& operator =(const _TouchFlickGestureDetector&); + +private: + float __xDistance; + float __yDistance; + int __duration; + _FlickDirection __direction; + int __maxMoveX; + int __minMoveX; + int __maxMoveY; + int __minMoveY; + Tizen::Base::Collection::ArrayListT<_FlickInfo*>* __pFlickInfoList; +}; // _TouchFlickGestureDetector + +} } //Tizen::Ui + +#endif // _FUI_INTERNAL_TOUCH_FLICK_GESTURE_DETECTOR_H_ diff --git a/src/ui/inc/FUi_TouchFlickGestureDetectorImpl.h b/src/ui/inc/FUi_TouchFlickGestureDetectorImpl.h new file mode 100644 index 0000000..4eeb192 --- /dev/null +++ b/src/ui/inc/FUi_TouchFlickGestureDetectorImpl.h @@ -0,0 +1,70 @@ +// +// 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_TouchFlickGestureDetectorImpl.h + * @brief This is the header file for the %_TouchFlickGestureDetectorImpl class. + * + * This header file contains the declarations of the %_TouchFlickGestureDetectorImpl class. + * + */ + +#ifndef _FUI_INTERNAL_TOUCH_GESTURE_FLICK_DETECTOR_IMPL_H_ +#define _FUI_INTERNAL_TOUCH_GESTURE_FLICK_DETECTOR_IMPL_H_ + +#include +#include "FUi_TouchGestureDetectorImpl.h" +#include "FUi_TouchFlickGestureDetector.h" + +namespace Tizen { namespace Ui +{ + +/** + * @class _TouchFlickGestureDetectorImpl + * @brief + * @since 2.0 + * + */ +class _TouchFlickGestureDetectorImpl + : public Tizen::Ui::_TouchGestureDetectorImpl +{ +public: + virtual ~_TouchFlickGestureDetectorImpl(void); + + static _TouchFlickGestureDetectorImpl* CreateInstanceN(TouchFlickGestureDetector* pPublic); + + virtual const _TouchFlickGestureDetector& GetCore(void) const; + virtual _TouchFlickGestureDetector& GetCore(void); + + static _TouchFlickGestureDetectorImpl* GetInstance(TouchFlickGestureDetector& gestureDetector); + static const _TouchFlickGestureDetectorImpl* GetInstance(const TouchFlickGestureDetector& gestureDetector); + + result GetDistance(int &x, int &y) const; + result GetDistance(float &x, float &y) const; + + int GetDuration(void) const; + FlickDirection GetDirection(void) const; + +private: + _TouchFlickGestureDetectorImpl(TouchFlickGestureDetector* pPublic, _TouchFlickGestureDetector* pCore); + + _TouchFlickGestureDetectorImpl(const _TouchFlickGestureDetectorImpl&); + _TouchFlickGestureDetectorImpl& operator =(const _TouchFlickGestureDetectorImpl&); +}; // _TouchFlickGestureDetectorImpl + +} } //Tizen::Ui + +#endif //_FUI_INTERNAL_TOUCH_GESTURE_FLICK_DETECTOR_IMPL_H_ diff --git a/src/ui/inc/FUi_TouchGestureDetector.h b/src/ui/inc/FUi_TouchGestureDetector.h new file mode 100644 index 0000000..0df8792 --- /dev/null +++ b/src/ui/inc/FUi_TouchGestureDetector.h @@ -0,0 +1,168 @@ +// +// 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_TouchGestureDetector.h + * @brief This is the header file for the %_TouchGestureDetector class. + * + * This header file contains the declarations of the %_TouchGestureDetector class. + */ +#ifndef _FUI_INTERNAL_TOUCH_GESTURE_DETECTOR_H_ +#define _FUI_INTERNAL_TOUCH_GESTURE_DETECTOR_H_ + +#include +#include +#include +#include +#include "FUi_Types.h" +#include "FUi_UiTouchEvent.h" +#include "FUi_ITouchEventListener.h" +#include "FUi_ITouchGestureEventListener.h" +#include "FUi_ITouchGestureDelegate.h" +#include "FUi_ITouchGestureStateChangedListener.h" + +namespace Tizen { namespace Ui +{ +class _Control; + +template +T Distance(T x1, T y1, T x2, T y2) +{ + return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)); +} + +enum _TouchGestureDetectorState +{ + _TOUCH_GESTURE_DETECTOR_STATE_READY, + _TOUCH_GESTURE_DETECTOR_STATE_STARTED, + _TOUCH_GESTURE_DETECTOR_STATE_CHANGED, + _TOUCH_GESTURE_DETECTOR_STATE_FINISHED, + _TOUCH_GESTURE_DETECTOR_STATE_FAILED, + _TOUCH_GESTURE_DETECTOR_STATE_CANCELED, + _TOUCH_GESTURE_DETECTOR_STATE_SUCCESS_AND_WAIT, + _TOUCH_GESTURE_DETECTOR_STATE_SUCCESS = _TOUCH_GESTURE_DETECTOR_STATE_FINISHED +}; + +enum _TouchGestureDetectorType +{ + _TOUCH_GESTURE_DETECTOR_TYPE_CUSTOM, + _TOUCH_GESTURE_DETECTOR_TYPE_TAP, + _TOUCH_GESTURE_DETECTOR_TYPE_LONG_PRESS, + _TOUCH_GESTURE_DETECTOR_TYPE_PINCH, + _TOUCH_GESTURE_DETECTOR_TYPE_FLICK, + _TOUCH_GESTURE_DETECTOR_TYPE_ROTATION, + _TOUCH_GESTURE_DETECTOR_TYPE_PANNING +}; + +enum _TouchGestureDetectorEventType +{ + _TOUCH_GESTURE_DETECTOR_EVENT_TYPE_DISCRETE, + _TOUCH_GESTURE_DETECTOR_EVENT_TYPE_CONTINUOUS +}; + +class _OSP_EXPORT_ _TouchGestureDetector + : public Tizen::Base::Object + , virtual public _ITouchGestureStateChangedListener + , virtual public _ITouchGestureDelegate +{ +public: + _TouchGestureDetector(void); + virtual ~_TouchGestureDetector(void); + + void SetDetectorState(_TouchGestureDetectorState state); + _TouchGestureDetectorState GetDetectorState(void) const; + + void SetDelayTouchEventEnabled(bool enable); + bool IsDelayTouchEventEnabled(void) const; + + void SetCancelTouchEventOnSuccessEnabled(bool enable); + bool IsCancelTouchEventOnSuccessEnabled(void) const; + + result AddGestureListener(const Tizen::Ui::_ITouchGestureEventListener& listener); + result RemoveGestureListener(const Tizen::Ui::_ITouchGestureEventListener& listener); + Tizen::Base::Collection::IListT * GetGestureListenerList(void) const; + + result StartOnFailureOf(const _TouchGestureDetector& gesture); + + void SetDetectorType(_TouchGestureDetectorType type); + _TouchGestureDetectorType GetDetectorType(void) const; + + result SetControl(const Tizen::Ui::_Control& control); + _Control* GetControl(void) const; + + void SetUserData(void* pUserData); + void* GetUserData(void) const; + + void SetDelegate(const _ITouchGestureDelegate& delegator); + _ITouchGestureDelegate* GetDelegate(void) const; + + bool IsSentDelayedEvent(void) const; + void SetSentDelayedEvent(bool sent); + bool IsSendingDelayedEvent(void) const; + + void AddTouchInfo(const _TouchInfo& touchInfo); + void ClearTouchInfo(void); + + void SetGestureStart(bool start); + bool IsGestureStarted(void) const; + + virtual bool OnTouchPressed(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo); + virtual bool OnTouchMoved(const Tizen::Ui:: _Control& source, const Tizen::Ui::_TouchInfo& touchinfo); + 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); + + virtual void OnGestureDetectorStateChanged(const _TouchGestureDetector& gestureDetector); + + virtual void OnTouchGestureDetectorAdded(void); + virtual void OnTouchGestureDetectorRemoved(void); + + void ProcessPublicListener(_TouchGestureDetector& gesture); + void ProcessCoreListener(_TouchGestureDetector& gesture); + + Tizen::Base::String GetDescription(void); + +private: + Tizen::Base::Collection::IListT <_TouchGestureDetector*>* GetWantToFailList(void) const; + Tizen::Base::Collection::IListT <_TouchGestureDetector*>* GetCurrentWantToFailList(void) const; + bool ExistWaitingList(void) const; + void NotifyStateChanged(void); + Tizen::Base::Collection::IListT<_TouchInfo*>* GetTouchInfoList(void); + bool IsPossibleToAddFailList(const _TouchGestureDetector& gesture); + void SetToDefaultState(void); + _TouchGestureDetectorEventType GetGestureDetectorEventType(void); + void SendDelayedTouchEvent(_Control* pControl); + void ProcessGestureCondition(void); + + _TouchGestureDetector(const _TouchGestureDetector&); + _TouchGestureDetector& operator =(const _TouchGestureDetector&); + +private: + bool __isTouchEventDelayed; + bool __isTouchCanceledOnSuccess; + bool __isDetectionStarted; + _TouchGestureDetectorState __currentState; + _TouchGestureDetectorType __type; + _ControlHandle __gestureContol; + void* __pUserData; + _ITouchGestureDelegate* __pDelegator; + Tizen::Base::Collection::IListT <_TouchGestureDetector*>* __pWantToFailList; + Tizen::Base::Collection::IListT <_TouchGestureDetector*>* __pCurrentWantToFailList; + Tizen::Base::Collection::IListT * __pEventListenerList; +}; // _TouchGestureDetector + +} } //Tizen::Ui + +#endif //_FUI_INTERNAL_TOUCH_GESTURE_DETECTOR_H_ \ No newline at end of file diff --git a/src/ui/inc/FUi_TouchGestureDetectorImpl.h b/src/ui/inc/FUi_TouchGestureDetectorImpl.h new file mode 100644 index 0000000..cc12bd0 --- /dev/null +++ b/src/ui/inc/FUi_TouchGestureDetectorImpl.h @@ -0,0 +1,95 @@ +// +// 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_TouchGestureDetectorImpl.h + * @brief This is the header file for the %_TouchGestureDetectorImpl class. + * + * This header file contains the declarations of the %_TouchGestureDetectorImpl class. + */ +#ifndef _FUI_INTERNAL_TOUCH_GESTURE_DETECTOR_IMPL_H_ +#define _FUI_INTERNAL_TOUCH_GESTURE_DETECTOR_IMPL_H_ + +#include +#include +#include +#include +#include "FUi_TouchGestureDetector.h" +#include "FUi_ITouchGestureDelegate.h" + +namespace Tizen { namespace Ui +{ +class _TouchEventArg; + +class _TouchGestureDetectorImpl + : public Tizen::Base::Object + , virtual public _ITouchGestureDelegate +{ +public: + virtual ~_TouchGestureDetectorImpl(void); + + static _TouchGestureDetectorImpl* CreateInstanceN(TouchGestureDetector* pPublic); + + result SetDetectorState(TouchGestureDetectorState state); + TouchGestureDetectorState GetDetectorState(void) const; + + result SetDelayTouchEventEnabled(bool enable); + bool IsDelayTouchEventEnabled(void) const; + + result SetCancelTouchEventOnSuccessEnabled(bool enable); + bool IsCancelTouchEventOnSuccessEnabled(void) const; + + result AddGestureEventListener(Tizen::Ui::ITouchGestureEventListener& listener); + result RemoveGestureEventListener(Tizen::Ui::ITouchGestureEventListener& listener); + Tizen::Base::Collection::IListT * GetGestureEventListenerList(void) const; + + result StartOnFailureOf(const TouchGestureDetector& gesture); + + Control* GetControl(void) const; + + virtual const TouchGestureDetector& GetPublic(void) const; + virtual TouchGestureDetector& GetPublic(void); + + virtual const _TouchGestureDetector& GetCore(void) const; + virtual _TouchGestureDetector& GetCore(void); + + static _TouchGestureDetectorImpl* GetInstance(TouchGestureDetector& gestureDetector); + static const _TouchGestureDetectorImpl* GetInstance(const TouchGestureDetector& gestureDetector); + + virtual bool OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo); + virtual bool OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo); + virtual bool OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo); + virtual bool OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo); + +protected: + _TouchGestureDetectorImpl(TouchGestureDetector* pPublic, _TouchGestureDetector* pCore); + +private: + _TouchEventArg* GetTouchEventArgN(const Control& source, const _TouchInfo& touchInfo); + + _TouchGestureDetectorImpl(const _TouchGestureDetectorImpl&); + _TouchGestureDetectorImpl& operator =(const _TouchGestureDetectorImpl&); + +private: + TouchGestureDetector* __pPublicGestureDetector; + _TouchGestureDetector* __pCoreGestureDetector; + + Tizen::Base::Collection::IListT* __pPublicGestureEventListenerList; +}; // _TouchGestureDetectorImpl + +} } //Tizen::Ui + +#endif //_FUI_INTERNAL_TOUCH_GESTURE_DETECTOR_IMPL_H_ diff --git a/src/ui/inc/FUi_TouchLongPressGestureDetector.h b/src/ui/inc/FUi_TouchLongPressGestureDetector.h new file mode 100644 index 0000000..89bc970 --- /dev/null +++ b/src/ui/inc/FUi_TouchLongPressGestureDetector.h @@ -0,0 +1,97 @@ +// +// 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_TouchLongPressGestureDetector.h + * @brief This is the header file for the %_TouchLongPressGestureDetector class. + * + * This header file contains the declarations of the %_TouchLongPressGestureDetector class. + * + */ + +#ifndef _FUI_INTERNAL_TOUCH_LONG_PRESS_GESTURE_DETECTOR_H +#define _FUI_INTERNAL_TOUCH_LONG_PRESS_GESTURE_DETECTOR_H + +#include "FUi_TouchGestureDetector.h" +#include "FUi_UiTouchEvent.h" + +namespace Tizen { namespace Ui +{ +class _TouchGestureTimerManager; + +/** + * @class _TouchLongPressGestureDetector + * @brief + * @since 2.0 + * + */ +class _OSP_EXPORT_ _TouchLongPressGestureDetector + : public _TouchGestureDetector +{ +public: + _TouchLongPressGestureDetector(void); + virtual ~_TouchLongPressGestureDetector(void); + + result SetDuration(int duration); + int GetDuration(void) const; + + result SetMoveAllowance(int allowance); + int GetMoveAllowance(void) const; + + result SetMoveAllowance(float allowance); + float GetMoveAllowanceF(void) const; + + result SetTouchCount(int count); + int GetTouchCount(void) const; + + bool IsPressed(void); + void ClearLongPressInfoList(void); + + void ResetGestureTimerManager(void); + bool IsTouchCanceled(void) const; + + void EnableToDeleteTimer(bool deleteTimer); + + virtual bool OnTouchPressed(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo); + virtual bool OnTouchMoved(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo); + 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); + +private: + void RemoveLongPressInfoList(void); + +private: + _TouchLongPressGestureDetector(const _TouchLongPressGestureDetector&); + _TouchLongPressGestureDetector& operator =(const _TouchLongPressGestureDetector&); + +private: + int __duration; + float __moveAllowance; + int __touchCount; + unsigned int __maxPointId; + _TouchGestureTimerManager* __pGestureTimerManager; + bool __touchCanceled; + bool __deleteTimer; + + class _LongPressInfo; + Tizen::Base::Collection::ArrayListT<_LongPressInfo*>* __pLongPressInfoList; +}; // _TouchLongPressGestureDetector + +} } // Tizen::Ui + +#endif //_FUI_INTERNAL_TOUCH_LONG_PRESS_GESTURE_DETECTOR_H + + diff --git a/src/ui/inc/FUi_TouchLongPressGestureDetectorImpl.h b/src/ui/inc/FUi_TouchLongPressGestureDetectorImpl.h new file mode 100644 index 0000000..2faf50c --- /dev/null +++ b/src/ui/inc/FUi_TouchLongPressGestureDetectorImpl.h @@ -0,0 +1,76 @@ +// +// 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_TouchLongPressGestureDetectorImpl.h + * @brief This is the header file for the %_TouchLongPressGestureDetectorImpl class. + * + * This header file contains the declarations of the %_TouchLongPressGestureDetectorImpl class. + * + */ + +#ifndef _FUI_INTERNAL_TOUCH_LONG_PRESS_GESTURE_DETECTOR_IMPL_H +#define _FUI_INTERNAL_TOUCH_LONG_PRESS_GESTURE_DETECTOR_IMPL_H + +#include +#include "FUi_TouchGestureDetectorImpl.h" +#include "FUi_TouchLongPressGestureDetector.h" + +namespace Tizen { namespace Ui +{ + +/** + * @class _TouchLongPressGestureDetectorImpl + * @brief + * @since 2.0 + * + */ +class _TouchLongPressGestureDetectorImpl + : public Tizen::Ui::_TouchGestureDetectorImpl +{ +public: + virtual ~_TouchLongPressGestureDetectorImpl(void); + + static _TouchLongPressGestureDetectorImpl* CreateInstanceN(TouchLongPressGestureDetector* pPublic); + + const _TouchLongPressGestureDetector& GetCore(void) const; + _TouchLongPressGestureDetector& GetCore(void); + + static _TouchLongPressGestureDetectorImpl* GetInstance(TouchLongPressGestureDetector& gestureDetector); + static const _TouchLongPressGestureDetectorImpl* GetInstance(const TouchLongPressGestureDetector& gestureDetector); + + result SetDuration(int duration); + int GetDuration(void) const; + + result SetMoveAllowance(int allowance); + int GetMoveAllowance(void) const; + + result SetMoveAllowance(float allowance); + float GetMoveAllowanceF(void) const; + + result SetTouchCount(int count); + int GetTouchCount(void) const; + +private: + _TouchLongPressGestureDetectorImpl(TouchLongPressGestureDetector* pPublic, _TouchLongPressGestureDetector* pCore); + + _TouchLongPressGestureDetectorImpl(const _TouchLongPressGestureDetectorImpl&); + _TouchLongPressGestureDetectorImpl& operator =(const _TouchLongPressGestureDetectorImpl&); +}; // _TouchLongPressGestureDetectorImpl + +} } // Tizen::Ui + +#endif //_FUI_INTERNAL_TOUCH_LONG_PRESS_GESTURE_DETECTOR_IMPL_H diff --git a/src/ui/inc/FUi_TouchManager.h b/src/ui/inc/FUi_TouchManager.h new file mode 100644 index 0000000..ddf22ac --- /dev/null +++ b/src/ui/inc/FUi_TouchManager.h @@ -0,0 +1,441 @@ +// +// 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_TouchManager.h + * @brief This is the header file for the _TouchManager class. + * + * This header file contains the declarations of the _TouchManager class. @n + */ + +#ifndef _FUI_INTERNAL_TOUCH_MANAGER_H_ +#define _FUI_INTERNAL_TOUCH_MANAGER_H_ + +#include "FUi_ControlImpl.h" +#include "FUi_FingerInfo.h" + +namespace Tizen { namespace Base { namespace Collection { +template class IListT; +template class HashMapT; +}}} + +namespace Tizen { namespace Ui +{ + +class _MultiFingerInfo +{ +public: + /** + * This is the default class constructor. + * + */ + _MultiFingerInfo(void); + + /** + * This is the default class destructor. + * + */ + ~_MultiFingerInfo(void); + +public: + /** + * This method returns point id. + * + * @since 2.0 + * @return The point Id + */ + unsigned long GetPointId(unsigned long deviceId) const; + + /** + * This method returns current cursor id. + * + * @since 2.0 + * @return The cursor Id + */ + unsigned long GetCurrentPointId(void) const; + + /** + * This method convert efl point id to cursor id. + * + * @since 2.0 + * @return The cursor Id + */ + unsigned long GeneratePointId(unsigned long deviceId); + + /** + * This method returns the touch position of specific pointId. + * + * @since 2.0 + * @return The touch position + */ + Tizen::Graphics::FloatPoint GetPosition(unsigned long id) const; + + /** + * This method returns the touch position of specific pointId. + * + * @since 2.0 + * @return The touch position + */ + Tizen::Graphics::FloatPoint GetScreenPoint(unsigned long id) const; + + /** + * This method returns the touch status of specific pointId. + * + * @since 2.0 + * @return The touch status + */ + _TouchStatus GetStatus(unsigned long id) const; + + /** + * This method returns the touch start position. + * + * @since 2.0 + * @return The touch start position + */ + Tizen::Graphics::FloatPoint GetStartPoint(unsigned long id) const; + + /** + * This method returns the touch count + * + * @since 2.0 + * @return The touch count + */ + int GetPointCount(void) const; + + /** + * This method returns the touch info list. + * + * @since 2.0 + * @return The touch info list + */ + Tizen::Base::Collection::IListT<_FingerInfo*>* GetMultiFingerListN(void) const; + + /** + * This method sets current finger info + * + * @since 2.0 + */ + result SetFingerInfo(unsigned long pointId, const Tizen::Graphics::FloatPoint& point, const Tizen::Graphics::FloatPoint& screenPoint, _TouchStatus status); + + /** + * This method resets finger info + * + * @since 2.0 + */ + void ResetFingerInfo(void); + +private: + /** + * This method initializes finger information + * + * @since 2.0 + * @return + */ + void InitializeFingerInfo(void); + + /** + * This method remove finger informations + * + * @since 2.0 + * @return + */ + void RemoveFingerInfoList(void); + + /* + * This is the copy constructor for this class. + */ + _MultiFingerInfo(const _MultiFingerInfo&); + + /** + * This is the assignment operator for this class. + */ + _MultiFingerInfo& operator =(const _MultiFingerInfo&); + +private: + unsigned long __currentPointId; + unsigned long __generatedPointId; + int __pointCount; + Tizen::Base::Collection::HashMapT* __pFingerInfoMap; +}; //_MultiFingerInfo + +class _Control; +class _TouchEventArg; +class _ITouchEventListener; + +const int DEVICE_COUNT = 999; + +class _OSP_EXPORT_ _TouchManager +{ +public: + static void Initialize(void); + static _TouchManager* GetInstance(void); + +public: + /** + * This method adds current position to multi touch list + * + * @since 2.0 + * @return + */ + result AddPoint(unsigned long pointId, const Tizen::Graphics::FloatPoint& point, _TouchStatus status); + + /** + * This method returns the touch point count. + * + * @since 2.0 + * @return The touch point count + */ + int GetPointCount(void) const; + + /** + * This method returns the touch position. + * + * @since 2.0 + * @return The touch position + */ + Tizen::Graphics::FloatPoint GetScreenPoint(unsigned long id) const; + + /** + * This method returns the touch position. + * + * @since 2.0 + * @return The touch position + */ + Tizen::Graphics::FloatPoint GetPosition(unsigned long id) const; + + /** + * This method returns the touch status of specific pointId. + * + * @since 2.0 + * @return The touch status + */ + TouchStatus GetTouchStatus(unsigned long id) const; + + /** + * This method converts device id to point id. + * + * @since 2.0 + * @return The point Id + */ + unsigned long GetPointId(unsigned long deviceId) const; + + /** + * This method generates pointId. + * + * @since 2.0 + * @return The point Id + */ + unsigned long GeneratePointId(unsigned long deviceId) const; + + /** + * This method returns the current pointId for multi touch + * + * @since 2.0 + * @return The point Id + */ + unsigned long GetCurrentPointId(void) const; + + /** + * This method returns touch start point + * + * @since 2.0 + * @return The touch start point(means touch pressed point) + */ + Tizen::Graphics::FloatPoint GetStartPoint(unsigned long pointId) const; + + /** + * This method makes touch event and send touch event through event manager + * + * @since 2.0 + */ + result SendEvent(_Control* pControl, const _TouchInfo& touchInfo); + + /** + * This method sets touch cancelled status for gesture + * + * @since 2.0 + */ + void SetTouchCancelOnGesture(bool onlyTouchEvent); + + /** + * This method sets touch cancelled status + * + * @since 2.0 + */ + void SetTouchCanceled(_Control* pControl); + + /** + * This method sets touch released status + * open contextMenu when longpress detected, release event isn't sent because IsEventEnabled is false + */ + void SetTouchReleased(void); + + /** + * This method sets touch allowed status + * + * @since 2.0 + */ + void SetTouchAllowed(bool allowed); + + /** + * This method returns touch allowed status + * + * @since 2.0 + * @return touch allowed status + */ + bool IsTouchAllowed(void); + + /** + * This method returns touch move allowed status + * Whenever starting touch move, checking this value if it allows to move. + * + * @since 2.0 + * @return touch move allowed status + */ + bool IsInTouchMoveAllowanceBounds(const _Control& source, const _TouchInfo& touchInfo); + + /** + * This method sets the touch control source. - common control of focus, drag. + * It's the control touch press occurred. + * + * @since 2.0 + */ + void SetTouchControlSource(const _Control& source); + + /** + * This method returns the touch control source, + * + * @since 2.0 + * @return The first touched control source + */ + _Control* GetTouchControlSource(void) const; + + /** + * This method sets the touch focused control source. - common control of focus, drag. + * It's the control touch press occurred. + * + * @since 2.0 + */ + void SetFocusedControlSource(const _Control& source); + + /** + * This method returns the touch focused control source, + * + * @since 2.0 + * @return The first touched control source + */ + _Control* GetFocusedControlSource(void) const; + + /** + * This method sets touch captured control + * If you set the captured control, all touch events are sent to captured control. + * + * @since 2.0 + */ + void SetCapturedControl(const _Control* pControl, bool allowOutOfBounds, bool allowOwnerBounds); + + /** + * This method returns touch captured control + * + * @since 2.0 + * @return The captured control + */ + _Control* GetCapturedControl(void) const; + + bool IsCaptureAllowedOutOfBounds(void) const; + + bool IsCaptureAllowedOwnerBounds(void) const; + + /** + * This method resets touch information, point count and cursorID etc. + * + * @since 2.0 + */ + void ResetTouchInfo(void); + + /** + * This method sets touch is canceled by gesture success. + * + * @since 2.0 + */ + void SetTouchCanceledOnGestureSuccess(bool cancel); + + /** + * This method returns whether touch is canceled on gesture success. + * + * @since 2.0 + */ + bool IsTouchCanceledOnGestureSuccess(void) const; + + Tizen::Base::Collection::IListT<_FingerInfo*>* GetMultiFingerInfoListN(void) const; + + bool IsSendingDelayedEvent(void) const; + + static void ReleaseInstance(void); + + void SetChangedTouchableTarget(_Control* pTarget); + + _Control* GetChangedTouchableTarget(void); + + void SetListenerOnly(int pointId, bool listenerOnly); + + bool IsListenerOnly(int pointId) const; + +private: + /** + * This is the default class constructor. + * + */ + _TouchManager(void); + + /** + * This is the default class destructor. + * + */ + ~_TouchManager(void); + + /* + * This is the copy constructor for this class. + */ + _TouchManager(const _TouchManager&); + + /** + * This is the assignment operator for this class. + */ + _TouchManager& operator =(const _TouchManager&); + + static void InitializeInstance(void); + +private: + static _TouchManager* __pInstance; + _MultiFingerInfo* __pMultiFingerInfo; + _ControlHandle __touchControlHandle; + _ControlHandle __capturedControlHandle; + _ControlHandle __focusedControlHandle; + bool __touchCanceled; + bool __touchAllowed; + _ITouchEventListener* __pTouchEventListener; + bool __captureAllowOutOfBounds; + bool __captureAllowOwnerBounds; + bool __isSendingDelayedEvent; + bool __touchCanceledOnGestureSuccess; + bool __listenerOnly[DEVICE_COUNT]; + _Control* __changedTouchableTarget; +}; // _TouchManager + +} } // Tizen::Ui + +#endif // _FUI_INTERNAL_TOUCH_MANAGER_H_ diff --git a/src/ui/inc/FUi_TouchPanningGestureDetector.h b/src/ui/inc/FUi_TouchPanningGestureDetector.h new file mode 100644 index 0000000..c0f77e7 --- /dev/null +++ b/src/ui/inc/FUi_TouchPanningGestureDetector.h @@ -0,0 +1,73 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +/** + * @file FUi_TouchPanningGestureDetector.h + * @brief This is the header file for the %_TouchPanningGestureDetector class. + * + * This header file contains the declarations of the %_TouchPanningGestureDetector class. + */ +#ifndef _FUI_INTERNAL_TOUCH_PANNING_GESTURE_DETECTOR_H_ +#define _FUI_INTERNAL_TOUCH_PANNING_GESTURE_DETECTOR_H_ + +#include "FUi_TouchGestureDetector.h" + +namespace Tizen { namespace Ui +{ +/** + * @class _TouchPanningGestureDetector + * @brief + * @since 2.0 + * + */ +class _OSP_EXPORT_ _TouchPanningGestureDetector + : public _TouchGestureDetector + , public Tizen::Base::Runtime::ITimerEventListener +{ +public: + _TouchPanningGestureDetector(void); + virtual ~_TouchPanningGestureDetector(void); + + virtual bool OnTouchPressed(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo); + virtual bool OnTouchMoved(const Tizen::Ui:: _Control& source, const Tizen::Ui::_TouchInfo& touchinfo); + 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); + + virtual void OnTouchGestureDetectorAdded(void); + virtual void OnTouchGestureDetectorRemoved(void); + + result SetTouchCount(int count); + int GetTouchCount(void) const; + + Tizen::Base::Collection::IListT<_TouchInfo*>* GetTouchInfoListN(const _Control* pControl) const; + +private: + _TouchPanningGestureDetector(const _TouchPanningGestureDetector&); + _TouchPanningGestureDetector& operator =(const _TouchPanningGestureDetector&); + + virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer); + void SetDetectorStateChanged(void); + +private: + int __touchCount; //touch count for gesture recognition + int __fingerCount; //current pressed finger count + unsigned int __maxPointId; + Tizen::Base::Runtime::Timer* __pTimer; +}; // _TouchPanningGestureDetector + +}} //Tizen::Ui + +#endif //_FUI_INTERNAL_TOUCH_PANNING_GESTURE_DETECTOR_H_ diff --git a/src/ui/inc/FUi_TouchPanningGestureDetectorImpl.h b/src/ui/inc/FUi_TouchPanningGestureDetectorImpl.h new file mode 100644 index 0000000..7bd2df9 --- /dev/null +++ b/src/ui/inc/FUi_TouchPanningGestureDetectorImpl.h @@ -0,0 +1,67 @@ +// +// 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_TouchPanningGestureDetectorImpl.h + * @brief This is the header file for the %_TouchPanningGestureDetectorImpl class. + * + * This header file contains the declarations of the %_TouchPanningGestureDetectorImpl class. + */ +#ifndef _FUI_INTERNAL_TOUCH_PANNING_GESTURE_DETECTOR_IMPL_H_ +#define _FUI_INTERNAL_TOUCH_PANNING_GESTURE_DETECTOR_IMPL_H_ + +#include +#include "FUi_TouchGestureDetectorImpl.h" +#include "FUi_TouchPanningGestureDetector.h" + +namespace Tizen { namespace Ui +{ + +/** + * @class _TouchPanningGestureDetectorImpl + * @brief + * @since 2.0 + * + */ +class _TouchPanningGestureDetectorImpl + : public Tizen::Ui::_TouchGestureDetectorImpl +{ +public: + virtual ~_TouchPanningGestureDetectorImpl(void); + + static _TouchPanningGestureDetectorImpl* CreateInstanceN(TouchPanningGestureDetector* pPublic); + + virtual const _TouchPanningGestureDetector& GetCore(void) const; + virtual _TouchPanningGestureDetector& GetCore(void); + + static _TouchPanningGestureDetectorImpl* GetInstance(TouchPanningGestureDetector& gestureDetector); + static const _TouchPanningGestureDetectorImpl* GetInstance(const TouchPanningGestureDetector& gestureDetector); + + result SetTouchCount(int count); + int GetTouchCount(void) const; + + Tizen::Base::Collection::IList* GetTouchInfoListN(void) const; + +private: + _TouchPanningGestureDetectorImpl(TouchPanningGestureDetector* pPublic, _TouchPanningGestureDetector* pCore); + + _TouchPanningGestureDetectorImpl(const _TouchPanningGestureDetectorImpl&); + _TouchPanningGestureDetectorImpl& operator =(const _TouchPanningGestureDetectorImpl&); +}; // _TouchPanningGestureDetectorImpl + +} } //Tizen::Ui + +#endif //_FUI_INTERNAL_TOUCH_PANNING_GESTURE_DETECTOR_IMPL_H_ diff --git a/src/ui/inc/FUi_TouchPinchGestureDetector.h b/src/ui/inc/FUi_TouchPinchGestureDetector.h new file mode 100644 index 0000000..b16a76f --- /dev/null +++ b/src/ui/inc/FUi_TouchPinchGestureDetector.h @@ -0,0 +1,71 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.1 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// 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_TouchPinchGestureDetector.h + * @brief This is the header file for the %_TouchPinchGestureDetector class. + * + * This header file contains the declarations of the %_TouchPinchGestureDetector class. + */ +#ifndef _FUI_INTERNAL_TOUCH_PINCH_GESTURE_DETECTOR_H_ +#define _FUI_INTERNAL_TOUCH_PINCH_GESTURE_DETECTOR_H_ + +#include "FUi_TouchGestureDetector.h" +#include "FUi_UiTouchEvent.h" + +namespace Tizen { namespace Ui +{ +class _PinchInfo; + +class _OSP_EXPORT_ _TouchPinchGestureDetector + : public _TouchGestureDetector + , public Tizen::Base::Runtime::ITimerEventListener +{ +public: + _TouchPinchGestureDetector(void); + virtual ~_TouchPinchGestureDetector(void); + + virtual bool OnTouchPressed(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo); + virtual bool OnTouchMoved(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo); + 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); + + Tizen::Graphics::Point GetCenterPoint(void) const; + Tizen::Graphics::FloatPoint GetCenterPointF(void) const; + + int GetScale(void) const; + float GetScaleF(void) const; + +private: + _TouchPinchGestureDetector(const _TouchPinchGestureDetector&); + _TouchPinchGestureDetector& operator =(const _TouchPinchGestureDetector&); + + virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer); + void SetDetectorStateChanged(void); + int MeasureArea(void); + +private: + Tizen::Graphics::FloatPoint __MinimumPoint; + Tizen::Graphics::FloatPoint __MaximumPoint; + Tizen::Graphics::FloatPoint __centerPosition; + Tizen::Base::Runtime::Timer* __pTimer; + int __threshold; + float __scale; +}; // _TouchPinchGestureDetector + +}} //Tizen::Ui + +#endif //_FUI_INTERNAL_TOUCH_PINCH_GESTURE_DETECTOR_H_ diff --git a/src/ui/inc/FUi_TouchPinchGestureDetectorImpl.h b/src/ui/inc/FUi_TouchPinchGestureDetectorImpl.h new file mode 100644 index 0000000..6449e0e --- /dev/null +++ b/src/ui/inc/FUi_TouchPinchGestureDetectorImpl.h @@ -0,0 +1,62 @@ +// +// 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_TouchPinchGestureDetectorImpl.h + * @brief This is the header file for the %_TouchPinchGestureDetectorImpl class. + * + * This header file contains the declarations of the %_TouchPinchGestureDetectorImpl class. + */ +#ifndef _FUI_INTERNAL_TOUCH_PINCH_GESTURE_DETECTOR_IMPL_H_ +#define _FUI_INTERNAL_TOUCH_PINCH_GESTURE_DETECTOR_IMPL_H_ + +#include +#include "FUi_TouchGestureDetectorImpl.h" +#include "FUi_TouchPinchGestureDetector.h" + +namespace Tizen { namespace Ui +{ + +class _TouchPinchGestureDetectorImpl + : public Tizen::Ui::_TouchGestureDetectorImpl +{ +public: + virtual ~_TouchPinchGestureDetectorImpl(void); + + static _TouchPinchGestureDetectorImpl* CreateInstanceN(TouchPinchGestureDetector* pPublic); + + virtual const _TouchPinchGestureDetector& GetCore(void) const; + virtual _TouchPinchGestureDetector& GetCore(void); + + static _TouchPinchGestureDetectorImpl* GetInstance(TouchPinchGestureDetector& gestureDetector); + static const _TouchPinchGestureDetectorImpl* GetInstance(const TouchPinchGestureDetector& gestureDetector); + + Tizen::Graphics::Point GetCenterPoint(void) const; + Tizen::Graphics::FloatPoint GetCenterPointF(void) const; + + int GetScale(void) const; + float GetScaleF(void) const; + +private: + _TouchPinchGestureDetectorImpl(TouchPinchGestureDetector* pPublic, _TouchPinchGestureDetector* pCore); + + _TouchPinchGestureDetectorImpl(const _TouchPinchGestureDetectorImpl&); + _TouchPinchGestureDetectorImpl& operator =(const _TouchPinchGestureDetectorImpl&); +}; // _TouchPinchGestureDetectorImpl + +} } //Tizen::Ui + +#endif //_FUI_INTERNAL_TOUCH_PINCH_GESTURE_DETECTOR_IMPL_H_ diff --git a/src/ui/inc/FUi_TouchRotationGestureDetector.h b/src/ui/inc/FUi_TouchRotationGestureDetector.h new file mode 100644 index 0000000..a7df56e --- /dev/null +++ b/src/ui/inc/FUi_TouchRotationGestureDetector.h @@ -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_TouchRotationGestureDetector.h + * @brief This is the header file for the %_TouchRotationGestureDetector class. + * + * This header file contains the declarations of the %_TouchRotationGestureDetector class. + */ +#ifndef _FUI_INTERNAL_TOUCH_ROTATION_GESTURE_DETECTOR_H_ +#define _FUI_INTERNAL_TOUCH_ROTATION_GESTURE_DETECTOR_H_ + +#include "FUi_TouchGestureDetector.h" + +namespace Tizen { namespace Ui +{ +/** + * @class _TouchRotationGestureDetector + * @brief + * @since 2.0 + * + */ +class _OSP_EXPORT_ _TouchRotationGestureDetector + : public _TouchGestureDetector + , public Tizen::Base::Runtime::ITimerEventListener +{ +public: + _TouchRotationGestureDetector(void); + ~_TouchRotationGestureDetector(void); + + virtual bool OnTouchPressed(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo); + virtual bool OnTouchMoved(const Tizen::Ui:: _Control& source, const Tizen::Ui::_TouchInfo& touchinfo); + 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); + + virtual void OnTouchGestureDetectorAdded(void); + virtual void OnTouchGestureDetectorRemoved(void); + + float GetAngle(void) const; + float GetDistance(void) const; + + float GetDistanceF(void) const; + +private: + _TouchRotationGestureDetector(const _TouchRotationGestureDetector&); + _TouchRotationGestureDetector& operator =(const _TouchRotationGestureDetector&); + + double GetAngle(float x1, float y1, float x2, float y2) const; + virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer); + void SetDetectorStateChanged(void); + +private: + float __distance; + float __angle; + int __fingerCount; + Tizen::Graphics::FloatPoint __firstPoint; + Tizen::Graphics::FloatPoint __secondPoint; + Tizen::Graphics::FloatPoint __firstPrevPoint; + Tizen::Graphics::FloatPoint __secondPrevPoint; + int __firstMovedDirection; + int __secondMovedDirection; + Tizen::Base::Runtime::Timer* __pTimer; + unsigned long __firstPointId; + unsigned long __secondPointId; +}; // _TouchRotationGestureDetector + +}} //Tizen::Ui + +#endif //_FUI_INTERNAL_TOUCH_ROTATION_GESTURE_DETECTOR_H_ diff --git a/src/ui/inc/FUi_TouchRotationGestureDetectorImpl.h b/src/ui/inc/FUi_TouchRotationGestureDetectorImpl.h new file mode 100644 index 0000000..7363bf5 --- /dev/null +++ b/src/ui/inc/FUi_TouchRotationGestureDetectorImpl.h @@ -0,0 +1,66 @@ +// +// 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_TouchRotationGestureDetectorImpl.h + * @brief This is the header file for the %_TouchRotationGestureDetectorImpl class. + * + * This header file contains the declarations of the %_TouchRotationGestureDetectorImpl class. + */ +#ifndef _FUI_INTERNAL_TOUCH_ROTATION_GESTURE_DETECTOR_IMPL_H_ +#define _FUI_INTERNAL_TOUCH_ROTATION_GESTURE_DETECTOR_IMPL_H_ + +#include +#include "FUi_TouchGestureDetectorImpl.h" +#include "FUi_TouchRotationGestureDetector.h" + +namespace Tizen { namespace Ui +{ +/** + * @class _TouchRotationGestureDetectorImpl + * @brief + * @since 2.0 + * + */ +class _TouchRotationGestureDetectorImpl + : public Tizen::Ui::_TouchGestureDetectorImpl +{ +public: + ~_TouchRotationGestureDetectorImpl(void); + + static _TouchRotationGestureDetectorImpl* CreateInstanceN(TouchRotationGestureDetector* pPublic); + + virtual const _TouchRotationGestureDetector& GetCore(void) const; + virtual _TouchRotationGestureDetector& GetCore(void); + + static _TouchRotationGestureDetectorImpl* GetInstance(TouchRotationGestureDetector& gestureDetector); + static const _TouchRotationGestureDetectorImpl* GetInstance(const TouchRotationGestureDetector& gestureDetector); + + float GetAngle(void) const; + int GetDistance(void) const; + + float GetDistanceF(void) const; + +private: + _TouchRotationGestureDetectorImpl(TouchRotationGestureDetector* pPublic, _TouchRotationGestureDetector* pCore); + + _TouchRotationGestureDetectorImpl(const _TouchRotationGestureDetectorImpl&); + _TouchRotationGestureDetectorImpl& operator =(const _TouchRotationGestureDetectorImpl&); +}; // _TouchRotationGestureDetectorImpl + +} } //Tizen::Ui + +#endif //_FUI_INTERNAL_TOUCH_ROTATION_GESTURE_DETECTOR_IMPL_H_ diff --git a/src/ui/inc/FUi_TouchTapGestureDetector.h b/src/ui/inc/FUi_TouchTapGestureDetector.h new file mode 100644 index 0000000..2bfecc0 --- /dev/null +++ b/src/ui/inc/FUi_TouchTapGestureDetector.h @@ -0,0 +1,97 @@ +// +// 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_TouchTapGestureDetector.h + * @brief This is the header file for the %_TouchTapGestureDetector class. + * + * This header file contains the declarations of the %_TouchTapGestureDetector class. + */ +#ifndef _FUI_INTERNAL_TOUCH_TAP_GESTURE_DETECTOR_H_ +#define _FUI_INTERNAL_TOUCH_TAP_GESTURE_DETECTOR_H_ + +#include "FUi_TouchGestureDetector.h" +#include "FUi_UiTouchEvent.h" + +namespace Tizen { namespace Ui +{ +class _TouchGestureTimerManager; + +/** + * @class _TouchTapGestureDetector + * @brief + * @since 2.0 + * + */ +class _OSP_EXPORT_ _TouchTapGestureDetector + : public _TouchGestureDetector +{ +public: + _TouchTapGestureDetector(void); + virtual ~_TouchTapGestureDetector(void); + + result SetTapCount(int count); + int GetTapCount(void) const; + + result SetTapInterval(long interval); + long GetTapInterval(void) const; + + result SetTouchCount(int count); + int GetTouchCount(void) const; + + //apply only one touch count + result SetMoveAllowance(int allowance); + int GetMoveAllowance(void) const; + + result SetMoveAllowance(float allowance); + float GetMoveAllowanceF(void) const; + + bool IsInBounds(void); + void ClearTapInfoList(void); + bool IsAllTapped(void); + + virtual bool OnTouchPressed(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo); + virtual bool OnTouchMoved(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchinfo); + 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); + + void RemoveTapInfoList(void); + +private: + int __tapCount; + int __interval; + int __touchCount; + unsigned int __maxPointId; + Tizen::Graphics::FloatPoint __oneTapStartPoint; + _TouchGestureTimerManager* __pGestureTimerManager; + bool __deleteTimer; + bool __touchCanceled; + + class _TapInfo; + Tizen::Base::Collection::ArrayListT<_TapInfo*>* __pTapInfoList; +}; // _TapGestureDetector + +}} //Tizen::Ui + +#endif //_FUI_INTERNAL_TOUCH_TAP_GESTURE_DETECTOR_H_ diff --git a/src/ui/inc/FUi_TouchTapGestureDetectorImpl.h b/src/ui/inc/FUi_TouchTapGestureDetectorImpl.h new file mode 100644 index 0000000..3e68fbb --- /dev/null +++ b/src/ui/inc/FUi_TouchTapGestureDetectorImpl.h @@ -0,0 +1,76 @@ +// +// 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_TouchTapGestureDetectorImpl.h + * @brief This is the header file for the %_TouchTapGestureDetectorImpl class. + * + * This header file contains the declarations of the %_TouchTapGestureDetectorImpl class. + */ +#ifndef _FUI_INTERNAL_TOUCH_TAP_GESTURE_DETECTOR_IMPL_H_ +#define _FUI_INTERNAL_TOUCH_TAP_GESTURE_DETECTOR_IMPL_H_ + +#include +#include "FUi_TouchGestureDetectorImpl.h" +#include "FUi_TouchTapGestureDetector.h" + +namespace Tizen { namespace Ui +{ +/** + * @class _TouchTapGestureDetectorImpl + * @brief + * @since 2.0 + * + */ +class _TouchTapGestureDetectorImpl + : public Tizen::Ui::_TouchGestureDetectorImpl +{ +public: + virtual ~_TouchTapGestureDetectorImpl(void); + + static _TouchTapGestureDetectorImpl* CreateInstanceN(TouchTapGestureDetector* pPublic); + + virtual const _TouchTapGestureDetector& GetCore(void) const; + virtual _TouchTapGestureDetector& GetCore(void); + + static _TouchTapGestureDetectorImpl* GetInstance(TouchTapGestureDetector& gestureDetector); + static const _TouchTapGestureDetectorImpl* GetInstance(const TouchTapGestureDetector& gestureDetector); + + result SetTapCount(int count); + int GetTapCount(void) const; + + result SetTapInterval(long interval); + long GetTapInterval(void) const; + + result SetTouchCount(int count); + int GetTouchCount(void) const; + + result SetMoveAllowance(int allowance); + int GetMoveAllowance(void) const; + + result SetMoveAllowance(float allowance); + float GetMoveAllowanceF(void) const; + +private: + _TouchTapGestureDetectorImpl(TouchTapGestureDetector* pPublic, _TouchTapGestureDetector* pCore); + + _TouchTapGestureDetectorImpl(const _TouchTapGestureDetectorImpl& value); + _TouchTapGestureDetectorImpl& operator =(const _TouchTapGestureDetectorImpl& value); +}; // _TouchTapGestureDetectorImpl + +} } //Tizen::Ui + +#endif //_FUI_INTERNAL_TOUCH_TAP_GESTURE_DETECTOR_IMPL_H_ diff --git a/src/ui/inc/FUi_Types.h b/src/ui/inc/FUi_Types.h new file mode 100644 index 0000000..2342df4 --- /dev/null +++ b/src/ui/inc/FUi_Types.h @@ -0,0 +1,100 @@ +// +// 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. +// + +#ifndef _FUI_INTERNAL_DEFINITIONS_H_ +#define _FUI_INTERNAL_DEFINITIONS_H_ + +#include +#include +#include +#include + +#define PARTIAL_SCREEN // Temp + +namespace Tizen { namespace Ui +{ + +class _Control; + +typedef Tizen::Base::_HandleT <_Control> _ControlHandle; + +enum _ControlRotation +{ + _CONTROL_ROTATION_0, + _CONTROL_ROTATION_90, + _CONTROL_ROTATION_180, + _CONTROL_ROTATION_270, +}; + +enum _ControlOrientation +{ + _CONTROL_ORIENTATION_PORTRAIT, + _CONTROL_ORIENTATION_LANDSCAPE +}; + +enum _ControlArea +{ + _CONTROL_AREA_NONE = -1, + _CONTROL_AREA_CLIENT, + _CONTROL_AREA_SYSTEM, +}; + +enum _ControlLayer +{ + _CONTROL_LAYER_NONE = -1, + _CONTROL_LAYER_OVERLAY, + _CONTROL_LAYER_CLIENT_BOTTOM, + _CONTROL_LAYER_CLIENT_MIDDLE, + _CONTROL_LAYER_CLIENT_TOP, + _CONTROL_LAYER_SYSTEM, +}; + +enum _ControlZOrderUpdate +{ + _CONTROL_ZORDER_UPDATE_TOP, + _CONTROL_ZORDER_UPDATE_BOTTOM, + _CONTROL_ZORDER_UPDATE_UPWARD, + _CONTROL_ZORDER_UPDATE_DOWNWARD, +}; + +enum _TouchCapture +{ + _TOUCH_CAPTURE_ALLOW_INNER_BOUNDS, + _TOUCH_CAPTURE_ALLOW_OWNER_BOUNDS, + _TOUCH_CAPTURE_ALLOW_OUT_OF_BOUNDS +}; + +template +struct _IntToType +{ + enum + { + VALUE = V + }; +}; + +template +struct _TypeToType +{ + typedef T type; +}; + +typedef unsigned int NativeWindowHandle; + +}} // Tizen::Ui + +#endif // _FUI_INTERNAL_DEFINITIONS_H_ diff --git a/src/ui/inc/FUi_UiBuilder.h b/src/ui/inc/FUi_UiBuilder.h new file mode 100644 index 0000000..d3aacde --- /dev/null +++ b/src/ui/inc/FUi_UiBuilder.h @@ -0,0 +1,86 @@ +// +// 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_UiBuilder.h + * @brief This is the header file for the _UiBuilder class. + * + * This header file contains the declarations of the _UiBuilder class. @n + */ +#ifndef _FUI_INTERNAL_UI_BUILDER_H_ +#define _FUI_INTERNAL_UI_BUILDER_H_ + +#include +#include +#include +#include +#include +#include "FUi_UiBuilderConfig.h" +#include "FUi_UiBuilderRegister.h" +#include "FUi_UiBuilderControl.h" +#include "FUi_UiBuilderControlTable.h" + +namespace Tizen { namespace Ui +{ + +/** +* @class _UiBuilder +* @brief This class is an implementation of a %_UiBuilder. +* @since 2.1 +* +* The %_UiBuiler Class contains information that control register and XML parser. +* +* +*/ +class _OSP_EXPORT_ _UiBuilder + : public Tizen::Base::Object +{ +public: + virtual ~_UiBuilder(void); + _UiBuilder(void); + result Construct(const Tizen::Base::String& xmlFile, Tizen::Ui::Container* pContainer); + result MakeUI(_UiBuilderControl* pControl); + _UiBuilderControl* CreateControl(void); + Tizen::Ui::Container* GetContainer(void) const; + result Parse(void); + bool IsSameResolution(void) const; + void SetVersion(int xmlVersion); + void SetUiBuilderRotateState(_UiBuilderScreenRotate rotate); + void SetLayoutOrientation(_UiBuilderControl* pUiBuilderControl, Tizen::Ui::Control* pControl); + int GetVersion(void) const; + _UiBuilderScreenRotate GetUiBuilderRotateState(void) const; + _UiBuilderControl* GetControl(int index) const; + _UiBuilderControl* GetControl(const Tizen::Base::String& id) const; + result SetFormXmlResolution(int formXmlResoluton); + Tizen::Graphics::_ICoordinateSystemTransformer* GetTransformer(void) const; +private: + _UiBuilder(const _UiBuilder& rhs); + _UiBuilder& operator =(const _UiBuilder& rhs); + +private: + int __version; + int __lastIndex; + int __logicalResolution; + Tizen::Base::Collection::ArrayListT<_UiBuilderControl*>* __pUiBuilderControlList; + Tizen::Ui::Container* __pContainer; + _UiBuilderScreenRotate __rotate; + Tizen::Graphics::_ICoordinateSystemTransformer* __pTransform; + Tizen::Base::String __xmlFile; +}; // _UiBuilder + +} } // Tizen::Ui + +#endif //_FUI_INTERNAL_UI_BUILDER_H_ diff --git a/src/ui/inc/FUi_UiBuilderConfig.h b/src/ui/inc/FUi_UiBuilderConfig.h new file mode 100644 index 0000000..0e602f0 --- /dev/null +++ b/src/ui/inc/FUi_UiBuilderConfig.h @@ -0,0 +1,63 @@ +// +// 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_UiBuilderConfig.h +* @brief This is the header file for the %OptionHeader class. +* +* This header file contains the declarations of the UiBuilder configuration values. +*/ + +#ifndef _FUI_INTERNAL_UI_BUILDER_CONFIG_H_ +#define _FUI_INTERNAL_UI_BUILDER_CONFIG_H_ + +const int UIBUILDER_CONTROL_ELEMENT_NUMBER = 100; +const int UIBUILDER_CONTROL_MAX_COUNT = 100; + +const int UIBUILDER_ATTRIBUTE_PORTRAIT = 0; +const int UIBUILDER_ATTRIBUTE_LANDSCAPE = 1; +const int UIBUILDER_ATTRIBUTE_NUM = 2; + +/** +* @enum _UiBuilderLayoutType +* Defines the layout mode of a UiBuilder control +* +* @since 2.1 +*/ +enum _UiBuilderLayoutType +{ + UIBUILDER_LAYOUT_NONE, + UIBUILDER_LAYOUT_GRID, + UIBUILDER_LAYOUT_HORIZONTAL_BOX, + UIBUILDER_LAYOUT_VERTICAL_BOX, + UIBUILDER_LAYOUT_RELATIVE, + UIBUILDER_LAYOUT_CARD +}; + +/** +* @enum _UiBuilderScreenRotate +* Defines the screen rotate of a UiBuilder control +* +* @since 2.1 +*/ +enum _UiBuilderScreenRotate +{ + UIBUIDER_SCREEN_NONE, + UIBUIDER_SCREEN_VERTICAL, + UIBUIDER_SCREEN_HORIZONTAL +}; + +#endif // _FUI_INTERNAL_UI_BUILDER_CONFIG_H_ diff --git a/src/ui/inc/FUi_UiBuilderControl.h b/src/ui/inc/FUi_UiBuilderControl.h new file mode 100644 index 0000000..78cf9a6 --- /dev/null +++ b/src/ui/inc/FUi_UiBuilderControl.h @@ -0,0 +1,85 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +/** +* @file FUi_UiBuilderControl.h +* @brief This is the header file for the %_UiBuilderControl class. +* +* This header file contains the declarations of the %_UiBuilderControl class. +*/ + +#ifndef _FUI_INTERNAL_UI_BUILDER_CONTROL_H_ +#define _FUI_INTERNAL_UI_BUILDER_CONTROL_H_ + +#include "FUi_UiBuilderConfig.h" +#include "FUi_UiBuilderControlLayout.h" +#include "FUi_UiBuilderControlItem.h" + +namespace Tizen { namespace Ui +{ + +/** +* @class _UiBuilderControl +* @brief This class is an implementation of a %_UiBuilderControl. +* @since 2.1 +* +* The %_UiBuilderControl Class contains that informaition for generating the control. +* +* +*/ +class _OSP_EXPORT_ _UiBuilderControl + : public Tizen::Base::Object +{ +public: + _UiBuilderControl(void); + ~_UiBuilderControl(void); + void Construct(const Tizen::Base::String& type); + void SetId(const Tizen::Base::String& id); + void SetType(const Tizen::Base::String& type); + void SetParentWin(const Tizen::Base::String& parent); + void SetElement(int index, const Tizen::Base::String& elementName, const Tizen::Base::String& elementOutValue); + void SetItemElement(int index, const Tizen::Base::String& name, const Tizen::Base::String& value); + void SetItemName(const Tizen::Base::String& name); + Tizen::Base::String GetItemName(int index) const; + bool GetItemElement(int index, const Tizen::Base::String& elementName, Tizen::Base::String& elementOutValue); + int GetItemCount(void) const; + bool GetElement(const Tizen::Base::String& elementName, Tizen::Base::String& elementValue); + Tizen::Base::String GetId(void) const; + Tizen::Base::String GetType(void) const; + Tizen::Base::String GetParentWin(void) const; + _UiBuilderControlLayout* GetAttribute(int mode) const; + +private: + _UiBuilderControl(const _UiBuilderControl& rhs); + _UiBuilderControl& operator =(const _UiBuilderControl& rhs); + bool IsSpecialChar(const Tizen::Base::String& string) const; + void ConvertSpecialChar(Tizen::Base::String& string) const; + +private: + int __itemCount; + void* __pHandle; + Tizen::Base::String __type; + Tizen::Base::String __id; + Tizen::Base::String __parentId; + Tizen::Base::Collection::ArrayListT<_UiBuilderControlElement*>* __pUiBuilderControlElementList; + Tizen::Base::Collection::ArrayListT<_UiBuilderControlItem*>* __pUiBuilderControlItemList; + _UiBuilderControlLayout __layout[UIBUILDER_ATTRIBUTE_NUM]; + +}; // _UiBuilderControl + +} } // Tizen::Ui + +#endif //_FUI_INTERNAL_UI_BUILDER_CONTROL_H_ diff --git a/src/ui/inc/FUi_UiBuilderControlElement.h b/src/ui/inc/FUi_UiBuilderControlElement.h new file mode 100644 index 0000000..57eacca --- /dev/null +++ b/src/ui/inc/FUi_UiBuilderControlElement.h @@ -0,0 +1,63 @@ +// +// 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_UiBuilderControlElement.h +* @brief This is the header file for the %UiBuilderControlElement class. +* +* This header file contains the declarations of the %UiBuilderControlElement class. +*/ + +#ifndef _FUI_INTERNAL_UI_BUILDER_CONTROL_ELEMENT_H_ +#define _FUI_INTERNAL_UI_BUILDER_CONTROL_ELEMENT_H_ + +#include +#include "FUi_UiBuilderConfig.h" + +namespace Tizen { namespace Ui +{ +/** +* @class _UiBuilderControlElement +* @brief This class is an implementation of a %_UiBuilderControlElement. +* @since 2.1 +* +* The %_UiBuilderControlElement Class contains that XML attribute for UiBuilder Control. +* +* +*/ +class _UiBuilderControlElement + : public Tizen::Base::Object +{ +public: + _UiBuilderControlElement(void); + virtual ~_UiBuilderControlElement(void); + void SetName(const Tizen::Base::String& elementName); + void SetValue(const Tizen::Base::String& elementValue); + Tizen::Base::String GetName(void) const; + Tizen::Base::String GetValue(void) const; + +private: + _UiBuilderControlElement(const _UiBuilderControlElement& rhs); + _UiBuilderControlElement& operator =(const _UiBuilderControlElement& rhs); + +protected: + Tizen::Base::String __elementName; + Tizen::Base::String __elementValue; +}; // _UiBuilderControlElement + +} } // Tizen::Ui + +#endif //_FUI_INTERNAL_UI_BUILDER_CONTROL_ELEMENT_H_ diff --git a/src/ui/inc/FUi_UiBuilderControlItem.h b/src/ui/inc/FUi_UiBuilderControlItem.h new file mode 100644 index 0000000..adfc0e2 --- /dev/null +++ b/src/ui/inc/FUi_UiBuilderControlItem.h @@ -0,0 +1,62 @@ +// +// 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_UiBuilderControlItem.h +* @brief This is the header file for the %UiBuilderControlItem class. +* +* This header file contains the declarations of the %UiBuilderControlItem class. +*/ + +#ifndef _FUI_INTERNAL_UI_BUILDER_CONTROL_ITEM_H_ +#define _FUI_INTERNAL_UI_BUILDER_CONTROL_ITEM_H_ + +#include "FUi_UiBuilderConfig.h" +#include "FUi_UiBuilderControlElement.h" + +namespace Tizen { namespace Ui +{ +/** +* @class _UiBuilderControlItem +* @brief This class is an implementation of a %_UiBuilderControlItem. +* @since 2.1 +* +* The %_UiBuilderControlItem Class contains that information for information for Ui control item. +* +* +*/ +class _UiBuilderControlItem + : public Tizen::Base::Object +{ +public: + _UiBuilderControlItem(void); + virtual ~_UiBuilderControlItem(void); + void SetItemName(const Tizen::Base::String& name); + void SetItemElement(int index, const Tizen::Base::String& name, const Tizen::Base::String& value); + Tizen::Base::String GetItemName(void) const; + Tizen::Base::Collection::ArrayListT<_UiBuilderControlElement*>* GetItemProperty(void); +private: + _UiBuilderControlItem(const _UiBuilderControlItem& rhs); + _UiBuilderControlItem& operator =(const _UiBuilderControlItem& rhs); + +protected: + Tizen::Base::String _itemName; + Tizen::Base::Collection::ArrayListT<_UiBuilderControlElement*>* __pUiBuilderControlElementList; +}; // _UiBuilderControlItem + +} } // Tizen::Ui + +#endif //_FUI_INTERNAL_UI_BUILDER_CONTROL_ELEMENT_H_ diff --git a/src/ui/inc/FUi_UiBuilderControlLayout.h b/src/ui/inc/FUi_UiBuilderControlLayout.h new file mode 100644 index 0000000..96fc115 --- /dev/null +++ b/src/ui/inc/FUi_UiBuilderControlLayout.h @@ -0,0 +1,81 @@ +// +// 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_UiBuilderControlLayout.h +* @brief This is the header file for the %_UiBuilderControlLayout class. +* +* This header file contains the declarations of the %_UiBuilderControlLayout class. +*/ + +#ifndef _FUI_INTERNAL_UI_BUILDER_CONTROL_LAYOUT_H_ +#define _FUI_INTERNAL_UI_BUILDER_CONTROL_LAYOUT_H_ + +#include +#include "FUi_UiBuilderControlItem.h" + +namespace Tizen { namespace Ui +{ +/** +* @class _UiBuilderControlLayout +* @brief This class is an implementation of a %_UiBuilderControlLayout. +* @since 2.1 +* +* The %_UiBuilderControlLayout Class contains that coordinates of the control. +* +* +*/ +class _OSP_EXPORT_ _UiBuilderControlLayout + : public Tizen::Base::Object +{ +public: + _UiBuilderControlLayout(void); + virtual ~_UiBuilderControlLayout(void); + void SetStyle(const Tizen::Base::String& style); + void SetRect(const Tizen::Base::String& x, const Tizen::Base::String& y, Tizen::Base::String& width, Tizen::Base::String& height); + void SetRect(const float x, const float y, const float width, const float height); + void SetLayoutElement(int index, const Tizen::Base::String& name, const Tizen::Base::String& value); + Tizen::Base::String GetStyle(void) const; + Tizen::Graphics::Rectangle GetRect(void) const; + Tizen::Graphics::FloatRectangle GetRectF(void) const; + bool GetLayoutElement(const Tizen::Base::String& layoutElementName, Tizen::Base::String& outValue) const; + +private: + _UiBuilderControlLayout(const _UiBuilderControlLayout& rhs); + _UiBuilderControlLayout& operator =(const _UiBuilderControlLayout& rhs); + enum _UiBuilderDockTypeDef + { + _UIBUILDER_DOCK_LEFT = 0x00001, + _UIBUILDER_DOCK_RIGHT = 0x00002, + _UIBUILDER_DOCK_TOP = 0x00004, + _UIBUILDER_DOCK_BOTTOM = 0x00008 + }; + + enum _UiBuilderFitTypeDef + { + _UIBUILDER_FIT_WIDTH = 0x00001, + _UIBUILDER_FIT_HEIGHT = 0x00002 + }; + +private: + Tizen::Base::String __styleInformation; + Tizen::Graphics::FloatRectangle __floatRect; + _UiBuilderControlElement __layoutElement[UIBUILDER_CONTROL_ELEMENT_NUMBER]; +}; // _UiBuilderControlLayout + +} } // Tizen::Ui + +#endif //_FUI_INTERNAL_UI_BUILDER_CONTROL_LAYOUT_H_ diff --git a/src/ui/inc/FUi_UiBuilderControlMaker.h b/src/ui/inc/FUi_UiBuilderControlMaker.h new file mode 100644 index 0000000..332385c --- /dev/null +++ b/src/ui/inc/FUi_UiBuilderControlMaker.h @@ -0,0 +1,91 @@ +// +// 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_UiBuilderControlMaker.h +* @brief This is the header file for the %_UiBuilderControlMaker class. +* +* This header file contains the declarations of the %_UiBuilderControlMaker class. +*/ + +#ifndef _FUI_INTERNAL_UI_BUILDER_CONTROL_MAKER_H_ +#define _FUI_INTERNAL_UI_BUILDER_CONTROL_MAKER_H_ + +#include +#include +#include +#include +#include +#include +#include "FUi_UiBuilderConfig.h" +#include "FUi_UiBuilderControl.h" +#include "FUi_LayoutLayoutMaker.h" + +namespace Tizen { namespace Ui +{ + +class _UiBuilder; +//class _LayoutMaker; +/** +* @class _UiBuilderControlMaker +* @brief This class is an implementation of a %_UiBuilderControlMaker. +* @since 2.1 +* +* The %_UiBuilderControlMaker Class contains that information for generating a Control and setting a layout information. +* +* +*/ +class _OSP_EXPORT_ _UiBuilderControlMaker + : public Tizen::Base::Object +{ +public: + _UiBuilderControlMaker(void); + _UiBuilderControlMaker(_UiBuilder* pUibuilder); + virtual ~_UiBuilderControlMaker(void); + result MakeControl(_UiBuilderControl* pControl); + +protected: + virtual Tizen::Ui::Control* Make(_UiBuilderControl* pControl) = 0; + Tizen::Ui::Container* GetContainer(void) const; + Tizen::Graphics::Bitmap* LoadBitmapN(const Tizen::Base::String& imagePath); + bool ConvertHAlignToHorizontalAlignment(const Tizen::Base::String& align, Tizen::Ui::Controls::HorizontalAlignment& alignment); + bool ConvertVAlignToVerticalAlignment(const Tizen::Base::String& align, Tizen::Ui::Controls::VerticalAlignment& alignment); + bool ConvertSlideShowAnimation(const Tizen::Base::String& animationType, Tizen::Ui::Controls::GalleryAnimation& animation); + int ConvertOpacity100to255(int opacity); + void ConvertStringToColor(const Tizen::Base::String& colorString, Tizen::Graphics::Color& color); + void ConvertStringToColor32(const Tizen::Base::String& colorString, int transparency, Tizen::Graphics::Color& color); + void AddControl(_UiBuilderControl* pUiBuilderControl, Tizen::Ui::Control* pControl); + void SetUiBuilderRotateState(_UiBuilderScreenRotate rotate); + void SetLayoutOrientation(_UiBuilderControl* pUiBuilderCOntrol, Tizen::Ui::Control* pControl); + void GetProperty(_UiBuilderControl* pControl, _UiBuilderControlLayout** pControlProperty) const; + _UiBuilderScreenRotate GetUiBuilderRotateState(void); + Tizen::Graphics::_ICoordinateSystemTransformer* GetTransformer(void) const; + +private: + _UiBuilderControlMaker(const _UiBuilderControlMaker& rhs); + _UiBuilderControlMaker& operator =(const _UiBuilderControlMaker& rhs); +protected: + std::unique_ptr<_LayoutMaker>__pLayoutMaker; +private: + _UiBuilder* __pUiBuilder; + +}; // _UiBuilderControlMaker + +} } // Tizen::Ui + +#endif //_FUI_INTERNAL_UI_BUILDER_CONTROL_MAKER_H_ + + diff --git a/src/ui/inc/FUi_UiBuilderControlTable.h b/src/ui/inc/FUi_UiBuilderControlTable.h new file mode 100644 index 0000000..4a33839 --- /dev/null +++ b/src/ui/inc/FUi_UiBuilderControlTable.h @@ -0,0 +1,90 @@ +// +// 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_UiBuilderControlTable.h +* @brief This is the header file for the %_UiBuilderControlMakerTable class. +* +* This header file contains the declarations of the %_UiBuilderControlMakerTable class. +*/ + +#ifndef _FUI_INTERNAL_UI_BUILDER_CONTROL_TABLE_H_ +#define _FUI_INTERNAL_UI_BUILDER_CONTROL_TABLE_H_ + +#include "FUi_UiBuilderConfig.h" +#include "FUi_UiBuilderControlMaker.h" + +namespace Tizen { namespace Ui +{ + +typedef _UiBuilderControlMaker* (*_UiBuilderControlMakerFunctionPointer)(_UiBuilder* uibuilder); +/** +* @class _UiBuilderControlMakerTable +* @brief This class is an implementation of a %_UiBuilderControlMakerTable. +* @since 2.1 +* +* The %_UiBuilderControlTable Class contains that information for controls' maker. +* +* +*/ + +class _UiBuilderControlTableInFomation +{ +public: + Tizen::Base::String __controlMakerName; + _UiBuilderControlMakerFunctionPointer __pContolMakerFunctionPointer; +}; + + +class _UiBuilderControlTable + : public Tizen::Base::Object +{ +public: + _UiBuilderControlTable(void); + virtual ~_UiBuilderControlTable(void); + +private: + _UiBuilderControlTable(const _UiBuilderControlTable&); + _UiBuilderControlTable& operator =(const _UiBuilderControlTable&); + +public: + Tizen::Base::Collection::ArrayListT<_UiBuilderControlTableInFomation*>* __pUiBuilderControlTableInFomationList; +}; + +class _OSP_EXPORT_ _UiBuilderControlTableManager + : public Tizen::Base::Object +{ +public: + _UiBuilderControlTableManager(void); + virtual ~_UiBuilderControlTableManager(void); + result Construct(void); + void RegisterControl(const Tizen::Base::String& controlMakerName, _UiBuilderControlMakerFunctionPointer pControlMakerFunctionPointer); + void UnregisterControl(const Tizen::Base::String& controlMakerName); + Tizen::Base::String GetName(int index) const; + _UiBuilderControlMakerFunctionPointer GetControlMaker(int index) const; + static _UiBuilderControlTableManager* GetInstance(void); + _UiBuilderControlTable* GetControlTable() const; + +private: + _UiBuilderControlTableManager(const _UiBuilderControlTableManager& rhs); + _UiBuilderControlTableManager& operator =(const _UiBuilderControlTableManager& rhs); +private: + _UiBuilderControlTable* __pControlTable; +}; // _UiBuilderControlTable + +} } // Tizen::Ui + +#endif //_FUI_INTERNAL_UI_BUILDER_CONTROL_TABLE_H_ diff --git a/src/ui/inc/FUi_UiBuilderRegister.h b/src/ui/inc/FUi_UiBuilderRegister.h new file mode 100644 index 0000000..3d0e511 --- /dev/null +++ b/src/ui/inc/FUi_UiBuilderRegister.h @@ -0,0 +1,764 @@ +// +// 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_UiBuilderRegister.h +* @brief This is the header file for the %FormRegister class. +* +* This header file contains the declarations of the %FormRegister class. +*/ + +#include "FBaseObject.h" + +#ifndef _FUI_INTERNAL_UI_BUILDER_REGISTER_H_ +#define _FUI_INTERNAL_UI_BUILDER_REGISTER_H_ + +namespace Tizen { namespace Ui { namespace Controls +{ +/** +* @class _FormRegister +* @brief This class is an implementation of a %_FormRegister. +* @since 2.1 +* +* The %_FormRegister Class contains the declaration of Form's maker +* +* +*/ +class _FormRegister + : public Tizen::Base::Object +{ +public: + _FormRegister(void); + virtual ~_FormRegister(void); +}; // _FormRegister + +/** +* @class _CheckButtonRegister +* @brief This class is an implementation of a %_CheckButtonRegister. +* @since 2.1 +* +* The %_CheckButtonRegister Class contains the declaration of CheckButton's maker +* +* +*/ +class _CheckButtonRegister + : public Tizen::Base::Object +{ +public: + _CheckButtonRegister(void); + virtual ~_CheckButtonRegister(void); +}; // _CheckButtonRegister + +/** +* @class _ButtonRegister +* @brief This class is an implementation of a %_ButtonRegister. +* @since 2.1 +* +* The %_ButtonRegister Class contains the declaration of Button's maker +* +* +*/ +class _ButtonRegister + : public Tizen::Base::Object +{ +public: + _ButtonRegister(void); + virtual ~_ButtonRegister(void); +}; // _ButtonRegister + +/** +* @class _SliderRegister +* @brief This class is an implementation of a %_SliderRegister. +* @since 2.1 +* +* The %_SliderRegister Class contains the declaration of Slider's maker +* +* +*/ +class _SliderRegister + : public Tizen::Base::Object +{ +public: + _SliderRegister(void); + virtual ~_SliderRegister(void); +}; // _SliderRegister + +/** +* @class _SlidableListRegister +* @brief This class is an implementation of a %_SlidableListRegister. +* @since 2.1 +* +* The %_SlidableListRegister Class contains the declaration of SlidableList's maker +* +* +*/ +class _SlidableListRegister + : public Tizen::Base::Object +{ +public: + _SlidableListRegister(void); + virtual ~_SlidableListRegister(void); +}; // _SlidableListRegister + +/** +* @class _SlidableGroupedListRegister +* @brief This class is an implementation of a %_SlidableGroupedListRegister. +* @since 2.1 +* +* The %_SlidableGroupedListRegister Class contains the declaration of SlidableGroupedList's maker +* +* +*/ +class _SlidableGroupedListRegister + : public Tizen::Base::Object +{ +public: + _SlidableGroupedListRegister(void); + virtual ~_SlidableGroupedListRegister(void); +}; // _SlidableGroupedListRegister + +/** +* @class _ScrollPanelRegister +* @brief This class is an implementation of a %_ScrollPanelRegister. +* @since 2.1 +* +* The %_ScrollPanelRegister Class contains the declaration of ScrollPanel's maker +* +* +*/ +class _ScrollPanelRegister + : public Tizen::Base::Object +{ +public: + _ScrollPanelRegister(void); + virtual ~_ScrollPanelRegister(void); +}; // _ScrollPanelRegister + +/** +* @class _TableViewRegister +* @brief This class is an implementation of a %_TableViewRegister. +* @since 2.1 +* +* The %_TableViewRegister Class contains the declaration of TableView's maker +* +* +*/ +class _TableViewRegister + : public Tizen::Base::Object +{ +public: + _TableViewRegister(); + virtual ~_TableViewRegister(); +}; // _TableViewRegister + +/** +* @class _GroupedTableViewRegister +* @brief This class is an implementation of a %_GroupedTableViewRegister. +* @since 2.1 +* +* The %_GroupedTableViewRegister Class contains the declaration of GroupedTableView's maker +* +* +*/ +class _GroupedTableViewRegister + : public Tizen::Base::Object +{ +public: + _GroupedTableViewRegister(); + virtual ~_GroupedTableViewRegister(); +}; // _GroupedTableViewRegister + +/** +* @class _SectionTableViewRegister +* @brief This class is an implementation of a %_SectionTableViewRegister. +* @since 2.1 +* +* The %_SectionTableViewRegister Class contains the declaration of SectionTableView's maker +* +* +*/ +class _SectionTableViewRegister + : public Tizen::Base::Object +{ +public: + _SectionTableViewRegister(); + virtual ~_SectionTableViewRegister(); +}; // _SectionTableViewRegister + +/** +* @class _ProgressRegister +* @brief This class is an implementation of a %_ProgressRegister. +* @since 2.1 +* +* The %_ProgressRegister Class contains the declaration of Progress's maker +* +* +*/ +class _ProgressRegister + : public Tizen::Base::Object +{ +public: + _ProgressRegister(void); + virtual ~_ProgressRegister(void); +}; // _ProgressRegister + +/** +* @class _PopupRegister +* @brief This class is an implementation of a %_PopupRegister. +* @since 2.1 +* +* The %_PopupRegister Class contains the declaration of Popup's maker +* +* +*/ +class _PopupRegister + : public Tizen::Base::Object +{ +public: + _PopupRegister(void); + virtual ~_PopupRegister(void); +}; // _PopupRegister + +/** +* @class _PanelRegister +* @brief This class is an implementation of a %_PanelRegister. +* @since 2.1 +* +* The %_PanelRegister Class contains the declaration of Panel's maker +* +* +*/ +class _PanelRegister + : public Tizen::Base::Object +{ +public: + _PanelRegister(void); + virtual ~_PanelRegister(void); +}; // _PanelRegister + +/** +* @class _OverlayPanelRegister +* @brief This class is an implementation of a %_OverlayPanelRegister. +* @since 2.1 +* +* The %_OverlayPanelRegister Class contains the declaration of OverlayPanel's maker +* +* +*/ +class _OverlayPanelRegister + : public Tizen::Base::Object +{ +public: + _OverlayPanelRegister(void); + virtual ~_OverlayPanelRegister(void); +}; // _OverlayPanelRegister + +/** +* @class _ListRegister +* @brief This class is an implementation of a %_ListRegister. +* @since 2.1 +* +* The %_ListRegister Class contains the declaration of List's maker +* +* +*/ +class _ListRegister + : public Tizen::Base::Object +{ +public: + _ListRegister(void); + virtual ~_ListRegister(void); +}; // _ListRegister + +/** +* @class _LabelRegister +* @brief This class is an implementation of a %_LabelRegister. +* @since 2.1 +* +* The %_LabelRegister Class contains the declaration of Label's maker +* +* +*/ +class _LabelRegister + : public Tizen::Base::Object +{ +public: + _LabelRegister(void); + virtual ~_LabelRegister(void); +}; // _LabelRegister + +/** +* @class _IconListRegister +* @brief This class is an implementation of a %_IconListRegister. +* @since 2.1 +* +* The %_IconListRegister Class contains the declaration of IconList's maker +* +* +*/ +class _IconListRegister + : public Tizen::Base::Object +{ +public: + _IconListRegister(void); + virtual ~_IconListRegister(void); +}; // _IconListRegister + +/** +* @class _GroupedListRegister +* @brief This class is an implementation of a %_GroupedListRegister. +* @since 2.1 +* +* The %_GroupedListRegister Class contains the declaration of GroupedList's maker +* +* +*/ +class _GroupedListRegister + : public Tizen::Base::Object +{ +public: + _GroupedListRegister(void); + virtual ~_GroupedListRegister(void); +}; // _GroupedListRegister + +/** +* @class _FlashRegister +* @brief This class is an implementation of a %_FlashRegister. +* @since 2.1 +* +* The %_FlashRegister Class contains the declaration of Flash's maker +* +* +*/ +class _FlashRegister + : public Tizen::Base::Object +{ +public: + _FlashRegister(void); + virtual ~_FlashRegister(void); +}; // _FlashRegister + +/** +* @class _ExpandableListRegister +* @brief This class is an implementation of a %_ExpandableListRegister. +* @since 2.1 +* +* The %_ExpandableListRegister Class contains the declaration of ExpandableList's maker +* +* +*/ +class _ExpandableListRegister + : public Tizen::Base::Object +{ +public: + _ExpandableListRegister(void); + virtual ~_ExpandableListRegister(void); +}; // _ExpandableListRegister + +/** +* @class _EditTimeRegister +* @brief This class is an implementation of a %_EditTimeRegister. +* @since 2.1 +* +* The %_EditTimeRegister Class contains the declaration of EditTime's maker +* +* +*/ +class _EditTimeRegister + : public Tizen::Base::Object +{ +public: + _EditTimeRegister(void); + virtual ~_EditTimeRegister(void); +}; // _EditTimeRegister + +/** +* @class _EditFieldRegister +* @brief This class is an implementation of a %_EditFieldRegister. +* @since 2.1 +* +* The %_EditFieldRegister Class contains the declaration of EditField's maker +* +* +*/ +class _EditFieldRegister + : public Tizen::Base::Object +{ +public: + _EditFieldRegister(void); + virtual ~_EditFieldRegister(void); +}; // _EditFieldRegister + +/** +* @class _EditDateRegister +* @brief This class is an implementation of a %_EditDateRegister. +* @since 2.1 +* +* The %_EditDateRegister Class contains the declaration of EditDate's maker +* +* +*/ +class _EditDateRegister + : public Tizen::Base::Object +{ +public: + _EditDateRegister(void); + virtual ~_EditDateRegister(void); +}; // _EditDateRegister + +/** +* @class _EditAreaRegister +* @brief This class is an implementation of a %_EditAreaRegister. +* @since 2.1 +* +* The %_EditAreaRegister Class contains the declaration of EditArea's maker +* +* +*/ +class _EditAreaRegister + : public Tizen::Base::Object +{ +public: + _EditAreaRegister(void); + virtual ~_EditAreaRegister(void); +}; // _EditAreaRegister + +/** +* @class _CustomListRegister +* @brief This class is an implementation of a %_CustomListRegister. +* @since 2.1 +* +* The %_CustomListRegister Class contains the declaration of CustomList's maker +* +* +*/ +class _CustomListRegister + : public Tizen::Base::Object +{ +public: + _CustomListRegister(void); + virtual ~_CustomListRegister(void); +}; // _CustomListRegister + +/** +* @class _ColorPickerRegister +* @brief This class is an implementation of a %_ColorPickerRegister. +* @since 2.1 +* +* The %_ColorPickerRegister Class contains the declaration of ColorPicker's maker +* +* +*/ +class _ColorPickerRegister + : public Tizen::Base::Object +{ +public: + _ColorPickerRegister(void); + virtual ~_ColorPickerRegister(void); +}; // _ColorPickerRegister + +/** +* @class _TabBarRegister +* @brief This class is an implementation of a %_TabBarRegister. +* @since 2.1 +* +* The %_TabBarRegister Class contains the declaration of TabBar's maker +* +* +*/ +class _TabBarRegister + : public Tizen::Base::Object +{ +public: + _TabBarRegister(void); + virtual ~_TabBarRegister(void); +}; // _TabBarRegister + +/** +* @class _HeaderRegister +* @brief This class is an implementation of a %_HeaderRegister. +* @since 2.1 +* +* The %_HeaderRegister Class contains the declaration of Header's maker +* +* +*/ +class _HeaderRegister + : public Tizen::Base::Object +{ +public: + _HeaderRegister(void); + virtual ~_HeaderRegister(void); +}; // HeaderRegister + +/** +* @class _FooterRegister +* @brief This class is an implementation of a %_FooterRegister. +* @since 2.1 +* +* The %_FooterRegister Class contains the declaration of Footer's maker +* +* +*/ +class _FooterRegister + : public Tizen::Base::Object +{ +public: + _FooterRegister(void); + virtual ~_FooterRegister(void); +}; // _FooterRegister + +/** +* @class _GalleryRegister +* @brief This class is an implementation of a %_GalleryRegister. +* @since 2.1 +* +* The %_GalleryRegister Class contains the declaration of Gallery's maker +* +* +*/ +class _GalleryRegister + : public Tizen::Base::Object +{ +public: + _GalleryRegister(void); + virtual ~_GalleryRegister(void); +}; // _GalleryRegister + +/** +* @class _IconListViewRegister +* @brief This class is an implementation of a %_IconListViewRegister. +* @since 2.1 +* +* The %_IconListViewRegister Class contains the declaration of IconListView's maker +* +* +*/ +class _IconListViewRegister + : public Tizen::Base::Object +{ +public: + _IconListViewRegister(void); + virtual ~_IconListViewRegister(void); +}; // _IconListViewRegister + +/** +* @class _ListViewRegister +* @brief This class is an implementation of a %_ListViewRegister. +* @since 2.1 +* +* The %_ListViewRegister Class contains the declaration of ListView's maker +* +* +*/ +class _ListViewRegister + : public Tizen::Base::Object +{ +public: + _ListViewRegister(void); + virtual ~_ListViewRegister(void); +}; // _ListViewRegister + +/** +* @class _GroupedListViewRegister +* @brief This class is an implementation of a %_GroupedListViewRegister. +* @since 2.1 +* +* The %_GroupedListViewRegister Class contains the declaration of GroupedListView's maker +* +* +*/ +class _GroupedListViewRegister + : public Tizen::Base::Object +{ +public: + _GroupedListViewRegister(void); + virtual ~_GroupedListViewRegister(void); +}; // _GroupedListViewRegister + +/** +* @class _ExpandableEditAreaRegister +* @brief This class is an implementation of a %_ExpandableEditAreaRegister. +* @since 2.1 +* +* The %_ExpandableEditAreaRegister Class contains the declaration of ExpandableEditArea's maker +* +* +*/ +class _ExpandableEditAreaRegister + : public Tizen::Base::Object +{ +public: + _ExpandableEditAreaRegister(void); + virtual ~_ExpandableEditAreaRegister(void); +}; // _ExpandableEditAreaRegister + +/** +* @class _SearchBarRegister +* @brief This class is an implementation of a %_SearchBarRegister. +* @since 2.1 +* +* The %_SearchBarRegister Class contains the declaration of SearchBar's maker +* +* +*/ +class _SearchBarRegister + : public Tizen::Base::Object +{ +public: + _SearchBarRegister(void); + virtual ~_SearchBarRegister(void); +}; // _SearchBarRegister + +/** +* @class _TextBoxRegister +* @brief This class is an implementation of a %_TextBoxRegister. +* @since 2.1 +* +* The %_TextBoxRegister Class contains the declaration of TextBox's maker +* +* +*/ +class _TextBoxRegister + : public Tizen::Base::Object +{ +public: + _TextBoxRegister(void); + virtual ~_TextBoxRegister(void); +}; // _TextBoxRegister + +/** +* @class _MapRegister +* @brief This class is an implementation of a %_MapRegister. +* @since 2.1 +* +* The %_MapRegister Class contains the declaration of Map's maker +* +* +*/ +class _MapRegister + : public Tizen::Base::Object +{ +public: + _MapRegister(void); + virtual ~_MapRegister(void); +}; // _MapRegister + +/** +* @class _WebRegister +* @brief This class is an implementation of a %_WebRegister. +* @since 2.1 +* +* The %_WebRegister Class contains the declaration of Web's maker +* +* +*/ +class _WebRegister + : public Tizen::Base::Object +{ +public: + _WebRegister(void); + virtual ~_WebRegister(void); +}; // _WebRegister + +/** +* @class _AdRegister +* @brief This class is an implementation of a %_AdRegister. +* @since 2.1 +* +* The %_AdRegister Class contains the declaration of Ad's maker +* +* +*/ +class _AdRegister + : public Tizen::Base::Object +{ +public: + _AdRegister(void); + virtual ~_AdRegister(void); +}; // _AdRegister + +/** +* @class _SplitPanel +* @brief This class is an implementation of a %_SplitPanel. +* @since 2.1 +* +* The %_SplitPanel Class contains the declaration of SplitPanel's maker +* +* +*/ +class _SplitPanelRegister + : public Tizen::Base::Object +{ +public: + _SplitPanelRegister(void); + virtual ~_SplitPanelRegister(void); +}; // _SplitPanelRegister + +/** +* @class _NotificationFrame +* @brief This class is an implementation of a %_NotificationFrame. +* @since 2.1 +* +* The %_NotificationFrame Class contains the declaration of NotificationFrame maker +* +* +*/ +class _NotificationFrameRegister + : public Tizen::Base::Object +{ +public: + _NotificationFrameRegister(void); + virtual ~_NotificationFrameRegister(void); +}; // _NotificationFrameRegister + +/** +* @class _QuickPanelFrame +* @brief This class is an implementation of a %_QuickPanelFrame. +* @since 2.1 +* +* The %_QuickPanelFrame Class contains the declaration of QuickPanelFrame maker +* +* +*/ +class _QuickPanelFrameRegister + : public Tizen::Base::Object +{ +public: + _QuickPanelFrameRegister(void); + virtual ~_QuickPanelFrameRegister(void); +}; // _QuickPanelFrameRegister + +/** +* @class _GroupContainerRegister +* @brief This class is an implementation of a %_GroupContainerRegister. +* @since 2.1 +* +* The %_GroupContainerRegister Class contains the declaration of GroupContainer's maker +* +* +*/ +class _GroupContainerRegister + : public Tizen::Base::Object +{ +public: + _GroupContainerRegister(void); + virtual ~_GroupContainerRegister(void); +}; // _GroupContainerRegister + + +} } } // Tizen::Ui::Controls +#endif // _FUI_INTERNAL_UI_BUILDER_REGISTER_H_ diff --git a/src/ui/inc/FUi_UiBuilderXmlHandler.h b/src/ui/inc/FUi_UiBuilderXmlHandler.h new file mode 100644 index 0000000..4dff7c1 --- /dev/null +++ b/src/ui/inc/FUi_UiBuilderXmlHandler.h @@ -0,0 +1,84 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +/** +* @file FUi_UiBuilderXmlHandler.h +* @brief This is the header file for the %_UiBuilderXmlHandler class. +* +* This header file contains the declarations of the %_UiBuilderXmlHandler class. +*/ + +#ifndef _FUI_INTERNAL_UI_BUILDER_XML_HANDLER_H_ +#define _FUI_INTERNAL_UI_BUILDER_XML_HANDLER_H_ + + + +#include +#include +#include +#include "FUi_UiBuilder.h" + +namespace Tizen { namespace Ui +{ +/** +* @class _UiBuilderXmlHandler +* @brief This class is an implementation of a %_UiBuilderXmlHandler. +* @since 2.1 +* +* The %_UiBuilerXmlHandler Class contains that control's information by parsing the XML. +* +* +*/ +class _UiBuilderXmlHandler + : public Tizen::Base::Object +{ +public: + _UiBuilderXmlHandler(void); + virtual ~_UiBuilderXmlHandler(void); + bool Construct(_UiBuilder* pGenerator); + + result ParseXml(char* pXmlBuffer, int size); + void SetAttribute(const xmlChar** pAtts); + void SetProperty(const xmlChar** pAtts); + void SetItem(const xmlChar* pName, const xmlChar** pAtts); + void SetXmlVersion(const xmlChar** pAttributes); + void ParseAttribute(const xmlChar** pAttributes, int index, const Tizen::Base::String& name); + +private: + _UiBuilderXmlHandler(const _UiBuilderXmlHandler& rhs); + _UiBuilderXmlHandler& operator =(const _UiBuilderXmlHandler& rhs); + +public: + static const int LAYOUT_SETTING = -1; + _UiBuilder* __pGenerator; + _UiBuilderControl* __pControl; + bool __formXmlResolutionExists; + Tizen::Base::String __errorLog; + result __errorResult; + +private: + int __layoutMode; + Tizen::Base::String __xPosition; + Tizen::Base::String __yPosition; + Tizen::Base::String __width; + Tizen::Base::String __height; + + _UiBuilderControlLayout* __pProperty; +}; // _UiBuilderXmlHandler + +} } // Tizen::Ui + +#endif //_FUI_INTERNAL_UI_BUILDER_XML_HANDLER_H_ diff --git a/src/ui/inc/FUi_UiEvent.h b/src/ui/inc/FUi_UiEvent.h new file mode 100644 index 0000000..06ef530 --- /dev/null +++ b/src/ui/inc/FUi_UiEvent.h @@ -0,0 +1,110 @@ +// +// 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_UiEvent.h + * @brief This is the header file for the _UiEvent class. + * + * This header file contains the declarations of the %_UiEvent class. + */ + +#ifndef _FUI_INTERNAL_UI_EVENT_H_ +#define _FUI_INTERNAL_UI_EVENT_H_ + +#include +#include +#include +#include "FUi_UiEventTypes.h" +#include "FUi_IUiEventListener.h" +#include "FUi_IUiEventPreviewer.h" + +namespace Tizen { namespace Base { namespace Collection +{ +class IList; +} } } + +namespace Tizen {namespace Ui +{ + +class _Control; +typedef Tizen::Base::_HandleT _UiObjectHandle; + +/** +* This is internal. If used in an application, the application can get rejected during the certification process. +* @class _UiEvent +* @brief This class impliments _UiEvent and +* fire the Window Event object of a Ui Control. +*/ +class _OSP_EXPORT_ _UiEvent + : public Tizen::Base::Object +{ +// Lifecycle +public: + /** + * This is the default class constructor. + * + */ + _UiEvent(const _UiObjectHandle& destination, const _UiObjectHandle& source, _UiEventRouteType routeType); + _UiEvent(const _UiEvent& rhs); + + /** + * This is the default class destructor. + * + */ + virtual ~_UiEvent(void); + +public: + _UiEvent& operator =(const _UiEvent& rhs); + +public: + _UiObjectHandle GetDestination(void) const; + _UiObjectHandle GetSource(void) const; + void SetRouteType(_UiEventRouteType routeType); + _UiEventRouteType GetRouteType(void) const; + void SetOriginalDestination(const _Control& control); + _UiObjectHandle GetOriginalDestination(void) const; + result ProcessPreviewEvent(const _Control& control, bool& isFiltered); + result ProcessEvent(const _Control& control, bool& isFiltered); + result ProcessListener(const _IUiEventListener& listener, bool& isFiltered); + +public: + virtual _UiEvent* CloneN(void) const = 0; + virtual _UiEventType GetEventType(void) const = 0; + const _Control* GetControl(const _UiObjectHandle& handle) const; + void SetAccessibilityEvent(bool set); + bool GetAccessibilityEvent(void) const; + +protected: + virtual bool IsEventEnabled(const _Control& control) const; + +private: + virtual result OnPreviewEventProcessing(const _Control& control, bool& isFiltered) = 0; + virtual result OnEventProcessing(const _Control& control, bool& isFiltered) = 0; + virtual result OnListenerProcessing(const _IUiEventListener& listener, bool& isFiltered) = 0; + virtual result OnEventHandled(const _Control& control); + +private: + _UiObjectHandle __destination; + _UiObjectHandle __source; + _UiObjectHandle __originalDestination; + + _UiEventRouteType __routeType; + bool __accessibilityEvent; +}; + +}} // Tizen::Ui + +#endif //_FUI_INTERNAL_UI_EVENT_H_ diff --git a/src/ui/inc/FUi_UiEventManager.h b/src/ui/inc/FUi_UiEventManager.h new file mode 100644 index 0000000..41e6282 --- /dev/null +++ b/src/ui/inc/FUi_UiEventManager.h @@ -0,0 +1,129 @@ +// +// 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_UiEventManager.h + * @brief This is the header file for the _UiEventManager class. + * + * This header file contains the declarations of the %_UiEventManager class. + */ + +#ifndef _FUI_INTERNAL_UI_EVENT_MANAGER_H_ +#define _FUI_INTERNAL_UI_EVENT_MANAGER_H_ + +#include +#include +#include +#include +#include "FUi_UiEventTypes.h" +#include "FUi_UiTouchEvent.h" +#include "FUi_UiKeyEvent.h" + +namespace Tizen { namespace Base { namespace Collection +{ +template class LinkedListT; +template class HashMapT; +} } } + +namespace Tizen { namespace Ui +{ + +class _IUiEventManager; +class _UiEvent; +class _IUiEventListener; +class _ITouchEventListener; +class _IKeyEventListener; +class _IFocusEventListener; +class _INotificationEventListener; +class _UiEventListenerMapDeleter; + +/** +* This is internal. If used in an application, the application can get rejected during the certification process. +* @class _UiEventManager +* @brief This class impliments _UiEventManager and +* fire the Window Event object of a Ui Control. +*/ +class _OSP_EXPORT_ _UiEventManager +{ +public: + static void Initialize(void); + static void Release(void); + static _UiEventManager* GetInstance(void); + +public: + result AddTouchEventListener(const _ITouchEventListener& listener); + result AddKeyEventListener(const _IKeyEventListener& listener); + result AddFocusEventListener(const _IFocusEventListener& listener); + result AddNotificationEventListener(const _INotificationEventListener& listener); + + result RemoveTouchEventListener(const _ITouchEventListener& listener); + result RemoveKeyEventListener(const _IKeyEventListener& listener); + result RemoveFocusEventListener(const _IFocusEventListener& listener); + result RemoveNotificationEventListener(const _INotificationEventListener& listener); + + result AddPostKeyEventListener(const _IKeyEventListener& listener); + result RemovePostKeyEventListener(const _IKeyEventListener& listener); + + result AddTargetPostKeyEventListener(const _IKeyEventListener& listener); + result RemoveTargetPostKeyEventListener(const _IKeyEventListener& listener); + + result SendEvent(const _UiEvent& event); + result PostEvent(const _UiEvent& event); + + 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: + static void InitInstance(void); + result AddEventListener(_UiEventType eventType, _UiListenerType listenerType, const _IUiEventListener& listene); + result RemoveEventListener(_UiEventType eventType, _UiListenerType listenerType, const _IUiEventListener& listener); + bool IsListenerRegistered(_UiEventType eventType, _UiListenerType listenerType, const _IUiEventListener& listener); + + result Fire(const _UiEvent& notification); + Tizen::Base::Collection::LinkedListT <_IUiEventListener*>* GetEventListeners(_UiEventType eventType, _UiListenerType listenerType) const; + result ProcessListener(const _UiEvent& event, bool& isFiltered); + result ProcessPostListener(const _UiEvent& event, bool& isFiltered); + result ProcessTargetPostListener(const _UiEvent& event, bool& isFiltered); + result ProcessListener(const _UiEvent& event, _UiListenerType listenerType, bool& isFiltered); + result ProcessEvent(const _UiEvent& event, bool& isFiltered); + result ProcessGlobalGesture(const _UiEvent& event, bool& isFiltered); + result MakeRoutingPath(Tizen::Base::Collection::LinkedListT <_UiObjectHandle>& tunnelingPath, Tizen::Base::Collection::LinkedListT <_UiObjectHandle>& bubblingPath, const _UiEvent& event); + result ProcessTunnelingEvent(const Tizen::Base::Collection::LinkedListT <_UiObjectHandle>& routingPath, const _UiEvent& event, bool& isFiltered); + result ProcessBubblingEvent(const Tizen::Base::Collection::LinkedListT <_UiObjectHandle>& routingPath, const _UiEvent& event, bool& isFiltered); + _UiObjectHandle GetTarget(void) const; + _UiObjectHandle GetTarget(int x, int y) const; + void RemoveAllEventListenerList(Tizen::Base::Collection::HashMapT<_UiEventType, Tizen::Base::Collection::LinkedListT<_IUiEventListener*>*>* pMap); + result CallTranslateKeyEventInfo(const _UiEvent& event, bool& isFiltered); + _UiEventManager(void); + ~_UiEventManager(void); + _UiEventManager(const _UiEventManager& rhs); + _UiEventManager& operator =(const _UiEventManager& rhs); + +private: + static _UiEventManager* __pInstance; + std::unique_ptr<_IUiEventManager> __pEventManager; + std::unique_ptr*> > __pEventListenerMap; + std::unique_ptr*> > __pPostEventListenerMap; + std::unique_ptr*> > __pTargetPostEventListenerMap; +}; + +}} // Tizen::Ui + +#endif //_FUI_INTERNAL_UI_EVENT_MANAGER_H_ diff --git a/src/ui/inc/FUi_UiEventTypes.h b/src/ui/inc/FUi_UiEventTypes.h new file mode 100644 index 0000000..884a61c --- /dev/null +++ b/src/ui/inc/FUi_UiEventTypes.h @@ -0,0 +1,64 @@ +// +// 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. +// + +#ifndef _FUI_INTERNAL_UI_EVENT_TYPES_H_ +#define _FUI_INTERNAL_UI_EVENT_TYPES_H_ + +#include +#include + +namespace Tizen {namespace Ui +{ + +/** + * @enum _EventType + * + * Defines constants used to identify touch status. + * + * @since 2.0 + */ +enum _UiEventType +{ + _UI_EVENT_TOUCH, /**< The touch event type */ + _UI_EVENT_KEY, /**< The key event type */ + _UI_EVENT_FOCUS, /**< The focus event type */ + _UI_EVENT_NOTIFICAITON /**< The notification event type */ +}; + +enum _UiEventRouteType +{ + _UI_EVENT_ROUTE_TUNNEL_BUBBLE, + _UI_EVENT_ROUTE_DIRECT +}; + +enum _UiTouchEventDelivery +{ + _UI_TOUCH_EVENT_DELIVERY_NO, + _UI_TOUCH_EVENT_DELIVERY_YES, + _UI_TOUCH_EVENT_DELIVERY_FORCED_YES, +}; + +enum _UiListenerType +{ + _UI_LISTENER_NONE, + _UI_LISTENER_POST, + _UI_LISTENER_TARGET_POST +}; + +}} // Tizen::Ui + +#endif // _FUI_INTERNAL_UI_EVENT_TYPES_H_ \ No newline at end of file diff --git a/src/ui/inc/FUi_UiFocusEvent.h b/src/ui/inc/FUi_UiFocusEvent.h new file mode 100644 index 0000000..fbee957 --- /dev/null +++ b/src/ui/inc/FUi_UiFocusEvent.h @@ -0,0 +1,83 @@ +// +// 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_UiFocusEvent.h + * @brief This is the header file for the _UiFocusEvent class. + * + * This header file contains the declarations of the %_UiFocusEvent class. @n + */ + +#ifndef _FUI_INTERNAL_UI_FOCUS_EVENT_H_ +#define _FUI_INTERNAL_UI_FOCUS_EVENT_H_ + +#include +#include "FUi_UiEvent.h" + +namespace Tizen {namespace Ui +{ + +class _IFocusEventListener; + +// +//This is internal. If used in an application, the application can get rejected during the certification process. +//@class _UiFocusEvent +//@brief This class impliments _UiFocusEvent and +//fire the Window Event object of a Ui Control. +// + +class _UiFocusEvent + : public _UiEvent +{ +// Lifecycle +public: + /** + * This is the default class constructor. + * + */ + _UiFocusEvent(const _UiObjectHandle& destination, FocusStatus focusState, _UiEventRouteType routeType = _UI_EVENT_ROUTE_DIRECT, const _UiObjectHandle& source = _UiObjectHandle()); + _UiFocusEvent(const _UiFocusEvent& rhs); + + /** + * This is the default class destructor. + * + */ + virtual ~_UiFocusEvent(void); + +public: + _UiFocusEvent& operator =(const _UiFocusEvent& rhs); + +public: + FocusStatus GetFocusState(void) const; + virtual bool IsEventEnabled(const _Control& control) const; + +private: + virtual _UiFocusEvent* CloneN(void) const; + virtual _UiEventType GetEventType(void) 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); + +private: + result FireListener(const _IFocusEventListener* pListener, bool& isFiltered); + +private: + FocusStatus __focusState; +}; + +}} // Tizen::Ui + +#endif //_FUI_INTERNAL_UI_FOCUS_EVENT_H_ diff --git a/src/ui/inc/FUi_UiKeyEvent.h b/src/ui/inc/FUi_UiKeyEvent.h new file mode 100644 index 0000000..2f4c1c5 --- /dev/null +++ b/src/ui/inc/FUi_UiKeyEvent.h @@ -0,0 +1,1049 @@ +// +// 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_UiKeyEvent.h + * @brief This is the header file for the _UiKeyEvent class. + * + * This header file contains the declarations of the %_UiKeyEvent class. + */ + +#ifndef _FUI_INTERNAL_UI_KEY_EVENT_H_ +#define _FUI_INTERNAL_UI_KEY_EVENT_H_ + +#include +#include "FUi_UiEvent.h" + +namespace Tizen {namespace Ui +{ + +enum _KeyCode +{ + /** + * Invalid key + */ + _KEY_INVALID = KEY_INVALID, + + /** + * Up side key + */ + _KEY_SIDE_UP = KEY_SIDE_UP, + + /** + * Down side key + */ + _KEY_SIDE_DOWN = KEY_SIDE_DOWN, + + /** + * Ok key + */ + _KEY_OK = KEY_OK, + + /** + * Clear key + */ + _KEY_CLEAR = KEY_CLEAR, + + /** + * Camera key + */ + _KEY_CAMERA = KEY_CAMERA, + + /** + * Task switcher key + */ + _KEY_SWITCH = KEY_SWITCH, + + /** + * 0 key + */ + _KEY_0 = KEY_0, + + /** + * 1 key + */ + _KEY_1 = KEY_1, + + /** + * 2 key + */ + _KEY_2 = KEY_2, + + /** + * 3 key + */ + _KEY_3 = KEY_3, + + /** + * 4 key + */ + _KEY_4 = KEY_4, + + /** + * 5 key + */ + _KEY_5 = KEY_5, + + /** + * 6 key + */ + _KEY_6 = KEY_6, + + /** + * 7 key + */ + _KEY_7 = KEY_7, + + /** + * 8 key + */ + _KEY_8 = KEY_8, + + /** + * 9 key + */ + _KEY_9 = KEY_9, + + /** + * Asterisk key + */ + _KEY_ASTERISK = KEY_ASTERISK, + + /** + * Sharp key + */ + _KEY_SHARP = KEY_SHARP, + + /** + * Left directional key + */ + _KEY_LEFT = KEY_LEFT, + + /** + * Up directional key + */ + _KEY_UP = KEY_UP, + + /** + * Down directional key + */ + _KEY_DOWN = KEY_DOWN, + + /** + * Right directional key + */ + _KEY_RIGHT = KEY_RIGHT, + + /* + * Placeholder + */ + _KEY_MAX = KEY_MAX, + + /** + * A key + */ + _KEY_A = KEY_A, + + /** + * B key + */ + _KEY_B = KEY_B, + + /** + * C key + */ + _KEY_C = KEY_C, + + /** + * D key + */ + _KEY_D = KEY_D, + + /** + * E key + */ + _KEY_E = KEY_E, + + /** + * F key + */ + _KEY_F = KEY_F, + + /** + * G key + */ + _KEY_G = KEY_G, + + /** + * H key + */ + _KEY_H = KEY_H, + + /** + * I key + */ + _KEY_I = KEY_I, + + /** + * J key + */ + _KEY_J = KEY_J, + + /** + * K key + */ + _KEY_K = KEY_K, + + /** + * L key + */ + _KEY_L = KEY_L, + + /** + * M key + */ + _KEY_M = KEY_M, + + /** + * N key + */ + _KEY_N = KEY_N, + + /** + * O key + */ + _KEY_O = KEY_O, + + /** + * P key + */ + _KEY_P = KEY_P, + + /** + * Q key + */ + _KEY_Q = KEY_Q, + + /** + * R key + */ + _KEY_R = KEY_R, + + /** + * S key + */ + _KEY_S = KEY_S, + + /** + * T key + */ + _KEY_T = KEY_T, + + /** + * U key + */ + _KEY_U = KEY_U, + + /** + * V key + */ + _KEY_V = KEY_V, + + /** + * W key + */ + _KEY_W = KEY_W, + + /** + * Y key + */ + _KEY_Y = KEY_Y, + + /** + * X key + */ + _KEY_X = KEY_X, + + /** + * Z key + */ + _KEY_Z = KEY_Z, + + /** + * Backspace key + */ + _KEY_BACKSPACE = KEY_BACKSPACE, + + /** + * Comma key + */ + _KEY_COMMA = KEY_COMMA, + + /** + * Enter key + */ + _KEY_ENTER = KEY_ENTER, + + /** + * Caps Lock key + */ + _KEY_CAPSLOCK = KEY_CAPSLOCK, + + /** + * Question key + */ + _KEY_QUESTION = KEY_QUESTION, + + /** + * Alt key + */ + _KEY_ALT = KEY_ALT, + + /** + * Language Symbol key + */ + _KEY_SYM = KEY_SYM, + + /** + * Language Setting key + */ + _KEY_SETTING = KEY_SETTING, + + /** + * Space key + */ + _KEY_SPACE = KEY_SPACE, + + /** + * Dot key + */ + _KEY_DOT = KEY_DOT, + + /** + * Function key + */ + _KEY_FN = KEY_FN, + + /** + * Camera half shutter key + */ + _KEY_CAMERA_HALF_SHUTTER = KEY_CAMERA_HALF_SHUTTER, + + /** + * Character symbol 1 key + */ + _KEY_CHAR_SYM_1 = KEY_CHAR_SYM_1, + + /** + * Character symbol 2 key + */ + _KEY_CHAR_SYM_2 = KEY_CHAR_SYM_2, + + /** + * Character symbol 3 key + */ + _KEY_CHAR_SYM_3 = KEY_CHAR_SYM_3, + + /** + * Character symbol 4 key + */ + _KEY_CHAR_SYM_4 = KEY_CHAR_SYM_4, + + /** + * Character symbol 5 key + */ + _KEY_CHAR_SYM_5 = KEY_CHAR_SYM_5, + + /** + * Character symbol 6 key + */ + _KEY_CHAR_SYM_6 = KEY_CHAR_SYM_6, + + /** + * Character symbol 7 key + */ + _KEY_CHAR_SYM_7 = KEY_CHAR_SYM_7, + + /** + * Character symbol 8 key + */ + _KEY_CHAR_SYM_8 = KEY_CHAR_SYM_8, + + /** + * Character symbol 9 key + */ + _KEY_CHAR_SYM_9 = KEY_CHAR_SYM_9, + + /** + * Character symbol A key + */ + _KEY_CHAR_SYM_A = KEY_CHAR_SYM_A, + + /** + * Character symbol B key + */ + _KEY_CHAR_SYM_B = KEY_CHAR_SYM_B, + + /** + * Character symbol C key + */ + _KEY_CHAR_SYM_C = KEY_CHAR_SYM_C, + + /** + * Character symbol D key + */ + _KEY_CHAR_SYM_D = KEY_CHAR_SYM_D, + + /** + * Character symbol E key. + */ + _KEY_CHAR_SYM_E = KEY_CHAR_SYM_E, + + /** + * Character symbol F key. + */ + _KEY_CHAR_SYM_F = KEY_CHAR_SYM_F, + + /** + * Special function 1 key + */ + _KEY_FN_1 = KEY_FN_1, + + /** + * Special function 2 key + */ + _KEY_FN_2 = KEY_FN_2, + + /** + * Special function 3 key + */ + _KEY_FN_3 = KEY_FN_3, + + /** + * Special function 4 key + */ + _KEY_FN_4 = KEY_FN_4, + + /** + * Special function 5 key + */ + _KEY_FN_5 = KEY_FN_5, + + /** + * The power key + */ + _KEY_POWER_HOLD = KEY_POWER_HOLD, + + /** + * The delete key + */ + _KEY_DELETE = KEY_DELETE, + + /** + * The apostrophe key + */ + _KEY_APOSTROPHE = KEY_APOSTROPHE, + + /** + * The backslash key + */ + _KEY_BACKSLASH = KEY_BACKSLASH, + + /** + * The end key + */ + _KEY_END_BUTTON = KEY_MOVE_END, + + /** + * The equal key + */ + _KEY_EQUAL = KEY_EQUAL, + + /** + * The esc key + */ + _KEY_ESC = KEY_ESC, + + /** + * The function 10 key + */ + _KEY_FN_10 = KEY_FN_10, + + /** + * The function 11 key + */ + _KEY_FN_11 = KEY_FN_11, + + /** + * The function 12 key + */ + _KEY_FN_12 = KEY_FN_12, + + /** + * The function 6 key + */ + _KEY_FN_6 = KEY_FN_6, + + /** + * The function 7 key + */ + _KEY_FN_7 = KEY_FN_7, + + /** + * The function 8 key + */ + _KEY_FN_8 = KEY_FN_8, + + /** + * The function 9 key + */ + _KEY_FN_9 = KEY_FN_9, + + /** + * The grave key + */ + _KEY_GRAVE = KEY_GRAVE, + + /** + * The home key + */ + _KEY_HOME_BUTTON = KEY_MOVE_HOME, + + /** + * The insert key + */ + _KEY_INSERT = KEY_INSERT, + + /** + * The left alt key + */ + _KEY_LALT = KEY_LEFT_ALT, + + /** + * The left bracket key + */ + _KEY_LBRACKET = KEY_LEFT_BRACKET, + + /** + * The left control key + */ + _KEY_LCTRL = KEY_LEFT_CTRL, + + /** + * The left shift key + */ + _KEY_LSHIFT = KEY_LEFT_SHIFT, + + /** + * The left window key + */ + _KEY_LWIN = KEY_LEFT_WIN, + + /** + * The menu key + */ + _KEY_CONTEXT_MENU = KEY_CONTEXT_MENU, + + /** + * The minus key + */ + _KEY_MINUS = KEY_MINUS, + + /** + * The number lock key + */ + _KEY_NUM_LOCK = KEY_NUM_LOCK, + + /** + * The Keypad 0 key + */ + _KEY_NUMPAD_0 = KEY_NUMPAD_0, + + /** + * The Keypad 1 key + */ + _KEY_NUMPAD_1 = KEY_NUMPAD_1, + + /** + * The Keypad 2 key + */ + _KEY_NUMPAD_2 = KEY_NUMPAD_2, + + /** + * The Keypad 3 key + */ + _KEY_NUMPAD_3 = KEY_NUMPAD_3, + + /** + * The Keypad 4 key + */ + _KEY_NUMPAD_4 = KEY_NUMPAD_4, + + /** + * The Keypad 5 key + */ + _KEY_NUMPAD_5 = KEY_NUMPAD_5, + + /** + * The Keypad 6 key + */ + _KEY_NUMPAD_6 = KEY_NUMPAD_6, + + /** + * The Keypad 6 key + */ + _KEY_NUMPAD_7 = KEY_NUMPAD_7, + + /** + * The Keypad 8 key + */ + _KEY_NUMPAD_8 = KEY_NUMPAD_8, + + /** + * The Keypad 9 key + */ + _KEY_NUMPAD_9 = KEY_NUMPAD_9, + + /** + * The Keypad add key + */ + _KEY_NUMPAD_ADD = KEY_NUMPAD_ADD, + + /** + * The Keypad divide key + */ + _KEY_NUMPAD_DIVIDE = KEY_NUMPAD_DIVIDE, + + /** + * The Keypad divide key + */ + _KEY_NUMPAD_DOT = KEY_NUMPAD_DOT, + + /** + * The Keypad enter key + */ + _KEY_NUMPAD_ENTER = KEY_NUMPAD_ENTER, + + /** + * The Keypad multiply key + */ + _KEY_NUMPAD_MULTIPLY = KEY_NUMPAD_MULTIPLY, + + /** + * The Keypad subtract key + */ + _KEY_NUMPAD_SUBTRACT = KEY_NUMPAD_SUBTRACT, + + /** + * The page down key + */ + _KEY_PAGE_DOWN = KEY_PAGE_DOWN, + + /** + * The page up key + */ + _KEY_PAGE_UP = KEY_PAGE_UP, + + /** + * The pause key + */ + _KEY_PAUSEBREAK= KEY_PAUSE_BREAK, + + /** + * The print key + */ + _KEY_PRINT = KEY_PRINT, + + /** + * The right alt key + */ + _KEY_RALT = KEY_RIGHT_ALT, + + /** + * The right bracket key + */ + _KEY_RBRACKET = KEY_RIGHT_BRACKET, + + /** + * The right control key + */ + _KEY_RCTRL = KEY_RIGHT_CTRL, + + /** + * The right shift key + */ + _KEY_RSHIFT = KEY_RIGHT_SHIFT, + + /** + * The right window key + */ + _KEY_RWIN = KEY_RIGHT_WIN, + + /** + * The scroll lock key + */ + _KEY_SCROLL_LOCK = KEY_SCROLL_LOCK, + + /** + * The semicolon key + */ + _KEY_SEMICOLON = KEY_SEMICOLON, + + /** + * The slash key + */ + _KEY_SLASH = KEY_SLASH, + + /** + * tab key + */ + _KEY_TAB = KEY_TAB, + + /** + * The oem 1 key + */ + _KEY_OEM_1 = KEY_OEM_1, + + /** + * The oem 2 key + */ + _KEY_OEM_2 = KEY_OEM_2, + + /** + * The oem 3 key + */ + _KEY_OEM_3 = KEY_OEM_3, + + /** + * The oem 4 key + */ + _KEY_OEM_4 = KEY_OEM_4, + + /** + * The oem 5 key + */ + _KEY_OEM_5 = KEY_OEM_5, + + /** + * The oem 6 key + */ + _KEY_OEM_6 = KEY_OEM_6, + + /** + * The oem 7 key + */ + _KEY_OEM_7 = KEY_OEM_7, + + /** + * The oem 8 key + */ + _KEY_OEM_8 = KEY_OEM_8, + + /** + * The oem 9 key + */ + _KEY_OEM_9 = KEY_OEM_9, + + /** + * The oem 10 key + */ + _KEY_OEM_10 = KEY_OEM_10, + + /** + * The oem 11 key + */ + _KEY_OEM_11 = KEY_OEM_11, + + /** + * The oem 12 key + */ + _KEY_OEM_12 = KEY_OEM_12, + + /** + * The oem 13 key + */ + _KEY_OEM_13 = KEY_OEM_13, + + /** + * The oem 14 key + */ + _KEY_OEM_14 = KEY_OEM_14, + + /** + * The oem 15 key + */ + _KEY_OEM_15 = KEY_OEM_15, + + /** + * The oem 16 key + */ + _KEY_OEM_16 = KEY_OEM_16, + + /** + * The oem 17 key + */ + _KEY_OEM_17 = KEY_OEM_17, + + /** + * The oem 18 key + */ + _KEY_OEM_18 = KEY_OEM_18, + + /** + * The oem 19 key + */ + _KEY_OEM_19 = KEY_OEM_19, + + /** + * The oem 20 key + */ + _KEY_OEM_20 = KEY_OEM_20, + + /** + * The back key + */ + _KEY_BACK = KEY_BACK, + + /** + * The home key + */ + _KEY_HOME = KEY_HOME, + + /** + * The web page key + */ + _KEY_WEB_PAGE = KEY_WEB_PAGE, + + /** + * The mail key + */ + _KEY_MAIL = KEY_MAIL, + + /** + * The screen saver key + */ + _KEY_SCREEN_SAVER = KEY_SCREEN_SAVER, + + /** + * The brightness down key + */ + _KEY_BRIGHTNESS_DOWN = KEY_BRIGHTNESS_DOWN, + + /** + * The brightness up key + */ + _KEY_BRIGHTNESS_UP = KEY_BRIGHTNESS_UP, + + /** + * The mute key + */ + _KEY_MUTE = KEY_MUTE, + + /** + * The volume down key + */ + _KEY_VOLUME_DOWN = KEY_VOLUME_DOWN, + + /** + * The volume up key + */ + _KEY_VOLUME_UP = KEY_VOLUME_UP, + + /** + * The play pause key + */ + _KEY_PLAY_PAUSE = KEY_PLAY_PAUSE, + + /** + * The next song key + */ + _KEY_NEXT_SONG = KEY_NEXT_SONG, + + /** + * The previous song key + */ + _KEY_PREVIOUS_SONG = KEY_PREVIOUS_SONG, + + /** + * The apps key + */ + _KEY_APPS = KEY_APPS, + + /** + * The menu key + */ + _KEY_MENU = KEY_MENU, + + /** + * The soft keyboard key + */ + _KEY_SOFT_KEYBOARD = KEY_SOFT_KEYBOARD, + + /** + * The search key + */ + _KEY_SEARCH = KEY_SEARCH, + + /** + * The voice key + */ + _KEY_VOICE = KEY_VOICE, + + /** + * The quick panel key + */ + _KEY_QUICK_PANEL = KEY_QUICK_PANEL, + + /** + * The clipboard key + */ + _KEY_CLIPBOARD = KEY_CLIPBOARD, + + _KEY_CTRL_L, + + _KEY_CTRL_R, + + _KEY_SHIFT_L, + + _KEY_SHIFT_R, + + _KEY_NUM_LEFT, + + _KEY_NUM_RIGHT, + + _KEY_NUM_UP, + + _KEY_NUM_DOWN, + + /** + * internal Key - end + */ + _KEY_END, + + /** + * internal Key - send + */ + _KEY_SEND, + + _KEY_HARDWARE_MAX = KEY_HARDWARE_MAX +}; + +enum _KeyModifier +{ + _KEY_MODIFIER_NONE = 0, /**< No active modifiers */ + _KEY_MODIFIER_SHIFT = 1 << 0, /**< "Control" is pressed */ + _KEY_MODIFIER_CTRL = 1 << 1, /**< "Alt" is pressed */ + _KEY_MODIFIER_ALT = 1 << 2, /**< "Shift" is pressed */ + _KEY_MODIFIER_WIN = 1 << 3, /**< "Win" (between "Ctrl" and "Alt") is pressed */ + _KEY_MODIFIER_SCROLL = 1 << 4, /**< "AltGr" is pressed */ + _KEY_MODIFIER_NUM = 1 << 5, + _KEY_MODIFIER_CAPS = 1 << 6, + _KEY_LOCK_SCROLL = 1 << 7, + _KEY_LOCK_NUM = 1 << 8, + _KEY_LOCK_CAPS = 1 << 9, + _KEY_LOCK_SHIFT = 1 << 10, + _KEY_MODIFIER_ALTGR = 1 << 11, + _KEY_MODIFIER_LAST +}; + +class _OSP_EXPORT_ _KeyInfo +{ +public: + _KeyInfo(KeyState keyState, _KeyCode keyCode, int keyModifier, void* pUserData); + ~_KeyInfo(void); + _KeyInfo(const _KeyInfo& rhs); + _KeyInfo& operator =(const _KeyInfo& rhs); + +public: + void SetKeyState(KeyState keyState); + KeyState GetKeyState(void) const; + + void SetKeyCode(_KeyCode keyCode); + _KeyCode GetKeyCode(void) const; + + void SetKeyModifier(int keyModifier); + int GetKeyModifier(void) const; + + void SetUserData(void* pUserData); + void* GetUserData(void) const; + +private: + KeyState __keyState; + _KeyCode __keyCode; + int __keyModifier; + void* __pUserData; +}; + +class _IKeyEventListener; + +/** +* This is internal. If used in an application, the application can get rejected during the certification process. +* @class _UiKeyEvent +* @brief This class impliments _UiKeyEvent and +* fire the Window Event object of a Ui Control. +*/ +class _UiKeyEvent + : public _UiEvent +{ +// Lifecycle +public: + /** + * This is the default class constructor. + * + */ + _UiKeyEvent(const _UiObjectHandle& destination, const _KeyInfo& keyInfo, _UiEventRouteType routeType = _UI_EVENT_ROUTE_TUNNEL_BUBBLE, const _UiObjectHandle& source = _UiObjectHandle()); + _UiKeyEvent(const _UiKeyEvent& rhs); + + /** + * This is the default class destructor. + * + */ + virtual ~_UiKeyEvent(void); + +public: + _UiKeyEvent& operator =(const _UiKeyEvent& rhs); + +public: + _KeyInfo* GetKeyInfo(void) const; + +private: + void SetKeyState(KeyState keyState); + KeyState GetKeyState(void) const; + + void SetKeyCode(_KeyCode keyCode); + _KeyCode GetKeyCode(void) const; + + void SetKeyModifier(int keyModifier); + int GetKeyModifier(void) const; + +private: + virtual _UiKeyEvent* 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); + +private: + result FireListener(const _IKeyEventListener* pListener, bool& isFiltered); + +private: + _KeyInfo __keyInfo; +}; + +}} // Tizen::Ui + +#endif //_FUI_INTERNAL_UI_KEY_EVENT_H_ diff --git a/src/ui/inc/FUi_UiManagerIpcMessages.h b/src/ui/inc/FUi_UiManagerIpcMessages.h new file mode 100644 index 0000000..4482cd3 --- /dev/null +++ b/src/ui/inc/FUi_UiManagerIpcMessages.h @@ -0,0 +1,29 @@ +// +// 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_UiManagerIpcMessages.h + * @brief This is the header file for the UiManager Ipc message types. + */ + +#include "ipc/ipc_message_macros.h" +#include "FIo_IpcCommonParamTraits.h" +#include "FIo_IpcMessageStart.h" + +#define IPC_MESSAGE_START UiManagerServiceStart + +IPC_SYNC_MESSAGE_CONTROL2_1(UiManager_SetZOrderGroup, unsigned int, int, result) diff --git a/src/ui/inc/FUi_UiNotificationEvent.h b/src/ui/inc/FUi_UiNotificationEvent.h new file mode 100644 index 0000000..63b1454 --- /dev/null +++ b/src/ui/inc/FUi_UiNotificationEvent.h @@ -0,0 +1,86 @@ +// +// 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_UiNotificationEvent.h + * @brief This is the header file for the _UiNotificationEvent class. + * + * This header file contains the declarations of the %_UiNotificationEvent class. + */ + +#ifndef _FUI_INTERNAL_UI_NOTIFICATION_EVENT_H_ +#define _FUI_INTERNAL_UI_NOTIFICATION_EVENT_H_ + +#include "FUi_UiEvent.h" + +namespace Tizen { namespace Base { namespace Collection +{ +class IList; +}}} // Tizen::Base::Collection + +namespace Tizen {namespace Ui +{ + +class _INotificationEventListener; + +/** +* This is internal. If used in an application, the application can get rejected during the certification process. +* @class _UiNotificationEvent +* @brief This class impliments _UiNotificationEvent and +* fire the Window Event object of a Ui Control. +*/ +class _OSP_EXPORT_ _UiNotificationEvent + : public _UiEvent +{ +// Lifecycle +public: + /** + * This is the default class constructor. + * + */ + _UiNotificationEvent(const _UiObjectHandle& destination, Tizen::Base::Collection::IList* pArgs, _UiEventRouteType routeType = _UI_EVENT_ROUTE_TUNNEL_BUBBLE, const _UiObjectHandle& source = _UiObjectHandle()); + _UiNotificationEvent(const _UiNotificationEvent& rhs); + + /** + * This is the default class destructor. + * + */ + virtual ~_UiNotificationEvent(void); + +public: + _UiNotificationEvent& operator =(const _UiNotificationEvent& rhs); + +public: + Tizen::Base::Collection::IList* GetArgs(void) const; + +private: + virtual _UiNotificationEvent* 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); + +private: + result FireListener(const _INotificationEventListener* pListener, bool& isFiltered); + +private: + Tizen::Base::Collection::IList* __pArgs; +}; + +}} // Tizen::Ui + +#endif //_FUI_INTERNAL_UI_NOTIFICATION_EVENT_H_ diff --git a/src/ui/inc/FUi_UiTouchEvent.h b/src/ui/inc/FUi_UiTouchEvent.h new file mode 100644 index 0000000..fb53d13 --- /dev/null +++ b/src/ui/inc/FUi_UiTouchEvent.h @@ -0,0 +1,174 @@ +// +// 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_UiTouchEvent.h + * @brief This is the header file for the _UiTouchEvent class. + * + * This header file contains the declarations of the %_UiTouchEvent class. + */ + +#ifndef _FUI_INTERNAL_UI_TOUCH_EVENT_H_ +#define _FUI_INTERNAL_UI_TOUCH_EVENT_H_ + +#include +#include +#include "FUi_UiEvent.h" +#include "FUi_ITouchGestureEventListener.h" +#include "FUi_ITouchEventPreviewer.h" + +namespace Tizen {namespace Ui +{ + +enum _TouchStatus +{ + _TOUCH_PRESSED = TOUCH_PRESSED, /**< Touch pressed event type */ + _TOUCH_LONG_PRESSED = TOUCH_LONG_PRESSED, /**< Touch long pressed event type */ + _TOUCH_RELEASED = TOUCH_RELEASED, /**< Touch released event type */ + _TOUCH_MOVED = TOUCH_MOVED, /**< Touch moved event type */ + _TOUCH_DOUBLE_PRESSED = TOUCH_DOUBLE_PRESSED, /**< Touch double pressed event type */ + _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 */ + _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 +{ + _MOUSE_BUTTON_NONE = 0, + _MOUSE_BUTTON_LEFT, + _MOUSE_BUTTON_WHEEL, + _MOUSE_BUTTON_RIGHT +}; + +class _OSP_EXPORT_ _TouchInfo +{ +public: + _TouchInfo(void); + _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); + +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; + + bool IsFlicked(void) const; + long long GetTimeStamp(void) const; + int GetZAxis(void) const; + 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; + bool __isFlicked; + long long __timeStamp; + int __zAxis; + unsigned int __buttons; +}; // _TouchInfo + +class _ITouchEventListener; +class _Control; + +/** +* This is internal. If used in an application, the application can get rejected during the certification process. +* @class _UiTouchEvent +* @brief This class impliments _UiTouchEvent and +* fire the Window Event object of a Ui Control. +*/ +class _OSP_EXPORT_ _UiTouchEvent + : public _UiEvent +{ +// Lifecycle +public: + /** + * This is the default class constructor. + * + */ + _UiTouchEvent(const _UiObjectHandle& destination, const _TouchInfo& touchInfo, _UiEventRouteType routeType = _UI_EVENT_ROUTE_TUNNEL_BUBBLE, const _UiObjectHandle& source = _UiObjectHandle()); + _UiTouchEvent(const _UiTouchEvent& rhs); + + /** + * This is the default class destructor. + * + */ + virtual ~_UiTouchEvent(void); + +public: + _UiTouchEvent& operator =(const _UiTouchEvent& rhs); + +public: + const _TouchInfo* GetTouchInfo(void) const; + +private: + virtual _UiTouchEvent* 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 _TouchInfo& touchInfo); + bool ExistGlobalGesture(void); + +private: + _TouchInfo __touchInfo; + std::tr1::shared_ptr > __pForcedControlList; +}; // _UiTouchEvent + +}} // Tizen::Ui + +#endif //_FUI_INTERNAL_UI_TOUCH_EVENT_H_ diff --git a/src/ui/inc/FUi_VariantImpl.h b/src/ui/inc/FUi_VariantImpl.h new file mode 100644 index 0000000..e9615af --- /dev/null +++ b/src/ui/inc/FUi_VariantImpl.h @@ -0,0 +1,121 @@ +// +// 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_VariantImpl.h + * @brief This is the header file for the _VariantImpl class. + * + * This header file contains declarations of the _VariantImpl class. @n + */ +#ifndef _FUI_VARIANT_IMPL_H_ +#define _FUI_VARIANT_IMPL_H_ + +#include + +namespace Tizen { namespace Ui +{ + +typedef union +{ + int valueInt; + unsigned int valueUInt; + bool valueBool; + float valueFloat; + double valueDouble; + long valueLong; + unsigned long valueULong; + long long valueLongLong; + unsigned long long valueULongLong; + Tizen::Base::String* pString; + Tizen::Base::DateTime* pDateTime; + Tizen::Graphics::Color* pColor; + Tizen::Graphics::Point* pPoint; + Tizen::Graphics::FloatPoint* pFloatPoint; + Tizen::Graphics::Rectangle* pRect; + Tizen::Graphics::FloatRectangle* pRectf; + Tizen::Graphics::Dimension* pDimension; + Tizen::Graphics::FloatDimension* pFloatDimension; + Tizen::Graphics::FloatMatrix4* pFloatMatrix4; + Tizen::Graphics::FloatPoint3* pFloatPoint3; + Tizen::Graphics::FloatVector4* pFloatVector4; +} VariantData; + +class _VariantImpl + : public Tizen::Base::Object +{ +public: + _VariantImpl(void); + +private: + virtual ~_VariantImpl(void); + + void AddRef(void); + void Release(void); + + /* + * Deallocates an internal buffer. + * + * @since 2.0 + */ + void Clear(void); + + /* + * Copy an internal buffer. + * + * @since 2.0 + * @param[in] value Variant value + */ + void Copy(const Variant& rhs); + + /* + * Deallocates an internal buffer. + * + * @since 2.0 + * @param[in] type VariantType + */ + void SetVariantType(VariantType type); + + /* + * Check if the type is same + * + * @since 2.0 + * @param[in] type VariantType + */ + bool IsSameType(VariantType type) const; + + /* + * This is the copy constructor for this class. + * @since 2.0 + */ + _VariantImpl(const _VariantImpl&); + + /** + * This is the assignment operator for this class. + * + * @since 2.0 + */ + _VariantImpl& operator =(const _VariantImpl&); + +public: + int __refCount; + VariantData __data; + VariantType __type; + friend class Variant; +}; // _VariantImpl + +} } // Tizen::Ui + +#endif //_FUI_VARIANT_IMPL_H_ diff --git a/src/ui/inc/FUi_Window.h b/src/ui/inc/FUi_Window.h new file mode 100644 index 0000000..db01d0b --- /dev/null +++ b/src/ui/inc/FUi_Window.h @@ -0,0 +1,191 @@ +// +// 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_Window.h + * @brief This is the header file for the _Window class. + * + * This header file contains the declarations of the %_Window class. + */ + +#ifndef _FUI_INTERNAL_WINDOW_H_ +#define _FUI_INTERNAL_WINDOW_H_ + +#include +#include +#include "FUi_Control.h" +#include "FUi_DimmingLayer.h" + +namespace Tizen { namespace Ui { namespace Animations { +class DisplayContext; +class _RootVisualElement; +class _NativeLayer; +}}} // Tizen::Ui::Animations + +namespace Tizen { namespace Ui +{ + +enum _WindowType +{ + _WINDOW_TYPE_MAIN, + _WINDOW_TYPE_SUB, + _WINDOW_TYPE_VE, +}; + +class _IWindowDelegate +{ +public: + virtual ~_IWindowDelegate(void){} + + virtual void OnActivated(void) = 0; + virtual void OnNativeWindowActivated(void) = 0; + virtual void OnDeactivated(void) = 0; + virtual void OnOwnerChanged(_Control* pOldOwner) = 0; +}; // _IWindowDelegate + +class _OSP_EXPORT_ _Window // Temp: export only for test + : public _Control + , public _IWindowDelegate + , virtual public Tizen::Base::Runtime::IEventListener + , virtual public _IUiEventListener + , virtual public _IUiEventPreviewer +{ +public: + static _Window* CreateWindowN(void); + virtual ~_Window(void); + void SetWindowDelegate(_IWindowDelegate& delegate); + void ResetWindowDelegate(void); + virtual bool IsActivatedOnOpen(void) const; + bool IsAttached(void) const; + bool IsActivated(void) const; + WindowState GetWindowState(void) const; + void SetWindowState(WindowState windowState); + result Open(bool drawAndShow = true); + void Close(void); + _Control* GetOwner(void) const; + void SetOwner(_Control* pOwner); + result CreateRootVisualElement(_WindowType windowType = _WINDOW_TYPE_MAIN); + virtual result CreateLayer(void); + virtual bool IsLayoutChangable(void) const; + void SetRotation(int rotation); + _WindowType GetWindowType(void); + +// Focus + virtual _Control* GetFocusControl(const _Control* pControl) const; + virtual _Control* GetCurrentFocusControl(void) const; + virtual void SetFocusControl(const _Control* pControl, bool on); +// Callbacks + virtual void OnActivated(void); + virtual void OnNativeWindowActivated(void); + virtual void OnDeactivated(void); + virtual void OnOwnerChanged(_Control* pOldOwner); + virtual void OnVisibleStateChanged(void); + virtual bool OnNotifiedN(const Tizen::Ui::_Control& source, Tizen::Base::Collection::IList* pArgs); + virtual result OnBoundsChanging(const Tizen::Graphics::FloatRectangle& bounds); + virtual result OnAttachingToMainTree(const _Control* pParent); + virtual result OnDetachingFromMainTree(void); + virtual void OnFocusableStateChanged(bool focusalbeState); + virtual void OnWindowStateChanged(void); + virtual void OnTouchCaptureGained(void); + virtual void OnTouchCaptureLost(void); + void SetPreferredRotation(bool enable); + bool GetPreferredRotation(void) const; + virtual bool IsRotationSynchronized(void) const; + + void SetActivationEnabled(bool enable); + bool IsActivationEnabled(void); + void SetNativeWindowActivated(bool activated); + bool GetNativeWindowActivated(void); + + Tizen::Ui::Animations::_RootVisualElement* GetRootVisualElement(void) const; + NativeWindowHandle GetNativeHandle(void) const; + + // Internal: Only necessary for implementing _Window. Never override this callback except for _Window. + virtual void OnChangeLayout(_ControlOrientation orientation); + + Tizen::Ui::Animations::DisplayContext* GetDisplayContext(void) const; + + result SetZOrderGroup(int windowZOrderGroup); + bool IsSystemWindow(void) const; + + // Focus UI + virtual Tizen::Base::Collection::IListT<_Control*>* GetFocusList(void) const; + virtual void ResetFocusList(void); + virtual _Control* GetFocusTraversalControl(_Control* pControl) const; + virtual void SetFocusTraversalControl(_Control* pControl, bool on); + + // Dimming + result SetDimmingEnabled(bool enabled); + bool IsDimmingEnabled(void) const; + + void SetDimmingLayer(_DimmingLayer* pLayer); + _DimmingLayer* GetDimmingLayer(void); + + void SetOrientationCallbackModeEnabled(bool enable); + bool IsOrientationCallbackModeEnabled(void) const; + +protected: + _Window(void); + _IWindowDelegate& GetWindowDelegate(void) const; + virtual Tizen::Base::String GetDescription(void) const; + + void SetRootVisualElement(const Tizen::Ui::Animations::_RootVisualElement& rootVisualElement); + void SetLayer(const Tizen::Ui::Animations::_NativeLayer& layer); + + void SetSystemWindow(bool systemWindow); + +private: + _Window(const _Window& rhs); + _Window& operator =(const _Window& rhs); + + void Activate(void); + void Deactivate(void); + +private: + _WindowType __type; + WindowState __windowState; + _Control* __pOwner; + _IWindowDelegate* __pWindowDelegate; + bool __activated; + + Tizen::Ui::Animations::_RootVisualElement* __pRootVisualElement; + Tizen::Ui::Animations::_NativeLayer* __pLayer; + Tizen::Ui::_DimmingLayer* __pDimmingLayer; + + mutable Tizen::Ui::Animations::DisplayContext* __pDisplayContext; + bool __systemWindow; + bool __isOpened; + bool __isInitialized; + _Control* __pFocusControl; + _Control* __pFocusTraversalControl; + bool __transient; + bool __dimmingEnabled; + + //For Focus UI + mutable std::unique_ptr > __pFocusControlList; + + int __rotation; + bool __preferredRotation; + bool __orientationCallbackMode; + bool __nativeWindowActivated; + + friend class _ControlManager; +}; // _Window + +}} // Tizen::Ui + +#endif // _FUI_INTERNAL_WINDOW_H_ diff --git a/src/ui/inc/FUi_WindowImpl.h b/src/ui/inc/FUi_WindowImpl.h new file mode 100644 index 0000000..39e780e --- /dev/null +++ b/src/ui/inc/FUi_WindowImpl.h @@ -0,0 +1,103 @@ +// +// 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_WindowImpl.h + * @brief This is the header file for the _WindowImpl class. + * + * This header file contains the declarations of the %_WindowImpl class. + */ + +#ifndef _FUI_INTERNAL_WINDOW_IMPL_H_ +#define _FUI_INTERNAL_WINDOW_IMPL_H_ + +#include +#include "FUi_ContainerImpl.h" +#include "FUi_Window.h" + +namespace Tizen { namespace Ui { namespace Animations { +class DisplayContext; +}}} // Tizen::Ui::Animations + +namespace Tizen { namespace Ui +{ + +class _OSP_EXPORT_ _WindowImpl + : public _ContainerImpl +{ +public: +// Constants + static WindowState GetErrorWindowState(void); + +public: +// Life Cycle + virtual result Destroy(void); + void Initialize(Window* pPublic, _Window* pCore, const Layout* pPublicPortraitLayout, const Layout* pPublicLandscapeLayout); + static _WindowImpl* CreateWindowImplN(Window* pPublic, const Tizen::Graphics::Rectangle& bounds, const Layout* pPublicPortraitLayout, const Layout* pPublicLandscapeLayout, bool resizable, bool movable); + static _WindowImpl* CreateWindowImplN(Window* pPublic, const Tizen::Graphics::FloatRectangle& bounds, const Layout* pPublicPortraitLayout, const Layout* pPublicLandscapeLayout, bool resizable, bool movable); + virtual ~_WindowImpl(void); + + static _WindowImpl* GetInstance(Window& window); + static const _WindowImpl* GetInstance(const Window& window); + virtual const char* GetPublicClassName(void) const; + virtual const Window& GetPublic(void) const; + virtual Window& GetPublic(void); + virtual const _Window& GetCore(void) const; + virtual _Window& GetCore(void); + +// Public Event Listeners + void AddWindowEventListener(Tizen::Ui::IWindowEventListener& listener); + void RemoveWindowEventListener(Tizen::Ui::IWindowEventListener& listener); + + virtual void OnActivated(void); + virtual void OnNativeWindowActivated(void); + virtual void OnDeactivated(void); + virtual void OnOwnerChanged(_Control* pOldOwner); + virtual result OnBoundsChanging(const Tizen::Graphics::Rectangle& bounds); + virtual void OnRotated(_ControlRotation rotation); + +// Operations + result Open(bool drawAndShow = true); + void Close(void); + WindowState GetWindowState(void) const; + void SetWindowState(WindowState windowState); // [ToDo] Failed if the window is opened. + Tizen::Ui::Animations::DisplayContext* GetDisplayContext(void) const; + + result SetZOrderGroup(WindowZOrderGroup windowZOrderGroup); + Control* GetOwner(void) const; + void SetOwner(Tizen::Ui::Control *pControl); + + NativeWindowHandle GetNativeHandle(void) const; + +protected: + _WindowImpl(Window* pPublic, _Window* pCore, const Layout* pPublicPortraitLayout = null, const Layout* pPublicLandscapeLayout = null); + _WindowImpl(Window* pPublic, _Window* pCore, const Tizen::Graphics::Rectangle& bounds, const Layout* pPublicPortraitLayout, const Layout* pPublicLandscapeLayout, bool resizable, bool movable); + _WindowImpl(Window* pPublic, _Window* pCore, const Tizen::Graphics::FloatRectangle& bounds, const Layout* pPublicPortraitLayout, const Layout* pPublicLandscapeLayout, bool resizable, bool movable); +private: + _WindowImpl(const _WindowImpl& rhs); + _WindowImpl& operator =(const _WindowImpl& rhs); + +private: + PublicEventListenerList* __pPublicWindowEventListeners; + class WindowImplDelegate; + WindowImplDelegate* __pImplDelegate; + +}; // _WindowImpl + +}} // Tizen::Ui + +#endif // _FUI_INTERNAL_WINDOW_IMPL_H_ diff --git a/src/ui/layout/FUi_LayoutAbsoluteLayout.cpp b/src/ui/layout/FUi_LayoutAbsoluteLayout.cpp new file mode 100644 index 0000000..d3a5149 --- /dev/null +++ b/src/ui/layout/FUi_LayoutAbsoluteLayout.cpp @@ -0,0 +1,143 @@ +// +// 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_LayoutAbsoluteLayout.cpp + * @brief This is the implementation file for AbsoluteLayout class. + * + * This file contains the implementation of AbsoluteLayout class. + */ + +#include +#include "FUi_LayoutAbsoluteLayout.h" +#include "FUi_LayoutLayoutItemProxy.h" +#include "FUi_LayoutProxyList.h" +#include "FUi_LayoutLayoutItemInfo.h" + +namespace Tizen { namespace Ui { namespace _Layout +{ + +AbsoluteLayout::AbsoluteLayout(void) + : __defaultMatchParent(false) +{ + AbsoluteProxyList* pAbsoluteProxyList = new (std::nothrow) AbsoluteProxyList(); + SysTryReturnVoidResult(NID_UI, pAbsoluteProxyList, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage"); + SetItemList(pAbsoluteProxyList); +} + +AbsoluteLayout::~AbsoluteLayout(void) +{ +} + +AbsoluteLayout* +AbsoluteLayout::CreateAbsoluteLayoutN(bool defaultMatchParent) +{ + AbsoluteLayout* pLayout = new (std::nothrow) AbsoluteLayout(); + SysTryReturn(NID_UI, pLayout != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Absolute layout core allocation failure."); + if (GetLastResult() != E_SUCCESS) + { + delete pLayout; + return null; + } + + pLayout->__defaultMatchParent = defaultMatchParent; + + return pLayout; +} + +result +AbsoluteLayout::AddItem(LayoutItem& addItem) +{ + result r = E_SUCCESS; + + r = Layout::AddItem(addItem); + if (r != E_SUCCESS) + { + return r; + } + + if (__defaultMatchParent) + { + r = Layout::SetItemWidthMatchMode(addItem, MATCH_PARENT); + if (r != E_SUCCESS) + { + return r; + } + + r = Layout::SetItemHeightMatchMode(addItem, MATCH_PARENT); + if (r != E_SUCCESS) + { + return r; + } + } + + return r; +} + +result +AbsoluteLayout::OnLayout(float width, float height, bool layoutUpdating) +{ + ProxyList* pProxyList = GetProxyList(); + SysAssertf(pProxyList != null, "ProxyList is invalid"); + + if (pProxyList == null) + { + return E_INVALID_STATE; + } + + LayoutItemProxy* pContainerProxy = GetContainerProxy(); + if (pContainerProxy == null) + { + return E_INVALID_STATE; + } + + LayoutRect intendedRect = {0.0f, 0.0f, width, height}; + pContainerProxy->ConvertWindowToClientBounds(intendedRect, intendedRect); + + LayoutRect layoutRect = GetLayoutRect(); + layoutRect.w = intendedRect.w; + layoutRect.h = intendedRect.h; + SetLayoutRect(layoutRect); + + ProxyListNode* pNode = pProxyList->GetFirstNode(); + while (pNode != null) + { + LayoutItemProxy* pItemProxy = pNode->GetItemProxy(); + if (pItemProxy == null) + { + return E_INVALID_STATE; + } + LayoutRect itemRect = pItemProxy->GetItemBaseRect(); + if (pItemProxy->Measure(itemRect.w, itemRect.h) != E_SUCCESS) + { + return E_INVALID_STATE; + } + pItemProxy->GetMeasuredSize(itemRect.w, itemRect.h); + LayoutRect layoutRect = GetLayoutRect(); + itemRect.x += layoutRect.x; + itemRect.y += layoutRect.y; + if (pItemProxy->SetItemWindowRect(itemRect) != E_SUCCESS) + { + return E_INVALID_STATE; + } + + pNode = pProxyList->GetNextNode(*pNode); + } + + return E_SUCCESS; +} + +}}} // Tizen::Ui::_Layout \ No newline at end of file diff --git a/src/ui/layout/FUi_LayoutLayout.cpp b/src/ui/layout/FUi_LayoutLayout.cpp new file mode 100644 index 0000000..8d69543 --- /dev/null +++ b/src/ui/layout/FUi_LayoutLayout.cpp @@ -0,0 +1,942 @@ +// +// 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_LayoutLayout.cpp + * @brief This is the implementation file for Layout class. + * + * This file contains the implementation of Layout class. + */ + +#include +#include +#include +#include +#include +#include "FUi_LayoutLayout.h" +#include "FUi_LayoutLayoutItemProxy.h" +#include "FUi_LayoutProxyList.h" +#include "FUi_LayoutLayoutItemInfo.h" +#include "FUi_LayoutLayoutList.h" + +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace _Layout +{ + +Layout::Layout(void) + : __pProxyList(null) + , __x(0.0f) + , __y(0.0f) + , __width(0.0f) + , __height(0.0f) + , __pContainerProxy(null) + , __rootLayout(false) + , __updateState(true) + , __partialUpdateState(false) + , __determineState(false) +{ +} + +Layout::~Layout(void) +{ + LayoutItemProxy* pContainerProxy = GetContainerProxy(); + if (pContainerProxy != null) + { + LayoutContainer* pContainer = static_cast (pContainerProxy->GetItem()); + if (pContainer) + { + pContainer->OnDestroyLayout(*this); + } + } + + if (__rootLayout) + { + delete __pContainerProxy; + } + + delete __pProxyList; +} + +LayoutItemProxy* +Layout::GetContainerProxy(void) +{ + if (__pContainerProxy == null) + { + return null; + } + + if (__rootLayout == false) + { + LayoutContainer* pContainer = static_cast (__pContainerProxy->GetItem()); + if (pContainer == null) + { + SysLog(NID_UI, "Container is null."); + return null; + } + + LayoutContainer* pParentContainer = pContainer->GetParentContainer(); + if (pParentContainer == null) + { + SysLog(NID_UI, "Parent of container is null."); + return null; + } + + Layout* pParentLayout = __pContainerProxy->GetParentLayout(); + if (pParentLayout == null) + { + SysLog(NID_UI, "Parent layout of container is null."); + return null; + } + + if (pParentLayout != pParentContainer->__pCurrentLayout) + { + ProxyListNode* pNode = pParentContainer->__pCurrentLayout->__pProxyList->GetFirstNode(); + while (pNode != null) + { + LayoutItemProxy* pItemProxy = pNode->GetItemProxy(); + LayoutContainer* pResultContainer = static_cast (pItemProxy->GetItem()); + if (pContainer == pResultContainer) + { + __pContainerProxy = pItemProxy; + break; + } + pNode = __pProxyList->GetNextNode(*pNode); + } + } + } + + return __pContainerProxy; +} + +void +Layout::SetLayoutRect(const LayoutRect layoutRect) +{ + __x = layoutRect.x; + __y = layoutRect.y; + __width = layoutRect.w; + __height = layoutRect.h; +} + +LayoutRect +Layout::GetLayoutRect(void) const +{ + LayoutRect layoutRect = {__x, __y, __width, __height}; + + return layoutRect; +} + +result +Layout::SetItemAlignment(const LayoutItem& item, const ItemAlign align) +{ + ClearLastResult(); + + if (align.HAlign < ITEM_HORIZONTAL_ALIGN_LEFT || align.HAlign > ITEM_HORIZONTAL_ALIGN_LEFT_RIGHT || + align.VAlign < ITEM_VERTICAL_ALIGN_TOP || align.VAlign > ITEM_VERTICAL_ALIGN_TOP_BOTTOM) + { + SysTryReturn(NID_UI, false, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The alignment parameter is invalid parameter."); + } + + LayoutItemProxy* pItemProxy = __pProxyList->GetItemProxy(item); + SysTryReturn(NID_UI, pItemProxy != null, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Control dose not belong to layout."); + + pItemProxy->SetItemAlignment(align); + + SetUpdateState(true); + return E_SUCCESS; +} + +result +Layout::GetItemAlignment(const LayoutItem& item, ItemAlign& align) const +{ + ClearLastResult(); + + LayoutItemProxy* pItemProxy = __pProxyList->GetItemProxy(item); + SysTryReturn(NID_UI, pItemProxy != null, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Control dose not belong to layout."); + + align = pItemProxy->GetItemAlignment(); + + return E_SUCCESS; +} + +result +Layout::SetItemMargin(const LayoutItem& item, const ItemMargin margin) +{ + ClearLastResult(); + + LayoutItemProxy* pItemProxy = __pProxyList->GetItemProxy(item); + SysTryReturn(NID_UI, pItemProxy != null, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Control dose not belong to layout."); + + pItemProxy->SetItemMargin(margin); + + SetUpdateState(true); + return E_SUCCESS; +} + +result +Layout::GetItemMargin(const LayoutItem& item, ItemMargin& margin) const +{ + ClearLastResult(); + + LayoutItemProxy* pItemProxy = __pProxyList->GetItemProxy(item); + SysTryReturn(NID_UI, pItemProxy != null, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Control dose not belong to layout."); + + margin = pItemProxy->GetItemMargin(); + + return E_SUCCESS; +} + +result +Layout::SetItemWidthMatchMode(const LayoutItem& item, const LayoutMatchMode matchMode) +{ + ClearLastResult(); + + LayoutItemProxy* pItemProxy = __pProxyList->GetItemProxy(item); + SysTryReturn(NID_UI, pItemProxy != null, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Control dose not belong to layout."); + + pItemProxy->SetItemWidthMatchMode(matchMode); + + SetUpdateState(true); + return E_SUCCESS; +} + +result +Layout::GetItemWidthMatchMode(const LayoutItem& item, LayoutMatchMode& matchMode) const +{ + ClearLastResult(); + + LayoutItemProxy* pItemProxy = __pProxyList->GetItemProxy(item); + SysTryReturn(NID_UI, pItemProxy != null, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Control dose not belong to layout."); + + matchMode = pItemProxy->GetItemWidthMatchMode(); + + return E_SUCCESS; +} + +result +Layout::SetItemHeightMatchMode(const LayoutItem& item, const LayoutMatchMode matchMode) +{ + ClearLastResult(); + + LayoutItemProxy* pItemProxy = __pProxyList->GetItemProxy(item); + SysTryReturn(NID_UI, pItemProxy != null, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Control dose not belong to layout."); + + pItemProxy->SetItemHeightMatchMode(matchMode); + + SetUpdateState(true); + return E_SUCCESS; +} + +result +Layout::GetItemHeightMatchMode(const LayoutItem& item, LayoutMatchMode& matchMode) const +{ + ClearLastResult(); + + LayoutItemProxy* pItemProxy = __pProxyList->GetItemProxy(item); + SysTryReturn(NID_UI, pItemProxy != null, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Control dose not belong to layout."); + + matchMode = pItemProxy->GetItemHeightMatchMode(); + + return E_SUCCESS; +} + +result +Layout::SetItemBaseRect(const LayoutItem& item, const LayoutRect baseRect) +{ + ClearLastResult(); + + LayoutItemProxy* pItemProxy = __pProxyList->GetItemProxy(item); + SysTryReturn(NID_UI, pItemProxy != null, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Control dose not belong to layout."); + + pItemProxy->SetItemBaseRect(baseRect); + + SetUpdateState(true); + return E_SUCCESS; +} + +result +Layout::GetItemBaseRect(const LayoutItem& item, LayoutRect& baseRect) const +{ + ClearLastResult(); + + LayoutItemProxy* pItemProxy = __pProxyList->GetItemProxy(item); + SysTryReturn(NID_UI, pItemProxy != null, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Control dose not belong to layout."); + + baseRect = pItemProxy->GetItemBaseRect(); + + return E_SUCCESS; +} + +bool +Layout::ItemExists(LayoutItem& item) +{ + if (__pProxyList->GetItemProxy(item) != null) + { + return true; + } + return false; +} + +LayoutUpdateFlag +Layout::CheckParentFlag(void) +{ + ClearLastResult(); + + if (__rootLayout) + { + return UPDATEFLAG_NO_FLAG; + } + + LayoutItemProxy* pContainerProxy = GetContainerProxy(); + SysTryReturn(NID_UI, pContainerProxy != null, UPDATEFLAG_ERROR, E_INVALID_STATE, "[E_INVALID_STATE] Did not set the container."); + + Layout* pParentLayout = pContainerProxy->GetParentLayout(); + SysTryReturn(NID_UI, pParentLayout != null, UPDATEFLAG_ERROR, E_INVALID_STATE, "[E_INVALID_STATE] Layout does not exist."); + + LayoutItemProxy* pParentContainerProxy = pParentLayout->GetContainerProxy(); + SysTryReturn(NID_UI, pContainerProxy != null, UPDATEFLAG_ERROR, E_INVALID_STATE, "[E_INVALID_STATE] Did not set the parent container."); + + return CheckFlagInternal(*pParentContainerProxy); +} + +LayoutUpdateFlag +Layout::CheckCurrentFlag(void) +{ + ClearLastResult(); + + if (__rootLayout) + { + return UPDATEFLAG_NO_FLAG; + } + + LayoutItemProxy* pContainerProxy = GetContainerProxy(); + SysTryReturn(NID_UI, pContainerProxy != null, UPDATEFLAG_ERROR, E_INVALID_STATE, "[E_INVALID_STATE] Did not set the container."); + + return CheckFlagInternal(*pContainerProxy); +} + +LayoutUpdateFlag +Layout::CheckFlagInternal(LayoutItemProxy& containerProxy) +{ + int updateFlag = 0; + + LayoutMatchMode widthMode = containerProxy.GetItemWidthMatchMode(); + LayoutMatchMode heightMode = containerProxy.GetItemHeightMatchMode(); + ItemAlign align = containerProxy.GetItemAlignment(); + + if (widthMode == NONE_MODE && heightMode == NONE_MODE) + { + updateFlag |= UPDATEFLAG_NONE_MODE; + } + + if (widthMode == MATCH_PARENT || heightMode == MATCH_PARENT) + { + updateFlag |= UPDATEFLAG_MATCH_PARENT; + } + + if (widthMode == WRAP_CONTENT || heightMode == WRAP_CONTENT) + { + updateFlag |= UPDATEFLAG_WRAPCONTENT; + } + + if (align.HAlign != ITEM_HORIZONTAL_ALIGN_LEFT || align.VAlign != ITEM_VERTICAL_ALIGN_TOP) + { + updateFlag |= UPDATEFLAG_ALIGNMENT; + } + + return static_cast (updateFlag); + +} + +result +Layout::UpdateLayout(void) +{ + result r = UpdateLayoutInternal(UPDATEFLAG_NO_FLAG); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Failed to UpdateLayout.", GetErrorMessage(r)); + r = DetermineWindowRectToAllItem(); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Failed to DetermineWindowRectToAllItem.", GetErrorMessage(r)); + + return r; +} + +result +Layout::DetermineWindowRectToAllItem(void) +{ + ClearLastResult(); + + LayoutItemProxy* pContainerProxy = GetContainerProxy(); + SysTryReturn(NID_UI, pContainerProxy != null, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] Did not set the container."); + + if (__rootLayout) + { + if (__determineState) + { + OnDetermine(); + __determineState = false; + } + } + else + { + Layout* pParentLayout = pContainerProxy->GetParentLayout(); + SysTryReturn(NID_UI, pParentLayout != null, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] Layout does not exist."); + return pParentLayout->DetermineWindowRectToAllItem(); + } + + return E_SUCCESS; +} + +result +Layout::OnDetermine(void) +{ + ProxyList* pProxyList = GetProxyList(); + SysAssertf(pProxyList != null, "ProxyList is invalid"); + + LayoutItemProxy* pContainerProxy = GetContainerProxy(); + SysTryReturn(NID_UI, pContainerProxy != null, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] Did not set the container."); + + LayoutRect itemRect; + pContainerProxy->GetItemWindowRect(itemRect); + pContainerProxy->SetItemWindowRect(itemRect, false); + + itemRect.x = 0.0f; + itemRect.y = 0.0f; + itemRect.w = 0.0f; + itemRect.h = 0.0f; + pContainerProxy->SetItemWindowRect(itemRect, true); + + ProxyListNode* pCurNode = pProxyList->GetFirstNode(); + while (pCurNode != null) + { + LayoutItemProxy* pItemProxy = pCurNode->GetItemProxy(); + LayoutContainer* pCurContainer = static_cast(pItemProxy->GetItem()); + SysTryReturn(NID_UI, pCurContainer != null, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] This item is not container."); + + pCurContainer->GetLayout()->OnDetermine(); + + pCurNode = pProxyList->GetNextNode(*pCurNode); + } + + return E_SUCCESS; +} + + +void +Layout::SetUpdateState(bool state) +{ + ClearLastResult(); + + LayoutItemProxy* pContainerProxy = GetContainerProxy(); + + SysTryReturnVoidResult(NID_UI, pContainerProxy != null, E_INVALID_STATE, "[E_INVALID_STATE] Did not set the container."); + + if (__rootLayout) + { + __updateState = state; + } + else + { + Layout* pParentLayout = pContainerProxy->GetParentLayout(); + SysTryReturnVoidResult(NID_UI, pParentLayout != null, E_INVALID_STATE, "[E_INVALID_STATE] Layout does not exist."); + return pParentLayout->SetUpdateState(state); + } +} + +result +Layout::PartialUpdateLayout(void) +{ + ClearLastResult(); + + LayoutUpdateFlag flag = CheckCurrentFlag(); + SysTryReturn(NID_UI, flag != UPDATEFLAG_ERROR, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] CheckCurrentFlag is failed."); + + result r = UpdateLayoutInternal(flag); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Failed to UpdateLayout.", GetErrorMessage(r)); + r = OnDetermine(); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Failed to OnDetermine.", GetErrorMessage(r)); + + return r; + +} + +result +Layout::OnLayoutTrigger(Layout& layout, bool layoutUpdating) +{ + ClearLastResult(); + + LayoutItemProxy* pContainerProxy = layout.GetContainerProxy(); + + SysTryReturn(NID_UI, pContainerProxy != null, E_INVALID_STATE, E_INVALID_STATE, + "[E_INVALID_STATE] Did not set the container."); + + LayoutRect containerRect; + pContainerProxy->GetItemWindowRect(containerRect); + LayoutContainer* pContainer = static_cast (pContainerProxy->GetItem()); + SysTryReturn(NID_UI, pContainer != null, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] Did not set the container."); + + LayoutRect containerClientRect = {0.0f, 0.0f, containerRect.w, containerRect.h}; + pContainer->ConvertWindowToClientBounds(containerClientRect, containerClientRect); + + LayoutSize containerSize = {containerClientRect.w, containerClientRect.h}; + + pContainer->SetIntendedWindowSize(containerSize); + return layout.OnLayout(containerRect.w, containerRect.h, layoutUpdating); +} + +result +Layout::UpdateLayoutInternal(LayoutUpdateFlag updateFlag) +{ + ClearLastResult(); + + LayoutItemProxy* pContainerProxy = GetContainerProxy(); + + SysTryReturn(NID_UI, pContainerProxy != null, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] Did not set the container."); + + if (__rootLayout) + { + if (__updateState) + { + if (updateFlag == UPDATEFLAG_NO_FLAG) + { + __updateState = false; + } + __determineState = true; + return OnLayoutTrigger(*this, true); + } + else + { + return E_SUCCESS; + } + } + else + { + Layout* pParentLayout = pContainerProxy->GetParentLayout(); + SysTryReturn(NID_UI, pParentLayout != null, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] Layout does not exist."); + + if (updateFlag != UPDATEFLAG_NO_FLAG) + { + if (updateFlag & UPDATEFLAG_MATCH_PARENT || updateFlag & UPDATEFLAG_ALIGNMENT || pParentLayout->__partialUpdateState) + { + LayoutUpdateFlag parentflag = CheckParentFlag(); + SysTryReturn(NID_UI, parentflag != UPDATEFLAG_ERROR, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] CheckParentFlag is failed."); + + if (parentflag & UPDATEFLAG_MATCH_PARENT || parentflag & UPDATEFLAG_ALIGNMENT || pParentLayout->__partialUpdateState) + { + return pParentLayout->UpdateLayoutInternal(parentflag); + } + else + { + return OnLayoutTrigger(*pParentLayout, true); + } + } + else + { + return OnLayoutTrigger(*this, true); + } + } + + return pParentLayout->UpdateLayoutInternal(UPDATEFLAG_NO_FLAG); + } +} + +result +Layout::AddItem(LayoutItem& addItem) +{ + LayoutItemProxy* pItemProxy = CreateProxy(addItem); + SysTryReturn(NID_UI, pItemProxy != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to create proxy of layout item."); + + LayoutContainer* pContainer = static_cast (&addItem); + if (pContainer != null) + { + LayoutListNode* pCurNode = pContainer->GetLayoutList()->GetFirstNode(); + + while (pCurNode) + { + Layout* pLayout = pCurNode->GetLayout(); + if (pLayout != null) + { + if (pLayout->__rootLayout == true) + { + delete pLayout->__pContainerProxy; + pLayout->__pContainerProxy = pItemProxy; + pLayout->__rootLayout = false; + } + } + pCurNode = pContainer->GetLayoutList()->GetNextNode(*pCurNode); + } + } + + if (__pProxyList->AddNode(*pItemProxy) == null) + { + pItemProxy->Destroy(); + result r = GetLastResult(); + SysTryReturn(NID_UI, false, r, r, "[%s] Failed to add layout item.", GetErrorMessage(r)); + } + + pItemProxy->SetParentLayout(this); + pItemProxy->SetParentContainer(static_cast (__pContainerProxy->GetItem())); + + LayoutRect itemRect; + pItemProxy->GetItemWindowRect(itemRect); + + pItemProxy->SetItemBaseRect(itemRect); + + SetUpdateState(true); + return E_SUCCESS; +} + +result +Layout::RemoveItem(const LayoutItem& removeItem) +{ + ClearLastResult(); + + LayoutItemProxy* pItemProxy = __pProxyList->GetItemProxy(removeItem); + SysTryReturn(NID_UI, pItemProxy != null, E_INVALID_STATE, E_INVALID_STATE, + "[E_INVALID_STATE] Control dose not belong to layout."); + + result r = __pProxyList->RemoveNode(*pItemProxy); + if (r != E_SUCCESS) + { + SysLog(NID_UI, "Failed to RemoveNode()"); + SysTryReturn(NID_UI, r, r, r, "[E_INVALID_STATE] Failed to remove layout item."); + } + + pItemProxy->SetParentLayout(null); + pItemProxy->SetParentContainer(null); + pItemProxy->Destroy(); + + return E_SUCCESS; +} + +result +Layout::OnChangeViewPosition(int viewPosX, int viewPosY) +{ + ClearLastResult(); + + if (viewPosX != 0 || viewPosY != 0) + { + ProxyListNode* pNode = __pProxyList->GetFirstNode(); + while (pNode != null) + { + LayoutItemProxy* pItemProxy = pNode->GetItemProxy(); + SysTryReturn(NID_UI, pItemProxy != null, E_INVALID_STATE, E_INVALID_STATE, + "[E_INVALID_STATE] Layout proxy list error."); + + LayoutRect itemRect; + pItemProxy->GetItemWindowRect(itemRect); + itemRect.x += viewPosX; + itemRect.y += viewPosY; + result r = pItemProxy->SetItemWindowRect(itemRect); + if (r != E_SUCCESS) + { + return r; + } + + pNode = __pProxyList->GetNextNode(*pNode); + } + + __x += viewPosX; + __y += viewPosY; + } + + return E_SUCCESS; +} + +result +Layout::CalculateAlignment(const LayoutAlignMode alignMode) +{ + ClearLastResult(); + + result r = E_SUCCESS; + bool needMeasure = false; + + SysAssertf(__pProxyList != null, "ProxyList is invalid."); + + ProxyListNode* pNode = __pProxyList->GetFirstNode(); + while (pNode != null) + { + LayoutItemProxy* pItemProxy = pNode->GetItemProxy(); + SysTryReturn(NID_UI, pItemProxy != null, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] Layout proxy list error."); + + ItemAlign align = pItemProxy->GetItemAlignment(); + ItemMargin margin = pItemProxy->GetItemMargin(); + LayoutRect itemRect; + pItemProxy->GetItemWindowRect(itemRect); + + if (alignMode == BOTH || alignMode == HORIZONTALONLY) + { + switch (align.HAlign) + { + case ITEM_HORIZONTAL_ALIGN_LEFT: + { + itemRect.x = __x + margin.left; + break; + } + + case ITEM_HORIZONTAL_ALIGN_CENTER: + { + itemRect.x = (__x + (__width / 2)) - (itemRect.w / 2); + break; + } + + case ITEM_HORIZONTAL_ALIGN_RIGHT: + { + itemRect.x = (__x + __width) - (itemRect.w + margin.right); + break; + } + + case ITEM_HORIZONTAL_ALIGN_LEFT_RIGHT: + { + itemRect.x = __x + margin.left; + itemRect.w = __width - (margin.left + margin.right); + needMeasure = true; + break; + } + } +#ifdef NOT_SUPPORT_NEGATIVE_SIZE + if (itemRect.w < 0) + { + itemRect.w = 0.0f; + } +#endif + } + + if (alignMode == BOTH || alignMode == VERTICALONLY) + { + switch (align.VAlign) + { + case ITEM_VERTICAL_ALIGN_TOP: + { + itemRect.y = __y + margin.top; + break; + } + + case ITEM_VERTICAL_ALIGN_MIDDLE: + { + itemRect.y = (__y + (__height / 2)) - (itemRect.h / 2); + break; + } + + case ITEM_VERTICAL_ALIGN_BOTTOM: + { + itemRect.y = (__y + __height) - (itemRect.h + margin.bottom); + break; + } + + case ITEM_VERTICAL_ALIGN_TOP_BOTTOM: + { + itemRect.y = __y + margin.top; + itemRect.h = __height - (margin.top + margin.bottom); + needMeasure = true; + break; + } + } +#ifdef NOT_SUPPORT_NEGATIVE_SIZE + if (itemRect.h < 0) + { + itemRect.h = 0.0f; + } +#endif + } + + if (needMeasure) + { + r = pItemProxy->Measure(itemRect.w, itemRect.h); + if (r != E_SUCCESS) + { + return r; + } + pItemProxy->GetMeasuredSize(itemRect.w, itemRect.h); + } + r = pItemProxy->SetItemWindowRect(itemRect); + if (r != E_SUCCESS) + { + return r; + } + + pNode = __pProxyList->GetNextNode(*pNode); + } + + return E_SUCCESS; +} + +result +Layout::SetContainer(LayoutContainer* pContainer) +{ + ClearLastResult(); + + if (pContainer == null) + { + ProxyListNode* pNode = __pProxyList->GetFirstNode(); + while (pNode != null) + { + LayoutItemProxy* pItemProxy = pNode->GetItemProxy(); + SysTryReturn(NID_UI, pItemProxy != null, E_INVALID_STATE, E_INVALID_STATE, + "[E_INVALID_STATE] Layout proxy list error."); + + pItemProxy->SetParentContainer(null); + + pNode = __pProxyList->GetNextNode(*pNode); + } + + if (__pContainerProxy) + { + if (__rootLayout) + { + //__pContainerProxy->Destroy(); + delete __pContainerProxy; + __rootLayout = false; + } + __pContainerProxy = null; + } + + return E_SUCCESS; + } + + LayoutContainer* pParentContainer = pContainer->GetParentContainer(); + if (pParentContainer == null) + { + if (__rootLayout && __pContainerProxy != null) + { + delete __pContainerProxy; + } + + __pContainerProxy = CreateProxy(*pContainer); + SysTryReturn(NID_UI, __pContainerProxy != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to create proxy of layout item."); + + __rootLayout = true; + } + else + { + Layout* pParentLayout = pParentContainer->GetLayout(); + SysTryReturn(NID_UI, pParentLayout, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] Did not set a layout."); + + ProxyListNode* pNode = pParentLayout->__pProxyList->GetFirstNode(); + while (pNode != null) + { + LayoutItemProxy* pItemProxy = pNode->GetItemProxy(); + if (pItemProxy == null) + { + return E_INVALID_STATE; + } + LayoutContainer* pResultContainer = static_cast (pItemProxy->GetItem()); + if (pContainer == pResultContainer) + { + if (__rootLayout && __pContainerProxy != null) + { + delete __pContainerProxy; + __rootLayout = false; + } + __pContainerProxy = pItemProxy; + break; + } + pNode = __pProxyList->GetNextNode(*pNode); + } + } + + return E_SUCCESS; +} + +LayoutItemProxy* +Layout::CreateProxy(LayoutItem& item) +{ + return LayoutItemProxy::Create(*this, item); +} + +void +Layout::SetRootLayout(bool rootCheck) +{ + __rootLayout = rootCheck; +} + +result +Layout::CheckItem(const LayoutItem& checkItem) +{ + ClearLastResult(); + + ProxyListNode* pNode = __pProxyList->GetFirstNode(); + while (pNode != null) + { + LayoutItemProxy* pItemProxy = pNode->GetItemProxy(); + SysTryReturn(NID_UI, pItemProxy != null, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] Invalid proxy list node."); + + LayoutItem* pItem = pItemProxy->GetItem(); + SysTryReturn(NID_UI, pItem != null, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] Invalid layout item."); + + SysTryReturn(NID_UI, &checkItem != pItem, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Control belong to layout."); + + pNode = __pProxyList->GetNextNode(*pNode); + } + + return E_SUCCESS; +} + +bool +Layout::HasLayoutContainer(void) +{ + return __pContainerProxy != null; +} + +void +Layout::SetPartialUpdateFlag(bool flag) +{ + __partialUpdateState = flag; +} + +void +Layout::SetItemList(ProxyList* pItemList) +{ + __pProxyList = pItemList; +} + +ProxyList* +Layout::GetProxyList(void) const +{ + return __pProxyList; +} + +void +Layout::AlignToDevice(const LayoutPoint layoutPoint, LayoutPoint& alignedPoint) +{ + FloatPoint point(layoutPoint.x, layoutPoint.y); + point = CoordinateSystem::AlignToDevice(point); + + alignedPoint.x = point.x; + alignedPoint.y = point.y; +} + +void +Layout::AlignToDevice(const LayoutSize layoutSize, LayoutSize& alignedSize) +{ + FloatDimension size(layoutSize.w, layoutSize.h); + size = CoordinateSystem::AlignToDevice(size); + + alignedSize.w = size.width; + alignedSize.h = size.height; +} + +void +Layout::AlignToDevice(const LayoutRect layoutRect, LayoutRect& alignedRect) +{ + FloatRectangle rect(layoutRect.x, layoutRect.y, layoutRect.w, layoutRect.h); + rect = CoordinateSystem::AlignToDevice(rect); + + alignedRect.x = rect.x; + alignedRect.y = rect.y; + alignedRect.w = rect.width; + alignedRect.h = rect.height; +} + +}}} // Tizen::Ui::_Layout diff --git a/src/ui/layout/FUi_LayoutLayoutContainer.cpp b/src/ui/layout/FUi_LayoutLayoutContainer.cpp new file mode 100644 index 0000000..0a313b5 --- /dev/null +++ b/src/ui/layout/FUi_LayoutLayoutContainer.cpp @@ -0,0 +1,404 @@ +// +// 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_LayoutLayoutContainer.cpp + * @brief This is the implementation file for LayoutContainer class. + * + * This file contains the implementation of LayoutContainer class. + */ + +#include +#include "FUi_Control.h" +#include "FUi_LayoutLayoutContainer.h" +#include "FUi_LayoutLayoutList.h" +#include "FUi_LayoutLayout.h" +#include "FUi_LayoutAbsoluteLayout.h" + +namespace Tizen { namespace Ui { namespace _Layout +{ + +LayoutContainer::LayoutContainer(void) + : __pCurrentLayout(null) + , __defaultLayoutFlag(false) +{ + LayoutSize zeroSize = {0.0f, 0.0f}; + __intendedWindowSize = zeroSize; + + __pLayoutList = new (std::nothrow) LayoutList(); + SysTryReturnVoidResult(NID_UI, __pLayoutList, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); +} + +LayoutContainer::~LayoutContainer(void) +{ + Layout* pDefaultLayout = GetDefaultLayout(); + delete pDefaultLayout; + + LayoutListNode* pLayoutNode = __pLayoutList->GetFirstNode(); + while (pLayoutNode != null) + { + Layout* pLayout = pLayoutNode->GetLayout(); + if (pLayout != null) + { + if (pLayout->SetContainer(null) != E_SUCCESS) + { + SysAssert(false); + } + } + pLayoutNode = __pLayoutList->GetNextNode(*pLayoutNode); + } + delete __pLayoutList; + __pLayoutList = null; +} + +result +LayoutContainer::SetCurrentLayout(Layout& layout) +{ + if (!__pLayoutList->CheckNodeExists(layout)) + { + SysTryReturn(NID_UI, false, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This layout does not exist."); + } + + __pCurrentLayout = &layout; + __pCurrentLayout->SetUpdateState(true); + + return E_SUCCESS; +} + +result +LayoutContainer::AddLayout(Layout& layout) +{ + result r = E_SUCCESS; + + if (!__pLayoutList->CheckNodeExists(layout)) + { + SysTryReturn(NID_UI, !layout.HasLayoutContainer(), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This layout already belong to other container."); + SysTryReturn(NID_UI, __pLayoutList->AddNode(layout), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + r = layout.SetContainer(this); + } + + return r; +} + +Layout* +LayoutContainer::GetLayout() const +{ + return __pCurrentLayout; +} + +result +LayoutContainer::AddItem(LayoutItem& addItem) +{ + LayoutListNode* pCurNode = __pLayoutList->GetFirstNode(); + Layout* pLayout = null; + result r = E_SUCCESS; + + while (pCurNode) + { + pLayout = pCurNode->GetLayout(); + if (pLayout) + { + r = pLayout->AddItem(addItem); + } + + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pCurNode = __pLayoutList->GetNextNode(*pCurNode); + } + return E_SUCCESS; + +CATCH: + LayoutListNode* pRollBackNode = __pLayoutList->GetFirstNode(); + while (pRollBackNode != null && pRollBackNode != pCurNode) + { + pLayout = pRollBackNode->GetLayout(); + if (pLayout) + { + pLayout->RemoveItem(addItem); + } + + pRollBackNode = __pLayoutList->GetNextNode(*pRollBackNode); + } + return r; +} + +result +LayoutContainer::RemoveItem(LayoutItem& removeItem) +{ + LayoutListNode* pCurNode = __pLayoutList->GetFirstNode(); + Layout* pLayout = null; + result r = E_SUCCESS; + + while (pCurNode) + { + pLayout = pCurNode->GetLayout(); + if (pLayout) + { + r |= pLayout->RemoveItem(removeItem); + } + pCurNode = __pLayoutList->GetNextNode(*pCurNode); + } + + return (r == E_SUCCESS) ? E_SUCCESS : GetLastResult(); +} + +void +LayoutContainer::OnDestroyItem(LayoutItem& item) +{ + LayoutListNode* pCurNode = __pLayoutList->GetFirstNode(); + Layout* pLayout = null; + + while (pCurNode) + { + pLayout = pCurNode->GetLayout(); + if (pLayout) + { + pLayout->RemoveItem(item); + } + pCurNode = __pLayoutList->GetNextNode(*pCurNode); + } +} + +result +LayoutContainer::OnSetDefaultLayout(Layout& deletedLayout) +{ + LayoutListNode* pDefaultNode = __pLayoutList->GetFirstNode(); + if (pDefaultNode == null) + { + return E_INVALID_STATE; + } + + Layout* pLayout = pDefaultNode->GetLayout(); + if (pLayout == null) + { + return E_INVALID_STATE; + } + + if (__pCurrentLayout == &deletedLayout) + { + SetCurrentLayout(*pLayout); + return E_SUCCESS; + } + + return E_SYSTEM; +} + +void +LayoutContainer::SetIntendedWindowSize(const LayoutSize intendedWindowSize) +{ + __intendedWindowSize = intendedWindowSize; +} + +LayoutSize +LayoutContainer::GetIntendedWindowSize() const +{ + return __intendedWindowSize; +} + +result +LayoutContainer::Measure(float width, float height) +{ + LayoutContainer* pContainer = GetParentContainer(); + if (pContainer == null) + { + return E_INVALID_STATE; + } + + Layout* pLayout = pContainer->GetLayout(); + if (pLayout == null) + { + return E_INVALID_STATE; + } + + LayoutMatchMode widthMode; + LayoutMatchMode heightMode; + result re = E_SYSTEM; + re = pLayout->GetItemWidthMatchMode(*this, widthMode); + if (re != E_SUCCESS) + { + return re; + } + re = pLayout->GetItemHeightMatchMode(*this, heightMode); + if (re != E_SUCCESS) + { + return re; + } + + re = LayoutItem::Measure(width, height); + if (re != E_SUCCESS) + { + return re; + } + + float measuredWidth = 0.0f; + float measuredHeight = 0.0f; + GetMeasuredSize(measuredWidth, measuredHeight); + + bool contentState = GetContentSizeState(); + + if (widthMode == WRAP_CONTENT && !contentState) + { + measuredWidth = width; + } + if (heightMode == WRAP_CONTENT && !contentState) + { + measuredHeight = height; + } + + LayoutRect rect = {0.0f, 0.0f, measuredWidth, measuredHeight}; + + if (__pCurrentLayout != null) + { + LayoutRect containerClientRect = {0.0f, 0.0f, measuredWidth, measuredHeight}; + ConvertWindowToClientBounds(containerClientRect, containerClientRect); + + LayoutSize containerSize = {containerClientRect.w, containerClientRect.h}; + + SetIntendedWindowSize(containerSize); + __pCurrentLayout->OnLayout(measuredWidth, measuredHeight, true); + rect = __pCurrentLayout->GetLayoutRect(); + } + + if (widthMode == WRAP_CONTENT && !contentState) + { + measuredWidth = rect.w; + } + if (heightMode == WRAP_CONTENT && !contentState) + { + measuredHeight = rect.h; + } + + RunItemMeasure(measuredWidth, measuredHeight); + + LayoutSize minSize; + LayoutSize maxSize; + + GetMinSize(minSize); + GetMaxSize(maxSize); + + if (measuredWidth < minSize.w) + { + measuredWidth = minSize.w; + } + else if (measuredWidth > maxSize.w) + { + measuredWidth = maxSize.w; + } + + if (measuredHeight < minSize.h) + { + measuredHeight = minSize.h; + } + else if (measuredHeight > maxSize.h) + { + measuredHeight = maxSize.h; + } + + SetMeasuredSize(measuredWidth, measuredHeight); + + return E_SUCCESS; +} + +void +LayoutContainer::OnDestroyLayout(Layout& layout) +{ + LayoutListNode* pLayoutNode = __pLayoutList->GetFirstNode(); + while (pLayoutNode != null) + { + if (pLayoutNode->GetLayout() == &layout) + { + __pLayoutList->RemoveNode(*pLayoutNode); + break; + } + pLayoutNode = __pLayoutList->GetNextNode(*pLayoutNode); + } + + if (&layout == __pCurrentLayout) + { + pLayoutNode = __pLayoutList->GetFirstNode(); + + if (pLayoutNode != null) + { + SetCurrentLayout(*pLayoutNode->GetLayout()); + } + } +} + +result +LayoutContainer::SetDefaultLayout(Layout& layout) +{ + if (__defaultLayoutFlag) + { + return E_INVALID_STATE; + } + + if (__pLayoutList->GetFirstNode() != null) + { + return E_INVALID_STATE; + } + AddLayout(layout); + __defaultLayoutFlag = true; + + return SetCurrentLayout(layout); +} + +Layout* +LayoutContainer::GetDefaultLayout() const +{ + LayoutListNode* pLayoutNode = __pLayoutList->GetFirstNode(); + if (pLayoutNode == null) + { + return null; + } + else + { + return pLayoutNode->GetLayout(); + } +} + +bool +LayoutContainer::LayoutExists(Layout& layout) +{ + return __pLayoutList->CheckNodeExists(layout); +} + +void +LayoutContainer::OnDestroyContainerProxy() +{ + if (__pLayoutList != null) + { + LayoutListNode* pCurNode = __pLayoutList->GetFirstNode(); + Layout* pLayout = null; + + while (pCurNode) + { + pLayout = pCurNode->GetLayout(); + if (pLayout) + { + pLayout->SetContainer(this); + } + pCurNode = __pLayoutList->GetNextNode(*pCurNode); + } + } +} + +LayoutList* +LayoutContainer::GetLayoutList(void) +{ + return __pLayoutList; +} + +}}} // Tizen::Ui::_Layout diff --git a/src/ui/layout/FUi_LayoutLayoutItem.cpp b/src/ui/layout/FUi_LayoutLayoutItem.cpp new file mode 100644 index 0000000..af15e83 --- /dev/null +++ b/src/ui/layout/FUi_LayoutLayoutItem.cpp @@ -0,0 +1,336 @@ +// +// 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_LayoutLayoutItem.cpp + * @brief This is the implementation file for LayoutItem class. + * + * This file contains the implementation of LayoutItem class. + */ + +#include +#include +#include "FUi_Control.h" +#include "FUi_LayoutLayoutItem.h" +#include "FUi_LayoutLayout.h" + +namespace Tizen { namespace Ui { namespace _Layout +{ + +LayoutItem::LayoutItem(void) + : __pOuterControl(null) + , __pParentContainer(null) + , __contentSizeState(false) +{ + __measuredSize.w = 0.0f; + __measuredSize.h = 0.0f; +} + +LayoutItem::~LayoutItem(void) +{ + if (__pParentContainer != null) + { + __pParentContainer->OnDestroyItem(*this); + } +} + +void +LayoutItem::SetItemHandler(ILayoutItemHandler* pOuterControl) +{ + __pOuterControl = pOuterControl; +} + +result +LayoutItem::SetItemWindowRect(const LayoutRect layoutRect) +{ + SysAssertf(__pOuterControl != null, "Did not set a ILayoutItemHandler."); + + Tizen::Graphics::FloatRectangle rect(layoutRect.x, layoutRect.y, layoutRect.w, layoutRect.h); + return __pOuterControl->SetItemBounds(rect); +} + +void +LayoutItem::GetItemWindowRect(LayoutRect& layoutRect) const +{ + SysAssertf(__pOuterControl != null, "Did not set a ILayoutItemHandler."); + + Tizen::Graphics::FloatRectangle rect = __pOuterControl->GetItemBounds(); + + layoutRect.x = rect.x; + layoutRect.y = rect.y; + layoutRect.w = rect.width; + layoutRect.h = rect.height; +} + +void +LayoutItem::ConvertWindowToClientBounds(const LayoutRect windowRect, LayoutRect& clientRect) +{ + SysAssertf(__pOuterControl != null, "Did not set a ILayoutItemHandler."); + + Tizen::Graphics::FloatDimension size(windowRect.w, windowRect.h); + Tizen::Graphics::FloatRectangle rect = __pOuterControl->GetItemClientBoundsFromSize(size); + + clientRect.x = rect.x; + clientRect.y = rect.y; + clientRect.w = rect.width; + clientRect.h = rect.height; +} + +result +LayoutItem::Measure(float width, float height) +{ + LayoutContainer* pContainer = __pParentContainer; + if (pContainer == null) + { + return E_INVALID_STATE; + } + + Layout* pLayout = pContainer->GetLayout(); + if (pLayout == null) + { + return E_INVALID_STATE; + } + + LayoutMatchMode widthMode; + LayoutMatchMode heightMode; + result re = E_SYSTEM; + re = pLayout->GetItemWidthMatchMode(*this, widthMode); + if (re != E_SUCCESS) + { + return re; + } + re = pLayout->GetItemHeightMatchMode(*this, heightMode); + if (re != E_SUCCESS) + { + return re; + } + + LayoutRect layoutRect = pLayout->GetLayoutRect(); + + LayoutMatchMode containerWidthMode = NONE_MODE; + LayoutMatchMode containerHeightMode = NONE_MODE; + + LayoutContainer* pContainerParent = pContainer->GetParentContainer(); + if (pContainerParent != null) + { + re = pContainerParent->GetLayout()->GetItemWidthMatchMode(*pContainer, containerWidthMode); + if (re != E_SUCCESS) + { + return re; + } + re = pContainerParent->GetLayout()->GetItemHeightMatchMode(*pContainer, containerHeightMode); + if (re != E_SUCCESS) + { + return re; + } + } + + LayoutSize containerSize = pContainer->GetIntendedWindowSize(); + + float measuredWidth = 0.0f; + float measuredHeight = 0.0f; + + float wrapContentWidth = 0.0f; + float wrapContentHeight = 0.0f; + + bool widthWrapContent = widthMode == WRAP_CONTENT; + bool heightWrapContent = heightMode == WRAP_CONTENT; + if (widthWrapContent || heightWrapContent) + { + Tizen::Graphics::FloatDimension size = __pOuterControl->GetItemContentSize(widthWrapContent, heightWrapContent); + if (size.width > 0.0f || size.height > 0.0f) + { + __contentSizeState = true; + wrapContentWidth = size.width; + wrapContentHeight = size.height; + } + else + { + __contentSizeState = false; + wrapContentWidth = width; + wrapContentHeight = height; + } + } + + if (widthMode == NONE_MODE) + { + measuredWidth = width; + } + else if (widthMode == WRAP_CONTENT) + { + measuredWidth = wrapContentWidth; + } + else if (widthMode == MATCH_PARENT) + { + if (containerWidthMode != WRAP_CONTENT) + { + measuredWidth = containerSize.w; + } + else + { + measuredWidth = layoutRect.w; + } + } + + if (heightMode == NONE_MODE) + { + measuredHeight = height; + } + else if (heightMode == WRAP_CONTENT) + { + measuredHeight = wrapContentHeight; + } + else if (heightMode == MATCH_PARENT) + { + if (containerHeightMode != WRAP_CONTENT) + { + measuredHeight = containerSize.h; + } + else + { + measuredHeight = layoutRect.h; + } + } + + RunItemMeasure(measuredWidth, measuredHeight); + + LayoutSize minSize; + LayoutSize maxSize; + + Tizen::Graphics::FloatDimension controlMinSize = __pOuterControl->GetItemMinimumSize(); + Tizen::Graphics::FloatDimension controlMaxSize = __pOuterControl->GetItemMaximumSize(); + + minSize.w = controlMinSize.width; + minSize.h = controlMinSize.height; + + maxSize.w = controlMaxSize.width; + maxSize.h = controlMaxSize.height; + + if (measuredWidth < minSize.w) + { + measuredWidth = minSize.w; + } + else if (measuredWidth > maxSize.w) + { + measuredWidth = maxSize.w; + } + + if (measuredHeight < minSize.h) + { + measuredHeight = minSize.h; + } + else if (measuredHeight > maxSize.h) + { + measuredHeight = maxSize.h; + } + + SetMeasuredSize(measuredWidth, measuredHeight); + + return E_SUCCESS; +} + +void +LayoutItem::RunItemMeasure(float& width, float& height) +{ + __pOuterControl->OnItemMeasure(width, height); +} + +void +LayoutItem::Visible(bool visible) +{ + SysAssertf(__pOuterControl != null, "Did not set a ILayoutItemHandler."); + + __pOuterControl->SetItemVisibleState(visible); +} + +void +LayoutItem::SetParentContainer(LayoutContainer* pParentContainer) +{ + SysAssertf(__pOuterControl != null, "Did not set a ILayoutItemHandler."); + __pParentContainer = pParentContainer; +} + +LayoutContainer* +LayoutItem::GetParentContainer(void) const +{ + return __pParentContainer; +} + +void +LayoutItem::SetMeasuredSize(float width, float height) +{ + __measuredSize.w = width; + __measuredSize.h = height; +} + +void +LayoutItem::GetMeasuredSize(float& width, float& height) const +{ + width = __measuredSize.w; + height = __measuredSize.h; +} + +void +LayoutItem::GetMinSize(LayoutSize& minSize) const +{ + SysAssertf(__pOuterControl != null, "Did not set a ILayoutItemHandler."); + Tizen::Graphics::FloatDimension controlMinSize = __pOuterControl->GetItemMinimumSize(); + + minSize.w = controlMinSize.width; + minSize.h = controlMinSize.height; +} + +void +LayoutItem::GetMaxSize(LayoutSize& maxSize) const +{ + SysAssertf(__pOuterControl != null, "Did not set a ILayoutItemHandler."); + Tizen::Graphics::FloatDimension controlMaxSize = __pOuterControl->GetItemMaximumSize(); + + maxSize.w = controlMaxSize.width; + maxSize.h = controlMaxSize.height; +} + +Layout* +LayoutItem::GetIncludedLayout(void) const +{ + if (__pParentContainer != null) + { + return __pParentContainer->GetLayout(); + } + return null; +} + +result +LayoutItem::OnChangeBaseRect(void) +{ + Layout* pLayout = GetIncludedLayout(); + if (pLayout == null) + { + return E_INVALID_STATE; + } + LayoutRect rect; + GetItemWindowRect(rect); + + return pLayout->SetItemBaseRect(*this, rect); +} + +bool +LayoutItem::GetContentSizeState(void) const +{ + return __contentSizeState; +} + +}}} // Tizen::Ui::_Layout diff --git a/src/ui/layout/FUi_LayoutLayoutItemInfo.cpp b/src/ui/layout/FUi_LayoutLayoutItemInfo.cpp new file mode 100644 index 0000000..0a2fe67 --- /dev/null +++ b/src/ui/layout/FUi_LayoutLayoutItemInfo.cpp @@ -0,0 +1,90 @@ +// +// 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_LayoutLayoutItemInfo.cpp + * @brief This is the implementation file for LayoutItemInfo class. + * + * This file contains the implementation of LinkedListNode class. + */ + +#include +#include +#include +#include "FUi_LayoutTableLayout.h" +#include "FUi_LayoutLayoutItemInfo.h" + +namespace Tizen { namespace Ui { namespace _Layout +{ + +// Super class +LayoutItemInfo::LayoutItemInfo(void) +{ +} + +LayoutItemInfo::~LayoutItemInfo(void) +{ +} + +// Relative layout +RelativeItemInfo::RelativeItemInfo(void) + : __refCount(0) +{ + memset(__pTarget, 0, sizeof(LayoutItemProxy*) * 6); + memset(__targetEdge, EDGE_NONE, sizeof(RelativeLayoutEdge) * 6); +} + +RelativeItemInfo::~RelativeItemInfo(void) +{ +} + +// Table layout +TableItemInfo::TableItemInfo(void) + : __id(TableLayout::INVALID_CELL_ID) + , __enable(true) + , __merged(false) + , __fillWidth(false) + , __fillHeight(false) +{ + __mergeEndPoint.x = TableLayout::NOT_MERGED; + __mergeEndPoint.y = TableLayout::NOT_MERGED; + __minSize.w = 0.0f; + __minSize.h = 0.0f; + __maxSize.w = 0.0f; + __maxSize.h = 0.0f; +} + +TableItemInfo::~TableItemInfo(void) +{ +} + +// Linear layout +LinearItemInfo::LinearItemInfo(void) + : __weight(0.0f) + , __spacing(0.0f) + , __fixedSize(false) +{ + __itemRect.x = 0.0f; + __itemRect.y = 0.0f; + __itemRect.w = 0.0f; + __itemRect.h = 0.0f; +} + +LinearItemInfo::~LinearItemInfo(void) +{ +} + +}}} // Tizen::Ui::_Layout diff --git a/src/ui/layout/FUi_LayoutLayoutItemInfo.h b/src/ui/layout/FUi_LayoutLayoutItemInfo.h new file mode 100644 index 0000000..c565c2a --- /dev/null +++ b/src/ui/layout/FUi_LayoutLayoutItemInfo.h @@ -0,0 +1,152 @@ +// +// 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_LayoutLayoutItemInfo.h + * @brief This is the header file for LayoutItemInfo class. + * + * This header file contains the declaration of LayoutItemInfo class. + */ + +#pragma once + +#ifndef _FUI_INTERNAL_LAYOUT_LAYOUT_ITEM_INFO_H_ +#define _FUI_INTERNAL_LAYOUT_LAYOUT_ITEM_INFO_H_ + +#include "FUi_LayoutLayoutTypes.h" + +namespace Tizen { namespace Ui { namespace _Layout +{ + +struct TableLayoutPoint +{ + int x; + int y; +}; + +class LayoutItemProxy; +class RelativeLayout; +class RelativeProxyList; +class TableLayout; +class LinearLayout; + +class LayoutItemInfo +{ + +public: + /** + * This is the default constructor for this class. + * + * @since 2.0 + */ + LayoutItemInfo(void); + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~LayoutItemInfo(void); +}; // LayoutItemInfo + +class RelativeItemInfo + : public LayoutItemInfo +{ +public: + /** + * This is the default constructor for this class. + * + * @since 2.0 + */ + RelativeItemInfo(void); + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~RelativeItemInfo(void); + +private: + int __refCount; + LayoutItemProxy* __pTarget[6]; + RelativeLayoutEdge __targetEdge[6]; + + friend class RelativeLayout; + friend class RelativeProxyList; +}; // RelativeItemInfo + +class TableItemInfo + : public LayoutItemInfo +{ +public: + /** + * This is the default constructor for this class. + * + * @since 2.0 + */ + TableItemInfo(void); + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~TableItemInfo(void); + +private: + int __id; + bool __enable; + bool __merged; + TableLayoutPoint __mergeEndPoint; + bool __fillWidth; + bool __fillHeight; + LayoutSize __minSize; + LayoutSize __maxSize; + + friend class TableLayout; +}; // TableItemInfo + +class LinearItemInfo + : public LayoutItemInfo +{ +public: + /** + * This is the default constructor for this class. + * + * @since 2.0 + */ + LinearItemInfo(void); + + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~LinearItemInfo(void); + +private: + float __weight; + float __spacing; + bool __fixedSize; + LayoutRect __itemRect; + + friend class LinearLayout; +}; // LinearItemInfo + +}}} //Tizen::Ui::_Layout + +#endif // _FUI_INTERNAL_LAYOUT_LAYOUT_ITEM_PROXY_H_ diff --git a/src/ui/layout/FUi_LayoutLayoutItemProxy.cpp b/src/ui/layout/FUi_LayoutLayoutItemProxy.cpp new file mode 100644 index 0000000..0fd62b6 --- /dev/null +++ b/src/ui/layout/FUi_LayoutLayoutItemProxy.cpp @@ -0,0 +1,255 @@ +// +// 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_LayoutLayoutItemProxy.cpp + * @brief This is the implementation file for LayoutItemProxy class. + * + * This file contains the implementation of LayoutItemProxy class. + */ + +#include +#include +#include "FUi_Math.h" +#include "FUi_LayoutLayoutItemProxy.h" +#include "FUi_LayoutLayoutContainer.h" + +namespace Tizen { namespace Ui { namespace _Layout +{ + +LayoutItemProxy::LayoutItemProxy(LayoutItem& pRealItem) + : __index(-1) + , __pItem(&pRealItem) + , __widthMatchmode(NONE_MODE) + , __heightMatchmode(NONE_MODE) + , __pParentLayout(null) +{ + __itemAlign.HAlign = ITEM_HORIZONTAL_ALIGN_LEFT; + __itemAlign.VAlign = ITEM_VERTICAL_ALIGN_TOP; + LayoutRect rect = {0.0f, 0.0f, 0.0f, 0.0f}; + ItemMargin margin = {0.0f, 0.0f, 0.0f, 0.0f}; + __itemMargin = margin; + __baseRect = rect; + __calculatedRect = rect; +} + +LayoutItemProxy::~LayoutItemProxy() +{ +} + +LayoutItemProxy* +LayoutItemProxy::Create(Layout& pLayout, LayoutItem& pRealItem) +{ + LayoutItemProxy* pItemProxy = new (std::nothrow) LayoutItemProxy(pRealItem); + + return pItemProxy; +} + +void +LayoutItemProxy::Destroy() +{ + LayoutContainer* pContainer = static_cast (GetItem()); + if (pContainer) + { + pContainer->OnDestroyContainerProxy(); + } + delete this; +} + +int +LayoutItemProxy::GetIndex(void) const +{ + return __index; +} + +LayoutItem* +LayoutItemProxy::GetItem() const +{ + return __pItem; +} + +void +LayoutItemProxy::SetItemAlignment(ItemAlign align) +{ + __itemAlign = align; +} + +ItemAlign +LayoutItemProxy::GetItemAlignment(void) const +{ + return __itemAlign; +} + +void +LayoutItemProxy::SetItemMargin(ItemMargin margin) +{ + __itemMargin = margin; +} + +ItemMargin +LayoutItemProxy::GetItemMargin(void) const +{ + return __itemMargin; +} + +void +LayoutItemProxy::SetItemWidthMatchMode(LayoutMatchMode matchMode) +{ + __widthMatchmode = matchMode; +} + +LayoutMatchMode +LayoutItemProxy::GetItemWidthMatchMode(void) const +{ + return __widthMatchmode; +} + +void +LayoutItemProxy::SetItemHeightMatchMode(LayoutMatchMode matchMode) +{ + __heightMatchmode = matchMode; +} + +LayoutMatchMode +LayoutItemProxy::GetItemHeightMatchMode(void) const +{ + return __heightMatchmode; +} + +void +LayoutItemProxy::SetItemBaseRect(LayoutRect rect) +{ + __baseRect = rect; +} + +LayoutRect +LayoutItemProxy::GetItemBaseRect() const +{ + return __baseRect; +} + +void +LayoutItemProxy::SetMeasuredSize(float width, float height) +{ + SysAssertf(__pItem != null, "LayoutItem is invalid"); + __pItem->SetMeasuredSize(width, height); +} + +void +LayoutItemProxy::GetMeasuredSize(float& width, float& height) const +{ + SysAssertf(__pItem != null, "LayoutItem is invalid"); + __pItem->GetMeasuredSize(width, height); +} + +result +LayoutItemProxy::SetItemWindowRect(const LayoutRect itemRect, bool calculating) +{ + SysAssertf(__pItem != null, "LayoutItem is invalid"); + if (calculating) + { + __calculatedRect = itemRect; + + return E_SUCCESS; + } + else + { + return __pItem->SetItemWindowRect(itemRect); + } +} + +void +LayoutItemProxy::GetItemWindowRect(LayoutRect& itemRect) const +{ + SysAssertf(__pItem != null, "LayoutItem is invalid"); + if (_FloatCompare(__calculatedRect.x, 0.0f) && _FloatCompare(__calculatedRect.y, 0.0f) && _FloatCompare(__calculatedRect.w, 0.0f) && _FloatCompare(__calculatedRect.h, 0.0f)) + { + __pItem->GetItemWindowRect(itemRect); + } + else + { + itemRect = __calculatedRect; + } +} + +void +LayoutItemProxy::ConvertWindowToClientBounds(const LayoutRect windowRect, LayoutRect& clientRect) +{ + SysAssertf(__pItem != null, "LayoutItem is invalid"); + __pItem->ConvertWindowToClientBounds(windowRect, clientRect); +} + +result +LayoutItemProxy::Measure(float width, float height) +{ + SysAssertf(__pItem != null, "LayoutItem is invalid"); + return __pItem->Measure(width, height); +} + +void +LayoutItemProxy::Visible(const bool visible) +{ + SysAssertf(__pItem != null, "LayoutItem is invalid"); + __pItem->Visible(visible); +} + +void +LayoutItemProxy::SetParentLayout(Layout* pLayout) +{ + __pParentLayout = pLayout; +} + +Layout* +LayoutItemProxy::GetParentLayout() const +{ + return __pParentLayout; +} + +void +LayoutItemProxy::SetIndex(int index) +{ + __index = index; +} + +void +LayoutItemProxy::GetMinSize(LayoutSize& minSize) const +{ + SysAssertf(__pItem != null, "LayoutItem is invalid"); + __pItem->GetMinSize(minSize); +} + +void +LayoutItemProxy::GetMaxSize(LayoutSize& maxSize) const +{ + SysAssertf(__pItem != null, "LayoutItem is invalid"); + __pItem->GetMaxSize(maxSize); +} + +void +LayoutItemProxy::SetParentContainer(LayoutContainer* pParentContainer) +{ + SysAssertf(__pItem != null, "LayoutItem is invalid"); + __pItem->SetParentContainer(pParentContainer); +} + +LayoutContainer* +LayoutItemProxy::GetParentContainer() const +{ + SysAssertf(__pItem != null, "LayoutItem is invalid"); + return __pItem->GetParentContainer(); +} + +}}} // Tizen::Ui::_Layout diff --git a/src/ui/layout/FUi_LayoutLayoutItemProxy.h b/src/ui/layout/FUi_LayoutLayoutItemProxy.h new file mode 100644 index 0000000..1c017d3 --- /dev/null +++ b/src/ui/layout/FUi_LayoutLayoutItemProxy.h @@ -0,0 +1,110 @@ +// +// 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_LayoutLayoutItemProxy.h + * @brief This is the header file for LayoutItemProxy class. + * + * This header file contains the declaration of LayoutItemProxy class. + */ + +#pragma once + +#ifndef _FUI_INTERNAL_LAYOUT_LAYOUT_ITEM_PROXY_H_ +#define _FUI_INTERNAL_LAYOUT_LAYOUT_ITEM_PROXY_H_ + +#include "FUi_LayoutLayoutItem.h" + +namespace Tizen { namespace Ui { namespace _Layout +{ + +class Layout; + +class LayoutItemProxy +{ +public: + int GetIndex(void) const; + + LayoutItem* GetItem(void) const; + + void SetItemAlignment(const ItemAlign align); + ItemAlign GetItemAlignment(void) const; + + void SetItemMargin(const ItemMargin margin); + ItemMargin GetItemMargin(void) const; + + void SetItemWidthMatchMode(const LayoutMatchMode matchmode); + LayoutMatchMode GetItemWidthMatchMode(void) const; + void SetItemHeightMatchMode(const LayoutMatchMode matchmode); + LayoutMatchMode GetItemHeightMatchMode(void) const; + + void SetItemBaseRect(const LayoutRect rect); + LayoutRect GetItemBaseRect(void) const; + + void SetMeasuredSize(float width, float height); + void GetMeasuredSize(float& width, float& height) const; + + result SetItemWindowRect(const LayoutRect itemRect, bool calculating = true); + void GetItemWindowRect(LayoutRect& itemRect) const; + + void ConvertWindowToClientBounds(const LayoutRect windowRect, LayoutRect& clientRect); + + result Measure(float width, float height); + void Visible(const bool visible); + + void SetParentLayout(Layout* pLayout); + Layout* GetParentLayout(void) const; + + void GetMinSize(LayoutSize& minSize) const; + void GetMaxSize(LayoutSize& maxSize) const; + + void SetParentContainer(LayoutContainer* pParentContainer); + LayoutContainer* GetParentContainer(void) const; + +private: + LayoutItemProxy(LayoutItem& pRealItem); + LayoutItemProxy(const LayoutItemProxy&); + LayoutItemProxy& operator =(const LayoutItemProxy&); + + virtual ~LayoutItemProxy(void); + + void SetIndex(int index); + static LayoutItemProxy* Create(Layout& pLayout, LayoutItem& pRealItem); + void Destroy(void); + +// property +private: + int __index; + LayoutItem* __pItem; + + ItemAlign __itemAlign; + ItemMargin __itemMargin; + + LayoutMatchMode __widthMatchmode; + LayoutMatchMode __heightMatchmode; + + LayoutRect __baseRect; + LayoutRect __calculatedRect; + + Layout* __pParentLayout; + + friend class Layout; + friend class ProxyList; +}; // LayoutItemProxy + +}}} //Tizen::Ui::_Layout + +#endif // _FUI_INTERNAL_LAYOUT_LAYOUT_ITEM_PROXY_H_ diff --git a/src/ui/layout/FUi_LayoutLayoutList.cpp b/src/ui/layout/FUi_LayoutLayoutList.cpp new file mode 100644 index 0000000..e131abb --- /dev/null +++ b/src/ui/layout/FUi_LayoutLayoutList.cpp @@ -0,0 +1,126 @@ +// +// 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_LayoutLayoutList.cpp + * @brief This is the implementation file for LayoutList class. + * + * This file contains the implementation of LayoutList class. + */ + +#include +#include "FUi_LayoutLayoutList.h" + +namespace Tizen { namespace Ui { namespace _Layout +{ + +LayoutList::LayoutList(void) +{ +} + +LayoutList::~LayoutList(void) +{ + RemoveAllNode(); +} + +LayoutListNode* +LayoutList::GetFirstNode(void) const +{ + return static_cast (LinkedList::GetFirstNode()); +} + +LayoutListNode* +LayoutList::GetLastNode(void) const +{ + return static_cast (LinkedList::GetLastNode()); +} + +LayoutListNode* +LayoutList::GetNextNode(const LayoutListNode& node) const +{ + return static_cast (LinkedList::GetNextNode(node)); +} + +LayoutListNode* +LayoutList::GetPrevNode(const LayoutListNode& node) const +{ + return static_cast (LinkedList::GetPrevNode(node)); +} + +LayoutListNode* +LayoutList::AddNode(Layout& addLayout) +{ + LayoutListNode* pAddNode = new (std::nothrow) LayoutListNode(); + + if (pAddNode == null) + { + return null; + } + + pAddNode->Create(addLayout); + + if (InsertIntoLeft(*_pEndNode, *pAddNode) != E_SUCCESS) + { + delete pAddNode; + return null; + } + + return pAddNode; +} + +bool +LayoutList::CheckNodeExists(const Layout& layout) const +{ + LayoutListNode* pCurNode = GetFirstNode(); + Layout* pCurLayout = null; + + while (pCurNode) + { + pCurLayout = pCurNode->GetLayout(); + if (pCurLayout == &layout) + { + return true; + } + pCurNode = GetNextNode(*pCurNode); + } + return false; +} + +result +LayoutList::RemoveNode(LinkedListNode& node) +{ + return LinkedList::RemoveNode(node); +} + + +void +LayoutList::RemoveAllNode(void) +{ + LinkedListNode* pCurNode = GetFirstNode(); + LinkedListNode* pNextNode = pCurNode; + + while (pCurNode != null) + { + pNextNode = LinkedList::GetNextNode(*pCurNode); + if (RemoveNode(*pCurNode) != E_SUCCESS) + { + SysAssert(false); + } + pCurNode = pNextNode; + } +} + +}}} // Tizen::Ui::_Layout diff --git a/src/ui/layout/FUi_LayoutLayoutList.h b/src/ui/layout/FUi_LayoutLayoutList.h new file mode 100644 index 0000000..50a795f --- /dev/null +++ b/src/ui/layout/FUi_LayoutLayoutList.h @@ -0,0 +1,65 @@ +// +// 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_LayoutLayoutList.h + * @brief This is the header file for LayoutList class. + * + * This header file contains the declaration of LayoutList class. + */ + +#pragma once + +#ifndef _FUI_INTERNAL_LAYOUT_LAYOUT_LIST_H_ +#define _FUI_INTERNAL_LAYOUT_LAYOUT_LIST_H_ + +#include "FUi_LayoutLinkedList.h" +#include "FUi_LayoutLayoutListNode.h" + +namespace Tizen { namespace Ui { namespace _Layout +{ + +class LayoutList + : public LinkedList +{ +private: + LayoutList(void); + virtual ~LayoutList(void); + + LayoutListNode* GetFirstNode(void) const; + LayoutListNode* GetLastNode(void) const; + + LayoutListNode* GetNextNode(const LayoutListNode& node) const; + LayoutListNode* GetPrevNode(const LayoutListNode& node) const; + + LayoutListNode* AddNode(Layout& addLayout); + virtual result RemoveNode(LinkedListNode& node); + + bool CheckNodeExists(const Layout& layout) const; + + void RemoveAllNode(void); + +private: + LayoutList(const LayoutList&); + LayoutList& operator =(const LayoutList&); + + friend class Layout; + friend class LayoutContainer; +}; // LayoutList + +}}} //Tizen::Ui::_Layout + +#endif // _FUI_INTERNAL_LAYOUT_LAYOUT_LIST_H_ diff --git a/src/ui/layout/FUi_LayoutLayoutListNode.cpp b/src/ui/layout/FUi_LayoutLayoutListNode.cpp new file mode 100644 index 0000000..af659e1 --- /dev/null +++ b/src/ui/layout/FUi_LayoutLayoutListNode.cpp @@ -0,0 +1,50 @@ +// +// 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_LayoutLayoutListNode.cpp + * @brief This is the implementation file for LayoutListNode class. + * + * This file contains the implementation of LayoutListNode class. + */ + +#include "FUi_LayoutLayoutListNode.h" + +namespace Tizen { namespace Ui { namespace _Layout +{ + +LayoutListNode::LayoutListNode() + : __pLayout(null) +{ +} + +LayoutListNode::~LayoutListNode() +{ +} + +void +LayoutListNode::Create(Layout& pLayout) +{ + __pLayout = &pLayout; +} + +Layout* +LayoutListNode::GetLayout() const +{ + return __pLayout; +} + +}}} // Tizen::Ui::_Layout diff --git a/src/ui/layout/FUi_LayoutLayoutListNode.h b/src/ui/layout/FUi_LayoutLayoutListNode.h new file mode 100644 index 0000000..ac4d02c --- /dev/null +++ b/src/ui/layout/FUi_LayoutLayoutListNode.h @@ -0,0 +1,61 @@ +// +// 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_LayoutLayoutListNode.h + * @brief This is the header file for LayoutListNode class. + * + * This header file contains the declaration of LayoutListNode class. + */ + +#pragma once + +#ifndef _FUI_INTERNAL_LAYOUT_LAYOUT_LIST_NODE_H_ +#define _FUI_INTERNAL_LAYOUT_LAYOUT_LIST_NODE_H_ + +#include "FUi_LayoutLinkedListNode.h" + +namespace Tizen { namespace Ui { namespace _Layout +{ + +class Layout; + +class LayoutListNode + : public LinkedListNode +{ +public: + Layout* GetLayout(void) const; + +protected: + LayoutListNode(void); + virtual ~LayoutListNode(void); + + void Create(Layout& pData); + +private: + LayoutListNode(const LayoutListNode&); + LayoutListNode& operator =(const LayoutListNode&); + +// property +private: + Layout* __pLayout; + + friend class LayoutList; +}; // LayoutListNode + +}}} //Tizen::Ui::_Layout + +#endif // _FUI_INTERNAL_LAYOUT_LAYOUT_LIST_NODE_H_ diff --git a/src/ui/layout/FUi_LayoutLayoutMaker.cpp b/src/ui/layout/FUi_LayoutLayoutMaker.cpp new file mode 100644 index 0000000..e248efa --- /dev/null +++ b/src/ui/layout/FUi_LayoutLayoutMaker.cpp @@ -0,0 +1,1524 @@ +// +// 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_LayoutLayoutMaker.cpp + * @brief This is the implementation file for _LayoutMaker class. + * + * This file contains the implementation of _LayoutMaker class. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "FUi_UiBuilderControlMaker.h" +#include "FUi_UiBuilder.h" +#include "FUi_CoordinateSystemUtils.h" + +using namespace Tizen::Base; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; +using namespace Tizen::App; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui +{ +_LayoutMaker::_LayoutMaker(_UiBuilder* pUibuilder) + : __pUiBuilder(null) +{ + __pUiBuilder = pUibuilder; +} + +_LayoutMaker::~_LayoutMaker(void) +{ +} + +bool +_LayoutMaker::GetLayoutType(_UiBuilderControlLayout* pControlProperty, _UiBuilderLayoutType& returnType) const +{ + if (pControlProperty == null) + { + return false; + } + + Tizen::Base::String layoutType(L""); + + if (pControlProperty->GetLayoutElement( L"type", layoutType)) + { + + if (layoutType.Equals(L"NONE", false)) + { + returnType = UIBUILDER_LAYOUT_NONE; + } + else if (layoutType.Equals(L"LAYOUT_GRID", false)) + { + returnType = UIBUILDER_LAYOUT_GRID; + } + else if (layoutType.Equals(L"LAYOUT_HORIZONTAL_BOX", false)) + { + returnType = UIBUILDER_LAYOUT_HORIZONTAL_BOX; + } + else if (layoutType.Equals(L"LAYOUT_VERTICAL_BOX", false)) + { + returnType = UIBUILDER_LAYOUT_VERTICAL_BOX; + } + else if (layoutType.Equals(L"LAYOUT_RELATIVE", false)) + { + returnType = UIBUILDER_LAYOUT_RELATIVE; + } + else if (layoutType.Equals(L"LAYOUT_CARD", false)) + { + returnType = UIBUILDER_LAYOUT_CARD; + } + else + { + returnType = UIBUILDER_LAYOUT_NONE; + return false; + } + } + else + { + returnType = UIBUILDER_LAYOUT_NONE; + } + + return true; +} + +bool +_LayoutMaker::GetParentLayoutType(_UiBuilderControlLayout* pControlProperty, _UiBuilderLayoutType& returnType) const +{ + if (pControlProperty == null) + { + return false; + } + Tizen::Base::String parentLayoutType(L""); + + if (pControlProperty->GetLayoutElement(L"parentType", parentLayoutType)) + { + if (parentLayoutType.Equals(L"NONE", false)) + { + returnType = UIBUILDER_LAYOUT_NONE; + } + else if (parentLayoutType.Equals(L"LAYOUT_GRID", false)) + { + returnType = UIBUILDER_LAYOUT_GRID; + } + else if (parentLayoutType.Equals(L"LAYOUT_HORIZONTAL_BOX", false)) + { + returnType = UIBUILDER_LAYOUT_HORIZONTAL_BOX; + } + else if (parentLayoutType.Equals(L"LAYOUT_VERTICAL_BOX", false)) + { + returnType = UIBUILDER_LAYOUT_VERTICAL_BOX; + } + else if (parentLayoutType.Equals(L"LAYOUT_RELATIVE", false)) + { + returnType = UIBUILDER_LAYOUT_RELATIVE; + } + else if (parentLayoutType.Equals(L"LAYOUT_CARD", false)) + { + returnType = UIBUILDER_LAYOUT_CARD; + } + else + { + returnType = UIBUILDER_LAYOUT_NONE; + return false; + } + } + else + { + returnType = UIBUILDER_LAYOUT_NONE; + } + return true; +} + +result +_LayoutMaker::GetGridLayoutN(_UiBuilderControlLayout* pControlProperty, Layout*& pLayout) const +{ + if (pControlProperty == null) + { + return E_SYSTEM; + } + + result r = E_SUCCESS; + Tizen::Base::String gridLayoutValue(L""); + GridLayout* pGridLayout = null; + int maxColumn = 0; + int maxRow = 0; + + pGridLayout = new (std::nothrow) GridLayout; + SysTryCatch(NID_UI, pGridLayout != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + + if (pControlProperty->GetLayoutElement(L"maxColumn", gridLayoutValue)) + { + Integer::Parse(gridLayoutValue, maxColumn); + } + + if (pControlProperty->GetLayoutElement(L"maxRow", gridLayoutValue)) + { + Integer::Parse(gridLayoutValue, maxRow); + } + + r = pGridLayout->Construct(maxRow, maxColumn); + if (r != E_SUCCESS) + { + SysLog(NID_UI, "[%s] Propagated.", GetErrorMessage(r)); + delete pGridLayout; + pGridLayout = null; + } + +CATCH: + pLayout = pGridLayout; + + return r; +} + +result +_LayoutMaker::GetHorizontalBoxLayoutN(_UiBuilderControlLayout* pControlProperty, Layout*& pLayout) const +{ + if (pControlProperty == null) + { + return E_SYSTEM; + } + result r = E_SUCCESS; + + Tizen::Base::String horizontalBoxLayoutValue(L""); + + HorizontalBoxLayout* pHboxLayout = null; + HorizontalDirection direction; + + pHboxLayout = new (std::nothrow) HorizontalBoxLayout; + SysTryCatch(NID_UI, pHboxLayout != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + + if (pControlProperty->GetLayoutElement(L"horizontalDirection", horizontalBoxLayoutValue)) + { + if (horizontalBoxLayoutValue.Equals(L"HORIZONTAL_DIRECTION_LEFTWARD", false)) + { + direction = HORIZONTAL_DIRECTION_LEFTWARD; + } + else + { + direction = HORIZONTAL_DIRECTION_RIGHTWARD; + } + } + else + { + direction = HORIZONTAL_DIRECTION_RIGHTWARD; + } + + r = pHboxLayout->Construct(direction); + if (r != E_SUCCESS) + { + SysLog(NID_UI, "[%s] Propagated.", GetErrorMessage(r)); + delete pHboxLayout; + pHboxLayout = null; + } + +CATCH: + pLayout = pHboxLayout; + + return r; +} + +result +_LayoutMaker::GetVerticalBoxLayoutN(_UiBuilderControlLayout* pControlProperty, Layout*& pLayout) const +{ + if (pControlProperty == null) + { + return E_SYSTEM; + } + result r = E_SUCCESS; + +Tizen::Base::String verticalBoxLayoutValue(L""); + + VerticalBoxLayout* pVboxLayout = null; + VerticalDirection direction; + + pVboxLayout = new (std::nothrow) VerticalBoxLayout; + SysTryCatch(NID_UI, pVboxLayout != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + + if (pControlProperty->GetLayoutElement(L"verticalDirection", verticalBoxLayoutValue)) + { + if (verticalBoxLayoutValue.Equals(L"VERTICAL_DIRECTION_UPWARD", false)) + { + direction = VERTICAL_DIRECTION_UPWARD; + } + else + { + direction = VERTICAL_DIRECTION_DOWNWARD; + } + } + else + { + direction = VERTICAL_DIRECTION_DOWNWARD; + } + + r = pVboxLayout->Construct(direction); + if (r != E_SUCCESS) + { + SysLog(NID_UI, "[%s] Propagated.", GetErrorMessage(r)); + delete pVboxLayout; + pVboxLayout = null; + } + +CATCH: + pLayout = pVboxLayout; + + return r; +} + +result +_LayoutMaker::GetRelativeLayoutN(_UiBuilderControlLayout* pControlProperty, Layout*& pLayout) const +{ + if (pControlProperty == null) + { + return E_SYSTEM; + } + result r = E_SUCCESS; + + RelativeLayout* pRelLayout = null; + + pRelLayout = new (std::nothrow) RelativeLayout; + SysTryCatch(NID_UI, pRelLayout != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + + r = pRelLayout->Construct(); + if (r != E_SUCCESS) + { + SysLog(NID_UI, "[%s] Propagated.", GetErrorMessage(r)); + delete pRelLayout; + pRelLayout = null; + } +CATCH: + pLayout = pRelLayout; + + return r; +} + +result +_LayoutMaker::GetCardLayoutN(_UiBuilderControlLayout* pControlProperty, Layout*& pLayout) const +{ + if (pControlProperty == null) + { + return E_SYSTEM; + } + result r = E_SUCCESS; + + CardLayout* pCardLayout = null; + + pCardLayout = new (std::nothrow) CardLayout; + SysTryCatch(NID_UI, pCardLayout != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + + r = pCardLayout->Construct(); + if (r != E_SUCCESS) + { + SysLog(NID_UI, "[%s] Propagated.", GetErrorMessage(r)); + delete pCardLayout; + pCardLayout = null; + } +CATCH: + pLayout = pCardLayout; + + return r; +} + +result +_LayoutMaker::GetLayoutN(_UiBuilderControl* pUiBuilderControl, Layout*& pPortraitLayout, Layout*& pLandscapeLayout) const +{ + result r = E_SUCCESS; + + _UiBuilderControlLayout* pControlProperty = null; + + Layout* pLayout = null; + Layout* pLayoutPortrait = null; + Layout* pLayoutLandscape = null; + + for (int i = 0; i < UIBUILDER_ATTRIBUTE_NUM; i++) + { + _UiBuilderLayoutType layoutType = UIBUILDER_LAYOUT_NONE; + pControlProperty = pUiBuilderControl->GetAttribute(i); + if (pControlProperty == null) + { + SysLog(NID_UI, "Unable to set layout property"); + return E_SYSTEM; + } + if (GetLayoutType(pControlProperty, layoutType) == false) + { + return E_SYSTEM; + } + + switch (layoutType) + { + case UIBUILDER_LAYOUT_GRID: + r = GetGridLayoutN(pControlProperty, pLayout); + break; + + case UIBUILDER_LAYOUT_HORIZONTAL_BOX: + r = GetHorizontalBoxLayoutN(pControlProperty, pLayout); + break; + + case UIBUILDER_LAYOUT_VERTICAL_BOX: + r = GetVerticalBoxLayoutN(pControlProperty, pLayout); + break; + + case UIBUILDER_LAYOUT_RELATIVE: + r = GetRelativeLayoutN(pControlProperty, pLayout); + break; + case UIBUILDER_LAYOUT_CARD: + r = GetCardLayoutN(pControlProperty, pLayout); + break; + + default: + SysLog(NID_UI, "Unknown Layout type = %d", layoutType); + break; + } + if (r != E_SUCCESS) + { + SysLog(NID_UI, "[%s] Propagated.", GetErrorMessage(r)); + return r; + } + if (UIBUILDER_ATTRIBUTE_PORTRAIT == i) + { + pLayoutPortrait = pLayout; + } + else if (UIBUILDER_ATTRIBUTE_LANDSCAPE == i) + { + pLayoutLandscape = pLayout; + } + } + if ((pLayoutPortrait == null) && (pLayoutLandscape != null)) + { + pLayoutPortrait = pLayoutLandscape; + } + else if ((pLayoutPortrait != null) && (pLayoutLandscape == null)) + { + pLayoutLandscape = pLayoutPortrait; + } + + pPortraitLayout = pLayoutPortrait; + pLandscapeLayout = pLayoutLandscape; + + return r; +} + +result +_LayoutMaker::SetGridLayoutContainerProperty(GridLayout* pLayout, _UiBuilderControlLayout* pControlProperty) const +{ + result r = E_SUCCESS; + + if ((null == pLayout) || (null == pControlProperty)) + { + return E_SYSTEM; + } + + GridLayout& layout = *pLayout; + UiBuilderGridLayoutContainer layoutParam; + Tizen::Base::String gridLayoutContainerPropertyValue(L""); + + layoutParam.maxColumn = 0; + layoutParam.maxRow = 0; + if (pControlProperty->GetLayoutElement(L"maxColumn", gridLayoutContainerPropertyValue)) + { + Integer::Parse(gridLayoutContainerPropertyValue, layoutParam.maxColumn); + } + + if (pControlProperty->GetLayoutElement(L"maxRow", gridLayoutContainerPropertyValue)) + { + Integer::Parse(gridLayoutContainerPropertyValue, layoutParam.maxRow); + } + + String headerColumn = "column"; + String headerRow = "row"; + String tempString; + + for (int i = 1; i <= layoutParam.maxColumn; i++) + { + tempString = headerColumn; + tempString.Append(i); + tempString.Append("Collapsed"); + + if (pControlProperty->GetLayoutElement(tempString, gridLayoutContainerPropertyValue)) + { + if (gridLayoutContainerPropertyValue.Equals(L"true", false)) + { + layoutParam.columnCollapsed = true; + } + else + { + layoutParam.columnCollapsed = false; + } + r = layout.SetColumnCollapsed(i - 1, layoutParam.columnCollapsed); + if (IsFailed(r)) + { + goto CATCH; + } + } + + tempString = headerColumn; + tempString.Append(i); + tempString.Append("Shrinkable"); + + if (pControlProperty->GetLayoutElement(tempString, gridLayoutContainerPropertyValue)) + { + if (gridLayoutContainerPropertyValue.Equals(L"true", false)) + { + layoutParam.columnShrinkable = true; + } + else + { + layoutParam.columnShrinkable = false; + } + r = layout.SetColumnShrinkable(i - 1, layoutParam.columnShrinkable); + if (IsFailed(r)) + { + goto CATCH; + } + } + + tempString = headerColumn; + tempString.Append(i); + tempString.Append("Stretchable"); + + if (pControlProperty->GetLayoutElement(tempString, gridLayoutContainerPropertyValue)) + { + if (gridLayoutContainerPropertyValue.Equals(L"true", false)) + { + layoutParam.columnStretchable = true; + } + else + { + layoutParam.columnStretchable = false; + } + r = layout.SetColumnStretchable(i - 1, layoutParam.columnStretchable); + if (IsFailed(r)) + { + goto CATCH; + } + } + + tempString = headerColumn; + tempString.Append(i); + tempString.Append("Spacing"); + + if (pControlProperty->GetLayoutElement(tempString, gridLayoutContainerPropertyValue)) + { + layoutParam.columnSpacing = _LocalizedNumParser::ToDouble(gridLayoutContainerPropertyValue, "C"); + r = layout.SetColumnSpacing(i - 1, layoutParam.columnSpacing); + if (IsFailed(r)) + { + goto CATCH; + } + } + + } + for (int i = 1; i <= layoutParam.maxRow; i++) + { + + tempString = headerRow; + tempString.Append(i); + tempString.Append("Collapsed"); + + if (pControlProperty->GetLayoutElement(tempString, gridLayoutContainerPropertyValue)) + { + if (gridLayoutContainerPropertyValue.Equals(L"true", false)) + { + layoutParam.rowCollapsed = true; + } + else + { + layoutParam.rowCollapsed = false; + } + r = layout.SetRowCollapsed(i - 1, layoutParam.rowCollapsed); + if (IsFailed(r)) + { + goto CATCH; + } + } + + tempString = headerRow; + tempString.Append(i); + tempString.Append("Shrinkable"); + + if (pControlProperty->GetLayoutElement(tempString, gridLayoutContainerPropertyValue)) + { + if (gridLayoutContainerPropertyValue.Equals(L"true", false)) + { + layoutParam.rowShrinkable = true; + } + else + { + layoutParam.rowShrinkable = false; + } + r = layout.SetRowShrinkable(i - 1, layoutParam.rowShrinkable); + if (IsFailed(r)) + { + goto CATCH; + } + } + + tempString = headerRow; + tempString.Append(i); + tempString.Append("Stretchable"); + + if (pControlProperty->GetLayoutElement(tempString, gridLayoutContainerPropertyValue)) + { + if (gridLayoutContainerPropertyValue.Equals(L"true", false)) + { + layoutParam.rowStretchable = true; + } + else + { + layoutParam.rowStretchable = false; + } + r = layout.SetRowStretchable(i - 1, layoutParam.rowStretchable); + if (IsFailed(r)) + { + goto CATCH; + } + } + + tempString = headerRow; + tempString.Append(i); + tempString.Append("Spacing"); + + if (pControlProperty->GetLayoutElement(tempString, gridLayoutContainerPropertyValue)) + { + layoutParam.rowSpacing = _LocalizedNumParser::ToDouble(gridLayoutContainerPropertyValue, "C"); + r = layout.SetRowSpacing(i - 1, layoutParam.rowSpacing); + if (IsFailed(r)) + { + goto CATCH; + } + } + + } +CATCH: + + return r; +} + +void +_LayoutMaker::SetGridLayoutControlProperty(GridLayout* pLayout, _UiBuilderControlLayout* pControlProperty, Control* pControl) +{ + if ((null == pLayout) || (null == pControlProperty) || (null == pControlProperty) || (null == pControl)) + { + return ; + } + + GridLayout& layout = *pLayout; + Control& control = *pControl; + UiBuilderGridLayoutControl layoutParam; + Tizen::Base::String gridLayoutValue(L""); + bool alignmentSet = false; + + if (pControlProperty->GetLayoutElement(L"horizontalAlignment", gridLayoutValue)) + { + alignmentSet = true; + if (gridLayoutValue.Equals(L"LAYOUT_HORIZONTAL_ALIGN_CENTER", false)) + { + layoutParam.horizontalAlignment = LAYOUT_HORIZONTAL_ALIGN_CENTER; + } + else if (gridLayoutValue.Equals(L"LAYOUT_HORIZONTAL_ALIGN_RIGHT", false)) + { + layoutParam.horizontalAlignment = LAYOUT_HORIZONTAL_ALIGN_RIGHT; + } + else + { + layoutParam.horizontalAlignment = LAYOUT_HORIZONTAL_ALIGN_LEFT; + } + } + else + { + layoutParam.horizontalAlignment = LAYOUT_HORIZONTAL_ALIGN_LEFT; + } + + if (pControlProperty->GetLayoutElement(L"verticalAlignment", gridLayoutValue)) + { + alignmentSet = true; + if (gridLayoutValue.Equals(L"LAYOUT_VERTICAL_ALIGN_MIDDLE", false)) + { + layoutParam.verticalAlignment = LAYOUT_VERTICAL_ALIGN_MIDDLE; + } + else if (gridLayoutValue.Equals(L"LAYOUT_VERTICAL_ALIGN_BOTTOM", false)) + { + layoutParam.verticalAlignment = LAYOUT_VERTICAL_ALIGN_BOTTOM; + } + else + { + layoutParam.verticalAlignment = LAYOUT_VERTICAL_ALIGN_TOP; + } + } + else + { + layoutParam.verticalAlignment = LAYOUT_VERTICAL_ALIGN_TOP; + } + if (alignmentSet) + { + layout.SetAlignment(control, layoutParam.horizontalAlignment, layoutParam.verticalAlignment); + } + + _ICoordinateSystemTransformer* pTransform = GetTransformer(); + bool marginSet = false; + layoutParam.marginLeft = 0.0f; + layoutParam.marginRight = 0.0f; + layoutParam.marginTop = 0.0f; + layoutParam.marginBottom = 0.0f; + if (pControlProperty->GetLayoutElement(L"marginLeft", gridLayoutValue)) + { + marginSet = true; + layoutParam.marginLeft = _LocalizedNumParser::ToDouble(gridLayoutValue, "C"); + + if (pTransform) + { + + layoutParam.marginLeft = pTransform->Transform(layoutParam.marginLeft); + } + } + if (pControlProperty->GetLayoutElement(L"marginRight", gridLayoutValue)) + { + marginSet = true; + layoutParam.marginRight = _LocalizedNumParser::ToDouble(gridLayoutValue, "C"); + if (pTransform) + { + + layoutParam.marginRight = pTransform->Transform(layoutParam.marginRight); + } + } + if (pControlProperty->GetLayoutElement(L"marginTop", gridLayoutValue)) + { + marginSet = true; + layoutParam.marginTop = _LocalizedNumParser::ToDouble(gridLayoutValue, "C"); + if (pTransform) + { + + layoutParam.marginTop = pTransform->Transform(layoutParam.marginTop); + } + } + if (pControlProperty->GetLayoutElement(L"marginBottom", gridLayoutValue)) + { + marginSet = true; + layoutParam.marginBottom = _LocalizedNumParser::ToDouble(gridLayoutValue, "C"); + if (pTransform) + { + + layoutParam.marginBottom = pTransform->Transform(layoutParam.marginBottom); + } + } + if (marginSet) + { + layout.SetMargin(control, layoutParam.marginLeft, layoutParam.marginRight, layoutParam.marginTop, layoutParam.marginBottom); + } + + bool positionSet = false; + layoutParam.positionRow = 0; + layoutParam.positionColumn = 0; + layoutParam.positionRowSpan = 0; + layoutParam.positionColumnSpan = 0; + if (pControlProperty->GetLayoutElement(L"positionRow", gridLayoutValue)) + { + positionSet = true; + Integer::Parse(gridLayoutValue, layoutParam.positionRow); + } + if (pControlProperty->GetLayoutElement(L"positionColumn", gridLayoutValue)) + { + positionSet = true; + Integer::Parse(gridLayoutValue, layoutParam.positionColumn); + } + if (pControlProperty->GetLayoutElement(L"positionRowSpan", gridLayoutValue)) + { + positionSet = true; + Integer::Parse(gridLayoutValue, layoutParam.positionRowSpan); + } + if (pControlProperty->GetLayoutElement(L"positionColumnSpan", gridLayoutValue)) + { + positionSet = true; + Integer::Parse(gridLayoutValue, layoutParam.positionColumnSpan); + } + if (positionSet) + { + layout.SetPosition(control, layoutParam.positionRow, layoutParam.positionColumn, layoutParam.positionRowSpan, layoutParam.positionColumnSpan); + } +} + +void +_LayoutMaker::SetHorizontalBoxLayoutProperty(HorizontalBoxLayout* pLayout, _UiBuilderControlLayout* pControlProperty, Control* pControl) +{ + if ((null == pLayout) || (null == pControlProperty) || (null == pControlProperty) || (null == pControl)) + { + return ; + } + + HorizontalBoxLayout& layout = *pLayout; + Control& control = *pControl; + UiBuilderHorizontalBoxLayoutControl layoutParam; + Tizen::Base::String horizontalBoxLayoutValue(L""); + _ICoordinateSystemTransformer* pTransform = GetTransformer(); + + if (pControlProperty->GetLayoutElement(L"height", horizontalBoxLayoutValue)) + { + layoutParam.height = _LocalizedNumParser::ToDouble(horizontalBoxLayoutValue, "C"); + if (pTransform) + { + + layoutParam.height = pTransform->Transform(layoutParam.height); + } + layout.SetHeight(control, layoutParam.height); + } + else + { + layoutParam.height = 0.0f; + } + + if (pControlProperty->GetLayoutElement(L"verticalFitPolicy", horizontalBoxLayoutValue)) + { + if (horizontalBoxLayoutValue.Equals(L"FIT_POLICY_CONTENT", false)) + { + layoutParam.verticalFitPolicy = FIT_POLICY_CONTENT; + } + else if (horizontalBoxLayoutValue.Equals(L"FIT_POLICY_PARENT", false)) + { + layoutParam.verticalFitPolicy = FIT_POLICY_PARENT; + } + else + { + layoutParam.verticalFitPolicy = FIT_POLICY_FIXED; + } + layout.SetVerticalFitPolicy(control, layoutParam.verticalFitPolicy); + } + else + { + layoutParam.verticalFitPolicy = FIT_POLICY_CONTENT; + } + + if (pControlProperty->GetLayoutElement(L"verticalAlignment", horizontalBoxLayoutValue)) + { + if (horizontalBoxLayoutValue.Equals(L"LAYOUT_VERTICAL_ALIGN_MIDDLE", false)) + { + layoutParam.verticalAlignment = LAYOUT_VERTICAL_ALIGN_MIDDLE; + } + else if (horizontalBoxLayoutValue.Equals(L"LAYOUT_VERTICAL_ALIGN_BOTTOM", false)) + { + layoutParam.verticalAlignment = LAYOUT_VERTICAL_ALIGN_BOTTOM; + } + else + { + layoutParam.verticalAlignment = LAYOUT_VERTICAL_ALIGN_TOP; + } + + layout.SetVerticalAlignment(control, layoutParam.verticalAlignment); + } + else + { + layoutParam.verticalAlignment = LAYOUT_VERTICAL_ALIGN_TOP; + } + + bool marginSet = false; + layoutParam.verticalTopMargin = 0.0f; + layoutParam.verticalBottomMargin = 0.0f; + if (pControlProperty->GetLayoutElement(L"verticalTopMargin", horizontalBoxLayoutValue)) + { + marginSet = true; + layoutParam.verticalTopMargin = _LocalizedNumParser::ToDouble(horizontalBoxLayoutValue, "C"); + if (pTransform) + { + + layoutParam.verticalTopMargin = pTransform->Transform(layoutParam.verticalTopMargin); + } + } + if (pControlProperty->GetLayoutElement(L"verticalBottomMargin", horizontalBoxLayoutValue)) + { + marginSet = true; + layoutParam.verticalBottomMargin = _LocalizedNumParser::ToDouble(horizontalBoxLayoutValue, "C"); + if (pTransform) + { + + layoutParam.verticalBottomMargin = pTransform->Transform(layoutParam.verticalBottomMargin); + } + } + if (marginSet) + { + layout.SetVerticalMargin(control, layoutParam.verticalTopMargin, layoutParam.verticalBottomMargin); + } + + if (pControlProperty->GetLayoutElement(L"spacing", horizontalBoxLayoutValue)) + { + layoutParam.spacing = _LocalizedNumParser::ToDouble(horizontalBoxLayoutValue, "C"); + if (pTransform) + { + + layoutParam.spacing = pTransform->Transform(layoutParam.spacing); + } + layout.SetSpacing(control, layoutParam.spacing); + } + else + { + layoutParam.spacing = 0.0f; + } + + if (pControlProperty->GetLayoutElement(L"weight", horizontalBoxLayoutValue)) + { + layoutParam.weight = _LocalizedNumParser::ToDouble(horizontalBoxLayoutValue, "C"); + layout.SetWeight(control, layoutParam.weight); + } + else + { + layoutParam.weight = 0.0f; + } + + if (pControlProperty->GetLayoutElement(L"width", horizontalBoxLayoutValue)) + { + layoutParam.width = _LocalizedNumParser::ToDouble(horizontalBoxLayoutValue, "C"); + if (pTransform) + { + + layoutParam.width = pTransform->Transform(layoutParam.width); + } + layout.SetWidth(control, layoutParam.width); + } + else + { + layoutParam.width = 0.0f; + } + + if (pControlProperty->GetLayoutElement(L"horizontalFitPolicy", horizontalBoxLayoutValue)) + { + if (horizontalBoxLayoutValue.Equals(L"FIT_POLICY_CONTENT", false)) + { + layoutParam.horizontalFitPolicy = FIT_POLICY_CONTENT; + } + else if (horizontalBoxLayoutValue.Equals(L"FIT_POLICY_PARENT", false)) + { + layoutParam.horizontalFitPolicy = FIT_POLICY_PARENT; + } + else + { + layoutParam.horizontalFitPolicy = FIT_POLICY_FIXED; + } + layout.SetHorizontalFitPolicy(control, layoutParam.horizontalFitPolicy); + } + else + { + layoutParam.horizontalFitPolicy = FIT_POLICY_CONTENT; + } +} + +void +_LayoutMaker::SetVerticalBoxLayoutProperty(VerticalBoxLayout* pLayout, _UiBuilderControlLayout* pControlProperty, Control* pControl) +{ + if ((null == pLayout) || (null == pControlProperty) || (null == pControlProperty) || (null == pControl)) + { + return ; + } + + VerticalBoxLayout& layout = *pLayout; + Control& control = *pControl; + UiBuilderVerticalBoxLayoutControl layoutParam; + Tizen::Base::String verticalBoxLayoutValue(L""); + _ICoordinateSystemTransformer* pTransform = GetTransformer(); + + if (pControlProperty->GetLayoutElement(L"height", verticalBoxLayoutValue)) + { + layoutParam.height = _LocalizedNumParser::ToDouble(verticalBoxLayoutValue, "C"); + if (pTransform) + { + + layoutParam.height = pTransform->Transform(layoutParam.height); + } + layout.SetHeight(control, layoutParam.height); + } + else + { + layoutParam.height = 0.0f; + } + + if (pControlProperty->GetLayoutElement(L"verticalFitPolicy", verticalBoxLayoutValue)) + { + if (verticalBoxLayoutValue.Equals(L"FIT_POLICY_CONTENT", false)) + { + layoutParam.verticalFitPolicy = FIT_POLICY_CONTENT; + } + else if (verticalBoxLayoutValue.Equals(L"FIT_POLICY_PARENT", false)) + { + layoutParam.verticalFitPolicy = FIT_POLICY_PARENT; + } + else + { + layoutParam.verticalFitPolicy = FIT_POLICY_FIXED; + } + layout.SetVerticalFitPolicy(control, layoutParam.verticalFitPolicy); + } + else + { + layoutParam.verticalFitPolicy = FIT_POLICY_CONTENT; + } + + if (pControlProperty->GetLayoutElement(L"horizontalAlignment", verticalBoxLayoutValue)) + { + if (verticalBoxLayoutValue.Equals(L"LAYOUT_HORIZONTAL_ALIGN_CENTER", false)) + { + layoutParam.horizontalAlignment = LAYOUT_HORIZONTAL_ALIGN_CENTER; + } + else if (verticalBoxLayoutValue.Equals(L"LAYOUT_HORIZONTAL_ALIGN_RIGHT", false)) + { + layoutParam.horizontalAlignment = LAYOUT_HORIZONTAL_ALIGN_RIGHT; + } + else + { + layoutParam.horizontalAlignment = LAYOUT_HORIZONTAL_ALIGN_LEFT; + } + + layout.SetHorizontalAlignment(control, layoutParam.horizontalAlignment); + } + else + { + layoutParam.horizontalAlignment = LAYOUT_HORIZONTAL_ALIGN_LEFT; + } + + bool marginSet = false; + layoutParam.horizontalLeftMargin = 0.0f; + layoutParam.horizontalRightMargin = 0.0f; + if (pControlProperty->GetLayoutElement(L"horizontalLeftMargin", verticalBoxLayoutValue)) + { + marginSet = true; + layoutParam.horizontalLeftMargin = _LocalizedNumParser::ToDouble(verticalBoxLayoutValue, "C"); + if (pTransform) + { + layoutParam.horizontalLeftMargin = pTransform->Transform(layoutParam.horizontalLeftMargin); + } + } + if (pControlProperty->GetLayoutElement(L"horizontalRightMargin", verticalBoxLayoutValue)) + { + marginSet = true; + layoutParam.horizontalRightMargin = _LocalizedNumParser::ToDouble(verticalBoxLayoutValue, "C"); + if (pTransform) + { + layoutParam.horizontalRightMargin = pTransform->Transform(layoutParam.horizontalRightMargin); + } + } + if (marginSet) + { + layout.SetHorizontalMargin(control, layoutParam.horizontalLeftMargin, layoutParam.horizontalRightMargin); + } + + if (pControlProperty->GetLayoutElement(L"spacing", verticalBoxLayoutValue)) + { + layoutParam.spacing = _LocalizedNumParser::ToDouble(verticalBoxLayoutValue, "C"); + if (pTransform) + { + layoutParam.spacing = pTransform->Transform(layoutParam.spacing); + + } + layout.SetSpacing(control, layoutParam.spacing); + } + else + { + layoutParam.spacing = 0.0f; + } + + if (pControlProperty->GetLayoutElement(L"weight", verticalBoxLayoutValue)) + { + layoutParam.weight = _LocalizedNumParser::ToDouble(verticalBoxLayoutValue, "C"); + layout.SetWeight(control, layoutParam.weight); + } + else + { + layoutParam.weight = 0.0f; + } + + if (pControlProperty->GetLayoutElement(L"width", verticalBoxLayoutValue)) + { + layoutParam.width = _LocalizedNumParser::ToDouble(verticalBoxLayoutValue, "C"); + if (pTransform) + { + layoutParam.width = pTransform->Transform(layoutParam.width); + + } + layout.SetWidth(control, layoutParam.width); + } + else + { + layoutParam.width = 0.0f; + } + + if (pControlProperty->GetLayoutElement(L"horizontalFitPolicy", verticalBoxLayoutValue)) + { + if (verticalBoxLayoutValue.Equals(L"FIT_POLICY_CONTENT", false)) + { + layoutParam.horizontalFitPolicy = FIT_POLICY_CONTENT; + } + else if (verticalBoxLayoutValue.Equals(L"FIT_POLICY_PARENT", false)) + { + layoutParam.horizontalFitPolicy = FIT_POLICY_PARENT; + } + else + { + layoutParam.horizontalFitPolicy = FIT_POLICY_FIXED; + } + + layout.SetHorizontalFitPolicy(control, layoutParam.horizontalFitPolicy); + } + else + { + layoutParam.horizontalFitPolicy = FIT_POLICY_FIXED; + } +} + +void +_LayoutMaker::SetRelativeLayoutProperty(RelativeLayout* pLayout, _UiBuilderControlLayout* pControlProperty, Control* pControl) +{ + if ((null == pLayout) || (null == pControlProperty) || (null == pControlProperty) || (null == pControl)) + { + return; + } + + RelativeLayout& layout = *pLayout; + Control& control = *pControl; + UiBuilderRelativeLayout layoutParam; + Tizen::Base::String relativeLayoutValue(L""); + Tizen::Graphics::FloatRectangle rect = pControlProperty->GetRectF(); + + if (pControlProperty->GetLayoutElement(L"bottomRelation", relativeLayoutValue)) + { + if (GetContainer()->GetName().Equals(relativeLayoutValue)) + { + layoutParam.pBottomRelation = GetContainer(); + } + else + { + layoutParam.pBottomRelation = GetContainer()->GetControl(relativeLayoutValue, true); + } + } + else + { + layoutParam.pBottomRelation = null; + } + + if (layoutParam.pBottomRelation) + { + if (pControlProperty->GetLayoutElement(L"bottomRelationType", relativeLayoutValue)) + { + if (relativeLayoutValue.Equals(L"RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM", false)) + { + layoutParam.bottomRelationType = RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM; + } + else + { + layoutParam.bottomRelationType = RECT_EDGE_RELATION_BOTTOM_TO_TOP; + } + layout.SetRelation(control, *(layoutParam.pBottomRelation), layoutParam.bottomRelationType); + } + else + { + layoutParam.bottomRelationType = RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM; + } + } + + if (pControlProperty->GetLayoutElement(L"leftRelation", relativeLayoutValue)) + { + if (GetContainer()->GetName().Equals(relativeLayoutValue)) + { + layoutParam.pLeftRelation = GetContainer(); + } + else + { + layoutParam.pLeftRelation = GetContainer()->GetControl(relativeLayoutValue, true); + } + } + else + { + layoutParam.pLeftRelation = null; + } + + if (layoutParam.pLeftRelation) + { + if (pControlProperty->GetLayoutElement(L"leftRelationType", relativeLayoutValue)) + { + if (relativeLayoutValue.Equals(L"RECT_EDGE_RELATION_LEFT_TO_LEFT", false)) + { + layoutParam.leftRelationType = RECT_EDGE_RELATION_LEFT_TO_LEFT; + } + else + { + layoutParam.leftRelationType = RECT_EDGE_RELATION_LEFT_TO_RIGHT; + } + layout.SetRelation(control, *(layoutParam.pLeftRelation), layoutParam.leftRelationType); + } + else + { + layoutParam.leftRelationType = RECT_EDGE_RELATION_LEFT_TO_LEFT; + } + } + + if (pControlProperty->GetLayoutElement(L"rightRelation", relativeLayoutValue)) + { + if (GetContainer()->GetName().Equals(relativeLayoutValue)) + { + layoutParam.pRightRelation = GetContainer(); + } + else + { + layoutParam.pRightRelation = GetContainer()->GetControl(relativeLayoutValue, true); + } + } + else + { + layoutParam.pRightRelation = null; + } + + if (layoutParam.pRightRelation) + { + if (pControlProperty->GetLayoutElement(L"rightRelationType", relativeLayoutValue)) + { + if (relativeLayoutValue.Equals(L"RECT_EDGE_RELATION_RIGHT_TO_RIGHT", false)) + { + layoutParam.rightRelationType = RECT_EDGE_RELATION_RIGHT_TO_RIGHT; + } + else + { + layoutParam.rightRelationType = RECT_EDGE_RELATION_RIGHT_TO_LEFT; + } + layout.SetRelation(control, *(layoutParam.pRightRelation), layoutParam.rightRelationType); + } + else + { + layoutParam.rightRelationType = RECT_EDGE_RELATION_RIGHT_TO_RIGHT; + } + } + + if (pControlProperty->GetLayoutElement(L"topRelation", relativeLayoutValue)) + { + if (GetContainer()->GetName().Equals(relativeLayoutValue)) + { + layoutParam.pTopRelation = GetContainer(); + } + else + { + layoutParam.pTopRelation = GetContainer()->GetControl(relativeLayoutValue, true); + } + } + else + { + layoutParam.pTopRelation = null; + } + + if (layoutParam.pTopRelation) + { + if (pControlProperty->GetLayoutElement(L"topRelationType", relativeLayoutValue)) + { + if (relativeLayoutValue.Equals(L"RECT_EDGE_RELATION_TOP_TO_TOP", false)) + { + layoutParam.topRelationType = RECT_EDGE_RELATION_TOP_TO_TOP; + } + else + { + layoutParam.topRelationType = RECT_EDGE_RELATION_TOP_TO_BOTTOM; + } + layout.SetRelation(control, *(layoutParam.pTopRelation), layoutParam.topRelationType); + } + else + { + layoutParam.topRelationType = RECT_EDGE_RELATION_TOP_TO_TOP; + } + } + + if (pControlProperty->GetLayoutElement(L"centerHorizontal", relativeLayoutValue)) + { + if (relativeLayoutValue.Equals(L"true", false)) + { + layoutParam.centerHorizontal = true; + layout.SetCenterAligned(control, CENTER_ALIGN_HORIZONTAL); + } + else + { + layoutParam.centerHorizontal = false; + } + } + else + { + layoutParam.centerHorizontal = false; + } + + if (pControlProperty->GetLayoutElement(L"centerVertical", relativeLayoutValue)) + { + if (relativeLayoutValue.Equals(L"true", false)) + { + layoutParam.centerVertical = true; + layout.SetCenterAligned(control, CENTER_ALIGN_VERTICAL); + } + else + { + layoutParam.centerVertical = false; + } + } + else + { + layoutParam.centerVertical = false; + } + + + if (pControlProperty->GetLayoutElement(L"height", relativeLayoutValue)) + { + layoutParam.height = rect.height; + layout.SetHeight(control, layoutParam.height); + } + else + { + layoutParam.height = 0.0f; + } + + if (pControlProperty->GetLayoutElement(L"verticalFitPolicy", relativeLayoutValue)) + { + if (relativeLayoutValue.Equals(L"FIT_POLICY_CONTENT", false)) + { + layoutParam.verticalFitPolicy = FIT_POLICY_CONTENT; + } + else if (relativeLayoutValue.Equals(L"FIT_POLICY_PARENT", false)) + { + layoutParam.verticalFitPolicy = FIT_POLICY_PARENT; + } + else + { + layoutParam.verticalFitPolicy = FIT_POLICY_FIXED; + } + layout.SetVerticalFitPolicy(control, layoutParam.verticalFitPolicy); + } + else + { + layoutParam.verticalFitPolicy = FIT_POLICY_CONTENT; + } + + if (pControlProperty->GetLayoutElement(L"width", relativeLayoutValue)) + { + layoutParam.width = rect.width; + layout.SetWidth(control, layoutParam.width); + } + else + { + layoutParam.width = 0.0f; + } + + if (pControlProperty->GetLayoutElement(L"horizontalFitPolicy", relativeLayoutValue)) + { + if (relativeLayoutValue.Equals(L"FIT_POLICY_CONTENT", false)) + { + layoutParam.horizontalFitPolicy = FIT_POLICY_CONTENT; + } + else if (relativeLayoutValue.Equals(L"FIT_POLICY_PARENT", false)) + { + layoutParam.horizontalFitPolicy = FIT_POLICY_PARENT; + } + else + { + layoutParam.horizontalFitPolicy = FIT_POLICY_FIXED; + } + layout.SetHorizontalFitPolicy(control, layoutParam.horizontalFitPolicy); + } + else + { + layoutParam.horizontalFitPolicy = FIT_POLICY_CONTENT; + } + + bool marginSet = false; + layoutParam.marginLeft = 0.0f; + layoutParam.marginRight = 0.0f; + layoutParam.marginTop = 0.0f; + layoutParam.marginBottom = 0.0f; + + Tizen::Graphics::_ICoordinateSystemTransformer* pTransform = GetTransformer(); + + if (pControlProperty->GetLayoutElement(L"marginLeft", relativeLayoutValue)) + { + marginSet = true; + layoutParam.marginLeft = _LocalizedNumParser::ToDouble(relativeLayoutValue, "C"); + if (pTransform) + { + + layoutParam.marginLeft = pTransform->Transform(layoutParam.marginLeft); + } + } + if (pControlProperty->GetLayoutElement(L"marginRight", relativeLayoutValue)) + { + marginSet = true; + layoutParam.marginRight = _LocalizedNumParser::ToDouble(relativeLayoutValue, "C"); + if (pTransform) + { + + layoutParam.marginRight = pTransform->Transform(layoutParam.marginRight); + } + } + if (pControlProperty->GetLayoutElement(L"marginTop", relativeLayoutValue)) + { + marginSet = true; + layoutParam.marginTop = _LocalizedNumParser::ToDouble(relativeLayoutValue, "C"); + if (pTransform) + { + + layoutParam.marginTop = pTransform->Transform(layoutParam.marginTop); + } + } + if (pControlProperty->GetLayoutElement(L"marginBottom", relativeLayoutValue)) + { + marginSet = true; + layoutParam.marginBottom = _LocalizedNumParser::ToDouble(relativeLayoutValue, "C"); + if (pTransform) + { + + layoutParam.marginBottom = pTransform->Transform(layoutParam.marginBottom); + } + } + if (marginSet) + { + layout.SetMargin(control, layoutParam.marginLeft, layoutParam.marginRight, layoutParam.marginTop, layoutParam.marginBottom); + } +} + +result +_LayoutMaker::SetLayoutProperty(_UiBuilderControl* pUiBuilderControl, Control* pControl) +{ + int i = 0; + _UiBuilderControlLayout* pControlProperty = null; + + Container* pContainer = null; + if (GetContainer()->GetName().Equals(Tizen::Base::String(pUiBuilderControl->GetParentWin()))) + { + pContainer = static_cast(GetContainer()); + } + else + { + pContainer = dynamic_cast(static_cast(GetContainer())->GetControl(pUiBuilderControl->GetParentWin(), true)); + } + + result r = GetLastResult(); + SysTryReturn(NID_UI, pContainer != null, r, r, "[%s] Failed to get Container.", GetErrorMessage(r)); + + for (i = 0; i < UIBUILDER_ATTRIBUTE_NUM; i++) + { + _UiBuilderLayoutType layoutType = UIBUILDER_LAYOUT_NONE; + pControlProperty = pUiBuilderControl->GetAttribute(i); + GetParentLayoutType(pControlProperty, layoutType); + switch (layoutType) + { + case UIBUILDER_LAYOUT_NONE: + case UIBUILDER_LAYOUT_CARD: + break; + + case UIBUILDER_LAYOUT_GRID: + { + GridLayout* pLayout = null; + if (UIBUILDER_ATTRIBUTE_PORTRAIT == i) + { + pLayout = dynamic_cast(pContainer->GetPortraitLayoutN()); + } + else if (UIBUILDER_ATTRIBUTE_LANDSCAPE == i) + { + pLayout = dynamic_cast(pContainer->GetLandscapeLayoutN()); + } + + if (pLayout) + { + SetGridLayoutControlProperty(pLayout, pControlProperty, pControl); + delete pLayout; + } + break; + } + + case UIBUILDER_LAYOUT_HORIZONTAL_BOX: + { + HorizontalBoxLayout* pLayout = null; + if (UIBUILDER_ATTRIBUTE_PORTRAIT == i) + { + pLayout = dynamic_cast(pContainer->GetPortraitLayoutN()); + } + else if (UIBUILDER_ATTRIBUTE_LANDSCAPE == i) + { + pLayout = dynamic_cast(pContainer->GetLandscapeLayoutN()); + } + if (pLayout) + { + SetHorizontalBoxLayoutProperty(pLayout, pControlProperty, pControl); + delete pLayout; + } + break; + } + + case UIBUILDER_LAYOUT_VERTICAL_BOX: + { + VerticalBoxLayout* pLayout = null; + if (UIBUILDER_ATTRIBUTE_PORTRAIT == i) + { + pLayout = dynamic_cast(pContainer->GetPortraitLayoutN()); + } + else if (UIBUILDER_ATTRIBUTE_LANDSCAPE == i) + { + pLayout = dynamic_cast(pContainer->GetLandscapeLayoutN()); + } + if (pLayout) + { + SetVerticalBoxLayoutProperty(pLayout, pControlProperty, pControl); + delete pLayout; + } + break; + } + + case UIBUILDER_LAYOUT_RELATIVE: + { + RelativeLayout* pLayout = null; + if (UIBUILDER_ATTRIBUTE_PORTRAIT == i) + { + pLayout = dynamic_cast(pContainer->GetPortraitLayoutN()); + } + else if (UIBUILDER_ATTRIBUTE_LANDSCAPE == i) + { + pLayout = dynamic_cast(pContainer->GetLandscapeLayoutN()); + } + if (pLayout) + { + SetRelativeLayoutProperty(pLayout, pControlProperty, pControl); + delete pLayout; + } + break; + } + + default: + { + SysLog(NID_UI, "Unknown Layout type = %d", layoutType); + return E_INVALID_STATE; + } + } + } + return E_SUCCESS; +} + +Tizen::Ui::Container* +_LayoutMaker::GetContainer(void) const +{ + return __pUiBuilder->GetContainer(); +} + +Tizen::Graphics::_ICoordinateSystemTransformer* +_LayoutMaker::GetTransformer(void) const +{ + return __pUiBuilder->GetTransformer(); +} + +} } // Tizen::Ui diff --git a/src/ui/layout/FUi_LayoutLinearLayout.cpp b/src/ui/layout/FUi_LayoutLinearLayout.cpp new file mode 100644 index 0000000..2c37879 --- /dev/null +++ b/src/ui/layout/FUi_LayoutLinearLayout.cpp @@ -0,0 +1,1487 @@ +// +// 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_LayoutLinearLayout.cpp + * @brief This is the implementation file for LinearLayout class. + * + * This file contains the implementation of LinearLayout class. + */ + +#include +#include +#include +#include "FUi_Math.h" +#include "FUi_LayoutLinearLayout.h" +#include "FUi_LayoutLayoutItemProxy.h" +#include "FUi_LayoutProxyList.h" +#include "FUi_LayoutLayoutItemInfo.h" + +using namespace Tizen::Base::Utility; + +namespace Tizen { namespace Ui { namespace _Layout +{ + +LinearLayout::LinearLayout(void) + : __orientation(LINEAR_NONE_ORIENTATION) + , __direction(LINEAR_NONE_DIRECTION) + , __weightSum(0.0f) +{ + LinearProxyList* pLinearProxyList = new (std::nothrow) LinearProxyList(); + SysTryReturnVoidResult(NID_UI, pLinearProxyList, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SetItemList(pLinearProxyList); +} + +LinearLayout::~LinearLayout(void) +{ +} + +LinearLayout* +LinearLayout::CreateLinearLayoutN(void) +{ + LinearLayout* pLayout = new (std::nothrow) LinearLayout(); + SysTryReturn(NID_UI, pLayout != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Linear layout core allocation failure."); + if (GetLastResult() != E_SUCCESS) + { + delete pLayout; + return null; + } + + return pLayout; +} + +result +LinearLayout::Initialize(const LinearLayoutOrientation orientation, const LinearLayoutDirection direction) +{ + if (orientation == LINEAR_NONE_ORIENTATION || direction == LINEAR_NONE_DIRECTION) + { + return E_INVALID_ARG; + } + + __orientation = orientation; + + if (orientation == LINEAR_HORIZONTAL) + { + if (direction != LINEAR_LEFT_TO_RIGHT && direction != LINEAR_RIGHT_TO_LEFT) + { + return E_INVALID_ARG; + } + } + else + { + if (direction != LINEAR_TOP_TO_BOTTOM && direction != LINEAR_BOTTOM_TO_TOP) + { + return E_INVALID_ARG; + } + } + + __direction = direction; + + SetPartialUpdateFlag(true); + + return E_SUCCESS; +} + +result +LinearLayout::AddItemToIndex(LayoutItem& addItem, int index) +{ + result r = Layout::AddItem(addItem); + if (r != E_SUCCESS) + { + return r; + } + + return MoveItem(addItem, index); +} + +result +LinearLayout::MoveItem(LayoutItem& item, int index) +{ + ProxyList* pProxyList = GetProxyList(); + SysAssertf(pProxyList != null, "ProxyList is invalid."); + + if (index < 0 || pProxyList->GetNodeCount() <= index) + { + return E_INVALID_ARG; + } + + ProxyListNode* pItemNode = pProxyList->GetNode(item); + SysTryReturn(NID_UI, pItemNode != null, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Control dose not belong to layout."); + + int indexCount = -1; + int targetIndex = -1; + int itemIndex = -1; + ProxyListNode* pTargetNode = null; + ProxyListNode* pNode = pProxyList->GetFirstNode(); + while (pNode != null) + { + indexCount++; + if (indexCount == index) + { + targetIndex = indexCount; + pTargetNode = pNode; + } + if (pItemNode == pNode) + { + itemIndex = indexCount; + } + + pNode = pProxyList->GetNextNode(*pNode); + } + + if (targetIndex == -1 || itemIndex == -1) + { + return E_INVALID_STATE; + } + + if (targetIndex == itemIndex) + { + return E_SUCCESS; + } + + result r = pProxyList->DetachNode(*pItemNode); + if (r != E_SUCCESS) + { + return r; + } + + if (targetIndex < itemIndex) + { + r = pProxyList->InsertIntoLeft(*pTargetNode, *pItemNode); + pProxyList->RefreshIndex(); + + return r; + } + else + { + r = pProxyList->InsertIntoRight(*pTargetNode, *pItemNode); + pProxyList->RefreshIndex(); + + return r; + } +} + +result +LinearLayout::SwapItem(LayoutItem& targetItem, LayoutItem& destItem) +{ + result r = E_SUCCESS; + + ProxyList* pProxyList = GetProxyList(); + SysAssertf(pProxyList != null, "ProxyList is invalid."); + + ProxyListNode* pTargetNode = pProxyList->GetNode(targetItem); + SysTryReturn(NID_UI, pTargetNode != null, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Control dose not belong to layout."); + + ProxyListNode* pDestNode = pProxyList->GetNode(destItem); + SysTryReturn(NID_UI, pDestNode != null, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Control dose not belong to layout."); + + r = pProxyList->SwapNode(*pTargetNode, *pDestNode); + pProxyList->RefreshIndex(); + + SetUpdateState(true); + return r; +} + +int +LinearLayout::GetItemCount(void) const +{ + ProxyList* pProxyList = GetProxyList(); + SysAssertf(pProxyList != null, "ProxyList is invalid."); + + return pProxyList->GetNodeCount(); +} + +result +LinearLayout::GetItemIndex(LayoutItem& item, int& index) const +{ + ProxyList* pProxyList = GetProxyList(); + SysAssertf(pProxyList != null, "ProxyList is invalid."); + + ProxyListNode* pTargetNode = pProxyList->GetNode(item); + SysTryReturn(NID_UI, pTargetNode != null, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Control dose not belong to layout."); + + index = pProxyList->GetIndex(*pTargetNode); + + return E_SUCCESS; +} + +result +LinearLayout::SetOrientation(const LinearLayoutOrientation orientation) +{ + if (orientation == LINEAR_NONE_ORIENTATION) + { + return E_INVALID_ARG; + } + + if (__orientation != orientation) + { + if (orientation == LINEAR_HORIZONTAL) + { + __direction = LINEAR_LEFT_TO_RIGHT; + } + else + { + __direction = LINEAR_TOP_TO_BOTTOM; + } + } + + __orientation = orientation; + + SetUpdateState(true); + return E_SUCCESS; +} + +result +LinearLayout::GetOrientation(LinearLayoutOrientation& orientation) const +{ + if (__orientation == LINEAR_NONE_ORIENTATION) + { + return E_INVALID_STATE; + } + + orientation = __orientation; + + return E_SUCCESS; +} + +result +LinearLayout::SetDirection(const LinearLayoutDirection direction) +{ + if (direction == LINEAR_NONE_DIRECTION) + { + return E_INVALID_ARG; + } + + if (__orientation == LINEAR_HORIZONTAL && + (direction == LINEAR_TOP_TO_BOTTOM || direction == LINEAR_BOTTOM_TO_TOP)) + { + return E_INVALID_ARG; + } + + if (__orientation == LINEAR_VERTICAL && + (direction == LINEAR_LEFT_TO_RIGHT || direction == LINEAR_RIGHT_TO_LEFT)) + { + return E_INVALID_ARG; + } + + __direction = direction; + + SetUpdateState(true); + return E_SUCCESS; +} + +result +LinearLayout::GetDirection(LinearLayoutDirection& direction) const +{ + if (__direction == LINEAR_NONE_DIRECTION) + { + return E_INVALID_STATE; + } + + direction = __direction; + + return E_SUCCESS; +} + +result +LinearLayout::SetItemWeight(LayoutItem& item, const float weight) +{ + SysTryReturn(NID_UI, weight >= 0.0f, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The weight value is negative."); + + ProxyList* pProxyList = GetProxyList(); + SysAssertf(pProxyList != null, "ProxyList is invalid."); + + ProxyListNode* pNode = pProxyList->GetNode(item); + SysTryReturn(NID_UI, pNode != null, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Control dose not belong to layout."); + + LinearItemInfo* pItemInfo = static_cast (pNode->GetItemInfo()); + if (pItemInfo == null) + { + return E_INVALID_STATE; + } + + __weightSum -= pItemInfo->__weight; + pItemInfo->__weight = weight; + __weightSum += pItemInfo->__weight; + + SetUpdateState(true); + return E_SUCCESS; +} + +result +LinearLayout::GetItemWeight(const LayoutItem& item, float& weight) const +{ + ProxyList* pProxyList = GetProxyList(); + SysAssertf(pProxyList != null, "ProxyList is invalid."); + + ProxyListNode* pNode = pProxyList->GetNode(item); + SysTryReturn(NID_UI, pNode != null, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Control dose not belong to layout."); + + LinearItemInfo* pItemInfo = static_cast (pNode->GetItemInfo()); + if (pItemInfo == null) + { + return E_INVALID_STATE; + } + + weight = pItemInfo->__weight; + + return E_SUCCESS; +} + +result +LinearLayout::SetItemSpacing(LayoutItem& item, float spacing) +{ + ProxyList* pProxyList = GetProxyList(); + SysAssertf(pProxyList != null, "ProxyList is invalid."); + + ProxyListNode* pNode = pProxyList->GetNode(item); + SysTryReturn(NID_UI, pNode != null, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Control dose not belong to layout."); + + LinearItemInfo* pItemInfo = static_cast (pNode->GetItemInfo()); + if (pItemInfo == null) + { + return E_INVALID_STATE; + } + + pItemInfo->__spacing = spacing; + + SetUpdateState(true); + return E_SUCCESS; +} + +result +LinearLayout::GetItemSpacing(const LayoutItem& item, float& spacing) const +{ + ProxyList* pProxyList = GetProxyList(); + SysAssertf(pProxyList != null, "ProxyList is invalid."); + + ProxyListNode* pNode = pProxyList->GetNode(item); + SysTryReturn(NID_UI, pNode != null, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Control dose not belong to layout."); + + LinearItemInfo* pItemInfo = static_cast (pNode->GetItemInfo()); + if (pItemInfo == null) + { + return E_INVALID_STATE; + } + + spacing = pItemInfo->__spacing; + + return E_SUCCESS; +} + +result +LinearLayout::OnLayout(float width, float height, bool layoutUpdating) +{ + result r = E_SUCCESS; + + ProxyList* pProxyList = GetProxyList(); + SysAssertf(pProxyList != null, "ProxyList is invalid."); + + if (__orientation == LINEAR_NONE_ORIENTATION || __direction == LINEAR_NONE_DIRECTION) + { + return E_INVALID_STATE; + } + + LayoutItemProxy* pContainerProxy = GetContainerProxy(); + if (pContainerProxy == null) + { + return E_INVALID_STATE; + } + + LayoutRect intendedRect = {0.0f, 0.0f, width, height}; + pContainerProxy->ConvertWindowToClientBounds(intendedRect, intendedRect); + + LayoutRect layoutRect = GetLayoutRect(); + layoutRect.w = intendedRect.w; + layoutRect.h = intendedRect.h; + SetLayoutRect(layoutRect); + + float rightBound = 0.0f; + float bottomBound = 0.0f; + r = CalculatePositionSize(rightBound, bottomBound); + if (r != E_SUCCESS) + { + return r; + } + + if (_FloatCompare(__weightSum, 0.0f) == false) + { + r = CalculateWeight(rightBound, bottomBound); + if (r != E_SUCCESS) + { + return r; + } + } + + r = CalculateWrapContent(*pContainerProxy, rightBound, bottomBound, layoutUpdating); + if (r != E_SUCCESS) + { + return r; + } + + if (__orientation == LINEAR_HORIZONTAL) + { + r = CalculateAlignment(VERTICALONLY); + } + else + { + r = CalculateAlignment(HORIZONTALONLY); + } + if (r != E_SUCCESS) + { + return r; + } + + r = CalculateCorrectedAlignment(); + if (r != E_SUCCESS) + { + return r; + } + + r = CalculateMatchParent(); + if (r != E_SUCCESS) + { + return r; + } + + ProxyListNode* pNode = pProxyList->GetFirstNode(); + while (pNode != null) + { + LayoutItemProxy* pItemProxy = pNode->GetItemProxy(); + LinearItemInfo* pItemInfo = static_cast (pNode->GetItemInfo()); + if (pItemProxy == null || pItemInfo == null) + { + return E_INVALID_STATE; + } + + r = pItemProxy->SetItemWindowRect(pItemInfo->__itemRect); + if (r != E_SUCCESS) + { + return r; + } + + pNode = pProxyList->GetNextNode(*pNode); + } + + return E_SUCCESS; +} + +result +LinearLayout::CalculatePositionSize(float& rightBound, float& bottomBound) +{ + ProxyList* pProxyList = GetProxyList(); + SysAssertf(pProxyList != null, "ProxyList is invalid."); + + if (pProxyList->GetNodeCount() == 0) + { + return E_SUCCESS; + } + + if (__orientation == LINEAR_HORIZONTAL) + { + return CalculateHorizontalPositionSize(rightBound, bottomBound); + } + else + { + return CalculateVerticalPositonSize(rightBound, bottomBound); + } +} + +result +LinearLayout::CalculateHorizontalPositionSize(float& rightBound, float& bottomBound) +{ + ProxyList* pProxyList = GetProxyList(); + SysAssertf(pProxyList != null, "ProxyList is invalid."); + + LayoutRect layoutRect = GetLayoutRect(); + float x = layoutRect.x; + if (__direction == LINEAR_RIGHT_TO_LEFT) + { + x += layoutRect.w; + } + + ProxyListNode* pNode = pProxyList->GetFirstNode(); + ProxyListNode* pFirstNode = pNode; + while (pNode != null) + { + LayoutItemProxy* pItemProxy = pNode->GetItemProxy(); + LinearItemInfo* pItemInfo = static_cast (pNode->GetItemInfo()); + if (pItemProxy == null || pItemInfo == null) + { + return E_INVALID_STATE; + } + + bool changedProperty = false; + if (pItemProxy->GetItemWidthMatchMode() == MATCH_PARENT) + { + pItemProxy->SetItemWidthMatchMode(NONE_MODE); + changedProperty = true; + } + + LayoutRect itemRect = pItemProxy->GetItemBaseRect(); + result r = pItemProxy->Measure(itemRect.w, itemRect.h); + if (r != E_SUCCESS) + { + return r; + } + pItemProxy->GetMeasuredSize(itemRect.w, itemRect.h); + if (__direction == LINEAR_LEFT_TO_RIGHT) + { + itemRect.x = x; + if (pNode != pFirstNode) + { + itemRect.x += pItemInfo->__spacing; + } + x = itemRect.x + itemRect.w; + } + else + { + x -= itemRect.w; + if (pNode != pFirstNode) + { + x -= pItemInfo->__spacing; + } + itemRect.x = x; + } + itemRect.y = layoutRect.y; + pItemInfo->__itemRect = itemRect; + + if (__direction == LINEAR_LEFT_TO_RIGHT) + { + rightBound = x; + } + else + { + rightBound = layoutRect.x + layoutRect.w; + } + + ItemAlign align = pItemProxy->GetItemAlignment(); + ItemMargin margin = pItemProxy->GetItemMargin(); + if (pItemProxy->GetItemHeightMatchMode() != MATCH_PARENT) + { + float itemBottomPosition = 0.0f; + if (align.VAlign == ITEM_VERTICAL_ALIGN_TOP) + { + itemBottomPosition = margin.top + itemRect.h; + } + else if (align.VAlign == ITEM_VERTICAL_ALIGN_BOTTOM) + { + itemBottomPosition = margin.bottom + itemRect.h; + } + else if (align.VAlign == ITEM_VERTICAL_ALIGN_TOP_BOTTOM) + { + itemBottomPosition = margin.top + itemRect.h + margin.bottom; + } + else + { + itemBottomPosition = itemRect.h; + } + + if (itemBottomPosition > bottomBound) + { + bottomBound = itemBottomPosition; + } + } + + if (changedProperty) + { + pItemProxy->SetItemWidthMatchMode(MATCH_PARENT); + } + + pNode = pProxyList->GetNextNode(*pNode); + } + + return E_SUCCESS; +} + +result +LinearLayout::CalculateVerticalPositonSize(float& rightBound, float& bottomBound) +{ + ProxyList* pProxyList = GetProxyList(); + SysAssertf(pProxyList != null, "ProxyList is invalid."); + + LayoutRect layoutRect = GetLayoutRect(); + float y = layoutRect.y; + if (__direction == LINEAR_BOTTOM_TO_TOP) + { + y += layoutRect.h; + } + + ProxyListNode* pNode = pProxyList->GetFirstNode(); + ProxyListNode* pFirstNode = pNode; + while (pNode != null) + { + LayoutItemProxy* pItemProxy = pNode->GetItemProxy(); + LinearItemInfo* pItemInfo = static_cast (pNode->GetItemInfo()); + if (pItemProxy == null || pItemInfo == null) + { + return E_INVALID_STATE; + } + + bool changedProperty = false; + if (pItemProxy->GetItemHeightMatchMode() == MATCH_PARENT) + { + pItemProxy->SetItemHeightMatchMode(NONE_MODE); + changedProperty = true; + } + + LayoutRect itemRect = pItemProxy->GetItemBaseRect(); + result r = pItemProxy->Measure(itemRect.w, itemRect.h); + if (r != E_SUCCESS) + { + return r; + } + pItemProxy->GetMeasuredSize(itemRect.w, itemRect.h); + if (__direction == LINEAR_TOP_TO_BOTTOM) + { + itemRect.y = y; + if (pNode != pFirstNode) + { + itemRect.y += pItemInfo->__spacing; + } + y = itemRect.y + itemRect.h; + } + else + { + y -= itemRect.h; + if (pNode != pFirstNode) + { + y -= pItemInfo->__spacing; + } + itemRect.y = y; + } + itemRect.x = layoutRect.x; + pItemInfo->__itemRect = itemRect; + + if (__direction == LINEAR_TOP_TO_BOTTOM) + { + bottomBound = y; + } + else + { + bottomBound = layoutRect.y + layoutRect.h; + } + + ItemAlign align = pItemProxy->GetItemAlignment(); + ItemMargin margin = pItemProxy->GetItemMargin(); + if (pItemProxy->GetItemWidthMatchMode() != MATCH_PARENT) + { + float itemRightPosition = 0.0f; + if (align.HAlign == ITEM_HORIZONTAL_ALIGN_LEFT) + { + itemRightPosition = margin.left + itemRect.w; + } + else if (align.HAlign == ITEM_HORIZONTAL_ALIGN_RIGHT) + { + itemRightPosition = margin.right + itemRect.w; + } + else if (align.HAlign == ITEM_HORIZONTAL_ALIGN_LEFT_RIGHT) + { + itemRightPosition = margin.left + itemRect.w + margin.right; + } + else + { + itemRightPosition = itemRect.w; + } + + if (itemRightPosition > rightBound) + { + rightBound = itemRightPosition; + } + } + + if (changedProperty) + { + pItemProxy->SetItemHeightMatchMode(MATCH_PARENT); + } + + pNode = pProxyList->GetNextNode(*pNode); + } + + return E_SUCCESS; +} + +result +LinearLayout::CalculateWeight(float& rightBound, float& bottomBound) +{ + float originalWeightSum = __weightSum; + LayoutRect layoutRect = GetLayoutRect(); + float emptySpace = 0.0f; + result r = E_SUCCESS; + + ProxyList* pProxyList = GetProxyList(); + SysAssertf(pProxyList != null, "ProxyList is invalid."); + + if (__orientation == LINEAR_HORIZONTAL) + { + if (__direction == LINEAR_LEFT_TO_RIGHT) + { + emptySpace = (layoutRect.x + layoutRect.w) - rightBound; + } + else + { + ProxyListNode* pNode = pProxyList->GetLastNode(); + if (pNode == null) + { + return E_INVALID_STATE; + } + LinearItemInfo* pItemInfo = static_cast (pNode->GetItemInfo()); + if (pItemInfo == null) + { + return E_INVALID_STATE; + } + + emptySpace = pItemInfo->__itemRect.x - layoutRect.x; + } + + while (!_FloatCompare(emptySpace, 0.0f)) + { + r = CalculateHorizontalWeight(emptySpace); + if (r != E_SUCCESS) + { + return r; + } + } + + ProxyListNode* pBoundNode = null; + if (__direction == LINEAR_TOP_TO_BOTTOM) + { + pBoundNode = pProxyList->GetLastNode(); + } + else + { + pBoundNode = pProxyList->GetFirstNode(); + } + if (pBoundNode == null) + { + return E_INVALID_STATE; + } + LinearItemInfo* pBoundInfo = static_cast (pBoundNode->GetItemInfo()); + if (pBoundInfo == null) + { + return E_INVALID_STATE; + } + rightBound = pBoundInfo->__itemRect.x + pBoundInfo->__itemRect.w; + } + else + { + if (__direction == LINEAR_TOP_TO_BOTTOM) + { + emptySpace = (layoutRect.y + layoutRect.h) - bottomBound; + } + else + { + ProxyListNode* pNode = pProxyList->GetLastNode(); + if (pNode == null) + { + return E_INVALID_STATE; + } + LinearItemInfo* pItemInfo = static_cast (pNode->GetItemInfo()); + if (pItemInfo == null) + { + return E_INVALID_STATE; + } + + emptySpace = pItemInfo->__itemRect.y - layoutRect.y; + } + + while (!_FloatCompare(emptySpace, 0.0f)) + { + r = CalculateVerticalWeight(emptySpace); + if (r != E_SUCCESS) + { + return r; + } + } + + ProxyListNode* pBoundNode = null; + if (__direction == LINEAR_TOP_TO_BOTTOM) + { + pBoundNode = pProxyList->GetLastNode(); + } + else + { + pBoundNode = pProxyList->GetFirstNode(); + } + if (pBoundNode == null) + { + return E_INVALID_STATE; + } + LinearItemInfo* pBoundInfo = static_cast (pBoundNode->GetItemInfo()); + if (pBoundInfo == null) + { + return E_INVALID_STATE; + } + bottomBound = pBoundInfo->__itemRect.y + pBoundInfo->__itemRect.h; + } + + ProxyListNode* pNode = pProxyList->GetFirstNode(); + while (pNode != null) + { + LinearItemInfo* pItemInfo = static_cast (pNode->GetItemInfo()); + if (pItemInfo == null) + { + return E_INVALID_STATE; + } + pItemInfo->__fixedSize = false; + + pNode = pProxyList->GetNextNode(*pNode); + } + + __weightSum = originalWeightSum; + + return E_SUCCESS; +} + +result +LinearLayout::CalculateHorizontalWeight(float& emptySpace) +{ + ProxyList* pProxyList = GetProxyList(); + SysAssertf(pProxyList != null, "ProxyList is invalid."); + + if (_FloatCompare(__weightSum, 0.0f) == true) + { + emptySpace = 0.0f; + return E_SUCCESS; + } + + result r = E_SUCCESS; + float x = 0.0f; + float measuredWidth = 0.0f; + float usedEmptySpace = emptySpace; + int itemCount = pProxyList->GetNodeCount(); + + if (usedEmptySpace <= itemCount && usedEmptySpace >= -itemCount) + { + ProxyListNode* pNode = pProxyList->GetFirstNode(); + while (pNode != null) + { + LayoutItemProxy* pItemProxy = pNode->GetItemProxy(); + LinearItemInfo* pItemInfo = static_cast (pNode->GetItemInfo()); + if (pItemProxy == null || pItemInfo == null) + { + return E_INVALID_STATE; + } + LayoutRect itemRect = pItemInfo->__itemRect; + itemRect.x += x; + if (pItemInfo->__fixedSize == false && !_FloatCompare(usedEmptySpace, 0.0f) && !_FloatCompare(pItemInfo->__weight, 0.0f)) + { + if (usedEmptySpace > 0.0f) + { + if (usedEmptySpace < 1.0f) + { + itemRect.w += usedEmptySpace; + } + else + { + itemRect.w++; + } + + r = pItemProxy->Measure(itemRect.w, itemRect.h); + if (r != E_SUCCESS) + { + return r; + } + + pItemProxy->GetMeasuredSize(measuredWidth, itemRect.h); + if (_FloatCompare(measuredWidth, itemRect.w)) + { + if (usedEmptySpace < 1.0f) + { + if (__direction == LINEAR_LEFT_TO_RIGHT) + { + x += usedEmptySpace; + } + else + { + itemRect.x -= usedEmptySpace; + x -= usedEmptySpace; + } + usedEmptySpace = 0.0f; + } + else + { + usedEmptySpace--; + if (__direction == LINEAR_LEFT_TO_RIGHT) + { + x++; + } + else + { + itemRect.x--; + x--; + } + } + } + else + { + itemRect.w = measuredWidth; + __weightSum -= pItemInfo->__weight; + pItemInfo->__fixedSize = true; + } + } + else + { + if (usedEmptySpace > -1.0f) + { + itemRect.w -= usedEmptySpace; + } + else + { + itemRect.w--; + } +#ifdef NOT_SUPPORT_NEGATIVE_SIZE + if (itemRect.w < 0.0f) + { + itemRect.w = 0.0f; + } +#endif + r = pItemProxy->Measure(itemRect.w, itemRect.h); + if (r != E_SUCCESS) + { + return r; + } + + pItemProxy->GetMeasuredSize(measuredWidth, itemRect.h); + if (_FloatCompare(measuredWidth, itemRect.w)) + { + if (usedEmptySpace > -1.0f) + { + if (__direction == LINEAR_LEFT_TO_RIGHT) + { + x -= usedEmptySpace; + } + else + { + itemRect.x += usedEmptySpace; + x += usedEmptySpace; + } + usedEmptySpace = 0.0f; + } + else + { + usedEmptySpace++; + if (__direction == LINEAR_LEFT_TO_RIGHT) + { + x--; + } + else + { + itemRect.x++; + x++; + } + } + } + else + { + itemRect.w = measuredWidth; + __weightSum -= pItemInfo->__weight; + pItemInfo->__fixedSize = true; + } + } + } + pItemInfo->__itemRect = itemRect; + + pNode = pProxyList->GetNextNode(*pNode); + } + emptySpace = usedEmptySpace; + + return E_SUCCESS; + } + + float unitSize = emptySpace / __weightSum; + + ProxyListNode* pNode = pProxyList->GetFirstNode(); + while (pNode != null) + { + LayoutItemProxy* pItemProxy = pNode->GetItemProxy(); + LinearItemInfo* pItemInfo = static_cast (pNode->GetItemInfo()); + if (pItemProxy == null || pItemInfo == null) + { + return E_INVALID_STATE; + } + LayoutRect itemRect = pItemInfo->__itemRect; + float correctionSize = unitSize * pItemInfo->__weight; + + if (__direction == LINEAR_LEFT_TO_RIGHT) + { + itemRect.x += x; + } + + if (pItemInfo->__fixedSize == false) + { + correctionSize = Math::Round(correctionSize); + + itemRect.w += correctionSize; + x += correctionSize; + usedEmptySpace -= correctionSize; + } + + if (__direction == LINEAR_RIGHT_TO_LEFT) + { + itemRect.x -= x; + } + + r = pItemProxy->Measure(itemRect.w, itemRect.h); + if (r != E_SUCCESS) + { + return r; + } + pItemProxy->GetMeasuredSize(measuredWidth, itemRect.h); + if (measuredWidth != itemRect.w) + { + usedEmptySpace = usedEmptySpace - (measuredWidth - itemRect.w); + x = x + (measuredWidth - itemRect.w); + itemRect.w = measuredWidth; + __weightSum -= pItemInfo->__weight; + pItemInfo->__fixedSize = true; + } + +#ifdef NOT_SUPPORT_NEGATIVE_SIZE + if (itemRect.w < 0.0f) + { + itemRect.w = 0.0f; + } +#endif + pItemInfo->__itemRect = itemRect; + + pNode = pProxyList->GetNextNode(*pNode); + } + emptySpace = usedEmptySpace; + + return E_SUCCESS; +} + +result +LinearLayout::CalculateVerticalWeight(float& emptySpace) +{ + ProxyList* pProxyList = GetProxyList(); + SysAssertf(pProxyList != null, "ProxyList is invalid."); + + if (_FloatCompare(__weightSum, 0.0f)) + { + emptySpace = 0.0f; + return E_SUCCESS; + } + + result r = E_SUCCESS; + float y = 0.0f; + float measuredHeight = 0.0f; + float usedEmptySpace = emptySpace; + int itemCount = pProxyList->GetNodeCount(); + + if (usedEmptySpace <= itemCount && usedEmptySpace >= -itemCount) + { + ProxyListNode* pNode = pProxyList->GetFirstNode(); + while (pNode != null) + { + LayoutItemProxy* pItemProxy = pNode->GetItemProxy(); + LinearItemInfo* pItemInfo = static_cast (pNode->GetItemInfo()); + if (pItemProxy == null || pItemInfo == null) + { + return E_INVALID_STATE; + } + LayoutRect itemRect = pItemInfo->__itemRect; + itemRect.y += y; + if (pItemInfo->__fixedSize == false && !_FloatCompare(usedEmptySpace, 0.0f) && !_FloatCompare(pItemInfo->__weight, 0.0f)) + { + if (usedEmptySpace > 0.0f) + { + if (usedEmptySpace < 1.0f) + { + itemRect.h += usedEmptySpace; + } + else + { + itemRect.h++; + } + + r = pItemProxy->Measure(itemRect.w, itemRect.h); + if (r != E_SUCCESS) + { + return r; + } + + pItemProxy->GetMeasuredSize(itemRect.w, measuredHeight); + if (measuredHeight == itemRect.h) + { + if (usedEmptySpace < 1.0f) + { + if (__direction == LINEAR_TOP_TO_BOTTOM) + { + y += usedEmptySpace; + } + else + { + itemRect.y -= usedEmptySpace; + y -= usedEmptySpace; + } + + usedEmptySpace = 0.0f; + } + else + { + usedEmptySpace--; + if (__direction == LINEAR_TOP_TO_BOTTOM) + { + y++; + } + else + { + itemRect.y--; + y--; + } + } + } + else + { + itemRect.h = measuredHeight; + __weightSum -= pItemInfo->__weight; + pItemInfo->__fixedSize = true; + } + } + else + { + if (usedEmptySpace > -1.0f) + { + itemRect.h -= usedEmptySpace; + } + else + { + itemRect.h--; + } +#ifdef NOT_SUPPORT_NEGATIVE_SIZE + if (itemRect.h < 0.0f) + { + itemRect.h = 0.0f; + } +#endif + r = pItemProxy->Measure(itemRect.w, itemRect.h); + if (r != E_SUCCESS) + { + return r; + } + + pItemProxy->GetMeasuredSize(itemRect.w, measuredHeight); + if (measuredHeight == itemRect.h) + { + if (usedEmptySpace > -1.0f) + { + if (__direction == LINEAR_TOP_TO_BOTTOM) + { + y -= usedEmptySpace; + } + else + { + itemRect.y += usedEmptySpace; + y += usedEmptySpace; + } + usedEmptySpace = 0.0f; + } + else + { + usedEmptySpace++; + if (__direction == LINEAR_TOP_TO_BOTTOM) + { + y--; + } + else + { + itemRect.y++; + y++; + } + } + } + else + { + itemRect.h = measuredHeight; + __weightSum -= pItemInfo->__weight; + pItemInfo->__fixedSize = true; + } + } + } + pItemInfo->__itemRect = itemRect; + + pNode = pProxyList->GetNextNode(*pNode); + } + emptySpace = usedEmptySpace; + + return E_SUCCESS; + } + + float unitSize = emptySpace / __weightSum; + + ProxyListNode* pNode = pProxyList->GetFirstNode(); + while (pNode != null) + { + LayoutItemProxy* pItemProxy = pNode->GetItemProxy(); + LinearItemInfo* pItemInfo = static_cast (pNode->GetItemInfo()); + if (pItemProxy == null || pItemInfo == null) + { + return E_INVALID_STATE; + } + LayoutRect itemRect = pItemInfo->__itemRect; + float correctionSize = unitSize * pItemInfo->__weight; + + if (__direction == LINEAR_TOP_TO_BOTTOM) + { + itemRect.y += y; + } + + if (pItemInfo->__fixedSize == false) + { + correctionSize = Math::Round(correctionSize); + + itemRect.h += correctionSize; + y += correctionSize; + usedEmptySpace -= correctionSize; + } + + if (__direction == LINEAR_BOTTOM_TO_TOP) + { + itemRect.y -= y; + } + + r = pItemProxy->Measure(itemRect.w, itemRect.h); + if (r != E_SUCCESS) + { + return r; + } + pItemProxy->GetMeasuredSize(itemRect.w, measuredHeight); + if (measuredHeight != itemRect.h) + { + usedEmptySpace = usedEmptySpace - (measuredHeight - itemRect.h); + y = y + (measuredHeight - itemRect.h); + itemRect.h = measuredHeight; + __weightSum -= pItemInfo->__weight; + pItemInfo->__fixedSize = true; + } + +#ifdef NOT_SUPPORT_NEGATIVE_SIZE + if (itemRect.h < 0) + { + itemRect.h = 0.0f; + } +#endif + pItemInfo->__itemRect = itemRect; + + pNode = pProxyList->GetNextNode(*pNode); + } + emptySpace = usedEmptySpace; + + return E_SUCCESS; +} + +result +LinearLayout::CalculateWrapContent(LayoutItemProxy& containerProxy, float rightBound, float bottomBound, bool layoutUpdating) +{ + LayoutMatchMode widthMatchMode = containerProxy.GetItemWidthMatchMode(); + LayoutMatchMode heightMatchMode = containerProxy.GetItemHeightMatchMode(); + + if (widthMatchMode != WRAP_CONTENT && heightMatchMode != WRAP_CONTENT) + { + return E_SUCCESS; + } + + LayoutRect containerRect; + LayoutRect clientRect; + containerProxy.GetItemWindowRect(containerRect); + containerProxy.ConvertWindowToClientBounds(containerRect, clientRect); + + float correctionWidth = containerRect.w - clientRect.w; + float correctionHeight = containerRect.h - clientRect.h; + LayoutSize minSize; + LayoutSize maxSize; + containerProxy.GetMinSize(minSize); + containerProxy.GetMaxSize(maxSize); + LayoutRect layoutRect = GetLayoutRect(); + + if (widthMatchMode == WRAP_CONTENT) + { + layoutRect.w = rightBound - layoutRect.x; + if (layoutRect.w < 0) + { + layoutRect.w = 0.0f; + } + containerRect.w = layoutRect.w + (containerRect.w - clientRect.w); + containerRect.w = layoutRect.w + correctionWidth; +#ifdef NOT_SUPPORT_NEGATIVE_SIZE + if (containerRect.w < 0) + { + containerRect.w = 0.0f; + } +#endif + if (containerRect.w < minSize.w) + { + containerRect.w = minSize.w; + } + if (containerRect.w > maxSize.w) + { + containerRect.w = maxSize.w; + } + layoutRect.w = containerRect.w - correctionWidth; + } + if (heightMatchMode == WRAP_CONTENT) + { + layoutRect.h = bottomBound - layoutRect.y; + if (layoutRect.h < 0) + { + layoutRect.h = 0.0f; + } + containerRect.h = layoutRect.h + (containerRect.h - clientRect.h); + containerRect.h = layoutRect.h + correctionHeight; +#ifdef NOT_SUPPORT_NEGATIVE_SIZE + if (containerRect.h < 0) + { + containerRect.h = 0.0f; + } +#endif + if (containerRect.h < minSize.h) + { + containerRect.h = minSize.h; + } + if (containerRect.h > maxSize.h) + { + containerRect.h = maxSize.h; + } + layoutRect.h = containerRect.h - correctionHeight; + } + SetLayoutRect(layoutRect); + if (layoutUpdating) + { + result r = containerProxy.SetItemWindowRect(containerRect); + if (r != E_SUCCESS) + { + return r; + } + } + + return E_SUCCESS; +} + +result +LinearLayout::CalculateMatchParent(void) +{ + ProxyList* pProxyList = GetProxyList(); + SysAssertf(pProxyList != null, "ProxyList is invalid."); + + LayoutRect layoutRect = GetLayoutRect(); + + ProxyListNode* pNode = pProxyList->GetFirstNode(); + while (pNode != null) + { + LayoutItemProxy* pItemProxy = pNode->GetItemProxy(); + LinearItemInfo* pItemInfo = static_cast (pNode->GetItemInfo()); + if (pItemProxy == null || pItemInfo == null) + { + return E_INVALID_STATE; + } + + bool changedProperty = false; + if (pItemProxy->GetItemHeightMatchMode() == MATCH_PARENT && __orientation == LINEAR_HORIZONTAL) + { + if (pItemProxy->GetItemWidthMatchMode() == MATCH_PARENT) + { + pItemProxy->SetItemWidthMatchMode(NONE_MODE); + changedProperty = true; + } + LayoutRect itemRect = pItemInfo->__itemRect; + result r = pItemProxy->Measure(itemRect.w, itemRect.h); + if (r != E_SUCCESS) + { + return r; + } + pItemProxy->GetMeasuredSize(itemRect.w, itemRect.h); + itemRect.y = layoutRect.y; + pItemInfo->__itemRect = itemRect; + + if (changedProperty == true) + { + pItemProxy->SetItemWidthMatchMode(MATCH_PARENT); + } + } + if (pItemProxy->GetItemWidthMatchMode() == MATCH_PARENT && __orientation == LINEAR_VERTICAL) + { + if (pItemProxy->GetItemHeightMatchMode() == MATCH_PARENT) + { + pItemProxy->SetItemHeightMatchMode(NONE_MODE); + changedProperty = true; + } + LayoutRect itemRect = pItemInfo->__itemRect; + result r = pItemProxy->Measure(itemRect.w, itemRect.h); + if (r != E_SUCCESS) + { + return r; + } + pItemProxy->GetMeasuredSize(itemRect.w, itemRect.h); + itemRect.x = layoutRect.x; + pItemInfo->__itemRect = itemRect; + + if (changedProperty == true) + { + pItemProxy->SetItemHeightMatchMode(MATCH_PARENT); + } + } + + pNode = pProxyList->GetNextNode(*pNode); + } + + return E_SUCCESS; +} + +result +LinearLayout::CalculateCorrectedAlignment(void) +{ + ProxyList* pProxyList = GetProxyList(); + SysAssertf(pProxyList != null, "ProxyList is invalid."); + + ProxyListNode* pNode = pProxyList->GetFirstNode(); + while (pNode != null) + { + LayoutItemProxy* pItemProxy = pNode->GetItemProxy(); + LinearItemInfo* pItemInfo = static_cast (pNode->GetItemInfo()); + if (pItemProxy == null || pItemInfo == null) + { + return E_INVALID_STATE; + } + ItemAlign align = pItemProxy->GetItemAlignment(); + LayoutRect itemWindowRect; + pItemProxy->GetItemWindowRect(itemWindowRect); + + if (__orientation == LINEAR_HORIZONTAL) + { + pItemInfo->__itemRect.y = itemWindowRect.y; + if (align.VAlign == ITEM_VERTICAL_ALIGN_TOP_BOTTOM) + { + pItemInfo->__itemRect.h = itemWindowRect.h; + } + } + else + { + pItemInfo->__itemRect.x = itemWindowRect.x; + if (align.HAlign == ITEM_HORIZONTAL_ALIGN_LEFT_RIGHT) + { + pItemInfo->__itemRect.w = itemWindowRect.w; + } + } + + pNode = pProxyList->GetNextNode(*pNode); + } + + return E_SUCCESS; +} + +}}} // Tizen::Ui::_Layout diff --git a/src/ui/layout/FUi_LayoutLinkedList.cpp b/src/ui/layout/FUi_LayoutLinkedList.cpp new file mode 100644 index 0000000..cd73f5d --- /dev/null +++ b/src/ui/layout/FUi_LayoutLinkedList.cpp @@ -0,0 +1,241 @@ +// +// 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_LayoutLinkedList.cpp + * @brief This is the implementation file for LinkedList class. + * + * This file contains the implementation of LinkedList class. + */ + +#include +#include "FUi_LayoutLinkedList.h" + +namespace Tizen { namespace Ui { namespace _Layout +{ + +LinkedList::LinkedList(void) + : _pRootNode(null) + , _pEndNode(null) +{ + _pRootNode = new (std::nothrow) LinkedListNode(); + _pEndNode = new (std::nothrow) LinkedListNode(); + + if (_pRootNode != null && _pEndNode != null) + { + _pRootNode->__pNextNode = _pEndNode; + _pEndNode->__pPrevNode = _pRootNode; + } +} + +LinkedList::~LinkedList(void) +{ + delete _pRootNode; + delete _pEndNode; +} + +LinkedListNode* +LinkedList::GetFirstNode(void) const +{ + if (_pRootNode->__pNextNode != _pEndNode) + { + return _pRootNode->__pNextNode; + } + else + { + return null; + } +} + +LinkedListNode* +LinkedList::GetLastNode(void) const +{ + if (_pEndNode->__pPrevNode != _pRootNode) + { + return _pEndNode->__pPrevNode; + } + else + { + return null; + } +} + +LinkedListNode* +LinkedList::GetNextNode(const LinkedListNode& node) const +{ + if (&node == _pEndNode) + { + return null; + } + + if (node.__pNextNode == _pEndNode) + { + return null; + } + return node.__pNextNode; +} + +LinkedListNode* +LinkedList::GetPrevNode(const LinkedListNode& node) const +{ + if (&node == _pRootNode) + { + return null; + } + + if (node.__pPrevNode == _pRootNode) + { + return null; + } + + return node.__pPrevNode; +} + +result +LinkedList::RemoveNode(LinkedListNode& node) +{ + if (&node == _pRootNode || &node == _pEndNode) + { + return E_SYSTEM; + } + + LinkedListNode* pPrevNode = node.__pPrevNode; + LinkedListNode* pNextNode = node.__pNextNode; + + if (pPrevNode == null || pNextNode == null) + { + return E_SYSTEM; + } + + pPrevNode->__pNextNode = pNextNode; + pNextNode->__pPrevNode = pPrevNode; + + if (node.Destroy() != E_SUCCESS) + { + return E_SYSTEM; + } + + return E_SUCCESS; +} + +result +LinkedList::DetachNode(LinkedListNode& node) +{ + SysTryReturn(NID_UI, &node != _pRootNode, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is root node."); + SysTryReturn(NID_UI, &node != _pEndNode, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is end node."); + + LinkedListNode* pPrevNode = node.__pPrevNode; + LinkedListNode* pNextNode = node.__pNextNode; + + pPrevNode->__pNextNode = pNextNode; + pNextNode->__pPrevNode = pPrevNode; + + node.__pPrevNode = null; + node.__pNextNode = null; + + return E_SUCCESS; +} + +result +LinkedList::InsertIntoLeft(LinkedListNode& node, LinkedListNode& leftNode) +{ + LinkedListNode* pPrevNode = node.__pPrevNode; + + if (pPrevNode == null) + { + SysAssert(false); + return E_INVALID_ARG; + } + + pPrevNode->__pNextNode = &leftNode; + leftNode.__pPrevNode = pPrevNode; + leftNode.__pNextNode = &node; + node.__pPrevNode = &leftNode; + + return E_SUCCESS; +} + +result +LinkedList::InsertIntoRight(LinkedListNode& node, LinkedListNode& rightNode) +{ + LinkedListNode* pNextNode = node.__pNextNode; + + if (pNextNode == null) + { + SysAssert(false); + return E_INVALID_ARG; + } + + node.__pNextNode = &rightNode; + rightNode.__pPrevNode = &node; + rightNode.__pNextNode = pNextNode; + pNextNode->__pPrevNode = &rightNode; + + return E_SUCCESS; +} + +result +LinkedList::SwapNode(LinkedListNode& node1, LinkedListNode& node2) +{ + if (&node1 == _pRootNode || &node1 == _pEndNode || + &node2 == _pRootNode || &node2 == _pEndNode) + { + return E_INVALID_ARG; + } + + LinkedListNode* pPrevNode1 = node1.__pPrevNode; + LinkedListNode* pNextNode1 = node1.__pNextNode; + + LinkedListNode* pPrevNode2 = node2.__pPrevNode; + LinkedListNode* pNextNode2 = node2.__pNextNode; + + if (pPrevNode1 != &node2) + { + pPrevNode1->__pNextNode = &node2; + node2.__pPrevNode = pPrevNode1; + } + else + { + node1.__pNextNode = &node2; + node2.__pPrevNode = &node1; + } + + if (pNextNode1 != &node2) + { + pNextNode1->__pPrevNode = &node2; + node2.__pNextNode = pNextNode1; + } + else + { + node2.__pNextNode = &node1; + node1.__pPrevNode = &node2; + } + + if (pPrevNode2 != &node1) + { + pPrevNode2->__pNextNode = &node1; + node1.__pPrevNode = pPrevNode2; + } + if (pNextNode2 != &node1) + { + pNextNode2->__pPrevNode = &node1; + node1.__pNextNode = pNextNode2; + } + + return E_SUCCESS; +} + +}}} // Tizen::Ui::_Layout diff --git a/src/ui/layout/FUi_LayoutLinkedList.h b/src/ui/layout/FUi_LayoutLinkedList.h new file mode 100644 index 0000000..27943e6 --- /dev/null +++ b/src/ui/layout/FUi_LayoutLinkedList.h @@ -0,0 +1,69 @@ +// +// 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_LayoutLinkedList.h + * @brief This is the header file for LinkedList class. + * + * This header file contains the declaration of LinkedList class. + */ + +#pragma once + +#ifndef _FUI_INTERNAL_LAYOUT_LINKED_LIST_H_ +#define _FUI_INTERNAL_LAYOUT_LINKED_LIST_H_ + +#include "FUi_LayoutLinkedListNode.h" + +namespace Tizen { namespace Ui { namespace _Layout +{ + +class LinkedList +{ +public: + virtual LinkedListNode* GetFirstNode(void) const; + virtual LinkedListNode* GetLastNode(void) const; + + virtual LinkedListNode* GetNextNode(const LinkedListNode& node) const; + virtual LinkedListNode* GetPrevNode(const LinkedListNode& node) const; + + result DetachNode(LinkedListNode& node); + + result InsertIntoLeft(LinkedListNode& node, LinkedListNode& leftNode); + result InsertIntoRight(LinkedListNode& node, LinkedListNode& rightNode); + result SwapNode(LinkedListNode& node1, LinkedListNode& node2); + + virtual result RemoveNode(LinkedListNode& node); + +protected: + LinkedList(void); + virtual ~LinkedList(void); + +private: + LinkedList(const LinkedList&); + LinkedList& operator =(const LinkedList&); + +// property +protected: + LinkedListNode* _pRootNode; + LinkedListNode* _pEndNode; + + friend class _Layout; +}; // LinkedList + +}}} //Tizen::Ui::_Layout + +#endif // _FUI_INTERNAL_LAYOUT_LINKED_LIST_H_ diff --git a/src/ui/layout/FUi_LayoutLinkedListNode.cpp b/src/ui/layout/FUi_LayoutLinkedListNode.cpp new file mode 100644 index 0000000..5cd096d --- /dev/null +++ b/src/ui/layout/FUi_LayoutLinkedListNode.cpp @@ -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_LayoutLinkedListNode.cpp + * @brief This is the implementation file for LinkedListNode class. + * + * This file contains the implementation of LinkedListNode class. + */ + +#include "FUi_LayoutLinkedListNode.h" + +namespace Tizen { namespace Ui { namespace _Layout +{ + +LinkedListNode::LinkedListNode(void) + : __pPrevNode(null) + , __pNextNode(null) +{ +} + +LinkedListNode::~LinkedListNode(void) +{ +} + +result +LinkedListNode::Destroy(void) +{ + delete this; + return E_SUCCESS; +} + +}}} // Tizen::Ui::_Layout diff --git a/src/ui/layout/FUi_LayoutLinkedListNode.h b/src/ui/layout/FUi_LayoutLinkedListNode.h new file mode 100644 index 0000000..64fb7ee --- /dev/null +++ b/src/ui/layout/FUi_LayoutLinkedListNode.h @@ -0,0 +1,61 @@ +// +// 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_LayoutLinkedListNode.h + * @brief This is the header file for LinkedListNode class. + * + * This header file contains the declaration of LinkedListNode class. + */ + +#pragma once + +#ifndef _FUI_INTERNAL_LAYOUT_LINKED_LIST_NODE_H_ +#define _FUI_INTERNAL_LAYOUT_LINKED_LIST_NODE_H_ + +#include +#include +#include + +namespace Tizen +{ +namespace Ui +{ +namespace _Layout +{ + +class LinkedListNode +{ +protected: + LinkedListNode(void); + virtual ~LinkedListNode(void); + virtual result Destroy(void); + +private: + LinkedListNode(const LinkedListNode&); + LinkedListNode& operator =(const LinkedListNode&); + +// property +private: + LinkedListNode* __pPrevNode; + LinkedListNode* __pNextNode; + + friend class LinkedList; +}; // LinkedListNode + +}}} //Tizen::Ui::_Layout + +#endif // _FUI_INTERNAL_LAYOUT_LINKED_LIST_NODE_H_ diff --git a/src/ui/layout/FUi_LayoutProxyList.cpp b/src/ui/layout/FUi_LayoutProxyList.cpp new file mode 100644 index 0000000..f6cf63e --- /dev/null +++ b/src/ui/layout/FUi_LayoutProxyList.cpp @@ -0,0 +1,493 @@ +// +// 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_LayoutProxyList.cpp + * @brief This is the implementation file for ProxyList class. + * + * This file contains the implementation of ProxyList class. + */ + +#include +#include +#include "FUi_LayoutRelativeLayout.h" +#include "FUi_LayoutProxyList.h" +#include "FUi_LayoutLayoutItemProxy.h" +#include "FUi_LayoutLayoutItemInfo.h" + +namespace Tizen { namespace Ui { namespace _Layout +{ + +ProxyList::ProxyList(void) + : __lastIndex(-1) +{ +} + +ProxyList::~ProxyList(void) +{ +} + +ProxyListNode* +ProxyList::GetFirstNode(void) const +{ + return static_cast (LinkedList::GetFirstNode()); +} + +ProxyListNode* +ProxyList::GetLastNode(void) const +{ + return static_cast (LinkedList::GetLastNode()); +} + +ProxyListNode* +ProxyList::GetNextNode(const LinkedListNode& node) const +{ + return static_cast (LinkedList::GetNextNode(node)); +} + +ProxyListNode* +ProxyList::GetPrevNode(const LinkedListNode& node) const +{ + return static_cast (LinkedList::GetPrevNode(node)); +} + +ProxyListNode* +ProxyList::GetNode(int index) const +{ + ProxyListNode* pNode = SearchNode(index); + + return pNode; +} + +ProxyListNode* +ProxyList::GetNode(const LayoutItem& item) const +{ + LinkedListNode* pCurNode = GetFirstNode(); + LinkedListNode* pNextNode = pCurNode; + + while (pCurNode) + { + pNextNode = GetNextNode(*pCurNode); + ProxyListNode* pProxyNode = static_cast (pCurNode); + LayoutItemProxy* pItemProxy = pProxyNode->GetItemProxy(); + if (pItemProxy == null) + { + return null; + } + + if (pItemProxy->GetItem() == &item) + { + return pProxyNode; + } + + pCurNode = pNextNode; + } + return null; +} + +int +ProxyList::GetIndex(ProxyListNode& node) const +{ + LayoutItemProxy* pItemProxy = node.GetItemProxy(); + if (pItemProxy == null) + { + SysAssert(false); + return -1; + } + return pItemProxy->GetIndex(); +} + +LayoutItemProxy* +ProxyList::GetItemProxy(const LayoutItem& item) const +{ + LinkedListNode* pCurNode = GetFirstNode(); + LinkedListNode* pNextNode = pCurNode; + + while (pCurNode) + { + pNextNode = GetNextNode(*pCurNode); + ProxyListNode* pProxyNode = static_cast (pCurNode); + LayoutItemProxy* pItemProxy = pProxyNode->GetItemProxy(); + if (pItemProxy == null) + { + return null; + } + + if (pItemProxy->GetItem() == &item) + { + return pItemProxy; + } + + pCurNode = pNextNode; + } + return null; +} + +ProxyListNode* +ProxyList::SearchNode(int index) const +{ + ProxyListNode* pCurNode = GetFirstNode(); + ProxyListNode* pNextNode = pCurNode; + + while (pCurNode) + { + pNextNode = GetNextNode(*pCurNode); + LayoutItemProxy* pItemProxy = pCurNode->GetItemProxy(); + if (pItemProxy == null) + { + return null; + } + + if (pItemProxy->GetIndex() == index) + { + return pCurNode; + } + + pCurNode = pNextNode; + } + return null; +} + +ProxyListNode* +ProxyList::SearchNode(const LayoutItemProxy& itemProxy) const +{ + ProxyListNode* pCurNode = GetFirstNode(); + ProxyListNode* pNextNode = pCurNode; + + while (pCurNode) + { + pNextNode = GetNextNode(*pCurNode); + LayoutItemProxy* pCurItemProxy = pCurNode->GetItemProxy(); + if (pCurItemProxy == null) + { + return null; + } + + if (pCurItemProxy == &itemProxy) + { + return pCurNode; + } + + pCurNode = pNextNode; + } + return null; +} + +void +ProxyList::RefreshIndex(void) +{ + ProxyListNode* pCurNode = GetFirstNode(); + ProxyListNode* pNextNode = pCurNode; + + int bakLastIndex = __lastIndex; + __lastIndex = -1; + + while (pCurNode) + { + pNextNode = GetNextNode(*pCurNode); + LayoutItemProxy* pCurItemProxy = pCurNode->GetItemProxy(); + + pCurItemProxy->SetIndex(++__lastIndex); + + pCurNode = pNextNode; + } + + SysAssert(bakLastIndex == __lastIndex); +} + +ProxyListNode* +ProxyList::AddNode(LayoutItemProxy& addProxy) +{ + ProxyListNode* pAddNode = new (std::nothrow) ProxyListNode(); + SysTryReturn(NID_UI, pAddNode != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to add to ProxyList."); + + pAddNode->Create(addProxy); + + if (OnAddNode(*pAddNode) != E_SUCCESS) + { + SysLog(NID_UI, "OnAddNode() is failed."); + delete pAddNode; + return null; + } + if (InsertIntoLeft(*_pEndNode, *pAddNode) != E_SUCCESS) + { + SysLog(NID_UI, "InsertIntoLeft() is failed."); + delete pAddNode; + return null; + } + + pAddNode->GetItemProxy()->SetIndex(++__lastIndex); + + return pAddNode; +} + +result +ProxyList::RemoveNode(LinkedListNode& removeNode) +{ + ProxyListNode* pProxyNode = static_cast (&removeNode); + result re = E_SYSTEM; + re = OnRemoveNode(*pProxyNode); + if (re != E_SUCCESS) + { + SysLog(NID_UI, "OnRemoveNode() is failed."); + SysAssert(false); + return re; + } + + re = LinkedList::RemoveNode(removeNode); + if (re != E_SUCCESS) + { + SysLog(NID_UI, "RemoveNode() is failed."); + } + + __lastIndex--; + + return re; +} + +result +ProxyList::RemoveNode(int index) +{ + ProxyListNode* pRemoveNode = SearchNode(index); + + result re = E_SYSTEM; + re = RemoveNode(*pRemoveNode); + + return re; +} + +result +ProxyList::RemoveNode(LayoutItemProxy& removeItem) +{ + ProxyListNode* pRemoveNode = SearchNode(removeItem); + + return RemoveNode(*pRemoveNode); + //int index = GetIndex(*removeNode); + + //return RemoveNode(index); +} + +result +ProxyList::OnAddNode(ProxyListNode& addNode) +{ + return E_SUCCESS; +} + +result +ProxyList::OnRemoveNode(ProxyListNode& removeNode) +{ + return E_SUCCESS; +} + +int +ProxyList::GetNodeCount(void) const +{ + return __lastIndex + 1; +} + +void +ProxyList::RemoveAllNode(void) +{ + ProxyListNode* pCurNode = GetFirstNode(); + ProxyListNode* pNextNode = pCurNode; + LayoutItemProxy* pItemProxy = null; + + while (pCurNode != null) + { + pNextNode = GetNextNode(*pCurNode); + pItemProxy = pCurNode->GetItemProxy(); + SysAssert(pItemProxy != null); + + if (RemoveNode(*pCurNode) != E_SUCCESS) + { + SysAssert(false); + } + + pItemProxy->SetParentContainer(null); + delete pItemProxy; + + pCurNode = pNextNode; + } +} + +// +// Absolute layout +// +AbsoluteProxyList::AbsoluteProxyList(void) +{ +} + +AbsoluteProxyList::~AbsoluteProxyList(void) +{ + RemoveAllNode(); +} + +result +AbsoluteProxyList::OnAddNode(ProxyListNode& addNode) +{ + return E_SUCCESS; +} + +result +AbsoluteProxyList::OnRemoveNode(ProxyListNode& removeNode) +{ + return E_SUCCESS; +} + +// +// Relative layout +// +RelativeProxyList::RelativeProxyList() + : __pRelativeLayout(null) +{ +} + +RelativeProxyList::~RelativeProxyList() +{ + RemoveAllNode(); +} + +result +RelativeProxyList::OnAddNode(ProxyListNode& addNode) +{ + RelativeItemInfo* pItemInfo = new (std::nothrow) RelativeItemInfo(); + if (pItemInfo == null) + { + return E_OUT_OF_MEMORY; + } + + addNode.SetItemInfo(pItemInfo); + + return E_SUCCESS; +} + +result +RelativeProxyList::OnRemoveNode(ProxyListNode& removeNode) +{ + RelativeItemInfo* pItemInfo = static_cast (removeNode.GetItemInfo()); + if (pItemInfo == null) + { + return E_INVALID_ARG; + } + ProxyListNode* pCurNode = GetFirstNode(); + while (pCurNode != null) + { + __pRelativeLayout->DeleteTargetInfo(*pCurNode, removeNode); + pCurNode = GetNextNode(*pCurNode); + } + delete pItemInfo; + removeNode.SetItemInfo(null); + + return E_SUCCESS; +} + +int +RelativeProxyList::GetReferenceCount(ProxyListNode& node) const +{ + RelativeItemInfo* pItemInfo = static_cast (node.GetItemInfo()); + if (pItemInfo == null) + { + return 0; + } + + return pItemInfo->__refCount; +} + +void +RelativeProxyList::SetRelativeLayout(RelativeLayout* pLayout) +{ + __pRelativeLayout = pLayout; +} + +// +// Table layout +// +TableProxyList::TableProxyList() +{ +} + +TableProxyList::~TableProxyList() +{ + RemoveAllNode(); +} + +result +TableProxyList::OnAddNode(ProxyListNode& addNode) +{ + TableItemInfo* pItemInfo = new (std::nothrow) TableItemInfo(); + if (pItemInfo == null) + { + return E_OUT_OF_MEMORY; + } + addNode.SetItemInfo(pItemInfo); + + return E_SUCCESS; +} + +result +TableProxyList::OnRemoveNode(ProxyListNode& removeNode) +{ + TableItemInfo* pItemInfo = static_cast (removeNode.GetItemInfo()); + if (pItemInfo == null) + { + return E_INVALID_STATE; + } + + delete pItemInfo; + removeNode.SetItemInfo(null); + + return E_SUCCESS; +} + +// +// Linear layout +// +LinearProxyList::LinearProxyList(void) +{ +} + +LinearProxyList::~LinearProxyList(void) +{ + RemoveAllNode(); +} + +result +LinearProxyList::OnAddNode(ProxyListNode& addNode) +{ + LinearItemInfo* pItemInfo = new (std::nothrow) LinearItemInfo(); + if (pItemInfo == null) + { + return E_OUT_OF_MEMORY; + } + addNode.SetItemInfo(pItemInfo); + + return E_SUCCESS; +} + +result +LinearProxyList::OnRemoveNode(ProxyListNode& removeNode) +{ + LinearItemInfo* pItemInfo = static_cast (removeNode.GetItemInfo()); + if (pItemInfo == null) + { + return E_INVALID_STATE; + } + delete pItemInfo; + + return E_SUCCESS; +} + +}}} // Tizen::Ui::_Layout diff --git a/src/ui/layout/FUi_LayoutProxyList.h b/src/ui/layout/FUi_LayoutProxyList.h new file mode 100644 index 0000000..9dd34f5 --- /dev/null +++ b/src/ui/layout/FUi_LayoutProxyList.h @@ -0,0 +1,165 @@ +// +// 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_LayoutProxyList.h + * @brief This is the header file for ProxyList class. + * + * This header file contains the declaration of ProxyList class. + */ + +#pragma once + +#ifndef _FUI_INTERNAL_LAYOUT_PROXY_LIST_H_ +#define _FUI_INTERNAL_LAYOUT_PROXY_LIST_H_ + +#include "FUi_LayoutLinkedList.h" +#include "FUi_LayoutProxyListNode.h" + +namespace Tizen { namespace Ui { namespace _Layout +{ + +class LayoutItem; +class AbsoluteLayout; +class RelativeLayout; +class TableLayout; +class LinearLayout; + +// Super class +class ProxyList + : public LinkedList +{ +public: + virtual ~ProxyList(void); + + ProxyListNode* GetFirstNode(void) const; + ProxyListNode* GetLastNode(void) const; + + ProxyListNode* GetNextNode(const LinkedListNode& node) const; + ProxyListNode* GetPrevNode(const LinkedListNode& node) const; + + int GetIndex(ProxyListNode& pnode) const; + ProxyListNode* GetNode(int index) const; + ProxyListNode* GetNode(const LayoutItem& item) const; + + int GetNodeCount(void) const; + + LayoutItemProxy* GetItemProxy(const LayoutItem& item) const; + + void RefreshIndex(void); + + ProxyListNode* AddNode(LayoutItemProxy& addProxy); + virtual result RemoveNode(LinkedListNode& removeNode); + result RemoveNode(LayoutItemProxy& removeItem); + result RemoveNode(int index); + + virtual result OnAddNode(ProxyListNode& addNode); + virtual result OnRemoveNode(ProxyListNode& removeNode); + + ProxyListNode* SearchNode(int index) const; + ProxyListNode* SearchNode(const LayoutItemProxy& item) const; + +protected: + ProxyList(void); + + void RemoveAllNode(void); + +private: + ProxyList(const ProxyList&); + ProxyList& operator =(const ProxyList&); + +private: + int __lastIndex; + + friend class Layout; +}; // ProxyList + +// Absolute layout +class AbsoluteProxyList + : public ProxyList +{ +public: + virtual result OnAddNode(ProxyListNode& addNode); + virtual result OnRemoveNode(ProxyListNode& removeNode); + +protected: + AbsoluteProxyList(void); + virtual ~AbsoluteProxyList(void); + +private: + AbsoluteProxyList(const AbsoluteProxyList&); + AbsoluteProxyList& operator =(const AbsoluteProxyList&); + + friend class AbsoluteLayout; +}; // AbsoluteProxyList + +// Relative layout +class RelativeProxyList + : public ProxyList +{ +public: + virtual result OnAddNode(ProxyListNode& pAddNode); + virtual result OnRemoveNode(ProxyListNode& pRemoveNode); + void SetRelativeLayout(RelativeLayout* pLayout); + int GetReferenceCount(ProxyListNode& pNode) const; + +private: + RelativeProxyList(void); + virtual ~RelativeProxyList(void); + +private: + RelativeLayout* __pRelativeLayout; + + friend class RelativeLayout; +}; // RelativeProxyList + +// Table layout +class TableProxyList + : public ProxyList +{ +public: + virtual result OnAddNode(ProxyListNode& addNode); + virtual result OnRemoveNode(ProxyListNode& removeNode); + +private: + TableProxyList(void); + virtual ~TableProxyList(void); + + friend class TableLayout; +}; // TableProxyList + +// Linear layout +class LinearProxyList + : public ProxyList +{ +public: + virtual result OnAddNode(ProxyListNode& addNode); + virtual result OnRemoveNode(ProxyListNode& removeNode); + +protected: + LinearProxyList(void); + virtual ~LinearProxyList(void); + +private: + LinearProxyList(const LinearProxyList&); + LinearProxyList& operator =(const LinearProxyList&); + + friend class LinearLayout; +}; // LinearProxyList + +}}} //Tizen::Ui::_Layout + +#endif // _FUI_INTERNAL_LAYOUT_PROXY_LIST_H_ diff --git a/src/ui/layout/FUi_LayoutProxyListNode.cpp b/src/ui/layout/FUi_LayoutProxyListNode.cpp new file mode 100644 index 0000000..c97b92d --- /dev/null +++ b/src/ui/layout/FUi_LayoutProxyListNode.cpp @@ -0,0 +1,64 @@ +// +// 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_LayoutProxyListNode.cpp + * @brief This is the implementation file for ProxyListNode class. + * + * This file contains the implementation of ProxyListNode class. + */ + +#include "FUi_LayoutProxyListNode.h" +#include "FUi_LayoutLayoutItemProxy.h" + +namespace Tizen { namespace Ui { namespace _Layout +{ + +ProxyListNode::ProxyListNode(void) + : __pItemProxy(null) + , __pItemInfo(null) +{ +} + +ProxyListNode::~ProxyListNode(void) +{ +} + +void +ProxyListNode::Create(LayoutItemProxy& pItemProxy) +{ + __pItemProxy = &pItemProxy; +} + +void +ProxyListNode::SetItemInfo(LayoutItemInfo* pItemInfo) +{ + __pItemInfo = pItemInfo; +} + +LayoutItemInfo* +ProxyListNode::GetItemInfo(void) const +{ + return __pItemInfo; +} + +LayoutItemProxy* +ProxyListNode::GetItemProxy(void) const +{ + return __pItemProxy; +} + +}}} // Tizen::Ui::_Layout diff --git a/src/ui/layout/FUi_LayoutProxyListNode.h b/src/ui/layout/FUi_LayoutProxyListNode.h new file mode 100644 index 0000000..ca534b4 --- /dev/null +++ b/src/ui/layout/FUi_LayoutProxyListNode.h @@ -0,0 +1,70 @@ +// +// 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_LayoutProxyListNode.h + * @brief This is the header file for ProxyListNode class. + * + * This header file contains the declaration of ProxyListNode class. + */ + +#pragma once + +#ifndef _FUI_INTERNAL_LAYOUT_PROXY_LIST_NODE_H_ +#define _FUI_INTERNAL_LAYOUT_PROXY_LIST_NODE_H_ + +#include +#include "FUi_LayoutLinkedListNode.h" + +namespace Tizen +{ +namespace Ui +{ +namespace _Layout +{ + +class LayoutItemProxy; +class LayoutItemInfo; + +class ProxyListNode + : public LinkedListNode +{ +public: + void SetItemInfo(LayoutItemInfo* pItemInfo); + LayoutItemProxy* GetItemProxy(void) const; + LayoutItemInfo* GetItemInfo(void) const; + +protected: + ProxyListNode(void); + virtual ~ProxyListNode(void); + + void Create(LayoutItemProxy& pProxy); + +private: + ProxyListNode(const ProxyListNode&); + ProxyListNode& operator =(const ProxyListNode&); + +// property +private: + LayoutItemProxy* __pItemProxy; + LayoutItemInfo* __pItemInfo; + + friend class ProxyList; +}; // ProxyListNode + +}}} //Tizen::Ui::_Layout + +#endif // _FUI_INTERNAL_LAYOUT_PROXY_LIST_NODE_H_ diff --git a/src/ui/layout/FUi_LayoutRelativeLayout.cpp b/src/ui/layout/FUi_LayoutRelativeLayout.cpp new file mode 100644 index 0000000..533b177 --- /dev/null +++ b/src/ui/layout/FUi_LayoutRelativeLayout.cpp @@ -0,0 +1,931 @@ +// +// 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_LayoutRelativeLayout.cpp + * @brief This is the implementation file for RelativeLayout class. + * + * This file contains the implementation of RelativeLayout class. + */ + +#include +#include +#include +#include "FUi_LayoutRelativeLayout.h" +#include "FUi_LayoutLayoutItemProxy.h" +#include "FUi_LayoutProxyList.h" +#include "FUi_LayoutLayoutItemInfo.h" + +namespace Tizen { namespace Ui { namespace _Layout +{ + +// relative layout +RelativeLayout::RelativeLayout() + : __pTargetParent(reinterpret_cast (0xffff)) +{ + RelativeProxyList* pRelativeProxyList = new (std::nothrow) RelativeProxyList(); + SysTryReturnVoidResult(NID_UI, pRelativeProxyList, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SetItemList(pRelativeProxyList); + + pRelativeProxyList->SetRelativeLayout(this); +} + +RelativeLayout::~RelativeLayout() +{ +} + +RelativeLayout* +RelativeLayout::CreateRelativeLayoutN() +{ + RelativeLayout* pLayout = new (std::nothrow) RelativeLayout(); + SysTryReturn(NID_UI, pLayout != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Relative layout core allocation failure."); + if (GetLastResult() != E_SUCCESS) + { + delete pLayout; + return null; + } + + return pLayout; +} + +result +RelativeLayout::SetRelation(LayoutItem& item, const RelativeLayoutEdge itemEdge, LayoutItem* pTarget, + const RelativeLayoutEdge targetEdge) +{ + ProxyList* pProxyList = GetProxyList(); + SysAssertf(pProxyList != null, "ProxyList is invalid."); + + ProxyListNode* pSourceNode = pProxyList->GetNode(item); + ProxyListNode* pTargetNode = pProxyList->GetNode(*pTarget); + LayoutItemProxy* pContainerProxy = GetContainerProxy(); + + if (pContainerProxy == null) + { + return E_INVALID_STATE; + } + + if (pSourceNode == null || + (pTarget != null && pTarget != pContainerProxy->GetItem() && pTargetNode == null)) + { + return E_INVALID_ARG; + } + + if (itemEdge == EDGE_ALL) + { + return E_INVALID_ARG; + } + + if (itemEdge == EDGE_NONE) + { + for (int i = EDGE_LEFT; i < EDGE_ALL; i++) + { + UnsetRelation(item, static_cast (i)); + } + + SetUpdateState(true); + SetPartialUpdateFlag(true); + return E_SUCCESS; + } + + if (itemEdge == EDGE_HCENTER || itemEdge == EDGE_VCENTER) + { + if (pTarget != null || targetEdge != EDGE_NONE) + { + return E_INVALID_ARG; + } + } + + // release to relation if exist relation + result r = E_SYSTEM; + if (GetRelation(item, itemEdge, null) != null) + { + r = UnsetRelation(item, itemEdge); + if (r != E_SUCCESS) + { + return r; + } + } + + int rollBackRefCount = 0; + RelativeItemInfo* pTargetItemInfo = null; + if (pTargetNode != null) + { + pTargetItemInfo = static_cast (pTargetNode->GetItemInfo()); + if (pTargetItemInfo == null) + { + return E_INVALID_STATE; + } + rollBackRefCount = pTargetItemInfo->__refCount; + } + r = SetAlignment(*pSourceNode, itemEdge, pTargetNode, targetEdge); + if (r != E_SUCCESS) + { + return r; + } + + if (pTargetItemInfo != null && IncreaseReferenceCount(*pSourceNode) != E_SUCCESS) + { + r = UnsetAlignment(*pSourceNode, itemEdge, null); + if (r != E_SUCCESS) + { + SysAssert(false); + } + DecreaseReferenceCount(*pSourceNode, *pTargetNode); + pTargetItemInfo->__refCount = rollBackRefCount; + r = IncreaseReferenceCount(*pTargetNode); + if (r != E_SUCCESS) + { + SysAssert(false); + } + + ProxyListNode* pCurNode = pProxyList->GetFirstNode(); + while (pCurNode) + { + r = IncreaseReferenceCount(*pCurNode); + if (r != E_SUCCESS) + { + SysAssert(false); + } + pCurNode = pProxyList->GetNextNode(*pCurNode); + } + + return E_SYSTEM; + } + + SetUpdateState(true); + SetPartialUpdateFlag(true); + return E_SUCCESS; +} + +result +RelativeLayout::UnsetRelation(LayoutItem& item, const RelativeLayoutEdge itemEdge) +{ + RelativeProxyList* pRelativeProxyList = GetRelativeProxyList(); + SysTryReturn(NID_UI, pRelativeProxyList, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] RelativeProxyList is invalid."); + + ProxyListNode* pItemNode = pRelativeProxyList->GetNode(item); + if (pItemNode == null) + { + return E_INVALID_ARG; + } + + if (itemEdge == EDGE_NONE || itemEdge == EDGE_ALL) + { + return E_INVALID_ARG; + } + + result r = E_SYSTEM; + ProxyListNode* pTargetNode = null; + LayoutItemProxy* pTargetProxy = null; + r = UnsetAlignment(*pItemNode, itemEdge, &pTargetProxy); + if (r != E_SUCCESS) + { + return r; + } + if (pTargetProxy != null) + { + pTargetNode = pRelativeProxyList->GetNode(*(pTargetProxy->GetItem())); + if (pTargetNode == null) + { + return E_INVALID_STATE; + } + } + + if (pTargetNode == null) + { + SetUpdateState(true); + SetPartialUpdateFlag(true); + + return E_SUCCESS; + } + + // Refcount of all nodes is set to 0. + DecreaseReferenceCount(*pItemNode, *pTargetNode); + + // find another node to refer to pTargetNode. + ProxyListNode* pCurNode = pRelativeProxyList->GetFirstNode(); + int maxRefCount = 0; + int nodeIndex = 0; + while (pCurNode != null) + { + for (int i = EDGE_LEFT; i <= EDGE_BOTTOM; i++) + { + LayoutItemProxy* pTargetProxy = GetAlignment(*pCurNode, static_cast (i)); + if (pTargetProxy != null && pTargetProxy != GetContainerProxy()) + { + ProxyListNode* pCurTargetNode = pRelativeProxyList->GetNode(*(pTargetProxy->GetItem())); + if (pTargetNode == pCurTargetNode) + { + if (maxRefCount < pRelativeProxyList->GetReferenceCount(*pCurNode)) + { + maxRefCount = pRelativeProxyList->GetReferenceCount(*pCurNode); + nodeIndex = pRelativeProxyList->GetIndex(*pCurNode); + } + } + } + } + pCurNode = pRelativeProxyList->GetNextNode(*pCurNode); + } + + if (nodeIndex != 0) + { + pCurNode = pRelativeProxyList->GetNode(nodeIndex); + IncreaseReference(*pTargetNode, *pCurNode); + } + + // Nodes Recalculation + r = IncreaseReferenceCount(*pTargetNode); + if (r != E_SUCCESS) + { + return r; + } + + SetUpdateState(true); + SetPartialUpdateFlag(true); + return E_SUCCESS; +} + +LayoutItem* +RelativeLayout::GetRelation(LayoutItem& item, const RelativeLayoutEdge itemEdge, RelativeLayoutEdge* pTargetEdge) +{ + ProxyList* pProxyList = GetProxyList(); + SysAssertf(pProxyList != null, "ProxyList is invalid."); + + ProxyListNode* pNode = pProxyList->GetNode(item); + + if (pNode != null) + { + LayoutItemProxy* pItemProxy = GetAlignment(*pNode, itemEdge, pTargetEdge); + if (pItemProxy) + { + return pItemProxy->GetItem(); + } + } + + return null; +} + +result +RelativeLayout::OnLayout(float width, float height, bool updateLayouting) +{ + result r = E_SUCCESS; + ProxyList* pProxyList = GetProxyList(); + SysAssertf(pProxyList != null, "ProxyList is invalid."); + + LayoutItemProxy* pContainerProxy = GetContainerProxy(); + if (pContainerProxy == null) + { + return E_INVALID_STATE; + } + + LayoutRect windowRect = {0.0f, 0.0f, width, height}; + LayoutRect clientRect; + pContainerProxy->ConvertWindowToClientBounds(windowRect, clientRect); + + LayoutRect layoutRect = GetLayoutRect(); + clientRect.x = layoutRect.x; + clientRect.y = layoutRect.y; + + float correctionWidth = windowRect.w - clientRect.w; + float correctionHeight = windowRect.h - clientRect.h; + + if (correctionWidth < 0.0f) + { + correctionWidth = 0.0f; + } + if (correctionHeight < 0.0f) + { + correctionHeight = 0.0f; + } + + LayoutMatchMode widthMatchMode = pContainerProxy->GetItemWidthMatchMode(); + LayoutMatchMode heightMatchMode = pContainerProxy->GetItemHeightMatchMode(); + + SetLayoutRect(clientRect); + + float childrenMaxPosX = 0.0f; + float childrenMaxPosY = 0.0f; + LayoutRect childRect = {0.0f, 0.0f, 0.0f, 0.0f}; + + ProxyListNode* pCurNode = pProxyList->GetFirstNode(); + + while (pCurNode != null) + { + r = CalculatePosition(*pCurNode); + r = CalculateCenter(*pCurNode, r == E_SUCCESS); + if (r != E_SUCCESS) + { + return r; + } + + LayoutItemProxy* pItemProxy = pCurNode->GetItemProxy(); + if (pItemProxy == null) + { + return E_INVALID_STATE; + } + + pItemProxy->GetItemWindowRect(childRect); + + if (childrenMaxPosX < childRect.x + childRect.w) + { + childrenMaxPosX = childRect.x + childRect.w; + if (GetAlignment(*pCurNode, EDGE_RIGHT) != null) + { + ItemMargin margin = pItemProxy->GetItemMargin(); + childrenMaxPosX += margin.right; + } + } + + if (childrenMaxPosY < childRect.y + childRect.h) + { + childrenMaxPosY = childRect.y + childRect.h; + if (GetAlignment(*pCurNode, EDGE_BOTTOM) != null) + { + ItemMargin margin = pItemProxy->GetItemMargin(); + childrenMaxPosY += margin.bottom; + } + } + + pCurNode = pProxyList->GetNextNode(*pCurNode); + } + + if (widthMatchMode == WRAP_CONTENT) + { + clientRect.w = childrenMaxPosX + correctionWidth; + } + else + { + clientRect.w += correctionWidth; + } + + if (heightMatchMode == WRAP_CONTENT) + { + clientRect.h = childrenMaxPosY + correctionHeight; + } + else + { + clientRect.h += correctionHeight; + } + + SetLayoutRect(clientRect); + LayoutRect containerRect; + pContainerProxy->GetItemWindowRect(containerRect); + clientRect.x = containerRect.x; + clientRect.y = containerRect.y; + if (windowRect.w != clientRect.w || windowRect.h != clientRect.h) + { + if (updateLayouting) + { + pContainerProxy->SetItemWindowRect(clientRect); + } + // Recalculate + pCurNode = pProxyList->GetFirstNode(); + while (pCurNode) + { + r = CalculatePosition(*pCurNode); + r = CalculateCenter(*pCurNode, r == E_SUCCESS); + pCurNode = pProxyList->GetNextNode(*pCurNode); + } + } + + return r; +} + +result +RelativeLayout::IncreaseReferenceCount(ProxyListNode& node) +{ + ProxyList* pProxyList = GetProxyList(); + SysAssertf(pProxyList != null, "ProxyList is invalid."); + + ProxyListNode* pTargetNode = null; + result r = E_SUCCESS; + for (int i = EDGE_LEFT; i < EDGE_ALL; i++) + { + LayoutItemProxy* pProxy = GetAlignment(node, static_cast (i)); + if (pProxy == null || pProxy == GetContainerProxy()) + { + continue; + } + pTargetNode = pProxyList->GetNode(*(pProxy->GetItem())); + if (pTargetNode != null) + { + r = IncreaseReference(*pTargetNode, node); + if (r == E_SUCCESS) + { + r = IncreaseReferenceCount(*pTargetNode); + if (r != E_SUCCESS) + { + return r; + } + } + else + { + return r; + } + } + } + // Order of nodes is recalculate + return AlignItemNodeMaxRefMove(); +} + +void +RelativeLayout::DecreaseReferenceCount(ProxyListNode& node, ProxyListNode& pTargetNode) +{ + ProxyListNode* pTargetTargetNode = null; + for (int i = EDGE_LEFT; i <= EDGE_BOTTOM; i++) + { + pTargetTargetNode = GetTargetNode(pTargetNode, static_cast (i)); + if (pTargetTargetNode != null) + { + DecreaseReferenceCount(pTargetNode, *pTargetTargetNode); + } + } + //if (pTargetNode != null) + //{ + SetZeroReference(pTargetNode, node); + //} +} + +result +RelativeLayout::AlignItemNodeMaxRefMove() +{ + result r = E_SUCCESS; + + RelativeProxyList* pRelativeProxyList = GetRelativeProxyList(); + SysTryReturn(NID_UI, pRelativeProxyList, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] RelativeProxyList is invalid."); + + ProxyListNode* pCurNode = pRelativeProxyList->GetFirstNode(); + ProxyListNode* pNextNode = pCurNode; + int maxRefCount = 0; + + while (pCurNode != null) + { + pNextNode = pRelativeProxyList->GetNextNode(*pCurNode); + maxRefCount = pRelativeProxyList->GetReferenceCount(*pCurNode); + + if (pNextNode != null && maxRefCount < pRelativeProxyList->GetReferenceCount(*pNextNode)) + { + ProxyListNode* pMoveNode = pNextNode; + if (pRelativeProxyList->DetachNode(*pMoveNode) != E_SUCCESS) + { + break; + } + + maxRefCount = pRelativeProxyList->GetReferenceCount(*pMoveNode); + + pCurNode = pRelativeProxyList->GetFirstNode(); + while (pRelativeProxyList->GetReferenceCount(*pCurNode) >= maxRefCount) + { + pCurNode = pRelativeProxyList->GetNextNode(*pCurNode); + } + pRelativeProxyList->InsertIntoLeft(*pCurNode, *pMoveNode); + return E_SUCCESS; + } + else + { + pCurNode = pRelativeProxyList->GetNextNode(*pCurNode); + } + } + + return r; +} + +result +RelativeLayout::DeleteTargetInfo(ProxyListNode& targetNode, ProxyListNode& deleteNode) +{ + RelativeItemInfo* pItemInfo = static_cast (targetNode.GetItemInfo()); + if (pItemInfo == null) + { + return E_INVALID_STATE; + } + for (int i = EDGE_LEFT; i < EDGE_ALL; i++) + { + if (pItemInfo->__pTarget[i] == deleteNode.GetItemProxy()) + { + UnsetRelation(*(targetNode.GetItemProxy()->GetItem()), static_cast (i)); + } + } + return E_SUCCESS; +} + +result +RelativeLayout::CalculatePosition(ProxyListNode& curNode) +{ + RelativeItemInfo* pCurItemInfo = null; + LayoutItemProxy* pCurProxy = null; + ItemMargin curItemMargin = {0.0f, 0.0f, 0.0f, 0.0f}; + LayoutRect curItemRect = {0.0f, 0.0f, 0.0f, 0.0f}; + LayoutPoint targetPosition = {0.0f, 0.0f}; + result r = E_SYSTEM; + + pCurItemInfo = static_cast (curNode.GetItemInfo()); + pCurProxy = curNode.GetItemProxy(); + + if (pCurItemInfo == null || pCurProxy == null) + { + return E_INVALID_STATE; + } + + curItemRect = pCurProxy->GetItemBaseRect(); + GetItemMargin(*(pCurProxy->GetItem()), curItemMargin); + + r = pCurProxy->Measure(curItemRect.w, curItemRect.h); + if (r != E_SUCCESS) + { + return r; + } + pCurProxy->GetMeasuredSize(curItemRect.w, curItemRect.h); + + if (pCurItemInfo->__pTarget[EDGE_LEFT] != null) + { + r = GetTargetPosition(pCurItemInfo->__pTarget[EDGE_LEFT], pCurItemInfo->__targetEdge[EDGE_LEFT], targetPosition); + if (r != E_SUCCESS) + { + return r; + } + curItemRect.x = targetPosition.x + curItemMargin.left; + } + + if (pCurItemInfo->__pTarget[EDGE_TOP] != null) + { + r = GetTargetPosition(pCurItemInfo->__pTarget[EDGE_TOP], pCurItemInfo->__targetEdge[EDGE_TOP], targetPosition); + if (r != E_SUCCESS) + { + return r; + } + LayoutRect alignedRect; + AlignToDevice(curItemRect, alignedRect); + curItemRect.h = alignedRect.h; + curItemRect.y = targetPosition.y + curItemMargin.top; + } + + if (pCurItemInfo->__pTarget[EDGE_RIGHT] != null) + { + r = GetTargetPosition(pCurItemInfo->__pTarget[EDGE_RIGHT], pCurItemInfo->__targetEdge[EDGE_RIGHT], targetPosition); + if (r != E_SUCCESS) + { + return r; + } + + if (pCurItemInfo->__pTarget[EDGE_LEFT] != null) + { + curItemRect.w = targetPosition.x - curItemRect.x - curItemMargin.right; + } + curItemRect.x = targetPosition.x - curItemMargin.right - curItemRect.w; + } + + if (pCurItemInfo->__pTarget[EDGE_BOTTOM] != null) + { + r = GetTargetPosition(pCurItemInfo->__pTarget[EDGE_BOTTOM], pCurItemInfo->__targetEdge[EDGE_BOTTOM], targetPosition); + if (r != E_SUCCESS) + { + return r; + } + + LayoutRect alignedRect; + AlignToDevice(curItemRect, alignedRect); + curItemRect.h = alignedRect.h; + if (pCurItemInfo->__pTarget[EDGE_TOP] != null) + { + curItemRect.h = targetPosition.y - curItemRect.y - curItemMargin.bottom; + } + curItemRect.y = targetPosition.y - curItemMargin.bottom - curItemRect.h; + } + + r = pCurProxy->Measure(curItemRect.w, curItemRect.h); + if (r != E_SUCCESS) + { + return r; + } + pCurProxy->GetMeasuredSize(curItemRect.w, curItemRect.h); + + r = pCurProxy->SetItemWindowRect(curItemRect); + if (r != E_SUCCESS) + { + return r; + } + + return r; +} + +result +RelativeLayout::CalculateCenter(ProxyListNode& curNode, bool calcPosition) +{ + LayoutRect targetRect; + RelativeItemInfo* pCurItemInfo = null; + LayoutItemProxy* pCurProxy = null; + LayoutRect curItemRect = {0.0f, 0.0f, 0.0f, 0.0f}; + result r = E_SYSTEM; + + pCurItemInfo = static_cast (curNode.GetItemInfo()); + pCurProxy = curNode.GetItemProxy(); + + if (pCurItemInfo == null || pCurProxy == null) + { + return E_INVALID_STATE; + } + + if (pCurItemInfo->__pTarget[EDGE_HCENTER] == null && pCurItemInfo->__pTarget[EDGE_VCENTER] == null) + { + return E_SUCCESS; + } + + if (calcPosition) + { + pCurProxy->GetItemWindowRect(curItemRect); + } + else + { + curItemRect = pCurProxy->GetItemBaseRect(); + } + + r = pCurProxy->Measure(curItemRect.w, curItemRect.h); + if (r != E_SUCCESS) + { + return r; + } + pCurProxy->GetMeasuredSize(curItemRect.w, curItemRect.h); + + if (pCurItemInfo->__pTarget[EDGE_HCENTER] == __pTargetParent) + { + targetRect = GetLayoutRect(); + float targetWidth = targetRect.w; + float margin = ((targetWidth - curItemRect.w) / 2); + curItemRect.x = margin + targetRect.x; + } + + if (pCurItemInfo->__pTarget[EDGE_VCENTER] == __pTargetParent) + { + targetRect = GetLayoutRect(); + float targetHeight = targetRect.h; + float margin = ((targetHeight - curItemRect.h) / 2); + curItemRect.y = margin + targetRect.y; + } + + r = pCurProxy->Measure(curItemRect.w, curItemRect.h); + if (r != E_SUCCESS) + { + return r; + } + pCurProxy->GetMeasuredSize(curItemRect.w, curItemRect.h); + + r = pCurProxy->SetItemWindowRect(curItemRect); + if (r != E_SUCCESS) + { + return r; + } + + return r; +} + +bool +RelativeLayout::CheckTargetEdge(const RelativeLayoutEdge sourceEdge, const RelativeLayoutEdge targetEdge) const +{ + if (sourceEdge & 0x1) + { + if (targetEdge & 0x1) + { + return true; + } + else + { + return false; + } + } + else if (!(sourceEdge & 0x1)) + { + if (targetEdge & 0x1) + { + return false; + } + else + { + return true; + } + } + + return false; +} + +result +RelativeLayout::SetAlignment(ProxyListNode& sourceNode, const RelativeLayoutEdge sourceEdge, ProxyListNode* pTargetNode, const RelativeLayoutEdge targetEdge) +{ + RelativeLayoutEdge realTargetEdge = targetEdge; + if (realTargetEdge == EDGE_NONE) + { + realTargetEdge = sourceEdge; + } + + if (!CheckTargetEdge(sourceEdge, realTargetEdge)) + { + return E_INVALID_ARG; + } + + RelativeItemInfo* pSourceItemInfo = static_cast (sourceNode.GetItemInfo()); + + if (pSourceItemInfo == null || pSourceItemInfo->__targetEdge[sourceEdge] != EDGE_NONE || pSourceItemInfo->__pTarget[sourceEdge] != null) + { + return E_INVALID_STATE; + } + + LayoutItemProxy* pTargetProxy = null; + if (pTargetNode == null) + { + pTargetProxy = const_cast (__pTargetParent); + } + else + { + pTargetProxy = pTargetNode->GetItemProxy(); + } + if (pTargetProxy == null) + { + return E_INVALID_ARG; + } + + pSourceItemInfo->__targetEdge[sourceEdge] = realTargetEdge; + pSourceItemInfo->__pTarget[sourceEdge] = pTargetProxy; + + return E_SUCCESS; +} + +result +RelativeLayout::UnsetAlignment(ProxyListNode& sourceNode, const RelativeLayoutEdge sourceEdge, LayoutItemProxy** ppTargetProxy) +{ + RelativeItemInfo* pSourceItemInfo = static_cast (sourceNode.GetItemInfo()); + + if (pSourceItemInfo == null) + { + return E_INVALID_STATE; + } + + if (sourceEdge != EDGE_NONE) + { + pSourceItemInfo->__targetEdge[sourceEdge] = EDGE_NONE; + if (pSourceItemInfo->__pTarget[sourceEdge] != null) + { + if (ppTargetProxy != null) + { + if (pSourceItemInfo->__pTarget[sourceEdge] != __pTargetParent) + { + *ppTargetProxy = pSourceItemInfo->__pTarget[sourceEdge]; + } + else + { + *ppTargetProxy = null; + } + } + pSourceItemInfo->__pTarget[sourceEdge] = null; + } + else + { + return E_INVALID_STATE; + } + return E_SUCCESS; + } + + return E_SYSTEM; +} + +LayoutItemProxy* +RelativeLayout::GetAlignment(ProxyListNode& sourceNode, const RelativeLayoutEdge sourceEdge, RelativeLayoutEdge* pTargetEdge) +{ + SysTryReturn(NID_UI, sourceEdge >= EDGE_NONE, null, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] Argument is out of range."); + SysTryReturn(NID_UI, sourceEdge <= EDGE_VCENTER, null, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] Argument is out of range."); + RelativeItemInfo* pSourceItemInfo = static_cast (sourceNode.GetItemInfo()); + + SysTryReturn(NID_UI, pSourceItemInfo, null, E_INVALID_STATE, "[E_INVALID_STATE] RelativeItemInfo is invalid."); + + if (pTargetEdge != null) + { + *pTargetEdge = pSourceItemInfo->__targetEdge[sourceEdge]; + } + + if (pSourceItemInfo->__pTarget[sourceEdge] != __pTargetParent) + { + return pSourceItemInfo->__pTarget[sourceEdge]; + } + else + { + return GetContainerProxy(); + } +} + +result +RelativeLayout::IncreaseReference(ProxyListNode& targetNode, ProxyListNode& sourceNode) +{ + ProxyList* pProxyList = GetProxyList(); + SysAssertf(pProxyList != null, "ProxyList is invalid."); + + RelativeItemInfo* pTargetItemInfo = static_cast (targetNode.GetItemInfo()); + RelativeItemInfo* pSourceItemInfo = static_cast (sourceNode.GetItemInfo()); + + if (pTargetItemInfo == null || pSourceItemInfo == null) + { + return E_INVALID_STATE; + } + + int refCount = pSourceItemInfo->__refCount + 1; + + if (refCount > pProxyList->GetNodeCount() - 1) + { + return E_INVALID_STATE; + } + + if (refCount > pTargetItemInfo->__refCount) + { + pTargetItemInfo->__refCount = refCount; + } + return E_SUCCESS; +} + +ProxyListNode* +RelativeLayout::GetTargetNode(ProxyListNode& node, RelativeLayoutEdge sourceEdge) +{ + ProxyList* pProxyList = GetProxyList(); + SysAssertf(pProxyList != null, "ProxyList is invalid."); + + LayoutItemProxy* pProxy = GetAlignment(node, sourceEdge); + if (pProxy == null || pProxy == GetContainerProxy()) + { + return null; + } + return pProxyList->GetNode(*(pProxy->GetItem())); +} + +result +RelativeLayout::SetZeroReference(ProxyListNode& node, ProxyListNode& baseNode) +{ + RelativeItemInfo* pTargetItemInfo = static_cast (node.GetItemInfo()); + if (pTargetItemInfo == null) + { + return E_INVALID_STATE; + } + + pTargetItemInfo->__refCount = 0; + + return E_SUCCESS; +} + +result +RelativeLayout::GetTargetPosition(LayoutItemProxy* pTargetProxy, const RelativeLayoutEdge targetEdge, LayoutPoint& targetPoint) const +{ + if (pTargetProxy == null) + { + return E_INVALID_ARG; + } + + LayoutRect targetRect; + if (pTargetProxy == __pTargetParent) + { + targetRect = GetLayoutRect(); + } + else + { + pTargetProxy->GetItemWindowRect(targetRect); + } + + switch (targetEdge) + { + case EDGE_LEFT: + targetPoint.x = targetRect.x; + break; + + case EDGE_TOP: + targetPoint.y = targetRect.y; + break; + + case EDGE_RIGHT: + targetPoint.x = targetRect.x + targetRect.w; + break; + + case EDGE_BOTTOM: + targetPoint.y = targetRect.y + targetRect.h; + break; + + default: + return E_SYSTEM; + } + + return E_SUCCESS; +} + +RelativeProxyList* +RelativeLayout::GetRelativeProxyList(void) +{ + return static_cast (GetProxyList()); +} + +}}} // Tizen::Ui::_Layout diff --git a/src/ui/layout/FUi_LayoutTableLayout.cpp b/src/ui/layout/FUi_LayoutTableLayout.cpp new file mode 100644 index 0000000..3fe44d9 --- /dev/null +++ b/src/ui/layout/FUi_LayoutTableLayout.cpp @@ -0,0 +1,2418 @@ +// +// 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_LayoutTableLayout.cpp + * @brief This is the implementation file for TableLayout class. + * + * This file contains the implementation of TableLayout class. + */ + +#include +#include +#include +#include +#include +#include "FUi_Math.h" +#include "FUi_LayoutTableLayout.h" +#include "FUi_LayoutLayoutItemProxy.h" +#include "FUi_LayoutProxyList.h" +#include "FUi_LayoutLayoutItemInfo.h" + +using namespace Tizen::Base; + +namespace Tizen { namespace Ui { namespace _Layout +{ + +TableLayout::TableLayout(void) + : Layout() + , __row(0) + , __column(0) + , __maxRow(0) + , __maxColumn(0) + , __shrinkRowCount(0) + , __shrinkColumnCount(0) + , __stretchRowCount(0) + , __stretchColumnCount(0) + , __rowShrinkable(false) + , __columnShrinkable(false) + , __rowStretchable(false) + , __columnStretchable(false) + , __pRowInfo(null) + , __pColInfo(null) +{ + TableProxyList* pTableProxyList = new (std::nothrow) TableProxyList(); + SysTryReturnVoidResult(NID_UI, pTableProxyList, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + SetItemList(pTableProxyList); +} + +TableLayout::~TableLayout(void) +{ + __mergedCellList.RemoveAll(true); + + delete[] __pRowInfo; + delete[] __pColInfo; +} + +TableLayout* +TableLayout::CreateTableLayoutN(void) +{ + TableLayout* pLayout = new (std::nothrow) TableLayout(); + SysTryReturn(NID_UI, pLayout != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Table layout core allocation failure."); + if (GetLastResult() != E_SUCCESS) + { + delete pLayout; + return null; + } + + return pLayout; +} + +result +TableLayout::CreateTable(int row, int column, float spacing) +{ + if (row < 1 || column < 1) + { + SysTryReturn(NID_UI, false, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Negative argument : row(%d), column(%d)", row, + column); + } + + __row = row; + __column = column; + __maxRow = row; + __maxColumn = column; + + __pColInfo = new (std::nothrow) ColumnInfo[__column]; + SysTryReturn(NID_UI, __pColInfo != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + + memset(__pColInfo, 0, sizeof(ColumnInfo) * __column); + + for (int i = 0; i < __column; i++) + { + __pColInfo[i].widthSpacing = spacing; + } + + __pRowInfo = new (std::nothrow) RowInfo[__row]; + SysTryReturn(NID_UI, __pRowInfo != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + + memset(__pRowInfo, 0, sizeof(RowInfo) * __row); + + for (int i = 0; i < __row; i++) + { + __pRowInfo[i].heightSpacing = spacing; + } + + return E_SUCCESS; +} + +result +TableLayout::CalculateSize() +{ + if (__row < 1 || __column < 1) + { + return E_SUCCESS; + } + + float nextPosX = 0.0f; + float nextPosY = 0.0f; + + __shrinkRowCount = 0; + __shrinkColumnCount = 0; + __stretchRowCount = 0; + __stretchColumnCount = 0; + + for (int j = 0; j < __column; j++) + { + __pColInfo[j].x = 0.0f; + __pColInfo[j].width = 0.0f; + __pColInfo[j].maxWidth = 0.0f; + __pColInfo[j].mergedWidth = 0.0f; + } + + ProxyListNode* pCurNode = null; + TableItemInfo* pItemInfo = null; + LayoutItemProxy* pItemProxy = null; + + for (int i = 0; i < __row; i++) + { + __pRowInfo[i].y = 0.0f; + __pRowInfo[i].height = 0.0f; + __pRowInfo[i].maxHeight = 0.0f; + __pRowInfo[i].mergedHeight = 0.0f; + + for (int j = 0; j < __column; j++) + { + pCurNode = GetNode(i, j); + if (pCurNode != null) + { + pItemInfo = static_cast (pCurNode->GetItemInfo()); + + pItemProxy = pCurNode->GetItemProxy(); + if (pItemInfo == null || pItemProxy == null) + { + return E_INVALID_STATE; + } + + if (pItemInfo->__enable) + { + pItemProxy->GetMinSize(pItemInfo->__minSize); + pItemProxy->GetMaxSize(pItemInfo->__maxSize); + } + + LayoutRect rect = pItemProxy->GetItemBaseRect(); + + result r = pItemProxy->Measure(rect.w, rect.h); + if (r != E_SUCCESS) + { + return r; + } + pItemProxy->GetMeasuredSize(rect.w, rect.h); + + ItemMargin margin = pItemProxy->GetItemMargin(); + if (!__pColInfo[j].widthStretchable && !__pColInfo[j].widthShrinkable) + { + rect.w += margin.left + margin.right; + } + + if (!__pRowInfo[i].heightStretchable && !__pRowInfo[i].heightShrinkable) + { + rect.h += margin.top + margin.bottom; + } + + if (!pItemInfo->__merged) + { + if (__pColInfo[j].maxWidth < rect.w && !__pRowInfo[i].rowCollapsed) + { + __pColInfo[j].maxWidth = rect.w; + } + + if (__pRowInfo[i].maxHeight < rect.h && !__pColInfo[j].columnCollapsed) + { + __pRowInfo[i].maxHeight = rect.h; + } + } + else + { + if (__pColInfo[j].mergedWidth < rect.w) + { + __pColInfo[j].mergedWidth = rect.w; + } + if (__pRowInfo[i].mergedHeight < rect.h) + { + __pRowInfo[i].mergedHeight = rect.h; + } + } + } + } + + if (!__pRowInfo[i].rowCollapsed) + { + if (__pRowInfo[i].heightStretchable) + { + __stretchRowCount++; + } + if (__pRowInfo[i].heightShrinkable) + { + __shrinkRowCount++; + } + + if (!_FloatHardCompare(__pRowInfo[i].maxHeight, 0.0f)) + { + __pRowInfo[i].height = __pRowInfo[i].maxHeight; + } + } + } + + for (int j = 0; j < __column; j++) + { + if (!__pColInfo[j].columnCollapsed) + { + if (__pColInfo[j].widthStretchable) + { + __stretchColumnCount++; + } + if (__pColInfo[j].widthShrinkable) + { + __shrinkColumnCount++; + } + + if (!_FloatHardCompare(__pColInfo[j].maxWidth, 0.0f)) + { + __pColInfo[j].width = __pColInfo[j].maxWidth; + } + } + } + + pCurNode = null; + pItemInfo = null; + pItemProxy = null; + + float mergedHeight = 0.0f; + float mergedWidth = 0.0f; + for (int i = __row - 1; i >= 0; i--) + { + if (!__pRowInfo[i].rowCollapsed) + { + for (int j = __column - 1; j >= 0; j--) + { + if (!__pColInfo[j].columnCollapsed) + { + pCurNode = GetNode(i, j); + if (pCurNode != null) + { + pItemInfo = static_cast (pCurNode->GetItemInfo()); + if (pItemInfo == null) + { + return E_INVALID_STATE; + } + pItemProxy = pCurNode->GetItemProxy(); + if (pItemInfo->__mergeEndPoint.x != NOT_MERGED) + { + int startRow = i; + int startColumn = j; + int endRow = pItemInfo->__mergeEndPoint.x; + int endColumn = pItemInfo->__mergeEndPoint.y; + + pItemProxy->GetMeasuredSize(mergedWidth, mergedHeight); + + float rowHeightSum = 0.0f; + if (startRow == 0) + { + rowHeightSum -= __pRowInfo[startRow].heightSpacing; + } + for (int k = startRow; k <= endRow; k++) + { + rowHeightSum += __pRowInfo[k].height + __pRowInfo[k].heightSpacing; + } + if (mergedHeight > rowHeightSum) + { + __pRowInfo[startRow].height += mergedHeight - rowHeightSum; + } + + float colWidthSum = 0.0f; + if (startColumn == 0) + { + colWidthSum -= __pColInfo[startColumn].widthSpacing; + } + for (int k = startColumn; k <= endColumn; k++) + { + colWidthSum += __pColInfo[k].width + __pColInfo[k].widthSpacing; + } + if (mergedWidth > colWidthSum) + { + __pColInfo[startColumn].width += mergedWidth - colWidthSum; + } + } + } + } + } + } + } + + LayoutRect layoutRect = GetLayoutRect(); + nextPosY = -__pRowInfo[0].heightSpacing + layoutRect.y; + for (int i = 0; i < __row; i++) + { + nextPosX = -__pColInfo[0].widthSpacing + layoutRect.x; + if (!__pRowInfo[i].rowCollapsed) + { + for (int j = 0; j < __column; j++) + { + if (!__pColInfo[j].columnCollapsed) + { + __pColInfo[j].x = nextPosX + __pColInfo[j].widthSpacing; + nextPosX = __pColInfo[j].x + __pColInfo[j].width; + } + } + __pRowInfo[i].y = nextPosY + __pRowInfo[i].heightSpacing; + nextPosY = __pRowInfo[i].y + __pRowInfo[i].height; + } + } + + layoutRect.w = nextPosX; + layoutRect.h = nextPosY; + SetLayoutRect(layoutRect); + + return E_SUCCESS; +} + +result +TableLayout::CalculateShrinkCell(const LayoutRect windowRect) +{ + __rowShrinkable = false; + __columnShrinkable = false; + + LayoutItemProxy* pContainerProxy = GetContainerProxy(); + if (pContainerProxy == null) + { + return E_INVALID_STATE; + } + + LayoutRect containerRect; + pContainerProxy->ConvertWindowToClientBounds(windowRect, containerRect); + + LayoutRect layoutRect = GetLayoutRect(); + + float shrinkTotalWidth = layoutRect.w - containerRect.w; + float shrinkTotalHeight = layoutRect.h - containerRect.h; + + int shrinkColumnCount = __shrinkColumnCount; + int shrinkRowCount = __shrinkRowCount; + + int* pShrinkedColumns = null; + int* pShrinkedRows = null; + + int lastShrinkRow = 0; + int lastShrinkColumn = 0; + + ProxyListNode* pCurNode = null; + TableItemInfo* pItemInfo = null; + + if (shrinkTotalWidth >= 0.0f && __shrinkColumnCount > 0) + { + if (pContainerProxy->GetItemWidthMatchMode() == WRAP_CONTENT) + { + return E_SUCCESS; + } + + __columnShrinkable = true; + + pShrinkedColumns = new (std::nothrow) int[__shrinkColumnCount]; + SysTryReturn(NID_UI, pShrinkedColumns != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + + memset(pShrinkedColumns, 0x00, sizeof(int) * __shrinkColumnCount); + + int shrinkedColumnCount = 0; + bool shrinkedItem = true; + + while (shrinkedItem && shrinkColumnCount != 0) + { + shrinkedItem = false; + + for (int j = 0; j < __column; j++) + { + int shrinkWidth = shrinkTotalWidth / shrinkColumnCount; + float shrinkedColWidth = __pColInfo[j].width; + + if (__pColInfo[j].widthShrinkable && !__pColInfo[j].columnCollapsed) + { + shrinkedColWidth -= shrinkWidth; + + if (shrinkedColWidth < 0.0f) + { + shrinkWidth += shrinkedColWidth; + + __pColInfo[j].width = 0.0f; + shrinkedColWidth = 0.0f; + __pColInfo[j].widthShrinkable = false; + + } + + for (int i = 0; i < __row; i++) + { + pCurNode = GetNode(i, j); + pItemInfo = null; + if (pCurNode != null) + { + pItemInfo = static_cast (pCurNode->GetItemInfo()); + } + if (pItemInfo != null && shrinkedColWidth < pItemInfo->__minSize.w) + { + shrinkWidth -= pItemInfo->__minSize.w - shrinkedColWidth; + __pColInfo[j].width = pItemInfo->__minSize.w; + __pColInfo[j].widthShrinkable = false; + } + } + + if (__pColInfo[j].widthShrinkable == false) + { + shrinkTotalWidth -= shrinkWidth; + layoutRect.w -= shrinkWidth; + shrinkColumnCount--; + + pShrinkedColumns[shrinkedColumnCount++] = j; + shrinkedItem = true; + + break; + } + } + } + } + + float nextPosX = -__pColInfo[0].widthSpacing + layoutRect.x; + + for (int j = 0; j < __column; j++) + { + __pColInfo[j].x = nextPosX + __pColInfo[j].widthSpacing; + + if (!__pColInfo[j].columnCollapsed) + { + if (shrinkColumnCount != 0) + { + int shrinkWidth = shrinkTotalWidth / shrinkColumnCount; + + if (__pColInfo[j].widthShrinkable) + { + __pColInfo[j].width -= shrinkWidth; + lastShrinkColumn = j; + layoutRect.w -= shrinkWidth; + } + } + nextPosX = __pColInfo[j].width + __pColInfo[j].x; + } + } + + nextPosX = -__pColInfo[0].widthSpacing + layoutRect.x; + float shrinkWidth = 0.0f; + if (!_FloatCompare(shrinkTotalWidth, 0.0f) && shrinkColumnCount != 0) + { + shrinkWidth = (int)shrinkTotalWidth % shrinkColumnCount; + } + bool shrinkableColumn = true; + + while (shrinkWidth > 0 && shrinkableColumn) + { + shrinkableColumn = false; + for (int j = 0; j < __column; j++) + { + __pColInfo[j].x = nextPosX + __pColInfo[j].widthSpacing; + + if (!__pColInfo[j].columnCollapsed) + { + if (shrinkColumnCount != 0) + { + if (__pColInfo[j].widthShrinkable) + { + for (int i = 0; i < __row; i++) + { + pCurNode = GetNode(i, j); + pItemInfo = null; + if (pCurNode != null) + { + pItemInfo = static_cast (pCurNode->GetItemInfo()); + } + if ((pItemInfo != null && ((__pColInfo[j].width - 1.0f) < pItemInfo->__minSize.w)) || (__pColInfo[j].width - 1.0f) < 0.0f) + { + pShrinkedColumns[shrinkedColumnCount++] = j; + __pColInfo[j].widthShrinkable = false; + shrinkColumnCount--; + break; + } + } + + if (__pColInfo[j].widthShrinkable && shrinkWidth > 0.0f) + { + if (shrinkWidth < 1.0f) + { + __pColInfo[j].width -= shrinkWidth; + layoutRect.w -= shrinkWidth; + shrinkWidth = 0.0f; + shrinkableColumn = true; + } + else + { + __pColInfo[j].width--; + layoutRect.w--; + shrinkWidth--; + shrinkableColumn = true; + } + } + } + } + nextPosX = __pColInfo[j].width + __pColInfo[j].x; + } + } + } + + for (int j = 0; j < shrinkedColumnCount; j++) + { + __pColInfo[pShrinkedColumns[j]].widthShrinkable = true; + } + + delete[] pShrinkedColumns; + } + + if (shrinkTotalHeight >= 0.0f && __shrinkRowCount > 0) + { + if (pContainerProxy->GetItemHeightMatchMode() == WRAP_CONTENT) + { + return E_SUCCESS; + } + + __rowShrinkable = true; + + pShrinkedRows = new (std::nothrow) int[__shrinkRowCount]; + SysTryReturn(NID_UI, pShrinkedRows != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + + memset(pShrinkedRows, 0x00, sizeof(int) * __shrinkRowCount); + int shrinkedRowCount = 0; + bool shrinkedItem = true; + + while (shrinkedItem && shrinkRowCount != 0) + { + shrinkedItem = false; + + for (int i = 0; i < __row; i++) + { + int shrinkHeight = shrinkTotalHeight / shrinkRowCount; + float shrinkedRowHeight = __pRowInfo[i].height; + + if (__pRowInfo[i].heightShrinkable && !__pRowInfo[i].rowCollapsed) + { + shrinkedRowHeight -= shrinkHeight; + + if (shrinkedRowHeight < 0.0f) + { + shrinkHeight += shrinkedRowHeight; + + __pRowInfo[i].height = 0.0f; + shrinkedRowHeight = 0.0f; + __pRowInfo[i].heightShrinkable = false; + + } + + for (int j = 0; j < __column; j++) + { + pCurNode = GetNode(i, j); + pItemInfo = null; + if (pCurNode != null) + { + pItemInfo = static_cast (pCurNode->GetItemInfo()); + } + if (pItemInfo != null && shrinkedRowHeight < pItemInfo->__minSize.h) + { + shrinkHeight -= pItemInfo->__minSize.h - shrinkedRowHeight; + __pRowInfo[i].height = pItemInfo->__minSize.h; + __pRowInfo[i].heightShrinkable = false; + } + } + + if (__pRowInfo[i].heightShrinkable == false) + { + shrinkTotalHeight -= shrinkHeight; + layoutRect.h -= shrinkHeight; + shrinkRowCount--; + + pShrinkedRows[shrinkedRowCount++] = i; + shrinkedItem = true; + + break; + } + } + } + } + + float nextPosY = -__pRowInfo[0].heightSpacing + layoutRect.y; + + for (int i = 0; i < __row; i++) + { + if (!__pRowInfo[i].rowCollapsed) + { + if (shrinkRowCount != 0) + { + int shrinkHeight = shrinkTotalHeight / shrinkRowCount; + + if (__pRowInfo[i].heightShrinkable) + { + __pRowInfo[i].height -= shrinkHeight; + lastShrinkRow = i; + layoutRect.h -= shrinkHeight; + } + } + __pRowInfo[i].y = nextPosY + __pRowInfo[i].heightSpacing; + nextPosY = __pRowInfo[i].height + __pRowInfo[i].y; + } + } + + nextPosY = -__pRowInfo[0].heightSpacing + layoutRect.y; + float shrinkHeight = 0.0f; + if (!_FloatHardCompare(shrinkTotalHeight, 0.0f) && shrinkRowCount != 0) + { + shrinkHeight = (int)shrinkTotalHeight % shrinkRowCount; + } + bool shrinkableRow = true; + + while (shrinkHeight > 0 && shrinkableRow) + { + shrinkableRow = false; + for (int i = 0; i < __row; i++) + { + if (!__pRowInfo[i].rowCollapsed) + { + if (shrinkRowCount != 0) + { + if (__pRowInfo[i].heightShrinkable) + { + for (int j = 0; j < __column; j++) + { + pCurNode = GetNode(i, j); + pItemInfo = null; + if (pCurNode != null) + { + pItemInfo = static_cast (pCurNode->GetItemInfo()); + } + if ((pItemInfo != null && ((__pRowInfo[i].height - 1.0f) < pItemInfo->__minSize.h)) || (__pRowInfo[i].height - 1.0f) < 0.0f) + { + pShrinkedRows[shrinkedRowCount++] = i; + __pRowInfo[i].heightShrinkable = false; + shrinkRowCount--; + break; + } + } + + if (__pRowInfo[i].heightShrinkable && shrinkHeight > 0) + { + if (shrinkHeight < 1.0f) + { + __pRowInfo[i].height -= shrinkHeight; + layoutRect.h -= shrinkHeight; + shrinkHeight = 0.0f; + shrinkableRow = true; + } + else + { + __pRowInfo[i].height--; + layoutRect.h--; + shrinkHeight--; + shrinkableRow = true; + } + } + } + } + __pRowInfo[i].y = nextPosY + __pRowInfo[i].heightSpacing; + nextPosY = __pRowInfo[i].height + __pRowInfo[i].y; + } + } + } + + for (int i = 0; i < shrinkedRowCount; i++) + { + __pRowInfo[pShrinkedRows[i]].heightShrinkable = true; + } + + delete[] pShrinkedRows; + } + SetLayoutRect(layoutRect); + return E_SUCCESS; +} + +result +TableLayout::CalculateStretchCell(const LayoutRect windowRect) +{ + __rowStretchable = false; + __columnStretchable = false; + + LayoutItemProxy* pContainerProxy = GetContainerProxy(); + if (pContainerProxy == null) + { + return E_INVALID_STATE; + } + + LayoutRect containerRect; + pContainerProxy->ConvertWindowToClientBounds(windowRect, containerRect); + + LayoutRect layoutRect = GetLayoutRect(); + + float stretchTotalWidth = containerRect.w - layoutRect.w; + float stretchTotalHeight = containerRect.h - layoutRect.h; + + int stretchColumnCount = __stretchColumnCount; + int stretchRowCount = __stretchRowCount; + + int lastStretchRow = 0; + int lastStretchColumn = 0; + + int* pStretchedColumns = null; + int* pStretchedRows = null; + + ProxyListNode* pCurNode = null; + TableItemInfo* pItemInfo = null; + + if (stretchTotalWidth >= 0.0f && __stretchColumnCount > 0) + { + if (pContainerProxy->GetItemWidthMatchMode() == WRAP_CONTENT) + { + return E_SUCCESS; + } + + __columnStretchable = true; + + pStretchedColumns = new (std::nothrow) int[__stretchColumnCount]; + SysTryReturn(NID_UI, pStretchedColumns != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + + memset(pStretchedColumns, 0x00, sizeof(int) * __stretchColumnCount); + int stretchedColumnCount = 0; + bool stretchedItem = true; + + while (stretchedItem && stretchColumnCount != 0) + { + stretchedItem = false; + int stretchWidth = stretchTotalWidth / stretchColumnCount; + + for (int j = 0; j < __column; j++) + { + if (__pColInfo[j].widthStretchable && !__pColInfo[j].columnCollapsed) + { + float maxWidth = 0.0f; + float stretchedColWidth = __pColInfo[j].width; + stretchedColWidth += stretchWidth; + for (int i = 0; i < __row; i++) + { + pCurNode = GetNode(i, j); + pItemInfo = null; + if (pCurNode != null) + { + pItemInfo = static_cast (pCurNode->GetItemInfo()); + } + if (pItemInfo != null && maxWidth < pItemInfo->__maxSize.w) + { + maxWidth = pItemInfo->__maxSize.w; + } + } + + if (maxWidth < stretchedColWidth) + { + stretchWidth -= stretchedColWidth - maxWidth; + __pColInfo[j].width += stretchWidth; + stretchTotalWidth -= stretchWidth; + layoutRect.w += stretchWidth; + stretchColumnCount--; + __pColInfo[j].widthStretchable = false; + + pStretchedColumns[stretchedColumnCount++] = j; + stretchedItem = true; + break; + } + } + } + } + + int nextPosX = -__pColInfo[0].widthSpacing + layoutRect.x; + + for (int j = 0; j < __column; j++) + { + if (!__pColInfo[j].columnCollapsed) + { + if (__pColInfo[j].widthStretchable && stretchColumnCount != 0) + { + int stretchWidth = stretchTotalWidth / stretchColumnCount; + __pColInfo[j].width += stretchWidth; + layoutRect.w += stretchWidth; + lastStretchColumn = j; + } + __pColInfo[j].x = nextPosX + __pColInfo[j].widthSpacing; + nextPosX = __pColInfo[j].x + __pColInfo[j].width; + } + } + nextPosX = -__pColInfo[0].widthSpacing + layoutRect.x; + float stretchWidth = 0.0f; + if (!_FloatHardCompare(stretchTotalWidth, 0.0f) && stretchColumnCount) + { + stretchWidth = (int)stretchTotalWidth % stretchColumnCount; + } + bool stretchableColumn = true; + + while (stretchWidth > 0 && stretchableColumn) + { + stretchableColumn = false; + for (int j = 0; j < __column; j++) + { + if (!__pColInfo[j].columnCollapsed) + { + if (stretchColumnCount != 0) + { + if (__pColInfo[j].widthStretchable) + { + for (int i = 0; i < __row; i++) + { + pCurNode = GetNode(i, j); + pItemInfo = null; + if (pCurNode != null) + { + pItemInfo = (TableItemInfo*) pCurNode->GetItemInfo(); + } + if (pItemInfo != null && ((__pColInfo[j].width + 1) > pItemInfo->__maxSize.w) && !pItemInfo->__merged) + { + pStretchedColumns[stretchedColumnCount++] = j; + __pColInfo[j].widthStretchable = false; + stretchColumnCount--; + break; + } + } + + if (__pColInfo[j].widthStretchable && stretchWidth > 0) + { + if (stretchWidth < 1.0f) + { + __pColInfo[j].width += stretchWidth; + layoutRect.w += stretchWidth; + stretchWidth = 0.0f; + stretchableColumn = true; + } + else + { + __pColInfo[j].width++; + layoutRect.w++; + stretchWidth--; + stretchableColumn = true; + } + } + } + } + __pColInfo[j].x = nextPosX + __pColInfo[j].widthSpacing; + nextPosX = __pColInfo[j].x + __pColInfo[j].width; + } + } + } + + for (int j = 0; j < stretchedColumnCount; j++) + { + __pColInfo[pStretchedColumns[j]].widthStretchable = true; + } + + delete[] pStretchedColumns; + } + + if (stretchTotalHeight >= 0.0f && __stretchRowCount > 0) + { + if (pContainerProxy->GetItemHeightMatchMode() == WRAP_CONTENT) + { + return E_SUCCESS; + } + + __rowStretchable = true; + + pStretchedRows = new (std::nothrow) int[__stretchRowCount]; + SysTryReturn(NID_UI, pStretchedRows != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + + memset(pStretchedRows, 0x00, sizeof(int) * __stretchRowCount); + int stretchedRowCount = 0; + bool stretchedItem = true; + + while (stretchedItem && stretchRowCount != 0) + { + stretchedItem = false; + int stretchHeight = stretchTotalHeight / stretchRowCount; + + for (int i = 0; i < __row; i++) + { + if (__pRowInfo[i].heightStretchable && !__pRowInfo[i].rowCollapsed) + { + float maxHeight = 0.0f; + float stretchedRowHeight = __pRowInfo[i].height; + stretchedRowHeight += stretchHeight; + + for (int j = 0; j < __column; j++) + { + pCurNode = GetNode(i, j); + pItemInfo = null; + if (pCurNode != null) + { + pItemInfo = static_cast (pCurNode->GetItemInfo()); + } + if (pItemInfo != null && maxHeight < pItemInfo->__maxSize.h) + { + maxHeight = pItemInfo->__maxSize.h; + } + } + + if (maxHeight < stretchedRowHeight) + { + stretchHeight -= stretchedRowHeight - maxHeight; + __pRowInfo[i].height += stretchHeight; + stretchTotalHeight -= stretchHeight; + layoutRect.h += stretchHeight; + stretchRowCount--; + __pRowInfo[i].heightStretchable = false; + + pStretchedRows[stretchedRowCount++] = i; + stretchedItem = true; + break; + } + } + } + } + + float nextPosY = -__pRowInfo[0].heightSpacing + layoutRect.y; + for (int i = 0; i < __row; i++) + { + if (!__pRowInfo[i].rowCollapsed) + { + if (__pRowInfo[i].heightStretchable && stretchRowCount != 0) + { + int stretchHeight = stretchTotalHeight / stretchRowCount; + __pRowInfo[i].height += stretchHeight; + layoutRect.h += stretchHeight; + lastStretchRow = i; + } + __pRowInfo[i].y = nextPosY + __pRowInfo[i].heightSpacing; + nextPosY = __pRowInfo[i].y + __pRowInfo[i].height; + } + } + + nextPosY = -__pRowInfo[0].heightSpacing + layoutRect.y; + float stretchHeight = 0.0f; + if (!_FloatHardCompare(stretchTotalHeight, 0.0f) && stretchRowCount != 0) + { + stretchHeight = (int)stretchTotalHeight % stretchRowCount; + } + bool stretchableRow = true; + + while (stretchHeight > 0 && stretchableRow) + { + stretchableRow = false; + for (int i = 0; i < __row; i++) + { + if (!__pRowInfo[i].rowCollapsed) + { + if (stretchRowCount != 0) + { + if (__pRowInfo[i].heightStretchable) + { + for (int j = 0; j < __column; j++) + { + pCurNode = GetNode(i, j); + pItemInfo = null; + if (pCurNode != null) + { + pItemInfo = static_cast (pCurNode->GetItemInfo()); + } + if (pItemInfo != null && ((__pRowInfo[i].height + 1) > pItemInfo->__maxSize.h) && !pItemInfo->__merged) + { + pStretchedRows[stretchedRowCount++] = i; + __pRowInfo[i].heightStretchable = false; + stretchRowCount--; + break; + } + } + + if (__pRowInfo[i].heightStretchable && stretchHeight > 0.0f) + { + if (stretchHeight < 1.0f) + { + __pRowInfo[i].height += stretchHeight; + layoutRect.h += stretchHeight; + stretchHeight = 0.0f; + stretchableRow = true; + } + else + { + __pRowInfo[i].height++; + layoutRect.h++; + stretchHeight--; + stretchableRow = true; + } + } + } + } + __pRowInfo[i].y = nextPosY + __pRowInfo[i].heightSpacing; + nextPosY = __pRowInfo[i].y + __pRowInfo[i].height; + } + } + } + + for (int i = 0; i < stretchedRowCount; i++) + { + __pRowInfo[pStretchedRows[i]].heightStretchable = true; + } + + delete[] pStretchedRows; + } + SetLayoutRect(layoutRect); + return E_SUCCESS; +} + +result +TableLayout::Merge(int startRow, int startCol, int endRow, int endCol) +{ + if (startRow < 0 || startRow >= __row || startCol < 0 || startCol >= __column + || endRow < 0 || endRow >= __row || endCol < 0 || endCol >= __column + || startRow > endRow || startCol > endCol) + { + return E_INVALID_ARG; + } + + int realEndRow = endRow; + int realEndColumn = endCol; + + ProxyListNode* pCurNode = null; + TableItemInfo* pItemInfo = null; + for (int i = startRow; i <= realEndRow; i++) + { + if (__pRowInfo[i].rowCollapsed) + { + realEndRow++; + } + + for (int j = startCol; j <= realEndColumn; j++) + { + int k = 0; + int mergedCellIndex = MakeCellID(i, j); + + for (k = 0; k < __mergedCellList.GetCount(); k++) + { + Integer* cellID = static_cast (__mergedCellList.GetAt(k)); + if (cellID->ToInt() == mergedCellIndex) + { + return E_SYSTEM; + } + } + + if (i != startRow || j != startCol) + { + __mergedCellList.Add(*(new Integer(mergedCellIndex))); + } + + pCurNode = GetNode(i, j); + pItemInfo = null; + if (pCurNode != null) + { + pItemInfo = static_cast (pCurNode->GetItemInfo()); + } + if (pItemInfo == null) + { + continue; + } + if (pItemInfo->__merged) + { + return E_SYSTEM; + } + if (__pColInfo[j].columnCollapsed) + { + realEndColumn++; + } + + if (i == startRow && j == startCol) + { + pItemInfo->__merged = true; + continue; + } + + pItemInfo->__enable = false; + pItemInfo->__merged = true; + if (pCurNode->GetItemProxy() != null) + { + pCurNode->GetItemProxy()->Visible(false); + } + } + } + + pCurNode = GetNode(startRow, startCol); + if (pCurNode != null) + { + pItemInfo = static_cast (pCurNode->GetItemInfo()); + if (pItemInfo == null) + { + return E_INVALID_STATE; + } + pItemInfo->__mergeEndPoint.x = realEndRow; + pItemInfo->__mergeEndPoint.y = realEndColumn; + } + + SetUpdateState(true); + return E_SUCCESS; +} + +result +TableLayout::OnLayout(float width, float height, bool updateLayouting) +{ + LayoutRect layoutRect = GetLayoutRect(); + LayoutRect windowRect = {layoutRect.x, layoutRect.y, width, height}; + + result r = CalculateSize(); + if (r != E_SUCCESS) + { + return r; + } + + r = CalculateShrinkCell(windowRect); + if (r != E_SUCCESS) + { + return r; + } + + r = CalculateStretchCell(windowRect); + if (r != E_SUCCESS) + { + return r; + } + + r = AdjustTableLayout(windowRect, updateLayouting); + if (r != E_SUCCESS) + { + return r; + } + + return E_SUCCESS; +} + +result +TableLayout::AdjustTableLayout(const LayoutRect windowRect, bool updateLayouting) +{ + LayoutItemProxy* pContainerProxy = GetContainerProxy(); + if (pContainerProxy == null) + { + return E_INVALID_STATE; + } + + result r = E_SUCCESS; + LayoutSize size = {0.0f, 0.0f}; + ProxyListNode* pCurNode = null; + TableItemInfo* pItemInfo = null; + LayoutItemProxy* pItemProxy = null; + for (int i = 0; i < __row; i++) + { + for (int j = 0; j < __column; j++) + { + pCurNode = GetNode(i, j); + pItemInfo = null; + if (pCurNode != null) + { + pItemInfo = static_cast (pCurNode->GetItemInfo()); + pItemProxy = pCurNode->GetItemProxy(); + } + if (pItemInfo != null && pItemInfo->__enable) + { + size.w = __pColInfo[j].width; + size.h = __pRowInfo[i].height; + if (pItemInfo->__mergeEndPoint.x != NOT_MERGED || pItemInfo->__mergeEndPoint.y != NOT_MERGED) + { + result r = CalculateMergeCell(i, j, size); + if (r != E_SUCCESS) + { + SysLog(NID_UI, "CalculateMergeCell() is Failed."); + } + } + if (pItemProxy != null) + { + LayoutRect rect = pItemProxy->GetItemBaseRect(); + rect.x = __pColInfo[j].x; + rect.y = __pRowInfo[i].y; + + LayoutRect cellRect; + cellRect.x = __pColInfo[j].x; + cellRect.y = __pRowInfo[i].y; + cellRect.w = size.w; + cellRect.h = size.h; + + r = pItemProxy->Measure(rect.w, rect.h); + if (r != E_SUCCESS) + { + return r; + } + pItemProxy->GetMeasuredSize(rect.w, rect.h); + + if ((__pRowInfo[i].heightShrinkable && __rowShrinkable) || + (__pRowInfo[i].heightStretchable && __rowStretchable) || + pItemInfo->__fillHeight) + { + float height = 0.0f; + r = pItemProxy->Measure(rect.w, cellRect.h); + if (r != E_SUCCESS) + { + return r; + } + pItemProxy->GetMeasuredSize(rect.w, height); + + if ((__pRowInfo[i].heightShrinkable && __rowShrinkable) && rect.h > height) + { + rect.h = height; + } + else if ((__pRowInfo[i].heightStretchable && __rowStretchable) && rect.h < height) + { + rect.h = height; + } + else if (pItemInfo->__fillHeight) + { + rect.h = height; + } + } + + if ((__pColInfo[j].widthShrinkable && __columnShrinkable) || + (__pColInfo[j].widthStretchable && __columnStretchable) || + pItemInfo->__fillWidth) + { + float width = 0.0f; + r = pItemProxy->Measure(cellRect.w, rect.h); + if (r != E_SUCCESS) + { + return r; + } + pItemProxy->GetMeasuredSize(width, rect.h); + + if ((__pColInfo[j].widthShrinkable && __columnShrinkable) && rect.w > width) + { + rect.w = width; + } + else if ((__pColInfo[j].widthStretchable && __columnStretchable) && rect.w < width) + { + rect.w = width; + } + else if (pItemInfo->__fillWidth) + { + rect.w = width; + } + } + + ItemAlign align = pItemProxy->GetItemAlignment(); + rect = CalculateAlign(*pItemProxy, cellRect, rect, align.HAlign, align.VAlign); + + r = pItemProxy->Measure(rect.w, rect.h); + if (r != E_SUCCESS) + { + return r; + } + pItemProxy->GetMeasuredSize(rect.w, rect.h); + pItemProxy->SetItemWindowRect(rect); + } + } + } + } + + LayoutMatchMode widthMode = pContainerProxy->GetItemWidthMatchMode(); + LayoutMatchMode heightMode = pContainerProxy->GetItemHeightMatchMode(); + LayoutRect containerRect; + pContainerProxy->ConvertWindowToClientBounds(windowRect, containerRect); + + containerRect.x = windowRect.x; + containerRect.y = windowRect.y; + + float correctionWidth = windowRect.w - containerRect.w; + float correctionHeight = windowRect.h - containerRect.h; + + LayoutRect layoutRect = GetLayoutRect(); + if (widthMode == WRAP_CONTENT) + { + containerRect.w = layoutRect.w + correctionWidth; + } + else + { + containerRect.w += correctionWidth; + } + + if (heightMode == WRAP_CONTENT) + { + containerRect.h = layoutRect.h + correctionHeight; + } + else + { + containerRect.h += correctionHeight; + } + + SetLayoutRect(containerRect); + + LayoutRect clientRect; + pContainerProxy->GetItemWindowRect(clientRect); + containerRect.x = clientRect.x; + containerRect.y = clientRect.y; + if (updateLayouting) + { + pContainerProxy->SetItemWindowRect(containerRect); + } + return E_SUCCESS; +} + +result +TableLayout::AddItem(LayoutItem& item) +{ + ProxyListNode* pCurNode = null; + + int cellIndex = INVALID_CELL_ID; + for (int i = 0; i < __row; i++) + { + for (int j = 0; j < __column; j++) + { + pCurNode = GetNode(i, j); + if (pCurNode == null) + { + if (!__pRowInfo[i].rowCollapsed && !__pColInfo[j].columnCollapsed) + { + cellIndex = MakeCellID(i, j); + for (int k = 0; k < __mergedCellList.GetCount(); k++) + { + Integer* cellID = static_cast (__mergedCellList.GetAt(k)); + if (cellID->ToInt() == cellIndex) + { + return AddItem(item, i, j, true); + } + } + + return AddItem(item, i, j); + } + } + } + } + + return E_SYSTEM; +} + +result +TableLayout::AddItem(LayoutItem& item, int row, int column, bool mergedState) +{ + ProxyList* pProxyList = GetProxyList(); + SysAssertf(pProxyList != null, "ProxyList is invalid"); + + if (row < 0 || row >= __row || column < 0 || column >= __column) + { + return E_INVALID_ARG; + } + ProxyListNode* pGetNode = GetNode(row, column); + if (pGetNode != null) + { + return E_INVALID_STATE; + } + + int cellIndex = MakeCellID(row, column); + + if (!mergedState) + { + for (int k = 0; k < __mergedCellList.GetCount(); k++) + { + Integer* cellID = static_cast (__mergedCellList.GetAt(k)); + if (cellID->ToInt() == cellIndex) + { + return E_SYSTEM; + } + } + } + + result r = Layout::AddItem(item); + if (r != E_SUCCESS) + { + return r; + } + + ProxyListNode* pAddNode = pProxyList->GetNode(item); + if (pAddNode == null) + { + return E_INVALID_STATE; + } + TableItemInfo* pAddItemInfo = static_cast (pAddNode->GetItemInfo()); + if (pAddItemInfo == null) + { + return E_INVALID_STATE; + } + + cellIndex = MakeCellID(row, column); + pAddItemInfo->__id = cellIndex; + + if (mergedState) + { + pAddItemInfo->__enable = false; + pAddItemInfo->__merged = true; + + if (pAddNode->GetItemProxy() != null) + { + pAddNode->GetItemProxy()->Visible(false); + } + } + + return E_SUCCESS; +} + +LayoutItem* +TableLayout::GetItem(int row, int column) const +{ + if (row < 0 || row >= __row) + { + return null; + } + + if (column < 0 || column >= __column) + { + return null; + } + + ProxyListNode* pCurNode = GetNode(row, column); + if (pCurNode != null && pCurNode->GetItemProxy() != null) + { + return pCurNode->GetItemProxy()->GetItem(); + } + else + { + return null; + } +} + +result +TableLayout::SetItemPosition(const LayoutItem& item, int row, int column) +{ + SysTryReturn(NID_UI, row >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Negative input argument : row(%d)", row); + SysTryReturn(NID_UI, row < __row, E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] Input Argument row over the max row : row(%d), maxRow(%d)", row, __row); + SysTryReturn(NID_UI, column >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Negative input argument : column(%d)", column); + SysTryReturn(NID_UI, column < __column, E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] Input Argument column over the max column : column(%d), maxColumn(%d)", column, __column); + + ProxyList* pProxyList = GetProxyList(); + SysAssertf(pProxyList != null, "ProxyList is invalid"); + + ProxyListNode* pTargetNode = GetNode(row, column); + ProxyListNode* pCurNode = pProxyList->GetNode(item); + SysTryReturn(NID_UI, (pCurNode != null), E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] Controls have not been added to the container."); + + if (pTargetNode == pCurNode) + { + return E_SUCCESS; + } + + SysTryReturn(NID_UI, (pTargetNode == null), E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] The (%d, %d) cell is not available.", row, column); + + int cellIndex = MakeCellID(row, column); + TableItemInfo* pItemInfo = static_cast (pCurNode->GetItemInfo()); + if (pItemInfo == null) + { + return E_INVALID_STATE; + } + + if (pItemInfo->__merged || !pItemInfo->__enable) + { + pItemInfo->__enable = true; + pItemInfo->__merged = false; + if (pCurNode->GetItemProxy() != null) + { + pCurNode->GetItemProxy()->Visible(true); + } + } + + pItemInfo->__id = cellIndex; + + SetUpdateState(true); + return E_SUCCESS; +} + +result +TableLayout::GetItemPosition(const LayoutItem& item, int& row, int& column) const +{ + ProxyList* pProxyList = GetProxyList(); + SysAssertf(pProxyList != null, "ProxyList is invalid"); + + ProxyListNode* pCurNode = pProxyList->GetNode(item); + SysTryReturn(NID_UI, (pCurNode != null), E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] Controls have not been added to the container."); + + TableItemInfo* pItemInfo = static_cast (pCurNode->GetItemInfo()); + if (pItemInfo == null) + { + return E_INVALID_STATE; + } + row = (GetRow(pItemInfo->__id)); + column = (GetColumn(pItemInfo->__id)); + + return E_SUCCESS; +} + +result +TableLayout::AddRow(void) +{ + if (__row == __maxRow) + { + RowInfo* pRowInfo = new (std::nothrow) RowInfo[__maxRow + 1]; + SysTryReturn(NID_UI, pRowInfo != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + + memset(pRowInfo, 0x0, sizeof(RowInfo) * (__maxRow + 1)); + memcpy(pRowInfo, __pRowInfo, sizeof(RowInfo) * __maxRow); + delete[] __pRowInfo; + __pRowInfo = pRowInfo; + __maxRow++; + } + __row++; + return E_SUCCESS; +} + +result +TableLayout::AddColumn(void) +{ + if (__column == __maxColumn) + { + ColumnInfo* pColInfo = new (std::nothrow) ColumnInfo[__maxColumn + 1]; + SysTryReturn(NID_UI, pColInfo != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + + memset(pColInfo, 0x0, sizeof(ColumnInfo) * (__maxColumn + 1)); + memcpy(pColInfo, __pColInfo, sizeof(ColumnInfo) * __maxColumn); + delete[] __pColInfo; + __pColInfo = pColInfo; + __maxColumn++; + } + __column++; + return E_SUCCESS; +} + +result +TableLayout::DeleteRow(int row) +{ + if (row < 0 || row >= __row) + { + return E_INVALID_ARG; + } + + ProxyListNode* pCurNode = null; + result r = E_SUCCESS; + for (int j = 0; j < __column; j++) + { + pCurNode = GetNode(row, j); + if (pCurNode != null) + { + r = RemoveItem(*(pCurNode->GetItemProxy()->GetItem())); + if (r != E_SUCCESS) + { + return r; + } + } + } + + TableItemInfo* pItemInfo = null; + for (int i = 0; i < __row; i++) + { + for (int j = 0; j < __column; j++) + { + pCurNode = GetNode(i, j); + if (pCurNode != null) + { + pItemInfo = static_cast (pCurNode->GetItemInfo()); + if (pItemInfo == null) + { + return E_INVALID_STATE; + } + if (i > row) + { + pItemInfo->__id = MakeCellID((i - 1), j); + } + if (pItemInfo->__mergeEndPoint.x != NOT_MERGED) + { + if (pItemInfo->__mergeEndPoint.x >= row) + { + pItemInfo->__mergeEndPoint.x--; + } + if (pItemInfo->__mergeEndPoint.x == GetRow(pItemInfo->__id)) + { + r = Unmerge(GetRow(pItemInfo->__id), GetColumn(pItemInfo->__id)); + if (r != E_SUCCESS) + { + return r; + } + } + } + } + } + } + + memcpy(&__pRowInfo[row], &__pRowInfo[row + 1], sizeof(RowInfo) * (__row - row - 1)); + + __row--; + + return r; +} + +result +TableLayout::DeleteColumn(int column) +{ + if (column < 0 || column >= __column) + { + return E_INVALID_ARG; + } + + ProxyListNode* pCurNode = null; + TableItemInfo* pItemInfo = null; + result r = E_SUCCESS; + for (int i = 0; i < __row; i++) + { + pCurNode = GetNode(i, column); + if (pCurNode != null) + { + r = RemoveItem(*(pCurNode->GetItemProxy()->GetItem())); + if (r != E_SUCCESS) + { + return r; + } + } + + for (int j = 0; j < __column; j++) + { + pCurNode = GetNode(i, j); + if (pCurNode != null) + { + pItemInfo = static_cast (pCurNode->GetItemInfo()); + if (pItemInfo == null) + { + return E_INVALID_STATE; + } + if (j > column) + { + pItemInfo->__id = MakeCellID(i, (j - 1)); + } + + if (pItemInfo->__mergeEndPoint.y != NOT_MERGED) + { + if (pItemInfo->__mergeEndPoint.y >= column) + { + pItemInfo->__mergeEndPoint.y--; + } + int mergeEndColumn = GetColumn(pItemInfo->__id); + if (pItemInfo->__mergeEndPoint.y == mergeEndColumn) + { + r = Unmerge(GetRow(pItemInfo->__id), GetColumn(pItemInfo->__id)); + if (r != E_SUCCESS) + { + return r; + } + } + } + } + } + } + + memcpy(&__pColInfo[column], &__pColInfo[column + 1], sizeof(ColumnInfo) * (__column - column - 1)); + + __column--; + + return E_SUCCESS; +} + +result +TableLayout::CalculateMergeCell(int row, int column, LayoutSize& size) +{ + if (row < 0 || row >= __row || column < 0 || column >= __column) + { + return E_INVALID_ARG; + } + + ProxyListNode* pCurNode = GetNode(row, column); + if (pCurNode == null) + { + return E_INVALID_ARG; + } + + TableItemInfo* pItemInfo = static_cast (pCurNode->GetItemInfo()); + if (pItemInfo == null) + { + return E_INVALID_STATE; + } + if (pItemInfo->__mergeEndPoint.x > NOT_MERGED && !__pRowInfo[pItemInfo->__mergeEndPoint.x].rowCollapsed) + { + int endRowPos = __pRowInfo[pItemInfo->__mergeEndPoint.x].y; + size.h = __pRowInfo[pItemInfo->__mergeEndPoint.x].height + endRowPos - __pRowInfo[row].y; + } + else + { + size.h = __pRowInfo[row].height; + } + + if (pItemInfo->__mergeEndPoint.y > NOT_MERGED && !__pColInfo[pItemInfo->__mergeEndPoint.y].columnCollapsed) + { + float endColPos = __pColInfo[pItemInfo->__mergeEndPoint.y].x; + size.w = __pColInfo[pItemInfo->__mergeEndPoint.y].width + endColPos - __pColInfo[column].x; + } + else + { + size.w = __pColInfo[column].width; + } + + return E_SUCCESS; +} + +LayoutRect +TableLayout::CalculateAlign(LayoutItemProxy& itemProxy, LayoutRect cellRect, LayoutRect itemRect, const HorizontalAlign horizonAlign, const VerticalAlign verticalAlign) +{ + ItemMargin margin = itemProxy.GetItemMargin(); + itemRect.y = cellRect.y; + itemRect.x = cellRect.x; + + if (verticalAlign == ITEM_VERTICAL_ALIGN_TOP) + { + if (itemRect.h > cellRect.h - margin.top - margin.bottom) + { + itemRect.h = cellRect.h - margin.top - margin.bottom; + } + itemRect.y = cellRect.y + margin.top; + } + else if (verticalAlign == ITEM_VERTICAL_ALIGN_BOTTOM) + { + if (itemRect.h > cellRect.h - margin.top - margin.bottom) + { + itemRect.h = cellRect.h - margin.top - margin.bottom; + } + itemRect.y = cellRect.h + cellRect.y - itemRect.h - margin.bottom; + } + else if (verticalAlign == ITEM_VERTICAL_ALIGN_TOP_BOTTOM) + { + itemRect.h = cellRect.h - margin.top - margin.bottom; + itemRect.y = cellRect.y + margin.top; + } + else if (verticalAlign == ITEM_VERTICAL_ALIGN_MIDDLE) + { + if (cellRect.h > itemRect.h) + { + itemRect.y = cellRect.y + ((cellRect.h - itemRect.h) / 2); + } + else + { + itemRect.h = cellRect.h; + } + } + if (horizonAlign == ITEM_HORIZONTAL_ALIGN_RIGHT) + { + if (itemRect.w > cellRect.w - margin.right - margin.left) + { + itemRect.w = cellRect.w - margin.right - margin.left; + } + itemRect.x = cellRect.w + cellRect.x - itemRect.w - margin.right; + } + else if (horizonAlign == ITEM_HORIZONTAL_ALIGN_LEFT) + { + if (itemRect.w > cellRect.w - margin.left - margin.right) + { + itemRect.w = cellRect.w - margin.left - margin.right; + } + itemRect.x = cellRect.x + margin.left; + } + else if (horizonAlign == ITEM_HORIZONTAL_ALIGN_CENTER) + { + if (cellRect.w > itemRect.w) + { + itemRect.x = cellRect.x + ((cellRect.w - itemRect.w) / 2); + } + else + { + itemRect.w = cellRect.w; + } + } + else if (horizonAlign == ITEM_HORIZONTAL_ALIGN_LEFT_RIGHT) + { + itemRect.w = cellRect.w - margin.left - margin.right; + itemRect.x = cellRect.x + margin.left; + } + + return itemRect; +} + +result +TableLayout::GetCellSize(int cellIndex, LayoutRect& rect) +{ + if (cellIndex == INVALID_CELL_ID) + { + return E_INVALID_ARG; + } + + int row = GetRow(cellIndex); + if (row < 0 || row >= __row) + { + return E_INVALID_ARG; + } + + int column = GetColumn(cellIndex); + if (column < 0 || column >= __column) + { + return E_INVALID_ARG; + } + + ProxyListNode* pCurNode = GetNode(row, column); + if (pCurNode != null) + { + TableItemInfo* pItemInfo = static_cast (pCurNode->GetItemInfo()); + if (pItemInfo == null) + { + return E_INVALID_STATE; + } + if (pItemInfo->__mergeEndPoint.x != NOT_MERGED || pItemInfo->__mergeEndPoint.y != NOT_MERGED) + { + LayoutSize size = {0.0f, 0.0f}; + result r = CalculateMergeCell(row, column, size); + if (r != E_SUCCESS) + { + rect.w = size.w; + rect.h = size.h; + } + } + else + { + rect.h = __pRowInfo[row].height; + rect.w = __pColInfo[column].width; + } + } + + if (__pRowInfo[row].rowCollapsed) + { + rect.h = 0.0f; + } + + if (__pColInfo[column].columnCollapsed) + { + rect.w = 0.0f; + } + + return E_SUCCESS; +} + +result +TableLayout::SetColumnCollapsed(int columnIndex, bool collapsed) +{ + SysTryReturn(NID_UI, columnIndex >= 0, E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Negative input argument : column(%d)", columnIndex); + SysTryReturn(NID_UI, columnIndex < __column, E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Input Argument column over the max column : column(%d), maxColumn(%d)", columnIndex, __column); + + __pColInfo[columnIndex].columnCollapsed = collapsed; + + ProxyListNode* pCurNode = null; + TableItemInfo* pItemInfo = null; + result r = E_SUCCESS; + for (int i = 0; i < __row; i++) + { + pCurNode = GetNode(i, columnIndex); + if (pCurNode != null) + { + pItemInfo = static_cast (pCurNode->GetItemInfo()); + if (pItemInfo == null) + { + return E_INVALID_STATE; + } + if (pItemInfo->__merged == true) + { + continue; + } + if (__pColInfo[columnIndex].columnCollapsed) + { + pItemInfo->__enable = false; + if (pCurNode->GetItemProxy() != null) + { + pCurNode->GetItemProxy()->Visible(false); + } + } + else if (!__pRowInfo[i].rowCollapsed) + { + pItemInfo->__enable = true; + if (pCurNode->GetItemProxy() != null) + { + pCurNode->GetItemProxy()->Visible(true); + } + } + } + } + + SetUpdateState(true); + return r; +} + +bool +TableLayout::GetColumnCollapsed(int columnIndex) const +{ + if (columnIndex < 0 || columnIndex >= __column) + { + return false; + } + + return __pColInfo[columnIndex].columnCollapsed; +} + +result +TableLayout::SetRowCollapsed(int rowIndex, bool collapsed) +{ + SysTryReturn(NID_UI, rowIndex >= 0, E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Negative input argument : row(%d)", rowIndex); + SysTryReturn(NID_UI, rowIndex < __row, E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Input Argument row over the max row : row(%d), maxRow(%d)", rowIndex, __row); + + __pRowInfo[rowIndex].rowCollapsed = collapsed; + + ProxyListNode* pCurNode = null; + TableItemInfo* pItemInfo = null; + + for (int i = 0; i < __column; i++) + { + pCurNode = GetNode(rowIndex, i); + if (pCurNode != null) + { + pItemInfo = static_cast (pCurNode->GetItemInfo()); + if (pItemInfo == null) + { + return E_INVALID_STATE; + } + if (pItemInfo->__merged == true) + { + continue; + } + if (__pRowInfo[rowIndex].rowCollapsed) + { + pItemInfo->__enable = false; + if (pCurNode->GetItemProxy() != null) + { + pCurNode->GetItemProxy()->Visible(false); + } + } + else if (!__pColInfo[i].columnCollapsed) + { + pItemInfo->__enable = true; + if (pCurNode->GetItemProxy() != null) + { + pCurNode->GetItemProxy()->Visible(true); + } + } + } + } + + SetUpdateState(true); + return E_SUCCESS; +} + +bool +TableLayout::GetRowCollapsed(int rowIndex) const +{ + if (rowIndex < 0 || rowIndex >= __row) + { + return false; + } + + return __pRowInfo[rowIndex].rowCollapsed; +} + +result +TableLayout::SetRowShrinkable(int row, bool shrinkable) +{ + SysTryReturn(NID_UI, row >= 0, E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Negative input argument : row(%d)", row); + SysTryReturn(NID_UI, row < __row, E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Input Argument row over the max row : row(%d), maxRow(%d)", row, __row); + + __pRowInfo[row].heightShrinkable = shrinkable; + + SetUpdateState(true); + SetPartialUpdateFlag(true); + return E_SUCCESS; +} + +bool +TableLayout::GetRowShrinkable(int row) const +{ + SysTryReturn(NID_UI, row >= 0, false, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] Negative input argument : row(%d)", row); + SysTryReturn(NID_UI, row < __row, false, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Input Argument row over the max row : row(%d), maxRow(%d)", row, __row); + + return __pRowInfo[row].heightShrinkable; +} + +result +TableLayout::SetColumnShrinkable(int column, bool shrinkable) +{ + SysTryReturn(NID_UI, column >= 0, E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Negative input argument : column(%d)", column); + SysTryReturn(NID_UI, column < __column, E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Input Argument column over the max column : column(%d), maxColumn(%d)", column, __column); + + __pColInfo[column].widthShrinkable = shrinkable; + + SetUpdateState(true); + SetPartialUpdateFlag(true); + return E_SUCCESS; +} + +bool +TableLayout::GetColumnShrinkable(int column) const +{ + SysTryReturn(NID_UI, column >= 0, false, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Negative input argument : column(%d)", column); + SysTryReturn(NID_UI, column < __column, false, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Input Argument column over the max column : column(%d), maxColumn(%d)", column, __column); + + return __pColInfo[column].widthShrinkable; +} + +result +TableLayout::SetRowStretchable(int row, bool stretchable) +{ + SysTryReturn(NID_UI, row >= 0, E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Negative input argument : row(%d)", row); + SysTryReturn(NID_UI, row < __row, E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Input Argument row over the max row : row(%d), maxRow(%d)", row, __row); + + __pRowInfo[row].heightStretchable = stretchable; + + SetUpdateState(true); + SetPartialUpdateFlag(true); + return E_SUCCESS; +} + +bool +TableLayout::GetRowStretchable(int row) const +{ + if (row < 0 || row >= __row) + { + return false; + } + + return __pRowInfo[row].heightStretchable; +} + +result +TableLayout::SetColumnStretchable(int column, bool stretchable) +{ + SysTryReturn(NID_UI, column >= 0, E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] Negative input argument : column(%d)", + column); + SysTryReturn(NID_UI, column < __column, E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Input Argument column over the max column : column(%d), maxColumn(%d)", column, __column); + + __pColInfo[column].widthStretchable = stretchable; + + SetUpdateState(true); + SetPartialUpdateFlag(true); + return E_SUCCESS; +} + +bool +TableLayout::GetColumnStretchable(int column) const +{ + SysTryReturn(NID_UI, column >= 0, false, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] Negative input argument : column(%d)", column); + SysTryReturn(NID_UI, column < __column, false, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Input Argument column over the max column : column(%d), maxColumn(%d)", column, __column); + + return __pColInfo[column].widthStretchable; +} + +result +TableLayout::SetRowSpacing(int row, float heightSpacing) +{ + SysTryReturn(NID_UI, row >= 0, E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Negative input argument : row(%d)", row); + SysTryReturn(NID_UI, row < __row, E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Input Argument row over the max row : row(%d), maxRow(%d)", row, __row); + SysTryReturn(NID_UI, heightSpacing >= 0.0f, E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Negative input argument : spacing(%d)", heightSpacing); + + __pRowInfo[row].heightSpacing = heightSpacing; + + SetUpdateState(true); + return E_SUCCESS; +} + +result +TableLayout::GetRowSpacing(int row, float& spacing) const +{ + SysTryReturn(NID_UI, row >= 0, E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Negative input argument : row(%d)", row); + SysTryReturn(NID_UI, row < __row, E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Input Argument row over the max row : row(%d), maxRow(%d)", row, __row); + + spacing = __pRowInfo[row].heightSpacing; + return E_SUCCESS; +} + +result +TableLayout::SetColumnSpacing(int column, float widthSpacing) +{ + SysTryReturn(NID_UI, column >= 0, E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Negative input argument : column(%d)", column); + SysTryReturn(NID_UI, column < __column, E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Input Argument column over the max column : column(%d), maxColumn(%d)", column, __column); + SysTryReturn(NID_UI, widthSpacing >= 0.0f, E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Negative input argument : spacing(%d)", widthSpacing); + + __pColInfo[column].widthSpacing = widthSpacing; + + SetUpdateState(true); + return E_SUCCESS; +} + +result +TableLayout::GetColumnSpacing(int column, float& spacing) const +{ + SysTryReturn(NID_UI, column >= 0, E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Negative input argument : column(%d)", column); + SysTryReturn(NID_UI, column < __column, E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Input Argument column over the max column : column(%d), maxColumn(%d)", column, __column); + + spacing = __pColInfo[column].widthSpacing; + + return E_SUCCESS; +} + +result +TableLayout::SetFillCell(int row, int column, bool fillWidth, bool fillHeight) +{ + SysTryReturn(NID_UI, row >= 0, E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Negative input argument : row(%d)", row); + SysTryReturn(NID_UI, row < __row, E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Input Argument row over the max row : row(%d), maxRow(%d)", row, __row); + SysTryReturn(NID_UI, column >= 0, E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Negative input argument : column(%d)", column); + SysTryReturn(NID_UI, column < __column, E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Input Argument column over the max column : column(%d), maxColumn(%d)", column, __column); + + ProxyListNode* pNode = GetNode(row, column); + if (pNode != null) + { + TableItemInfo* pItemInfo = static_cast (pNode->GetItemInfo()); + if (pItemInfo == null) + { + return E_INVALID_STATE; + } + pItemInfo->__fillWidth = fillWidth; + pItemInfo->__fillHeight = fillHeight; + return E_SUCCESS; + } + return E_SYSTEM; +} + +result +TableLayout::GetFillCell(int row, int column, bool& fillWidth, bool& fillHeight) const +{ + SysTryReturn(NID_UI, row >= 0, E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Negative input argument : row(%d)", row); + SysTryReturn(NID_UI, row < __row, E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Input Argument row over the max row : row(%d), maxRow(%d)", row, __row); + SysTryReturn(NID_UI, column >= 0, E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Negative input argument : column(%d)", column); + SysTryReturn(NID_UI, column < __column, E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Input Argument column over the max column : column(%d), maxColumn(%d)", column, __column); + + ProxyListNode* pNode = GetNode(row, column); + if (pNode != null) + { + TableItemInfo* pItemInfo = static_cast (pNode->GetItemInfo()); + if (pItemInfo == null) + { + return E_INVALID_STATE; + } + fillWidth = pItemInfo->__fillWidth; + fillHeight = pItemInfo->__fillHeight; + return E_SUCCESS; + } + return E_SYSTEM; +} + +result +TableLayout::SwapItemPosition(LayoutItem& item1, LayoutItem& item2) +{ + ProxyList* pProxyList = GetProxyList(); + SysAssertf(pProxyList != null, "ProxyList is invalid"); + + ProxyListNode* pNode1 = pProxyList->GetNode(item1); + ProxyListNode* pNode2 = pProxyList->GetNode(item2); + + SysTryReturn(NID_UI, (pNode1 != null && pNode2 != null), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Control dose not belong to layout.") + + TableItemInfo* pItemInfo1 = static_cast (pNode1->GetItemInfo()); + TableItemInfo* pItemInfo2 = static_cast (pNode2->GetItemInfo()); + if (pItemInfo1 == null || pItemInfo2 == null) + { + return E_INVALID_STATE; + } + + int cellIndex1 = pItemInfo1->__id; + int cellIndex2 = pItemInfo2->__id; + bool merged1 = pItemInfo1->__merged; + bool merged2 = pItemInfo2->__merged; + bool enable1 = pItemInfo1->__enable; + bool enable2 = pItemInfo2->__enable; + + pItemInfo1->__id = cellIndex2; + pItemInfo2->__id = cellIndex1; + pItemInfo1->__merged = merged2; + pItemInfo2->__merged = merged1; + pItemInfo1->__enable = enable2; + pItemInfo2->__enable = enable1; + + if (pNode1->GetItemProxy() != null) + { + if (pItemInfo1->__merged || !pItemInfo1->__enable) + { + pNode1->GetItemProxy()->Visible(false); + } + else + { + pNode1->GetItemProxy()->Visible(true); + } + } + + if (pNode2->GetItemProxy() != null) + { + if (pItemInfo2->__merged || !pItemInfo2->__enable) + { + pNode2->GetItemProxy()->Visible(false); + } + else + { + pNode2->GetItemProxy()->Visible(true); + } + } + + SetUpdateState(true); + return E_SUCCESS; +} + +result +TableLayout::Unmerge(int row, int column) +{ + SysTryReturn(NID_UI, row >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Negative input argument : row(%d)", row); + SysTryReturn(NID_UI, row < __row, E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] Input Argument row over the max row : row(%d), maxRow(%d)", row, __row); + SysTryReturn(NID_UI, column >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Negative input argument : column(%d)", column); + SysTryReturn(NID_UI, column < __column, E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] Input Argument column over the max column : column(%d), maxColumn(%d)", column, __column); + + int endRow = 0; + int endColumn = 0; + + ProxyListNode* pCurNode = null; + TableItemInfo* pItemInfo = null; + + pCurNode = GetNode(row, column); + SysTryReturn(NID_UI, pCurNode, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALIDE_ARG] (%d, %d) cell is not merged.", row, column); + + pItemInfo = static_cast (pCurNode->GetItemInfo()); + if (pItemInfo == null) + { + return E_INVALID_STATE; + } + endRow = pItemInfo->__mergeEndPoint.x; + endColumn = pItemInfo->__mergeEndPoint.y; + + if (pItemInfo->__enable == false || pItemInfo->__merged == false + || endRow == NOT_MERGED || endColumn == NOT_MERGED) + { + return E_INVALID_STATE; + } + + pItemInfo->__mergeEndPoint.x = NOT_MERGED; + pItemInfo->__mergeEndPoint.y = NOT_MERGED; + + for (int i = row; i <= endRow; i++) + { + for (int j = column; j <= endColumn; j++) + { + pCurNode = GetNode(i, j); + if (pCurNode != null) + { + pItemInfo = static_cast (pCurNode->GetItemInfo()); + if (pItemInfo == null) + { + return E_INVALID_STATE; + } + pItemInfo->__enable = true; + pItemInfo->__merged = false; + + for (int k = 0; k < __mergedCellList.GetCount(); k++) + { + Integer* cellID = static_cast (__mergedCellList.GetAt(k)); + if (cellID->ToInt() == MakeCellID(i, j)) + { + __mergedCellList.RemoveAt(k, true); + break; + } + } + + if (pCurNode->GetItemProxy() != null) + { + pCurNode->GetItemProxy()->Visible(true); + } + } + } + } + + SetUpdateState(true); + return E_SUCCESS; +} + +result +TableLayout::GetMergeSize(int row, int column, int& rowSize, int& colSize) const +{ + rowSize = 0; + colSize = 0; + + SysTryReturn(NID_UI, row >= 0, E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Negative input argument : row(%d)", row); + SysTryReturn(NID_UI, row < __row, E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Input Argument row over the max row : row(%d), maxRow(%d)", row, __row); + SysTryReturn(NID_UI, column >= 0, E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Negative input argument : column(%d)", column); + SysTryReturn(NID_UI, column < __column, E_OUT_OF_RANGE, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] Input Argument column over the max column : column(%d), maxColumn(%d)", column, __column); + + ProxyListNode* pNode = GetNode(row, column); + if (pNode == null) + { + rowSize = 1; + colSize = 1; + return E_SUCCESS; + } + TableItemInfo* pItemInfo = static_cast (pNode->GetItemInfo()); + if (pItemInfo == null || pItemInfo->__enable == false) + { + return E_INVALID_STATE; + } + + if (pItemInfo->__merged == false) + { + rowSize = 1; + colSize = 1; + } + else + { + rowSize = pItemInfo->__mergeEndPoint.x - row + 1; + colSize = pItemInfo->__mergeEndPoint.y - column + 1; + } + + return E_SUCCESS; +} + +ProxyListNode* +TableLayout::GetNode(int row, int column) const +{ + ProxyList* pProxyList = GetProxyList(); + SysAssertf(pProxyList != null, "ProxyList is invalid"); + + ProxyListNode* pCurNode = pProxyList->GetFirstNode(); + TableItemInfo* pItemInfo = null; + int rowIndex = 0; + int columnIndex = 0; + while (pCurNode) + { + pItemInfo = static_cast (pCurNode->GetItemInfo()); + if (pItemInfo != null) + { + rowIndex = GetRow(pItemInfo->__id); + columnIndex = GetColumn(pItemInfo->__id); + if (row == rowIndex && column == columnIndex) + { + return pCurNode; + } + } + pCurNode = pProxyList->GetNextNode(*pCurNode); + } + return null; +} + +int +TableLayout::GetRow(int id) const +{ + return id >> 16; +} + +int +TableLayout::GetColumn(int id) const +{ + return id & 0x0000FFFF; +} + +int +TableLayout::MakeCellID(int row, int column) const +{ + return (row << 16) | (column & 0x0000FFFF); +} + +} // Tizen::Ui::_Layout +} // Tizen::Ui +} // Osp diff --git a/src/ui/resource/FUi_ResourceAccessibilityConfig.cpp b/src/ui/resource/FUi_ResourceAccessibilityConfig.cpp new file mode 100644 index 0000000..8105392 --- /dev/null +++ b/src/ui/resource/FUi_ResourceAccessibilityConfig.cpp @@ -0,0 +1,51 @@ +// +// 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. +// + +#include "FUi_ResourceAccessibilityConfig.h" + +START_UI_CONFIG(ACCESSIBILITY); +{ + ADD_COLOR_CONFIG(TITLE_TEXT, #0xFF4C4C4C); + ADD_COLOR_CONFIG(POINT_TEXT, #0xFF3B73B6); + ADD_COLOR_CONFIG(TEXT, #0xFF000000); + + ADD_IMAGE_CONFIG(POPUP_BG, #TTS_popup_bg.#.png); + ADD_IMAGE_CONFIG(FOCUS, #TTS_focus.#.png); + + START_UI_CONFIG_MODE(720x1280); + ADD_SHAPE_CONFIG(TITLE_FONT_SIZE, 40); + ADD_SHAPE_CONFIG(TEXT_FONT_SIZE, 32); + ADD_SHAPE_CONFIG(POPUP_WIDTH, 624); + ADD_SHAPE_CONFIG(TOP_MARGIN, 6); + ADD_SHAPE_CONFIG(BOTTON_MARGIN, 4); + ADD_SHAPE_CONFIG(SIDE_MARGIN, 24); + ADD_SHAPE_CONFIG(TITLE_HEIGHT, 63); + ADD_SHAPE_CONFIG(TEXT_TOP_MARGIN, 16); + ADD_SHAPE_CONFIG(TEXT_HEGIHT,42); + ADD_SHAPE_CONFIG(GIANT_FONT_SIZE, 98); + ADD_SHAPE_CONFIG(HUGE_FONT_SIZE, 81); + ADD_SHAPE_CONFIG(LARGE_FONT_SIZE, 64); + ADD_SHAPE_CONFIG(NORMAL_FONT_SIZE, 44); + ADD_SHAPE_CONFIG(SMALL_FONT_SIZE, 36); + END_UI_CONFIG_MODE(1280x720); +} +END_UI_CONFIG(ACCESSIBILITY); + +START_UI_CONFIG(BASIC); + ADD_COLOR_CONFIG(background, $background); + ADD_COLOR_CONFIG(foreground, $foreground); +END_UI_CONFIG(BASIC); diff --git a/src/ui/resource/FUi_ResourceAppWidgetConfig.cpp b/src/ui/resource/FUi_ResourceAppWidgetConfig.cpp new file mode 100644 index 0000000..ce1ea60 --- /dev/null +++ b/src/ui/resource/FUi_ResourceAppWidgetConfig.cpp @@ -0,0 +1,44 @@ +// +// 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_ResourceLiveboxConfig.cpp + * @brief This is the implementation file for the properties of Livebox. + */ + +#include "FUi_ResourceAppWidgetConfig.h" + +START_UI_CONFIG(APPWIDGET); +{ + ADD_IMAGE_CONFIG(POPUP_BG, #pd_btn_bg.#.png); + ADD_IMAGE_CONFIG(POPUP_BG_ARROW_UP, #pd_btn_bg_arrow_up.png); + ADD_IMAGE_CONFIG(POPUP_BG_ARROW_DOWN, #pd_btn_bg_arrow_down.png); + + START_UI_CONFIG_MODE(720x1280); + ADD_SHAPE_CONFIG(POPUP_LEFT_MARGIN, 18); + ADD_SHAPE_CONFIG(POPUP_RIGHT_MARGIN, 18); + ADD_SHAPE_CONFIG(POPUP_TOP_MARGIN, 30); + ADD_SHAPE_CONFIG(POPUP_BOTTOM_MARGIN, 30); + END_UI_CONFIG_MODE(720x1280); + + START_UI_CONFIG_MODE(1280x720); + ADD_SHAPE_CONFIG(POPUP_LEFT_MARGIN, 18); + ADD_SHAPE_CONFIG(POPUP_RIGHT_MARGIN, 18); + ADD_SHAPE_CONFIG(POPUP_TOP_MARGIN, 30); + ADD_SHAPE_CONFIG(POPUP_BOTTOM_MARGIN, 30); + END_UI_CONFIG_MODE(1280x720); +} +END_UI_CONFIG(APPWIDGET); diff --git a/src/ui/resource/FUi_ResourceButtonConfig.cpp b/src/ui/resource/FUi_ResourceButtonConfig.cpp new file mode 100644 index 0000000..17e54a4 --- /dev/null +++ b/src/ui/resource/FUi_ResourceButtonConfig.cpp @@ -0,0 +1,72 @@ +// +// 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_ResourceButtonConfig.cpp + * @brief This is the implementation file for the properties of Button. + */ + +#include "FUi_ResourceButtonConfig.h" + +START_UI_CONFIG(BUTTON); +{ + ADD_COLOR_CONFIG(BG_NORMAL, $W011); + ADD_COLOR_CONFIG(BG_DISABLED, $W011); + ADD_COLOR_CONFIG(BG_PRESSED, $B042); + ADD_COLOR_CONFIG(BG_HIGHLIGHTED, $W161); + + ADD_COLOR_CONFIG(TEXT_NORMAL, $F031L1); + ADD_COLOR_CONFIG(TEXT_DISABLED, $F031L1D); + ADD_COLOR_CONFIG(TEXT_PRESSED, $F031L1P); + ADD_COLOR_CONFIG(TEXT_HIGHLIGHTED, $F031L1); + + ADD_IMAGE_CONFIG(BG_NORMAL, #00_button_01.#.png); + ADD_IMAGE_CONFIG(BG_DISABLED, #00_button_01.#.png); + ADD_IMAGE_CONFIG(BG_PRESSED, #00_button_01.#.png); + ADD_IMAGE_CONFIG(BG_HIGHLIGHTED, #00_button_01_focus.#.png); + + ADD_IMAGE_CONFIG(BG_EFFECT_NORMAL, #00_button_01_ef.#.png); + ADD_IMAGE_CONFIG(BG_EFFECT_DISABLED, #00_button_01_dim_ef.#.png); + ADD_IMAGE_CONFIG(BG_EFFECT_PRESSED, #00_button_01_press_ef.#.png); + ADD_IMAGE_CONFIG(BG_EFFECT_HIGHLIGHTED, #00_button_01_ef.#.png); + + START_UI_CONFIG_MODE(480x800); + ADD_DIMENSION_CONFIG(MIN_SIZE, 0, 0); + END_UI_CONFIG_MODE(480x800); + + START_UI_CONFIG_MODE(720x1280); + ADD_SHAPE_CONFIG(DEFAULT_FONT_SIZE, 36); + ADD_SHAPE_CONFIG(MULTILINE_FONT_SIZE, 26); + ADD_SHAPE_CONFIG(LEFT_MARGIN, 12); + ADD_SHAPE_CONFIG(TOP_MARGIN, 4); + ADD_SHAPE_CONFIG(RIGHT_MARGIN, 12); + ADD_SHAPE_CONFIG(BOTTOM_MARGIN, 4); + ADD_FIXED_VALUE_CONFIG(TEXT_MAX_LENGTH, 60); + ADD_DIMENSION_CONFIG(MIN_SIZE, 0, 0); + END_UI_CONFIG_MODE(720x1280); + + START_UI_CONFIG_MODE(1280x720); + ADD_SHAPE_CONFIG(DEFAULT_FONT_SIZE, 36); + ADD_SHAPE_CONFIG(MULTILINE_FONT_SIZE, 26); + ADD_SHAPE_CONFIG(LEFT_MARGIN, 12); + ADD_SHAPE_CONFIG(TOP_MARGIN, 4); + ADD_SHAPE_CONFIG(RIGHT_MARGIN, 12); + ADD_SHAPE_CONFIG(BOTTOM_MARGIN, 4) + ADD_FIXED_VALUE_CONFIG(TEXT_MAX_LENGTH, 60); + ADD_DIMENSION_CONFIG(MIN_SIZE, 0, 0); + END_UI_CONFIG_MODE(1280x720); +} +END_UI_CONFIG(BUTTON); diff --git a/src/ui/resource/FUi_ResourceCheckButtonConfig.cpp b/src/ui/resource/FUi_ResourceCheckButtonConfig.cpp new file mode 100644 index 0000000..00de74d --- /dev/null +++ b/src/ui/resource/FUi_ResourceCheckButtonConfig.cpp @@ -0,0 +1,213 @@ +// +// 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_ResourceCheckButtonConfig.cpp + * @brief This is the implementation file for the properties of CheckButton. + */ + +#include "FUi_ResourceCheckButtonConfig.h" + +START_UI_CONFIG(CHECKBUTTON); +{ + ADD_COLOR_CONFIG(BG_NORMAL, $B0217); + ADD_COLOR_CONFIG(BG_DISABLED, $B0217); + ADD_COLOR_CONFIG(BG_PRESSED, $B041); + ADD_COLOR_CONFIG(BG_HIGHLIGHTED, $W161); + ADD_COLOR_CONFIG(BG_SELECTED, $B0217); + + ADD_COLOR_CONFIG(TEXT_NORMAL, $F011L1); + ADD_COLOR_CONFIG(TEXT_DISABLED, $F011L1D); + ADD_COLOR_CONFIG(TEXT_PRESSED, $F011L1P); + ADD_COLOR_CONFIG(TEXT_HIGHLIGHTED, $F011L1); + ADD_COLOR_CONFIG(TEXT_SELECTED, $F011L1); + + ADD_COLOR_CONFIG(TITLE_TEXT_NORMAL, $F011L1); + ADD_COLOR_CONFIG(TITLE_TEXT_DISABLED, $F011L1D); + ADD_COLOR_CONFIG(TITLE_TEXT_PRESSED, $F011L1P); + ADD_COLOR_CONFIG(TITLE_TEXT_HIGHLIGHTED, $F011L1); + ADD_COLOR_CONFIG(TITLE_TEXT_SELECTED, $F011L1); + + ADD_COLOR_CONFIG(DETAILED_ICON_BG_NORMAL, $W011); + ADD_COLOR_CONFIG(DETAILED_ICON_BG_DISABLED, $W011); + ADD_COLOR_CONFIG(DETAILED_ICON_BG_PRESSED, $B042); + ADD_COLOR_CONFIG(DETAILED_ICON_BG_HIGHLIGHTED, $W161); + ADD_COLOR_CONFIG(DETAILED_ICON_BG_SELECTED, $W011); + + ADD_COLOR_CONFIG(DETAILED_ICON_TEXT_NORMAL, $F032L1); + ADD_COLOR_CONFIG(DETAILED_ICON_TEXT_DISABLED, $F032L1D); + ADD_COLOR_CONFIG(DETAILED_ICON_TEXT_PRESSED, $F032L1P); + ADD_COLOR_CONFIG(DETAILED_ICON_TEXT_HIGHLIGHTED, $F032L1); + ADD_COLOR_CONFIG(DETAILED_ICON_TEXT_SELECTED, $F032L1); + + ADD_COLOR_CONFIG(DIVIDER_LINE_LEFT_NORMAL, $B0221L4); + ADD_COLOR_CONFIG(DIVIDER_LINE_RIGHT_NORMAL, $B0221L4); + + // bitmap + ADD_IMAGE_CONFIG(MARK_ICON_BG_NORMAL, #00_check_bg.png); + ADD_IMAGE_CONFIG(MARK_ICON_BG_DISABLED, #00_check_dim_bg.png); + ADD_IMAGE_CONFIG(MARK_ICON_BG_PRESSED, #00_check_press_bg.png); + ADD_IMAGE_CONFIG(MARK_ICON_BG_HIGHLIGHTED, #00_check_focus.png); + ADD_IMAGE_CONFIG(MARK_ICON_BG_SELECTED, #00_check_bg.png); + + ADD_IMAGE_CONFIG(MARK_ICON_NORMAL, #00_check_activated.png); + ADD_IMAGE_CONFIG(MARK_ICON_DISABLED, #00_check_activated_dim.png); + ADD_IMAGE_CONFIG(MARK_ICON_PRESSED, #00_check_activated_press.png); + ADD_IMAGE_CONFIG(MARK_ICON_HIGHLIGHTED, #00_check_activated.png); + ADD_IMAGE_CONFIG(MARK_ICON_SELECTED, #00_check_activated.png); + + ADD_IMAGE_CONFIG(ONOFF_ICON_BG_NORMAL, #00_button_radio_bg.png); + ADD_IMAGE_CONFIG(ONOFF_ICON_BG_DISABLED, #00_button_radio_dim_bg.png); + ADD_IMAGE_CONFIG(ONOFF_ICON_BG_PRESSED, #00_button_radio_press_bg.png); + ADD_IMAGE_CONFIG(ONOFF_ICON_BG_HIGHLIGHTED,#00_button_radio_focus.png); + ADD_IMAGE_CONFIG(ONOFF_ICON_BG_SELECTED, #00_button_radio_bg.png); + + ADD_IMAGE_CONFIG(ONOFF_ICON_NORMAL, #00_button_radio_activated.png); + ADD_IMAGE_CONFIG(ONOFF_ICON_DISABLED, #00_button_radio_activated_dim.png); + ADD_IMAGE_CONFIG(ONOFF_ICON_PRESSED, #00_button_radio_activated_press.png); + ADD_IMAGE_CONFIG(ONOFF_ICON_HIGHLIGHTED, #00_button_radio_activated.png); + ADD_IMAGE_CONFIG(ONOFF_ICON_SELECTED, #00_button_radio_activated.png); + + ADD_IMAGE_CONFIG(ONOFF_SLIDING_BG_NORMAL, #00_button_on_off_bg.png); + ADD_IMAGE_CONFIG(ONOFF_SLIDING_BG_DISABLED, #00_button_on_off_bg_dim.png); + ADD_IMAGE_CONFIG(ONOFF_SLIDING_BG_PRESSED, #00_button_on_off_bg.png); + ADD_IMAGE_CONFIG(ONOFF_SLIDING_BG_HIGHLIGHTED, #00_button_on_off_bg.png); + ADD_IMAGE_CONFIG(ONOFF_SLIDING_BG_SELECTED, #00_button_on_off_bg.png); + + ADD_IMAGE_CONFIG(ONOFF_SLIDING_ON_HANDLER_NORMAL, #00_button_on_handler.png); + ADD_IMAGE_CONFIG(ONOFF_SLIDING_ON_HANDLER_DISABLED, #00_button_on_handler_dim.png); + ADD_IMAGE_CONFIG(ONOFF_SLIDING_ON_HANDLER_PRESSED, #00_button_on_handler.png); + ADD_IMAGE_CONFIG(ONOFF_SLIDING_ON_HANDLER_HIGHLIGHTED, #00_button_of_off_handler_focus.png); + ADD_IMAGE_CONFIG(ONOFF_SLIDING_ON_HANDLER_SELECTED, #00_button_on_handler.png); + + ADD_IMAGE_CONFIG(ONOFF_SLIDING_OFF_HANDLER_NORMAL, #00_button_off_handler.png); + ADD_IMAGE_CONFIG(ONOFF_SLIDING_OFF_HANDLER_DISABLED, #00_button_off_handler_dim.png); + ADD_IMAGE_CONFIG(ONOFF_SLIDING_OFF_HANDLER_PRESSED, #00_button_off_handler.png); + ADD_IMAGE_CONFIG(ONOFF_SLIDING_OFF_HANDLER_HIGHLIGHTED, #00_button_of_off_handler_focus.png); + ADD_IMAGE_CONFIG(ONOFF_SLIDING_OFF_HANDLER_SELECTED, #00_button_off_handler.png); + + ADD_IMAGE_CONFIG(DETAILED_BG_NORMAL, #00_circle_bg.png); + ADD_IMAGE_CONFIG(DETAILED_BG_DISABLED, #00_circle_bg.png); + ADD_IMAGE_CONFIG(DETAILED_BG_PRESSED, #00_circle_bg.png); + ADD_IMAGE_CONFIG(DETAILED_BG_HIGHLIGHTED, #00_circle_button_focus.png); + ADD_IMAGE_CONFIG(DETAILED_BG_SELECTED, #00_circle_bg.png); + + ADD_IMAGE_CONFIG(DETAILED_BG_EFFECT_NORMAL, #00_circle_bg_ef.png); //not supported by theme + ADD_IMAGE_CONFIG(DETAILED_BG_EFFECT_DISABLED, #00_circle_bg_ef_dim.png); //not supported by theme + ADD_IMAGE_CONFIG(DETAILED_BG_EFFECT_PRESSED, #00_circle_bg_ef_press.png); //not supported by theme + ADD_IMAGE_CONFIG(DETAILED_BG_EFFECT_HIGHLIGHTED, #00_circle_bg_ef.png); //not supported by theme + ADD_IMAGE_CONFIG(DETAILED_BG_EFFECT_SELECTED, #00_circle_bg_ef.png); //not supported by theme + + ADD_IMAGE_CONFIG(DETAILED_ICON_NORMAL, #00_button_right.png); + ADD_IMAGE_CONFIG(DETAILED_ICON_DISABLED, #00_button_right.png); + ADD_IMAGE_CONFIG(DETAILED_ICON_PRESSED, #00_button_right.png); + ADD_IMAGE_CONFIG(DETAILED_ICON_HIGHLIGHTED, #00_button_right.png); + ADD_IMAGE_CONFIG(DETAILED_ICON_SELECTED, #00_button_right.png); + + ADD_IMAGE_CONFIG(DETAILED_ICON_EFFECT_NORMAL, #00_button_right_ef.png); //not supported by theme + ADD_IMAGE_CONFIG(DETAILED_ICON_EFFECT_PRESSED, #00_button_right_ef.png); //not supported by theme + + ADD_IMAGE_CONFIG(GROUPED_SINGLE_BG_NORMAL, #00_list_group_bg.#.png); + ADD_IMAGE_CONFIG(GROUPED_SINGLE_BG_DISABLED, #00_list_group_bg.#.png); + ADD_IMAGE_CONFIG(GROUPED_SINGLE_BG_PRESSED, #00_list_group_bg.#.png); + ADD_IMAGE_CONFIG(GROUPED_SINGLE_BG_HIGHLIGHTED, #00_groupedlist_bg_focus.#.png); + ADD_IMAGE_CONFIG(GROUPED_SINGLE_BG_SELECTED, #00_list_group_bg.#.png); + + ADD_IMAGE_CONFIG(GROUPED_SINGLE_BG_EFFECT_NORMAL, #00_list_group_bg_ef.#.png); + ADD_IMAGE_CONFIG(GROUPED_SINGLE_BG_EFFECT_PRESSED, #00_list_group_bg_ef.#.png); + + ADD_IMAGE_CONFIG(GROUPED_TOP_BG_NORMAL, #00_list_group_bg_top.#.png); + ADD_IMAGE_CONFIG(GROUPED_TOP_BG_DISABLED, #00_list_group_bg_top.#.png); + ADD_IMAGE_CONFIG(GROUPED_TOP_BG_PRESSED, #00_list_group_bg_top.#.png); + ADD_IMAGE_CONFIG(GROUPED_TOP_BG_HIGHLIGHTED, #00_groupedlist_top_bg_focus.#.png); + ADD_IMAGE_CONFIG(GROUPED_TOP_BG_SELECTED, #00_list_group_bg_top.#.png); + + ADD_IMAGE_CONFIG(GROUPED_TOP_BG_EFFECT_NORMAL, #00_list_group_bg_top_ef.#.png); + ADD_IMAGE_CONFIG(GROUPED_TOP_BG_EFFECT_PRESSED, #00_list_group_bg_top_ef.#.png); + + ADD_IMAGE_CONFIG(GROUPED_MIDDLE_BG_NORMAL, #00_list_group_bg_center.#.png); + ADD_IMAGE_CONFIG(GROUPED_MIDDLE_BG_DISABLED, #00_list_group_bg_center.#.png); + ADD_IMAGE_CONFIG(GROUPED_MIDDLE_BG_PRESSED, #00_list_group_bg_center.#.png); + ADD_IMAGE_CONFIG(GROUPED_MIDDLE_BG_HIGHLIGHTED, #00_groupedlist_center_bg_focus.#.png); + ADD_IMAGE_CONFIG(GROUPED_MIDDLE_BG_SELECTED, #00_list_group_bg_center.#.png); + + ADD_IMAGE_CONFIG(GROUPED_MIDDLE_BG_EFFECT_NORMAL, #00_list_group_bg_center_ef.#.png); + ADD_IMAGE_CONFIG(GROUPED_MIDDLE_BG_EFFECT_PRESSED, #00_list_group_bg_center_ef.#.png); + + ADD_IMAGE_CONFIG(GROUPED_BOTTOM_BG_NORMAL, #00_list_group_bg_bottom.#.png); + ADD_IMAGE_CONFIG(GROUPED_BOTTOM_BG_DISABLED, #00_list_group_bg_bottom.#.png); + ADD_IMAGE_CONFIG(GROUPED_BOTTOM_BG_PRESSED, #00_list_group_bg_bottom.#.png); + ADD_IMAGE_CONFIG(GROUPED_BOTTOM_BG_HIGHLIGHTED, #00_groupedlist_bottom_bg_focus.#.png); + ADD_IMAGE_CONFIG(GROUPED_BOTTOM_BG_SELECTED, #00_list_group_bg_bottom.#.png); + + ADD_IMAGE_CONFIG(GROUPED_BOTTOM_BG_EFFECT_NORMAL, #00_list_group_bg_bottom_ef.#.png); + ADD_IMAGE_CONFIG(GROUPED_BOTTOM_BG_EFFECT_PRESSED, #00_list_group_bg_bottom_ef.#.png); + + START_UI_CONFIG_MODE(480x800); + ADD_DIMENSION_CONFIG(MIN_SIZE, 0, 0); + END_UI_CONFIG_MODE(480x800); + + START_UI_CONFIG_MODE(720x1280); + ADD_SHAPE_CONFIG(TITLE_TEXT_FONT_SIZE, 32); + ADD_SHAPE_CONFIG(TEXT_FONT_SIZE, 44); + ADD_SHAPE_CONFIG(TITLE_TEXT_HEIGHT, 42); + ADD_SHAPE_CONFIG(TEXT_HEIGHT, 54); + ADD_SHAPE_CONFIG(LEFT_MARGIN, 26); + ADD_SHAPE_CONFIG(TOP_MARGIN, 8); + ADD_SHAPE_CONFIG(MARK_BITMAP_WIDTH, 63); + ADD_SHAPE_CONFIG(MARK_BITMAP_HEIGHT, 63); + ADD_SHAPE_CONFIG(ONOFF_SLIDING_BITMAP_WIDTH, 135); + ADD_SHAPE_CONFIG(ONOFF_SLIDING_BITMAP_HEIGHT, 63); + ADD_SHAPE_CONFIG(ONOFF_SLIDING_HANDLER_WIDTH, 81); + ADD_SHAPE_CONFIG(ONOFF_SLIDING_HANDLER_MARGIN, 0); + ADD_SHAPE_CONFIG(DETAILED_BITMAP_WIDTH, 72); + ADD_SHAPE_CONFIG(DETAILED_BITMAP_HEIGHT, 72); + ADD_SHAPE_CONFIG(DIVIDER_WIDTH, 2); + ADD_SHAPE_CONFIG(DIVIDER_TOP_MARGIN, 30); + ADD_SHAPE_CONFIG(DIVIDER_RIGHT_MARGIN, 18); + ADD_FIXED_VALUE_CONFIG(TITLE_TEXT_MAX_LENGTH, 60); + ADD_FIXED_VALUE_CONFIG(TEXT_MAX_LENGTH, 60); + ADD_DIMENSION_CONFIG(MIN_SIZE, 0, 0); + ADD_DIMENSION_CONFIG(MIN_DIMENSION, 106, 112); + ADD_DIMENSION_CONFIG(MIN_DIMENSION_WITH_ANNEX, 174, 112); + END_UI_CONFIG_MODE(720x1280); + + START_UI_CONFIG_MODE(1280x720); + ADD_SHAPE_CONFIG(TITLE_TEXT_FONT_SIZE, 32); + ADD_SHAPE_CONFIG(TEXT_FONT_SIZE, 44); + ADD_SHAPE_CONFIG(TITLE_TEXT_HEIGHT, 42); + ADD_SHAPE_CONFIG(TEXT_HEIGHT, 54); + ADD_SHAPE_CONFIG(LEFT_MARGIN, 26); + ADD_SHAPE_CONFIG(TOP_MARGIN, 8); + ADD_SHAPE_CONFIG(MARK_BITMAP_WIDTH, 63); + ADD_SHAPE_CONFIG(MARK_BITMAP_HEIGHT, 63); + ADD_SHAPE_CONFIG(ONOFF_SLIDING_BITMAP_WIDTH, 135); + ADD_SHAPE_CONFIG(ONOFF_SLIDING_BITMAP_HEIGHT, 63); + ADD_SHAPE_CONFIG(ONOFF_SLIDING_HANDLER_WIDTH, 81); + ADD_SHAPE_CONFIG(ONOFF_SLIDING_HANDLER_MARGIN, 0); + ADD_SHAPE_CONFIG(DETAILED_BITMAP_WIDTH, 72); + ADD_SHAPE_CONFIG(DETAILED_BITMAP_HEIGHT, 72); + ADD_SHAPE_CONFIG(DIVIDER_WIDTH, 2); + ADD_SHAPE_CONFIG(DIVIDER_TOP_MARGIN, 30); + ADD_SHAPE_CONFIG(DIVIDER_RIGHT_MARGIN, 18); + ADD_FIXED_VALUE_CONFIG(TITLE_TEXT_MAX_LENGTH, 60); + ADD_FIXED_VALUE_CONFIG(TEXT_MAX_LENGTH, 60); + ADD_DIMENSION_CONFIG(MIN_SIZE, 0, 0); + ADD_DIMENSION_CONFIG(MIN_DIMENSION, 106, 112); + ADD_DIMENSION_CONFIG(MIN_DIMENSION_WITH_ANNEX, 174, 112); + END_UI_CONFIG_MODE(1280x720); +} +END_UI_CONFIG(CHECKBUTTON); diff --git a/src/ui/resource/FUi_ResourceColorPickerConfig.cpp b/src/ui/resource/FUi_ResourceColorPickerConfig.cpp new file mode 100644 index 0000000..657fb2e --- /dev/null +++ b/src/ui/resource/FUi_ResourceColorPickerConfig.cpp @@ -0,0 +1,88 @@ +// +// 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_ResourceColorPickerConfig.cpp + * @brief This is the implementation file for the color, image and shape properties of ColorPicker. + */ + +#include "FUi_ResourceColorPickerConfig.h" + +START_UI_CONFIG(COLORPICKER); +{ + ADD_COLOR_CONFIG(DIVIDER_TOP_HALF, $B0224); + ADD_COLOR_CONFIG(DIVIDER_BOTTOM_HALF, $B0222); + ADD_COLOR_CONFIG(ARROW_BUTTON_BG_NORMAL, $W011); + ADD_COLOR_CONFIG(ARROW_BUTTON_BG_PRESSED, $B042); + ADD_COLOR_CONFIG(ARROW_BUTTON_BG_DISABLED, $W011); + ADD_COLOR_CONFIG(ARROW_BUTTON_NORMAL, $F032L1); + ADD_COLOR_CONFIG(ARROW_BUTTON_PRESSED, $F032L1P); + ADD_COLOR_CONFIG(ARROW_BUTTON_DISABLED, $F031L1D); + ADD_COLOR_CONFIG(HANDLER_HIGHLIGHTED, $W161); + + ADD_IMAGE_CONFIG(HUE_BAR_PORTRAIT_NORMAL, #00_color_picker_color.png); + ADD_IMAGE_CONFIG(LUMINANCE_BAR_PORTRAIT_NORMAL, #00_color_picker_brightness.png); + ADD_IMAGE_CONFIG(SATURATION_BAR_PORTRAIT_NORMAL, #00_color_picker_saturation.png); + ADD_IMAGE_CONFIG(ARROW_BUTTON_BG_NORMAL, #00_button_01.#.png); + ADD_IMAGE_CONFIG(ARROW_BUTTON_BG_PRESSED, #00_button_01.#.png); + ADD_IMAGE_CONFIG(ARROW_BUTTON_BG_DISABLED, #00_button_01.#.png); + ADD_IMAGE_CONFIG(ARROW_BUTTON_BG_EFFECT_NORMAL, #00_button_01_ef.#.png); + ADD_IMAGE_CONFIG(ARROW_BUTTON_BG_EFFECT_PRESSED, #00_button_01_press_ef.#.png); + ADD_IMAGE_CONFIG(ARROW_BUTTON_BG_EFFECT_DISABLED, #00_button_01_dim_ef.#.png); + ADD_IMAGE_CONFIG(LEFT_ARROW_BUTTON_NORMAL, #00_button_left.png); + ADD_IMAGE_CONFIG(LEFT_ARROW_BUTTON_PRESSED, #00_button_left.png); + ADD_IMAGE_CONFIG(LEFT_ARROW_BUTTON_DISABLED, #00_button_left.png); + ADD_IMAGE_CONFIG(RIGHT_ARROW_BUTTON_NORMAL, #00_button_right.png); + ADD_IMAGE_CONFIG(RIGHT_ARROW_BUTTON_PRESSED, #00_button_right.png); + ADD_IMAGE_CONFIG(RIGHT_ARROW_BUTTON_DISABLED, #00_button_right.png); + ADD_IMAGE_CONFIG(HANDLER_NORMAL, #00_color_picker_handler.png); + ADD_IMAGE_CONFIG(HANDLER_HIGHLIGHTED, #00_color_picker_handler_focus.png); + ADD_IMAGE_CONFIG(BAR_BG_PORTRAIT_NORMAL, #00_color_picker_custom_color.png); + ADD_IMAGE_CONFIG(HUE_BAR_LANDSCAPE_NORMAL, #00_color_picker_color_h.png); + ADD_IMAGE_CONFIG(LUMINANCE_BAR_LANDSCAPE_NORMAL, #00_color_picker_brightness_h.png); + 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(720x1280); + { + ADD_SHAPE_CONFIG(ARROW_BUTON_TOP_MARGIN, 19); + ADD_SHAPE_CONFIG(BAR_TOP_MARGIN, 26); + ADD_SHAPE_CONFIG(BAR_LEFT_RIGHT_MARGIN, 15); + ADD_SHAPE_CONFIG(SLIDER_HEIGHT, 63); + ADD_SHAPE_CONFIG(ARROW_BUTTON_WIDTH, 74); + ADD_SHAPE_CONFIG(ARROW_BUTTON_HEIGHT, 74); + ADD_SHAPE_CONFIG(HANDLER_WIDTH, 27); + ADD_SHAPE_CONFIG(HANDLER_HEIGHT, 72); + ADD_SHAPE_CONFIG(BLOCK_HEIGHT, 112); + ADD_FIXED_VALUE_CONFIG(BLOCK_MARGIN, 1); + ADD_SHAPE_CONFIG(BAR_WIDTH, 477); + ADD_SHAPE_CONFIG(DIVIDER_MARGIN, 16); + 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); + } + END_UI_CONFIG_MODE(720x1280); + + START_UI_CONFIG_MODE(1280x720); + { + ADD_SHAPE_CONFIG(BAR_WIDTH, 702); + ADD_DIMENSION_CONFIG(DEFAULT_SIZE, 1248, 336); + } + END_UI_CONFIG_MODE(1280x720); +} +END_UI_CONFIG(COLORPICKER); diff --git a/src/ui/resource/FUi_ResourceConfigLoader.cpp b/src/ui/resource/FUi_ResourceConfigLoader.cpp new file mode 100644 index 0000000..593723c --- /dev/null +++ b/src/ui/resource/FUi_ResourceConfigLoader.cpp @@ -0,0 +1,73 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +#include +#include "FUi_ResourceConfigLoader.h" + +using namespace Tizen::Base::Collection; + +namespace Tizen { namespace Ui { namespace _Resource { + +ConfigLoader* pColorLoader = null; + +ConfigLoader* +ConfigLoader::GetInstance(void) +{ + static pthread_once_t onceBlock = PTHREAD_ONCE_INIT; + + if (pColorLoader == null) + { + pthread_once(&onceBlock, CreateInstance); + } + return pColorLoader; +} + +void +ConfigLoader::CreateInstance(void) +{ + static ConfigLoader loader; + pColorLoader = &loader; +} + +ConfigLoader::~ConfigLoader(void) +{ + __itemList.RemoveAll(); +} +void +ConfigLoader::AddInitFunc(_Init_Func func) +{ + __itemList.Add(func); +} +int +ConfigLoader::GetInitFuncCount(void) const +{ + return __itemList.GetCount(); +} +bool +ConfigLoader::GetInitFunc(int index, _Init_Func& func) const +{ + int count = __itemList.GetCount(); + if (index >= count) + { + return null; + } + return __itemList.GetAt(index, func); +} +ConfigLoader::ConfigLoader(void) + : __itemList() +{ +} +}}}//Tizen::Ui::_Resource diff --git a/src/ui/resource/FUi_ResourceConfigParser.cpp b/src/ui/resource/FUi_ResourceConfigParser.cpp new file mode 100644 index 0000000..ad0372c --- /dev/null +++ b/src/ui/resource/FUi_ResourceConfigParser.cpp @@ -0,0 +1,4385 @@ +// +// 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_ResourceConfigParser.cpp + * @brief This is the header file for the ConfigParser. + * + * This header file contains the declarations of the ConfigParser. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_ResourceMapContainer.h" +#include "FUi_ResourceConfigParser.h" +#include "FUi_ResourceConfigTypes.h" + +using namespace Tizen::Base; +using namespace Collection; +using namespace Tizen::Io; +using namespace Tizen::Graphics; + +namespace +{ +class _ColorMatchingMapProvider + : public IHashCodeProviderT +{ +public: + _ColorMatchingMapProvider(void) {} + virtual ~_ColorMatchingMapProvider(void) {} + + virtual int GetHashCode(const String& obj) const + { + return obj.GetHashCode(); + } +}; + +class _ColorMatchingMapComparer + : public IComparerT +{ +public: + _ColorMatchingMapComparer(void) {} + virtual ~_ColorMatchingMapComparer(void) {} + virtual result Compare(const String& obj1, const String& obj2, int& cmp) const + { + if (obj1 == obj2) + { + cmp = 0; + return E_SUCCESS; + } + else + { + cmp = -1; + return E_SUCCESS; + } + } +}; +} + +namespace +{ +xmlSAXHandler mySaxHandler = {null, null, null, null, null, null, null, null, null, null, null, null, null, null, + Tizen::Ui::_Resource::ConfigParser::StartSaxFunc, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null}; +} + +namespace Tizen { namespace Ui { namespace _Resource +{ +ConfigParser* pConfigXmlHandler = null; +HashMapT* pColorMatchingMap = null; + +ConfigParser::ColorMatchingMap::ColorMatchingMap(void) + :HashMapT() + , __pProvider(null) + , __pComparer(null) +{ + __pProvider = new (std::nothrow) _ColorMatchingMapProvider; + SysTryReturnVoidResult(NID_UI, __pProvider, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + __pComparer = new (std::nothrow) _ColorMatchingMapComparer; + SysTryReturnVoidResult(NID_UI, __pComparer, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); +} +ConfigParser::ColorMatchingMap::~ColorMatchingMap(void) +{ + result r = E_SUCCESS; + Collection::IMapEnumeratorT< String, String* >* pMapEnum = null; + if (Collection::HashMapT::GetCount() > 0) + { + pMapEnum = Collection::HashMapT::GetMapEnumeratorN(); + SysTryReturn(NID_UI_ANIM, (pMapEnum != null), , E_SYSTEM, "[E_SYSTEM] System Error."); + + Collection::MapEntryT< String, String* > value; + while ((pMapEnum->MoveNext() == E_SUCCESS)) + { + r = pMapEnum->GetCurrent(value); + SysTryCatch(NID_UI_ANIM, (r == E_SUCCESS), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System Error."); + + String* pObj = value.GetValue(); + delete pObj; + } + Collection::HashMapT::RemoveAll(); + } + //fall through + CATCH: + delete pMapEnum; + delete __pProvider; + __pProvider = null; + delete __pComparer; + __pComparer = null; +} +bool +ConfigParser::ColorMatchingMap::Initialize(const String& version, const String& dVersion) +{ + if (HashMapT::Construct(0, 0, *__pProvider, *__pComparer) != E_SUCCESS) + { + return false; + } + /* + if (version == L"beta1") + { + Add(L"W0612", new (std::nothrow) String(L"DEFAULTCOLORTABLE::slider_handle_text_disabled")); + Add(L"B0622", new (std::nothrow) String(L"DEFAULTCOLORTABLE::contextmenu_list_item_divider_01")); + Add(L"B0231", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_group_item_divider_line_01")); + Add(L"B022", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_item_divider_line_01")); + + Add(L"B011", new (std::nothrow) String(L"DEFAULTCOLORTABLE::form_bg")); + Add(L"B012", new (std::nothrow) String(L"DEFAULTCOLORTABLE::form_group_list_bg")); + Add(L"B013", new (std::nothrow) String(L"DEFAULTCOLORTABLE::form_black")); + Add(L"B014", new (std::nothrow) String(L"DEFAULTCOLORTABLE::form_white")); + Add(L"B015", new (std::nothrow) String(L"DEFAULTCOLORTABLE::form_list_reorder_bg")); + Add(L"B0211", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_bg")); + Add(L"B0211D", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_bg_disabled")); + Add(L"B0212", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_context_item_bg")); + Add(L"B0213", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_grid_item_bg")); + Add(L"B0214", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_2nd_depth_item_bg")); + Add(L"B0215", new (std::nothrow) String(L"DEFAULTCOLORTABLE::searchbar_bg")); + Add(L"B0216", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_select_all_item_bg")); + Add(L"B0217", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_group_item_bg")); + Add(L"B0217D", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_group_item_bg_disabled")); + Add(L"B0221", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_item_divider_line_01")); + Add(L"B0222", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_item_divider_line_02")); + Add(L"B0231L1", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_group_item_divider_line_01")); + Add(L"B0231L2", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_group_item_divider_line_02")); + Add(L"B0232", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_group_item_bar")); + Add(L"B0233", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_group_item_top_line")); + Add(L"B031", new (std::nothrow) String(L"DEFAULTCOLORTABLE::indicator_bg")); + Add(L"B041", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_item_bg_pressed")); + Add(L"B042", new (std::nothrow) String(L"DEFAULTCOLORTABLE::button_item_bg_pressed")); + Add(L"B043", new (std::nothrow) String(L"DEFAULTCOLORTABLE::old_item_bg_pressed")); + Add(L"B044", new (std::nothrow) String(L"DEFAULTCOLORTABLE::contextmenu_item_bg_pressed")); + Add(L"B0511", new (std::nothrow) String(L"DEFAULTCOLORTABLE::header_bg")); + Add(L"B0512", new (std::nothrow) String(L"DEFAULTCOLORTABLE::header_optiontray_bg")); + Add(L"B0513", new (std::nothrow) String(L"DEFAULTCOLORTABLE::header_tab_bg")); + Add(L"B0514", new (std::nothrow) String(L"DEFAULTCOLORTABLE::header_tab_item_bg")); + Add(L"B0514P1", new (std::nothrow) String(L"DEFAULTCOLORTABLE::header_tab_item_bg_selected")); + Add(L"B0514P2", new (std::nothrow) String(L"DEFAULTCOLORTABLE::header_tab_item_bg_edit")); + Add(L"B0515", new (std::nothrow) String(L"DEFAULTCOLORTABLE::footer_toolbar_bg")); + Add(L"B0516", new (std::nothrow) String(L"DEFAULTCOLORTABLE::footer_toolbar_item_bg_pressed")); + Add(L"B0517", new (std::nothrow) String(L"DEFAULTCOLORTABLE::footer_tab_item_bg")); + Add(L"B0517P1", new (std::nothrow) String(L"DEFAULTCOLORTABLE::footer_tab_item_selected")); + Add(L"B0517P2", new (std::nothrow) String(L"DEFAULTCOLORTABLE::footer_tab_item_bg_edit")); + Add(L"B0518", new (std::nothrow) String(L"DEFAULTCOLORTABLE::old_item_bg")); + Add(L"B0518P", new (std::nothrow) String(L"DEFAULTCOLORTABLE::tabbar_item_bg")); + Add(L"B0520", new (std::nothrow) String(L"DEFAULTCOLORTABLE::old_softkey_item_bg_normal")); + Add(L"B0520P", new (std::nothrow) String(L"DEFAULTCOLORTABLE::old_softkey_item_bg_pressed")); + Add(L"B052L1", new (std::nothrow) String(L"DEFAULTCOLORTABLE::header_item_normal")); + Add(L"B052L1P", new (std::nothrow) String(L"DEFAULTCOLORTABLE::header_item_selected")); + Add(L"B052L1D", new (std::nothrow) String(L"DEFAULTCOLORTABLE::header_item_disabled")); + Add(L"B052L2", new (std::nothrow) String(L"DEFAULTCOLORTABLE::header_translucent_item_normal")); + Add(L"B052L2P", new (std::nothrow) String(L"DEFAULTCOLORTABLE::header_more_icon_pressed")); + Add(L"B052L3", new (std::nothrow) String(L"DEFAULTCOLORTABLE::header_segment_font_normal")); + Add(L"B052L4", new (std::nothrow) String(L"DEFAULTCOLORTABLE::footer_text_normal")); + Add(L"B052L4P", new (std::nothrow) String(L"DEFAULTCOLORTABLE::footer_text_pressed")); + Add(L"B052L4D", new (std::nothrow) String(L"DEFAULTCOLORTABLE::footer_text_disabled")); + Add(L"B052L5", new (std::nothrow) String(L"DEFAULTCOLORTABLE::header_title_text_normal")); + Add(L"B052L6", new (std::nothrow) String(L"DEFAULTCOLORTABLE::header_tab_text_normal")); + Add(L"B052L6P", new (std::nothrow) String(L"DEFAULTCOLORTABLE::header_tab_text_pressed")); + Add(L"B052L8", new (std::nothrow) String(L"DEFAULTCOLORTABLE::old_footer_text_normal")); + Add(L"B052L8P", new (std::nothrow) String(L"DEFAULTCOLORTABLE::old_footer_text_pressed")); + Add(L"B052L8D", new (std::nothrow) String(L"DEFAULTCOLORTABLE::old_footer_text_disabled")); + Add(L"B052L9", new (std::nothrow) String(L"DEFAULTCOLORTABLE::old_softkey_item_icon_normal")); + Add(L"B052L9P", new (std::nothrow) String(L"DEFAULTCOLORTABLE::old_softkey_item_icon_pressed")); + Add(L"B052L9D", new (std::nothrow) String(L"DEFAULTCOLORTABLE::old_softkey_item_icon_disabled")); + Add(L"B0531", new (std::nothrow) String(L"DEFAULTCOLORTABLE::header_segment_item_bg_normal")); + Add(L"B0532", new (std::nothrow) String(L"DEFAULTCOLORTABLE::header_segment_item_bg_selected")); + Add(L"B0533", new (std::nothrow) String(L"DEFAULTCOLORTABLE::footer_segment_item_bg_normal")); + Add(L"B0534", new (std::nothrow) String(L"DEFAULTCOLORTABLE::footer_segment_item_bg_selected")); + Add(L"B0535", new (std::nothrow) String(L"DEFAULTCOLORTABLE::header_translucent_segment_item_bg_normal")); + Add(L"B0536", new (std::nothrow) String(L"DEFAULTCOLORTABLE::header_translucent_segment_item_bg_selected")); + Add(L"B0537", new (std::nothrow) String(L"DEFAULTCOLORTABLE::header_expandable_line")); + Add(L"B0545", new (std::nothrow) String(L"DEFAULTCOLORTABLE::header_button_item_bg_pressed")); + Add(L"B0556", new (std::nothrow) String(L"DEFAULTCOLORTABLE::header_translucent_item_bg")); + Add(L"B0557", new (std::nothrow) String(L"DEFAULTCOLORTABLE::header_translucent_item_bg_normal")); + Add(L"B0558", new (std::nothrow) String(L"DEFAULTCOLORTABLE::header_translucent_item_bg_pressed")); + Add(L"B061L1", new (std::nothrow) String(L"DEFAULTCOLORTABLE::popup_bg")); + Add(L"B061L2", new (std::nothrow) String(L"DEFAULTCOLORTABLE::popup_title_bg")); + Add(L"B061L3", new (std::nothrow) String(L"DEFAULTCOLORTABLE::popup_bottom_bg")); + Add(L"B061L4", new (std::nothrow) String(L"DEFAULTCOLORTABLE::contextmenu_bg")); + Add(L"B0621", new (std::nothrow) String(L"DEFAULTCOLORTABLE::popup_list_item_divider")); + Add(L"B0622L1", new (std::nothrow) String(L"DEFAULTCOLORTABLE::contextmenu_list_item_divider_01")); + Add(L"B0622L2", new (std::nothrow) String(L"DEFAULTCOLORTABLE::contextmenu_list_item_divider_02")); + Add(L"B0623L1", new (std::nothrow) String(L"DEFAULTCOLORTABLE::contextmenu_grid_item_divider_01")); + Add(L"B0623L2", new (std::nothrow) String(L"DEFAULTCOLORTABLE::contextmenu_grid_item_divider_02")); + Add(L"B063L1", new (std::nothrow) String(L"DEFAULTCOLORTABLE::popup_text")); + Add(L"B063L1P", new (std::nothrow) String(L"DEFAULTCOLORTABLE::contextmenu_item_text_pressed")); + Add(L"B063L2", new (std::nothrow) String(L"DEFAULTCOLORTABLE::ticker_detail_text")); + Add(L"B063L3", new (std::nothrow) String(L"DEFAULTCOLORTABLE::popup_progress_text")); + Add(L"B063L4", new (std::nothrow) String(L"DEFAULTCOLORTABLE::popup_title_text")); + Add(L"B063L5", new (std::nothrow) String(L"DEFAULTCOLORTABLE::contextmenu_item_text_normal")); + Add(L"B063L5D", new (std::nothrow) String(L"DEFAULTCOLORTABLE::contextmenu_item_text_disabled")); + Add(L"B071", new (std::nothrow) String(L"DEFAULTCOLORTABLE::scroll_bar_bg")); + Add(L"B0721", new (std::nothrow) String(L"DEFAULTCOLORTABLE::fastscroll_index_bar_text_normal")); + Add(L"B0722", new (std::nothrow) String(L"DEFAULTCOLORTABLE::fastscroll_index_bar_text_selected")); + Add(L"B0723", new (std::nothrow) String(L"DEFAULTCOLORTABLE::fastscroll_index_bar_bg")); + Add(L"B0724", new (std::nothrow) String(L"DEFAULTCOLORTABLE::fastscroll_index_bar_line_01")); + Add(L"B0725", new (std::nothrow) String(L"DEFAULTCOLORTABLE::fastscroll_index_bar_line_02")); + Add(L"B0731", new (std::nothrow) String(L"DEFAULTCOLORTABLE::fastscroll_popup_bg")); + Add(L"B0732", new (std::nothrow) String(L"DEFAULTCOLORTABLE::fastscroll_popup_text")); + Add(L"B0741", new (std::nothrow) String(L"DEFAULTCOLORTABLE::old_fastscroll_index_bar_text_normal")); + Add(L"B0742", new (std::nothrow) String(L"DEFAULTCOLORTABLE::old_fastscroll_index_bar_text_selected")); + Add(L"B0743", new (std::nothrow) String(L"DEFAULTCOLORTABLE::old_fastscroll_index_bar_bg")); + Add(L"B0744", new (std::nothrow) String(L"DEFAULTCOLORTABLE::old_fastscroll_index_bar_line_01")); + Add(L"B0745", new (std::nothrow) String(L"DEFAULTCOLORTABLE::old_fastscroll_index_bar_line_02")); + Add(L"B0751", new (std::nothrow) String(L"DEFAULTCOLORTABLE::old_fastscroll_popup_bg")); + Add(L"F011L1", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_item_text_normal")); + Add(L"F011L1P", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_item_text_pressed")); + Add(L"F011L1D", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_item_text_disabled")); + Add(L"F011L2", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_item_sub_text_setting_normal")); + Add(L"F011L2D", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_item_sub_text_setting_disabled")); + Add(L"F011L3", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_item_sub_text_title_normal")); + Add(L"F011L3D", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_item_sub_text_title_disabled")); + Add(L"F011L4", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_item_text_read_normal")); + Add(L"F011L4D", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_item_text_read_disabled")); + Add(L"F011L5", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_group_title_text")); + Add(L"F011L6", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_item_no_content_text")); + Add(L"F011L7", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_item_3line_2nd_text_normal")); + Add(L"F011L7D", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_item_3line_2nd_text_disabled")); + Add(L"F011L8", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_item_text_invalid")); + Add(L"F011L9", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_item_text_white")); + Add(L"F011L10", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_item_bubble_text")); + Add(L"F011L11", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_item_contact_text")); + Add(L"F011L12", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_item_name_text")); + Add(L"F011L13", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_item_edit_mode_text_01")); + Add(L"F011L14", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_item_edit_mode_text_02")); + Add(L"F011L15", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_item_message_time_failed_text")); + Add(L"F011L16", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_item_message_time_sent_text")); + Add(L"F011L17", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_item_message_time_receive_text")); + Add(L"F011L18", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_item_message_date_text")); + Add(L"F011L19", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_item_message_group_chat_name_text")); + Add(L"F011L20", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_item_sweep_text")); + Add(L"F011L21", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_item_help_text")); + Add(L"F011L22", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_item_message_help_text")); + Add(L"F021L1i", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_item_icon_normal")); + Add(L"F021L1iP", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_item_icon_pressed")); + Add(L"F021L1iD", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_item_icon_disabled")); + Add(L"F022L1i", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_item_star_icon_normal")); + Add(L"F022L2i", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_item_star_icon_selected")); + Add(L"F031L1", new (std::nothrow) String(L"DEFAULTCOLORTABLE::button_text_item_normal")); + Add(L"F031L1P", new (std::nothrow) String(L"DEFAULTCOLORTABLE::button_text_item_pressed")); + Add(L"F031L1D", new (std::nothrow) String(L"DEFAULTCOLORTABLE::button_text_item_disabled")); + Add(L"F031L3", new (std::nothrow) String(L"DEFAULTCOLORTABLE::tabbar_item_text_normal")); + Add(L"F031L3P", new (std::nothrow) String(L"DEFAULTCOLORTABLE::tabbar_item_text_pressed")); + Add(L"F031L3D", new (std::nothrow) String(L"DEFAULTCOLORTABLE::tabbar_item_text_disabled")); + Add(L"F032L1", new (std::nothrow) String(L"DEFAULTCOLORTABLE::button_icon_item_normal")); + Add(L"F032L1P", new (std::nothrow) String(L"DEFAULTCOLORTABLE::button_icon_item_pressed")); + Add(L"F032L1D", new (std::nothrow) String(L"DEFAULTCOLORTABLE::button_icon_item_disabled")); + Add(L"F032L2", new (std::nothrow) String(L"DEFAULTCOLORTABLE::warning_font_icon_normal")); + Add(L"F032L2P", new (std::nothrow) String(L"DEFAULTCOLORTABLE::warning_font_icon_pressed")); + Add(L"F032L2D", new (std::nothrow) String(L"DEFAULTCOLORTABLE::warning_font_icon_disabled")); + Add(L"F041i", new (std::nothrow) String(L"DEFAULTCOLORTABLE::searchbar_icon_normal")); + Add(L"F041iD", new (std::nothrow) String(L"DEFAULTCOLORTABLE::searchbar_icon_disabled")); + Add(L"F051", new (std::nothrow) String(L"DEFAULTCOLORTABLE::editfield_guide_text")); + Add(L"F052", new (std::nothrow) String(L"DEFAULTCOLORTABLE::editfield_cursor")); + Add(L"W011", new (std::nothrow) String(L"DEFAULTCOLORTABLE::button_bg")); + Add(L"W012", new (std::nothrow) String(L"DEFAULTCOLORTABLE::popup_button_bg")); + Add(L"W013", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_context_item_button_bg")); + Add(L"W0141", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_context_delete_button_bg_normal")); + Add(L"W0141P", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_context_delete_button_bg_pressed")); + Add(L"W021L1", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_index_section_title_bg_normal")); + Add(L"W021L1P", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_index_section_title_bg_pressed")); + Add(L"W021L2", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_index_section_title_line_normal")); + Add(L"W021L2P", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_index_section_title_line_pressed")); + Add(L"W021L3", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_index_section_title_text_normal")); + Add(L"W021L3P", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_index_section_title_text_pressed")); + Add(L"W031", new (std::nothrow) String(L"DEFAULTCOLORTABLE::searchbar_field_bg_normal")); + Add(L"W031D", new (std::nothrow) String(L"DEFAULTCOLORTABLE::searchbar_field_bg_disabled")); + Add(L"W032", new (std::nothrow) String(L"DEFAULTCOLORTABLE::searchbar_text_normal")); + Add(L"W032D", new (std::nothrow) String(L"DEFAULTCOLORTABLE::searchbar_text_disabled")); + Add(L"W041", new (std::nothrow) String(L"DEFAULTCOLORTABLE::editfield_bg")); + Add(L"W0611", new (std::nothrow) String(L"DEFAULTCOLORTABLE::slider_handle_text")); + Add(L"W0611D", new (std::nothrow) String(L"DEFAULTCOLORTABLE::slider_handle_text_disabled")); + Add(L"W062L1", new (std::nothrow) String(L"DEFAULTCOLORTABLE::slider_bar_bg")); + Add(L"W062L2", new (std::nothrow) String(L"DEFAULTCOLORTABLE::slider_bar")); + Add(L"W062L3", new (std::nothrow) String(L"DEFAULTCOLORTABLE::progress_circle_bar_bg")); + Add(L"W062L4", new (std::nothrow) String(L"DEFAULTCOLORTABLE::progress_circle_bar")); + Add(L"W063", new (std::nothrow) String(L"DEFAULTCOLORTABLE::slider_bubble_bg")); + Add(L"W0641", new (std::nothrow) String(L"DEFAULTCOLORTABLE::slider_handle_bg")); + Add(L"W0641P", new (std::nothrow) String(L"DEFAULTCOLORTABLE::slider_handle_bg_pressed")); + Add(L"W0641D", new (std::nothrow) String(L"DEFAULTCOLORTABLE::slider_handle_bg_disabled")); + Add(L"W0711", new (std::nothrow) String(L"DEFAULTCOLORTABLE::token_edit_item_bg_normal")); + Add(L"W0712", new (std::nothrow) String(L"DEFAULTCOLORTABLE::token_edit_item_outline_normal")); + Add(L"W0713", new (std::nothrow) String(L"DEFAULTCOLORTABLE::token_edit_item_bg_pressed")); + Add(L"W0714", new (std::nothrow) String(L"DEFAULTCOLORTABLE::token_edit_item_outline_pressed")); + Add(L"W0721", new (std::nothrow) String(L"DEFAULTCOLORTABLE::token_edit_expansion_button_bg")); + Add(L"W0811", new (std::nothrow) String(L"DEFAULTCOLORTABLE::picker_detail_bar_bg")); + Add(L"W0812", new (std::nothrow) String(L"DEFAULTCOLORTABLE::picker_button_bg")); + Add(L"W082", new (std::nothrow) String(L"DEFAULTCOLORTABLE::picker_detail_bar_bg")); + Add(L"W083", new (std::nothrow) String(L"DEFAULTCOLORTABLE::picker_keypad_button_bg")); + Add(L"W084", new (std::nothrow) String(L"DEFAULTCOLORTABLE::picker_detail_bar_text_normal")); + Add(L"W084P", new (std::nothrow) String(L"DEFAULTCOLORTABLE::picker_detail_bar_text_pressed")); + Add(L"W101", new (std::nothrow) String(L"DEFAULTCOLORTABLE::tabbar_item_bg_pressed")); + Add(L"W111", new (std::nothrow) String(L"DEFAULTCOLORTABLE::optionmenu_bg")); + Add(L"W1121", new (std::nothrow) String(L"DEFAULTCOLORTABLE::optionmenu_item_normal")); + Add(L"W1122", new (std::nothrow) String(L"DEFAULTCOLORTABLE::optionmenu_item_pressed")); + Add(L"W1123", new (std::nothrow) String(L"DEFAULTCOLORTABLE::optionmenu_item_disabled")); + Add(L"W1211", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_group_table_item_bg")); + Add(L"W1212", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_group_table_item_inputmode_bg")); + Add(L"W1221", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_group_table_item_text")); + Add(L"W1222", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_group_table_item_text_inputmode")); + Add(L"W1223", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_group_table_item_text_pressed")); + Add(L"W131", new (std::nothrow) String(L"DEFAULTCOLORTABLE::splitpanel_divider_bg")); + Add(L"W132", new (std::nothrow) String(L"DEFAULTCOLORTABLE::splitpanel_divider_bg_pressed")); + Add(L"W141", new (std::nothrow) String(L"DEFAULTCOLORTABLE::list_item_no_content_icon")); + Add(L"W151", new (std::nothrow) String(L"DEFAULTCOLORTABLE::iconlist_item_border_normal")); + Add(L"W152", new (std::nothrow) String(L"DEFAULTCOLORTABLE::iconlist_item_border_loading")); + Add(L"W153", new (std::nothrow) String(L"DEFAULTCOLORTABLE::iconlist_item_border_selected")); + } + */ + return true; +} +HashMapT* +ConfigParser::GetMatchingTable(void) +{ + return pColorMatchingMap; +} + +ConfigParser::ConfigParser(void) + : __pMapContainer(null) + , __pCurrentAttribute(null) + , __pCurrentAnimationList(null) + , __palette(false) + , __pColorKeyTable(null) + , __pImageKeyTable(null) + , __pAnimationKeyTable(null) + , __pProvider(null) + , __pComparer(null) +{ + __pProvider = new _ResourceHashCodeProvider; + SysTryReturnVoidResult(NID_UI, __pProvider, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + __pComparer = new _ResourceComparer; + SysTryReturnVoidResult(NID_UI, __pComparer, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); +} +ConfigParser::~ConfigParser(void) +{ + delete pColorMatchingMap; + pColorMatchingMap = null; + delete __pColorKeyTable; + __pColorKeyTable = null; + delete __pImageKeyTable; + __pImageKeyTable = null; + delete __pAnimationKeyTable; + __pAnimationKeyTable = null; + delete __pProvider; + __pProvider = null; + delete __pComparer; + __pComparer = null; + if (__pCurrentAttribute) + { + delete [] __pCurrentAttribute; + __pCurrentAttribute = null; + } +} +bool +ConfigParser::Parse(const String& filename, MapContainer & table) +{ + File file; + ByteBuffer buffer; + FileAttributes attrib; + int readCount = 0; + byte* pXmlContents = null; + result r = E_SUCCESS; + int size = 0; + + if (!File::IsFileExist(filename)) + { + return false; + } + r = file.Construct(filename, L"r"); + if (IsFailed(r)) + { + SysLogException(NID_UI, E_SYSTEM, "[E_SYSTEM] Parse Failed -- XML file Construct."); + return false; + } + + r = Tizen::Io::File::GetAttributes(filename, attrib); + if (IsFailed(r)) + { + SysLogException(NID_UI, E_SYSTEM, "[E_SYSTEM] Parse Failed -- XML file GetAttributes."); + return false; + } + size = (int) attrib.GetFileSize(); + + r = buffer.Construct(size); + if (IsFailed(r)) + { + SysLogException(NID_UI, E_SYSTEM, "[E_SYSTEM] Parse Failed - Buffer Construct Failed."); + return false; + } + + r = file.Read(buffer); + if (IsFailed(r)) + { + SysLogException(NID_UI, E_SYSTEM, "[E_SYSTEM] Parse Failed -- can't read the file."); + return false; + } + + readCount = buffer.GetPosition(); + pXmlContents = new (std::nothrow) byte[readCount]; + SysTryReturn(NID_UI, pXmlContents != null, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create XmlContents."); + buffer.Flip(); + + r = buffer.GetArray(pXmlContents, 0, readCount); + if (IsFailed(r)) + { + SysLogException(NID_UI, E_SYSTEM, "[E_SYSTEM] Parse Failed -- buffer.GetArray is Failed."); + delete[] pXmlContents; + return false; + } + char* pXmlBuffer = (char*) pXmlContents; + + __pMapContainer = &table; + pConfigXmlHandler = this; + xmlSAXHandlerPtr pMySaxhandler = &mySaxHandler; + xmlSubstituteEntitiesDefault(1); + xmlSAXUserParseMemory(pMySaxhandler, null, pXmlBuffer, readCount); + pConfigXmlHandler = null; + delete [] pXmlContents; + return true; +} +void +ConfigParser::StartSaxFunc(void* pXmlParserCtxt, const xmlChar* pName, const xmlChar** pAttributes) +{ + if (xmlStrcasecmp(pName, (xmlChar*) "Image") == 0) + { + pConfigXmlHandler->AddImage(pAttributes); + } + else if (xmlStrcasecmp(pName, (xmlChar*) "Color") == 0) + { + pConfigXmlHandler->AddColor(pAttributes); + } + else if (xmlStrcasecmp(pName, (xmlChar*) "Theme") == 0) + { + pConfigXmlHandler->SetInformation(pAttributes); + } + else if (xmlStrcasecmp(pName, (xmlChar*) "Palette") == 0) + { + pConfigXmlHandler->StartAttribute(pAttributes, true); + } + else if (xmlStrcasecmp(pName, (xmlChar*) "Control") == 0) + { + pConfigXmlHandler->StartAttribute(pAttributes, false); + } + else if (xmlStrcasecmp(pName, (xmlChar*) "Animation") == 0) + { + pConfigXmlHandler->AddAnimation(pAttributes); + } + else if (xmlStrcasecmp(pName, (xmlChar*) "AnimationFrame") == 0) + { + pConfigXmlHandler->AddAnimationFrame(pAttributes); + } + else + { + ;//nothing to do + } +} + +void +ConfigParser::SetInformation(const xmlChar** pAttributes) +{ + if (pAttributes != null) + { + for (int i = 0; (pAttributes[i] != null); i++) + { + if (xmlStrcasecmp(pAttributes[i], (xmlChar*) "Version") == 0) + { + String version = (char*) pAttributes[++i]; + __pMapContainer->SetVersion(version); +// ColorMatchingMap* matchingMap = new ColorMatchingMap; +// if (!matchingMap->Initialize(version)) +// { +// delete matchingMap; +// } +// else +// { +// pColorMatchingMap = matchingMap; +// } + } + } + } +} + +void +ConfigParser::StartAttribute(const xmlChar** pAttributes, bool palette) +{ + __palette = palette; + if (pAttributes != null) + { + for (int i = 0; (pAttributes[i] != null); i++) + { + if (xmlStrcasecmp(pAttributes[i], (xmlChar*) "Name") == 0) + { + char* pValue = (char*) pAttributes[++i]; + int len = strlen(pValue); + if (len > 0) + { + if (__pCurrentAttribute) + { + delete [] __pCurrentAttribute; + __pCurrentAttribute = null; + } + __pCurrentAttribute = new (std::nothrow) char [len +1 ]; + strcpy(__pCurrentAttribute, pValue); + } + } + } + } +} + +void +ConfigParser::AddColor(const xmlChar** pAttributes) +{ + if (pAttributes != null) + { + for (int i = 0; (pAttributes[i] != null); i++) + { + if (strlen((char*) pAttributes[++i]) > 0) + { + if (__palette) + { + char* key = null; + int currentAttributeLength = strlen(__pCurrentAttribute); + int currentKeyLength = strlen((char*) pAttributes[i - 1]); + key = new (std::nothrow) char [currentAttributeLength + currentKeyLength + 3]; + strncpy(key, __pCurrentAttribute, currentAttributeLength); + strncpy(key+currentAttributeLength, "::", 2); + strncpy(key+currentAttributeLength+2, (char*) pAttributes[i - 1], currentKeyLength); + key[currentAttributeLength + currentKeyLength + 2] ='\0'; + unsigned int color = 0; + if (GetValue((char*) pAttributes[i], color)) + { + ResourceItem* pItem = new (std::nothrow) ResourceItem(RESOURCE_TYPE_COLOR); + pItem->SetRawDataColor(color); + const char* _key =key; + ResourceKey resourceKey(_key); + if (__pMapContainer->GetPalette()->Add(resourceKey, pItem) != E_SUCCESS) + { + SysLog(NID_UI, "Wrong resource color ID is tried to register %s", key); + } + } + delete [] key; + } + else + { + char* key = null; + int currentAttributeLength = strlen(__pCurrentAttribute); + int currentKeyLength = strlen((char*) pAttributes[i - 1]); + key = new (std::nothrow) char [currentAttributeLength + currentKeyLength + 3]; + strncpy(key, __pCurrentAttribute, currentAttributeLength); + strncpy(key+currentAttributeLength, "::", 2); + strncpy(key+currentAttributeLength+2, (char*) pAttributes[i - 1], currentKeyLength); + key[currentAttributeLength + currentKeyLength + 2] ='\0'; + ResourceItem* pItem = null; + unsigned int resourceKey = 0; + const char* tempkey = key; + ResourceKey _key(tempkey); + if (GetColorKeyTable()->GetValue(_key, resourceKey) == E_SUCCESS) + { + if (__pMapContainer->GetColorMap()->GetValue(resourceKey, pItem) == E_SUCCESS) + { + unsigned int color = 0; + if (GetValue((char*) pAttributes[i], color)) + { + pItem->SetRawDataColor(color); + } + else + { + int len = strlen((char*) pAttributes[i]+1); + char* pValue = new (std::nothrow) char [len+1]; + strcpy(pValue, (char*) pAttributes[i]+1); + pValue[len] = '\0'; + pItem->SetRawDataString(pValue); + } + __pMapContainer->GetColorMap()->ChangeValue(resourceKey, pItem); + } + else + { + SysLog(NID_UI, "%s is not initialized", tempkey); + } + } + else + { + SysLog(NID_UI, "%s is invalid", tempkey); + } + delete [] key; + } + } + } + } +} + +void +ConfigParser::AddImage(const xmlChar** pAttributes) +{ + if (pAttributes != null) + { + for (int i = 0; (pAttributes[i] != null); i++) + { + if (strlen((char*) pAttributes[++i]) > 0) + { + char* key = null; + int currentAttributeLength = strlen(__pCurrentAttribute); + int currentKeyLength = strlen((char*) pAttributes[i - 1]); + key = new (std::nothrow) char [currentAttributeLength + currentKeyLength + 3]; + strncpy(key, __pCurrentAttribute, currentAttributeLength); + strncpy(key+currentAttributeLength, "::", 2); + strncpy(key+currentAttributeLength+2, (char*) pAttributes[i - 1], currentKeyLength); + key[currentAttributeLength + currentKeyLength + 2] ='\0'; + ResourceItem* pItem = null; + unsigned int resourceKey = 0; + const char* tempkey = key; + ResourceKey _key(tempkey); + if (GetImageKeyTable()->GetValue(_key, resourceKey) == E_SUCCESS) + { + if (__pMapContainer->GetImageMap()->GetValue(resourceKey, pItem) == E_SUCCESS) + { + int len = ((char*) pAttributes[i]+1 != null) ? mbstowcs(null, (char*) pAttributes[i]+1, 0) : 0; + if(len > 0) + { + wchar_t* pValue = new (std::nothrow) wchar_t [len +1]; + len = mbstowcs(pValue, (char*) pAttributes[i]+1, len); + pValue[len] = '\0'; + pItem->SetImageFileName(pValue); + __pMapContainer->GetImageMap()->ChangeValue(resourceKey, pItem); + } + } + else + { + SysLog(NID_UI, "%s is not initialized", tempkey); + } + } + else + { + SysLog(NID_UI, "%s is invalid", tempkey); + } + delete [] key; + } + } + } +} + +void +ConfigParser::AddAnimation(const xmlChar** pAttributes) +{ + __pCurrentAnimationList = null; + if (pAttributes != null) + { + for (int i = 0; (pAttributes[i] != null); i++) + { + if (strlen((char*) pAttributes[++i]) > 0) + { + char* key = null; + int currentAttributeLength = strlen(__pCurrentAttribute); + int currentKeyLength = strlen((char*) pAttributes[i]); + key = new (std::nothrow) char [currentAttributeLength + currentKeyLength + 3]; + strncpy(key, __pCurrentAttribute, currentAttributeLength); + strncpy(key+currentAttributeLength, "::", 2); + strncpy(key+currentAttributeLength+2, (char*) pAttributes[i], currentKeyLength); + key[currentAttributeLength + currentKeyLength + 2] ='\0'; + ResourceItem* pItem = null; + unsigned int resourceKey = 0; + const char* tempkey = key; + ResourceKey _key(tempkey); + if (GetAnimationKeyTable()->GetValue(_key, resourceKey) == E_SUCCESS) + { + if (__pMapContainer->GetAnimationMap()->GetValue(resourceKey, pItem) == E_SUCCESS) + { + __pCurrentAnimationList = new (std::nothrow) ResourceAnimationFrameList; + pItem->SetRawDataAnimation(__pCurrentAnimationList); + __pMapContainer->GetAnimationMap()->ChangeValue(resourceKey, pItem); + } + } + delete [] key; + } + } + } +} +void +ConfigParser::AddAnimationFrame(const xmlChar** pAttributes) +{ + String fileName; + String duration; + if (pAttributes != null) + { + for (int i = 0; (pAttributes[i] != null); i++) + { + if (xmlStrcasecmp(pAttributes[i], (xmlChar*) "Image") == 0) + { + int len = ((char*) pAttributes[i+1]+1 != null) ? mbstowcs(null, (char*) pAttributes[i+1]+1, 0) : 0; + if(len > 0) + { + fileName = (char*) pAttributes[++i]+1; + } + } + if (xmlStrcasecmp(pAttributes[i], (xmlChar*) "Duration") == 0) + { + duration = (char*) pAttributes[++i]; + } + } + } + if (!fileName.IsEmpty() && !duration.IsEmpty()) + { + int durationInt =0; + if (Integer::Parse(duration, durationInt) == E_SUCCESS) + { + ResourceAnimationFrame frame(fileName, durationInt); + __pCurrentAnimationList->Add(frame); + } + } +} + +bool +ConfigParser::ConvertStringToColor32(const char* pString, unsigned int& out) +{ + int index = 0; + int len = 0; + int gap = 0; + char ch; + unsigned int temp = 0; + + len = strlen(pString); + + if (len < 1) + { + SysLog(NID_UI, "String is empty"); + return false; + } + + for (index = 1; index < len + 1; index++) + { + ch = pString[index]; + if ((ch >= '0') && (ch <= '9')) + { + temp = temp << 4; + gap = ch - '0'; + temp |= gap; + + } + else if ((ch >= 'A') && (ch <= 'F')) + { + temp = temp << 4; + gap = ch - 'A' + 10; + temp |= gap; + + } + else if ((ch >= 'a') && (ch <= 'f')) + { + temp = temp << 4; + gap = ch - 'a' + 10; + temp |= gap; + } + } + out = temp; + return true;; +} +/* +void +ConfigParser::GetValue(const char* pValue, String& out) +{ + + if (pValue[0] == '#') + { + value.SubString(1, out); + } + else if (value.StartsWith(L"$", 0)) + { + String* pString = null; + if (__pMapContainer->GetImageMap()->GetValue(value, pString) != E_SUCCESS) + { + SysAssert(0); + } + out = *pString; + } + else + { + //nothing to do + } + +} +*/ + +bool +ConfigParser::GetValue(const char* pValue, unsigned int& out) +{ + if (pValue[0] == '#') + { + return ConvertStringToColor32(pValue, out); + } + return false; +} +Tizen::Base::Collection::HashMapT* +ConfigParser::GetImageKeyTable(void) +{ + if (__pImageKeyTable == null) + { + __pImageKeyTable = new (std::nothrow) Tizen::Base::Collection::HashMapT; + SysTryReturn(NID_UI, __pImageKeyTable, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + __pImageKeyTable->Construct(100, 0.75f, *__pProvider, *__pComparer); + { + const char* key ="BUTTON::BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _BUTTON::BG_NORMAL_IMAGE); + } + { + const char* key ="BUTTON::BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _BUTTON::BG_DISABLED_IMAGE); + } + { + const char* key ="BUTTON::BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _BUTTON::BG_PRESSED_IMAGE); + } + { + const char* key ="BUTTON::BG_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _BUTTON::BG_HIGHLIGHTED_IMAGE); + } + { + const char* key ="CHECKBUTTON::MARK_ICON_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::MARK_ICON_BG_NORMAL_IMAGE); + } + { + const char* key ="CHECKBUTTON::MARK_ICON_BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::MARK_ICON_BG_DISABLED_IMAGE); + } + { + const char* key ="CHECKBUTTON::MARK_ICON_BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::MARK_ICON_BG_PRESSED_IMAGE); + } + { + const char* key ="CHECKBUTTON::MARK_ICON_BG_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::MARK_ICON_BG_HIGHLIGHTED_IMAGE); + } + { + const char* key ="CHECKBUTTON::MARK_ICON_BG_SELECTED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::MARK_ICON_BG_SELECTED_IMAGE); + } + { + const char* key ="CHECKBUTTON::MARK_ICON_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::MARK_ICON_NORMAL_IMAGE); + } + { + const char* key ="CHECKBUTTON::MARK_ICON_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::MARK_ICON_DISABLED_IMAGE); + } + { + const char* key ="CHECKBUTTON::MARK_ICON_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::MARK_ICON_PRESSED_IMAGE); + } + { + const char* key ="CHECKBUTTON::MARK_ICON_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::MARK_ICON_HIGHLIGHTED_IMAGE); + } + { + const char* key ="CHECKBUTTON::MARK_ICON_SELECTED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::MARK_ICON_SELECTED_IMAGE); + } + { + const char* key ="CHECKBUTTON::ONOFF_ICON_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::ONOFF_ICON_BG_NORMAL_IMAGE); + } + { + const char* key ="CHECKBUTTON::ONOFF_ICON_BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::ONOFF_ICON_BG_DISABLED_IMAGE); + } + { + const char* key ="CHECKBUTTON::ONOFF_ICON_BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::ONOFF_ICON_BG_PRESSED_IMAGE); + } + { + const char* key ="CHECKBUTTON::ONOFF_ICON_BG_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::ONOFF_ICON_BG_HIGHLIGHTED_IMAGE); + } + { + const char* key ="CHECKBUTTON::ONOFF_ICON_BG_SELECTED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::ONOFF_ICON_BG_SELECTED_IMAGE); + } + { + const char* key ="CHECKBUTTON::ONOFF_ICON_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::ONOFF_ICON_NORMAL_IMAGE); + } + { + const char* key ="CHECKBUTTON::ONOFF_ICON_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::ONOFF_ICON_DISABLED_IMAGE); + } + { + const char* key ="CHECKBUTTON::ONOFF_ICON_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::ONOFF_ICON_PRESSED_IMAGE); + } + { + const char* key ="CHECKBUTTON::ONOFF_ICON_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::ONOFF_ICON_HIGHLIGHTED_IMAGE); + } + { + const char* key ="CHECKBUTTON::ONOFF_ICON_SELECTED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::ONOFF_ICON_SELECTED_IMAGE); + } + { + const char* key ="CHECKBUTTON::ONOFF_SLIDING_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::ONOFF_SLIDING_BG_NORMAL_IMAGE); + } + { + const char* key ="CHECKBUTTON::ONOFF_SLIDING_BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::ONOFF_SLIDING_BG_DISABLED_IMAGE); + } + { + const char* key ="CHECKBUTTON::ONOFF_SLIDING_BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::ONOFF_SLIDING_BG_PRESSED_IMAGE); + } + { + const char* key ="CHECKBUTTON::ONOFF_SLIDING_BG_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::ONOFF_SLIDING_BG_HIGHLIGHTED_IMAGE); + } + { + const char* key ="CHECKBUTTON::ONOFF_SLIDING_BG_SELECTED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::ONOFF_SLIDING_BG_SELECTED_IMAGE); + } + { + const char* key ="CHECKBUTTON::ONOFF_SLIDING_ON_HANDLER_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::ONOFF_SLIDING_ON_HANDLER_NORMAL_IMAGE); + } + { + const char* key ="CHECKBUTTON::ONOFF_SLIDING_ON_HANDLER_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::ONOFF_SLIDING_ON_HANDLER_DISABLED_IMAGE); + } + { + const char* key ="CHECKBUTTON::ONOFF_SLIDING_ON_HANDLER_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::ONOFF_SLIDING_ON_HANDLER_PRESSED_IMAGE); + } + { + const char* key ="CHECKBUTTON::ONOFF_SLIDING_ON_HANDLER_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::ONOFF_SLIDING_ON_HANDLER_HIGHLIGHTED_IMAGE); + } + { + const char* key ="CHECKBUTTON::ONOFF_SLIDING_ON_HANDLER_SELECTED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::ONOFF_SLIDING_ON_HANDLER_SELECTED_IMAGE); + } + { + const char* key ="CHECKBUTTON::ONOFF_SLIDING_OFF_HANDLER_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::ONOFF_SLIDING_OFF_HANDLER_NORMAL_IMAGE); + } + { + const char* key ="CHECKBUTTON::ONOFF_SLIDING_OFF_HANDLER_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::ONOFF_SLIDING_OFF_HANDLER_DISABLED_IMAGE); + } + { + const char* key ="CHECKBUTTON::ONOFF_SLIDING_OFF_HANDLER_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::ONOFF_SLIDING_OFF_HANDLER_PRESSED_IMAGE); + } + { + const char* key ="CHECKBUTTON::ONOFF_SLIDING_OFF_HANDLER_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::ONOFF_SLIDING_OFF_HANDLER_HIGHLIGHTED_IMAGE); + } + { + const char* key ="CHECKBUTTON::ONOFF_SLIDING_OFF_HANDLER_SELECTED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::ONOFF_SLIDING_OFF_HANDLER_SELECTED_IMAGE); + } + { + const char* key ="CHECKBUTTON::DETAILED_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::DETAILED_BG_NORMAL_IMAGE); + } + { + const char* key ="CHECKBUTTON::DETAILED_BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::DETAILED_BG_DISABLED_IMAGE); + } + { + const char* key ="CHECKBUTTON::DETAILED_BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::DETAILED_BG_PRESSED_IMAGE); + } + { + const char* key ="CHECKBUTTON::DETAILED_BG_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::DETAILED_BG_HIGHLIGHTED_IMAGE); + } + { + const char* key ="CHECKBUTTON::DETAILED_BG_SELECTED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::DETAILED_BG_SELECTED_IMAGE); + } + { + const char* key ="CHECKBUTTON::DETAILED_ICON_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::DETAILED_ICON_NORMAL_IMAGE); + } + { + const char* key ="CHECKBUTTON::DETAILED_ICON_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::DETAILED_ICON_DISABLED_IMAGE); + } + { + const char* key ="CHECKBUTTON::DETAILED_ICON_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::DETAILED_ICON_PRESSED_IMAGE); + } + { + const char* key ="CHECKBUTTON::DETAILED_ICON_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::DETAILED_ICON_HIGHLIGHTED_IMAGE); + } + { + const char* key ="CHECKBUTTON::DETAILED_ICON_SELECTED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::DETAILED_ICON_SELECTED_IMAGE); + } + { + const char* key ="CHECKBUTTON::GROUPED_SINGLE_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::GROUPED_SINGLE_BG_NORMAL_IMAGE); + } + { + const char* key ="CHECKBUTTON::GROUPED_SINGLE_BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::GROUPED_SINGLE_BG_DISABLED_IMAGE); + } + { + const char* key ="CHECKBUTTON::GROUPED_SINGLE_BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::GROUPED_SINGLE_BG_PRESSED_IMAGE); + } + { + const char* key ="CHECKBUTTON::GROUPED_SINGLE_BG_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::GROUPED_SINGLE_BG_HIGHLIGHTED_IMAGE); + } + { + const char* key ="CHECKBUTTON::GROUPED_SINGLE_BG_SELECTED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::GROUPED_SINGLE_BG_SELECTED_IMAGE); + } + { + const char* key ="CHECKBUTTON::GROUPED_TOP_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::GROUPED_TOP_BG_NORMAL_IMAGE); + } + { + const char* key ="CHECKBUTTON::GROUPED_TOP_BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::GROUPED_TOP_BG_DISABLED_IMAGE); + } + { + const char* key ="CHECKBUTTON::GROUPED_TOP_BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::GROUPED_TOP_BG_PRESSED_IMAGE); + } + { + const char* key ="CHECKBUTTON::GROUPED_TOP_BG_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::GROUPED_TOP_BG_HIGHLIGHTED_IMAGE); + } + { + const char* key ="CHECKBUTTON::GROUPED_TOP_BG_SELECTED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::GROUPED_TOP_BG_SELECTED_IMAGE); + } + { + const char* key ="CHECKBUTTON::GROUPED_MIDDLE_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::GROUPED_MIDDLE_BG_NORMAL_IMAGE); + } + { + const char* key ="CHECKBUTTON::GROUPED_MIDDLE_BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::GROUPED_MIDDLE_BG_DISABLED_IMAGE); + } + { + const char* key ="CHECKBUTTON::GROUPED_MIDDLE_BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::GROUPED_MIDDLE_BG_PRESSED_IMAGE); + } + { + const char* key ="CHECKBUTTON::GROUPED_MIDDLE_BG_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::GROUPED_MIDDLE_BG_HIGHLIGHTED_IMAGE); + } + { + const char* key ="CHECKBUTTON::GROUPED_MIDDLE_BG_SELECTED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::GROUPED_MIDDLE_BG_SELECTED_IMAGE); + } + { + const char* key ="CHECKBUTTON::GROUPED_BOTTOM_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::GROUPED_BOTTOM_BG_NORMAL_IMAGE); + } + { + const char* key ="CHECKBUTTON::GROUPED_BOTTOM_BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::GROUPED_BOTTOM_BG_DISABLED_IMAGE); + } + { + const char* key ="CHECKBUTTON::GROUPED_BOTTOM_BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::GROUPED_BOTTOM_BG_PRESSED_IMAGE); + } + { + const char* key ="CHECKBUTTON::GROUPED_BOTTOM_BG_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::GROUPED_BOTTOM_BG_HIGHLIGHTED_IMAGE); + } + { + const char* key ="CHECKBUTTON::GROUPED_BOTTOM_BG_SELECTED"; + __pImageKeyTable->Add(ResourceKey(key), _CHECKBUTTON::GROUPED_BOTTOM_BG_SELECTED_IMAGE); + } + { + const char* key ="COLORPICKER::ARROW_BUTTON_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _COLORPICKER::ARROW_BUTTON_BG_NORMAL_IMAGE); + } + { + const char* key ="COLORPICKER::ARROW_BUTTON_BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _COLORPICKER::ARROW_BUTTON_BG_PRESSED_IMAGE); + } + { + const char* key ="COLORPICKER::ARROW_BUTTON_BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _COLORPICKER::ARROW_BUTTON_BG_DISABLED_IMAGE); + } + { + const char* key ="COLORPICKER::LEFT_ARROW_BUTTON_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _COLORPICKER::LEFT_ARROW_BUTTON_NORMAL_IMAGE); + } + { + const char* key ="COLORPICKER::LEFT_ARROW_BUTTON_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _COLORPICKER::LEFT_ARROW_BUTTON_PRESSED_IMAGE); + } + { + const char* key ="COLORPICKER::LEFT_ARROW_BUTTON_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _COLORPICKER::LEFT_ARROW_BUTTON_DISABLED_IMAGE); + } + { + const char* key ="COLORPICKER::RIGHT_ARROW_BUTTON_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _COLORPICKER::RIGHT_ARROW_BUTTON_NORMAL_IMAGE); + } + { + const char* key ="COLORPICKER::RIGHT_ARROW_BUTTON_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _COLORPICKER::RIGHT_ARROW_BUTTON_PRESSED_IMAGE); + } + { + const char* key ="COLORPICKER::RIGHT_ARROW_BUTTON_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _COLORPICKER::RIGHT_ARROW_BUTTON_DISABLED_IMAGE); + } + { + const char* key ="COLORPICKER::HANDLER_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _COLORPICKER::HANDLER_NORMAL_IMAGE); + } + { + const char* key ="DATETIMEPICKER::BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _DATETIMEPICKER::BG_NORMAL_IMAGE); + } + { + const char* key ="DATETIMEPICKER::AMPM_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _DATETIMEPICKER::AMPM_BG_NORMAL_IMAGE); + } + { + const char* key ="DATETIMEPICKER::AMPM_BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _DATETIMEPICKER::AMPM_BG_PRESSED_IMAGE); + } + { + const char* key ="DATETIMEPICKER::AMPM_BG_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _DATETIMEPICKER::AMPM_BG_HIGHLIGHTED_IMAGE); + } + { + const char* key ="DATETIMEPICKER::AMPM_BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _DATETIMEPICKER::AMPM_BG_DISABLED_IMAGE); + } + { + const char* key ="DATETIMEPICKER::CONTENT_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _DATETIMEPICKER::CONTENT_BG_NORMAL_IMAGE); + } + { + const char* key ="DATETIMEPICKER::CONTENT_BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _DATETIMEPICKER::CONTENT_BG_PRESSED_IMAGE); + } + { + const char* key ="DATETIMEPICKER::CONTENT_BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _DATETIMEPICKER::CONTENT_BG_DISABLED_IMAGE); + } + { + const char* key ="DATETIMEPICKER::CONTENT_BG_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _DATETIMEPICKER::CONTENT_BG_HIGHLIGHTED_IMAGE); + } + { + const char* key ="DATETIMEPICKER::COLON_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _DATETIMEPICKER::COLON_BG_NORMAL_IMAGE); + } + { + const char* key ="EDIT::BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _EDIT::BG_NORMAL_IMAGE); + } + { + const char* key ="EDIT::BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _EDIT::BG_PRESSED_IMAGE); + } + { + const char* key ="EDIT::BG_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _EDIT::BG_HIGHLIGHTED_IMAGE); + } + { + const char* key ="EDIT::BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _EDIT::BG_DISABLED_IMAGE); + } + { + const char* key ="EDIT::CLEAR_ICON_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _EDIT::CLEAR_ICON_NORMAL_IMAGE); + } + { + const char* key ="EDIT::CLEAR_ICON_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _EDIT::CLEAR_ICON_PRESSED_IMAGE); + } + { + const char* key ="EDIT::GROUPED_SINGLE_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _EDIT::GROUPED_SINGLE_BG_NORMAL_IMAGE); + } + { + const char* key ="EDIT::GROUPED_SINGLE_BG_EFFECT_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _EDIT::GROUPED_SINGLE_BG_EFFECT_NORMAL_IMAGE); + } + { + const char* key ="EDIT::GROUPED_TOP_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _EDIT::GROUPED_TOP_BG_NORMAL_IMAGE); + } + { + const char* key ="EDIT::GROUPED_TOP_BG_EFFECT_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _EDIT::GROUPED_TOP_BG_EFFECT_NORMAL_IMAGE); + } + { + const char* key ="EDIT::GROUPED_MIDDLE_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _EDIT::GROUPED_MIDDLE_BG_NORMAL_IMAGE); + } + { + const char* key ="EDIT::GROUPED_MIDDLE_BG_EFFECT_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _EDIT::GROUPED_MIDDLE_BG_EFFECT_NORMAL_IMAGE); + } + { + const char* key ="EDIT::GROUPED_BOTTOM_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _EDIT::GROUPED_BOTTOM_BG_NORMAL_IMAGE); + } + { + const char* key ="EDIT::GROUPED_BOTTOM_BG_EFFECT_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _EDIT::GROUPED_BOTTOM_BG_EFFECT_NORMAL_IMAGE); + } + { + const char* key ="EDITDATE::CONTENT_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _EDITDATE::CONTENT_BG_NORMAL_IMAGE); + } + { + const char* key ="EDITDATE::CONTENT_BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _EDITDATE::CONTENT_BG_PRESSED_IMAGE); + } + { + const char* key ="EDITDATE::CONTENT_BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _EDITDATE::CONTENT_BG_DISABLED_IMAGE); + } + { + const char* key ="EDITDATE::CONTENT_BG_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _EDITDATE::CONTENT_BG_HIGHLIGHTED_IMAGE); + } + { + const char* key ="EDITTIME::BUTTON_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _EDITTIME::BUTTON_BG_NORMAL_IMAGE); + } + { + const char* key ="EDITTIME::BUTTON_BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _EDITTIME::BUTTON_BG_PRESSED_IMAGE); + } + { + const char* key ="EDITTIME::BUTTON_BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _EDITTIME::BUTTON_BG_DISABLED_IMAGE); + } + { + const char* key ="EDITTIME::BUTTON_BG_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _EDITTIME::BUTTON_BG_HIGHLIGHTED_IMAGE); + } + { + const char* key ="EDITTIME::CONTENT_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _EDITTIME::CONTENT_BG_NORMAL_IMAGE); + } + { + const char* key ="EDITTIME::CONTENT_BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _EDITTIME::CONTENT_BG_PRESSED_IMAGE); + } + { + const char* key ="EDITTIME::CONTENT_BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _EDITTIME::CONTENT_BG_DISABLED_IMAGE); + } + { + const char* key ="EDITTIME::CONTENT_BG_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _EDITTIME::CONTENT_BG_HIGHLIGHTED_IMAGE); + } + { + const char* key ="FASTSCROLL::INDEX_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _FASTSCROLL::INDEX_BG_NORMAL_IMAGE); + } + { + const char* key ="FASTSCROLL::INDEX_BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _FASTSCROLL::INDEX_BG_PRESSED_IMAGE); + } + { + const char* key ="FASTSCROLL::INDEX_LINE_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _FASTSCROLL::INDEX_LINE_PRESSED_IMAGE); + } + { + const char* key ="FASTSCROLL::POPUP_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _FASTSCROLL::POPUP_BG_NORMAL_IMAGE); + } + { + const char* key ="FOOTER::BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::BG_NORMAL_IMAGE); + } + { + const char* key ="FOOTER::TRANSLUCENT_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::TRANSLUCENT_BG_NORMAL_IMAGE); + } + { + const char* key ="FOOTER::BUTTON_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::BUTTON_BG_NORMAL_IMAGE); + } + { + const char* key ="FOOTER::BUTTON_BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::BUTTON_BG_DISABLED_IMAGE); + } + { + const char* key ="FOOTER::BUTTON_BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::BUTTON_BG_PRESSED_IMAGE); + } + { + const char* key ="FOOTER::BUTTON_BG_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::BUTTON_BG_HIGHLIGHTED_IMAGE); + } + { + const char* key ="FOOTER::BACK_ICON_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::BACK_ICON_NORMAL_IMAGE); + } + { + const char* key ="FOOTER::BACK_ICON_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::BACK_ICON_DISABLED_IMAGE); + } + { + const char* key ="FOOTER::BACK_ICON_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::BACK_ICON_PRESSED_IMAGE); + } + { + const char* key ="FOOTER::BACK_ICON_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::BACK_ICON_HIGHLIGHTED_IMAGE); + } + { + const char* key ="FOOTER::HIDE_ICON_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::HIDE_ICON_NORMAL_IMAGE); + } + { + const char* key ="FOOTER::HIDE_ICON_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::HIDE_ICON_DISABLED_IMAGE); + } + { + const char* key ="FOOTER::HIDE_ICON_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::HIDE_ICON_PRESSED_IMAGE); + } + { + const char* key ="FOOTER::HIDE_ICON_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::HIDE_ICON_HIGHLIGHTED_IMAGE); + } + { + const char* key ="FOOTER::MORE_ICON_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::MORE_ICON_NORMAL_IMAGE); + } + { + const char* key ="FOOTER::MORE_ICON_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::MORE_ICON_DISABLED_IMAGE); + } + { + const char* key ="FOOTER::MORE_ICON_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::MORE_ICON_PRESSED_IMAGE); + } + { + const char* key ="FOOTER::MORE_ICON_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::MORE_ICON_HIGHLIGHTED_IMAGE); + } + { + const char* key ="FOOTER::BUTTON_ITEM_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::BUTTON_ITEM_BG_NORMAL_IMAGE); + } + { + const char* key ="FOOTER::BUTTON_ITEM_BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::BUTTON_ITEM_BG_DISABLED_IMAGE); + } + { + const char* key ="FOOTER::BUTTON_ITEM_BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::BUTTON_ITEM_BG_PRESSED_IMAGE); + } + { + const char* key ="FOOTER::BUTTON_ITEM_BG_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::BUTTON_ITEM_BG_HIGHLIGHTED_IMAGE); + } + { + const char* key ="FOOTER::BUTTON_ITEM_TRANSLUCENT_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::BUTTON_ITEM_TRANSLUCENT_BG_NORMAL_IMAGE); + } + { + const char* key ="FOOTER::BUTTON_ITEM_TRANSLUCENT_BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::BUTTON_ITEM_TRANSLUCENT_BG_DISABLED_IMAGE); + } + { + const char* key ="FOOTER::BUTTON_ITEM_TRANSLUCENT_BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::BUTTON_ITEM_TRANSLUCENT_BG_PRESSED_IMAGE); + } + { + const char* key ="FOOTER::BUTTON_ITEM_TRANSLUCENT_BG_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::BUTTON_ITEM_TRANSLUCENT_BG_HIGHLIGHTED_IMAGE); + } + { + const char* key ="FOOTER::TAB_ITEM_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::TAB_ITEM_BG_NORMAL_IMAGE); + } + { + const char* key ="FOOTER::TAB_ITEM_BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::TAB_ITEM_BG_DISABLED_IMAGE); + } + { + const char* key ="FOOTER::TAB_ITEM_BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::TAB_ITEM_BG_PRESSED_IMAGE); + } + { + const char* key ="FOOTER::TAB_ITEM_BG_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::TAB_ITEM_BG_HIGHLIGHTED_IMAGE); + } + { + const char* key ="FOOTER::TAB_ITEM_BG_SELECTED"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::TAB_ITEM_BG_SELECTED_IMAGE); + } + { + const char* key ="FOOTER::TAB_ITEM_TRANSLUCENT_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::TAB_ITEM_TRANSLUCENT_BG_NORMAL_IMAGE); + } + { + const char* key ="FOOTER::TAB_ITEM_TRANSLUCENT_BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::TAB_ITEM_TRANSLUCENT_BG_DISABLED_IMAGE); + } + { + const char* key ="FOOTER::TAB_ITEM_TRANSLUCENT_BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::TAB_ITEM_TRANSLUCENT_BG_PRESSED_IMAGE); + } + { + const char* key ="FOOTER::TAB_ITEM_TRANSLUCENT_BG_SELECTED"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::TAB_ITEM_TRANSLUCENT_BG_SELECTED_IMAGE); + } + { + const char* key ="FOOTER::TAB_ITEM_TRANSLUCENT_BG_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::TAB_ITEM_TRANSLUCENT_BG_HIGHLIGHTED_IMAGE); + } + { + const char* key ="FOOTER::SEGMENTED_ITEM_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::SEGMENTED_ITEM_BG_NORMAL_IMAGE); + } + { + const char* key ="FOOTER::SEGMENTED_ITEM_BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::SEGMENTED_ITEM_BG_DISABLED_IMAGE); + } + { + const char* key ="FOOTER::SEGMENTED_ITEM_BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::SEGMENTED_ITEM_BG_PRESSED_IMAGE); + } + { + const char* key ="FOOTER::SEGMENTED_ITEM_BG_SELECTED"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::SEGMENTED_ITEM_BG_SELECTED_IMAGE); + } + { + const char* key ="FOOTER::SEGMENTED_ITEM_BG_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::SEGMENTED_ITEM_BG_HIGHLIGHTED_IMAGE); + } + { + const char* key ="FOOTER::SEGMENTED_ITEM_TRANSLUCENT_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::SEGMENTED_ITEM_TRANSLUCENT_BG_NORMAL_IMAGE); + } + { + const char* key ="FOOTER::SEGMENTED_ITEM_TRANSLUCENT_BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::SEGMENTED_ITEM_TRANSLUCENT_BG_DISABLED_IMAGE); + } + { + const char* key ="FOOTER::SEGMENTED_ITEM_TRANSLUCENT_BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::SEGMENTED_ITEM_TRANSLUCENT_BG_PRESSED_IMAGE); + } + { + const char* key ="FOOTER::SEGMENTED_ITEM_TRANSLUCENT_BG_SELECTED"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::SEGMENTED_ITEM_TRANSLUCENT_BG_SELECTED_IMAGE); + } + { + const char* key ="FOOTER::SEGMENTED_ITEM_TRANSLUCENT_BG_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::SEGMENTED_ITEM_TRANSLUCENT_BG_HIGHLIGHTED_IMAGE); + } + { + const char* key ="FOOTER::BUTTON_TRANSLUCENT_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::BUTTON_TRANSLUCENT_BG_NORMAL_IMAGE); + } + { + const char* key ="FOOTER::BUTTON_TRANSLUCENT_BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::BUTTON_TRANSLUCENT_BG_DISABLED_IMAGE); + } + { + const char* key ="FOOTER::BUTTON_TRANSLUCENT_BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::BUTTON_TRANSLUCENT_BG_PRESSED_IMAGE); + } + { + const char* key ="FOOTER::BUTTON_TRANSLUCENT_BG_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _FOOTER::BUTTON_TRANSLUCENT_BG_HIGHLIGHTED_IMAGE); + } + { + const char* key ="HEADER::BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _HEADER::BG_NORMAL_IMAGE); + } + { + const char* key ="HEADER::TRANSLUCENT_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _HEADER::TRANSLUCENT_BG_NORMAL_IMAGE); + } + { + const char* key ="HEADER::BUTTON_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _HEADER::BUTTON_BG_NORMAL_IMAGE); + } + { + const char* key ="HEADER::BUTTON_BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _HEADER::BUTTON_BG_DISABLED_IMAGE); + } + { + const char* key ="HEADER::BUTTON_BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _HEADER::BUTTON_BG_PRESSED_IMAGE); + } + { + const char* key ="HEADER::BUTTON_BG_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _HEADER::BUTTON_BG_HIGHLIGHTED_IMAGE); + } + { + const char* key ="HEADER::BADGE_ICON_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _HEADER::BADGE_ICON_BG_NORMAL_IMAGE); + } + { + const char* key ="HEADER::DIVIDER_LINE_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _HEADER::DIVIDER_LINE_NORMAL_IMAGE); + } + { + const char* key ="HEADER::DIVIDER_LINE_TRANSLUCENT_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _HEADER::DIVIDER_LINE_TRANSLUCENT_NORMAL_IMAGE); + } + { + const char* key ="HEADER::TAB_ITEM_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _HEADER::TAB_ITEM_BG_NORMAL_IMAGE); + } + { + const char* key ="HEADER::TAB_ITEM_BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _HEADER::TAB_ITEM_BG_DISABLED_IMAGE); + } + { + const char* key ="HEADER::TAB_ITEM_BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _HEADER::TAB_ITEM_BG_PRESSED_IMAGE); + } + { + const char* key ="HEADER::TAB_ITEM_BG_SELECTED"; + __pImageKeyTable->Add(ResourceKey(key), _HEADER::TAB_ITEM_BG_SELECTED_IMAGE); + } + { + const char* key ="HEADER::TAB_ITEM_BG_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _HEADER::TAB_ITEM_BG_HIGHLIGHTED_IMAGE); + } + { + const char* key ="HEADER::TAB_ITEM_TRANSLUCENT_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _HEADER::TAB_ITEM_TRANSLUCENT_BG_NORMAL_IMAGE); + } + { + const char* key ="HEADER::TAB_ITEM_TRANSLUCENT_BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _HEADER::TAB_ITEM_TRANSLUCENT_BG_DISABLED_IMAGE); + } + { + const char* key ="HEADER::TAB_ITEM_TRANSLUCENT_BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _HEADER::TAB_ITEM_TRANSLUCENT_BG_PRESSED_IMAGE); + } + { + const char* key ="HEADER::TAB_ITEM_TRANSLUCENT_BG_SELECTED"; + __pImageKeyTable->Add(ResourceKey(key), _HEADER::TAB_ITEM_TRANSLUCENT_BG_SELECTED_IMAGE); + } + { + const char* key ="HEADER::TAB_ITEM_TRANSLUCENT_BG_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _HEADER::TAB_ITEM_TRANSLUCENT_BG_HIGHLIGHTED_IMAGE); + } + { + const char* key ="HEADER::SEGMENTED_ITEM_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _HEADER::SEGMENTED_ITEM_BG_NORMAL_IMAGE); + } + { + const char* key ="HEADER::SEGMENTED_ITEM_BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _HEADER::SEGMENTED_ITEM_BG_DISABLED_IMAGE); + } + { + const char* key ="HEADER::SEGMENTED_ITEM_BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _HEADER::SEGMENTED_ITEM_BG_PRESSED_IMAGE); + } + { + const char* key ="HEADER::SEGMENTED_ITEM_BG_SELECTED"; + __pImageKeyTable->Add(ResourceKey(key), _HEADER::SEGMENTED_ITEM_BG_SELECTED_IMAGE); + } + { + const char* key ="HEADER::SEGMENTED_ITEM_BG_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _HEADER::SEGMENTED_ITEM_BG_HIGHLIGHTED_IMAGE); + } + { + const char* key ="HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_NORMAL_IMAGE); + } + { + const char* key ="HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_DISABLED_IMAGE); + } + { + const char* key ="HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_PRESSED_IMAGE); + } + { + const char* key ="HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_SELECTED"; + __pImageKeyTable->Add(ResourceKey(key), _HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_SELECTED_IMAGE); + } + { + const char* key ="HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_HIGHLIGHTED_IMAGE); + } + { + const char* key ="HEADER::BUTTON_TRANSLUCENT_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _HEADER::BUTTON_TRANSLUCENT_BG_NORMAL_IMAGE); + } + { + const char* key ="HEADER::BUTTON_TRANSLUCENT_BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _HEADER::BUTTON_TRANSLUCENT_BG_DISABLED_IMAGE); + } + { + const char* key ="HEADER::BUTTON_TRANSLUCENT_BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _HEADER::BUTTON_TRANSLUCENT_BG_PRESSED_IMAGE); + } + { + const char* key ="HEADER::BUTTON_TRANSLUCENT_BG_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _HEADER::BUTTON_TRANSLUCENT_BG_HIGHLIGHTED_IMAGE); + } + { + const char* key ="HEADER::BUTTON_ITEM_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _HEADER::BUTTON_ITEM_BG_NORMAL_IMAGE); + } + { + const char* key ="HEADER::BUTTON_ITEM_BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _HEADER::BUTTON_ITEM_BG_DISABLED_IMAGE); + } + { + const char* key ="HEADER::BUTTON_ITEM_BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _HEADER::BUTTON_ITEM_BG_PRESSED_IMAGE); + } + { + const char* key ="HEADER::BUTTON_ITEM_BG_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _HEADER::BUTTON_ITEM_BG_HIGHLIGHTED_IMAGE); + } + { + const char* key ="HEADER::BUTTON_ITEM_TRANSLUCENT_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _HEADER::BUTTON_ITEM_TRANSLUCENT_BG_NORMAL_IMAGE); + } + { + const char* key ="HEADER::BUTTON_ITEM_TRANSLUCENT_BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _HEADER::BUTTON_ITEM_TRANSLUCENT_BG_DISABLED_IMAGE); + } + { + const char* key ="HEADER::BUTTON_ITEM_TRANSLUCENT_BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _HEADER::BUTTON_ITEM_TRANSLUCENT_BG_PRESSED_IMAGE); + } + { + const char* key ="HEADER::BUTTON_ITEM_TRANSLUCENT_BG_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _HEADER::BUTTON_ITEM_TRANSLUCENT_BG_HIGHLIGHTED_IMAGE); + } + { + const char* key ="ICONLIST::CHECK_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _ICONLIST::CHECK_BG_NORMAL_IMAGE); + } + { + const char* key ="ICONLIST::CHECK_BG_SELECTED"; + __pImageKeyTable->Add(ResourceKey(key), _ICONLIST::CHECK_BG_SELECTED_IMAGE); + } + { + const char* key ="ICONLIST::CHECK_SELECTED"; + __pImageKeyTable->Add(ResourceKey(key), _ICONLIST::CHECK_SELECTED_IMAGE); + } + { + const char* key ="INPUTPAD::BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _INPUTPAD::BG_NORMAL_IMAGE); + } + { + const char* key ="INPUTPAD::BUTTON_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _INPUTPAD::BUTTON_BG_NORMAL_IMAGE); + } + { + const char* key ="INPUTPAD::BUTTON_BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _INPUTPAD::BUTTON_BG_PRESSED_IMAGE); + } + { + const char* key ="INPUTPAD::BUTTON_BG_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _INPUTPAD::BUTTON_BG_HIGHLIGHTED_IMAGE); + } + { + const char* key ="INPUTPAD::BUTTON_BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _INPUTPAD::BUTTON_BG_DISABLED_IMAGE); + } + { + const char* key ="DYNAMICBOX::POPUP_BG"; + __pImageKeyTable->Add(ResourceKey(key), _APPWIDGET::POPUP_BG_IMAGE); + } + { + const char* key ="DYNAMICBOX::POPUP_BG_ARROW_UP"; + __pImageKeyTable->Add(ResourceKey(key), _APPWIDGET::POPUP_BG_ARROW_UP_IMAGE); + } + { + const char* key ="DYNAMICBOX::POPUP_BG_ARROW_DOWN"; + __pImageKeyTable->Add(ResourceKey(key), _APPWIDGET::POPUP_BG_ARROW_DOWN_IMAGE); + } + { + const char* key ="APPWIDGET::POPUP_BG"; + __pImageKeyTable->Add(ResourceKey(key), _APPWIDGET::POPUP_BG_IMAGE); + } + { + const char* key ="APPWIDGET::POPUP_BG_ARROW_UP"; + __pImageKeyTable->Add(ResourceKey(key), _APPWIDGET::POPUP_BG_ARROW_UP_IMAGE); + } + { + const char* key ="APPWIDGET::POPUP_BG_ARROW_DOWN"; + __pImageKeyTable->Add(ResourceKey(key), _APPWIDGET::POPUP_BG_ARROW_DOWN_IMAGE); + } + { + const char* key ="MESSAGEBOX::BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _MESSAGEBOX::BG_NORMAL_IMAGE); + } + { + const char* key ="MESSAGEBOX::BOTTOM_BUTTON_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _MESSAGEBOX::BOTTOM_BUTTON_BG_NORMAL_IMAGE); + } + { + const char* key ="MESSAGEBOX::BOTTOM_BUTTON_BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _MESSAGEBOX::BOTTOM_BUTTON_BG_PRESSED_IMAGE); + } + { + const char* key ="MESSAGEBOX::BOTTOM_BUTTON_BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _MESSAGEBOX::BOTTOM_BUTTON_BG_DISABLED_IMAGE); + } + { + const char* key ="MESSAGEBOX::BOTTOM_BUTTON_BG_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _MESSAGEBOX::BOTTOM_BUTTON_BG_HIGHLIGHTED_IMAGE); + } + { + const char* key ="PANEL::GROUPED_SINGLE_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _PANEL::GROUPED_SINGLE_BG_NORMAL_IMAGE); + } + { + const char* key ="PANEL::GROUPED_SINGLE_BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _PANEL::GROUPED_SINGLE_BG_DISABLED_IMAGE); + } + { + const char* key ="PANEL::GROUPED_SINGLE_BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _PANEL::GROUPED_SINGLE_BG_PRESSED_IMAGE); + } + { + const char* key ="PANEL::GROUPED_SINGLE_BG_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _PANEL::GROUPED_SINGLE_BG_HIGHLIGHTED_IMAGE); + } + { + const char* key ="PANEL::GROUPED_SINGLE_BG_SELECTED"; + __pImageKeyTable->Add(ResourceKey(key), _PANEL::GROUPED_SINGLE_BG_SELECTED_IMAGE); + } + { + const char* key ="PANEL::GROUPED_TOP_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _PANEL::GROUPED_TOP_BG_NORMAL_IMAGE); + } + { + const char* key ="PANEL::GROUPED_TOP_BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _PANEL::GROUPED_TOP_BG_DISABLED_IMAGE); + } + { + const char* key ="PANEL::GROUPED_TOP_BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _PANEL::GROUPED_TOP_BG_PRESSED_IMAGE); + } + { + const char* key ="PANEL::GROUPED_TOP_BG_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _PANEL::GROUPED_TOP_BG_HIGHLIGHTED_IMAGE); + } + { + const char* key ="PANEL::GROUPED_TOP_BG_SELECTED"; + __pImageKeyTable->Add(ResourceKey(key), _PANEL::GROUPED_TOP_BG_SELECTED_IMAGE); + } + { + const char* key ="PANEL::GROUPED_MIDDLE_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _PANEL::GROUPED_MIDDLE_BG_NORMAL_IMAGE); + } + { + const char* key ="PANEL::GROUPED_MIDDLE_BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _PANEL::GROUPED_MIDDLE_BG_DISABLED_IMAGE); + } + { + const char* key ="PANEL::GROUPED_MIDDLE_BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _PANEL::GROUPED_MIDDLE_BG_PRESSED_IMAGE); + } + { + const char* key ="PANEL::GROUPED_MIDDLE_BG_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _PANEL::GROUPED_MIDDLE_BG_HIGHLIGHTED_IMAGE); + } + { + const char* key ="PANEL::GROUPED_MIDDLE_BG_SELECTED"; + __pImageKeyTable->Add(ResourceKey(key), _PANEL::GROUPED_MIDDLE_BG_SELECTED_IMAGE); + } + { + const char* key ="PANEL::GROUPED_BOTTOM_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _PANEL::GROUPED_BOTTOM_BG_NORMAL_IMAGE); + } + { + const char* key ="PANEL::GROUPED_BOTTOM_BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _PANEL::GROUPED_BOTTOM_BG_PRESSED_IMAGE); + } + { + const char* key ="PANEL::GROUPED_BOTTOM_BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _PANEL::GROUPED_BOTTOM_BG_DISABLED_IMAGE); + } + { + const char* key ="PANEL::GROUPED_BOTTOM_BG_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _PANEL::GROUPED_BOTTOM_BG_HIGHLIGHTED_IMAGE); + } + { + const char* key ="PANEL::GROUPED_BOTTOM_BG_SELECTED"; + __pImageKeyTable->Add(ResourceKey(key), _PANEL::GROUPED_BOTTOM_BG_SELECTED_IMAGE); + } + { + const char* key ="POPUP::BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _POPUP::BG_NORMAL_IMAGE); + } + { + const char* key ="PROGRESS::BAR_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _PROGRESS::BAR_BG_NORMAL_IMAGE); + } + { + const char* key ="PROGRESS::BAR_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _PROGRESS::BAR_NORMAL_IMAGE); + } + { + const char* key ="SCROLL::THUMB_HORIZONTAL_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _SCROLL::THUMB_HORIZONTAL_BG_NORMAL_IMAGE); + } + { + const char* key ="SCROLL::THUMB_VERTICAL_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _SCROLL::THUMB_VERTICAL_BG_NORMAL_IMAGE); + } + { + const char* key ="SCROLL::JUMP_TO_TOP_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _SCROLL::JUMP_TO_TOP_NORMAL_IMAGE); + } + { + const char* key ="SCROLL::JUMP_TO_TOP_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _SCROLL::JUMP_TO_TOP_PRESSED_IMAGE); + } + { + const char* key ="SCROLL::JUMP_TO_LEFT_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _SCROLL::JUMP_TO_LEFT_NORMAL_IMAGE); + } + { + const char* key ="SCROLL::JUMP_TO_LEFT_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _SCROLL::JUMP_TO_LEFT_PRESSED_IMAGE); + } + { + const char* key ="SCROLL::BUTTON_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _SCROLL::BUTTON_BG_NORMAL_IMAGE); + } + { + const char* key ="SCROLL::BUTTON_BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _SCROLL::BUTTON_BG_PRESSED_IMAGE); + } + { + const char* key ="SCROLL::HANDLER_HORIZONTAL"; + __pImageKeyTable->Add(ResourceKey(key), _SCROLL::HANDLER_HORIZONTAL_IMAGE); + } + { + const char* key ="SCROLL::HANDLER_VERTICAL"; + __pImageKeyTable->Add(ResourceKey(key), _SCROLL::HANDLER_VERTICAL_IMAGE); + } + { + const char* key ="SEARCHBAR::EDIT_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _SEARCHBAR::EDIT_BG_NORMAL_IMAGE); + } + { + const char* key ="SEARCHBAR::EDIT_BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _SEARCHBAR::EDIT_BG_DISABLED_IMAGE); + } + { + const char* key ="SEARCHBAR::EDIT_BG_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _SEARCHBAR::EDIT_BG_HIGHLIGHTED_IMAGE); + } + { + const char* key ="SEARCHBAR::EDIT_BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _SEARCHBAR::EDIT_BG_PRESSED_IMAGE); + } + { + const char* key ="SEARCHBAR::EDIT_BG_FOCUS"; + __pImageKeyTable->Add(ResourceKey(key), _SEARCHBAR::EDIT_BG_FOCUS_IMAGE); + } + { + const char* key ="SEARCHBAR::ICON_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _SEARCHBAR::ICON_NORMAL_IMAGE); + } + { + const char* key ="SEARCHBAR::EDIT_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _SEARCHBAR::EDIT_BG_NORMAL_IMAGE); + } + { + const char* key ="SEARCHBAR::ICON_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _SEARCHBAR::ICON_DISABLED_IMAGE); + } + { + const char* key ="SEARCHBAR::BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _SEARCHBAR::BG_NORMAL_IMAGE); + } + { + const char* key ="SLIDER::BAR_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _SLIDER::BAR_BG_NORMAL_IMAGE); + } + { + const char* key ="SLIDER::BAR_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _SLIDER::BAR_NORMAL_IMAGE); + } + { + const char* key ="SLIDER::HANDLE_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _SLIDER::HANDLE_BG_NORMAL_IMAGE); + } + { + const char* key ="SLIDER::HANDLE_BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _SLIDER::HANDLE_BG_PRESSED_IMAGE); + } + { + const char* key ="SLIDER::HANDLE_BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _SLIDER::HANDLE_BG_DISABLED_IMAGE); + } + { + const char* key ="SLIDER::HANDLE_BG_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _SLIDER::HANDLE_BG_HIGHLIGHTED_IMAGE); + } + { + const char* key ="SLIDER::GROUPED_TOP_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _SLIDER::GROUPED_TOP_BG_NORMAL_IMAGE); + } + { + const char* key ="SLIDER::GROUPED_MIDDLE_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _SLIDER::GROUPED_MIDDLE_BG_NORMAL_IMAGE); + } + { + const char* key ="SLIDER::GROUPED_BOTTOM_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _SLIDER::GROUPED_BOTTOM_BG_NORMAL_IMAGE); + } + { + const char* key ="SLIDER::GROUPED_SINGLE_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _SLIDER::GROUPED_SINGLE_BG_NORMAL_IMAGE); + } + { + const char* key ="SPLITPANEL::DIVIDER_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _SPLITPANEL::DIVIDER_BG_NORMAL_IMAGE); + } + { + const char* key ="SPLITPANEL::VERTICAL_DIVIDER_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _SPLITPANEL::VERTICAL_DIVIDER_BG_NORMAL_IMAGE); + } + { + const char* key ="SPLITPANEL::HORIZONTAL_DIVIDER_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _SPLITPANEL::HORIZONTAL_DIVIDER_BG_NORMAL_IMAGE); + } + { + const char* key ="TABBAR::BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _TABBAR::BG_NORMAL_IMAGE); + } + { + const char* key ="TABBAR::LEFT_ARROW_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _TABBAR::LEFT_ARROW_NORMAL_IMAGE); + } + { + const char* key ="TABBAR::RIGHT_ARROW_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _TABBAR::RIGHT_ARROW_NORMAL_IMAGE); + } + { + const char* key ="TABBAR::ITEM_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _TABBAR::ITEM_BG_NORMAL_IMAGE); + } + { + const char* key ="TABBAR::ITEM_BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _TABBAR::ITEM_BG_PRESSED_IMAGE); + } + { + const char* key ="TABBAR::ITEM_BG_SELECTED"; + __pImageKeyTable->Add(ResourceKey(key), _TABBAR::ITEM_BG_SELECTED_IMAGE); + } + { + const char* key ="TABBAR::ITEM_BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _TABBAR::ITEM_BG_DISABLED_IMAGE); + } + { + const char* key ="TAB::VERTICAL_DIVIDER_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _TAB::VERTICAL_DIVIDER_NORMAL_IMAGE); + } + { + const char* key ="TAB::ITEM_SELECTED"; + __pImageKeyTable->Add(ResourceKey(key), _TAB::ITEM_SELECTED_IMAGE); + } + { + const char* key ="TAB::ITEM_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _TAB::ITEM_BG_NORMAL_IMAGE); + } + { + const char* key ="TAB::ITEM_BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _TAB::ITEM_BG_PRESSED_IMAGE); + } + { + const char* key ="TAB::ITEM_BG_SELECTED"; + __pImageKeyTable->Add(ResourceKey(key), _TAB::ITEM_BG_SELECTED_IMAGE); + } + { + const char* key ="TAB::ITEM_BG_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _TAB::ITEM_BG_HIGHLIGHTED_IMAGE); + } + { + const char* key ="TAB::ITEM_BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _TAB::ITEM_BG_DISABLED_IMAGE); + } + { + const char* key ="TABLEVIEW::GROUPITEM_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::GROUPITEM_BG_NORMAL_IMAGE); + } + { + const char* key ="TABLEVIEW::SECTIONITEM_SINGLE_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::SECTIONITEM_SINGLE_BG_NORMAL_IMAGE); + } + { + const char* key ="TABLEVIEW::SECTIONITEM_SINGLE_BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::SECTIONITEM_SINGLE_BG_PRESSED_IMAGE); + } + { + const char* key ="TABLEVIEW::SECTIONITEM_SINGLE_BG_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::SECTIONITEM_SINGLE_BG_HIGHLIGHTED_IMAGE); + } + { + const char* key ="TABLEVIEW::SECTIONITEM_SINGLE_BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::SECTIONITEM_SINGLE_BG_DISABLED_IMAGE); + } + { + const char* key ="TABLEVIEW::SECTIONITEM_SINGLE_COVER_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::SECTIONITEM_SINGLE_COVER_BG_NORMAL_IMAGE); + } + { + const char* key ="TABLEVIEW::SECTIONITEM_TOP_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::SECTIONITEM_TOP_BG_NORMAL_IMAGE); + } + { + const char* key ="TABLEVIEW::SECTIONITEM_TOP_BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::SECTIONITEM_TOP_BG_PRESSED_IMAGE); + } + { + const char* key ="TABLEVIEW::SECTIONITEM_TOP_BG_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::SECTIONITEM_TOP_BG_HIGHLIGHTED_IMAGE); + } + { + const char* key ="TABLEVIEW::SECTIONITEM_TOP_BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::SECTIONITEM_TOP_BG_DISABLED_IMAGE); + } + { + const char* key ="TABLEVIEW::SECTIONITEM_TOP_COVER_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::SECTIONITEM_TOP_COVER_BG_NORMAL_IMAGE); + } + { + const char* key ="TABLEVIEW::SECTIONITEM_CENTER_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::SECTIONITEM_CENTER_BG_NORMAL_IMAGE); + } + { + const char* key ="TABLEVIEW::SECTIONITEM_CENTER_BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::SECTIONITEM_CENTER_BG_PRESSED_IMAGE); + } + { + const char* key ="TABLEVIEW::SECTIONITEM_CENTER_BG_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::SECTIONITEM_CENTER_BG_HIGHLIGHTED_IMAGE); + } + { + const char* key ="TABLEVIEW::SECTIONITEM_CENTER_BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::SECTIONITEM_CENTER_BG_DISABLED_IMAGE); + } + { + const char* key ="TABLEVIEW::SECTIONITEM_CENTER_COVER_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::SECTIONITEM_CENTER_COVER_BG_NORMAL_IMAGE); + } + { + const char* key ="TABLEVIEW::SECTIONITEM_BOTTOM_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::SECTIONITEM_BOTTOM_BG_NORMAL_IMAGE); + } + { + const char* key ="TABLEVIEW::SECTIONITEM_BOTTOM_BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::SECTIONITEM_BOTTOM_BG_PRESSED_IMAGE); + } + { + const char* key ="TABLEVIEW::SECTIONITEM_BOTTOM_BG_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::SECTIONITEM_BOTTOM_BG_HIGHLIGHTED_IMAGE); + } + { + const char* key ="TABLEVIEW::SECTIONITEM_BOTTOM_BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::SECTIONITEM_BOTTOM_BG_DISABLED_IMAGE); + } + { + const char* key ="TABLEVIEW::SECTIONITEM_BOTTOM_COVER_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::SECTIONITEM_BOTTOM_COVER_BG_NORMAL_IMAGE); + } + { + const char* key ="TABLEVIEW::CHECKBOX_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::CHECKBOX_BG_NORMAL_IMAGE); + } + { + const char* key ="TABLEVIEW::CHECKBOX_BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::CHECKBOX_BG_PRESSED_IMAGE); + } + { + const char* key ="TABLEVIEW::CHECKBOX_BG_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::CHECKBOX_BG_HIGHLIGHTED_IMAGE); + } + { + const char* key ="TABLEVIEW::CHECKBOX_BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::CHECKBOX_BG_DISABLED_IMAGE); + } + { + const char* key ="TABLEVIEW::CHECKBOX_CHECK_MARK_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::CHECKBOX_CHECK_MARK_NORMAL_IMAGE); + } + { + const char* key ="TABLEVIEW::CHECKBOX_CHECK_MARK_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::CHECKBOX_CHECK_MARK_DISABLED_IMAGE); + } + { + const char* key ="TABLEVIEW::RADIOBUTTON_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::RADIOBUTTON_NORMAL_IMAGE); + } + { + const char* key ="TABLEVIEW::RADIOBUTTON_NORMAL_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::RADIOBUTTON_NORMAL_DISABLED_IMAGE); + } + { + const char* key ="TABLEVIEW::RADIOBUTTON_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::RADIOBUTTON_PRESSED_IMAGE); + } + { + const char* key ="TABLEVIEW::RADIOBUTTON_SELECTED"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::RADIOBUTTON_SELECTED_IMAGE); + } + { + const char* key ="TABLEVIEW::RADIOBUTTON_SELECTED_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::RADIOBUTTON_SELECTED_DISABLED_IMAGE); + } + { + const char* key ="TABLEVIEW::ONOFFBUTTON_ON_HANDLER"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::ONOFFBUTTON_ON_HANDLER_IMAGE); + } + { + const char* key ="TABLEVIEW::ONOFFBUTTON_ON_HANDLER_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::ONOFFBUTTON_ON_HANDLER_DISABLED_IMAGE); + } + { + const char* key ="TABLEVIEW::ONOFFBUTTON_OFF_HANDLER"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::ONOFFBUTTON_OFF_HANDLER_IMAGE); + } + { + const char* key ="TABLEVIEW::ONOFFBUTTON_OFF_HANDLER_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::ONOFFBUTTON_OFF_HANDLER_DISABLED_IMAGE); + } + { + const char* key ="TABLEVIEW::ONOFFBUTTON_BG"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::ONOFFBUTTON_BG_IMAGE); + } + { + const char* key ="TABLEVIEW::ONOFFBUTTON_BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::ONOFFBUTTON_BG_DISABLED_IMAGE); + } + { + const char* key ="TABLEVIEW::CIRCLE_BUTTON_BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::CIRCLE_BUTTON_BG_NORMAL_IMAGE); + } + { + const char* key ="TABLEVIEW::CIRCLE_BUTTON_BG_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::CIRCLE_BUTTON_BG_PRESSED_IMAGE); + } + { + const char* key ="TABLEVIEW::CIRCLE_BUTTON_BG_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::CIRCLE_BUTTON_BG_HIGHLIGHTED_IMAGE); + } + { + const char* key ="TABLEVIEW::CIRCLE_BUTTON_BG_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::CIRCLE_BUTTON_BG_DISABLED_IMAGE); + } + { + const char* key ="TABLEVIEW::CIRCLE_BUTTON_REVEAL_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::CIRCLE_BUTTON_REVEAL_NORMAL_IMAGE); + } + { + const char* key ="TABLEVIEW::CIRCLE_BUTTON_REVEAL_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::CIRCLE_BUTTON_REVEAL_PRESSED_IMAGE); + } + { + const char* key ="TABLEVIEW::CIRCLE_BUTTON_REVEAL_HIGHLIGHTED"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::CIRCLE_BUTTON_REVEAL_HIGHLIGHTED_IMAGE); + } + { + const char* key ="TABLEVIEW::CIRCLE_BUTTON_REVEAL_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::CIRCLE_BUTTON_REVEAL_DISABLED_IMAGE); + } + { + const char* key ="TABLEVIEW::SEARCH_ICON_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::SEARCH_ICON_NORMAL_IMAGE); + } + { + const char* key ="TABLEVIEW::RADIOBUTTON_BUTTON_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::RADIOBUTTON_BUTTON_NORMAL_IMAGE); + } + { + const char* key ="TABLEVIEW::RADIOBUTTON_BUTTON_DISABLED"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::RADIOBUTTON_BUTTON_DISABLED_IMAGE); + } + { + const char* key ="TABLEVIEW::RADIOBUTTON_BUTTON_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::RADIOBUTTON_BUTTON_PRESSED_IMAGE); + } + { + const char* key ="TABLEVIEW::CHECKBOX_CHECK_MARK_PRESSED"; + __pImageKeyTable->Add(ResourceKey(key), _TABLEVIEW::CHECKBOX_CHECK_MARK_PRESSED_IMAGE); + } + { + const char* key ="TOKENEDIT::BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _TOKENEDIT::BG_NORMAL_IMAGE); + } + { + const char* key ="EXPANDABLEEDITAREA::BG_NORMAL"; + __pImageKeyTable->Add(ResourceKey(key), _TOKENEDIT::BG_NORMAL_IMAGE); + } + } + return __pImageKeyTable; +} + +Tizen::Base::Collection::HashMapT* +ConfigParser::GetAnimationKeyTable(void) +{ + if (__pAnimationKeyTable == null) + { + __pAnimationKeyTable = new (std::nothrow) Tizen::Base::Collection::HashMapT; + SysTryReturn(NID_UI, __pAnimationKeyTable, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + __pAnimationKeyTable->Construct(5, 0.75f, *__pProvider, *__pComparer); + { + const char* key ="POPUP::PROCESSING_ANIMATION"; + __pAnimationKeyTable->Add(ResourceKey(key), _POPUP::PROCESSING_ANIMATION_ANIMATION); + } + { + const char* key ="HEADER::PROCESSING_ANIMATION"; + __pAnimationKeyTable->Add(ResourceKey(key), _HEADER::PROCESSING_ANIMATION_ANIMATION); + } + } + return __pAnimationKeyTable; +} +Tizen::Base::Collection::HashMapT* +ConfigParser::GetColorKeyTable(void) +{ + if (__pColorKeyTable == null) + { + __pColorKeyTable = new (std::nothrow) Tizen::Base::Collection::HashMapT; + SysTryReturn(NID_UI, __pColorKeyTable, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + __pColorKeyTable->Construct(100, 0.75f, *__pProvider, *__pComparer); + { + const char* key ="BASIC::background"; + __pColorKeyTable->Add(ResourceKey(key), _BASIC::background_COLOR); + } + { + const char* key ="BASIC::foreground"; + __pColorKeyTable->Add(ResourceKey(key), _BASIC::foreground_COLOR); + } + { + const char* key ="BUTTON::BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _BUTTON::BG_NORMAL_COLOR); + } + { + const char* key ="BUTTON::BG_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _BUTTON::BG_DISABLED_COLOR); + } + { + const char* key ="BUTTON::BG_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _BUTTON::BG_PRESSED_COLOR); + } + { + const char* key ="BUTTON::BG_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _BUTTON::BG_HIGHLIGHTED_COLOR); + } + { + const char* key ="BUTTON::TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _BUTTON::TEXT_NORMAL_COLOR); + } + { + const char* key ="BUTTON::TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _BUTTON::TEXT_DISABLED_COLOR); + } + { + const char* key ="BUTTON::TEXT_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _BUTTON::TEXT_PRESSED_COLOR); + } + { + const char* key ="BUTTON::TEXT_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _BUTTON::TEXT_HIGHLIGHTED_COLOR); + } + { + const char* key ="CHECKBUTTON::BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _CHECKBUTTON::BG_NORMAL_COLOR); + } + { + const char* key ="CHECKBUTTON::BG_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _CHECKBUTTON::BG_DISABLED_COLOR); + } + { + const char* key ="CHECKBUTTON::BG_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _CHECKBUTTON::BG_PRESSED_COLOR); + } + { + const char* key ="CHECKBUTTON::BG_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _CHECKBUTTON::BG_HIGHLIGHTED_COLOR); + } + { + const char* key ="CHECKBUTTON::BG_SELECTED"; + __pColorKeyTable->Add(ResourceKey(key), _CHECKBUTTON::BG_SELECTED_COLOR); + } + { + const char* key ="CHECKBUTTON::TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _CHECKBUTTON::TEXT_NORMAL_COLOR); + } + { + const char* key ="CHECKBUTTON::TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _CHECKBUTTON::TEXT_DISABLED_COLOR); + } + { + const char* key ="CHECKBUTTON::TEXT_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _CHECKBUTTON::TEXT_PRESSED_COLOR); + } + { + const char* key ="CHECKBUTTON::TEXT_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _CHECKBUTTON::TEXT_HIGHLIGHTED_COLOR); + } + { + const char* key ="CHECKBUTTON::TEXT_SELECTED"; + __pColorKeyTable->Add(ResourceKey(key), _CHECKBUTTON::TEXT_SELECTED_COLOR); + } + { + const char* key ="CHECKBUTTON::TITLE_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _CHECKBUTTON::TITLE_TEXT_NORMAL_COLOR); + } + { + const char* key ="CHECKBUTTON::TITLE_TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _CHECKBUTTON::TITLE_TEXT_DISABLED_COLOR); + } + { + const char* key ="CHECKBUTTON::TITLE_TEXT_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _CHECKBUTTON::TITLE_TEXT_PRESSED_COLOR); + } + { + const char* key ="CHECKBUTTON::TITLE_TEXT_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _CHECKBUTTON::TITLE_TEXT_HIGHLIGHTED_COLOR); + } + { + const char* key ="CHECKBUTTON::TITLE_TEXT_SELECTED"; + __pColorKeyTable->Add(ResourceKey(key), _CHECKBUTTON::TITLE_TEXT_SELECTED_COLOR); + } + { + const char* key ="CHECKBUTTON::DETAILED_ICON_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _CHECKBUTTON::DETAILED_ICON_BG_NORMAL_COLOR); + } + { + const char* key ="CHECKBUTTON::DETAILED_ICON_BG_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _CHECKBUTTON::DETAILED_ICON_BG_DISABLED_COLOR); + } + { + const char* key ="CHECKBUTTON::DETAILED_ICON_BG_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _CHECKBUTTON::DETAILED_ICON_BG_PRESSED_COLOR); + } + { + const char* key ="CHECKBUTTON::DETAILED_ICON_BG_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _CHECKBUTTON::DETAILED_ICON_BG_HIGHLIGHTED_COLOR); + } + { + const char* key ="CHECKBUTTON::DETAILED_ICON_BG_SELECTED"; + __pColorKeyTable->Add(ResourceKey(key), _CHECKBUTTON::DETAILED_ICON_BG_SELECTED_COLOR); + } + { + const char* key ="CHECKBUTTON::DETAILED_ICON_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _CHECKBUTTON::DETAILED_ICON_TEXT_NORMAL_COLOR); + } + { + const char* key ="CHECKBUTTON::DETAILED_ICON_TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _CHECKBUTTON::DETAILED_ICON_TEXT_DISABLED_COLOR); + } + { + const char* key ="CHECKBUTTON::DETAILED_ICON_TEXT_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _CHECKBUTTON::DETAILED_ICON_TEXT_PRESSED_COLOR); + } + { + const char* key ="CHECKBUTTON::DETAILED_ICON_TEXT_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _CHECKBUTTON::DETAILED_ICON_TEXT_HIGHLIGHTED_COLOR); + } + { + const char* key ="CHECKBUTTON::DETAILED_ICON_TEXT_SELECTED"; + __pColorKeyTable->Add(ResourceKey(key), _CHECKBUTTON::DETAILED_ICON_TEXT_SELECTED_COLOR); + } + { + const char* key ="CHECKBUTTON::DIVIDER_LINE_LEFT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _CHECKBUTTON::DIVIDER_LINE_LEFT_NORMAL_COLOR); + } + { + const char* key ="CHECKBUTTON::DIVIDER_LINE_RIGHT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _CHECKBUTTON::DIVIDER_LINE_RIGHT_NORMAL_COLOR); + } + { + const char* key ="COLORPICKER::DIVIDER_TOP_HALF"; + __pColorKeyTable->Add(ResourceKey(key), _COLORPICKER::DIVIDER_TOP_HALF_COLOR); + } + { + const char* key ="COLORPICKER::DIVIDER_BOTTOM_HALF"; + __pColorKeyTable->Add(ResourceKey(key), _COLORPICKER::DIVIDER_BOTTOM_HALF_COLOR); + } + { + const char* key ="COLORPICKER::ARROW_BUTTON_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _COLORPICKER::ARROW_BUTTON_BG_NORMAL_COLOR); + } + { + const char* key ="COLORPICKER::ARROW_BUTTON_BG_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _COLORPICKER::ARROW_BUTTON_BG_PRESSED_COLOR); + } + { + const char* key ="COLORPICKER::ARROW_BUTTON_BG_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _COLORPICKER::ARROW_BUTTON_BG_DISABLED_COLOR); + } + { + const char* key ="COLORPICKER::ARROW_BUTTON_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _COLORPICKER::ARROW_BUTTON_NORMAL_COLOR); + } + { + const char* key ="COLORPICKER::ARROW_BUTTON_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _COLORPICKER::ARROW_BUTTON_PRESSED_COLOR); + } + { + const char* key ="COLORPICKER::ARROW_BUTTON_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _COLORPICKER::ARROW_BUTTON_DISABLED_COLOR); + } + { + const char* key ="COLORPICKER::HANDLER_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _COLORPICKER::HANDLER_HIGHLIGHTED_COLOR); + } + { + const char* key ="CONTEXTMENU::BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _CONTEXTMENU::BG_NORMAL_COLOR); + } + { + const char* key ="CONTEXTMENU::LIST_ITEM_DIVIDER_01_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _CONTEXTMENU::LIST_ITEM_DIVIDER_01_NORMAL_COLOR); + } + { + const char* key ="CONTEXTMENU::LIST_ITEM_DIVIDER_02_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _CONTEXTMENU::LIST_ITEM_DIVIDER_02_NORMAL_COLOR); + } + { + const char* key ="CONTEXTMENU::ITEM_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _CONTEXTMENU::ITEM_BG_NORMAL_COLOR); + } + { + const char* key ="CONTEXTMENU::ITEM_BG_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _CONTEXTMENU::ITEM_BG_PRESSED_COLOR); + } + { + const char* key ="CONTEXTMENU::ITEM_BG_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _CONTEXTMENU::ITEM_BG_HIGHLIGHTED_COLOR); + } + { + const char* key ="CONTEXTMENU::ITEM_BG_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _CONTEXTMENU::ITEM_BG_DISABLED_COLOR); + } + { + const char* key ="CONTEXTMENU::GRID_ITEM_DIVIDER_01_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _CONTEXTMENU::GRID_ITEM_DIVIDER_01_NORMAL_COLOR); + } + { + const char* key ="CONTEXTMENU::GRID_ITEM_DIVIDER_02_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _CONTEXTMENU::GRID_ITEM_DIVIDER_02_NORMAL_COLOR); + } + { + const char* key ="CONTEXTMENU::ITEM_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _CONTEXTMENU::ITEM_TEXT_NORMAL_COLOR); + } + { + const char* key ="CONTEXTMENU::ITEM_TEXT_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _CONTEXTMENU::ITEM_TEXT_PRESSED_COLOR); + } + { + const char* key ="CONTEXTMENU::ITEM_TEXT_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _CONTEXTMENU::ITEM_TEXT_HIGHLIGHTED_COLOR); + } + { + const char* key ="CONTEXTMENU::ITEM_TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _CONTEXTMENU::ITEM_TEXT_DISABLED_COLOR); + } + { + const char* key ="DATETIMEBAR::BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _DATETIMEBAR::BG_NORMAL_COLOR); + } + { + const char* key ="DATETIMEBAR::TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _DATETIMEBAR::TEXT_NORMAL_COLOR); + } + { + const char* key ="DATETIMEBAR::TEXT_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _DATETIMEBAR::TEXT_PRESSED_COLOR); + } + { + const char* key ="DATETIMEPICKER::DISPLAY_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _DATETIMEPICKER::DISPLAY_BG_NORMAL_COLOR); + } + { + const char* key ="DATETIMEPICKER::TITLE_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _DATETIMEPICKER::TITLE_NORMAL_COLOR); + } + { + const char* key ="DATETIMEPICKER::TITLE_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _DATETIMEPICKER::TITLE_DISABLED_COLOR); + } + { + const char* key ="DATETIMEPICKER::BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _DATETIMEPICKER::BG_NORMAL_COLOR); + } + { + const char* key ="DATETIMEPICKER::AMPM_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _DATETIMEPICKER::AMPM_BG_NORMAL_COLOR); + } + { + const char* key ="DATETIMEPICKER::AMPM_BG_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _DATETIMEPICKER::AMPM_BG_PRESSED_COLOR); + } + { + const char* key ="DATETIMEPICKER::AMPM_BG_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _DATETIMEPICKER::AMPM_BG_HIGHLIGHTED_COLOR); + } + { + const char* key ="DATETIMEPICKER::AMPM_BG_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _DATETIMEPICKER::AMPM_BG_DISABLED_COLOR); + } + { + const char* key ="DATETIMEPICKER::TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _DATETIMEPICKER::TEXT_NORMAL_COLOR); + } + { + const char* key ="DATETIMEPICKER::TEXT_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _DATETIMEPICKER::TEXT_PRESSED_COLOR); + } + { + const char* key ="DATETIMEPICKER::TEXT_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _DATETIMEPICKER::TEXT_HIGHLIGHTED_COLOR); + } + { + const char* key ="DATETIMEPICKER::TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _DATETIMEPICKER::TEXT_DISABLED_COLOR); + } + { + const char* key ="DATETIMEPICKER::AMPM_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _DATETIMEPICKER::AMPM_TEXT_NORMAL_COLOR); + } + { + const char* key ="DATETIMEPICKER::AMPM_TEXT_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _DATETIMEPICKER::AMPM_TEXT_PRESSED_COLOR); + } + { + const char* key ="DATETIMEPICKER::AMPM_TEXT_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _DATETIMEPICKER::AMPM_TEXT_HIGHLIGHTED_COLOR); + } + { + const char* key ="DATETIMEPICKER::AMPM_TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _DATETIMEPICKER::AMPM_TEXT_DISABLED_COLOR); + } + { + const char* key ="DATETIMEPICKER::DIVIDER_LEFT_HALF"; + __pColorKeyTable->Add(ResourceKey(key), _DATETIMEPICKER::DIVIDER_LEFT_HALF_COLOR); + } + { + const char* key ="DATETIMEPICKER::DIVIDER_RIGHT_HALF"; + __pColorKeyTable->Add(ResourceKey(key), _DATETIMEPICKER::DIVIDER_RIGHT_HALF_COLOR); + } + { + const char* key ="DATETIMEPICKER::CONTENT_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _DATETIMEPICKER::CONTENT_BG_NORMAL_COLOR); + } + { + const char* key ="DATETIMEPICKER::CONTENT_BG_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _DATETIMEPICKER::CONTENT_BG_PRESSED_COLOR); + } + { + const char* key ="DATETIMEPICKER::CONTENT_BG_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _DATETIMEPICKER::CONTENT_BG_DISABLED_COLOR); + } + { + const char* key ="DATETIMEPICKER::CONTENT_BG_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _DATETIMEPICKER::CONTENT_BG_HIGHLIGHTED_COLOR); + } + { + const char* key ="EDIT::BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _EDIT::BG_NORMAL_COLOR); + } + { + const char* key ="EDIT::BG_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _EDIT::BG_PRESSED_COLOR); + } + { + const char* key ="EDIT::BG_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _EDIT::BG_HIGHLIGHTED_COLOR); + } + { + const char* key ="EDIT::BG_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _EDIT::BG_DISABLED_COLOR); + } + { + const char* key ="EDIT::TITLE_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _EDIT::TITLE_TEXT_NORMAL_COLOR); + } + { + const char* key ="EDIT::TITLE_TEXT_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _EDIT::TITLE_TEXT_PRESSED_COLOR); + } + { + const char* key ="EDIT::TITLE_TEXT_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _EDIT::TITLE_TEXT_HIGHLIGHTED_COLOR); + } + { + const char* key ="EDIT::TITLE_TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _EDIT::TITLE_TEXT_DISABLED_COLOR); + } + { + const char* key ="EDIT::TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _EDIT::TEXT_NORMAL_COLOR); + } + { + const char* key ="EDIT::TEXT_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _EDIT::TEXT_PRESSED_COLOR); + } + { + const char* key ="EDIT::TEXT_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _EDIT::TEXT_HIGHLIGHTED_COLOR); + } + { + const char* key ="EDIT::TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _EDIT::TEXT_DISABLED_COLOR); + } + { + const char* key ="EDIT::GUIDE_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _EDIT::GUIDE_TEXT_NORMAL_COLOR); + } + { + const char* key ="EDIT::CLEAR_ICON_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _EDIT::CLEAR_ICON_NORMAL_COLOR); + } + { + const char* key ="EDIT::CLEAR_ICON_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _EDIT::CLEAR_ICON_PRESSED_COLOR); + } + { + const char* key ="EDIT::CUT_LINK_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _EDIT::CUT_LINK_TEXT_NORMAL_COLOR); + } + { + const char* key ="EDIT::CUT_LINK_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _EDIT::CUT_LINK_BG_NORMAL_COLOR); + } + { + const char* key ="EDIT::CURSOR_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _EDIT::CURSOR_NORMAL_COLOR); + } + { + const char* key ="EDITDATE::TITLE_TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _EDITDATE::TITLE_TEXT_DISABLED_COLOR); + } + { + const char* key ="EDITDATE::TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _EDITDATE::TEXT_NORMAL_COLOR); + } + { + const char* key ="EDITDATE::TEXT_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _EDITDATE::TEXT_PRESSED_COLOR); + } + { + const char* key ="EDITDATE::TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _EDITDATE::TEXT_DISABLED_COLOR); + } + { + const char* key ="EDITDATE::TEXT_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _EDITDATE::TEXT_HIGHLIGHTED_COLOR); + } + { + const char* key ="EDITDATE::TITLE_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _EDITDATE::TITLE_TEXT_NORMAL_COLOR); + } + { + const char* key ="EDITDATE::CONTENT_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _EDITDATE::CONTENT_BG_NORMAL_COLOR); + } + { + const char* key ="EDITDATE::CONTENT_BG_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _EDITDATE::CONTENT_BG_PRESSED_COLOR); + } + { + const char* key ="EDITDATE::CONTENT_BG_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _EDITDATE::CONTENT_BG_DISABLED_COLOR); + } + { + const char* key ="EDITDATE::CONTENT_BG_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _EDITDATE::CONTENT_BG_HIGHLIGHTED_COLOR); + } + { + const char* key ="EDITTIME::BUTTON_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _EDITTIME::BUTTON_BG_NORMAL_COLOR); + } + { + const char* key ="EDITTIME::BUTTON_BG_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _EDITTIME::BUTTON_BG_PRESSED_COLOR); + } + { + const char* key ="EDITTIME::BUTTON_BG_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _EDITTIME::BUTTON_BG_DISABLED_COLOR); + } + { + const char* key ="EDITTIME::BUTTON_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _EDITTIME::BUTTON_TEXT_NORMAL_COLOR); + } + { + const char* key ="EDITTIME::BUTTON_TEXT_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _EDITTIME::BUTTON_TEXT_PRESSED_COLOR); + } + { + const char* key ="EDITTIME::BUTTON_TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _EDITTIME::BUTTON_TEXT_DISABLED_COLOR); + } + { + const char* key ="EDITTIME::BUTTON_TEXT_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _EDITTIME::BUTTON_TEXT_HIGHLIGHTED_COLOR); + } + { + const char* key ="EDITTIME::TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _EDITTIME::TEXT_NORMAL_COLOR); + } + { + const char* key ="EDITTIME::TEXT_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _EDITTIME::TEXT_PRESSED_COLOR); + } + { + const char* key ="EDITTIME::TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _EDITTIME::TEXT_DISABLED_COLOR); + } + { + const char* key ="EDITTIME::TEXT_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _EDITTIME::TEXT_HIGHLIGHTED_COLOR); + } + { + const char* key ="EDITTIME::TITLE_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _EDITTIME::TITLE_TEXT_NORMAL_COLOR); + } + { + const char* key ="EDITTIME::TITLE_TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _EDITTIME::TITLE_TEXT_DISABLED_COLOR); + } + { + const char* key ="EDITTIME::BUTTON_BG_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _EDITTIME::BUTTON_BG_HIGHLIGHTED_COLOR); + } + { + const char* key ="EDITTIME::CONTENT_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _EDITTIME::CONTENT_BG_NORMAL_COLOR); + } + { + const char* key ="EDITTIME::CONTENT_BG_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _EDITTIME::CONTENT_BG_PRESSED_COLOR); + } + { + const char* key ="EDITTIME::CONTENT_BG_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _EDITTIME::CONTENT_BG_DISABLED_COLOR); + } + { + const char* key ="EDITTIME::CONTENT_BG_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _EDITTIME::CONTENT_BG_HIGHLIGHTED_COLOR); + } + { + const char* key ="FASTSCROLL::INDEX_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _FASTSCROLL::INDEX_BG_NORMAL_COLOR); + } + { + const char* key ="FASTSCROLL::INDEX_LINE_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _FASTSCROLL::INDEX_LINE_PRESSED_COLOR); + } + { + const char* key ="FASTSCROLL::INDEX_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _FASTSCROLL::INDEX_TEXT_NORMAL_COLOR); + } + { + const char* key ="FASTSCROLL::INDEX_DIVIDER_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _FASTSCROLL::INDEX_DIVIDER_NORMAL_COLOR); + } + { + const char* key ="FASTSCROLL::INDEX_BG_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _FASTSCROLL::INDEX_BG_PRESSED_COLOR); + } + { + const char* key ="FASTSCROLL::INDEX_TEXT_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _FASTSCROLL::INDEX_TEXT_PRESSED_COLOR); + } + { + const char* key ="FASTSCROLL::POPUP_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _FASTSCROLL::POPUP_BG_NORMAL_COLOR); + } + { + const char* key ="FASTSCROLL::POPUP_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _FASTSCROLL::POPUP_TEXT_NORMAL_COLOR); + } + { + const char* key ="FOOTER::BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::BG_NORMAL_COLOR); + } + { + const char* key ="FOOTER::TRANSLUCENT_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::TRANSLUCENT_BG_NORMAL_COLOR); + } + { + const char* key ="FOOTER::BUTTON_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::BUTTON_BG_NORMAL_COLOR); + } + { + const char* key ="FOOTER::BUTTON_BG_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::BUTTON_BG_DISABLED_COLOR); + } + { + const char* key ="FOOTER::BUTTON_BG_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::BUTTON_BG_PRESSED_COLOR); + } + { + const char* key ="FOOTER::BUTTON_BG_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::BUTTON_BG_HIGHLIGHTED_COLOR); + } + { + const char* key ="FOOTER::BUTTON_TRANSLUCENT_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::BUTTON_TRANSLUCENT_BG_NORMAL_COLOR); + } + { + const char* key ="FOOTER::BUTTON_TRANSLUCENT_BG_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::BUTTON_TRANSLUCENT_BG_DISABLED_COLOR); + } + { + const char* key ="FOOTER::BUTTON_TRANSLUCENT_BG_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::BUTTON_TRANSLUCENT_BG_PRESSED_COLOR); + } + { + const char* key ="FOOTER::BUTTON_TRANSLUCENT_BG_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::BUTTON_TRANSLUCENT_BG_HIGHLIGHTED_COLOR); + } + { + const char* key ="FOOTER::BUTTON_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::BUTTON_TEXT_NORMAL_COLOR); + } + { + const char* key ="FOOTER::BUTTON_TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::BUTTON_TEXT_DISABLED_COLOR); + } + { + const char* key ="FOOTER::BUTTON_TEXT_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::BUTTON_TEXT_PRESSED_COLOR); + } + { + const char* key ="FOOTER::BUTTON_TEXT_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::BUTTON_TEXT_HIGHLIGHTED_COLOR); + } + { + const char* key ="FOOTER::BUTTON_TRANSLUCENT_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::BUTTON_TRANSLUCENT_TEXT_NORMAL_COLOR); + } + { + const char* key ="FOOTER::BUTTON_TRANSLUCENT_TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::BUTTON_TRANSLUCENT_TEXT_DISABLED_COLOR); + } + { + const char* key ="FOOTER::BUTTON_TRANSLUCENT_TEXT_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::BUTTON_TRANSLUCENT_TEXT_PRESSED_COLOR); + } + { + const char* key ="FOOTER::BUTTON_TRANSLUCENT_TEXT_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::BUTTON_TRANSLUCENT_TEXT_HIGHLIGHTED_COLOR); + } + { + const char* key ="FOOTER::SEGMENTED_ITEM_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::SEGMENTED_ITEM_BG_NORMAL_COLOR); + } + { + const char* key ="FOOTER::SEGMENTED_ITEM_BG_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::SEGMENTED_ITEM_BG_DISABLED_COLOR); + } + { + const char* key ="FOOTER::SEGMENTED_ITEM_BG_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::SEGMENTED_ITEM_BG_PRESSED_COLOR); + } + { + const char* key ="FOOTER::SEGMENTED_ITEM_BG_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::SEGMENTED_ITEM_BG_HIGHLIGHTED_COLOR); + } + { + const char* key ="FOOTER::SEGMENTED_ITEM_BG_SELECTED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::SEGMENTED_ITEM_BG_SELECTED_COLOR); + } + { + const char* key ="FOOTER::SEGMENTED_ITEM_TRANSLUCENT_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::SEGMENTED_ITEM_TRANSLUCENT_BG_NORMAL_COLOR); + } + { + const char* key ="FOOTER::SEGMENTED_ITEM_TRANSLUCENT_BG_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::SEGMENTED_ITEM_TRANSLUCENT_BG_DISABLED_COLOR); + } + { + const char* key ="FOOTER::SEGMENTED_ITEM_TRANSLUCENT_BG_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::SEGMENTED_ITEM_TRANSLUCENT_BG_PRESSED_COLOR); + } + { + const char* key ="FOOTER::SEGMENTED_ITEM_TRANSLUCENT_BG_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::SEGMENTED_ITEM_TRANSLUCENT_BG_HIGHLIGHTED_COLOR); + } + { + const char* key ="FOOTER::SEGMENTED_ITEM_TRANSLUCENT_BG_SELECTED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::SEGMENTED_ITEM_TRANSLUCENT_BG_SELECTED_COLOR); + } + { + const char* key ="FOOTER::SEGMENTED_ITEM_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::SEGMENTED_ITEM_TEXT_NORMAL_COLOR); + } + { + const char* key ="FOOTER::SEGMENTED_ITEM_TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::SEGMENTED_ITEM_TEXT_DISABLED_COLOR); + } + { + const char* key ="FOOTER::SEGMENTED_ITEM_TEXT_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::SEGMENTED_ITEM_TEXT_PRESSED_COLOR); + } + { + const char* key ="FOOTER::SEGMENTED_ITEM_TEXT_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::SEGMENTED_ITEM_TEXT_HIGHLIGHTED_COLOR); + } + { + const char* key ="FOOTER::SEGMENTED_ITEM_TEXT_SELECTED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::SEGMENTED_ITEM_TEXT_SELECTED_COLOR); + } + { + const char* key ="FOOTER::SEGMENTED_ITEM_TRANSLUCENT_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::SEGMENTED_ITEM_TRANSLUCENT_TEXT_NORMAL_COLOR); + } + { + const char* key ="FOOTER::SEGMENTED_ITEM_TRANSLUCENT_TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::SEGMENTED_ITEM_TRANSLUCENT_TEXT_DISABLED_COLOR); + } + { + const char* key ="FOOTER::SEGMENTED_ITEM_TRANSLUCENT_TEXT_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::SEGMENTED_ITEM_TRANSLUCENT_TEXT_PRESSED_COLOR); + } + { + const char* key ="FOOTER::SEGMENTED_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::SEGMENTED_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED_COLOR); + } + { + const char* key ="FOOTER::SEGMENTED_ITEM_TRANSLUCENT_TEXT_SELECTED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::SEGMENTED_ITEM_TRANSLUCENT_TEXT_SELECTED_COLOR); + } + { + const char* key ="FOOTER::SEGMENTED_ITEM_TRANSLUCENT_TEXT_SELECTED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::SEGMENTED_ITEM_TRANSLUCENT_TEXT_SELECTED_COLOR); + } + { + const char* key ="FOOTER::TAB_ITEM_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::TAB_ITEM_BG_NORMAL_COLOR); + } + { + const char* key ="FOOTER::TAB_ITEM_BG_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::TAB_ITEM_BG_DISABLED_COLOR); + } + { + const char* key ="FOOTER::TAB_ITEM_BG_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::TAB_ITEM_BG_PRESSED_COLOR); + } + { + const char* key ="FOOTER::TAB_ITEM_BG_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::TAB_ITEM_BG_HIGHLIGHTED_COLOR); + } + { + const char* key ="FOOTER::TAB_ITEM_BG_SELECTED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::TAB_ITEM_BG_SELECTED_COLOR); + } + { + const char* key ="FOOTER::TAB_ITEM_TRANSLUCENT_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::TAB_ITEM_TRANSLUCENT_BG_NORMAL_COLOR); + } + { + const char* key ="FOOTER::TAB_ITEM_TRANSLUCENT_BG_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::TAB_ITEM_TRANSLUCENT_BG_DISABLED_COLOR); + } + { + const char* key ="FOOTER::TAB_ITEM_TRANSLUCENT_BG_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::TAB_ITEM_TRANSLUCENT_BG_PRESSED_COLOR); + } + { + const char* key ="FOOTER::TAB_ITEM_TRANSLUCENT_BG_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::TAB_ITEM_TRANSLUCENT_BG_HIGHLIGHTED_COLOR); + } + { + const char* key ="FOOTER::TAB_ITEM_TRANSLUCENT_BG_SELECTED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::TAB_ITEM_TRANSLUCENT_BG_SELECTED_COLOR); + } + { + const char* key ="FOOTER::TAB_ITEM_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::TAB_ITEM_TEXT_NORMAL_COLOR); + } + { + const char* key ="FOOTER::TAB_ITEM_TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::TAB_ITEM_TEXT_DISABLED_COLOR); + } + { + const char* key ="FOOTER::TAB_ITEM_TEXT_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::TAB_ITEM_TEXT_PRESSED_COLOR); + } + { + const char* key ="FOOTER::TAB_ITEM_TEXT_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::TAB_ITEM_TEXT_HIGHLIGHTED_COLOR); + } + { + const char* key ="FOOTER::TAB_ITEM_TEXT_SELECTED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::TAB_ITEM_TEXT_SELECTED_COLOR); + } + { + const char* key ="FOOTER::TAB_ITEM_TRANSLUCENT_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::TAB_ITEM_TRANSLUCENT_TEXT_NORMAL_COLOR); + } + { + const char* key ="FOOTER::TAB_ITEM_TRANSLUCENT_TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::TAB_ITEM_TRANSLUCENT_TEXT_DISABLED_COLOR); + } + { + const char* key ="FOOTER::TAB_ITEM_TRANSLUCENT_TEXT_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::TAB_ITEM_TRANSLUCENT_TEXT_PRESSED_COLOR); + } + { + const char* key ="FOOTER::TAB_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::TAB_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED_COLOR); + } + { + const char* key ="FOOTER::TAB_ITEM_TRANSLUCENT_TEXT_SELECTED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::TAB_ITEM_TRANSLUCENT_TEXT_SELECTED_COLOR); + } + { + const char* key ="FOOTER::BUTTON_ITEM_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::BUTTON_ITEM_BG_NORMAL_COLOR); + } + { + const char* key ="FOOTER::BUTTON_ITEM_BG_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::BUTTON_ITEM_BG_DISABLED_COLOR); + } + { + const char* key ="FOOTER::BUTTON_ITEM_BG_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::BUTTON_ITEM_BG_PRESSED_COLOR); + } + { + const char* key ="FOOTER::BUTTON_ITEM_BG_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::BUTTON_ITEM_BG_HIGHLIGHTED_COLOR); + } + { + const char* key ="FOOTER::BUTTON_ITEM_TRANSLUCENT_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::BUTTON_ITEM_TRANSLUCENT_BG_NORMAL_COLOR); + } + { + const char* key ="FOOTER::BUTTON_ITEM_TRANSLUCENT_BG_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::BUTTON_ITEM_TRANSLUCENT_BG_DISABLED_COLOR); + } + { + const char* key ="FOOTER::BUTTON_ITEM_TRANSLUCENT_BG_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::BUTTON_ITEM_TRANSLUCENT_BG_PRESSED_COLOR); + } + { + const char* key ="FOOTER::BUTTON_ITEM_TRANSLUCENT_BG_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::BUTTON_ITEM_TRANSLUCENT_BG_HIGHLIGHTED_COLOR); + } + { + const char* key ="FOOTER::BUTTON_ITEM_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::BUTTON_ITEM_TEXT_NORMAL_COLOR); + } + { + const char* key ="FOOTER::BUTTON_ITEM_TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::BUTTON_ITEM_TEXT_DISABLED_COLOR); + } + { + const char* key ="FOOTER::BUTTON_ITEM_TEXT_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::BUTTON_ITEM_TEXT_PRESSED_COLOR); + } + { + const char* key ="FOOTER::BUTTON_ITEM_TEXT_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::BUTTON_ITEM_TEXT_HIGHLIGHTED_COLOR); + } + { + const char* key ="FOOTER::BUTTON_ITEM_TRANSLUCENT_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::BUTTON_ITEM_TRANSLUCENT_TEXT_NORMAL_COLOR); + } + { + const char* key ="FOOTER::BUTTON_ITEM_TRANSLUCENT_TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::BUTTON_ITEM_TRANSLUCENT_TEXT_DISABLED_COLOR); + } + { + const char* key ="FOOTER::BUTTON_ITEM_TRANSLUCENT_TEXT_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::BUTTON_ITEM_TRANSLUCENT_TEXT_PRESSED_COLOR); + } + { + const char* key ="FOOTER::BUTTON_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::BUTTON_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED_COLOR); + } + { + const char* key ="FOOTER::BACK_ICON_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::BACK_ICON_NORMAL_COLOR); + } + { + const char* key ="FOOTER::BACK_ICON_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::BACK_ICON_DISABLED_COLOR); + } + { + const char* key ="FOOTER::BACK_ICON_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::BACK_ICON_PRESSED_COLOR); + } + { + const char* key ="FOOTER::BACK_ICON_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::BACK_ICON_HIGHLIGHTED_COLOR); + } + { + const char* key ="FOOTER::SOFTKEY_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::SOFTKEY_BG_NORMAL_COLOR); + } + { + const char* key ="FOOTER::SOFTKEY_BG_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::SOFTKEY_BG_DISABLED_COLOR); + } + { + const char* key ="FOOTER::SOFTKEY_BG_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::SOFTKEY_BG_PRESSED_COLOR); + } + { + const char* key ="FOOTER::SOFTKEY_BG_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::SOFTKEY_BG_HIGHLIGHTED_COLOR); + } + { + const char* key ="FOOTER::SOFTKEY_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::SOFTKEY_TEXT_NORMAL_COLOR); + } + { + const char* key ="FOOTER::SOFTKEY_TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::SOFTKEY_TEXT_DISABLED_COLOR); + } + { + const char* key ="FOOTER::SOFTKEY_TEXT_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::SOFTKEY_TEXT_PRESSED_COLOR); + } + { + const char* key ="FOOTER::SOFTKEY_TEXT_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::SOFTKEY_TEXT_HIGHLIGHTED_COLOR); + } + + { + const char* key ="FOOTER::SOFTKEY_ICON_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::SOFTKEY_ICON_NORMAL_COLOR); + } + { + const char* key ="FOOTER::SOFTKEY_ICON_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::SOFTKEY_ICON_DISABLED_COLOR); + } + { + const char* key ="FOOTER::SOFTKEY_ICON_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::SOFTKEY_ICON_PRESSED_COLOR); + } + { + const char* key ="FOOTER::SOFTKEY_ICON_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::SOFTKEY_ICON_HIGHLIGHTED_COLOR); + } + { + const char* key ="FOOTER::DIVIDER_LINE_LEFT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::DIVIDER_LINE_LEFT_NORMAL_COLOR); + } + { + const char* key ="FOOTER::DIVIDER_LINE_RIGHT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::DIVIDER_LINE_RIGHT_NORMAL_COLOR); + } + { + const char* key ="FOOTER::DIVIDER_LINE_LEFT_TRANSLUCENT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::DIVIDER_LINE_LEFT_TRANSLUCENT_NORMAL_COLOR); + } + { + const char* key ="FOOTER::DIVIDER_LINE_RIGHT_TRANSLUCENT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _FOOTER::DIVIDER_LINE_RIGHT_TRANSLUCENT_NORMAL_COLOR); + } + { + const char* key ="FORM::BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _FORM::BG_NORMAL_COLOR); + } + { + const char* key ="GALLERY::EMPTY_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _GALLERY::EMPTY_TEXT_NORMAL_COLOR); + } + { + const char* key ="HEADER::BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::BG_NORMAL_COLOR); + } + { + const char* key ="HEADER::TRANSLUCENT_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::TRANSLUCENT_BG_NORMAL_COLOR); + } + { + const char* key ="HEADER::TITLE_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::TITLE_TEXT_NORMAL_COLOR); + } + { + const char* key ="HEADER::TRANSLUCENT_TITLE_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::TRANSLUCENT_TITLE_TEXT_NORMAL_COLOR); + } + { + const char* key ="HEADER::DESCRIPTION_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::DESCRIPTION_TEXT_NORMAL_COLOR); + } + { + const char* key ="HEADER::TRANSLUCENT_DESCRIPTION_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::TRANSLUCENT_DESCRIPTION_TEXT_NORMAL_COLOR); + } + { + const char* key ="HEADER::BUTTON_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::BUTTON_BG_NORMAL_COLOR); + } + { + const char* key ="HEADER::BUTTON_BG_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::BUTTON_BG_DISABLED_COLOR); + } + { + const char* key ="HEADER::BUTTON_BG_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::BUTTON_BG_PRESSED_COLOR); + } + { + const char* key ="HEADER::BUTTON_BG_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::BUTTON_BG_HIGHLIGHTED_COLOR); + } + { + const char* key ="HEADER::BUTTON_TRANSLUCENT_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::BUTTON_TRANSLUCENT_BG_NORMAL_COLOR); + } + { + const char* key ="HEADER::BUTTON_TRANSLUCENT_BG_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::BUTTON_TRANSLUCENT_BG_DISABLED_COLOR); + } + { + const char* key ="HEADER::BUTTON_TRANSLUCENT_BG_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::BUTTON_TRANSLUCENT_BG_PRESSED_COLOR); + } + { + const char* key ="HEADER::BUTTON_TRANSLUCENT_BG_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::BUTTON_TRANSLUCENT_BG_HIGHLIGHTED_COLOR); + } + { + const char* key ="HEADER::BUTTON_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::BUTTON_TEXT_NORMAL_COLOR); + } + { + const char* key ="HEADER::BUTTON_TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::BUTTON_TEXT_DISABLED_COLOR); + } + { + const char* key ="HEADER::BUTTON_TEXT_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::BUTTON_TEXT_PRESSED_COLOR); + } + { + const char* key ="HEADER::BUTTON_TEXT_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::BUTTON_TEXT_HIGHLIGHTED_COLOR); + } + { + const char* key ="HEADER::BUTTON_TRANSLUCENT_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::BUTTON_TRANSLUCENT_TEXT_NORMAL_COLOR); + } + { + const char* key ="HEADER::BUTTON_TRANSLUCENT_TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::BUTTON_TRANSLUCENT_TEXT_DISABLED_COLOR); + } + { + const char* key ="HEADER::BUTTON_TRANSLUCENT_TEXT_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::BUTTON_TRANSLUCENT_TEXT_PRESSED_COLOR); + } + { + const char* key ="HEADER::BUTTON_TRANSLUCENT_TEXT_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::BUTTON_TRANSLUCENT_TEXT_HIGHLIGHTED_COLOR); + } + { + const char* key ="HEADER::SEGMENTED_ITEM_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::SEGMENTED_ITEM_BG_NORMAL_COLOR); + } + { + const char* key ="HEADER::SEGMENTED_ITEM_BG_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::SEGMENTED_ITEM_BG_DISABLED_COLOR); + } + { + const char* key ="HEADER::SEGMENTED_ITEM_BG_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::SEGMENTED_ITEM_BG_PRESSED_COLOR); + } + { + const char* key ="HEADER::SEGMENTED_ITEM_BG_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::SEGMENTED_ITEM_BG_HIGHLIGHTED_COLOR); + } + { + const char* key ="HEADER::SEGMENTED_ITEM_BG_SELECTED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::SEGMENTED_ITEM_BG_SELECTED_COLOR); + } + { + const char* key ="HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_NORMAL_COLOR); + } + { + const char* key ="HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_DISABLED_COLOR); + } + { + const char* key ="HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_PRESSED_COLOR); + } + { + const char* key ="HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_HIGHLIGHTED_COLOR); + } + { + const char* key ="HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_SELECTED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_SELECTED_COLOR); + } + { + const char* key ="HEADER::SEGMENTED_ITEM_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::SEGMENTED_ITEM_TEXT_NORMAL_COLOR); + } + { + const char* key ="HEADER::SEGMENTED_ITEM_TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::SEGMENTED_ITEM_TEXT_DISABLED_COLOR); + } + { + const char* key ="HEADER::SEGMENTED_ITEM_TEXT_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::SEGMENTED_ITEM_TEXT_PRESSED_COLOR); + } + { + const char* key ="HEADER::SEGMENTED_ITEM_TEXT_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::SEGMENTED_ITEM_TEXT_HIGHLIGHTED_COLOR); + } + { + const char* key ="HEADER::SEGMENTED_ITEM_TEXT_SELECTED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::SEGMENTED_ITEM_TEXT_SELECTED_COLOR); + } + { + const char* key ="HEADER::SEGMENTED_ITEM_TRANSLUCENT_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::SEGMENTED_ITEM_TRANSLUCENT_TEXT_NORMAL_COLOR); + } + { + const char* key ="HEADER::SEGMENTED_ITEM_TRANSLUCENT_TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::SEGMENTED_ITEM_TRANSLUCENT_TEXT_DISABLED_COLOR); + } + { + const char* key ="HEADER::SEGMENTED_ITEM_TRANSLUCENT_TEXT_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::SEGMENTED_ITEM_TRANSLUCENT_TEXT_PRESSED_COLOR); + } + { + const char* key ="HEADER::SEGMENTED_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::SEGMENTED_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED_COLOR); + } + { + const char* key ="HEADER::SEGMENTED_ITEM_TRANSLUCENT_TEXT_SELECTED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::SEGMENTED_ITEM_TRANSLUCENT_TEXT_SELECTED_COLOR); + } + { + const char* key ="HEADER::TAB_ITEM_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::TAB_ITEM_BG_NORMAL_COLOR); + } + { + const char* key ="HEADER::TAB_ITEM_BG_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::TAB_ITEM_BG_DISABLED_COLOR); + } + { + const char* key ="HEADER::TAB_ITEM_BG_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::TAB_ITEM_BG_PRESSED_COLOR); + } + { + const char* key ="HEADER::TAB_ITEM_BG_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::TAB_ITEM_BG_HIGHLIGHTED_COLOR); + } + { + const char* key ="HEADER::TAB_ITEM_BG_SELECTED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::TAB_ITEM_BG_SELECTED_COLOR); + } + { + const char* key ="HEADER::TAB_ITEM_TRANSLUCENT_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::TAB_ITEM_TRANSLUCENT_BG_NORMAL_COLOR); + } + { + const char* key ="HEADER::TAB_ITEM_TRANSLUCENT_BG_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::TAB_ITEM_TRANSLUCENT_BG_DISABLED_COLOR); + } + { + const char* key ="HEADER::TAB_ITEM_TRANSLUCENT_BG_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::TAB_ITEM_TRANSLUCENT_BG_PRESSED_COLOR); + } + { + const char* key ="HEADER::TAB_ITEM_TRANSLUCENT_BG_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::TAB_ITEM_TRANSLUCENT_BG_HIGHLIGHTED_COLOR); + } + { + const char* key ="HEADER::TAB_ITEM_TRANSLUCENT_BG_SELECTED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::TAB_ITEM_TRANSLUCENT_BG_SELECTED_COLOR); + } + { + const char* key ="HEADER::TAB_ITEM_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::TAB_ITEM_TEXT_NORMAL_COLOR); + } + { + const char* key ="HEADER::TAB_ITEM_TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::TAB_ITEM_TEXT_DISABLED_COLOR); + } + { + const char* key ="HEADER::TAB_ITEM_TEXT_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::TAB_ITEM_TEXT_PRESSED_COLOR); + } + { + const char* key ="HEADER::TAB_ITEM_TEXT_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::TAB_ITEM_TEXT_HIGHLIGHTED_COLOR); + } + { + const char* key ="HEADER::TAB_ITEM_TEXT_SELECTED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::TAB_ITEM_TEXT_SELECTED_COLOR); + } + { + const char* key ="HEADER::TAB_ITEM_TRANSLUCENT_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::TAB_ITEM_TRANSLUCENT_TEXT_NORMAL_COLOR); + } + { + const char* key ="HEADER::TAB_ITEM_TRANSLUCENT_TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::TAB_ITEM_TRANSLUCENT_TEXT_DISABLED_COLOR); + } + { + const char* key ="HEADER::TAB_ITEM_TRANSLUCENT_TEXT_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::TAB_ITEM_TRANSLUCENT_TEXT_PRESSED_COLOR); + } + { + const char* key ="HEADER::TAB_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::TAB_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED_COLOR); + } + { + const char* key ="HEADER::TAB_ITEM_TRANSLUCENT_TEXT_SELECTED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::TAB_ITEM_TRANSLUCENT_TEXT_SELECTED_COLOR); + } + { + const char* key ="HEADER::BADGE_ICON_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::BADGE_ICON_BG_NORMAL_COLOR); + } + { + const char* key ="HEADER::BADGE_ICON_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::BADGE_ICON_TEXT_NORMAL_COLOR); + } + { + const char* key ="HEADER::DIVIDER_LINE_LEFT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::DIVIDER_LINE_LEFT_NORMAL_COLOR); + } + { + const char* key ="HEADER::DIVIDER_LINE_RIGHT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::DIVIDER_LINE_RIGHT_NORMAL_COLOR); + } + { + const char* key ="HEADER::DIVIDER_LINE_LEFT_TRANSLUCENT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::DIVIDER_LINE_LEFT_TRANSLUCENT_NORMAL_COLOR); + } + { + const char* key ="HEADER::DIVIDER_LINE_RIGHT_TRANSLUCENT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::DIVIDER_LINE_RIGHT_TRANSLUCENT_NORMAL_COLOR); + } + { + const char* key ="HEADER::BUTTON_ITEM_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::BUTTON_ITEM_BG_NORMAL_COLOR); + } + { + const char* key ="HEADER::BUTTON_ITEM_BG_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::BUTTON_ITEM_BG_DISABLED_COLOR); + } + { + const char* key ="HEADER::BUTTON_ITEM_BG_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::BUTTON_ITEM_BG_PRESSED_COLOR); + } + { + const char* key ="HEADER::BUTTON_ITEM_BG_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::BUTTON_ITEM_BG_HIGHLIGHTED_COLOR); + } + { + const char* key ="HEADER::BUTTON_ITEM_TRANSLUCENT_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::BUTTON_ITEM_TRANSLUCENT_BG_NORMAL_COLOR); + } + { + const char* key ="HEADER::BUTTON_ITEM_TRANSLUCENT_BG_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::BUTTON_ITEM_TRANSLUCENT_BG_DISABLED_COLOR); + } + { + const char* key ="HEADER::BUTTON_ITEM_TRANSLUCENT_BG_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::BUTTON_ITEM_TRANSLUCENT_BG_PRESSED_COLOR); + } + { + const char* key ="HEADER::BUTTON_ITEM_TRANSLUCENT_BG_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::BUTTON_ITEM_TRANSLUCENT_BG_HIGHLIGHTED_COLOR); + } + { + const char* key ="HEADER::BUTTON_ITEM_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::BUTTON_ITEM_TEXT_NORMAL_COLOR); + } + { + const char* key ="HEADER::BUTTON_ITEM_TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::BUTTON_ITEM_TEXT_DISABLED_COLOR); + } + { + const char* key ="HEADER::BUTTON_ITEM_TEXT_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::BUTTON_ITEM_TEXT_PRESSED_COLOR); + } + { + const char* key ="HEADER::BUTTON_ITEM_TEXT_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::BUTTON_ITEM_TEXT_HIGHLIGHTED_COLOR); + } + { + const char* key ="HEADER::BUTTON_ITEM_TRANSLUCENT_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::BUTTON_ITEM_TRANSLUCENT_TEXT_NORMAL_COLOR); + } + { + const char* key ="HEADER::BUTTON_ITEM_TRANSLUCENT_TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::BUTTON_ITEM_TRANSLUCENT_TEXT_DISABLED_COLOR); + } + { + const char* key ="HEADER::BUTTON_ITEM_TRANSLUCENT_TEXT_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::BUTTON_ITEM_TRANSLUCENT_TEXT_PRESSED_COLOR); + } + { + const char* key ="HEADER::BUTTON_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _HEADER::BUTTON_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED_COLOR); + } + { + const char* key ="ICONLIST::EMPTY_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _ICONLIST::EMPTY_TEXT_NORMAL_COLOR); + } + { + const char* key ="ICONLIST::TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _ICONLIST::TEXT_NORMAL_COLOR); + } + { + const char* key ="ICONLIST::TEXT_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _ICONLIST::TEXT_PRESSED_COLOR); + } + { + const char* key ="ICONLIST::TEXT_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _ICONLIST::TEXT_HIGHLIGHTED_COLOR); + } + { + const char* key ="ICONLIST::INNER_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _ICONLIST::INNER_TEXT_NORMAL_COLOR); + } + { + const char* key ="ICONLIST::INNER_TEXT_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _ICONLIST::INNER_TEXT_PRESSED_COLOR); + } + { + const char* key ="ICONLIST::INNER_TEXT_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _ICONLIST::INNER_TEXT_HIGHLIGHTED_COLOR); + } + { + const char* key ="ICONLIST::INNER_TEXT_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _ICONLIST::INNER_TEXT_BG_NORMAL_COLOR); + } + { + const char* key ="ICONLIST::ITEM_BG_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _ICONLIST::ITEM_BG_PRESSED_COLOR); + } + { + const char* key ="ICONLIST::ITEM_BORDER_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _ICONLIST::ITEM_BORDER_NORMAL_COLOR); + } + { + const char* key ="ICONLIST::ITEM_BORDER_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _ICONLIST::ITEM_BORDER_PRESSED_COLOR); + } + { + const char* key ="ICONLIST::ITEM_BORDER_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _ICONLIST::ITEM_BORDER_HIGHLIGHTED_COLOR); + } + { + const char* key ="INPUTPAD::TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _INPUTPAD::TEXT_NORMAL_COLOR); + } + { + const char* key ="INPUTPAD::TEXT_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _INPUTPAD::TEXT_PRESSED_COLOR); + } + { + const char* key ="INPUTPAD::GUIDE_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _INPUTPAD::GUIDE_TEXT_NORMAL_COLOR); + } + { + const char* key ="INPUTPAD::GUIDE_TEXT_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _INPUTPAD::GUIDE_TEXT_PRESSED_COLOR); + } + { + const char* key ="INPUTPAD::GUIDE_TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _INPUTPAD::GUIDE_TEXT_DISABLED_COLOR); + } + { + const char* key ="INPUTPAD::BUTTON_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _INPUTPAD::BUTTON_BG_NORMAL_COLOR); + } + { + const char* key ="INPUTPAD::BUTTON_BG_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _INPUTPAD::BUTTON_BG_PRESSED_COLOR); + } + { + const char* key ="INPUTPAD::TEXT_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _INPUTPAD::TEXT_HIGHLIGHTED_COLOR); + } + { + const char* key ="INPUTPAD::TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _INPUTPAD::TEXT_DISABLED_COLOR); + } + { + const char* key ="INPUTPAD::BUTTON_BG_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _INPUTPAD::BUTTON_BG_HIGHLIGHTED_COLOR); + } + { + const char* key ="INPUTPAD::BUTTON_BG_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _INPUTPAD::BUTTON_BG_DISABLED_COLOR); + } + { + const char* key ="LABEL::TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _LABEL::TEXT_NORMAL_COLOR); + } + { + const char* key ="MESSAGEBOX::BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _MESSAGEBOX::BG_NORMAL_COLOR); + } + { + const char* key ="MESSAGEBOX::TITLE_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _MESSAGEBOX::TITLE_TEXT_NORMAL_COLOR); + } + { + const char* key ="MESSAGEBOX::TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _MESSAGEBOX::TEXT_NORMAL_COLOR); + } + { + const char* key ="MESSAGEBOX::BOTTOM_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _MESSAGEBOX::BOTTOM_BG_NORMAL_COLOR); + } + { + const char* key ="MESSAGEBOX::TITLE_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _MESSAGEBOX::TITLE_BG_NORMAL_COLOR); + } + { + const char* key ="MESSAGEBOX::BOTTOM_BUTTON_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _MESSAGEBOX::BOTTOM_BUTTON_BG_NORMAL_COLOR); + } + { + const char* key ="MESSAGEBOX::BOTTOM_BUTTON_BG_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _MESSAGEBOX::BOTTOM_BUTTON_BG_PRESSED_COLOR); + } + { + const char* key ="MESSAGEBOX::BOTTOM_BUTTON_BG_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _MESSAGEBOX::BOTTOM_BUTTON_BG_DISABLED_COLOR); + } + { + const char* key ="MESSAGEBOX::BOTTOM_BUTTON_BG_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _MESSAGEBOX::BOTTOM_BUTTON_BG_HIGHLIGHTED_COLOR); + } + { + const char* key ="MESSAGEBOX::BOTTOM_BUTTON_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _MESSAGEBOX::BOTTOM_BUTTON_TEXT_NORMAL_COLOR); + } + { + const char* key ="MESSAGEBOX::BOTTOM_BUTTON_TEXT_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _MESSAGEBOX::BOTTOM_BUTTON_TEXT_PRESSED_COLOR); + } + { + const char* key ="MESSAGEBOX::BOTTOM_BUTTON_TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _MESSAGEBOX::BOTTOM_BUTTON_TEXT_DISABLED_COLOR); + } + { + const char* key ="MESSAGEBOX::BOTTOM_BUTTON_TEXT_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _MESSAGEBOX::BOTTOM_BUTTON_TEXT_HIGHLIGHTED_COLOR); + } + { + const char* key ="OPTIONMENU::BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _OPTIONMENU::BG_NORMAL_COLOR); + } + { + const char* key ="OPTIONMENU::ITEM_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _OPTIONMENU::ITEM_TEXT_NORMAL_COLOR); + } + { + const char* key ="OPTIONMENU::ITEM_TEXT_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _OPTIONMENU::ITEM_TEXT_PRESSED_COLOR); + } + { + const char* key ="OPTIONMENU::ITEM_TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _OPTIONMENU::ITEM_TEXT_DISABLED_COLOR); + } + { + const char* key ="OPTIONMENU::ITEM_TEXT_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _OPTIONMENU::ITEM_TEXT_HIGHLIGHTED_COLOR); + } + { + const char* key ="OPTIONMENU::ITEM_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _OPTIONMENU::ITEM_BG_NORMAL_COLOR); + } + { + const char* key ="OPTIONMENU::ITEM_BG_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _OPTIONMENU::ITEM_BG_PRESSED_COLOR); + } + { + const char* key ="OPTIONMENU::ITEM_BG_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _OPTIONMENU::ITEM_BG_DISABLED_COLOR); + } + { + const char* key ="OPTIONMENU::ITEM_BG_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _OPTIONMENU::ITEM_BG_HIGHLIGHTED_COLOR); + } + { + const char* key ="OPTIONMENU::CONTEXTUAL_POPUP_ARROW_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _OPTIONMENU::CONTEXTUAL_POPUP_ARROW_NORMAL_COLOR); + } + { + const char* key ="OPTIONMENU::CONTEXTUAL_POPUP_ARROW_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _OPTIONMENU::CONTEXTUAL_POPUP_ARROW_PRESSED_COLOR); + } + { + const char* key ="OPTIONMENU::CONTEXTUAL_POPUP_ARROW_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _OPTIONMENU::CONTEXTUAL_POPUP_ARROW_DISABLED_COLOR); + } + { + const char* key ="OPTIONMENU::CONTEXTUAL_POPUP_ARROW_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _OPTIONMENU::CONTEXTUAL_POPUP_ARROW_HIGHLIGHTED_COLOR); + } + { + const char* key ="OPTIONMENU::LIST_ITEM_DIVIDER_01_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _OPTIONMENU::LIST_ITEM_DIVIDER_01_NORMAL_COLOR); + } + { + const char* key ="OPTIONMENU::LIST_ITEM_DIVIDER_02_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _OPTIONMENU::LIST_ITEM_DIVIDER_02_NORMAL_COLOR); + } + { + const char* key ="PANEL::GROUPED_STYLE_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _PANEL::GROUPED_STYLE_BG_NORMAL_COLOR); + } + { + const char* key ="PANEL::GROUPED_STYLE_BG_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _PANEL::GROUPED_STYLE_BG_PRESSED_COLOR); + } + { + const char* key ="POPUP::BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _POPUP::BG_NORMAL_COLOR); + } + { + const char* key ="POPUP::TITLE_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _POPUP::TITLE_TEXT_NORMAL_COLOR); + } + { + const char* key ="POPUP::TITLE_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _POPUP::TITLE_BG_NORMAL_COLOR); + } + { + const char* key ="PROGRESS::BAR_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _PROGRESS::BAR_BG_NORMAL_COLOR); + } + { + const char* key ="PROGRESS::BAR_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _PROGRESS::BAR_NORMAL_COLOR); + } + { + const char* key ="SCROLL::THUMB_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _SCROLL::THUMB_BG_NORMAL_COLOR); + } + { + const char* key ="SCROLL::JUMP_TO_TOP_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _SCROLL::JUMP_TO_TOP_NORMAL_COLOR); + } + { + const char* key ="SCROLL::JUMP_TO_TOP_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _SCROLL::JUMP_TO_TOP_PRESSED_COLOR); + } + { + const char* key ="SCROLL::BUTTON_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _SCROLL::BUTTON_BG_NORMAL_COLOR); + } + { + const char* key ="SCROLL::BUTTON_BG_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _SCROLL::BUTTON_BG_PRESSED_COLOR); + } + { + const char* key ="SEARCHBAR::BUTTON_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _SEARCHBAR::BUTTON_BG_NORMAL_COLOR); + } + { + const char* key ="SEARCHBAR::BUTTON_BG_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _SEARCHBAR::BUTTON_BG_PRESSED_COLOR); + } + { + const char* key ="SEARCHBAR::BUTTON_BG_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _SEARCHBAR::BUTTON_BG_DISABLED_COLOR); + } + { + const char* key ="SEARCHBAR::BUTTON_BG_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _SEARCHBAR::BUTTON_BG_HIGHLIGHTED_COLOR); + } + { + const char* key ="SEARCHBAR::BUTTON_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _SEARCHBAR::BUTTON_TEXT_NORMAL_COLOR); + } + { + const char* key ="SEARCHBAR::BUTTON_TEXT_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _SEARCHBAR::BUTTON_TEXT_PRESSED_COLOR); + } + { + const char* key ="SEARCHBAR::BUTTON_TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _SEARCHBAR::BUTTON_TEXT_DISABLED_COLOR); + } + { + const char* key ="SEARCHBAR::BUTTON_TEXT_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _SEARCHBAR::BUTTON_TEXT_HIGHLIGHTED_COLOR); + } + { + const char* key ="SEARCHBAR::EDIT_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _SEARCHBAR::EDIT_BG_NORMAL_COLOR); + } + { + const char* key ="SEARCHBAR::EDIT_BG_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _SEARCHBAR::EDIT_BG_DISABLED_COLOR); + } + { + const char* key ="SEARCHBAR::EDIT_BG_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _SEARCHBAR::EDIT_BG_PRESSED_COLOR); + } + { + const char* key ="SEARCHBAR::EDIT_BG_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _SEARCHBAR::EDIT_BG_HIGHLIGHTED_COLOR); + } + { + const char* key ="SEARCHBAR::GUIDE_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _SEARCHBAR::GUIDE_TEXT_NORMAL_COLOR); + } + { + const char* key ="SEARCHBAR::GUIDE_TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _SEARCHBAR::GUIDE_TEXT_DISABLED_COLOR); + } + { + const char* key ="SEARCHBAR::ICON_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _SEARCHBAR::ICON_BG_NORMAL_COLOR); + } + { + const char* key ="SEARCHBAR::ICON_BG_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _SEARCHBAR::ICON_BG_DISABLED_COLOR); + } + { + const char* key ="SEARCHBAR::EDIT_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _SEARCHBAR::EDIT_TEXT_NORMAL_COLOR); + } + { + const char* key ="SEARCHBAR::EDIT_TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _SEARCHBAR::EDIT_TEXT_DISABLED_COLOR); + } + { + const char* key ="SEARCHBAR::EDIT_TEXT_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _SEARCHBAR::EDIT_TEXT_HIGHLIGHTED_COLOR); + } + { + const char* key ="SEARCHBAR::EDIT_TEXT_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _SEARCHBAR::EDIT_TEXT_PRESSED_COLOR); + } + { + const char* key ="SEARCHBAR::CONTENT_AREA_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _SEARCHBAR::CONTENT_AREA_BG_NORMAL_COLOR); + } + { + const char* key ="SEARCHBAR::BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _SEARCHBAR::BG_NORMAL_COLOR); + } + { + const char* key ="SLIDER::BG_OTHERS_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _SLIDER::BG_OTHERS_NORMAL_COLOR); + } + { + const char* key ="SLIDER::BG_DEFAULT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _SLIDER::BG_DEFAULT_NORMAL_COLOR); + } + { + const char* key ="SLIDER::BAR_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _SLIDER::BAR_BG_NORMAL_COLOR); + } + { + const char* key ="SLIDER::BAR_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _SLIDER::BAR_NORMAL_COLOR); + } + { + const char* key ="SLIDER::HANDLE_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _SLIDER::HANDLE_BG_NORMAL_COLOR); + } + { + const char* key ="SLIDER::HANDLE_BG_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _SLIDER::HANDLE_BG_PRESSED_COLOR); + } + { + const char* key ="SLIDER::HANDLE_BG_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _SLIDER::HANDLE_BG_DISABLED_COLOR); + } + { + const char* key ="SLIDER::HANDLE_BG_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _SLIDER::HANDLE_BG_HIGHLIGHTED_COLOR); + } + { + const char* key ="SLIDER::HANDLE_NUMBER_TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _SLIDER::HANDLE_NUMBER_TEXT_DISABLED_COLOR); + } + { + const char* key ="SLIDER::HANDLE_NUMBER_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _SLIDER::HANDLE_NUMBER_TEXT_NORMAL_COLOR); + } + { + const char* key ="SLIDER::HANDLE_NUMBER_TEXT_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _SLIDER::HANDLE_NUMBER_TEXT_PRESSED_COLOR); + } + { + const char* key ="SLIDER::HANDLE_NUMBER_TEXT_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _SLIDER::HANDLE_NUMBER_TEXT_HIGHLIGHTED_COLOR); + } + { + const char* key ="SLIDER::TITLE_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _SLIDER::TITLE_TEXT_NORMAL_COLOR); + } + { + const char* key ="SLIDER::OVERLAY_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _SLIDER::OVERLAY_BG_NORMAL_COLOR); + } + { + const char* key ="SLIDER::OVERLAY_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _SLIDER::OVERLAY_TEXT_NORMAL_COLOR); + } + { + const char* key ="SPLITPANEL::DIVIDER_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _SPLITPANEL::DIVIDER_BG_NORMAL_COLOR); + } + { + const char* key ="SPLITPANEL::DIVIDER_BG_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _SPLITPANEL::DIVIDER_BG_PRESSED_COLOR); + } + { + const char* key ="SPLITPANEL::DIVIDER_BG_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _SPLITPANEL::DIVIDER_BG_DISABLED_COLOR); + } + { + const char* key ="TABBAR::BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _TABBAR::BG_NORMAL_COLOR); + } + { + const char* key ="TABBAR::ITEM_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _TABBAR::ITEM_BG_NORMAL_COLOR); + } + { + const char* key ="TABBAR::ITEM_BG_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _TABBAR::ITEM_BG_PRESSED_COLOR); + } + { + const char* key ="TABBAR::ITEM_BG_SELECTED"; + __pColorKeyTable->Add(ResourceKey(key), _TABBAR::ITEM_BG_SELECTED_COLOR); + } + { + const char* key ="TABBAR::ITEM_BG_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _TABBAR::ITEM_BG_DISABLED_COLOR); + } + { + const char* key ="TABBAR::ITEM_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _TABBAR::ITEM_TEXT_NORMAL_COLOR); + } + { + const char* key ="TABBAR::ITEM_TEXT_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _TABBAR::ITEM_TEXT_PRESSED_COLOR); + } + { + const char* key ="TABBAR::ITEM_TEXT_SELECTED"; + __pColorKeyTable->Add(ResourceKey(key), _TABBAR::ITEM_TEXT_SELECTED_COLOR); + } + { + const char* key ="TABBAR::ITEM_TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _TABBAR::ITEM_TEXT_DISABLED_COLOR); + } + { + const char* key ="TABBAR::ARROW_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _TABBAR::ARROW_BG_NORMAL_COLOR); + } + { + const char* key ="TAB::ITEM_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _TAB::ITEM_BG_NORMAL_COLOR); + } + { + const char* key ="TAB::ITEM_BG_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _TAB::ITEM_BG_PRESSED_COLOR); + } + { + const char* key ="TAB::ITEM_BG_SELECTED"; + __pColorKeyTable->Add(ResourceKey(key), _TAB::ITEM_BG_SELECTED_COLOR); + } + { + const char* key ="TAB::ITEM_BG_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _TAB::ITEM_BG_HIGHLIGHTED_COLOR); + } + { + const char* key ="TAB::ITEM_BG_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _TAB::ITEM_BG_DISABLED_COLOR); + } + { + const char* key ="TAB::ITEM_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _TAB::ITEM_TEXT_NORMAL_COLOR); + } + { + const char* key ="TAB::ITEM_TEXT_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _TAB::ITEM_TEXT_PRESSED_COLOR); + } + { + const char* key ="TAB::ITEM_TEXT_SELECTED"; + __pColorKeyTable->Add(ResourceKey(key), _TAB::ITEM_TEXT_SELECTED_COLOR); + } + { + const char* key ="TAB::ITEM_TEXT_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _TAB::ITEM_TEXT_HIGHLIGHTED_COLOR); + } + { + const char* key ="TAB::ITEM_TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _TAB::ITEM_TEXT_DISABLED_COLOR); + } + { + const char* key ="TAB::DIVIDER_LEFT_HALF"; + __pColorKeyTable->Add(ResourceKey(key), _TAB::DIVIDER_LEFT_HALF_COLOR); + } + { + const char* key ="TAB::DIVIDER_RIGHT_HALF"; + __pColorKeyTable->Add(ResourceKey(key), _TAB::DIVIDER_RIGHT_HALF_COLOR); + } + { + const char* key ="TABLEVIEW::BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _TABLEVIEW::BG_NORMAL_COLOR); + } + { + const char* key ="TABLEVIEW::ITEM_DIVIDER_TOP_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _TABLEVIEW::ITEM_DIVIDER_TOP_BG_NORMAL_COLOR); + } + { + const char* key ="TABLEVIEW::ITEM_DIVIDER_BOTTOM_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _TABLEVIEW::ITEM_DIVIDER_BOTTOM_BG_NORMAL_COLOR); + } + { + const char* key ="TABLEVIEW::ITEM_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _TABLEVIEW::ITEM_BG_NORMAL_COLOR); + } + { + const char* key ="TABLEVIEW::ITEM_BG_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _TABLEVIEW::ITEM_BG_PRESSED_COLOR); + } + { + const char* key ="TABLEVIEW::ITEM_BG_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _TABLEVIEW::ITEM_BG_HIGHLIGHTED_COLOR); + } + { + const char* key ="TABLEVIEW::ITEM_BG_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _TABLEVIEW::ITEM_BG_DISABLED_COLOR); + } + { + const char* key ="TABLEVIEW::ITEM_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _TABLEVIEW::ITEM_TEXT_NORMAL_COLOR); + } + { + const char* key ="TABLEVIEW::ITEM_TEXT_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _TABLEVIEW::ITEM_TEXT_PRESSED_COLOR); + } + { + const char* key ="TABLEVIEW::ITEM_TEXT_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _TABLEVIEW::ITEM_TEXT_HIGHLIGHTED_COLOR); + } + { + const char* key ="TABLEVIEW::ITEM_TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _TABLEVIEW::ITEM_TEXT_DISABLED_COLOR); + } + { + const char* key ="TABLEVIEW::ITEM_DESCRIPTION_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _TABLEVIEW::ITEM_DESCRIPTION_TEXT_NORMAL_COLOR); + } + { + const char* key ="TABLEVIEW::ITEM_ANNEX_CANVAS_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _TABLEVIEW::ITEM_ANNEX_CANVAS_BG_NORMAL_COLOR); + } + { + const char* key ="TABLEVIEW::ITEM_ANNEX_DETAIL_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _TABLEVIEW::ITEM_ANNEX_DETAIL_NORMAL_COLOR); + } + { + const char* key ="TABLEVIEW::ITEM_ANNEX_DETAIL_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _TABLEVIEW::ITEM_ANNEX_DETAIL_PRESSED_COLOR); + } + { + const char* key ="TABLEVIEW::ITEM_ANNEX_DETAIL_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _TABLEVIEW::ITEM_ANNEX_DETAIL_HIGHLIGHTED_COLOR); + } + { + const char* key ="TABLEVIEW::ITEM_ANNEX_DETAIL_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _TABLEVIEW::ITEM_ANNEX_DETAIL_BG_NORMAL_COLOR); + } + { + const char* key ="TABLEVIEW::ITEM_ANNEX_DETAIL_BG_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _TABLEVIEW::ITEM_ANNEX_DETAIL_BG_PRESSED_COLOR); + } + { + const char* key ="TABLEVIEW::ITEM_ANNEX_DETAIL_BG_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _TABLEVIEW::ITEM_ANNEX_DETAIL_BG_HIGHLIGHTED_COLOR); + } + { + const char* key ="TABLEVIEW::GROUPITEM_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _TABLEVIEW::GROUPITEM_BG_NORMAL_COLOR); + } + { + const char* key ="TABLEVIEW::GROUPITEM_BG_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _TABLEVIEW::GROUPITEM_BG_PRESSED_COLOR); + } + { + const char* key ="TABLEVIEW::GROUPITEM_BG_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _TABLEVIEW::GROUPITEM_BG_HIGHLIGHTED_COLOR); + } + { + const char* key ="TABLEVIEW::GROUPITEM_BG_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _TABLEVIEW::GROUPITEM_BG_DISABLED_COLOR); + } + { + const char* key ="TABLEVIEW::GROUPITEM_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _TABLEVIEW::GROUPITEM_TEXT_NORMAL_COLOR); + } + { + const char* key ="TABLEVIEW::GROUPITEM_TEXT_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _TABLEVIEW::GROUPITEM_TEXT_PRESSED_COLOR); + } + { + const char* key ="TABLEVIEW::GROUPITEM_TEXT_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _TABLEVIEW::GROUPITEM_TEXT_HIGHLIGHTED_COLOR); + } + { + const char* key ="TABLEVIEW::GROUPITEM_TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _TABLEVIEW::GROUPITEM_TEXT_DISABLED_COLOR); + } + { + const char* key ="TABLEVIEW::GROUPITEM_INDEX_BAR_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _TABLEVIEW::GROUPITEM_INDEX_BAR_NORMAL_COLOR); + } + { + const char* key ="TABLEVIEW::GROUPITEM_INDEX_BAR_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _TABLEVIEW::GROUPITEM_INDEX_BAR_PRESSED_COLOR); + } + { + const char* key ="TABLEVIEW::GROUPITEM_INDEX_BAR_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _TABLEVIEW::GROUPITEM_INDEX_BAR_HIGHLIGHTED_COLOR); + } + { + const char* key ="TABLEVIEW::GROUPITEM_INDEX_BAR_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _TABLEVIEW::GROUPITEM_INDEX_BAR_DISABLED_COLOR); + } + { + const char* key ="TABLEVIEW::GROUPITEM_BAR_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _TABLEVIEW::GROUPITEM_BAR_NORMAL_COLOR); + } + { + const char* key ="TABLEVIEW::GROUPITEM_BAR_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _TABLEVIEW::GROUPITEM_BAR_PRESSED_COLOR); + } + { + const char* key ="TABLEVIEW::GROUPITEM_BAR_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _TABLEVIEW::GROUPITEM_BAR_HIGHLIGHTED_COLOR); + } + { + const char* key ="TABLEVIEW::GROUPITEM_BAR_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _TABLEVIEW::GROUPITEM_BAR_DISABLED_COLOR); + } + { + const char* key ="TABLEVIEW::SECTIONITEM_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _TABLEVIEW::SECTIONITEM_BG_NORMAL_COLOR); + } + { + const char* key ="TABLEVIEW::CONTEXTITEM_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _TABLEVIEW::CONTEXTITEM_BG_NORMAL_COLOR); + } + { + const char* key ="TABLEVIEW::EMPTY_CONTENTS_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _TABLEVIEW::EMPTY_CONTENTS_TEXT_NORMAL_COLOR); + } + { + const char* key ="TABLEVIEW::ITEM_ANNEX_DIVIDER_LEFT_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _TABLEVIEW::ITEM_ANNEX_DIVIDER_LEFT_BG_NORMAL_COLOR); + } + { + const char* key ="TABLEVIEW::ITEM_ANNEX_DIVIDER_RIGHT_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _TABLEVIEW::ITEM_ANNEX_DIVIDER_RIGHT_BG_NORMAL_COLOR); + } + { + const char* key ="TOKENEDIT::BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::BG_NORMAL_COLOR); + } + { + const char* key ="TOKENEDIT::BG_SELECTED"; + __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::BG_SELECTED_COLOR); + } + { + const char* key ="TOKENEDIT::BG_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::BG_HIGHLIGHTED_COLOR); + } + { + const char* key ="TOKENEDIT::BG_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::BG_DISABLED_COLOR); + } + { + const char* key ="TOKENEDIT::TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::TEXT_NORMAL_COLOR); + } + { + const char* key ="TOKENEDIT::TEXT_SELECTED"; + __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::TEXT_SELECTED_COLOR); + } + { + const char* key ="TOKENEDIT::TEXT_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::TEXT_HIGHLIGHTED_COLOR); + } + { + const char* key ="TOKENEDIT::TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::TEXT_DISABLED_COLOR); + } + { + const char* key ="TOKENEDIT::TITLE_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::TITLE_TEXT_NORMAL_COLOR); + } + { + const char* key ="TOKENEDIT::TITLE_TEXT_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::TITLE_TEXT_PRESSED_COLOR); + } + { + const char* key ="TOKENEDIT::TITLE_TEXT_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::TITLE_TEXT_HIGHLIGHTED_COLOR); + } + { + const char* key ="TOKENEDIT::TITLE_TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::TITLE_TEXT_DISABLED_COLOR); + } + { + const char* key ="TOKENEDIT::EDIT_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::EDIT_BG_NORMAL_COLOR); + } + { + const char* key ="TOKENEDIT::EDIT_BG_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::EDIT_BG_PRESSED_COLOR); + } + { + const char* key ="TOKENEDIT::EDIT_BG_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::EDIT_BG_HIGHLIGHTED_COLOR); + } + { + const char* key ="TOKENEDIT::EDIT_BG_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::EDIT_BG_DISABLED_COLOR); + } + { + const char* key ="TOKENEDIT::EDIT_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::EDIT_TEXT_NORMAL_COLOR); + } + { + const char* key ="TOKENEDIT::EDIT_TEXT_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::EDIT_TEXT_PRESSED_COLOR); + } + { + const char* key ="TOKENEDIT::EDIT_TEXT_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::EDIT_TEXT_HIGHLIGHTED_COLOR); + } + { + const char* key ="TOKENEDIT::EDIT_TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::EDIT_TEXT_DISABLED_COLOR); + } + { + const char* key ="TOKENEDIT::GUIDE_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::GUIDE_TEXT_NORMAL_COLOR); + } + { + const char* key ="EXPANDABLEEDITAREA::BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::BG_NORMAL_COLOR); + } + { + const char* key ="EXPANDABLEEDITAREA::BG_SELECTED"; + __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::BG_SELECTED_COLOR); + } + { + const char* key ="EXPANDABLEEDITAREA::BG_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::BG_HIGHLIGHTED_COLOR); + } + { + const char* key ="EXPANDABLEEDITAREA::BG_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::BG_DISABLED_COLOR); + } + { + const char* key ="EXPANDABLEEDITAREA::TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::TEXT_NORMAL_COLOR); + } + { + const char* key ="EXPANDABLEEDITAREA::TEXT_SELECTED"; + __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::TEXT_SELECTED_COLOR); + } + { + const char* key ="EXPANDABLEEDITAREA::TEXT_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::TEXT_HIGHLIGHTED_COLOR); + } + { + const char* key ="EXPANDABLEEDITAREA::TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::TEXT_DISABLED_COLOR); + } + { + const char* key ="EXPANDABLEEDITAREA::TITLE_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::TITLE_TEXT_NORMAL_COLOR); + } + { + const char* key ="EXPANDABLEEDITAREA::TITLE_TEXT_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::TITLE_TEXT_PRESSED_COLOR); + } + { + const char* key ="EXPANDABLEEDITAREA::TITLE_TEXT_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::TITLE_TEXT_HIGHLIGHTED_COLOR); + } + { + const char* key ="EXPANDABLEEDITAREA::TITLE_TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::TITLE_TEXT_DISABLED_COLOR); + } + { + const char* key ="EXPANDABLEEDITAREA::EDIT_BG_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::EDIT_BG_NORMAL_COLOR); + } + { + const char* key ="EXPANDABLEEDITAREA::EDIT_BG_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::EDIT_BG_PRESSED_COLOR); + } + { + const char* key ="EXPANDABLEEDITAREA::EDIT_BG_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::EDIT_BG_HIGHLIGHTED_COLOR); + } + { + const char* key ="EXPANDABLEEDITAREA::EDIT_BG_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::EDIT_BG_DISABLED_COLOR); + } + { + const char* key ="EXPANDABLEEDITAREA::EDIT_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::EDIT_TEXT_NORMAL_COLOR); + } + { + const char* key ="EXPANDABLEEDITAREA::EDIT_TEXT_PRESSED"; + __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::EDIT_TEXT_PRESSED_COLOR); + } + { + const char* key ="EXPANDABLEEDITAREA::EDIT_TEXT_HIGHLIGHTED"; + __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::EDIT_TEXT_HIGHLIGHTED_COLOR); + } + { + const char* key ="EXPANDABLEEDITAREA::EDIT_TEXT_DISABLED"; + __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::EDIT_TEXT_DISABLED_COLOR); + } + { + const char* key ="EXPANDABLEEDITAREA::GUIDE_TEXT_NORMAL"; + __pColorKeyTable->Add(ResourceKey(key), _TOKENEDIT::GUIDE_TEXT_NORMAL_COLOR); + } + } + return __pColorKeyTable; +} +}}}//Tizen::Ui diff --git a/src/ui/resource/FUi_ResourceConfigParser.h b/src/ui/resource/FUi_ResourceConfigParser.h new file mode 100644 index 0000000..4526412 --- /dev/null +++ b/src/ui/resource/FUi_ResourceConfigParser.h @@ -0,0 +1,98 @@ +// +// 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_ResourceConfigParser.h + * @brief This is the header file for ConfigParser class. + * @version 3.0 + * + * This header file contains declaration of ConfigParser class. + * + */ +#ifndef _FUI_INTERNAL_RESOURCE_CONFIG_PARSER_H_ +#define _FUI_INTERNAL_RESOURCE_CONFIG_PARSER_H_ + +#include + +namespace Tizen { namespace Base +{ + class String; +}} + +namespace Tizen { namespace Base { namespace Collection +{ + template class HashMapT; +}}} + +namespace Tizen { namespace Graphics +{ + class Color; +}} + +namespace Tizen { namespace Ui { namespace _Resource +{ +class MapContainer; +class ResourceAnimationFrameList; +class ConfigParser +{ +public: + ConfigParser(void); + ~ConfigParser(void); + bool Parse(const Tizen::Base::String& filename, MapContainer & table); + static void StartSaxFunc(void* pXmlParserCtxt, const xmlChar* pName, const xmlChar** pAttributes); + static Tizen::Base::Collection::HashMapT* GetMatchingTable(void); + + class ColorMatchingMap + : public Tizen::Base::Collection::HashMapT + { + public: + ColorMatchingMap(void); + virtual ~ColorMatchingMap(void); + bool Initialize(const Tizen::Base::String& version, const Tizen::Base::String& dVersion = L""); + private: + Tizen::Base::Collection::IHashCodeProviderT* __pProvider; + Tizen::Base::Collection::IComparerT* __pComparer; + }; + +private: + void SetInformation(const xmlChar** pAttributes); + void StartAttribute(const xmlChar** pAttributes, bool palette); + void AddColor(const xmlChar** pAttributes); + void AddImage(const xmlChar** pAttributes); + void AddAnimation(const xmlChar** pAttributes); + void AddAnimationFrame(const xmlChar** pAttributes); + void SetColorMatchingMap(const Tizen::Base::String& version); + bool ConvertStringToColor32(const char* pString, unsigned int& out); + bool GetValue(const char* pValue, unsigned int& out); + Tizen::Base::Collection::HashMapT* GetColorKeyTable(void); + Tizen::Base::Collection::HashMapT* GetImageKeyTable(void); + Tizen::Base::Collection::HashMapT* GetAnimationKeyTable(void); + + MapContainer* __pMapContainer; + char* __pCurrentAttribute; + ResourceAnimationFrameList* __pCurrentAnimationList; + bool __palette; + Tizen::Base::Collection::HashMapT* __pColorKeyTable; + Tizen::Base::Collection::HashMapT* __pImageKeyTable; + Tizen::Base::Collection::HashMapT* __pAnimationKeyTable; + Tizen::Base::Collection::IHashCodeProviderT* __pProvider; + Tizen::Base::Collection::IComparerT* __pComparer; + +}; //class ConfigParser + +}}}//Tizen::Ui + +#endif //_FUI_INTERNAL_RESOURCE_CONFIG_PARSER_H_ diff --git a/src/ui/resource/FUi_ResourceContextMenuConfig.cpp b/src/ui/resource/FUi_ResourceContextMenuConfig.cpp new file mode 100644 index 0000000..dc9db74 --- /dev/null +++ b/src/ui/resource/FUi_ResourceContextMenuConfig.cpp @@ -0,0 +1,125 @@ +// +// 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_ResourceContextMenuConfig.cpp + * @brief This is the implementation file for the color and shape properties of ContextMenu. + */ + +#include "FUi_ResourceContextMenuConfig.h" + +START_UI_CONFIG(CONTEXTMENU); +{ + ADD_COLOR_CONFIG(BG_NORMAL, $B061L4); + ADD_COLOR_CONFIG(LIST_ITEM_DIVIDER_01_NORMAL, $B0622L1); + ADD_COLOR_CONFIG(LIST_ITEM_DIVIDER_02_NORMAL, $B0622L2); + ADD_COLOR_CONFIG(ITEM_BG_NORMAL, $B061L4); + ADD_COLOR_CONFIG(ITEM_BG_PRESSED, $B044); + ADD_COLOR_CONFIG(ITEM_BG_HIGHLIGHTED, $B044); + ADD_COLOR_CONFIG(ITEM_BG_DISABLED, $B061L4); + ADD_COLOR_CONFIG(GRID_ITEM_DIVIDER_01_NORMAL, $B0623L1); + ADD_COLOR_CONFIG(GRID_ITEM_DIVIDER_02_NORMAL, $B0623L2); + ADD_COLOR_CONFIG(ITEM_TEXT_NORMAL, $B063L5); + ADD_COLOR_CONFIG(ITEM_TEXT_PRESSED, $B063L5); + ADD_COLOR_CONFIG(ITEM_TEXT_HIGHLIGHTED, $B063L5); + ADD_COLOR_CONFIG(ITEM_TEXT_DISABLED, $B063L5D); + + ADD_IMAGE_CONFIG(BG_NORMAL, #00_popup_bubble_bg.#.png); + ADD_IMAGE_CONFIG(BG_OUTLINE_EFFECT_NORMAL, #00_popup_bubble_bg_ef.#.png); + + ADD_IMAGE_CONFIG(ANCHOR_NORMAL_UP, #00_popup_bubble_tail_bottom.png); + ADD_IMAGE_CONFIG(ANCHOR_NORMAL_DOWN, #00_popup_bubble_tail_top.png); + ADD_IMAGE_CONFIG(ANCHOR_NORMAL_LEFT, #00_popup_bubble_tail_right.png); + ADD_IMAGE_CONFIG(ANCHOR_NORMAL_RIGHT, #00_popup_bubble_tail_left.png); + ADD_IMAGE_CONFIG(ANCHOR_EFFECT_UP, #00_popup_bubble_tail_bottom_ef.png); + ADD_IMAGE_CONFIG(ANCHOR_EFFECT_DOWN, #00_popup_bubble_tail_top_ef.png); + ADD_IMAGE_CONFIG(ANCHOR_EFFECT_LEFT, #00_popup_bubble_tail_right_ef.png); + ADD_IMAGE_CONFIG(ANCHOR_EFFECT_RIGHT, #00_popup_bubble_tail_left_ef.png); + + ADD_IMAGE_CONFIG(ITEM_BG_PRESSED, #00_more_popup_press.#.png); + + START_UI_CONFIG_MODE(480x800); + ADD_SHAPE_CONFIG(ITEM_MAX_COUNT, 7); + END_UI_CONFIG_MODE(480x800); + + START_UI_CONFIG_MODE(800x480); + ADD_SHAPE_CONFIG(ITEM_MAX_COUNT, 5); + END_UI_CONFIG_MODE(800x480); + + START_UI_CONFIG_MODE(720x1280); + ADD_SHAPE_CONFIG(ITEM_MAX_COUNT, 7); + ADD_SHAPE_CONFIG(LIST_ITEM_FONT_SIZE, 40); + ADD_SHAPE_CONFIG(GRID_ITEM_FONT_SIZE, 32); + + ADD_SHAPE_CONFIG(LIST_ITEM_HEIGHT, 112); + ADD_SHAPE_CONFIG(LIST_MIN_WIDTH, 386); + ADD_SHAPE_CONFIG(LIST_MAX_WIDTH, 620); + ADD_SHAPE_CONFIG(LIST_TOP_MARGIN, 14); + ADD_SHAPE_CONFIG(LIST_BOTTOM_MARGIN, 14); + ADD_SHAPE_CONFIG(LIST_LEFT_MARGIN, 14); + ADD_SHAPE_CONFIG(LIST_RIGHT_MARGIN, 14); + + ADD_SHAPE_CONFIG(LIST_ICON_WIDTH, 45); + ADD_SHAPE_CONFIG(LIST_ICON_HEIGHT, 45); + ADD_SHAPE_CONFIG(LIST_TEXT_WIDTH, 266); + ADD_SHAPE_CONFIG(LIST_TEXT_HEIGHT, 64); + ADD_SHAPE_CONFIG(LIST_ITEM_GAP, 16); + ADD_SHAPE_CONFIG(LIST_DIVIDER_HEIGHT, 1); + + ADD_SHAPE_CONFIG(GRID_MAX_WIDTH, 648); + ADD_SHAPE_CONFIG(GRID_MIN_WIDTH, 112); + ADD_SHAPE_CONFIG(GRID_ITEM_WIDTH, 128); + ADD_SHAPE_CONFIG(GRID_ITEM_HEIGHT, 96); + ADD_SHAPE_CONFIG(GRID_ITEM_MAX_WIDTH, 324); + ADD_SHAPE_CONFIG(GRID_TEXT_MARGIN, 16); + ADD_SHAPE_CONFIG(GRID_DIVIDER_HEIGHT, 74); + ADD_SHAPE_CONFIG(GRID_TOP_MARGIN, 14); + ADD_SHAPE_CONFIG(GRID_BOTTOM_MARGIN, 14); + ADD_SHAPE_CONFIG(GRID_LEFT_MARGIN, 14); + ADD_SHAPE_CONFIG(GRID_RIGHT_MARGIN, 14); + ADD_SHAPE_CONFIG(GRID_ICON_WIDTH, 45); + ADD_SHAPE_CONFIG(GRID_ICON_HEIGHT, 45); + + ADD_FIXED_VALUE_CONFIG(GRID_ITEM_GAP, 2); + + ADD_SHAPE_CONFIG(SCREEN_TOP_MARGIN, 0); + ADD_SHAPE_CONFIG(SCREEN_BOTTOM_MARGIN, 0); + ADD_SHAPE_CONFIG(SCREEN_LEFT_MARGIN, 0); + ADD_SHAPE_CONFIG(SCREEN_RIGHT_MARGIN, 0); + + ADD_SHAPE_CONFIG(ANCHOR_WIDTH, 35); + ADD_SHAPE_CONFIG(ANCHOR_HEIGHT, 35); + ADD_SHAPE_CONFIG(ANCHOR_MARGIN, 15); + ADD_SHAPE_CONFIG(ANCHOR_TOP_MARGIN, 16); + ADD_SHAPE_CONFIG(ANCHOR_LEFT_MARGIN, 16); + ADD_SHAPE_CONFIG(ANCHOR_RIGHT_MARGIN, 16); + ADD_SHAPE_CONFIG(ANCHOR_BOTTOM_MARGIN, 16); + + ADD_SHAPE_CONFIG(APPEARING_ANIMATION_DISTANCE_X, 40); + ADD_SHAPE_CONFIG(APPEARING_ANIMATION_DISTANCE_Y, 40); + ADD_SHAPE_CONFIG(ITEM_BG_PRESSED_MARGIN, 4); + ADD_SHAPE_CONFIG(ANCHOR_POPUP_OVERLAP, 1); + + ADD_SHAPE_CONFIG(LIST_TEXT_GAP, 20); + ADD_SHAPE_CONFIG(SCROLL_PANEL_MARGIN, 4); + END_UI_CONFIG_MODE(720x1280); + + START_UI_CONFIG_MODE(1280x720); + ADD_SHAPE_CONFIG(ITEM_MAX_COUNT, 5); + ADD_SHAPE_CONFIG(GRID_MAX_WIDTH, 1152); + END_UI_CONFIG_MODE(1280x720); +} +END_UI_CONFIG(CONTEXTMENU); diff --git a/src/ui/resource/FUi_ResourceDateTimeBarConfig.cpp b/src/ui/resource/FUi_ResourceDateTimeBarConfig.cpp new file mode 100644 index 0000000..23786049 --- /dev/null +++ b/src/ui/resource/FUi_ResourceDateTimeBarConfig.cpp @@ -0,0 +1,73 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUi_ResourceDateTimeBarConfig.cpp + * @brief This is the implementation file for the color and shape config of DateTimeBar class. + */ + +#include "FUi_ResourceDateTimeBarConfig.h" + +START_UI_CONFIG(DATETIMEBAR); +{ + ADD_COLOR_CONFIG(BG_NORMAL, $W0811); + ADD_COLOR_CONFIG(TEXT_NORMAL, $W084); + ADD_COLOR_CONFIG(TEXT_PRESSED, $W084P); + + ADD_IMAGE_CONFIG(TIMEPICKERBAR_BG_NORMAL, #00_time_picker_number_bg.#.png); + ADD_IMAGE_CONFIG(TAIL_DOWN, #00_time_picker_tail.png); + ADD_IMAGE_CONFIG(TAIL_UP, #00_time_picker_tail_01.png); + + START_UI_CONFIG_MODE(800x480); + { + ADD_DIMENSION_CONFIG(DEFAULT_SIZE, _SCREEN_HEIGHT_, 102); + } + END_UI_CONFIG_MODE(800x480); + + START_UI_CONFIG_MODE(720x1280); + { + ADD_SHAPE_CONFIG(DAY_ITEM_WIDTH, 98); + ADD_SHAPE_CONFIG(MONTH_ITEM_WIDTH, 115); + ADD_SHAPE_CONFIG(YEAR_ITEM_WIDTH, 120); + ADD_SHAPE_CONFIG(ITEM_HEIGHT, 102); + + ADD_SHAPE_CONFIG(DAY_ITEM_MARGIN, 0); + ADD_SHAPE_CONFIG(MONTH_ITEM_MARGIN, 0); + ADD_SHAPE_CONFIG(YEAR_ITEM_MARGIN, 22); + + ADD_SHAPE_CONFIG(DAY_LEFT_RIGHT_MARGIN, 17); + ADD_SHAPE_CONFIG(MONTH_LEFT_RIGHT_MARGIN, 15); + ADD_SHAPE_CONFIG(YEAR_LEFT_RIGHT_MARGIN, 16); + + ADD_SHAPE_CONFIG(ARROW_WIDTH, 27); + ADD_SHAPE_CONFIG(ARROW_HEIGHT, 18); + + ADD_SHAPE_CONFIG(DAY_FONT_SIZE, 48); + ADD_SHAPE_CONFIG(MONTH_FONT_SIZE, 38); + ADD_SHAPE_CONFIG(YEAR_FONT_SIZE, 42); + + ADD_DIMENSION_CONFIG(DEFAULT_SIZE, 720, 102); + } + END_UI_CONFIG_MODE(720x1280); + + START_UI_CONFIG_MODE(1280x720); + { + ADD_DIMENSION_CONFIG(DEFAULT_SIZE, _SCREEN_HEIGHT_, 102); + } + END_UI_CONFIG_MODE(1280x720); +} +END_UI_CONFIG(DATETIMEBAR); diff --git a/src/ui/resource/FUi_ResourceDateTimePickerConfig.cpp b/src/ui/resource/FUi_ResourceDateTimePickerConfig.cpp new file mode 100644 index 0000000..8370a2c --- /dev/null +++ b/src/ui/resource/FUi_ResourceDateTimePickerConfig.cpp @@ -0,0 +1,144 @@ +// +// 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_ResourceDateTimePickerConfig.cpp + * @brief This is a configuration file for color, image and shape values of DateTimePicker. + */ + +#include "FUi_ResourceDateTimePickerConfig.h" + +START_UI_CONFIG(DATETIMEPICKER); +{ + ADD_COLOR_CONFIG(BG_NORMAL, $B011); + ADD_COLOR_CONFIG(DISPLAY_BG_NORMAL, $B0217); + + ADD_COLOR_CONFIG(AMPM_BG_NORMAL, $W011); + ADD_COLOR_CONFIG(AMPM_BG_PRESSED, $B042); + ADD_COLOR_CONFIG(AMPM_BG_HIGHLIGHTED, $W161); + ADD_COLOR_CONFIG(AMPM_BG_DISABLED, $W011D); + + ADD_COLOR_CONFIG(TEXT_NORMAL, $F011L1); + ADD_COLOR_CONFIG(TEXT_PRESSED, $F011L2); + ADD_COLOR_CONFIG(TEXT_HIGHLIGHTED, $F011L2); + ADD_COLOR_CONFIG(TEXT_DISABLED, $F011L1D); + + ADD_COLOR_CONFIG(AMPM_TEXT_NORMAL, $F031L1); + ADD_COLOR_CONFIG(AMPM_TEXT_PRESSED, $F031L1P); + ADD_COLOR_CONFIG(AMPM_TEXT_HIGHLIGHTED, $F031L1); + ADD_COLOR_CONFIG(AMPM_TEXT_DISABLED, $F031L1D); + + ADD_COLOR_CONFIG(DIVIDER_LEFT_HALF, $B0224); + ADD_COLOR_CONFIG(DIVIDER_RIGHT_HALF, $B0222); + + ADD_COLOR_CONFIG(TITLE_NORMAL, $B052L5); + ADD_COLOR_CONFIG(TITLE_DISABLED, $B052L5); + + ADD_COLOR_CONFIG(CONTENT_BG_NORMAL, $W011); + ADD_COLOR_CONFIG(CONTENT_BG_PRESSED, $B042); + ADD_COLOR_CONFIG(CONTENT_BG_DISABLED, $W011); + ADD_COLOR_CONFIG(CONTENT_BG_HIGHLIGHTED, $W161); + + ADD_IMAGE_CONFIG(AMPM_BG_NORMAL, #00_button_01.#.png); + ADD_IMAGE_CONFIG(AMPM_BG_PRESSED, #00_button_01.#.png); + ADD_IMAGE_CONFIG(AMPM_BG_HIGHLIGHTED, #00_button_01_focus.#.png); + ADD_IMAGE_CONFIG(AMPM_BG_DISABLED, #00_button_01.#.png); + + ADD_IMAGE_CONFIG(AMPM_BG_EFFECT_NORMAL, #00_button_01_ef.#.png); + ADD_IMAGE_CONFIG(AMPM_BG_EFFECT_PRESSED, #00_button_01_press_ef.#.png); + ADD_IMAGE_CONFIG(AMPM_BG_EFFECT_HIGHLIGHTED, #00_button_01_ef.#.png); + ADD_IMAGE_CONFIG(AMPM_BG_EFFECT_DISABLED, #00_button_01_dim_ef.#.png); + + ADD_IMAGE_CONFIG(COLON_BG_NORMAL, #00_date_picker_dot.png); + ADD_IMAGE_CONFIG(BG_NORMAL, #00_list_group_bg.#.png); + ADD_IMAGE_CONFIG(BG_EFFECT, #00_list_group_bg_ef.#.png); + + ADD_IMAGE_CONFIG(CONTENT_BG_NORMAL, #00_picker_button.#.png); + ADD_IMAGE_CONFIG(CONTENT_BG_PRESSED, #00_picker_button.#.png); + ADD_IMAGE_CONFIG(CONTENT_BG_HIGHLIGHTED, #00_picker_button.#.png); + ADD_IMAGE_CONFIG(CONTENT_BG_DISABLED, #00_picker_button.#.png); + + ADD_IMAGE_CONFIG(CONTENT_BG_EFFECT_NORMAL, #00_picker_button_ef.#.png); + ADD_IMAGE_CONFIG(CONTENT_BG_EFFECT_PRESSED, #00_picker_button_press_ef.#.png); + ADD_IMAGE_CONFIG(CONTENT_BG_EFFECT_HIGHLIGHTED, #00_picker_button_focus.#.png); + ADD_IMAGE_CONFIG(CONTENT_BG_EFFECT_DISABLED, #00_picker_button_dim_ef.#.png); + + START_UI_CONFIG_MODE(720x1280); + { + ADD_SHAPE_CONFIG(FOOTER_HEIGHT, 98); + ADD_SHAPE_CONFIG(INPUTPAD_HEIGHT, 484); + ADD_SHAPE_CONFIG(OUTPUT_AREA_HEIGHT, 112); + + ADD_SHAPE_CONFIG(DATETIME_DISPLAY_BOX_HEIGHT, 48); + ADD_SHAPE_CONFIG(AMPM_DISPLAY_BOX_HEIGHT, 60); + + ADD_SHAPE_CONFIG(TOP_MARGIN, 32); + ADD_SHAPE_CONFIG(LEFT_MARGIN, 16); + + ADD_SHAPE_CONFIG(TITLE_TOP_MARGIN, 8); + ADD_SHAPE_CONFIG(TITLE_LEFT_MARGIN, 20); + ADD_SHAPE_CONFIG(TITLE_BOTTOM_MARGIN, 6); + ADD_SHAPE_CONFIG(TITLE_HEIGHT, 36); + + ADD_SHAPE_CONFIG(DATE_ELEMENT_WIDTH, 69); + ADD_SHAPE_CONFIG(MONTH_ELEMENT_WIDTH, 104); + ADD_SHAPE_CONFIG(YEAR_ELEMENT_WIDTH, 104); + + ADD_SHAPE_CONFIG(TIME_ELEMENT_WIDTH, 69); + + ADD_SHAPE_CONFIG(AMPM_WIDTH, 95); + ADD_SHAPE_CONFIG(COLON_WIDTH, 10); + + ADD_SHAPE_CONFIG(DATE_ELEMENT_GAP_WIDTH, 22); + ADD_SHAPE_CONFIG(TIME_AMPM_MARGIN, 22); + + ADD_SHAPE_CONFIG(COLON_MARGIN, 6); + ADD_SHAPE_CONFIG(DIVIDER_MARGIN, 17); + + ADD_FIXED_VALUE_CONFIG(DIVIDER_WIDTH, 2); + ADD_SHAPE_CONFIG(DIVIDER_HEIGHT, 42); + + ADD_SHAPE_CONFIG(DATETIME_OUTPUT_LEFT_MARGIN, 27); + ADD_SHAPE_CONFIG(TIME_OUTPUT_MARGIN, 27); + + ADD_SHAPE_CONFIG(FONT_SIZE, 36); + ADD_SHAPE_CONFIG(TITLE_FONT_SIZE, 32); + } + END_UI_CONFIG_MODE(720x1280); + + START_UI_CONFIG_MODE(1280x720); + { + ADD_SHAPE_CONFIG(DATETIME_DISPLAY_BOX_HEIGHT, 48); + + ADD_SHAPE_CONFIG(TOP_MARGIN, 52); + + ADD_SHAPE_CONFIG(FOOTER_HEIGHT, 85); + ADD_SHAPE_CONFIG(INPUTPAD_HEIGHT, 316); + + ADD_SHAPE_CONFIG(DATE_ELEMENT_WIDTH, 159); + ADD_SHAPE_CONFIG(MONTH_ELEMENT_WIDTH, 249); + ADD_SHAPE_CONFIG(YEAR_ELEMENT_WIDTH, 249); + + ADD_SHAPE_CONFIG(TIME_ELEMENT_WIDTH, 159); + ADD_SHAPE_CONFIG(AMPM_WIDTH, 95); + + ADD_SHAPE_CONFIG(DATE_ELEMENT_GAP_WIDTH, 22); + ADD_SHAPE_CONFIG(TIME_AMPM_MARGIN, 22); + } + END_UI_CONFIG_MODE(1280x720); +} +END_UI_CONFIG(DATETIMEPICKER); diff --git a/src/ui/resource/FUi_ResourceDimmingLayerConfig.cpp b/src/ui/resource/FUi_ResourceDimmingLayerConfig.cpp new file mode 100644 index 0000000..04b04b2 --- /dev/null +++ b/src/ui/resource/FUi_ResourceDimmingLayerConfig.cpp @@ -0,0 +1,26 @@ +// +// 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. +// + +#include "FUi_ResourceDimmingLayerConfig.h" + +START_UI_CONFIG(DIMMINGLAYER); +{ + ADD_IMAGE_CONFIG(BG_PORTRAIT,#00_popup_dim_lighting_v.png); + ADD_IMAGE_CONFIG(BG_LANDSCAPE,#00_popup_dim_lighting_h.png); +} +END_UI_CONFIG(DIMMINGLAYER); + diff --git a/src/ui/resource/FUi_ResourceEditConfig.cpp b/src/ui/resource/FUi_ResourceEditConfig.cpp new file mode 100644 index 0000000..fa25e06 --- /dev/null +++ b/src/ui/resource/FUi_ResourceEditConfig.cpp @@ -0,0 +1,153 @@ +// +// 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_ResourceEditConfig.cpp + * @brief This is the implementation file for the properties of Edit. + */ + +#include "FUi_ResourceEditConfig.h" + +START_UI_CONFIG(EDIT); +{ + ADD_COLOR_CONFIG(BG_NORMAL, $B0217); + ADD_COLOR_CONFIG(BG_PRESSED, $B0217); + ADD_COLOR_CONFIG(BG_HIGHLIGHTED, $B0217); + ADD_COLOR_CONFIG(BG_DISABLED, $B0217); + ADD_COLOR_CONFIG(TITLE_TEXT_NORMAL, $F011L3); + ADD_COLOR_CONFIG(TITLE_TEXT_PRESSED, $F011L3); + ADD_COLOR_CONFIG(TITLE_TEXT_HIGHLIGHTED, $F011L3); + ADD_COLOR_CONFIG(TITLE_TEXT_DISABLED, $F011L3D); + ADD_COLOR_CONFIG(TEXT_NORMAL, $F011L1); + ADD_COLOR_CONFIG(TEXT_PRESSED, $F011L1); + ADD_COLOR_CONFIG(TEXT_HIGHLIGHTED, $F011L1); + ADD_COLOR_CONFIG(TEXT_DISABLED, $F011L1D); + ADD_COLOR_CONFIG(GUIDE_TEXT_NORMAL, $F051); + ADD_COLOR_CONFIG(CLEAR_ICON_NORMAL, $F041i); //$F053); + ADD_COLOR_CONFIG(CLEAR_ICON_PRESSED, $B042);//$F053P); + ADD_COLOR_CONFIG(CLEAR_ICON_DISABLED, $F053D); + ADD_COLOR_CONFIG(CUT_LINK_TEXT_NORMAL, $B052L5); + ADD_COLOR_CONFIG(CUT_LINK_BG_NORMAL, $B0217); + ADD_COLOR_CONFIG(CURSOR_NORMAL, $F052); + + ADD_IMAGE_CONFIG(BG_NORMAL, #00_edit_field_no_line_square_bg.#.png); + ADD_IMAGE_CONFIG(BG_PRESSED, #00_edit_field_no_line_square_bg.#.png); + ADD_IMAGE_CONFIG(BG_HIGHLIGHTED, #00_edit_field_no_line_square_bg.#.png); + ADD_IMAGE_CONFIG(BG_DISABLED, #00_edit_field_no_line_square_bg.#.png); + ADD_IMAGE_CONFIG(BG_EFFECT, #00_edit_field_no_line_square_bg.#.png); + ADD_IMAGE_CONFIG(COPY_PASTE_ICON_CENTER_NORMAL, #copy&paste_Handler_center.png); + ADD_IMAGE_CONFIG(COPY_PASTE_ICON_REVERSE_CENTER_NORMAL, #copy&paste_Handler_center_reverse.png); + ADD_IMAGE_CONFIG(COPY_PASTE_ICON_LEFT_NORMAL, #copy&paste_Handler_left_01.png); + ADD_IMAGE_CONFIG(COPY_PASTE_ICON_RIGHT_NORMAL, #copy&paste_Handler_right.png); + ADD_IMAGE_CONFIG(COPY_PASTE_ICON_REVERSE_LEFT_NORMAL, #copy&paste_Handler_left.png); + ADD_IMAGE_CONFIG(COPY_PASTE_ICON_REVERSE_RIGHT_NORMAL, #copy&paste_Handler_left_reverse.png); + ADD_IMAGE_CONFIG(COPY_PASTE_SEARCH_ICON, #copy&paste_icon_search.png); + ADD_IMAGE_CONFIG(COPY_PASTE_MAGNIFIER, #copy&paste_Magnifier.#.png); + ADD_IMAGE_CONFIG(COPY_PASTE_MAGNIFIER_MASK, #copy&paste_Magnifier_mask.#.png); + ADD_IMAGE_CONFIG(BG_ROUND_NORMAL, #00_edit_field_round_bg.#.png); + ADD_IMAGE_CONFIG(BG_ROUND_EFFECT, #00_edit_field_line_round_bg_01.#.png); + ADD_IMAGE_CONFIG(CLEAR_ICON_NORMAL, #00_edit_field_clear.png); + ADD_IMAGE_CONFIG(CLEAR_ICON_PRESSED, #00_edit_field_clear.png); + ADD_IMAGE_CONFIG(CLEAR_ICON_DISABLED, #00_edit_field_clear.png); + ADD_IMAGE_CONFIG(GROUPED_SINGLE_BG_NORMAL, #00_edit_group_bg.#.png); + ADD_IMAGE_CONFIG(GROUPED_SINGLE_BG_EFFECT_NORMAL, #00_edit_group_bg_ef.#.png); + ADD_IMAGE_CONFIG(GROUPED_TOP_BG_NORMAL, #00_edit_group_bg_top.#.png); + ADD_IMAGE_CONFIG(GROUPED_TOP_BG_EFFECT_NORMAL, #00_edit_group_bg_top_ef.#.png); + ADD_IMAGE_CONFIG(GROUPED_MIDDLE_BG_NORMAL, #00_edit_group_bg_center.#.png); + ADD_IMAGE_CONFIG(GROUPED_MIDDLE_BG_EFFECT_NORMAL, #00_edit_group_bg_center_ef.#.png); + ADD_IMAGE_CONFIG(GROUPED_BOTTOM_BG_NORMAL, #00_edit_group_bg_bottom.#.png); + ADD_IMAGE_CONFIG(GROUPED_BOTTOM_BG_EFFECT_NORMAL, #00_edit_group_bg_bottom_ef.#.png); + ADD_IMAGE_CONFIG(BG_RING_FOCUSED, #00_edit_field_focus.#.png); + + START_UI_CONFIG_MODE(480x800); + + ADD_DIMENSION_CONFIG(MIN_SIZE, 48, 60); + ADD_DIMENSION_CONFIG(TITLE_STYLE_MIN_SIZE, 48, 102); + ADD_DIMENSION_CONFIG(SMALL_STYLE_MIN_SIZE, 48, 48); + + START_UI_CONFIG_API_VERSION(2); + ADD_DIMENSION_CONFIG(MIN_SIZE, 48, 60); + ADD_DIMENSION_CONFIG(TITLE_STYLE_MIN_SIZE, 48, 102); + ADD_DIMENSION_CONFIG(SMALL_STYLE_MIN_SIZE, 48, 48); + END_UI_CONFIG_API_VERSION(); + + END_UI_CONFIG_MODE(480x800); + + START_UI_CONFIG_MODE(720x1280); + + ADD_FIXED_VALUE_CONFIG(FONT_MIN_SIZE, 4); + ADD_SHAPE_CONFIG(DEFAULT_FONT_SIZE, 44); + ADD_SHAPE_CONFIG(DEFAULT_TITLE_FONT_SIZE, 32); + ADD_SHAPE_CONFIG(CLEAR_ICON_HEIGHT, 45); + ADD_SHAPE_CONFIG(CLEAR_ICON_WIDTH, 45); + ADD_SHAPE_CONFIG(COPYPASTE_HANDLER_WIDTH, 51); + ADD_SHAPE_CONFIG(COPYPASTE_HANDLER_HEIGHT, 79); + ADD_SHAPE_CONFIG(FIELD_BORDER_WIDTH, 1); + ADD_SHAPE_CONFIG(FIELD_LEFT_MARGIN, 0); + ADD_SHAPE_CONFIG(FIELD_RIGHT_MARGIN, 0); + ADD_SHAPE_CONFIG(FIELD_TOP_MARGIN, 0); + 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, 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); + ADD_SHAPE_CONFIG(FIELD_TITLE_TEXT_BOTTOM_MARGIN, 10); + ADD_SHAPE_CONFIG(FIELD_TITLE_RECT_WIDTH, 120); + ADD_SHAPE_CONFIG(FIELD_TITLE_RECT_HEIGHT, 36); + + ADD_SHAPE_CONFIG(AREA_LEFT_MARGIN, 0); + ADD_SHAPE_CONFIG(AREA_RIGHT_MARGIN, 0); + ADD_SHAPE_CONFIG(AREA_TOP_MARGIN, 0); + ADD_SHAPE_CONFIG(AREA_BOTTOM_MARGIN, 0); + ADD_SHAPE_CONFIG(AREA_TEXT_LEFT_MARGIN, 16); + ADD_SHAPE_CONFIG(AREA_TEXT_RIGHT_MARGIN, 16); + ADD_SHAPE_CONFIG(AREA_TEXT_TOP_MARGIN, 10); + ADD_SHAPE_CONFIG(AREA_TEXT_BOTTOM_MARGIN, 10); + ADD_SHAPE_CONFIG(AREA_TITLE_TEXT_LEFT_MARGIN, 16); + ADD_SHAPE_CONFIG(AREA_TITLE_TEXT_RIGHT_MARGIN, 16); + ADD_SHAPE_CONFIG(AREA_TITLE_TEXT_TOP_MARGIN, 12); + ADD_SHAPE_CONFIG(AREA_TITLE_TEXT_BOTTOM_MARGIN, 12); + ADD_SHAPE_CONFIG(AREA_TITLE_RECT_WIDTH, 120); + ADD_SHAPE_CONFIG(AREA_TITLE_RECT_HEIGHT, 48); + ADD_SHAPE_CONFIG(AREA_SCROLL_WIDTH, 5); + ADD_SHAPE_CONFIG(CURSOR_WIDTH, 4); + ADD_SHAPE_CONFIG(TEXT_OBJECT_MININMUM_WIDTH, 63); + ADD_SHAPE_CONFIG(TEXT_OBJECT_MININMUM_HEIGHT, 44); + ADD_SHAPE_CONFIG(COPYPASTE_MAGNIFIER_WIDTH, 324); + ADD_SHAPE_CONFIG(COPYPASTE_MAGNIFIER_HEIGHT, 164); + ADD_SHAPE_CONFIG(COPYPASTE_MAGNIFIER_CAPTURE_WIDTH, 192); + 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); + ADD_DIMENSION_CONFIG(SMALL_STYLE_MIN_SIZE, 48, 48); + + START_UI_CONFIG_API_VERSION(2); + ADD_DIMENSION_CONFIG(MIN_SIZE, 48, 60); + ADD_DIMENSION_CONFIG(TITLE_STYLE_MIN_SIZE, 48, 102); + ADD_DIMENSION_CONFIG(SMALL_STYLE_MIN_SIZE, 48, 48); + END_UI_CONFIG_API_VERSION(); + + END_UI_CONFIG_MODE(720x1280); +} +END_UI_CONFIG(EDIT); diff --git a/src/ui/resource/FUi_ResourceEditDateConfig.cpp b/src/ui/resource/FUi_ResourceEditDateConfig.cpp new file mode 100644 index 0000000..8b51442 --- /dev/null +++ b/src/ui/resource/FUi_ResourceEditDateConfig.cpp @@ -0,0 +1,79 @@ +// +// 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_ResourceEditDateConfig.h + * @brief This is the implementation file for the color and shape config of EditDate class. + */ + +#include "FUi_ResourceEditDateConfig.h" + +START_UI_CONFIG(EDITDATE); +{ + ADD_COLOR_CONFIG(TEXT_NORMAL, $F011L1); + ADD_COLOR_CONFIG(TEXT_PRESSED, $F011L1P); + ADD_COLOR_CONFIG(TEXT_DISABLED, $F011L1D); + ADD_COLOR_CONFIG(TEXT_HIGHLIGHTED, $F011L1); + ADD_COLOR_CONFIG(TITLE_TEXT_NORMAL, $B052L5); + ADD_COLOR_CONFIG(TITLE_TEXT_DISABLED, $B052L5); + ADD_COLOR_CONFIG(CONTENT_BG_NORMAL, $W011); + ADD_COLOR_CONFIG(CONTENT_BG_PRESSED, $B042); + ADD_COLOR_CONFIG(CONTENT_BG_DISABLED, $W011D); + ADD_COLOR_CONFIG(CONTENT_BG_HIGHLIGHTED, $W161); + + ADD_IMAGE_CONFIG(CONTENT_BG_NORMAL, #00_button_01.#.png); + ADD_IMAGE_CONFIG(CONTENT_BG_PRESSED, #00_button_01.#.png); + ADD_IMAGE_CONFIG(CONTENT_BG_DISABLED, #00_button_01.#.png); + ADD_IMAGE_CONFIG(CONTENT_BG_HIGHLIGHTED, #00_button_01_focus.#.png); + ADD_IMAGE_CONFIG(CONTENT_BG_EFFECT_NORMAL, #00_button_01_ef.#.png); + ADD_IMAGE_CONFIG(CONTENT_BG_EFFECT_DISABLED, #00_button_01_dim_ef.#.png); + ADD_IMAGE_CONFIG(CONTENT_BG_EFFECT_PRESSED, #00_button_01_press_ef.#.png); + + START_UI_CONFIG_MODE(720x1280); + { + ADD_SHAPE_CONFIG(WIDTH, 345); + ADD_SHAPE_CONFIG(HEIGHT, 112); + ADD_SHAPE_CONFIG(DATE_HEIGHT, 48); + ADD_SHAPE_CONFIG(TITLE_HEIGHT, 36); + ADD_SHAPE_CONFIG(DATE_FONT_SIZE, 34); + ADD_SHAPE_CONFIG(TEXT_FONT_SIZE, 32); + ADD_SHAPE_CONFIG(DATE_TEXT_LEFT_MARGIN, 17); + ADD_SHAPE_CONFIG(MONTH_YEAR_ELEMENT_WIDTH, 104); + ADD_SHAPE_CONFIG(MONTH_YEAR_ELEMENT_MIN_WIDTH, 104); + ADD_SHAPE_CONFIG(ITEM_DIVIDER_HEIGHT, 42); + ADD_SHAPE_CONFIG(TITLE_DATE_MARGIN, 6); + ADD_SHAPE_CONFIG(DATE_BAR_MARGIN, 10); + ADD_SHAPE_CONFIG(TITLE_TEXT_LEFT_MARGIN, 20); + ADD_SHAPE_CONFIG(ELEMENT_MARGIN, 17); + ADD_SHAPE_CONFIG(DAY_ELEMENT_WIDTH, 69); + ADD_SHAPE_CONFIG(DAY_ELEMENT_MIN_WIDTH, 69); + ADD_SHAPE_CONFIG(CONTENT_TEXT_MARGIN, 2); + ADD_DIMENSION_CONFIG(MIN_SIZE, 345, 112); + } + END_UI_CONFIG_MODE(720x1280); + + START_UI_CONFIG_MODE(1280x720); + { + ADD_DIMENSION_CONFIG(MIN_SIZE, 345, 112); + ADD_SHAPE_CONFIG(WIDTH, 675); + ADD_SHAPE_CONFIG(MONTH_YEAR_ELEMENT_WIDTH, 229); + ADD_SHAPE_CONFIG(DAY_ELEMENT_WIDTH, 149); + } + END_UI_CONFIG_MODE(1280x720); + +} +END_UI_CONFIG(EDITDATE); diff --git a/src/ui/resource/FUi_ResourceEditTimeConfig.cpp b/src/ui/resource/FUi_ResourceEditTimeConfig.cpp new file mode 100644 index 0000000..5367df3 --- /dev/null +++ b/src/ui/resource/FUi_ResourceEditTimeConfig.cpp @@ -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_ResourceEditTimeConfig.cpp + * @brief This is the implementation file for the color and shape config of EditTime class. + */ + +#include "FUi_ResourceEditTimeConfig.h" + +START_UI_CONFIG(EDITTIME); +{ + ADD_COLOR_CONFIG(BUTTON_BG_NORMAL, $W011); + ADD_COLOR_CONFIG(BUTTON_BG_PRESSED, $B042); + ADD_COLOR_CONFIG(BUTTON_BG_DISABLED, $W011D); + ADD_COLOR_CONFIG(BUTTON_BG_HIGHLIGHTED, $W161); + ADD_COLOR_CONFIG(CONTENT_BG_NORMAL, $W011); + ADD_COLOR_CONFIG(CONTENT_BG_PRESSED, $B042); + ADD_COLOR_CONFIG(CONTENT_BG_DISABLED, $W011D); + ADD_COLOR_CONFIG(CONTENT_BG_HIGHLIGHTED, $W161); + ADD_COLOR_CONFIG(BUTTON_TEXT_NORMAL, $F031L1); + ADD_COLOR_CONFIG(BUTTON_TEXT_PRESSED, $F031L1P); + ADD_COLOR_CONFIG(BUTTON_TEXT_DISABLED, $F031L1D); + ADD_COLOR_CONFIG(BUTTON_TEXT_HIGHLIGHTED, $F031L1); + ADD_COLOR_CONFIG(TEXT_NORMAL, $F011L1); + ADD_COLOR_CONFIG(TEXT_PRESSED, $F011L1P); + ADD_COLOR_CONFIG(TEXT_DISABLED, $F011L1D); + ADD_COLOR_CONFIG(TEXT_HIGHLIGHTED, $F011L1); + ADD_COLOR_CONFIG(TITLE_TEXT_NORMAL, $B052L5); + ADD_COLOR_CONFIG(TITLE_TEXT_DISABLED, $B052L5); + + ADD_IMAGE_CONFIG(COLON_BG_NORMAL, #00_date_picker_dot.png); + ADD_IMAGE_CONFIG(BUTTON_BG_NORMAL, #00_button_01.#.png); + ADD_IMAGE_CONFIG(BUTTON_BG_PRESSED, #00_button_01.#.png); + ADD_IMAGE_CONFIG(BUTTON_BG_DISABLED, #00_button_01.#.png); + ADD_IMAGE_CONFIG(BUTTON_BG_HIGHLIGHTED, #00_button_01_focus.#.png); + ADD_IMAGE_CONFIG(BUTTON_BG_EFFECT_NORMAL, #00_button_01_ef.#.png); + ADD_IMAGE_CONFIG(BUTTON_BG_EFFECT_DISABLED, #00_button_01_dim_ef.#.png); + ADD_IMAGE_CONFIG(BUTTON_BG_EFFECT_PRESSED, #00_button_01_press_ef.#.png); + ADD_IMAGE_CONFIG(CONTENT_BG_NORMAL, #00_button_01.#.png); + ADD_IMAGE_CONFIG(CONTENT_BG_PRESSED, #00_button_01.#.png); + ADD_IMAGE_CONFIG(CONTENT_BG_DISABLED, #00_button_01.#.png); + ADD_IMAGE_CONFIG(CONTENT_BG_HIGHLIGHTED, #00_button_01_focus.#.png); + ADD_IMAGE_CONFIG(CONTENT_BG_EFFECT_NORMAL, #00_button_01_ef.#.png); + ADD_IMAGE_CONFIG(CONTENT_BG_EFFECT_DISABLED, #00_button_01_dim_ef.#.png); + ADD_IMAGE_CONFIG(CONTENT_BG_EFFECT_PRESSED, #00_button_01_press_ef.#.png); + + START_UI_CONFIG_MODE(720x1280); + { + ADD_SHAPE_CONFIG(WIDTH, 306); + ADD_SHAPE_CONFIG(HEIGHT, 112); + ADD_SHAPE_CONFIG(TIME_WIDTH, 160); + ADD_SHAPE_CONFIG(HOUR_MINUTE_WIDTH, 69); + ADD_SHAPE_CONFIG(HOUR_MINUTE_MIN_WIDTH, 69); + ADD_SHAPE_CONFIG(TITLE_TIME_MARGIN, 6); + ADD_SHAPE_CONFIG(TIME_BAR_MARGIN, 10); + ADD_SHAPE_CONFIG(TIME_HEIGHT, 48); + ADD_SHAPE_CONFIG(TIME_AMPM_MARGIN, 17); + ADD_SHAPE_CONFIG(AMPM_WIDTH, 95); + ADD_SHAPE_CONFIG(AMPM_HEIGHT, 60); + ADD_SHAPE_CONFIG(TITLE_HEIGHT, 36); + ADD_SHAPE_CONFIG(TIME_FONT_SIZE, 34); + ADD_SHAPE_CONFIG(TEXT_FONT_SIZE, 32); + ADD_SHAPE_CONFIG(AMPM_FONT_SIZE, 34); + ADD_SHAPE_CONFIG(COLON_WIDTH, 12); + ADD_SHAPE_CONFIG(COLON_MARGIN, 5); + ADD_SHAPE_CONFIG(TIME_TEXT_LEFT_MARGIN, 17); + ADD_SHAPE_CONFIG(TITLE_TEXT_LEFT_MARGIN, 20); + ADD_DIMENSION_CONFIG(MIN_SIZE, 306, 112); + } + END_UI_CONFIG_MODE(720x1280); + + START_UI_CONFIG_MODE(1280x720); + { + ADD_DIMENSION_CONFIG(MIN_SIZE, 306, 112); + ADD_SHAPE_CONFIG(WIDTH, 466); + ADD_SHAPE_CONFIG(HOUR_MINUTE_WIDTH, 149); + ADD_SHAPE_CONFIG(TIME_WIDTH, 320); + } + END_UI_CONFIG_MODE(1280x720); +} +END_UI_CONFIG(EDITTIME); diff --git a/src/ui/resource/FUi_ResourceFastScrollConfig.cpp b/src/ui/resource/FUi_ResourceFastScrollConfig.cpp new file mode 100644 index 0000000..37e440b --- /dev/null +++ b/src/ui/resource/FUi_ResourceFastScrollConfig.cpp @@ -0,0 +1,61 @@ +// +// 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. +// + +#include "FUi_ResourceFastScrollConfig.h" + +START_UI_CONFIG(FASTSCROLL); +{ + ADD_COLOR_CONFIG(INDEX_BG_NORMAL, $B0723); + ADD_COLOR_CONFIG(INDEX_LINE_PRESSED, $B0725); + ADD_COLOR_CONFIG(INDEX_TEXT_NORMAL, $B0721); + ADD_COLOR_CONFIG(INDEX_DIVIDER_NORMAL, $B0726); + + ADD_COLOR_CONFIG(INDEX_BG_PRESSED, $B011); + ADD_COLOR_CONFIG(INDEX_TEXT_PRESSED, $B0722); + + ADD_COLOR_CONFIG(POPUP_BG_NORMAL, $B0731); + ADD_COLOR_CONFIG(POPUP_TEXT_NORMAL, $B0732); + ADD_COLOR_CONFIG(INDEX_LINE_NORMAL, $B0724); + + ADD_IMAGE_CONFIG(INDEX_BG_NORMAL, #00_fast_scroll_rollover_bg.#.png); + ADD_IMAGE_CONFIG(INDEX_BG_PRESSED, #00_fast_scroll_rollover_bg_focus.#.png); + ADD_IMAGE_CONFIG(INDEX_LINE_PRESSED, #00_fast_scroll_rollover_bg_line_focus.#.png); + ADD_IMAGE_CONFIG(POPUP_BG_NORMAL, #00_fast_scroll_popup_bg.#.png); + ADD_IMAGE_CONFIG(POPUP_BG_EFFECT, #00_fast_scroll_popup_bg_ef.#.png); + + START_UI_CONFIG_MODE(720x1280); + ADD_SHAPE_CONFIG(INDEX_WIDTH, 49); + ADD_SHAPE_CONFIG(INDEX_HEIGHT, 33); + ADD_SHAPE_CONFIG(INDEX_TOP_MARGIN, 0); + ADD_SHAPE_CONFIG(INDEX_LEFT_LINE_THICKNESS, 3); + ADD_SHAPE_CONFIG(INDEX_TEXT_SIZE, 26); + ADD_FIXED_VALUE_CONFIG(INDEX_SEPARATOR_THICKNESS, 1); + ADD_SHAPE_CONFIG(SELECTED_INDEX_RIGHT_MARGIN, 2); + ADD_SHAPE_CONFIG(SELECTED_INDEX_HEIGHT, 32); + + ADD_SHAPE_CONFIG(POPUP_WIDTH, 208); + ADD_SHAPE_CONFIG(POPUP_HEIGHT, 200); + ADD_SHAPE_CONFIG(POPUP_WIDTH_INCREMENT, 70); + ADD_SHAPE_CONFIG(POPUP_RIGHT_SHADOW, 10); + ADD_SHAPE_CONFIG(POPUP_BOTTOM_SHADOW, 10); + ADD_SHAPE_CONFIG(POPUP_TEXT_SIZE, 136); + ADD_SHAPE_CONFIG(INDEX_SEPARATOR_WIDTH, 42); + END_UI_CONFIG_MODE(720x1280); +} +END_UI_CONFIG(FASTSCROLL); + + diff --git a/src/ui/resource/FUi_ResourceFocusUiConfig.cpp b/src/ui/resource/FUi_ResourceFocusUiConfig.cpp new file mode 100644 index 0000000..6042689 --- /dev/null +++ b/src/ui/resource/FUi_ResourceFocusUiConfig.cpp @@ -0,0 +1,26 @@ +// +// 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. +// + +#include "FUi_ResourceFocusUiConfig.h" + +START_UI_CONFIG(FOCUSUI); +{ + ADD_COLOR_CONFIG(CONTENT_BG_HIGHLIGHTED, $W161); + ADD_IMAGE_CONFIG(FOCUS,#00_button_01_focus.#.png); +} +END_UI_CONFIG(FOCUSUI); + diff --git a/src/ui/resource/FUi_ResourceFooterConfig.cpp b/src/ui/resource/FUi_ResourceFooterConfig.cpp new file mode 100644 index 0000000..e7c2e39 --- /dev/null +++ b/src/ui/resource/FUi_ResourceFooterConfig.cpp @@ -0,0 +1,438 @@ +// +// 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_ResourceFooterConfig.cpp + * @brief This is the implementation file for the properties of Footer. + */ + +#include "FUi_ResourceFooterConfig.h" + +START_UI_CONFIG(FOOTER); +{ + // COLOR + ADD_COLOR_CONFIG(BG_NORMAL, $B0515L1); + ADD_COLOR_CONFIG(TRANSLUCENT_BG_NORMAL, $B013); + + // $B0543 is 0x00000000, transparent + ADD_COLOR_CONFIG(BUTTON_BG_NORMAL, $B0515L1); + ADD_COLOR_CONFIG(BUTTON_BG_DISABLED, $B0515L1); + ADD_COLOR_CONFIG(BUTTON_BG_PRESSED, $B0515L1); + ADD_COLOR_CONFIG(BUTTON_BG_HIGHLIGHTED, $W161); + + ADD_COLOR_CONFIG(BUTTON_TRANSLUCENT_BG_NORMAL, $B013); + ADD_COLOR_CONFIG(BUTTON_TRANSLUCENT_BG_DISABLED, $B013); + ADD_COLOR_CONFIG(BUTTON_TRANSLUCENT_BG_PRESSED, $B013); + ADD_COLOR_CONFIG(BUTTON_TRANSLUCENT_BG_HIGHLIGHTED, $W161); + + ADD_COLOR_CONFIG(BUTTON_TEXT_NORMAL, $B052L5); + ADD_COLOR_CONFIG(BUTTON_TEXT_DISABLED, $B052L5D); + ADD_COLOR_CONFIG(BUTTON_TEXT_PRESSED, $B052L5P); + ADD_COLOR_CONFIG(BUTTON_TEXT_HIGHLIGHTED, $B052L5); + + ADD_COLOR_CONFIG(BUTTON_TRANSLUCENT_TEXT_NORMAL, $B052L8); + ADD_COLOR_CONFIG(BUTTON_TRANSLUCENT_TEXT_DISABLED, $B052L8D); + ADD_COLOR_CONFIG(BUTTON_TRANSLUCENT_TEXT_PRESSED, $B052L8P); + ADD_COLOR_CONFIG(BUTTON_TRANSLUCENT_TEXT_HIGHLIGHTED, $B052L8); + + + ADD_COLOR_CONFIG(SEGMENTED_ITEM_BG_NORMAL, $B0515L1); + ADD_COLOR_CONFIG(SEGMENTED_ITEM_BG_DISABLED, $B0515L1); + ADD_COLOR_CONFIG(SEGMENTED_ITEM_BG_PRESSED, $B0511P); + ADD_COLOR_CONFIG(SEGMENTED_ITEM_BG_HIGHLIGHTED, $B0514P2); + ADD_COLOR_CONFIG(SEGMENTED_ITEM_BG_SELECTED, $B0515L1); + + ADD_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_NORMAL, $B013); + ADD_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_DISABLED, $B013); + ADD_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_PRESSED, $B013); + ADD_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_HIGHLIGHTED, $B0514P2); + ADD_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_SELECTED, $B013); + + ADD_COLOR_CONFIG(SEGMENTED_ITEM_TEXT_NORMAL, $B052L6); + ADD_COLOR_CONFIG(SEGMENTED_ITEM_TEXT_DISABLED, $B052L6D); + ADD_COLOR_CONFIG(SEGMENTED_ITEM_TEXT_PRESSED, $B052L6P2); + ADD_COLOR_CONFIG(SEGMENTED_ITEM_TEXT_HIGHLIGHTED, $B052L6); + ADD_COLOR_CONFIG(SEGMENTED_ITEM_TEXT_SELECTED, $B052L6P1); + + ADD_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_TEXT_NORMAL, $B052L8); + ADD_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_TEXT_DISABLED, $B052L8D); + ADD_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_TEXT_PRESSED, $B052L8P); + ADD_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED, $B052L8); + ADD_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_TEXT_SELECTED, $B052L8); + + ADD_COLOR_CONFIG(TAB_ITEM_BG_NORMAL, $B0515L1); + ADD_COLOR_CONFIG(TAB_ITEM_BG_DISABLED, $B0515L1); + ADD_COLOR_CONFIG(TAB_ITEM_BG_PRESSED, $B0511P); + ADD_COLOR_CONFIG(TAB_ITEM_BG_HIGHLIGHTED, $B0514P2); + ADD_COLOR_CONFIG(TAB_ITEM_BG_SELECTED, $B0515L1); + + ADD_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_BG_NORMAL, $B013); + ADD_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_BG_DISABLED, $B013); + ADD_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_BG_PRESSED, $B013); + ADD_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_BG_HIGHLIGHTED, $B0514P2); + ADD_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_BG_SELECTED, $B013); + + ADD_COLOR_CONFIG(TAB_ITEM_TEXT_NORMAL, $B052L6); + ADD_COLOR_CONFIG(TAB_ITEM_TEXT_DISABLED, $B052L6D); + ADD_COLOR_CONFIG(TAB_ITEM_TEXT_PRESSED, $B052L6P2); + ADD_COLOR_CONFIG(TAB_ITEM_TEXT_HIGHLIGHTED, $B052L6); + ADD_COLOR_CONFIG(TAB_ITEM_TEXT_SELECTED, $B052L6P1); + + ADD_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_TEXT_NORMAL, $B052L8); + ADD_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_TEXT_DISABLED, $B052L8D); + ADD_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_TEXT_PRESSED, $B052L8P); + ADD_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED, $B052L8); + ADD_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_TEXT_SELECTED, $B052L8); + + ADD_COLOR_CONFIG(BUTTON_ITEM_BG_NORMAL, $B0515L1); + ADD_COLOR_CONFIG(BUTTON_ITEM_BG_DISABLED, $B0515L1); + ADD_COLOR_CONFIG(BUTTON_ITEM_BG_PRESSED, $B0511P); + ADD_COLOR_CONFIG(BUTTON_ITEM_BG_HIGHLIGHTED, $B0514P2); + + ADD_COLOR_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_NORMAL, $B013); + ADD_COLOR_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_DISABLED, $B013); + ADD_COLOR_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_PRESSED, $B013); + ADD_COLOR_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_HIGHLIGHTED, $B0514P2); + + ADD_COLOR_CONFIG(BUTTON_ITEM_TEXT_NORMAL, $B052L4); + ADD_COLOR_CONFIG(BUTTON_ITEM_TEXT_DISABLED, $B052L4D); + ADD_COLOR_CONFIG(BUTTON_ITEM_TEXT_PRESSED, $B052L4P); + ADD_COLOR_CONFIG(BUTTON_ITEM_TEXT_HIGHLIGHTED, $B052L4); + + ADD_COLOR_CONFIG(BUTTON_ITEM_TRANSLUCENT_TEXT_NORMAL, $B052L9); + ADD_COLOR_CONFIG(BUTTON_ITEM_TRANSLUCENT_TEXT_DISABLED, $B052L9D); + ADD_COLOR_CONFIG(BUTTON_ITEM_TRANSLUCENT_TEXT_PRESSED, $B052L9P); + ADD_COLOR_CONFIG(BUTTON_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED, $B052L9); + + + ADD_COLOR_CONFIG(BACK_ICON_NORMAL, $B052L1); + ADD_COLOR_CONFIG(BACK_ICON_DISABLED, $B052L1D); + ADD_COLOR_CONFIG(BACK_ICON_PRESSED, $B052L1P); + ADD_COLOR_CONFIG(BACK_ICON_HIGHLIGHTED, $B052L1); + + + ADD_COLOR_CONFIG(SOFTKEY_BG_NORMAL, $B0520); + ADD_COLOR_CONFIG(SOFTKEY_BG_DISABLED, $B0520); + ADD_COLOR_CONFIG(SOFTKEY_BG_PRESSED, $B0520P); + ADD_COLOR_CONFIG(SOFTKEY_BG_HIGHLIGHTED, $B0520); + + ADD_COLOR_CONFIG(SOFTKEY_TEXT_NORMAL, $F031L3); + ADD_COLOR_CONFIG(SOFTKEY_TEXT_DISABLED, $F031L3); + ADD_COLOR_CONFIG(SOFTKEY_TEXT_PRESSED, $F031L1P); + ADD_COLOR_CONFIG(SOFTKEY_TEXT_HIGHLIGHTED, $F031L3); + + ADD_COLOR_CONFIG(SOFTKEY_ICON_NORMAL, $B052L8); + ADD_COLOR_CONFIG(SOFTKEY_ICON_DISABLED, $B052L8); + ADD_COLOR_CONFIG(SOFTKEY_ICON_PRESSED, $B052L8); + ADD_COLOR_CONFIG(SOFTKEY_ICON_HIGHLIGHTED, $B052L8); + + ADD_COLOR_CONFIG(DIVIDER_LINE_LEFT_NORMAL, $B0221L2); + ADD_COLOR_CONFIG(DIVIDER_LINE_RIGHT_NORMAL, $B0221L2); + + ADD_COLOR_CONFIG(DIVIDER_LINE_LEFT_TRANSLUCENT_NORMAL, $B0221L2); + ADD_COLOR_CONFIG(DIVIDER_LINE_RIGHT_TRANSLUCENT_NORMAL, $B0221L2); + + ADD_COLOR_CONFIG(MORE_ICON_NORMAL, $B052L1); + ADD_COLOR_CONFIG(MORE_ICON_DISABLED, $B052L1D); + ADD_COLOR_CONFIG(MORE_ICON_PRESSED, $B052L1P); + ADD_COLOR_CONFIG(MORE_ICON_HIGHLIGHTED, $B052L1); + + ADD_COLOR_CONFIG(SELECTED_BAR_BG_NORMAL, $B052L1P); + ADD_COLOR_CONFIG(SELECTED_BAR_TRANSLUCENT_BG_NORMAL, $B052L1P); + + ADD_COLOR_CONFIG(TAB_TEXT_DIM_NORMAL, $B0514); + ADD_COLOR_CONFIG(TAB_TEXT_DIM_TRANSLUCENT_NORMAL, $B013); + + // BITMAP + ADD_IMAGE_CONFIG(BG_NORMAL, #00_toolbar_bg.#.png); + ADD_IMAGE_CONFIG(TRANSLUCENT_BG_NORMAL, #00_toolbar_bg.#.png); + + ADD_IMAGE_CONFIG(BG_EFFECT_NORMAL, #00_toolbar_bg_ef.#.png); + ADD_IMAGE_CONFIG(TRANSLUCENT_BG_EFFECT_NORMAL, #00_toolbar_bg_ef.#.png); + + ADD_IMAGE_CONFIG(BUTTON_BG_NORMAL, #00_toolbar_bg.#.png); + ADD_IMAGE_CONFIG(BUTTON_BG_DISABLED, #00_toolbar_bg.#.png); + ADD_IMAGE_CONFIG(BUTTON_BG_PRESSED, #00_toolbar_bg.#.png); + ADD_IMAGE_CONFIG(BUTTON_BG_HIGHLIGHTED, #00_focus.#.png); + + ADD_IMAGE_CONFIG(BUTTON_BG_EFFECT_NORMAL, #00_toolbar_bg_ef.#.png); + ADD_IMAGE_CONFIG(BUTTON_BG_EFFECT_PRESSED, #00_toolbar_press_ef.#.png); + + ADD_IMAGE_CONFIG(BUTTON_TRANSLUCENT_BG_NORMAL, #00_toolbar_bg.#.png); //added + ADD_IMAGE_CONFIG(BUTTON_TRANSLUCENT_BG_DISABLED, #00_toolbar_bg.#.png);//added + ADD_IMAGE_CONFIG(BUTTON_TRANSLUCENT_BG_PRESSED, #00_toolbar_bg.#.png);//added + ADD_IMAGE_CONFIG(BUTTON_TRANSLUCENT_BG_HIGHLIGHTED, #00_focus.#.png);//added + + ADD_IMAGE_CONFIG(BUTTON_TRANSLUCENT_BG_EFFECT_NORMAL, #00_toolbar_bg_ef.#.png); + ADD_IMAGE_CONFIG(BUTTON_TRANSLUCENT_BG_EFFECT_PRESSED, #00_toolbar_press_ef.#.png); + + ADD_IMAGE_CONFIG(SEGMENTED_ITEM_BG_NORMAL, #00_toolbar_bg.#.png);//added + ADD_IMAGE_CONFIG(SEGMENTED_ITEM_BG_DISABLED, #00_toolbar_bg.#.png);//added + ADD_IMAGE_CONFIG(SEGMENTED_ITEM_BG_PRESSED, #00_tab_press_bg.#.png);//added + ADD_IMAGE_CONFIG(SEGMENTED_ITEM_BG_HIGHLIGHTED, #00_tab_focus.#.png);//added + ADD_IMAGE_CONFIG(SEGMENTED_ITEM_BG_SELECTED, #00_toolbar_bg.#.png);//added + + ADD_IMAGE_CONFIG(SEGMENTED_ITEM_BG_EFFECT_NORMAL, #00_toolbar_bg_ef.#.png); + ADD_IMAGE_CONFIG(SEGMENTED_ITEM_BG_EFFECT_PRESSED, #00_tab_press_ef.#.png); + + ADD_IMAGE_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_NORMAL, #00_toolbar_bg.#.png);//added + ADD_IMAGE_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_DISABLED, #00_toolbar_bg.#.png);//added + ADD_IMAGE_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_PRESSED, #00_tab_press_bg.#.png);//added + ADD_IMAGE_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_HIGHLIGHTED, #00_tab_focus.#.png);//added + ADD_IMAGE_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_SELECTED, #00_toolbar_bg.#.png);//added + + ADD_IMAGE_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_EFFECT_NORMAL, #00_toolbar_bg_ef.#.png); + ADD_IMAGE_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_EFFECT_PRESSED, #00_tab_press_ef.#.png); + + ADD_IMAGE_CONFIG(TAB_ITEM_BG_NORMAL, #00_toolbar_bg.#.png); + ADD_IMAGE_CONFIG(TAB_ITEM_BG_DISABLED, #00_toolbar_bg.#.png); + ADD_IMAGE_CONFIG(TAB_ITEM_BG_PRESSED, #00_tab_press_bg.#.png); + ADD_IMAGE_CONFIG(TAB_ITEM_BG_HIGHLIGHTED, #00_tab_focus.#.png); + ADD_IMAGE_CONFIG(TAB_ITEM_BG_SELECTED, #00_toolbar_bg.#.png); + + ADD_IMAGE_CONFIG(TAB_ITEM_BG_EFFECT_NORMAL, #00_toolbar_bg_ef.#.png); + ADD_IMAGE_CONFIG(TAB_ITEM_BG_EFFECT_PRESSED, #00_tab_press_ef.#.png); + + ADD_IMAGE_CONFIG(TAB_ITEM_TRANSLUCENT_BG_NORMAL, #00_toolbar_bg.#.png);//added + ADD_IMAGE_CONFIG(TAB_ITEM_TRANSLUCENT_BG_DISABLED, #00_toolbar_bg.#.png);//added + ADD_IMAGE_CONFIG(TAB_ITEM_TRANSLUCENT_BG_PRESSED, #00_toolbar_bg.#.png);//added + ADD_IMAGE_CONFIG(TAB_ITEM_TRANSLUCENT_BG_HIGHLIGHTED, #00_tab_focus.#.png);//added + ADD_IMAGE_CONFIG(TAB_ITEM_TRANSLUCENT_BG_SELECTED, #00_toolbar_bg.#.png);//added + + ADD_IMAGE_CONFIG(TAB_ITEM_TRANSLUCENT_BG_EFFECT_NORMAL, #00_toolbar_bg_ef.#.png); + ADD_IMAGE_CONFIG(TAB_ITEM_TRANSLUCENT_BG_EFFECT_PRESSED, #00_tab_press_ef.#.png); + + //ADD_IMAGE_CONFIG(TAB_ITEM_BG_EFFECT_PRESSED, #00_tab_press_ef.#.png); + ADD_IMAGE_CONFIG(TAB_ITEM_SELECTED, #00_tab_select_bar.#.png); + + ADD_IMAGE_CONFIG(BUTTON_ITEM_BG_NORMAL, #00_toolbar_bg.#.png); + ADD_IMAGE_CONFIG(BUTTON_ITEM_BG_DISABLED, #00_toolbar_bg.#.png); + ADD_IMAGE_CONFIG(BUTTON_ITEM_BG_PRESSED, #00_toolbar_bg.#.png); + ADD_IMAGE_CONFIG(BUTTON_ITEM_BG_HIGHLIGHTED, #00_focus.#.png); + + ADD_IMAGE_CONFIG(BUTTON_ITEM_BG_EFFECT_NORMAL, #00_toolbar_bg_ef.#.png); //not supported by theme + ADD_IMAGE_CONFIG(BUTTON_ITEM_BG_EFFECT_PRESSED, #00_toolbar_press_ef.#.png); //not supported by theme + + ADD_IMAGE_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_NORMAL, #00_toolbar_bg.#.png); + ADD_IMAGE_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_DISABLED, #00_toolbar_bg.#.png); + ADD_IMAGE_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_PRESSED, #00_toolbar_bg.#.png); + ADD_IMAGE_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_HIGHLIGHTED, #00_focus.#.png); + + ADD_IMAGE_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_EFFECT_NORMAL, #00_toolbar_bg_ef.#.png); //not supported by theme + ADD_IMAGE_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_EFFECT_PRESSED, #00_toolbar_press_ef.#.png); //not supported by theme + + ADD_IMAGE_CONFIG(BACK_ICON_NORMAL, #00_icon_back.png); + ADD_IMAGE_CONFIG(BACK_ICON_DISABLED, #00_icon_back.png); + ADD_IMAGE_CONFIG(BACK_ICON_PRESSED, #00_icon_back.png); + ADD_IMAGE_CONFIG(BACK_ICON_HIGHLIGHTED, #00_icon_back.png); + + ADD_IMAGE_CONFIG(BACK_ICON_EFFECT_NORMAL, #00_icon_back_ef.png); //not supported by theme + ADD_IMAGE_CONFIG(BACK_ICON_EFFECT_PRESSED, #00_icon_back_ef.png); //not supported by theme + + ADD_IMAGE_CONFIG(BACK_ICON_EFFECT_NORMAL2, #00_icon_Back_ef_02.png); //not supported by theme + ADD_IMAGE_CONFIG(BACK_ICON_EFFECT_PRESSED2, #00_icon_Back_ef_02.png); //not supported by theme + + ADD_IMAGE_CONFIG(BACK_ICON_TRANSLUCENT_EFFECT_NORMAL, #00_icon_back_trans_ef.png); //not supported by theme + ADD_IMAGE_CONFIG(BACK_ICON_TRANSLUCENT_EFFECT_PRESSED, #00_icon_back_trans_ef.png); //not supported by theme + + ADD_IMAGE_CONFIG(HIDE_ICON_NORMAL, #00_icon_SIP_close.png); + ADD_IMAGE_CONFIG(HIDE_ICON_DISABLED, #00_icon_SIP_close.png); + ADD_IMAGE_CONFIG(HIDE_ICON_PRESSED, #00_icon_SIP_close.png); + ADD_IMAGE_CONFIG(HIDE_ICON_HIGHLIGHTED, #00_icon_SIP_close.png); + + ADD_IMAGE_CONFIG(HIDE_ICON_EFFECT_NORMAL, #00_icon_SIP_close_ef.png); //not supported by theme + ADD_IMAGE_CONFIG(HIDE_ICON_EFFECT_PRESSED, #00_icon_SIP_close_ef.png); //not supported by theme + + ADD_IMAGE_CONFIG(MORE_ICON_NORMAL, #00_icon_more.png); + ADD_IMAGE_CONFIG(MORE_ICON_DISABLED, #00_icon_more.png); + ADD_IMAGE_CONFIG(MORE_ICON_PRESSED, #00_icon_more.png); + ADD_IMAGE_CONFIG(MORE_ICON_HIGHLIGHTED, #00_icon_more.png); + + ADD_IMAGE_CONFIG(MORE_ICON_EFFECT_NORMAL, #00_icon_more_ef.png); //not supported by theme + ADD_IMAGE_CONFIG(MORE_ICON_EFFECT_PRESSED, #00_icon_more_ef.png); //not supported by theme + + ADD_IMAGE_CONFIG(SOFTKEY_LEFT_BG_NORMAL, #00_softkey_left_bg.png); + ADD_IMAGE_CONFIG(SOFTKEY_LEFT_BG_DISABLED, #00_softkey_left_bg.png); + ADD_IMAGE_CONFIG(SOFTKEY_LEFT_BG_PRESSED, #00_softkey_left_bg.png); + ADD_IMAGE_CONFIG(SOFTKEY_LEFT_BG_HIGHLIGHTED, #00_softkey_left_bg.png); + + ADD_IMAGE_CONFIG(SOFTKEY_LEFT_BG_EFFECT_NORMAL, #00_softkey_left_bg_ef.png); //not supported by theme + ADD_IMAGE_CONFIG(SOFTKEY_LEFT_BG_EFFECT_PRESSED, #00_softkey_left_bg_ef_press.png); //not supported by theme + + ADD_IMAGE_CONFIG(SOFTKEY_RIGHT_BG_NORMAL, #00_softkey_right_bg.png); + ADD_IMAGE_CONFIG(SOFTKEY_RIGHT_BG_DISABLED, #00_softkey_right_bg.png); + ADD_IMAGE_CONFIG(SOFTKEY_RIGHT_BG_PRESSED, #00_softkey_right_bg.png); + ADD_IMAGE_CONFIG(SOFTKEY_RIGHT_BG_HIGHLIGHTED, #00_softkey_right_bg.png); + + ADD_IMAGE_CONFIG(SOFTKEY_RIGHT_BG_EFFECT_NORMAL, #00_softkey_right_bg_ef.png); //not supported by theme + ADD_IMAGE_CONFIG(SOFTKEY_RIGHT_BG_EFFECT_PRESSED, #00_softkey_right_bg_ef_press.png); //not supported by theme + + ADD_IMAGE_CONFIG(SOFTKEY_LEFT_TEXT_BG_NORMAL, #00_softkey_left_text_bg.png); + ADD_IMAGE_CONFIG(SOFTKEY_LEFT_TEXT_BG_DISABLED, #00_softkey_left_text_bg.png); + ADD_IMAGE_CONFIG(SOFTKEY_LEFT_TEXT_BG_PRESSED, #00_softkey_left_text_bg.png); + ADD_IMAGE_CONFIG(SOFTKEY_LEFT_TEXT_BG_HIGHLIGHTED, #00_softkey_left_text_bg.png); + + ADD_IMAGE_CONFIG(SOFTKEY_LEFT_TEXT_BG_EFFECT_NORMAL, #00_softkey_left_text_bg_ef.png); //not supported by theme + ADD_IMAGE_CONFIG(SOFTKEY_LEFT_TEXT_BG_EFFECT_PRESSED, #00_softkey_left_text_bg_ef_press.png); //not supported by theme + + ADD_IMAGE_CONFIG(SOFTKEY_RIGHT_TEXT_BG_NORMAL, #00_softkey_right_text_bg.png); + ADD_IMAGE_CONFIG(SOFTKEY_RIGHT_TEXT_BG_DISABLED, #00_softkey_right_text_bg.png); + ADD_IMAGE_CONFIG(SOFTKEY_RIGHT_TEXT_BG_PRESSED, #00_softkey_right_text_bg.png); + ADD_IMAGE_CONFIG(SOFTKEY_RIGHT_TEXT_BG_HIGHLIGHTED, #00_softkey_right_text_bg.png); + + ADD_IMAGE_CONFIG(SOFTKEY_RIGHT_TEXT_BG_EFFECT_NORMAL, #00_softkey_right_text_bg_ef.png); //not supported by theme + ADD_IMAGE_CONFIG(SOFTKEY_RIGHT_TEXT_BG_EFFECT_PRESSED, #00_softkey_right_text_bg_ef_press.png); //not supported by theme + + ADD_IMAGE_CONFIG(SOFTKEY_ICON_ADD_NORMAL, #00_softkey_icon_add.png); + ADD_IMAGE_CONFIG(SOFTKEY_ICON_ADD_DISABLED, #00_softkey_icon_add.png); + ADD_IMAGE_CONFIG(SOFTKEY_ICON_ADD_PRESSED, #00_softkey_icon_add.png); + ADD_IMAGE_CONFIG(SOFTKEY_ICON_ADD_HIGHLIGHTED, #00_softkey_icon_add.png); + + ADD_IMAGE_CONFIG(SOFTKEY_ICON_ZOOM_NORMAL, #00_softkey_icon_zoom.png); + ADD_IMAGE_CONFIG(SOFTKEY_ICON_ZOOM_DISABLED, #00_softkey_icon_zoom.png); + ADD_IMAGE_CONFIG(SOFTKEY_ICON_ZOOM_PRESSED, #00_softkey_icon_zoom.png); + ADD_IMAGE_CONFIG(SOFTKEY_ICON_ZOOM_HIGHLIGHTED, #00_softkey_icon_zoom.png); + + ADD_IMAGE_CONFIG(OPTIONKEY_BG_NORMAL, #00_option_panel_handle_bg.png); + ADD_IMAGE_CONFIG(OPTIONKEY_BG_DISABLED, #00_option_panel_handle_bg.png); + ADD_IMAGE_CONFIG(OPTIONKEY_BG_PRESSED, #00_option_panel_handle_bg_press.png); + ADD_IMAGE_CONFIG(OPTIONKEY_BG_HIGHLIGHTED, #00_option_panel_handle_bg.png); + + ADD_IMAGE_CONFIG(OPTIONKEY_HANDLE_MORE_NORMAL, #00_option_panel_handle_more.png); + ADD_IMAGE_CONFIG(OPTIONKEY_HANDLE_MORE_DISABLED, #00_option_panel_handle_more.png); + ADD_IMAGE_CONFIG(OPTIONKEY_HANDLE_MORE_PRESSED, #00_option_panel_handle_more_press.png); + ADD_IMAGE_CONFIG(OPTIONKEY_HANDLE_MORE_HIGHLIGHTED, #00_option_panel_handle_more.png); + + ADD_IMAGE_CONFIG(OPTIONKEY_BG_EFFECT_NORMAL, #00_option_panel_handle_bg_ef.png); //not supported by theme + ADD_IMAGE_CONFIG(OPTIONKEY_BG_EFFECT_PRESSED, #00_option_panel_handle_bg_ef_press.png); //not supported by theme + + ADD_IMAGE_CONFIG(TAB_ITEM_BOUNCING_EFFECT_LEFT_VERTICAL, #00_effect_footer_bounce_left.png);//98 + ADD_IMAGE_CONFIG(TAB_ITEM_BOUNCING_EFFECT_RIGHT_VERTICAL, #00_effect_footer_bounce_right.png);//98 + ADD_IMAGE_CONFIG(TAB_ITEM_BOUNCING_EFFECT_LEFT_HORIZONTAL, #00_effect_footer_bounce_left_h.png);//85 + ADD_IMAGE_CONFIG(TAB_ITEM_BOUNCING_EFFECT_RIGHT_HORIZONTAL, #00_effect_footer_bounce_right_h.png);//85 + + ADD_IMAGE_CONFIG(TAB_TEXT_DIM_EFFECT_LEFT, #00_effect_tab_text_dim_left.#.png); + ADD_IMAGE_CONFIG(TAB_TEXT_DIM_EFFECT_RIGHT, #00_effect_tab_text_dim_right.#.png); + + //SHAPE + START_UI_CONFIG_MODE(720x1280); + ADD_SHAPE_CONFIG(HEIGHT, 98); + ADD_SHAPE_CONFIG(WIDTH, 720); + ADD_SHAPE_CONFIG(LEFT_MARGIN, 26); + ADD_SHAPE_CONFIG(VERTICAL_MARGIN, 0); + 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); + ADD_SHAPE_CONFIG(FOOTER_ITEM_BUTTON_STYLE_ICON_SIZE_WITH_TEXT, 45); + ADD_SHAPE_CONFIG(FOOTER_ITEM_BUTTON_STYLE_SIDE_MARGIN, 28); + ADD_SHAPE_CONFIG(FOOTER_ITEM_BUTTON_STYLE_ITEM_GAP, 8); + ADD_SHAPE_CONFIG(FOOTER_ITEM_TEXT_TOP_MARGIN, 0); + ADD_SHAPE_CONFIG(ITEM_MINIMUM_WIDTH, 60); + ADD_SHAPE_CONFIG(COMMON_MINIMUM_MARGIN, 8); + 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, 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); + ADD_SHAPE_CONFIG(FOOTER_ITEM_WIDTH_1_MIN, 182); + ADD_SHAPE_CONFIG(FOOTER_ITEM_WIDTH_2_MAX, 240); + ADD_SHAPE_CONFIG(FOOTER_ITEM_WIDTH_2_MIN, 182); + ADD_SHAPE_CONFIG(BUTTON_ITEM_WIDTH, 115); + ADD_SHAPE_CONFIG(BUTTON_ITEM_HEIGHT, 98); + ADD_SHAPE_CONFIG(BUTTON_ITEM_ICON_SIZE, 63); + //ADD_SHAPE_CONFIG(BUTTON_ITEM_LEFT_TOUCH_MARGIN, 26); + //ADD_SHAPE_CONFIG(BUTTON_ITEM_TOP_TOUCH_MARGIN, 17.5); + //ADD_SHAPE_CONFIG(BUTTON_ITEM_RIGHT_TOUCH_MARGIN, 26); + //ADD_SHAPE_CONFIG(BUTTON_ITEM_BOTTOM_TOUCH_MARGIN, 17.5); + ADD_SHAPE_CONFIG(SOFTKEY_HEIGHT, 117);//720x1280 + ADD_SHAPE_CONFIG(SOFTKEY_TEXT_SIZE, 42); + ADD_SHAPE_CONFIG(SOFTKEY_MULTILINE_TEXT_SIZE, 38); + ADD_SHAPE_CONFIG(SOFTKEY_0_LEFT_MARGIN, 3); + ADD_SHAPE_CONFIG(SOFTKEY_TOP_MARGIN, 19); + 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); + ADD_DIMENSION_CONFIG(OPTIONKEY_RECT, 234, 117); + END_UI_CONFIG_MODE(720x1280); + + START_UI_CONFIG_MODE(1280x720); + ADD_SHAPE_CONFIG(HEIGHT, 85); + 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, 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); + ADD_SHAPE_CONFIG(FOOTER_ITEM_BUTTON_STYLE_ICON_SIZE_WITH_TEXT, 45); + ADD_SHAPE_CONFIG(FOOTER_ITEM_BUTTON_STYLE_SIDE_MARGIN, 28); + ADD_SHAPE_CONFIG(FOOTER_ITEM_BUTTON_STYLE_ITEM_GAP, 10); + ADD_SHAPE_CONFIG(FOOTER_ITEM_TEXT_TOP_MARGIN, 0);//1280x720 + ADD_SHAPE_CONFIG(ITEM_MINIMUM_WIDTH, 60); + ADD_SHAPE_CONFIG(COMMON_MINIMUM_MARGIN, 8); + 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, 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); + ADD_SHAPE_CONFIG(FOOTER_ITEM_WIDTH_1_MIN, 330);//1280x720 + ADD_SHAPE_CONFIG(FOOTER_ITEM_WIDTH_2_MAX, 496); + ADD_SHAPE_CONFIG(FOOTER_ITEM_WIDTH_2_MIN, 330); + ADD_SHAPE_CONFIG(BUTTON_ITEM_WIDTH, 115); + ADD_SHAPE_CONFIG(BUTTON_ITEM_HEIGHT, 85); + ADD_SHAPE_CONFIG(BUTTON_ITEM_ICON_SIZE, 63); + //ADD_SHAPE_CONFIG(BUTTON_ITEM_LEFT_TOUCH_MARGIN, 26); + //ADD_SHAPE_CONFIG(BUTTON_ITEM_TOP_TOUCH_MARGIN, 11); + //ADD_SHAPE_CONFIG(BUTTON_ITEM_RIGHT_TOUCH_MARGIN, 26); + //ADD_SHAPE_CONFIG(BUTTON_ITEM_BOTTOM_TOUCH_MARGIN, 11); + ADD_SHAPE_CONFIG(SOFTKEY_HEIGHT, 117); + ADD_SHAPE_CONFIG(SOFTKEY_TEXT_SIZE, 42); + ADD_SHAPE_CONFIG(SOFTKEY_MULTILINE_TEXT_SIZE, 38); + ADD_SHAPE_CONFIG(SOFTKEY_0_LEFT_MARGIN, 3); + ADD_SHAPE_CONFIG(SOFTKEY_TOP_MARGIN, 19); + 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); + ADD_DIMENSION_CONFIG(OPTIONKEY_RECT, 234, 117); + END_UI_CONFIG_MODE(1280x720); +} +END_UI_CONFIG(FOOTER); + diff --git a/src/ui/resource/FUi_ResourceFormConfig.cpp b/src/ui/resource/FUi_ResourceFormConfig.cpp new file mode 100644 index 0000000..b7b5d9f --- /dev/null +++ b/src/ui/resource/FUi_ResourceFormConfig.cpp @@ -0,0 +1,62 @@ +// +// 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_ResourceFormConfig.cpp + * @brief This is the implementation file for the color properties of Form. + */ + +#include "FUi_ResourceFormConfig.h" + +START_UI_CONFIG(FORM); +{ + ADD_COLOR_CONFIG(BG_NORMAL, $B011); + ADD_COLOR_CONFIG(INDICATOR_BG_NORMAL, $B011); + + START_UI_CONFIG_MODE(480x800); + ADD_SHAPE_CONFIG(INDICATOR_WIDTH, 480); + ADD_SHAPE_CONFIG(INDICATOR_HEIGHT, 40); + END_UI_CONFIG_MODE(480x800); + + START_UI_CONFIG_MODE(800x480); + ADD_SHAPE_CONFIG(INDICATOR_WIDTH, _SCREEN_HEIGHT_); + ADD_SHAPE_CONFIG(INDICATOR_HEIGHT, 40); + END_UI_CONFIG_MODE(800x480); + + 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); + ADD_SHAPE_CONFIG(INDICATOR_MINIMIZE_WIDTH, _SCREEN_HEIGHT_); + ADD_SHAPE_CONFIG(INDICATOR_MINIMIZE_HEIGHT, 21); + END_UI_CONFIG_MODE(1280x720); + + START_UI_CONFIG_MODE(800x480); + ADD_SHAPE_CONFIG(INDICATOR_MINIMIZE_WIDTH, _SCREEN_HEIGHT_); + ADD_SHAPE_CONFIG(INDICATOR_MINIMIZE_HEIGHT, 14); + END_UI_CONFIG_MODE(800x480); + +} +END_UI_CONFIG(FORM); diff --git a/src/ui/resource/FUi_ResourceGalleryConfig.cpp b/src/ui/resource/FUi_ResourceGalleryConfig.cpp new file mode 100644 index 0000000..8d5e008 --- /dev/null +++ b/src/ui/resource/FUi_ResourceGalleryConfig.cpp @@ -0,0 +1,34 @@ +// +// 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_ResourceGalleryConfig.cpp + * @brief This is the implementation file for the properties of Gallery. + */ +#include "FUi_ResourceGalleryConfig.h" + +START_UI_CONFIG(GALLERY); +{ + ADD_COLOR_CONFIG(EMPTY_TEXT_NORMAL, $F011L21); + + START_UI_CONFIG_MODE(480x800); + END_UI_CONFIG_MODE(480x800); + + START_UI_CONFIG_MODE(720x1280); + ADD_SHAPE_CONFIG(EMPTY_FONT_SIZE, 32); + END_UI_CONFIG_MODE(720x1280); +} +END_UI_CONFIG(GALLERY); diff --git a/src/ui/resource/FUi_ResourceGroupContainerConfig.cpp b/src/ui/resource/FUi_ResourceGroupContainerConfig.cpp new file mode 100644 index 0000000..d7ef826 --- /dev/null +++ b/src/ui/resource/FUi_ResourceGroupContainerConfig.cpp @@ -0,0 +1,38 @@ +// +// 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_ResourceGroupContainerConfig.cpp + * @brief This is the implementation file for the properties of GroupContainer. + */ + +#include "FUi_ResourceGroupContainerConfig.h" + +START_UI_CONFIG(GROUPCONTAINER); +{ + ADD_COLOR_CONFIG(NORMAL_BG, $B0217); + ADD_COLOR_CONFIG(LINE_COLOR_FG, $B0221L4); + ADD_IMAGE_CONFIG(BORDER_BG_EFFECT, #00_list_group_bg_ef.#.png); + ADD_IMAGE_CONFIG(SYSTEM_CONTROL_BG, #00_list_group_press_bg.#.png); + ADD_IMAGE_CONFIG(BG_NORMAL, #00_list_group_bg.#.png); + + START_UI_CONFIG_MODE(720x1280); + ADD_FIXED_VALUE_CONFIG(DEFAULT_MARGIN, 2); + ADD_DIMENSION_CONFIG(MIN_SIZE, 0, 0); + END_UI_CONFIG_MODE(720x1280); +} +END_UI_CONFIG(GROUPCONTAINER); diff --git a/src/ui/resource/FUi_ResourceHeaderConfig.cpp b/src/ui/resource/FUi_ResourceHeaderConfig.cpp new file mode 100644 index 0000000..1a5336d --- /dev/null +++ b/src/ui/resource/FUi_ResourceHeaderConfig.cpp @@ -0,0 +1,490 @@ +// +// 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_ResourceHeaderConfig.cpp + * @brief This is the implementation file for the properties of Header. + */ + +#include "FUi_ResourceHeaderConfig.h" + +START_UI_CONFIG(HEADER); +{ + // COLOR + ADD_COLOR_CONFIG(BG_NORMAL, $B0511); + ADD_COLOR_CONFIG(TRANSLUCENT_BG_NORMAL, $B013); + + ADD_COLOR_CONFIG(TITLE_TEXT_NORMAL, $B052L5); + ADD_COLOR_CONFIG(TRANSLUCENT_TITLE_TEXT_NORMAL, $B052L8); + + ADD_COLOR_CONFIG(DESCRIPTION_TEXT_NORMAL, $B052L5); + ADD_COLOR_CONFIG(TRANSLUCENT_DESCRIPTION_TEXT_NORMAL, $B052L8); + + // $B0543 is 0x00000000, transparent + ADD_COLOR_CONFIG(BUTTON_BG_NORMAL, $B0511); + ADD_COLOR_CONFIG(BUTTON_BG_DISABLED, $B0511); + ADD_COLOR_CONFIG(BUTTON_BG_PRESSED, $B0511); + ADD_COLOR_CONFIG(BUTTON_BG_HIGHLIGHTED, $W161); + + ADD_COLOR_CONFIG(BUTTON_TRANSLUCENT_BG_NORMAL, $B013); + ADD_COLOR_CONFIG(BUTTON_TRANSLUCENT_BG_DISABLED, $B013); + ADD_COLOR_CONFIG(BUTTON_TRANSLUCENT_BG_PRESSED, $B013); + ADD_COLOR_CONFIG(BUTTON_TRANSLUCENT_BG_HIGHLIGHTED, $W161); + + ADD_COLOR_CONFIG(BUTTON_TEXT_NORMAL, $B052L5); + ADD_COLOR_CONFIG(BUTTON_TEXT_DISABLED, $B052L5D); + ADD_COLOR_CONFIG(BUTTON_TEXT_PRESSED, $B052L5P); + ADD_COLOR_CONFIG(BUTTON_TEXT_HIGHLIGHTED, $B052L5); + + ADD_COLOR_CONFIG(BUTTON_TRANSLUCENT_TEXT_NORMAL, $B052L8); + ADD_COLOR_CONFIG(BUTTON_TRANSLUCENT_TEXT_DISABLED, $B052L8D); + ADD_COLOR_CONFIG(BUTTON_TRANSLUCENT_TEXT_PRESSED, $B052L8P); + ADD_COLOR_CONFIG(BUTTON_TRANSLUCENT_TEXT_HIGHLIGHTED, $B052L8); + + ADD_COLOR_CONFIG(SEGMENTED_ITEM_BG_NORMAL, $B0511); + ADD_COLOR_CONFIG(SEGMENTED_ITEM_BG_DISABLED, $B0511); + ADD_COLOR_CONFIG(SEGMENTED_ITEM_BG_PRESSED, $B0514P1); + ADD_COLOR_CONFIG(SEGMENTED_ITEM_BG_HIGHLIGHTED, $B0514P2); + ADD_COLOR_CONFIG(SEGMENTED_ITEM_BG_SELECTED, $B0511); + + ADD_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_NORMAL, $B013); + ADD_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_DISABLED, $B013); + ADD_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_PRESSED, $B013); + ADD_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_HIGHLIGHTED, $B0514P2); + ADD_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_SELECTED, $B013); + + ADD_COLOR_CONFIG(SEGMENTED_ITEM_TEXT_NORMAL, $B052L6); + ADD_COLOR_CONFIG(SEGMENTED_ITEM_TEXT_DISABLED, $B052L6D); + ADD_COLOR_CONFIG(SEGMENTED_ITEM_TEXT_PRESSED, $B052L6P2); + ADD_COLOR_CONFIG(SEGMENTED_ITEM_TEXT_HIGHLIGHTED, $B052L6); + ADD_COLOR_CONFIG(SEGMENTED_ITEM_TEXT_SELECTED, $B052L6P1); + + ADD_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_TEXT_NORMAL, $B052L8); + ADD_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_TEXT_DISABLED, $B052L8D); + ADD_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_TEXT_PRESSED, $B052L8P); + ADD_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED, $B052L8); + ADD_COLOR_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_TEXT_SELECTED, $B052L8); + + ADD_COLOR_CONFIG(TAB_ITEM_BG_NORMAL, $B0511); + ADD_COLOR_CONFIG(TAB_ITEM_BG_DISABLED, $B0511); + ADD_COLOR_CONFIG(TAB_ITEM_BG_PRESSED, $B0514P1); + ADD_COLOR_CONFIG(TAB_ITEM_BG_HIGHLIGHTED, $B0514P2); + ADD_COLOR_CONFIG(TAB_ITEM_BG_SELECTED, $B0511); + + ADD_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_BG_NORMAL, $B013); + ADD_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_BG_DISABLED, $B013); + ADD_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_BG_PRESSED, $B013); + ADD_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_BG_HIGHLIGHTED, $B0514P2); + ADD_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_BG_SELECTED, $B013); + + ADD_COLOR_CONFIG(TAB_ITEM_TEXT_NORMAL, $B052L6); + ADD_COLOR_CONFIG(TAB_ITEM_TEXT_DISABLED, $B052L6D); + ADD_COLOR_CONFIG(TAB_ITEM_TEXT_PRESSED, $B052L6P2); + ADD_COLOR_CONFIG(TAB_ITEM_TEXT_HIGHLIGHTED, $B052L6); + ADD_COLOR_CONFIG(TAB_ITEM_TEXT_SELECTED, $B052L6P1); + + ADD_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_TEXT_NORMAL, $B052L8); + ADD_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_TEXT_DISABLED, $B052L8D); + ADD_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_TEXT_PRESSED, $B052L8P); + ADD_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED, $B052L8); + ADD_COLOR_CONFIG(TAB_ITEM_TRANSLUCENT_TEXT_SELECTED, $B052L8); + + ADD_COLOR_CONFIG(BUTTON_ITEM_BG_NORMAL, $B0511); + ADD_COLOR_CONFIG(BUTTON_ITEM_BG_DISABLED, $B0511); + ADD_COLOR_CONFIG(BUTTON_ITEM_BG_PRESSED, $B0514P1); + ADD_COLOR_CONFIG(BUTTON_ITEM_BG_HIGHLIGHTED, $B0514P2); + + ADD_COLOR_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_NORMAL, $B013); + ADD_COLOR_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_DISABLED, $B013); + ADD_COLOR_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_PRESSED, $B013); + ADD_COLOR_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_HIGHLIGHTED, $B0514P2); + + ADD_COLOR_CONFIG(BUTTON_ITEM_TEXT_NORMAL, $B052L4); + ADD_COLOR_CONFIG(BUTTON_ITEM_TEXT_DISABLED, $B052L4D); + ADD_COLOR_CONFIG(BUTTON_ITEM_TEXT_PRESSED, $B052L4P); + ADD_COLOR_CONFIG(BUTTON_ITEM_TEXT_HIGHLIGHTED, $B052L4); + + ADD_COLOR_CONFIG(BUTTON_ITEM_TRANSLUCENT_TEXT_NORMAL, $B052L9); + ADD_COLOR_CONFIG(BUTTON_ITEM_TRANSLUCENT_TEXT_DISABLED, $B052L9D); + ADD_COLOR_CONFIG(BUTTON_ITEM_TRANSLUCENT_TEXT_PRESSED, $B052L9P); + ADD_COLOR_CONFIG(BUTTON_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED, $B052L9); + + ADD_COLOR_CONFIG(BADGE_ICON_BG_NORMAL, $B0519); + ADD_COLOR_CONFIG(BADGE_ICON_TEXT_NORMAL, $B052L7); + + ADD_COLOR_CONFIG(DIVIDER_LINE_LEFT_NORMAL, $B0221L2); + ADD_COLOR_CONFIG(DIVIDER_LINE_RIGHT_NORMAL, $B0221L2); + + ADD_COLOR_CONFIG(DIVIDER_LINE_LEFT_TRANSLUCENT_NORMAL, $B0221L2); + ADD_COLOR_CONFIG(DIVIDER_LINE_RIGHT_TRANSLUCENT_NORMAL, $B0221L2); + + ADD_COLOR_CONFIG(SELECTED_BAR_BG_NORMAL, $B052L1P); + ADD_COLOR_CONFIG(SELECTED_BAR_TRANSLUCENT_BG_NORMAL, $B052L1P); + + ADD_COLOR_CONFIG(BOUNCING_EFFECT, $B018); + + ADD_COLOR_CONFIG(TAB_TEXT_DIM_NORMAL, $B0514); + ADD_COLOR_CONFIG(TAB_TEXT_DIM_TRANSLUCENT_NORMAL, $B013); + + //ADD_COLOR_CONFIG(TITLE_TEXT_DIM_NORMAL, $B0511); + ADD_COLOR_CONFIG(TITLE_TEXT_DIM_TRANSLUCENT_NORMAL, $B013); + + ADD_COLOR_CONFIG(SUB_TITLE_EFFECT_NORMAL, $B0511); + + // BITMAP + ADD_IMAGE_CONFIG(BG_NORMAL, #00_title_bg.#.png); + ADD_IMAGE_CONFIG(TRANSLUCENT_BG_NORMAL, #00_title_bg.#.png); + + ADD_IMAGE_CONFIG(BG_EFFECT_NORMAL, #00_title_bg_ef.#.png); + ADD_IMAGE_CONFIG(TRANSLUCENT_BG_EFFECT_NORMAL, #00_title_bg_ef.#.png); + + ADD_IMAGE_CONFIG(BUTTON_BG_NORMAL, #00_title_bg.#.png); + ADD_IMAGE_CONFIG(BUTTON_BG_DISABLED, #00_title_bg.#.png); + ADD_IMAGE_CONFIG(BUTTON_BG_PRESSED, #00_title_bg.#.png); + ADD_IMAGE_CONFIG(BUTTON_BG_HIGHLIGHTED, #00_focus.#.png); + + ADD_IMAGE_CONFIG(BUTTON_BG_EFFECT_NORMAL, #00_title_bg_ef.#.png); + ADD_IMAGE_CONFIG(BUTTON_BG_EFFECT_PRESSED, #00_title_press_ef.#.png); + + ADD_IMAGE_CONFIG(BUTTON_TRANSLUCENT_BG_NORMAL, #00_title_bg.#.png);//added + ADD_IMAGE_CONFIG(BUTTON_TRANSLUCENT_BG_DISABLED, #00_title_bg.#.png);//added + ADD_IMAGE_CONFIG(BUTTON_TRANSLUCENT_BG_PRESSED, #00_title_bg.#.png);//added + ADD_IMAGE_CONFIG(BUTTON_TRANSLUCENT_BG_HIGHLIGHTED, #00_focus.#.png);//added + + ADD_IMAGE_CONFIG(BUTTON_TRANSLUCENT_BG_EFFECT_NORMAL, #00_title_bg_ef.#.png); + ADD_IMAGE_CONFIG(BUTTON_TRANSLUCENT_BG_EFFECT_PRESSED, #00_title_press_ef.#.png); + + ADD_IMAGE_CONFIG(SEGMENTED_ITEM_BG_NORMAL, #00_title_bg.#.png);//added + ADD_IMAGE_CONFIG(SEGMENTED_ITEM_BG_DISABLED, #00_title_bg.#.png);//added + ADD_IMAGE_CONFIG(SEGMENTED_ITEM_BG_PRESSED, #00_tab_press_bg.#.png);//added + ADD_IMAGE_CONFIG(SEGMENTED_ITEM_BG_HIGHLIGHTED, #00_tab_focus.#.png);//added + ADD_IMAGE_CONFIG(SEGMENTED_ITEM_BG_SELECTED, #00_title_bg.#.png);//added + + ADD_IMAGE_CONFIG(SEGMENTED_ITEM_BG_EFFECT_NORMAL, #00_title_bg_ef.#.png); + ADD_IMAGE_CONFIG(SEGMENTED_ITEM_BG_EFFECT_PRESSED, #00_tab_press_ef.#.png); + + ADD_IMAGE_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_NORMAL, #00_title_bg.#.png);//added + ADD_IMAGE_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_DISABLED, #00_title_bg.#.png);//added + ADD_IMAGE_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_PRESSED, #00_tab_press_bg.#.png);//added + ADD_IMAGE_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_HIGHLIGHTED, #00_tab_focus.#.png);//added + ADD_IMAGE_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_SELECTED, #00_title_bg.#.png);//added + + ADD_IMAGE_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_EFFECT_NORMAL, #00_title_bg_ef.#.png); + ADD_IMAGE_CONFIG(SEGMENTED_ITEM_TRANSLUCENT_BG_EFFECT_PRESSED, #00_tab_press_ef.#.png); + + ADD_IMAGE_CONFIG(TAB_ITEM_BG_NORMAL, #00_title_bg.#.png); + ADD_IMAGE_CONFIG(TAB_ITEM_BG_DISABLED, #00_title_bg.#.png); + ADD_IMAGE_CONFIG(TAB_ITEM_BG_PRESSED, #00_tab_press_bg.#.png); + ADD_IMAGE_CONFIG(TAB_ITEM_BG_HIGHLIGHTED, #00_tab_focus.#.png); + ADD_IMAGE_CONFIG(TAB_ITEM_BG_SELECTED, #00_title_bg.#.png); + + ADD_IMAGE_CONFIG(TAB_ITEM_BG_EFFECT_NORMAL, #00_title_bg_ef.#.png); + ADD_IMAGE_CONFIG(TAB_ITEM_BG_EFFECT_PRESSED, #00_tab_press_ef.#.png); + + ADD_IMAGE_CONFIG(TAB_ITEM_TRANSLUCENT_BG_NORMAL, #00_title_bg.#.png);//added + ADD_IMAGE_CONFIG(TAB_ITEM_TRANSLUCENT_BG_DISABLED, #00_title_bg.#.png);//added + ADD_IMAGE_CONFIG(TAB_ITEM_TRANSLUCENT_BG_PRESSED, #00_tab_press_bg.#.png);//added + ADD_IMAGE_CONFIG(TAB_ITEM_TRANSLUCENT_BG_HIGHLIGHTED, #00_tab_focus.#.png);//added + ADD_IMAGE_CONFIG(TAB_ITEM_TRANSLUCENT_BG_SELECTED, #00_title_bg.#.png);//added + + ADD_IMAGE_CONFIG(TAB_ITEM_TRANSLUCENT_BG_EFFECT_NORMAL, #00_title_bg_ef.#.png); + ADD_IMAGE_CONFIG(TAB_ITEM_TRANSLUCENT_BG_EFFECT_PRESSED, #00_tab_press_ef.#.png); + + //ADD_IMAGE_CONFIG(TAB_ITEM_BG_EFFECT_PRESSED, #00_tab_press_ef.#.png); + ADD_IMAGE_CONFIG(TAB_ITEM_SELECTED, #00_tab_select_bar.#.png); + + ADD_IMAGE_CONFIG(BUTTON_ITEM_BG_NORMAL, #00_title_bg.#.png); + ADD_IMAGE_CONFIG(BUTTON_ITEM_BG_DISABLED, #00_title_bg.#.png); + ADD_IMAGE_CONFIG(BUTTON_ITEM_BG_PRESSED, #00_title_bg.#.png); + ADD_IMAGE_CONFIG(BUTTON_ITEM_BG_HIGHLIGHTED, #00_focus.#.png); + + ADD_IMAGE_CONFIG(BUTTON_ITEM_BG_EFFECT_NORMAL, #00_title_bg_ef.#.png); //not supported by theme + ADD_IMAGE_CONFIG(BUTTON_ITEM_BG_EFFECT_PRESSED, #00_title_press_ef.#.png); //not supported by theme + + ADD_IMAGE_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_NORMAL, #00_title_bg.#.png); + ADD_IMAGE_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_DISABLED, #00_title_bg.#.png); + ADD_IMAGE_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_PRESSED, #00_title_bg.#.png); + ADD_IMAGE_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_HIGHLIGHTED, #00_focus.#.png); + + ADD_IMAGE_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_EFFECT_NORMAL, #00_title_bg_ef.#.png); //not supported by theme + ADD_IMAGE_CONFIG(BUTTON_ITEM_TRANSLUCENT_BG_EFFECT_PRESSED, #00_title_press_ef.#.png); //not supported by theme + + ADD_IMAGE_CONFIG(TAB_ITEM_BOUNCING_EFFECT_LEFT_VERTICAL, #00_effect_tab_bounce_left.png);//96 + ADD_IMAGE_CONFIG(TAB_ITEM_BOUNCING_EFFECT_RIGHT_VERTICAL, #00_effect_tab_bounce_right.png);//96 + ADD_IMAGE_CONFIG(TAB_ITEM_BOUNCING_EFFECT_LEFT_HORIZONTAL, #00_effect_tab_bounce_left_h.png);//91 + ADD_IMAGE_CONFIG(TAB_ITEM_BOUNCING_EFFECT_RIGHT_HORIZONTAL,#00_effect_tab_bounce_right_h.png);//91 + ADD_IMAGE_CONFIG(TITLE_TAB_ITEM_BOUNCING_EFFECT_LEFT, #00_effect_title_tab_bounce_left.png);//75 + ADD_IMAGE_CONFIG(TITLE_TAB_ITEM_BOUNCING_EFFECT_RIGHT, #00_effect_title_tab_bounce_right.png);//75 + ADD_IMAGE_CONFIG(TAB_LARGE_ITEM_BOUNCING_EFFECT_LEFT, #00_effect_tab_bounce_left_02.png);//126 + ADD_IMAGE_CONFIG(TAB_LARGE_ITEM_BOUNCING_EFFECT_RIGHT, #00_effect_tab_bounce_right_02.png);//126 + + ADD_IMAGE_CONFIG(TITLE_TEXT_DIM_EFFECT_LEFT, #00_effect_title_text_dim_left.#.png); + ADD_IMAGE_CONFIG(TITLE_TEXT_DIM_EFFECT_RIGHT, #00_effect_title_text_dim_right.#.png); + ADD_IMAGE_CONFIG(TAB_TEXT_DIM_EFFECT_LEFT, #00_effect_tab_text_dim_left.#.png); + ADD_IMAGE_CONFIG(TAB_TEXT_DIM_EFFECT_RIGHT, #00_effect_tab_text_dim_right.#.png); + + ADD_IMAGE_CONFIG(SUB_TITLE_EFFECT, #00_sub_title_ef.#.png); + + START_ANIMATION_CONFIG(PROCESSING_ANIMATION); + ADD_ANIMATION_FRAME(#00_header_process_01.png, 16); + ADD_ANIMATION_FRAME(#00_header_process_02.png, 16); + ADD_ANIMATION_FRAME(#00_header_process_03.png, 16); + ADD_ANIMATION_FRAME(#00_header_process_04.png, 16); + ADD_ANIMATION_FRAME(#00_header_process_05.png, 16); + ADD_ANIMATION_FRAME(#00_header_process_06.png, 16); + ADD_ANIMATION_FRAME(#00_header_process_07.png, 16); + ADD_ANIMATION_FRAME(#00_header_process_08.png, 16); + ADD_ANIMATION_FRAME(#00_header_process_09.png, 16); + ADD_ANIMATION_FRAME(#00_header_process_10.png, 16); + ADD_ANIMATION_FRAME(#00_header_process_11.png, 16); + ADD_ANIMATION_FRAME(#00_header_process_12.png, 16); + ADD_ANIMATION_FRAME(#00_header_process_13.png, 16); + ADD_ANIMATION_FRAME(#00_header_process_14.png, 16); + ADD_ANIMATION_FRAME(#00_header_process_15.png, 16); + ADD_ANIMATION_FRAME(#00_header_process_16.png, 16); + ADD_ANIMATION_FRAME(#00_header_process_17.png, 16); + ADD_ANIMATION_FRAME(#00_header_process_18.png, 16); + ADD_ANIMATION_FRAME(#00_header_process_19.png, 16); + ADD_ANIMATION_FRAME(#00_header_process_20.png, 16); + ADD_ANIMATION_FRAME(#00_header_process_21.png, 16); + ADD_ANIMATION_FRAME(#00_header_process_22.png, 16); + ADD_ANIMATION_FRAME(#00_header_process_23.png, 16); + ADD_ANIMATION_FRAME(#00_header_process_24.png, 16); + ADD_ANIMATION_FRAME(#00_header_process_25.png, 16); + ADD_ANIMATION_FRAME(#00_header_process_26.png, 16); + ADD_ANIMATION_FRAME(#00_header_process_27.png, 16); + ADD_ANIMATION_FRAME(#00_header_process_28.png, 16); + ADD_ANIMATION_FRAME(#00_header_process_29.png, 16); + ADD_ANIMATION_FRAME(#00_header_process_30.png, 16); + END_ANIMATION_CONFIG(PROCESSING_ANIMATION); + + ADD_IMAGE_CONFIG(BADGE_ICON_BG_NORMAL, #00_badge_bg.#.png); + ADD_IMAGE_CONFIG(BADGE_ICON_BG_EFFECT_NORMAL, #00_badge_bg_ef.#.png); //not supported by theme + + // SHAPE + START_UI_CONFIG_MODE(720x1280); + ADD_SHAPE_CONFIG(HEIGHT, 96); + ADD_SHAPE_CONFIG(WIDTH, 720); + ADD_SHAPE_CONFIG(LEFT_MARGIN, 26); + ADD_SHAPE_CONFIG(TOP_MARGIN, 0); + ADD_SHAPE_CONFIG(RIGHT_MARGIN, 26); + + ADD_SHAPE_CONFIG(TITLE_FONT_SIZE, 50); + 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); + ADD_SHAPE_CONFIG(SEGMENTED_ITEM_MULTILINE_FONT_SIZE, 30); + ADD_SHAPE_CONFIG(SEGMENTED_ITEM_FONT_SIZE_3_ITEM, 30); + ADD_SHAPE_CONFIG(SEGMENTED_ITEM_FONT_SIZE_4_ITEM, 30); + ADD_SHAPE_CONFIG(TAB_ITEM_FONT_SIZE, 30); + ADD_SHAPE_CONFIG(TAB_ITEM_MULTILINE_FONT_SIZE, 30); + 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(TITLE_DISPLAY_HEIGHT, 96); + ADD_SHAPE_CONFIG(TITLE_TOP_MARGIN_WITH_DESCRIPTION, 4); + ADD_SHAPE_CONFIG(TITLE_TOTAL_HEIGHT_WITH_SEGMENTED_ITEM, 165); + ADD_SHAPE_CONFIG(TITLE_TOP_MARGIN_WITH_SEGMENTED_ITEM, 0); + ADD_SHAPE_CONFIG(TITLE_HEIGHT_WITH_SEGMENTED_ITEM, 90); + ADD_SHAPE_CONFIG(TITLE_DISPLAY_HEIGHT_WITH_SEGMENTED_ITEM, 90); + ADD_SHAPE_CONFIG(DESCRIPTION_TEXT_HEIGHT, 37); + + ADD_SHAPE_CONFIG(BUTTON_ITEM_WIDTH, 115); + ADD_SHAPE_CONFIG(BUTTON_ITEM_WIDTH_WITH_TEXT, 183); + ADD_SHAPE_CONFIG(BUTTON_ITEM_MARGIN_WITH_TEXT, 16); + ADD_SHAPE_CONFIG(BUTTON_ITEM_HEIGHT, 96); + ADD_SHAPE_CONFIG(BUTTON_ITEM_GAP, 2); + ADD_SHAPE_CONFIG(BUTTON_ITEM_TOP_MARGIN, 0); + //ADD_SHAPE_CONFIG(BUTTON_ITEM_ICON_TOP_MARGIN, 0); + ADD_SHAPE_CONFIG(BUTTON_ITEM_ICON_SIZE, 63); + + //ADD_SHAPE_CONFIG(BUTTON_ITEM_LEFT_TOUCH_MARGIN, 26); + //ADD_SHAPE_CONFIG(BUTTON_ITEM_TOP_TOUCH_MARGIN, 16.5); + //ADD_SHAPE_CONFIG(BUTTON_ITEM_RIGHT_TOUCH_MARGIN, 26); + //ADD_SHAPE_CONFIG(BUTTON_ITEM_BOTTOM_TOUCH_MARGIN, 16.5); + + //ADD_SHAPE_CONFIG(TAB_BUTTON_ITEM_LEFT_TOUCH_MARGIN, 26); + //ADD_SHAPE_CONFIG(TAB_BUTTON_ITEM_TOP_TOUCH_MARGIN, 13.5); + //ADD_SHAPE_CONFIG(TAB_BUTTON_ITEM_RIGHT_TOUCH_MARGIN, 26); + //ADD_SHAPE_CONFIG(TAB_BUTTON_ITEM_BOTTOM_TOUCH_MARGIN, 13.5); + + //ADD_SHAPE_CONFIG(SIP_BUTTON_ITEM_LEFT_TOUCH_MARGIN, 26); + //ADD_SHAPE_CONFIG(SIP_BUTTON_ITEM_TOP_TOUCH_MARGIN, 16.5); + //ADD_SHAPE_CONFIG(SIP_BUTTON_ITEM_RIGHT_TOUCH_MARGIN, 26); + //ADD_SHAPE_CONFIG(SIP_BUTTON_ITEM_BOTTOM_TOUCH_MARGIN, 16.5); + + ADD_SHAPE_CONFIG(SEGMENTED_ITEM_HEIGHT, 75); + + ADD_SHAPE_CONFIG(TAB_ITEM_ICON_SIZE, 63); + ADD_SHAPE_CONFIG(TAB_ITEM_ICON_SIZE_WITH_TEXT, 45); + //ADD_SHAPE_CONFIG(TAB_LEFT_MARGIN, 0); + + ADD_SHAPE_CONFIG(SIP_BUTTON_ITEM_TOP_MARGIN, 0); + ADD_SHAPE_CONFIG(SIP_FOOTER_ITEM_TOP_MARGIN, 16.5); + + ADD_SHAPE_CONFIG(ICON_WIDTH, 45); + ADD_SHAPE_CONFIG(ICON_TEXT_GAP, 8); + ADD_SHAPE_CONFIG(ICON_RIGHT_MARGIN, 16); + + ADD_SHAPE_CONFIG(DIVIDER_WIDTH, 2); + ADD_SHAPE_CONFIG(DIVIDER_HEIGHT, 48); + + 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_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); + + ADD_SHAPE_CONFIG(HEADER_ITEM_SELECTED_BITMAP_MARGIN, 0); + ADD_SHAPE_CONFIG(HEADER_ITEM_SELECTED_BITMAP_HEIGHT, 10); + + ADD_SHAPE_CONFIG(PROCESSING_ANIMATION_ICON_SIZE, 36); + ADD_SHAPE_CONFIG(PROCESSING_ANIMATION_ICON_GAP, 16); + + ADD_SHAPE_CONFIG(TITLE_MINIMUM_WIDTH, 60); + ADD_SHAPE_CONFIG(ITEM_MINIMUM_WIDTH, 60); + ADD_SHAPE_CONFIG(COMMON_MINIMUM_MARGIN, 8); + + ADD_SHAPE_CONFIG(TAB_LARGE_HEIGHT, 126); + ADD_SHAPE_CONFIG(TAB_LARGE_TOP_MARGIN, 15); + ADD_SHAPE_CONFIG(TAB_LARGE_TEXT_HEIGHT, 38); + ADD_SHAPE_CONFIG(TAB_LARGE_DIVIDER_HEIGHT, 88); + + ADD_SHAPE_CONFIG(TAB_TEXT_DIM_WIDTH, 45); + ADD_SHAPE_CONFIG(TITLE_TEXT_DIM_WIDTH, 63); + + END_UI_CONFIG_MODE(720x1280); + + START_UI_CONFIG_MODE(1280x720); + ADD_SHAPE_CONFIG(HEIGHT, 91); + ADD_SHAPE_CONFIG(WIDTH, _SCREEN_HEIGHT_); + ADD_SHAPE_CONFIG(LEFT_MARGIN, 26); + ADD_SHAPE_CONFIG(TOP_MARGIN, 0); + ADD_SHAPE_CONFIG(RIGHT_MARGIN, 26); + + ADD_SHAPE_CONFIG(TITLE_FONT_SIZE, 50); + ADD_SHAPE_CONFIG(TITLE_FONT_SIZE_WITH_DESCRIPTION, 38); + ADD_SHAPE_CONFIG(TITLE_FONT_SIZE_WITH_SEGMENTED, 38); + ADD_SHAPE_CONFIG(DESCRIPTION_TEXT_FONT_SIZE, 28); + 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); + ADD_SHAPE_CONFIG(SEGMENTED_ITEM_MULTILINE_FONT_SIZE, 30); + ADD_SHAPE_CONFIG(SEGMENTED_ITEM_FONT_SIZE_3_ITEM, 30); + ADD_SHAPE_CONFIG(SEGMENTED_ITEM_FONT_SIZE_4_ITEM, 30); + ADD_SHAPE_CONFIG(TAB_ITEM_FONT_SIZE, 30);//1280x720 + ADD_SHAPE_CONFIG(TAB_ITEM_MULTILINE_FONT_SIZE, 30); + 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(TITLE_DISPLAY_HEIGHT, 91); + ADD_SHAPE_CONFIG(TITLE_TOP_MARGIN_WITH_DESCRIPTION, 7.5); + ADD_SHAPE_CONFIG(TITLE_TOTAL_HEIGHT_WITH_SEGMENTED_ITEM, 145); + 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, 34); + + ADD_SHAPE_CONFIG(BUTTON_ITEM_WIDTH, 115); + ADD_SHAPE_CONFIG(BUTTON_ITEM_WIDTH_WITH_TEXT, 183); + ADD_SHAPE_CONFIG(BUTTON_ITEM_MARGIN_WITH_TEXT, 16); + ADD_SHAPE_CONFIG(BUTTON_ITEM_HEIGHT, 91); + ADD_SHAPE_CONFIG(BUTTON_ITEM_GAP, 2); + ADD_SHAPE_CONFIG(BUTTON_ITEM_TOP_MARGIN, 0); + //ADD_SHAPE_CONFIG(BUTTON_ITEM_ICON_TOP_MARGIN, 0); + ADD_SHAPE_CONFIG(BUTTON_ITEM_ICON_SIZE, 63); + + //ADD_SHAPE_CONFIG(BUTTON_ITEM_LEFT_TOUCH_MARGIN, 26); + //ADD_SHAPE_CONFIG(BUTTON_ITEM_TOP_TOUCH_MARGIN, 14); + //ADD_SHAPE_CONFIG(BUTTON_ITEM_RIGHT_TOUCH_MARGIN, 26); + //ADD_SHAPE_CONFIG(BUTTON_ITEM_BOTTOM_TOUCH_MARGIN, 14); + + //ADD_SHAPE_CONFIG(TAB_BUTTON_ITEM_LEFT_TOUCH_MARGIN, 26); + //ADD_SHAPE_CONFIG(TAB_BUTTON_ITEM_TOP_TOUCH_MARGIN, 3.5); + //ADD_SHAPE_CONFIG(TAB_BUTTON_ITEM_RIGHT_TOUCH_MARGIN, 26); + //ADD_SHAPE_CONFIG(TAB_BUTTON_ITEM_BOTTOM_TOUCH_MARGIN, 3.5); + + //ADD_SHAPE_CONFIG(SIP_BUTTON_ITEM_LEFT_TOUCH_MARGIN, 26); + //ADD_SHAPE_CONFIG(SIP_BUTTON_ITEM_TOP_TOUCH_MARGIN, 14); + //ADD_SHAPE_CONFIG(SIP_BUTTON_ITEM_RIGHT_TOUCH_MARGIN, 26); + //ADD_SHAPE_CONFIG(SIP_BUTTON_ITEM_BOTTOM_TOUCH_MARGIN, 14); + + ADD_SHAPE_CONFIG(SEGMENTED_ITEM_HEIGHT, 75); + + ADD_SHAPE_CONFIG(TAB_ITEM_ICON_SIZE, 63); + ADD_SHAPE_CONFIG(TAB_ITEM_ICON_SIZE_WITH_TEXT, 45); + //ADD_SHAPE_CONFIG(TAB_LEFT_MARGIN, 0); + + ADD_SHAPE_CONFIG(SIP_BUTTON_ITEM_TOP_MARGIN, 0);//1280x720 + ADD_SHAPE_CONFIG(SIP_FOOTER_ITEM_TOP_MARGIN, 14); + + ADD_SHAPE_CONFIG(ICON_WIDTH, 45); + ADD_SHAPE_CONFIG(ICON_TEXT_GAP, 8); + ADD_SHAPE_CONFIG(ICON_RIGHT_MARGIN, 16); + + ADD_SHAPE_CONFIG(DIVIDER_WIDTH, 2); + ADD_SHAPE_CONFIG(DIVIDER_HEIGHT, 48); + + 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_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); + + ADD_SHAPE_CONFIG(HEADER_ITEM_SELECTED_BITMAP_MARGIN, 0); + ADD_SHAPE_CONFIG(HEADER_ITEM_SELECTED_BITMAP_HEIGHT, 5); + + ADD_SHAPE_CONFIG(PROCESSING_ANIMATION_ICON_SIZE, 36); + ADD_SHAPE_CONFIG(PROCESSING_ANIMATION_ICON_GAP, 16); + + ADD_SHAPE_CONFIG(TITLE_MINIMUM_WIDTH, 60); + ADD_SHAPE_CONFIG(ITEM_MINIMUM_WIDTH, 60); + ADD_SHAPE_CONFIG(COMMON_MINIMUM_MARGIN, 8); + + ADD_SHAPE_CONFIG(TAB_LARGE_HEIGHT, 126); + ADD_SHAPE_CONFIG(TAB_LARGE_TOP_MARGIN, 15); + ADD_SHAPE_CONFIG(TAB_LARGE_TEXT_HEIGHT, 38); + ADD_SHAPE_CONFIG(TAB_LARGE_DIVIDER_HEIGHT, 88); + + ADD_SHAPE_CONFIG(TAB_TEXT_DIM_WIDTH, 45); + ADD_SHAPE_CONFIG(TITLE_TEXT_DIM_WIDTH, 63); + + END_UI_CONFIG_MODE(1280x720); +} +END_UI_CONFIG(HEADER); diff --git a/src/ui/resource/FUi_ResourceIconListConfig.cpp b/src/ui/resource/FUi_ResourceIconListConfig.cpp new file mode 100644 index 0000000..fdba6e7 --- /dev/null +++ b/src/ui/resource/FUi_ResourceIconListConfig.cpp @@ -0,0 +1,86 @@ +// +// 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_ResourceIconListConfig.cpp + * @brief This is the implementation file for the shape and color properties of IconListView. + */ + +#include "FUi_ResourceIconListConfig.h" + +START_UI_CONFIG(ICONLIST); +{ + ADD_COLOR_CONFIG(EMPTY_TEXT_NORMAL, $F011L21); + ADD_COLOR_CONFIG(TEXT_NORMAL, $F011L1); + ADD_COLOR_CONFIG(TEXT_PRESSED, $F011L1); + ADD_COLOR_CONFIG(TEXT_HIGHLIGHTED, $F011L1); + ADD_COLOR_CONFIG(INNER_TEXT_NORMAL, $F011L1P); + ADD_COLOR_CONFIG(INNER_TEXT_PRESSED, $F011L1P); + ADD_COLOR_CONFIG(INNER_TEXT_HIGHLIGHTED, $F011L1P); + ADD_COLOR_CONFIG(INNER_TEXT_BG_NORMAL, $B013); + ADD_COLOR_CONFIG(ITEM_BG_PRESSED, $B013); + ADD_COLOR_CONFIG(ITEM_BORDER_NORMAL, $W151); + ADD_COLOR_CONFIG(ITEM_BORDER_PRESSED, $W151); + ADD_COLOR_CONFIG(ITEM_BORDER_HIGHLIGHTED, $W153); + ADD_IMAGE_CONFIG(ITEM_BORDER_NORMAL, #00_thumbs_line_bg.#.png); + ADD_IMAGE_CONFIG(ITEM_BORDER_PRESSED, #00_thumbs_line_bg.#.png); + ADD_IMAGE_CONFIG(ITEM_BORDER_HIGHLIGHTED, #00_thumbs_bg_focus.#.png); + ADD_IMAGE_CONFIG(CHECK_BG_NORMAL, #00_check_bg.png); + ADD_IMAGE_CONFIG(CHECK_BG_SELECTED, #00_check_bg.png); + ADD_IMAGE_CONFIG(CHECK_SELECTED, #00_check_activated.png); + + START_UI_CONFIG_MODE(720x1280); + ADD_SHAPE_CONFIG(TOP_MARGIN, 8); + ADD_SHAPE_CONFIG(BOTTOM_MARGIN, 8); + ADD_SHAPE_CONFIG(LEFT_MARGIN, 3); + ADD_SHAPE_CONFIG(RIGHT_MARGIN, 3); + ADD_SHAPE_CONFIG(HORIZONTAL_LEFT_MARGIN, 8); + ADD_SHAPE_CONFIG(HORIZONTAL_RIGHT_MARGIN, 8); + ADD_SHAPE_CONFIG(HORIZONTAL_SPACING, 2); + ADD_SHAPE_CONFIG(VERTICAL_SPACING, 2); + ADD_SHAPE_CONFIG(OUTSIDE_TEXT_TOP_MARGIN, 8); + ADD_SHAPE_CONFIG(OUTSIDE_TEXT_BOTTOM_MARGIN, 8); + ADD_SHAPE_CONFIG(OUTSIDE_TEXT_LEFT_MARGIN, 6); + ADD_SHAPE_CONFIG(OUTSIDE_TEXT_RIGHT_MARGIN, 6); + ADD_SHAPE_CONFIG(OUTSIDE_TEXT_VERTICAL_SPACING, 2); + ADD_SHAPE_CONFIG(FONT_SIZE, 26); + ADD_FIXED_VALUE_CONFIG(MINIMUM_FONT_SIZE, 6); + ADD_SHAPE_CONFIG(INSIDE_FONT_SIZE, 26); + ADD_SHAPE_CONFIG(OUTSIDE_FONT_SIZE, 26); + ADD_SHAPE_CONFIG(EMPTY_FONT_SIZE, 32); + ADD_SHAPE_CONFIG(EMPTY_TEXT_HEIGHT, 38); + ADD_SHAPE_CONFIG(INSIDE_ONE_LINE_TEXT_HEIGHT, 36); + ADD_SHAPE_CONFIG(INSIDE_TWO_LINE_TEXT_HEIGHT, 64); + ADD_SHAPE_CONFIG(VERTICAL_EXTENT, 64); + ADD_FIXED_VALUE_CONFIG(DROP_SHADOW_WIDTH, 18); + ADD_FIXED_VALUE_CONFIG(DROP_SHADOW_HEIGHT, 18); + ADD_FIXED_VALUE_CONFIG(DROP_SHADOW_BORDER, 2); + ADD_FIXED_VALUE_CONFIG(DROP_SHADOW_MARGIN, 8); + ADD_FIXED_VALUE_CONFIG(SELECT_BG_MARGIN, 1); + ADD_FIXED_VALUE_CONFIG(TEXT_HORIZONTAL_MARGIN, 1); + ADD_FIXED_VALUE_CONFIG(TEXT_VERTICAL_MARGIN, 4); + ADD_FIXED_VALUE_CONFIG(OVERLAY_ICON_MARGIN, 0); + ADD_FIXED_VALUE_CONFIG(CHECKBOX_MARGIN, 6); + ADD_DIMENSION_CONFIG(CHECKBOX_SIZE, 54, 54); + ADD_SHAPE_CONFIG(LIST1X_TOP_MARGIN, 3); + ADD_SHAPE_CONFIG(LIST1X_LEFT_MARGIN, 8); + ADD_SHAPE_CONFIG(LIST1X_RIGHT_MARGIN, 3); + END_UI_CONFIG_MODE(720x1280); + +} +END_UI_CONFIG(ICONLIST); + diff --git a/src/ui/resource/FUi_ResourceInputPadConfig.cpp b/src/ui/resource/FUi_ResourceInputPadConfig.cpp new file mode 100644 index 0000000..1ac2264 --- /dev/null +++ b/src/ui/resource/FUi_ResourceInputPadConfig.cpp @@ -0,0 +1,86 @@ +// +// 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_ResourceInputPadConfig.cpp + * @brief This is the implementation file for the color, image and shape config of _InputPad class. + */ + +#include "FUi_ResourceInputPadConfig.h" + +START_UI_CONFIG(INPUTPAD); +{ + ADD_COLOR_CONFIG(TEXT_NORMAL, $F031L1); + ADD_COLOR_CONFIG(TEXT_PRESSED, $F031L1P); + ADD_COLOR_CONFIG(TEXT_HIGHLIGHTED, $F031L1); + ADD_COLOR_CONFIG(TEXT_DISABLED, $F031L1); + + ADD_COLOR_CONFIG(GUIDE_TEXT_NORMAL, $F031L1); + ADD_COLOR_CONFIG(GUIDE_TEXT_PRESSED, $F031L1P); + ADD_COLOR_CONFIG(GUIDE_TEXT_DISABLED, $F031L1D); + + ADD_COLOR_CONFIG(BUTTON_BG_NORMAL, $W011); + ADD_COLOR_CONFIG(BUTTON_BG_PRESSED, $B042); + ADD_COLOR_CONFIG(BUTTON_BG_HIGHLIGHTED, $W011); + ADD_COLOR_CONFIG(BUTTON_BG_DISABLED, $W011); + + ADD_IMAGE_CONFIG(BG_NORMAL, #00_time_picker_keypad_bg.#.png); + ADD_IMAGE_CONFIG(BUTTON_BG_NORMAL, #00_time_picker_keypad_button_bg.#.png); + ADD_IMAGE_CONFIG(BUTTON_BG_PRESSED, #00_time_picker_keypad_button_bg.#.png); + ADD_IMAGE_CONFIG(BUTTON_BG_HIGHLIGHTED, #00_time_picker_keypad_button_bg.#.png); + ADD_IMAGE_CONFIG(BUTTON_BG_DISABLED, #00_time_picker_keypad_button_bg.#.png); + + ADD_IMAGE_CONFIG(BUTTON_BG_EFFECT_NORMAL, #00_time_picker_keypad_button_bg_ef.#.png); + ADD_IMAGE_CONFIG(BUTTON_BG_EFFECT_PRESSED, #00_time_picker_keypad_button_bg_ef.#.png); + ADD_IMAGE_CONFIG(BUTTON_BG_EFFECT_HIGHLIGHTED, #00_time_picker_keypad_button_bg_ef.#.png); + ADD_IMAGE_CONFIG(BUTTON_BG_EFFECT_DISABLED, #00_time_picker_keypad_button_bg_ef.#.png); + + START_UI_CONFIG_MODE(720x1280); + { + ADD_SHAPE_CONFIG(TOP_MARGIN, 23); + ADD_SHAPE_CONFIG(BUTTON_HORIZONTAL_MARGIN, 14); + ADD_SHAPE_CONFIG(BUTTON_VERTICAL_MARGIN, 19); + + ADD_SHAPE_CONFIG(NUMERIC_FONT_SIZE, 65); + ADD_SHAPE_CONFIG(ALPHA_FONT_SIZE, 56); + ADD_SHAPE_CONFIG(GUIDE_FONT_SIZE, 32); + + ADD_SHAPE_CONFIG(TEXT_CORRECTION_Y, 3); + ADD_SHAPE_CONFIG(GUIDE_CORRECTION_X, 15); + ADD_FIXED_VALUE_CONFIG(BUTTON_TOUCH_CORRECTION_Y, 5); + + ADD_SHAPE_CONFIG(BUTTON_WIDTH, 228); + ADD_SHAPE_CONFIG(BUTTON_HEIGHT, 100); + } + END_UI_CONFIG_MODE(720x1280); + + START_UI_CONFIG_MODE(1280x720); + { + ADD_SHAPE_CONFIG(TOP_MARGIN, 11); + ADD_SHAPE_CONFIG(BUTTON_HORIZONTAL_MARGIN, 16); + ADD_SHAPE_CONFIG(BUTTON_VERTICAL_MARGIN, 10); + + ADD_SHAPE_CONFIG(NUMERIC_FONT_SIZE, 45); + ADD_SHAPE_CONFIG(ALPHA_FONT_SIZE, 36); + ADD_SHAPE_CONFIG(GUIDE_FONT_SIZE, 12); + + ADD_SHAPE_CONFIG(BUTTON_HEIGHT, 68); + } + END_UI_CONFIG_MODE(1280x720); + +} +END_UI_CONFIG(INPUTPAD); diff --git a/src/ui/resource/FUi_ResourceLabelConfig.cpp b/src/ui/resource/FUi_ResourceLabelConfig.cpp new file mode 100644 index 0000000..965ac09 --- /dev/null +++ b/src/ui/resource/FUi_ResourceLabelConfig.cpp @@ -0,0 +1,50 @@ +// +// 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_ResourceLabelConfig.cpp + * @brief This is the implementation file for the properties of Label. + */ + +#include "FUi_ResourceLabelConfig.h" + +START_UI_CONFIG(LABEL); +{ + ADD_COLOR_CONFIG(TEXT_NORMAL, $F011L1); + + START_UI_CONFIG_MODE(480x800); + ADD_DIMENSION_CONFIG(MIN_SIZE, 0, 0); + END_UI_CONFIG_MODE(480x800); + + START_UI_CONFIG_MODE(720x1280); + ADD_SHAPE_CONFIG(TEXT_FONT_SIZE, 32); + ADD_SHAPE_CONFIG(LEFT_MARGIN, 16); + ADD_SHAPE_CONFIG(TOP_MARGIN, 0); + ADD_SHAPE_CONFIG(RIGHT_MARGIN, 16); + ADD_SHAPE_CONFIG(BOTTOM_MARGIN, 0); + ADD_DIMENSION_CONFIG(MIN_SIZE, 0, 0); + END_UI_CONFIG_MODE(720x1280); + + START_UI_CONFIG_MODE(1280x720); + ADD_SHAPE_CONFIG(TEXT_FONT_SIZE, 32); + ADD_SHAPE_CONFIG(LEFT_MARGIN, 16); + ADD_SHAPE_CONFIG(TOP_MARGIN, 0); + ADD_SHAPE_CONFIG(RIGHT_MARGIN, 16); + ADD_SHAPE_CONFIG(BOTTOM_MARGIN, 0); + ADD_DIMENSION_CONFIG(MIN_SIZE, 0, 0); + END_UI_CONFIG_MODE(1280x720); +} +END_UI_CONFIG(LABEL); diff --git a/src/ui/resource/FUi_ResourceListConfig.cpp b/src/ui/resource/FUi_ResourceListConfig.cpp new file mode 100644 index 0000000..a3beed9 --- /dev/null +++ b/src/ui/resource/FUi_ResourceListConfig.cpp @@ -0,0 +1,66 @@ +// +// 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_ResourceListConfig.cpp + * @brief This is the implementation file for the UI properties of 1.x Lists. + */ + +#include "FUi_ResourceListConfig.h" + +START_UI_CONFIG(LIST); +{ + + ADD_COLOR_CONFIG(LISTITEM_DIVIDER_LEFT_HALF_COLOR, $B0223); + ADD_COLOR_CONFIG(LISTITEM_DIVIDER_RIGHT_HALF_COLOR, $B0222); + ADD_COLOR_CONFIG(EXPANDABLELIST_SUB_ITEM_BG_COLOR, $B0217); + ADD_COLOR_CONFIG(EXPANDABLE_ARROW_NORMAL, $F032L1); + ADD_COLOR_CONFIG(EXPANDABLE_ARROW_DISABLED, $F032L1D); + ADD_COLOR_CONFIG(EXPANDABLE_ARROW_PRESSED, $F032L1P); + ADD_COLOR_CONFIG(ELEMENT_TEXT_NORMAL, $F011L1); + ADD_COLOR_CONFIG(ELEMENT_TEXT_PRESSED, $F011L1P); + ADD_COLOR_CONFIG(ELEMENT_TEXT_HIGHLIGHTED, $F011L1P); + ADD_COLOR_CONFIG(ELEMENT_TEXT_DISABLED, $F011L1D); + ADD_IMAGE_CONFIG(BUTTON_EXPAND_GROUP, #00_button_expand_opened.png); + ADD_IMAGE_CONFIG(BUTTON_COLLAPSE_GROUP, #00_button_expand_closed.png); + ADD_IMAGE_CONFIG(BUTTON_EXPAND_CLOSED_EFFECT, #00_button_expand_closed_ef.png); + 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, 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); + ADD_SHAPE_CONFIG(LIST_ITEM_TEXT_SIZE, 38); + ADD_SHAPE_CONFIG(LIST_STYLE_NUMBER_X, 10); + ADD_SHAPE_CONFIG(LIST_STYLE_NUMBER_WIDTH, 30); + ADD_SHAPE_CONFIG(LIST_STYLE_NUMBER_HEIGHT, 30); + ADD_SHAPE_CONFIG(LIST_CHECK_ITEM_WIDTH, 50); + ADD_SHAPE_CONFIG(LIST_CHECK_ITEM_HEIGHT, 50); + ADD_SHAPE_CONFIG(LIST_ITEM_NUMBER_STYLE_MARGIN, 40); + ADD_SHAPE_CONFIG(LIST_ITEM_LEFT_MARGIN, 10); + ADD_SHAPE_CONFIG(LIST_ITEM_DIVIDER_MARGIN, 80); + ADD_SHAPE_CONFIG(LIST_ITEM_LOWER_MARGIN, 10); + ADD_SHAPE_CONFIG(LIST_ITEM_UPPER_MARGIN, 10); + ADD_SHAPE_CONFIG(TEXT_ELEMENT_FONTSIZE_DEFAULT, 38); + ADD_SHAPE_CONFIG(CHECK_ELEMENT_DIVIDER_WIDTH, 2); + ADD_SHAPE_CONFIG(CHECK_ELEMENT_DIVIDER_MARGIN, 10); + ADD_SHAPE_CONFIG(LIST_DEFAULT_ITEM_HEIGHT, 100); + ADD_SHAPE_CONFIG(EXPANDABLE_ARROW_X_POSITION, 5); + END_UI_CONFIG_MODE(720x1280); +} +END_UI_CONFIG(LIST); diff --git a/src/ui/resource/FUi_ResourceListViewConfig.cpp b/src/ui/resource/FUi_ResourceListViewConfig.cpp new file mode 100644 index 0000000..5ee52e8 --- /dev/null +++ b/src/ui/resource/FUi_ResourceListViewConfig.cpp @@ -0,0 +1,52 @@ +// +// 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_ResourceListViewConfig.cpp + * @brief This is the implementation file for the properties of ListView. + */ + +#include "FUi_ResourceListViewConfig.h" + +START_UI_CONFIG(LISTVIEW); +{ + START_UI_CONFIG_MODE(480x800); + END_UI_CONFIG_MODE(480x800); + + START_UI_CONFIG_MODE(720x1280); + 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); + ADD_SHAPE_CONFIG(ITEM_ELEMENT_LEFT_MARGIN, 26); + ADD_SHAPE_CONFIG(ITEM_ELEMENT_SPACING, 16); + ADD_SHAPE_CONFIG(ITEM_DESCRIPTION_TEXT_LEFT_MARGIN, 16); + ADD_SHAPE_CONFIG(ITEM_DESCRIPTION_TEXT_TOP_MARGIN, 8); + ADD_SHAPE_CONFIG(ITEM_DESCRIPTION_TEXT_FONT_SIZE, 32); + ADD_SHAPE_CONFIG(GROUPITEM_DEFAULT_HEIGHT, 48); + ADD_SHAPE_CONFIG(GROUPITEM_DEFAULT_FONT_SIZE, 32); + 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, 0); + ADD_SHAPE_CONFIG(CONTEXTITEM_LEFT_MARGIN_ONE, 117); + ADD_SHAPE_CONFIG(CONTEXTITEM_LEFT_MARGIN, 16); + ADD_SHAPE_CONFIG(CONTEXTITEM_ELEMENT_HEIGHT, 74); + ADD_SHAPE_CONFIG(CONTEXTITEM_ELEMENT_SPACING, 16); + END_UI_CONFIG_MODE(720x1280); +} +END_UI_CONFIG(LISTVIEW); diff --git a/src/ui/resource/FUi_ResourceMapContainer.cpp b/src/ui/resource/FUi_ResourceMapContainer.cpp new file mode 100644 index 0000000..8c20f38 --- /dev/null +++ b/src/ui/resource/FUi_ResourceMapContainer.cpp @@ -0,0 +1,338 @@ +// +// 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_ResourceMapContainer.cpp + * @brief This is the implementation file for Config class. + * @version 3.0 + * + * This cpp file contains implementation of Config class. + * The ActionEvent class can call listener's method. So, when event occurred, + * application can handle it appropriately. + * + */ +#include +#include +#include +#include +#include +#include "FUi_ResourceConfigTypes.h" +#include "FUi_ResourceMapContainer.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { namespace _Resource +{ + +MapContainer::MapContainer(void) + : __pColorMap(null) + , __pDimensionMap(null) + , __pFixedValueMap(null) + , __pImageMap(null) + , __pShapeMap(null) + , __pAnimationMap(null) + , __pBlackPalette(null) + , __pWhitePalette(null) + , __pDefaultPalette(null) + , __pPalette(null) + , __pProvider(null) + , __pComparer(null) + , __version(L"") + , __themeName(L"") + , __resolution(L"") + , __resolutionForImage(L"") +{ + __pProvider = new _ResourceHashCodeProvider; + SysTryReturnVoidResult(NID_UI, __pProvider, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + __pComparer = new _ResourceComparer; + SysTryReturnVoidResult(NID_UI, __pComparer, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); +} +MapContainer::~MapContainer(void) +{ + delete __pColorMap; + __pColorMap = null; + delete __pDimensionMap; + __pDimensionMap = null; + delete __pFixedValueMap; + __pFixedValueMap = null; + delete __pImageMap; + __pImageMap = null; + delete __pShapeMap; + __pShapeMap = null; + delete __pAnimationMap; + __pAnimationMap = null; + delete __pBlackPalette; + __pBlackPalette = null; + delete __pWhitePalette; + __pWhitePalette = null; + delete __pDefaultPalette; + __pDefaultPalette = null; + delete __pProvider; + __pProvider = null; + delete __pComparer; + __pComparer = null; +} + +void +MapContainer::CreateMap(_ResourceType type) +{ + switch(type) + { + case RESOURCE_TYPE_COLOR: + if(__pColorMap == null) + { + __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); + __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: + if(__pDimensionMap == null) + { + __pDimensionMap = new (std::nothrow) Map(type); + SysTryReturnVoidResult(NID_UI, __pDimensionMap, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + __pDimensionMap->Construct(100, 0.75f, *__pProvider, *__pComparer); + } + break; + + case RESOURCE_TYPE_FIXED_VALUE: + if(__pFixedValueMap == null) + { + __pFixedValueMap = new (std::nothrow) Map(type); + SysTryReturnVoidResult(NID_UI, __pFixedValueMap, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + __pFixedValueMap->Construct(100, 0.75f, *__pProvider, *__pComparer); + } + break; + case RESOURCE_TYPE_IMAGE: + if(__pImageMap == null) + { + __pImageMap = new (std::nothrow) Map(type); + SysTryReturnVoidResult(NID_UI, __pImageMap, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + __pImageMap->Construct(300, 0.75f, *__pProvider, *__pComparer); + } + break; + case RESOURCE_TYPE_SHAPE: + if(__pShapeMap == null) + { + __pShapeMap = new (std::nothrow) Map(type); + SysTryReturnVoidResult(NID_UI, __pShapeMap, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + __pShapeMap->Construct(500, 0.75f, *__pProvider, *__pComparer); + } + break; + case RESOURCE_TYPE_ANIMATION: + if(__pAnimationMap == null) + { + __pAnimationMap = new (std::nothrow) Map(type); + SysTryReturnVoidResult(NID_UI, __pAnimationMap, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + __pAnimationMap->Construct(50, 0.75f, *__pProvider, *__pComparer); + } + break; + default: + break; + } + InitializeMap(type); +} +void +MapContainer::InitializeMap(_ResourceType type) +{ + switch(type) + { + case RESOURCE_TYPE_COLOR: + if (__pColorMap != null) + { + __pColorMap->Initialize(); + } + if (__pBlackPalette != null) + { + __pBlackPalette->Initialize(); + } + if (__pWhitePalette != null) + { + __pWhitePalette->Initialize(); + } + if (__pDefaultPalette != null) + { + __pDefaultPalette->Initialize(); + } + break; + case RESOURCE_TYPE_DIMENSION: + if(__pDimensionMap != null) + { + __pDimensionMap->Initialize(); + } + break; + case RESOURCE_TYPE_FIXED_VALUE: + if(__pFixedValueMap != null) + { + __pFixedValueMap->Initialize(); + } + break; + case RESOURCE_TYPE_IMAGE: + if(__pImageMap != null) + { + __pImageMap->Initialize(); + } + break; + case RESOURCE_TYPE_SHAPE: + if(__pShapeMap != null) + { + __pShapeMap->Initialize(); + } + break; + case RESOURCE_TYPE_ANIMATION: + if(__pAnimationMap != null) + { + __pAnimationMap->Initialize(); + } + break; + default: + break; + } +} +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; +} +Map* +MapContainer::GetColorMap(void) const +{ + return __pColorMap; +} + +Map* +MapContainer::GetDimensionMap(void) const +{ + return __pDimensionMap; +} + +Map* +MapContainer::GetFixedValueMap(void) const +{ + return __pFixedValueMap; +} + +Map* +MapContainer::GetImageMap(void) const +{ + return __pImageMap; +} + +Map* +MapContainer::GetShapeMap(void) const +{ + return __pShapeMap; +} + +Map* +MapContainer::GetAnimationMap(void) const +{ + return __pAnimationMap; +} + +void +MapContainer::SetVersion (const Tizen::Base::String& version) +{ + __version = version; +} +Tizen::Base::String +MapContainer::GetVersion(void) +{ + return __version; +} +void +MapContainer::SetThemeName(const Tizen::Base::String& themeName) +{ + __themeName = themeName; +} +Tizen::Base::String +MapContainer::GetThemeName(void) +{ + return __themeName; +} +void +MapContainer::SetResolution(const Tizen::Base::String& resolution) +{ + __resolution = resolution; +} +Tizen::Base::String +MapContainer::GetResolution(void) +{ + return __resolution; +} +void +MapContainer::SetResolutionForImage(const Tizen::Base::String& resolution) +{ + __resolutionForImage = resolution; +} +Tizen::Base::String +MapContainer::GetResolutionForImage(void) +{ + return __resolutionForImage; +} + +}}} //Tizen::Ui::_Resource diff --git a/src/ui/resource/FUi_ResourceMessageBoxConfig.cpp b/src/ui/resource/FUi_ResourceMessageBoxConfig.cpp new file mode 100644 index 0000000..0af1446 --- /dev/null +++ b/src/ui/resource/FUi_ResourceMessageBoxConfig.cpp @@ -0,0 +1,112 @@ +// +// 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_ResourceMessageBoxConfig.cpp + * @brief This is the implementation file for the color/shape properties of MessageBox. + */ + +#include "FUi_ResourceMessageBoxConfig.h" + +START_UI_CONFIG(MESSAGEBOX); +{ + ADD_COLOR_CONFIG(BG_NORMAL, $B061L1); + ADD_COLOR_CONFIG(TITLE_TEXT_NORMAL, $B063L9); + ADD_COLOR_CONFIG(TEXT_NORMAL, $B063L1); + ADD_COLOR_CONFIG(BOTTOM_BG_NORMAL, $B061L3); + ADD_COLOR_CONFIG(TITLE_BG_NORMAL, $B061L2); + ADD_COLOR_CONFIG(BOTTOM_BUTTON_BG_NORMAL, $B065L4); + ADD_COLOR_CONFIG(BOTTOM_BUTTON_BG_PRESSED, $B065L4P); + ADD_COLOR_CONFIG(BOTTOM_BUTTON_BG_DISABLED, $B065L4D); + ADD_COLOR_CONFIG(BOTTOM_BUTTON_BG_HIGHLIGHTED, $W161); + ADD_COLOR_CONFIG(BOTTOM_BUTTON_TEXT_NORMAL, $B064L3); + ADD_COLOR_CONFIG(BOTTOM_BUTTON_TEXT_PRESSED, $B064L3P); + ADD_COLOR_CONFIG(BOTTOM_BUTTON_TEXT_DISABLED, $B064L3D); + ADD_COLOR_CONFIG(BOTTOM_BUTTON_TEXT_HIGHLIGHTED, $B064L3); + + ADD_IMAGE_CONFIG(BG_NORMAL, $00_popup_bg.#.png); + ADD_IMAGE_CONFIG(BG_OUTLINE_EFFECT_NORMAL, $00_popup_bg_ef.#.png); + ADD_IMAGE_CONFIG(BG_BUTTON_AREA, $00_popup_bottom_bg.#.png); + ADD_IMAGE_CONFIG(BG_BUTTON_EFFECT, $00_popup_bottom_ef.#.png); + ADD_IMAGE_CONFIG(BG_TITLE_AREA, $00_popup_title_bg.#.png); + ADD_IMAGE_CONFIG(BG_TITLE_EFFECT, $00_popup_title_ef.#.png); + ADD_IMAGE_CONFIG(BOTTOM_BUTTON_BG_NORMAL, $00_popup_button_normal_bg.#.png); + ADD_IMAGE_CONFIG(BOTTOM_BUTTON_BG_PRESSED, $00_popup_button_normal_bg.#.png); + ADD_IMAGE_CONFIG(BOTTOM_BUTTON_BG_DISABLED, $00_popup_button_normal_bg.#.png); + ADD_IMAGE_CONFIG(BOTTOM_BUTTON_BG_HIGHLIGHTED, $00_popup_button_focus.#.png); + ADD_IMAGE_CONFIG(BOTTOM_BUTTON_NORMAL_EFFECT, $00_popup_button_normal_ef.#.png); + ADD_IMAGE_CONFIG(BOTTOM_BUTTON_PRESSED_EFFECT, $00_popup_button_press_ef.#.png); + ADD_IMAGE_CONFIG(BOTTOM_BUTTON_DISABLED_EFFECT, $00_popup_button_dim_ef.#.png); + + START_UI_CONFIG_MODE(480x800); + { + } + END_UI_CONFIG_MODE(480x800); + + START_UI_CONFIG_MODE(720x1280); + { + ADD_FIXED_VALUE_CONFIG(TEXT_MAX_LENGTH, 399); + + ADD_SHAPE_CONFIG(MIN_WIDTH, 510); // 20120504 + ADD_SHAPE_CONFIG(MIN_HEIGHT, 122); // 20120803 + + ADD_SHAPE_CONFIG(DEFAULT_WIDTH, 652); // 20121113 + ADD_SHAPE_CONFIG(MAX_HEIGHT, 590); // 20120803 + + ADD_SHAPE_CONFIG(TITLE_HEIGHT, 78); // 20130403 + ADD_SHAPE_CONFIG(TITLE_TEXT_SIZE, 50); // 20121113 + ADD_SHAPE_CONFIG(MIN_TITLE_TEXT_SIZE, 42); // 20121113 + ADD_SHAPE_CONFIG(TITLE_TEXT_TOP_MARGIN, 20); // 20130403 + ADD_SHAPE_CONFIG(TITLE_TEXT_LEFT_MARGIN, 26); // 20130403 + ADD_SHAPE_CONFIG(TITLE_TEXT_RIGHT_MARGIN, 26); // 20130403 + + ADD_SHAPE_CONFIG(BOTTOM_HEIGHT, 96); // 20130403 + + ADD_SHAPE_CONFIG(TEXT_SIZE, 38); // 20130403 + ADD_SHAPE_CONFIG(TEXT_HEIGHT, 132); // 20130403 + ADD_SHAPE_CONFIG(TEXT_LEFT_MARGIN, 29); // 20130403 + ADD_SHAPE_CONFIG(TEXT_RIGHT_MARGIN, 29); // 20130403 + + ADD_SHAPE_CONFIG(TEXT_TOP_MRAGIN_NO_BUTTON, 32); // 20130403 + ADD_SHAPE_CONFIG(TEXT_TOP_MRAGIN, 20); // 20121113 + + ADD_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_TOP_MARGIN, 15); //20121113 + ADD_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_BOTTOM_MARGIN, 15); //20121113 + ADD_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_LEFT_MARGIN, 15); + ADD_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_RIGHT_MARGIN, 15); + + ADD_SHAPE_CONFIG(BUTTON_HEIGHT, 74); // 20121113 + ADD_SHAPE_CONFIG(BUTTON_INTERNAL_GAP, 10); // 20130404 + + ADD_SHAPE_CONFIG(BUTTON_TOP_MARGIN, 20); // 20121113 + ADD_SHAPE_CONFIG(BUTTON_BOTTOM_MARGIN, 24); // 20130403 + + ADD_SHAPE_CONFIG(BUTTON_SIDE_MARGIN_01, 101); // 20120803 : 1 Button + ADD_SHAPE_CONFIG(BUTTON_SIDE_MARGIN_02, 28); // 20121113 : 2 Buttons + ADD_SHAPE_CONFIG(BUTTON_SIDE_MARGIN_03, 28); // 20121113 : 3 Buttons + } + END_UI_CONFIG_MODE(720x1280); + + START_UI_CONFIG_MODE(1280x720); + { + ADD_SHAPE_CONFIG(DEFAULT_WIDTH, 832); // 20130403 + ADD_SHAPE_CONFIG(BUTTON_SIDE_MARGIN_01, 191); // 20130403 : 1 Button + } + END_UI_CONFIG_MODE(1280x720); + +} +END_UI_CONFIG(MESSAGEBOX); diff --git a/src/ui/resource/FUi_ResourceOptionMenuConfig.cpp b/src/ui/resource/FUi_ResourceOptionMenuConfig.cpp new file mode 100644 index 0000000..9ef6b35 --- /dev/null +++ b/src/ui/resource/FUi_ResourceOptionMenuConfig.cpp @@ -0,0 +1,99 @@ +// +// 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_ResourceOptionMenuConfig.cpp + * @brief This is the implementation file for the color, image and shape properties of OptionMenu. + */ + +#include "FUi_ResourceOptionMenuConfig.h" + +START_UI_CONFIG(OPTIONMENU); +{ + ADD_COLOR_CONFIG(BG_NORMAL, $B061L4); + ADD_COLOR_CONFIG(ITEM_BG_NORMAL, $B061L4); + ADD_COLOR_CONFIG(ITEM_BG_PRESSED, $B044); + ADD_COLOR_CONFIG(ITEM_BG_HIGHLIGHTED, $B044); + ADD_COLOR_CONFIG(ITEM_BG_DISABLED, $B044); + + ADD_COLOR_CONFIG(ITEM_TEXT_NORMAL, $B063L5); + ADD_COLOR_CONFIG(ITEM_TEXT_PRESSED, $B063L5); + ADD_COLOR_CONFIG(ITEM_TEXT_DISABLED, $B063L5); + ADD_COLOR_CONFIG(ITEM_TEXT_HIGHLIGHTED, $B063L5); + + ADD_COLOR_CONFIG(CONTEXTUAL_POPUP_ARROW_NORMAL, $W1121); + ADD_COLOR_CONFIG(CONTEXTUAL_POPUP_ARROW_PRESSED, $W1122); + ADD_COLOR_CONFIG(CONTEXTUAL_POPUP_ARROW_HIGHLIGHTED, $W1121); + ADD_COLOR_CONFIG(CONTEXTUAL_POPUP_ARROW_DISABLED, $W1123); + + ADD_COLOR_CONFIG(LIST_ITEM_DIVIDER_01_NORMAL, $B0622L1); + ADD_COLOR_CONFIG(LIST_ITEM_DIVIDER_02_NORMAL, $B0622L2); + + ADD_IMAGE_CONFIG(BG_NORMAL, #00_popup_bubble_02_bg.#.png); + ADD_IMAGE_CONFIG(BG_EFFECT, #00_popup_bubble_02_ef.#.png); + ADD_IMAGE_CONFIG(ITEM_BG_PRESSED, #00_more_popup_press.#.png); + ADD_IMAGE_CONFIG(CONTEXTUAL_POPUP_ARROW, #00_option_panel_contextual_popup_arrow.png); + + START_UI_CONFIG_MODE(720x1280); + { + ADD_SHAPE_CONFIG(MAX_VISIBLE_ITEM_COUNT, 7); + ADD_SHAPE_CONFIG(TEXT_SIZE, 42); + + ADD_SHAPE_CONFIG(TEXT_LEFT_MARGIN, 8); + ADD_SHAPE_CONFIG(TEXT_RIGHT_MARGIN, 8); + ADD_SHAPE_CONFIG(TEXT_TOP_MARGIN, 8); + ADD_SHAPE_CONFIG(TEXT_BOTTOM_MARGIN, 8); + + ADD_SHAPE_CONFIG(LEFT_MARGIN, 16); + ADD_SHAPE_CONFIG(RIGHT_MARGIN, 16); + ADD_SHAPE_CONFIG(ARROW_MARGIN, 36); + + ADD_SHAPE_CONFIG(ITEM_HEIGHT, 112); + ADD_SHAPE_CONFIG(LIST_MAX_WIDTH, 696); + ADD_SHAPE_CONFIG(ITEM_MAX_COUNT, 7); + ADD_SHAPE_CONFIG(LIST_MIN_WIDTH, 412); + ADD_SHAPE_CONFIG(LIST_ITEM_HEIGHT, 112); + + ADD_SHAPE_CONFIG(LIST_DIVIDER_HEIGHT, 1); + ADD_SHAPE_CONFIG(ITEM_BG_PRESSED_MARGIN, 4); + ADD_SHAPE_CONFIG(LIST_ITEM_GAP, 16); + + ADD_SHAPE_CONFIG(LIST_LEFT_MARGIN, 14); + ADD_SHAPE_CONFIG(LIST_RIGHT_MARGIN, 14); + ADD_SHAPE_CONFIG(LIST_TOP_MARGIN, 14); + ADD_SHAPE_CONFIG(LIST_BOTTOM_MARGIN, 0); + + ADD_SHAPE_CONFIG(LIST_ICON_WIDTH, 45); + ADD_SHAPE_CONFIG(LIST_ICON_HEIGHT, 45); + + ADD_SHAPE_CONFIG(LIST_ITEM_FONT_SIZE, 40); + ADD_SHAPE_CONFIG(LIST_DIVIDER_HEIGHT, 1); + ADD_SHAPE_CONFIG(ITEM_BG_PRESSED_LEFT_RIGHT_MARGIN, 4); + ADD_SHAPE_CONFIG(ITEM_BG_PRESSED_TOP_BOTTOM_MARGIN, 3); + ADD_SHAPE_CONFIG(SCROLL_PANEL_MARGIN, 3); + ADD_SHAPE_CONFIG(ANIMATION_DISTANCE_Y, 40); + } + END_UI_CONFIG_MODE(720x1280); + + START_UI_CONFIG_MODE(1280x720); + { + ADD_SHAPE_CONFIG(MAX_VISIBLE_ITEM_COUNT, 5); + } + END_UI_CONFIG_MODE(1280x720); +} + +END_UI_CONFIG(OPTIONMENU); + diff --git a/src/ui/resource/FUi_ResourceOverlayPanelConfig.cpp b/src/ui/resource/FUi_ResourceOverlayPanelConfig.cpp new file mode 100644 index 0000000..a66d92e --- /dev/null +++ b/src/ui/resource/FUi_ResourceOverlayPanelConfig.cpp @@ -0,0 +1,25 @@ +// +// 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. +// +#include "FUi_ResourceOverlayPanelConfig.h" + +START_UI_CONFIG(OVERLAYPANEL); + + START_UI_CONFIG_MODE(720x1280); + ADD_SHAPE_CONFIG(MIN_RENDERER_SIZE, 36); + END_UI_CONFIG_MODE(720x1280); + +END_UI_CONFIG(OVERLAYPANEL); diff --git a/src/ui/resource/FUi_ResourcePanelConfig.cpp b/src/ui/resource/FUi_ResourcePanelConfig.cpp new file mode 100644 index 0000000..2b7bfc9 --- /dev/null +++ b/src/ui/resource/FUi_ResourcePanelConfig.cpp @@ -0,0 +1,66 @@ +// +// 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. +// + +#include "FUi_ResourcePanelConfig.h" + +START_UI_CONFIG(PANEL); +{ + ADD_COLOR_CONFIG(GROUPED_STYLE_BG_NORMAL, $B0217); + ADD_COLOR_CONFIG(GROUPED_STYLE_BG_PRESSED, $B041); + + ADD_IMAGE_CONFIG(GROUPED_SINGLE_BG_EFFECT_NORMAL, #00_list_group_bg_ef.#.png); + ADD_IMAGE_CONFIG(GROUPED_SINGLE_BG_EFFECT_PRESSED, #00_list_group_bg_ef.#.png); + ADD_IMAGE_CONFIG(GROUPED_SINGLE_BG_EFFECT_SELECTED, #00_groupedlist_bg_focus.#.png); + + ADD_IMAGE_CONFIG(GROUPED_SINGLE_BG_NORMAL, #00_list_group_bg.#.png); + ADD_IMAGE_CONFIG(GROUPED_SINGLE_BG_DISABLED, #00_list_group_bg.#.png); + ADD_IMAGE_CONFIG(GROUPED_SINGLE_BG_PRESSED, #00_list_group_bg.#.png); + ADD_IMAGE_CONFIG(GROUPED_SINGLE_BG_HIGHLIGHTED, #00_list_group_bg.#.png); + ADD_IMAGE_CONFIG(GROUPED_SINGLE_BG_SELECTED, #00_list_group_bg.#.png); + + ADD_IMAGE_CONFIG(GROUPED_TOP_BG_EFFECT_NORMAL, #00_list_group_bg_top_ef.#.png); + ADD_IMAGE_CONFIG(GROUPED_TOP_BG_EFFECT_PRESSED, #00_list_group_bg_top_ef.#.png); + ADD_IMAGE_CONFIG(GROUPED_TOP_BG_EFFECT_SELECTED, #00_groupedlist_top_bg_focus.#.png); + + ADD_IMAGE_CONFIG(GROUPED_TOP_BG_NORMAL, #00_list_group_bg_top.#.png); + ADD_IMAGE_CONFIG(GROUPED_TOP_BG_DISABLED, #00_list_group_bg_top.#.png); + ADD_IMAGE_CONFIG(GROUPED_TOP_BG_PRESSED, #00_list_group_bg_top.#.png); + ADD_IMAGE_CONFIG(GROUPED_TOP_BG_HIGHLIGHTED, #00_list_group_bg_top.#.png); + ADD_IMAGE_CONFIG(GROUPED_TOP_BG_SELECTED, #00_list_group_bg_top.#.png); + + ADD_IMAGE_CONFIG(GROUPED_MIDDLE_BG_EFFECT_NORMAL, #00_list_group_bg_center_ef.#.png); + ADD_IMAGE_CONFIG(GROUPED_MIDDLE_BG_EFFECT_PRESSED, #00_list_group_bg_center_ef.#.png); + ADD_IMAGE_CONFIG(GROUPED_MIDDLE_BG_EFFECT_SELECTED, #00_groupedlist_center_bg_focus.#.png); + + ADD_IMAGE_CONFIG(GROUPED_MIDDLE_BG_NORMAL, #00_list_group_bg_center.#.png); + ADD_IMAGE_CONFIG(GROUPED_MIDDLE_BG_DISABLED, #00_list_group_bg_center.#.png); + ADD_IMAGE_CONFIG(GROUPED_MIDDLE_BG_PRESSED, #00_list_group_bg_center.#.png); + ADD_IMAGE_CONFIG(GROUPED_MIDDLE_BG_HIGHLIGHTED, #00_list_group_bg_center.#.png); + ADD_IMAGE_CONFIG(GROUPED_MIDDLE_BG_SELECTED, #00_list_group_bg_center.#.png); + + ADD_IMAGE_CONFIG(GROUPED_BOTTOM_BG_EFFECT_NORMAL, #00_list_group_bg_bottom_ef.#.png); + ADD_IMAGE_CONFIG(GROUPED_BOTTOM_BG_EFFECT_PRESSED, #00_list_group_bg_bottom_ef.#.png); + ADD_IMAGE_CONFIG(GROUPED_BOTTOM_BG_EFFECT_SELECTED, #00_groupedlist_bottom_bg_focus.#.png); + + ADD_IMAGE_CONFIG(GROUPED_BOTTOM_BG_NORMAL, #00_list_group_bg_bottom.#.png); + ADD_IMAGE_CONFIG(GROUPED_BOTTOM_BG_DISABLED, #00_list_group_bg_bottom.#.png); + ADD_IMAGE_CONFIG(GROUPED_BOTTOM_BG_PRESSED, #00_list_group_bg_bottom.#.png); + ADD_IMAGE_CONFIG(GROUPED_BOTTOM_BG_HIGHLIGHTED, #00_list_group_bg_bottom.#.png); + ADD_IMAGE_CONFIG(GROUPED_BOTTOM_BG_SELECTED, #00_list_group_bg_bottom.#.png); +} +END_UI_CONFIG(PANEL); + diff --git a/src/ui/resource/FUi_ResourcePopupConfig.cpp b/src/ui/resource/FUi_ResourcePopupConfig.cpp new file mode 100644 index 0000000..187ea32 --- /dev/null +++ b/src/ui/resource/FUi_ResourcePopupConfig.cpp @@ -0,0 +1,121 @@ +// +// 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_ResourcePopupConfig.cpp + * @brief This is the implementation file for the color/shape properties of Popup. + */ + +#include "FUi_ResourcePopupConfig.h" + +START_UI_CONFIG(POPUP); +{ + ADD_COLOR_CONFIG(BG_NORMAL, $B061L1); + ADD_COLOR_CONFIG(TITLE_TEXT_NORMAL, $B063L9); + + ADD_COLOR_CONFIG(TITLE_BG_NORMAL, $B061L2); + + ADD_IMAGE_CONFIG(BG_NORMAL, $00_popup_bg.#.png); + ADD_IMAGE_CONFIG(BG_OUTLINE_EFFECT_NORMAL, $00_popup_bg_ef.#.png); + + ADD_IMAGE_CONFIG(BG_TITLE_AREA, $00_popup_title_bg.#.png); + ADD_IMAGE_CONFIG(BG_TITLE_EFFECT, $00_popup_title_ef.#.png); + + START_ANIMATION_CONFIG(PROCESSING_ANIMATION); + ADD_ANIMATION_FRAME(#00_list_process_01.png, 50); + ADD_ANIMATION_FRAME(#00_list_process_02.png, 50); + ADD_ANIMATION_FRAME(#00_list_process_03.png, 50); + ADD_ANIMATION_FRAME(#00_list_process_04.png, 50); + ADD_ANIMATION_FRAME(#00_list_process_05.png, 50); + ADD_ANIMATION_FRAME(#00_list_process_06.png, 50); + ADD_ANIMATION_FRAME(#00_list_process_07.png, 50); + ADD_ANIMATION_FRAME(#00_list_process_08.png, 50); + ADD_ANIMATION_FRAME(#00_list_process_09.png, 50); + ADD_ANIMATION_FRAME(#00_list_process_10.png, 50); + ADD_ANIMATION_FRAME(#00_list_process_11.png, 50); + ADD_ANIMATION_FRAME(#00_list_process_12.png, 50); + ADD_ANIMATION_FRAME(#00_list_process_13.png, 50); + ADD_ANIMATION_FRAME(#00_list_process_14.png, 50); + ADD_ANIMATION_FRAME(#00_list_process_15.png, 50); + ADD_ANIMATION_FRAME(#00_list_process_16.png, 50); + ADD_ANIMATION_FRAME(#00_list_process_17.png, 50); + ADD_ANIMATION_FRAME(#00_list_process_18.png, 50); + ADD_ANIMATION_FRAME(#00_list_process_19.png, 50); + ADD_ANIMATION_FRAME(#00_list_process_20.png, 50); + ADD_ANIMATION_FRAME(#00_list_process_21.png, 50); + ADD_ANIMATION_FRAME(#00_list_process_22.png, 50); + ADD_ANIMATION_FRAME(#00_list_process_23.png, 50); + ADD_ANIMATION_FRAME(#00_list_process_24.png, 50); + ADD_ANIMATION_FRAME(#00_list_process_25.png, 50); + ADD_ANIMATION_FRAME(#00_list_process_26.png, 50); + ADD_ANIMATION_FRAME(#00_list_process_27.png, 50); + ADD_ANIMATION_FRAME(#00_list_process_28.png, 50); + ADD_ANIMATION_FRAME(#00_list_process_29.png, 50); + ADD_ANIMATION_FRAME(#00_list_process_30.png, 50); + END_ANIMATION_CONFIG(PROCESSING_ANIMATION); + + START_UI_CONFIG_MODE(480x800); + { +// START_UI_CONFIG_API_VERSION(2.0); + START_UI_CONFIG_API_VERSION(2); + { + ADD_DIMENSION_CONFIG(MIN_SIZE, 384, 126); + } + END_UI_CONFIG_API_VERSION(); + + } + END_UI_CONFIG_MODE(480x800); + + START_UI_CONFIG_MODE(720x1280); + { + ADD_DIMENSION_CONFIG(MIN_SIZE, 0, 0); // 20121010 + ADD_DIMENSION_CONFIG(MIN_SIZE_WITH_TITLE, 72, 128); // 20130116 + ADD_DIMENSION_CONFIG(MIN_SIZE_EXCEPT_TRANSPARENT_MARGIN, 22, 33); // 20130429 + + ADD_SHAPE_CONFIG(TITLE_HEIGHT, 78); //20130403 + ADD_SHAPE_CONFIG(TITLE_TEXT_SIZE, 50); //20121113 + ADD_SHAPE_CONFIG(MIN_TITLE_TEXT_SIZE, 42); //20130507 + ADD_SHAPE_CONFIG(TITLE_TEXT_TOP_MARGIN, 20); //20130403 + ADD_SHAPE_CONFIG(TITLE_TEXT_LEFT_MARGIN, 26); //20130403 + ADD_SHAPE_CONFIG(TITLE_TEXT_RIGHT_MARGIN, 26); //20130403 + ADD_SHAPE_CONFIG(BODY_TEXT_HEIGHT, 132); //20130403 + + ADD_SHAPE_CONFIG(TOP_BORDER, 6); // Compatibility 2.0 + ADD_SHAPE_CONFIG(BOTTOM_BORDER, 30); // Compatibility 2.0 + ADD_SHAPE_CONFIG(SIDE_BORDER, 12); // Compatibility 2.0 + + ADD_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_TOP_MARGIN, 15); //20121113 + ADD_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_BOTTOM_MARGIN, 15); //20121113 + ADD_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_LEFT_MARGIN, 15); + ADD_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_RIGHT_MARGIN, 15); + ADD_SHAPE_CONFIG(OUTLINE_BORDER, 3); + + ADD_SHAPE_CONFIG(PROCESS_ANIMATION_WIDTH, 63); //20130403 + ADD_SHAPE_CONFIG(PROCESS_ANIMATION_NO_TITLE_TOP_MARGIN, 32); //20130403 + ADD_SHAPE_CONFIG(PROCESS_ANIMATION_WITH_TITLE_TOP_MARGIN, 9); //20130403 + + ADD_SHAPE_CONFIG(PROCESS_TEXT_TOP_MARGIN, 9); //20130403 + ADD_SHAPE_CONFIG(PROCESS_TEXT_BOTTOM_MARGIN, 20); //20121113 + + ADD_SHAPE_CONFIG(BG_OUTLINE_EFFECT_TOP_MARGIN, 15); //20130122 + ADD_SHAPE_CONFIG(BG_OUTLINE_EFFECT_BOTTOM_MARGIN, 15); //20130122 + ADD_SHAPE_CONFIG(BG_OUTLINE_EFFECT_LEFT_MARGIN, 15); //20130122 + ADD_SHAPE_CONFIG(BG_OUTLINE_EFFECT_RIGHT_MARGIN, 15); //20130122 + } + END_UI_CONFIG_MODE(720x1280); +} +END_UI_CONFIG(POPUP); diff --git a/src/ui/resource/FUi_ResourceProgressConfig.cpp b/src/ui/resource/FUi_ResourceProgressConfig.cpp new file mode 100644 index 0000000..ef75bc9 --- /dev/null +++ b/src/ui/resource/FUi_ResourceProgressConfig.cpp @@ -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_ResourceSliderConfig.cpp + * @brief This is a configuration file for color, image and shape values of Slider, Progress. + */ + +#include "FUi_ResourceProgressConfig.h" + +START_UI_CONFIG(PROGRESS); +{ + ADD_COLOR_CONFIG(BAR_BG_NORMAL, $W062L1); + ADD_COLOR_CONFIG(BAR_NORMAL, $W062L2); + + ADD_IMAGE_CONFIG(BAR_BG_NORMAL, #00_progress_bg.#.png); + ADD_IMAGE_CONFIG(BAR_NORMAL, #00_progress_bar.#.png); + ADD_IMAGE_CONFIG(BAR_BG_EFFECT, #00_progress_ef_bg.#.png); + ADD_IMAGE_CONFIG(BAR_EFFECT, #00_progress_bar_ef.#.png); + + START_UI_CONFIG_MODE(720x1280); + { + ADD_SHAPE_CONFIG(BAR_HEIGHT, 27); + ADD_SHAPE_CONFIG(BAR_LEFT_MARGIN, 36); + ADD_SHAPE_CONFIG(BAR_OFFSET, 7); + + ADD_SHAPE_CONFIG(MINIMUM_WIDTH, 276); + ADD_SHAPE_CONFIG(MINIMUM_HEIGHT, 36); + } + END_UI_CONFIG_MODE(720x1280); +} +END_UI_CONFIG(PROGRESS); diff --git a/src/ui/resource/FUi_ResourceRadioGroupConfig.cpp b/src/ui/resource/FUi_ResourceRadioGroupConfig.cpp new file mode 100644 index 0000000..6e2f41d --- /dev/null +++ b/src/ui/resource/FUi_ResourceRadioGroupConfig.cpp @@ -0,0 +1,39 @@ +// +// 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_ResourceRadioGroupConfig.cpp + * @brief This is the implementation file for the properties of RadioGroup. + */ + +#include "FUi_ResourceRadioGroupConfig.h" + +START_UI_CONFIG(RADIOGROUP); +{ + START_UI_CONFIG_MODE(480x800); + ADD_DIMENSION_CONFIG(MIN_SIZE, 0, 0); + END_UI_CONFIG_MODE(480x800); + + START_UI_CONFIG_MODE(720x1280); + ADD_DIMENSION_CONFIG(MIN_SIZE, 0, 0); + END_UI_CONFIG_MODE(720x1280); + + START_UI_CONFIG_MODE(1280x720); + ADD_DIMENSION_CONFIG(MIN_SIZE, 0, 0); + END_UI_CONFIG_MODE(1280x720); +} +END_UI_CONFIG(RADIOGROUP); + diff --git a/src/ui/resource/FUi_ResourceScrollConfig.cpp b/src/ui/resource/FUi_ResourceScrollConfig.cpp new file mode 100644 index 0000000..2793fcc --- /dev/null +++ b/src/ui/resource/FUi_ResourceScrollConfig.cpp @@ -0,0 +1,87 @@ +// +// 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. +// + +#include "FUi_ResourceScrollConfig.h" + +START_UI_CONFIG(SCROLL); +{ + ADD_COLOR_CONFIG(THUMB_BG_NORMAL, $B071); + + ADD_COLOR_CONFIG(JUMP_TO_TOP_NORMAL, $F032L1); + ADD_COLOR_CONFIG(JUMP_TO_TOP_PRESSED, $F032L1P); + ADD_COLOR_CONFIG(BUTTON_BG_NORMAL, $W011); + ADD_COLOR_CONFIG(BUTTON_BG_PRESSED, $B042); + + ADD_IMAGE_CONFIG(THUMB_HORIZONTAL_BG_NORMAL, #00_scroll_bar_h.#.png); + ADD_IMAGE_CONFIG(THUMB_HORIZONTAL_EFFECT, #00_scroll_bar_h_ef.#.png); + ADD_IMAGE_CONFIG(THUMB_VERTICAL_BG_NORMAL, #00_scroll_bar_v.#.png); + ADD_IMAGE_CONFIG(THUMB_VERTICAL_EFFECT, #00_scroll_bar_v_ef.#.png); + ADD_IMAGE_CONFIG(JUMP_TO_TOP_NORMAL, #00_icon_jump.png); + ADD_IMAGE_CONFIG(JUMP_TO_TOP_PRESSED, #00_icon_jump.png); + ADD_IMAGE_CONFIG(JUMP_TO_TOP_EFFECT, #00_icon_jump_ef.png); + ADD_IMAGE_CONFIG(JUMP_TO_LEFT_NORMAL, #00_icon_jump_left.png); + ADD_IMAGE_CONFIG(JUMP_TO_LEFT_PRESSED, #00_icon_jump_left.png); + ADD_IMAGE_CONFIG(JUMP_TO_LEFT_EFFECT, #00_icon_jump_left_ef.png); + ADD_IMAGE_CONFIG(BUTTON_BG_NORMAL, #00_button_01.#.png); + ADD_IMAGE_CONFIG(BUTTON_BG_NORMAL_EFFECT, #00_button_01_ef.#.png); + ADD_IMAGE_CONFIG(BUTTON_BG_PRESSED, #00_button_01.#.png); + ADD_IMAGE_CONFIG(BUTTON_BG_PRESSED_EFFECT, #00_button_01_press_ef.#.png); + ADD_IMAGE_CONFIG(HANDLER_HORIZONTAL, #00_fast_scroll_handler_h.#.png); + ADD_IMAGE_CONFIG(HANDLER_VERTICAL, #00_fast_scroll_handler.#.png); + + ADD_IMAGE_CONFIG(OVERSCROLLING_TOP_BG, #00_overscrolling_top.#.png); + ADD_IMAGE_CONFIG(OVERSCROLLING_BOTTOM_BG, #00_overscrolling_bottom.#.png); + ADD_IMAGE_CONFIG(OVERSCROLLING_LEFT_BG, #00_overscrolling_left.#.png); + ADD_IMAGE_CONFIG(OVERSCROLLING_RIGHT_BG, #00_overscrolling_right.#.png); + ADD_IMAGE_CONFIG(CONTEXTTHUMB_NORMAL, #00_popup_scroll.#.png); + + START_UI_CONFIG_MODE(720x1280); + ADD_SHAPE_CONFIG(VERTICAL_THUMB_MIN_WIDTH, 18); + ADD_SHAPE_CONFIG(VERTICAL_THUMB_MIN_HEIGHT, 27); + ADD_SHAPE_CONFIG(VERTICAL_THUMB_MARGIN, 6); + ADD_SHAPE_CONFIG(HORIZONTAL_THUMB_MIN_WIDTH, 27); + ADD_SHAPE_CONFIG(HORIZONTAL_THUMB_MIN_HEIGHT, 18); + ADD_SHAPE_CONFIG(HORIZONTAL_THUMB_MARGIN, 6); + + ADD_SHAPE_CONFIG(JUMP_TO_TOP_RIGHT_MARGIN, 26); + ADD_SHAPE_CONFIG(JUMP_TO_TOP_TOP_MARGIN, 18); + ADD_FIXED_VALUE_CONFIG(JUMP_TO_TOP_WIDTH, 74); + ADD_FIXED_VALUE_CONFIG(JUMP_TO_TOP_HEIGHT, 74); + + ADD_SHAPE_CONFIG(HANDLER_MARGIN, 4); + ADD_SHAPE_CONFIG(HANDLER_MIN_WIDTH, 36); + ADD_SHAPE_CONFIG(HANDLER_MIN_HEIGHT, 234); + + ADD_SHAPE_CONFIG(OVERSCROLLING_TOP_HEIGHT, 36); + ADD_SHAPE_CONFIG(OVERSCROLLING_BOTTOM_HEIGHT, 36); + ADD_SHAPE_CONFIG(OVERSCROLLING_LEFT_WIDTH, 36); + ADD_SHAPE_CONFIG(OVERSCROLLING_RIGHT_WIDTH, 36); + + ADD_SHAPE_CONFIG(CONTEXTTHUMB_MIN_WIDTH, 9); + ADD_SHAPE_CONFIG(CONTEXTTHUMB_MIN_HEIGHT, 18); + ADD_SHAPE_CONFIG(CONTEXTTHUMB_MARGIN, 8); + END_UI_CONFIG_MODE(720x1280); + + START_UI_CONFIG_MODE(1280x720); + ADD_SHAPE_CONFIG(OVERSCROLLING_TOP_HEIGHT, 36); + ADD_SHAPE_CONFIG(OVERSCROLLING_BOTTOM_HEIGHT, 36); + ADD_SHAPE_CONFIG(OVERSCROLLING_LEFT_WIDTH, 36); + ADD_SHAPE_CONFIG(OVERSCROLLING_RIGHT_WIDTH, 36); + END_UI_CONFIG_MODE(1280x720); +} +END_UI_CONFIG(SCROLL); + diff --git a/src/ui/resource/FUi_ResourceSearchBarConfig.cpp b/src/ui/resource/FUi_ResourceSearchBarConfig.cpp new file mode 100644 index 0000000..ae1c604 --- /dev/null +++ b/src/ui/resource/FUi_ResourceSearchBarConfig.cpp @@ -0,0 +1,87 @@ +// +// 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_ResourceSearchBarConfig.cpp + * @brief This is a configuration file for color, image and shape values of SearchBar. + */ + +#include "FUi_ResourceSearchBarConfig.h" + +START_UI_CONFIG(SEARCHBAR); +{ + ADD_COLOR_CONFIG(BUTTON_BG_NORMAL, $W011); + ADD_COLOR_CONFIG(BUTTON_BG_PRESSED, $B042); + ADD_COLOR_CONFIG(BUTTON_BG_DISABLED, $W011); + ADD_COLOR_CONFIG(BUTTON_BG_HIGHLIGHTED, $B041); + ADD_COLOR_CONFIG(BUTTON_TEXT_NORMAL, $B052L4); + ADD_COLOR_CONFIG(BUTTON_TEXT_PRESSED, $F032L2P); + ADD_COLOR_CONFIG(BUTTON_TEXT_DISABLED, $B052L4D); + ADD_COLOR_CONFIG(BUTTON_TEXT_HIGHLIGHTED, $B052L4); + + ADD_COLOR_CONFIG(EDIT_BG_NORMAL, $W031L1); + ADD_COLOR_CONFIG(EDIT_BG_PRESSED, $B0217); + ADD_COLOR_CONFIG(EDIT_BG_HIGHLIGHTED, $W031L1); + ADD_COLOR_CONFIG(EDIT_BG_DISABLED, $W031L1D); + ADD_COLOR_CONFIG(EDIT_BG_FOCUS, $F055); + ADD_COLOR_CONFIG(GUIDE_TEXT_NORMAL, $W032); + ADD_COLOR_CONFIG(GUIDE_TEXT_DISABLED, $W032D); + ADD_COLOR_CONFIG(EDIT_TEXT_NORMAL, $W032P); + ADD_COLOR_CONFIG(EDIT_TEXT_DISABLED, $W032D); + ADD_COLOR_CONFIG(EDIT_TEXT_HIGHLIGHTED, $W032P); + ADD_COLOR_CONFIG(EDIT_TEXT_PRESSED, $W032P); + ADD_COLOR_CONFIG(ICON_BG_NORMAL, $F041i); + ADD_COLOR_CONFIG(ICON_BG_DISABLED, $F041iD); + ADD_COLOR_CONFIG(CONTENT_AREA_BG_NORMAL, $B013); + ADD_COLOR_CONFIG(BG_NORMAL, $B0215); + + ADD_IMAGE_CONFIG(EDIT_BG_NORMAL, #00_search_edit_field_bg.#.png); + ADD_IMAGE_CONFIG(EDIT_BG_DISABLED, #00_search_edit_field_bg.#.png); + ADD_IMAGE_CONFIG(EDIT_BG_HIGHLIGHTED, #00_search_edit_field_bg.#.png); + ADD_IMAGE_CONFIG(EDIT_BG_PRESSED, #00_search_edit_field_bg.#.png); + ADD_IMAGE_CONFIG(EDIT_BG_EFFECT, #00_search_edit_field_bg_ef.#.png); + ADD_IMAGE_CONFIG(EDIT_BG_FOCUS, #00_search_edit_field_focus.#.png); + + ADD_IMAGE_CONFIG(ICON_NORMAL, #00_search_icon.png); + ADD_IMAGE_CONFIG(ICON_DISABLED, #00_search_icon.png); + ADD_IMAGE_CONFIG(ICON_EFFECT_NORMAL, #00_search_icon_ef.png); + + ADD_IMAGE_CONFIG(BG_NORMAL, #00_search_bg.#.png); + ADD_IMAGE_CONFIG(BG_NORMAL_EFFECT, #00_search_bg_ef.#.png); + + START_UI_CONFIG_MODE(720x1280); + { + ADD_SHAPE_CONFIG(HORIZONTAL_MARGIN, 16); + ADD_SHAPE_CONFIG(VERTICAL_MARGIN, 10); + 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); + ADD_SHAPE_CONFIG(SEARCH_FIELD_MIN_WIDTH, 218); + ADD_SHAPE_CONFIG(SEARCH_FIELD_MIN_WIDTH_NORMAL_MODE, 310); + ADD_SHAPE_CONFIG(BUTTON_WIDTH, 136); + ADD_SHAPE_CONFIG(BUTTON_MIN_WIDTH, 74); + 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, 38); + ADD_SHAPE_CONFIG(BUTTON_TEXT_SIZE, 30); + } + END_UI_CONFIG_MODE(720x1280); +} +END_UI_CONFIG(SEARCHBAR); diff --git a/src/ui/resource/FUi_ResourceSizeInfo.cpp b/src/ui/resource/FUi_ResourceSizeInfo.cpp new file mode 100644 index 0000000..002e9ab --- /dev/null +++ b/src/ui/resource/FUi_ResourceSizeInfo.cpp @@ -0,0 +1,280 @@ +// +// 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. +// +#include +#include "FUi_ResourceSizeInfo.h" +#include "FUiCtrl_ButtonImpl.h" +#include "FUiCtrl_CheckButtonImpl.h" +#include "FUiCtrl_LabelImpl.h" +#include "FUiCtrl_RadioGroupImpl.h" +#include "FUiCtrl_ColorPickerImpl.h" +#include "FUiCtrl_DatePickerImpl.h" +#include "FUiCtrl_DateTimePickerImpl.h" +#include "FUiCtrl_TimePickerImpl.h" +#include "FUiCtrl_PopupImpl.h" +#include "FUiCtrl_ProgressImpl.h" +#include "FUiCtrl_SliderImpl.h" +#include "FUiCtrl_EditAreaImpl.h" +#include "FUiCtrl_ExpandableEditAreaImpl.h" +#include "FUiCtrl_FormImpl.h" +#include "FUiCtrl_SearchBarImpl.h" +#include "FUiCtrl_EditFieldImpl.h" +#include "FUiCtrl_CustomListImpl.h" +#include "FUiCtrl_ExpandableListImpl.h" +#include "FUiCtrl_GroupedListImpl.h" +#include "FUiCtrl_ListImpl.h" +#include "FUiCtrl_OverlayPanelImpl.h" +#include "FUiCtrl_SlidableListImpl.h" +#include "FUiCtrl_EditDateImpl.h" +#include "FUiCtrl_EditTimeImpl.h" +#include "FUiCtrl_TableViewImpl.h" +#include "FUiCtrl_TableViewItemImpl.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; + +namespace Tizen { namespace Ui { namespace _Resource +{ +_ControlImpl::SizeInfo& +SizeInfo::GetButtonSizeInfo(void) +{ + static _ButtonImpl::ButtonSizeInfo buttonSizeInfo; + return buttonSizeInfo; +} + +_ControlImpl::SizeInfo& +SizeInfo::GetCheckButtonSizeInfo(void) +{ + static _CheckButtonImpl::CheckButtonSizeInfo checkButtonSizeInfo; + return checkButtonSizeInfo; +} + +_ControlImpl::SizeInfo& +SizeInfo::GetLabelSizeInfo(void) +{ + static _LabelImpl::LabelSizeInfo labelSizeInfo; + return labelSizeInfo; +} + +_ControlImpl::SizeInfo& +SizeInfo::GetRadioGroupSizeInfo(void) +{ + static _RadioGroupImpl::RadioGroupSizeInfo radioGroupSizeInfo; + return radioGroupSizeInfo; +} + +_ControlImpl::SizeInfo& +SizeInfo::GetColorPickerSizeInfo(void) +{ + static _ColorPickerImpl::ColorPickerSizeInfo colorPickerSizeInfo; + return colorPickerSizeInfo; +} + +_ControlImpl::SizeInfo& +SizeInfo::GetDatePickerSizeInfo(void) +{ + static Tizen::Ui::Controls::_DatePickerImpl::DatePickerSizeInfo datePickerSizeInfo; + return datePickerSizeInfo; +} + +_ControlImpl::SizeInfo& +SizeInfo::GetDateTimePickerSizeInfo(void) +{ + static Tizen::Ui::Controls::_DateTimePickerImpl::DateTimePickerSizeInfo dateTimePickerSizeInfo; + return dateTimePickerSizeInfo; +} + +_ControlImpl::SizeInfo& +SizeInfo::GetFormSizeInfo(void) +{ + static _FormImpl::FormSizeInfo formSizeInfo; + return formSizeInfo; +} + +_ControlImpl::SizeInfo& +SizeInfo::GetTimePickerSizeInfo(void) +{ + static Tizen::Ui::Controls::_TimePickerImpl::TimePickerSizeInfo timePickerSizeInfo; + return timePickerSizeInfo; +} + +_ControlImpl::SizeInfo& +SizeInfo::GetPopupSizeInfo(void) +{ + static _PopupImpl::PopupSizeInfo popupSizeInfo; + return popupSizeInfo; +} + +_ControlImpl::SizeInfo& +SizeInfo::GetProgressSizeInfo(void) +{ + static _ControlImpl::SizeInfo progressSizeInfo; + return progressSizeInfo; +} + +_ControlImpl::SizeInfo& +SizeInfo::GetSliderSizeInfo(int sliderStyle) +{ + static _ControlImpl::SizeInfo sliderSizeInfo; + return sliderSizeInfo; +} + +_ControlImpl::SizeInfo& +SizeInfo::GetEditAreaSizeInfo(void) +{ + static _EditAreaImpl::EditAreaSizeInfo editAreaSizeInfo; + return editAreaSizeInfo; +} + +_ControlImpl::SizeInfo& +SizeInfo::GetEditFieldSizeInfo(bool isSmallStyle, EditFieldTitleStyle titleStlye) +{ + static _EditFieldImpl::EditFieldSizeInfo editFieldSizeInfo; + editFieldSizeInfo.SetSmallStyle(isSmallStyle); + editFieldSizeInfo.SetTitleStyle(titleStlye); + return editFieldSizeInfo; +} + +_ControlImpl::SizeInfo& +SizeInfo::GetExpandableEditAreaSizeInfo(void) +{ + static _ControlImpl::SizeInfo expandableEditAreaSizeInfo; + return expandableEditAreaSizeInfo; +} + +_ControlImpl::SizeInfo& +SizeInfo::GetSearchBarSizeInfo(void) +{ + static _ControlImpl::SizeInfo searchBarSizeInfo; + return searchBarSizeInfo; +} + +_ControlImpl::SizeInfo& +SizeInfo::GetTabBarSizeInfo(void) +{ + static _ControlImpl::SizeInfo tabBarSizeInfo; + return tabBarSizeInfo; +} + +_ControlImpl::SizeInfo& +SizeInfo::GetCustomListSizeInfo(void) +{ + static _ControlImpl::SizeInfo sizeInfo; + return sizeInfo; +} + +_ControlImpl::SizeInfo& +SizeInfo::GetExpandableListSizeInfo(void) +{ + static _ControlImpl::SizeInfo sizeInfo; + return sizeInfo; +} + +_ControlImpl::SizeInfo& +SizeInfo::GetGroupedListSizeInfo(void) +{ + static _ControlImpl::SizeInfo sizeInfo; + return sizeInfo; +} + +_ControlImpl::SizeInfo& +SizeInfo::GetListSizeInfo(void) +{ + static _ControlImpl::SizeInfo sizeInfo; + return sizeInfo; +} + +_ControlImpl::SizeInfo& +SizeInfo::GetOverlayPanelSizeInfo(void) +{ + static _OverlayPanelImpl::OverlayPanelSizeInfo OverlayPanelSizeInfo; + return OverlayPanelSizeInfo; +} + +_ControlImpl::SizeInfo& +SizeInfo::GetSlidableListSizeInfo(void) +{ + static _ControlImpl::SizeInfo sizeInfo; + return sizeInfo; +} + +_ControlImpl::SizeInfo& +SizeInfo::GetSlidableGroupedListSizeInfo(void) +{ + static _ControlImpl::SizeInfo sizeInfo; + return sizeInfo; +} + +_ControlImpl::SizeInfo& +SizeInfo::GetWebSizeInfo(void) +{ + class WebSizeInfo : public _ContainerImpl::SizeInfo + { + public: + virtual Dimension GetDefaultMinimumSize(_ControlOrientation orientation) const + { + return Dimension(1, 1); + } + }; + static WebSizeInfo webSizeInfo; + return webSizeInfo; +} + +_ControlImpl::SizeInfo& +SizeInfo::GetMapSizeInfo(void) +{ + class MapSizeInfo : public _ContainerImpl::SizeInfo + { + public: + virtual Dimension GetDefaultMinimumSize(_ControlOrientation orientation) const + { + return Dimension(1, 1); + } + }; + static MapSizeInfo sizeInfo; + return sizeInfo; +} + +Tizen::Ui::_ControlImpl::SizeInfo& +SizeInfo::GetEditDateSizeInfo(void) +{ + static _ControlImpl::SizeInfo sizeInfo; + return sizeInfo; +} + +Tizen::Ui::_ControlImpl::SizeInfo& +SizeInfo::GetEditTimeSizeInfo(void) +{ + static _ControlImpl::SizeInfo sizeInfo; + return sizeInfo; +} + +Tizen::Ui::_ControlImpl::SizeInfo& +SizeInfo::GetTableViewSizeInfo(void) +{ + static Tizen::Ui::Controls::_TableViewImpl::TableViewSizeInfo tableViewSizeInfo; + return tableViewSizeInfo; +} + +Tizen::Ui::_ControlImpl::SizeInfo& +SizeInfo::GetTableViewItemSizeInfo(void) +{ + static Tizen::Ui::Controls::_TableViewItemImpl::TableViewItemSizeInfo tableViewItemSizeInfo; + return tableViewItemSizeInfo; +} + +}}}//Tizen::Ui diff --git a/src/ui/resource/FUi_ResourceSliderConfig.cpp b/src/ui/resource/FUi_ResourceSliderConfig.cpp new file mode 100644 index 0000000..b7bd5c7 --- /dev/null +++ b/src/ui/resource/FUi_ResourceSliderConfig.cpp @@ -0,0 +1,116 @@ +// +// 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_ResourceSliderConfig.cpp + * @brief This is a configuration file for color, image and shape values of Slider, Progress. + */ + +#include "FUi_ResourceSliderConfig.h" + +START_UI_CONFIG(SLIDER); +{ + + ADD_COLOR_CONFIG(BG_OTHERS_NORMAL, $B012); + ADD_COLOR_CONFIG(BG_DEFAULT_NORMAL, $B0217); + + ADD_COLOR_CONFIG(BAR_BG_NORMAL, $W062L1); + ADD_COLOR_CONFIG(BAR_NORMAL, $W062L2); + + ADD_COLOR_CONFIG(HANDLE_BG_NORMAL, $W0641); + ADD_COLOR_CONFIG(HANDLE_BG_PRESSED, $W0641P); + ADD_COLOR_CONFIG(HANDLE_BG_DISABLED, $W0641D); + ADD_COLOR_CONFIG(HANDLE_BG_HIGHLIGHTED, $W161); + ADD_COLOR_CONFIG(HANDLE_NUMBER_TEXT_DISABLED, $W0611D); + ADD_COLOR_CONFIG(HANDLE_NUMBER_TEXT_NORMAL, $W0611); + + ADD_COLOR_CONFIG(HANDLE_NUMBER_TEXT_PRESSED, $W0611P); + ADD_COLOR_CONFIG(HANDLE_NUMBER_TEXT_HIGHLIGHTED, $W0611); + + ADD_COLOR_CONFIG(TITLE_TEXT_NORMAL, $F011L3); + ADD_COLOR_CONFIG(OVERLAY_BG_NORMAL, $W0631); + ADD_COLOR_CONFIG(OVERLAY_TEXT_NORMAL, $W0632); + + ADD_IMAGE_CONFIG(BAR_BG_NORMAL, #00_progress_bg.#.png); + ADD_IMAGE_CONFIG(BAR_NORMAL, #00_progress_bar.#.png); + ADD_IMAGE_CONFIG(BAR_BG_EFFECT, #00_progress_ef_bg.#.png); + ADD_IMAGE_CONFIG(BAR_EFFECT, #00_progress_bar_ef.#.png); + + ADD_IMAGE_CONFIG(HANDLE_BG_NORMAL, #00_slider_handle.png); + ADD_IMAGE_CONFIG(HANDLE_BG_PRESSED, #00_slider_handle.png); + ADD_IMAGE_CONFIG(HANDLE_BG_DISABLED, #00_slider_handle.png); + ADD_IMAGE_CONFIG(HANDLE_BG_HIGHLIGHTED, #00_slider_handle_focus.png); + + ADD_IMAGE_CONFIG(HANDLE_BG_EFFECT_NORMAL, #00_slider_handle_ef.png); + ADD_IMAGE_CONFIG(HANDLE_BG_EFFECT_PRESSED, #00_slider_handle_ef_press.png); + ADD_IMAGE_CONFIG(HANDLE_BG_EFFECT_DISABLED, #00_slider_handle_ef_dim.png); + ADD_IMAGE_CONFIG(HANDLE_BG_EFFECT_HIGHLIGHTED, #00_slider_handle_ef.png); + + ADD_IMAGE_CONFIG(OVERLAY_BG_NORMAL, #00_slider_popup_bg.#.png); + + ADD_IMAGE_CONFIG(GROUPED_TOP_BG_NORMAL, #00_list_group_bg_top.#.png); + ADD_IMAGE_CONFIG(GROUPED_MIDDLE_BG_NORMAL, #00_list_group_bg_center.#.png); + ADD_IMAGE_CONFIG(GROUPED_BOTTOM_BG_NORMAL, #00_list_group_bg_bottom.#.png); + ADD_IMAGE_CONFIG(GROUPED_TOP_BG_EFFECT_NORMAL, #00_list_group_bg_top_ef.#.png); + ADD_IMAGE_CONFIG(GROUPED_MIDDLE_BG_EFFECT_NORMAL, #00_list_group_bg_center_ef.#.png); + ADD_IMAGE_CONFIG(GROUPED_BOTTOM_BG_EFFECT_NORMAL, #00_list_group_bg_bottom_ef.#.png); + ADD_IMAGE_CONFIG(GROUPED_SINGLE_BG_NORMAL, #00_list_group_bg.#.png); + ADD_IMAGE_CONFIG(GROUPED_SINGLE_BG_EFFECT_NORMAL, #00_list_group_bg_ef.#.png); + + START_UI_CONFIG_MODE(720x1280); + { + ADD_SHAPE_CONFIG(HANDLE_WIDTH, 72); + ADD_SHAPE_CONFIG(HANDLE_HEIGHT, 72); + + ADD_SHAPE_CONFIG(HANDLE_ONE_DIGIT_TEXT_SIZE, 42); + ADD_SHAPE_CONFIG(HANDLE_TWO_DIGIT_TEXT_SIZE, 34); + ADD_SHAPE_CONFIG(HANDLE_THREE_DIGIT_TEXT_SIZE, 26); + + ADD_SHAPE_CONFIG(BAR_HEIGHT, 27); + ADD_SHAPE_CONFIG(BAR_LEFT_MARGIN, 45); + ADD_SHAPE_CONFIG(BAR_OFFSET, 7); + + ADD_SHAPE_CONFIG(ICON_WIDTH, 72); + ADD_SHAPE_CONFIG(ICON_HEIGHT, 72); + ADD_SHAPE_CONFIG(ICON_LEFT_MARGIN, 26); + ADD_SHAPE_CONFIG(ICON_RIGHT_MARGIN, 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, 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, 0); + + ADD_SHAPE_CONFIG(OVERLAY_TEXT_SIZE, 40); + ADD_SHAPE_CONFIG(NUMBER_SIZE, 58); + ADD_SHAPE_CONFIG(TEXT_SIZE, 28); + + ADD_SHAPE_CONFIG(MINIMUM_WIDTH_WITHOUT_ICON, 276); + ADD_SHAPE_CONFIG(MINIMUM_WIDTH_WITH_ICON, 510); + + ADD_SHAPE_CONFIG(MINIMUM_HEIGHT, 68); + + } + END_UI_CONFIG_MODE(720x1280); + +} +END_UI_CONFIG(SLIDER); diff --git a/src/ui/resource/FUi_ResourceSplitPanelConfig.cpp b/src/ui/resource/FUi_ResourceSplitPanelConfig.cpp new file mode 100644 index 0000000..1f79708 --- /dev/null +++ b/src/ui/resource/FUi_ResourceSplitPanelConfig.cpp @@ -0,0 +1,45 @@ +// +// 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_ResourceSplitPanelConfig.cpp + * @brief This is the implementation file for the color, image and shape properties of SplitPanel. + */ + +#include "FUi_ResourceSplitPanelConfig.h" + +START_UI_CONFIG(SPLITPANEL); +{ + ADD_COLOR_CONFIG(DIVIDER_BG_NORMAL, $W131); + ADD_COLOR_CONFIG(DIVIDER_BG_PRESSED, $W132); + ADD_COLOR_CONFIG(DIVIDER_BG_DISABLED, $W132); + + ADD_IMAGE_CONFIG(DIVIDER_BG_NORMAL, #00_split_handler_bg.#.png); + ADD_IMAGE_CONFIG(VERTICAL_DIVIDER_BG_EFFECT, #00_split_handler_bg_ef_v.#.png); + ADD_IMAGE_CONFIG(VERTICAL_DIVIDER_BG_NORMAL, #00_split_handler_v.png); + ADD_IMAGE_CONFIG(HORIZONTAL_DIVIDER_BG_EFFECT, #00_split_handler_bg_ef_h.#.png); + ADD_IMAGE_CONFIG(HORIZONTAL_DIVIDER_BG_NORMAL, #00_split_handler_h.png); + + START_UI_CONFIG_MODE(720x1280); + { + ADD_SHAPE_CONFIG(FIXED_DIVIDER_THICKNESS, 5); + ADD_SHAPE_CONFIG(MOVABLE_DIVIDER_THICKNESS, 13); + ADD_SHAPE_CONFIG(EXTENDED_MOVABLE_DIVIDER_TOUCH_MARGIN, 22); + } + END_UI_CONFIG_MODE(720x1280); +} +END_UI_CONFIG(SPLITPANEL); diff --git a/src/ui/resource/FUi_ResourceStringLoader.cpp b/src/ui/resource/FUi_ResourceStringLoader.cpp new file mode 100644 index 0000000..c08dd7c --- /dev/null +++ b/src/ui/resource/FUi_ResourceStringLoader.cpp @@ -0,0 +1,45 @@ +// +// 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. +// +#include +#include +#include +#include +#include +#include "FUi_ResourceStringLoader.h" + +using namespace Tizen::Base; + +namespace +{ +const char* const OSP_DOMAIN ="osp"; +} + +namespace Tizen { namespace Ui { namespace _Resource +{ +StringLoader::StringLoader(void) +{ +} +StringLoader::~StringLoader(void) +{ +} +result +StringLoader::GetString(const char* stringId, String& string) +{ + string = dgettext(OSP_DOMAIN, stringId); + return E_SUCCESS; +} +}}}//Tizen::Ui::_Resource diff --git a/src/ui/resource/FUi_ResourceTabBarConfig.cpp b/src/ui/resource/FUi_ResourceTabBarConfig.cpp new file mode 100644 index 0000000..d8937c8 --- /dev/null +++ b/src/ui/resource/FUi_ResourceTabBarConfig.cpp @@ -0,0 +1,64 @@ +// +// 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_ResourceTabBarConfig.cpp + * @brief This is the implementation file for the color properties of TabBar. + */ + +#include "FUi_ResourceTabBarConfig.h" + +START_UI_CONFIG(TABBAR); +{ + ADD_COLOR_CONFIG(BG_NORMAL, $W0813); + ADD_COLOR_CONFIG(ITEM_BG_NORMAL, $W0813); + ADD_COLOR_CONFIG(ITEM_BG_PRESSED, $W101); + ADD_COLOR_CONFIG(ITEM_BG_SELECTED, $W101); + ADD_COLOR_CONFIG(ITEM_BG_DISABLED, $W0813); + ADD_COLOR_CONFIG(ITEM_TEXT_NORMAL, $F031L3); + ADD_COLOR_CONFIG(ITEM_TEXT_PRESSED, $F031L3P); + ADD_COLOR_CONFIG(ITEM_TEXT_SELECTED, $F031L3P); + ADD_COLOR_CONFIG(ITEM_TEXT_DISABLED, $F031L3D); + ADD_COLOR_CONFIG(ARROW_BG_NORMAL, $F031L3); + + ADD_IMAGE_CONFIG(BG_NORMAL, #00_category_panel_bg.#.png) + ADD_IMAGE_CONFIG(BG_OUTLINE_EFFECT_NORMAL, #00_category_panel_bg_ef.#.png); + ADD_IMAGE_CONFIG(LEFT_ARROW_NORMAL, #00_arrow_left.png); + ADD_IMAGE_CONFIG(RIGHT_ARROW_NORMAL, #00_arrow_right.png); + ADD_IMAGE_CONFIG(ITEM_BG_NORMAL, #00_category_button.#.png); + ADD_IMAGE_CONFIG(ITEM_BG_PRESSED, #00_category_button_focus.#.png); + ADD_IMAGE_CONFIG(ITEM_BG_SELECTED, #00_category_button.#.png); + ADD_IMAGE_CONFIG(ITEM_BG_DISABLED, #00_category_button.#.png); + + START_UI_CONFIG_MODE(480x800); + END_UI_CONFIG_MODE(480x800); + + START_UI_CONFIG_MODE(720x1280); + ADD_SHAPE_CONFIG(FONT_SIZE, 40); + ADD_SHAPE_CONFIG(FONT_MARGIN, 10); + ADD_SHAPE_CONFIG(TOP_MARGIN, 9); + ADD_SHAPE_CONFIG(SIDE_MARGIN, 54); + ADD_SHAPE_CONFIG(ITEM_MARGIN, 12); + ADD_SHAPE_CONFIG(ITEM_MIN_WIDTH, 140); + ADD_SHAPE_CONFIG(ITEM_MAX_WIDTH, 444); + ADD_SHAPE_CONFIG(ITEM_HEIGHT, 72); + ADD_SHAPE_CONFIG(HEIGHT, 90); + 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_ResourceTabConfig.cpp b/src/ui/resource/FUi_ResourceTabConfig.cpp new file mode 100644 index 0000000..94d32e3 --- /dev/null +++ b/src/ui/resource/FUi_ResourceTabConfig.cpp @@ -0,0 +1,116 @@ +// +// 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_ResourceTabConfig.cpp + * @brief This is the implementation file for the color, image and shape properties of Tab. + */ + +#include "FUi_ResourceTabConfig.h" + +START_UI_CONFIG(TAB); +{ + ADD_COLOR_CONFIG(ITEM_BG_NORMAL, $B0511); + ADD_COLOR_CONFIG(ITEM_BG_PRESSED, $B0514P1); + ADD_COLOR_CONFIG(ITEM_BG_EFFECT_PRESSED, $B0514P1); + ADD_COLOR_CONFIG(ITEM_BG_SELECTED, $B0511); + ADD_COLOR_CONFIG(ITEM_BG_HIGHLIGHTED, $B0514P2); + ADD_COLOR_CONFIG(ITEM_BG_DISABLED, $B0513); + ADD_COLOR_CONFIG(ITEM_TEXT_NORMAL, $B052L6); + ADD_COLOR_CONFIG(ITEM_TEXT_PRESSED, $B052L6P2); + ADD_COLOR_CONFIG(ITEM_TEXT_SELECTED, $B052L6P1); + ADD_COLOR_CONFIG(ITEM_TEXT_HIGHLIGHTED, $B052L6); + ADD_COLOR_CONFIG(ITEM_TEXT_DISABLED, $B052L6D); + ADD_COLOR_CONFIG(DIVIDER_LEFT_HALF, $B0221L1); + ADD_COLOR_CONFIG(DIVIDER_RIGHT_HALF, $B0221L1); + ADD_COLOR_CONFIG(ITEM_SELECTED, $B052L1P); + //ADD_IMAGE_CONFIG(VERTICAL_DIVIDER_NORMAL, #00_divider_line.#.png); + ADD_IMAGE_CONFIG(ITEM_SELECTED, #00_tab_select_bar.#.png); + ADD_IMAGE_CONFIG(ITEM_BG_NORMAL, #00_tab_bg.#.png); + ADD_IMAGE_CONFIG(ITEM_BG_PRESSED, #00_tab_bg.#.png); + ADD_IMAGE_CONFIG(ITEM_BG_SELECTED, #00_tab_bg.#.png); + ADD_IMAGE_CONFIG(ITEM_BG_HIGHLIGHTED, #00_tab_focus.#.png); + ADD_IMAGE_CONFIG(ITEM_BG_DISABLED, #00_tab_bg.#.png); + ADD_IMAGE_CONFIG(ITEM_BG_EFFECT_PRESSED, #00_tab_press_ef.#.png); + ADD_IMAGE_CONFIG(ITEM_BG_EFFECT_SELECTED, #00_tab_press_ef.#.png); + ADD_IMAGE_CONFIG(ITEM_BG_EFFECT_HIGHLIGHTED, #00_tab_press_ef.#.png); + ADD_IMAGE_CONFIG(TAB_BOUNCE_EFFECT_LEFT, #00_effect_tab_bounce_left.png); + ADD_IMAGE_CONFIG(TAB_BOUNCE_EFFECT_RIGHT, #00_effect_tab_bounce_right.png); + + + START_UI_CONFIG_MODE(480x800); + { + ADD_SHAPE_CONFIG(SCREEN_HEIGHT, _SCREEN_HEIGHT_); + ADD_SHAPE_CONFIG(SCREEN_WIDTH, 480); + } + END_UI_CONFIG_MODE(480x800); + + START_UI_CONFIG_MODE(720x1280); + { + ADD_FIXED_VALUE_CONFIG(ITEM_MAX_COUNT, 4); + ADD_SHAPE_CONFIG(LEFT_MARGIN, 16); + ADD_SHAPE_CONFIG(RIGHT_MARGIN, 16); + //ADD_SHAPE_CONFIG(SELECTED_LINE_LEFT_MARGIN, 16); + //ADD_SHAPE_CONFIG(SELECTED_LINE_RIGHT_MARGIN, 16); + ADD_SHAPE_CONFIG(SELECTED_LINE_HEIGHT, 10); + ADD_SHAPE_CONFIG(SCREEN_WIDTH, 720); + ADD_SHAPE_CONFIG(SCREEN_HEIGHT, _SCREEN_HEIGHT_); + ADD_SHAPE_CONFIG(HEIGHT, 96); + ADD_FIXED_VALUE_CONFIG(FONT_CHANGE_ITEM_COUNT, 3); + ADD_SHAPE_CONFIG(FONT_SIZE_01, 30); + ADD_SHAPE_CONFIG(FONT_SIZE_02, 26); + ADD_SHAPE_CONFIG(FONT_SIZE_03, 24); + ADD_SHAPE_CONFIG(MULTILINE_FONT_SIZE_01, 30); + ADD_SHAPE_CONFIG(MULTILINE_FONT_SIZE_02, 26); + ADD_SHAPE_CONFIG(MULTILINE_FONT_SIZE_03, 24); + ADD_SHAPE_CONFIG(ICON_TEXT_FONT_SIZE_01, 30); + ADD_SHAPE_CONFIG(ICON_TEXT_FONT_SIZE_02, 26); + ADD_SHAPE_CONFIG(ICON_TEXT_FONT_SIZE_03, 24); + ADD_SHAPE_CONFIG(TOP_MARGIN, 22); + ADD_SHAPE_CONFIG(BOTTOM_MARGIN, 21); + ADD_SHAPE_CONFIG(ITEM_LEFT_MARGIN, 10); + ADD_SHAPE_CONFIG(ITEM_RIGHT_MARGIN, 10); + ADD_SHAPE_CONFIG(ICON_TEXT_TOP_MARGIN, 21); + ADD_SHAPE_CONFIG(ICON_TEXT_ICON_WIDTH, 45); + ADD_SHAPE_CONFIG(ICON_TEXT_ICON_HEIGHT, 45); + ADD_SHAPE_CONFIG(ICON_TEXT_BOTTOM_MARGIN, 20); + ADD_FIXED_VALUE_CONFIG(ICON_TEXT_GAP, 8); + ADD_SHAPE_CONFIG(ICON_WIDTH, 63); + ADD_SHAPE_CONFIG(ICON_HEIGHT, 63); + ADD_SHAPE_CONFIG(BADGE_ICON_MARGIN, 6); + ADD_FIXED_VALUE_CONFIG(DIVIDER_WIDTH, 2); + ADD_SHAPE_CONFIG(DIVIDER_HEIGHT, 26); + ADD_SHAPE_CONFIG(TAB_MINIMUM_SIZE, 342); + } + END_UI_CONFIG_MODE(720x1280); + + START_UI_CONFIG_MODE(1280x720); + { + ADD_SHAPE_CONFIG(HEIGHT, 96); + ADD_SHAPE_CONFIG(SCREEN_WIDTH, 1280); + ADD_SHAPE_CONFIG(SCREEN_HEIGHT, 720); + ADD_SHAPE_CONFIG(LEFT_MARGIN, 34); + ADD_SHAPE_CONFIG(RIGHT_MARGIN, 34); + ADD_SHAPE_CONFIG(ICON_TEXT_FONT_SIZE_01, 30); + ADD_SHAPE_CONFIG(TOP_MARGIN, 12); + ADD_SHAPE_CONFIG(BOTTOM_MARGIN, 11); + ADD_SHAPE_CONFIG(ICON_TEXT_TOP_MARGIN, 19); + ADD_SHAPE_CONFIG(ICON_TEXT_BOTTOM_MARGIN, 19); + } + END_UI_CONFIG_MODE(1280x720); +} +END_UI_CONFIG(TAB); diff --git a/src/ui/resource/FUi_ResourceTableViewConfig.cpp b/src/ui/resource/FUi_ResourceTableViewConfig.cpp new file mode 100644 index 0000000..eeb6042 --- /dev/null +++ b/src/ui/resource/FUi_ResourceTableViewConfig.cpp @@ -0,0 +1,159 @@ +// +// 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_ResourceTableViewConfig.cpp + * @brief This is the implementation file for the UI properties of TableView. + */ + +#include "FUi_ResourceTableViewConfig.h" + +START_UI_CONFIG(TABLEVIEW); +{ + ADD_COLOR_CONFIG(BG_NORMAL, 0x00000000); + ADD_COLOR_CONFIG(ITEM_DIVIDER_TOP_BG_NORMAL, $B0223); + ADD_COLOR_CONFIG(ITEM_DIVIDER_BOTTOM_BG_NORMAL, $B0222); + ADD_COLOR_CONFIG(ITEM_BG_NORMAL, 0x00000000); + ADD_COLOR_CONFIG(ITEM_BG_PRESSED, $B041); + ADD_COLOR_CONFIG(ITEM_BG_HIGHLIGHTED, $B041); + ADD_COLOR_CONFIG(ITEM_BG_DISABLED, $B0211D); + ADD_COLOR_CONFIG(ITEM_TEXT_NORMAL, $F011L1); + ADD_COLOR_CONFIG(ITEM_TEXT_PRESSED, $F011L1P); + ADD_COLOR_CONFIG(ITEM_TEXT_HIGHLIGHTED, $F011L1P); + ADD_COLOR_CONFIG(ITEM_TEXT_DISABLED, $F011L1D); + ADD_COLOR_CONFIG(ITEM_DESCRIPTION_TEXT_NORMAL, $F011L21); + ADD_COLOR_CONFIG(ITEM_ANNEX_CANVAS_BG_NORMAL, $B0211); + ADD_COLOR_CONFIG(ITEM_ANNEX_DETAIL_NORMAL, $F032L1); + ADD_COLOR_CONFIG(ITEM_ANNEX_DETAIL_PRESSED, $F032L1P); + ADD_COLOR_CONFIG(ITEM_ANNEX_DETAIL_HIGHLIGHTED, $F032L1P); + ADD_COLOR_CONFIG(ITEM_ANNEX_DETAIL_BG_NORMAL, $W011); + ADD_COLOR_CONFIG(ITEM_ANNEX_DETAIL_BG_PRESSED, $B042); + ADD_COLOR_CONFIG(ITEM_ANNEX_DETAIL_BG_HIGHLIGHTED, $B042); + ADD_COLOR_CONFIG(GROUPITEM_BG_NORMAL, $W021L1); + ADD_COLOR_CONFIG(GROUPITEM_BG_PRESSED, $W021L1P); + ADD_COLOR_CONFIG(GROUPITEM_BG_HIGHLIGHTED, $W021L1P); + ADD_COLOR_CONFIG(GROUPITEM_BG_DISABLED, $W021L1P); + ADD_COLOR_CONFIG(GROUPITEM_TEXT_NORMAL, $W021L3); + ADD_COLOR_CONFIG(GROUPITEM_TEXT_PRESSED, $W021L3P); + ADD_COLOR_CONFIG(GROUPITEM_TEXT_HIGHLIGHTED, $W021L3P); + ADD_COLOR_CONFIG(GROUPITEM_TEXT_DISABLED, $W021L3); + ADD_COLOR_CONFIG(GROUPITEM_INDEX_BAR_NORMAL, $W021L2); + ADD_COLOR_CONFIG(GROUPITEM_INDEX_BAR_PRESSED, $W021L2P); + ADD_COLOR_CONFIG(GROUPITEM_INDEX_BAR_HIGHLIGHTED, $W021L2P); + ADD_COLOR_CONFIG(GROUPITEM_INDEX_BAR_DISABLED, $W021L2); + ADD_COLOR_CONFIG(GROUPITEM_BAR_NORMAL, $B0232); + ADD_COLOR_CONFIG(GROUPITEM_BAR_PRESSED, $B0232); + ADD_COLOR_CONFIG(GROUPITEM_BAR_HIGHLIGHTED, $B0232); + ADD_COLOR_CONFIG(GROUPITEM_BAR_DISABLED, $B0232); + ADD_COLOR_CONFIG(SECTIONITEM_BG_NORMAL, $B0217); + ADD_COLOR_CONFIG(CONTEXTITEM_BG_NORMAL, $B0212); + ADD_COLOR_CONFIG(EMPTY_CONTENTS_TEXT_NORMAL, $F011L21); + ADD_COLOR_CONFIG(ITEM_ANNEX_DIVIDER_LEFT_BG_NORMAL, $B0221L4); + ADD_COLOR_CONFIG(ITEM_ANNEX_DIVIDER_RIGHT_BG_NORMAL, $B0222L4); + + ADD_IMAGE_CONFIG(GROUPITEM_BG_NORMAL, #00_indexlist_bg.#.png); + ADD_IMAGE_CONFIG(GROUPITEM_BG_EFFECT, #00_indexlist_bg_ef.#.png); + ADD_IMAGE_CONFIG(SECTIONITEM_SINGLE_BG_NORMAL, #00_list_group_bg.#.png); + ADD_IMAGE_CONFIG(SECTIONITEM_SINGLE_BG_PRESSED, #00_list_group_press_bg.#.png); + ADD_IMAGE_CONFIG(SECTIONITEM_SINGLE_BG_HIGHLIGHTED, #00_list_group_press_bg.#.png); + ADD_IMAGE_CONFIG(SECTIONITEM_SINGLE_COVER_BG_NORMAL, #00_list_group_bg_ef.#.png); + ADD_IMAGE_CONFIG(SECTIONITEM_TOP_BG_NORMAL, #00_list_group_bg_top.#.png); + ADD_IMAGE_CONFIG(SECTIONITEM_TOP_BG_PRESSED, #00_list_group_press_bg_top.#.png); + ADD_IMAGE_CONFIG(SECTIONITEM_TOP_BG_HIGHLIGHTED, #00_list_group_press_bg_top.#.png); + ADD_IMAGE_CONFIG(SECTIONITEM_TOP_COVER_BG_NORMAL, #00_list_group_bg_top_ef.#.png); + ADD_IMAGE_CONFIG(SECTIONITEM_CENTER_BG_NORMAL, #00_list_group_bg_center.#.png); + ADD_IMAGE_CONFIG(SECTIONITEM_CENTER_BG_PRESSED, #00_list_group_press_bg_center.#.png); + ADD_IMAGE_CONFIG(SECTIONITEM_CENTER_BG_HIGHLIGHTED, #00_list_group_press_bg_center.#.png); + ADD_IMAGE_CONFIG(SECTIONITEM_CENTER_COVER_BG_NORMAL, #00_list_group_bg_center_ef.#.png); + ADD_IMAGE_CONFIG(SECTIONITEM_BOTTOM_BG_NORMAL, #00_list_group_bg_bottom.#.png); + ADD_IMAGE_CONFIG(SECTIONITEM_BOTTOM_BG_PRESSED, #00_list_group_press_bg_bottom.#.png); + ADD_IMAGE_CONFIG(SECTIONITEM_BOTTOM_BG_HIGHLIGHTED, #00_list_group_press_bg_bottom.#.png); + ADD_IMAGE_CONFIG(SECTIONITEM_BOTTOM_COVER_BG_NORMAL, #00_list_group_bg_bottom_ef.#.png); + ADD_IMAGE_CONFIG(CHECKBOX_BG_NORMAL, #00_check_bg.png); + ADD_IMAGE_CONFIG(CHECKBOX_BG_PRESSED, #00_check_press_bg.png); + ADD_IMAGE_CONFIG(CHECKBOX_BG_HIGHLIGHTED, #00_check_press_bg.png); + ADD_IMAGE_CONFIG(CHECKBOX_BG_DISABLED, #00_check_dim_bg.png); + ADD_IMAGE_CONFIG(CHECKBOX_CHECK_MARK_NORMAL, #00_check_activated.png); + ADD_IMAGE_CONFIG(CHECKBOX_CHECK_MARK_DISABLED, #00_check_activated_dim.png); + ADD_IMAGE_CONFIG(RADIOBUTTON_NORMAL, #00_button_radio_bg.png); + ADD_IMAGE_CONFIG(RADIOBUTTON_PRESSED, #00_button_radio_press_bg.png); + ADD_IMAGE_CONFIG(RADIOBUTTON_NORMAL_DISABLED, #00_button_radio_dim_bg.png); + ADD_IMAGE_CONFIG(RADIOBUTTON_BUTTON_NORMAL, #00_button_radio_activated.png); + ADD_IMAGE_CONFIG(RADIOBUTTON_BUTTON_DISABLED, #00_button_radio_activated_dim.png); + ADD_IMAGE_CONFIG(RADIOBUTTON_BUTTON_PRESSED, #00_button_radio_activated_press.png); + ADD_IMAGE_CONFIG(ONOFFBUTTON_ON_HANDLER, #00_button_on_handler.png); + ADD_IMAGE_CONFIG(ONOFFBUTTON_ON_HANDLER_DISABLED, #00_button_on_handler_dim.png); + ADD_IMAGE_CONFIG(ONOFFBUTTON_OFF_HANDLER, #00_button_off_handler.png); + ADD_IMAGE_CONFIG(ONOFFBUTTON_OFF_HANDLER_DISABLED, #00_button_off_handler_dim.png); + ADD_IMAGE_CONFIG(ONOFFBUTTON_BG, #00_button_on_off_bg.png); + ADD_IMAGE_CONFIG(ONOFFBUTTON_BG_DISABLED, #00_button_on_off_bg_dim.png); + ADD_IMAGE_CONFIG(CIRCLE_BUTTON_BG_NORMAL, #00_circle_bg.png); + ADD_IMAGE_CONFIG(CIRCLE_BUTTON_BG_PRESSED, #00_circle_bg_ef_press.png); + ADD_IMAGE_CONFIG(CIRCLE_BUTTON_BG_HIGHLIGHTED, #00_circle_bg_ef_press.png); + ADD_IMAGE_CONFIG(CIRCLE_BUTTON_BG_EFFECT, #00_circle_bg_ef.png); + ADD_IMAGE_CONFIG(CIRCLE_BUTTON_BG_EFFECT_DISABLED, #00_circle_bg_ef_dim.png); + ADD_IMAGE_CONFIG(CIRCLE_BUTTON_REVEAL_NORMAL, #00_button_right.png); + ADD_IMAGE_CONFIG(SEARCH_ICON_NORMAL, #00_search_icon.png); + ADD_IMAGE_CONFIG(CHECKBOX_CHECK_MARK_PRESSED, #00_check_activated_press.png); + ADD_IMAGE_CONFIG(CIRCLE_BUTTON_REVEAL_PRESSED, #00_button_right.png); + ADD_IMAGE_CONFIG(CIRCLE_BUTTON_REVEAL_HIGHLIGHTED, #00_button_right.png); + ADD_IMAGE_CONFIG(CIRCLE_BUTTON_REVEAL_DISABLED, #00_button_right.png); + ADD_IMAGE_CONFIG(CIRCLE_BUTTON_BG_DISABLED, #00_circle_bg.png); + ADD_IMAGE_CONFIG(CIRCLE_BUTTON_REVEAL_EFFECT, #00_button_right_ef.png); + ADD_IMAGE_CONFIG(SECTIONITEM_SINGLE_COVER_ROUND_BG_NORMAL, #00_list_group_single_cover_round_bg_normal.#.png); + ADD_IMAGE_CONFIG(SECTIONITEM_TOP_COVER_ROUND_BG_NORMAL, #00_list_group_top_cover_round_bg_normal.#.png); + ADD_IMAGE_CONFIG(SECTIONITEM_CENTER_COVER_ROUND_BG_NORMAL, #00_list_group_center_cover_round_bg_normal.#.png); + ADD_IMAGE_CONFIG(SECTIONITEM_BOTTOM_COVER_ROUND_BG_NORMAL, #00_list_group_bottom_cover_round_bg_normal.#.png); + ADD_IMAGE_CONFIG(SECTIONITEM_SINGLE_BG_DISABLED, #00_list_group_bg.#.png); + ADD_IMAGE_CONFIG(SECTIONITEM_TOP_BG_DISABLED, #00_list_group_bg_top.#.png); + ADD_IMAGE_CONFIG(SECTIONITEM_CENTER_BG_DISABLED, #00_list_group_bg_center.#.png); + ADD_IMAGE_CONFIG(SECTIONITEM_BOTTOM_BG_DISABLED, #00_list_group_bg_bottom.#.png); + ADD_IMAGE_CONFIG(QUICK_MENU_BG_NORMAL, #00_quick_menu_bg.#.png); + ADD_IMAGE_CONFIG(QUICK_MENU_BG_EFFECT, #00_quick_menu_bg_ef.#.png); + + + START_UI_CONFIG_MODE(720x1280); + ADD_DIMENSION_CONFIG(MIN_SIZE, 0, 0); + ADD_SHAPE_CONFIG(ITEM_DEFAULT_FONT_SIZE, 44); + ADD_SHAPE_CONFIG(ITEM_LEFT_MARGIN, 26); + ADD_SHAPE_CONFIG(ITEM_ANNEX_WIDTH, 63); + ADD_SHAPE_CONFIG(ITEM_ANNEX_HEIGHT, 63); + ADD_SHAPE_CONFIG(ITEM_ANNEX_MARGIN, 16); + ADD_SHAPE_CONFIG(ITEM_ANNEX_ONOFF_WIDTH, 135); + ADD_SHAPE_CONFIG(ITEM_ANNEX_ONOFF_HEIGHT, 63); + ADD_SHAPE_CONFIG(ITEM_ANNEX_ONOFF_MARGIN, 1); + ADD_SHAPE_CONFIG(ITEM_ANNEX_MORE_WIDTH, 72); + ADD_SHAPE_CONFIG(ITEM_ANNEX_MORE_HEIGHT, 72); + ADD_SHAPE_CONFIG(CONTEXTITEM_RIGHT_MARGIN, 0); + ADD_SHAPE_CONFIG(GROUPITEM_DEFAULT_HEIGHT, 78); + ADD_SHAPE_CONFIG(GROUPITEM_DEFAULT_TEXT_HEIGHT, 46); + ADD_SHAPE_CONFIG(GROUPITEM_DEFAULT_FONT_SIZE, 32); + ADD_SHAPE_CONFIG(GROUPITEM_LEFT_MARGIN, 26); + ADD_SHAPE_CONFIG(GROUPITEM_BAR_WIDTH, 7); + 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, 0); + ADD_SHAPE_CONFIG(FASTSCROLL_INDEX_WIDTH, 51); + ADD_FIXED_VALUE_CONFIG(ITEM_DIVIDER_HEIGHT, 1); + ADD_FIXED_VALUE_CONFIG(SECTIONITEM_TOP_MARGIN, 0); + ADD_FIXED_VALUE_CONFIG(ITEM_ANNEX_DIVIDER_WIDTH, 1); + ADD_FIXED_VALUE_CONFIG(ITEM_ANNEX_DIVIDER_MARGIN, 30); + ADD_FIXED_VALUE_CONFIG(ITEM_DIVIDER_LEFT_MARGIN, 2); + END_UI_CONFIG_MODE(720x1280); +} +END_UI_CONFIG(TABLEVIEW); diff --git a/src/ui/resource/FUi_ResourceTokenEditConfig.cpp b/src/ui/resource/FUi_ResourceTokenEditConfig.cpp new file mode 100644 index 0000000..2143995 --- /dev/null +++ b/src/ui/resource/FUi_ResourceTokenEditConfig.cpp @@ -0,0 +1,78 @@ +// +// 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_ResourceTokenEditConfig.cpp + * @brief This is the implementation file for the color, image and shape properties of TokenEdit. + */ + +#include "FUi_ResourceTokenEditConfig.h" + +START_UI_CONFIG(TOKENEDIT); +{ + ADD_COLOR_CONFIG(BG_NORMAL, $W0711); + ADD_COLOR_CONFIG(BG_SELECTED, $W0711P); + ADD_COLOR_CONFIG(TEXT_NORMAL, $F011L9); + ADD_COLOR_CONFIG(TEXT_SELECTED, $F011L9); + ADD_COLOR_CONFIG(TEXT_HIGHLIGHTED, $F011L9); + ADD_COLOR_CONFIG(TEXT_DISABLED, $F011L9); + ADD_COLOR_CONFIG(BG_HIGHLIGHTED, $W0715); + ADD_COLOR_CONFIG(BG_DISABLED, $W0711D); + ADD_COLOR_CONFIG(TITLE_TEXT_NORMAL, $F011L11); + ADD_COLOR_CONFIG(TITLE_TEXT_PRESSED, $F011L11); + ADD_COLOR_CONFIG(TITLE_TEXT_HIGHLIGHTED, $F011L11); + ADD_COLOR_CONFIG(TITLE_TEXT_DISABLED, $F011L11); + ADD_COLOR_CONFIG(EDIT_BG_NORMAL, $B0215); + ADD_COLOR_CONFIG(EDIT_BG_PRESSED, $B0215); + ADD_COLOR_CONFIG(EDIT_BG_HIGHLIGHTED, $B0215); + ADD_COLOR_CONFIG(EDIT_BG_DISABLED, $B0215); + ADD_COLOR_CONFIG(EDIT_TEXT_NORMAL, $F011L1); + ADD_COLOR_CONFIG(EDIT_TEXT_PRESSED, $F011L1); + ADD_COLOR_CONFIG(EDIT_TEXT_HIGHLIGHTED, $F011L1); + ADD_COLOR_CONFIG(EDIT_TEXT_DISABLED, $F011L1); + ADD_COLOR_CONFIG(GUIDE_TEXT_NORMAL, $F051); + + ADD_IMAGE_CONFIG(BG_NORMAL, #00_contacts_button_bg.#.png); + ADD_IMAGE_CONFIG(BG_NORMAL_EFFECT, #00_contacts_button_bg_ef.#.png); + ADD_IMAGE_CONFIG(BG_PRESSED_EFFECT, #00_contacts_button_bg_press_ef.#.png); + ADD_IMAGE_CONFIG(BG_FOCUS, #00_contacts_button_focus.#.png); + ADD_IMAGE_CONFIG(BG_FOCUS_EFFECT, #00_contacts_button_focus_ef.#.png); + + START_UI_CONFIG_MODE(720x1280); + { + ADD_SHAPE_CONFIG(LEFT_MARGIN, 26); + ADD_SHAPE_CONFIG(RIGHT_MARGIN, 26); + ADD_SHAPE_CONFIG(TOP_MARGIN, 16); + ADD_SHAPE_CONFIG(BOTTOM_MARGIN, 16); + ADD_SHAPE_CONFIG(TOKEN_TEXT_LEFT_MARGIN, 12); + ADD_SHAPE_CONFIG(TOKEN_TEXT_RIGHT_MARGIN, 12); + ADD_SHAPE_CONFIG(TOKEN_HEIGHT, 66); + ADD_SHAPE_CONFIG(TOKEN_HORIZONTAL_SPACING, 8); + ADD_SHAPE_CONFIG(TOKEN_VERTICAL_SPACING, 16); + ADD_SHAPE_CONFIG(DESCRIPTION_TEXT_RIGHT_MARGIN, 16) + ADD_SHAPE_CONFIG(TOKEN_MIN_WIDTH, 90); + ADD_SHAPE_CONFIG(TOKEN_TEXT_SIZE, 32); + ADD_SHAPE_CONFIG(DESCRIPTION_TEXT_SIZE, 36); + ADD_SHAPE_CONFIG(TEXT_SIZE, 44); + ADD_SHAPE_CONFIG(HIDDEN_TOKEN_COUNT_DISPLAY_MARGIN, 15); + ADD_SHAPE_CONFIG(HIDDEN_TOKEN_COUNT_DISPLAY_TEXT_SIZE, 33); + ADD_SHAPE_CONFIG(HIDDEN_TOKEN_COUNT_DISPLAY_HEIGHT, 60); + ADD_SHAPE_CONFIG(TOKEN_TITLE_RECT_WIDTH, 120); + } + END_UI_CONFIG_MODE(720x1280); +} +END_UI_CONFIG(TOKENEDIT); diff --git a/src/ui/scenes/FUiScenesBackwardSceneTransition.cpp b/src/ui/scenes/FUiScenesBackwardSceneTransition.cpp new file mode 100644 index 0000000..7fd6e6d --- /dev/null +++ b/src/ui/scenes/FUiScenesBackwardSceneTransition.cpp @@ -0,0 +1,56 @@ +// +// 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 FUiScenesBackwardSceneTransition.cpp + * @brief This is the implementation file of the %BackwardSceneTransition class. + * + */ + +#include +#include "FUiScenes_SceneTransitionImpl.h" + + +namespace Tizen { namespace Ui { namespace Scenes +{ + +BackwardSceneTransition::BackwardSceneTransition(void) + : SceneTransition(SCENE_TRANSITION_DIRECTION_BACKWARD, SceneId(L""), SCENE_TRANSITION_ANIMATION_TYPE_NONE, + SCENE_HISTORY_OPTION_NO_HISTORY, SCENE_DESTROY_OPTION_DESTROY) +{ + +} + +BackwardSceneTransition::BackwardSceneTransition(SceneTransitionAnimationType animationType, SceneDestroyOption destroyOption) + : SceneTransition(SCENE_TRANSITION_DIRECTION_BACKWARD, SceneId(L""), animationType, SCENE_HISTORY_OPTION_NO_HISTORY, destroyOption) +{ + +} + +BackwardSceneTransition::BackwardSceneTransition(const SceneId& destinationSceneId, SceneTransitionAnimationType animationType, + SceneDestroyOption destroyOption) +: SceneTransition(SCENE_TRANSITION_DIRECTION_BACKWARD, destinationSceneId, animationType, SCENE_HISTORY_OPTION_NO_HISTORY, destroyOption) +{ + +} + +BackwardSceneTransition::~BackwardSceneTransition(void) +{ + +} + +} } } // Tizen::Ui::Scenes diff --git a/src/ui/scenes/FUiScenesForwardSceneTransition.cpp b/src/ui/scenes/FUiScenesForwardSceneTransition.cpp new file mode 100644 index 0000000..e44e61e --- /dev/null +++ b/src/ui/scenes/FUiScenesForwardSceneTransition.cpp @@ -0,0 +1,57 @@ +// +// 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 FUiScenesForwardSceneTransition.cpp + * @brief This is the implementation file of the %ForwardSceneTransition class. + * + */ + +#include +#include "FUiScenes_SceneTransitionImpl.h" + + +namespace Tizen { namespace Ui { namespace Scenes +{ + +ForwardSceneTransition::ForwardSceneTransition(void) + : SceneTransition(SCENE_TRANSITION_DIRECTION_FORWARD, SceneId(L""), SCENE_TRANSITION_ANIMATION_TYPE_NONE, + SCENE_HISTORY_OPTION_ADD_HISTORY, SCENE_DESTROY_OPTION_KEEP) +{ + +} + +ForwardSceneTransition::ForwardSceneTransition(const SceneId& destinationSceneId, SceneTransitionAnimationType animationType, + SceneHistoryOption historyOption, SceneDestroyOption destroyOption) + : SceneTransition(SCENE_TRANSITION_DIRECTION_FORWARD, destinationSceneId, animationType, historyOption, destroyOption) +{ + +} + +ForwardSceneTransition::ForwardSceneTransition(SceneTransitionAnimationType animationType, + SceneHistoryOption historyOption, SceneDestroyOption destroyOption) + : SceneTransition(SCENE_TRANSITION_DIRECTION_FORWARD, SceneId(L""), animationType, historyOption, destroyOption) +{ + +} + +ForwardSceneTransition::~ForwardSceneTransition(void) +{ + +} + +} } } // Tizen::Ui::Scenes diff --git a/src/ui/scenes/FUiScenesScene.cpp b/src/ui/scenes/FUiScenesScene.cpp new file mode 100644 index 0000000..f880172 --- /dev/null +++ b/src/ui/scenes/FUiScenesScene.cpp @@ -0,0 +1,98 @@ +// +// 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 FUiScenesScene.cpp + * @brief This is the implementation file of the Scene class. + * + */ + +#include +#include +#include "FUiScenes_SceneImpl.h" + + +using namespace Tizen::Base; +using namespace Tizen::Ui::Controls; + + +namespace Tizen { namespace Ui { namespace Scenes +{ + + +Scene::Scene(void) +{ + ClearLastResult(); + __pSceneImpl = new (std::nothrow) _SceneImpl; + SysTryReturnVoidResult(NID_UI_SCENES, __pSceneImpl, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", + GetErrorMessage(E_OUT_OF_MEMORY)); +} + +Scene::~Scene(void) +{ + delete __pSceneImpl; +} + +bool +Scene::Equals(const Object& rhs) const +{ + SysAssert(__pSceneImpl != null); + return __pSceneImpl->Equals(rhs); +} + +int +Scene::GetHashCode(void) const +{ + SysAssert(__pSceneImpl != null); + return __pSceneImpl->GetHashCode(); +} + +SceneId +Scene::GetSceneId(void) const +{ + SysAssert(__pSceneImpl != null); + return __pSceneImpl->GetSceneId(); +} + +String +Scene::GetFormId(void) const +{ + SysAssert(__pSceneImpl != null); + return __pSceneImpl->GetFormId(); +} + +String +Scene::GetPanelId(void) const +{ + SysAssert(__pSceneImpl != null); + return __pSceneImpl->GetPanelId(); +} + +Form* +Scene::GetForm(void) const +{ + SysAssert(__pSceneImpl != null); + return __pSceneImpl->GetForm(); +} + +Panel* +Scene::GetPanel(void) const +{ + SysAssert(__pSceneImpl != null); + return __pSceneImpl->GetPanel(); +} + +} } } // Tizen::Ui::Scenes diff --git a/src/ui/scenes/FUiScenesSceneManager.cpp b/src/ui/scenes/FUiScenesSceneManager.cpp new file mode 100644 index 0000000..3accb2d --- /dev/null +++ b/src/ui/scenes/FUiScenesSceneManager.cpp @@ -0,0 +1,285 @@ +// +// 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 FUiScenesSceneManager.cpp + * @brief This is the implementation file of the SceneManager class. + * + */ + +#include +#include +#include +#include +#include +#include "FUiScenes_SceneImpl.h" +#include "FUiScenes_SceneManagerImpl.h" + + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::App; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Ui::Animations; + + +namespace Tizen { namespace Ui { namespace Scenes +{ + +SceneManager* SceneManager::__pSceneManagerInstance = null; + +SceneManager::SceneManager(void) + : __pSceneManagerImpl(null) +{ + +} + +SceneManager::~SceneManager(void) +{ + delete __pSceneManagerImpl; +} + +SceneManager* +SceneManager::GetInstance(void) +{ + static pthread_once_t onceBlock = PTHREAD_ONCE_INIT; + + if (!__pSceneManagerInstance) + { + ClearLastResult(); + pthread_once(&onceBlock, InitSingleton); + result r = GetLastResult(); + if (IsFailed(r)) + { + onceBlock = PTHREAD_ONCE_INIT; + } + } + + return __pSceneManagerInstance; +} + +result +SceneManager::Construct(void) +{ + result r = E_SUCCESS; + + __pSceneManagerImpl = new (std::nothrow) _SceneManagerImpl; + 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)); + return r; +} + +result +SceneManager::RegisterFormFactory(const IFormFactory& formFactory) +{ + SysAssertf(__pSceneManagerImpl != null, "Not yet constructed! Construct() should be called before use"); + __pSceneManagerImpl->RegisterFormFactory(formFactory); + return E_SUCCESS; + +} + +result +SceneManager::RegisterPanelFactory(const IPanelFactory& panelFactory) +{ + SysAssertf(__pSceneManagerImpl != null, "Not yet constructed! Construct() should be called before use"); + __pSceneManagerImpl->RegisterPanelFactory(panelFactory); + return E_SUCCESS; +} + +result +SceneManager::RegisterScene(const SceneId& sceneId, const String& formId, const String& panelId) +{ + SysAssertf(__pSceneManagerImpl != null, "Not yet constructed! Construct() should be called before use"); + return __pSceneManagerImpl->RegisterScene(sceneId, formId, panelId); +} + +result +SceneManager::RegisterScene(const String& resourceId) +{ + SysAssertf(__pSceneManagerImpl != null, "Not yet constructed! Construct() should be called before use"); + return __pSceneManagerImpl->RegisterScene(resourceId); +} + +result +SceneManager::UnregisterScene(const SceneId& sceneId) +{ + SysAssertf(__pSceneManagerImpl != null, "Not yet constructed! Construct() should be called before use"); + return __pSceneManagerImpl->UnregisterScene(sceneId); +} + +result +SceneManager::AddSceneManagerEventListener(ISceneManagerEventListener& sceneManagerEventListener) +{ + SysAssertf(__pSceneManagerImpl != null, "Not yet constructed! Construct() should be called before use"); + return __pSceneManagerImpl->AddSceneManagerEventListener(sceneManagerEventListener); +} + +result +SceneManager::RemoveSceneManagerEventListener(ISceneManagerEventListener& sceneManagerEventListener) +{ + SysAssertf(__pSceneManagerImpl != null, "Not yet constructed! Construct() should be called before use"); + return __pSceneManagerImpl->RemoveSceneManagerEventListener(sceneManagerEventListener); +} + +result +SceneManager::AddSceneEventListener(const SceneId& sceneId, ISceneEventListener& sceneEventListener) +{ + SysAssertf(__pSceneManagerImpl != null, "Not yet constructed! Construct() should be called before use"); + return __pSceneManagerImpl->AddSceneEventListener(sceneId, sceneEventListener); +} + +result +SceneManager::RemoveSceneEventListener(const SceneId& sceneId, ISceneEventListener& sceneEventListener) +{ + SysAssertf(__pSceneManagerImpl != null, "Not yet constructed! Construct() should be called before use"); + return __pSceneManagerImpl->RemoveSceneEventListener(sceneId, sceneEventListener); +} + +result +SceneManager::SetSceneAnimationProvider(const SceneId& sceneId, ISceneAnimationProvider* pSceneAnimationProvider) +{ + SysAssertf(__pSceneManagerImpl != null, "Not yet constructed! Construct() should be called before use"); + return __pSceneManagerImpl->SetSceneAnimationProvider(sceneId, pSceneAnimationProvider); +} + +result +SceneManager::SetSceneTransitionPolicyProvider(ISceneTransitionPolicyProvider* pSceneTransitionPolicyProvider) +{ + SysAssertf(__pSceneManagerImpl != null, "Not yet constructed! Construct() should be called before use"); + return __pSceneManagerImpl->SetSceneTransitionPolicyProvider(pSceneTransitionPolicyProvider); +} + +result +SceneManager::SetFormTransitionAnimationDefaultValues(SceneTransitionAnimationType animationType, long duration, + AnimationInterpolatorType interpolatorType) +{ + SysAssertf(__pSceneManagerImpl != null, "Not yet constructed! Construct() should be called before use"); + return __pSceneManagerImpl->SetFormTransitionAnimationDefaultValues(animationType, duration, interpolatorType); +} + +result +SceneManager::GoForward(const ForwardSceneTransition& sceneTransition, const Tizen::Base::Collection::IList* pArgs) +{ + SysAssertf(__pSceneManagerImpl != null, "Not yet constructed! Construct() should be called before use"); + return __pSceneManagerImpl->GoForward(sceneTransition, pArgs); +} + +result +SceneManager::GoForward(const SceneTransitionId& transitionId, const Tizen::Base::Collection::IList* pArgs) +{ + SysAssertf(__pSceneManagerImpl != null, "Not yet constructed! Construct() should be called before use"); + return __pSceneManagerImpl->GoForward(transitionId, pArgs); +} + +result +SceneManager::GoBackward(const BackwardSceneTransition& sceneTransition, const Tizen::Base::Collection::IList* pArgs) +{ + SysAssertf(__pSceneManagerImpl != null, "Not yet constructed! Construct() should be called before use"); + return __pSceneManagerImpl->GoBackward(sceneTransition, pArgs); +} + +result +SceneManager::GoBackward(const SceneTransitionId& transitionId, const Tizen::Base::Collection::IList* pArgs) +{ + SysAssertf(__pSceneManagerImpl != null, "Not yet constructed! Construct() should be called before use"); + return __pSceneManagerImpl->GoBackward(transitionId, pArgs); +} + +Scene* +SceneManager::GetCurrentScene(void) const +{ + SysAssertf(__pSceneManagerImpl != null, "Not yet constructed! Construct() should be called before use"); + return __pSceneManagerImpl->GetCurrentScene(); +} + +SceneId +SceneManager::GetCurrentSceneId(void) const +{ + SysAssertf(__pSceneManagerImpl != null, "Not yet constructed! Construct() should be called before use"); + return __pSceneManagerImpl->GetCurrentSceneId(); +} + +bool +SceneManager::IsSceneAlive(const SceneId& sceneId) const +{ + SysAssertf(__pSceneManagerImpl != null, "Not yet constructed! Construct() should be called before use"); + return __pSceneManagerImpl->IsSceneAlive(sceneId); +} + +result +SceneManager::DestroyScene(const SceneId& sceneId) +{ + SysAssertf(__pSceneManagerImpl != null, "Not yet constructed! Construct() should be called before use"); + return __pSceneManagerImpl->DestroyScene(sceneId); +} + +result +SceneManager::BringCurrentSceneToTop(void) +{ + SysAssertf(__pSceneManagerImpl != null, "Not yet constructed! Construct() should be called before use"); + return __pSceneManagerImpl->BringCurrentSceneToTop(); +} + +result +SceneManager::ClearSceneHistory(void) +{ + SysAssertf(__pSceneManagerImpl != null, "Not yet constructed! Construct() should be called before use"); + return __pSceneManagerImpl->ClearSceneHistory(); +} + +result +SceneManager::AddToSceneHistory(const SceneId& sceneId) +{ + SysAssertf(__pSceneManagerImpl != null, "Not yet constructed! Construct() should be called before use"); + return __pSceneManagerImpl->AddToSceneHistory(sceneId); +} + +IListT* +SceneManager::GetSceneHistoryN(void) const +{ + ClearLastResult(); + SysAssertf(__pSceneManagerImpl != null, "Not yet constructed! Construct() should be called before use"); + return __pSceneManagerImpl->GetSceneHistoryN(); +} + +void +SceneManager::InitSingleton(void) +{ + SceneManager* pInst = new (std::nothrow) SceneManager(); + SysTryReturnVoidResult(NID_UI_SCENES, pInst, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", + GetErrorMessage(E_OUT_OF_MEMORY)); + + result r = pInst->Construct(); + SysTryCatch(NID_UI_SCENES, !IsFailed(r), , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pSceneManagerInstance = pInst; + std::atexit(DestroySingleton); + return; + +CATCH: + delete pInst; +} + +void +SceneManager::DestroySingleton(void) +{ + delete __pSceneManagerInstance; +} + + +} } } // Tizen::Ui::Scenes diff --git a/src/ui/scenes/FUiScenesSceneTransition.cpp b/src/ui/scenes/FUiScenesSceneTransition.cpp new file mode 100644 index 0000000..72ca741 --- /dev/null +++ b/src/ui/scenes/FUiScenesSceneTransition.cpp @@ -0,0 +1,162 @@ +// +// 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 FUiScenesSceneTransition.cpp + * @brief This is the implementation file of the %SceneTransition class. + * + */ + +#include +#include +#include "FUiScenes_SceneTransitionImpl.h" + + +using namespace Tizen::Base; + + +namespace Tizen { namespace Ui { namespace Scenes +{ + +SceneTransition::SceneTransition(void) + : __pSceneTransitionImpl(null) +{ + __pSceneTransitionImpl = new (std::nothrow) _SceneTransitionImpl(); + SysTryReturnVoidResult(NID_UI_SCENES, __pSceneTransitionImpl != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", + GetErrorMessage(E_OUT_OF_MEMORY)); +} + +SceneTransition::SceneTransition(const SceneTransition& rhs) + : __pSceneTransitionImpl(null) +{ + if (this != &rhs) + { + __pSceneTransitionImpl = new (std::nothrow) _SceneTransitionImpl(*_SceneTransitionImpl::GetInstance(rhs)); + SysTryReturnVoidResult(NID_UI_SCENES, __pSceneTransitionImpl != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", + GetErrorMessage(E_OUT_OF_MEMORY)); + } +} + +SceneTransition::SceneTransition(SceneTransitionDirection direction, const SceneId& destinationSceneId, + SceneTransitionAnimationType animationType, + SceneHistoryOption historyOption, SceneDestroyOption destroyOption) + : __pSceneTransitionImpl(null) +{ + __pSceneTransitionImpl = new (std::nothrow) _SceneTransitionImpl(direction, destinationSceneId, animationType, + historyOption, destroyOption); + SysTryReturnVoidResult(NID_UI_SCENES, __pSceneTransitionImpl != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", + GetErrorMessage(E_OUT_OF_MEMORY)); +} + +SceneTransition& +SceneTransition::operator =(const SceneTransition& rhs) +{ + if (this != &rhs) + { + __pSceneTransitionImpl->operator=(*_SceneTransitionImpl::GetInstance(rhs)); + } + return *this; +} + +bool +SceneTransition::Equals(const Object& rhs) const +{ + const SceneTransition* pSceneTransition = dynamic_cast(&rhs); + if (pSceneTransition != null) + { + return __pSceneTransitionImpl->Equals(*_SceneTransitionImpl::GetInstance(*pSceneTransition)); + } + return false; +} + +int +SceneTransition::GetHashCode(void) const +{ + return __pSceneTransitionImpl->GetHashCode(); +} + +SceneTransition::~SceneTransition(void) +{ + delete __pSceneTransitionImpl; +} + +result +SceneTransition::SetDirection(SceneTransitionDirection direction) +{ + ClearLastResult(); + return __pSceneTransitionImpl->SetDirection(direction); +} + +SceneTransitionDirection +SceneTransition::GetDirection(void) const +{ + return __pSceneTransitionImpl->GetDirection(); +} + +result +SceneTransition::SetDestinationSceneId(const SceneId& sceneId) +{ + ClearLastResult(); + return __pSceneTransitionImpl->SetDestinationSceneId(sceneId); +} + +SceneId +SceneTransition::GetDestinationSceneId(void) const +{ + return __pSceneTransitionImpl->GetDestinationSceneId(); +} + +result +SceneTransition::SetAnimationType(SceneTransitionAnimationType animationType) +{ + ClearLastResult(); + return __pSceneTransitionImpl->SetAnimationType(animationType); +} + +SceneTransitionAnimationType +SceneTransition::GetAnimationType(void) const +{ + return __pSceneTransitionImpl->GetAnimationType(); +} + +result +SceneTransition::SetHistoryOption(SceneHistoryOption historyOption) +{ + ClearLastResult(); + return __pSceneTransitionImpl->SetHistoryOption(historyOption); +} + +SceneHistoryOption +SceneTransition::GetHistoryOption(void) const +{ + return __pSceneTransitionImpl->GetHistoryOption(); +} + +result +SceneTransition::SetDestroyOption(SceneDestroyOption destroyOption) +{ + ClearLastResult(); + return __pSceneTransitionImpl->SetDestroyOption(destroyOption); +} + +SceneDestroyOption +SceneTransition::GetDestroyOption(void) const +{ + return __pSceneTransitionImpl->GetDestroyOption(); +} + +} } } // Tizen::Ui::Scenes diff --git a/src/ui/scenes/FUiScenes_ISceneControlEventListener.h b/src/ui/scenes/FUiScenes_ISceneControlEventListener.h new file mode 100644 index 0000000..233fad8 --- /dev/null +++ b/src/ui/scenes/FUiScenes_ISceneControlEventListener.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 FUiScenes_ISceneControlEventListener.h + * @brief This is the header file of the _ISceneControlEventListener class. + * + * This header file contains the declarations of the _ISceneControlEventListener class. + */ + +#ifndef _FUI_SCENES_INTERNAL_ISCENE_CONTROL_EVENT_LISTENER_H_ +#define _FUI_SCENES_INTERNAL_ISCENE_CONTROL_EVENT_LISTENER_H_ + +#include +#include +#include "FUiScenes_SceneControlEventArg.h" + + +namespace Tizen { namespace Ui { namespace Scenes +{ + +class _ISceneControlEventListener + : virtual public Tizen::Base::Runtime::IEventListener +{ +public: + virtual ~_ISceneControlEventListener(void) {} + + virtual void OnSceneControlEventReceived(_SceneControlEventArg::SceneControlEventType eventType, const SceneId& sceneId) = 0; + +}; // _ISceneControlEventListener +} } } // Tizen::Ui::Scenes + +#endif // _FUI_SCENES_INTERNAL_ISCENE_CONTROL_EVENT_LISTENER_H_ diff --git a/src/ui/scenes/FUiScenes_SceneControlEvent.cpp b/src/ui/scenes/FUiScenes_SceneControlEvent.cpp new file mode 100644 index 0000000..9aca77e --- /dev/null +++ b/src/ui/scenes/FUiScenes_SceneControlEvent.cpp @@ -0,0 +1,47 @@ +// +// 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. +// + +#include +#include "FUiScenes_ISceneControlEventListener.h" +#include "FUiScenes_SceneControlEvent.h" + +namespace Tizen { namespace Ui { namespace Scenes +{ + +result +_SceneControlEvent::Construct(void) +{ + return _Event::Initialize(); +} + +void +_SceneControlEvent::FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg) +{ + _ISceneControlEventListener* pListener = dynamic_cast<_ISceneControlEventListener*>(&listener); + if (pListener) + { + const _SceneControlEventArg* pEventArg = dynamic_cast(&arg); + if (pEventArg) + { + pListener->OnSceneControlEventReceived(pEventArg->GetEventType(), pEventArg->GetSceneId()); + return; + } + } + SysLog(NID_UI_SCENES, "Invalid _SceneControlEvent arguments : listener(0x%x), arg(0x%x)", pListener, &arg); +} + +} } } // Tizen::Ui::Scenes diff --git a/src/ui/scenes/FUiScenes_SceneControlEvent.h b/src/ui/scenes/FUiScenes_SceneControlEvent.h new file mode 100644 index 0000000..fc5d1ba --- /dev/null +++ b/src/ui/scenes/FUiScenes_SceneControlEvent.h @@ -0,0 +1,45 @@ +// +// 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 FUiScenes_SceneControlEvent.h + * @brief This is the header file of the _SceneControlEvent class. + * + * This header file contains the declarations of the _SceneControlEvent class. + */ + +#ifndef _FUI_SCENES_INTERNAL_SCENE_CONTROL_EVENT_H_ +#define _FUI_SCENES_INTERNAL_SCENE_CONTROL_EVENT_H_ + +#include + + +namespace Tizen { namespace Ui { namespace Scenes +{ + +class _SceneControlEvent + : public Tizen::Base::Runtime::_Event +{ +public: + result Construct(void); + +protected: + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg); + +}; // _SceneControlEvent +} } } // Tizen::Ui::Scenes + +#endif // _FUI_SCENES_INTERNAL_SCENE_CONTROL_EVENT_H_ diff --git a/src/ui/scenes/FUiScenes_SceneControlEventArg.cpp b/src/ui/scenes/FUiScenes_SceneControlEventArg.cpp new file mode 100644 index 0000000..9997246 --- /dev/null +++ b/src/ui/scenes/FUiScenes_SceneControlEventArg.cpp @@ -0,0 +1,48 @@ +// +// 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. +// + +#include "FUiScenes_SceneControlEventArg.h" + + +namespace Tizen { namespace Ui { namespace Scenes +{ + +_SceneControlEventArg::_SceneControlEventArg(_SceneControlEventArg::SceneControlEventType eventType, const SceneId& sceneId) + : __eventType(eventType) + , __sceneId(sceneId) +{ + +} + +_SceneControlEventArg::~_SceneControlEventArg(void) +{ + +} + +_SceneControlEventArg::SceneControlEventType +_SceneControlEventArg::GetEventType(void) const +{ + return __eventType; +} + +SceneId +_SceneControlEventArg::GetSceneId(void) const +{ + return __sceneId; +} + +} } } // Tizen::Ui::Scenes diff --git a/src/ui/scenes/FUiScenes_SceneControlEventArg.h b/src/ui/scenes/FUiScenes_SceneControlEventArg.h new file mode 100644 index 0000000..d1f406c --- /dev/null +++ b/src/ui/scenes/FUiScenes_SceneControlEventArg.h @@ -0,0 +1,63 @@ +// +// 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 FUiScenes_SceneControlEventArg.h + * @brief This is the header file of the _SceneControlEventArg class. + * + * This header file contains the declarations of the _ class. + */ + +#ifndef _FUI_SCENES_INTERNAL_SCENE_CONTROL_EVENT_ARG_H_ +#define _FUI_SCENES_INTERNAL_SCENE_CONTROL_EVENT_ARG_H_ + +#include +#include +#include + + +namespace Tizen { namespace Ui { namespace Scenes +{ + +class _SceneControlEventArg + : public Tizen::Base::Object + , public Tizen::Base::Runtime::IEventArg +{ +public: + enum SceneControlEventType + { + SCENE_CONTROL_EVENT_TYPE_NONE, + SCENE_CONTROL_EVENT_TYPE_DESTROY, // Destroy the specified Scene + }; + + _SceneControlEventArg(_SceneControlEventArg::SceneControlEventType eventType, const SceneId& sceneId); + virtual ~_SceneControlEventArg(void); + + _SceneControlEventArg::SceneControlEventType GetEventType(void) const; + SceneId GetSceneId(void) const; + +private: + _SceneControlEventArg(void); + _SceneControlEventArg(const _SceneControlEventArg& value); + _SceneControlEventArg& operator =(const _SceneControlEventArg& rhs); + + _SceneControlEventArg::SceneControlEventType __eventType; + SceneId __sceneId; + +}; // _SceneControlEventArg +} } } // Tizen::Ui::Scenes + +#endif // _FUI_SCENES_INTERNAL_SCENE_CONTROL_EVENT_ARG_H_ diff --git a/src/ui/scenes/FUiScenes_SceneImpl.cpp b/src/ui/scenes/FUiScenes_SceneImpl.cpp new file mode 100644 index 0000000..0724b54 --- /dev/null +++ b/src/ui/scenes/FUiScenes_SceneImpl.cpp @@ -0,0 +1,261 @@ +// +// 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. +// + +#include +#include +#include +#include "FUiScenes_SceneImpl.h" + + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Ui::Controls; + + +namespace Tizen { namespace Ui { namespace Scenes +{ + + +_SceneImpl::_SceneImpl(void) + : __pForm(null) + , __pPanel(null) + , __pArgs(null) + , __pSceneAnimationProvider(null) + , __panelCreatedFromFormResource(false) +{ + +} + +_SceneImpl::~_SceneImpl(void) +{ +} + +bool +_SceneImpl::Equals(const Object& rhs) const +{ + const Scene* pScene = dynamic_cast(&rhs); + if (pScene == null) + { + return false; + } + + const _SceneImpl* pSceneImpl = _SceneImpl::GetInstance(*pScene); + if (pSceneImpl == this) + { + return true; + } + + if (__sceneId == pSceneImpl->GetSceneId()) + { + return true; + } + + return false; +} + +int +_SceneImpl::GetHashCode(void) const +{ + return __sceneId.GetHashCode(); +} + +SceneId +_SceneImpl::GetSceneId(void) const +{ + return __sceneId; +} + +String +_SceneImpl::GetFormId(void) const +{ + return __formId; +} + +String +_SceneImpl::GetPanelId(void) const +{ + return __panelId; +} + +Form* +_SceneImpl::GetForm(void) const +{ + return __pForm; +} + +void +_SceneImpl::SetForm(Form* pForm) +{ + __pForm = pForm; +} + +Panel* +_SceneImpl::GetPanel(void) const +{ + return __pPanel; +} + +void +_SceneImpl::SetPanel(Panel* pPanel) +{ + __pPanel = pPanel; +} + +void +_SceneImpl::SetArgs(IList* pArgs) +{ + __pArgs = pArgs; +} + +IList* +_SceneImpl::GetArgs(void) +{ + return __pArgs; +} + +result +_SceneImpl::AddSceneEventListener(const ISceneEventListener& sceneEventlistener) +{ + result r = E_SUCCESS; + ISceneEventListener* pListener = const_cast (&sceneEventlistener); + bool alreadyExist = __sceneEventListenerList.Contains(pListener); + SysTryReturnResult(NID_UI_SCENES, !alreadyExist, E_OBJ_ALREADY_EXIST, "The event listener already exist."); + r = __sceneEventListenerList.Add(pListener); + SysTryReturn(NID_UI_SCENES, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r)); + return r; +} + +result +_SceneImpl::RemoveSceneEventListener(const ISceneEventListener& sceneEventlistener) +{ + result r = E_SUCCESS; + ISceneEventListener* pListener = const_cast (&sceneEventlistener); + r = __sceneEventListenerList.Remove(pListener); + SysTryReturn(NID_UI_SCENES, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r)); + return r; +} + +result +_SceneImpl::SetSceneAnimationProvider(ISceneAnimationProvider* pSceneAnimationProvider) +{ + ISceneAnimationProvider* pListener = pSceneAnimationProvider; + __pSceneAnimationProvider = pListener; + return E_SUCCESS; +} + +bool +_SceneImpl::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId, IList* pArgs) +{ + IEnumeratorT* pEnum = __sceneEventListenerList.GetEnumeratorN(); + if (!pEnum) + { + return false; + } + + while (pEnum->MoveNext() == E_SUCCESS) + { + ISceneEventListener* pListener = null; + pEnum->GetCurrent(pListener); + if (pListener) + { + pListener->OnSceneActivatedN(previousSceneId, currentSceneId, pArgs); + } + } + delete pEnum; + return true; +} + +bool +_SceneImpl::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId) +{ + IEnumeratorT* pEnum = __sceneEventListenerList.GetEnumeratorN(); + if (!pEnum) + { + return false; + } + + while (pEnum->MoveNext() == E_SUCCESS) + { + ISceneEventListener* pListener = null; + pEnum->GetCurrent(pListener); + if (pListener) + { + pListener->OnSceneDeactivated(currentSceneId, nextSceneId); + } + } + delete pEnum; + return true; +} + +bool +_SceneImpl::PrepareAnimation(const SceneId& sceneId, IList* pArgs, SceneTransitionAnimationType type, bool formTransition) +{ + if (__pSceneAnimationProvider) + { + __pSceneAnimationProvider->PrepareAnimation(sceneId, pArgs, type, formTransition); + return true; + } + + return false; +} + +bool +_SceneImpl::IsPanelCreatedFromFormResource(void) const +{ + return __panelCreatedFromFormResource; +} + +void +_SceneImpl::SetPanelCreatedFromFormResource(bool createFromFormResource) +{ + __panelCreatedFromFormResource = createFromFormResource; +} + +Scene* +_SceneImpl::CreateSceneN(const SceneId& sceneId, const String& formId, const String& panelId) +{ + Scene* pScene = new (std::nothrow) Scene(); + SysTryReturn(NID_UI_SCENES, pScene != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", + GetErrorMessage(E_OUT_OF_MEMORY)); + + _SceneImpl* pSceneImpl = _SceneImpl::GetInstance(*pScene); + SysTryCatch(NID_UI_SCENES, pSceneImpl != null, , E_INVALID_STATE, + "[%s] Scene is in an invalid state. pSceneImpl is not valid", GetErrorMessage(E_INVALID_STATE)); + pSceneImpl->__sceneId = sceneId; + pSceneImpl->__formId = formId; + pSceneImpl->__panelId = panelId; + + return pScene; + +CATCH: + delete pScene; + return null; +} + +_SceneImpl* +_SceneImpl::GetInstance(Scene& scene) +{ + return scene.__pSceneImpl; +} + +const _SceneImpl* +_SceneImpl::GetInstance(const Scene& scene) +{ + return scene.__pSceneImpl; +} + +} } } // Tizen::Ui::Scenes diff --git a/src/ui/scenes/FUiScenes_SceneImpl.h b/src/ui/scenes/FUiScenes_SceneImpl.h new file mode 100644 index 0000000..84b91ef --- /dev/null +++ b/src/ui/scenes/FUiScenes_SceneImpl.h @@ -0,0 +1,115 @@ +// +// 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 FUiScenes_SceneImpl.h + * @brief This is the header file of the _SceneImpl class. + * + * This header file contains the declarations of the _SceneImpl class. + */ + +#ifndef _FUI_SCENES_INTERNAL_SCENE_IMPL_H_ +#define _FUI_SCENES_INTERNAL_SCENE_IMPL_H_ + +#include +#include +#include +#include +#include + + +namespace Tizen { namespace Ui { namespace Scenes +{ + +class ISceneAnimationProvider; + +class _SceneImpl + : public Tizen::Base::Object +{ +public: + _SceneImpl(void); + virtual ~_SceneImpl(void); + virtual bool Equals(const Object& rhs) const; + virtual int GetHashCode(void) const; + + SceneId GetSceneId(void) const; + Tizen::Base::String GetFormId(void) const; + Tizen::Base::String GetPanelId(void) const; + Tizen::Ui::Controls::Form* GetForm(void) const; + void SetForm(Tizen::Ui::Controls::Form* pForm); + Tizen::Ui::Controls::Panel* GetPanel(void) const; + void SetPanel(Tizen::Ui::Controls::Panel* pPanel); + Tizen::Base::Collection::IList* GetArgs(void); + void SetArgs(Tizen::Base::Collection::IList* pArgs = null); + + result AddSceneEventListener(const ISceneEventListener& sceneEventlistener); + result RemoveSceneEventListener(const ISceneEventListener& sceneEventlistener); + result SetSceneAnimationProvider(ISceneAnimationProvider* pSceneAnimationProvider); + + bool OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId, + Tizen::Base::Collection::IList* pArgs); + bool OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId); + bool PrepareAnimation(const SceneId& sceneId, Tizen::Base::Collection::IList* pArgs, + SceneTransitionAnimationType type, bool formTransition); + + bool IsPanelCreatedFromFormResource(void) const; + void SetPanelCreatedFromFormResource(bool createFromFormResource); + + // + // Create a new Scene instance + // + // @return The Scene instance + // @since 2.0 + // + static Tizen::Ui::Scenes::Scene* CreateSceneN(const SceneId& sceneId, const Tizen::Base::String& formId, + const Tizen::Base::String& panelId); + + // + // Gets the implementation. + // + // @return The implementation + // @param[in] The interface instance pointer + // @since 2.0 + // + static _SceneImpl* GetInstance(Scene& scene); + + // + // Gets the implementation. + // + // @return The implementation + // @param[in] The interface instance pointer + // @since 2.0 + // + static const _SceneImpl* GetInstance(const Scene& scene); + +private: + _SceneImpl(const Scene& rhs); + _SceneImpl& operator =(const Scene& rhs); + +private: + SceneId __sceneId; + Tizen::Base::String __formId; + Tizen::Base::String __panelId; + Tizen::Ui::Controls::Form* __pForm; + Tizen::Ui::Controls::Panel* __pPanel; + Tizen::Base::Collection::IList* __pArgs; + Tizen::Base::Collection::LinkedListT __sceneEventListenerList; + ISceneAnimationProvider* __pSceneAnimationProvider; + bool __panelCreatedFromFormResource; +}; // _SceneImpl +} } } // Tizen::Ui::Scenes + +#endif // _FUI_SCENES_INTERNAL_SCENE_IMPL_H_ diff --git a/src/ui/scenes/FUiScenes_SceneManagerImpl.cpp b/src/ui/scenes/FUiScenes_SceneManagerImpl.cpp new file mode 100644 index 0000000..ba749d9 --- /dev/null +++ b/src/ui/scenes/FUiScenes_SceneManagerImpl.cpp @@ -0,0 +1,2110 @@ +// +// 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. +// + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "FUiScenes_SceneImpl.h" +#include "FUiScenes_SceneManagerImpl.h" +#include "FUiScenes_SceneTransitionImpl.h" +#include "FUiAnim_FrameAnimatorImpl.h" +#include "FUi_Control.h" +#include "FUi_ControlManager.h" +#include "FUi_ContainerImpl.h" +#include "FUiCtrl_FrameImpl.h" + + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Base::Collection; +using namespace Tizen::App; +using namespace Tizen::Io; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Ui::Animations; +using namespace Tizen::Graphics; + + +namespace Tizen { namespace Ui { namespace Scenes +{ + +// HashMapT assist template +template +class _StringHashCodeProvider + : public IHashCodeProviderT +{ +public: + virtual int + GetHashCode(const T& obj) const + { + String& objString = static_cast (const_cast (obj)); + return objString.GetHashCode(); + } +}; +template +class _StringComparer + : public IComparerT +{ +public: + virtual result + Compare(const T& obj1, const T& obj2, int& cmp) const + { + String& objString1 = static_cast (const_cast (obj1)); + String& objString2 = static_cast (const_cast (obj2)); + cmp = objString1.CompareTo(objString2); + return E_SUCCESS; + } +}; + + +_SceneManagerImpl::_SceneDescription::_SceneDescription(const String& descriptionFormId, const String& descriptionPanelId) + : formId(descriptionFormId) + , panelId(descriptionPanelId) +{ + +} + +_SceneManagerImpl::_SceneManagerImpl(void) + : __currentSceneId(L"") + , __pCurrentScene(null) + , __pFormFactory(null) + , __pPanelFactory(null) + , __pPolicyProvider(null) + , __destroyReservedScene(L"") + , __pCorrespondFrame(null) + , __correspondFrameControlHandle() + , __sceneTransitionProgressing(false) + , __pDisabledForm(null) + , __destroyPendingScene(L"") +{ + for (int i = 0; i < FRAME_ANIMATOR_FORM_TRANSITION_ANIMATION_MAX; i++) + { + static const long ANIMATION_DURATION = 250L; + __animationDescriptions[i].animationType = FrameAnimatorFormTransitionAnimation(i); + __animationDescriptions[i].duration = ANIMATION_DURATION; + __animationDescriptions[i].interpolatorType = ANIMATION_INTERPOLATOR_LINEAR; + } + __sceneTransitionMutex.Create(); +} + +_SceneManagerImpl::~_SceneManagerImpl(void) +{ + bool memoryError = false; + + std::unique_ptr > pMapEnum(__sceneMap.GetMapEnumeratorN()); + if (pMapEnum) + { + while (pMapEnum->MoveNext() == E_SUCCESS) + { + _SceneDescription* pValue = null; + pMapEnum->GetValue(pValue); + delete pValue; + } + } + else + { + memoryError = true; + } + + std::unique_ptr > pTransitionMapEnum(__transitionMap.GetMapEnumeratorN()); + if (pTransitionMapEnum) + { + while (pTransitionMapEnum->MoveNext() == E_SUCCESS) + { + SceneTransition* pValue = null; + pTransitionMapEnum->GetValue(pValue); + delete pValue; + } + } + else + { + memoryError = true; + } + + std::unique_ptr > pSceneContainerEnum(__sceneContainer.GetMapEnumeratorN()); + if (pSceneContainerEnum) + { + while (pSceneContainerEnum->MoveNext() == E_SUCCESS) + { + Scene* pValue = null; + pSceneContainerEnum->GetValue(pValue); + delete pValue; + } + } + else + { + memoryError = true; + } + + if (memoryError) + { + SysLogException(NID_UI_SCENES, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + } +} + +result +_SceneManagerImpl::Construct(void) +{ + result r = E_SUCCESS; + static _StringHashCodeProvider sceneHashCodeProvider; + static _StringComparer strComparer; + + r = __sceneContainer.Construct(0, 0, sceneHashCodeProvider, strComparer); + SysTryReturn(NID_UI_SCENES, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r)); + r = __formContainer.Construct(0, 0, sceneHashCodeProvider, strComparer); + SysTryReturn(NID_UI_SCENES, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r)); + r = __formToPanelMultiMap.Construct(0, 0, sceneHashCodeProvider, strComparer); + SysTryReturn(NID_UI_SCENES, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r)); + r = __sceneMap.Construct(0, 0, sceneHashCodeProvider, strComparer); + SysTryReturn(NID_UI_SCENES, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r)); + r = __transitionMap.Construct(0, 0, sceneHashCodeProvider, strComparer); + SysTryReturn(NID_UI_SCENES, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r)); + r = __formIdMap.Construct(0, 0, sceneHashCodeProvider, strComparer); + SysTryReturn(NID_UI_SCENES, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __sceneControlEvent.Construct(); + SysTryReturn(NID_UI_SCENES, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r)); + r = __sceneControlEvent.AddListener(dynamic_cast<_ISceneControlEventListener&>(*this)); + SysTryReturn(NID_UI_SCENES, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + UiApp* pUiApp = UiApp::GetInstance(); + if (pUiApp) + { + Frame* pFrame = pUiApp->GetFrameAt(0); + if (pFrame) + { + __pCorrespondFrame = pFrame; + _ContainerImpl* pFrameWindowImpl = _ContainerImpl::GetInstance(*__pCorrespondFrame); + if (pFrameWindowImpl) + { + __correspondFrameControlHandle = pFrameWindowImpl->GetCore().GetHandle(); + } + else + { + SysLog(NID_UI_SCENES, "WARNING! - Invalid Frame window. [_ContainerImpl::GetInstance failed]"); + } + } + else + { + SysLog(NID_UI_SCENES, "WARNING! - Please add a Frame window before use the SceneManager. [pUiApp->GetFrameAt(0) return null]"); + } + } + else + { + SysLog(NID_UI_SCENES, "WARNING! - Please check the application type. SceneManager is valid only Ui-Application. [UiApp::GetInstance failed]"); + } + + return E_SUCCESS; +} + +result +_SceneManagerImpl::RegisterFormFactory(const IFormFactory& formFactory) +{ + __pFormFactory = const_cast (&formFactory); + + return E_SUCCESS; +} + +result +_SceneManagerImpl::RegisterPanelFactory(const IPanelFactory& panelFactory) +{ + __pPanelFactory = const_cast (&panelFactory); + + return E_SUCCESS; +} + +result +_SceneManagerImpl::RegisterScene(const SceneId& sceneId, const String& formId, const String& panelId) +{ + result r = E_SUCCESS; + _SceneDescription* pSceneDescription = null; + bool isContains = false; + + SysTryReturnResult(NID_UI_SCENES, !(sceneId.IsEmpty() || formId.IsEmpty()), E_INVALID_ARG, + "Invalid argument is used. String length of sceneId=%d, formId=%d", + sceneId.GetLength(), formId.GetLength()); + + r = __sceneMap.ContainsKey(sceneId, isContains); + SysTryReturn(NID_UI_SCENES, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_SCENES, !isContains, E_OBJ_ALREADY_EXIST, "Specified sceneId already exist."); + + __formIdMap.ContainsKey(formId, isContains); + if (panelId.IsEmpty()) + { + SysTryReturnResult(NID_UI_SCENES, !isContains, E_INVALID_ARG, "Specified formId already exist. Only 'PanelScene' can share a formId for use as base form."); + } + + if (!isContains) + { + __formIdMap.Add(formId, 1); + } + else + { + int refCount = 0; + __formIdMap.GetValue(formId, refCount); + ++refCount; + __formIdMap.SetValue(formId, refCount); + } + + pSceneDescription = new (std::nothrow) _SceneDescription(formId, panelId); + SysTryReturnResult(NID_UI_SCENES, pSceneDescription != null, E_OUT_OF_MEMORY, "Memory allocation failed."); + + r = __sceneMap.Add(sceneId, pSceneDescription); + SysTryCatch(NID_UI_SCENES, !IsFailed(r), , r, "[%s] Propagating.", GetErrorMessage(r)); + return r; + +CATCH: + delete pSceneDescription; + return r; +} + +result +_SceneManagerImpl::RegisterScene(const String& resourceId) +{ + static const wchar_t RESOUCE_FILE_PATH[] = L"res/"; + static const wchar_t RESOUCE_FILE_EXT[] = L".xml"; + static const wchar_t RESOUCE_FILE_NORMAL[] = L"screen-size-normal/"; + static const xmlChar* pElementWorkflow = reinterpret_cast("Workflow"); + static const xmlChar* pElementScene = reinterpret_cast("Scene"); + static const xmlChar* pElementSceneTransition = reinterpret_cast("SceneTransition"); + result r = E_SUCCESS; + + _ControlManager* pControlManager = _ControlManager::GetInstance(); + SysTryReturnResult(NID_UI_SCENES, pControlManager != null, E_SYSTEM, + "A system error has been occurred. Unable to get the control manager."); + Dimension screenSize = pControlManager->GetScreenSize(); + + const String appRootPath = Tizen::App::App::GetInstance()->GetAppRootPath(); + String filePath; + // Formating path for current resolution: [AppRootPath/][res/][width]x[height]/[resourceId][.xml] + r = filePath.Format(FILENAME_MAX, L"%ls%ls%dx%d/%ls%ls", + appRootPath.GetPointer(), RESOUCE_FILE_PATH, screenSize.width, screenSize.height, + resourceId.GetPointer(), RESOUCE_FILE_EXT); + SysTryReturnResult(NID_UI_SCENES, !IsFailed(r), E_SYSTEM, "A system error has been occurred. File path formatting failed."); + SysLog(NID_UI_SCENES, "RegisterScene: res path: %ls", filePath.GetPointer()); + + if (!File::IsFileExist(filePath)) + { // File not exist on specific resolution then try again: [AppRootPath/][res/][screen-size-normal/][resourceId][.xml] + filePath.Format(FILENAME_MAX, L"%ls%ls%ls%ls%ls", + appRootPath.GetPointer(), RESOUCE_FILE_PATH, RESOUCE_FILE_NORMAL, + resourceId.GetPointer(), RESOUCE_FILE_EXT); + SysTryReturnResult(NID_UI_SCENES, !IsFailed(r), E_SYSTEM, "A system error has been occurred. File path formatting failed."); + SysLog(NID_UI_SCENES, "RegisterScene: 2nd try - res path: %ls", filePath.GetPointer()); + if (!pControlManager->IsCoordinateSystemLogical() || !File::IsFileExist(filePath)) + { + SysLogException(NID_UI_SCENES, E_FILE_NOT_FOUND, "[%s] File could not be found. File path=%ls", + GetErrorMessage(E_FILE_NOT_FOUND), filePath.GetPointer()); + return E_FILE_NOT_FOUND; + } + } + + std::unique_ptr pfilePathBuffer(Tizen::Base::Utility::StringUtil::StringToUtf8N(filePath)); + SysTryReturnResult(NID_UI_SCENES, pfilePathBuffer != null, E_OUT_OF_MEMORY, "Memory allocation failed."); + + xmlDocPtr docPtr = xmlParseFile(reinterpret_cast(pfilePathBuffer->GetPointer())); + SysTryReturnResult(NID_UI_SCENES, docPtr != null, E_SYSTEM, + "A system error has been occurred. Can not parse xml file: %ls", filePath.GetPointer()); + + xmlNodePtr rootNodePtr = xmlDocGetRootElement(docPtr); + SysTryCatch(NID_UI_SCENES, rootNodePtr != null, r = E_SYSTEM, E_SYSTEM, + "A system error has been occurred. Can not find root node."); + + // Visit xml nodes + for (xmlNodePtr nodePtr = rootNodePtr; nodePtr != null; nodePtr = nodePtr->next) // Visit sibling node + { // Get element 'Workflow' + if ((nodePtr->type == XML_ELEMENT_NODE) && (xmlStrcmp(nodePtr->name, pElementWorkflow) == 0)) + { // and Get child - 'Scene's and 'SceneTransition's + for (xmlNodePtr childNodePtr = nodePtr->children; childNodePtr != null; childNodePtr = childNodePtr->next) // Visit sibling + { // Get element 'Scene's and 'SceneTransition's + if (childNodePtr->type == XML_ELEMENT_NODE) + { // Check E_OBJ_ALREADY_EXIST(continue) and E_OUT_OF_MEMORY(break) for all case. + if (xmlStrcmp(childNodePtr->name, pElementScene) == 0) + { + result regResult = RegisterScene(childNodePtr); + if (IsFailed(regResult)) + { + SysTryCatch(NID_UI_SCENES, regResult != E_OUT_OF_MEMORY, r = regResult, regResult, + "[%s] Propagating.", GetErrorMessage(regResult)); + if (regResult == E_OBJ_ALREADY_EXIST) + { + r = regResult; + } + } + } + else + if (xmlStrcmp(childNodePtr->name, pElementSceneTransition) == 0) + { + result regResult = RegisterSceneTransition(childNodePtr); + if (IsFailed(regResult)) + { + SysTryCatch(NID_UI_SCENES, regResult != E_OUT_OF_MEMORY, r = regResult, regResult, + "[%s] Propagating.", GetErrorMessage(regResult)); + if (regResult == E_OBJ_ALREADY_EXIST) + { + r = regResult; + } + } + } + } // 'Scene' and 'SceneTransition' + } // Children of 'Workflow' + } // Element 'Workflow' + }// Root node sibling + + xmlFreeDoc(docPtr); + return r; + +CATCH: + xmlFreeDoc(docPtr); + return r; +} + +result +_SceneManagerImpl::UnregisterScene(const SceneId& sceneId) +{ + result r = E_SUCCESS; + _SceneDescription* pSceneDescription = null; + + SysTryReturnResult(NID_UI_SCENES, !sceneId.IsEmpty(), E_INVALID_ARG, "Invalid argument is used. sceneId is empty."); + + r = __sceneMap.GetValue(sceneId, pSceneDescription); + SysTryReturn(NID_UI_SCENES, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + // Remove FormId from __formIdMap + if (pSceneDescription) + { + bool isContains = false; + __formIdMap.ContainsKey(pSceneDescription->formId, isContains); + if (isContains) + { + int refCount = 0; + __formIdMap.GetValue(pSceneDescription->formId, refCount); + --refCount; + if (refCount <= 0) + { + __formIdMap.Remove(pSceneDescription->formId); + } + else + { + __formIdMap.SetValue(pSceneDescription->formId, refCount); + } + } + } + + r = __sceneMap.Remove(sceneId); + SysTryReturn(NID_UI_SCENES, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + delete pSceneDescription; + return r; +} + +result +_SceneManagerImpl::AddSceneManagerEventListener(ISceneManagerEventListener& sceneManagerEventListener) +{ + result r = E_SUCCESS; + ISceneManagerEventListener* pListener = &sceneManagerEventListener; + bool alreadyExist = __sceneManagerEventListenerList.Contains(pListener); + SysTryReturnResult(NID_UI_SCENES, !alreadyExist, E_OBJ_ALREADY_EXIST, "The event listener already exist."); + r = __sceneManagerEventListenerList.Add(pListener); + SysTryReturn(NID_UI_SCENES, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +_SceneManagerImpl::RemoveSceneManagerEventListener(ISceneManagerEventListener& sceneManagerEventListener) +{ + result r = E_SUCCESS; + ISceneManagerEventListener* pListener = &sceneManagerEventListener; + r = __sceneManagerEventListenerList.Remove(pListener); + SysTryReturn(NID_UI_SCENES, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +_SceneManagerImpl::AddSceneEventListener(const SceneId& sceneId, ISceneEventListener& sceneEventListener) +{ + result r = E_SUCCESS; + Scene* pScene = null; + _SceneImpl* pSceneImpl = null; + + pScene = GetSceneFromContainer(sceneId); + SysTryReturnResult(NID_UI_SCENES, pScene != null, E_INVALID_ARG, "Invalid argument is used. The sceneId is not valid."); + pSceneImpl = _SceneImpl::GetInstance(*pScene); + SysTryReturnResult(NID_UI_SCENES, pSceneImpl != null, E_INVALID_ARG, "Invalid argument is used. The sceneId is not valid."); + r = pSceneImpl->AddSceneEventListener(sceneEventListener); + SysTryReturn(NID_UI_SCENES, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +_SceneManagerImpl::RemoveSceneEventListener(const SceneId& sceneId, ISceneEventListener& sceneEventListener) +{ + result r = E_SUCCESS; + Scene* pScene = null; + _SceneImpl* pSceneImpl = null; + + pScene = GetSceneFromContainer(sceneId); + SysTryReturnResult(NID_UI_SCENES, pScene != null, E_INVALID_ARG, "Invalid argument is used. The sceneId is not valid."); + pSceneImpl = _SceneImpl::GetInstance(*pScene); + SysTryReturnResult(NID_UI_SCENES, pSceneImpl != null, E_INVALID_ARG, "Invalid argument is used. The sceneId is not valid."); + r = pSceneImpl->RemoveSceneEventListener(sceneEventListener); + SysTryReturn(NID_UI_SCENES, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +_SceneManagerImpl::SetSceneAnimationProvider(const SceneId& sceneId, ISceneAnimationProvider* pSceneAnimationProvider) +{ + result r = E_SUCCESS; + Scene* pScene = null; + _SceneImpl* pSceneImpl = null; + + pScene = GetSceneFromContainer(sceneId); + SysTryReturnResult(NID_UI_SCENES, pScene != null, E_INVALID_ARG, "Invalid argument is used. The sceneId is not valid."); + pSceneImpl = _SceneImpl::GetInstance(*pScene); + SysTryReturnResult(NID_UI_SCENES, pSceneImpl != null, E_INVALID_ARG, "Invalid argument is used. The sceneId is not valid."); + r = pSceneImpl->SetSceneAnimationProvider(pSceneAnimationProvider); + SysTryReturn(NID_UI_SCENES, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +_SceneManagerImpl::SetSceneTransitionPolicyProvider(ISceneTransitionPolicyProvider* pSceneTransitionPolicyProvider) +{ + __pPolicyProvider = pSceneTransitionPolicyProvider; + + return E_SUCCESS; +} + +result +_SceneManagerImpl::SetFormTransitionAnimationDefaultValues(SceneTransitionAnimationType animationType, long duration, + AnimationInterpolatorType interpolatorType) +{ + static const long DURATION_MIN = 0; + static const long DURATION_MAX = 1000; + + SysTryReturnResult(NID_UI_SCENES, (SCENE_TRANSITION_ANIMATION_TYPE_LEFT <= animationType && + animationType <= SCENE_TRANSITION_ANIMATION_TYPE_DEPTH_OUT), E_INVALID_ARG, + "Invalid argument is used. animationType=%d", animationType); + SysTryReturnResult(NID_UI_SCENES, (DURATION_MIN <= duration && duration <= DURATION_MAX), E_INVALID_ARG, + "Invalid argument is used. duration=%d", duration); + __animationDescriptions[animationType - SCENE_TRANSITION_ANIMATION_TYPE_LEFT].duration = duration; + __animationDescriptions[animationType - SCENE_TRANSITION_ANIMATION_TYPE_LEFT].interpolatorType = interpolatorType; + + return E_SUCCESS; +} + +result +_SceneManagerImpl::GoForward(const ForwardSceneTransition& sceneTransition, const Tizen::Base::Collection::IList* pArgs) +{ + //## Temporary - Currently no support Non-Recursive Lock(Mutex). + SysTryReturnResult(NID_UI_SCENES, !__sceneTransitionProgressing, E_IN_PROGRESS, "Previous operation in progressing"); + + result r = __sceneTransitionMutex.TryToAcquire(); + SysTryReturnResult(NID_UI_SCENES, r != E_OBJECT_LOCKED, E_IN_PROGRESS, "Previous operation in progressing"); + SysTryReturnResult(NID_UI_SCENES, r != E_SYSTEM, E_SYSTEM, "A system error has been occurred."); + r = __sceneTransitionMutex.Acquire(); + SysTryReturnResult(NID_UI_SCENES, !IsFailed(r), E_SYSTEM, "A system error has been occurred. Mutex acquire failed."); + __sceneTransitionProgressing = true; //## Temporary + + SceneId sceneId; + _SceneTransitionImpl forwardSceneTransition; + + forwardSceneTransition = *_SceneTransitionImpl::GetInstance(static_cast(sceneTransition)); + SysTryCatch(NID_UI_SCENES, forwardSceneTransition.GetDirection() == SCENE_TRANSITION_DIRECTION_FORWARD, r= E_INVALID_ARG, + E_INVALID_ARG, "[%s] Invalid argument is used. sceneTransition's direction is not SCENE_TRANSITION_DIRECTION_FORWARD.", GetErrorMessage(E_INVALID_ARG)); + + sceneId = forwardSceneTransition.GetDestinationSceneId(); + if (sceneId.GetLength() > 0) + { + // Prevent transit to current scene + SysTryCatch(NID_UI_SCENES, __currentSceneId != sceneId, r = E_INVALID_ARG, E_INVALID_ARG, + "[%s] Invalid argument is used. Can't forward to current Scene.", GetErrorMessage(E_INVALID_ARG)); + + // Stop animation + if (!IsAnimationCompleted()) + { + r = StopAllAnimations(); + SysTryCatch(NID_UI_SCENES, !IsFailed(r), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + // Go to the specified scene + r = GotoScene(true, sceneId, forwardSceneTransition.GetAnimationType(), + forwardSceneTransition.GetHistoryOption(), forwardSceneTransition.GetDestroyOption(), pArgs); + SysTryCatch(NID_UI_SCENES, !IsFailed(r), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { // Transition via PolicyProvider + SysTryCatch(NID_UI_SCENES, __pPolicyProvider != null, r = E_INVALID_STATE, E_INVALID_STATE, + "[%s] SceneManager is in an invalid state. Policy provider not registered.", GetErrorMessage(E_INVALID_STATE)); + + SceneId nextSceneId = __pPolicyProvider->GetNextScene(__currentSceneId, pArgs); + SysTryCatch(NID_UI_SCENES, !nextSceneId.IsEmpty(), r = E_INVALID_STATE, E_INVALID_STATE, + "[%s] SceneManager is in an invalid state. Policy provider does not know next scene. Current scene= %ls", + GetErrorMessage(E_INVALID_STATE), __currentSceneId.GetPointer()); + + // Prevent transit to current scene + SysTryCatch(NID_UI_SCENES, __currentSceneId != nextSceneId, r = E_INVALID_ARG, E_INVALID_ARG, + "[%s] Invalid argument is used. Can't forward to current Scene.", GetErrorMessage(E_INVALID_ARG)); + + // Stop animation + if (!IsAnimationCompleted()) + { + r = StopAllAnimations(); + SysTryCatch(NID_UI_SCENES, !IsFailed(r), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + r = GotoScene(true, nextSceneId, forwardSceneTransition.GetAnimationType(), + forwardSceneTransition.GetHistoryOption(), forwardSceneTransition.GetDestroyOption(), pArgs); + SysTryCatch(NID_UI_SCENES, !IsFailed(r), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + r = E_SUCCESS; + +CATCH: + __sceneTransitionProgressing = false; //## Temporary + SysTryReturnResult(NID_UI_SCENES, !IsFailed(__sceneTransitionMutex.Release()), E_SYSTEM, + "A system error has been occurred. Mutext release failed."); + return r; +} + +result +_SceneManagerImpl::GoForward(const SceneTransitionId& transitionId, const Tizen::Base::Collection::IList* pArgs) +{ + ForwardSceneTransition forwardTransition; + + result r = GetSceneTransition(transitionId, forwardTransition); + SysTryReturnResult(NID_UI_SCENES, !IsFailed(r), E_INVALID_ARG, "Cannot get transition from Id."); + + return GoForward(forwardTransition, pArgs); +} + +result +_SceneManagerImpl::GoBackward(const BackwardSceneTransition& sceneTransition, const Tizen::Base::Collection::IList* pArgs) +{ + //## Temporary - Currently no support Non-Recursive Lock(Mutex). + SysTryReturnResult(NID_UI_SCENES, !__sceneTransitionProgressing, E_IN_PROGRESS, "Previous operation in progressing"); + + result r = __sceneTransitionMutex.TryToAcquire(); + SysTryReturnResult(NID_UI_SCENES, r != E_OBJECT_LOCKED, E_IN_PROGRESS, "Previous operation in progressing"); + SysTryReturnResult(NID_UI_SCENES, r != E_SYSTEM, E_SYSTEM, "A system error has been occurred."); + r = __sceneTransitionMutex.Acquire(); + SysTryReturnResult(NID_UI_SCENES, !IsFailed(r), E_SYSTEM, "A system error has been occurred. Mutex acquire failed."); + __sceneTransitionProgressing = true; //## Temporary + + int historyCount = 0; + _SceneTransitionImpl backwardSceneTransition; + SceneId sceneId; + + historyCount = __sceneHistory.GetCount(); + SysTryCatch(NID_UI_SCENES, historyCount != 0, r = E_UNDERFLOW, E_UNDERFLOW, "[%s] The Scene history is empty.", + GetErrorMessage(E_UNDERFLOW)); + + backwardSceneTransition = *_SceneTransitionImpl::GetInstance(sceneTransition); + SysTryCatch(NID_UI_SCENES, backwardSceneTransition.GetDirection() == SCENE_TRANSITION_DIRECTION_BACKWARD, + r = E_INVALID_ARG, E_INVALID_ARG, + "[%s] Invalid argument is used. sceneTransition's direction is not SCENE_TRANSITION_DIRECTION_BACKWARD!", GetErrorMessage(E_INVALID_ARG)); + SysTryCatch(NID_UI_SCENES, backwardSceneTransition.GetHistoryOption() == SCENE_HISTORY_OPTION_NO_HISTORY, + r = E_INVALID_ARG, E_INVALID_ARG, + "[%s] Invalid argument is used. sceneTransition's history option is not SCENE_HISTORY_OPTION_NO_HISTORY!", GetErrorMessage(E_INVALID_ARG)); + + sceneId = backwardSceneTransition.GetDestinationSceneId(); + if (sceneId.GetLength() > 0) + { // Back to specific scene and clean up history between destination and last point. + int historyIndex = -1; + SceneId destinationSceneId; + + // 1. Back tracking and pick a first matching sceneId + r = __sceneHistory.LastIndexOf(sceneId, historyIndex); + SysTryCatch(NID_UI_SCENES, !IsFailed(r), r = E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, + "[%s] The given sceneId was not found in the registered scenes.", GetErrorMessage(E_OBJ_NOT_FOUND)); + r = __sceneHistory.GetAt(historyIndex, destinationSceneId); + SysTryCatch(NID_UI_SCENES, !IsFailed(r), r = E_SYSTEM, E_SYSTEM, "[%s] A system error has been occurred.", + GetErrorMessage(E_SYSTEM)); + + // Stop previous animation + if (!IsAnimationCompleted()) + { + r = StopAllAnimations(); + SysTryCatch(NID_UI_SCENES, !IsFailed(r), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + // 2. if destoryOption == SCENE_DESTROY_OPTION_DESTROY then destroy all scenes except matching scene. + if (backwardSceneTransition.GetDestroyOption() == SCENE_DESTROY_OPTION_DESTROY) + { + for (int i = historyIndex+1; i < historyCount; i++) + { + SceneId destroyTargetSceneId; + __sceneHistory.GetAt(i, destroyTargetSceneId); + // Scene instance is not always valid. + Scene* pScene = GetSceneFromContainer(destroyTargetSceneId); + if (pScene) + { + // If Panel Scene then destroy sibling Panel Scene(s). + if (pScene->GetPanel()) + { + DestroySiblingPanelScene(destroyTargetSceneId); + } + DestroyScene(destroyTargetSceneId); + } + } + } + + // 3. Remove all scenes on history between latest scene to matching scene. + r = __sceneHistory.RemoveItems(historyIndex, historyCount-historyIndex); + SysTryCatch(NID_UI_SCENES, !IsFailed(r), r = E_SYSTEM, E_SYSTEM, "[%s] A system error has been occurred.", + GetErrorMessage(E_SYSTEM)); + + // Prevent transit to current scene + SysTryCatch(NID_UI_SCENES, __currentSceneId != destinationSceneId, r = E_INVALID_ARG, E_INVALID_ARG, + "[%s] Invalid argument is used. Can't backward to current Scene.", GetErrorMessage(E_INVALID_ARG)); + + // Transition + r = GotoScene(false, destinationSceneId, backwardSceneTransition.GetAnimationType(), + SCENE_HISTORY_OPTION_NO_HISTORY, backwardSceneTransition.GetDestroyOption(), pArgs); + SysTryCatch(NID_UI_SCENES, !IsFailed(r), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { // Adjacent backward transition + SceneId previousSceneId; + + r = __sceneHistory.GetAt(historyCount-1, previousSceneId); + SysTryCatch(NID_UI_SCENES, !IsFailed(r), r = E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, + "[%s] The given sceneId was not found in the registered scenes.", GetErrorMessage(E_OBJ_NOT_FOUND)); + r = __sceneHistory.RemoveAt(historyCount-1); + SysTryCatch(NID_UI_SCENES, !IsFailed(r), r = E_SYSTEM, E_SYSTEM, "[%s] A system error has been occurred.", + GetErrorMessage(E_SYSTEM)); + + // Prevent transit to current scene + SysTryCatch(NID_UI_SCENES, __currentSceneId != previousSceneId, r = E_INVALID_ARG, E_INVALID_ARG, + "[%s] Invalid argument is used. Can't backward to current Scene.", GetErrorMessage(E_INVALID_ARG)); + + // Stop previous animation + if (!IsAnimationCompleted()) + { + r = StopAllAnimations(); + SysTryCatch(NID_UI_SCENES, !IsFailed(r), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + r = GotoScene(false, previousSceneId, backwardSceneTransition.GetAnimationType(), + SCENE_HISTORY_OPTION_NO_HISTORY, backwardSceneTransition.GetDestroyOption(), pArgs); + SysTryCatch(NID_UI_SCENES, !IsFailed(r), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + r = E_SUCCESS; + +CATCH: + __sceneTransitionProgressing = false; //## Temporary + SysTryReturnResult(NID_UI_SCENES, !IsFailed(__sceneTransitionMutex.Release()), E_SYSTEM, + "A system error has been occurred. Mutext release failed."); + return r; +} + +result +_SceneManagerImpl::GoBackward(const SceneTransitionId& transitionId, const Tizen::Base::Collection::IList* pArgs) +{ + BackwardSceneTransition backwardTransition; + + result r = GetSceneTransition(transitionId, backwardTransition); + SysTryReturnResult(NID_UI_SCENES, !IsFailed(r), E_INVALID_ARG, "Cannot get transition from Id."); + + return GoBackward(backwardTransition, pArgs); +} + +Scene* +_SceneManagerImpl::GetCurrentScene(void) const +{ + return __pCurrentScene; +} + +SceneId +_SceneManagerImpl::GetCurrentSceneId(void) const +{ + return __currentSceneId; +} + +bool +_SceneManagerImpl::IsSceneAlive(const SceneId& sceneId) const +{ + return (GetSceneFromContainer(sceneId)) ? true : false; +} + +result +_SceneManagerImpl::DestroyScene(const SceneId& sceneId) +{ + result r = E_SUCCESS; + Scene* pScene = null; + bool isFormScene = false; + bool isLastPanel = false; + int panelCount = 0; + + SysTryReturnResult(NID_UI_SCENES, __currentSceneId != sceneId, E_INVALID_ARG, + "Invalid argument is used. The current Scene can not be destroy."); + pScene = GetSceneFromContainer(sceneId); + SysTryReturnResult(NID_UI_SCENES, pScene != null, E_OBJ_NOT_FOUND, "Specified sceneId does not exist."); + + // Ok now destroy associated Ui controls + // Form scene: Destroy Form - that's all. + // Panel scene: Normal case - destroy Panel only but the current scene is the last panel then destroy Form. + // Correspondent internal data item should be destroy. + if (!pScene->GetPanel()) + { + isFormScene = true; + } + else + { + r = __formToPanelMultiMap.GetCount(pScene->GetFormId(), panelCount); + SysTryReturnResult(NID_UI_SCENES, !IsFailed(r), E_SYSTEM, + "A system error has been occurred. Form(SceneId:%ls) is not valid.", sceneId.GetPointer()); + if (panelCount <= 1) + { + isLastPanel = true; + } + } + + //Remove Scene + RemoveSceneFromContainer(sceneId); + + if (isFormScene) + { // 1. Remove Form from Form container + RemoveFormFromFormContainer(pScene->GetFormId()); + // 2. Remove Form control(Associated on Scene) from Frame + RemoveControlFromFrame(*pScene->GetForm()); + } + else + if (isLastPanel) + { // 1. Remove Panel from Panel container. + RemovePanelFromPanelContainer(pScene); + // 2. Remove Form from Form container. + RemoveFormFromFormContainer(pScene->GetFormId()); + // 3. Remove Form control from Frame. (Associated Panel automatically removed by Ui) + RemoveControlFromFrame(*pScene->GetForm()); + } + else + { // 1. Remove Panel from Panel container. + RemovePanelFromPanelContainer(pScene); + // 2. Remove Panel control from base Form + bool panelFromFormResouce = false; + _SceneImpl* pSceneImpl = _SceneImpl::GetInstance(*pScene); + if (pSceneImpl) + { + panelFromFormResouce = pSceneImpl->IsPanelCreatedFromFormResource(); + } + if (!panelFromFormResouce) + { + RemoveControlFromForm(*pScene->GetForm(), *pScene->GetPanel()); + } + } + delete pScene; + + return E_SUCCESS; +} + +result +_SceneManagerImpl::BringCurrentSceneToTop(void) +{ + Form* pForm = null; + Scene* pCurrentScene = GetCurrentScene(); + + SysTryReturnResult(NID_UI_SCENES, pCurrentScene != null, E_OPERATION_FAILED, "The current Scene is not valid."); + pForm = pCurrentScene->GetForm(); + SysTryReturnResult(NID_UI_SCENES, pForm != null, E_SYSTEM, "A system error has been occurred. The Form is not valid."); + result r = SetCurrentForm(*pForm); + SysTryReturnResult(NID_UI_SCENES, !IsFailed(r), E_SYSTEM, "A system error has been occurred."); + + return E_SUCCESS; +} + +result +_SceneManagerImpl::ClearSceneHistory(void) +{ + __sceneHistory.RemoveAll(); + + return E_SUCCESS; +} + +result +_SceneManagerImpl::AddToSceneHistory(const SceneId& sceneId) +{ + result r = E_SUCCESS; + bool isContains = false; + + SysTryReturnResult(NID_UI_SCENES, !sceneId.IsEmpty(), E_INVALID_ARG, "Invalid argument is used. sceneId length is 0."); + r = __sceneMap.ContainsKey(sceneId, isContains); + SysTryReturnResult(NID_UI_SCENES, isContains, E_OBJ_NOT_FOUND, "The sceneId is not registered."); + r = AddHistory(sceneId); + SysTryReturn(NID_UI_SCENES, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +IListT* +_SceneManagerImpl::GetSceneHistoryN(void) const +{ + std::unique_ptr > pSceneList(new (std::nothrow) ArrayListT); + SysTryReturn(NID_UI_SCENES, pSceneList != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", + GetErrorMessage(E_OUT_OF_MEMORY)); + + pSceneList->AddItems(__sceneHistory); + return pSceneList.release(); +} + +_SceneManagerImpl* +_SceneManagerImpl::GetInstance(SceneManager& pSceneManager) +{ + return pSceneManager.__pSceneManagerImpl; +} + +const _SceneManagerImpl* +_SceneManagerImpl::GetInstance(const SceneManager& pSceneManager) +{ + return pSceneManager.__pSceneManagerImpl; +} + +// Event handelers to asynchronous destroy the Scene. +void +_SceneManagerImpl::OnFormTransitionAnimationFinished(FrameAnimator& source, Frame& frame, Form& form1, Form& form2) +{ + SetInputEventEnableState(form1, true); + SetInputEventEnableState(form2, true); + + source.RemoveFrameAnimatorEventListener(*this); + DestroyReservedScene(); +} + +void +_SceneManagerImpl::OnFormTransitionAnimationStarted(FrameAnimator& source, Frame& frame, Form& form1, Form& form2) +{ + // Nothing to do. +} + +void +_SceneManagerImpl::OnFormTransitionAnimationStopped(FrameAnimator& source, Frame& frame, Form& form1, Form& form2) +{ + SetInputEventEnableState(form1, true); + SetInputEventEnableState(form2, true); + + source.RemoveFrameAnimatorEventListener(*this); + DestroyReservedScene(); +} + +void +_SceneManagerImpl::OnAnimationTransactionFinished(int transactionId) +{ + if (__pDisabledForm) + { + SetInputEventEnableState(*__pDisabledForm, true); + __pDisabledForm = null; + } + AnimationTransaction::SetCurrentTransactionEventListener(null); +} + +void +_SceneManagerImpl::OnAnimationTransactionStarted(int transactionId) +{ + // Nothing to do. +} + +void +_SceneManagerImpl::OnAnimationTransactionStopped(int transactionId) +{ + if (__pDisabledForm) + { + SetInputEventEnableState(*__pDisabledForm, true); + __pDisabledForm = null; + } + AnimationTransaction::SetCurrentTransactionEventListener(null); +} + +void +_SceneManagerImpl::OnSceneControlEventReceived(_SceneControlEventArg::SceneControlEventType eventType, const SceneId& sceneId) +{ + SysSecureLog(NID_UI_SCENES, "Received type= 0x%x, sceneId=%ls", eventType, sceneId.GetPointer()); + + switch (eventType) + { + case _SceneControlEventArg::SCENE_CONTROL_EVENT_TYPE_DESTROY: + if (!__destroyPendingScene.IsEmpty()) + { + // Give up if the application is terminated. + UiApp* pUiApp = UiApp::GetInstance(); + SysTryLogReturn(NID_UI_SCENES, pUiApp, , "Invalid UiApp"); + AppState appState = pUiApp->GetAppState(); + if (appState == TERMINATING || appState == TERMINATED) + { + SysLog(NID_UI_SCENES, "Application terminated, ignore the destroy event."); + return; + } + + SysTryLog(NID_UI_SCENES, __destroyPendingScene == sceneId, "Abnormal! __destroyPendingScene != sceneId"); + DestroyScene(sceneId); + if (__destroyPendingScene == sceneId) + { + __destroyPendingScene.Clear(); + } + } + else + { + SysSecureLog(NID_UI_SCENES, "The Scene was already destroyed on the GotoScene."); + } + break; + + default: + SysLog(NID_UI_SCENES, "Invalid SceneControlEventType x0%x", eventType); + break; + } +} + +// Internal operations +Scene* +_SceneManagerImpl::GetScene(SceneId& sceneId) +{ + return GetSceneFromContainer(sceneId); +} + +IListT* +_SceneManagerImpl::GetLiveSceneN(void) const +{ + std::unique_ptr > pSceneList(new (std::nothrow) ArrayListT); + SysTryReturn(NID_UI_SCENES, pSceneList != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", + GetErrorMessage(E_OUT_OF_MEMORY)); + + std::unique_ptr > pMapEnum(__sceneContainer.GetMapEnumeratorN()); + SysTryReturn(NID_UI_SCENES, pMapEnum != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", + GetErrorMessage(E_OUT_OF_MEMORY)); + + while (pMapEnum->MoveNext() == E_SUCCESS) + { + Scene* pScene = null; + pMapEnum->GetValue(pScene); + pSceneList->Add(pScene); + } + return pSceneList.release(); +} + +// Private method +result +_SceneManagerImpl::GotoScene(bool forward, const SceneId& sceneId, SceneTransitionAnimationType animationType, + SceneHistoryOption historyOption, SceneDestroyOption destroyOption, const IList* pArgs) +{ + // 1. Initialize for Scene transition. + result r = E_SUCCESS; + bool sceneAlreadyCreated = false; + bool formAlreadyCreated = false; + bool panelAlreadyCreated = false; + bool doAnimation = false; + bool formTransition = false; + Scene* pScene = null; + Form* pForm = null; + Panel* pPanel = null; + SceneId previousSceneId = __currentSceneId; // Save for later + String previousFormId = (__pCurrentScene) ? __pCurrentScene->GetFormId() : L""; + bool previousIsPanelScene = (__pCurrentScene) ? (__pCurrentScene->GetPanel()) : false; + Frame* pFrame = null; + FrameAnimator* pFrameAnimator = null; + // Exception handling hintings + bool onExceptionDeletepScene = false; + bool onExceptionRemovesceneIdFromSceneContainer = false; + bool onExceptionDeletepForm = false; + bool onExceptionRemoveFormIdFromFormContainer = false; + bool onExceptionRemovepPanel = false; + + // Prevent self forward + SysTryCatch(NID_UI_SCENES, __currentSceneId != sceneId, r = E_INVALID_ARG, E_INVALID_ARG, + "[%s] Invalid argument is used. Can't transit to current Scene.", GetErrorMessage(E_INVALID_ARG)); + CallListenerOnSceneTransitionStarted(__currentSceneId, sceneId); // Call listener - ISceneManagerEventListener's + if (__pCurrentScene) + { // Call listener - ISceneEventListener's + CallListenerOnSceneDeactivated(*__pCurrentScene, __pCurrentScene->GetSceneId(), sceneId); + } + + // 2. Find the Scene on SceneContainer - Scene and correspond UI control has same life time. + pScene = GetSceneFromContainer(sceneId); + + // If the destination Scene is pending to destroy then destroy and invalidate the pScene + if (pScene && !__destroyPendingScene.IsEmpty()) + { + if (sceneId == __destroyPendingScene) + { + __destroyPendingScene.Clear(); + DestroyScene(sceneId); + pScene = null; + SysLog(NID_UI_SCENES, "DestroySceneAsync not finished, Do force destroy."); + } + } + + if (pScene) // Activate pScene: Scene already existing then Re-activate associated a Form and a Panel. + { + sceneAlreadyCreated = true; + pForm = GetFormFromContainer(pScene->GetFormId()); + SysTryCatch(NID_UI_SCENES, pForm == pScene->GetForm(), r = E_SYSTEM, E_SYSTEM, + "[%s] A system error has been occurred. FormId mismatch with associated From instance.", + GetErrorMessage(E_SYSTEM)); + formAlreadyCreated = true; + pPanel = pScene->GetPanel(); + if (pPanel) + { + panelAlreadyCreated = true; + } + } + else + { // 3. Scene not found- Create new Scene + _SceneDescription* pSceneValue = null; + __sceneMap.GetValue(sceneId, pSceneValue); + SysTryCatch(NID_UI_SCENES, pSceneValue != null, r = E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, + "[%s] The given sceneId was not found in the registered scenes.", GetErrorMessage(E_OBJ_NOT_FOUND)); + // 4. Setup the new Scene + pScene = _SceneImpl::CreateSceneN(sceneId, pSceneValue->formId, pSceneValue->panelId); + SysTryCatch(NID_UI_SCENES, pScene != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, + "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + onExceptionDeletepScene = true; // On the CATCH [delete pScene] + _SceneImpl* pSceneImpl = _SceneImpl::GetInstance(*pScene); + SysTryCatch(NID_UI_SCENES, pSceneImpl != null, r = E_SYSTEM, E_SYSTEM, + "[%s] A system error has been occurred. pSceneImpl not valid", GetErrorMessage(E_SYSTEM)); + // 5. Register Scene + AddSceneToContainer(sceneId, pScene); + onExceptionRemovesceneIdFromSceneContainer = true; // On the CATCH [remove 'sceneId' from SceneContainer] + // 6. Find the Form on FormContainer + pForm = GetFormFromContainer(pScene->GetFormId()); + if (pForm) // Form existing: just call SetCurrentForm + { // If the Scene is panel scene then add new panel to pForm or change showState. + formAlreadyCreated = true; + pSceneImpl->SetForm(pForm); // Panel Scene share same Form intance + } + else// 7. Form not found- Create new Form + { // 8. Get the new Form from the FormFactory + SysTryCatch(NID_UI_SCENES, __pFormFactory != null, r = E_INVALID_STATE, E_INVALID_STATE, + "[%s] SceneManager is in an invalid state. Form factory is not registered.", + GetErrorMessage(E_INVALID_STATE)); + String formId(pScene->GetFormId()); + pForm = __pFormFactory->CreateFormN(formId, sceneId); // On the CATCH [delete pForm] + SysTryCatch(NID_UI_SCENES, pForm != null, r = E_SYSTEM, E_SYSTEM, + "[%s] A system error has been occurred. Form(Id=%ls) creation failed on form factroy.", + GetErrorMessage(E_SYSTEM), formId.GetPointer()); + onExceptionDeletepForm = true; // On the CATCH [remove pForm from FormContainer] + // 9. Register Form + AddFormToContainer(pScene->GetFormId(), pForm); + pSceneImpl->SetForm(pForm); + onExceptionRemoveFormIdFromFormContainer = true; + } + // 10. Create panel for Panel Scene + // * One Panel instance for each Panel-Scene so no need to check duplicated panel instance for same panel Id. + if (!pScene->GetPanelId().IsEmpty()) + { + String panelId(pScene->GetPanelId()); + // First of all, get the Panel from the based Form. + // Because, base Form loaded from the resources, the child Panel also loaded and created. + // So, do not create a new Panel instance but get from base Form with panelId as resource Id. + pPanel = dynamic_cast(pForm->GetControl(panelId)); + if (pPanel) + { + pSceneImpl->SetPanelCreatedFromFormResource(true); // Prevent RemoveControl - It's not creatable via Panel factory. + } + else + { + SysTryCatch(NID_UI_SCENES, __pPanelFactory != null, r = E_INVALID_STATE, E_INVALID_STATE, + "[%s] SceneManager is in an invalid state. Panel factory is not registered.", + GetErrorMessage(E_INVALID_STATE)); + pPanel = __pPanelFactory->CreatePanelN(panelId, sceneId); // On the CATCH [delete pPanel] + SysTryCatch(NID_UI_SCENES, pPanel != null, r = E_SYSTEM, E_SYSTEM, + "[%s] A system error has been occurred. Panel(Id=%ls) creation failed on PanelFactory.", + GetErrorMessage(E_SYSTEM), panelId.GetPointer()); + onExceptionRemovepPanel = true; // On the CATCH [remove pPanel from __formToPanelMultiMap] + } + AddPanelToPanelContainer(pScene); + pSceneImpl->SetPanel(pPanel); + } + } + + // For animation logic should be divide Animator section and normal section for proper operations. + // If (showAnimation && forwardAnimation is Not NONE) then doing animator related logic / + // Setup default animation setting / Add listener to get animation stop/finishing + formTransition = (previousFormId != pScene->GetFormId()) ? true : false; + doAnimation = (animationType > SCENE_TRANSITION_ANIMATION_TYPE_NONE) ? true : false; + if (doAnimation && (animationType != SCENE_TRANSITION_ANIMATION_TYPE_CUSTOM && !formTransition)) + { + doAnimation = false; + } + if (doAnimation && (GetCurrentForm() == null)) + { + doAnimation = false; + } + + if (doAnimation) + { + // Initialize Frame animator + pFrame = GetFrame(); + SysTryCatch(NID_UI_SCENES, pFrame != null, r = E_SYSTEM, E_SYSTEM, + "[%s] A system error has been occurred. Cannot get Frame.", GetErrorMessage(E_SYSTEM)); + pFrameAnimator = pFrame->GetFrameAnimator(); + SysTryCatch(NID_UI_SCENES, pFrameAnimator != null, r = E_SYSTEM, E_SYSTEM, + "[%s] A system error has been occurred. Cannot get FrameAnimator.", GetErrorMessage(E_SYSTEM)); + pFrameAnimator->StopAllAnimations(); + + // Initialize Control animator if needed. + if (!formTransition && pPanel) + { + ControlAnimator* pControlAnimator = pPanel->GetControlAnimator(); + SysTryCatch(NID_UI_SCENES, pControlAnimator != null, r = E_SYSTEM, E_SYSTEM, + "[%s] A system error has been occurred. Cannot get ControlAnimator.", GetErrorMessage(E_SYSTEM)); + pControlAnimator->StopAllAnimations(); + } + + // Set default value for formTransition + if (formTransition && (animationType >= SCENE_TRANSITION_ANIMATION_TYPE_LEFT) && + (pFrameAnimator->GetStatus() == ANIMATOR_STATUS_STOPPED)) + { + pFrameAnimator->SetFormTransitionAnimation( + __animationDescriptions[animationType-SCENE_TRANSITION_ANIMATION_TYPE_LEFT].animationType, + __animationDescriptions[animationType-SCENE_TRANSITION_ANIMATION_TYPE_LEFT].duration, + __animationDescriptions[animationType-SCENE_TRANSITION_ANIMATION_TYPE_LEFT].interpolatorType); + } + + if (formTransition) + { // Disable user input + if (__pCurrentScene) + { + r = SetInputEventEnableState(*__pCurrentScene->GetForm(), false); + SysTryCatch(NID_UI_SCENES, !IsFailed(r), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + r = SetInputEventEnableState(*pForm, false); + if (IsFailed(r)) + { + if (__pCurrentScene) + { + SetInputEventEnableState(*__pCurrentScene->GetForm(), true); + } + } + SysTryCatch(NID_UI_SCENES, !IsFailed(r), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + + // Prepare animation for customization. + CallListenerPrepareAnimation(*pScene, sceneId, const_cast(pArgs), animationType, formTransition ); + // Setup Ui controls to show the result. + if (sceneAlreadyCreated) + { + if (formTransition) + { + if (pPanel) + { + SwitchToPanel(pScene->GetFormId(), pPanel); + } + r = SetCurrentForm(*pForm, doAnimation); // FrameAnimator + SysTryCatch(NID_UI_SCENES, !IsFailed(r), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + r = SetCurrentForm(*pForm); + SysTryCatch(NID_UI_SCENES, !IsFailed(r), , r, "[%s] Propagating.", GetErrorMessage(r)); + if (pPanel) + { + SwitchToPanel(pScene->GetFormId(), pPanel, doAnimation); // ControlAnimator + } + } + } + else // Scene newly created + { + if (formAlreadyCreated) // Panel scene created but base form already created - reuse base form. + { + if (formTransition) + { + if (pPanel) + { + if (!panelAlreadyCreated) // If a new panel created then Add Panel to Form + { + AddControlToForm(*pForm, *pPanel); + } + SwitchToPanel(pScene->GetFormId(), pPanel); + } + r = SetCurrentForm(*pForm, (doAnimation)); // FrameAnimator + SysTryCatch(NID_UI_SCENES, !IsFailed(r), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + r = SetCurrentForm(*pForm); + SysTryCatch(NID_UI_SCENES, !IsFailed(r), , r, "[%s] Propagating.", GetErrorMessage(r)); + if (pPanel) + { + if (!panelAlreadyCreated) + { + AddControlToForm(*pForm, *pPanel); + } + SwitchToPanel(pScene->GetFormId(), pPanel, doAnimation); // ControlAnimator + } + } + } + else // New Form created! + { + if (pPanel) + { + // New panel + AddControlToForm(*pForm, *pPanel); + SwitchToPanel(pScene->GetFormId(), pPanel); + } + AddControlToFrame(*pForm, doAnimation); // Form add to frame + if (!doAnimation) + { + SetCurrentForm(*pForm); + } + } + } + + UpdateCurrentScene(pScene); + if ((historyOption == SCENE_HISTORY_OPTION_ADD_HISTORY) && (!previousSceneId.IsEmpty())) + { + r = AddHistory(previousSceneId); + // Too late revert to previous scene, so just return the error code but not revert to previous state. + SysTryLog(NID_UI_SCENES, !IsFailed(r), "[%s] History adding failed.", GetErrorMessage(r)); + } + + CallListenerOnSceneActivatedN(*pScene, previousSceneId, sceneId, const_cast(pArgs)); + CallListenerOnSceneTransitionCompleted(previousSceneId, __currentSceneId); + + if (destroyOption == SCENE_DESTROY_OPTION_DESTROY ) + { + if (previousIsPanelScene) + { + DestroySiblingPanelScene(previousSceneId); // Destroy sibling Panel Scene + } + if (doAnimation) + { + ReserveDestroyingScene(previousSceneId); // Destroy the Scene after animator finished(stopped). + } + else + { + DestroySceneAsync(previousSceneId); + } + } + + DrawForm(*pScene->GetForm()); + return r; + +CATCH: + // Check all exception case for proper delete the instances: Scene, Form, Panel and item corresponding container. + if (onExceptionRemovepPanel) + { + RemovePanelFromPanelContainer(pScene); + delete pPanel; // Also needed it. + pPanel = null; + } + if (onExceptionRemoveFormIdFromFormContainer) + { + RemoveFormFromFormContainer(pScene->GetFormId()); + } + if (onExceptionDeletepForm) + { + delete pForm; + pForm = null; + } + if (onExceptionRemovesceneIdFromSceneContainer) + { + RemoveSceneFromContainer(sceneId); + } + if (onExceptionDeletepScene) + { + delete pScene; + pScene = null; + } + + return r; +} + +Scene* +_SceneManagerImpl::GetSceneFromContainer(const SceneId& sceneId) const +{ + Scene* pScene = null; + __sceneContainer.GetValue(sceneId, pScene); + return pScene; +} + +Form* +_SceneManagerImpl::GetFormFromContainer(const String& formId) +{ + Form* pForm = null; + __formContainer.GetValue(formId, pForm); + return pForm; +} + +void +_SceneManagerImpl::AddSceneToContainer(const SceneId& sceneId, Scene* pScene) +{ + __sceneContainer.Add(sceneId, pScene); +} + +void +_SceneManagerImpl::RemoveSceneFromContainer(const SceneId& sceneId) +{ + __sceneContainer.Remove(sceneId); +} + +void +_SceneManagerImpl::AddFormToContainer(const String& formId, Form* pForm) +{ + __formContainer.Add(formId, pForm); +} + +void +_SceneManagerImpl::RemoveFormFromFormContainer(const String& formId) +{ + __formContainer.Remove(formId); +} + +void +_SceneManagerImpl::AddPanelToPanelContainer(Scene* pScene) +{ + __formToPanelMultiMap.Add(pScene->GetFormId(), pScene); +} + +void +_SceneManagerImpl::RemovePanelFromPanelContainer(Scene* pScene) +{ + __formToPanelMultiMap.Remove(pScene->GetFormId(), pScene); +} + +void +_SceneManagerImpl::UpdateCurrentScene(Scene* pScene) +{ + __pCurrentScene = pScene; + __currentSceneId = pScene->GetSceneId(); +} + +result +_SceneManagerImpl::AddHistory(const SceneId& sceneId) +{ + return __sceneHistory.Add(sceneId); +} + +void +_SceneManagerImpl::SwitchToPanel(const String& formId, Panel* pPanel, bool useAnimator) +{ + Panel* pShowPanel = null; + Form* pBaseForm = null; + if (useAnimator) + { + pBaseForm = dynamic_cast(pPanel->GetParent()); + if (pBaseForm == null) + { + useAnimator = false; + } + } + + std::unique_ptr > pSceneEnum(__formToPanelMultiMap.GetValuesN(formId)); + SysTryReturnVoidResult(NID_UI_SCENES, pSceneEnum != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", + GetErrorMessage(E_OUT_OF_MEMORY)); + while (pSceneEnum->MoveNext() == E_SUCCESS) + { + Scene* pCurrentScene = null; + pSceneEnum->GetCurrent(pCurrentScene); + SysTryReturnVoidResult(NID_UI_SCENES, pCurrentScene != null, E_SYSTEM, "[%s] Memory allocation failed.", + GetErrorMessage(E_OUT_OF_MEMORY)); + if (pCurrentScene->GetPanel() != pPanel) + { + if (pCurrentScene->GetPanel()->GetShowState()) + { + pShowPanel = pCurrentScene->GetPanel(); + } + } + } + + if (useAnimator && pShowPanel && pPanel) + { + int transactionId = 0; + AnimationTransaction::Begin(transactionId); // transactionId was set + } + + if (pShowPanel) + { + if (useAnimator) + { + ControlAnimator* pControlAnimator = pShowPanel->GetControlAnimator(); + if (pControlAnimator) + { + pControlAnimator->SetShowState(false); + } + else + { + pShowPanel->SetShowState(false); + } + } + else + { + pShowPanel->SetShowState(false); + } + } + if (pPanel) + { + if (useAnimator) + { + ControlAnimator* pControlAnimator = pPanel->GetControlAnimator(); + if (pControlAnimator) + { + pControlAnimator->SetShowState(true); + } + else + { + pPanel->SetShowState(true); + } + } + else + { + pPanel->SetShowState(true); + } + } + + if (useAnimator && pShowPanel && pPanel) + { + // Set event listener & start animations + AnimationTransaction::SetCurrentTransactionEventListener(this); + result r = AnimationTransaction::Commit(); + if (!IsFailed(r)) + { + // Disable input for base Form + if (pBaseForm) + { + __pDisabledForm = pBaseForm; + SetInputEventEnableState(*pBaseForm, false); + } + } + else + { + SysLog(NID_UI_SCENES, "Animation Commit() failed"); + } + } +} + +void +_SceneManagerImpl::AddControlToFrame(Form& form, bool useAnimator) +{ + Frame* pFrame = GetFrame(); + if (pFrame) + { + if (useAnimator) + { + FrameAnimator* pFrameAnimator = pFrame->GetFrameAnimator(); + if (pFrameAnimator) + { + // Add animator listener to asynchronous scene destroy for safe deletion. + pFrameAnimator->AddFrameAnimatorEventListener(*this); + _FrameAnimatorImpl* pFrameAnimatorImpl = _FrameAnimatorImpl::GetInstance(*pFrameAnimator); + if (pFrameAnimatorImpl) + { + pFrameAnimatorImpl->AddControl(form); + return; + } + } + SysLog(NID_UI_SCENES, "pFrameAnimator or pFrameAnimatorImpl is not valid."); + } + pFrame->AddControl(form); + } +} + +void +_SceneManagerImpl::RemoveControlFromFrame(Form& form) +{ + Frame* pFrame = GetFrame(); + if (pFrame) + { + // Control validation check for safe operation on termination(Ui destroy before asynchronous scene destroy process). + _ControlManager* pControlManager = _ControlManager::GetInstance(); + if (pControlManager) + { + _Control* pControl = pControlManager->GetObject(__correspondFrameControlHandle); + if (pControl) + { + pFrame->RemoveControl(form); + return; + } + else + { + SysLog(NID_UI_SCENES, "FrameWindow already destroyed. Skip remove control to form."); + } + } + else + { + SysLog(NID_UI_SCENES, "Window system already shutdown."); + } + } +} + +result +_SceneManagerImpl::SetCurrentForm(Form& form, bool useAnimator) +{ + result r = E_SUCCESS; + Frame* pFrame = GetFrame(); + + SysTryReturnResult(NID_UI_SCENES, pFrame != null, E_SYSTEM, + "A system error has been occurred. Can not get the Frame window."); + if (useAnimator) + { + FrameAnimator* pFrameAnimator = pFrame->GetFrameAnimator(); + if (pFrameAnimator) + { + // Add animator listener to asynchronous scene destroy for safe deletion. + pFrameAnimator->AddFrameAnimatorEventListener(*this); + r = pFrameAnimator->SetCurrentForm(form); + if (r != E_SYSTEM) + { + return E_SUCCESS; + } + } + SysLog(NID_UI_SCENES, "Safety operation ongoing. Animation may not working, Please check the problems!"); + } + + // Check the current Form, if already current one then skip the SetCurrentForm(). + if (GetCurrentForm() == &form) + { + SysSecureLog(NID_UI_SCENES, "The Form already set as current form, skip the SetCurrentForm()"); + } + else + { + r = pFrame->SetCurrentForm(form); + SysTryReturnResult(NID_UI_SCENES, !IsFailed(r), E_SYSTEM, "A system error has been occurred. Can not set current form."); + } + return E_SUCCESS; +} + +Form* +_SceneManagerImpl::GetCurrentForm(void) +{ + Frame* pFrame = GetFrame(); + if (pFrame) + { + return pFrame->GetCurrentForm(); + } + return null; +} + +void +_SceneManagerImpl::AddControlToForm(Form& baseForm, const Panel& panel) +{ + baseForm.AddControl(panel); +} + +void +_SceneManagerImpl::RemoveControlFromForm(Form& baseForm, const Panel& panel) +{ + baseForm.RemoveControl(panel); +} + +void +_SceneManagerImpl::SetShowState(Panel& targetPanel, bool state) +{ + targetPanel.SetShowState(state); +} + +void +_SceneManagerImpl::DrawForm(Form& form) +{ + form.Invalidate(true); +} + +bool +_SceneManagerImpl::CallListenerOnSceneTransitionStarted(const SceneId& currentSceneId, const SceneId& nextSceneId) +{ + std::unique_ptr > pEnum(__sceneManagerEventListenerList.GetEnumeratorN()); + if (!pEnum) + { + return false; + } + + while (pEnum->MoveNext() == E_SUCCESS) + { + ISceneManagerEventListener* pListener = null; + pEnum->GetCurrent(pListener); + if (pListener) + { + pListener->OnSceneTransitionStarted(currentSceneId, nextSceneId); + } + } + return true; +} + +bool +_SceneManagerImpl::CallListenerOnSceneTransitionCompleted(const SceneId& previousSceneId, const SceneId& currentSceneId) +{ + std::unique_ptr > pEnum(__sceneManagerEventListenerList.GetEnumeratorN()); + if (!pEnum) + { + return false; + } + + while (pEnum->MoveNext() == E_SUCCESS) + { + ISceneManagerEventListener* pListener = null; + pEnum->GetCurrent(pListener); + if (pListener) + { + pListener->OnSceneTransitionCompleted(previousSceneId, currentSceneId); + } + } + return true; +} + +bool +_SceneManagerImpl::CallListenerPrepareAnimation(Scene& scene, const SceneId& sceneId, IList* pArgs, + SceneTransitionAnimationType type, bool formTransition) +{ + _SceneImpl* pSceneImpl = _SceneImpl::GetInstance(scene); + SysTryReturn(NID_UI_SCENES, pSceneImpl, false, E_INVALID_STATE, + "[%s] SceneManager is in an invalid state. scene is not valid.", + GetErrorMessage(E_INVALID_STATE)); + + return pSceneImpl->PrepareAnimation(sceneId, pArgs, type, formTransition); +} + +bool +_SceneManagerImpl::CallListenerOnSceneActivatedN(Scene& scene, const SceneId& previousSceneId, const SceneId& currentSceneId, + IList* pArgs) +{ + _SceneImpl* pSceneImpl = _SceneImpl::GetInstance(scene); + SysTryReturn(NID_UI_SCENES, pSceneImpl, false, E_INVALID_STATE, + "[%s] SceneManager is in an invalid state. scene is not valid.", + GetErrorMessage(E_INVALID_STATE)); + + return pSceneImpl->OnSceneActivatedN(previousSceneId, currentSceneId, pArgs); +} + +bool +_SceneManagerImpl::CallListenerOnSceneDeactivated(Scene& scene, const SceneId& currentSceneId, const SceneId& nextSceneId) +{ + _SceneImpl* pSceneImpl = _SceneImpl::GetInstance(scene); + SysTryReturn(NID_UI_SCENES, pSceneImpl, false, E_INVALID_STATE, + "[%s] SceneManager is in an invalid state. scene is not valid.", + GetErrorMessage(E_INVALID_STATE)); + + return pSceneImpl->OnSceneDeactivated(currentSceneId, nextSceneId); +} + +SceneId +_SceneManagerImpl::CallStretegyGetNextScene(const SceneId& currentSceneId, const IList* pArgs) +{ + SceneId nextScene(L""); + if (__pPolicyProvider) + { + nextScene = __pPolicyProvider->GetNextScene(currentSceneId, pArgs); + } + return nextScene; +} + +void +_SceneManagerImpl::DestroySceneAsync(const SceneId& sceneId) +{ + _SceneControlEventArg* pArg = new (std::nothrow) _SceneControlEventArg( + _SceneControlEventArg::SCENE_CONTROL_EVENT_TYPE_DESTROY, sceneId); + SysTryReturnVoidResult(NID_UI_SCENES, pArg != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", + GetErrorMessage(E_OUT_OF_MEMORY)); + __sceneControlEvent.FireAsync(*pArg); + __destroyPendingScene = sceneId; +} + +void +_SceneManagerImpl::ReserveDestroyingScene(const SceneId& sceneId) +{ + if (!__destroyReservedScene.IsEmpty()) + { + SysLog(NID_UI_SCENES, "Previous reserved sceneId=%ls", __destroyReservedScene.GetPointer()); + } + __destroyReservedScene = sceneId; +} + +void +_SceneManagerImpl::DestroyReservedScene(void) +{ + if (!__destroyReservedScene.IsEmpty()) + { + DestroySceneAsync(__destroyReservedScene); + __destroyReservedScene.Clear(); + } +} + +void +_SceneManagerImpl::DestroySiblingPanelScene(const SceneId& sceneId) +{ + Scene* pScene = null; + pScene = GetSceneFromContainer(sceneId); + SysTryReturnVoidResult(NID_UI_SCENES, pScene != null, E_OBJ_NOT_FOUND, "[%s] Specified sceneId does not exist.", + GetErrorMessage(E_OBJ_NOT_FOUND)); + + Panel* pPanel = pScene->GetPanel(); + if (pPanel) + { + int panelCount = 0; + result r = __formToPanelMultiMap.GetCount(pScene->GetFormId(), panelCount); + SysTryReturnVoidResult(NID_UI_SCENES, !IsFailed(r), E_SYSTEM, + "[%s] A system error has been occurred. Form(SceneId:%ls) not valid.", + GetErrorMessage(E_SYSTEM), sceneId.GetPointer()); + if (panelCount <= 1) + { + return; + } + + ArrayListT destroyList; + std::unique_ptr > pSceneEnum(__formToPanelMultiMap.GetValuesN(pScene->GetFormId())); + SysTryReturnVoidResult(NID_UI_SCENES, pSceneEnum != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", + GetErrorMessage(E_OUT_OF_MEMORY)); + while (pSceneEnum->MoveNext() == E_SUCCESS) + { + Scene* pCurrentScene = null; + pSceneEnum->GetCurrent(pCurrentScene); + SysTryReturnVoidResult(NID_UI_SCENES, pCurrentScene != null, E_SYSTEM, + "[%s] A system error has been occurred. Current scene is not valid.", + GetErrorMessage(E_SYSTEM)); + if (pCurrentScene->GetPanel() != pPanel) + { + destroyList.Add(pCurrentScene); // DestroyScene modify __formToPanelMultiMap so can't destroy here. + } + } + + for (int i = 0; i < destroyList.GetCount(); i++) + { + Scene* pCurrentScene = null; + destroyList.GetAt(i, pCurrentScene); + if (pCurrentScene) + { + DestroyScene(pCurrentScene->GetSceneId()); + } + } + } +} + +Frame* +_SceneManagerImpl::GetFrame(void) +{ + if (__pCorrespondFrame == null) + { + SysLog(NID_UI_SCENES, "WARNING! - Initialize error!. First GetInstance must call after set a FrameWindow."); + UiApp* pUiApp = UiApp::GetInstance(); + SysTryReturn(NID_UI_SCENES, pUiApp != null, null, E_SYSTEM, + "[%s] A system error has been occurred. UiApp::GetInstance failed.", GetErrorMessage(E_SYSTEM)); + Frame* pFrame = pUiApp->GetFrameAt(0); + SysTryReturn(NID_UI_SCENES, pFrame != null, null, E_SYSTEM, + "[%s] A system error has been occurred. pUiApp->GetFrameAt(0) return null.", GetErrorMessage(E_SYSTEM)); + __pCorrespondFrame = pFrame; + _ContainerImpl* pFrameWindowImpl = _ContainerImpl::GetInstance(*__pCorrespondFrame); + if (pFrameWindowImpl) + { + __correspondFrameControlHandle = pFrameWindowImpl->GetCore().GetHandle(); + } + } + return __pCorrespondFrame; +} + +bool +_SceneManagerImpl::IsAnimationCompleted(void) +{ + Frame* pFrame = GetFrame(); + SysTryReturn(NID_UI_SCENES, pFrame != null, true, E_SYSTEM, "[%s] A system error has been occurred. Cannot get Frame.", + GetErrorMessage(E_SYSTEM)); + FrameAnimator* pFrameAnimator = pFrame->GetFrameAnimator(); + + if (pFrameAnimator) + { + bool completed = (pFrameAnimator->GetStatus() == ANIMATOR_STATUS_STOPPED) ? true : false; + return completed; + } + return true; +} + +result +_SceneManagerImpl::SetInputEventEnableState(Tizen::Ui::Control& control, bool enableState) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(control); + SysTryReturnResult(NID_UI_SCENES, pControlImpl != null, E_SYSTEM, "A system error has been occurred. Cannot get _ControlImpl."); + _Control& controlCore = pControlImpl->GetCore(); + + if (enableState == false) + { + controlCore.LockInputEvent(); + } + else + { + controlCore.UnlockInputEvent(); + } + return E_SUCCESS; +} + +result +_SceneManagerImpl::GetSceneTransition(const SceneTransitionId& transitionId, SceneTransition& sceneTransition) const +{ + result r = E_SUCCESS; + SysTryReturnResult(NID_UI_SCENES, !transitionId.IsEmpty(), E_INVALID_ARG, + "Invalid argument is used. The transitionId is empty."); + + SceneTransition* pSceneTransition = null; + r = __transitionMap.GetValue(transitionId, pSceneTransition); + SysTryReturn(NID_UI_SCENES, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r)); + sceneTransition = *pSceneTransition; + + return r; +} + +result +_SceneManagerImpl::RegisterScene(xmlNodePtr pNode) +{ + static const char* pPropId = "Id"; + static const char* pPropFormId = "Form"; + static const char* pPropPanelId = "Panel"; + result r = E_SUCCESS; + _SceneDescription* pSceneDescription = null; + + SysTryReturn(NID_UI_SCENES, pNode != null, E_INVALID_ARG, E_INVALID_ARG, "[%s] Invalid argument is used. pNode is null.", + GetErrorMessage(E_INVALID_ARG)); + + xmlChar* pSceneId = xmlGetProp(pNode, reinterpret_cast(pPropId)); + if (pSceneId) + { + String strSceneId(reinterpret_cast(pSceneId)); + xmlFree(pSceneId); + + xmlChar* pFormId = xmlGetProp(pNode, reinterpret_cast(pPropFormId)); + if (pFormId) + { + String strFormId(reinterpret_cast(pFormId)); + xmlFree(pFormId); + + String strPanelId; + xmlChar* pPanelId = xmlGetProp(pNode, reinterpret_cast(pPropPanelId)); + if (pPanelId) + { + strPanelId = reinterpret_cast(pPanelId); + xmlFree(pPanelId); + } + + // Register a Scene item + bool isContains = false; + r = __sceneMap.ContainsKey(strSceneId, isContains); + SysTryReturn(NID_UI_SCENES, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturnResult(NID_UI_SCENES, !isContains, E_OBJ_ALREADY_EXIST, "Specified sceneId already exist."); + + pSceneDescription = new (std::nothrow) _SceneDescription(strFormId, strPanelId); + SysTryReturnResult(NID_UI_SCENES, pSceneDescription != null, E_OUT_OF_MEMORY, "Memory allocation failed."); + + r = __sceneMap.Add(strSceneId, pSceneDescription); + SysTryCatch(NID_UI_SCENES, !IsFailed(r), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + return r; + +CATCH: + delete pSceneDescription; + return r; +} + +result +_SceneManagerImpl::RegisterSceneTransition(xmlNodePtr pNode) +{ + static const xmlChar* pPropId = reinterpret_cast("Id"); + static const char* pPropDestinationSceneId = "TargetId"; + static const char* pPropDirectionType = "DirectionType"; + static const char* pPropAnimationType = "AnimationType"; + static const char* pPropHistoryOption = "HistoryOption"; + static const char* pPropDestroyOption = "DestroyOption"; + + static const String strValueDirectionForward(L"forward"); + static const String strValueDirectionBackward(L"backward"); + static const String strValueDirectionAdjacentBackward(L"adjacentBackward"); + static const String strValueAnimationType[] = {L"none", L"custom", L"left", L"right", L"fade_in_out", + L"zoom_in", L"zoom_out", L"depth_in", "depth_out"}; + static const String strValueHistoryOptionNoHistory(L"no"); + static const String strValueDestroyOptionKeep(L"keep"); + static const String strValueDestroyOptionDestroy(L"destroy"); + + static const SceneTransitionAnimationType valueAnimation[] = { + SCENE_TRANSITION_ANIMATION_TYPE_NONE, SCENE_TRANSITION_ANIMATION_TYPE_CUSTOM, + SCENE_TRANSITION_ANIMATION_TYPE_LEFT, SCENE_TRANSITION_ANIMATION_TYPE_RIGHT, + SCENE_TRANSITION_ANIMATION_TYPE_FADE_IN_OUT, SCENE_TRANSITION_ANIMATION_TYPE_ZOOM_IN, + SCENE_TRANSITION_ANIMATION_TYPE_ZOOM_OUT, SCENE_TRANSITION_ANIMATION_TYPE_DEPTH_IN, + SCENE_TRANSITION_ANIMATION_TYPE_DEPTH_OUT }; + + SceneTransition* pSceneTransition = null; + result r = E_SUCCESS; + SysTryReturn(NID_UI_SCENES, pNode != null, E_INVALID_ARG, E_INVALID_ARG, "[%s] Invalid argument is used. pNode is null.", + GetErrorMessage(E_INVALID_ARG)); + + xmlChar* pTransitionId = xmlGetProp(pNode, pPropId); + if (pTransitionId) + { + String strTransitionId(reinterpret_cast(pTransitionId)); + xmlFree(pTransitionId); + if (strTransitionId.GetLength() > 0) + { + xmlChar* pDirectionType = xmlGetProp(pNode, reinterpret_cast(pPropDirectionType)); + if (pDirectionType) + { + String strDirectionType(reinterpret_cast(pDirectionType)); + xmlFree(pDirectionType); + + // Mandatory item: transitionId, direction + // forward: destinationSceneId(mandatory), animationType, historyOption, destroyOption + // backward: destinationSceneId(mandatory), animationType, destroyOption [ Don't care: historyOption ] + // adjacentBackward: animationType, destroyOption [ Don't care: destinationSceneId, historyOption] + String strDestinationSceneId; + String strAnimationType; + String strHistoryOption; + String strDestroyOption; + SceneTransitionAnimationType animationType = SCENE_TRANSITION_ANIMATION_TYPE_NONE; + + // Get animationType and destroyOption (common property) + xmlChar* pAnimationType = xmlGetProp(pNode, reinterpret_cast(pPropAnimationType)); + if (pAnimationType) + { + strAnimationType = reinterpret_cast(pAnimationType); + xmlFree(pAnimationType); + if (strAnimationType.GetLength() > 0) + { + for (unsigned int i = 0; i < sizeof(valueAnimation)/sizeof(valueAnimation[0]); i++) + { // Consider to use map collection. + if (strAnimationType == strValueAnimationType[i]) + { + animationType = valueAnimation[i]; + break; + } + } + } + } + + xmlChar* pDestroyOption = xmlGetProp(pNode, reinterpret_cast(pPropDestroyOption)); + if (pDestroyOption) + { + strDestroyOption = reinterpret_cast(pDestroyOption); + xmlFree(pDestroyOption); + } + + // Compose SceneTransition + if (strDirectionType == strValueDirectionAdjacentBackward) // Adjacent backward + { + SceneDestroyOption destroyOption = SCENE_DESTROY_OPTION_DESTROY; // Default is destroy + if ((strDestroyOption.GetLength() > 0) && (strDestroyOption == strValueDestroyOptionKeep)) + { + destroyOption = SCENE_DESTROY_OPTION_KEEP; + } + + pSceneTransition = new (std::nothrow) BackwardSceneTransition(animationType, destroyOption); + SysTryReturnResult(NID_UI_SCENES, pSceneTransition != null, E_OUT_OF_MEMORY, "Memory allocation failed."); + r = __transitionMap.Add(strTransitionId, pSceneTransition); + SysTryCatch(NID_UI_SCENES, !IsFailed(r), , r, "[%s] Propagating.", GetErrorMessage(r)); + return r; + } + + // Get destinationSceneId + xmlChar* pDestinationSceneId = xmlGetProp(pNode, reinterpret_cast(pPropDestinationSceneId)); + if (pDestinationSceneId) + { + strDestinationSceneId = reinterpret_cast(pDestinationSceneId); + xmlFree(pDestinationSceneId); + } + SysTryReturn(NID_UI_SCENES, strDestinationSceneId.GetLength() > 0, E_INVALID_ARG, E_INVALID_ARG, + "[%s] Invalid argument is used. strDestinationSceneId is empty.", GetErrorMessage(E_INVALID_ARG)); + + if (strDirectionType == strValueDirectionBackward) // Backward + { + SceneDestroyOption destroyOption = SCENE_DESTROY_OPTION_DESTROY; // Default is destroy + if ((strDestroyOption.GetLength() > 0) && (strDestroyOption == strValueDestroyOptionKeep)) + { + destroyOption = SCENE_DESTROY_OPTION_KEEP; + } + + pSceneTransition = + new (std::nothrow) BackwardSceneTransition(strDestinationSceneId, animationType, destroyOption); + SysTryReturnResult(NID_UI_SCENES, pSceneTransition != null, E_OUT_OF_MEMORY, "Memory allocation failed."); + r = __transitionMap.Add(strTransitionId, pSceneTransition); + SysTryCatch(NID_UI_SCENES, !IsFailed(r), , r, "[%s] Propagating.", GetErrorMessage(r)); + return r; + } + + if (strDirectionType == strValueDirectionForward) // Forward + { + SceneDestroyOption destroyOption = SCENE_DESTROY_OPTION_KEEP; // Default is keep + if ((strDestroyOption.GetLength() > 0) && (strDestroyOption == strValueDestroyOptionDestroy)) + { + destroyOption = SCENE_DESTROY_OPTION_DESTROY; + } + + xmlChar* pHistoryOption = xmlGetProp(pNode, reinterpret_cast(pPropHistoryOption)); + if (pHistoryOption) + { + strHistoryOption = reinterpret_cast(pHistoryOption); + xmlFree(pHistoryOption); + } + SceneHistoryOption historyOption = SCENE_HISTORY_OPTION_ADD_HISTORY; // Default is add to history + if ((strHistoryOption.GetLength() > 0) && (strHistoryOption == strValueHistoryOptionNoHistory)) + { + historyOption = SCENE_HISTORY_OPTION_NO_HISTORY; + } + + pSceneTransition = new (std::nothrow) ForwardSceneTransition(strDestinationSceneId, animationType, + historyOption, destroyOption); + SysTryReturnResult(NID_UI_SCENES, pSceneTransition != null, E_OUT_OF_MEMORY, "Memory allocation failed."); + r = __transitionMap.Add(strTransitionId, pSceneTransition); + SysTryCatch(NID_UI_SCENES, !IsFailed(r), , r, "[%s] Propagating.", GetErrorMessage(r)); + return r; + } + else + { + SysLog(NID_UI_SCENES, "Unknown direction type!"); + } + } + } + } + return r; + +CATCH: + delete pSceneTransition; + return r; +} + +result +_SceneManagerImpl::StopAllAnimations(void) +{ + Frame* pFrame = GetFrame(); + SysTryReturnResult(NID_UI_SCENES, pFrame != null, E_SYSTEM, "A system error has been occurred. Cannot get Frame."); + FrameAnimator* pFrameAnimator = pFrame->GetFrameAnimator(); + SysTryReturnResult(NID_UI_SCENES, pFrameAnimator != null, E_SYSTEM, "A system error has been occurred. Cannot get FrameAnimator."); + pFrameAnimator->StopAllAnimations(); + if (!__destroyReservedScene.IsEmpty()) + { + DestroyScene(__destroyReservedScene); + __destroyReservedScene.Clear(); + } + return E_SUCCESS; +} + +} } } // Tizen::Ui::Scenes diff --git a/src/ui/scenes/FUiScenes_SceneManagerImpl.h b/src/ui/scenes/FUiScenes_SceneManagerImpl.h new file mode 100644 index 0000000..e8b7ffb --- /dev/null +++ b/src/ui/scenes/FUiScenes_SceneManagerImpl.h @@ -0,0 +1,219 @@ +// +// 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 FUiScenes_SceneManagerImpl.h + * @brief This is the header file of the _SceneManagerImpl class. + * + * This header file contains the declarations of the _SceneManagerImpl class. + */ + +#ifndef _FUI_SCENES_INTERNAL_SCENE_MANAGER_IMPL_H_ +#define _FUI_SCENES_INTERNAL_SCENE_MANAGER_IMPL_H_ + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "FUiScenes_ISceneControlEventListener.h" +#include "FUiScenes_SceneControlEvent.h" + + +namespace Tizen { namespace Ui { namespace Scenes +{ + +class SceneTransition; + +class _SceneManagerImpl + : public Tizen::Base::Object + , virtual public Tizen::Ui::Animations::IFrameAnimatorEventListener + , virtual public Tizen::Ui::Animations::IAnimationTransactionEventListener + , virtual public _ISceneControlEventListener +{ +public: + _SceneManagerImpl(void); + virtual ~_SceneManagerImpl(void); + result Construct(void); + + result RegisterFormFactory(const IFormFactory& formFactory); + result RegisterPanelFactory(const IPanelFactory& panelFactory); + result RegisterScene(const SceneId& sceneId, const Tizen::Base::String& formId, const Tizen::Base::String& panelId); + result RegisterScene(const Tizen::Base::String& resourceId); + result UnregisterScene(const SceneId& sceneId); + result AddSceneManagerEventListener(ISceneManagerEventListener& sceneManagerEventListener); + result RemoveSceneManagerEventListener(ISceneManagerEventListener& sceneManagerEventListener); + result AddSceneEventListener(const SceneId& sceneId, ISceneEventListener& sceneEventListener); + result RemoveSceneEventListener(const SceneId& sceneId, ISceneEventListener& sceneEventListener); + result SetSceneAnimationProvider(const SceneId& sceneId, ISceneAnimationProvider* pSceneAnimationProvider); + result SetSceneTransitionPolicyProvider(ISceneTransitionPolicyProvider* pSceneTransitionPolicyProvider); + result SetFormTransitionAnimationDefaultValues(SceneTransitionAnimationType animationType, long duration, + Tizen::Ui::Animations::AnimationInterpolatorType interpolatorType); + result GoForward(const ForwardSceneTransition& sceneTransition, const Tizen::Base::Collection::IList* pArgs = null); + result GoForward(const SceneTransitionId& transitionId, const Tizen::Base::Collection::IList* pArgs = null); + result GoBackward(const BackwardSceneTransition& sceneTransition, const Tizen::Base::Collection::IList* pArgs = null); + result GoBackward(const SceneTransitionId& transitionId, const Tizen::Base::Collection::IList* pArgs = null); + Scene* GetCurrentScene(void) const; + SceneId GetCurrentSceneId(void) const; + bool IsSceneAlive(const SceneId& sceneId) const; + result DestroyScene(const SceneId& sceneId); + result BringCurrentSceneToTop(void); + result ClearSceneHistory(void); + result AddToSceneHistory(const SceneId& sceneId); + Tizen::Base::Collection::IListT* GetSceneHistoryN(void) const; + + // + // Gets the implementation. + // + // @return The implementation + // @param[in] The interface instance pointer + // @since 2.0 + // + static _SceneManagerImpl* GetInstance(SceneManager& pSceneManager); + + // + // Gets the implementation. + // + // @return The implementation + // @param[in] The interface instance pointer + // @since 2.0 + // + static const _SceneManagerImpl* GetInstance(const SceneManager& pSceneManager); + + // Event handelers to asynchronous destroy the Scene. + virtual void OnFormTransitionAnimationFinished(Tizen::Ui::Animations::FrameAnimator &source, Tizen::Ui::Controls::Frame &frame, + Tizen::Ui::Controls::Form &form1, Tizen::Ui::Controls::Form &form2); + virtual void OnFormTransitionAnimationStarted(Tizen::Ui::Animations::FrameAnimator &source, Tizen::Ui::Controls::Frame &frame, + Tizen::Ui::Controls::Form &form1, Tizen::Ui::Controls::Form &form2); + virtual void OnFormTransitionAnimationStopped(Tizen::Ui::Animations::FrameAnimator &source, Tizen::Ui::Controls::Frame &frame, + Tizen::Ui::Controls::Form &form1, Tizen::Ui::Controls::Form &form2); + virtual void OnAnimationTransactionFinished(int transactionId); + virtual void OnAnimationTransactionStarted(int transactionId); + virtual void OnAnimationTransactionStopped(int transactionId); + virtual void OnSceneControlEventReceived(_SceneControlEventArg::SceneControlEventType eventType, const SceneId& sceneId); + + // Internal operations + Scene* GetScene(SceneId& sceneId); + Tizen::Base::Collection::IListT* GetLiveSceneN(void) const; + +private: + _SceneManagerImpl(const Scene& rhs); + _SceneManagerImpl& operator =(const Scene& rhs); + + result GotoScene(bool forward, const SceneId& sceneId, SceneTransitionAnimationType animationType, + SceneHistoryOption historyOption, SceneDestroyOption destroyOption, + const Tizen::Base::Collection::IList* pArgs); + // Container query set + Scene* GetSceneFromContainer(const SceneId& sceneId) const; + Tizen::Ui::Controls::Form* GetFormFromContainer(const Tizen::Base::String& formId); + // Add to container set + void AddSceneToContainer(const SceneId& sceneId, Scene* pScene); + void RemoveSceneFromContainer(const SceneId& sceneId); + void AddFormToContainer(const Tizen::Base::String& formId, Tizen::Ui::Controls::Form* pForm); + void RemoveFormFromFormContainer(const Tizen::Base::String& formId); + void AddPanelToPanelContainer(Scene* pScene); + void RemovePanelFromPanelContainer(Scene* pScene); + + void UpdateCurrentScene(Scene* pScene); + result AddHistory(const SceneId& sceneId); + + // Panel Scene transition assister + void SwitchToPanel(const Tizen::Base::String& formId, Tizen::Ui::Controls::Panel* pPanel, bool useAnimator = false); + + void AddControlToFrame(Tizen::Ui::Controls::Form& form, bool useAnimator = false); + void RemoveControlFromFrame(Tizen::Ui::Controls::Form& form); + result SetCurrentForm(Tizen::Ui::Controls::Form& form, bool useAnimator = false); + Tizen::Ui::Controls::Form* GetCurrentForm(void); + void AddControlToForm(Tizen::Ui::Controls::Form& baseForm, const Tizen::Ui::Controls::Panel& panel); + void RemoveControlFromForm(Tizen::Ui::Controls::Form& baseForm, const Tizen::Ui::Controls::Panel& panel); + void SetShowState(Tizen::Ui::Controls::Panel& targetPanel, bool state); + void DrawForm(Tizen::Ui::Controls::Form& form); + // Listener, Strategy - calling sub method. + bool CallListenerOnSceneTransitionStarted(const SceneId& currentSceneId, const SceneId& nextSceneId); + bool CallListenerOnSceneTransitionCompleted(const SceneId& previousSceneId, const SceneId& currentSceneId); + bool CallListenerPrepareAnimation(Tizen::Ui::Scenes::Scene& scene, const SceneId& sceneId, Tizen::Base::Collection::IList* pArgs, + SceneTransitionAnimationType type, bool formTransition); + bool CallListenerOnSceneActivatedN(Tizen::Ui::Scenes::Scene& scene, const SceneId& previousSceneId, + const SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs); + bool CallListenerOnSceneDeactivated(Tizen::Ui::Scenes::Scene& scene, const SceneId& currentSceneId, + const SceneId& nextSceneId); + SceneId CallStretegyGetNextScene(const SceneId& currentSceneId, const Tizen::Base::Collection::IList* pArgs); + void DestroySceneAsync(const SceneId& sceneId); + void ReserveDestroyingScene(const SceneId& sceneId); + void DestroyReservedScene(void); + void DestroySiblingPanelScene(const SceneId& sceneId); + Tizen::Ui::Controls::Frame* GetFrame(void); + bool IsAnimationCompleted(void); + result SetInputEventEnableState(Tizen::Ui::Control& control, bool enableState); + result GetSceneTransition(const SceneTransitionId& transitionId, SceneTransition& sceneTransition) const; + result RegisterScene(xmlNodePtr pNode); + result RegisterSceneTransition(xmlNodePtr pNode); + result StopAllAnimations(void); + +private: + SceneId __currentSceneId; + Scene* __pCurrentScene; + Tizen::Base::Collection::LinkedListT __sceneManagerEventListenerList; + Tizen::Base::Collection::HashMapT __sceneContainer; + Tizen::Base::Collection::HashMapT __formContainer; + Tizen::Base::Collection::MultiHashMapT __formToPanelMultiMap; + Tizen::Base::Collection::LinkedListT __sceneHistory; + + IFormFactory* __pFormFactory; + IPanelFactory* __pPanelFactory; + ISceneTransitionPolicyProvider* __pPolicyProvider; + + struct _AnimationDescription + { + Tizen::Ui::Animations::FrameAnimatorFormTransitionAnimation animationType; + long duration; + Tizen::Ui::Animations::AnimationInterpolatorType interpolatorType; + }; + _AnimationDescription __animationDescriptions[Tizen::Ui::Animations::FRAME_ANIMATOR_FORM_TRANSITION_ANIMATION_MAX]; + + class _SceneDescription + { + public: + _SceneDescription(const Tizen::Base::String& descriptionFormId, const Tizen::Base::String& descriptionPanelId); + const Tizen::Base::String formId; + const Tizen::Base::String panelId; + }; + Tizen::Base::Collection::HashMapT __sceneMap; + Tizen::Base::Collection::HashMapT __transitionMap; + Tizen::Base::Collection::HashMapT __formIdMap; + + _SceneControlEvent __sceneControlEvent; + SceneId __destroyReservedScene; + Tizen::Ui::Controls::Frame* __pCorrespondFrame; + Tizen::Ui::_ControlHandle __correspondFrameControlHandle; + bool __sceneTransitionProgressing; + Tizen::Base::Runtime::Mutex __sceneTransitionMutex; + Tizen::Ui::Controls::Form* __pDisabledForm; + SceneId __destroyPendingScene; + +}; // _SceneManagerImpl +} } } // Tizen::Ui::Scenes + +#endif // _FUI_SCENES_INTERNAL_SCENE_MANAGER_IMPL_H_ diff --git a/src/ui/scenes/FUiScenes_SceneTransitionImpl.cpp b/src/ui/scenes/FUiScenes_SceneTransitionImpl.cpp new file mode 100644 index 0000000..35faafe --- /dev/null +++ b/src/ui/scenes/FUiScenes_SceneTransitionImpl.cpp @@ -0,0 +1,201 @@ +// +// 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. +// + +#include +#include +#include "FUiScenes_SceneTransitionImpl.h" + +using namespace Tizen::Base; + +namespace Tizen { namespace Ui { namespace Scenes +{ + +_SceneTransitionImpl::_SceneTransitionImpl(void) + : __direction(SCENE_TRANSITION_DIRECTION_FORWARD) + , __destinationSceneId("") + , __animationType(SCENE_TRANSITION_ANIMATION_TYPE_NONE) + , __historyOption(SCENE_HISTORY_OPTION_ADD_HISTORY) + , __destroyOption(SCENE_DESTROY_OPTION_KEEP) +{ + +} + +_SceneTransitionImpl::_SceneTransitionImpl(const _SceneTransitionImpl& rhs) + : __direction(rhs.__direction) + , __destinationSceneId(rhs.__destinationSceneId) + , __animationType(rhs.__animationType) + , __historyOption(rhs.__historyOption) + , __destroyOption(rhs.__destroyOption) +{ + +} + +_SceneTransitionImpl::_SceneTransitionImpl(SceneTransitionDirection direction, const SceneId& destinationSceneId, + SceneTransitionAnimationType animationType, + SceneHistoryOption historyOption, SceneDestroyOption destroyOption) + : __direction(direction) + , __destinationSceneId(destinationSceneId) + , __animationType(animationType) + , __historyOption(historyOption) + , __destroyOption(destroyOption) +{ + +} + +_SceneTransitionImpl +_SceneTransitionImpl::operator=(const _SceneTransitionImpl& rhs) +{ + if (this != &rhs) + { + __direction = rhs.__direction; + __destinationSceneId = rhs.__destinationSceneId; + __animationType = rhs.__animationType; + __historyOption = rhs.__historyOption; + __destroyOption = rhs.__destroyOption; + } + return *this; +} + +bool +_SceneTransitionImpl::Equals(const _SceneTransitionImpl& rhs) const +{ + return ((__direction == rhs.__direction) && + (__destinationSceneId == rhs.__destinationSceneId) && + (__animationType == rhs.__animationType) && + (__historyOption == rhs.__historyOption) && + (__destroyOption == rhs.__destroyOption)); +} + +int +_SceneTransitionImpl::GetHashCode(void) const +{ + String hashMaker; + Integer intValue; + + intValue = Integer(static_cast(__direction)); + hashMaker += intValue.ToString(); + + hashMaker += __destinationSceneId; + + intValue = Integer(static_cast(__animationType)); + hashMaker += intValue.ToString(); + + intValue = Integer(static_cast(__historyOption)); + hashMaker += intValue.ToString(); + + intValue = Integer(static_cast(__destroyOption)); + hashMaker += intValue.ToString(); + + return hashMaker.GetHashCode(); +} + +_SceneTransitionImpl::~_SceneTransitionImpl(void) +{ + // Nothing to do. +} + +result +_SceneTransitionImpl::SetDirection(SceneTransitionDirection direction) +{ + SysTryReturnResult(NID_UI_SCENES, + ((direction == SCENE_TRANSITION_DIRECTION_FORWARD) || (direction == SCENE_TRANSITION_DIRECTION_BACKWARD)), + E_INVALID_ARG, "Invalid argument is used."); + __direction = direction; + return E_SUCCESS; +} + +SceneTransitionDirection +_SceneTransitionImpl::GetDirection(void) const +{ + return __direction; +} + +result +_SceneTransitionImpl::SetDestinationSceneId(const SceneId& sceneId) +{ + SysTryReturnResult(NID_UI_SCENES, (sceneId.GetLength()>0), E_INVALID_ARG, "Invalid argument is used."); + __destinationSceneId = sceneId; + return E_SUCCESS; +} + +SceneId +_SceneTransitionImpl::GetDestinationSceneId(void) const +{ + return __destinationSceneId; +} + +result +_SceneTransitionImpl::SetAnimationType(SceneTransitionAnimationType animationType) +{ + SysTryReturnResult(NID_UI_SCENES, (SCENE_TRANSITION_ANIMATION_TYPE_NONE <= animationType && + animationType <= SCENE_TRANSITION_ANIMATION_TYPE_DEPTH_OUT), + E_INVALID_ARG, "Invalid argument is used."); + __animationType = animationType; + return E_SUCCESS; +} + +SceneTransitionAnimationType +_SceneTransitionImpl::GetAnimationType(void) const +{ + return __animationType; +} + +result +_SceneTransitionImpl::SetHistoryOption(SceneHistoryOption historyOption) +{ + SysTryReturnResult(NID_UI_SCENES, + ((historyOption == SCENE_HISTORY_OPTION_ADD_HISTORY) || (historyOption == SCENE_HISTORY_OPTION_NO_HISTORY)), + E_INVALID_ARG, "Invalid argument is used."); + __historyOption = historyOption; + return E_SUCCESS; +} + +SceneHistoryOption +_SceneTransitionImpl::GetHistoryOption(void) const +{ + return __historyOption; +} + +result +_SceneTransitionImpl::SetDestroyOption(SceneDestroyOption destroyOption) +{ + SysTryReturnResult(NID_UI_SCENES, + ((destroyOption == SCENE_DESTROY_OPTION_KEEP) || (destroyOption == SCENE_DESTROY_OPTION_DESTROY)), + E_INVALID_ARG, "Invalid argument is used."); + __destroyOption = destroyOption; + return E_SUCCESS; +} + +SceneDestroyOption +_SceneTransitionImpl::GetDestroyOption(void) const +{ + return __destroyOption; +} + +_SceneTransitionImpl* +_SceneTransitionImpl::GetInstance(SceneTransition& scene) +{ + return scene.__pSceneTransitionImpl; +} + +const _SceneTransitionImpl* +_SceneTransitionImpl::GetInstance(const SceneTransition& scene) +{ + return scene.__pSceneTransitionImpl; +} + +} } } // Tizen::Ui::Scenes diff --git a/src/ui/scenes/FUiScenes_SceneTransitionImpl.h b/src/ui/scenes/FUiScenes_SceneTransitionImpl.h new file mode 100644 index 0000000..9070212 --- /dev/null +++ b/src/ui/scenes/FUiScenes_SceneTransitionImpl.h @@ -0,0 +1,88 @@ +// +// 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 FUiScenes_SceneTransitionImpl.h + * @brief This is the header file of the _SceneTransitionImpl class. + * + * This header file contains the declarations of the _SceneTransitionImpl class. + */ + + +#ifndef _FUI_SCENES_INTERNAL_SCENE_TRANSITION_IMPL_H_ +#define _FUI_SCENES_INTERNAL_SCENE_TRANSITION_IMPL_H_ + +#include + +namespace Tizen { namespace Ui { namespace Scenes +{ + +class _SceneTransitionImpl + : public Tizen::Base::Object +{ + +public: + _SceneTransitionImpl(void); + _SceneTransitionImpl(const _SceneTransitionImpl& rhs); + _SceneTransitionImpl(SceneTransitionDirection direction, const SceneId& destinationSceneId, + SceneTransitionAnimationType animationType, + SceneHistoryOption historyOption, SceneDestroyOption destroyOption); + _SceneTransitionImpl operator=(const _SceneTransitionImpl& rhs); + virtual bool Equals(const _SceneTransitionImpl& rhs) const; + virtual int GetHashCode(void) const; + virtual ~_SceneTransitionImpl(void); + + result SetDirection(SceneTransitionDirection direction); + SceneTransitionDirection GetDirection(void) const; + result SetDestinationSceneId(const SceneId& sceneId); + SceneId GetDestinationSceneId(void) const; + result SetAnimationType(SceneTransitionAnimationType animationType); + SceneTransitionAnimationType GetAnimationType(void) const; + result SetHistoryOption(SceneHistoryOption historyOption); + SceneHistoryOption GetHistoryOption(void) const; + result SetDestroyOption(SceneDestroyOption destroyOption); + SceneDestroyOption GetDestroyOption(void) const; + + // + // Gets the implementation. + // + // @return The implementation + // @param[in] The interface instance pointer + // @since 2.0 + // + static _SceneTransitionImpl* GetInstance(SceneTransition& scene); + + // + // Gets the implementation. + // + // @return The implementation + // @param[in] The interface instance pointer + // @since 2.0 + // + static const _SceneTransitionImpl* GetInstance(const SceneTransition& scene); + +private: + SceneTransitionDirection __direction; + SceneId __destinationSceneId; + SceneTransitionAnimationType __animationType; + SceneHistoryOption __historyOption; + SceneDestroyOption __destroyOption; + +}; // _SceneTransitionImpl +} } } // Tizen::Ui::Scenes + +#endif // _FUI_SCENES_INTERNAL_SCENE_TRANSITION_IMPL_H_ diff --git a/src/uifw/CMakeLists.txt b/src/uifw/CMakeLists.txt new file mode 100644 index 0000000..5cecd0f --- /dev/null +++ b/src/uifw/CMakeLists.txt @@ -0,0 +1,127 @@ +SET (this_target osp-uifw) + +INCLUDE_DIRECTORIES ( + ${SLP_INCLUDE_DIRS} + ${CMAKE_SOURCE_DIR}/inc + ${CMAKE_SOURCE_DIR}/src/app/inc + ${CMAKE_SOURCE_DIR}/src/graphics/inc + ${CMAKE_SOURCE_DIR}/src/ui + ${CMAKE_SOURCE_DIR}/src/ui/inc + ${CMAKE_SOURCE_DIR}/src/ui/controls + /usr/include/osp + /usr/include/osp/app + /usr/include/osp/base + /usr/include/osp/media + /usr/include/osp/system + ) + +SET (${this_target}_SOURCE_FILES + ${CMAKE_SOURCE_DIR}/src/app/FAppUiApp.cpp + ${CMAKE_SOURCE_DIR}/src/app/FApp_UiAppImpl.cpp + ${CMAKE_SOURCE_DIR}/src/app/FApp_AppFrame.cpp + ${CMAKE_SOURCE_DIR}/src/app/FApp_AppResourceBitmap.cpp + ${CMAKE_SOURCE_DIR}/src/app/FApp_AppResourceBitmapUtil.cpp + ${CMAKE_SOURCE_DIR}/src/app/FApp_CoordinateInfo.cpp + ${CMAKE_SOURCE_DIR}/src/app/FApp_ThemeInfo.cpp + ) + +SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -Wall" ) + +## SET C COMPILER FLAGS +SET(CMAKE_C_FLAGS "${OSP_DEBUG_FLAGS} ${OSP_OPT_FLAGS} ${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} ${OSP_COMPILER_FLAGS}") + +## SET CPP COMPILER FLAGS +SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden") +SET(CMAKE_CXX_FLAGS "${OSP_DEBUG_FLAGS} ${OSP_OPT_FLAGS} ${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS} ${OSP_COMPILER_FLAGS}") + +## Create Library +ADD_LIBRARY (${this_target} SHARED ${${this_target}_SOURCE_FILES}) + +SET(STATIC_LIBS ui graphics opengl) + +ADD_DEPENDENCIES(${this_target} ${STATIC_LIBS}) + +MACRO(OSP_ADD_OBJS_IN_ARCHIVE archives) + SET(LINK_OBJECTS_IN_ARCHIVE) + FOREACH(archive ${ARGV}) + SET(LINK_OBJECTS_IN_ARCHIVE "${LINK_OBJECTS_IN_ARCHIVE} -l${archive}") + ENDFOREACH(archive) + SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--whole-archive ${LINK_OBJECTS_IN_ARCHIVE} -Wl,-no-whole-archive") +ENDMACRO(OSP_ADD_OBJS_IN_ARCHIVE) + +OSP_ADD_OBJS_IN_ARCHIVE(${STATIC_LIBS}) + +SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined -Wl,--as-needed") + +TARGET_LINK_LIBRARIES( ${this_target} ${STATIC_LIBS}) +TARGET_LINK_LIBRARIES(${this_target} "-L/usr/lib/osp -losp-appfw" ) +TARGET_LINK_LIBRARIES(${this_target} "-losp-image-core" ) +TARGET_LINK_LIBRARIES(${this_target} "-lcapi-appfw-application" ) +TARGET_LINK_LIBRARIES(${this_target} "-lappcore-common" ) +TARGET_LINK_LIBRARIES(${this_target} "-lappcore-efl" ) +TARGET_LINK_LIBRARIES(${this_target} "-lappsvc" ) +TARGET_LINK_LIBRARIES(${this_target} "-lsensor" ) +TARGET_LINK_LIBRARIES(${this_target} "-lelementary" ) +TARGET_LINK_LIBRARIES(${this_target} "-lX11" ) +TARGET_LINK_LIBRARIES(${this_target} "-lXdamage" ) +TARGET_LINK_LIBRARIES(${this_target} "-lvconf" ) +TARGET_LINK_LIBRARIES(${this_target} "-ldlog" ) +TARGET_LINK_LIBRARIES(${this_target} "-lpthread" ) +TARGET_LINK_LIBRARIES(${this_target} "-lecore" ) +TARGET_LINK_LIBRARIES(${this_target} "-levas" ) +TARGET_LINK_LIBRARIES(${this_target} "-leina" ) +TARGET_LINK_LIBRARIES(${this_target} "-lecore_evas" ) +TARGET_LINK_LIBRARIES(${this_target} "-lecore_x" ) +TARGET_LINK_LIBRARIES(${this_target} "-lecore_imf" ) +TARGET_LINK_LIBRARIES(${this_target} "-lecore_imf_evas" ) +TARGET_LINK_LIBRARIES(${this_target} "-lecore_input" ) +TARGET_LINK_LIBRARIES(${this_target} "-lxml2" ) +TARGET_LINK_LIBRARIES(${this_target} "-lfontconfig" ) +TARGET_LINK_LIBRARIES(${this_target} "-lcairo" ) +TARGET_LINK_LIBRARIES(${this_target} "-lpixman-1" ) +TARGET_LINK_LIBRARIES(${this_target} "-licuuc" ) +TARGET_LINK_LIBRARIES(${this_target} "-lpangocairo-1.0" ) +TARGET_LINK_LIBRARIES(${this_target} "-lgobject-2.0" ) +TARGET_LINK_LIBRARIES(${this_target} "-lpango-1.0" ) +TARGET_LINK_LIBRARIES(${this_target} "-lglib-2.0" ) +TARGET_LINK_LIBRARIES(${this_target} "-lfreetype" ) +TARGET_LINK_LIBRARIES(${this_target} "-lfribidi" ) +TARGET_LINK_LIBRARIES(${this_target} "-lharfbuzz" ) +TARGET_LINK_LIBRARIES(${this_target} "-ldl" ) +TARGET_LINK_LIBRARIES(${this_target} "-lXext" ) +TARGET_LINK_LIBRARIES(${this_target} "-lEGL" ) +TARGET_LINK_LIBRARIES(${this_target} "-lXv" ) +TARGET_LINK_LIBRARIES(${this_target} "-ltts" ) +TARGET_LINK_LIBRARIES(${this_target} "-lfeedback" ) +IF (NOT OSP_EMUL) +TARGET_LINK_LIBRARIES(${this_target} "-ldri2" ) +TARGET_LINK_LIBRARIES(${this_target} "-ldrm" ) +TARGET_LINK_LIBRARIES(${this_target} "-ltbm" ) +ENDIF (NOT OSP_EMUL) +TARGET_LINK_LIBRARIES(${this_target} "-llua" ) +TARGET_LINK_LIBRARIES(${this_target} "-ltolua++" ) +TARGET_LINK_LIBRARIES(${this_target} "-lcapi-system-runtime-info") +TARGET_LINK_LIBRARIES(${this_target} "-lutilX" ) +TARGET_LINK_LIBRARIES(${this_target} "-lXtst" ) +TARGET_LINK_LIBRARIES(${this_target} "-lchromium" ) + +SET_TARGET_PROPERTIES(${this_target} + PROPERTIES + VERSION ${FULLVER} + SOVERSION ${MAJORVER} + CLEAN_DIRECT_OUTPUT 1 +) +ADD_CUSTOM_COMMAND(TARGET ${this_target} + POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy ${LIBRARY_OUTPUT_PATH}/${CMAKE_SHARED_LIBRARY_PREFIX}${this_target}${CMAKE_SHARED_LIBRARY_SUFFIX} ${LIBRARY_OUTPUT_PATH}/debug/${CMAKE_SHARED_LIBRARY_PREFIX}${this_target}${CMAKE_SHARED_LIBRARY_SUFFIX}.${FULLVER} + COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_SHARED_LIBRARY_PREFIX}${this_target}${CMAKE_SHARED_LIBRARY_SUFFIX}.${FULLVER} ${LIBRARY_OUTPUT_PATH}/debug/${CMAKE_SHARED_LIBRARY_PREFIX}${this_target}${CMAKE_SHARED_LIBRARY_SUFFIX}.${MAJORVER} + COMMAND ${CMAKE_STRIP} --strip-unneeded ${LIBRARY_OUTPUT_PATH}/${CMAKE_SHARED_LIBRARY_PREFIX}${this_target}${CMAKE_SHARED_LIBRARY_SUFFIX} + COMMENT "strip ${this_target}" +) + +SET(PC_NAME ${this_target}) +SET(PC_REQUIRED ${pc_requires}) +SET(PC_LDFLAGS -l${this_target}) + +# pkgconfig file +CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/${this_target}.pc.in ${CMAKE_SOURCE_DIR}/${this_target}.pc @ONLY) diff --git a/sysinfo-screen.xml b/sysinfo-screen.xml new file mode 100644 index 0000000..e9789cc --- /dev/null +++ b/sysinfo-screen.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/sysinfo-touch.xml b/sysinfo-touch.xml new file mode 100644 index 0000000..b8cc330 --- /dev/null +++ b/sysinfo-touch.xml @@ -0,0 +1,6 @@ + + + + + + -- 2.7.4

c9t*k}~PR zIzRLtpX&SfbusGY<>edQHD6cE6sEPaWARt3)h_@Z0X)dc-yjH5&iP2k@*_!L=>;@d z`bX97@AC383xeS9tE;Pml#|Nf1Id8vbA!IQxycTUn#kNfkmS?igwUdU%fJ_&=Y4m3 zd;8}BH~{#EIe(}LpY_?&lz~1xJUlFDYyM@;cLI^6kMPFOaU3s>+;3EKHc$)iOCr5% z3CXRe8qhNUzsGUBZgao7@OcN&_Zt5@1Moq^6LZO2$_lTm;^a5W&|<}BZ22zbFQ|{j zOreeBlV(@!O zHCI6KXiWv5LEZ*(Dh2ooaA4n@RJPsECy<}vMcB83brl3dnokCvFvgTyW8K4ynL+^p z-B9G%%_n4W**;^<7}IJ?)rBviZb7Mn&%J|6Fv9*UUsYnS8Dn$ZK~0+wJ&m;{ZXcJ> z>%Np#Y?0=YG6Dz84=^ha&{2Sx4m05@YEr1!dmCyhSS-pCQ|&f6y)ChC2Amk|^g>6Q zqLR{aqaMIEN7o5WIz3Ujo1$f#Yuj`C4EtW&JMw}qPJ0SL@vX$xLyHBiyRkzhQ~`8t zYrvu9^|!!(ZDG~rwX||dz}6p@4jrz?^dQ*z`2TO~j)4{gnG2c0nOuDSE$wIc*C+oB Y02j?R07*qoM6N<$g1VY`ZU6uP literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_list_process_17.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_list_process_17.png new file mode 100644 index 0000000000000000000000000000000000000000..8eaac31b2a66e221ccf588c9e5ff76e372cd54b2 GIT binary patch literal 3954 zcmV-&4~_7NP)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{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{tj}8v-g>x_*OEsWO{4z zyDpVb1W;=WDnrZux284`+Nk9y#{_JBv$U%nn^-W*B61he+?6P#$O0)|{*{q+=|6)X h|E2u_|Ni8^0RWE-aYSH{g0%nu002ovPDHLkV1n&*m!JRu literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_list_process_20.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_list_process_20.png new file mode 100644 index 0000000000000000000000000000000000000000..cbfeee0f475de3848332cf0fe8ce479278b325f6 GIT binary patch literal 4015 zcmV;g4^Z%lP)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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;mqRr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~qT!IIRws_p8v6)E#f^N4v5#-n_xVzI^Jc<_8ATyEIRq$LiYuDG;zuw*5{ao{} zHx8A(*oY*m=5i<=t*KhtWi|Y7Zf>IWdOZ**`)h~FE&~TX@6F+x_VbgXCceGB^;fIa zZ`B`kI-Q&S{e4&9A%H&>;8S{fW8`MW6@YBDT78w{p6Bu7xg;^osO~*cvE-)$WBg9 z1{z}X#rhk^@e&Wu&vU^NTHbpbYMj5iEKi!wZkxTg9KbsY!$AX)3N7eBu^hMB1GveS z^9c<)!sFa~UlMrhO0r|%0xt3J0)UIX_jzgJH!@SNnM^6~29WRM+QbS0HC8%z4CmjJ zj(+LrZRq6%EWKf6>(#PFDJ+AMdi!{Ix2_H}C&;X{GFY>nAMeusfPZ@S{{YJvY#&oo R)<6IN002ovPDHLkV1lyJssI20 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_list_process_30.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_list_process_30.png new file mode 100644 index 0000000000000000000000000000000000000000..6566bf3d59b61883afa687d98457fa26c63b6bb5 GIT binary patch literal 4006 zcmV;X4_WYuP)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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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{I-fvKE40kJ^!-*2Gi=C&fcyJI3~hk_9l+luA+^TynO`T; zYw+4GfgUl9$lD+Yl6|p!$^fYv-(MNv9{{{=5V$ZQLdTFLtAL+Ue2bEl`Ev`d-Zvpa zQ_Bm(O+V2pi|^81W{H(n`H{qEUxd%?KU2*5u~8hcBtEh#;8 zrMjQBd|Kh6?$clqrIgEn-Q!Bz^{qXyU5=ohUJYdpBBaV-QC@<0N#|ic|x&0@2F;R8QzJcl&NWj7jA3u z_V#vke}Df|$^X{`eBEKGK4yMfRw-{oit+yA<75Bk=H{1&hX=uxsp$5YYrw_&Hp}Z8 zo0Jp)4e$?L5L*Ekac%LuPFEKKNQ!_vj+369o&DBjN0uvNCrk|zmRVf~J_Rs$9Opko zaddPPUtC;#JU>701wkCcX93CDf0B~}05?)?jemp)t&a~-w zqySd~9C#j1Vo!8Tr?K8?Hj2^SV`~BZ@Z&;CseQs^dXh5(e~9Ukg8YWvd`uSSfUiw} zR{?J_iII`d6!r&@ed;50GrnsnrE!r}bqLWVm-7s+9aF|InZD#Iwjs>sdn*CwiX1Qu zIx`@f?fkpRt)zq-^0T+XP{H}Myr`<(ItQ33o`(U)FdsD+Xl52ar6Q)*4B#%Ow+q^I zg6apHHe^GG#@rd3dnF3VvOtV)Z)G%EF&_MQm-YwvmnZ)Y04B?E9w+||CjbBd M07*qoM6N<$g80UMQ2+n{ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_more_popup_press.#.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_more_popup_press.#.png new file mode 100644 index 0000000000000000000000000000000000000000..c08eb05dc4035efffe6128407a1b8125fc37ebb7 GIT binary patch literal 2978 zcmV;T3tjYyP)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^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cn0~@{;M1& literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_option_panel_handle_bg_ef.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_option_panel_handle_bg_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..26652a72a4733842cacc29e9456dc9eebf99ccb7 GIT binary patch literal 3693 zcmai$XE5At+s6NHy^9(|qL)=x7oA*b@vuO5~ABv z!2>|QTCUEH2I13s2%JDYFBtAy*Y~Z zQUQQf-_WsZA#fc_m^@LK$8{0U0fFmd@&dn;M3-7>m3p9HXWsnS>u)ydg>M_@<~BDr zW_5ZX)((T_A=mIOyAJcKXJ?@bmnXQDwl(f>aoccBg430*Z@=}5?~T4AjdEPrO3}P* zAiud}o8auxc5Ji&(XSiRdMB&pBpr(vbH+p73H0)e-#l4c7P`P!T9yJnJypUBN);}% zb;AFn%SU73+p%^607uQ9os;||_+hS*tE2umhssx)1w25Qi}pKj0C=p%Edm>?Q|>1L z0JVZ}&?i;a-<@}bI*9Id5-xO-U)oDYLAZOmAT$uNCt>$q*b7udK=@;ZKe2)A!ILU% zk{!mbF=<{@B3))*s1&`Z&mBneJNa9}NeNU3Na!3m=Hu`j6D+urNtm*uPdPfZ2xt?z z*}ulo8*}QWN@XW-Kk*gINntF={r=)Ji(-;=;r4g5EA@Pe60~2mK&xg1pW|qhx@8p7J3#2vsz{B_qZkR%#+HH;zt>G z@o}b=>3-&Ix^vcZ*HK(7)4)7Rw4@ccfCRAeDs}lWODGGCE1W9NFPWMs3~V%A$-37FQO5ZNCG=V#8nOMDm3?0>g9ORt1^B9XZtCMqMg zm$jWuo$YC60m6WS8BzzyGITO{Ggv`jSUIW$wS*!!J2o4FrIbH54XM&FlQ3N`C!Neh zo1u_Kd#0?W@N)UGSQNa>6Q=wz)bc8x$g*3n+YtKExS+;vy`_(x+=;m^K#0Sg5*_0g zF4e!LB^cOL3YM7DROv z+(cN4k-G}LQr?~lY~X(EFJq`}w+gh_A;ST&8kO2Or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yevG7`cE*kuv|k4x>BcWO$$D#-cjQFK!X3~NzW)FD)?8+*EIhSHGJ!2Ly@nQ{wDGG)YJaJ&6Q?a z;u7a-sD+RGbknpKB()%2I^Dd&G)ZFqjfVDsQEwA1KEu4{qDrBS-`UL+K2t;^tcp)= zzOg5Cnd{4$ExmV~U|!E4E=}w|ek?2mgA<~>$3JVGwxi@7*O@F|&x3Rw{&MOsCH`^h rzkK>f$iHO#TS(uzGZFweKPLt3hW0|($$nfEX8?d|8*9~o9V7k?cMz1L literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_panel_handle_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_panel_handle_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..64b6d23a02486436f893c0c261f8af036386b405 GIT binary patch literal 4772 zcmYjTbyU=C)BYjd-KWKQB3&@lzN?{N=g{?19?&C@$o^ilzKb_F?jRX zn@k1qpVK;fv-BLU3w0s?9#j;cUSBhWEQf?o&V5C8&tQQ@2bhCg64 zz{27Kgk=B}%EunvEDi)6*dda)jj`hH7XSZ>`HCFB+4*+XkffM&U z{PlD}QdmK*_XW=nF<{pCdEOTv9qWkYzXN%@izX)?|IS7!{}XayVQX`9UcCowVf)i0 z;2zrbvcu%=^;Mws?Zw%zwsqEEA*)~&jLTnL!>5{s3}c^h!|ax}6I5;+@gHtMQ_MYT zc1Tk$iVZz7&v?bm*b|{b=4kL|&fe#f4-V_AJU8gFtD-=Svn-l_B5#S6J^Hx@JBg`R z$NB{T95=gnPIKU(2f;$u#^4V}a(60u&w(IEwa=aaV6Di?XZW*Tt{(>g6!U_)Y82>C zJ85`2uoyZqmpbupZN$RBtUX;|5-^@a5W^cA&WaE)N5n`Ch|7k5S{@|Qp$Cgd@*v{t zGWtOz<3W6Fi<8^Q(GrY{p)i0$Zp*Y7g=QCH$`X%5oe_S?)TxR=_K}rwFp5HtStC(Y zRZu_1kkLpLbS(4ciA1EOa#Nzz03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MO^>gz$T0Cxq5!uf;hZ7*?H93 zUA1rCYbW@5XzO-)*{WKXqr~}p+0U)ICe;LWuN>M4w4u5%r%XFLJ1{*hZE%s(Olzx* zKNQ+O{jzY#T hnEcjn5o|9A!fYD(IQRbZQt{{U1G`P2Xa literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_panel_handle_bg_ef_press.#.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_panel_handle_bg_ef_press.#.png new file mode 100644 index 0000000000000000000000000000000000000000..577d62adbd5db0051ed6bd040d84d4067e49fe18 GIT binary patch literal 4214 zcmZWrbyU>d+WjF&mna?5-6aXdv`7iO46lTP z;K1ds_1*8T_1-_8v-jHnoOPbP&$FI{=lU8Xgmi=e0FY>Dsv6zn>V0|RLi`_ zK;Wxs`3eAt9{;DGdFAHg%d7f8-y?LRc6A$^I<6}gL&upZU1bG7Gc%-I=LqA>|kDZbNNv1U9 zCr%{%inq&Bni5qOpE!B59aiSC)QjGqxouxoIH*5|wa()8;}d6TiWy2kh-*}s9({`% z8y?->6;z5OWcLNg@mrl)USZg2YyiWku>jffwpkFV)Uzj28j_gP!*9Hp` zjny9jeWrsCc>*Yfrl?c`O6ph;SPrK#P>ciEPdPd60M7*gd#<*FpKlHn zAY%TOU#OK1B8v<0x-I2E;kdmZDh@;^xweogwFAY6tLEpv|L%=iNm|#+%HHnoSM6aH zYllhm@LTYpUB5ZT^LK>YAN1w7Pv6-iMQtNBaIU@$PG9I&FwCYCL_4nUr)vD^AiDd* zxWGEB<=ADx`(($E!Y@TNFZo=wf;B-Uoo9ptdFT9ni~j~&VM_vNeyM;J1{J8bb;ACo z!$ocp(El9`0B1cu17EoDu_10z+q1!Ur-~SjVh#Y}s+H~s054S81x+Sf702)aK(#oM zw^^C~Vt|IfAD3a^;ram4AA8AY753pl6>=3qX9$D8Jx~2R74F!XW=39np)X2|;{Aqh zu^GOkf`g`=r1HLG*ADoF1Khol1USm$_>Ub}R^zc86D`%aV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cN&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} z0003=Nkld_I@ua+ypflhhbf9#8lHd7fuQQP}Bpx*w0n)o3)*ZnyjIw9YxH ss!G=D^?tEfY(+%FZ^hL*jjGDe03q;lpw+QKn*aa+07*qoM6N<$g4#OASpWb4 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_picker_button_dim_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_picker_button_dim_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..0ccc338611f56f4312612818819020978b01ba14 GIT binary patch literal 1696 zcmeAS@N?(olHy`uVBq!ia0vp^B0#Lq!3HEBo4iT}Qj#UE5hcO-X(i=}MX3yqDfvmM z3ZA)%>8U}fi7AzZCsS=07?{&CLn2Bde0{8v^Kf6`()~Xj@TAnpKdC8`Lf!&sHg;q@=(~U%$M( zT(8_%FTW^V-_X+15@d#vkuFe$ZgFK^Nn(X=Ua>OF1ees}t-3#_`hBq$Z(46Le)Ln;eW^@CE2 z^Gl18f$@>14ATq@JNy=b6armi`gLD2*8txIZAW?5>ATTy$WeoGh_m@as_IEGZ*dNTcdcCe$s@$&e2 zt$W0?GrLwY9-RC@apzNoKrOA0#}%tGF4ix&XQJ6y72v4RG0Ryr|E%KnhHdRfoRf5? zZdtlj#O1@K8_gU}CcfN1x9U4iUSn*izs&U3l1fV!akZAaKkIJHocr``z&XpC*#Tam z>bs`bA7x~*`k~*@`TQK;%l!WS-cy@Q)?9w+cVJeGK0|$&*3@f~!D(`~^S+$jA9><% ziQpQZY*o<;hQ#&ptnR;m{hB9dHnX$vfXkPvnG7Yz`54?jRl054E|g*{sJ=4f)YBam zSK9*;{wiD*_`%Y53={t3NK1$p$xFKjDSi4Fs?0JE1+rAYuXY=ly5SaLozvbrs zZ)U3wsU6_E>i941g>mDotyeYn*PKjT!%&@1=8 zS>njIRk=*9eb#=ND-CPIvQJx=SC{JGtA0nbR@uyBtU2-7C|yF4DRX1Q zp9yDEJI|(BU)8#hv~f;~PW$@%UvKe=y3V}kQ=@tz=ng*%)84a(YV6|mGu|x}lQ7=u z{+so9<>RE1zVywKeBAth>;5bJ@cwV~C9%i$L?heQ6Dt@u9pL5uhN3b@KIcoc@@GbW j(>GstxQVy^6G>q3j$;0{W`@!mP@UoF>gTe~DWM4fO3i^Y literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_picker_button_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_picker_button_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..0ccc338611f56f4312612818819020978b01ba14 GIT binary patch literal 1696 zcmeAS@N?(olHy`uVBq!ia0vp^B0#Lq!3HEBo4iT}Qj#UE5hcO-X(i=}MX3yqDfvmM z3ZA)%>8U}fi7AzZCsS=07?{&CLn2Bde0{8v^Kf6`()~Xj@TAnpKdC8`Lf!&sHg;q@=(~U%$M( zT(8_%FTW^V-_X+15@d#vkuFe$ZgFK^Nn(X=Ua>OF1ees}t-3#_`hBq$Z(46Le)Ln;eW^@CE2 z^Gl18f$@>14ATq@JNy=b6armi`gLD2*8txIZAW?5>ATTy$WeoGh_m@as_IEGZ*dNTcdcCe$s@$&e2 zt$W0?GrLwY9-RC@apzNoKrOA0#}%tGF4ix&XQJ6y72v4RG0Ryr|E%KnhHdRfoRf5? zZdtlj#O1@K8_gU}CcfN1x9U4iUSn*izs&U3l1fV!akZAaKkIJHocr``z&XpC*#Tam z>bs`bA7x~*`k~*@`TQK;%l!WS-cy@Q)?9w+cVJeGK0|$&*3@f~!D(`~^S+$jA9><% ziQpQZY*o<;hQ#&ptnR;m{hB9dHnX$vfXkPvnG7Yz`54?jRl054E|g*{sJ=4f)YBam zSK9*;{wiD*_`%Y53={t3NK1$p$xFKjDSi4Fs?0JE1+rAYuXY=ly5SaLozvbrs zZ)U3wsU6_E>i941g>mDotyeYn*PKjT!%&@1=8 zS>njIRk=*9eb#=ND-CPIvQJx=SC{JGtA0nbR@uyBtU2-7C|yF4DRX1Q zp9yDEJI|(BU)8#hv~f;~PW$@%UvKe=y3V}kQ=@tz=ng*%)84a(YV6|mGu|x}lQ7=u z{+so9<>RE1zVywKeBAth>;5bJ@cwV~C9%i$L?heQ6Dt@u9pL5uhN3b@KIcoc@@GbW j(>GstxQVy^6G>q3j$;0{W`@!mP@UoF>gTe~DWM4fO3i^Y literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_picker_button_press_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_picker_button_press_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..d5352e4dffdeb111ce0d65dd6000607e68e809b5 GIT binary patch literal 1443 zcmeAS@N?(olHy`uVBq!ia0vp^B0#Lq!3HEBo4iT}Qj#UE5hcO-X(i=}MX3yqDfvmM z3ZA)%>8U}fi7AzZCsS=07?{&CLn2Bde0{8v^Kf6`()~Xj@TAnpKdC8`Lf!&sHg;q@=(~U%$M( zT(8_%FTW^V-_X+15@d#vkuFe$ZgFK^Nn(X=Ua>OF1ees}t-3#_`hBq$Z(46Le)Ln;eW^@CE2 z^Gl18f$@>14ATq@JNy=b6armiKL?fq0y6ST@{2R_ z3lyA#%@j1kGxJjN%ZoKZ(F5_VOKMSOS!#+~QGTuhIDD-#vDr`1-w?ei?JgIrW98(0$8vpO9#WFB3UiNfx45_&FX8LKb!ww>C#*6oA zDaC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T=6=>&vn7}3f?2?Z_8^z!QT9q03Kn3f+ zZ(zZ2BZJ)Oxgj+1&5S7nI|zW5#wNO&hR8$Y~TL?;l^~e@Bf!500000 LNkvXXu0mjfsL+k} literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_bottom_bg.#.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_bottom_bg.#.png new file mode 100755 index 0000000000000000000000000000000000000000..cee257d8b0c02735599a8ae30c3cd1575c2c2c37 GIT binary patch literal 1194 zcmbVM-EY%Y6gOj_!9;~XV%;P*V>HC1CiZm_JF%L!jz8LTq?9yUJB^RI_D$oq_BHnH zoJ5FCXb%iA!~+5f6CVHYq$*JnYK$ zz4zSn`<;(_jz913>t3_^jnx!It;zSOMKW(BZ|^HB$+x?8PZyb9$J!7cKxG^nKBQy| z4MRHb7$dL<4Xd{IXV^|r%gc6Y2oDvuNhWgQMx+z3Ivzn&RC{ODGt4oF>0vlxyIJP1 z>F*iZwzAA%s=yUI1y<~yx(^5HeI>I#W@ap=vx9E0N`%0H*r2P{1FypGMR{j=VL@87Svp9RAX+ixyhiy!1Qeo+sLIO zMq?OF;4DKtT?oPP3WY^tH)te^q>QZ^9t+|e>o`$d^V$I}!e?$QsU4JR9%PF!Koh=6 z?xVc92`0IFv7tzjcq481ZE`8bxQfgP2f8?~W*Kr4w`@z|^rV=URZ&T+oW=tn15wST z6+S1Yk}5CcnjA}Ec|}NSX@S>rA^mH(qYdao1>Rx~Rr9Zw4gVU2gGBcysZrlKE8@{>%M=xF8+gUmH{Fu_GSKNDgHQ9En zcC<@=HU^Ifli$`4cJSw~ZmM7TZ1T?%(?0_}6of zpLqMHc5XOzCwAoQzw26e_5Qu1_Q|SO=e|6)D=Z&+^v~|h*6`xws+r!I-(Q=XTK2`$ gjJ5xS_13bL)Q6%y`b*cFlhNNJul1?lh9uwbd++=Ce1E*}cd0m$ z8|XjMPf^rBepD?Hd5nB#_UtDA+~E1sL>$JM3Z6tY+|*o1r43YtAa7~Yumm+@{^AFi zq^Q1{S+3wpVO-LY71jcqux~j8O;O1a-_i6Lh(Q%jn|6x+`RXkVOd~~4#R_b}QDEI1 zZMkr=HBr`EGrDNdBd0*pmk5Ccu?Bo=*7hVnMYnk+q6gay4caDnCPi-rRVfsKf?Nn< z;YdhlISvRyn2W{)fja?smg5q>`HL_#&$mUB}pw7^c~5 zhMSQva;F(i6vcpp=R?FIRh@%L?*pTYI|tl2v3`ZbB)4wl^!D=9A2FmlTX&2~GWSVtIn zb>skLQUJqKrfs06cRaYBt!!23nsd;|y2t|U`by?@{`qVqlE`M`Y(@_9mgPt~!DiV+ zESeGdv_f~V#{bleA;B;~bNtgR-7V6Af!b?*vgi#Dw8_M{WHcCrSIJm4^J=>6f8Y3a za{m>ukNULkqc`H>?Q=)jGcS_YL|7-lwi^g3}%B@^qe*XUT*Y%lqpV#Ji z@!-bP)3v?3ZpaUc!-x8bxUXKi`g`-<%7GusVsA4zyF9qMu$gNWnlEEFsXj{j2yV?i Res(Pw?R;iJeIj32`~!GUT;Tu! literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_bubble_02_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_bubble_02_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..0fa4a922f6504eb4719cfe4360297651534201c6 GIT binary patch literal 1650 zcmah~dr;GM91pT7KG>MbA^0E!WH@b`v}xJ~Iw^!o#nuWvL41Zbln8BV8*IV(f}um) z#1}poI0@m(}AMH%^i9ZoQK#`2RAl+Y>uT!-TvTQF3I=z`{n!jeBYNs zt!9DmgrErk0Qjoni9}9Hxo4)&SnfU4TT{x3KsGLgO=8knJ87i=g@H+9j6|O;Inx^^A#6x^?&tlZ8VAK-7GPh16$KESN?aX|o*aYiNQ%+8~FL z#cEh>iKQ~=_*^TMl&jI{b2Ifa12q4AFv@{*1SX0lL5C^JY{MOLXqXr0*6w2g1P-gP znR4i*Qz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6twM=um^{SGqQH>eD|+c+Uc6xZ{yA%ckyUE+f!aYwS!Z+dbO|bEZ(iBN%uqMlT-Pd z9=EmgP8_f<7n`IU+DAoRzIc%V9TNVh?N_Hq#|zi*FDQ8IsxdJ!dBARU%EC_FOoDdm zbh@`5z@_Z*w4(Bcr1Ij@!=ju# zvP^zAQ}BTi zr#XHr$G(wsrgBo68mkwbz6(}dKT{XvA7i@LIl3IHu@C*H+imx6O>CDAh96B|U3KU3 zlnF&^Yd@;|IoT}}tGJOsBx&EQ>b+<`YDvwHdk5OCnnW#wxrrn>U6+_ zMbGqhPGu&!J;pn}-tnLv=Y&ng1&c)$m6bD`@*77CuVMPk+m5fODRA)?+XwaFy=H%` z4*ODk_1(?uzL){NQy-pq&pgBOmwxWoc=s!R3#m;s=6~OL;yWkPvn?%Z#LHng?}&E8 z{XI~(_)PjT3|3J1K_zJaSs}x)dfrulqgC)XWR)XUC=&GxQeRdmvXkFdzWVm)H za)``QHh;9CIjhSbEPJ)My^SAUNR1der$M5e4la90EGvtp z4{c~>zNg&l?Q~naU$pVoIBVS&)2$J+qXwt?vpw!~p9o&lHtyGiA8<}5TZw2sz|@f# gE90-mb7wp*19j2(+q+d>QTiVh0e>B@Ibd7P?=L%;@Bjb+ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_bubble_tail_bottom.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_bubble_tail_bottom.png new file mode 100644 index 0000000000000000000000000000000000000000..c642ef4b288d745e078a23f761a647897d1fd91f GIT binary patch literal 1326 zcmbVMeP|nH9KI%9(`D6v*vPlSu>m3rlB7&B$wQ^IosS_ z?=B{-ircEvx~>#funv_LnH2oMA`E2%zY01ORG6ScbSqlx21-E(N=JRuHq}4M{_wcF z_v3!g^Zef5$4zv!pD44}*bxLN3%7DnIM(H#(h~T-h0M;vq1xno%`Uay%nG`MFru1} z&~RE9kfM?xjtpOuni0g>FUNY#-bfprRMRdYZ{y0PHHb!#=9Zi$BnKrEO-KW>;>Ui! z@&Sg*q95z=L>eO+E2ZStQC;d9ZI2~K2a}YDwH!yAb2KDKOQwM4(nE?t=ls|vFAeAU zZ5%^4P0T?*w&hfBqyuGDT|zysCTFq{0F)$M!0jPP(0~$+fWRB!O*(;__K-B;MYk^u zs_9}s9pysXT5#pZQl_cVIG)XBUD+m=st@3RqNqFvK{%m>(-=`qA?H+#+5!V78A)B% zOj%XXJfo0MGo~Mdo^Bl>twka`#EP*UC>Sz4CulfuHR9=X{#={Zh8dOqbz@g+BQ~N* zcvLdfjGlz~=&vn+VeIZNlsAOl(2wdeOo}kXsmV-QQp_;t$KV&2D2p^8ycF-_2)76D zJOKa`VmZdk@f5@OLcSmJ_>pc0L4;X&dri;jv^?Yqp)qP_w*LbkQ%CwP)yCKd)YHI$P@gaNpA5 z)4daCF5f)rxMNv+Qe=)a*juc_&5n&r^U1*c^!RU83;Wx@J^9JP#mUdRpE{7RF2C#6 zzKEbJA4|s$y&Au_XK698{>lrTf7%{j@t(5JmR4zHG--RZ}0v$EuKSpoPs)09|$w*t>Om$xcS6P2Ub@ZXr#fLAH(^uxdZm+2OhOq?J zr;9(mYEAS-hvFDmZ9#@Dj*Z&r(=JELk;VNF@4M?Lr{DMtymZR8XkB}#d1|C&Dfox! zD7{^@cCcaUFWb_CKV3XIF&22I;@sHlT?y>cfrMrGUhCBRWlP^%e?=WLw&jC?b=$bJ z-gEvrd*uq7y4!7CJ~UJF{9Ah;amCM&c)g`9rrhcHsAr?Pq%xj}S7p9h7z;h%zCG7z iJ5Q&sGuMleq7vlliPWC>53dFDf3Ps$&b=LspZy23A-I76 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_bubble_tail_bottom_ef.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_bubble_tail_bottom_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..48229e231cbd033fe8d9ffd80edd0966179ce166 GIT binary patch literal 1591 zcmbVM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0Hk{4f@B3!o!_%w#kIyM7Ub1f6E&0+T_fLJQZ`yUm*pe_MZSSO2&boQ;?ei&E zg?)p3qAKj6xBh~rb#3>pps*7^)!rPYI%63fvSmAg;rd!z&Gd+^S^LcuianM?Eo+}v zPT&1)sE^CokhdQ9L=S7z^?fc)k$eT%r9qQIjyGgS6h407jc%%6*Pm{yC|>3nGka=l zyt6kaBJz=Y-(Rvc>okdUkq;^_6GEJ%7dLl8~bkmRx?9%O!U*}z2tsv&Lnr) z-PNR3wAoNP^U^6B-5%WN({xjOR2&pB8`Kv?W#Yew7Qs3g5*SQDoWE<6>O_a@w8r&mt1KIc5EMOwK%ywm zpfr+|xsz+CpCFvm>cpfqnS7Sd>P5e7%lIqB5=Ik5|6rvgXYme@`U6z4X#2G#ZCYvcuNk{an-g;-M5U3b&l*{r zkLlhP7{~6xifln_4L@qAI4N>L)U&fiq*)0uO5z*8qAEP3!<-ZmX(j|EiH1-Zj*CKA zlsG|%3`d4wi(@xzPzVM?5;MfX_%MVLEeI?#6pU~}C`gMEWLwyTW?HhAMJ>H5*4xAi z55)3u1IdK#!z-~{HIu2N4Ns*b1qtg*R@Zn$trOnLn%k?(eG~?^(R}_C~kovefZgTjNo1Yyal^PURT%T=ISg zzjYtrawksqxXX0NP+X>hA8qrG(Fncj03KRO?~-m&;x`_Wf6BcA<4!wvo( zJ)2Lap3bDc}_fU1>yQ-h}M<(`L59g6)#)K^`#(^Fr$7j?JSRRw!JqwO27pS~dkHaqL1F>mnUmGy1`y!%Cj gA7E~SPDgCPL0nGVj_2}UI_$qwLK+c29GW`y4<5#((EtDd literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_bubble_tail_left_ef.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_bubble_tail_left_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..ddba5b07a8352fb6eac70a054279c9a777377a7f GIT binary patch literal 1490 zcmbVMeNYr-7+-WU#HdNj0TtU8#}V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_right.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_bubble_tail_right.png new file mode 100644 index 0000000000000000000000000000000000000000..50b5e0b077a6b283f384c2eeb7eec4ab1eeb3cdc GIT binary patch literal 1290 zcmeAS@N?(olHy`uVBq!ia0vp^Dj>|k1|%Oc%$NbBBuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFsEgPM3hAM`dB6B=jtVb)aX^@765fKFxc2v6eK2Rr0UTq__OB&@Hb09I0xZL0)vRD^GUf^&XRs)DJWv2L<~p`n7AnVzAE zshOFfj)IYap^?4;5Si&3npl~dSs9rtK!Fm_wxX0Ys~{IQs9ivwtx`rwNr9EVetCJh zUb(Seeo?xx^|#0uTKVr7^KE~&-IMVSR9nfZANAQKal@=Hr> zm4GgVcpk{1iHq`zbF$JDTz5Q`N^fZsd*)yF1AWQ8NHOu6e~j`b4ynX z7b6o>LswTLLqkV5XBS6v7gtM1M+-L#CqtMS*z}s1n;N;9xw=^zI=dMfx*9oI7y?Z) zGB7i8GIBF;afIph%quQQ%u7y%*_#Qp7pm74uU;$XqSVBa{GyQj{2W*c2*}7U$uG{x zFHmp}HdD|D&&*57FE7>vMGwTcE~!PCWvMA{Mftf3;PAD|#A3g>qoJuOkZ?A%1iIYN z(9+q`+{MJ%%*4gg$kNrtQVFUzg`6so1^G^l_Mk`Mj$B>F!Z*CZRGbPF#|G3+$N#&3!$8)74nj1XZDniuaNeqFD6(OEv% zaOvj~tIjx2eW|=gt5-f!CgJWgHR--XJOS?MSFKaDmNqWxHrQtUrIp)8vu8uUMTxAM zmEpP9?4eWRzBSplKFey`y1KP}>x{;K+OOoYenfoTnbRXZWtwDKSm5`|k1|%Oc%$NbBBuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFsEgPM3hAM`dB6B=jtVb)aX^@765fKFxc2v6eK2Rr0UTq__OB&@Hb09I0xZL0)vRD^GUf^&XRs)DJWv2L<~p`n7AnVzAE zshOFfj)IYap^?4;5Si&3npl~dSs9rtK!Fm_wxX0Ys~{IQs9ivwtx`rwNr9EVetCJh zUb(Seeo?xx^|#0uTKVr7^KE~&-IMVSR9nfZANAQKal@=Hr> zm4GgVcpk{1iHq`zbF$JDTz5Q`N^fZsd*)yF1AWQ8NHOu6e~j`b4ynX z7b6o>LswTLLqkV5XBS6v7gtM1M+-L#CqtMS*z}qhx>#CTxVl*yI=dMfx*Ay+8k$=e znix1cI=LA+8d}2idgc|EB<3Zj!tBii+6&d|idV0db5UwyNq$jCetr%t1q5W|m*f{` zZwfhKrVn(CJ}7Y@B^Ht1vE|JV$$Fz!@t}GGzB)zsE zL;A@kkw|Wt=A>y#vl*=)aN00wuRZZZPKrspz~zF~Q-$kNT*TY{St z&7^+aVk|#mXw1FtfcnuDd#kkg949}RQ2Uw7$KXt00=uYa$OWw%EK(T_Ht$1q{fdlN zp6I&tGicen~KV{xS#$Lj_uItGMHTEx-OoPjiJoz`^ooKwnCs%*3;F`Wt~$(69CBk B92x)s literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_bubble_tail_top.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_bubble_tail_top.png new file mode 100644 index 0000000000000000000000000000000000000000..b760c0ad0aea136f0413a42a4292418aee4cddac GIT binary patch literal 1270 zcmbVMZD<>19KSTU%#fBivAC_(<2odkCYR^(dS_yDxx3i7B@1a_-4yI4dD0xs-DP)| zB`sxLEsRWMOi=6xnH2|Xzf6THgNX~aB8nf1Ob{JNC;KoEW>i|3CkiyO2r0)NMax$1torIl^brc*K16??dkmY+(Tn2MuA&7*$I~UDP1P7S%k& zld?DgvrsHfo&FX^Fw9z#a%09=>KIc{WshiLJPo;u*ccWWZdAp>BsB0moRE|#asS3m z0+)(W;zS_jO;tHqmPV#EI69rq6{aT(bdeZ-5sx$&Bp^dW#2a!&(V0e+*w$sx+}tJ! zd>dj+Mu{D##!?xaQ#FVOJU(~93jiJrdVoI=41yt?@&bzVqC4mYekKrPs1V-12xLtw zmY6J`Xxl=oC{Z?yDnpX>dfij^c~otJ1T;;X8WiP52)90^7-GY%=mQ-E9_j^6sv452 z;HILOS8GO;K%VX#L9V7!yTXdz4ipL**$}HF@OVjCHqW(<){QLu*Nr{VdTy!;$t={> znpQyhC=GPTD0YuFWCD>l%yCUZNf9f&TBylTF_L_gKwmsXsmK5-LK(lN(5srh7#$Mb&I8O6HpN|Gy0sw&u2mKr?`1n95oB)1$mzz{{LsSZ|V^>0U z+g$3AT!z!2XsB9FRV$qe$dpw>)yrxX=SG9L>x85f)w=$?nVy}~@=%k`z+ysEWqdon zjI@V+HckatfdgEaMxFyeb99LJb3s2(Q?$U-M4MauKQSYbGo)D@|0$Nv7OFsVx?B2a zvD-XQK^>!^)))*ArZLR&T#{#Vji2)mx3-2?$GeU><{fV_PD zuUg?5t~uqUUA@i2OZgvWzxy!aylJ~L9IK?4rFWR~k2n9aY|gsAd~EHu_1@xvBj2?C zSeer%SJ-C3NC{m!bkPpzB6(8alptFa;exUKfvX@}$EEAP$s%{?HW=;_*UoqAye zYd-6|_q6k@ZH-zn)`PyLhI0|4IvZ zXY9?BOB;)?4uh)h=zPtEqtn%`;`Jc``a6Hv-T@9UEc(c#;**bzpF63+{ zxnDvnnsce^%-1E~^;X>aMQp~>e7Agi=4{v6bnM~f%#)vg&~wpZIf!3=!?WKxj(vaX V6Y;g$-wyLnloZnZwfOk!{{S2JqvZeq literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_bubble_tail_top_ef.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_bubble_tail_top_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..a96f1bf6eb0b9d361cdc8a8cbcf0a0d5575c978e GIT binary patch literal 1386 zcmeAS@N?(olHy`uVBq!ia0vp^Dj>|k1|%Oc%$NbBBuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFsEgPM3hAM`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vHis$7xIPtSOO3fF$H3-F9iCF zKn{xufn3HgR-(snrCtRO>mr2i5SIB#EKg{Jl{jjYqo{Vc0wR{6IEpPn4S+C`1I%22 z=+&qR^RgVz`)DE9h%AHEVk4>p2J_29KBCWNaec+0uYdzV9826>uAh+0^cVSw1^y7> zJY@*0{y#aR6VA{r#qpnF8Qvl)&@%l{`o!Wx^T2wdV~j*=v|cN}N_5;F2_%r4?><}D z5MCGI{OBjm?au1yE-D*4zgWn_eoE;mVUA}~OLo;?4(=~E`hC-#_qP?x)qxErWK9J} zI0Tu40O!%zvx<7|vX0aJllhwJiy6tkP5*Aj+Z+48UUjbbUU;owi^uVUF662209kKI zv1lMD$z8inKA;WHe^k{vXW}BUAU&uN$Qjqj3~_6lb*ZH;vG(GsEmjXQ>pD)m+en|q zKIv*UotcGEYoeaORLAUgb82%Bw&D!7@~`aNN5{~#Hw|90xz1#p#=@N?uWq?JXO{iU zB2S>KmOsT^#gIr+Er^)9O^wf0`c)SFkOP<~+{ zO(Sr%%@|dBq@L>Sl#z5itEi}ms$-m_bTr*%1TN3JF&EBRWuKZ9Quu?aAm+@rwbv(A?cTOla7Yj!YnKBZv3a;O za&5No)S~*W;Tuq`!|l2Q?TY#*FRa$*8!yBjQC8e}%%MJhkD@`LyBC|g!u%%RuiyIw)3?`XyRy3F-sHY(j+s3I&8(WEO)E@Y zHvIzwQx24um1(^utq@ao)l52Z;)JTJX;rkhWA?n01r^t`!>L>MW$tJgaYKCAvE_Bj z3n%M(TRjGhX;b7S9Z8>2;|{XJ$X?q_Vctb4k{u&puz- U3SG#aYWWFDL{jK*@ZvT902_Jnv;Y7A literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_button_normal_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_button_normal_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..1f565ebde1eee7705b1f36629a2424e116a1734c GIT binary patch literal 1918 zcmbVNX;2eq7!EK3f@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o-J(Z&=ho|v|hZ|H(k4LrLx|O#vYeK^P?N{T6ncr@FWeM0dQ29`I zz_I(2(s{YEW5-W->y^D?pS7_MTSYT|u_l!`&vr>)d2UT59&=?$M}A&j!{KMFUD@eb zFLTbEsmiU*Q&uimIKO7k>ZM5=l6L?2V#*Ys)PN2{(;QC5Zb7 zW2bisimkUX-|@Hd&dK>+2M!$?863Ki6izR&I8|1jdUnU!vMEC6Bt9~MpsB{G@QTxU z>z93Z9CAGy*f_P(UR5-;Io-F}HEJ!5Yez(^W88I^o?b{p?7+_6^!;h$B(W!~!R~VJ d-f%ldTH%2UzZSTCRA&1lhJ`4RFM?H>e*;Ka?qvV~ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_button_press_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_button_press_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..cf015a7f6abb9c3e4ff262f96459ab4aa096ee08 GIT binary patch literal 1927 zcmbVNX;{-{951I1aIyy+6Gda~>P3%~wzQD~Eh)4pwblw9Zfa>$$ZV6E23ql$iYU%) zibqutwz+{a4?M=8_=r}Dj6M)NbFS{PlhAwi9iRiKQ9{oU zq;b=%Nk|T=$S05~`6{g;f0jXPq$k7!aSn(gupp!!a9GTk4RT26FL)tp?LFquffpj= zED8OkQMxoWkc1NmAYjL^3|tTdghDpR7YK!5G{ED6JPwx{LKet}1VV@x3-ms8N*iG` zK^i!@R~NOD&~r%A3UN4gyPa*1VdF$L2Na9NUJf3QMMk$qq)c5hbX6{M_zCJ`u=6ulY74Y?KsBbBg(PW@pUQ6rQr;0Zt; zEEGy%o}34QQn4&a4huvwu0Sf{%7lF!ufy^|Sj>gxGB}nm1wlDa2J-l@TplZu#>kVX zr1W8xn2pq92Bc3fO6l#zO5ccuk_bdk;)E8*&3zT1&cR9CmV;Y?q$xsRbOwqUal37d zH$5-Cg%JYHLyXA;ZUJ7z7eZg7U%(f~B!e+hAq)$>ev8GiNn)Nz9-Ax`!7wPM_hOCz zCuSVV7>>6%{!=V{M^puRm#<2n+PrEW1fx2Jpjsn%lXEiFakWZVs&$<2&O9+GQW}2g z1Lx(nzLrzI4^1UN*ViCZvhjYUeZO$}zvp*I;JHJKL(FzoROqH=<6K6ufKw;%Y3Bafzy3j63gS~MzO98x%1W|+CJ8u$ahz|`qRUW)rfgiAji>%* zXqCIMDP8YZ@?04;h1p9T(VF6li17QL9z@ zT2yuM*>I0y!M==}TTY$m7BHEWhUQDfqgr+AR4H_Ek1aX*re~^&__(JjtgAuvs8Sm_ zd16J^MP6G6T(YV3_HIV2ZbiY2jKPNbYM$rktJt7rT}lQDr&e@5oneCZ*tZX?c0b#D zaQ8*?%I%`2=hmKILxT#j(N1y4=86&JyZ4e%RMU0BykW^XbNUyJf0&kOYTHUDGH2=1 zvhwoM4^C#UZ#jH)rc=RS6ulGoCssQR=SNCf=fyvtdh+}Bwzd!XYnqo>*Log4gr2w5 z)z?ST(7MbW$<;e|wiYX{?b42Ypg4QxOhdQZ-4GI3U<(coUVrc2y~j6h+z4QHHa0fS z%g%1Bx%uEh?hkc!O+kgSU7D&mkwkKwUwZtURkSHI?%grz-^i}|e0zXaZ|&zd+l-=J zL2kF%VsY(M1FJ6F{(;ELW1jzTO!Q-P|MX7+pL`jxa(+vW?&87bX63cc&Q7uFSi8-o zi!R@yshWOg(Dn41GF35no(`#aosM@|qc1XHIDQG5k8XgnTI?zoDwo-yienIkqlSusGpDCGR}sJUU6J_tM> j!CV^OS>r$93hom~>jolcx~4S^@m`HexeDGXo4NQOAR72{ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_scroll.#.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_scroll.#.png new file mode 100644 index 0000000000000000000000000000000000000000..6f567d3083f415a35f37c46bf4825c4aae25572e GIT binary patch literal 2979 zcmV;U3taSxP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(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`008P>0026e000+nl3&F} z0002aNkl4sFXg<0 z#5oqj;xNGox0UOx)FDoxD~)5^`Cj)J*YGypdf?acoh7`6&mK52sNp7c5z!78n`XFu za%RT=O#Tb}{=>t-M-4w?y$9aFV+~(puLs`6O$}dF3EL{xBOH_%TsDUvbL6mEqu&%? Z0|1ifI%VcZTY&%o002ovPDHLkV1jI)g@OP8 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_title_bg.#.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_popup_title_bg.#.png new file mode 100755 index 0000000000000000000000000000000000000000..a9c92067ac7a2379649610a5f0b23327dd1d2427 GIT binary patch literal 1207 zcmbVMe`wrP98V`5QmKrBU^|B)+i;${{JKkW7w+tG_mbO{UhS^et(38uOWw6(=W+U!}TiXl(hF0MC*g+m0F`890 zi?a;zbTtImFO}Aay|9%ik}|Gg`kcV>oa;t$t!Rh14F7dwUG1XxLo^#$q#m`c zZ7|8*%?(A0#2fX2z#&C3X8^KhUFhK=$TH*$Ydf~e8%ZUl0VSUTyeNwK>+q>M2PC3B}NJ3aNxnFhJ6hz~FT)r-%uqjV*d1Ha!cr?K;G63#;E0tL6h} zViZ&mnrU~y@Fc=0oJ2mIACc)D`y9_k_3+-PJgd)00z!${|i zJfG0DDDJeL&<#V-3_h7tKuTmzRYcZ|L9chn)}AlyB|Lh>o~de@@SX+)QgLW>W532XPk#O*KeHIa`4m7uIybd z>@387s{Q!V`O|ZMd^~kQ?fkXh{PM2r*AqXpJr|Djy;_}qZQ*J8`wvF{WZcEUOMAao zv*QDYW8YnV{qNpm`_C`lv+K>+;bS+ZKH4_g@yNCC$^BrVXZyhOJNCS?uFzeO(tU4z ue({^}zurE3z&-WCrRSPwE^atm@7PFv4 zq}24xJX@vryZ0+8WTx0Eg`4^s_!c;)W@LI)6{QAO`Gq7`WhYyvDB0U7*i={n4aiL` zNmQuF&B-gas<2f8n`;GRgM{^!6u?SKvTcwn`GuBNuFf>#!Gt)CP zF*P$Y)KM@pFf`IP03tJ8LlY}gGb`4?pZBPB7%B|o_|H#M)s)5TT^D5IB>nPO$&W@2vP z=wj|{;bP!wWN7GUXzt=<;cVpOXlmkOWab1j1DjqmBXd&|S7Q@b7bl=jS0f8YM;A*& zC!h(&&PE0%CNRC8dBr7(dC93TdozLdLiHNs)obNkl$uzQUlfv`p94z)0U7xv`NbLe z1q#l=W(peNnRzMs<;9wy=z;jwCABECEH%ZgC_h&L9KKeWSnM};bTc-#aC0*^aCHLt z+sVn;(ZayZzyjzaOCv{TC8*vMa>7g>=oo!a;y_9)Fd<+H1To=BAIO1cp42>Gjwu3W z4c3FHI>2o8#?!?yq~g|_Tekd71_Epkb{}gzva+l>H2nWe`)fDv2C6@H+dFBRiQ=jD z0>xi(pZscUp5AI>yix6++&y!4_mik)oJaF7tX(q2!c);u`CX*;>|V+Ocw#Se?3dYqHubyCbV@HI28weL7E=oj>aYzqmdl8^i6{k&PTb RFC74tC!Vf;F6*2UngIDompcFe literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_progress_bar_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_progress_bar_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..aa8d943fd6fcf15c26f8af9ca5a9fc1ce5b395c5 GIT binary patch literal 1360 zcmeAS@N?(olHy`uVBq!ia0vp^B0wz5!3HE(wfP(cQj#UE5hcO-X(i=}MX3yqDfvmM z3ZA)%>8U}fi7AzZCsS=07?{&CLn2Bde0{8v^Kf6`()~Xj@TAnpKdC8`Lf!&sHg;q@=(~U%$M( zT(8_%FTW^V-_X+15@d#vkuFe$ZgFK^Nn(X=Ua>OF1ees}t-3#_`hBq$Z(46Le)Ln;eW^@CE2 z^Gl18f$@>14ATq@JNy=b6armihg{2|P3~YK$T}|CA%#18uEX^zo4PA{Koh(dT zjEvn}%pIML99>LcdOh=sOA_;vQ(^XI0_}zBwZN;_%DE^tu_V7JBtJg~mI4AY@=NlI zGx7@*oP*62G{Q6UQu51-H9^q>@vTd0QD#|cid#{Bt^zoGtunFL@8o1;YHVO^Y-Z+S z3G%mvv8kn{lcS}%iJ^g;se!8!RBsA7VWtmsj6NuFASD)<5HJOTnDC?z0os07pik1p6ak4}`R?7YJzesvgl4`CDQ`N)AcjC_dzdw2QoFz(q$*SiC zoP30i`b!zMCmQK5PrUb$op<_j@tEte?l;&<16Zf7oFZ7kuKytJ`q%4U7EcX%VZqm` zc3}p`JWUgx^PQRzH=K58CERe{V6py#!p04^^0u?H z@+b!cKT%dJa8^3KDNM|?WgnN_u{N8KKQEZ}HY76J_-ch5GT6hsHf^)!Gt!sXz3*Oh>KE40bt3%Oy@3j5DKgCFT*}v@~QXhoknRpn) X5ApnweLhzkRK|I_`njxgN@xNAwMp8V literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_progress_ef_bg.#.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_progress_ef_bg.#.png new file mode 100644 index 0000000000000000000000000000000000000000..4d049ad9607fc015a58deae6722ba98c0dfc44ce GIT binary patch literal 1404 zcmaJ>eM}o=7%xFL0)oWp1g3Btf}5iscfB6HN*V3lRjMmsVbDw$IeJ$(Xz%LvpoKAG zC@h&Qljx>I0Z}JYHgs%knl18Sv|&aQvyl*CNFrGz(*+_Mb77gj1&aQGyWHLTzRx|s z-}8NkiVL5Mk4=eHC=~J50?H27Ebu%TvkAOIucwZHC0V8&a*61Y{fxvZOsrVRK~@h_ z#o0NAZFuz(m#a`jyZBOv?6B=NI7N?&3G1i=9xp&E6uG+sUdCC=$xtO%#S2Dw{^BqU z@vIRp*V!~SFUeK&1&tC{(pXsPY^-$>EW9fZ$_*F*frpbBDBy7mK109=ukaecJ}g$l z(29y&YlK&wa@dL?Qj|DIr_w5&8U%rGT!mmd97nPtRD+;u4Y+Y7f*EwU0nLHdE*Myo zSeL<0S=MZUlM$|#Wv@Z4_WS)Rzg8tmRceGFh%g6=DuIU5*C5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vZm-$vB|)%#V=7WpSsxr5ADin;7`5PsclQ tf-vJ&A>oD7Sh%aUEls=H>CL2YfZ=d$r>ePg-7HY{_jL7hS?83{1OPWXZ;Jo` literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_scroll_bar_h_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_scroll_bar_h_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..2a15e4d30e43295e342cd792edaaa9166f2ee55f GIT binary patch literal 1224 zcmeAS@N?(olHy`uVBq!ia0vp^vOp}t!3HD?=a?M_Qj#UE5hcO-X(i=}MX3yqDfvmM z3ZA)%>8U}fi7AzZCsS=07?_nZLn2Bde0{8v^K*7iAWdWaj57fJ{tG z$}cUkRRX#c;)UD-xUqS~&|m@vn0`fKfxe-h0mw@*g}%P{mFDKcRTq~8r6Sym)!^cg z%7Rq=pw#00(xPNw#HA^NtSYc_E=o--$uA1Y&(DE{Vn9ZINq%ugeu08>u&JJ*LU?9g zN`84USiP^Wm1kaYNn&1ds;7&s63_&_%*+&EXj&Ru8kxG8S-QFz8oC-;xH_A;nLD{U z8aO(cx>=aQ^t$9Hm*%GCmB93-!1bCL;M5CB3b_S9n_W_iGRsm^+=}vZ6~JD$%Eav! z7o6rn^`_u-i>WJ4z4}1M=z}5_DWYLQz|;d`!jmnK15fy=dBD_O1WeW!HD#n27#M9l zT^vIyZk-9e*mcN($7E}it%!^NlbUZ2N%MLrbT)({UH`DimqZ9V#D^K~p-fiyb-lLm6*VpI=WIZyQGX1Zf`xPd|>u)@B zxh9!CiELcV&(pZB+al}a_V@&@njIa<_jZegJ!jH+V#(fjr)73fTuHWFtJ;F94TmHR z0&~A@+kRW%rMUsqF$W=~x6V1A9(<{L7{ML*=F65ThbNo6E7kj7{I!Mcrh1>~2W7iw zk8;=j{W5W0gX(sU)(R%}eHY7fdnOe0+HPPr`k5Bqm2~_{p_A6`v?H^3pI*no9VxDM z$7AkdwNg#fPp5;v+5{bT5DiING$A|Z>D?BO$hVGf!xv3yJEV11#eDUnm1@tJ(gP)~ se%KPw9J1%^|COuv`nGO2u4m$5h`CYox$32fAE<2cboFyt=akR{0NQD?zW@LL literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_scroll_bar_handler_h.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_scroll_bar_handler_h.png new file mode 100644 index 0000000000000000000000000000000000000000..c1d9febfaa98550c2e8c4684a1730e44a88a95a6 GIT binary patch literal 2886 zcmV-M3%T@(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#GxR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y>;NvwHre{4vcxFD|^i#!{h$lQA||H{Ss;X`9XsqBG@ubY24sgK?2 e%Mod^X<#1Fv@y{Bid{SIJ^Pr{B925-2mb(^$b3Hl literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_scroll_bar_v_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_scroll_bar_v_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..52eac0a019ca6840dbea342ac653a90ad6f997cb GIT binary patch literal 3103 zcmV+)4B+#LP)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#xMM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)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} z0003>Nklw+ zee#}@%wv(kar zo}JDDdK`g!;Hn9l4FDd12XB`^1Z=QE`zi7qxC5qjQDNZjm;tvA3}XOuVB+dV0SdTi z+CD*&4Fonu=yUM9#OP-^Fmn7qP>CA-aT}$JI_s-2PXM2*XSWM5lQeBfcL}^YFuFNd z%56$uAt?h2Gh0bo0FS_ngATyXt*lG|Bd`UQz>}nT#RPu)K7h5iV>O93;1}=?T>85k zpZo}HfHz>}<6=soc{+u+x4yEur@HpO!pB(`U<5uZDNfv7BCvO5ySiJSx&o|H@V&!S tnJm^9qwAeg`g0icE8>U5&hf+V0RTl~avo7~TCo5C002ovPDHLkV1mcazI*@x literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_search_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_search_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..aea105f0fab75e6572f0ad7d257b97ae51193d75 GIT binary patch literal 2857 zcmV+^3)b|BP)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%Y2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q+(;@<=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~Nkl|aQFI#00000NkvXX Hu0mjfEyzpQ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_search_edit_field_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_search_edit_field_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..7e35dbfe811b8f288eedcd4091a4f9e2b31f2cd0 GIT binary patch literal 3567 zcmVKLZ*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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lh7E@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} z0009TNklzB==s@7->0#%Yq; zPBNnl|8RJV$9uo~KkuG*&J|Kh3RN@`#vcgE!GVxq6%s2!qmi%=I0SqKY+A*8$AD`< zFK|EqhCdLLwk5C%peG(r?0@*^@zBt(clz$$8<_@7K&tppwe8sE`nbJq>xUn-TyZ$; zzW_%7eVJ1Qyfqpd%bYxQCIT2h2FR)hOu#C@tp=3+^uzJP_4OM!0G|T7KM<5!jxNLn z1?&gXz;j?0m;{~z6To-@F#$aN=DX9Urk>4A3n9+^!)Y`U{zwS%;ERJDUmAvyRKP#g zHKiOEl47Bv3|QxI*qyzh?olb_R(~KkVgsnGtU7+<=B<9iFcuxo0rNm24`>Yzgq8vQ zf#9pa8jwyTlIhvG`4jbC?=b)yfN5F#ZV&&~1tgWjc?Hi74unirC#e=|0;ZuGSEZDl ziys?9&pIEE{yqi76)dqv;8K}cU4NqM`uZHyvMiBGrBljj3dj@@2*9!LyB19Ig_eUV z>A+vAM2ZSrsg`mnP__A@z*@tG6!|ldj4o{-?1yN50*lo*S`DS^BmMu zSAV&+rRh*(gSQgU{DGh-a%$fZLj35d^Ipn9Yh3QLP0gF-*I#vftGa!$H`tk`=FPIk z1J2!#e pXe2zbbix->N?vEDky47k2LR43PURGA{v!YY002ovPDHLkV1fd%rKbP@ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_search_icon_ef.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_search_icon_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..0813582972ac7768e5d0f9688a9e59eb0be6218c GIT binary patch literal 1751 zcmeAS@N?(olHy`uVBq!ia0vp^x**KK1|+Sd9?b$$k|nMYCBgY=CFO}lsSJ)O`A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@q@sPQ)^sp&XfIm3Hcpk`yp+c4>= z%I#S%)gOgcoH+ivTkA!GndOAe*VQpaoKp*ITNrhZ+G=^gtn z<^}BUZsuGlvo!bl{ZY=5d%u33iI!g3HQ}$~t22(~&A4{wDYK=YcGSf#vy*>qz literal 0 HcmV?d00001 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 new file mode 100644 index 0000000000000000000000000000000000000000..c6d4246e8314c09b195a5d0daae2f347cb47aa58 GIT binary patch literal 5407 zcmV+)72xWLP)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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f?n|-hu$5-#UPE%7;mne$Q=kxjB6$*tMbISAV-m7XvskL8B0MHI#6u^st zK%g@m4&SgW>z|a;9}0y+=^6POk>~jVzu*6YuIn$BN~H$?{tDnp7XkVBzR=tn^i{^h#vccoJ4zG<5IEmRaI zNs1O|AXKTIiop-?FFIgS%!3(#+vL)Ng#&ggpgta1Q?0J>1AVt*b$had=pk|aIw z`F!62_z}SUQmGU-48yF!ne)M5PznSBodA9Tpx?Ib!=`C=QA!s8Bp8^xER-A7d?DM_ z)ayf~l%yAx_M<}pT6vy7B#NRY2ttw&vgCPQn&5b#nj;wr!URg#rbDP$(q$ zd_IxmIGN}9i0itoj^lK29M|eNPB*2r&9bbp>$))jDVFrQ$FhUDYUVlH4QN$O0aQx; zyHKe`-p`_*%yC>q5QMPL=PM9GiX6uk*tFk%#8(Imw&;0Y&~Y5qw(St5RP#J9%ha(9 z;3oi!OfeaDotj?b?e3djUB-yaKkWn1!E7HYHGx4qJd%Q6XQAu@D5G+C!0KTH31(^L zXRN24e?1F8k19&Q!}B^q>@{p+zspQro zJ&~E8*=h+2|Cn+pvl4@4p-$&@R1IivRG0491GG2x0M#`9I{^Q&D$Gj+@;(3n002ov JPDHLkV1n(QK}!Gt literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_slider_handle_ef_dim.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_slider_handle_ef_dim.png new file mode 100644 index 0000000000000000000000000000000000000000..54c1dfb0309550543466ba8b68d37c33f2bf82c7 GIT binary patch literal 5257 zcmV;46n5*0P)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!B1Z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@B18DCVrcvw0< zL$O#wlW=%99ZbVO#F_OoS(8VjF{4IO;Lr zU=`&15Tq9toN)5}qowe*47dQy{M?A6C>!axM830VC`H5 zByqm|w|i|e&J=RaKrBpzDFWK82psBXLg)f;*~{2%;vITHW? literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_softkey_left_text_bg_ef_press.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_softkey_left_text_bg_ef_press.png new file mode 100644 index 0000000000000000000000000000000000000000..f1966a8867003fed87c36cdec3c79275562b21a0 GIT binary patch literal 3623 zcmbW3cQD-D+s3~hqPM6KC4?v&C3>*xYO7|I=+P|^Q4=j>MRXzRVza9xdWn#%tlokp zR}wguBQgzr&Dg2=&9ssbY-z$E0UBn5c!9zhc38(%9UThp zzJhr2loUiVJ4~EDk#?GjBv6zR{WdiK`>aqgdlK`AVo_`+$ z5a^@aa5BIyQ-GbUAPwMWb&uBuJXL_Iq5FwCfb|`K&BL%;37D1u?m(?P^nuz2pq;=> zR|inj19xEYF=7BkIN;PLC>R2~%mvtVcdfv`Zr3ocfi63hTL;DoDd|MnQA_w!Sy@T) zi4vfkx7ie&|8maLkn9Z2<&ue#WBRuD6#xp-*e`FpcNRimtRWB-Qm~AU5*uxl7dKs8 zR?b(4D*ZG7U@0hai6*;hm1{R%efnBf+PK2j5zkg`#8}qVy<^zIA@xH!9{CN~d}0 zGWR`I@3evL;*@vnW;fIYXANRofwB0fXy+yG$rRsA&`KBka%=R$ZFy1rgj{V=9;kh& zMi!nXQRd)E{@YN5**d6w`49khn|wRQMXAXVp3zG~!52H~XL<#<0E7oL-5&rRXbVYN z^w+ERQUic?K@_M~lY778ns_@UPsf$H4!Tn(g_l}F-JM#@TC{Emo&YDYsuxYXMx#xGM7Ya!4zuF+?XSQ z4t)xiBq4r$JR9t$VVbNx!; z2(C==`b*s+x?#5<>AX~q0@QH8$Lp%e3WaOKm7YwqscMkkJMBNNQOR~cx+B@srS;*i zI8BD@z=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NsUe_{BLfvHf)xNSMYyd!~c~5r!rh642=JhrT@1) zJ^J7G|4K60U-`eqwLsx{+O?xl!asOE*5@tuPmY^wFxO%P-(1i56nF0Q#G~>SuZZeZ z8pJi&aiQ?GRprEe=^XzcY|HP*SQc$liL9aEH^_$h5bo!#b)s_*nhcs|w)hdL>mv}b Yl6ErgGQD&0O#=X-ZLC$J>G1S_02iEW5dZ)H literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_softkey_right_text_bg_ef.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_softkey_right_text_bg_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..e3fc84adc2a19fdbdae4ce8c21fbb127d3197bf1 GIT binary patch literal 3624 zcmV+@4%hLCP)Cm-I00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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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16ml0>0x8Zc~Ui*Y*gH#C0t;dPTazLuODc%XyEN@yjDn? zz<>Z1qqpyHTT8904ganBd{6_LZOWyJnnHz&2+2XW#CR;lGfE>3Z>)-S&L}KRMIa2_ zMr$@3=ROeGm~zy@^2MMtk9YjV@wH*53u93~f*fFn%irKJ7}r!A!%7&ql{JrWnJ% zybEnm^~99DV$oy6r-lCh9%akh_h{`vyWYpw=^q+@ki?#mcQc=ZoqJ4s>l?i~JZF@GkWF2yzpZsL9 zOt*Penh<|&u|n0!e4WUIO60HYT19gyAh~c{vON)!LkjA;K!^0<&n3~WQ tY0|GYkd96&3WXZ5oLo3z0D$vzN&sJSzGUUya1p2hz|_#n0Il!w{NH%St6=~D literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_split_handler_bg_ef_h.#.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_split_handler_bg_ef_h.#.png new file mode 100644 index 0000000000000000000000000000000000000000..a08b949dbc56d96d0930c4da240ba682d46d74bd 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=fnQv8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<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} z0000mNklsB@d*e^h00000NkvXXu0mjf8ACd0 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_split_handler_v.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_split_handler_v.png new file mode 100644 index 0000000000000000000000000000000000000000..b0e074787fe95f0187899bd8a185e10410057d56 GIT binary patch literal 2820 zcmV+f3;XnmP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_A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008;_004mL004C`008P>0026e000+nl3&F} z0000=Nkl^2SryFhzVJahJ3|d%|rfV}BR?FI?TgO_vuCO8sX31?0TXI=)v)#m( zF+o8cLPf!;bRa$`zKAFY6NMs99|RR-ui}F`5QYlwLA-2j=YusQ_uYN@eZTMTolhou z>+25G5d={m>l0E~_S@g?op?R;=J_NRElA9uAvlV1k_m_&1&#nRrb%NU1tev9@+Igd zh#i!g&Y(Otz;lcyA^DnV-4ANRzK2*|2^ zGbR|CNu=eOaXFw+p(A8>p2q|lKoXhPCUlF>2dNES9`9{6Ly;R0G#;cjgUZB{WCWUk z^wXVg*~79V$I-0M&v9%A>GiN)#)DtZ&H8vh$9ucT@glO3pJ_V^PLI%$; zxm=FUb<)rrW7t3-U~_oAZj5kS(>jv!Zry6DFbKesP1Qgu)JdCB8i7+NNa08~Q_zem zt!|aegbT*xC4*sUkDXEl7?1xSs%cfUg;HQE-hUEX>1hKnDPX}VQ^t)OZL?h&e8dD2 zf@T`RiAoidS%{#Og$5ZJ;z;MPsw*&Oxi;|eI3Lq3Bb8qiV2R@t&;YuehQpc&Y+08I51P@*Q($c>bF zwPq|nu_j;HR;d{aPNr5K3=W2|8~azID=Iua_O?2<_)r~upyO#b@mM!pJMO|);&Dvq zN#|Eq-#>Gl_3RS|dsjGj|uN~mHOc6Rx6}m zzxVKrE7ag#xm!%Q*2A}(nd0&b>&mRNIM>wgEDkt}OCLJ64Tc@G>U~}V&1uk(F?8kPkSK{T%0p!1P2KJisIwjwl7Eb eEUxn>w(ljr-r{at3SIqa-|Lu|5blRh&i(<`WMkF< literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_title_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_title_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..65f9aa5e2ddae99b57cc8cc63985a9e520c585b7 GIT binary patch literal 972 zcmaJ=zi-n(7`13YRi$hUfIvFj1rV`)ZtNyjOq19Njf6v#S~L@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n0>NMzqS;LR&4#Z#vY TkkdxyEWU8Ha$SG7{q*G@M3FLb literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_toolbar_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_toolbar_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..01e557cd03e5d5660e7168b6e4739c055866b01b GIT binary patch literal 999 zcmaJ=PiWIn9F9)Poc1CfR8ZbB4=QWYWJ%hF#iz|3BP2SqDB`+qgHY*;~ z+Ymue1TQi~#gm{{4-UOlyoe_i4_-W~c$dwWuI)TnLz4H0@B4ng_xpWsy|^$JA3HWi zQB=Gzua?MoIQm9oD>TV;=Ln8BkadGznMlFd(C}D} zNk&KN19koXP{$dd16+c;`TkQlsH}OAEx`aaeUmh9c_Iqs$vGby82J^1R{K>fHV{TZ z19>1J50tDS#(AXR>IZe#K4k@a8v{@7N%w!t3}Z;!=ZANu~aInI5u qg?n@HN6)WMcC_qc>h6<0dk<2L#S`N<@4WvOUA=;~pgxB+$?wz=1z}nh=VoB%i6d;7Dt;bwy@OM71ra@ON!|}WpU?OEzTeL~+OFQn%r4Aw z9G9t-^%@)J(r@M*`#*mXUtz;#y4j#Rq(x&Z#9YxKO$;iY)y6e!IlbE-@jAy%@ov3A z8|D_Wi6>YoMo7GXu{myiBMB_Kiz#U0w(G0>uXpcx;5sV5n>Qsh&~V2s_d~qXuh#8; z*Dg5x#&xisASU2pYJtSt_al_3{6H76dAcp~U;v?Al|N0YVQvGBgc#(7)vPT+2oyzt zxxAvl6(CDc7A5v7S(rn41FE)?U@YrL!!oggiHQ}6P>|9i zjew^4f2ik;(GjiTvwZ(49MyXP7Hc>n2cgXx*IGW~0v zI|{hE>-r9fqvZkKG*QKmsO8(ZqN_Yp5M0+mIYWm~S<{M=QG{?)F6pazqa?|Ok}GLz zd1b`aiGAQ{obbMO-i}nN7@WN$zm|ucv!kJ-9p=7Quj5TBsxwZm#^!i)v@YBM z=K-|)4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)+R84vXgf)6L*dBC@z%b}K3tJ<2~bVjcY;Z!X3SB*`0Px# z-)Hkn+{gLS*hF-L*dbJ6K}ku;S@u!a;*yc2Gv%@uW&5BhG5PBC;NoYldG5Nh4&rA~ zkL0-=!w)hllx zZmz@{hE>sT*vkv*zzvGawOCBb6}4!o%C4&=7^7G%Y-x=9>^h#&K<0Z<)cXybyP1^8 zZR-^&$}hDPGnc*Z+SB;J-`x>ersKXNce1kXof7$I6I*XgNMR@p+n`rvxDUHlnkk?f zn_WGSVt$1DCOKWP_1RCk>ko}WYRw`c>x#N#WwZo#4~q)`Yp`}*lH8EsQ&{r;7A_; literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_toolbar_button_bg_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_toolbar_button_bg_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..69130d285cca600d42bcb3af6dcd158923847b38 GIT binary patch literal 3711 zcmbVPc|4SB8y?w(3fZe^vK3~`V3@&RHainiQ8H!*W0@H<6EjLHMNVWbOJqqz$(ABp z$-Y%uWX~W}s89;uIH%6{{c(QhkMI4x@AE#(eO>o;-_QO0@kA3Gt)wKBB>(_`l#Mmk zng4g$_{2o`?Rc39zXd3wdKpG3lF$4X{i{$q=rXe8UpC;@8Gtgh6 z4ml8j7&?;zGz9DGlJuZZARG>c8W_UiP#qvl4+?|m@n5(u)BtG+N5YJNza9|Z8m#H8{!g&2sXla2>bXlxs-8Hm3E zCR52sEY46*AB)D|3^B$y7!-;yGQ=PdXgJ2e5@)0jhyUjIC#;^KF&wRjF~H#U@lYrZ zW{H5|F<2}Dre|q@FvRNp#@f(WY$AFsUIFGM-5f0{)p_B=sNsZzx6MEus2Q41ObS zGy-9X#uz}c8^RG#W6&=w`Txlogf9lNQ5^qMEWfAt6}Zv;yY%^kzYhGk{?UNE zQ`Z9kBuZ?smad$)AFfjaU0-i+nd<6H4=*(nQ5iVXqB!6c*liYHyU*MBX%RA6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AkZH;;4jQ zB%`>X`hK-DxeszNzPTh3kqT;5n$3?CUW$l{`t!J$|5%!CL{W4-U>vQ0&aC$6T9;oS z)B)n6XPg0pi;J!;aK3HL%@?(Bu5F7!E}yXurlY${Qp}$;w$VdHDwwNUGb{{S(#dtU$m literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_toolbar_button_ef_press.#.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_toolbar_button_ef_press.#.png new file mode 100644 index 0000000000000000000000000000000000000000..5aedea350988cad0d0233ed39cc1a50afc5271fe GIT binary patch literal 9214 zcmW+*bzD?U7rqNfm!x#pQi7y(Nq4t`bc1v)N+TfM2q@hk-Q7#)f;31gOXs)mH@`D; z{<#z9nKLubIX6l}O&$l691{Ql97P3LEreG3ucD(OTFR+jH-y4)RWS4b04&1)DhSBT zegy!S>UJ_R8XC4PpIkg_U0i7uWn^ew-CeBh9IXJrXC+75Mo0UAMC|(ag|u=cBw5)- zix{0&OF9NZl)wz8!@yUHq|09>*6evHCx=2YoEM247YF%DtjU2Ljk$!jLst;@4Yu4~K>J>%EDmhDGuH3V2TaBw9B*cB;Y~O@0V=sWkP=jW0v}gPS{Ck|CIkt^huI z{YN^FM+OjZ6C^6iPT!5z34nZNvCx5T)vWHFaY*vqBX~*@*-`AbrS`b&Pc#o@4`%cd()lcl{3=x%_V}%gehvJ4;Ia(#9V~^#h-5dd<7_A02Ol zL?5m%H#)Z%LwHR?6v3i zM~2vb*_`x#K9hKq&tn20){2P;hclC9rfI<+%NIMcqq)D%wz^}lg6|F<7t3Y)w z=8hyBVe+muL1Y-<{rnK#F3*!3Ql}|4hut94QX)tm`mO+L>fLDbgd8vMv~=NEqw)c`5<|XUIlVn)TQNQtv3om zh+H>@0E)LX?FVWp1p^fWwIziTT1rN~mn#^87|5ZTy)5)eCCa~;TVLMxzp~)vi7-&$ zU|1lCC*;QWkCf>bWF&}^;bm$0hNM{gQ)h-?=G~057Q+EYX%?RXIYZL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b/res/common/usr/share/osp/bitmaps/720x1280/white/00_toolbar_button_press.#.png new file mode 100644 index 0000000000000000000000000000000000000000..c0537e9287e418ff7ada1f7e0884ea7df2a5fa02 GIT binary patch literal 6351 zcmbVRXH-+|vJOa*5=20dCZUSd1VRZIS`t9I^o~G6hhRcSng|F=mtI8ay^DY#ij>en zdPfiiK}34L_?_=N_x?ER{J8I0d%tDRGxN;6GrO!EsiUO=q-3E4006*ysz}|-UhU6u zmF)7&HuUk~WykD+GWO8J+Ie_e<1he4G}Zem`p}FMcKzDs)E)}?9Jgh-Jt}bqP86P;;UwUOO$A6YZxj=u3csRqk z{zb}IQwM~=;xHfy5wNf=SP}w~go;3*U>Fo81QG*7z@iW_QLvOS1S}&VB?E?l{%%~C z)^KP$8C|6E-?lDia4rWA4|f?+QEzW=5pQu3EY4mO0)xRs!D6CfV#1da!gyad4{IM` zH$3-08ju*gEzZ&1!x8HS`lHd>2J7ho=elJ2FBe?hH8uaO*bV=8pe{ou>SOIL3K0Q| zy1M@H>n~}%hc4!SY5YfNyuPnHMpPGr$9m#yFZaWa`ycRS?EbrFJ@q$Ern3W1=+q$S0`Fcb=gfJh(_C@JJW*n4hx4{JAD%s+M=FYW$~Mf_K+ z3<8I-_Q2xwu~?UXGC;=x>w(2PVBJ9oJqZyA$jH$RjrGR=*`9xSi^Sj@y)bBH9M%=| zSA1n0|AT!gsF=7C0s)3V#ZiC!R+I!wz@So4h?2M%SP?1C^*0v%|B0FCB^l8_$?<=Z z<)5X?4E!_vcj{kG{#`s6x66vbU6w}e=6ELnz;JO7si^NWJ)7z1Vm{&7HMk*Y|B@5N zVDvCvRSm~Ys3wJl+enpPpGdyWa6ZC|3fV=NK^^bsD1?vzb#kmI>+Vd0C`O2d<3v>D zkZyvXLg**z4G4y40wdEy4iN-yKj5V={6hAC!Zz&%e`JEH+~OBt{=xjaoecZ{{9qnm zp?sfVT0KHJ_qyn(tqu-}I-_~*owt@qRn5`%{=xE4v*3)FjKqw+TMggdVj9O9Q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toolbar_button_press_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_toolbar_button_press_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000..22849ba86c0b56af3e31591d2280cdf487e11737 GIT binary patch literal 4371 zcmbVQc{r5o-?t31wOA@DCR=v1nAH-^SjJYFk)?7>Gh>-COJnRyjO<&sP{grS5|tz` z4pP?Qpd?BnAu&g`BK*cVr}Msloa^_;`&`d+Klgn<-_Pf}U(a(r38x&aq$Lz31Ox=6 zan@Kz{vE$_?GojWlMjseqksa(!i9rpdU67ZY>I$6nR$T%#Lr;kek_p-D`-K5<7zKZwrSfeRQP4`LBXGztfJf#T)EFj3((G^+r8$R;YzFnf?a z3q$etu?}HV@F5NaQV5NNBC8xX1sVsT`2=(dhX@R!`!f8{K_)7H@}l|kooxdZ;GZHK znu*F^M!DFZ0%DkK3J|6b)gytxU?3c>4>p9s;b2`L1O$c{fcPg|4{V5r!O;)|@b5!~ zuZ>OiL_1fIE!D3rv5Gi3;D+zg(cR?Ct*{X88RbD1OKcf`}{wus+CuPT%qC zPia4nBjtb1_*ZE^LNJSB;7IXf`m;&=e0Zw<1oLC}-xci$@~uIiWc%=wLiEKlN&a*S zgM-7GsPLcYlYPi&tOX1N#h$=ez%WP)2pEh)z%VG(2{^{k+yViG!+&!88y1DcU?Aoo z7#0rWXTkzvZf=P{fl-DaC=`P{0Ym=8;uwA$B7;Qvsn>_E_iwD>f5oCPYzmRXWD}T7 z-=7t5%A3hy`gt>1KnxxZ)O7Y?kePvgT080a%Udjk?Gr#DTe6vS;GgkD`}~W3OOPcP z0foX0EwJ!E{YD`$C>1Ps|MX#u)4r$NwpopIiJ2+?oDU`uxQ| z%|l`EJBH0~4YN378oymJIIKA#Xyi-5cl@Dgg^snC;lRBJc-)?r+_rY{_SEX932ErA zm-C#A=Z17hQ+dHw#*cjkvwP+rLJM#kn914n=j4feM)LgAgo5GWr-G!op5eWI5|{U8 z{9Zd!(wCV1gIX&iv)7>s%F_js#@0%Bev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$c0;`v}X=dEPI90yV~hsw)2V10UUT{rVLR!<+QeLL3c@o17dGE_+zU*#~GvZuGT zF7U3umHQPB%OBGr_McAcXBqzD@9-ijr)9qO4I?Z_(Dv)$Gx-pT*_+uLG-igjp66YY zuwB>hyn5tr?|xtV1Y;9_@2y^!{YCfp*I?N|7tyevsFXuGmUXEVFL_*a>Ta*Ieu+S|AZ zcFq3joLYLHLoTnnzKC~nb+m9*wZhINMdvQ}m`G^hadDl9rT)Y{(2ZDPas4>w&TD#e2YwdJ#O*cx? zFY{(oeovILC;B~|d9;^qh|LWCTXDDGw9F$yS&)nnJ!C zQ$e_W;)s#NN_u_64b$Cs@(0HUw!CQ@-_Val4o5`(d;5ct!M&%P&i(!#@@Dm- z&ZB&FWqDEM@DAcB&e-HlccArpFu!L%hy1>UV}*oSigHYE*`7|$YMEe0SiEq{Y|t7d zoC)L(DDFvoW=((HTXhaRpysK(Q2rHNQ{_GC6B&{r9W*M0Z*zVpTql;kjEl%(fz1}x zsMwy5j-T$PoNdY9V?OQ+h*u63<>jxWu7uvt*3Z0-E$dH+6rWv*Ia~PD=hdK42QmNs zpi-{l?6Q=9%7v~z&kI^+1$~t`A1QSK)`2qEm-by5A26*+WBsAdo^k)vWV8Q4u}FUA zw}FGTpB7BdSWu-mE@q4fV_q-$vLd~N+Q#qrj>~AcR`=%=W!5-n4{Tz$ro5J2kYwUyxCu6=$Sq=`~%5nn#!_{vvA;1yDRf73Bl z3*HOcQ_Eu_uf^lLON4r)M7=aZJ=Ym%&{XkS(wT_|Ep}I~RetLL7cs~$!VY63JixvR zrkYr#-><6Ioll7AI&u7ohICBT7pq~Q^7jX(0U?W&cl)H0zHSRi2}p(?^KtZ8@7?)L NfwOSHR-N$R{s$8+v)ljx literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/white/00_toolbar_press_ef.#.png b/res/common/usr/share/osp/bitmaps/720x1280/white/00_toolbar_press_ef.#.png new file mode 100644 index 0000000000000000000000000000000000000000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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/720x1280/white/pd_btn_bg_arrow_down.png b/res/common/usr/share/osp/bitmaps/720x1280/white/pd_btn_bg_arrow_down.png new file mode 100644 index 0000000000000000000000000000000000000000..da64f3493e401f577d096234eb5a6d009e5f759e GIT binary patch literal 4081 zcmVX1^@s6pCK4h00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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%c004NIvOKvYIYoh62r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aps/720x1280/white/pd_btn_bg_arrow_up.png new file mode 100644 index 0000000000000000000000000000000000000000..f0d9c6691f1909608be4a24bc4dccb3ece75a7b5 GIT binary patch literal 3799 zcmV;|4k+=7P)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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&;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} z000C6NklZBp&!C)mLNly7DnNrX$ni%A!KqnkWvDbs&&8v9_f40 z{rtS#^AI5fCTWC_u|p!Ba-T+wk(-d7L*-pWjEQZNo>guP$+kFXRO){wj4^V4elEhN z1V{v9gai@FcQOv%EPx{s?A{hZohNA;W0muNz z0ayUA2w(|-V;DxU*=$~a`{woG`*(keP~N_Ieb{U^uN#I@1mFbY7lZk^V7*kZzWfg% zQCc_YS!JRBgI{B^c>>UV-(T#spWe0Yr8OadP;7f?t=>K1nu)HoDhKT*Y4T2Z59fJth$C|q9o=#Hbj{a$x>y;LfN@bst*WR@}q`Jk${F#x({St-|b^;(U$qJzP>g#81&T8+0{*VQe{ zN-6%1DMbU3)P=d;4z&o_m2)9d7fvOrm0IA z5K#&NA}M%DXxuQ6^FV~AX?mm4Fkg1t59Sy0H!*2>M+nR>NUQ#-|MUwi^W_JEQZra^e3*4tgfz(I<&sC{o|U) z`NkJQ`^xKsfDi;8=NmsCzk0X%-PTV@2ZfJ6bkcJ2KYyPQ9{~Ig;5Pt&1wL;8U|^VeabduH0ocK`z!_#;0{{Rstbwd6e&YZD N002ovPDHLkV1h2`BX9r! literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/effects/gallery_page_curling.eff b/res/common/usr/share/osp/effects/gallery_page_curling.eff new file mode 100644 index 0000000000000000000000000000000000000000..b5122eaa927cd49a736a04dcfab1bc50a4707d2b GIT binary patch literal 5465 zcmaJ_2T)U8)24-H=xFG?NUu_)7pVdPDbk6AAcPWnS0W%?dKDoQ5fBsz9ijw8KY=L*QpxkT@g~0x)gmpFg;! z|K|^npma%~rl=7{xCCBjhaMiY!vUjQl1fSolx$!F6~}} zScjjfDZzx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d00001 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..51e896c --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,47 @@ +SET(SLP_INCLUDE_DIRS + /usr/include + /usr/include/appfw + /usr/include/appcore + /usr/include/sensor + /usr/include/glib-2.0 + /usr/lib/glib-2.0/include + /usr/include/cairo + /usr/include/chromium + /usr/include/dlog + /usr/include/dbus-1.0 + /usr/include/dri2 + /usr/include/libdrm + /usr/lib/dbus-1.0/include + /usr/include/e_dbus-1 + /usr/include/elementary-1 + /usr/include/efreet-1 + /usr/include/ecore-1 + /usr/include/edje-1 + /usr/include/evas-1 + /usr/include/eet-1 + /usr/include/eina-1 + /usr/include/eina-1/eina + /usr/include/ethumb-1 + /usr/include/freetype2 + /usr/include/fribidi + /usr/include/harfbuzz + /usr/include/libxml2 + /usr/include/minizip + /usr/include/pango-1.0 + /usr/include/pixman-1 + /usr/include/system + /usr/include/vconf + /usr/include/feedback +) + + +## Add SubModules +ADD_SUBDIRECTORY(graphics) +ADD_SUBDIRECTORY(graphics/opengl) +ADD_SUBDIRECTORY(ui) +ADD_SUBDIRECTORY(uifw) + + +INSTALL(FILES ${CMAKE_SOURCE_DIR}/sysinfo-screen.xml DESTINATION /etc/config/screen) +INSTALL(FILES ${CMAKE_SOURCE_DIR}/sysinfo-touch.xml DESTINATION /etc/config/touch) +INSTALL(FILES ${CMAKE_SOURCE_DIR}/clipboard.service DESTINATION /usr/lib/systemd/system/ PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ) diff --git a/src/app/FAppUiApp.cpp b/src/app/FAppUiApp.cpp new file mode 100644 index 0000000..e943df1 --- /dev/null +++ b/src/app/FAppUiApp.cpp @@ -0,0 +1,176 @@ +// +// 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 FAppUiApp.cpp + * @brief This is the implementation for the UiApp class. + */ + +#include +#include +#include + +#include +#include "FApp_AppImpl.h" +#include "FApp_UiAppImpl.h" +#include "FApp_AppInfo.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Ui::Controls; + +namespace Tizen { namespace App +{ + +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] Memory allocation failed."); +} + + +UiApp::~UiApp(void) +{ + delete __pUiAppImpl; +} + + +IAppFrame* +UiApp::GetAppFrame(void) const +{ + SysAssertf(__pUiAppImpl != null, "Getting UiApp instance failed."); + + return __pUiAppImpl->GetAppFrame(); +} + + +result +UiApp::AddFrame(const Frame& frame) +{ + SysAssertf(__pUiAppImpl != null, "Getting UiApp instance failed."); + + return __pUiAppImpl->AddFrame(frame); +} + + +result +UiApp::RemoveFrame(const Frame& frame) +{ + SysAssertf(__pUiAppImpl != null, "Getting UiApp instance failed."); + + return __pUiAppImpl->RemoveFrame(frame); +} + + +IList* +UiApp::GetFrameList(void) const +{ + SysAssertf(__pUiAppImpl != null, "Getting UiApp instance failed."); + + return __pUiAppImpl->GetFrameList(); +} + + +Frame* +UiApp::GetFrame(const String& name) const +{ + SysAssertf(__pUiAppImpl != null, "Getting UiApp instance failed."); + + return __pUiAppImpl->GetFrame(name); +} + + +Frame* +UiApp::GetFrameAt(int index) const +{ + SysAssertf(__pUiAppImpl != null, "Getting UiApp instance failed."); + + return __pUiAppImpl->GetFrameAt(index); +} + + +AppUiState +UiApp::GetAppUiState(void) const +{ + SysAssertf(__pUiAppImpl != null, "Getting UiApp instance failed."); + + return __pUiAppImpl->GetAppUiState(); +} + + +void +UiApp::OnForeground(void) +{ + +} + + +void +UiApp::OnBackground(void) +{ + +} + + +UiApp* +UiApp::GetInstance(void) +{ + _UiAppImpl* pUiAppImpl = _UiAppImpl::GetInstance(); + if (pUiAppImpl == null) + { + return null; + } + + return pUiAppImpl->GetUiAppInstance(); +} + + +result +UiApp::Execute(UiAppInstanceFactory pUiAppFactory, const IList* pArguments) +{ + result r = E_SUCCESS; + + SysTryReturnResult(NID_APP, pUiAppFactory != null, E_INVALID_ARG, "pUiAppFactory must not be null."); + SysTryReturnResult(NID_APP, pArguments != null, E_INVALID_ARG, "pArguments must not be null."); + _AppInfo::SetAppType(_APP_TYPE_UI_APP); + + ClearLastResult(); + UiApp* pUiApp = pUiAppFactory(); + SysTryReturnResult(NID_APP, pUiApp != null, E_OUT_OF_MEMORY, "App allocation failed."); + SysTryReturnResult(NID_APP, !IsFailed(GetLastResult()), E_OUT_OF_MEMORY, "App allocation failed with %s.", GetLastResult()); + + _AppImpl* pAppImpl = _AppImpl::GetInstance(); + SysTryReturnResult(NID_APP, pAppImpl != null, E_SYSTEM, "application instance is not available."); + + _UiAppImpl* pUiAppImpl = _UiAppImpl::GetInstance(); + SysTryReturnResult(NID_APP, pUiAppImpl != null, E_INVALID_STATE, "Getting UiApp instance failed."); + + r = pAppImpl->Construct(pArguments); + SysTryCatch(NID_APP, !IsFailed(r), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] %s.", GetErrorMessage(r)); + + r = pAppImpl->Execute(pUiAppImpl); + SysTryCatch(NID_APP, !IsFailed(r), r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] %s.", GetErrorMessage(r)); + +CATCH: + delete pUiApp; + + return r; +} + + +} } //Tizen::App diff --git a/src/app/FApp_AppFrame.cpp b/src/app/FApp_AppFrame.cpp new file mode 100644 index 0000000..a2d95fc --- /dev/null +++ b/src/app/FApp_AppFrame.cpp @@ -0,0 +1,162 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FApp_AppFrame.cpp + * @brief This is the implementation for the _AppFrame class. + */ + +#include + +#include + +#include "FApp_AppFrame.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; + +namespace Tizen { namespace App +{ + + +_AppFrame::_AppFrame(void) + : __pFrame(null) +{ +} + + +_AppFrame::_AppFrame(Frame& frame) + : __pFrame(&frame) +{ +} + + +_AppFrame::~_AppFrame(void) +{ +} + + +result +_AppFrame::Construct(void) +{ + result r = E_SUCCESS; + + return r; +} + + +result +_AppFrame::SetFrame(Frame* pFrame) +{ + result r = E_SUCCESS; + + __pFrame = pFrame; + + return r; +} + + +Canvas* +_AppFrame::GetCanvasN(void) const +{ + Canvas* pCanvas = null; + + SysTryCatch(NID_APP, __pFrame != null, , E_INVALID_STATE, "[E_INVALID_STATE] Frame instance must not be null."); + + pCanvas = __pFrame->GetCanvasN(); + SysTryCatch(NID_APP, pCanvas != null, , E_INVALID_STATE, "[E_SYSTEM] Failed while fetching the canvas."); + +CATCH: + return pCanvas; +} + + +result +_AppFrame::AddKeyEventListener(IKeyEventListener& listener) +{ + SysTryReturn(NID_APP, __pFrame != null, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] Frame instance must not be null."); + + __pFrame->AddKeyEventListener(listener); + + return E_SUCCESS; +} + + +result +_AppFrame::RemoveKeyEventListener(IKeyEventListener& listener) +{ + SysTryReturnResult(NID_APP, __pFrame != null, E_INVALID_STATE, "Frame instance must not be null."); + + __pFrame->RemoveKeyEventListener(listener); + + return E_SUCCESS; +} + + +result +_AppFrame::AddTouchEventListener(ITouchEventListener& listener) +{ + SysTryReturnResult(NID_APP, __pFrame != null, E_INVALID_STATE, "Frame instance must not be null."); + + __pFrame->AddTouchEventListener(listener); + + return E_SUCCESS; +} + + +result +_AppFrame::RemoveTouchEventListener(ITouchEventListener& listener) +{ + SysTryReturnResult(NID_APP, __pFrame != null, E_INVALID_STATE, "Frame instance must not be null."); + + __pFrame->RemoveTouchEventListener(listener); + + return E_SUCCESS; +} + + +result +_AppFrame::AddWindowEventListener(IWindowEventListener& listener) +{ + SysTryReturnResult(NID_APP, __pFrame != null, E_INVALID_STATE, "Frame instance must not be null."); + + __pFrame->AddWindowEventListener(listener); + + return E_SUCCESS; +} + + +result +_AppFrame::RemoveWindowEventListener(IWindowEventListener& listener) +{ + SysTryReturnResult(NID_APP, __pFrame != null, E_INVALID_STATE, "Frame instance must not be null."); + + __pFrame->RemoveWindowEventListener(listener); + + return E_SUCCESS; +} + + +Frame* +_AppFrame::GetFrame(void) +{ + return __pFrame; +} + + +} } // Tizen::App diff --git a/src/app/FApp_AppResourceBitmap.cpp b/src/app/FApp_AppResourceBitmap.cpp new file mode 100644 index 0000000..93e973c --- /dev/null +++ b/src/app/FApp_AppResourceBitmap.cpp @@ -0,0 +1,134 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FApp_AppResourceBitmap.cpp + * @brief This is the implementation for the _AppResourceBitmap class. + */ + +#include +#include +#include +#include +#include + +#include "FApp_AppResourceBitmap.h" +#include "FApp_AppResourceBitmapUtil.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Media; + +static const int BITMAP_PIXEL_FORMAT_INVALID = BITMAP_PIXEL_FORMAT_MIN; + +namespace Tizen { namespace App +{ + +_AppResourceBitmap::_AppResourceBitmap(void) + : __pAppResourceBitmapUtil(null) +{ +} + +_AppResourceBitmap::~_AppResourceBitmap(void) +{ +} + +_AppResourceBitmap* +_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] Memory allocation failed."); + + _AppResourceBitmap* pAppResourceBitmap = new (std::nothrow) _AppResourceBitmap(); + SysTryReturn(NID_APP, pAppResourceBitmap != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pAppResourceBitmap->__pAppResourceBitmapUtil = std::move(pAppResourceBitmapUtil); + + return pAppResourceBitmap; +} + +Bitmap* +_AppResourceBitmap::GetBitmapN(const String& imageFileName, BitmapPixelFormat pixelFormat, bool lazyDecoding) const +{ + ClearLastResult(); + SysTryReturn(NID_APP, imageFileName.IsEmpty() == false, null, E_INVALID_ARG, "[%s] The specified input parameter is invalid.", imageFileName.GetPointer()); + SysTryReturn(NID_APP, (pixelFormat >= BITMAP_PIXEL_FORMAT_MIN && pixelFormat < BITMAP_PIXEL_FORMAT_MAX), + null, E_UNSUPPORTED_FORMAT, "[E_UNSUPPORTED_FORMAT] The image file format or specified pixel format(%d) is not supported.", pixelFormat); + + // GetResourcePath + String resourcePath(null); + bool imageScaling(true); + _AppResourceBitmapUtil::_Density resourceDensity = _AppResourceBitmapUtil::DENSITY_NONE; + + result r = E_SUCCESS; + if(__pAppResourceBitmapUtil->GetAppResourceType() != _AppResourceBitmapUtil::APP_RESOURCE_BITMAP) + { + r = __pAppResourceBitmapUtil->GetResourcePath(imageFileName, resourcePath, resourceDensity, imageScaling); + SysTryReturn(NID_APP, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturn(NID_APP, resourcePath.IsEmpty() == false, null, E_FILE_NOT_FOUND, "[E_FILE_NOT_FOUND] The specified file does not exist."); + } + else + { + resourcePath = imageFileName; + imageScaling = false; + pixelFormat = BITMAP_PIXEL_FORMAT_ARGB8888; + } + + // GetBitmapN + Bitmap* pBitmap = null; + + if (pixelFormat == BITMAP_PIXEL_FORMAT_INVALID) + { + if (_ImageUtil::HasAlphaChannel(resourcePath)) + { + pBitmap = __pAppResourceBitmapUtil->GetBitmapN(resourcePath, resourceDensity, BITMAP_PIXEL_FORMAT_ARGB8888, imageScaling, null, lazyDecoding); + } + else + { + const Color& magentaColor = Color::GetColor(COLOR_ID_MAGENTA); + pBitmap = __pAppResourceBitmapUtil->GetBitmapN(resourcePath, resourceDensity, BITMAP_PIXEL_FORMAT_RGB565, imageScaling, &magentaColor, lazyDecoding); + } + } + else + { + pBitmap = __pAppResourceBitmapUtil->GetBitmapN(resourcePath, resourceDensity, pixelFormat, imageScaling, null, lazyDecoding); + } + r = GetLastResult(); + SysTryReturn(NID_APP, (pBitmap != null) && (r == E_SUCCESS), null, r, "[%s] Propagating.", GetErrorMessage(r)); + SysSecureLog(NID_APP, "The current value of bitmap path is %S(%S) and pixel format is %d", resourcePath.GetPointer(), imageScaling?L"scaled":L"not scaled", pixelFormat); + + return pBitmap; +} + +}} // Tizen::App + +#ifdef __cplusplus +extern "C" +{ +#endif + +_OSP_EXPORT_ Tizen::App::_IAppResourceBitmap* +_Create_IAppResourceBitmapInstanceN(int type = Tizen::App::_AppResourceBitmapUtil::APP_RESOURCE_DEFAULT, const String& value = L"") +{ + return Tizen::App::_AppResourceBitmap::Get_AppResourceBitmapN(type, value); +} + +#ifdef __cplusplus +} +#endif diff --git a/src/app/FApp_AppResourceBitmap.h b/src/app/FApp_AppResourceBitmap.h new file mode 100644 index 0000000..f443440 --- /dev/null +++ b/src/app/FApp_AppResourceBitmap.h @@ -0,0 +1,100 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FApp_AppResourceBitmap.h + * @brief This is the header file of the _AppResourceBitmap class. + */ + +#ifndef _FAPP_INTERNAL_APP_RESOURCE_BITMAP_H_ +#define _FAPP_INTERNAL_APP_RESOURCE_BITMAP_H_ + +#include + +#include +#include +#include +#include "FApp_IAppResourceBitmap.h" + +namespace Tizen { namespace App +{ + +class _AppResourceBitmapUtil; + +class _AppResourceBitmap + : public Tizen::Base::Object + , public _IAppResourceBitmap +{ +public: + /** + * Gets the bitmap at the specified path. @n + * The %GetBitmapN() method interprets the given resource path and reads the best matching image file for the current device resolution. @n + * To load the bitmap image from a file, give the name of the file as the input parameter and not the file path (For example: "img.png"). + * Then, the system will first look for the image file in the folder specific to the current device resolution, such as + * '720x1280' and if the file does not exist, it will then search the folder that corresponds to the current screen density, + * such as 'screen-density-xhigh'. After searching the density folder, all the other density folders are searched in the order high to low. + * Currently supported image formats are: JPEG, GIF, PNG, BMP, TIFF, and WBMP. + * + * In this method, the system decides the proper pixel format. + * Currently supported image formats are: JPEG, GIF, PNG, BMP, TIFF, and WBMP. + * + * @since 2.0 + * + * @return A pointer to the Tizen::Graphics::Bitmap instance generated from the specified file + * @param[in] imagePath The relative path starting from the density directory @b "res/screen-density-XXX/" or @b "res/AxB", @n + * where A and B represent the width and height of the screen of the supported device models, respectively + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_UNSUPPORTED_FORMAT The image file format is not supported. + * @exception E_FILE_NOT_FOUND The specified file cannot be found. + * @exception E_SYSTEM A system error has occurred. + * @remarks The specific error code can be accessed using the GetLastResult() method. + * @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. + */ + virtual Tizen::Graphics::Bitmap* GetBitmapN(const Tizen::Base::String& imagePath, Tizen::Graphics::BitmapPixelFormat pixelFormat, bool lazyDecoding = true) const; + + static _AppResourceBitmap* Get_AppResourceBitmapN(int type, const Tizen::Base::String& value); + +private: + /** + * This is the default constructor for this class. + */ + _AppResourceBitmap(void); + + /** + * This is the copy constructor for this class. + */ + _AppResourceBitmap(const _AppResourceBitmap& rhs); + + /** + * This is the destructor for this class. + */ + virtual ~_AppResourceBitmap(void); + + /** + * This is the assignment operator for this class. + */ + _AppResourceBitmap& operator =(const _AppResourceBitmap& rhs); + +private: + std::unique_ptr<_AppResourceBitmapUtil> __pAppResourceBitmapUtil; + +}; // _AppResourceBitmap + +}} // Tizen::App + +#endif // _FAPP_INTERNAL_APP_RESOURCE_BITMAP_H_ diff --git a/src/app/FApp_AppResourceBitmapUtil.cpp b/src/app/FApp_AppResourceBitmapUtil.cpp new file mode 100644 index 0000000..a743956 --- /dev/null +++ b/src/app/FApp_AppResourceBitmapUtil.cpp @@ -0,0 +1,511 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FApp_AppResourceBitmapUtil.cpp + * @brief This is the implementation for the _AppResourceBitmapUtil class. + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "FApp_AppInfo.h" +#include "FAppPkg_PackageInfoImpl.h" +#include "FApp_AppResourceBitmapUtil.h" + +using namespace Tizen::App::Package; +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Io; +using namespace Tizen::Media; +using namespace Tizen::Ui; + +namespace // unnamed +{ +MediaPixelFormat +ConvertBitmapPixelFormatToMediaPixelFormat(BitmapPixelFormat format) +{ + MediaPixelFormat out = MEDIA_PIXEL_FORMAT_NONE; + switch (format) + { + case BITMAP_PIXEL_FORMAT_RGB565: + out = MEDIA_PIXEL_FORMAT_RGB565LE; + break; + case BITMAP_PIXEL_FORMAT_ARGB8888: + out = MEDIA_PIXEL_FORMAT_BGRA8888; + break; + case BITMAP_PIXEL_FORMAT_R8G8B8A8: + out = MEDIA_PIXEL_FORMAT_RGBA8888; + break; + default: + break; + } + return out; +}} // unnamed namespace + +namespace Tizen { namespace Graphics +{ +result +_CreateCoordinateTransformer(_ICoordinateSystemTransformer*& pTransformer, int srcResolution, _BaseScreenSize srcBaseScreenSize, Dimension destResolution, _BaseScreenSize destBaseScreenSize); +}} // Tizen::Graphics + +namespace Tizen { namespace App +{ + +_AppResourceBitmapUtil::_AppResourceBitmapUtil(void) + : __physicalResolutionDim(0, 0) + , __physicalBaseScreenSize(BASE_SCREEN_SIZE_DEFAULT) + , __resolutionDirectories(L"") + , __sortedDensityDirectories() +{ + for (int i = 0; i < DENSITY_MAX; i++) + { + __sortedDensity[i] = DENSITY_NONE; + } + __physicalResolutionDim = _CoordinateSystem::GetInstance()->GetPhysicalResolutionDim(); + __physicalBaseScreenSize = _CoordinateSystem::GetInstance()->GetPhysicalBaseScreenSize(); +} + +_AppResourceBitmapUtil::~_AppResourceBitmapUtil(void) +{ +} + +_AppResourceBitmapUtil* +_AppResourceBitmapUtil::GetInstanceN(int type, const String& value) +{ + String resourceFolder(L""); + Tizen::App::_AppResourceBitmapUtil::AppResourceBy appResourceType = _AppResourceBitmapUtil::APP_RESOURCE_DEFAULT; + + switch(type) + { + case _AppResourceBitmapUtil::APP_RESOURCE_BITMAP: + appResourceType = _AppResourceBitmapUtil::APP_RESOURCE_BITMAP; + break; + case _AppResourceBitmapUtil::APP_RESOURCE_DEFAULT: + //fall through + case _AppResourceBitmapUtil::APP_RESOURCE_BY_LIBRARY_NAME: + //fall through + default: + resourceFolder = _AppInfo::GetAppRootPath(); + resourceFolder.Append(L"res/"); + if (!value.IsEmpty()) + { + resourceFolder.Append(value); + resourceFolder.Append(L'/'); + } + break; + case _AppResourceBitmapUtil::APP_RESOURCE_BY_APP_ID: + std::unique_ptr< PackageInfo> pPkgInfo(_PackageManagerImpl::GetInstance()->GetPackageInfoN(value)); + SysTryReturn(NID_APP, pPkgInfo != null, null, E_APP_NOT_INSTALLED, "[E_APP_NOT_INSTALLED] Failed to get the package info."); + + _PackageInfoImpl* pPkgInfoImpl = _PackageInfoImpl::GetInstance(pPkgInfo.get()); + SysTryReturn(NID_APP, pPkgInfoImpl != null, null, E_APP_NOT_INSTALLED, "[E_APP_NOT_INSTALLED] Failed to get the package info impl."); + + resourceFolder = pPkgInfoImpl->GetAppRootPath(); + resourceFolder.Append(L"/res/"); + break; + } + + std::unique_ptr< _AppResourceBitmapUtil > pAppResourceBitmapUtil(new (std::nothrow) _AppResourceBitmapUtil()); + SysTryReturn(NID_APP, pAppResourceBitmapUtil != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed." ); + + pAppResourceBitmapUtil->__resourceType = appResourceType; + + result r = pAppResourceBitmapUtil->Construct(resourceFolder); + SysTryReturn(NID_APP, r == E_SUCCESS, null, r, "[%s] Failed to construct _AppResourceBitmapUtil.", GetErrorMessage(r)); + + return pAppResourceBitmapUtil.release(); +} + +result +_AppResourceBitmapUtil::Construct(const String& resourceFolder) +{ + if (__resourceType == _AppResourceBitmapUtil::APP_RESOURCE_BITMAP) + { + SysLog(NID_APP, "This is a BitmapUtil for getting a non-scaling bitmap resource"); + return E_SUCCESS; + } + + int deviceDPI = 0; + result r = Tizen::System::_SystemInfoImpl::GetSysInfo(L"http://tizen.org/feature/screen.dpi", deviceDPI); + 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) + { + __resolutionDirectories = L""; + SysLog(NID_APP, "Failed to get a Device Resolution Directory path"); + } + + // 2. Get screen density & directory path matched device's DPI (e.g.screen-density-xhigh) + if (deviceDPI >= DPI_FOR_XHIGH) + { + __sortedDensity[0] = DENSITY_XHIGH; + } + else if (deviceDPI >= DPI_FOR_HIGH) + { + __sortedDensity[0] = DENSITY_HIGH; + } + else if (deviceDPI >= DPI_FOR_MIDDLE) + { + __sortedDensity[0] = DENSITY_MIDDLE; + } + else if (deviceDPI < DPI_FOR_MIDDLE && deviceDPI >= DPI_FOR_LOW) + { + __sortedDensity[0] = DENSITY_LOW; + } + else + { + __sortedDensity[0] = DENSITY_XHIGH; + SysLog(NID_APP, "Failed to get a Device Density (DPI = %d)", deviceDPI); + } + + if (GetDirectoryPath(resourceFolder, __sortedDensity[0], __sortedDensityDirectories[0]) == false) + { + __sortedDensityDirectories[0] = L""; + SysLog(NID_APP, "Failed to get a Device Density Directory path"); + } + + // 3. Get screen density & directory path with fall back system (XHIGH-HIGH-MIDDLE-LOW) + int densityIndex = 1; + + for (int currentDensity = DENSITY_XHIGH; currentDensity >= DENSITY_LOW; currentDensity--) + { + if (static_cast(__sortedDensity[0]) == currentDensity) + { + continue; + } + + SysAssert(densityIndex > 0 && densityIndex < DENSITY_MAX); + __sortedDensity[densityIndex] = static_cast<_Density>(currentDensity); + + if (GetDirectoryPath(resourceFolder, __sortedDensity[densityIndex], __sortedDensityDirectories[densityIndex]) == false) + { + __sortedDensityDirectories[densityIndex] = L""; + SysLog(NID_APP, "Failed to get a %dth Fall-Back Directory path", densityIndex); + } + + densityIndex++; + } + + return r; +} + +// Get Resource DirectoryPath +bool +_AppResourceBitmapUtil::GetDirectoryPath(const String& homePath, const _Density resourceDirectory, String& dirPath) const +{ + switch (resourceDirectory) + { + case DENSITY_NONE: + switch (__physicalResolutionDim.width) + { + case 720: + dirPath = L"720x1280"; + break; + + case 480: + dirPath = L"480x800"; + break; + + case 240: + dirPath = L"240x400"; + break; + + case 320: + dirPath = L"320x480"; + break; + + default: + break; + } + break; + + case DENSITY_XHIGH: + dirPath = L"screen-density-xhigh"; + break; + + case DENSITY_HIGH: + dirPath = L"screen-density-high"; + break; + + case DENSITY_MIDDLE: + dirPath = L"screen-density-middle"; + break; + + case DENSITY_LOW: + dirPath = L"screen-density-low"; + break; + + default: + dirPath = L'\0'; + return false; + } + + result r = dirPath.Insert(homePath, 0); + SysTryReturn(NID_APP, r == E_SUCCESS, false, r, "[%s] Failed to insert string.", GetErrorMessage(r)); + + if ( File::IsFileExist(dirPath) == false ) + { + dirPath = L'\0'; + return false; + } + return true; +} + +// Get Resource File Path +bool +_AppResourceBitmapUtil::GetFilePath(const String& directoryPath, const String& fileName, String& filePath) const +{ + if (directoryPath == L"") + { + filePath = L""; + return false; + } + + const String& normalizedPseudoPath = NormalizePath(fileName); + SysAssert(normalizedPseudoPath.StartsWith(L"/", 0)); + + filePath = directoryPath + normalizedPseudoPath; + return true; +} + +// Normalizing Path +String +_AppResourceBitmapUtil::NormalizePath(const String& path) const +{ + String normalizedPath = path; + + normalizedPath.Replace(L'\\', L'/'); + + if (normalizedPath.StartsWith(L"/", 0) == false) + { + result r = normalizedPath.Insert(L'/', 0); + SysTryLog(NID_APP, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + } + + return normalizedPath; +} + +// Get Matched Resource File Path +result +_AppResourceBitmapUtil::GetResourcePath(const String& fileName, String& resourcePath, _Density& resourceDensity, bool& imageScaling) const +{ + result r = E_SUCCESS; + + // 0. Try to check nine patch image + bool isNinePatchImage = false; + + if (_BitmapImpl::HasNinePatchedBitmapTag(fileName)) + { + isNinePatchImage = true; + SysLog(NID_APP, "%S is nine patch image", fileName.GetPointer()); + } + + // 1. Try to search resolution Folder + String resourcePathForResolution(L""); + + if (__resolutionDirectories.IsEmpty() == false && + GetFilePath(__resolutionDirectories, fileName, resourcePathForResolution)) + { + if (File::IsFileExist(resourcePathForResolution)) + { + resourcePath = resourcePathForResolution; + resourceDensity = DENSITY_NONE; + imageScaling = false; + + r = E_SUCCESS; + return r; + } + } + + // 2. Try to search resource directory matched device's DPI + String resourcePathForDensity(L""); + + if (__sortedDensityDirectories[0].IsEmpty() == false && + GetFilePath(__sortedDensityDirectories[0], fileName, resourcePathForDensity)) + { + if (File::IsFileExist(resourcePathForDensity)) + { + resourcePath = resourcePathForDensity; + resourceDensity = __sortedDensity[0]; + imageScaling = isNinePatchImage ? false : _CoordinateSystem::GetInstance()->IsTransformEnabled(); + + r = E_SUCCESS; + return r; + } + } + + // 3. Try to find the alternative path with fall back + int fallbackIndex = 1; + String alternativeResourcePath(L""); + + for (int findingDensity = DENSITY_XHIGH; findingDensity > DENSITY_LOW; findingDensity--) + { + if (__sortedDensityDirectories[fallbackIndex].IsEmpty() == false && + GetFilePath(__sortedDensityDirectories[fallbackIndex], fileName, alternativeResourcePath)) + { + if (File::IsFileExist(alternativeResourcePath)) + { + resourcePath = alternativeResourcePath; + resourceDensity = __sortedDensity[fallbackIndex]; + imageScaling = !isNinePatchImage; + + r = E_SUCCESS; + return r; + } + } + fallbackIndex++; + } + + SysTryReturn(NID_APP, r == E_SUCCESS, E_FILE_NOT_FOUND, E_FILE_NOT_FOUND, "[E_FILE_NOT_FOUND] The specified file cannot be found."); + + return r; +} + +// GetBitmapN +Bitmap* +_AppResourceBitmapUtil::GetBitmapN(const String& resourcePath, const _Density resourceDensity, + BitmapPixelFormat pixelFormat, bool imageScaling, const Color* pChromaKeyColor, bool lazyDecoding) const +{ + ClearLastResult(); + SysTryReturn(NID_APP, (pixelFormat > BITMAP_PIXEL_FORMAT_MIN && pixelFormat < BITMAP_PIXEL_FORMAT_MAX), null, + E_UNSUPPORTED_FORMAT, "[E_UNSUPPORTED_FORMAT] The image file format or specified pixel format(%d) is not supported.", pixelFormat); + + result r = E_SUCCESS; + + std::unique_ptr pBitmap; + + if (!pChromaKeyColor && imageScaling == false) // NonScaling + { + if (lazyDecoding) + { + pBitmap.reset(new (std::nothrow) Bitmap()); + SysTryReturn(NID_APP, pBitmap != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = _BitmapImpl::GetInstance(*pBitmap)->Construct(resourcePath, pixelFormat); + } + else + { + MediaPixelFormat format = ConvertBitmapPixelFormatToMediaPixelFormat(pixelFormat); + int imageWidth(-1); + int imageHeight(-1); + + std::unique_ptr pBuffer(_ImageDecoder::DecodeToBufferN(resourcePath, format, imageWidth, imageHeight)); + r = GetLastResult(); + SysTryReturn(NID_APP, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturn(NID_APP, pBuffer != null, null, E_SYSTEM, "[E_SYSTEM] A system error has occurred."); + + pBitmap.reset(_BitmapImpl::GetNonScaledBitmapN(*pBuffer, Dimension(imageWidth, imageHeight), pixelFormat)); + SysTryReturn(NID_APP, pBitmap != null, null, E_SYSTEM, "[E_SYSTEM] A system error has occurred."); + r = GetLastResult(); + } + SysTryReturn(NID_APP, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + return pBitmap.release(); + } + else // Scaling + { + MediaPixelFormat format = ConvertBitmapPixelFormatToMediaPixelFormat(pixelFormat); + int imageWidth(-1); + int imageHeight(-1); + + std::unique_ptr pBuffer(_ImageDecoder::DecodeToBufferN(resourcePath, format, imageWidth, imageHeight)); + r = GetLastResult(); + SysTryReturn(NID_APP, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturn(NID_APP, pBuffer != null, null, E_SYSTEM, "[E_SYSTEM] A system error has occurred."); + + pBitmap.reset(_BitmapImpl::GetNonScaledBitmapN(*pBuffer, Dimension(imageWidth, imageHeight), pixelFormat)); + r = GetLastResult(); + SysTryReturn(NID_APP, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturn(NID_APP, pBitmap != null, null, E_SYSTEM, "[E_SYSTEM] A system error has occurred."); + + int resourceLogicalCoordinate = __physicalResolutionDim.width; + + switch (resourceDensity) + { + case DENSITY_XHIGH: + resourceLogicalCoordinate = 720; + break; + + case DENSITY_HIGH: + resourceLogicalCoordinate = 480; + break; + + case DENSITY_MIDDLE: + resourceLogicalCoordinate = 320; + break; + + case DENSITY_LOW: + resourceLogicalCoordinate = 240; + break; + + default: + break; + } + + _ICoordinateSystemTransformer* pTempXformer(null); + r = _CreateCoordinateTransformer(pTempXformer, + resourceLogicalCoordinate, __physicalBaseScreenSize, + Dimension(_CoordinateSystem::GetInstance()->GetLogicalResolutionInt(), _CoordinateSystem::GetInstance()->GetLogicalResolutionInt()), _CoordinateSystem::GetInstance()->GetLogicalBaseScreenSize()); + + std::unique_ptr<_ICoordinateSystemTransformer> pXformer(pTempXformer); + SysTryReturn(NID_APP, pXformer != null, null, E_SYSTEM, "[E_SYSTEM] A system error has occurred."); + SysTryReturn(NID_APP, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + FloatDimension physicalImageDim = _CoordinateSystemUtils::ConvertToFloat(Dimension(imageWidth, imageHeight)); + FloatDimension logicalImageSize = pXformer->Transform(physicalImageDim); + 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."); + } + + if (pChromaKeyColor != null) + { + r = pBitmap->SetMaskingColor(pChromaKeyColor); + SysTryReturn(NID_APP, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + SetLastResult(E_SUCCESS); + + return pBitmap.release(); +} + +Tizen::App::_AppResourceBitmapUtil::AppResourceBy +_AppResourceBitmapUtil::GetAppResourceType(void) +{ + return __resourceType; +} + +}} // Tizen::App diff --git a/src/app/FApp_AppResourceBitmapUtil.h b/src/app/FApp_AppResourceBitmapUtil.h new file mode 100644 index 0000000..07a45c5 --- /dev/null +++ b/src/app/FApp_AppResourceBitmapUtil.h @@ -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 FApp_AppResourceBitmapUtil.h + * @brief This is the header file of the _AppResourceBitmapUtil. + */ + +#ifndef _FAPP_INTERNAL_APP_RESOURCE_BITMAP_UTIL_H_ +#define _FAPP_INTERNAL_APP_RESOURCE_BITMAP_UTIL_H_ + +#include +#include +#include +#include +#include + +namespace Tizen { namespace Graphics +{ +class Bitmap; +class Color; +}} // Tizen::Graphics + +namespace Tizen { namespace Media +{ +class Image; +}} // Tizen::Media + +namespace Tizen { namespace App +{ +class _AppResourceBitmapUtil + : public Tizen::Base::Object +{ +public: + enum _Density + { + DENSITY_NONE = -1, + + DENSITY_LOW = 0, + DENSITY_MIDDLE = 1, + DENSITY_HIGH = 2, + DENSITY_XHIGH = 3, + + DENSITY_MAX = 4 + }; + + enum AppResourceBy + { + APP_RESOURCE_DEFAULT, + APP_RESOURCE_BY_APP_ID, + APP_RESOURCE_BY_LIBRARY_NAME, + APP_RESOURCE_BITMAP + }; + + // This is the default constructor for this class. + _AppResourceBitmapUtil(void); + + // This is the destructor for this class. + virtual ~_AppResourceBitmapUtil(void); + + //Get device's DPI, application's logical resolution and set fall back system + result Construct(const Tizen::Base::String& resourceFolder); + + // Generates the directory path from the specified resolution. + bool GetDirectoryPath(const Tizen::Base::String& homePath, _Density resourceDirectory, Tizen::Base::String& dirPath) const; + + // Generates the real path using a pseudo-path and the specified resolution. + bool GetFilePath(const Tizen::Base::String& directoryPath, const Tizen::Base::String& fileName, Tizen::Base::String& filePath) const; + + // The normalized path starts with and is divided by '/'. + // ex. L"/Dir1/Dir2/Dir3/File" + Tizen::Base::String NormalizePath(const Tizen::Base::String& path) const; + + // Generates the real path and examine whether the size of the resource is logical or physical by processing the input path. + result GetResourcePath(const Tizen::Base::String& fileName, Tizen::Base::String& resourcePath, _Density& resourceDensity, bool& imageScaling) const; + + // Create Bitmap from real image path + Tizen::Graphics::Bitmap* GetBitmapN(const Tizen::Base::String& resourcePath, _Density resourceDensity, + Tizen::Graphics::BitmapPixelFormat pixelFormat, bool imageScaling, const Tizen::Graphics::Color* pChromaKeyColor = null, bool lazyDecoding = true) const; + + static _AppResourceBitmapUtil* GetInstanceN(int type = APP_RESOURCE_DEFAULT, const Tizen::Base::String& value = L""); + + Tizen::App::_AppResourceBitmapUtil::AppResourceBy GetAppResourceType(void); + +private: + // This is the copy constructor for this class. + _AppResourceBitmapUtil(const _AppResourceBitmapUtil& rhs); + + // This is the assignment operator for this class. + _AppResourceBitmapUtil& operator =(const _AppResourceBitmapUtil& rhs); + +private: + static const int DPI_FOR_XHIGH = 290; + static const int DPI_FOR_HIGH = 200; + static const int DPI_FOR_MIDDLE = 150; + static const int DPI_FOR_LOW = 0; + + Tizen::Graphics::Dimension __physicalResolutionDim; + Tizen::Graphics::_BaseScreenSize __physicalBaseScreenSize; + + // resource directory path for only device's resolution. + Tizen::Base::String __resolutionDirectories; + + /** + * Index information of __sortedDensity & __sortedDensityDirectories. + * '0' is for screen density matched device's DPI. + * '1', '2', '3' is for screen density with fall back system. + */ + _Density __sortedDensity[DENSITY_MAX]; + Tizen::Base::String __sortedDensityDirectories[DENSITY_MAX]; + + Tizen::App::_AppResourceBitmapUtil::AppResourceBy __resourceType; + +}; // _AppResourceBitmapUtil + +}} // Tizen::App + +#endif // _FAPP_INTERNAL_APP_RESOURCE_BITMAP_UTIL_H_ diff --git a/src/app/FApp_CoordinateInfo.cpp b/src/app/FApp_CoordinateInfo.cpp new file mode 100644 index 0000000..9e589cc --- /dev/null +++ b/src/app/FApp_CoordinateInfo.cpp @@ -0,0 +1,187 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FApp_CoordinateInfo.cpp + * @brief This is the implementation for the _CoordinateInfo class. + */ + +#include +#include +#include +#include + +#include +#include +#include +#include + +using namespace Tizen::Base; +using namespace Tizen::Base::Utility; +using namespace Tizen::App; +using namespace Tizen::App::Package; +using namespace Tizen::Io; +using namespace Tizen::Graphics; + +namespace Tizen { namespace App +{ + +const wchar_t* _coord_info_file = L"uiscalability.info"; + +result +_CoordinateInfo::GetAppCoordinateSystem(bool& isCoordinateSystemLogical, int& logicalCoordinateSystemInt, _BaseScreenSize& logicalBaseScreenSize) +{ + result r; + + r = _CoordinateInfo::GetAppCoordinateSystemFromInfoFile(isCoordinateSystemLogical, logicalCoordinateSystemInt, logicalBaseScreenSize); + + if (r != E_SUCCESS) + r = _CoordinateInfo::GetAppCoordinateSystemFromDatabase(isCoordinateSystemLogical, logicalCoordinateSystemInt, logicalBaseScreenSize); + + return r; +} + +result +_CoordinateInfo::GetAppCoordinateSystemFromInfoFile(bool& isCoordinateSystemLogical, int& logicalCoordinateSystemInt, _BaseScreenSize& logicalBaseScreenSize) +{ + // Get UI scalability info from info/[appId]uiscalability.info + String uiScalabilityInfoString; + result r = E_SUCCESS; + const String appId(_AppInfo::GetApplicationId()); + SysTryReturnResult(NID_APP, appId != null, E_OBJ_NOT_FOUND, "Cannot get application id"); + + { + File uiScalabilityInfoFile; + const String scalabilityInfoFilePath(L"info/" + appId + L"/" + _coord_info_file); + + // Get UI Scalability Infomation + r = uiScalabilityInfoFile.Construct(_AppInfo::GetAppRootPath() + scalabilityInfoFilePath, L"r"); + SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "Propagating."); + + r = uiScalabilityInfoFile.Read(uiScalabilityInfoString); + SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "Propagating."); + } + + StringTokenizer infoTokenizer(uiScalabilityInfoString, L" "); + + // Check MagicNumer of UI scalability info + { + String magicNumString(null); + r = infoTokenizer.GetNextToken(magicNumString); + SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "Propagating."); + + int magicNumber = 0; + r = Integer::Parse(magicNumString, 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, "Propagating."); + + if (coordinateSystem.Equals(L"Physical", false)) + { + isCoordinateSystemLogical = false; + logicalCoordinateSystemInt = 0; + logicalBaseScreenSize = BASE_SCREEN_SIZE_DEFAULT; + + return E_SUCCESS; + } else if (coordinateSystem.Equals(L"Logical", false)){ + isCoordinateSystemLogical = true; + // Get Base Screen + String baseScreenSize(null); + r = infoTokenizer.GetNextToken(baseScreenSize); + SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "Propagating."); + + // logicalBaseScreenSize + if (baseScreenSize.Equals(L"Large", false)) + { + logicalBaseScreenSize = BASE_SCREEN_SIZE_LARGE; + } + else + { + logicalBaseScreenSize = BASE_SCREEN_SIZE_NORMAL; + } + + // Get Application Logical Resolution + String logicalCoordinate(null); + r = infoTokenizer.GetNextToken(logicalCoordinate); + SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "Propagating."); + + r = Integer::Parse(logicalCoordinate, logicalCoordinateSystemInt); + 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()); + + } else { + SysLog(NID_APP, "Cannot recognize the UI scalability information (check [app_root_dir]/info/%ls/%s", appId.GetPointer(),_coord_info_file); + return E_FAILURE; + } + + return r; +} + +result +_CoordinateInfo::GetAppCoordinateSystemFromDatabase(bool& isCoordinateSystemLogical, int& logicalCoordinateSystemInt, _BaseScreenSize& logicalBaseScreenSize) +{ + _PackageInfoImpl infoImpl; + + { + result r = infoImpl.Construct(_AppInfo::GetPackageId()); + SysTryReturn(NID_APP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + String baseScreenSize; + String coordinateSystem; + String logicalCoordinate; + + result r = infoImpl.GetUiScalabilityInfo(baseScreenSize, coordinateSystem, logicalCoordinate); + SysTryReturn(NID_APP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (coordinateSystem.Equals(L"Physical", false)) + { + isCoordinateSystemLogical = false; + logicalCoordinateSystemInt = 0; + logicalBaseScreenSize = BASE_SCREEN_SIZE_DEFAULT; + + return E_SUCCESS; + } else { + isCoordinateSystemLogical = true; + } + + //Logical Resolution + r = Integer::Parse(logicalCoordinate, logicalCoordinateSystemInt); + SysTryReturn(NID_APP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + // BaseScreenSize + if (baseScreenSize.Equals(L"Large", false)) + { + logicalBaseScreenSize = BASE_SCREEN_SIZE_LARGE; + } + else + { + // temp + logicalBaseScreenSize = BASE_SCREEN_SIZE_NORMAL; + } + + return r; +} + +} } //Tizen::App + diff --git a/src/app/FApp_ThemeInfo.cpp b/src/app/FApp_ThemeInfo.cpp new file mode 100644 index 0000000..debcf7c --- /dev/null +++ b/src/app/FApp_ThemeInfo.cpp @@ -0,0 +1,158 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FApp_ThemeInfo.cpp + * @brief This is the implementation for the _ThemeInfo class. + */ + +#include +#include +#include +#include + +#include +#include +#include + +using namespace Tizen::Base; +using namespace Tizen::Base::Utility; +using namespace Tizen::App; +using namespace Tizen::App::Package; +using namespace Tizen::Io; + +namespace Tizen { namespace App +{ + +const wchar_t* _theme_info_file = L"uitheme.info"; + +result +_ThemeInfo::LoadThemeInformation(String& systemTheme, String& userTheme) +{ + result r; + + r = _ThemeInfo::LoadThemeInfoFromInfoFile(systemTheme, userTheme); + + if( r != E_SUCCESS) + { + r = _ThemeInfo::LoadThemeInfoFromDatabase(systemTheme, userTheme); + } + + return r; +} + +result +_ThemeInfo::LoadThemeInfoFromInfoFile(String& systemTheme, String& userTheme) +{ + AppId appId = _AppInfo::GetApplicationId(); + SysLog(NID_UI, "AppId = %ls" , appId.GetPointer()); + String uiThemeInfoString; + result r; + + // Get UI theme info from info/[appId]/uitheme.info + { + const String themeInfoFilePath(L"info/" + appId + L"/" + _theme_info_file); + + 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" "); + + // Check magic number of UI theme info + { + String magicNumString(null); + r = infoTokenizer.GetNextToken(magicNumString); + SysTryReturnResult(NID_APP, r == E_SUCCESS, r, "Propagating."); + + int magicNumber = 0; + r = Integer::Parse(magicNumString, 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, "Propagating."); + + if (_systemTheme.Equals(L"White", false)) + { + systemTheme = L"white"; + } + else if (_systemTheme.Equals(L"Default", false)) + { + systemTheme = L"default"; + } + else + { + // By default, black system theme + systemTheme = L"black"; + } + SysLog(NID_UI, "Application UI Theme : %ls" , systemTheme.GetPointer()); + + // Get User Defined Theme + String _userTheme(null); + r = infoTokenizer.GetNextToken(_userTheme); + + if (!(_userTheme.IsEmpty())) + { + SysLog(NID_UI, "Custom theme :%ls" , _userTheme.GetPointer()); + userTheme = _userTheme; + } + + return E_SUCCESS; +} + +result +_ThemeInfo::LoadThemeInfoFromDatabase(String& systemTheme, String& userTheme) +{ + AppId appId = _AppInfo::GetApplicationId(); + SysLog(NID_UI, "AppId = %ls" , appId.GetPointer()); + _PackageAppInfoImpl packageManager; + packageManager.Construct(appId); + String key = packageManager.GetAppFeature(L"UserDefinedTheme"); + if (!(key.IsEmpty())) + { + SysLog(NID_UI, "Custom theme %ls" , key.GetPointer()); + userTheme = key; + } + key = packageManager.GetAppFeature(L"SystemTheme"); + if (key.IsEmpty()) + { + systemTheme = L"black"; + } + else + { + SysLog(NID_UI, "System theme %ls" , key.GetPointer()); + systemTheme = key; + systemTheme.ToLowerCase(); + } + return E_SUCCESS; +} + +} } //Tizen::App + diff --git a/src/app/FApp_UiAppImpl.cpp b/src/app/FApp_UiAppImpl.cpp new file mode 100644 index 0000000..9f7696e --- /dev/null +++ b/src/app/FApp_UiAppImpl.cpp @@ -0,0 +1,703 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FApp_UiAppImpl.cpp + * @brief This is the implementation for the _UiAppImpl class. + */ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "FApp_AppFrame.h" +#include "FApp_AppInfo.h" +#include "FApp_AppImpl.h" +#include "FApp_UiAppImpl.h" +#include "FApp_AppArg.h" + +using namespace std; +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; +using namespace Tizen::System; +using namespace Tizen::Graphics; + + +extern "C" int appsvc_request_transient_app(bundle*, Ecore_X_Window, appsvc_host_res_fn, void*); +extern "C" int appcore_set_app_state(int); + +namespace Tizen { namespace App +{ + +_UiAppImpl* _UiAppImpl::__pUiAppImpl = null; + + +_UiAppImpl::_UiAppImpl(UiApp* pUiApp) + : __pAppFrame(null) + , __pAppImpl(_AppImpl::GetInstance()) + , __appUiState(APP_UI_STATE_BACKGROUND) + , __pFrameList(null) + , __pUiApp(pUiApp) +{ + __pUiAppImpl = this; + __pFrameList = new (std::nothrow) ArrayList(); + SysTryReturnVoidResult(NID_APP, __pFrameList != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + __pFrameList->Construct(); + SysTryReturnVoidResult(NID_APP, __pAppImpl != null, E_INVALID_STATE, "[E_INVALID_STATE] Getting internal instance failed."); +} + + +_UiAppImpl::~_UiAppImpl(void) +{ + RemoveAllFrames(); + + delete __pAppFrame; + __pUiAppImpl = null; +} + + +bool +_UiAppImpl::OnCreate(void) +{ + SysLog(NID_APP, "Platform creation event."); + + _AppInfo::SetAppState(INITIALIZING); + + return true; +} + + +void +_UiAppImpl::RaiseFrame(Frame& frame) +{ + _FrameImpl* pFrameImpl = _FrameImpl::GetInstance(frame); + + if (pFrameImpl) + { + // [N_SE-39536] Window raise is requested as synchronous due to B/S issue + _EcoreEvas* pEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + if (pEvas) + { + pEvas->ActivateWindow(pFrameImpl->GetCore()); + } + } +} + + +long +_UiAppImpl::GetTargetWindowHandle(void) const +{ + result r = E_SUCCESS; + + _EcoreEvasMgr* pEcoreEvasMgr = GetEcoreEvasMgr(); + r = GetLastResult(); + SysTryReturn(NID_APP, pEcoreEvasMgr, -1, r, "Propagating."); + + _EcoreEvas* pEcoreEvas = pEcoreEvasMgr->GetEcoreEvas(); + r = GetLastResult(); + SysTryReturn(NID_APP, pEcoreEvas, -1, r, "Propagating."); + + Atom actualTypeReturn; + int actualFormatReturn; + unsigned long nItemsReturn; + unsigned long bytesAfterReturn; + unsigned char* pPropReturn = null; + + gint ret = 0; + ret = XGetWindowProperty(static_cast(ecore_x_display_get()), + ecore_x_window_root_get(pEcoreEvas->GetXWindow()), + ecore_x_atom_get("_ISF_ACTIVE_WINDOW"), + 0, + G_MAXLONG, + false, + XA_WINDOW, + &actualTypeReturn, + &actualFormatReturn, + &nItemsReturn, + &bytesAfterReturn, + &pPropReturn); + SysTryReturn(NID_APP, ret == Success, -1, E_SYSTEM, "A failure occurs from the underlying system."); + + Ecore_X_Window targetWindow = 0; + + if (pPropReturn) + { + if (actualTypeReturn == XA_WINDOW) + { + targetWindow = *(reinterpret_cast(pPropReturn)); + SysLog(NID_APP, "The handle of the target window is %x.", targetWindow); + } + + XFree(pPropReturn); + } + + return targetWindow? targetWindow: -1; +} + + +static int +TransientResponseCb(void* pData) +{ + SysLog(NID_APP, "Handling cleanup for submode app."); + + // platform invokes ecore_main_loop_quit() after returning this callback + return 0; +} + +void +_UiAppImpl::OnService(service_s* service, bool initial) +{ + Frame* pFrame = (__pFrameList) ? dynamic_cast(__pFrameList->GetAt(0)) : null; + _EcoreEvas* pEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + + const int type = _AppInfo::GetAppType(); + + if (type & _APP_TYPE_IME_APP) + { + bundle* pBundle = _AppArg::GetBundleFromSvc(service); + const int pid = _AppArg::GetCallerPid(pBundle); + if (pid > 0) + { + SysLogException(NID_APP, E_SYSTEM, "ImeApp should not be the target for launch API (caller : %d).", pid); + _Process::Exit(-1); + } + } + + // make OnForeground event + if (pFrame != null) + { + // handle submode + if (pEvas && _AppInfo::IsSubMode()) + { + unsigned int win = 0; + service_get_window(service, &win); + + _FrameImpl* pFrameImpl = _FrameImpl::GetInstance(*pFrame); + if (static_cast(win) > 0 && pFrameImpl != null) + { + const unsigned int curHandle = pFrameImpl->GetNativeHandle(); + + bundle* pBundle = _AppArg::GetBundleFromSvc(service); + const int pid = _AppArg::GetCallerPid(pBundle); + if (pid <= 0 || ((kill(pid, 0) < 0) && errno == ESRCH)) + { + SysLogException(NID_APP, E_SYSTEM, "Caller process %d with %d not exist : terminating %d.", pid, win, getpid()); + _Process::Exit(-1); + } + + int ret = appsvc_request_transient_app(pBundle, curHandle, TransientResponseCb, NULL); + + SysLog(NID_APP, "Transient sets for (0x%x) with result (%d).", curHandle, ret); + } + } + + if (initial) + { + const int type = _AppInfo::GetAppType(); + if (type & _APP_TYPE_IME_APP) + { + SysLog(NID_APP, "Skipping 1st resume for IME app."); + } + else + { + OnResume(); + } + } + } + + // [INFO] to confirm that the window is not foreground + if (pEvas) + { + int pid = pEvas->GetProcessId(pEvas->GetActiveWindow()); + SysLog(NID_APP, "%d -> %d", pid, _AppInfo::GetProcessId()); + if (pid != _AppInfo::GetProcessId()) + { + if (!initial) + { + if (pFrame != null) + { + _FrameImpl* pFrameImpl = _FrameImpl::GetInstance(*pFrame); + + // [FIXME] Multi window handling + if (pFrameImpl != null) + { + //pEvas->ActivateWindow(pFrameImpl->GetCore()); + + unique_ptr pEventArgs(new (std::nothrow) ArrayList()); + SysTryReturnVoidResult(NID_APP, pEventArgs, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + pEventArgs->Construct(); + + unique_ptr pString(new (std::nothrow) Tizen::Base::String(L"ActivateFrame")); + SysTryReturnVoidResult(NID_APP, pString, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + + pEventArgs->Add(*(pString.get())); + + _UiNotificationEvent event(pFrameImpl->GetCore().GetHandle(), pEventArgs.get()); + + result r = _UiEventManager::GetInstance()->PostEvent(event); + SysTryReturnVoidResult(NID_APP, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + pString.release(); + pEventArgs.release(); + + // N_SE-24616, N_SE-24383 for OnForground() and visibility issue + OnResume(); + } + } + } + } + } +} + + +void +_UiAppImpl::OnTerminate(void) +{ + SysLog(NID_APP, "Termination event 0x%x state", _AppInfo::GetAppState()); + + if (__pUiApp->GetAppUiState() == APP_UI_STATE_FOREGROUND) + { + OnPause(); + } + + if (OnUiAppImplTerminating() != true) + { + SysLog(NID_APP, "[E_SYSTEM] The Termination of application failed."); + } +} + + +void +_UiAppImpl::OnResume(void) +{ + SysLog(NID_APP, "System resume event on 0x%x state", _AppInfo::GetAppState()); + + if (_AppInfo::GetAppState() == RUNNING) + { + OnForeground(); + } +} + + +void +_UiAppImpl::OnPause(void) +{ + SysLog(NID_APP, "System pause event on 0x%x state", _AppInfo::GetAppState()); + + if (_AppInfo::GetAppState() == RUNNING) + { + OnBackground(); + } +} + + +result +_UiAppImpl::OnFrameRaiseRequested(void) +{ + SysLog(NID_APP, "Frame raise is requested."); + + Frame* pFrame = null; + if (__pFrameList == null || (pFrame = dynamic_cast(__pFrameList->GetAt(0))) == null) + { + SysLog(NID_APP, "No frame is available."); + return E_SUCCESS; + } + + if (__appUiState == APP_UI_STATE_FOREGROUND) + { + SysLog(NID_APP, "Already foreground state."); + return E_SUCCESS; + } + + RaiseFrame(*pFrame); + return E_SUCCESS; +} + + +long +_UiAppImpl::OnWindowHandleRequest(void) +{ + long handle = -1; + const int type = _AppInfo::GetAppType(); + + if (!(type & _APP_TYPE_IME_APP)) + { + const _EcoreEvas* const pEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + handle = (pEvas) ? static_cast(pEvas->GetXWindow()) : -1; + } + + return handle; +} + + +result +_UiAppImpl::AddFrame(const Frame& frame) +{ + result r = E_SUCCESS; + Frame& tmpFrame = const_cast (frame); + + SysTryReturnResult(NID_APP, __pFrameList != null, E_INVALID_STATE, "Getting FrameList failed."); + SysTryReturnResult(NID_APP, !__pFrameList->Contains(tmpFrame), E_OBJ_ALREADY_EXIST, "The frame is already registered."); + + _WindowImpl* pFrameImpl = _WindowImpl::GetInstance(tmpFrame); + SysTryReturnResult(NID_APP, pFrameImpl != null, E_INVALID_ARG, "The frame is not constructed yet."); + + __pFrameList->Add(tmpFrame); + r = pFrameImpl->Open(false); // Attach to the main tree without 'draw & show'. + if (IsFailed(r)) + { + SysLog(NID_UI, "Failed to attach frame."); + __pFrameList->Remove(tmpFrame); + } + + return r; +} + + +IAppFrame* +_UiAppImpl::GetAppFrame(void) +{ + SysTryReturn(NID_APP, __pFrameList != null, null, E_INVALID_STATE, "[E_INVALID_STATE] Getting FrameList failed."); + int frameCount = __pFrameList->GetCount(); + + if (frameCount <= 0) + { + SysLogException(NID_APP, E_OBJ_NOT_FOUND, "There is no frame !!! use AddFrame() before call GetAppFrame()"); + SysAssertf(false, "There is no frame !!! use AddFrame() before call GetAppFrame()"); + } + + Frame* pFrame = dynamic_cast (__pFrameList->GetAt(frameCount - 1)); + + if (pFrame == null) + { + SysLogException(NID_APP, E_OBJ_NOT_FOUND, "There is no frame !!! use AddFrame() before call GetAppFrame()"); + SysAssertf(false, "There is no frame !!! use AddFrame() before call GetAppFrame()"); + } + + if (__pAppFrame == null) + { + __pAppFrame = new (std::nothrow) _AppFrame(*pFrame); + SysTryReturn(NID_APP, __pAppFrame != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + __pAppFrame->Construct(); + } + else if (__pAppFrame->GetFrame() != pFrame) + { + __pAppFrame->SetFrame(pFrame); + } + + return __pAppFrame; +} + + +result +_UiAppImpl::RemoveFrame(const Frame& frame) +{ + if (__pFrameList == null) + { + SysLog(NID_APP, "No framelist available."); + return E_SUCCESS; + } + + Frame& tmpFrame = const_cast (frame); + _WindowImpl* pFrameImpl = _WindowImpl::GetInstance(tmpFrame); + + const result r = __pFrameList->Remove(frame, false); + + if (pFrameImpl) + { + pFrameImpl->Destroy(); + } + + return r; +} + + +result +_UiAppImpl::RemoveAllFrames(void) +{ + if (__pFrameList == null) + { + SysLog(NID_APP, "No framelist available."); + return E_SUCCESS; + } + + int frameCount = __pFrameList->GetCount(); + for (int i = 0; i < frameCount; i++) + { + Frame* pFrame = dynamic_cast (__pFrameList->GetAt(i)); + if (pFrame) + { + _WindowImpl* pFrameImpl = _WindowImpl::GetInstance(*pFrame); + if (pFrameImpl) + { + pFrameImpl->Destroy(); + } + } + } + + if (__pFrameList->GetCount() > 0) + { + __pFrameList->RemoveAll(false); + } + + delete __pFrameList; + __pFrameList = null; + + return E_SUCCESS; +} + + +IList* +_UiAppImpl::GetFrameList(void) +{ + return __pFrameList; +} + + +Frame* +_UiAppImpl::GetFrame(const String& name) +{ + 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++) + { + Frame* pFrame = dynamic_cast (__pFrameList->GetAt(i)); + + if (pFrame != null && pFrame->GetName() == name) + { + return pFrame; + } + } + + return null; +} + + +Frame* +_UiAppImpl::GetFrameAt(int index) +{ + 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."); + + Frame* pFrame = dynamic_cast (__pFrameList->GetAt(index)); + + return pFrame; +} + +bool +_UiAppImpl::OnAppInitializing(void) +{ + // Do Ui related initializing for UiApp + result r = InitializeUiFramework(); + if (IsFailed(r)) + { + SysLogException(NID_APP, E_SYSTEM, "Getting resolution information failure. Application may not be installed correctly."); + _Process::Exit(-1); + } + + _KeyEventManager* pKeyManager = _KeyEventManager::GetInstance(); + if (pKeyManager) + { + pKeyManager->AddKeyEventListener(*this); + } + + // API versioning for initial frame creation + if (_AppInfo::GetApiVersion() == _API_VERSION_2_0 && _AppInfo::IsOspCompat()) + { // if API version is less than 3.0, create initial frame + Frame* pDefaultFrame = new (std::nothrow) Frame(); + SysTryReturn(NID_APP, pDefaultFrame != null, false, r = E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Frame creation failed."); + pDefaultFrame->Construct(); + AddFrame(*pDefaultFrame); + SysLog(NID_APP, "Default frame is added for API version %d Compatibility.", _AppInfo::GetApiVersion()); + } + + SysTryReturn(NID_APP, __pUiApp != null, false, E_INVALID_STATE, "[E_INVALID_STATE] Getting UiApp instance failed."); + + SysLog(NID_APP, "Entering user OnAppInitializing()."); + const bool bReturn = __pUiApp->OnAppInitializing(*(AppRegistry::GetInstance())); + + SysLog(NID_APP, "Back to the platform initializing routine."); + return bReturn; +} + + +bool +_UiAppImpl::OnAppInitialized(void) +{ + SysTryReturn(NID_APP, __pUiApp != null, false, E_INVALID_STATE, "[E_INVALID_STATE] Getting UiApp instance failed."); + + const bool b = __pUiApp->OnAppInitialized(); + + Frame* pFrame = dynamic_cast(__pFrameList->GetAt(0)); + if (pFrame) + { + int type = _AppInfo::GetAppType(); + if (type & _APP_TYPE_IME_APP) + { + SysLog(NID_APP, "Defering frame update for IME app."); + pFrame->SetShowState(false); + appcore_set_app_state(3); + } + } + + if (b) + { + if (__pFrameList->GetCount() > 0) + { + return true; + } + else + { + SysLogException(NID_APP, E_OBJ_NOT_FOUND, "There is no frame !!! use AddFrame() before returning OnAppInitialized()"); + SysAssertf(false, "There is no frame !!! use AddFrame() before returning OnAppInitialized()"); + } + } + return false; +} + + +bool +_UiAppImpl::OnUiAppImplTerminating(void) +{ + bool result = false; + + RemoveAllFrames(); + + if (_AppInfo::GetAppState() != TERMINATED) + { + result = __pUiApp->OnAppTerminating(*(AppRegistry::GetInstance()), __pAppImpl->IsForcedTermination()); + _AppInfo::SetAppState(TERMINATED); + } + + // Do Ui related finalizing for UiApp + FinalizeUiFramework(); + + return result; +} + + +bool +_UiAppImpl::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) +{ + return false; +} + + +bool +_UiAppImpl::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) +{ + if (__appUiState == APP_UI_STATE_FOREGROUND) + { + if (keyInfo.GetKeyCode() == _KEY_END) + { + SysTryReturn(NID_APP, __pUiApp != null, false, E_INVALID_STATE, "[E_INVALID_STATE] Getting UI App instance failed."); + + if (__pUiApp->OnAppWillTerminate()) + { + __pUiApp->Terminate(); + return true; + } + } + } + return false; +} + + +void +_UiAppImpl::OnForeground(void) +{ + result r = E_SUCCESS; + + SysLog(NID_APP, "Invoking application callback."); + + __appUiState = APP_UI_STATE_FOREGROUND; + __pUiApp->OnForeground(); + + SysLog(NID_APP, "Returned from application callback."); + + r = _PowerManagerImpl::OnForeground(); + + SysTryLog(NID_APP, !IsFailed(r), "Failed to send foreground event to powermanager"); +} + + +void +_UiAppImpl::OnBackground(void) +{ + result r = E_SUCCESS; + + SysLog(NID_APP, "Invoking application callback."); + + __appUiState = APP_UI_STATE_BACKGROUND; + __pUiApp->OnBackground(); + + SysLog(NID_APP, "Returned from application callback."); + + r = _PowerManagerImpl::OnBackground(); + + SysTryLog(NID_APP, !IsFailed(r), "Failed to send background event to powermanager"); +} + + +AppUiState +_UiAppImpl::GetAppUiState(void) const +{ + return __appUiState; +} + + +_UiAppImpl* +_UiAppImpl::GetInstance(void) +{ + return __pUiAppImpl; +} + + +UiApp* +_UiAppImpl::GetUiAppInstance(void) +{ + return __pUiApp; +} + +} } //Tizen::App diff --git a/src/app/inc/FApp_AppFrame.h b/src/app/inc/FApp_AppFrame.h new file mode 100644 index 0000000..18a5a35 --- /dev/null +++ b/src/app/inc/FApp_AppFrame.h @@ -0,0 +1,123 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FApp_AppFrame.h + * @brief This is the header file for _AppFrame. + */ + +#ifndef _FAPP_INTERNAL_APP_FRAME_H_ +#define _FAPP_INTERNAL_APP_FRAME_H_ + +#include +#include +#include + +namespace Tizen { namespace Graphics { class Canvas; } } +namespace Tizen { namespace Ui { class IKeyEventListener; } } +namespace Tizen { namespace Ui { class ITouchEventListener; } } +namespace Tizen { namespace Ui { class IWindowEventListener; } } +namespace Tizen { namespace Ui { namespace Controls { class Frame; } } } + +namespace Tizen { namespace App +{ + +// +// @class _AppFrame +// @brief This is implementation of the application frame. +// @since 2.0 +// +class _AppFrame + : public Tizen::Base::Object + , public virtual IAppFrame +{ +public: + + _AppFrame(Tizen::Ui::Controls::Frame& pFrame); + + /** + * Constructs this instance. + * + * @return An error code. + * @exception E_SUCCESS - This method is successful. + * @exception E_OUT_OF_MEMORY - Memory allocation failed. + * @exception E_INVALID_STATE - Already constructed. + * @exception E_SYSTEM - System internal error. + */ + result Construct(void); + + /** + * This is a destructor. + */ + virtual ~_AppFrame(void); + + /** + * Gets the application frame's canvas. + * + * @return See above. + */ + virtual Tizen::Graphics::Canvas* GetCanvasN(void) const; + + /** + * Adds a listener for key event. + * + * @param[in] pListener a listener for key event + * @return An error code. + * @exception E_SUCCESS - This method is successful. + * @exception E_OUT_OF_MEMORY - Memory allocation has failed. + */ + virtual result AddKeyEventListener(Tizen::Ui::IKeyEventListener& listener); + + /** + * Removes an existing key event listener. + * + * @param[in] pListener a listener to be removed + * @return An error code. + * @exception E_SUCCESS - This method is successful. + * @exception E_OBJ_NOT_FOUND - The specified object is not found. + */ + virtual result RemoveKeyEventListener(Tizen::Ui::IKeyEventListener& listener); + + virtual result AddTouchEventListener(Tizen::Ui::ITouchEventListener& listener); + + virtual result RemoveTouchEventListener(Tizen::Ui::ITouchEventListener& listener); + + virtual result AddWindowEventListener(Tizen::Ui::IWindowEventListener& listener); + + virtual result RemoveWindowEventListener(Tizen::Ui::IWindowEventListener& listener); + + virtual Tizen::Ui::Controls::Frame* GetFrame(void); + + result SetFrame(Tizen::Ui::Controls::Frame* pFrame); + +private: + /** + * This is a default constructor. + */ + _AppFrame(void); + + _AppFrame(const _AppFrame& value); + + _AppFrame& operator =(const _AppFrame& value); + +private: + Tizen::Ui::Controls::Frame* __pFrame; +}; // _AppFrame + +} } // Tizen::App + +#endif // _FAPP_INTERNAL_APP_FRAME_H_ diff --git a/src/app/inc/FApp_CoordinateInfo.h b/src/app/inc/FApp_CoordinateInfo.h new file mode 100644 index 0000000..5b94f74 --- /dev/null +++ b/src/app/inc/FApp_CoordinateInfo.h @@ -0,0 +1,85 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FApp_CoordinateInfo.h + * @brief This is the header file for the %_CoordinateInfo class. + */ + +#ifndef _FAPP_INTERNAL_COORDINATE_INFO_H_ +#define _FAPP_INTERNAL_COORDINATE_INFO_H_ + +//#include +#include +#include + + + +namespace Tizen { namespace App +{ + +/** + * @class _CoordinateInfo + * @brief This class handles the application coordinate system information + * + * This class handles the coordinate system + */ +class _CoordinateInfo +{ +public: + /** + * Get the application coordinate system + */ + static result GetAppCoordinateSystem(bool& isCoordinateSystemLogical, int& logicalCoordinateSystemInt, Tizen::Graphics::_BaseScreenSize& logicalBaseScreenSize); + +private: + /** + * This is the default constructor for this class. + */ + _CoordinateInfo(void); + + /** + * This is the destructor for this class. + */ + ~_CoordinateInfo(void); + + /** + * This is the copy constructor for the this class. + */ + _CoordinateInfo(const _CoordinateInfo& value); + + /** + * This is the assignment operator for this class. + */ + _CoordinateInfo& operator =(const _CoordinateInfo& value); + + /** + * Get the application coordinate system from info file + */ + static result GetAppCoordinateSystemFromInfoFile(bool& isCoordinateSystemLogical, int& logicalCoordinateSystemInt, Tizen::Graphics::_BaseScreenSize& logicalBaseScreenSize); + + /** + * Get the application coordinate system from database + */ + static result GetAppCoordinateSystemFromDatabase(bool& isCoordinateSystemLogical, int& logicalCoordinateSystemInt, Tizen::Graphics::_BaseScreenSize& logicalBaseScreenSize); + +}; //_CoordinateInfo + +} } //Tizen::App + +#endif // _FAPP_INTERNAL_COORDINATE_INFO_H_ + diff --git a/src/app/inc/FApp_ThemeInfo.h b/src/app/inc/FApp_ThemeInfo.h new file mode 100644 index 0000000..baad56f --- /dev/null +++ b/src/app/inc/FApp_ThemeInfo.h @@ -0,0 +1,84 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FApp_ThemeInfo.h + * @brief This is the header file for the %_ThemeInfo class. + */ + +#ifndef _FAPP_INTERNAL_THEME_INFO_H_ +#define _FAPP_INTERNAL_THEME_INFO_H_ + +#include + +using namespace Tizen::Base; + +namespace Tizen { namespace App +{ + + +/** + * @class _ThemeInfo + * @brief This class handles the application theme information + * + * This class handles the theme + */ +class _ThemeInfo +{ +public: + /** + * Get the application theme + */ + static result LoadThemeInformation(String& systemTheme, String& userTheme); + +private: + /** + * This is the default constructor for this class. + */ + _ThemeInfo(void); + + /** + * This is the destructor for this class. + */ + ~_ThemeInfo(void); + + /** + * This is the copy constructor for the this class. + */ + _ThemeInfo(const _ThemeInfo& value); + + /** + * This is the assignment operator for this class. + */ + _ThemeInfo& operator =(const _ThemeInfo& value); + + /** + * Get the application theme from info file + */ + static result LoadThemeInfoFromInfoFile(String& systemTheme, String& userTheme); + + /** + * Get the application theme from database + */ + static result LoadThemeInfoFromDatabase(String& systemTheme, String& userTheme); + +}; //_ThemeInfo + +} } //Tizen::App + +#endif // _FAPP_INTERNAL_THEME_INFO_H_ + diff --git a/src/app/inc/FApp_UiAppImpl.h b/src/app/inc/FApp_UiAppImpl.h new file mode 100644 index 0000000..9d52f8f --- /dev/null +++ b/src/app/inc/FApp_UiAppImpl.h @@ -0,0 +1,333 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FApp_UiAppImpl.h + * @brief This is the header file for the %_UiAppImpl class. + */ + +#ifndef _FAPP_INTERNAL_UI_APP_IMPL_H_ +#define _FAPP_INTERNAL_UI_APP_IMPL_H_ + +#include +#include + +#include +#include + +#include "FApp_IAppImpl.h" + +namespace Tizen { namespace Base { namespace Collection { class IList; } } } +namespace Tizen { namespace Ui {namespace Controls { class Frame; } } } + +namespace Tizen { namespace App +{ + +class IAppFrame; +class _AppFrame; + +/** + * @class _UiAppImpl + * @brief This class is the Impl class of a UiApp class. + * @since 2.1 + * + * This class is the Impl class of a UiApp class. + */ +class _OSP_EXPORT_ _UiAppImpl + : public Tizen::Base::Object + , public Tizen::App::_IAppImpl + , public Tizen::Ui::_IKeyEventListener + , virtual public Tizen::Ui::_IUiEventListener + , virtual public Tizen::Base::Runtime::IEventListener +{ +public: + /** + * Returns the _UiAppImpl's instance pointer. + * + * @since 2.1 + * @return A pointer to the %_UiAppImpl instance, @n + * else @c null if it fails + */ + static _UiAppImpl* GetInstance(void); + + /** + * Returns the UiApp's instance pointer. + * + * @since 2.1 + * @return A pointer to the %UiApp instance, @n + * else @c null if it fails + */ + UiApp* GetUiAppInstance(void); + + /** + * Called when the application is started + * + * @since 2.1 + * @return @c true if the method is successful, @n + * else @c false + * @param[in] user_data The user data passed from the callback registration function + * @remarks This is a system dependent callback function + */ + virtual bool OnCreate(void); + + /** + * Called when other application send the launch request to the application + * + * @since 2.1 + * @param[in] service The handle to the service + * @param[in] user_data The user data passed from the callback registration function + * @remarks This is a system dependent callback function + */ + virtual void OnService(service_s* service, bool initial); + + /** + * Called when the application is completely obscured by another application and becomes invisible + * + * @since 2.1 + * @param[in] user_data The user data passed from the callback registration function + * @remarks This is a system dependent callback function + */ + virtual void OnPause(void); + + /** + * Called when the application becomes visible + * + * @since 2.1 + * @param[in] user_data The user data passed from the callback registration function + * @remarks This is a system dependent callback function + */ + virtual void OnResume(void); + + /** + * Called once after the main loop of application exits + * + * @since 2.1 + * @param[in] user_data The user data passed from the callback registration function + * @remarks This is a system dependent callback function + */ + virtual void OnTerminate(void); + + /** + * Called when the window is requested to be raised + */ + virtual result OnFrameRaiseRequested(void); + + /** + * Called when the application's state changes to Tizen::App::AppState::INITIALIZING. @n + * + * @since 2.1 + * @return @c true if the method is successful, @n + * else @c false + */ + virtual bool OnAppInitializing(void); + + /** + * Called when the application's INITIALIZING state is finished + * + * @since 2.1 + * @return @c true if the method is successful, @n + * else @c false + */ + virtual bool OnAppInitialized(void); + + + /** + * Called when the internal window handle is required. + * + * @since 2.1 + */ + virtual long OnWindowHandleRequest(void); + + /** + * Called when the application's state change to Tizen::App::AppState::TERMINATING. @n + * + * @since 2.1 + * @param[in] forcedTermination @c true if the application terminate by system or other application, else @c false. + * @return @c true if the method is successful, @n + * else @c false + */ + bool OnUiAppImplTerminating(void); + + /** + * Gets the first frame in the frame list of the UI application. @n + * + * @since 2.1 + * + * @return A pointer to the IAppFrame interface of the frame, @n + * else @c null if it fails + */ + IAppFrame* GetAppFrame(void); + + /** + * Notifies when a key is pressed. + * + * @since 2.1 + * @param[in] source The source of the event + * @param[in] keyCode The key code + */ + virtual bool OnKeyPressed(const Tizen::Ui::_Control& source, const Tizen::Ui::_KeyInfo& keyInfo); + + /** + * Notifies when a key is released. + * + * @since 2.1 + * @param[in] source The source of the event + * @param[in] keyCode The key code + */ + virtual bool OnKeyReleased(const Tizen::Ui::_Control& source, const Tizen::Ui::_KeyInfo& keyInfo); + +private: + /** + * This is the default constructor for this class. + * + * @since 2.1 + */ + _UiAppImpl(void); + + /** + * This is the constructor for this class. + * + * @since 2.1 + */ + _UiAppImpl(UiApp* pUiApp); + + /** + * This is the copy constructor for the this class. + */ + _UiAppImpl(const _UiAppImpl& source); + + /** + * This is the assignment operator for this class. + */ + _UiAppImpl& operator =(const _UiAppImpl& source); + + /** + * This is the destructor for this class. + * + * @since 2.1 + */ + virtual ~_UiAppImpl(void); + + /** + * Delete all frames of Ui application. @n + * + * @since 2.1 + * + * @return An error code + */ + result RemoveAllFrames(void); + + /** + * Adds the frame at the end of the list maintained by the UI application. @n + * + * @since 2.1 + * + * @return An error code + * @param[in] frame The frame to be added to the UI application + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_INVALID_STATE The application state is invalid. + * @exception E_OBJ_ALREADY_EXIST The frame to be added is already registered to the UI application. + * @exception E_OUT_OF_MEMORY Insufficient memory. + * @exception E_MAX_EXCEEDED The number of frame has exceeded the maximum limit. + * @exception E_SYSTEM A system error occurred. + */ + result AddFrame(const Tizen::Ui::Controls::Frame& frame); + + /** + * Removes the specified frame from the UI application. @n + * + * @since 2.1 + * + * @return An error code + * @param[in] frame The frame to be removed + * @exception E_SUCCESS The method was successful. + * @exception E_OBJ_NOT_FOUND The specified frame is not found. + * @exception E_SYSTEM A system error occurred. + * @remarks The removed frame is deleted from the memory. + */ + result RemoveFrame(const Tizen::Ui::Controls::Frame& frame); + + /** + * Gets the list of the frames of the UI application. @n + * + * @since 2.1 + * + * @return A pointer to IList that contains the registered frames @n + * else @c null if it fails + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_STATE The application state is invalid. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + Tizen::Base::Collection::IList* GetFrameList(void); + + /** + * Gets the frame with the specified name. @n + * + * @since 2.1 + * + * @return A pointer to the frame having the specified name@n + * else @c null if it fails + * @param[in] name The name of the frame + * @exception E_SUCCESS The method is successful. + * @exception E_OBJ_NOT_FOUND The frame which has specified name is not fount. + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + Tizen::Ui::Controls::Frame* GetFrame(const Tizen::Base::String& name); + + Tizen::Ui::Controls::Frame* GetFrameAt(int index); + + /** + * Gets the UI state of the UI application. + * + * @since 2.1 + * @return The UI state of the UI application + */ + AppUiState GetAppUiState(void) const; + + void OnForeground(void); + + void OnBackground(void); + + /** + * Requests to raise current frame + */ + void RaiseFrame(Tizen::Ui::Controls::Frame& frame); + + long GetTargetWindowHandle(void) const; + +private: + static _UiAppImpl* __pUiAppImpl; + + _AppFrame* __pAppFrame; + + _AppImpl* __pAppImpl; + + AppUiState __appUiState; + + Tizen::Base::Collection::ArrayList* __pFrameList; + + UiApp* __pUiApp; + + friend class UiApp; + + friend class _ImeAppImpl; +}; //_UiAppImpl + +} } //Tizen::App + +#endif // _FAPP_INTERNAL_UI_APP_IMPL_H_ diff --git a/src/graphics/CMakeLists.txt b/src/graphics/CMakeLists.txt new file mode 100644 index 0000000..77afdbf --- /dev/null +++ b/src/graphics/CMakeLists.txt @@ -0,0 +1,112 @@ +SET (this_target graphics) + +INCLUDE_DIRECTORIES( + ${SLP_INCLUDE_DIRS} + ${CMAKE_SOURCE_DIR}/inc + ${CMAKE_SOURCE_DIR}/src/ui/inc + inc + text + /usr/include/osp + /usr/include/osp/app + /usr/include/osp/base + /usr/include/osp/io + /usr/include/osp/media + /usr/include/osp/system +) + +SET (${this_target}_SOURCE_FILES + FGrpBitmap.cpp + FGrpBufferInfo.cpp + FGrpCanvas.cpp + FGrpColor.cpp + FGrpCoordinateSystem.cpp + FGrpDimension.cpp + FGrpFont.cpp + FGrpTextElement.cpp + FGrpEnrichedText.cpp + FGrpFloatPoint.cpp + FGrpFloatDimension.cpp + FGrpFloatRectangle.cpp + FGrpFloatMatrix4.cpp + FGrpFloatPoint3.cpp + FGrpFloatVector4.cpp + FGrpPoint.cpp + FGrpRectangle.cpp + FGrp_BitmapImpl.cpp + FGrp_Bitmap.cpp + FGrp_BitmapScreenCapture.cpp + FGrp_BitmapTool.cpp + FGrp_BitmapUtil.cpp + FGrp_Callback.cpp + FGrp_Canvas.cpp + FGrp_CanvasImpl.cpp + FGrp_CanvasCairo.cpp + FGrp_CanvasPixman.cpp + FGrp_CanvasRasterOp.cpp + FGrp_CanvasShow.cpp + FGrp_CanvasGpArc.cpp + FGrp_CanvasGpEllipse.cpp + FGrp_CanvasGpFillPolygon.cpp + FGrp_CanvasGpLine.cpp + FGrp_CanvasGpRoundRect.cpp + FGrp_CanvasGpTriangle.cpp + FGrp_CanvasTool.cpp + FGrp_NonScale.cpp + FGrp_FontImpl.cpp + FGrp_BufferInfoImpl.cpp + FGrp_CoordinateSystem.cpp + FGrp_CoordinateSystemImpl.cpp + FGrp_CoordinateSystemDeviceSpec.cpp + FGrp_CoordinateSystemUtils.cpp + FGrp_Farm.cpp + FGrp_Font.cpp + FGrp_FontBidiUtil.cpp + FGrp_FontRsrcManager.cpp + FGrp_FontFt2.cpp + FGrp_FontCache.cpp + FGrp_FontMemoryManager.cpp + 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 + effect/FGrp_EffectAlpha.cpp + effect/FGrp_EffectFlip.cpp + effect/FGrp_EffectManip.cpp + effect/FGrp_EffectRotate.cpp + effect/FGrp_EffectScale.cpp + effect/FGrp_EffectScale2.cpp + text/FGrp_TextTextColumn.cpp + text/FGrp_TextTextElement.cpp + text/FGrp_TextTextComposite.cpp + text/FGrp_TextTextCutLink.cpp + text/FGrp_TextTextCutLinkParser.cpp + text/FGrp_TextTextCutLinkListInfo.cpp + text/FGrp_TextTextImage.cpp + text/FGrp_TextTextLine.cpp + text/FGrp_TextTextObject.cpp + text/FGrp_TextTextSimple.cpp + text/FGrp_TextTextSimpleList.cpp + text/FGrp_TextTextUtility.cpp +) + + +SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden") + +## Add Definitions +ADD_DEFINITIONS(${OSP_DEFINITIONS} -D_MODEL_RES_WVGA) + +## SET EXTRA COMPILER FLAGS +SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fPIC" ) + +## SET C COMPILER FLAGS +SET(CMAKE_C_FLAGS "${OSP_DEBUG_FLAGS} ${OSP_OPT_FLAGS} ${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} ${OSP_COMPILER_FLAGS}") + +## SET CPP COMPILER FLAGS +SET(CMAKE_CXX_FLAGS "${OSP_DEBUG_FLAGS} ${OSP_OPT_FLAGS} ${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS} ${OSP_COMPILER_FLAGS}") + +## Create Library +ADD_LIBRARY (${this_target} STATIC ${${this_target}_SOURCE_FILES}) diff --git a/src/graphics/FGrpBitmap.cpp b/src/graphics/FGrpBitmap.cpp new file mode 100644 index 0000000..81369ab --- /dev/null +++ b/src/graphics/FGrpBitmap.cpp @@ -0,0 +1,470 @@ +// +// 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 FGrpBitmap.cpp + * @brief This is the implementation file for Bitmap class. + * + */ + +#include + +#include + +#include + +#include "FGrp_BitmapImpl.h" +#include "FGrp_BitmapUtil.h" +#include "util/FGrp_Util.h" + + +#define CHECK_INSTANCE \ + 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] Memory allocation failed.") + +#define CHECK_INSTANCE_VOID \ + SysTryReturnVoidResult(NID_GRP, this->__pImpl != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.") + + +#define CHECK_NOT_CONSTRUCTED \ + CHECK_INSTANCE; \ + SysAssertf(!this->__pImpl->IsConstructed(), \ + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + +#define CHECK_CONSTRUCTED \ + SysAssertf((this->__pImpl != null) && this->__pImpl->IsConstructed(), \ + "Not yet constructed. Construct() should be called before use."); + +#define CHECK_CONSTRUCTED_EX(_result) \ + SysAssertf((this->__pImpl != null) && this->__pImpl->IsConstructed(), \ + "Not yet constructed. Construct() should be called before use."); + +#define CHECK_CONSTRUCTED_VOID \ + SysAssertf((this->__pImpl != null) && this->__pImpl->IsConstructed(), \ + "Not yet constructed. Construct() should be called before use."); + + +namespace Tizen { namespace Graphics +{ + +Bitmap::Bitmap(void) + : __pImpl(new (std::nothrow)_BitmapImpl) +{ +} + +Bitmap::~Bitmap(void) +{ + delete __pImpl; +} + +result +Bitmap::Construct(const Rectangle& vc_rect) +{ + CHECK_NOT_CONSTRUCTED; + + result r = this->__pImpl->Construct(vc_rect); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Bitmap::Construct(const Dimension& vc_dim, BitmapPixelFormat pixelFormat) +{ + CHECK_NOT_CONSTRUCTED; + + result r = this->__pImpl->Construct(vc_dim, pixelFormat); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Bitmap::Construct(const Canvas& canvas, const Rectangle& vc_rect) +{ + CHECK_NOT_CONSTRUCTED; + + SysTryReturnResult(NID_GRP, _Util::CheckValidity(&canvas), E_INVALID_ARG, "The source canvas is invalid.\n"); + + result r = this->__pImpl->Construct(*_CanvasImpl::GetInstance(canvas), vc_rect); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Bitmap::Construct(const Bitmap& bitmap, const Rectangle& vc_rect) +{ + CHECK_NOT_CONSTRUCTED; + + SysTryReturnResult(NID_GRP, _Util::CheckValidity(&bitmap), E_INVALID_ARG, "The source bitmap is invalid.\n"); + + const Tizen::Graphics::_BitmapImpl& impl = *bitmap.__pImpl; + + result r = this->__pImpl->Construct(impl, vc_rect); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Bitmap::Construct(const Tizen::Base::ByteBuffer& buffer, const Dimension& rq_dim, BitmapPixelFormat pixelFormat) +{ + CHECK_NOT_CONSTRUCTED; + + // notice!! + result r = this->Construct(buffer, rq_dim, pixelFormat, true); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Bitmap::Construct(const Tizen::Base::ByteBuffer& buffer, const Dimension& rq_dim, BitmapPixelFormat pixelFormat, bool autoScaling) +{ + CHECK_NOT_CONSTRUCTED; + + result r = this->__pImpl->Construct(buffer, rq_dim, pixelFormat, autoScaling); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Bitmap::Construct(const byte* pBuffer, int bufSize, const Dimension& rq_dim, BitmapPixelFormat pixelFormat, bool autoScaling) +{ + CHECK_NOT_CONSTRUCTED; + + result r = this->__pImpl->Construct(pBuffer, bufSize, rq_dim, pixelFormat, autoScaling); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Bitmap::Construct(const Tizen::Base::ByteBuffer& buffer, const Dimension& rq_dim, BitmapPixelFormat pixelFormat, + BufferScaling bufferScaling) +{ + CHECK_NOT_CONSTRUCTED; + + result r = this->__pImpl->Construct(buffer, rq_dim, pixelFormat, bufferScaling); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Bitmap::Construct(const FloatRectangle& vc_rect) +{ + CHECK_NOT_CONSTRUCTED; + + result r = this->__pImpl->Construct(vc_rect); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Bitmap::Construct(const FloatDimension& vc_dim, BitmapPixelFormat pixelFormat) +{ + CHECK_NOT_CONSTRUCTED; + + result r = this->__pImpl->Construct(vc_dim, pixelFormat); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Bitmap::Construct(const Canvas& canvas, const FloatRectangle& vc_rect) +{ + CHECK_NOT_CONSTRUCTED; + + SysTryReturnResult(NID_GRP, _Util::CheckValidity(&canvas), E_INVALID_ARG, "The source canvas is invalid.\n"); + + result r = this->__pImpl->Construct(*_CanvasImpl::GetInstance(canvas), vc_rect); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Bitmap::Construct(const Bitmap& bitmap, const FloatRectangle& vc_rect) +{ + CHECK_NOT_CONSTRUCTED; + + SysTryReturnResult(NID_GRP, _Util::CheckValidity(&bitmap), E_INVALID_ARG, "The source bitmap is invalid.\n"); + + const Tizen::Graphics::_BitmapImpl& impl = *bitmap.__pImpl; + + result r = this->__pImpl->Construct(impl, vc_rect); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Bitmap::Scale(const Dimension& vc_dim) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->Scale(vc_dim); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Bitmap::Scale(const FloatDimension& vc_dim) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->Scale(vc_dim); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Bitmap::Merge(const Point& vc_dest, const Bitmap& src, const Rectangle& vc_srcRect) +{ + CHECK_CONSTRUCTED; + + SysTryReturnResult(NID_GRP, _Util::CheckValidity(&src), E_INVALID_ARG, "The source bitmap is invalid.\n"); + + const Tizen::Graphics::_BitmapImpl& impl = *src.__pImpl; + + result r = this->__pImpl->Merge(vc_dest, impl, vc_srcRect); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Bitmap::Merge(const FloatPoint& vc_dest, const Bitmap& src, const FloatRectangle& vc_srcRect) +{ + CHECK_CONSTRUCTED; + + SysTryReturnResult(NID_GRP, _Util::CheckValidity(&src), E_INVALID_ARG, "The source bitmap is invalid.\n"); + + const Tizen::Graphics::_BitmapImpl& impl = *src.__pImpl; + + result r = this->__pImpl->Merge(vc_dest, impl, vc_srcRect); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +int +Bitmap::GetHeight() const +{ + CHECK_CONSTRUCTED_EX(-1); + + return this->__pImpl->GetHeight(); +} + +float +Bitmap::GetHeightF() const +{ + CHECK_CONSTRUCTED_EX(-1); + + return this->__pImpl->GetHeightF(); +} + +float +Bitmap::GetActualHeight() const +{ + CHECK_CONSTRUCTED_EX(-1.0f); + + return this->__pImpl->GetActualHeight(); +} + +int +Bitmap::GetWidth() const +{ + CHECK_CONSTRUCTED_EX(-1); + + return this->__pImpl->GetWidth(); +} + +float +Bitmap::GetWidthF() const +{ + CHECK_CONSTRUCTED_EX(-1); + + return this->__pImpl->GetWidthF(); +} + +float +Bitmap::GetActualWidth() const +{ + CHECK_CONSTRUCTED_EX(-1.0f); + + return this->__pImpl->GetActualWidth(); +} + +int +Bitmap::GetBitsPerPixel() const +{ + CHECK_CONSTRUCTED_EX(-1); + + return this->__pImpl->GetBitsPerPixel(); +} + +BitmapPixelFormat +Bitmap::GetPixelColorFormat() const +{ + CHECK_CONSTRUCTED_EX(BITMAP_PIXEL_FORMAT_MAX); + + return this->__pImpl->GetPixelColorFormat(); +} + +result +Bitmap::SetScalingQuality(BitmapScalingQuality quality) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->SetScalingQuality(quality); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r,"[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +BitmapScalingQuality +Bitmap::GetScalingQuality(void) const +{ + CHECK_CONSTRUCTED_EX(BITMAP_SCALING_QUALITY_LOW); + + return this->__pImpl->GetScalingQuality(); +} + +result +Bitmap::SetMaskingColor(const Color* pColor) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->SetMaskingColor(pColor); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Bitmap::GetMaskingColor(Color& color) const +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->GetMaskingColor(color); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +void +Bitmap::SetAlphaConstant(int opacity) +{ + CHECK_CONSTRUCTED_VOID; + + return this->__pImpl->SetAlphaConstant(opacity); +} + +int +Bitmap::GetAlphaConstant(void) const +{ + CHECK_CONSTRUCTED_EX(-1); + + return this->__pImpl->GetAlphaConstant(); +} + +bool +Bitmap::IsNinePatchedBitmap(void) const +{ + CHECK_CONSTRUCTED_EX(false); + + return this->__pImpl->IsNinePatchedBitmap(); +} + +result +Bitmap::Lock(BufferInfo& info, long timeout) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->Lock(info, timeout); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Bitmap::Unlock() +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->Unlock(); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +Bitmap* +Bitmap::GetNonScaledBitmapN(const Tizen::Base::ByteBuffer& buffer, const Dimension& dim, BitmapPixelFormat pixelFormat) +{ + _BitmapImpl* pBitmapImpl = _BitmapImpl::GetNonScaledBitmapImplN(buffer, dim, pixelFormat); + + if (pBitmapImpl == null) + { + return null; + } + + Bitmap* pReturnBitmap = Tizen::Graphics::_BitmapUtil::CreateBitmapN(pBitmapImpl); + + if (pReturnBitmap == null) + { + result r = GetLastResult(); + + SysTryReturn(NID_GRP, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + return null; + } + + return pReturnBitmap; +} + +}} // Tizen::Graphics diff --git a/src/graphics/FGrpBufferInfo.cpp b/src/graphics/FGrpBufferInfo.cpp new file mode 100644 index 0000000..554f23f --- /dev/null +++ b/src/graphics/FGrpBufferInfo.cpp @@ -0,0 +1,136 @@ +// +// 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 FGrpBufferInfo.cpp + * @brief This is the implementation file for internal BufferInfo class. + * + */ + +#include + +#include + +#include + +#include "FGrp_BufferInfoImpl.h" + + +using namespace Tizen::Base; + + +namespace Tizen { namespace Graphics +{ + +BufferInfo::BufferInfo(void) + : width(0) + , height(0) + , pitch(0) + , bitsPerPixel(0) + , pixelFormat(PIXEL_FORMAT_MIN) + , pPixels(null) + , __pImpl(null) +{ + __pImpl = new (std::nothrow) _BufferInfoImpl; + + SysTryReturnVoidResult(NID_GRP, __pImpl, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); +} + +BufferInfo::BufferInfo(const BufferInfo& rhs) + : width(rhs.width) + , height(rhs.height) + , pitch(rhs.pitch) + , bitsPerPixel(rhs.bitsPerPixel) + , pixelFormat(rhs.pixelFormat) + , pPixels(rhs.pPixels) + , __pImpl(null) +{ + if (_BufferInfoImpl::GetInstance(rhs) != null) + { + __pImpl = new (std::nothrow) _BufferInfoImpl(*_BufferInfoImpl::GetInstance(rhs)); + + SysTryReturnVoidResult(NID_GRP, __pImpl, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + } +} + +BufferInfo::~BufferInfo(void) +{ + if (__pImpl) + { + delete __pImpl; + __pImpl = null; + } +} + +BufferInfo& +BufferInfo::operator =(const BufferInfo& rhs) +{ + if (this == &rhs) + { + return *this; + } + + this->width = rhs.width; + this->height = rhs.height; + this->pitch = rhs.pitch; + this->bitsPerPixel = rhs.bitsPerPixel; + this->pixelFormat = rhs.pixelFormat; + this->pPixels = rhs.pPixels; + + if (this->__pImpl && _BufferInfoImpl::GetInstance(rhs)) + { + *(this->__pImpl) = *_BufferInfoImpl::GetInstance(rhs); + } + + return *this; +} + +bool +BufferInfo::Equals(const Tizen::Base::Object& rhs) const +{ + if (&rhs == null) + { + return false; + } + + const BufferInfo* pBufferInfo = dynamic_cast (&rhs); + + if (pBufferInfo == null) + { + return false; + } + + return ((this->width == pBufferInfo->width && + this->height == pBufferInfo->height && + this->pitch == pBufferInfo->pitch && + this->bitsPerPixel == pBufferInfo->bitsPerPixel && + this->pixelFormat == pBufferInfo->pixelFormat && + this->pPixels == pBufferInfo->pPixels) ? true : false); +} + +int +BufferInfo::GetHashCode(void) const +{ + return ((((this->width & 0xFF) << 24) | + ((this->height & 0xFF) << 16) | + ((this->pitch & 0xF) << 12) | + ((this->bitsPerPixel & 0xF) << 8) | + ((this->pixelFormat & 0xF) << 4)) ^ + (reinterpret_cast(this->pPixels))); +} + +}} // Tizen::Graphics diff --git a/src/graphics/FGrpCanvas.cpp b/src/graphics/FGrpCanvas.cpp new file mode 100644 index 0000000..3781dad --- /dev/null +++ b/src/graphics/FGrpCanvas.cpp @@ -0,0 +1,1277 @@ +// +// 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 FGrpCanvas.cpp + * @brief This is the implementation file for Canvas class. + * + */ + +#include + +#include + +#include + +#include "FGrp_CanvasImpl.h" +#include "util/FGrp_Util.h" + + +#define CHECK_INSTANCE \ + 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] Memory allocation failed.") + +#define CHECK_INSTANCE_VOID \ + SysTryReturnVoidResult(NID_GRP, this->__pImpl, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.") + + +#define CHECK_NOT_CONSTRUCTED \ + ClearLastResult(); \ + CHECK_INSTANCE; \ + SysAssertf(!this->__pImpl->IsConstructed(), \ + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class"); + +#define CHECK_CONSTRUCTED \ + ClearLastResult(); \ + SysAssertf((this->__pImpl != null) && this->__pImpl->IsConstructed(), \ + "Not yet constructed. Construct() should be called before use."); + +#define CHECK_CONSTRUCTED_EX(_result) \ + ClearLastResult(); \ + SysAssertf((this->__pImpl != null) && this->__pImpl->IsConstructed(), \ + "Not yet constructed. Construct() should be called before use."); + +#define CHECK_CONSTRUCTED_VOID \ + ClearLastResult(); \ + SysAssertf((this->__pImpl != null) && this->__pImpl->IsConstructed(), \ + "Not yet constructed. Construct() should be called before use."); + + +namespace Tizen { namespace Graphics +{ + +Canvas::Canvas(void) + : __pImpl(0) +{ + __pImpl = new (std::nothrow) _CanvasImpl; +} + +Canvas::~Canvas(void) +{ + delete __pImpl; +} + +result +Canvas::Construct(void) +{ + CHECK_NOT_CONSTRUCTED; + + result r = this->__pImpl->Construct(); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::Construct(const Rectangle& vcRect) +{ + CHECK_NOT_CONSTRUCTED; + + result r = this->__pImpl->Construct(vcRect); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::Construct(const FloatRectangle& vcRect) +{ + CHECK_NOT_CONSTRUCTED; + + result r = this->__pImpl->Construct(vcRect); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::Construct(const BufferInfo& bufferInfo) +{ + CHECK_NOT_CONSTRUCTED; + + result r = this->__pImpl->Construct(bufferInfo); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::Clear(void) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->Clear(); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::Clear(const Rectangle& vcRect) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->Clear(vcRect); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::Clear(const FloatRectangle& vcRect) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->Clear(vcRect); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::Copy(const Point& vcDestPoint, const Canvas& canvas, const Rectangle& vcSrcRect) +{ + CHECK_CONSTRUCTED; + + SysTryReturnResult(NID_GRP, _Util::CheckValidity(&canvas), E_INVALID_ARG, "The source canvas is invalid.\n"); + + const Tizen::Graphics::_CanvasImpl& impl = *canvas.__pImpl; + + result r = this->__pImpl->Copy(vcDestPoint, impl, vcSrcRect); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::Copy(const FloatPoint& vcDestPoint, const Canvas& canvas, const FloatRectangle& vcSrcRect) +{ + CHECK_CONSTRUCTED; + + SysTryReturnResult(NID_GRP, _Util::CheckValidity(&canvas), E_INVALID_ARG, "The source canvas is invalid.\n"); + + const Tizen::Graphics::_CanvasImpl& impl = *canvas.__pImpl; + + result r = this->__pImpl->Copy(vcDestPoint, impl, vcSrcRect); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::Copy(const Rectangle& vcDestRect, const Canvas& canvas, const Rectangle& vcSrcRect) +{ + CHECK_CONSTRUCTED; + + SysTryReturnResult(NID_GRP, _Util::CheckValidity(&canvas), E_INVALID_ARG, "The source canvas is invalid.\n"); + + const Tizen::Graphics::_CanvasImpl& impl = *canvas.__pImpl; + + result r = this->__pImpl->Copy(vcDestRect, impl, vcSrcRect); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::Copy(const FloatRectangle& vcDestRect, const Canvas& canvas, const FloatRectangle& vcSrcRect) +{ + CHECK_CONSTRUCTED; + + SysTryReturnResult(NID_GRP, _Util::CheckValidity(&canvas), E_INVALID_ARG, "The source canvas is invalid.\n"); + + const Tizen::Graphics::_CanvasImpl& impl = *canvas.__pImpl; + + result r = this->__pImpl->Copy(vcDestRect, impl, vcSrcRect); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::DrawArc(const Rectangle& vcBounds, int startAngle, int endAngle, ArcStyle arcStyle) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->DrawArc(vcBounds, startAngle, endAngle, arcStyle); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::DrawArc(const FloatRectangle& vcBounds, float startAngle, float endAngle, ArcStyle arcStyle) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->DrawArc(vcBounds, startAngle, endAngle, arcStyle); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::DrawBitmap(const Rectangle& vcRect, const Bitmap& bitmap) +{ + CHECK_CONSTRUCTED; + + SysTryReturnResult(NID_GRP, _Util::CheckValidity(&bitmap), E_INVALID_ARG, "The source bitmap is invalid.\n"); + + const Tizen::Graphics::_BitmapImpl& impl = *bitmap.__pImpl; + + result r = this->__pImpl->DrawBitmap(vcRect, impl); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::DrawBitmap(const FloatRectangle& vcRect, const Bitmap& bitmap) +{ + CHECK_CONSTRUCTED; + + SysTryReturnResult(NID_GRP, _Util::CheckValidity(&bitmap), E_INVALID_ARG, "The source bitmap is invalid.\n"); + + const Tizen::Graphics::_BitmapImpl& impl = *bitmap.__pImpl; + + result r = this->__pImpl->DrawBitmap(vcRect, impl); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::DrawBitmap(const Point& vcPoint, const Bitmap& bitmap) +{ + CHECK_CONSTRUCTED; + + SysTryReturnResult(NID_GRP, _Util::CheckValidity(&bitmap), E_INVALID_ARG, "The source bitmap is invalid.\n"); + + const Tizen::Graphics::_BitmapImpl& impl = *bitmap.__pImpl; + + result r = this->__pImpl->DrawBitmap(vcPoint, impl); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::DrawBitmap(const FloatPoint& vcPoint, const Bitmap& bitmap) +{ + CHECK_CONSTRUCTED; + + SysTryReturnResult(NID_GRP, _Util::CheckValidity(&bitmap), E_INVALID_ARG, "The source bitmap is invalid.\n"); + + const Tizen::Graphics::_BitmapImpl& impl = *bitmap.__pImpl; + + result r = this->__pImpl->DrawBitmap(vcPoint, impl); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::DrawBitmap(const Rectangle& vcDestRect, const Bitmap& srcBitmap, const Rectangle& vcSrcRect) +{ + CHECK_CONSTRUCTED; + + SysTryReturnResult(NID_GRP, _Util::CheckValidity(&srcBitmap), E_INVALID_ARG, "The source bitmap is invalid.\n"); + + const Tizen::Graphics::_BitmapImpl& impl = *srcBitmap.__pImpl; + + result r = this->__pImpl->DrawBitmap(vcDestRect, impl, vcSrcRect); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::DrawBitmap(const FloatRectangle& vcDestRect, const Bitmap& srcBitmap, const FloatRectangle& vcSrcRect) +{ + CHECK_CONSTRUCTED; + + SysTryReturnResult(NID_GRP, _Util::CheckValidity(&srcBitmap), E_INVALID_ARG, "The source bitmap is invalid.\n"); + + const Tizen::Graphics::_BitmapImpl& impl = *srcBitmap.__pImpl; + + result r = this->__pImpl->DrawBitmap(vcDestRect, impl, vcSrcRect); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::DrawBitmap(const Point& vcPoint, const Bitmap& bitmap, FlipDirection dir) +{ + CHECK_CONSTRUCTED; + + SysTryReturnResult(NID_GRP, _Util::CheckValidity(&bitmap), E_INVALID_ARG, "The source bitmap is invalid.\n"); + + const Tizen::Graphics::_BitmapImpl& impl = *bitmap.__pImpl; + + result r = this->__pImpl->DrawBitmap(vcPoint, impl, dir); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::DrawBitmap(const FloatPoint& vcPoint, const Bitmap& bitmap, FlipDirection dir) +{ + CHECK_CONSTRUCTED; + + SysTryReturnResult(NID_GRP, _Util::CheckValidity(&bitmap), E_INVALID_ARG, "The source bitmap is invalid.\n"); + + const Tizen::Graphics::_BitmapImpl& impl = *bitmap.__pImpl; + + result r = this->__pImpl->DrawBitmap(vcPoint, impl, dir); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::DrawBitmap(const Point& vcPoint, const Bitmap& bitmap, const Point& vcPivot, int degree) +{ + CHECK_CONSTRUCTED; + + SysTryReturnResult(NID_GRP, _Util::CheckValidity(&bitmap), E_INVALID_ARG, "The source bitmap is invalid.\n"); + + const Tizen::Graphics::_BitmapImpl& impl = *bitmap.__pImpl; + + result r = this->__pImpl->DrawBitmap(vcPoint, impl, vcPivot, degree); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::DrawBitmap(const FloatPoint& vcPoint, const Bitmap& bitmap, const FloatPoint& vcPivot, float degree) +{ + CHECK_CONSTRUCTED; + + SysTryReturnResult(NID_GRP, _Util::CheckValidity(&bitmap), E_INVALID_ARG, "The source bitmap is invalid.\n"); + + const Tizen::Graphics::_BitmapImpl& impl = *bitmap.__pImpl; + + result r = this->__pImpl->DrawBitmap(vcPoint, impl, vcPivot, degree); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::DrawNinePatchedBitmap(const Rectangle& vcRect, const Bitmap& bitmap) +{ + CHECK_CONSTRUCTED; + + SysTryReturnResult(NID_GRP, _Util::CheckValidity(&bitmap), E_INVALID_ARG, "The source bitmap is invalid.\n"); + + const Tizen::Graphics::_BitmapImpl& impl = *bitmap.__pImpl; + + result r = this->__pImpl->DrawNinePatchedBitmap(vcRect, impl); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::DrawNinePatchedBitmap(const FloatRectangle& vcRect, const Bitmap& bitmap) +{ + CHECK_CONSTRUCTED; + + SysTryReturnResult(NID_GRP, _Util::CheckValidity(&bitmap), E_INVALID_ARG, "The source bitmap is invalid.\n"); + + const Tizen::Graphics::_BitmapImpl& impl = *bitmap.__pImpl; + + result r = this->__pImpl->DrawNinePatchedBitmap(vcRect, impl); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::DrawEllipse(const Rectangle& vcBounds) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->DrawEllipse(vcBounds); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::DrawEllipse(const FloatRectangle& vcBounds) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->DrawEllipse(vcBounds); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::DrawLine(const Point& vcPoint1, const Point& vcPoint2) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->DrawLine(vcPoint1, vcPoint2); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::DrawLine(const FloatPoint& vcPoint1, const FloatPoint& vcPoint2) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->DrawLine(vcPoint1, vcPoint2); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::DrawPolygon(const Tizen::Base::Collection::IList& vcPoints) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->DrawPolygon(vcPoints); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::DrawPolyline(const Tizen::Base::Collection::IList& vcPoints) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->DrawPolyline(vcPoints); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::DrawRectangle(const Rectangle& vcRect) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->DrawRectangle(vcRect); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::DrawRectangle(const FloatRectangle& vcRect) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->DrawRectangle(vcRect); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::DrawRoundRectangle(const Rectangle& vcRect, const Dimension& vcArcDim) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->DrawRoundRectangle(vcRect, vcArcDim); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::DrawRoundRectangle(const FloatRectangle& vcRect, const FloatDimension& vcArcDim) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->DrawRoundRectangle(vcRect, vcArcDim); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::DrawTriangle(const Point& vcPoint1, const Point& vcPoint2, const Point& vcPoint3) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->DrawTriangle(vcPoint1, vcPoint2, vcPoint3); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::DrawTriangle(const FloatPoint& vcPoint1, const FloatPoint& vcPoint2, const FloatPoint& vcPoint3) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->DrawTriangle(vcPoint1, vcPoint2, vcPoint3); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::FillEllipse(const Color& color, const Rectangle& vcBounds) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->FillEllipse(color, vcBounds); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::FillEllipse(const Color& color, const FloatRectangle& vcBounds) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->FillEllipse(color, vcBounds); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::FillPolygon(const Color& color, const Tizen::Base::Collection::IList& vcPoints) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->FillPolygon(color, vcPoints); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::FillRectangle(const Color& color, const Rectangle& vcRect) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->FillRectangle(color, vcRect); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::FillRectangle(const Color& color, const FloatRectangle& vcRect) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->FillRectangle(color, vcRect); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::FillRoundRectangle(const Color& color, const Rectangle& vcRect, const Dimension& vcArcDim) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->FillRoundRectangle(color, vcRect, vcArcDim); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::FillRoundRectangle(const Color& color, const FloatRectangle& vcRect, const FloatDimension& vcArcDim) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->FillRoundRectangle(color, vcRect, vcArcDim); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::FillTriangle(const Color& color, const Point& vcPoint1, const Point& vcPoint2, const Point& vcPoint3) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->FillTriangle(color, vcPoint1, vcPoint2, vcPoint3); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::FillTriangle(const Color& color, const FloatPoint& vcPoint1, const FloatPoint& vcPoint2, const FloatPoint& vcPoint3) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->FillTriangle(color, vcPoint1, vcPoint2, vcPoint3); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::DrawText(const Point& vcPoint, const Tizen::Base::String& text) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->DrawText(vcPoint, text); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::DrawText(const FloatPoint& vcPoint, const Tizen::Base::String& text) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->DrawText(vcPoint, text); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::DrawText(const Point& vcPoint, const Tizen::Base::String& text, int length) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->DrawText(vcPoint, text, 0, length); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::DrawText(const FloatPoint& vcPoint, const Tizen::Base::String& text, int length) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->DrawText(vcPoint, text, 0, length); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::DrawText(const Point& vcPoint, const Tizen::Base::String& text, const Color& outlineColor) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->DrawText(vcPoint, text, 0, outlineColor); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::DrawText(const FloatPoint& vcPoint, const Tizen::Base::String& text, const Color& outlineColor) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->DrawText(vcPoint, text, 0, outlineColor); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::DrawText(const Point& vcPoint, const Tizen::Base::String& text, int length, const Color& outlineColor) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->DrawText(vcPoint, text, 0, length, outlineColor); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::DrawText(const FloatPoint& vcPoint, const Tizen::Base::String& text, int length, const Color& outlineColor) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->DrawText(vcPoint, text, 0, length, outlineColor); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::DrawText(const Point& vcPoint, const EnrichedText& etext) +{ + CHECK_CONSTRUCTED; + + SysTryReturnResult(NID_GRP, _Util::CheckValidity(&etext), E_INVALID_ARG, "The source enriched text is invalid.\n"); + + result r = this->__pImpl->DrawText(vcPoint, etext); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::DrawText(const FloatPoint& vcPoint, const EnrichedText& etext) +{ + CHECK_CONSTRUCTED; + + SysTryReturnResult(NID_GRP, _Util::CheckValidity(&etext), E_INVALID_ARG, "The source enriched text is invalid.\n"); + + result r = this->__pImpl->DrawText(vcPoint, etext); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +Rectangle +Canvas::GetBounds(void) const +{ + CHECK_CONSTRUCTED_EX(Rectangle()); + + return this->__pImpl->GetBounds(); +} + +FloatRectangle +Canvas::GetBoundsF(void) const +{ + CHECK_CONSTRUCTED_EX(FloatRectangle()); + + return this->__pImpl->GetBoundsF(); +} + +FloatRectangle +Canvas::GetActualBounds(void) const +{ + CHECK_CONSTRUCTED_EX(FloatRectangle()); + + return this->__pImpl->GetActualBounds(); +} + +LineStyle +Canvas::GetLineStyle() const +{ + CHECK_CONSTRUCTED_EX(LINE_STYLE_MAX); + + return this->__pImpl->GetLineStyle(); +} + +int +Canvas::GetLineWidth() const +{ + CHECK_CONSTRUCTED_EX(-1); + + return this->__pImpl->GetLineWidth(); +} + +float +Canvas::GetLineWidthF() const +{ + CHECK_CONSTRUCTED_EX(-1); + + return this->__pImpl->GetLineWidthF(); +} + +result +Canvas::SetLineStyle(LineStyle style) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->SetLineStyle(style); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::SetLineWidth(int vcWidth) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->SetLineWidth(vcWidth); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::SetLineWidth(float vcWidth) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->SetLineWidth(vcWidth); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::GetDashPattern(Tizen::Base::Collection::IListT& pattern, int& offset) const +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->GetDashPattern(pattern, offset); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::GetDashPattern(Tizen::Base::Collection::IListT& pattern, float& offset) const +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->GetDashPattern(pattern, offset); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::SetDashPattern(const Tizen::Base::Collection::IListT& pattern, int offset) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->SetDashPattern(pattern, offset); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::SetDashPattern(const Tizen::Base::Collection::IListT& pattern, float offset) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->SetDashPattern(pattern, offset); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +LineCapStyle +Canvas::GetLineCapStyle(void) const +{ + CHECK_CONSTRUCTED_EX(LINE_CAP_STYLE_ROUND); + + return this->__pImpl->GetLineCapStyle(); +} + +result +Canvas::SetLineCapStyle(LineCapStyle lineCapStyle) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->SetLineCapStyle(lineCapStyle); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +LineJoinStyle +Canvas::GetLineJoinStyle(void) const +{ + CHECK_CONSTRUCTED_EX(LINE_JOIN_STYLE_ROUND); + + return this->__pImpl->GetLineJoinStyle(); +} + +result +Canvas::SetLineJoinStyle(LineJoinStyle lineJoinStyle) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->SetLineJoinStyle(lineJoinStyle); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +#if 0 // Not public feature yet + +result +Canvas::SetDrawingQuality(BitmapDrawingQuality quality) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->SetDrawingQuality(quality); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r,"[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +BitmapDrawingQuality +Canvas::GetDrawingQuality(void) const +{ + CHECK_CONSTRUCTED_EX(BITMAP_DRAWING_QUALITY_LOW); + + return this->__pImpl->GetDrawingQuality(); +} + +#endif + +result +Canvas::GetPixel(const Point& vcPoint, Color& color) const +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->GetPixel(vcPoint, color); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::GetPixel(const FloatPoint& vcPoint, Color& color) const +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->GetPixel(vcPoint, color); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::SetPixel(const Point& vcPoint) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->SetPixel(vcPoint); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::SetPixel(const FloatPoint& vcPoint) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->SetPixel(vcPoint); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::Show() +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->Show(); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::Show(const Rectangle& vcRect) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->Show(vcRect); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::SetFont(const Font& font) +{ + CHECK_CONSTRUCTED; + + SysTryReturnResult(NID_GRP, _Util::CheckValidity(&font), E_INVALID_ARG, "The source font is invalid.\n"); + + result r = this->__pImpl->SetFont(font); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +Font* +Canvas::GetFontN(void) const +{ + CHECK_CONSTRUCTED_EX(null); + + Font* pReturnFont = this->__pImpl->GetFontN(); + + if (pReturnFont == null) + { + result r = GetLastResult(); + + SysTryReturn(NID_GRP, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + return null; + } + + return pReturnFont; +} + +result +Canvas::SetClipBounds(const Rectangle& vcRect) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->SetClipBounds(vcRect); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::SetClipBounds(const FloatRectangle& vcRect) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->SetClipBounds(vcRect); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +Rectangle +Canvas::GetClipBounds(void) const +{ + CHECK_CONSTRUCTED_EX(Rectangle()); + + return this->__pImpl->GetClipBounds(); +} + +FloatRectangle +Canvas::GetClipBoundsF(void) const +{ + CHECK_CONSTRUCTED_EX(FloatRectangle()); + + return this->__pImpl->GetClipBoundsF(); +} + +result +Canvas::Lock(BufferInfo& info, long timeout) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->Lock(info, timeout); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::Unlock() +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->Unlock(); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +void +Canvas::SetForegroundColor(const Color& fgColor) +{ + CHECK_CONSTRUCTED_VOID; + + return this->__pImpl->SetForegroundColor(fgColor); +} + +Color +Canvas::GetForegroundColor(void) const +{ + CHECK_CONSTRUCTED_EX(Color::GetColor(COLOR_ID_BLACK)); + + return this->__pImpl->GetForegroundColor(); +} + +void +Canvas::SetBackgroundColor(const Color& bgColor) +{ + CHECK_CONSTRUCTED_VOID; + + return this->__pImpl->SetBackgroundColor(bgColor); +} + +Color +Canvas::GetBackgroundColor(void) const +{ + CHECK_CONSTRUCTED_EX(Color::GetColor(COLOR_ID_BLACK)); + + return this->__pImpl->GetBackgroundColor(); +} + +result +Canvas::SetPosition(const Point& vcPoint) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->SetPosition(vcPoint); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::SetPosition(int vcX, int vcY) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->SetPosition(vcX, vcY); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Canvas::SetCompositeMode(CompositeMode compositeMode) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->SetCompositeMode(compositeMode); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +CompositeMode +Canvas::GetCompositeMode(void) const +{ + CHECK_CONSTRUCTED_EX(COMPOSITE_MODE_SRC_OVER); + + return this->__pImpl->GetCompositeMode(); +} + +void +Canvas::SetAntiAliasingEnabled(bool enable) +{ + CHECK_CONSTRUCTED; + + return this->__pImpl->SetAntialiasingEnabled(enable); +} + +bool +Canvas::IsAntiAliasingEnabled(void) const +{ + CHECK_CONSTRUCTED_EX(true); + + return this->__pImpl->IsAntialiasingEnabled(); +} + +}} // Tizen::Graphics diff --git a/src/graphics/FGrpColor.cpp b/src/graphics/FGrpColor.cpp new file mode 100644 index 0000000..6a39323 --- /dev/null +++ b/src/graphics/FGrpColor.cpp @@ -0,0 +1,235 @@ +// +// 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 FGrpColor.cpp + * @brief This is the implementation file for Color class. + * + * This file contains implementation of Color class. + * + */ + +#include + + +namespace Tizen { namespace Graphics +{ + +Color::Color(void) + : __color(0) + , __pImpl(null) +{ +} + +Color::Color(const Color& rhs) + : __color(0) + , __pImpl(null) +{ + __color = rhs.GetRGB32(); +} + +Color::Color(byte red, byte green, byte blue, byte alpha) + : __color(0) + , __pImpl(null) +{ + SetColorComponents(red, green, blue, alpha); +} + +Color::Color(unsigned int rgb, bool hasAlpha) + : __pImpl(null) +{ + SetRGB32(rgb, hasAlpha); +} + +Color::~Color(void) +{ +} + +bool +Color::operator ==(const Color& rhs) const +{ + return (__color == rhs.__color); +} + +bool +Color::operator !=(const Color& rhs) const +{ + return (!operator ==(rhs)); +} + +Color& +Color::operator =(const Color& rhs) +{ + if (this == &rhs) + { + return *this; + } + + __color = rhs.GetRGB32(); + + return (*this); +} + +bool +Color::Equals(const Tizen::Base::Object& rhs) const +{ + if (&rhs == null) + { + return false; + } + + const Color* pColor = dynamic_cast (&rhs); + + if (pColor == null) + { + return false; + } + + return (*this == *pColor); +} + +int +Color::GetHashCode(void) const +{ + return int(__color); +} + +byte +Color::GetAlpha(void) const +{ + return byte((__color >> 24) & 0xFF); +} + +byte +Color::GetRed(void) const +{ + return byte((__color >> 16) & 0xFF); +} + +byte +Color::GetGreen(void) const +{ + return byte((__color >> 8) & 0xFF); +} + +byte +Color::GetBlue(void) const +{ + return byte((__color >> 0) & 0xFF); +} + +void +Color::GetColorComponents(byte& red, byte& green, byte& blue, byte& alpha) const +{ + red = GetRed(); + green = GetGreen(); + blue = GetBlue(); + alpha = GetAlpha(); +} + +unsigned int +Color::GetRGB32(void) const +{ + return __color; +} + +void +Color::SetAlpha(byte alpha) +{ + __color &= (0x00FFFFFF); + __color |= ((alpha & 0xFF) << 24); +} + +void +Color::SetRed(byte red) +{ + __color &= (0xFF00FFFF); + __color |= ((red & 0xFF) << 16); +} + +void +Color::SetGreen(byte green) +{ + __color &= (0xFFFF00FF); + __color |= ((green & 0xFF) << 8); +} + +void +Color::SetBlue(byte blue) +{ + __color &= (0xFFFFFF00); + __color |= ((blue & 0xFF) << 0); +} + +void +Color::SetColorComponents(byte red, byte green, byte blue, byte alpha) +{ + SetRed(red); + SetGreen(green); + SetBlue(blue); + SetAlpha(alpha); +} + +void +Color::SetRGB32(unsigned int rgb, bool hasAlpha) +{ + __color = ((hasAlpha ? rgb : (0xFF000000 | rgb))); +} + +Color +Color::GetColor(ColorId colorId) +{ + Color color(0xFF000000); + + switch (colorId) + { + case COLOR_ID_BLACK: + color.SetRGB32(0xFF000000); + break; + case COLOR_ID_BLUE: + color.SetRGB32(0xFF0000FF); + break; + case COLOR_ID_CYAN: + color.SetRGB32(0xFF00FFFF); + break; + case COLOR_ID_GREEN: + color.SetRGB32(0xFF00FF00); + break; + case COLOR_ID_GREY: + color.SetRGB32(0xFFC0C0C0); + break; + case COLOR_ID_MAGENTA: + color.SetRGB32(0xFFFF00FF); + break; + case COLOR_ID_RED: + color.SetRGB32(0xFFFF0000); + break; + case COLOR_ID_VIOLET: + color.SetRGB32(0xFF4F2F4F); + break; + case COLOR_ID_YELLOW: + color.SetRGB32(0xFFFFFF00); + break; + case COLOR_ID_WHITE: + color.SetRGB32(0xFFFFFFFF); + break; + } + + return color; +} + +}} // Tizen::Graphics diff --git a/src/graphics/FGrpCoordinateSystem.cpp b/src/graphics/FGrpCoordinateSystem.cpp new file mode 100644 index 0000000..44bed3d --- /dev/null +++ b/src/graphics/FGrpCoordinateSystem.cpp @@ -0,0 +1,226 @@ +// +// 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 FGrpCoordinateSystem.cpp + * @brief This is the cpp file for CoordinateSystem class. + * + */ + +#include + +#include + +#include "FGrp_CoordinateSystem.h" +#include "FGrp_Screen.h" + +#ifdef USE_RESOLUTION_ENUM_VALUE +namespace // unnamed +{ + +Tizen::Graphics::Dimension +ConvertToDimension(Tizen::Graphics::_LogicalResolution logicalResolution) +{ + int width = 0; + int height = 0; + + switch (logicalResolution) + { + case Tizen::Graphics::RESOLUTION_LOGICAL_240: + width = 240; + height = 400; + break; + case Tizen::Graphics::RESOLUTION_LOGICAL_320: + width = 320; + height = 480; + break; + case Tizen::Graphics::RESOLUTION_LOGICAL_480: + width = 480; + height = 800; + break; + case Tizen::Graphics::RESOLUTION_LOGICAL_720: + width = 720; + height = 1280; + break; + default: + width = Tizen::Graphics::_CoordinateSystem::GetInstance()->GetLogicalResolutionInt(); + height = Tizen::Graphics::CoordinateSystem::ConvertToLogicalY(Tizen::Graphics::_Screen::GetHeight()); + break; + } + + return Tizen::Graphics::Dimension(width,height); +} + +} +#endif + +namespace Tizen { namespace Graphics +{ + +Dimension +CoordinateSystem::GetLogicalResolution(void) +{ +#ifdef USE_RESOLUTION_ENUM_VALUE + _LogicalResolution logicalResolution = Tizen::Graphics::_CoordinateSystem::GetInstance()->GetLogicalResolution(); + + return ConvertToDimension(logicalResolution); +#else + int width = Tizen::Graphics::_CoordinateSystem::GetInstance()->GetLogicalResolutionInt(); + int height = Tizen::Graphics::CoordinateSystem::ConvertToLogicalY(Tizen::Graphics::_Screen::GetHeight()); + + return Tizen::Graphics::Dimension(width,height); +#endif +} + +Dimension +CoordinateSystem::GetPhysicalResolution(void) +{ + return Dimension(_Screen::GetWidth(), _Screen::GetHeight()); +} + +int +CoordinateSystem::ConvertToLogicalX(int physicalX) +{ + _ICoordinateSystemTransformer* pTransformer = _CoordinateSystem::GetInstance()->GetInverseTransformer(); + + return (pTransformer) ? pTransformer->TransformHorizontal(physicalX) : physicalX; +} + +float +CoordinateSystem::ConvertToLogicalX(float physicalX) +{ + _ICoordinateSystemTransformer* pTransformer = _CoordinateSystem::GetInstance()->GetInverseTransformer(); + + return (pTransformer) ? pTransformer->TransformHorizontal(physicalX) : physicalX; +} + +int +CoordinateSystem::ConvertToLogicalY(int physicalY) +{ + _ICoordinateSystemTransformer* pTransformer = _CoordinateSystem::GetInstance()->GetInverseTransformer(); + + return (pTransformer) ? pTransformer->TransformVertical(physicalY) : physicalY; +} + +float +CoordinateSystem::ConvertToLogicalY(float physicalY) +{ + _ICoordinateSystemTransformer* pTransformer = _CoordinateSystem::GetInstance()->GetInverseTransformer(); + + return (pTransformer) ? pTransformer->TransformVertical(physicalY) : physicalY; +} + +int +CoordinateSystem::ConvertToPhysicalX(int logicalX) +{ + _ICoordinateSystemTransformer* pTransformer = _CoordinateSystem::GetInstance()->GetTransformer(); + + return (pTransformer) ? pTransformer->TransformHorizontal(logicalX) : logicalX; +} + +float +CoordinateSystem::ConvertToPhysicalX(float logicalX) +{ + _ICoordinateSystemTransformer* pTransformer = _CoordinateSystem::GetInstance()->GetTransformer(); + + return (pTransformer) ? pTransformer->TransformHorizontal(logicalX) : logicalX; +} + +int +CoordinateSystem::ConvertToPhysicalY(int logicalY) +{ + _ICoordinateSystemTransformer* pTransformer = _CoordinateSystem::GetInstance()->GetTransformer(); + + return (pTransformer) ? pTransformer->TransformVertical(logicalY) : logicalY; +} + +float +CoordinateSystem::ConvertToPhysicalY(float logicalY) +{ + _ICoordinateSystemTransformer* pTransformer = _CoordinateSystem::GetInstance()->GetTransformer(); + + return (pTransformer) ? pTransformer->TransformVertical(logicalY) : logicalY; +} + +FloatPoint +CoordinateSystem::AlignToDevice(const FloatPoint& point) +{ + _ICoordinateSystemTransformer* pTransformer = _CoordinateSystem::GetInstance()->GetTransformer(); + + if (pTransformer != null) + { + FloatPoint output; + + float convertedX = pTransformer->TransformHorizontalFloatToInt(point.x); + float convertedY = pTransformer->TransformVerticalFloatToInt(point.y); + + output.x = CoordinateSystem::ConvertToLogicalX(convertedX); + output.y = CoordinateSystem::ConvertToLogicalY(convertedY); + + return output; + } + + return point; +} + +FloatDimension +CoordinateSystem::AlignToDevice(const FloatDimension& dimension) +{ + _ICoordinateSystemTransformer* pTransformer = _CoordinateSystem::GetInstance()->GetTransformer(); + + if (pTransformer != null) + { + FloatDimension output; + + float convertedW = pTransformer->TransformHorizontalFloatToInt(dimension.width); + float convertedH = pTransformer->TransformVerticalFloatToInt(dimension.height); + + output.width = CoordinateSystem::ConvertToLogicalX(convertedW); + output.height = CoordinateSystem::ConvertToLogicalY(convertedH); + + return output; + } + + return dimension; +} + +FloatRectangle +CoordinateSystem::AlignToDevice(const FloatRectangle& rectangle) +{ + _ICoordinateSystemTransformer* pTransformer = _CoordinateSystem::GetInstance()->GetTransformer(); + + if (pTransformer != null) + { + FloatRectangle output; + + float convertedX = pTransformer->TransformHorizontalFloatToInt(rectangle.x); + float convertedY = pTransformer->TransformVerticalFloatToInt(rectangle.y); + 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); + output.width = CoordinateSystem::ConvertToLogicalX(convertedW); + output.height = CoordinateSystem::ConvertToLogicalY(convertedH); + + return output; + } + + return rectangle; +} + +}} // Tizen::Graphics diff --git a/src/graphics/FGrpDimension.cpp b/src/graphics/FGrpDimension.cpp new file mode 100644 index 0000000..923b53b --- /dev/null +++ b/src/graphics/FGrpDimension.cpp @@ -0,0 +1,119 @@ +// +// 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 FGrpDimension.cpp + * @brief This is the implementation file for Dimension class. + * + * This file contains implementation of Point class. + * + */ + +#include + + +namespace Tizen { namespace Graphics +{ + +Dimension::Dimension(void) + : width(0) + , height(0) + , __pImpl(null) +{ +} + +Dimension::Dimension(const Dimension & rhs) + : width(rhs.width) + , height(rhs.height) + , __pImpl(null) +{ +} + +Dimension::Dimension(int width_, int height_) + : width(width_) + , height(height_) + , __pImpl(null) +{ +} + +Dimension::~Dimension(void) +{ +} + +Dimension& +Dimension::operator= (const Dimension & rhs) +{ + if (this == &rhs) + { + return *this; + } + + this->width = rhs.width; + this->height = rhs.height; + this->__pImpl = null; + + return *this; +} + +bool +Dimension::operator ==(const Dimension& rhs) const +{ + return ((this->width == rhs.width && this->height == rhs.height) ? true : false); +} + +bool +Dimension::operator !=(const Dimension& rhs) const +{ + return (!operator ==(rhs)); +} + +bool +Dimension::Equals(const Tizen::Base::Object& rhs) const +{ + if (&rhs == null) + { + return false; + } + + const Dimension* pDim = dynamic_cast (&rhs); + + if (pDim == null) + { + return false; + } + + return (*this == *pDim); +} + +int +Dimension::GetHashCode(void) const +{ + int bits = this->width; + + bits ^= this->height * 31; + + return (((int) bits) ^ ((int) (bits >> 16))); +} + +void +Dimension::SetSize(int width, int height) +{ + this->width = width; + this->height = height; +} + +}} // Tizen::Graphics diff --git a/src/graphics/FGrpEnrichedText.cpp b/src/graphics/FGrpEnrichedText.cpp new file mode 100644 index 0000000..f101a8f --- /dev/null +++ b/src/graphics/FGrpEnrichedText.cpp @@ -0,0 +1,556 @@ +// +// 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 FGrpEnrichedText.cpp +* @brief This is the cpp file for EnrichedText class. +*/ + +#include + +#include +#include +#include +#include + +#include + +#include "FGrp_EnrichedTextImpl.h" +#include "FGrp_ResUtil.h" +#include "FGrp_CoordinateSystemUtils.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; +using namespace Tizen::Base::Utility; + +#define CHECK_NOT_CONSTRUCTED \ + 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."); + +#define CHECK_CONSTRUCTED \ + ClearLastResult(); \ + SysAssertf((this->__pImpl != null) && this->__pImpl->IsConstructed(), \ + "Not yet constructed. Construct() should be called before use."); + +#define CHECK_CONSTRUCTED_EX(_result) \ + ClearLastResult(); \ + SysAssertf((this->__pImpl != null) && this->__pImpl->IsConstructed(), \ + "Not yet constructed. Construct() should be called before use."); + +#define CHECK_CONSTRUCTED_VOID \ + ClearLastResult(); \ + SysAssertf((this->__pImpl != null) && this->__pImpl->IsConstructed(), \ + "Not yet constructed. Construct() should be called before use."); + +namespace Tizen { namespace Graphics +{ + +EnrichedText::EnrichedText() +{ + __pImpl = new (std::nothrow) _EnrichedTextImpl; +} + +EnrichedText::~EnrichedText() +{ + if (__pImpl) + { + delete __pImpl; + __pImpl = null; + } +} + +result +EnrichedText::Construct(const Tizen::Graphics::Dimension& dim) +{ + CHECK_NOT_CONSTRUCTED; + + result r = __pImpl->Construct(dim); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +EnrichedText::Construct(const Tizen::Graphics::FloatDimension& dim) +{ + CHECK_NOT_CONSTRUCTED; + + result r = __pImpl->Construct(dim); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +EnrichedText::InsertAt(int elementIndex, Tizen::Graphics::TextElement& element) +{ + CHECK_CONSTRUCTED; + + return __pImpl->InsertAt(elementIndex, element); +} + +result +EnrichedText::RemoveAt(int elementIndex, bool deallocate) +{ + CHECK_CONSTRUCTED; + + return __pImpl->RemoveAt(elementIndex, deallocate); +} + +result +EnrichedText::Remove(Tizen::Graphics::TextElement& element, bool deallocate) +{ + CHECK_CONSTRUCTED; + + return __pImpl->Remove(element, deallocate); +} + +result +EnrichedText::Add(Tizen::Graphics::TextElement& element) +{ + CHECK_CONSTRUCTED; + + return __pImpl->Add(element); +} + +result +EnrichedText::RemoveAllTextElements(bool deallocate) +{ + CHECK_CONSTRUCTED; + + return __pImpl->RemoveAllTextElements(deallocate); +} + +result +EnrichedText::RemoveAll(bool deallocate) +{ + CHECK_CONSTRUCTED; + + return __pImpl->RemoveAll(deallocate); +} + +TextElement* +EnrichedText::GetTextElementAt(int elementIndex) const +{ + CHECK_CONSTRUCTED_EX(null); + + return __pImpl->GetTextElementAt(elementIndex); +} + +int +EnrichedText::GetTextElementCount(void) const +{ + CHECK_CONSTRUCTED_EX(0); + + return __pImpl->GetTextElementCount(); +} + +result +EnrichedText::SetSize(const Tizen::Graphics::Dimension& size) +{ + CHECK_CONSTRUCTED; + + return __pImpl->SetSize(size); +} + +result +EnrichedText::SetSize(const Tizen::Graphics::FloatDimension& size) +{ + CHECK_CONSTRUCTED; + + return __pImpl->SetSize(size); +} + +result +EnrichedText::SetSize(int width, int height) +{ + CHECK_CONSTRUCTED; + + return __pImpl->SetSize(width, height); +} + +result +EnrichedText::SetSize(float width, float height) +{ + CHECK_CONSTRUCTED; + + return __pImpl->SetSize(width, height); +} + +Tizen::Graphics::Dimension +EnrichedText::GetSize(void) const +{ + CHECK_CONSTRUCTED_EX(Dimension(0, 0)); + + return __pImpl->GetSize(); +} + +Tizen::Graphics::FloatDimension +EnrichedText::GetSizeF(void) const +{ + CHECK_CONSTRUCTED_EX(FloatDimension(0.0f, 0.0f)); + + return __pImpl->GetSizeF(); +} + +void +EnrichedText::GetSize(int& width, int& height) const +{ + CHECK_CONSTRUCTED_VOID; + + return __pImpl->GetSize(width, height); +} + +void +EnrichedText::GetSize(float& width, float& height) const +{ + CHECK_CONSTRUCTED_VOID; + + return __pImpl->GetSize(width, height); +} + +int +EnrichedText::GetWidth(void) const +{ + CHECK_CONSTRUCTED_EX(0); + + return __pImpl->GetWidth(); +} + +float +EnrichedText::GetWidthF(void) const +{ + CHECK_CONSTRUCTED_EX(0.0f); + + return __pImpl->GetWidthF(); +} + +int +EnrichedText::GetHeight(void) const +{ + CHECK_CONSTRUCTED_EX(0); + + return __pImpl->GetHeight(); +} + +float +EnrichedText::GetHeightF(void) const +{ + CHECK_CONSTRUCTED_EX(0.0f); + + return __pImpl->GetHeightF(); +} + +result +EnrichedText::SetVerticalAlignment(TextVerticalAlignment alignment) +{ + CHECK_CONSTRUCTED; + + return __pImpl->SetVerticalAlignment(alignment); +} + +result +EnrichedText::SetHorizontalAlignment(TextHorizontalAlignment alignment) +{ + CHECK_CONSTRUCTED; + + return __pImpl->SetHorizontalAlignment(alignment); +} + +TextVerticalAlignment +EnrichedText::GetVerticalAlignment(void) const +{ + CHECK_CONSTRUCTED_EX(TEXT_ALIGNMENT_VERTICAL_MIN); + + return __pImpl->GetVerticalAlignment(); +} + +TextHorizontalAlignment +EnrichedText::GetHorizontalAlignment(void) const +{ + CHECK_CONSTRUCTED_EX(TEXT_ALIGNMENT_HORIZONTAL_MIN); + + return __pImpl->GetHorizontalAlignment(); +} + +result +EnrichedText::SetTextWrapStyle(TextWrap wrap) +{ + CHECK_CONSTRUCTED; + + return __pImpl->SetTextWrapStyle(wrap); +} + +TextWrap +EnrichedText::GetTextWrapStyle(void) const +{ + CHECK_CONSTRUCTED_EX(TEXT_WRAP_MIN); + + return __pImpl->GetTextWrapStyle(); +} + +result +EnrichedText::SetTextAbbreviationEnabled(bool enable) +{ + CHECK_CONSTRUCTED; + + return __pImpl->SetTextAbbreviationEnabled(enable); +} + +bool +EnrichedText::IsTextAbbreviationEnabled(void) const +{ + CHECK_CONSTRUCTED_EX(false); + + return __pImpl->IsTextAbbreviationEnabled(); +} + +result +EnrichedText::SetLineSpace(int lineSpace) +{ + CHECK_CONSTRUCTED; + + return __pImpl->SetLineSpace(lineSpace); +} + +result +EnrichedText::SetLineSpace(float lineSpace) +{ + CHECK_CONSTRUCTED; + + return __pImpl->SetLineSpace(lineSpace); +} + +int +EnrichedText::GetLineSpace(void) const +{ + CHECK_CONSTRUCTED_EX(0); + + return __pImpl->GetLineSpace(); +} + +float +EnrichedText::GetLineSpaceF(void) const +{ + CHECK_CONSTRUCTED_EX(0.0f); + + return __pImpl->GetLineSpaceF(); +} + +void +EnrichedText::Refresh(void) +{ + CHECK_CONSTRUCTED_VOID; + + return __pImpl->Refresh(); +} + +int +EnrichedText::GetTotalLineCount(void) const +{ + CHECK_CONSTRUCTED_EX(0); + + return __pImpl->GetTotalLineCount(); +} + +int +EnrichedText::GetTotalLineHeight(void) const +{ + CHECK_CONSTRUCTED_EX(0); + + return __pImpl->GetTotalLineHeight(); +} + +float +EnrichedText::GetTotalLineHeightF(void) const +{ + CHECK_CONSTRUCTED_EX(0.0f); + + return __pImpl->GetTotalLineHeightF(); +} + +int +EnrichedText::GetDisplayLineCount(void) const +{ + CHECK_CONSTRUCTED_EX(0); + + return __pImpl->GetDisplayLineCount(); +} + +int +EnrichedText::GetLineLength(int lineIndex) const +{ + CHECK_CONSTRUCTED_EX(0); + + return __pImpl->GetLineLength(lineIndex); +} + +int +EnrichedText::GetFirstTextIndex(int lineIndex) const +{ + CHECK_CONSTRUCTED_EX(0); + + return __pImpl->GetFirstTextIndex(lineIndex); +} + +int +EnrichedText::GetLineIndex(int textIndex) const +{ + CHECK_CONSTRUCTED_EX(0); + + return __pImpl->GetLineIndex(textIndex); +} + +int +EnrichedText::GetLineHeight(int lineIndex) const +{ + CHECK_CONSTRUCTED_EX(0); + + return __pImpl->GetLineHeight(lineIndex); +} + +float +EnrichedText::GetLineHeightF(int lineIndex) const +{ + CHECK_CONSTRUCTED_EX(0.0f); + + return __pImpl->GetLineHeightF(lineIndex); +} + +int +EnrichedText::GetTextLength(void) const +{ + CHECK_CONSTRUCTED_EX(0); + + return __pImpl->GetTextLength(); +} + +result +EnrichedText::GetTextExtent(int startTextIndex, int textLength, int& width, int& height, int& actualLength) const +{ + CHECK_CONSTRUCTED; + + return __pImpl->GetTextExtent(startTextIndex, textLength, width, height, actualLength); +} + +result +EnrichedText::GetTextExtent(int startTextIndex, int textLength, float& width, float& height, int& actualLength) const +{ + CHECK_CONSTRUCTED; + + return __pImpl->GetTextExtent(startTextIndex, textLength, width, height, actualLength); +} + +result +EnrichedText::GetTextExtent(int startTextIndex, int textLength, Tizen::Graphics::Dimension& size, int& actualLength) const +{ + CHECK_CONSTRUCTED; + + return __pImpl->GetTextExtent(startTextIndex, textLength, size, actualLength); +} + +result +EnrichedText::GetTextExtent(int startTextIndex, int textLength, Tizen::Graphics::FloatDimension& size, int& actualLength) const +{ + CHECK_CONSTRUCTED; + + return __pImpl->GetTextExtent(startTextIndex, textLength, size, actualLength); +} + +Tizen::Graphics::Dimension +EnrichedText::GetTextExtent(void) const +{ + CHECK_CONSTRUCTED_EX(Dimension(-1, -1)); + + return __pImpl->GetTextExtent(); +} + +Tizen::Graphics::FloatDimension +EnrichedText::GetTextExtentF(void) const +{ + CHECK_CONSTRUCTED_EX(FloatDimension(-1.0f, -1.0f)); + + return __pImpl->GetTextExtentF(); +} + +result +EnrichedText::Add(const Tizen::Graphics::Bitmap& bitmap) +{ + CHECK_CONSTRUCTED; + + return __pImpl->Add(bitmap); +} + +result +EnrichedText::InsertAt(int elementIndex, const Tizen::Graphics::Bitmap& bitmap) +{ + CHECK_CONSTRUCTED; + + return __pImpl->InsertAt(elementIndex, bitmap); +} + +result +EnrichedText::GetLinkInfoFromPosition(const Point& point, Tizen::Base::Utility::LinkInfo& linkInfo) const +{ + CHECK_CONSTRUCTED; + + return __pImpl->GetLinkInfoFromPosition(point, linkInfo); +} + +result +EnrichedText::GetLinkInfoFromPosition(const FloatPoint& point, Tizen::Base::Utility::LinkInfo& linkInfo) const +{ + CHECK_CONSTRUCTED; + + return __pImpl->GetLinkInfoFromPosition(point, linkInfo); +} + +result +EnrichedText::GetLinkInfoFromPosition(int x, int y, Tizen::Base::Utility::LinkInfo& linkInfo) const +{ + CHECK_CONSTRUCTED; + + return __pImpl->GetLinkInfoFromPosition(x, y, linkInfo); +} + +result +EnrichedText::GetLinkInfoFromPosition(float x, float y, Tizen::Base::Utility::LinkInfo& linkInfo) const +{ + CHECK_CONSTRUCTED; + + return __pImpl->GetLinkInfoFromPosition(x, y, linkInfo); +} + +TextVerticalAlignment +EnrichedText::GetElementVerticalAlignment(void) const +{ + CHECK_CONSTRUCTED_EX(TEXT_ALIGNMENT_VERTICAL_MIN); + + return __pImpl->GetElementVerticalAlignment(); +} + +result +EnrichedText::SetElementVerticalAlignment(TextVerticalAlignment alignment) +{ + CHECK_CONSTRUCTED; + + return __pImpl->SetElementVerticalAlignment(alignment); +} + +}} // Tizen::Graphics diff --git a/src/graphics/FGrpFloatDimension.cpp b/src/graphics/FGrpFloatDimension.cpp new file mode 100644 index 0000000..8922024 --- /dev/null +++ b/src/graphics/FGrpFloatDimension.cpp @@ -0,0 +1,134 @@ +// +// 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 FGrpFloatDimension.cpp + * @brief This is the implementation file for FloatDimension class. + * + * This file contains implementation of Point class. + * + */ + +#include + + +namespace // unnamed +{ + +// epsilon is assumed to be 0.00001f, not 1.192092896e-07f +const float _EPSILON = 0.00001f; + +inline bool +_IsEqual(float f1, float f2) +{ + return (((f1 > f2) ? f1 - f2 : f2 - f1) < _EPSILON); +} + +} + +namespace Tizen { namespace Graphics +{ + +FloatDimension::FloatDimension(void) + : width(0.0f) + , height(0.0f) + , __pImpl(null) +{ +} + +FloatDimension::FloatDimension(const FloatDimension& rhs) + : width(rhs.width) + , height(rhs.height) + , __pImpl(null) +{ +} + +FloatDimension::FloatDimension(float width_, float height_) + : width(width_) + , height(height_) + , __pImpl(null) +{ +} + +FloatDimension::~FloatDimension(void) +{ +} + +FloatDimension& +FloatDimension::operator=(const FloatDimension& rhs) +{ + if (this == &rhs) + { + return *this; + } + + this->width = rhs.width; + this->height = rhs.height; + this->__pImpl = null; + + return *this; +} + +bool +FloatDimension::operator ==(const FloatDimension& rhs) const +{ + return ((_IsEqual(this->width, rhs.width) && _IsEqual(this->height, rhs.height)) ? true : false); +} + +bool +FloatDimension::operator !=(const FloatDimension& rhs) const +{ + return (!operator ==(rhs)); +} + +bool +FloatDimension::Equals(const Tizen::Base::Object& rhs) const +{ + if (&rhs == null) + { + return false; + } + + const FloatDimension* pDim = dynamic_cast (&rhs); + + if (pDim == null) + { + return false; + } + + return (*this == *pDim); +} + +int +FloatDimension::GetHashCode(void) const +{ + const float inverseEpsilon = 1.0f / _EPSILON; + + int reinterpretedX = int(this->width * inverseEpsilon); + int reinterpretedY = int(this->height * inverseEpsilon); + + return reinterpretedX ^ (reinterpretedY * 31); +} + +void +FloatDimension::SetSize(float width, float height) +{ + this->width = width; + this->height = height; +} + +}} // Tizen::Graphics diff --git a/src/graphics/FGrpFloatMatrix4.cpp b/src/graphics/FGrpFloatMatrix4.cpp new file mode 100644 index 0000000..e0bfbd6 --- /dev/null +++ b/src/graphics/FGrpFloatMatrix4.cpp @@ -0,0 +1,699 @@ +// +// 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 FGrpFloatMatrix4.cpp + * @brief This is the implementation for FloatMatrix class. + */ + +#include +#include +#include +#include + + +namespace Tizen { namespace Graphics +{ + +static const int MATRIX_SIZE = sizeof(float) * 16; +#define SWAP_VALUES(a, b, tmp) tmp = a; a = b; b = tmp; + +FloatMatrix4::FloatMatrix4(void) + : __pImpl(null) +{ + SetAsIdentity(); +} + +FloatMatrix4::FloatMatrix4(const FloatMatrix4& rhs) + : __pImpl(null) +{ + memcpy(matrix, rhs.matrix, MATRIX_SIZE); +} + +FloatMatrix4::FloatMatrix4(const float matrix[4][4]) + : __pImpl(null) +{ + memcpy(this->matrix, matrix, MATRIX_SIZE); +} + +FloatMatrix4::~FloatMatrix4(void) +{ +} + +bool +FloatMatrix4::operator ==(const FloatMatrix4& rhs) const +{ + if (this == &rhs) + { + return true; + } + + return (matrix[0][0] == rhs.matrix[0][0] && + matrix[0][1] == rhs.matrix[0][1] && + matrix[0][2] == rhs.matrix[0][2] && + matrix[0][3] == rhs.matrix[0][3] && + matrix[1][0] == rhs.matrix[1][0] && + matrix[1][1] == rhs.matrix[1][1] && + matrix[1][2] == rhs.matrix[1][2] && + matrix[1][3] == rhs.matrix[1][3] && + matrix[2][0] == rhs.matrix[2][0] && + matrix[2][1] == rhs.matrix[2][1] && + matrix[2][2] == rhs.matrix[2][2] && + matrix[2][3] == rhs.matrix[2][3] && + matrix[3][0] == rhs.matrix[3][0] && + matrix[3][1] == rhs.matrix[3][1] && + matrix[3][2] == rhs.matrix[3][2] && + matrix[3][3] == rhs.matrix[3][3]); +} + +bool +FloatMatrix4::operator !=(const FloatMatrix4& rhs) const +{ + return !(*this == rhs); +} + +FloatMatrix4& +FloatMatrix4::operator =(const FloatMatrix4& rhs) +{ + if (this != &rhs) + { + memcpy(matrix, rhs.matrix, MATRIX_SIZE); + } + + return *this; +} + +FloatMatrix4& +FloatMatrix4::operator =(float value) +{ + matrix[0][0] = value; + matrix[1][0] = value; + matrix[2][0] = value; + matrix[3][0] = value; + + matrix[0][1] = value; + matrix[1][1] = value; + matrix[2][1] = value; + matrix[3][1] = value; + + matrix[0][2] = value; + matrix[1][2] = value; + matrix[2][2] = value; + matrix[3][2] = value; + + matrix[0][3] = value; + matrix[1][3] = value; + matrix[2][3] = value; + matrix[3][3] = value; + + return *this; +} + +FloatMatrix4 +FloatMatrix4::operator *(const FloatMatrix4& rhs) const +{ + FloatMatrix4 resultMatrix; + + resultMatrix.matrix[0][0] = (this->matrix[0][0] * rhs.matrix[0][0]) + + (this->matrix[1][0] * rhs.matrix[0][1]) + + (this->matrix[2][0] * rhs.matrix[0][2]) + + (this->matrix[3][0] * rhs.matrix[0][3]); + resultMatrix.matrix[1][0] = (this->matrix[0][0] * rhs.matrix[1][0]) + + (this->matrix[1][0] * rhs.matrix[1][1]) + + (this->matrix[2][0] * rhs.matrix[1][2]) + + (this->matrix[3][0] * rhs.matrix[1][3]); + resultMatrix.matrix[2][0] = (this->matrix[0][0] * rhs.matrix[2][0]) + + (this->matrix[1][0] * rhs.matrix[2][1]) + + (this->matrix[2][0] * rhs.matrix[2][2]) + + (this->matrix[3][0] * rhs.matrix[2][3]); + resultMatrix.matrix[3][0] = (this->matrix[0][0] * rhs.matrix[3][0]) + + (this->matrix[1][0] * rhs.matrix[3][1]) + + (this->matrix[2][0] * rhs.matrix[3][2]) + + (this->matrix[3][0] * rhs.matrix[3][3]); + + resultMatrix.matrix[0][1] = (this->matrix[0][1] * rhs.matrix[0][0]) + + (this->matrix[1][1] * rhs.matrix[0][1]) + + (this->matrix[2][1] * rhs.matrix[0][2]) + + (this->matrix[3][1] * rhs.matrix[0][3]); + resultMatrix.matrix[1][1] = (this->matrix[0][1] * rhs.matrix[1][0]) + + (this->matrix[1][1] * rhs.matrix[1][1]) + + (this->matrix[2][1] * rhs.matrix[1][2]) + + (this->matrix[3][1] * rhs.matrix[1][3]); + resultMatrix.matrix[2][1] = (this->matrix[0][1] * rhs.matrix[2][0]) + + (this->matrix[1][1] * rhs.matrix[2][1]) + + (this->matrix[2][1] * rhs.matrix[2][2]) + + (this->matrix[3][1] * rhs.matrix[2][3]); + resultMatrix.matrix[3][1] = (this->matrix[0][1] * rhs.matrix[3][0]) + + (this->matrix[1][1] * rhs.matrix[3][1]) + + (this->matrix[2][1] * rhs.matrix[3][2]) + + (this->matrix[3][1] * rhs.matrix[3][3]); + + resultMatrix.matrix[0][2] = (this->matrix[0][2] * rhs.matrix[0][0]) + + (this->matrix[1][2] * rhs.matrix[0][1]) + + (this->matrix[2][2] * rhs.matrix[0][2]) + + (this->matrix[3][2] * rhs.matrix[0][3]); + resultMatrix.matrix[1][2] = (this->matrix[0][2] * rhs.matrix[1][0]) + + (this->matrix[1][2] * rhs.matrix[1][1]) + + (this->matrix[2][2] * rhs.matrix[1][2]) + + (this->matrix[3][2] * rhs.matrix[1][3]); + resultMatrix.matrix[2][2] = (this->matrix[0][2] * rhs.matrix[2][0]) + + (this->matrix[1][2] * rhs.matrix[2][1]) + + (this->matrix[2][2] * rhs.matrix[2][2]) + + (this->matrix[3][2] * rhs.matrix[2][3]); + resultMatrix.matrix[3][2] = (this->matrix[0][2] * rhs.matrix[3][0]) + + (this->matrix[1][2] * rhs.matrix[3][1]) + + (this->matrix[2][2] * rhs.matrix[3][2]) + + (this->matrix[3][2] * rhs.matrix[3][3]); + + resultMatrix.matrix[0][3] = (this->matrix[0][3] * rhs.matrix[0][0]) + + (this->matrix[1][3] * rhs.matrix[0][1]) + + (this->matrix[2][3] * rhs.matrix[0][2]) + + (this->matrix[3][3] * rhs.matrix[0][3]); + resultMatrix.matrix[1][3] = (this->matrix[0][3] * rhs.matrix[1][0]) + + (this->matrix[1][3] * rhs.matrix[1][1]) + + (this->matrix[2][3] * rhs.matrix[1][2]) + + (this->matrix[3][3] * rhs.matrix[1][3]); + resultMatrix.matrix[2][3] = (this->matrix[0][3] * rhs.matrix[2][0]) + + (this->matrix[1][3] * rhs.matrix[2][1]) + + (this->matrix[2][3] * rhs.matrix[2][2]) + + (this->matrix[3][3] * rhs.matrix[2][3]); + resultMatrix.matrix[3][3] = (this->matrix[0][3] * rhs.matrix[3][0]) + + (this->matrix[1][3] * rhs.matrix[3][1]) + + (this->matrix[2][3] * rhs.matrix[3][2]) + + (this->matrix[3][3] * rhs.matrix[3][3]); + + return resultMatrix; +} + +FloatVector4 +FloatMatrix4::operator *(const FloatVector4& vector) const +{ + FloatVector4 resultVector; + + resultVector.x = (matrix[0][0] * vector.x) + (matrix[1][0] * vector.y) + + (matrix[2][0] * vector.z) + (matrix[3][0] * vector.w); + resultVector.y = (matrix[0][1] * vector.x) + (matrix[1][1] * vector.y) + + (matrix[2][1] * vector.z) + (matrix[3][1] * vector.w); + resultVector.z = (matrix[0][2] * vector.x) + (matrix[1][2] * vector.y) + + (matrix[2][2] * vector.z) + (matrix[3][2] * vector.w); + resultVector.w = (matrix[0][3] * vector.x) + (matrix[1][3] * vector.y) + + (matrix[2][3] * vector.z) + (matrix[3][3] * vector.w); + + return resultVector; +} + +FloatMatrix4 +FloatMatrix4::operator *(float value) const +{ + FloatMatrix4 resultMatrix(matrix); + + resultMatrix.matrix[0][0] *= value; + resultMatrix.matrix[0][1] *= value; + resultMatrix.matrix[0][2] *= value; + resultMatrix.matrix[0][3] *= value; + + resultMatrix.matrix[1][0] *= value; + resultMatrix.matrix[1][1] *= value; + resultMatrix.matrix[1][2] *= value; + resultMatrix.matrix[1][3] *= value; + + resultMatrix.matrix[2][0] *= value; + resultMatrix.matrix[2][1] *= value; + resultMatrix.matrix[2][2] *= value; + resultMatrix.matrix[2][3] *= value; + + resultMatrix.matrix[3][0] *= value; + resultMatrix.matrix[3][1] *= value; + resultMatrix.matrix[3][2] *= value; + resultMatrix.matrix[3][3] *= value; + + return resultMatrix; +} + +FloatMatrix4 +FloatMatrix4::operator +(const FloatMatrix4& rhs) const +{ + FloatMatrix4 resultMatrix(matrix); + + resultMatrix.matrix[0][0] += rhs.matrix[0][0]; + resultMatrix.matrix[0][1] += rhs.matrix[0][1]; + resultMatrix.matrix[0][2] += rhs.matrix[0][2]; + resultMatrix.matrix[0][3] += rhs.matrix[0][3]; + + resultMatrix.matrix[1][0] += rhs.matrix[1][0]; + resultMatrix.matrix[1][1] += rhs.matrix[1][1]; + resultMatrix.matrix[1][2] += rhs.matrix[1][2]; + resultMatrix.matrix[1][3] += rhs.matrix[1][3]; + + resultMatrix.matrix[2][0] += rhs.matrix[2][0]; + resultMatrix.matrix[2][1] += rhs.matrix[2][1]; + resultMatrix.matrix[2][2] += rhs.matrix[2][2]; + resultMatrix.matrix[2][3] += rhs.matrix[2][3]; + + resultMatrix.matrix[3][0] += rhs.matrix[3][0]; + resultMatrix.matrix[3][1] += rhs.matrix[3][1]; + resultMatrix.matrix[3][2] += rhs.matrix[3][2]; + resultMatrix.matrix[3][3] += rhs.matrix[3][3]; + + return resultMatrix; +} + +FloatMatrix4 +FloatMatrix4::operator +(float value) const +{ + FloatMatrix4 resultMatrix(matrix); + + resultMatrix.matrix[0][0] += value; + resultMatrix.matrix[0][1] += value; + resultMatrix.matrix[0][2] += value; + resultMatrix.matrix[0][3] += value; + + resultMatrix.matrix[1][0] += value; + resultMatrix.matrix[1][1] += value; + resultMatrix.matrix[1][2] += value; + resultMatrix.matrix[1][3] += value; + + resultMatrix.matrix[2][0] += value; + resultMatrix.matrix[2][1] += value; + resultMatrix.matrix[2][2] += value; + resultMatrix.matrix[2][3] += value; + + resultMatrix.matrix[3][0] += value; + resultMatrix.matrix[3][1] += value; + resultMatrix.matrix[3][2] += value; + resultMatrix.matrix[3][3] += value; + + return resultMatrix; +} + +FloatMatrix4 +FloatMatrix4::operator -(const FloatMatrix4& rhs) const +{ + FloatMatrix4 resultMatrix(matrix); + + resultMatrix.matrix[0][0] -= rhs.matrix[0][0]; + resultMatrix.matrix[0][1] -= rhs.matrix[0][1]; + resultMatrix.matrix[0][2] -= rhs.matrix[0][2]; + resultMatrix.matrix[0][3] -= rhs.matrix[0][3]; + + resultMatrix.matrix[1][0] -= rhs.matrix[1][0]; + resultMatrix.matrix[1][1] -= rhs.matrix[1][1]; + resultMatrix.matrix[1][2] -= rhs.matrix[1][2]; + resultMatrix.matrix[1][3] -= rhs.matrix[1][3]; + + resultMatrix.matrix[2][0] -= rhs.matrix[2][0]; + resultMatrix.matrix[2][1] -= rhs.matrix[2][1]; + resultMatrix.matrix[2][2] -= rhs.matrix[2][2]; + resultMatrix.matrix[2][3] -= rhs.matrix[2][3]; + + resultMatrix.matrix[3][0] -= rhs.matrix[3][0]; + resultMatrix.matrix[3][1] -= rhs.matrix[3][1]; + resultMatrix.matrix[3][2] -= rhs.matrix[3][2]; + resultMatrix.matrix[3][3] -= rhs.matrix[3][3]; + + return resultMatrix; +} + +FloatMatrix4 +FloatMatrix4::operator -(float value) const +{ + FloatMatrix4 resultMatrix(matrix); + + resultMatrix.matrix[0][0] -= value; + resultMatrix.matrix[0][1] -= value; + resultMatrix.matrix[0][2] -= value; + resultMatrix.matrix[0][3] -= value; + + resultMatrix.matrix[1][0] -= value; + resultMatrix.matrix[1][1] -= value; + resultMatrix.matrix[1][2] -= value; + resultMatrix.matrix[1][3] -= value; + + resultMatrix.matrix[2][0] -= value; + resultMatrix.matrix[2][1] -= value; + resultMatrix.matrix[2][2] -= value; + resultMatrix.matrix[2][3] -= value; + + resultMatrix.matrix[3][0] -= value; + resultMatrix.matrix[3][1] -= value; + resultMatrix.matrix[3][2] -= value; + resultMatrix.matrix[3][3] -= value; + + return resultMatrix; +} + +FloatMatrix4& +FloatMatrix4::operator *=(const FloatMatrix4& rhs) +{ + *this = *this * rhs; + return *this; +} + +FloatMatrix4& +FloatMatrix4::operator *=(float value) +{ + *this = *this * value; + return *this; +} + +FloatMatrix4& +FloatMatrix4::operator +=(const FloatMatrix4& rhs) +{ + *this = *this + rhs; + return *this; +} + +FloatMatrix4& +FloatMatrix4::operator +=(float value) +{ + *this = *this + value; + return *this; +} + +FloatMatrix4& +FloatMatrix4::operator -=(const FloatMatrix4& rhs) +{ + *this = *this - rhs; + return *this; +} + +FloatMatrix4& +FloatMatrix4::operator -=(float value) +{ + *this = *this - value; + return *this; +} + +FloatMatrix4 +operator +(const float& value, const FloatMatrix4& rhs) +{ + return rhs + value; +} + +FloatMatrix4 +operator *(const float& value, const FloatMatrix4& rhs) +{ + return rhs * value; +} + +FloatMatrix4 +operator -(const float& value, const FloatMatrix4& rhs) +{ + FloatMatrix4 returnMatrix(rhs); + returnMatrix.Negate(); + returnMatrix += value; + return returnMatrix; +} + +bool +FloatMatrix4::Equals(const Tizen::Base::Object& obj) const +{ + const FloatMatrix4* pMatrix = dynamic_cast (&obj); + + if (pMatrix == null) + { + return false; + } + + return (*this == *pMatrix); +} + +int +FloatMatrix4::GetHashCode(void) const +{ + return (Tizen::Base::Float::GetHashCode(matrix[0][0]) + Tizen::Base::Float::GetHashCode(matrix[1][0]) + + Tizen::Base::Float::GetHashCode(matrix[2][0]) + Tizen::Base::Float::GetHashCode(matrix[3][0]) + + Tizen::Base::Float::GetHashCode(matrix[0][1]) + Tizen::Base::Float::GetHashCode(matrix[1][1]) + + Tizen::Base::Float::GetHashCode(matrix[2][1]) + Tizen::Base::Float::GetHashCode(matrix[3][1]) + + Tizen::Base::Float::GetHashCode(matrix[0][2]) + Tizen::Base::Float::GetHashCode(matrix[1][2]) + + Tizen::Base::Float::GetHashCode(matrix[2][2]) + Tizen::Base::Float::GetHashCode(matrix[3][2]) + + Tizen::Base::Float::GetHashCode(matrix[0][3]) + Tizen::Base::Float::GetHashCode(matrix[1][3]) + + Tizen::Base::Float::GetHashCode(matrix[2][3]) + Tizen::Base::Float::GetHashCode(matrix[3][3])); +} + +float +FloatMatrix4::GetDeterminant(void) const +{ + float a0 = matrix[0][0] * matrix[1][1] - matrix[0][1] * matrix[1][0]; + float a1 = matrix[0][0] * matrix[1][2] - matrix[0][2] * matrix[1][0]; + float a2 = matrix[0][0] * matrix[1][3] - matrix[0][3] * matrix[1][0]; + float a3 = matrix[0][1] * matrix[1][2] - matrix[0][2] * matrix[1][1]; + float a4 = matrix[0][1] * matrix[1][3] - matrix[0][3] * matrix[1][1]; + float a5 = matrix[0][2] * matrix[1][3] - matrix[0][3] * matrix[1][2]; + + float b0 = matrix[2][0] * matrix[3][1] - matrix[2][1] * matrix[3][0]; + float b1 = matrix[2][0] * matrix[3][2] - matrix[2][2] * matrix[3][0]; + float b2 = matrix[2][0] * matrix[3][3] - matrix[2][3] * matrix[3][0]; + float b3 = matrix[2][1] * matrix[3][2] - matrix[2][2] * matrix[3][1]; + float b4 = matrix[2][1] * matrix[3][3] - matrix[2][3] * matrix[3][1]; + float b5 = matrix[2][2] * matrix[3][3] - matrix[2][3] * matrix[3][2]; + + return a0 * b5 - a1 * b4 + a2 * b3 + a3 * b2 - a4 * b1 + a5 * b0; +} + +FloatMatrix4 +FloatMatrix4::GetInverse(void) const +{ + float a0 = matrix[0][0] * matrix[1][1] - matrix[0][1] * matrix[1][0]; + float a1 = matrix[0][0] * matrix[1][2] - matrix[0][2] * matrix[1][0]; + float a2 = matrix[0][0] * matrix[1][3] - matrix[0][3] * matrix[1][0]; + float a3 = matrix[0][1] * matrix[1][2] - matrix[0][2] * matrix[1][1]; + float a4 = matrix[0][1] * matrix[1][3] - matrix[0][3] * matrix[1][1]; + float a5 = matrix[0][2] * matrix[1][3] - matrix[0][3] * matrix[1][2]; + + float b0 = matrix[2][0] * matrix[3][1] - matrix[2][1] * matrix[3][0]; + float b1 = matrix[2][0] * matrix[3][2] - matrix[2][2] * matrix[3][0]; + float b2 = matrix[2][0] * matrix[3][3] - matrix[2][3] * matrix[3][0]; + float b3 = matrix[2][1] * matrix[3][2] - matrix[2][2] * matrix[3][1]; + float b4 = matrix[2][1] * matrix[3][3] - matrix[2][3] * matrix[3][1]; + float b5 = matrix[2][2] * matrix[3][3] - matrix[2][3] * matrix[3][2]; + + float determinant = a0 * b5 - a1 * b4 + a2 * b3 + a3 * b2 - a4 * b1 + a5 * b0; + + if (Tizen::Base::Float::Compare(determinant, 0.0f) == 0) + { + return *this; + } + + float inverseMatrix[4][4]; + + inverseMatrix[0][0] = (matrix[1][1] * b5 - matrix[1][2] * b4 + matrix[1][3] * b3) / determinant; + inverseMatrix[1][0] = (-matrix[1][0] * b5 + matrix[1][2] * b2 - matrix[1][3] * b1) / determinant; + inverseMatrix[2][0] = (matrix[1][0] * b4 - matrix[1][1] * b2 + matrix[1][3] * b0) / determinant; + inverseMatrix[3][0] = (-matrix[1][0] * b3 + matrix[1][1] * b1 - matrix[1][2] * b0) / determinant; + + inverseMatrix[0][1] = (-matrix[0][1] * b5 + matrix[0][2] * b4 - matrix[0][3] * b3) / determinant; + inverseMatrix[1][1] = (matrix[0][0] * b5 - matrix[0][2] * b2 + matrix[0][3] * b1) / determinant; + inverseMatrix[2][1] = (-matrix[0][0] * b4 + matrix[0][1] * b2 - matrix[0][3] * b0) / determinant; + inverseMatrix[3][1] = (matrix[0][0] * b3 - matrix[0][1] * b1 + matrix[0][2] * b0) / determinant; + + inverseMatrix[0][2] = (matrix[3][1] * a5 - matrix[3][2] * a4 + matrix[3][3] * a3) / determinant; + inverseMatrix[1][2] = (-matrix[3][0] * a5 + matrix[3][2] * a2 - matrix[3][3] * a1) / determinant; + inverseMatrix[2][2] = (matrix[3][0] * a4 - matrix[3][1] * a2 + matrix[3][3] * a0) / determinant; + inverseMatrix[3][2] = (-matrix[3][0] * a3 + matrix[3][1] * a1 - matrix[3][2] * a0) / determinant; + + inverseMatrix[0][3] = (-matrix[2][1] * a5 + matrix[2][2] * a4 - matrix[2][3] * a3) / determinant; + inverseMatrix[1][3] = (matrix[2][0] * a5 - matrix[2][2] * a2 + matrix[2][3] * a1) / determinant; + inverseMatrix[2][3] = (-matrix[2][0] * a4 + matrix[2][1] * a2 - matrix[2][3] * a0) / determinant; + inverseMatrix[3][3] = (matrix[2][0] * a3 - matrix[2][1] * a1 + matrix[2][2] * a0) / determinant; + + return FloatMatrix4(inverseMatrix); +} + +float +FloatMatrix4::GetTrace(void) const +{ + return matrix[0][0] + matrix[1][1] + matrix[2][2] + matrix[3][3]; +} + +FloatMatrix4 +FloatMatrix4::GetTranspose(void) const +{ + FloatMatrix4 transposeMatrix(matrix); + transposeMatrix.Transpose(); + + return transposeMatrix; +} + +bool +FloatMatrix4::IsIdentity(void) const +{ + if ((Tizen::Base::Float::Compare(matrix[0][0], 1.0f) != 0) || (Tizen::Base::Float::Compare(matrix[1][1], 1.0f) != 0) || + (Tizen::Base::Float::Compare(matrix[2][2], 1.0f) != 0) || (Tizen::Base::Float::Compare(matrix[3][3], 1.0f) != 0)) + { + return false; + } + + if ((Tizen::Base::Float::Compare(matrix[0][1], 0.0f) != 0) || (Tizen::Base::Float::Compare(matrix[0][2], 0.0f) != 0) || + (Tizen::Base::Float::Compare(matrix[0][3], 0.0f) != 0) || (Tizen::Base::Float::Compare(matrix[1][0], 0.0f) != 0) || + (Tizen::Base::Float::Compare(matrix[1][2], 0.0f) != 0) || (Tizen::Base::Float::Compare(matrix[1][3], 0.0f) != 0) || + (Tizen::Base::Float::Compare(matrix[2][0], 0.0f) != 0) || (Tizen::Base::Float::Compare(matrix[2][1], 0.0f) != 0) || + (Tizen::Base::Float::Compare(matrix[2][3], 0.0f) != 0) || (Tizen::Base::Float::Compare(matrix[3][0], 0.0f) != 0) || + (Tizen::Base::Float::Compare(matrix[3][1], 0.0f) != 0) || (Tizen::Base::Float::Compare(matrix[3][2], 0.0f) != 0)) + { + return false; + } + + return true; +} + +bool +FloatMatrix4::IsInvertible(void) const +{ + if (Tizen::Base::Float::Compare(GetDeterminant(), 0.0f) == 0) + { + return false; + } + + return true; +} + +void +FloatMatrix4::Negate(void) +{ + matrix[0][0] = -matrix[0][0]; + matrix[0][1] = -matrix[0][1]; + matrix[0][2] = -matrix[0][2]; + matrix[0][3] = -matrix[0][3]; + + matrix[1][0] = -matrix[1][0]; + matrix[1][1] = -matrix[1][1]; + matrix[1][2] = -matrix[1][2]; + matrix[1][3] = -matrix[1][3]; + + matrix[2][0] = -matrix[2][0]; + matrix[2][1] = -matrix[2][1]; + matrix[2][2] = -matrix[2][2]; + matrix[2][3] = -matrix[2][3]; + + matrix[3][0] = -matrix[3][0]; + matrix[3][1] = -matrix[3][1]; + matrix[3][2] = -matrix[3][2]; + matrix[3][3] = -matrix[3][3]; +} + +void +FloatMatrix4::SetAsIdentity(void) +{ + matrix[0][0] = 1.0f; + matrix[0][1] = 0.0f; + matrix[0][2] = 0.0f; + matrix[0][3] = 0.0f; + + matrix[1][0] = 0.0f; + matrix[1][1] = 1.0f; + matrix[1][2] = 0.0f; + matrix[1][3] = 0.0f; + + matrix[2][0] = 0.0f; + matrix[2][1] = 0.0f; + matrix[2][2] = 1.0f; + matrix[2][3] = 0.0f; + + matrix[3][0] = 0.0f; + matrix[3][1] = 0.0f; + matrix[3][2] = 0.0f; + matrix[3][3] = 1.0f; +} + +result +FloatMatrix4::Invert(void) +{ + float a0 = matrix[0][0] * matrix[1][1] - matrix[0][1] * matrix[1][0]; + float a1 = matrix[0][0] * matrix[1][2] - matrix[0][2] * matrix[1][0]; + float a2 = matrix[0][0] * matrix[1][3] - matrix[0][3] * matrix[1][0]; + float a3 = matrix[0][1] * matrix[1][2] - matrix[0][2] * matrix[1][1]; + float a4 = matrix[0][1] * matrix[1][3] - matrix[0][3] * matrix[1][1]; + float a5 = matrix[0][2] * matrix[1][3] - matrix[0][3] * matrix[1][2]; + + float b0 = matrix[2][0] * matrix[3][1] - matrix[2][1] * matrix[3][0]; + float b1 = matrix[2][0] * matrix[3][2] - matrix[2][2] * matrix[3][0]; + float b2 = matrix[2][0] * matrix[3][3] - matrix[2][3] * matrix[3][0]; + float b3 = matrix[2][1] * matrix[3][2] - matrix[2][2] * matrix[3][1]; + float b4 = matrix[2][1] * matrix[3][3] - matrix[2][3] * matrix[3][1]; + float b5 = matrix[2][2] * matrix[3][3] - matrix[2][3] * matrix[3][2]; + + float determinant = a0 * b5 - a1 * b4 + a2 * b3 + a3 * b2 - a4 * b1 + a5 * b0; + + SysTryReturnResult(NID_GRP, Tizen::Base::Float::Compare(determinant, 0.0f) != 0, E_INVALID_OPERATION, "The current instance is not invertible."); + + float inverseMatrix[4][4]; + + inverseMatrix[0][0] = (matrix[1][1] * b5 - matrix[1][2] * b4 + matrix[1][3] * b3) / determinant; + inverseMatrix[1][0] = (-matrix[1][0] * b5 + matrix[1][2] * b2 - matrix[1][3] * b1) / determinant; + inverseMatrix[2][0] = (matrix[1][0] * b4 - matrix[1][1] * b2 + matrix[1][3] * b0) / determinant; + inverseMatrix[3][0] = (-matrix[1][0] * b3 + matrix[1][1] * b1 - matrix[1][2] * b0) / determinant; + + inverseMatrix[0][1] = (-matrix[0][1] * b5 + matrix[0][2] * b4 - matrix[0][3] * b3) / determinant; + inverseMatrix[1][1] = (matrix[0][0] * b5 - matrix[0][2] * b2 + matrix[0][3] * b1) / determinant; + inverseMatrix[2][1] = (-matrix[0][0] * b4 + matrix[0][1] * b2 - matrix[0][3] * b0) / determinant; + inverseMatrix[3][1] = (matrix[0][0] * b3 - matrix[0][1] * b1 + matrix[0][2] * b0) / determinant; + + inverseMatrix[0][2] = (matrix[3][1] * a5 - matrix[3][2] * a4 + matrix[3][3] * a3) / determinant; + inverseMatrix[1][2] = (-matrix[3][0] * a5 + matrix[3][2] * a2 - matrix[3][3] * a1) / determinant; + inverseMatrix[2][2] = (matrix[3][0] * a4 - matrix[3][1] * a2 + matrix[3][3] * a0) / determinant; + inverseMatrix[3][2] = (-matrix[3][0] * a3 + matrix[3][1] * a1 - matrix[3][2] * a0) / determinant; + + inverseMatrix[0][3] = (-matrix[2][1] * a5 + matrix[2][2] * a4 - matrix[2][3] * a3) / determinant; + inverseMatrix[1][3] = (matrix[2][0] * a5 - matrix[2][2] * a2 + matrix[2][3] * a1) / determinant; + inverseMatrix[2][3] = (-matrix[2][0] * a4 + matrix[2][1] * a2 - matrix[2][3] * a0) / determinant; + inverseMatrix[3][3] = (matrix[2][0] * a3 - matrix[2][1] * a1 + matrix[2][2] * a0) / determinant; + + memcpy(matrix, inverseMatrix, MATRIX_SIZE); + + return E_SUCCESS; +} + +void +FloatMatrix4::Transpose(void) +{ + float tmp = 0.0f; + SWAP_VALUES(matrix[0][1], matrix[1][0], tmp); + SWAP_VALUES(matrix[0][2], matrix[2][0], tmp); + SWAP_VALUES(matrix[0][3], matrix[3][0], tmp); + + SWAP_VALUES(matrix[1][2], matrix[2][1], tmp); + SWAP_VALUES(matrix[1][3], matrix[3][1], tmp); + + SWAP_VALUES(matrix[2][3], matrix[3][2], tmp); +} + +void +FloatMatrix4::SetAsNull(void) +{ + matrix[0][0] = 0.0f; + matrix[0][1] = 0.0f; + matrix[0][2] = 0.0f; + matrix[0][3] = 0.0f; + + matrix[1][0] = 0.0f; + matrix[1][1] = 0.0f; + matrix[1][2] = 0.0f; + matrix[1][3] = 0.0f; + + matrix[2][0] = 0.0f; + matrix[2][1] = 0.0f; + matrix[2][2] = 0.0f; + matrix[2][3] = 0.0f; + + matrix[3][0] = 0.0f; + matrix[3][1] = 0.0f; + matrix[3][2] = 0.0f; + matrix[3][3] = 0.0f; +} + +}} // Tizen::Graphics diff --git a/src/graphics/FGrpFloatPoint.cpp b/src/graphics/FGrpFloatPoint.cpp new file mode 100644 index 0000000..11450c3 --- /dev/null +++ b/src/graphics/FGrpFloatPoint.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 FGrpFloatPoint.cpp + * @brief This is the implementation file for FloatPoint class. + * + * This file contains implementation of FloatPoint class. + * + */ + +#include + + +namespace // unnamed +{ + +// epsilon is assumed to be 0.00001f, not 1.192092896e-07f +const float _EPSILON = 0.00001f; + +inline bool +_IsEqual(float f1, float f2) +{ + return (((f1 > f2) ? f1 - f2 : f2 - f1) < _EPSILON); +} + +} + +namespace Tizen { namespace Graphics +{ + +FloatPoint::FloatPoint(void) + : x(0.0f) + , y(0.0f) + , __pImpl(null) +{ +} + +FloatPoint::FloatPoint(const FloatPoint& rhs) + : x(rhs.x) + , y(rhs.y) + , __pImpl(null) +{ +} + +FloatPoint::FloatPoint(float x_, float y_) + : x(x_) + , y(y_) + , __pImpl(null) +{ +} + +FloatPoint::~FloatPoint(void) +{ +} + +FloatPoint& +FloatPoint::operator=(const FloatPoint& rhs) +{ + if (this == &rhs) + { + return *this; + } + + this->x = rhs.x; + this->y = rhs.y; + this->__pImpl = null; + + return *this; +} + +bool +FloatPoint::operator ==(const FloatPoint& rhs) const +{ + return ((_IsEqual(this->x, rhs.x) && _IsEqual(this->y, rhs.y)) ? true : false); +} + +bool +FloatPoint::operator !=(const FloatPoint& rhs) const +{ + return (!operator ==(rhs)); +} + +FloatPoint +FloatPoint::operator +(const FloatPoint& rhs) const +{ + FloatPoint point; + + point.x = this->x + rhs.x; + point.y = this->y + rhs.y; + + return point; +} + +FloatPoint +FloatPoint::operator -(const FloatPoint& rhs) const +{ + FloatPoint point; + + point.x = this->x - rhs.x; + point.y = this->y - rhs.y; + + return point; +} + +FloatPoint& +FloatPoint::operator +=(const FloatPoint& point) +{ + this->x += point.x; + this->y += point.y; + + return *this; +} + +FloatPoint& +FloatPoint::operator -=(const FloatPoint& point) +{ + this->x -= point.x; + this->y -= point.y; + + return *this; +} + +bool +FloatPoint::Equals(const Object& rhs) const +{ + const FloatPoint* pPoint = dynamic_cast (&rhs); + + if (pPoint == null) + { + return false; + } + + return (*this == *pPoint); +} + +int +FloatPoint::GetHashCode(void) const +{ + const float inverseEpsilon = 1.0f / _EPSILON; + + int reinterpretedX = int(this->x * inverseEpsilon); + int reinterpretedY = int(this->y * inverseEpsilon); + + return reinterpretedX ^ (reinterpretedY * 31); +} + +void +FloatPoint::SetPosition(float x, float y) +{ + this->x = x; + this->y = y; +} + +void +FloatPoint::SetPosition(const FloatPoint& point) +{ + this->x = point.x; + this->y = point.y; +} + +void +FloatPoint::Translate(float x, float y) +{ + this->x += x; + this->y += y; +} + +}} // Tizen::Graphics diff --git a/src/graphics/FGrpFloatPoint3.cpp b/src/graphics/FGrpFloatPoint3.cpp new file mode 100644 index 0000000..8293937 --- /dev/null +++ b/src/graphics/FGrpFloatPoint3.cpp @@ -0,0 +1,177 @@ +// +// 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 FGrpFloatPoint3.cpp + * @brief This is the implementation for %FloatPoint3 class. + */ + +#include +#include +#include +#include + +namespace Tizen { namespace Graphics +{ +FloatPoint3::FloatPoint3(void) + : __pImpl(null) +{ + x = 0.0f; + y = 0.0f; + z = 0.0f; +} + +FloatPoint3::FloatPoint3(const FloatPoint3& rhs) + : __pImpl(null) +{ + x = rhs.x; + y = rhs.y; + z = rhs.z; +} + +FloatPoint3::FloatPoint3(const FloatVector4& vector) + : __pImpl(null) +{ + FloatVector4 normalizedVector = vector.GetNormal(); + + x = normalizedVector.x; + y = normalizedVector.y; + z = normalizedVector.z; +} + +FloatPoint3::FloatPoint3(const float point[3]) + : __pImpl(null) +{ + this->x = point[0]; + this->y = point[1]; + this->z = point[2]; +} + +FloatPoint3::FloatPoint3(float x, float y, float z) + : __pImpl(null) +{ + this->x = x; + this->y = y; + this->z = z; +} + +FloatPoint3::~FloatPoint3(void) +{ +} + +bool +FloatPoint3::operator ==(const FloatPoint3& rhs) const +{ + if (this == &rhs) + { + return true; + } + + return (x == rhs.x && y == rhs.y && z == rhs.z); +} + +FloatPoint3& +FloatPoint3::operator =(const FloatPoint3& rhs) +{ + if (this != &rhs) + { + x = rhs.x; + y = rhs.y; + z = rhs.z; + } + + return *this; +} + +FloatPoint3 +FloatPoint3::operator *(float value) const +{ + return FloatPoint3(x * value, y * value, z * value); +} + +FloatPoint3 +FloatPoint3::operator /(float value) const +{ + return FloatPoint3(x / value, y / value, z / value); +} + +FloatPoint3 +FloatPoint3::operator +(const FloatPoint3& rhs) const +{ + return FloatPoint3(x + rhs.x, y + rhs.y, z + rhs.z); +} + +FloatPoint3 +FloatPoint3::operator -(const FloatPoint3& rhs) const +{ + return FloatPoint3(x - rhs.x, y - rhs.y, z - rhs.z); +} + +FloatPoint3& +FloatPoint3::operator +=(const FloatPoint3& rhs) +{ + this->x += rhs.x; + this->y += rhs.y; + this->z += rhs.z; + + return *this; +} + +FloatPoint3& +FloatPoint3::operator -=(const FloatPoint3& rhs) +{ + this->x -= rhs.x; + this->y -= rhs.y; + this->z -= rhs.z; + + return *this; +} + +bool +FloatPoint3::Equals(const Tizen::Base::Object& obj) const +{ + const FloatPoint3* pVector = dynamic_cast (&obj); + + if (pVector == null) + { + return false; + } + + return (*this == *pVector); +} + +int +FloatPoint3::GetHashCode(void) const +{ + return (Tizen::Base::Float::GetHashCode(x) + + Tizen::Base::Float::GetHashCode(y) + + Tizen::Base::Float::GetHashCode(z)); +} + +FloatPoint3 +operator *(const float& value, const FloatPoint3& rhs) +{ + return rhs * value; +} + +FloatPoint3 +operator /(const float& value, const FloatPoint3& rhs) +{ + return rhs / value; +} + +}} // Tizen::Graphics diff --git a/src/graphics/FGrpFloatRectangle.cpp b/src/graphics/FGrpFloatRectangle.cpp new file mode 100644 index 0000000..6142184 --- /dev/null +++ b/src/graphics/FGrpFloatRectangle.cpp @@ -0,0 +1,334 @@ +// +// 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 FGrpFloatRectangle.cpp + * @brief This is the implementation file for FloatRectangle class. + * + * This file contains implementation of FloatRectangle class. + * + */ + +#include +#include +#include + +#include + +#include "util/FGrp_Util.h" + + +namespace // unnamed +{ + +const float _EMPTY = -1.0f; + +// epsilon is assumed to be 0.00001f, not 1.192092896e-07f +const float _EPSILON = 0.00001f; + +inline bool +_IsEqual(float f1, float f2) +{ + return (((f1 > f2) ? f1 - f2 : f2 - f1) < _EPSILON); +} + +} + +namespace Tizen { namespace Graphics +{ + +FloatRectangle::FloatRectangle() + : x(0.0f) + , y(0.0f) + , width(_EMPTY) + , height(_EMPTY) + , __pImpl(null) +{ +} + +FloatRectangle::FloatRectangle(const FloatRectangle& rhs) + : x(rhs.x) + , y(rhs.y) + , width(rhs.width) + , height(rhs.height) + , __pImpl(null) +{ +} + +FloatRectangle::FloatRectangle(float x_, float y_, float width_, float height_) + : x(x_) + , y(y_) + , width(width_) + , height(height_) + , __pImpl(null) +{ +} + +FloatRectangle::FloatRectangle(const FloatPoint& pt, const FloatDimension& dim) + : x(pt.x) + , y(pt.y) + , width(dim.width) + , height(dim.height) + , __pImpl(null) +{ +} + +FloatRectangle::~FloatRectangle() +{ +} + +FloatRectangle& +FloatRectangle::operator=(const FloatRectangle& rhs) +{ + if (this == &rhs) + { + return *this; + } + + this->x = rhs.x; + this->y = rhs.y; + this->width = rhs.width; + this->height = rhs.height; + this->__pImpl = null; + + return *this; +} +bool +FloatRectangle::operator ==(const FloatRectangle& rhs) const +{ + return ((_IsEqual(this->x, rhs.x) && _IsEqual(this->y, rhs.y) && _IsEqual(this->width, rhs.width) && _IsEqual(this->height, rhs.height)) ? true : false); +} + +bool +FloatRectangle::operator !=(const FloatRectangle& rhs) const +{ + return (!operator ==(rhs)); +} + +bool +FloatRectangle::Contains(const FloatPoint& point) const +{ + if (IsEmpty()) + { + return false; + } + + if (this->x <= point.x && point.x < (this->x + this->width) && + this->y <= point.y && point.y < (this->y + this->height)) + { + return true; + } + + return false; +} + +bool +FloatRectangle::Equals(const Tizen::Base::Object& rhs) const +{ + if (&rhs == null) + { + return false; + } + + const FloatRectangle* pRect = dynamic_cast (&rhs); + + if (pRect == null) + { + return false; + } + + return (*this == *pRect); +} + +int +FloatRectangle::GetHashCode(void) const +{ + int intX = int(this->x); + int intY = int(this->y); + int intWidth = int(this->width); + int intHeight = int(this->height); + + return ((intX & 0xFF) << 24) | ((intY & 0xFF) << 16) | ((intWidth & 0xFF) << 8) | (intHeight & 0xFF); +} + +FloatRectangle +FloatRectangle::GetIntersection(const FloatRectangle& rect) const +{ + FloatRectangle rectResult(0.0f, 0.0f, _EMPTY, _EMPTY); + + if (rect.IsEmpty()) + { + return rectResult; + } + + _Util::Rectangle out; + _Util::Rectangle src1; + _Util::Rectangle src2; + + src1.x = this->x; + src1.y = this->y; + src1.w = this->width; + src1.h = this->height; + + src2.x = rect.x; + src2.y = rect.y; + src2.w = rect.width; + src2.h = rect.height; + + if (!_Util::IntersectRect(out, src1, src2)) + { + return rectResult; + } + + if (out.w <= 0.0f) + { + out.w = _EMPTY; + } + + if (out.h <= 0.0f) + { + out.h = _EMPTY; + } + + // set + rectResult.SetBounds(out.x, out.y, out.w, out.h); + + return rectResult; +} + +bool +FloatRectangle::IsIntersected(const FloatRectangle& rect) const +{ + if (rect.IsEmpty()) + { + return false; + } + + _Util::Rectangle out; + _Util::Rectangle src1; + _Util::Rectangle src2; + + src1.x = this->x; + src1.y = this->y; + src1.w = this->width; + src1.h = this->height; + + src2.x = rect.x; + src2.y = rect.y; + src2.w = rect.width; + src2.h = rect.height; + + return _Util::IntersectRect(out, src1, src2); +} + +FloatRectangle +FloatRectangle::GetUnion(const FloatRectangle& rect) const +{ + FloatRectangle rectResult(0.0f, 0.0f, _EMPTY, _EMPTY); + + if (rect.IsEmpty()) + { + return rectResult; + } + + rectResult.x = _Util::Min(this->x, rect.x); + rectResult.y = _Util::Min(this->y, rect.y); + rectResult.width = _Util::Max((this->x + this->width), (rect.x + rect.width)); + rectResult.width -= rectResult.x; + rectResult.height = _Util::Max((this->y + this->height), (rect.y + rect.height)); + rectResult.height -= rectResult.y; + + return rectResult; +} + +FloatPoint +FloatRectangle::GetBottomRight(void) const +{ + return FloatPoint(this->x + this->width, this->y + this->height); +} + +FloatPoint +FloatRectangle::GetTopLeft(void) const +{ + return FloatPoint(this->x, this->y); +} + +void +FloatRectangle::SetBounds(float x, float y, float width, float height) +{ + this->x = x; + this->y = y; + this->width = width; + this->height = height; +} + +void +FloatRectangle::SetBounds(const FloatPoint& pt, const FloatDimension& dim) +{ + this->x = pt.x; + this->y = pt.y; + this->width = dim.width; + this->height = dim.height; +} + +bool +FloatRectangle::IsEmpty() const +{ + if (this->width <= 0.0f || this->height <= 0.0f) + { + return true; + } + + return false; +} + +void +FloatRectangle::SetSize(const FloatDimension& dim) +{ + this->width = dim.width; + this->height = dim.height; +} + +void +FloatRectangle::SetSize(float width, float height) +{ + this->width = width; + this->height = height; +} + +void +FloatRectangle::SetPosition(const FloatPoint& point) +{ + this->x = point.x; + this->y = point.y; +} + +void +FloatRectangle::SetPosition(float x, float y) +{ + this->x = x; + this->y = y; +} + +void +FloatRectangle::Translate(float x, float y) +{ + this->x += x; + this->y += y; +} + +}} // Tizen::Graphics diff --git a/src/graphics/FGrpFloatVector4.cpp b/src/graphics/FGrpFloatVector4.cpp new file mode 100644 index 0000000..e9df263 --- /dev/null +++ b/src/graphics/FGrpFloatVector4.cpp @@ -0,0 +1,225 @@ +// +// 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 FGrpFloatVector4.cpp + * @brief This is the implementation for %FloatVector4 class. + */ + +#include +#include +#include +#include + + +namespace Tizen { namespace Graphics +{ +FloatVector4::FloatVector4(void) + : __pImpl(null) +{ + x = 0.0f; + y = 0.0f; + z = 0.0f; + w = 0.0f; +} + +FloatVector4::FloatVector4(const FloatVector4& rhs) + : __pImpl(null) +{ + x = rhs.x; + y = rhs.y; + z = rhs.z; + w = rhs.w; +} + +FloatVector4::FloatVector4(const FloatPoint3& point) + : __pImpl(null) +{ + x = point.x; + y = point.y; + z = point.z; + w = 1.0f; +} + +FloatVector4::FloatVector4(const float vector[4]) + : __pImpl(null) +{ + this->x = vector[0]; + this->y = vector[1]; + this->z = vector[2]; + this->w = vector[3]; +} + +FloatVector4::FloatVector4(float x, float y, float z, float w) + : __pImpl(null) +{ + this->x = x; + this->y = y; + this->z = z; + this->w = w; +} + +FloatVector4::~FloatVector4(void) +{ +} + +bool +FloatVector4::operator ==(const FloatVector4& rhs) const +{ + if (this == &rhs) + { + return true; + } + + return (x == rhs.x && y == rhs.y && z == rhs.z && w == rhs.w); +} + +FloatVector4& +FloatVector4::operator =(const FloatVector4& rhs) +{ + if (this != &rhs) + { + x = rhs.x; + y = rhs.y; + z = rhs.z; + w = rhs.w; + } + + return *this; +} + +FloatVector4 +FloatVector4::operator *(float value) const +{ + return FloatVector4(x * value, y * value, z * value, w * value); +} + +FloatVector4 +FloatVector4::operator /(float value) const +{ + return FloatVector4(x / value, y / value, z / value, w / value); +} + +FloatVector4 +FloatVector4::operator +(const FloatVector4& rhs) const +{ + return FloatVector4(x + rhs.x, y + rhs.y, z + rhs.z, w + rhs.w); +} + +FloatVector4 +FloatVector4::operator -(const FloatVector4& rhs) const +{ + return FloatVector4(x - rhs.x, y - rhs.y, z - rhs.z, w - rhs.w); +} + +FloatVector4& +FloatVector4::operator +=(const FloatVector4& rhs) +{ + this->x += rhs.x; + this->y += rhs.y; + this->z += rhs.z; + this->w += rhs.w; + + return *this; +} + +FloatVector4& +FloatVector4::operator -=(const FloatVector4& rhs) +{ + this->x -= rhs.x; + this->y -= rhs.y; + this->z -= rhs.z; + this->w -= rhs.w; + + return *this; +} + +float +FloatVector4::DotProduct(const FloatVector4& rhs) const +{ + return ((x * rhs.x) + + (y * rhs.y) + + (z * rhs.z) + + (w * rhs.w)); +} + +float +FloatVector4::operator *(const FloatVector4& rhs) const +{ + return DotProduct(rhs); +} + +FloatVector4 +operator *(const float& value, const FloatVector4& rhs) +{ + return rhs * value; +} + +FloatVector4 +operator /(const float& value, const FloatVector4& rhs) +{ + return FloatVector4(value / rhs.x, value / rhs.y, value / rhs.z, value / rhs.w); +} + +bool +FloatVector4::Equals(const Tizen::Base::Object& obj) const +{ + const FloatVector4* pVector = dynamic_cast (&obj); + + if (pVector == null) + { + return false; + } + + return (*this == *pVector); +} + +int +FloatVector4::GetHashCode(void) const +{ + return (Tizen::Base::Float::GetHashCode(x) + + Tizen::Base::Float::GetHashCode(y) + + Tizen::Base::Float::GetHashCode(z) + + Tizen::Base::Float::GetHashCode(w)); +} + +float +FloatVector4::GetLength(void) const +{ + return sqrt((x * x) + (y * y) + (z * z) + (w * w)); +} + +FloatVector4 +FloatVector4::GetNormal(void) const +{ + float length = GetLength(); + + return (*this / length); +} + +void +FloatVector4::Normalize(void) +{ + float length = GetLength(); + + x /= length; + y /= length; + z /= length; + w /= length; +} + +}} // Tizen::Graphics diff --git a/src/graphics/FGrpFont.cpp b/src/graphics/FGrpFont.cpp new file mode 100644 index 0000000..e47f1ba --- /dev/null +++ b/src/graphics/FGrpFont.cpp @@ -0,0 +1,464 @@ +// +// 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 FGrpFont.cpp + * @brief This is the implementation file for Font class. + * + * This header file contains implementation of Font class. + * + */ + +#include +#include +#include + +#include + +#include "FGrp_FontImpl.h" +#include "FGrp_ResUtil.h" + +#define CHECK_NOT_CONSTRUCTED \ + 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."); + +#define CHECK_CONSTRUCTED \ + SysAssertf((this->__pImpl != null) && this->__pImpl->IsConstructed(), \ + "Not yet constructed! Construct() should be called before use."); + +#define CHECK_CONSTRUCTED_EX(_result) \ + SysAssertf((this->__pImpl != null) && this->__pImpl->IsConstructed(), \ + "Not yet constructed! Construct() should be called before use."); + +#define CHECK_CONSTRUCTED_VOID \ + SysAssertf((this->__pImpl != null) && this->__pImpl->IsConstructed(), \ + "Not yet constructed! Construct() should be called before use."); + + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + + +namespace Tizen { namespace Graphics +{ + +Font::Font() +{ + __pImpl = new (std::nothrow) _FontImpl; +} + +Font::Font(const Font& rhs) +{ + __pImpl = rhs.__pImpl->CloneN(); +} + +Font::~Font(void) +{ + delete __pImpl; + __pImpl = null; +} + +result +Font::Construct(int style, int vc_size) +{ + CHECK_NOT_CONSTRUCTED; + + // check input param. + SysTryReturnResult(NID_GRP, vc_size > 0, E_INVALID_ARG, "Font size should be greater than 0"); + SysTryReturnResult(NID_GRP, FONT_STYLE_MIN < style && style <= (FONT_STYLE_PLAIN | FONT_STYLE_BOLD | FONT_STYLE_ITALIC), E_INVALID_ARG, + "Style(%d) is invalid", style); + + result r = __pImpl->Construct(style, vc_size); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Font::Construct(const Tizen::Base::String& fontNameOrPath, int style, int vc_size) +{ + CHECK_NOT_CONSTRUCTED; + + // check input param. + SysTryReturnResult(NID_GRP, vc_size > 0, E_INVALID_ARG, "Font size should be greater than 0"); + SysTryReturnResult(NID_GRP, FONT_STYLE_MIN < style && style <= (FONT_STYLE_PLAIN | FONT_STYLE_BOLD | FONT_STYLE_ITALIC), E_INVALID_ARG, + "Style(%d) is invalid.\n", style); + SysTryReturnResult(NID_GRP, fontNameOrPath.GetLength() > 0, E_FILE_NOT_FOUND, "The specified font could not be found or accessed"); + SysTryReturnResult(NID_GRP, !fontNameOrPath.EndsWith(L"/") && !fontNameOrPath.EndsWith(L"\\"), E_FILE_NOT_FOUND, + "The specified font could not be found or accessed.\n"); + + result r = __pImpl->Construct(fontNameOrPath, style, vc_size); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Font::Construct(const Tizen::Base::ByteBuffer& fontData, int style, int vc_size) +{ + CHECK_NOT_CONSTRUCTED; + + // check input param. + SysTryReturnResult(NID_GRP, fontData.GetLimit() > 0, E_INVALID_ARG, "Buffer size should be greater than 0"); + SysTryReturnResult(NID_GRP, vc_size > 0, E_INVALID_ARG, "FontEx size should be greater than 0"); + SysTryReturnResult(NID_GRP, style > FONT_STYLE_MIN && style <= (FONT_STYLE_PLAIN | FONT_STYLE_BOLD | FONT_STYLE_ITALIC), E_INVALID_ARG, + "Style(%d) is invalid", style); + + result r = __pImpl->Construct(fontData, style, vc_size); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Font::Construct(int style, float vc_size) +{ + CHECK_NOT_CONSTRUCTED; + + // check input param. + SysTryReturnResult(NID_GRP, vc_size > 0.0f, E_INVALID_ARG, "Font size should be greater than 0"); + SysTryReturnResult(NID_GRP, FONT_STYLE_MIN < style && style <= (FONT_STYLE_PLAIN | FONT_STYLE_BOLD | FONT_STYLE_ITALIC), E_INVALID_ARG, + "Style(%d) is invalid", style); + + result r = __pImpl->Construct(style, vc_size); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Font::Construct(const Tizen::Base::String& fontNameOrPath, int style, float vc_size) +{ + CHECK_NOT_CONSTRUCTED; + + // check input param. + SysTryReturnResult(NID_GRP, vc_size > 0.0f, E_INVALID_ARG, "Font size should be greater than 0"); + SysTryReturnResult(NID_GRP, FONT_STYLE_MIN < style && style <= (FONT_STYLE_PLAIN | FONT_STYLE_BOLD | FONT_STYLE_ITALIC), E_INVALID_ARG, + "Style(%d) is invalid.\n", style); + SysTryReturnResult(NID_GRP, fontNameOrPath.GetLength() > 0.0f, E_FILE_NOT_FOUND, "The specified font could not be found or accessed"); + SysTryReturnResult(NID_GRP, !fontNameOrPath.EndsWith(L"/") && !fontNameOrPath.EndsWith(L"\\"), E_FILE_NOT_FOUND, + "The specified font could not be found or accessed.\n"); + + result r = __pImpl->Construct(fontNameOrPath, style, vc_size); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Font::Construct(const Tizen::Base::ByteBuffer& fontData, int style, float vc_size) +{ + CHECK_NOT_CONSTRUCTED; + + // check input param. + SysTryReturnResult(NID_GRP, fontData.GetLimit() > 0, E_INVALID_ARG, "Buffer size should be greater than 0"); + SysTryReturnResult(NID_GRP, vc_size > 0.0f, E_INVALID_ARG, "FontEx size should be greater than 0"); + SysTryReturnResult(NID_GRP, style > FONT_STYLE_MIN && style <= (FONT_STYLE_PLAIN | FONT_STYLE_BOLD | FONT_STYLE_ITALIC), E_INVALID_ARG, + "Style(%d) is invalid", style); + + result r = __pImpl->Construct(fontData, style, vc_size); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +int +Font::GetMaxHeight(void) const +{ + CHECK_CONSTRUCTED_EX(-1); + + return __pImpl->GetMaxHeight(); +} + +float +Font::GetMaxHeightF(void) const +{ + CHECK_CONSTRUCTED_EX(-1.0f); + + return __pImpl->GetMaxHeightF(); +} + +int +Font::GetMaxWidth(void) const +{ + CHECK_CONSTRUCTED_EX(-1); + + return __pImpl->GetMaxWidth(); +} + +float +Font::GetMaxWidthF(void) const +{ + CHECK_CONSTRUCTED_EX(-1.0f); + + return __pImpl->GetMaxWidthF(); +} + +int +Font::GetAscender(void) const +{ + CHECK_CONSTRUCTED_EX(-1); + + return __pImpl->GetAscender(); +} + +float +Font::GetAscenderF(void) const +{ + CHECK_CONSTRUCTED_EX(-1.0f); + + return __pImpl->GetAscenderF(); +} + +int +Font::GetDescender(void) const +{ + CHECK_CONSTRUCTED_EX(-1); + + return __pImpl->GetDescender(); +} + +float +Font::GetDescenderF(void) const +{ + CHECK_CONSTRUCTED_EX(-1.0f); + + return __pImpl->GetDescenderF(); +} + +result +Font::GetLeftBear(wchar_t character, int& vc_leftBear) const +{ + CHECK_CONSTRUCTED; + + return __pImpl->GetLeftBear(character, vc_leftBear); +} + +result +Font::GetLeftBear(wchar_t character, float& vc_leftBear) const +{ + CHECK_CONSTRUCTED; + + return __pImpl->GetLeftBear(character, vc_leftBear); +} + +result +Font::GetRightBear(wchar_t character, int& vc_rightBear) const +{ + CHECK_CONSTRUCTED; + + return __pImpl->GetRightBear(character, vc_rightBear); +} + +result +Font::GetRightBear(wchar_t character, float& vc_rightBear) const +{ + CHECK_CONSTRUCTED; + + return __pImpl->GetRightBear(character, vc_rightBear); +} + +result +Font::GetTextExtent(const Tizen::Base::String& text, int length, Dimension& vc_dim) const +{ + CHECK_CONSTRUCTED; + + SysTryReturnResult(NID_GRP, length >= 0 && length <= text.GetLength(), E_OUT_OF_RANGE, + "The length(%d) of the given text is out of range", length); + + if (length == 0 || text.GetLength() == 0) + { + return E_SUCCESS; + } + + result r = __pImpl->GetTextExtent(text, length, vc_dim); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (!Tizen::App::_AppInfo::IsOspCompat()) + { + vc_dim.height = GetMaxHeight(); + } + + return E_SUCCESS; +} + +result +Font::GetTextExtent(const Tizen::Base::String& text, int length, FloatDimension& vc_dim) const +{ + CHECK_CONSTRUCTED; + + SysTryReturnResult(NID_GRP, length >= 0 && length <= text.GetLength(), E_OUT_OF_RANGE, + "The length(%d) of the given text is out of range", length); + + if (length == 0 || text.GetLength() == 0) + { + return E_SUCCESS; + } + + result r = __pImpl->GetTextExtent(text, length, vc_dim); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (!Tizen::App::_AppInfo::IsOspCompat()) + { + vc_dim.height = GetMaxHeightF(); + } + + return E_SUCCESS; +} + +bool +Font::IsBold(void) const +{ + CHECK_CONSTRUCTED_EX(false); + + return __pImpl->IsBold(); +} + +bool +Font::IsItalic(void) const +{ + CHECK_CONSTRUCTED_EX(false); + + return __pImpl->IsItalic(); +} + +bool +Font::IsPlain(void) const +{ + CHECK_CONSTRUCTED_EX(false); + + return __pImpl->IsPlain(); +} + +bool +Font::IsStrikeOut(void) const +{ + CHECK_CONSTRUCTED_EX(false); + + return __pImpl->IsStrikeOut(); +} + +bool +Font::IsUnderlined(void) const +{ + CHECK_CONSTRUCTED_EX(false); + + return __pImpl->IsUnderlined(); +} + +int +Font::GetSize(void) const +{ + CHECK_CONSTRUCTED_EX(-1); + + return __pImpl->GetSize(); +} + +float +Font::GetSizeF(void) const +{ + CHECK_CONSTRUCTED_EX(-1.0f); + + return __pImpl->GetSizeF(); +} + +void +Font::SetStrikeOut(bool strikeout) +{ + CHECK_CONSTRUCTED_VOID; + + __pImpl->SetStrikeOut(strikeout); + + return; +} + +void +Font::SetUnderline(bool underline) +{ + CHECK_CONSTRUCTED_VOID; + + __pImpl->SetUnderline(underline); + + return; +} + +void +Font::SetCharSpace(int vc_space) +{ + CHECK_CONSTRUCTED_VOID; + + __pImpl->SetCharSpace(vc_space); + + return; +} + +void +Font::SetCharSpace(float vc_space) +{ + CHECK_CONSTRUCTED_VOID; + + __pImpl->SetCharSpace(vc_space); + + return; +} + +int +Font::GetCharSpace(void) const +{ + CHECK_CONSTRUCTED_EX(0); + + return __pImpl->GetCharSpace(); +} + +float +Font::GetCharSpaceF(void) const +{ + CHECK_CONSTRUCTED_EX(0.0f); + + return __pImpl->GetCharSpaceF(); +} + +Tizen::Base::String +Font::GetFaceName(void) const +{ + CHECK_CONSTRUCTED_EX(""); + + return __pImpl->GetFaceName(); +} + +Tizen::Base::Collection::IList* +Font::GetSystemFontListN(void) +{ + return _FontImpl::GetSystemFontListN(); +} + +Tizen::Base::String +Font::GetFaceName(const Tizen::Base::String& filePath) +{ + return _FontImpl::GetFaceName(filePath); +} + +}} // Tizen::Graphics diff --git a/src/graphics/FGrpPoint.cpp b/src/graphics/FGrpPoint.cpp new file mode 100644 index 0000000..a931494 --- /dev/null +++ b/src/graphics/FGrpPoint.cpp @@ -0,0 +1,168 @@ +// +// 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 FGrpPoint.cpp + * @brief This is the implementation file for Point class. + * + * This file contains implementation of Point class. + * + */ + +#include + + +namespace Tizen { namespace Graphics +{ + +Point::Point(void) + : x(0) + , y(0) + , __pImpl(null) +{ +} + +Point::Point(const Point & rhs) + : x(rhs.x) + , y(rhs.y) + , __pImpl(null) +{ +} + +Point::Point(int x_, int y_) + : x(x_) + , y(y_) + , __pImpl(null) +{ +} + +Point::~Point(void) +{ +} + +Point& +Point::operator =(const Point & rhs) +{ + if (this == &rhs) + { + return *this; + } + + this->x = rhs.x; + this->y = rhs.y; + this->__pImpl = null; + + return *this; +} + +bool +Point::operator ==(const Point& rhs) const +{ + return ((this->x == rhs.x && this->y == rhs.y) ? true : false); +} + +bool +Point::operator !=(const Point& rhs) const +{ + return (!operator ==(rhs)); +} + +Point +Point::operator +(const Point& rhs) const +{ + Point point; + + point.x = this->x + rhs.x; + point.y = this->y + rhs.y; + + return point; +} + +Point +Point::operator -(const Point& rhs) const +{ + Point point; + + point.x = this->x - rhs.x; + point.y = this->y - rhs.y; + + return point; +} + +Point& +Point::operator +=(const Point& point) +{ + this->x += point.x; + this->y += point.y; + + return *this; +} + +Point& +Point::operator -=(const Point& point) +{ + this->x -= point.x; + this->y -= point.y; + + return *this; +} + +bool +Point::Equals(const Object& rhs) const +{ + const Point* pPoint = dynamic_cast (&rhs); + + if (pPoint == null) + { + return false; + } + + return (*this == *pPoint); +} + +int +Point::GetHashCode(void) const +{ + int bits = this->x; + + bits ^= this->y * 31; + + return (((int) bits) ^ ((int) (bits >> 16))); +} + +void +Point::SetPosition(int x, int y) +{ + this->x = x; + this->y = y; +} + +void +Point::SetPosition(const Point& point) +{ + this->x = point.x; + this->y = point.y; +} + +void +Point::Translate(int x, int y) +{ + this->x += x; + this->y += y; +} + +}} // Tizen::Graphics diff --git a/src/graphics/FGrpRectangle.cpp b/src/graphics/FGrpRectangle.cpp new file mode 100644 index 0000000..0006314 --- /dev/null +++ b/src/graphics/FGrpRectangle.cpp @@ -0,0 +1,321 @@ +// +// 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 FGrpRectangle.cpp + * @brief This is the implementation file for Rectangle class. + * + * This file contains implementation of Rectangle class. + * + */ + +#include +#include +#include + +#include + +#include "util/FGrp_Util.h" + + +namespace Tizen { namespace Graphics +{ + +namespace // unnamed +{ + +const int _EMPTY = -1; + +} + +Rectangle::Rectangle() + : x(0) + , y(0) + , width(_EMPTY) + , height(_EMPTY) + , __pImpl(null) +{ +} + +Rectangle::Rectangle(const Rectangle & rhs) + : x(rhs.x) + , y(rhs.y) + , width(rhs.width) + , height(rhs.height) + , __pImpl(null) +{ +} + +Rectangle::Rectangle(int x_, int y_, int width_, int height_) + : x(x_) + , y(y_) + , width(width_) + , height(height_) + , __pImpl(null) +{ +} + +Rectangle::Rectangle(const Point& pt, const Dimension& dim) + : x(pt.x) + , y(pt.y) + , width(dim.width) + , height(dim.height) + , __pImpl(null) +{ +} + +Rectangle::~Rectangle() +{ +} + +Rectangle& +Rectangle::operator =(const Rectangle & rhs) +{ + if (this == &rhs) + { + return *this; + } + + this->x = rhs.x; + this->y = rhs.y; + this->width = rhs.width; + this->height = rhs.height; + this->__pImpl = null; + + return *this; +} + +bool +Rectangle::operator ==(const Rectangle& rhs) const +{ + return ((this->x == rhs.x && this->y == rhs.y && this->width == rhs.width && this->height == rhs.height) ? true : false); +} + +bool +Rectangle::operator !=(const Rectangle& rhs) const +{ + return (!operator ==(rhs)); +} + +bool +Rectangle::Contains(const Point& point) const +{ + if (IsEmpty()) + { + return false; + } + + if (this->x <= point.x && point.x < (this->x + this->width) && + this->y <= point.y && point.y < (this->y + this->height)) + { + return true; + } + + return false; +} + +bool +Rectangle::Equals(const Tizen::Base::Object& rhs) const +{ + if (&rhs == null) + { + return false; + } + + const Rectangle* pRect = dynamic_cast (&rhs); + + if (pRect == null) + { + return false; + } + + return (*this == *pRect); +} + +int +Rectangle::GetHashCode(void) const +{ + return ((this->x & 0xFF) << 24) | ((this->y & 0xFF) << 16) | ((this->width & 0xFF) << 8) | (this->height & 0xFF); +} + +Rectangle +Rectangle::GetIntersection(const Rectangle& rect) const +{ + Rectangle rectResult; + + if (rect.IsEmpty() || this->IsEmpty()) + { + return rectResult; + } + + _Util::Rectangle out; + _Util::Rectangle src1; + _Util::Rectangle src2; + + src1.x = this->x; + src1.y = this->y; + src1.w = this->width; + src1.h = this->height; + + src2.x = rect.x; + src2.y = rect.y; + src2.w = rect.width; + src2.h = rect.height; + + if (!_Util::IntersectRect(out, src1, src2)) + { + return rectResult; + } + + if (out.w <= 0) + { + out.w = _EMPTY; + } + + if (out.h <= 0) + { + out.h = _EMPTY; + } + + // set + rectResult.SetBounds(out.x, out.y, out.w, out.h); + + return rectResult; +} + +bool +Rectangle::IsIntersected(const Rectangle& rect) const +{ + if (rect.IsEmpty()) + { + return false; + } + + _Util::Rectangle out; + _Util::Rectangle src1; + _Util::Rectangle src2; + + src1.x = this->x; + src1.y = this->y; + src1.w = this->width; + src1.h = this->height; + + src2.x = rect.x; + src2.y = rect.y; + src2.w = rect.width; + src2.h = rect.height; + + return _Util::IntersectRect(out, src1, src2); +} + +Rectangle +Rectangle::GetUnion(const Rectangle& rect) const +{ + Rectangle rectResult; + + if (rect.IsEmpty() || this->IsEmpty()) + { + return rectResult; + } + + rectResult.x = _Util::Min(this->x, rect.x); + rectResult.y = _Util::Min(this->y, rect.y); + rectResult.width = _Util::Max((this->x + this->width), (rect.x + rect.width)); + rectResult.width -= rectResult.x; + rectResult.height = _Util::Max((this->y + this->height), (rect.y + rect.height)); + rectResult.height -= rectResult.y; + + return rectResult; +} + +Point +Rectangle::GetBottomRight(void) const +{ + return Point(this->x + this->width, this->y + this->height); +} + +Point +Rectangle::GetTopLeft(void) const +{ + return Point(this->x, this->y); +} + +void +Rectangle::SetBounds(int x, int y, int width, int height) +{ + this->x = x; + this->y = y; + this->width = width; + this->height = height; +} + +void +Rectangle::SetBounds(const Point& pt, const Dimension& dim) +{ + this->x = pt.x; + this->y = pt.y; + this->width = dim.width; + this->height = dim.height; +} + +bool +Rectangle::IsEmpty() const +{ + if (this->width <= 0 || this->height <= 0) + { + return true; + } + + return false; +} + +void +Rectangle::SetSize(const Dimension& dim) +{ + this->width = dim.width; + this->height = dim.height; +} + +void +Rectangle::SetSize(int width, int height) +{ + this->width = width; + this->height = height; +} + +void +Rectangle::SetPosition(const Point& point) +{ + this->x = point.x; + this->y = point.y; +} + +void +Rectangle::SetPosition(int x, int y) +{ + this->x = x; + this->y = y; +} + +void +Rectangle::Translate(int x, int y) +{ + this->x += x; + this->y += y; +} + +}} // Tizen::Graphics diff --git a/src/graphics/FGrpTextElement.cpp b/src/graphics/FGrpTextElement.cpp new file mode 100644 index 0000000..0d37c77 --- /dev/null +++ b/src/graphics/FGrpTextElement.cpp @@ -0,0 +1,237 @@ +// +// 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 FGrpTextElement.cpp +* @brief This is the cpp file for TextElement class. +*/ + +#include + +#include +#include +#include + +#include + +#include "FGrp_TextElementImpl.h" +#include "FGrp_ResUtil.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Base::Utility; + +#define CHECK_NOT_CONSTRUCTED \ + 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."); + +#define CHECK_CONSTRUCTED \ + SysAssertf((this->__pImpl != null) && this->__pImpl->IsConstructed(), \ + "Not yet constructed! Construct() should be called before use."); + +#define CHECK_CONSTRUCTED_EX(_result) \ + SysAssertf((this->__pImpl != null) && this->__pImpl->IsConstructed(), \ + "Not yet constructed! Construct() should be called before use."); + +namespace Tizen { namespace Graphics +{ + +TextElement::TextElement() +{ + __pImpl = new (std::nothrow) _TextElementImpl; +} + +TextElement::~TextElement() +{ + if (__pImpl) + { + delete __pImpl; + __pImpl = null; + } +} + +result +TextElement::Construct(const Tizen::Base::String& text) +{ + CHECK_NOT_CONSTRUCTED; + + result r = __pImpl->Construct(text); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +TextElement::Construct(const Tizen::Base::String& text, const Tizen::Graphics::Canvas& canvas) +{ + CHECK_NOT_CONSTRUCTED; + + result r = __pImpl->Construct(text, canvas); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +TextElement::Construct(void) +{ + CHECK_NOT_CONSTRUCTED; + + result r = __pImpl->Construct(); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +TextElement::Construct(const Tizen::Base::String& text, Tizen::Base::Utility::LinkType linkType, const Tizen::Base::String& link) +{ + CHECK_NOT_CONSTRUCTED; + + result r = __pImpl->Construct(text, linkType, link); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +TextElement::Construct(const Tizen::Base::String& text, unsigned long autoLink) +{ + CHECK_NOT_CONSTRUCTED; + + result r = __pImpl->Construct(text, autoLink); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +TextElement::Construct(const Tizen::Base::String& text, Tizen::Base::Utility::LinkType linkType, const Tizen::Base::String& link, + const Tizen::Graphics::Canvas& canvas) +{ + CHECK_NOT_CONSTRUCTED; + + result r = __pImpl->Construct(text, linkType, link, canvas); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +TextElement::Construct(const Tizen::Base::String& text, unsigned long autoLink, const Tizen::Graphics::Canvas& canvas) +{ + CHECK_NOT_CONSTRUCTED; + + result r = __pImpl->Construct(text, autoLink, canvas); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating", GetErrorMessage(r)); + + return E_SUCCESS; +} + +Tizen::Base::String +TextElement::GetLink(void) const +{ + CHECK_CONSTRUCTED_EX(String()); + + return __pImpl->GetLink(); +} + +Tizen::Base::Utility::LinkType +TextElement::GetLinkType(void) const +{ + CHECK_CONSTRUCTED_EX(LINK_TYPE_NONE); + + return __pImpl->GetLinkType(); +} + +result +TextElement::SetText(const Tizen::Base::String& text) +{ + CHECK_CONSTRUCTED; + + return __pImpl->SetText(text); +} + +result +TextElement::SetFont(const Tizen::Graphics::Font& font) +{ + CHECK_CONSTRUCTED; + + result r = __pImpl->SetFont(font); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating", GetErrorMessage(r)); + + return r; +} + +result +TextElement::SetTextColor(const Tizen::Graphics::Color& color) +{ + CHECK_CONSTRUCTED; + + return __pImpl->SetTextColor(color); +} + +result +TextElement::SetBackgroundColor(const Tizen::Graphics::Color& color) +{ + CHECK_CONSTRUCTED; + + return __pImpl->SetBackgroundColor(color); +} + +result +TextElement::SetOutlineColor(const Tizen::Graphics::Color& color) +{ + CHECK_CONSTRUCTED; + + return __pImpl->SetOutlineColor(color); +} + +Tizen::Base::String +TextElement::GetText() const +{ + CHECK_CONSTRUCTED_EX(String()); + + return __pImpl->GetText(); +} + +Tizen::Graphics::Color +TextElement::GetTextColor() const +{ + CHECK_CONSTRUCTED_EX(Color::GetColor(COLOR_ID_BLACK)); + + return __pImpl->GetTextColor(); +} + +Tizen::Graphics::Color +TextElement::GetBackgroundColor() const +{ + CHECK_CONSTRUCTED_EX(Color::GetColor(COLOR_ID_BLACK)); + + return __pImpl->GetBackgroundColor(); +} + +Tizen::Graphics::Color +TextElement::GetOutlineColor() const +{ + CHECK_CONSTRUCTED_EX(Color::GetColor(COLOR_ID_BLACK)); + + return __pImpl->GetOutlineColor(); +} + +}} // Tizen::Graphics diff --git a/src/graphics/FGrp_Bitmap.cpp b/src/graphics/FGrp_Bitmap.cpp new file mode 100644 index 0000000..e7048ed --- /dev/null +++ b/src/graphics/FGrp_Bitmap.cpp @@ -0,0 +1,1175 @@ +// +// 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_Bitmap.cpp + * @brief This is the implementation file for _Bitmap class. + * + */ + +#include +#include + +#include + +#include +#include +#include + +#include + +#include "FGrp_BufferInfoImpl.h" +#include "FGrp_Bitmap.h" +#include "FGrp_Canvas.h" +#include "FGrp_CanvasPixman.h" +#include "FGrp_Screen.h" +#include "util/FGrp_UtilTemplate.h" +#include "effect/FGrp_Effect.h" + +//////////////////////////////////////////////////////////////////////////////// + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace // unnamed +{ + +bool +_CheckValidityOfRectangle(const Tizen::Graphics::Rectangle& rect) +{ + return ((rect.width > 0) && (rect.height > 0)); +} + +bool +_CheckValidity(const Tizen::Graphics::Rectangle& rtSrc, const Tizen::Graphics::Rectangle& rtDest) +{ + // check 1. is width/height less or equal than 0? + if (rtSrc.width <= 0 || rtSrc.height <= 0 || rtDest.width <= 0 || rtDest.height <= 0) + { + return false; // "[E_OUT_OF_RANGE] The argument is 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? + if (rtSrc.x > rtDest.x + rtDest.width - 1 || rtSrc.x + rtSrc.width - 1 < rtDest.x) + { + return false; // "[E_OUT_OF_RANGE] The argument is 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) + { + return false; // "[E_OUT_OF_RANGE] The argument is 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 true; +} + +bool +_IsOpaqueAllOver(Tizen::Graphics::_Bitmap* pBitmap) +{ + bool ret = false; + + if (pBitmap == null) + { + return ret; + } + + Tizen::Graphics::BufferInfo dstBufferInfo; + + if (pBitmap->Lock(dstBufferInfo) == E_SUCCESS) + { + const Tizen::Graphics::_Util::Pixmap dstImage(dstBufferInfo.width, dstBufferInfo.height, dstBufferInfo.bitsPerPixel, dstBufferInfo.pPixels, dstBufferInfo.pitch); + ret = Tizen::Graphics::_Effect::IsOpaqueAllOver(dstImage); + + pBitmap->Unlock(); + } + + return ret; +} + +typedef result (::Tizen::Graphics::_Bitmap::* _FnLock)(Tizen::Graphics::BufferInfo&, long); +typedef result (::Tizen::Graphics::_Bitmap::* _FnUnlock)(void); + +bool +_IsOpaqueAllOver(Tizen::Graphics::_Bitmap* pBitmap, _FnLock fnLock, _FnUnlock fnUnlock) +{ + bool ret = false; + + if (pBitmap == null) + { + return ret; + } + + Tizen::Graphics::BufferInfo dstBufferInfo; + if ((pBitmap->*fnLock)(dstBufferInfo, INFINITE) == E_SUCCESS) + { + const Tizen::Graphics::_Util::Pixmap dstImage(dstBufferInfo.width, dstBufferInfo.height, dstBufferInfo.bitsPerPixel, dstBufferInfo.pPixels, dstBufferInfo.pitch); + ret = Tizen::Graphics::_Effect::IsOpaqueAllOver(dstImage); + + (pBitmap->*fnUnlock)(); + } + + return ret; +} + +class _BitmapImplExHack + : public _Bitmap +{ +public: + void SetOwnership(bool ownership) + { + this->_SetOwnership(ownership); + } + + void ChangeBuffer(bool ownership, unsigned char* pBuffer) + { + this->_ChangeBuffer(ownership, pBuffer); + } +}; // _BitmapImplExHack + +template +result +_CreateBitmapFromBufferInfo(_Bitmap* thiz, BufferInfo& sourBufferInfo, int x, int y, int width, int height) +{ + std::unique_ptr pDestBuffer(new (std::nothrow) unsigned char[width * height * sizeof(Pixel)]); + + if (pDestBuffer == null) + { + return E_OUT_OF_MEMORY; + } + + std::auto_ptr<_Util::ScratchPad > pSourScratchPadAuto(new (std::nothrow) _Util::ScratchPad((Pixel*) sourBufferInfo.pPixels, sourBufferInfo.width, sourBufferInfo.height, sourBufferInfo.pitch / sizeof(Pixel))); + std::auto_ptr<_Util::ScratchPad > pDestScratchPadAuto(new (std::nothrow) _Util::ScratchPad((Pixel*) pDestBuffer.get(), width, height, width)); + + _Util::ScratchPad* pSourScratchPad = pSourScratchPadAuto.get(); + _Util::ScratchPad* pDestScratchPad = pDestScratchPadAuto.get(); + + if (pSourScratchPad == null || pDestScratchPad == null) + { + return E_OUT_OF_MEMORY; + } + + pDestScratchPad->BitBlt(0, 0, pSourScratchPad, x, y, width, height); + + result r = thiz->Construct((void*) pDestBuffer.get(), width, height, sizeof(Pixel) * 8); + + if (r != E_SUCCESS) + { + return r; + } + + pDestBuffer.release(); + + static_cast<_BitmapImplExHack*>(thiz)->SetOwnership(true); + + return E_SUCCESS; +} + +template +result +_Resize(_Bitmap* thiz, _Util::ScratchPad*& pScratchPad, int width, int height, BitmapScalingQuality quality = BITMAP_SCALING_QUALITY_LOW) +{ + std::unique_ptr pDestBuffer(new (std::nothrow) unsigned char[width * height * sizeof(Pixel)]); + + if (pDestBuffer == null) + { + return E_OUT_OF_MEMORY; + } + + memset(pDestBuffer.get(), 0, width * height * sizeof(Pixel)); + + Pixel* pAddr; + int pitch; + + pScratchPad->GetBuffer(pAddr, pitch); + + _Util::Pixmap srcImageEx(pScratchPad->GetWidth(), pScratchPad->GetHeight(), sizeof(Pixel) * 8, pAddr, pitch * sizeof(Pixel)); + _Util::Pixmap dstImageEx(width, height, sizeof(Pixel) * 8, pDestBuffer.get(), width * sizeof(Pixel)); + + bool isDone = Tizen::Graphics::_Pixman::ResizePixmap(dstImageEx, srcImageEx, quality); + + if (!isDone) + { + switch (quality) + { + case BITMAP_SCALING_QUALITY_LOW: + isDone = Tizen::Graphics::_Effect::ScaleImage(dstImageEx, 0, 0, width, height, srcImageEx, Tizen::Graphics::_Effect::ROP_COPY); + break; + case BITMAP_SCALING_QUALITY_MID: + isDone = Tizen::Graphics::_Effect::ScaleImageInterpolation(dstImageEx, 0, 0, width, height, srcImageEx, Tizen::Graphics::_Effect::DEFAULT_FILTER_GOOD); + break; + case BITMAP_SCALING_QUALITY_HIGH: + isDone = Tizen::Graphics::_Effect::ScaleImageInterpolation(dstImageEx, 0, 0, width, height, srcImageEx, Tizen::Graphics::_Effect::DEFAULT_FILTER_BEST); + break; + } + } + + if (!isDone) + { + return E_SYSTEM; + } + + _Util::ScratchPad* pTempScratchPad = new (std::nothrow) _Util::ScratchPad((Pixel*) pDestBuffer.get(), width, height, width); + + if (pTempScratchPad == null) + { + return E_OUT_OF_MEMORY; + } + + // swap them. + delete pScratchPad; + pScratchPad = pTempScratchPad; + + //?? need to be verified again for clearing + static_cast<_BitmapImplExHack*>(thiz)->ChangeBuffer(true, (unsigned char*) pDestBuffer.release()); + + return E_SUCCESS; +} + +template +result +_MergeWithConversion(_Util::ScratchPad* pDestScratchPad, int destX, int destY, _Util::ScratchPad* pSourScratchPad, int srcX, int srcY, int srcWidth, int srcHeight) +{ + _Util::Pixmap* pSrcImageEx = null; + + { + _Util::ScratchPad& srcScratchPad = *pSourScratchPad; + + SourPixel* pAddr; + int pitch; + + srcScratchPad.GetBuffer(pAddr, pitch); + + { + _Util::Pixmap srcImageEx(srcScratchPad.GetWidth(), srcScratchPad.GetHeight(), sizeof(SourPixel) * 8, pAddr, pitch * sizeof(SourPixel)); + + pSrcImageEx = srcImageEx.GetClone(sizeof(DestPixel) * 8); + } + + if (pSrcImageEx == null) + { + return E_SYSTEM; + } + } + + _Util::ScratchPad srcScratchPad((DestPixel*) pSrcImageEx->pBitmap, pSrcImageEx->width, pSrcImageEx->height, pSrcImageEx->bytesPerLine / sizeof(DestPixel)); + + pDestScratchPad->BitBlt(destX, destY, &srcScratchPad, srcX, srcY, srcWidth, srcHeight); + + delete pSrcImageEx; + + return E_SUCCESS; +} + +} + +namespace Tizen { namespace Graphics +{ + +bool _GetScreenShot(int depth, unsigned char*& pOutBuffer, int& screenWidth, int& screenHeight); + +_Bitmap::_Bitmap(void) + : __magicKey(0) + , __timeStamp(0) + , __opacity(255) + , __isOpaqueAllOver(0) + , __hasOwnership(true) + , __pBuffer(null) + , __isPremultiplied(false) + , __hasMaskingColor(false) + , __maskingColor(0) + , __bitmapPixelFormat(BITMAP_PIXEL_FORMAT_MIN) + , __scalingQuality(BITMAP_SCALING_QUALITY_LOW) + , __pScratchPad32(null) + , __pScratchPad16(null) + , __pLockCallbackFunc(null) + , __pLockCallbackParam(null) + , __pUnlockCallbackFunc(null) + , __pUnlockCallbackParam(null) + , __pPostlockCallbackFunc(null) + , __pPostlockCallbackParam(null) +{ + _Util::CarveMagicKey(*this, __magicKey); +} + +_Bitmap::~_Bitmap(void) +{ + delete __pScratchPad32; + delete __pScratchPad16; + + if (__hasOwnership) + { + delete[] __pBuffer; + } + + _Util::EraseMagicKey(*this, __magicKey); +} + +result +_Bitmap::Construct(const Rectangle& rect) +{ + //?? what do you do in the case of 16-bit? + const int systemBpp = _Screen::GetBytesPerPixel(); + + SysTryReturnResult(NID_GRP, (systemBpp == 32) || (systemBpp == 16), E_SYSTEM, "Screen depth is not available."); + + int x = rect.x; + int y = rect.y; + int width = rect.width; + int height = rect.height; + + { + size_t allocSize = width * height * systemBpp; + + std::unique_ptr pAllocated(new (std::nothrow) unsigned char[allocSize]); + + 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, "Propagating."); + + // copy contents from the current screen + { + unsigned char* pCapturedBuffer = null; + int bufferWidth = 0; + int bufferHeight = 0; + + if (_GetScreenShot(systemBpp, pCapturedBuffer, bufferWidth, bufferHeight)) + { + switch (systemBpp) + { + case 32: + if (__pScratchPad32) + { + _Util::ScratchPad capturedScratchPad((unsigned long*) pCapturedBuffer, bufferWidth, bufferHeight, bufferWidth); + __pScratchPad32->BitBlt(0, 0, &capturedScratchPad, x, y, width, height); + } + break; + case 16: + if (__pScratchPad16) + { + _Util::ScratchPad capturedScratchPad((unsigned short*) pCapturedBuffer, bufferWidth, bufferHeight, bufferWidth); + __pScratchPad16->BitBlt(0, 0, &capturedScratchPad, x, y, width, height); + } + break; + } + + delete[] pCapturedBuffer; + } + } + + this->__hasOwnership = true; + + this->__isOpaqueAllOver = _IsOpaqueAllOver(this); + + this->__bitmapPixelFormat = (systemBpp == 32) ? BITMAP_PIXEL_FORMAT_ARGB8888 : BITMAP_PIXEL_FORMAT_RGB565; + + pAllocated.release(); + + return E_SUCCESS; + } +} + +result +_Bitmap::Construct(const Dimension& dim, BitmapPixelFormat pixelFormat) +{ + int size = dim.width * dim.height; + int bytesPerPixel = 0; + + switch (pixelFormat) + { + case BITMAP_PIXEL_FORMAT_RGB565: + size *= sizeof(unsigned short); + bytesPerPixel = sizeof(unsigned short); + break; + case BITMAP_PIXEL_FORMAT_ARGB8888: + case BITMAP_PIXEL_FORMAT_R8G8B8A8: + size *= sizeof(unsigned long); + bytesPerPixel = sizeof(unsigned long); + break; + default: + SysTryReturnResult(NID_GRP, 0, E_INVALID_ARG, "BitmapPixelFormat(%d) is invalid argument.\n", pixelFormat); + break; + } + + int width = dim.width; + int height = dim.height; + + { + size_t allocSize = width * height * bytesPerPixel; + + std::unique_ptr pAllocated(new (std::nothrow) unsigned char[allocSize]); + + 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, "Propagating."); + + memset(pAllocated.get(), 0, allocSize); + + this->__hasOwnership = true; + + this->__isOpaqueAllOver = _IsOpaqueAllOver(this); + + this->__bitmapPixelFormat = pixelFormat; + + pAllocated.release(); + + return r; + } +} + +result +_Bitmap::Construct(const _Canvas& canvas, const Rectangle& rect) +{ + SysTryReturnResult(NID_GRP, canvas.IsValid(), E_INVALID_ARG, "A canvas is invalid.\n"); + + result r = E_SYSTEM; + + int x = rect.x; + int y = rect.y; + int width = rect.width; + int height = rect.height; + + BufferInfo sourBI; + + if (const_cast<_Canvas&>(canvas).Lock(sourBI) == E_SUCCESS) + { + switch (sourBI.bitsPerPixel) + { + case 16: + r = _CreateBitmapFromBufferInfo(this, sourBI, x, y, width, height); + break; + + case 32: + r = _CreateBitmapFromBufferInfo(this, sourBI, x, y, width, height); + break; + + default: + break; + } + + const_cast<_Canvas&>(canvas).Unlock(); + } + + this->__isOpaqueAllOver = _IsOpaqueAllOver(this); + + this->__bitmapPixelFormat = (sourBI.bitsPerPixel == 32) ? BITMAP_PIXEL_FORMAT_ARGB8888 : BITMAP_PIXEL_FORMAT_RGB565; + + return r; +} + +result +_Bitmap::Construct(const _Bitmap& bitmap, const Rectangle& rect) +{ + result r = E_SYSTEM; + + int x = rect.x; + int y = rect.y; + int width = rect.width; + int height = rect.height; + + BufferInfo sourBI; + + if (const_cast<_Bitmap&>(bitmap).Lock(sourBI) == E_SUCCESS) + { + switch (bitmap.GetBitsPerPixel()) + { + case 16: + r = _CreateBitmapFromBufferInfo(this, sourBI, x, y, width, height); + break; + + case 32: + r = _CreateBitmapFromBufferInfo(this, sourBI, x, y, width, height); + break; + + default: + break; + } + + const_cast<_Bitmap&>(bitmap).Unlock(); + } + + this->__isOpaqueAllOver = _IsOpaqueAllOver(this); + + //?? need to make a versioning for BITMAP_PIXEL_FORMAT_B8G8R8A8 + this->__bitmapPixelFormat = (bitmap.GetBitsPerPixel() == 32) ? BITMAP_PIXEL_FORMAT_ARGB8888 : BITMAP_PIXEL_FORMAT_RGB565; + + return r; +} + +result +_Bitmap::Construct(const Tizen::Base::ByteBuffer& buffer, const Dimension& dim, BitmapPixelFormat pixelFormat) +{ + int bytesPerPixel = 0; + + switch (pixelFormat) + { + case BITMAP_PIXEL_FORMAT_RGB565: + bytesPerPixel = 2; + break; + case BITMAP_PIXEL_FORMAT_ARGB8888: + case BITMAP_PIXEL_FORMAT_R8G8B8A8: + bytesPerPixel = 4; + break; + default: + return E_SYSTEM; + } + + // SysAssert(bytesPerPixel > 0); + + int width = dim.width; + int height = dim.height; + + { + size_t allocSize = width * height * bytesPerPixel; + + std::unique_ptr pAllocated(new (std::nothrow) unsigned char[allocSize]); + + 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, "Propagating."); + + memcpy(pAllocated.get(), buffer.GetPointer(), allocSize); + + this->__hasOwnership = true; + + this->__isOpaqueAllOver = _IsOpaqueAllOver(this); + + this->__bitmapPixelFormat = pixelFormat; + + pAllocated.release(); + + return r; + } +} + +result +_Bitmap::Construct(const byte* pBuffer, int bufSize, const Dimension& dim, BitmapPixelFormat pixelFormat) +{ + // already checks all parameters + + // BitmapInterfaceCreator bitmapInterface(pBuffer, bufSize, dim.width, dim.height, pixelFormat); + // result r = bitmapInterface.Result(); + // __pBitmapInterface = (r == E_SUCCESS) ? bitmapInterface.GetDuplicate() : null; + + int bytesPerPixel = 0; + + switch (pixelFormat) + { + case BITMAP_PIXEL_FORMAT_RGB565: + bytesPerPixel = 2; + break; + case BITMAP_PIXEL_FORMAT_ARGB8888: + case BITMAP_PIXEL_FORMAT_R8G8B8A8: + bytesPerPixel = 4; + break; + default: + return E_SYSTEM; + } + + // SysAssert(bytesPerPixel > 0); + + int width = dim.width; + int height = dim.height; + + { + result r = this->Construct((void*) pBuffer, width, height, bytesPerPixel * 8); + + if (r == E_SUCCESS) + { + __hasOwnership = true; + } + + this->__isOpaqueAllOver = _IsOpaqueAllOver(this); + + this->__bitmapPixelFormat = pixelFormat; + + return r; + } +} + +result +_Bitmap::Construct(const void* pExtBuffer, int width, int height, int bitsPerPixel, int pixelsPerLine) +{ + if (pixelsPerLine == 0) + { + pixelsPerLine = width; + } + + switch (bitsPerPixel) + { + case 16: + { + typedef unsigned short Pixel; + + __pScratchPad16 = new (std::nothrow) _Util::ScratchPad((Pixel*) pExtBuffer, width, height, pixelsPerLine); + __pBuffer = (unsigned char*) pExtBuffer; + } + break; + case 32: + { + typedef unsigned long Pixel; + + __pScratchPad32 = new (std::nothrow) _Util::ScratchPad((Pixel*) pExtBuffer, width, height, pixelsPerLine); + __pBuffer = (unsigned char*) pExtBuffer; + } + break; + default: + return E_SYSTEM; + } + + SysTryReturnResult(NID_GRP, __pScratchPad16 || __pScratchPad32, E_OUT_OF_MEMORY, "Memory allocation failed."); + + this->__hasOwnership = false; + this->__isOpaqueAllOver = 0; + + this->__bitmapPixelFormat = (bitsPerPixel == 32) ? BITMAP_PIXEL_FORMAT_ARGB8888 : BITMAP_PIXEL_FORMAT_RGB565; + + return E_SUCCESS; +} + +bool +_Bitmap::IsValid(void) const +{ + return (__pScratchPad16 || __pScratchPad32); +} + +void +_Bitmap::_SetOwnership(bool ownership) +{ + this->__hasOwnership = ownership; +} + +void +_Bitmap::_ChangeBuffer(bool ownership, unsigned char* pBuffer) +{ + if (this->__hasOwnership) + { + delete[] this->__pBuffer; + } + + this->__hasOwnership = ownership; + this->__pBuffer = pBuffer; +} + +result +_Bitmap::Scale(const Dimension& dim) +{ + SysTryReturnResult(NID_GRP, this->IsValid(), E_OPERATION_FAILED, "This instance is not constructed yet.\n"); + + SysTryReturnResult(NID_GRP, dim.width > 0 && dim.height > 0, E_OUT_OF_RANGE, "Both of width(%d) and height(%d) MUST be greater than 0.\n", dim.width, dim.height); + + switch (this->__scalingQuality) + { + case BITMAP_SCALING_QUALITY_MID: + case BITMAP_SCALING_QUALITY_HIGH: + return this->__ScaleEx(dim.width, dim.height, this->__scalingQuality); + default: + return this->__Scale(dim.width, dim.height); + } +} + +result +_Bitmap::ScaleEx(const Dimension& dim, BitmapScalingQuality quality) +{ + SysTryReturnResult(NID_GRP, this->IsValid(), E_OPERATION_FAILED, "This instance is not constructed yet.\n"); + + SysTryReturnResult(NID_GRP, dim.width > 0 && dim.height > 0, E_OUT_OF_RANGE, "Both of width(%d) and height(%d) MUST be greater than 0.\n", dim.width, dim.height); + + switch (quality) + { + case BITMAP_SCALING_QUALITY_HIGH: + case BITMAP_SCALING_QUALITY_MID: + return this->__ScaleEx(dim.width, dim.height, quality); + case BITMAP_SCALING_QUALITY_LOW: + default: + return this->__Scale(dim.width, dim.height); + } +} + +result +_Bitmap::Merge(const Point& dest, const _Bitmap& src, const Rectangle& srcRect) +{ + // check arg. + SysTryReturnResult(NID_GRP, this->IsValid(), E_OPERATION_FAILED, "This instance is not constructed yet.\n"); + + if ((srcRect.width == 0) || (srcRect.height == 0)) + { + return E_SUCCESS; + } + + Rectangle rtBitmap(0, 0, src.GetWidth(), src.GetHeight()); + + if (!_CheckValidity(srcRect, rtBitmap)) + { + return E_SUCCESS; + } + + 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); + + if (this->__isOpaqueAllOver != src.__isOpaqueAllOver) + { + this->__isOpaqueAllOver = _IsOpaqueAllOver(this, &_Bitmap::__Lock, &_Bitmap::__Unlock); + } + + return r; +} + +int +_Bitmap::GetHeight() const +{ + SysTryReturn(NID_GRP, this->IsValid(), -1, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not constructed yet.\n"); + + if (__pScratchPad16) + { + return __pScratchPad16->GetHeight(); + } + else + { + return __pScratchPad32->GetHeight(); + } +} + +int +_Bitmap::GetWidth() const +{ + SysTryReturn(NID_GRP, this->IsValid(), -1, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not constructed yet.\n"); + + if (__pScratchPad16) + { + return __pScratchPad16->GetWidth(); + } + else + { + return __pScratchPad32->GetWidth(); + } +} + +int +_Bitmap::GetBitsPerPixel() const +{ + SysTryReturn(NID_GRP, this->IsValid(), -1, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not constructed yet.\n"); + + if (__pScratchPad16) + { + return 16; + } + else + { + return 32; + } +} + +BitmapPixelFormat +_Bitmap::GetPixelColorFormat() const +{ + SysTryReturn(NID_GRP, this->IsValid(), BITMAP_PIXEL_FORMAT_MAX, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not constructed yet.\n"); + + return this->__bitmapPixelFormat; +} + +result +_Bitmap::SetMaskingColor(const Color* pColor) +{ + SysTryReturnResult(NID_GRP, this->IsValid(), E_OPERATION_FAILED, "This instance is not constructed yet.\n"); + SysTryReturnResult(NID_GRP, this->GetPixelColorFormat() == BITMAP_PIXEL_FORMAT_RGB565, E_INVALID_ARG, "Only BitmapPixelFormat::BITMAP_PIXEL_FORMAT_RGB565 is supported\n"); + + if (pColor) + { + __hasMaskingColor = true; + __maskingColor = pColor->GetRGB32(); + } + else + { + __hasMaskingColor = false; + __maskingColor = 0; + } + + return E_SUCCESS; +} + +result +_Bitmap::GetMaskingColor(Color& color) const +{ + SysTryReturnResult(NID_GRP, this->IsValid(), E_OPERATION_FAILED, "This instance is not constructed yet.\n"); + SysTryReturnResult(NID_GRP, this->GetPixelColorFormat() == BITMAP_PIXEL_FORMAT_RGB565, E_INVALID_DATA, "Only BitmapPixelFormat::BITMAP_PIXEL_FORMAT_RGB565 is supported\n"); + + if (!__hasMaskingColor) + { + return E_INVALID_DATA; + } + + color = Color(__maskingColor); + + return E_SUCCESS; +} + +void +_Bitmap::SetAlphaConstant(int opacity) +{ + if (opacity < 0) + { + opacity = 0; + } + + if (opacity > 255) + { + opacity = 255; + } + + this->__opacity = opacity; +} + +int +_Bitmap::GetAlphaConstant(void) const +{ + return this->__opacity; +} + +void +_Bitmap::SetScalingQuality(BitmapScalingQuality quality) +{ + switch (quality) + { + case BITMAP_SCALING_QUALITY_LOW: + case BITMAP_SCALING_QUALITY_MID: + case BITMAP_SCALING_QUALITY_HIGH: + this->__scalingQuality = quality; + break; + default: + break; + } +} + +BitmapScalingQuality +_Bitmap::GetScalingQuality(void) const +{ + return this->__scalingQuality; +} + +bool +_Bitmap::IsNinePatchedBitmap(bool checkStrictly) const +{ + SysTryReturn(NID_GRP, this->IsValid(), false, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not constructed yet.\n"); + + BufferInfo dstBufferInfo; + bool ret = false; + + if (const_cast<_Bitmap*>(this)->Lock(dstBufferInfo) == E_SUCCESS) + { + const Tizen::Graphics::_Util::Pixmap dstImage(dstBufferInfo.width, dstBufferInfo.height, dstBufferInfo.bitsPerPixel, dstBufferInfo.pPixels, dstBufferInfo.pitch); + + ret = Tizen::Graphics::_Effect::IsNinePatchedBitmap(dstImage, checkStrictly); + + const_cast<_Bitmap*>(this)->Unlock(); + } + + return ret; +} + +result +_Bitmap::Lock(BufferInfo& info, long timeout) +{ + SysTryReturnResult(NID_GRP, this->IsValid(), E_OPERATION_FAILED, "This instance is not constructed yet.\n"); + + if (this->__pLockCallbackFunc) + { + this->__pLockCallbackFunc(this->__pLockCallbackParam); + } + + return this->__Lock(info, timeout); +} + +result +_Bitmap::Unlock() +{ + SysTryReturnResult(NID_GRP, this->IsValid(), E_OPERATION_FAILED, "This instance is not constructed yet.\n"); + + result r = this->__Unlock(); + + this->__isOpaqueAllOver = _IsOpaqueAllOver(this, &_Bitmap::__Lock, &_Bitmap::__Unlock); + + if (this->__pUnlockCallbackFunc) + { + this->__pUnlockCallbackFunc(this->__pUnlockCallbackParam); + } + + return r; +} + +result +_Bitmap::LockFast(BufferInfo& info, long timeout) +{ + SysTryReturnResult(NID_GRP, this->IsValid(), E_OPERATION_FAILED, "This instance is not constructed yet.\n"); + + if (this->__pLockCallbackFunc) + { + this->__pLockCallbackFunc(this->__pLockCallbackParam); + } + + result r = this->__Lock(info, timeout); + + if (r == E_SUCCESS && this->__pPostlockCallbackFunc) + { + this->__pPostlockCallbackFunc(info, this->__pPostlockCallbackParam); + } + + return r; +} + +result +_Bitmap::UnlockFast() +{ + SysTryReturnResult(NID_GRP, this->IsValid(), E_OPERATION_FAILED, "This instance is not constructed yet.\n"); + + result r = this->__Unlock(); + + if (this->__pUnlockCallbackFunc) + { + this->__pUnlockCallbackFunc(this->__pUnlockCallbackParam); + } + + return r; +} + +void +_Bitmap::UpdateOpaqueInfo(void) +{ + if (this->IsValid()) + { + this->__isOpaqueAllOver = _IsOpaqueAllOver(this, &_Bitmap::__Lock, &_Bitmap::__Unlock); + } +} + +void +_Bitmap::SetTimeStamp(unsigned long timeStamp) +{ + __timeStamp = timeStamp; +} + +int +_Bitmap::GetTimeStamp(void) const +{ + return __timeStamp; +} + +bool +_Bitmap::IsPremultiplied(void) const +{ + return __isPremultiplied; +} + +void +_Bitmap::AssignUserBuffer(unsigned char* pExtBuffer, int bytesPerLine) +{ + if (this->__pScratchPad32) + { + typedef unsigned long Pixel; + + _Util::ScratchPad* pBackupScratchPad32 = __pScratchPad32; + + __pScratchPad32 = new (std::nothrow) _Util::ScratchPad((Pixel*) pExtBuffer, pBackupScratchPad32->GetWidth(), pBackupScratchPad32->GetHeight(), bytesPerLine / sizeof(Pixel)); + + if (__pScratchPad32 == null) + { + __pScratchPad32 = pBackupScratchPad32; + return; + } + + delete pBackupScratchPad32; + + this->_ChangeBuffer(false, pExtBuffer); + } + else if (this->__pScratchPad16) + { + typedef unsigned short Pixel; + + _Util::ScratchPad* pBackupScratchPad16 = __pScratchPad16; + + __pScratchPad16 = new (std::nothrow) _Util::ScratchPad((Pixel*) pExtBuffer, pBackupScratchPad16->GetWidth(), pBackupScratchPad16->GetHeight(), bytesPerLine / sizeof(Pixel)); + + if (__pScratchPad16 == null) + { + __pScratchPad16 = pBackupScratchPad16; + return; + } + + delete pBackupScratchPad16; + + this->_ChangeBuffer(false, pExtBuffer); + } +} + +void +_Bitmap::SetCallback(void (* LockCallback)(void*), void* pLockCallbackParam, + 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 +_Bitmap::__Scale(int width, int height) +{ + SysAssert(!(__pScratchPad16 == null && __pScratchPad32 == null)); + + if (__pScratchPad16) + { + return _Resize(this, __pScratchPad16, width, height); + } + else + { + //?? the alpha channel is applied twice in the 32-bit bitmap + return _Resize(this, __pScratchPad32, width, height); + } +} + +result +_Bitmap::__ScaleEx(int width, int height, BitmapScalingQuality quality) +{ + SysAssert(!(__pScratchPad16 == null && __pScratchPad32 == null)); + + if (__pScratchPad16) + { + return _Resize(this, __pScratchPad16, width, height, quality); + } + else + { + return _Resize(this, __pScratchPad32, width, height, quality); + } +} + +result +_Bitmap::__Merge(int destX, int destY, const _Bitmap& src, int srcX, int srcY, int srcWidth, int srcHeight) +{ + SysAssert(!(__pScratchPad16 == null && __pScratchPad32 == null)); + + const _Bitmap* pSrcBitmap = &src; + + if (pSrcBitmap == null) + { + return E_SYSTEM; + } + + if (pSrcBitmap->__pScratchPad16 == null && pSrcBitmap->__pScratchPad32 == null) + { + return E_SYSTEM; + } + + if (__pScratchPad16) + { + if (pSrcBitmap->__pScratchPad16) + { + __pScratchPad16->BitBlt(destX, destY, pSrcBitmap->__pScratchPad16, srcX, srcY, srcWidth, srcHeight); + + return E_SUCCESS; + } + else + { + return _MergeWithConversion(__pScratchPad16, destX, destY, pSrcBitmap->__pScratchPad32, srcX, srcY, srcWidth, srcHeight); + } + } + else + { + if (pSrcBitmap->__pScratchPad32) + { + __pScratchPad32->BitBlt(destX, destY, pSrcBitmap->__pScratchPad32, srcX, srcY, srcWidth, srcHeight); + + return E_SUCCESS; + } + else + { + return _MergeWithConversion(__pScratchPad32, destX, destY, pSrcBitmap->__pScratchPad16, srcX, srcY, srcWidth, srcHeight); + } + } +} + +result +_Bitmap::__Lock(BufferInfo& info, long timeout) +{ + SysAssert(!(__pScratchPad16 == null && __pScratchPad32 == null)); + + if (this->__pBuffer == null) + { + return E_SYSTEM; + } + + if (_BufferInfoImpl::GetInstance(info) != null) + { + _BufferInfoImpl::GetInstance(info)->SetHandle(_BufferInfoImpl::HANDLE_TYPE_NONE, 0); + } + + if (__pScratchPad16) + { + info.width = __pScratchPad16->GetWidth(); + info.height = __pScratchPad16->GetHeight(); + + { + unsigned short* pBuffer; + int pitch; + + __pScratchPad16->GetBuffer(pBuffer, pitch); + info.pitch = pitch * 2; + } + + info.bitsPerPixel = 16; + info.pixelFormat = PIXEL_FORMAT_RGB565; + info.pPixels = (void*) this->__pBuffer; + //info.__handle = INVALID_HANDLE; + } + else + { + info.width = __pScratchPad32->GetWidth(); + info.height = __pScratchPad32->GetHeight(); + + { + unsigned long* pBuffer; + int pitch; + + __pScratchPad32->GetBuffer(pBuffer, pitch); + info.pitch = pitch * 4; + } + + info.bitsPerPixel = 32; + info.pixelFormat = PIXEL_FORMAT_ARGB8888; + info.pPixels = (void*) this->__pBuffer; + //info.__handle = INVALID_HANDLE; + } + + return E_SUCCESS; +} + +result +_Bitmap::__Unlock(void) +{ + return E_SUCCESS; +} + +}} // Tizen::Graphics diff --git a/src/graphics/FGrp_Bitmap.h b/src/graphics/FGrp_Bitmap.h new file mode 100644 index 0000000..7da7281 --- /dev/null +++ b/src/graphics/FGrp_Bitmap.h @@ -0,0 +1,146 @@ +// +// 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_Bitmap.h + * @brief This is the header file for _Bitmap class. + * + */ + +#ifndef _FGRP_INTERNAL_BITMAP_H_ +#define _FGRP_INTERNAL_BITMAP_H_ + +#include +#include + +#include "util/FGrp_UtilScratchpad.h" + + +namespace Tizen { namespace Graphics +{ +class Point; +class Dimension; +class Rectangle; +class Color; +class BufferInfo; + +class _Canvas; + +class _Bitmap +{ +public: + _Bitmap(void); + ~_Bitmap(void); + + result Construct(const Rectangle& rect); + result Construct(const Dimension& dim, BitmapPixelFormat format); + result Construct(const _Canvas& canvas, const Rectangle& rect); + result Construct(const _Bitmap& bitmap, const Rectangle& rect); + result Construct(const Tizen::Base::ByteBuffer& buffer, const Dimension& dim, BitmapPixelFormat pixelFormat); + result Construct(const byte* pBuffer, int bufSize, const Dimension& rq_dim, BitmapPixelFormat pixelFormat); + result Construct(const void* pExtBuffer, int width, int height, int bitsPerPixel, int pixelsPerLine = 0); + + bool IsValid(void) const; + + result Scale(const Dimension& dim); + result ScaleEx(const Dimension& dim, BitmapScalingQuality quality); + result Merge(const Point& destPoint, const _Bitmap& srcBitmap, const Rectangle& srcRect); + + int GetHeight(void) const; + int GetWidth(void) const; + int GetBitsPerPixel(void) const; + BitmapPixelFormat GetPixelColorFormat(void) const; + + result SetMaskingColor(const Color* pColor); + result GetMaskingColor(Color& color) const; + + void SetAlphaConstant(int opacity); + int GetAlphaConstant(void) const; + + void SetScalingQuality(BitmapScalingQuality quality); + BitmapScalingQuality GetScalingQuality(void) const; + + bool IsNinePatchedBitmap(bool checkStrictly = false) const; + + result Lock(BufferInfo& info, long timeout = INFINITE); + result Unlock(void); + + result LockFast(BufferInfo& info, long timeout = INFINITE); + result UnlockFast(void); + + void UpdateOpaqueInfo(void); + + void SetTimeStamp(unsigned long timeStamp); + int GetTimeStamp(void) const; + + bool IsPremultiplied(void) const; + + // for the Pixmap only + void AssignUserBuffer(unsigned char* pBuffer, int bytesPerLine); + + void SetCallback(void (* LockCallback)(void*), void* pLockCallbackParam, + void (* UnlockCallback)(void*), void* pUnlockCallbackParam, + void (* PostlockCallback)(BufferInfo&, void*), void* pPostlockCallbackParam); + +protected: + void _SetOwnership(bool ownership); + void _ChangeBuffer(bool ownership, unsigned char* pBuffer); + +private: + _Bitmap(const _Bitmap& src); + _Bitmap& operator =(const _Bitmap& value); + + result __Scale(int width, int height); + result __ScaleEx(int width, int height, BitmapScalingQuality quality); + result __Merge(int destX, int destY, const _Bitmap& src, int srcX, int srcY, int srcWidth, int srcHeight); + + result __Lock(BufferInfo& info, long timeout = INFINITE); + result __Unlock(void); + +private: + unsigned long __magicKey; + unsigned long __timeStamp; + int __opacity; + long __isOpaqueAllOver; + + bool __hasOwnership; + unsigned char* __pBuffer; + bool __isPremultiplied; + bool __hasMaskingColor; + unsigned long __maskingColor; + + BitmapPixelFormat __bitmapPixelFormat; + BitmapScalingQuality __scalingQuality; + + _Util::ScratchPad * __pScratchPad32; + _Util::ScratchPad * __pScratchPad16; + + void (* __pLockCallbackFunc)(void*); + void* __pLockCallbackParam; + void (* __pUnlockCallbackFunc)(void*); + void* __pUnlockCallbackParam; + void (* __pPostlockCallbackFunc)(BufferInfo&, void*); + void* __pPostlockCallbackParam; + + friend class _Canvas; + friend class _BitmapImpl; + +}; // _Bitmap + +}} // Tizen::Graphics + +#endif // _FGRP_INTERNAL_BITMAP_H_ diff --git a/src/graphics/FGrp_BitmapCoordHolder.h b/src/graphics/FGrp_BitmapCoordHolder.h new file mode 100644 index 0000000..477fc13 --- /dev/null +++ b/src/graphics/FGrp_BitmapCoordHolder.h @@ -0,0 +1,142 @@ +// +// 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_BitmapCoordHolder.h + * @brief This is the header file for _BitmapUtil namespace. + * + */ + +#ifndef _FGRP_INTERNAL_BITMAPCOORDHOLDER_H_ +#define _FGRP_INTERNAL_BITMAPCOORDHOLDER_H_ + + +#include "FGrp_ResUtil.h" + + +namespace Tizen { namespace Graphics +{ + +struct _BitmapCoordinateHolder +{ + _ResUtil::CoordinateHolder<_Util::Dimension, _Util::Dimension > size; + + _BitmapCoordinateHolder() + : __pcBaseScale(1.0f) + , __vcBaseScale(1.0f) + { + _CoordinateSystem* pCoordinateSystem = _CoordinateSystem::GetInstance(); + + if (pCoordinateSystem) + { + __pcBaseScale = pCoordinateSystem->GetTargetBaseScaleFactor(); + __vcBaseScale = pCoordinateSystem->GetAppBaseScaleFactor(); + } + } + + void ResetFromVc(const _Util::Dimension& intVcSize) + { + _Util::Dimension floatVcSize = + { + static_cast(intVcSize.w), + static_cast(intVcSize.h) + }; + + this->ResetFromVc(floatVcSize); + + size.vcInt.w = intVcSize.w; + size.vcInt.h = intVcSize.h; + } + + void ResetFromVc(const _Util::Dimension& floatVcSize) + { + size.vcInt.w = _FloatToIntForSize(floatVcSize.w); + size.vcInt.h = _FloatToIntForSize(floatVcSize.h); + + size.vcFloat.w = floatVcSize.w; + size.vcFloat.h = floatVcSize.h; + + size.pcInt.w = _FloatToIntForSize(static_cast(__ConvertToPhyCoord(floatVcSize.w))); + size.pcInt.h = _FloatToIntForSize(static_cast(__ConvertToPhyCoord(floatVcSize.h))); + + size.vcFloatActual.w = static_cast(__ConvertToVirCoord(static_cast(size.pcInt.w))); + size.vcFloatActual.h = static_cast(__ConvertToVirCoord(static_cast(size.pcInt.h))); + } + + void ResetFromPc(const _Util::Dimension& intPcSize) + { + size.pcInt.w = intPcSize.w; + size.pcInt.h = intPcSize.h; + + size.vcFloatActual.w = static_cast(__ConvertToVirCoord(static_cast(size.pcInt.w))); + size.vcFloatActual.h = static_cast(__ConvertToVirCoord(static_cast(size.pcInt.h))); + + size.vcFloat.w = size.vcFloatActual.w; + size.vcFloat.h = size.vcFloatActual.h; + + size.vcInt.w = _FloatToIntForSize(size.vcFloat.w); + size.vcInt.h = _FloatToIntForSize(size.vcFloat.h); + } + + void ResetFromPc(const _Util::Dimension& intPcSize, const _Util::Dimension& intVcSize) + { + size.pcInt.w = intPcSize.w; + size.pcInt.h = intPcSize.h; + + size.vcFloatActual.w = static_cast(__ConvertToVirCoord(static_cast(size.pcInt.w))); + size.vcFloatActual.h = static_cast(__ConvertToVirCoord(static_cast(size.pcInt.h))); + + size.vcInt.w = intVcSize.w; + size.vcInt.h = intVcSize.h; + + size.vcFloat.w = static_cast(intVcSize.w); + size.vcFloat.h = static_cast(intVcSize.h); + } + + void ResetFromPc(const _Util::Dimension& intPcSize, const _Util::Dimension& intVcSize, const _Util::Dimension& floatVcSize) + { + size.pcInt.w = intPcSize.w; + size.pcInt.h = intPcSize.h; + + size.vcFloatActual.w = static_cast(__ConvertToVirCoord(static_cast(size.pcInt.w))); + size.vcFloatActual.h = static_cast(__ConvertToVirCoord(static_cast(size.pcInt.h))); + + size.vcInt.w = intVcSize.w; + size.vcInt.h = intVcSize.h; + + size.vcFloat.w = floatVcSize.w; + size.vcFloat.h = floatVcSize.h; + } + +private: + double __pcBaseScale; + double __vcBaseScale; + + inline double __ConvertToPhyCoord(double val) + { + return val * __pcBaseScale / __vcBaseScale; + } + + inline double __ConvertToVirCoord(double val) + { + return val * __vcBaseScale / __pcBaseScale; + } +}; + +}} // Tizen::Graphics + +#endif // _FGRP_INTERNAL_BITMAPCOORDHOLDER_H_ diff --git a/src/graphics/FGrp_BitmapImpl.cpp b/src/graphics/FGrp_BitmapImpl.cpp new file mode 100644 index 0000000..c583f8b --- /dev/null +++ b/src/graphics/FGrp_BitmapImpl.cpp @@ -0,0 +1,2300 @@ +// +// 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_BitmapImpl.cpp + * @brief This is the implementation file for _BitmapImpl class. + * + */ + +#include +#include +#include + +#include +#include + +#include + +#include + +#include "FGrp_BitmapImpl.h" +#include "FGrp_BitmapUtil.h" +#include "FGrp_BitmapCoordHolder.h" +#include "FGrp_Bitmap.h" +#include "FGrp_Canvas.h" +#include "FGrp_NonScale.h" +#include "FGrp_ResUtil.h" +#include "util/FGrp_Util.h" +#include "effect/FGrp_Effect.h" +#include "effect/FGrp_EffectFunc.h" + +using namespace Tizen::Base; + +#define INSTANCE_IS_VALID (this && const_cast<_BitmapImpl*>(this)->__CheckValidity(true)) +#define IS_INSTANCE_VALID (this && const_cast<_BitmapImpl*>(this)->__CheckValidity(false)) + +#define BITMAPIMPL_IS_VALID(pBitmapImpl) (pBitmapImpl && const_cast<_BitmapImpl*>(pBitmapImpl)->__CheckValidity(true)) +#define IS_BITMAPIMPL_VALID(pBitmapImpl) (pBitmapImpl && const_cast<_BitmapImpl*>(pBitmapImpl)->__CheckValidity(false)) + + +namespace // unnamed +{ + +bool +_CheckValidityOfRectangle(const Tizen::Graphics::Rectangle& rect) +{ + return ((rect.width > 0) && (rect.height > 0)); +} + +bool +_CheckValidity(const Tizen::Graphics::Rectangle& rtSrc, const Tizen::Graphics::Rectangle& rtDest) +{ + // check 1. is width/height less or equal than 0? + if (rtSrc.width <= 0 || rtSrc.height <= 0 || rtDest.width <= 0 || rtDest.height <= 0) + { + return false; // "[E_OUT_OF_RANGE] The argument is out of range. (src(w:%d,h:%d), dst(w:%d,h:%d))", rtSrc.width, rtSrc.height, rtDest.width, rtDest.height); + } + + // check 2. is src exiting outside of dest entirely? + if (rtSrc.x > rtDest.x + rtDest.width - 1 || rtSrc.x + rtSrc.width - 1 < rtDest.x) + { + return false; // "[E_OUT_OF_RANGE] The argument is out of range. (src(x:%d,y:%d,w:%d,h:%d), dst(x:%d,y:%d,w:%d,h:%d))", 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) + { + return false; // "[E_OUT_OF_RANGE] The argument is out of range. (src(x:%d,y:%d,w:%d,h:%d), dst(x:%d,y:%d,w:%d,h:%d))", rtSrc.x, rtSrc.y, rtSrc.width, rtSrc.height, rtDest.x, rtDest.y, rtDest.width, rtDest.height); + } + + return true; +} + +bool +_CheckValidity(const Tizen::Graphics::FloatRectangle& rtSrc, const Tizen::Graphics::FloatRectangle& rtDest) +{ + // check 1. is width/height less or equal than 0? + if (rtSrc.width <= 0.0f || rtSrc.height <= 0.0f || rtDest.width <= 0.0f || rtDest.height <= 0.0f) + { + return false; // "[E_OUT_OF_RANGE] The argument is out of range. (src(w:%f,h:%f), dst(w:%f,h:%f))", rtSrc.width, rtSrc.height, rtDest.width, rtDest.height); + } + + // check 2. is src exiting outside of dest entirely? + if (rtSrc.x > rtDest.x + rtDest.width || rtSrc.x + rtSrc.width < rtDest.x) + { + return false; // "[E_OUT_OF_RANGE] The argument is out of range. (src(x:%f,y:%f,w:%f,h:%f), dst(x:%f,y:%f,w:%f,h:%f))", rtSrc.x, rtSrc.y, rtSrc.width, rtSrc.height, rtDest.x, rtDest.y, rtDest.width, rtDest.height); + } + + if (rtSrc.y > rtDest.y + rtDest.height || rtSrc.y + rtSrc.height < rtDest.y) + { + return false; // "[E_OUT_OF_RANGE] The argument is out of range. (src(x:%f,y:%f,w:%f,h:%f), dst(x:%f,y:%f,w:%f,h:%f))", rtSrc.x, rtSrc.y, rtSrc.width, rtSrc.height, rtDest.x, rtDest.y, rtDest.width, rtDest.height); + } + + return true; +} + + +int +_GetBytesPerPixel(Tizen::Graphics::BitmapPixelFormat pixelFormat) +{ + if (pixelFormat == Tizen::Graphics::BITMAP_PIXEL_FORMAT_RGB565) + { + return 2; + } + else if (pixelFormat == Tizen::Graphics::BITMAP_PIXEL_FORMAT_ARGB8888 || pixelFormat == Tizen::Graphics::BITMAP_PIXEL_FORMAT_R8G8B8A8) + { + return 4; + } + else + { + return 0; + } +} + +void +_GetScaleInfo(Tizen::Graphics::BitmapScalingQuality quality, float width, float height, float scaleWidth, float scaleHeight, Tizen::Graphics::_Util::AccumList >& scalingValue) +{ + scalingValue.Clear(); + + scalingValue.Push(Tizen::Graphics::_Util::MakePair(scaleWidth, scaleHeight)); + + if (quality == Tizen::Graphics::BITMAP_SCALING_QUALITY_HIGH) + { + int intWidth = int(width); + int intHeight = int(height); + + int tempWidth = int(scaleWidth); + int tempHeight = int(scaleHeight); + + while (intWidth > (tempWidth << 1) || intHeight > (tempHeight << 1)) + { + if (intWidth > (tempWidth << 1)) + { + tempWidth <<= 1; + } + + if (intHeight > (tempHeight << 1)) + { + tempHeight <<= 1; + } + + scalingValue.Push(Tizen::Graphics::_Util::MakePair(float(tempWidth), float(tempHeight))); + } + } +} + + +result +_CheckBufferSize(const Tizen::Base::ByteBuffer& buffer, const Tizen::Graphics::Dimension& dim, Tizen::Graphics::BitmapPixelFormat pixelFormat) +{ + int bytePerPixel = _GetBytesPerPixel(pixelFormat); + + if (bytePerPixel == 0) + { + SysTryReturnResult(NID_GRP, 0, E_INVALID_ARG, "BitmapPixelFormat(%d) is the invalid argument.", pixelFormat); + } + + int byteNum = buffer.GetLimit(); + int expectedBufferSize = dim.width * dim.height * bytePerPixel; + + SysTryReturnResult(NID_GRP, expectedBufferSize <= byteNum, E_INVALID_ARG, "A buffer size is not correct. (expected: %d, actual: %d)", expectedBufferSize, byteNum); + + return E_SUCCESS; +} + +bool +_ScaleBuffer(const Tizen::Base::ByteBuffer& destBuffer, const Tizen::Graphics::Dimension& destSize, const Tizen::Base::ByteBuffer& sourBuffer, const Tizen::Graphics::Dimension& sourSize, Tizen::Graphics::BitmapPixelFormat pixelFormat) +{ + switch (pixelFormat) + { + case Tizen::Graphics::BITMAP_PIXEL_FORMAT_RGB565: + { + Tizen::Graphics::_Util::Pixmap dstImage(destSize.width, destSize.height, 16, (void*) destBuffer.GetPointer()); + Tizen::Graphics::_Util::Pixmap srcImage(sourSize.width, sourSize.height, 16, (void*) sourBuffer.GetPointer()); + return Tizen::Graphics::_Effect::ScaleImage(dstImage, 0, 0, destSize.width, destSize.height, srcImage); + } + case Tizen::Graphics::BITMAP_PIXEL_FORMAT_ARGB8888: + { + Tizen::Graphics::_Util::Pixmap dstImage(destSize.width, destSize.height, 32, (void*) destBuffer.GetPointer()); + Tizen::Graphics::_Util::Pixmap srcImage(sourSize.width, sourSize.height, 32, (void*) sourBuffer.GetPointer()); + return Tizen::Graphics::_Effect::ScaleImage(dstImage, 0, 0, destSize.width, destSize.height, srcImage); + } + case Tizen::Graphics::BITMAP_PIXEL_FORMAT_R8G8B8A8: + return false; + default: + return false; + } +} + +bool +_UpdateScaledBitmapEx(Tizen::Graphics::_Bitmap* pSrcBitmap, Tizen::Graphics::_Bitmap* pDstBitmap) +{ + if (!(pSrcBitmap && pDstBitmap && pSrcBitmap->GetPixelColorFormat() == pDstBitmap->GetPixelColorFormat())) + { + return false; + } + + Tizen::Graphics::BufferInfo srcBufferInfo; + Tizen::Graphics::BufferInfo dstBufferInfo; + + { + if (pSrcBitmap->Lock(srcBufferInfo) != E_SUCCESS) + { + return false; + } + + result r = pDstBitmap->Lock(dstBufferInfo); + if (r != E_SUCCESS) + { + pSrcBitmap->Unlock(); + return false; + } + } + + bool ret = false; + + do + { + switch (pSrcBitmap->GetPixelColorFormat()) + { + case Tizen::Graphics::BITMAP_PIXEL_FORMAT_RGB565: + { + Tizen::Graphics::_Util::Pixmap dstImage(dstBufferInfo.width, dstBufferInfo.height, 16, (void*) dstBufferInfo.pPixels); + Tizen::Graphics::_Util::Pixmap srcImage(srcBufferInfo.width, srcBufferInfo.height, 16, (void*) srcBufferInfo.pPixels); + ret = Tizen::Graphics::_Effect::ScaleImage(dstImage, 0, 0, dstBufferInfo.width, dstBufferInfo.height, srcImage); + } + break; + + case Tizen::Graphics::BITMAP_PIXEL_FORMAT_ARGB8888: + { + Tizen::Graphics::_Util::Pixmap dstImage(dstBufferInfo.width, dstBufferInfo.height, 32, (void*) dstBufferInfo.pPixels); + Tizen::Graphics::_Util::Pixmap srcImage(srcBufferInfo.width, srcBufferInfo.height, 32, (void*) srcBufferInfo.pPixels); + ret = Tizen::Graphics::_Effect::ScaleImage(dstImage, 0, 0, dstBufferInfo.width, dstBufferInfo.height, srcImage); + } + break; + + case Tizen::Graphics::BITMAP_PIXEL_FORMAT_R8G8B8A8: + default: + break; + } + } + while (0); + + pSrcBitmap->Unlock(); + pDstBitmap->Unlock(); + + return ret; +} + +//////////////////////////////////////////////////////////////////////////////// + +unsigned long +_UpdateBitmapTimeStampInternal(void) +{ + static unsigned long staticTimeStamp = 0; + + ++staticTimeStamp; + + staticTimeStamp = (staticTimeStamp == 0) ? (staticTimeStamp + 1) : staticTimeStamp; + + return staticTimeStamp; +} + +} + +//////////////////////////////////////////////////////////////////////////////// + +namespace Tizen { namespace Graphics +{ + +unsigned long +_GetBitmapTimeStamp(const Tizen::Graphics::_BitmapImpl& bitmap) +{ + Tizen::Graphics::_Bitmap* _nativeBitmap = Tizen::Graphics::_GetBitmapEx(bitmap); + + return (_nativeBitmap) ? _nativeBitmap->GetTimeStamp() : 0; +} + +unsigned long +_UpdateBitmapTimeStamp(Tizen::Graphics::_BitmapImpl& bitmap) +{ + Tizen::Graphics::_Bitmap* _nativeBitmap = Tizen::Graphics::_GetBitmapEx(bitmap); + + if (_nativeBitmap) + { + _nativeBitmap->SetTimeStamp(_UpdateBitmapTimeStampInternal()); + return _nativeBitmap->GetTimeStamp(); + } + + return 0; +} + +//////////////////////////////////////////////////////////////////////////////// + +_BitmapImpl::_BitmapImpl(void) + : _magicKey(0) + , _sharedItem(std::tr1::shared_ptr<_SharedItem>(new (std::nothrow)_SharedItem)) +{ + if (this->_sharedItem.get()) + { + this->_sharedItem->nativeBitmap.reset(new (std::nothrow) _Bitmap); + this->_sharedItem->coordHolder.reset(new (std::nothrow) _BitmapCoordinateHolder); + this->_sharedItem->lazyScaling = 0; + this->_sharedItem->scaledNativeBitmap.reset(null); + this->_sharedItem->pDestroyCallbackFunc = null; + this->_sharedItem->pDestroyCallbackParam = null; + this->_sharedItem->pLockCallbackFunc = null; + 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; + this->_sharedItem->associated.determinedNinePatchedAtFirst = false; + + if (this->_sharedItem->nativeBitmap.get() == null || this->_sharedItem->coordHolder.get() == null) + { + this->_sharedItem->nativeBitmap.reset(); + this->_sharedItem->coordHolder.reset(); + this->_sharedItem.reset(); + + return; + } + } + + _UpdateBitmapTimeStamp(*this); + + _Util::CarveMagicKey(*this, _magicKey); +} + +_BitmapImpl::~_BitmapImpl(void) +{ + if (this->_sharedItem.get()) + { + if (this->_sharedItem->pDestroyCallbackFunc) + { + if (this->_sharedItem.unique()) + { + this->_sharedItem->pDestroyCallbackFunc(this->_sharedItem->pDestroyCallbackParam); + } + } + } + + _Util::EraseMagicKey(*this, _magicKey); +} + +bool +_BitmapImpl::IsConstructed(void) const +{ + return (this->_sharedItem.get() && (this->_sharedItem->nativeBitmap->IsValid() || !this->_sharedItem->associated.fileName.IsEmpty())); +} + +Tizen::Base::String +_BitmapImpl::GetFileName(void) const +{ + return (this->_sharedItem.get()) ? this->_sharedItem->associated.fileName : String(); +} + +result +_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, "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); + + SysTryReturnResult(NID_GRP, vc_rect.x >= 0 && vc_rect.y >= 0, E_OUT_OF_RANGE, "The argument is out of range. (rect(x:%d,y:%d,w:%d,h:%d)).", vc_rect.x, vc_rect.y, vc_rect.width, vc_rect.height); + + { + _Util::Dimension vcDim = { vc_rect.width, vc_rect.height }; + + this->_sharedItem->coordHolder->ResetFromVc(vcDim); + + // SysAssert(this->_sharedItem->coordHolder->size.pcInt.w > 0 && this->_sharedItem->coordHolder->size.pcInt.h > 0); + + Rectangle pcRect = _ResUtil::ConvertToPhyCoord(vc_rect); + + pcRect.width = this->_sharedItem->coordHolder->size.pcInt.w; + pcRect.height = this->_sharedItem->coordHolder->size.pcInt.h; + + return this->_sharedItem->nativeBitmap->Construct(pcRect); + } +} + +result +_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, "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); + + switch (pixelFormat) + { + case BITMAP_PIXEL_FORMAT_RGB565: + case BITMAP_PIXEL_FORMAT_ARGB8888: + case BITMAP_PIXEL_FORMAT_R8G8B8A8: + break; + default: + SysTryReturnResult(NID_GRP, 0, E_INVALID_ARG, "BitmapPixelFormat(%d) is invalid argument.", pixelFormat); + break; + } + + { + _Util::Dimension vcDim = { vc_dim.width, vc_dim.height }; + + this->_sharedItem->coordHolder->ResetFromVc(vcDim); + + // SysAssert(this->_sharedItem->coordHolder->size.pcInt.w > 0 && this->_sharedItem->coordHolder->size.pcInt.h > 0); + + Dimension pcDim(this->_sharedItem->coordHolder->size.pcInt.w, this->_sharedItem->coordHolder->size.pcInt.h); + + return this->_sharedItem->nativeBitmap->Construct(pcDim, pixelFormat); + } +} + +result +_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, "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."); + + Rectangle rtCanvas = canvas.GetBounds(); + + SysTryReturnResult(NID_GRP, !rtCanvas.IsEmpty(), E_INVALID_ARG, "A canvas is empty."); + + 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); + + SysTryReturnResult(NID_GRP, _CheckValidity(vc_rect, rtCanvas), E_OUT_OF_RANGE, "The argument is out of range. (rect(x:%d,y:%d,w:%d,h:%d)).", vc_rect.x, vc_rect.y, vc_rect.width, vc_rect.height); + + Tizen::Graphics::_Canvas* pCanvasEx = canvas._pNativeCanvas; + + { + _Util::Dimension vcDim = { vc_rect.width, vc_rect.height }; + + this->_sharedItem->coordHolder->ResetFromVc(vcDim); + + // SysAssert(this->_sharedItem->coordHolder->size.pcInt.w > 0 && this->_sharedItem->coordHolder->size.pcInt.h > 0); + + Rectangle pcRect = _ResUtil::ConvertToPhyCoord(vc_rect); + + pcRect.width = this->_sharedItem->coordHolder->size.pcInt.w; + pcRect.height = this->_sharedItem->coordHolder->size.pcInt.h; + + return this->_sharedItem->nativeBitmap->Construct(*pCanvasEx, pcRect); + } +} + +result +_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, "Memory allocation failed."); + + SysTryReturnResult(NID_GRP, BITMAPIMPL_IS_VALID(&bitmap), E_INVALID_ARG, "The source bitmap is invalid."); + + Rectangle rtBitmap(0, 0, bitmap.GetWidth(), bitmap.GetHeight()); + + 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); + + SysTryReturnResult(NID_GRP, _CheckValidity(vc_rect, rtBitmap), E_OUT_OF_RANGE, "The argument is out of range. (rect(x:%d,y:%d,w:%d,h:%d)).", vc_rect.x, vc_rect.y, vc_rect.width, vc_rect.height); + + _Bitmap* pSrcBitmapEx = Tizen::Graphics::_GetBitmapEx(bitmap); + + { + _Util::Dimension vcDim = { vc_rect.width, vc_rect.height }; + + this->_sharedItem->coordHolder->ResetFromVc(vcDim); + + // SysAssert(this->_sharedItem->coordHolder->size.pcInt.w > 0 && this->_sharedItem->coordHolder->size.pcInt.h > 0); + + result r = E_SUCCESS; + Rectangle pcRect = _ResUtil::ConvertToPhyCoord(vc_rect); + + pcRect.width = this->_sharedItem->coordHolder->size.pcInt.w; + pcRect.height = this->_sharedItem->coordHolder->size.pcInt.h; + + if (Tizen::Graphics::_IsLazyScalingBitmap(bitmap)) + { + _Bitmap* pSrcScaledBitmapEx = Tizen::Graphics::_GetScaledBitmapEx(bitmap); + + r = this->_sharedItem->nativeBitmap->Construct(*pSrcScaledBitmapEx, pcRect); + } + else + { + r = this->_sharedItem->nativeBitmap->Construct(*pSrcBitmapEx, pcRect); + } + + return r; + } +} + +result +_BitmapImpl::Construct(const Tizen::Base::ByteBuffer& buffer, const Dimension& rq_dim, BitmapPixelFormat pixelFormat) +{ +#if 1 + return this->Construct(buffer, rq_dim, pixelFormat, true); +#else +// return this->Construct(buffer, rq_dim, pixelFormat, BUFFER_SCALING_AUTO); +// return this->Construct(buffer, rq_dim, pixelFormat, BUFFER_SCALING_NONE); + + SysTryReturnResult(NID_GRP, this, E_OUT_OF_MEMORY, "This instance is not allocated yet."); + + 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); + + SysTryReturnResult(NID_GRP, BITMAP_PIXEL_FORMAT_MIN < pixelFormat && pixelFormat < BITMAP_PIXEL_FORMAT_MAX, E_INVALID_ARG, "BitmapPixelFormat(%d) is the invalid argument.", pixelFormat); + + { + // buffer size should be verified. + int bytePerPixel = 0; + if (BITMAP_PIXEL_FORMAT_RGB565 == pixelFormat) + { + bytePerPixel = 2; + } + else if (BITMAP_PIXEL_FORMAT_ARGB8888 == pixelFormat || BITMAP_PIXEL_FORMAT_R8G8B8A8 == pixelFormat) + { + bytePerPixel = 4; + } + else + { + SysTryReturnResult(NID_GRP, 0, E_INVALID_ARG, "BitmapPixelFormat(%d) is the invalid argument.", pixelFormat); + } + + int byteNum = buffer.GetLimit(); + int expectedBufferSize = rq_dim.width * rq_dim.height * bytePerPixel; + + SysTryReturnResult(NID_GRP, expectedBufferSize <= byteNum, E_INVALID_ARG, "A buffer size is not correct."); + } + + if (_ResUtil::NeedToConvertCoord()) + { + Dimension vc_dim; + Dimension pc_dim; + + vc_dim = rq_dim; + pc_dim = _ResUtil::ConvertToPhyCoord(vc_dim); + + // special case + pc_dim.width = (pc_dim.width > 0) ? pc_dim.width : 1; + pc_dim.height = (pc_dim.height > 0) ? pc_dim.height : 1; + + if (pc_dim.width * 2 == rq_dim.width && pc_dim.height * 2 == rq_dim.height) + { + int pitch = rq_dim.width; + + if (pixelFormat == BITMAP_PIXEL_FORMAT_ARGB8888) + { + const unsigned long MASK = 0x00FF00FF; + + unsigned long* pBuffer = (unsigned long*) buffer.GetPointer(); + for (int y = 0; y < pc_dim.height; y++) + { + for (int x = 0; x < pc_dim.width; x++) + { + unsigned long add1 = (pBuffer[0] & MASK) + (pBuffer[1] & MASK) + (pBuffer[pitch] & MASK) + (pBuffer[pitch + 1] & MASK); + unsigned long add2 = ((pBuffer[0] >> 8) & MASK) + ((pBuffer[1] >> 8) & MASK) + ((pBuffer[pitch] >> 8) & MASK) + ((pBuffer[pitch + 1] >> 8) & MASK); + + unsigned long pix = ((add1 >> 2) & MASK) | (((add2 >> 2) & MASK) << 8); + + pBuffer[0] = pix; + pBuffer[1] = pix; + pBuffer[pitch] = pix; + pBuffer[pitch + 1] = pix; + + pBuffer += 2; + } + pBuffer += pitch; + } + } + else if (pixelFormat == BITMAP_PIXEL_FORMAT_RGB565) + { + const unsigned short MASK1 = 0xF81F; + const unsigned short MASK2 = 0x07E0; + const unsigned short CHROMAKEY = 0xF81F | 0x0020; + + bool hasChromakey; + { + unsigned short* pBuffer = (unsigned short*) buffer.GetPointer(); + unsigned short* pBufferEnd = pBuffer + rq_dim.width * rq_dim.height; + + while (pBuffer < pBufferEnd) + { + if (*pBuffer == CHROMAKEY) + { + break; + } + + ++pBuffer; + } + + hasChromakey = (pBuffer < pBufferEnd); + } + + if (hasChromakey) + { + ; // pass through default scaling algorithm + } + else + { + unsigned short* pBuffer = (unsigned short*) buffer.GetPointer(); + + for (int y = 0; y < pc_dim.height; y++) + { + for (int x = 0; x < pc_dim.width; x++) + { + unsigned long add1 = (unsigned long) (pBuffer[0] & MASK1) + (unsigned long) (pBuffer[1] & MASK1) + (unsigned long) (pBuffer[pitch] & MASK1) + (unsigned long) (pBuffer[pitch + 1] & MASK1); + unsigned long add2 = (pBuffer[0] & MASK2) + (pBuffer[1] & MASK2) + (pBuffer[pitch] & MASK2) + (pBuffer[pitch + 1] & MASK2); + + unsigned long pix = ((add1 >> 2) & MASK1) | ((add2 >> 2) & MASK2); + + pBuffer[0] = pix; + pBuffer[1] = pix; + pBuffer[pitch] = pix; + pBuffer[pitch + 1] = pix; + + pBuffer += 2; + } + pBuffer += pitch; + } + } + } + } + + result r = this->_nativeBitmap->Construct(buffer, rq_dim, pixelFormat); + + if (!IsFailed(r)) + { + this->_nativeBitmap->Scale(pc_dim); + + Rect vc_rect(0, 0, vc_dim.width, vc_dim.height); + Rect pc_rect(0, 0, pc_dim.width, pc_dim.height); + + this->_coordHolder->bitmapSize.required = vc_rect; + this->_coordHolder->bitmapSize.phyCoord = pc_rect; + this->_coordHolder->bitmapSize.virCoord = vc_rect; + } + + return r; + } + else + { + return this->_nativeBitmap->Construct(buffer, rq_dim, pixelFormat); + } + +#endif +} + +result +_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, "Memory allocation failed."); + + SysTryReturnResult(NID_GRP, (bufferInfo.width > 0) && (bufferInfo.height > 0) && (bufferInfo.pitch > 0) + , E_INVALID_ARG + , "Invalid argument (BufferInfo::width = %d, BufferInfo::height = %d, BufferInfo::pitch = %d)" + , bufferInfo.width, bufferInfo.height, bufferInfo.pitch); + + SysTryReturnResult(NID_GRP, bufferInfo.bitsPerPixel > 0 + , E_INVALID_ARG + , "Invalid argument (BufferInfo::bitsPerPixel = %d)" + , bufferInfo.bitsPerPixel); + + SysTryReturnResult(NID_GRP, (bufferInfo.pixelFormat > PIXEL_FORMAT_MIN) && (bufferInfo.pixelFormat < PIXEL_FORMAT_MAX) + , E_INVALID_ARG + , "Invalid argument (BufferInfo::pixelFormat = %d)" + , bufferInfo.pixelFormat); + + SysTryReturnResult(NID_GRP, bufferInfo.pPixels != null + , E_INVALID_ARG + , "Invalid argument (BufferInfo::pPixels = null)"); + + SysTryReturnResult(NID_GRP, bufferInfo.bitsPerPixel == 32 || bufferInfo.bitsPerPixel == 16 + , E_UNSUPPORTED_FORMAT + , "Unsupported format (BufferInfo::bitsPerPixel = %d)" + , bufferInfo.bitsPerPixel); + + BitmapPixelFormat bitmapPixelFormat = BITMAP_PIXEL_FORMAT_MIN; + + switch (bufferInfo.pixelFormat) + { + case PIXEL_FORMAT_RGB565: + bitmapPixelFormat = BITMAP_PIXEL_FORMAT_RGB565; + break; + case PIXEL_FORMAT_ARGB8888: + bitmapPixelFormat = BITMAP_PIXEL_FORMAT_ARGB8888; + break; + case PIXEL_FORMAT_R8G8B8A8: + bitmapPixelFormat = BITMAP_PIXEL_FORMAT_R8G8B8A8; + break; + default: + break; + } + + SysTryReturnResult(NID_GRP, bitmapPixelFormat != BITMAP_PIXEL_FORMAT_MIN + , E_UNSUPPORTED_FORMAT + , "Unsupported format (BufferInfo::pixelFormat = %d)" + , bufferInfo.pixelFormat); + + result r = this->Construct(static_cast(bufferInfo.pPixels), bufferInfo.width, bufferInfo.height, bitmapPixelFormat, bufferInfo.pitch); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + this->_sharedItem->nativeBitmap->_SetOwnership(false); + + return E_SUCCESS; +} + +result +_BitmapImpl::Construct(const Tizen::Base::ByteBuffer& buffer, const Dimension& rq_dim, BitmapPixelFormat pixelFormat, bool autoScaling) +{ + SysTryReturnResult(NID_GRP, this, E_OUT_OF_MEMORY, "This instance is not allocated yet."); + + 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); + + SysTryReturnResult(NID_GRP, BITMAP_PIXEL_FORMAT_MIN < pixelFormat && pixelFormat < BITMAP_PIXEL_FORMAT_MAX, E_INVALID_ARG, "BitmapPixelFormat(%d) is the invalid argument.", pixelFormat); + + result r = _CheckBufferSize(buffer, rq_dim, pixelFormat); + + if (r != E_SUCCESS) + { + return r; + } + + r = this->_sharedItem->nativeBitmap->Construct(buffer, rq_dim, pixelFormat); + + if (!IsFailed(r)) + { + if (autoScaling) + { + _Util::Dimension vcDim = { rq_dim.width, rq_dim.height }; + + this->_sharedItem->coordHolder->ResetFromVc(vcDim); + + // SysAssert(this->_sharedItem->coordHolder->size.pcInt.w > 0 && this->_sharedItem->coordHolder->size.pcInt.h > 0); + + Dimension pcDim(this->_sharedItem->coordHolder->size.pcInt.w, this->_sharedItem->coordHolder->size.pcInt.h); + const BitmapScalingQuality quality = BITMAP_SCALING_QUALITY_LOW; + + this->_sharedItem->nativeBitmap->ScaleEx(pcDim, quality); + } + else + { + _Util::Dimension pcDim = { rq_dim.width, rq_dim.height }; + + this->_sharedItem->coordHolder->ResetFromPc(pcDim); + } + } + + return r; +} + +result +_BitmapImpl::Construct(const byte* pBuffer, int bufSize, const Dimension& rq_dim, BitmapPixelFormat pixelFormat, bool autoScaling) +{ + SysTryReturnResult(NID_GRP, this, E_OUT_OF_MEMORY, "This instance is not allocated yet."); + + 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."); + + 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); + + SysTryReturnResult(NID_GRP, pixelFormat > BITMAP_PIXEL_FORMAT_MIN && pixelFormat < BITMAP_PIXEL_FORMAT_MAX, E_INVALID_ARG, "BitmapPixelFormat(%d) is the invalid argument.", pixelFormat); + + SysTryReturnResult(NID_GRP, (bufSize > 0) && (bufSize >= rq_dim.width * rq_dim.height * _GetBytesPerPixel(pixelFormat)), E_INVALID_ARG, "The specified buffer size is too small (buffer size = %d, dim(%d, %d))", bufSize, rq_dim.width, rq_dim.height); + + _Util::Dimension vcDim = { rq_dim.width, rq_dim.height }; + + this->_sharedItem->coordHolder->ResetFromVc(vcDim); + + // SysAssert(this->_sharedItem->coordHolder->size.pcInt.w > 0 && this->_sharedItem->coordHolder->size.pcInt.h > 0); + + result r = this->_sharedItem->nativeBitmap->Construct(pBuffer, bufSize, rq_dim, pixelFormat); + + if (!IsFailed(r) && _ResUtil::NeedToConvertCoord()) + { + if (autoScaling) + { + Dimension pcDim(this->_sharedItem->coordHolder->size.pcInt.w, this->_sharedItem->coordHolder->size.pcInt.h); + const BitmapScalingQuality quality = BITMAP_SCALING_QUALITY_LOW; + + this->_sharedItem->nativeBitmap->ScaleEx(pcDim, quality); + } + else + { + _Util::Dimension pcDim = { rq_dim.width, rq_dim.height }; + + this->_sharedItem->coordHolder->ResetFromPc(pcDim); + } + } + + return r; +} + +result +_BitmapImpl::Construct(const byte* pExtBuffer, int width, int height, BitmapPixelFormat pixelFormat, int pitch) +{ + SysTryReturnResult(NID_GRP, this, E_OUT_OF_MEMORY, "This instance is not allocated yet."); + + SysTryReturnResult(NID_GRP, this->_sharedItem.get(), E_OUT_OF_MEMORY, "Memory allocation failed."); + + SysTryReturnResult(NID_GRP, pExtBuffer, E_INVALID_ARG, "The specified buffer pointer is invalid.", width, height); + + SysTryReturnResult(NID_GRP, width > 0 && height > 0, E_INVALID_ARG, "Both of width(%d) and height(%d) of a dimension MUST be greater than 0.", width, height); + + SysTryReturnResult(NID_GRP, pixelFormat > BITMAP_PIXEL_FORMAT_MIN && pixelFormat < BITMAP_PIXEL_FORMAT_MAX, E_INVALID_ARG, "BitmapPixelFormat(%d) is the invalid argument.", pixelFormat); + + // SysAssert(this->_sharedItem->coordHolder->size.pcInt.w > 0 && this->_sharedItem->coordHolder->size.pcInt.h > 0); + + int bpp = _GetBytesPerPixel(pixelFormat); + + SysTryReturnResult(NID_GRP, bpp > 0, E_INVALID_ARG, "BitmapPixelFormat(%d) is the invalid argument.", pixelFormat); + + result r = this->_sharedItem->nativeBitmap->Construct(pExtBuffer, width, height, bpp * 8, pitch / bpp); + + if (!IsFailed(r)) + { + _Util::Dimension pcDim = { width, height }; + + this->_sharedItem->coordHolder->ResetFromPc(pcDim); + } + + return r; +} + +result +_BitmapImpl::Construct(const Tizen::Base::ByteBuffer& buffer, const Dimension& rq_dim, BitmapPixelFormat pixelFormat, BufferScaling bufferScaling) +{ + SysTryReturnResult(NID_GRP, this, E_OUT_OF_MEMORY, "This instance is not allocated yet."); + + 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); + + SysTryReturnResult(NID_GRP, pixelFormat > BITMAP_PIXEL_FORMAT_MIN && pixelFormat < BITMAP_PIXEL_FORMAT_MAX, E_INVALID_ARG, "BitmapPixelFormat(%d) is the invalid argument.", pixelFormat); + + result r = _CheckBufferSize(buffer, rq_dim, pixelFormat); + + if (r != E_SUCCESS) + { + return r; + } + + switch (bufferScaling) + { + case BUFFER_SCALING_AUTO: + return this->Construct(buffer, rq_dim, pixelFormat, true); + case BUFFER_SCALING_NONE: + break; + default: + SysTryReturnResult(NID_GRP, 0, E_INVALID_ARG, "BufferScaling(%d) is the invalid argument.", pixelFormat); + break; + } + + _Util::Dimension vcDim = { rq_dim.width, rq_dim.height }; + + this->_sharedItem->coordHolder->ResetFromVc(vcDim); + + // SysAssert(this->_sharedItem->coordHolder->size.pcInt.w > 0 && this->_sharedItem->coordHolder->size.pcInt.h > 0); + + r = this->_sharedItem->nativeBitmap->Construct(buffer, rq_dim, pixelFormat); + + if (!IsFailed(r) && _ResUtil::NeedToConvertCoord()) + { + this->_sharedItem->lazyScaling = 1; + + { + Dimension vc_dim = rq_dim; + Dimension pc_dim(this->_sharedItem->coordHolder->size.pcInt.w, this->_sharedItem->coordHolder->size.pcInt.h); + + bool isScaledBufferAvailable = false; + Tizen::Base::ByteBuffer scaledBuffer; + + { + int scaledCapacity = _GetBytesPerPixel(pixelFormat) * (pc_dim.width * pc_dim.height); + SysAssert(scaledCapacity > 0); + + // OOM ignored + isScaledBufferAvailable = (scaledBuffer.Construct(scaledCapacity) == E_SUCCESS); + } + + if (isScaledBufferAvailable) + { + _ScaleBuffer(scaledBuffer, pc_dim, buffer, vc_dim, pixelFormat); + + this->_sharedItem->scaledNativeBitmap.reset(new (std::nothrow) _Bitmap); + + if (this->_sharedItem->scaledNativeBitmap.get()) + { + if (this->_sharedItem->scaledNativeBitmap->Construct(scaledBuffer, pc_dim, pixelFormat) == E_SUCCESS) + { + // Post-processing + + // BufferInfo bufferInfo; + // this->_scaledNativeBitmap->Lock(bufferInfo); + // this->_scaledNativeBitmap->Unlock(); + ; + } + else + { + this->_sharedItem->scaledNativeBitmap.reset(null); + } + } + } + } + } + + return r; +} + +result +_BitmapImpl::Construct(const Tizen::Base::String& fileName, 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, "Memory allocation failed."); + + switch (pixelFormat) + { + case BITMAP_PIXEL_FORMAT_RGB565: + case BITMAP_PIXEL_FORMAT_ARGB8888: + case BITMAP_PIXEL_FORMAT_R8G8B8A8: + break; + default: + SysTryReturnResult(NID_GRP, false, E_INVALID_ARG, "BitmapPixelFormat(%d) is invalid argument.", pixelFormat); + break; + } + + SysTryReturnResult(NID_GRP, Tizen::Io::File::IsFileExist(fileName), E_INVALID_ARG, "The specified file is not found."); + + // This function doesn't verify the specified image file. + this->_sharedItem->associated.fileName = fileName; + this->_sharedItem->associated.pixelFormat = pixelFormat; + this->_sharedItem->associated.hasBeenDetectedByUsingName = false; + this->_sharedItem->associated.determinedNinePatchedAtFirst = false; + + return E_SUCCESS; +} + +result +_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, "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); + + SysTryReturnResult(NID_GRP, vcRectF.x >= 0.0f && vcRectF.y >= 0.0f, E_OUT_OF_RANGE, "The argument is out of range. (rect(x:%f,y:%f,w:%f,h:%f)).", vcRectF.x, vcRectF.y, vcRectF.width, vcRectF.height); + + { + _Util::Dimension vcDimF = { vcRectF.width, vcRectF.height }; + + this->_sharedItem->coordHolder->ResetFromVc(vcDimF); + + // SysAssert(this->_sharedItem->coordHolder->size.pcInt.w > 0 && this->_sharedItem->coordHolder->size.pcInt.h > 0); + + FloatRectangle pcRectF = _ResUtil::ConvertToPhyCoord(vcRectF); + Rectangle pcRect; + + pcRect.x = _FloatToIntForPos(pcRectF.x); + pcRect.y = _FloatToIntForPos(pcRectF.y); + pcRect.width = this->_sharedItem->coordHolder->size.pcInt.w; + pcRect.height = this->_sharedItem->coordHolder->size.pcInt.h; + + return this->_sharedItem->nativeBitmap->Construct(pcRect); + } +} + +result +_BitmapImpl::Construct(const FloatDimension& vcDimF, 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, "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); + + switch (pixelFormat) + { + case BITMAP_PIXEL_FORMAT_RGB565: + case BITMAP_PIXEL_FORMAT_ARGB8888: + case BITMAP_PIXEL_FORMAT_R8G8B8A8: + break; + default: + SysTryReturnResult(NID_GRP, 0, E_INVALID_ARG, "BitmapPixelFormat(%d) is invalid argument.", pixelFormat); + break; + } + + { + _Util::Dimension vcUtilDimF = { vcDimF.width, vcDimF.height }; + + this->_sharedItem->coordHolder->ResetFromVc(vcUtilDimF); + + Dimension pcDim(this->_sharedItem->coordHolder->size.pcInt.w, this->_sharedItem->coordHolder->size.pcInt.h); + + return this->_sharedItem->nativeBitmap->Construct(pcDim, pixelFormat); + } +} + +result +_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, "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."); + + FloatRectangle rtCanvasF = canvas.GetBoundsF(); + + SysTryReturnResult(NID_GRP, !rtCanvasF.IsEmpty(), E_INVALID_ARG, "A canvas is empty."); + + 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); + + SysTryReturnResult(NID_GRP, _CheckValidity(vcRectF, rtCanvasF), E_OUT_OF_RANGE, "The argument is out of range. (rect(x:%f,y:%f,w:%f,h:%f)).", vcRectF.x, vcRectF.y, vcRectF.width, vcRectF.height); + + Tizen::Graphics::_Canvas* pCanvasEx = canvas._pNativeCanvas; + + { + _Util::Dimension vcDimF = { vcRectF.width, vcRectF.height }; + + this->_sharedItem->coordHolder->ResetFromVc(vcDimF); + + FloatRectangle pcRectF = _ResUtil::ConvertToPhyCoord(vcRectF); + Rectangle pcRect; + + pcRect.x = _FloatToIntForPos(pcRectF.x); + pcRect.y = _FloatToIntForPos(pcRectF.y); + pcRect.width = this->_sharedItem->coordHolder->size.pcInt.w; + pcRect.height = this->_sharedItem->coordHolder->size.pcInt.h; + + return this->_sharedItem->nativeBitmap->Construct(*pCanvasEx, pcRect); + } +} + +result +_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, "Memory allocation failed."); + + SysTryReturnResult(NID_GRP, BITMAPIMPL_IS_VALID(&bitmap), E_INVALID_ARG, "The source bitmap is invalid."); + + 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); + + FloatRectangle rtBitmapF(0, 0, bitmap.GetWidthF(), bitmap.GetHeightF()); + + SysTryReturnResult(NID_GRP, _CheckValidity(vcRectF, rtBitmapF), E_OUT_OF_RANGE, "The argument is out of range. (rect(x:%f,y:%f,w:%f,h:%f)).", vcRectF.x, vcRectF.y, vcRectF.width, vcRectF.height); + + _Bitmap* pSrcBitmapEx = Tizen::Graphics::_GetBitmapEx(bitmap); + + { + _Util::Dimension vcDimF = { vcRectF.width, vcRectF.height }; + + this->_sharedItem->coordHolder->ResetFromVc(vcDimF); + + FloatRectangle pcRectF = _ResUtil::ConvertToPhyCoord(vcRectF); + Rectangle pcRect; + + pcRect.x = _FloatToIntForPos(pcRectF.x); + pcRect.y = _FloatToIntForPos(pcRectF.y); + pcRect.width = this->_sharedItem->coordHolder->size.pcInt.w; + pcRect.height = this->_sharedItem->coordHolder->size.pcInt.h; + + result r = E_SUCCESS; + + if (Tizen::Graphics::_IsLazyScalingBitmap(bitmap)) + { + _Bitmap* pSrcScaledBitmapEx = Tizen::Graphics::_GetScaledBitmapEx(bitmap); + + r = this->_sharedItem->nativeBitmap->Construct(*pSrcScaledBitmapEx, pcRect); + } + else + { + r = this->_sharedItem->nativeBitmap->Construct(*pSrcBitmapEx, pcRect); + } + + return r; + } +} + +result +_BitmapImpl::Scale(const Dimension& vc_dim) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + SysTryReturnResult(NID_GRP, vc_dim.width > 0 && vc_dim.height > 0, E_OUT_OF_RANGE, "Both of width(%d) and height(%d) MUST be greater than 0.", vc_dim.width, vc_dim.height); + + if (vc_dim.width == this->GetWidth() && vc_dim.height == this->GetHeight()) + { + return E_SUCCESS; + } + else + { + return this->Scale(FloatDimension(float(vc_dim.width), float(vc_dim.height))); + } +} + +result +_BitmapImpl::Scale(const FloatDimension& vcDimF) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + SysTryReturnResult(NID_GRP, vcDimF.width > 0.0f && vcDimF.height > 0.0f, E_OUT_OF_RANGE, "Both of width(%f) and height(%f) MUST be greater than 0.", vcDimF.width, vcDimF.height); + + if (vcDimF.width == this->GetWidthF() && vcDimF.height == this->GetHeightF()) + { + return E_SUCCESS; + } + + _UpdateBitmapTimeStamp(*this); + + result r = E_SUCCESS; + + _Util::AccumList<_Util::Pair > scalingValue; + + _GetScaleInfo(this->GetScalingQuality(), this->GetWidthF(), this->GetHeightF(), vcDimF.width, vcDimF.height, scalingValue); + + for (_Util::AccumList<_Util::Pair >::Iterator iter = scalingValue.End(); iter != scalingValue.Begin(); --iter) + { + this->__Scale((iter-1)->first, (iter-1)->second); + } + + return r; +} + +result +_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."); + + SysTryReturnResult(NID_GRP, &src && src._sharedItem.get(), E_INVALID_ARG, "The source bitmap is invalid."); + + SysTryReturnResult(NID_GRP, src._sharedItem->nativeBitmap->IsValid(), E_INVALID_ARG, "The source bitmap is invalid."); + + 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, (vcSrcRect.width >= 0) && (vcSrcRect.height >= 0), E_INVALID_ARG, "The given rectangle(width:%d,height:%d) is invalid.", vcSrcRect.width, vcSrcRect.height); + + if ((vcSrcRect.width == 0) || (vcSrcRect.height == 0)) + { + return E_SUCCESS; + } + else + { + Rectangle rtBitmap(0, 0, src.GetWidth(), src.GetHeight()); + 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(vcDest.x), float(vcDest.y)), src, FloatRectangle(float(vcSrcRect.x), float(vcSrcRect.y), float(vcSrcRect.width), float(vcSrcRect.height))); + } +} + +result +_BitmapImpl::Merge(const FloatPoint& destVcPosF, const _BitmapImpl& srcBitmap, const FloatRectangle& srcVcRectF) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + SysTryReturnResult(NID_GRP, &srcBitmap && srcBitmap._sharedItem.get(), E_INVALID_ARG, "The source bitmap is invalid."); + + SysTryReturnResult(NID_GRP, srcBitmap._sharedItem->nativeBitmap->IsValid(), E_INVALID_ARG, "The source bitmap is invalid."); + + 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); + + if ((srcVcRectF.width == 0.0f) || (srcVcRectF.height == 0.0f)) + { + return E_SUCCESS; + } + + FloatRectangle rtBitmapF(0, 0, srcBitmap.GetWidthF(), srcBitmap.GetHeightF()); + SysTryReturnResult(NID_GRP, _CheckValidity(srcVcRectF, rtBitmapF), E_OUT_OF_RANGE, "The argument is out of range. (srcRect(x:%f,y:%f,w:%f,h:%f)).", srcVcRectF.x, srcVcRectF.y, srcVcRectF.width, srcVcRectF.height); + + _UpdateBitmapTimeStamp(*this); + + _Bitmap* pSrcBitmapEx = Tizen::Graphics::_GetBitmapEx(srcBitmap); + _Bitmap* pDstBitmapEx = this->_sharedItem->nativeBitmap.get(); + + Point destVcPos(_FloatToIntForPos(destVcPosF.x), _FloatToIntForPos(destVcPosF.y)); + Rectangle srcVcRect; + + srcVcRect.x = _FloatToIntForPos(srcVcRectF.x); + srcVcRect.y = _FloatToIntForPos(srcVcRectF.y); + srcVcRect.width = _FloatToIntForPos(srcVcRectF.GetBottomRight().x - srcVcRectF.GetTopLeft().x); + srcVcRect.height= _FloatToIntForPos(srcVcRectF.GetBottomRight().y - srcVcRectF.GetTopLeft().y); + + if (_ResUtil::NeedToConvertCoord()) + { + FloatPoint destPcPosF = _ResUtil::ConvertToPhyCoord(destVcPosF); + FloatRectangle srcPcRectF = _ResUtil::ConvertToPhyCoord(srcVcRectF); + + Point destPcPos(_FloatToIntForPos(destPcPosF.x), _FloatToIntForPos(destPcPosF.y)); + Rectangle srcPcRect; + + srcPcRect.x = _FloatToIntForPos(srcPcRectF.x); + srcPcRect.y = _FloatToIntForPos(srcPcRectF.y); + srcPcRect.width = _FloatToIntForPos(srcPcRectF.GetBottomRight().x - srcPcRectF.GetTopLeft().x); + srcPcRect.height= _FloatToIntForPos(srcPcRectF.GetBottomRight().y - srcPcRectF.GetTopLeft().y); + + /* + case 0: scaled bitmap -> scaled bitmap + merge level 0 + case 1: scaled bitmap -> lazy scaled bitmap + merge level 0 from the scaled source bitmap + merge level 0(src) and level 1(dst) + case 2: lazy scaled bitmap -> scaled bitmap + merge level 1(src) and level 0(dst) + case 3: lazy scaled bitmap -> lazy scaled bitmap + merge level 0 (using virtual coordinate) + merge level 1 (using physical coordinate) + */ + int caseNo = (Tizen::Graphics::_IsLazyScalingBitmap(srcBitmap)) ? 2 : 0; + caseNo += (Tizen::Graphics::_IsLazyScalingBitmap(*this)) ? 1 : 0; + + switch (caseNo) + { + case 0: // source: pre-scale, destination: pre-scale --> merge by using the physical coordinate + { + return pDstBitmapEx->Merge(destPcPos, *pSrcBitmapEx, srcPcRect); + } + case 1: // source: pre-scale --> level0 bitmap: merge after enlarging, level1 bitmap: merge from source directly + { + result r = E_SUCCESS; + + // step 1 + { + _Bitmap srcResizedBitmap; + { + Dimension srcVcDim; + + srcVcDim.width = static_cast(srcBitmap._sharedItem->coordHolder->size.vcFloatActual.w); + srcVcDim.height = static_cast(srcBitmap._sharedItem->coordHolder->size.vcFloatActual.h); + + r = srcResizedBitmap.Construct(srcVcDim, pSrcBitmapEx->GetPixelColorFormat()); + + SysTryReturnResult(NID_GRP, !IsFailed(r), E_OUT_OF_MEMORY, "Memory allocation failed."); + } + + _UpdateScaledBitmapEx(pSrcBitmapEx, &srcResizedBitmap); + + r = pDstBitmapEx->Merge(destVcPos, srcResizedBitmap, srcVcRect); + } + + // step 2 + if (!IsFailed(r) && this->_sharedItem->scaledNativeBitmap.get()) + { + return this->_sharedItem->scaledNativeBitmap->Merge(destPcPos, *pSrcBitmapEx, srcPcRect); + } + + return r; + } + case 2: // destination: pre-scale --> merge from the level1 bitmap of source + { + _Bitmap* pSrcScaledBitmapEx = Tizen::Graphics::_GetScaledBitmapEx(srcBitmap); + + SysTryReturnResult(NID_GRP, pSrcScaledBitmapEx != null, E_INVALID_ARG, "The source bitmap is invalid."); + + return pDstBitmapEx->Merge(destPcPos, *pSrcScaledBitmapEx, srcPcRect); + } + case 3: // source: lazy-scale, destination: lazy-scale --> merge between level0, merge between level1 + { + result r = pDstBitmapEx->Merge(destVcPos, *pSrcBitmapEx, srcVcRect); + + _Bitmap* pSrcScaledBitmapEx = Tizen::Graphics::_GetScaledBitmapEx(srcBitmap); + + if (this->_sharedItem->scaledNativeBitmap.get() && pSrcScaledBitmapEx) + { + this->_sharedItem->scaledNativeBitmap->Merge(destPcPos, *pSrcScaledBitmapEx, srcPcRect); + } + + return r; + } + default: + SysAssert(0); + return E_INVALID_ARG; + } + } + else + { + return pDstBitmapEx->Merge(destVcPos, *pSrcBitmapEx, srcVcRect); + } + + // for removing compiler warnings + return E_OPERATION_FAILED; +} + +int +_BitmapImpl::GetHeight() const +{ + if (!(INSTANCE_IS_VALID)) + { + SysLog(NID_GRP, "[E_OPERATION_FAILED] This instance is not constructed yet."); + return -1; + } + + return this->_sharedItem->coordHolder->size.vcInt.h; +} + +float +_BitmapImpl::GetHeightF(void) const +{ + if (!(INSTANCE_IS_VALID)) + { + SysLog(NID_GRP, "[E_OPERATION_FAILED] This instance is not constructed yet."); + return -1.0f; + } + + return this->_sharedItem->coordHolder->size.vcFloat.h; +} + +float +_BitmapImpl::GetActualHeight(void) const +{ + if (!(INSTANCE_IS_VALID)) + { + SysLog(NID_GRP, "[E_OPERATION_FAILED] This instance is not constructed yet."); + return -1.0f; + } + + return this->_sharedItem->coordHolder->size.vcFloatActual.h; +} + +int +_BitmapImpl::GetWidth() const +{ + if (!(INSTANCE_IS_VALID)) + { + SysLog(NID_GRP, "[E_OPERATION_FAILED] This instance is not constructed yet."); + return -1; + } + + return this->_sharedItem->coordHolder->size.vcInt.w; +} + +float +_BitmapImpl::GetWidthF(void) const +{ + if (!(INSTANCE_IS_VALID)) + { + SysLog(NID_GRP, "[E_OPERATION_FAILED] This instance is not constructed yet."); + return -1.0f; + } + + return this->_sharedItem->coordHolder->size.vcFloat.w; +} + +float +_BitmapImpl::GetActualWidth(void) const +{ + if (!(INSTANCE_IS_VALID)) + { + SysLog(NID_GRP, "[E_OPERATION_FAILED] This instance is not constructed yet."); + return -1.0f; + } + + return this->_sharedItem->coordHolder->size.vcFloatActual.w; +} + +int +_BitmapImpl::GetBitsPerPixel() const +{ + if (!(INSTANCE_IS_VALID)) + { + SysLog(NID_GRP, "[E_OPERATION_FAILED] This instance is not constructed yet."); + return -1; + } + + return this->_sharedItem->nativeBitmap->GetBitsPerPixel(); +} + +BitmapPixelFormat +_BitmapImpl::GetPixelColorFormat() const +{ + if (!(INSTANCE_IS_VALID)) + { + SysLog(NID_GRP, "[E_OPERATION_FAILED] This instance is not constructed yet."); + return BITMAP_PIXEL_FORMAT_MAX; + } + + return this->_sharedItem->nativeBitmap->GetPixelColorFormat(); +} + +result +_BitmapImpl::SetMaskingColor(const Color* pColor) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + _UpdateBitmapTimeStamp(*this); + + return this->_sharedItem->nativeBitmap->SetMaskingColor(pColor); +} + +result +_BitmapImpl::GetMaskingColor(Color& color) const +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + return this->_sharedItem->nativeBitmap->GetMaskingColor(color); +} + +void +_BitmapImpl::SetAlphaConstant(int opacity) +{ + if (INSTANCE_IS_VALID) + { + _UpdateBitmapTimeStamp(*this); + + this->_sharedItem->nativeBitmap->SetAlphaConstant(opacity); + } +} + +int +_BitmapImpl::GetAlphaConstant(void) const +{ + return (INSTANCE_IS_VALID) ? this->_sharedItem->nativeBitmap->GetAlphaConstant() : -1; +} + +result +_BitmapImpl::SetScalingQuality(BitmapScalingQuality quality) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + switch (quality) + { + case BITMAP_SCALING_QUALITY_LOW: + case BITMAP_SCALING_QUALITY_MID: + case BITMAP_SCALING_QUALITY_HIGH: + break; + default: + return E_INVALID_ARG; + } + + _UpdateBitmapTimeStamp(*this); + + this->_sharedItem->nativeBitmap->SetScalingQuality(quality); + + return E_SUCCESS; +} + +BitmapScalingQuality +_BitmapImpl::GetScalingQuality(void) const +{ + return (INSTANCE_IS_VALID) ? this->_sharedItem->nativeBitmap->GetScalingQuality() : BITMAP_SCALING_QUALITY_LOW; +} + +bool +_BitmapImpl::IsNinePatchedBitmap(void) const +{ +#if 1 + if (!(INSTANCE_IS_VALID)) + { + SysLog(NID_GRP, "[E_OPERATION_FAILED] This instance is not constructed yet."); + return false; + } + + _Bitmap* pRefBitmap = (this->_sharedItem->lazyScaling && this->_sharedItem->scaledNativeBitmap.get()) ? this->_sharedItem->scaledNativeBitmap.get() : this->_sharedItem->nativeBitmap.get(); + + return pRefBitmap->IsNinePatchedBitmap(); +#else + if (!(IS_INSTANCE_VALID)) + { + SysLog(NID_GRP, "[E_OPERATION_FAILED] This instance is not constructed yet."); + return false; + } + + const Tizen::Base::String& associatedFileName = this->_sharedItem->associated.fileName; + + if (associatedFileName.IsEmpty()) + { + _Bitmap* pRefBitmap = (this->_sharedItem->lazyScaling && this->_sharedItem->scaledNativeBitmap.get()) ? this->_sharedItem->scaledNativeBitmap.get() : this->_sharedItem->nativeBitmap.get(); + + return pRefBitmap->IsNinePatchedBitmap(); + } + else + { + return HasNinePatchedBitmapTag(associatedFileName); + } +#endif +} + +void +_BitmapImpl::SetAsImmutable(void) +{ + if (INSTANCE_IS_VALID) + { + if (this->_sharedItem->isMutable) + { + BufferInfo bi; + + if (this->Lock(bi) == E_SUCCESS) + { + _Util::Pixmap dstImage(bi.width, bi.height, bi.bitsPerPixel, (void*)bi.pPixels, bi.pitch); + dstImage.ConvertPremultiplied(); + + this->Unlock(); + } + + this->_sharedItem->isMutable = false; + this->_sharedItem->nativeBitmap->__isPremultiplied = true; + + //?? this->_sharedItem->scaledNativeBitmap + } + } +} + +bool +_BitmapImpl::IsMutable(void) const +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, false, "This instance is not constructed yet."); + + return this->_sharedItem->isMutable; +} + +result +_BitmapImpl::Lock(BufferInfo& info, long timeout) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + _UpdateBitmapTimeStamp(*this); + + return this->_sharedItem->nativeBitmap->Lock(info, timeout); +} + +result +_BitmapImpl::Unlock() +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + result r = this->_sharedItem->nativeBitmap->Unlock(); + + _UpdateBitmapTimeStamp(*this); + + if ((r == E_SUCCESS) && (this->_sharedItem->lazyScaling)) + { + if (this->_sharedItem->scaledNativeBitmap.get()) + { + _UpdateScaledBitmapEx(this->_sharedItem->nativeBitmap.get(), this->_sharedItem->scaledNativeBitmap.get()); + this->_sharedItem->scaledNativeBitmap->UpdateOpaqueInfo(); + } + } + + return r; +} + +result +_BitmapImpl::LockFast(BufferInfo& info, long timeout) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + _UpdateBitmapTimeStamp(*this); + + return this->_sharedItem->nativeBitmap->LockFast(info, timeout); +} + +result +_BitmapImpl::UnlockFast() +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + result r = this->_sharedItem->nativeBitmap->UnlockFast(); + + _UpdateBitmapTimeStamp(*this); + + if ((r == E_SUCCESS) && (this->_sharedItem->lazyScaling)) + { + if (this->_sharedItem->scaledNativeBitmap.get()) + { + _UpdateScaledBitmapEx(this->_sharedItem->nativeBitmap.get(), this->_sharedItem->scaledNativeBitmap.get()); + } + } + + return r; +} + +bool +_BitmapImpl::CheckNinePatchedBitmapStrictly(const Bitmap& bitmap) +{ + const _BitmapImpl* pThis = _BitmapImpl::GetInstance(bitmap); + + if (!(IS_BITMAPIMPL_VALID(pThis))) + { + SysLog(NID_GRP, "[E_OPERATION_FAILED] The given bitmap is not constructed yet."); + return false; + } + + if (pThis->_sharedItem->associated.hasBeenDetectedByUsingName) + { + return pThis->_sharedItem->associated.determinedNinePatchedAtFirst; + } + + const Tizen::Base::String& associatedFileName = pThis->_sharedItem->associated.fileName; + + if (associatedFileName.IsEmpty()) + { + _Bitmap* pRefBitmap = (pThis->_sharedItem->lazyScaling && pThis->_sharedItem->scaledNativeBitmap.get()) ? pThis->_sharedItem->scaledNativeBitmap.get() : pThis->_sharedItem->nativeBitmap.get(); + + return pRefBitmap->IsNinePatchedBitmap(true); + } + else + { + bool ret = HasNinePatchedBitmapTag(associatedFileName); + + pThis->_sharedItem->associated.hasBeenDetectedByUsingName = true; + pThis->_sharedItem->associated.determinedNinePatchedAtFirst = ret; + + return ret; + } +} + +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 (* PostlockCallback)(BufferInfo&, void*), void* pPostlockCallbackParam) +{ + if (!(INSTANCE_IS_VALID)) + { + SysLog(NID_GRP, "[E_OPERATION_FAILED] This instance is not constructed yet."); + return false; + } + + _UpdateBitmapTimeStamp(*this); + + this->_sharedItem->pDestroyCallbackFunc = DestroyCallback; + this->_sharedItem->pDestroyCallbackParam = pDestroyCallbackParam; + + this->_sharedItem->pLockCallbackFunc = LockCallback; + this->_sharedItem->pLockCallbackParam = pLockCallbackParam; + + 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, PostlockCallback, pPostlockCallbackParam); + } + + if (this->_sharedItem->scaledNativeBitmap.get()) + { + this->_sharedItem->scaledNativeBitmap->SetCallback(LockCallback, pLockCallbackParam, UnlockCallback, pUnlockCallbackParam, PostlockCallback, pPostlockCallbackParam); + } + + return true; +} + +Bitmap* +_BitmapImpl::GetExpandedBitmapN(const Bitmap& ninePatchedBitmap, int width, int height) +{ + SysTryReturn(NID_GRP, width > 0 && height > 0, null, E_INVALID_ARG, "[E_INVALID_ARG] The given parameter is invalid (width = %d, height = %d)", width, height); + + SysTryReturn(NID_GRP, &ninePatchedBitmap, null, E_INVALID_ARG, "[E_INVALID_ARG] The given bitmap is invalid (null reference passed)"); + + const _BitmapImpl* pSrcBitmapImpl = _BitmapImpl::GetInstance(ninePatchedBitmap); + + SysTryReturn(NID_GRP, BITMAPIMPL_IS_VALID(pSrcBitmapImpl), null, E_INVALID_ARG, "[E_INVALID_ARG] The given bitmap is invalid"); + + SysTryReturn(NID_GRP, pSrcBitmapImpl->IsNinePatchedBitmap(), null, E_INVALID_ARG, "[E_INVALID_ARG] The given bitmap is not a nine-patched bitmap"); + + BitmapPixelFormat pixelFormat = pSrcBitmapImpl->GetPixelColorFormat(); + + switch (pixelFormat) + { + case BITMAP_PIXEL_FORMAT_RGB565: + case BITMAP_PIXEL_FORMAT_ARGB8888: + break; + default: + SysTryReturn(NID_GRP, false, null, E_UNSUPPORTED_FORMAT, "[E_UNSUPPORTED_FORMAT] Pixel format of the given bitmap is invalid (%d)", pixelFormat); + break; + } + + return _BitmapImpl::GetExpandedBitmapFN(ninePatchedBitmap, float(width), float (height)); +} + +Bitmap* +_BitmapImpl::GetExpandedBitmapFN(const Bitmap& ninePatchedBitmap, float width, float height) +{ + SysTryReturn(NID_GRP, width > 0.0f && height > 0.0f, null, E_INVALID_ARG, "[E_INVALID_ARG] The given parameter is invalid (width = %f, height = %f)", width, height); + + SysTryReturn(NID_GRP, &ninePatchedBitmap, null, E_INVALID_ARG, "[E_INVALID_ARG] The given bitmap is invalid (null reference passed)"); + + const _BitmapImpl* pSrcBitmapImpl = _BitmapImpl::GetInstance(ninePatchedBitmap); + + SysTryReturn(NID_GRP, BITMAPIMPL_IS_VALID(pSrcBitmapImpl), null, E_INVALID_ARG, "[E_INVALID_ARG] The given bitmap is invalid"); + + SysTryReturn(NID_GRP, pSrcBitmapImpl->IsNinePatchedBitmap(), null, E_INVALID_ARG, "[E_INVALID_ARG] The given bitmap is not a nine-patched bitmap"); + + BitmapPixelFormat pixelFormat = pSrcBitmapImpl->GetPixelColorFormat(); + + switch (pixelFormat) + { + case BITMAP_PIXEL_FORMAT_RGB565: + case BITMAP_PIXEL_FORMAT_ARGB8888: + break; + default: + SysTryReturn(NID_GRP, false, null, E_UNSUPPORTED_FORMAT, "[E_UNSUPPORTED_FORMAT] Pixel format of the given bitmap is invalid (%d)", pixelFormat); + break; + } + + std::auto_ptr expandedBitmap(new (std::nothrow) Bitmap); + + SysTryReturn(NID_GRP, expandedBitmap.get(), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed (new Bitmap)"); + + result r = expandedBitmap->Construct(FloatDimension(width, height), pixelFormat); + + SysTryReturn(NID_GRP, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + _BitmapImpl* pDstBitmapImpl = _BitmapImpl::GetInstance(*expandedBitmap.get()); + + SysAssert(pDstBitmapImpl != null); + + { + _Util::LockManager srcBitmap(*pSrcBitmapImpl); + _Util::LockManager dstBitmap(*pDstBitmapImpl); + + SysTryReturn(NID_GRP, srcBitmap.IsValid(), null, srcBitmap.GetResult(), "[%s] Buffer locking of the source bitmap failed", srcBitmap.GetResult()); + SysTryReturn(NID_GRP, dstBitmap.IsValid(), null, dstBitmap.GetResult(), "[%s] Buffer locking of the target bitmap failed", dstBitmap.GetResult()); + + if (dstBitmap.GetBufferInfo().width < srcBitmap.GetBufferInfo().width - 2 || + dstBitmap.GetBufferInfo().height < srcBitmap.GetBufferInfo().height - 2) + { + // down-scales from the source bitmap only + const BufferInfo& srcBufferInfo = srcBitmap.GetBufferInfo(); + const BufferInfo& dstBufferInfo = dstBitmap.GetBufferInfo(); + + memset(dstBufferInfo.pPixels, 0, dstBufferInfo.pitch * dstBufferInfo.height); + + _Util::Pixmap dstImage(dstBufferInfo.width, dstBufferInfo.height, dstBufferInfo.bitsPerPixel, (void*) dstBufferInfo.pPixels, dstBufferInfo.pitch); + + Rectangle sourRect(1, 1, srcBufferInfo.width - 2, srcBufferInfo.height - 2); + Rectangle destRect(0, 0, dstBufferInfo.width, dstBufferInfo.height); + + unsigned char* pSrcPixels = (unsigned char*) srcBufferInfo.pPixels + sourRect.y * srcBufferInfo.pitch + sourRect.x * (srcBufferInfo.bitsPerPixel / 8); + _Util::Pixmap srcImage(sourRect.width, sourRect.height, srcBufferInfo.bitsPerPixel, (void*) pSrcPixels, srcBufferInfo.pitch); + + Tizen::Graphics::_Effect::ScaleImage(dstImage, destRect.x, destRect.y, destRect.width, destRect.height, srcImage, Tizen::Graphics::_Effect::ROP_COPY); + } + else + { + const BufferInfo& srcBufferInfo = srcBitmap.GetBufferInfo(); + const BufferInfo& dstBufferInfo = dstBitmap.GetBufferInfo(); + + memset(dstBufferInfo.pPixels, 0, dstBufferInfo.pitch * dstBufferInfo.height); + + _Util::Pixmap dstImage(dstBufferInfo.width, dstBufferInfo.height, dstBufferInfo.bitsPerPixel, (void*) dstBufferInfo.pPixels, dstBufferInfo.pitch); + + _Util::AccumList<_Util::Pair<_Util::Rectangle, _Util::Rectangle > > boundsList; + + Rectangle destRect(0, 0, dstBufferInfo.width, dstBufferInfo.height); + + // assert(pSrcBitmapImpl->_nativeBitmap); + r = _Util::GetPatchList(boundsList, destRect, *pSrcBitmapImpl->_sharedItem->nativeBitmap.get()); + + SysTryReturn(NID_GRP, r == E_SUCCESS, null, E_SYSTEM, "[E_SYSTEM] _Util::GetPatchList() failed (error = %#x)", r); + + _Util::AccumList<_Util::Pair<_Util::Rectangle, _Util::Rectangle > >::Iterator iter = boundsList.Begin(); + + while (iter != boundsList.End()) + { + Rectangle destRect(iter->first.x, iter->first.y, iter->first.w, iter->first.h); + Rectangle sourRect(iter->second.x, iter->second.y, iter->second.w, iter->second.h); + + { + unsigned char* pSrcPixels = (unsigned char*) srcBufferInfo.pPixels + sourRect.y * srcBufferInfo.pitch + sourRect.x * (srcBufferInfo.bitsPerPixel / 8); + _Util::Pixmap srcImage(sourRect.width, sourRect.height, srcBufferInfo.bitsPerPixel, (void*) pSrcPixels, srcBufferInfo.pitch); + + Tizen::Graphics::_Effect::ScaleImage(dstImage, destRect.x, destRect.y, destRect.width, destRect.height, srcImage, Tizen::Graphics::_Effect::ROP_COPY); + } + + ++iter; + } + } + } + + return expandedBitmap.release(); +} + +Bitmap* +_BitmapImpl::GetColorReplacedBitmapN(const Bitmap& bitmap, const Color& replacedColor, const Color& newColor) +{ + SysTryReturn(NID_GRP, &bitmap, null, E_INVALID_ARG, "[E_INVALID_ARG] The given bitmap is invalid (null reference passed)"); + + std::auto_ptr pRetBitmap; + + { + Bitmap* pSrcBitmap = const_cast(&bitmap); + + BufferInfo biSrc; + pSrcBitmap->Lock(biSrc); + { + pRetBitmap.reset(_BitmapUtil::CreateBitmapN(Dimension(biSrc.width, biSrc.height), biSrc.bitsPerPixel)); + + if (pRetBitmap.get()) + { + BufferInfo biDst; + pRetBitmap->Lock(biDst); + + if ((biSrc.pitch == biDst.pitch) && (biSrc.height == biDst.height)) + { + memcpy(biDst.pPixels, biSrc.pPixels, biDst.pitch * biDst.height); + } + + pRetBitmap->Unlock(); + } + } + pSrcBitmap->Unlock(); + + SysTryReturn(NID_GRP, pRetBitmap.get(), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] New bitmap construction failed"); + } + + BufferInfo bufferInfo; + + result r = pRetBitmap->Lock(bufferInfo); + + SysTryReturn(NID_GRP, r == E_SUCCESS, null, E_SYSTEM, "[E_SYSTEM] The allocated bitmap cannot retrieve the own buffer address"); + + if (bufferInfo.bitsPerPixel == 32) + { + typedef unsigned long Pixel; + + Pixel keyColor = replacedColor.GetRGB32() & 0x00FFFFFF; + Pixel chgColor = newColor.GetRGB32() & 0x00FFFFFF; + Pixel* pBuffer = reinterpret_cast(bufferInfo.pPixels); + int padding = bufferInfo.pitch * 8 / bufferInfo.bitsPerPixel - bufferInfo.width; + + Pixel keyAlpha = (newColor.GetRGB32() & 0xFF000000) >> 24; + keyAlpha += (keyAlpha >> 7); + + if (keyAlpha < 256) + { + for (int y = 0; y < bufferInfo.height; y++) + { + for (int x = 0; x < bufferInfo.width; x++) + { + // if buffer.rgb = replacedColor.rgb then begin + // buffer.a <- buffer.a * newColor.a; + // buffer.r <- newColor.r; + // buffer.g <- newColor.g; + // buffer.b <- newColor.b; + // end if + + if ((*pBuffer & 0x00FFFFFF) == keyColor) + { + Pixel alpha = (*pBuffer >> 8) & 0x00FF0000; + alpha = (alpha * keyAlpha) & 0xFF000000; + + *pBuffer = alpha | chgColor; + } + + ++pBuffer; + } + + pBuffer += padding; + } + } + else + { + for (int y = 0; y < bufferInfo.height; y++) + { + for (int x = 0; x < bufferInfo.width; x++) + { + // if buffer.rgb = replacedColor.rgb then begin + // buffer.a <- buffer.a; + // buffer.r <- newColor.r; + // buffer.g <- newColor.g; + // buffer.b <- newColor.b; + // end if + + if ((*pBuffer & 0x00FFFFFF) == keyColor) + { + *pBuffer = (*pBuffer & 0xFF000000) | chgColor; + } + + ++pBuffer; + } + + pBuffer += padding; + } + } + } + else if (bufferInfo.bitsPerPixel == 16) + { + typedef unsigned short Pixel; + + Pixel keyColor = 0; + Pixel chgColor = 0; + Pixel* pBuffer = reinterpret_cast(bufferInfo.pPixels); + int padding = bufferInfo.pitch * 8 / bufferInfo.bitsPerPixel - bufferInfo.width; + + { + unsigned long color32 = replacedColor.GetRGB32(); + _Effect::Func::ConvertColorFormatFast(&keyColor, &color32); + } + + { + unsigned long color32 = newColor.GetRGB32() & 0x00FFFFFF; + _Effect::Func::ConvertColorFormatFast(&chgColor, &color32); + } + + for (int y = 0; y < bufferInfo.height; y++) + { + for (int x = 0; x < bufferInfo.width; x++) + { + if (*pBuffer == keyColor) + { + *pBuffer = chgColor; + } + + ++pBuffer; + } + + pBuffer += padding; + } + } + else + { + return null; + } + + pRetBitmap->Unlock(); + + return pRetBitmap.release(); +} + +Bitmap* +_BitmapImpl::CloneN(const Bitmap& bitmap) +{ + const _BitmapImpl* pSrcBitmapImpl = null; + _BitmapImpl* pDstBitmapImpl = null; + + // source bitmap verification + { + SysTryReturn(NID_GRP, &bitmap, null, E_INVALID_ARG, "[E_INVALID_ARG] The given bitmap is invalid (null reference passed)"); + + pSrcBitmapImpl = _BitmapImpl::GetInstance(bitmap); + + SysTryReturn(NID_GRP, IS_BITMAPIMPL_VALID(pSrcBitmapImpl), null, E_INVALID_ARG, "[E_INVALID_ARG] The given bitmap is invalid"); + } + + // destination bitmap allocation + std::auto_ptr pRetBitmap(new (std::nothrow) Bitmap); + + { + SysTryReturn(NID_GRP, pRetBitmap.get(), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed (new Bitmap)"); + + pDstBitmapImpl = _BitmapImpl::GetInstance(*pRetBitmap.get()); + + SysTryReturn(NID_GRP, pDstBitmapImpl && pDstBitmapImpl->_sharedItem.get() && !pDstBitmapImpl->_sharedItem->nativeBitmap->IsValid(), null, E_SYSTEM, "[E_SYSTEM] The allocated bitmap is invalid"); + } + + pDstBitmapImpl->_sharedItem = pSrcBitmapImpl->_sharedItem; + + return pRetBitmap.release(); +} + +_BitmapImpl* +_BitmapImpl::GetNonScaledBitmapImplN(const Tizen::Base::ByteBuffer& buffer, const Dimension& dim, BitmapPixelFormat pixelFormat) +{ + return _NonScale::CreateBitmapN(buffer, dim, pixelFormat); +} + +Bitmap* +_BitmapImpl::GetNonScaledBitmapN(const Tizen::Base::ByteBuffer& buffer, const Dimension& dim, BitmapPixelFormat pixelFormat) +{ + _BitmapImpl* pBitmapImpl = _BitmapImpl::GetNonScaledBitmapImplN(buffer, dim, pixelFormat); + + if (pBitmapImpl == null) + { + return null; + } + + return Tizen::Graphics::_BitmapUtil::CreateBitmapN(pBitmapImpl); +} + +Bitmap* +_BitmapImpl::GetNonScaledBitmapN(const Tizen::Base::ByteBuffer& buffer, const Dimension& dim, BitmapPixelFormat pixelFormat, const FloatDimension& logicalSize) +{ + Bitmap* pBitmap = GetNonScaledBitmapN(buffer, dim, pixelFormat); + + if (pBitmap) + { + _BitmapImpl* pBitmapImpl = _BitmapImpl::GetInstance(*pBitmap); + + if (pBitmapImpl) + { + pBitmapImpl->_sharedItem->coordHolder->size.vcFloat.w = logicalSize.width; + pBitmapImpl->_sharedItem->coordHolder->size.vcFloat.h = logicalSize.height; + } + else + { + delete pBitmap; + pBitmap = null; + } + } + + return pBitmap; +} + +bool +_BitmapImpl::HasNinePatchedBitmapTag(Tizen::Base::String fileName) +{ + const wchar_t* NINE_PATCHED_TAG = L".#.png"; // it must consist of lower-case characters + const int NINE_PATCHED_TAG_LENGTH = 6; + + struct Temp + { + static wchar_t ToLower(wchar_t ch) + { + return (ch >= L'A' && ch <= L'Z') ? ch + 'a' - 'A' : ch; + } + }; + + _Util::String tempStr(fileName.GetPointer(), fileName.GetLength()); + + while (tempStr.length > 0 && tempStr.pStart[tempStr.length - 1] == L' ') + { + --tempStr.length; + } + + _Util::String testStr(tempStr.pStart, tempStr.length, tempStr.length - NINE_PATCHED_TAG_LENGTH, NINE_PATCHED_TAG_LENGTH); + + if (testStr.length == NINE_PATCHED_TAG_LENGTH) + { + for (int i = 0; i < NINE_PATCHED_TAG_LENGTH; i++) + { + if (Temp::ToLower(testStr.pStart[i]) == NINE_PATCHED_TAG[i]) + { + continue; + } + + return false; + } + + return true; + } + + return false; +} + +void +_BitmapImpl::SetAsPremultiplied(void) +{ + if (IS_INSTANCE_VALID) + { + this->_sharedItem->isMutable = false; + this->_sharedItem->nativeBitmap->__isPremultiplied = true; + } +} + +void +_BitmapImpl::SetAsNonpremultiplied(void) +{ + if (IS_INSTANCE_VALID) + { + this->_sharedItem->isMutable = true; + this->_sharedItem->nativeBitmap->__isPremultiplied = false; + } +} + +result +_BitmapImpl::ConvertToNonpremultiplied(Bitmap& bitmap, bool forceConversion) +{ + _BitmapImpl* pImpl = null; + + // bitmap verification + { + SysTryReturn(NID_GRP, &bitmap, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The given bitmap is invalid (null reference passed)"); + + pImpl = _BitmapImpl::GetInstance(bitmap); + + SysTryReturn(NID_GRP, IS_BITMAPIMPL_VALID(pImpl), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The given bitmap is invalid"); + } + + if (!forceConversion) + { + SysTryReturn(NID_GRP, !pImpl->_sharedItem->isMutable, E_INVALID_CONDITION, E_INVALID_CONDITION, "[E_INVALID_CONDITION] The given bitmap is already non-premultipied"); + } + + { + BufferInfo bi; + + if (pImpl->Lock(bi) == E_SUCCESS) + { + _Util::Pixmap dstImage(bi.width, bi.height, bi.bitsPerPixel, (void*)bi.pPixels, bi.pitch); + dstImage.isPremultiplied = true; + dstImage.ConvertNonpremultiplied(); + + pImpl->Unlock(); + } + + pImpl->_sharedItem->isMutable = true; + pImpl->_sharedItem->nativeBitmap->__isPremultiplied = false; + + //?? this->_sharedItem->scaledNativeBitmap + } + + return E_SUCCESS; +} + +_BitmapImpl*& +_BitmapImpl::_GetBitmapImpl(Bitmap* pBitmap) +{ + return pBitmap->__pImpl; +} + +_BitmapImpl* +_BitmapImpl::GetInstance(Bitmap& bitmap) +{ + return (&bitmap != null) ? bitmap.__pImpl : null; +} + +const _BitmapImpl* +_BitmapImpl::GetInstance(const Bitmap& bitmap) +{ + return (&bitmap != null) ? bitmap.__pImpl : null; +} + +bool +_BitmapImpl::__CheckValidity(bool canBufferExpand) +{ + if (this->_sharedItem.get()) + { + if (this->_sharedItem->nativeBitmap->IsValid()) + { + return true; + } + + if (!this->_sharedItem->associated.fileName.IsEmpty()) + { + if (canBufferExpand) + { + if (!__RealizeBuffer()) + { + // linkedFileName does not exist or is not a image file. + this->Construct(Dimension(1, 1), BITMAP_PIXEL_FORMAT_ARGB8888); + } + + this->_sharedItem->associated.fileName.Clear(); + } + + return true; + } + } + + return false; +} + +bool +_BitmapImpl::__RealizeBuffer(void) +{ + int imageWidth = 0; + int imageHeight = 0; + + Tizen::Media::MediaPixelFormat format = Tizen::Media::MEDIA_PIXEL_FORMAT_BGRA8888; + + // The following does not consider the case of big-endian + switch (this->_sharedItem->associated.pixelFormat) + { + case BITMAP_PIXEL_FORMAT_RGB565: + format = Tizen::Media::MEDIA_PIXEL_FORMAT_RGB565LE; + break; + case BITMAP_PIXEL_FORMAT_R8G8B8A8: + format = Tizen::Media::MEDIA_PIXEL_FORMAT_RGBA8888; + break; + case BITMAP_PIXEL_FORMAT_ARGB8888: + default: + format = Tizen::Media::MEDIA_PIXEL_FORMAT_BGRA8888; + break; + } + + std::auto_ptr pImageBuffer(Tizen::Media::_ImageDecoder::DecodeToBufferN(this->_sharedItem->associated.fileName, format, imageWidth, imageHeight)); + + if (pImageBuffer.get() == null) + { + return false; + } + + std::auto_ptr<_BitmapImpl> pTempBitmapImpl(_BitmapImpl::GetNonScaledBitmapImplN(*pImageBuffer, Dimension(imageWidth, imageHeight), this->_sharedItem->associated.pixelFormat)); + + if (pTempBitmapImpl.get() == null || pTempBitmapImpl->_sharedItem.get() == null) + { + return false; + } + + pImageBuffer.reset(); + + this->_sharedItem->Move(*(pTempBitmapImpl->_sharedItem.get())); + + return true; +} + +result +_BitmapImpl::__Scale(const float width, const float height) +{ + result r = E_SUCCESS; + + _Util::Dimension vcUtilDimF = { width, height }; + _BitmapCoordinateHolder tempCoordinateHolder; + + tempCoordinateHolder.ResetFromVc(vcUtilDimF); + + Dimension vcDim(tempCoordinateHolder.size.vcInt.w, tempCoordinateHolder.size.vcInt.h); + + if (_ResUtil::NeedToConvertCoord()) + { + if (this->_sharedItem->lazyScaling && this->_sharedItem->scaledNativeBitmap.get()) + { + r = this->_sharedItem->nativeBitmap->Scale(vcDim); + + if (!IsFailed(r)) + { + Dimension pcDim(tempCoordinateHolder.size.pcInt.w, tempCoordinateHolder.size.pcInt.h); + + r = this->_sharedItem->scaledNativeBitmap->Scale(pcDim); + + if (!IsFailed(r)) + { + _UpdateScaledBitmapEx(this->_sharedItem->nativeBitmap.get(), this->_sharedItem->scaledNativeBitmap.get()); + } + // @ykahn If it fails, then how to undo its status. + } + } + else + { + Dimension pcDim(tempCoordinateHolder.size.pcInt.w, tempCoordinateHolder.size.pcInt.h); + + r = this->_sharedItem->nativeBitmap->Scale(pcDim); + } + } + else + { + r = this->_sharedItem->nativeBitmap->Scale(vcDim); + } + + if (r == E_SUCCESS) + { + memcpy(this->_sharedItem->coordHolder.get(), &tempCoordinateHolder, sizeof(tempCoordinateHolder)); + } + + return r; +} + +void _BitmapImpl::_SharedItem::Move(_BitmapImpl::_SharedItem& source) +{ + std::swap(this->nativeBitmap, source.nativeBitmap); + std::swap(this->coordHolder, source.coordHolder); + std::swap(this->lazyScaling, source.lazyScaling); + std::swap(this->scaledNativeBitmap, source.scaledNativeBitmap); + std::swap(this->isMutable, source.isMutable); +} + +}} // Tizen::Graphics diff --git a/src/graphics/FGrp_BitmapScreenCapture.cpp b/src/graphics/FGrp_BitmapScreenCapture.cpp new file mode 100644 index 0000000..712a233 --- /dev/null +++ b/src/graphics/FGrp_BitmapScreenCapture.cpp @@ -0,0 +1,209 @@ +// +// 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_BitmapScreenCapture.cpp + * @brief This is the cpp file for BitmapScreenCapture. + * + */ + +#include +#include + +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + +#include "FGrp_Callback.h" + + +namespace // unnamed +{ + Window + GetEvasWindow(void) + { + Ecore_Evas* pEcoreEvas = static_cast(Tizen::Graphics::_GetDefaultFrameEcoreEvasHandle()); + + if (pEcoreEvas == null) + { + return BadWindow; + } + + return (Window) ecore_evas_window_get(pEcoreEvas); + } +} + +namespace Tizen { namespace Graphics +{ + +bool +_GetScreenShot(int depth, unsigned char*& pOutBuffer, int& screenWidth, int& screenHeight) +{ + // check input parameter + { + switch (depth) + { + case 32: + break; + case 16: + default: + return false; + } + + // pBuffer should be NULL pointer + if (pOutBuffer != NULL) + { + return false; + } + } + + unsigned char* pTempBuffer = 0; + + Display* pDisplay = XOpenDisplay(NULL); + int displayWidth = DisplayWidth(pDisplay, DefaultScreen(pDisplay)); + int displayHeight = DisplayHeight(pDisplay, DefaultScreen(pDisplay)); + + // Can not use a root window --> RootWindow(pDisplay, DefaultScreen(pDisplay)) + Window root = GetEvasWindow(); + + XShmSegmentInfo shmInfo; + XImage* pXimage = XShmCreateImage(pDisplay, DefaultVisualOfScreen(DefaultScreenOfDisplay(pDisplay)), 24, ZPixmap, + NULL, &shmInfo, (unsigned int) displayWidth, (unsigned int) displayHeight); + if (pXimage == NULL) + { + goto CLEAN_UP; + } + + shmInfo.shmid = shmget(IPC_PRIVATE, pXimage->bytes_per_line * pXimage->height, IPC_CREAT | 0777); + + pXimage->data = (char*) shmat(shmInfo.shmid, 0, 0); + shmInfo.shmaddr = pXimage->data; + shmInfo.readOnly = False; + + if (!XShmAttach(pDisplay, &shmInfo)) + { + goto CLEAN_UP; + } + + if (!XShmGetImage(pDisplay, root, pXimage, 0, 0, AllPlanes)) + { + goto CLEAN_UP; + } + + XSync(pDisplay, False); + + // Apply screen rotation + { +#if 0 + char* rot_buffer; + Atom atom_rotaion; + int rotate; + + atom_rotaion = XInternAtom(dpy, "X_SCREEN_ROTATION", True); + + if (!atom_rotaion || !getXwindowProperty(root, atom_rotaion, XA_CARDINAL, (unsigned char*) &rotate, 1)) + { + rotate = RR_Rotate_0; + } + + if (rotate == RR_Rotate_90 || rotate == RR_Rotate_270) + { + rot_buffer = calloc(ximage->bytes_per_line * ximage->height, 1); + + convert_image((uint32_t*) ximage->data, + (uint32_t*) rot_buffer, + PIXMAN_x8b8g8r8, PIXMAN_x8b8g8r8, + height, width, width, height, + (rotate == RR_Rotate_90) ? 90 : 270); + + ret = rot_buffer; + } + + // assign buffer + { + //?? + } + + // release + if (rot_buffer) + { + free(rot_buffer); + rot_buffer = NULL; + } +#endif + } + + // copy from the captured buffer + { + int bufferSize = pXimage->bytes_per_line * pXimage->height; + + pTempBuffer = new (std::nothrow) unsigned char[bufferSize]; + + if (pTempBuffer == NULL) + { + goto CLEAN_UP; + } + + memcpy(pTempBuffer, pXimage->data, bufferSize); + } + + // result + pOutBuffer = pTempBuffer; + screenWidth = pXimage->width; + screenHeight = pXimage->height; + + // release the captured buffer + { + XShmDetach(pDisplay, &shmInfo); + shmdt(shmInfo.shmaddr); + shmctl(shmInfo.shmid, IPC_RMID, NULL); + + XDestroyImage(pXimage); + pXimage = NULL; + + XCloseDisplay(pDisplay); + } + + return true; + +CLEAN_UP: + delete[] pTempBuffer; + + if (pXimage) + { + XShmDetach(pDisplay, &shmInfo); + shmdt(shmInfo.shmaddr); + shmctl(shmInfo.shmid, IPC_RMID, NULL); + + XDestroyImage(pXimage); + pXimage = NULL; + } + + XCloseDisplay(pDisplay); + + return false; +} + +}} // Tizen::Graphics diff --git a/src/graphics/FGrp_BitmapTool.cpp b/src/graphics/FGrp_BitmapTool.cpp new file mode 100644 index 0000000..44a8b15 --- /dev/null +++ b/src/graphics/FGrp_BitmapTool.cpp @@ -0,0 +1,53 @@ +// +// 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_BitmapTool.cpp + * @brief This is the cpp file for internal util class. + * + */ + +#include "FGrp_BitmapTool.h" +#include "FGrp_BitmapUtil.h" + + +namespace Tizen { namespace Graphics +{ + +result +_BitmapTool::ChangeBuffer(Tizen::Graphics::Bitmap& srcBitmap, void* pBuffer, long bytesPerLine, void (* DestroyCallback)(void*), void* pCallbackParam) +{ + return _BitmapUtil::ChangeBuffer(srcBitmap, pBuffer, bytesPerLine, DestroyCallback, pCallbackParam); +} + +bool +_BitmapTool::SetCallback(Tizen::Graphics::Bitmap& bitmap, + void (* DestroyCallback)(void*), void* pCallbackParam, + void (* LockCallback)(void*), void* pLockParam, + void (* UnlockCallback)(void*), void* pUnlockParam, + void (* PostlockCallback)(Tizen::Graphics::BufferInfo& bufferInfo, void*), void* pPostlockParam) +{ + return _BitmapUtil::SetCallback(bitmap, DestroyCallback, pCallbackParam, LockCallback, pLockParam, UnlockCallback, pUnlockParam, PostlockCallback, pPostlockParam); +} + +void +_BitmapTool::ResetCallback(Tizen::Graphics::Bitmap& bitmap) +{ + _BitmapUtil::ResetCallback(bitmap); +} + +}} // Tizen::Graphics diff --git a/src/graphics/FGrp_BitmapUtil.cpp b/src/graphics/FGrp_BitmapUtil.cpp new file mode 100644 index 0000000..8b30214 --- /dev/null +++ b/src/graphics/FGrp_BitmapUtil.cpp @@ -0,0 +1,287 @@ +// +// 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_BitmapUtil.cpp + * @brief This is the cpp file for internal util class. + * + */ + +#include +#include + +#include + +#include + +#include "FGrp_BitmapUtil.h" +#include "FGrp_Bitmap.h" +#include "FGrp_ResUtil.h" +#include "util/FGrp_UtilTemplate.h" + + +namespace Tizen { namespace Graphics +{ + +unsigned long _GetBitmapTimeStamp(const Tizen::Graphics::_BitmapImpl& bitmap); +unsigned long _UpdateBitmapTimeStamp(Tizen::Graphics::_BitmapImpl& bitmap); + +_BitmapTemp::_BitmapTemp(Canvas& canvas) + : _BitmapImpl() + , __isValid(false) +{ + BufferInfo canvasDesc; + result r = canvas.Lock(canvasDesc); + + if (r == E_SUCCESS) + { + { + // + // ykahn 2011/07/25 + // + int pixelPerLine = canvasDesc.pitch / (canvasDesc.bitsPerPixel / 8); + + // 'pitch' can be a negative value + pixelPerLine = (pixelPerLine >= 0) ? pixelPerLine : -pixelPerLine; + + // new width = max(pixelPerLine, canvasDesc.width) + canvasDesc.width = (pixelPerLine > canvasDesc.width) ? pixelPerLine : canvasDesc.width; + } + + this->_sharedItem->nativeBitmap->Construct((void*) canvasDesc.pPixels, canvasDesc.width, canvasDesc.height, + canvasDesc.bitsPerPixel); + + _Util::Dimension vcDimF = { canvas.GetBoundsF().width, canvas.GetBoundsF().height }; + _Util::Dimension vcDim = { canvas.GetBounds().width, canvas.GetBounds().height }; + _Util::Dimension pcDim = { canvasDesc.width, canvasDesc.height }; + + this->_sharedItem->coordHolder->ResetFromPc(pcDim, vcDim, vcDimF); + + canvas.Unlock(); + + __isValid = true; + } +} + +_BitmapTemp::_BitmapTemp(void* pBuffer, int width, int height, int depth) + : _BitmapImpl() + , __isValid(false) +{ + if (pBuffer == null || width <= 0 || height <= 0 || !(depth == 16 || depth == 32)) + { + return; + } + + result r = this->_sharedItem->nativeBitmap->Construct((void*) pBuffer, width, height, depth); + + if (r != E_SUCCESS) + { + return; + } + + _Util::Dimension pcDim = { width, height }; + + this->_sharedItem->coordHolder->ResetFromPc(pcDim); + + __isValid = true; +} + +_BitmapTemp::_BitmapTemp(Dimension physicalSize, int depth) + : _BitmapImpl() + , __isValid(false) +{ + if (physicalSize.width <= 0 || physicalSize.height <= 0 || !(depth == 16 || depth == 32)) + { + return; + } + + result r = this->_sharedItem->nativeBitmap->Construct(physicalSize, (depth == 32) ? BITMAP_PIXEL_FORMAT_ARGB8888 : BITMAP_PIXEL_FORMAT_RGB565); + + if (r != E_SUCCESS) + { + return; + } + + _Util::Dimension pcDim = { physicalSize.width, physicalSize.height }; + + this->_sharedItem->coordHolder->ResetFromPc(pcDim); + + __isValid = true; +} + +_BitmapTemp::~_BitmapTemp() +{ +} + +bool +_BitmapTemp::IsValid(void) +{ + return __isValid; +} + +//////////////////////////////////////////////////////////////////////////////// + +unsigned long +Tizen::Graphics::_BitmapUtil::GetTimeStamp(const Tizen::Graphics::Bitmap& bitmap) +{ + const Tizen::Graphics::_BitmapImpl* pBitmapImpl = Tizen::Graphics::_BitmapImpl::GetInstance(bitmap); + + if (pBitmapImpl) + { + return _GetBitmapTimeStamp(*pBitmapImpl); + } + + return 0; +} + +unsigned long +Tizen::Graphics::_BitmapUtil::UpdateTimeStamp(Tizen::Graphics::Bitmap& bitmap) +{ + Tizen::Graphics::_BitmapImpl* pBitmapImpl = Tizen::Graphics::_BitmapImpl::GetInstance(bitmap); + + if (pBitmapImpl) + { + return _UpdateBitmapTimeStamp(*pBitmapImpl); + } + + return 0; +} + +Tizen::Graphics::Bitmap* +Tizen::Graphics::_BitmapUtil::CreateBitmapN(_BitmapImpl* pBitmapImpl) +{ + if (pBitmapImpl == null) + { + return 0; + } + + 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] Memory allocation failed."); + + // change the implentation instance of Bitmap class + { + // exception of ICLS-CLSIF-03 + class _BitmapImplHack + : public _BitmapImpl + { + public: + static _BitmapImpl*& GetBitmapImplRef(Bitmap* pBitmap) + { + return _BitmapImpl::_GetBitmapImpl(pBitmap); + } + }; // _BitmapImplHack + + Tizen::Graphics::_BitmapImpl*& pRefBitmapImpl = _BitmapImplHack::GetBitmapImplRef(bitmap.get()); + + delete pRefBitmapImpl; + pRefBitmapImpl = pBitmapImpl; + } + + return bitmap.release(); +} + +Tizen::Graphics::Bitmap* +Tizen::Graphics::_BitmapUtil::CreateBitmapN(void* pBuffer, int width, int height, int depth) +{ + 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] Memory allocation failed."); + + Tizen::Graphics::Bitmap* pBitmap = Tizen::Graphics::_BitmapUtil::CreateBitmapN(bitmapTemp.get()); + + if (pBitmap) + { + // abandon ownership + bitmapTemp.release(); + } + + return pBitmap; +} + +Tizen::Graphics::Bitmap* +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] Memory allocation failed."); + + Tizen::Graphics::Bitmap* pBitmap = Tizen::Graphics::_BitmapUtil::CreateBitmapN(bitmapTemp.get()); + + if (pBitmap) + { + // abandon ownership + bitmapTemp.release(); + } + + return pBitmap; +} + +result +Tizen::Graphics::_BitmapUtil::ChangeBuffer(Tizen::Graphics::Bitmap& srcBitmap, void* pBuffer, long bytesPerLine, void (* DestroyCallback)(void*), void* pCallbackParam) +{ + if (_BitmapImpl::GetInstance(srcBitmap) == null) + { + return E_SYSTEM; + } + + _Bitmap* pNativeBitmap = _GetBitmapEx(srcBitmap); + + if (pNativeBitmap == null) + { + return E_SYSTEM; + } + + if (!SetCallback(srcBitmap, DestroyCallback, pCallbackParam, null, null, null, null, null, null)) + { + return E_SYSTEM; + } + + pNativeBitmap->AssignUserBuffer((unsigned char*) pBuffer, bytesPerLine); + + return E_SUCCESS; +} + +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 (* 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, PostlockCallback, pPostlockParam) : false; +} + +void +Tizen::Graphics::_BitmapUtil::ResetCallback(Tizen::Graphics::Bitmap& bitmap) +{ + Tizen::Graphics::_BitmapImpl* pBitmapImpl = _BitmapImpl::GetInstance(bitmap); + + _BitmapImplHack* pBitmapImplHack = static_cast <_BitmapImplHack*>(pBitmapImpl); + + if (pBitmapImplHack) + { + pBitmapImplHack->ResetCallback(); + } +} + +}} // Tizen::Graphics diff --git a/src/graphics/FGrp_BitmapUtil.h b/src/graphics/FGrp_BitmapUtil.h new file mode 100644 index 0000000..748c489 --- /dev/null +++ b/src/graphics/FGrp_BitmapUtil.h @@ -0,0 +1,222 @@ +// +// 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_BitmapUtil.h + * @brief This is the header file for _BitmapUtil namespace. + * + */ + +#ifndef _FGRP_INTERNAL_BITMAPUTIL_H_ +#define _FGRP_INTERNAL_BITMAPUTIL_H_ + +#include + +#include + +#include "FGrp_BitmapImpl.h" +#include "FGrp_BitmapCoordHolder.h" + + +namespace Tizen { namespace Graphics +{ + +namespace _BitmapUtil +{ + +unsigned long GetTimeStamp(const Tizen::Graphics::Bitmap& bitmap); + +unsigned long UpdateTimeStamp(Tizen::Graphics::Bitmap& bitmap); + +// the ownership of 'bitmapImpl' moves to the new Bitmap instance +Bitmap* CreateBitmapN(Tizen::Graphics::_BitmapImpl* bitmapImpl); + +// it doesn't move the ownership of 'pBuffer' +Bitmap* CreateBitmapN(void* pBuffer, int width, int height, int depth); + +// This function can create a raw bitmap from physical size +Bitmap* CreateBitmapN(Dimension physicalSize, int depth); + +// This function changes the buffer of the specified bitmap to the user defined buffer +// The user buffer size MUST be same as the original bitmap size +result ChangeBuffer(Tizen::Graphics::Bitmap& srcBitmap, void* pBuffer, long bytesPerLine, void (* DestroyCallback)(void*), void* pCallbackParam); + +bool SetCallback(Tizen::Graphics::Bitmap& bitmap, + void (* DestroyCallback)(void*), void* pCallbackParam, + void (* LockCallback)(void*), void* pLockParam, + void (* UnlockCallback)(void*), void* pUnlockParam, + void (* PostlockCallback)(Tizen::Graphics::BufferInfo& bufferInfo, void*), void* pPostlockParam); + +void ResetCallback(Tizen::Graphics::Bitmap& bitmap); + +} // Tizen::Graphics::_BitmapUtil + + +class _BitmapTemp + : public _BitmapImpl +{ +public: + _BitmapTemp(Canvas& canvas); + _BitmapTemp(void* pBuffer, int width, int height, int depth); + _BitmapTemp(Dimension physicalSize, int depth); + + virtual ~_BitmapTemp(); + + bool IsValid(void); + +private: + bool __isValid; + +}; // _BitmapTemp + +}} // Tizen::Graphics + + +namespace Tizen { namespace Graphics +{ + +class _BitmapImplHack + : public _BitmapImpl +{ +public: + _Bitmap* GetBitmapEx(void) const + { + return (this && this->_sharedItem.get()) ? this->_sharedItem->nativeBitmap.get() : 0; + } + + _Bitmap* GetScaledBitmapEx(void) const + { + return (this && this->_sharedItem.get()) ? this->_sharedItem->scaledNativeBitmap.get() : 0; + } + + bool IsLazyScalingBitmap(void) const + { + return (this && this->_sharedItem.get()) ? (this->_sharedItem->lazyScaling != 0) : false; + } + + bool IsLazyScalingBitmap(Tizen::Graphics::Dimension& virSize, Tizen::Graphics::Dimension& phySize) const + { + if (this->_sharedItem.get() == 0 || this->_sharedItem->lazyScaling == 0) + { + return false; + } + + virSize.width = this->_sharedItem->coordHolder->size.vcInt.w; + virSize.height = this->_sharedItem->coordHolder->size.vcInt.h; + phySize.width = this->_sharedItem->coordHolder->size.pcInt.w; + phySize.height = this->_sharedItem->coordHolder->size.pcInt.h; + + return true; + } + + bool SetCallback(void (* DestroyCallback)(void*), void* pDestroyCallbackParam, + void (* LockCallback)(void*), void* pLockCallbackParam, + 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, PostlockCallback, pPostlockCallbackParam); + } + + void ResetCallback(void) + { + if (this->_sharedItem.get() == 0) + { + return; + } + + this->_sharedItem->pDestroyCallbackFunc = null; + this->_sharedItem->pDestroyCallbackParam = null; + this->_sharedItem->pLockCallbackFunc = null; + this->_sharedItem->pLockCallbackParam = null; + this->_sharedItem->pUnlockCallbackFunc = null; + this->_sharedItem->pUnlockCallbackParam = null; + this->_sharedItem->pPostlockCallbackFunc = null; + this->_sharedItem->pPostlockCallbackParam = null; + } + +}; // _BitmapImplHack + +inline _Bitmap* +_GetBitmapEx(const Tizen::Graphics::_BitmapImpl& bitmap) +{ + const _BitmapImplHack* pBitmapImplHack = static_cast (&bitmap); + + return (pBitmapImplHack) ? pBitmapImplHack->GetBitmapEx() : null; +} + +inline _Bitmap* +_GetScaledBitmapEx(const Tizen::Graphics::_BitmapImpl& bitmap) +{ + const _BitmapImplHack* pBitmapImplHack = static_cast (&bitmap); + + return (pBitmapImplHack) ? pBitmapImplHack->GetScaledBitmapEx() : null; +} + +inline bool +_IsLazyScalingBitmap(const Tizen::Graphics::_BitmapImpl& bitmap) +{ + const _BitmapImplHack* pBitmapImplHack = static_cast (&bitmap); + + return (pBitmapImplHack) ? pBitmapImplHack->IsLazyScalingBitmap() : false; +} + +inline bool +_IsLazyScalingBitmap(const Tizen::Graphics::_BitmapImpl& bitmap, Tizen::Graphics::Dimension& virSize, + Tizen::Graphics::Dimension& phySize) +{ + const _BitmapImplHack* pBitmapImplHack = static_cast (&bitmap); + + return (pBitmapImplHack) ? pBitmapImplHack->IsLazyScalingBitmap(virSize, phySize) : false; +} + +}} // Tizen::Graphics + +namespace Tizen { namespace Graphics +{ + +inline _Bitmap* +_GetBitmapEx(const Tizen::Graphics::Bitmap& bitmap) +{ + return _GetBitmapEx(*_BitmapImpl::GetInstance(bitmap)); +} + +inline _Bitmap* +_GetScaledBitmapEx(const Tizen::Graphics::Bitmap& bitmap) +{ + return _GetScaledBitmapEx(*_BitmapImpl::GetInstance(bitmap)); +} + +inline bool +_IsLazyScalingBitmap(const Tizen::Graphics::Bitmap& bitmap) +{ + return _IsLazyScalingBitmap(*_BitmapImpl::GetInstance(bitmap)); +} + +inline bool +_IsLazyScalingBitmap(const Tizen::Graphics::Bitmap& bitmap, Tizen::Graphics::Dimension& virSize, Tizen::Graphics::Dimension& phySize) +{ + return _IsLazyScalingBitmap(*_BitmapImpl::GetInstance(bitmap), virSize, phySize); +} + +}} // Tizen::Graphics + +#endif // _FGRP_INTERNAL_BITMAPUTIL_H_ diff --git a/src/graphics/FGrp_BufferInfoImpl.cpp b/src/graphics/FGrp_BufferInfoImpl.cpp new file mode 100644 index 0000000..f9e27b8 --- /dev/null +++ b/src/graphics/FGrp_BufferInfoImpl.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 FGrp_BufferInfoImpl.cpp + * @brief This is the implementation file for %_BufferInfoImpl class. + * + */ + +#include + +#include "FGrp_BufferInfoImpl.h" + + +namespace Tizen { namespace Graphics +{ + +_BufferInfoImpl::_BufferInfoImpl() + : __handleType(HANDLE_TYPE_NONE) + , __handle(INVALID_BUFFER_HANDLE) + , __pUserData(null) + , __orientation(ORIENTATION_PORTRAIT) + , __rotation(ROTATION_0) +{ +} + +_BufferInfoImpl::_BufferInfoImpl(const _BufferInfoImpl& src) + : __handleType(src.__handleType) + , __handle(src.__handle) + , __pUserData(src.__pUserData) + , __orientation(src.__orientation) + , __rotation(ROTATION_0) +{ +} + +_BufferInfoImpl::~_BufferInfoImpl() +{ +} + +_BufferInfoImpl& +_BufferInfoImpl::operator =(const _BufferInfoImpl& rhs) +{ + if (this == &rhs) + { + return *this; + } + + this->__handle = rhs.__handle; + this->__orientation = rhs.__orientation; + + return *this; +} + +int +_BufferInfoImpl::GetHandle(HandleType handleType) const +{ + switch (handleType) + { + 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: + return INVALID_BUFFER_HANDLE; + } +} + +void* +_BufferInfoImpl::GetUserData(HandleType handleType) const +{ + switch (handleType) + { + case HANDLE_TYPE_OVERLAY_REGION: + return __pUserData; + default: + return null; + } +} + +void +_BufferInfoImpl::SetHandle(HandleType handleType, int handle, void* pUserData) +{ + switch (handleType) + { + case HANDLE_TYPE_NONE: + __handleType = HANDLE_TYPE_NONE; + __handle = INVALID_BUFFER_HANDLE; + __pUserData = null; + break; + case HANDLE_TYPE_OVERLAY_REGION: + case HANDLE_TYPE_VE_SURFACE: + case HANDLE_TYPE_CANVAS_TEXTURE: + case HANDLE_TYPE_NATIVE_PIXMAP: + __handleType = handleType; + __handle = handle; + __pUserData = pUserData; + break; + } +} + +_BufferInfoImpl::Orientation +_BufferInfoImpl::GetOrientation(void) const +{ + return __orientation; +} + +void +_BufferInfoImpl::SetOrientation(_BufferInfoImpl::Orientation orientation) +{ + if (orientation >= ORIENTATION_PORTRAIT && orientation <= ORIENTATION_LANDSCAPE_REVERSE) + { + __orientation = orientation; + } + else + { + __orientation = ORIENTATION_PORTRAIT; + } +} + +Rectangle +_BufferInfoImpl::GetBounds(void) const +{ + return __bounds; +} + +void +_BufferInfoImpl::SetBounds(const Rectangle& bounds) +{ + __bounds.x = bounds.x; + __bounds.y = bounds.y; + __bounds.width = bounds.width; + __bounds.height = bounds.height; +} + +_BufferInfoImpl::Rotation +_BufferInfoImpl::GetRotation(void) const +{ + return __rotation; +} + +void +_BufferInfoImpl::SetRotation(_BufferInfoImpl::Rotation rotation) +{ + if (rotation >= ROTATION_0 && rotation <= ROTATION_270) + { + __rotation = rotation; + } + else + { + __rotation = ROTATION_0; + } +} + +_BufferInfoImpl* +_BufferInfoImpl::GetInstance(BufferInfo& bufferInfo) +{ + return (&bufferInfo != null) ? bufferInfo.__pImpl : null; +} + +const _BufferInfoImpl* +_BufferInfoImpl::GetInstance(const BufferInfo& bufferInfo) +{ + return (&bufferInfo != null) ? bufferInfo.__pImpl : null; +} + +}} // Tizen::Graphics + diff --git a/src/graphics/FGrp_Callback.cpp b/src/graphics/FGrp_Callback.cpp new file mode 100644 index 0000000..b625d69 --- /dev/null +++ b/src/graphics/FGrp_Callback.cpp @@ -0,0 +1,48 @@ +// +// 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_Callback.cpp + * @brief This is the implementation file for the callback functions in Tizen::Graphics namespace. + * + */ + +#include "FGrp_Callback.h" + +namespace Tizen { namespace Graphics +{ + void* (*_GetDefaultFrameEcoreEvasHandle)(void) = _GetNull; + void* (*_GetDefaultFrameEvasHandle)(void) = _GetNull; + Color (*_GetDefaultForegroundColor)(void) = _GetBlack; + Color (*_GetDefaultBackgroundColor)(void) = _GetWhite; + + void* _GetNull(void) + { + return 0; + } + + Color _GetWhite(void) + { + return Color(0xFFFFFFFF); + } + + Color _GetBlack(void) + { + return Color(0xFF000000); + } + +}} // Tizen::Graphics diff --git a/src/graphics/FGrp_Callback.h b/src/graphics/FGrp_Callback.h new file mode 100644 index 0000000..790c58f --- /dev/null +++ b/src/graphics/FGrp_Callback.h @@ -0,0 +1,42 @@ +// +// 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_Callback.h + * @brief This is the header file for the callback functions in Tizen::Graphics namespace. + * + */ + +#ifndef _FGRP_INTERNAL_CALLBACK_H_ +#define _FGRP_INTERNAL_CALLBACK_H_ + +#include + +namespace Tizen { namespace Graphics +{ + extern void* (*_GetDefaultFrameEcoreEvasHandle)(void); + extern void* (*_GetDefaultFrameEvasHandle)(void); + extern Color (*_GetDefaultForegroundColor)(void); + extern Color (*_GetDefaultBackgroundColor)(void); + + void* _GetNull(void); + Color _GetWhite(void); + Color _GetBlack(void); + +}} // Tizen::Graphics + +#endif // _FGRP_INTERNAL_CALLBACK_H_ diff --git a/src/graphics/FGrp_Canvas.cpp b/src/graphics/FGrp_Canvas.cpp new file mode 100644 index 0000000..5ccaef1 --- /dev/null +++ b/src/graphics/FGrp_Canvas.cpp @@ -0,0 +1,4433 @@ +// +// 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_Canvas.cpp + * @brief This is the implementation file for _Canvas class. + * + */ + +#include +#include + +#include +#include + +#include + +#include + +#include + +#include +#include + +#include + +#include "FGrp_BufferInfoImpl.h" +#include "FGrp_Callback.h" +#include "FGrp_Canvas.h" +#include "FGrp_CanvasGpPrimitive.h" +#include "FGrp_CanvasRasterOp.h" +#include "FGrp_Bitmap.h" +#include "FGrp_Font.h" +#include "FGrp_Screen.h" +#include "FGrp_ResUtil.h" +#include "FGrp_CanvasCairo.h" +#include "FGrp_CanvasPixman.h" +#include "util/FGrp_Util.h" +#include "effect/FGrp_Effect.h" + +//////////////////////////////////////////////////////////////////////////////// + +#if !defined(M_PI) +#define M_PI 3.14159265358979323846 +#endif + +#define USE_CAIRO + +//////////////////////////////////////////////////////////////////////////////// + +#define SET_CAIRO_ALL_PROPERTIES \ + _Cairo::SetComposite(pCairo->pCairo, _ConvertParam(this->__compositeMode)); \ + _Cairo::SetDash(pCairo->pCairo, this->__dashData.pattern.Begin(), int(this->__dashData.pattern.Size()), this->__dashData.offset); \ + _Cairo::SetLineCap(pCairo->pCairo, _ConvertParam(this->__lineCapStyle)); \ + _Cairo::SetLineJoin(pCairo->pCairo, _ConvertParam(this->__lineJoinStyle)); \ + if (this->__isClipBoundsSet) \ + { \ + _Cairo::SetClip(pCairo->pCairo, this->__clipBounds.x, this->__clipBounds.y, this->__clipBounds.width, this->__clipBounds.height); \ + } + +#define RESET_CAIRO_ALL_PROPERTIES \ + _Cairo::ResetComposite(pCairo->pCairo); \ + _Cairo::ResetDash(pCairo->pCairo); \ + _Cairo::ResetLineCap(pCairo->pCairo); \ + _Cairo::ResetLineJoin(pCairo->pCairo); \ + if (this->__isClipBoundsSet) \ + { \ + _Cairo::ResetClip(pCairo->pCairo); \ + } + +#define SET_CAIRO_FILL_PROPERTIES \ + _Cairo::SetComposite(pCairo->pCairo, _ConvertParam(this->__compositeMode)); \ + if (this->__isClipBoundsSet) \ + { \ + _Cairo::SetClip(pCairo->pCairo, this->__clipBounds.x, this->__clipBounds.y, this->__clipBounds.width, this->__clipBounds.height); \ + } + +#define RESET_CAIRO_FILL_PROPERTIES \ + _Cairo::ResetComposite(pCairo->pCairo); \ + if (this->__isClipBoundsSet) \ + { \ + _Cairo::ResetClip(pCairo->pCairo); \ + } + + + +//////////////////////////////////////////////////////////////////////////////// + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Base::Utility; + +//////////////////////////////////////////////////////////////////////////////// +// internal utility + +namespace +{ + +template +Dest _ConvertParam(Sour val); + +template<> +Tizen::Graphics::_Effect::Rop +_ConvertParam(Tizen::Graphics::_Canvas::BlendOption blendOption) +{ + switch (blendOption) + { + case Tizen::Graphics::_Canvas::BLEND_COPY: + return Tizen::Graphics::_Effect::ROP_COPY; + case Tizen::Graphics::_Canvas::BLEND_ALPHABLEND: + return Tizen::Graphics::_Effect::ROP_ALPHABLEND; + default: + return Tizen::Graphics::_Effect::ROP_ALPHABLEND; + } +} + +template<> +cairo_operator_t +_ConvertParam(Tizen::Graphics::CompositeMode compositeMode) +{ + switch (compositeMode) + { + case Tizen::Graphics::COMPOSITE_MODE_CLEAR: + return CAIRO_OPERATOR_CLEAR; + case Tizen::Graphics::COMPOSITE_MODE_SRC: + return CAIRO_OPERATOR_SOURCE; + case Tizen::Graphics::COMPOSITE_MODE_DST: + return CAIRO_OPERATOR_DEST; + case Tizen::Graphics::COMPOSITE_MODE_SRC_OVER: + return CAIRO_OPERATOR_OVER; + case Tizen::Graphics::COMPOSITE_MODE_DST_OVER: + return CAIRO_OPERATOR_DEST_OVER; + case Tizen::Graphics::COMPOSITE_MODE_SRC_IN: + return CAIRO_OPERATOR_IN; + case Tizen::Graphics::COMPOSITE_MODE_DST_IN: + return CAIRO_OPERATOR_DEST_IN; + case Tizen::Graphics::COMPOSITE_MODE_SRC_OUT: + return CAIRO_OPERATOR_OUT; + case Tizen::Graphics::COMPOSITE_MODE_DST_OUT: + return CAIRO_OPERATOR_DEST_OUT; + case Tizen::Graphics::COMPOSITE_MODE_SRC_ATOP: + return CAIRO_OPERATOR_ATOP; + case Tizen::Graphics::COMPOSITE_MODE_DST_ATOP: + return CAIRO_OPERATOR_DEST_ATOP; + case Tizen::Graphics::COMPOSITE_MODE_DST_XOR: + return CAIRO_OPERATOR_XOR; + case Tizen::Graphics::COMPOSITE_MODE_ADD: + return CAIRO_OPERATOR_ADD; + case Tizen::Graphics::COMPOSITE_MODE_SATURATE: + return CAIRO_OPERATOR_SATURATE; + case Tizen::Graphics::COMPOSITE_MODE_MULTIPLY: + return CAIRO_OPERATOR_MULTIPLY; + case Tizen::Graphics::COMPOSITE_MODE_SCREEN: + return CAIRO_OPERATOR_SCREEN; + case Tizen::Graphics::COMPOSITE_MODE_OVERLAY: + return CAIRO_OPERATOR_OVERLAY; + case Tizen::Graphics::COMPOSITE_MODE_DARKEN: + return CAIRO_OPERATOR_DARKEN; + case Tizen::Graphics::COMPOSITE_MODE_LIGHTEN: + return CAIRO_OPERATOR_LIGHTEN; + default: + return CAIRO_OPERATOR_OVER; + } +} + +template<> +cairo_line_cap_t +_ConvertParam(Tizen::Graphics::LineCapStyle lineCapStyle) +{ + switch (lineCapStyle) + { + case Tizen::Graphics::LINE_CAP_STYLE_BUTT: + return CAIRO_LINE_CAP_BUTT; + case Tizen::Graphics::LINE_CAP_STYLE_ROUND: + return CAIRO_LINE_CAP_ROUND; + case Tizen::Graphics::LINE_CAP_STYLE_SQUARE: + return CAIRO_LINE_CAP_SQUARE; + default: + return CAIRO_LINE_CAP_ROUND; + } +} + +template<> +cairo_line_join_t +_ConvertParam(Tizen::Graphics::LineJoinStyle lineJoinStyle) +{ + switch (lineJoinStyle) + { + case Tizen::Graphics::LINE_JOIN_STYLE_BEVEL: + return CAIRO_LINE_JOIN_BEVEL; + case Tizen::Graphics::LINE_JOIN_STYLE_ROUND: + return CAIRO_LINE_JOIN_ROUND; + case Tizen::Graphics::LINE_JOIN_STYLE_MITER: + return CAIRO_LINE_JOIN_MITER; + default: + return CAIRO_LINE_JOIN_ROUND; + } +} + +inline unsigned short +_ConvertRGB888ToRGB565(unsigned char red, unsigned char green, unsigned char blue) +{ + typedef unsigned short ColorType; + + return (ColorType(red >> 3) << 11) | (ColorType(green >> 2) << 5) | ColorType(blue >> 3); +} + +Evas_Object* +_GetWindowSourceObject(Handle handle) +{ + Evas_Object* pSourceObject = evas_object_image_source_get((Evas_Object*) handle); + + return (pSourceObject) ? pSourceObject : (Evas_Object*) handle; +} + +int +_GetWindowWidth(Handle handle) +{ + int width = 0; + int height = 0; + + evas_object_image_size_get(_GetWindowSourceObject(handle), &width, &height); + + return width; +} + +int +_GetWindowHeight(Handle handle) +{ + int width = 0; + int height = 0; + + evas_object_image_size_get(_GetWindowSourceObject(handle), &width, &height); + + return height; +} + +/////////////////////////////////////////////// +// class _GenericBufferFrameBuffer + +template +class _GenericBufferFrameBuffer + : public Tizen::Graphics::_Util::GenericBufferBase +{ +public: + _GenericBufferFrameBuffer(Handle handle, int _width, int _height) + { + this->__pAssociatedBuffer = this->_pBuffer = (Pixel*) evas_object_image_data_get(_GetWindowSourceObject(handle), EINA_TRUE); + + int pitch = evas_object_image_stride_get(_GetWindowSourceObject(handle)) / int(sizeof(Pixel)); + pitch = (pitch) ? pitch : _width; + + if (this->_pBuffer == null) + { + SysLog(NID_GRP, "[] evas_object_image_data_get(%d) failed!", handle); + } + + this->_pitch = pitch; + this->_padding = this->_pitch - _width; + this->_rect.x = 0; + this->_rect.y = 0; + this->_rect.w = _width; + this->_rect.h = _height; + this->_pHandle = reinterpret_cast(handle); + + this->__associatedHandle = handle; + this->__hasOwnership = false; + } + + _GenericBufferFrameBuffer(Handle handle, int _x, int _y, int _width, int _height, int pitch) + { + this->__pAssociatedBuffer = this->_pBuffer = (Pixel*) evas_object_image_data_get(_GetWindowSourceObject(handle), EINA_TRUE); + + if (pitch == 0) + { + pitch = evas_object_image_stride_get(_GetWindowSourceObject(handle)) / int(sizeof(Pixel)); + pitch = (pitch) ? pitch : _GetWindowWidth(handle); + } + + if (this->_pBuffer == null) + { + SysLog(NID_GRP, "[] evas_object_image_data_get(%d) failed!", handle); + } + + this->_pBuffer += (_y * pitch + _x); + + this->_pitch = pitch; + this->_padding = this->_pitch - _width; + this->_rect.x = _x; + this->_rect.y = _y; + this->_rect.w = _width; + this->_rect.h = _height; + this->_pHandle = reinterpret_cast(handle); + + this->__associatedHandle = handle; + this->__hasOwnership = false; + } + + _GenericBufferFrameBuffer(int width, int height) + : __pAssociatedBuffer(0) + { + this->_pBuffer = new (std::nothrow) Pixel[width * height]; + + if (this->_pBuffer == null) + { + width = 0; + height = 0; + } + + this->_pitch = width; + this->_padding = this->_pitch - width; + this->_rect.x = 0; + this->_rect.y = 0; + this->_rect.w = width; + this->_rect.h = height; + this->_pHandle = 0; + + this->__associatedHandle = 0; + this->__hasOwnership = (this->_pBuffer != null); + } + + _GenericBufferFrameBuffer(Pixel* pBuffer, int width, int height, int pitch) + : __pAssociatedBuffer(0) + { + this->_pBuffer = pBuffer; + + this->_pitch = pitch; + this->_padding = this->_pitch - width; + this->_rect.x = 0; + this->_rect.y = 0; + this->_rect.w = width; + this->_rect.h = height; + this->_pHandle = 0; + + this->__associatedHandle = 0; + this->__hasOwnership = false; + } + + virtual ~_GenericBufferFrameBuffer(void) + { + if (this->__associatedHandle != 0 && this->__pAssociatedBuffer != null) + { + //evas_object_image_data_set(_GetWindowSourceObject(this->__associatedHandle), this->__pAssociatedBuffer); + } + + if (this->__hasOwnership) + { + delete[] this->_pBuffer; + this->_pBuffer = 0; + } + } + +private: + _GenericBufferFrameBuffer(const _GenericBufferFrameBuffer&); + _GenericBufferFrameBuffer& operator =(const _GenericBufferFrameBuffer&); + + void* __pAssociatedBuffer; + Handle __associatedHandle; + bool __hasOwnership; + +}; + +} + + +namespace +{ + +enum _ClipResult +{ + CLIP_REJECT, // Clipped rejected + CLIP_CLIPPED, // Clipped accepted + CLIP_ACCEPT // Accepted +}; + +_ClipResult +_ClipRectangle(int& srcX, int& srcY, int& srcW, int& srcH, int clipX, int clipY, int clipW, int clipH) +{ + if (clipW <= 0 || clipH <= 0) + { + return CLIP_REJECT; + } + + _ClipResult returnValue = CLIP_ACCEPT; + + int srcEndX = srcX + srcW - 1; + int srcEndY = srcY + srcH - 1; + int clipEndX = clipX + clipW - 1; + int clipEndY = clipY + clipH - 1; + + if (srcX > clipEndX || srcEndX < clipX) + { + return CLIP_REJECT; + } + + if (srcY > clipEndY || srcEndY < clipY) + { + return CLIP_REJECT; + } + + if (srcX < clipX) + { + srcX = clipX; + + returnValue = CLIP_CLIPPED; + } + + if (srcEndX > clipEndX) + { + srcEndX = clipEndX; + + returnValue = CLIP_CLIPPED; + } + + if (srcY < clipY) + { + srcY = clipY; + + returnValue = CLIP_CLIPPED; + } + + if (srcEndY > clipEndY) + { + srcEndY = clipEndY; + + returnValue = CLIP_CLIPPED; + } + + srcW = srcEndX - srcX + 1; + srcH = srcEndY - srcY + 1; + + return returnValue; +} + +unsigned long +_ComposeColor(unsigned long color32, int opacity) +{ + unsigned char alpha = (unsigned char) (((color32) >> 24)); + unsigned char red = (unsigned char) (((color32) >> 16)); + unsigned char green = (unsigned char) (((color32) >> 8)); + unsigned char blue = (unsigned char) ((color32)); + + alpha = (unsigned char) ((alpha * opacity + 255) >> 8); + red = (unsigned char) ((red * opacity + 255) >> 8); + green = (unsigned char) ((green * opacity + 255) >> 8); + blue = (unsigned char) ((blue * opacity + 255) >> 8); + + return (unsigned long) (((unsigned long) (alpha) << 24) | ((unsigned long) (red) << 16) | ((unsigned long) (green) << 8) | (unsigned long) (blue)); +} + +template +void +_ClearRectangleWithClip(Tizen::Graphics::_Util::ScratchPad* pScratchPad, Pixel color, const Tizen::Graphics::_Util::Rectangle& rect, const Tizen::Graphics::_Util::Rectangle& clip) +{ + if (pScratchPad == null) + { + return; + } + + // clipping + int x1 = rect.x; + int y1 = rect.y; + int x2 = x1 + rect.w; + int y2 = y1 + rect.h; + + x1 = (x1 >= clip.x) ? x1 : clip.x; + y1 = (y1 >= clip.y) ? y1 : clip.y; + + x2 = (x2 <= clip.x + clip.w) ? x2 : clip.x + clip.w; + y2 = (y2 <= clip.y + clip.h) ? y2 : clip.y + clip.h; + + if ((x2 - x1) > 0 && (y2 - y1) > 0) + { + pScratchPad->FillRect(x1, y1, x2 - x1, y2 - y1, color); + } +} + +template +void +_FillRectangleWithClip(Tizen::Graphics::_Util::ScratchPad* pScratchPad, Pixel color, const Tizen::Graphics::_Util::Rectangle& rect, const Tizen::Graphics::_Util::Rectangle& clip) +{ + if (pScratchPad == null) + { + return; + } + + // alpha-fill-rect() applied + pScratchPad->RegisterFillRect(Tizen::Graphics::_RasterOp::FnFillRectAlpha32Bit); + _ClearRectangleWithClip(pScratchPad, color, rect, clip); + pScratchPad->RegisterFillRect(null); +} + +} + +namespace +{ + +typedef Tizen::Graphics::_Canvas::SystemPixel _SystemPixel; +typedef Tizen::Graphics::_Util::ScratchPad<_SystemPixel> _ScratchPad32; + +} + +//////////////////////////////////////////////////////////////////////////////// +// Tizen::Graphics::_Canvas + +namespace Tizen { namespace Graphics +{ + +bool _CanvasShowFromMemory(int xDest, int yDest, int xSour, int ySour, int wSour, int hSour, void* pMemory, int width, int height, int depth, int bytesPerLine); +void _FlushCanvas(void); + +namespace +{ + +void +_ApplySrcBitmapAttrib(_Util::Pixmap& srcImage, const _Bitmap& bitmap, long isOpaque) +{ + Color maskingColor; + + if (bitmap.GetBitsPerPixel() == 16) + { + if (bitmap.GetMaskingColor(maskingColor) == E_SUCCESS) + { + srcImage.enableColorKey = 1; + srcImage.colorKey = _ConvertRGB888ToRGB565(maskingColor.GetRed(), maskingColor.GetGreen(), maskingColor.GetBlue()); + } + } + + srcImage.isOpaque = isOpaque; + srcImage.isPremultiplied = bitmap.IsPremultiplied(); +} + +// retrieving bounds rectangle which has (0,0,w,h). +Rectangle +_GetBoundsRel(const _Canvas& canvas) +{ + Rectangle rect = canvas.GetBounds(); + rect.x = 0; + rect.y = 0; + + return rect; +} +} + +void +_FillRectangleWithClip32(_Util::ScratchPad* pScratchPad, unsigned long color, const _Util::Rectangle& rect, const _Util::Rectangle& clip) +{ + _FillRectangleWithClip(pScratchPad, color, rect, clip); +} + +struct _NativeGfxEngine +{ + cairo_t* pCairo; + cairo_surface_t* pCairoSurface; + + _NativeGfxEngine() + : pCairo(0) + , pCairoSurface(0) + { + } + ~_NativeGfxEngine() + { + if (pCairo) + { + cairo_destroy(pCairo); + } + + if (pCairoSurface) + { + cairo_surface_destroy(pCairoSurface); + } + } +}; + + +_Canvas::_Canvas(void) + : _magicKey(0) + , _pNativeGfxEngine(static_cast(new (std::nothrow)_NativeGfxEngine)) + , __pParent(0) + , __pFont(0) + , __pPriorityFont(0) + , __windowHandle(INVALID_HANDLE) + , __blendOption(Tizen::Graphics::_Canvas::BLEND_ALPHABLEND) + , __pSurface(0) + , __pScratchPad(0) + , __xBufferPos(0) + , __yBufferPos(0) + , __pBuffer(0) + , __fgColor(0xFFFFFFFF) + , __bgColor(0x00000000) + , __fgOpacity(255) + , __bgOpacity(255) + , __lineWidth(1) + , __lineStyle(LINE_STYLE_SOLID) + , __lineCapStyle(LINE_CAP_STYLE_ROUND) + , __lineJoinStyle(LINE_JOIN_STYLE_ROUND) + , __isClipBoundsSet(false) + , __textOrigin(TEXT_ORIGIN_LEFT_TOP) + , __bitmapDrawingQuality(BITMAP_DRAWING_QUALITY_LOW) + , __compositeMode(COMPOSITE_MODE_SRC_OVER) + , __useStableRenderer(false) +{ + __fgColorNative = Color(__fgColor); + __bgColorNative = Color(__bgColor); + + __dashData.offset = 0; + + __ComposeFgColor(); + __ComposeBgColor(); + + _Util::CarveMagicKey(*this, _magicKey); +} + +_Canvas::~_Canvas(void) +{ + delete __pScratchPad; + delete __pSurface; + + if (_pNativeGfxEngine) + { + delete static_cast<_NativeGfxEngine*>(_pNativeGfxEngine); + } + + _Util::EraseMagicKey(*this, _magicKey); +} + +result +_Canvas::Construct(void) +{ + return this->Construct(Rectangle(0, 0, _Screen::GetWidth(), _Screen::GetHeight())); +} + +result +_Canvas::Construct(const Rectangle& rect) +{ + result r = E_SUCCESS; + + _GenericBufferFrameBuffer* pTemp = new (std::nothrow) _GenericBufferFrameBuffer(rect.width, rect.height); + + SysTryReturnResult(NID_GRP, pTemp, E_OUT_OF_MEMORY, " _GenericBufferFrameBuffer<> cannot be allocated."); + + this->__pSurface = new (std::nothrow) _Util::GenericBuffer(pTemp); + + SysTryCatch(NID_GRP, this->__pSurface, delete pTemp; + r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] _Util::GenericBuffer<> cannot be allocated."); + + this->__pBuffer = (unsigned long*) __pSurface->GetBufferAddr(); + this->__pScratchPad = new (std::nothrow) _Util::ScratchPad(__pBuffer, rect.width, rect.height, rect.width); + + SysTryCatch(NID_GRP, this->__pScratchPad, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] _Util::ScratchPad<> cannot be allocated."); + + this->__pScratchPad->FillRect(0, 0, this->__pScratchPad->GetWidth(), this->__pScratchPad->GetHeight(), 0x00000000); + + this->__xBufferPos = rect.x; + this->__yBufferPos = rect.y; + +#if defined(USE_CAIRO) + { + _NativeGfxEngine* pCairo = static_cast<_NativeGfxEngine*>(_pNativeGfxEngine); + + if (pCairo) + { + pCairo->pCairoSurface = cairo_image_surface_create_for_data((unsigned char*) this->__pBuffer, CAIRO_FORMAT_ARGB32, rect.width, rect.height, rect.width * 4); + pCairo->pCairo = cairo_create(pCairo->pCairoSurface); + } + } +#endif + + __InitFgBgColorFromTheme(); + + return E_SUCCESS; + +CATCH: + delete this->__pScratchPad; + this->__pScratchPad = null; + + delete this->__pSurface; + this->__pSurface = null; + + return r; +} + +result +_Canvas::Construct(Handle windowHandle) +{ + return this->Construct(windowHandle, Rectangle(0, 0, _GetWindowWidth(windowHandle), _GetWindowHeight(windowHandle))); +} + +result +_Canvas::Construct(Handle windowHandle, const Rectangle& rect) +{ + SysTryReturnResult(NID_GRP, rect.width >= 0 && rect.height >= 0, E_OUT_OF_RANGE, "The given rectangle(width:%d,height:%d) is out of range.\n", rect.width, rect.height); + + result r = E_SUCCESS; + + int x1 = rect.x; + int y1 = rect.y; + int x2 = x1 + rect.width; + int y2 = y1 + rect.height; + + if (x1 < 0) + { + x1 = 0; + } + + if (y1 < 0) + { + y1 = 0; + } + + if (x2 > _GetWindowWidth(windowHandle)) + { + x2 = _GetWindowWidth(windowHandle); + } + + if (y2 > _GetWindowHeight(windowHandle)) + { + y2 = _GetWindowHeight(windowHandle); + } + + SysTryReturnResult(NID_GRP, (x2 - x1 >= 0) && (y2 - y1 >= 0), E_OUT_OF_RANGE, "The given rectangle(x1:%d,y1:%d,x2:%d,y2:%d) is out of range.", x1, y1, x2, y2); + + int bufferWidth = x2 - x1; + int bufferHeight = y2 - y1; + int sourcePitch = 0; + + _GenericBufferFrameBuffer* pTemp = new (std::nothrow) _GenericBufferFrameBuffer(windowHandle, x1, y1, bufferWidth, bufferHeight, 0); + + SysTryReturnResult(NID_GRP, pTemp, E_OUT_OF_MEMORY, "_GenericBufferFrameBuffer<> cannot be allocated."); + + SysTryCatch(NID_GRP, !(pTemp->GetBufferAddr() == null && bufferWidth > 0 && bufferHeight > 0), delete pTemp; r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] The associated Evas buffer is NULL."); + + this->__pSurface = new (std::nothrow) _Util::GenericBuffer(pTemp); + + SysTryCatch(NID_GRP, this->__pSurface, delete pTemp; r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] _Util::GenericBuffer<> cannot be allocated."); + + this->__pBuffer = (unsigned long*) __pSurface->GetBufferAddr(); + sourcePitch = __pSurface->GetPitch(); + + this->__pScratchPad = new (std::nothrow) _Util::ScratchPad(__pBuffer, bufferWidth, bufferHeight, sourcePitch); + + SysTryCatch(NID_GRP, this->__pScratchPad, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] _Util::ScratchPad<> cannot be allocated."); + + this->__windowHandle = windowHandle; + + this->__xBufferPos = x1; + this->__yBufferPos = y1; + +#if defined(USE_CAIRO) + { + _NativeGfxEngine* pCairo = static_cast<_NativeGfxEngine*>(_pNativeGfxEngine); + + if (pCairo) + { + pCairo->pCairoSurface = cairo_image_surface_create_for_data((unsigned char*) this->__pBuffer, CAIRO_FORMAT_ARGB32, bufferWidth, bufferHeight, sourcePitch * 4); + pCairo->pCairo = cairo_create(pCairo->pCairoSurface); + } + } +#endif + + __InitFgBgColorFromTheme(); + + return E_SUCCESS; + +CATCH: + delete this->__pScratchPad; + this->__pScratchPad = null; + + delete this->__pSurface; + this->__pSurface = null; + + return r; +} + +result +_Canvas::Construct(_Canvas* pSourceCanvas, const Rectangle& subRegion) +{ + SysTryReturnResult(NID_GRP, pSourceCanvas, E_INVALID_ARG, "The source canvas is invalid"); + + SysTryReturnResult(NID_GRP, pSourceCanvas->IsValid(), E_INVALID_ARG, "The source canvas is invalid"); + + result r = E_SUCCESS; + + int x1 = subRegion.x; + int y1 = subRegion.y; + int x2 = x1 + subRegion.width; + int y2 = y1 + subRegion.height; + + if (x1 < 0) + { + x1 = 0; + } + + if (y1 < 0) + { + y1 = 0; + } + + if (x2 > pSourceCanvas->GetBounds().width) + { + x2 = pSourceCanvas->GetBounds().width; + } + + if (y2 > pSourceCanvas->GetBounds().height) + { + y2 = pSourceCanvas->GetBounds().height; + } + + SysTryReturnResult(NID_GRP, (x2 - x1 > 0) && (y2 - y1 > 0), E_OUT_OF_RANGE, "The given rectangle(x1:%d,y1:%d,x2:%d,y2:%d) is out of range.", subRegion.x, subRegion.y, subRegion.width, subRegion.height); + + int bufferWidth = x2 - x1; + int bufferHeight = y2 - y1; + + int sourcePitch = pSourceCanvas->__pSurface->GetPitch(); + + if (pSourceCanvas->__windowHandle != INVALID_HANDLE) + { + _GenericBufferFrameBuffer* pTemp = new (std::nothrow) _GenericBufferFrameBuffer(pSourceCanvas->__windowHandle, x1, y1, bufferWidth, bufferHeight, sourcePitch); + + SysTryReturnResult(NID_GRP, pTemp, E_OUT_OF_MEMORY, "_GenericBufferFrameBuffer<> cannot be allocated."); + + if (pTemp->GetBufferAddr() == null && bufferWidth > 0 && bufferHeight > 0) + { + delete pTemp; + SysTryReturnResult(NID_GRP, false, E_SYSTEM, "The associated Evas buffer is NULL."); + } + + this->__pSurface = new (std::nothrow) _Util::GenericBuffer(pTemp); + + if (this->__pSurface == null) + { + delete pTemp; + SysTryReturnResult(NID_GRP, false, E_OUT_OF_MEMORY, "_Util::GenericBuffer<> cannot be allocated."); + } + } + else + { + SystemPixel* pBuffer = pSourceCanvas->__pSurface->GetBufferAddr(); + pBuffer += y1 * sourcePitch + x1; + + _GenericBufferFrameBuffer* pTemp = new (std::nothrow) _GenericBufferFrameBuffer(pBuffer, bufferWidth, bufferHeight, sourcePitch); + + SysTryReturnResult(NID_GRP, pTemp, E_OUT_OF_MEMORY, "_GenericBufferFrameBuffer<> cannot be allocated."); + + this->__pSurface = new (std::nothrow) _Util::GenericBuffer(pTemp); + + if (this->__pSurface == null) + { + delete pTemp; + SysTryReturnResult(NID_GRP, false, E_OUT_OF_MEMORY, "_Util::GenericBuffer<> cannot be allocated."); + } + } + + this->__pBuffer = (unsigned long*) __pSurface->GetBufferAddr(); + this->__pScratchPad = new (std::nothrow) _Util::ScratchPad(__pBuffer, bufferWidth, bufferHeight, sourcePitch); + + SysTryCatch(NID_GRP, this->__pScratchPad, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] _Util::ScratchPad<> cannot be allocated."); + + this->__pParent = pSourceCanvas; + this->__xBufferPos = x1; + this->__yBufferPos = y1; + + // duplicate + // must re-assign by _CanvasImpl::GetSubCanvasN() + this->__pFont = pSourceCanvas->__pFont; + + this->__pPriorityFont = pSourceCanvas->__pPriorityFont; + + // copy directly + this->__windowHandle = pSourceCanvas->__windowHandle; + this->__blendOption = pSourceCanvas->__blendOption; + this->__fgColor = pSourceCanvas->__fgColor; + this->__bgColor = pSourceCanvas->__bgColor; + this->__fgColorNative = pSourceCanvas->__fgColorNative; + this->__bgColorNative = pSourceCanvas->__bgColorNative; + this->__fgOpacity = pSourceCanvas->__fgOpacity; + this->__bgOpacity = pSourceCanvas->__bgOpacity; + this->__lineWidth = pSourceCanvas->__lineWidth; + this->__lineStyle = pSourceCanvas->__lineStyle; + + // copy exception + this->__isClipBoundsSet = false; + this->__clipBounds = Rectangle(0, 0, bufferWidth, bufferHeight); + +#if defined(USE_CAIRO) + { + _NativeGfxEngine* pCairo = static_cast<_NativeGfxEngine*>(_pNativeGfxEngine); + + if (pCairo) + { + pCairo->pCairoSurface = cairo_image_surface_create_for_data((unsigned char*) this->__pBuffer, CAIRO_FORMAT_ARGB32, bufferWidth, bufferHeight, sourcePitch * 4); + pCairo->pCairo = cairo_create(pCairo->pCairoSurface); + } + } +#endif + + return E_SUCCESS; + +CATCH: + delete this->__pScratchPad; + this->__pScratchPad = null; + + delete this->__pSurface; + this->__pSurface = null; + + return r; +} + +result +_Canvas::Construct(const BufferInfo& bufferInfo) +{ + // all parameters checked + + result r = E_SUCCESS; + + _GenericBufferFrameBuffer* pTemp = new (std::nothrow) _GenericBufferFrameBuffer(static_cast(bufferInfo.pPixels), bufferInfo.width, bufferInfo.height, bufferInfo.pitch * 8 / bufferInfo.bitsPerPixel); + + SysTryReturnResult(NID_GRP + , pTemp + , E_OUT_OF_MEMORY + , " _GenericBufferFrameBuffer<> cannot be allocated."); + + this->__pSurface = new (std::nothrow) _Util::GenericBuffer(pTemp); + + SysTryCatch(NID_GRP + , this->__pSurface + , delete pTemp; r = E_OUT_OF_MEMORY + , E_OUT_OF_MEMORY + , "[E_OUT_OF_MEMORY] _Util::GenericBuffer<> cannot be allocated."); + + this->__pBuffer = (unsigned long*) __pSurface->GetBufferAddr(); + this->__pScratchPad = new (std::nothrow) _Util::ScratchPad(__pBuffer, bufferInfo.width, bufferInfo.height, bufferInfo.pitch * 8 / bufferInfo.bitsPerPixel); + + SysTryCatch(NID_GRP + , this->__pScratchPad + , r = E_OUT_OF_MEMORY + , E_OUT_OF_MEMORY + , "[E_OUT_OF_MEMORY] _Util::ScratchPad<> cannot be allocated."); + + this->__xBufferPos = 0; + this->__yBufferPos = 0; + +#if defined(USE_CAIRO) + { + _NativeGfxEngine* pCairo = static_cast<_NativeGfxEngine*>(_pNativeGfxEngine); + + if (pCairo) + { + pCairo->pCairoSurface = cairo_image_surface_create_for_data((unsigned char*) this->__pBuffer, CAIRO_FORMAT_ARGB32, bufferInfo.width, bufferInfo.height, bufferInfo.pitch); + pCairo->pCairo = cairo_create(pCairo->pCairoSurface); + } + } +#endif + + __InitFgBgColorFromTheme(); + + return E_SUCCESS; + +CATCH: + delete this->__pScratchPad; + this->__pScratchPad = null; + + delete this->__pSurface; + this->__pSurface = null; + + return r; +} + +bool +_Canvas::IsValid() const +{ + return (this && this->__pSurface); +} + +result +_Canvas::Clear(void) +{ + if (this->__isClipBoundsSet) + { + _Util::Rectangle clip = + { + this->__clipBounds.x, + this->__clipBounds.y, + this->__clipBounds.width, + this->__clipBounds.height + }; + + _Util::Rectangle rect = + { + 0, + 0, + __pScratchPad->GetWidth(), + __pScratchPad->GetHeight() + }; + + _ClearRectangleWithClip(__pScratchPad, __bgColor, rect, clip); + } + else + { + __pScratchPad->FillRect(0, 0, __pScratchPad->GetWidth(), __pScratchPad->GetHeight(), __bgColor); + } + + return E_SUCCESS; +} + +result +_Canvas::Clear(const Rectangle& rect) +{ + if ((rect.width == 0) || (rect.height == 0)) + { + return E_SUCCESS; + } + + if (this->__isClipBoundsSet) + { + _Util::Rectangle clip = + { + this->__clipBounds.x, + this->__clipBounds.y, + this->__clipBounds.width, + this->__clipBounds.height + }; + + _Util::Rectangle rect1 = + { + rect.x, + rect.y, + rect.width, + rect.height + }; + + _ClearRectangleWithClip(__pScratchPad, __bgColor, rect1, clip); + } + else + { + __pScratchPad->FillRect(rect.x, rect.y, rect.width, rect.height, __bgColor); + } + + return E_SUCCESS; +} + +result +_Canvas::Copy(const Point& destPoint, const _Canvas& canvas, const Rectangle& srcRect) +{ + // special case + if (srcRect.width == 0 || srcRect.height == 0) + { + return E_SUCCESS; + } + + return this->__Copy(destPoint, canvas, srcRect); +} + +result +_Canvas::Copy(const Rectangle& destRect, const _Canvas& canvas, const Rectangle& srcRect) +{ + // special case + if (srcRect.width == 0 || srcRect.height == 0 || destRect.width == 0 || destRect.height == 0) + { + return E_SUCCESS; + } + + return this->__Copy(destRect, canvas, srcRect); +} + +result +_Canvas::Copy(const Point& destPoint, const _Canvas& canvas, const Rectangle& srcRect, CompositeMode compositeMode) +{ + _Util::LockManager srcLock(canvas); + _Util::LockManager dstLock(*this); + + SysTryReturnResult(NID_GRP, srcLock.IsValid(), E_OPERATION_FAILED, "The source canvas cannot be locked."); + SysTryReturnResult(NID_GRP, dstLock.IsValid(), E_OPERATION_FAILED, "The canvas cannot be locked"); + + const BufferInfo& srcBufferInfo = srcLock.GetBufferInfo(); + const BufferInfo& dstBufferInfo = dstLock.GetBufferInfo(); + + { + _Util::Pixmap srcImageUnclipped(srcBufferInfo.width, srcBufferInfo.height, srcBufferInfo.bitsPerPixel, srcBufferInfo.pPixels, srcBufferInfo.pitch); + _Util::Pixmap srcImage = srcImageUnclipped.GetSubBitmap(srcRect.x, srcRect.y, srcRect.width, srcRect.height); + + _Util::Pixmap dstImageUnclipped(dstBufferInfo.width, dstBufferInfo.height, dstBufferInfo.bitsPerPixel, dstBufferInfo.pPixels, dstBufferInfo.pitch); + _Util::Pixmap dstImage = dstImageUnclipped.GetSubBitmap(destPoint.x, destPoint.y, srcRect.width, srcRect.height); + + _Pixman::CopyPixmap(dstImage, srcImage, GetDrawingQuality(), compositeMode); + } + + return E_SUCCESS; +} + +result +_Canvas::CopyReverse(const Point& destPoint, const _Canvas& srcCanvas, const Rectangle& srcRect) +{ + // special case + if (srcRect.width == 0 || srcRect.height == 0) + { + return E_SUCCESS; + } + + if (__pScratchPad == null) + { + return E_SYSTEM; + } + + const _Canvas* pSrcCanvas = &srcCanvas; + + if (pSrcCanvas == null) + { + return E_SYSTEM; + } + + if (pSrcCanvas->__pScratchPad == null) + { + return E_SYSTEM; + } + + Rectangle clippedSrcRect(srcRect); + + if (_ClipRectangle(clippedSrcRect.x, clippedSrcRect.y, clippedSrcRect.width, clippedSrcRect.height, 0, 0, pSrcCanvas->__pScratchPad->GetWidth(), pSrcCanvas->__pScratchPad->GetHeight()) == CLIP_REJECT) + { + return E_SYSTEM; + } + + __pScratchPad->RegisterBitBlt(_RasterOp::FnBitBlt32BitCopyReverse); + __pScratchPad->BitBlt(destPoint.x, destPoint.y, pSrcCanvas->__pScratchPad, clippedSrcRect.x, clippedSrcRect.y, clippedSrcRect.width, clippedSrcRect.height); + __pScratchPad->RegisterBitBlt(null); + + return E_SUCCESS; +} + +namespace +{ + +// spec. from SDK 1.0 + +template +void +_ReviseAngle(T& startAngle, T& endAngle) +{ + T zeroPi = T(0); + T twoPi = T(360); + + { + // startAngle = startAngle % twoPi; + int mod = int(startAngle / twoPi); + startAngle = startAngle - twoPi * mod; + + //endAngle = endAngle % twoPi; + mod = int(endAngle / twoPi); + endAngle = endAngle - twoPi * mod; + } + + if (startAngle < zeroPi || endAngle < zeroPi) + { + startAngle += twoPi; + endAngle += twoPi; + } + + if (startAngle > endAngle) + { + endAngle += twoPi; + } +} + +} + +result +_Canvas::DrawArc(const _Util::Rectangle& bounds, double startAngle, double endAngle, ArcStyle arcStyle) +{ + if ((bounds.w <= 0.0) || (bounds.h <= 0.0)) + { + return E_SUCCESS; + } + + // this->__lineWidth is always greater than 0 + + unsigned long composedColor = _ComposeColor(this->__fgColor, this->__fgOpacity); + + _NativeGfxEngine* pCairo = static_cast<_NativeGfxEngine*>(_pNativeGfxEngine); + + if (pCairo && pCairo->pCairo) + { + SET_CAIRO_ALL_PROPERTIES; + + double startDstAngle = (180.0 / M_PI) * atan2(sin(startAngle*M_PI / 180.0) * bounds.w / bounds.h, cos(startAngle * M_PI / 180.0)); + double endDstAngle = (180.0 / M_PI) * atan2(sin(endAngle * M_PI / 180.0) * bounds.w / bounds.h, cos(endAngle * M_PI / 180.0)); + + startDstAngle += (abs(startAngle - startDstAngle) <= 90.0) ? 0.0 : (startDstAngle < 0.0 && startAngle >= 0.0) ? 360.0 : (startDstAngle >= 0.0 && startAngle < 0.0) ? -360.0 : 0.0; + endDstAngle += (abs(endAngle - endDstAngle) <= 90.0) ? 0.0 : (endDstAngle < 0.0 && endAngle >= 0.0) ? 360.0 : (endDstAngle >= 0.0 && endAngle < 0.0) ? -360.0 : 0.0; + + _ReviseAngle(startDstAngle, endDstAngle); + + switch (arcStyle) + { + case ARC_STYLE_ONLY: + if (__lineWidth.applied != _Util::ScalarHolder::AS_INTEGER) + { + _Cairo::DrawArc(pCairo->pCairo, this->__lineWidth.asDouble, composedColor, bounds, startDstAngle, endDstAngle, _Cairo::DRAW_ARC_STYLE_ARC); + } + else + { + _Cairo::DrawArc(pCairo->pCairo, this->__lineWidth.asInteger, composedColor, bounds, startDstAngle, endDstAngle, _Cairo::DRAW_ARC_STYLE_ARC); + } + break; + + case ARC_STYLE_PIE: + if (__lineWidth.applied != _Util::ScalarHolder::AS_INTEGER) + { + _Cairo::DrawArc(pCairo->pCairo, this->__lineWidth.asDouble, composedColor, bounds, startDstAngle, endDstAngle, _Cairo::DRAW_ARC_STYLE_PIE); + } + else + { + _Cairo::DrawArc(pCairo->pCairo, this->__lineWidth.asInteger, composedColor, bounds, startDstAngle, endDstAngle, _Cairo::DRAW_ARC_STYLE_PIE); + } + break; + + case ARC_STYLE_CHORD: + if (__lineWidth.applied != _Util::ScalarHolder::AS_INTEGER) + { + _Cairo::DrawArc(pCairo->pCairo, this->__lineWidth.asDouble, composedColor, bounds, startDstAngle, endDstAngle, _Cairo::DRAW_ARC_STYLE_CHORD); + } + else + { + _Cairo::DrawArc(pCairo->pCairo, this->__lineWidth.asInteger, composedColor, bounds, startDstAngle, endDstAngle, _Cairo::DRAW_ARC_STYLE_CHORD); + } + break; + + case ARC_STYLE_FILLED_PIE: + _Cairo::FillArc(pCairo->pCairo, composedColor, bounds, startDstAngle, endDstAngle, _Cairo::FILL_ARC_STYLE_PIE); + break; + + case ARC_STYLE_FILLED_CHORD: + _Cairo::FillArc(pCairo->pCairo, composedColor, bounds, startDstAngle, endDstAngle, _Cairo::FILL_ARC_STYLE_CHORD); + break; + + default: + return E_SYSTEM; + } + + RESET_CAIRO_ALL_PROPERTIES; + + return E_SUCCESS; + } + else + { + _CanvasArc arc; + _GpBufferInfo info; + + memset(&info, 0, sizeof(info)); + + SystemPixel* pBufferAddr = null; + int bufferPitch = 0; + + __pScratchPad->GetBuffer(pBufferAddr, bufferPitch); + + info.width = __pScratchPad->GetWidth(); + info.height = __pScratchPad->GetHeight(); + info.bitsPerPixel = 32; + info.pixelPerLine = bufferPitch; + info.pPixels = (void*) pBufferAddr; + info.color32 = composedColor; + info.isClipBoundsSet = this->__isClipBoundsSet; + info.clipBounds.SetBounds(this->__clipBounds.x, this->__clipBounds.y, this->__clipBounds.width, this->__clipBounds.height); + + arc.SetLineWidth(this->__lineWidth.asInteger); + + _ReviseAngle(startAngle, endAngle); + + return arc.DrawArc(int(bounds.x), int(bounds.y), int(bounds.w), int(bounds.h), int(startAngle), int(endAngle), arcStyle, info); + } +} + +result +_Canvas::DrawBitmap(const _Util::Rectangle& rectD, const _Bitmap& bitmap) +{ + SysTryReturnResult(NID_GRP, &bitmap && bitmap.IsValid(), E_INVALID_ARG, "The source bitmap is invalid.\n"); + + if (rectD.w <= 0 || rectD.h <= 0) + { + return E_SUCCESS; + } + + int alphaConstant = this->_GetAlphaAttenuation(bitmap); + + Rectangle clipRect; + + this->__GetClipBounds(clipRect); + + _Util::Rectangle rect = + { + _DoubleToIntForPos(rectD.x), + _DoubleToIntForPos(rectD.y), + _DoubleToIntForSize(rectD.w), + _DoubleToIntForSize(rectD.h) + }; + + { + bool pass = false; + + _Util::LockManagerFast srcLock(bitmap); + _Util::LockManagerFast dstLock(*this); + + SysTryReturnResult(NID_GRP, srcLock.IsValid(), E_OPERATION_FAILED, "The source bitmap cannot be locked.\n"); + SysTryReturnResult(NID_GRP, dstLock.IsValid(), E_OPERATION_FAILED, "The canvas cannot be locked.\n"); + + const BufferInfo& srcBufferInfo = srcLock.GetBufferInfo(); + const BufferInfo& dstBufferInfo = dstLock.GetBufferInfo(); + + { + if (!this->__useStableRenderer && srcBufferInfo.bitsPerPixel == 32 && (GetCompositeMode() != COMPOSITE_MODE_SRC_OVER || bitmap.__isPremultiplied)) + { + _Util::Pixmap srcImage(srcBufferInfo.width, srcBufferInfo.height, srcBufferInfo.bitsPerPixel, srcBufferInfo.pPixels, srcBufferInfo.pitch); + _ApplySrcBitmapAttrib(srcImage, bitmap, bitmap.__isOpaqueAllOver); + + _Util::Pixmap dstImageUnclipped(dstBufferInfo.width, dstBufferInfo.height, dstBufferInfo.bitsPerPixel, dstBufferInfo.pPixels, dstBufferInfo.pitch); + _Util::Pixmap dstImage = dstImageUnclipped.GetSubBitmap(clipRect.x, clipRect.y, clipRect.width, clipRect.height); + + if (alphaConstant < 255) + { + std::unique_ptr<_Util::Pixmap> modifiedSrcImage(srcImage.GetAlphaAttenuatedPixmap(alphaConstant)); + + if (modifiedSrcImage != null) + { + pass = _Pixman::ScalePixmap(dstImage, *modifiedSrcImage.get(), GetDrawingQuality(), GetCompositeMode(), rectD.x - clipRect.x, rectD.y - clipRect.y, rectD.w, rectD.h); + } + } + + if (!pass) + { + pass = _Pixman::ScalePixmap(dstImage, srcImage, GetDrawingQuality(), GetCompositeMode(), rectD.x - clipRect.x, rectD.y - clipRect.y, rectD.w, rectD.h); + } + + } + + if (!pass && alphaConstant >= 255) + { + _Util::Pixmap srcImage(srcBufferInfo.width, srcBufferInfo.height, srcBufferInfo.bitsPerPixel, srcBufferInfo.pPixels, srcBufferInfo.pitch); + _ApplySrcBitmapAttrib(srcImage, bitmap, bitmap.__isOpaqueAllOver); + + _Util::Pixmap dstImageUnclipped(dstBufferInfo.width, dstBufferInfo.height, dstBufferInfo.bitsPerPixel, dstBufferInfo.pPixels, dstBufferInfo.pitch); + _Util::Pixmap dstImage = dstImageUnclipped.GetSubBitmap(clipRect.x, clipRect.y, clipRect.width, clipRect.height); + + pass = Tizen::Graphics::_Effect::ScaleImage(dstImage, rect.x - clipRect.x, rect.y - clipRect.y, rect.w, rect.h, srcImage, _ConvertParam<_Effect::Rop>(this->__blendOption)); + } + + } + + if (pass) + { + return E_SUCCESS; + } + } + + { + _Util::Pixmap tmpImage(rect.w, rect.h, bitmap.GetBitsPerPixel()); + + // copies the source bitmap to the scaled bitmap + { + // ykahn, 2011/10/11 patched + { + _ApplySrcBitmapAttrib(tmpImage, bitmap, bitmap.__isOpaqueAllOver); + + if (tmpImage.depth == 16) + { + if (tmpImage.enableColorKey) + { + typedef unsigned short Pixel; + + Pixel colorKey = (Pixel) tmpImage.colorKey; + Pixel* pDest = (Pixel*) tmpImage.pBitmap; + Pixel* pDestEnd = pDest + (tmpImage.bytesPerLine * tmpImage.height / (tmpImage.depth / 8)); + + while (pDest < pDestEnd) + { + *pDest++ = colorKey; + } + } + else + { + ; + } + } + else if (tmpImage.depth == 32) + { + typedef unsigned long Pixel; + + Pixel fillColor = 0; + Pixel* pDest = (Pixel*) tmpImage.pBitmap; + Pixel* pDestEnd = pDest + (tmpImage.bytesPerLine * tmpImage.height / (tmpImage.depth / 8)); + + while (pDest < pDestEnd) + { + *pDest++ = fillColor; + } + } + } + + bool pass = false; + + { + _Util::LockManagerFast srcLock(bitmap); + SysTryReturnResult(NID_GRP, srcLock.IsValid(), E_OPERATION_FAILED, "The source bitmap cannot be locked.\n"); + + const BufferInfo& srcBufferInfo = srcLock.GetBufferInfo(); + + { + _Util::Pixmap srcImage(srcBufferInfo.width, srcBufferInfo.height, srcBufferInfo.bitsPerPixel, srcBufferInfo.pPixels, srcBufferInfo.pitch); + _ApplySrcBitmapAttrib(srcImage, bitmap, bitmap.__isOpaqueAllOver); + + pass = Tizen::Graphics::_Effect::ScaleImage(tmpImage, 0, 0, rect.w, rect.h, srcImage, Tizen::Graphics::_Effect::ROP_COPY); + } + } + + SysTryReturnResult(NID_GRP, pass, E_INVALID_ARG, "The source bitmap is invalid.\n"); + } + + { + bool pass = false; + + { + _Util::LockManagerFast dstLock(*this); + SysTryReturnResult(NID_GRP, dstLock.IsValid(), E_OPERATION_FAILED, "The canvas cannot be locked.\n"); + + const BufferInfo& dstBufferInfo = dstLock.GetBufferInfo(); + + { + _Util::Pixmap dstImageUnclipped(dstBufferInfo.width, dstBufferInfo.height, dstBufferInfo.bitsPerPixel, dstBufferInfo.pPixels, dstBufferInfo.pitch); + _Util::Pixmap dstImage = dstImageUnclipped.GetSubBitmap(clipRect.x, clipRect.y, clipRect.width, clipRect.height); + + pass = Tizen::Graphics::_Effect::DrawImageWithAlpha(dstImage, rect.x - clipRect.x, rect.y - clipRect.y, tmpImage, alphaConstant); + } + } + + SysTryReturnResult(NID_GRP, pass, E_INVALID_ARG, "The source bitmap is invalid.\n"); + } + + return E_SUCCESS; + } +} + +result +_Canvas::DrawBitmap(const _Util::Point& pointD, const _Bitmap& bitmap) +{ + SysTryReturnResult(NID_GRP, &bitmap && bitmap.IsValid(), E_INVALID_ARG, "The source bitmap is invalid.\n"); + + int alphaConstant = this->_GetAlphaAttenuation(bitmap); + + { + Rectangle clipRect; + + this->__GetClipBounds(clipRect); + + bool pass = false; + + { + _Util::Point point = + { + _DoubleToIntForPos(pointD.x), + _DoubleToIntForPos(pointD.y) + }; + + _Util::LockManagerFast srcLock(bitmap); + _Util::LockManagerFast dstLock(*this); + + SysTryReturnResult(NID_GRP, srcLock.IsValid(), E_OPERATION_FAILED, "The source bitmap cannot be locked.\n"); + SysTryReturnResult(NID_GRP, dstLock.IsValid(), E_OPERATION_FAILED, "The canvas cannot be locked.\n"); + + const BufferInfo& srcBufferInfo = srcLock.GetBufferInfo(); + const BufferInfo& dstBufferInfo = dstLock.GetBufferInfo(); + + { + _Util::Pixmap srcImage(srcBufferInfo.width, srcBufferInfo.height, srcBufferInfo.bitsPerPixel, srcBufferInfo.pPixels, srcBufferInfo.pitch); + _ApplySrcBitmapAttrib(srcImage, bitmap, bitmap.__isOpaqueAllOver); + + _Util::Pixmap dstImageUnclipped(dstBufferInfo.width, dstBufferInfo.height, dstBufferInfo.bitsPerPixel, dstBufferInfo.pPixels, dstBufferInfo.pitch); + _Util::Pixmap dstImage = dstImageUnclipped.GetSubBitmap(clipRect.x, clipRect.y, clipRect.width, clipRect.height); + + if (srcBufferInfo.pixelFormat == PIXEL_FORMAT_RGB565 && srcImage.enableColorKey == 0 && dstBufferInfo.pixelFormat == PIXEL_FORMAT_ARGB8888 && !this->__isClipBoundsSet && alphaConstant >= 255) + { + pixman_image_t* pPixmanSrc = pixman_image_create_bits(PIXMAN_r5g6b5, srcBufferInfo.width, srcBufferInfo.height, (uint32_t*)srcBufferInfo.pPixels, srcBufferInfo.pitch); + pixman_image_t* pPixmanDst = pixman_image_create_bits(PIXMAN_a8r8g8b8, dstBufferInfo.width, dstBufferInfo.height, (uint32_t*)dstBufferInfo.pPixels, dstBufferInfo.pitch); + + if (pPixmanSrc && pPixmanDst) + { + pixman_image_composite32(PIXMAN_OP_SRC, pPixmanSrc, NULL, pPixmanDst, 0, 0, 0, 0, point.x, point.y, srcBufferInfo.width, srcBufferInfo.height); + pass = true; + } + + if (pPixmanDst) + { + pixman_image_unref(pPixmanDst); + } + + if (pPixmanSrc) + { + pixman_image_unref(pPixmanSrc); + } + } + } + { + bool isPixmanSupported = (!this->__useStableRenderer && (GetCompositeMode() != COMPOSITE_MODE_SRC_OVER || bitmap.__isPremultiplied)); + + if (isPixmanSupported) + { + Color color; + + isPixmanSupported = !((bitmap.GetBitsPerPixel() == 16) && (bitmap.GetMaskingColor(color) == E_SUCCESS)); + } + + if (isPixmanSupported) + { + _Util::Pixmap srcImage(srcBufferInfo.width, srcBufferInfo.height, srcBufferInfo.bitsPerPixel, srcBufferInfo.pPixels, srcBufferInfo.pitch); + _ApplySrcBitmapAttrib(srcImage, bitmap, bitmap.__isOpaqueAllOver); + + _Util::Pixmap dstImageUnclipped(dstBufferInfo.width, dstBufferInfo.height, dstBufferInfo.bitsPerPixel, dstBufferInfo.pPixels, dstBufferInfo.pitch); + _Util::Pixmap dstImage = dstImageUnclipped.GetSubBitmap(clipRect.x, clipRect.y, clipRect.width, clipRect.height); + + if (alphaConstant < 255) + { + std::unique_ptr<_Util::Pixmap> modifiedSrcImage(srcImage.GetAlphaAttenuatedPixmap(alphaConstant)); + + if (modifiedSrcImage != null) + { + pass = _Pixman::CopyPixmap(dstImage, *modifiedSrcImage.get(), GetDrawingQuality(), GetCompositeMode(), pointD.x - clipRect.x, pointD.y - clipRect.y); + } + } + + if (!pass) + { + pass = _Pixman::CopyPixmap(dstImage, srcImage, GetDrawingQuality(), GetCompositeMode(), pointD.x - clipRect.x, pointD.y - clipRect.y); + } + } + + if (!pass) + { + _Util::Pixmap srcImage(srcBufferInfo.width, srcBufferInfo.height, srcBufferInfo.bitsPerPixel, srcBufferInfo.pPixels, srcBufferInfo.pitch); + _ApplySrcBitmapAttrib(srcImage, bitmap, bitmap.__isOpaqueAllOver); + + _Util::Pixmap dstImageUnclipped(dstBufferInfo.width, dstBufferInfo.height, dstBufferInfo.bitsPerPixel, dstBufferInfo.pPixels, dstBufferInfo.pitch); + _Util::Pixmap dstImage = dstImageUnclipped.GetSubBitmap(clipRect.x, clipRect.y, clipRect.width, clipRect.height); + + pass = Tizen::Graphics::_Effect::DrawImageWithAlpha(dstImage, point.x - clipRect.x, point.y - clipRect.y, srcImage, alphaConstant); + } + } + } + + SysTryReturnResult(NID_GRP, pass, E_INVALID_ARG, "The source bitmap is invalid.\n"); + + return E_SUCCESS; + } +} + +result +_Canvas::DrawBitmap(const _Util::Point& point, const _Bitmap& bitmap) +{ + SysTryReturnResult(NID_GRP, &bitmap && bitmap.IsValid(), E_INVALID_ARG, "The source bitmap is invalid.\n"); + + int alphaConstant = this->_GetAlphaAttenuation(bitmap); + + { + Rectangle clipRect; + this->__GetClipBounds(clipRect); + + bool pass = false; + + { + _Util::LockManagerFast srcLock(bitmap); + _Util::LockManagerFast dstLock(*this); + + SysTryReturnResult(NID_GRP, srcLock.IsValid(), E_OPERATION_FAILED, "The source bitmap cannot be locked.\n"); + SysTryReturnResult(NID_GRP, dstLock.IsValid(), E_OPERATION_FAILED, "The canvas cannot be locked.\n"); + + const BufferInfo& srcBufferInfo = srcLock.GetBufferInfo(); + const BufferInfo& dstBufferInfo = dstLock.GetBufferInfo(); + + { + _Util::Pixmap srcImage(srcBufferInfo.width, srcBufferInfo.height, srcBufferInfo.bitsPerPixel, srcBufferInfo.pPixels, srcBufferInfo.pitch); + _ApplySrcBitmapAttrib(srcImage, bitmap, bitmap.__isOpaqueAllOver); + + _Util::Pixmap dstImageUnclipped(dstBufferInfo.width, dstBufferInfo.height, dstBufferInfo.bitsPerPixel, dstBufferInfo.pPixels, dstBufferInfo.pitch); + _Util::Pixmap dstImage = dstImageUnclipped.GetSubBitmap(clipRect.x,clipRect.y, clipRect.width, clipRect.height); + + if (srcBufferInfo.pixelFormat == PIXEL_FORMAT_RGB565 && srcImage.enableColorKey == 0 && dstBufferInfo.pixelFormat == PIXEL_FORMAT_ARGB8888 && !this->__isClipBoundsSet) + { + pixman_image_t* pPixmanSrc = pixman_image_create_bits(PIXMAN_r5g6b5, srcBufferInfo.width, srcBufferInfo.height, (uint32_t*)srcBufferInfo.pPixels, srcBufferInfo.pitch); + pixman_image_t* pPixmanDst = pixman_image_create_bits(PIXMAN_a8r8g8b8, dstBufferInfo.width, dstBufferInfo.height, (uint32_t*)dstBufferInfo.pPixels, dstBufferInfo.pitch); + + if (pPixmanSrc && pPixmanDst) + { + pixman_image_composite32(PIXMAN_OP_SRC, pPixmanSrc,NULL, pPixmanDst, 0, 0, 0, 0, point.x, point.y, srcBufferInfo.width, srcBufferInfo.height); + pass = true; + } + + if (pPixmanDst) + { + pixman_image_unref(pPixmanDst); + } + + if (pPixmanSrc) + { + pixman_image_unref(pPixmanSrc); + } + } + } + + { + Color color; + + bool isPixmanSupported = !(bitmap.__isOpaqueAllOver && GetCompositeMode() == COMPOSITE_MODE_SRC_OVER) && (!this->__useStableRenderer || bitmap.__isPremultiplied); + + if (isPixmanSupported) + { + Color color; + + isPixmanSupported = !((bitmap.GetBitsPerPixel() == 16) && (bitmap.GetMaskingColor(color) == E_SUCCESS)); + } + + if (isPixmanSupported) + { + _Util::Rectangle outRect = { 0, 0, -1, -1 }; + _Util::Rectangle dstRect = { point.x, point.y, srcBufferInfo.width, srcBufferInfo.height }; + _Util::Rectangle tgtRect = { clipRect.x, clipRect.y, clipRect.width, clipRect.height }; + + if (_Util::IntersectRect(outRect, tgtRect, dstRect)) + { + _Util::Bounds outBounds = { outRect.x, outRect.y, outRect.x + outRect.w, outRect.y + outRect.h }; + _Util::Bounds dstBounds = { dstRect.x, dstRect.y, dstRect.x + dstRect.w, dstRect.y + dstRect.h }; + _Util::Bounds srcBounds = + + { + (outBounds.x1 - dstBounds.x1), + (outBounds.y1 - dstBounds.y1), + srcBufferInfo.width + (outBounds.x2 - dstBounds.x2), + srcBufferInfo.height + (outBounds.y2 - dstBounds.y2), + }; + + srcBounds.x1 = (srcBounds.x1 >= 0) ? srcBounds.x1 :0; + srcBounds.y1 = (srcBounds.y1 >= 0) ? srcBounds.y1 :0; + srcBounds.x2 = (srcBounds.x2 <= srcBufferInfo.width) ? srcBounds.x2 : srcBufferInfo.width; + srcBounds.y2 = (srcBounds.y2 <= srcBufferInfo.height) ? srcBounds.y2 : srcBufferInfo.height; + + _Util::Pixmap srcImageUnclipped(srcBufferInfo.width, srcBufferInfo.height, srcBufferInfo.bitsPerPixel, srcBufferInfo.pPixels, srcBufferInfo.pitch); + _Util::Pixmap srcImage = srcImageUnclipped.GetSubBitmap(srcBounds.x1, srcBounds.y1, srcBounds.x2 - srcBounds.x1, srcBounds.y2 - srcBounds.y1); + _ApplySrcBitmapAttrib(srcImage, bitmap, bitmap.__isOpaqueAllOver); + + _Util::Pixmap dstImageUnclipped(dstBufferInfo.width, dstBufferInfo.height, dstBufferInfo.bitsPerPixel, dstBufferInfo.pPixels, dstBufferInfo.pitch); + _Util::Pixmap dstImage = dstImageUnclipped.GetSubBitmap(outRect.x, outRect.y, outRect.w, outRect.h); + + pixman_transform_t transform; + pixman_transform_init_identity(&transform); + + if (alphaConstant < 255) + { + std::unique_ptr<_Util::Pixmap> modifiedSrcImage(srcImage.GetAlphaAttenuatedPixmap(alphaConstant)); + + if (modifiedSrcImage != null) + { + pass = _Pixman::CopyPixmap(dstImage, *modifiedSrcImage.get(), GetDrawingQuality(), GetCompositeMode()); + } + } + + if (!pass) + { + pass = _Pixman::CopyPixmap(dstImage, srcImage, GetDrawingQuality(), GetCompositeMode()); + } + } + } + + if (!pass) + { + _Util::Pixmap srcImage(srcBufferInfo.width, srcBufferInfo.height, srcBufferInfo.bitsPerPixel, srcBufferInfo.pPixels, srcBufferInfo.pitch); + _ApplySrcBitmapAttrib(srcImage, bitmap, bitmap.__isOpaqueAllOver); + + _Util::Pixmap dstImageUnclipped(dstBufferInfo.width, dstBufferInfo.height, dstBufferInfo.bitsPerPixel, dstBufferInfo.pPixels, dstBufferInfo.pitch); + _Util::Pixmap dstImage = dstImageUnclipped.GetSubBitmap(clipRect.x, clipRect.y, clipRect.width, clipRect.height); + pass = Tizen::Graphics::_Effect::DrawImageWithAlpha(dstImage, point.x - clipRect.x, point.y - clipRect.y, srcImage, alphaConstant); + } + } + } + + SysTryReturnResult(NID_GRP, pass, E_INVALID_ARG, "The source bitmap is invalid.\n"); + + return E_SUCCESS; + } +} + +result +_Canvas::DrawBitmap(const _Util::Rectangle& destRectD, const _Bitmap& srcBitmap, const _Util::Rectangle& srcRectD) +{ + SysTryReturnResult(NID_GRP, &srcBitmap && srcBitmap.IsValid(), E_INVALID_ARG, "The source bitmap is invalid.\n"); + + if (srcRectD.w == 0 || srcRectD.h == 0) + { + return E_SUCCESS; + } + + if (destRectD.w == 0 || destRectD.h == 0) + { + return E_SUCCESS; + } + + int alphaConstant = this->_GetAlphaAttenuation(srcBitmap); + + Rectangle clipRect; + + this->__GetClipBounds(clipRect); + + _Util::Rectangle destRect = + { + _DoubleToIntForPos(destRectD.x), + _DoubleToIntForPos(destRectD.y), + _DoubleToIntForSize(destRectD.w), + _DoubleToIntForSize(destRectD.h) + }; + + _Util::Rectangle srcRect = + { + _DoubleToIntForPos(srcRectD.x), + _DoubleToIntForPos(srcRectD.y), + _DoubleToIntForSize(srcRectD.w), + _DoubleToIntForSize(srcRectD.h) + }; + + { + bool pass = false; + + _Util::LockManagerFast srcLock(srcBitmap); + _Util::LockManagerFast dstLock(*this); + + SysTryReturnResult(NID_GRP, srcLock.IsValid(), E_OPERATION_FAILED, "The source bitmap cannot be locked.\n"); + SysTryReturnResult(NID_GRP, dstLock.IsValid(), E_OPERATION_FAILED, "The canvas cannot be locked.\n"); + + const BufferInfo& srcBufferInfo = srcLock.GetBufferInfo(); + const BufferInfo& dstBufferInfo = dstLock.GetBufferInfo(); + + { + if (!this->__useStableRenderer && srcBufferInfo.bitsPerPixel == 32 && (GetCompositeMode() != COMPOSITE_MODE_SRC_OVER || srcBitmap.__isPremultiplied)) + { + _Util::Pixmap srcImageUnclipped(srcBufferInfo.width, srcBufferInfo.height, srcBufferInfo.bitsPerPixel, srcBufferInfo.pPixels, srcBufferInfo.pitch); + _Util::Pixmap srcImage = srcImageUnclipped.GetSubBitmap(srcRect.x, srcRect.y, srcRect.w, srcRect.h); + _ApplySrcBitmapAttrib(srcImage, srcBitmap, srcBitmap.__isOpaqueAllOver); + + _Util::Pixmap dstImageUnclipped(dstBufferInfo.width, dstBufferInfo.height, dstBufferInfo.bitsPerPixel, dstBufferInfo.pPixels, dstBufferInfo.pitch); + _Util::Pixmap dstImage = dstImageUnclipped.GetSubBitmap(clipRect.x, clipRect.y, clipRect.width, clipRect.height); + + if (alphaConstant < 255) + { + std::unique_ptr<_Util::Pixmap> modifiedSrcImage(srcImage.GetAlphaAttenuatedPixmap(alphaConstant)); + + if (modifiedSrcImage != null) + { + pass = _Pixman::ScalePixmap(dstImage, *modifiedSrcImage.get(), GetDrawingQuality(), GetCompositeMode(), destRectD.x - clipRect.x, destRectD.y - clipRect.y, destRectD.w, destRectD.h); + } + } + + if (!pass) + { + pass = _Pixman::ScalePixmap(dstImage, srcImage, GetDrawingQuality(), GetCompositeMode(), destRectD.x - clipRect.x, destRectD.y - clipRect.y, destRectD.w, destRectD.h); + } + } + + if (!pass && alphaConstant >= 255) + { + unsigned char* pPixels = (unsigned char*) srcBufferInfo.pPixels + srcRect.y * srcBufferInfo.pitch + srcRect.x * (srcBufferInfo.bitsPerPixel / 8); + + _Util::Pixmap srcImage(srcRect.w, srcRect.h, srcBufferInfo.bitsPerPixel, (void*) pPixels, srcBufferInfo.pitch); + _ApplySrcBitmapAttrib(srcImage, srcBitmap, srcBitmap.__isOpaqueAllOver); + + _Util::Pixmap dstImageUnclipped(dstBufferInfo.width, dstBufferInfo.height, dstBufferInfo.bitsPerPixel, dstBufferInfo.pPixels, dstBufferInfo.pitch); + _Util::Pixmap dstImage = dstImageUnclipped.GetSubBitmap(clipRect.x, clipRect.y, clipRect.width, clipRect.height); + + pass = Tizen::Graphics::_Effect::ScaleImage(dstImage, destRect.x - clipRect.x, destRect.y - clipRect.y, destRect.w, destRect.h, srcImage, _ConvertParam<_Effect::Rop>(this->__blendOption)); + } + + } + + if (pass) + { + return E_SUCCESS; + } + } + + { + _Util::Pixmap tmpImage(destRect.w, destRect.h, srcBitmap.GetBitsPerPixel()); + + // copies the source bitmap to the scaled bitmap + { + // ykahn, 2011/10/11 patched + { + _ApplySrcBitmapAttrib(tmpImage, srcBitmap, srcBitmap.__isOpaqueAllOver); + + if (tmpImage.depth == 16) + { + if (tmpImage.enableColorKey) + { + typedef unsigned short Pixel; + + Pixel colorKey = (Pixel) tmpImage.colorKey; + Pixel* pDest = (Pixel*) tmpImage.pBitmap; + Pixel* pDestEnd = pDest + (tmpImage.bytesPerLine * tmpImage.height / (tmpImage.depth / 8)); + + while (pDest < pDestEnd) + { + *pDest++ = colorKey; + } + } + else + { + } + } + else if (tmpImage.depth == 32) + { + typedef unsigned long Pixel; + + Pixel fillColor = 0; + Pixel* pDest = (Pixel*) tmpImage.pBitmap; + Pixel* pDestEnd = pDest + (tmpImage.bytesPerLine * tmpImage.height / (tmpImage.depth / 8)); + + while (pDest < pDestEnd) + { + *pDest++ = fillColor; + } + } + } + + bool pass = false; + + { + _Util::LockManagerFast srcLock(srcBitmap); + SysTryReturnResult(NID_GRP, srcLock.IsValid(), E_OPERATION_FAILED, "The source bitmap cannot be locked.\n"); + + const BufferInfo& srcBufferInfo = srcLock.GetBufferInfo(); + + { + unsigned char* pPixels = (unsigned char*) srcBufferInfo.pPixels + srcRect.y * srcBufferInfo.pitch + srcRect.x * (srcBufferInfo.bitsPerPixel / 8); + + _Util::Pixmap srcImage(srcRect.w, srcRect.h, srcBufferInfo.bitsPerPixel, (void*) pPixels, srcBufferInfo.pitch); + _ApplySrcBitmapAttrib(srcImage, srcBitmap, srcBitmap.__isOpaqueAllOver); + + pass = Tizen::Graphics::_Effect::ScaleImage(tmpImage, 0, 0, destRect.w, destRect.h, srcImage, Tizen::Graphics::_Effect::ROP_COPY); + } + } + + SysTryReturnResult(NID_GRP, pass, E_INVALID_ARG, "The source bitmap is invalid.\n"); + } + + { + bool pass = false; + + { + _Util::LockManagerFast dstLock(*this); + SysTryReturnResult(NID_GRP, dstLock.IsValid(), E_OPERATION_FAILED, "The canvas cannot be locked.\n"); + + const BufferInfo& dstBufferInfo = dstLock.GetBufferInfo(); + + { + _Util::Pixmap dstImageUnclipped(dstBufferInfo.width, dstBufferInfo.height, dstBufferInfo.bitsPerPixel, dstBufferInfo.pPixels, dstBufferInfo.pitch); + _Util::Pixmap dstImage = dstImageUnclipped.GetSubBitmap(clipRect.x, clipRect.y, clipRect.width, clipRect.height); + + pass = Tizen::Graphics::_Effect::DrawImageWithAlpha(dstImage, destRect.x - clipRect.x, destRect.y - clipRect.y, tmpImage, alphaConstant); + } + } + + SysTryReturnResult(NID_GRP, pass, E_INVALID_ARG, "The source bitmap is invalid.\n"); + } + + return E_SUCCESS; + } +} + +result +_Canvas::DrawBitmapForNinePatchedBitmap(const Rectangle& destRect, const _Bitmap& srcBitmap, const Rectangle& srcRect, bool copyOnly) +{ + SysTryReturnResult(NID_GRP, &srcBitmap && srcBitmap.IsValid(), E_INVALID_ARG, "The source bitmap is invalid.\n"); + + if (srcRect.width == 0 || srcRect.height == 0) + { + return E_SUCCESS; + } + + if (destRect.width == 0 || destRect.height == 0) + { + return E_SUCCESS; + } + + int alphaConstant = this->_GetAlphaAttenuation(srcBitmap); + + Rectangle clipRect; + + this->__GetClipBounds(clipRect); + + bool pass = false; + + { + _Util::LockManagerFast srcLock(srcBitmap); + _Util::LockManagerFast dstLock(*this); + + SysTryReturnResult(NID_GRP, srcLock.IsValid(), E_OPERATION_FAILED, "The source bitmap cannot be locked.\n"); + SysTryReturnResult(NID_GRP, dstLock.IsValid(), E_OPERATION_FAILED, "The canvas cannot be locked.\n"); + + const BufferInfo& srcBufferInfo = srcLock.GetBufferInfo(); + const BufferInfo& dstBufferInfo = dstLock.GetBufferInfo(); + + { + if (srcBufferInfo.bitsPerPixel == 32) + { + _Util::Rectangle outRect = { 0, 0, -1, -1 }; + _Util::Rectangle dstRect = { destRect.x, destRect.y, destRect.width, destRect.height }; + _Util::Rectangle tgtRect = { clipRect.x, clipRect.y, clipRect.width, clipRect.height }; + + _Util::IntersectRect(outRect, tgtRect, dstRect); + + // assert(destRect.width > 0 && destRect.height > 0); + + _Util::Bounds outBounds = { outRect.x, outRect.y, outRect.x + outRect.w, outRect.y + outRect.h }; + _Util::Bounds dstBounds = { dstRect.x, dstRect.y, dstRect.x + dstRect.w, dstRect.y + dstRect.h }; + _Util::Bounds srcBounds = + { + srcRect.x + (outBounds.x1 - dstBounds.x1) * srcRect.width / (dstBounds.x2 - dstBounds.x1), + srcRect.y + (outBounds.y1 - dstBounds.y1) * srcRect.height / (dstBounds.y2 - dstBounds.y1), + (srcRect.x + srcRect.width) + (outBounds.x2 - dstBounds.x2) * srcRect.width / (dstBounds.x2 - dstBounds.x1), + (srcRect.y + srcRect.height) + (outBounds.y2 - dstBounds.y2) * srcRect.height / (dstBounds.y2 - dstBounds.y1), + }; + + srcBounds.x1 = (srcBounds.x1 >= srcRect.x) ? srcBounds.x1 : srcRect.x; + srcBounds.y1 = (srcBounds.y1 >= srcRect.y) ? srcBounds.y1 : srcRect.y; + srcBounds.x2 = (srcBounds.x2 <= (srcRect.x + srcRect.width)) ? srcBounds.x2 : (srcRect.x + srcRect.width); + srcBounds.y2 = (srcBounds.y2 <= (srcRect.y + srcRect.height)) ? srcBounds.y2 : (srcRect.y + srcRect.height); + + _Util::Pixmap srcImageUnclipped(srcBufferInfo.width, srcBufferInfo.height, srcBufferInfo.bitsPerPixel, srcBufferInfo.pPixels, srcBufferInfo.pitch); + _Util::Pixmap srcImage = srcImageUnclipped.GetSubBitmap(srcBounds.x1, srcBounds.y1, srcBounds.x2 - srcBounds.x1, srcBounds.y2 - srcBounds.y1); + _ApplySrcBitmapAttrib(srcImage, srcBitmap, srcBitmap.__isOpaqueAllOver); + +#if 1 + _Util::Pixmap dstImageUnclipped(dstBufferInfo.width, dstBufferInfo.height, dstBufferInfo.bitsPerPixel, dstBufferInfo.pPixels, dstBufferInfo.pitch); + _Util::Pixmap dstImage = dstImageUnclipped.GetSubBitmap(outRect.x, outRect.y, outRect.w, outRect.h); + + if (copyOnly) + { + pass = _Pixman::ScalePixmapOpCopy(dstImage, srcImage, GetDrawingQuality()); + } + else + { + if (alphaConstant < 255) + { + std::unique_ptr<_Util::Pixmap> modifiedSrcImage(srcImage.GetAlphaAttenuatedPixmap(alphaConstant)); + + if (modifiedSrcImage != null) + { + pass = _Pixman::ScalePixmap(dstImage, *modifiedSrcImage.get(), GetDrawingQuality(), GetCompositeMode()); + } + } + + if (!pass) + { + pass = _Pixman::ScalePixmap(dstImage, srcImage, GetDrawingQuality(), GetCompositeMode()); + } + } +#else + _Util::Pixmap dstImageUnclipped(dstBufferInfo.width, dstBufferInfo.height, dstBufferInfo.bitsPerPixel, dstBufferInfo.pPixels, dstBufferInfo.pitch); + + if (copyOnly) + { + _Util::Pixmap dstImage = dstImageUnclipped.GetSubBitmap(outRect.x, outRect.y, outRect.w, outRect.h); + + pass = _Pixman::ScalePixmapOpCopy(dstImage, srcImage, GetDrawingQuality()); + } + else + { + _Util::Pixmap dstImage = dstImageUnclipped.GetSubBitmap(clipRect.x, clipRect.y, clipRect.width, clipRect.height); + + if (alphaConstant < 255) + { + std::unique_ptr<_Util::Pixmap> modifiedSrcImage(srcImage.GetAlphaAttenuatedPixmap(alphaConstant)); + + if (modifiedSrcImage != null) + { + pass = _Pixman::ScalePixmap(dstImage, *modifiedSrcImage.get(), GetDrawingQuality(), GetCompositeMode(), destRect.x - clipRect.x, destRect.y - clipRect.y, destRect.width, destRect.height); + } + } + + if (!pass) + { + pass = _Pixman::ScalePixmap(dstImage, srcImage, GetDrawingQuality(), GetCompositeMode(), destRect.x - clipRect.x, destRect.y - clipRect.y, destRect.width, destRect.height); + } + } +#endif + } + + if (!pass && alphaConstant >= 255) + { + unsigned char* pPixels = (unsigned char*) srcBufferInfo.pPixels + srcRect.y * srcBufferInfo.pitch + srcRect.x * (srcBufferInfo.bitsPerPixel / 8); + + _Util::Pixmap srcImage(srcRect.width, srcRect.height, srcBufferInfo.bitsPerPixel, (void*) pPixels, srcBufferInfo.pitch); + _ApplySrcBitmapAttrib(srcImage, srcBitmap, srcBitmap.__isOpaqueAllOver); + + _Util::Pixmap dstImageUnclipped(dstBufferInfo.width, dstBufferInfo.height, dstBufferInfo.bitsPerPixel, dstBufferInfo.pPixels, dstBufferInfo.pitch); + _Util::Pixmap dstImage = dstImageUnclipped.GetSubBitmap(clipRect.x, clipRect.y, clipRect.width, clipRect.height); + + if (copyOnly) + { + pass = Tizen::Graphics::_Effect::ScaleImage(dstImage, destRect.x - clipRect.x, destRect.y - clipRect.y, destRect.width, destRect.height, srcImage, Tizen::Graphics::_Effect::ROP_COPY); + } + else + { + pass = Tizen::Graphics::_Effect::ScaleImage(dstImage, destRect.x - clipRect.x, destRect.y - clipRect.y, destRect.width, destRect.height, srcImage, _ConvertParam<_Effect::Rop>(this->__blendOption)); + } + } + + } + + } + + if (!pass) + { + _Util::Pixmap tmpImage(destRect.width, destRect.height, srcBitmap.GetBitsPerPixel()); + + // copies the source bitmap to the scaled bitmap + { + // ykahn, 2011/10/11 patched + { + _ApplySrcBitmapAttrib(tmpImage, srcBitmap, srcBitmap.__isOpaqueAllOver); + + if (tmpImage.depth == 16) + { + if (tmpImage.enableColorKey) + { + typedef unsigned short Pixel; + + Pixel colorKey = (Pixel) tmpImage.colorKey; + Pixel* pDest = (Pixel*) tmpImage.pBitmap; + Pixel* pDestEnd = pDest + (tmpImage.bytesPerLine * tmpImage.height / (tmpImage.depth / 8)); + + while (pDest < pDestEnd) + { + *pDest++ = colorKey; + } + } + else + { + } + } + else if (tmpImage.depth == 32) + { + typedef unsigned long Pixel; + + Pixel fillColor = 0; + Pixel* pDest = (Pixel*) tmpImage.pBitmap; + Pixel* pDestEnd = pDest + (tmpImage.bytesPerLine * tmpImage.height / (tmpImage.depth / 8)); + + while (pDest < pDestEnd) + { + *pDest++ = fillColor; + } + } + } + + bool scaled = false; + + { + _Util::LockManagerFast srcLock(srcBitmap); + SysTryReturnResult(NID_GRP, srcLock.IsValid(), E_OPERATION_FAILED, "The source bitmap cannot be locked.\n"); + + const BufferInfo& srcBufferInfo = srcLock.GetBufferInfo(); + + { + unsigned char* pPixels = (unsigned char*) srcBufferInfo.pPixels + srcRect.y * srcBufferInfo.pitch + srcRect.x * (srcBufferInfo.bitsPerPixel / 8); + + _Util::Pixmap srcImage(srcRect.width, srcRect.height, srcBufferInfo.bitsPerPixel, (void*) pPixels, srcBufferInfo.pitch); + _ApplySrcBitmapAttrib(srcImage, srcBitmap, srcBitmap.__isOpaqueAllOver); + + scaled = Tizen::Graphics::_Effect::ScaleImage(tmpImage, 0, 0, destRect.width, destRect.height, srcImage, Tizen::Graphics::_Effect::ROP_COPY); + } + } + + SysTryReturnResult(NID_GRP, scaled, E_INVALID_ARG, "The source bitmap is invalid.\n"); + } + + { + _Util::LockManagerFast dstLock(*this); + SysTryReturnResult(NID_GRP, dstLock.IsValid(), E_OPERATION_FAILED, "The canvas cannot be locked.\n"); + + const BufferInfo& dstBufferInfo = dstLock.GetBufferInfo(); + + { + _Util::Pixmap dstImageUnclipped(dstBufferInfo.width, dstBufferInfo.height, dstBufferInfo.bitsPerPixel, dstBufferInfo.pPixels, dstBufferInfo.pitch); + _Util::Pixmap dstImage = dstImageUnclipped.GetSubBitmap(clipRect.x, clipRect.y, clipRect.width, clipRect.height); + + pass = Tizen::Graphics::_Effect::DrawImageWithAlpha(dstImage, destRect.x - clipRect.x, destRect.y - clipRect.y, tmpImage, alphaConstant); + } + } + } + + SysTryReturnResult(NID_GRP, pass, E_INVALID_ARG, "The source bitmap is invalid.\n"); + + return E_SUCCESS; +} + +result +_Canvas::DrawBitmap(const _Util::Point& pointD, const _Bitmap& bitmap, FlipDirection dir) +{ + SysTryReturnResult(NID_GRP, &bitmap && bitmap.IsValid(), E_INVALID_ARG, "The source bitmap is invalid.\n"); + + int alphaConstant = this->_GetAlphaAttenuation(bitmap); + + Rectangle clipRect; + + this->__GetClipBounds(clipRect); + + { + _Util::Point point = + { + _DoubleToIntForPos(pointD.x), + _DoubleToIntForPos(pointD.y) + }; + + _Util::Pixmap* pFlippedImage = 0; + + { + _Util::LockManagerFast srcLock(bitmap); + SysTryReturnResult(NID_GRP, srcLock.IsValid(), E_OPERATION_FAILED, "The source bitmap cannot be locked.\n"); + + const BufferInfo& srcBufferInfo = srcLock.GetBufferInfo(); + + Tizen::Graphics::_Effect::Flip flip = (dir == FLIP_DIRECTION_HORIZONTAL) ? Tizen::Graphics::_Effect::FLIP_HORIZONTAL : Tizen::Graphics::_Effect::FLIP_VERTICAL; + + { + _Util::Pixmap srcImage(srcBufferInfo.width, srcBufferInfo.height, srcBufferInfo.bitsPerPixel, srcBufferInfo.pPixels, srcBufferInfo.pitch); + + pFlippedImage = Tizen::Graphics::_Effect::GetFlippedImage(srcImage, flip); + } + } + + SysTryReturnResult(NID_GRP, pFlippedImage, E_INVALID_ARG, "The source bitmap is invalid.\n"); + + _ApplySrcBitmapAttrib(*pFlippedImage, bitmap, bitmap.__isOpaqueAllOver); + + std::auto_ptr<_Util::Pixmap> autoReleasingImage(pFlippedImage); + + { + bool pass = false; + + if (!this->__useStableRenderer && pFlippedImage->depth == 32) + { + _Util::LockManagerFast dstLock(*this); + SysTryReturnResult(NID_GRP, dstLock.IsValid(), E_OPERATION_FAILED, "The canvas cannot be locked."); + + const BufferInfo& dstBufferInfo = dstLock.GetBufferInfo(); + + { + _Util::Pixmap dstImageUnclipped(dstBufferInfo.width, dstBufferInfo.height, dstBufferInfo.bitsPerPixel, dstBufferInfo.pPixels, dstBufferInfo.pitch); + _Util::Pixmap dstImage = dstImageUnclipped.GetSubBitmap(clipRect.x, clipRect.y, clipRect.width, clipRect.height); + + if (alphaConstant < 255) + { + std::unique_ptr<_Util::Pixmap> modifiedSrcImage(pFlippedImage->GetAlphaAttenuatedPixmap(alphaConstant)); + + if (modifiedSrcImage != null) + { + pass = _Pixman::CopyPixmap(dstImage, *modifiedSrcImage, GetDrawingQuality(), GetCompositeMode(), pointD.x - clipRect.x, pointD.y - clipRect.y); + } + } + + if (!pass) + { + pass = _Pixman::CopyPixmap(dstImage, *pFlippedImage, GetDrawingQuality(), GetCompositeMode(), pointD.x - clipRect.x, pointD.y - clipRect.y); + } + } + } + + if (!pass) + { + _Util::LockManagerFast dstLock(*this); + SysTryReturnResult(NID_GRP, dstLock.IsValid(), E_OPERATION_FAILED, "The canvas cannot be locked.\n"); + + const BufferInfo& dstBufferInfo = dstLock.GetBufferInfo(); + + { + _Util::Pixmap dstImageUnclipped(dstBufferInfo.width, dstBufferInfo.height, dstBufferInfo.bitsPerPixel, dstBufferInfo.pPixels, dstBufferInfo.pitch); + _Util::Pixmap dstImage = dstImageUnclipped.GetSubBitmap(clipRect.x, clipRect.y, clipRect.width, clipRect.height); + + pass = Tizen::Graphics::_Effect::DrawImageWithAlpha(dstImage, point.x - clipRect.x, point.y - clipRect.y, *pFlippedImage, alphaConstant); + } + } + + SysTryReturnResult(NID_GRP, pass, E_INVALID_ARG, "The source bitmap is invalid.\n"); + } + + return E_SUCCESS; + } +} + +result +_Canvas::DrawBitmap(const _Util::Point& pointD, const _Bitmap& bitmap, const _Util::Point& pivotD, double degreeD) +{ + SysTryReturnResult(NID_GRP, &bitmap && bitmap.IsValid(), E_INVALID_ARG, "The source bitmap is invalid.\n"); + + Rectangle clipRect; + + this->__GetClipBounds(clipRect); + + int alphaConstant = this->_GetAlphaAttenuation(bitmap); + + if (!this->__useStableRenderer && bitmap.GetBitsPerPixel() == 32) + { + bool pass = false; + + _Util::LockManagerFast srcLock(bitmap); + _Util::LockManagerFast dstLock(*this); + + SysTryReturnResult(NID_GRP, srcLock.IsValid(), E_OPERATION_FAILED, "The source bitmap cannot be locked."); + SysTryReturnResult(NID_GRP, dstLock.IsValid(), E_OPERATION_FAILED, "The canvas cannot be locked."); + + const BufferInfo& srcBufferInfo = srcLock.GetBufferInfo(); + const BufferInfo& dstBufferInfo = dstLock.GetBufferInfo(); + + { + _Util::Pixmap srcImage(srcBufferInfo.width, srcBufferInfo.height, srcBufferInfo.bitsPerPixel, srcBufferInfo.pPixels, srcBufferInfo.pitch); + _ApplySrcBitmapAttrib(srcImage, bitmap, bitmap.__isOpaqueAllOver); + + _Util::Pixmap dstImageUnclipped(dstBufferInfo.width, dstBufferInfo.height, dstBufferInfo.bitsPerPixel, dstBufferInfo.pPixels, dstBufferInfo.pitch); + _Util::Pixmap dstImage = dstImageUnclipped.GetSubBitmap(clipRect.x, clipRect.y, clipRect.width, clipRect.height); + + if (alphaConstant < 255) + { + std::unique_ptr<_Util::Pixmap> modifiedSrcImage(srcImage.GetAlphaAttenuatedPixmap(alphaConstant)); + + if (modifiedSrcImage != null) + { + pass = _Pixman::RotatePixmap(dstImage, *modifiedSrcImage.get(), GetDrawingQuality(), GetCompositeMode(), pointD.x - clipRect.x, pointD.y - clipRect.y, degreeD, pivotD.x, pivotD.y); + } + } + + if (!pass) + { + pass = _Pixman::RotatePixmap(dstImage, srcImage, GetDrawingQuality(), GetCompositeMode(), pointD.x - clipRect.x, pointD.y - clipRect.y, degreeD, pivotD.x, pivotD.y); + } + + } + + if (pass) + { + return E_SUCCESS; + } + } + +/* + if (alphaConstant >= 255) + { + return pCanvasInterface->DrawBitmap(point.x, point.y, *((IBitmapPi*)*(IBitmapPi**)bitmap.__pImpl), pivot.x, pivot.y, degree); + } + else +*/ + { + _Util::LockManagerFast srcLock(bitmap); + _Util::LockManagerFast dstLock(*this); + + SysTryReturnResult(NID_GRP, srcLock.IsValid(), E_OPERATION_FAILED, "The source bitmap cannot be locked.\n"); + SysTryReturnResult(NID_GRP, dstLock.IsValid(), E_OPERATION_FAILED, "The canvas cannot be locked.\n"); + + const BufferInfo& srcBufferInfo = srcLock.GetBufferInfo(); + const BufferInfo& dstBufferInfo = dstLock.GetBufferInfo(); + + _Util::Pixmap srcImage(srcBufferInfo.width, srcBufferInfo.height, srcBufferInfo.bitsPerPixel, srcBufferInfo.pPixels, srcBufferInfo.pitch); + _Util::Pixmap dstImageUnclipped(dstBufferInfo.width, dstBufferInfo.height, dstBufferInfo.bitsPerPixel, dstBufferInfo.pPixels, dstBufferInfo.pitch); + _Util::Pixmap dstImage = dstImageUnclipped.GetSubBitmap(clipRect.x, clipRect.y, clipRect.width, clipRect.height); + + _ApplySrcBitmapAttrib(srcImage, bitmap, bitmap.__isOpaqueAllOver); + + _Util::Point point = + { + _DoubleToIntForPos(pointD.x), + _DoubleToIntForPos(pointD.y) + }; + + Tizen::Graphics::_Effect::RotateDesc rotateDesc = { _DoubleToIntForRound(degreeD), _DoubleToIntForPos(pivotD.x), _DoubleToIntForPos(pivotD.y) }; + + bool pass = Tizen::Graphics::_Effect::RotateImage(dstImage, point.x - clipRect.x, point.y - clipRect.y, srcImage, rotateDesc, alphaConstant); + + SysTryReturnResult(NID_GRP, pass, E_INVALID_ARG, "The source bitmap is invalid.\n"); + + return E_SUCCESS; + } +} + +result +_Canvas::DrawNinePatchedBitmap(const Rectangle& rect, const _Bitmap& bitmap) +{ + SysTryReturnResult(NID_GRP, &bitmap && bitmap.IsValid(), E_INVALID_ARG, "The source bitmap is invalid.\n"); + + // down-scales the source bitmap + if (rect.width < bitmap.GetWidth() - 2 || rect.height < bitmap.GetHeight() - 2) + { +#if 1 + int dstW = rect.width; + int dstH = rect.height; + int srcW = bitmap.GetWidth() - 2; + int srcH = bitmap.GetHeight() - 2; + + if (dstW <= 0 || dstH <= 0) + { + return E_SUCCESS; + } + + if (dstW * srcH < dstH * srcW) + { + // fit to width + dstW = srcW; + dstH = dstH * srcW / dstW; + } + else + { + // fit to height + dstW = dstW * srcH / dstH; + dstH = srcH; + } + + result r; + + { + const int PADDING = 1; + + _Bitmap expandedBitmap; + + r = expandedBitmap.Construct(Dimension(dstW + PADDING * 2, dstH + PADDING * 2), BITMAP_PIXEL_FORMAT_ARGB8888); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _Util::LockManagerFast dstBitmap(expandedBitmap); + + { + const BufferInfo& dstBufferInfo = dstBitmap.GetBufferInfo(); + + memset(dstBufferInfo.pPixels, 0, dstBufferInfo.pitch * dstBufferInfo.height); + + _Canvas expandedCanvas; + + r = expandedCanvas.Construct(dstBufferInfo); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + expandedCanvas.SetDrawingQuality(BITMAP_DRAWING_QUALITY_HIGH); + expandedCanvas.SetCompositeMode(COMPOSITE_MODE_SRC); + + _Util::Pixmap dstImage(dstBufferInfo.width, dstBufferInfo.height, dstBufferInfo.bitsPerPixel, (void*) dstBufferInfo.pPixels, dstBufferInfo.pitch); + + _Util::AccumList<_Util::Pair<_Util::Rectangle, _Util::Rectangle > > boundsList; + + r = _Util::GetPatchList(boundsList, Rectangle(PADDING, PADDING, dstBufferInfo.width - PADDING * 2, dstBufferInfo.height - PADDING * 2), bitmap); + + SysTryReturn(NID_GRP, r == E_SUCCESS, null, E_SYSTEM, "[E_SYSTEM] _Util::GetPatchList() failed (error = %#x)", r); + + _Util::AccumList<_Util::Pair<_Util::Rectangle, _Util::Rectangle > >::Iterator iter = boundsList.Begin(); + + int alphaConstant = bitmap.GetAlphaConstant(); + const_cast<_Bitmap*>(&bitmap)->SetAlphaConstant(255); + + while (iter != boundsList.End()) + { + Rectangle destRect(iter->first.x, iter->first.y, iter->first.w, iter->first.h); + Rectangle sourRect(iter->second.x, iter->second.y, iter->second.w, iter->second.h); + + expandedCanvas.DrawBitmapForNinePatchedBitmap(destRect, bitmap, sourRect, true); + + ++iter; + } + + const_cast<_Bitmap*>(&bitmap)->SetAlphaConstant(alphaConstant); + expandedBitmap.SetAlphaConstant(alphaConstant); + } + + // not <- PADDING * 2> + Tizen::Graphics::Rectangle srcRect(PADDING, PADDING, expandedBitmap.GetWidth() - PADDING, expandedBitmap.GetHeight() - PADDING); + + return this->DrawBitmap(_Util::Convert >(rect), expandedBitmap, _Util::Convert >(srcRect)); + } + +#else // old spec. + Tizen::Graphics::Rectangle srcRect(1, 1, bitmap.GetWidth() - 2, bitmap.GetHeight() - 2); + + return this->DrawBitmap(rect, bitmap, srcRect); +#endif + } + + _Util::AccumList<_Util::Pair<_Util::Rectangle, _Util::Rectangle > > boundsList; + + result r = _Util::GetPatchList(boundsList, rect, bitmap); + + if (r == E_SUCCESS) + { + _Util::AccumList<_Util::Pair<_Util::Rectangle, _Util::Rectangle > >::Iterator iter = boundsList.Begin(); + + while (iter != boundsList.End()) + { + Rectangle destRect(iter->first.x, iter->first.y, iter->first.w, iter->first.h); + Rectangle sourRect(iter->second.x, iter->second.y, iter->second.w, iter->second.h); + + DrawBitmapForNinePatchedBitmap(destRect, bitmap, sourRect); + + ++iter; + } + } + + return r; +} + +result +_Canvas::DrawNineTiledBitmap(const Rectangle& rect, const _Bitmap& bitmap) +{ + SysTryReturnResult(NID_GRP, &bitmap && bitmap.IsValid(), E_INVALID_ARG, "The source bitmap is invalid.\n"); + + // down-scales the source bitmap + if (rect.width < bitmap.GetWidth() - 2 || rect.height < bitmap.GetHeight() - 2) + { + return this->DrawNinePatchedBitmap(rect, bitmap); + } + + _Util::AccumList<_Util::Pair<_Util::Rectangle, _Util::Rectangle > > boundsList; + + result r = _Util::GetPatchList(boundsList, rect, bitmap); + + if (r == E_SUCCESS) + { + // This block is slow and not optimized. + _Util::AccumList<_Util::Pair<_Util::Rectangle, _Util::Rectangle > >::Iterator iter = boundsList.Begin(); + + while (iter != boundsList.End()) + { + Rectangle destRect(iter->first.x, iter->first.y, iter->first.w, iter->first.h); + Rectangle sourRect(iter->second.x, iter->second.y, iter->second.w, iter->second.h); + + if (iter->first.w == iter->second.w && iter->first.h == iter->second.h) + { + DrawBitmapForNinePatchedBitmap(destRect, bitmap, sourRect); + } + else + { + for (int y = iter->first.y; y < iter->first.y + iter->first.h; y += iter->second.h) + { + if (y + iter->second.h <= iter->first.y + iter->first.h) + { + for (int x = iter->first.x; x < iter->first.x + iter->first.w; x += iter->second.w) + { + if (x + iter->second.w <= iter->first.x + iter->first.w) + { + Rectangle destRect(x, y, iter->second.w, iter->second.h); + DrawBitmapForNinePatchedBitmap(destRect, bitmap, sourRect); + } + else + { + // right side clipping + int w = iter->first.x + iter->first.w - x; + + Rectangle destRect(x, y, w, iter->second.h); + Rectangle sourRect(iter->second.x, iter->second.y, w, iter->second.h); + + DrawBitmapForNinePatchedBitmap(destRect, bitmap, sourRect); + } + } + } + else + { + // bottom side clipping + int h = iter->first.y + iter->first.h - y; + + for (int x = iter->first.x; x < iter->first.x + iter->first.w; x += iter->second.w) + { + if (x + iter->second.w <= iter->first.x + iter->first.w) + { + Rectangle destRect(x, y, iter->second.w, h); + Rectangle sourRect(iter->second.x, iter->second.y, iter->second.w, h); + DrawBitmapForNinePatchedBitmap(destRect, bitmap, sourRect); + } + else + { + // right-bottom side clipping + int w = iter->first.x + iter->first.w - x; + + Rectangle destRect(x, y, w, h); + Rectangle sourRect(iter->second.x, iter->second.y, w, h); + + DrawBitmapForNinePatchedBitmap(destRect, bitmap, sourRect); + } + } + } + } + } + + ++iter; + } + } + + return r; +} + +result +_Canvas::DrawEllipse(const _Util::Rectangle& bounds) +{ + _Util::Rectangle doubleBounds = + { + double(bounds.x), + double(bounds.y), + double(bounds.w), + double(bounds.h) + }; + + return this->DrawEllipse(doubleBounds); +} + +result +_Canvas::DrawEllipse(const _Util::Rectangle& bounds) +{ + if ((bounds.w <= 0.0) || (bounds.h <= 0.0)) + { + return E_SUCCESS; + } + + // this->__lineWidth is always greater than 0 + + unsigned long composedColor = _ComposeColor(this->__fgColor, this->__fgOpacity); + + _NativeGfxEngine* pCairo = static_cast<_NativeGfxEngine*>(_pNativeGfxEngine); + + bool shouldWorkAround = !__IsInClipBounds(bounds) && (this->__dashData.pattern.Size() == 0); + + if (!shouldWorkAround && pCairo && pCairo->pCairo) + { + SET_CAIRO_ALL_PROPERTIES; + + if (__lineWidth.applied != _Util::ScalarHolder::AS_INTEGER) + { + _Cairo::DrawEllipse(pCairo->pCairo, this->__lineWidth.asDouble, composedColor, bounds); + } + else + { + _Cairo::DrawEllipse(pCairo->pCairo, this->__lineWidth.asInteger, composedColor, bounds); + } + + RESET_CAIRO_ALL_PROPERTIES; + + return E_SUCCESS; + } + else if (shouldWorkAround && pCairo && pCairo->pCairo) + { + SET_CAIRO_ALL_PROPERTIES; + + double pattern = (bounds.w + bounds.h) * 2.0; + _Cairo::SetDash(pCairo->pCairo, &pattern, 1, 0); + + if (__lineWidth.applied != _Util::ScalarHolder::AS_INTEGER) + { + _Cairo::DrawEllipse(pCairo->pCairo, this->__lineWidth.asDouble, composedColor, bounds); + } + else + { + _Cairo::DrawEllipse(pCairo->pCairo, this->__lineWidth.asInteger, composedColor, bounds); + } + + RESET_CAIRO_ALL_PROPERTIES; + + return E_SUCCESS; + } + else + { + _CanvasEllipse ellipse; + _GpBufferInfo info; + + memset(&info, 0, sizeof(info)); + + SystemPixel* pBufferAddr = null; + int bufferPitch = 0; + + __pScratchPad->GetBuffer(pBufferAddr, bufferPitch); + + info.width = __pScratchPad->GetWidth(); + info.height = __pScratchPad->GetHeight(); + info.bitsPerPixel = 32; + info.pixelPerLine = bufferPitch; + info.pPixels = (void*) pBufferAddr; + info.color32 = composedColor; + info.isClipBoundsSet = this->__isClipBoundsSet; + info.clipBounds.SetBounds(this->__clipBounds.x, this->__clipBounds.y, this->__clipBounds.width, this->__clipBounds.height); + + ellipse.SetLineWidth(this->__lineWidth.asInteger); + + return ellipse.DrawEllipse(int(bounds.x), int(bounds.y), int(bounds.w), int(bounds.h), info); + } +} + +result +_Canvas::DrawLine(const _Util::Point& point1, const _Util::Point& point2) +{ + _Util::Point doublePoint1 = + { + double(point1.x), + double(point1.y) + }; + + _Util::Point doublePoint2 = + { + double(point2.x), + double(point2.y) + }; + + return this->DrawLine(doublePoint1, doublePoint2); +} + +result +_Canvas::DrawLine(const _Util::Point& point1, const _Util::Point& point2) +{ + // this->__lineWidth is always greater than 0 + + unsigned long composedColor = _ComposeColor(this->__fgColor, this->__fgOpacity); + + _NativeGfxEngine* pCairo = static_cast<_NativeGfxEngine*>(_pNativeGfxEngine); + + if (pCairo && pCairo->pCairo) + { + _Util::Point point[] = + { + { point1.x, point1.y }, + { point2.x, point2.y } + }; + + SET_CAIRO_ALL_PROPERTIES; + + if (__lineWidth.applied != _Util::ScalarHolder::AS_INTEGER) + { + _Cairo::Drawline(pCairo->pCairo, this->__lineWidth.asDouble, composedColor, point, 2); + } + else + { + _Cairo::Drawline(pCairo->pCairo, this->__lineWidth.asInteger, composedColor, point, 2); + } + + RESET_CAIRO_ALL_PROPERTIES; + + return E_SUCCESS; + } + else + { + _CanvasLine line; + _GpBufferInfo info; + + _GpPoint startPt = + { + int(point1.x), + int(point1.y) + }; + + _GpPoint endPt = + { + int(point2.x), + int(point2.y) + }; + + memset(&info, 0, sizeof(info)); + + SystemPixel* pBufferAddr = null; + int bufferPitch = 0; + + __pScratchPad->GetBuffer(pBufferAddr, bufferPitch); + + info.width = __pScratchPad->GetWidth(); + info.height = __pScratchPad->GetHeight(); + info.bitsPerPixel = 32; + info.pixelPerLine = bufferPitch; + info.pPixels = (void*) pBufferAddr; + info.color32 = composedColor; + info.isClipBoundsSet = this->__isClipBoundsSet; + info.clipBounds.SetBounds(this->__clipBounds.x, this->__clipBounds.y, this->__clipBounds.width, this->__clipBounds.height); + + line.SetLineWidth(this->__lineWidth.asInteger); + + if (this->__lineWidth.asInteger == 1) + { + if ((startPt.x == endPt.x) && (startPt.y == endPt.y)) + { + this->SetPixel(point1); + return E_SUCCESS; + } + } + + return line.DrawLine(startPt, endPt, info); + } +} + +result +_Canvas::DrawPolygon(const _Util::Point* pPoints, unsigned int pointCount) +{ + // this->__lineWidth is always greater than 0 + + if (pointCount == 1) + { + return this->SetPixel(pPoints[0]); + } + + unsigned long composedColor = _ComposeColor(this->__fgColor, this->__fgOpacity); + + _NativeGfxEngine* pCairo = static_cast<_NativeGfxEngine*>(_pNativeGfxEngine); + + if (pCairo && pCairo->pCairo) + { + SET_CAIRO_ALL_PROPERTIES; + + _Cairo::DrawPolygon(pCairo->pCairo, this->__lineWidth.asInteger, composedColor, pPoints, pointCount); + + RESET_CAIRO_ALL_PROPERTIES; + + return E_SUCCESS; + } + else + { + std::unique_ptr<_GpPoint[]> tempPoints(new (std::nothrow) _GpPoint[pointCount]); + + _GpPoint* pTempPoints = tempPoints.get(); + + if (pTempPoints == null) + { + return E_SYSTEM; + } + + for (unsigned int i = 0; i < pointCount; i++) + { + pTempPoints[i].x = int(pPoints[i].x); + pTempPoints[i].y = int(pPoints[i].y); + } + + _CanvasLine line; + _GpBufferInfo info; + + memset(&info, 0, sizeof(info)); + + SystemPixel* pBufferAddr = null; + int bufferPitch = 0; + + __pScratchPad->GetBuffer(pBufferAddr, bufferPitch); + + info.width = __pScratchPad->GetWidth(); + info.height = __pScratchPad->GetHeight(); + info.bitsPerPixel = 32; + info.pixelPerLine = bufferPitch; + info.pPixels = (void*) pBufferAddr; + info.color32 = composedColor; + info.isClipBoundsSet = this->__isClipBoundsSet; + info.clipBounds.SetBounds(this->__clipBounds.x, this->__clipBounds.y, this->__clipBounds.width, this->__clipBounds.height); + + line.SetLineWidth(this->__lineWidth.asInteger); + + result r = line.DrawPolygon(int(pointCount), pTempPoints, info); + + return r; + } +} + +result +_Canvas::DrawPolyline(const _Util::Point* pPoints, unsigned int pointCount) +{ + // this->__lineWidth is always greater than 0 + + if (pointCount == 1) + { + return this->SetPixel(pPoints[0]); + } + + unsigned long composedColor = _ComposeColor(this->__fgColor, this->__fgOpacity); + + _NativeGfxEngine* pCairo = static_cast<_NativeGfxEngine*>(_pNativeGfxEngine); + + if (pCairo && pCairo->pCairo) + { + SET_CAIRO_ALL_PROPERTIES; + + if (__lineWidth.applied != _Util::ScalarHolder::AS_INTEGER) + { + _Cairo::DrawPolyline(pCairo->pCairo, this->__lineWidth.asDouble, composedColor, pPoints, pointCount); + } + else + { + _Cairo::DrawPolyline(pCairo->pCairo, this->__lineWidth.asInteger, composedColor, pPoints, pointCount); + } + + RESET_CAIRO_ALL_PROPERTIES; + + return E_SUCCESS; + } + else + { + std::unique_ptr<_GpPoint[]> tempPoints(new (std::nothrow) _GpPoint[pointCount]); + + _GpPoint* pTempPoints = tempPoints.get(); + + if (pTempPoints == null) + { + return E_SYSTEM; + } + + for (unsigned int i = 0; i < pointCount; i++) + { + pTempPoints[i].x = int(pPoints[i].x); + pTempPoints[i].y = int(pPoints[i].y); + } + + _CanvasLine line; + _GpBufferInfo info; + + memset(&info, 0, sizeof(info)); + + SystemPixel* pBufferAddr = null; + int bufferPitch = 0; + + __pScratchPad->GetBuffer(pBufferAddr, bufferPitch); + + info.width = __pScratchPad->GetWidth(); + info.height = __pScratchPad->GetHeight(); + info.bitsPerPixel = 32; + info.pixelPerLine = bufferPitch; + info.pPixels = (void*) pBufferAddr; + info.color32 = composedColor; + info.isClipBoundsSet = this->__isClipBoundsSet; + info.clipBounds.SetBounds(this->__clipBounds.x, this->__clipBounds.y, this->__clipBounds.width, this->__clipBounds.height); + + line.SetLineWidth(this->__lineWidth.asInteger); + + result r = line.DrawPolyLine(int(pointCount), pTempPoints, info); + + return r; + } +} + +result +_Canvas::DrawRectangle(const _Util::Rectangle& rect) +{ + _Util::Rectangle doubleRect = + { + double(rect.x), + double(rect.y), + double(rect.w), + double(rect.h) + }; + + return this->DrawRectangle(doubleRect); +} + +result +_Canvas::DrawRectangle(const _Util::Rectangle& rectangle) +{ + if ((rectangle.w <= 0.0) || (rectangle.h <= 0.0)) + { + return E_SUCCESS; + } + + unsigned long composedColor = _ComposeColor(this->__fgColor, this->__fgOpacity); + + bool tryToDrawWithCairo = (__lineWidth.applied == _Util::ScalarHolder::AS_DOUBLE || __lineWidth.asInteger > 1 || __dashData.pattern.Size() > 0); + + if (tryToDrawWithCairo) + { + _NativeGfxEngine* pCairo = static_cast<_NativeGfxEngine*>(_pNativeGfxEngine); + + if (pCairo && pCairo->pCairo) + { + SET_CAIRO_ALL_PROPERTIES; + + if (__lineWidth.applied != _Util::ScalarHolder::AS_INTEGER) + { + _Cairo::DrawRectangle(pCairo->pCairo, this->__lineWidth.asDouble, composedColor, rectangle); + } + else + { + _Cairo::DrawRectangle(pCairo->pCairo, this->__lineWidth.asInteger, composedColor, rectangle); + } + + RESET_CAIRO_ALL_PROPERTIES; + + return E_SUCCESS; + } + } + + // falls through legacy drawing solution + + int x1 = static_cast(rectangle.x); + int y1 = static_cast(rectangle.y); + int x2 = x1 + static_cast(rectangle.w) - 1; + int y2 = y1 + static_cast(rectangle.h) - 1; + + if (this->__lineWidth.asInteger == 1) + { + if (!this->__isClipBoundsSet) + { + __pScratchPad->RegisterFillRect(_RasterOp::FnFillRectAlpha32Bit); + + if (x2 > x1 && y2 > y1) + { + __pScratchPad->FillRect(x1, y1, x2 - x1, 1, composedColor); + __pScratchPad->FillRect(x2, y1, 1, y2 - y1, composedColor); + + __pScratchPad->FillRect(x1 + 1, y2, x2 - x1, 1, composedColor); + __pScratchPad->FillRect(x1, y1 + 1, 1, y2 - y1, composedColor); + } + else + { + __pScratchPad->FillRect(x1, y1, static_cast(rectangle.w), static_cast(rectangle.h), composedColor); + } + + __pScratchPad->RegisterFillRect(null); + } + else + { + _Util::Rectangle clip = { this->__clipBounds.x, this->__clipBounds.y, this->__clipBounds.width, this->__clipBounds.height }; + + if (x2 > x1 && y2 > y1) + { + _Util::Rectangle rect1 = { x1, y1, x2 - x1, 1 }; + _Util::Rectangle rect2 = { x2, y1, 1, y2 - y1 }; + _Util::Rectangle rect3 = { x1 + 1, y2, x2 - x1, 1 }; + _Util::Rectangle rect4 = { x1, y1 + 1, 1, y2 - y1 }; + + _FillRectangleWithClip(__pScratchPad, composedColor, rect1, clip); + _FillRectangleWithClip(__pScratchPad, composedColor, rect2, clip); + _FillRectangleWithClip(__pScratchPad, composedColor, rect3, clip); + _FillRectangleWithClip(__pScratchPad, composedColor, rect4, clip); + } + else + { + _Util::Rectangle rect1 = { x1, y1, static_cast(rectangle.w), static_cast(rectangle.h) }; + + _FillRectangleWithClip(__pScratchPad, composedColor, rect1, clip); + } + } + + return E_SUCCESS; + } + else if (this->__lineWidth.asInteger > 1) + { + _GpPoint tempPoints[4] = + { + { x1, y1 }, + { x2, y1 }, + { x2, y2 }, + { x1, y2 } + }; + + _CanvasLine line; + _GpBufferInfo info; + + memset(&info, 0, sizeof(info)); + + SystemPixel* pBufferAddr = null; + int bufferPitch = 0; + + __pScratchPad->GetBuffer(pBufferAddr, bufferPitch); + + info.width = __pScratchPad->GetWidth(); + info.height = __pScratchPad->GetHeight(); + info.bitsPerPixel = 32; + info.pixelPerLine = bufferPitch; + info.pPixels = (void*) pBufferAddr; + info.color32 = composedColor; + info.isClipBoundsSet = this->__isClipBoundsSet; + info.clipBounds.SetBounds(this->__clipBounds.x, this->__clipBounds.y, this->__clipBounds.width, this->__clipBounds.height); + + line.SetLineWidth(this->__lineWidth.asInteger); + + result r = line.DrawPolygon(4, tempPoints, info); + + return r; + } + + // this->__lineWidth is always greater than 0 + return E_SUCCESS; +} + +result +_Canvas::DrawRoundRectangle(const _Util::Rectangle& rect, const _Util::Dimension& arcDim) +{ + _Util::Rectangle doubleRect = + { + double(rect.x), + double(rect.y), + double(rect.w), + double(rect.h) + }; + + _Util::Dimension doubleArcDim = + { + double(rect.w), + double(rect.h) + }; + + return this->DrawRoundRectangle(doubleRect, doubleArcDim); +} + +result +_Canvas::DrawRoundRectangle(const _Util::Rectangle& rect, const _Util::Dimension& arcDim) +{ + if ((rect.w <= 0.0) || (rect.h <= 0)) + { + return E_SUCCESS; + } + + if ((int(arcDim.w) == 0) || (int(arcDim.h) == 0)) + { + return this->DrawRectangle(rect); + } + + _Util::Dimension revisedArcDim = + { + (arcDim.w <= rect.w / 2.0) ? arcDim.w : rect.w / 2.0, + (arcDim.h <= rect.h / 2.0) ? arcDim.h : rect.h / 2.0 + }; + + // this->__lineWidth is always greater than 0 + + unsigned long composedColor = _ComposeColor(this->__fgColor, this->__fgOpacity); + + _NativeGfxEngine* pCairo = static_cast<_NativeGfxEngine*>(_pNativeGfxEngine); + + if (pCairo && pCairo->pCairo) + { + SET_CAIRO_ALL_PROPERTIES; + + if (__lineWidth.applied != _Util::ScalarHolder::AS_INTEGER) + { + _Cairo::DrawRoundRectangle(pCairo->pCairo, this->__lineWidth.asDouble, composedColor, rect, revisedArcDim); + } + else + { + _Cairo::DrawRoundRectangle(pCairo->pCairo, this->__lineWidth.asInteger, composedColor, rect, revisedArcDim); + } + + RESET_CAIRO_ALL_PROPERTIES; + + return E_SUCCESS; + } + else + { + _CanvasRoundRect roundRect; + _GpBufferInfo info; + + memset(&info, 0, sizeof(info)); + + SystemPixel* pBufferAddr = null; + int bufferPitch = 0; + + __pScratchPad->GetBuffer(pBufferAddr, bufferPitch); + + info.width = __pScratchPad->GetWidth(); + info.height = __pScratchPad->GetHeight(); + info.bitsPerPixel = 32; + info.pixelPerLine = bufferPitch; + info.pPixels = (void*) pBufferAddr; + info.color32 = composedColor; + info.isClipBoundsSet = this->__isClipBoundsSet; + info.clipBounds.SetBounds(this->__clipBounds.x, this->__clipBounds.y, this->__clipBounds.width, this->__clipBounds.height); + + roundRect.SetLineWidth(this->__lineWidth.asInteger); + + return roundRect.DrawRoundRect(int(rect.x), int(rect.y), int(rect.w), int(rect.h), int(revisedArcDim.w), int(revisedArcDim.h), info); + } +} + +result +_Canvas::DrawTriangle(const _Util::Point& point1, const _Util::Point& point2, const _Util::Point& point3) +{ + // this->__lineWidth is always greater than 0 + + unsigned long composedColor = _ComposeColor(this->__fgColor, this->__fgOpacity); + + _NativeGfxEngine* pCairo = static_cast<_NativeGfxEngine*>(_pNativeGfxEngine); + + if (pCairo && pCairo->pCairo) + { + _Util::Point point[] = + { + { point1.x, point1.y }, + { point2.x, point2.y }, + { point3.x, point3.y } + }; + + SET_CAIRO_ALL_PROPERTIES; + + if (__lineWidth.applied != _Util::ScalarHolder::AS_INTEGER) + { + _Cairo::DrawPolygon(pCairo->pCairo, this->__lineWidth.asDouble, composedColor, point, 3); + } + else + { + _Cairo::DrawPolygon(pCairo->pCairo, this->__lineWidth.asInteger, composedColor, point, 3); + } + + RESET_CAIRO_ALL_PROPERTIES; + + return E_SUCCESS; + } + else + { + _CanvasTriangle triangle; + _GpBufferInfo info; + + memset(&info, 0, sizeof(info)); + + SystemPixel* pBufferAddr = null; + int bufferPitch = 0; + + __pScratchPad->GetBuffer(pBufferAddr, bufferPitch); + + info.width = __pScratchPad->GetWidth(); + info.height = __pScratchPad->GetHeight(); + info.bitsPerPixel = 32; + info.pixelPerLine = bufferPitch; + info.pPixels = (void*) pBufferAddr; + info.color32 = composedColor; + info.isClipBoundsSet = this->__isClipBoundsSet; + info.clipBounds.SetBounds(this->__clipBounds.x, this->__clipBounds.y, this->__clipBounds.width, this->__clipBounds.height); + + triangle.SetLineWidth(this->__lineWidth.asInteger); + + _GpPoint p1 = { int(point1.x), int(point1.y) }; + _GpPoint p2 = { int(point2.x), int(point2.y) }; + _GpPoint p3 = { int(point3.x), int(point3.y) }; + + return triangle.DrawTriangle(p1, p2, p3, info); + } +} + +result +_Canvas::FillTriangle(const Color& color, const _Util::Point& point1, const _Util::Point& point2, const _Util::Point& point3) +{ + unsigned long composedColor = _ComposeColor(color.GetRGB32(), this->__fgOpacity); + + _Util::Point doublePoint1 = + { + double(point1.x), + double(point1.y) + }; + + _Util::Point doublePoint2 = + { + double(point1.x), + double(point1.y) + }; + + _Util::Point doublePoint3 = + { + double(point1.x), + double(point1.y) + }; + + return this->__FillTriangle(composedColor, doublePoint1, doublePoint2, doublePoint3); +} + +result +_Canvas::FillTriangle(const Color& color, const _Util::Point& point1, const _Util::Point& point2, const _Util::Point& point3) +{ + unsigned long composedColor = _ComposeColor(color.GetRGB32(), this->__fgOpacity); + + return this->__FillTriangle(composedColor, point1, point2, point3); +} + +result +_Canvas::__FillTriangle(unsigned long composedColor, const _Util::Point& point1, const _Util::Point& point2, const _Util::Point& point3) +{ + // this->__lineWidth is always greater than 0 + + _NativeGfxEngine* pCairo = static_cast<_NativeGfxEngine*>(_pNativeGfxEngine); + + if (pCairo && pCairo->pCairo) + { + _Util::Point point[] = + { + { point1.x, point1.y }, + { point2.x, point2.y }, + { point3.x, point3.y } + }; + + SET_CAIRO_FILL_PROPERTIES; + + _Cairo::FillPolygon(pCairo->pCairo, composedColor, point, 3); + + RESET_CAIRO_FILL_PROPERTIES; + + return E_SUCCESS; + } + else + { + _CanvasTriangle triangle; + _GpBufferInfo info; + + memset(&info, 0, sizeof(info)); + + SystemPixel* pBufferAddr = null; + int bufferPitch = 0; + + __pScratchPad->GetBuffer(pBufferAddr, bufferPitch); + + info.width = __pScratchPad->GetWidth(); + info.height = __pScratchPad->GetHeight(); + info.bitsPerPixel = 32; + info.pixelPerLine = bufferPitch; + info.pPixels = (void*) pBufferAddr; + info.color32 = composedColor; + info.isClipBoundsSet = this->__isClipBoundsSet; + info.clipBounds.SetBounds(this->__clipBounds.x, this->__clipBounds.y, this->__clipBounds.width, this->__clipBounds.height); + + triangle.SetLineWidth(this->__lineWidth.asInteger); + + return triangle.FillTriangle(int(point1.x), int(point1.y), int(point2.x), int(point2.y), int(point3.x), int(point3.y), info); + } +} + +result +_Canvas::__FillEllipse(unsigned long composedColor, const _Util::Rectangle& bounds) +{ + if ((bounds.w <= 0.0) || (bounds.h <= 0.0)) + { + return E_SUCCESS; + } + + // this->__lineWidth is always greater than 0 + + _NativeGfxEngine* pCairo = static_cast<_NativeGfxEngine*>(_pNativeGfxEngine); + + if (pCairo && pCairo->pCairo) + { + SET_CAIRO_FILL_PROPERTIES; + + _Cairo::FillEllipse(pCairo->pCairo, composedColor, bounds); + + RESET_CAIRO_FILL_PROPERTIES; + + return E_SUCCESS; + } + else + { + _CanvasEllipse ellipse; + _GpBufferInfo info; + + memset(&info, 0, sizeof(info)); + + SystemPixel* pBufferAddr = null; + int bufferPitch = 0; + + __pScratchPad->GetBuffer(pBufferAddr, bufferPitch); + + info.width = __pScratchPad->GetWidth(); + info.height = __pScratchPad->GetHeight(); + info.bitsPerPixel = 32; + info.pixelPerLine = bufferPitch; + info.pPixels = (void*) pBufferAddr; + info.color32 = composedColor; + info.isClipBoundsSet = this->__isClipBoundsSet; + info.clipBounds.SetBounds(this->__clipBounds.x, this->__clipBounds.y, this->__clipBounds.width, this->__clipBounds.height); + + ellipse.SetLineWidth(this->__lineWidth.asInteger); + + return ellipse.FillElliepse(int(bounds.x), int(bounds.y), int(bounds.w), int(bounds.h), info); + } +} + +result +_Canvas::FillEllipse(const Color& color, const _Util::Rectangle& bounds) +{ + unsigned long composedColor = _ComposeColor(color.GetRGB32(), this->__fgOpacity); + + _Util::Rectangle doubleBounds = + { + double(bounds.x), + double(bounds.y), + double(bounds.w), + double(bounds.h) + }; + + return this->__FillEllipse(composedColor, doubleBounds); +} + +result +_Canvas::FillEllipse(const Color& color, const _Util::Rectangle& bounds) +{ + unsigned long composedColor = _ComposeColor(color.GetRGB32(), this->__fgOpacity); + + return this->__FillEllipse(composedColor, bounds); +} + +result +_Canvas::FillPolygon(const Color& color, const _Util::Point* pPoints, unsigned int pointCount) +{ + // + // Implementation of this method in API versions prior to 2.0 has the following issue: + // + // -# If there are 4 input points and conditions below is satisfied, the drawing result does not match the expected behavior. @n + // + // "point[0].x == point[3].x && point[1].x == point[2].x && point[0].y == point[1].y && point[2].y == point[3].y" + // + // there are 4 cases can be occurred. + // + // [case1] (p[0]->x > p[1]->x && p[0]->y > p[3]->y) + // + // p2________p3 + // | | + // | | + // | | <--- expected result + // | | + // p1--------p0_________ + // | | + // | | + // | | <--- wrong result + // | | + // --------- + // + // [case2] (p[0]->x < p[1]->x && p[0]->y > p[3]->y) + // + // p3________p2 + // | | + // | | + // | | <--- expected result + // | | + // p0--------p1 + // | | + // | | + // | | <--- wrong result + // | | + // --------- + // + // [case3] (p[0]->x < p[1]->x && p[0]->y < p[3]->y) + // + // p0________p1 + // | | + // | | + // | | <--- no problem. + // | | + // p3--------p2 + // + // + // [case4] (p[0]->x > p[1]->x && p[0]->y < p[3]->y) + // + // p1________p0________ + // | | | + // | | | + // | | | <--- wrong result + // | | | + // p2--------p3-------- + // ^ + // | + // -- expected result + // + // The issue mentioned above is resolved in API version 2.0, So, check the SDK version and emulate problem before step forward furthermore. + // + // CR approved, no. EP-47D6817268074396919211307C39CA55 + // + + // this->__lineWidth is always greater than 0 + + unsigned long composedColor = _ComposeColor(color.GetRGB32(), this->__fgOpacity); + + _NativeGfxEngine* pCairo = static_cast<_NativeGfxEngine*>(_pNativeGfxEngine); + + if (pCairo && pCairo->pCairo) + { + SET_CAIRO_FILL_PROPERTIES; + + _Cairo::FillPolygon(pCairo->pCairo, composedColor, pPoints, pointCount); + + RESET_CAIRO_FILL_PROPERTIES; + + return E_SUCCESS; + } + else + { + _CanvasFillPolygon polygon; + _GpBufferInfo info; + + memset(&info, 0, sizeof(info)); + + SystemPixel* pBufferAddr = null; + int bufferPitch = 0; + + __pScratchPad->GetBuffer(pBufferAddr, bufferPitch); + + info.width = __pScratchPad->GetWidth(); + info.height = __pScratchPad->GetHeight(); + info.bitsPerPixel = 32; + info.pixelPerLine = bufferPitch; + info.pPixels = (void*) pBufferAddr; + info.color32 = composedColor; + info.isClipBoundsSet = this->__isClipBoundsSet; + info.clipBounds.SetBounds(this->__clipBounds.x, this->__clipBounds.y, this->__clipBounds.width, this->__clipBounds.height); + + polygon.SetLineWidth(this->__lineWidth.asInteger); + + std::unique_ptr<_GpPoint[]> tempPoints(new (std::nothrow) _GpPoint[pointCount]); + + _GpPoint* pTempPoints = tempPoints.get(); + + if (pTempPoints == null) + { + return E_SYSTEM; + } + + for (unsigned int i = 0; i < pointCount; i++) + { + pTempPoints[i].x = int(pPoints[i].x); + pTempPoints[i].y = int(pPoints[i].y); + } + + result r = polygon.FillPolygon(int(pointCount), pTempPoints, info); + + return r; + } +} + +result +_Canvas::__FillRectangle(unsigned long composedColor, const _Util::Rectangle& rectangle) +{ + if ((rectangle.w <= 0.0) || (rectangle.h <= 0.0)) + { + return E_SUCCESS; + } + + _NativeGfxEngine* pCairo = static_cast<_NativeGfxEngine*>(_pNativeGfxEngine); + + if (pCairo && pCairo->pCairo) + { + SET_CAIRO_FILL_PROPERTIES; + + _Cairo::FillRectangle(pCairo->pCairo, composedColor, rectangle); + + RESET_CAIRO_FILL_PROPERTIES; + + return E_SUCCESS; + } + else + { + _Util::Rectangle rect = + { + static_cast(rectangle.x), + static_cast(rectangle.y), + static_cast(rectangle.w), + static_cast(rectangle.h) + }; + + if (this->__isClipBoundsSet) + { + int x1 = rect.x; + int y1 = rect.y; + int x2 = x1 + rect.w; + int y2 = y1 + rect.h; + + x1 = (x1 >= this->__clipBounds.x) ? x1 : this->__clipBounds.x; + y1 = (y1 >= this->__clipBounds.y) ? y1 : this->__clipBounds.y; + + x2 = (x2 <= this->__clipBounds.x + this->__clipBounds.width) ? x2 : this->__clipBounds.x + this->__clipBounds.width; + y2 = (y2 <= this->__clipBounds.y + this->__clipBounds.height) ? y2 : this->__clipBounds.y + this->__clipBounds.height; + + rect.x = x1; + rect.y = y1; + rect.w = x2 - x1; + rect.h = y2 - y1; + } + + if (rect.w > 0 && rect.h > 0) + { + // alpha-fill-rect() applied + __pScratchPad->RegisterFillRect(_RasterOp::FnFillRectAlpha32Bit); + __pScratchPad->FillRect(rect.x, rect.y, rect.w, rect.h, composedColor); + __pScratchPad->RegisterFillRect(null); + } + } + + return E_SUCCESS; +} + +result +_Canvas::FillRectangle(const Color& color, const Rectangle& rect) +{ + unsigned long composedColor = _ComposeColor(color.GetRGB32(), this->__fgOpacity); + + return this->__FillRectangle(composedColor, _Util::Convert >(rect)); +} + +result +_Canvas::FillRectangle(const Color& color, const _Util::Rectangle& rect) +{ + unsigned long composedColor = _ComposeColor(color.GetRGB32(), this->__fgOpacity); + + _Util::Rectangle doubleRect = + { + double(rect.x), + double(rect.y), + double(rect.w), + double(rect.h) + }; + + return this->__FillRectangle(composedColor, doubleRect); +} + +result +_Canvas::FillRectangle(const Color& color, const _Util::Rectangle& rect) +{ + unsigned long composedColor = _ComposeColor(color.GetRGB32(), this->__fgOpacity); + + return this->__FillRectangle(composedColor, rect); +} + +result +_Canvas::FillRoundRectangle(const Color& color, const _Util::Rectangle& rect, const _Util::Dimension& arcDim) +{ + unsigned long composedColor = _ComposeColor(color.GetRGB32(), this->__fgOpacity); + + _Util::Rectangle doubleRect = + { + double(rect.x), + double(rect.y), + double(rect.w), + double(rect.h) + }; + + _Util::Dimension doubleArcDim = + { + double(rect.w), + double(rect.h) + }; + + return this->__FillRoundRectangle(composedColor, doubleRect, doubleArcDim); +} + +result +_Canvas::FillRoundRectangle(const Color& color, const _Util::Rectangle& rect, const _Util::Dimension& arcDim) +{ + unsigned long composedColor = _ComposeColor(color.GetRGB32(), this->__fgOpacity); + + return this->__FillRoundRectangle(composedColor, rect, arcDim); +} + +result +_Canvas::__FillRoundRectangle(unsigned long composedColor, const _Util::Rectangle& rect, const _Util::Dimension& arcDim) +{ + if ((rect.w <= 0.0) || (rect.h <= 0.0)) + { + return E_SUCCESS; + } + + if ((int(arcDim.w) <= 0) || (int(arcDim.h) <= 0)) + { + return this->__FillRectangle(composedColor, rect); + } + + _Util::Dimension revisedArcDim = + { + (arcDim.w <= rect.w / 2.0) ? arcDim.w : rect.w / 2.0, + (arcDim.h <= rect.h / 2.0) ? arcDim.h : rect.h / 2.0 + }; + + // this->__lineWidth is always greater than 0 + + _NativeGfxEngine* pCairo = static_cast<_NativeGfxEngine*>(_pNativeGfxEngine); + + if (pCairo && pCairo->pCairo) + { + SET_CAIRO_FILL_PROPERTIES; + + _Cairo::FillRoundRectangle(pCairo->pCairo, composedColor, rect, revisedArcDim); + + RESET_CAIRO_FILL_PROPERTIES; + + return E_SUCCESS; + } + else + { + _CanvasRoundRect roundRect; + _GpBufferInfo info; + + memset(&info, 0, sizeof(info)); + + SystemPixel* pBufferAddr = null; + int bufferPitch = 0; + + __pScratchPad->GetBuffer(pBufferAddr, bufferPitch); + + info.width = __pScratchPad->GetWidth(); + info.height = __pScratchPad->GetHeight(); + info.bitsPerPixel = 32; + info.pixelPerLine = bufferPitch; + info.pPixels = (void*) pBufferAddr; + info.color32 = composedColor; + info.isClipBoundsSet = this->__isClipBoundsSet; + info.clipBounds.SetBounds(this->__clipBounds.x, this->__clipBounds.y, this->__clipBounds.width, this->__clipBounds.height); + + roundRect.SetLineWidth(this->__lineWidth.asInteger); + + return roundRect.FillRoundRectangle(int(rect.x), int(rect.y), int(rect.w), int(rect.h), int(revisedArcDim.w), int(revisedArcDim.h), info); + } +} + +result +_Canvas::DrawText(const Point& point, const Tizen::Base::String& text) +{ + return _Font::DrawText(*this, point, text, 0, text.GetLength()); +} + +result +_Canvas::DrawText(const Point& point, const Tizen::Base::String& text, int startIndex, int length) +{ + return _Font::DrawText(*this, point, text, startIndex, length); +} + +result +_Canvas::DrawText(const Point& point, const Tizen::Base::String& text, int startIndex, int length, const Color& outlineColor) +{ + return _Font::DrawText(*this, point, text, startIndex, length, outlineColor); +} + +Rectangle +_Canvas::GetBounds(void) const +{ + Rectangle rect(this->__xBufferPos, this->__yBufferPos, __pScratchPad->GetWidth(), __pScratchPad->GetHeight()); + + if (this->__windowHandle != INVALID_HANDLE) + { + rect.x = 0; + rect.y = 0; + } + + return rect; +} + +LineStyle +_Canvas::GetLineStyle() const +{ + SysTryReturn(NID_GRP, this && this->__pSurface, LINE_STYLE_MAX, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not constructed yet.\n"); + + return this->__lineStyle; +} + +int +_Canvas::GetLineWidth() const +{ + SysTryReturn(NID_GRP, this && this->__pSurface, -1, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not constructed yet.\n"); + + return this->__lineWidth.asInteger; +} + +LineCapStyle +_Canvas::GetLineCapStyle() const +{ + SysTryReturn(NID_GRP, this && this->__pSurface, LINE_CAP_STYLE_ROUND, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not constructed yet.\n"); + + return this->__lineCapStyle; +} + +LineJoinStyle +_Canvas::GetLineJoinStyle() const +{ + SysTryReturn(NID_GRP, this && this->__pSurface, LINE_JOIN_STYLE_ROUND, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not constructed yet.\n"); + + return this->__lineJoinStyle; +} + +result +_Canvas::SetLineStyle(LineStyle style) +{ + this->__lineStyle = style; + + return E_SUCCESS; +} + +result +_Canvas::SetLineWidth(int width, float widthAsFloat) +{ + SysTryReturnResult(NID_GRP, width > 0 || widthAsFloat >= 0.0f, E_OUT_OF_RANGE, "The given line width(%d) is out of range.\n", width); + + this->__lineWidth = width; + this->__lineWidth.asDouble = double(widthAsFloat); + + return E_SUCCESS; +} + +result +_Canvas::SetLineWidth(float width) +{ + SysTryReturnResult(NID_GRP, width > 0.0f, E_OUT_OF_RANGE, "The given line width(%f) is out of range.\n", width); + + this->__lineWidth = width; + + return E_SUCCESS; +} + +result +_Canvas::SetLineCapStyle(LineCapStyle lineCapStyle) +{ + this->__lineCapStyle = lineCapStyle; + + return E_SUCCESS; +} + +result +_Canvas::SetLineJoinStyle(LineJoinStyle lineJoinStyle) +{ + this->__lineJoinStyle = lineJoinStyle; + + return E_SUCCESS; +} + +result +_Canvas::SetDashPattern(const Tizen::Graphics::_Util::AccumList& dashValueList, double offset) +{ + SysTryReturn(NID_GRP, this && this->__pSurface, E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not constructed yet.\n"); + + { + Tizen::Graphics::_Util::AccumList listSwap; + this->__dashData.pattern.Swap(listSwap); + + this->__dashData.offset = 0.0; + } + + { + Tizen::Graphics::_Util::AccumList::ConstIterator dashIterator = dashValueList.Begin(); + + for (; dashIterator != dashValueList.End(); dashIterator++) + { + this->__dashData.pattern.Push(*dashIterator); + } + + this->__dashData.offset = offset; + } + + return E_SUCCESS; +} + +void +_Canvas::SetDrawingQuality(BitmapDrawingQuality quality) +{ + // 'quality' is verified in _CanvasImpl::SetDrawingQuality() + this->__bitmapDrawingQuality = quality; +} + +BitmapDrawingQuality +_Canvas::GetDrawingQuality(void) const +{ + return this->__bitmapDrawingQuality; +} + +void +_Canvas::SetCompositeMode(CompositeMode compositeMode) +{ + // 'blendingMode' is verified in _CanvasImpl::SetBlendingMode() + this->__compositeMode = compositeMode; +} + +CompositeMode +_Canvas::GetCompositeMode(void) const +{ + return this->__compositeMode; +} + +result +_Canvas::GetPixel(const Point& point, Color& color) const +{ + Point pos(point.x, point.y); + + // [ykahn 2011.06.27] revise the value of 'point' if it goes out-of-range + { + Rectangle rtCanvas = _GetBoundsRel(*this); + + SysTryReturnResult(NID_GRP, !rtCanvas.IsEmpty(), E_OUT_OF_RANGE, "Cannot get the bounds of the canvas.\n"); + + if (pos.x >= rtCanvas.width && rtCanvas.width >= 1) + { + pos.x = rtCanvas.width - 1; + } + + if (pos.y >= rtCanvas.height && rtCanvas.height >= 1) + { + pos.y = rtCanvas.height - 1; + } + } + + { + result r = E_OUT_OF_RANGE; + + Rectangle rect = this->GetBounds(); + + rect.x = 0; + rect.y = 0; + + if ((point.x >= rect.x && point.x < rect.x + rect.width) && (point.y >= rect.y && point.y < rect.y + rect.height)) + { + BufferInfo info; + + (const_cast<_Canvas*>(this))->Lock(info); + + if (info.bitsPerPixel == 32) + { + unsigned long* pDest32 = (unsigned long*) info.pPixels; + long pitch = info.pitch / 4; + + color.SetRGB32(pDest32[pitch * point.y + point.x], true); + + r = E_SUCCESS; + } + else if (info.bitsPerPixel == 16) + { + unsigned short* pDest16 = (unsigned short*) info.pPixels; + long pitch = info.pitch / 2; + + unsigned short color16 = pDest16[pitch * point.y + point.x]; + + unsigned long r = (color16 & 0xF800) >> 8; + unsigned long g = (color16 & 0x07E0) >> 3; + unsigned long b = (color16 & 0x001F) << 3; + + r += (r >> 5); + g += (g >> 6); + b += (b >> 5); + + unsigned long color32 = 0xFF000000 | (r << 16) | (g << 8) | (b); + + color.SetRGB32(color32, true); + + r = E_SUCCESS; + } + + (const_cast<_Canvas*>(this))->Unlock(); + } + + return r; + } +} + +result +_Canvas::SetPixel(const _Util::Point& point) +{ + unsigned long composedColor = _ComposeColor(this->__fgColor, this->__fgOpacity); + + _NativeGfxEngine* pCairo = static_cast<_NativeGfxEngine*>(_pNativeGfxEngine); + + if (pCairo && pCairo->pCairo) + { + _Util::Rectangle rectangle = {double(point.x), double(point.y), 1.0, 1.0}; + + SET_CAIRO_FILL_PROPERTIES; + + _Cairo::FillRectangle(pCairo->pCairo, composedColor, rectangle); + + RESET_CAIRO_FILL_PROPERTIES; + + return E_SUCCESS; + } + + if (!this->__isClipBoundsSet) + { + __pScratchPad->FillRect(point.x, point.y, 1, 1, composedColor); + } + else + { + _Util::Rectangle rect = { point.x, point.y, 1, 1 }; + _Util::Rectangle clip = { this->__clipBounds.x, this->__clipBounds.y, this->__clipBounds.width, this->__clipBounds.height }; + + _FillRectangleWithClip(__pScratchPad, composedColor, rect, clip); + } + + return E_SUCCESS; +} + +result +_Canvas::SetPixel(const _Util::Point& point) +{ + _Util::Rectangle doubleRect = + { + point.x, + point.y, + 1.0, + 1.0 + }; + + unsigned long composedColor = _ComposeColor(this->__fgColor, this->__fgOpacity); + + _NativeGfxEngine* pCairo = static_cast<_NativeGfxEngine*>(_pNativeGfxEngine); + + if (pCairo && pCairo->pCairo) + { + SET_CAIRO_FILL_PROPERTIES; + + _Cairo::FillRectangle(pCairo->pCairo, composedColor, doubleRect); + + RESET_CAIRO_FILL_PROPERTIES; + + return E_SUCCESS; + } + + this->__FillRectangle(composedColor, doubleRect); + + return E_SUCCESS; +} + +result +_Canvas::Show() +{ + int bufferWidth = __pSurface->GetWidth(); + int bufferHeight = __pSurface->GetHeight(); + int bufferPpl = __pSurface->GetPitch(); + + // cannot use 'if (__pSurface->GetHandle())' + if (this->__windowHandle != INVALID_HANDLE) + { +#if 0 + evas_object_image_pixels_dirty_set((Evas_Object*) this->__windowHandle, true); +#else + Evas_Object* pSourceObject = _GetWindowSourceObject(this->__windowHandle); + evas_object_image_data_update_add(pSourceObject, 0, 0, bufferWidth, bufferHeight); +#endif + + evas_object_show((Evas_Object*) this->__windowHandle); + + _FlushCanvas(); + } + else + { + SysTryReturnResult(NID_GRP, Tizen::App::_AppInfo::IsOspCompat(), E_UNSUPPORTED_OPERATION, "This method is unsupported in Tizen."); + + _CanvasShowFromMemory(this->__xBufferPos, this->__yBufferPos, 0, 0, bufferWidth, bufferHeight, __pBuffer, bufferWidth, bufferHeight, 32, bufferPpl * 4); + } + + return E_SUCCESS; +} + +result +_Canvas::Show(const Rectangle& rect) +{ + if ((rect.width == 0) || (rect.height == 0)) + { + return E_SUCCESS; + } + + if (this->__windowHandle != INVALID_HANDLE) + { + int x1 = rect.x; + int x2 = rect.x + rect.width; + int y1 = rect.y; + int y2 = rect.y + rect.height; + + if (x1 + 1 < x2) + { + x1++; + } + + if (x2 - 1 > x1) + { + x2--; + } + + if (y1 + 1 < y2) + { + y1++; + } + + if (y2 - 1 > y1) + { + y2--; + } + +#if 0 + evas_object_image_pixels_dirty_set((Evas_Object*) this->__windowHandle, true); + // same as evas_object_image_data_update_add((Evas_Object*)this->__windowHandle, rect.x + 1, rect.y + 1, rect.width - 2, rect.height - 2), if (width >= 3) and (height >= 3) + evas_object_image_data_update_add((Evas_Object*) this->__windowHandle, x1, y1, x2 - x1, y2 - y1); +#else + Evas_Object* pSourceObject = _GetWindowSourceObject(this->__windowHandle); + evas_object_image_data_update_add(pSourceObject, x1, y1, x2 - x1, y2 - y1); +#endif + + evas_object_show((Evas_Object*) this->__windowHandle); + + _FlushCanvas(); + } + else + { + SysTryReturnResult(NID_GRP, Tizen::App::_AppInfo::IsOspCompat(), E_UNSUPPORTED_OPERATION, "This method is unsupported in Tizen."); + + int bufferWidth = __pSurface->GetWidth(); + int bufferHeight = __pSurface->GetHeight(); + int bufferPpl = __pSurface->GetPitch(); + + _CanvasShowFromMemory(this->__xBufferPos + rect.x, this->__yBufferPos + rect.y, rect.x, rect.y, rect.width, rect.height, __pBuffer, bufferWidth, bufferHeight, 32, bufferPpl * 4); + } + + return E_SUCCESS; +} + +result +_Canvas::SetFont(const _Font& font) +{ + SysTryReturn(NID_GRP, this && this->__pSurface, E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not constructed yet."); + + // weak reference + this->__pFont = const_cast<_Font*>(&font); + + return E_SUCCESS; +} + +result +_Canvas::SetPriorityFont(const _Font& font) +{ + SysTryReturn(NID_GRP, this && this->__pSurface, E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not constructed yet."); + + // weak reference + this->__pPriorityFont = const_cast<_Font*>(&font); + + return E_SUCCESS; +} + +void +_Canvas::ResetPriorityFont(void) +{ + // nullify weak reference + this->__pPriorityFont = null; +} + +result +_Canvas::SetClipBounds(const Rectangle& rect) +{ + if (__pScratchPad == null) + { + return E_SYSTEM; + } + + int x1 = rect.x; + int y1 = rect.y; + int x2 = x1 + rect.width; + int y2 = y1 + rect.height; + + x1 = (x1 > 0) ? x1 : 0; + y1 = (y1 > 0) ? y1 : 0; + x2 = (x2 < __pScratchPad->GetWidth()) ? x2 : __pScratchPad->GetWidth(); + y2 = (y2 < __pScratchPad->GetHeight()) ? y2 : __pScratchPad->GetHeight(); + + x2 = (x1 > x2) ? x1 : x2; + y2 = (y1 > y2) ? y1 : y2; + + if (x1 == 0 && y1 == 0 && x2 == __pScratchPad->GetWidth() && y2 == __pScratchPad->GetHeight()) + { + this->__isClipBoundsSet = false; + } + else + { + this->__isClipBoundsSet = true; + } + + this->__clipBounds.SetBounds(x1, y1, x2 - x1, y2 - y1); + + return E_SUCCESS; +} + +Rectangle +_Canvas::GetClipBounds(void) const +{ + Rectangle rect; + + SysTryReturn(NID_GRP, this && this->__pSurface, rect, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not constructed yet.\n"); + + this->__GetClipBounds(rect); + + return rect; +} + +result +_Canvas::Lock(BufferInfo& info, long timeout) +{ + if (__pScratchPad == null) + { + return E_SYSTEM; + } + + if (_BufferInfoImpl::GetInstance(info) != null) + { + _BufferInfoImpl::GetInstance(info)->SetHandle(_BufferInfoImpl::HANDLE_TYPE_NONE, 0); + } + + SystemPixel* pBufferAddr = null; + int bufferPitch = 0; + + __pScratchPad->GetBuffer(pBufferAddr, bufferPitch); + + info.width = __pScratchPad->GetWidth(); + info.height = __pScratchPad->GetHeight(); + info.pitch = bufferPitch * sizeof(_SystemPixel); + info.bitsPerPixel = sizeof(_SystemPixel) * 8; + info.pixelFormat = PIXEL_FORMAT_ARGB8888; + info.pPixels = (void*) pBufferAddr; + //info.__handle = INVALID_HANDLE; + + return E_SUCCESS; +} + +result +_Canvas::Unlock() +{ + return E_SUCCESS; +} + +void +_Canvas::SetForegroundColor(const Color& fgColor) +{ + this->__fgColorNative = fgColor; + this->__ComposeFgColor(); +} + +Color +_Canvas::GetForegroundColor(void) +{ + return Color(this->__fgColor); +} + +void +_Canvas::SetBackgroundColor(const Color& bgColor) +{ + this->__bgColorNative = bgColor; + this->__ComposeBgColor(); +} + +Color +_Canvas::GetBackgroundColor(void) +{ + return Color(this->__bgColor); +} + +void +_Canvas::SetForegroundOpacity(int level) +{ + SysTryReturnVoidResult(NID_GRP, this && this->__pSurface, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not constructed yet.\n"); + + if (level < 0) + { + level = 0; + } + + if (level > 255) + { + level = 255; + } + + this->__fgOpacity = level; + this->__ComposeFgColor(); +} + +int +_Canvas::GetForegroundOpacity(void) +{ + SysTryReturn(NID_GRP, this && this->__pSurface, 255, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not constructed yet.\n"); + + return this->__fgOpacity; +} + +void +_Canvas::SetBackgroundOpacity(int level) +{ + SysTryReturnVoidResult(NID_GRP, this && this->__pSurface, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not constructed yet.\n"); + + if (level < 0) + { + level = 0; + } + + if (level > 255) + { + level = 255; + } + + this->__bgOpacity = level; + this->__ComposeBgColor(); +} + +int +_Canvas::GetBackgroundOpacity(void) +{ + SysTryReturn(NID_GRP, this && this->__pSurface, 255, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not constructed yet.\n"); + + return this->__bgOpacity; +} + +result +_Canvas::SetPosition(int x, int y) +{ + SysTryReturnResult(NID_GRP, this->__windowHandle == INVALID_HANDLE, E_UNSUPPORTED_OPERATION, "Window canvas does not support moving the position.\n"); + + __xBufferPos = x; + __yBufferPos = y; + + return E_SUCCESS; +} + +void +_Canvas::SetAntialiasingEnabled(bool enable) +{ + _NativeGfxEngine* pCairo = static_cast<_NativeGfxEngine*>(_pNativeGfxEngine); + + if (pCairo && pCairo->pCairo) + { + if (enable) + { + cairo_set_antialias(pCairo->pCairo, CAIRO_ANTIALIAS_DEFAULT); + } + else + { + cairo_set_antialias(pCairo->pCairo, CAIRO_ANTIALIAS_NONE); + } + } +} + +bool +_Canvas::IsAntialiasingEnabled(void) const +{ + _NativeGfxEngine* pCairo = static_cast<_NativeGfxEngine*>(_pNativeGfxEngine); + + if (pCairo && pCairo->pCairo) + { + return (cairo_get_antialias(pCairo->pCairo) == CAIRO_ANTIALIAS_DEFAULT); + } + + return false; +} + +_Canvas* +_Canvas::GetInstance(_CanvasImpl& canvas) +{ + return (&canvas != null) ? canvas._pNativeCanvas : null; +} + +const _Canvas* +_Canvas::GetInstance(const _CanvasImpl& canvas) +{ + return (&canvas != null) ? canvas._pNativeCanvas : null; +} + +bool +_Canvas::_IsWindowCanvas(void) const +{ + if (!(this && this->__pSurface)) + { + return false; + } + + return (this->__windowHandle != INVALID_HANDLE); +} + +result +_Canvas::_SetPosition(int x, int y) +{ + if (!(this && this->__pSurface)) + { + return E_OPERATION_FAILED; + } + + if (this->__windowHandle != INVALID_HANDLE) + { + return E_UNSUPPORTED_OPERATION; + } + + //?? what is this function ? + __xBufferPos = x; + __yBufferPos = y; + + return E_SUCCESS; +} + +int +_Canvas::_GetAlphaAttenuation(const _Bitmap& bitmap) const +{ + // 'bitmap' and 'this' are always valid. + + int alphaConstant = bitmap.GetAlphaConstant(); + + alphaConstant = (alphaConstant > 255) ? 255 : alphaConstant; + alphaConstant = (alphaConstant < 0) ? 0 : alphaConstant; + + int fgOpacity = this->__fgOpacity; + + if (fgOpacity > 0 && fgOpacity < 255) + { + fgOpacity += (fgOpacity >> 7); + alphaConstant = (alphaConstant * fgOpacity) >> 8; + } + + return alphaConstant; +} + +void +_Canvas::_SetBlendOption(_Canvas::BlendOption blendOption) +{ + if (!(this && this->__pSurface)) + { + return; + } + + if (blendOption < BLEND_MIN || blendOption >= BLEND_MAX) + { + return; + } + + this->__blendOption = blendOption; +} + +_Canvas::BlendOption +_Canvas::_GetBlendOption(void) const +{ + if (!(this && this->__pSurface)) + { + // default + return BLEND_ALPHABLEND; + } + + return this->__blendOption; +} + +void +_Canvas::__InitFgBgColorFromTheme(void) +{ + __fgColorNative = (_GetDefaultForegroundColor) ? _GetDefaultForegroundColor() : Color(0xFF000000); + __bgColorNative = (_GetDefaultBackgroundColor) ? _GetDefaultBackgroundColor() : Color(0xFFFFFFFF); + + this->__ComposeFgColor(); + this->__ComposeBgColor(); +} + +void +_Canvas::__ComposeFgColor(void) +{ + this->__fgColor = _ComposeColor(this->__fgColorNative.GetRGB32(), this->__fgOpacity); +} + +void +_Canvas::__ComposeBgColor(void) +{ + this->__bgColor = _ComposeColor(this->__bgColorNative.GetRGB32(), this->__bgOpacity); +} + +void +_Canvas::__GetClipBounds(Rectangle& rect) const +{ + if (this->__isClipBoundsSet) + { + rect = this->__clipBounds; + } + else + { + rect = Rectangle(0, 0, __pScratchPad->GetWidth(), __pScratchPad->GetHeight()); + } +} + +result +_Canvas::__Copy(const Point& destPoint, const _Canvas& srcCanvas, const Rectangle& srcRect) +{ + const _Canvas* pSrcCanvas = &srcCanvas; + + Rectangle clippedSrcRect(srcRect); + + if (_ClipRectangle(clippedSrcRect.x, clippedSrcRect.y, clippedSrcRect.width, clippedSrcRect.height, 0, 0, pSrcCanvas->__pScratchPad->GetWidth(), pSrcCanvas->__pScratchPad->GetHeight()) == CLIP_REJECT) + { + return E_SUCCESS; + } + + __pScratchPad->BitBlt(destPoint.x, destPoint.y, pSrcCanvas->__pScratchPad, clippedSrcRect.x, clippedSrcRect.y, clippedSrcRect.width, clippedSrcRect.height); + + return E_SUCCESS; +} + +result +_Canvas::__Copy(const Rectangle& destRect, const _Canvas& srcCanvas, const Rectangle& srcRect) +{ + const _Canvas* pSrcCanvas = &srcCanvas; + + Rectangle clippedSrcRect(srcRect); + + if (_ClipRectangle(clippedSrcRect.x, clippedSrcRect.y, clippedSrcRect.width, clippedSrcRect.height, 0, 0, pSrcCanvas->__pScratchPad->GetWidth(), pSrcCanvas->__pScratchPad->GetHeight()) == CLIP_REJECT) + { + return E_SUCCESS; + } + + { + SystemPixel* pSrcAddr = null; + int srcPitch = 0; + + pSrcCanvas->__pScratchPad->GetBuffer(pSrcAddr, srcPitch); + pSrcAddr += srcPitch * clippedSrcRect.y + clippedSrcRect.x; + + SystemPixel* pDstAddr = null; + int dstPitch = 0; + + __pScratchPad->GetBuffer(pDstAddr, dstPitch); + + _Util::Pixmap srcImageEx(clippedSrcRect.width, clippedSrcRect.height, sizeof(SystemPixel) * 8, pSrcAddr, srcPitch * sizeof(SystemPixel)); + _Util::Pixmap dstImageEx(__pScratchPad->GetWidth(), __pScratchPad->GetHeight(), sizeof(SystemPixel) * 8, pDstAddr, dstPitch * sizeof(SystemPixel)); + + Tizen::Graphics::_Effect::ScaleImage(dstImageEx, destRect.x, destRect.y, destRect.width, destRect.height, srcImageEx, _Effect::ROP_COPY); + } + + return E_SUCCESS; +} + +bool +_Canvas::__IsInClipBounds(const _Util::Rectangle& bounds) +{ + int x1 = 0; + int y1 = 0; + int x2 = x1 + this->GetBounds().width; + int y2 = y1 + this->GetBounds().height; + + if (this->__isClipBoundsSet) + { + x1 = (this->__clipBounds.x > x1) ? this->__clipBounds.x : x1; + y1 = (this->__clipBounds.y > y1) ? this->__clipBounds.y : y1; + x2 = (this->__clipBounds.x + this->__clipBounds.width < x2) ? this->__clipBounds.x + this->__clipBounds.width : x2; + y2 = (this->__clipBounds.y + this->__clipBounds.height < y2) ? this->__clipBounds.y + this->__clipBounds.height : y2; + } + + return ((bounds.x >= x1) && (bounds.y >= y1) && (bounds.x + bounds.w <= x2) && (bounds.y + bounds.h <= y2)); +} + +}} // Tizen::Graphics + diff --git a/src/graphics/FGrp_Canvas.h b/src/graphics/FGrp_Canvas.h new file mode 100644 index 0000000..2e7675a --- /dev/null +++ b/src/graphics/FGrp_Canvas.h @@ -0,0 +1,281 @@ +// +// 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_Canvas.h + * @brief This is the header file for the _Canvas class. + * + */ + +#ifndef _FGRP_INTERNAL_CANVAS_H_ +#define _FGRP_INTERNAL_CANVAS_H_ + +#include +#include + +#include + +#include "FGrp_CanvasImpl.h" + +#include "util/FGrp_UtilPixmap.h" +#include "util/FGrp_UtilScratchpad.h" +#include "util/FGrp_UtilTemplate.h" +#include "util/FGrp_Util.h" + + +namespace Tizen { namespace Ui {namespace Animations +{ +class _VisualElementCanvas; +}}} // Tizen::Ui::Animations + +namespace Tizen { namespace Graphics +{ +class Point; +class FloatPoint; +class Dimension; +class FloatDimension; +class Rectangle; +class FloatRectangle; +class BufferInfo; + +class _CanvasImpl; +class _Bitmap; +class _Font; + +class _Canvas +{ +public: + typedef unsigned long SystemPixel; + + enum BlendOption + { + BLEND_MIN = 0, + BLEND_COPY = BLEND_MIN, + BLEND_ALPHABLEND, + BLEND_MAX, + }; + +public: + _Canvas(void); + virtual ~_Canvas(void); + + result Construct(void); + result Construct(const Rectangle& rect); + result Construct(Handle windowHandle); + result Construct(Handle windowHandle, const Rectangle& rect); + result Construct(_Canvas* pSourceCanvas, const Rectangle& subRegion); + result Construct(const BufferInfo& bufferInfo); + + bool IsValid(void) const; + + result Clear(void); + result Clear(const Rectangle& rect); + + result Copy(const Point& destPoint, const _Canvas& srcCanvas, const Rectangle& srcRect); + result Copy(const Rectangle& destRect, const _Canvas& srcCanvas, const Rectangle& srcRect); + result Copy(const Point& destPoint, const _Canvas& srcCanvas, const Rectangle& srcRect, CompositeMode compositeMode); + result CopyReverse(const Point& destPoint, const _Canvas& srcCanvas, const Rectangle& srcRect); + + result SetLineStyle(LineStyle style); + LineStyle GetLineStyle(void) const; + + result SetLineWidth(int width, float auxWidth); + result SetLineWidth(float width); // floating-point version + int GetLineWidth(void) const; + + result SetLineCapStyle(LineCapStyle lineCapStyle); + LineCapStyle GetLineCapStyle(void) const; + result SetLineJoinStyle(LineJoinStyle lineJoinStyle); + LineJoinStyle GetLineJoinStyle(void) const; + + result SetDashPattern(const Tizen::Graphics::_Util::AccumList& dashValueList, double offset); + + void SetDrawingQuality(BitmapDrawingQuality quality); + BitmapDrawingQuality GetDrawingQuality(void) const; + + void SetCompositeMode(CompositeMode compositeMode); + CompositeMode GetCompositeMode(void) const; + + result GetPixel(const Point& point, Color& color) const; + + result SetPixel(const _Util::Point& point); + result SetPixel(const _Util::Point& point); // floating-point version + + result DrawRectangle(const _Util::Rectangle& rect); + result DrawRectangle(const _Util::Rectangle& rect); // floating-point version + result FillRectangle(const Color& color, const Rectangle& rect); + result FillRectangle(const Color& color, const _Util::Rectangle& rect); + result FillRectangle(const Color& color, const _Util::Rectangle& rect); // floating-point version + + result DrawRoundRectangle(const _Util::Rectangle& rect, const _Util::Dimension& arcDim); + result DrawRoundRectangle(const _Util::Rectangle& rect, const _Util::Dimension& arcDim); // floating-point version + result FillRoundRectangle(const Color& color, const _Util::Rectangle& rect, const _Util::Dimension& arcDim); + result FillRoundRectangle(const Color& color, const _Util::Rectangle& rect, const _Util::Dimension& arcDim); // floating-point version + + result DrawEllipse(const _Util::Rectangle& rect); + result DrawEllipse(const _Util::Rectangle& rect); // floating-point version + result FillEllipse(const Color& color, const _Util::Rectangle& rect); + result FillEllipse(const Color& color, const _Util::Rectangle& rect); // floating-point version + + result DrawArc(const _Util::Rectangle& rect, double startAngle, double endAngle, ArcStyle arcStyle); // floating-point version + + result DrawTriangle(const _Util::Point& point1, const _Util::Point& point2, const _Util::Point& point3); // floating-point version + result FillTriangle(const Color& color, const _Util::Point& point1, const _Util::Point& point2, const _Util::Point& point3); + result FillTriangle(const Color& color, const _Util::Point& point1, const _Util::Point& point2, const _Util::Point& point3); // floating-point version + + result DrawLine(const _Util::Point& point1, const _Util::Point& point2); + result DrawLine(const _Util::Point& point1, const _Util::Point& point2); // floating-point version + result DrawPolyline(const _Util::Point* pPoints, unsigned int pointCount); + result DrawPolygon(const _Util::Point* pPoints, unsigned int pointCount); + result FillPolygon(const Color& color, const _Util::Point* pPoints, unsigned int pointCount); + + result SetFont(const _Font& font); + + result SetPriorityFont(const _Font& font); + void ResetPriorityFont(void); + + result DrawText(const Point& point, const Tizen::Base::String& text); + result DrawText(const Point& point, const Tizen::Base::String& text, int startIndex, int length); + result DrawText(const Point& point, const Tizen::Base::String& text, int startIndex, int length, const Color& outlineColor); + + result DrawBitmap(const _Util::Point& point, const _Bitmap& bitmap); + result DrawBitmap(const _Util::Point& point, const _Bitmap& bitmap); + result DrawBitmap(const _Util::Rectangle& rect, const _Bitmap& bitmap); + result DrawBitmap(const _Util::Rectangle& destRect, const _Bitmap& srcBitmap, const _Util::Rectangle& srcRect); + result DrawBitmapForNinePatchedBitmap(const Rectangle& destRect, const _Bitmap& srcBitmap, const Rectangle& srcRect, bool copyOnly = false); + result DrawBitmap(const _Util::Point& point, const _Bitmap& bitmap, FlipDirection dir); + result DrawBitmap(const _Util::Point& point, const _Bitmap& bitmap, const _Util::Point& pivot, double degree); + result DrawNinePatchedBitmap(const Rectangle& rect, const _Bitmap& bitmap); + result DrawNineTiledBitmap(const Rectangle& rect, const _Bitmap& bitmap); + + result Show(void); + result Show(const Rectangle& rect); + + Rectangle GetBounds(void) const; + + result SetClipBounds(const Rectangle& rect); + Rectangle GetClipBounds(void) const; + + result Lock(BufferInfo& info, long timeout = INFINITE); + result Unlock(void); + + void SetForegroundColor(const Color& color); + Color GetForegroundColor(void); + void SetBackgroundColor(const Color& color); + Color GetBackgroundColor(void); + + void SetForegroundOpacity(int level); + int GetForegroundOpacity(void); + void SetBackgroundOpacity(int level); + int GetBackgroundOpacity(void); + + result SetPosition(int x, int y); + + void SetAntialiasingEnabled(bool enable); + bool IsAntialiasingEnabled(void) const; + + static _Canvas* GetInstance(_CanvasImpl& canvas); + static const _Canvas* GetInstance(const _CanvasImpl& canvas); + +protected: + bool _IsWindowCanvas(void) const; + result _SetPosition(int x, int y); + int _GetAlphaAttenuation(const _Bitmap& bitmap) const; + + void _SetBlendOption(BlendOption); + BlendOption _GetBlendOption(void) const; + +private: + _Canvas(const _Canvas& canvas); + _Canvas& operator =(const _Canvas& value); + + void __InitFgBgColorFromTheme(void); + + void __ComposeFgColor(void); + void __ComposeBgColor(void); + + void __GetClipBounds(Rectangle& rect) const; + + result __Copy(const Point& destPoint, const _Canvas& srcCanvas, const Rectangle& srcRect); + result __Copy(const Rectangle& destRect, const _Canvas& srcCanvas, const Rectangle& srcRect); + + result __FillRectangle(unsigned long composedColor, const _Util::Rectangle& rectangle); + + result __FillRoundRectangle(unsigned long composedColor, const _Util::Rectangle& rect, const _Util::Dimension& arcDim); + + result __FillEllipse(unsigned long composedColor, const _Util::Rectangle& bounds); + + result __FillTriangle(unsigned long composedColor, const _Util::Point& point1, const _Util::Point& point2, const _Util::Point& point3); + + result __DrawText(const Point& point, const Tizen::Base::String& text, int startIndex, int length); + result __DrawText(const Point& point, const Tizen::Base::String& text, int startIndex, int length, const Color& outlineColor); + + bool __IsInClipBounds(const _Util::Rectangle& bounds); + +protected: + unsigned long _magicKey; + void* _pNativeGfxEngine; + +private: + Tizen::Graphics::_Canvas* __pParent; + Tizen::Graphics::_Font* __pFont; // weak reference + Tizen::Graphics::_Font* __pPriorityFont; // weak reference + Handle __windowHandle; + Tizen::Graphics::_Canvas::BlendOption __blendOption; + + _Util::GenericBuffer * __pSurface; + _Util::ScratchPad * __pScratchPad; + + int __xBufferPos; + int __yBufferPos; + unsigned long* __pBuffer; + unsigned long __fgColor; + unsigned long __bgColor; + Color __fgColorNative; + Color __bgColorNative; + int __fgOpacity; + int __bgOpacity; + _Util::ScalarHolder __lineWidth; + LineStyle __lineStyle; + LineCapStyle __lineCapStyle; + LineJoinStyle __lineJoinStyle; + bool __isClipBoundsSet; + Rectangle __clipBounds; + TextOrigin __textOrigin; + + struct + { + Tizen::Graphics::_Util::AccumList pattern; + double offset; + } __dashData; + + BitmapDrawingQuality __bitmapDrawingQuality; + CompositeMode __compositeMode; + + // for performance test + bool __useStableRenderer; + + friend class _CanvasImpl; + friend class _Bitmap; + friend class _Font; + friend class Tizen::Ui::Animations::_VisualElementCanvas; + +}; // _Canvas + +}} // Tizen::Graphics + +#endif // _FGRP_INTERNAL_CANVAS_H_ diff --git a/src/graphics/FGrp_CanvasCairo.cpp b/src/graphics/FGrp_CanvasCairo.cpp new file mode 100644 index 0000000..96e012b --- /dev/null +++ b/src/graphics/FGrp_CanvasCairo.cpp @@ -0,0 +1,765 @@ +// +// 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_CanvasCairo.cpp + * @brief This is the implementation file for the cairo solution. + * + */ + +#include "FGrp_CanvasCairo.h" +#include "util/FGrp_UtilTemplate.h" + +namespace Tizen { namespace Graphics +{ + +namespace _Util +{ + +template <> +AutoDeletor::~AutoDeletor(void) +{ + if (__pPtr) + { + cairo_destroy(__pPtr); + } +} + +template <> +AutoDeletor::~AutoDeletor(void) +{ + if (__pPtr) + { + cairo_surface_destroy(__pPtr); + } +} + +template <> +AutoDeletor::~AutoDeletor(void) +{ + if (__pPtr) + { + cairo_pattern_destroy(__pPtr); + } +} + +} // _Util + +namespace _Cairo +{ + +const double _DOUBLE_PI = 3.141592; + +void +SetColor(cairo_t* pCairo, unsigned long composedColor) +{ + double a = ((composedColor >> 24) & 0xFF) * 1.0 / 255.0; + double r = ((composedColor >> 16) & 0xFF) * 1.0 / 255.0; + double g = ((composedColor >> 8) & 0xFF) * 1.0 / 255.0; + double b = ((composedColor >> 0) & 0xFF) * 1.0 / 255.0; + + cairo_set_source_rgba(pCairo, r, g, b, a); +} + +template <> +void +SetClip(cairo_t* pCairo, int x, int y, int width, int height) +{ + cairo_new_path(pCairo); + cairo_rectangle(pCairo, x, y, width, height); + cairo_clip(pCairo); + cairo_new_path(pCairo); +} + +template <> +void +SetClip(cairo_t* pCairo, float x, float y, float width, float height) +{ + + cairo_new_path(pCairo); + cairo_rectangle(pCairo, x, y, width, height); + cairo_clip(pCairo); + cairo_new_path(pCairo); +} + +void +ResetClip(cairo_t* pCairo) +{ + cairo_reset_clip(pCairo); +} + +void +SetDash(cairo_t* pCairo, double* pDashes, int dashCount, double offset) +{ + double sum = 0.0; + + for (int i = 0; i < dashCount; i++) + { + sum += pDashes[i]; + } + + if (sum == 0.0 && dashCount > 0) + { + // used the maximum value of integer type instead of double type(1.79769e+308). + const double infiniteValue = double(2147483647); + const double zeroDashes[2] = { 0.0, infiniteValue }; + + cairo_set_dash(pCairo, zeroDashes, 2, offset); + } + else + { + cairo_set_dash(pCairo, pDashes, dashCount, offset); + } +} + +void +ResetDash(cairo_t* pCairo) +{ + cairo_set_dash(pCairo, 0, 0, 0.0); +} + +void +SetComposite(cairo_t* pCairo, cairo_operator_t op) +{ + cairo_set_operator(pCairo, op); +} + +void +ResetComposite(cairo_t* pCairo) +{ + cairo_set_operator(pCairo, CAIRO_OPERATOR_OVER); +} + +void +SetLineCap(cairo_t* pCairo, cairo_line_cap_t cap) +{ + cairo_set_line_cap(pCairo, cap); +} + +void +ResetLineCap(cairo_t* pCairo) +{ + cairo_set_line_cap(pCairo, CAIRO_LINE_CAP_ROUND); +} + +void +SetLineJoin(cairo_t* pCairo, cairo_line_join_t join) +{ + cairo_set_line_join(pCairo, join); +} + +void +ResetLineJoin(cairo_t* pCairo) +{ + cairo_set_line_join(pCairo, CAIRO_LINE_JOIN_ROUND); +} + +template <> +void +DrawRoundRectangle(cairo_t* pCairo, double lineWidth, unsigned long composedColor, const _Util::Rectangle& rect, const _Util::Dimension& arcDim) +{ + double x = rect.x; + double y = rect.y; + double width = rect.w; + double height = rect.h; + double radiusHorizontal = arcDim.w; + double radiusVertical = arcDim.h; + double radius = (radiusHorizontal > radiusVertical) ? radiusHorizontal : radiusVertical; + double scalingFactorHorizental = radius / radiusHorizontal; + double scalingFactorVertical = radius / radiusVertical; + double degrees = _DOUBLE_PI / 180.0; + + cairo_save(pCairo); + cairo_scale(pCairo, radiusHorizontal / radius, radiusVertical / radius); + cairo_new_sub_path(pCairo); + + cairo_arc_negative(pCairo, (x + width - radiusHorizontal) * scalingFactorHorizental, (y + radiusVertical) * scalingFactorVertical, radius, 0 * degrees, -90 * degrees); + cairo_arc_negative(pCairo, (x + radiusHorizontal) * scalingFactorHorizental, (y + radiusVertical) * scalingFactorVertical, radius, -90 * degrees, -180 * degrees); + cairo_arc_negative(pCairo, (x + radiusHorizontal) * scalingFactorHorizental, (y + height - radiusVertical) * scalingFactorVertical, radius, -180 * degrees, -270 * degrees); + cairo_arc_negative(pCairo, (x + width - radiusHorizontal) * scalingFactorHorizental, (y + height - radiusVertical) * scalingFactorVertical, radius, -270 * degrees, -360 * degrees); + + cairo_close_path(pCairo); + cairo_restore(pCairo); + + SetColor(pCairo, composedColor); + + cairo_set_line_width(pCairo, lineWidth); + cairo_stroke(pCairo); +} + +template <> +void +DrawRoundRectangle(cairo_t* pCairo, int lineWidth, unsigned long composedColor, const _Util::Rectangle& rect, const _Util::Dimension& arcDim) +{ + double offset = (lineWidth % 2) ? 0.5 : 0.0; + + _Util::Rectangle revisedRect = + { + rect.x + offset, + rect.y + offset, + rect.w, + rect.h + }; + + DrawRoundRectangle(pCairo, double(lineWidth), composedColor, revisedRect, arcDim); +} + +void +FillRoundRectangle(cairo_t* pCairo, unsigned long composedColor, const _Util::Rectangle& rect, const _Util::Dimension& arcDim) +{ + double x = rect.x; + double y = rect.y; + double width = rect.w; + double height = rect.h; + double radiusHorizontal = arcDim.w; + double radiusVertical = arcDim.h; + double radius = (radiusHorizontal > radiusVertical) ? radiusHorizontal : radiusVertical; + double degrees = _DOUBLE_PI / 180.0; + double scalingFactorHorizental = radius / radiusHorizontal; + double scalingFactorVertical = radius / radiusVertical; + + cairo_save(pCairo); + cairo_scale(pCairo, radiusHorizontal / radius, radiusVertical / radius); + cairo_new_sub_path(pCairo); + cairo_arc(pCairo, (x + width - radiusHorizontal) * scalingFactorHorizental, (y + radiusVertical) * scalingFactorVertical, radius, -90 * degrees, 0 * degrees); + cairo_arc(pCairo, (x + width - radiusHorizontal) * scalingFactorHorizental, (y + height - radiusVertical) * scalingFactorVertical, radius, 0 * degrees, 90 * degrees); + cairo_arc(pCairo, (x + radiusHorizontal) * scalingFactorHorizental, (y + height - radiusVertical) * scalingFactorVertical, radius, 90 * degrees, 180 * degrees); + cairo_arc(pCairo, (x + radiusHorizontal) * scalingFactorHorizental, (y + radiusVertical) * scalingFactorVertical, radius, 180 * degrees, 270 * degrees); + cairo_close_path(pCairo); + cairo_restore(pCairo); + + SetColor(pCairo, composedColor); + + cairo_fill(pCairo); +} + +template <> +void +Drawline(cairo_t* pCairo, double lineWidth, unsigned long composedColor, const _Util::Point point[], int numPoint) +{ + if (numPoint != 2) + { + return; + } + + { + cairo_new_path(pCairo); + cairo_move_to(pCairo, point[0].x, point[0].y); + + for (int i = 1; i < numPoint; i++) + { + cairo_line_to(pCairo, point[i].x, point[i].y); + } + } + + SetColor(pCairo, composedColor); + + cairo_set_line_width(pCairo, lineWidth); + + cairo_stroke(pCairo); +} + +template <> +void +Drawline(cairo_t* pCairo, int lineWidth, unsigned long composedColor, const _Util::Point point[], int numPoint) +{ + if (numPoint != 2) + { + return; + } + + double offset = (lineWidth % 2) ? 0.5 : 0.0; + + { + cairo_new_path(pCairo); + cairo_move_to(pCairo, point[0].x + offset, point[0].y + offset); + + for (int i = 1; i < numPoint; i++) + { + cairo_line_to(pCairo, point[i].x + offset, point[i].y + offset); + } + } + + SetColor(pCairo, composedColor); + + cairo_set_line_width(pCairo, lineWidth); + + cairo_stroke(pCairo); +} + +void +FillRectangle(cairo_t* pCairo, unsigned long composedColor, const _Util::Rectangle& rect) +{ + cairo_rectangle(pCairo, rect.x, rect.y, rect.w, rect.h); + SetColor(pCairo, composedColor); + cairo_fill(pCairo); +} + +template <> +void +DrawRectangle(cairo_t* pCairo, double lineWidth, unsigned long composedColor, const _Util::Rectangle& rect) +{ + double x1 = rect.x; + double y1 = rect.y; + double x2 = x1 + rect.w; + double y2 = y1 + rect.h; + + { + cairo_new_path(pCairo); + + cairo_move_to(pCairo, x1, y1); + cairo_line_to(pCairo, x2, y1); + cairo_line_to(pCairo, x2, y2); + cairo_line_to(pCairo, x1, y2); + + cairo_close_path(pCairo); + } + + SetColor(pCairo, composedColor); + + cairo_set_line_width(pCairo, lineWidth); + + cairo_stroke(pCairo); +} + +template <> +void +DrawRectangle(cairo_t* pCairo, int lineWidth, unsigned long composedColor, const _Util::Rectangle& rect) +{ + double offset = (lineWidth % 2) ? 0.5 : 0.0; + + _Util::Rectangle revisedRect = { rect.x + offset, rect.y + offset, rect.w, rect.h }; + + DrawRectangle(pCairo, double(lineWidth), composedColor, revisedRect); +} + +template <> +void +DrawPolyline(cairo_t* pCairo, double lineWidth, unsigned long composedColor, const _Util::Point point[], int numPoint) +{ + if (numPoint <= 0) + { + return; + } + + { + cairo_new_path(pCairo); + cairo_move_to(pCairo, point[0].x, point[0].y ); + + for (int i = 1; i < numPoint; i++) + { + cairo_line_to(pCairo, point[i].x, point[i].y); + } + } + + SetColor(pCairo, composedColor); + + cairo_set_line_width(pCairo, lineWidth); + + cairo_stroke(pCairo); +} + +template <> +void +DrawPolyline(cairo_t* pCairo, int lineWidth, unsigned long composedColor, const _Util::Point point[], int numPoint) +{ + if (numPoint <= 0) + { + return; + } + + { + double offset = (lineWidth % 2) ? 0.5 : 0.0; + + cairo_new_path(pCairo); + cairo_move_to(pCairo, point[0].x + offset, point[0].y + offset); + + for (int i = 1; i < numPoint; i++) + { + cairo_line_to(pCairo, point[i].x + offset, point[i].y + offset); + } + } + + SetColor(pCairo, composedColor); + + cairo_set_line_width(pCairo, lineWidth); + + cairo_stroke(pCairo); +} + +template <> +void +DrawPolygon(cairo_t* pCairo, double lineWidth, unsigned long composedColor, const _Util::Point point[], int numPoint) +{ + if (numPoint <= 0) + { + return; + } + + { + cairo_new_path(pCairo); + cairo_move_to(pCairo, point[0].x, point[0].y); + + for (int i = 1; i < numPoint; i++) + { + cairo_line_to(pCairo, point[i].x, point[i].y); + } + + cairo_close_path(pCairo); + } + + SetColor(pCairo, composedColor); + + cairo_set_line_width(pCairo, lineWidth); + + cairo_stroke(pCairo); +} + +template <> +void +DrawPolygon(cairo_t* pCairo, int lineWidth, unsigned long composedColor, const _Util::Point point[], int numPoint) +{ + if (numPoint <= 0) + { + return; + } + + { + double offset = (lineWidth % 2) ? 0.5 : 0.0; + + cairo_new_path(pCairo); + cairo_move_to(pCairo, point[0].x + offset, point[0].y + offset); + + for (int i = 1; i < numPoint; i++) + { + cairo_line_to(pCairo, point[i].x + offset, point[i].y + offset); + } + + cairo_close_path(pCairo); + } + + SetColor(pCairo, composedColor); + + cairo_set_line_width(pCairo, lineWidth); + + cairo_stroke(pCairo); +} + +void +FillPolygon(cairo_t* pCairo, unsigned long composedColor, const _Util::Point point[], int numPoint) +{ + if (numPoint <= 0) + { + return; + } + + { + cairo_new_path(pCairo); + cairo_move_to(pCairo, point[0].x, point[0].y); + + for (int i = 1; i < numPoint; i++) + { + cairo_line_to(pCairo, point[i].x, point[i].y); + } + + cairo_close_path(pCairo); + } + + SetColor(pCairo, composedColor); + + cairo_set_fill_rule(pCairo, CAIRO_FILL_RULE_EVEN_ODD); + cairo_fill(pCairo); +} + +template <> +void +DrawEllipse(cairo_t* pCairo, double lineWidth, unsigned long composedColor, const _Util::Rectangle& bounds) +{ + double x = bounds.x; + double y = bounds.y; + double widthHalf = bounds.w * 1.0 / 2.0; + double heightHalf = bounds.h * 1.0 / 2.0; + + { + double ux = lineWidth; + double uy = lineWidth; + cairo_device_to_user_distance(pCairo, &ux, &uy); + cairo_set_line_width(pCairo, (ux < uy) ? uy : ux); + } + + SetColor(pCairo, composedColor); + + cairo_new_path(pCairo); + + cairo_save(pCairo); + { + cairo_translate(pCairo, x + widthHalf, y + heightHalf); + + double radius = (widthHalf > heightHalf) ? widthHalf : heightHalf; + + cairo_scale(pCairo, widthHalf / radius, heightHalf / radius); + + cairo_arc_negative(pCairo, 0.0, 0.0, radius, 0.0, -2 * _DOUBLE_PI); + } + cairo_restore(pCairo); + + cairo_stroke(pCairo); +} + +template <> +void +DrawEllipse(cairo_t* pCairo, int lineWidth, unsigned long composedColor, const _Util::Rectangle& bounds) +{ + double offset = (lineWidth % 2) ? 0.5f : 0.0f; + + _Util::Rectangle revisedBounds = + { + bounds.x + offset, + bounds.y + offset, + bounds.w, + bounds.h + }; + + DrawEllipse(pCairo, double(lineWidth), composedColor, revisedBounds); +} + +void +FillEllipse(cairo_t* pCairo, unsigned long composedColor, const _Util::Rectangle& bounds) +{ + double x = bounds.x; + double y = bounds.y; + double width = bounds.w; + double height = bounds.h; + + cairo_new_path(pCairo); + + cairo_save(pCairo); + { + cairo_translate(pCairo, x + width / 2.0, y + height / 2.0); + cairo_scale(pCairo, width / 2.0, height / 2.0); + + double a = ((composedColor >> 24) & 0xFF) * 1.0 / 255.0; + double r = ((composedColor >> 16) & 0xFF) * 1.0 / 255.0; + double g = ((composedColor >> 8) & 0xFF) * 1.0 / 255.0; + double b = ((composedColor >> 0) & 0xFF) * 1.0 / 255.0; + + cairo_set_source_rgba(pCairo, r, g, b, a); + + cairo_arc(pCairo, 0.0, 0.0, 1.0, 0.0, 2 * _DOUBLE_PI); + cairo_fill(pCairo); + } + cairo_restore(pCairo); +} + +template <> +void +DrawArc(cairo_t* pCairo, double lineWidth, unsigned long composedColor, const _Util::Rectangle& bounds, double startAngle, double endAngle, DrawArcStyle arcType) +{ + double x = bounds.x; + double y = bounds.y; + double widthHalf = bounds.w * 1.0 / 2.0; + double heightHalf = bounds.h * 1.0 / 2.0; + double angle1 = (360 - startAngle) * 1.0 * (_DOUBLE_PI / 180.0); + double angle2 = (360 - endAngle) * 1.0 * (_DOUBLE_PI / 180.0); + + { + double ux = lineWidth; + double uy = lineWidth; + cairo_device_to_user_distance(pCairo, &ux, &uy); + cairo_set_line_width(pCairo, (ux < uy) ? uy : ux); + } + + SetColor(pCairo, composedColor); + + cairo_new_path(pCairo); + + switch (arcType) + { + case DRAW_ARC_STYLE_ARC: + cairo_save(pCairo); + { + cairo_translate(pCairo, x + widthHalf, y + heightHalf); + + double radius = (widthHalf > heightHalf) ? widthHalf : heightHalf; + + cairo_scale(pCairo, widthHalf / radius, heightHalf / radius); + + cairo_arc_negative(pCairo, 0.0, 0.0, radius, angle1, angle2); + } + cairo_restore(pCairo); + break; + case DRAW_ARC_STYLE_PIE: + cairo_save(pCairo); + { + cairo_translate(pCairo, x + widthHalf, y + heightHalf); + + double radius = (widthHalf > heightHalf) ? widthHalf : heightHalf; + + cairo_scale(pCairo, widthHalf / radius, heightHalf / radius); + + cairo_arc_negative(pCairo, 0.0, 0.0, radius, angle1, angle2); + cairo_line_to(pCairo, 0.5, 0.5); + cairo_close_path(pCairo); + } + cairo_restore(pCairo); + break; + case DRAW_ARC_STYLE_CHORD: + cairo_save(pCairo); + { + cairo_translate(pCairo, x + widthHalf, y + heightHalf); + + double radius = (widthHalf > heightHalf) ? widthHalf : heightHalf; + + cairo_scale(pCairo, widthHalf / radius, heightHalf / radius); + + cairo_arc_negative(pCairo, 0.0, 0.0, radius, angle1, angle2); + cairo_close_path(pCairo); + } + cairo_restore(pCairo); + break; + default: + return; + } + + cairo_stroke(pCairo); +} + +template <> +void +DrawArc(cairo_t* pCairo, int lineWidth, unsigned long composedColor, const _Util::Rectangle& bounds, double startAngle, double endAngle, DrawArcStyle arcType) +{ + float offset = (lineWidth % 2) ? 0.5f : 0.0f; + + _Util::Rectangle revisedBounds = + { + bounds.x + offset, + bounds.y + offset, + bounds.w, + bounds.h + }; + + DrawArc(pCairo, double(lineWidth), composedColor, revisedBounds, startAngle, endAngle, arcType); +} + +void +FillArc(cairo_t* pCairo, unsigned long composedColor, const _Util::Rectangle& bounds, double startAngle, double endAngle, FillArcStyle arcType) +{ + double x = bounds.x; + double y = bounds.y; + double widthHalf = bounds.w * 1.0 / 2.0; + double heightHalf = bounds.h * 1.0 / 2.0; + double angle1 = (360 - startAngle) * 1.0 * (_DOUBLE_PI / 180.0); + double angle2 = (360 - endAngle) * 1.0 * (_DOUBLE_PI / 180.0); + + SetColor(pCairo, composedColor); + + cairo_new_path(pCairo); + + switch (arcType) + { + case FILL_ARC_STYLE_PIE: + cairo_save(pCairo); + { + cairo_translate(pCairo, x + widthHalf, y + heightHalf); + + double radius = (widthHalf > heightHalf) ? widthHalf : heightHalf; + + cairo_scale(pCairo, widthHalf / radius, heightHalf / radius); + + cairo_arc_negative(pCairo, 0.0, 0.0, radius, angle1, angle2); + cairo_line_to(pCairo, 0.5, 0.5); + cairo_close_path(pCairo); + } + cairo_restore(pCairo); + break; + case FILL_ARC_STYLE_CHORD: + cairo_save(pCairo); + { + cairo_translate(pCairo, x + widthHalf, y + heightHalf); + + double radius = (widthHalf > heightHalf) ? widthHalf : heightHalf; + + cairo_scale(pCairo, widthHalf / radius, heightHalf / radius); + + cairo_arc_negative(pCairo, 0.0, 0.0, radius, angle1, angle2); + cairo_close_path(pCairo); + } + cairo_restore(pCairo); + break; + default: + return; + } + + cairo_fill(pCairo); +} + +bool +ScalePixmap(Tizen::Graphics::_Util::Pixmap& dstImage, const Tizen::Graphics::_Util::Pixmap& srcImage, PatternFilter patternFilter) +{ + if (srcImage.width <= 0 || srcImage.height <= 0 || dstImage.width <= 0 || dstImage.height <= 0) + { + return true; + } + + if (srcImage.depth != 32 || dstImage.depth != 32) + { + return false; + } + + _Util::AutoDeletor srcSurface(cairo_image_surface_create_for_data((unsigned char*)srcImage.pBitmap, CAIRO_FORMAT_ARGB32, srcImage.width, srcImage.height, srcImage.bytesPerLine)); + _Util::AutoDeletor dstSurface(cairo_image_surface_create_for_data((unsigned char*)dstImage.pBitmap, CAIRO_FORMAT_ARGB32, dstImage.width, dstImage.height, dstImage.bytesPerLine)); + + if (srcSurface.IsValid() && dstSurface.IsValid()) + { + _Util::AutoDeletor srcPattern(cairo_pattern_create_for_surface(srcSurface)); + _Util::AutoDeletor dstCairo(cairo_create(dstSurface)); + + if (srcPattern.IsValid() && dstCairo.IsValid()) + { + cairo_matrix_t cairoMatrix; + cairo_matrix_init_scale(&cairoMatrix, double(srcImage.width) / double(dstImage.width), double(srcImage.height) / double(dstImage.height)); + cairo_pattern_set_matrix(srcPattern, &cairoMatrix); + + switch (patternFilter) + { + case PATTERN_FILTER_FAST: + cairo_pattern_set_filter(srcPattern, CAIRO_FILTER_FAST); + break; + case PATTERN_FILTER_GOOD: + cairo_pattern_set_filter(srcPattern, CAIRO_FILTER_GOOD); + break; + case PATTERN_FILTER_BEST: + cairo_pattern_set_filter(srcPattern, CAIRO_FILTER_BEST); + break; + default: + cairo_pattern_set_filter(srcPattern, CAIRO_FILTER_FAST); + break; + }; + + cairo_set_source(dstCairo, srcPattern); + cairo_paint(dstCairo); + + return true; + } + } + + return false; +} + +} // _Cairo + +}} // Tizen::Graphics diff --git a/src/graphics/FGrp_CanvasCairo.h b/src/graphics/FGrp_CanvasCairo.h new file mode 100644 index 0000000..a8632da --- /dev/null +++ b/src/graphics/FGrp_CanvasCairo.h @@ -0,0 +1,120 @@ +// +// 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_CanvasCairo.h + * @brief This is the header file for the cairo solution. + * + */ + +#ifndef _FGRP_INTERNAL_CANVASCAIRO_H_ +#define _FGRP_INTERNAL_CANVASCAIRO_H_ + +#include + +#include "../util/FGrp_UtilType.h" +#include "../util/FGrp_UtilPixmap.h" + + +namespace Tizen { namespace Graphics +{ + +namespace _Cairo +{ + +enum DrawArcStyle +{ + DRAW_ARC_STYLE_ARC, + DRAW_ARC_STYLE_PIE, + DRAW_ARC_STYLE_CHORD +}; + +enum FillArcStyle +{ + FILL_ARC_STYLE_PIE, + FILL_ARC_STYLE_CHORD +}; + +enum PatternFilter +{ + PATTERN_FILTER_FAST, + PATTERN_FILTER_GOOD, + PATTERN_FILTER_BEST +}; + + +void SetColor(cairo_t* pCairo, unsigned long composedColor); + +template +void SetClip(cairo_t* pCairo, T x, T y, T width, T height); + +void ResetClip(cairo_t* pCairo); + +void SetDash(cairo_t* pCairo, double* pDashes, int dashCount, double offset); + +void ResetDash(cairo_t* pCairo); + +void SetLineCap(cairo_t* pCairo, cairo_line_cap_t cap); + +void ResetLineCap(cairo_t* pCairo); + +void SetLineJoin(cairo_t* pCairo, cairo_line_join_t join); + +void ResetLineJoin(cairo_t* pCairo); + +void SetComposite(cairo_t* pCairo, cairo_operator_t op); + +void ResetComposite(cairo_t* pCairo); + +template +void DrawRoundRectangle(cairo_t* pCairo, T lineWidth, unsigned long composedColor, const _Util::Rectangle& rect, const _Util::Dimension& arcDim); + +void FillRoundRectangle(cairo_t* pCairo, unsigned long composedColor, const _Util::Rectangle& rect, const _Util::Dimension& arcDim); + +template +void Drawline(cairo_t* pCairo, T lineWidth, unsigned long composedColor, const _Util::Point point[], int numPoint); + +template +void DrawRectangle(cairo_t* pCairo, T lineWidth, unsigned long composedColor, const _Util::Rectangle& rect); + +void FillRectangle(cairo_t* pCairo, unsigned long composedColor, const _Util::Rectangle& rect); + +template +void DrawPolyline(cairo_t* pCairo, T lineWidth, unsigned long composedColor, const _Util::Point point[], int numPoint); + +template +void DrawPolygon(cairo_t* pCairo, T lineWidth, unsigned long composedColor, const _Util::Point point[], int numPoint); + +void FillPolygon(cairo_t* pCairo, unsigned long composedColor, const _Util::Point point[], int numPoint); + +template +void DrawEllipse(cairo_t* pCairo, T lineWidth, unsigned long composedColor, const _Util::Rectangle& bounds); + +void FillEllipse(cairo_t* pCairo, unsigned long composedColor, const _Util::Rectangle& bounds); + +template +void DrawArc(cairo_t* pCairo, T lineWidth, unsigned long composedColor, const _Util::Rectangle& bounds, double startAngle, double endAngle, DrawArcStyle arcType); + +void FillArc(cairo_t* pCairo, unsigned long composedColor, const _Util::Rectangle& bounds, double startAngle, double endAngle, FillArcStyle arcType); + +bool ScalePixmap(_Util::Pixmap& dstImage, const _Util::Pixmap& srcImage, PatternFilter patternFilter); + +} // Tizen::Graphics::_Cairo + +}} // Tizen::Graphics + +#endif // _FGRP_INTERNAL_CANVASCAIRO_H_ diff --git a/src/graphics/FGrp_CanvasCoordHolder.h b/src/graphics/FGrp_CanvasCoordHolder.h new file mode 100644 index 0000000..5a166d0 --- /dev/null +++ b/src/graphics/FGrp_CanvasCoordHolder.h @@ -0,0 +1,299 @@ +// +// 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_CanvasCoordHolder.h + * @brief This is the header file for _CanvasImpl class. + * + */ + +#ifndef _FGRP_INTERNAL_CANVASCOORDHOLDER_H_ +#define _FGRP_INTERNAL_CANVASCOORDHOLDER_H_ + + +#include "FGrp_ResUtil.h" + + +namespace Tizen { namespace Graphics +{ + +struct _CanvasCoordHolder +{ + _ResUtil::CoordinateHolder<_Util::Dimension, _Util::Dimension > canvasSize; + _ResUtil::CoordinateHolder<_Util::Rectangle, _Util::Rectangle > clipBounds; + _ResUtil::CoordinateHolderSimple lineWidth; + _ResUtil::CoordinateHolder<_Util::Point, _Util::Point > canvasPos; + + _CanvasCoordHolder() + : __pcBaseScale(1.0f) + , __vcBaseScale(1.0f) + { + _CoordinateSystem* pCoordinateSystem = _CoordinateSystem::GetInstance(); + + if (pCoordinateSystem) + { + __pcBaseScale = pCoordinateSystem->GetTargetBaseScaleFactor(); + __vcBaseScale = pCoordinateSystem->GetAppBaseScaleFactor(); + } + } + + void Init(_ResUtil::Rect vcRect) + { + { + _Util::Dimension floatVcSize = + { + static_cast(vcRect.w), + static_cast(vcRect.h) + }; + + canvasSize.vcInt.w = _FloatToIntForSize(floatVcSize.w); + canvasSize.vcInt.h = _FloatToIntForSize(floatVcSize.h); + + canvasSize.vcFloat.w = floatVcSize.w; + canvasSize.vcFloat.h = floatVcSize.h; + + canvasSize.pcInt.w = _FloatToIntForSize(static_cast(__ConvertToPhyCoord(floatVcSize.w))); + canvasSize.pcInt.h = _FloatToIntForSize(static_cast(__ConvertToPhyCoord(floatVcSize.h))); + + canvasSize.vcFloatActual.w = static_cast(__ConvertToVirCoord(static_cast(canvasSize.pcInt.w))); + canvasSize.vcFloatActual.h = static_cast(__ConvertToVirCoord(static_cast(canvasSize.pcInt.h))); + } + + AssignLineWidthFromVc(1); + AssignCanvasPosFromVc(vcRect.x, vcRect.y); + + InitClipBounds(); + } + + void InitClipBounds(void) + { + clipBounds.vcInt.x = 0; + clipBounds.vcInt.y = 0; + clipBounds.vcInt.w = canvasSize.vcInt.w; + clipBounds.vcInt.h = canvasSize.vcInt.h; + + clipBounds.vcFloat.x = 0.0f; + clipBounds.vcFloat.y = 0.0f; + clipBounds.vcFloat.w = canvasSize.vcFloat.w; + clipBounds.vcFloat.h = canvasSize.vcFloat.h; + + clipBounds.pcInt.x = 0; + clipBounds.pcInt.y = 0; + clipBounds.pcInt.w = canvasSize.pcInt.w; + clipBounds.pcInt.h = canvasSize.pcInt.h; + + clipBounds.vcFloatActual.x = 0.0f; + clipBounds.vcFloatActual.y = 0.0f; + clipBounds.vcFloatActual.w = canvasSize.vcFloatActual.w; + clipBounds.vcFloatActual.h = canvasSize.vcFloatActual.h; + } + + void Init(const Rectangle& rect) + { + _ResUtil::Rect vcRect(rect.x, rect.y, rect.width, rect.height); + this->Init(vcRect); + } + + void ResetFromVc(const _Util::Rectangle& intVcRect) + { + _Util::Rectangle floatVcRect = + { + static_cast(intVcRect.x), + static_cast(intVcRect.y), + static_cast(intVcRect.w), + static_cast(intVcRect.h) + }; + + this->ResetFromVc(floatVcRect); + + canvasSize.vcInt.w = intVcRect.w; + canvasSize.vcInt.h = intVcRect.h; + } + + void ResetFromVc(const _Util::Rectangle& floatVcRect) + { + canvasSize.vcInt.w = _FloatToIntForSize(floatVcRect.w); + canvasSize.vcInt.h = _FloatToIntForSize(floatVcRect.h); + + canvasSize.vcFloat.w = floatVcRect.w; + canvasSize.vcFloat.h = floatVcRect.h; + + canvasSize.pcInt.w = _FloatToIntForSize(static_cast(__ConvertToPhyCoord(floatVcRect.w))); + canvasSize.pcInt.h = _FloatToIntForSize(static_cast(__ConvertToPhyCoord(floatVcRect.h))); + + canvasSize.vcFloatActual.w = static_cast(__ConvertToVirCoord(static_cast(canvasSize.pcInt.w))); + canvasSize.vcFloatActual.h = static_cast(__ConvertToVirCoord(static_cast(canvasSize.pcInt.h))); + + AssignLineWidthFromVc(1.0f); + AssignCanvasPosFromVc(_FloatToIntForPos(floatVcRect.x), _FloatToIntForPos(floatVcRect.y)); + + InitClipBounds(); + } + + void ResetFromPc(const _Util::Rectangle& intPcRect) + { + canvasSize.pcInt.w = intPcRect.w; + canvasSize.pcInt.h = intPcRect.h; + + canvasSize.vcFloatActual.w = static_cast(__ConvertToVirCoord(static_cast(canvasSize.pcInt.w))); + canvasSize.vcFloatActual.h = static_cast(__ConvertToVirCoord(static_cast(canvasSize.pcInt.h))); + + canvasSize.vcFloat.w = canvasSize.vcFloatActual.w; + canvasSize.vcFloat.h = canvasSize.vcFloatActual.h; + + canvasSize.vcInt.w = _FloatToIntForSize(canvasSize.vcFloat.w); + canvasSize.vcInt.h = _FloatToIntForSize(canvasSize.vcFloat.h); + + { + _Util::Point pcPoint = + { + _FloatToIntForPos(static_cast(__ConvertToVirCoord(static_cast(intPcRect.x)))), + _FloatToIntForPos(static_cast(__ConvertToVirCoord(static_cast(intPcRect.y)))), + }; + + AssignLineWidthFromVc(1.0f); + AssignCanvasPosFromPc(pcPoint.x, pcPoint.y); + + InitClipBounds(); + } + } + + void AssignCanvasSizeFromPcSize(const _Util::Dimension& intPcSize) + { + canvasSize.pcInt.w = intPcSize.w; + canvasSize.pcInt.h = intPcSize.h; + + canvasSize.vcFloatActual.w = static_cast(__ConvertToVirCoord(static_cast(canvasSize.pcInt.w))); + canvasSize.vcFloatActual.h = static_cast(__ConvertToVirCoord(static_cast(canvasSize.pcInt.h))); + + canvasSize.vcFloat.w = canvasSize.vcFloatActual.w; + canvasSize.vcFloat.h = canvasSize.vcFloatActual.h; + + canvasSize.vcInt.w = _FloatToIntForSize(canvasSize.vcFloat.w); + canvasSize.vcInt.h = _FloatToIntForSize(canvasSize.vcFloat.h); + } + + void AssignClipBoundsFromVcSize(const _Util::Rectangle& intVcRect) + { + _Util::Rectangle floatVcRect = + { + static_cast(intVcRect.x), + static_cast(intVcRect.y), + static_cast(intVcRect.w), + static_cast(intVcRect.h) + }; + + this->AssignClipBoundsFromVcSize(floatVcRect); + + clipBounds.vcInt = intVcRect; + } + + void AssignClipBoundsFromVcSize(const _Util::Rectangle& floatVcRect) + { + clipBounds.vcFloat = floatVcRect; + + clipBounds.vcInt.x = _FloatToIntForPos(floatVcRect.x); + clipBounds.vcInt.y = _FloatToIntForPos(floatVcRect.y); + clipBounds.vcInt.w = _FloatToIntForSize(floatVcRect.w); + clipBounds.vcInt.h = _FloatToIntForSize(floatVcRect.h); + + clipBounds.pcInt.x = _FloatToIntForPos(static_cast(__ConvertToPhyCoord(floatVcRect.x))); + clipBounds.pcInt.y = _FloatToIntForPos(static_cast(__ConvertToPhyCoord(floatVcRect.y))); + clipBounds.pcInt.w = _FloatToIntForSize(static_cast(__ConvertToPhyCoord(floatVcRect.w))); + clipBounds.pcInt.h = _FloatToIntForSize(static_cast(__ConvertToPhyCoord(floatVcRect.h))); + + clipBounds.vcFloatActual.x = static_cast(__ConvertToVirCoord(static_cast(clipBounds.pcInt.x))); + clipBounds.vcFloatActual.y = static_cast(__ConvertToVirCoord(static_cast(clipBounds.pcInt.y))); + clipBounds.vcFloatActual.w = static_cast(__ConvertToVirCoord(static_cast(clipBounds.pcInt.w))); + clipBounds.vcFloatActual.h = static_cast(__ConvertToVirCoord(static_cast(clipBounds.pcInt.h))); + } + + void AssignLineWidthFromVc(int width) + { + lineWidth.vcInt = width; + lineWidth.vcFloat = static_cast(width); + } + + void AssignLineWidthFromVc(float widthF) + { + lineWidth.vcFloat = widthF; + lineWidth.vcInt = _FloatToIntForSize(widthF); + } + + void AssignCanvasPosFromVc(int vcX, int vcY) + { + canvasPos.vcInt.x = vcX; + canvasPos.vcInt.y = vcY; + + canvasPos.vcFloat.x = static_cast(vcX); + canvasPos.vcFloat.y = static_cast(vcY); + + canvasPos.pcInt.x = _FloatToIntForPos(static_cast(__ConvertToPhyCoord(static_cast(canvasPos.vcFloat.x)))); + canvasPos.pcInt.y = _FloatToIntForPos(static_cast(__ConvertToPhyCoord(static_cast(canvasPos.vcFloat.y)))); + + canvasPos.vcFloatActual.x = static_cast(__ConvertToVirCoord(static_cast(canvasPos.pcInt.x))); + canvasPos.vcFloatActual.y = static_cast(__ConvertToVirCoord(static_cast(canvasPos.pcInt.y))); + } + + void AssignCanvasPosFromVc(float vcXF, float vcYF) + { + canvasPos.vcFloat.x = vcXF; + canvasPos.vcFloat.y = vcYF; + + canvasPos.vcInt.x = _FloatToIntForPos(vcXF); + canvasPos.vcInt.y = _FloatToIntForPos(vcYF); + + canvasPos.pcInt.x = _FloatToIntForPos(static_cast(__ConvertToPhyCoord(static_cast(canvasPos.vcFloat.x)))); + canvasPos.pcInt.y = _FloatToIntForPos(static_cast(__ConvertToPhyCoord(static_cast(canvasPos.vcFloat.y)))); + + canvasPos.vcFloatActual.x = static_cast(__ConvertToVirCoord(static_cast(canvasPos.pcInt.x))); + canvasPos.vcFloatActual.y = static_cast(__ConvertToVirCoord(static_cast(canvasPos.pcInt.y))); + } + + void AssignCanvasPosFromPc(int pcX, int pcY) + { + canvasPos.pcInt.x = pcX; + canvasPos.pcInt.y = pcY; + + canvasPos.vcFloatActual.x = static_cast(__ConvertToVirCoord(static_cast(canvasPos.pcInt.x))); + canvasPos.vcFloatActual.y = static_cast(__ConvertToVirCoord(static_cast(canvasPos.pcInt.y))); + + canvasPos.vcFloat.x = canvasPos.vcFloatActual.x; + canvasPos.vcFloat.y = canvasPos.vcFloatActual.y; + + canvasPos.vcInt.x = _FloatToIntForPos(canvasPos.vcFloat.x); + canvasPos.vcInt.y = _FloatToIntForPos(canvasPos.vcFloat.y); + } + +private: + double __pcBaseScale; + double __vcBaseScale; + + inline double __ConvertToPhyCoord(double val) + { + return val * __pcBaseScale / __vcBaseScale; + } + + inline double __ConvertToVirCoord(double val) + { + return val * __vcBaseScale / __pcBaseScale; + } +}; + +}} // Tizen::Graphics + +#endif // _FGRP_INTERNAL_CANVASCOORDHOLDER_H_ diff --git a/src/graphics/FGrp_CanvasGpArc.cpp b/src/graphics/FGrp_CanvasGpArc.cpp new file mode 100644 index 0000000..f9a18b7 --- /dev/null +++ b/src/graphics/FGrp_CanvasGpArc.cpp @@ -0,0 +1,1639 @@ +// +// 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_CanvasGpArc.cpp + * @brief This is the implementation file for _CanvasArc class. + * + */ + +#include +#include +#include + +#include +#include "FGrp_CanvasGpPrimitive.h" + + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace // unnamed +{ + +const int _ARC_DELTA_SOLID_LINE = 4; +const int _MAX_ARC_OUTLINE_POINTS = 20000; +const int _MAX_STACK_COUNT = 200; + +const float _SINE_TABLE[] = // 91 items +{ + (float) 0.000000, (float) 0.017452, (float) 0.034899, (float) 0.052336, (float) 0.069756, + (float) 0.087156, (float) 0.104528, (float) 0.121869, (float) 0.139173, (float) 0.156434, + (float) 0.173648, (float) 0.190809, (float) 0.207912, (float) 0.224951, (float) 0.241922, + (float) 0.258819, (float) 0.275637, (float) 0.292372, (float) 0.309017, (float) 0.325568, + (float) 0.342020, (float) 0.358368, (float) 0.374607, (float) 0.390731, (float) 0.406737, + (float) 0.422618, (float) 0.438371, (float) 0.453990, (float) 0.469471, (float) 0.484810, + (float) 0.500000, (float) 0.515038, (float) 0.529919, (float) 0.544639, (float) 0.559193, + (float) 0.573576, (float) 0.587785, (float) 0.601815, (float) 0.615661, (float) 0.629320, + (float) 0.642788, (float) 0.656059, (float) 0.669131, (float) 0.681998, (float) 0.694658, + (float) 0.707107, (float) 0.719340, (float) 0.731354, (float) 0.743145, (float) 0.754709, + (float) 0.766044, (float) 0.777146, (float) 0.788011, (float) 0.798635, (float) 0.809017, + (float) 0.819152, (float) 0.829037, (float) 0.838670, (float) 0.848048, (float) 0.857167, + (float) 0.866025, (float) 0.874620, (float) 0.882948, (float) 0.891006, (float) 0.898794, + (float) 0.906308, (float) 0.913545, (float) 0.920505, (float) 0.927184, (float) 0.933580, + (float) 0.939693, (float) 0.945518, (float) 0.951056, (float) 0.956305, (float) 0.961262, + (float) 0.965926, (float) 0.970296, (float) 0.974370, (float) 0.978148, (float) 0.981627, + (float) 0.984808, (float) 0.987688, (float) 0.990268, (float) 0.992546, (float) 0.994522, + (float) 0.996195, (float) 0.997564, (float) 0.998630, (float) 0.999391, (float) 0.999848, + (float) 1.000000 +}; + +} + +namespace Tizen { namespace Graphics +{ + +bool +_CanvasArc::SetLineWidth(int lineWidth) +{ + __lineWidth = lineWidth; + + return true; +} + +int +_CanvasArc::GetLineWidth(void) const +{ + return __lineWidth; +} + +result +_CanvasArc::DrawArc(int rectX, int rectY, int rectW, int rectH, int startAngle, int endAngle, ArcStyle arcType, const _GpBufferInfo& bufInfo) +{ + int x; + int y; + int x1; + int y1; + int theta; + int centerX; + int centerY; + int radiusX; + int radiusY; + int halfLineW; + int preX = -1000; + int preY = -1000; + + bool isEllipse = false; + bool isClipped = true; + + _GpPoint* pPoints = null; + + int pixelCount; + + _CanvasEllipse ellipse; + _CanvasLine line; + + if (rectW < 1 || rectH < 1) + { + return E_SUCCESS; + } + + if (startAngle < 0 || endAngle < 0) + { + return E_SYSTEM; + } + + if (arcType < ARC_STYLE_ONLY || arcType > ARC_STYLE_FILLED_CHORD) + { + return E_SYSTEM; + } + + ellipse.SetLineWidth(__lineWidth); + line.SetLineWidth(__lineWidth); + + if (rectW == 1 && rectH == 1) + { + return (line._DrawPixelWithClipping(rectX, rectY, bufInfo) == GP_RESULT_FAIL ? E_SYSTEM : E_SUCCESS); + } + + if ((bufInfo.bitsPerPixel == 32 && (bufInfo.color32 & 0xFF000000) != 0xFF000000) || (rectW > 1200) || (rectH > 1200)) + { + switch (arcType) + { + case ARC_STYLE_ONLY: + case ARC_STYLE_PIE: + case ARC_STYLE_CHORD: + return __Draw32BitArc(rectX, rectY, rectW, rectH, startAngle, endAngle, arcType, bufInfo) ? E_SUCCESS : E_SYSTEM; + case ARC_STYLE_FILLED_PIE: + case ARC_STYLE_FILLED_CHORD: +// ret = __WmDraw32BitsFilledArc(gc, rectX, rectY, rectW, rectH, startAngle, endAngle, arcType); + break; + default: + break; + } + } + + if (startAngle == endAngle) + { + if (arcType == ARC_STYLE_FILLED_CHORD) + { + // Even width, height + if (rectW % 2 == 0) + { + rectW--; + } + + if (rectH % 2 == 0) + { + rectH--; + } + + // Radius + radiusX = rectW >> 1; + radiusY = rectH >> 1; + + // Center + centerX = rectX + radiusX; + centerY = rectY + radiusY; + + x = (int) (radiusX * __Cosine(startAngle) + 0.5); + y = (int) (radiusY * __Sine(startAngle) + 0.5); + + return (line._DrawPixelWithClipping(centerX + x, centerY + y, bufInfo) == GP_RESULT_FAIL ? E_SYSTEM : E_SUCCESS); + } + } + else if (GP_ABS(endAngle - startAngle) % 360 == 0) + { + isEllipse = true; + } + + pPoints = new (std::nothrow) _GpPoint[_MAX_ARC_OUTLINE_POINTS]; + + if (pPoints == null) + { + SysLog(NID_GRP, "DrawArc: Memory allocation is failed!\n"); + + return E_SYSTEM; + } + + memset(pPoints, 0, sizeof(pPoints[0]) * _MAX_ARC_OUTLINE_POINTS); + + // Swap angle + if (startAngle > endAngle) + { + GP_SWAP(startAngle, endAngle); + } + + // Get line width + halfLineW = (__lineWidth + 1) >> 1; + + if (line._IsInClipRect(rectX - halfLineW, rectY - halfLineW, rectW + (halfLineW << 1), rectH + (halfLineW << 1), bufInfo)) + { + isClipped = false; + line._SetNotClipFunction(true); + } + + // Even width, height + if (rectW % 2 == 0) + { + rectW--; + } + + if (rectH % 2 == 0) + { + rectH--; + } + + // Radius + radiusX = rectW >> 1; + radiusY = rectH >> 1; + + // Center + centerX = rectX + radiusX; + centerY = rectY + radiusY; + + if (arcType == ARC_STYLE_FILLED_PIE || arcType == ARC_STYLE_FILLED_CHORD) + { + pixelCount = 0; + } + + __GetArcVertices(radiusX, radiusY, startAngle, &x, &y); + + preX = x; + preY = y; + + if (arcType >= ARC_STYLE_ONLY && arcType <= ARC_STYLE_CHORD) + { + if (__lineWidth > 1) + { + int halfLineW = __lineWidth >> 1; + + for (theta = startAngle; theta <= endAngle; theta += _ARC_DELTA_SOLID_LINE) + { + if (theta + _ARC_DELTA_SOLID_LINE >= endAngle) + { + theta = endAngle; + } + + __GetArcVertices(radiusX, radiusY, theta, &x, &y); + + if (GP_ABS(x - preX) >= 2 || GP_ABS(y - preY) >= 2) + { + _GpPoint startPoint = { centerX + preX, centerY - preY }; + _GpPoint endPoint = { centerX + x, centerY - y }; + + line.DrawLine(startPoint, endPoint, bufInfo); + } + else + { + ellipse.FillElliepse(centerX + x - halfLineW, centerY - y - halfLineW, __lineWidth, __lineWidth, bufInfo); + } + + preX = x; + preY = y; + } + + if (theta < endAngle + _ARC_DELTA_SOLID_LINE) + { + __GetArcVertices(radiusX, radiusY, theta, &x, &y); + + if (GP_ABS(x - preX) >= 2 || GP_ABS(y - preY) >= 2) + { + _GpPoint startPoint = { centerX + preX, centerY - preY }; + _GpPoint endPoint = { centerX + x, centerY - y }; + + line.DrawLine(startPoint, endPoint, bufInfo); + } + else + { + ellipse.FillElliepse(centerX + x - halfLineW, centerY - y - halfLineW, __lineWidth, __lineWidth, bufInfo); + } + } + } + else + { + for (theta = startAngle; theta <= endAngle; theta += _ARC_DELTA_SOLID_LINE) + { + if (theta + _ARC_DELTA_SOLID_LINE >= endAngle) + { + theta = endAngle; + } + + __GetArcVertices(radiusX, radiusY, theta, &x, &y); + + _GpPoint tempPoint1 = { centerX + preX, centerY - preY }; + _GpPoint tempPoint2 = { centerX + x, centerY - y }; + + line._DrawUnitLineSlant(tempPoint1, tempPoint2, bufInfo); + + preX = x; + preY = y; + } + + if (theta < endAngle + _ARC_DELTA_SOLID_LINE) + { + __GetArcVertices(radiusX, radiusY, endAngle, &x, &y); + + _GpPoint tempPoint1 = { centerX + preX, centerY - preY }; + _GpPoint tempPoint2 = { centerX + x, centerY - y }; + + line._DrawUnitLineSlant(tempPoint1, tempPoint2, bufInfo); + } + } + } + else + { + for (theta = startAngle; theta <= endAngle; theta += _ARC_DELTA_SOLID_LINE) + { + if (theta + _ARC_DELTA_SOLID_LINE >= endAngle) + { + theta = endAngle; + } + + __GetArcVertices(radiusX, radiusY, theta, &x, &y); + __SaveLine(centerX + preX, centerY - preY, centerX + x, centerY - y, pPoints, &pixelCount); + preX = x; + preY = y; + + } + + if (theta < endAngle + _ARC_DELTA_SOLID_LINE) + { + __GetArcVertices(radiusX, radiusY, endAngle, &x, &y); + __SaveLine(centerX + preX, centerY - preY, centerX + x, centerY - y, pPoints, &pixelCount); + } + } + + switch (arcType) + { + case ARC_STYLE_FILLED_PIE: + if (isEllipse == null) + { + __GetArcVertices(radiusX, radiusY, startAngle, &x, &y); + __SaveLine(centerX, centerY, centerX + x, centerY - y, pPoints, &pixelCount); + + __GetArcVertices(radiusX, radiusY, endAngle, &x, &y); + __SaveLine(centerX, centerY, centerX + x, centerY - y, pPoints, &pixelCount); + } + __FillArcWithEvenOdd(pPoints, pixelCount, isClipped, bufInfo); + break; + + case ARC_STYLE_PIE: + if (isEllipse == null) + { + _GpPoint startPoint = { centerX, centerY }; + + { + __GetArcVertices(radiusX, radiusY, startAngle, &x, &y); + + _GpPoint endPoint = { centerX + x, centerY - y }; + + if (__lineWidth > 1) + { + line.DrawLine(startPoint, endPoint, bufInfo); + } + else + { + line._DrawUnitLineSlant(startPoint, endPoint, bufInfo); + } + } + + { + __GetArcVertices(radiusX, radiusY, endAngle, &x, &y); + + _GpPoint endPoint = { centerX + x, centerY - y }; + + if (__lineWidth > 1) + { + line.DrawLine(startPoint, endPoint, bufInfo); + } + else + { + line._DrawUnitLineSlant(startPoint, endPoint, bufInfo); + } + } + + } + break; + + case ARC_STYLE_FILLED_CHORD: + if (isEllipse == null) + { + __GetArcVertices(radiusX, radiusY, startAngle, &x, &y); + __GetArcVertices(radiusX, radiusY, endAngle, &x1, &y1); + + __SaveLine(centerX + x, centerY - y, centerX + x1, centerY - y1, pPoints, &pixelCount); + } + __FillArcWithEvenOdd(pPoints, pixelCount, isClipped, bufInfo); + break; + + case ARC_STYLE_CHORD: + if (isEllipse == null) + { + __GetArcVertices(radiusX, radiusY, startAngle, &x, &y); + __GetArcVertices(radiusX, radiusY, endAngle, &x1, &y1); + + _GpPoint startPoint = { centerX + x, centerY - y }; + _GpPoint endPoint = { centerX + x1, centerY - y1 }; + + if (__lineWidth > 1) + { + line.DrawLine(startPoint, endPoint, bufInfo); + } + else + { + line._DrawUnitLineSlant(startPoint, endPoint, bufInfo); + } + } + break; + + default: + // Skip + break; + } + + if (arcType == ARC_STYLE_FILLED_PIE || arcType == ARC_STYLE_FILLED_CHORD) + { + pixelCount = 0; + } + + delete[] pPoints; + + return E_SUCCESS; +} + +bool +_CanvasArc::__GetArcVertices(int radiusX, int radiusY, int theta, int* pX, int* pY) const +{ + float degree; + float r; + float t1x; + float t1y; + float sinR; + float cosR; + float t2x; + float t2y; + _CanvasLine line; + + degree = (float) theta; + + r = (float) atan2(radiusX * sin(_GP_DEGREE2RADIAN(degree)), radiusY * cos(_GP_DEGREE2RADIAN(degree))); + + while (r < 0) + { + r = r + 2 * _PI; + } + + sinR = (float) sin(r); + cosR = (float) cos(r); + + t1x = radiusX * cosR; + t1y = radiusY * sinR; + + line._Rotate2DPoint(t1x, t1y, 0, &t2x, &t2y); + + *pX = (int) t2x; + *pY = (int) t2y; + + return true; +} + +float +_CanvasArc::__Sine(int degree) const +{ + degree %= 360; + + if (degree <= 90) + { + return _SINE_TABLE[degree]; + } + else if (degree <= 180) + { + return _SINE_TABLE[180 - degree]; + } + else if (degree <= 270) + { + return -_SINE_TABLE[degree - 180]; + } + else + { + return -_SINE_TABLE[360 - degree]; + } +} + +float +_CanvasArc::__Cosine(int degree) const +{ + return __Sine(degree + 90); +} + +bool +_CanvasArc::__SaveLine(int x1, int y1, int x2, int y2, _GpPoint* pPoints, int* pPixelCount) const +{ + if ((x1 == x2) && (y1 == y2)) + { + return true; + } + else if (y1 == y2) + { + return true; // Horizontal Line + } + else + { + register int x; + register int y; + int iy1; + int iy2; + int startY; + int endY; + int incdec; + long tmpX; + long dx; + long dy; + int pointCount; + + iy1 = y1; + iy2 = y2; + + if (y1 < y2) + { + startY = iy1; + endY = iy2 - 1; + incdec = 1; + } + else + { + startY = iy1 - 1; + endY = iy2; + incdec = -1; + } + dx = x2 - x1; + dy = y2 - y1; + + // Get point count + pointCount = *pPixelCount; + + if (dx == 0) + { + for (y = startY; y != endY + incdec; y += incdec) + { + if (pointCount < _MAX_ARC_OUTLINE_POINTS) + { + pPoints[pointCount].x = x1; + pPoints[pointCount].y = y; + pointCount++; + } + else + { + SysLog(NID_GRP, "__SaveLine: buffer overflow!\n"); + return false; + } + } + } + else + { + for (y = startY; y != endY + incdec; y += incdec) + { + tmpX = ((y - y1) * dx) / dy; + x = x1 + tmpX; + + if (pointCount < _MAX_ARC_OUTLINE_POINTS) + { + pPoints[pointCount].x = x; + pPoints[pointCount].y = y; + pointCount++; + } + else + { + SysLog(NID_GRP, "__SaveLine: buffer overflow!\n"); + return false; + } + } + } + *pPixelCount = pointCount; + } + + return true; +} + +bool +_CanvasArc::__FillArcWithEvenOdd(_GpPoint* pPoints, int pixelCount, bool clip, const _GpBufferInfo& bufInfo) const +{ + int i; + int x1; + int y1; + int x2; + int y2; + int clipX = 0; + int clipY = 0; + int clipEndX = 0; + int clipEndY = 0; + _CanvasLine line; + + if (pPoints == null) + { + return true; + } + + if (pixelCount <= 1) + { + return true; + } + + line.SetLineWidth(__lineWidth); + + if (clip) + { + if (bufInfo.isClipBoundsSet) + { + clipX = bufInfo.clipBounds.x; + clipY = bufInfo.clipBounds.y; + clipEndX = clipX + bufInfo.clipBounds.width - 1; + clipEndY = clipY + bufInfo.clipBounds.height - 1; + } + else + { + clipX = 0; + clipY = 0; + clipEndX = bufInfo.width - 1; + clipEndY = bufInfo.height - 1; + } + } + + // Sort points + __QuickSort(pPoints, 0, pixelCount - 1); + + // Filling + for (i = 0; i < pixelCount - 1; ) + { + x1 = pPoints[i].x; + y1 = pPoints[i].y; + x2 = pPoints[i + 1].x; + y2 = pPoints[i + 1].y; + + if (y1 == y2) + { + if (x1 == x2) + { + if (clip) + { + if (x1 < clipX || x1 > clipEndX) + { + goto CLIP_EXIT; + } + + if (y1 < clipY || y1 > clipEndY) + { + goto CLIP_EXIT; + } + } + + line._DrawPixel(x1, y1, bufInfo); + } + else + { + // Swapping + if (x1 > x2) + { + GP_SWAP(x1, x2); + } + + if (clip) + { + if (y1 < clipY || y1 > clipEndY) + { + goto CLIP_EXIT; + } + + if (x2 < clipX || x1 > clipEndX) + { + goto CLIP_EXIT; + } + + if (x1 < clipX) + { + x1 = clipX; + } + + if (x2 > clipEndX) + { + x2 = clipEndX; + } + } + + // draw primitive line + line._DrawUnitLineHorizontal(x1, x2, y1, bufInfo); + } +CLIP_EXIT: + i += 2; + } + else // Exception handling + { + i++; + } + } + + return true; +} + +void +_CanvasArc::__QuickSort(_GpPoint* pPoints, int left, int right) const +{ + GpArcStack stack[_MAX_STACK_COUNT]; + _GpPoint tmp; + _GpPoint pivot; + GpArcDiffResult result; + register int i; + register int j; + register int top = 1; + + // Check parameter + if (pPoints == null) + { + return; + } + + // init stack + stack[0].left = -1; + stack[0].right = -1; + + stack[top].left = left; + stack[top].right = right; + do + { + left = stack[top].left; + + if (left < 0) + { + break; + } + + right = stack[top--].right; + + if (right < 0) + { + break; + } + + do + { + i = left; + j = right; + pivot = pPoints[((left + right) >> 1)]; + do + { + while (true) + { + if (pPoints[i].y > pivot.y) + { + result = DIFF_RESULT_GREAT; + } + else if (pPoints[i].y == pivot.y) + { + if (pPoints[i].x > pivot.x) + { + result = DIFF_RESULT_GREAT; + } + else if (pPoints[i].x == pivot.x) + { + result = DIFF_RESULT_EQUAL; + } + else + { + result = DIFF_RESULT_LITTLE; + } + } + else + { + result = DIFF_RESULT_LITTLE; + } + + if (result == DIFF_RESULT_LITTLE) + { + i++; + } + else + { + break; + } + } + + while (true) + { + if (pPoints[j].y > pivot.y) + { + result = DIFF_RESULT_GREAT; + } + else if (pPoints[j].y == pivot.y) + { + if (pPoints[j].x > pivot.x) + { + result = DIFF_RESULT_GREAT; + } + else if (pPoints[j].x == pivot.x) + { + result = DIFF_RESULT_EQUAL; + } + else + { + result = DIFF_RESULT_LITTLE; + } + } + else + { + result = DIFF_RESULT_LITTLE; + } + + if (result == DIFF_RESULT_GREAT) + { + j--; + } + else + { + break; + } + } + + if (i <= j) + { + tmp = pPoints[i]; + pPoints[i] = pPoints[j]; + pPoints[j] = tmp; + i++; + j--; + } + } + while (i <= j); + + if (j - left < right - i) + { + if (i < right) + { + if (top >= _MAX_STACK_COUNT - 1) + { + return; + } + + stack[++top].left = i; + stack[top].right = right; + } + right = j; + } + else + { + if (left < j) + { + if (top >= _MAX_STACK_COUNT - 1) + { + return; + } + + stack[++top].left = left; + stack[top].right = j; + } + left = i; + } + } + while (left < right); + } + while (top != -1); +} + + +bool +_CanvasArc::__Draw32BitArc(int rectX, int rectY, int rectW, int rectH, int d0, int d1, ArcStyle arcType, const _GpBufferInfo& bufInfo) +{ + int dx; + int dy; + float rx; + float ry; + float centerX; + float centerY; + int cx; + int cy; + + if ((rectW <= 0) || (rectH <= 0)) + { + return true; + } + + if ((d0 % 360 == d1 % 360) && (d1 - d0 != 360)) + { + return true; + } + + dx = (rectW + 1) % 2; + dy = (rectH + 1) % 2; + + rx = (float) (rectW / 2 - dx); + ry = (float) (rectH / 2 - dy); + + if (dx) + { + rx += 0.5f; + } + + if (dy) + { + ry += 0.5f; + } + + centerX = (float) (rectX) + rx; + centerY = (float) (rectY) + ry; + + cx = (int) (centerX); + cy = (int) (centerY); + + if (__lineWidth < 2) + { + _GpFloatPoint* pEllipsePoint = null; + int n; + int i; + _GpPoint* pPoints = null; + bool isConnected = false; + _CanvasLine line; + + n = line._MakeEllipseArcPointArray(&pEllipsePoint, null, centerX, centerY, rx, ry, d0, d1, 0); + + if (n < 2) + { + SysLog(NID_GRP, "__Draw32BitArc: _MakeEllipseArcPointArray is failed!\n"); + + if (pEllipsePoint) + { + delete[] pEllipsePoint; + } + + return false; + } + + pPoints = new (std::nothrow) _GpPoint[n + 1]; + + if (pPoints == null) + { + SysLog(NID_GRP, "__Draw32BitArc: Memory allocation is failed!\n"); + + if (pEllipsePoint) + { + delete[] pEllipsePoint; + } + + return false; + } + + for (i = 0; i < n; i++) + { + pPoints[i].x = (int) pEllipsePoint[i].fx; + pPoints[i].y = (int) pEllipsePoint[i].fy; + } + + pPoints[n].x = 0; + pPoints[n].y = 0; + + switch (arcType) + { + case ARC_STYLE_ONLY: + break; + case ARC_STYLE_CHORD: + isConnected = true; + break; + case ARC_STYLE_PIE: + isConnected = true; + pPoints[n].x = cx; + pPoints[n].y = cy; + n++; + break; + default: + SysLog(NID_GRP, "__Draw32BitArc: Invalid arc [%d]type - 1!\n", arcType); + delete[] pEllipsePoint; + delete[] pPoints; + + return false; + } + + line._DrawPolyLine(n, pPoints, isConnected, bufInfo); + + delete[] pEllipsePoint; + delete[] pPoints; + + return true; + } + else + { + switch (arcType) + { + case ARC_STYLE_ONLY: + if (!__DrawThickContinuousArc(cx, cy, rectW / 2, rectH / 2, d0, d1, bufInfo)) + { + SysLog(NID_GRP, "__Draw32BitArc: __DrawThickContinuousArc is failed!\n"); + + return false; + } + break; + case ARC_STYLE_PIE: + if (!__DrawThickContinuousPie(cx, cy, rectW / 2, rectH / 2, d0, d1, bufInfo)) + { + SysLog(NID_GRP, "__Draw32BitArc: __DrawThickContinuousPie is failed!\n"); + + return false; + } + break; + case ARC_STYLE_CHORD: + if (!__DrawThickContinuousChord(cx, cy, rectW / 2, rectH / 2, d0, d1, bufInfo)) + { + SysLog(NID_GRP, "__Draw32BitArc: __DrawThickContinuousChord is failed!\n"); + + return false; + } + break; + default: + SysLog(NID_GRP, "__Draw32BitArc: Invalid arc [%d]type - 2!\n", arcType); + + return false; + } + } + + return true; +} + +bool +_CanvasArc::__DrawThickContinuousArc(int cx, int cy, int halfW, int halfH, int d0, int d1, const _GpBufferInfo& bufInfo) const +{ + int ellipsePointCount; + int i; + bool result; + _GpFloatPoint* pEllipsePoint = null; + _GpFloatPoint* pEpNormal = null; + float wl; + float wr; + _GpPolygon* pPolygon = null; + _GpPoint* pTempPoints = null; + _GpVertex* pVertex = null; + _CanvasLine line; + + float radiusX = (float) halfW; + float radiusY = (float) halfH; + + float centerX = (float) cx; + float centerY = (float) cy; + + line.SetLineWidth(__lineWidth); + ellipsePointCount = line._MakeEllipseArcPointArray(&pEllipsePoint, &pEpNormal, centerX, centerY, radiusX, radiusY, d0, d1, 0); + + if (ellipsePointCount < 2 || pEllipsePoint == null || pEpNormal == null) + { + SysLog(NID_GRP, "__DrawThickContinuousArc: _MakeEllipseArcPointArray is failed!\n"); + + delete[] pEllipsePoint; + delete[] pEpNormal; + + return false; + } + + _CalcLeftRightWidth(&wl, &wr); + + pPolygon = new (std::nothrow) _GpPolygon; + + if (pPolygon == null) + { + SysLog(NID_GRP, "__DrawThickContinuousArc: _CreatePolygon is failed!\n"); + + delete[] pEllipsePoint; + delete[] pEpNormal; + + return false; + } + + if (!line._PatchRoundCap(pPolygon, (int) pEllipsePoint[0].fx, (int) pEllipsePoint[0].fy, pEpNormal[0].fy, -pEpNormal[0].fx, true)) + { + SysLog(NID_GRP, "__DrawThickContinuousArc: _PatchRoundCap is failed - 1!\n"); + + line._FreePolygon(pPolygon); + + delete[] pEllipsePoint; + delete[] pEpNormal; + + return false; + } + + for (i = 0; i < ellipsePointCount; i++) + { + result = line._AddPolygonVertex(pPolygon, (int) (pEllipsePoint[i].fx - (pEpNormal[i].fx * wl)), (int) (pEllipsePoint[i].fy - (pEpNormal[i].fy * wl)), 0); + + if (!result) + { + SysLog(NID_GRP, "__DrawThickContinuousArc: _AddPolygonVertex is failed - 1!\n"); + line._FreePolygon(pPolygon); + + delete[] pEllipsePoint; + delete[] pEpNormal; + + return false; + } + + result = line._AddPolygonVertex(pPolygon, (int) (pEllipsePoint[i].fx + (pEpNormal[i].fx * wr)), (int) (pEllipsePoint[i].fy + (pEpNormal[i].fy * wr)), 1); + + if (!result) + { + SysLog(NID_GRP, "__DrawThickContinuousArc: _AddPolygonVertex is failed - 1!\n"); + line._FreePolygon(pPolygon); + + delete[] pEllipsePoint; + delete[] pEpNormal; + + return false; + } + } + + i = ellipsePointCount - 1; + + if (!line._PatchRoundCap(pPolygon, (int) pEllipsePoint[i].fx, (int) pEllipsePoint[i].fy, pEpNormal[i].fy, -pEpNormal[i].fx, false)) + { + SysLog(NID_GRP, "__DrawThickContinuousArc: _PatchRoundCap is failed - 2!\n"); + line._FreePolygon(pPolygon); + + delete[] pEllipsePoint; + delete[] pEpNormal; + + return false; + } + + //release memory + delete[] pEllipsePoint; + pEllipsePoint = null; + + delete[] pEpNormal; + pEpNormal = null; + + pTempPoints = new (std::nothrow) _GpPoint[pPolygon->n]; + + if (pTempPoints == null) + { + SysLog(NID_GRP, "__DrawThickContinuousArc: Memory allocation is failed - 2!\n"); + line._FreePolygon(pPolygon); + + return false; + } + + for (i = 0, pVertex = pPolygon->pFirst; pVertex != null; i++, pVertex = pVertex->pNext) + { + pTempPoints[i] = pVertex->point; + } + + line._FillPolygon(pPolygon->n, pTempPoints, false, bufInfo); + + line._FreePolygon(pPolygon); + + delete[] pTempPoints; + + return true; +} + +bool +_CanvasArc::__DrawThickContinuousPie(int cx, int cy, int halfW, int halfH, int d0, int d1, const _GpBufferInfo& bufInfo) const +{ + int ellipsePointCount; + int i; + int result; + _GpFloatPoint* pEllipsePoint = null; + _GpFloatPoint* pEpNormal = null; + float wl; + float wr; + float ox; + float oy; + float qx; + float qy; + _GpPolygon* pPolygon = null; + _GpVertex* pVertex = null; + _GpPoint* pTempPoints = null; + _CanvasLine line; + + float radiusX = (float) halfW; + float radiusY = (float) halfH; + + float centerX = (float) cx; + float centerY = (float) cy; + + line.SetLineWidth(__lineWidth); + ellipsePointCount = line._MakeEllipseArcPointArray(&pEllipsePoint, &pEpNormal, centerX, centerY, radiusX, radiusY, d0, d1, 0); + + if (ellipsePointCount < 2 || pEllipsePoint == null || pEpNormal == null) + { + SysLog(NID_GRP, "__DrawThickContinuousPie: _MakeEllipseArcPointArray is failed!\n"); + + delete[] pEllipsePoint; + delete[] pEpNormal; + + return false; + } + + _CalcLeftRightWidth(&wl, &wr); + + pPolygon = new (std::nothrow) _GpPolygon; + + if (pPolygon == null) + { + SysLog(NID_GRP, "__DrawThickContinuousPie: _CreatePolygon is failed!\n"); + + delete[] pEllipsePoint; + delete[] pEpNormal; + + return false; + } + + if (!line._PatchRoundCap(pPolygon, (int) pEllipsePoint[0].fx, (int) pEllipsePoint[0].fy, pEpNormal[0].fy, -pEpNormal[0].fx, true)) + { + SysLog(NID_GRP, "__DrawThickContinuousPie: _PatchRoundCap is failed - 1!\n"); + + line._FreePolygon(pPolygon); + + delete[] pEllipsePoint; + delete[] pEpNormal; + + return false; + } + + for (i = 0; i < ellipsePointCount; i++) + { + result = line._AddPolygonVertex(pPolygon, (int) (pEllipsePoint[i].fx - (pEpNormal[i].fx * wl)), (int) (pEllipsePoint[i].fy - (pEpNormal[i].fy * wl)), 0); + + if (!result) + { + SysLog(NID_GRP, "__DrawThickContinuousPie: _AddPolygonVertex is failed - 1!\n"); + + line._FreePolygon(pPolygon); + + delete[] pEllipsePoint; + delete[] pEpNormal; + + return false; + } + + result = line._AddPolygonVertex(pPolygon, (int) (pEllipsePoint[i].fx + (pEpNormal[i].fx * wr)), (int) (pEllipsePoint[i].fy + (pEpNormal[i].fy * wr)), 1); + + if (!result) + { + SysLog(NID_GRP, "__DrawThickContinuousPie: _AddPolygonVertex is failed - 2!\n"); + + line._FreePolygon(pPolygon); + + delete[] pEllipsePoint; + delete[] pEpNormal; + + return false; + } + } + + i = ellipsePointCount - 1; + + _GpPoint pt1 = { (int) pEllipsePoint[i].fx, (int) pEllipsePoint[i].fy }; + _GpPoint pt2 = { cx, cy }; + + line._GetOrientationUnitVector(pt1, pt2, &ox, &oy); + + result = line._PatchJoint(pPolygon, (int) pEllipsePoint[i].fx, (int) pEllipsePoint[i].fy, pEpNormal[i].fy, -pEpNormal[i].fx, ox, oy); + + if (!result) + { + SysLog(NID_GRP, "__DrawThickContinuousPie: _PatchJoint is failed -1!\n"); + + line._FreePolygon(pPolygon); + + delete[] pEllipsePoint; + delete[] pEpNormal; + + return false; + } + + pt1.x = (int) pEllipsePoint[i].fx; + pt1.y = (int) pEllipsePoint[i].fy; + pt2.x = cx; + pt2.y = cy; + + result = line._PatchThickContinuousLine(pPolygon, pt1, pt2, ox, oy, 0, 0); + + if (!result) + { + SysLog(NID_GRP, "__DrawThickContinuousPie: _PatchThickContinuousLine is failed -1!\n"); + + line._FreePolygon(pPolygon); + + delete[] pEllipsePoint; + delete[] pEpNormal; + + return false; + } + + pt1.x = cx; + pt1.y = cy; + pt2.x = (int) pEllipsePoint[0].fx; + pt2.y = (int) pEllipsePoint[0].fy; + + line._GetOrientationUnitVector(pt1, pt2, &qx, &qy); + + result = line._PatchJoint(pPolygon, cx, cy, ox, oy, qx, qy); + + if (!result) + { + SysLog(NID_GRP, "__DrawThickContinuousPie: _PatchJoint is failed-2!\n"); + + line._FreePolygon(pPolygon); + + delete[] pEllipsePoint; + delete[] pEpNormal; + + return false; + } + + pt1.x = cx; + pt1.y = cy; + pt2.x = (int) pEllipsePoint[0].fx; + pt2.y = (int) pEllipsePoint[0].fy; + + result = line._PatchThickContinuousLine(pPolygon, pt1, pt2, qx, qy, 0, 0); + + if (!result) + { + SysLog(NID_GRP, "__DrawThickContinuousPie: _PatchThickContinuousLine is failed-2!\n"); + + line._FreePolygon(pPolygon); + + delete[] pEllipsePoint; + delete[] pEpNormal; + + return false; + } + + result = line._PatchJoint(pPolygon, (int) pEllipsePoint[0].fx, (int) pEllipsePoint[0].fy, qx, qy, pEpNormal[0].fy, -pEpNormal[0].fx); + + if (!result) + { + SysLog(NID_GRP, "__DrawThickContinuousPie: _PatchJoint is failed-3!\n"); + + line._FreePolygon(pPolygon); + + delete[] pEllipsePoint; + delete[] pEpNormal; + + return false; + } + + result = line._AddPolygonVertex(pPolygon, (int) (pEllipsePoint[0].fx + (pEpNormal[0].fx * wl)), (int) (pEllipsePoint[0].fy + (pEpNormal[0].fy * wl)), 0); + + if (!result) + { + SysLog(NID_GRP, "__DrawThickContinuousPie: _AddPolygonVertex is failed - 3!\n"); + + line._FreePolygon(pPolygon); + + delete[] pEllipsePoint; + delete[] pEpNormal; + + return false; + } + + result = line._AddPolygonVertex(pPolygon, (int) (pEllipsePoint[0].fx + (pEpNormal[0].fx * wr)), (int) (pEllipsePoint[0].fy + (pEpNormal[0].fy * wr)), 1); + + if (!result) + { + SysLog(NID_GRP, "__DrawThickContinuousPie: _AddPolygonVertex is failed - 4!\n"); + + line._FreePolygon(pPolygon); + + delete[] pEllipsePoint; + delete[] pEpNormal; + + return false; + } + + delete[] pEllipsePoint; + pEllipsePoint = null; + + delete[] pEpNormal; + pEpNormal = null; + + pTempPoints = new (std::nothrow) _GpPoint[pPolygon->n]; + + if (pTempPoints == null) + { + SysLog(NID_GRP, "__DrawThickContinuousPie: Memory allocation is failed - 2!\n"); + line._FreePolygon(pPolygon); + return false; + } + + for (i = 0, pVertex = pPolygon->pFirst; pVertex != null; i++, pVertex = pVertex->pNext) + { + pTempPoints[i].x = pVertex->point.x; + pTempPoints[i].y = pVertex->point.y; + } + + line._FillPolygon(pPolygon->n, pTempPoints, false, bufInfo); + + line._FreePolygon(pPolygon); + + delete[] pTempPoints; + + return true; +} + +bool +_CanvasArc::__DrawThickContinuousChord(int cx, int cy, int halfW, int halfH, int d0, int d1, const _GpBufferInfo& bufInfo) const +{ + int ellipsePointCount; + int i; + _GpFloatPoint* pEllipsePoint = null; + _GpFloatPoint* pEpNormal = null; + float wl; + float wr; + float ox; + float oy; + _GpPolygon* pPolygon = null; + _GpPoint* pTempPoints = null; + _GpVertex* pVertex = null; + _CanvasLine line; + + bool result = true; + + float radiusX = (float) halfW; + float radiusY = (float) halfH; + + float centerX = (float) cx; + float centerY = (float) cy; + + line.SetLineWidth(__lineWidth); + ellipsePointCount = line._MakeEllipseArcPointArray(&pEllipsePoint, &pEpNormal, centerX, centerY, radiusX, radiusY, d0, d1, 0); + + if (ellipsePointCount < 2 || pEllipsePoint == null || pEpNormal == null) + { + SysLog(NID_GRP, "__DrawThickContinuousChord: _MakeEllipseArcPointArray is failed!\n"); + + delete[] pEllipsePoint; + delete[] pEpNormal; + + return false; + } + + _CalcLeftRightWidth(&wl, &wr); + + pPolygon = new (std::nothrow) _GpPolygon; + + if (pPolygon == null) + { + SysLog(NID_GRP, "__DrawThickContinuousChord: _CreatePolygon is failed!\n"); + + delete[] pEllipsePoint; + delete[] pEpNormal; + + return false; + } + + if (!line._PatchRoundCap(pPolygon, (int) pEllipsePoint[0].fx, (int) pEllipsePoint[0].fy, pEpNormal[0].fy, -pEpNormal[0].fx, true)) + { + SysLog(NID_GRP, "__DrawThickContinuousChord: _PatchRoundCap is failed - 1!\n"); + + line._FreePolygon(pPolygon); + + delete[] pEllipsePoint; + delete[] pEpNormal; + + return false; + } + + for (i = 0; i < ellipsePointCount; i++) + { + result = line._AddPolygonVertex(pPolygon, (int) (pEllipsePoint[i].fx - (pEpNormal[i].fx * wl)), (int) (pEllipsePoint[i].fy - (pEpNormal[i].fy * wl)), 0); + + if (!result) + { + SysLog(NID_GRP, "__DrawThickContinuousChord: _AddPolygonVertex is failed - 1!\n"); + + line._FreePolygon(pPolygon); + + delete[] pEllipsePoint; + delete[] pEpNormal; + + return false; + } + + result = line._AddPolygonVertex(pPolygon, (int) (pEllipsePoint[i].fx + (pEpNormal[i].fx * wr)), (int) (pEllipsePoint[i].fy + (pEpNormal[i].fy * wr)), 1); + + if (!result) + { + SysLog(NID_GRP, "__DrawThickContinuousChord: _AddPolygonVertex is failed - 1!\n"); + + line._FreePolygon(pPolygon); + + delete[] pEllipsePoint; + delete[] pEpNormal; + + return false; + } + } + + if ((d0 % 360) != (d1 % 360)) + { + i = ellipsePointCount - 1; + + _GpPoint pt1 = { (int) pEllipsePoint[i].fx, (int) pEllipsePoint[i].fy }; + _GpPoint pt2 = { (int) pEllipsePoint[0].fx, (int) pEllipsePoint[0].fy }; + + line._GetOrientationUnitVector(pt1, pt2, &ox, &oy); + + result = line._PatchJoint(pPolygon, (int) pEllipsePoint[i].fx, (int) pEllipsePoint[i].fy, pEpNormal[i].fy, -pEpNormal[i].fx, ox, oy); + + if (!result) + { + SysLog(NID_GRP, "__DrawThickContinuousChord: _PatchJoint is failed - 1!\n"); + + line._FreePolygon(pPolygon); + + delete[] pEllipsePoint; + delete[] pEpNormal; + + return false; + } + + pt1.x = (int) pEllipsePoint[i].fx; + pt1.y = (int) pEllipsePoint[i].fy; + pt2.x = (int) pEllipsePoint[0].fx; + pt2.y = (int) pEllipsePoint[0].fy; + + result = line._PatchThickContinuousLine(pPolygon, pt1, pt2, ox, oy, 0, 0); + + if (!result) + { + SysLog(NID_GRP, "__DrawThickContinuousChord: _PatchJoint is failed - 1!\n"); + + line._FreePolygon(pPolygon); + + delete[] pEllipsePoint; + delete[] pEpNormal; + + return false; + } + + result = line._PatchJoint(pPolygon, (int) pEllipsePoint[0].fx, (int) pEllipsePoint[0].fy, ox, oy, pEpNormal[0].fy, -pEpNormal[0].fx); + + if (!result) + { + SysLog(NID_GRP, "__DrawThickContinuousChord: _PatchJoint is failed - 2!\n"); + + line._FreePolygon(pPolygon); + + delete[] pEllipsePoint; + delete[] pEpNormal; + + return false; + } + + result = line._AddPolygonVertex(pPolygon, (int) (pEllipsePoint[0].fx + (pEpNormal[0].fx * wl)), (int) (pEllipsePoint[0].fy + (pEpNormal[0].fy * wl)), 0); + + if (!result) + { + SysLog(NID_GRP, "__DrawThickContinuousChord: _AddPolygonVertex is failed - 2!\n"); + + line._FreePolygon(pPolygon); + + delete[] pEllipsePoint; + delete[] pEpNormal; + + return false; + } + + result = line._AddPolygonVertex(pPolygon, (int) (pEllipsePoint[0].fx + (pEpNormal[0].fx * wr)), (int) (pEllipsePoint[0].fy + (pEpNormal[0].fy * wr)), 1); + + if (!result) + { + SysLog(NID_GRP, "__DrawThickContinuousChord: _AddPolygonVertex is failed - 3!\n"); + + line._FreePolygon(pPolygon); + + delete[] pEllipsePoint; + delete[] pEpNormal; + + return false; + } + } + + delete[] pEllipsePoint; + pEllipsePoint = null; + + delete[] pEpNormal; + pEpNormal = null; + + pTempPoints = new (std::nothrow) _GpPoint[pPolygon->n]; + + if (pTempPoints == null) + { + SysLog(NID_GRP, "__DrawThickContinuousChord: Memory allocation is failed!\n"); + line._FreePolygon(pPolygon); + + return false; + } + + for (i = 0, pVertex = pPolygon->pFirst; pVertex != null; i++, pVertex = pVertex->pNext) + { + pTempPoints[i].x = pVertex->point.x; + pTempPoints[i].y = pVertex->point.y; + } + + line._FillPolygon(pPolygon->n, pTempPoints, false, bufInfo); + + line._FreePolygon(pPolygon); + + delete[] pTempPoints; + + return true; +} + +void +_CanvasArc::_CalcLeftRightWidth(float* pWidthLeft, float* pWidthRight) const +{ + if (__lineWidth % 2 == 0) + { + *pWidthRight = __lineWidth / 2.0f; + *pWidthLeft = *pWidthRight - 1.0f; + } + else + { + *pWidthLeft = *pWidthRight = (__lineWidth - 1) / 2.0f; + } + + return; +} + +}} // Tizen::Graphics diff --git a/src/graphics/FGrp_CanvasGpEllipse.cpp b/src/graphics/FGrp_CanvasGpEllipse.cpp new file mode 100644 index 0000000..b66a317 --- /dev/null +++ b/src/graphics/FGrp_CanvasGpEllipse.cpp @@ -0,0 +1,537 @@ +// +// 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_CanvasGpEllipse.cpp + * @brief This is the implementation file for _CanvasEllipse class. + * + */ + +#include + +#include "FGrp_CanvasGpPrimitive.h" + + +using namespace Tizen::Graphics; + +namespace Tizen { namespace Graphics +{ + +bool +_CanvasEllipse::SetLineWidth(int lineWidth) +{ + __lineWidth = lineWidth; + + return true; +} + +int +_CanvasEllipse::GetLineWidth(void) const +{ + return __lineWidth; +} + +result +_CanvasEllipse::DrawEllipse(int rectX, int rectY, int rectW, int rectH, const _GpBufferInfo& bufInfo) const +{ + long d; + long a2; + long b2; + int x; + int y; + int halfLineWidth; + int centerX; + int centerY; + int radiusX; + int radiusY; + _CanvasLine line; + _GpResult ret = GP_RESULT_FAIL; + + line.SetLineWidth(__lineWidth); + + if (rectW == 1 && rectH == 1) + { + ret = line._DrawPixelWithClipping(rectX, rectY, bufInfo); + + return (ret == GP_RESULT_FAIL ? E_SYSTEM : E_SUCCESS); + } + + if ((bufInfo.bitsPerPixel == 32 && (bufInfo.color32 & 0xFF000000) != 0xFF000000) || (rectW > 1200) || (rectH > 1200)) + { + _CanvasArc arc; + arc.SetLineWidth(__lineWidth); + + return arc.DrawArc(rectX, rectY, rectW, rectH, 0, 360, ARC_STYLE_ONLY, bufInfo); + } + + if (__lineWidth > 1) + { + bool result = __DrawEllipseWithWidth(rectX, rectY, rectW, rectH, bufInfo); + + return ((result == false) ? E_SYSTEM : E_SUCCESS); + } + + halfLineWidth = (__lineWidth + 1) >> 1; + + if (line._IsInClipRect(rectX - halfLineWidth, rectY - halfLineWidth, rectW + (halfLineWidth << 1), rectH + (halfLineWidth << 1), bufInfo)) + { + line._SetNotClipFunction(true); + } + else + { + line._SetClipFunction(true); + } + + if (rectW < 3) + { + for (x = rectX; x < rectX + rectW; x++) + { + ret = (line.*line.pFuncVerticalLine)(x, rectY, rectY + rectH - 1, bufInfo); + } + + return (ret == GP_RESULT_FAIL ? E_SYSTEM : E_SUCCESS); + } + + if (rectH < 3) + { + for (y = rectY; y < rectY + rectH; y++) + { + ret = (line.*line.pFuncHorizontalLine)(rectX, rectX + rectW - 1, y, bufInfo); + } + + return (ret == GP_RESULT_FAIL ? E_SYSTEM : E_SUCCESS); + } + + // Even width, height + if (rectW % 2 == 0) + { + rectW--; + } + + if (rectH % 2 == 0) + { + rectH--; + } + + // Radius + radiusX = rectW >> 1; + radiusY = rectH >> 1; + + // Center + centerX = rectX + radiusX; + centerY = rectY + radiusY; + + a2 = (long) (radiusX * radiusX); + b2 = (long) (radiusY * radiusY); + + x = 0; + y = radiusY; + d = (4 * b2 + a2 * (1 - 4 * radiusY)) / 4; + + (line.*line.pFuncSetPixel)((-x + centerX), (-y + centerY), bufInfo); + (line.*line.pFuncSetPixel)((x + centerX), (-y + centerY), bufInfo); + (line.*line.pFuncSetPixel)((-x + centerX), (y + centerY), bufInfo); + (line.*line.pFuncSetPixel)((x + centerX), (y + centerY), bufInfo); + + while (b2 * x <= a2 * y) + { + ++x; + + if (d < 0) + { + d += b2 * (2 * x + 1); + } + else + { + --y; + d += b2 * (2 * x + 1) - 2 * a2 * y; + } + + (line.*line.pFuncSetPixel)((-x + centerX), (-y + centerY), bufInfo); + (line.*line.pFuncSetPixel)((x + centerX), (-y + centerY), bufInfo); + (line.*line.pFuncSetPixel)((-x + centerX), (y + centerY), bufInfo); + (line.*line.pFuncSetPixel)((x + centerX), (y + centerY), bufInfo); + + } + + x = radiusX; + y = 0; + d = (4 * a2 + b2 * (1 - 4 * radiusX)) / 4; + + (line.*line.pFuncSetPixel)((-x + centerX), (-y + centerY), bufInfo); + (line.*line.pFuncSetPixel)((x + centerX), (-y + centerY), bufInfo); + (line.*line.pFuncSetPixel)((-x + centerX), (y + centerY), bufInfo); + (line.*line.pFuncSetPixel)((x + centerX), (y + centerY), bufInfo); + + while (b2 * x > a2 * y) + { + ++y; + + if (d < 0) + { + d += a2 * (2 * y + 1); + } + else + { + --x; + d += -2 * b2 * x + a2 * (2 * y + 1); + } + + (line.*line.pFuncSetPixel)((-x + centerX), (-y + centerY), bufInfo); + (line.*line.pFuncSetPixel)((x + centerX), (-y + centerY), bufInfo); + (line.*line.pFuncSetPixel)((-x + centerX), (y + centerY), bufInfo); + (line.*line.pFuncSetPixel)((x + centerX), (y + centerY), bufInfo); + + } + + return E_SUCCESS; +} + +bool +_CanvasEllipse::__DrawEllipseWithWidth(int rectX, int rectY, int rectW, int rectH, const _GpBufferInfo& bufInfo) const +{ + long d; + long a2; + long b2; + int x; + int y; + int centerX; + int centerY; + int radiusX; + int radiusY; + int halfLineW; + int halfLineW2; + _CanvasLine line; + _CanvasEllipse ellipse; + _GpResult ret = GP_RESULT_FAIL; + + if (rectW < 1 || rectH < 1) + { + return true; + } + + halfLineW = __lineWidth >> 1; + halfLineW2 = (__lineWidth + 1) >> 1; + + line.SetLineWidth(__lineWidth); + ellipse.SetLineWidth(__lineWidth); + + if (line._IsInClipRect(rectX - halfLineW2, rectY - halfLineW2, rectW + (halfLineW2 << 1), rectH + (halfLineW2 << 1), bufInfo)) + { + line._SetNotClipFunction(true); + } + else + { + line._SetClipFunction(true); + } + + if (rectW < 3) + { + for (x = rectX; x < rectX + rectW; x++) + { + ret = (line.*line.pFuncVerticalLine)(x, rectY, rectY + rectH - 1, bufInfo); + } + + return (ret == GP_RESULT_FAIL ? false : true); + } + + if (rectH < 3) + { + for (y = rectY; y < rectY + rectH; y++) + { + ret = (line.*line.pFuncHorizontalLine)(rectX, rectX + rectW - 1, y, bufInfo); + } + + return (ret == GP_RESULT_FAIL ? false : true); + } + + // Radius + radiusX = rectW >> 1; + radiusY = rectH >> 1; + + if (rectW % 2 == 0) + { + radiusX--; + } + + if (rectH % 2 == 0) + { + radiusY--; + } + + // Center + centerX = rectX + radiusX; + centerY = rectY + radiusY; + + a2 = (long) (radiusX * radiusX); + b2 = (long) (radiusY * radiusY); + + x = 0; + y = radiusY; + d = (4 * b2 + a2 * (1 - 4 * radiusY)) / 4; + + // Get GC info + if (bufInfo.bitsPerPixel == 16) + { + // To do 16 bpp + return false; + } + + ellipse.FillElliepse(x + centerX - halfLineW, y + centerY - halfLineW, __lineWidth, __lineWidth, bufInfo); + ellipse.FillElliepse(x + centerX - halfLineW, -y + centerY - halfLineW, __lineWidth, __lineWidth, bufInfo); + ellipse.FillElliepse(-x + centerX - halfLineW, -y + centerY - halfLineW, __lineWidth, __lineWidth, bufInfo); + ellipse.FillElliepse(-x + centerX - halfLineW, y + centerY - halfLineW, __lineWidth, __lineWidth, bufInfo); + + while (b2 * x <= a2 * y) + { + ++x; + + if (d < 0) + { + d += b2 * (2 * x + 1); + } + else + { + --y; + d += b2 * (2 * x + 1) - 2 * a2 * y; + } + + ellipse.FillElliepse(x + centerX - halfLineW, y + centerY - halfLineW, __lineWidth, __lineWidth, bufInfo); + ellipse.FillElliepse(x + centerX - halfLineW, -y + centerY - halfLineW, __lineWidth, __lineWidth, bufInfo); + ellipse.FillElliepse(-x + centerX - halfLineW, -y + centerY - halfLineW, __lineWidth, __lineWidth, bufInfo); + ellipse.FillElliepse(-x + centerX - halfLineW, y + centerY - halfLineW, __lineWidth, __lineWidth, bufInfo); + + } + + x = radiusX; + y = 0; + d = (4 * a2 + b2 * (1 - 4 * radiusX)) / 4; + + ellipse.FillElliepse(x + centerX - halfLineW, y + centerY - halfLineW, __lineWidth, __lineWidth, bufInfo); + ellipse.FillElliepse(x + centerX - halfLineW, -y + centerY - halfLineW, __lineWidth, __lineWidth, bufInfo); + ellipse.FillElliepse(-x + centerX - halfLineW, -y + centerY - halfLineW, __lineWidth, __lineWidth, bufInfo); + ellipse.FillElliepse(-x + centerX - halfLineW, y + centerY - halfLineW, __lineWidth, __lineWidth, bufInfo); + + while (b2 * x > a2 * y) + { + ++y; + + if (d < 0) + { + d += a2 * (2 * y + 1); + } + else + { + --x; + d += -2 * b2 * x + a2 * (2 * y + 1); + } + + ellipse.FillElliepse(x + centerX - halfLineW, y + centerY - halfLineW, __lineWidth, __lineWidth, bufInfo); + ellipse.FillElliepse(x + centerX - halfLineW, -y + centerY - halfLineW, __lineWidth, __lineWidth, bufInfo); + ellipse.FillElliepse(-x + centerX - halfLineW, -y + centerY - halfLineW, __lineWidth, __lineWidth, bufInfo); + ellipse.FillElliepse(-x + centerX - halfLineW, y + centerY - halfLineW, __lineWidth, __lineWidth, bufInfo); + } + + return true; +} + +result +_CanvasEllipse::FillElliepse(int rectX, int rectY, int rectW, int rectH, const _GpBufferInfo& bufInfo) const +{ + long d; + long a2; + long b2; + int x; + int y; + int halfLineWidth; + int centerX; + int centerY; + int radiusX; + int radiusY; + unsigned long* pFrmbuf32 = null; + _GpResult ret = GP_RESULT_FAIL; + _GpResult ret2 = GP_RESULT_FAIL; + + _CanvasLine line; + line.SetLineWidth(__lineWidth); + + if (rectW < 0 || rectH < 0) + { + return E_SYSTEM; + } + + if ((bufInfo.bitsPerPixel == 32 && (bufInfo.color32 & 0xFF000000) != 0xFF000000) || (rectW > 1200) || (rectH > 1200)) + { + _CanvasArc arc; + arc.SetLineWidth(__lineWidth); + + return arc.DrawArc(rectX, rectY, rectW, rectH, 0, 360, ARC_STYLE_FILLED_PIE, bufInfo); + } + + halfLineWidth = (__lineWidth + 1) >> 1; + + if (line._IsInClipRect(rectX - halfLineWidth, rectY - halfLineWidth, rectW + (halfLineWidth << 1), rectH + (halfLineWidth << 1), bufInfo)) + { + line._SetNotClipFunction(false); + } + else + { + line._SetClipFunction(false); + } + + if (rectW < 3) + { + for (x = rectX; x < rectX + rectW; x++) + { + ret = (line.*line.pFuncVerticalLine)(x, rectY, rectY + rectH - 1, bufInfo); + } + + return (ret == GP_RESULT_FAIL ? E_SYSTEM : E_SUCCESS); + } + + if (rectH < 3) + { + for (y = rectY; y < rectY + rectH; y++) + { + ret = (line.*line.pFuncHorizontalLine)(rectX, rectX + rectW - 1, y, bufInfo); + } + + return (ret == GP_RESULT_FAIL ? E_SYSTEM : E_SUCCESS); + } + + // Even width, height + if (rectW % 2 == 0) + { + rectW--; + } + + if (rectH % 2 == 0) + { + rectH--; + } + + // Radius + radiusX = rectW >> 1; + radiusY = rectH >> 1; + + // Center + centerX = rectX + radiusX; + centerY = rectY + radiusY; + + a2 = (long) (radiusX * radiusX); + b2 = (long) (radiusY * radiusY); + + x = 0; + y = radiusY; + d = (4 * b2 + a2 * (1 - 4 * radiusY)) / 4; + + ret = (line.*line.pFuncHorizontalLine)(-x + centerX, x + centerX, -y + centerY, bufInfo); + ret2 = (line.*line.pFuncHorizontalLine)(-x + centerX, x + centerX, y + centerY, bufInfo); + + if (ret == GP_RESULT_FAIL || ret2 == GP_RESULT_FAIL) + { + return E_SYSTEM; + } + + if (bufInfo.bitsPerPixel == 32) + { + pFrmbuf32 = (unsigned long*) bufInfo.pPixels; + + if (pFrmbuf32 == null) + { + return E_SYSTEM; + } + } + else + { + // To do 16bpp + return E_SYSTEM; + } + + while (b2 * x <= a2 * y) + { + ++x; + + if (d < 0) + { + d += b2 * (2 * x + 1); + + ret = (line.*line.pFuncSetPixel)((-x + centerX), (-y + centerY), bufInfo); + (line.*line.pFuncSetPixel)((x + centerX), (-y + centerY), bufInfo); + (line.*line.pFuncSetPixel)((-x + centerX), (y + centerY), bufInfo); + (line.*line.pFuncSetPixel)((x + centerX), (y + centerY), bufInfo); + } + else + { + --y; + d += b2 * (2 * x + 1) - 2 * a2 * y; + + (line.*line.pFuncHorizontalLine)(-x + centerX, x + centerX, -y + centerY, bufInfo); + ret = (line.*line.pFuncHorizontalLine)(-x + centerX, x + centerX, y + centerY, bufInfo); + } + + if (ret == GP_RESULT_FAIL) + { + SysLog(NID_GRP, "FillEllipse: Drawing is failed!\n"); + + return E_SYSTEM; + } + } + + x = radiusX; + y = 0; + d = (4 * a2 + b2 * (1 - 4 * radiusX)) / 4; + + (line.*line.pFuncHorizontalLine)(-x + centerX, x + centerX, -y + centerY, bufInfo); + ret = (line.*line.pFuncHorizontalLine)(-x + centerX, x + centerX, y + centerY, bufInfo); + + if (ret == GP_RESULT_FAIL) + { + SysLog(NID_GRP, "FillEllipse: Drawing is failed!\n"); + + return E_SYSTEM; + } + + while (b2 * x > a2 * y) + { + ++y; + + if (d < 0) + { + d += a2 * (2 * y + 1); + } + else + { + --x; + d += -2 * b2 * x + a2 * (2 * y + 1); + } + + (line.*line.pFuncHorizontalLine)(-x + centerX, x + centerX, -y + centerY, bufInfo); + ret = (line.*line.pFuncHorizontalLine)(-x + centerX, x + centerX, y + centerY, bufInfo); + + if (ret == GP_RESULT_FAIL) + { + SysLog(NID_GRP, "FillEllipse: _DrawUnitLineHorizontal is failed!\n"); + + return E_SYSTEM; + } + } + + return E_SUCCESS; +} + +}} // Tizen::Graphics diff --git a/src/graphics/FGrp_CanvasGpFillPolygon.cpp b/src/graphics/FGrp_CanvasGpFillPolygon.cpp new file mode 100644 index 0000000..695490b --- /dev/null +++ b/src/graphics/FGrp_CanvasGpFillPolygon.cpp @@ -0,0 +1,402 @@ +// +// 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_CanvasGpFillPolygon.cpp + * @brief This is the implementation file for _CanvasFillPolygon class. + * + */ + +#include +#include + +#include + +#include "FGrp_CanvasGpPrimitive.h" +#include "util/FGrp_UtilScratchpad.h" + + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +typedef unsigned long SystemPixel; + +namespace Tizen { namespace Graphics +{ + +bool +_CanvasFillPolygon::SetLineWidth(int lineWidth) +{ + __lineWidth = lineWidth; + return true; +} + +int +_CanvasFillPolygon::GetLineWidth(void) const +{ + return __lineWidth; +} + +result +_CanvasFillPolygon::FillPolygon(int ptCount, _GpPoint* pPoints, const _GpBufferInfo& bufInfo) +{ + _GpEdgeTable et; + _GpEdgeTableEntry aet; + _GpEdgeTableEntry* pPrevAet = null; + _GpEdgeTableEntry* pAetPtr = null; + _GpEdgeTableEntry* pWetePtr = null; + _GpEdgeTableEntry* pEteBuf = null; + _GpScanLineListBlock* pSllb = null; + _GpScanLineList* pSll = null; + int i; + int y; + int stitch = 1; + int fixWaet = 0; + _CanvasLine line; + _CanvasTriangle triangle; + _GpPoint* pTempPoints = null; + bool err = false; + + if (ptCount < 1) + { + return E_SYSTEM; + } + + line.SetLineWidth(__lineWidth); + triangle.SetLineWidth(__lineWidth); + + if (ptCount == 1) + { + return (line._DrawPixelWithClipping(pPoints[0].x, pPoints[0].y, bufInfo) == GP_RESULT_FAIL ? E_SYSTEM : E_SUCCESS); + } + else if (ptCount == 2) + { + return line.DrawLine(pPoints[0], pPoints[1], bufInfo); + } + else if (ptCount == 3) + { + return triangle.FillTriangle(pPoints[0].x, pPoints[0].y, pPoints[1].x, pPoints[1].y, pPoints[2].x, pPoints[2].y, bufInfo); + } + else if (ptCount == 4) + { + if (pPoints[0].x == pPoints[3].x && pPoints[1].x == pPoints[2].x && pPoints[0].y == pPoints[1].y && pPoints[2].y == pPoints[3].y) + { + if (bufInfo.bitsPerPixel == 32) + { + int rectX; + int rectY; + + rectX = GP_MIN(pPoints[0].x, pPoints[1].x); + rectY = GP_MIN(pPoints[0].y, pPoints[2].y); + + _Util::ScratchPad rect((unsigned long*) bufInfo.pPixels, bufInfo.width, bufInfo.height, bufInfo.pixelPerLine); + rect.FillRect(rectX, rectY, GP_ABS(pPoints[1].x - pPoints[0].x) + 1, GP_ABS(pPoints[3].y - pPoints[0].y) + 1, bufInfo.color32); + } + else + { + // To do 16 bpp + SysLog(NID_GRP, "FillPolygon: not support 16 bpp -1!\n"); + return E_SYSTEM; + } + + return E_SUCCESS; + } + else if (pPoints[0].y == pPoints[3].y && pPoints[1].y == pPoints[2].y && pPoints[0].x == pPoints[1].x && pPoints[2].x == pPoints[3].x) + { + if (bufInfo.bitsPerPixel == 32) + { + int rectX; + int rectY; + + rectX = GP_MIN(pPoints[0].x, pPoints[2].x); + rectY = GP_MIN(pPoints[0].y, pPoints[1].y); + + _Util::ScratchPad rect((unsigned long*) bufInfo.pPixels, bufInfo.width, bufInfo.height, bufInfo.pixelPerLine); + rect.FillRect(rectX, rectY, GP_ABS(pPoints[3].x - pPoints[0].x) + 1, GP_ABS(pPoints[1].y - pPoints[0].y) + 1, bufInfo.color32); + } + else + { + SysLog(NID_GRP, "FillPolygon: not support 16 bpp -2!\n"); + return E_SYSTEM; + } + + return E_SUCCESS; + } + } + + pEteBuf = new (std::nothrow) _GpEdgeTableEntry[ptCount]; + + if (pEteBuf == null) + { + SysLog(NID_GRP, "FillPolygon: EteBuf allcation is failed!\n"); + + return E_SYSTEM; + } + + pSllb = new (std::nothrow) _GpScanLineListBlock; + + if (pSllb == null) + { + delete[] pEteBuf; + SysLog(NID_GRP, "FillPolygon: pSllb allcation is failed!\n"); + + return false; + } + + memset(pSllb, 0, sizeof(*pSllb)); + + pTempPoints = new (std::nothrow) _GpPoint[ptCount]; + + if (pTempPoints == null) + { + delete[] pEteBuf; + + line._FreeSllb(pSllb); + + return E_SYSTEM; + } + + for (i = 0; i < ptCount; i++) + { + pTempPoints[i] = pPoints[i]; + } + + if (line._CreateEtAndAet(ptCount, pTempPoints, &et, &aet, pEteBuf, pSllb) == null) + { + delete[] pEteBuf; + + line._FreeSllb(pSllb); + SysLog(NID_GRP, "FillPolygon: _CreateEtAndAet is failed!\n"); + + delete[] pTempPoints; + + return E_SYSTEM; + } + + pSll = et.scanLines.pNext; + + _GpRect clipRect; + if (bufInfo.isClipBoundsSet) + { + clipRect = bufInfo.clipBounds; + } + else + { + clipRect.SetBounds(0, 0, bufInfo.width, bufInfo.height); + } + + for (y = et.minY; y < et.maxY + stitch; y++) + { + if (pSll != null && y == pSll->scanLine) + { + line._LoadAet(&aet, pSll->pEdgeList); + line._ComputeWaet(&aet); + pSll = pSll->pNext; + } + + pPrevAet = &aet; + pAetPtr = aet.pNext; + pWetePtr = pAetPtr; + + while (pAetPtr != null) + { + if (pWetePtr == pAetPtr) + { + { + int x1 = pAetPtr->minor; + int x2 = pAetPtr->pWNext->minor + stitch - 1; + int horY = y; + int clipEndX; + + //if (pGC->bMemGC == null) + //{ + // x1 += pGC->rcGC.x; + // x2 += pGC->rcGC.x; + // horY += pGC->rcGC.y; + //} + + clipEndX = clipRect.x + clipRect.width - 1; + + // Swapping + if (x1 > x2) + { + GP_SWAP(x1, x2); + } + + if (y < clipRect.y || y > (clipRect.y + clipRect.height - 1)) + { + goto CLIP_EXIT; + } + + if (x1 > clipEndX || x2 < clipRect.x) + { + goto CLIP_EXIT; + } + + if (x1 < clipRect.x) + { + x1 = clipRect.x; + } + + if (x2 > clipEndX) + { + x2 = clipEndX; + } + + // draw primitive line + if ((bufInfo.color32 & 0xFF000000) == 0xFF000000) + { + unsigned long* pFrmbuf32 = (unsigned long*) bufInfo.pPixels; + while (x1 <= x2) + { + pFrmbuf32[bufInfo.pixelPerLine * horY + x1] = bufInfo.color32; + x1++; + } + } + else + { + if (line.__DrawHorizontalLineWithOpacity32(x1, x2, horY, bufInfo) == GP_RESULT_FAIL) + { + return E_SYSTEM; + } + } + +CLIP_EXIT: + err = true; + + } + + pWetePtr = pWetePtr->pWNext; + while (pWetePtr != pAetPtr) + { + if (pAetPtr == null) + { + break; + } + + if (pAetPtr->maxY == y) + { + pPrevAet->pNext = pAetPtr->pNext; + pAetPtr = pPrevAet->pNext; + fixWaet = 1; + if (pAetPtr != null) + { + pAetPtr->pBack = pPrevAet; + } + } + else + { + if (pAetPtr->gradient1 > 0) + { + if (pAetPtr->direction > 0) + { + pAetPtr->minor += pAetPtr->gradient1; + pAetPtr->direction += pAetPtr->inc1; + } + else + { + pAetPtr->minor += pAetPtr->gradient; + pAetPtr->direction += pAetPtr->inc2; + } + } + else + { + if (pAetPtr->direction >= 0) + { + pAetPtr->minor += pAetPtr->gradient1; + pAetPtr->direction += pAetPtr->inc1; + } + else + { + pAetPtr->minor += pAetPtr->gradient; + pAetPtr->direction += pAetPtr->inc2; + } + } + pPrevAet = pAetPtr; + pAetPtr = pAetPtr->pNext; + } + } + pWetePtr = pWetePtr->pWNext; + } + + if (pAetPtr == null) + { + break; + } + + if (pAetPtr->maxY == y) + { + pPrevAet->pNext = pAetPtr->pNext; + pAetPtr = pPrevAet->pNext; + fixWaet = 1; + + if (pAetPtr != null) + { + pAetPtr->pBack = pPrevAet; + } + } + else + { + if (pAetPtr->gradient1 > 0) + { + if (pAetPtr->direction > 0) + { + pAetPtr->minor += pAetPtr->gradient1; + pAetPtr->direction += pAetPtr->inc1; + } + else + { + pAetPtr->minor += pAetPtr->gradient; + pAetPtr->direction += pAetPtr->inc2; + } + } + else + { + if (pAetPtr->direction >= 0) + { + pAetPtr->minor += pAetPtr->gradient1; + pAetPtr->direction += pAetPtr->inc1; + } + else + { + pAetPtr->minor += pAetPtr->gradient; + pAetPtr->direction += pAetPtr->inc2; + } + } + + pPrevAet = pAetPtr; + pAetPtr = pAetPtr->pNext; + } + } + + if (line._InsertionSort(&aet) || fixWaet) + { + line._ComputeWaet(&aet); + fixWaet = 0; + } + } + + delete[] pTempPoints; + + delete[] pEteBuf; + + line._FreeSllb(pSllb); + + return E_SUCCESS; +} + +}} // Tizen::Graphics diff --git a/src/graphics/FGrp_CanvasGpLine.cpp b/src/graphics/FGrp_CanvasGpLine.cpp new file mode 100644 index 0000000..ee02e5d --- /dev/null +++ b/src/graphics/FGrp_CanvasGpLine.cpp @@ -0,0 +1,2393 @@ +// +// 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_CanvasGpLine.cpp + * @brief This is the implementation file for _CanvasLine class. + * + */ + +#include +#include +#include + +#include + +#include + +#include "FGrp_CanvasGpPrimitive.h" + + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + + +namespace Tizen { namespace Graphics +{ + +bool +_CanvasLine::SetLineWidth(int lineWidth) +{ + __lineWidth = lineWidth; + + return true; +} + +int +_CanvasLine::GetLineWidth(void) const +{ + return __lineWidth; +} + +result +_CanvasLine::DrawLine(const _GpPoint& startPt, const _GpPoint& endPt, const _GpBufferInfo& bufInfo) +{ + _GpRect rcLine; + int halfLineW; + _GpResult ret = GP_RESULT_FAIL; + bool finalRet = false; + bool clip = true; + + halfLineW = __lineWidth >> 1; + + if (startPt.x > endPt.x) + { + rcLine.x = endPt.x; + rcLine.width = startPt.x - endPt.x + 1; + } + else + { + rcLine.x = startPt.x; + rcLine.width = endPt.x - startPt.x + 1; + } + + if (startPt.y > endPt.y) + { + rcLine.y = endPt.y; + rcLine.height = startPt.y - endPt.y + 1; + } + else + { + rcLine.y = startPt.y; + rcLine.height = endPt.y - startPt.y + 1; + } + + if (_IsInClipRect(rcLine.x - halfLineW, rcLine.y - halfLineW, rcLine.width + __lineWidth, rcLine.height + __lineWidth, bufInfo)) + { + _SetNotClipFunction(true); + clip = false; + } + + if (__lineWidth == 1) + { + if (startPt.x == endPt.x) + { + ret = (this->*pFuncVerticalLine)(startPt.x, startPt.y, endPt.y, bufInfo); + } + else if (startPt.y == endPt.y) + { + ret = (this->*pFuncHorizontalLine)(startPt.x, endPt.x, startPt.y, bufInfo); + } + else + { + ret = _DrawUnitLineSlant(startPt, endPt, bufInfo); + } + } + else + { + if ((bufInfo.color32 & 0xFF000000) == 0xFF000000) + { + finalRet = __DrawWideLine(startPt, endPt, bufInfo); + } + else if ((bufInfo.color32 & 0xFF000000) > 0) + { + finalRet = __DrawWideLineWithOpacity32(startPt, endPt, bufInfo); + } + } + + if (__lineWidth > 2 && (bufInfo.color32 & 0xFF000000) == 0xFF000000) + { + if (__lineWidth > 4) + { + int lineW = __lineWidth; + + if (lineW % 2 == 0) + { + halfLineW--; + lineW--; + } + + _CanvasEllipse ellipse; + + ellipse.SetLineWidth(lineW); + + // Line Round End + if (ellipse.FillElliepse(startPt.x - halfLineW, startPt.y - halfLineW, lineW, lineW, bufInfo) == E_SYSTEM) + { + SysLog(NID_GRP, "DrawLine: FillElliepse() is failed!\n"); + finalRet = false; + } + + if (ellipse.FillElliepse(endPt.x - halfLineW, endPt.y - halfLineW, lineW, lineW, bufInfo) == E_SYSTEM) + { + SysLog(NID_GRP, "DrawLine: FillElliepse() is failed!\n"); + finalRet = false; + } + } + else if (__lineWidth == 4) + { + SetLineWidth(1); + + (this->*pFuncHorizontalLine)(startPt.x - 1, startPt.x, startPt.y - 2, bufInfo); + (this->*pFuncHorizontalLine)(startPt.x - 2, startPt.x + 1, startPt.y - 1, bufInfo); + (this->*pFuncHorizontalLine)(startPt.x - 2, startPt.x + 1, startPt.y, bufInfo); + (this->*pFuncHorizontalLine)(startPt.x - 1, startPt.x, startPt.y + 1, bufInfo); + + (this->*pFuncHorizontalLine)(endPt.x - 1, endPt.x, endPt.y - 2, bufInfo); + (this->*pFuncHorizontalLine)(endPt.x - 2, endPt.x + 1, endPt.y - 1, bufInfo); + (this->*pFuncHorizontalLine)(endPt.x - 2, endPt.x + 1, endPt.y, bufInfo); + (this->*pFuncHorizontalLine)(endPt.x - 1, endPt.x, endPt.y + 1, bufInfo); + + SetLineWidth(4); + } + else // __lineWidth = 3 + { + SetLineWidth(1); + + (this->*pFuncHorizontalLine)(startPt.x, startPt.x, startPt.y - 1, bufInfo); + (this->*pFuncHorizontalLine)(startPt.x - 1, startPt.x + 1, startPt.y, bufInfo); + (this->*pFuncHorizontalLine)(startPt.x, startPt.x, startPt.y + 1, bufInfo); + + (this->*pFuncHorizontalLine)(endPt.x, endPt.x, endPt.y - 1, bufInfo); + (this->*pFuncHorizontalLine)(endPt.x - 1, endPt.x + 1, endPt.y, bufInfo); + (this->*pFuncHorizontalLine)(endPt.x, endPt.x, endPt.y + 1, bufInfo); + + SetLineWidth(3); + } + } + + if (!clip) + { + _SetClipFunction(true); + } + + return ((ret == GP_RESULT_FAIL) && (finalRet == false) ? E_SYSTEM : E_SUCCESS); +} + +_GpResult +_CanvasLine::_DrawUnitLineVertical(int x, int startY, int endY, const _GpBufferInfo& bufInfo) +{ + Point pt(x, startY); + + if (bufInfo.bitsPerPixel == 32) + { + unsigned long* pFrmbuf32 = (unsigned long*) bufInfo.pPixels; + + if (pFrmbuf32) + { + if (startY > endY) + { + GP_SWAP(startY, endY); + pt.y = startY; + } + + if ((bufInfo.color32 & 0xFF000000) == 0xFF000000) + { + while (pt.y < endY) + { + pFrmbuf32[bufInfo.pixelPerLine * pt.y + pt.x] = bufInfo.color32; + pt.y++; + } + } + else if ((bufInfo.color32 & 0xFF000000) > 0) + { + while (pt.y < endY) + { + __DrawHorizontalLineWithOpacity32(pt.x, pt.x, pt.y, bufInfo); + pt.y++; + } + } + } + else + { + SysLog(NID_GRP, "_DrawUnitLineVertical: pFrmbuf32 is invalid!\n"); + return GP_RESULT_FAIL; + } + } + else + { + // To do 16 bpp + SysLog(NID_GRP, "_DrawUnitLineVertical: not support 16 bpp!\n"); + return GP_RESULT_FAIL; + } + + return GP_RESULT_SUCCESS; +} + +_GpResult +_CanvasLine::_DrawUnitLineHorizontal(int startX, int endX, int y, const _GpBufferInfo& bufInfo) +{ + Point pt(startX, y); + + if (bufInfo.bitsPerPixel == 32) + { + unsigned long* pFrmbuf32 = (unsigned long*) bufInfo.pPixels; + + if (pFrmbuf32) + { + if (startX > endX) + { + GP_SWAP(startX, endX); + pt.x = startX; + } + + if ((bufInfo.color32 & 0xFF000000) == 0xFF000000) + { + while (pt.x <= endX) + { + pFrmbuf32[bufInfo.pixelPerLine * pt.y + pt.x] = bufInfo.color32; + pt.x++; + } + } + else if ((bufInfo.color32 & 0xFF000000) > 0) + { + __DrawHorizontalLineWithOpacity32(pt.x, endX, pt.y, bufInfo); + } + } + else + { + SysLog(NID_GRP, "_DrawUnitLineHorizontal: pFrmbuf32 is null!\n"); + + return GP_RESULT_FAIL; + } + } + else + { + // To do 16 bpp + SysLog(NID_GRP, "_DrawUnitLineHorizontal: not support 16 bpp!\n"); + + return GP_RESULT_FAIL; + } + + return GP_RESULT_SUCCESS; +} + +_GpResult +_CanvasLine::_DrawWideLineVertical(int x, int startY, int endY, const _GpBufferInfo& bufInfo) +{ + int halfLineW; + int posX; + + Point pt(x, startY); + + if (bufInfo.bitsPerPixel == 32) + { + unsigned long* pFrmbuf32 = (unsigned long*) bufInfo.pPixels; + + if (pFrmbuf32) + { + if (startY > endY) + { + GP_SWAP(startY, endY); + pt.y = startY; + } + + halfLineW = __lineWidth >> 1; + + if (__lineWidth == 1) //is this part necessary? + { + if ((bufInfo.color32 & 0xFF000000) == 0xFF000000) + { + while (pt.y < endY) + { + pFrmbuf32[bufInfo.pixelPerLine * pt.y + pt.x] = bufInfo.color32; + pt.y++; + } + } + else if ((bufInfo.color32 & 0xFF000000) > 0) + { + while (pt.y < endY) + { + __DrawHorizontalLineWithOpacity32(pt.x, pt.x, pt.y, bufInfo); + pt.y++; + } + } + } + else + { + int realEndX = x + halfLineW; + + if (__lineWidth % 2 == 0) + { + realEndX--; + } + + if (__lineWidth == 2 && pt.y >= 1) + { + pt.y--; + } + + posX = x - halfLineW; + + if (x == 0) + { + posX = x; + } + + for (; posX <= realEndX; posX++) + { + // draw vertical line + if ((bufInfo.color32 & 0xFF000000) == 0xFF000000) + { + while (pt.y < endY) + { + pFrmbuf32[bufInfo.pixelPerLine * pt.y + posX] = bufInfo.color32; + pt.y++; + } + } + else if ((bufInfo.color32 & 0xFF000000) > 0) + { + while (pt.y < endY) + { + __DrawHorizontalLineWithOpacity32(posX, posX, pt.y, bufInfo); + pt.y++; + } + } + + pt.y = startY; + } + } + } + else + { + SysLog(NID_GRP, "_DrawWideLineVertical: pFrmbuf32 is invalid!\n"); + + return GP_RESULT_FAIL; + } + } + else + { + // To do 16 bpp + SysLog(NID_GRP, "_DrawWideLineVertical: not support 16 bpp!\n"); + + return GP_RESULT_FAIL; + } + + return GP_RESULT_SUCCESS; +} + +_GpResult +_CanvasLine::_DrawWideLineHorizontal(int startX, int endX, int y, const _GpBufferInfo& bufInfo) +{ + int halfLineW; + int posY; + + if (bufInfo.bitsPerPixel == 32) + { + unsigned long* pFrmbuf32 = (unsigned long*) bufInfo.pPixels; + + if (pFrmbuf32) + { + Point pt(startX, y); + if (startX > endX) + { + GP_SWAP(startX, endX); + pt.x = startX; + } + + // Calculate half Width of Line + halfLineW = __lineWidth >> 1; + + if (__lineWidth == 1) // is this part necessary? + { + // draw primitive line + if ((bufInfo.color32 & 0xFF000000) == 0xFF000000) + { + while (pt.x < endX) + { + pFrmbuf32[bufInfo.pixelPerLine * pt.y + pt.x] = bufInfo.color32; + pt.x++; + } + } + else if ((bufInfo.color32 & 0xFF000000) > 0) + { + __DrawHorizontalLineWithOpacity32(pt.x, endX, y, bufInfo); + } + } + else + { + int realEndY = y + halfLineW; + + if (__lineWidth % 2 == 0) + { + realEndY--; + } + + if (__lineWidth == 2 && pt.x >= 1) + { + pt.x--; + } + + posY = y - halfLineW; + + if (y == 0) + { + posY = y; + } + + for (; posY <= realEndY; posY++) + { + if ((bufInfo.color32 & 0xFF000000) == 0xFF000000) + { + while (pt.x < endX) + { + pFrmbuf32[bufInfo.pixelPerLine * posY + pt.x] = bufInfo.color32; + pt.x++; + } + } + else if ((bufInfo.color32 & 0xFF000000) > 0) + { + __DrawHorizontalLineWithOpacity32(pt.x, endX, posY, bufInfo); + } + + pt.x = startX; + } + } + } + else + { + SysLog(NID_GRP, "_DrawWideLineHorizontal: pFrmbuf32 is invalid!\n"); + + return GP_RESULT_FAIL; + } + } + else + { + // To do 16 bpp + SysLog(NID_GRP, "_DrawWideLineHorizontal: not support 16 bpp!\n"); + + return GP_RESULT_FAIL; + } + + return GP_RESULT_SUCCESS; +} + +_GpResult +_CanvasLine::_DrawUnitLineSlant(const _GpPoint& point1, const _GpPoint& point2, const _GpBufferInfo& bufInfo) +{ + int deltaX; + int deltaY; + int deltaDiff; + int inc; + int errorInc; + int errorIncCount; + int absX; + int absY; + + if (bufInfo.bitsPerPixel == 32) + { + Point startPt(point1.x, point1.y); + Point endPt(point2.x, point2.y); + + absX = GP_ABS(endPt.x - startPt.x); + absY = GP_ABS(endPt.y - startPt.y); + + if (absX > absY) + { + if (startPt.x > endPt.x) + { + GP_SWAP(startPt.x, endPt.x); + GP_SWAP(startPt.y, endPt.y); + } + + inc = (endPt.y > startPt.y) ? 1 : -1; + deltaX = endPt.x - startPt.x; + deltaY = GP_ABS(endPt.y - startPt.y); + deltaDiff = (deltaY << 1) - deltaX; + errorInc = (deltaY << 1); + errorIncCount = (deltaY - deltaX) << 1; + + Point pt(startPt.x, startPt.y); + + (this->*pFuncSetPixel)(startPt.x, startPt.y, bufInfo); + + while (pt.x < endPt.x) + { + pt.x++; + + if (deltaDiff > 0) + { + pt.y += inc; + deltaDiff += errorIncCount; + } + else + { + deltaDiff += errorInc; + } + + (this->*pFuncSetPixel)(pt.x, pt.y, bufInfo); + } + } + else + { + if (startPt.y > endPt.y) + { + GP_SWAP(startPt.x, endPt.x); + GP_SWAP(startPt.y, endPt.y); + } + + inc = (endPt.x > startPt.x) ? 1 : -1; + deltaX = GP_ABS(endPt.x - startPt.x); + deltaY = endPt.y - startPt.y; + deltaDiff = (deltaX << 1) - deltaY; + errorInc = (deltaX << 1); + errorIncCount = (deltaX - deltaY) << 1; + + Point pt(startPt.x, startPt.y); + + (this->*pFuncSetPixel)(startPt.x, startPt.y, bufInfo); + + while (pt.y < endPt.y) + { + pt.y++; + + if (deltaDiff > 0) + { + pt.x += inc; + deltaDiff += errorIncCount; + } + else + { + deltaDiff += errorInc; + } + + (this->*pFuncSetPixel)(pt.x, pt.y, bufInfo); + } + } + } + else + { + // To do 16 bpp + return GP_RESULT_FAIL; + } + + return GP_RESULT_SUCCESS; +} + +_GpResult +_CanvasLine::_DrawPixel(int x, int y, const _GpBufferInfo& bufInfo) +{ + if (bufInfo.bitsPerPixel == 32) + { + unsigned long* pFrmbuf32 = (unsigned long*) bufInfo.pPixels; + + if (pFrmbuf32) + { + if ((bufInfo.color32 & 0xFF000000) == 0xFF000000) + { + pFrmbuf32[bufInfo.pixelPerLine * y + x] = bufInfo.color32; + } + else if ((bufInfo.color32 & 0xFF000000) > 0) + { + __DrawHorizontalLineWithOpacity32(x, x, y, bufInfo); + } + } + else + { + SysLog(NID_GRP, "_DrawPixel: pFrmbuf32 is null!\n"); + + return GP_RESULT_FAIL; + } + } + else + { + // To do 16 bpp + SysLog(NID_GRP, "_DrawPixel: not support 16 bpp!\n"); + + return GP_RESULT_FAIL; + } + + return GP_RESULT_SUCCESS; +} + +_GpResult +_CanvasLine::_DrawUnitLineVerticalWithClipping(int x, int startY, int endY, const _GpBufferInfo& bufInfo) +{ + Point pt(x, startY); + + if (bufInfo.bitsPerPixel == 32) + { + unsigned long* pFrmbuf32 = (unsigned long*) bufInfo.pPixels; + + if (pFrmbuf32) + { + if (startY > endY) + { + GP_SWAP(startY, endY); + pt.y = startY; + } + + if (bufInfo.isClipBoundsSet) + { + if (pt.x < bufInfo.clipBounds.x || pt.x > bufInfo.clipBounds.x + bufInfo.clipBounds.width - 1) + { + return GP_RESULT_OUTOFBOUNDS; + } + + if (pt.y > bufInfo.clipBounds.y + bufInfo.clipBounds.height - 1 || endY < bufInfo.clipBounds.y) + { + return GP_RESULT_OUTOFBOUNDS; + } + + if (pt.y < bufInfo.clipBounds.y) + { + pt.y = bufInfo.clipBounds.y; + } + + if (endY > bufInfo.clipBounds.y + bufInfo.clipBounds.height - 1) + { + endY = bufInfo.clipBounds.y + bufInfo.clipBounds.height - 1; + } + } + else + { + if (pt.x < 0 || pt.x > bufInfo.width - 1) + { + return GP_RESULT_OUTOFBOUNDS; + } + + if (endY < 0 || pt.y > bufInfo.height - 1) + { + return GP_RESULT_OUTOFBOUNDS; + } + + if (pt.y < 0) + { + pt.y = 0; + } + + if (endY > bufInfo.height - 1) + { + endY = bufInfo.height - 1; + } + + if ((endY - pt.y) == 0) + { + return GP_RESULT_OUTOFBOUNDS; + } + + if (pt.x == bufInfo.width) + { + pt.x--; + } + } + + if ((bufInfo.color32 & 0xFF000000) == 0xFF000000) + { + while (pt.y < endY) + { + pFrmbuf32[bufInfo.pixelPerLine * pt.y + pt.x] = bufInfo.color32; + pt.y++; + } + } + else if ((bufInfo.color32 & 0xFF000000) > 0) + { + while (pt.y < endY) + { + __DrawHorizontalLineWithOpacity32(pt.x, pt.x, pt.y, bufInfo); + pt.y++; + } + } + } + else + { + SysLog(NID_GRP, "_DrawUnitLineVerticalWithClipping: pFrmbuf32 is invalid!\n"); + + return GP_RESULT_FAIL; + } + } + else + { + // To do 16 bpp + SysLog(NID_GRP, "_DrawUnitLineVerticalWithClipping: not support 16 bpp!\n"); + + return GP_RESULT_FAIL; + } + + return GP_RESULT_SUCCESS; +} + +_GpResult +_CanvasLine::_DrawUnitLineHorizontalWithClipping(int startX, int endX, int y, const _GpBufferInfo& bufInfo) +{ + Point pt(startX, y); + + if (bufInfo.bitsPerPixel == 32) + { + unsigned long* pFrmbuf32 = (unsigned long*) bufInfo.pPixels; + + if (pFrmbuf32) + { + if (startX > endX) + { + GP_SWAP(startX, endX); + pt.x = startX; + } + + if (bufInfo.isClipBoundsSet) + { + if (pt.y < bufInfo.clipBounds.y || pt.y > bufInfo.clipBounds.y + bufInfo.clipBounds.height - 1) + { + return GP_RESULT_OUTOFBOUNDS; + } + + if (pt.x > bufInfo.clipBounds.x + bufInfo.clipBounds.width - 1 || endX < bufInfo.clipBounds.x) + { + return GP_RESULT_OUTOFBOUNDS; + } + + if (pt.x < bufInfo.clipBounds.x) + { + pt.x = bufInfo.clipBounds.x; + } + + if (endX > bufInfo.clipBounds.x + bufInfo.clipBounds.width - 1) + { + endX = bufInfo.clipBounds.x + bufInfo.clipBounds.width - 1; + } + } + else + { + if (pt.y < 0 || pt.y > bufInfo.height - 1) + { + return GP_RESULT_OUTOFBOUNDS; + } + + if (endX < 0 || pt.x > bufInfo.width - 1) + { + return GP_RESULT_OUTOFBOUNDS; + } + + if (pt.x < 0) + { + pt.x = 0; + } + + if (endX > bufInfo.width - 1) + { + endX = bufInfo.width - 1; + } + + if ((endX - pt.x) == 0) + { + return GP_RESULT_OUTOFBOUNDS; + } + + if (pt.y == bufInfo.height) + { + pt.y--; + } + } + + if ((bufInfo.color32 & 0xFF000000) == 0xFF000000) + { + while (pt.x <= endX) + { + pFrmbuf32[bufInfo.pixelPerLine * pt.y + pt.x] = bufInfo.color32; + pt.x++; + } + } + else if ((bufInfo.color32 & 0xFF000000) > 0) + { + __DrawHorizontalLineWithOpacity32(pt.x, endX, pt.y, bufInfo); + } + } + else + { + SysLog(NID_GRP, "_DrawUnitLineHorizontalWithClipping: pFrmbuf32 is null!\n"); + + return GP_RESULT_FAIL; + } + } + else + { + // To do 16 bpp + SysLog(NID_GRP, "_DrawUnitLineHorizontalWithClipping: not support 16 bpp!\n"); + + return GP_RESULT_FAIL; + } + + return GP_RESULT_SUCCESS; +} + +_GpResult +_CanvasLine::_DrawWideLineVerticalWithClipping(int x, int startY, int endY, const _GpBufferInfo& bufInfo) +{ + int halfLineW; + int posX; + + halfLineW = __lineWidth >> 1; + + if (__lineWidth == 1) + { + if (_DrawUnitLineVerticalWithClipping(x, startY, endY, bufInfo) == GP_RESULT_FAIL) + { + SysLog(NID_GRP, "_DrawUnitLineVerticalWithClipping: _DrawUnitLineVerticalWithClipping() is failed!\n"); + + return GP_RESULT_FAIL; + } + } + else + { + int realEndX = x + halfLineW; + + if (__lineWidth % 2 == 0) + { + realEndX--; + } + +/* bjcho : For fixing y coordinate when the line width is 2 pixel. + if (lineW == 2) + y1--; +*/ + + for (posX = x - halfLineW; posX <= realEndX; posX++) + { + if (_DrawUnitLineVerticalWithClipping(posX, startY, endY, bufInfo) == GP_RESULT_FAIL) + { + SysLog(NID_GRP, "_DrawUnitLineVerticalWithClipping: _DrawUnitLineVerticalWithClipping() is failed!\n"); + + return GP_RESULT_FAIL; + } + } + } + + return GP_RESULT_SUCCESS; +} + +_GpResult +_CanvasLine::_DrawWideLineHorizontalWithClipping(int startX, int endX, int y, const _GpBufferInfo& bufInfo) +{ + int halfLineW; + int posY; + + // Calculate half Width of Line + halfLineW = __lineWidth >> 1; + + // Insert Clipping + if (__lineWidth == 1) + { + if (_DrawUnitLineHorizontalWithClipping(startX, endX, y, bufInfo) == GP_RESULT_FAIL) + { + SysLog(NID_GRP, "_DrawUnitLineHorizontalWithClipping: _DrawUnitLineHorizontalWithClipping() is failed!\n"); + + return GP_RESULT_FAIL; + } + } + else + { + int realEndY = y + halfLineW; + + if (__lineWidth % 2 == 0) + { + realEndY--; + } + + + // if (lineW == 2) + // x1--; + + + for (posY = y - halfLineW; posY <= realEndY; posY++) + { + if (_DrawUnitLineHorizontalWithClipping(startX, endX, posY, bufInfo) == GP_RESULT_FAIL) + { + SysLog(NID_GRP, "_DrawUnitLineHorizontalWithClipping: _DrawUnitLineHorizontalWithClipping() is failed!\n"); + + return GP_RESULT_FAIL; + } + } + } + + return GP_RESULT_SUCCESS; +} + +_GpResult +_CanvasLine::_DrawPixelWithClipping(int x, int y, const _GpBufferInfo& bufInfo) +{ + if (bufInfo.bitsPerPixel == 32) + { + unsigned long* pFrmbuf32 = (unsigned long*) bufInfo.pPixels; + + if (pFrmbuf32) + { + if (bufInfo.isClipBoundsSet) + { + if (x < bufInfo.clipBounds.x || x >= bufInfo.clipBounds.x + bufInfo.clipBounds.width) + { + return GP_RESULT_OUTOFBOUNDS; + } + + if (y < bufInfo.clipBounds.y || y >= bufInfo.clipBounds.y + bufInfo.clipBounds.height) + { + return GP_RESULT_OUTOFBOUNDS; + } + } + else + { + if (x < 0 || x >= bufInfo.width) + { + return GP_RESULT_OUTOFBOUNDS; + } + + if (y < 0 || y >= bufInfo.height) + { + return GP_RESULT_OUTOFBOUNDS; + } + } + + if ((bufInfo.color32 & 0xFF000000) == 0xFF000000) + { + pFrmbuf32[bufInfo.pixelPerLine * y + x] = bufInfo.color32; + } + else if ((bufInfo.color32 & 0xFF000000) > 0) + { + __DrawHorizontalLineWithOpacity32(x, x, y, bufInfo); + } + } + else + { + SysLog(NID_GRP, "_DrawPixelWithClipping: pFrmbuf32 is null!\n"); + + return GP_RESULT_FAIL; + } + } + else + { + // To do 16 bpp + SysLog(NID_GRP, "_DrawPixelWithClipping: not support 16 bpp!\n"); + + return GP_RESULT_FAIL; + } + + return GP_RESULT_SUCCESS; +} + +bool +_CanvasLine::__DrawWideLine(const _GpPoint& startPt, const _GpPoint& endPt, const _GpBufferInfo& bufInfo) +{ + _GpResult result = GP_RESULT_FAIL; + bool ret = false; + int halfLineW = __lineWidth >> 1; + + if (startPt.x == endPt.x && startPt.y == endPt.y) + { + if (bufInfo.bitsPerPixel == 32) + { + _CanvasEllipse ellipse; + + ellipse.SetLineWidth(__lineWidth); + + if (ellipse.FillElliepse(startPt.x - halfLineW, startPt.y - halfLineW, __lineWidth, __lineWidth, bufInfo) == E_SUCCESS) + { + ret = true; + } + } + } + else + { + ret = __DrawWideLineWithOpacity32(startPt, endPt, bufInfo); + //ret = _DrawUnitLineSlant(startPt, endPt, bufInfo); // need to check if slantline drawing is slow.. + } + + return (result == GP_RESULT_FAIL && ret == false && E_SYSTEM ? false : true); +} + +bool +_CanvasLine::__DrawWideLineWithOpacity32(const _GpPoint& startPt, const _GpPoint& endPt, const _GpBufferInfo& bufInfo) +{ + bool ret = false; + _GpPoint points[2] = + { + { startPt.x, startPt.y }, + { endPt.x, endPt.y } + }; + + ret = __DrawThickContinuousPolyline(2, points, false, bufInfo); + + return ret; +} + +bool +_CanvasLine::__DrawThickContinuousPolyline(int listCount, _GpPoint* pPoints, bool isConnected, const _GpBufferInfo& bufInfo) +{ + int i; + int j; + float connectedX = 0.0f; + float connectedY = 0.0f; + float sox = 0; + float soy = 0; + _GpVertex* pVertex = null; + _GpPoint* pTempPoints = null; + bool ret = false; + + if (listCount < 2) + { + return false; + } + + _GpPolygon* pPolygon = new (std::nothrow) _GpPolygon; + + if (pPolygon == null) + { + return false; + } + + if (isConnected) + { + int plx; + int ply; + int prx; + int pry; + + _GetOrientationUnitVector(pPoints[listCount - 1], pPoints[0], &connectedX, &connectedY); + + sox = connectedX; + soy = connectedY; + + __GetBrushEndPoint(sox, soy, __lineWidth, &plx, &ply, &prx, &pry); + + if (!_AddPolygonVertex(pPolygon, pPoints[0].x + plx, pPoints[0].y + ply, 0)) + { + _FreePolygon(pPolygon); + + return false; + } + + if (!_AddPolygonVertex(pPolygon, pPoints[0].x + prx, pPoints[0].y + pry, 1)) + { + _FreePolygon(pPolygon); + + return false; + } + + } + + for (i = 1; i < listCount; i++) + { + j = i - 1; + + float ox; + float oy; + + _GetOrientationUnitVector(pPoints[j], pPoints[i], &ox, &oy); + + if (j == 0 && !isConnected) + { + if (!_PatchRoundCap(pPolygon, pPoints[0].x, pPoints[0].y, ox, oy, true)) + { + _FreePolygon(pPolygon); + + return false; + } + } + else + { + if (!_PatchJoint(pPolygon, pPoints[j].x, pPoints[j].y, connectedX, connectedY, ox, oy)) + { + _FreePolygon(pPolygon); + + return false; + } + } + + ret = _PatchThickContinuousLine(pPolygon, pPoints[j], pPoints[i], ox, oy, 0, 0); + + if (!ret) + { + _FreePolygon(pPolygon); + + return ret; + } + + connectedX = ox; + connectedY = oy; + } + + if (isConnected) + { + if (!_PatchJoint(pPolygon, pPoints[listCount - 1].x, pPoints[listCount - 1].y, connectedX, connectedY, sox, soy)) + { + _FreePolygon(pPolygon); + + return false; + } + + if (!_PatchThickContinuousLine(pPolygon, pPoints[listCount - 1], pPoints[0], sox, soy, 0, 0)) + { + _FreePolygon(pPolygon); + + return false; + } + } + else + { + //j = num - 1; + if (!_PatchRoundCap(pPolygon, pPoints[listCount - 1].x, pPoints[listCount - 1].y, connectedX, connectedY, false)) + { + _FreePolygon(pPolygon); + + return false; + } + } + + pTempPoints = new (std::nothrow) _GpPoint[pPolygon->n]; + + if (pTempPoints == null) + { + _FreePolygon(pPolygon); + + return ret; + } + + for (i = 0, pVertex = pPolygon->pFirst; pVertex != null; i++, pVertex = pVertex->pNext) + { + pTempPoints[i] = pVertex->point; + } + + _FillPolygon(pPolygon->n, pTempPoints, false, bufInfo); + + _FreePolygon(pPolygon); + + delete[] pTempPoints; + + return ret; +} + +result +_CanvasLine::DrawPolyLine(int ptCount, _GpPoint* pPoints, const _GpBufferInfo& bufInfo) +{ + bool ret = false; + + if (ptCount < 2) + { + return E_SYSTEM; + } + + ret = _DrawPolyLine(ptCount, pPoints, false, bufInfo); + + return (ret ? E_SUCCESS : E_SYSTEM); +} + +result +_CanvasLine::DrawPolygon(int ptCount, _GpPoint* pPoints, const _GpBufferInfo& bufInfo) +{ + bool ret = false; + + if (ptCount < 2) + { + return E_SYSTEM; + } + + ret = _DrawPolyLine(ptCount, pPoints, true, bufInfo); + + return (ret ? E_SUCCESS : E_SYSTEM); +} + +int +_CanvasLine::__CheckDupVertexForPolygon(int ptCount, _GpPoint* pPoints, bool isConnected) const +{ + int i = 0; + int j = 0; + + while (j < ptCount - 1) + { + if (pPoints[j].x == pPoints[j + 1].x && pPoints[j].y == pPoints[j + 1].y) + { + ++j; + continue; + } + + if (i < j) + { + pPoints[i] = pPoints[j]; + } + + ++i; + ++j; + } + + if (isConnected) + { + if (pPoints[ptCount - 1].x != pPoints[0].x || pPoints[ptCount - 1].y != pPoints[0].y) + { + pPoints[i] = pPoints[ptCount - 1]; + ++i; + } + } + else + { + pPoints[i] = pPoints[ptCount - 1]; + ++i; + } + + return i; +} + +void +_CanvasLine::_FreePolygon(_GpPolygon* pPolygon) const +{ + _GpVertex* pVertex = null; + _GpVertex* pNext = null; + + if (pPolygon == null) + { + SysLog(NID_GRP, "_FreePolygon: pPolygon is null !\n"); + + return; + } + + pVertex = pPolygon->pFirst; + + while (pVertex != null) + { + pNext = pVertex->pNext; + delete pVertex; + pVertex = pNext; + } + + delete pPolygon; + + return; +} + +bool +_CanvasLine::_FillPolygon(int ptCount, _GpPoint* pPoints, bool isEvenOdd, const _GpBufferInfo& bufInfo) +{ + _GpEdgeTable edgeTable; + _GpEdgeTableEntry anEdgeTableEntry; + _GpEdgeTableEntry* pPrevAet = null; + _GpEdgeTableEntry* pAet = null; + _GpEdgeTableEntry* pWete = null; + _GpScanLineListBlock scanLineListBlock; + _GpScanLineList* pScanLineList = null; + _GpEdgeTableEntry* pBufEte = null; + int y; + int stitch = 1; + int fixWAet = 0; + + if (pPoints == null) + { + SysLog(NID_GRP, "_FillPolygon: pPoints is null!\n"); + + return false; + } + + memset(&edgeTable, 0, sizeof(edgeTable)); + memset(&anEdgeTableEntry, 0, sizeof(anEdgeTableEntry)); + memset(&scanLineListBlock, 0, sizeof(scanLineListBlock)); + + pBufEte = new (std::nothrow) _GpEdgeTableEntry[ptCount]; + + if (pBufEte == null) + { + return false; + } + + if (!_CreateEtAndAet(ptCount, pPoints, &edgeTable, &anEdgeTableEntry, pBufEte, &scanLineListBlock)) + { + delete[] pBufEte; + + return false; + } + + pScanLineList = edgeTable.scanLines.pNext; + + if (isEvenOdd) + { + } + else + { + for (y = edgeTable.minY; y < edgeTable.maxY + stitch; y++) + { + if (pScanLineList != null && y == pScanLineList->scanLine) + { + _LoadAet(&anEdgeTableEntry, pScanLineList->pEdgeList); + _ComputeWaet(&anEdgeTableEntry); + pScanLineList = pScanLineList->pNext; + } + + pPrevAet = &anEdgeTableEntry; + pAet = anEdgeTableEntry.pNext; + pWete = pAet; + + while (pAet) + { + if (pWete == pAet) + { + if (_DrawUnitLineHorizontalWithClipping(pAet->minor, pAet->pWNext->minor + stitch - 1, y, bufInfo) == GP_RESULT_FAIL) + { + delete[] pBufEte; + _FreeSllb(scanLineListBlock.pNext); + + return false; + } + + pWete = pWete->pWNext; + while (pWete != pAet) + { + //SysAssert(pAet); + if (pAet == null) + { + break; + } + + // 1st + if (pAet->maxY == y) + { + pPrevAet->pNext = pAet->pNext; + pAet = pPrevAet->pNext; + fixWAet = 1; + + if (pAet) + { + pAet->pBack = pPrevAet; + } + } + else + { + if (pAet->gradient1 > 0) + { + if (pAet->direction > 0) + { + pAet->minor += pAet->gradient1; + pAet->direction += pAet->inc1; + } + else + { + pAet->minor += pAet->gradient; + pAet->direction += pAet->inc2; + } + } + else + { + if (pAet->direction >= 0) + { + pAet->minor += pAet->gradient1; + pAet->direction += pAet->inc1; + } + else + { + pAet->minor += pAet->gradient; + pAet->direction += pAet->inc2; + } + } + pPrevAet = pAet; + pAet = pAet->pNext; + } + } + pWete = pWete->pWNext; + } + + //SysAssert(pAet); + + if (pAet == null) + { + break; + } + + // 2nd + if (pAet->maxY == y) + { + pPrevAet->pNext = pAet->pNext; + pAet = pPrevAet->pNext; + fixWAet = 1; + if (pAet) + { + pAet->pBack = pPrevAet; + } + } + else + { + if (pAet->gradient1 > 0) + { + if (pAet->direction > 0) + { + pAet->minor += pAet->gradient1; + pAet->direction += pAet->inc1; + } + else + { + pAet->minor += pAet->gradient; + pAet->direction += pAet->inc2; + } + } + else + { + if (pAet->direction >= 0) + { + pAet->minor += pAet->gradient1; + pAet->direction += pAet->inc1; + } + else + { + pAet->minor += pAet->gradient; + pAet->direction += pAet->inc2; + } + } + pPrevAet = pAet; + pAet = pAet->pNext; + } + } + + if ((_InsertionSort(&anEdgeTableEntry)) || fixWAet) + { + _ComputeWaet(&anEdgeTableEntry); + fixWAet = 0; + } + } + } + + delete[] pBufEte; + _FreeSllb(scanLineListBlock.pNext); + + return true; +} + +bool +_CanvasLine::_GetOrientationUnitVector(_GpPoint& startPt, _GpPoint& endPt, float* pOx, float* pOy) const +{ + float len; + + if (pOx == null || pOy == null) + { + return false; + } + + *pOx = (float) (endPt.x - startPt.x); + *pOy = (float) (endPt.y - startPt.y); + + // need to check how to use the math func + len = (float) sqrt((*pOx) * (*pOx) + (*pOy) * (*pOy)); + + if (len < 1) + { + return false; + } + + *pOx = *pOx / len; + *pOy = *pOy / len; + + return true; +} + +bool +_CanvasLine::_PatchThickContinuousLine(_GpPolygon* pPolygon, _GpPoint& point1, _GpPoint& point2, float ox1, float oy1, float ox2, float oy2) const +{ + int plx; + int ply; + int prx; + int pry; + bool ret = false; + + if (pPolygon == null) + { + return false; + } + + __GetBrushEndPoint(ox1, oy1, __lineWidth, &plx, &ply, &prx, &pry); + + ret = _AddPolygonVertex(pPolygon, point1.x + plx, point1.y + ply, 0); + + if (!ret) + { + return ret; + } + + ret = _AddPolygonVertex(pPolygon, point1.x + prx, point1.y + pry, 1); + + if (!ret) + { + return ret; + } + + // if (ox2 != 0 || oy2 != 0) + if ((!_IsEqual(ox2, 0.0f)) || (!_IsEqual(oy2, 0.0f))) + { + __GetBrushEndPoint(ox2, oy2, __lineWidth, &plx, &ply, &prx, &pry); + } + + ret = _AddPolygonVertex(pPolygon, point2.x + plx, point2.y + ply, 0); + + if (!ret) + { + return ret; + } + + ret = _AddPolygonVertex(pPolygon, point2.x + prx, point2.y + pry, 1); + + if (!ret) + { + return ret; + } + + return true; +} + +bool +_CanvasLine::_AddPolygonVertex(_GpPolygon* pPolygon, int x, int y, int pos) const +{ + if (pPolygon == null) + { + return false; + } + + _GpVertex* pNewVertex = new (std::nothrow) _GpVertex; + + if (pNewVertex == null) + { + return false; + } + + pNewVertex->point.x = x; + pNewVertex->point.y = y; + + if (pPolygon->n == 0) + { + pNewVertex->pNext = null; + pPolygon->pFirst = pPolygon->pLast = pNewVertex; + pPolygon->n = 1; + + return true; + } + + if (pos == 0) + { + pNewVertex->pNext = pPolygon->pFirst; + pPolygon->pFirst = pNewVertex; + pPolygon->n++; + } + else + { + pNewVertex->pNext = null; + pPolygon->pLast->pNext = pNewVertex; + pPolygon->pLast = pNewVertex; + pPolygon->n++; + } + + return true; +} + + +void +_CanvasLine::__GetBrushEndPoint(float ox, float oy, int w, int* pLeftX, int* pLeftY, int* pRightX, int* pRightY) const +{ + float wl; + float wr; + + if (w % 2 == 1) + { + wl = wr = w / 2.f - 0.001f; + } + else + { + wl = wr = (w + 1) / 2.f - 0.001f; + wr -= 1.f; + } + + // if (oy == 0.0f && (ox == 1.0f || ox == -1.0f)) // Improve a line-width problem. + if (_IsEqual(oy, 0.0f) && (_IsEqual(ox, 1.0f) || _IsEqual(ox, -1.0f))) + { + wr += 1.0f; //!! + } + + *pLeftX = (int) (wl * oy); + *pLeftY = (int) (-wl * ox); + + *pRightX = (int) (-wr * oy); + *pRightY = (int) (wr * ox); + + return; +} + +bool +_CanvasLine::_CreateEtAndAet(int ptCount, _GpPoint* pPoints, _GpEdgeTable* pEdgeTable, _GpEdgeTableEntry* pEdgeTableEntry, _GpEdgeTableEntry* pEteBuffer, _GpScanLineListBlock* pSllb) const +{ + _GpPoint* pTop = null; + _GpPoint* pBottom = null; + _GpPoint* pPrevPoint = null; + _GpPoint* pCurrPoint = null; + int isllb = 0; + int dx; + int dy; + int i; + + if (ptCount < 2) + { + return true; + } + + pEdgeTableEntry->pNext = null; + pEdgeTableEntry->pBack = null; + pEdgeTableEntry->pWNext = null; + pEdgeTableEntry->minor = _MIN_INT; + + pEdgeTable->scanLines.pNext = null; + pEdgeTable->maxY = _MIN_INT; + pEdgeTable->minY = _MAX_INT; + pSllb->pNext = null; + + pPrevPoint = &pPoints[ptCount - 1]; + + for (i = 0; i < ptCount; i++) + { + if (pEdgeTable->maxY < pPoints[i].y) + { + pEdgeTable->maxY = pPoints[i].y; + } + if (pEdgeTable->minY > pPoints[i].y) + { + pEdgeTable->minY = pPoints[i].y; + } + } + + while (ptCount--) + { + pCurrPoint = pPoints++; + + if (pPrevPoint->y > pCurrPoint->y) + { + pBottom = pPrevPoint; + pTop = pCurrPoint; + pEteBuffer->clockWise = false; + } + else + { + pBottom = pCurrPoint; + pTop = pPrevPoint; + pEteBuffer->clockWise = true; + } + + if (pBottom->y != pTop->y) + { + pEteBuffer->maxY = pBottom->y; + + if (pEteBuffer->maxY <= pEdgeTable->maxY) + { + pEteBuffer->maxY--; // exclude the last scan line + } + + dy = pBottom->y - pTop->y; + pEteBuffer->minor = pTop->x; + dx = pBottom->x - pTop->x; + + if (dx < 0) + { + pEteBuffer->gradient = dx / dy; + pEteBuffer->gradient1 = pEteBuffer->gradient - 1; + pEteBuffer->inc1 = -2 * dx + 2 * dy * pEteBuffer->gradient1; + pEteBuffer->inc2 = -2 * dx + 2 * dy * pEteBuffer->gradient; + pEteBuffer->direction = 2 * pEteBuffer->gradient * dy - 2 * dx - dy; + } + else + { + pEteBuffer->gradient = dx / dy; + pEteBuffer->gradient1 = pEteBuffer->gradient + 1; + pEteBuffer->inc1 = 2 * dx - 2 * dy * pEteBuffer->gradient1; + pEteBuffer->inc2 = 2 * dx - 2 * dy * pEteBuffer->gradient; + pEteBuffer->direction = -2 * pEteBuffer->gradient * dy + 2 * dx - dy; + } + + if (!__InsertEdge(pEdgeTable, pEteBuffer, pTop->y, &pSllb, &isllb)) + { + return false; + } + + pEteBuffer++; + } + + pPrevPoint = pCurrPoint; + } + + return true; +} + +void +_CanvasLine::_FreeSllb(_GpScanLineListBlock* pScanLineListBlock) const +{ + _GpScanLineListBlock* pTempSlLb = null; + + while (pScanLineListBlock != null) + { + pTempSlLb = pScanLineListBlock->pNext; + delete pScanLineListBlock; + pScanLineListBlock = pTempSlLb; + } + + return; +} + +void +_CanvasLine::_LoadAet(_GpEdgeTableEntry* pAet, _GpEdgeTableEntry* pEte) const +{ + _GpEdgeTableEntry* pPrevAet = null; + _GpEdgeTableEntry* pTempEte = null; + + pPrevAet = pAet; + pAet = pAet->pNext; + + while (pEte) + { + while ((pAet) && (pAet->minor < pEte->minor)) + { + pPrevAet = pAet; + pAet = pAet->pNext; + } + + pTempEte = pEte->pNext; + pEte->pNext = pAet; + + if (pAet) + { + pAet->pBack = pEte; + } + + pEte->pBack = pPrevAet; + pPrevAet->pNext = pEte; + pPrevAet = pEte; + pEte = pTempEte; + } + + return; +} + +bool +_CanvasLine::_InsertionSort(_GpEdgeTableEntry* pAet) const +{ + _GpEdgeTableEntry* pEteChase = null; + _GpEdgeTableEntry* pEteInsert = null; + _GpEdgeTableEntry* pEteChaseBack = null; + bool isChanged = false; + + pAet = pAet->pNext; + + while (pAet) + { + pEteInsert = pAet; + pEteChase = pAet; + + while (pEteChase->pBack->minor > pAet->minor) + { + pEteChase = pEteChase->pBack; + } + + pAet = pAet->pNext; + + if (pEteChase != pEteInsert) + { + pEteChaseBack = pEteChase->pBack; + pEteInsert->pBack->pNext = pAet; + + if (pAet) + { + pAet->pBack = pEteInsert->pBack; + } + + pEteInsert->pNext = pEteChase; + pEteChase->pBack->pNext = pEteInsert; + pEteChase->pBack = pEteInsert; + pEteInsert->pBack = pEteChaseBack; + isChanged = true; + } + } + + return isChanged; +} + +void +_CanvasLine::_ComputeWaet(_GpEdgeTableEntry* pAet) const +{ + _GpEdgeTableEntry* pWete = null; + bool inside = true; + int isInside = 0; + + pAet->pWNext = null; + pWete = pAet; + pAet = pAet->pNext; + + while (pAet) + { + if (pAet->clockWise) + { + isInside++; + } + else + { + isInside--; + } + + if ((!inside && isInside == 0) || (inside && isInside)) + { + pWete->pWNext = pAet; + pWete = pAet; + inside = !inside; + } + + pAet = pAet->pNext; + } + + pWete->pWNext = null; + + return; +} + +bool +_CanvasLine::__InsertEdge(_GpEdgeTable* pEt, _GpEdgeTableEntry* pEte, int scanLine, _GpScanLineListBlock** pSllb, int* pIsllb) const +{ + _GpEdgeTableEntry* pStart = null; + _GpEdgeTableEntry* pPrev = null; + _GpScanLineList* pSll = null; + _GpScanLineList* pPresSll = null; + _GpScanLineListBlock* pTmpSllb = null; + + // Check parameter + if (pEt == null || pEte == null || pSllb == null || pIsllb == null) + { + return false; + } + + pPresSll = &pEt->scanLines; + pSll = pPresSll->pNext; + + while (pSll != null && (pSll->scanLine < scanLine)) + { + pPresSll = pSll; + pSll = pSll->pNext; + } + + if (pSll == null || pSll->scanLine > scanLine) + { + if (*pIsllb >= _MAX_SLL_BLOCK) + { + pTmpSllb = new (std::nothrow) _GpScanLineListBlock; + + if (pTmpSllb == null) + { + SysLog(NID_GRP, "__InsertEdge : pTmpSllb allcation is failed!\n"); + // SysSetLastError(WMERR_OUT_OF_MEMORY); + return false; + } + + (*pSllb)->pNext = pTmpSllb; + pTmpSllb->pNext = null; + *pSllb = pTmpSllb; + *pIsllb = 0; + } + + pSll = &((*pSllb)->scanLineList[(*pIsllb)]); + (*pIsllb)++; + pSll->pNext = pPresSll->pNext; + pSll->pEdgeList = null; + pPresSll->pNext = pSll; + } + + pSll->scanLine = scanLine; + + pPrev = null; + pStart = pSll->pEdgeList; + + while (pStart != null && pStart->minor < pEte->minor) + { + pPrev = pStart; + pStart = pStart->pNext; + } + + pEte->pNext = pStart; + + if (pPrev != null) + { + pPrev->pNext = pEte; + } + else + { + pSll->pEdgeList = pEte; + } + + return true; +} + +bool +_CanvasLine::_PatchJoint(_GpPolygon* pPolygon, int x, int y, float ox1, float oy1, float ox2, float oy2) const +{ + float cross; + int plx1; + int ply1; + int prx1; + int pry1; + + int plx2; + int ply2; + int prx2; + int pry2; + int degree0; + int degree1; + + cross = ox1 * oy2 - oy1 * ox2; + + if ((-0.0001f < cross) && (cross < 0.0001f)) + { + return true; + } + + __GetBrushEndPoint(ox1, oy1, __lineWidth, &plx1, &ply1, &prx1, &pry1); + __GetBrushEndPoint(ox2, oy2, __lineWidth, &plx2, &ply2, &prx2, &pry2); + + if (cross < 0) + { + degree0 = (int) (atan2((float) -pry1, (float) prx1) * (180 / _PI)); + degree1 = (int) (atan2((float) -pry2, (float) prx2) * (180 / _PI)); + } + else + { + degree0 = (int) (atan2((float) -ply2, (float) plx2) * (180 / _PI)); + degree1 = (int) (atan2((float) -ply1, (float) plx1) * (180 / _PI)); + } + + while (degree0 < 0) + { + degree0 += 360; + } + + while (degree0 > 360) + { + degree0 -= 360; + } + + while (degree1 > 360) + { + degree1 -= 360; + } + + while (degree1 < degree0) + { + degree1 += 360; + } + + if (cross < 0) + { + __PatchArc(pPolygon, (float) x, (float) y, (float) (__lineWidth / 2 - 1), (float) (__lineWidth / 2 - 1), degree0, degree1, 1); + } + else + { + __PatchArc(pPolygon, (float) x, (float) y, (float) (__lineWidth / 2 - 1), (float) (__lineWidth / 2 - 1), degree0, degree1, 0); + } + + return true; +} + +bool +_CanvasLine::_PatchRoundCap(_GpPolygon* pPolygon, int x, int y, float ox, float oy, bool isStart) const +{ + int degree0; + int degree1; + int d; + float rad; + float fx; + float fy; + + d = (int) (atan2(-oy, ox) * (180 / _PI)); + + if (isStart) + { + degree0 = d + 90; + degree1 = d - 90 + 360; + } + else + { + degree0 = d - 90; + degree1 = d + 90; + } + + rad = __lineWidth / 2.f - 0.5f; + + if (__lineWidth % 2 == 0) + { + fx = x + oy / 2; + fy = y - ox / 2; + } + else + { + fx = (float) x; + fy = (float) y; + } + + return __PatchArc(pPolygon, fx, fy, rad, rad, degree0, degree1, 1); +} + +bool +_CanvasLine::__PatchArc(_GpPolygon* pPolygon, float x, float y, float w, float h, int degree0, int degree1, int pos) const +{ + int n; + int i; + _GpFloatPoint* pEllipsePoint = null; + + if ((degree0 % 360 == degree1 % 360) && (degree1 - degree0 != 360)) + { + return true; + } + + // if (w == 0.f || h == 0.f) + if (_IsEqual(w, 0.0f) || _IsEqual(h, 0.0f)) + { + return true; + } + + n = _MakeEllipseArcPointArray(&pEllipsePoint, null, x, y, w, h, degree0, degree1, 0); + + if (pEllipsePoint == null) + { + return false; + } + + if (n < 2) + { + delete[] pEllipsePoint; + + return false; + } + + if (pos == 0) + { + for (i = n - 1; i >= 0; i--) + { + if (!_AddPolygonVertex(pPolygon, (int) (pEllipsePoint[i].fx + 0.5f), (int) (pEllipsePoint[i].fy), 0)) + { + delete[] pEllipsePoint; + + return false; + } + } + } + else + { + for (i = 0; i < n; i++) + { + if (!_AddPolygonVertex(pPolygon, (int) (pEllipsePoint[i].fx + 0.5f), (int) (pEllipsePoint[i].fy), 1)) + { + delete[] pEllipsePoint; + + return false; + } + } + } + + delete[] pEllipsePoint; + + return true; +} + +int +_CanvasLine::_MakeEllipseArcPointArray(_GpFloatPoint** pPoint, _GpFloatPoint** pNorm, float x, float y, float w, float h, int a1, int a2, int rot) const +{ + const float one_deg = 0.01745329251994329576f; + + int i; + int pointCount = 0; + float degree1; + float degree2; + float r; + float r1; + float r2; + float t1x; + float t1y; + float len; + float sinR; + float cosR; + float t2x; + float t2y; + bool isEnd; + + rot = ((-rot) % 360 + 360) % 360; + + degree1 = (float) a1; + degree2 = (float) a2; + + r1 = (float) atan2(w * sin(_GP_DEGREE2RADIAN(degree1)), h * cos(_GP_DEGREE2RADIAN(degree1))); + r2 = (float) atan2(w * sin(_GP_DEGREE2RADIAN(degree2)), h * cos(_GP_DEGREE2RADIAN(degree2))); + + while (r1 < 0) + { + r1 = r1 + 2 * _PI; + } + + while (r2 - 0.001f <= r1) + { + r2 = r2 + 2 * _PI; + } + + pointCount = (int) ((r2 - r1) / one_deg) + 2; + + *pPoint = new (std::nothrow) _GpFloatPoint[pointCount]; + + if (!*pPoint) + { + return 0; + } + + if (pNorm != null) + { + *pNorm = new (std::nothrow) _GpFloatPoint[pointCount]; + + if (!*pNorm) + { + delete[] *pPoint; + + return 0; + } + } + + for (r = r1, i = 0, isEnd = false; i < pointCount; r += one_deg, i++) + { + if (r > r2) + { + r = r2; + isEnd = true; + } + + sinR = (float) sin(r); + cosR = (float) cos(r); + + t1x = w * cosR; + t1y = -h * sinR; + + _Rotate2DPoint(t1x, t1y, rot, &t2x, &t2y); + + (*pPoint)[i].fx = x + t2x; + (*pPoint)[i].fy = y + t2y; + + if (pNorm != null) + { + t1x = h * cosR; + t1y = -w * sinR; + + len = (float) sqrt(t1x * t1x + t1y * t1y); + + if (_IsEqual(len, 0.0f)) + { + i--; + pointCount--; + continue; + } + + t1x = t1x / len; + t1y = t1y / len; + + _Rotate2DPoint(t1x, t1y, rot, &t2x, &t2y); + + (*pNorm)[i].fx = t2x; + (*pNorm)[i].fy = t2y; + } + + if (isEnd) + { + pointCount = i + 1; + break; + } + } + + return pointCount; +} + +void +_CanvasLine::_Rotate2DPoint(float x, float y, long rot, float* pRx, float* pRy) const +{ + float s; + float c; + + s = (float) sin(_GP_DEGREE2RADIAN(float(rot))); + c = (float) cos(_GP_DEGREE2RADIAN(float(rot))); + + *pRx = x * c - y * s; + *pRy = y * c + x * s; + + return; +} + +_GpResult +_CanvasLine::__DrawHorizontalLineWithOpacity32(int startX, int endX, int y, const _GpBufferInfo& bufInfo) +{ + register unsigned char dstA; + register unsigned char dstR; + register unsigned char dstG; + register unsigned char dstB; + + int frmbufP = bufInfo.pixelPerLine; + + // doesn't need to check the validity of bound.. maybe it's duplicate... + //if (startX > endX) + // return GP_RESULT_FAIL; + + //if (startX < 0 || startX >= frmbufW) + // return GP_RESULT_OUTOFBOUNDS; + + //if (endX < 0 || endX >= frmbufW) + // return GP_RESULT_OUTOFBOUNDS; + + //if (y < 0 || y >= frmbufH) + // return GP_RESULT_OUTOFBOUNDS; + + //if (frmbufW < 1 || frmbufH < 1) + // return GP_RESULT_FAIL;*/ + + unsigned long* pFrmbuf32 = (unsigned long*) bufInfo.pPixels; + + unsigned char srcA = (unsigned char) ((bufInfo.color32 & 0xFF000000) >> 24); + unsigned char srcR = (unsigned char) ((bufInfo.color32 & 0x00FF0000) >> 16); + unsigned char srcG = (unsigned char) ((bufInfo.color32 & 0x0000FF00) >> 8); + unsigned char srcB = (unsigned char) (bufInfo.color32 & 0x000000FF); + unsigned char oneMinusSrcA = 255 - srcA; + + { + register unsigned long* pOffset32 = (pFrmbuf32 + frmbufP * y + startX); + + for (int i = 0; i < endX - startX + 1; i++) + { + dstR = (unsigned char)(*pOffset32 >> 16); + dstG = (unsigned char)(*pOffset32 >> 8); + dstB = (unsigned char)(*pOffset32); + + dstR = (unsigned char) ((dstR * oneMinusSrcA + srcR * srcA + 255) >> 8); + dstG = (unsigned char) ((dstG * oneMinusSrcA + srcG * srcA + 255) >> 8); + dstB = (unsigned char) ((dstB * oneMinusSrcA + srcB * srcA + 255) >> 8); + dstA = (((unsigned char)(*pOffset32 >> 24) * oneMinusSrcA + 255) >> 8) + srcA; + + *pOffset32++ = (unsigned long)(((unsigned long)dstA << 24) | ((unsigned long)dstR << 16) | ((unsigned long)dstG << 8) | (unsigned long)(dstB)); + } + } + + return GP_RESULT_SUCCESS; +} + +bool +_CanvasLine::_IsInClipRect(int rectX, int rectY, int rectW, int rectH, const _GpBufferInfo& bufInfo) const +{ + if (rectW <= 0 || rectH <= 0) + { + return false; + } + + if (bufInfo.isClipBoundsSet) + { + if (rectX >= bufInfo.clipBounds.x && (rectX + rectW) <= (bufInfo.clipBounds.x + bufInfo.clipBounds.width) && + rectY >= bufInfo.clipBounds.y && (rectY + rectH) <= (bufInfo.clipBounds.y + bufInfo.clipBounds.height)) + { + return true; + } + } + else + { + if (rectX >= 0 && (rectX + rectW) <= bufInfo.width && rectY >= 0 && (rectY + rectH) <= bufInfo.height) + { + return true; + } + } + + return false; +} + +bool +_CanvasLine::_SetNotClipFunction(bool isWidelineSet) +{ + pFuncSetPixel = &_CanvasLine::_DrawPixel; + + if (__lineWidth == 1 || !isWidelineSet) + { + pFuncHorizontalLine = &_CanvasLine::_DrawUnitLineHorizontal; + pFuncVerticalLine = &_CanvasLine::_DrawUnitLineVertical; + } + else if (__lineWidth > 1) + { + pFuncHorizontalLine = &_CanvasLine::_DrawWideLineHorizontal; + pFuncVerticalLine = &_CanvasLine::_DrawWideLineVertical; + } + + return true; +} + +bool +_CanvasLine::_SetClipFunction(bool isWidelineSet) const +{ + pFuncSetPixel = &_CanvasLine::_DrawPixelWithClipping; + + if (__lineWidth == 1 || !isWidelineSet) + { + pFuncHorizontalLine = &_CanvasLine::_DrawUnitLineHorizontalWithClipping; + pFuncVerticalLine = &_CanvasLine::_DrawUnitLineVerticalWithClipping; + } + else if (__lineWidth > 1) + { + pFuncHorizontalLine = &_CanvasLine::_DrawUnitLineHorizontalWithClipping; + pFuncVerticalLine = &_CanvasLine::_DrawUnitLineVerticalWithClipping; + } + + return true; +} + +bool +_CanvasLine::_DrawPolyLine(int ptCount, _GpPoint* pPoints, bool isConnected, const _GpBufferInfo& bufInfo) +{ + int i = 0; + int j; + bool ret = false; + + ptCount = __CheckDupVertexForPolygon(ptCount, pPoints, isConnected); + + if (__lineWidth < 2 || (bufInfo.color32 & 0xFF000000) == 0xFF000000) + { + while (++i < ptCount) + { + j = i - 1; + + if (DrawLine(pPoints[j], pPoints[i], bufInfo) == E_SYSTEM) + { + SysLog(NID_GRP, "_DrawPolyLine: DrawLine is failed -1!\n"); + + return false; + } + } + + if (isConnected) + { + if (DrawLine(pPoints[i-1], pPoints[0], bufInfo) == E_SYSTEM) + { + SysLog(NID_GRP, "_DrawPolyLine: DrawLine is failed -2!\n"); + + return false; + } + } + + ret = true; + } + else + { + ret = __DrawThickContinuousPolyline(ptCount, pPoints, isConnected, bufInfo); + } + + return ret; +} + +}} // Tizen::Graphics diff --git a/src/graphics/FGrp_CanvasGpPrimitive.h b/src/graphics/FGrp_CanvasGpPrimitive.h new file mode 100644 index 0000000..d8c7e2b --- /dev/null +++ b/src/graphics/FGrp_CanvasGpPrimitive.h @@ -0,0 +1,492 @@ +// +// 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_CanvasGpPrimitive.h + * @brief This is the header file for 2D Primitive classes. + * + */ + +#ifndef _FGRP_INTERNAL_CANVAS_GP_PRIMITIVE_H_ +#define _FGRP_INTERNAL_CANVAS_GP_PRIMITIVE_H_ + + +#include +#include + + +namespace Tizen { namespace Graphics +{ + +namespace // unnamed +{ + +const int _MAX_SLL_BLOCK = 25; +const int _MAX_INT = 0x7fffffff; +const int _MIN_INT = (-_MAX_INT - 1); +const float _PI = (3.14159265358979323846f); + +template +inline T GP_ABS(T value) +{ + return (value < 0) ? -value : value; +} + +template +inline void GP_SWAP(T& a, T& b) +{ + T tmp = a; + a = b; + b = tmp; +} + +template +inline T GP_MIN(T a, T b) +{ + return (a < b) ? a : b; +} + +template +inline T GP_MAX(T a, T b) +{ + return (a < b) ? b : a; +} + +inline int _GP_RADIAN2DEGREE(float radian) +{ + return int(radian * 180.0f / _PI + 0.5f); +} + +inline float _GP_DEGREE2RADIAN(float degree) +{ + return degree * _PI / 180.0f; +} + +} + +struct _GpPoint +{ + int x; + int y; +}; + +struct _GpRect +{ + int x; + int y; + int width; + int height; + + _GpRect() + : x(0) + , y(0) + , width(0) + , height(0) + { + } + + ~_GpRect() + { + } + + bool SetBounds(int rcX, int rcY, int rcW, int rcH) + { + x = rcX; + y = rcY; + width = rcW; + height = rcH; + + return true; + } +}; + +struct _GpVertex +{ + _GpPoint point; + _GpVertex* pNext; + + _GpVertex() + { + point.x = 0; + point.y = 0; + pNext = null; + } + + ~_GpVertex() + { + // if (pNext) + // delete next; + } + +}; + +struct _GpPolygon +{ + int n; + _GpVertex* pFirst; + _GpVertex* pLast; + + _GpPolygon() + : n(0) + , pFirst(null) + , pLast(null) + { + } + + ~_GpPolygon() + { + } +}; + +struct _GpEdgeTableEntry +{ + int maxY; + int minor; + int direction; + int gradient; + int gradient1; + int inc1; + int inc2; + _GpEdgeTableEntry* pNext; + _GpEdgeTableEntry* pBack; + _GpEdgeTableEntry* pWNext; + bool clockWise; +}; + +struct _GpScanLineList +{ + int scanLine; + _GpEdgeTableEntry* pEdgeList; + _GpScanLineList* pNext; +}; + +struct _GpEdgeTable +{ + int maxY; + int minY; + _GpScanLineList scanLines; +}; + +struct _GpScanLineListBlock +{ + _GpScanLineList scanLineList[_MAX_SLL_BLOCK]; + _GpScanLineListBlock* pNext; +}; + +struct _GpFloatPoint +{ + float fx; + float fy; +}; + +struct _GpBufferInfo +{ + int width; + int height; + int bitsPerPixel; + int pixelPerLine; + void* pPixels; + unsigned long color32; + unsigned short color16; + bool isClipBoundsSet; + _GpRect clipBounds; + + _GpBufferInfo() + : width(0) + , height(0) + , bitsPerPixel(0) + , pixelPerLine(0) + , pPixels(null) + , color32(0) + , color16(0) + , isClipBoundsSet(false) + { + } + +}; + +enum _GpResult +{ + GP_RESULT_SUCCESS = 0x00000001, + GP_RESULT_OUTOFBOUNDS = 0x00000002, + GP_RESULT_FAIL = 0x00000004 +}; + +inline bool +_IsEqual(float f1, float f2) +{ + return (((f1 > f2) ? f1 - f2 : f2 - f1) < 0.00001f); // epsilon is assumed to be 0.0001, not 1.192092896e-07f +} + +class _CanvasLine +{ +public: + // A Constructor + _CanvasLine(void) + : pFuncSetPixel(null) + , pFuncHorizontalLine(null) + , pFuncVerticalLine(null) + , __lineWidth(1) + { + _SetClipFunction(true); + } + // A Destructor + virtual ~_CanvasLine(void) { } + + // Sets the line width. + bool SetLineWidth(int lineWidth); + // Gets the line width. + int GetLineWidth(void) const; + // draws a line. + result DrawLine(const _GpPoint& startPt, const _GpPoint& endPt, const _GpBufferInfo& bufInfo); + // draws a PolyLine. + result DrawPolyLine(int pointCount, _GpPoint* pPoints, const _GpBufferInfo& bufInfo); + // draws a Polygon. + result DrawPolygon(int pointCount, _GpPoint* pPoints, const _GpBufferInfo& bufInfo); + +protected: + _GpResult _DrawUnitLineVertical(int x, int startY, int endY, const _GpBufferInfo& bufInfo); + _GpResult _DrawUnitLineHorizontal(int startX, int endX, int y, const _GpBufferInfo& bufInfo); + _GpResult _DrawWideLineVertical(int x, int startY, int endY, const _GpBufferInfo& bufInfo); + _GpResult _DrawWideLineHorizontal(int startX, int endX, int y, const _GpBufferInfo& bufInfo); + _GpResult _DrawUnitLineSlant(const _GpPoint& pt1, const _GpPoint& pt2, const _GpBufferInfo& bufInfo); + _GpResult _DrawPixel(int x, int y, const _GpBufferInfo& bufInfo); + + _GpResult _DrawUnitLineVerticalWithClipping(int x, int startY, int endY, const _GpBufferInfo& bufInfo); + _GpResult _DrawUnitLineHorizontalWithClipping(int startX, int endX, int y, const _GpBufferInfo& bufInfo); + _GpResult _DrawWideLineVerticalWithClipping(int x, int startY, int endY, const _GpBufferInfo& bufInfo); + _GpResult _DrawWideLineHorizontalWithClipping(int startX, int endX, int y, const _GpBufferInfo& bufInfo); + _GpResult _DrawPixelWithClipping(int x, int y, const _GpBufferInfo& bufInfo); + + bool _DrawPolyLine(int pointCount, _GpPoint* pPoints, bool isConnected, const _GpBufferInfo& bufInfo); + void _FreePolygon(_GpPolygon* pPolygon) const; + bool _FillPolygon(int pointCount, _GpPoint* pPoints, bool isEvenOdd, const _GpBufferInfo& bufInfo); + bool _GetOrientationUnitVector(_GpPoint& startPt, _GpPoint& endPt, float* pOx, float* pOy) const; + bool _PatchThickContinuousLine(_GpPolygon* pPolygon, _GpPoint& pt1, _GpPoint& pt2, float ox1, float oy1, float ox2, float oy2) const; + bool _AddPolygonVertex(_GpPolygon* pPolygon, int x, int y, int pos) const; + + bool _CreateEtAndAet(int pointCount, _GpPoint* pPoints, _GpEdgeTable* pEdgeTable, _GpEdgeTableEntry* pEdgeTableEntry, _GpEdgeTableEntry* pEteBuffer, _GpScanLineListBlock* pSllb) const; + void _FreeSllb(_GpScanLineListBlock* pScanLineListBlock) const; + void _LoadAet(_GpEdgeTableEntry* pAet, _GpEdgeTableEntry* pEte) const; + bool _InsertionSort(_GpEdgeTableEntry* pAet) const; + void _ComputeWaet(_GpEdgeTableEntry* pAet) const; + + bool _PatchJoint(_GpPolygon* pPolygon, int x, int y, float ox1, float oy1, float ox2, float oy2) const; + bool _PatchRoundCap(_GpPolygon* pPolygon, int x, int y, float ox, float oy, bool isStart) const; + + int _MakeEllipseArcPointArray(_GpFloatPoint** pPoint, _GpFloatPoint** pNorm, float x, float y, float w, float h, int a1, int a2, int rot) const; + + void _Rotate2DPoint(float x, float y, long rot, float* pRx, float* pRy) const; + + bool _IsInClipRect(int rectX, int rectY, int rectW, int rectH, const _GpBufferInfo& bufInfo) const; + bool _SetNotClipFunction(bool isWidelineSet); + bool _SetClipFunction(bool isWidelineSet) const; + +private: + bool __DrawWideLine(const _GpPoint& startPt, const _GpPoint& endPt, const _GpBufferInfo& bufInfo); + bool __DrawWideLineWithOpacity32(const _GpPoint& startPt, const _GpPoint& endPt, const _GpBufferInfo& bufInfo); + bool __DrawThickContinuousPolyline(int listCount, _GpPoint* pPoints, bool isConnected, const _GpBufferInfo& bufInfo); + _GpResult __DrawHorizontalLineWithOpacity32(int startX, int endX, int y, const _GpBufferInfo& bufInfo); + + int __CheckDupVertexForPolygon(int pointCount, _GpPoint* pPoints, bool isConnected) const; + void __GetBrushEndPoint(float ox, float oy, int w, int* plx, int* ply, int* prx, int* pry) const; + bool __InsertEdge(_GpEdgeTable* pEdgeTable, _GpEdgeTableEntry* pEdgeTableEntry, int scanLine, _GpScanLineListBlock** ppSllb, int* pIsLineListBlock) const; + + bool __PatchArc(_GpPolygon* pPolygon, float x, float y, float w, float h, int d0, int d1, int pos) const; + +public: + typedef _GpResult (_CanvasLine::* DrawPixelFunc)(int x, int y, const _GpBufferInfo& bufInfo); + typedef _GpResult (_CanvasLine::* DrawHorizontalLine)(int startX, int endX, int y, const _GpBufferInfo& bufInfo); + typedef _GpResult (_CanvasLine::* DrawVerticalLine)(int x, int startY, int endY, const _GpBufferInfo& bufInfo); + + mutable DrawPixelFunc pFuncSetPixel; + mutable DrawHorizontalLine pFuncHorizontalLine; + mutable DrawVerticalLine pFuncVerticalLine; + +private: + int __lineWidth; + + friend class _CanvasTriangle; + friend class _CanvasArc; + friend class _CanvasEllipse; + friend class _CanvasFillPolygon; + friend class _CanvasRoundRect; +}; + + +class _CanvasFillPolygon +{ +public: + // A Constructor + _CanvasFillPolygon(void) + { + __lineWidth = 1; + } + + // A Destructor + virtual ~_CanvasFillPolygon(void) { } + + // Sets the line width + bool SetLineWidth(int lineWidth); + // Gets the line width. + int GetLineWidth(void) const; + // draws the filled polygon. + result FillPolygon(int pointCount, _GpPoint* pPoints, const _GpBufferInfo& bufInfo); + +private: + int __lineWidth; + +}; + + +class _CanvasEllipse +{ +public: + // A Constructor + _CanvasEllipse(void) + { + __lineWidth = 1; + } + // A Destructor + virtual ~_CanvasEllipse(void) { } + // Sets the line width + bool SetLineWidth(int lineWidth); + // Gets the line width. + int GetLineWidth(void) const; + // Draws a ellipse. + result DrawEllipse(int rectX, int rectY, int rectW, int rectH, const _GpBufferInfo& bufInfo) const; +// bool __DrawEllipseWithWidth(int rectX, int rectY, int rectW, int rectH, _GpBufferInfo& bufInfo); + // Draws the filled ellipse. + result FillElliepse(int rectX, int rectY, int rectW, int rectH, const _GpBufferInfo& bufInfo) const; + +private: + bool __DrawEllipseWithWidth(int rectX, int rectY, int rectW, int rectH, const _GpBufferInfo& bufInfo) const; + +private: + int __lineWidth; + +}; + + +class _CanvasArc +{ +public: + enum GpArcDiffResult + { + DIFF_RESULT_EQUAL = 0, + DIFF_RESULT_GREAT, + DIFF_RESULT_LITTLE, + }; + + struct GpArcStack + { + int left; + int right; + }; + +public: + // A Constructor + _CanvasArc(void) + { + __lineWidth = 1; + } + // A Destructor + virtual ~_CanvasArc(void) { } + // Sets the line width + bool SetLineWidth(int lineWidth); + // Gets the line width. + int GetLineWidth(void) const; + // Draws a Arc. + result DrawArc(int rectX, int rectY, int rectW, int rectH, int startAngle, int endAngle, Tizen::Graphics::ArcStyle arcType, const _GpBufferInfo& bufInfo); + + void _CalcLeftRightWidth(float* pWidthLeft, float* pWidthRight) const; + +private: + bool __GetArcVertices(int radiusX, int radiusY, int theta, int* pX, int* pY) const; + float __Sine(int degree) const; + float __Cosine(int degree) const; + bool __SaveLine(int x1, int y1, int x2, int y2, _GpPoint* pPionts, int* pPixelCount) const; + bool __FillArcWithEvenOdd(_GpPoint* pPionts, int pixelCount, bool clip, const _GpBufferInfo& bufInfo) const; + void __QuickSort(_GpPoint* pPionts, int left, int right) const; + + bool __Draw32BitArc(int rectX, int rectY, int rectW, int rectH, int d0, int d1, Tizen::Graphics::ArcStyle arcType, const _GpBufferInfo& bufInfo); + bool __DrawThickContinuousArc(int cx, int cy, int halfW, int halfH, int d0, int d1, const _GpBufferInfo& bufInfo) const; + bool __DrawThickContinuousPie(int cx, int cy, int halfW, int halfH, int d0, int d1, const _GpBufferInfo& bufInfo) const; + bool __DrawThickContinuousChord(int cx, int cy, int halfW, int halfH, int d0, int d1, const _GpBufferInfo& bufInfo) const; + +private: + int __lineWidth; +}; + + +class _CanvasTriangle +{ +public: + // A Constructor + _CanvasTriangle(void) + { + __lineWidth = 1; + } + // A Destructor + virtual ~_CanvasTriangle(void) { } + // Sets the line width + bool SetLineWidth(int lineWidth); + // Gets the line width. + int GetLineWidth(void) const; + // Draws a triangle. + result DrawTriangle(const _GpPoint& pt1, const _GpPoint& pt2, const _GpPoint& pt3, const _GpBufferInfo& bufInfo); + // Draws the filled triangle. + result FillTriangle(int vertexX1, int vertexY1, int vertexX2, int vertexY2, int vertexX3, int vertexY3, const _GpBufferInfo& bufInfo) const; + +private: + bool __FillTriangleEx(int x1, int y1, int x2, int y2, int x3, int y3, const _GpBufferInfo& bufInfo) const; + +private: + int __lineWidth; +}; + + +class _CanvasRoundRect +{ +public: + // A Constructor + _CanvasRoundRect(void) + { + __lineWidth = 1; + } + // A Destructor + virtual ~_CanvasRoundRect(void) { } + // Sets the line width + bool SetLineWidth(int lineWidth); + // Gets the line width. + int GetLineWidth(void) const; + // Draws a roundRect. + result DrawRoundRect(int rectX, int rectY, int rectW, int rectH, int radiusX, int radiusY, const _GpBufferInfo& bufInfo); + // Draws the roundRect. + result FillRoundRectangle(int rectX, int rectY, int rectW, int rectH, int radiusX, int radiusY, const _GpBufferInfo& bufInfo) const; + +private: + bool __Draw32BitsRoundRect(int rectX, int rectY, int rectW, int rectH, int radiusX, int radiusY, const _GpBufferInfo& bufInfo); + int __MakeEllipseArcPointArrayForRoundRectN(_GpFloatPoint** pPoint, _GpFloatPoint** pNorm, float x, float y, float w, float h, int a1, int a2, int rot) const; + +private: + int __lineWidth; +}; + +}} // Tizen::Graphics + +#endif //_FGRP_INTERNAL_CANVAS_GP_PRIMITIVE_H_ diff --git a/src/graphics/FGrp_CanvasGpRoundRect.cpp b/src/graphics/FGrp_CanvasGpRoundRect.cpp new file mode 100644 index 0000000..a0ee0e0 --- /dev/null +++ b/src/graphics/FGrp_CanvasGpRoundRect.cpp @@ -0,0 +1,1097 @@ +// +// 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_CanvasGpRoundRect.cpp + * @brief This is the implementation file for _CanvasRoundRect class. + * + */ + +#include +#include + +#include + +#include + +#include "FGrp_CanvasGpPrimitive.h" +#include "FGrp_CanvasRasterOp.h" +#include "util/FGrp_UtilType.h" +#include "util/FGrp_UtilTemplate.h" + + +using namespace Tizen::Graphics; + +typedef unsigned long SystemPixel; + +namespace Tizen { namespace Graphics +{ + +void _FillRectangleWithClip32(_Util::ScratchPad* pScratchPad, SystemPixel color, const _Util::Rectangle& rect, const _Util::Rectangle& clip); + +}} // Tizen::Graphics + + +namespace Tizen { namespace Graphics +{ + +bool +_CanvasRoundRect::SetLineWidth(int lineWidth) +{ + __lineWidth = lineWidth; + return true; +} + +int +_CanvasRoundRect::GetLineWidth(void) const +{ + return __lineWidth; +} + +result +_CanvasRoundRect::DrawRoundRect(int rectX, int rectY, int rectW, int rectH, int radiusX, int radiusY, const _GpBufferInfo& bufInfo) +{ + int endX; + int endY; + int halfW; + int halfH; + int arcW; + int arcH; + int boxW; + int boxH; + + if (rectW < 1 || rectH < 1) + { + return E_SUCCESS; + } + + if (radiusX < 0 || radiusY < 0) + { + return E_SYSTEM; + } + + halfW = rectW >> 1; + halfH = rectH >> 1; + + if (radiusX > halfW) + { + radiusX = halfW; + } + + if (radiusY > halfH) + { + radiusY = halfH; + } + + endX = rectX + rectW - 1; + endY = rectY + rectH - 1; + + // Draw + if (!radiusX || !radiusY || rectW == 1 || rectH == 1) + { + if (bufInfo.bitsPerPixel == 32) + { + _Util::ScratchPad rect((unsigned long*) bufInfo.pPixels, bufInfo.width, bufInfo.height, bufInfo.pixelPerLine); + + rect.RegisterFillRect(_RasterOp::FnFillRectAlpha32Bit); + + { + rect.FillRect(rectX, rectY, rectW, rectH, bufInfo.color32); + } + + rect.RegisterFillRect(null); + } + else + { + // To do 16 bpp + return E_SYSTEM; + } + } + else + { + // Arc info + arcW = radiusX << 1; + arcH = radiusY << 1; + if (arcW <= 0) + { + arcW = 1; + } + + if (arcH <= 0) + { + arcH = 1; + } + + // Rectangle info + boxW = rectW - arcW; + boxH = rectH - arcH; + + if (boxW > 0 || boxH > 0) + { + __Draw32BitsRoundRect(rectX, rectY, rectW, rectH, radiusX, radiusY, bufInfo); + } + else + { + _CanvasEllipse ellipse; + + ellipse.SetLineWidth(__lineWidth); + ellipse.DrawEllipse(rectX, rectY, rectW, rectH, bufInfo); + } + } + + return E_SUCCESS; +} + +result +_CanvasRoundRect::FillRoundRectangle(int rectX, int rectY, int rectW, int rectH, int radiusX, int radiusY, const _GpBufferInfo& bufInfo) const +{ + int endX; + int endY; + int halfW; + int halfH; + int arcW; + int arcH; + + if (rectW < 1 || rectH < 1) + { + return E_SUCCESS; + } + + if (radiusX < 0 || radiusY < 0) + { + return E_SYSTEM; + } + + // Exception handling for radiusX and radiusY + halfW = rectW >> 1; + halfH = rectH >> 1; + + if (radiusX > halfW) + { + radiusX = halfW; + } + + if (radiusY > halfH) + { + radiusY = halfH; + } + + endX = rectX + rectW; + endY = rectY + rectH; + + // Fill + if (!radiusX || !radiusY || rectW == 1 || rectH == 1) + { + if (bufInfo.isClipBoundsSet) + { + int x1 = rectX; + int y1 = rectY; + int x2 = x1 + rectW; + int y2 = y1 + rectH; + + x1 = (x1 >= bufInfo.clipBounds.x) ? x1 : bufInfo.clipBounds.x; + y1 = (y1 >= bufInfo.clipBounds.y) ? y1 : bufInfo.clipBounds.y; + + x2 = (x2 <= bufInfo.clipBounds.x + bufInfo.clipBounds.width) ? x2 : bufInfo.clipBounds.x + bufInfo.clipBounds.width; + y2 = (y2 <= bufInfo.clipBounds.y + bufInfo.clipBounds.height) ? y2 : bufInfo.clipBounds.y + bufInfo.clipBounds.height; + + rectX = x1; + rectY = y1; + rectW = x2 - x1; + rectH = y2 - y1; + } + + if (rectW > 0 && rectH > 0) + { + if (bufInfo.bitsPerPixel == 32) + { + _Util::ScratchPad rect((unsigned long*) bufInfo.pPixels, bufInfo.width, bufInfo.height, bufInfo.pixelPerLine); + + rect.RegisterFillRect(_RasterOp::FnFillRectAlpha32Bit); + + { + rect.FillRect(rectX, rectY, rectW, rectH, bufInfo.color32); + } + + rect.RegisterFillRect(null); + } + else + { + // To do 16 bpp + return E_SYSTEM; + } + } + } + else + { + int boxW; + int boxH; + + // Arc info + arcW = radiusX << 1; + arcH = radiusY << 1; + + if (arcW <= 0) + { + arcW = 1; + } + + if (arcH <= 0) + { + arcH = 1; + } + + // Rectangle info + boxW = rectW - arcW; + boxH = rectH - arcH; + + if (boxW > 0 || boxH > 0) + { + if (boxW <= 0) + { + boxW = 0; + //boxW = 1; + } + + if (boxH <= 0) + { + boxH = 0; + //boxH = 1; + } + + if (bufInfo.bitsPerPixel == 32) + { + _Util::ScratchPad scratchPad((unsigned long*) bufInfo.pPixels, bufInfo.width, bufInfo.height, bufInfo.pixelPerLine); + + if (!bufInfo.isClipBoundsSet) + { + scratchPad.RegisterFillRect(_RasterOp::FnFillRectAlpha32Bit); + + { + scratchPad.FillRect(rectX + radiusX, rectY, boxW, rectH, bufInfo.color32); + scratchPad.FillRect(rectX, rectY + radiusY, radiusX, boxH, bufInfo.color32); + scratchPad.FillRect(rectX + rectW - radiusX, rectY + radiusY, radiusX, boxH, bufInfo.color32); + } + + scratchPad.RegisterFillRect(null); + } + else + { + _Util::Rectangle clip = { bufInfo.clipBounds.x, bufInfo.clipBounds.y, bufInfo.clipBounds.width, bufInfo.clipBounds.height }; + _Util::Rectangle rect1 = { rectX + radiusX, rectY, boxW, rectH }; + _Util::Rectangle rect2 = { rectX, rectY + radiusY, radiusX, boxH }; + _Util::Rectangle rect3 = { rectX + rectW - radiusX, rectY + radiusY, radiusX, boxH }; + + _FillRectangleWithClip32(&scratchPad, bufInfo.color32, rect1, clip); + _FillRectangleWithClip32(&scratchPad, bufInfo.color32, rect2, clip); + _FillRectangleWithClip32(&scratchPad, bufInfo.color32, rect3, clip); + } + + _CanvasArc arc; + arc.SetLineWidth(__lineWidth); + + arc.DrawArc(rectX, rectY, arcW + 1, arcH + 1, 89, 180, ARC_STYLE_FILLED_PIE, bufInfo); + arc.DrawArc(endX - arcW, rectY, arcW + 1, arcH + 1, 0, 91, ARC_STYLE_FILLED_PIE, bufInfo); + arc.DrawArc(rectX, endY - arcH, arcW + 1, arcH + 1, 180, 271, ARC_STYLE_FILLED_PIE, bufInfo); + arc.DrawArc(endX - arcW, endY - arcH, arcW + 1, arcH + 1, 269, 360, ARC_STYLE_FILLED_PIE, bufInfo); + } + else + { + // To do 16 bpp + return E_SYSTEM; + } + } + else + { + if (bufInfo.bitsPerPixel == 32) + { + _CanvasEllipse ellipse; + ellipse.SetLineWidth(__lineWidth); + ellipse.FillElliepse(rectX, rectY, rectW, rectH, bufInfo); + } + else + { + // To do 16 bpp + return E_SYSTEM; + } + } + } + + return E_SUCCESS; +} + +bool +_CanvasRoundRect::__Draw32BitsRoundRect(int rectX, int rectY, int rectW, int rectH, int radiusX, int radiusY, const _GpBufferInfo& bufInfo) +{ + int dx; + int dy; + float rx; + float ry; + float centerX; + float centerY; + int n; + int i; + + _GpFloatPoint* pEllipsePoint = null; + _GpFloatPoint* pEpNormal = null; + _CanvasLine line; + + line.SetLineWidth(__lineWidth); + + dx = (radiusX * 2 + 1) % 2; + dy = (radiusY * 2 + 1) % 2; + + rx = (float) (radiusX - dx); + ry = (float) (radiusY - dy); + + if (dx) + { + rx += 0.5f; + } + + if (dy) + { + ry += 0.5f; + } + + if (__lineWidth < 2) + { + _GpFloatPoint* pEllipsePoint1 = null; + _GpFloatPoint* pEllipsePoint2 = null; + _GpFloatPoint* pEllipsePoint3 = null; + _GpFloatPoint* pEllipsePoint4 = null; + _GpPoint* pPoints = null; + + int totalCount; + int n1; + int n2; + int n3; + int n4; + int index = 0; + + // left up corner + centerX = (float) (rectX) + rx; + centerY = (float) (rectY) + ry; + + n1 = __MakeEllipseArcPointArrayForRoundRectN(&pEllipsePoint1, null, centerX, centerY, rx, ry, 91, 180, 0); + + if (n1 < 2) + { + SysLog(NID_GRP, "__Draw32BitsRoundRect: __MakeEllipseArcPointArrayForRoundRectN is failed - 1!\n"); + + delete[] pEllipsePoint1; + + return false; + } + + // left bottom corner + centerX = (float) (rectX) + rx; + centerY = (float) (rectY + rectH - 1) - ry; + + n2 = __MakeEllipseArcPointArrayForRoundRectN(&pEllipsePoint2, null, centerX, centerY, rx, ry, 181, 270, 0); + + if (n2 < 2) + { + SysLog(NID_GRP, "__Draw32BitsRoundRect: __MakeEllipseArcPointArrayForRoundRectN is failed - 2!\n"); + + delete[] pEllipsePoint1; + delete[] pEllipsePoint2; + + return false; + } + + // right bottom corner + centerX = (float) (rectX + rectW - 1) - rx; + centerY = (float) (rectY + rectH - 1) - ry; + + n3 = __MakeEllipseArcPointArrayForRoundRectN(&pEllipsePoint3, null, centerX, centerY, rx, ry, 271, 360, 0); + + if (n3 < 2) + { + SysLog(NID_GRP, "__Draw32BitsRoundRect: __MakeEllipseArcPointArrayForRoundRectN is failed - 3!\n"); + + delete[] pEllipsePoint1; + delete[] pEllipsePoint2; + delete[] pEllipsePoint3; + + return false; + } + + // right up corner + centerX = (float) (rectX + rectW - 1) - rx; + centerY = (float) (rectY) + ry; + + n4 = __MakeEllipseArcPointArrayForRoundRectN(&pEllipsePoint4, null, centerX, centerY, rx, ry, 1, 90, 0); + + if (n4 < 2) + { + SysLog(NID_GRP, "__Draw32BitsRoundRect: __MakeEllipseArcPointArrayForRoundRectN is failed - 4!\n"); + + delete[] pEllipsePoint1; + delete[] pEllipsePoint2; + delete[] pEllipsePoint3; + delete[] pEllipsePoint4; + + return false; + } + + if (pEllipsePoint1 == null || pEllipsePoint2 == null || pEllipsePoint3 == null || pEllipsePoint4 == null) + { + SysLog(NID_GRP, "__Draw32BitsRoundRect: pEllipsePoint is invalid\n"); + + delete[] pEllipsePoint1; + delete[] pEllipsePoint2; + delete[] pEllipsePoint3; + delete[] pEllipsePoint4; + + return false; + } + + totalCount = n1 + n2 + n3 + n4; + pPoints = new (std::nothrow) _GpPoint[totalCount]; + + if (pPoints == null) + { + SysLog(NID_GRP, "__Draw32BitsRoundRect: Memory allocation is failed!\n"); + + delete[] pEllipsePoint1; + delete[] pEllipsePoint2; + delete[] pEllipsePoint3; + delete[] pEllipsePoint4; + + return false; + } + + for (i = 0; i < n1; i++) + { + pPoints[index].x = (int) pEllipsePoint1[i].fx; + pPoints[index].y = (int) pEllipsePoint1[i].fy; + index++; + } + + for (i = 0; i < n2; i++) + { + pPoints[index].x = (int) pEllipsePoint2[i].fx; + pPoints[index].y = (int) pEllipsePoint2[i].fy; + index++; + } + + for (i = 0; i < n3; i++) + { + pPoints[index].x = (int) pEllipsePoint3[i].fx; + pPoints[index].y = (int) pEllipsePoint3[i].fy; + index++; + } + + for (i = 0; i < n4; i++) + { + pPoints[index].x = (int) pEllipsePoint4[i].fx; + pPoints[index].y = (int) pEllipsePoint4[i].fy; + index++; + } + + line._DrawPolyLine(totalCount, pPoints, true, bufInfo); + + delete[] pEllipsePoint1; + delete[] pEllipsePoint2; + delete[] pEllipsePoint3; + delete[] pEllipsePoint4; + + delete[] pPoints; + } + else + { + bool result = false; + float wl; + float wr; + float ox; + float oy; + + _GpPolygon* pPolygon = null; + _GpPoint* pTempPoints = null; + _GpVertex* pVertex = null; + Point firstPoint; + Point lastPoint; + _GpFloatPoint firstNormal; + _GpFloatPoint lastNormal; + _CanvasArc arc; + + arc.SetLineWidth(__lineWidth); + + pPolygon = new (std::nothrow) _GpPolygon; + + if (pPolygon == null) + { + SysLog(NID_GRP, "__Draw32BitsRoundRect: _GpPolygon Memory allocation is failed!\n"); + + return false; + } + + arc._CalcLeftRightWidth(&wl, &wr); + + // left up corner + centerX = (float) rectX + rx; + centerY = (float) rectY + ry; + + n = __MakeEllipseArcPointArrayForRoundRectN(&pEllipsePoint, &pEpNormal, centerX, centerY, rx, ry, 91, 180, 0); + + if (n < 2 || pEllipsePoint == null || pEpNormal == null) + { + SysLog(NID_GRP, "__Draw32BitsRoundRect: _GpPolygon __MakeEllipseArcPointArrayForRoundRect is failed!\n"); + line._FreePolygon(pPolygon); + + delete[] pEllipsePoint; + delete[] pEpNormal; + + return false; + } + + for (i = 0; i < n; i++) + { + result = line._AddPolygonVertex(pPolygon, (int) (pEllipsePoint[i].fx - (pEpNormal[i].fx * wl)), (int) (pEllipsePoint[i].fy - (pEpNormal[i].fy * wl)), 0); + + if (!result) + { + SysLog(NID_GRP, "__Draw32BitsRoundRect: _AddPolygonVertex is failed!\n"); + line._FreePolygon(pPolygon); + + delete[] pEllipsePoint; + delete[] pEpNormal; + + return false; + } + + result = line._AddPolygonVertex(pPolygon, (int) (pEllipsePoint[i].fx + (pEpNormal[i].fx * wr)), (int) (pEllipsePoint[i].fy + (pEpNormal[i].fy * wr)), 1); + + if (!result) + { + SysLog(NID_GRP, "__Draw32BitsRoundRect: _AddPolygonVertex is failed!\n"); + line._FreePolygon(pPolygon); + + delete[] pEllipsePoint; + delete[] pEpNormal; + + return false; + } + } + + firstPoint.x = (int) pEllipsePoint[0].fx; + firstPoint.y = (int) pEllipsePoint[0].fy; + firstNormal.fx = pEpNormal[0].fx; + firstNormal.fy = pEpNormal[0].fy; + + lastPoint.x = (int) pEllipsePoint[n - 1].fx; + lastPoint.y = (int) pEllipsePoint[n - 1].fy; + lastNormal.fx = pEpNormal[n - 1].fx; + lastNormal.fy = pEpNormal[n - 1].fy; + + delete[] pEllipsePoint; + pEllipsePoint = null; + + delete[] pEpNormal; + pEpNormal = null; + + // left bottom corner + centerX = (float) rectX + rx; + centerY = (float) (rectY + rectH - 1) - ry; + + n = __MakeEllipseArcPointArrayForRoundRectN(&pEllipsePoint, &pEpNormal, centerX, centerY, rx, ry, 181, 270, 0); + + if (n < 2 || pEllipsePoint == null || pEpNormal == null) + { + SysLog(NID_GRP, "__Draw32BitsRoundRect:__MakeEllipseArcPointArrayForRoundRect is failed!\n"); + line._FreePolygon(pPolygon); + + delete[] pEllipsePoint; + delete[] pEpNormal; + + return false; + } + + _GpPoint pt1 = { lastPoint.x, lastPoint.y }; + _GpPoint pt2 = { (int) pEllipsePoint[0].fx, (int) pEllipsePoint[0].fy }; + + line._GetOrientationUnitVector(pt1, pt2, &ox, &oy); + + result = line._PatchJoint(pPolygon, lastPoint.x, lastPoint.y, lastNormal.fy, -lastNormal.fx, ox, oy); + + if (!result) + { + SysLog(NID_GRP, "__Draw32BitsRoundRect: _PatchJoint is failed - 1!\n"); + line._FreePolygon(pPolygon); + + delete[] pEllipsePoint; + delete[] pEpNormal; + + return false; + } + + result = line._PatchJoint(pPolygon, (int) pEllipsePoint[0].fx, (int) pEllipsePoint[0].fy, ox, oy, pEpNormal[0].fy, -pEpNormal[0].fx); + + if (!result) + { + SysLog(NID_GRP, "__Draw32BitsRoundRect: _PatchJoint is failed - 2!\n"); + line._FreePolygon(pPolygon); + + delete[] pEllipsePoint; + delete[] pEpNormal; + + return false; + } + + for (i = 0; i < n; i++) + { + result = line._AddPolygonVertex(pPolygon, (int) (pEllipsePoint[i].fx - (pEpNormal[i].fx * wl)), (int) (pEllipsePoint[i].fy - (pEpNormal[i].fy * wl)), 0); + + if (!result) + { + SysLog(NID_GRP, "__Draw32BitsRoundRect: _AddPolygonVertex is failed - 3!\n"); + line._FreePolygon(pPolygon); + + delete[] pEllipsePoint; + delete[] pEpNormal; + + return false; + } + + result = line._AddPolygonVertex(pPolygon, (int) (pEllipsePoint[i].fx + (pEpNormal[i].fx * wr)), (int) (pEllipsePoint[i].fy + (pEpNormal[i].fy * wr)), 1); + + if (!result) + { + SysLog(NID_GRP, "__Draw32BitsRoundRect: _AddPolygonVertex is failed - 4!\n"); + line._FreePolygon(pPolygon); + + delete[] pEllipsePoint; + delete[] pEpNormal; + + return false; + } + } + + lastPoint.x = (int) pEllipsePoint[n - 1].fx; + lastPoint.y = (int) pEllipsePoint[n - 1].fy; + lastNormal.fx = pEpNormal[n - 1].fx; + lastNormal.fy = pEpNormal[n - 1].fy; + + delete[] pEllipsePoint; + pEllipsePoint = null; + + delete[] pEpNormal; + pEpNormal = null; + + // right bottom corner + centerX = (float) (rectX + rectW - 1) - rx; + centerY = (float) (rectY + rectH - 1) - ry; + + n = __MakeEllipseArcPointArrayForRoundRectN(&pEllipsePoint, &pEpNormal, centerX, centerY, rx, ry, 271, 360, 0); + + if (n < 2 || pEllipsePoint == null || pEpNormal == null) + { + SysLog(NID_GRP, "__Draw32BitsRoundRect: __MakeEllipseArcPointArrayForRoundRectN is failed!\n"); + line._FreePolygon(pPolygon); + + delete[] pEllipsePoint; + delete[] pEpNormal; + + return false; + } + + pt1.x = lastPoint.x; + pt1.y = lastPoint.y; + pt2.x = (int) pEllipsePoint[0].fx; + pt2.y = (int) pEllipsePoint[0].fy; + + line._GetOrientationUnitVector(pt1, pt2, &ox, &oy); + + result = line._PatchJoint(pPolygon, lastPoint.x, lastPoint.y, lastNormal.fy, -lastNormal.fx, ox, oy); + + if (!result) + { + SysLog(NID_GRP, "__Draw32BitsRoundRect: _PatchJoint is failed - 3!\n"); + line._FreePolygon(pPolygon); + + delete[] pEllipsePoint; + delete[] pEpNormal; + + return false; + } + + result = line._PatchJoint(pPolygon, (int) pEllipsePoint[0].fx, (int) pEllipsePoint[0].fy, ox, oy, pEpNormal[0].fy, -pEpNormal[0].fx); + + if (!result) + { + SysLog(NID_GRP, "__Draw32BitsRoundRect: _PatchJoint is failed - 4!\n"); + line._FreePolygon(pPolygon); + + delete[] pEllipsePoint; + delete[] pEpNormal; + + return false; + } + + for (i = 0; i < n; i++) + { + result = line._AddPolygonVertex(pPolygon, (int) (pEllipsePoint[i].fx - (pEpNormal[i].fx * wl)), (int) (pEllipsePoint[i].fy - (pEpNormal[i].fy * wl)), 0); + + if (!result) + { + SysLog(NID_GRP, "__Draw32BitsRoundRect: _AddPolygonVertex is failed - 5!\n"); + line._FreePolygon(pPolygon); + + delete[] pEllipsePoint; + delete[] pEpNormal; + + return false; + } + + result = line._AddPolygonVertex(pPolygon, (int) (pEllipsePoint[i].fx + (pEpNormal[i].fx * wr)), (int) (pEllipsePoint[i].fy + (pEpNormal[i].fy * wr)), 1); + + if (!result) + { + SysLog(NID_GRP, "__Draw32BitsRoundRect: _AddPolygonVertex is failed - 6!\n"); + line._FreePolygon(pPolygon); + + delete[] pEllipsePoint; + delete[] pEpNormal; + + return false; + } + } + + lastPoint.x = (int) pEllipsePoint[n - 1].fx; + lastPoint.y = (int) pEllipsePoint[n - 1].fy; + lastNormal.fx = pEpNormal[n - 1].fx; + lastNormal.fy = pEpNormal[n - 1].fy; + + delete[] pEllipsePoint; + pEllipsePoint = null; + + delete[] pEpNormal; + pEpNormal = null; + + // right up corner + centerX = (float) (rectX + rectW - 1) - rx; + centerY = (float) rectY + ry; + + n = __MakeEllipseArcPointArrayForRoundRectN(&pEllipsePoint, &pEpNormal, centerX, centerY, rx, ry, 1, 90, 0); + + if (n < 2 || pEllipsePoint == null || pEpNormal == null) + { + SysLog(NID_GRP, "__Draw32BitsRoundRect: __MakeEllipseArcPointArrayForRoundRectN is failed!\n"); + line._FreePolygon(pPolygon); + + delete[] pEllipsePoint; + delete[] pEpNormal; + + return false; + } + + pt1.x = lastPoint.x; + pt1.y = lastPoint.y; + pt2.x = (int) pEllipsePoint[0].fx; + pt2.y = (int) pEllipsePoint[0].fy; + + line._GetOrientationUnitVector(pt1, pt2, &ox, &oy); + + result = line._PatchJoint(pPolygon, lastPoint.x, lastPoint.y, lastNormal.fy, -lastNormal.fx, ox, oy); + + if (!result) + { + SysLog(NID_GRP, "__Draw32BitsRoundRect: _PatchJoint is failed - 5!\n"); + line._FreePolygon(pPolygon); + + delete[] pEllipsePoint; + delete[] pEpNormal; + + return false; + } + + result = line._PatchJoint(pPolygon, (int) pEllipsePoint[0].fx, (int) pEllipsePoint[0].fy, ox, oy, pEpNormal[0].fy, -pEpNormal[0].fx); + + if (!result) + { + SysLog(NID_GRP, "__Draw32BitsRoundRect: _PatchJoint is failed - 6!\n"); + line._FreePolygon(pPolygon); + + delete[] pEllipsePoint; + delete[] pEpNormal; + + return false; + } + + for (i = 0; i < n; i++) + { + result = line._AddPolygonVertex(pPolygon, (int) (pEllipsePoint[i].fx - (pEpNormal[i].fx * wl)), (int) (pEllipsePoint[i].fy - (pEpNormal[i].fy * wl)), 0); + + if (!result) + { + SysLog(NID_GRP, "__Draw32BitsRoundRect: _AddPolygonVertex is failed - 7!\n"); + line._FreePolygon(pPolygon); + + delete[] pEllipsePoint; + delete[] pEpNormal; + + return false; + } + + result = line._AddPolygonVertex(pPolygon, (int) (pEllipsePoint[i].fx + (pEpNormal[i].fx * wr)), (int) (pEllipsePoint[i].fy + (pEpNormal[i].fy * wr)), 1); + + if (!result) + { + SysLog(NID_GRP, "__Draw32BitsRoundRect: _AddPolygonVertex is failed - 8!\n"); + line._FreePolygon(pPolygon); + + delete[] pEllipsePoint; + delete[] pEpNormal; + + return false; + } + } + + lastPoint.x = (int) pEllipsePoint[n - 1].fx; + lastPoint.y = (int) pEllipsePoint[n - 1].fy; + lastNormal.fx = pEpNormal[n - 1].fx; + lastNormal.fy = pEpNormal[n - 1].fy; + + delete[] pEllipsePoint; + pEllipsePoint = null; + + delete[] pEpNormal; + pEpNormal = null; + + pt1.x = lastPoint.x; + pt1.y = lastPoint.y; + pt2.x = firstPoint.x; + pt2.y = firstPoint.y; + + line._GetOrientationUnitVector(pt1, pt2, &ox, &oy); + + result = line._PatchJoint(pPolygon, lastPoint.x, lastPoint.y, lastNormal.fy, -lastNormal.fx, ox, oy); + + if (!result) + { + SysLog(NID_GRP, "__Draw32BitsRoundRect: _PatchJoint is failed - 7!\n"); + line._FreePolygon(pPolygon); + + return false; + } + + result = line._PatchJoint(pPolygon, firstPoint.x, firstPoint.y, ox, oy, firstNormal.fy, -firstNormal.fx); + + if (!result) + { + SysLog(NID_GRP, "__Draw32BitsRoundRect: _PatchJoint is failed - 8!\n"); + line._FreePolygon(pPolygon); + + return false; + } + + // Add last vertices + result = line._AddPolygonVertex(pPolygon, (int) (firstPoint.x - (firstNormal.fx * wl)), (int) (firstPoint.y - (firstNormal.fy * wl)), 0); + + if (!result) + { + SysLog(NID_GRP, "__Draw32BitsRoundRect: _AddPolygonVertex is failed - 9!\n"); + line._FreePolygon(pPolygon); + + return false; + } + + result = line._AddPolygonVertex(pPolygon, (int) (firstPoint.x + (firstNormal.fx * wr)), (int) (firstPoint.y + (firstNormal.fy * wr)), 1); + + if (!result) + { + SysLog(NID_GRP, "__Draw32BitsRoundRect: _AddPolygonVertex is failed - 10!\n"); + line._FreePolygon(pPolygon); + + return false; + } + + pTempPoints = new (std::nothrow) _GpPoint[pPolygon->n]; + + if (pTempPoints == null) + { + SysLog(NID_GRP, "__Draw32BitsRoundRect: pTempPoints Memory allocation is failed!\n"); + line._FreePolygon(pPolygon); + + return false; + } + + for (i = 0, pVertex = pPolygon->pFirst; pVertex != null; i++, pVertex = pVertex->pNext) + { + pTempPoints[i].x = pVertex->point.x; + pTempPoints[i].y = pVertex->point.y; + } + + line._FillPolygon(pPolygon->n, pTempPoints, false, bufInfo); + + line._FreePolygon(pPolygon); + + delete[] pTempPoints; + } + + return true; +} + +int +_CanvasRoundRect::__MakeEllipseArcPointArrayForRoundRectN(_GpFloatPoint** pPoint, _GpFloatPoint** pNorm, float x, float y, float w, float h, int a1, int a2, int rot) const +{ + const float one_deg = 0.01745329251994329576f; + + int i; + int ptCount; + float degree1; + float degree2; + float r; + float r1; + float r2; + float t1x; + float t1y; + float len; + float sinR; + float cosR; + float t2x; + float t2y; + float r90; + float r180; + float r270; + bool isEnd; + _CanvasLine line; + + line.SetLineWidth(__lineWidth); + + rot = ((-rot) % 360 + 360) % 360; + + degree1 = (float) a1; + degree2 = (float) a2; + + r1 = (float) atan2(w * sin(_GP_DEGREE2RADIAN(degree1)), h * cos(_GP_DEGREE2RADIAN(degree1))); + r2 = (float) atan2(w * sin(_GP_DEGREE2RADIAN(degree2)), h * cos(_GP_DEGREE2RADIAN(degree2))); + + // removed a next line, in order to draw Circle + // if (r1 == r2) + // return 0; + + while (r1 < 0) + { + r1 = r1 + 2 * _PI; + } + + while (r2 - 0.001f <= r1) + { + r2 = r2 + 2 * _PI; + } + + ptCount = (int) ((r2 - r1) / one_deg) + 2; + + *pPoint = new (std::nothrow) _GpFloatPoint[ptCount]; + + if (!*pPoint) + { + SysLog(NID_GRP, "MakeEllipseArcPointArrayForRoundRect: Memory allocation is failed -1!\n"); + + return 0; + } + + if (pNorm != null) + { + *pNorm = new (std::nothrow) _GpFloatPoint[ptCount]; + + if (!*pNorm) + { + SysLog(NID_GRP, "MakeEllipseArcPointArrayForRoundRect: Memory allocation is failed - 2!\n"); + delete[] *pPoint; + + return 0; + } + } + + r90 = _GP_DEGREE2RADIAN(90.0f); + r180 = _GP_DEGREE2RADIAN(180.0f); + r270 = _GP_DEGREE2RADIAN(270.0f); + + for (r = r1, i = 0, isEnd = false; i < ptCount; r += one_deg, i++) + { + if (r > r2) + { + r = r2; + isEnd = true; + } + + sinR = (float) sin(r); + cosR = (float) cos(r); + + t1x = w * cosR; + t1y = -h * sinR; + + line._Rotate2DPoint(t1x, t1y, rot, &t2x, &t2y); + + if (r < r90) + { + (*pPoint)[i].fx = x + t2x - 0.5f; + (*pPoint)[i].fy = y + t2y + 0.5f; + } + else if (r < r180) + { + (*pPoint)[i].fx = x + t2x + 0.5f; + (*pPoint)[i].fy = y + t2y + 0.5f; + } + else if (r < r270) + { + (*pPoint)[i].fx = x + t2x + 0.5f; + (*pPoint)[i].fy = y + t2y - 0.5f; + } + else + { + (*pPoint)[i].fx = x + t2x - 0.5f; + (*pPoint)[i].fy = y + t2y - 0.5f; + } + + if (pNorm != null) + { + t1x = h * cosR; + t1y = -w * sinR; + + len = (float) sqrt(t1x * t1x + t1y * t1y); + + if (_IsEqual(len, 0.0f)) + { + i--; + ptCount--; + continue; + } + + t1x = t1x / len; + t1y = t1y / len; + + line._Rotate2DPoint(t1x, t1y, rot, &t2x, &t2y); + + (*pNorm)[i].fx = t2x; + (*pNorm)[i].fy = t2y; + } + + if (isEnd) + { + ptCount = i + 1; + break; + } + } + + return ptCount; +} + +}} // Tizen::Graphics diff --git a/src/graphics/FGrp_CanvasGpTriangle.cpp b/src/graphics/FGrp_CanvasGpTriangle.cpp new file mode 100644 index 0000000..10abd43 --- /dev/null +++ b/src/graphics/FGrp_CanvasGpTriangle.cpp @@ -0,0 +1,242 @@ +// +// 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_CanvasGpTriangle.cpp + * @brief This is the implementation file for _CanvasTriangle class. + * + */ + +#include + +#include "FGrp_CanvasGpPrimitive.h" + + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + + +namespace Tizen { namespace Graphics +{ + +namespace // unnamed +{ + +const int _TRIANGLE_MULTIFIER = 8; + +} + +bool +_CanvasTriangle::SetLineWidth(int lineWidth) +{ + __lineWidth = lineWidth; + + return true; +} + +int +_CanvasTriangle::GetLineWidth(void) const +{ + return __lineWidth; +} + +result +_CanvasTriangle::DrawTriangle(const _GpPoint& point1, const _GpPoint& point2, const _GpPoint& point3, const _GpBufferInfo& bufInfo) +{ + _CanvasLine line; + bool ret = false; + _GpPoint points[3]; + + points[0] = point1; + points[1] = point2; + points[2] = point3; + + ret = line._DrawPolyLine(3, points, true, bufInfo); + + return (ret ? E_SUCCESS : E_SYSTEM); +} + +result +_CanvasTriangle::FillTriangle(int vertexX1, int vertexY1, int vertexX2, int vertexY2, int vertexX3, int vertexY3, const _GpBufferInfo& bufInfo) const +{ + int xn; + int ratio; + + if (vertexY3 < vertexY1) + { + GP_SWAP(vertexY1, vertexY3); + GP_SWAP(vertexX1, vertexX3); + } + + if (vertexY2 < vertexY1) + { + GP_SWAP(vertexY1, vertexY2); + GP_SWAP(vertexX1, vertexX2); + } + + if (vertexY3 < vertexY2) + { + GP_SWAP(vertexY2, vertexY3); + GP_SWAP(vertexX2, vertexX3); + } + + if ((vertexY2 != vertexY1) && (vertexY3 != vertexY1) && (vertexY3 != vertexY2)) + { + ratio = ((vertexY2 - vertexY1) << _TRIANGLE_MULTIFIER) / (vertexY3 - vertexY1); + xn = (((vertexX3 - vertexX1) * ratio) >> _TRIANGLE_MULTIFIER) + vertexX1; + + if (xn < vertexX2) + { + if (!__FillTriangleEx(vertexX1, vertexY1, xn, vertexY2, vertexX2, vertexY2, bufInfo)) + { + SysLog(NID_GRP, "FilledTriangle: __FilledTriangleEX() is failed!\n"); + + return E_SYSTEM; + } + if (!__FillTriangleEx(vertexX3, vertexY3, vertexX2, vertexY2 + 1, xn, vertexY2 + 1, bufInfo)) + { + SysLog(NID_GRP, "FilledTriangle: __FilledTriangleEX() is failed!\n"); + + return E_SYSTEM; + } + } + else + { + if (!__FillTriangleEx(vertexX1, vertexY1, vertexX2, vertexY2, xn, vertexY2, bufInfo)) + { + SysLog(NID_GRP, "FilledTriangle: __FilledTriangleEX() is failed!\n"); + + return E_SYSTEM; + } + if (!__FillTriangleEx(vertexX3, vertexY3, vertexX2, vertexY2 + 1, xn, vertexY2 + 1, bufInfo)) + { + SysLog(NID_GRP, "FilledTriangle: __FilledTriangleEX() is failed!\n"); + + return E_SYSTEM; + } + } + } + else if (vertexY1 == vertexY2) + { + if (vertexX1 < vertexX2) + { + if (!__FillTriangleEx(vertexX3, vertexY3, vertexX2, vertexY2, vertexX1, vertexY2, bufInfo)) + { + SysLog(NID_GRP, "FilledTriangle: __FilledTriangleEX() is failed!\n"); + + return E_SYSTEM; + } + } + else + { + if (!__FillTriangleEx(vertexX3, vertexY3, vertexX1, vertexY2, vertexX2, vertexY2, bufInfo)) + { + SysLog(NID_GRP, "FilledTriangle: __FilledTriangleEX() is failed!\n"); + + return E_SYSTEM; + } + } + } + else // if (vertexY2 == vertexY3) // Condition "vertexY2 == vertexY3" always evaluates to true + { + if (vertexX2 < vertexX3) + { + if (!__FillTriangleEx(vertexX1, vertexY1, vertexX2, vertexY2, vertexX3, vertexY2, bufInfo)) + { + SysLog(NID_GRP, "FilledTriangle: __FilledTriangleEX() is failed!\n"); + + return E_SYSTEM; + } + } + else + { + if (!__FillTriangleEx(vertexX1, vertexY1, vertexX3, vertexY2, vertexX2, vertexY2, bufInfo)) + { + SysLog(NID_GRP, "FilledTriangle: __FilledTriangleEX() is failed!\n"); + + return E_SYSTEM; + } + } + } + + return E_SUCCESS; +} + +bool +_CanvasTriangle::__FillTriangleEx(int x1, int y1, int x2, int y2, int x3, int y3, const _GpBufferInfo& bufInfo) const +{ + int dxLeft; + int dxRight; + int curLeft; + int curRight; + int height = y2 - y1; + int y; + _CanvasLine line; + + // Check height + if (height == 0) + { + return true; + } + + line.SetLineWidth(__lineWidth); + + if (x2 > x3) + { + GP_SWAP(x2, x3); + } + + dxLeft = ((x2 - x1) << _TRIANGLE_MULTIFIER) / height; + dxRight = ((x3 - x1) << _TRIANGLE_MULTIFIER) / height; + + curLeft = curRight = (x1 << _TRIANGLE_MULTIFIER); + + if (y1 < y2) + { + for (y = y1; y <= y2; y++) + { + if (line._DrawUnitLineHorizontalWithClipping(curLeft >> _TRIANGLE_MULTIFIER, curRight >> _TRIANGLE_MULTIFIER, y, bufInfo) == GP_RESULT_FAIL) + { + SysLog(NID_GRP, "__FilledTriangleEX: _DrawUnitLineHorizontal() is failed!\n"); + + return false; + } + + curLeft += dxLeft; + curRight += dxRight; + } + } + else + { + for (y = y1; y >= y2; y--) + { + if (line._DrawUnitLineHorizontalWithClipping(curLeft >> _TRIANGLE_MULTIFIER, curRight >> _TRIANGLE_MULTIFIER, y, bufInfo) == GP_RESULT_FAIL) + { + SysLog(NID_GRP, "__FilledTriangleEX: _DrawUnitLineHorizontal() is failed!\n"); + + return false; + } + + curLeft -= dxLeft; + curRight -= dxRight; + } + } + + return true; +} + +}} // Tizen::Graphics diff --git a/src/graphics/FGrp_CanvasImpl.cpp b/src/graphics/FGrp_CanvasImpl.cpp new file mode 100644 index 0000000..cdaf16a --- /dev/null +++ b/src/graphics/FGrp_CanvasImpl.cpp @@ -0,0 +1,3260 @@ +// +// 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_CanvasImpl.cpp + * @brief This is the implementation file for _CanvasImpl class. + * + */ + +#include +#include + +#include + +#include + +#include "FGrp_BufferInfoImpl.h" +#include "FGrp_Callback.h" +#include "FGrp_CanvasImpl.h" +#include "FGrp_BitmapUtil.h" +#include "FGrp_Bitmap.h" +#include "FGrp_CanvasCoordHolder.h" +#include "FGrp_Canvas.h" +#include "FGrp_CanvasImplPrivate.h" +#include "FGrp_FontUtil.h" +#include "FGrp_EnrichedTextImpl.h" +#include "util/FGrp_Util.h" +#include "FGrp_TextTextObject.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; + + +#define EXTRACT_CANVASEX(pVar, canvas) Tizen::Graphics::_Canvas * pVar = canvas._pNativeCanvas +#define EXTRACT_BITMAPEX(pVar, bitmap) Tizen::Graphics::_Bitmap * pVar = Tizen::Graphics::_GetBitmapEx(bitmap) +#define EXTRACT_FONTEX(pVar, font) Tizen::Graphics::_Font * pVar = Tizen::Graphics::_GetFontEx(font) +#define EXTRACT_SCALED_BITMAPEX(pVar, bitmap) Tizen::Graphics::_Bitmap * pVar = Tizen::Graphics::_GetScaledBitmapEx(bitmap) + +#define IsSucceeded(X) (!IsFailed(X)) + +#define INSTANCE_IS_VALID (this && (this->_pNativeCanvas && this->_pNativeCanvas->IsValid())) +#define CANVAS_IS_VALID(canvas) (&canvas && (canvas._pNativeCanvas && canvas._pNativeCanvas->IsValid())) + +#define BITMAP_IS_VALID(bitmap) (&bitmap && const_cast<_BitmapImpl*>(&bitmap)->__CheckValidity()) + + +namespace // unnamed +{ + +// retrieving bounds rectangle which has (0,0,w,h). +Tizen::Graphics::Rectangle +_GetBoundsRel(const Tizen::Graphics::_CanvasImpl& canvas) +{ + Tizen::Graphics::Rectangle rect = canvas.GetBounds(); + rect.x = 0; + rect.y = 0; + + return rect; +} + +Tizen::Graphics::FloatRectangle +_GetBoundsRelF(const Tizen::Graphics::_CanvasImpl& canvas) +{ + Tizen::Graphics::FloatRectangle rectF = canvas.GetBoundsF(); + rectF.x = 0.0f; + rectF.y = 0.0f; + + return rectF; +} + +template +void +_ExpandClippingAreaForLineWidth(Tizen::Graphics::Rectangle& rtCanvas, T lineWidth) +{ + int lineWidthHalf = (lineWidth + 1) / 2; + + rtCanvas.x -= lineWidthHalf; + rtCanvas.y -= lineWidthHalf; + rtCanvas.width += lineWidthHalf * 2; + rtCanvas.height += lineWidthHalf * 2; +} + +} + +namespace Tizen { namespace Graphics { namespace _Util +{ + +template <> +inline Tizen::Graphics::Point Convert(const Tizen::Graphics::FloatPoint& point) +{ + return Tizen::Graphics::Point(int(point.x), int(point.y)); +} + +template <> +inline Tizen::Graphics::Rectangle Convert(const Tizen::Graphics::FloatRectangle& rect) +{ + return Tizen::Graphics::Rectangle(int(rect.x), int(rect.y), int(rect.width), int(rect.height)); +} + +template <> +_Util::Point* Convert*>(const Tizen::Base::Collection::IList& points) +{ + int count = points.GetCount(); + + std::unique_ptr<_Util::Point[]> pPointArray(new (std::nothrow) _Util::Point[count]); + + SysTryReturn(NID_GRP, pPointArray, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + { + for (int i = 0; i < count; i++) + { + const Tizen::Graphics::Point* pPoint = dynamic_cast (points.GetAt(i)); + + if (pPoint) + { + pPointArray[i].x = double(pPoint->x); + pPointArray[i].y = double(pPoint->y); + } + else + { + const Tizen::Graphics::FloatPoint* pFloatPoint = dynamic_cast (points.GetAt(i)); + + if (pFloatPoint) + { + pPointArray[i].x = double(pFloatPoint->x); + pPointArray[i].y = double(pFloatPoint->y); + } + else + { + return null; + } + } + } + } + + return pPointArray.release(); +} + +} // Tizen::Graphics::_Util + +}} // Tizen::Graphics + +//////////////////////////////////////////////////////////////////////////////// +// + +namespace Tizen { namespace Graphics +{ + +_CanvasImpl::_CanvasImpl(void) + : _magicKey(0) + , _pNativeCanvas(0) + , _pCoordHolder(0) + , _pFont(0) + , _pPriorityFont(0) + , _dashOffset(0) + , _pShowCallbackFunc(null) + , _pShowCallbackParam(null) +{ + _pNativeCanvas = new (std::nothrow) _Canvas; + _pCoordHolder = new (std::nothrow) _CanvasCoordHolder; + + if (_pNativeCanvas == null || _pCoordHolder == null) + { + delete _pCoordHolder; + delete _pNativeCanvas; + + _pCoordHolder = null; + _pNativeCanvas = null; + } + + _Util::CarveMagicKey(*this, _magicKey); +} + +_CanvasImpl::~_CanvasImpl(void) +{ + if (_pFont) + { + delete _pFont; + _pFont = 0; + } + + delete _pCoordHolder; + delete _pNativeCanvas; + + _Util::EraseMagicKey(*this, _magicKey); +} + +result +_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, "Memory allocation failed."); + + result r = this->_pNativeCanvas->Construct(); + + if (IsSucceeded(r)) + { + Rectangle pcRect = this->_pNativeCanvas->GetBounds(); + + _Util::Rectangle pcUtilRect = { pcRect.x, pcRect.y, pcRect.width, pcRect.height }; + + this->_pCoordHolder->ResetFromPc(pcUtilRect); + } + + return r; +} + +result +_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, "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, + vcRect.height); + + _Util::Rectangle vcUtilRect = { vcRect.x, vcRect.y, vcRect.width, vcRect.height }; + + this->_pCoordHolder->ResetFromVc(vcUtilRect); + + Rectangle pcRect = _ResUtil::ConvertToPhyCoord(vcRect); + + pcRect.width = this->_pCoordHolder->canvasSize.pcInt.w; + pcRect.height = this->_pCoordHolder->canvasSize.pcInt.h; + + return this->_pNativeCanvas->Construct(pcRect); +} + +result +_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, "Memory allocation failed."); + + SysTryReturnResult(NID_GRP, (bufferInfo.width > 0) && (bufferInfo.height > 0) && (bufferInfo.pitch > 0) + , E_INVALID_ARG + , "Invalid argument (BufferInfo::width = %d, BufferInfo::height = %d, BufferInfo::pitch = %d)" + , bufferInfo.width, bufferInfo.height, bufferInfo.pitch); + + SysTryReturnResult(NID_GRP, bufferInfo.bitsPerPixel > 0 + , E_INVALID_ARG + , "Invalid argument (BufferInfo::bitsPerPixel = %d)" + , bufferInfo.bitsPerPixel); + + SysTryReturnResult(NID_GRP, (bufferInfo.pixelFormat > PIXEL_FORMAT_MIN) && (bufferInfo.pixelFormat < PIXEL_FORMAT_MAX) + , E_INVALID_ARG + , "Invalid argument (BufferInfo::pixelFormat = %d)" + , bufferInfo.pixelFormat); + + SysTryReturnResult(NID_GRP, bufferInfo.bitsPerPixel == 32 + , E_UNSUPPORTED_FORMAT + , "Unsupported format (BufferInfo::bitsPerPixel = %d)" + , bufferInfo.bitsPerPixel); + + SysTryReturnResult(NID_GRP, bufferInfo.pixelFormat == PIXEL_FORMAT_ARGB8888 + , E_UNSUPPORTED_FORMAT + , "Unsupported format (BufferInfo::pixelFormat = %d)" + , bufferInfo.pixelFormat); + + if (bufferInfo.pPixels == null) + { + const _BufferInfoImpl* pBufferInfoImpl = _BufferInfoImpl::GetInstance(bufferInfo); + + if (pBufferInfoImpl) + { + Handle handle = pBufferInfoImpl->GetHandle(_BufferInfoImpl::HANDLE_TYPE_VE_SURFACE); + + if (handle != 0) // not INVALID_HANDLE + { + result r = this->Construct(handle); + + // OUT_OF_RANGE does not occur + SysTryReturn(NID_GRP, (r == E_SUCCESS) && this->IsConstructed(), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _Util::Rectangle pcUtilRect = { 0, 0, this->_pNativeCanvas->__pSurface->GetWidth(), this->_pNativeCanvas->__pSurface->GetHeight() }; + + this->_pCoordHolder->ResetFromPc(pcUtilRect); + + return E_SUCCESS; + } + } + + SysTryReturnResult(NID_GRP, false + , E_INVALID_ARG + , "Invalid argument (BufferInfo::pPixels = null)"); + } + else + { + result r = this->_pNativeCanvas->Construct(bufferInfo); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _Util::Rectangle pcUtilRect = { 0, 0, this->_pNativeCanvas->__pSurface->GetWidth(), this->_pNativeCanvas->__pSurface->GetHeight() }; + + this->_pCoordHolder->ResetFromPc(pcUtilRect); + + return E_SUCCESS; + } + + return E_SYSTEM; +} + +result +_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, "Memory allocation failed."); + + return this->_pNativeCanvas->Construct(windowHandle); +} + +result +_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, "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, + vcRect.height); + + _Util::Rectangle vcUtilRect = { vcRect.x, vcRect.y, vcRect.width, vcRect.height }; + + this->_pCoordHolder->ResetFromVc(vcUtilRect); + + Rectangle pcRect; + + pcRect.x = _ResUtil::ConvertToPhyCoord(vcRect.x); + pcRect.y = _ResUtil::ConvertToPhyCoord(vcRect.y); + pcRect.width = this->_pCoordHolder->canvasSize.pcInt.w; + pcRect.height = this->_pCoordHolder->canvasSize.pcInt.h; + + return this->_pNativeCanvas->Construct(windowHandle, pcRect); +} + +result +_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, "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, + vcRectF.height); + + _Util::Rectangle vcUtilRectF = { vcRectF.x, vcRectF.y, vcRectF.width, vcRectF.height }; + + this->_pCoordHolder->ResetFromVc(vcUtilRectF); + + if (_ResUtil::NeedToConvertCoord()) + { + Rectangle pcRect; + + pcRect.x = _FloatToIntForPos(_ResUtil::ConvertToPhyCoord(vcRectF.x)); + pcRect.y = _FloatToIntForPos(_ResUtil::ConvertToPhyCoord(vcRectF.y)); + pcRect.width = this->_pCoordHolder->canvasSize.pcInt.w; + pcRect.height = this->_pCoordHolder->canvasSize.pcInt.h; + + return this->_pNativeCanvas->Construct(pcRect); + } + else + { + Rectangle vcRect; + + vcRect.x = this->_pCoordHolder->canvasPos.vcInt.x; + vcRect.y = this->_pCoordHolder->canvasPos.vcInt.y; + vcRect.width = this->_pCoordHolder->canvasSize.vcInt.w; + vcRect.height = this->_pCoordHolder->canvasSize.vcInt.h; + + return this->_pNativeCanvas->Construct(vcRect); + } +} + +result +_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, "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, + vcRectF.height); + + _Util::Rectangle vcUtilRectF = { vcRectF.x, vcRectF.y, vcRectF.width, vcRectF.height }; + + this->_pCoordHolder->ResetFromVc(vcUtilRectF); + + Rectangle pcRect; + + pcRect.x = _FloatToIntForPos(_ResUtil::ConvertToPhyCoord(vcRectF.x)); + pcRect.y = _FloatToIntForPos(_ResUtil::ConvertToPhyCoord(vcRectF.y)); + pcRect.width = this->_pCoordHolder->canvasSize.pcInt.w; + pcRect.height = this->_pCoordHolder->canvasSize.pcInt.h; + + return this->_pNativeCanvas->Construct(windowHandle, pcRect); +} + +bool +_CanvasImpl::IsConstructed(void) const +{ + return (this->_pNativeCanvas != null) && this->_pNativeCanvas->IsValid(); +} + +result +_CanvasImpl::Clear(void) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + return this->_pNativeCanvas->Clear(); +} + +result +_CanvasImpl::Clear(const Rectangle& vcRect) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + SysTryReturnResult(NID_GRP, &vcRect, E_OUT_OF_RANGE, "The given rectangle is invalid."); + 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, + vcRect.height); + + if ((vcRect.width == 0) || (vcRect.height == 0)) + { + return E_SUCCESS; + } + + Rectangle rtCanvas = _GetBoundsRel(*this); + + if (rtCanvas.IsEmpty()) + { + return E_SUCCESS; + } + + result r = _Util::Validate(vcRect, rtCanvas); + + SysTryReturnResult(NID_GRP, !IsFailed(r), r, "Propagating."); + + if (_ResUtil::NeedToConvertCoord()) + { + Rectangle pcRect = _ResUtil::ConvertToPhyCoord(vcRect); + + return this->_pNativeCanvas->Clear(pcRect); + } + else + { + return this->_pNativeCanvas->Clear(vcRect); + } +} + +result +_CanvasImpl::Clear(const FloatRectangle& vcRectF) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + SysTryReturnResult(NID_GRP, &vcRectF, E_OUT_OF_RANGE, "The given rectangle is invalid."); + 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, + vcRectF.height); + + if ((vcRectF.width == 0.0f) || (vcRectF.height == 0.0f)) + { + return E_SUCCESS; + } + + FloatRectangle rtCanvasF = _GetBoundsRelF(*this); + + if (rtCanvasF.IsEmpty()) + { + return E_SUCCESS; + } + + result r = _Util::Validate(vcRectF, rtCanvasF); + + SysTryReturnResult(NID_GRP, !IsFailed(r), r, "Propagating."); + + if (_ResUtil::NeedToConvertCoord()) + { + FloatRectangle pcRectF = _ResUtil::ConvertToPhyCoord(vcRectF); + Rectangle pcRect(_FloatToIntForPos(pcRectF.x), _FloatToIntForPos(pcRectF.y), _FloatToIntForSize(pcRectF.width), _FloatToIntForSize(pcRectF.height)); + + return this->_pNativeCanvas->Clear(pcRect); + } + else + { + Rectangle vcRect(_FloatToIntForPos(vcRectF.x), _FloatToIntForPos(vcRectF.y), _FloatToIntForSize(vcRectF.width), _FloatToIntForSize(vcRectF.height)); + + return this->_pNativeCanvas->Clear(vcRect); + } +} + +result +_CanvasImpl::Copy(const Point& vcDestPoint, const _CanvasImpl& canvas, const Rectangle& vcSrcRect) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + SysTryReturnResult(NID_GRP, CANVAS_IS_VALID(canvas), E_INVALID_ARG, "The specified source canvas is invalid."); + + Rectangle srcRectCanvas = _GetBoundsRel(canvas); + + if (srcRectCanvas.IsEmpty()) + { + return E_SUCCESS; + } + + result r = _Util::Validate(vcSrcRect, srcRectCanvas); + + SysTryReturnResult(NID_GRP, !IsFailed(r), r, "Propagating."); + + // check if destRect is in this canvas. + Rectangle destRect(vcDestPoint.x, vcDestPoint.y, vcSrcRect.width, vcSrcRect.height); + Rectangle destRectCanvas = _GetBoundsRel(*this); + + if (destRectCanvas.IsEmpty()) + { + return E_SUCCESS; + } + + r = _Util::Validate(destRect, destRectCanvas); + + SysTryReturnResult(NID_GRP, !IsFailed(r), r, "Propagating."); + + EXTRACT_CANVASEX(_pNativeCanvas, canvas); + + + if (_ResUtil::NeedToConvertCoord()) + { + Point pcDestPoint = _ResUtil::ConvertToPhyCoord(vcDestPoint); + Rectangle pcSrcRect = _ResUtil::ConvertToPhyCoord(vcSrcRect); + + return this->_pNativeCanvas->Copy(pcDestPoint, *_pNativeCanvas, pcSrcRect); + } + else + { + return this->_pNativeCanvas->Copy(vcDestPoint, *_pNativeCanvas, vcSrcRect); + } +} + +result +_CanvasImpl::Copy(const FloatPoint& vcDestPointF, const _CanvasImpl& srcCanvas, const FloatRectangle& vcSrcRectF) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + SysTryReturnResult(NID_GRP, CANVAS_IS_VALID(srcCanvas), E_INVALID_ARG, "The specified source canvas is invalid."); + + FloatRectangle srcRectCanvasF = _GetBoundsRelF(srcCanvas); + + if (srcRectCanvasF.IsEmpty()) + { + return E_SUCCESS; + } + + result r = _Util::Validate(vcSrcRectF, srcRectCanvasF); + + SysTryReturnResult(NID_GRP, !IsFailed(r), r, "Propagating."); + + // check if destRect is in this canvas. + FloatRectangle destRectF(vcDestPointF.x, vcDestPointF.y, vcSrcRectF.width, vcSrcRectF.height); + FloatRectangle destRectCanvasF = _GetBoundsRelF(*this); + + if (destRectCanvasF.IsEmpty()) + { + return E_SUCCESS; + } + + r = _Util::Validate(destRectF, destRectCanvasF); + + SysTryReturnResult(NID_GRP, !IsFailed(r), r, "Propagating."); + + EXTRACT_CANVASEX(_pNativeCanvas, srcCanvas); + + if (_ResUtil::NeedToConvertCoord()) + { + FloatPoint pcDestPointF = _ResUtil::ConvertToPhyCoord(vcDestPointF); + FloatRectangle pcSrcRectF = _ResUtil::ConvertToPhyCoord(vcSrcRectF); + + Point pcDestPoint(_FloatToIntForPos(pcDestPointF.x), _FloatToIntForPos(pcDestPointF.y)); + Rectangle pcSrcRect(_FloatToIntForPos(pcSrcRectF.x), _FloatToIntForPos(pcSrcRectF.y), _FloatToIntForSize(pcSrcRectF.width), _FloatToIntForSize(pcSrcRectF.height)); + + return this->_pNativeCanvas->Copy(pcDestPoint, *_pNativeCanvas, pcSrcRect); + } + else + { + Point vcDestPoint(_FloatToIntForPos(vcDestPointF.x), _FloatToIntForPos(vcDestPointF.y)); + Rectangle vcSrcRect(_FloatToIntForPos(vcSrcRectF.x), _FloatToIntForPos(vcSrcRectF.y), _FloatToIntForSize(vcSrcRectF.width), _FloatToIntForSize(vcSrcRectF.height)); + + return this->_pNativeCanvas->Copy(vcDestPoint, *_pNativeCanvas, vcSrcRect); + } +} + +result +_CanvasImpl::Copy(const Rectangle& vcDestRect, const _CanvasImpl& canvas, const Rectangle& vcSrcRect) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + SysTryReturnResult(NID_GRP, CANVAS_IS_VALID(canvas), E_INVALID_ARG, "The specified source canvas is invalid."); + + // check if srcRect is in source canvas. + Rectangle srcRectCanvas = _GetBoundsRel(canvas); + + if (srcRectCanvas.IsEmpty()) + { + return E_SUCCESS; + } + + result r = _Util::Validate(vcSrcRect, srcRectCanvas); + + SysTryReturnResult(NID_GRP, !IsFailed(r), r, "Propagating."); + + // check if destRect is in this canvas. + Rectangle destRectCanvas = _GetBoundsRel(*this); + + if (destRectCanvas.IsEmpty()) + { + return E_SUCCESS; + } + + r = _Util::Validate(vcDestRect, destRectCanvas); + + SysTryReturnResult(NID_GRP, !IsFailed(r), r, "Propagating."); + + EXTRACT_CANVASEX(_pNativeCanvas, canvas); + + if (_ResUtil::NeedToConvertCoord()) + { + Rectangle pcDestRect = _ResUtil::ConvertToPhyCoord(vcDestRect); + Rectangle pcSrcRect = _ResUtil::ConvertToPhyCoord(vcSrcRect); + + return this->_pNativeCanvas->Copy(pcDestRect, *_pNativeCanvas, pcSrcRect); + } + else + { + return this->_pNativeCanvas->Copy(vcDestRect, *_pNativeCanvas, vcSrcRect); + } +} + +result +_CanvasImpl::Copy(const FloatRectangle& vcDestRectF, const _CanvasImpl& srcCanvas, const FloatRectangle& vcSrcRectF) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + SysTryReturnResult(NID_GRP, CANVAS_IS_VALID(srcCanvas), E_INVALID_ARG, "The specified source canvas is invalid."); + + // check if srcRect is in source canvas. + FloatRectangle srcRectCanvasF = _GetBoundsRelF(srcCanvas); + + if (srcRectCanvasF.IsEmpty()) + { + return E_SUCCESS; + } + + result r = _Util::Validate(vcSrcRectF, srcRectCanvasF); + + SysTryReturnResult(NID_GRP, !IsFailed(r), r, "Propagating."); + + // check if destRect is in this canvas. + FloatRectangle destRectCanvasF = _GetBoundsRelF(*this); + + if (destRectCanvasF.IsEmpty()) + { + return E_SUCCESS; + } + + r = _Util::Validate(vcDestRectF, destRectCanvasF); + + SysTryReturnResult(NID_GRP, !IsFailed(r), r, "Propagating."); + + EXTRACT_CANVASEX(_pNativeCanvas, srcCanvas); + + if (_ResUtil::NeedToConvertCoord()) + { + FloatRectangle pcDestRectF = _ResUtil::ConvertToPhyCoord(vcDestRectF); + FloatRectangle pcSrcRectF = _ResUtil::ConvertToPhyCoord(vcSrcRectF); + + Rectangle pcDestRect(_FloatToIntForPos(pcDestRectF.x), _FloatToIntForPos(pcDestRectF.y), _FloatToIntForSize(pcDestRectF.width), _FloatToIntForSize(pcDestRectF.height)); + Rectangle pcSrcRect(_FloatToIntForPos(pcSrcRectF.x), _FloatToIntForPos(pcSrcRectF.y), _FloatToIntForSize(pcSrcRectF.width), _FloatToIntForSize(pcSrcRectF.height)); + + return this->_pNativeCanvas->Copy(pcDestRect, *_pNativeCanvas, pcSrcRect); + } + else + { + Rectangle vcDestRect(_FloatToIntForPos(vcDestRectF.x), _FloatToIntForPos(vcDestRectF.y), _FloatToIntForSize(vcDestRectF.width), _FloatToIntForSize(vcDestRectF.height)); + Rectangle vcSrcRect(_FloatToIntForPos(vcSrcRectF.x), _FloatToIntForPos(vcSrcRectF.y), _FloatToIntForSize(vcSrcRectF.width), _FloatToIntForSize(vcSrcRectF.height)); + + return this->_pNativeCanvas->Copy(vcDestRect, *_pNativeCanvas, vcSrcRect); + } +} + +result +_CanvasImpl::Copy(const Point& vcDestPoint, const _CanvasImpl& canvas, const Rectangle& vcSrcRect, CompositeMode compositeMode) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + SysTryReturnResult(NID_GRP, CANVAS_IS_VALID(canvas), E_INVALID_ARG, "The specified source canvas is invalid."); + + switch (compositeMode) + { + case COMPOSITE_MODE_CLEAR: + case COMPOSITE_MODE_SRC: + case COMPOSITE_MODE_DST: + case COMPOSITE_MODE_SRC_OVER: + case COMPOSITE_MODE_DST_OVER: + case COMPOSITE_MODE_SRC_IN: + case COMPOSITE_MODE_DST_IN: + case COMPOSITE_MODE_SRC_OUT: + case COMPOSITE_MODE_DST_OUT: + case COMPOSITE_MODE_SRC_ATOP: + case COMPOSITE_MODE_DST_ATOP: + case COMPOSITE_MODE_DST_XOR: + case COMPOSITE_MODE_ADD: + case COMPOSITE_MODE_SATURATE: + case COMPOSITE_MODE_MULTIPLY: + case COMPOSITE_MODE_SCREEN: + case COMPOSITE_MODE_OVERLAY: + case COMPOSITE_MODE_DARKEN: + case COMPOSITE_MODE_LIGHTEN: + break; + default: + SysTryReturnResult(NID_GRP, false, E_INVALID_ARG, "The specified composite mode is invalid."); + } + + Rectangle srcRectCanvas = _GetBoundsRel(canvas); + + if (srcRectCanvas.IsEmpty()) + { + return E_SUCCESS; + } + + result r = _Util::Validate(vcSrcRect, srcRectCanvas); + + SysTryReturnResult(NID_GRP, !IsFailed(r), r, "Propagating."); + + // check if destRect is in this canvas. + Rectangle destRect(vcDestPoint.x, vcDestPoint.y, vcSrcRect.width, vcSrcRect.height); + Rectangle destRectCanvas = _GetBoundsRel(*this); + + if (destRectCanvas.IsEmpty()) + { + return E_SUCCESS; + } + + r = _Util::Validate(destRect, destRectCanvas); + + SysTryReturnResult(NID_GRP, !IsFailed(r), r, "Propagating."); + + EXTRACT_CANVASEX(_pNativeCanvas, canvas); + + + if (_ResUtil::NeedToConvertCoord()) + { + Point pcDestPoint = _ResUtil::ConvertToPhyCoord(vcDestPoint); + Rectangle pcSrcRect = _ResUtil::ConvertToPhyCoord(vcSrcRect); + + return this->_pNativeCanvas->Copy(pcDestPoint, *_pNativeCanvas, pcSrcRect, compositeMode); + } + else + { + return this->_pNativeCanvas->Copy(vcDestPoint, *_pNativeCanvas, vcSrcRect, compositeMode); + } +} + +result +_CanvasImpl::Copy(const FloatPoint& vcDestPointF, const _CanvasImpl& srcCanvas, const FloatRectangle& vcSrcRectF, CompositeMode compositeMode) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + SysTryReturnResult(NID_GRP, CANVAS_IS_VALID(srcCanvas), E_INVALID_ARG, "The specified source canvas is invalid."); + + switch (compositeMode) + { + case COMPOSITE_MODE_CLEAR: + case COMPOSITE_MODE_SRC: + case COMPOSITE_MODE_DST: + case COMPOSITE_MODE_SRC_OVER: + case COMPOSITE_MODE_DST_OVER: + case COMPOSITE_MODE_SRC_IN: + case COMPOSITE_MODE_DST_IN: + case COMPOSITE_MODE_SRC_OUT: + case COMPOSITE_MODE_DST_OUT: + case COMPOSITE_MODE_SRC_ATOP: + case COMPOSITE_MODE_DST_ATOP: + case COMPOSITE_MODE_DST_XOR: + case COMPOSITE_MODE_ADD: + case COMPOSITE_MODE_SATURATE: + case COMPOSITE_MODE_MULTIPLY: + case COMPOSITE_MODE_SCREEN: + case COMPOSITE_MODE_OVERLAY: + case COMPOSITE_MODE_DARKEN: + case COMPOSITE_MODE_LIGHTEN: + break; + default: + SysTryReturnResult(NID_GRP, false, E_INVALID_ARG, "The specified composite mode is invalid."); + } + + FloatRectangle srcRectCanvasF = _GetBoundsRelF(srcCanvas); + + if (srcRectCanvasF.IsEmpty()) + { + return E_SUCCESS; + } + + result r = _Util::Validate(vcSrcRectF, srcRectCanvasF); + + SysTryReturnResult(NID_GRP, !IsFailed(r), r, "Propagating."); + + // check if destRect is in this canvas. + FloatRectangle destRectF(vcDestPointF.x, vcDestPointF.y, vcSrcRectF.width, vcSrcRectF.height); + FloatRectangle destRectCanvasF = _GetBoundsRelF(*this); + + if (destRectCanvasF.IsEmpty()) + { + return E_SUCCESS; + } + + r = _Util::Validate(destRectF, destRectCanvasF); + + SysTryReturnResult(NID_GRP, !IsFailed(r), r, "Propagating."); + + EXTRACT_CANVASEX(_pNativeCanvas, srcCanvas); + + + if (_ResUtil::NeedToConvertCoord()) + { + FloatPoint pcDestPointF = _ResUtil::ConvertToPhyCoord(vcDestPointF); + FloatRectangle pcSrcRectF = _ResUtil::ConvertToPhyCoord(vcSrcRectF); + + Point pcDestPoint(_FloatToIntForPos(pcDestPointF.x), _FloatToIntForPos(pcDestPointF.y)); + Rectangle pcSrcRect(_FloatToIntForPos(pcSrcRectF.x), _FloatToIntForPos(pcSrcRectF.y), _FloatToIntForSize(pcSrcRectF.width), _FloatToIntForSize(pcSrcRectF.height)); + + return this->_pNativeCanvas->Copy(pcDestPoint, *_pNativeCanvas, pcSrcRect, compositeMode); + } + else + { + Point vcDestPoint(_FloatToIntForPos(vcDestPointF.x), _FloatToIntForPos(vcDestPointF.y)); + Rectangle vcSrcRect(_FloatToIntForPos(vcSrcRectF.x), _FloatToIntForPos(vcSrcRectF.y), _FloatToIntForSize(vcSrcRectF.width), _FloatToIntForSize(vcSrcRectF.height)); + + return this->_pNativeCanvas->Copy(vcDestPoint, *_pNativeCanvas, vcSrcRect, compositeMode); + } +} + +result +_CanvasImpl::CopyEx(const Point& vcDestPoint, const _CanvasImpl& srcCanvas, const Rectangle& vcSrcRect) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + if (this != &srcCanvas) + { + return this->Copy(vcDestPoint, srcCanvas, vcSrcRect); + } + + // validity check as _CanvasImpl::Copy() + SysTryReturnResult(NID_GRP, CANVAS_IS_VALID(srcCanvas), E_INVALID_ARG, "The specified source canvas is invalid."); + + Rectangle srcRectCanvas = _GetBoundsRel(srcCanvas); + + if (srcRectCanvas.IsEmpty()) + { + return E_SUCCESS; + } + + result r = _Util::Validate(vcSrcRect, srcRectCanvas); + + SysTryReturnResult(NID_GRP, !IsFailed(r), r, "Propagating."); + + // check if destRect is in this canvas. + Rectangle destRect(vcDestPoint.x, vcDestPoint.y, vcSrcRect.width, vcSrcRect.height); + Rectangle destRectCanvas = _GetBoundsRel(*this); + + if (destRectCanvas.IsEmpty()) + { + return E_SUCCESS; + } + + r = _Util::Validate(destRect, destRectCanvas); + + SysTryReturnResult(NID_GRP, !IsFailed(r), r, "Propagating."); + + int pixelPerLine = 0; + + { + BufferInfo bufferInfo; + + result r = this->_pNativeCanvas->Lock(bufferInfo); + + //?? log + SysTryReturn(NID_GRP, r == E_SUCCESS, r, E_SYSTEM, "[] "); + + this->_pNativeCanvas->Unlock(); + + pixelPerLine = bufferInfo.pitch / (bufferInfo.bitsPerPixel / 8); + } + + //?? Auto-scaling should be applied to vc**** parameters later + int sourDistance = vcSrcRect.y * pixelPerLine + vcSrcRect.x; + int destDistance = vcDestPoint.y * pixelPerLine + vcDestPoint.x; + + typedef result (_Canvas::* FnCopy)(const Point&, const _Canvas&, const Rectangle&); + FnCopy fnCopy = (destDistance < sourDistance) ? FnCopy(&_Canvas::Copy) : FnCopy(&_Canvas::CopyReverse); + + if (fnCopy) + { + EXTRACT_CANVASEX(_pNativeCanvas, srcCanvas); + + if (_ResUtil::NeedToConvertCoord()) + { + Point pcDestPoint = _ResUtil::ConvertToPhyCoord(vcDestPoint); + Rectangle pcSrcRect = _ResUtil::ConvertToPhyCoord(vcSrcRect); + + return (this->_pNativeCanvas->*fnCopy)(pcDestPoint, *_pNativeCanvas, pcSrcRect); + } + else + { + return (this->_pNativeCanvas->*fnCopy)(vcDestPoint, *_pNativeCanvas, vcSrcRect); + } + } + + // never!! + return E_SYSTEM; +} + +result +_CanvasImpl::CopyEx(const FloatPoint& vcDestPointF, const _CanvasImpl& srcCanvas, const FloatRectangle& vcSrcRectF) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + if (this != &srcCanvas) + { + return this->Copy(vcDestPointF, srcCanvas, vcSrcRectF); + } + + // validity check as _CanvasImpl::Copy() + SysTryReturnResult(NID_GRP, CANVAS_IS_VALID(srcCanvas), E_INVALID_ARG, "The specified source canvas is invalid."); + + FloatRectangle srcRectCanvasF = _GetBoundsRelF(srcCanvas); + + if (srcRectCanvasF.IsEmpty()) + { + return E_SUCCESS; + } + + result r = _Util::Validate(vcSrcRectF, srcRectCanvasF); + + SysTryReturnResult(NID_GRP, !IsFailed(r), r, "Propagating."); + + // check if destRect is in this canvas. + FloatRectangle destRectF(vcDestPointF.x, vcDestPointF.y, vcSrcRectF.width, vcSrcRectF.height); + FloatRectangle destRectCanvasF = _GetBoundsRelF(*this); + + if (destRectCanvasF.IsEmpty()) + { + return E_SUCCESS; + } + + r = _Util::Validate(destRectF, destRectCanvasF); + + SysTryReturnResult(NID_GRP, !IsFailed(r), r, "Propagating."); + + int pixelPerLine = 0; + + { + BufferInfo bufferInfo; + + result r = this->_pNativeCanvas->Lock(bufferInfo); + + //?? log + SysTryReturn(NID_GRP, r == E_SUCCESS, r, E_SYSTEM, "[] "); + + this->_pNativeCanvas->Unlock(); + + pixelPerLine = bufferInfo.pitch / (bufferInfo.bitsPerPixel / 8); + } + + Point vcDestPoint(_FloatToIntForPos(vcDestPointF.x), _FloatToIntForPos(vcDestPointF.y)); + Rectangle vcSrcRect(_FloatToIntForPos(vcSrcRectF.x), _FloatToIntForPos(vcSrcRectF.y), _FloatToIntForSize(vcSrcRectF.width), _FloatToIntForSize(vcSrcRectF.height)); + + //?? Auto-scaling should be applied to vc**** parameters later + int sourDistance = vcSrcRect.y * pixelPerLine + vcSrcRect.x; + int destDistance = vcDestPoint.y * pixelPerLine + vcDestPoint.x; + + typedef result (_Canvas::* FnCopy)(const Point&, const _Canvas&, const Rectangle&); + FnCopy fnCopyF = (destDistance < sourDistance) ? FnCopy(&_Canvas::Copy) : FnCopy(&_Canvas::CopyReverse); + + if (fnCopyF) + { + EXTRACT_CANVASEX(_pNativeCanvas, srcCanvas); + + if (_ResUtil::NeedToConvertCoord()) + { + FloatPoint pcDestPointF = _ResUtil::ConvertToPhyCoord(vcDestPointF); + FloatRectangle pcSrcRectF = _ResUtil::ConvertToPhyCoord(vcSrcRectF); + + Point pcDestPoint(_FloatToIntForPos(pcDestPointF.x), _FloatToIntForPos(pcDestPointF.y)); + Rectangle pcSrcRect(_FloatToIntForPos(pcSrcRectF.x), _FloatToIntForPos(pcSrcRectF.y), _FloatToIntForSize(pcSrcRectF.width), _FloatToIntForSize(pcSrcRectF.height)); + + return (this->_pNativeCanvas->*fnCopyF)(pcDestPoint, *_pNativeCanvas, pcSrcRect); + } + else + { + return (this->_pNativeCanvas->*fnCopyF)(vcDestPoint, *_pNativeCanvas, vcSrcRect); + } + } + + // never!! + return E_SYSTEM; +} + +result +_CanvasImpl::DrawArc(const FloatRectangle& vcBounds, float startAngle, float endAngle, ArcStyle arcStyle) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + SysTryReturnResult(NID_GRP, ARC_STYLE_MIN < arcStyle && arcStyle < ARC_STYLE_MAX, E_INVALID_ARG, "The invalid arc type(%d) is given.", arcStyle); + SysTryReturnResult(NID_GRP, &vcBounds, E_INVALID_ARG, "The given rectangle is invalid."); + SysTryReturnResult(NID_GRP, (vcBounds.width >= 0.0f) && (vcBounds.height >= 0.0f), E_OUT_OF_RANGE, + "The given rectangle(width:%f,height:%f) is out of range.", vcBounds.width, vcBounds.height); + + return _CanvasImplPrivate::DrawArc(this, _Util::Convert >(vcBounds), double(startAngle), double(endAngle), arcStyle); +} + +result +_CanvasImpl::DrawArc(const Rectangle& vcBounds, int startAngle, int endAngle, ArcStyle arcStyle) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + SysTryReturnResult(NID_GRP, ARC_STYLE_MIN < arcStyle && arcStyle < ARC_STYLE_MAX, E_INVALID_ARG, "The invalid arc type(%d) is given.", arcStyle); + SysTryReturnResult(NID_GRP, &vcBounds, E_INVALID_ARG, "The given rectangle is invalid."); + SysTryReturnResult(NID_GRP, (vcBounds.width >= 0) && (vcBounds.height >= 0), E_OUT_OF_RANGE, + "The given rectangle(width:%d,height:%d) is out of range.", vcBounds.width, vcBounds.height); + + return _CanvasImplPrivate::DrawArc(this, _Util::Convert >(vcBounds), double(startAngle), double(endAngle), arcStyle); +} + +result +_CanvasImpl::DrawBitmap(const Rectangle& vcRect, const _BitmapImpl& bitmap) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + return this->DrawBitmap(FloatRectangle(float(vcRect.x), float(vcRect.y), float(vcRect.width), float(vcRect.height)), bitmap); +} + +result +_CanvasImpl::DrawBitmap(const FloatRectangle& vcRectF, const _BitmapImpl& bitmap) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + SysTryReturnResult(NID_GRP, BITMAP_IS_VALID(bitmap), E_INVALID_ARG, "The source bitmap is invalid."); + SysTryReturnResult(NID_GRP, &vcRectF, E_INVALID_ARG, "The source rectangle is invalid."); + + // @ykahn vcRectF.width in [bitmap.GetActualWidth()..bitmap.GetWidthF()] + if (vcRectF.width == bitmap.GetWidthF() && vcRectF.height == bitmap.GetHeightF()) + { + return this->DrawBitmap(FloatPoint(vcRectF.x, vcRectF.y), bitmap); + } + + if (_FloatToIntForSize(vcRectF.width) == bitmap.GetWidth() && _FloatToIntForSize(vcRectF.height) == bitmap.GetHeight()) + { + return this->DrawBitmap(FloatPoint(vcRectF.x, vcRectF.y), bitmap); + } + + // check if bimap can be drew in canvas area. + FloatRectangle rtCanvasF = _GetBoundsRelF(*this); + + if (rtCanvasF.IsEmpty()) + { + return E_SUCCESS; + } + + result r = _Util::Validate(vcRectF, rtCanvasF); + + SysTryReturnResult(NID_GRP, !IsFailed(r), r, "Propagating."); + + EXTRACT_BITMAPEX(pBitmapEx, bitmap); + + if (_ResUtil::NeedToConvertCoord()) + { + FloatRectangle pcRectF = _ResUtil::ConvertToPhyCoord(vcRectF); + + _Util::Rectangle pcRectD = _Util::Convert >(pcRectF); + + return this->_pNativeCanvas->DrawBitmap(pcRectD, *pBitmapEx); + } + else + { + _Util::Rectangle vcRectD = _Util::Convert >(vcRectF); + + return this->_pNativeCanvas->DrawBitmap(vcRectD, *pBitmapEx); + } +} + +result +_CanvasImpl::DrawBitmap(const Point& vcPoint, const _BitmapImpl& bitmap) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + SysTryReturnResult(NID_GRP, BITMAP_IS_VALID(bitmap), E_INVALID_ARG, "The source bitmap is invalid."); + + Rectangle rtCanvas = _GetBoundsRel(*this); + + if (rtCanvas.IsEmpty()) + { + return E_SUCCESS; + } + + result r = _Util::Validate(Rectangle(vcPoint.x, vcPoint.y, bitmap.GetWidth(), bitmap.GetHeight()), rtCanvas); + + SysTryReturnResult(NID_GRP, !IsFailed(r), r, "Propagating."); + + EXTRACT_BITMAPEX(pBitmapEx, bitmap); + + if (_ResUtil::NeedToConvertCoord()) + { + Tizen::Graphics::Dimension virSize; + Tizen::Graphics::Dimension phySize; + bool lazyScaling = Tizen::Graphics::_IsLazyScalingBitmap(bitmap, virSize, phySize); + + Point pcPoint = _ResUtil::ConvertToPhyCoord(vcPoint); + _Util::Point pcPointI = _Util::Convert >(pcPoint); + + if (lazyScaling) + { + EXTRACT_SCALED_BITMAPEX(pScaledBitmapEx, bitmap); + + return this->_pNativeCanvas->DrawBitmap(pcPointI, *pScaledBitmapEx); + } + else + { + return this->_pNativeCanvas->DrawBitmap(pcPointI, *pBitmapEx); + } + } + else + { + _Util::Point vcPointI = _Util::Convert >(vcPoint); + + return this->_pNativeCanvas->DrawBitmap(vcPointI, *pBitmapEx); + } +} + +result +_CanvasImpl::DrawBitmap(const FloatPoint& vcPointF, const _BitmapImpl& bitmap) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + SysTryReturnResult(NID_GRP, BITMAP_IS_VALID(bitmap), E_INVALID_ARG, "The source bitmap is invalid."); + + // This code is executed using neon.acceleration. + { + bool isXEqualToInteger = _Util::Abs(vcPointF.x - int(vcPointF.x)) <= 0.01; + bool isYEqualToInteger = _Util::Abs(vcPointF.y - int(vcPointF.y)) <= 0.01; + + bool isCompositeModeUnbound = GetCompositeMode() == COMPOSITE_MODE_SRC_IN + || GetCompositeMode() == COMPOSITE_MODE_DST_IN + || GetCompositeMode() == COMPOSITE_MODE_SRC_OUT + || GetCompositeMode() == COMPOSITE_MODE_DST_ATOP; + + if (isXEqualToInteger && isYEqualToInteger && !isCompositeModeUnbound) + { + return this->DrawBitmap(Point(int(vcPointF.x), int(vcPointF.y)), bitmap); + } + } + + FloatRectangle rtCanvasF = _GetBoundsRelF(*this); + + if (rtCanvasF.IsEmpty()) + { + return E_SUCCESS; + } + + result r = _Util::Validate(FloatRectangle(vcPointF.x, vcPointF.y, bitmap.GetWidthF(), bitmap.GetHeightF()), rtCanvasF); + + SysTryReturnResult(NID_GRP, !IsFailed(r), r, "Propagating."); + + EXTRACT_BITMAPEX(pBitmapEx, bitmap); + + if (_ResUtil::NeedToConvertCoord()) + { + Tizen::Graphics::Dimension virSize; + Tizen::Graphics::Dimension phySize; + bool lazyScaling = Tizen::Graphics::_IsLazyScalingBitmap(bitmap, virSize, phySize); + + FloatPoint pcPointF = _ResUtil::ConvertToPhyCoord(vcPointF); + _Util::Point pcPointD = _Util::Convert >(pcPointF); + + if (lazyScaling) + { + EXTRACT_SCALED_BITMAPEX(pScaledBitmapEx, bitmap); + + return this->_pNativeCanvas->DrawBitmap(pcPointD, *pScaledBitmapEx); + } + else + { + return this->_pNativeCanvas->DrawBitmap(pcPointD, *pBitmapEx); + } + } + else + { + _Util::Point vcPointD = _Util::Convert >(vcPointF); + + return this->_pNativeCanvas->DrawBitmap(vcPointD, *pBitmapEx); + } +} + +result +_CanvasImpl::DrawBitmap(const Rectangle& vcDestRect, const _BitmapImpl& srcBitmap, const Rectangle& vcSrcRect) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + return this->DrawBitmap(FloatRectangle(float(vcDestRect.x), float(vcDestRect.y), float(vcDestRect.width), float(vcDestRect.height)), srcBitmap, FloatRectangle(float(vcSrcRect.x), float(vcSrcRect.y), float(vcSrcRect.width), float(vcSrcRect.height))); +} + +result +_CanvasImpl::DrawBitmap(const FloatRectangle& vcDestRectF, const _BitmapImpl& srcBitmap, const FloatRectangle& vcSrcRectF) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + SysTryReturnResult(NID_GRP, BITMAP_IS_VALID(srcBitmap), E_INVALID_ARG, "The source bitmap is invalid."); + + SysTryReturnResult(NID_GRP, (&vcSrcRectF) && (&vcDestRectF), E_INVALID_ARG, "The given rectangle is invalid."); + + SysTryReturnResult(NID_GRP, (vcSrcRectF.width >= 0.0f) && (vcSrcRectF.height >= 0.0f), E_OUT_OF_RANGE, "The given source rectangle(width:%f,height:%f) is out of range.", vcSrcRectF.width, vcSrcRectF.height); + SysTryReturnResult(NID_GRP, (vcDestRectF.width >= 0.0f) && (vcDestRectF.height >= 0.0f), E_OUT_OF_RANGE, "The given destination rectangle(width:%f,height:%f) is out of range.", vcDestRectF.width, vcDestRectF.height); + + if (vcSrcRectF.width == 0.0f || vcSrcRectF.height == 0.0f) + { + return E_SUCCESS; + } + + if (vcDestRectF.width == 0.0f || vcDestRectF.height == 0.0f) + { + return E_SUCCESS; + } + + if ((vcSrcRectF.x < 0.0f) || (vcSrcRectF.y < 0.0f) || (vcSrcRectF.x + vcSrcRectF.width > srcBitmap.GetWidthF()) || (vcSrcRectF.y + vcSrcRectF.height > srcBitmap.GetHeightF())) + { + SysTryReturnResult(NID_GRP, 0, E_OUT_OF_RANGE, "The specified region of source bitmap is out of range."); + } + + if (vcSrcRectF.width == srcBitmap.GetWidthF() && vcSrcRectF.height == srcBitmap.GetHeightF()) + { + return this->DrawBitmap(vcDestRectF, srcBitmap); + } + + // check if srcRect is in bitmap's area. + result r = _Util::Validate(vcSrcRectF, FloatRectangle(0, 0, srcBitmap.GetWidthF(), srcBitmap.GetHeightF())); + + SysTryReturnResult(NID_GRP, !IsFailed(r), r, "Propagating."); + + // check if destRect is in this canvas. + FloatRectangle rtCanvas = _GetBoundsRelF(*this); + + if (rtCanvas.IsEmpty()) + { + return E_SUCCESS; + } + + r = _Util::Validate(vcDestRectF, rtCanvas); + + SysTryReturnResult(NID_GRP, !IsFailed(r), r, "Propagating."); + + EXTRACT_BITMAPEX(pBitmapEx, srcBitmap); + + if (_ResUtil::NeedToConvertCoord()) + { + Tizen::Graphics::Dimension virSize; + Tizen::Graphics::Dimension phySize; + bool lazyScaling = Tizen::Graphics::_IsLazyScalingBitmap(srcBitmap, virSize, phySize); + + FloatRectangle pcDestRectF = _ResUtil::ConvertToPhyCoord(vcDestRectF); + + _Util::Rectangle pcDestRectD = _Util::Convert >(pcDestRectF); + + if (lazyScaling) + { + _Util::Rectangle vcSrcRectD = _Util::Convert >(vcSrcRectF); + + return this->_pNativeCanvas->DrawBitmap(pcDestRectD, *pBitmapEx, vcSrcRectD); + } + else + { + FloatRectangle pcSrcRectF = _ResUtil::ConvertToPhyCoord(vcSrcRectF); + + _Util::Rectangle pcSrcRectD = _Util::Convert >(pcSrcRectF); + + return this->_pNativeCanvas->DrawBitmap(pcDestRectD, *pBitmapEx, pcSrcRectD); + } + } + else + { + _Util::Rectangle vcSrcRectD = _Util::Convert >(vcSrcRectF); + _Util::Rectangle vcDestRectD = _Util::Convert >(vcDestRectF); + + return this->_pNativeCanvas->DrawBitmap(vcDestRectD, *pBitmapEx, vcSrcRectD); + } +} + +result +_CanvasImpl::DrawBitmap(const Point& vcPoint, const _BitmapImpl& bitmap, FlipDirection dir) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + return this->DrawBitmap(FloatPoint(float(vcPoint.x), float(vcPoint.y)), bitmap, dir); +} + +result +_CanvasImpl::DrawBitmap(const FloatPoint& vcPointF, const _BitmapImpl& bitmap, FlipDirection dir) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + SysTryReturnResult(NID_GRP, BITMAP_IS_VALID(bitmap), E_INVALID_ARG, "The source bitmap is invalid."); + + switch (dir) + { + case FLIP_DIRECTION_HORIZONTAL: + case FLIP_DIRECTION_VERTICAL: + break; + default: + SysTryReturnResult(NID_GRP, 0, E_INVALID_ARG, "FlipStyle(%d) is invalid.", dir); + break; + } + + EXTRACT_BITMAPEX(pBitmapEx, bitmap); + + if (_ResUtil::NeedToConvertCoord()) + { + Tizen::Graphics::Dimension virSize; + Tizen::Graphics::Dimension phySize; + bool lazyScaling = Tizen::Graphics::_IsLazyScalingBitmap(bitmap, virSize, phySize); + + FloatPoint pcPointF = _ResUtil::ConvertToPhyCoord(vcPointF); + + _Util::Point pcPointD = _Util::Convert >(pcPointF); + + if (lazyScaling) + { + EXTRACT_SCALED_BITMAPEX(pScaledBitmapEx, bitmap); + + return this->_pNativeCanvas->DrawBitmap(pcPointD, *pScaledBitmapEx, dir); + } + else + { + return this->_pNativeCanvas->DrawBitmap(pcPointD, *pBitmapEx, dir); + } + } + else + { + _Util::Point vcPointD = _Util::Convert >(vcPointF); + + return this->_pNativeCanvas->DrawBitmap(vcPointD, *pBitmapEx, dir); + } +} + +result +_CanvasImpl::DrawBitmap(const Point& vcPoint, const _BitmapImpl& bitmap, const Point& vcPivot, int degree) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + return this->DrawBitmap(FloatPoint(float(vcPoint.x), float(vcPoint.y)), bitmap, FloatPoint(float(vcPivot.x), float(vcPivot.y)), float(degree)); +} + +result +_CanvasImpl::DrawBitmap(const FloatPoint& vcPointF, const _BitmapImpl& bitmap, const FloatPoint& vcPivotF, float degree) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + SysTryReturnResult(NID_GRP, BITMAP_IS_VALID(bitmap), E_INVALID_ARG, "The source bitmap is invalid."); + + EXTRACT_BITMAPEX(pBitmapEx, bitmap); + + if (_ResUtil::NeedToConvertCoord()) + { + Tizen::Graphics::Dimension virSize; + Tizen::Graphics::Dimension phySize; + bool lazyScaling = Tizen::Graphics::_IsLazyScalingBitmap(bitmap, virSize, phySize); + + FloatPoint pcPointF = _ResUtil::ConvertToPhyCoord(vcPointF); + FloatPoint pcPivotF = _ResUtil::ConvertToPhyCoord(vcPivotF); + + _Util::Point pcPointD = _Util::Convert >(pcPointF); + _Util::Point pcPivotD = _Util::Convert >(pcPivotF); + + if (lazyScaling) + { + EXTRACT_SCALED_BITMAPEX(pScaledBitmapEx, bitmap); + + return this->_pNativeCanvas->DrawBitmap(pcPointD, *pScaledBitmapEx, pcPivotD, double(degree)); + } + else + { + return this->_pNativeCanvas->DrawBitmap(pcPointD, *pBitmapEx, pcPivotD, double(degree)); + } + } + else + { + return this->_pNativeCanvas->DrawBitmap(_Util::Convert >(vcPointF), *pBitmapEx, _Util::Convert >(vcPivotF), double(degree)); + } +} + +result +_CanvasImpl::DrawNinePatchedBitmap(const Rectangle& vcRect, const _BitmapImpl& bitmap) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + SysTryReturnResult(NID_GRP, BITMAP_IS_VALID(bitmap), E_INVALID_ARG, "The source bitmap is invalid."); + + SysTryReturnResult(NID_GRP, bitmap.IsNinePatchedBitmap(), E_INVALID_ARG, "The source bitmap is not a nine patched bitmap."); + + // check if bimap can be drew in canvas area. + Rectangle rtCanvas = _GetBoundsRel(*this); + + if (rtCanvas.IsEmpty()) + { + SysTryReturnResult(NID_GRP, 0, E_OPERATION_FAILED, "Cannot get the bounds of the canvas."); + } + + result r = _Util::Validate(vcRect, rtCanvas); + + SysTryReturnResult(NID_GRP, !IsFailed(r), r, "Propagating."); + + EXTRACT_BITMAPEX(pBitmapEx, bitmap); + + if (_ResUtil::NeedToConvertCoord()) + { + Tizen::Graphics::Dimension virSize; + Tizen::Graphics::Dimension phySize; + bool lazyScaling = Tizen::Graphics::_IsLazyScalingBitmap(bitmap, virSize, phySize); + + Rectangle pcRect = _ResUtil::ConvertToPhyCoord(vcRect); + + if (lazyScaling) + { + EXTRACT_SCALED_BITMAPEX(pScaledBitmapEx, bitmap); + + return this->_pNativeCanvas->DrawNinePatchedBitmap(pcRect, *pScaledBitmapEx); + } + else + { + return this->_pNativeCanvas->DrawNinePatchedBitmap(pcRect, *pBitmapEx); + } + } + else + { + return this->_pNativeCanvas->DrawNinePatchedBitmap(vcRect, *pBitmapEx); + } +} + +result +_CanvasImpl::DrawNinePatchedBitmap(const FloatRectangle& vcRectF, const _BitmapImpl& bitmap) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + SysTryReturnResult(NID_GRP, BITMAP_IS_VALID(bitmap), E_INVALID_ARG, "The source bitmap is invalid."); + + SysTryReturnResult(NID_GRP, bitmap.IsNinePatchedBitmap(), E_INVALID_ARG, "The source bitmap is not a nine patched bitmap."); + + // check if bimap can be drew in canvas area. + FloatRectangle rtCanvasF = _GetBoundsRelF(*this); + + if (rtCanvasF.IsEmpty()) + { + SysTryReturnResult(NID_GRP, 0, E_OPERATION_FAILED, "Cannot get the bounds of the canvas."); + } + + result r = _Util::Validate(vcRectF, rtCanvasF); + + SysTryReturnResult(NID_GRP, !IsFailed(r), r, "Propagating."); + + EXTRACT_BITMAPEX(pBitmapEx, bitmap); + + if (_ResUtil::NeedToConvertCoord()) + { + Tizen::Graphics::Dimension virSize; + Tizen::Graphics::Dimension phySize; + bool lazyScaling = Tizen::Graphics::_IsLazyScalingBitmap(bitmap, virSize, phySize); + + FloatRectangle pcRectF = _ResUtil::ConvertToPhyCoord(vcRectF); + + Rectangle pcRect(_FloatToIntForPos(pcRectF.x), _FloatToIntForPos(pcRectF.y), _FloatToIntForSize(pcRectF.width), _FloatToIntForSize(pcRectF.height)); + + if (lazyScaling) + { + EXTRACT_SCALED_BITMAPEX(pScaledBitmapEx, bitmap); + + return this->_pNativeCanvas->DrawNinePatchedBitmap(pcRect, *pScaledBitmapEx); + } + else + { + return this->_pNativeCanvas->DrawNinePatchedBitmap(pcRect, *pBitmapEx); + } + } + else + { + Rectangle vcRect(_FloatToIntForPos(vcRectF.x), _FloatToIntForPos(vcRectF.y), _FloatToIntForSize(vcRectF.width), _FloatToIntForSize(vcRectF.height)); + + return this->_pNativeCanvas->DrawNinePatchedBitmap(vcRect, *pBitmapEx); + } +} + +result +_CanvasImpl::DrawNineTiledBitmap(const Rectangle& vcRect, const _BitmapImpl& bitmap) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + SysTryReturnResult(NID_GRP, BITMAP_IS_VALID(bitmap), E_INVALID_ARG, "The source bitmap is invalid."); + + SysTryReturnResult(NID_GRP, bitmap.IsNinePatchedBitmap(), E_INVALID_ARG, "The source bitmap is not a nine tiled bitmap."); + + // check if bimap can be drew in canvas area. + Rectangle rtCanvas = _GetBoundsRel(*this); + + if (rtCanvas.IsEmpty()) + { + SysTryReturnResult(NID_GRP, 0, E_OPERATION_FAILED, "Cannot get the bounds of the canvas."); + } + + result r = _Util::Validate(vcRect, rtCanvas); + + if (IsFailed(r)) + { + return E_SUCCESS; + } + + EXTRACT_BITMAPEX(pBitmapEx, bitmap); + + if (_ResUtil::NeedToConvertCoord()) + { + Tizen::Graphics::Dimension virSize; + Tizen::Graphics::Dimension phySize; + bool lazyScaling = Tizen::Graphics::_IsLazyScalingBitmap(bitmap, virSize, phySize); + + Rectangle pcRect = _ResUtil::ConvertToPhyCoord(vcRect); + + if (lazyScaling) + { + EXTRACT_SCALED_BITMAPEX(pScaledBitmapEx, bitmap); + + return this->_pNativeCanvas->DrawNineTiledBitmap(pcRect, *pScaledBitmapEx); + } + else + { + return this->_pNativeCanvas->DrawNineTiledBitmap(pcRect, *pBitmapEx); + } + } + else + { + return this->_pNativeCanvas->DrawNineTiledBitmap(vcRect, *pBitmapEx); + } +} + +result +_CanvasImpl::DrawEllipse(const Rectangle& vcBounds) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + SysTryReturnResult(NID_GRP, &vcBounds, E_OUT_OF_RANGE, "The given rectangle is invalid."); + SysTryReturnResult(NID_GRP, (vcBounds.width >= 0) && (vcBounds.height >= 0), E_OUT_OF_RANGE, + "The given rectangle(width:%d,height:%d) is out of range.", vcBounds.width, vcBounds.height); + + return _CanvasImplPrivate::DrawEllipse(this, _Util::Convert >(vcBounds)); +} + +result +_CanvasImpl::DrawEllipse(const FloatRectangle& vcBounds) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + SysTryReturnResult(NID_GRP, &vcBounds, E_OUT_OF_RANGE, "The given rectangle is invalid."); + SysTryReturnResult(NID_GRP, (vcBounds.width >= 0.0f) && (vcBounds.height >= 0.0f), E_OUT_OF_RANGE, + "The given rectangle(width:%f,height:%f) is out of range.", vcBounds.width, vcBounds.height); + + return _CanvasImplPrivate::DrawEllipse(this, _Util::Convert >(vcBounds)); +} + +result +_CanvasImpl::DrawLine(const Point& vcPoint1, const Point& vcPoint2) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + return _CanvasImplPrivate::DrawLine(this, + _Util::Convert >(vcPoint1), + _Util::Convert >(vcPoint2)); +} + +result +_CanvasImpl::DrawLine(const FloatPoint& vcPoint1, const FloatPoint& vcPoint2) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + return _CanvasImplPrivate::DrawLine(this, + _Util::Convert >(vcPoint1), + _Util::Convert >(vcPoint2)); +} + +result +_CanvasImpl::DrawPolygon(const Tizen::Base::Collection::IList& vcPoints) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + int numPoint = vcPoints.GetCount(); + + SysTryReturnResult(NID_GRP, numPoint >= 0, E_INVALID_ARG, "The number of points (%d) is not valid.", numPoint); + + if (numPoint < 2) // TBD. + { + return E_SUCCESS; + } + + std::unique_ptr<_Util::Point[]> doublePoint; + + { + _Util::Point* pDoublePoint = _Util::Convert*>(vcPoints); + + SysTryReturnResult(NID_GRP, pDoublePoint != null, E_INVALID_ARG, "The type of points is not valid."); + + doublePoint.reset(pDoublePoint); + } + + if (_ResUtil::NeedToConvertCoord()) + { + for (int i = 0; i < numPoint; i++) + { + doublePoint[i] = _ResUtil::ConvertToPhyCoord(doublePoint[i]); + } + + return this->_pNativeCanvas->DrawPolygon(doublePoint.get(), numPoint); + } + else + { + return this->_pNativeCanvas->DrawPolygon(doublePoint.get(), numPoint); + } +} + +result +_CanvasImpl::DrawPolyline(const Tizen::Base::Collection::IList& vcPoints) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + int numPoint = vcPoints.GetCount(); + + SysTryReturnResult(NID_GRP, numPoint >= 0, E_INVALID_ARG, "The number of points (%d) is not valid.", numPoint); + + if (numPoint < 2) + { + return E_SUCCESS; + } + + std::unique_ptr<_Util::Point[]> doublePoint; + + { + _Util::Point* pDoublePoint = _Util::Convert*>(vcPoints); + + SysTryReturnResult(NID_GRP, pDoublePoint != null, E_INVALID_ARG, "The type of points is not valid."); + + doublePoint.reset(pDoublePoint); + } + + if (_ResUtil::NeedToConvertCoord()) + { + for (int i = 0; i < numPoint; i++) + { + doublePoint[i] = _ResUtil::ConvertToPhyCoord(doublePoint[i]); + } + + return this->_pNativeCanvas->DrawPolyline(doublePoint.get(), numPoint); + } + else + { + return this->_pNativeCanvas->DrawPolyline(doublePoint.get(), numPoint); + } +} + +result +_CanvasImpl::DrawRectangle(const Rectangle& vcRect) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + SysTryReturnResult(NID_GRP, &vcRect, E_OUT_OF_RANGE, "The given rectangle is invalid."); + 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, vcRect.height); + + return _CanvasImplPrivate::DrawRectangle(this, _Util::Convert >(vcRect)); +} + +result +_CanvasImpl::DrawRectangle(const FloatRectangle& vcRect) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + SysTryReturnResult(NID_GRP, &vcRect, E_OUT_OF_RANGE, "The given rectangle is invalid."); + SysTryReturnResult(NID_GRP, (vcRect.width >= 0.0f) && (vcRect.height >= 0.0f), E_OUT_OF_RANGE, "The given rectangle(width:%f,height:%f) is out of range.", vcRect.width, vcRect.height); + + return _CanvasImplPrivate::DrawRectangle(this, _Util::Convert >(vcRect)); +} + +result +_CanvasImpl::DrawRoundRectangle(const Rectangle& vcRect, const Dimension& vcArcDim) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + SysTryReturnResult(NID_GRP, (&vcRect) && (&vcArcDim), E_OUT_OF_RANGE, "The given rectangle is invalid."); + 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, vcRect.height); + SysTryReturnResult(NID_GRP, (vcArcDim.width >= 0) && (vcArcDim.height >= 0), E_OUT_OF_RANGE, "The given arc size(width:%d,height:%d) is out of range.", vcArcDim.width, vcArcDim.height); + + return _CanvasImplPrivate::DrawRoundRectangle(this, _Util::Convert >(vcRect), _Util::Convert >(vcArcDim)); +} + +result +_CanvasImpl::DrawRoundRectangle(const FloatRectangle& vcRect, const FloatDimension& vcArcDim) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + SysTryReturnResult(NID_GRP, (&vcRect) && (&vcArcDim), E_OUT_OF_RANGE, "The given rectangle is invalid."); + SysTryReturnResult(NID_GRP, (vcRect.width >= 0.0f) && (vcRect.height >= 0.0f), E_OUT_OF_RANGE, "The given rectangle(width:%f,height:%f) is out of range.", vcRect.width, vcRect.height); + SysTryReturnResult(NID_GRP, (vcArcDim.width >= 0.0f) && (vcArcDim.height >= 0.0f), E_OUT_OF_RANGE, "The given arc size(width:%f,height:%f) is out of range.", vcArcDim.width, vcArcDim.height); + + return _CanvasImplPrivate::DrawRoundRectangle(this, _Util::Convert >(vcRect), _Util::Convert >(vcArcDim)); +} + +result +_CanvasImpl::DrawTriangle(const Point& vcPoint1, const Point& vcPoint2, const Point& vcPoint3) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + return _CanvasImplPrivate::DrawTriangle(this, + _Util::Convert >(vcPoint1), + _Util::Convert >(vcPoint2), + _Util::Convert >(vcPoint3)); +} + +result +_CanvasImpl::DrawTriangle(const FloatPoint& vcPoint1, const FloatPoint& vcPoint2, const FloatPoint& vcPoint3) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + return _CanvasImplPrivate::DrawTriangle(this, + _Util::Convert >(vcPoint1), + _Util::Convert >(vcPoint2), + _Util::Convert >(vcPoint3)); +} + +result +_CanvasImpl::FillEllipse(const Color& color, const Rectangle& vcBounds) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + SysTryReturnResult(NID_GRP, &vcBounds, E_OUT_OF_RANGE, "The given rectangle is invalid."); + SysTryReturnResult(NID_GRP, (vcBounds.width >= 0) && (vcBounds.height >= 0), E_OUT_OF_RANGE, + "The given rectangle(width:%d,height:%d) is out of range.", vcBounds.width, vcBounds.height); + + return _CanvasImplPrivate::FillEllipse(this, color, _Util::Convert >(vcBounds)); +} + +result +_CanvasImpl::FillEllipse(const Color& color, const FloatRectangle& vcBounds) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + SysTryReturnResult(NID_GRP, &vcBounds, E_OUT_OF_RANGE, "The given rectangle is invalid."); + SysTryReturnResult(NID_GRP, (vcBounds.width >= 0.0f) && (vcBounds.height >= 0.0f), E_OUT_OF_RANGE, + "The given rectangle(width:%f,height:%f) is out of range.", vcBounds.width, vcBounds.height); + + return _CanvasImplPrivate::FillEllipse(this, color, _Util::Convert >(vcBounds)); +} + +result +_CanvasImpl::FillPolygon(const Color& color, const Tizen::Base::Collection::IList& vcPoints) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + SysTryReturnResult(NID_GRP, &vcPoints, E_INVALID_ARG, "The given rectangle is invalid."); + + int numPoint = vcPoints.GetCount(); + + SysTryReturnResult(NID_GRP, numPoint >= 0, E_INVALID_ARG, "The number of points (%d) is not valid.", numPoint); + + if (numPoint < 3) // TBD. + { + return E_SUCCESS; + } + + std::unique_ptr<_Util::Point[]> doublePoint; + + { + _Util::Point* pDoublePoint = _Util::Convert*>(vcPoints); + + SysTryReturnResult(NID_GRP, pDoublePoint != null, E_INVALID_ARG, "The type of points is not valid."); + + doublePoint.reset(pDoublePoint); + } + + if (_ResUtil::NeedToConvertCoord()) + { + for (int i = 0; i < numPoint; i++) + { + doublePoint[i] = _ResUtil::ConvertToPhyCoord(doublePoint[i]); + } + + return this->_pNativeCanvas->FillPolygon(color, doublePoint.get(), numPoint); + } + else + { + return this->_pNativeCanvas->FillPolygon(color, doublePoint.get(), numPoint); + } +} + +result +_CanvasImpl::FillRectangle(const Color& color, const Rectangle& vcRect) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + SysTryReturnResult(NID_GRP, &vcRect, E_OUT_OF_RANGE, "The given rectangle is invalid."); + 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, vcRect.height); + + return _CanvasImplPrivate::FillRectangle(this, color, _Util::Convert >(vcRect)); +} + +result +_CanvasImpl::FillRectangle(const Color& color, const FloatRectangle& vcRect) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + SysTryReturnResult(NID_GRP, &vcRect, E_OUT_OF_RANGE, "The given rectangle is invalid."); + SysTryReturnResult(NID_GRP, (vcRect.width >= 0.0f) && (vcRect.height >= 0.0f), E_OUT_OF_RANGE, "The given rectangle(width:%f,height:%f) is out of range.", vcRect.width, vcRect.height); + + return _CanvasImplPrivate::FillRectangle(this, color, _Util::Convert >(vcRect)); +} + +result +_CanvasImpl::FillRoundRectangle(const Color& color, const Rectangle& vcRect, const Dimension& vcArcDim) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + SysTryReturnResult(NID_GRP, (&vcRect) && (&vcArcDim), E_OUT_OF_RANGE, "The given rectangle is invalid."); + 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, vcRect.height); + SysTryReturnResult(NID_GRP, (vcArcDim.width >= 0) && (vcArcDim.height >= 0), E_OUT_OF_RANGE, "The given arc size(width:%d,height:%d) is out of range.", vcArcDim.width, vcArcDim.height); + + return _CanvasImplPrivate::FillRoundRectangle(this, color, _Util::Convert >(vcRect), _Util::Convert >(vcArcDim)); +} + +result +_CanvasImpl::FillRoundRectangle(const Color& color, const FloatRectangle& vcRect, const FloatDimension& vcArcDim) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + SysTryReturnResult(NID_GRP, (&vcRect) && (&vcArcDim), E_OUT_OF_RANGE, "The given rectangle is invalid."); + SysTryReturnResult(NID_GRP, (vcRect.width >= 0.0f) && (vcRect.height >= 0.0f), E_OUT_OF_RANGE, "The given rectangle(width:%f,height:%f) is out of range.", vcRect.width, vcRect.height); + SysTryReturnResult(NID_GRP, (vcArcDim.width >= 0.0f) && (vcArcDim.height >= 0.0f), E_OUT_OF_RANGE, "The given arc size(width:%f,height:%f) is out of range.", vcArcDim.width, vcArcDim.height); + + return _CanvasImplPrivate::FillRoundRectangle(this, color, _Util::Convert >(vcRect), _Util::Convert >(vcArcDim)); +} + +result +_CanvasImpl::FillTriangle(const Color& color, const FloatPoint& vcPoint1, const FloatPoint& vcPoint2, const FloatPoint& vcPoint3) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + return _CanvasImplPrivate::FillTriangle(this, color, + _Util::Convert >(vcPoint1), + _Util::Convert >(vcPoint2), + _Util::Convert >(vcPoint3)); +} + +result +_CanvasImpl::FillTriangle(const Color& color, const Point& vcPoint1, const Point& vcPoint2, const Point& vcPoint3) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + return _CanvasImplPrivate::FillTriangle(this, color, + _Util::Convert >(vcPoint1), + _Util::Convert >(vcPoint2), + _Util::Convert >(vcPoint3)); +} + +result +_CanvasImpl::DrawText(const Point& vcPoint, const Tizen::Base::String& text) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + SysTryReturnResult(NID_GRP, text.GetLength() >= 0, E_INVALID_ARG, "The text length (%d) is not valid.", text.GetLength()); + + if (_ResUtil::NeedToConvertCoord()) + { + Point pcPoint = _ResUtil::ConvertToPhyCoord(vcPoint); + + return this->_pNativeCanvas->DrawText(pcPoint, text); + } + else + { + return this->_pNativeCanvas->DrawText(vcPoint, text); + } +} + +result +_CanvasImpl::DrawText(const Point& vcPoint, const Tizen::Base::String& text, int startIndex, int length) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + SysTryReturnResult(NID_GRP, text.GetLength() >= 0, E_INVALID_ARG, "The text length (%d) is not valid.", text.GetLength()); + SysTryReturnResult(NID_GRP, length >= 0 && startIndex >= 0 && startIndex < text.GetLength(), E_OUT_OF_RANGE, "The value of the length (%d), startIndex(%d) are outside the valid range defined by the method.", length, startIndex); + + if (text.GetLength() == 0) + { + return E_SUCCESS; + } + + if (_ResUtil::NeedToConvertCoord()) + { + Point pcPt = _ResUtil::ConvertToPhyCoord(vcPoint); + + return this->_pNativeCanvas->DrawText(pcPt, text, startIndex, length); + } + else + { + return this->_pNativeCanvas->DrawText(vcPoint, text, startIndex, length); + } +} + +result +_CanvasImpl::DrawText(const Point& vcPoint, const Tizen::Base::String& text, int startIndex, const Color& outlineColor) +{ + const char* pNotConstructedYet = "[E_OPERATION_FAILED] This instance is not constructed yet."; + + SysTryReturn(NID_GRP, this, E_OPERATION_FAILED, E_OPERATION_FAILED, pNotConstructedYet); + SysTryReturn(NID_GRP, this->_pNativeCanvas, E_OPERATION_FAILED, E_OPERATION_FAILED, pNotConstructedYet); + SysTryReturn(NID_GRP, this->_pNativeCanvas->IsValid(), E_OPERATION_FAILED, E_OPERATION_FAILED, pNotConstructedYet); + + SysTryReturnResult(NID_GRP, text.GetLength() >= 0, E_INVALID_ARG, "The text length (%d) is not valid.", text.GetLength()); + + return this->DrawText(vcPoint, text, startIndex, text.GetLength(), outlineColor); +} + +result +_CanvasImpl::DrawText(const Point& vcPoint, const Tizen::Base::String& text, int startIndex, int length, const Color& outlineColor) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + SysTryReturnResult(NID_GRP, text.GetLength() >= 0, E_INVALID_ARG, "The text length (%d) is not valid.", text.GetLength()); + + SysTryReturnResult(NID_GRP, length >= 0, E_OUT_OF_RANGE, + "The value of the length (%d) is outside the valid range defined by the method.", + length); + + if (text.GetLength() == 0) + { + return E_SUCCESS; + } + + if (_ResUtil::NeedToConvertCoord()) + { + Point pcPoint = _ResUtil::ConvertToPhyCoord(vcPoint); + + return this->_pNativeCanvas->DrawText(pcPoint, text, startIndex, length, outlineColor); + } + else + { + return this->_pNativeCanvas->DrawText(vcPoint, text, startIndex, length, outlineColor); + } +} + +result +_CanvasImpl::DrawText(const Point& vcPoint, const EnrichedText& etext) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + const _EnrichedTextImpl* pImpl = _EnrichedTextImpl::GetInstance(etext); + + if (pImpl == null) + { + return E_OPERATION_FAILED; + } + + Tizen::Graphics::_Text::TextObject* pTextObject = const_cast <_EnrichedTextImpl*>(pImpl)->GetTextObject(); + + if (pTextObject == null) + { + return E_OPERATION_FAILED; + } + + FloatRectangle bounds = pImpl->GetBoundsF(); + FloatRectangle rect(float(vcPoint.x), float(vcPoint.y), bounds.width, bounds.height); + + pTextObject->SetBounds(rect); + pTextObject->Draw(*this); + + return E_SUCCESS; +} + +result +_CanvasImpl::DrawText(const FloatPoint& vcPointF, const Tizen::Base::String& text) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + SysTryReturnResult(NID_GRP, text.GetLength() >= 0, E_INVALID_ARG, "The text length (%d) is not valid.", text.GetLength()); + + if (_ResUtil::NeedToConvertCoord()) + { + Point pcPoint; + pcPoint.x = _FloatToIntForPos(_ResUtil::ConvertToPhyCoord(vcPointF.x)); + pcPoint.y = _FloatToIntForPos(_ResUtil::ConvertToPhyCoord(vcPointF.y)); + + return this->_pNativeCanvas->DrawText(pcPoint, text); + } + else + { + Point vcPoint; + vcPoint.x = _FloatToIntForPos(vcPointF.x); + vcPoint.y = _FloatToIntForPos(vcPointF.y); + + return this->_pNativeCanvas->DrawText(vcPoint, text); + } +} + +result +_CanvasImpl::DrawText(const FloatPoint& vcPointF, const Tizen::Base::String& text, int startIndex, int length) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + SysTryReturnResult(NID_GRP, text.GetLength() >= 0, E_INVALID_ARG, "The text length (%d) is not valid.", text.GetLength()); + SysTryReturnResult(NID_GRP, length >= 0 && startIndex >= 0 && startIndex < text.GetLength(), E_OUT_OF_RANGE, "The value of the length (%d), startIndex(%d) are outside the valid range defined by the method.", length, startIndex); + + if (text.GetLength() == 0) + { + return E_SUCCESS; + } + + if (_ResUtil::NeedToConvertCoord()) + { + Point pcPoint; + pcPoint.x = _FloatToIntForPos(_ResUtil::ConvertToPhyCoord(vcPointF.x)); + pcPoint.y = _FloatToIntForPos(_ResUtil::ConvertToPhyCoord(vcPointF.y)); + + return this->_pNativeCanvas->DrawText(pcPoint, text, startIndex, length); + } + else + { + Point vcPoint; + vcPoint.x = _FloatToIntForPos(vcPointF.x); + vcPoint.y = _FloatToIntForPos(vcPointF.y); + + return this->_pNativeCanvas->DrawText(vcPoint, text, startIndex, length); + } +} + +result +_CanvasImpl::DrawText(const FloatPoint& vcPointF, const Tizen::Base::String& text, int startIndex, const Color& outlineColor) +{ + const char* pNotConstructedYet = "[E_OPERATION_FAILED] This instance is not constructed yet."; + + SysTryReturn(NID_GRP, this, E_OPERATION_FAILED, E_OPERATION_FAILED, pNotConstructedYet); + SysTryReturn(NID_GRP, this->_pNativeCanvas, E_OPERATION_FAILED, E_OPERATION_FAILED, pNotConstructedYet); + SysTryReturn(NID_GRP, this->_pNativeCanvas->IsValid(), E_OPERATION_FAILED, E_OPERATION_FAILED, pNotConstructedYet); + + SysTryReturnResult(NID_GRP, text.GetLength() >= 0, E_INVALID_ARG, "The text length (%d) is not valid.", text.GetLength()); + + Point vcPoint; + vcPoint.x = _FloatToIntForPos(vcPointF.x); + vcPoint.y = _FloatToIntForPos(vcPointF.y); + + return this->DrawText(vcPoint, text, startIndex, text.GetLength(), outlineColor); +} + +result +_CanvasImpl::DrawText(const FloatPoint& vcPointF, const Tizen::Base::String& text, int startIndex, int length, const Color& outlineColor) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + SysTryReturnResult(NID_GRP, text.GetLength() >= 0, E_INVALID_ARG, "The text length (%d) is not valid.", text.GetLength()); + + SysTryReturnResult(NID_GRP, length >= 0, E_OUT_OF_RANGE, + "The value of the length (%d) is outside the valid range defined by the method.", + length); + + if (text.GetLength() == 0) + { + return E_SUCCESS; + } + + if (_ResUtil::NeedToConvertCoord()) + { + Point pcPoint; + pcPoint.x = _FloatToIntForPos(_ResUtil::ConvertToPhyCoord(vcPointF.x)); + pcPoint.y = _FloatToIntForPos(_ResUtil::ConvertToPhyCoord(vcPointF.y)); + + return this->_pNativeCanvas->DrawText(pcPoint, text, startIndex, length, outlineColor); + } + else + { + Point vcPoint; + vcPoint.x = _FloatToIntForPos(vcPointF.x); + vcPoint.y = _FloatToIntForPos(vcPointF.y); + + return this->_pNativeCanvas->DrawText(vcPoint, text, startIndex, length, outlineColor); + } +} + +result +_CanvasImpl::DrawText(const FloatPoint& vcPointF, const EnrichedText& etext) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + const _EnrichedTextImpl* pImpl = _EnrichedTextImpl::GetInstance(etext); + + if (pImpl == null) + { + return E_OPERATION_FAILED; + } + + Tizen::Graphics::_Text::TextObject* pTextObject = const_cast <_EnrichedTextImpl*>(pImpl)->GetTextObject(); + + if (pTextObject == null) + { + return E_OPERATION_FAILED; + } + + FloatRectangle bounds = pImpl->GetBoundsF(); + FloatRectangle rect(vcPointF.x, vcPointF.y, bounds.width, bounds.height); + + pTextObject->SetBounds(rect); + pTextObject->Draw(*this); + + return E_SUCCESS; +} + +Rectangle +_CanvasImpl::GetBounds(void) const +{ + SysTryReturn(NID_GRP, INSTANCE_IS_VALID, Rectangle(), E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not constructed yet."); + + if (_ResUtil::NeedToConvertCoord()) + { + const _Util::Point& pos = this->_pCoordHolder->canvasPos.vcInt; + const _Util::Dimension& vcSize = this->_pCoordHolder->canvasSize.vcInt; + const Rectangle boundsFromPi = this->_pNativeCanvas->GetBounds(); + + if ((vcSize.w == 0 && boundsFromPi.width > 0) || (vcSize.h == 0 && boundsFromPi.height > 0)) + { + _CanvasImpl* pThis = const_cast<_CanvasImpl*>(this); + + _Util::Dimension intPcSize = { boundsFromPi.width, boundsFromPi.height }; + + pThis->_pCoordHolder->AssignCanvasSizeFromPcSize(intPcSize); + } + + // exception from the window canvas + if (boundsFromPi.x == 0 && boundsFromPi.y == 0) + { + return Rectangle(0, 0, vcSize.w, vcSize.h); + } + else + { + return Rectangle(pos.x, pos.y, vcSize.w, vcSize.h); + } + } + else + { + return this->_pNativeCanvas->GetBounds(); + } +} + +FloatRectangle +_CanvasImpl::GetBoundsF(void) const +{ + SysTryReturn(NID_GRP, INSTANCE_IS_VALID, FloatRectangle(), E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not constructed yet."); + + const Rectangle boundsFromPi = this->_pNativeCanvas->GetBounds(); + + if (_ResUtil::NeedToConvertCoord()) + { + const _Util::Point& posF = this->_pCoordHolder->canvasPos.vcFloat; + const _Util::Dimension& vcSizeF = this->_pCoordHolder->canvasSize.vcFloat; + + // exception from the window canvas + if (boundsFromPi.x == 0 && boundsFromPi.y == 0) + { + return FloatRectangle(0.0f, 0.0f, vcSizeF.w, vcSizeF.h); + } + else + { + return FloatRectangle(posF.x, posF.y, vcSizeF.w, vcSizeF.h); + } + } + else + { + return FloatRectangle(static_cast(boundsFromPi.x), static_cast(boundsFromPi.x), static_cast(boundsFromPi.width), static_cast(boundsFromPi.height)); + } +} + + +FloatRectangle +_CanvasImpl::GetActualBounds(void) const +{ + SysTryReturn(NID_GRP, INSTANCE_IS_VALID, FloatRectangle(), E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not constructed yet."); + + const Rectangle boundsFromPi = this->_pNativeCanvas->GetBounds(); + + if (_ResUtil::NeedToConvertCoord()) + { + const _Util::Point& actualPosF = this->_pCoordHolder->canvasPos.vcFloatActual; + const _Util::Dimension& vcActualSizeF = this->_pCoordHolder->canvasSize.vcFloatActual; + + // exception from the window canvas + if (boundsFromPi.x == 0 && boundsFromPi.y == 0) + { + return FloatRectangle(0.0f, 0.0f, vcActualSizeF.w, vcActualSizeF.h); + } + else + { + return FloatRectangle(actualPosF.x, actualPosF.y, vcActualSizeF.w, vcActualSizeF.h); + } + } + else + { + return FloatRectangle(static_cast(boundsFromPi.x), static_cast(boundsFromPi.x), static_cast(boundsFromPi.width), static_cast(boundsFromPi.height)); + } +} + +LineStyle +_CanvasImpl::GetLineStyle() const +{ + SysTryReturn(NID_GRP, INSTANCE_IS_VALID, LINE_STYLE_MAX, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not constructed yet."); + + return this->_pNativeCanvas->GetLineStyle(); +} + +int +_CanvasImpl::GetLineWidth() const +{ + SysTryReturn(NID_GRP, INSTANCE_IS_VALID, -1, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not constructed yet."); + + return this->_pCoordHolder->lineWidth.vcInt; +} + +float +_CanvasImpl::GetLineWidthF() const +{ + SysTryReturn(NID_GRP, INSTANCE_IS_VALID, -1.0f, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not constructed yet."); + + return this->_pCoordHolder->lineWidth.vcFloat; +} + +LineCapStyle +_CanvasImpl::GetLineCapStyle() const +{ + SysTryReturn(NID_GRP, INSTANCE_IS_VALID, LINE_CAP_STYLE_ROUND, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not constructed yet."); + + return this->_pNativeCanvas->GetLineCapStyle(); +} + +LineJoinStyle +_CanvasImpl::GetLineJoinStyle() const +{ + SysTryReturn(NID_GRP, INSTANCE_IS_VALID, LINE_JOIN_STYLE_ROUND, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not constructed yet."); + + return this->_pNativeCanvas->GetLineJoinStyle(); +} + +result +_CanvasImpl::SetLineStyle(LineStyle style) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + SysTryReturnResult(NID_GRP, LINE_STYLE_MIN < style && style < LINE_STYLE_MAX, E_INVALID_ARG, "The given line style(%d) is out of range.", style); + + return this->_pNativeCanvas->SetLineStyle(style); +} + +result +_CanvasImpl::SetLineWidth(int vcWidth) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + SysTryReturnResult(NID_GRP, vcWidth > 0, E_OUT_OF_RANGE, "The given line width(%d) is out of range.", vcWidth); + + result r = E_SUCCESS; + + if (_ResUtil::NeedToConvertCoord()) + { + int pcWidth = _ResUtil::ConvertToPhyCoordSize(vcWidth); + float pcWidthF = _ResUtil::ConvertToPhyCoordSize(float(vcWidth)); + + if (vcWidth > 0 && pcWidth == 0) + { + pcWidth = 1; + } + + r = this->_pNativeCanvas->SetLineWidth(pcWidth, pcWidthF); + } + else + { + r = this->_pNativeCanvas->SetLineWidth(vcWidth, float(vcWidth)); + } + + if (IsSucceeded(r)) + { + this->_pCoordHolder->AssignLineWidthFromVc(vcWidth); + } + + return r; +} + +result +_CanvasImpl::SetLineWidth(float vcWidthF) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + SysTryReturnResult(NID_GRP, vcWidthF > 0.0f, E_OUT_OF_RANGE, "The given line width(%f) is out of range.", vcWidthF); + + result r = E_SUCCESS; + + if (_ResUtil::NeedToConvertCoord()) + { + float pcWidthF = _ResUtil::ConvertToPhyCoordSize(vcWidthF); + + r = this->_pNativeCanvas->SetLineWidth(pcWidthF); + } + else + { + r = this->_pNativeCanvas->SetLineWidth(vcWidthF); + } + + if (IsSucceeded(r)) + { + this->_pCoordHolder->AssignLineWidthFromVc(vcWidthF); + } + + return r; +} + +result +_CanvasImpl::SetLineCapStyle(LineCapStyle lineCapStyle) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + switch (lineCapStyle) + { + case LINE_CAP_STYLE_ROUND: + case LINE_CAP_STYLE_BUTT: + case LINE_CAP_STYLE_SQUARE: + break; + default: + SysTryReturnResult(NID_GRP, false, E_INVALID_ARG, "The given line cap style is out of range."); + } + + return this->_pNativeCanvas->SetLineCapStyle(lineCapStyle); +} + +result +_CanvasImpl::SetLineJoinStyle(LineJoinStyle lineJoinStyle) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + switch (lineJoinStyle) + { + case LINE_JOIN_STYLE_ROUND: + case LINE_JOIN_STYLE_MITER: + case LINE_JOIN_STYLE_BEVEL: + break; + default: + SysTryReturnResult(NID_GRP, false, E_INVALID_ARG, "The given line join style is out of range."); + } + + return this->_pNativeCanvas->SetLineJoinStyle(lineJoinStyle); +} + +result +_CanvasImpl::GetDashPattern(Tizen::Base::Collection::IListT& pattern, int& offset) +{ + SysTryReturn(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not constructed yet."); + + pattern.RemoveAll(); + + result r = E_SUCCESS; + + float floatValue = 0.0f; + + for (int i = 0; i < this->_dashList.GetCount(); i++) + { + this->_dashList.GetAt(i, floatValue); + + r = pattern.Add(_FloatToIntForPos(floatValue)); + + if (r != E_SUCCESS) + { + break; + } + } + + if (IsFailed(r)) + { + switch (r) + { + case E_INVALID_ARG: + case E_OPERATION_FAILED: + case E_OUT_OF_MEMORY: + SysTryReturn(NID_GRP, false, r, r, "[%s] Propagating.", GetErrorMessage(r)); + break; + default: + SysTryReturn(NID_GRP, false, E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Tizen::Base::Collection::ArrayListT::AddItems() failed"); + break; + } + } + + offset = int(this->_dashOffset); + + return r; +} + +result +_CanvasImpl::GetDashPattern(Tizen::Base::Collection::IListT& pattern, float& offset) +{ + SysTryReturn(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not constructed yet."); + + pattern.RemoveAll(); + + result r = pattern.AddItems(this->_dashList); + + if (IsFailed(r)) + { + switch (r) + { + case E_INVALID_ARG: + case E_OPERATION_FAILED: + case E_OUT_OF_MEMORY: + SysTryReturn(NID_GRP, false, r, r, "[%s] Propagating.", GetErrorMessage(r)); + break; + default: + SysTryReturn(NID_GRP, false, E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Tizen::Base::Collection::ArrayListT::AddItems() failed"); + break; + } + } + + offset = static_cast(this->_dashOffset); + + return r; +} + +result +_CanvasImpl::SetDashPattern(const Tizen::Base::Collection::IListT& pattern, int offset) +{ + SysTryReturn(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not constructed yet."); + + int dashValue = 0; + + for (int i = 0; i < pattern.GetCount(); i++) + { + pattern.GetAt(i, dashValue); + SysTryReturn(NID_GRP, dashValue >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] One of the values of the specified pattern is negative(%d).", dashValue); + } + + result r = E_SUCCESS; + + // It is NOT the strong guarantee for an exception + this->_dashList.RemoveAll(); + + int intValue = 0; + + for (int i = 0; i < pattern.GetCount(); i++) + { + pattern.GetAt(i, intValue); + r = this->_dashList.Add(float(intValue)); + if (r != E_SUCCESS) + { + break; + } + } + + if (IsFailed(r)) + { + switch (r) + { + case E_INVALID_ARG: + case E_OPERATION_FAILED: + case E_OUT_OF_MEMORY: + SysTryReturn(NID_GRP, false, r, r, "[%s] Propagating.", GetErrorMessage(r)); + break; + default: + SysTryReturn(NID_GRP, false, E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Tizen::Base::Collection::ArrayListT::AddItems() failed"); + break; + } + } + + { + int dashIntValue = 0; + Tizen::Graphics::_Util::AccumList dashValueList; + + for (int i = 0; i < pattern.GetCount(); i++) + { + pattern.GetAt(i, dashIntValue); + dashValueList.Push(double(dashIntValue)); + } + + r = this->_pNativeCanvas->SetDashPattern(dashValueList, double(offset)); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + this->_dashOffset = offset; + } + + return r; +} + +result +_CanvasImpl::SetDashPattern(const Tizen::Base::Collection::IListT& pattern, float offset) +{ + SysTryReturn(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not constructed yet."); + + float dashValue = 0.0f; + + for (int i = 0; i < pattern.GetCount(); i++) + { + pattern.GetAt(i, dashValue); + SysTryReturn(NID_GRP, dashValue >= 0.0f, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] One of the values of the specified pattern is negative(%f).", dashValue); + } + + result r = E_SUCCESS; + + // It is NOT the strong guarantee for an exception + this->_dashList.RemoveAll(); + + r = this->_dashList.AddItems(pattern); + + if (IsFailed(r)) + { + switch (r) + { + case E_INVALID_ARG: + case E_OPERATION_FAILED: + case E_OUT_OF_MEMORY: + SysTryReturn(NID_GRP, false, r, r, "[%s] Propagating.", GetErrorMessage(r)); + break; + default: + SysTryReturn(NID_GRP, false, E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Tizen::Base::Collection::ArrayListT::AddItems() failed"); + break; + } + } + + { + float dashFloatValue = 0.0f; + Tizen::Graphics::_Util::AccumList dashValueList; + + for (int i = 0; i < pattern.GetCount(); i++) + { + pattern.GetAt(i, dashFloatValue); + dashValueList.Push(double(dashFloatValue)); + } + + r = this->_pNativeCanvas->SetDashPattern(dashValueList, double(offset)); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + this->_dashOffset = _FloatToIntForPos(offset); + } + + return r; +} + +result +_CanvasImpl::SetDrawingQuality(BitmapDrawingQuality quality) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + switch (quality) + { + case BITMAP_DRAWING_QUALITY_LOW: + case BITMAP_DRAWING_QUALITY_MID: + case BITMAP_DRAWING_QUALITY_HIGH: + break; + default: + SysLogException(NID_GRP, E_INVALID_ARG, "The specified drawing quality(%d) is invalid.", quality); + return E_INVALID_ARG; + } + + this->_pNativeCanvas->SetDrawingQuality(quality); + + return E_SUCCESS; +} + +BitmapDrawingQuality +_CanvasImpl::GetDrawingQuality(void) const +{ + return (INSTANCE_IS_VALID) ? this->_pNativeCanvas->GetDrawingQuality() : BITMAP_DRAWING_QUALITY_LOW; +} + +result +_CanvasImpl::SetCompositeMode(CompositeMode compositeMode) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + switch (compositeMode) + { + case COMPOSITE_MODE_CLEAR: + case COMPOSITE_MODE_SRC: + case COMPOSITE_MODE_DST: + case COMPOSITE_MODE_SRC_OVER: + case COMPOSITE_MODE_DST_OVER: + case COMPOSITE_MODE_SRC_IN: + case COMPOSITE_MODE_DST_IN: + case COMPOSITE_MODE_SRC_OUT: + case COMPOSITE_MODE_DST_OUT: + case COMPOSITE_MODE_SRC_ATOP: + case COMPOSITE_MODE_DST_ATOP: + case COMPOSITE_MODE_DST_XOR: + case COMPOSITE_MODE_ADD: + case COMPOSITE_MODE_SATURATE: + case COMPOSITE_MODE_MULTIPLY: + case COMPOSITE_MODE_SCREEN: + case COMPOSITE_MODE_OVERLAY: + case COMPOSITE_MODE_DARKEN: + case COMPOSITE_MODE_LIGHTEN: + break; + default: + SysLogException(NID_GRP, E_INVALID_ARG, "The specified composite mode(%d) is invalid.", compositeMode); + return E_INVALID_ARG; + } + + this->_pNativeCanvas->SetCompositeMode(compositeMode); + + return E_SUCCESS; +} + +CompositeMode +_CanvasImpl::GetCompositeMode(void) const +{ + return (INSTANCE_IS_VALID) ? this->_pNativeCanvas->GetCompositeMode() : COMPOSITE_MODE_SRC_OVER; +} + +result +_CanvasImpl::GetPixel(const Point& vcPoint, Color& color) const +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + Rectangle rtCanvas = _GetBoundsRel(*this); + + SysTryReturnResult(NID_GRP, !rtCanvas.IsEmpty(), E_OUT_OF_RANGE, "Cannot get the bounds of the canvas."); + + result r = _Util::Validate(vcPoint, rtCanvas); + + SysTryReturnResult(NID_GRP, !IsFailed(r), r, "Propagating."); + + if (_ResUtil::NeedToConvertCoord()) + { + Point pcPoint = _ResUtil::ConvertToPhyCoord(vcPoint); + + return this->_pNativeCanvas->GetPixel(pcPoint, color); + } + else + { + return this->_pNativeCanvas->GetPixel(vcPoint, color); + } +} + +result +_CanvasImpl::GetPixel(const FloatPoint& vcPointF, Color& color) const +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + FloatRectangle rtCanvasF = _GetBoundsRelF(*this); + + SysTryReturnResult(NID_GRP, !rtCanvasF.IsEmpty(), E_OUT_OF_RANGE, "Cannot get the bounds of the canvas."); + + result r = _Util::Validate(vcPointF, rtCanvasF); + + SysTryReturnResult(NID_GRP, !IsFailed(r), r, "Propagating."); + + if (_ResUtil::NeedToConvertCoord()) + { + FloatPoint pcPointF = _ResUtil::ConvertToPhyCoord(vcPointF); + + Point pcPoint(_FloatToIntForPos(pcPointF.x), _FloatToIntForPos(pcPointF.y)); + + return this->_pNativeCanvas->GetPixel(pcPoint, color); + } + else + { + Point vcPoint(_FloatToIntForPos(vcPointF.x), _FloatToIntForPos(vcPointF.y)); + + return this->_pNativeCanvas->GetPixel(vcPoint, color); + } +} + +result +_CanvasImpl::SetPixel(const FloatPoint& vcPoint) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + return _CanvasImplPrivate::SetPixel(this, _Util::Convert >(vcPoint)); +} + +result +_CanvasImpl::SetPixel(const Point& vcPoint) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + return _CanvasImplPrivate::SetPixel(this, _Util::Convert >(vcPoint)); +} + +result +_CanvasImpl::Show() +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + if (this->_pShowCallbackFunc) + { + if (this->_pShowCallbackFunc(this->_pShowCallbackParam)) + { + return E_SUCCESS; + } + } + + result r = E_SUCCESS; + Rectangle rect = this->GetBounds(); + + r = this->_pNativeCanvas->Show(); + + return r; +} + +result +_CanvasImpl::Show(const Rectangle& vcRect) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + SysTryReturnResult(NID_GRP, &vcRect, E_OUT_OF_RANGE, "The given rectangle is invalid."); + 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, + vcRect.height); + + if (this->_pShowCallbackFunc) + { + if (this->_pShowCallbackFunc(this->_pShowCallbackParam)) + { + return E_SUCCESS; + } + } + + result r = E_SUCCESS; + Rectangle rect = this->GetBounds(); + + if (_ResUtil::NeedToConvertCoord()) + { + Rectangle pcRect = _ResUtil::ConvertToPhyCoord(vcRect); + + r = this->_pNativeCanvas->Show(pcRect); + } + else + { + r = this->_pNativeCanvas->Show(vcRect); + } + + return r; +} + +result +_CanvasImpl::SetFont(const Font& font) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + SysTryReturnResult(NID_GRP, _FontImpl::GetInstance(font) && _FontImpl::GetInstance(font)->IsConstructed(), E_INVALID_ARG, "The given font is not constructed."); + SysTryReturnResult(NID_GRP, font.GetMaxHeight() > 0 && font.GetMaxWidth() > 0, E_INVALID_ARG, "The infomation of the given font is not valid. (maxWidth=%d,maxHeight=%d).", font.GetMaxWidth(), font.GetMaxHeight()); + + // should keep clone font + Font* pFont = _FontImpl::CloneN(font); + + if (pFont == null) + { + SysTryLog(NID_GRP, pFont, "[] Fails to allocate memory for font resource."); + + this->_pFont = null; + + // shkim, TODO. + // we failed to make cloned font. so, return what? E_SYSTEM which is not defined in header?? or use E_OPERATION_FAILED again for different meaning? + // or just setting defult font?! + return E_OPERATION_FAILED; + } + + EXTRACT_FONTEX(pFontEx, *pFont); + result r = this->_pNativeCanvas->SetFont(*pFontEx); + SysTryCatch(NID_GRP, E_SUCCESS == r, r = E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Fails to set font."); + + // succeed making cloned font, then keep it and replace old one. + if (this->_pFont) + { + delete this->_pFont; + this->_pFont = null; + } + + this->_pFont = pFont; + + return r; + +CATCH: + delete pFont; + pFont = null; + + return r; +} + +Font* +_CanvasImpl::GetFontN(void) +{ + result r = E_SUCCESS; + Font* pFont = null; + + // clear last error + ClearLastResult(); + + SysTryCatch(NID_GRP, INSTANCE_IS_VALID, r = E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not constructed yet."); + + // we have the font user set + if (this->_pFont) + { + pFont = _FontImpl::CloneN(*(this->_pFont)); + SysTryCatch(NID_GRP, pFont, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to create Font instance."); + } + else + { + pFont = new Font(); + 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); + SysTryCatch(NID_GRP, IsSucceeded(r), , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + SetLastResult(r); + return pFont; + +CATCH: + if (pFont) + { + delete pFont; + } + + SetLastResult(r); + + return null; +} + +void +_CanvasImpl::SetTextOrigin(TextOrigin origin) +{ + if (INSTANCE_IS_VALID) + { + switch (origin) + { + case TEXT_ORIGIN_LEFT_TOP: + case TEXT_ORIGIN_BASELINE: + this->_pNativeCanvas->__textOrigin = origin; + break; + } + } +} + +result +_CanvasImpl::SetClipBounds(const Rectangle& vcRect) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + SysTryReturnResult(NID_GRP, &vcRect, E_OUT_OF_RANGE, "The given rectangle is invalid."); + 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, vcRect.height); + + Rectangle rtCanvas = _GetBoundsRel(*this); + + result r = _Util::Validate(vcRect, rtCanvas); + + SysTryReturnResult(NID_GRP, !IsFailed(r), r, "Propagating."); + + Rectangle revisedVcRect; + + { + int x1 = vcRect.x; + int y1 = vcRect.y; + int x2 = vcRect.x + vcRect.width; + int y2 = vcRect.y + vcRect.height; + + x1 = (x1 > 0) ? x1 : 0; + y1 = (y1 > 0) ? y1 : 0; + x2 = (x2 < rtCanvas.width) ? x2 : rtCanvas.width; + y2 = (y2 < rtCanvas.height) ? y2 : rtCanvas.height; + + revisedVcRect.x = x1; + revisedVcRect.y = y1; + revisedVcRect.width = x2 - x1; + revisedVcRect.height = y2 - y1; + } + + if (_ResUtil::NeedToConvertCoord()) + { + Rectangle pcRect = _ResUtil::ConvertToPhyCoord(revisedVcRect); + + // special case + pcRect.width = (pcRect.width >= 0) ? pcRect.width : 1; + pcRect.height = (pcRect.height >= 0) ? pcRect.height : 1; + + result r = this->_pNativeCanvas->SetClipBounds(pcRect); + + if (IsSucceeded(r)) + { + _Util::Rectangle vcRevisedRect = + { + revisedVcRect.x, + revisedVcRect.y, + revisedVcRect.width, + revisedVcRect.height + }; + + this->_pCoordHolder->AssignClipBoundsFromVcSize(vcRevisedRect); + } + + return r; + } + else + { + result r = this->_pNativeCanvas->SetClipBounds(revisedVcRect); + + if (IsSucceeded(r)) + { + _Util::Rectangle vcRevisedRect = + { + revisedVcRect.x, + revisedVcRect.y, + revisedVcRect.width, + revisedVcRect.height + }; + + this->_pCoordHolder->AssignClipBoundsFromVcSize(vcRevisedRect); + } + + return r; + } +} + +result +_CanvasImpl::SetClipBounds(const FloatRectangle& vcRectF) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + SysTryReturnResult(NID_GRP, &vcRectF, E_OUT_OF_RANGE, "The given rectangle is invalid."); + 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, vcRectF.height); + + FloatRectangle rtCanvasF = _GetBoundsRelF(*this); + + result r = _Util::Validate(vcRectF, rtCanvasF); + + SysTryReturnResult(NID_GRP, !IsFailed(r), r, "Propagating."); + + FloatRectangle revisedVcRectF; + + { + float x1 = vcRectF.x; + float y1 = vcRectF.y; + float x2 = vcRectF.x + vcRectF.width; + float y2 = vcRectF.y + vcRectF.height; + + x1 = (x1 > 0) ? x1 : 0; + y1 = (y1 > 0) ? y1 : 0; + x2 = (x2 < rtCanvasF.width) ? x2 : rtCanvasF.width; + y2 = (y2 < rtCanvasF.height) ? y2 : rtCanvasF.height; + + revisedVcRectF.x = x1; + revisedVcRectF.y = y1; + revisedVcRectF.width = x2 - x1; + revisedVcRectF.height = y2 - y1; + } + + _CanvasCoordHolder coordHolder; + + { + _Util::Rectangle tempRevisedVcRectF = + { + revisedVcRectF.x, + revisedVcRectF.y, + revisedVcRectF.width, + revisedVcRectF.height + }; + + coordHolder.AssignClipBoundsFromVcSize(tempRevisedVcRectF); + } + + Rectangle pcRect + ( + coordHolder.clipBounds.pcInt.x, + coordHolder.clipBounds.pcInt.y, + coordHolder.clipBounds.pcInt.w, + coordHolder.clipBounds.pcInt.h + ); + + r = this->_pNativeCanvas->SetClipBounds(pcRect); + + if (IsSucceeded(r)) + { + this->_pCoordHolder->clipBounds = coordHolder.clipBounds; + } + + return r; +} + +Rectangle +_CanvasImpl::GetClipBounds(void) const +{ + Rectangle rect; + + SysTryReturn(NID_GRP, INSTANCE_IS_VALID, rect, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not constructed yet."); + + if (_ResUtil::NeedToConvertCoord()) + { + const _Util::Rectangle& bounds = this->_pCoordHolder->clipBounds.vcInt; + + return Rectangle(bounds.x, bounds.y, bounds.w, bounds.h); + } + else + { + return this->_pNativeCanvas->GetClipBounds(); + } +} + +FloatRectangle +_CanvasImpl::GetClipBoundsF(void) const +{ + FloatRectangle rectF; + + SysTryReturn(NID_GRP, INSTANCE_IS_VALID, rectF, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not constructed yet."); + + const _Util::Rectangle& boundsF = this->_pCoordHolder->clipBounds.vcFloat; + + return FloatRectangle(boundsF.x, boundsF.y, boundsF.w, boundsF.h); +} + +result +_CanvasImpl::Lock(BufferInfo& info, long timeout) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + SysTryReturnResult(NID_GRP, (static_cast (timeout) == INFINITE) || (timeout >= 0), E_INVALID_ARG, + "'timeout(=%d)' is not valid.", + timeout); + + return this->_pNativeCanvas->Lock(info, timeout); +} + +result +_CanvasImpl::Unlock() +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + return this->_pNativeCanvas->Unlock(); +} + +void +_CanvasImpl::SetForegroundColor(const Color& fgColor) +{ + SysTryReturnVoidResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not constructed yet."); + + return this->_pNativeCanvas->SetForegroundColor(fgColor); +} + +Color +_CanvasImpl::GetForegroundColor(void) const +{ + SysTryReturn(NID_GRP, INSTANCE_IS_VALID, Color::GetColor(COLOR_ID_BLACK), E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not constructed yet."); + + return this->_pNativeCanvas->GetForegroundColor(); +} + +void +_CanvasImpl::SetBackgroundColor(const Color& bgColor) +{ + SysTryReturnVoidResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not constructed yet."); + + return this->_pNativeCanvas->SetBackgroundColor(bgColor); +} + +Color +_CanvasImpl::GetBackgroundColor(void) const +{ + SysTryReturn(NID_GRP, INSTANCE_IS_VALID, Color::GetColor(COLOR_ID_BLACK), E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not constructed yet."); + + return this->_pNativeCanvas->GetBackgroundColor(); +} + +result +_CanvasImpl::SetPosition(const Point& vcPoint) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + return this->SetPosition(vcPoint.x, vcPoint.y); +} + +result +_CanvasImpl::SetPosition(int vcX, int vcY) +{ + SysTryReturnResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "This instance is not constructed yet."); + + _CanvasCoordHolder tempCoordHolder; + tempCoordHolder.AssignCanvasPosFromVc(vcX, vcY); + + result r = E_SUCCESS; + + if (_ResUtil::NeedToConvertCoord()) + { + Point pcPoint(tempCoordHolder.canvasPos.pcInt.x, tempCoordHolder.canvasPos.pcInt.y); + + r = this->_pNativeCanvas->SetPosition(pcPoint.x, pcPoint.y); + } + else + { + r = this->_pNativeCanvas->SetPosition(vcX, vcY); + } + + if (IsSucceeded(r)) + { + this->_pCoordHolder->canvasPos = tempCoordHolder.canvasPos; + } + + return r; + +} + +Canvas* +_CanvasImpl::GetSubCanvasN(const Rectangle& subRegion) const +{ + SysTryReturn(NID_GRP, INSTANCE_IS_VALID, null, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not constructed yet."); + + _Canvas* pSourceNativeCanvas = this->_pNativeCanvas; + + std::auto_ptr subCanvas(new (std::nothrow) Canvas); + + Canvas* pSubCanvas = subCanvas.get(); + + 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] Memory allocation failed."); + + if (_ResUtil::NeedToConvertCoord()) + { + Rectangle subRegionPC = _ResUtil::ConvertToPhyCoord(subRegion); + + subRegionPC.width = (subRegionPC.width > 0) ? subRegionPC.width : 1; + subRegionPC.height = (subRegionPC.height > 0) ? subRegionPC.height : 1; + + result r = pSubCanvasImpl->_pNativeCanvas->Construct(pSourceNativeCanvas, subRegionPC); + + SysTryReturn(NID_GRP, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + pSubCanvasImpl->_pCoordHolder->Init(subRegion); + pSubCanvasImpl->_pCoordHolder->canvasSize.pcInt.w = subRegionPC.width; + pSubCanvasImpl->_pCoordHolder->canvasSize.pcInt.h = subRegionPC.height; + } + else + { + result r = pSubCanvasImpl->_pNativeCanvas->Construct(pSourceNativeCanvas, subRegion); + + SysTryReturn(NID_GRP, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + if (this->_pFont) + { + pSubCanvasImpl->SetFont(*this->_pFont); + } + + if (this->_pPriorityFont) + { + pSubCanvasImpl->SetPriorityFont(*this->_pPriorityFont); + } + + return subCanvas.release(); +} + +Canvas* +_CanvasImpl::GetSubCanvasFN(const FloatRectangle& subRegion) const +{ + // @hoonik.lee + Rectangle intSubRegion(static_cast(subRegion.x), static_cast(subRegion.y), static_cast(subRegion.width), static_cast(subRegion.height)); + + return this->GetSubCanvasN(intSubRegion); +} + +void +_CanvasImpl::SetAntialiasingEnabled(bool enable) +{ + SysTryReturnVoidResult(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, "[E_OUT_OF_MEMORY] This instance is not constructed yet."); + + return this->_pNativeCanvas->SetAntialiasingEnabled(enable); +} + +bool +_CanvasImpl::IsAntialiasingEnabled(void) const +{ + SysTryReturn(NID_GRP, INSTANCE_IS_VALID, false, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not constructed yet."); + + return this->_pNativeCanvas->IsAntialiasingEnabled(); +} + +result +_CanvasImpl::SetPriorityFont(const Font& font) +{ + ClearLastResult(); + + // check input param + SysTryReturn(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not constructed yet."); + SysTryReturn(NID_GRP, font.GetMaxHeight() > 0 && font.GetMaxWidth() > 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The infomation of the given font is not valid. (maxWidth=%d, maxHeight=%d).", font.GetMaxWidth(), font.GetMaxHeight()); + + Font* pFont = &(const_cast (font)); + + EXTRACT_FONTEX(pFontEx, *pFont); + result r = this->_pNativeCanvas->SetPriorityFont(*pFontEx); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + // overwrite existing priority font + this->_pPriorityFont = pFont; + + return E_SUCCESS; +} + +void +_CanvasImpl::ResetPriorityFont(void) +{ + if (INSTANCE_IS_VALID) + { + this->_pPriorityFont = null; + this->_pNativeCanvas->ResetPriorityFont(); + } +} + +void +_CanvasImpl::SetStableRenderer(bool isStable) +{ + if (INSTANCE_IS_VALID) + { + this->_pNativeCanvas->__useStableRenderer = isStable; + } +} + +void +_CanvasImpl::SetFrameInfoCallback(void* (*pGetDefaultFrameNativeHandle)(void), void* (*pGetDefaultFrameHandle)(void)) +{ + _GetDefaultFrameEcoreEvasHandle = (pGetDefaultFrameNativeHandle) ? pGetDefaultFrameNativeHandle : _GetNull; + _GetDefaultFrameEvasHandle = (pGetDefaultFrameHandle) ? pGetDefaultFrameHandle : _GetNull; +} + +void +_CanvasImpl::SetThemeInfoCallback(Color (*pGetDefaultForegroundColor)(void), Color (*pGetDefaultBackgroundColor)(void)) +{ + _GetDefaultForegroundColor = (pGetDefaultForegroundColor) ? pGetDefaultForegroundColor : _GetBlack; + _GetDefaultBackgroundColor = (pGetDefaultBackgroundColor) ? pGetDefaultBackgroundColor : _GetWhite; +} + +_CanvasImpl* +_CanvasImpl::GetInstance(Canvas& canvas) +{ + return (&canvas != null) ? canvas.__pImpl : null; +} + +const _CanvasImpl* +_CanvasImpl::GetInstance(const Canvas& canvas) +{ + return (&canvas != null) ? canvas.__pImpl : null; +} + +}} // Tizen::Graphics diff --git a/src/graphics/FGrp_CanvasImplPrivate.h b/src/graphics/FGrp_CanvasImplPrivate.h new file mode 100644 index 0000000..f693599 --- /dev/null +++ b/src/graphics/FGrp_CanvasImplPrivate.h @@ -0,0 +1,432 @@ +// +// 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_CanvasImplPrivate.h + * @brief This is the private header file for the _CanvasImpl class + * + */ + +#ifndef _FGRP_INTERNAL_CANVASIMPL_PRIVATE_H_ +#define _FGRP_INTERNAL_CANVASIMPL_PRIVATE_H_ + + +#include + +#include "FGrp_CanvasImpl.h" +#include "util/FGrp_UtilType.h" + + +namespace // unnamed +{ + +template +Tizen::Graphics::_Util::Rectangle +_GetBoundsRelT(const Tizen::Graphics::_CanvasImpl& canvas) +{ + Tizen::Graphics::Rectangle bounds = canvas.GetBounds(); + + Tizen::Graphics::_Util::Rectangle rect = + { + 0, + 0, + bounds.width, + bounds.height + }; + + return rect; +} + +template +void +_ExpandClippingAreaForLineWidth(Tizen::Graphics::_Util::Rectangle& rtCanvas, T lineWidth) +{ + typedef T Type; + + Type lineWidthHalf = (lineWidth + Type(1)) / Type(2); + + rtCanvas.x -= lineWidthHalf; + rtCanvas.y -= lineWidthHalf; + rtCanvas.w += lineWidthHalf * Type(2); + rtCanvas.h += lineWidthHalf * Type(2); +} + +} + +namespace Tizen { namespace Graphics +{ + +class _CanvasImplPrivate +{ + friend class _CanvasImpl; + + template + static result SetPixel(_CanvasImpl* pThis, const _Util::Point& vcPoint) + { + _Util::Rectangle rtCanvas = _GetBoundsRelT(*pThis); + + if (rtCanvas.w <= 0 || rtCanvas.h <= 0) + { + SysTryReturnResult(NID_GRP, 0, E_OPERATION_FAILED, "Cannot get the bounds of the canvas."); + } + + result r = _Util::ValidateT(vcPoint, rtCanvas); + + if (IsFailed(r)) + { + SysTryReturn(NID_GRP, 0, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + if (_ResUtil::NeedToConvertCoord()) + { + _Util::Point pcPoint = _ResUtil::ConvertToPhyCoord(vcPoint); + + return pThis->_pNativeCanvas->SetPixel(pcPoint); + } + else + { + return pThis->_pNativeCanvas->SetPixel(vcPoint); + } + } + + template + static result DrawRectangle(_CanvasImpl* pThis, const _Util::Rectangle& vcRect) + { + typedef T Type; + + if ((vcRect.w == Type(0)) || (vcRect.h == Type(0))) + { + return E_SUCCESS; + } + + _Util::Rectangle rtCanvas = _GetBoundsRelT(*pThis); + + if (rtCanvas.w <= 0 || rtCanvas.h <= 0) + { + SysTryReturnResult(NID_GRP, 0, E_OPERATION_FAILED, "Cannot get the bounds of the canvas."); + } + + _ExpandClippingAreaForLineWidth(rtCanvas, Type(pThis->GetLineWidth())); + + result r = _Util::ValidateT(vcRect, rtCanvas); + + if (IsFailed(r)) + { + SysTryReturn(NID_GRP, 0, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + if (_ResUtil::NeedToConvertCoord()) + { + _Util::Rectangle pcRect = _ResUtil::ConvertToPhyCoord(vcRect); + + return pThis->_pNativeCanvas->DrawRectangle(pcRect); + } + else + { + return pThis->_pNativeCanvas->DrawRectangle(vcRect); + } + } + + template + static result FillRectangle(_CanvasImpl* pThis, const Color& color, const _Util::Rectangle& vcRect) + { + typedef T Type; + + if ((vcRect.w == Type(0)) || (vcRect.h == Type(0))) + { + return E_SUCCESS; + } + + _Util::Rectangle rtCanvas = _GetBoundsRelT(*pThis); + + if (rtCanvas.w <= 0 || rtCanvas.h <= 0) + { + SysTryReturnResult(NID_GRP, 0, E_OPERATION_FAILED, "Cannot get the bounds of the canvas."); + } + + result r = _Util::ValidateT(vcRect, rtCanvas); + + if (IsFailed(r)) + { + SysTryReturn(NID_GRP, 0, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + if (_ResUtil::NeedToConvertCoord()) + { + _Util::Rectangle pcRect = _ResUtil::ConvertToPhyCoord(vcRect); + + return pThis->_pNativeCanvas->FillRectangle(color, pcRect); + } + else + { + return pThis->_pNativeCanvas->FillRectangle(color, vcRect); + } + } + + template + static result DrawRoundRectangle(_CanvasImpl* pThis, const _Util::Rectangle& vcRect, const _Util::Dimension& vcArcDim) + { + typedef T Type; + + if ((vcRect.w == Type(0)) || (vcRect.h == Type(0))) + { + return E_SUCCESS; + } + + if ((vcArcDim.w == Type(0)) || (vcArcDim.h == Type(0))) + { + return _CanvasImplPrivate::DrawRectangle(pThis, vcRect); + } + + _Util::Rectangle rtCanvas = _GetBoundsRelT(*pThis); + + if (rtCanvas.w <= 0 || rtCanvas.h <= 0) + { + SysTryReturnResult(NID_GRP, 0, E_OPERATION_FAILED, "Cannot get the bounds of the canvas."); + } + + _ExpandClippingAreaForLineWidth(rtCanvas, Type(pThis->GetLineWidth())); + + result r = _Util::ValidateT(vcRect, rtCanvas); + + if (IsFailed(r)) + { + SysTryReturn(NID_GRP, 0, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + if (_ResUtil::NeedToConvertCoord()) + { + _Util::Rectangle pcRect = _ResUtil::ConvertToPhyCoord(vcRect); + _Util::Dimension pcArcDim = _ResUtil::ConvertToPhyCoord(vcArcDim); + + return pThis->_pNativeCanvas->DrawRoundRectangle(pcRect, pcArcDim); + } + else + { + return pThis->_pNativeCanvas->DrawRoundRectangle(vcRect, vcArcDim); + } + } + + template + static result FillRoundRectangle(_CanvasImpl* pThis, const Color& color, const _Util::Rectangle& vcRect, const _Util::Dimension& vcArcDim) + { + typedef T Type; + + if ((vcRect.w == Type(0)) || (vcRect.h == Type(0))) + { + return E_SUCCESS; + } + + _Util::Rectangle rtCanvas = _GetBoundsRelT(*pThis); + + if (rtCanvas.w <= 0 || rtCanvas.h <= 0) + { + SysTryReturnResult(NID_GRP, 0, E_OPERATION_FAILED, "Cannot get the bounds of the canvas."); + } + + result r = _Util::ValidateT(vcRect, rtCanvas); + + if (IsFailed(r)) + { + SysTryReturn(NID_GRP, 0, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + if (_ResUtil::NeedToConvertCoord()) + { + _Util::Rectangle pcRect = _ResUtil::ConvertToPhyCoord(vcRect); + _Util::Dimension pcArcDim = _ResUtil::ConvertToPhyCoord(vcArcDim); + + return pThis->_pNativeCanvas->FillRoundRectangle(color, pcRect, pcArcDim); + } + else + { + return pThis->_pNativeCanvas->FillRoundRectangle(color, vcRect, vcArcDim); + } + } + + template + static result DrawEllipse(_CanvasImpl* pThis, const _Util::Rectangle& vcRect) + { + typedef T Type; + + if ((vcRect.w == Type(0)) || (vcRect.h == Type(0))) + { + return E_SUCCESS; + } + + _Util::Rectangle rtCanvas = _GetBoundsRelT(*pThis); + + if (rtCanvas.w <= 0 || rtCanvas.h <= 0) + { + SysTryReturnResult(NID_GRP, 0, E_OPERATION_FAILED, "Cannot get the bounds of the canvas."); + } + + _ExpandClippingAreaForLineWidth(rtCanvas, Type(pThis->GetLineWidth())); + + result r = _Util::ValidateT(vcRect, rtCanvas); + + if (IsFailed(r)) + { + SysTryReturn(NID_GRP, 0, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + if (_ResUtil::NeedToConvertCoord()) + { + _Util::Rectangle pcRect = _ResUtil::ConvertToPhyCoord(vcRect); + + return pThis->_pNativeCanvas->DrawEllipse(pcRect); + } + else + { + return pThis->_pNativeCanvas->DrawEllipse(vcRect); + } + } + + template + static result FillEllipse(_CanvasImpl* pThis, const Color& color, const _Util::Rectangle& vcRect) + { + typedef T Type; + + if ((vcRect.w == Type(0)) || (vcRect.h == Type(0))) + { + return E_SUCCESS; + } + + _Util::Rectangle rtCanvas = _GetBoundsRelT(*pThis); + + if (rtCanvas.w <= 0 || rtCanvas.h <= 0) + { + SysTryReturnResult(NID_GRP, 0, E_OPERATION_FAILED, "Cannot get the bounds of the canvas."); + } + + result r = _Util::ValidateT(vcRect, rtCanvas); + + if (IsFailed(r)) + { + SysTryReturn(NID_GRP, 0, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + if (_ResUtil::NeedToConvertCoord()) + { + _Util::Rectangle pcRect = _ResUtil::ConvertToPhyCoord(vcRect); + + return pThis->_pNativeCanvas->FillEllipse(color, pcRect); + } + else + { + return pThis->_pNativeCanvas->FillEllipse(color, vcRect); + } + } + + template + static result DrawArc(_CanvasImpl* pThis, const _Util::Rectangle& vcRect, T startAngle, T endAngle, ArcStyle arcStyle) + { + typedef T Type; + + if ((vcRect.w == Type(0)) || (vcRect.h == Type(0))) + { + return E_SUCCESS; + } + + _Util::Rectangle rtCanvas = _GetBoundsRelT(*pThis); + + if (rtCanvas.w <= 0 || rtCanvas.h <= 0) + { + SysTryReturnResult(NID_GRP, 0, E_OPERATION_FAILED, "Cannot get the bounds of the canvas."); + } + + _ExpandClippingAreaForLineWidth(rtCanvas, Type(pThis->GetLineWidth())); + + result r = _Util::ValidateT(vcRect, rtCanvas); + + if (IsFailed(r)) + { + SysTryReturn(NID_GRP, 0, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + if (_ResUtil::NeedToConvertCoord()) + { + _Util::Rectangle pcRect = _ResUtil::ConvertToPhyCoord(vcRect); + + return pThis->_pNativeCanvas->DrawArc(pcRect, startAngle, endAngle, arcStyle); + } + else + { + return pThis->_pNativeCanvas->DrawArc(vcRect, startAngle, endAngle, arcStyle); + } + } + + template + static result DrawTriangle(_CanvasImpl* pThis, const _Util::Point& vcPoint1, const _Util::Point& vcPoint2, const _Util::Point& vcPoint3) + { + typedef T Type; + + if (_ResUtil::NeedToConvertCoord()) + { + _Util::Point pcPoint1 = _ResUtil::ConvertToPhyCoord(vcPoint1); + _Util::Point pcPoint2 = _ResUtil::ConvertToPhyCoord(vcPoint2); + _Util::Point pcPoint3 = _ResUtil::ConvertToPhyCoord(vcPoint3); + + return pThis->_pNativeCanvas->DrawTriangle(pcPoint1, pcPoint2, pcPoint3); + } + else + { + return pThis->_pNativeCanvas->DrawTriangle(vcPoint1, vcPoint2, vcPoint3); + } + } + + template + static result FillTriangle(_CanvasImpl* pThis, const Color& color, const _Util::Point& vcPoint1, const _Util::Point& vcPoint2, const _Util::Point& vcPoint3) + { + typedef T Type; + + if (_ResUtil::NeedToConvertCoord()) + { + _Util::Point pcPoint1 = _ResUtil::ConvertToPhyCoord(vcPoint1); + _Util::Point pcPoint2 = _ResUtil::ConvertToPhyCoord(vcPoint2); + _Util::Point pcPoint3 = _ResUtil::ConvertToPhyCoord(vcPoint3); + + return pThis->_pNativeCanvas->FillTriangle(color, pcPoint1, pcPoint2, pcPoint3); + } + else + { + return pThis->_pNativeCanvas->FillTriangle(color, vcPoint1, vcPoint2, vcPoint3); + } + } + + template + static result DrawLine(_CanvasImpl* pThis, const _Util::Point& vcPoint1, const _Util::Point& vcPoint2) + { + typedef T Type; + + if (_ResUtil::NeedToConvertCoord()) + { + _Util::Point pcPoint1 = _ResUtil::ConvertToPhyCoord(vcPoint1); + _Util::Point pcPoint2 = _ResUtil::ConvertToPhyCoord(vcPoint2); + + return pThis->_pNativeCanvas->DrawLine(pcPoint1, pcPoint2); + } + else + { + return pThis->_pNativeCanvas->DrawLine(vcPoint1, vcPoint2); + } + } +}; + +}} // Tizen::Graphics + +#endif // _FGRP_INTERNAL_CANVASIMPL_PRIVATE_H_ diff --git a/src/graphics/FGrp_CanvasPixman.cpp b/src/graphics/FGrp_CanvasPixman.cpp new file mode 100644 index 0000000..6e13a2a --- /dev/null +++ b/src/graphics/FGrp_CanvasPixman.cpp @@ -0,0 +1,496 @@ +// +// 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_CanvasPixman.cpp + * @brief This is the implementation file for the pixman solution. + * + */ + +#include + +#include + +#include "FGrp_CanvasPixman.h" +#include "util/FGrp_UtilTemplate.h" + + +namespace Tizen { namespace Graphics +{ + +namespace _Util +{ + +template <> +AutoDeletor::~AutoDeletor(void) +{ + if (__pPtr) + { + pixman_image_unref(__pPtr); + } +} + +} // _Util + +namespace _Pixman +{ + +pixman_op_t GetRop(Tizen::Graphics::CompositeMode compositeMode) +{ + switch (compositeMode) + { + case COMPOSITE_MODE_CLEAR: + return PIXMAN_OP_CLEAR; + case COMPOSITE_MODE_SRC: + return PIXMAN_OP_SRC; + case COMPOSITE_MODE_DST: + return PIXMAN_OP_DST; + case COMPOSITE_MODE_SRC_OVER: + return PIXMAN_OP_OVER; + case COMPOSITE_MODE_DST_OVER: + return PIXMAN_OP_OVER_REVERSE; + case COMPOSITE_MODE_SRC_IN: + return PIXMAN_OP_IN; + case COMPOSITE_MODE_DST_IN: + return PIXMAN_OP_IN_REVERSE; + case COMPOSITE_MODE_SRC_OUT: + return PIXMAN_OP_OUT; + case COMPOSITE_MODE_DST_OUT: + return PIXMAN_OP_OUT_REVERSE; + case COMPOSITE_MODE_SRC_ATOP: + return PIXMAN_OP_ATOP; + case COMPOSITE_MODE_DST_ATOP: + return PIXMAN_OP_ATOP_REVERSE; + case COMPOSITE_MODE_DST_XOR: + return PIXMAN_OP_XOR; + case COMPOSITE_MODE_ADD: + return PIXMAN_OP_ADD; + case COMPOSITE_MODE_SATURATE: + return PIXMAN_OP_SATURATE; + case COMPOSITE_MODE_MULTIPLY: + return PIXMAN_OP_MULTIPLY; + case COMPOSITE_MODE_SCREEN: + return PIXMAN_OP_SCREEN; + case COMPOSITE_MODE_OVERLAY: + return PIXMAN_OP_OVERLAY; + case COMPOSITE_MODE_DARKEN: + return PIXMAN_OP_DARKEN; + case COMPOSITE_MODE_LIGHTEN: + return PIXMAN_OP_LIGHTEN; + default: + return PIXMAN_OP_SRC; + } +} + +pixman_filter_t GetFilter(BitmapDrawingQuality drawingQuality) +{ + switch (drawingQuality) + { + case Tizen::Graphics::BITMAP_DRAWING_QUALITY_HIGH: + return PIXMAN_FILTER_BEST; + case Tizen::Graphics::BITMAP_DRAWING_QUALITY_MID: + return PIXMAN_FILTER_GOOD; + default: + return PIXMAN_FILTER_FAST; + } +} + +pixman_filter_t GetFilter(BitmapScalingQuality scalingQuality) +{ + switch (scalingQuality) + { + case Tizen::Graphics::BITMAP_SCALING_QUALITY_HIGH: + return PIXMAN_FILTER_BEST; + case Tizen::Graphics::BITMAP_SCALING_QUALITY_MID: + return PIXMAN_FILTER_GOOD; + default: + return PIXMAN_FILTER_FAST; + } +} + +pixman_transform_t GetTransform(int xDest, int yDest, double degree, int xPivot, int yPivot) +{ + pixman_transform_t transform; + + double c = cos(degree * 3.141592 / 180.0); + double s = sin(degree * 3.141592 / 180.0); + + pixman_transform_init_identity(&transform); + + pixman_transform_translate(&transform, NULL, pixman_int_to_fixed(-xDest), pixman_int_to_fixed(-yDest)); + pixman_transform_rotate(&transform, NULL, pixman_double_to_fixed(c), pixman_double_to_fixed(s)); + pixman_transform_translate(&transform, NULL, pixman_int_to_fixed(xPivot), pixman_int_to_fixed(yPivot)); + + return transform; +} + +pixman_transform_t GetTransform(double xDest, double yDest, double degree, double xPivot, double yPivot) +{ + pixman_transform_t transform; + + double c = cos(degree * 3.141592 / 180.0); + double s = sin(degree * 3.141592 / 180.0); + + pixman_transform_init_identity(&transform); + + pixman_transform_translate(&transform, NULL, pixman_double_to_fixed(-xDest), pixman_double_to_fixed(-yDest)); + pixman_transform_rotate(&transform, NULL, pixman_double_to_fixed(c), pixman_double_to_fixed(s)); + pixman_transform_translate(&transform, NULL, pixman_double_to_fixed(xPivot), pixman_double_to_fixed(yPivot)); + + return transform; +} + +pixman_transform_t GetTransform(int srcWidth, int srcHeight, int dstWidth, int dstHeight) +{ + pixman_transform_t transform; + + pixman_transform_init_scale(&transform, 65536 * srcWidth / dstWidth, 65536 * srcHeight / dstHeight); + + return transform; +} + +pixman_transform_t GetTransform(int srcWidth, int srcHeight, double xDest, double yDest, double wDest, double hDest) +{ + pixman_transform_t transform; + + pixman_transform_init_identity(&transform); + + pixman_transform_translate(&transform, NULL, pixman_double_to_fixed(-xDest), pixman_double_to_fixed(-yDest)); + pixman_transform_scale(&transform, NULL, 65536 * srcWidth / wDest, 65536 * srcHeight / hDest); + + return transform; +} + +bool ResizePixmap(Tizen::Graphics::_Util::Pixmap& dstImage, const Tizen::Graphics::_Util::Pixmap& srcImage, pixman_filter_t filter) +{ + Tizen::Graphics::_Util::AutoDeletor pPixmanDst; + + switch (dstImage.depth) + { + case 16: + pPixmanDst.Bind(pixman_image_create_bits(PIXMAN_r5g6b5, dstImage.width, dstImage.height, (uint32_t*)dstImage.pBitmap, dstImage.bytesPerLine)); + break; + case 32: + pPixmanDst.Bind(pixman_image_create_bits(PIXMAN_a8r8g8b8, dstImage.width, dstImage.height, (uint32_t*)dstImage.pBitmap, dstImage.bytesPerLine)); + break; + default: + return false; + } + + if (pPixmanDst) + { + Tizen::Graphics::_Util::AutoDeletor pPixmanSrc; + + switch (srcImage.depth) + { + case 16: + // color key is not supporting + pPixmanSrc.Bind(pixman_image_create_bits(PIXMAN_r5g6b5, srcImage.width, srcImage.height, (uint32_t*)srcImage.pBitmap, srcImage.bytesPerLine)); + break; + case 32: + pPixmanSrc.Bind(pixman_image_create_bits(PIXMAN_a8r8g8b8, srcImage.width, srcImage.height, (uint32_t*)srcImage.pBitmap, srcImage.bytesPerLine)); + break; + default: + return false; + } + + if (pPixmanSrc) + { + pixman_transform_t transform = Tizen::Graphics::_Pixman::GetTransform(srcImage.width, srcImage.height, dstImage.width, dstImage.height); + + pixman_image_set_transform(pPixmanSrc, &transform); + + pixman_image_set_filter(pPixmanSrc, filter, NULL, 0); + + pixman_image_set_repeat(pPixmanSrc, PIXMAN_REPEAT_REFLECT); + + pixman_image_composite32(PIXMAN_OP_SRC, pPixmanSrc, 0, pPixmanDst, 0, 0, 0, 0, 0, 0, dstImage.width, dstImage.height); + + return true; + } + } + + return false; +} + +bool CompositePixmap(Tizen::Graphics::_Util::Pixmap& dstImage, const Tizen::Graphics::_Util::Pixmap& srcImage, int rop, pixman_filter_t filter, pixman_transform_t transform, pixman_repeat_t repeatMethod) +{ + Tizen::Graphics::_Util::AutoDeletor pPixmanDst; + + switch (dstImage.depth) + { + case 16: + pPixmanDst.Bind(pixman_image_create_bits(PIXMAN_r5g6b5, dstImage.width, dstImage.height, (uint32_t*)dstImage.pBitmap, dstImage.bytesPerLine)); + break; + case 32: + pPixmanDst.Bind(pixman_image_create_bits(PIXMAN_a8r8g8b8, dstImage.width, dstImage.height, (uint32_t*)dstImage.pBitmap, dstImage.bytesPerLine)); + break; + default: + return false; + } + + if (pPixmanDst) + { + std::auto_ptr premultipliedSrcImage; + + Tizen::Graphics::_Util::AutoDeletor pPixmanMsk; + Tizen::Graphics::_Util::AutoDeletor pPixmanSrc; + + switch (srcImage.depth) + { + case 16: + // color key is not supporting + pPixmanSrc.Bind(pixman_image_create_bits(PIXMAN_r5g6b5, srcImage.width, srcImage.height, (uint32_t*)srcImage.pBitmap, srcImage.bytesPerLine)); + break; + case 32: + if (srcImage.isPremultiplied || rop == PIXMAN_OP_COPY) + { + pPixmanSrc.Bind(pixman_image_create_bits(PIXMAN_a8r8g8b8, srcImage.width, srcImage.height, (uint32_t*)srcImage.pBitmap, srcImage.bytesPerLine)); + } + else + { + bool pass = false; + bool isInternalSolutionEnable = !((dstImage.width == srcImage.width) && (dstImage.height == srcImage.height) && pixman_transform_is_identity(&transform)); + + if (isInternalSolutionEnable) + { + premultipliedSrcImage.reset(srcImage.GetPremultipliedPixmap()); + + if (premultipliedSrcImage.get()) + { + pPixmanSrc.Bind(pixman_image_create_bits(PIXMAN_a8r8g8b8, premultipliedSrcImage->width, premultipliedSrcImage->height, (uint32_t*)premultipliedSrcImage->pBitmap, premultipliedSrcImage->bytesPerLine)); + pass = true; + } + } + + if (!pass) + { + // slow but it does not create additional buffer + pPixmanSrc.Bind(pixman_image_create_bits(PIXMAN_x8r8g8b8, srcImage.width, srcImage.height, (uint32_t*)srcImage.pBitmap, srcImage.bytesPerLine)); + pPixmanMsk.Bind(pixman_image_create_bits(PIXMAN_a8r8g8b8, srcImage.width, srcImage.height, (uint32_t*)srcImage.pBitmap, srcImage.bytesPerLine)); + + if (pPixmanMsk == null) + { + return false; + } + } + } + break; + default: + return false; + } + + if (pPixmanSrc) + { + pixman_image_set_transform(pPixmanSrc, &transform); + + if (pPixmanMsk) + { + pixman_image_set_transform(pPixmanMsk, &transform); + } + + pixman_image_set_filter(pPixmanSrc, filter, NULL, 0); + pixman_image_set_repeat(pPixmanSrc, repeatMethod); + + if (rop == PIXMAN_OP_COPY) + { + rop = PIXMAN_OP_SRC; + } + + pixman_image_composite32(pixman_op_t(rop), pPixmanSrc, pPixmanMsk, pPixmanDst, 0, 0, 0, 0, 0, 0, dstImage.width, dstImage.height); + + return true; + } + } + + return false; +} + +bool ResizePixmap(Tizen::Graphics::_Util::Pixmap& dstImage, const Tizen::Graphics::_Util::Pixmap& srcImage, Tizen::Graphics::BitmapScalingQuality scalingQuality) +{ + if (dstImage.width <= 0 || dstImage.height <= 0) + { + return true; + } + + pixman_filter_t filter = Tizen::Graphics::_Pixman::GetFilter(scalingQuality); + + return ResizePixmap(dstImage, srcImage, filter); +} + +bool CopyPixmap(Tizen::Graphics::_Util::Pixmap& dstImage, const Tizen::Graphics::_Util::Pixmap& srcImage, Tizen::Graphics::BitmapDrawingQuality drawingQuality, Tizen::Graphics::CompositeMode compositeMode) +{ + if (dstImage.width <= 0 || dstImage.height <= 0) + { + return true; + } + + pixman_op_t rop = Tizen::Graphics::_Pixman::GetRop(compositeMode); + + pixman_filter_t filter = Tizen::Graphics::_Pixman::GetFilter(drawingQuality); + + pixman_transform_t transform; + pixman_transform_init_identity(&transform); + + return CompositePixmap(dstImage, srcImage, rop, filter, transform, PIXMAN_REPEAT_NONE); +} + +bool CopyPixmap(Tizen::Graphics::_Util::Pixmap& dstImage, const Tizen::Graphics::_Util::Pixmap& srcImage, Tizen::Graphics::BitmapDrawingQuality drawingQuality, Tizen::Graphics::CompositeMode compositeMode, double xDest, double yDest) +{ + if (dstImage.width <= 0 || dstImage.height <= 0) + { + return true; + } + + pixman_op_t rop = Tizen::Graphics::_Pixman::GetRop(compositeMode); + + pixman_filter_t filter = Tizen::Graphics::_Pixman::GetFilter(drawingQuality); + + switch (rop) + { + case PIXMAN_OP_IN: + case PIXMAN_OP_IN_REVERSE: + case PIXMAN_OP_OUT: + case PIXMAN_OP_ATOP_REVERSE: + { + pixman_transform_t transform; + pixman_transform_init_identity(&transform); + pixman_transform_translate(&transform, NULL, pixman_double_to_fixed(-(xDest - 0.5)), pixman_double_to_fixed(-(yDest - 0.5))); + + 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)); + 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_NONE); + } + } +} + +bool ScalePixmap(Tizen::Graphics::_Util::Pixmap& dstImage, const Tizen::Graphics::_Util::Pixmap& srcImage, Tizen::Graphics::BitmapDrawingQuality drawingQuality, Tizen::Graphics::CompositeMode compositeMode) +{ + if (dstImage.width <= 0 || dstImage.height <= 0) + { + 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); + + return CompositePixmap(dstImage, srcImage, rop, filter, transform, PIXMAN_REPEAT_NORMAL); +} + +bool ScalePixmapOpCopy(Tizen::Graphics::_Util::Pixmap& dstImage, const Tizen::Graphics::_Util::Pixmap& srcImage, Tizen::Graphics::BitmapDrawingQuality drawingQuality) +{ + if (dstImage.width <= 0 || dstImage.height <= 0) + { + return true; + } + + 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); + + return CompositePixmap(dstImage, srcImage, PIXMAN_OP_COPY, filter, transform, PIXMAN_REPEAT_NORMAL); +} + +bool ScalePixmap(Tizen::Graphics::_Util::Pixmap& dstImage, const Tizen::Graphics::_Util::Pixmap& srcImage, Tizen::Graphics::BitmapDrawingQuality drawingQuality, Tizen::Graphics::CompositeMode compositeMode, double xDest, double yDest, double wDest, double hDest) +{ + if (dstImage.width <= 0 || dstImage.height <= 0) + { + return true; + } + + pixman_op_t rop = Tizen::Graphics::_Pixman::GetRop(compositeMode); + pixman_filter_t filter = Tizen::Graphics::_Pixman::GetFilter(drawingQuality); + + switch (rop) + { + case PIXMAN_OP_IN: + case PIXMAN_OP_IN_REVERSE: + case PIXMAN_OP_OUT: + case PIXMAN_OP_ATOP_REVERSE: + { + pixman_transform_t transform = Tizen::Graphics::_Pixman::GetTransform(srcImage.width, srcImage.height, xDest - 0.5, yDest - 0.5, wDest, hDest); + + return CompositePixmap(dstImage, srcImage, rop, filter, transform, PIXMAN_REPEAT_NONE); + } + default: + { + int dstX1 = int(floor(xDest)); + int dstY1 = int(floor(yDest)); + int dstX2 = int(ceil(xDest + wDest)); + int dstY2 = int(ceil(yDest + hDest)); + + Tizen::Graphics::_Util::Pixmap dstImageSub = dstImage.GetSubBitmap(dstX1, dstY1, dstX2 - dstX1, dstY2 - dstY1); + Tizen::Graphics::_Util::Pixmap srcImageSub = srcImage.GetSubBitmap((dstX1 >= 0) ? 0 : int(-dstX1 * srcImage.width / wDest), (dstY1 >= 0) ? 0 : int(-dstY1 * srcImage.height / hDest), srcImage.width, srcImage.height); + + pixman_transform_t transform = Tizen::Graphics::_Pixman::GetTransform(srcImage.width, srcImage.height, (xDest - 0.5) - dstX1, (yDest - 0.5) - dstY1, wDest, hDest); + + return CompositePixmap(dstImageSub, srcImageSub, rop, filter, transform, PIXMAN_REPEAT_NONE); + } + } +} + +bool RotatePixmap(Tizen::Graphics::_Util::Pixmap& dstImage, const Tizen::Graphics::_Util::Pixmap& srcImage, Tizen::Graphics::BitmapDrawingQuality drawingQuality, Tizen::Graphics::CompositeMode compositeMode, double xDest, double yDest, double degree, double xPivot, double yPivot) +{ + if (dstImage.width <= 0 || dstImage.height <= 0) + { + return true; + } + + 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(xDest, yDest, degree, xPivot, yPivot); + + return CompositePixmap(dstImage, srcImage, rop, filter, transform, PIXMAN_REPEAT_NONE); +} + +} // _Pixman + +}} // Tizen::Graphics diff --git a/src/graphics/FGrp_CanvasPixman.h b/src/graphics/FGrp_CanvasPixman.h new file mode 100644 index 0000000..c5957ad --- /dev/null +++ b/src/graphics/FGrp_CanvasPixman.h @@ -0,0 +1,72 @@ +// +// 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_CanvasPixman.h + * @brief This is the header file for the pixman solution. + * + */ + +#ifndef _FGRP_INTERNAL_CANVASPIXMAN_H_ +#define _FGRP_INTERNAL_CANVASPIXMAN_H_ + +#include + +#include "FGrp_CanvasImpl.h" +#include "FGrpBitmapCommon.h" +#include "util/FGrp_UtilPixmap.h" + +#define PIXMAN_OP_COPY pixman_op_t(PIXMAN_OP_CLEAR - 1) + +namespace Tizen { namespace Graphics +{ + +namespace _Pixman +{ + +bool +CopyPixmap(Tizen::Graphics::_Util::Pixmap& dstImage, const Tizen::Graphics::_Util::Pixmap& srcImage, Tizen::Graphics::BitmapDrawingQuality drawingQuality, Tizen::Graphics::CompositeMode compositeMode); + +bool +CopyPixmap(Tizen::Graphics::_Util::Pixmap& dstImage, const Tizen::Graphics::_Util::Pixmap& srcImage, Tizen::Graphics::BitmapDrawingQuality drawingQuality, Tizen::Graphics::CompositeMode compositeMode, double xDest, double yDest); + +bool +CopyPixmap(Tizen::Graphics::_Util::Pixmap& dstImage, const Tizen::Graphics::_Util::Pixmap& srcImage, Tizen::Graphics::BitmapDrawingQuality drawingQuality, Tizen::Graphics::CompositeMode compositeMode, double xDest, double yDest, int wDest, int hDest); + +bool +ScalePixmap(Tizen::Graphics::_Util::Pixmap& dstImage, const Tizen::Graphics::_Util::Pixmap& srcImage, Tizen::Graphics::BitmapDrawingQuality drawingQuality, Tizen::Graphics::CompositeMode compositeMode = COMPOSITE_MODE_SRC_OVER); + +bool +ScalePixmapOpCopy(Tizen::Graphics::_Util::Pixmap& dstImage, const Tizen::Graphics::_Util::Pixmap& srcImage, Tizen::Graphics::BitmapDrawingQuality drawingQuality); + +bool +ScalePixmap(Tizen::Graphics::_Util::Pixmap& dstImage, const Tizen::Graphics::_Util::Pixmap& srcImage, Tizen::Graphics::BitmapDrawingQuality drawingQuality, Tizen::Graphics::CompositeMode compositeMode, double xDest, double yDest, double wDest, double hDest); + +bool +ScalePixmap(Tizen::Graphics::_Util::Pixmap& dstImage, const Tizen::Graphics::_Util::Pixmap& srcImage, Tizen::Graphics::BitmapDrawingQuality drawingQuality, Tizen::Graphics::CompositeMode compositeMode, double xDest, double yDest, int wDest, int hDest); + +bool +ResizePixmap(Tizen::Graphics::_Util::Pixmap& dstImage, const Tizen::Graphics::_Util::Pixmap& srcImage, Tizen::Graphics::BitmapScalingQuality scalingQuality); + +bool +RotatePixmap(Tizen::Graphics::_Util::Pixmap& dstImage, const Tizen::Graphics::_Util::Pixmap& srcImage, Tizen::Graphics::BitmapDrawingQuality drawingQuality, Tizen::Graphics::CompositeMode compositeMode, double xDest, double yDest, double degree, double xPivot, double yPivot); + +} // Tizen::Graphics::_Pixman + +}} // Tizen::Graphics + +#endif // _FGRP_INTERNAL_CANVASPIXMAN_H_ diff --git a/src/graphics/FGrp_CanvasRasterOp.cpp b/src/graphics/FGrp_CanvasRasterOp.cpp new file mode 100644 index 0000000..9995509 --- /dev/null +++ b/src/graphics/FGrp_CanvasRasterOp.cpp @@ -0,0 +1,225 @@ +// +// 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_CanvasRasterOp.cpp + * @brief This is the implementation file for set of raster operation. + * + */ + +#include "FGrp_CanvasRasterOp.h" +#include "util/FGrp_UtilTemplate.h" + + +namespace Tizen { namespace Graphics +{ + +namespace _RasterOp +{ + +// 'Add' rule is more intuitive for 32-bit alpha +template +inline T +_BlendAlphaComponentAdd(T srcA, T dstA) +{ + return _Util::Min(srcA + dstA, 0xFF); +} + +template +inline T +_BlendAlphaComponentAddEx(T srcA, T dstA) +{ + return _Util::Min(srcA + dstA - ((srcA * dstA) >> 8), 0xFF); +} + +void +FnFillRectAlpha32Bit(unsigned long* pDest32, int w, int h, int pitch, unsigned long color, unsigned long opacity) +{ + typedef unsigned long Pixel; + + opacity += (opacity >> 7); + opacity = ((opacity * (color >> 24)) << 16) & 0xFF000000; + + color &= 0x00FFFFFF; + + if (opacity >= 0xFF000000) + { + while (--h >= 0) + { + int copy = w; + + while (--copy >= 0) + { + *pDest32++ = Pixel((color & 0x00FFFFFF) | opacity); + } + + pDest32 += (pitch - w); + } + } + else if (opacity > 0) + { + Pixel srcA = opacity >> 24; + Pixel srcR = color & 0x00FF0000; + Pixel srcG = color & 0x0000FF00; + Pixel srcB = color & 0x000000FF; + + srcA += (srcA >> 7); + + while (--h >= 0) + { + int copy = w; + + while (--copy >= 0) + { + Pixel dstA = (*pDest32 & 0xFF000000) >> 24; + Pixel dstR = *pDest32 & 0x00FF0000; + Pixel dstG = *pDest32 & 0x0000FF00; + Pixel dstB = *pDest32 & 0x000000FF; + + dstA = _BlendAlphaComponentAdd(srcA, dstA); + dstR = (dstR + (((srcR - dstR) * srcA) >> 8)) & 0x00FF0000; + dstG = (dstG + (((srcG - dstG) * srcA) >> 8)) & 0x0000FF00; + dstB = (dstB + (((srcB - dstB) * srcA) >> 8)) & 0x000000FF; + dstA = (dstA > 0xFF) ? 0xFF : dstA; + + *pDest32++ = (dstA << 24) | dstR | dstG | dstB; + } + + pDest32 += (pitch - w); + } + } +} + +void +FnFillRectFont32Bit(unsigned long* pDest32, int w, int h, int pitch, unsigned long color, unsigned long opacity) +{ + typedef unsigned long Pixel; + + Pixel srcR = (color >> 16) & 0xFF; + Pixel srcG = (color >> 8) & 0xFF; + Pixel srcB = (color) & 0xFF; + Pixel alpha = (color >> 24) & 0xFF; + + alpha += (alpha >> 7); + alpha = (alpha * opacity) >> 8; + alpha += (alpha >> 7); + + if (alpha > 0) + { + while (--h >= 0) + { + int copy = w; + + while (--copy >= 0) + { + Pixel dstA = (*pDest32 >> 24) & 0xFF; + Pixel dstR = (*pDest32 >> 16) & 0xFF; + Pixel dstG = (*pDest32 >> 8) & 0xFF; + Pixel dstB = (*pDest32) & 0xFF; + + dstA = _BlendAlphaComponentAddEx(alpha, dstA); + dstR = (dstR + (((srcR - dstR) * alpha) >> 8)) & 0xFF; + dstG = (dstG + (((srcG - dstG) * alpha) >> 8)) & 0xFF; + dstB = (dstB + (((srcB - dstB) * alpha) >> 8)) & 0xFF; + + *pDest32++ = (dstA << 24) | (dstR << 16) | (dstG << 8) | dstB; + } + + pDest32 += (pitch - w); + } + } +} + +void +FnBitBltFont32Bit(unsigned long* pDest32, int w, int h, int pitch, unsigned long* pSour08, int imagePitch, unsigned long opacity, + _Util::ColorKey srcColorKey) +{ + typedef unsigned long TPixel; + + TPixel srcR; + TPixel srcG; + TPixel srcB; + TPixel alpha; + + TPixel dstR; + TPixel dstG; + TPixel dstB; + + srcR = (opacity >> 16) & 0xFF; + srcG = (opacity >> 8) & 0xFF; + srcB = (opacity) & 0xFF; + + { + while (--h >= 0) + { + int copy = w; + + while (--copy >= 0) + { + alpha = *pSour08++; + + if (alpha) + { + dstR = (*pDest32 >> 16) & 0xFF; + dstG = (*pDest32 >> 8) & 0xFF; + dstB = (*pDest32) & 0xFF; + + dstR = (dstR + (((srcR - dstR) * alpha) >> 8)) & 0xFF; + dstG = (dstG + (((srcG - dstG) * alpha) >> 8)) & 0xFF; + dstB = (dstB + (((srcB - dstB) * alpha) >> 8)) & 0xFF; + + *pDest32++ = 0xFF000000 | (dstR << 16) | (dstG << 8) | dstB; + + continue; + } + + ++pDest32; + } + + pDest32 += (pitch - w); + pSour08 += (imagePitch - w); + } + } +} + +void +FnBitBlt32BitCopyReverse(unsigned long* pDest32, int w, int h, int pitch, unsigned long* pSour32, int imagePitch, + unsigned long opacity, + _Util::ColorKey srcColorKey) +{ + // opacity and srcColorKey should be ignored + + pSour32 += (imagePitch * h + w - 1); + pDest32 += (pitch * h + w - 1); + + while (--h >= 0) + { + int copy = w; + + while (--copy >= 0) + { + *pDest32-- = *pSour32--; + } + + pDest32 -= (pitch - w); + pSour32 -= (imagePitch - w); + } +} + +} // _RasterOp + +}} // Tizen::Graphics diff --git a/src/graphics/FGrp_CanvasRasterOp.h b/src/graphics/FGrp_CanvasRasterOp.h new file mode 100644 index 0000000..0e6e204 --- /dev/null +++ b/src/graphics/FGrp_CanvasRasterOp.h @@ -0,0 +1,44 @@ +// +// 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_CanvasRasterOp.h + * @brief This is the header file for the set of raster operation. + * + */ + +#ifndef _FGRP_INTERNAL_CANVASRASTEROP_H_ +#define _FGRP_INTERNAL_CANVASRASTEROP_H_ + +#include "util/FGrp_UtilScratchpad.h" + + +namespace Tizen { namespace Graphics +{ + +namespace _RasterOp +{ +void FnFillRectAlpha32Bit(unsigned long* pDest32, int w, int h, int pitch, unsigned long color, unsigned long opacity); +void FnFillRectFont32Bit(unsigned long* pDest32, int w, int h, int pitch, unsigned long color, unsigned long opacity); +void FnBitBltFont32Bit(unsigned long* pDest32, int w, int h, int pitch, unsigned long* pSour08, int imagePitch, unsigned long opacity, _Util::ColorKey srcColorKey); +void FnBitBlt32BitCopyReverse(unsigned long* pDest32, int w, int h, int pitch, unsigned long* pSour32, int imagePitch, unsigned long opacity, _Util::ColorKey srcColorKey); + +} // Tizen::Graphics::_RasterOp + +}} // Tizen::Graphics + +#endif // _FGRP_INTERNAL_CANVASRASTEROP_H_ diff --git a/src/graphics/FGrp_CanvasShow.cpp b/src/graphics/FGrp_CanvasShow.cpp new file mode 100644 index 0000000..eb320ed --- /dev/null +++ b/src/graphics/FGrp_CanvasShow.cpp @@ -0,0 +1,184 @@ +// +// 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_CanvasShow.cpp + * @brief This is the implementation file for internal Canvas class. + * + */ + +#include + +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + +#include "FGrp_Callback.h" + +#include + + +namespace Tizen { namespace Graphics +{ + +void +_FlushCanvas(void) +{ + Ecore_Evas* pEcoreEvas = static_cast(_GetDefaultFrameEcoreEvasHandle()); + + if (pEcoreEvas) + { + ecore_evas_manual_render(pEcoreEvas); + } +} + +bool +_CanvasShowFromMemory(int xDest, int yDest, int xSour, int ySour, int wSour, int hSour, void* pMemory, int width, int height, + int depth, + int bytesPerLine) +{ + // check input parameter + { + switch (depth) + { + case 32: + break; + case 16: + default: + return false; + } + // pBuffer should be NULL pointer + if (pMemory == null || width <= 0 || height <= 0) + { + return false; + } + } + + Ecore_Evas* pEcoreEvas = static_cast(_GetDefaultFrameEcoreEvasHandle()); + + if (pEcoreEvas == null) + { + return false; + } + + int xSrc = 0; + int ySrc = 0; + + Display* pHdisplay = XOpenDisplay(NULL); + int displayWidth = DisplayWidth(pHdisplay, DefaultScreen(pHdisplay)); + int displayHeight = DisplayHeight(pHdisplay, DefaultScreen(pHdisplay)); + + //Window root = RootWindow(pHdisplay, DefaultScreen(pHdisplay)); + Window root = (Window) ecore_evas_window_get(pEcoreEvas); + + XShmSegmentInfo shmInfo; + XImage* pXimage = XShmCreateImage(pHdisplay, DefaultVisualOfScreen(DefaultScreenOfDisplay(pHdisplay)), 24, ZPixmap, + NULL, &shmInfo, (unsigned int) displayWidth, (unsigned int) displayHeight); + if (pXimage == NULL) + { + goto CLEAN_UP; + } + + // EAPI void ecore_evas_comp_sync_set(Ecore_Evas *ee, Eina_Bool do_sync); + ecore_evas_comp_sync_set(pEcoreEvas, EINA_FALSE); + + shmInfo.shmid = shmget(IPC_PRIVATE, pXimage->bytes_per_line * pXimage->height, IPC_CREAT | 0777); + + pXimage->data = (char*) shmat(shmInfo.shmid, 0, 0); + shmInfo.shmaddr = pXimage->data; + shmInfo.readOnly = False; + + // copy to image buffer + { + typedef unsigned long Pixel; + + Pixel* pSrc = reinterpret_cast (pMemory); + Pixel* pDst = reinterpret_cast (pXimage->data); + int srcPitch = (bytesPerLine * 8 / depth); + int dstPitch = (pXimage->bytes_per_line * 8 / depth); + + for (int y = 0; y < height; y++) + { + memcpy(pDst, pSrc, width * sizeof(Pixel)); + pSrc += srcPitch; + pDst += dstPitch; + } + } + + if (!XShmAttach(pHdisplay, &shmInfo)) + { + goto CLEAN_UP; + } + + XShmPutImage(pHdisplay, root, DefaultGCOfScreen(DefaultScreenOfDisplay(pHdisplay)), + pXimage, + xSrc, ySrc, xDest, yDest, width, height, false); + + XSync(pHdisplay, False); + + ecore_evas_comp_sync_set(pEcoreEvas, EINA_TRUE); + + // release the captured buffer + { + XShmDetach(pHdisplay, &shmInfo); + shmdt(shmInfo.shmaddr); + shmctl(shmInfo.shmid, IPC_RMID, NULL); + + XDestroyImage(pXimage); + pXimage = NULL; + + XCloseDisplay(pHdisplay); + } + + // no effect yet + { + Evas* pEvas = static_cast(_GetDefaultFrameEvasHandle()); + + if (pEvas) + { + evas_object_image_pixels_dirty_set((Evas_Object*) pEvas, true); + evas_object_show((Evas_Object*) pEvas); + } + } + + return true; + +CLEAN_UP: + if (pXimage) + { + XShmDetach(pHdisplay, &shmInfo); + shmdt(shmInfo.shmaddr); + shmctl(shmInfo.shmid, IPC_RMID, NULL); + + XDestroyImage(pXimage); + pXimage = NULL; + } + + XCloseDisplay(pHdisplay); + + return false; +} + +}} // Tizen::Graphics diff --git a/src/graphics/FGrp_CanvasTool.cpp b/src/graphics/FGrp_CanvasTool.cpp new file mode 100644 index 0000000..65ad0b4 --- /dev/null +++ b/src/graphics/FGrp_CanvasTool.cpp @@ -0,0 +1,83 @@ +// +// 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_CanvasTool.cpp + * @brief This is the cpp file for internal util class. + * + */ + +#include "FGrp_CanvasTool.h" +#include "FGrp_CanvasImpl.h" + + +namespace Tizen { namespace Graphics +{ + +class _CanvasImplHack + : public _CanvasImpl +{ +public: + bool SetCallback(bool (* ShowCallback)(void*), void* pCallbackParam) + { + if (this->IsConstructed()) + { + this->_pShowCallbackFunc = ShowCallback; + this->_pShowCallbackParam = pCallbackParam; + + return true; + } + + return false; + } + + void ResetCallback(void) + { + if (this->IsConstructed()) + { + this->_pShowCallbackFunc = null; + this->_pShowCallbackParam = null; + } + } + +}; // _CanvasImplHack + +bool +_CanvasTool::SetCallback(Tizen::Graphics::Canvas& canvas, + bool (* ShowCallback)(void*), void* pCallbackParam) +{ + Tizen::Graphics::_CanvasImpl* pCanvasImpl = _CanvasImpl::GetInstance(canvas); + + _CanvasImplHack* pCanvasImplHack = static_cast <_CanvasImplHack*>(pCanvasImpl); + + return (pCanvasImplHack) ? pCanvasImplHack->SetCallback(ShowCallback, pCallbackParam) : false; +} + +void +_CanvasTool::ResetCallback(Tizen::Graphics::Canvas& canvas) +{ + Tizen::Graphics::_CanvasImpl* pCanvasImpl = _CanvasImpl::GetInstance(canvas); + + _CanvasImplHack* pCanvasImplHack = static_cast <_CanvasImplHack*>(pCanvasImpl); + + if (pCanvasImplHack) + { + pCanvasImplHack->ResetCallback(); + } +} + +}} // Tizen::Graphics diff --git a/src/graphics/FGrp_CoordinateSystem.cpp b/src/graphics/FGrp_CoordinateSystem.cpp new file mode 100644 index 0000000..b66a243 --- /dev/null +++ b/src/graphics/FGrp_CoordinateSystem.cpp @@ -0,0 +1,515 @@ +// +// 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_CoordinateSystem.cpp + * @brief This is the implementation file for _CoordinateSystem class. + * + */ + +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include "FGrp_CoordinateSystem.h" +#include "FGrp_CoordinateSystemImpl.h" +#include "FGrp_Screen.h" + +using namespace Tizen::Base; + +#ifdef USE_RESOLUTION_ENUM_VALUE +namespace Tizen { namespace Graphics +{ +_ICoordinateSystemTransformer* +_CoordinateSystem::GetTransformerN(_LogicalResolution logicalResolution, _PhysicalResolution physicalResolution) +{ + _ICoordinateSystemTransformer* pXformer = _CoordinateSystemImpl::GetTransformerN(logicalResolution, BASE_SCREEN_SIZE_NORMAL, physicalResolution, BASE_SCREEN_SIZE_NORMAL); + + if (pXformer == null) + { + result r = GetLastResult(); + + SysLog(NID_GRP, "[%s] Propagating.", GetErrorMessage(r)); + } + + return pXformer; +} + +_ICoordinateSystemTransformer* +_CoordinateSystem::GetTransformerN(_LogicalResolution sourceLogicalResolution, _LogicalResolution destLogicalResolution) +{ + _PhysicalResolution physicalResolution = RESOLUTION_PHYSICAL_DEFAULT; + + switch (destLogicalResolution) + { + case RESOLUTION_LOGICAL_240: + physicalResolution = RESOLUTION_PHYSICAL_WQVGA; + break; + case RESOLUTION_LOGICAL_320: + physicalResolution = RESOLUTION_PHYSICAL_HVGA; + break; + case RESOLUTION_LOGICAL_480: + physicalResolution = RESOLUTION_PHYSICAL_WVGA; + break; + case RESOLUTION_LOGICAL_720: + physicalResolution = RESOLUTION_PHYSICAL_HD; + break; + case RESOLUTION_LOGICAL_800: + physicalResolution = RESOLUTION_PHYSICAL_WXGA; + break; + case RESOLUTION_LOGICAL_1080: + physicalResolution = RESOLUTION_PHYSICAL_HD1080; + break; + case RESOLUTION_LOGICAL_1600: + physicalResolution = RESOLUTION_PHYSICAL_WQXGA; + break; + default: + physicalResolution = RESOLUTION_PHYSICAL_NONE; + break; + } + + return _CoordinateSystem::GetTransformerN(sourceLogicalResolution, physicalResolution); +} + +_ICoordinateSystemTransformer* +_CoordinateSystem::GetTransformerN(_LogicalResolution logicalResolution, _BaseScreenSize logicalBaseScreenSize, _PhysicalResolution physicalResolution, _BaseScreenSize physicalBaseScreenSize) +{ + _ICoordinateSystemTransformer* pXformer = _CoordinateSystemImpl::GetTransformerN(logicalResolution, logicalBaseScreenSize, physicalResolution, physicalBaseScreenSize); + + if (pXformer == null) + { + result r = GetLastResult(); + + SysLog(NID_GRP, "[%s] Propagating.", GetErrorMessage(r)); + } + + return pXformer; +} + +result +_CoordinateSystem::Initialize(_LogicalResolution logicalResolution, _BaseScreenSize logicalBaseScreenSize) +{ + _CoordinateSystem* pInstance = _CoordinateSystem::GetInstance(); + + result r = pInstance->__Initialize(logicalResolution, logicalBaseScreenSize); + + SysTryReturn(NID_GRP, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +_CoordinateSystem::Reset(_LogicalResolution logicalResolution, _BaseScreenSize logicalBaseScreenSize) +{ + result r = E_SUCCESS; + + std::auto_ptr<_CoordinateSystemImpl> pImpl(new _CoordinateSystemImpl()); + + SysTryReturnResult(NID_GRP, pImpl.get() != null, E_OUT_OF_MEMORY, "Memory allocation failed."); + + r = pImpl->Initialize(logicalResolution, logicalBaseScreenSize); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + delete __pImpl; + __pImpl = pImpl.release(); + + return E_SUCCESS; +} + +_LogicalResolution +_CoordinateSystem::GetNativeLogicalResolution(void) const +{ + result r = E_SUCCESS; + + SysTryCatch(NID_GRP, __pImpl, r = E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance has not been initialized yet."); + + return __pImpl->GetNativeLogicalResolution(); + +CATCH: + SetLastResult(r); + + return RESOLUTION_LOGICAL_NONE; +} + +_BaseScreenSize +_CoordinateSystem::GetNativeLogicalBaseScreenSize(void) const +{ + result r = E_SUCCESS; + + SysTryCatch(NID_GRP, __pImpl, r = E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance has not been initialized yet."); + + return __pImpl->GetNativeLogicalBaseScreenSize(); + +CATCH: + SetLastResult(r); + + return BASE_SCREEN_SIZE_NONE; +} + +_LogicalResolution +_CoordinateSystem::GetLogicalResolution(void) const +{ + result r = E_SUCCESS; + + SysTryCatch(NID_GRP, __pImpl, r = E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance has not been initialized yet."); + + return __pImpl->GetLogicalResolution(); + +CATCH: + SetLastResult(r); + + return RESOLUTION_LOGICAL_NONE; +} + +_PhysicalResolution +_CoordinateSystem::GetPhysicalResolution(void) const +{ + result r = E_SUCCESS; + + SysTryCatch(NID_GRP, __pImpl, r = E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance has not been initialized yet."); + + return __pImpl->GetPhysicalResolution(); + +CATCH: + SetLastResult(r); + + return RESOLUTION_PHYSICAL_NONE; +} + +result +_CoordinateSystem::__Initialize(_LogicalResolution logicalResolution, _BaseScreenSize logicalBaseScreenSize) +{ + result r = Reset(logicalResolution, logicalBaseScreenSize); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +}} // Tizen::Graphics + +#endif + + +namespace Tizen { namespace Graphics +{ + +_CoordinateSystem _CoordinateSystem::__instance; +_CoordinateSystem* _CoordinateSystem::__pTheInstance = null; + + +void +_CoordinateSystem::__InitCoordinateSystem(void) +{ + if (__instance.__pImpl == null) + { + result r = __instance.__Initialize(_Screen::GetWidth(), BASE_SCREEN_SIZE_DEFAULT, Dimension(_Screen::GetWidth(), _Screen::GetHeight()), BASE_SCREEN_SIZE_DEFAULT); + + SysAssertf(!IsFailed(r), "[%s] Propagating.", GetErrorMessage(r)); + } + + __pTheInstance = &__instance; +} + +_CoordinateSystem* +_CoordinateSystem::GetInstance(void) +{ + static pthread_once_t once_block = PTHREAD_ONCE_INIT; + + if (__pTheInstance == null) + { + pthread_once(&once_block, __InitCoordinateSystem); + } + + return __pTheInstance; +} + +void +_CoordinateSystem::SetTransformEnabled(bool enabled) +{ + result r = E_SUCCESS; + + SysTryCatch(NID_GRP, __pImpl, r = E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance has not been initialized yet."); + + __pImpl->SetTransformEnabled(enabled); + +CATCH: + SetLastResult(r); +} + +bool +_CoordinateSystem::IsTransformEnabled(void) const +{ + result r = E_SUCCESS; + + SysTryCatch(NID_GRP, __pImpl, r = E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance has not been initialized yet."); + + return __pImpl->IsTransformEnabled(); + +CATCH: + SetLastResult(r); + + return false; +} + +_ICoordinateSystemTransformer* +_CoordinateSystem::GetTransformer(void) +{ + result r = E_SUCCESS; + + SysTryCatch(NID_GRP, __pImpl, r = E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance has not been initialized yet."); + + return __pImpl->GetTransformer(); + +CATCH: + SetLastResult(r); + + return null; +} + +_ICoordinateSystemTransformer* +_CoordinateSystem::GetInverseTransformer(void) +{ + result r = E_SUCCESS; + SysTryCatch(NID_GRP, __pImpl, r = E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance has not been initialized yet."); + + return __pImpl->GetInverseTransformer(); + +CATCH: + SetLastResult(r); + + return null; +} + +_ICoordinateSystemTransformer* +_CoordinateSystem::GetTransformerN(const Dimension& srcDim, const Dimension& trgDim) +{ + _ICoordinateSystemTransformer* pXformer = _CoordinateSystemImpl::GetTransformerN(srcDim, trgDim); + + if (pXformer == null) + { + result r = GetLastResult(); + + SysLog(NID_GRP, "[%s] Propagating.", GetErrorMessage(r)); + } + + return pXformer; +} + +_ICoordinateSystemTransformer* +_CoordinateSystem::GetTransformerN(int srcResolution, _BaseScreenSize srcBaseScreenSize, Dimension destResolution, _BaseScreenSize destBaseScreenSize) +{ + _ICoordinateSystemTransformer* pXformer = _CoordinateSystemImpl::GetTransformerN(srcResolution, srcBaseScreenSize, destResolution, destBaseScreenSize); + + if (pXformer == null) + { + result r = GetLastResult(); + + SysLog(NID_GRP, "[%s] Propagating.", GetErrorMessage(r)); + } + + return pXformer; +} + +double +_CoordinateSystem::GetAppBaseScaleFactor() +{ + int baseScreenSizeFactor = 0; + + switch (GetLogicalBaseScreenSize()) + { + case BASE_SCREEN_SIZE_NORMAL: + baseScreenSizeFactor = 1; + break; + case BASE_SCREEN_SIZE_LARGE: + baseScreenSizeFactor = 2; + break; + default: + baseScreenSizeFactor = -1; + break; + } + + return GetLogicalResolutionInt() * baseScreenSizeFactor; +} + +double +_CoordinateSystem::GetTargetBaseScaleFactor() +{ + int baseScreenSizeFactor = 0; + + switch (GetLogicalBaseScreenSize()) + { + case BASE_SCREEN_SIZE_NORMAL: + baseScreenSizeFactor = 1; + break; + case BASE_SCREEN_SIZE_LARGE: + baseScreenSizeFactor = 2; + break; + default: + baseScreenSizeFactor = -1; + break; + } + + Dimension physicalDim = GetPhysicalResolutionDim(); + + return (physicalDim.width < physicalDim.height ? physicalDim.width : physicalDim.height) * baseScreenSizeFactor; +} + +_CoordinateSystem::_CoordinateSystem(void) + : __pImpl(null) +{ +} + +_CoordinateSystem::~_CoordinateSystem(void) +{ + delete __pImpl; +} + +result +_CoordinateSystem::Initialize(int srcResolution, _BaseScreenSize srcBaseScreenSize, Dimension destResolution, _BaseScreenSize destBaseScreenSize) +{ + _CoordinateSystem* pInstance = _CoordinateSystem::GetInstance(); + + result r = pInstance->__Initialize(srcResolution, srcBaseScreenSize, destResolution, destBaseScreenSize); + + SysTryReturn(NID_GRP, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +_CoordinateSystem::Reset(int srcResolution, _BaseScreenSize srcBaseScreenSize, Dimension destResolution, _BaseScreenSize destBaseScreenSize) +{ + result r = E_SUCCESS; + + std::auto_ptr<_CoordinateSystemImpl> pImpl(new _CoordinateSystemImpl()); + + SysTryReturnResult(NID_GRP, pImpl.get() != null, E_OUT_OF_MEMORY, "Memory allocation failed."); + + r = pImpl->Initialize(srcResolution, srcBaseScreenSize, destResolution, destBaseScreenSize); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + delete __pImpl; + __pImpl = pImpl.release(); + + return E_SUCCESS; +} + +_BaseScreenSize +_CoordinateSystem::GetLogicalBaseScreenSize(void) const +{ + result r = E_SUCCESS; + + SysTryCatch(NID_GRP, __pImpl, r = E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance has not been initialized yet."); + + return __pImpl->GetLogicalBaseScreenSize(); + +CATCH: + SetLastResult(r); + + return BASE_SCREEN_SIZE_NONE; +} + +int +_CoordinateSystem::GetLogicalResolutionInt(void) const +{ + result r = E_SUCCESS; + + SysTryCatch(NID_GRP, __pImpl, r = E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance has not been initialized yet."); + + return __pImpl->GetLogicalResolutionInt(); + +CATCH: + SetLastResult(r); + + return 0; +} + +Dimension +_CoordinateSystem::GetPhysicalResolutionDim(void) const +{ + result r = E_SUCCESS; + + SysTryCatch(NID_GRP, __pImpl, r = E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance has not been initialized yet."); + + return __pImpl->GetPhysicalResolutionDim(); + +CATCH: + SetLastResult(r); + + return Dimension(0,0); +} + +_BaseScreenSize +_CoordinateSystem::GetPhysicalBaseScreenSize(void) const +{ + result r = E_SUCCESS; + + SysTryCatch(NID_GRP, __pImpl, r = E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance has not been initialized yet."); + + return __pImpl->GetPhysicalBaseScreenSize(); + +CATCH: + SetLastResult(r); + + return BASE_SCREEN_SIZE_NONE; +} + +result +_CoordinateSystem::__Initialize(int srcResolution, _BaseScreenSize srcBaseScreenSize, Dimension destResolution, _BaseScreenSize destBaseScreenSize) +{ + result r = Reset(srcResolution, srcBaseScreenSize, destResolution, destBaseScreenSize); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +}} // Tizen::Graphics + +// temporary test code for tizen 2.1 +namespace Tizen { namespace Graphics +{ + +void +_SetLogicalRes480(void) +{ + _CoordinateSystem* pInstance = _CoordinateSystem::GetInstance(); + + pInstance->Reset(480, BASE_SCREEN_SIZE_NORMAL, Dimension(_Screen::GetWidth(), _Screen::GetHeight()), BASE_SCREEN_SIZE_NORMAL); +} + +void +_SetLogicalRes720(void) +{ + _CoordinateSystem* pInstance = _CoordinateSystem::GetInstance(); + + pInstance->Reset(720, BASE_SCREEN_SIZE_NORMAL, Dimension(_Screen::GetWidth(), _Screen::GetHeight()), BASE_SCREEN_SIZE_NORMAL); +} + +}} // Tizen::Graphics + + diff --git a/src/graphics/FGrp_CoordinateSystemDeviceSpec.cpp b/src/graphics/FGrp_CoordinateSystemDeviceSpec.cpp new file mode 100644 index 0000000..eac71c5 --- /dev/null +++ b/src/graphics/FGrp_CoordinateSystemDeviceSpec.cpp @@ -0,0 +1,1775 @@ +// +// 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_CoordinateSystemDeviceSpec.cpp + * @brief This is the implementation file for the internal class. + * + */ + +#include + +#include + +#include +#include +#include + +#include "FGrp_CoordinateSystem.h" + + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + + +namespace Tizen { namespace Graphics +{ + +namespace _Internal +{ + +template +struct Gcd +{ + enum + { + value = Gcd ::value + }; +}; + +template +struct Gcd +{ + enum + { + value = m + }; +}; + +template +struct SimpleScaler +{ + static int ScaleDisplacement(int srcVal); + static int ScaleLength(int srcVal); +}; + +template +struct Scaler +{ + enum + { + gcd = Gcd ::value, + simpleSrc = src / gcd, + simpleTrg = trg / gcd, + }; + + static int ScaleDisplacement(int srcVal) + { + return SimpleScaler ::ScaleDisplacement(srcVal); + } + + static int ScaleLength(int srcVal) + { + return SimpleScaler ::ScaleLength(srcVal); + } +}; + +template +struct Transformer + : public _ICoordinateSystemTransformer +{ + Transformer() + { + } + + virtual int TransformHorizontal(int width) const + { + return HScale::ScaleLength(width); + } + + virtual int TransformVertical(int height) const + { + return VScale::ScaleLength(height); + } + + virtual int Transform(int scalar) const + { + return VScale::ScaleLength(scalar); + } + + virtual float TransformHorizontal(float width) const + { + return GetHorizontalScaleFactor() * width; + } + + virtual float TransformVertical(float height) const + { + return GetVerticalScaleFactor() * height; + } + + virtual float Transform(float scalar) const + { + return GetVerticalScaleFactor() * scalar; + } + + virtual Point Transform(const Point& point) const + { + return Point(HScale::ScaleDisplacement(point.x), VScale::ScaleDisplacement(point.y)); + } + + virtual Dimension Transform(const Dimension& dim) const + { + return Dimension(HScale::ScaleLength(dim.width), VScale::ScaleLength(dim.height)); + } + + virtual Rectangle Transform(const Rectangle& rect) const + { + int x = HScale::ScaleDisplacement(rect.x); + int y = VScale::ScaleDisplacement(rect.y); + int w = HScale::ScaleLength(rect.width); + int h = VScale::ScaleLength(rect.height); + + if (Tizen::App::_AppInfo::GetApiVersion() <= _API_VERSION_1_2) + { + // From Osp API 2.0, 'Adjacent Algorithm' is not used any more. + w = HScale::ScaleDisplacement(rect.x + rect.width) - x; + h = VScale::ScaleDisplacement(rect.y + rect.height) - y; + } + + return Rectangle(x, y, w, h); + } + + virtual FloatPoint Transform(const FloatPoint& point) const + { + return FloatPoint(Transform(point.x), Transform(point.y)); + } + + virtual FloatDimension Transform(const FloatDimension& dim) const + { + return FloatDimension(TransformHorizontal(dim.width), TransformVertical(dim.height)); + } + + virtual FloatRectangle Transform(const FloatRectangle& rect) const + { + float x = Transform(rect.x); + float y = Transform(rect.y); + float w = TransformHorizontal(rect.width); + float h = TransformVertical(rect.height); + + return FloatRectangle(x, y, w, h); + } + + virtual int TransformFloatToInt(float scalar) const + { + return static_cast(Transform(scalar)); + } + + virtual int TransformHorizontalFloatToInt(float width) const + { + return static_cast(TransformHorizontal(width)); + } + + virtual int TransformVerticalFloatToInt(float height) const + { + return static_cast(TransformVertical(height)); + } + + virtual float GetHorizontalScaleFactor(void) const + { + const int TEST_VALUE = 1000000; + return float(HScale::ScaleLength(TEST_VALUE)) / float(TEST_VALUE); + } + + virtual float GetVerticalScaleFactor(void) const + { + const int TEST_VALUE = 1000000; + return float(VScale::ScaleLength(TEST_VALUE)) / float(TEST_VALUE); + } +}; + +template<> +struct SimpleScaler <1, 2> +{ + static int ScaleDisplacement(int srcVal) + { + return srcVal << 1; + } + + static int ScaleLength(int srcVal) + { + return srcVal << 1; + } +}; + +template<> +struct SimpleScaler <2, 1> +{ + static int ScaleDisplacement(int srcVal) + { + return srcVal >> 1; + } + + static int ScaleLength(int srcVal) + { + int isNotMinus = (srcVal >= 0); + + return (srcVal + 1 * isNotMinus) >> 1; + } +}; + +namespace // unnamed +{ + const long long MAX_INT = 0x7FFFFFFF; + const long long MIN_INT = -MAX_INT - 1; +} + +template<> +struct SimpleScaler <2, 3> +{ + static int ScaleDisplacement(int srcVal) + { + long long tempSrc = srcVal; + + if (tempSrc >= 0) + { + tempSrc = tempSrc * 3 / 2; + + return (tempSrc > MAX_INT) ? MAX_INT : int(tempSrc); + } + else + { + tempSrc = (tempSrc * 3 - 1) / 2; + + return (tempSrc < MIN_INT) ? MIN_INT : int(tempSrc); + } + } + + static int ScaleLength(int srcVal) + { + long long tempSrc = srcVal; + + if (tempSrc >= 0) + { + tempSrc = tempSrc * 3 / 2; + + return (tempSrc > MAX_INT) ? MAX_INT : int(tempSrc); + } + else + { + tempSrc = (tempSrc * 3 - 1) / 2; + + return (tempSrc < MIN_INT) ? MIN_INT : int(tempSrc); + } + } +}; + +template<> +struct SimpleScaler <3, 2> +{ + static int ScaleDisplacement(int srcVal) + { + long long tempSrc = srcVal; + + if (tempSrc > 0) + { + tempSrc = (tempSrc + 1) * 2 / 3; + + return (tempSrc > MAX_INT) ? MAX_INT : int(tempSrc); + } + else + { + tempSrc = tempSrc * 2 / 3; + + return (tempSrc < MIN_INT) ? MIN_INT : int(tempSrc); + } + } + + static int ScaleLength(int srcVal) + { + long long tempSrc = srcVal; + + if (tempSrc > 0) + { + tempSrc = (tempSrc + 1) * 2 / 3; + + return (tempSrc > 0x7FFFFFFF) ? 0x7FFFFFFF : int(tempSrc); + } + else + { + tempSrc = tempSrc * 2 / 3; + + return (tempSrc < MIN_INT) ? MIN_INT : int(tempSrc); + } + } +}; + +template<> +struct SimpleScaler <3, 4> +{ + static int ScaleDisplacement(int srcVal) + { + return (srcVal >= 0) ? (srcVal * 4 / 3) : ((srcVal * 4 - 1) / 3); + } + + static int ScaleLength(int srcVal) + { + return (srcVal >= 0) ? (srcVal * 4 / 3) : ((srcVal * 4 - 1) / 3); + } +}; + +template<> +struct SimpleScaler <4, 3> +{ + static int ScaleDisplacement(int srcVal) + { + return (srcVal > 0) ? ((srcVal + 1) * 3 / 4) : (srcVal * 3 / 4); + } + + static int ScaleLength(int srcVal) + { + return (srcVal > 0) ? ((srcVal + 1) * 3 / 4) : (srcVal * 3 / 4); + } +}; + +template<> +struct SimpleScaler <5, 6> +{ + static int ScaleDisplacement(int srcVal) + { + return (srcVal >= 0) ? (srcVal * 6 / 5) : ((srcVal * 6 - 1) / 5); + } + + static int ScaleLength(int srcVal) + { + return (srcVal >= 0) ? (srcVal * 6 / 5) : ((srcVal * 6 - 1) / 5); + } +}; + +template<> +struct SimpleScaler <6, 5> +{ + static int ScaleDisplacement(int srcVal) + { + return (srcVal > 0) ? ((srcVal + 1) * 5 / 6) : (srcVal * 5 / 6); + } + + static int ScaleLength(int srcVal) + { + return (srcVal > 0) ? ((srcVal + 1) * 5 / 6) : (srcVal * 5 / 6); + } +}; + +template<> +struct SimpleScaler <3, 5> +{ + static int ScaleDisplacement(int srcVal) + { + return (srcVal >= 0) ? (srcVal * 5 / 3) : ((srcVal * 5 - 1) / 3); + } + + static int ScaleLength(int srcVal) + { + return (srcVal >= 0) ? (srcVal * 5 / 3) : ((srcVal * 5 - 1) / 3); + } +}; + +template<> +struct SimpleScaler <5, 3> +{ + static int ScaleDisplacement(int srcVal) + { + return (srcVal > 0) ? ((srcVal + 1) * 3 / 5) : (srcVal * 3 / 5); + } + + static int ScaleLength(int srcVal) + { + return (srcVal > 0) ? ((srcVal + 1) * 3 / 5) : (srcVal * 3 / 5); + } +}; + +template<> +struct SimpleScaler <8, 9> +{ + static int ScaleDisplacement(int srcVal) + { + return (srcVal >= 0) ? (srcVal * 9 / 8) : ((srcVal * 9 - 1) / 8); + } + + static int ScaleLength(int srcVal) + { + return (srcVal >= 0) ? (srcVal * 9 / 8) : ((srcVal * 9 - 1) / 8); + } +}; + +template<> +struct SimpleScaler <9, 8> +{ + static int ScaleDisplacement(int srcVal) + { + return (srcVal > 0) ? ((srcVal + 1) * 8 / 9) : (srcVal * 8 / 9); + } + + static int ScaleLength(int srcVal) + { + return (srcVal > 0) ? ((srcVal + 1) * 8 / 9) : (srcVal * 8 / 9); + } +}; + +template<> +struct SimpleScaler <1, 3> +{ + static int ScaleDisplacement(int srcVal) + { + return (srcVal >= 0) ? (srcVal * 3 / 1) : ((srcVal * 3 - 1) / 1); + } + + static int ScaleLength(int srcVal) + { + return (srcVal >= 0) ? (srcVal * 3 / 1) : ((srcVal * 3 - 1) / 1); + } +}; + +template<> +struct SimpleScaler <3, 1> +{ + static int ScaleDisplacement(int srcVal) + { + return (srcVal > 0) ? ((srcVal + 1) * 1 / 3) : (srcVal * 1 / 3); + } + + static int ScaleLength(int srcVal) + { + return (srcVal > 0) ? ((srcVal + 1) * 1 / 3) : (srcVal * 1 / 3); + } +}; + +template<> +struct SimpleScaler <4, 9> +{ + static int ScaleDisplacement(int srcVal) + { + return (srcVal >= 0) ? (srcVal * 9 / 4) : ((srcVal * 9 - 1) / 4); + } + + static int ScaleLength(int srcVal) + { + return (srcVal >= 0) ? (srcVal * 9 / 4) : ((srcVal * 9 - 1) / 4); + } +}; + +template<> +struct SimpleScaler <9, 4> +{ + static int ScaleDisplacement(int srcVal) + { + return (srcVal > 0) ? ((srcVal + 1) * 4 / 9) : (srcVal * 4 / 9); + } + + static int ScaleLength(int srcVal) + { + return (srcVal > 0) ? ((srcVal + 1) * 4 / 9) : (srcVal * 4 / 9); + } +}; + +} // _Internal + + +result +_CreateCoordinateTransformer(_ICoordinateSystemTransformer*& pTransformer, const Dimension& srcDim, const Dimension& trgDim) +{ + if (srcDim.width == 0 || srcDim.height == 0) + { + return E_SYSTEM; + } + + struct _Scaler + { + _Scaler(int src_, int trg_) + : src(src_) + , trg(trg_) + , scaleFactor(trg_ * 1.0f / src_) + { + } + + int ScaleDisplacement(int srcVal) const + { + if (src > trg) + { + return (srcVal > 0) ? ((srcVal + 1) * trg / src) : (srcVal * trg / src); + } + else if (src < trg) + { + return (srcVal >= 0) ? (srcVal * trg / src) : ((srcVal * trg - 1) / src); + } + + return srcVal; + } + + int ScaleLength(int srcVal) const + { + return ScaleDisplacement(srcVal); + } + + float ScaleDisplacement(float srcVal) const + { + return srcVal * scaleFactor; + } + + float ScaleLength(float srcVal) const + { + return ScaleDisplacement(srcVal); + } + + int src; + int trg; + float scaleFactor; + }; + + class _Xformer + : public _ICoordinateSystemTransformer + { + public: + _Xformer(const Dimension& srcDim, const Dimension& trgDim) + : __scalerH(srcDim.width, trgDim.width) + , __scalerV(srcDim.height, trgDim.height) + , __scaleFactorH(trgDim.width * 1.0f / srcDim.width) + , __scaleFactorV(trgDim.height * 1.0f / srcDim.height) + { + } + + virtual int TransformHorizontal(int width) const + { + return __scalerH.ScaleLength(width); + } + + virtual int TransformVertical(int height) const + { + return __scalerV.ScaleLength(height); + } + + virtual int Transform(int scalar) const + { + return __scalerV.ScaleLength(scalar); + } + + virtual float TransformHorizontal(float width) const + { + return width * __scaleFactorH; + } + + virtual float TransformVertical(float height) const + { + return height * __scaleFactorV; + } + + virtual float Transform(float scalar) const + { + return scalar * __scaleFactorV;; + } + + virtual Point Transform(const Point& point) const + { + return Point(__scalerH.ScaleDisplacement(point.x), __scalerV.ScaleDisplacement(point.y)); + } + + virtual Dimension Transform(const Dimension& dim) const + { + return Dimension(__scalerH.ScaleLength(dim.width), __scalerV.ScaleLength(dim.height)); + } + + virtual Rectangle Transform(const Rectangle& rect) const + { + int x = __scalerH.ScaleDisplacement(rect.x); + int y = __scalerV.ScaleDisplacement(rect.y); + int w = __scalerH.ScaleLength(rect.width); + int h = __scalerV.ScaleLength(rect.height); + + return Rectangle(x, y, w, h); + } + + virtual FloatPoint Transform(const FloatPoint& point) const + { + return FloatPoint(__scalerH.ScaleDisplacement(point.x), __scalerV.ScaleDisplacement(point.y)); + } + + virtual FloatDimension Transform(const FloatDimension& dim) const + { + return FloatDimension(__scalerH.ScaleLength(dim.width), __scalerV.ScaleLength(dim.height)); + } + + virtual FloatRectangle Transform(const FloatRectangle& rect) const + { + float x = __scalerH.ScaleDisplacement(rect.x); + float y = __scalerV.ScaleDisplacement(rect.y); + float w = __scalerH.ScaleLength(rect.width); + float h = __scalerV.ScaleLength(rect.height); + + return FloatRectangle(x, y, w, h); + } + + virtual int TransformFloatToInt(float scalar) const + { + return static_cast(__scalerV.ScaleLength(scalar)); + } + + virtual int TransformHorizontalFloatToInt(float width) const + { + return static_cast(__scalerH.ScaleLength(width)); + } + + virtual int TransformVerticalFloatToInt(float height) const + { + return static_cast(__scalerV.ScaleLength(height)); + } + + virtual float GetHorizontalScaleFactor(void) const + { + return __scaleFactorH; + } + + virtual float GetVerticalScaleFactor(void) const + { + return __scaleFactorV; + } + + private: + _Scaler __scalerH; + _Scaler __scalerV; + + float __scaleFactorH; + float __scaleFactorV; + + }; // _Xformer + + pTransformer = new (std::nothrow) _Xformer(srcDim, trgDim); + + return (pTransformer) ? E_SUCCESS : E_SYSTEM; +} +}} // Tizen::Graphics + + +namespace Tizen { namespace Graphics +{ + +#ifdef USE_RESOLUTION_ENUM_VALUE + +template<_LogicalResolution LogRes> +struct LogResTraits +{ +}; + +template<_PhysicalResolution PhyRes> +struct PhyResTraits +{ +}; + +template<_BaseScreenSize ScrRes> +struct ScrResTraits +{ +}; + +//_LogicalResolution +template<> +struct LogResTraits +{ + enum { WIDTH = 240 }; +}; + +template<> +struct LogResTraits +{ + enum { WIDTH = 320 }; +}; + +template<> +struct LogResTraits +{ + enum { WIDTH = 480 }; +}; + +template<> +struct LogResTraits +{ + enum { WIDTH = 720 }; +}; + +template<> +struct LogResTraits +{ + enum { WIDTH = 800 }; +}; + +template<> +struct LogResTraits +{ + enum { WIDTH = 1080 }; +}; + +template<> +struct LogResTraits +{ + enum { WIDTH = 1600 }; +}; + +//_PhysicalResolution +template<> +struct PhyResTraits +{ + enum { WIDTH = 480, HEIGHT = 800 }; +}; + +template<> +struct PhyResTraits +{ + enum { WIDTH = 240, HEIGHT = 400 }; +}; + +template<> +struct PhyResTraits +{ + enum { WIDTH = 320, HEIGHT = 480 }; +}; + +template<> +struct PhyResTraits +{ + enum { WIDTH = 720, HEIGHT = 1280 }; +}; + +//_BaseScreenSize +template<> +struct ScrResTraits +{ + enum { WIDTH = 1 }; +}; + +template<> +struct ScrResTraits +{ + enum { WIDTH = 2 }; +}; + + +const char* +_GetStringResolution(_LogicalResolution res) +{ + switch (res) + { + case RESOLUTION_LOGICAL_DEFAULT: + return "DEFAULT"; + case RESOLUTION_LOGICAL_240: + return "240"; + case RESOLUTION_LOGICAL_320: + return "320"; + case RESOLUTION_LOGICAL_360: + return "360"; + case RESOLUTION_LOGICAL_480: + return "480"; + case RESOLUTION_LOGICAL_720: + return "720"; + case RESOLUTION_LOGICAL_800: + return "800"; + case RESOLUTION_LOGICAL_960: + return "960"; + case RESOLUTION_LOGICAL_1080: + return "1080"; + case RESOLUTION_LOGICAL_1440: + return "1440"; + case RESOLUTION_LOGICAL_1600: + return "1600"; + default: + return "Unknown resolution"; + } +} + +const char* +_GetStringResolution(_PhysicalResolution res) +{ + switch (res) + { + case RESOLUTION_PHYSICAL_DEFAULT: + return "DEFAULT"; + case RESOLUTION_PHYSICAL_WVGA: + return "WVGA"; + case RESOLUTION_PHYSICAL_WQVGA: + return "WQVGA"; + case RESOLUTION_PHYSICAL_HVGA: + return "HVGA"; + case RESOLUTION_PHYSICAL_HD: + return "HD"; + case RESOLUTION_PHYSICAL_HD1080: + return "HD1080"; + case RESOLUTION_PHYSICAL_WXGA: + return "WXGA"; + case RESOLUTION_PHYSICAL_WQXGA: + return "WQXGA"; + default: + return "Unknown resolution"; + } +} + + +const int +_GetIntegerResolution(_LogicalResolution res) +{ + switch (res) + { + case RESOLUTION_LOGICAL_240: + return 240; + case RESOLUTION_LOGICAL_320: + return 320; + case RESOLUTION_LOGICAL_360: + return 360; + case RESOLUTION_LOGICAL_480: + return 480; + case RESOLUTION_LOGICAL_720: + return 720; + case RESOLUTION_LOGICAL_800: + return 800; + case RESOLUTION_LOGICAL_960: + return 960; + case RESOLUTION_LOGICAL_1080: + return 1080; + case RESOLUTION_LOGICAL_1440: + return 1440; + case RESOLUTION_LOGICAL_1600: + return 1600; + default: + return -1; + } +} + +const int +_GetIntegerResolution(_PhysicalResolution res) +{ + switch (res) + { + case RESOLUTION_PHYSICAL_WVGA: + return 480; + case RESOLUTION_PHYSICAL_WQVGA: + return 240; + case RESOLUTION_PHYSICAL_HVGA: + return 320; + case RESOLUTION_PHYSICAL_HD: + return 720; + case RESOLUTION_PHYSICAL_HD1080: + return 1080; + case RESOLUTION_PHYSICAL_WXGA: + return 800; + case RESOLUTION_PHYSICAL_WQXGA: + return 1600; + default: + return -1; + } +} + +/***************************************************************************************** + * Supported transformations + + * - Normal_480 to Large_WQVGA Large * 480 : Normal * WQVGA + +**************************Normal to Normal(48)************************** + * - Normal_240 to Normal_WVGA 480 * 240 (1) : 480 * 480 (2) + * - Normal_WVGA to Normal_240 480 * 480 (2) : 480 * 240 (1) + * - Normal_240 to Normal_HVGA 480 * 240 (3) : 480 * 320 (4) + * - Normal_HVGA to Normal_240 480 * 320 (4) : 480 * 240 (3) + * - Normal_240 to Normal_HD 480 * 240 (1) : 480 * 720 (3) + * - Normal_HD to Normal_240 480 * 720 (3) : 480 * 240 (1) + + * - Normal_320 to Normal_WQVGA 480 * 320 (4) : 480 * 240 (3) + * - Normal_WQVGA to Normal_320 480 * 240 (3) : 480 * 320 (4) + * - Normal_320 to Normal_WVGA 480 * 320 (2) : 480 * 480 (3) + * - Normal_WVGA to Normal_320 480 * 480 (3) : 480 * 320 (2) + * - Normal_320 to Normal_HD 480 * 320 (4) : 480 * 720 (9) + * - Normal_HD to Normal_320 480 * 720 (9) : 480 * 320 (4) + + * - Normal_480 to Normal_WQVGA 480 * 480 (2) : 480 * 240 (1) + * - Normal_WQVGA to Normal_480 480 * 240 (1) : 480 * 480 (2) + * - Normal_480 to Normal_HVGA 480 * 480 (3) : 480 * 320 (2) + * - Normal_HVGA to Normal_480 480 * 320 (2) : 480 * 480 (3) + * - Normal_480 to Normal_HD 480 * 480 (2) : 480 * 720 (3) + * - Normal_HD to Normal_480 480 * 720 (3) : 480 * 480 (2) + + * - Normal_720 to Normal_WQVGA 480 * 720 (3) : 480 * 240 (1) + * - Normal_WQVGA to Normal_720 480 * 240 (1) : 480 * 720 (3) + * - Normal_720 to Normal_WVGA 480 * 720 (3) : 480 * 480 (2) + * - Normal_WVGA to Normal_720 480 * 480 (2) : 480 * 720 (3) + * - Normal_720 to Normal_HVGA 480 * 720 (9) : 480 * 320 (4) + * - Normal_HVGA to Normal_720 480 * 320 (4) : 480 * 720 (9) + + * - Normal_800 to Normal_WQVGA 480 * 800 (10) : 480 * 240 (3) + * - Normal_WQVGA to Normal_800 480 * 240 (3) : 480 * 800 (10) + * - Normal_800 to Normal_WVGA 480 * 800 (5) : 480 * 480 (3) + * - Normal_WVGA to Normal_800 480 * 480 (3) : 480 * 800 (5) + * - Normal_800 to Normal_HVGA 480 * 800 (5) : 480 * 320 (2) + * - Normal_HVGA to Normal_800 480 * 320 (2) : 480 * 800 (5) + * - Normal_800 to Normal_HD 480 * 800 (10) : 480 * 720 (9) + * - Normal_HD to Normal_800 480 * 720 (9) : 480 * 800 (10) + + * - Normal_1080 to Normal_WQVGA 480 * 1080 (27) : 480 * 240 (6) + * - Normal_WQVGA to Normal_1080 480 * 240 (6) : 480 * 1080 (27) + * - Normal_1080 to Normal_WVGA 480 * 1080 (27) : 480 * 480 (12) + * - Normal_WVGA to Normal_1080 480 * 480 (12) : 480 * 1080 (27) + * - Normal_1080 to Normal_HVGA 480 * 1080 (27) : 480 * 320 (8) + * - Normal_HVGA to Normal_1080 480 * 320 (8) : 480 * 1080 (27) + * - Normal_1080 to Normal_HD 480 * 1080 (27) : 480 * 720 (18) + * - Normal_HD to Normal_1080 480 * 720 (18) : 480 * 1080 (27) + + * - Normal_1600 to Normal_WQVGA 480 * 1600 (20) : 480 * 240 (3) + * - Normal_WQVGA to Normal_1600 480 * 240 (3) : 480 * 1600 (20) + * - Normal_1600 to Normal_WVGA 480 * 1600 (10) : 480 * 480 (3) + * - Normal_WVGA to Normal_1600 480 * 480 (3) : 480 * 1600 (10) + * - Normal_1600 to Normal_HVGA 480 * 1600 (5) : 480 * 320 (1) + * - Normal_HVGA to Normal_1600 480 * 320 (1) : 480 * 1600 (5) + * - Normal_1600 to Normal_HD 480 * 1600 (20) : 480 * 720 (9) + * - Normal_HD to Normal_1600 480 * 720 (9) : 480 * 1600 (20) + +**************************Large to Large(48)************************** + * - Large_240 to Large_WVGA 720 * 240 (1) : 720 * 480 (2) + * - Large_WVGA to Large_240 720 * 480 (2) : 720 * 240 (1) + * - Large_240 to Large_HVGA 720 * 240 (3) : 720 * 320 (4) + * - Large_HVGA to Large_240 720 * 320 (4) : 720 * 240 (3) + * - Large_240 to Large_HD 720 * 240 (1) : 720 * 720 (3) + * - Large_HD to Large_240 720 * 720 (3) : 720 * 240 (1) + + * - Large_320 to Large_WQVGA 720 * 320 (4) : 720 * 240 (3) + * - Large_WQVGA to Large_320 720 * 240 (3) : 720 * 320 (4) + * - Large_320 to Large_WVGA 720 * 320 (2) : 720 * 480 (3) + * - Large_WVGA to Large_320 720 * 480 (3) : 720 * 320 (2) + * - Large_320 to Large_HD 720 * 320 (4) : 720 * 720 (9) + * - Large_HD to Large_320 720 * 720 (9) : 720 * 320 (4) + + * - Large_480 to Large_WQVGA 720 * 480 (2) : 720 * 240 (1) + * - Large_WQVGA to Large_480 720 * 240 (1) : 720 * 480 (2) + * - Large_480 to Large_HVGA 720 * 480 (3) : 720 * 320 (2) + * - Large_HVGA to Large_480 720 * 320 (2) : 720 * 480 (3) + * - Large_480 to Large_HD 720 * 480 (2) : 720 * 720 (3) + * - Large_HD to Large_480 720 * 720 (3) : 720 * 480 (2) + + * - Large_720 to Large_WQVGA 720 * 720 (3) : 720 * 240 (1) + * - Large_WQVGA to Large_720 720 * 240 (1) : 720 * 720 (3) + * - Large_720 to Large_WVGA 720 * 720 (3) : 720 * 480 (2) + * - Large_WVGA to Large_720 720 * 480 (2) : 720 * 720 (3) + * - Large_720 to Large_HVGA 720 * 720 (9) : 720 * 320 (4) + * - Large_HVGA to Large_720 720 * 320 (4) : 720 * 720 (9) + + * - Large_800 to Large_WQVGA 720 * 800 (10) : 720 * 240 (3) + * - Large_WQVGA to Large_800 720 * 240 (3) : 720 * 800 (10) + * - Large_800 to Large_WVGA 720 * 800 (5) : 720 * 480 (3) + * - Large_WVGA to Large_800 720 * 480 (3) : 720 * 800 (5) + * - Large_800 to Large_HVGA 720 * 800 (5) : 720 * 320 (2) + * - Large_HVGA to Large_800 720 * 320 (2) : 720 * 800 (5) + * - Large_800 to Large_HD 720 * 800 (10) : 720 * 720 (9) + * - Large_HD to Large_800 720 * 720 (9) : 720 * 800 (10) + + * - Large_1080 to Large_WQVGA 720 * 1080 (27) : 720 * 240 (6) + * - Large_WQVGA to Large_1080 720 * 240 (6) : 720 * 1080 (27) + * - Large_1080 to Large_WVGA 720 * 1080 (27) : 720 * 480 (12) + * - Large_WVGA to Large_1080 720 * 480 (12) : 720 * 1080 (27) + * - Large_1080 to Large_HVGA 720 * 1080 (27) : 720 * 320 (8) + * - Large_HVGA to Large_1080 720 * 320 (8) : 720 * 1080 (27) + * - Large_1080 to Large_HD 720 * 1080 (27) : 720 * 720 (18) + * - Large_HD to Large_1080 720 * 720 (18) : 720 * 1080 (27) + + * - Large_1600 to Large_WQVGA 720 * 1600 (20) : 720 * 240 (3) + * - Large_WQVGA to Large_1600 720 * 240 (3) : 720 * 1600 (20) + * - Large_1600 to Large_WVGA 720 * 1600 (10) : 720 * 480 (3) + * - Large_WVGA to Large_1600 720 * 480 (3) : 720 * 1600 (10) + * - Large_1600 to Large_HVGA 720 * 1600 (5) : 720 * 320 (1) + * - Large_HVGA to Large_1600 720 * 320 (1) : 720 * 1600 (5) + * - Large_1600 to Large_HD 720 * 1600 (20) : 720 * 720 (9) + * - Large_HD to Large_1600 720 * 720 (9) : 720 * 1600 (20) + + **************************Normal to Large(48)************************** + * - Normal_240 to Large_WVGA 720 * 240 (3) : 480 * 480 (4) + * - Large_WVGA to Normal_240 480 * 480 (4) : 720 * 240 (3) + * - Normal_240 to Large_HVGA 720 * 240 (9) : 480 * 320 (8) + * - Large_HVGA to Normal_240 480 * 320 (8) : 720 * 240 (9) + * - Normal_240 to Large_HD 720 * 240 (1) : 480 * 720 (2) + * - Large_HD to Normal_240 480 * 720 (2) : 720 * 240 (1) + + * - Normal_320 to Large_WQVGA 720 * 320 (3) : 480 * 240 (1) + * - Large_WQVGA to Normal_320 480 * 240 (1) : 720 * 320 (3) + * - Normal_320 to Large_WVGA 720 * 320 (1) : 480 * 480 (1) + * - Large_WVGA to Normal_320 480 * 480 (1) : 720 * 320 (1) + * - Normal_320 to Large_HD 720 * 320 (2) : 480 * 720 (3) + * - Large_HD to Normal_320 480 * 720 (3) : 720 * 320 (2) + + * - Normal_480 to Large_WQVGA 720 * 480 (4) : 480 * 240 (3) + * - Large_WQVGA to Normal_480 480 * 240 (3) : 720 * 480 (4) + * - Normal_480 to Large_HVGA 720 * 480 (9) : 480 * 320 (4) + * - Large_HVGA to Normal_480 480 * 320 (4) : 720 * 480 (9) + * - Normal_480 to Large_HD 720 * 480 (1) : 480 * 720 (1) + * - Large_HD to Normal_480 480 * 720 (1) : 720 * 480 (1) + + * - Normal_720 to Large_WQVGA 720 * 720 (9) : 480 * 240 (2) + * - Large_WQVGA to Normal_720 480 * 240 (2) : 720 * 720 (9) + * - Normal_720 to Large_WVGA 720 * 720 (9) : 480 * 480 (4) + * - Large_WVGA to Normal_720 480 * 480 (4) : 720 * 720 (9) + * - Normal_720 to Large_HVGA 720 * 720 (27) : 480 * 320 (8) + * - Large_HVGA to Normal_720 480 * 320 (8) : 720 * 720 (27) + + * - Normal_800 to Large_WQVGA 720 * 800 (5) : 480 * 240 (1) + * - Large_WQVGA to Normal_800 480 * 240 (1) : 720 * 800 (5) + * - Normal_800 to Large_WVGA 720 * 800 (5) : 480 * 480 (2) + * - Large_WVGA to Normal_800 480 * 480 (2) : 720 * 800 (5) + * - Normal_800 to Large_HVGA 720 * 800 (15) : 480 * 320 (4) + * - Large_HVGA to Normal_800 480 * 320 (4) : 720 * 800 (15) + * - Normal_800 to Large_HD 720 * 800 (5) : 480 * 720 (3) + * - Large_HD to Normal_800 480 * 720 (3) : 720 * 800 (5) + + * - Normal_1080 to Large_WQVGA 720 * 1080 (27) : 480 * 240 (4) + * - Large_WQVGA to Normal_1080 480 * 240 (4) : 720 * 1080 (27) + * - Normal_1080 to Large_WVGA 720 * 1080 (27) : 480 * 480 (8) + * - Large_WVGA to Normal_1080 480 * 480 (8) : 720 * 1080 (27) + * - Normal_1080 to Large_HVGA 720 * 1080 (81) : 480 * 320 (16) + * - Large_HVGA to Normal_1080 480 * 320 (16) : 720 * 1080 (81) + * - Normal_1080 to Large_HD 720 * 1080 (9) : 480 * 720 (4) + * - Large_HD to Normal_1080 480 * 720 (4) : 720 * 1080 (9) + + * - Normal_1600 to Large_WQVGA 720 * 1600 (10) : 480 * 240 (1) + * - Large_WQVGA to Normal_1600 480 * 240 (1) : 720 * 1600 (10) + * - Normal_1600 to Large_WVGA 720 * 1600 (5) : 480 * 480 (1) + * - Large_WVGA to Normal_1600 480 * 480 (1) : 720 * 1600 (5) + * - Normal_1600 to Large_HVGA 720 * 1600 (15) : 480 * 320 (2) + * - Large_HVGA to Normal_1600 480 * 320 (2) : 720 * 1600 (15) + * - Normal_1600 to Large_HD 720 * 1600 (10) : 480 * 720 (3) + * - Large_HD to Normal_1600 480 * 720 (3) : 720 * 1600 (10) + + **************************Large to Normal(48)************************** + * - Large_240 to Normal_WVGA 480 * 240 (1) : 720 * 480 (3) + * - Normal_WVGA to Large_240 720 * 480 (3) : 480 * 240 (1) + * - Large_240 to Normal_HVGA 480 * 240 (1) : 720 * 320 (2) + * - Normal_HVGA to Large_240 720 * 320 (2) : 480 * 240 (1) + * - Large_240 to Normal_HD 480 * 240 (2) : 720 * 720 (9) + * - Normal_HD to Large_240 720 * 720 (9) : 480 * 240 (2) + + * - Large_320 to Normal_WQVGA 480 * 320 (8) : 720 * 240 (9) + * - Normal_WQVGA to Large_320 720 * 240 (9) : 480 * 320 (8) + * - Large_320 to Normal_WVGA 480 * 320 (4) : 720 * 480 (9) + * - Normal_WVGA to Large_320 720 * 480 (9) : 480 * 320 (4) + * - Large_320 to Normal_HD 480 * 320 (8) : 720 * 720 (27) + * - Normal_HD to Large_320 720 * 720 (27) : 480 * 320 (8) + + * - Large_480 to Normal_WQVGA 480 * 480 (4) : 720 * 240 (3) + * - Normal_WQVGA to Large_480 720 * 240 (3) : 480 * 480 (4) + * - Large_480 to Normal_HVGA 480 * 480 (1) : 720 * 320 (1) + * - Normal_HVGA to Large_480 720 * 320 (1) : 480 * 480 (1) + * - Large_480 to Normal_HD 480 * 480 (2) : 720 * 720 (3) + * - Normal_HD to Large_480 720 * 720 (3) : 480 * 480 (2) + + * - Large_720 to Normal_WQVGA 480 * 720 (2) : 720 * 240 (1) + * - Normal_WQVGA to Large_720 720 * 240 (1) : 480 * 720 (2) + * - Large_720 to Normal_WVGA 480 * 720 (1) : 720 * 480 (1) + * - Normal_WVGA to Large_720 720 * 480 (1) : 480 * 720 (1) + * - Large_720 to Normal_HVGA 480 * 720 (3) : 720 * 320 (2) + * - Normal_HVGA to Large_720 720 * 320 (2) : 480 * 720 (3) + + * - Large_800 to Normal_WQVGA 480 * 800 (20) : 720 * 240 (9) + * - Normal_WQVGA to Large_800 720 * 240 (9) : 480 * 800 (20) + * - Large_800 to Normal_WVGA 480 * 800 (10) : 720 * 480 (9) + * - Normal_WVGA to Large_800 720 * 480 (9) : 480 * 800 (10) + * - Large_800 to Normal_HVGA 480 * 800 (5) : 720 * 320 (3) + * - Normal_HVGA to Large_800 720 * 320 (3) : 480 * 800 (5) + * - Large_800 to Normal_HD 480 * 800 (9) : 720 * 720 (20) + * - Normal_HD to Large_800 720 * 720 (20) : 480 * 800 (9) + + * - Large_1080 to Normal_WQVGA 480 * 1080 (3) : 720 * 240 (1) + * - Normal_WQVGA to Large_1080 720 * 240 (1) : 480 * 1080 (3) + * - Large_1080 to Normal_WVGA 480 * 1080 (3) : 720 * 480 (2) + * - Normal_WVGA to Large_1080 720 * 480 (2) : 480 * 1080 (3) + * - Large_1080 to Normal_HVGA 480 * 1080 (9) : 720 * 320 (4) + * - Normal_HVGA to Large_1080 720 * 320 (4) : 480 * 1080 (9) + * - Large_1080 to Normal_HD 480 * 1080 (1) : 720 * 720 (10) + * - Normal_HD to Large_1080 720 * 720 (10) : 480 * 1080 (1) + + * - Large_1600 to Normal_WQVGA 480 * 1600 (40) : 720 * 240 (9) + * - Normal_WQVGA to Large_1600 720 * 240 (9) : 480 * 1600 (40) + * - Large_1600 to Normal_WVGA 480 * 1600 (20) : 720 * 480 (9) + * - Normal_WVGA to Large_1600 720 * 480 (9) : 480 * 1600 (20) + * - Large_1600 to Normal_HVGA 480 * 1600 (10) : 720 * 320 (3) + * - Normal_HVGA to Large_1600 720 * 320 (3) : 480 * 1600 (10) + * - Large_1600 to Normal_HD 480 * 1600 (40) : 720 * 720 (27) + * - Normal_HD to Large_1600 720 * 720 (27) : 480 * 1600 (40) + + *****************************************************************************************/ + +class TransformerNormal240ToNormalHvga + : public _Internal::Transformer + <_Internal::Scaler ::WIDTH * ScrResTraits ::WIDTH , PhyResTraits ::WIDTH * ScrResTraits ::WIDTH> + ,_Internal::Scaler ::WIDTH * ScrResTraits ::WIDTH , PhyResTraits ::WIDTH * ScrResTraits ::WIDTH> > +{ +}; // TransformerNormal240ToNormalHvga + +class TransformerNormalHvgaToNormal240 + : public _Internal::Transformer + <_Internal::Scaler ::WIDTH * ScrResTraits ::WIDTH , LogResTraits ::WIDTH * ScrResTraits ::WIDTH> + ,_Internal::Scaler ::WIDTH * ScrResTraits ::WIDTH , LogResTraits ::WIDTH * ScrResTraits ::WIDTH> > +{ +}; // TransformerNormalHvgaToNormal240 + +class TransformerNormal240ToNormalWvga + : public _Internal::Transformer + <_Internal::Scaler ::WIDTH * ScrResTraits ::WIDTH , PhyResTraits ::WIDTH * ScrResTraits ::WIDTH> + ,_Internal::Scaler ::WIDTH * ScrResTraits ::WIDTH , PhyResTraits ::WIDTH * ScrResTraits ::WIDTH> > +{ +}; // TransformerNormal240ToNormalWvga + +class TransformerNormalWvgaToNormal240 + : public _Internal::Transformer + <_Internal::Scaler ::WIDTH * ScrResTraits ::WIDTH , LogResTraits ::WIDTH * ScrResTraits ::WIDTH> + ,_Internal::Scaler ::WIDTH * ScrResTraits ::WIDTH , LogResTraits ::WIDTH * ScrResTraits ::WIDTH> > +{ +}; // TransformerNormalWvgaToNormal240 + +class TransformerNormal240ToNormalHd + : public _Internal::Transformer + <_Internal::Scaler ::WIDTH * ScrResTraits ::WIDTH , PhyResTraits ::WIDTH * ScrResTraits ::WIDTH> + ,_Internal::Scaler ::WIDTH * ScrResTraits ::WIDTH , PhyResTraits ::WIDTH * ScrResTraits ::WIDTH> > +{ +}; // TransformerNormal240ToNormalHd + +class TransformerNormalHdToNormal240 + : public _Internal::Transformer + <_Internal::Scaler ::WIDTH * ScrResTraits ::WIDTH , LogResTraits ::WIDTH * ScrResTraits ::WIDTH> + ,_Internal::Scaler ::WIDTH * ScrResTraits ::WIDTH , LogResTraits ::WIDTH * ScrResTraits ::WIDTH> > +{ +}; // TransformerNormalHdToNormal240 + +class TransformerNormal320ToNormalWqvga + : public _Internal::Transformer + <_Internal::Scaler ::WIDTH * ScrResTraits ::WIDTH , PhyResTraits ::WIDTH * ScrResTraits ::WIDTH> + ,_Internal::Scaler ::WIDTH * ScrResTraits ::WIDTH , PhyResTraits ::WIDTH * ScrResTraits ::WIDTH> > +{ +}; // TransformerNormal320ToNormalWqvga + +class TransformerNormalWqvgaToNormal320 + : public _Internal::Transformer + <_Internal::Scaler ::WIDTH * ScrResTraits ::WIDTH , LogResTraits ::WIDTH * ScrResTraits ::WIDTH> + ,_Internal::Scaler ::WIDTH * ScrResTraits ::WIDTH , LogResTraits ::WIDTH * ScrResTraits ::WIDTH> > +{ +}; // TransformerNormalWqvgaToNormal320 + +class TransformerNormal320ToNormalWvga + : public _Internal::Transformer + <_Internal::Scaler ::WIDTH * ScrResTraits ::WIDTH , PhyResTraits ::WIDTH * ScrResTraits ::WIDTH> + ,_Internal::Scaler ::WIDTH * ScrResTraits ::WIDTH , PhyResTraits ::WIDTH * ScrResTraits ::WIDTH> > +{ +}; // TransformerNormal320ToNormalWvga + +class TransformerNormalWvgaToNormal320 + : public _Internal::Transformer + <_Internal::Scaler ::WIDTH * ScrResTraits ::WIDTH , LogResTraits ::WIDTH * ScrResTraits ::WIDTH> + ,_Internal::Scaler ::WIDTH * ScrResTraits ::WIDTH , LogResTraits ::WIDTH * ScrResTraits ::WIDTH> > +{ +}; // TransformerNormalWvgaToNormal320 + +class TransformerNormal320ToNormalHd + : public _Internal::Transformer + <_Internal::Scaler ::WIDTH * ScrResTraits ::WIDTH , PhyResTraits ::WIDTH * ScrResTraits ::WIDTH> + ,_Internal::Scaler ::WIDTH * ScrResTraits ::WIDTH , PhyResTraits ::WIDTH * ScrResTraits ::WIDTH> > +{ +}; // TransformerNormal320ToNormalHd + +class TransformerNormalHdToNormal320 + : public _Internal::Transformer + <_Internal::Scaler ::WIDTH * ScrResTraits ::WIDTH , LogResTraits ::WIDTH * ScrResTraits ::WIDTH> + ,_Internal::Scaler ::WIDTH * ScrResTraits ::WIDTH , LogResTraits ::WIDTH * ScrResTraits ::WIDTH> > +{ +}; // TransformerNormalHdToNormal320 + +class TransformerNormal480ToNormalWqvga + : public _Internal::Transformer + <_Internal::Scaler ::WIDTH * ScrResTraits ::WIDTH , PhyResTraits ::WIDTH * ScrResTraits ::WIDTH> + ,_Internal::Scaler ::WIDTH * ScrResTraits ::WIDTH , PhyResTraits ::WIDTH * ScrResTraits ::WIDTH> > +{ +}; // TransformerNormal480ToNormalWqvga + +class TransformerNormalWqvgaToNormal480 + : public _Internal::Transformer + <_Internal::Scaler ::WIDTH * ScrResTraits ::WIDTH , LogResTraits ::WIDTH * ScrResTraits ::WIDTH> + ,_Internal::Scaler ::WIDTH * ScrResTraits ::WIDTH , LogResTraits ::WIDTH * ScrResTraits ::WIDTH> > +{ +}; // TransformerNormalWqvgaToNormal480 + +class TransformerNormal480ToNormalHvga + : public _Internal::Transformer + <_Internal::Scaler ::WIDTH * ScrResTraits ::WIDTH , PhyResTraits ::WIDTH * ScrResTraits ::WIDTH> + ,_Internal::Scaler ::WIDTH * ScrResTraits ::WIDTH , PhyResTraits ::WIDTH * ScrResTraits ::WIDTH> > +{ +}; // TransformerNormal480ToNormalHvga + +class TransformerNormalHvgaToNormal480 + : public _Internal::Transformer + <_Internal::Scaler ::WIDTH * ScrResTraits ::WIDTH , LogResTraits ::WIDTH * ScrResTraits ::WIDTH> + ,_Internal::Scaler ::WIDTH * ScrResTraits ::WIDTH , LogResTraits ::WIDTH * ScrResTraits ::WIDTH> > +{ +}; // TransformerNormalHvgaToNormal480 + +class TransformerNormal480ToNormalHd + : public _Internal::Transformer + <_Internal::Scaler ::WIDTH * ScrResTraits ::WIDTH , PhyResTraits ::WIDTH * ScrResTraits ::WIDTH> + ,_Internal::Scaler ::WIDTH * ScrResTraits ::WIDTH , PhyResTraits ::WIDTH * ScrResTraits ::WIDTH> > +{ +}; // TransformerNormal480ToNormalHd + +class TransformerNormalHdToNormal480 + : public _Internal::Transformer + <_Internal::Scaler ::WIDTH * ScrResTraits ::WIDTH , LogResTraits ::WIDTH * ScrResTraits ::WIDTH> + ,_Internal::Scaler ::WIDTH * ScrResTraits ::WIDTH , LogResTraits ::WIDTH * ScrResTraits ::WIDTH> > +{ +}; // TransformerNormalHdToNormal480 + +class TransformerNormal720ToNormalWqvga + : public _Internal::Transformer + <_Internal::Scaler ::WIDTH * ScrResTraits ::WIDTH , PhyResTraits ::WIDTH * ScrResTraits ::WIDTH> + ,_Internal::Scaler ::WIDTH * ScrResTraits ::WIDTH , PhyResTraits ::WIDTH * ScrResTraits ::WIDTH> > +{ +}; // TransformerNormal720ToNormalWqvga + +class TransformerNormalWqvgaToNormal720 + : public _Internal::Transformer + <_Internal::Scaler ::WIDTH * ScrResTraits ::WIDTH , LogResTraits ::WIDTH * ScrResTraits ::WIDTH> + ,_Internal::Scaler ::WIDTH * ScrResTraits ::WIDTH , LogResTraits ::WIDTH * ScrResTraits ::WIDTH> > +{ +}; // TransformerNormalWqvgaToNormal720 + +class TransformerNormal720ToNormalWvga + : public _Internal::Transformer + <_Internal::Scaler ::WIDTH * ScrResTraits ::WIDTH , PhyResTraits ::WIDTH * ScrResTraits ::WIDTH> + ,_Internal::Scaler ::WIDTH * ScrResTraits ::WIDTH , PhyResTraits ::WIDTH * ScrResTraits ::WIDTH> > +{ +}; // TransformerNormal720ToNormalWvga + +class TransformerNormalWvgaToNormal720 + : public _Internal::Transformer + <_Internal::Scaler ::WIDTH * ScrResTraits ::WIDTH , LogResTraits ::WIDTH * ScrResTraits ::WIDTH> + ,_Internal::Scaler ::WIDTH * ScrResTraits ::WIDTH , LogResTraits ::WIDTH * ScrResTraits ::WIDTH> > +{ +}; // TransformerNormalWvgaToNormalWvga + +class TransformerNormal720ToNormalHvga + : public _Internal::Transformer + <_Internal::Scaler ::WIDTH * ScrResTraits ::WIDTH , PhyResTraits ::WIDTH * ScrResTraits ::WIDTH> + ,_Internal::Scaler ::WIDTH * ScrResTraits ::WIDTH , PhyResTraits ::WIDTH * ScrResTraits ::WIDTH> > +{ +}; // TransformerNormal720ToNormalHvga + +class TransformerNormalHvgaToNormal720 + : public _Internal::Transformer + <_Internal::Scaler ::WIDTH * ScrResTraits ::WIDTH , LogResTraits ::WIDTH * ScrResTraits ::WIDTH> + ,_Internal::Scaler ::WIDTH * ScrResTraits ::WIDTH , LogResTraits ::WIDTH * ScrResTraits ::WIDTH> > +{ +}; // TransformerNormalHvgaToNormal720 + +bool +_WillNotTransform(_LogicalResolution logicalResolution, _BaseScreenSize logicalBaseScreenSize, _PhysicalResolution physicalResolution, _BaseScreenSize physicalBaseScreenSize) +{ + return ((logicalResolution == RESOLUTION_LOGICAL_240 && physicalResolution == RESOLUTION_PHYSICAL_WQVGA) || + (logicalResolution == RESOLUTION_LOGICAL_320 && physicalResolution == RESOLUTION_PHYSICAL_HVGA) || + (logicalResolution == RESOLUTION_LOGICAL_480 && physicalResolution == RESOLUTION_PHYSICAL_WVGA) || + (logicalResolution == RESOLUTION_LOGICAL_720 && physicalResolution == RESOLUTION_PHYSICAL_HD) || + (logicalResolution == RESOLUTION_LOGICAL_800 && physicalResolution == RESOLUTION_PHYSICAL_WXGA) || + (logicalResolution == RESOLUTION_LOGICAL_1080 && physicalResolution == RESOLUTION_PHYSICAL_HD1080) || + (logicalResolution == RESOLUTION_LOGICAL_1600 && physicalResolution == RESOLUTION_PHYSICAL_WQXGA)) && + (logicalBaseScreenSize == physicalBaseScreenSize); +} + +#endif + +const int +_GetIntegerResolution(_BaseScreenSize res) +{ + switch (res) + { + case BASE_SCREEN_SIZE_NORMAL: + return 1; + case BASE_SCREEN_SIZE_LARGE: + return 2; + default: + return -1; + } +} + +bool +_WillNotTransform(int srcResolution, _BaseScreenSize srcBaseScreenSize, Dimension destResolution, _BaseScreenSize destBaseScreenSize) +{ + return ((srcResolution == destResolution.width) && (srcBaseScreenSize == destBaseScreenSize)); +} + +class _TransformerGeneral + : public _ICoordinateSystemTransformer + { + public: + _TransformerGeneral(const int srcScalar, const int dstScalar) + : __srcScalar(srcScalar) + , __dstScalar(dstScalar) + , __scaleFactor(dstScalar * 1.0f / srcScalar) + { + } + + virtual int TransformHorizontal(int width) const + { + return ScaleLength(width); + } + + virtual int TransformVertical(int height) const + { + return ScaleLength(height); + } + + virtual int Transform(int scalar) const + { + return ScaleLength(scalar); + } + + virtual float TransformHorizontal(float width) const + { + return ScaleLength(width); + } + + virtual float TransformVertical(float height) const + { + return ScaleLength(height); + } + + virtual float Transform(float scalar) const + { + return ScaleLength(scalar); + } + + virtual Point Transform(const Point& point) const + { + return Point(ScaleDisplacement(point.x), ScaleDisplacement(point.y)); + } + + virtual Dimension Transform(const Dimension& dim) const + { + return Dimension(ScaleLength(dim.width), ScaleLength(dim.height)); + } + + virtual Rectangle Transform(const Rectangle& rect) const + { + int x = ScaleDisplacement(rect.x); + int y = ScaleDisplacement(rect.y); + int w = ScaleLength(rect.width); + int h = ScaleLength(rect.height); + + return Rectangle(x, y, w, h); + } + + virtual FloatPoint Transform(const FloatPoint& point) const + { + return FloatPoint(ScaleDisplacement(point.x), ScaleDisplacement(point.y)); + } + + virtual FloatDimension Transform(const FloatDimension& dim) const + { + return FloatDimension(ScaleLength(dim.width), ScaleLength(dim.height)); + } + + virtual FloatRectangle Transform(const FloatRectangle& rect) const + { + float x = ScaleDisplacement(rect.x); + float y = ScaleDisplacement(rect.y); + float w = ScaleLength(rect.width); + float h = ScaleLength(rect.height); + + return FloatRectangle(x, y, w, h); + } + + virtual int TransformFloatToInt(float scalar) const + { + return static_cast(ScaleLength(scalar)); + } + + virtual int TransformHorizontalFloatToInt(float width) const + { + return static_cast(ScaleLength(width)); + } + + virtual int TransformVerticalFloatToInt(float height) const + { + return static_cast(ScaleLength(height)); + } + + virtual float GetHorizontalScaleFactor(void) const + { + return __scaleFactor; + } + + virtual float GetVerticalScaleFactor(void) const + { + return __scaleFactor; + } + +private: + int ScaleDisplacement(int srcVal) const + { + if (__srcScalar) + { + long long tmpVal = srcVal; + tmpVal *= __dstScalar; + tmpVal /= __srcScalar; + + return static_cast(tmpVal); + } + else // defence code for division by zero + { + return srcVal; + } + } + + int ScaleLength(int srcVal) const + { + if (__srcScalar) + { + long long tmpVal = srcVal; + tmpVal *= __dstScalar; + tmpVal /= __srcScalar; + + return static_cast(tmpVal); + } + else // defence code for division by zero + { + return srcVal; + } + } + + float ScaleDisplacement(float srcVal) const + { + return srcVal * __scaleFactor; + } + + float ScaleLength(float srcVal) const + { + return srcVal * __scaleFactor; + } + +private: + int __srcScalar; + int __dstScalar; + + float __scaleFactor; + +}; // _TransformerGeneral + + +#ifdef USE_RESOLUTION_ENUM_VALUE + +result +_CoordinateTransformerCore(_ICoordinateSystemTransformer*& pTransformer, _LogicalResolution logicalResolution, _BaseScreenSize logicalBaseScreenSize, _PhysicalResolution physicalResolution, _BaseScreenSize physicalBaseScreenSize, bool isInverse = false) +{ + SysAssert(logicalResolution != RESOLUTION_LOGICAL_DEFAULT); + SysAssert(physicalResolution != RESOLUTION_PHYSICAL_DEFAULT); + SysAssert(logicalBaseScreenSize != BASE_SCREEN_SIZE_DEFAULT); + SysAssert(physicalBaseScreenSize != BASE_SCREEN_SIZE_DEFAULT); + + result r = E_SUCCESS; + pTransformer = null; + + if (_WillNotTransform(logicalResolution,logicalBaseScreenSize, physicalResolution,physicalBaseScreenSize)) + { + pTransformer = new (std::nothrow) _NullCoordinateSystemTransformer(); + + if (pTransformer == null) + { + SysLog(NID_GRP, "[E_OUT_OF_MEMORY] Fail to create a coordinate transformer."); + + return E_OUT_OF_MEMORY; + } + + return E_SUCCESS; + } + +#if 1 + if (isInverse) + { + if (logicalBaseScreenSize == physicalBaseScreenSize) + { + if (logicalResolution == RESOLUTION_LOGICAL_240 && physicalResolution == RESOLUTION_PHYSICAL_WVGA) + { + pTransformer = new (std::nothrow) TransformerNormalWvgaToNormal240; + } + else if (logicalResolution == RESOLUTION_LOGICAL_240 && physicalResolution == RESOLUTION_PHYSICAL_HVGA) + { + pTransformer = new (std::nothrow) TransformerNormalHvgaToNormal240; + } + else if (logicalResolution == RESOLUTION_LOGICAL_240 && physicalResolution == RESOLUTION_PHYSICAL_HD) + { + pTransformer = new (std::nothrow) TransformerNormalHdToNormal240; + } + else if (logicalResolution == RESOLUTION_LOGICAL_320 && physicalResolution == RESOLUTION_PHYSICAL_WQVGA) + { + pTransformer = new (std::nothrow) TransformerNormalWqvgaToNormal320; + } + else if (logicalResolution == RESOLUTION_LOGICAL_320 && physicalResolution == RESOLUTION_PHYSICAL_WVGA) + { + pTransformer = new (std::nothrow) TransformerNormalWvgaToNormal320; + } + else if (logicalResolution == RESOLUTION_LOGICAL_320 && physicalResolution == RESOLUTION_PHYSICAL_HD) + { + pTransformer = new (std::nothrow) TransformerNormalHdToNormal320; + } + else if (logicalResolution == RESOLUTION_LOGICAL_480 && physicalResolution == RESOLUTION_PHYSICAL_WQVGA) + { + pTransformer = new (std::nothrow) TransformerNormalWqvgaToNormal480; + } + else if (logicalResolution == RESOLUTION_LOGICAL_480 && physicalResolution == RESOLUTION_PHYSICAL_HVGA) + { + pTransformer = new (std::nothrow) TransformerNormalHvgaToNormal480; + } + else if (logicalResolution == RESOLUTION_LOGICAL_480 && physicalResolution == RESOLUTION_PHYSICAL_HD) + { + pTransformer = new (std::nothrow) TransformerNormalHdToNormal480; + } + else if (logicalResolution == RESOLUTION_LOGICAL_720 && physicalResolution == RESOLUTION_PHYSICAL_WQVGA) + { + pTransformer = new (std::nothrow) TransformerNormalWqvgaToNormal720; + } + else if (logicalResolution == RESOLUTION_LOGICAL_720 && physicalResolution == RESOLUTION_PHYSICAL_WVGA) + { + pTransformer = new (std::nothrow) TransformerNormalWvgaToNormal720; + } + else if (logicalResolution == RESOLUTION_LOGICAL_720 && physicalResolution == RESOLUTION_PHYSICAL_HVGA) + { + pTransformer = new (std::nothrow) TransformerNormalHvgaToNormal720; + } + else + { + //r = E_INVALID_ARG; + pTransformer = new (std::nothrow) _TransformerGeneral(_GetIntegerResolution(physicalResolution), _GetIntegerResolution(logicalResolution)); + } + } + else + { + //r = E_INVALID_ARG; + pTransformer = new (std::nothrow) _TransformerGeneral(_GetIntegerResolution(physicalResolution) * _GetIntegerResolution(logicalBaseScreenSize), _GetIntegerResolution(logicalResolution) * _GetIntegerResolution(physicalBaseScreenSize)); + } + } + else + { + if (logicalBaseScreenSize == physicalBaseScreenSize) + { + if (logicalResolution == RESOLUTION_LOGICAL_240 && physicalResolution == RESOLUTION_PHYSICAL_WVGA) + { + pTransformer = new (std::nothrow) TransformerNormal240ToNormalWvga; + } + else if (logicalResolution == RESOLUTION_LOGICAL_240 && physicalResolution == RESOLUTION_PHYSICAL_HVGA) + { + pTransformer = new (std::nothrow) TransformerNormal240ToNormalHvga; + } + else if (logicalResolution == RESOLUTION_LOGICAL_240 && physicalResolution == RESOLUTION_PHYSICAL_HD) + { + pTransformer = new (std::nothrow) TransformerNormal240ToNormalHd; + } + else if (logicalResolution == RESOLUTION_LOGICAL_320 && physicalResolution == RESOLUTION_PHYSICAL_WQVGA) + { + pTransformer = new (std::nothrow) TransformerNormal320ToNormalWqvga; + } + else if (logicalResolution == RESOLUTION_LOGICAL_320 && physicalResolution == RESOLUTION_PHYSICAL_WVGA) + { + pTransformer = new (std::nothrow) TransformerNormal320ToNormalWvga; + } + else if (logicalResolution == RESOLUTION_LOGICAL_320 && physicalResolution == RESOLUTION_PHYSICAL_HD) + { + pTransformer = new (std::nothrow) TransformerNormal320ToNormalHd; + } + else if (logicalResolution == RESOLUTION_LOGICAL_480 && physicalResolution == RESOLUTION_PHYSICAL_WQVGA) + { + pTransformer = new (std::nothrow) TransformerNormal480ToNormalWqvga; + } + else if (logicalResolution == RESOLUTION_LOGICAL_480 && physicalResolution == RESOLUTION_PHYSICAL_HVGA) + { + pTransformer = new (std::nothrow) TransformerNormal480ToNormalHvga; + } + else if (logicalResolution == RESOLUTION_LOGICAL_480 && physicalResolution == RESOLUTION_PHYSICAL_HD) + { + pTransformer = new (std::nothrow) TransformerNormal480ToNormalHd; + } + else if (logicalResolution == RESOLUTION_LOGICAL_720 && physicalResolution == RESOLUTION_PHYSICAL_WQVGA) + { + pTransformer = new (std::nothrow) TransformerNormal720ToNormalWqvga; + } + else if (logicalResolution == RESOLUTION_LOGICAL_720 && physicalResolution == RESOLUTION_PHYSICAL_WVGA) + { + pTransformer = new (std::nothrow) TransformerNormal720ToNormalWvga; + } + else if (logicalResolution == RESOLUTION_LOGICAL_720 && physicalResolution == RESOLUTION_PHYSICAL_HVGA) + { + pTransformer = new (std::nothrow) TransformerNormal720ToNormalHvga; + } + else + { + //r = E_INVALID_ARG; + pTransformer = new (std::nothrow) _TransformerGeneral(_GetIntegerResolution(logicalResolution), _GetIntegerResolution(physicalResolution)); + } + } + else + { + //r = E_INVALID_ARG; + pTransformer = new (std::nothrow) _TransformerGeneral(_GetIntegerResolution(logicalResolution) * _GetIntegerResolution(physicalBaseScreenSize), _GetIntegerResolution(physicalResolution) * _GetIntegerResolution(logicalBaseScreenSize)); + } + + } +#else + if (isInverse) + { + if (logicalBaseScreenSize == physicalBaseScreenSize) + { + pTransformer = new (std::nothrow) _TransformerGeneral(_GetIntegerResolution(physicalResolution), _GetIntegerResolution(logicalResolution)); + } + else + { + pTransformer = new (std::nothrow) _TransformerGeneral(_GetIntegerResolution(physicalResolution) * _GetIntegerResolution(logicalBaseScreenSize), _GetIntegerResolution(logicalResolution) * _GetIntegerResolution(physicalBaseScreenSize)); + } + } + else + { + if (logicalBaseScreenSize == physicalBaseScreenSize) + { + pTransformer = new (std::nothrow) _TransformerGeneral(_GetIntegerResolution(logicalResolution), _GetIntegerResolution(physicalResolution)); + } + else + { + pTransformer = new (std::nothrow) _TransformerGeneral(_GetIntegerResolution(logicalResolution) * _GetIntegerResolution(physicalBaseScreenSize), _GetIntegerResolution(physicalResolution) * _GetIntegerResolution(logicalBaseScreenSize)); + } + } +#endif + // Print the log message and return + if (pTransformer) + { + return E_SUCCESS; + } + else if (r == E_INVALID_ARG) + { + SysLog(NID_GRP, "[E_INVALID_ARG] The specified resolutions are invalid."); + + return E_INVALID_ARG; + } + else + { + SysLog(NID_GRP, "[E_OUT_OF_MEMORY] Fail to create a coordinate transformer."); + + return E_OUT_OF_MEMORY; + } +} + +result +_CreateCoordinateTransformer(_ICoordinateSystemTransformer*& pTransformer, _LogicalResolution sourceLogicalResolution, _BaseScreenSize sourceLogicalBaseScreenSize, _PhysicalResolution destPhysicalResolution, _BaseScreenSize destPhysicalBaseScreenSize) +{ + return _CoordinateTransformerCore(pTransformer, sourceLogicalResolution, sourceLogicalBaseScreenSize, destPhysicalResolution, destPhysicalBaseScreenSize, false); +} + +result +_CreateCoordinateTransformer(_ICoordinateSystemTransformer*& pTransformer, _PhysicalResolution sourcePhysicalResolution, _BaseScreenSize sourcePhysicalBaseScreenSize,_LogicalResolution destLogicalResolution, _BaseScreenSize destLogicalBaseScreenSize) +{ + return _CoordinateTransformerCore(pTransformer, destLogicalResolution, destLogicalBaseScreenSize, sourcePhysicalResolution, sourcePhysicalBaseScreenSize, true); +} + +result +_CreateCoordinateTransformer(_ICoordinateSystemTransformer*& pTransformer, _LogicalResolution sourceLogicalResolution, _BaseScreenSize sourceLogicalBaseScreenSize, _LogicalResolution destLogicalResolution, _BaseScreenSize destLogicalBaseScreenSize) +{ + _PhysicalResolution physicalResolution = RESOLUTION_PHYSICAL_DEFAULT; + + switch (destLogicalResolution) + { + case RESOLUTION_LOGICAL_240: + physicalResolution = RESOLUTION_PHYSICAL_WQVGA; + break; + case RESOLUTION_LOGICAL_320: + physicalResolution = RESOLUTION_PHYSICAL_HVGA; + break; + case RESOLUTION_LOGICAL_480: + physicalResolution = RESOLUTION_PHYSICAL_WVGA; + break; + case RESOLUTION_LOGICAL_720: + physicalResolution = RESOLUTION_PHYSICAL_HD; + break; + case RESOLUTION_LOGICAL_800: + physicalResolution = RESOLUTION_PHYSICAL_WXGA; + break; + case RESOLUTION_LOGICAL_1080: + physicalResolution = RESOLUTION_PHYSICAL_HD1080; + break; + case RESOLUTION_LOGICAL_1600: + physicalResolution = RESOLUTION_PHYSICAL_WQXGA; + break; + default: + physicalResolution = RESOLUTION_PHYSICAL_NONE; + break; + } + + return _CoordinateTransformerCore(pTransformer, sourceLogicalResolution, sourceLogicalBaseScreenSize, physicalResolution, destLogicalBaseScreenSize, false); +} + +#endif + +result +_CoordinateTransformerCore(_ICoordinateSystemTransformer*& pTransformer, int srcResolution, _BaseScreenSize srcBaseScreenSize, Dimension destResolution, _BaseScreenSize destBaseScreenSize) +{ + SysAssert(srcResolution > 0); + SysAssert(destResolution.width > 0); + SysAssert(srcBaseScreenSize != BASE_SCREEN_SIZE_DEFAULT); + SysAssert(destBaseScreenSize != BASE_SCREEN_SIZE_DEFAULT); + + result r = E_SUCCESS; + pTransformer = null; + + if (_WillNotTransform(srcResolution, srcBaseScreenSize, destResolution, destBaseScreenSize)) + { + pTransformer = new (std::nothrow) _NullCoordinateSystemTransformer(); + + if (pTransformer == null) + { + SysLog(NID_GRP, "[E_OUT_OF_MEMORY] Fail to create a coordinate transformer."); + + return E_OUT_OF_MEMORY; + } + + return E_SUCCESS; + } + + pTransformer = new (std::nothrow) _TransformerGeneral(srcResolution * _GetIntegerResolution(destBaseScreenSize), (destResolution.width < destResolution.height ? destResolution.width : destResolution.height) * _GetIntegerResolution(srcBaseScreenSize)); + + if (pTransformer) + { + return E_SUCCESS; + } + else if (r == E_INVALID_ARG) + { + SysLog(NID_GRP, "[E_INVALID_ARG] The specified resolutions are invalid."); + + return E_INVALID_ARG; + } + else + { + SysLog(NID_GRP, "[E_OUT_OF_MEMORY] Fail to create a coordinate transformer."); + + return E_OUT_OF_MEMORY; + } +} + + +result +_CreateCoordinateTransformer(_ICoordinateSystemTransformer*& pTransformer, int srcResolution, _BaseScreenSize srcBaseScreenSize, Dimension destResolution, _BaseScreenSize destBaseScreenSize) +{ + return _CoordinateTransformerCore(pTransformer, srcResolution, srcBaseScreenSize, destResolution, destBaseScreenSize); +} + +}} // Tizen::Graphics + diff --git a/src/graphics/FGrp_CoordinateSystemImpl.cpp b/src/graphics/FGrp_CoordinateSystemImpl.cpp new file mode 100644 index 0000000..6b67d20 --- /dev/null +++ b/src/graphics/FGrp_CoordinateSystemImpl.cpp @@ -0,0 +1,727 @@ +// +// 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_CoordinateSystemImpl.cpp + * @brief This is the implementation file for _CoordinateSystemImpl class. + * + */ + +#include + +#include +#include + +#include +#include +#include +#include + +#include "FGrp_Screen.h" +#include "FGrp_CoordinateSystemImpl.h" + + +using namespace Tizen::Base; + +//////////////////////////////////////////////////////////////////////////////// + +namespace Tizen { namespace Graphics +{ + +#ifdef USE_RESOLUTION_ENUM_VALUE + result _CreateCoordinateTransformer(_ICoordinateSystemTransformer*& pTransformer, _LogicalResolution sourceLogicalResolution, _BaseScreenSize sourceLogicalBaseScreenSize, _PhysicalResolution destPhysicalResolution, _BaseScreenSize destPhysicalBaseScreenSize); + result _CreateCoordinateTransformer(_ICoordinateSystemTransformer*& pTransformer, _PhysicalResolution sourcePhysicalResolution, _BaseScreenSize sourcePhysicalBaseScreenSize, _LogicalResolution destLogicalResolution, _BaseScreenSize destLogicalBaseScreenSize); + result _CreateCoordinateTransformer(_ICoordinateSystemTransformer*& pTransformer, _LogicalResolution sourceLogicalResolution, _BaseScreenSize sourceLogicalBaseScreenSize, _LogicalResolution destLogicalResolution, _BaseScreenSize destLogicalBaseScreenSize); + + bool _WillNotTransform(_LogicalResolution logicalResolution, _BaseScreenSize logicalBaseScreenSize, _PhysicalResolution physicalResolution, _BaseScreenSize physicalBaseScreenSize); + + const char* _GetStringResolution(_LogicalResolution res); + const char* _GetStringResolution(_PhysicalResolution res); +#endif + + result _CreateCoordinateTransformer(_ICoordinateSystemTransformer*& pTransformer, const Dimension& srcDim, const Dimension& trgDim); + result _CreateCoordinateTransformer(_ICoordinateSystemTransformer*& pTransformer, int srcResolution, _BaseScreenSize srcBaseScreenSize, Dimension destResolution, _BaseScreenSize destBaseScreenSize); + + bool _WillNotTransform(int srcResolution, _BaseScreenSize srcBaseScreenSize, Dimension destResolution, _BaseScreenSize destBaseScreenSize); + +}} // Tizen::Graphics + +//////////////////////////////////////////////////////////////////////////////// + +namespace Tizen { namespace Graphics +{ + +class _CoordinateSystem::_CoordinateSystemImpl::__CoordinateTransformer + : public _ICoordinateSystemTransformer +{ +public: + __CoordinateTransformer(_ICoordinateSystemTransformer* pXformer) + : __enabled(true) + , __pXformer(pXformer) + , __defaultTransformer() + , __usingDefault(false) + { + if (__pXformer == null) + { + __pXformer = &__defaultTransformer; + __usingDefault = true; + } + } + + virtual ~__CoordinateTransformer() + { + if (!__usingDefault) + { + delete __pXformer; + } + } + + void SetEnabled(bool enabled) + { + __enabled = enabled; + } + + bool IsEnabled(void) const + { + return __enabled; + } + + virtual Rectangle Transform(const Rectangle& rect) const + { + return IsEnabled() ? __pXformer->Transform(rect) : rect; + } + + virtual Dimension Transform(const Dimension& dim) const + { + return IsEnabled() ? __pXformer->Transform(dim) : dim; + } + + virtual Point Transform(const Point& point) const + { + return IsEnabled() ? __pXformer->Transform(point) : point; + } + + virtual FloatRectangle Transform(const FloatRectangle& rect) const + { + return IsEnabled() ? __pXformer->Transform(rect) : rect; + } + + virtual FloatDimension Transform(const FloatDimension& dim) const + { + return IsEnabled() ? __pXformer->Transform(dim) : dim; + } + + virtual FloatPoint Transform(const FloatPoint& point) const + { + return IsEnabled() ? __pXformer->Transform(point) : point; + } + + virtual int Transform(int scalar) const + { + return IsEnabled() ? __pXformer->Transform(scalar) : scalar; + } + + virtual int TransformHorizontal(int scalar) const + { + return IsEnabled() ? __pXformer->TransformHorizontal(scalar) : scalar; + } + + virtual int TransformVertical(int scalar) const + { + return IsEnabled() ? __pXformer->TransformVertical(scalar) : scalar; + } + + virtual float Transform(float scalar) const + { + return IsEnabled() ? __pXformer->Transform(scalar) : scalar; + } + + virtual float TransformHorizontal(float scalar) const + { + return IsEnabled() ? __pXformer->TransformHorizontal(scalar) : scalar; + } + + virtual float TransformVertical(float scalar) const + { + return IsEnabled() ? __pXformer->TransformVertical(scalar) : scalar; + } + + virtual int TransformFloatToInt(float scalar) const + { + return IsEnabled() ? static_cast(__pXformer->Transform(scalar)) : static_cast(scalar); + } + + virtual int TransformHorizontalFloatToInt(float scalar) const + { + return IsEnabled() ? static_cast(__pXformer->TransformHorizontal(scalar)) : static_cast(scalar); + } + + virtual int TransformVerticalFloatToInt(float scalar) const + { + return IsEnabled() ? static_cast(__pXformer->TransformVertical(scalar)) : static_cast(scalar); + } + + virtual float GetHorizontalScaleFactor(void) const + { + return IsEnabled() ? __pXformer->GetHorizontalScaleFactor() : 1.0f; + } + + virtual float GetVerticalScaleFactor(void) const + { + return IsEnabled() ? __pXformer->GetVerticalScaleFactor() : 1.0f; + } + +private: + __CoordinateTransformer(const __CoordinateTransformer&); + __CoordinateTransformer& operator =(const __CoordinateTransformer&); + +private: + bool __enabled; + _ICoordinateSystemTransformer* __pXformer; + _NullCoordinateSystemTransformer __defaultTransformer; + bool __usingDefault; +}; // _CoordinateSystem + + +#ifdef USE_RESOLUTION_ENUM_VALUE + +_LogicalResolution +_CoordinateSystem::_CoordinateSystemImpl::GetNativeLogicalResolution(void) const +{ + return __nativeLogicalResolution; +} + +_BaseScreenSize +_CoordinateSystem::_CoordinateSystemImpl::GetNativeLogicalBaseScreenSize(void) const +{ + return __nativeLogicalBaseScreenSize; +} + +_LogicalResolution +_CoordinateSystem::_CoordinateSystemImpl::GetLogicalResolution(void) const +{ + return __logicalResolution; +} + +_PhysicalResolution +_CoordinateSystem::_CoordinateSystemImpl::GetPhysicalResolution(void) const +{ + if (__physicalResolution == RESOLUTION_PHYSICAL_NONE) + { + static Tizen::Graphics::_PhysicalResolution cachedResolution = RESOLUTION_PHYSICAL_NONE; + + if (cachedResolution == RESOLUTION_PHYSICAL_NONE) + { + int screenWidth = _Screen::GetWidth(); + int screenHeight = _Screen::GetHeight(); + + if ((screenWidth == 480 && screenHeight == 800) || (screenWidth == 800 && screenHeight == 480)) + { + cachedResolution = RESOLUTION_PHYSICAL_WVGA; + } + else if ((screenWidth == 240 && screenHeight == 400) || (screenWidth == 400 && screenHeight == 240)) + { + cachedResolution = RESOLUTION_PHYSICAL_WQVGA; + } + else if ((screenWidth == 320 && screenHeight == 480) || (screenWidth == 480 && screenHeight == 320)) + { + cachedResolution = RESOLUTION_PHYSICAL_HVGA; + } + else if ((screenWidth == 720 && screenHeight == 1280) || (screenWidth == 1280 && screenHeight == 720)) + { + cachedResolution = RESOLUTION_PHYSICAL_HD; + } + else if ((screenWidth == 1280 && screenHeight == 800) || (screenWidth == 800 && screenHeight == 1280)) + { + cachedResolution = RESOLUTION_PHYSICAL_WXGA; + } + else if ((screenWidth == 1080 && screenHeight == 1920) || (screenWidth == 1920 && screenHeight == 1080)) + { + cachedResolution = RESOLUTION_PHYSICAL_HD1080; + } + else if ((screenWidth == 1600 && screenHeight == 2560) || (screenWidth == 2560 && screenHeight == 1600)) + { + cachedResolution = RESOLUTION_PHYSICAL_WQXGA; + } + else + { + cachedResolution = RESOLUTION_PHYSICAL_NONE; + } + } + + return cachedResolution; + } + + return __physicalResolution; +} + +_ICoordinateSystemTransformer* +_CoordinateSystem::_CoordinateSystemImpl::GetTransformerN(_LogicalResolution logicalResolution, _BaseScreenSize logicalBaseScreenSize, _PhysicalResolution physicalResolution, _BaseScreenSize physicalBaseScreenSize) +{ + ClearLastResult(); + + _ICoordinateSystemTransformer* pXFormer = null; + + result r = _CreateCoordinateTransformer(pXFormer, logicalResolution, logicalBaseScreenSize, physicalResolution, physicalBaseScreenSize); + + if (IsFailed(r)) + { + SysLog(NID_GRP, "[%s] Propagating.", GetErrorMessage(r)); + + SetLastResult(r); + } + + return pXFormer; +} + +result +_CoordinateSystem::_CoordinateSystemImpl::Initialize(_LogicalResolution logicalResolution, _BaseScreenSize logicalBaseScreenSize) +{ + SysAssert(__pTransformer == null && __pInverseTransformer == null); + + result r = E_SUCCESS; + + __physicalBaseScreenSize = GetPhysicalBaseScreenSize(); + + SysAssert(__physicalBaseScreenSize != BASE_SCREEN_SIZE_DEFAULT); + + __physicalResolution = GetPhysicalResolution(); + + SysAssert(__physicalResolution != RESOLUTION_PHYSICAL_DEFAULT); + + if (logicalResolution == RESOLUTION_LOGICAL_DEFAULT) + { + switch (__physicalResolution) + { + case RESOLUTION_PHYSICAL_WVGA: + logicalResolution = RESOLUTION_LOGICAL_480; + break; + case RESOLUTION_PHYSICAL_WQVGA: + logicalResolution = RESOLUTION_LOGICAL_240; + break; + case RESOLUTION_PHYSICAL_HVGA: + logicalResolution = RESOLUTION_LOGICAL_320; + break; + case RESOLUTION_PHYSICAL_HD: + logicalResolution = RESOLUTION_LOGICAL_720; + break; + case RESOLUTION_PHYSICAL_WXGA: + logicalResolution = RESOLUTION_LOGICAL_800; + break; + case RESOLUTION_PHYSICAL_HD1080: + logicalResolution = RESOLUTION_LOGICAL_1080; + break; + case RESOLUTION_PHYSICAL_WQXGA: + logicalResolution = RESOLUTION_LOGICAL_1600; + break; + default: + ; + break; + } + } + + __logicalResolution = logicalResolution; + + if (logicalBaseScreenSize == BASE_SCREEN_SIZE_DEFAULT) + { + logicalBaseScreenSize = BASE_SCREEN_SIZE_NORMAL; + } + + __logicalBaseScreenSize = logicalBaseScreenSize; + + _ICoordinateSystemTransformer* pXformer = null; + _ICoordinateSystemTransformer* pInvXFormer = null; + + r = _CreateCoordinateTransformer(pXformer, __logicalResolution, __logicalBaseScreenSize, __physicalResolution, __physicalBaseScreenSize); + + if (IsFailed(r)) + { + SysLog(NID_GRP, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + } + + __pTransformer = new (std::nothrow) __CoordinateTransformer(pXformer); + + if (__pTransformer == null) + { + delete pXformer; + r = E_OUT_OF_MEMORY; + SysLog(NID_GRP, "[%s] Failed to create a coordinate transformer.", GetErrorMessage(r)); + + goto CATCH; + } + + r = _CreateCoordinateTransformer(pInvXFormer, __physicalResolution, __physicalBaseScreenSize, __logicalResolution, __logicalBaseScreenSize); + + if (IsFailed(r)) + { + SysLog(NID_GRP, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + } + + __pInverseTransformer = new (std::nothrow) __CoordinateTransformer(pInvXFormer); + + if (__pInverseTransformer == null) + { + delete pInvXFormer; + r = E_OUT_OF_MEMORY; + SysLog(NID_GRP, "[%s] Failed to create an inverse coordinate transformer.", GetErrorMessage(r)); + + goto CATCH; + } + + SysAssert(__pTransformer && __pInverseTransformer); + SetTransformEnabled(!_WillNotTransform(__logicalResolution, __logicalBaseScreenSize, __physicalResolution, __physicalBaseScreenSize)); + +//temporary code + __nativeLogicalResolution = logicalResolution; + __nativeLogicalBaseScreenSize = logicalBaseScreenSize; + + if (__nativeLogicalBaseScreenSize != __physicalBaseScreenSize) + { + __nativeLogicalBaseScreenSize = __physicalBaseScreenSize; + + if (__nativeLogicalBaseScreenSize == BASE_SCREEN_SIZE_NORMAL) + { + switch (__nativeLogicalResolution) + { + case RESOLUTION_LOGICAL_1600: + __nativeLogicalResolution = RESOLUTION_LOGICAL_800; + break; + case RESOLUTION_LOGICAL_1440: + __nativeLogicalResolution = RESOLUTION_LOGICAL_720; + break; + case RESOLUTION_LOGICAL_960: + __nativeLogicalResolution = RESOLUTION_LOGICAL_480; + break; + case RESOLUTION_LOGICAL_720: + __nativeLogicalResolution = RESOLUTION_LOGICAL_360; + break; + case RESOLUTION_LOGICAL_480: + __nativeLogicalResolution = RESOLUTION_LOGICAL_240; + break; + default: + ; + break; + } + } + else if (__nativeLogicalBaseScreenSize == BASE_SCREEN_SIZE_LARGE) + { + switch (__nativeLogicalResolution) + { + case RESOLUTION_LOGICAL_800: + __nativeLogicalResolution = RESOLUTION_LOGICAL_1600; + break; + case RESOLUTION_LOGICAL_720: + __nativeLogicalResolution = RESOLUTION_LOGICAL_1440; + break; + case RESOLUTION_LOGICAL_480: + __nativeLogicalResolution = RESOLUTION_LOGICAL_960; + break; + case RESOLUTION_LOGICAL_360: + __nativeLogicalResolution = RESOLUTION_LOGICAL_720; + break; + case RESOLUTION_LOGICAL_240: + __nativeLogicalResolution = RESOLUTION_LOGICAL_480; + break; + default: + ; + break; + } + } + } + + return r; + +CATCH: + delete __pTransformer; + __pTransformer = null; + delete __pInverseTransformer; + __pInverseTransformer = null; + + return r; +} + +#endif + +_BaseScreenSize +_CoordinateSystem::_CoordinateSystemImpl::GetLogicalBaseScreenSize(void) const +{ + return __logicalBaseScreenSize; +} + +int +_CoordinateSystem::_CoordinateSystemImpl::GetLogicalResolutionInt(void) const +{ + return __logicalResolutionInt; +} + +Dimension +_CoordinateSystem::_CoordinateSystemImpl::GetPhysicalResolutionDim(void) const +{ + return __physicalResolutionDim; +} + +_BaseScreenSize +_CoordinateSystem::_CoordinateSystemImpl::GetPhysicalBaseScreenSize(void) const +{ + if (__physicalBaseScreenSize == BASE_SCREEN_SIZE_NONE || __physicalBaseScreenSize == BASE_SCREEN_SIZE_DEFAULT) + { + static Tizen::Graphics::_BaseScreenSize physicalBaseScreenSize = BASE_SCREEN_SIZE_NONE; + + bool isLargeDeviceScreenSize = false; + + Tizen::System::_SystemInfoImpl::GetSysInfo(L"http://tizen.org/feature/screen.size.large", isLargeDeviceScreenSize); + + if (isLargeDeviceScreenSize) + { + physicalBaseScreenSize = BASE_SCREEN_SIZE_LARGE; + } + else + { + physicalBaseScreenSize = BASE_SCREEN_SIZE_NORMAL; + } + + return physicalBaseScreenSize; + } + + return __physicalBaseScreenSize; +} + +void +_CoordinateSystem::_CoordinateSystemImpl::SetTransformEnabled(bool enabled) +{ + __pTransformer->SetEnabled(enabled); + __pInverseTransformer->SetEnabled(enabled); +} + +bool +_CoordinateSystem::_CoordinateSystemImpl::IsTransformEnabled(void) const +{ + return __pTransformer->IsEnabled(); +} + + +_ICoordinateSystemTransformer* +_CoordinateSystem::_CoordinateSystemImpl::GetTransformer(void) +{ + return __pTransformer; +} + +_ICoordinateSystemTransformer* +_CoordinateSystem::_CoordinateSystemImpl::GetInverseTransformer(void) +{ + return __pInverseTransformer; +} + +_ICoordinateSystemTransformer* +_CoordinateSystem::_CoordinateSystemImpl::GetTransformerN(const Dimension& srcDim, const Dimension& trgDim) +{ + ClearLastResult(); + + _ICoordinateSystemTransformer* pXFormer = null; + + result r = _CreateCoordinateTransformer(pXFormer, srcDim, trgDim); + + if (IsFailed(r)) + { + SysLog(NID_GRP, "[%s] Propagating.", GetErrorMessage(r)); + + SetLastResult(r); + } + + return pXFormer; +} + +_ICoordinateSystemTransformer* +_CoordinateSystem::_CoordinateSystemImpl::GetTransformerN(int srcResolution, _BaseScreenSize srcBaseScreenSize, Dimension destResolution, _BaseScreenSize destBaseScreenSize) +{ + ClearLastResult(); + + _ICoordinateSystemTransformer* pXFormer = null; + + result r = _CreateCoordinateTransformer(pXFormer, srcResolution, srcBaseScreenSize, destResolution, destBaseScreenSize); + + if (IsFailed(r)) + { + SysLog(NID_GRP, "[%s] Propagating.", GetErrorMessage(r)); + + SetLastResult(r); + } + + return pXFormer; +} + +result +_CoordinateSystem::_CoordinateSystemImpl::Initialize(int srcResolution, _BaseScreenSize srcBaseScreenSize, Dimension destResolution, _BaseScreenSize destBaseScreenSize) +{ + SysAssert(__pTransformer == null && __pInverseTransformer == null); + + result r = E_SUCCESS; + + if (srcBaseScreenSize == BASE_SCREEN_SIZE_DEFAULT) + { + srcBaseScreenSize = GetPhysicalBaseScreenSize(); + } + + __logicalBaseScreenSize = srcBaseScreenSize; + + __physicalResolutionDim = destResolution; + + if (srcResolution != 0) + { + __logicalResolutionInt = srcResolution; + } + else + { + __logicalResolutionInt = __physicalResolutionDim.width < __physicalResolutionDim.height ? __physicalResolutionDim.width : __physicalResolutionDim.height; + } + + SysAssert(__logicalResolutionInt > 0); + + if (destBaseScreenSize == BASE_SCREEN_SIZE_DEFAULT) + { + destBaseScreenSize = GetPhysicalBaseScreenSize(); + } + + __physicalBaseScreenSize = destBaseScreenSize; + +#if 0 + if (srcResolution == 480 || srcResolution == 720) + { + _LogicalResolution logicalResolution = RESOLUTION_LOGICAL_NONE; + + if (srcResolution == 480) + { + logicalResolution = RESOLUTION_LOGICAL_480; + } + else + { + logicalResolution = RESOLUTION_LOGICAL_720; + } + + Dimension wvgaDim1 = Dimension(480, 800); + Dimension wvgaDim2 = Dimension(800, 480); + Dimension hdDim1 = Dimension(720, 1280); + Dimension hdDim2 = Dimension(1280, 720); + + _PhysicalResolution physicalResolution = RESOLUTION_PHYSICAL_NONE; + + if (destResolution == wvgaDim1 || destResolution == wvgaDim2 || destResolution == hdDim1 || destResolution == hdDim2) + { + if (destResolution == wvgaDim1 || destResolution == wvgaDim2) + { + physicalResolution = RESOLUTION_PHYSICAL_WVGA; + } + else + { + physicalResolution = RESOLUTION_PHYSICAL_HD; + } + } + + if (physicalResolution == GetPhysicalResolution() && physicalResolution != RESOLUTION_PHYSICAL_NONE) + { + result r = Initialize(logicalResolution, srcBaseScreenSize); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + } + } +#endif + _ICoordinateSystemTransformer* pXformer = null; + _ICoordinateSystemTransformer* pInvXFormer = null; + + r = _CreateCoordinateTransformer(pXformer, __logicalResolutionInt, __logicalBaseScreenSize, __physicalResolutionDim, __physicalBaseScreenSize); + + if (IsFailed(r)) + { + SysLog(NID_GRP, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + } + + __pTransformer = new (std::nothrow) __CoordinateTransformer(pXformer); + + if (__pTransformer == null) + { + delete pXformer; + r = E_OUT_OF_MEMORY; + SysLog(NID_GRP, "[%s] Failed to create a coordinate transformer.", GetErrorMessage(r)); + + goto CATCH; + } + + r = _CreateCoordinateTransformer(pInvXFormer, (__physicalResolutionDim.width < __physicalResolutionDim.height ? __physicalResolutionDim.width : __physicalResolutionDim.height), __physicalBaseScreenSize, Dimension(__logicalResolutionInt, __logicalResolutionInt), __logicalBaseScreenSize); + + if (IsFailed(r)) + { + SysLog(NID_GRP, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + } + + __pInverseTransformer = new (std::nothrow) __CoordinateTransformer(pInvXFormer); + + if (__pInverseTransformer == null) + { + delete pInvXFormer; + r = E_OUT_OF_MEMORY; + SysLog(NID_GRP, "[%s] Failed to create an inverse coordinate transformer.", GetErrorMessage(r)); + + goto CATCH; + } + + SysAssert(__pTransformer && __pInverseTransformer); + SetTransformEnabled(!_WillNotTransform(srcResolution, srcBaseScreenSize, destResolution, destBaseScreenSize)); + + return r; + +CATCH: + delete __pTransformer; + __pTransformer = null; + delete __pInverseTransformer; + __pInverseTransformer = null; + + return r; +} + +_CoordinateSystem::_CoordinateSystemImpl::_CoordinateSystemImpl(void) + : __pTransformer(null) + , __pInverseTransformer(null) +#ifdef USE_RESOLUTION_ENUM_VALUE + , __nativeLogicalResolution(RESOLUTION_LOGICAL_NONE) + , __nativeLogicalBaseScreenSize(BASE_SCREEN_SIZE_NONE) + , __logicalResolution(RESOLUTION_LOGICAL_NONE) + , __physicalResolution(RESOLUTION_PHYSICAL_NONE) +#endif + , __logicalResolutionInt(0) + , __physicalResolutionDim(0, 0) + , __logicalBaseScreenSize(BASE_SCREEN_SIZE_NONE) + , __physicalBaseScreenSize(BASE_SCREEN_SIZE_NONE) +{ +} + +_CoordinateSystem::_CoordinateSystemImpl::~_CoordinateSystemImpl(void) +{ + delete __pTransformer; + delete __pInverseTransformer; +} + +}} // Tizen::Graphics diff --git a/src/graphics/FGrp_CoordinateSystemImpl.h b/src/graphics/FGrp_CoordinateSystemImpl.h new file mode 100644 index 0000000..0f5a8cb --- /dev/null +++ b/src/graphics/FGrp_CoordinateSystemImpl.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 FGrp_CoordinateSystemImpl.h + * @brief This is the header file for _CoordinateSystemImpl class. + * + */ + +#ifndef _FGRP_INTERNAL_COORDINATE_SYSTEMIMPL_H_ +#define _FGRP_INTERNAL_COORDINATE_SYSTEMIMPL_H_ + +#include "FGrp_CoordinateSystem.h" +#include "FGrp_CoordinateSystemImpl.h" + + +namespace Tizen { namespace Graphics +{ + +class _CoordinateSystem::_CoordinateSystemImpl +{ +public: + _CoordinateSystemImpl(void); + ~_CoordinateSystemImpl(void); + +#ifdef USE_RESOLUTION_ENUM_VALUE + _LogicalResolution GetNativeLogicalResolution(void) const; + _BaseScreenSize GetNativeLogicalBaseScreenSize(void) const; + + _LogicalResolution GetLogicalResolution(void) const; + _PhysicalResolution GetPhysicalResolution(void) const; + + result Initialize(_LogicalResolution logicalResolution, _BaseScreenSize logicalBaseScreenSize); + + static _ICoordinateSystemTransformer* GetTransformerN(_LogicalResolution logicalResolution, _BaseScreenSize logicalBaseScreenSize, _PhysicalResolution physicalResolution, _BaseScreenSize physicalBaseScreenSize); +#endif + + int GetLogicalResolutionInt(void) const; + Dimension GetPhysicalResolutionDim(void) const; + + _BaseScreenSize GetLogicalBaseScreenSize(void) const; + _BaseScreenSize GetPhysicalBaseScreenSize(void) const; + + result Initialize(int srcResolution, _BaseScreenSize srcBaseScreenSize, Dimension destResolution, _BaseScreenSize destBaseScreenSize); + + _ICoordinateSystemTransformer* GetTransformer(void); + _ICoordinateSystemTransformer* GetInverseTransformer(void); + + static _ICoordinateSystemTransformer* GetTransformerN(const Dimension& srcDim, const Dimension& trgDim); + static _ICoordinateSystemTransformer* GetTransformerN(int srcResolution, _BaseScreenSize srcBaseScreenSize, Dimension destResolution, _BaseScreenSize destBaseScreenSize); + + void SetTransformEnabled(bool enabled); + bool IsTransformEnabled(void) const; + +private: + _CoordinateSystemImpl(const _CoordinateSystemImpl&); + _CoordinateSystemImpl& operator =(const _CoordinateSystemImpl&); + +private: + class __CoordinateTransformer; + + __CoordinateTransformer* __pTransformer; + __CoordinateTransformer* __pInverseTransformer; + +#ifdef USE_RESOLUTION_ENUM_VALUE + _LogicalResolution __nativeLogicalResolution; + _BaseScreenSize __nativeLogicalBaseScreenSize; + _LogicalResolution __logicalResolution; + _PhysicalResolution __physicalResolution; +#endif + + int __logicalResolutionInt; + Dimension __physicalResolutionDim; + + _BaseScreenSize __logicalBaseScreenSize; + _BaseScreenSize __physicalBaseScreenSize; + +}; // _CoordinateSystemImpl + +}} // Tizen::Graphics + +#endif // _FGRP_INTERNAL_COORDINATE_SYSTEMIMPL_H_ diff --git a/src/graphics/FGrp_CoordinateSystemUtils.cpp b/src/graphics/FGrp_CoordinateSystemUtils.cpp new file mode 100644 index 0000000..6307994 --- /dev/null +++ b/src/graphics/FGrp_CoordinateSystemUtils.cpp @@ -0,0 +1,26 @@ +// +// 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_CoordinateSystemUtils.cpp + * @brief This is the implementation file the _CoordinateSystemUtils class. + * + */ + +#include "FGrp_CoordinateSystemUtils.h" + +const float Tizen::Graphics::_CoordinateSystemUtils::__floatIntegralEpsilon = 0.01f; diff --git a/src/graphics/FGrp_EnrichedTextImpl.cpp b/src/graphics/FGrp_EnrichedTextImpl.cpp new file mode 100644 index 0000000..571c762 --- /dev/null +++ b/src/graphics/FGrp_EnrichedTextImpl.cpp @@ -0,0 +1,1710 @@ +// +// 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_EnrichedTextImpl.cpp + * @brief This is the cpp file for _EnrichedTextImpl class. + * + */ + +// Inlcudes +#include +#include "FGrp_EnrichedTextImpl.h" +#include "FGrp_TextElementImpl.h" +#include "FGrp_TextTextElement.h" +#include "FGrp_TextTextObject.h" +#include "util/FGrp_Util.h" +#include "FGrp_CoordinateSystemUtils.h" + +// Usings +using namespace Tizen::Base; +using namespace Tizen::Base::Utility; +using namespace Tizen::Graphics::_Text; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Graphics +{ + +_EnrichedTextImpl::_EnrichedTextImpl(void) +{ + __width = 0; + __height = 0; + __lineSpace = 0; + __count = 0; + __verticalAlignment = TEXT_ALIGNMENT_VERTICAL_MIN; + __horizontalAlignment = TEXT_ALIGNMENT_HORIZONTAL_MIN; + __elementVerticalAlignment = TEXT_ALIGNMENT_VERTICAL_MIN; + __pTextObject = null; + __pLinkedListTextElementList = null; + __pTextElement = null; + __isCopiedEnrichedText = false; + __pTextElement = null; +} + +_EnrichedTextImpl::~_EnrichedTextImpl(void) +{ + if (GetTextElementCount() > 0) + { + RemoveAllTextElements(false); + } + + if (__pTextElement) + { + delete __pTextElement; + __pTextElement = null; + } + + if (__pLinkedListTextElementList) + { + delete __pLinkedListTextElementList; + __pLinkedListTextElementList = null; + } + + if (__pTextObject) + { + delete __pTextObject; + __pTextObject = null; + } +} + +result +_EnrichedTextImpl::Construct(const Tizen::Graphics::Dimension& dim) +{ + FloatDimension dimF = _CoordinateSystemUtils::ConvertToFloat(dim); + + return Construct(dimF); +} + +result +_EnrichedTextImpl::Construct(const Tizen::Graphics::FloatDimension& dim) +{ + SysTryReturn(NID_GRP, (dim.width > 0.0f) && (dim.height > 0.0f), E_INVALID_ARG, E_INVALID_ARG + , "[E_INVALID_ARG] The argument is invalid. (width = %d height = %d)", dim.width, dim.height); + + result r = E_SUCCESS; + + __width = dim.width; + __height = dim.height; + __lineSpace = 0.0f; + + __pLinkedListTextElementList = new (std::nothrow) Tizen::Base::Collection::LinkedList; + SysTryCatch(NID_GRP, __pLinkedListTextElementList, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY + , "[%s] Fails to create a element list.", GetErrorMessage(r)); + + __pTextElement = new (std::nothrow) TextElement(); + SysTryCatch(NID_GRP, __pTextElement, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY + , "[%s] Fails to create a element.", GetErrorMessage(r)); + + __pTextObject = new (std::nothrow)TextObject; + SysTryCatch(NID_GRP, __pTextObject, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY + , "[%s] Fails to create a TextObject.", GetErrorMessage(r)); + + __pTextObject->Construct(); + __pTextObject->SetBounds(FloatRectangle(0.0f, 0.0f, __width, __height)); + __pTextObject->SetCutLinkViewMode(true); + __pTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT); + __pTextObject->HideFrontSpace(TEXT_OBJECT_SPACE_HIDE_TYPE_ONE); + + // this is only to manage user's bitmap + r = __elements.Construct(); + + return r; + +CATCH: + if (__pLinkedListTextElementList) + { + delete __pLinkedListTextElementList; + __pLinkedListTextElementList = null; + } + + if (__pTextElement) + { + delete __pTextElement; + __pTextElement = null; + } + + return r; +} + +result +_EnrichedTextImpl::InsertAt(int elementIndex, Tizen::Graphics::TextElement& element) +{ + SysTryReturn(NID_GRP, __pTextObject != null, E_OPERATION_FAILED, E_OPERATION_FAILED + , "[E_OPERATION_FAILED] This instance is not constructed yet."); + SysTryReturn(NID_GRP, elementIndex >= 0 && elementIndex <= GetTextElementCount() + , E_INVALID_ARG, E_INVALID_ARG + , "[E_INVALID_ARG] The argument is invalid."); + + result r = E_SUCCESS; + int textLength = 0; + int count = 0; + _TextElementImpl* pTextElementImpl = _TextElementImpl::GetInstance(element); + if (pTextElementImpl == null) + { + return E_INVALID_ARG; + } + + if (pTextElementImpl->GetRegisteringEnrichedText() != null) + { + return E_INVALID_ARG; + } + pTextElementImpl->SetRegisteringEnrichedText(this); + + count = __pTextObject->GetElementCount(); + if (elementIndex > count) + { + return E_INVALID_ARG; + } + + for (int i = 0; i < elementIndex; i++) + { + _Text::TextElement* pTextComponent = __pTextObject->GetElementAtElementIndex(i); + if (pTextComponent != null) + { + textLength = textLength + pTextComponent->GetTextLength(); + } + } + + __pTextObject->InsertElementAt(textLength, *(pTextElementImpl->GetComponent())); + __pTextObject->Compose(); + + r = __pLinkedListTextElementList->InsertAt(element, elementIndex); + + if (__isCopiedEnrichedText == false) + { + if (__pTextElement) + { + __elements.InsertAt(*__pTextElement, elementIndex); + } + } + + return r; +} + +result +_EnrichedTextImpl::RemoveAt(int elementIndex, bool deallocate) +{ + SysTryReturn(NID_GRP, __pTextObject != null, E_OPERATION_FAILED, E_OPERATION_FAILED + , "[E_OPERATION_FAILED] This instance is not constructed yet."); + SysTryReturn(NID_GRP, elementIndex >= 0 && elementIndex <= GetTextElementCount() + , E_INVALID_ARG, E_INVALID_ARG + , "[E_INVALID_ARG] The argument is invalid."); + + result r = E_SUCCESS; + int count = GetTextElementCount(); + TextElement* pTextElement = null; + + if (count == 0) + { + return E_SUCCESS; + } + + pTextElement = dynamic_cast < TextElement* >(__pLinkedListTextElementList->GetAt(elementIndex)); + if (pTextElement == null) //Bitmap?? + { + __pTextObject->RemoveElementAt(elementIndex, true); + __pLinkedListTextElementList->RemoveAt(elementIndex, true); + + if (__isCopiedEnrichedText == false) + { + __elements.RemoveAt(elementIndex, deallocate); + } + } + else + { + _TextElementImpl* pTextElementImpl = _TextElementImpl::GetInstance(*pTextElement); + pTextElementImpl->SetRegisteringEnrichedText(null); + _Text::TextElement* pTextComponent = pTextElementImpl->GetComponent(); + + __pTextObject->RemoveElement(*pTextComponent, false); + __pLinkedListTextElementList->RemoveAt(elementIndex, deallocate); + + if (__isCopiedEnrichedText == false) + { + __elements.RemoveAt(elementIndex, false); + } + } + + return r; +} + +result +_EnrichedTextImpl::Remove(Tizen::Graphics::TextElement& element, bool deallocate) +{ + SysTryReturn(NID_GRP, __pTextObject != null, E_OPERATION_FAILED, E_OPERATION_FAILED + , "[E_OPERATION_FAILED] This instance is not constructed yet."); + + int textElementIndex = 0; + result r = E_SUCCESS; + TextElement* pTextElement = null; + + r = __pLinkedListTextElementList->IndexOf(element, textElementIndex); + if (r != E_SUCCESS) + { + return E_INVALID_ARG; + } + + pTextElement = dynamic_cast < TextElement* >(__pLinkedListTextElementList->GetAt(textElementIndex)); + if (pTextElement) + { + _TextElementImpl* pTextElementImpl = _TextElementImpl::GetInstance(*pTextElement); + pTextElementImpl->SetRegisteringEnrichedText(null); + _Text::TextElement* pTextComponent = pTextElementImpl->GetComponent(); + + if (__pTextObject->RemoveElement(*pTextComponent, false) != E_SUCCESS) + { + return E_INVALID_ARG; + } + + __pLinkedListTextElementList->RemoveAt(textElementIndex, deallocate); + } + + return r; +} + +result +_EnrichedTextImpl::Add(Tizen::Graphics::TextElement& element) +{ + SysTryReturn(NID_GRP, __pTextObject != null, E_OPERATION_FAILED, E_OPERATION_FAILED + , "[E_OPERATION_FAILED] This instance is not constructed yet."); + + result r = E_SUCCESS; + + _TextElementImpl* pTextElementImpl = _TextElementImpl::GetInstance(element); + SysTryReturn(NID_GRP + , pTextElementImpl + , E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + _Text::TextElement* pTextComponent = pTextElementImpl->GetComponent(); + SysTryReturn(NID_GRP + , pTextComponent + , E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + if (pTextElementImpl->GetRegisteringEnrichedText() != null) + { + return E_INVALID_ARG; + } + pTextElementImpl->SetRegisteringEnrichedText(this); + + __pTextObject->AppendElement(*pTextComponent); + __pTextObject->SetRange(0, __pTextObject->GetTextLength()); + __pTextObject->Compose(); + + __pLinkedListTextElementList->Add(element); + + if (__isCopiedEnrichedText == false) + { + if (__pTextElement) + { + __elements.Add(*__pTextElement); + } + } + + return r; +} + +result +_EnrichedTextImpl::RemoveAllTextElements(bool deallocate) +{ + SysTryReturn(NID_GRP, __pTextObject != null, E_OPERATION_FAILED, E_OPERATION_FAILED + , "[E_OPERATION_FAILED] This instance is not constructed yet."); + + result r = E_SUCCESS; + int elementCount = __pLinkedListTextElementList->GetCount(); + + for (int i = 0; i < elementCount; i++) + { + r = RemoveAt(0, deallocate); + r |= r; + } + + if (r != E_SUCCESS) + { + return E_SYSTEM; + } + + return r; +} + +result +_EnrichedTextImpl::RemoveAll(bool deallocate) +{ + SysTryReturn(NID_GRP, __pTextObject != null, E_OPERATION_FAILED, E_OPERATION_FAILED + , "[E_OPERATION_FAILED] This instance is not constructed yet."); + + result r = E_SUCCESS; + + int elementCount = __pLinkedListTextElementList->GetCount(); + + for (int i = 0; i < elementCount; i++) + { + r = RemoveAt(0, deallocate); + r |= r; + } + + if (r != E_SUCCESS) + { + return E_SYSTEM; + } + + return E_SUCCESS; +} + +TextElement* +_EnrichedTextImpl::GetTextElementAt(int elementIndex) const +{ + SysTryReturn(NID_GRP, __pTextObject != null, null, E_OPERATION_FAILED + , "[E_OPERATION_FAILED] This instance is not constructed yet."); + SysTryReturn(NID_GRP, elementIndex >= 0 && elementIndex < GetTextElementCount(), null, E_INVALID_ARG + , "[E_INVALID_ARG] The argument is invalid. elementIndex = %d total element count = %d", elementIndex, GetTextElementCount()); + + TextElement* pElement = null; + + ClearLastResult(); + + pElement = dynamic_cast < TextElement* >(__pLinkedListTextElementList->GetAt(elementIndex)); + + SetLastResult(E_SUCCESS); + return pElement; +} + +int +_EnrichedTextImpl::GetTextElementCount(void) const +{ + SysTryReturn(NID_GRP, __pTextObject != null, 0, E_OPERATION_FAILED + , "[E_OPERATION_FAILED] This instance is not constructed yet."); + + return __pLinkedListTextElementList->GetCount(); +} + +result +_EnrichedTextImpl::SetSize(const Tizen::Graphics::Dimension& size) +{ + FloatDimension sizeF = _CoordinateSystemUtils::ConvertToFloat(size); + + return SetSize(sizeF); +} + +result +_EnrichedTextImpl::SetSize(const Tizen::Graphics::FloatDimension& size) +{ + SysTryReturn(NID_GRP, __pTextObject != null, E_OPERATION_FAILED, E_OPERATION_FAILED + , "[E_OPERATION_FAILED] This instance is not constructed yet."); + SysTryReturn(NID_GRP, (size.width > 0.0f) && (size.height > 0.0f), E_OUT_OF_RANGE, E_OUT_OF_RANGE + , "[E_OUT_OF_RANGE] The given rectangle(width:%d,height:%d) is out of range.\n", size.width, size.height); + + FloatRectangle rect(0.0f, 0.0f, size.width, size.height); + + __pTextObject->SetBounds(rect); + __width = rect.width; + __height = rect.height; + + return E_SUCCESS; +} + +result +_EnrichedTextImpl::SetSize(int width, int height) +{ + return SetSize(_CoordinateSystemUtils::ConvertToFloat(width),_CoordinateSystemUtils::ConvertToFloat(height)); +} + +result +_EnrichedTextImpl::SetSize(float width, float height) +{ + SysTryReturn(NID_GRP, __pTextObject != null, E_OPERATION_FAILED, E_OPERATION_FAILED + , "[E_OPERATION_FAILED] This instance is not constructed yet."); + SysTryReturn(NID_GRP, (width > 0.0f) && (height > 0.0f), E_OUT_OF_RANGE, E_OUT_OF_RANGE + , "[E_OUT_OF_RANGE] The given rectangle(width:%d,height:%d) is out of range.\n", width, height); + + FloatDimension dim(width, height); + + result r = SetSize(dim); + + return r; +} + +Tizen::Graphics::Dimension +_EnrichedTextImpl::GetSize(void) const +{ + SysTryReturn(NID_GRP, __pTextObject != null, Dimension(0, 0), E_OPERATION_FAILED + , "[E_OPERATION_FAILED] This instance is not constructed yet."); + + Dimension dim; + + dim.width = _CoordinateSystemUtils::ConvertToInteger(__width); + dim.height = _CoordinateSystemUtils::ConvertToInteger(__height); + + return dim; +} + +Tizen::Graphics::FloatDimension +_EnrichedTextImpl::GetSizeF(void) const +{ + SysTryReturn(NID_GRP, __pTextObject != null, FloatDimension(0.0f, 0.0f), E_OPERATION_FAILED + , "[E_OPERATION_FAILED] This instance is not constructed yet."); + + FloatDimension dim; + + dim.width = __width; + dim.height = __height; + + return dim; +} + +void +_EnrichedTextImpl::GetSize(int& width, int& height) const +{ + SysTryReturn(NID_GRP, __pTextObject != null, , E_OPERATION_FAILED + , "[E_OPERATION_FAILED] This instance is not constructed yet."); + + width = _CoordinateSystemUtils::ConvertToInteger(__width); + height = _CoordinateSystemUtils::ConvertToInteger(__height); +} + +void +_EnrichedTextImpl::GetSize(float& width, float& height) const +{ + SysTryReturn(NID_GRP, __pTextObject != null, , E_OPERATION_FAILED + , "[E_OPERATION_FAILED] This instance is not constructed yet."); + + width = __width; + height = __height; +} + +int +_EnrichedTextImpl::GetWidth(void) const +{ + SysTryReturn(NID_GRP, __pTextObject != null, 0, E_OPERATION_FAILED + , "[E_OPERATION_FAILED] This instance is not constructed yet."); + + return _CoordinateSystemUtils::ConvertToInteger(__width); +} + +float +_EnrichedTextImpl::GetWidthF(void) const +{ + SysTryReturn(NID_GRP, __pTextObject != null, 0.0f, E_OPERATION_FAILED + , "[E_OPERATION_FAILED] This instance is not constructed yet."); + + return __width; +} + +int +_EnrichedTextImpl::GetHeight(void) const +{ + SysTryReturn(NID_GRP, __pTextObject != null, 0, E_OPERATION_FAILED + , "[E_OPERATION_FAILED] This instance is not constructed yet."); + + return _CoordinateSystemUtils::ConvertToInteger(__height); +} + +float +_EnrichedTextImpl::GetHeightF(void) const +{ + SysTryReturn(NID_GRP, __pTextObject != null, 0.0f, E_OPERATION_FAILED + , "[E_OPERATION_FAILED] This instance is not constructed yet."); + + return __height; +} + +result +_EnrichedTextImpl::SetVerticalAlignment(TextVerticalAlignment alignment) +{ + SysTryReturn(NID_GRP, __pTextObject != null, E_OPERATION_FAILED, E_OPERATION_FAILED + , "[E_OPERATION_FAILED] This instance is not constructed yet."); + + TextObjectAlignment verticalAlign = ConvertVAlignment(alignment); + if (verticalAlign == TEXT_OBJECT_ALIGNMENT_INVALID || verticalAlign == TEXT_OBJECT_ALIGNMENT_BASELINE) + { + return E_INVALID_ARG; + } + + TextObjectAlignment align = static_cast < TextObjectAlignment >((static_cast < TextObjectAlignment >(__pTextObject->GetAlignment()) + & TEXT_HORIZONTAL_ALIGNMENT) | (verticalAlign & TEXT_VERTICAL_ALIGNMENT)); + + __pTextObject->SetAlignment(align); + __verticalAlignment = alignment; + + return E_SUCCESS; +} + +result +_EnrichedTextImpl::SetHorizontalAlignment(TextHorizontalAlignment alignment) +{ + SysTryReturn(NID_GRP, __pTextObject != null, E_OPERATION_FAILED, E_OPERATION_FAILED + , "[E_OPERATION_FAILED] This instance is not constructed yet."); + + TextObjectAlignment horizontalAalign = ConvertHAlignment(alignment); + if (horizontalAalign == TEXT_OBJECT_ALIGNMENT_INVALID) + { + return E_INVALID_ARG; + } + + TextObjectAlignment align = static_cast < TextObjectAlignment >((static_cast < TextObjectAlignment >(__pTextObject->GetAlignment()) + & TEXT_VERTICAL_ALIGNMENT) | (horizontalAalign & TEXT_HORIZONTAL_ALIGNMENT)); + + __pTextObject->SetAlignment(align); + __horizontalAlignment = alignment; + + return E_SUCCESS; +} + +TextVerticalAlignment +_EnrichedTextImpl::GetVerticalAlignment(void) const +{ + SysTryReturn(NID_GRP, __pTextObject != null, TEXT_ALIGNMENT_VERTICAL_MIN, E_OPERATION_FAILED + , "[E_OPERATION_FAILED] This instance is not constructed yet."); + + return __verticalAlignment; +} + +TextHorizontalAlignment +_EnrichedTextImpl::GetHorizontalAlignment(void) const +{ + SysTryReturn(NID_GRP, __pTextObject != null, TEXT_ALIGNMENT_HORIZONTAL_MIN, E_OPERATION_FAILED + , "[E_OPERATION_FAILED] This instance is not constructed yet."); + + return __horizontalAlignment; +} + +result +_EnrichedTextImpl::SetTextWrapStyle(TextWrap wrap) +{ + SysTryReturn(NID_GRP, __pTextObject != null, E_OPERATION_FAILED, E_OPERATION_FAILED + , "[E_OPERATION_FAILED] This instance is not constructed yet."); + + SysTryReturn(NID_GRP, (TEXT_WRAP_MIN < wrap) && (wrap < TEXT_WRAP_MAX), E_INVALID_ARG, E_INVALID_ARG + , "[E_OPERATION_FAILED] This instance is not constructed yet."); + + _TextWrapType textWrap = ConvertWrapType(wrap); + + if (__pTextObject->SetWrap(static_cast < TextObjectWrapType >(textWrap)) != E_SUCCESS) + { + return E_INVALID_ARG; + } + + return E_SUCCESS; +} + +TextWrap +_EnrichedTextImpl::GetTextWrapStyle(void) const +{ + SysTryReturn(NID_GRP, __pTextObject != null, TEXT_WRAP_MIN, E_OPERATION_FAILED + , "[E_OPERATION_FAILED] This instance is not constructed yet."); + + _TextWrapType textWrapType = static_cast < _TextWrapType >(__pTextObject->GetWrap()); + TextWrap textWrap = ConvertWrap(textWrapType); + + return textWrap; +} + +result +_EnrichedTextImpl::SetTextAbbreviationEnabled(bool enable) +{ + SysTryReturn(NID_GRP, __pTextObject != null, E_OPERATION_FAILED, E_OPERATION_FAILED + , "[E_OPERATION_FAILED] This instance is not constructed yet."); + + TextObjectActionType action = TEXT_OBJECT_ACTION_TYPE_NONE; + + if (enable) + { + action = TEXT_OBJECT_ACTION_TYPE_ABBREV; + } + + __pTextObject->SetAction(action); + + return E_SUCCESS; +} + +bool +_EnrichedTextImpl::IsTextAbbreviationEnabled(void) const +{ + SysTryReturn(NID_GRP, __pTextObject != null, false, E_OPERATION_FAILED + , "[E_OPERATION_FAILED] This instance is not constructed yet."); + + bool r = false; + TextObjectActionType action = __pTextObject->GetAction(); + + if (action & TEXT_OBJECT_ACTION_TYPE_ABBREV) + { + r = true; + } + + return r; +} + +result +_EnrichedTextImpl::SetLineSpace(int lineSpace) +{ + SysTryReturn(NID_GRP, __pTextObject != null, E_OPERATION_FAILED, E_OPERATION_FAILED + , "[E_OPERATION_FAILED] This instance is not constructed yet."); + SysTryReturn(NID_GRP, lineSpace >= 0, E_INVALID_ARG, E_INVALID_ARG + , "[E_INVALID_ARG] The argument is invalid."); + + __lineSpace = _CoordinateSystemUtils::ConvertToFloat(lineSpace); + __pTextObject->SetLineSpace(__lineSpace); + + return E_SUCCESS; +} + +result +_EnrichedTextImpl::SetLineSpace(float lineSpace) +{ + SysTryReturn(NID_GRP, __pTextObject != null, E_OPERATION_FAILED, E_OPERATION_FAILED + , "[E_OPERATION_FAILED] This instance is not constructed yet."); + SysTryReturn(NID_GRP, lineSpace >= 0.0f, E_INVALID_ARG, E_INVALID_ARG + , "[E_INVALID_ARG] The argument is invalid."); + + __lineSpace = lineSpace; + __pTextObject->SetLineSpace(__lineSpace); + + return E_SUCCESS; +} + +int +_EnrichedTextImpl::GetLineSpace(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(__lineSpace); +} + +float +_EnrichedTextImpl::GetLineSpaceF(void) const +{ + return __lineSpace; +} + +void +_EnrichedTextImpl::Refresh(void) +{ + SysTryReturn(NID_GRP, __pTextObject != null, , E_OPERATION_FAILED + , "[E_OPERATION_FAILED] This instance is not constructed yet."); + + __pTextObject->Compose(); +} + +int +_EnrichedTextImpl::GetTotalLineCount(void) const +{ + SysTryReturn(NID_GRP, __pTextObject != null, 0, E_OPERATION_FAILED + , "[E_OPERATION_FAILED] This instance is not constructed yet."); + + __pTextObject->Compose(); + + return __pTextObject->GetTotalLineCount(); +} + +int +_EnrichedTextImpl::GetTotalLineHeight(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetTotalLineHeightF()); +} + +float +_EnrichedTextImpl::GetTotalLineHeightF(void) const +{ + SysTryReturn(NID_GRP, __pTextObject != null, 0.0f, E_OPERATION_FAILED + , "[E_OPERATION_FAILED] This instance is not constructed yet."); + + __pTextObject->Compose(); + float height = __pTextObject->GetTotalHeightF(); + + return height; +} + +int +_EnrichedTextImpl::GetDisplayLineCount(void) const +{ + SysTryReturn(NID_GRP, __pTextObject != null, 0, E_OPERATION_FAILED + , "[E_OPERATION_FAILED] This instance is not constructed yet."); + + int count = __pTextObject->GetDisplayLineCount(); + + __pTextObject->Compose(); + + if (count == 0xFFFF) + { + return 0; + } + + return count; +} + +int +_EnrichedTextImpl::GetLineLength(int lineIndex) const +{ + SysTryReturn(NID_GRP, __pTextObject != null, -1, E_OPERATION_FAILED + , "[E_OPERATION_FAILED] This instance is not constructed yet."); + SysTryReturn(NID_GRP, GetTextElementCount() != 0, -1, E_OPERATION_FAILED + , "[E_OPERATION_FAILED] It doesn't have TextElement."); + SysTryReturn(NID_GRP, lineIndex >= 0, -1, E_INVALID_ARG + , "[E_INVALID_ARG] The invalid lineIndex(%d) is given.", lineIndex); + + int totalLineCount = __pTextObject->GetTotalLineCount(); + + if (lineIndex > totalLineCount) + { + return E_INVALID_ARG; + } + + int lineLength = -1; + + ClearLastResult(); + + __pTextObject->Compose(); + + lineLength = __pTextObject->GetTextLengthAt(lineIndex); + if (lineLength == -1) + { + SetLastResult(E_INVALID_ARG); + return -1; + } + else + { + SetLastResult(E_SUCCESS); + return lineLength; + } +} + +int +_EnrichedTextImpl::GetFirstTextIndex(int lineIndex) const +{ + SysTryReturn(NID_GRP, __pTextObject != null, -1, E_OPERATION_FAILED + , "[E_OPERATION_FAILED] This instance is not constructed yet."); + SysTryReturn(NID_GRP, lineIndex >= 0, -1, E_INVALID_ARG + , "[E_INVALID_ARG] The invalid lineIndex(%d) is given.", lineIndex); + + ClearLastResult(); + __pTextObject->Compose(); + + int totalLineCount = __pTextObject->GetTotalLineCount(); + if (lineIndex >= totalLineCount) + { + SetLastResult(E_INVALID_ARG); + return -1; + } + + int textIndex = __pTextObject->GetFirstTextIndexAt(lineIndex); + if (textIndex == -1) + { + SetLastResult(E_INVALID_ARG); + return -1; + } + else + { + SetLastResult(E_SUCCESS); + return textIndex; + } +} + +int +_EnrichedTextImpl::GetLineIndex(int textIndex) const +{ + SysTryReturn(NID_GRP, __pTextObject != null, -1, E_OPERATION_FAILED + , "[E_OPERATION_FAILED] This instance is not constructed yet."); + SysTryReturn(NID_GRP, textIndex >= 0, -1, E_INVALID_ARG + , "[E_INVALID_ARG] The invalid lineIndex(%d) is given.", textIndex); + + ClearLastResult(); + __pTextObject->Compose(); + + int totalLineCount = __pTextObject->GetTotalLineCount(); + int lineIndex = __pTextObject->GetLineIndexAtTextIndex(textIndex); + + if ((lineIndex > totalLineCount) || (textIndex > totalLineCount) || (lineIndex == -1)) + { + SetLastResult(E_INVALID_ARG); + return -1; + } + else + { + SetLastResult(E_SUCCESS); + return lineIndex; + } +} + +int +_EnrichedTextImpl::GetLineHeight(int lineIndex) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetLineHeightF(lineIndex)); +} + +float +_EnrichedTextImpl::GetLineHeightF(int lineIndex) const +{ + SysTryReturn(NID_GRP, __pTextObject != null, -1, E_OPERATION_FAILED + , "[E_OPERATION_FAILED] This instance is not constructed yet."); + SysTryReturn(NID_GRP, lineIndex >= 0, -1, E_INVALID_ARG + , "[E_INVALID_ARG] The invalid lineIndex(%d) is given.\n", lineIndex); + + ClearLastResult(); + __pTextObject->Compose(); + + int totalLineCount = __pTextObject->GetTotalLineCount(); + if (lineIndex >= totalLineCount) + { + SetLastResult(E_INVALID_ARG); + return -1; + } + + float height = __pTextObject->GetLineHeightAtF(lineIndex); + + SetLastResult(E_SUCCESS); + return height; +} + +int +_EnrichedTextImpl::GetTextLength(void) const +{ + SysTryReturn(NID_GRP, __pTextObject != null, 0, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not constructed yet."); + + if (GetTextElementCount() == 0) + { + return 0; + } + + __pTextObject->Compose(); + + return __pTextObject->GetTextLength(); +} + +result +_EnrichedTextImpl::GetTextExtent(int startTextIndex, int textLength, int& width, int& height, int& actualLength) const +{ + float widthF = _CoordinateSystemUtils::ConvertToFloat(width); + float heightF = _CoordinateSystemUtils::ConvertToFloat(height); + + result r = GetTextExtent(startTextIndex, textLength, widthF, heightF, actualLength); + + width = _CoordinateSystemUtils::ConvertToInteger(widthF); + height = _CoordinateSystemUtils::ConvertToInteger(heightF); + + return r; +} + +result +_EnrichedTextImpl::GetTextExtent(int startTextIndex, int textLength, float& width, float& height, int& actualLength) const +{ + SysTryReturn(NID_GRP, __pTextObject != null, E_OPERATION_FAILED, E_OPERATION_FAILED + , "[E_OPERATION_FAILED] This instance is not constructed yet."); + SysTryReturn(NID_GRP, textLength >= 0, E_INVALID_ARG, E_INVALID_ARG + , "[E_INVALID_ARG] The given text length(%d) is invalid\n", textLength); + SysTryReturn(NID_GRP, startTextIndex <= GetTextLength(), E_INVALID_ARG, E_INVALID_ARG + , "[E_INVALID_ARG] 'startTextIndex' is greater than or equal to the text length."); + + FloatDimension textSize; + + actualLength = 0; + + if (GetTextLength() == 0) + { + width = 0; + height = 0; + + return E_SUCCESS; + } + + if (startTextIndex + textLength <= 0) + { + width = 0; + height = 0; + + return E_SUCCESS; + } + + __pTextObject->Compose(); + textSize = __pTextObject->GetTextExtentF(startTextIndex, textLength); + width = textSize.width; + height = textSize.height; + + if (GetTextLength() - startTextIndex > textLength) + { + actualLength = textLength; + } + else + { + actualLength = GetTextLength() - startTextIndex; + } + + return E_SUCCESS; +} + + +result +_EnrichedTextImpl::GetTextExtent(int startTextIndex, int textLength, Tizen::Graphics::Dimension& size, int &actualLength) const +{ + FloatDimension sizeF = _CoordinateSystemUtils::ConvertToFloat(size); + + result r = GetTextExtent(startTextIndex, textLength, sizeF, actualLength); + + size = _CoordinateSystemUtils::ConvertToInteger(sizeF); + + return r; +} + +result +_EnrichedTextImpl::GetTextExtent(int startTextIndex, int textLength, Tizen::Graphics::FloatDimension& size, int &actualLength) const +{ + SysTryReturn(NID_GRP, __pTextObject != null, E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not constructed yet.\n"); + SysTryReturn(NID_GRP, textLength >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The given text length(%d) is invalid\n", textLength); + SysTryReturn(NID_GRP, startTextIndex <= GetTextLength(), E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] 'startTextIndex' is greater than or equal to the text length.\n"); + + actualLength = 0; + + if (GetTextLength() == 0) + { + size.width = 0; + size.height = 0; + + return E_SUCCESS; + } + + if (startTextIndex + textLength <= 0) + { + size.width = 0; + size.height = 0; + + return E_SUCCESS; + } + + __pTextObject->Compose(); + + size = __pTextObject->GetTextExtentF(startTextIndex, textLength); + if (GetTextLength() - startTextIndex > textLength) + { + actualLength = textLength; + } + else + { + actualLength = GetTextLength() - startTextIndex; + } + + return E_SUCCESS; +} + +Tizen::Graphics::Dimension +_EnrichedTextImpl::GetTextExtent(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetTextExtentF()); +} + +Tizen::Graphics::FloatDimension +_EnrichedTextImpl::GetTextExtentF(void) const +{ + SysTryReturn(NID_GRP, __pTextObject != null, FloatDimension(-1, -1), E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not constructed yet.\n"); + + FloatDimension size(0,0); + if (GetTextLength() == 0) + { + return size; + } + + __pTextObject->Compose(); + + FloatRectangle rtBound = __pTextObject->GetBoundsF(); + if (rtBound.width >= 0.0f && rtBound.height >= 0.0f) + { + size.width = rtBound.width; + size.height = __pTextObject->GetTotalHeightF(); + + return size; + } + else + { + size.width = -1; + size.height = -1; + + return size; + } +} + +result +_EnrichedTextImpl::Add(const Tizen::Graphics::Bitmap& bitmap) +{ + SysTryReturn(NID_GRP, __pTextObject != null, E_OPERATION_FAILED, E_OPERATION_FAILED + , "[E_OPERATION_FAILED] This instance is not constructed yet."); + SysTryReturn(NID_GRP, &bitmap, E_INVALID_ARG, E_INVALID_ARG + , "[E_INVALID_ARG] The source bitmap is invalid."); + SysTryReturn(NID_GRP, _Util::CheckValidity(&bitmap), E_INVALID_ARG, E_INVALID_ARG + , "[E_INVALID_ARG] The source bitmap is invalid."); + + result r = E_SUCCESS; + + Bitmap* pBitmap = const_cast < Bitmap* >(&bitmap); + Bitmap* pNewBitmap = new (std::nothrow) Bitmap(); + if (pNewBitmap == null) + { + SysLog(NID_GRP, "[E_OUT_OF_MEMORY] Fail to create a bitmap."); + return E_OUT_OF_MEMORY; + } + + r = pNewBitmap->Construct(*pBitmap, FloatRectangle(0, 0, pBitmap->GetWidthF(), pBitmap->GetHeightF())); + SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Fails to append image.", GetErrorMessage(r)); + + __pTextObject->AppendElement(*pNewBitmap, TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL); + __pTextObject->Compose(); + + r = __pLinkedListTextElementList->Add(*pNewBitmap); + SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Fails to add image.", GetErrorMessage(r)); + + if (__isCopiedEnrichedText == false) + { + __elements.Add(bitmap); + } + + return E_SUCCESS; + +CATCH: + if (pNewBitmap) + { + delete pNewBitmap; + pNewBitmap = null; + } + return r; +} + +result +_EnrichedTextImpl::InsertAt(int elementIndex, const Tizen::Graphics::Bitmap& bitmap) +{ + SysTryReturn(NID_GRP, __pTextObject != null, E_OPERATION_FAILED, E_OPERATION_FAILED + , "[E_OPERATION_FAILED] This instance is not constructed yet."); + SysTryReturn(NID_GRP, &bitmap, E_INVALID_ARG, E_INVALID_ARG + , "[E_INVALID_ARG] The source bitmap is invalid."); + SysTryReturn(NID_GRP, _Util::CheckValidity(&bitmap), E_INVALID_ARG, E_INVALID_ARG + , "[E_INVALID_ARG] The source bitmap is invalid."); + SysTryReturn(NID_GRP, elementIndex >= 0 && elementIndex <= GetTextElementCount(), E_OUT_OF_RANGE, E_OUT_OF_RANGE + , "[E_OUT_OF_RANGE] The given text index is invalid."); + + result r = E_SUCCESS; + _Text::TextElement* pTextComponent = null; + int textLength = 0; + int count = __pTextObject->GetElementCount(); + if (elementIndex > count) + { + return E_INVALID_ARG; + } + + Bitmap* pBitmap = const_cast < Bitmap* >(&bitmap); + Bitmap* pNewBitmap = new (std::nothrow) Bitmap(); + if (pNewBitmap == null) + { + SysLog(NID_GRP, "[E_OUT_OF_MEMORY] Fail to create a bitmap."); + return E_OUT_OF_MEMORY; + } + + r = pNewBitmap->Construct(*pBitmap, FloatRectangle(0, 0, pBitmap->GetWidthF(), pBitmap->GetHeightF())); + SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Fails to insert image.", GetErrorMessage(r)); + + for (int i = 0; i < elementIndex; i++) + { + pTextComponent = __pTextObject->GetElementAtElementIndex(i); + if (pTextComponent != null) + { + textLength = textLength + pTextComponent->GetTextLength(); + } + } + + __pTextObject->InsertElementAt(textLength, *pNewBitmap, TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL); + __pTextObject->Compose(); + + r = __pLinkedListTextElementList->InsertAt(*pNewBitmap, elementIndex); + SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Fails to insert image.", GetErrorMessage(r)); + + if (__isCopiedEnrichedText == false) + { + __elements.InsertAt(bitmap, elementIndex); + } + + return E_SUCCESS; + +CATCH: + if (pNewBitmap) + { + delete pNewBitmap; + pNewBitmap = null; + } + + return r; +} + +result +_EnrichedTextImpl::GetLinkInfoFromPosition(const Point& point, Tizen::Base::Utility::LinkInfo& linkInfo) const +{ + return GetLinkInfoFromPosition(_CoordinateSystemUtils::ConvertToFloat(point), linkInfo); +} + +result +_EnrichedTextImpl::GetLinkInfoFromPosition(const FloatPoint& point, Tizen::Base::Utility::LinkInfo& linkInfo) const +{ + SysTryReturn(NID_GRP, __pTextObject != null, E_OPERATION_FAILED, E_OPERATION_FAILED + , "[E_OPERATION_FAILED] This instance is not constructed yet."); + SysTryReturn(NID_GRP, GetTextElementCount() > 0, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND + , "[E_OBJ_NOT_FOUND] The TextElement does not exist."); + SysTryReturn(NID_GRP, point.x >= 0.0f && point.y >= 0.0f, E_INVALID_ARG, E_INVALID_ARG + , "[E_INVALID_ARG] The invalid position is given."); + SysTryReturn(NID_GRP, GetWidthF() >= point.x && GetHeightF() >= point.y, E_INVALID_ARG, E_INVALID_ARG + , "[E_INVALID_ARG] The invalid position is given."); + + return GetLinkInfoFromPosition(point.x, point.y, linkInfo); +} + +result +_EnrichedTextImpl::GetLinkInfoFromPosition(int x, int y, Tizen::Base::Utility::LinkInfo& linkInfo) const +{ + return GetLinkInfoFromPosition(_CoordinateSystemUtils::ConvertToFloat(x), _CoordinateSystemUtils::ConvertToFloat(y), linkInfo); +} + +result +_EnrichedTextImpl::GetLinkInfoFromPosition(float x, float y, Tizen::Base::Utility::LinkInfo& linkInfo) const +{ + SysTryReturn(NID_GRP, __pTextObject != null, E_OPERATION_FAILED, E_OPERATION_FAILED + , "[E_OPERATION_FAILED] This instance is not constructed yet."); + SysTryReturn(NID_GRP, GetTextElementCount() > 0, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND + , "[E_OBJ_NOT_FOUND] The TextElement does not exist."); + SysTryReturn(NID_GRP, x >= 0.0f && y >= 0.0f, E_INVALID_ARG, E_INVALID_ARG + , "[E_INVALID_ARG] The invalid position is given."); + SysTryReturn(NID_GRP, GetWidthF() >= x && GetHeightF() >= y, E_INVALID_ARG, E_INVALID_ARG + , "[E_INVALID_ARG] The invalid position is given."); + + FloatPoint point(x, y); + + int textElementIndex = GetTextElementIndexFromPosition(point); + + TextElement* pTextElement = GetTextElementAt(textElementIndex); + if (pTextElement == null) + { + return E_OBJ_NOT_FOUND; + } + _TextElementImpl* pTextElementImpl = _TextElementImpl::GetInstance(*pTextElement); + if (pTextElementImpl != null) + { + linkInfo.SetLinkType(pTextElementImpl->GetLinkType()); + linkInfo.SetText(pTextElementImpl->GetText()); + linkInfo.SetLink(pTextElementImpl->GetLinkText()); + } + + return E_SUCCESS; +} + +TextVerticalAlignment +_EnrichedTextImpl::GetElementVerticalAlignment(void) const +{ + SysTryReturn(NID_GRP, __pTextObject != null, TEXT_ALIGNMENT_VERTICAL_MIN, E_OPERATION_FAILED + , "[E_OPERATION_FAILED] This instance is not constructed yet."); + + return __elementVerticalAlignment; +} + +result +_EnrichedTextImpl::SetElementVerticalAlignment(TextVerticalAlignment alignment) +{ + SysTryReturn(NID_GRP, __pTextObject != null, E_OPERATION_FAILED, E_OPERATION_FAILED + , "[E_OPERATION_FAILED] This instance is not constructed yet."); + + TextObjectAlignment elementAlign = ConvertVAlignment(alignment); + if (elementAlign == TEXT_OBJECT_ALIGNMENT_INVALID) + { + return E_INVALID_ARG; + } + + TextObjectAlignment align = static_cast < TextObjectAlignment >(elementAlign & TEXT_VERTICAL_ALIGNMENT); + + __pTextObject->SetElementVerticalAlignment(align); + __elementVerticalAlignment = alignment; + + return E_SUCCESS; +} + +Tizen::Graphics::Rectangle +_EnrichedTextImpl::GetBounds() const +{ + Rectangle rect(0, 0, _CoordinateSystemUtils::ConvertToInteger(__width), _CoordinateSystemUtils::ConvertToInteger(__height)); + + return rect; +} + +Tizen::Graphics::FloatRectangle +_EnrichedTextImpl::GetBoundsF() const +{ + FloatRectangle rect(0, 0, __width, __height); + + return rect; +} + +result +_EnrichedTextImpl::IndexOfFromLinkedList(TextElement& textElement, int& index) +{ + return __pLinkedListTextElementList->IndexOf(textElement, index); +} + +int +_EnrichedTextImpl::GetTextElementIndexFromPosition(Tizen::Graphics::Point& point) const +{ + FloatPoint pointF = _CoordinateSystemUtils::ConvertToFloat(point); + + return GetTextElementIndexFromPosition(pointF); +} + +int +_EnrichedTextImpl::GetTextElementIndexFromPosition(Tizen::Graphics::FloatPoint& point) const +{ + _TextElementImpl* pElement = null; + TextElementType type; + int length = 0; + int offset = 0; + int count = 0; + + offset = GetIndexFromTouchPosition(point.x, point.y); + + if (offset < 0 || offset > GetTextLength()) + { + return -1; + } + + count = GetTextElementCount(); + for (int i = 0; i < count; i++) + { + type = GetTypeFromIndex(i); + + if (type == TEXT_ELEMENT_TYPE_IMAGE) + { + length = length + 1; + } + else + { + pElement = _TextElementImpl::GetInstance(*GetTextElementAt(i)); + if (pElement) + { + if (pElement->IsAuto() == true) + { + length = length + pElement->GetLinkText().GetLength(); + } + else + { + String text = pElement->GetText(); + length = length + text.GetLength(); + } + } + } + if (offset <= length) + { + return i; + } + } + return -1; +} + +TextObject* +_EnrichedTextImpl::GetTextObject(void) const +{ + return __pTextObject; +} + +TextElementType +_EnrichedTextImpl::GetTypeFromIndex(int textObjectIndex) const +{ + TextElementType type = TEXT_ELEMENT_TYPE_NONE; + + _Text::TextElement* pTextComponent = null; + + pTextComponent = __pTextObject->GetElementAtElementIndex(textObjectIndex); + + if (pTextComponent) + { + type = pTextComponent->GetType(); + } + else + { + return TEXT_ELEMENT_TYPE_NONE; + } + + return type; +} + +int +_EnrichedTextImpl::GetIndexFromTouchPosition(int posX, int posY) const +{ + return GetIndexFromTouchPosition(_CoordinateSystemUtils::ConvertToFloat(posX), _CoordinateSystemUtils::ConvertToFloat(posY)); +} + +int +_EnrichedTextImpl::GetIndexFromTouchPosition(float posX, float posY) const +{ + return __pTextObject->GetTextIndexFromPosition(posX, posY, true); +} + +result +_EnrichedTextImpl::RemoveFromTextObject(_TextElementImpl* pTextElementImpl) +{ + SysTryReturn(NID_GRP, __pTextObject != null, E_OPERATION_FAILED, E_OPERATION_FAILED + , "[E_OPERATION_FAILED] This instance is not constructed yet."); + + _Text::TextElement* pTextComponent = pTextElementImpl->GetComponent(); + if (pTextComponent != null) + { + __pTextObject->RemoveElement(*pTextComponent, false); + } + + return E_SUCCESS; +} + +result +_EnrichedTextImpl::InsertAtFromTextObject(int index, _TextElementImpl* pTextElementImpl) +{ + SysTryReturn(NID_GRP, __pTextObject != null, E_OPERATION_FAILED, E_OPERATION_FAILED + , "[E_OPERATION_FAILED] This instance is not constructed yet."); + + int textLength = 0; + int count = __pTextObject->GetElementCount(); + if (count > index) + { + return E_INVALID_ARG; + } + + _Text::TextElement* pInsertTextComponent = pTextElementImpl->GetComponent(); + if (pInsertTextComponent != null) + { + for (int i = 0; i < index; i++) + { + _Text::TextElement* pTextComponent = __pTextObject->GetElementAtElementIndex(i); + if (pTextComponent != null) + { + textLength = textLength + pTextComponent->GetTextLength(); + } + } + + __pTextObject->InsertElementAt(textLength, *pInsertTextComponent); + __pTextObject->Compose(); + } + + return E_SUCCESS; +} + +int +_EnrichedTextImpl::GetTextElementIndex(_TextElementImpl* pTextElementImpl) const +{ + _Text::TextElement* pTextComponent = pTextElementImpl->GetComponent(); + if (pTextComponent != null) + { + return __pTextObject->GetElementIndexOf(*pTextComponent); + } + + return -1; +} + +TextObjectAlignment +_EnrichedTextImpl::ConvertHAlignment(TextHorizontalAlignment halign) +{ + TextObjectAlignment align = TEXT_OBJECT_ALIGNMENT_LEFT; + + switch (halign) + { + case TEXT_ALIGNMENT_LEFT: + align = TEXT_OBJECT_ALIGNMENT_LEFT; + break; + + case TEXT_ALIGNMENT_CENTER: + align = TEXT_OBJECT_ALIGNMENT_CENTER; + break; + + case TEXT_ALIGNMENT_RIGHT: + align = TEXT_OBJECT_ALIGNMENT_RIGHT; + break; + + default: + align = TEXT_OBJECT_ALIGNMENT_INVALID; + break; + } + + return align; +} + +TextHorizontalAlignment +_EnrichedTextImpl::ConvertHAlignment(TextObjectAlignment halign) +{ + TextHorizontalAlignment align; + + switch (halign) + { + case TEXT_OBJECT_ALIGNMENT_RIGHT: + align = TEXT_ALIGNMENT_RIGHT; + break; + + case TEXT_OBJECT_ALIGNMENT_CENTER: + align = TEXT_ALIGNMENT_CENTER; + break; + + case TEXT_OBJECT_ALIGNMENT_LEFT: + // fall through + default: + align = TEXT_ALIGNMENT_LEFT; + break; + } + + return align; +} + +TextObjectAlignment +_EnrichedTextImpl::ConvertVAlignment(TextVerticalAlignment valign) +{ + TextObjectAlignment align; + + switch (valign) + { + case TEXT_ALIGNMENT_TOP: + align = TEXT_OBJECT_ALIGNMENT_TOP; + break; + + case TEXT_ALIGNMENT_MIDDLE: + align = TEXT_OBJECT_ALIGNMENT_MIDDLE; + break; + + case TEXT_ALIGNMENT_BOTTOM: + align = TEXT_OBJECT_ALIGNMENT_BOTTOM; + break; + + case TEXT_ALIGNMENT_BASELINE: + align = TEXT_OBJECT_ALIGNMENT_BASELINE; + break; + + default: + align = TEXT_OBJECT_ALIGNMENT_INVALID; + break; + } + + return align; +} + +TextVerticalAlignment +_EnrichedTextImpl::ConvertVAlignment(TextObjectAlignment valign) +{ + TextVerticalAlignment align = TEXT_ALIGNMENT_TOP; + + switch (valign) + { + case TEXT_OBJECT_ALIGNMENT_TOP: + align = TEXT_ALIGNMENT_TOP; + break; + + case TEXT_OBJECT_ALIGNMENT_MIDDLE: + align = TEXT_ALIGNMENT_MIDDLE; + break; + + case TEXT_OBJECT_ALIGNMENT_BOTTOM: + // fall through + default: + align = TEXT_ALIGNMENT_BOTTOM; + break; + } + + return align; +} + +_TextWrapType +_EnrichedTextImpl::ConvertWrapType(TextWrap warp) +{ + _TextWrapType twrap; + + switch (warp) + { + case TEXT_WRAP_CHARACTER_WRAP: + twrap = TEXT_WRAP_TYPE_WRAP; + break; + + case TEXT_WRAP_WORD_WRAP: + twrap = TEXT_WRAP_TYPE_WORDWRAP; + break; + + default: + twrap = TEXT_WRAP_TYPE_NONE; + break; + } + + return twrap; +} + +TextWrap +_EnrichedTextImpl::ConvertWrap(_TextWrapType warp) const +{ + TextWrap twrap; + + switch (warp) + { + case TEXT_WRAP_TYPE_WRAP: + twrap = TEXT_WRAP_CHARACTER_WRAP; + break; + + case TEXT_WRAP_TYPE_WORDWRAP: + twrap = TEXT_WRAP_WORD_WRAP; + break; + + default: + twrap = TEXT_WRAP_NONE; + break; + } + + return twrap; +} + +_EnrichedTextImpl* +_EnrichedTextImpl::GetCloneN(void) const +{ + SysTryReturn(NID_GRP, __pTextObject != null, null, E_OPERATION_FAILED + , "[E_OPERATION_FAILED] This instance is not constructed yet."); + + result r = E_SUCCESS; + + _EnrichedTextImpl* pNewEnrichedTextImpl = null; + TextElement* pNewElement = null; + TextElement* pSrcElement = null; + Bitmap* pBitmap = null; + Font* pFont = null; + Color bgColor; + Color fgColor; + Color outColor; + TextElementType type = TEXT_ELEMENT_TYPE_NONE; + + Dimension dim = this->GetSize(); + TextVerticalAlignment verticalAlignment = this->GetVerticalAlignment(); + TextHorizontalAlignment horizontalAlignment = this->GetHorizontalAlignment(); + TextVerticalAlignment elementVerticalAlignment = this->GetElementVerticalAlignment(); + TextWrap wrap = this->GetTextWrapStyle(); + bool abbreviationEnable = this->IsTextAbbreviationEnabled(); + float lineSpacing = this->GetLineSpaceF(); + int elementCount = this->GetTextElementCount(); + + pNewEnrichedTextImpl = new (std::nothrow)_EnrichedTextImpl(); + SysTryReturn(NID_GRP, pNewEnrichedTextImpl, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Fail to create a EnrichedTextImpl."); + + r = pNewEnrichedTextImpl->Construct(dim); + SysTryCatch(NID_GRP, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to duplicate the EnrichedTextImpl."); + + pNewEnrichedTextImpl->__isCopiedEnrichedText = true; + pNewEnrichedTextImpl->SetVerticalAlignment(verticalAlignment); + pNewEnrichedTextImpl->SetHorizontalAlignment(horizontalAlignment); + pNewEnrichedTextImpl->SetElementVerticalAlignment(elementVerticalAlignment); + pNewEnrichedTextImpl->SetTextWrapStyle(wrap); + pNewEnrichedTextImpl->SetTextAbbreviationEnabled(abbreviationEnable); + pNewEnrichedTextImpl->SetLineSpace(lineSpacing); + + for (int i = 0; i < elementCount; i++) + { + if (this->GetTextElementAt(i) == null) // For Bitmap + { + type = (this->GetTypeFromIndex(i)); + if (type == TEXT_ELEMENT_TYPE_IMAGE) + { + pBitmap = (Bitmap*)(this->__pLinkedListTextElementList->GetAt(i)); + SysTryCatch(NID_GRP, pBitmap != null, , E_SYSTEM, "[E_SYSTEM] Failed to duplicate the EnrichedTextImpl."); + + r = pNewEnrichedTextImpl->Add(*pBitmap); + SysTryCatch(NID_GRP, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to duplicate the EnrichedTextImpl."); + } + } + else // For TextElement + { + pNewElement = new (std::nothrow) TextElement(); + SysTryCatch(NID_GRP, pNewElement, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Fail to create a TextElement."); + + pSrcElement = (TextElement*)(this->__pLinkedListTextElementList->GetAt(i)); + SysTryCatch(NID_GRP, pSrcElement, , E_SYSTEM, "[E_SYSTEM] Failed to duplicate the EnrichedTextImpl."); + + bgColor = pSrcElement->GetBackgroundColor(); + fgColor = pSrcElement->GetTextColor(); + outColor = pSrcElement->GetOutlineColor(); + _TextElementImpl* pSrcTextElementImpl = _TextElementImpl::GetInstance(*pSrcElement); + + if (pSrcElement->GetLinkType() == LINK_TYPE_NONE) + { + r = pNewElement->Construct(pSrcElement->GetText()); + SysTryCatch(NID_GRP, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to duplicate the EnrichedTextImpl."); + } + else + { + if (pSrcTextElementImpl->IsAuto() == true) + { + r = pNewElement->Construct(pSrcElement->GetText(), pSrcTextElementImpl->GetAutoLink()); + SysTryCatch(NID_GRP, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to duplicate the EnrichedTextImpl."); + } + else + { + r = pNewElement->Construct(pSrcElement->GetText(), pSrcElement->GetLinkType(), pSrcElement->GetLink()); + SysTryCatch(NID_GRP, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to duplicate the EnrichedTextImpl."); + } + } + + pNewElement->SetTextColor(fgColor); + if (pSrcTextElementImpl->IsBackgoundColorEnable() == true) + { + pNewElement->SetBackgroundColor(bgColor); + } + + if (pSrcTextElementImpl->IsOutlineColorEnable() == true) + { + pNewElement->SetOutlineColor(outColor); + } + + pFont = const_cast < Font* >(pSrcTextElementImpl->GetFont()); + if (pFont != null) + { + r = pNewElement->SetFont(*pFont); + SysTryCatch(NID_GRP, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to duplicate the EnrichedTextImpl."); + } + + r = pNewEnrichedTextImpl->Add(*pNewElement); + SysTryCatch(NID_GRP, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Failed to duplicate the EnrichedTextImpl."); + } + } + + return pNewEnrichedTextImpl; + +CATCH: + if (pNewEnrichedTextImpl) + { + pNewEnrichedTextImpl->RemoveAll(true); + delete pNewEnrichedTextImpl; + pNewEnrichedTextImpl = null; + } + + if (pNewElement) + { + delete pNewElement; + pNewElement = null; + } + + return null; +} + +_EnrichedTextImpl* +_EnrichedTextImpl::GetInstance(EnrichedText& enrichedText) +{ + return (&enrichedText != null) ? enrichedText.__pImpl : null; +} + +const _EnrichedTextImpl* +_EnrichedTextImpl::GetInstance(const EnrichedText& enrichedText) +{ + return (&enrichedText != null) ? enrichedText.__pImpl : null; +} + +bool +_EnrichedTextImpl::IsConstructed(void) const +{ + return (this->__pTextObject != null); +} + +}} // Tizen::Graphics diff --git a/src/graphics/FGrp_Farm.cpp b/src/graphics/FGrp_Farm.cpp new file mode 100644 index 0000000..6c23ab5 --- /dev/null +++ b/src/graphics/FGrp_Farm.cpp @@ -0,0 +1,542 @@ +// +// 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_Farm.cpp + * @brief This is the implementation file for the farm functions in Tizen::Graphics namespace. + * + */ + +#include + +#include "FGrp_Farm.h" +#include "util/FGrp_UtilTemplate.h" + + +using namespace Tizen::Graphics; + + +namespace +{ + +bool _SaveToBmpFromBuffer(unsigned long* pBuffer, int width, int height, int pixelPerLine, const Tizen::Base::String& fileName) +{ + unsigned char bmpFileHeader[] = + { + 0x42, 0x4D, + 0x00, 0x00, 0x00, 0x00, // size + 0x00, 0x00, + 0x00, 0x00, + 0x36, 0x00, 0x00, 0x00 // offset + }; + + unsigned char bmpDibHeader[] = + { + 0x28, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, // width + 0x00, 0x00, 0x00, 0x00, // height + 0x01, 0x00, + 0x18, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, // image size + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00 + }; + + int dstPitch = width * 3; + + while (dstPitch % 4) + { + ++dstPitch; + } + + int imageSize = dstPitch * height; + int offset = sizeof(bmpFileHeader) + sizeof(bmpDibHeader); + + // fill in the reserved fields + { + struct _LittleEndian + { + static inline void Write(unsigned char* pBuffer, unsigned long data) + { + pBuffer[0] = (data >> 0) & 0xFF; + pBuffer[1] = (data >> 8) & 0xFF; + pBuffer[2] = (data >> 16) & 0xFF; + pBuffer[3] = (data >> 24) & 0xFF; + } + }; + + // offset (little endian) + _LittleEndian::Write(&bmpFileHeader[2], imageSize + offset); + // offset (little endian) + _LittleEndian::Write(&bmpFileHeader[10], offset); + // width (little endian) + _LittleEndian::Write(&bmpDibHeader[4], width); + // height (little endian) + _LittleEndian::Write(&bmpDibHeader[8], height); + // image size (little endian) + _LittleEndian::Write(&bmpDibHeader[20], imageSize); + } + + Tizen::Io::File file; + + result r = file.Construct(fileName, "wb"); + + if (r != E_SUCCESS) + { + return false; + } + + { + result r1 = file.Write(bmpFileHeader, sizeof(bmpFileHeader)); + result r2 = file.Write(bmpDibHeader, sizeof(bmpDibHeader)); + + if (r1 != E_SUCCESS || r2 != E_SUCCESS) + { + return false; + } + } + + { + typedef unsigned long SourPixel; + typedef unsigned char DestPixel; + + _Util::AutoPtr lineBuffer(new DestPixel[dstPitch]); + + for (int y = 0; y < height; y++) + { + memset(lineBuffer.Get(), 0, dstPitch); + + SourPixel* pSour32 = pBuffer + pixelPerLine * (height - y - 1); + DestPixel* pDest08 = lineBuffer.Get(); + + for (int x = 0; x < width; x++) + { + *pDest08++ = (unsigned char)(*pSour32); + *pDest08++ = (unsigned char)(*pSour32 >> 8); + *pDest08++ = (unsigned char)(*pSour32 >> 16); + + ++pSour32; + } + + if (file.Write(lineBuffer.Get(), dstPitch) != E_SUCCESS) + { + return false; + } + } + + } + + return true; +} + +bool _CompositeBufferFromMask(const BufferInfo& dstBi, const BufferInfo& srcBi, bool applyPremultiplied) +{ + typedef unsigned long Pixel; + + if (dstBi.bitsPerPixel != 32 || srcBi.bitsPerPixel != 32) + return true; + + if (srcBi.width > dstBi.width || srcBi.height > dstBi.height) + return false; + + { + Pixel* pDst = (Pixel*)dstBi.pPixels; + Pixel* pSrc = (Pixel*)srcBi.pPixels; + + int dstSkip = dstBi.pitch * 8 / dstBi.bitsPerPixel - srcBi.width; + int srcSkip = srcBi.pitch * 8 / srcBi.bitsPerPixel - srcBi.width; + + if (applyPremultiplied) + { + for (int y = 0; y < srcBi.height; y++) + { + for (int x = 0; x < srcBi.width; x++) + { + Pixel dA = (*pDst >> 24) & 0xFF; + Pixel dR = (*pDst >> 16) & 0xFF; + Pixel dG = (*pDst >> 8) & 0xFF; + Pixel dB = (*pDst >> 0) & 0xFF; + + Pixel sA = (*pSrc >> 24) & 0xFF; + + Pixel alpha = sA + (sA >> 7); + + dA = (alpha * dA) >> 8; + dR = (alpha * dR) >> 8; + dG = (alpha * dG) >> 8; + dB = (alpha * dB) >> 8; + + *pDst = (dA << 24) | (dR << 16) | (dG << 8) | (dB); + + ++pDst; + ++pSrc; + } + + pDst += dstSkip; + pSrc += srcSkip; + } + } + else + { + for (int y = 0; y < srcBi.height; y++) + { + for (int x = 0; x < srcBi.width; x++) + { + Pixel dA = (*pDst >> 24) & 0xFF; + Pixel dR = (*pDst >> 16) & 0xFF; + Pixel dG = (*pDst >> 8) & 0xFF; + Pixel dB = (*pDst >> 0) & 0xFF; + + Pixel sA = (*pSrc >> 24) & 0xFF; + + Pixel alpha = sA + (sA >> 7); + + dA = (alpha * dA) >> 8; + dR = (alpha * dR) >> 8; + dG = (alpha * dG) >> 8; + dB = (alpha * dB) >> 8; + + *pDst = (dA << 24) | (dR << 16) | (dG << 8) | (dB); + + ++pDst; + ++pSrc; + } + + pDst += dstSkip; + pSrc += srcSkip; + } + } + } + + return true; +} + +} + + +namespace Tizen { namespace Graphics { namespace _Farm +{ + +bool GetImageFileSize(const Tizen::Base::String fileName, int& outWidth, int& outHeight) +{ + Tizen::Io::File file; + + result r = file.Construct(fileName, L"rb"); + + if (r != E_SUCCESS) + { + return false; + } + + // check if it is a BMP file. + { + /* + CHAR2 signature + DWORD file_size + DWORD reserved + DWORD offset_to_buffer + */ + unsigned char bmpFileHeader[2+4*3]; + + if (file.Read(bmpFileHeader, sizeof(bmpFileHeader)) == sizeof(bmpFileHeader)) + { + if (bmpFileHeader[0] == 'B' && bmpFileHeader[1] == 'M') + { + /* + DWORD header_size + DWORD width_little_endian + DWORD height_little_endian + */ + unsigned char bmpDibHeader[4*3]; + + if (file.Read(bmpDibHeader, sizeof(bmpDibHeader)) == sizeof(bmpDibHeader)) + { + outWidth = int(bmpDibHeader[4+0]) | (int(bmpDibHeader[4+1]) << 8) | (int(bmpDibHeader[4+2]) << 16) | (int(bmpDibHeader[4+3]) << 24); + outHeight = int(bmpDibHeader[8+0]) | (int(bmpDibHeader[8+1]) << 8) | (int(bmpDibHeader[8+2]) << 16) | (int(bmpDibHeader[8+3]) << 24); + + return true; + } + } + } + + file.Seek(Tizen::Io::FILESEEKPOSITION_BEGIN, 0); + } + + // check if it is a PNG file. + { + /* + 89h, 'PNG', 0Dh, 0Ah, 1Ah, 0Ah + */ + unsigned char pngFileHeader[8]; + + if (file.Read(pngFileHeader, sizeof(pngFileHeader)) == sizeof(pngFileHeader)) + { + if (pngFileHeader[0] == 0x89 && pngFileHeader[1] == 'P' && pngFileHeader[2] == 'N' && pngFileHeader[3] == 'G' + && pngFileHeader[4] == 0x0D && pngFileHeader[5] == 0x0A && pngFileHeader[6] == 0x1A && pngFileHeader[7] == 0x0A) + { + /* + DWORD data_bytes_big_endian + CHAR4 chunk_type + */ + unsigned char pngChunk[8]; + + if (file.Read(pngChunk, sizeof(pngChunk)) == sizeof(pngChunk)) + { + if (pngChunk[4] == 'I' && pngChunk[5] == 'H' && pngChunk[6] == 'D' && pngChunk[7] == 'R') + { + /* + DWORD width_big_endian + DWORD height_big_endian + */ + unsigned char pngHeader[8]; + + if (file.Read(pngHeader, sizeof(pngHeader)) == sizeof(pngHeader)) + { + outWidth = (int(pngHeader[0+0]) << 24) | (int(pngHeader[0+1]) << 16) | (int(pngHeader[0+2]) << 8) | int(pngHeader[0+3]); + outHeight = (int(pngHeader[4+0]) << 24) | (int(pngHeader[4+1]) << 16) | (int(pngHeader[4+2]) << 8) | int(pngHeader[4+3]); + + return true; + } + } + } + } + } + + file.Seek(Tizen::Io::FILESEEKPOSITION_BEGIN, 0); + } + + // check if it is a JPG or EXIF file. + { + unsigned char jpgFileHeader[10]; + + if (file.Read(jpgFileHeader, sizeof(jpgFileHeader)) == sizeof(jpgFileHeader)) + { + // I assume that signature block is coordinated the first. + if ((jpgFileHeader[0] == 0xFF && jpgFileHeader[1] == 0xD8 && jpgFileHeader[2] == 0xFF) + && ((jpgFileHeader[6] == 'J' && jpgFileHeader[7] == 'F' && jpgFileHeader[8] == 'I' && jpgFileHeader[9] == 'F') + || (jpgFileHeader[6] == 'E' && jpgFileHeader[7] == 'x' && jpgFileHeader[8] == 'i' && jpgFileHeader[9] == 'f'))) + { + file.Seek(Tizen::Io::FILESEEKPOSITION_BEGIN, 0); + + bool isFound = false; + + while (!isFound) + { + unsigned char blockID[2]; + + if (file.Read(blockID, sizeof(blockID)) != sizeof(blockID)) + { + break; + } + + if (blockID[0] != 0xFF) + { + break; + } + + switch (blockID[1]) + { + case 0xC0: + case 0xC1: + case 0xC2: + { + unsigned char colorInfo[7]; + + if (file.Read(colorInfo, sizeof(colorInfo)) != sizeof(colorInfo)) + { + isFound = true; + break; + } + + outWidth = colorInfo[5] * 256 + colorInfo[6]; + outHeight = colorInfo[3] * 256 + colorInfo[4]; + + return true; + } + case 0xD8: + // SOI found + break; + case 0xD9: + isFound = true; + break; + default: + { + unsigned char skipbytes[2]; + + if (file.Read(skipbytes, sizeof(skipbytes)) != sizeof(skipbytes)) + { + isFound = true; + break; + } + + int skip = skipbytes[0] * 256 + skipbytes[1]; + file.Seek(Tizen::Io::FILESEEKPOSITION_CURRENT, skip - 2); + + break; + } + } + } + } + } + } + + return false; +} + +//////////////////////////////////////////////////////////////////////////////// + +bool SaveToBmp(const Canvas& canvas, const Tizen::Base::String& fileName) +{ + bool r = false; + BufferInfo bi; + + const_cast(&canvas)->Lock(bi); + + if (bi.bitsPerPixel == 32) + { + r = _SaveToBmpFromBuffer(static_cast(bi.pPixels), bi.width, bi.height, bi.pitch * 8 / bi.bitsPerPixel, fileName); + } + + const_cast(&canvas)->Unlock(); + + return r; +} + +bool SaveToBmp(const Bitmap& bitmap, const Tizen::Base::String& fileName) +{ + bool r = false; + BufferInfo bi; + + const_cast(&bitmap)->Lock(bi); + + if (bi.bitsPerPixel == 32) + { + r = _SaveToBmpFromBuffer(static_cast(bi.pPixels), bi.width, bi.height, bi.pitch * 8 / bi.bitsPerPixel, fileName); + } + + const_cast(&bitmap)->Unlock(); + + return r; +} + +//////////////////////////////////////////////////////////////////////////////// + +bool CanvasMaskingFromBitmap(Canvas& canvas, Bitmap& mask) +{ + BufferInfo dstBi; + BufferInfo srcBi; + + canvas.Lock(dstBi); + mask.Lock(srcBi); + + bool succeeded = _CompositeBufferFromMask(dstBi, srcBi, true); + + mask.Unlock(); + canvas.Unlock(); + + return succeeded; +} + +bool BitmapMaskingFromBitmap(Bitmap& bitmap, Bitmap& mask) +{ + BufferInfo dstBi; + BufferInfo srcBi; + + bitmap.Lock(dstBi); + mask.Lock(srcBi); + + bool succeeded = _CompositeBufferFromMask(dstBi, srcBi, false); + + mask.Unlock(); + bitmap.Unlock(); + + return succeeded; +} + +//////////////////////////////////////////////////////////////////////////////// + +bool ConvertToNonpremultiplied(Bitmap& bitmap) +{ + BufferInfo bi; + + if (bitmap.Lock(bi) != E_SUCCESS) + { + return false; + } + + bool result = false; + + do + { + if (bi.bitsPerPixel != 32) + { + result = true; + break; + } + + //if (!bitmap->isPremultiplied) + // return; + + typedef unsigned long DestPixel; + + DestPixel* p = static_cast(bi.pPixels); + long paddingBytes = bi.pitch - bi.width * bi.bitsPerPixel / 8; + + for (int y = 0; y < bi.height; y++) + { + for (int x = 0; x < bi.width; x++) + { + DestPixel a = (*p >> 24); + + if (a > 0 && a < 254) + { + a += (a >> 7); + + DestPixel r = (*p >> 8) & 0x0000FF00; + r = r / a; + r = (r > 255) ? 255 : r; + + DestPixel g = (*p >> 0) & 0x0000FF00; + g = g / a; + g = (g > 255) ? 255 : g; + + DestPixel b = (*p << 8) & 0x0000FF00; + b = b / a; + b = (b > 255) ? 255 : b; + + *p = (*p & 0xFF000000) | (r << 16) | (g << 8) | b; + } + + p++; + } + + p = reinterpret_cast(reinterpret_cast(p) + paddingBytes); + } + + result = true; + + } while (0); + + bitmap.Unlock(); + + return result; +} + +}}} // Tizen::Graphics::_Farm diff --git a/src/graphics/FGrp_Farm.h b/src/graphics/FGrp_Farm.h new file mode 100644 index 0000000..21b816e --- /dev/null +++ b/src/graphics/FGrp_Farm.h @@ -0,0 +1,88 @@ +// +// 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_Farm.h + * @brief This is the header file for the farm functions in Tizen::Graphics namespace. + * + */ + +#ifndef _FGRP_INTERNAL_FARM_H_ +#define _FGRP_INTERNAL_FARM_H_ + +#include +#include + +namespace Tizen { namespace Graphics { namespace _Farm +{ + +/* + int width; + int height; + bool r = _GetImageFileSize("/usr/share/media/image.jpg", width, height); +*/ +_OSP_EXPORT_ bool GetImageFileSize(const Tizen::Base::String fileName, int& outWidth, int& outHeight); + +/* + bool r = _SaveToBmp(canvas, "/usr/share/capture.bmp"); +*/ +_OSP_EXPORT_ bool SaveToBmp(const Canvas& canvas, const Tizen::Base::String& fileName); + +/* + bool r = _SaveToBmp(bitmap, "/usr/share/capture.bmp"); +*/ +_OSP_EXPORT_ bool SaveToBmp(const Bitmap& bitmap, const Tizen::Base::String& fileName); + +/* + Tizen::Media::Image image; + image.Construct(); + + Bitmap* pMask = image.DecodeN(APP_PATH(L"res/image_cover_mask.png"), BITMAP_PIXEL_FORMAT_ARGB8888); + + if (pMask) + { + _CanvasMaskingFromBitmap(canvas, *pMask); + delete pMask; + } +*/ +_OSP_EXPORT_ bool CanvasMaskingFromBitmap(Canvas& canvas, Bitmap& mask); + +/* + Tizen::Media::Image image; + image.Construct(); + + Bitmap* pMask = image.DecodeN(APP_PATH(L"res/image_cover_mask.png"), BITMAP_PIXEL_FORMAT_ARGB8888); + Bitmap* pBitmap = image.DecodeN(APP_PATH(L"res/image_cover_osp.png"), BITMAP_PIXEL_FORMAT_ARGB8888); + + if (pBitmap && pMask) + { + _BitmapMaskingFromBitmap(*pBitmap, *pMask); + + canvas.DrawBitmap(Point(100, 300), *pBitmap); + } + + delete pBitmap; + delete pMask; +*/ +_OSP_EXPORT_ bool BitmapMaskingFromBitmap(Bitmap& bitmap, Bitmap& mask); + +_OSP_EXPORT_ bool ConvertToNonpremultiplied(Bitmap& bitmap); + +}}} // Tizen::Graphics::_Farm + +#endif // _FGRP_INTERNAL_FARM_H_ + diff --git a/src/graphics/FGrp_Font.cpp b/src/graphics/FGrp_Font.cpp new file mode 100644 index 0000000..412a125 --- /dev/null +++ b/src/graphics/FGrp_Font.cpp @@ -0,0 +1,2828 @@ +// +// 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_Font.cpp + * @brief This is the implementation file for _Font class. + * + */ + +#include "FGrp_Font.h" +#include "FGrp_FontFt2.h" + +#include +#include + +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "FGrp_FontImpl.h" + +#include "FGrp_CanvasRasterOp.h" +#include "FGrp_FontRsrcManager.h" +#include "FGrp_FontBidiUtil.h" + +#include "FGrp_Canvas.h" + +#include "FGrp_FontPrivate.h" +#include "util/FGrp_UtilTemplate.h" + +//#define USE_FONTCONFIG +//#define APPLY_BOLD_SPACE +#define SYNCHRONIZATION_2_0 +#define __pNativeFont __sharedFont.get() + +#define GET_FONT_SIZE_PROPERTY(sizeProperty, rtnValue) \ + { \ + bool rtn = __pNativeFont->GetFontSizeProperty(sizeProperty); \ + SysTryReturn(NID_GRP, rtn, rtnValue, E_SYSTEM, "[E_SYSTEM] Failed to get font size property"); \ + } +#define GET_FONT_PROPERTY(property, rtnValue) \ + { \ + bool rtn = __pNativeFont->GetFontProperty(property); \ + SysTryReturn(NID_GRP, rtn, rtnValue, E_SYSTEM, "[E_SYSTEM] Failed to get font property"); \ + } +#define LOAD_GLYPH_DATA_CONST(character, pFontGlyphData, rtnValue) \ + { \ + _Font* pThis = const_cast <_Font*>(this); \ + bool rtn = pThis->LoadGlyph(character, &pFontGlyphData); \ + SysTryReturn(NID_GRP, rtn, rtnValue, E_SYSTEM, "[E_SYSTEM] Failed to load glyph data"); \ + } +#define UNLOAD_GLYPH_DATA_CONST(pFontGlyphData) \ + { \ + _Font* pThis = const_cast <_Font*>(this); \ + pThis->UnloadGlyph(&pFontGlyphData); \ + } +#define APPLY_ATTRIBUTE(rtnValue) \ + { \ + _Font* pFont = const_cast <_Font*>(this); \ + bool rtn = pFont->ApplyAttribute(); \ + SysTryReturn(NID_GRP, rtn, rtnValue, E_SYSTEM, "[E_SYSTEM] Failed to apply font attribute"); \ + } +#define SAMPLE_LANGUAGE_EMPTY "" + + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Base::Utility; +using namespace Tizen::Graphics; +using namespace Tizen::Io; +using namespace Tizen::System; + +namespace // unnamed +{ + +const _Util::FixedPoint26_6 _SYSTEM_DEFAULT_FONT_SIZE(16); +const long _MEDIUM_FONT_BOLD_WEIGHT = 600; + +template +inline void +_ExpandBounds(Type curX, Type curY, Type& x1, Type& y1, Type& x2, Type& y2) +{ + if (curX > x2) + { + x2 = curX; + } + + if (curX < x1) + { + x1 = curX; + } + + if (curY > y2) + { + y2 = curY; + } + + if (curY < y1) + { + y1 = curY; + } +} + +result +_GetSystemFontList(Tizen::Base::Collection::IList& list) +{ +#ifdef USE_FONTCONFIG + FcPattern* pPattern = null; + FcFontSet* pSet = null; + FcObjectSet* pObjectSet = null; + const char* pLang = null; + const char* fcStyle = "Regular"; + + pPattern = FcPatternCreate(); + SysTryCatch(NID_GRP, pPattern, , E_SYSTEM, "[E_SYSTEM] Failed to FcPatternCreate()"); + + // language and style + FcPatternAddString(pPattern, FC_STYLE, (FcChar8*)fcStyle); + + // RFC3066 formatted 2-level language identifier will be returned. + // e.g., en-NR, ar-SD, byn, tig etc. + // but, fontconfig only need 1-level language identifier having maximum 3 letters. + pLang = uloc_getDefault(); + + if (pLang != null) + { + char lang3Letters[4] = {0,}; + strncpy(lang3Letters, pLang, 3); + + for (int i = 0; i < 3; i++) + { + if (lang3Letters[i] == '-' || lang3Letters[i] == '_') + { + lang3Letters[i] = 0; + break; + } + } + + FcPatternAddString(pPattern, FC_LANG, (FcChar8*)lang3Letters); + } + + pObjectSet = FcObjectSetBuild(FC_FAMILY, FC_STYLE, FC_FILE, NULL); + SysTryCatch(NID_GRP, pObjectSet, , E_SYSTEM, "[E_SYSTEM] Failed to FcObjectSetBuild()"); + + pSet = FcFontList(NULL, pPattern, pObjectSet); + SysTryCatch(NID_GRP, pSet, , E_SYSTEM, "[E_SYSTEM] Failed to init fontconfig"); + + { + _FontRsrcManager& mgr = _FontRsrcManager::GetInstance(); + String defaultFontFaceName(mgr.GetDefaultSystemFont().GetFaceName()); + + bool defaultFontExists = false; + + list.RemoveAll(true); + FcChar8* pName = null; + + for (int i = 0; i < pSet->nfont; i++) + { + 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] Memory allocation failed."); + + list.Add(*pFamilyName); + + if (*pFamilyName == defaultFontFaceName) + { + defaultFontExists = true; + } + } + } + + if (defaultFontExists == false) + { + String* pDefaultFontName = new (std::nothrow) String(defaultFontFaceName); + SysTryCatch(NID_GRP, pDefaultFontName, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + list.InsertAt(*pDefaultFontName, 0); + } + } + + // destroy + FcFontSetDestroy(pSet); + FcObjectSetDestroy(pObjectSet); + FcPatternDestroy(pPattern); + + return E_SUCCESS; + +CATCH: + list.RemoveAll(true); + + // destroy, but before doing that check if those value has been created or not. + if (pSet) + { + FcFontSetDestroy(pSet); + } + + if (pObjectSet) + { + FcObjectSetDestroy(pObjectSet); + } + + if (pPattern) + { + FcPatternDestroy(pPattern); + } + + return GetLastResult(); + +#else + const String FONT_DIR_PATH[] = + { +// L"/usr/share/fallback_fonts", + L"/usr/share/fonts" + }; + + list.RemoveAll(true); + + const int FONT_DIR_PATH_COUNT = sizeof(FONT_DIR_PATH) / sizeof(FONT_DIR_PATH[0]); + + for (int i = 0; i < FONT_DIR_PATH_COUNT; i++) + { + Directory directory; + + result r = directory.Construct(FONT_DIR_PATH[i]); + + if (!IsFailed(r)) + { + std::auto_ptr dirEnumerator(directory.ReadN()); + + while (dirEnumerator->MoveNext() == E_SUCCESS) + { + DirEntry entry = dirEnumerator->GetCurrentDirEntry(); + + if (entry.IsDirectory() == false && entry.IsHidden() == false) + { + Tizen::Base::Utility::StringTokenizer formatTok(entry.GetName(), "."); + String token; + + while (formatTok.GetTokenCount()) + { + formatTok.GetNextToken(token); + } + + if (token.Equals("ttf",false) || token.Equals("ttc",false)) + { + String fullName; + fullName.Append(FONT_DIR_PATH[i]); + fullName.Append(L"/"); + fullName.Append(entry.GetName()); + + 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] Memory allocation failed."); + + for (int idx = 0; idx < list.GetCount(); idx++) + { + String* pName = static_cast (list.GetAt(idx)); + + if (pName == null) + { + continue; + } + + if (*pName == *pFamilyName) + { + isNewFont = false; + break; + } + } + + if (isNewFont) + { + list.Add(*pFamilyName); + } + else + { + delete pFamilyName; + } + } + } + } + } + } + + return E_SUCCESS; + +CATCH: + + list.RemoveAll(true); + + return GetLastResult(); + +#endif +} + +typedef Tizen::Graphics::_Font::SystemPixel _SystemPixel; +typedef Tizen::Graphics::_Util::ScratchPad<_SystemPixel> _ScratchPad32; + + +unsigned long +_ComposeColor(unsigned long color32, int opacity) +{ + unsigned char alpha = (unsigned char) (((color32) >> 24)); + unsigned char red = (unsigned char) (((color32) >> 16)); + unsigned char green = (unsigned char) (((color32) >> 8)); + unsigned char blue = (unsigned char) ((color32)); + + alpha = (unsigned char) ((alpha * opacity + 255) >> 8); + red = (unsigned char) ((red * opacity + 255) >> 8); + green = (unsigned char) ((green * opacity + 255) >> 8); + blue = (unsigned char) ((blue * opacity + 255) >> 8); + + return (unsigned long) (((unsigned long) (alpha) << 24) | ((unsigned long) (red) << 16) | ((unsigned long) (green) << 8) | (unsigned long) (blue)); +} + +void +_SetColor(cairo_t* pCairo, unsigned long composedColor) +{ + double a = ((composedColor >> 24) & 0xFF) * 1.0 / 255.0; + double r = ((composedColor >> 16) & 0xFF) * 1.0 / 255.0; + double g = ((composedColor >> 8) & 0xFF) * 1.0 / 255.0; + double b = ((composedColor >> 0) & 0xFF) * 1.0 / 255.0; + + cairo_set_source_rgba(pCairo, r, g, b, a); +} + +template +inline T +_TempMin(T a, T b) +{ + return (a < b) ? a : b; +} +#define BLEND_ALPHA_COMPONEMT(srcA, dstA) (_TempMin ((srcA) + (dstA) - (((srcA) * (dstA)) >> 8), 0xFF)); + +struct _NativeGfxEngine +{ + cairo_t* pCairo; + cairo_surface_t* pCairoSurface; + + _NativeGfxEngine() + : pCairo(0) + , pCairoSurface(0) + { + } + ~_NativeGfxEngine() + { + if (pCairo) + { + cairo_destroy(pCairo); + } + + if (pCairoSurface) + { + cairo_surface_destroy(pCairoSurface); + } + + } +}; + +// ISO 15924 +const char* _SampleLanguages[] = +{ + SAMPLE_LANGUAGE_EMPTY, // G_UNICODE_SCRIPT_COMMON + SAMPLE_LANGUAGE_EMPTY, // G_UNICODE_SCRIPT_INHERITED + "ar", // G_UNICODE_SCRIPT_ARABIC + "hy", // G_UNICODE_SCRIPT_ARMENIAN + "bn", // G_UNICODE_SCRIPT_BENGALI + SAMPLE_LANGUAGE_EMPTY, // G_UNICODE_SCRIPT_BOPOMOFO + "chr", // G_UNICODE_SCRIPT_CHEROKEE + "cop", // G_UNICODE_SCRIPT_COPTIC + "ru", // G_UNICODE_SCRIPT_CYRILLIC + SAMPLE_LANGUAGE_EMPTY, // G_UNICODE_SCRIPT_DESERET + "hi", // G_UNICODE_SCRIPT_DEVANAGARI + "am", // G_UNICODE_SCRIPT_ETHIOPIC + "ka", // G_UNICODE_SCRIPT_GEORGIAN + SAMPLE_LANGUAGE_EMPTY, // G_UNICODE_SCRIPT_GOTHIC + "el", // G_UNICODE_SCRIPT_GREEK + "gu", // G_UNICODE_SCRIPT_GUJARATI + "pa", // G_UNICODE_SCRIPT_GURMUKHI + "zh", // G_UNICODE_SCRIPT_HAN + "ko", // G_UNICODE_SCRIPT_HANGUL + "he", // G_UNICODE_SCRIPT_HEBREW + "ja", // G_UNICODE_SCRIPT_HIRAGANA + "kn", // G_UNICODE_SCRIPT_KANNADA + "ja", // G_UNICODE_SCRIPT_KATAKANA + "km", // G_UNICODE_SCRIPT_KHMER + "lo", // G_UNICODE_SCRIPT_LAO + "en", // G_UNICODE_SCRIPT_LATIN + "ml", // G_UNICODE_SCRIPT_MALAYALAM + "mn", // G_UNICODE_SCRIPT_MONGOLIAN + "my", // G_UNICODE_SCRIPT_MYANMAR + SAMPLE_LANGUAGE_EMPTY, // G_UNICODE_SCRIPT_OGHAM + SAMPLE_LANGUAGE_EMPTY, // G_UNICODE_SCRIPT_OLD_ITALIC + "or", // G_UNICODE_SCRIPT_ORIYA + SAMPLE_LANGUAGE_EMPTY, // G_UNICODE_SCRIPT_RUNIC + "si", // G_UNICODE_SCRIPT_SINHALA + "syr", // G_UNICODE_SCRIPT_SYRIAC + "ta", // G_UNICODE_SCRIPT_TAMIL + "te", // G_UNICODE_SCRIPT_TELUGU + "dv", // G_UNICODE_SCRIPT_THAANA + "th", // G_UNICODE_SCRIPT_THAI + "bo", // G_UNICODE_SCRIPT_TIBETAN + "iu", // G_UNICODE_SCRIPT_CANADIAN_ABORIGINAL + SAMPLE_LANGUAGE_EMPTY, // G_UNICODE_SCRIPT_YI + "tl", // G_UNICODE_SCRIPT_TAGALOG + "hnn", // G_UNICODE_SCRIPT_HANUNOO + "bku", // G_UNICODE_SCRIPT_BUHID + "tbw", // G_UNICODE_SCRIPT_TAGBANWA + SAMPLE_LANGUAGE_EMPTY, // G_UNICODE_SCRIPT_BRAILLE + SAMPLE_LANGUAGE_EMPTY, // G_UNICODE_SCRIPT_CYPRIOT + SAMPLE_LANGUAGE_EMPTY, // G_UNICODE_SCRIPT_LIMBU + SAMPLE_LANGUAGE_EMPTY, // G_UNICODE_SCRIPT_OSMANYA + SAMPLE_LANGUAGE_EMPTY, // G_UNICODE_SCRIPT_SHAVIAN + SAMPLE_LANGUAGE_EMPTY, // G_UNICODE_SCRIPT_LINEAR_B + SAMPLE_LANGUAGE_EMPTY, // G_UNICODE_SCRIPT_TAI_LE + "uga", // G_UNICODE_SCRIPT_UGARITIC + SAMPLE_LANGUAGE_EMPTY, // G_UNICODE_SCRIPT_NEW_TAI_LUE + "bug", // G_UNICODE_SCRIPT_BUGINESE + SAMPLE_LANGUAGE_EMPTY, // G_UNICODE_SCRIPT_GLAGOLITIC + SAMPLE_LANGUAGE_EMPTY, // G_UNICODE_SCRIPT_TIFINAGH + "syl", // G_UNICODE_SCRIPT_SYLOTI_NAGRI + "peo", // G_UNICODE_SCRIPT_OLD_PERSIAN + SAMPLE_LANGUAGE_EMPTY, // G_UNICODE_SCRIPT_KHAROSHTHI + SAMPLE_LANGUAGE_EMPTY, // G_UNICODE_SCRIPT_UNKNOWN + SAMPLE_LANGUAGE_EMPTY, // G_UNICODE_SCRIPT_BALINESE + SAMPLE_LANGUAGE_EMPTY, // G_UNICODE_SCRIPT_CUNEIFORM + SAMPLE_LANGUAGE_EMPTY, // G_UNICODE_SCRIPT_PHOENICIAN + SAMPLE_LANGUAGE_EMPTY, // G_UNICODE_SCRIPT_PHAGS_PA + "nqo" // G_UNICODE_SCRIPT_NKO +}; + +const int _sampleLanguageCount = sizeof(_SampleLanguages) / sizeof(_SampleLanguages[0]); + +struct _TextFragment +{ + _Util::String textFragment; + _IFont* pUsingFont; + + _TextFragment(const _Util::String& string, _IFont* pFont) + : textFragment(string) + , pUsingFont(pFont) + { + } +}; + +} + + +namespace Tizen { namespace Graphics { namespace _Util +{ + +template <> +inline Tizen::Graphics::_TextBidiProperty::BidiHint Convert(const Tizen::Graphics::TextBidiHint& bidiHint) +{ + switch (bidiHint) + { + case TEXT_BIDI_HINT_LTR: + return _TextBidiProperty::BIDI_HINT_LTR; + case TEXT_BIDI_HINT_RTL: + return _TextBidiProperty::BIDI_HINT_RTL; + default: + return _TextBidiProperty::BIDI_HINT_NONE; + } +} + +}}} // Tizen::Graphics::_Util + + +namespace Tizen { namespace Graphics +{ + +_Font::_Font() + : __magicKey(0) +{ + __fontAttrib.Init(); + + _Util::CarveMagicKey(*this, __magicKey); +} + +_Font::_Font(const _Font& obj) + : __magicKey(0) +{ + this->__fontAttrib = obj.__fontAttrib; + this->__sharedFont = obj.__sharedFont; + + _Util::CarveMagicKey(*this, __magicKey); +} + +_Font::~_Font(void) +{ + _Util::EraseMagicKey(*this, __magicKey); +} + +result +_Font::Construct(int style, _Util::FixedPoint26_6 pcSize) +{ + _FontRsrcManager& mgr = _FontRsrcManager::GetInstance(); + + // use default system font + _FontRsrcManager::SharedFontResource out; + result r = mgr.GetFont(style, pcSize, out); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Failed to get system default font", GetErrorMessage(r)); + + // assign it + __sharedFont = out; + __UpdateFontAttribute(style, pcSize); + + return E_SUCCESS; +} + +result +_Font::Construct(const Tizen::Base::String& fontName, int style, _Util::FixedPoint26_6 pcSize, bool isPathEnabled) +{ + bool systemFont = false; + String appFontPath = L""; + result r = E_SUCCESS; + + _FontRsrcManager& mgr = _FontRsrcManager::GetInstance(); + _FontRsrcManager::SharedFontResource out; + + if (!Tizen::App::_AppInfo::IsOspCompat()) + { + _Util::WString fontNameTemp(fontName.GetPointer()); + _Util::WString appFontPathTemp(mgr.FindAppFontName(fontNameTemp)); + appFontPath.Append(appFontPathTemp.c_str()); + } + + // check if user want to use a app font + if (!appFontPath.IsEmpty()) + { + r = mgr.GetFont(appFontPath, style, pcSize, out); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Failed to get app font", GetErrorMessage(r)); + } + else + { + IList* pList = GetSystemFontListN(); + int idx = 0; + + if (pList) + { + for (idx = 0; idx < pList->GetCount(); idx++) + { + String* pName = static_cast (pList->GetAt(idx)); + + if (pName == null) + { + continue; + } + + if (*pName == fontName) + { + systemFont = true; + break; + } + } + + pList->RemoveAll(true); + delete pList; + } + + if (systemFont) + { + r = mgr.GetSystemFont(fontName, style, pcSize, out); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Failed to get system font", GetErrorMessage(r)); + } + else if (isPathEnabled) + { + r = mgr.GetFont(fontName, style, pcSize, out); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Failed to get font", GetErrorMessage(r)); + } + } + + // assign it + __sharedFont = out; + __UpdateFontAttribute(style, pcSize); + + return E_SUCCESS; +} + +result +_Font::Construct(const Tizen::Base::ByteBuffer& fontData, int style, _Util::FixedPoint26_6 pcSize) +{ + _FontRsrcManager& mgr = _FontRsrcManager::GetInstance(); + + const byte* pBuffer = fontData.GetPointer(); + int buffSize = fontData.GetLimit(); + + _FontRsrcManager::SharedFontResource out; + result r = mgr.GetFont(pBuffer, buffSize, style, pcSize, out); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Failed to get system font", GetErrorMessage(r)); + + // assign it + __sharedFont = out; + __UpdateFontAttribute(style, pcSize); + + return E_SUCCESS; +} + +bool +_Font::IsConstructed(void) const +{ + return (__sharedFont.get() != null); +} + +_Util::FixedPoint26_6 +_Font::GetMaxHeight(void) const +{ + return __fontAttrib.maxHeight; +} + +_Util::FixedPoint26_6 +_Font::GetMaxWidth(void) const +{ + return __fontAttrib.maxWidth; +} + +_Util::FixedPoint26_6 +_Font::GetAscender(void) const +{ + return __fontAttrib.ascender; +} + +_Util::FixedPoint26_6 +_Font::GetDescender(void) const +{ + return __fontAttrib.descender; +} + +result +_Font::GetLeftBear(wchar_t character, _Util::FixedPoint22_10& leftBear) const +{ + APPLY_ATTRIBUTE(-1); + + _IFont::Glyph* pFontGlyphData = null; + LOAD_GLYPH_DATA_CONST(character, pFontGlyphData, E_SYSTEM); + + // left bear is Glyph::xOffset, set it + leftBear = pFontGlyphData->xOffset; + + UNLOAD_GLYPH_DATA_CONST(pFontGlyphData); + + return E_SUCCESS; +} + +result +_Font::GetRightBear(wchar_t character, _Util::FixedPoint22_10& rightBear) const +{ + APPLY_ATTRIBUTE(-1); + + _IFont::Glyph* pFontGlyphData = null; + LOAD_GLYPH_DATA_CONST(character, pFontGlyphData, E_SYSTEM); + + // right bear is Glyph::xOffset + GlyphBitmap::width, set it + rightBear = pFontGlyphData->xOffset + _Util::FixedPoint22_10(pFontGlyphData->image.width); + + UNLOAD_GLYPH_DATA_CONST(pFontGlyphData); + + return E_SUCCESS; +} + +bool +_Font::IsBold(void) const +{ + return ((__fontAttrib.style & FONT_STYLE_BOLD) ? true : false); +} + +bool +_Font::IsItalic(void) const +{ + return ((__fontAttrib.style & FONT_STYLE_ITALIC) ? true : false); +} + +bool +_Font::IsPlain(void) const +{ + return ((__fontAttrib.style & FONT_STYLE_PLAIN) ? true : false); +} + +bool +_Font::IsStrikeOut(void) const +{ + return __fontAttrib.strikeout; +} + +bool +_Font::IsUnderlined(void) const +{ + return __fontAttrib.underline; +} + +_Util::FixedPoint26_6 +_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) +{ + __fontAttrib.strikeout = strikeout; +} + +void +_Font::SetUnderline(bool underline) +{ + __fontAttrib.underline = underline; +} + +void +_Font::SetCharSpace(int pc_space) +{ + __fontAttrib.charSpace = pc_space; +} + +int +_Font::GetCharSpace(void) const +{ + return __fontAttrib.charSpace; +} + +int +_Font::GetLineThickness(void) const +{ + return __fontAttrib.lineThickness; +} + +Tizen::Base::String +_Font::GetFaceName(void) const +{ + _IFont::Property property; + GET_FONT_PROPERTY(property, String()); + + return ((property.pFamilyName) ? String(property.pFamilyName) : String()); +} + +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] 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 +_Font::GetFaceName(const Tizen::Base::String& filePath) +{ + _FontRsrcManager& mgr = _FontRsrcManager::GetInstance(); + _FontRsrcManager::SharedFontResource out; + String faceName; + + result r = mgr.GetTempFont(filePath, FONT_STYLE_PLAIN, _SYSTEM_DEFAULT_FONT_SIZE, out); + SysTryReturn(NID_GRP, r == E_SUCCESS, faceName, r, "[%s] Failed to get font", GetErrorMessage(r)); + + if (r == E_SUCCESS) + { + _IFont* pTempFont = out.get(); + + _IFont::Property property; + pTempFont->GetFontProperty(property); + faceName = String(property.pFamilyName); + } + + return faceName; +} + +_IFont* +_Font::GetNativeFont(void) const +{ + return __pNativeFont; +} + +_Font* +_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] Memory allocation failed."); + + // done + return pNativeFont; +} + +bool +_Font::ApplyAttribute() +{ + _IFont::Attrib fontAttrib; + bool rtn = __pNativeFont->GetAttrib(fontAttrib); + SysTryReturn(NID_GRP, rtn, false, E_SYSTEM, "[E_SYSTEM] Failed to get font attribute"); + + fontAttrib.size = __fontAttrib.size; + fontAttrib.style = _IFont::STYLE_NONE; + 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"); + + return true; +} + +result +_Font::GetTextExtent(int width, const _Util::String& text, bool outline, int& count, Dimension& pcDim) const +{ + if (text.pStart == null) + { + pcDim.SetSize(0, 0); + count = 0; + SysTryReturn(NID_GRP, false, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] The given string is invalid."); + } + + if (text.length <= 0) + { + pcDim.SetSize(0, 0); + count = 0; + return E_SUCCESS; + } + + if (_GetTextBidiHint() != TEXT_BIDI_HINT_RTL) + { + result r = this->__GetTextExtentEx(width, text, outline, count, pcDim); + + if (r == E_SUCCESS) + { + return r; + } + } + + _TextBidiPropertyWithReorder bidiProperty(text.pStart, text.length, _Util::Convert(_GetTextBidiHint())); + + if (bidiProperty.HasComplexText()) + { + typedef _Util::AccumList<_Util::Pair > GapList; + + GapList gapList; + + result r = this->__GetTextExtentList(bidiProperty, gapList); + + if (r != E_SUCCESS) + { + return r; + } + + int left = 0; + int right = 0; + int determinedCount = -1; + + for (GapList::Iterator i = gapList.Begin(); i != gapList.End(); ++i) + { + left = (i->first < left) ? i->first : left; + right = (i->second > right) ? i->second : right; + + if (determinedCount < 0 && i->first < width && i->second >= width) + { + if (i != gapList.Begin()) + { + if (i - gapList.Begin() - 1 < text.length) + { + determinedCount = bidiProperty.pBidiIndex[i - gapList.Begin() - 1]; + } + else + { + determinedCount = text.length; + } + } + else + { + determinedCount = bidiProperty.pBidiIndex[0]; + } + } + } + + if (right - left <= width) + { + pcDim.SetSize(right - left, __fontAttrib.size.ToInt()); + count = text.length; + } + else if (determinedCount > 0 && right - left > 0) + { + int expectedValue = width * text.length / (right - left); + int tolerance = _Util::Abs(expectedValue - determinedCount); + tolerance = (tolerance == 0) ? 2 : tolerance; + + int tempCount = expectedValue <= determinedCount ? determinedCount + tolerance : determinedCount + (tolerance * 2); + tempCount = tempCount > text.length ? text.length : tempCount; + + tempCount++; + + while (right - left > width) + { + _TextBidiPropertyWithReorder determinedBidiProperty(text.pStart, --tempCount, _Util::Convert(_GetTextBidiHint())); + + GapList determinedGapList; + + result r = this->__GetTextExtentList(determinedBidiProperty, determinedGapList); + + if (r != E_SUCCESS) + { + return r; + } + + left = 0; + right = 0; + + for (GapList::Iterator i = determinedGapList.Begin(); i != determinedGapList.End(); ++i) + { + left = (i->first < left) ? i->first : left; + right = (i->second > right) ? i->second : right; + } + } + + pcDim.SetSize(right - left, __fontAttrib.size.ToInt()); + count = tempCount; + } + else + { + pcDim.SetSize(0, 0); + count = 0; + } + + return E_SUCCESS; + } + else + { + return this->__GetTextExtent(width, text, outline, count, pcDim); + } + + return E_SUCCESS; +} + +result +_Font::__GetTextExtentEx(int width, const _Util::String& text, bool outline, int& count, Dimension& pcDim) const +{ + int preX1 = 0x7FFFFFFF; + int preY1 = 0x7FFFFFFF; + int preX2 = -0x7FFFFFFF; + int preY2 = -0x7FFFFFFF; + + int x1 = 0x7FFFFFFF; + int y1 = 0x7FFFFFFF; + int x2 = -0x7FFFFFFF; + int y2 = -0x7FFFFFFF; + + int curX = 0; + int curY = 0; + + int characters = 0; + int italicSpace = 0; + int boldSpace = 0; + + long xVec = 0; + long yVec = 0; + int left = 0; + wchar_t leftChar = 0; + + _IFont::Glyph* pFontGlyphData = 0; + + _Font* pThis = const_cast <_Font*>(this); + + APPLY_ATTRIBUTE(E_SYSTEM); + + { + _IFont::SizeProperty sizeProperty; + GET_FONT_SIZE_PROPERTY(sizeProperty, E_SYSTEM); + + if (__fontAttrib.style & FONT_STYLE_ITALIC) + { + italicSpace = (sizeProperty.ascender.ToInt() * 2) >> 4; + } + } + + _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; + + while (*pText && --length >= 0) + { + { + FriBidiCharType type = fribidi_get_bidi_type((FriBidiChar) *pText); + + GUnicodeScript script = g_unichar_get_script(*pText); + + if (FRIBIDI_IS_LETTER(type) && FRIBIDI_IS_RTL(type)) + { + return E_SYSTEM; + } + else if (script == G_UNICODE_SCRIPT_DEVANAGARI || script == G_UNICODE_SCRIPT_BENGALI) + { + return E_SYSTEM; + } + } + + // getting proper _Font instance for the specified text + _IFont* pFont = pThis->__GetFont(*pText); + + if (pFont != __pNativeFont) + { + _IFont::Attrib fontAttrib; + bool rtn = pFont->GetAttrib(fontAttrib); + //SysTryReturn(NID_GRP, rtn, false, E_SYSTEM, "[E_SYSTEM] Failed to get font attribute"); + + fontAttrib.size = __fontAttrib.size; + fontAttrib.style = _IFont::STYLE_NONE; + 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"); + } + + if (left > 0) + { + if (pFont->GetKerning(leftChar, *pText, xVec, yVec)) + { + curX += xVec; + } + } + + if (pFont->LoadGlyph(*pText++, &pFontGlyphData)) + { + int glyphBoundX1 = curX; + int glyphBoundY1 = curY - pFontGlyphData->yOffset.ToInt(); + int glyphBoundX2 = glyphBoundX1 + + ((pFontGlyphData->image.width <= 0) ? pFontGlyphData->xAdvance.ToInt() + : (pFontGlyphData->xOffset.ToInt() + pFontGlyphData->image.width)); + int glyphBoundY2 = glyphBoundY1 + pFontGlyphData->image.height; + +#ifdef SYNCHRONIZATION_2_0 + // adjusting x2 bounds for synchronizing fuctionality with 2.0 + glyphBoundX2 = glyphBoundX1 + pFontGlyphData->xAdvance.ToInt() + boldSpace; +#endif + if (outline) + { + glyphBoundX1 -= 1; + glyphBoundY1 -= 1; + glyphBoundX2 += 1; + glyphBoundY2 += 1; + } + + _ExpandBounds(glyphBoundX1, glyphBoundY1, x1, y1, x2, y2); + _ExpandBounds(glyphBoundX2, glyphBoundY1, x1, y1, x2, y2); + _ExpandBounds(glyphBoundX1, glyphBoundY2, x1, y1, x2, y2); + _ExpandBounds(glyphBoundX2, glyphBoundY2, x1, y1, x2, y2); + + curX += pFontGlyphData->xAdvance.ToInt() + __fontAttrib.charSpace + boldSpace; + curY += pFontGlyphData->yAdvance.ToInt(); + + pFont->UnloadGlyph(&pFontGlyphData); + + // check end condition + // TODO, shkim, BIDI need to be cared + if ((x2 - x1) > width) + { + break; + } + + preX1 = x1; + preY1 = y1; + preX2 = x2; + preY2 = y2; + characters++; + left++; + leftChar = *(pText - 1); + } + } + + if (characters == 0) + { + pcDim.SetSize(0, 0); + count = 0; + return E_SUCCESS; + } + + 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 + italicSpace; +#ifdef SYNCHRONIZATION_2_0 + pcDim.height = __fontAttrib.size.ToInt(); +#else + pcDim.height = preY2 - preY1; +#endif // SYNCHRONIZATION_2_0 + + return E_SUCCESS; + +CATCH: + return E_SYSTEM; +} + +result +_Font::__GetTextExtent(int width, const _Util::String& text, bool outline, int& count, Dimension& pcDim) const +{ + int preX1 = 0x7FFFFFFF; + int preY1 = 0x7FFFFFFF; + int preX2 = -0x7FFFFFFF; + int preY2 = -0x7FFFFFFF; + + int x1 = 0x7FFFFFFF; + int y1 = 0x7FFFFFFF; + int x2 = -0x7FFFFFFF; + int y2 = -0x7FFFFFFF; + + int curX = 0; + int curY = 0; + + int characters = 0; + int italicSpace = 0; + int boldSpace = 0; + + long xVec = 0; + long yVec = 0; + int left = 0; + wchar_t leftChar = 0; + + _IFont::Glyph* pFontGlyphData = 0; + + if (text.length == 0) + { + count = 0; + pcDim.SetSize(0, 0); + return E_SUCCESS; + } + + _Font* pThis = const_cast <_Font*>(this); + + APPLY_ATTRIBUTE(E_SYSTEM); + + { + _IFont::SizeProperty sizeProperty; + GET_FONT_SIZE_PROPERTY(sizeProperty, E_SYSTEM); + + if (__fontAttrib.style & FONT_STYLE_ITALIC) + { + italicSpace = (sizeProperty.ascender.ToInt() * 2) >> 4; + } + } + +#ifdef APPLY_BOLD_SPACE + _IFont::Property property; + GET_FONT_PROPERTY(property, false); + + 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; + + while (*pText && --length >= 0) + { + // getting proper _Font instance for the specified text + _IFont* pFont = pThis->__GetFont(*pText); + + if (pFont != __pNativeFont) + { + _IFont::Attrib fontAttrib; + bool rtn = pFont->GetAttrib(fontAttrib); + //SysTryReturn(NID_GRP, rtn, false, E_SYSTEM, "[E_SYSTEM] Failed to get font attribute"); + + fontAttrib.size = __fontAttrib.size; + fontAttrib.style = _IFont::STYLE_NONE; + 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"); + } + + if (left > 0) + { + if (pFont->GetKerning(leftChar, *pText, xVec, yVec)) + { + curX += xVec; + } + } + + if (pFont->LoadGlyph(*pText++, &pFontGlyphData)) + { + int glyphBoundX1 = curX; + int glyphBoundY1 = curY - pFontGlyphData->yOffset.ToInt(); + int glyphBoundX2 = glyphBoundX1 + + ((pFontGlyphData->image.width <= 0) ? pFontGlyphData->xAdvance.ToInt() + : (pFontGlyphData->xOffset.ToInt() + pFontGlyphData->image.width)); + int glyphBoundY2 = glyphBoundY1 + pFontGlyphData->image.height; + +#ifdef SYNCHRONIZATION_2_0 + // adjusting x2 bounds for synchronizing fuctionality with 2.0 + glyphBoundX2 = glyphBoundX1 + pFontGlyphData->xAdvance.ToInt() + boldSpace; +#endif + if (outline) + { + glyphBoundX1 -= 1; + glyphBoundY1 -= 1; + glyphBoundX2 += 1; + glyphBoundY2 += 1; + } + + _ExpandBounds(glyphBoundX1, glyphBoundY1, x1, y1, x2, y2); + _ExpandBounds(glyphBoundX2, glyphBoundY1, x1, y1, x2, y2); + _ExpandBounds(glyphBoundX1, glyphBoundY2, x1, y1, x2, y2); + _ExpandBounds(glyphBoundX2, glyphBoundY2, x1, y1, x2, y2); + + curX += pFontGlyphData->xAdvance.ToInt() + __fontAttrib.charSpace + boldSpace; + curY += pFontGlyphData->yAdvance.ToInt(); + + pFont->UnloadGlyph(&pFontGlyphData); + + // check end condition + // TODO, shkim, BIDI need to be cared + if ((x2 - x1) > width) + { + break; + } + + preX1 = x1; + preY1 = y1; + preX2 = x2; + preY2 = y2; + characters++; + left++; + leftChar = *(pText - 1); + } + } + + if (characters == 0) + { + pcDim.SetSize(0, 0); + count = 0; + return E_SUCCESS; + } + + 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 + italicSpace; +#ifdef SYNCHRONIZATION_2_0 + pcDim.height = __fontAttrib.size.ToInt(); +#else + pcDim.height = preY2 - preY1; +#endif // SYNCHRONIZATION_2_0 + + return E_SUCCESS; + +CATCH: + return E_SYSTEM; +} + +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; + + while (pText < pTextEnd) + { + if (*pText == 0x0D || *pText == 0x0A) + { + pTextEnd = pText; + break; + } + + ++pText; + } + + return this->GetTextExtent(width, _Util::String(text.pStart, pTextEnd - text.pStart), outline, count, dim); +} + +result +_Font::__GetTextExtentList(const _Util::String& text, _Util::AccumList<_Util::Pair >& outList) const +{ + outList.Clear(); + + _Font* pThis = const_cast <_Font*>(this); + + APPLY_ATTRIBUTE(E_SYSTEM); + + int italicSpace = 0; + int boldSpace = 0; + +#ifdef SYNCHRONIZATION_2_0 + { + _IFont::SizeProperty sizeProperty; + + GET_FONT_SIZE_PROPERTY(sizeProperty, E_SYSTEM); + + if (__fontAttrib.style & FONT_STYLE_ITALIC) + { + italicSpace = (sizeProperty.ascender.ToInt() * 2) >> 4; + } + } +#endif + +#ifdef APPLY_BOLD_SPACE + _IFont::Property property; + GET_FONT_PROPERTY(property, false); + + if (__fontAttrib.style & FONT_STYLE_BOLD && property.weightClass < _MEDIUM_FONT_BOLD_WEIGHT) + { + _IFont::Attrib attr; + + if (pThis->GetAttrib(attr)) + { + boldSpace = static_cast(attr.boldWeight.ToFloat() + 0.5f); + } + } +#endif + + int curX = 0; + int curY = 0; + wchar_t prevChar = 0; + + const wchar_t* pText = text.pStart; + int length = text.length; + + --pText; + + while (*(++pText) && --length >= 0) + { + _IFont* pFont = pThis->__GetFont(*pText); + + if (pFont) + { + if (pFont != __pNativeFont) + { + _IFont::Attrib fontAttrib; + + if (pFont->GetAttrib(fontAttrib)) + { + fontAttrib.size = __fontAttrib.size; + fontAttrib.style = _IFont::STYLE_NONE; + 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); + } + } + + _IFont::Glyph* pFontGlyphData = 0; + + if (pFont->LoadGlyph(*pText, &pFontGlyphData)) + { + // When LoadGlyph fails continuously in the original code, there is a problem to check the kerning on the results of the previous prevChar + if (prevChar > 0) + { + long xVec = 0; + long yVec = 0; + + if (pFont->GetKerning(prevChar, *pText, xVec, yVec)) + { + curX += xVec; + } + } + + int prevX = curX; + + curX += pFontGlyphData->xAdvance.ToInt() + __fontAttrib.charSpace + boldSpace; + curY += pFontGlyphData->yAdvance.ToInt(); + + pFont->UnloadGlyph(&pFontGlyphData); + + prevChar = *pText; + outList.Push(_Util::MakePair(prevX, curX)); + + continue; + } + } + + // Cannot determine a glyph extent + prevChar = 0; + outList.Push(_Util::MakePair(curX, curX)); + } + + return E_SUCCESS; +} + +result +_Font::__GetTextExtentList(_TextBidiPropertyWithReorder& bidiProperty, _Util::AccumList<_Util::Pair >& outList) const +{ + if (bidiProperty.length <= 0) + { + outList.Clear(); + + return E_SUCCESS; + } + + _Util::AccumList<_Util::Pair > tempList; + + { + int xDest = 0; + int yDest = 0; + + int length = bidiProperty.length; + + _Font* pThis = const_cast <_Font*>(this); + + pThis->ApplyAttribute(); + + const wchar_t* pReorderedText = bidiProperty.GetReorderedText(); + + const wchar_t* pTextFragmentBegin = pReorderedText; + const wchar_t* pTextFragmentEnd = pTextFragmentBegin + length; + + const wchar_t* pTextSegment = pTextFragmentBegin; + + _IFont* pBaseFont = pThis->__GetFont(*pTextSegment); + + _Util::AccumList<_TextFragment> textFragmentList; + + while (pTextSegment < pTextFragmentEnd) + { + if (pBaseFont->CheckGlyph(*pTextSegment) == 0) + { + _IFont* pFallbackFont = pThis->__GetFont(*pTextSegment); + + if (pBaseFont != pFallbackFont) + { + textFragmentList.Push(_TextFragment(_Util::String(pTextFragmentBegin, pTextSegment - pTextFragmentBegin), pBaseFont)); + + pTextFragmentBegin = pTextSegment; + pBaseFont = pFallbackFont; + } + } + + ++pTextSegment; + } + + textFragmentList.Push(_TextFragment(_Util::String(pTextFragmentBegin, pTextSegment - pTextFragmentBegin), pBaseFont)); + + /* + * - In case of LTR + * for (_Util::AccumList<_TextFragment>::Iterator textFragment = textFragmentList.Begin(); textFragment != textFragmentList.End(); ++textFragment) + * + * - In case of RTL + * for (_Util::AccumList<_TextFragment>::Iterator textFragment = textFragmentList.End(); textFragment != textFragmentList.Begin(); ) + * { + * --textFragment; + * + */ + + for (_Util::AccumList<_TextFragment>::Iterator textFragment = textFragmentList.Begin(); textFragment != textFragmentList.End(); ++textFragment) + { + if (textFragment->pUsingFont == null || textFragment->textFragment.length <= 0) + { + continue; + } + + if (textFragment->pUsingFont != __pNativeFont) + { + _IFont::Attrib fontAttrib; + + if (textFragment->pUsingFont->GetAttrib(fontAttrib)) + { + fontAttrib.size = __fontAttrib.size; + fontAttrib.style = _IFont::STYLE_NONE; + 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); + } + } + + Tizen::Base::Collection::ArrayListT<_IFont::Glyph *> glyphList; + + const wchar_t firstChar = *textFragment->textFragment.pStart; + + GUnicodeScript script = _TextBidiUtil::GetUnicodeScript(firstChar); + // need to check if (script < 0 || script >= _sampleLanguageCount) ? + + textFragment->pUsingFont->GetGlyphList(textFragment->textFragment, glyphList, script); + + int count = glyphList.GetCount(); + + for (int i = 0; i < count; i++) + { + _IFont::Glyph *pGlyph = 0; + + glyphList.GetAt(i, pGlyph); + + // bug fixed in test case of L"\x9a8\x20\x981\x9a0\x635" + //if (pGlyph->xAdvance == 0 && pGlyph->image.width == 0) + //{ + // continue; + //} + + int prevX = xDest; + + xDest += pGlyph->xAdvance.ToInt(); + yDest += pGlyph->yAdvance.ToInt(); + + tempList.Push(_Util::MakePair(prevX, xDest)); + outList.Push(_Util::MakePair(-1, -1)); + } + + IEnumeratorT<_IFont::Glyph*>* pEnum = glyphList.GetEnumeratorN(); + + if (pEnum) + { + while (pEnum->MoveNext() == E_SUCCESS) + { + _IFont::Glyph* pGlyph; + + pEnum->GetCurrent(pGlyph); + pBaseFont->UnloadGlyph(&pGlyph); + } + + delete pEnum; + } + } + } + + if (bidiProperty.pBidiIndex) + { + // Reorder list by using BIDI index + typedef _Util::Pair Gap; + typedef _Util::AccumList GapList; + + GapList::Iterator dstBegin = outList.Begin(); + + int index = 0; + + if (bidiProperty.length == int(tempList.Size())) + { + for (GapList::ConstIterator src = tempList.Begin(); src != tempList.End(); ++src) + { + *(dstBegin + bidiProperty.pBidiIndex[index++]) = *src; + } + } + else if (bidiProperty.length > int(tempList.Size())) + { + _TextBidiUtil::GetReorderedIndexList(bidiProperty, tempList, outList); + } + else // if (bidiProperty.length < tempList.Size()) + { + // under development + for (GapList::ConstIterator src = tempList.Begin(); src != tempList.End() && index < bidiProperty.length; ++src) + { + *(dstBegin + bidiProperty.pBidiIndex[index++]) = *src; + } + } + } + else + { + typedef _Util::Pair Gap; + typedef _Util::AccumList GapList; + + GapList::Iterator dst = outList.Begin(); + GapList::Iterator dstEnd = outList.End(); + + GapList::ConstIterator src = tempList.Begin(); + GapList::ConstIterator srcEnd = tempList.End(); + + for (; (src != srcEnd) && (dst != dstEnd); ++src, ++dst) + { + *dst = *src; + } + } + + return E_SUCCESS; +} + +result +_Font::GetTextExtentList(const _Util::String& text, _Util::AccumList<_Util::Pair >& outList) const +{ + 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; + } + + _TextBidiPropertyWithReorder bidiProperty(text.pStart, text.length, _Util::Convert(_GetTextBidiHint())); + + if (bidiProperty.HasComplexText()) + { + return this->__GetTextExtentList(bidiProperty, outList); + } + else + { + return this->__GetTextExtentList(text, outList); + } + + return E_SUCCESS; +} + +result +_Font::SetSize(_Util::FixedPoint26_6 pcSize) +{ + __UpdateFontAttribute(__fontAttrib.style, pcSize); + + return E_SUCCESS; +} + +result +_Font::SetStyle(int style) +{ + __fontAttrib.style = style; + + return E_SUCCESS; +} + +int +_Font::GetStyle(void) const +{ + return __fontAttrib.style; +} + +_Util::FixedPoint26_6 +_Font::GetLeading(void) const +{ +#if 1 + return __fontAttrib.maxHeight; +#else + return __fontAttrib.ascender - __fontAttrib.descender + __fontAttrib.leading; +#endif +} + +result +_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"); + + bool rtn = this->ApplyAttribute(); + SysTryReturn(NID_GRP, rtn, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fails to apply font attribute."); + + _Util::ScratchPad & scratchPad = *canvas.__pScratchPad; + scratchPad.RegisterFillRect(_RasterOp::FnFillRectFont32Bit); + + Rectangle clipBounds; + canvas.__GetClipBounds(clipBounds); + + int xDest = point.x; + int yDest = point.y; + int startX = point.x; + int charHeight = 0; + int italicSpace = 0; + int boldSpace = 0; + int clipX1 = clipBounds.x; + int clipY1 = clipBounds.y; + int clipX2 = clipX1 + clipBounds.width; + int clipY2 = clipY1 + clipBounds.height; + long xVec = 0; + long yVec = 0; + int left = 0; + wchar_t leftChar = 0; + _IFont::Glyph* pFontGlyphData = 0; + + _IFont::SizeProperty sizeProperty; + rtn = this->GetFontSizeProperty(sizeProperty); + SysTryReturn(NID_GRP, rtn, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Failed to get font sizeProperty."); + + // need to revise y value, because _IFont is based on the baseline + { + if (canvas.__textOrigin == TEXT_ORIGIN_LEFT_TOP) + { + yDest += sizeProperty.ascender.ToInt(); + } + + charHeight = sizeProperty.ascender.ToInt() - sizeProperty.descender.ToInt(); + + if (this->GetStyle() & FONT_STYLE_ITALIC) + { + italicSpace = (sizeProperty.ascender.ToInt() * 2) >> 4; + } + } + +#ifdef APPLY_BOLD_SPACE + _IFont::Property property; + GET_FONT_PROPERTY(property, false); + + if (__fontAttrib.style & FONT_STYLE_BOLD && property.weightClass < _MEDIUM_FONT_BOLD_WEIGHT) + { + _IFont::Attrib attr; + 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 = color; + + _TextBidiPropertyWithReorder bidiProperty(pText, length, _Util::Convert(_GetTextBidiHint())); + + if (bidiProperty.HasComplexText()) + { + const wchar_t* pReorderedText = bidiProperty.GetReorderedText(); + + const wchar_t* pTextFragmentBegin = pReorderedText; + const wchar_t* pTextFragmentEnd = pTextFragmentBegin + length; + + const wchar_t* pTextSegment = pTextFragmentBegin; + + _IFont* pBaseFont = this->__GetFont(*pTextSegment); + + _Util::AccumList<_TextFragment> textFragmentList; + + while (pTextSegment < pTextFragmentEnd) + { + if (pBaseFont->CheckGlyph(*pTextSegment) == 0) + { + _IFont* pFallbackFont = this->__GetFont(*pTextSegment); + + if (pBaseFont != pFallbackFont) + { + textFragmentList.Push(_TextFragment(_Util::String(pTextFragmentBegin, pTextSegment - pTextFragmentBegin), pBaseFont)); + + pTextFragmentBegin = pTextSegment; + pBaseFont = pFallbackFont; + } + } + + ++pTextSegment; + } + + textFragmentList.Push(_TextFragment(_Util::String(pTextFragmentBegin, pTextSegment - pTextFragmentBegin), pBaseFont)); + + /* + * - In case of LTR + * for (_Util::AccumList<_TextFragment>::Iterator textFragment = textFragmentList.Begin(); textFragment != textFragmentList.End(); ++textFragment) + * + * - In case of RTL + * for (_Util::AccumList<_TextFragment>::Iterator textFragment = textFragmentList.End(); textFragment != textFragmentList.Begin(); ) + * { + * --textFragment; + * + */ + + for (_Util::AccumList<_TextFragment>::Iterator textFragment = textFragmentList.Begin(); textFragment != textFragmentList.End(); ++textFragment) + { + if (textFragment->pUsingFont == null || textFragment->textFragment.length <= 0) + { + continue; + } + + if (textFragment->pUsingFont != __pNativeFont) + { + _IFont::Attrib fontAttrib; + + if (textFragment->pUsingFont->GetAttrib(fontAttrib)) + { + fontAttrib.size = __fontAttrib.size; + fontAttrib.style = _IFont::STYLE_NONE; + 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); + } + } + + Tizen::Base::Collection::ArrayListT<_IFont::Glyph *> glyphList; + + const wchar_t firstChar = *textFragment->textFragment.pStart; + + GUnicodeScript script = _TextBidiUtil::GetUnicodeScript(firstChar); + + textFragment->pUsingFont->GetGlyphList(textFragment->textFragment, glyphList, script); + // need to check if (script < 0 || script >= _sampleLanguageCount) ? + + int count = glyphList.GetCount(); + + for (int i = 0; i < count; i++) + { + /* for debugging + static int s_index = 0; + const unsigned long COLOR[6] = + { + 0xFFFFFFFF, + 0xFF40FF40, + 0xFF40FFFF, + 0xFFFF4040, + 0xFFFF40FF, + 0xFFFFFF40 + }; + unsigned long canvasFgColor = COLOR[s_index++ % 6]; + */ + + typedef unsigned long TPixel; + _IFont::Glyph *pGlyph = 0; + + TPixel srcR, srcG, srcB, srcA; + TPixel dstR, dstG, dstB, dstA; + + srcA = (canvasFgColor >> 24) & 0xFF; + srcA += (srcA >> 7); + srcR = (canvasFgColor >> 16) & 0xFF; + srcG = (canvasFgColor >> 8) & 0xFF; + srcB = (canvasFgColor) & 0xFF; + + SystemPixel* pBufferStartAddr = null; + int bufferPitch; + + scratchPad.GetBuffer(pBufferStartAddr, bufferPitch); + + glyphList.GetAt(i, pGlyph); + + if (!_TextBidiUtil::IsTextBidiBaseLtr()) + { + xDest -= pGlyph->xAdvance.ToInt(); + 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; + + 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 alpha = (unsigned long) (pGlyph->image.pBitmap[h * pGlyph->image.bytesPerLine + w]); + + if (alpha > 0) + { + // equivalent to scratchPad.FillRect(x, y, 1, 1, fgColor, alpha); + alpha = (alpha * srcA) >> 8; + alpha += (alpha >> 7); + + dstA = (*pDest32 >> 24) & 0xFF; + dstR = (*pDest32 >> 16) & 0xFF; + dstG = (*pDest32 >> 8) & 0xFF; + dstB = (*pDest32) & 0xFF; + + dstA = BLEND_ALPHA_COMPONEMT(alpha, dstA); + dstR = (dstR + (((srcR - dstR) * alpha) >> 8)) & 0xFF; + dstG = (dstG + (((srcG - dstG) * alpha) >> 8)) & 0xFF; + dstB = (dstB + (((srcB - dstB) * alpha) >> 8)) & 0xFF; + + *pDest32 = (dstA << 24) | (dstR << 16) | (dstG << 8) | dstB; + + } + ++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()) + { + xDest += pGlyph->xAdvance.ToInt(); + yDest += pGlyph->yAdvance.ToInt(); + } + } + + IEnumeratorT<_IFont::Glyph*>* pEnum = glyphList.GetEnumeratorN(); + + if (pEnum) + { + while (pEnum->MoveNext() == E_SUCCESS) + { + _IFont::Glyph* pGlyph; + + pEnum->GetCurrent(pGlyph); + pBaseFont->UnloadGlyph(&pGlyph); + } + + delete pEnum; + } + } + } + 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; + } + + if (pFont != __pNativeFont) + { + _IFont::Attrib fontAttrib; + bool rtn = pFont->GetAttrib(fontAttrib); + //SysTryReturn(NID_GRP, rtn, false, E_SYSTEM, "[E_SYSTEM] Failed to get font attribute"); + + fontAttrib.size = __fontAttrib.size; + fontAttrib.style = _IFont::STYLE_NONE; + 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"); + } + + _IFont::Property property; + pFont->GetFontProperty(property); + + unsigned long fgColor = (!ignorePredefinedColor && pFont->hasPredefinedColor()) ? _GetPredefinedColor(*pText, canvasFgColor) : canvasFgColor; + + if (left > 0) + { + if (pFont->GetKerning(leftChar, *pText, xVec, yVec)) + { + xDest += xVec; + } + } + + bool rtn = pFont->LoadGlyph(*pText++, &pFontGlyphData); + + if (!rtn) + { + 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); + + TPixel srcR = (fgColor >> 16) & 0xFF; + TPixel srcG = (fgColor >> 8) & 0xFF; + TPixel srcB = (fgColor) & 0xFF; + + SystemPixel* pBufferStartAddr = null; + int bufferPitch = 0; + + scratchPad.GetBuffer(pBufferStartAddr, bufferPitch); + + for (int h = 0; h < pFontGlyphData->image.height; h++) + { + int y = yDest - pFontGlyphData->yOffset.ToInt() + h; + + if (y < clipY1) + { + continue; + } + + if (y >= clipY2) + { + break; + } + + TPixel* pDest32 = pBufferStartAddr + y * bufferPitch + xDest + pFontGlyphData->xOffset.ToInt(); + + for (int w = 0; w < pFontGlyphData->image.width; w++) + { + int x = xDest + pFontGlyphData->xOffset.ToInt() + w; + + if (x < clipX1) + { + ++pDest32; + continue; + } + + if (x >= clipX2) + { + break; + } + + unsigned long alpha = (unsigned long) (pFontGlyphData->image.pBitmap[h * pFontGlyphData->image.bytesPerLine + w]); + + if (alpha > 0) + { + // equivalent to scratchPad.FillRect(x, y, 1, 1, fgColor, alpha); + alpha = (alpha * srcA) >> 8; + alpha += (alpha >> 7); + + TPixel dstA = (*pDest32 >> 24) & 0xFF; + TPixel dstR = (*pDest32 >> 16) & 0xFF; + TPixel dstG = (*pDest32 >> 8) & 0xFF; + TPixel dstB = (*pDest32) & 0xFF; + + dstA = BLEND_ALPHA_COMPONEMT(alpha, dstA); + dstR = (dstR + (((srcR - dstR) * alpha) >> 8)) & 0xFF; + dstG = (dstG + (((srcG - dstG) * alpha) >> 8)) & 0xFF; + dstB = (dstB + (((srcB - dstB) * alpha) >> 8)) & 0xFF; + + *pDest32 = (dstA << 24) | (dstR << 16) | (dstG << 8) | dstB; + + } + ++pDest32; + } + } + + 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; + } + + } + } + + if (this->IsUnderlined() || this->IsStrikeOut()) + { + int y = 0; + int thick = this->GetLineThickness(); + + if (canvas.__textOrigin == TEXT_ORIGIN_LEFT_TOP) + { + y = point.y + charHeight - 1; + } + else + { + y = point.y - sizeProperty.descender.ToInt() - 1; + } + + xDest -= this->GetCharSpace(); + + if (this->IsUnderlined()) + { + canvas.FillRectangle(canvasFgColor, Rectangle(startX, y - thick, xDest - startX, thick)); + } + + if (this->IsStrikeOut()) + { + y -= charHeight / 2; + canvas.FillRectangle(canvasFgColor, Rectangle(startX, y - thick, xDest - startX, thick)); + } + } + + 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) +{ + _Util::String utilText(text.GetPointer(), text.GetLength(), startIndex, length); + + return this->__DrawText(canvas, point, utilText, canvas.__fgColor, 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();; + + _Util::String utilText(text.GetPointer(), text.GetLength(), startIndex, length); + + 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, utilText, textColor32, false); + + return E_SUCCESS; +} + +bool +_Font::SetAttrib(const _IFont::Attrib& fontAttrib) +{ + return __pNativeFont->SetAttrib(fontAttrib); +} + +bool +_Font::GetAttrib(_IFont::Attrib& fontAttrib) const +{ + return __pNativeFont->GetAttrib(fontAttrib); +} + +bool +_Font::GetKerning(unsigned long character1, unsigned long character2, long& xVector, long& yVector) const +{ + return __pNativeFont->GetKerning(character1, character2, xVector, yVector); +} + +bool +_Font::GetFontSizeProperty(_IFont::SizeProperty& sizeProperty) const +{ + return __pNativeFont->GetFontSizeProperty(sizeProperty); +} + +bool +_Font::LoadGlyph(unsigned long character, _IFont::Glyph** ppFontGlyphData) +{ + // note! we assume that the font attribute has been already applied on _IFont + bool rtn = false; + + // if not, loading glyph (character/size/style) and caching it + rtn = __pNativeFont->LoadGlyph(character, ppFontGlyphData); + SysTryReturn(NID_GRP, rtn, false, E_SYSTEM, "[E_SYSTEM] Failed to load glyph data"); + + // return cached glyph + return true; +} + +bool +_Font::UnloadGlyph(_IFont::Glyph** ppFontGlyphData) +{ + return __pNativeFont->UnloadGlyph(ppFontGlyphData); +} + +unsigned long +_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) +{ + __fontAttrib.style = style; + __fontAttrib.size = pcSize; + __fontAttrib.lineThickness = pcSize.ToInt() > 0 ? (pcSize.ToInt() / 24) + 1 : 1; + + _IFont::SizeProperty sizeProperty; + bool getProperty = false; + + if (this->ApplyAttribute()) + { + getProperty = __pNativeFont->GetFontSizeProperty(sizeProperty); + } + + if (getProperty) + { + __fontAttrib.maxWidth = sizeProperty.maxWidth; + __fontAttrib.maxHeight = sizeProperty.maxHeight; + __fontAttrib.ascender = sizeProperty.ascender; + __fontAttrib.descender = sizeProperty.descender; + __fontAttrib.leading = sizeProperty.leading; + } + else + { + // if failed to get property above, each property should be remained as default: -1 + SysLog(NID_GRP, "[] Failed to get font attribute from native font"); + + __fontAttrib.maxWidth.Reset(0); + __fontAttrib.maxHeight.Reset(0); + __fontAttrib.ascender.Reset(0); + __fontAttrib.descender.Reset(0); + __fontAttrib.leading.Reset(0); + } +} + +result +_Font::__DrawTextLastFallback(_Canvas& canvas, const Point& point, const Tizen::Base::String& text, int startIndex, int length) +{ + return E_SUCCESS; +} + +result +_Font::__DrawTextDefault(_Canvas& canvas, const Point& point, const Tizen::Base::String& text, int startIndex, int length) +{ + _FontRsrcManager& mgr = _FontRsrcManager::GetInstance(); + result r = mgr.GetDefaultSystemFont().__DrawText(canvas, point, text, startIndex, length); + SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Failed to draw default system font", GetErrorMessage(r)); + + return E_SUCCESS; + +CATCH: + _Font::__DrawTextLastFallback(canvas, point, text, startIndex, length); + return r; +} + +result +_Font::__DrawTextDefault(_Canvas& canvas, const Point& point, const Tizen::Base::String& text, int startIndex, int length, const Color& outlineColor) +{ + _FontRsrcManager& mgr = _FontRsrcManager::GetInstance(); + result r = mgr.GetDefaultSystemFont().__DrawText(canvas, point, text, startIndex, length, outlineColor); + SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Failed to draw default system font", GetErrorMessage(r)); + + return E_SUCCESS; + +CATCH: + _Font::__DrawTextLastFallback(canvas, point, text, startIndex, length); + return r; +} + + +result +_Font::DrawText(_Canvas& canvas, const Point& point, const Tizen::Base::String& text, int startIndex, int length) +{ + if (canvas.__pPriorityFont) + { + return canvas.__pPriorityFont->__DrawText(canvas, point, text, startIndex, length); + } + else if (canvas.__pFont) + { + return canvas.__pFont->__DrawText(canvas, point, text, startIndex, length); + } + else + { + return _Font::__DrawTextDefault(canvas, point, text, startIndex, length); + } +} + +result +_Font::DrawText(_Canvas& canvas, const Point& point, const Tizen::Base::String& text, int startIndex, int length, const Color& outlineColor) +{ + if (canvas.__pPriorityFont) + { + return canvas.__pPriorityFont->__DrawText(canvas, point, text, startIndex, length, outlineColor); + } + else if (canvas.__pFont) + { + return canvas.__pFont->__DrawText(canvas, point, text, startIndex, length, outlineColor); + } + else + { + return _Font::__DrawTextDefault(canvas, point, text, startIndex, length, outlineColor); + } + + return E_SUCCESS; +} + +_Font* +_Font::GetInstance(_FontImpl& font) +{ + return (&font != null) ? font._pNativeFont : null; +} + +const _Font* +_Font::GetInstance(const _FontImpl& font) +{ + return (&font != null) ? font._pNativeFont : null; +} + +_IFont* +_Font::__GetFont(wchar_t character) +{ + _FontRsrcManager& mgr = _FontRsrcManager::GetInstance(); + + if (!_HasEmoticonImage(character)) + { + //------------------------------------------------------ + // + // 1. check if this font has a requested glyph + // + //------------------------------------------------------ + unsigned long idx = __pNativeFont->CheckGlyph(character); + + if (idx > 0) + { + return __pNativeFont; + } + + // Check the BlackList + if (mgr.SearchBlackList(character)) + { + return __pNativeFont; + } + } + + //------------------------------------------------------ + // + // 1-2. check if this glyph is in the fallback list. + // + //------------------------------------------------------ + _IFont::FontMapT* pFallbackFontMap = __pNativeFont->GetFallbackMap(); + +#ifdef USE_HASHMAP_FOR_FONT + std::auto_ptr > enumerator(pFallbackFontMap->GetMapEnumeratorN()); + + while (enumerator->MoveNext() == E_SUCCESS) + { + _FontRsrcManager::SharedFontResource pTempFont; + + if (enumerator->GetValue(pTempFont) == E_SUCCESS) + { + _Util::WString key(L""); + result r = enumerator->GetKey(key); + + if (r == E_SUCCESS) + { + if (mgr.SearchFont(key)) + { + if (pTempFont->CheckGlyph(character) > 0) + { + return pTempFont.get(); + } + } + else + { + pFallbackFontMap->Remove(key); + } + } + } + } +#else + for (_IFont::FontMapT::const_iterator fontIterator = pFallbackFontMap->begin(); fontIterator != pFallbackFontMap->end(); ++fontIterator) + { + if (fontIterator->second != null) + { + if (fontIterator->second->CheckGlyph(character) > 0) + { + return fontIterator->second.get(); + } + } + } +#endif + + //------------------------------------------------------ + // + // 2. Get fallback font list via fontconfig + // + //------------------------------------------------------ + Tizen::Base::Collection::ArrayListT fileList; + bool rtn = __GetFallbackFontFileList(character, fileList); + + if (!rtn) + { + // if failed find out fallback font, + // just use this instance for drawing something for unknown glyph + return __pNativeFont; + } + + //------------------------------------------------------ + // + // 3. try to find a font having a requested glyph + // + //------------------------------------------------------ + String fontName; + _IFont* pFallbackFont = null; + + _FontRsrcManager::SharedFontResource out; + + int count = fileList.GetCount(); + result r = E_FAILURE; + + for (int i = 0; i < count; i++) + { + fileList.GetAt(i, fontName); + + if (fontName.IsEmpty()) + { + continue; + } + + r = mgr.GetTempFont(fontName, __fontAttrib.style, __fontAttrib.size, out); + + if (r == E_SUCCESS) + { + unsigned long idx = out->CheckGlyph(character); + + if (idx > 0) + { + _Util::WString fontNameTemp(fontName.GetPointer()); + + // keep it +#ifdef USE_HASHMAP_FOR_FONT + r = pFallbackFontMap->Add(fontNameTemp, out); + + if (r == E_OBJ_ALREADY_EXIST) + { + pFallbackFont = out.get(); + break; + } + + SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); +#else + pFallbackFontMap->push_back(std::make_pair(fontNameTemp, out)); +#endif + r = mgr.AddFont(fontNameTemp, out); + SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pFallbackFont = out.get(); + break; + } + } + } + + if (pFallbackFont == null) + { + mgr.AddBlackList(character); + + return __pNativeFont; + } + + return pFallbackFont; + +CATCH: + // if failed find out fallback font, + // just use this instance for drawing something for unknown glyph + return __pNativeFont; +} + +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) + { + return false; + } + + FcPattern* pPattern = null; + FcFontSet* pSet = null; + FcChar8* pName = null; + FcResult res = FcResultNoMatch; + const int fcWeight = (__fontAttrib.style & FONT_STYLE_BOLD) ? FC_WEIGHT_BOLD : FC_WEIGHT_REGULAR; + + // getting fallback font list + pPattern = FcPatternBuild(NULL, FC_WEIGHT, FcTypeInteger, fcWeight, NULL); + SysTryCatch(NID_GRP, pPattern, , E_SYSTEM, "[E_SYSTEM] Failed to FcPatternBuild()"); + + FcPatternAddString(pPattern, FC_FAMILY, (FcChar8*)"Tizen"); + + if (strncmp(SAMPLE_LANGUAGE_EMPTY, _SampleLanguages[script], strlen(SAMPLE_LANGUAGE_EMPTY) + 1) != 0) + { + FcPatternAddString(pPattern, FC_LANG, (FcChar8*)_SampleLanguages[script]); + } + + FcConfigSubstitute(NULL, pPattern, FcMatchPattern); + FcDefaultSubstitute(pPattern); + + // do matching + pSet = FcFontSort(NULL, pPattern, FcTrue, NULL, &res); + SysTryCatch(NID_GRP, pSet, , E_SYSTEM, "[E_SYSTEM] Failed to FcFontSort()"); + + out.RemoveAll(); + + for (int i = 0; i < pSet->nfont; i++) + { + if (FcPatternGetString(pSet->fonts[i], FC_FILE, 0, &pName) == FcResultMatch) + { + out.Add(String((char*)pName)); + } + } + + // destroy + FcFontSetDestroy(pSet); + FcPatternDestroy(pPattern); + + return (out.GetCount() > 0) ? true : false; +CATCH: + if (pSet != null) + { + FcFontSetDestroy(pSet); + } + + if (pPattern != null) + { + FcPatternDestroy(pPattern); + } + + return false; +} + +bool +_Font::UpdateDefaultFont(const String& key) +{ + if (!key.IsEmpty()) + { + SysLog(NID_GRP, "Request to change the default font"); + + _FontRsrcManager& mgr = _FontRsrcManager::GetInstance(); + + return mgr.ReloadDefaultSystemFont(); + } + + return false; +} + +}} // Tizen::Graphics diff --git a/src/graphics/FGrp_Font.h b/src/graphics/FGrp_Font.h new file mode 100644 index 0000000..cbe0f1c --- /dev/null +++ b/src/graphics/FGrp_Font.h @@ -0,0 +1,209 @@ +// +// 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_Font.h + * @brief This is the header file for the _Font class. + * + * This header file contains the declarations of the %_Font class. + * + */ + +#ifndef _FGRP_INTERNAL_FONT_H_ +#define _FGRP_INTERNAL_FONT_H_ + +#include +#include + +#include +#include + +#include "FGrp_IFont.h" +#include "FGrp_FontBidiUtil.h" + +#include "util/FGrp_UtilTemplate.h" +#include "util/FGrp_UtilType.h" + +namespace Tizen { namespace Base +{ +class String; +class ByteBuffer; +}} // Tizen::Base + +namespace Tizen { namespace Base { namespace Collection +{ +class IList; +}}} // Tizen::Base::Collection + +namespace Tizen { namespace Graphics +{ +class Dimension; +class Color; +class Point; +class Rectangle; + +class _Canvas; +class _FontImpl; + +struct _FontAttribute +{ + int style; + _Util::FixedPoint26_6 size; + _Util::FixedPoint26_6 maxWidth; + _Util::FixedPoint26_6 maxHeight; + int charSpace; + _Util::FixedPoint26_6 ascender; + _Util::FixedPoint26_6 descender; + _Util::FixedPoint26_6 leading; + int lineThickness; + bool strikeout; + bool underline; + _Util::FixedPoint26_6 xExpansion; + + void Init() + { + style = FONT_STYLE_MIN; + size.Reset(0); + maxWidth.Reset(0); + maxHeight.Reset(0); + charSpace = 0; + ascender.Reset(0); + descender.Reset(0); + leading.Reset(0); + lineThickness = -1; + strikeout = false; + underline = false; + xExpansion.Reset(_Util::FixedPoint26_6(1.0f)); + } +}; + +class _Font + : public Tizen::Base::Object +{ +public: + typedef unsigned long SystemPixel; + +public: + _Font(void); + _Font(const _Font& obj); + virtual ~_Font(void); + + result Construct(int style, _Util::FixedPoint26_6 size); + result Construct(const Tizen::Base::String& fontName, int style, _Util::FixedPoint26_6 pcSize, bool isPathEnabled = true); + result Construct(const Tizen::Base::ByteBuffer& fontData, int style, _Util::FixedPoint26_6 pcSize); + + bool IsConstructed(void) const; + + _Util::FixedPoint26_6 GetMaxHeight(void) const; + _Util::FixedPoint26_6 GetMaxWidth(void) const; + _Util::FixedPoint26_6 GetAscender(void) const; + _Util::FixedPoint26_6 GetDescender(void) const; + + result GetLeftBear(wchar_t character, _Util::FixedPoint22_10& leftBear) const; + result GetRightBear(wchar_t character, _Util::FixedPoint22_10& rightBear) const; + + bool IsBold(void) const; + bool IsItalic(void) const; + bool IsPlain(void) const; + bool IsStrikeOut(void) const; + bool IsUnderlined(void) const; + + _Util::FixedPoint26_6 GetSize(void) const; + + result SetXExpansion(_Util::FixedPoint26_6 xExpansion); + + void SetStrikeOut(bool strikeOut); + void SetUnderline(bool underline); + + void SetCharSpace(int space); + int GetCharSpace(void) const; + + int GetLineThickness(void) const; + Tizen::Base::String GetFaceName(void) const; + static Tizen::Base::Collection::IList* GetSystemFontListN(void); + static Tizen::Base::String GetFaceName(const Tizen::Base::String& filePath); + + _IFont* GetNativeFont(void) const; + _Font* CloneN(void); + bool ApplyAttribute(void); + + result GetTextExtent(int width, const _Util::String& text, bool outline, int& count, Dimension& dim) const; + result GetTextExtent(int width, const _Util::String& text, bool outline, const Tizen::Base::String& delimiter, int& count, Dimension& dim) const; + + result GetTextExtentList(const _Util::String& text, _Util::AccumList<_Util::Pair >& outList) const; + + result SetSize(_Util::FixedPoint26_6 pcSize); + result SetStyle(int style); + + int GetStyle(void) const; + + _Util::FixedPoint26_6 GetLeading(void) const; + + // native font interface + bool SetAttrib(const _IFont::Attrib& fontAttrib); + bool GetAttrib(_IFont::Attrib& fontAttrib) const; + bool GetKerning(unsigned long character1, unsigned long character2, long& xVector, long& yVector) const; + bool GetFontSizeProperty(_IFont::SizeProperty& sizeProperty) const; + bool GetFontProperty(_IFont::Property& property) const; + bool LoadGlyph(unsigned long character, _IFont::Glyph** ppFontGlyphData); + 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); + + static _Font* GetInstance(_FontImpl& font); + static const _Font* GetInstance(const _FontImpl& font); + + static bool UpdateDefaultFont(const Tizen::Base::String& key); + +private: + _Font& operator =(const _Font& rhs); + void __UpdateFontAttribute(int style, _Util::FixedPoint26_6 size); + + 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); + static result __DrawTextDefault(_Canvas& canvas, const Point& point, const Tizen::Base::String& text, int startIndex, int length, const Color& outlineColor); + + _IFont* __GetFont(wchar_t character); + bool __GetFallbackFontFileList(wchar_t character, Tizen::Base::Collection::IListT& out); + + result __GetTextExtent(int width, const _Util::String& text, bool outline, int& count, Dimension& dim) const; + result __GetTextExtentEx(int width, const _Util::String& text, bool outline, int& count, Dimension& dim) const; + + result __GetTextExtentList(const _Util::String& text, _Util::AccumList<_Util::Pair >& outList) const; + result __GetTextExtentList(_TextBidiPropertyWithReorder& bidiProperty, _Util::AccumList<_Util::Pair >& outList) const; + +private: + unsigned long __magicKey; + std::tr1::shared_ptr <_IFont> __sharedFont; + _FontAttribute __fontAttrib; + +}; // _Font + +}} // Tizen::Graphics + +#endif // _FGRP_INTERNAL_FONT_H_ diff --git a/src/graphics/FGrp_FontBidiUtil.cpp b/src/graphics/FGrp_FontBidiUtil.cpp new file mode 100644 index 0000000..98688d1 --- /dev/null +++ b/src/graphics/FGrp_FontBidiUtil.cpp @@ -0,0 +1,1010 @@ +// +// 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_FontBidiUtil.cpp + * @brief This is the cpp file for the bidi utilities. + * + */ + +#include +#include +#include +#include + +#include "FGrp_FontBidiUtil.h" + + +namespace +{ + +struct BidiParagraph +{ + wchar_t* pString; + FriBidiCharType* pCharTypes; + FriBidiLevel* pEmbeddingLevels; + FriBidiParType direction; + size_t bufferLength; + + BidiParagraph(size_t length) + : pString(new (std::nothrow) wchar_t[length + 1]) + , pCharTypes(new (std::nothrow) FriBidiCharType[length]) + , pEmbeddingLevels(new (std::nothrow) FriBidiLevel[length]) + , direction(FRIBIDI_PAR_LTR)//FRIBIDI_PAR_ON) + , bufferLength(length) + { + if (pString == NULL || pCharTypes == NULL || pEmbeddingLevels == NULL) + { + delete[] pString; + delete[] pEmbeddingLevels; + delete[] pCharTypes; + + pString = NULL; + pEmbeddingLevels = NULL; + pCharTypes = NULL; + bufferLength = 0; + } + } + + ~BidiParagraph(void) + { + delete[] pCharTypes; + delete[] pEmbeddingLevels; + delete[] pString; + } + + bool IsValid(void) + { + return (pString != NULL && pCharTypes != NULL && pEmbeddingLevels != NULL); + } +}; + +#define IS_DIRECTION_RTL(x) (((x->direction == FRIBIDI_PAR_RTL) || (x->direction == FRIBIDI_PAR_WRTL)) ? true : false) + +//////////////////////////////////////////////////////////////////////////////// + +bool +_IsRtl(const wchar_t* pString, int length) +{ + if (pString) + { + for ( ; *pString && length-- > 0 ; ++pString) + { + FriBidiCharType type = fribidi_get_bidi_type((FriBidiChar) *pString); + + GUnicodeScript script = g_unichar_get_script(*pString); + + if (FRIBIDI_IS_LETTER(type) && FRIBIDI_IS_RTL(type)) + { + return true; + } + else if (script == G_UNICODE_SCRIPT_DEVANAGARI || script == G_UNICODE_SCRIPT_BENGALI) + { + return true; + } + } + } + + return false; +} + +size_t +_GetStringLength(const wchar_t* pString) +{ + if (pString) + { + const wchar_t* pEnd = pString; + + while (*pEnd++) + ; + + return (pEnd - pString - 1); + } + else + { + return 0; + } +} + +template +void +_ConvertCharacterCode(DstCode* pDst, const SrcCode* pSrc, int length) +{ + if (pDst && pSrc) + { + while (*pSrc && length-- > 0) + { + *pDst++ = *pSrc++; + } + + *pDst = 0; + } +} + +//////////////// + +BidiParagraph* +_GetBidiParagraphProperty(const wchar_t* pText, size_t len, int* pSegmentIndex, Tizen::Graphics::_TextBidiProperty::BidiHint hint) +{ + #define CHECK_IF(cond) if (!(cond)) return NULL + + // precondition check + { + CHECK_IF((pText) && (hint == Tizen::Graphics::_TextBidiProperty::BIDI_HINT_RTL || _IsRtl(pText, len))); + + size_t textLength = _GetStringLength(pText); + len = (len < textLength) ? len : textLength; + } + + const FriBidiChar* pTestString = NULL; + std::unique_ptr AutoDeleteString; + std::unique_ptr bidiProperty(new (std::nothrow) BidiParagraph(len)); + + // out of memory + CHECK_IF(bidiProperty.get() && bidiProperty->IsValid()); + + // in case of different size of each wide character + if (sizeof(wchar_t) == sizeof(FriBidiChar)) + { + pTestString = (const FriBidiChar *) pText; + } + else + { + AutoDeleteString.reset(new (std::nothrow) FriBidiChar[len + 1]); + + CHECK_IF(AutoDeleteString.get()); + + _ConvertCharacterCode(AutoDeleteString.get(), pText, len); + + pTestString = AutoDeleteString.get(); + } + + /* + * 0x110 FRIBIDI_TYPE_LTR; + * 0x111 FRIBIDI_TYPE_RTL; + * 0x113 FRIBIDI_TYPE_AL; + * 0x220 FRIBIDI_TYPE_EN; + */ + + fribidi_get_bidi_types(pTestString, len, bidiProperty->pCharTypes); + + if (pSegmentIndex) + { + size_t pos = 0; + FriBidiLevel baseLevel = 0; + + for (int* itr = pSegmentIndex ; *itr > 0 ; itr++) + { + FriBidiParType direction = FRIBIDI_PAR_ON; + CHECK_IF(fribidi_get_par_embedding_levels(bidiProperty->pCharTypes + pos, *itr - pos, &direction, bidiProperty->pEmbeddingLevels + pos)); + + // Only on the first run + if (itr == pSegmentIndex) + { + bidiProperty->direction = direction; + // adjust baseLevel to be 1 for rtl paragraphs, and 0 for ltr paragraphs. + baseLevel = IS_DIRECTION_RTL(bidiProperty) ? 1 : 0; + } + + // We want those chars at the override points to be on the base + // level and we also remove -2 cause we later increment them, + // just for simpler code paths + bidiProperty->pEmbeddingLevels[*itr] = baseLevel - 2; + pos = *itr + 1; + } + + { + FriBidiParType direction = FRIBIDI_PAR_ON; + CHECK_IF(fribidi_get_par_embedding_levels(bidiProperty->pCharTypes + pos, len - pos, &direction, bidiProperty->pEmbeddingLevels + pos)); + } + + // Increment all levels by 2 to emulate embedding. + { + FriBidiLevel* pEmbeddingLevel = bidiProperty->pEmbeddingLevels; + FriBidiLevel* pEmbeddingLevelEnd = pEmbeddingLevel + len; + + for ( ; pEmbeddingLevel < pEmbeddingLevelEnd ; ++pEmbeddingLevel) + { + *pEmbeddingLevel += 2; + } + } + } + else + { + FriBidiParType direction = FRIBIDI_PAR_ON; + + if ((Tizen::Graphics::_TextBidiUtil::IsTextBidiBaseLtr())) + { + switch (hint) + { + case Tizen::Graphics::_TextBidiProperty::BIDI_HINT_LTR: + direction = FRIBIDI_PAR_LTR; + break; + case Tizen::Graphics::_TextBidiProperty::BIDI_HINT_RTL: + direction = FRIBIDI_PAR_RTL; + break; + default: + for (size_t i = 0; i < len; i++) + { + if (FRIBIDI_IS_STRONG(bidiProperty->pCharTypes[i])) + { + if (FRIBIDI_IS_RTL(bidiProperty->pCharTypes[i])) + { + direction = FRIBIDI_PAR_RTL; + } + else + { + direction = FRIBIDI_PAR_LTR; + } + + break; + } + } + break; + } + } + else + { + switch (hint) + { + case Tizen::Graphics::_TextBidiProperty::BIDI_HINT_LTR: + direction = FRIBIDI_PAR_RTL; + break; + case Tizen::Graphics::_TextBidiProperty::BIDI_HINT_RTL: + direction = FRIBIDI_PAR_LTR; + break; + default: + for (size_t i = 0; i < len; i++) + { + if (FRIBIDI_IS_STRONG(bidiProperty->pCharTypes[i])) + { + if (FRIBIDI_IS_RTL(bidiProperty->pCharTypes[i])) + { + direction = FRIBIDI_PAR_LTR; + } + else + { + direction = FRIBIDI_PAR_RTL; + } + + break; + } + } + break; + } + } + + bidiProperty->direction = direction; + + CHECK_IF(fribidi_get_par_embedding_levels(bidiProperty->pCharTypes, len, &bidiProperty->direction, bidiProperty->pEmbeddingLevels)); + } + + return bidiProperty.release(); + + #undef CHECK_IF +} + +const wchar_t* +_GetBidiShapeString(BidiParagraph* pBidiProps) +{ + #define CHECK_IF(cond) if (!(cond)) return 0 + + FriBidiChar* pTestString = NULL; + std::unique_ptr autoDeleteString; + + const size_t textLength = pBidiProps->bufferLength; + + if (pBidiProps->pString) + { + if (sizeof(wchar_t) == sizeof(FriBidiChar)) + { + pTestString = (FriBidiChar *) pBidiProps->pString; + } + else + { + autoDeleteString.reset(new (std::nothrow) FriBidiChar[textLength + 1]); + + CHECK_IF(autoDeleteString.get()); + + _ConvertCharacterCode(autoDeleteString.get(), pBidiProps->pString, pBidiProps->bufferLength); + + pTestString = autoDeleteString.get(); + } + + std::unique_ptr pJoinTypes(new (std::nothrow) FriBidiJoiningType[textLength]); + + if (!pJoinTypes.get()) + { + return pBidiProps->pString; + } + + fribidi_get_joining_types(pTestString, textLength, pJoinTypes.get()); + + fribidi_join_arabic(pBidiProps->pCharTypes, textLength, pBidiProps->pEmbeddingLevels, pJoinTypes.get()); + + fribidi_shape(FRIBIDI_FLAGS_DEFAULT | FRIBIDI_FLAGS_ARABIC, pBidiProps->pEmbeddingLevels, textLength, pJoinTypes.get(), pTestString); + + if (sizeof(wchar_t) == sizeof(FriBidiChar)) + { + pBidiProps->pString = (wchar_t *) pTestString; + } + else + { + _ConvertCharacterCode(pBidiProps->pString, pTestString, textLength); + } + } + + return pBidiProps->pString; + + #undef CHECK_IF +} + +} // namespace + +namespace +{ +/* + * Reorders ustr according to the bidi props. + * + * @param pText the string to reorder. - Null is ok, will just populate the map. + * @param start the start of the line + * @param len the length of the line + * @param bidiProperty the paragraph props to reorder according to + * @param pOutVToL The visual to logical map to populate - if NULL it won't populate it. + */ +bool +_ReorderBidiLine(wchar_t* pText, size_t start, size_t len, const BidiParagraph& bidiProperty, FriBidiStrIndex** pOutVToL) +{ + #define CHECK_IF(cond) if (!(cond)) return false + + FriBidiChar* pTestString = NULL; + std::unique_ptr AutoDeleteString; + std::unique_ptr vToL; + + const size_t textLength = len; + + if (pText) + { + if (sizeof(wchar_t) == sizeof(FriBidiChar)) + { + pTestString = (FriBidiChar *) pText; + } + else + { + AutoDeleteString.reset(new (std::nothrow) FriBidiChar[textLength + 1]); + + CHECK_IF(AutoDeleteString.get()); + + _ConvertCharacterCode(AutoDeleteString.get(), pText, textLength); + + pTestString = AutoDeleteString.get(); + } + } + + if (pOutVToL) + { + vToL.reset(new (std::nothrow) FriBidiStrIndex[textLength]); + + CHECK_IF(vToL.get()); + + // init the array for fribidi + { + FriBidiStrIndex* pRefIndex = vToL.get(); + + for (size_t i = 0 ; i < textLength ; i++) + { + *pRefIndex++ = i; + } + } + } + + { + std::unique_ptr embeddingLevel(new (std::nothrow) FriBidiLevel[start + textLength]); + FriBidiLevel* pRefEmbeddingLevel = embeddingLevel.get(); + + CHECK_IF(pRefEmbeddingLevel); + + memcpy(pRefEmbeddingLevel, bidiProperty.pEmbeddingLevels, (start + textLength) * sizeof(FriBidiLevel)); + + if (vToL.get()) + { + // We pass vToL.get() - start, because fribidi assumes start is the offset from the start of vToL.get() as well, not just the props. + CHECK_IF(fribidi_reorder_line(FRIBIDI_FLAGS_DEFAULT, bidiProperty.pCharTypes, textLength, start, bidiProperty.direction, pRefEmbeddingLevel, pTestString, vToL.get() - start)); + } + else + { + CHECK_IF(fribidi_reorder_line(FRIBIDI_FLAGS_DEFAULT, bidiProperty.pCharTypes, textLength, start, bidiProperty.direction, pRefEmbeddingLevel, pTestString, NULL)); + } + } + + if (pText) + { + if (sizeof(wchar_t) != sizeof(FriBidiChar)) + { + _ConvertCharacterCode(pText, AutoDeleteString.get(), textLength); + } + } + + if (pOutVToL) + { + *pOutVToL = vToL.release(); + } + + return true; + + #undef CHECK_IF +} + +} + +//////////////////////////////////////////////////////////////////////////////// + +namespace Tizen { namespace Graphics +{ + +_TextBidiProperty::_TextBidiProperty(const wchar_t* pText, int length, BidiHint hint) + : pEventText(0) + , pCharType(0) + , pEmbeddingLevels(0) + , eventChar(0) + , baseDirection(FRIBIDI_PAR_ON) + , isRtl(false) + , length(0) + , pReserved(0) +{ + BidiParagraph* pBidiProperty = _GetBidiParagraphProperty(pText, length, NULL, hint); + + if (pBidiProperty) + { +#if 0 + this->pEventText = NULL; +#else + memcpy(pBidiProperty->pString, pText, length * sizeof(wchar_t)); + pBidiProperty->pString[length] = 0; + + this->pEventText = _GetBidiShapeString(pBidiProperty); +#endif + this->pCharType = pBidiProperty->pCharTypes; + this->pEmbeddingLevels = pBidiProperty->pEmbeddingLevels; + this->eventChar = (this->pEventText) ? *this->pEventText : 0; + this->baseDirection = pBidiProperty->direction; + this->isRtl = (this->pCharType) ? ((*this->pCharType & FRIBIDI_MASK_RTL) != 0) : false; + this->length = length; + + this->pReserved = static_cast(pBidiProperty); + } + else + { + this->pEventText = pText; + this->eventChar = (this->pEventText) ? *this->pEventText : 0; + this->length = length; + } +} + +_TextBidiProperty::_TextBidiProperty(const _TextBidiProperty& refBidiProperty, int offset, int length) + : pEventText(0) + , pCharType(0) + , pEmbeddingLevels(0) + , eventChar(0) + , baseDirection(FRIBIDI_PAR_ON) + , isRtl(false) + , length(0) + , pReserved(0) +{ + const wchar_t* pBegin = refBidiProperty.pEventText + offset; + const wchar_t* pEnd = pBegin + length; + + pBegin = (pBegin > refBidiProperty.pEventText) ? pBegin : refBidiProperty.pEventText; + pEnd = (refBidiProperty.pEventText + refBidiProperty.length < pEnd) ? refBidiProperty.pEventText + refBidiProperty.length : pEnd; + + if (pBegin <= pEnd) + { + offset = pBegin - refBidiProperty.pEventText; + length = pEnd - pBegin; + + this->pEventText = refBidiProperty.pEventText + offset; + this->pCharType = refBidiProperty.pCharType + offset; + this->pEmbeddingLevels = refBidiProperty.pEmbeddingLevels + offset; + this->eventChar = (this->pEventText) ? *this->pEventText : 0; + this->baseDirection = refBidiProperty.baseDirection; + this->isRtl = (this->pEmbeddingLevels) ? ((*this->pEmbeddingLevels & 0x01) != 0) : false; + this->length = length; + + // temporary + if (this->pCharType) + { + const FriBidiCharType* pBegin = this->pCharType; + const FriBidiCharType* pEnd = pBegin + length; + + while (pBegin < pEnd) + { + if (*pBegin & FRIBIDI_MASK_LETTER) + { + this->eventChar = *(this->pEventText + (pBegin - this->pCharType)); + break; + } + + ++pBegin; + } + } + } +} + +_TextBidiProperty::~_TextBidiProperty(void) +{ + if (pReserved) + { + delete static_cast(pReserved); + } +} + +bool +_TextBidiProperty::HasComplexText(void) const +{ + return ((pReserved != 0) || (!_TextBidiUtil::IsTextBidiBaseLtr())); +} + +_TextBidiPropertyWithReorder::_TextBidiPropertyWithReorder(const wchar_t* pText, int length, BidiHint hint) + : _TextBidiProperty(pText, length, hint) + , pBidiIndex(0) + , __pReorderedText(0) +{ + BidiParagraph* pBidiProperty = static_cast(this->pReserved); + + if (pBidiProperty) + { + FriBidiStrIndex* pTempIndex = 0; + + if (_ReorderBidiLine(NULL, 0, length, *pBidiProperty, &pTempIndex)) + { + pBidiIndex = pTempIndex; + } + } +} + +_TextBidiPropertyWithReorder::_TextBidiPropertyWithReorder(const _TextBidiProperty& refBidiProperty, int offset, int length) + : _TextBidiProperty(refBidiProperty, offset, length) + , pBidiIndex(0) + , __pReorderedText(0) +{ +} + +const wchar_t* +_TextBidiPropertyWithReorder::GetReorderedText(void) +{ + if ((__pReorderedText == NULL) && (pEventText != NULL) && (pBidiIndex != NULL)) + { + __pReorderedText = new (std::nothrow) wchar_t[length + 1]; + + if (__pReorderedText) + { + wchar_t* pTempText = __pReorderedText; + const wchar_t* pTempTextEnd = pTempText + length; + const FriBidiStrIndex* pTempBidiIndex = pBidiIndex; + + while (pTempText < pTempTextEnd) + { + *pTempText++ = pEventText[*pTempBidiIndex++]; + } + + *pTempText = 0; + } + + return __pReorderedText; + } + else + { + return pEventText; + } +} + +_TextBidiPropertyWithReorder::~_TextBidiPropertyWithReorder(void) +{ + delete[] pBidiIndex; + delete[] __pReorderedText; +} + +GUnicodeScript +_TextBidiUtil::GetUnicodeScript(const wchar_t unicode) +{ + static const struct MatchingTable + { + wchar_t min; + wchar_t max; + GUnicodeScript script; + } MATCHING_TABLE[] = + { + { 0x0600, 0x06ff, G_UNICODE_SCRIPT_ARABIC } + }; + + static const MatchingTable* pTableEnd = &MATCHING_TABLE[0] + sizeof(MATCHING_TABLE) / sizeof(MATCHING_TABLE[0]); + + const MatchingTable* pTable = &MATCHING_TABLE[0] - 1; + + while (++pTable < pTableEnd) + { + if ((pTable->min <= unicode) && (pTable->max >= unicode)) + { + return pTable->script; + } + } + + return g_unichar_get_script(unicode); +} + +bool +_TextBidiUtil::IsCollationElement(const wchar_t first, const wchar_t second) +{ + static const struct MatchingTable + { + wchar_t first; + wchar_t second; + } MATCHING_TABLE[] = + { + { 0x0644, 0x0622 }, // arabic letter + { 0x0644, 0x0623 }, + { 0x0644, 0x0625 }, + { 0x0644, 0x0627 }, + { 0x092F, 0x093C }, // Devanagari letter + { 0x0930, 0x093C }, + { 0x0933, 0x093C }, + { 0x0915, 0x093C }, + { 0x0916, 0x093C }, + { 0x0917, 0x093C }, + { 0x091C, 0x093C }, + { 0x0921, 0x093C }, + { 0x0922, 0x093C }, + { 0x092B, 0x093C }, + { 0x092F, 0x093C }, + { 0x09C7, 0x09BE }, // Bengali letter + { 0x09C7, 0x09D7 }, + { 0x09A1, 0x09BC }, + { 0x09A2, 0x09BC }, + { 0x09AF, 0x09BC }, + { 0x0020, 0x064B }, // arabic sign + { 0x0640, 0x064B }, + { 0x0020, 0x064C }, + { 0x0020, 0x064D }, + { 0x0020, 0x064E }, + { 0x0640, 0x064E }, + { 0x0020, 0x064F }, + { 0x0640, 0x064F }, + { 0x0020, 0x0650 }, + { 0x0640, 0x0650 }, + { 0x0020, 0x0651 }, + { 0x0640, 0x0651 }, + { 0x0020, 0x0652 }, + { 0x0640, 0x0652 }, + }; + + static const MatchingTable* pTableEnd = &MATCHING_TABLE[0] + sizeof(MATCHING_TABLE) / sizeof(MATCHING_TABLE[0]); + + const MatchingTable* pTable = &MATCHING_TABLE[0] - 1; + + while (++pTable < pTableEnd) + { + if ((pTable->first != first) || (pTable->second != second)) + { + continue; + } + + return true; + } + + return false; +} + +bool +_TextBidiUtil::GetReorderedIndexList(const _TextBidiPropertyWithReorder& refBidiProperty, const _Util::AccumList<_Util::Pair >& inputList, _Util::AccumList<_Util::Pair >& outList) +{ + if ((refBidiProperty.pEventText != NULL) && (refBidiProperty.pBidiIndex != NULL)) + { + int length = refBidiProperty.length; + + int* pCoIndex = new int[length]; + + int coIndex = 0; + + for (int i = 0; i < refBidiProperty.length; i++, coIndex++) + { + if ((i + 1 < length) && IsCollationElement(refBidiProperty.pEventText[i], refBidiProperty.pEventText[i + 1])) + { + pCoIndex[i] = coIndex; + pCoIndex[++i] = (1 << 24) | coIndex; + } + else + { + pCoIndex[i] = coIndex; + } + } + + typedef _Util::Pair Gap; + typedef _Util::AccumList GapList; + + GapList::Iterator dstBegin = outList.Begin(); + + int index = 0; + + for (GapList::ConstIterator src = inputList.Begin(); src != inputList.End(); ++src) + { + // for safty + if (index >= length) + { + break; + } + + int coIx = pCoIndex[refBidiProperty.pBidiIndex[index++]]; + int jump = coIx >> 24; + + index += jump; + + coIx &= 0x00FFFFFF; + + *(dstBegin + coIx) = *src; + } + + delete[] pCoIndex; + + return true; + } + + return false; +} + +namespace +{ + bool _isLtrBase = true; +} + +void +_TextBidiUtil::SetTextBidiBase(bool isLtr) +{ + _isLtrBase = isLtr; +} + +bool +_TextBidiUtil::IsTextBidiBaseLtr(void) +{ + return _isLtrBase; +} + +}} // Tizen::Graphics + + +//////////////////////////////////////////////////////////////////////////////// + +#include +#include +#include + +namespace Tizen { namespace Graphics +{ + +_FontGlyphList::_FontGlyphList(const _Util::String& reorderedText, void* pFace, int script) +{ + FT_Face face = FT_Face(pFace); + + hb_font_t* hSubFont = NULL; + hb_buffer_t* hBuffer = NULL; + + { + hb_font_t *hFont = hb_ft_font_create(face, NULL); + hSubFont = hb_font_create_sub_font(hFont); + hb_font_destroy (hFont); + } + + hBuffer = hb_buffer_create(); + hb_buffer_set_unicode_funcs(hBuffer, hb_unicode_funcs_get_default()); + + hb_buffer_set_script(hBuffer, hb_glib_script_to_script(GUnicodeScript(script))); + + hb_buffer_set_direction(hBuffer, (_TextBidiUtil::IsTextBidiBaseLtr()) ? HB_DIRECTION_LTR : HB_DIRECTION_RTL); + + int textLength = reorderedText.length; + + if (sizeof(wchar_t) == sizeof(uint32_t)) + { + hb_buffer_add_utf32(hBuffer, (const uint32_t*)reorderedText.pStart, textLength, 0, textLength); + } + else + { + uint32_t* pDst = new (std::nothrow) uint32_t[textLength + 1]; + + if (pDst) + { + { + const wchar_t* pSrc = reorderedText.pStart; + + uint32_t* pDstBegin = pDst; + uint32_t* pDstEnd = pDstBegin + textLength; + + while (pDstBegin < pDstEnd) + { + *pDstBegin++ = *pSrc++; + } + + *pDstBegin = 0; + } + + hb_buffer_add_utf32(hBuffer, pDst, textLength, 0, textLength); + + delete[] pDst; + } + } + + hb_shape(hSubFont, hBuffer, NULL, 0); + + this->__glyphCount = hb_buffer_get_length(hBuffer); + + if (int(this->__glyphCount) == textLength) + { + this->__pGlyphAuxInfo = new (std::nothrow) GlyphAuxInfo[this->__glyphCount]; + + if (this->__pGlyphAuxInfo) + { + hb_glyph_position_t* pPosition = hb_buffer_get_glyph_positions(hBuffer, NULL); + hb_glyph_info_t* pInfo = hb_buffer_get_glyph_infos(hBuffer, NULL); + + GlyphAuxInfo* pAuxInfo = &this->__pGlyphAuxInfo[0]; + GlyphAuxInfo* pAuxInfoEnd = pAuxInfo + this->__glyphCount; + + while (pAuxInfo < pAuxInfoEnd) + { + pAuxInfo->isAvailable = true; + pAuxInfo->glyphIndex = pInfo->codepoint; + pAuxInfo->xOffset.Reset(pPosition->x_offset); + pAuxInfo->yOffset.Reset(pPosition->y_offset); + pAuxInfo->xAdvance.Reset(pPosition->x_advance); + pAuxInfo->yAdvance.Reset(pPosition->y_advance); + + ++pInfo; + ++pPosition; + ++pAuxInfo; + } + } + } + else if (int(this->__glyphCount) < textLength) + { + int tempCount = this->__glyphCount; + + this->__glyphCount = textLength; + + this->__pGlyphAuxInfo = new (std::nothrow) GlyphAuxInfo[textLength]; + + if (this->__pGlyphAuxInfo) + { + memset(static_cast(this->__pGlyphAuxInfo), 0, sizeof(GlyphAuxInfo) * this->__glyphCount); + + hb_glyph_position_t* pPosition = hb_buffer_get_glyph_positions(hBuffer, NULL); + hb_glyph_info_t* pInfo = hb_buffer_get_glyph_infos(hBuffer, NULL); + + GlyphAuxInfo* pAuxInfo = &this->__pGlyphAuxInfo[0]; + GlyphAuxInfo* pAuxInfoEnd = pAuxInfo + textLength; + + int textIndex = 0; + + while (pAuxInfo < pAuxInfoEnd && textIndex < tempCount) + { + pAuxInfo->isAvailable = true; + pAuxInfo->glyphIndex = pInfo->codepoint; + pAuxInfo->xOffset.Reset(pPosition->x_offset); + pAuxInfo->yOffset.Reset(pPosition->y_offset); + pAuxInfo->xAdvance.Reset(pPosition->x_advance); + pAuxInfo->yAdvance.Reset(pPosition->y_advance); + + bool isCollationElement = false; + + if (script == G_UNICODE_SCRIPT_ARABIC) + { + isCollationElement = ((textIndex + 1 < textLength) && _TextBidiUtil::IsCollationElement(*(reorderedText.pStart + textIndex + 1), *(reorderedText.pStart + textIndex))); + } + else + { + isCollationElement = ((textIndex + 1 < textLength) && _TextBidiUtil::IsCollationElement(*(reorderedText.pStart + textIndex), *(reorderedText.pStart + textIndex + 1))); + } + + if (isCollationElement) + { + ++pAuxInfo; + ++textIndex; + ++tempCount; + pAuxInfo->isAvailable = false; + } + + ++pInfo; + ++pPosition; + ++pAuxInfo; + ++textIndex; + } + } + } + else if (int(this->__glyphCount) > textLength) + { + this->__pGlyphAuxInfo = new (std::nothrow) GlyphAuxInfo[this->__glyphCount]; + + if (this->__pGlyphAuxInfo) + { + memset(static_cast(this->__pGlyphAuxInfo), 0, sizeof(GlyphAuxInfo) * this->__glyphCount); + + hb_glyph_position_t* pPosition = hb_buffer_get_glyph_positions(hBuffer, NULL); + hb_glyph_info_t* pInfo = hb_buffer_get_glyph_infos(hBuffer, NULL); + + GlyphAuxInfo* pAuxInfo = &this->__pGlyphAuxInfo[0]; + GlyphAuxInfo* pAuxInfoEnd = pAuxInfo + this->__glyphCount; + + int textIndex = 0; + + while (pAuxInfo < pAuxInfoEnd) + { + pAuxInfo->isAvailable = true; + pAuxInfo->glyphIndex = pInfo->codepoint; + pAuxInfo->xOffset.Reset(pPosition->x_offset); + pAuxInfo->yOffset.Reset(pPosition->y_offset); + pAuxInfo->xAdvance.Reset(pPosition->x_advance); + pAuxInfo->yAdvance.Reset(pPosition->y_advance); + + bool isCollationElement = false; + + if (script == G_UNICODE_SCRIPT_ARABIC) + { + isCollationElement = ((textIndex + 1 < textLength) && _TextBidiUtil::IsCollationElement(*(reorderedText.pStart + textIndex + 1), *(reorderedText.pStart + textIndex))); + } + else + { + isCollationElement = ((textIndex + 1 < textLength) && _TextBidiUtil::IsCollationElement(*(reorderedText.pStart + textIndex), *(reorderedText.pStart + textIndex + 1))); + } + + if (isCollationElement) + { + ++pAuxInfo; + ++textIndex; + pAuxInfo->isAvailable = false; + } + + ++pInfo; + ++pPosition; + ++pAuxInfo; + ++textIndex; + } + } + } + + hb_buffer_destroy(hBuffer); + hb_font_destroy(hSubFont); +} + +_FontGlyphList::~_FontGlyphList(void) +{ + delete[] __pGlyphAuxInfo; +} + +unsigned int _FontGlyphList::GetCount(void) const +{ + return __glyphCount; +} + +const _FontGlyphList::GlyphAuxInfo& _FontGlyphList::GetGlyphAuxInfo(unsigned int index) const +{ + static const GlyphAuxInfo nullInfo = + { + false, 0, _Util::FixedPoint26_6(0), _Util::FixedPoint26_6(0), _Util::FixedPoint26_6(0), _Util::FixedPoint26_6(0) + }; + + return (index < __glyphCount) ? __pGlyphAuxInfo[index] : nullInfo; +} + +}} // Tizen::Graphics diff --git a/src/graphics/FGrp_FontBidiUtil.h b/src/graphics/FGrp_FontBidiUtil.h new file mode 100644 index 0000000..a5b1e3a --- /dev/null +++ b/src/graphics/FGrp_FontBidiUtil.h @@ -0,0 +1,123 @@ +// +// 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_FontBidiUtil.h + * @brief This is the header file for the bidi utilities. + * + */ + +#ifndef _FGRP_INTERNAL_FONT_BIDI_UTIL_H_ +#define _FGRP_INTERNAL_FONT_BIDI_UTIL_H_ + +#include +#include + +#include "util/FGrp_UtilTemplate.h" + +namespace Tizen { namespace Graphics +{ + +struct _TextBidiProperty +{ + enum BidiHint + { + BIDI_HINT_NONE, + BIDI_HINT_LTR, + BIDI_HINT_RTL + }; + + const wchar_t* pEventText; + const FriBidiCharType* pCharType; + const FriBidiLevel* pEmbeddingLevels; + wchar_t eventChar; + FriBidiParType baseDirection; + bool isRtl; + int length; + void* pReserved; + + _TextBidiProperty(const wchar_t* pText, int length, BidiHint hint = BIDI_HINT_NONE); + _TextBidiProperty(const _TextBidiProperty& refBidiProperty, int offset, int length); + virtual ~_TextBidiProperty(void); + + bool HasComplexText(void) const; +}; + +struct _TextBidiPropertyWithReorder + : public _TextBidiProperty +{ + const FriBidiStrIndex* pBidiIndex; + + _TextBidiPropertyWithReorder(const wchar_t* pText, int length, BidiHint hint = BIDI_HINT_NONE); + _TextBidiPropertyWithReorder(const _TextBidiProperty& refBidiProperty, int offset, int length); + virtual ~_TextBidiPropertyWithReorder(void); + + const wchar_t* GetReorderedText(void); + +private: + wchar_t* __pReorderedText; +}; + +struct _TextBidiUtil +{ + static GUnicodeScript GetUnicodeScript(const wchar_t unicode); + + static bool IsCollationElement(const wchar_t first, const wchar_t second); + + static bool GetReorderedIndexList(const _TextBidiPropertyWithReorder& refBidiProperty, const _Util::AccumList<_Util::Pair >& inputList, _Util::AccumList<_Util::Pair >& outList); + + static void SetTextBidiBase(bool isLtr); + static bool IsTextBidiBaseLtr(void); +}; + +}} // Tizen::Graphics + +//////////////////////////////////////////////////////////////////////////////// + +#include "util/FGrp_UtilType.h" + +namespace Tizen { namespace Graphics +{ + +class _FontGlyphList +{ +public: + struct GlyphAuxInfo + { + bool isAvailable; + unsigned int glyphIndex; + _Util::FixedPoint26_6 xOffset; + _Util::FixedPoint26_6 yOffset; + _Util::FixedPoint26_6 xAdvance; + _Util::FixedPoint26_6 yAdvance; + }; + +public: + _FontGlyphList(const _Util::String& text, void* pFace, int script); + ~_FontGlyphList(void); + + unsigned int GetCount(void) const; + const GlyphAuxInfo& GetGlyphAuxInfo(unsigned int index) const; + +private: + unsigned int __glyphCount; + GlyphAuxInfo* __pGlyphAuxInfo; +}; + +}} // Tizen::Graphics + +#endif // _FGRP_INTERNAL_FONT_BIDI_UTIL_H_ diff --git a/src/graphics/FGrp_FontCache.cpp b/src/graphics/FGrp_FontCache.cpp new file mode 100644 index 0000000..98614d8 --- /dev/null +++ b/src/graphics/FGrp_FontCache.cpp @@ -0,0 +1,421 @@ +// +// 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_FontCache.cpp + * @brief This is the cpp file for _FontCache class. + * + */ + +#include +#include + +#include + +#include + +#include "FGrp_FontCache.h" +#include "FGrp_FontRsrcManager.h" +#include "util/FGrp_UtilType.h" + +#define __pBspCache ((_BspTree*)__pCache) + + +namespace // unnamed +{ + +inline bool +_MakeId(unsigned long glyphIndex, Tizen::Graphics::_Util::FixedPoint26_6 size, int style, unsigned long& out) +{ + int fixedSize = size >> 5; + + style &= ~4; + + if (((glyphIndex >> 22) > 0) || ((fixedSize >> 8) > 0) || ((style >> 2) > 0)) + { + return false; + } + + out = (glyphIndex << 10) | ((fixedSize & 0xFF) << 2) | (style & 0x3); + + return true; +} + +template +inline unsigned long _MakeIndex(Type id, int level); + +template <> +inline unsigned long +_MakeIndex(unsigned long id, int level) +{ + typedef unsigned long TBase; + + TBase index = (id & (0x80808080 >> level)) >> ((sizeof(TBase) * 2 - 1) - level); + + index |= (index >> 7); + index |= (index >> 14); + index |= (index >> 21); + + return (index & 0x0000000F); +} + +template +class _BspTree +{ + enum + { + MAX_CHILD = 16, + MAX_LEVEL = sizeof(TId) * 2 + }; + +public: + _BspTree(int level = 0) + : __level(level) + , __data(null) + { + for (int i = 0; i < MAX_CHILD; i++) + { + __child[i] = null; + } + } + + ~_BspTree(void) + { + __Destroy(); + } + + bool Add(TId id, TData data) + { + if (__IsEdge()) + { + // shkim, TODO. + // collision should not be occured. + __data = data; + return true; + } + + unsigned long index = __GetIndex(id); + + if (__child[index] == null) + { + __child[index] = new (std::nothrow) _BspTree(__level + 1); + if (__child[index] == null) + { + return false; + } + } + + return __child[index]->Add(id, data); + } + + TData Find(TId id) const + { + if (__data != null) + { + return __data; + } + + unsigned long index = __GetIndex(id); + + if (__child[index]) + { + return __child[index]->Find(id); + } + + return 0; + } + + TData Remove(TId id) + { + TData found = 0; + __Remove(id, found); + return found; + } + +private: + void __Destroy(void) + { + for (int i = 0; i < MAX_CHILD; i++) + { + delete __child[i]; + __child[i] = null; + } + + Tizen::Graphics::_FontRsrcManager::GetInstance().GetMemoryManager().Free(__data); + + __data = null; + } + + bool __IsEdge(void) const + { + return (__level >= MAX_LEVEL); + } + + inline unsigned long __GetIndex(TId id) const + { + return _MakeIndex(id, __level); + } + + bool __Remove(TId id, TData& found) + { + if (__data != null) + { + found = __data; + return true; + } + + unsigned long index = __GetIndex(id); + + if (__child[index]) + { + if (__child[index]->__Remove(id, found)) + { + delete __child[index]; + __child[index] = null; + + unsigned long check = 0; + + for (int i = 0; i < MAX_CHILD; i++) + { + check |= (unsigned long)__child[i]; + } + + return (check == 0); + } + } + + return false; + } + + int __level; + TData __data; + _BspTree* __child[MAX_CHILD]; +}; + +} + +namespace Tizen { namespace Graphics +{ + +class _FontCacheImpl +{ +public: + _FontCacheImpl(void) + { + } + + virtual ~_FontCacheImpl(void) + { + } + + void Add(unsigned long id) + { + __leastRecentlyUsedKeyList.push_back(id); + } + + void Remove(unsigned long id) + { + __leastRecentlyUsedKeyList.remove(id); + } + + void RemoveFirst(void) + { + __leastRecentlyUsedKeyList.pop_front(); + } + + void RemoveAll(void) + { + __leastRecentlyUsedKeyList.clear(); + } + + unsigned long GetFirst(void) + { + return __leastRecentlyUsedKeyList.front(); + } + + bool IsEmpty(void) + { + return __leastRecentlyUsedKeyList.empty(); + } + +private: + //_BspTree bspTree; + std::list __leastRecentlyUsedKeyList; +}; + +_FontCache::_FontCache(void) + : __pCache((void*) new (std::nothrow) _BspTree()) +{ + __pFontCacheImpl = new (std::nothrow) _FontCacheImpl; +} + +_FontCache::~_FontCache(void) +{ + delete reinterpret_cast<_BspTree*>(__pCache); + __pCache = null; + + delete __pFontCacheImpl; + __pFontCacheImpl = null; +} + +bool +_FontCache::IsValid(void) const +{ + return (this->__pCache && this->__pFontCacheImpl); +} + +bool +_FontCache::Find(unsigned long glyphIndex, _Util::FixedPoint26_6 size, int style, _IFont::Glyph** pOut) +{ + unsigned long id = 0; + bool rtn = _MakeId(glyphIndex, size, style, id); + + if (!rtn) + { + return false; + } + + _IFont::Glyph* p = (_IFont::Glyph*)__pBspCache->Find(id); + + if (p != null) + { + *pOut = p; + return true; + } + else + { + return false; + } +} + +bool +_FontCache::Add(unsigned long glyphIndex, _Util::FixedPoint26_6 size, int style, _IFont::Glyph* pGlyph) +{ + unsigned long bufferSize = 0; + unsigned long id = 0; + bool rtn = _MakeId(glyphIndex, size, style, id); + if (!rtn) + { + // Requested glyph is not cachable + return false; + } + + bufferSize = sizeof(_IFont::Glyph) + (pGlyph->image.bytesPerLine * pGlyph->image.height); + _IFont::Glyph* pGlyphCache = (_IFont::Glyph*) _FontRsrcManager::GetInstance().GetMemoryManager().Alloc(bufferSize); + if (pGlyphCache == null) + { + // secure memory + bool rtn = _FontRsrcManager::GetInstance().RemoveMemory(bufferSize); + + if (!rtn) + { + return false; + } + + pGlyphCache = (_IFont::Glyph*) _FontRsrcManager::GetInstance().GetMemoryManager().Alloc(bufferSize); + + if (pGlyphCache == null) + { + return false; + } + } + + memcpy(pGlyphCache, pGlyph, sizeof(_IFont::Glyph)); + pGlyphCache->image.pBitmap = (unsigned char*)((pGlyphCache) + 1); + memcpy(pGlyphCache->image.pBitmap, pGlyph->image.pBitmap, pGlyph->image.bytesPerLine * pGlyph->image.height); + + if (__pBspCache->Add(id, pGlyphCache)) + { + __pFontCacheImpl->Add(id); + return true; + } + else + { + return false; + } +} + +void +_FontCache::Remove(unsigned long glyphIndex, _Util::FixedPoint26_6 size, int style) +{ + unsigned long id = 0; + bool rtn = _MakeId(glyphIndex, size, style, id); + if (!rtn) + { + return; + } + + __pBspCache->Remove(id); + __pFontCacheImpl->Remove(id); +} + +void +_FontCache::RemoveFirst(void) +{ + unsigned long id = 0; + + id = __pFontCacheImpl->GetFirst(); + + __pBspCache->Remove(id); + __pFontCacheImpl->RemoveFirst(); +} + +bool +_FontCache::IsEmpty(void) +{ + return __pFontCacheImpl->IsEmpty(); +} + +bool +_FontCache::Cleanup(void) +{ + _BspTree* p = reinterpret_cast<_BspTree*>(__pCache); + + p->~_BspTree(); + new (p) _BspTree(); + + __pFontCacheImpl->RemoveAll(); + + return true; +} + +bool +_FontCache::__DiscardVictim(unsigned long requestedSize) +{ + return true; +} + +bool +_FontCache::__RemoveId(unsigned long id) +{ + _IFont::Glyph* pCachedGlyph = null; + + pCachedGlyph = (_IFont::Glyph*)__pBspCache->Find(id); + + if (pCachedGlyph != null) + { + __pBspCache->Remove(id); + + return true; + } + else + { + return false; + } +} + +}} // Tizen::Graphics diff --git a/src/graphics/FGrp_FontCache.h b/src/graphics/FGrp_FontCache.h new file mode 100644 index 0000000..593e1a3 --- /dev/null +++ b/src/graphics/FGrp_FontCache.h @@ -0,0 +1,70 @@ +// +// 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_FontCache.h + * @brief This is the header file for _FontCache class. + * + */ + +#ifndef _FGRP_INTERNAL_FONT_CACHE_H_ +#define _FGRP_INTERNAL_FONT_CACHE_H_ + +#include + +#include + +#include "FGrp_IFont.h" + + +namespace Tizen { namespace Graphics +{ + +class _FontCache + : public Tizen::Base::Object +{ +public: + _FontCache(void); + virtual ~_FontCache(void); + + bool IsValid(void) const; + + bool Find(unsigned long glyphIndex, _Util::FixedPoint26_6 size, int style, _IFont::Glyph** pOut); + bool Add(unsigned long glyphIndex, _Util::FixedPoint26_6 size, int style, _IFont::Glyph* pGlyph); + void Remove(unsigned long glyphIndex, _Util::FixedPoint26_6 size, int style); + void RemoveFirst(void); + bool IsEmpty(void); + + bool Cleanup(void); + +private: + _FontCache(const _FontCache& obj); + _FontCache& operator =(const _FontCache& rhs); + _FontCache* operator &(void); + + bool __DiscardVictim(unsigned long requestedSize); + bool __RemoveId(unsigned long id); + + void* __pCache; + + friend class _FontCacheImpl; + class _FontCacheImpl* __pFontCacheImpl; +}; + +}} // Tizen::Graphics + +#endif // _FGRP_INTERNAL_FONT_CACHE_H_ 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 new file mode 100644 index 0000000..12f45ad --- /dev/null +++ b/src/graphics/FGrp_FontFt2.cpp @@ -0,0 +1,1234 @@ +// +// 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_FontFt2.cpp + * @brief This is the implementation file for _FontFt2 class. + * + */ + +#include +#include + +#include + +#include +#include +#include FT_FREETYPE_H +#include FT_OUTLINE_H + +#include + +#include +#include +#include + +#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" + +#define CHECK_NULL_PARAM(data) if (data == null) \ + { \ + return false; \ + } + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; + +namespace // unnamed +{ +const double _M_PI = 3.14159265358979323846; +const double _ITALIC_ANGLE = 10.619655; +const _Util::FixedPoint26_6 _SYSTEM_DEFAULT_FONT_SIZE(16); +const long _DEFAULT_RES = 72; + +const unsigned long _INDEX_FIRST = 32; // in first resource, the first chracter(space) +const unsigned long _INDEX_COUNT = 95; // first resource character count + +const long _MEDIUM_FONT_BOLD_WEIGHT = 600; + +#ifdef USE_HASHMAP_FOR_FONT +template +class _FontHashCodeProvider + : public IHashCodeProviderT +{ +public: + virtual int GetHashCode(const T& obj) const + { + return obj.GetHashCode(); + } +}; // _FontHashCodeProvider + +template +class _FontComparer + : public IComparerT +{ +public: + virtual result Compare(const T& obj1, const T& obj2, int& cmp) const + { + String& objString1 = static_cast (const_cast (obj1)); + String& objString2 = static_cast (const_cast (obj2)); + + cmp = objString1.CompareTo(objString2); + + return E_SUCCESS; + } +}; // _FontComparer + +template +class _FontHashCodeProviderEx + : public IHashCodeProviderT +{ +public: + virtual int GetHashCode(const T& obj) const + { + const wchar_t* pText = obj.c_str(); + const wchar_t* pTextEnd = pText - 1; + + while (*(++pTextEnd)) + ; + + int stride = ((pTextEnd - pText + 1) << 16) / 9; + int ix16 = 0; + + int ret1 = (pText[(ix16 += stride) >> 16] & 0xFF); + ret1 |= ((pText[(ix16 += stride) >> 16] & 0xFF) << 8); + ret1 |= ((pText[(ix16 += stride) >> 16] & 0xFF) << 16); + ret1 |= ((pText[(ix16 += stride) >> 16] & 0xFF) << 24); + + int ret2 = (pText[(ix16 += stride) >> 16] & 0xFF); + ret2 |= ((pText[(ix16 += stride) >> 16] & 0xFF) << 8); + ret2 |= ((pText[(ix16 += stride) >> 16] & 0xFF) << 16); + ret2 |= ((pText[(ix16 += stride) >> 16] & 0xFF) << 24); + + return ret1 ^ ret2; + } +}; // _FontHashCodeProviderEx + +template +class _FontComparerEx + : public IComparerT +{ +public: + virtual result Compare(const T& obj1, const T& obj2, int& cmp) const + { + cmp = wcscmp((wchar_t*)obj1.c_str(), (wchar_t*)obj2.c_str()); + + return E_SUCCESS; + } +}; // _FontComparerEx + +const _FontHashCodeProviderEx<_Util::WString> _fontHashCodeProviderEx; +const _FontComparerEx<_Util::WString> _fontComparerEx; +#endif +} // unnamed + +namespace Tizen { namespace Graphics +{ + +inline bool +_IsEqual(float f1, float f2) +{ + return (((f1 > f2) ? f1 - f2 : f2 - f1) < 0.00001f); // epsilon is assumed to be 0.0001, not 1.192092896e-07f +} + +_FontFt2::_FontFt2() + : __isValid(false) + , __isLoadGlyph(false) + , __pFontEngine(null) + , __pFontFace(null) + , __pFontBuffer(null) + , __isStaticBuffer(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.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); +#endif + + //create cache + __fontCache.reset(new (std::nothrow) _FontCache()); +} + +_FontFt2::~_FontFt2() +{ + if (!__isValid) + { + return; + } + + __CleanUp(); + __isValid = false; + +#ifdef USE_HASHMAP_FOR_FONT + __fallbackFontMap.RemoveAll(); +#else + __fallbackFontMap.clear(); +#endif +} + +bool +_FontFt2::Create(const void* pBuffer, long bufSize, long face) +{ + if (__isValid) + { + return false; + } + + int error = FT_Init_FreeType(static_cast((void*) &__pFontEngine)); + + if (error) + { + __CleanUp(); + + return false; + } + + // should keep the buffer + __pFontBuffer = new (std::nothrow) byte[bufSize]; + + if (!__pFontBuffer) + { + __CleanUp(); + + return false; + } + + memcpy(__pFontBuffer, pBuffer, bufSize); + + error = FT_New_Memory_Face(FT_Library(__pFontEngine), (const byte*) __pFontBuffer, bufSize, face, static_cast((void*) &__pFontFace)); + + if (error) + { + __CleanUp(); + + return false; + } + + FT_Face pFace = FT_Face(__pFontFace); + + if ((pFace->charmap == null) && (pFace->num_charmaps > 0)) + { + FT_Set_Charmap(pFace, pFace->charmaps[0]); + } + + __isValid = true; + + __InitProperty(); + + return true; +} + +bool +_FontFt2::Create(const char* pFilePath, long face) +{ + if (__isValid) + { + return false; + } + + int error = FT_Init_FreeType(static_cast((void*) &__pFontEngine)); + + if (error) + { + __CleanUp(); + + return false; + } + + error = FT_New_Face(FT_Library(__pFontEngine), pFilePath, face, static_cast((void*) &__pFontFace)); + + if (error) + { + __CleanUp(); + + return false; + } + + FT_Face pFace = FT_Face(__pFontFace); + + if ((pFace->charmap == null) && (pFace->num_charmaps > 0)) + { + FT_Set_Charmap(pFace, pFace->charmaps[0]); + } + + __isValid = true; + + __InitProperty(); + + return true; +} + +bool +_FontFt2::CreateStatic(const void* pBuffer, long bufSize, long face) +{ + if (__isValid) + { + return false; + } + + FT_Face pFace = null; + + int error = FT_Init_FreeType(static_cast((void*) &__pFontEngine)); + + if (error) + { + __CleanUp(); + + return false; + } + + __pFontBuffer = const_cast(pBuffer); + __isStaticBuffer = true; + + error = FT_New_Memory_Face(FT_Library(__pFontEngine), (const byte*) __pFontBuffer, bufSize, face, static_cast((void*) &__pFontFace)); + + if (error) + { + __CleanUp(); + + return false; + } + + pFace = FT_Face(__pFontFace); + + if ((pFace->charmap == null) && (pFace->num_charmaps > 0)) + { + FT_Set_Charmap(pFace, pFace->charmaps[0]); + } + + __isValid = true; + + __InitProperty(); + + return true; +} + +bool +_FontFt2::Reload(const void* pBuffer, long bufSize, long face) +{ + if (!__isValid) + { + return false; + } + + std::unique_ptr pReloadBuffer(new (std::nothrow) byte[bufSize]); + + if (pReloadBuffer == null) + { + return false; + } + + memcpy(pReloadBuffer.get(), pBuffer, bufSize); + + void* pReloadFace = null; + + int error = FT_New_Memory_Face(FT_Library(__pFontEngine), (const byte*) pReloadBuffer.get(), bufSize, face, static_cast((void*) &pReloadFace)); + + if (error) + { + return false; + } + + //clean resource + if (__pFontFace) + { + FT_Done_Face(FT_Face(__pFontFace)); + __pFontFace = null; + } + + if (__pFontBuffer && !__isStaticBuffer) + { + delete[] static_cast(__pFontBuffer); + } + + // assign new resource + __pFontBuffer = pReloadBuffer.release(); + __pFontFace = pReloadFace; + __isStaticBuffer = false; + + FT_Face pFace = FT_Face(__pFontFace); + + if ((pFace->charmap == null) && (pFace->num_charmaps > 0)) + { + FT_Set_Charmap(pFace, pFace->charmaps[0]); + } + + __isValid = true; + + __InitProperty(); + + return true; +} + +bool +_FontFt2::Reload(const char* filePath, long face) +{ + if (!__isValid) + { + return false; + } + + void* pReloadFace = null; + + int error = FT_New_Face(FT_Library(__pFontEngine), filePath, face, static_cast((void*) &pReloadFace)); + + if (error) + { + return false; + } + + //clean resource + if (__pFontFace) + { + FT_Done_Face(FT_Face(__pFontFace)); + __pFontFace = null; + } + + // assign new resource + __pFontFace = pReloadFace; + __isStaticBuffer = false; + + FT_Face pFace = FT_Face(__pFontFace); + + if ((pFace->charmap == null) && (pFace->num_charmaps > 0)) + { + FT_Set_Charmap(pFace, pFace->charmaps[0]); + } + + __isValid = true; + + __InitProperty(); + + return true; +} + +void +_FontFt2::Destroy(void) +{ + if (!__isValid) + { + return; + } + + __CleanUp(); + __isValid = false; +} + +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; +} + +bool +_FontFt2::AddCache(unsigned long glyphIndex, _Util::FixedPoint26_6 size, int style, Glyph* pGlyph) +{ + if (pGlyph->xAdvance == 0 && pGlyph->image.width == 0) + { + return false; + } + + if (__fontAttrib.xExpansion != 1.0f) + { + return false; + } + + return (__fontCache.get()) ? __fontCache->Add(glyphIndex, size, style, pGlyph) : false; +} + +bool +_FontFt2::SetAttrib(const Attrib& fontAttrib) +{ + if (!__isValid) + { + return false; + } + + if (!(fontAttrib.size >= 1) || + !(fontAttrib.quality >= 0 && fontAttrib.quality <= 3) || + !(fontAttrib.xExpansion > 0.0f) || + !(fontAttrib.boldWeight > 0)) + { + return false; + } + + if (FT_IS_SCALABLE(FT_Face(__pFontFace)) == 0) + { + return false; + } + + if (__fontAttrib.size != fontAttrib.size) + { + if (FT_Set_Char_Size(FT_Face(__pFontFace), fontAttrib.size.__fixedPoint * _DEFAULT_RES, fontAttrib.size.__fixedPoint * _DEFAULT_RES, 1, 1) > 0) + { + return false; + } + } + + // set + memcpy(&__fontAttrib, &fontAttrib, sizeof(fontAttrib)); + + return true; +} + +bool +_FontFt2::GetAttrib(Attrib& fontAttrib) const +{ + if (!__isValid) + { + return false; + } + + fontAttrib.angle = __fontAttrib.angle; + fontAttrib.quality = __fontAttrib.quality; + fontAttrib.size = __fontAttrib.size; + fontAttrib.style = __fontAttrib.style; + fontAttrib.xExpansion = __fontAttrib.xExpansion; + fontAttrib.boldWeight = __fontAttrib.boldWeight; + + return true; +} + +bool +_FontFt2::GetKerning(unsigned long character1, unsigned long character2, long& xVector, long& yVector) const +{ + if (!__isValid) + { + return false; + } + + bool isCharacter1InEnglish = false; + bool isCharacter2InEnglish = false; + FT_Face pFace = null; + unsigned long index1 = 0; + unsigned long index2 = 0; + + if (character1 >= _INDEX_FIRST && character1 < (_INDEX_FIRST + _INDEX_COUNT)) + { + isCharacter1InEnglish = true; + } + + if (character2 >= _INDEX_FIRST && character2 < (_INDEX_FIRST + _INDEX_COUNT)) + { + isCharacter2InEnglish = true; + } + + if (isCharacter1InEnglish != isCharacter2InEnglish) + { + xVector = 0; + yVector = 0; + return true; + } + + pFace = FT_Face(__pFontFace); + index1 = __GetGlyphIndex(character1); + index2 = __GetGlyphIndex(character2); + + bool hasKerning = false; + + hasKerning = (FT_HAS_KERNING(pFace) != 0); + + if (hasKerning) + { + FT_Vector delta; + + int isSuccess = FT_Get_Kerning(pFace, index1, index2, ft_kerning_default, &delta); + + if (isSuccess != 0) //0 means success. + { + return false; + } + + _Util::FixedPoint26_6 deltaX; + _Util::FixedPoint26_6 deltaY; + + deltaX.Reset(delta.x); + deltaY.Reset(delta.y); + + xVector = deltaX.ToInt(); + yVector = deltaY.ToInt(); + } + else + { + xVector = 0; + yVector = 0; + } + + return true; +} + +bool +_FontFt2::LoadGlyph(unsigned long character, Glyph** ppFontGlyphData) +{ + if (!__isValid) + { + return false; + } + + CHECK_NULL_PARAM(__pFontFace); + CHECK_NULL_PARAM(ppFontGlyphData); + + FT_UInt glyphIndex = __GetGlyphIndex(character); + + bool rtn = FindCache(glyphIndex, __fontAttrib.size, __fontAttrib.style, ppFontGlyphData); + + if (rtn) + { + return true; + } + + *ppFontGlyphData = null; + + FT_Face pFace = null; + + pFace = FT_Face(__pFontFace); + + if (!FT_IS_SCALABLE(pFace)) + { + SysLog(NID_GRP, "[] FT_IS_SCALABLE has been failed"); + } + + // set transformation + FT_Matrix matrix; + FT_Vector pen = {0, 0}; + __SetTransMatrix(&matrix); + FT_Set_Transform(pFace, &matrix, &pen); + + if (__fontAttrib.quality == _IFont::QUALITY_LOW || + __fontAttrib.quality == _IFont::QUALITY_MEDIUM || + __fontAttrib.quality == _IFont::QUALITY_HIGH) + { + FT_Error errCode = 1; + + bool isSynthetic = (__fontAttrib.style & _IFont::STYLE_BOLD) && (__fontProperty.weightClass < _MEDIUM_FONT_BOLD_WEIGHT); + + if (isSynthetic) + { + errCode = FT_Load_Glyph(pFace, glyphIndex, FT_LOAD_DEFAULT | FT_LOAD_NO_BITMAP); + } + else + { + //errCode = FT_Load_Glyph(pFace, glyphIndex, FT_LOAD_RENDER); + errCode = FT_Load_Glyph(pFace, glyphIndex, FT_LOAD_DEFAULT); + } + + if (errCode) // 0: success + { + SysLogException(NID_GRP, E_SYSTEM, "[E_SYSTEM] FT_Load_Glyph_HighQuality(errCode = %#x)=", errCode); + + return false; + } + + 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); + } + else if (__fontAttrib.quality == _IFont::QUALITY_MONO) + { + //TODO sunmi557.shin, will not support + FT_Error errCode = 1; + + errCode = FT_Load_Glyph(pFace, glyphIndex, FT_LOAD_RENDER | FT_LOAD_MONOCHROME); + + if (errCode) + { + SysLogException(NID_GRP, E_SYSTEM, "[E_SYSTEM] FT_Load_Glyph_MONO(errCode = %#x)=", errCode); + + return false; + } + } + else + { + SysLogException(NID_GRP, E_SYSTEM, "[E_SYSTEM] The quality of the FontFT2 is invalid!"); + + return false; + } + + __isLoadGlyph = __ConvertPrivateToImage(pFace->glyph, ppFontGlyphData); + + if (__isLoadGlyph) + { + rtn = AddCache(glyphIndex, __fontAttrib.size, __fontAttrib.style, *ppFontGlyphData); + } + + if (*ppFontGlyphData != null) + { + (*ppFontGlyphData)->hasOwnerShip = (__isLoadGlyph) ? 1 : 0; + } + + return __isLoadGlyph; +} + +bool +_FontFt2::UnloadGlyph(Glyph** ppFontGlyphData) +{ + if (!__isValid) + { + return false; + } + + CHECK_NULL_PARAM(ppFontGlyphData); + + if ((*ppFontGlyphData) && ((*ppFontGlyphData)->hasOwnerShip != 1)) + { + // s.woo Need to check condition. + return false; + } + + delete[] (char*) (*ppFontGlyphData); + + *ppFontGlyphData = null; + __isLoadGlyph = false; + + return true; +} + +unsigned long +_FontFt2::CheckGlyph(unsigned long character) +{ + return __GetGlyphIndex(character); +} + +bool +_FontFt2::GetFontSizeProperty(SizeProperty& sizeProperty) const +{ + if (!__isValid) + { + return false; + } + + FT_Face pFace = (FT_Face) __pFontFace; + + if (FT_IS_SCALABLE(pFace)) + { + // validation check + if (pFace->size == null) + { + return false; + } + + // fill out + _Util::FixedPoint26_6 yMax = _Util::FixedPoint26_6((pFace->bbox.yMax * pFace->size->metrics.y_ppem) / pFace->units_per_EM); + + sizeProperty.maxWidth.Reset(pFace->size->metrics.max_advance); + sizeProperty.maxHeight.Reset(pFace->size->metrics.height); + sizeProperty.baseLine.Reset(pFace->size->metrics.height + pFace->size->metrics.descender); + sizeProperty.ascender.Reset(pFace->size->metrics.ascender); + sizeProperty.descender.Reset(pFace->size->metrics.descender); // (-) + sizeProperty.leading.Reset(yMax - sizeProperty.ascender > 0 ? yMax - sizeProperty.ascender : 0); + + if (_CompareFamilyForTitling(pFace->family_name)) + { + _Util::FixedPoint26_6 yMin = _Util::FixedPoint26_6((pFace->bbox.yMin * pFace->size->metrics.y_ppem) / pFace->units_per_EM); + + if (sizeProperty.ascender < yMax) + { + sizeProperty.ascender = yMax; + } + + if (sizeProperty.descender > yMin) + { + sizeProperty.descender = yMin; + } + + sizeProperty.maxHeight = sizeProperty.ascender - sizeProperty.descender; + sizeProperty.baseLine = sizeProperty.maxHeight + sizeProperty.descender; + sizeProperty.leading = sizeProperty.maxHeight - sizeProperty.ascender + sizeProperty.descender; + } + + // shkim, TODO + // min/max size need to be verified + + sizeProperty.minSize = _Util::FixedPoint26_6(8); + sizeProperty.maxSize = _Util::FixedPoint26_6(540); + } + else + { + return false; + } + + return true; +} + +bool +_FontFt2::__InitProperty() +{ + if (!__isValid) + { + return false; + } + + FT_Face pFace = (FT_Face) __pFontFace; + + if (FT_IS_SCALABLE(pFace)) + { + // validation check + if (pFace->size == null) + { + return false; + } + + TT_OS2* pFontSpecTable = (TT_OS2*)FT_Get_Sfnt_Table(pFace, ft_sfnt_os2); + + // fill out + __fontProperty.pFamilyName = pFace->family_name; + __fontProperty.pStyleName = pFace->style_name; + __fontProperty.weightClass = (pFontSpecTable != null) ? pFontSpecTable->usWeightClass : 400; + __fontProperty.styleFlag = pFace->style_flags; + // shkim, TODO + // engine name and min/max size need to be verified + __fontProperty.pEngineName = "FreeType2"; + __fontProperty.styleCaps = _IFont::STYLE_ITALIC | _IFont::STYLE_BOLD | _IFont::STYLE_BACKSLANT; + __fontProperty.fontCaps = _IFont::CAPS_SCALABLE | _IFont::CAPS_ANGLE | _IFont::CAPS_X_EXPANSION | _IFont::CAPS_QUALITY_MONO | + _IFont::CAPS_QUALITY_LOW | _IFont::CAPS_QUALITY_MEDIUM | _IFont::CAPS_QUALITY_HIGH; + + FT_Set_Char_Size(FT_Face(__pFontFace), __fontAttrib.size.__fixedPoint * _DEFAULT_RES, __fontAttrib.size.__fixedPoint * _DEFAULT_RES, 1, 1); + + __hasPredefinedColor = _CompareFamilyForPredefinedColor(__fontProperty.pFamilyName); + } + else + { + return false; + } + + return true; +} + +bool +_FontFt2::hasPredefinedColor(void) const +{ + return __hasPredefinedColor; +} + +bool +_FontFt2::GetFontProperty(Property& property) const +{ + if (!__isValid) + { + return false; + } + + property.pFamilyName = __fontProperty.pFamilyName; + property.pStyleName = __fontProperty.pStyleName; + property.styleFlag = __fontProperty.styleFlag; + property.weightClass = __fontProperty.weightClass; + property.pEngineName = __fontProperty.pEngineName; + property.styleCaps = __fontProperty.styleCaps; + property.fontCaps = __fontProperty.fontCaps; + + return true; +} + +_IFont::FontMapT* +_FontFt2::GetFallbackMap() +{ + return &__fallbackFontMap; +} + +bool +_FontFt2::GetGlyphList(const _Util::String& reorderedText, Tizen::Base::Collection::IListT<_IFont::Glyph *>& out, int script) +{ + FT_Face pFace = FT_Face(__pFontFace); + + { + FT_Matrix matrix; + FT_Vector pen = {0, 0}; + + __SetTransMatrix(&matrix); + + FT_Set_Transform(pFace, &matrix, &pen); + } + + _FontGlyphList glyphList(reorderedText, pFace, script); + + out.RemoveAll(); + + FT_Error error = 1; + + bool isSynthetic = (__fontAttrib.style & _IFont::STYLE_BOLD) && (__fontProperty.weightClass < _MEDIUM_FONT_BOLD_WEIGHT); + + for (unsigned int i = 0; i < glyphList.GetCount(); i++) + { + const _FontGlyphList::GlyphAuxInfo& auxInfo = glyphList.GetGlyphAuxInfo(i); + + if (!auxInfo.isAvailable) + { + _IFont::Glyph* pFontGlyphData = (_IFont::Glyph*) new (std::nothrow) char[sizeof(_IFont::Glyph)]; + + if (pFontGlyphData) + { + memset(pFontGlyphData, 0, sizeof(_IFont::Glyph)); + pFontGlyphData->hasOwnerShip = 1; + out.Add(pFontGlyphData); + } + + continue; + } + + FT_UInt glyphIndex = auxInfo.glyphIndex; + + // bidi cache underdevelop + _IFont::Glyph* pFontGlyphData; + + bool rtn = FindCache(glyphIndex, __fontAttrib.size, __fontAttrib.style, &pFontGlyphData); + + if (rtn) + { + int bufferSize = sizeof(_IFont::Glyph) + (pFontGlyphData->image.bytesPerLine * pFontGlyphData->image.height); + + _IFont::Glyph* pTempGlyphData = (_IFont::Glyph*) new (std::nothrow) char[bufferSize]; + + if (pTempGlyphData) + { + memcpy(pTempGlyphData, pFontGlyphData, bufferSize); + + _Util::FixedPoint22_10 xOffset; + _Util::FixedPoint22_10 yOffset; + _Util::FixedPoint22_10 xAdvance; + _Util::FixedPoint22_10 yAdvance; + xOffset.Reset(auxInfo.xOffset.__fixedPoint << 4); + yOffset.Reset(auxInfo.yOffset.__fixedPoint << 4); + xAdvance.Reset(auxInfo.xAdvance.__fixedPoint << 4); + yAdvance.Reset(-auxInfo.yAdvance.__fixedPoint << 4); + + pTempGlyphData->xOffset = pTempGlyphData->xOffset + xOffset; + pTempGlyphData->yOffset = pTempGlyphData->yOffset + yOffset; + pTempGlyphData->xAdvance = xAdvance; + pTempGlyphData->yAdvance = yAdvance; + + pTempGlyphData->image.pBitmap = (unsigned char*)(pTempGlyphData + 1); + pTempGlyphData->hasOwnerShip = 1; + + out.Add(pTempGlyphData); + } + + continue; + } + + if (isSynthetic) + { + error = FT_Load_Glyph(pFace, glyphIndex, FT_LOAD_DEFAULT | FT_LOAD_NO_BITMAP); + } + else + { + error = FT_Load_Glyph(pFace, glyphIndex, /*FT_LOAD_RENDER*/FT_LOAD_DEFAULT/* | FT_LOAD_NO_BITMAP*/); + } + + if (error) + { + continue; + } + + 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); + + if (error) + { + continue; + } + + _IFont::GlyphBitmap image; + + FT_GlyphSlot pSlot = FT_GlyphSlot(pFace->glyph); + + switch (pSlot->bitmap.pixel_mode) + { + case ft_pixel_mode_mono: + image.depth = 1; + break; + case ft_pixel_mode_grays: + image.depth = 8; + break; + default: + continue; + } + + image.width = pSlot->bitmap.width; + image.height = pSlot->bitmap.rows; + image.bytesPerLine = pSlot->bitmap.pitch; + image.pBitmap = pSlot->bitmap.buffer; + + pFontGlyphData = (_IFont::Glyph*) new (std::nothrow) char[sizeof(_IFont::Glyph) + (image.bytesPerLine * image.height)]; + + if (pFontGlyphData == null) + { + continue; + } + + _Util::FixedPoint22_10 xOffset; + _Util::FixedPoint22_10 yOffset; + _Util::FixedPoint22_10 xAdvance; + _Util::FixedPoint22_10 yAdvance; + xOffset.Reset(auxInfo.xOffset.__fixedPoint << 4); + yOffset.Reset(auxInfo.yOffset.__fixedPoint << 4); + xAdvance.Reset(auxInfo.xAdvance.__fixedPoint << 4); + yAdvance.Reset(-auxInfo.yAdvance.__fixedPoint << 4); + + pFontGlyphData->id = 0; + pFontGlyphData->xOffset = xOffset + _Util::FixedPoint22_10(pSlot->bitmap_left); + pFontGlyphData->yOffset = yOffset + _Util::FixedPoint22_10(pSlot->bitmap_top); + pFontGlyphData->xAdvance = xAdvance; + pFontGlyphData->yAdvance = yAdvance; + pFontGlyphData->hasOwnerShip = 0; + pFontGlyphData->image = image; + + pFontGlyphData->image.pBitmap = (unsigned char*)(pFontGlyphData + 1); + memcpy(pFontGlyphData->image.pBitmap, image.pBitmap, image.bytesPerLine * image.height); + + out.Add(pFontGlyphData); + + pFontGlyphData->xOffset = _Util::FixedPoint22_10(pSlot->bitmap_left); + pFontGlyphData->yOffset = _Util::FixedPoint22_10(pSlot->bitmap_top); + + if (*(reorderedText.pStart + i) > 255) + { + AddCache(glyphIndex, __fontAttrib.size, __fontAttrib.style, pFontGlyphData); + + 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() +{ + if (__pFontFace != null) + { + FT_Done_Face(FT_Face(__pFontFace)); + __pFontFace = null; + } + + if (__pFontEngine != null) + { + FT_Done_FreeType(FT_Library(__pFontEngine)); + __pFontEngine = null; + } + + if ((__pFontBuffer != null) && !__isStaticBuffer) + { + delete[] static_cast(__pFontBuffer); + } + + __pFontBuffer = null; + __isStaticBuffer = false; +} + +unsigned long +_FontFt2::__GetGlyphIndex(unsigned long character) const +{ + if (!__isValid) + { + return 0; + } + + FT_Face pFace = FT_Face(__pFontFace); + + if (pFace == null) + { + return false; + } + + if (pFace->charmap != null) + { + unsigned long glyphIndex = FT_Get_Char_Index(pFace, character); + + return glyphIndex; + } + + return character; +} + +bool +_FontFt2::__ConvertPrivateToImage(void* pData1, _IFont::Glyph** ppFontGlyphData) +{ + if (!__isValid) + { + return false; + } + + FT_GlyphSlot pSlot = FT_GlyphSlot(pData1); + + _IFont::GlyphBitmap image; + + switch (pSlot->bitmap.pixel_mode) + { + case ft_pixel_mode_mono: + image.depth = 1; + break; + case ft_pixel_mode_grays: + image.depth = 8; + break; + default: + return false; + } + + image.width = pSlot->bitmap.width; + image.height = pSlot->bitmap.rows; + image.bytesPerLine = pSlot->bitmap.pitch; + image.pBitmap = pSlot->bitmap.buffer; + + *ppFontGlyphData = (_IFont::Glyph*) new (std::nothrow) char[sizeof(_IFont::Glyph) + (image.bytesPerLine * image.height)]; + + if (*ppFontGlyphData == null) + { + return false; + } + + _Util::FixedPoint22_10 xAdvance; + _Util::FixedPoint22_10 yAdvance; + xAdvance.Reset(pSlot->advance.x << 4); + yAdvance.Reset(-(pSlot->advance.y << 4)); + + (*ppFontGlyphData)->id = 0; + (*ppFontGlyphData)->xOffset = _Util::FixedPoint22_10(pSlot->bitmap_left); + (*ppFontGlyphData)->yOffset = _Util::FixedPoint22_10(pSlot->bitmap_top); + (*ppFontGlyphData)->xAdvance = xAdvance; + (*ppFontGlyphData)->yAdvance = yAdvance; + (*ppFontGlyphData)->hasOwnerShip = 0; + (*ppFontGlyphData)->image = image; + + // shkim, set the memory address of bitmap to the allocated by ourself above + //(*pFontGlyphData)->image.bitmap = (unsigned char*)((*pFontGlyphData) + 1); + + if (image.width == 0 || image.height == 0) + { + return true; + } + + //memcpy((*ppFontGlyphData)->image.bitmap, image.bitmap, image.bytesPerLine * image.height); + + return true; +} + +bool +_FontFt2::__SetTransMatrix(void* pMatrix) +{ + if (!__isValid) + { + return false; + } + + if (pMatrix == null) + { + return true; + } + + FT_Matrix* pTrans = (FT_Matrix*) pMatrix; + + double radian = _M_PI / 180.0; + + if (_IsEqual(0.0f, __fontAttrib.angle)) + { + // apply font size + pTrans->xx = (FT_Fixed) 0x10000 * __fontAttrib.xExpansion.ToDouble(); + pTrans->xy = (FT_Fixed) 0; + pTrans->yx = (FT_Fixed) 0; + pTrans->yy = (FT_Fixed) 0x10000; + + // apply italic style + if (__fontAttrib.style & _IFont::STYLE_ITALIC) + { + pTrans->xy = (FT_Fixed) (sin(_ITALIC_ANGLE * radian) * 0x10000); + } + else if (__fontAttrib.style & _IFont::STYLE_BACKSLANT) + { + pTrans->xy = (FT_Fixed) (sin(-_ITALIC_ANGLE * radian) * 0x10000); + } + } + else + { + double radAngle = __fontAttrib.angle * radian; + + 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.ToDouble() * 0x10000); + pTrans->yy = (FT_Fixed) (cos(radAngle) * 0x10000); + + // apply italic style + if (__fontAttrib.style & _IFont::STYLE_ITALIC) + { + pTrans->xy = (FT_Fixed) ((cos(radAngle) * tan(_ITALIC_ANGLE * radian) - sin(radAngle)) * 0x10000); + pTrans->yy = (FT_Fixed) ((sin(radAngle) * tan(_ITALIC_ANGLE * radian) + cos(radAngle)) * 0x10000); + } + else if (__fontAttrib.style & _IFont::STYLE_BACKSLANT) + { + pTrans->xy = (FT_Fixed) ((cos(radAngle) * tan(-_ITALIC_ANGLE * radian) - sin(radAngle)) * 0x10000); + pTrans->yy = (FT_Fixed) ((sin(radAngle) * tan(-_ITALIC_ANGLE * radian) + cos(radAngle)) * 0x10000); + } + } + + return true; +} + +}} // Tizen::Graphics diff --git a/src/graphics/FGrp_FontFt2.h b/src/graphics/FGrp_FontFt2.h new file mode 100644 index 0000000..00d310f --- /dev/null +++ b/src/graphics/FGrp_FontFt2.h @@ -0,0 +1,112 @@ +// +// 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_FontFt2.h + * @brief This is the header file for _FontFt2 class. + * + */ + +#ifndef _FGRP_INTERNAL_FONT_FT2_H_ +#define _FGRP_INTERNAL_FONT_FT2_H_ + +#include "FGrp_IFont.h" + + +namespace Tizen { namespace Graphics +{ + +class _FontCache; + +class _FontFt2 + : public _IFont +{ +public: + _FontFt2(); + virtual ~_FontFt2(); + + virtual bool SetAttrib(const Attrib& fontAttrib); + virtual bool GetAttrib(Attrib& fontAttrib) const; + + virtual bool GetKerning(unsigned long character1, unsigned long character2, long& xVector, long& yVector) const; + + virtual bool LoadGlyph(unsigned long character, Glyph** ppFontGlyphData); + virtual bool UnloadGlyph(Glyph** ppFontGlyphData); + virtual unsigned long CheckGlyph(unsigned long character); + + virtual bool GetFontSizeProperty(SizeProperty& sizeProperty) const; + virtual bool GetFontProperty(_IFont::Property& property) const; + + virtual bool GetGlyphList(const _Util::String& text, Tizen::Base::Collection::IListT<_IFont::Glyph *>& out, int script); + + virtual _IFont::FontMapT* GetFallbackMap(void); + + 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); + virtual bool Create(const char* pFilePath, long face = 0); + virtual bool CreateStatic(const void* pBuffer, long bufSize, long face = 0); + 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 _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); + _FontFt2& operator =(const _FontFt2& rhs); + + // cleaning up + void __CleanUp(); + + // return internal index for wide character + unsigned long __GetGlyphIndex(unsigned long character) const; + + // convert the glyph of FreeType2 to _IFont::Glyph information + bool __ConvertPrivateToImage(void* pData1, _IFont::Glyph** ppFontGlyphData); + + // set translate matrix + bool __SetTransMatrix(void* pMatrix); + + bool __InitProperty(void); + +private: + bool __isValid; + bool __isLoadGlyph; + _IFont::Attrib __fontAttrib; + _IFont::Property __fontProperty; + void* __pFontEngine; + void* __pFontFace; + void* __pFontBuffer; + bool __isStaticBuffer; + bool __hasPredefinedColor; + + //_FontCache fontCache; + std::auto_ptr<_FontCache> __fontCache; + // fallback font resources + _IFont::FontMapT __fallbackFontMap; + +}; // _FontFt2 + +}} // Tizen::Graphics + +#endif // _FGRP_INTERNAL_FONT_FT2_H_ diff --git a/src/graphics/FGrp_FontImpl.cpp b/src/graphics/FGrp_FontImpl.cpp new file mode 100644 index 0000000..b8787d7 --- /dev/null +++ b/src/graphics/FGrp_FontImpl.cpp @@ -0,0 +1,1287 @@ +// +// 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_FontImpl.cpp + * @brief This is the implementation file for _FontImpl class. + * + */ + +#include +#include +#include + +#include +#include +#include + +#include "FGrp_FontImpl.h" +#include "FGrp_Font.h" +#include "FGrp_ResUtil.h" +#include "util/FGrp_Util.h" + + +using namespace Tizen::Base::Runtime; + +#define IF_NOT_INITIALIZED(code) if (this->_pNativeFont == null || this->_pCoordHolder == null) \ + { \ + code; \ + } +#define IF_NOT_CONSTRUCTED(code) if (this->_pNativeFont == null || (!this->_pNativeFont->IsConstructed())) \ + { \ + code; \ + } +#define IsSucceeded(X) (!IsFailed(X)) + + +#ifdef _MUTEX_GUARD_NOT_SUPPORTED + #define CRITICAL_SECTION +#else + #define CRITICAL_SECTION _MutexGuard __mutexGuard__ +#endif + + +namespace Tizen { namespace Graphics +{ + +class _MutexGuard +{ +public: + _MutexGuard() + { + Mutex* pMutex = GetMutexInstance(); + pMutex->Acquire(); + } + + ~_MutexGuard() + { + Mutex* pMutex = GetMutexInstance(); + pMutex->Release(); + } + +private: + static void __InitCreateMutex(void) + { + static Mutex mutex; + mutex.Create(); + _MutexGuard::pMutexInstance = &mutex; + } + + static Mutex* GetMutexInstance(void) + { + static pthread_once_t once_block = PTHREAD_ONCE_INIT; + + if (_MutexGuard::pMutexInstance == null) + { + pthread_once(&once_block, __InitCreateMutex); + } + + return _MutexGuard::pMutexInstance; + } + +public: + static Mutex* pMutexInstance; +}; + +Mutex* _MutexGuard::pMutexInstance = null; + + +struct _FontCoordHolder +{ + _ResUtil::CoordinateHolder size; + _ResUtil::CoordinateHolder charSpace; + + _FontCoordHolder() + : __pcBaseScale(1.0f) + , __vcBaseScale(1.0f) + { + _CoordinateSystem* pCoordinateSystem = _CoordinateSystem::GetInstance(); + + if (pCoordinateSystem) + { + __pcBaseScale = pCoordinateSystem->GetTargetBaseScaleFactor(); + __vcBaseScale = pCoordinateSystem->GetAppBaseScaleFactor(); + } + + ResetFromVc(-1); + } + + void ResetFromVc(int intVcSize) + { + this->ResetFromVc(static_cast(intVcSize)); + size.vcInt = intVcSize; + size.vcFloatActual = static_cast(intVcSize); + } + + void ResetFromVc(float floatVcSize) + { + 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; + } +}; + + +_FontImpl::_FontImpl() + : _magicKey(0) + , _pCoordHolder(new (std::nothrow) _FontCoordHolder) + , _pNativeFont(new (std::nothrow) _Font) +{ + if (_pNativeFont == null || _pCoordHolder == null) + { + delete _pNativeFont; + delete _pCoordHolder; + + _pNativeFont = null; + _pCoordHolder = null; + } + + _Util::CarveMagicKey(*this, _magicKey); +} + +_FontImpl::_FontImpl(const _FontImpl& obj) + : _pCoordHolder(new (std::nothrow) _FontCoordHolder) + , _pNativeFont(0) +{ + if (_pCoordHolder) + { + *_pCoordHolder = *obj._pCoordHolder; + } + + _pNativeFont = obj._pNativeFont->CloneN(); + + if (_pNativeFont == null || _pCoordHolder == null) + { + delete _pNativeFont; + delete _pCoordHolder; + + _pNativeFont = null; + _pCoordHolder = null; + } + + _Util::CarveMagicKey(*this, _magicKey); +} + +_FontImpl::~_FontImpl() +{ + if (_pNativeFont) + { + delete _pNativeFont; + _pNativeFont = 0; + } + + if (_pCoordHolder) + { + delete _pCoordHolder; + _pCoordHolder = 0; + } + + _Util::EraseMagicKey(*this, _magicKey); +} + +result +_FontImpl::Construct(int style, int vcSize) +{ + CRITICAL_SECTION; + IF_NOT_INITIALIZED(return E_OUT_OF_MEMORY); + + // convert VC -> PC + _Util::FixedPoint26_6 pcSize(_ResUtil::ConvertToPhyCoordHeight(static_cast(vcSize))); + + if (vcSize > 0 && pcSize <= 1) + { + pcSize = _Util::FixedPoint26_6(1); + } + + result r = _pNativeFont->Construct(style, pcSize); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Failed to construct _Font", GetErrorMessage(r)); + + _pCoordHolder->ResetFromVc(vcSize); + + return E_SUCCESS; +} + +result +_FontImpl::Construct(const Tizen::Base::String& fontName, int style, int vcSize, bool isPathEnabled) +{ + CRITICAL_SECTION; + IF_NOT_INITIALIZED(return E_OUT_OF_MEMORY); + + // convert VC -> PC + _Util::FixedPoint26_6 pcSize(_ResUtil::ConvertToPhyCoordHeight(static_cast(vcSize))); + + if (vcSize > 0 && pcSize <= 1) + { + pcSize = _Util::FixedPoint26_6(1); + } + + result r = _pNativeFont->Construct(fontName, style, pcSize, isPathEnabled); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Failed to construct _Font", GetErrorMessage(r)); + + _pCoordHolder->ResetFromVc(vcSize); + + return E_SUCCESS; +} + +result +_FontImpl::Construct(const Tizen::Base::ByteBuffer& fontData, int style, int vcSize) +{ + CRITICAL_SECTION; + IF_NOT_INITIALIZED(return E_OUT_OF_MEMORY); + + // convert VC -> PC + _Util::FixedPoint26_6 pcSize(_ResUtil::ConvertToPhyCoordHeight(static_cast(vcSize))); + + if (vcSize > 0 && pcSize <= 1) + { + pcSize = _Util::FixedPoint26_6(1); + } + + result r = _pNativeFont->Construct(fontData, style, pcSize); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Failed to construct _Font", GetErrorMessage(r)); + + _pCoordHolder->ResetFromVc(vcSize); + + return E_SUCCESS; +} + +result +_FontImpl::Construct(int style, float vcSize) +{ + CRITICAL_SECTION; + IF_NOT_INITIALIZED(return E_OUT_OF_MEMORY); + + // convert VC -> PC + _Util::FixedPoint26_6 pcSize(_ResUtil::ConvertToPhyCoordHeight(vcSize)); + + if (vcSize > 0.0f && pcSize <= 1.0f) + { + pcSize = _Util::FixedPoint26_6(1.0f); + } + + result r = _pNativeFont->Construct(style, pcSize); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Failed to construct _Font", GetErrorMessage(r)); + + _pCoordHolder->ResetFromVc(vcSize); + + return E_SUCCESS; +} + +result +_FontImpl::Construct(const Tizen::Base::String& fontName, int style, float vcSize, bool isPathEnabled) +{ + CRITICAL_SECTION; + IF_NOT_INITIALIZED(return E_OUT_OF_MEMORY); + + // convert VC -> PC + _Util::FixedPoint26_6 pcSize(_ResUtil::ConvertToPhyCoordHeight(vcSize)); + + if (vcSize > 0.0f && pcSize <= 1.0f) + { + pcSize = _Util::FixedPoint26_6(1.0f); + } + + result r = _pNativeFont->Construct(fontName, style, pcSize, isPathEnabled); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Failed to construct _Font", GetErrorMessage(r)); + + _pCoordHolder->ResetFromVc(vcSize); + + return E_SUCCESS; +} + +result +_FontImpl::Construct(const Tizen::Base::ByteBuffer& fontData, int style, float vcSize) +{ + CRITICAL_SECTION; + IF_NOT_INITIALIZED(return E_OUT_OF_MEMORY); + + // convert VC -> PC + _Util::FixedPoint26_6 pcSize(_ResUtil::ConvertToPhyCoordHeight(vcSize)); + + if (vcSize > 0.0f && pcSize <= 1.0f) + { + pcSize = _Util::FixedPoint26_6(1.0f); + } + + result r = _pNativeFont->Construct(fontData, style, pcSize); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Failed to construct _Font", GetErrorMessage(r)); + + _pCoordHolder->ResetFromVc(vcSize); + + return E_SUCCESS; +} + +bool +_FontImpl::IsConstructed(void) const +{ + CRITICAL_SECTION; + IF_NOT_CONSTRUCTED(return false); + + return true; +} + +int +_FontImpl::GetMaxHeight(void) const +{ + CRITICAL_SECTION; + IF_NOT_CONSTRUCTED(return -1); + + int pcMaxHeight = _DoubleToIntForPos(ceil(_pNativeFont->GetMaxHeight().ToDouble())); + + for (int i = pcMaxHeight; i < INT_MAX; i++) + { + if (_ResUtil::ConvertToPhyCoord(_ResUtil::ConvertToVirCoordY(i)) >= pcMaxHeight) + { + pcMaxHeight = i; + break; + } + } + + int vcMaxHeight = _ResUtil::ConvertToVirCoordY(pcMaxHeight); + + return vcMaxHeight; +} + +float +_FontImpl::GetMaxHeightF(void) const +{ + CRITICAL_SECTION; + IF_NOT_CONSTRUCTED(return -1.0f); + + float pcMaxHeight = float(ceil(_pNativeFont->GetMaxHeight().ToDouble())); + float vcMaxHeight = _ResUtil::ConvertToVirCoordY(pcMaxHeight); + + return vcMaxHeight; +} + +int +_FontImpl::GetMaxWidth(void) const +{ + CRITICAL_SECTION; + IF_NOT_CONSTRUCTED(return -1); + + int pcMaxWidth = _pNativeFont->GetMaxWidth().ToInt(); + int vcMaxWidth = _ResUtil::ConvertToVirCoordX(pcMaxWidth); + + return vcMaxWidth; +} + +float +_FontImpl::GetMaxWidthF(void) const +{ + CRITICAL_SECTION; + IF_NOT_CONSTRUCTED(return -1.0f); + + float pcMaxWidth = _pNativeFont->GetMaxWidth().ToFloat(); + float vcMaxWidth = _ResUtil::ConvertToVirCoordX(pcMaxWidth); + + return vcMaxWidth; +} + +int +_FontImpl::GetAscender(void) const +{ + CRITICAL_SECTION; + IF_NOT_CONSTRUCTED(return -1); + + int pcAscender = _DoubleToIntForPos(ceil(_pNativeFont->GetAscender().ToDouble())); + + for (int i = pcAscender; i < INT_MAX; i++) + { + if (_ResUtil::ConvertToPhyCoord(_ResUtil::ConvertToVirCoordY(i)) >= pcAscender) + { + pcAscender = i; + break; + } + } + + int vcAscender = _ResUtil::ConvertToVirCoordY(pcAscender); + + return vcAscender; +} + +float +_FontImpl::GetAscenderF(void) const +{ + CRITICAL_SECTION; + IF_NOT_CONSTRUCTED(return -1.0f); + + float pcAscender = float(ceil(_pNativeFont->GetAscender().ToDouble())); + float vcAscender = _ResUtil::ConvertToVirCoordY(pcAscender); + + return vcAscender; +} + +int +_FontImpl::GetDescender(void) const +{ + CRITICAL_SECTION; + IF_NOT_CONSTRUCTED(return -1); + + int pcDescender = _DoubleToIntForPos(ceil(_pNativeFont->GetDescender().ToDouble())); + + if (pcDescender < 0) + { + pcDescender *= -1; + } + + for (int i = pcDescender; i < INT_MAX; i++) + { + if (_ResUtil::ConvertToPhyCoord(_ResUtil::ConvertToVirCoordY(i)) >= pcDescender) + { + pcDescender = i; + break; + } + } + + int vcDescender = _ResUtil::ConvertToVirCoordY(pcDescender); + + return vcDescender; +} + +float +_FontImpl::GetDescenderF(void) const +{ + CRITICAL_SECTION; + IF_NOT_CONSTRUCTED(return -1.0f); + + float pcDescender = float(ceil(_pNativeFont->GetDescender().ToDouble())); + float vcDescender = _ResUtil::ConvertToVirCoordY(pcDescender); + + if (vcDescender < 0.0f) + { + vcDescender *= -1.0f; + } + + return vcDescender; +} + +result +_FontImpl::GetLeftBear(wchar_t character, int& vcLeftBear) const +{ + CRITICAL_SECTION; + IF_NOT_CONSTRUCTED(return E_OPERATION_FAILED); + + _Util::FixedPoint22_10 pcLeftBear(0); + result r = _pNativeFont->GetLeftBear(character, pcLeftBear); + + // set outparam + if (r == E_SUCCESS) + { + vcLeftBear = _ResUtil::ConvertToVirCoordX(pcLeftBear.ToInt()); + } + + return r; +} + +result +_FontImpl::GetLeftBear(wchar_t character, float& vcLeftBear) const +{ + CRITICAL_SECTION; + IF_NOT_CONSTRUCTED(return E_OPERATION_FAILED); + + _Util::FixedPoint22_10 pcLeftBear(0); + result r = _pNativeFont->GetLeftBear(character, pcLeftBear); + + if (r == E_SUCCESS) + { + vcLeftBear = _ResUtil::ConvertToVirCoordX(pcLeftBear.ToFloat()); + } + + return r; +} + +result +_FontImpl::GetRightBear(wchar_t character, int& vcRightBear) const +{ + CRITICAL_SECTION; + IF_NOT_CONSTRUCTED(return E_OPERATION_FAILED); + + _Util::FixedPoint22_10 pcRightBear(0); + result r = _pNativeFont->GetRightBear(character, pcRightBear); + + // set outparam + if (r == E_SUCCESS) + { + vcRightBear = _ResUtil::ConvertToVirCoordX(pcRightBear.ToInt()); + } + + return r; +} + +result +_FontImpl::GetRightBear(wchar_t character, float& vcRightBear) const +{ + CRITICAL_SECTION; + IF_NOT_CONSTRUCTED(return E_OPERATION_FAILED); + + _Util::FixedPoint22_10 pcRightBear(0); + result r = _pNativeFont->GetRightBear(character, pcRightBear); + + if (r == E_SUCCESS) + { + vcRightBear = _ResUtil::ConvertToVirCoordX(pcRightBear.ToFloat()); + } + + return r; +} + +result +_FontImpl::GetTextExtent(const Tizen::Base::String& text, int length, Dimension& vcDim, bool outline) const +{ + CRITICAL_SECTION; + IF_NOT_CONSTRUCTED(return E_OPERATION_FAILED); + + int dummyCount = 0 ; + + if (_ResUtil::NeedToConvertCoord()) + { + Dimension pcDim; + result r = _pNativeFont->GetTextExtent(INT_MAX, _Util::String(text.GetPointer(), text.GetLength(), 0, length), outline, dummyCount, pcDim); + + if (IsSucceeded(r)) + { + vcDim = _ResUtil::ConvertToVirCoord(pcDim); + } + + return r; + } + else + { + return _pNativeFont->GetTextExtent(INT_MAX, _Util::String(text.GetPointer(), text.GetLength(), 0, length), outline, dummyCount, vcDim); + } +} + +result +_FontImpl::GetTextExtent(const Tizen::Base::String& text, int length, FloatDimension& vcDim, bool outline) const +{ + CRITICAL_SECTION; + IF_NOT_CONSTRUCTED(return E_OPERATION_FAILED); + + int dummyCount = 0; + Dimension pcDim; + + result r = _pNativeFont->GetTextExtent(INT_MAX, _Util::String(text.GetPointer(), text.GetLength(), 0, length), outline, dummyCount, pcDim); + + if (IsSucceeded(r)) + { + vcDim.width = _ResUtil::ConvertToVirCoord(static_cast(pcDim.width)); + vcDim.height = _ResUtil::ConvertToVirCoord(static_cast(pcDim.height)); + } + + return r; +} + +bool +_FontImpl::IsBold(void) const +{ + CRITICAL_SECTION; + IF_NOT_CONSTRUCTED(return false); + + return _pNativeFont->IsBold(); +} + +bool +_FontImpl::IsItalic(void) const +{ + CRITICAL_SECTION; + IF_NOT_CONSTRUCTED(return false); + + return _pNativeFont->IsItalic(); +} + +bool +_FontImpl::IsPlain(void) const +{ + CRITICAL_SECTION; + IF_NOT_CONSTRUCTED(return false); + + return _pNativeFont->IsPlain(); +} + +bool +_FontImpl::IsStrikeOut(void) const +{ + CRITICAL_SECTION; + IF_NOT_CONSTRUCTED(return false); + + return _pNativeFont->IsStrikeOut(); +} + +bool +_FontImpl::IsUnderlined(void) const +{ + CRITICAL_SECTION; + IF_NOT_CONSTRUCTED(return false); + + return _pNativeFont->IsUnderlined(); +} + +int +_FontImpl::GetSize(void) const +{ + CRITICAL_SECTION; + IF_NOT_CONSTRUCTED(return -1); + + return _FloatToIntForSize(_pCoordHolder->size.vcFloatActual); +} + +float +_FontImpl::GetSizeF(void) const +{ + CRITICAL_SECTION; + IF_NOT_CONSTRUCTED(return -1.0f); + + 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 +_FontImpl::SetStrikeOut(bool strikeOut) +{ + CRITICAL_SECTION; + IF_NOT_CONSTRUCTED(return); + + _pNativeFont->SetStrikeOut(strikeOut); + + return; +} + +void +_FontImpl::SetUnderline(bool underline) +{ + CRITICAL_SECTION; + IF_NOT_CONSTRUCTED(return); + + _pNativeFont->SetUnderline(underline); + + return; +} + +void +_FontImpl::SetCharSpace(int vcSpace) +{ + CRITICAL_SECTION; + IF_NOT_CONSTRUCTED(return); + + // save it + _pCoordHolder->SetCharSpaceFromVc(vcSpace); + + _pNativeFont->SetCharSpace(_pCoordHolder->charSpace.pcInt); + + return; +} + +void +_FontImpl::SetCharSpace(float vcSpace) +{ + CRITICAL_SECTION; + IF_NOT_CONSTRUCTED(return); + + // save it + _pCoordHolder->SetCharSpaceFromVc(vcSpace); + + _pNativeFont->SetCharSpace(_pCoordHolder->charSpace.pcInt); + + return; +} + +int +_FontImpl::GetCharSpace(void) const +{ + CRITICAL_SECTION; + IF_NOT_CONSTRUCTED(return 0); + + return _pCoordHolder->charSpace.vcInt; +} + +float +_FontImpl::GetCharSpaceF(void) const +{ + CRITICAL_SECTION; + IF_NOT_CONSTRUCTED(return 0.0f); + + return _pCoordHolder->charSpace.vcFloatActual; +} + +Tizen::Base::String +_FontImpl::GetFaceName(void) const +{ + CRITICAL_SECTION; + IF_NOT_CONSTRUCTED(return ""); + + return _pNativeFont->GetFaceName(); +} + +Tizen::Base::Collection::IList* +_FontImpl::GetSystemFontListN(void) +{ + CRITICAL_SECTION; + return _Font::GetSystemFontListN(); +} + +Tizen::Base::String +_FontImpl::GetFaceName(const Tizen::Base::String& filePath) +{ + CRITICAL_SECTION; + return _Font::GetFaceName(filePath); +} + +_FontImpl* +_FontImpl::CloneN(void) +{ + CRITICAL_SECTION; + IF_NOT_CONSTRUCTED(return null); + + std::auto_ptr<_FontImpl> pFontImpl(new (std::nothrow) _FontImpl(*this)); + + 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(); +} + +Font* +_FontImpl::CloneN(const Font& font) +{ + CRITICAL_SECTION; + + // check the validation of input param + SysTryReturn(NID_GRP, font.__pImpl && font.__pImpl->IsConstructed(), null, E_INVALID_ARG, "[E_INVALID_ARG] Invalid input param given"); + + // 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] 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(); +} + +result +_FontImpl::GetTextExtent(int vcWidth, const Tizen::Base::String& text, int startIndex, int length, bool outline, int& count, Dimension& vcDim) const +{ + CRITICAL_SECTION; + IF_NOT_CONSTRUCTED(return E_OPERATION_FAILED); + + SysTryReturnResult(NID_GRP, startIndex >= 0 && length >= 0 && startIndex < text.GetLength(), E_OUT_OF_RANGE, + "The length(%d) & startIndex(%d) of the given text is out of range", length, startIndex); + + if (_ResUtil::NeedToConvertCoord()) + { + int pcWidth = _ResUtil::ToPhyCoordW(vcWidth); + Dimension pcDim; + result r = _pNativeFont->GetTextExtent(pcWidth, _Util::String(text.GetPointer(), text.GetLength(), startIndex, length), outline, count, pcDim); + + if (IsSucceeded(r)) + { + vcDim = _ResUtil::ConvertToVirCoord(pcDim); + } + + return r; + } + else + { + return _pNativeFont->GetTextExtent(vcWidth, _Util::String(text.GetPointer(), text.GetLength(), startIndex, length), outline, count, vcDim); + } +} + +result +_FontImpl::GetTextExtent(int vcWidth, const Tizen::Base::String& text, int startIndex, int length, bool outline, const Tizen::Base::String& delimiter, int& count, Dimension& vcDim) const +{ + CRITICAL_SECTION; + IF_NOT_CONSTRUCTED(return E_OPERATION_FAILED); + + SysTryReturnResult(NID_GRP, startIndex >= 0 && length >= 0 && startIndex < text.GetLength(), E_OUT_OF_RANGE, + "The length(%d) & startIndex(%d) of the given text is out of range", length, startIndex); + + if (_ResUtil::NeedToConvertCoord()) + { + int pcWidth = _ResUtil::ToPhyCoordW(vcWidth); + Dimension pcDim; + result r = _pNativeFont->GetTextExtent(pcWidth, _Util::String(text.GetPointer(), text.GetLength(), startIndex, length), outline, delimiter, count, pcDim); + + if (IsSucceeded(r)) + { + vcDim = _ResUtil::ConvertToVirCoord(pcDim); + } + + return r; + } + else + { + return _pNativeFont->GetTextExtent(vcWidth, _Util::String(text.GetPointer(), text.GetLength(), startIndex, length), outline, delimiter, count, vcDim); + } +} + +result +_FontImpl::GetTextExtent(float vcWidth, const Tizen::Base::String& text, int startIndex, int length, bool outline, int& count, FloatDimension& vcDim) const +{ + CRITICAL_SECTION; + IF_NOT_CONSTRUCTED(return E_OPERATION_FAILED); + + SysTryReturnResult(NID_GRP, startIndex >= 0 && length >= 0 && startIndex < text.GetLength(), E_OUT_OF_RANGE, + "The length(%d) & startIndex(%d) of the given text is out of range", length, startIndex); + + int pcWidth = _FloatToIntForPos(_ResUtil::ToPhyCoordW(vcWidth)); + Dimension pcDim; + result r = _pNativeFont->GetTextExtent(pcWidth, _Util::String(text.GetPointer(), text.GetLength(), startIndex, length), outline, count, pcDim); + + if (IsSucceeded(r)) + { + vcDim.width = _ResUtil::ConvertToVirCoord(static_cast(pcDim.width)); + vcDim.height = _ResUtil::ConvertToVirCoord(static_cast(pcDim.height)); + } + + return r; +} + +result +_FontImpl::GetTextExtent(float vcWidth, const Tizen::Base::String& text, int startIndex, int length, bool outline, const Tizen::Base::String& delimiter, int& count, FloatDimension& vcDim) const +{ + CRITICAL_SECTION; + IF_NOT_CONSTRUCTED(return E_OPERATION_FAILED); + + SysTryReturnResult(NID_GRP, startIndex >= 0 && length >= 0 && startIndex < text.GetLength(), E_OUT_OF_RANGE, + "The length(%d) & startIndex(%d) of the given text is out of range", length, startIndex); + + int pcWidth = _FloatToIntForPos(_ResUtil::ToPhyCoordW(vcWidth)); + Dimension pcDim; + result r = _pNativeFont->GetTextExtent(pcWidth, _Util::String(text.GetPointer(), text.GetLength(), startIndex, length), outline, delimiter, count, pcDim); + + if (IsSucceeded(r)) + { + vcDim.width = _ResUtil::ConvertToVirCoord(static_cast(pcDim.width)); + vcDim.height = _ResUtil::ConvertToVirCoord(static_cast(pcDim.height)); + } + + return r; +} + +result +_FontImpl::SetSize(int vcSize) +{ + CRITICAL_SECTION; + IF_NOT_CONSTRUCTED(return E_OPERATION_FAILED); + SysTryReturnResult(NID_GRP, vcSize > 0, E_INVALID_ARG, "Font size should be greater than 0"); + + _pCoordHolder->ResetFromVc(vcSize); + + // convert VC -> PC + _Util::FixedPoint26_6 pcSize(_ResUtil::ConvertToPhyCoordHeight(vcSize)); + + if (vcSize > 0 && pcSize <= 1) + { + pcSize = _Util::FixedPoint26_6(1); + + _pCoordHolder->ResetFromPc(1); + _pCoordHolder->size.vcInt = vcSize; + _pCoordHolder->size.vcFloat = static_cast(vcSize); + _pCoordHolder->size.vcFloatActual = _pCoordHolder->size.vcFloat; + } + + result r = _pNativeFont->SetSize(pcSize); + SysTryReturnResult(NID_GRP, r == E_SUCCESS, E_SYSTEM, "Failed to set the size of _Font"); + + return E_SUCCESS; +} + +result +_FontImpl::SetSize(float vcSize) +{ + CRITICAL_SECTION; + IF_NOT_CONSTRUCTED(return E_OPERATION_FAILED); + SysTryReturnResult(NID_GRP, vcSize > 0.0f, E_INVALID_ARG, "Font size should be greater than 0"); + + _pCoordHolder->ResetFromVc(vcSize); + + // convert VC -> PC + _Util::FixedPoint26_6 pcSize(_ResUtil::ConvertToPhyCoordHeight(vcSize)); + + if (vcSize > 0.0f && pcSize <= 1.0f) + { + pcSize = _Util::FixedPoint26_6(1.0f); + + _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); + SysTryReturnResult(NID_GRP, r == E_SUCCESS, E_SYSTEM, "Failed to set the size of _Font"); + + return E_SUCCESS; +} + +result +_FontImpl::SetStyle(int style) +{ + CRITICAL_SECTION; + IF_NOT_CONSTRUCTED(return E_OPERATION_FAILED); + SysTryReturnResult(NID_GRP, style > FONT_STYLE_MIN && style <= (FONT_STYLE_PLAIN | FONT_STYLE_BOLD | FONT_STYLE_ITALIC), E_INVALID_ARG, + "Style(%d) is invalid", style); + + result r = _pNativeFont->SetStyle(style); + SysTryReturnResult(NID_GRP, r == E_SUCCESS, E_SYSTEM, "Failed to set the style of _Font"); + + return E_SUCCESS; +} + +int +_FontImpl::GetStyle(void) const +{ + CRITICAL_SECTION; + IF_NOT_CONSTRUCTED(return FONT_STYLE_PLAIN); + + return _pNativeFont->GetStyle(); +} + +int +_FontImpl::GetLeading(void) const +{ + CRITICAL_SECTION; + IF_NOT_CONSTRUCTED(return -1); + + int pcLeading = _DoubleToIntForPos(ceil(_pNativeFont->GetLeading().ToDouble())); + + for (int i = pcLeading; i < INT_MAX; i++) + { + if (_ResUtil::ConvertToPhyCoord(_ResUtil::ConvertToVirCoordY(i)) >= pcLeading) + { + pcLeading = i; + break; + } + } + + int vcLeading = _ResUtil::ConvertToVirCoordY(pcLeading); + + return vcLeading; +} + +float +_FontImpl::GetLeadingF(void) const +{ + CRITICAL_SECTION; + IF_NOT_CONSTRUCTED(return -1.0f); + + float pcLeading = float(ceil(_pNativeFont->GetLeading().ToDouble())); + float vcLeading = _ResUtil::ConvertToVirCoordY(pcLeading); + + return vcLeading; +} + +_FontImpl* +_FontImpl::GetInstance(Font& font) +{ + CRITICAL_SECTION; + return (&font != null) ? font.__pImpl : null; +} + +const _FontImpl* +_FontImpl::GetInstance(const Font& font) +{ + CRITICAL_SECTION; + return (&font != null) ? font.__pImpl : null; +} + +bool +_FontImpl::UpdateDefaultFont(const Tizen::Base::String& key) +{ + CRITICAL_SECTION; + return _Font::UpdateDefaultFont(key); +} + +result +_FontImpl::GetTextExtentList(const Tizen::Base::String& string, int startIndex, int length, Tizen::Base::Collection::ArrayListT<_FloatPair>& outList) const +{ + CRITICAL_SECTION; + IF_NOT_CONSTRUCTED(return E_OPERATION_FAILED); + + SysTryReturnResult(NID_GRP, startIndex >= 0 && length >= 0 && startIndex < string.GetLength(), E_OUT_OF_RANGE, + "The length(%d) & startIndex(%d) of the given text is out of range", length, startIndex); + + _Util::String text(string.GetPointer(), string.GetLength(), startIndex, length); + _Util::AccumList<_Util::Pair > outAccumList; + + result r = _pNativeFont->GetTextExtentList(text, outAccumList); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Failed to get the internal text extent information", GetErrorMessage(r)); + + outList.RemoveAll(); + + for (_Util::AccumList<_Util::Pair >::Iterator iter = outAccumList.Begin(); iter != outAccumList.End(); ++iter) + { + _FloatPair pairF = + { + _ResUtil::ConvertToVirCoord(static_cast(iter->first)), + _ResUtil::ConvertToVirCoord(static_cast(iter->second)) + }; + + outList.Add(pairF); + } + + return E_SUCCESS; +} + +result +_FontImpl::__GetTextExtent(const wchar_t* text, int textLength, int length, FloatDimension& vcDim, bool outline) const +{ + // This method must synchronize with _FontImpl::GetTextExtent(const Tizen::Base::String& text, int length, FloatDimension& vcDim, bool outline) + + CRITICAL_SECTION; + IF_NOT_CONSTRUCTED(return E_OPERATION_FAILED); + + int dummyCount = 0; + Dimension pcDim; + + result r = _pNativeFont->GetTextExtent(INT_MAX, _Util::String(text, textLength, 0, length), outline, dummyCount, pcDim); + + if (IsSucceeded(r)) + { + vcDim.width = _ResUtil::ConvertToVirCoord(static_cast(pcDim.width)); + vcDim.height = _ResUtil::ConvertToVirCoord(static_cast(pcDim.height)); + } + + return r; +} + +result +_FontImpl::__GetTextExtent(float vcWidth, const wchar_t* text, int textLength, int startIndex, int length, bool outline, int& count, FloatDimension& vcDim) const +{ + // This method must synchronize with _FontImpl::GetTextExtent(float vcWidth, const Tizen::Base::String& text, int startIndex, int length, bool outline, int& count, FloatDimension& vcDim) + + CRITICAL_SECTION; + IF_NOT_CONSTRUCTED(return E_OPERATION_FAILED); + + SysTryReturnResult(NID_GRP, startIndex >= 0 && length >= 0 && startIndex < textLength, E_OUT_OF_RANGE, + "The length(%d) & startIndex(%d) of the given text is out of range", length, startIndex); + + int pcWidth = _FloatToIntForPos(_ResUtil::ToPhyCoordW(vcWidth)); + Dimension pcDim; + result r = _pNativeFont->GetTextExtent(pcWidth, _Util::String(text, textLength, startIndex, length), outline, count, pcDim); + + if (IsSucceeded(r)) + { + vcDim.width = _ResUtil::ConvertToVirCoord(static_cast(pcDim.width)); + vcDim.height = _ResUtil::ConvertToVirCoord(static_cast(pcDim.height)); + } + + return r; +} + +}} // Tizen::Graphics + + +namespace Tizen { namespace Graphics +{ + +TextBidiHint _bidiHint = TEXT_BIDI_HINT_NONE; + +void +_SetTextBidiHint(TextBidiHint bidiHint) +{ + switch (bidiHint) + { + case TEXT_BIDI_HINT_NONE: + case TEXT_BIDI_HINT_LTR: + case TEXT_BIDI_HINT_RTL: + _bidiHint = bidiHint; + break; + } +} + +TextBidiHint +_GetTextBidiHint(void) +{ + return _bidiHint; +} + +}} // Tizen::Graphics + + +namespace Tizen { namespace Graphics +{ + +void +_SetTextBidiBase(TextBidiBase bidiBase) +{ + switch (bidiBase) + { + case TEXT_BIDI_BASE_LTR: + _TextBidiUtil::SetTextBidiBase(true); + break; + case TEXT_BIDI_BASE_RTL: + _TextBidiUtil::SetTextBidiBase(false); + break; + } +} + +TextBidiBase +_GetTextBidiBase(void) +{ + return (_TextBidiUtil::IsTextBidiBaseLtr()) ? TEXT_BIDI_BASE_LTR : TEXT_BIDI_BASE_RTL; +} + +}} // Tizen::Graphics + +//////////////////////////////////////////////////////////////////////////////// +// +// Temporary code for test case +// +//////////////////////////////////////////////////////////////////////////////// + +#include +#include +#include "FGrp_FontUtil.h" + +namespace Tizen { namespace Graphics +{ + _OSP_EXPORT_ bool _TestGetTextExtentList(Tizen::Graphics::Font& font, const Tizen::Base::String& string, std::vector >& outList) + { + _Font* pInternalFont = _GetFontEx(font); + _Util::String text(string.GetPointer(), string.GetLength()); + _Util::AccumList<_Util::Pair > outAccumList; + + if (pInternalFont->GetTextExtentList(text, outAccumList) != E_SUCCESS) + { + return false; + } + + outList.clear(); + + for (_Util::AccumList<_Util::Pair >::Iterator iter = outAccumList.Begin(); iter != outAccumList.End(); ++iter) + { + outList.push_back(std::make_pair(iter->first, iter->second)); + } + + return true; + } + +}} // Tizen::Graphics diff --git a/src/graphics/FGrp_FontMemoryManager.cpp b/src/graphics/FGrp_FontMemoryManager.cpp new file mode 100644 index 0000000..d1cc57f --- /dev/null +++ b/src/graphics/FGrp_FontMemoryManager.cpp @@ -0,0 +1,232 @@ +// +// 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_FontMemoryManager.cpp + * @brief This is the cpp file for _FontMemoryManager class. + * + */ + +#include + +#include + +#include "FGrp_FontMemoryManager.h" + + +namespace Tizen { namespace Graphics +{ + +class _CountBasedMemoryMgr + : public _FontMemoryManager::IMemoryAllocator +{ +public: + _CountBasedMemoryMgr(unsigned long size) + : __maxCount(size) + , __currentCount(0) + { + } + + virtual ~_CountBasedMemoryMgr(void) {} + + virtual void* Alloc(unsigned long size) + { + if (__currentCount >= __maxCount) + { + return null; + } + + __currentCount++; + + return new (std::nothrow) char[size]; + } + + virtual void Free(void* pMem) + { + if (__currentCount <= 0) + { + return; + } + + __currentCount--; + + delete [] (char*)(pMem); + } + + virtual unsigned long GetRemainedMemory() + { + return 0; + } + +private: + unsigned long __maxCount; + unsigned long __currentCount; +}; + +class _SizeBasedMemoryMgr + : public _FontMemoryManager::IMemoryAllocator +{ + typedef unsigned long PtrDiffType; + +public: + _SizeBasedMemoryMgr(unsigned long size) + : __maxMemory(size) + , __currentUsedMemory(0) + { + } + + virtual ~_SizeBasedMemoryMgr(void) + { + } + + virtual void* Alloc(unsigned long size) + { + size += sizeof(PtrDiffType); + + if (__currentUsedMemory + size > __maxMemory) + { + return null; + } + + void* pMem = new (std::nothrow) char[size]; + if (pMem) + { + *((PtrDiffType*)pMem) = size; + pMem = (void*)((char*)pMem + sizeof(PtrDiffType)); + __currentUsedMemory += size; + } + + return pMem; + } + + virtual void Free(void* pMem) + { + if (__currentUsedMemory <= 0 || pMem == null) + { + return; + } + + pMem = (void*)((char*)pMem - sizeof(PtrDiffType)); + __currentUsedMemory -= *((PtrDiffType*)pMem); + + delete [] (char*)(pMem); + } + + virtual unsigned long GetRemainedMemory() + { + return __maxMemory - __currentUsedMemory; + } + +private: + unsigned long __maxMemory; + unsigned long __currentUsedMemory; +}; + +class _FixedSizeMemoryMgr + : public _FontMemoryManager::IMemoryAllocator +{ +public: + _FixedSizeMemoryMgr(unsigned long size) + { + } + + virtual ~_FixedSizeMemoryMgr(void) {} + + virtual void* Alloc(unsigned long size) + { + return null; + } + + virtual void Free(void* pMem) + { + } + + virtual unsigned long GetRemainedMemory() + { + return 0; + } +}; + +_FontMemoryManager::_FontMemoryManager(_FontMemoryManager::Type type, int size) + : __pAllocator(null) +{ + IMemoryAllocator* p = null; + switch (type) + { + case _FontMemoryManager::TYPE_COUNT: + p = new (std::nothrow) _CountBasedMemoryMgr(size); + break; + case _FontMemoryManager::TYPE_SIZE: + p = new (std::nothrow) _SizeBasedMemoryMgr(size); + break; + case _FontMemoryManager::TYPE_FIXED_MEMORY: + p = new (std::nothrow) _FixedSizeMemoryMgr(size); + break; + default: + break; + } + + __pAllocator = p; +} + +_FontMemoryManager::~_FontMemoryManager(void) +{ + if (__pAllocator) + { + delete __pAllocator; + } + __pAllocator = null; +} + +void* +_FontMemoryManager::Alloc(unsigned long size) +{ + if (__pAllocator == null) + { + return null; + } + + return __pAllocator->Alloc(size); +} + +void +_FontMemoryManager::Free(void* pMemory) +{ + if (__pAllocator) + { + return __pAllocator->Free(pMemory); + } +} + +unsigned long +_FontMemoryManager::GetRemainedMemory() +{ + if (__pAllocator) + { + return __pAllocator->GetRemainedMemory(); + } + + return 0; +} + +bool +_FontMemoryManager::IsValid() const +{ + return (__pAllocator != null); +} + +}} // Tizen::Graphics diff --git a/src/graphics/FGrp_FontMemoryManager.h b/src/graphics/FGrp_FontMemoryManager.h new file mode 100644 index 0000000..7933935 --- /dev/null +++ b/src/graphics/FGrp_FontMemoryManager.h @@ -0,0 +1,68 @@ +// +// 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_FontMemoryManager.h + * @brief This is the header file for _FontMemoryManager class. + * + */ + +#ifndef _FGRP_INTERNAL_FONT_MEMORY_MANAGER_H_ +#define _FGRP_INTERNAL_FONT_MEMORY_MANAGER_H_ + + +namespace Tizen { namespace Graphics +{ + +class _FontMemoryManager +{ +public: + enum Type + { + TYPE_COUNT = 0, + TYPE_SIZE, + TYPE_FIXED_MEMORY + }; + + class IMemoryAllocator + { + public: + virtual ~IMemoryAllocator(void) {} + virtual void* Alloc(unsigned long size) = 0; + virtual void Free(void* pMem) = 0; + virtual unsigned long GetRemainedMemory(void) = 0; + }; + + _FontMemoryManager(_FontMemoryManager::Type typetype, int size); + virtual ~_FontMemoryManager(void); + + void* Alloc(unsigned long size); + void Free(void* pMem); + unsigned long GetRemainedMemory(void); + bool IsValid(void) const; + +private: + _FontMemoryManager(const _FontMemoryManager& obj); + _FontMemoryManager& operator =(const _FontMemoryManager& rhs); + _FontMemoryManager* operator &(void); + + IMemoryAllocator* __pAllocator; +}; + +}} // Tizen::Graphics + +#endif // _FGRP_INTERNAL_FONT_MEMORY_MANAGER_H_ 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 new file mode 100644 index 0000000..fddf424 --- /dev/null +++ b/src/graphics/FGrp_FontRsrcManager.cpp @@ -0,0 +1,1469 @@ +// +// 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_FontRsrcManager.cpp + * @brief This is the cpp file for _FontRsrcManager class. + * + */ + +#include +#include + +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "FGrp_Font.h" +#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 + +#include "util/FGrp_UtilTemplate.h" + + +#define IF_NOT_INITIALIZED(code) if (_pImpl == null) \ + { \ + code; \ + } + +using namespace Tizen::App; +using namespace Tizen::Io; +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Base::Utility; +using namespace Tizen::Graphics; +using namespace Tizen::System; + + +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 unsigned int _BLACK_LIST_MAX_COUNT = 1000; +const unsigned int _SPACE_LIST_MAX_COUNT = 1000; + +class _FontNull + : public Tizen::Graphics::_IFont +{ +public: + virtual bool SetAttrib(const Attrib& fontAttrib) + { + return false; + } + + virtual bool GetAttrib(Attrib& fontAttrib) const + { + return false; + } + + virtual bool GetKerning(unsigned long character1, unsigned long character2, long& xVector, long& yVector) const + { + return false; + } + + virtual bool LoadGlyph(unsigned long character, Glyph** pFontGlyphData) + { + return false; + } + + virtual bool UnloadGlyph(Glyph** pFontGlyphData) + { + return false; + } + + virtual unsigned long CheckGlyph(unsigned long character) + { + return 0; + } + + virtual bool GetGlyphList(const _Util::String& text, Tizen::Base::Collection::IListT<_IFont::Glyph *>& out, int script) + { + return false; + } + + virtual bool GetFontSizeProperty(SizeProperty& sizeProperty) const + { + return false; + } + + virtual bool GetFontProperty(Property& property) const + { + return false; + } + + virtual FontMapT* GetFallbackMap(void) + { + return null; + } + + virtual float GetFontSizeFromMaxHeight(_Util::FixedPoint26_6 expectedMaxHeight) const + { + return 0.0f; + } + + virtual bool hasPredefinedColor(void) const + { + return false; + } + +protected: + virtual bool Create(const void* pBuffer, long bufSize, long face = 0) + { + return false; + } + + virtual bool Create(const char* pFilePath, long face = 0) + { + return false; + } + + virtual bool CreateStatic(const void* pBuffer, long bufSize, long face = 0) + { + return false; + } + + virtual bool Reload(const void* pBuffer, long bufSize, long face = 0) + { + return false; + } + + virtual bool Reload(const char* filePath, long face = 0) + { + return false; + } + + virtual void Destroy(void) {} + + virtual bool _ClearCache(void) + { + return false; + } +}; // _FontNull + +#ifdef USE_HASHMAP_FOR_FONT +template +class _FontHashCodeProvider + : public IHashCodeProviderT +{ +public: + virtual int GetHashCode(const T& obj) const + { + return obj.GetHashCode(); + } +}; // _FontHashCodeProvider + +template +class _FontComparer + : public IComparerT +{ +public: + virtual result Compare(const T& obj1, const T& obj2, int& cmp) const + { + String& objString1 = static_cast (const_cast (obj1)); + String& objString2 = static_cast (const_cast (obj2)); + + cmp = objString1.CompareTo(objString2); + + return E_SUCCESS; + } +}; // _FontComparer + +template +class _FontHashCodeProviderEx + : public IHashCodeProviderT +{ +public: + virtual int GetHashCode(const T& obj) const + { + const wchar_t* pText = obj.c_str(); + const wchar_t* pTextEnd = pText - 1; + + while (*(++pTextEnd)) + ; + + int stride = ((pTextEnd - pText + 1) << 16) / 9; + int ix16 = 0; + + int ret1 = (pText[(ix16 += stride) >> 16] & 0xFF); + ret1 |= ((pText[(ix16 += stride) >> 16] & 0xFF) << 8); + ret1 |= ((pText[(ix16 += stride) >> 16] & 0xFF) << 16); + ret1 |= ((pText[(ix16 += stride) >> 16] & 0xFF) << 24); + + int ret2 = (pText[(ix16 += stride) >> 16] & 0xFF); + ret2 |= ((pText[(ix16 += stride) >> 16] & 0xFF) << 8); + ret2 |= ((pText[(ix16 += stride) >> 16] & 0xFF) << 16); + ret2 |= ((pText[(ix16 += stride) >> 16] & 0xFF) << 24); + + return ret1 ^ ret2; + } +}; // _FontHashCodeProviderEx + +template +class _FontComparerEx + : public IComparerT +{ +public: + virtual result Compare(const T& obj1, const T& obj2, int& cmp) const + { + cmp = wcscmp((wchar_t*)obj1.c_str(), (wchar_t*)obj2.c_str()); + + return E_SUCCESS; + } +}; // _FontComparerEx + +#else + +class _FindValueByString +{ +public: + _FindValueByString(const _Util::WString& key) + : __key(key) + { + } + + bool operator()(const std::pair<_Util::WString, Tizen::Graphics::_FontRsrcManager::SharedFontResource> pairValue) + { + return (__key == pairValue.first); + } + + bool operator()(const std::pair<_Util::WString, _Util::WString> pairValue) + { + return (__key == pairValue.first); + } + + const _Util::WString& __key; +}; // _FindValueByString + +#endif +} + +namespace Tizen { namespace Graphics +{ + +_FontRsrcManager* _FontRsrcManager::__pTheInstance = null; + +_FontRsrcManager::_FontRsrcManager() + : __isAppFontListInitialized(false) +{ +#ifdef USE_HASHMAP_FOR_FONT + // are you worry about failing to construct? + // but, HashMapT only can give E_SUCCESS/E_INVALID_ARG/E_OUT_OF_MEMORY. + // it means, if you ha2ve already verified input param, don't need to concern yourself. + // even though you have E_OUT_OF_MEMORY, it's already out of our control, + // and surely the other member function can give a error message. + + static _FontHashCodeProviderEx<_Util::WString> fontHashCodeProviderEx; + 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; + + FcInit(); + + const unsigned long cacheMemorySize = 1 * 1024 * 1024; + std::unique_ptr<_FontMemoryManager> pMemoryMgr(new (std::nothrow) _FontMemoryManager(_FontMemoryManager::TYPE_SIZE, cacheMemorySize)); + + if (pMemoryMgr != null && pMemoryMgr->IsValid()) + { + __pFontMemoryManager = pMemoryMgr.release(); + } + + SysAssert(__pFontMemoryManager != null); +} + +_FontRsrcManager::~_FontRsrcManager() +{ +#ifdef USE_HASHMAP_FOR_FONT + __fontRsrcMap.RemoveAll(); + __appFontMap.RemoveAll(); +#else + __fontRsrcMap.clear(); + __appFontMap.clear(); +#endif + + __blackListUnicodeSet.clear(); + __spaceListUnicodeSet.clear(); + + delete __pDefaultSystemFont; + delete __pFontMemoryManager; + + FcFini(); +} + +result +_FontRsrcManager::GetFont(const Tizen::Base::String& fontPath, int style, _Util::FixedPoint26_6 size, SharedFontResource& out) +{ + _Util::WString fontPathTemp(fontPath.GetPointer()); + + SharedFontResource sharedFont; + _IFont* pFont = null; + + bool rtn = false; + + //-------------------------------------------------------------------------- + // validation check of input param + // + // in case input fontPath is indicating folder, + // we should return 'E_UNSUPPORTED_FORMAT' as bads 2.0 did. + //-------------------------------------------------------------------------- + { + FileAttributes attr; + result r = File::GetAttributes(fontPath, attr); + if (IsFailed(r)) + { + return E_FILE_NOT_FOUND; + } + else if (attr.IsDirectory()) + { + return E_UNSUPPORTED_FORMAT; + } + } + + //-------------------------------------------------------------------------- + // step 1 + // + // if we already have specified resoruce, + // return it with increasing reference count + //-------------------------------------------------------------------------- + rtn = __SearchFont(fontPathTemp, sharedFont); + + if (rtn) + { + out = sharedFont; + + return E_SUCCESS; + } + + //-------------------------------------------------------------------------- + // step 2 + // + // create new font + //-------------------------------------------------------------------------- + { +#ifdef USE_MMAP + ByteBuffer* pBuffer = StringUtil::StringToUtf8N(fontPath); + if (pBuffer == null) + { + return false; + } + std::auto_ptr pathString(pBuffer); + + rtn = __CreateFont(_DEFAULT_FONT_ENGINE, (char*)pathString->GetPointer(), _DEFAULT_FONT_FACE, &pFont); +#else + int fileLength = 0; + int readLength = 0; + File file; + + result r = file.Construct(fontPath, L"rb"); + SysTryReturnResult(NID_GRP, r == E_SUCCESS, E_SYSTEM, "Failed to open file"); + + r = file.Seek(FILESEEKPOSITION_END, 0); + SysTryReturnResult(NID_GRP, r == E_SUCCESS, E_SYSTEM, "Failed to seek file"); + + fileLength = file.Tell(); + SysTryReturnResult(NID_GRP, fileLength > 0, E_SYSTEM, "The length of the file is not positive"); + + r = file.Seek(FILESEEKPOSITION_BEGIN, 0); + SysTryReturnResult(NID_GRP, r == E_SUCCESS, E_SYSTEM, "Failed to seek file"); + + std::unique_ptr buffer(new (std::nothrow) unsigned char[fileLength]); + SysTryReturnResult(NID_GRP, buffer, E_OUT_OF_MEMORY, "Failed to create font instance"); + + readLength = file.Read(buffer.get(), fileLength); + SysTryReturnResult(NID_GRP, readLength == fileLength, E_SYSTEM, "Failed to read file"); + + // create font + rtn = __CreateFont(_DEFAULT_FONT_ENGINE, buffer.get(), fileLength, _DEFAULT_FONT_FACE, &pFont); +#endif + SysTryReturnResult(NID_GRP, rtn && pFont != null, E_UNSUPPORTED_FORMAT, "Failed to create _IFont instance"); + + // make shared resource + sharedFont.reset(pFont); + + _IFont::Attrib fontAttrib; + rtn = pFont->GetAttrib(fontAttrib); + SysTryReturnResult(NID_GRP, rtn, E_SYSTEM, "Failed to get font attribute"); + + fontAttrib.size = size; + fontAttrib.style = 0; + fontAttrib.style |= (style & FONT_STYLE_BOLD) ? _IFont::STYLE_BOLD : 0; + fontAttrib.style |= (style & FONT_STYLE_ITALIC) ? _IFont::STYLE_ITALIC : 0; + + rtn = pFont->SetAttrib(fontAttrib); + SysTryReturnResult(NID_GRP, rtn, E_SYSTEM, "Failed to set font attribute"); + } + + //-------------------------------------------------------------------------- + // step 3 + // + // add newly created font resource to rsrc manager + //-------------------------------------------------------------------------- + rtn = __AddFont(fontPathTemp, sharedFont); + SysTryReturnResult(NID_GRP, rtn, E_SYSTEM, "Failed to add font resource into the shared container."); + + // set + out = sharedFont; + + //-------------------------------------------------------------------------- + // step 4 + // + // remove unused font + //-------------------------------------------------------------------------- + __RemoveUnusedFont(); + + return E_SUCCESS; +} + +result +_FontRsrcManager::GetTempFont(const Tizen::Base::String& fontPath, int style, _Util::FixedPoint26_6 size, SharedFontResource& out) +{ + _Util::WString fontPathTemp(fontPath.GetPointer()); + + SharedFontResource sharedFont; + _IFont* pFont = null; + //_FontCache* pFontCache = null; + bool rtn = false; + //unsigned char* pBuffer = null; + + if (!_IsVirtualFontFileName(fontPath.GetPointer())) + { + //-------------------------------------------------------------------------- + // validation check of input param + // + // in case input fontPath is indicating folder, + // we should return 'E_UNSUPPORTED_FORMAT' as bads 2.0 did. + //-------------------------------------------------------------------------- + { + FileAttributes attr; + result r = File::GetAttributes(fontPath, attr); + if (IsFailed(r)) + { + return E_FILE_NOT_FOUND; + } + else if (attr.IsDirectory()) + { + return E_UNSUPPORTED_FORMAT; + } + } + } + + //-------------------------------------------------------------------------- + // step 1 + // + // if we already have specified resoruce, + // return it with increasing reference count + //-------------------------------------------------------------------------- + rtn = __SearchFont(fontPathTemp, sharedFont); + + if (rtn) + { + out = sharedFont; + + return E_SUCCESS; + } + + //-------------------------------------------------------------------------- + // step 2 + // + // create new font + //-------------------------------------------------------------------------- + { + ByteBuffer* pBuffer = StringUtil::StringToUtf8N(fontPath); + if (pBuffer == null) + { + return false; + } + std::auto_ptr pathString(pBuffer); + + rtn = __CreateFont(_DEFAULT_FONT_ENGINE, (char*)pathString->GetPointer(), _DEFAULT_FONT_FACE, &pFont); + SysTryReturnResult(NID_GRP, rtn && pFont != null, E_UNSUPPORTED_FORMAT, "Failed to create _IFont instance"); + + // make shared resource + sharedFont.reset(pFont); + + _IFont::Attrib fontAttrib; + rtn = pFont->GetAttrib(fontAttrib); + SysTryReturnResult(NID_GRP, rtn, E_SYSTEM, "Failed to get font attribute"); + + fontAttrib.size = size; + fontAttrib.style = 0; + fontAttrib.style |= (style & FONT_STYLE_BOLD) ? _IFont::STYLE_BOLD : 0; + fontAttrib.style |= (style & FONT_STYLE_ITALIC) ? _IFont::STYLE_ITALIC : 0; + + rtn = pFont->SetAttrib(fontAttrib); + SysTryReturnResult(NID_GRP, rtn, E_SYSTEM, "Failed to set font attribute"); + } + + // set + out = sharedFont; + + return E_SUCCESS; +} + +result +_FontRsrcManager::AddFont(const _Util::WString& fontPath, SharedFontResource& out) +{ + bool rtn = false; + + rtn = __AddFont(fontPath, out); + SysTryReturnResult(NID_GRP, rtn, E_SYSTEM, "Failed to add font resource into the shared container."); + + return E_SUCCESS; +} + +bool +_FontRsrcManager::SearchFont(const _Util::WString& fontName) +{ + SharedFontResource sharedFont; + + return (__SearchFont(fontName, sharedFont) == true); +} + +void +_FontRsrcManager::AddBlackList(const wchar_t unicode) +{ + if (__blackListUnicodeSet.size() > _BLACK_LIST_MAX_COUNT) + { + this->ClearBlackList(); + } + + __blackListUnicodeSet.insert(unicode); +} + +bool +_FontRsrcManager::SearchBlackList(const wchar_t unicode) const +{ + BlackListSetT::const_iterator blackListIterator = __blackListUnicodeSet.find(unicode); + + return (blackListIterator != __blackListUnicodeSet.end()); +} + +void +_FontRsrcManager::ClearBlackList() +{ + __blackListUnicodeSet.clear(); +} + +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) +{ + SharedFontResource sharedFont; + _IFont* pFont = null; + + //-------------------------------------------------------------------------- + // step 1 + // + // create new font with user resource. + //-------------------------------------------------------------------------- + bool rtn = __CreateFont(_DEFAULT_FONT_ENGINE, pFontData, fontDataSize, _DEFAULT_FONT_FACE, &pFont); + SysTryReturnResult(NID_GRP, rtn && pFont != null, E_UNSUPPORTED_FORMAT, "Failed to create _IFont"); + + // make shared resource + sharedFont.reset(pFont); + + _IFont::Attrib fontAttrib; + rtn = pFont->GetAttrib(fontAttrib); + SysTryReturnResult(NID_GRP, rtn, E_SYSTEM, "Failed to get font attribute"); + + fontAttrib.size = size; + fontAttrib.style = 0; + fontAttrib.style |= (style & FONT_STYLE_BOLD) ? _IFont::STYLE_BOLD : 0; + fontAttrib.style |= (style & FONT_STYLE_ITALIC) ? _IFont::STYLE_ITALIC : 0; + + rtn = pFont->SetAttrib(fontAttrib); + SysTryReturnResult(NID_GRP, rtn, E_SYSTEM, "Failed to set font attribute"); + + //-------------------------------------------------------------------------- + // step 2 + // + // add newly created font resource to rsrc manager + //-------------------------------------------------------------------------- + static long long idx = 0; + + String fontName(L"UserMemoryFont"); + fontName.Append(idx++); + + _Util::WString fontNameTemp(fontName.GetPointer()); + + rtn = __AddFont(fontNameTemp, sharedFont); + SysTryReturnResult(NID_GRP, rtn, E_SYSTEM, "Failed to add font resrouce into the shared container."); + + // set + out = sharedFont; + + //-------------------------------------------------------------------------- + // step 3 + // + // remove unused font + //-------------------------------------------------------------------------- + __RemoveUnusedFont(); + + return E_SUCCESS; +} + +result +_FontRsrcManager::GetFont(int style, _Util::FixedPoint26_6 size, SharedFontResource& out) +{ + SharedFontResource sharedFont; + bool isBold = (style & FONT_STYLE_BOLD) ? true : false; + + String systemFontName = isBold ? _DEFAULT_SYSTEM_BOLD_FONT : _DEFAULT_SYSTEM_FONT; + + _Util::WString systemFontNameTemp(systemFontName.GetPointer()); + + _IFont* pFont = null; + bool rtn = false; + + //-------------------------------------------------------------------------- + // step 1 + // + // if we already have specified resoruce, + // return it with increasing reference count + //-------------------------------------------------------------------------- + rtn = __SearchFont(systemFontNameTemp, sharedFont); + + if (rtn) + { + out = sharedFont; + + return E_SUCCESS; + } + + //-------------------------------------------------------------------------- + // step 2 + // + // create new font with default font resource. + //-------------------------------------------------------------------------- + + isBold ? __defaultSystemBoldFontPath.Clear() : __defaultSystemFontPath.Clear(); + + const String& defaultSystemFontPath = __GetDefaultSystemFontPath(isBold); + SysTryReturnResult(NID_GRP, defaultSystemFontPath.IsEmpty() == false, E_SYSTEM, "Failed to get default system font path"); + + { +#ifdef USE_MMAP + ByteBuffer* pBuffer = StringUtil::StringToUtf8N(defaultSystemFontPath); + if (pBuffer == null) + { + return false; + } + std::auto_ptr pathString(pBuffer); + + rtn = __CreateFont(_DEFAULT_FONT_ENGINE, (char*)pathString->GetPointer(), _DEFAULT_FONT_FACE, &pFont); +#else + int fileLength = 0; + File file; + + result r = file.Construct(defaultSystemFontPath, L"rb"); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Failed to open file", GetErrorMessage(r)); + + r = file.Seek(FILESEEKPOSITION_END, 0); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Failed to seek file", GetErrorMessage(r)); + + fileLength = file.Tell(); + SysTryReturn(NID_GRP, fileLength > 0, r, r, "[%s] The length of the file is not positive", GetErrorMessage(r)); + + r = file.Seek(FILESEEKPOSITION_BEGIN, 0); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Failed to seek file", GetErrorMessage(r)); + + std::unique_ptr autoPtrBuffer(new (std::nothrow) unsigned char[fileLength]); + SysTryReturn(NID_GRP, autoPtrBuffer, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to create buffer of the file length"); + + file.Read(autoPtrBuffer.get(), fileLength); + + rtn = __CreateFont(_DEFAULT_FONT_ENGINE, autoPtrBuffer.get(), fileLength, _DEFAULT_FONT_FACE, &pFont); +#endif + SysTryReturnResult(NID_GRP, rtn && pFont != null, E_UNSUPPORTED_FORMAT, "Failed to create _IFont instance"); + + // make shared resource + sharedFont.reset(pFont); + + _IFont::Attrib fontAttrib; + rtn = pFont->GetAttrib(fontAttrib); + SysTryReturnResult(NID_GRP, rtn, E_SYSTEM, "Failed to get font attribute"); + + fontAttrib.size = size; + fontAttrib.style = 0; + fontAttrib.style |= (style & FONT_STYLE_BOLD) ? _IFont::STYLE_BOLD : 0; + fontAttrib.style |= (style & FONT_STYLE_ITALIC) ? _IFont::STYLE_ITALIC : 0; + + rtn = pFont->SetAttrib(fontAttrib); + SysTryReturnResult(NID_GRP, rtn, E_SYSTEM, "Failed to set font attribute"); + } + + //-------------------------------------------------------------------------- + // step 3 + // + // add newly created font resource to rsrc manager + //-------------------------------------------------------------------------- + rtn = __AddFont(systemFontNameTemp, sharedFont); + SysTryReturnResult(NID_GRP, rtn, E_SYSTEM, "Failed to add font resource into the shared container"); + + // set + out = sharedFont; + + //-------------------------------------------------------------------------- + // step 4 + // + // remove unused font + //-------------------------------------------------------------------------- + __RemoveUnusedFont(); + + return E_SUCCESS; +} + +result +_FontRsrcManager::GetSystemFont(const Tizen::Base::String& fontName, int style, _Util::FixedPoint26_6 size, SharedFontResource& out) +{ + FcPattern *pFontPattern = null; + FcFontSet *pFontSet = null; + FcResult res = FcResultNoMatch; + FcChar8* pPath = null; + const int fcWeight = (style & FONT_STYLE_BOLD) ? FC_WEIGHT_BOLD : FC_WEIGHT_REGULAR; + result r = E_SYSTEM; + + ByteBuffer* pBuffer = StringUtil::StringToUtf8N(fontName); + if (pBuffer == null) + { + return E_SYSTEM; + } + std::auto_ptr utfString(pBuffer); + + //FcBool rtn = FcInitReinitialize(); + //SysTryCatch(NID_GRP, rtn != FcFalse, , r, "[E_SYSTEM] Failed to init fontconfig"); + + pFontPattern = FcPatternBuild(NULL, FC_WEIGHT, FcTypeInteger, fcWeight, NULL); + SysTryCatch(NID_GRP, pFontPattern, , r, "[E_SYSTEM] Failed to FcPatternBuild()"); + + FcPatternAddString(pFontPattern, FC_FAMILY, (FcChar8*)utfString->GetPointer()); + FcConfigSubstitute(NULL, pFontPattern, FcMatchPattern); + FcDefaultSubstitute(pFontPattern); + + pFontSet = FcFontSort(NULL, pFontPattern, FcTrue, NULL, &res); + SysTryCatch(NID_GRP, pFontSet, , r, "[E_SYSTEM] Failed to FcFontSort()"); + + res = FcPatternGetString(pFontSet->fonts[0], FC_FILE, 0, &pPath); + SysTryCatch(NID_GRP, res == FcResultMatch, , r, "[E_SYSTEM] Failed to get path of system font"); + + r = this->GetFont(String((char*)pPath), style, size, out); + SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Failed to get font", GetErrorMessage(r)); + + // destroy + FcPatternDestroy(pFontPattern); + FcFontSetDestroy(pFontSet); + //FcFini(); + + return E_SUCCESS; + +CATCH: + if (pFontSet) + { + FcFontSetDestroy(pFontSet); + } + + if (pFontPattern) + { + FcPatternDestroy(pFontPattern); + } + + //FcFini(); + + return r; +} + +void +_FontRsrcManager::__InitFontRsrcManager(void) +{ + static _FontRsrcManager instance; + __pTheInstance = &instance; +} + +_FontRsrcManager& +_FontRsrcManager::GetInstance(void) +{ + static pthread_once_t once_block = PTHREAD_ONCE_INIT; + + if (!__pTheInstance) + { + pthread_once(&once_block, __InitFontRsrcManager); + } + + return (*__pTheInstance); +} + +bool +_FontRsrcManager::__CreateFont(int fontEngine, const void* pBuffer, long bufSize, long face, _IFont** ppOut) +{ + // check input param + SysTryReturn(NID_GRP, ppOut, false, E_INVALID_ARG, "[E_INVALID_ARG] Invalid out param is given"); + + std::auto_ptr<_IFont> autoPtrFont; + + switch (fontEngine) + { + case _DEFAULT_FONT_ENGINE: + autoPtrFont.reset(new (std::nothrow) _FontFt2); + break; + + default: + autoPtrFont.reset(new (std::nothrow) _FontNull); + break; + } + + 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"); + + // set out param + *ppOut = autoPtrFont.release(); + + return true; +} + +bool +_FontRsrcManager::__CreateFont(int fontEngine, const char* filePath, const long face, _IFont** ppOut) +{ + // 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 _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] Memory allocation failed."); + + bool rtn = autoPtrFont->Create(filePath, face); + SysTryReturn(NID_GRP, rtn, false, E_SYSTEM, "[E_SYSTEM] Failed to create font resource"); + + // set out param + *ppOut = autoPtrFont.release(); + + return true; +} + +bool +_FontRsrcManager::__CreateStaticFont(int fontEngine, const void* pBuffer, long bufSize, long face, _IFont** ppOut) +{ + // check input param + SysTryReturn(NID_GRP, ppOut, false, E_INVALID_ARG, "[E_INVALID_ARG] Invalid out param is given"); + + std::auto_ptr<_IFont> autoPtrFont; + + switch (fontEngine) + { + case 0: + autoPtrFont.reset(new (std::nothrow) _FontFt2); + break; + + default: + autoPtrFont.reset(new (std::nothrow) _FontNull); + break; + } + + 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"); + + // set out param + *ppOut = autoPtrFont.release(); + + return true; +} + +bool +_FontRsrcManager::__SearchFont(const _Util::WString& fontPath, SharedFontResource& out) const +{ + // check input param + SysTryReturn(NID_GRP, out.get() == null, false, E_INVALID_ARG, "[E_INVALID_ARG] Invalid out param is given"); + +#ifdef USE_HASHMAP_FOR_FONT + return (__fontRsrcMap.GetValue(fontPath, out) == E_SUCCESS); +#else + FontMapT::const_iterator fontIterator = std::find_if(__fontRsrcMap.begin(), __fontRsrcMap.end(), _FindValueByString(fontPath)); + + if (fontIterator != __fontRsrcMap.end()) + { + out = fontIterator->second; + + return true; + } + + return false; +#endif +} + +bool +_FontRsrcManager::__AddFont(const _Util::WString& key, const SharedFontResource& font) +{ + // check input param + SysTryReturn(NID_GRP, font.get() != null, false, E_INVALID_ARG, "[E_INVALID_ARG] Invalid input param is given"); + +#ifdef USE_HASHMAP_FOR_FONT + result r = __fontRsrcMap.Add(key, font); + + SysTryReturn(NID_GRP, r == E_SUCCESS || r == E_OBJ_ALREADY_EXIST, false, false, "[%s] Failed to add font into resource pool", GetErrorMessage(r)); +#else + __fontRsrcMap.push_back(std::make_pair(key, font)); +#endif + + return true; +} + +void +_FontRsrcManager::__RemoveUnusedFont(void) +{ + ArrayListT<_Util::WString> keys; + String systemFontName(_DEFAULT_SYSTEM_FONT); + String systemBoldFontName(_DEFAULT_SYSTEM_BOLD_FONT); + + _Util::WString systemFontNameTemp(systemFontName.GetPointer()); + _Util::WString systemBoldFontNameTemp(systemBoldFontName.GetPointer()); + + // find out unused font + +#ifdef USE_HASHMAP_FOR_FONT + { + std::auto_ptr > enumerator(__fontRsrcMap.GetMapEnumeratorN()); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_GRP, enumerator.get() != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + while (enumerator->MoveNext() == E_SUCCESS) + { + SharedFontResource font; + r = enumerator->GetValue(font); + + if (r == E_SUCCESS && font.use_count() == 2) + { + _Util::WString key(L""); + r = enumerator->GetKey(key); + + if (r == E_SUCCESS && (key != systemFontNameTemp && key != systemBoldFontNameTemp)) + { + keys.Add(key); + } + } + } + } +#else + { + for (FontMapT::iterator fontIterator = __fontRsrcMap.begin(); fontIterator != __fontRsrcMap.end(); ++fontIterator) + { + SharedFontResource font(fontIterator->second); + + if (font != null && font.use_count() == 2) + { + _Util::WString key(fontIterator->first); + + if (key != systemFontNameTemp && key != systemBoldFontNameTemp) + { + keys.Add(key); + } + } + } + } +#endif + + // remove + if (keys.GetCount() > 0) + { + std::auto_ptr > enumerator(keys.GetEnumeratorN()); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_GRP, enumerator.get() != null, r, "[%s] Propagating.", GetErrorMessage(r)); + + while (enumerator->MoveNext() == E_SUCCESS) + { + _Util::WString key(L""); + r = enumerator->GetCurrent(key); + + if (r == E_SUCCESS) + { +#ifdef USE_HASHMAP_FOR_FONT + __fontRsrcMap.Remove(key); +#else + for (FontMapT::iterator fontMapIter = __fontRsrcMap.begin(); fontMapIter != __fontRsrcMap.end(); ++fontMapIter) + { + if (fontMapIter->first == key) + { + __fontRsrcMap.erase(fontMapIter); + break; + } + } +#endif + } + } + } + + return; +} + +bool +_FontRsrcManager::__ReloadFont(String fontName, bool isBold) +{ + SharedFontResource sharedFont; + _Util::WString systemFontName(fontName.GetPointer()); + + _IFont* pFont = null; + bool rtn = false; + + // Check if there is default system font in font resource manager + // If there isn't default system font, we can't reload font resource + rtn = __SearchFont(systemFontName, sharedFont); + SysTryReturn(NID_GRP, rtn, false, E_SYSTEM, "[E_SYSTEM] Failed to search default system font"); + + // Get default system font interface instance + pFont = sharedFont.get(); + + // Reload system font resource in font interface + { +#ifdef USE_MMAP + isBold ? __defaultSystemBoldFontPath.Clear() : __defaultSystemFontPath.Clear(); + const String& fontPath = __GetDefaultSystemFontPath(isBold); + + ByteBuffer* pBuffer = StringUtil::StringToUtf8N(fontPath); + if (pBuffer == null) + { + return false; + } + std::auto_ptr pathString(pBuffer); + + rtn = pFont->Reload((char*)pathString->GetPointer(), _DEFAULT_FONT_FACE); + SysTryReturn(NID_GRP, rtn, false, E_SYSTEM, "[E_SYSTEM] Failed to reload font"); +#else + int fileLength = 0; + File file; + + isBold ? __defaultSystemBoldFontPath.Clear() : __defaultSystemFontPath.Clear(); + + result r = file.Construct(__GetDefaultSystemFontPath(isBold), L"rb"); + SysTryReturn(NID_GRP, r == E_SUCCESS, false, r, "[%s] Failed to open file", GetErrorMessage(r)); + + r = file.Seek(FILESEEKPOSITION_END, 0); + SysTryReturn(NID_GRP, r == E_SUCCESS, false, r, "[%s] Failed to seek file", GetErrorMessage(r)); + + fileLength = file.Tell(); + SysTryReturn(NID_GRP, fileLength > 0, false, r, "[%s] The length of the file is not positive", GetErrorMessage(r)); + + r = file.Seek(FILESEEKPOSITION_BEGIN, 0); + SysTryReturn(NID_GRP, r == E_SUCCESS, false, r, "[%s] Failed to seek file", GetErrorMessage(r)); + + std::unique_ptr autoPtrBuffer(new (std::nothrow) unsigned char[fileLength]); + SysTryReturn(NID_GRP, autoPtrBuffer, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to create buffer of the file length"); + + file.Read(autoPtrBuffer.get(), fileLength); + rtn = pFont->Reload(autoPtrBuffer.get(), fileLength, _DEFAULT_FONT_FACE); + SysTryReturn(NID_GRP, rtn, false, E_SYSTEM, "[E_SYSTEM] Failed to reload font"); +#endif + + pFont->_ClearCache(); + this->ClearBlackList(); + } + + return true; +} + +bool +_FontRsrcManager::ReloadDefaultSystemFont(void) +{ + // reinitialize fontconfig library + FcInitReinitialize(); + + String systemFontName; + + systemFontName = _DEFAULT_SYSTEM_FONT; + __ReloadFont(systemFontName, false); + + systemFontName = _DEFAULT_SYSTEM_BOLD_FONT; + __ReloadFont(systemFontName, true); + + return true; +} + +_FontMemoryManager& +_FontRsrcManager::GetMemoryManager(void) +{ + return *__pFontMemoryManager; +} + + +_Font& +_FontRsrcManager::GetDefaultSystemFont(void) +{ + if (__pDefaultSystemFont == null) + { + std::auto_ptr<_Font> font(new (std::nothrow) _Font); + + if (font.get()) + { + result r = font->Construct(FONT_STYLE_PLAIN, _SYSTEM_DEFAULT_FONT_SIZE); + + if (r == E_SUCCESS) + { + __pDefaultSystemFont = font.release(); + } + } + } + + SysAssert(__pDefaultSystemFont != null); + + return *__pDefaultSystemFont; +} + + +long +_FontRsrcManager::__GetMaxFontEngine(void) const +{ + return 1; +} + +String +_FontRsrcManager::__GetFontPath(bool isBold) +{ + String fontPath(L""); + + FcFontSet* pFontSet = null; + FcPattern* pFontPattern = null; + const int fcWeight = isBold ? FC_WEIGHT_BOLD : FC_WEIGHT_REGULAR; + + // initialize fontconfig library + //FcBool rtn = FcInitReinitialize(); + //SysTryCatch(NID_GRP, rtn != FcFalse, , E_SYSTEM, "[E_SYSTEM] Failed to init fontconfig"); + + // create pattern + pFontPattern = FcPatternCreate(); + SysTryCatch(NID_GRP, pFontPattern, , E_SYSTEM, "[E_SYSTEM] Failed to create font pattern"); + + FcPatternAddInteger(pFontPattern, FC_WEIGHT, fcWeight); + FcPatternAddString(pFontPattern, FC_FAMILY, (FcChar8*)"Tizen"); + FcConfigSubstitute(0, pFontPattern, FcMatchPattern); + FcDefaultSubstitute(pFontPattern); + + // create fontset + pFontSet = FcFontSetCreate(); + SysTryCatch(NID_GRP, pFontSet, , E_SYSTEM, "[E_SYSTEM] Failed to create fontset"); + + { + FcPattern* pMatchedPattern = null; + FcResult result = FcResultNoMatch; + pMatchedPattern = FcFontMatch(NULL, pFontPattern, &result); + + if (/*result == FcResultMatch && */pMatchedPattern) + { + FcFontSetAdd(pFontSet, pMatchedPattern); + } + + // check if we have a system font info + SysTryCatch(NID_GRP, pFontSet->nfont >= 1, , E_SYSTEM, "[E_SYSTEM] Default system count is %d", pFontSet->nfont); + + FcChar8* pPath = null; + result = FcPatternGetString(pFontSet->fonts[0], FC_FILE, 0, &pPath); + SysTryCatch(NID_GRP, result == FcResultMatch, , E_SYSTEM, "[E_SYSTEM] Failed to create fontset"); + fontPath.Clear(); + fontPath.Append(String((char*)pPath)); + } + + // destroy + FcPatternDestroy(pFontPattern); + FcFontSetDestroy(pFontSet); + //FcFini(); + + return fontPath; + +CATCH: + if (pFontSet != null) + { + FcFontSetDestroy(pFontSet); + } + + if (pFontPattern != null) + { + FcPatternDestroy(pFontPattern); + } + + return fontPath; +} + +const String& +_FontRsrcManager::__GetDefaultSystemFontPath(bool isBold) +{ + String& defaultPath = (isBold) ? __defaultSystemBoldFontPath : __defaultSystemFontPath; + + if (!defaultPath.IsEmpty()) + { + return defaultPath; + } + else + { + String path = __GetFontPath(isBold); + + if (isBold) + { + if (path.IsEmpty()) + { + path = __GetFontPath(false); + // [ykahn] Is 'path' always not NULL ? + } + + __defaultSystemBoldFontPath.Clear(); + __defaultSystemBoldFontPath.Append(path); + + return __defaultSystemBoldFontPath; + } + else + { + __defaultSystemFontPath.Clear(); + __defaultSystemFontPath.Append(path); + + return __defaultSystemFontPath; + } + } +} + +bool +_FontRsrcManager::RemoveMemory(unsigned long requestedSize) +{ +#ifdef USE_REMOVE_ALL_CACHE + +#ifdef USE_HASHMAP_FOR_FONT + result r = E_SUCCESS; + std::auto_ptr > enumerator(__fontRsrcMap.GetMapEnumeratorN()); + + while (enumerator->MoveNext() == E_SUCCESS) + { + SharedFontResource fontRsrc; + r = enumerator->GetValue(fontRsrc); + + fontRsrc->_ClearCache(); + } + + return true; +#else + for (FontMapT::iterator fontIterator = __fontRsrcMap.begin(); fontIterator != __fontRsrcMap.end(); ++fontIterator) + { + SharedFontResource fontRsrc(fontIterator->second); + + fontRsrc->_ClearCache(); + } + + return true; +#endif + +#else + unsigned long remainedMemory = 0; + result r = E_SUCCESS; + bool isComplete = false; + + ArrayListT keys; + String systemFontName(_DEFAULT_SYSTEM_FONT); + _Util::WString systemFontNameTemp(systemFontName.GetPointer()); + + std::auto_ptr > enumerator(__fontRsrcMap.GetMapEnumeratorN()); + + while (enumerator->MoveNext() == E_SUCCESS) + { + if (isComplete) + { + break; + } + + _Util::WString key; + r = enumerator->GetKey(key); + if (r == E_SUCCESS/* && key != systemFontNameTemp*/) + { + SharedFontResource fontRsrc; + r = enumerator->GetValue(fontRsrc); + + while (!fontRsrc->second->IsEmpty()) + { + fontRsrc->second->RemoveFirst(); + + remainedMemory = __pFontMemoryManager->GetRemainedMemory(); + + if (remainedMemory > requestedSize) + { + isComplete = true; + break; + } + } + } + } + + return isComplete; +#endif +} + +_Util::WString +_FontRsrcManager::FindAppFontName(const _Util::WString& fontName) +{ + _Util::WString fontPath(L""); + + if (!__isAppFontListInitialized) + { + String dirName; + Directory dir; + DirEnumerator* pDirEnum; + + //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))) + { + return fontPath; + } + + // Reads all the directory entries + pDirEnum = dir.ReadN(); + + if (!pDirEnum) + { + return fontPath; + } + + // Loops through all the directory entries + while (pDirEnum->MoveNext() == E_SUCCESS) + { + SharedFontResource sharedFont; + String faceName; + String name; + String token; + DirEntry entry = pDirEnum->GetCurrentDirEntry(); + Tizen::Base::Utility::StringTokenizer formatTok(entry.GetName(), L"."); + + while (formatTok.GetTokenCount()) + { + formatTok.GetNextToken(token); + } + + if (entry.IsDirectory() == false) + { + name.Append(dirName); + name.Append(L"/"); + name.Append(entry.GetName()); + + faceName = _Font::GetFaceName(name); + + _Util::WString faceNameTemp(faceName.GetPointer()); + _Util::WString nameTemp(name.GetPointer()); +#ifdef USE_HASHMAP_FOR_FONT + __appFontMap.Add(faceNameTemp, nameTemp); +#else + __appFontMap.push_back(std::make_pair(faceNameTemp, nameTemp)); +#endif + } + } + + delete pDirEnum; + pDirEnum = null; + + __isAppFontListInitialized = true; + } + +#ifdef USE_HASHMAP_FOR_FONT + __appFontMap.GetValue(fontName, fontPath); +#else + AppFontMapT::const_iterator appFontIterator = std::find_if(__appFontMap.begin(), __appFontMap.end(), _FindValueByString(fontName)); + + if (appFontIterator != __appFontMap.end()) + { + fontPath = appFontIterator->second; + } +#endif + + return fontPath; +} + +}} // Tizen::Graphics \ No newline at end of file diff --git a/src/graphics/FGrp_FontRsrcManager.h b/src/graphics/FGrp_FontRsrcManager.h new file mode 100644 index 0000000..3185ea3 --- /dev/null +++ b/src/graphics/FGrp_FontRsrcManager.h @@ -0,0 +1,134 @@ +// +// 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_FontRsrcManager.h + * @brief This is the header file for FGrp_FontRsrcManager class. + * + */ + +#ifndef _FGRP_INTERNAL_FONT_RSRC_MANAGER_H_ +#define _FGRP_INTERNAL_FONT_RSRC_MANAGER_H_ + +#include +#include + + +#ifdef USE_HASHMAP_FOR_FONT + #include +#else + #include + #include +#endif + +#include +#include +#include +#include + +#include "FGrp_FontMemoryManager.h" +#include "util/FGrp_UtilTemplate.h" + +namespace Tizen { namespace Graphics +{ + +class _Font; +struct _FontResource; + +class _FontRsrcManager + : public Tizen::Base::Object +{ +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; +#else + typedef std::list > FontMapT; + typedef std::list > AppFontMapT; +#endif + + virtual ~_FontRsrcManager(void); + + result GetFont(const Tizen::Base::String& fontPath, int style, _Util::FixedPoint26_6 size, SharedFontResource& out); + result GetFont(const byte* pFontData, int fontDataSize, int style, _Util::FixedPoint26_6 size, SharedFontResource& out); + result GetFont(int style, _Util::FixedPoint26_6 size, SharedFontResource& out); + + result GetSystemFont(const Tizen::Base::String& fontName, int style, _Util::FixedPoint26_6 size, SharedFontResource& out); + + result GetTempFont(const Tizen::Base::String& fontPath, int style, _Util::FixedPoint26_6 size, SharedFontResource& out); + result AddFont(const _Util::WString& fontPath, SharedFontResource& out); + bool SearchFont(const _Util::WString& fontName); + + void AddBlackList(const wchar_t); + bool SearchBlackList(const wchar_t) const; + void ClearBlackList(void); + + void AddSpaceList(const wchar_t); + bool SearchSpaceList(const wchar_t) const; + void ClearSpaceList(void); + + bool ReloadDefaultSystemFont(void); + _FontMemoryManager& GetMemoryManager(void); + _Font& GetDefaultSystemFont(void); + bool RemoveMemory(unsigned long requestedSize); + + _Util::WString FindAppFontName(const _Util::WString& fontName); + + static _FontRsrcManager& GetInstance(void); + +private: + _FontRsrcManager(void); + _FontRsrcManager(const _FontRsrcManager& obj); + _FontRsrcManager& operator =(const _FontRsrcManager& rhs); + + bool __CreateFont(int fontEngine, const void* pBuffer, long bufSize, long face, _IFont** pOut); + bool __CreateFont(int fontEngine, const char* filePath, long face, _IFont** pOut); + bool __CreateStaticFont(int fontEngine, const void* pBuffer, long bufSize, long face, _IFont** pOut); + bool __AddFont(const _Util::WString& key, const SharedFontResource& font); + bool __SearchFont(const _Util::WString& fontName, SharedFontResource& out) const; + + void __RemoveUnusedFont(void); + long __GetMaxFontEngine(void) const; + const Tizen::Base::String& __GetDefaultSystemFontPath(bool isBold); + Tizen::Base::String __GetFontPath(bool isBold); + bool __ReloadFont(Tizen::Base::String fontName, bool isBold); + + static void __InitFontRsrcManager(void); + +private: + FontMapT __fontRsrcMap; + AppFontMapT __appFontMap; + BlackListSetT __blackListUnicodeSet; + SpaceListSetT __spaceListUnicodeSet; + + Tizen::Base::String __defaultSystemFontPath; + Tizen::Base::String __defaultSystemBoldFontPath; + + _FontMemoryManager* __pFontMemoryManager; + _Font* __pDefaultSystemFont; + + static _FontRsrcManager* __pTheInstance; + bool __isAppFontListInitialized; +}; // _FontRsrcManager + +}} // Tizen::Graphics + +#endif // _FGRP_INTERNAL_FONT_RSRC_MANAGER_H_ + diff --git a/src/graphics/FGrp_FontUtil.h b/src/graphics/FGrp_FontUtil.h new file mode 100644 index 0000000..78eac9a --- /dev/null +++ b/src/graphics/FGrp_FontUtil.h @@ -0,0 +1,62 @@ +// +// 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_FontUtil.h + * @brief This is the header file for _FontUtil class. + * + */ + +#ifndef _FGRP_INTERNAL_FONT_UTIL_H_ +#define _FGRP_INTERNAL_FONT_UTIL_H_ + + +#include + +#include "FGrp_FontImpl.h" + + +namespace Tizen { namespace Graphics +{ + +class _FontImplHack + : public _FontImpl +{ +public: + _Font* GetFontEx(void) const + { + return (this && this->_pNativeFont) ? this->_pNativeFont : 0; + } +}; + +inline _Font* +_GetFontEx(const Tizen::Graphics::_FontImpl& font) +{ + const _FontImplHack* pFontImplHack = static_cast (&font); + return (pFontImplHack) ? pFontImplHack->GetFontEx() : null; +} + +inline _Font* +_GetFontEx(const Tizen::Graphics::Font& font) +{ + const _FontImpl* pFontImpl = _FontImpl::GetInstance(font); + return (pFontImpl) ? _GetFontEx(*pFontImpl) : null; +} + +}} // Tizen::Graphics + +#endif // _FGRP_INTERNAL_FONT_UTIL_H_ diff --git a/src/graphics/FGrp_IFont.h b/src/graphics/FGrp_IFont.h new file mode 100644 index 0000000..8c89156 --- /dev/null +++ b/src/graphics/FGrp_IFont.h @@ -0,0 +1,201 @@ +// +// 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_IFont.h + * @brief This is the header file for _IFont class. + * + */ + +#ifndef _FGRP_INTERNAL_IFONT_H_ +#define _FGRP_INTERNAL_IFONT_H_ + +#include +#include + + +#ifdef USE_HASHMAP_FOR_FONT + #include +#else + #include + #include +#endif + +#include "util/FGrp_UtilType.h" + +namespace Tizen { namespace Graphics +{ + +class _FontRsrcManager; + +class _IFont +{ +public: + typedef std::tr1::shared_ptr<_IFont> SharedFontResource; +#ifdef USE_HASHMAP_FOR_FONT + typedef Tizen::Base::Collection::HashMapT <_Util::WString, SharedFontResource> FontMapT; +#else + typedef std::list > FontMapT; +#endif + + //! Enumerated definition of the font style. + enum Style + { + STYLE_NONE = 0, //!< Basic style. + STYLE_ITALIC = 1, //!< Italic style. + STYLE_BOLD = 2, //!< Bold style. + STYLE_UNDERLINE = 4, //!< Underline style. + STYLE_BACKSLANT = 8 //!< Reverse italic style. + }; + + //! Enumerated definition of the font quality. + enum Quality + { + QUALITY_MONO = 0, //!< Glyph of 1-bit form. + QUALITY_LOW = 1, //!< Low quality of 8-bit form. + QUALITY_MEDIUM = 2, //!< Medium quality of 8-bit form. + QUALITY_HIGH = 3 //!< High quality of 8-bit form. + }; + + //! Enumerated definition of the font capabilities. + enum Capability + { + CAPS_SCALABLE = 0x0001, //!< Support of the scalable font. + CAPS_ANGLE = 0x0002, //!< Support of the angle. + CAPS_X_EXPANSION = 0x0004, //!< Support of the expansion of the font. + CAPS_BOLDWEIGHT = 0x0008, //!< Support of the bold weight of the font. + CAPS_QUALITY_MONO = 0x0010, //!< Support of the white & black font. + CAPS_QUALITY_LOW = 0x0020, //!< Support of the low quality in the gray map font. + CAPS_QUALITY_MEDIUM = 0x0040, //!< Support of the medium quality in the gray map font. + CAPS_QUALITY_HIGH = 0x0080 //!< Support of the high quality in the gray map font. + }; + + //! Attrib structure + struct Attrib + { + _Util::FixedPoint26_6 size; //!< Size of the font. (26.6 fixed point unit) + unsigned int style; //!< Style of the font. (_IFont::Style) + int quality; //!< Quality of the font. (_IFont::Quality) + float angle; //!< Angle of the font. + _Util::FixedPoint26_6 xExpansion; //!< Expansion of the font. + _Util::FixedPoint26_6 boldWeight; //!< Bold weight of the font + }; + + //! GlyphBitmap structure + struct GlyphBitmap + { + long width; //!< Horizontal size of an image buffer. + long height; //!< Vertical size of an image buffer. + long bytesPerLine; //!< The number of bytes to represent one horizontal line in buffer. + unsigned long depth; //!< The number of bits to compose one pixel. + unsigned char* pBitmap; //!< Start address of an image buffer. + }; + + //! Glyph structure + struct Glyph + { + unsigned long id; //!< Internal identifier of the font. + _Util::FixedPoint22_10 xOffset; //!< Starting point of displaying the font. + _Util::FixedPoint22_10 yOffset; //!< Starting point of displaying the font. + _Util::FixedPoint22_10 xAdvance; //!< Distance to move for displaying the next font. + _Util::FixedPoint22_10 yAdvance; //!< Distance to move for displaying the next font. + long hasOwnerShip; + GlyphBitmap image; //!< Image information of a glyph. + void* ptrAux; //!< Internal data for each target. + }; + + //! Size Property structure + struct SizeProperty + { + _Util::FixedPoint26_6 minSize; //!< Minimal size of the supportable font. + _Util::FixedPoint26_6 maxSize; //!< Maximal size of the supportable font. + + _Util::FixedPoint26_6 maxWidth; //!< Maximal width of this font data. + _Util::FixedPoint26_6 maxHeight; //!< Maximal height of this font data. + _Util::FixedPoint26_6 baseLine; //!< BaseLine of this font data. + _Util::FixedPoint26_6 ascender; //!< Ascender of this font data. + _Util::FixedPoint26_6 descender; //!< Descender of this font data. + _Util::FixedPoint26_6 leading; //!< Leading of this font data. + }; + + //! Font Property structure + struct Property + { + int fontCaps; //!< Flag for the font capability. (_IFont::Capability) + int styleCaps; //!< Flag for the font style capability. (_IFont::Style) + + const char* pEngineName; //!< Name of the font engine. + const char* pFamilyName; //!< Name of the font family. + const char* pStyleName; //!< Name of the font style. + long styleFlag; //!< flag value of the font style. (Regular = 0, Bold = 2) + long weightClass; //!< Value of the font WeightClass. + }; + + virtual ~_IFont(void) {} + + //! Changes the attribute using fontAttrib. + virtual bool SetAttrib(const Attrib& fontAttrib) = 0; + //! Gets current attribute and store it in fontAttrib. + virtual bool GetAttrib(Attrib& fontAttrib) const = 0; + + //! Gets the value of the interval correctness between two characters. + virtual bool GetKerning(unsigned long ch1, unsigned long ch2, long& xVector, long& yVector) const = 0; + + //! Loads the font glyph data for displaying font. + virtual bool LoadGlyph(unsigned long character, Glyph** pFontGlyphData) = 0; + //! Releases the resource of the font glyph data that is not needed any more. + virtual bool UnloadGlyph(Glyph** pFontGlyphData) = 0; + //! 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; + + //! Harfbuzz test + virtual bool GetGlyphList(const _Util::String& text, Tizen::Base::Collection::IListT& out, int script) = 0; + + //! Gets the font fallback map. + virtual FontMapT* GetFallbackMap(void) = 0; + + virtual bool hasPredefinedColor(void) const = 0; + +protected: + //! Initializes a font instance with the font data on the memory buffer. + virtual bool Create(const void* pBuffer, long bufSize, long face = 0) = 0; + //! Initializes a font instance with the font file. + virtual bool Create(const char* pFilePath, long face = 0) = 0; + //! Initializes a font instance with the font data on the static memory buffer. + virtual bool CreateStatic(const void* pBuffer, long bufSize, long face = 0) = 0; + //! Reloads a font instance with the font data on the memory buffer. + virtual bool Reload(const void* pBuffer, long bufSize, long face = 0) = 0; + //! Reloads a font instance with the font file + virtual bool Reload(const char* filePath, long face = 0) = 0; + //! Destroys the instance. + virtual void Destroy(void) = 0; + //! Clean cache + virtual bool _ClearCache(void) = 0; + +private: + friend class _FontRsrcManager; +}; // _IFont + +}} // Tizen::Graphics + +#endif // _FGRP_INTERNAL_IFONT_H_ diff --git a/src/graphics/FGrp_NonScale.cpp b/src/graphics/FGrp_NonScale.cpp new file mode 100644 index 0000000..fa6af49 --- /dev/null +++ b/src/graphics/FGrp_NonScale.cpp @@ -0,0 +1,184 @@ +// +// 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_NonScale.cpp + * @brief This is the implementation file for internal util class. + * + */ + +#include +#include + +#include + +#include "FGrp_NonScale.h" +#include "FGrp_BitmapImpl.h" +#include "FGrp_BitmapCoordHolder.h" +#include "FGrp_BitmapUtil.h" +#include "FGrp_Bitmap.h" +#include "util/FGrp_UtilTemplate.h" + + +namespace // unnamed +{ + +Tizen::Graphics::_BitmapCoordinateHolder* +_GetBitmapCoordinateHolder(const Tizen::Graphics::_BitmapImpl& bitmap) +{ + class BitmapHacked + : public Tizen::Graphics::_BitmapImpl + { +public: + inline Tizen::Graphics::_BitmapCoordinateHolder* GetBitmapCoordinateHolder(void) + { + return this->_sharedItem->coordHolder.get(); + } + }; + + return ((BitmapHacked*) &bitmap)->GetBitmapCoordinateHolder(); +} + +} + +namespace Tizen { namespace Graphics +{ + +_BitmapImpl* +_NonScale::CreateBitmapN(const Tizen::Base::ByteBuffer& buffer, const Dimension& rqDim, BitmapPixelFormat pixelFormat) +{ + FloatDimension pcDimF(static_cast(rqDim.width), static_cast(rqDim.height)); + FloatDimension vcDimF = _ResUtil::ConvertToVirCoord(pcDimF); + + return _NonScale::CreateBitmapN(buffer, rqDim, pixelFormat, vcDimF); +} + +_BitmapImpl* +_NonScale::CreateBitmapN(const Tizen::Base::ByteBuffer& buffer, const Dimension& rqDim, BitmapPixelFormat pixelFormat, + const FloatDimension& logicalSizeF) +{ + result r = E_SUCCESS; + + SysTryReturn(NID_GRP + , rqDim.width > 0 && rqDim.height > 0 + , null + , E_INVALID_ARG + , "[E_INVALID_ARG] The reqired size(%d, %d) is invalid.", rqDim.width, rqDim.height); + + SysTryReturn(NID_GRP + , BITMAP_PIXEL_FORMAT_MIN < pixelFormat && pixelFormat < BITMAP_PIXEL_FORMAT_MAX + , null + , E_INVALID_ARG + , "[E_INVALID_ARG] The given pixel format(%d) is invalid.", pixelFormat); + + { + int bytePerPixel = 0; + + switch (pixelFormat) + { + case Tizen::Graphics::BITMAP_PIXEL_FORMAT_RGB565: + bytePerPixel = 2; + break; + case Tizen::Graphics::BITMAP_PIXEL_FORMAT_ARGB8888: + case Tizen::Graphics::BITMAP_PIXEL_FORMAT_R8G8B8A8: + bytePerPixel = 4; + break; + default: + SysLogException(NID_GRP, E_INVALID_ARG, "The given pixel format(%d) is not supported.", pixelFormat); + return null; + } + + SysTryReturn(NID_GRP + , bytePerPixel > 0 + , null + , E_UNSUPPORTED_FORMAT + , "[E_UNSUPPORTED_FORMAT] The given bytes-per-pixel(%d) is not supported.", bytePerPixel); + + int numOfBytes = buffer.GetLimit(); + int expectedBufferSize = rqDim.width * rqDim.height * bytePerPixel; + + SysTryReturn(NID_GRP + , expectedBufferSize <= numOfBytes + , null + , E_INVALID_ARG + , "[E_INVALID_ARG] The buffer size is too small. (expected: %d, actual: %d)", expectedBufferSize, numOfBytes); + } + + std::auto_ptr <_BitmapImpl> bitmap(new (std::nothrow) _BitmapImpl); + + SysTryReturn(NID_GRP + , bitmap.get() + , null + , E_OUT_OF_MEMORY + , "[E_OUT_OF_MEMORY] _BitmapImpl is not allocated."); + + _Bitmap* pBitmapEx = _GetBitmapEx(*bitmap.get()); + + SysTryReturn(NID_GRP + , pBitmapEx + , null + , E_OUT_OF_MEMORY + , "[E_OUT_OF_MEMORY] _Bitmap is not allocated."); + + r = pBitmapEx->Construct(buffer, rqDim, pixelFormat); + + SysTryReturn(NID_GRP + , !IsFailed(r) + , null + , r + , "[%s] _Bitmap::Construct() failed.", GetErrorMessage(r)); + + _BitmapCoordinateHolder* pBitmapCoordinateHolder = _GetBitmapCoordinateHolder(*bitmap.get()); + + if (pBitmapCoordinateHolder) + { + _Util::Dimension vcDimF = { logicalSizeF.width, logicalSizeF.height }; + _Util::Dimension vcDim = { _FloatToIntForSize(vcDimF.w), _FloatToIntForSize(vcDimF.h) }; + _Util::Dimension pcDim = { rqDim.width, rqDim.height }; + + pBitmapCoordinateHolder->ResetFromPc(pcDim, vcDim, vcDimF); + } + + return bitmap.release(); +} + +_BitmapImpl* +_NonScale::CreateBitmapN(const Dimension& rq_dim, BitmapPixelFormat pixelFormat) +{ + std::auto_ptr <_BitmapImpl> bitmap(new (std::nothrow) _BitmapImpl); + + SysTryReturn(NID_GRP + , bitmap.get() + , null + , E_OUT_OF_MEMORY + , "[E_OUT_OF_MEMORY] _BitmapImpl::Construct() failed."); + + Dimension pc_dim = rq_dim; + Dimension vc_dim = _ResUtil::ConvertToVirCoord(pc_dim); + + result r = bitmap->Construct(vc_dim, pixelFormat); + + SysTryReturn(NID_GRP + , !IsFailed(r) + , null + , r + , "[%s] _Bitmap::Construct() failed.", GetErrorMessage(r)); + + return bitmap.release(); +} + +}} // Tizen::Graphics diff --git a/src/graphics/FGrp_ResUtil.h b/src/graphics/FGrp_ResUtil.h new file mode 100644 index 0000000..f8bef1d --- /dev/null +++ b/src/graphics/FGrp_ResUtil.h @@ -0,0 +1,1510 @@ +// +// 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_ResUtil.h + * @brief This is the header file for internal _ResUtil namespace. + * + */ + +#ifndef _FGRP_INTERNAL_RES_UTIL_H_ +#define _FGRP_INTERNAL_RES_UTIL_H_ + +#include + +#include + +#include +#include +#include + +#include "util/FGrp_UtilType.h" +#include "FGrp_Screen.h" + +#if 0 +#include "FGrp_CoordSystem.h" +//////////////////////////////////////////////////////////////////////////////// +// Coordinate conversion + +namespace Tizen { namespace Graphics +{ + +namespace _ResUtil +{ +struct Rect +{ + int x, y, w, h; + + Rect() + : x(0) + , y(0) + , w(0) + , h(0) + { + } + + Rect(int _x, int _y, int _w, int _h) + : x(_x) + , y(_y) + , w(_w) + , h(_h) + { + } +}; + +struct Pos +{ + int x, y; + + Pos() + : x(0) + , y(0) + { + } + + Pos(int _x, int _y) + : x(_x) + , y(_y) + { + } +}; + +struct Size +{ + int w, h; + + Size() + : w(0) + , h(0) + { + } + + Size(int _w, int _h) + : w(_w) + , h(_h) + { + } +}; + +// base template +template +struct ResConv1d +{ + inline static int ToVirCoord(int phy); + inline static int ToPhyCoord(int vir); + inline static int ToPhyCoord4Size(int vir); +}; + +// 2D base template +template +struct ResConv2d +{ + inline static int ToVirCoordX(int phyX) + { + return ResConv1d ::ToVirCoord(phyX); + } + + inline static int ToVirCoordY(int phyY) + { + return ResConv1d ::ToVirCoord(phyY); + } + + inline static int ToPhyCoordX(int virX) + { + return ResConv1d ::ToPhyCoord(virX); + } + + inline static int ToPhyCoordY(int virY) + { + return ResConv1d ::ToPhyCoord(virY); + } + + inline static int ToPhyCoord4Size(int vir) + { + return ResConv1d ::ToPhyCoord4Size(vir); + } +}; + +///////////////////// + +enum ResType +{ + RES_WVGA, + RES_WQVGA, + RES_HVGA, + RES_WVGA_COMPAT, + RES_QHD +}; + +template +struct ResTraits +{ +}; + +template +struct ResConv +{ + typedef ResConv2d ::ResWidth, ResTraits ::ResHeight, ResTraits ::ResWidth, + ResTraits ::ResHeight> CurrentResConv; + + template + inline static T ToPhyCoord(const T& sour) + { + return CurrentResConv::ToPhyCoordY(sour); + } + + template + inline static T ToVirCoord(const T& sour) + { + return CurrentResConv::ToVirCoordY(sour); + } + + inline static int ToPhyCoordSize(int sour) + { + return CurrentResConv::ToPhyCoord4Size(sour); + } + + inline static int ToPhyCoordX(int sour) + { + return CurrentResConv::ToPhyCoordX(sour); + } + + inline static int ToPhyCoordY(int sour) + { + return CurrentResConv::ToPhyCoordY(sour); + } + + inline static int ToPhyCoordW(int sour) + { + return CurrentResConv::ToPhyCoordX(sour); + } + + inline static int ToPhyCoordH(int sour) + { + return CurrentResConv::ToPhyCoordY(sour); + } + + inline static int ToVirCoordX(int sour) + { + return CurrentResConv::ToVirCoordX(sour); + } + + inline static int ToVirCoordY(int sour) + { + return CurrentResConv::ToVirCoordY(sour); + } + + inline static int ToVirCoordW(int sour) + { + return CurrentResConv::ToVirCoordX(sour); + } + + inline static int ToVirCoordH(int sour) + { + return CurrentResConv::ToVirCoordY(sour); + } + + inline static Rect ToPhyCoord(const Rect& sour) + { + int destX = CurrentResConv::ToPhyCoordX(sour.x); + int destY = CurrentResConv::ToPhyCoordY(sour.y); + + return Rect + ( + destX, + destY, + CurrentResConv::ToPhyCoordX(sour.x + sour.w) - destX, + CurrentResConv::ToPhyCoordY(sour.y + sour.h) - destY + ); + } + + inline static Pos ToPhyCoord(const Pos& sour) + { + return Pos + ( + CurrentResConv::ToPhyCoordX(sour.x), + CurrentResConv::ToPhyCoordY(sour.y) + ); + } + + inline static Size ToPhyCoord(const Size& sour) + { + return Size + ( + CurrentResConv::ToPhyCoordX(sour.w), + CurrentResConv::ToPhyCoordY(sour.h) + ); + } + + inline static Tizen::Graphics::Rectangle ToPhyCoord(const Tizen::Graphics::Rectangle& sour) + { + Tizen::Graphics::Rectangle dest; + + dest.x = CurrentResConv::ToPhyCoordX(sour.x); + dest.y = CurrentResConv::ToPhyCoordY(sour.y); + ; + dest.width = CurrentResConv::ToPhyCoordX(sour.x + sour.width) - dest.x; + dest.height = CurrentResConv::ToPhyCoordY(sour.y + sour.height) - dest.y; + + return dest; + } + + inline static Tizen::Graphics::Point ToPhyCoord(const Tizen::Graphics::Point& sour) + { + return Tizen::Graphics::Point(CurrentResConv::ToPhyCoordX(sour.x), CurrentResConv::ToPhyCoordY(sour.y)); + } + + inline static Tizen::Graphics::Dimension ToPhyCoord(const Tizen::Graphics::Dimension& sour) + { + return Tizen::Graphics::Dimension(CurrentResConv::ToPhyCoordX(sour.width), CurrentResConv::ToPhyCoordY(sour.height)); + } + + inline static Rect ToVirCoord(const Rect& sour) + { + int destX = CurrentResConv::ToVirCoordX(sour.x); + int destY = CurrentResConv::ToVirCoordY(sour.y); + + return Rect + ( + destX, + destY, + CurrentResConv::ToVirCoordX(sour.x + sour.w) - destX, + CurrentResConv::ToVirCoordY(sour.y + sour.h) - destY + ); + } + + inline static Pos ToVirCoord(const Pos& sour) + { + return Pos + ( + CurrentResConv::ToVirCoordX(sour.x), + CurrentResConv::ToVirCoordY(sour.y) + ); + } + + inline static Size ToVirCoord(const Size& sour) + { + return Size + ( + CurrentResConv::ToVirCoordX(sour.w), + CurrentResConv::ToVirCoordY(sour.h) + ); + } + + inline static Tizen::Graphics::Rectangle ToVirCoord(const Tizen::Graphics::Rectangle& sour) + { + Rect pc_rect = Rect(sour.x, sour.y, sour.width, sour.height); + Rect vc_rect = ResConv ::ToVirCoord(pc_rect); + + return Tizen::Graphics::Rectangle(vc_rect.x, vc_rect.y, vc_rect.w, vc_rect.h); + } + + inline static Tizen::Graphics::Point ToVirCoord(const Tizen::Graphics::Point& sour) + { + return Tizen::Graphics::Point(CurrentResConv::ToVirCoordX(sour.x), CurrentResConv::ToVirCoordY(sour.y)); + } + + inline static Tizen::Graphics::Dimension ToVirCoord(const Tizen::Graphics::Dimension& sour) + { + return Tizen::Graphics::Dimension(CurrentResConv::ToVirCoordX(sour.width), CurrentResConv::ToVirCoordY(sour.height)); + } +}; + +} // Tizen::Graphics::_ResUtil + +}} // Tizen::Graphics + +//////////////////////////////////////////////////////////////////////////////// +// Specialization + +namespace Tizen { namespace Graphics +{ + +namespace _ResUtil +{ +// (480x800) -> (240x400) +template<> +inline int +ResConv1d <480, 240>::ToVirCoord(int phy) +{ + return (phy << 1); +}; + +template<> +inline int +ResConv1d <480, 240>::ToPhyCoord(int vir) +{ + return (vir >> 1); +}; + +template<> +inline int +ResConv1d <480, 240>::ToPhyCoord4Size(int vir) +{ + return (vir >= 0) ? ((vir + 1) >> 1) : (vir >> 1); +}; + +template<> +inline int +ResConv1d <800, 400>::ToVirCoord(int phy) +{ + return (phy << 1); +}; + +template<> +inline int +ResConv1d <800, 400>::ToPhyCoord(int vir) +{ + return (vir >> 1); +}; + +template<> +inline int +ResConv1d <800, 400>::ToPhyCoord4Size(int vir) +{ + return (vir >= 0) ? ((vir + 1) >> 1) : (vir >> 1); +}; + +// (240x400) -> (480x800) +template<> +inline int +ResConv1d <240, 480>::ToVirCoord(int phy) +{ + return (phy >> 1); +}; + +template<> +inline int +ResConv1d <240, 480>::ToPhyCoord(int vir) +{ + return (vir << 1); +}; + +template<> +inline int +ResConv1d <240, 480>::ToPhyCoord4Size(int vir) +{ + return (vir << 1); +}; + +template<> +inline int +ResConv1d <400, 800>::ToVirCoord(int phy) +{ + return (phy >> 1); +}; + +template<> +inline int +ResConv1d <400, 800>::ToPhyCoord(int vir) +{ + return (vir << 1); +}; + +template<> +inline int +ResConv1d <400, 800>::ToPhyCoord4Size(int vir) +{ + return (vir << 1); +}; + +// (480x800) -> (320x480) +template<> +inline int +ResConv1d <480, 320>::ToVirCoord(int phy) +{ + return ((phy) >= 0) ? ((phy) * 3 / 2) : (((phy) * 3 - 1) / 2); +}; + +template<> +inline int +ResConv1d <480, 320>::ToPhyCoord(int vir) +{ + return ((vir) > 0) ? (((vir) + 1) * 2 / 3) : ((vir) * 2 / 3); +}; + +template<> +inline int +ResConv1d <480, 320>::ToPhyCoord4Size(int vir) +{ + return ((vir) > 0) ? (((vir) + 1) * 2 / 3) : ((vir) * 2 / 3); +}; + +template<> +inline int +ResConv1d <800, 480>::ToVirCoord(int phy) +{ + return ((phy) >= 0) ? ((phy) * 3 / 2) : (((phy) * 3 - 1) / 2); +}; + +template<> +inline int +ResConv1d <800, 480>::ToPhyCoord(int vir) +{ + return ((vir) > 0) ? (((vir) + 1) * 2 / 3) : ((vir) * 2 / 3); +}; + +template<> +inline int +ResConv1d <800, 480>::ToPhyCoord4Size(int vir) +{ + return ((vir) > 0) ? (((vir) + 1) * 2 / 3) : ((vir) * 2 / 3); +}; + +// (480x800) -> (320x480) compatibility +template<> +inline int +ResConv1d <801, 480>::ToVirCoord(int phy) +{ + return (phy * 5 / 3); +}; + +template<> +inline int +ResConv1d <801, 480>::ToPhyCoord(int vir) +{ + return (vir * 3 / 5); +}; + +template<> +inline int +ResConv1d <801, 480>::ToPhyCoord4Size(int vir) +{ + return (vir * 3 / 5); +}; + +// (240x400) -> (320x480) compatibility +template<> +inline int +ResConv1d <240, 320>::ToVirCoord(int phy) +{ + return (phy * 3 / 4); +}; + +template<> +inline int +ResConv1d <240, 320>::ToPhyCoord(int vir) +{ + return (vir * 4 / 3); +}; + +template<> +inline int +ResConv1d <240, 320>::ToPhyCoord4Size(int vir) +{ + return (vir * 4 / 3); +}; + +template<> +inline int +ResConv1d <400, 480>::ToVirCoord(int phy) +{ + return (phy * 5 / 6); +}; + +template<> +inline int +ResConv1d <400, 480>::ToPhyCoord(int vir) +{ + return (vir * 6 / 5); +}; + +template<> +inline int +ResConv1d <400, 480>::ToPhyCoord4Size(int vir) +{ + return (vir * 6 / 5); +}; + +// (480x800) -> (540x960) +template<> +inline int +ResConv1d <480, 540>::ToVirCoord(int phy) +{ + return (phy * 8 / 9); +}; + +template<> +inline int +ResConv1d <480, 540>::ToPhyCoord(int vir) +{ + return (vir * 9 / 8); +}; + +template<> +inline int +ResConv1d <480, 540>::ToPhyCoord4Size(int vir) +{ + return (vir >= 0) ? ((vir + 5) * 9 / 8) : (vir * 9 / 8); +}; + +template<> +inline int +ResConv1d <800, 960>::ToVirCoord(int phy) +{ + return (phy * 8 / 9); +}; + +template<> +inline int +ResConv1d <800, 960>::ToPhyCoord(int vir) +{ + return (vir * 9 / 8); +}; + +template<> +inline int +ResConv1d <800, 960>::ToPhyCoord4Size(int vir) +{ + return (vir >= 0) ? ((vir + 5) * 9 / 8) : (vir * 9 / 8); +}; + +//////////////////////////////////////////////////////////////////////////////// + +template<> +struct ResTraits +{ + enum + { + ResWidth = 480 + }; + enum + { + ResHeight = 800 + }; +}; + +template<> +struct ResTraits +{ + enum + { + ResWidth = 240 + }; + enum + { + ResHeight = 400 + }; +}; + +template<> +struct ResTraits +{ + enum + { + ResWidth = 320 + }; + enum + { + ResHeight = 480 + }; +}; + +template<> +struct ResTraits +{ + enum + { + ResWidth = 480 + }; + enum + { + ResHeight = (800 + 1) + }; +}; + +template<> +struct ResTraits +{ + enum + { + ResWidth = 540 + }; + enum + { + ResHeight = 960 + }; +}; + +} // Tizen::Graphics::_ResUtil + +}} // Tizen::Graphics + +//////////////////////////////////////////////////////////////////////////////// +// Macro + +namespace Tizen { namespace Graphics +{ + +namespace _ResUtil +{ + +inline bool +NEED_TO_CONVERT(void) +{ + _Resolution virRes = Tizen::Graphics::_CoordinateSystem::GetInstance()->GetInternalResolution(); + _Resolution PhyRes = Tizen::Graphics::_CoordinateSystem::GetInstance()->GetDeviceResolution(); + + return (virRes != PhyRes); +} + +typedef ResConv ResWQVGA2WVGA; +typedef ResConv ResWVGA2WQVGA; +typedef ResConv ResWVGA2HVGA; +typedef ResConv ResWQVGA2HVGA; +typedef ResConv ResWVGAcompat2HVGA; +typedef ResConv ResWVGA2QHD; + +#if defined(_MODEL_RES_WVGA) +// #error "Base resolution: 480 x 800" +typedef ResWQVGA2WVGA CurrentResConv; +#elif defined(_MODEL_RES_WQVGA) +// #error "Base resolution: 240 x 400" +typedef ResWVGA2WQVGA CurrentResConv; +#elif defined(_MODEL_RES_HVGA) +// #error "Base resolution: 320 x 480" +typedef ResWVGA2HVGA CurrentResConv; +#elif defined(_MODEL_RES_QHD) +// #error "Base resolution: 800 x 1280" +typedef ResWVGA2QHD CurrentResConv; +#else +//#error "Open CMakeLists.txt and define base resolution for new model" +typedef ResWVGA2WQVGA CurrentResConv; +#endif + + +#if 0 // defined(_MODEL_RES_HVGA) +#define NOT_FROM_WQVGA() (Tizen::Graphics::_CoordinateSystem::GetInstance()->GetInternalResolution() != \ + Tizen::Graphics::RESOLUTION_WQVGA) +#define NOT_FROM_WVGA_COMPAT() (Tizen::Graphics::_CoordinateSystem::GetInstance()->GetInternalResolution() != \ + Tizen::Graphics::RESOLUTION_WVGA_COMPAT) +#define TRANSFORM(func, sour) \ + ( \ + NEED_TO_CONVERT() \ + ? \ + ( \ + NOT_FROM_WQVGA() \ + ? \ + ( \ + NOT_FROM_WVGA_COMPAT() \ + ? \ + ( \ + CurrentResConv::func(sour) \ + ) \ + : \ + ( \ + ResWVGAcompat2HVGA::func(sour) \ + ) \ + ) \ + : \ + ( \ + ResWQVGA2HVGA::func(sour) \ + ) \ + ) \ + : \ + sour \ + ) + +template +inline T +TO_PHY_COORD(const T& sour) +{ + return TRANSFORM(ToPhyCoord, sour); +} + +template +inline T +TO_VIR_COORD(const T& sour) +{ + return TRANSFORM(ToVirCoord, sour); +} + +#define CONVERT_TO_P_COORD_X(sour) TRANSFORM(ToPhyCoordX, sour) +#define CONVERT_TO_P_COORD_Y(sour) TRANSFORM(ToPhyCoordY, sour) +#define CONVERT_TO_P_COORD_W(sour) TRANSFORM(ToPhyCoordW, sour) +#define CONVERT_TO_P_COORD_H(sour) TRANSFORM(ToPhyCoordH, sour) +#define CONVERT_TO_P_COORD_SIZE(sour) TRANSFORM(ToPhyCoordSize, sour) + +#define CONVERT_TO_V_COORD_X(sour) TRANSFORM(ToVirCoordX, sour) +#define CONVERT_TO_V_COORD_Y(sour) TRANSFORM(ToVirCoordY, sour) +#define CONVERT_TO_V_COORD_W(sour) TRANSFORM(ToVirCoordW, sour) +#define CONVERT_TO_V_COORD_H(sour) TRANSFORM(ToVirCoordH, sour) + +inline bool +CONVERT_TO_P_COORD_POINT_LIST(Tizen::Base::Collection::ArrayList& dest, const Tizen::Base::Collection::IList& sour) +{ + result r; + + if (NEED_TO_CONVERT()) + { + r = dest.Construct(); + + if (r == E_SUCCESS) + { + for (int i = 0; i < sour.GetCount(); i++) + { + Tizen::Graphics::Point* pSourPoint = + dynamic_cast (const_cast (sour.GetAt(i))); + + if (pSourPoint == null) + { + return false; + } + + Tizen::Graphics::Point* pDestPoint = new (std::nothrow) Tizen::Graphics::Point(pSourPoint->x, pSourPoint->y); + + if (pDestPoint == null) + { + return false; + } + + if (NOT_FROM_WQVGA()) + { + if (NOT_FROM_WVGA_COMPAT()) + { + *pDestPoint = CurrentResConv::ToPhyCoord(*pDestPoint); + } + else + { + *pDestPoint = ResWVGAcompat2HVGA::ToPhyCoord(*pDestPoint); + } + } + else + { + *pDestPoint = ResWQVGA2HVGA::ToPhyCoord(*pDestPoint); + } + + dest.Add(*pDestPoint); + } + } + } + else + { + r = dest.Construct(sour); + } + + return (r == E_SUCCESS); +} + +#else +template +inline T +TO_PHY_COORD(const T& sour) +{ + return _ResUtil::NEED_TO_CONVERT() ? _ResUtil::CurrentResConv::ToPhyCoord(sour) : sour; +} + +template +inline T +TO_VIR_COORD(const T& sour) +{ + return NEED_TO_CONVERT() ? CurrentResConv::ToVirCoord(sour) : sour; +} + +inline bool +CONVERT_TO_P_COORD_POINT_LIST(Tizen::Base::Collection::ArrayList& dest, const Tizen::Base::Collection::IList& sour) +{ + result r; + + if (NEED_TO_CONVERT()) + { + r = dest.Construct(); + + if (r == E_SUCCESS) + { + for (int i = 0; i < sour.GetCount(); i++) + { + Tizen::Graphics::Point* pSourPoint = + dynamic_cast (const_cast (sour.GetAt(i))); + + if (pSourPoint == null) + { + return false; + } + + Tizen::Graphics::Point* pDestPoint = new (std::nothrow) Tizen::Graphics::Point(pSourPoint->x, pSourPoint->y); + + if (pDestPoint == null) + { + return false; + } + + *pDestPoint = CurrentResConv::ToPhyCoord(*pDestPoint); + + dest.Add(*pDestPoint); + } + } + } + else + { + r = dest.Construct(sour); + } + + return (r == E_SUCCESS); +} + +#define CONVERT_TO_P_COORD_X(sour) (_ResUtil::NEED_TO_CONVERT() ? _ResUtil::CurrentResConv::ToPhyCoordX(sour) : sour) +#define CONVERT_TO_P_COORD_Y(sour) (_ResUtil::NEED_TO_CONVERT() ? _ResUtil::CurrentResConv::ToPhyCoordY(sour) : sour) +#define CONVERT_TO_P_COORD_W(sour) (_ResUtil::NEED_TO_CONVERT() ? _ResUtil::CurrentResConv::ToPhyCoordW(sour) : sour) +#define CONVERT_TO_P_COORD_H(sour) (_ResUtil::NEED_TO_CONVERT() ? _ResUtil::CurrentResConv::ToPhyCoordH(sour) : sour) +#define CONVERT_TO_P_COORD_SIZE(sour) (_ResUtil::NEED_TO_CONVERT() ? _ResUtil::CurrentResConv::ToPhyCoordSize(sour) : sour) + +#define CONVERT_TO_V_COORD_X(sour) (_ResUtil::NEED_TO_CONVERT() ? _ResUtil::CurrentResConv::ToVirCoordX(sour) : sour) +#define CONVERT_TO_V_COORD_Y(sour) (_ResUtil::NEED_TO_CONVERT() ? _ResUtil::CurrentResConv::ToVirCoordY(sour) : sour) +#define CONVERT_TO_V_COORD_W(sour) (_ResUtil::NEED_TO_CONVERT() ? _ResUtil::CurrentResConv::ToVirCoordW(sour) : sour) +#define CONVERT_TO_V_COORD_H(sour) (_ResUtil::NEED_TO_CONVERT() ? _ResUtil::CurrentResConv::ToVirCoordH(sour) : sour) + +#endif // #if defined(_MODEL_RES_HVGA) + +} // Tizen::Graphics::_ResUtil + +}} // Tizen::Graphics + +//////////////////////////////////////////////////////////////////////////////// +// struct CoordHolder + +namespace Tizen { namespace Graphics +{ + +namespace _ResUtil +{ +template +struct CoordHolder +{ + T required; + T phyCoord; + T virCoord; + + void operator =(const T& in) + { + required = in; + phyCoord = TO_PHY_COORD(required); + virCoord = TO_VIR_COORD(phyCoord); + } +}; +} // Tizen::Graphics::_ResUtil + +}} // Tizen::Graphics + +#else + +#include "FGrp_CoordinateSystem.h" + +namespace Tizen { namespace Graphics +{ + +namespace _ResUtil +{ + +struct Rect +{ + int x; + int y; + int w; + int h; + + Rect() + : x(0) + , y(0) + , w(0) + , h(0) + { + } + + Rect(int _x, int _y, int _w, int _h) + : x(_x) + , y(_y) + , w(_w) + , h(_h) + { + } +}; + +struct Pos +{ + int x; + int y; + + Pos() + : x(0) + , y(0) + { + } + + Pos(int _x, int _y) + : x(_x) + , y(_y) + { + } +}; + +struct Size +{ + int w; + int h; + + Size() + : w(0) + , h(0) + { + } + + Size(int _w, int _h) + : w(_w) + , h(_h) + { + } +}; + +//////////////////////////////////////////////////////////////////////////////// + +namespace // unnamed +{ + +template +inline T +ToPhyCoord(const T& sour) +{ + _ICoordinateSystemTransformer* pTransformer = _CoordinateSystem::GetInstance()->GetTransformer(); + return (pTransformer) ? pTransformer->Transform(sour) : sour; +} + +template +inline T +ToVirCoord(const T& sour) +{ + _ICoordinateSystemTransformer* pTransformer = _CoordinateSystem::GetInstance()->GetInverseTransformer(); + return (pTransformer) ? pTransformer->Transform(sour) : sour; +} + +template<> +inline _Util::Point +ToPhyCoord(const _Util::Point& sour) +{ + _ICoordinateSystemTransformer* pTransformer = _CoordinateSystem::GetInstance()->GetTransformer(); + + if (pTransformer == null) + { + return sour; + } + + _Util::Point dest = + { + pTransformer->TransformHorizontal(sour.x), + pTransformer->TransformVertical(sour.y) + }; + + return dest; +} + +template<> +inline _Util::Point +ToPhyCoord(const _Util::Point& sour) +{ + _ICoordinateSystemTransformer* pTransformer = _CoordinateSystem::GetInstance()->GetTransformer(); + + if (pTransformer) + { + _Util::Point temp = + { + sour.x * double(pTransformer->GetHorizontalScaleFactor()), + sour.y * double(pTransformer->GetVerticalScaleFactor()) + }; + + return temp; + } + else + { + return sour; + } +} + +template<> +inline _Util::Point +ToPhyCoord(const _Util::Point& sour) +{ + _ICoordinateSystemTransformer* pTransformer = _CoordinateSystem::GetInstance()->GetTransformer(); + + if (pTransformer) + { + _Util::Point temp = + { + sour.x * float(pTransformer->GetHorizontalScaleFactor()), + sour.y * float(pTransformer->GetVerticalScaleFactor()) + }; + + return temp; + } + else + { + return sour; + } +} + +template<> +inline _Util::Dimension +ToPhyCoord(const _Util::Dimension& sour) +{ + _ICoordinateSystemTransformer* pTransformer = _CoordinateSystem::GetInstance()->GetTransformer(); + + if (pTransformer == null) + { + return sour; + } + + _Util::Dimension dest = + { + pTransformer->TransformHorizontal(sour.w), + pTransformer->TransformVertical(sour.h) + }; + + return dest; +} + +template<> +inline _Util::Dimension +ToPhyCoord(const _Util::Dimension& sour) +{ + _ICoordinateSystemTransformer* pTransformer = _CoordinateSystem::GetInstance()->GetTransformer(); + + if (pTransformer) + { + _Util::Dimension temp = + { + sour.w * double(pTransformer->GetHorizontalScaleFactor()), + sour.h * double(pTransformer->GetVerticalScaleFactor()) + }; + + return temp; + } + else + { + return sour; + } +} + +template<> +inline _Util::Dimension +ToPhyCoord(const _Util::Dimension& sour) +{ + _ICoordinateSystemTransformer* pTransformer = _CoordinateSystem::GetInstance()->GetTransformer(); + + if (pTransformer) + { + _Util::Dimension temp = + { + sour.w * float(pTransformer->GetHorizontalScaleFactor()), + sour.h * float(pTransformer->GetVerticalScaleFactor()) + }; + + return temp; + } + else + { + return sour; + } +} + +template<> +inline _Util::Rectangle +ToPhyCoord(const _Util::Rectangle& sour) +{ + _ICoordinateSystemTransformer* pTransformer = _CoordinateSystem::GetInstance()->GetTransformer(); + + if (pTransformer == null) + { + return sour; + } + + _Util::Rectangle dest = + { + pTransformer->TransformHorizontal(sour.x), + pTransformer->TransformVertical(sour.y), + pTransformer->TransformHorizontal(sour.w), + pTransformer->TransformVertical(sour.h) + }; + + return dest; +} + +template<> +inline _Util::Rectangle +ToPhyCoord(const _Util::Rectangle& sour) +{ + _ICoordinateSystemTransformer* pTransformer = _CoordinateSystem::GetInstance()->GetTransformer(); + + if (pTransformer) + { + _Util::Rectangle temp = + { + sour.x * double(pTransformer->GetHorizontalScaleFactor()), + sour.y * double(pTransformer->GetVerticalScaleFactor()), + sour.w * double(pTransformer->GetHorizontalScaleFactor()), + sour.h * double(pTransformer->GetVerticalScaleFactor()) + }; + + return temp; + } + else + { + return sour; + } +} + +template<> +inline _Util::Rectangle +ToPhyCoord(const _Util::Rectangle& sour) +{ + _ICoordinateSystemTransformer* pTransformer = _CoordinateSystem::GetInstance()->GetTransformer(); + + if (pTransformer) + { + _Util::Rectangle temp = + { + sour.x * float(pTransformer->GetHorizontalScaleFactor()), + sour.y * float(pTransformer->GetVerticalScaleFactor()), + sour.w * float(pTransformer->GetHorizontalScaleFactor()), + sour.h * float(pTransformer->GetVerticalScaleFactor()) + }; + + return temp; + } + else + { + return sour; + } +} + +template<> +inline Rect +ToPhyCoord(const Rect& sour) +{ + _ICoordinateSystemTransformer* pTransformer = _CoordinateSystem::GetInstance()->GetTransformer(); + + if (pTransformer == null) + { + return sour; + } + + Rectangle rect1(sour.x, sour.y, sour.w, sour.h); + Rectangle rect2 = pTransformer->Transform(rect1); + + return Rect(rect2.x, rect2.y, rect2.width, rect2.height); +} + +template<> +inline Rect +ToVirCoord(const Rect& sour) +{ + _ICoordinateSystemTransformer* pTransformer = _CoordinateSystem::GetInstance()->GetInverseTransformer(); + + if (pTransformer == null) + { + return sour; + } + + Rectangle rect1(sour.x, sour.y, sour.w, sour.h); + Rectangle rect2 = pTransformer->Transform(rect1); + + return Rect(rect2.x, rect2.y, rect2.width, rect2.height); +} + +template<> +inline Pos +ToPhyCoord(const Pos& sour) +{ + _ICoordinateSystemTransformer* pTransformer = _CoordinateSystem::GetInstance()->GetTransformer(); + + if (pTransformer == null) + { + return sour; + } + + Point point1(sour.x, sour.y); + Point point2 = pTransformer->Transform(point1); + + return Pos(point2.x, point2.y); +} + +template<> +inline Pos +ToVirCoord(const Pos& sour) +{ + _ICoordinateSystemTransformer* pTransformer = _CoordinateSystem::GetInstance()->GetInverseTransformer(); + + if (pTransformer == null) + { + return sour; + } + + Point point1(sour.x, sour.y); + Point point2 = pTransformer->Transform(point1); + + return Pos(point2.x, point2.y); +} + +template<> +inline _Util::Dimension +ToVirCoord(const _Util::Dimension& sour) +{ + _ICoordinateSystemTransformer* pTransformer = _CoordinateSystem::GetInstance()->GetInverseTransformer(); + + if (pTransformer == null) + { + return sour; + } + + Dimension dim1(sour.w, sour.h); + Dimension dim2 = pTransformer->Transform(dim1); + + _Util::Dimension temp = { dim2.width, dim2.height }; + + return temp; +} + +//////////////////////////////////////////////////////////////////////////////// + +template +inline T +ToVirCoordX(const T& sour) +{ + _ICoordinateSystemTransformer* pTransformer = _CoordinateSystem::GetInstance()->GetInverseTransformer(); + return (pTransformer) ? pTransformer->TransformHorizontal(sour) : sour; +} + +template +inline T +ToVirCoordY(const T& sour) +{ + _ICoordinateSystemTransformer* pTransformer = _CoordinateSystem::GetInstance()->GetInverseTransformer(); + return (pTransformer) ? pTransformer->TransformVertical(sour) : sour; +} + +template +inline T +ToPhyCoordW(const T& sour) +{ + _ICoordinateSystemTransformer* pTransformer = _CoordinateSystem::GetInstance()->GetTransformer(); + return (pTransformer) ? pTransformer->TransformHorizontal(sour) : sour; +} + +template +inline T +ToVirCoordW(const T& sour) +{ + _ICoordinateSystemTransformer* pTransformer = _CoordinateSystem::GetInstance()->GetInverseTransformer(); + return (pTransformer) ? pTransformer->TransformHorizontal(sour) : sour; +} + +template +inline T +ToPhyCoordH(const T& sour) +{ + _ICoordinateSystemTransformer* pTransformer = _CoordinateSystem::GetInstance()->GetTransformer(); + return (pTransformer) ? pTransformer->TransformVertical(sour) : sour; +} + +template +inline T +ToVirCoordH(const T& sour) +{ + _ICoordinateSystemTransformer* pTransformer = _CoordinateSystem::GetInstance()->GetInverseTransformer(); + return (pTransformer) ? pTransformer->TransformVertical(sour) : sour; +} + +template +inline T +ToPhyCoordSize(const T& sour) +{ + _ICoordinateSystemTransformer* pTransformer = _CoordinateSystem::GetInstance()->GetTransformer(); + return (pTransformer) ? pTransformer->TransformVertical(sour) : sour; +} + +} + +//////////////////////////////////////////////////////////////////////////////// + +inline bool +NeedToConvertCoord(void) +{ + int logicalResolution = Tizen::Graphics::_CoordinateSystem::GetInstance()->GetLogicalResolutionInt(); + int physicalResolution = (_Screen::GetWidth() < _Screen::GetHeight()) ? _Screen::GetWidth() : _Screen::GetHeight(); + + return (logicalResolution != physicalResolution); +} + +template +inline T +ConvertToPhyCoord(const T& sour) +{ + return NeedToConvertCoord() ? ToPhyCoord(sour) : sour; +} + +template +inline T +ConvertToVirCoord(const T& sour) +{ + return NeedToConvertCoord() ? ToVirCoord(sour) : sour; +} + +template +inline T +ConvertToPhyCoordWidth(const T& sour) +{ + return NeedToConvertCoord() ? ToPhyCoordW(sour) : sour; +} + +template +inline T +ConvertToPhyCoordHeight(const T& sour) +{ + return NeedToConvertCoord() ? ToPhyCoordH(sour) : sour; +} + +template +inline T +ConvertToPhyCoordSize(const T& sour) +{ + return NeedToConvertCoord() ? ToPhyCoordSize(sour) : sour; +} + +template +inline T +ConvertToVirCoordX(const T& sour) +{ + return NeedToConvertCoord() ? ToVirCoordX(sour) : sour; +} + +template +inline T +ConvertToVirCoordY(const T& sour) +{ + return NeedToConvertCoord() ? ToVirCoordY(sour) : sour; +} + +inline bool +ConvertToPhyCoordPointList(Tizen::Base::Collection::ArrayList& dest, const Tizen::Base::Collection::IList& sour) +{ + result r; + + if (NeedToConvertCoord()) + { + r = dest.Construct(); + + if (r == E_SUCCESS) + { + for (int i = 0; i < sour.GetCount(); i++) + { + Tizen::Graphics::Point* pSourPoint = + dynamic_cast (const_cast (sour.GetAt(i))); + + if (pSourPoint == null) + { + dest.RemoveAll(true); + return false; + } + + Tizen::Graphics::Point* pDestPoint = new (std::nothrow) Tizen::Graphics::Point(pSourPoint->x, pSourPoint->y); + + if (pDestPoint == null) + { + dest.RemoveAll(true); + return false; + } + + *pDestPoint = ToPhyCoord(*pDestPoint); + + dest.Add(*pDestPoint); + } + } + } + else + { + r = dest.Construct(sour); + } + + return (r == E_SUCCESS); +} + +//////////////////////////////////////////////////////////////////////////////// + +template +struct CoordinateHolder +{ + FloatType vcFloat; + FloatType vcFloatActual; + IntType vcInt; + IntType pcInt; +}; + +template +struct CoordinateHolderSimple +{ + FloatType vcFloat; + IntType vcInt; +}; + +} // _ResUtil + +//////////////////////////////////////////////////////////////////////////////// + +inline int _FloatToIntForPos(float f) +{ + return static_cast(floorf(f + 0.01f)); +} + +inline int _DoubleToIntForPos(double f) +{ + return static_cast(floor(f + 0.01)); +} + +inline int _FloatToIntForSize(float f) +{ + if (f > 0.0f) + { + int i = static_cast(f + 0.01f); + return (i > 0) ? i : 1; + } + else + { + return 0; + } +} + +inline int _DoubleToIntForSize(double f) +{ + if (f > 0.0) + { + int i = static_cast(f + 0.01); + return (i > 0) ? i : 1; + } + else + { + return 0; + } +} + +inline int _DoubleToIntForRound(double f) +{ + return static_cast(floor(f + 0.5)); +} + +}} // Tizen::Graphics + +#endif + +#endif //_FGRP_INTERNAL_RES_UTIL_H_ diff --git a/src/graphics/FGrp_Screen.cpp b/src/graphics/FGrp_Screen.cpp new file mode 100644 index 0000000..0fb13a8 --- /dev/null +++ b/src/graphics/FGrp_Screen.cpp @@ -0,0 +1,92 @@ +// +// 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_Screen.cpp + * @brief This is the implementation file for internal _Screen namespace. + * + */ + +#include +#include + +#include "FGrp_Screen.h" + + +namespace Tizen { namespace Graphics +{ + +int +_Screen::GetWidth(void) +{ + static int screenWidth = 0; + + if (screenWidth == 0) + { + result r = Tizen::System::_SystemInfoImpl::GetSysInfo(Tizen::Base::String(L"http://tizen.org/feature/screen.width"), screenWidth); + + if (r != E_SUCCESS) + { + screenWidth = 0; + } + } + + return screenWidth; +} + +int +_Screen::GetHeight(void) +{ + static int screenHeight = 0; + + if (screenHeight == 0) + { + result r = Tizen::System::_SystemInfoImpl::GetSysInfo(Tizen::Base::String(L"http://tizen.org/feature/screen.height"), screenHeight); + + if (r != E_SUCCESS) + { + screenHeight = 0; + } + } + + return screenHeight; +} + +int +_Screen::GetBytesPerPixel(void) +{ + static int screenBpp = 0; + + if (screenBpp == 0) + { + result r = Tizen::System::_SystemInfoImpl::GetSysInfo(Tizen::Base::String(L"http://tizen.org/feature/screen.bpp"), screenBpp); + + if (r != E_SUCCESS) + { + screenBpp = 0; + } + + if (screenBpp == 24) + { + screenBpp = 32; + } + } + + return screenBpp; +} + +}} // Tizen::Graphics diff --git a/src/graphics/FGrp_TextElementImpl.cpp b/src/graphics/FGrp_TextElementImpl.cpp new file mode 100644 index 0000000..5cf4d60 --- /dev/null +++ b/src/graphics/FGrp_TextElementImpl.cpp @@ -0,0 +1,1113 @@ +// +// 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_TextElementImpl.cpp + * @brief This is the cpp file for _TextElementImpl class. + */ + +// Includes +#include + +#include "FGrp_TextElementImpl.h" +#include "FGrp_EnrichedTextImpl.h" +#include "FGrp_FontImpl.h" +#include "FGrp_ResUtil.h" +#include "FGrp_TextTextCutLinkParser.h" +#include "FGrp_TextTextUtility.h" +#include "FGrp_TextTextElement.h" +#include "FGrp_TextTextSimple.h" +#include "FGrp_TextTextCutLink.h" +#include "util/FGrp_Util.h" + +// Usings +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Base::Utility; +using namespace Tizen::Graphics; +using namespace Tizen::Graphics::_Text; + +namespace // unnamed +{ + const int DEFAULT_FONT_SIZE = 42; +} + +namespace Tizen { namespace Graphics +{ + +_TextElementImpl::_TextElementImpl(void) +{ + __strText = null; + __linkText = null; + __linkType = LINK_TYPE_NONE; + __pFont = null; + __isAuto = false; + __bgColorEnable = false; + __outlineColorEnable = false; + __autoLink = false; + __pRegisteringEnrichedText = null; + __count = 0; + __linkOffset = 0; + __pTextComponent = null; + __foregroundColor = Color::GetColor(COLOR_ID_BLACK); + __backgroundColor = Color::GetColor(COLOR_ID_WHITE); +} + +_TextElementImpl::~_TextElementImpl(void) +{ + if (__pRegisteringEnrichedText) + { + int index = __pRegisteringEnrichedText->GetTextElementIndex(this); + int count = __pRegisteringEnrichedText->GetTextElementCount(); + + if (index >= 0 && index < count) + { + __pRegisteringEnrichedText->RemoveAt(index, false); + } + __pRegisteringEnrichedText = null; + } + + if (__pFont) + { + delete __pFont; + __pFont = null; + } + + if (__pTextComponent) + { + Destroy(); + } +} + +result +_TextElementImpl::Construct(const Tizen::Base::String& text) +{ + SysTryReturn(NID_GRP, __pTextComponent == null, E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is already constructed."); + SysTryReturn(NID_GRP, text.IsEmpty() == false, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + result r = E_SUCCESS; + Font* pFont = null; + __strText = text; + + r = Create(__strText, __strText.GetLength(), TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL); + SysTryCatch(NID_GRP + , r == E_SUCCESS + , , r, "[%s] Fails to construct native text element.", GetErrorMessage(r)); + + __foregroundColor = GetTextColor(); + __backgroundColor = GetBackgroundColor(); + __outlineColor = GetOutlineColor(); + + pFont = new (std::nothrow) Font; + if (!pFont) + { + return E_OUT_OF_MEMORY; + } + + r = pFont->Construct(FONT_STYLE_PLAIN, DEFAULT_FONT_SIZE); + SysTryCatch(NID_GRP + , r == E_SUCCESS + , , r, "[%s] Fails to construct font.", GetErrorMessage(r)); + + r = SetTextObjectFont(*pFont); + SysTryCatch(NID_GRP + , r == E_SUCCESS + , , r, "[%s] Fails to set font.", GetErrorMessage(r)); + + this->__pFont = pFont; + + return r; + +CATCH: + delete pFont; + pFont = null; + + return r; +} + +result +_TextElementImpl::Construct(const Tizen::Base::String& text, const Tizen::Graphics::Canvas& canvas) +{ + SysTryReturn(NID_GRP, __pTextComponent == null, E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is already constructed."); + SysTryReturn(NID_GRP, text.IsEmpty() == false, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + SysTryReturn(NID_GRP, &canvas, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + result r = E_SUCCESS; + + r = this->Construct(text); + + if (r != E_SUCCESS) + { + return r; + } + + Tizen::Graphics::Canvas& refCanvas = const_cast (canvas); + + Tizen::Graphics::Color color1 = refCanvas.GetForegroundColor(); + r = GetLastResult(); + SysTryReturn(NID_GRP, r == E_SUCCESS, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + this->SetTextColor(color1); + + Tizen::Graphics::Color color2 = refCanvas.GetBackgroundColor(); + r = GetLastResult(); + SysTryReturn(NID_GRP, r == E_SUCCESS, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + this->SetBackgroundColor(color2); + + return r; +} + +result +_TextElementImpl::Construct(void) +{ + SysTryReturn(NID_GRP, __pTextComponent == null, E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is already constructed."); + + result r = E_SUCCESS; + __strText = ""; + Font* pFont = null; + + r = Create(__strText, __strText.GetLength(), TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL); + SysTryCatch(NID_GRP + , r == E_SUCCESS + , , r, "[%s] Fails to construct native text element.", GetErrorMessage(r)); + + __foregroundColor = GetTextColor(); + __backgroundColor = GetBackgroundColor(); + __outlineColor = GetOutlineColor(); + + pFont = new (std::nothrow) Font; + if (!pFont) + { + return E_OUT_OF_MEMORY; + } + + r = pFont->Construct(FONT_STYLE_PLAIN, DEFAULT_FONT_SIZE); + SysTryCatch(NID_GRP + , r == E_SUCCESS + , , r, "[%s] Fails to construct font.", GetErrorMessage(r)); + + r = SetTextObjectFont(*pFont); + SysTryCatch(NID_GRP + , r == E_SUCCESS + , , r, "[%s] Fails to set font.", GetErrorMessage(r)); + + this->__pFont = pFont; + + return r; + +CATCH: + delete pFont; + pFont = null; + + return r; +} + +result +_TextElementImpl::Construct(const Tizen::Base::String& text, Tizen::Base::Utility::LinkType linkType, const Tizen::Base::String& link) +{ + SysTryReturn(NID_GRP, __pTextComponent == null, E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is already constructed."); + SysTryReturn(NID_GRP, text.IsEmpty() == false, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + SysTryReturn(NID_GRP, LINK_TYPE_NONE != linkType, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The link type is invalid."); + + result r = E_SUCCESS; + Font* pFont = null; + _CutLinkType type = this->ConvertObjectLinkType(linkType); + FontStyle fontStyle = FONT_STYLE_MIN; + + __strText = text; + __linkText = link; + __linkType = linkType; + + r = CreateUserLink(__strText, type); + SysTryCatch(NID_GRP + , r == E_SUCCESS + , , r, "[%s] Fails to create native text element.", GetErrorMessage(r)); + + __foregroundColor = GetTextColor(); + __backgroundColor = GetBackgroundColor(); + __outlineColor = GetOutlineColor(); + + pFont = new (std::nothrow) Font; + if (!pFont) + { + return E_OUT_OF_MEMORY; + } + + if (linkType == LINK_TYPE_URL || linkType == LINK_TYPE_EMAIL) + { + fontStyle = FONT_STYLE_ITALIC; + } + else if (linkType == LINK_TYPE_TEL_NUM) + { + fontStyle = FONT_STYLE_BOLD; + } + else + { + fontStyle = FONT_STYLE_PLAIN; + } + r = pFont->Construct(fontStyle, DEFAULT_FONT_SIZE); + SysTryCatch(NID_GRP + , r == E_SUCCESS + , , r, "[%s] Fails to construct font.", GetErrorMessage(r)); + + SetTextColor(Color::GetColor(COLOR_ID_BLUE)); + pFont->SetUnderline(true); + r = SetTextObjectFont(*pFont); + SysTryCatch(NID_GRP + , r == E_SUCCESS + , , r, "[%s] Fails to set font.", GetErrorMessage(r)); + + this->__pFont = pFont; + + return r; + +CATCH: + delete pFont; + pFont = null; + + return r; +} + +result +_TextElementImpl::Construct(const Tizen::Base::String& text, unsigned long autoLink) +{ + SysTryReturn(NID_GRP, __pTextComponent == null, E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is already constructed."); + SysTryReturn(NID_GRP, text.IsEmpty() == false, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + SysTryReturn(NID_GRP, LINK_TYPE_NONE < autoLink && autoLink < LINK_TYPE_MAX, E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] The autolink mask is invalid."); + + result r = E_SUCCESS; + Tizen::Base::String link; + Font* pFont = null; + _CutLinkType type; + FontStyle fontStyle = FONT_STYLE_MIN; + + __strText = text; + __autoLink = autoLink; + __isAuto = true; + + r = CreateAutoLink(__strText, autoLink); + SysTryCatch(NID_GRP + , r == E_SUCCESS + , , r, "[%s] Fails to construct native text element.", GetErrorMessage(r)); + + __foregroundColor = GetTextColor(); + __backgroundColor = GetBackgroundColor(); + __outlineColor = GetOutlineColor(); + + type = GetCutLinkType(); + + pFont = new (std::nothrow) Font; + if (!pFont) + { + return E_OUT_OF_MEMORY; + } + + if (type != TEXT_CUTLINK_TYPE_INVALID) + { + int len = GetLength(); + + text.SubString((GetAutolinkSrcOffset()), len, link); + + __linkText = link; + __linkType = this->ConvertObjectLinkType(type); + + if (type == TEXT_CUTLINK_TYPE_URL || type == TEXT_CUTLINK_TYPE_EMAIL) + { + fontStyle = FONT_STYLE_ITALIC; + } + else if (type == TEXT_CUTLINK_TYPE_PHONE_NUMBER) + { + fontStyle = FONT_STYLE_BOLD; + } + else + { + fontStyle = FONT_STYLE_PLAIN; + } + + r = pFont->Construct(fontStyle, DEFAULT_FONT_SIZE); + SysTryCatch(NID_GRP + , r == E_SUCCESS + , , r, "[%s] Fails to construct font.", GetErrorMessage(r)); + + SetTextColor(Color::GetColor(COLOR_ID_BLUE)); + pFont->SetUnderline(true); + r = SetTextObjectFont(*pFont); + SysTryCatch(NID_GRP + , r == E_SUCCESS + , , r, "[%s] Fails to set font.", GetErrorMessage(r)); + + this->__pFont = pFont; + } + else + { + r = pFont->Construct(FONT_STYLE_PLAIN, DEFAULT_FONT_SIZE); + SysTryCatch(NID_GRP + , r == E_SUCCESS + , , r, "[%s] Fails to construct font.", GetErrorMessage(r)); + + r = SetTextObjectFont(*pFont); + SysTryCatch(NID_GRP + , r == E_SUCCESS + , , r, "[%s] Fails to set font.", GetErrorMessage(r)); + + this->__pFont = pFont; + } + + return r; + +CATCH: + delete pFont; + pFont = null; + + return r; +} + +result +_TextElementImpl::Construct(const Tizen::Base::String& text, Tizen::Base::Utility::LinkType linkType, const Tizen::Base::String& link, + const Tizen::Graphics::Canvas& canvas) +{ + SysTryReturn(NID_GRP, __pTextComponent == null, E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is already constructed."); + SysTryReturn(NID_GRP, text.IsEmpty() == false, E_INVALID_ARG, E_INVALID_ARG + , "[E_INVALID_ARG] The argument is invalid."); + SysTryReturn(NID_GRP, LINK_TYPE_NONE != linkType, E_INVALID_ARG, E_INVALID_ARG + , "[E_INVALID_ARG] The link type is invalid."); + SysTryReturn(NID_GRP, &canvas, E_INVALID_ARG, E_INVALID_ARG + , "[E_INVALID_ARG] The argument is invalid."); + + result r = E_SUCCESS; + + r = this->Construct(text, linkType, link); + + if (r != E_SUCCESS) + { + return r; + } + + Tizen::Graphics::Canvas& refCanvas = const_cast (canvas); + + Tizen::Graphics::Color color1 = refCanvas.GetForegroundColor(); + r = GetLastResult(); + SysTryReturn(NID_GRP, r == E_SUCCESS, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + this->SetTextColor(color1); + + Tizen::Graphics::Color color2 = refCanvas.GetBackgroundColor(); + r = GetLastResult(); + SysTryReturn(NID_GRP, r == E_SUCCESS, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + this->SetBackgroundColor(color2); + + return r; +} + +result +_TextElementImpl::Construct(const Tizen::Base::String& text, unsigned long autoLink, const Tizen::Graphics::Canvas& canvas) +{ + SysTryReturn(NID_GRP, __pTextComponent == null, E_OPERATION_FAILED, E_OPERATION_FAILED + , "[E_OPERATION_FAILED] This instance is already constructed."); + SysTryReturn(NID_GRP, text.IsEmpty() == false, E_INVALID_ARG, E_INVALID_ARG + , "[E_INVALID_ARG] The argument is invalid."); + SysTryReturn(NID_GRP, LINK_TYPE_NONE < autoLink && autoLink < LINK_TYPE_MAX, E_INVALID_ARG, E_INVALID_ARG + , "[E_INVALID_ARG] The autolink mask is invalid."); + SysTryReturn(NID_GRP, &canvas, E_INVALID_ARG, E_INVALID_ARG + , "[E_INVALID_ARG] The argument is invalid."); + + result r = E_SUCCESS; + + r = this->Construct(text, autoLink); + if (r != E_SUCCESS) + { + return r; + } + + Tizen::Graphics::Canvas& refCanvas = const_cast (canvas); + + Tizen::Graphics::Color color1 = refCanvas.GetForegroundColor(); + r = GetLastResult(); + SysTryReturn(NID_GRP, r == E_SUCCESS, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + this->SetTextColor(color1); + + Tizen::Graphics::Color color2 = refCanvas.GetBackgroundColor(); + r = GetLastResult(); + SysTryReturn(NID_GRP, r == E_SUCCESS, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + this->SetBackgroundColor(color2); + + return r; +} + +Tizen::Base::String& +_TextElementImpl::GetLink(void) const +{ + return *(const_cast (&__linkText)); +} + +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"); + + result r = E_SUCCESS; + + int index = -1; + __strText = text; + + if (__pRegisteringEnrichedText) + { + index = __pRegisteringEnrichedText->GetTextElementIndex(this); + r = __pRegisteringEnrichedText->RemoveFromTextObject(this); + } + + if (__pTextComponent) + { + Destroy(); + } + + if ((__linkType == LINK_TYPE_NONE) && (__autoLink == 0)) + { + r = Create(__strText, __strText.GetLength(), TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL); + + if (r == E_SUCCESS) + { + SetTextColor(__foregroundColor); + if (__bgColorEnable == true) + { + SetBackgroundColor(__backgroundColor); + } + if (__outlineColorEnable == true) + { + SetOutlineColor(__outlineColor); + } + if (__pFont) + { + r = SetTextObjectFont(*__pFont); + } + } + else + { + return r; + } + } + else + { + if (__isAuto == true) + { + r = CreateAutoLink(__strText, __autoLink); + if (r == E_SUCCESS) + { + _CutLinkType type = GetCutLinkType(); + if (type != TEXT_CUTLINK_TYPE_INVALID) + { + __linkType = ConvertObjectLinkType(type); + + Tizen::Base::String link; + __strText.SubString(GetAutolinkSrcOffset(), GetLength(), link); + __linkText = link; + } + + SetTextColor(__foregroundColor); + if (__bgColorEnable == true) + { + SetBackgroundColor(__backgroundColor); + } + if (__outlineColorEnable == true) + { + SetOutlineColor(__outlineColor); + } + if (__pFont) + { + r = SetTextObjectFont(*__pFont); + if (r != E_SUCCESS) + { + return r; + } + } + } + else + { + return r; + } + } + else + { + _CutLinkType type = ConvertObjectLinkType(__linkType); + r = CreateUserLink(__strText, type); + + if (r == E_SUCCESS) + { + SetTextColor(__foregroundColor); + if (__bgColorEnable == true) + { + SetBackgroundColor(__backgroundColor); + } + if (__outlineColorEnable == true) + { + SetOutlineColor(__outlineColor); + } + if (__pFont) + { + r = SetTextObjectFont(*__pFont); + if (r != E_SUCCESS) + { + return r; + } + } + } + else + { + return r; + } + } + } + + if (__pRegisteringEnrichedText) + { + r = __pRegisteringEnrichedText->InsertAtFromTextObject(index, this); + if (r != E_SUCCESS) + { + return r; + } + } + + return E_SUCCESS; +} + +result +_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"); + + result r = E_SUCCESS; + TextSimple* pTextElement = null; + + if (__pFont) + { + delete __pFont; + __pFont = null; + } + + __pFont = _FontImpl::CloneN(const_cast (font)); + + if (__pFont) + { + if (__pTextComponent->GetType() == TEXT_ELEMENT_TYPE_CUTLINK) + { + TextCutLink* pLinkTextElement = dynamic_cast < TextCutLink* >(__pTextComponent); + if (pLinkTextElement) + { + pLinkTextElement->SetEditModeEnable(true); + } + } + + pTextElement = dynamic_cast < TextSimple* >(__pTextComponent); + if (pTextElement) + { + pTextElement->SetFont(const_cast (__pFont)); + } + } + else + { + r = E_INVALID_ARG; + } + + return r; +} + +result +_TextElementImpl::SetTextColor(const Tizen::Graphics::Color& color) +{ + SysTryReturn(NID_GRP, __pTextComponent, E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Not Construct yet"); + + __foregroundColor = color; + + TextSimple* pTextElement = null; + + if (__pTextComponent->GetType() == TEXT_ELEMENT_TYPE_CUTLINK) + { + TextCutLink* pLinkTextElement = dynamic_cast < TextCutLink* >(__pTextComponent); + if (pLinkTextElement) + { + pLinkTextElement->SetEditModeEnable(true); + } + } + + pTextElement = dynamic_cast < TextSimple* >(__pTextComponent); + if (pTextElement) + { + pTextElement->SetForegroundColor(color); + } + + return E_SUCCESS; +} + +result +_TextElementImpl::SetBackgroundColor(const Tizen::Graphics::Color& color) +{ + SysTryReturn(NID_GRP, __pTextComponent, E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Not Construct yet"); + + __backgroundColor = color; + __bgColorEnable = true; + + TextSimple* pTextElement = null; + + if (__pTextComponent->GetType() == TEXT_ELEMENT_TYPE_CUTLINK) + { + TextCutLink* pLinkTextElement = dynamic_cast < TextCutLink* >(__pTextComponent); + if (pLinkTextElement) + { + pLinkTextElement->SetEditModeEnable(true); + } + } + + pTextElement = dynamic_cast < TextSimple* >(__pTextComponent); + if (pTextElement) + { + pTextElement->SetBackGroundDrawingModeEnabled(true); + pTextElement->SetBackgroundColor(color); + } + + return E_SUCCESS; +} + +result +_TextElementImpl::SetOutlineColor(const Tizen::Graphics::Color& color) +{ + SysTryReturn(NID_GRP, __pTextComponent, E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Not Construct yet"); + + __outlineColor = color; + __outlineColorEnable = true; + + TextSimple* pTextElement = null; + + if (__pTextComponent->GetType() == TEXT_ELEMENT_TYPE_CUTLINK) + { + TextCutLink* pLinkTextElement = dynamic_cast < TextCutLink* >(__pTextComponent); + if (pLinkTextElement) + { + pLinkTextElement->SetEditModeEnable(true); + } + } + + pTextElement = dynamic_cast < TextSimple* >(__pTextComponent); + if (pTextElement) + { + pTextElement->SetOutlineColor(color); + } + + return E_SUCCESS; +} + +Tizen::Base::String& +_TextElementImpl::GetText(void) const +{ + return *(const_cast (&__strText)); +} + +Tizen::Graphics::Color +_TextElementImpl::GetTextColor(void) const +{ + return __foregroundColor; +} + +Tizen::Graphics::Color +_TextElementImpl::GetBackgroundColor(void) const +{ + return __backgroundColor; +} + +Tizen::Graphics::Color +_TextElementImpl::GetOutlineColor(void) const +{ + return __outlineColor; +} + +_CutLinkType +_TextElementImpl::ConvertObjectLinkType(Tizen::Base::Utility::LinkType type) +{ + _CutLinkType cutLinkType; + + switch (type) + { + case LINK_TYPE_URL: + cutLinkType = TEXT_CUTLINK_TYPE_URL; + break; + + case LINK_TYPE_EMAIL: + cutLinkType = TEXT_CUTLINK_TYPE_EMAIL; + break; + + case LINK_TYPE_TEL_NUM: + cutLinkType = TEXT_CUTLINK_TYPE_PHONE_NUMBER; + break; + + default: + cutLinkType = TEXT_CUTLINK_TYPE_INVALID; + break; + } + return cutLinkType; +} + +Tizen::Base::Utility::LinkType +_TextElementImpl::ConvertObjectLinkType(_CutLinkType type) +{ + LinkType linkType; + + switch (type) + { + case TEXT_CUTLINK_TYPE_URL: + linkType = LINK_TYPE_URL; + break; + + case TEXT_CUTLINK_TYPE_EMAIL: + linkType = LINK_TYPE_EMAIL; + break; + + case TEXT_CUTLINK_TYPE_PHONE_NUMBER: + linkType = LINK_TYPE_TEL_NUM; + break; + + case TEXT_CUTLINK_TYPE_STREAMING_URL: + linkType = LINK_TYPE_URL; + break; + + default: + linkType = LINK_TYPE_NONE; + break; + } + return linkType; +} + +_EnrichedTextImpl* +_TextElementImpl::GetRegisteringEnrichedText(void) const +{ + return __pRegisteringEnrichedText; +} + +void +_TextElementImpl::SetRegisteringEnrichedText(_EnrichedTextImpl* pEnrichedTextImpl) +{ + __pRegisteringEnrichedText = pEnrichedTextImpl; +} + +const Tizen::Base::String& +_TextElementImpl::GetLinkText(void) const +{ + return __linkText; +} + +Tizen::Base::Utility::LinkType +_TextElementImpl::GetLinkType(void) const +{ + return __linkType; +} + +bool +_TextElementImpl::IsAuto(void) const +{ + return __isAuto; +} + +result +_TextElementImpl::Create(const Tizen::Base::String& text, int length, TextElementSourceType sourceType) +{ + TextSimple* pTextElement = null; + + pTextElement = new (std::nothrow) TextSimple((wchar_t*) text.GetPointer(), length, sourceType); + + if (pTextElement == null) + { + return E_OUT_OF_MEMORY; + } + + __pTextComponent = pTextElement; + + return E_SUCCESS; +} + +result +_TextElementImpl::CreateUserLink(const Tizen::Base::String& text, _CutLinkType linkType) +{ + LinkType cutLinkType = LINK_TYPE_NONE; + int len = text.GetLength(); + TextCutLink* pTextElement = null; + + switch (linkType) + { + case TEXT_CUTLINK_TYPE_URL: + cutLinkType = LINK_TYPE_URL; + break; + + case TEXT_CUTLINK_TYPE_EMAIL: + cutLinkType = LINK_TYPE_EMAIL; + break; + + case TEXT_CUTLINK_TYPE_PHONE_NUMBER: + cutLinkType = LINK_TYPE_TEL_NUM; + break; + + case TEXT_CUTLINK_TYPE_STREAMING_URL: + cutLinkType = LINK_TYPE_URL; + break; + + default: + cutLinkType = LINK_TYPE_NONE; + break; + } + + pTextElement = new (std::nothrow) TextCutLink(true, cutLinkType, (wchar_t*) text.GetPointer(), len, TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL); + + if (pTextElement == null) + { + return E_OUT_OF_MEMORY; + } + + __pTextComponent = pTextElement; + + return E_SUCCESS; +} + +result +_TextElementImpl::CreateAutoLink(const Tizen::Base::String& text, unsigned long autoLink) +{ + result r = E_SUCCESS; + int len = text.GetLength(); + wchar_t* pText = (wchar_t*) text.GetPointer(); + + if (autoLink != 0) + { + TextLinkInfo* pTextLinkInfo = null; + TextCutLinkParser* pParser = null; + + pParser = new (std::nothrow) TextCutLinkParser; + if (!pParser) + { + return E_OUT_OF_MEMORY; + } + + pTextLinkInfo = pParser->Parse(pText, len, 0); + if (!pTextLinkInfo) + { + SysLog(NID_GRP, "[] This instance isn't the link type of TextElement"); + r = Create(text, len, TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL); + } + else + { + __linkOffset = pTextLinkInfo->srcOffset; + + if ((ConvertLinkType(pTextLinkInfo->linkType) & autoLink) != 0) + { + TextCutLink* pTextElement = null; + + pTextElement = new (std::nothrow) TextCutLink(false, pTextLinkInfo->linkType, pText + pTextLinkInfo->srcOffset + , pTextLinkInfo->length, TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL); + + if (pTextElement == null) + { + if (pParser) + { + delete pParser; + pParser = null; + } + return E_OUT_OF_MEMORY; + } + + __pTextComponent = pTextElement; + r = E_SUCCESS; + } + else + { + r = Create(text, len, TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL); + } + + while (pTextLinkInfo) + { + TextLinkInfo* pCurrent = pTextLinkInfo; + pTextLinkInfo = pTextLinkInfo->pNextLinkInfo; + delete pCurrent; + } + } + + if (pParser) + { + delete pParser; + pParser = null; + } + } + else + { + r = Create(text, len, TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL); + } + + return r; +} + +void +_TextElementImpl::Destroy(void) +{ + if (__pTextComponent) + { + delete __pTextComponent; + __pTextComponent = null; + } +} + +_CutLinkType +_TextElementImpl::ConvertLinkType(LinkType type) const +{ + _CutLinkType linkType = TEXT_CUTLINK_TYPE_INVALID; + + switch (type) + { + case LINK_TYPE_URL: + linkType = TEXT_CUTLINK_TYPE_URL; + break; + + case LINK_TYPE_EMAIL: + linkType = TEXT_CUTLINK_TYPE_EMAIL; + break; + + case LINK_TYPE_TEL_NUM: + linkType = TEXT_CUTLINK_TYPE_PHONE_NUMBER; + break; + + default: + linkType = TEXT_CUTLINK_TYPE_INVALID; + break; + } + + return linkType; +} + +_CutLinkType +_TextElementImpl::GetCutLinkType(void) const +{ + _CutLinkType linkType = TEXT_CUTLINK_TYPE_INVALID; + TextCutLink* pTextElement = null; + + if (__pTextComponent->GetType() != TEXT_ELEMENT_TYPE_CUTLINK) + { + return TEXT_CUTLINK_TYPE_INVALID; + } + + pTextElement = dynamic_cast < TextCutLink* >(__pTextComponent); + if (pTextElement) + { + linkType = ConvertLinkType(pTextElement->GetCutLinkType()); + } + + return linkType; +} + +int +_TextElementImpl::GetLength(void) const +{ + return __pTextComponent->GetTextLength(); +} + +int +_TextElementImpl::GetAutolinkSrcOffset(void) const +{ + return __linkOffset; +} + +result +_TextElementImpl::SetTextObjectFont(const Tizen::Graphics::Font& font) +{ + SysTryReturn(NID_GRP, &font, E_INVALID_ARG, E_INVALID_ARG + , "[E_INVALID_ARG] The infomation of the given font is invalid."); + + SysTryReturn(NID_GRP, _Util::CheckValidity(&font), E_INVALID_ARG, E_INVALID_ARG + , "[E_INVALID_ARG] The infomation of the given font is invalid."); + + result r = E_SUCCESS; + Font* pFont = null; + TextSimple* pTextElement = null; + + pFont = const_cast (&font); + if (!pFont) + { + return E_INVALID_ARG; + } + + if (__pTextComponent->GetType() == TEXT_ELEMENT_TYPE_CUTLINK) + { + TextCutLink* pLinkTextElement = dynamic_cast < TextCutLink* >(__pTextComponent); + if (pLinkTextElement) + { + pLinkTextElement->SetEditModeEnable(true); + } + } + + pTextElement = dynamic_cast < TextSimple* >(__pTextComponent); + if (pTextElement) + { + pTextElement->SetFont(pFont); + } + + return r; +} + +_Text::TextElement* +_TextElementImpl::GetComponent(void) const +{ + return __pTextComponent; +} + + +const Tizen::Graphics::Font* +_TextElementImpl::GetFont(void) const +{ + return __pFont; +} + +unsigned long +_TextElementImpl::GetAutoLink(void) const +{ + return __autoLink; +} + +bool +_TextElementImpl::IsBackgoundColorEnable(void) const +{ + return __bgColorEnable; +} + +bool +_TextElementImpl::IsOutlineColorEnable(void) const +{ + return __outlineColorEnable; +} + +_TextElementImpl* +_TextElementImpl::GetInstance(TextElement& element) +{ + return (&element != null) ? element.__pImpl : null; +} + +const _TextElementImpl* +_TextElementImpl::GetInstance(const TextElement& element) +{ + return (&element != null) ? element.__pImpl : null; +} + +bool +_TextElementImpl::IsConstructed(void) const +{ + return (this->__pTextComponent != null); +} + +}} // Tizen::Graphics diff --git a/src/graphics/effect/FGrp_Effect.h b/src/graphics/effect/FGrp_Effect.h new file mode 100644 index 0000000..8dce723 --- /dev/null +++ b/src/graphics/effect/FGrp_Effect.h @@ -0,0 +1,83 @@ +// +// 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_Effect.h + * @brief This is the header file for internal utility class. + * + */ + +#ifndef _FGRP_INTERNAL_EFFECT_H_ +#define _FGRP_INTERNAL_EFFECT_H_ + + +#include + +#include "../util/FGrp_UtilTemplate.h" +#include "../util/FGrp_UtilScratchpad.h" +#include "../util/FGrp_UtilPixmap.h" + + +namespace Tizen { namespace Graphics +{ + +namespace _Effect +{ + +enum Flip +{ + FLIP_VERTICAL, + FLIP_HORIZONTAL +}; + +enum Rop +{ + ROP_COPY, + ROP_ALPHABLEND +}; + +enum DefaultFilter +{ + DEFAULT_FILTER_GOOD, + DEFAULT_FILTER_BEST +}; + +struct RotateDesc +{ + int angle; + int xOffset; + int yOffset; +}; + +bool ScaleImage(Tizen::Graphics::_Util::Pixmap& dstImage, long xDest, long yDest, long wDest, long hDest, const Tizen::Graphics::_Util::Pixmap& srcImage, Rop rop = ROP_ALPHABLEND); +bool ScaleImageInterpolation(Tizen::Graphics::_Util::Pixmap& dstImage, long xDest, long yDest, long wDest, long hDest, const Tizen::Graphics::_Util::Pixmap& srcImage, DefaultFilter defaultFilter); + +bool RotateImage(Tizen::Graphics::_Util::Pixmap& dstImage, long xDest, long yDest, const Tizen::Graphics::_Util::Pixmap& srcImage, const RotateDesc& rotateDesc, long constantAlpha); + +bool DrawImageWithAlpha(Tizen::Graphics::_Util::Pixmap& dstImage, long xDest, long yDest, const Tizen::Graphics::_Util::Pixmap& srcImage, long constantAlpha); + +bool IsNinePatchedBitmap(const Tizen::Graphics::_Util::Pixmap& dstImage, bool checkStrictly); + +bool IsOpaqueAllOver(const Tizen::Graphics::_Util::Pixmap& dstImage); + +Tizen::Graphics::_Util::Pixmap* GetFlippedImage(const Tizen::Graphics::_Util::Pixmap& srcImage, Flip flip); + +} // _Effect + +}} // Tizen::Graphics + +#endif // #ifndef _FGRP_INTERNAL_EFFECT_H_ diff --git a/src/graphics/effect/FGrp_EffectAlpha.cpp b/src/graphics/effect/FGrp_EffectAlpha.cpp new file mode 100644 index 0000000..545f183 --- /dev/null +++ b/src/graphics/effect/FGrp_EffectAlpha.cpp @@ -0,0 +1,346 @@ +// +// 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_EffectAlpha.cpp + * @brief This is the header file for internal utility class. + * + */ + +#include "FGrp_EffectFunc.h" +#include "FGrp_Effect.h" +#include "../util/FGrp_Util.h" + +using namespace Tizen::Graphics; + + +//////////////////////////////////////////////////////////////////////////////// +// template _BltBlend() + +namespace // unnamed +{ + +template +inline void +_BltBlend(DestPixel* pDest, int w, int h, int pitch, SourPixel* pSour, int imagePitch, unsigned long opacity, + _Util::ColorKey srcColorKey) +{ + opacity += (opacity >> 7); + + if (!srcColorKey.isValid) + { + while (--h >= 0) + { + int copy = w; + + while (--copy >= 0) + { + *pDest = _Effect::Func::AlphaBlending(*pDest, *pSour++, DestPixel(opacity)); + ++pDest; + } + + pDest += (pitch - w); + pSour += (imagePitch - w); + } + } + else + { + while (--h >= 0) + { + int copy = w; + + while (--copy >= 0) + { + if (*pSour != srcColorKey.colorKey) + { + *pDest = _Effect::Func::AlphaBlending(*pDest, *pSour, DestPixel(opacity)); + } + + ++pSour; + ++pDest; + } + + pDest += (pitch - w); + pSour += (imagePitch - w); + } + } +} + +template +inline void +_BltCopy(DestPixel* pDest, int w, int h, int pitch, SourPixel* pSour, int imagePitch, _Util::ColorKey srcColorKey) +{ + if (!srcColorKey.isValid) + { + while (--h >= 0) + { + _Effect::Func::ConvertColorFormat(pDest, pSour, w); + + pDest += pitch; + pSour += imagePitch; + } + } + else + { + while (--h >= 0) + { + int copy = w; + + while (--copy >= 0) + { + if (*pSour != srcColorKey.colorKey) + { + _Effect::Func::ConvertColorFormat(pDest, pSour, 1); + } + + ++pSour; + ++pDest; + } + + pDest += (pitch - w); + pSour += (imagePitch - w); + } + } +} + +//////////////////////////////////////////////////////////////////////////// +// static function (callback) + +void +_BitbltFast32bitFrom32bit(unsigned long* pDest32, int w, int h, int pitch, unsigned long* pSour32, int imagePitch, + unsigned long opacity, + _Util::ColorKey srcColorKey) +{ + _BltCopy(pDest32, w, h, pitch, pSour32, imagePitch, srcColorKey); +} + +void +_BitbltFast32bitFrom16bit(unsigned long* pDest32, int w, int h, int pitch, unsigned long* pSour32, int imagePitch, + unsigned long opacity, + _Util::ColorKey srcColorKey) +{ + unsigned short* pSour16 = (unsigned short*) pSour32; + + _BltCopy(pDest32, w, h, pitch, pSour16, imagePitch, srcColorKey); +} + +void +_BitbltFast16bitFrom32bit(unsigned short* pDest16, int w, int h, int pitch, unsigned short* pSour16, int imagePitch, + unsigned long opacity, + _Util::ColorKey srcColorKey) +{ + unsigned long* pSour32 = (unsigned long*) pSour16; + + _BltCopy(pDest16, w, h, pitch, pSour32, imagePitch, srcColorKey); +} + +void +_BitbltFast16bitFrom16bit(unsigned short* pDest16, int w, int h, int pitch, unsigned short* pSour16, int imagePitch, + unsigned long opacity, + _Util::ColorKey srcColorKey) +{ + _BltCopy(pDest16, w, h, pitch, pSour16, imagePitch, srcColorKey); +} + +/////// ------ + +void +_BitbltAlpha32bitFrom32bit(unsigned long* pDest32, int w, int h, int pitch, unsigned long* pSour32, int imagePitch, + unsigned long opacity, + _Util::ColorKey srcColorKey) +{ + _BltBlend(pDest32, w, h, pitch, pSour32, imagePitch, opacity, srcColorKey); +} + +void +_BitbltAlpha32bitFrom16bit(unsigned long* pDest32, int w, int h, int pitch, unsigned long* pSour32, int imagePitch, + unsigned long opacity, + _Util::ColorKey srcColorKey) +{ + unsigned short* pSour16 = (unsigned short*) pSour32; + + if (opacity >= 255) + { + _BltCopy(pDest32, w, h, pitch, pSour16, imagePitch, srcColorKey); + } + else + { + _BltBlend(pDest32, w, h, pitch, pSour16, imagePitch, opacity, srcColorKey); + } +} + +void +_BitbltAlpha16bitFrom32bit(unsigned short* pDest16, int w, int h, int pitch, unsigned short* pSour16, int imagePitch, + unsigned long opacity, + _Util::ColorKey srcColorKey) +{ + unsigned long* pSour32 = (unsigned long*) pSour16; + + _BltBlend(pDest16, w, h, pitch, pSour32, imagePitch, opacity, srcColorKey); +} + +void +_BitbltAlpha16bitFrom16bit(unsigned short* pDest16, int w, int h, int pitch, unsigned short* pSour16, int imagePitch, + unsigned long opacity, + _Util::ColorKey srcColorKey) +{ + _BltBlend(pDest16, w, h, pitch, pSour16, imagePitch, opacity, srcColorKey); +} + +//////////////////////////////////////////////////////////////////////////// +// static function + +bool +_DrawImageWithAlpha(const _Util::Pixmap& dstImage, long xDest, long yDest, const _Util::Pixmap& srcImage, long constantAlpha) +{ + _Util::ColorKey srcColorKey; + + if (srcImage.enableColorKey) + { + srcColorKey.isValid = true; + srcColorKey.colorKey = srcImage.colorKey; + } + + switch (dstImage.depth) + { + case 32: + { + typedef unsigned long Pixel; + + _Util::ScratchPad dstScratchPad((Pixel*) dstImage.pBitmap, dstImage.width, dstImage.height, + dstImage.bytesPerLine / sizeof(Pixel)); + _Util::ScratchPad srcScratchPad((Pixel*) srcImage.pBitmap, srcImage.width, srcImage.height, + srcImage.bytesPerLine / sizeof(Pixel), + srcColorKey); + + srcScratchPad.SetPitch(srcImage.depth, srcImage.bytesPerLine); + + if (srcImage.isOpaque && constantAlpha >= 255) + { + dstScratchPad.RegisterBitBlt((srcImage.depth == 32) ? _BitbltFast32bitFrom32bit : _BitbltFast32bitFrom16bit); + } + else + { + dstScratchPad.RegisterBitBlt((srcImage.depth == 32) ? _BitbltAlpha32bitFrom32bit : _BitbltAlpha32bitFrom16bit); + } + + dstScratchPad.BitBlt(xDest, yDest, &srcScratchPad, 0, 0, srcScratchPad.GetWidth(), + srcScratchPad.GetHeight(), constantAlpha); + } + break; + case 16: + { + typedef unsigned short Pixel; + + _Util::ScratchPad dstScratchPad((Pixel*) dstImage.pBitmap, dstImage.width, dstImage.height, + dstImage.bytesPerLine / sizeof(Pixel)); + _Util::ScratchPad srcScratchPad((Pixel*) srcImage.pBitmap, srcImage.width, srcImage.height, + srcImage.bytesPerLine / sizeof(Pixel), + srcColorKey); + + srcScratchPad.SetPitch(srcImage.depth, srcImage.bytesPerLine); + + if (srcImage.isOpaque && constantAlpha >= 255) + { + dstScratchPad.RegisterBitBlt((srcImage.depth == 32) ? _BitbltFast16bitFrom32bit : _BitbltFast16bitFrom16bit); + } + else + { + dstScratchPad.RegisterBitBlt((srcImage.depth == 32) ? _BitbltAlpha16bitFrom32bit : _BitbltAlpha16bitFrom16bit); + } + + dstScratchPad.BitBlt(xDest, yDest, &srcScratchPad, 0, 0, srcScratchPad.GetWidth(), + srcScratchPad.GetHeight(), constantAlpha); + } + break; + default: + // assert(false); + return false; + } + + return true; +} + +} + +//////////////////////////////////////////////////////////////////////////////// +// public + +bool +Tizen::Graphics::_Effect::DrawImageWithAlpha(_Util::Pixmap& dstImage, long xDest, long yDest, const _Util::Pixmap& srcImage, long constantAlpha) +{ + // ÁÖ¾îÁø ÆĶó¹ÌÅÍ°¡ À¯È¿ÇÑÁö È®ÀÎÀ» ÇÑ´Ù. + { + if ((srcImage.width < 0) || (srcImage.height < 0) || (srcImage.pBitmap == null)) + { + return false; + } + + if ((dstImage.width < 0) || (dstImage.height < 0) || (dstImage.pBitmap == null)) + { + return false; + } + + bool isSuitablePixelDepth = + ((srcImage.depth == 16 || srcImage.depth == 32) && (dstImage.depth == 16 || dstImage.depth == 32)); + + if (!isSuitablePixelDepth) + { + return false; + } + + if (constantAlpha <= 0) + { + return true; + } + + if (constantAlpha > 255) + { + constantAlpha = 255; + } + + if (srcImage.pBitmap == dstImage.pBitmap) + { + return false; + } + } + + { + if ((srcImage.width == 0) || (srcImage.height == 0)) + { + return true; + } + + if ((dstImage.width == 0) || (dstImage.height == 0)) + { + return true; + } + + { + _Util::Rectangle dstRect = { 0, 0, dstImage.width, dstImage.height }; + _Util::Rectangle tgtRect = { xDest, yDest, srcImage.width, srcImage.height }; + _Util::Rectangle outRect; + + if (!IntersectRect(outRect, tgtRect, dstRect)) + { + return true; + } + } + } + + return _DrawImageWithAlpha(dstImage, xDest, yDest, srcImage, constantAlpha); +} diff --git a/src/graphics/effect/FGrp_EffectFlip.cpp b/src/graphics/effect/FGrp_EffectFlip.cpp new file mode 100644 index 0000000..0a64fc4 --- /dev/null +++ b/src/graphics/effect/FGrp_EffectFlip.cpp @@ -0,0 +1,117 @@ +// +// 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_EffectFlip.cpp + * @brief This is the header file for internal utility class. + * + */ + +#include +#include +#include + +#include + +#include "FGrp_Effect.h" + + +using namespace Tizen::Graphics; + + +template +_Util::Pixmap* +CreateFlippedImage(int width, int height, int pitch, Pixel* pSour, _Effect::Flip 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] Memory allocation failed."); + + Pixel* pDest = (Pixel*) dstImage->pBitmap; + + if (pDest == null) + { + return null; + } + + switch (flip) + { + case _Effect::FLIP_VERTICAL: + { + pSour += height * pitch; + + for (int y = 0; y < height; y++) + { + pSour -= pitch; + memcpy(pDest, pSour, width * sizeof(Pixel)); + pDest += width; + } + } + break; + + case _Effect::FLIP_HORIZONTAL: + { + pSour += (pitch - 1); + + for (int y = 0; y < height; y++) + { + for (int x = 0; x < width; x++) + { + *pDest++ = *pSour--; + } + + pSour += (pitch << 1); + } + } + break; + + default: + // assertion + return null; + } + + return dstImage.release(); +} + + +_Util::Pixmap* +Tizen::Graphics::_Effect::GetFlippedImage(const _Util::Pixmap& srcImage, Flip flip) +{ + { + if ((srcImage.width <= 0) || (srcImage.height <= 0) || (srcImage.pBitmap == null)) + { + return 0; + } + } + + if (srcImage.depth == 32) + { + return CreateFlippedImage(srcImage.width, srcImage.height, srcImage.bytesPerLine * 8 / srcImage.depth, + (unsigned long*) srcImage.pBitmap, + flip); + } + else if (srcImage.depth == 16) + { + return CreateFlippedImage(srcImage.width, srcImage.height, srcImage.bytesPerLine * 8 / srcImage.depth, + (unsigned short*) srcImage.pBitmap, + flip); + } + else + { + return 0; + } +} diff --git a/src/graphics/effect/FGrp_EffectFunc.h b/src/graphics/effect/FGrp_EffectFunc.h new file mode 100644 index 0000000..4d923aa --- /dev/null +++ b/src/graphics/effect/FGrp_EffectFunc.h @@ -0,0 +1,377 @@ +// +// 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_EffectFunc.h + * @brief This is the header file for internal utility class. + * + */ + +#ifndef _FGRP_INTERNAL_EFFECT_FUNC_H_ +#define _FGRP_INTERNAL_EFFECT_FUNC_H_ + +namespace Tizen { namespace Graphics +{ + +namespace _Effect +{ + +//////////////////////////////////////////////////////////////////////////////// +// alpha blending rule + +template +inline T +_LocalMin(T a, T b) +{ + return (a < b) ? a : b; +} + +// 'Add' rule is more intuitive for 32-bit alpha +template +inline T +_BlendAlphaComponent(T srcA, T dstA) +{ + return _LocalMin((srcA) + (dstA), 0xFF); +} + +// general rule. The attenuation occurs for destination alpha +// Ad = As + Ad * (1-As) +template +inline T +_BlendAlphaComponent2(T srcA, T dstA) +{ + return ((srcA) + (((dstA) * (255 - (srcA))) >> 8)); +} + +template +inline T +_BlendAlphaComponent3(T srcA, T dstA) +{ + return (((dstA) + ((((srcA) - (dstA)) * (srcA)) >> 8)) & 0xFF); +} + + +namespace Func +{ + +//////////////////////////////////////////////////////////////////////////// +// template AlphaBlending() + +template +inline DestPixel +AlphaBlending(DestPixel dest, SourPixel sour, DestPixel ca) +{ + // assert(false); +} + +template<> +inline unsigned long AlphaBlending (unsigned long dest, unsigned long sour, unsigned long ca) +{ + typedef unsigned long DestPixel; + typedef unsigned long SourPixel; + + DestPixel srcA = ca * (sour >> 24) >> 8; + DestPixel srcR = sour & 0x00FF0000; + DestPixel srcG = sour & 0x0000FF00; + DestPixel srcB = sour & 0x000000FF; + + DestPixel dstA = (dest & 0xFF000000) >> 24; + DestPixel dstR = dest & 0x00FF0000; + DestPixel dstG = dest & 0x0000FF00; + DestPixel dstB = dest & 0x000000FF; + + dstA = _BlendAlphaComponent(srcA, dstA); + srcA += (srcA >> 7); + dstR = (dstR + (((srcR - dstR) * srcA) >> 8)) & 0x00FF0000; + dstG = (dstG + (((srcG - dstG) * srcA) >> 8)) & 0x0000FF00; + dstB = (dstB + (((srcB - dstB) * srcA) >> 8)) & 0x000000FF; + dstA = (dstA > 0xFF) ? 0xFF : dstA; + + return (dstA << 24) | dstR | dstG | dstB; +} + +template<> +inline unsigned long AlphaBlending (unsigned long dest, unsigned short sour, unsigned long srcA) +{ + typedef unsigned long DestPixel; + typedef unsigned short SourPixel; + + DestPixel srcR = sour & 0xF800; + srcR = (srcR << 8 | srcR << 3) & 0x00FF0000; + DestPixel srcG = sour & 0x07E0; + srcG = (srcG << 5 | srcG >> 1) & 0x0000FF00; + DestPixel srcB = sour & 0x001F; + srcB = (srcB << 3 | srcB >> 2) & 0x000000FF; + + DestPixel dstA = (dest & 0xFF000000) >> 24; + DestPixel dstR = dest & 0x00FF0000; + DestPixel dstG = dest & 0x0000FF00; + DestPixel dstB = dest & 0x000000FF; + + dstA = _BlendAlphaComponent(srcA, dstA); + dstR = (dstR + (((srcR - dstR) * srcA) >> 8)) & 0x00FF0000; + dstG = (dstG + (((srcG - dstG) * srcA) >> 8)) & 0x0000FF00; + dstB = (dstB + (((srcB - dstB) * srcA) >> 8)) & 0x000000FF; + dstA = (dstA > 0xFF) ? 0xFF : dstA; + + return (dstA << 24) | dstR | dstG | dstB; +} + +template<> +inline unsigned short AlphaBlending (unsigned short dest, unsigned short sour, unsigned short ca) +{ + typedef unsigned short DestPixel; + typedef unsigned short SourPixel; + + DestPixel srcR = (sour >> 11) & 0x001F; + DestPixel srcG = (sour >> 5) & 0x003F; + DestPixel srcB = (sour) & 0x001F; + + DestPixel dstR = (dest >> 11) & 0x001F; + DestPixel dstG = (dest >> 5) & 0x003F; + DestPixel dstB = (dest) & 0x001F; + + dstR = (dstR + (((srcR - dstR) * ca) >> 8)) & 0x001F; + dstG = (dstG + (((srcG - dstG) * ca) >> 8)) & 0x003F; + dstB = (dstB + (((srcB - dstB) * ca) >> 8)) & 0x001F; + + return DestPixel((dstR << 11) | (dstG << 5) | dstB); +} + +template<> +inline unsigned short AlphaBlending (unsigned short dest, unsigned long sour, unsigned short ca) +{ + typedef unsigned short DestPixel; + typedef unsigned long SourPixel; + + DestPixel srcA = DestPixel(ca * (sour >> 24) >> 8); + DestPixel srcR = DestPixel((sour & 0x00F80000) >> 19); + DestPixel srcG = DestPixel((sour & 0x0000FC00) >> 10); + DestPixel srcB = DestPixel((sour & 0x000000F8) >> 3); + + DestPixel dstR = (dest >> 11) & 0x001F; + DestPixel dstG = (dest >> 5) & 0x003F; + DestPixel dstB = (dest) & 0x001F; + + dstR = (dstR + (((srcR - dstR) * srcA) >> 8)) & 0x001F; + dstG = (dstG + (((srcG - dstG) * srcA) >> 8)) & 0x003F; + dstB = (dstB + (((srcB - dstB) * srcA) >> 8)) & 0x001F; + + return DestPixel((dstR << 11) | (dstG << 5) | dstB); +} + +//////////////////////////////////////////////////////////////////////////// +// template AlphaBlendingFast() + +template +inline DestPixel +AlphaBlendingFast(DestPixel dest, SourPixel sour) +{ + return (DestPixel) sour; +} + +template<> +inline unsigned long AlphaBlendingFast (unsigned long dest, unsigned long sour) +{ + typedef unsigned long DestPixel; + typedef unsigned long SourPixel; + + DestPixel srcA = sour >> 24; + DestPixel srcR = sour & 0x00FF0000; + DestPixel srcG = sour & 0x0000FF00; + DestPixel srcB = sour & 0x000000FF; + + DestPixel dstA = (dest & 0xFF000000) >> 24; + DestPixel dstR = dest & 0x00FF0000; + DestPixel dstG = dest & 0x0000FF00; + DestPixel dstB = dest & 0x000000FF; + + dstA = _BlendAlphaComponent(srcA, dstA); + srcA += (srcA >> 7); + dstR = (dstR + (((srcR - dstR) * srcA) >> 8)) & 0x00FF0000; + dstG = (dstG + (((srcG - dstG) * srcA) >> 8)) & 0x0000FF00; + dstB = (dstB + (((srcB - dstB) * srcA) >> 8)) & 0x000000FF; + dstA = (dstA > 0xFF) ? 0xFF : dstA; + + return (dstA << 24) | dstR | dstG | dstB; +} + +template<> +inline unsigned long AlphaBlendingFast (unsigned long dest, unsigned short sour) +{ + typedef unsigned short SourPixel; + typedef unsigned long DestPixel; + + { + DestPixel r = (sour & 0xF800) >> 8; + DestPixel g = (sour & 0x07E0) >> 3; + DestPixel b = (sour & 0x001F) << 3; + + r += (r >> 5); + g += (g >> 6); + b += (b >> 5); + + return (0xFF000000 | (r << 16) | (g << 8) | (b)); + } +} + +template<> +inline unsigned short AlphaBlendingFast (unsigned short dest, unsigned long sour) +{ + typedef unsigned short DestPixel; + typedef unsigned long SourPixel; + + DestPixel srcA = DestPixel((sour >> 24)); + DestPixel srcR = DestPixel((sour & 0x00F80000) >> 19); + DestPixel srcG = DestPixel((sour & 0x0000FC00) >> 10); + DestPixel srcB = DestPixel((sour & 0x000000F8) >> 3); + + DestPixel dstR = (dest >> 11) & 0x001F; + DestPixel dstG = (dest >> 5) & 0x003F; + DestPixel dstB = (dest) & 0x001F; + + srcA += (srcA >> 7); + + dstR = (dstR + (((srcR - dstR) * srcA) >> 8)) & 0x001F; + dstG = (dstG + (((srcG - dstG) * srcA) >> 8)) & 0x003F; + dstB = (dstB + (((srcB - dstB) * srcA) >> 8)) & 0x001F; + + return DestPixel((dstR << 11) | (dstG << 5) | dstB); +} + +//////////////////////////////////////////////////////////////////////////// +// template ConvertColorFormat() + +template +inline void +ConvertColorFormatFast(DestPixel* pDest, SourPixel* pSour) +{ + *pDest = *pSour; +} + +template<> +inline void +ConvertColorFormatFast(unsigned long* pDest, unsigned short* pSour) +{ + typedef unsigned short SourPixel; + typedef unsigned long DestPixel; + + { + DestPixel r = (*pSour & 0xF800) >> 8; + DestPixel g = (*pSour & 0x07E0) >> 3; + DestPixel b = (*pSour & 0x001F) << 3; + + r += (r >> 5); + g += (g >> 6); + b += (b >> 5); + + *pDest = 0xFF000000 | (r << 16) | (g << 8) | (b); + } +} + +template<> +inline void +ConvertColorFormatFast(unsigned short* pDest, unsigned long* pSour) +{ + typedef unsigned long SourPixel; + typedef unsigned short DestPixel; + + { + DestPixel r = (DestPixel) ((*pSour & 0xF80000) >> 8); + DestPixel g = (DestPixel) ((*pSour & 0x00FC00) >> 5); + DestPixel b = (DestPixel) ((*pSour & 0x0000F8) >> 3); + + *pDest = r | g | b; + } +} + +template +inline DestPixel* +ConvertColorFormat(DestPixel* pDest, SourPixel* pSour, int count) +{ + DestPixel* pDestEnd = pDest + count; + + while (pDest < pDestEnd) + { + *pDest++ = *pSour++; + } + + return pDestEnd; +} + +template<> +inline unsigned long* +ConvertColorFormat(unsigned long* pDest, unsigned short* pSour, int count) +{ + typedef unsigned short SourPixel; + typedef unsigned long DestPixel; + + DestPixel* pDestEnd = pDest + count; + + while (pDest < pDestEnd) + { + DestPixel r = (*pSour & 0xF800) >> 8; + DestPixel g = (*pSour & 0x07E0) >> 3; + DestPixel b = (*pSour & 0x001F) << 3; + + r += (r >> 5); + g += (g >> 6); + b += (b >> 5); + + *pDest++ = 0xFF000000 | (r << 16) | (g << 8) | (b); + ++pSour; + } + + return pDestEnd; +} + +template<> +inline unsigned short* +ConvertColorFormat(unsigned short* pDest, unsigned long* pSour, int count) +{ + typedef unsigned long SourPixel; + typedef unsigned short DestPixel; + + DestPixel* pDestEnd = pDest + count; + + while (pDest < pDestEnd) + { + DestPixel r = (DestPixel) ((*pSour & 0xF80000) >> 8); + DestPixel g = (DestPixel) ((*pSour & 0x00FC00) >> 5); + DestPixel b = (DestPixel) ((*pSour & 0x0000F8) >> 3); + + *pDest++ = r | g | b; + ++pSour; + } + + return pDestEnd; +} + +} // namespace Func + +} // _Effect + +}} // Tizen::Graphics + +#endif // #ifndef _FGRP_INTERNAL_EFFECT_FUNC_H_ diff --git a/src/graphics/effect/FGrp_EffectManip.cpp b/src/graphics/effect/FGrp_EffectManip.cpp new file mode 100644 index 0000000..244e082 --- /dev/null +++ b/src/graphics/effect/FGrp_EffectManip.cpp @@ -0,0 +1,281 @@ +// +// 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_EffectManip.cpp + * @brief This is the header file for internal utility class. + * + */ + +#include "FGrp_EffectFunc.h" +#include "FGrp_Effect.h" + +using namespace Tizen::Graphics; + + +namespace // unnamed +{ + +template +struct _NinePatchedKey +{ +}; + +template<> +struct _NinePatchedKey +{ + enum + { + KEY = 0xFF000000 + }; +}; + +template<> +struct _NinePatchedKey +{ + enum + { + KEY = 0x0000 + }; +}; + +template +bool +_IsNinePatched(const _Util::Pixmap& dstImage, Pixel dummy) +{ + enum + { + KEY = _NinePatchedKey ::KEY + }; + + // assert(dstImage.depth == sizeof(Pixel)*8); + + if (dstImage.depth != sizeof(Pixel) * 8) + { + return false; + } + + // verify horizontal line + { + bool found = false; + + Pixel* pProbe = (Pixel*) (dstImage.pBitmap); + Pixel* pProbeEnd = pProbe + dstImage.width; + + while (!found && (pProbe < pProbeEnd)) + { + found = (*pProbe++ == KEY); + } + + if (!found) + { + return false; + } + } + + // verify vertical line + { + bool found = false; + + int pitch = dstImage.bytesPerLine / (dstImage.depth / 8); + + Pixel* pProbe = (Pixel*) (dstImage.pBitmap); + Pixel* pProbeEnd = pProbe + dstImage.height * pitch; + + while (!found && (pProbe < pProbeEnd)) + { + found = (*pProbe == KEY); + pProbe += pitch; + } + + if (!found) + { + return false; + } + } + + return true; +} + +template +bool +_IsNinePatchedStrictly(const _Util::Pixmap& dstImage, Pixel dummy) +{ + // >> condition + // 1. Bitmap pixel format should be ARGB8888 + // 2. Topmost horizontal line must have a pixel(s) of 0xFF000000 + // 3. Leftmost vertical line must have a pixel(s) of 0xFF000000 + // 4. Topmost horizontal line and Leftmost vertical line must be composed of only 0xFF000000 and 0x00?????? (00 <= ?? <= FF) + + enum + { + KEY = _NinePatchedKey ::KEY + }; + + // assert(dstImage.depth == sizeof(Pixel)*8); + + if (dstImage.depth != sizeof(Pixel) * 8) + { + return false; + } + + // verify horizontal line + { + bool keyFound = false; + + Pixel* pProbe = (Pixel*) (dstImage.pBitmap); + Pixel* pProbeEnd = pProbe + dstImage.width; + + --pProbe; + + while (++pProbe < pProbeEnd) + { + if (*pProbe == KEY) + { + keyFound = true; + } + else + { + if ((*pProbe & 0xFF000000) != 0) + { + return false; + } + } + } + + if (!keyFound) + { + return false; + } + } + + // verify vertical line + { + bool keyFound = false; + + int pitch = dstImage.bytesPerLine / (dstImage.depth / 8); + + Pixel* pProbe = (Pixel*) (dstImage.pBitmap); + Pixel* pProbeEnd = pProbe + dstImage.height * pitch; + + while (pProbe < pProbeEnd) + { + if (*pProbe == KEY) + { + keyFound = true; + } + else + { + if ((*pProbe & 0xFF000000) != 0) + { + return false; + } + } + + pProbe += pitch; + } + + if (!keyFound) + { + return false; + } + } + + return true; +} + +} + + +bool +Tizen::Graphics::_Effect::IsNinePatchedBitmap(const _Util::Pixmap& dstImage, bool checkStrictly) +{ + // verifiy the spcified parameters + { + if ((dstImage.width <= 0) || (dstImage.height <= 0) || (dstImage.pBitmap == null)) + { + return false; + } + } + + if (checkStrictly) + { + switch (dstImage.depth) + { + case 32: + return _IsNinePatchedStrictly (dstImage, 0); + default: + return false; + } + } + else + { + switch (dstImage.depth) + { + case 32: + return _IsNinePatched (dstImage, 0); + case 16: + return _IsNinePatched (dstImage, 0); + default: + return false; + } + } +} + +bool +Tizen::Graphics::_Effect::IsOpaqueAllOver(const _Util::Pixmap& dstImage) +{ + // it returns true as default + { + if ((dstImage.width <= 0) || (dstImage.height <= 0) || (dstImage.pBitmap == null)) + { + return true; + } + } + + switch (dstImage.depth) + { + case 32: + { + typedef unsigned long Pixel; + + bool found = false; + + for (int y = 0; y < dstImage.height; y++) + { + Pixel* pProbe = (Pixel*) (dstImage.pBitmap + dstImage.bytesPerLine * y); + Pixel* pProbeEnd = pProbe + dstImage.width; + + while (!found && (pProbe < pProbeEnd)) + { + found = (((*pProbe++) >> 24) < 0xFF); + } + + if (found) + { + return false; + } + } + + return true; + } + break; + case 16: + default: + return true; + } +} diff --git a/src/graphics/effect/FGrp_EffectRotate.cpp b/src/graphics/effect/FGrp_EffectRotate.cpp new file mode 100644 index 0000000..597dfaa --- /dev/null +++ b/src/graphics/effect/FGrp_EffectRotate.cpp @@ -0,0 +1,909 @@ +// +// 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_EffectRotate.cpp + * @brief This is the header file for internal utility class. + * + */ + +#include +#include +#include + +#include + +#include + +#include "FGrp_EffectFunc.h" +#include "FGrp_Effect.h" +#include "../util/FGrp_UtilType.h" + +using namespace Tizen::Graphics; + +//////////////////////////////////////////////////////////////////////////////// +// data type + +#if 1 + // _RealDataType as a floating point + typedef float _RealDataType; +#else + // _RealDataType as a fixed point + typedef long _RealDataType; +#endif + +//////////////////////////////////////////////////////////////////////////////// +// definition + +namespace // unnamed +{ + +namespace _RealNumber +{ + +template +inline T +Assign(float f) +{ + // Empty statement +} + +template +inline T +AssignShift(int i) +{ + // Empty statement +} + +template +inline int +CastInt(T i) +{ + return int(i); +} + +template +inline T +MultiplySmall(T first, T second) +{ + // Empty statement +} + +template +inline T +MultiplyBig(T first, T second) +{ + // Empty statement +} + +template +inline T +DivideSmall(T first, T second) +{ + // Empty statement +} + +template +inline T +DivideBig(T first, T second) +{ + // Empty statement +} + +template +inline T +Divide3(T first, T second, T third) +{ + // Empty statement +} + +template +inline float +Dispatch(T i) +{ + return float(i); +} + +template +inline T +Sin(T degree) +{ + // Empty statement +} + +template +inline T +Cos(T degree) +{ + // Empty statement +} + +} // namespace _RealNumber + +// specialization for float type +namespace _RealNumber +{ +const float _FLOAT_PI = 3.141592f; + +template <> +inline float +Assign(float f) +{ + return f; +} + +template <> +inline float +AssignShift(int i) +{ + return float(i); +} + +template <> +inline int +CastInt(float i) +{ + return int((i > 0.0f) ? (i + 0.5f) : (i - 0.5f)); +} + +template <> +inline float +MultiplySmall(float first, float second) +{ + return first * second; +} + +template <> +inline float +MultiplyBig(float first, float second) +{ + return first * second; +} + +template <> +inline float +DivideSmall(float first, float second) +{ + return first / second; +} + +template <> +inline float +DivideBig(float first, float second) +{ + return first / second; +} + +template <> +inline float +Divide3(float first, float second, float third) +{ + return first / second / third; +} + +template <> +inline float +Dispatch(float i) +{ + return i; +} + +template <> +inline float +Sin(float degree) +{ + return float(sinf(degree * _FLOAT_PI / 180.0f)); +} + +template <> +inline float +Cos(float degree) +{ + return float(cosf(degree * _FLOAT_PI / 180.0f)); +} + +} // namespace _RealNumber + +// specialization for long type +namespace _RealNumber +{ +const int _FPFLOAT_SHIFT = 10; +const int _FPFLOAT_SHIFT_HIGH = 5; +const int _FPFLOAT_SHIFT_LOW = 5; +const int _FPFLOAT_MUL_VALUE = 1024; + +template <> +inline long +Assign(float f) +{ + return long((f) * _FPFLOAT_MUL_VALUE); +} + +template <> +inline long +AssignShift(int i) +{ + return long((i) << _FPFLOAT_SHIFT); +} + +template <> +inline int +CastInt(long i) +{ + return (i + (1 << (_FPFLOAT_SHIFT - 1))) >> _FPFLOAT_SHIFT; +} + +template <> +inline long +MultiplySmall(long first, long second) +{ + return (first * second) >> _FPFLOAT_SHIFT; +} + +template <> +inline long +MultiplyBig(long first, long second) +{ + return (first >> _FPFLOAT_SHIFT_HIGH) * (second >> _FPFLOAT_SHIFT_LOW); +} + +template <> +inline long +DivideSmall(long first, long second) +{ + return (first << _FPFLOAT_SHIFT) / second; +} + +template <> +inline long +DivideBig(long first, long second) +{ + return (first << _FPFLOAT_SHIFT_HIGH) / (second >> _FPFLOAT_SHIFT_LOW); +} + +template <> +inline long +Divide3(long first, long second, long third) +{ + return DivideSmall(DivideBig(first, second), third); +} + +template <> +inline float +Dispatch(long i) +{ + return float(i) / float(_FPFLOAT_MUL_VALUE); +} + +int SinX16(int degree); +int CosX16(int degree); + +template <> +inline long +Sin(long degree) +{ + // 16 was value that we shifted in a sine table + int n = _FPFLOAT_SHIFT - 16; + + return (n >= 0) ? (SinX16(CastInt(degree)) << n) : (SinX16(CastInt(degree)) >> (-n)); +} + +template <> +inline long +Cos(long degree) +{ + // 16 was value that we shifted in a sine table + int n = _RealNumber::_FPFLOAT_SHIFT - 16; + + return (n >= 0) ? (CosX16(CastInt(degree)) << n) : (CosX16(CastInt(degree)) >> (-n)); +} + +const int SIN_TABLE_X16[] = // 91 items +{ + 0, // 0.000000 + 1144, // 0.017452 + 2287, // 0.034899 + 3430, // 0.052336 + 4572, // 0.069756 + 5712, // 0.087156 + 6850, // 0.104528 + 7987, // 0.121869 + 9121, // 0.139173 + 10252, // 0.156434 + 11380, // 0.173648 + 12505, // 0.190809 + 13626, // 0.207912 + 14742, // 0.224951 + 15855, // 0.241922 + 16962, // 0.258819 + 18064, // 0.275637 + 19161, // 0.292372 + 20252, // 0.309017 + 21336, // 0.325568 + 22415, // 0.342020 + 23486, // 0.358368 + 24550, // 0.374607 + 25607, // 0.390731 + 26656, // 0.406737 + 27697, // 0.422618 + 28729, // 0.438371 + 29753, // 0.453990 + 30767, // 0.469472 + 31772, // 0.484810 + 32768, // 0.500000 + 33754, // 0.515038 + 34729, // 0.529919 + 35693, // 0.544639 + 36647, // 0.559193 + 37590, // 0.573576 + 38521, // 0.587785 + 39441, // 0.601815 + 40348, // 0.615661 + 41243, // 0.629320 + 42126, // 0.642788 + 42995, // 0.656059 + 43852, // 0.669131 + 44695, // 0.681998 + 45525, // 0.694658 + 46341, // 0.707107 + 47143, // 0.719340 + 47930, // 0.731354 + 48703, // 0.743145 + 49461, // 0.754710 + 50203, // 0.766044 + 50931, // 0.777146 + 51643, // 0.788011 + 52339, // 0.798636 + 53020, // 0.809017 + 53684, // 0.819152 + 54332, // 0.829038 + 54963, // 0.838671 + 55578, // 0.848048 + 56175, // 0.857167 + 56756, // 0.866025 + 57319, // 0.874620 + 57865, // 0.882948 + 58393, // 0.891007 + 58903, // 0.898794 + 59396, // 0.906308 + 59870, // 0.913545 + 60326, // 0.920505 + 60764, // 0.927184 + 61183, // 0.933580 + 61584, // 0.939693 + 61966, // 0.945519 + 62328, // 0.951057 + 62672, // 0.956305 + 62997, // 0.961262 + 63303, // 0.965926 + 63589, // 0.970296 + 63856, // 0.974370 + 64104, // 0.978148 + 64332, // 0.981627 + 64540, // 0.984808 + 64729, // 0.987688 + 64898, // 0.990268 + 65048, // 0.992546 + 65177, // 0.994522 + 65287, // 0.996195 + 65376, // 0.997564 + 65446, // 0.998630 + 65496, // 0.999391 + 65526, // 0.999848 + 65536 // 1.000000 +}; + +int +SinX16(int degree) +{ + if ((degree %= 360) < 0) + { + degree += 360; + } + + switch (degree / 90) + { + case 0: + return SIN_TABLE_X16[degree]; + case 1: + return SIN_TABLE_X16[180 - degree]; + case 2: + return -SIN_TABLE_X16[degree - 180]; + default: + return -SIN_TABLE_X16[360 - degree]; + } +} + +int +CosX16(int degree) +{ + return SinX16(degree + 90); +} + +} // namespace _RealNumber + + +template +inline T +_Abs(T a) +{ + return (a >= 0) ? a : -a; +} + +template +inline T +_Sign(T a) +{ + return (a >= 0) ? ((a > 0) ? 1 : 0) : -1; +} + +struct _Point +{ + int x; + int y; + + _Point() + : x(0) + , y(0) + { + } + + _Point(int _x, int _y) + : x(_x) + , y(_y) + { + } +}; + +void +_DrawVirtualLineToArray(int x1, int y1, int x2, int y2, long yLineArrayLeft[], long yLineArrayRight[], _Point minPos, + _Point maxPos) +{ + _Point delta(_Abs(x2 - x1), _Abs(y2 - y1)); + _Point increase(_Sign(x2 - x1), _Sign(y2 - y1)); + _Point pos(0, 0); + + int distance = _Util::Max(delta.x, delta.y); + + for (int i = 0; i <= distance; i++) + { + pos.x += delta.x; + pos.y += delta.y; + + if (pos.x > distance) + { + x1 += increase.x; + pos.x -= distance; + } + + if (pos.y > distance) + { + y1 += increase.y; + pos.y -= distance; + } + + if ((y1 < minPos.y) || (y1 > maxPos.y)) + { + continue; + } + + if (x1 < yLineArrayLeft[y1 - minPos.y]) + { + yLineArrayLeft[y1 - minPos.y] = (x1 < minPos.x) ? minPos.x : ((x1 > maxPos.x) ? maxPos.x : x1); + } + + if (x1 > yLineArrayRight[y1 - minPos.y]) + { + yLineArrayRight[y1 - minPos.y] = (x1 > maxPos.x) ? maxPos.x : ((x1 < minPos.x) ? minPos.x : x1); + } + } +} + +template +bool +_RotateImage(_Util::Pixmap& dstImage, long x, long y, const _Util::Pixmap& srcImage, long width, long height, + const _Effect::RotateDesc& rotateDesc, DestPixel opacity, + SourPixel dummy = 0) +{ + _Util::Bounds clipRect = { 0, 0, dstImage.width, dstImage.height }; + + long angle = rotateDesc.angle; + + // 'angle' will be between 1 and 360 + { + angle += 180; + + while (angle < 0) + { + angle += 360; + } + + while (angle >= 360) + { + angle -= 360; + } + + // convert to CCW + angle = 360 - angle; + } + + // the converted angle for the input angle becomes as follows + // + // 0 -> 180 + // 10 -> 170 + // 90 -> 90 + // 100 -> 80 + // 180 -> 360 + // 190 -> 350 + // 270 -> 270 + // 280 -> 260 + + // if (angle == 0) then draw bitmap normally, but... + + _RealDataType sinVal = _RealNumber::Sin(_RealNumber::AssignShift<_RealDataType>(angle)); + _RealDataType cosVal = _RealNumber::Cos(_RealNumber::AssignShift<_RealDataType>(angle)); + + _Point vertex[4]; + + // center -> (x,y) + { + _RealDataType wSinP = sinVal * (-rotateDesc.xOffset); + _RealDataType wCosP = cosVal * (-rotateDesc.xOffset); + _RealDataType hSinP = sinVal * (-rotateDesc.yOffset); + _RealDataType hCosP = cosVal * (-rotateDesc.yOffset); + _RealDataType wSinM = sinVal * (width - rotateDesc.xOffset); + _RealDataType wCosM = cosVal * (width - rotateDesc.xOffset); + _RealDataType hSinM = sinVal * (height - rotateDesc.yOffset); + _RealDataType hCosM = cosVal * (height - rotateDesc.yOffset); + + vertex[0].x = x - _RealNumber::CastInt((wCosM) - (hSinP)); + vertex[1].x = x - _RealNumber::CastInt((wCosP) - (hSinP)); + vertex[2].x = x - _RealNumber::CastInt((wCosM) - (hSinM)); + vertex[3].x = x - _RealNumber::CastInt((wCosP) - (hSinM)); + + vertex[0].y = y - _RealNumber::CastInt((wSinM) + (hCosP)); + vertex[1].y = y - _RealNumber::CastInt((wSinP) + (hCosP)); + vertex[2].y = y - _RealNumber::CastInt((wSinM) + (hCosM)); + vertex[3].y = y - _RealNumber::CastInt((wSinP) + (hCosM)); + + /* meaning of 'vertex', if 'angle' is 180 + + v[1] width v[0] + *---------------* + | | + | . | height + | (x,y) | + | | + *---------------* + v[3] v[2] + + + if 'xOffset' and 'yOffset' are 0, + + v[1] v[0] + *---------------* + |(x,y) | + | | + | | + | | + *---------------* + v[3] v[2] + */ + } + + // find a maximum value and minimum value of rotated image on y-axis + int left = 0; + int right = dstImage.width - 0; + int top = vertex[3].y; + int bottom = vertex[3].y; + + // find a maximum value and minimum value for all vertices + top = _Util::Min(top, vertex[2].y); + bottom = _Util::Max(bottom, vertex[2].y); + top = _Util::Min(top, vertex[1].y); + bottom = _Util::Max(bottom, vertex[1].y); + top = _Util::Min(top, vertex[0].y); + bottom = _Util::Max(bottom, vertex[0].y); + + // apply clipping + top = _Util::Max(top, clipRect.y1); + bottom = _Util::Min(bottom, clipRect.y2 - 0); + + // number of pixels for vertical region + int numVerticalPixel = bottom - top + 1; + + // no need to draw + if (numVerticalPixel <= 0) + { + return true; + } + + 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] Memory allocation failed."); + + // left <- max value of 'x', right <- min value of 'x' + memset(tempRightVertices.get(), 0x80, numVerticalPixel * sizeof(long)); + memset(tempLeftVertices.get(), 0x7F, numVerticalPixel * sizeof(long)); + + // prepare to draw horizontal lines. 4 lines as input + _DrawVirtualLineToArray(vertex[0].x, vertex[0].y, vertex[1].x, vertex[1].y, tempLeftVertices.get(), + tempRightVertices.get(), _Point(left, top), _Point(right, bottom)); + _DrawVirtualLineToArray(vertex[0].x, vertex[0].y, vertex[2].x, vertex[2].y, tempLeftVertices.get(), + tempRightVertices.get(), _Point(left, top), _Point(right, bottom)); + _DrawVirtualLineToArray(vertex[1].x, vertex[1].y, vertex[3].x, vertex[3].y, tempLeftVertices.get(), + tempRightVertices.get(), _Point(left, top), _Point(right, bottom)); + _DrawVirtualLineToArray(vertex[3].x, vertex[3].y, vertex[2].x, vertex[2].y, tempLeftVertices.get(), + tempRightVertices.get(), _Point(left, top), _Point(right, bottom)); + + // memory buffer pointer & pitch of source + SourPixel* pSour = (SourPixel*) (srcImage.pBitmap); + int srcPitch = srcImage.bytesPerLine * 8 / srcImage.depth; + + // memory buffer pointer & pitch of destination + DestPixel* pDest = (DestPixel*) dstImage.pBitmap; + int dstPitch = dstImage.bytesPerLine * 8 / dstImage.depth; + + // scale + _RealDataType xScale = _RealNumber::DivideBig(_RealNumber::AssignShift<_RealDataType>(srcImage.width), _RealNumber::AssignShift<_RealDataType>(width)); + _RealDataType yScale = _RealNumber::DivideBig(_RealNumber::AssignShift<_RealDataType>(srcImage.height), _RealNumber::AssignShift<_RealDataType>(height)); + + // for clippping of source image + int maxSrcWidth = srcImage.width - 1; + int maxSrcHeight = srcImage.height - 1; + + // current position to the set of vertical vertices + long* pLeftVertices = tempLeftVertices.get(); + long* pRightVertices = tempRightVertices.get(); + + // draw horizontal linetop from top to bottom + for (long scanline = top; scanline < bottom; ++scanline) + { + // out-of-clip test of 'y' + if (scanline >= clipRect.y2) + { + break; + } + + // skipping of 'y' for out-of-clip + if (scanline < clipRect.y1) + { + ++pLeftVertices; + ++pRightVertices; + + continue; + } + + long leftVertex = *pLeftVertices++; + long rightVertex = *pRightVertices++; + long distVertex = rightVertex - leftVertex; + + int srcLeftVertexX = _RealNumber::CastInt(-(cosVal * (leftVertex - x)) - (sinVal * (scanline - y))); + int srcLeftVertexY = _RealNumber::CastInt((sinVal * (leftVertex - x)) - (cosVal * (scanline - y))); + + int srcRightVertexX = _RealNumber::CastInt(-(cosVal * (rightVertex - x)) - (sinVal * (scanline - y))); + int srcRightVertexY = _RealNumber::CastInt((sinVal * (rightVertex - x)) - (cosVal * (scanline - y))); + + _Point delta((srcRightVertexX - srcLeftVertexX), (srcRightVertexY - srcLeftVertexY)); + + if (distVertex > 0) + { + int rsx, rsy; + + _RealDataType rdx = delta.x * xScale / distVertex; + _RealDataType rdy = delta.y * yScale / distVertex; + + int pixel = leftVertex - 1; + int count = distVertex; // + 1; + + { + _RealDataType sx = srcLeftVertexX * xScale + _RealNumber::AssignShift<_RealDataType>(rotateDesc.xOffset); + _RealDataType sy = srcLeftVertexY * yScale + _RealNumber::AssignShift<_RealDataType>(rotateDesc.yOffset); + + sx -= rdx; + sy -= rdy; + + if (srcImage.enableColorKey) + { + SourPixel colorKey = (SourPixel) srcImage.colorKey; + + while (count--) + { + pixel++; + + sx += rdx; + sy += rdy; + + // round off + rsx = _RealNumber::CastInt(sx + _RealNumber::Assign<_RealDataType>(0.49f)); + rsy = _RealNumber::CastInt(sy + _RealNumber::Assign<_RealDataType>(0.49f)); + + rsx = _Util::Max(rsx, 0); + rsx = _Util::Min(rsx, maxSrcWidth); + + rsy = _Util::Max(rsy, 0); + rsy = _Util::Min(rsy, maxSrcHeight); + + if (clipRect.IsInsideX(pixel)) + { + if (colorKey != pSour[rsy * srcPitch + rsx]) + { + // pDest[scanline * dstPitch + pixel] = pSour[rsy * srcPitch + rsx]; + pDest[scanline * dstPitch + pixel] = + _Effect::Func::AlphaBlending + (pDest[scanline * dstPitch + pixel] + , pSour[rsy * srcPitch + rsx] + , DestPixel(opacity)); + } + } + } + } + else + { + while (count--) + { + pixel++; + + sx += rdx; + sy += rdy; + + // round off + rsx = _RealNumber::CastInt(sx + _RealNumber::Assign<_RealDataType>(0.49f)); + rsy = _RealNumber::CastInt(sy + _RealNumber::Assign<_RealDataType>(0.49f)); + + rsx = _Util::Max(rsx, 0); + rsx = _Util::Min(rsx, maxSrcWidth); + + rsy = _Util::Max(rsy, 0); + rsy = _Util::Min(rsy, maxSrcHeight); + + if (clipRect.IsInsideX(pixel)) + { + // pDest[scanline * dstPitch + pixel] = pSour[rsy * srcPitch + rsx]; + pDest[scanline * dstPitch + pixel] = + _Effect::Func::AlphaBlending + (pDest[scanline * dstPitch + pixel] + , pSour[rsy * srcPitch + rsx] + , DestPixel(opacity)); + } + } + } + } + } + } + + return true; +} + +//////////////////////////////////////////////////////////////////////////// +// inline wrapper function for VC++ 6.0 compatibility + +inline bool +_RotateImage16bitsFrom16bits(_Util::Pixmap& dstImage, long x, long y, const _Util::Pixmap& srcImage, long width, long height, + const _Effect::RotateDesc& rotateDesc, short constantAlpha) +{ + return _RotateImage (dstImage, x, y, srcImage, width, height, rotateDesc, constantAlpha, 0); +} + +inline bool +_RotateImage16bitsFrom32bits(_Util::Pixmap& dstImage, long x, long y, const _Util::Pixmap& srcImage, long width, long height, + const _Effect::RotateDesc& rotateDesc, short constantAlpha) +{ + return _RotateImage (dstImage, x, y, srcImage, width, height, rotateDesc, constantAlpha, 0); +} + +inline bool +_RotateImage32bitsFrom16bits(_Util::Pixmap& dstImage, long x, long y, const _Util::Pixmap& srcImage, long width, long height, + const _Effect::RotateDesc& rotateDesc, long constantAlpha) +{ + return _RotateImage (dstImage, x, y, srcImage, width, height, rotateDesc, constantAlpha, 0); +} + +inline bool +_RotateImage32bitsFrom32bits(_Util::Pixmap& dstImage, long x, long y, const _Util::Pixmap& srcImage, long width, long height, + const _Effect::RotateDesc& rotateDesc, long constantAlpha) +{ + return _RotateImage (dstImage, x, y, srcImage, width, height, rotateDesc, constantAlpha, 0); +} + +} // namespce + +//////////////////////////////////////////////////////////////////////////////// +// public + +bool +Tizen::Graphics::_Effect::RotateImage(_Util::Pixmap& dstImage, long xDest, long yDest, const _Util::Pixmap& srcImage, + const _Effect::RotateDesc& rotateDesc, + long constantAlpha) +{ + // verifiy the spcified parameters + { + if ((srcImage.width < 0) || (srcImage.height < 0) || (srcImage.pBitmap == null)) + { + return false; + } + + if ((dstImage.width < 0) || (dstImage.height < 0) || (dstImage.pBitmap == null)) + { + return false; + } + + switch (dstImage.depth) + { + case 16: + case 32: + break; + default: + return false; + } + + // no need to draw + if (constantAlpha <= 0) + { + return true; + } + + if (constantAlpha > 255) + { + constantAlpha = 255; + } + + if (srcImage.pBitmap == dstImage.pBitmap) + { + return false; + } + } + + // clipping test + { + if ((srcImage.width == 0) || (srcImage.height == 0)) + { + return true; + } + + if ((dstImage.width == 0) || (dstImage.height == 0)) + { + return true; + } + } + + if (dstImage.depth == 16 && srcImage.depth == 16) + { + return _RotateImage16bitsFrom16bits(dstImage, xDest, yDest, srcImage, srcImage.width, srcImage.height, rotateDesc, + short(constantAlpha)); + } + else if (dstImage.depth == 16 && srcImage.depth == 32) + { + return _RotateImage16bitsFrom32bits(dstImage, xDest, yDest, srcImage, srcImage.width, srcImage.height, rotateDesc, + short(constantAlpha)); + } + else if (dstImage.depth == 32 && srcImage.depth == 16) + { + return _RotateImage32bitsFrom16bits(dstImage, xDest, yDest, srcImage, srcImage.width, srcImage.height, rotateDesc, + constantAlpha); + } + else if (dstImage.depth == 32 && srcImage.depth == 32) + { + return _RotateImage32bitsFrom32bits(dstImage, xDest, yDest, srcImage, srcImage.width, srcImage.height, rotateDesc, + constantAlpha); + } + + // assert(false); + + return false; +} diff --git a/src/graphics/effect/FGrp_EffectScale.cpp b/src/graphics/effect/FGrp_EffectScale.cpp new file mode 100644 index 0000000..70a275b --- /dev/null +++ b/src/graphics/effect/FGrp_EffectScale.cpp @@ -0,0 +1,533 @@ +// +// 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_EffectScale.cpp + * @brief This is the header file for internal utility class. + * + */ + +#include + +#include + +#include "FGrp_EffectFunc.h" +#include "FGrp_Effect.h" +#include "../util/FGrp_Util.h" + +using namespace Tizen::Graphics; + + +namespace // unnamed +{ + +template +class _GenericBufferPixmap + : public _Util::GenericBufferBase +{ +public: + inline _GenericBufferPixmap(const _Util::PixmapBase& buffer, const _Util::Rectangle* pRect) + : _Util::GenericBufferBase () + , __buffer(buffer) + { + this->_pBuffer = (Pixel*) __buffer.pBitmap; + this->_pitch = __buffer.bytesPerLine / sizeof(Pixel); + + if (pRect) + { + this->_padding = this->_pitch - pRect->w; + this->_pBuffer += (this->_pitch * pRect->y + pRect->x); + this->_rect.x = pRect->x; + this->_rect.y = pRect->y; + this->_rect.w = pRect->w; + this->_rect.h = pRect->h; + } + else + { + this->_padding = this->_pitch - __buffer.width; + this->_rect.x = 0; + this->_rect.y = 0; + this->_rect.w = __buffer.width; + this->_rect.h = __buffer.height; + } + } + + inline virtual ~_GenericBufferPixmap(void) + { + } + +private: + const _Util::PixmapBase& __buffer; +}; + +typedef unsigned long FIXED16x16; + +template +bool +_ScaleImageUnclipped(_Util::PixmapBase* pRetImage, _Util::PixmapBase* pSrcImage, Pixel dummy = 0) +{ + if (pRetImage == null || pSrcImage == null) + { + return false; + } + + if ((pSrcImage->width <= 0) || (pSrcImage->height <= 0) + || (pRetImage->width <= 0) || (pRetImage->height <= 0)) + { + return true; + } + + _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] Memory allocation failed."); + + FIXED16x16 xSour = 0; + FIXED16x16 ySour = 0; + FIXED16x16 wScale = FIXED16x16(srcBuffer.GetWidth() * 0x10000 / dstBuffer.GetWidth()); + FIXED16x16 hScale = FIXED16x16(srcBuffer.GetHeight() * 0x10000 / dstBuffer.GetHeight()); + FIXED16x16 temp; + + Pixel* pSour; + Pixel* pDest = dstBuffer.GetBufferAddr(); + + int wCopy; + int hCopy = dstBuffer.GetHeight(); + + while (--hCopy >= 0) + { + xSour = 0; + pSour = srcBuffer.GetBufferAddr() + int(ySour >> 16) * srcBuffer.GetPitch(); + wCopy = dstBuffer.GetWidth(); + + while (--wCopy >= 0) + { + *pDest++ = *pSour; + + temp = xSour; + xSour += wScale; + pSour += (int(xSour >> 16) - int(temp >> 16)); + } + + pDest += dstBuffer.GetPadding(); + ySour += hScale; + } + + return true; +} + +template +bool +_ScaleImageCopyClipped(_Util::PixmapBase* pRetImage, _Util::PixmapBase* pSrcImage, const _Util::Rectangle& validRect, + DestPixel dummy1 = 0, + SourPixel dummy2 = 0) +{ + if (pRetImage == null || pSrcImage == null) + { + return false; + } + + if ((pSrcImage->width <= 0) || (pSrcImage->height <= 0) + || (pRetImage->width <= 0) || (pRetImage->height <= 0)) + { + return true; + } + + _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] Memory allocation failed."); + + FIXED16x16 xSour = 0; + FIXED16x16 ySour = 0; + FIXED16x16 wScale = FIXED16x16(srcBuffer.GetWidth() * 0x10000 / dstBuffer.GetWidth()); + FIXED16x16 hScale = FIXED16x16(srcBuffer.GetHeight() * 0x10000 / dstBuffer.GetHeight()); + FIXED16x16 temp; + + SourPixel* pSour; + DestPixel* pDest = dstBuffer.GetBufferAddr(); + + int wCopy = validRect.x + validRect.w; + int hCopy = validRect.y + validRect.h; + + for (int yDest = 0; yDest < hCopy; ++yDest) + { + if (yDest < validRect.y) + { + int jump = (validRect.y - yDest); + + pDest += (dstBuffer.GetPitch() * jump); + ySour += (hScale * jump); + yDest = validRect.y; + } + + xSour = 0; + pSour = srcBuffer.GetBufferAddr() + int(ySour >> 16) * srcBuffer.GetPitch(); + + { + int jump = validRect.x; + + pDest += jump; + xSour += (wScale * jump); + pSour += (int(xSour >> 16)); + } + + if (!pSrcImage->enableColorKey) + { + for (int xDest = validRect.x; xDest < wCopy; xDest++) + { + _Effect::Func::ConvertColorFormatFast (pDest, pSour); + ++pDest; + + temp = xSour; + xSour += wScale; + pSour += (int(xSour >> 16) - int(temp >> 16)); + } + } + else + { + SourPixel colorKey = (SourPixel) pSrcImage->colorKey; + + for (int xDest = validRect.x; xDest < wCopy; xDest++) + { + if (*pSour != colorKey) + { + _Effect::Func::ConvertColorFormatFast (pDest, pSour); + } + + ++pDest; + + temp = xSour; + xSour += wScale; + pSour += (int(xSour >> 16) - int(temp >> 16)); + } + } + + pDest += (dstBuffer.GetWidth() - wCopy); + pDest += dstBuffer.GetPadding(); + + ySour += hScale; + } + + return true; +} + +template +bool +_ScaleImageClipped(_Util::PixmapBase* pRetImage, _Util::PixmapBase* pSrcImage, const _Util::Rectangle& validRect, + DestPixel dummy1 = 0, SourPixel dummy2 = 0) +{ + if (pRetImage == null || pSrcImage == null) + { + return false; + } + + if ((pSrcImage->width <= 0) || (pSrcImage->height <= 0) + || (pRetImage->width <= 0) || (pRetImage->height <= 0)) + { + return true; + } + + _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] Memory allocation failed."); + + FIXED16x16 xSour = 0; + FIXED16x16 ySour = 0; + FIXED16x16 wScale = FIXED16x16(srcBuffer.GetWidth() * 0x10000 / dstBuffer.GetWidth()); + FIXED16x16 hScale = FIXED16x16(srcBuffer.GetHeight() * 0x10000 / dstBuffer.GetHeight()); + FIXED16x16 temp; + + SourPixel* pSour = 0; + DestPixel* pDest = dstBuffer.GetBufferAddr(); + + int wCopy = validRect.x + validRect.w; + int hCopy = validRect.y + validRect.h; + + for (int yDest = 0; yDest < hCopy; ++yDest) + { + if (yDest < validRect.y) + { + int jump = (validRect.y - yDest); + + pDest += (dstBuffer.GetPitch() * jump); + ySour += (hScale * jump); + yDest = validRect.y; + } + + xSour = 0; + pSour = srcBuffer.GetBufferAddr() + int(ySour >> 16) * srcBuffer.GetPitch(); + + { + int jump = validRect.x; + + pDest += jump; + xSour += (wScale * jump); + pSour += (int(xSour >> 16)); + } + + if (!pSrcImage->enableColorKey) + { + for (int xDest = validRect.x; xDest < wCopy; xDest++) + { + // _Effect::Func::ConvertColorFormatFast(pDest, pSour); + *pDest = _Effect::Func::AlphaBlendingFast (*pDest, *pSour); + ++pDest; + + temp = xSour; + xSour += wScale; + pSour += (int(xSour >> 16) - int(temp >> 16)); + } + } + else + { + SourPixel colorKey = (SourPixel) pSrcImage->colorKey; + + for (int xDest = validRect.x; xDest < wCopy; xDest++) + { + if (*pSour != colorKey) + { + *pDest = _Effect::Func::AlphaBlendingFast (*pDest, *pSour); + } + + ++pDest; + + temp = xSour; + xSour += wScale; + pSour += (int(xSour >> 16) - int(temp >> 16)); + } + } + + pDest += (dstBuffer.GetWidth() - wCopy); + pDest += dstBuffer.GetPadding(); + + ySour += hScale; + } + + return true; +} + +bool +_ScaleImage(const _Util::Pixmap& retImage, long xDest, long yDest, long wDest, long hDest, const _Util::Pixmap& srcImage, + _Effect::Rop rop) +{ + _Util::Rectangle outRect = {0, 0, -1, -1}; + + { + _Util::Rectangle dstRect = { 0, 0, retImage.width, retImage.height }; + _Util::Rectangle tgtRect = { xDest, yDest, wDest, hDest }; + +#if 0 + { + bool hasRegion = IntersectRect(outRect, tgtRect, dstRect); + + SM_ASSERT(hasRegion); + } +#else + IntersectRect(outRect, tgtRect, dstRect); +#endif + + // workaround 2010/3/6 + // variable: bool isUnclipped = false; + // isUnclipped = (tgtRect == outRect); + } + + { +#if 0 // isUnclipped is always false + if (isUnclipped) + { + _Util::PixmapBase dstImage = retImage.GetSubBitmap(xDest, yDest, wDest, hDest); + + switch (retImage.depth) + { + case 32: + return _ScaleImageUnclipped ((_Util::PixmapBase*) &dstImage, (_Util::PixmapBase*) &srcImage); + + case 16: + return _ScaleImageUnclipped ((_Util::PixmapBase*) &dstImage, (_Util::PixmapBase*) &srcImage); + + default: + return false; + } + } + else +#endif + { + _Util::PixmapBase dstImage = retImage.GetSubBitmapUnsafe(xDest, yDest, wDest, hDest); + _Util::Rectangle validRect = outRect; + + validRect.x -= xDest; + validRect.y -= yDest; + + switch (rop) + { + case Tizen::Graphics::_Effect::ROP_COPY: + switch (retImage.depth) + { + case 32: + if (srcImage.depth == 32) + { + return _ScaleImageCopyClipped ((_Util::PixmapBase*) &dstImage, + (_Util::PixmapBase*) &srcImage, validRect, + (unsigned long) 0, (unsigned long) 0); + } + else if (srcImage.depth == 16) + { + return _ScaleImageCopyClipped ((_Util::PixmapBase*) &dstImage, + (_Util::PixmapBase*) &srcImage, validRect, + (unsigned long) 0, (unsigned short) 0); + } + else + { + return false; + } + case 16: + if (srcImage.depth == 32) + { + return _ScaleImageCopyClipped ((_Util::PixmapBase*) &dstImage, + (_Util::PixmapBase*) &srcImage, validRect, + (unsigned short) 0, (unsigned long) 0); + } + else if (srcImage.depth == 16) + { + return _ScaleImageCopyClipped ((_Util::PixmapBase*) &dstImage, + (_Util::PixmapBase*) &srcImage, validRect, + (unsigned short) 0, (unsigned short) 0); + } + else + { + return false; + } + default: + return false; + } + break; + case Tizen::Graphics::_Effect::ROP_ALPHABLEND: + switch (retImage.depth) + { + case 32: + if (srcImage.depth == 32) + { + return _ScaleImageClipped ((_Util::PixmapBase*) &dstImage, + (_Util::PixmapBase*) &srcImage, validRect, + (unsigned long) 0, (unsigned long) 0); + } + else if (srcImage.depth == 16) + { + return _ScaleImageClipped ((_Util::PixmapBase*) &dstImage, + (_Util::PixmapBase*) &srcImage, validRect, + (unsigned long) 0, (unsigned short) 0); + } + else + { + return false; + } + case 16: + if (srcImage.depth == 32) + { + return _ScaleImageClipped ((_Util::PixmapBase*) &dstImage, + (_Util::PixmapBase*) &srcImage, validRect, + (unsigned short) 0, (unsigned long) 0); + } + else if (srcImage.depth == 16) + { + return _ScaleImageClipped ((_Util::PixmapBase*) &dstImage, + (_Util::PixmapBase*) &srcImage, validRect, + (unsigned short) 0, (unsigned short) 0); + } + else + { + return false; + } + default: + return false; + } + break; + default: + return false; + } + } + } +} + +} + + +bool +Tizen::Graphics::_Effect::ScaleImage(_Util::Pixmap& dstImage, long xDest, long yDest, long wDest, long hDest, + const _Util::Pixmap& srcImage, + Rop rop) +{ + // verifiy the spcified parameters + { + if ((srcImage.width < 0) || (srcImage.height < 0) || (srcImage.pBitmap == null)) + { + return false; + } + + if ((dstImage.width < 0) || (dstImage.height < 0) || (dstImage.pBitmap == null)) + { + return false; + } + + if ((wDest < 0) || (hDest < 0)) + { + return false; + } + + if (srcImage.pBitmap == dstImage.pBitmap) + { + return false; + } + + if (!(rop == ROP_COPY || rop == ROP_ALPHABLEND)) + { + return false; + } + } + + { + if ((srcImage.width == 0) || (srcImage.height == 0)) + { + return true; + } + + if ((dstImage.width == 0) || (dstImage.height == 0)) + { + return true; + } + + if ((wDest == 0) || (hDest == 0)) + { + return true; + } + + { + _Util::Rectangle dstRect = { 0, 0, dstImage.width, dstImage.height }; + _Util::Rectangle tgtRect = { xDest, yDest, wDest, hDest }; + _Util::Rectangle outRect; + + if (!IntersectRect(outRect, tgtRect, dstRect)) + { + return true; + } + } + } + + return _ScaleImage(dstImage, xDest, yDest, wDest, hDest, srcImage, rop); +} diff --git a/src/graphics/effect/FGrp_EffectScale2.cpp b/src/graphics/effect/FGrp_EffectScale2.cpp new file mode 100644 index 0000000..3fc030c --- /dev/null +++ b/src/graphics/effect/FGrp_EffectScale2.cpp @@ -0,0 +1,1268 @@ +// +// 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_EffectScale2.cpp + * @brief This is the header file for internal utility class. + * + */ + +#include + +#include "FGrp_Effect.h" + + +namespace // unnamed +{ + +int +_Ceil(float x) +{ + int ix = int(x); + + if (x >= 0) + { + return (x - float(ix)) > 0 ? ix + 1 : ix; + } + else + { + return ix; + } +} + +int +_Floor(float x) +{ + int ix = int(x); + + if (x >= 0) + { + return ix; + } + else + { + return (float(ix) - x) > 0 ? ix - 1 : ix; + } +} + +struct _Rectangle +{ + int x; + int y; + int w; + int h; +}; + +inline bool +operator ==(const _Rectangle& lhs, const _Rectangle& rhs) +{ + return (lhs.x == rhs.x) && (lhs.y == rhs.y) && (lhs.w == rhs.w) && (lhs.h == rhs.h); +} + +struct _BufferDesc +{ + int width; // width of image + int height; // height of image + int bytesPerLine; // bytes per line + int depth; // pixel depth of buffer + unsigned char* pBitmap; // start pointer to buffer + mutable long reserved; // do you have ownership? +}; + +struct BufferDescUtil + : public _BufferDesc +{ + BufferDescUtil(int width, int height, int depth, void* pBitmap, int bytesPerLine = 0) + { + this->width = width; + this->height = height; + this->depth = depth; + this->bytesPerLine = bytesPerLine, + this->pBitmap = (unsigned char*) pBitmap; + this->reserved = 0; + + if (bytesPerLine == 0) + { + this->bytesPerLine = width * depth / 8; + } + } + + ~BufferDescUtil(void) + { + // if 'reserved' is not 0, buffer is released automatically + if (reserved) + { + delete[] pBitmap; + } + } + + _BufferDesc GetSubBitmapUnsafe(long x, long y, long w, long h) const + { + _BufferDesc retImage((_BufferDesc&) *this); + ((_BufferDesc*) this)->reserved = retImage.reserved; + retImage.reserved = 0; + + retImage.pBitmap += retImage.bytesPerLine * y + x * depth / 8; + retImage.width = w; + retImage.height = h; + + return retImage; + } + +private: + BufferDescUtil(const BufferDescUtil& rhs); + BufferDescUtil& operator=(const BufferDescUtil& rhs); + +}; + +template +inline DstIter +_Copy(SrcIter pFirst, SrcIter pLast, DstIter pTarget) +{ + for ( ; pFirst != pLast; ++pTarget, ++pFirst) + { + *pTarget = *pFirst; + } + + return pTarget; +} + +template +class _SmartArray +{ +public: + explicit _SmartArray(unsigned char* pBuffer = 0) + : __hasOwnership(pBuffer != 0) + , __pPtr((BaseType*)pBuffer) + { + } + + ~_SmartArray() + { + if (__hasOwnership) + { + delete[] (unsigned char*) __pPtr; + } + } + + BaseType& operator [](unsigned int index) const + { + return __pPtr[index]; + } + + void Bind(unsigned char* pBuffer) + { + if (__pPtr == 0) + { + __hasOwnership = (pBuffer != 0); + __pPtr = (BaseType*) pBuffer; + } + } + + BaseType* Get() const + { + return __pPtr; + } + + BaseType* Release() const + { + ((_SmartArray *) this)->__hasOwnership = false; + + return __pPtr; + } + +private: + bool __hasOwnership; + BaseType* __pPtr; + +}; // _SmartArray + +} + + +namespace Tizen { namespace Graphics +{ + +namespace _Effect +{ + +namespace Interpolation +{ + +namespace // unnamed +{ + const float CONST_2_0 = 2.0f; + const float CONST_1_5 = 1.5f; + const float CONST_1_0 = 1.0f; + const float CONST_0_75 = 0.75f; + const float CONST_0_5 = 0.5f; + const float CONST_0_0 = 0.0f; + const float CONST_MINUS_0_5 = -0.5f; + const float CONST_MINUS_1_0 = -1.0f; + + inline static float + MakeConst(float i) + { + return float(i); + } + + // memory allocation as a byte array + static inline unsigned char* + AllocMem(size_t size) + { + return new (std::nothrow) unsigned char[size]; + } +} + +enum Filter +{ + FILTER_BOX, + FILTER_TRIANGLE, + FILTER_BICUBIC, + FILTER_BELL, + FILTER_BSPLINE, + FILTER_MITCHELL +}; + +const Filter FILTER_GOOD = FILTER_BICUBIC; +const Filter FILTER_BEST = FILTER_MITCHELL; + +// offset of the color component as the applied endian +enum +{ +#if defined(BIG_ENDIAN) + OFFSET_ALPHA = 0, + OFFSET_RED = 1, + OFFSET_GREEN = 2, + OFFSET_BLUE = 3, +#else + OFFSET_ALPHA = 3, + OFFSET_RED = 2, + OFFSET_GREEN = 1, + OFFSET_BLUE = 0, +#endif + OFFSET_STRIDE = 4 +}; + +//////////////////////////////////////////////////////////////////////////// +// ScaleImageDesc<> + +template +struct ScaleImageDesc +{ + ScaleImageDesc(long x, long y, long bytesPerLine, Pixel* pData); + inline unsigned char GetPixel(long x, long y) const; + inline void PutPixel(long x, long y, unsigned char pixel); + + long xSize; + long ySize; + unsigned char* pData; + long span; + long shift; +}; + +//////////////////////////////////////////////////////////////////////////// +// ScaleImageDesc + +// OFFSET_RED +template <> +ScaleImageDesc::ScaleImageDesc(long x, long y, long bytesPerLine, unsigned long* pData) + : xSize(x) + , ySize(y) + , pData((unsigned char*)pData + OFFSET_RED) + , span(bytesPerLine) + , shift(0) +{ +} + +template <> +inline unsigned char +ScaleImageDesc::GetPixel(long x, long y) const +{ + return pData[y * span + x * OFFSET_STRIDE]; +} + +template <> +inline void +ScaleImageDesc::PutPixel(long x, long y, unsigned char pixel) +{ + pData[y * span + x * OFFSET_STRIDE] = pixel; +} + +// OFFSET_GREEN +template <> +ScaleImageDesc::ScaleImageDesc(long x, long y, long bytesPerLine, unsigned long* pData) + : xSize(x) + , ySize(y) + , pData((unsigned char*)pData + OFFSET_GREEN) + , span(bytesPerLine) + , shift(0) +{ +} + +template <> +inline unsigned char +ScaleImageDesc::GetPixel(long x, long y) const +{ + return pData[y * span + x * OFFSET_STRIDE]; +} + +template <> +inline void +ScaleImageDesc::PutPixel(long x, long y, unsigned char pixel) +{ + pData[y * span + x * OFFSET_STRIDE] = pixel; +} + +// OFFSET_BLUE +template <> +ScaleImageDesc::ScaleImageDesc(long x, long y, long bytesPerLine, unsigned long* pData) + : xSize(x) + , ySize(y) + , pData((unsigned char*)pData + OFFSET_BLUE) + , span(bytesPerLine) + , shift(0) +{ +} + +template <> +inline unsigned char +ScaleImageDesc::GetPixel(long x, long y) const +{ + return pData[y * span + x * OFFSET_STRIDE]; +} + +template <> +inline void +ScaleImageDesc::PutPixel(long x, long y, unsigned char pixel) +{ + pData[y * span + x * OFFSET_STRIDE] = pixel; +} + +// OFFSET_ALPHA +template <> +ScaleImageDesc::ScaleImageDesc(long x, long y, long bytesPerLine, unsigned long* pData) + : xSize(x) + , ySize(y) + , pData((unsigned char*)pData + OFFSET_ALPHA) + , span(bytesPerLine) + , shift(0) +{ +} + +template <> +inline unsigned char +ScaleImageDesc::GetPixel(long x, long y) const +{ + return pData[y * span + x * OFFSET_STRIDE]; +} + +template <> +inline void +ScaleImageDesc::PutPixel(long x, long y, unsigned char pixel) +{ + pData[y * span + x * OFFSET_STRIDE] = pixel; +} + +//////////////////////////////////////////////////////////////////////////// +// ScaleImageDesc + +// OFFSET_RED +template <> +ScaleImageDesc::ScaleImageDesc(long x, long y, long bytesPerLine, unsigned short* pData) + : xSize(x) + , ySize(y) + , pData((unsigned char*)pData) + , span(bytesPerLine) + , shift(0) +{ +} + +template <> +inline unsigned char +ScaleImageDesc::GetPixel(long x, long y) const +{ + return (*((unsigned short*)&pData[y * span + x * 2]) >> 11) & 0x001F; +} + +template <> +inline void +ScaleImageDesc::PutPixel(long x, long y, unsigned char pixel) +{ + unsigned short* pBuf = (unsigned short*)&pData[y * span + x * 2]; + unsigned short color = (unsigned short)((pixel > 0x001F) ? 0x001F : pixel); + *pBuf = (*pBuf & ~0xF800) | ((color << 11) & 0xF800); +} + +// OFFSET_GREEN +template <> +ScaleImageDesc::ScaleImageDesc(long x, long y, long bytesPerLine, unsigned short* pData) + : xSize(x) + , ySize(y) + , pData((unsigned char*)pData) + , span(bytesPerLine) + , shift(0) +{ +} + +template <> +inline unsigned char +ScaleImageDesc::GetPixel(long x, long y) const +{ + return (*((unsigned short*)&pData[y * span + x * 2]) >> 5) & 0x003F; +} + +template <> +inline void +ScaleImageDesc::PutPixel(long x, long y, unsigned char pixel) +{ + unsigned short* pBuf = (unsigned short*)&pData[y * span + x * 2]; + unsigned short color = (unsigned short)((pixel > 0x003F) ? 0x003F : pixel); + *pBuf = (*pBuf & ~0x07E0) | ((color << 5) & 0x07E0); +} + +// OFFSET_BLUE +template <> +ScaleImageDesc::ScaleImageDesc(long x, long y, long bytesPerLine, unsigned short* pData) + : xSize(x) + , ySize(y) + , pData((unsigned char*)pData) + , span(bytesPerLine) + , shift(0) +{ +} + +template <> +inline unsigned char +ScaleImageDesc::GetPixel(long x, long y) const +{ + return (*((unsigned short*)&pData[y * span + x * 2])) & 0x001F; +} + +template <> +inline void +ScaleImageDesc::PutPixel(long x, long y, unsigned char pixel) +{ + unsigned short* pBuf = (unsigned short*)&pData[y * span + x * 2]; + unsigned short color = (unsigned short)((pixel > 0x001F) ? 0x001F : pixel); + *pBuf = (*pBuf & ~0x001F) | (color & 0x001F); +} + +// OFFSET_ALPHA +template <> +ScaleImageDesc::ScaleImageDesc(long x, long y, long bytesPerLine, unsigned short* pData) + : xSize(x) + , ySize(y) + , pData((unsigned char*)pData) + , span(bytesPerLine) + , shift(0) +{ +} + +template <> +inline unsigned char +ScaleImageDesc::GetPixel(long x, long y) const +{ + return 0; +} + +template <> +inline void +ScaleImageDesc::PutPixel(long x, long y, unsigned char pixel) +{ +} + +//////////////////////////////////////////////////////////////////////////// +// FilterDesc + +template +struct FilterDesc +{ + inline static float Apply(float t); + inline static float Width(void); +}; + +//////////////////////////////////// +// FilterDesc - FILTER_BOX + +// rectangle filter +template <> +struct FilterDesc +{ + inline static float Apply(float t) + { + return ((t > CONST_MINUS_0_5) && t <= CONST_0_5) ? CONST_1_0 : CONST_0_0; + } + + inline static float Width(void) + { + return CONST_0_5; + } +}; + +//////////////////////////////////// +// FilterDesc - FILTER_TRIANGLE + +// triangle filter +template <> +struct FilterDesc +{ + inline static float Apply(float t) + { + t = (t >= CONST_0_0) ? t : -t; + return (t < CONST_1_0) ? (float(CONST_1_0) - t) : CONST_0_0; + } + + inline static float Width(void) + { + return CONST_1_0; + } +}; + +//////////////////////////////////// +// FilterDesc - FILTER_BICUBIC + +// cubic curve +template <> +struct FilterDesc +{ + inline static float Apply(float t) + { + t = (t >= CONST_0_0) ? t : -t; + return (t < CONST_1_0) ? float((t * CONST_2_0 - MakeConst(3)) * t * t + CONST_1_0) : CONST_0_0; + } + + inline static float Width(void) + { + return CONST_1_0; + } +}; + +//////////////////////////////////// +// FilterDesc - FILTER_BELL + +// bell curve, normal curve alike +template <> +struct FilterDesc +{ + inline static float Apply(float t) + { + // box (*) box (*) box + t = (t >= CONST_0_0) ? t : -t; + + if (t < CONST_0_5) + { + return float(CONST_0_75 - (t * t)); + } + + if (t < CONST_1_5) + { + t -= CONST_1_5; + return float((t * t) * CONST_0_5); + } + + return CONST_0_0; + } + + inline static float Width(void) + { + return CONST_1_5; + } +}; + +//////////////////////////////////// +// FilterDesc - FILTER_BSPLINE + +// B-Spline interpolation, blurred +template <> +struct FilterDesc +{ + inline static float Apply(float t) + { + // box (*) box (*) box (*) box + t = (t >= CONST_0_0) ? t : -t; + + if (t < CONST_1_0) + { + float tt = t * t; + return float((tt * t * CONST_0_5) - tt + (float(CONST_2_0) / MakeConst(3))); + } + + if (t < CONST_2_0) + { + t = CONST_2_0 - t; + return float((float(CONST_1_0) / MakeConst(6)) * (t * t * t)); + } + + return CONST_0_0; + } + + inline static float Width(void) + { + return CONST_2_0; + } +}; + +//////////////////////////////////// +// FilterDesc - FILTER_MITCHELL + +// interpolation + high-pass filter +template <> +struct FilterDesc +{ + inline static float Apply(float t) + { + const float b = float(CONST_1_0) / float(MakeConst(3)); + const float c = float(CONST_1_0) / float(MakeConst(3)); + + float tt = t * t; + + t = (t >= CONST_0_0) ? t : -t; + + if (t < CONST_1_0) + { + t = float(((MakeConst(12) - b * MakeConst(9) - c * MakeConst(6)) * (t * tt))+((b * MakeConst(12) + c * MakeConst(6) - MakeConst(18)) * tt) + (MakeConst(6) - b * CONST_2_0)); + return float(t / MakeConst(6)); + } + + if (t < CONST_2_0) + { + t = float(((b * CONST_MINUS_1_0 - c * MakeConst(6)) * (t * tt)) + ((b * MakeConst(6) + c * MakeConst(30)) * tt) + ((b * MakeConst(-12) - c * MakeConst(48)) * t) + (b * MakeConst(8) + c * MakeConst(24))); + return float(t / MakeConst(6)); + } + + return CONST_0_0; + } + + inline static float Width(void) + { + return CONST_2_0; + } +}; + +//////////////////////////////////////////////////////////////////////////// +// struct ScaleArray + +// store pixel values and filtered weights +struct ScaleArray +{ + ScaleArray() + : pArray(0) + , total(0) + { + } + + struct Element + { + int pixel; + float weight; + }* pArray; + + int total; + + enum + { + ELEMENT_SIZE = sizeof(Element) + }; + + // store pixel value and weight + inline void Push(int x, int max, float weight) + { + if (x < 0) + { + x = -x - 1; + } + + pArray[total].pixel = (x < max) ? x : max - 1 - x % max; + pArray[total].weight = weight; + total++; + } + + // up-scaling + template + inline void FillToExpand(int center, int xSize) + { + total = 0; + + int left = (int)_Ceil(float(center) - FilterDesc::Width()); + int right = (int)_Floor(float(center) + FilterDesc::Width()); + + for (int j = left; j <= right; ++j) + { + Push(j, xSize, FilterDesc::Apply(float(center) - float(j))); + } + } + + // down-scaling + template + inline void FillToShrink(int center, int xSize, float Width, float scale) + { + total = 0; + + int left = (int)_Ceil(float(center) - Width); + int right = (int)_Floor(float(center) + Width); + + for (int j = left; j <= right; ++j) + { + Push(j, xSize, FilterDesc::Apply((float(center) - float(j)) / scale) / scale); + } + } +}; + +// normalize as interger(0~255) from thw weight as float +inline unsigned char +PixelOfWeight(float weight) +{ + if (weight <= CONST_0_0) + { + return 0; + } + + int p = (int)weight; + + if (weight - float(p) >= CONST_0_5) + { + p++; + } + + return (p >= 255) ? 255 : (unsigned char)p; +} + +template +bool +ScaleImage(_BufferDesc* pDstImage, long wDest, int hDest, _BufferDesc* pSrcImage, const _Rectangle& validRect) +{ + bool result = false; + + Pixel* pSrcBuffer = (Pixel*)pSrcImage->pBitmap; + Pixel* pDstBuffer = 0; + + long xSrcSize = pSrcImage->width; + long ySrcSize = pSrcImage->height; + + _SmartArray localArray; + _SmartArray arrayMem; + + // store pre-calculated pixel index and weight for all columns + _SmartArray ypwArrays(AllocMem(hDest * sizeof(ScaleArray))); + + if (ypwArrays.Get() == 0) + { + return false; + } + + ScaleArray* pYpwArraysEnd = ypwArrays.Get() + hDest; + + if (hDest < ySrcSize) + { + // in case of shrinking for the y axis + float width = float(ySrcSize) * FilterDesc::Width() / float(hDest); + float scalingRatio = float(ySrcSize) / float(hDest); + size_t pwaSize = (size_t)float(width * CONST_2_0 + CONST_1_0); + + localArray.Bind(AllocMem(pwaSize * ScaleArray::ELEMENT_SIZE * hDest)); + + if (localArray.Get() == 0) + { + return false; + } + + ScaleArray::Element* pArray = localArray.Get(); + + for (int yDst = 0; yDst < hDest; ++yDst) + { + ypwArrays[yDst].pArray = pArray; + pArray += pwaSize; + ypwArrays[yDst].FillToShrink(yDst * ySrcSize / hDest, ySrcSize, width, scalingRatio); + } + } + else + { + // in case of expanding for the y axis + size_t pwaSize = size_t(FilterDesc::Width() * CONST_2_0 + CONST_1_0); + + localArray.Bind(AllocMem(pwaSize * ScaleArray::ELEMENT_SIZE * hDest)); + + if (localArray.Get() == 0) + { + return false; + } + + ScaleArray::Element* pArray = localArray.Get(); + + for (int yDst = 0; yDst < hDest; ++yDst) + { + ypwArrays[yDst].pArray = pArray; + pArray += pwaSize; + ypwArrays[yDst].FillToExpand(yDst * ySrcSize / hDest, ySrcSize); + } + } + + // allocate the pixel weight array within the one row + ScaleArray xpwArray; + float width = float(xSrcSize) * FilterDesc::Width() / float(wDest); + float scalingRatio = float(xSrcSize) / float(wDest); + bool xShrink = (wDest < xSrcSize); + + if (xShrink) + { + // in case of shrinking for the x axis + arrayMem.Bind(AllocMem((size_t)(width * CONST_2_0 + CONST_1_0) * ScaleArray::ELEMENT_SIZE)); + } + else + { + // in case of expanding for the x axis + arrayMem.Bind(AllocMem((size_t)(FilterDesc::Width() * CONST_2_0 + CONST_1_0) * ScaleArray::ELEMENT_SIZE)); + } + + if (arrayMem.Get() == 0) + { + return false; + } + + xpwArray.pArray = arrayMem.Get(); + + // allocate memory for each color component + _SmartArray column(AllocMem(4 * ySrcSize * sizeof(unsigned char))); + + if (column.Get() == 0) + { + return false; + } + + unsigned char* pColumnA = column.Get(); + unsigned char* pColumnR = pColumnA + ySrcSize; + unsigned char* pColumnG = pColumnR + ySrcSize; + unsigned char* pColumnB = pColumnG + ySrcSize; + + // divide color components for the source + ScaleImageDesc aSrc(xSrcSize, ySrcSize, pSrcImage->bytesPerLine, pSrcBuffer); + ScaleImageDesc rSrc(xSrcSize, ySrcSize, pSrcImage->bytesPerLine, pSrcBuffer); + ScaleImageDesc gSrc(xSrcSize, ySrcSize, pSrcImage->bytesPerLine, pSrcBuffer); + ScaleImageDesc bSrc(xSrcSize, ySrcSize, pSrcImage->bytesPerLine, pSrcBuffer); + + { + pDstBuffer = (Pixel*)pDstImage->pBitmap; + + // divide color components for the destination + ScaleImageDesc aDst(wDest, hDest, pDstImage->bytesPerLine, pDstBuffer); + ScaleImageDesc rDst(wDest, hDest, pDstImage->bytesPerLine, pDstBuffer); + ScaleImageDesc gDst(wDest, hDest, pDstImage->bytesPerLine, pDstBuffer); + ScaleImageDesc bDst(wDest, hDest, pDstImage->bytesPerLine, pDstBuffer); + + // interpolation + for (int xDst = 0; xDst < wDest; ++xDst) + { + if ((xDst < validRect.x) || (xDst >= validRect.x + validRect.w)) + { + continue; + } + + // calculate weight for one color component column + if (xShrink) + { + xpwArray.FillToShrink(xDst * xSrcSize / wDest, xSrcSize, width, scalingRatio); + } + else + { + xpwArray.FillToExpand(xDst * xSrcSize / wDest, xSrcSize); + } + + ScaleArray::Element* pXaEnd = xpwArray.pArray + xpwArray.total; // total is known at this line + + int pixel; + float weight; + + // Apply horiz FilterDesc to make rDst column in pColumnR + for (int ySrc = 0; ySrc < ySrcSize; ++ySrc) + { + pixel = xpwArray.pArray->pixel; + weight = xpwArray.pArray->weight; + + bool aPixelsSame = true; + bool rPixelsSame = true; + bool gPixelsSame = true; + bool bPixelsSame = true; + + unsigned char a = aSrc.GetPixel(pixel, ySrc); + unsigned char r = rSrc.GetPixel(pixel, ySrc); + unsigned char g = gSrc.GetPixel(pixel, ySrc); + unsigned char b = bSrc.GetPixel(pixel, ySrc); + + float aWeight = float(a) * weight; + float rWeight = float(r) * weight; + float gWeight = float(g) * weight; + float bWeight = float(b) * weight; + + for (ScaleArray::Element* pXa = xpwArray.pArray + 1; pXa < pXaEnd; ++pXa) + { + pixel = pXa->pixel; + weight = pXa->weight; + + unsigned char a2 = aSrc.GetPixel(pixel, ySrc); + unsigned char r2 = rSrc.GetPixel(pixel, ySrc); + unsigned char g2 = gSrc.GetPixel(pixel, ySrc); + unsigned char b2 = bSrc.GetPixel(pixel, ySrc); + + aPixelsSame &= (a2 == a); + rPixelsSame &= (r2 == r); + gPixelsSame &= (g2 == g); + bPixelsSame &= (b2 == b); + + aWeight += float(a2) * weight; + rWeight += float(r2) * weight; + gWeight += float(g2) * weight; + bWeight += float(b2) * weight; + } + + pColumnA[ySrc] = aPixelsSame ? a : PixelOfWeight(aWeight); + pColumnR[ySrc] = rPixelsSame ? r : PixelOfWeight(rWeight); + pColumnG[ySrc] = gPixelsSame ? g : PixelOfWeight(gWeight); + pColumnB[ySrc] = bPixelsSame ? b : PixelOfWeight(bWeight); + } + + // The temp column has been built. Now stretch it vertically into xDst column + for (ScaleArray* pYpwArray = ypwArrays.Get(); pYpwArray < pYpwArraysEnd; ++pYpwArray) + { + int yDst = (int)(pYpwArray - ypwArrays.Get()); + + if ((yDst < validRect.y) || (yDst >= validRect.y + validRect.h)) + { + continue; + } + + ScaleArray::Element* pYa = pYpwArray->pArray; + ScaleArray::Element* pYaEnd = pYa + pYpwArray->total; + + pixel = pYa->pixel; + weight = pYa->weight; + + bool aPixelsSame = true; + bool rPixelsSame = true; + bool gPixelsSame = true; + bool bPixelsSame = true; + + unsigned char a = pColumnA[pixel]; + unsigned char r = pColumnR[pixel]; + unsigned char g = pColumnG[pixel]; + unsigned char b = pColumnB[pixel]; + + float aWeight = float(a) * weight; + float rWeight = float(r) * weight; + float gWeight = float(g) * weight; + float bWeight = float(b) * weight; + + ++pYa; + + for (; pYa < pYaEnd; ++pYa) + { + if ((weight = pYa->weight) > 0) + { + pixel = pYa->pixel; + + unsigned char a2 = pColumnA[pixel]; + unsigned char r2 = pColumnR[pixel]; + unsigned char g2 = pColumnG[pixel]; + unsigned char b2 = pColumnB[pixel]; + + aPixelsSame &= (a2 == a); + rPixelsSame &= (r2 == r); + gPixelsSame &= (g2 == g); + bPixelsSame &= (b2 == b); + + aWeight += float(a2) * weight; + rWeight += float(r2) * weight; + gWeight += float(g2) * weight; + bWeight += float(b2) * weight; + } + } + + { + aDst.PutPixel(xDst, yDst, aPixelsSame ? a : PixelOfWeight(aWeight)); + rDst.PutPixel(xDst, yDst, rPixelsSame ? r : PixelOfWeight(rWeight)); + gDst.PutPixel(xDst, yDst, gPixelsSame ? g : PixelOfWeight(gWeight)); + bDst.PutPixel(xDst, yDst, bPixelsSame ? b : PixelOfWeight(bWeight)); + } + } + } + + result = true; + } + + return result; +} + +} // Interpolation + + +namespace Interpolation +{ + +bool +IntersectRect(_Rectangle& outRect, const _Rectangle& srcRect1, const _Rectangle& srcRect2) +{ + struct LocalBound + { + int x1; + int y1; + int x2; + int y2; + + LocalBound(const _Rectangle& rect) + : x1(rect.x) + , y1(rect.y) + , x2(rect.x + rect.w) + , y2(rect.y + rect.h) + { + } + }; + + LocalBound srcBound1(srcRect1); + LocalBound srcBound2(srcRect2); + + if (((srcRect1.w > 0 && srcRect1.h > 0) && (srcRect2.w > 0 && srcRect2.h > 0)) + && ((srcBound2.x2 > srcBound1.x1) && (srcBound2.x1 < srcBound1.x2) && (srcBound2.y2 > srcBound1.y1) && (srcBound2.y1 < srcBound1.y2))) + { + outRect.x = (srcBound2.x1 <= srcBound1.x1) ? srcBound1.x1 : srcBound2.x1; + outRect.y = (srcBound2.y1 <= srcBound1.y1) ? srcBound1.y1 : srcBound2.y1; + outRect.w = ((srcBound2.x2 >= srcBound1.x2) ? srcBound1.x2 : srcBound2.x2) - outRect.x; + outRect.h = ((srcBound2.y2 >= srcBound1.y2) ? srcBound1.y2 : srcBound2.y2) - outRect.y; + + return true; + } + else + { + outRect.x = 0; + outRect.y = 0; + outRect.w = 0; + outRect.h = 0; + + return false; + } +}; + +bool +ScaleImage(const BufferDescUtil& retImage, long xDest, long yDest, long wDest, long hDest, const BufferDescUtil& srcImage, DefaultFilter defaultFilter) +{ + _Rectangle outRect; + + { + _Rectangle dstRect = { 0, 0, retImage.width, retImage.height }; + _Rectangle tgtRect = { xDest, yDest, wDest, hDest }; + + { + bool hasRegion = IntersectRect(outRect, tgtRect, dstRect); + if (!hasRegion) + { + return true; + } + } + } + + { + _BufferDesc dstImage = retImage.GetSubBitmapUnsafe(xDest, yDest, wDest, hDest); + _Rectangle validRect = outRect; + + validRect.x -= xDest; + validRect.y -= yDest; + + switch (defaultFilter) + { + case DEFAULT_FILTER_GOOD: + switch (retImage.depth) + { + case 32: + return _Effect::Interpolation::ScaleImage((_BufferDesc*)&dstImage, wDest, hDest, (_BufferDesc*)&srcImage, validRect); + case 16: + return _Effect::Interpolation::ScaleImage((_BufferDesc*)&dstImage, wDest, hDest, (_BufferDesc*)&srcImage, validRect); + default: + return false; + } + break; + case DEFAULT_FILTER_BEST: + default: + switch (retImage.depth) + { + case 32: + return _Effect::Interpolation::ScaleImage((_BufferDesc*)&dstImage, wDest, hDest, (_BufferDesc*)&srcImage, validRect); + case 16: + return _Effect::Interpolation::ScaleImage((_BufferDesc*)&dstImage, wDest, hDest, (_BufferDesc*)&srcImage, validRect); + default: + return false; + } + break; + } + } +} + +} // Interpolation + +} // _Effect + +}} // Tizen::Graphics + + +#include "../util/FGrp_Util.h" + +using namespace Tizen::Graphics; + +bool +Tizen::Graphics::_Effect::ScaleImageInterpolation(_Util::Pixmap& dstImage, long xDest, long yDest, long wDest, long hDest, + const _Util::Pixmap& srcImage, DefaultFilter defaultFilter) +{ + // verifiy the spcified parameters + { + if ((srcImage.width < 0) || (srcImage.height < 0) || (srcImage.pBitmap == null)) + { + return false; + } + + if ((dstImage.width < 0) || (dstImage.height < 0) || (dstImage.pBitmap == null)) + { + return false; + } + + if ((wDest < 0) || (hDest < 0)) + { + return false; + } + + if (srcImage.pBitmap == dstImage.pBitmap) + { + return false; + } + } + + { + if ((srcImage.width == 0) || (srcImage.height == 0)) + { + return true; + } + + if ((dstImage.width == 0) || (dstImage.height == 0)) + { + return true; + } + + if ((wDest == 0) || (hDest == 0)) + { + return true; + } + + { + _Util::Rectangle dstRect = + { + 0, + 0, + dstImage.width, + dstImage.height + }; + + _Util::Rectangle tgtRect = + { + xDest, + yDest, + wDest, + hDest + }; + + _Util::Rectangle outRect; + + if (!IntersectRect(outRect, tgtRect, dstRect)) + { + return true; + } + } + } + + BufferDescUtil srcBuffer(srcImage.width, srcImage.height, srcImage.depth, srcImage.pBitmap, srcImage.bytesPerLine); + BufferDescUtil dstBuffer(dstImage.width, dstImage.height, dstImage.depth, dstImage.pBitmap, dstImage.bytesPerLine); + + return _Effect::Interpolation::ScaleImage(dstBuffer, 0, 0, dstImage.width, dstImage.height, srcBuffer, defaultFilter); +} + +//////////////////////////////////////////////////////////////////////////////// +// API for test case + +#if 0 + +#include + +namespace Tizen { namespace Graphics +{ + +result _BitmapScale(Bitmap& dstBitmap, int scaleWidth, int scaleHeight) +{ + +#define CHECK_THROW(cond, rslt) if (!(cond)) { r = rslt; break; } + + result r = E_SUCCESS; + + do + { + _SmartArray srcBuffer; + + BufferInfo srcBufferInfo; + BufferInfo dstBufferInfo; + + result r = dstBitmap.Lock(srcBufferInfo); + + CHECK_THROW(r == E_SUCCESS, r); + + srcBuffer.Bind(new (std::nothrow) unsigned char[srcBufferInfo.pitch * srcBufferInfo.height]); + + CHECK_THROW(srcBuffer.Get() && srcBufferInfo.pPixels, E_OUT_OF_MEMORY); + + // same as memcpy(srcBuffer.Get(), srcBufferInfo.pPixels, srcBufferInfo.pitch * srcBufferInfo.height); + { + unsigned char* pBegin = static_cast(srcBufferInfo.pPixels); + unsigned char* pEnd = pBegin + srcBufferInfo.pitch * srcBufferInfo.height; + unsigned char* pTarget = srcBuffer.Get(); + + _Copy(pBegin, pEnd, pTarget); + } + + srcBufferInfo.pPixels = (void*)srcBuffer.Get(); + + dstBitmap.Unlock(); + + r = dstBitmap.Scale(Dimension(scaleWidth, scaleHeight)); + + CHECK_THROW(r == E_SUCCESS, r); + + r = dstBitmap.Lock(dstBufferInfo); + + CHECK_THROW(r == E_SUCCESS, r); + + BufferDescUtil srcImage(srcBufferInfo.width, srcBufferInfo.height, srcBufferInfo.bitsPerPixel, srcBufferInfo.pPixels, srcBufferInfo.pitch); + BufferDescUtil dstImage(dstBufferInfo.width, dstBufferInfo.height, dstBufferInfo.bitsPerPixel, dstBufferInfo.pPixels, dstBufferInfo.pitch); + + _Effect::Interpolation::ScaleImage(dstImage, 0, 0, dstBufferInfo.width, dstBufferInfo.height, srcImage); + + dstBitmap.Unlock(); + + } while (false); + + return r; + +#undef CHECK_THROW + +} + +}} // Tizen::Graphics + +#endif diff --git a/src/graphics/inc/FGrp_BitmapImpl.h b/src/graphics/inc/FGrp_BitmapImpl.h new file mode 100644 index 0000000..401b0a0 --- /dev/null +++ b/src/graphics/inc/FGrp_BitmapImpl.h @@ -0,0 +1,287 @@ +// +// 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_BitmapImpl.h + * @brief This is the header file for the _BitmapImpl class. + * + */ + +#ifndef _FGRP_INTERNAL_BITMAPIMPL_H_ +#define _FGRP_INTERNAL_BITMAPIMPL_H_ + + +#include +#include +#include + +#include +#include +#include + +#include "FGrp_CanvasImpl.h" + + +namespace Tizen { namespace Base +{ +class ByteBuffer; +}} // Tizen::Base + +namespace Tizen { namespace Graphics +{ +class Point; +class Dimension; +class Rectangle; +class Color; +class BufferInfo; +class Bitmap; + +class _Bitmap; + +class _OSP_EXPORT_ _BitmapImpl + : public Tizen::Base::Object +{ +public: + _BitmapImpl(void); + virtual ~_BitmapImpl(void); + + result Construct(const Rectangle& rect); + result Construct(const Dimension& dim, BitmapPixelFormat format); + result Construct(const _CanvasImpl& canvas, const Tizen::Graphics::Rectangle& rect); + result Construct(const _BitmapImpl& bitmap, const Tizen::Graphics::Rectangle& rect); + result Construct(const Tizen::Base::ByteBuffer& buffer, const Dimension& dim, BitmapPixelFormat pixelFormat); + result Construct(const Tizen::Base::ByteBuffer& buffer, const Dimension& dim, BitmapPixelFormat pixelFormat, BufferScaling bufferScaling); + result Construct(const BufferInfo& bufferInfo); + result Construct(const Tizen::Base::String& fileName, BitmapPixelFormat pixelFormat); + + result Construct(const FloatRectangle& rect); + result Construct(const FloatDimension& dim, BitmapPixelFormat format); + result Construct(const _CanvasImpl& canvas, const FloatRectangle& rect); + result Construct(const _BitmapImpl& bitmap, const FloatRectangle& rect); + + bool IsConstructed(void) const; + + Tizen::Base::String GetFileName(void) const; + + result Scale(const Dimension& dim); + result Scale(const FloatDimension& dim); + + result Merge(const Point& destPoint, const _BitmapImpl& srcBitmap, const Rectangle& srcRect); + result Merge(const FloatPoint& destPoint, const _BitmapImpl& srcBitmap, const FloatRectangle& srcRect); + + int GetHeight(void) const; + float GetHeightF(void) const; + float GetActualHeight(void) const; + + int GetWidth(void) const; + float GetWidthF(void) const; + float GetActualWidth(void) const; + + int GetBitsPerPixel(void) const; + BitmapPixelFormat GetPixelColorFormat(void) const; + + result SetMaskingColor(const Color* pColor); + result GetMaskingColor(Color& color) const; + + void SetAlphaConstant(int opacity); + int GetAlphaConstant(void) const; + + result SetScalingQuality(BitmapScalingQuality quality); + BitmapScalingQuality GetScalingQuality(void) const; + + bool IsNinePatchedBitmap(void) const; + + void SetAsImmutable(void); + bool IsMutable(void) const; + + void SetAsPremultiplied(void); + void SetAsNonpremultiplied(void); + + result Lock(BufferInfo& info, long timeout = INFINITE); + result Unlock(void); + + result LockFast(BufferInfo& info, long timeout = INFINITE); + result UnlockFast(void); + + void SetNinePatchedTagByForce(bool isNinePatched); + + static bool CheckNinePatchedBitmapStrictly(const Bitmap& bitmap); + + /** + * This method is for internal use only. The Tizen C++ platform team is not + * responsible for any behavioral correctness, consistency, and + * security-related issues that might arise after using this method. + * + * Creates and returns a scaled bitmap from the specified nine-patched bitmap + * + * @since 2.0 + * @return The scaled bitmap @n + * @c null, if an exception occurs + * @param[in] ninePatchedBitmap The nine-patched bitmap + * @param[in] width The width of the returned bitmap. + * @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 Memory allocation failed. + * @exception E_UNSUPPORTED_FORMAT The specified format is not supported. + * @exception E_SYSTEM An unknown operating system error has occurred. + * + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + static Bitmap* GetExpandedBitmapN(const Bitmap& ninePatchedBitmap, int width, int height); + static Bitmap* GetExpandedBitmapFN(const Bitmap& ninePatchedBitmap, float width, float height); + + /** + * This method is for internal use only. The Tizen C++ platform team is not + * responsible for any behavioral correctness, consistency, and + * security-related issues that might arise after using this method. + * + * Creates and returns a scaled bitmap from the specified nine-patched bitmap + * + * @since 2.0 + * @return The converted bitmap @n + * @c null, if an exception occurs + * @param[in] bitmap The source bitmap + * @param[in] replacedColor The color replaced. + * @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 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. + */ + static Bitmap* GetColorReplacedBitmapN(const Bitmap& bitmap, const Color& replacedColor, const Color& newColor); + + /** + * This method is for internal use only. The Tizen C++ platform team is not + * responsible for any behavioral correctness, consistency, and + * security-related issues that might arise after using this method. + * + * Clones a bitmap managed with a reference count + * + * @since 2.0 + * @return The cloned bitmap @n + * @c null, if an exception occurs + * @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 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. + */ + static Bitmap* CloneN(const Bitmap& bitmap); + + static _BitmapImpl* GetNonScaledBitmapImplN(const Tizen::Base::ByteBuffer& buffer, const Dimension& dim, BitmapPixelFormat pixelFormat); + + /** + * This method is for internal use only. The Tizen C++ platform team is not + * responsible for any behavioral correctness, consistency, and + * security-related issues that might arise after using this method. + * + * Creates and returns a non scaled bitmap. + * + * @since 2.0 + * @return The non scaled bitmap @n + * @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 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 Memory allocation failed. + * + * @remarks The specific error code can be accessed using the GetLastResult() method. + */ + static Bitmap* GetNonScaledBitmapN(const Tizen::Base::ByteBuffer& buffer, const Dimension& dim, BitmapPixelFormat pixelFormat); + static Bitmap* GetNonScaledBitmapN(const Tizen::Base::ByteBuffer& buffer, const Dimension& dim, BitmapPixelFormat pixelFormat, const FloatDimension& logicalSize); + + static bool HasNinePatchedBitmapTag(Tizen::Base::String fileName); + + /* + * @exception E_SUCCESS The method was successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_INVALID_CONDITION The specified bitmap is already non-premultipied. + */ + static result ConvertToNonpremultiplied(Bitmap& bitmap, bool forceConversion = false); + + static _BitmapImpl* GetInstance(Bitmap& bitmap); + static const _BitmapImpl* GetInstance(const Bitmap& bitmap); + +protected: + bool _SetCallback(void (* DestroyCallback)(void*), void* pDestroyCallbackParam, + void (* LockCallback)(void*), void* pLockCallbackParam, + void (* UnlockCallback)(void*), void* pUnlockCallbackParam, + void (* PostlockCallback)(BufferInfo&, void*), void* pPostlockCallbackParam); + static _BitmapImpl*& _GetBitmapImpl(Bitmap* pBitmap); + +private: + _BitmapImpl(const _BitmapImpl& src); + _BitmapImpl& operator =(const _BitmapImpl& value); + + result Construct(const Tizen::Base::ByteBuffer& buffer, const Dimension& dim, BitmapPixelFormat pixelFormat, bool autoScaling); + result Construct(const byte* pBuffer, int bufferSize, const Dimension& dim, BitmapPixelFormat pixelFormat, bool autoScaling); + result Construct(const byte* pExtBuffer, int width, int height, BitmapPixelFormat pixelFormat, int pitch); + + bool __CheckValidity(bool canBufferExpand = true); + bool __RealizeBuffer(void); + + result __Scale(const float width, const float height); + +protected: + struct _SharedItem + { + std::auto_ptr<_Bitmap> nativeBitmap; + std::auto_ptr coordHolder; + long lazyScaling; + std::auto_ptr<_Bitmap> scaledNativeBitmap; // depend on lazyScaling flag + bool isMutable; + + void (* pDestroyCallbackFunc)(void*); + void* pDestroyCallbackParam; + void (* pLockCallbackFunc)(void*); + void* pLockCallbackParam; + void (* pUnlockCallbackFunc)(void*); + void* pUnlockCallbackParam; + void (* pPostlockCallbackFunc)(BufferInfo&, void*); + void* pPostlockCallbackParam; + + struct + { + Tizen::Base::String fileName; + BitmapPixelFormat pixelFormat; + bool hasBeenDetectedByUsingName; // This bitmap has been detected by using name. + bool determinedNinePatchedAtFirst; // This bitmap was determined that it is a nine-patched bitmap at first. + } associated; + + void Move(_SharedItem& source); + }; + + unsigned long _magicKey; + std::tr1::shared_ptr<_SharedItem> _sharedItem; + + friend class Bitmap; + friend class _CanvasImpl; + +}; // _BitmapImpl + +}} // Tizen::Graphics + +#endif // _FGRP_INTERNAL_BITMAPIMPL_H_ diff --git a/src/graphics/inc/FGrp_BitmapTool.h b/src/graphics/inc/FGrp_BitmapTool.h new file mode 100644 index 0000000..10663b4 --- /dev/null +++ b/src/graphics/inc/FGrp_BitmapTool.h @@ -0,0 +1,57 @@ +// +// 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_BitmapTool.h + * @brief This is the header file for internal _BitmapTool namespace. + * + */ + +#ifndef _FGRP_INTERNAL_BITMAPTOOL_H_ +#define _FGRP_INTERNAL_BITMAPTOOL_H_ + +#include +#include +#include + + +namespace Tizen { namespace Graphics +{ + +namespace _BitmapTool +{ + +// This function changes the buffer of the specified bitmap to the user defined buffer +// The user buffer size MUST be same as the original bitmap size +result +ChangeBuffer(Tizen::Graphics::Bitmap& srcBitmap, void* pBuffer, long bytesPerLine, void (* DestroyCallback)(void*), void* pCallbackParam); + +bool +SetCallback(Tizen::Graphics::Bitmap& bitmap, + void (* DestroyCallback)(void*), void* pCallbackParam, + void (* LockCallback)(void*), void* pLockParam, + void (* UnlockCallback)(void*), void* pUnlockParam, + void (* PostlockCallback)(Tizen::Graphics::BufferInfo& bufferInfo, void*) = 0, void* pPostlockParam = 0); + +void +ResetCallback(Tizen::Graphics::Bitmap& bitmap); + +} // Tizen::Graphics::_BitmapTool + +}} // Tizen::Graphics + +#endif // _FGRP_INTERNAL_BITMAPTOOL_H_ diff --git a/src/graphics/inc/FGrp_BufferInfoImpl.h b/src/graphics/inc/FGrp_BufferInfoImpl.h new file mode 100644 index 0000000..b76c599 --- /dev/null +++ b/src/graphics/inc/FGrp_BufferInfoImpl.h @@ -0,0 +1,160 @@ +// +// 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_BufferInfoImpl.h + * @brief This is the header file for the _BufferInfoImpl class. + * + * This header file contains the declarations of the %_BufferInfoImpl class. + * + */ + +#ifndef _FGRP_INTERNAL_BUFFERINFO_IMPL_H_ +#define _FGRP_INTERNAL_BUFFERINFO_IMPL_H_ + + +#include +#include + + +namespace Tizen { namespace Graphics +{ +class BufferInfo; + +class _OSP_EXPORT_ _BufferInfoImpl +{ +public: + enum + { + INVALID_BUFFER_HANDLE = 0 + }; + + enum Orientation + { + ORIENTATION_PORTRAIT, + ORIENTATION_LANDSCAPE, + ORIENTATION_PORTRAIT_REVERSE, + ORIENTATION_LANDSCAPE_REVERSE + }; + + enum HandleType + { + HANDLE_TYPE_NONE, + HANDLE_TYPE_OVERLAY_REGION, + HANDLE_TYPE_VE_SURFACE, + HANDLE_TYPE_CANVAS_TEXTURE, + HANDLE_TYPE_NATIVE_PIXMAP + }; + + enum Rotation + { + ROTATION_0, + ROTATION_90, + ROTATION_180, + ROTATION_270 + }; + + /** + * This is the default constructor for this class. + */ + _BufferInfoImpl(); + + /** + * This is the destructor for this class. + */ + virtual ~_BufferInfoImpl(); + + /* + * Gets the handle of the current instance of _BufferInfoImpl. + * + * @return The runtime handle + * + */ + int GetHandle(HandleType handleType) const; + + void* GetUserData(HandleType handleType) const; + + /* + * Sets the handle of the current instance of _BufferInfoImpl. + * + */ + void SetHandle(HandleType handleType, int handle, void* pUserData = null); + + /* + * Gets the orientation of the current instance of _BufferInfoImpl. + * + */ + Orientation GetOrientation(void) const; + + /* + * Sets the orientation of the current instance of _BufferInfoImpl. + * + */ + void SetOrientation(Orientation orientation); + + /* + * Gets the bounds of the current instance of _BufferInfoImpl. + * + */ + Rectangle GetBounds(void) const; + + /* + * Sets the bounds of the current instance of _BufferInfoImpl. + * + */ + void SetBounds(const Rectangle& rect); + + /* + * Gets the rotation of the current instance of _BufferInfoImpl. + * + */ + Rotation GetRotation(void) const; + + /* + * Sets the rotation of the current instance of _BufferInfoImpl. + * + */ + void SetRotation(Rotation rotation); + + static _BufferInfoImpl* GetInstance(BufferInfo& bufferInfo); + static const _BufferInfoImpl* GetInstance(const BufferInfo& bufferInfo); + +private: + /** + * This is the default copy constructor for this class. + */ + _BufferInfoImpl(const _BufferInfoImpl& src); + + /** + * This is the default assignment operator for this class. + */ + _BufferInfoImpl& operator =(const _BufferInfoImpl& rhs); + + friend class BufferInfo; + + HandleType __handleType; + int __handle; + void* __pUserData; + Orientation __orientation; + Rectangle __bounds; + Rotation __rotation; + +}; // _BufferInfoImpl + +}} // Tizen::Graphics + +#endif // _FGRP_INTERNAL_BUFFERINFO_IMPL_H_ diff --git a/src/graphics/inc/FGrp_CanvasImpl.h b/src/graphics/inc/FGrp_CanvasImpl.h new file mode 100644 index 0000000..654224f --- /dev/null +++ b/src/graphics/inc/FGrp_CanvasImpl.h @@ -0,0 +1,284 @@ +// +// 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_CanvasImpl.h + * @brief This is the header file for the _CanvasImpl class. + * + * This header file contains the declarations of the %_CanvasImpl class. + * + */ + +#ifndef _FGRP_INTERNAL_CANVASIMPL_H_ +#define _FGRP_INTERNAL_CANVASIMPL_H_ + + +#include +#include +#include + + +namespace Tizen { namespace Base { namespace Collection +{ +class IList; +}}} // Tizen::Base::Collection + +namespace Tizen { namespace Ui { namespace Animations +{ +class _VisualElementCanvas; +}}} // Tizen::Ui::Animations + +namespace Tizen { namespace Graphics +{ +class Point; +class Dimension; +class Rectangle; +class FloatPoint; +class FloatDimension; +class FloatRectangle; +class Color; +class BufferInfo; +class Bitmap; +class Canvas; +class Font; +class EnrichedText; + +class _BitmapImpl; +class _Canvas; + + +// * @enum BitmapDrawingQuality +// * +// * Defines the bitmap drawing quality. +// * +// * @since 2.0 + +enum BitmapDrawingQuality +{ + BITMAP_DRAWING_QUALITY_LOW, // The low-quality but high-performance + BITMAP_DRAWING_QUALITY_MID, // The mid-quality + BITMAP_DRAWING_QUALITY_HIGH // The high-quality but low-performance +}; + +enum TextOrigin +{ + TEXT_ORIGIN_LEFT_TOP, + TEXT_ORIGIN_BASELINE +}; + +class _OSP_EXPORT_ _CanvasImpl + : public Tizen::Base::Object +{ +public: + _CanvasImpl(void); + virtual ~_CanvasImpl(void); + + result Construct(void); + result Construct(const Rectangle& rect); + result Construct(const BufferInfo& bufferInfo); + result Construct(Handle windowHandle); + result Construct(Handle windowHandle, const Rectangle& rect); + + result Construct(const FloatRectangle& rect); + result Construct(Handle windowHandle, const FloatRectangle& rect); + + bool IsConstructed(void) const; + + result Clear(void); + result Clear(const Rectangle& rect); + result Clear(const FloatRectangle& rect); + + result Copy(const Point& destPoint, const _CanvasImpl& srcCanvas, const Rectangle& srcRect); + result Copy(const FloatPoint& destPoint, const _CanvasImpl& srcCanvas, const FloatRectangle& srcRect); + result Copy(const Rectangle& destRect, const _CanvasImpl& srcCanvas, const Rectangle& srcRect); + result Copy(const FloatRectangle& destRect, const _CanvasImpl& srcCanvas, const FloatRectangle& srcRect); + result Copy(const Point& destPoint, const _CanvasImpl& srcCanvas, const Rectangle& srcRect, CompositeMode compositeMode); + result Copy(const FloatPoint& destPoint, const _CanvasImpl& srcCanvas, const FloatRectangle& srcRect, CompositeMode compositeMode); + + result CopyEx(const Point& destPoint, const _CanvasImpl& srcCanvas, const Rectangle& srcRect); + result CopyEx(const FloatPoint& destPoint, const _CanvasImpl& srcCanvas, const FloatRectangle& srcRect); + + LineStyle GetLineStyle(void) const; + int GetLineWidth(void) const; + float GetLineWidthF(void) const; + LineCapStyle GetLineCapStyle(void) const; + LineJoinStyle GetLineJoinStyle(void) const; + result SetLineStyle(LineStyle style); + result SetLineWidth(int width); + result SetLineWidth(float width); + result SetLineCapStyle(LineCapStyle lineCapStyle); + result SetLineJoinStyle(LineJoinStyle lineJoinStyle); + + result GetDashPattern(Tizen::Base::Collection::IListT& pattern, int& offset); + result GetDashPattern(Tizen::Base::Collection::IListT& pattern, float& offset); + result SetDashPattern(const Tizen::Base::Collection::IListT& pattern, int offset); + result SetDashPattern(const Tizen::Base::Collection::IListT& pattern, float offset); + + result SetDrawingQuality(BitmapDrawingQuality quality); + BitmapDrawingQuality GetDrawingQuality(void) const; + + result SetCompositeMode(CompositeMode compositeMode); + CompositeMode GetCompositeMode(void) const; + + result GetPixel(const Point& point, Color& color) const; + result GetPixel(const FloatPoint& point, Color& color) const; + + result SetPixel(const Point& point); + result SetPixel(const FloatPoint& point); + + result DrawRectangle(const Rectangle& rect); + result DrawRectangle(const FloatRectangle& rect); + result FillRectangle(const Color& color, const Rectangle& rect); + result FillRectangle(const Color& color, const FloatRectangle& rect); + + result DrawRoundRectangle(const Rectangle& rect, const Dimension& arcDim); + result DrawRoundRectangle(const FloatRectangle& rect, const FloatDimension& arcDim); + result FillRoundRectangle(const Color& color, const Rectangle& rect, const Dimension& arcDim); + result FillRoundRectangle(const Color& color, const FloatRectangle& rect, const FloatDimension& arcDim); + + result DrawEllipse(const Rectangle& rect); + result DrawEllipse(const FloatRectangle& rect); + result FillEllipse(const Color& color, const Rectangle& rect); + result FillEllipse(const Color& color, const FloatRectangle& rect); + + result DrawArc(const Rectangle& rect, int startAngle, int endAngle, ArcStyle arcStyle); + result DrawArc(const FloatRectangle& rect, float startAngle, float endAngle, ArcStyle arcStyle); + + result DrawTriangle(const Point& point1, const Point& point2, const Point& point3); + result DrawTriangle(const FloatPoint& point1, const FloatPoint& point2, const FloatPoint& point3); + result FillTriangle(const Color& color, const Point& point1, const Point& point2, const Point& point3); + result FillTriangle(const Color& color, const FloatPoint& point1, const FloatPoint& point2, const FloatPoint& point3); + + result DrawLine(const Point& point1, const Point& point2); + result DrawLine(const FloatPoint& point1, const FloatPoint& point2); + result DrawPolyline(const Tizen::Base::Collection::IList& points); + result DrawPolygon(const Tizen::Base::Collection::IList& points); + result FillPolygon(const Color& color, const Tizen::Base::Collection::IList& points); + + result SetFont(const Font& font); + Font* GetFontN(void); + + void SetTextOrigin(TextOrigin origin); + + result DrawText(const Point& point, const Tizen::Base::String& text); + result DrawText(const Point& point, const Tizen::Base::String& text, int startIndex, int length); + result DrawText(const Point& point, const Tizen::Base::String& text, int startIndex, const Color& outlineColor); + result DrawText(const Point& point, const Tizen::Base::String& text, int startIndex, int length, const Color& outlineColor); + result DrawText(const Point& point, const EnrichedText& enrichedText); + + result DrawText(const FloatPoint& point, const Tizen::Base::String& text); + result DrawText(const FloatPoint& point, const Tizen::Base::String& text, int startIndex, int length); + result DrawText(const FloatPoint& point, const Tizen::Base::String& text, int startIndex, const Color& outlineColor); + result DrawText(const FloatPoint& point, const Tizen::Base::String& text, int startIndex, int length, const Color& outlineColor); + result DrawText(const FloatPoint& point, const EnrichedText& enrichedText); + + result DrawBitmap(const Point& point, const _BitmapImpl& bitmap); + result DrawBitmap(const FloatPoint& point, const _BitmapImpl& bitmap); + result DrawBitmap(const Rectangle& rect, const _BitmapImpl& bitmap); + result DrawBitmap(const FloatRectangle& rect, const _BitmapImpl& bitmap); + result DrawBitmap(const Rectangle& destRect, const _BitmapImpl& srcBitmap, const Rectangle& srcRect); + result DrawBitmap(const FloatRectangle& destRect, const _BitmapImpl& srcBitmap, const FloatRectangle& srcRect); + result DrawBitmap(const Point& point, const _BitmapImpl& bitmap, FlipDirection dir); + result DrawBitmap(const FloatPoint& point, const _BitmapImpl& bitmap, FlipDirection dir); + result DrawBitmap(const Point& point, const _BitmapImpl& bitmap, const Point& pivot, int degree); + result DrawBitmap(const FloatPoint& point, const _BitmapImpl& bitmap, const FloatPoint& pivot, float degree); + result DrawNinePatchedBitmap(const Rectangle& rect, const _BitmapImpl& bitmap); + result DrawNinePatchedBitmap(const FloatRectangle& rect, const _BitmapImpl& bitmap); + result DrawNineTiledBitmap(const Rectangle& rect, const _BitmapImpl& bitmap); + + result Show(void); + result Show(const Rectangle& rect); + + Rectangle GetBounds(void) const; + FloatRectangle GetBoundsF(void) const; + FloatRectangle GetActualBounds(void) const; + + result SetClipBounds(const Rectangle& rect); + result SetClipBounds(const FloatRectangle& rect); + Rectangle GetClipBounds(void) const; + FloatRectangle GetClipBoundsF(void) const; + + result Lock(BufferInfo& info, long timeout = INFINITE); + result Unlock(void); + + void SetForegroundColor(const Color& color); + Color GetForegroundColor(void) const; + void SetBackgroundColor(const Color& color); + Color GetBackgroundColor(void) const; + + result SetPosition(const Point& point); + result SetPosition(int x, int y); + + Canvas* GetSubCanvasN(const Rectangle& subRegion) const; + Canvas* GetSubCanvasFN(const FloatRectangle& subRegion) const; + + void SetAntialiasingEnabled(bool enable); + bool IsAntialiasingEnabled(void) const; + + /* + * Sets a priority font to the %_CanvasImpl. This font have priority at user font which is installed through _CanvasImpl::SetFont() + * + * @return An error code + * @param[in] pFont The font @n + * It should be constructed before being passed to this method. + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_OPERATION_FAILED This instance is in an invalid state. + */ + result SetPriorityFont(const Font& font); + + /* + * Resets a priority font + */ + void ResetPriorityFont(void); + + // for performance test + void SetStableRenderer(bool isStable); + + // for removing the Ui dependency + static void SetFrameInfoCallback(void* (*pGetDefaultFrameNativeHandle)(void), void* (*pGetDefaultFrameHandle)(void)); + static void SetThemeInfoCallback(Color (*pGetDefaultForegroundColor)(void), Color (*pGetDefaultBackgroundColor)(void)); + + static _CanvasImpl* GetInstance(Canvas& canvas); + static const _CanvasImpl* GetInstance(const Canvas& canvas); + +private: + _CanvasImpl(const _CanvasImpl& canvas); + _CanvasImpl& operator =(const _CanvasImpl& value); + +protected: + unsigned long _magicKey; + _Canvas* _pNativeCanvas; + struct _CanvasCoordHolder* _pCoordHolder; + Font* _pFont; + Font* _pPriorityFont; + Tizen::Base::Collection::ArrayListT _dashList; + int _dashOffset; + bool (* _pShowCallbackFunc)(void*); + void* _pShowCallbackParam; + + friend class _Canvas; + friend class _CanvasImplPrivate; + friend class _BitmapImpl; + friend class TextElement; + friend class Tizen::Ui::Animations::_VisualElementCanvas; + +}; // _CanvasImpl + +}} // Tizen::Graphics + +#endif // _FGRP_INTERNAL_CANVASIMPL_H_ diff --git a/src/graphics/inc/FGrp_CanvasTextureImpl.h b/src/graphics/inc/FGrp_CanvasTextureImpl.h new file mode 100644 index 0000000..4ba73f3 --- /dev/null +++ b/src/graphics/inc/FGrp_CanvasTextureImpl.h @@ -0,0 +1,67 @@ +// +// 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_CanvasTextureImpl.h + * @brief This is the header file for the _CanvasTextureImpl class. + * + */ + +#ifndef _FGRP_CANVAS_TEXTUREIMPL_H_ +#define _FGRP_CANVAS_TEXTUREIMPL_H_ + +#include + +namespace Tizen { namespace Graphics { +class Bitmap; +class Canvas; +}} + +namespace Tizen { namespace Graphics { namespace Opengl +{ + +class CanvasTexture; +class _CanvasTexture; + +class _OSP_EXPORT_ _CanvasTextureImpl + : public Tizen::Base::Object +{ +public: + _CanvasTextureImpl(void); + virtual ~_CanvasTextureImpl(void); + + result Construct(int textureId, int width, int height); + + Canvas* GetCanvasN(void) const; + +public: + static _CanvasTextureImpl* GetInstance(CanvasTexture& canvasTexture); + static const _CanvasTextureImpl* GetInstance(const CanvasTexture& canvasTexture); + +private: + _CanvasTextureImpl(const _CanvasTextureImpl& rhs); + _CanvasTextureImpl& operator =(const _CanvasTextureImpl& rhs); + +private: + _CanvasTexture* __pNativeCanvasTexture; + + friend class CanvasTexture; +}; // CanvasTexture + +}}} // Tizen::Graphics::Opengl + +#endif //_FGRP_CANVAS_TEXTURE_H_ diff --git a/src/graphics/inc/FGrp_CanvasTool.h b/src/graphics/inc/FGrp_CanvasTool.h new file mode 100644 index 0000000..18b6d82 --- /dev/null +++ b/src/graphics/inc/FGrp_CanvasTool.h @@ -0,0 +1,48 @@ +// +// 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_CanvasTool.h + * @brief This is the header file for internal _CanvasTool namespace. + * + */ + +#ifndef _FGRP_INTERNAL_CANVASTOOL_H_ +#define _FGRP_INTERNAL_CANVASTOOL_H_ + +#include +#include + + +namespace Tizen { namespace Graphics +{ + +namespace _CanvasTool +{ + +bool +SetCallback(Tizen::Graphics::Canvas& canvas, + bool (* ShowCallback)(void*), void* pCallbackParam); + +void +ResetCallback(Tizen::Graphics::Canvas& canvas); + +} // Tizen::Graphics::_CanvasTool + +}} // Tizen::Graphics + +#endif // _FGRP_INTERNAL_CANVASTOOL_H_ diff --git a/src/graphics/inc/FGrp_CoordinateSystem.h b/src/graphics/inc/FGrp_CoordinateSystem.h new file mode 100644 index 0000000..2465806 --- /dev/null +++ b/src/graphics/inc/FGrp_CoordinateSystem.h @@ -0,0 +1,282 @@ +// +// 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_CoordinateSystem.h + * @brief This is the header file for _CoordinateSystem class. + * + */ + +#ifndef _FGRP_INTERNAL_COORDINATE_SYSTEM_H_ +#define _FGRP_INTERNAL_COORDINATE_SYSTEM_H_ + + +#include +#include +#include +#include +#include +#include + + +#ifdef USE_RESOLUTION_ENUM_VALUE +namespace Tizen { namespace Graphics +{ +enum _LogicalResolution +{ + RESOLUTION_LOGICAL_NONE, + RESOLUTION_LOGICAL_DEFAULT, + + RESOLUTION_LOGICAL_240, + RESOLUTION_LOGICAL_320, + RESOLUTION_LOGICAL_360, + RESOLUTION_LOGICAL_480, + RESOLUTION_LOGICAL_720, + RESOLUTION_LOGICAL_800, + RESOLUTION_LOGICAL_960, + RESOLUTION_LOGICAL_1080, + RESOLUTION_LOGICAL_1440, + RESOLUTION_LOGICAL_1600 +}; + +enum _PhysicalResolution +{ + RESOLUTION_PHYSICAL_NONE, + RESOLUTION_PHYSICAL_DEFAULT, + + RESOLUTION_PHYSICAL_WVGA, + RESOLUTION_PHYSICAL_WQVGA, + RESOLUTION_PHYSICAL_HVGA, + //RESOLUTION_PHYSICAL_QHD, + RESOLUTION_PHYSICAL_HD, + RESOLUTION_PHYSICAL_WXGA, + RESOLUTION_PHYSICAL_HD1080, + RESOLUTION_PHYSICAL_WQXGA +}; + +}} // Tizen::Graphics +#endif + + + +namespace Tizen { namespace Graphics +{ + +enum _BaseScreenSize +{ + BASE_SCREEN_SIZE_NONE, + BASE_SCREEN_SIZE_DEFAULT, + + BASE_SCREEN_SIZE_NORMAL, + BASE_SCREEN_SIZE_LARGE +}; + +class _OSP_EXPORT_ _ICoordinateSystemTransformer +{ +public: + virtual ~_ICoordinateSystemTransformer(void) {} + + virtual Rectangle Transform(const Rectangle& rect) const = 0; + virtual Dimension Transform(const Dimension& dim) const = 0; + virtual Point Transform(const Point& point) const = 0; + + virtual int Transform(int scalar) const = 0; + virtual int TransformHorizontal(int scalar) const = 0; + virtual int TransformVertical(int scalar) const = 0; + + virtual FloatRectangle Transform(const FloatRectangle& rect) const = 0; + virtual FloatDimension Transform(const FloatDimension& dim) const = 0; + virtual FloatPoint Transform(const FloatPoint& point) const = 0; + + virtual float Transform(float scalar) const = 0; + virtual float TransformHorizontal(float scalar) const = 0; + virtual float TransformVertical(float scalar) const = 0; + + virtual int TransformFloatToInt(float scalar) const = 0; + virtual int TransformHorizontalFloatToInt(float scalar) const = 0; + virtual int TransformVerticalFloatToInt(float scalar) const = 0; + + virtual float GetHorizontalScaleFactor(void) const = 0; + virtual float GetVerticalScaleFactor(void) const = 0; + +}; // _ICoordinateSystemTransformer + +class _OSP_EXPORT_ _NullCoordinateSystemTransformer + : public _ICoordinateSystemTransformer +{ +public: + + _NullCoordinateSystemTransformer(void) + { + } + + virtual Rectangle Transform(const Rectangle& rect) const + { + return rect; + } + + virtual Dimension Transform(const Dimension& dim) const + { + return dim; + } + + virtual Point Transform(const Point& point) const + { + return point; + } + + virtual FloatRectangle Transform(const FloatRectangle& rect) const + { + return rect; + } + + virtual FloatDimension Transform(const FloatDimension& dim) const + { + return dim; + } + + virtual FloatPoint Transform(const FloatPoint& point) const + { + return point; + } + + + virtual int Transform(int scalar) const + { + return scalar; + } + + virtual int TransformHorizontal(int scalar) const + { + return scalar; + } + + virtual int TransformVertical(int scalar) const + { + return scalar; + } + + virtual float Transform(float scalar) const + { + return scalar; + } + + virtual float TransformHorizontal(float scalar) const + { + return scalar; + } + + virtual float TransformVertical(float scalar) const + { + return scalar; + } + + virtual int TransformFloatToInt(float scalar) const + { + return static_cast(scalar); + } + + virtual int TransformHorizontalFloatToInt(float scalar) const + { + return static_cast(scalar); + } + + virtual int TransformVerticalFloatToInt(float scalar) const + { + return static_cast(scalar); + } + + virtual float GetHorizontalScaleFactor(void) const + { + return 1.0f; + } + + virtual float GetVerticalScaleFactor(void) const + { + return 1.0f; + } +}; // _NullCoordinateSystemTransformer + +class _OSP_EXPORT_ _CoordinateSystem +{ +public: + static _CoordinateSystem* GetInstance(void); + +#ifdef USE_RESOLUTION_ENUM_VALUE + _LogicalResolution GetNativeLogicalResolution(void) const; + _BaseScreenSize GetNativeLogicalBaseScreenSize(void) const; + + _LogicalResolution GetLogicalResolution(void) const; + _PhysicalResolution GetPhysicalResolution(void) const; + + static result Initialize(_LogicalResolution logicalResolution, _BaseScreenSize logicalBaseScreenSize); + result Reset(_LogicalResolution logicalResolution, _BaseScreenSize logicalBaseScreenSize); + + static _ICoordinateSystemTransformer* GetTransformerN(_LogicalResolution logicalResolution, _PhysicalResolution physicalResolution); + static _ICoordinateSystemTransformer* GetTransformerN(_LogicalResolution sourceLogicalResolution, _LogicalResolution destLogicalResolution); + static _ICoordinateSystemTransformer* GetTransformerN(_LogicalResolution logicalResolution, _BaseScreenSize logicalBaseScreenSize, _PhysicalResolution physicalResolution, _BaseScreenSize physicalBaseScreenSize); +#endif + + int GetLogicalResolutionInt(void) const; + Dimension GetPhysicalResolutionDim(void) const; + + _BaseScreenSize GetLogicalBaseScreenSize(void) const; + _BaseScreenSize GetPhysicalBaseScreenSize(void) const; + + static result Initialize(int srcRes, _BaseScreenSize srcBaseScreenSize, Dimension destRes, _BaseScreenSize destBaseScreenSize); + + result Reset(int srcRes, _BaseScreenSize srcBaseScreenSize, Dimension destRes, _BaseScreenSize destBaseScreenSize); + + _ICoordinateSystemTransformer* GetTransformer(void); + _ICoordinateSystemTransformer* GetInverseTransformer(void); + + static _ICoordinateSystemTransformer* GetTransformerN(const Dimension& srcDim, const Dimension& trgDim); + static _ICoordinateSystemTransformer* GetTransformerN(int srcResolution, _BaseScreenSize srcBaseScreenSize, Dimension destResolution, _BaseScreenSize destBaseScreenSize); + + void SetTransformEnabled(bool enabled); + bool IsTransformEnabled(void) const; + + double GetAppBaseScaleFactor(void); + double GetTargetBaseScaleFactor(void); + +private: + _CoordinateSystem(void); + ~_CoordinateSystem(void); + + _CoordinateSystem(const _CoordinateSystem&); + _CoordinateSystem& operator =(const _CoordinateSystem&); + +#ifdef USE_RESOLUTION_ENUM_VALUE + result __Initialize(_LogicalResolution logicalResolution, _BaseScreenSize logicalBaseScreenSize); +#endif + + result __Initialize(int srcResolution, _BaseScreenSize srcBaseScreenSize, Dimension destResolution, _BaseScreenSize destBaseScreenSize); + + static void __InitCoordinateSystem(void); + +private: + static _CoordinateSystem __instance; + static _CoordinateSystem* __pTheInstance; + + class _CoordinateSystemImpl; + _CoordinateSystemImpl* __pImpl; + +}; // _CoordinateSystem + +}} // Tizen::Graphics + +#endif // _FGRP_INTERNAL_COORDINATE_SYSTEM_H_ diff --git a/src/graphics/inc/FGrp_CoordinateSystemUtils.h b/src/graphics/inc/FGrp_CoordinateSystemUtils.h new file mode 100644 index 0000000..8877e3a --- /dev/null +++ b/src/graphics/inc/FGrp_CoordinateSystemUtils.h @@ -0,0 +1,336 @@ +// +// 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_CoordinateSystemUtils.h + * @brief This is the header file for the _CoordinateSystemUtils class. + * + * This header file contains the declarations of the _CoordinateSystemUtils class. + */ + +#ifndef _FGRP_INTERNAL_COORDINATE_SYSTEM_UTILS_H_ +#define _FGRP_INTERNAL_COORDINATE_SYSTEM_UTILS_H_ + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace Tizen { namespace Graphics { + +class _OSP_EXPORT_ _CoordinateSystemUtils +{ +public: + // Convert To Float + static Tizen::Graphics::FloatRectangle + ConvertToFloat(const Tizen::Graphics::Rectangle& rect) + { + return Tizen::Graphics::FloatRectangle(rect.x, rect.y, rect.width, rect.height); + } + + static Tizen::Graphics::FloatRectangle + ConvertToFloat(const Tizen::Graphics::Point& point, const Tizen::Graphics::Dimension& dim) + { + return Tizen::Graphics::FloatRectangle(point.x, point.y, dim.width, dim.height); + } + + static Tizen::Graphics::FloatDimension + ConvertToFloat(const Tizen::Graphics::Dimension& dim) + { + return Tizen::Graphics::FloatDimension(dim.width, dim.height); + } + + static Tizen::Graphics::FloatPoint + ConvertToFloat(const Tizen::Graphics::Point& point) + { + return Tizen::Graphics::FloatPoint(point.x, point.y); + } + + static float + ConvertToFloat(const Tizen::Base::String& floatString) + { + if (floatString.IsEmpty() == true) + { + return 0.0f; + } + float integerPart = 0.0f; + float decimalPart = 0.0f; + float multiple = 1.0f; + float sign = 1.0f; + int index = 0; + bool isDecimal = false; + + if (floatString[index] == L'-') + { + sign = -1.0f; + index ++; + } + else if (floatString[index] == L'+') + { + sign = 1.0f; + index ++; + } + + while (index < floatString.GetLength()) + { + if (floatString[index] == L'.') + { + isDecimal = true; + } + else if (floatString[index] >= L'0' && floatString[index] <= L'9') + { + if (isDecimal) + { + decimalPart = (decimalPart * 10.0f) + (floatString[index] - L'0'); + multiple = 0.1f * multiple; + } + else + { + integerPart = (integerPart * 10.0f) + (floatString[index] - L'0'); + } + } + index ++; + } + decimalPart = decimalPart * multiple; + + return sign * (integerPart + decimalPart); + } + + static float + ConvertToFloat(int scalar) + { + return scalar; + } + + // Convert To Integer + static Tizen::Graphics::Rectangle + ConvertToInteger(const Tizen::Graphics::FloatRectangle& rect) + { + return Tizen::Graphics::Rectangle(floorf(rect.x + __floatIntegralEpsilon), floorf(rect.y + __floatIntegralEpsilon) + , floorf(rect.width + __floatIntegralEpsilon), floorf(rect.height + __floatIntegralEpsilon)); + } + + static Tizen::Graphics::Rectangle + ConvertToInteger(const Tizen::Graphics::FloatPoint& point, const Tizen::Graphics::FloatDimension& dim) + { + return Tizen::Graphics::Rectangle(floorf(point.x + __floatIntegralEpsilon), floorf(point.y + __floatIntegralEpsilon) + , floorf(dim.width + __floatIntegralEpsilon), floorf(dim.height + __floatIntegralEpsilon)); + } + + static Tizen::Graphics::Dimension + ConvertToInteger(const Tizen::Graphics::FloatDimension& dim) + { + return Tizen::Graphics::Dimension(floorf(dim.width + __floatIntegralEpsilon), floorf(dim.height + __floatIntegralEpsilon)); + } + + static Tizen::Graphics::Point + ConvertToInteger(const Tizen::Graphics::FloatPoint& point) + { + return Tizen::Graphics::Point(floorf(point.x + __floatIntegralEpsilon), floorf(point.y + __floatIntegralEpsilon)); + } + + static int + ConvertToInteger(float scalar) + { + return floorf(scalar + __floatIntegralEpsilon); + } + + // Transform Utilities + static Tizen::Graphics::Rectangle + Transform(const Tizen::Graphics::Rectangle& rect) + { + return GetTransformer()->Transform(rect); + } + + static Tizen::Graphics::FloatRectangle + Transform(const Tizen::Graphics::FloatRectangle& rect) + { + return GetTransformer()->Transform(rect); + } + + static Tizen::Graphics::Rectangle + Transform(const Tizen::Graphics::Point& point, const Tizen::Graphics::Dimension& dim) + { + return GetTransformer()->Transform(Tizen::Graphics::Rectangle(point, dim)); + } + + static Tizen::Graphics::FloatRectangle + Transform(const Tizen::Graphics::FloatPoint& point, const Tizen::Graphics::FloatDimension& dim) + { + return GetTransformer()->Transform(Tizen::Graphics::FloatRectangle(point, dim)); + } + + static Tizen::Graphics::Dimension + Transform(const Tizen::Graphics::Dimension& dim) + { + return GetTransformer()->Transform(dim); + } + + static Tizen::Graphics::FloatDimension + Transform(const Tizen::Graphics::FloatDimension& dim) + { + return GetTransformer()->Transform(dim); + } + + static Tizen::Graphics::Point + Transform(const Tizen::Graphics::Point& point) + { + return GetTransformer()->Transform(point); + } + + static Tizen::Graphics::FloatPoint + Transform(const Tizen::Graphics::FloatPoint& point) + { + return GetTransformer()->Transform(point); + } + + static int + HorizontalTransform(int scalar) + { + return GetTransformer()->TransformHorizontal(scalar); + } + + static float + HorizontalTransform(float scalar) + { + return GetTransformer()->TransformHorizontal(scalar); + } + + static int + VerticalTransform(int scalar) + { + return GetTransformer()->TransformVertical(scalar); + } + + static float + VerticalTransform(float scalar) + { + return GetTransformer()->TransformVertical(scalar); + } + + // InverseTransform Utilities + static Tizen::Graphics::Rectangle + InverseTransform(const Tizen::Graphics::Rectangle& rect) + { + return GetInverseTransformer()->Transform(rect); + } + + static Tizen::Graphics::FloatRectangle + InverseTransform(const Tizen::Graphics::FloatRectangle& rect) + { + return GetInverseTransformer()->Transform(rect); + } + + static Tizen::Graphics::Rectangle + InverseTransform(const Tizen::Graphics::Point& point, const Tizen::Graphics::Dimension& dim) + { + return GetInverseTransformer()->Transform(Tizen::Graphics::Rectangle(point, dim)); + } + + static Tizen::Graphics::FloatRectangle + InverseTransform(const Tizen::Graphics::FloatPoint& point, const Tizen::Graphics::FloatDimension& dim) + { + return GetInverseTransformer()->Transform(Tizen::Graphics::FloatRectangle(point, dim)); + } + + static Tizen::Graphics::Dimension + InverseTransform(const Tizen::Graphics::Dimension& dim) + { + return GetInverseTransformer()->Transform(dim); + } + + static Tizen::Graphics::FloatDimension + InverseTransform(const Tizen::Graphics::FloatDimension& dim) + { + return GetInverseTransformer()->Transform(dim); + } + + static Tizen::Graphics::Point + InverseTransform(const Tizen::Graphics::Point& point) + { + return GetInverseTransformer()->Transform(point); + } + + static Tizen::Graphics::FloatPoint + InverseTransform(const Tizen::Graphics::FloatPoint& point) + { + return GetInverseTransformer()->Transform(point); + } + + static int + InverseHorizontalTransform(int scalar) + { + return GetInverseTransformer()->TransformHorizontal(scalar); + } + + static float + InverseHorizontalTransform(float scalar) + { + return GetInverseTransformer()->TransformHorizontal(scalar); + } + + static int + InverseVerticalTransform(int scalar) + { + return GetInverseTransformer()->TransformVertical(scalar); + } + + static float + InverseVerticalTransform(float scalar) + { + return GetInverseTransformer()->TransformVertical(scalar); + } + +private: + _CoordinateSystemUtils(void); + ~_CoordinateSystemUtils(void); + + _CoordinateSystemUtils(const _CoordinateSystemUtils&); + _CoordinateSystemUtils& operator =(const _CoordinateSystemUtils&); + + static Tizen::Graphics::_ICoordinateSystemTransformer* + GetTransformer(void) + { + Tizen::Graphics::_ICoordinateSystemTransformer* pTransform = Tizen::Graphics::_CoordinateSystem::GetInstance()->GetTransformer(); + SysTryReturn(NID_GRP, pTransform, null, E_SYSTEM, "[E_SYSTEM] The valid coordinate transformer does not exist."); + + return pTransform; + } + + static Tizen::Graphics::_ICoordinateSystemTransformer* + GetInverseTransformer(void) + { + Tizen::Graphics::_ICoordinateSystemTransformer* pInverseTransform= Tizen::Graphics::_CoordinateSystem::GetInstance()->GetInverseTransformer(); + SysTryReturn(NID_GRP, pInverseTransform, null, E_SYSTEM, "[E_SYSTEM] The valid coordinate inverse transformer does not exist."); + + return pInverseTransform; + } + +private: + // WARNING: + // Some float functions like sin and cos emit too-much float-error. + // So, the rounding const must be a bigger value than expected. + static const float __floatIntegralEpsilon; +}; //class _CoordinateSystemUtils + +}} // Tizen::Graphics + +#endif //_FGRP_INTERNAL_COORDINATE_SYSTEM_UTILS_H_ diff --git a/src/graphics/inc/FGrp_EnrichedTextImpl.h b/src/graphics/inc/FGrp_EnrichedTextImpl.h new file mode 100644 index 0000000..7cef38d --- /dev/null +++ b/src/graphics/inc/FGrp_EnrichedTextImpl.h @@ -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 FGrp_EnrichedTextImpl.h + * @brief This is the header file for the _EnrichedTextImpl class. + * + * This header file contains the declarations of the %_EnrichedTextImpl class. + * + */ + +#ifndef _FGRP_INTERNAL_ENRICHED_TEXT_IMPL_H_ +#define _FGRP_INTERNAL_ENRICHED_TEXT_IMPL_H_ + +#include +#include +#include +#include + +#include +#include "FGrp_TextCommon.h" + +namespace Tizen { namespace Graphics { namespace _Text +{ +class TextObject; +}}} + +namespace Tizen { namespace Base { namespace Collection +{ +class LinkedList; +}}} // Tizen::Base::Collection + +namespace Tizen { namespace Base { namespace Utility +{ +class LinkInfo; +}}} // Tizen::Base::Utility + +namespace Tizen { namespace Graphics +{ +class TextElement; + +class _TextElementImpl; + +#define TEXT_HORIZONTAL_ALIGNMENT 0x0007 +#define TEXT_VERTICAL_ALIGNMENT 0x0f00 + +enum _TextWrapType +{ + //Wrap + TEXT_WRAP_TYPE_NONE, //default + TEXT_WRAP_TYPE_WRAP, + TEXT_WRAP_TYPE_WORDWRAP +}; + +class _EnrichedTextImpl +{ +public: + _EnrichedTextImpl(void); + virtual ~_EnrichedTextImpl(void); + + result Construct(const Tizen::Graphics::Dimension& dim); + result Construct(const Tizen::Graphics::FloatDimension& dim); + result InsertAt(int elementIndex, TextElement& element); + result RemoveAt(int elementIndex, bool deallocate); + result Remove(TextElement& element, bool deallocate); + result Add(TextElement& element); + result RemoveAllTextElements(bool deallocate); + result RemoveAll(bool deallocate); + TextElement* GetTextElementAt(int elementIndex) const; + int GetTextElementCount(void) const; + result SetSize(const Tizen::Graphics::Dimension& size); + result SetSize(const Tizen::Graphics::FloatDimension& size); + result SetSize(int width, int height); + result SetSize(float width, float height); + Tizen::Graphics::Dimension GetSize(void) const; + Tizen::Graphics::FloatDimension GetSizeF(void) const; + void GetSize(int& width, int& height) const; + void GetSize(float& width, float& height) const; + int GetWidth(void) const; + float GetWidthF(void) const; + int GetHeight(void) const; + float GetHeightF(void) const; + result SetVerticalAlignment(TextVerticalAlignment alignment); + result SetHorizontalAlignment(TextHorizontalAlignment alignment); + TextVerticalAlignment GetVerticalAlignment(void) const; + TextHorizontalAlignment GetHorizontalAlignment(void) const; + result SetTextWrapStyle(TextWrap wrap); + TextWrap GetTextWrapStyle(void) const; + result SetTextAbbreviationEnabled(bool enable); + bool IsTextAbbreviationEnabled(void) const; + result SetLineSpace(int lineSpace); + result SetLineSpace(float lineSpace); + int GetLineSpace(void) const; + float GetLineSpaceF(void) const; + void Refresh(void); + int GetTotalLineCount(void) const; + int GetTotalLineHeight(void) const; + float GetTotalLineHeightF(void) const; + int GetDisplayLineCount(void) const; + int GetLineLength(int lineIndex) const; + int GetFirstTextIndex(int lineIndex) const; + int GetLineIndex(int textIndex) const; + int GetLineHeight(int lineIndex) const; + float GetLineHeightF(int lineIndex) const; + int GetTextLength(void) const; + result GetTextExtent(int startTextIndex, int textLength, int& width, int& height, int& actualLength) const; + result GetTextExtent(int startTextIndex, int textLength, float& width, float& height, int& actualLength) const; + result GetTextExtent(int startTextIndex, int textLength, Tizen::Graphics::Dimension& size, int &actualLength) const; + result GetTextExtent(int startTextIndex, int textLength, Tizen::Graphics::FloatDimension& size, int &actualLength) const; + Tizen::Graphics::Dimension GetTextExtent(void) const; + Tizen::Graphics::FloatDimension GetTextExtentF(void) const; + result Add(const Tizen::Graphics::Bitmap& bitmap); + result InsertAt(int elementIndex, const Tizen::Graphics::Bitmap& bitmap); + result GetLinkInfoFromPosition(const Tizen::Graphics::Point& point, Tizen::Base::Utility::LinkInfo& linkInfo) const; + result GetLinkInfoFromPosition(const Tizen::Graphics::FloatPoint& point, Tizen::Base::Utility::LinkInfo& linkInfo) const; + result GetLinkInfoFromPosition(int x, int y, Tizen::Base::Utility::LinkInfo& linkInfo) const; + result GetLinkInfoFromPosition(float x, float y, Tizen::Base::Utility::LinkInfo& linkInfo) const; + TextVerticalAlignment GetElementVerticalAlignment(void) const; + result SetElementVerticalAlignment(TextVerticalAlignment alignment); + + Tizen::Graphics::Rectangle GetBounds(void) const; + Tizen::Graphics::FloatRectangle GetBoundsF(void) const; + result IndexOfFromLinkedList(TextElement& textElement, int& index); + int GetTextElementIndexFromPosition(Tizen::Graphics::Point& point) const; + int GetTextElementIndexFromPosition(Tizen::Graphics::FloatPoint& point) const; + Tizen::Graphics::_Text::TextObjectAlignment ConvertHAlignment(TextHorizontalAlignment halign); + TextHorizontalAlignment ConvertHAlignment(Tizen::Graphics::_Text::TextObjectAlignment halign); + Tizen::Graphics::_Text::TextObjectAlignment ConvertVAlignment(TextVerticalAlignment valign); + TextVerticalAlignment ConvertVAlignment(Tizen::Graphics::_Text::TextObjectAlignment valign); + _TextWrapType ConvertWrapType(TextWrap warp); + TextWrap ConvertWrap(_TextWrapType warp) const; + + Tizen::Graphics::_Text::TextObject* GetTextObject(void) const; + Tizen::Graphics::_Text::TextElementType GetTypeFromIndex(int textObjectIndex) const; + int GetIndexFromTouchPosition(int posX, int posY) const; + int GetIndexFromTouchPosition(float posX, float posY) const; + result RemoveFromTextObject(_TextElementImpl* pTextElementImpl); + result InsertAtFromTextObject(int index, _TextElementImpl* pTextElementImpl); + int GetTextElementIndex(_TextElementImpl* pTextElementImpl) const; + _EnrichedTextImpl* GetCloneN(void) const; + bool IsConstructed(void) const; + + static _EnrichedTextImpl* GetInstance(EnrichedText& enrichedText); + static const _EnrichedTextImpl* GetInstance(const EnrichedText& enrichedText); + +private: + float __width; + float __height; + float __lineSpace; + int __count; + TextVerticalAlignment __verticalAlignment; + TextHorizontalAlignment __horizontalAlignment; + TextVerticalAlignment __elementVerticalAlignment; + + Tizen::Graphics::_Text::TextObject* __pTextObject; + Tizen::Base::Collection::LinkedList* __pLinkedListTextElementList; + Tizen::Base::Collection::ArrayList __elements; + TextElement* __pTextElement; + bool __isCopiedEnrichedText; + +private: + _EnrichedTextImpl(const _EnrichedTextImpl& enrichedTextImpl); + _EnrichedTextImpl& operator =(const _EnrichedTextImpl& rhs); + +}; // _EnrichedTextImpl + +}} // Tizen::Graphics + +#endif // _FGRP_INTERNAL_ENRICHED_TEXT_IMPL_H_ diff --git a/src/graphics/inc/FGrp_FontImpl.h b/src/graphics/inc/FGrp_FontImpl.h new file mode 100644 index 0000000..5fa222a --- /dev/null +++ b/src/graphics/inc/FGrp_FontImpl.h @@ -0,0 +1,267 @@ +// +// 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_FontImpl.h + * @brief This is the header file for the _FontImpl class. + * + * This header file contains the declarations of the %_FontImpl class. + * + */ + +#ifndef _FGRP_INTERNAL_FONT_IMPL_H_ +#define _FGRP_INTERNAL_FONT_IMPL_H_ + + +#include +#include +#include + +namespace Tizen { namespace Base +{ +class String; +class ByteBuffer; +}} // Tizen::Base + +namespace Tizen { namespace Base { namespace Collection +{ +class IList; +}}} // Tizen::Base::Collection + +namespace Tizen { namespace Graphics +{ +class Dimension; +class FloatDimension; +class Font; + +class _Font; + +namespace _Text +{ +class TextUtility; +} + +struct _FloatPair +{ + float first; + float second; + + friend bool operator ==(const _FloatPair& lhs, const _FloatPair& rhs) + { + return (lhs.first == rhs.first) && (lhs.second == rhs.second); + } + + friend bool operator !=(const _FloatPair& lhs, const _FloatPair& rhs) + { + return !(operator ==(lhs, rhs)); + } +}; + +class _OSP_EXPORT_ _FontImpl + : public Tizen::Base::Object +{ +public: + _FontImpl(void); + virtual ~_FontImpl(void); + + result Construct(int style, int size); + result Construct(const Tizen::Base::String& fontName, int style, int size, bool isPathEnabled = true); + result Construct(const Tizen::Base::ByteBuffer& fontData, int style, int size); + result Construct(int style, float size); + result Construct(const Tizen::Base::String& fontNameOrPath, int style, float size, bool isPathEnabled = true); + result Construct(const Tizen::Base::ByteBuffer& fontData, int style, float size); + + bool IsConstructed(void) const; + + int GetMaxHeight(void) const; + float GetMaxHeightF(void) const; + int GetMaxWidth(void) const; + float GetMaxWidthF(void) const; + + int GetAscender(void) const; + float GetAscenderF(void) const; + int GetDescender(void) const; + float GetDescenderF(void) const; + + result GetLeftBear(wchar_t character, int& leftBear) const; + result GetLeftBear(wchar_t character, float& leftBear) const; + result GetRightBear(wchar_t character, int& rightBear) const; + result GetRightBear(wchar_t character, float& rightBear) const; + + result GetTextExtent(const Tizen::Base::String& text, int length, Dimension& dim, bool outline = false) const; + result GetTextExtent(const Tizen::Base::String& text, int length, FloatDimension& dim, bool outline = false) const; + + bool IsBold(void) const; + bool IsItalic(void) const; + bool IsPlain(void) const; + bool IsStrikeOut(void) const; + bool IsUnderlined(void) const; + + int GetSize(void) const; + float GetSizeF(void) const; + + result SetXExpansion(float xExpansion); + + void SetStrikeOut(bool strikeOut); + void SetUnderline(bool underline); + + void SetCharSpace(int space); + void SetCharSpace(float space); + int GetCharSpace(void) const; + float GetCharSpaceF(void) const; + + Tizen::Base::String GetFaceName(void) const; + static Tizen::Base::Collection::IList* GetSystemFontListN(void); + static Tizen::Base::String GetFaceName(const Tizen::Base::String& filePath); + + _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 + * + * @return An error code + * @param[in] width The width for calculating how many characters can be get in there + * The width must be greater than or equal to @c 0 + * @param[in] text The string + * @param[in] startIndex The start index + * @param[in] length The length of @c text + * @param[in] outline The outline effect of @c text + * @param[out] count The count of characters + * @param[out] dim The width and height of the font of the @c text which get in given width + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The value of @c width is greater than or equal to @c 0. + * @exception E_OPERATION_FAILED This instance is in an invalid state. + * @exception E_SYSTEM The system error occurs. + */ + result GetTextExtent(int width, const Tizen::Base::String& text, int startIndex, int length, bool outline, int& count, Dimension& dim) const; + result GetTextExtent(float width, const Tizen::Base::String& text, int startIndex, int length, bool outline, int& count, FloatDimension& dim) const; + + /* + * Gets the count and dimension of characters which can be get in the given width. @n + * + * @return An error code + * @param[in] width The width for calculating how many characters can be get in there + * The width must be greater than or equal to @c 0 + * @param[in] text The string + * @param[in] startIndex The start index + * @param[in] length The length of @c text + * @param[in] outline The outline effect of @c text + * @param[in] delimiter The delimiter + * @param[out] count The count of characters + * @param[out] dim The width and height of the font of the @c text which get in given width + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The value of @c width is greater than or equal to @c 0. + * @exception E_OPERATION_FAILED This instance is in an invalid state. + * @exception E_SYSTEM The system error occurs. + */ + result GetTextExtent(int width, const Tizen::Base::String& text, int startIndex, int length, bool outline, const Tizen::Base::String& delimiter, int& count, Dimension& dim) const; + result GetTextExtent(float width, const Tizen::Base::String& text, int startIndex, int length, bool outline, const Tizen::Base::String& delimiter, int& count, FloatDimension& dim) const; + + result GetTextExtentList(const Tizen::Base::String& text, int startIndex, int length, Tizen::Base::Collection::ArrayListT<_FloatPair>& outList) const; + + /* + * Sets the font size. + * + * @return An error code + * @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_OPERATION_FAILED This instance is in an invalid state. + * @exception E_SYSTEM The system error occurs. + */ + result SetSize(int size); + result SetSize(float size); + + /* + * Sets the font style. + * + * @return An error code + * @param[in] style The font style @n + * For more information, see Tizen::Graphics::FontStyle. + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG A specified input parameter is invalid. + * @exception E_OPERATION_FAILED This instance is in an invalid state. + * @exception E_SYSTEM The system error occurs. + */ + result SetStyle(int style); + + /* + * Gets the font style. + * + * @return the style of font + */ + int GetStyle(void) const; + + /* + * Gets the leading of the current instance of Font. + * + * @return the leading of the current instance of Font, @n + * else @c -1 if the method fails + */ + int GetLeading(void) const; + float GetLeadingF(void) const; + + static _FontImpl* GetInstance(Font& font); + static const _FontImpl* GetInstance(const Font& font); + + static bool UpdateDefaultFont(const Tizen::Base::String& key); + +protected: + unsigned long _magicKey; + struct _FontCoordHolder* _pCoordHolder; + Tizen::Graphics::_Font* _pNativeFont; + +private: + _FontImpl(const _FontImpl& obj); + _FontImpl& operator =(const _FontImpl& rhs); + + result __GetTextExtent(const wchar_t* text, int textLength, int length, FloatDimension& dim, bool outline = false) const; + result __GetTextExtent(float width, const wchar_t* text, int textLength, int startIndex, int length, bool outline, int& count, FloatDimension& dim) const; + + friend class _Font; + friend class _Text::TextUtility; + +}; // _FontImpl + +enum TextBidiHint +{ + TEXT_BIDI_HINT_NONE, + TEXT_BIDI_HINT_LTR, + TEXT_BIDI_HINT_RTL +}; + +_OSP_EXPORT_ void _SetTextBidiHint(TextBidiHint bidiHint); +_OSP_EXPORT_ TextBidiHint _GetTextBidiHint(void); + + +enum TextBidiBase +{ + TEXT_BIDI_BASE_LTR, + TEXT_BIDI_BASE_RTL +}; + +_OSP_EXPORT_ void _SetTextBidiBase(TextBidiBase bidiBase); +_OSP_EXPORT_ TextBidiBase _GetTextBidiBase(void); + +}} // Tizen::Graphics + +#endif // _FGRP_INTERNAL_FONT_IMPL_H_ diff --git a/src/graphics/inc/FGrp_GlPlayerImpl.h b/src/graphics/inc/FGrp_GlPlayerImpl.h new file mode 100644 index 0000000..4c4421f --- /dev/null +++ b/src/graphics/inc/FGrp_GlPlayerImpl.h @@ -0,0 +1,125 @@ +// +// 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_GlPlayerImpl.h + * @brief This is the header file for the _GlPlayerImpl class. + * + */ + +#ifndef _FGRP_GLPLAYERIMPL_H_ +#define _FGRP_GLPLAYERIMPL_H_ + +#include +#include +#include + +#include + +namespace Tizen { namespace Ui +{ +class Control; +}} + +namespace Tizen { namespace Graphics { namespace Opengl +{ + +class IGlRenderer; +class GlPlayer; + +class _OSP_EXPORT_ _GlPlayerImpl + : public Tizen::Base::Object + , public Tizen::Base::Runtime::ITimerEventListener +{ +public: + _GlPlayerImpl(void); + virtual ~_GlPlayerImpl(void); + + result Construct(EglContextClientVersion version, Tizen::Ui::Control* pControl); + result Start(void); + result Pause(void); + result Resume(void); + result Stop(void); + + result Redraw(void); + + result SetFps(int fps); + result SetIGlRenderer(IGlRenderer* pRenderer); + + result SetEglAttributeList(const EGLint* pEglConfigList); + result SetEglAttributePreset(EglAttributesPreset preset); + result SetEglAttribute(EGLint key, EGLint value); + + bool IsValid(void) const; + + //// function for ITimerEventListener + void OnTimerExpired(Tizen::Base::Runtime::Timer& timer); + +public: + static _GlPlayerImpl* GetInstance(GlPlayer& plyaer); + static const _GlPlayerImpl* GetInstance(const GlPlayer& player); + +private: + _GlPlayerImpl(const _GlPlayerImpl& rhs); + _GlPlayerImpl& operator =(const _GlPlayerImpl& rhs); + + bool __CheckReadyToStart(void); + bool __DestroyGl(void); + + result __Terminate(void); + +private: + IGlRenderer* __pRenderer; + + Tizen::Base::Runtime::Timer* __pTimer; + Tizen::Ui::Control* __pTargetControl; + + EGLDisplay __eglDisplay; + EGLSurface __eglSurface; + EGLConfig __eglConfig; + EGLContext __eglContext; + + /* + * EGL frame buffer configuration attributes are, + * EGL_ALPHA_MASK_SIZE, EGL_ALPHA_SIZE, EGL_BIND_TO_TEXTURE_RGB, EGL_BIND_TO_TEXTURE_RGBA, + * EGL_BLUE_SIZE, EGL_BUFFER_SIZE, EGL_COLOR_BUFFER_TYPE, EGL_CONFIG_CAVEAT, + * EGL_CONFIG_ID, EGL_CONFORMANT, EGL_DEPTH_SIZE, EGL_GREEN_SIZE, + * EGL_LEVEL, EGL_LUMINANCE_SIZE, EGL_MATCH_NATIVE_PIXMAP, EGL_NATIVE_RENDERABLE, + * EGL_MAX_SWAP_INTERVAL, EGL_MIN_SWAP_INTERVAL, EGL_RED_SIZE, EGL_SAMPLE_BUFFERS, + * EGL_SAMPLES, EGL_STENCIL_SIZE, EGL_RENDERABLE_TYPE, EGL_SURFACE_TYPE, + * EGL_TRANSPARENT_TYPE, EGL_TRANSPARENT_RED_VALUE, EGL_TRANSPARENT_GREEN_VALUE, EGL_TRANSPARENT_BLUE_VALUE + */ + EGLint __eglConfigList[60]; + + int __fps; + int __renderTimeInterval; // time interval between consecutive frames in microsecond units. + + EglContextClientVersion __eglContextClientVersion; + + enum + { + PLAYER_STATE_NOT_INITIALIZED = 0, + PLAYER_STATE_START = 1, + PLAYER_STATE_PAUSE = 2, + PLAYER_STATE_STOP = 3 + } __playerState; + +}; // _GlPlayerImpl + +}}} // Tizen::Graphics::Opengl + +#endif //_FGRP_GLPLAYERIMPL_H_ diff --git a/src/graphics/inc/FGrp_NonScale.h b/src/graphics/inc/FGrp_NonScale.h new file mode 100644 index 0000000..a3366f9 --- /dev/null +++ b/src/graphics/inc/FGrp_NonScale.h @@ -0,0 +1,70 @@ +// +// 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_NonScale.h + * @brief This is the header file for internal _NonScale namespace. + * + */ + +#ifndef _FGRP_INTERNAL_NONSCALE_H_ +#define _FGRP_INTERNAL_NONSCALE_H_ + + +#include + + +namespace Tizen { namespace Base +{ +class ByteBuffer; +}} // Tizen::Base + +namespace Tizen { namespace Graphics +{ + +class Dimension; +class FloatDimension; + +class _BitmapImpl; + +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 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); + +/* + * @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 Memory allocation failed. + */ +_OSP_EXPORT_ _BitmapImpl* CreateBitmapN(const Dimension& dim, BitmapPixelFormat pixelFormat); + +// _OSP_EXPORT_ _BitmapImpl* CreateBitmapN(const Rectangle& rect); +// _OSP_EXPORT_ _BitmapImpl* CreateBitmapN(const _Canvas& canvas, const Tizen::Graphics::Rectangle& rect); +// _OSP_EXPORT_ _BitmapImpl* CreateBitmapN(const _Bitmap& bitmap, const Tizen::Graphics::Rectangle& rect); +} // Tizen::Graphics::_NonScale + +}} // Tizen::Graphics + +#endif // _FGRP_INTERNAL_NONSCALE_H_ diff --git a/src/graphics/inc/FGrp_Screen.h b/src/graphics/inc/FGrp_Screen.h new file mode 100644 index 0000000..64534fb --- /dev/null +++ b/src/graphics/inc/FGrp_Screen.h @@ -0,0 +1,41 @@ +// +// 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_Screen.h + * @brief This is the header file for internal _Screen namespace. + * + */ + +#ifndef _FGRP_INTERNAL_SCREEN_H_ +#define _FGRP_INTERNAL_SCREEN_H_ + + +namespace Tizen { namespace Graphics +{ + +namespace _Screen +{ +_OSP_EXPORT_ int GetWidth(void); +_OSP_EXPORT_ int GetHeight(void); +_OSP_EXPORT_ int GetBytesPerPixel(void); + +} // Tizen::Graphics::_Screen + +}} // Tizen::Graphics + +#endif // #ifndef _FGRP_INTERNAL_SCREEN_H_ diff --git a/src/graphics/inc/FGrp_TextCommon.h b/src/graphics/inc/FGrp_TextCommon.h new file mode 100644 index 0000000..cfa6983 --- /dev/null +++ b/src/graphics/inc/FGrp_TextCommon.h @@ -0,0 +1,235 @@ +// +// 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_TextCommon.h + * @brief This file contains the declarations of text properties. + * + */ + +#ifndef _FGRP_INTERNAL_TEXT_COMMON_H_ +#define _FGRP_INTERNAL_TEXT_COMMON_H_ + +// Includes +#include +#include +#include +#include +#include + +// Forward Declarations +namespace Tizen { namespace Graphics +{ + +namespace _Text +{ + +enum TextLineReturnType +{ + TEXT_RETBY_NORMAL = 2, + TEXT_RETBY_LINEFEED, + TEXT_RETBY_LIMITWIDTH, + TEXT_RETBY_LIMITLENGTH, + TEXT_RETBY_OVERWIDTH, + TEXT_RETBY_LINEFEED_BIDI +}; + +enum TextElementType +{ + TEXT_ELEMENT_TYPE_NONE = 0, + TEXT_ELEMENT_TYPE_TEXT, + TEXT_ELEMENT_TYPE_IMAGE, + TEXT_ELEMENT_TYPE_CUTLINK, + TEXT_ELEMENT_TYPE_MAX +}; + +enum TextElementSourceType +{ + TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL = 0, + TEXT_ELEMENT_SOURCE_TYPE_INTERNAL, + TEXT_ELEMENT_SOURCE_TYPE_MAX +}; + +enum TextObjectWrapType +{ + TEXT_OBJECT_WRAP_TYPE_NONE = 0, + TEXT_OBJECT_WRAP_TYPE_CHARACTER, + TEXT_OBJECT_WRAP_TYPE_WORD +}; + +enum TextObjectEllipsisType +{ + TEXT_OBJECT_ELLIPSIS_TYPE_INVALID = -1, + TEXT_OBJECT_ELLIPSIS_TYPE_TAIL, + TEXT_OBJECT_ELLIPSIS_TYPE_MIDDLE, + TEXT_OBJECT_ELLIPSIS_TYPE_HEAD, + TEXT_OBJECT_ELLIPSIS_TYPE_MAX +}; + +enum TextObjectLinkColorType +{ + TEXT_OBJECT_LINK_COLOR_TYPE_NONE = -1, + TEXT_OBJECT_LINK_COLOR_TYPE_URL_NORMAL, + TEXT_OBJECT_LINK_COLOR_TYPE_URL_SELECT, + TEXT_OBJECT_LINK_COLOR_TYPE_EMAIL_NORMAL, + TEXT_OBJECT_LINK_COLOR_TYPE_EMAIL_SELECT, + TEXT_OBJECT_LINK_COLOR_TYPE_PHONE_NUMBER_NORMAL, + TEXT_OBJECT_LINK_COLOR_TYPE_PHONE_NUMBER_SELECT, + TEXT_OBJECT_LINK_COLOR_TYPE_MAX +}; + +enum TextObjectActionType +{ + TEXT_OBJECT_ACTION_TYPE_NONE = 0, + TEXT_OBJECT_ACTION_TYPE_ABBREV, + TEXT_OBJECT_ACTION_TYPE_SLIDE_LEFT, + TEXT_OBJECT_ACTION_TYPE_SLIDE_UP, + TEXT_OBJECT_ACTION_TYPE_MAX + +}; + +enum TextObjectSpaceHideType +{ + TEXT_OBJECT_SPACE_HIDE_TYPE_NONE = 0, + TEXT_OBJECT_SPACE_HIDE_TYPE_ONE, + TEXT_OBJECT_SPACE_HIDE_TYPE_ALL +}; + +enum TextComponentInfoValueType +{ + SET_FONT = 0, + SET_FONT_SIZE, + SET_FONT_STYLE, + SET_FONT_FGCOLOR, + SET_FONT_BGCOLOR, + SET_FONT_OUTLINECOLOR, + SET_ALTERNATE_DISPLAY_BITMAP, + MAX_TEXTOBJECT_VALUE, + SET_IMAGE_RECT, + SET_IMAGE_ALIGN, + MAX_IMAGEOBJECT_VALUE, + COMMONOBJECT_VALUE_START, + SET_ALTERNATE_LOOK = COMMONOBJECT_VALUE_START, + SET_ALTERNATIVE_FGCOLOR, + MAX_COMMONOBJECT_VALUE, + SET_TEXT_OFFSET, + SET_CUTLINK_TYPE, + SET_CUTLINK_EDITABLE, + SET_CUTLINK_EDITING, + SET_ALLVALUE_CLONE = 0xFF +}; + +enum TextObjectAlignmentType +{ + TEXT_OBJECT_ALIGNMENT_LEFT = 0x0001, + TEXT_OBJECT_ALIGNMENT_CENTER = 0x0002, + TEXT_OBJECT_ALIGNMENT_RIGHT = 0x0004, + TEXT_OBJECT_ALIGNMENT_TOP = 0x0100, + TEXT_OBJECT_ALIGNMENT_MIDDLE = 0x0200, + TEXT_OBJECT_ALIGNMENT_BOTTOM = 0x0400, + TEXT_OBJECT_ALIGNMENT_BASELINE = 0x0800, + TEXT_OBJECT_ALIGNMENT_INVALID = 0X1000 +}; + +enum TextAlignMask +{ + TEXT_ALIGNMASK_HORIZ = 0x0007, + TEXT_ALIGNMASK_VERT = 0x0F00 +}; + +enum TextObjectSweepType +{ + TEXT_OBJECT_SWEEP_TYPE_NONE = 0, + TEXT_OBJECT_SWEEP_TYPE_FORWARD, + TEXT_OBJECT_SWEEP_TYPE_BACKWARD, + TEXT_OBJECT_SWEEP_TYPE_KEYINPUT, + TEXT_OBJECT_SWEEP_TYPE_REPLACE, + TEXT_OBJECT_SWEEP_TYPE_INVALID +}; + +enum TextObjectSweepEventType +{ + TEXT_OBJECT_SWEEP_EVENT_NONE = 0, + TEXT_OBJECT_SWEEP_EVENT_INSERT, + TEXT_OBJECT_SWEEP_EVENT_REMOVE +}; + +struct TextObjectSweepInfo +{ + bool isValid; + TextObjectSweepType sweepType; + TextObjectSweepEventType sweepEventType; + int anchorTextIndex; + int anchorLineIndex; + int prevAnchorLineIndex; + int sweepRegionStartLineIndex; + int sweepRegionLineCount; + int insertedLineCount; + int deletedLineCount; + int widthChanged; +}; + +struct TextObjectSweepComposeLineInfo +{ + bool isValid; + int prevLineTextOffset; + int prevLineTextLength; + int prevLineWidth; + int currentLineTextOffset; + int currentLineTextLength; + int currentLineWidth; +}; + +struct BitmapDisplayProperty +{ + bool displayEnable; + 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 +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_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_JAPANESE_SPACE = 0x3000; +static const unsigned short TEXT_ZERO_WIDTH_SPACE = 0x200B; + +}}} // Tizen::Graphics::_Text + +#endif // _FGRP_INTERNAL_TEXT_COMMON_H_ + diff --git a/src/graphics/inc/FGrp_TextElementImpl.h b/src/graphics/inc/FGrp_TextElementImpl.h new file mode 100644 index 0000000..f3f8ddb --- /dev/null +++ b/src/graphics/inc/FGrp_TextElementImpl.h @@ -0,0 +1,135 @@ +// +// 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_TextElementImpl.h + * @brief This is the header file for the _TextElementImpl class. + * + * This header file contains the declarations of the %_TextElementImpl class. + * + */ + +#ifndef _FGRP_INTERNAL_TEXT_ELEMENT_IMPL_H_ +#define _FGRP_INTERNAL_TEXT_ELEMENT_IMPL_H_ + +// Includes +#include +#include + +#include "FGrp_TextCommon.h" + +namespace Tizen { namespace Graphics { namespace _Text +{ +class TextElement; +}}} + +namespace Tizen { namespace Graphics +{ +class _EnrichedTextImpl; + +enum _CutLinkType +{ + TEXT_CUTLINK_TYPE_INVALID = 0x0000, + TEXT_CUTLINK_TYPE_URL = 0x0001, + TEXT_CUTLINK_TYPE_EMAIL = 0x0002, + TEXT_CUTLINK_TYPE_PHONE_NUMBER = 0x0004, + TEXT_CUTLINK_TYPE_STREAMING_URL = 0x0008, //Not use in OSP. + TEXT_CUTLINK_TYPE_MAX = 0x7FFF +}; + +class _TextElementImpl +{ +public: + _TextElementImpl(void); + virtual ~_TextElementImpl(void); + + result Construct(const Tizen::Base::String& text); + result Construct(const Tizen::Base::String& text, const Tizen::Graphics::Canvas& canvas); + result Construct(void); + result Construct(const Tizen::Base::String& text, Tizen::Base::Utility::LinkType linkType, const Tizen::Base::String& link); + result Construct(const Tizen::Base::String& text, unsigned long autoLink); + result Construct(const Tizen::Base::String& text, Tizen::Base::Utility::LinkType linkType, const Tizen::Base::String& link, const Tizen::Graphics::Canvas& canvas); + result Construct(const Tizen::Base::String& text, unsigned long autoLink, const Tizen::Graphics::Canvas& canvas); + Tizen::Base::String& GetLink(void) const; + result SetText(const Tizen::Base::String& text); + result SetFont(const Tizen::Graphics::Font& font); + result SetTextColor(const Tizen::Graphics::Color& color); + result SetBackgroundColor(const Tizen::Graphics::Color& color); + result SetOutlineColor(const Tizen::Graphics::Color& color); + Tizen::Base::String& GetText(void) const; + Tizen::Graphics::Color GetTextColor(void) const; + Tizen::Graphics::Color GetBackgroundColor(void) const; + Tizen::Graphics::Color GetOutlineColor(void) const; + + _CutLinkType ConvertObjectLinkType(Tizen::Base::Utility::LinkType type); + Tizen::Base::Utility::LinkType ConvertObjectLinkType(_CutLinkType type); + const Tizen::Base::String& GetLinkText(void) const; + Tizen::Base::Utility::LinkType GetLinkType(void) const; + bool IsAuto(void) const; + _EnrichedTextImpl* GetRegisteringEnrichedText(void) const; + void SetRegisteringEnrichedText(_EnrichedTextImpl* pEnrichedTextImpl); + + result Create(const Tizen::Base::String& text, int length, Tizen::Graphics::_Text::TextElementSourceType srcType); + result CreateUserLink(const Tizen::Base::String& text, _CutLinkType linkType); + result CreateAutoLink(const Tizen::Base::String& text, unsigned long autoLink); + void Destroy(void); + _CutLinkType ConvertLinkType(Tizen::Base::Utility::LinkType type) const; + _CutLinkType GetCutLinkType(void) const; + int GetLength(void) const; + int GetAutolinkSrcOffset(void) const; + result SetTextObjectFont(const Tizen::Graphics::Font& font); + Tizen::Graphics::_Text::TextElement* GetComponent(void) const; + + const Tizen::Graphics::Font* GetFont(void) const; + unsigned long GetAutoLink(void) const; + bool IsBackgoundColorEnable(void) const; + bool IsOutlineColorEnable(void) const; + bool IsConstructed(void) const; + + static _TextElementImpl* GetInstance(TextElement& element); + static const _TextElementImpl* GetInstance(const TextElement& element); + +private: + Tizen::Base::String __strText; + Tizen::Graphics::Color __foregroundColor; + Tizen::Graphics::Color __backgroundColor; + Tizen::Graphics::Color __outlineColor; + Tizen::Graphics::Color __disableFGColor; + + Tizen::Base::String __linkText; + Tizen::Base::Utility::LinkType __linkType; + const Tizen::Graphics::Font* __pFont; + bool __isAuto; + bool __bgColorEnable; + bool __outlineColorEnable; + unsigned long __autoLink; + + _EnrichedTextImpl* __pRegisteringEnrichedText; + + int __count; + int __linkOffset; + Tizen::Graphics::_Text::TextElement* __pTextComponent; + +private: + _TextElementImpl(const _TextElementImpl& textElementImpl); + _TextElementImpl& operator =(const _TextElementImpl& rhs); + +}; // _TextElementImpl + +}} // Tizen::Graphics + +#endif // _FGRP_INTERNAL_TEXT_ELEMENT_IMPL_H_ diff --git a/src/graphics/inc/FGrp_TextTextCutLink.h b/src/graphics/inc/FGrp_TextTextCutLink.h new file mode 100644 index 0000000..d240aeb --- /dev/null +++ b/src/graphics/inc/FGrp_TextTextCutLink.h @@ -0,0 +1,119 @@ +// +// 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_TextTextCutLink.h + * @brief This is the header file for the TextCutLink class. + * + * This header file contains the declarations of the %TextCutLink class. + */ + +#ifndef _FGRP_INTERNAL_TEXT_CUTLINK_H_ +#define _FGRP_INTERNAL_TEXT_CUTLINK_H_ + +// Includes +#include "FGrp_TextCommon.h" +#include "FGrp_TextTextSimple.h" + +namespace Tizen { namespace Graphics +{ +class _CanvasImpl; + +namespace _Text +{ + +/** + * @class TextCutLink + * @brief + * @since 2.0 + */ +class _OSP_EXPORT_ TextCutLink + : public TextSimple +{ +public: + TextCutLink(bool isEditable, Tizen::Base::Utility::LinkType cutLinkType, const wchar_t* pText, int length, + TextElementSourceType sourceType = TEXT_ELEMENT_SOURCE_TYPE_INTERNAL, Font* pFont = null, + const Color& foregroundColor = Color::GetColor(COLOR_ID_BLACK), const Color& backgroundColor = Color::GetColor(COLOR_ID_WHITE), const Color& outlineColor = 0); + + virtual ~TextCutLink(void); + +public: + virtual TextElement* CloneN(TextComponentInfoValueType type, unsigned int value); + + virtual TextElement* CopyN(int startTextIndex, int textLength); + + virtual result ChangeTextOffset(wchar_t* pText, int gap); + + virtual unsigned int GetValue(TextComponentInfoValueType type) const; + + virtual result SetValue(TextComponentInfoValueType type, unsigned int value); + + virtual result SetTextOffset(int offset); + + virtual const Font* GetFont(void) const; + + bool GetEditable(void) const; + + void SetEditModeEnable(bool enable); + + bool IsEditModeEnable(void) const; + + Tizen::Base::Utility::LinkType GetCutLinkType(void) const; + + void SetSelect(bool isSelected); + + bool GetSelect(void) const; + + void SetUserColor(const Color& color, const Color& colorInSelect); + + void ResetUserColor(void); + +private: + virtual result Draw(_CanvasImpl& canvasImpl, Rectangle& displayRect, int startTextIndex, int textLength, const TextObjectAlignment align, + const TextObjectActionType action); + + virtual result Draw(_CanvasImpl& canvasImpl, FloatRectangle& displayRect, int startTextIndex, int textLength, const TextObjectAlignment align, + const TextObjectActionType action); + + virtual Font* GetCurrentFont(void) const; + + virtual Color GetCurrentForegroundColor(void) const; + + virtual Color GetCurrentBackgroundColor(void) const; + + virtual Color GetCurrentOutlineColor(void) const; + +private: + Tizen::Base::Utility::LinkType __linkType; + bool __isSelected; + Color __linkColor; + Color __linkSelectedColor; + bool __isColorDefined; + bool __isEditable; + bool __isEdited; + Font* __pLinkFont; + +private: + TextCutLink(const TextCutLink& other); // NOT IMPLMENTED + + TextCutLink& operator =(const TextCutLink& rhs); // NOT IMPLMENTED + +}; // TextCutLink + +}}} // Tizen::Graphics::_Text + +#endif // _FGRP_INTERNAL_TEXT_CUTLINK_H_ diff --git a/src/graphics/inc/FGrp_TextTextElement.h b/src/graphics/inc/FGrp_TextTextElement.h new file mode 100644 index 0000000..0675ab9 --- /dev/null +++ b/src/graphics/inc/FGrp_TextTextElement.h @@ -0,0 +1,131 @@ +// +// 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_TextTextElement.h + * @brief This is the header file for the TextElement class. + * + * This header file contains the declarations of the %TextElement class. + */ + +#ifndef _FGRP_INTERNAL_TEXT_COMPONENT_H_ +#define _FGRP_INTERNAL_TEXT_COMPONENT_H_ + +// Includes +#include +#include "FGrp_TextCommon.h" + +namespace Tizen { namespace Graphics +{ +class _CanvasImpl; + +namespace _Text +{ + +class _OSP_EXPORT_ TextElement + : public Tizen::Base::Object +{ +public: + TextElement(void); + + virtual ~TextElement(void); + +public: + virtual int ForwardAnalyze(int startTextIndex, int textLength, int maxWidth, TextObjectWrapType wrap, + int& actualLength, int& width, int& height); + + virtual int ForwardAnalyze(int startTextIndex, int textLength, float maxWidth, TextObjectWrapType wrap, + int& actualLength, float& width, float& height); + + virtual result Draw(_CanvasImpl& canvasImpl, Rectangle& displayRect, int startTextIndex, + int textLength, const TextObjectAlignment alignment, const TextObjectActionType action); + + virtual result Draw(_CanvasImpl& canvasImpl, FloatRectangle& displayRect, int startTextIndex, + int textLength, const TextObjectAlignment alignment, const TextObjectActionType action); + + virtual TextElement* CloneN(TextComponentInfoValueType type, unsigned int value); + + virtual TextElement* CopyN(int textStart, int textLength); + + virtual void CopyMembers(TextElement* pTargetTextElement); + + virtual result GetRegion(int textIndex, int textLength, int& width, int& height) const; + + virtual result GetRegion(int textIndex, int textLength, float& width, float& height) const; + + virtual int GetHeight(void) const; + + virtual float GetHeightF(void) const; + + virtual int GetTextLength(void) const; + + virtual void SetTextLength(int length); + + virtual unsigned int GetValue(TextComponentInfoValueType type) const; + + virtual result SetValue(TextComponentInfoValueType type, unsigned int value); + + virtual TextElementType GetType(void) const; + + virtual TextElementSourceType GetSourceType(void) const; + + virtual bool SetFocused(bool hasFocus); + + virtual bool GetFocused(void) const; + + virtual void SetAlternateLookEnabled(bool enable); + + virtual bool IsAlternateLookEnabled(void) const; + + virtual void SetAlternativeForegroundColor(const Color& foregroundColor); + + virtual Color GetAlternativeForegroundColor(void) const; + + virtual int GetBaseline(void) const; + + virtual float GetBaselineF(void) const; + + virtual void SetForegroundColor(const Color& color); + + virtual Color GetForegroundColor(void) const; + + virtual void SetBackgroundColor(const Color& color); + + virtual Color GetBackgroundColor(void) const; + + virtual void SetBackGroundDrawingModeEnabled(bool enable); + + virtual bool IsBackGroundDrawingModeEnable(void) const; + +protected: + TextElementType _type; + TextElementSourceType _sourceType; + Color _alternativeColor; + int _length; + bool _hasFocus; + bool _isAlternateLookEnabled; + +private: + TextElement(const TextElement& other); // NOT IMPLMENTED + + TextElement& operator =(const TextElement& rhs); // NOT IMPLMENTED + +}; // TextElement + +}}} // Tizen::Graphics::_Text + +#endif // _FGRP_INTERNAL_TEXT_COMPONENT_H_ diff --git a/src/graphics/inc/FGrp_TextTextImage.h b/src/graphics/inc/FGrp_TextTextImage.h new file mode 100644 index 0000000..a4560c1 --- /dev/null +++ b/src/graphics/inc/FGrp_TextTextImage.h @@ -0,0 +1,112 @@ +// +// 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_TextTextImage.h + * @brief This is the header file for the TextImage class. + * + * This header file contains the declarations of the %TextImage class. + */ + +#ifndef _FGRP_INTERNAL_TEXT_IMAGE_H_ +#define _FGRP_INTERNAL_TEXT_IMAGE_H_ + +// Includes +#include "FGrp_TextCommon.h" +#include "FGrp_TextTextElement.h" + +namespace Tizen { namespace Graphics +{ +class Bitmap; + +class _CanvasImpl; + +namespace _Text +{ + +/** + * @class TextImage + * @brief + * @since 2.0 + */ +class _OSP_EXPORT_ TextImage + : public TextElement +{ +public: + TextImage(Bitmap& bitmap, TextElementSourceType sourceType = TEXT_ELEMENT_SOURCE_TYPE_INTERNAL, + TextObjectAlignment align = TextObjectAlignment(TEXT_OBJECT_ALIGNMENT_LEFT | TEXT_OBJECT_ALIGNMENT_TOP)); + + virtual ~TextImage(void); + +public: + virtual int ForwardAnalyze(int startTextIndex, int textLength, float maxWidth, TextObjectWrapType wrap, + int& actualLength, float& width, float& height); + + virtual result Draw(_CanvasImpl& canvasImpl, FloatRectangle& displayRect, int startTextIndex, int textLength, + const TextObjectAlignment align, const TextObjectActionType action); + + virtual TextElement* CloneN(TextComponentInfoValueType type, unsigned int value); + + virtual TextElement* CopyN(int textStart, int textLength); + + virtual result GetRegion(int textIndex, int textLength, float& width, float& height) const; + + virtual int GetHeight(void) const; + + virtual float GetHeightF(void) const; + + virtual result SetValue(TextComponentInfoValueType type, unsigned int value); + + virtual unsigned int GetValue(TextComponentInfoValueType type) const; + + virtual void SetTextLength(int length); + + virtual int GetBaseline(void) const; + + virtual float GetBaselineF(void) const; + + result SetBounds(const Rectangle& rect); + + result SetBounds(const FloatRectangle& rect); + + Rectangle GetBounds(void) const; + + FloatRectangle GetBoundsF(void) const; + + result SetAlignment(TextObjectAlignment alignment); + + TextObjectAlignment GetAlignment(void) const; + + const Bitmap* GetBitmap(void) const; + +private: + Bitmap* __pBitmap; + FloatRectangle __rect; + TextObjectAlignment __align; + +private: + TextImage(void); // NOT IMPLMENTED + + TextImage(const TextImage& other); // NOT IMPLMENTED + + TextImage& operator =(const TextImage& rhs); // NOT IMPLMENTED + +}; // TextImage + +}}} // Tizen::Graphics::_Text + +#endif // _FGRP_INTERNAL_TEXT_IMAGE_H_ diff --git a/src/graphics/inc/FGrp_TextTextObject.h b/src/graphics/inc/FGrp_TextTextObject.h new file mode 100644 index 0000000..f030f31 --- /dev/null +++ b/src/graphics/inc/FGrp_TextTextObject.h @@ -0,0 +1,486 @@ +// +// 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_TextTextObject.h + * @brief This is the header file for the TextObject class. + * + * This file contains the declarations of TextObject class. + */ + +#ifndef _FGRP_INTERNAL_TEXT_OBJECT_H_ +#define _FGRP_INTERNAL_TEXT_OBJECT_H_ + +// Includes +#include "FGrp_TextCommon.h" +#include "FGrp_FontImpl.h" + +// Forward Declarations +namespace Tizen { namespace Graphics { + +class _CanvasImpl; +class Bitmap; +class Point; + +namespace _Text +{ +class TextElement; +class TextComposite; +class TextColumn; + +class _OSP_EXPORT_ TextObject +{ +public: + TextObject(void); + + virtual ~TextObject(void); + +public: + result Construct(void); + + result Construct(const Rectangle& rect); + + result Construct(const FloatRectangle& rect); + + TextObject* CloneN(void); + + result Draw(_CanvasImpl& canvasImpl); + + result DrawLine(_CanvasImpl& canvasImpl, int lineIndex); + + result DrawWithOffset(_CanvasImpl& canvasImpl); + + bool IsChanged(void) const; + + result Compose(void); + + result GetChangedLineRange(int& startChangedLineIndex, int& endChangedLineIndex); + + int GetText(wchar_t* pCopiedText, int textLength) const; + + result Remove(int startTextIndex, int textLength); + + result RemoveAll(bool deallocate = true); + + result RemoveElement(TextElement& textElement, bool deallocate); + + result RemoveElementAt(int elementIndex, bool deallocate); + + result AppendElement(TextElement& textElement); + + result AppendElement(Bitmap& bitmap, TextElementSourceType sourceType); + + result InsertElementAt(int textIndex, TextElement& textElement); + + result InsertElementAt(int textIndex, Bitmap& bitmap, TextElementSourceType sourceType); + + int GetElementIndexOf(TextElement& textElement) const; + + int GetElementCount(void) const; + + TextElement* GetElementAtElementIndex(int elementIndex) const; + + TextElement* GetElementAtTextIndex(int textIndex) const; + + int GetTextIndexFromPosition(int x, int y, bool cursorMode = true) const; + + int GetTextIndexFromPosition(float x, float y, bool cursorMode = true) const; + + int GetTextIndexFromPosition(float x, float y, int& row, int& column, bool cursorMode = true) const; + + int GetTextIndexFromPositionAtLine(int lineIndex, int x, bool cursorMode = true) const; + + int GetTextIndexFromPositionAtLine(int lineIndex, float x, bool cursorMode = true) const; + + result ChangeTextOffset(wchar_t* pText, int textIndex, int gap); + + result NotifyTextChanged(wchar_t* pText, int textOffset, int textLength, int gap); + + int GetTotalLineCount(void) const; + + int GetLineIndexAtTextIndex(int textIndex) const; + + int GetTotalHeight(void) const; + + float GetTotalHeightF(void) const; + + int GetLineHeightAt(int lineIndex) const; + + float GetLineHeightAtF(int lineIndex) const; + + int GetLineWidthAt(int lineIndex) const; + + float GetLineWidthAtF(int lineIndex) const; + + int GetDisplayLineCount(void) const; + + int GetLineIndexAtPositionY(int y) const; + + int GetLineIndexAtPositionY(float y) const; + + bool IsDisplayedFirstLine(void) const; + + bool IsDisplayedLastLine(void) const; + + int GetFirstTextIndexAt(int lineIndex) const; + + int GetTextLengthAt(int lineIndex) const; + + int GetMaxLineHeight(void) const; + + float GetMaxLineHeightF(void) const; + + int GetTextLength(void) const; + + Dimension GetTextExtent(int startTextIndex, int textLength) const; + + FloatDimension GetTextExtentF(int startTextIndex, int textLength) const; + + Dimension GetTextExtent(void) const; + + FloatDimension GetTextExtentF(void) const; + + result SetAction(TextObjectActionType action); + + TextObjectActionType GetAction(void) const; + + result SetAlignment(TextObjectAlignment alignment); + + TextObjectAlignment GetAlignment(void) const; + + result SetElementVerticalAlignment(TextObjectAlignment alignment); + + TextObjectAlignment GetElementVerticalAlignment(void) const; + + result SetBounds(const Rectangle& rect); + + result SetBounds(const FloatRectangle& rect); + + Rectangle GetBounds(void) const; + + FloatRectangle GetBoundsF(void) const; + + result SetLineSpace(int lineSpacing); + + result SetLineSpace(float lineSpacing); + + int GetLineSpace(void) const; + + float GetLineSpaceF(void) const; + + result SetRange(int startTextIndex, int textLength); + + void GetRange(int& startTextIndex, int& textLength) const; + + result SetFont(Font* pFont, int startTextIndex, int textLength); + + const Font* GetFont(int textIndex) const; + + // font size + result SetDefaultFontSize(int size); + + result SetDefaultFontSize(float size); + + int GetDefaultFontSize(void) const; + + float GetDefaultFontSizeF(void) const; + + result SetFontSize(int size, int startTextIndex, int textLength); + + result SetFontSize(float size, int startTextIndex, int textLength); + + int GetFontSize(int textIndex) const; + + float GetFontSizeF(int textIndex) const; + + // font style + + result SetDefaultFontStyle(int style); + + int GetDefaultFontStyle(void) const; + + result SetFontStyle(int style, int startTextIndex, int textLength); + + int GetFontStyle(int textIndex) const; + + // foreground color + + result SetDefaultForegroundColor(const Color& color); + + Color GetDefaultForegroundColor(void) const; + + result SetForegroundColor(const Color& color, int startTextIndex, int textLength); + + Color GetForegroundColor(int textIndex) const; + + // background color + + result SetBackgroundColor(const Color& color, int startTextIndex, int textLength); + + Color GetBackgroundColor(int textIndex) const; + + result SetOutlineColor(const Color& color, int startTextIndex, int textLength); + + Color GetOutlineColor(int textIndex) const; + + result SetDisplayBitmap(const Bitmap* pBitmap, int startTextIndex, int textLength); + + const Bitmap* GetDisplayBitmap(int textIndex) const; + + result SetWrap(TextObjectWrapType wrap); + + TextObjectWrapType GetWrap(void) const; + + result SetCursorIndex(int cursorIndex); + + int GetCursorIndex(void) const; + + result SetBlock(bool enable); + + bool GetBlock(void) const; + + result SetBlockRange(int startTextIndex, int textLength); + + void GetBlockRange(int& startTextIndex, int& textLength); + + result SetSlidingStep(int slidingStep); + + result SetSlidingStep(float slidingStep); + + int GetSlidingStep(void) const; + + float GetSlidingStepF(void) const; + + result SetAlternateLookEnabled(bool enable); + + bool IsAlternateLookEnabled(void) const; + + result SetFirstDisplayLineIndexFromTextIndex(int textIndex); + + result SetFirstDisplayLineIndex(int lineIndex); + + int GetFirstDisplayLineIndex(void) const; + + result SetFirstDisplayPositionY(int y); + + result SetFirstDisplayPositionY(float y); + + int GetFirstDisplayPositionY(void) const; + + float GetFirstDisplayPositionYF(void) const; + + result SetPartialComposingModeEnabled(bool enable); + + bool IsPartialComposingModeEnabled(void) const; + + result SetTextObjectEllipsisType(TextObjectEllipsisType type); + + TextObjectEllipsisType GetTextObjectEllipsisType(void) const; + + result HideFrontSpace(TextObjectSpaceHideType mode); + + result HideRearSpace(TextObjectSpaceHideType mode); + + result SetAlternativeForegroundColor(const Color& color); + + result SetCutLinkViewMode(bool enable); + + int GetTotalCutLinkElementCount(void) const; + + int GetCutLinkIndexFromPositionData(int x, int y) const; + + int GetCutLinkIndexFromPositionData(float x, float y) const; + + TextElement* GetCutLinkElementAtCutLinkElementIndex(int linkIndex) const; + + result ChangeCutLinkState(int linkIndex, bool select); + + result ResetAllCutLinkElementsState(void); + + result SetCutLinkColor(Tizen::Base::Utility::LinkType linkType, const Color& color, const Color& colorInSelect); + + result ResetCutLinkColor(Tizen::Base::Utility::LinkType linkType); + + result GetCutLinkBounds(int cutLinkIndex, Point& startPoint, Point& endPoint) const; + + result GetCutLinkBounds(int cutLinkIndex, FloatPoint& startPoint, FloatPoint& endPoint) const; + + bool IsActionOn(void) const; + + bool IsDisplayedAtStartPosition(void) const; + + bool IsDisplayedAtEndPosition(void) const; + + result GetTextPositionInfoAt(int textIndex, int& width, int& height, int& absX, int& absY, int& logicalX, int& logicalY) const; + + result GetTextPositionInfoAt(int textIndex, float& width, float& height, float& absX, float& absY, float& logicalX, float& logicalY) const; + + result GetTextPositionInfoAt(int row, int column, float& width, float& height, float& absX, float& absY, float& logicalX, float& logicalY) const; + + result GetBlockTextPositionInfoAt(int textIndex, int& width, int& height, int& absX, int& absY, int& logicalX, int& logicalY) const; + + result GetBlockTextPositionInfoAt(int textIndex, float& width, float& height, float& absX, float& absY, float& logicalX, float& logicalY) const; + + TextObjectSweepInfo GetSweepInfo(void) const; + + result ResetSweepInfo(void); + + result GetSweepComposeLineInfo(int lineIndex, TextObjectSweepComposeLineInfo& textSweepComposeLineInfo) const; + + int GetTextOffsetAtLine(int lineIndex) const; + + int GetTextLengthAtLine(int lineIndex) const; + + Rectangle GetBoundsAtLine(int lineIndex) const; + + FloatRectangle GetBoundsAtLineF(int lineIndex) const; + + result SetBlockColor(const Color& color); + + Color GetBlockColor(void) const; + + Tizen::Base::String GetDisplayableText(void); + + bool WordExceedsWidthAt(int lineIndex) const; + + result SetTextBidiHint(TextBidiHint bidiHint); + + TextBidiHint GetTextBidiHint(void) const; + + result SetFirstDisplayPositionX(int x); + + result SetFirstDisplayPositionX(float x); + + int GetFirstDisplayPositionX(void) const; + + float GetFirstDisplayPositionXF(void) const; + + result ConvertToRowColumn(int textIndex, int& row, int& column) const; + + int ConvertToTextIndex(int row, int column) const; + + result SetDisplayBoundsExpandEnabled(bool enable); + + bool IsDisplayBoundsExpandEnabled(void) const; + + result ChangeText(int textIndex); + + result InputText(int textIndex); + + result RemoveText(int textIndex); + + int GetRepeatCount(void) const; + +private: + result DrawByLine(_CanvasImpl& canvasImpl, const Rectangle& displayRect); + + result DrawByLine(_CanvasImpl& canvasImpl, const FloatRectangle& displayRect); + + int GetTotalComposedHeight(void) const; + + float GetTotalComposedHeightF(void) const; + + result GetTextPositionInfoInWrapAt(int textIndex, int& width, int& height, int& absX, int& absY, + int& logicalX, int& logicalY) const; + + result GetTextPositionInfoInWrapAt(int textIndex, float& width, float& height, float& absX, float& absY, + float& logicalX, float& logicalY) const; + + result GetTextPositionInfoInWrapAt(int row, int clomn, float& width, float& height, float& absX, float& absY, + float& logicalX, float& logicalY) const; + + result GetBlockTextPositionInfoInWrapAt(int textIndex, int& width, int& height, int& absX, int& absY, + int& logicalX, int& logicalY) const; + + result GetBlockTextPositionInfoInWrapAt(int textIndex, float& width, float& height, float& absX, float& absY, + float& logicalX, float& logicalY) const; + + result GetTextPositionInfoInNoneWrapAt(int textIndex, int& width, int& height, int& absX, int& absY, + int& logicalX, int& logicalY) const; + + result GetTextPositionInfoInNoneWrapAt(int textIndex, float& width, float& height, float& absX, float& absY, + float& logicalX, float& logicalY) const; + + result GetTextPositionInfoInNoneWrapAt(int row, int clomn, float& width, float& height, float& absX, float& absY, + float& logicalX, float& logicalY) const; + + int GetTextIndexFromPositionInWrap(int x, int y, bool cursorMode = true) const; + + int GetTextIndexFromPositionInWrap(float x, float y, bool cursorMode = true) const; + + int GetTextIndexFromPositionInWrap(float x, float y, int& row, int& column, bool cursorMode = true) const; + + int GetTextIndexFromPositionInNoneWrap(int x, int y, bool cursorMode = true) const; + + int GetTextIndexFromPositionInNoneWrap(float x, float y, bool cursorMode = true) const; + + int GetTextIndexFromPositionInNoneWrap(float x, float y, int& row, int& column, bool cursorMode = true) const; + + result UpdateChangedInfo(int startTextIndex, int textLength = -1); + + result NotifyTextAdded(int textIndex, int textLength); + + result NotifyTextDeleted(int textIndex, int textLength); + + result SetFirstDisplayLineIndexFromTextIndexInWrap(int textIndex); + + result SetFirstDisplayLineIndexFromTextIndexInNoneWrap(int textIndex); + + Point GetDisplayPositionAtLine(int lineIndex, int textIndexFromLineOffset); + + FloatPoint GetDisplayPositionAtLineF(int lineIndex, int textIndexFromLineOffset); + +// Attribute +private: + FloatRectangle __rect; + TextObjectActionType __action; + TextObjectAlignment __align; + TextObjectWrapType __wrap; + TextComposite* __pCompositeText; + TextColumn* __pTextColumn; + bool __isActionOn; + bool __isChanged; + bool __isAlternateLookEnabled; + bool __isDisplayBoundsExpandEnabled; + Font* __pDefaultFont; + Color __defaultForegroundColor; + Color __defaultBackgroundColor; + Color __defaultOutlineColor; + float __slidingStep; + float __slidingGap; + TextObjectEllipsisType __textObjectEllipsisType; + bool __isFirstDisplayPositionYChanged; + bool __linkViewModeEnabled; + bool __isUrlLinkColorDefined; + bool __isEmailLinkColorDefined; + bool __isPhoneNumberLinkColorDefined; + Color __linkColor[TEXT_OBJECT_LINK_COLOR_TYPE_MAX]; + TextBidiHint __bidiHint; + int __repeatCount; + + TextObjectSweepInfo __sweepInfo; + +private: + TextObject(const TextObject& other); // NOT IMPLMENTED + + TextObject& operator =(const TextObject& rhs); // NOT IMPLMENTED + +}; // TextObject + +}}} // Tizen::Graphics::_Text + +#endif // _FGRP_INTERNAL_TEXT_OBJECT_H_ diff --git a/src/graphics/inc/FGrp_TextTextSimple.h b/src/graphics/inc/FGrp_TextTextSimple.h new file mode 100644 index 0000000..8ce7270 --- /dev/null +++ b/src/graphics/inc/FGrp_TextTextSimple.h @@ -0,0 +1,212 @@ +// +// 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_TextTextSimple.h + * @brief This is the header file for the TextSimple class. + * + * This header file contains the declarations of the TextSimple class. + */ + +#ifndef _FGRP_INTERNAL_TEXT_SIMPLE_H_ +#define _FGRP_INTERNAL_TEXT_SIMPLE_H_ + +// Includes +#include "FGrp_TextCommon.h" +#include "FGrp_TextTextElement.h" + +namespace Tizen { namespace Graphics +{ +class _CanvasImpl; + +namespace _Text +{ + +enum WordType +{ + WORD_ENTER = 0, + WORD_SPACE, + WORD_WORD, + WORD_ERROR +}; + +class _OSP_EXPORT_ TextSimple + : public TextElement +{ +public: + TextSimple(const wchar_t* pText, int length, TextElementSourceType sourceType = TEXT_ELEMENT_SOURCE_TYPE_INTERNAL, Font* pFont = null, + const Color& foregroundColor = Color::GetColor(COLOR_ID_BLACK), const Color& backgroundColor = Color::GetColor(COLOR_ID_WHITE), + const Color& outlineColor = 0); + + virtual ~TextSimple(void); + +public: + virtual result Draw(_CanvasImpl& canvasImpl, Rectangle& displayRect, int startTextIndex, int textLength, + const TextObjectAlignment alignment, const TextObjectActionType action); + + virtual result Draw(_CanvasImpl& canvasImpl, FloatRectangle& displayRect, int startTextIndex, int textLength, + const TextObjectAlignment alignment, const TextObjectActionType action); + + virtual int ForwardAnalyze(int startTextIndex, int textLength, int maxWidth, TextObjectWrapType wrap, + int& actualLength, int& width, int& height); + + virtual int ForwardAnalyze(int startTextIndex, int textLength, float maxWidth, TextObjectWrapType wrap, + int& actualLength, float& width, float& height); + + virtual TextElement* CloneN(TextComponentInfoValueType type, unsigned int value); + + virtual TextElement* CopyN(int startTextIndex, int textLength); + + virtual result GetRegion(int textIndex, int textLength, int& width, int& height) const; + + virtual result GetRegion(int textIndex, int textLength, float& width, float& height) const; + + virtual int GetHeight(void) const; + + virtual float GetHeightF(void) const; + + virtual unsigned int GetValue(TextComponentInfoValueType type) const; + + virtual result SetValue(TextComponentInfoValueType type, unsigned int value); + + virtual result ChangeTextOffset(wchar_t* pText, int gap); + + virtual result SetTextOffset(int offset); + + virtual int GetBaseline(void) const; + + virtual float GetBaselineF(void) const; + + int GetTextOffset(void) const; + + result SetFont(const Font* pFont); + + virtual const Font* GetFont(void) const; + + virtual void SetForegroundColor(const Color& color); + + virtual Color GetForegroundColor(void) const; + + virtual void SetBackgroundColor(const Color& color); + + virtual Color GetBackgroundColor(void) const; + + void SetOutlineColor(const Color& color); + + Color GetOutlineColor(void) const; + + virtual void SetBackGroundDrawingModeEnabled(bool enable); + + virtual bool IsBackGroundDrawingModeEnable(void) const; + + const wchar_t* GetTextSource(void) const; + + const wchar_t* GetText(void) const; + + bool IsSame(wchar_t* pText, Font* pFont, const Color& foregroundColor, + const Color& backgroundColor, const Color& outlineColor, const bool isBitmapDisplayMode) const; + + void SetUserWrap(TextObjectWrapType userWrap); + + int GetWordLength(int textIndex, int& wordLength) const; + + result SetBitmap(const Bitmap& bitmap); + + result SetBitmap(BitmapDisplayProperty bitmapDisplayProperty); + + const Bitmap* GetBitmap(void) const; + + bool IsBitmapDisplayMode(void) const; + + bool IsLeadingCharacter(const wchar_t ch) const; + + bool IsFollowingCharacter(const wchar_t ch) const; + + bool IsDelimiter(const wchar_t ch) const; + + 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; + + bool IsJapanese(const wchar_t ch) const; + + int GetSentenceLength(const wchar_t* pText, int textLength, int& actualLength) const; + + int GetWordWrapLength(const wchar_t* pText, int textLength, int& actualLength) const; + + int GetWordWrapLengthEx(const wchar_t* pText, int textLength, int& actualLength) const; + + int GetGlyphedLength(const wchar_t* pText, int textLength, int& actualLength) const; + + void SetTextShadowColor(void); + +protected: + virtual Font* GetCurrentFont(void) const; + + virtual Color GetCurrentForegroundColor(void) const; + + virtual Color GetCurrentBackgroundColor(void) const; + + virtual Color GetCurrentOutlineColor(void) const; + +protected: + const wchar_t* _pText; + Font* _pFont; + TextObjectWrapType _userWrap; + Color _foregroundColor; + Color _backgroundColor; + Color _outlineColor; + bool _outline; + int _offset; + bool _isBackgroundDrawingModeEnabled; + bool _shadow; + Color _shadowColor; + FloatPoint _shadowOffset; + int _opacity; + +private: + BitmapDisplayProperty __bitmapProperty; + +private: + TextSimple(const TextSimple& other); // NOT IMPLMENTED + + TextSimple& operator =(const TextSimple& rhs); // NOT IMPLMENTED + +}; // TextSimple + +}}} // Tizen::Graphics::_Text + +#endif // _FGRP_INTERNAL_TEXT_SIMPLE_H_ diff --git a/src/graphics/inc/FGrp_VideoTextureImpl.h b/src/graphics/inc/FGrp_VideoTextureImpl.h new file mode 100644 index 0000000..b21673b --- /dev/null +++ b/src/graphics/inc/FGrp_VideoTextureImpl.h @@ -0,0 +1,67 @@ +// +// 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_VideoTextureImpl.h + * @brief This is the header file for the _VideoTextureImpl class. + * + */ + +#ifndef _FGRP_VIDEO_TEXTUREIMPL_H_ +#define _FGRP_VIDEO_TEXTUREIMPL_H_ + +#include + +namespace Tizen { namespace Graphics { namespace Opengl +{ + +class VideoTexture; +class _VideoTexture; +class IVideoTextureUpdateListener; + +class _OSP_EXPORT_ _VideoTextureImpl + : public Tizen::Base::Object +{ +public: + _VideoTextureImpl(void); + virtual ~_VideoTextureImpl(void); + + result Construct(int textureId, int width, int height); + result BindTexture(void); + void AddVideoTextureUpdateListener(IVideoTextureUpdateListener& listener, VideoTexture* pVideoTexture); + void RemoveVideoTextureUpdateListener(IVideoTextureUpdateListener& listener); + +public: + static _VideoTextureImpl* GetInstance(VideoTexture& videoTexture); + static const _VideoTextureImpl* GetInstance(const VideoTexture& videoTexture); + static unsigned int GetPixmap(void* pData); + static void PixmapErrorCallback(unsigned int* pPixmap, void* pData); + +private: + + _VideoTextureImpl(const _VideoTextureImpl& rhs); + _VideoTextureImpl& operator =(const _VideoTextureImpl& rhs); + +private: + _VideoTexture* __pNativeVideoTexture; + + friend class VideoTexture; +}; // VideoTexture + +}}} // Tizen::Graphics + +#endif //_FGRP_VIDEO_TEXTUREIMPL_H_ diff --git a/src/graphics/opengl/CMakeLists.txt b/src/graphics/opengl/CMakeLists.txt new file mode 100644 index 0000000..d143fd1 --- /dev/null +++ b/src/graphics/opengl/CMakeLists.txt @@ -0,0 +1,40 @@ +SET (this_target opengl) + +INCLUDE_DIRECTORIES( + ${SLP_INCLUDE_DIRS} + ${CMAKE_SOURCE_DIR}/inc + ${CMAKE_SOURCE_DIR}/src/graphics/inc + ${CMAKE_SOURCE_DIR}/src/ui/inc + /usr/include/osp + /usr/include/osp/base + /usr/include/osp/ui +) + +SET (${this_target}_SOURCE_FILES + FGrpEgl.cpp + FGrpGles1.cpp + FGrpGles2.cpp + FGrpGlPlayer.cpp + FGrp_GlPlayerImpl.cpp + FGrpCanvasTexture.cpp + FGrp_CanvasTexture.cpp + FGrp_CanvasTextureImpl.cpp + FGrpVideoTexture.cpp + FGrp_VideoTexture.cpp + FGrp_VideoTextureImpl.cpp +) + +## Add Definitions +ADD_DEFINITIONS(${OSP_DEFINITIONS} -D_MODEL_RES_WVGA) + +## SET EXTRA COMPILER FLAGS +SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fPIC" ) + +## SET C COMPILER FLAGS +SET(CMAKE_C_FLAGS "${OSP_DEBUG_FLAGS} ${OSP_OPT_FLAGS} ${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} ${OSP_COMPILER_FLAGS}") + +## SET CPP COMPILER FLAGS +SET(CMAKE_CXX_FLAGS "${OSP_DEBUG_FLAGS} ${OSP_OPT_FLAGS} ${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS} ${OSP_COMPILER_FLAGS}") + +## Create Library +ADD_LIBRARY (${this_target} STATIC ${${this_target}_SOURCE_FILES}) diff --git a/src/graphics/opengl/FGrpCanvasTexture.cpp b/src/graphics/opengl/FGrpCanvasTexture.cpp new file mode 100644 index 0000000..8cbbfe9 --- /dev/null +++ b/src/graphics/opengl/FGrpCanvasTexture.cpp @@ -0,0 +1,68 @@ +// +// 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 FGrpCanvasTexture.cpp + * @brief This is the implementation file for CanvasTexture class. + * + */ + +#include + +#include +#include +#include +#include + +#include "FGrp_CanvasTextureImpl.h" + +using namespace Tizen::Graphics; + +namespace Tizen { namespace Graphics { namespace Opengl +{ + +CanvasTexture::CanvasTexture(void) + : __pImpl(new (std::nothrow)_CanvasTextureImpl) +{ +} + +CanvasTexture::~CanvasTexture(void) +{ + delete this->__pImpl; +} + +result +CanvasTexture::Construct(int textureId, int width, int height) +{ + SysTryReturnResult(NID_GRP, this->__pImpl != null, E_OUT_OF_MEMORY, "Memory allocation failed.\n"); + + result r = this->__pImpl->Construct(textureId, width, height); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +Canvas* +CanvasTexture::GetCanvasN(void) const +{ + SysAssert(this->__pImpl != null); + + return this->__pImpl->GetCanvasN(); +} + +}}} // Tizen::Graphics::Opengl diff --git a/src/graphics/opengl/FGrpEgl.cpp b/src/graphics/opengl/FGrpEgl.cpp new file mode 100644 index 0000000..32108a9 --- /dev/null +++ b/src/graphics/opengl/FGrpEgl.cpp @@ -0,0 +1,2732 @@ +// +// 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 FGrpEgl.cpp + * @brief This is the implementation file for egl. + * + */ + +#include +#include + +#include +#include +#include +#include + +#if defined(_OSP_EMUL_) +#define FGRAPHICS_INTERNAL_USE_EGLCOPYBUFFER +#else +#define FGRAPHICS_INTERNAL_USE_DRM +#endif + +#define FGRAPHICS_INTERNAL_USE_DYNAMIC_LOADING +#if defined(FGRAPHICS_INTERNAL_USE_DYNAMIC_LOADING) +#include +#endif + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include + +#if defined(FGRAPHICS_INTERNAL_USE_DRM) +#include +#include +#include +#include +#include +#endif + +typedef int _SglIndex; + +EGLSurface +_SglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint* pAttribList); +EGLSurface _SglGetCurrentSurface(EGLint readDraw); +EGLNativePixmapType _CreateNativePixmap(_SglIndex sglIndex, Tizen::Graphics::Bitmap* pixmap); +EGLNativePixmapType _CreateNativePixmapEx(Tizen::Graphics::Bitmap* pBitmap, Tizen::Graphics::BufferInfo bufferInfo); + +#if defined(FGRAPHICS_INTERNAL_USE_DYNAMIC_LOADING) +void _GlesInterfaceTerminate_1(); +void _GlesInterfaceTerminate_2(); +#endif + +#include + +void _GlFlush_1(void); +void _GlFlush_2(void); +void _GlClear_1(GLbitfield mask); +void _GlClear_2(GLbitfield mask); + +EGLBoolean _SglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx); + +using namespace Tizen::Ui::Controls; + +#ifdef __cplusplus +} +#endif + +using namespace Tizen::Ui::Animations; +using namespace Tizen::Ui; +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; + +namespace Tizen { namespace Graphics +{ + +namespace Opengl +{ + +namespace // unnamed +{ + +PFNEGLCREATEIMAGEKHRPROC eglCreateImageKHR = null; +PFNEGLDESTROYIMAGEKHRPROC eglDestroyImageKHR = null; + +class _SglInfo; + +#define FGRAPHICS_INTERNAL_USE_RESTORE_CONTEXT +#if defined(FGRAPHICS_INTERNAL_USE_RESTORE_CONTEXT) +void __RestoreContext(void); +void _PostRenderCallback(Ecore_Evas* ee); +void _SaveCurrentContext(_SglInfo* pSglInfo); +void _UnregisterRenderCallback(Evas_Object* pObject); +int __registerCallbackCount = 0; +_SglInfo* __pPreviousSglInfo = null; +Queue* __pSwapQueue = null; + +bool __needRestoreContext = false; +#endif + +#if !defined (_OSP_EMUL_) +#define FGRAPHICS_INTERNAL_USE_DOUBLE_PIXMAP +#endif + +enum _engineType +{ + ENGINE_TYPE_SOFEWARE_X11 = 0, + ENGINE_TYPE_OPENGL_X11, + ENGINE_TYPE_ETC, +}; + +_engineType __evasEngineType = ENGINE_TYPE_SOFEWARE_X11; +bool __isDoublePixmapEnabled = false; + +void _OnBoundsChanged(void* pData); + +const int INVALID_SGL_INDEX = 0; +const int MAX_SGL_INDEX = 100; + +class _SglInfo + : public Tizen::Base::Object +{ +public: + _SglInfo(void) + : sglIndex(INVALID_SGL_INDEX) + , display(EGL_NO_DISPLAY) + , surface(EGL_NO_SURFACE) + , context(EGL_NO_CONTEXT) + , config((EGLConfig)0) + , pBitmap(null) + , pObject(null) + , nativePixmap((EGLNativePixmapType)0) + , pVisualElement(null) + , pVisualElementSurface(null) + , glVersion(0) + , pWindow(null) +#if defined(FGRAPHICS_INTERNAL_USE_EGLCOPYBUFFER) + , pEcoreImage(null) + , width(0) + , height(0) +#endif + , isBackbuffer(true) + , isFirstSwap(true) + , pSecondSglInfo(null) + , pBitmapPointer(null) + , pBitmapLocked(null) + , pBitmapCopyNeeded(null) + , isCopyNeeded(false) + { + } + + virtual ~_SglInfo(void) + { +#if defined(FGRAPHICS_INTERNAL_USE_EGLCOPYBUFFER) + if (pEcoreImage != null) + { + ecore_x_image_free(pEcoreImage); + } +#endif + + if (pObject == null) + { + return; + } + + if (pVisualElement != null) + { + _VisualElementImpl* pVisualElementImpl = _VisualElementImpl::GetInstance(*pVisualElement); + if (pVisualElementImpl != null) + { + pVisualElementImpl->SetBoundsChangedCallback(null, null); + pVisualElementImpl->SetDestroyedCallback(null, null); + } + } + + evas_object_del(pObject); + delete pVisualElementSurface; + delete pBitmap; + delete pBitmapCopyNeeded; + + bool needAllocateObject = true; + if (__isDoublePixmapEnabled) + { + if (!isBackbuffer) + { + needAllocateObject = false; + } + } + if (needAllocateObject) + { + if (pVisualElement != null) + { + pVisualElement->SetSurface(null); + } + } + + sglIndex = INVALID_SGL_INDEX; + display = EGL_NO_DISPLAY; + surface = EGL_NO_SURFACE; + context = EGL_NO_CONTEXT; + config = (EGLConfig)0; + pBitmap = null; + pObject = null; + nativePixmap = (EGLNativePixmapType)0; + pVisualElement = null; + pVisualElementSurface = null; + glVersion = 0; + pWindow = null; +#if defined(FGRAPHICS_INTERNAL_USE_EGLCOPYBUFFER) + pEcoreImage = null; + width = 0; + height = 0; +#endif + isBackbuffer = true; + isFirstSwap = true; + pSecondSglInfo = null; + + pBitmapCopyNeeded = null; + isCopyNeeded = false; + } + +public: + _SglIndex sglIndex; + EGLDisplay display; + EGLSurface surface; + EGLContext context; + EGLConfig config; + Bitmap* pBitmap; + Evas_Object* pObject; + EGLNativePixmapType nativePixmap; + VisualElement* pVisualElement; + VisualElementSurface* pVisualElementSurface; + int glVersion; + Tizen::Ui::Window* pWindow; +#if defined(FGRAPHICS_INTERNAL_USE_EGLCOPYBUFFER) + Ecore_X_Image* pEcoreImage; + int width; + int height; +#endif + bool isBackbuffer; + bool isFirstSwap; + _SglInfo* pSecondSglInfo; + void* pBitmapPointer; + Bitmap* pBitmapLocked; + + Bitmap* pBitmapCopyNeeded; + bool isCopyNeeded; + +private: + _SglInfo(const _SglInfo& sglInfo); + _SglInfo& operator =(const _SglInfo& rhs); +}; + +class _PixmapInfo +{ +public: + _PixmapInfo(void) + : nativePixmap((Pixmap)0) +#if defined(FGRAPHICS_INTERNAL_USE_DRM) + , pTbmBufMgr(null) + , pTbmBufferObject(null) + , drmFd(0) +#endif + { + } + + virtual ~_PixmapInfo(void) + { + Display* pDisplay = (Display*)ecore_x_display_get(); +#if defined(FGRAPHICS_INTERNAL_USE_DRM) + tbm_bo_unmap(pTbmBufferObject); + tbm_bo_unref(pTbmBufferObject); + if (pTbmBufMgr) + { + close(drmFd); + } + + tbm_bufmgr_deinit(pTbmBufMgr); + DRI2DestroyDrawable(pDisplay, nativePixmap); +#endif + XFreePixmap(pDisplay, nativePixmap); + + nativePixmap = (Pixmap)0; +#if defined(FGRAPHICS_INTERNAL_USE_DRM) + pTbmBufMgr = null; + pTbmBufferObject = null; + drmFd = 0; +#endif + } + +public: + Pixmap nativePixmap; +#if defined(FGRAPHICS_INTERNAL_USE_DRM) + tbm_bufmgr pTbmBufMgr; + tbm_bo pTbmBufferObject; + int drmFd; +#endif +}; + +void _EvasObjectImageChange(_SglInfo* pSglInfo); + +void +_OnBoundsChanged(void* pData) +{ + _SglInfo* pSglInfo = dynamic_cast<_SglInfo*> ((_SglInfo*)pData); + SysTryReturnVoidResult(NID_GRP, pSglInfo != null + && pSglInfo->sglIndex > INVALID_SGL_INDEX + && pSglInfo->pVisualElement != null + && pSglInfo->pWindow != null + , E_INVALID_STATE, "[E_INVALID_STATE] Invalid state."); + + if (__pSwapQueue != null && __pSwapQueue->Contains(*pSglInfo)) + { + int count = __pSwapQueue->GetCount(); + for (int i = 0; i < count; i++) + { + _SglInfo* pObject = dynamic_cast<_SglInfo*> (__pSwapQueue->Dequeue()); + if (pObject != pSglInfo) + { + __pSwapQueue->Enqueue(pObject); + } + } + } + + if (pSglInfo == __pPreviousSglInfo || pSglInfo->pSecondSglInfo == __pPreviousSglInfo) + { + __pPreviousSglInfo = null; + } + + bool needSglMakeCurrent = false; + EGLDisplay eglDisplay = eglGetCurrentDisplay(); + EGLSurface drawSurface = _SglGetCurrentSurface(EGL_DRAW); + EGLSurface readSurface = _SglGetCurrentSurface(EGL_READ); + EGLContext eglContext = eglGetCurrentContext(); + + if (drawSurface != EGL_NO_SURFACE && readSurface != EGL_NO_SURFACE) + { + needSglMakeCurrent = true; + } + else + { + drawSurface = eglGetCurrentSurface(EGL_DRAW); + readSurface = eglGetCurrentSurface(EGL_READ); + } + + 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, "[E_OPERATION_FAILED] eglDestroySurface failed."); + +#if defined(FGRAPHICS_INTERNAL_USE_EGLCOPYBUFFER) + if (pSglInfo->pEcoreImage != null) + { + ecore_x_image_free(pSglInfo->pEcoreImage); + pSglInfo->pEcoreImage = null; + } +#endif + + 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, "[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, "[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); + + delete pSglInfo->pBitmap; + pSglInfo->pBitmap = null; + 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)); + EGLNativePixmapType nativePixmap = _CreateNativePixmap(pSglInfo->sglIndex, bitmap.get()); + 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, "[E_OPERATION_FAILED] eglCreatePixmapSurface failed."); + + pSglInfo->nativePixmap = nativePixmap; + pSglInfo->surface = eglSurface; + pSglInfo->isBackbuffer = true; + pSglInfo->isFirstSwap = true; + + if (__isDoublePixmapEnabled) + { + _SglInfo* pSglInfoSecond = pSglInfo->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, "[E_OPERATION_FAILED] eglDestroySurface failed."); + + evas_object_image_size_set(pSglInfoSecond->pObject, widthPhysical, heightPhysical); + evas_object_resize(pSglInfoSecond->pObject, widthPhysical, heightPhysical); + + delete pSglInfoSecond->pBitmap; + pSglInfoSecond->pBitmap = null; + std::auto_ptr bitmapSecond(new (std::nothrow) Bitmap); + 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, "[%s] Propagating.", GetErrorMessage(r)); + EGLNativePixmapType nativePixmap = _CreateNativePixmap(pSglInfoSecond->sglIndex, bitmapSecond.get()); + 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, "[E_OPERATION_FAILED] eglCreatePixmapSurface failed."); + + pSglInfoSecond->nativePixmap = nativePixmap; + pSglInfoSecond->surface = eglSurface; + pSglInfoSecond->pBitmap = bitmapSecond.release(); + pSglInfoSecond->isBackbuffer = true; + + pSglInfo->isFirstSwap = true; + + _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); + + BufferInfo bufferInfo; + pSglInfo->pBitmap->Lock(bufferInfo); + pSglInfo->pBitmap->Unlock(); + + if (needSglMakeCurrent) + { + _SglMakeCurrent(eglDisplay, drawSurface, readSurface, eglContext); + } + else + { + eglMakeCurrent(eglDisplay, drawSurface, readSurface, eglContext); + } + +#if defined(FGRAPHICS_INTERNAL_USE_RESTORE_CONTEXT) + __needRestoreContext = false; +#endif + + return; +} + +void +_OnDestroyed(void* pData) +{ + _SglInfo* pSglInfo = dynamic_cast<_SglInfo*> ((_SglInfo*)pData); + + if (pSglInfo != null) + { + pSglInfo->pVisualElement = null; + + if (__isDoublePixmapEnabled && pSglInfo->pSecondSglInfo != null) + { + pSglInfo->pSecondSglInfo->pVisualElement = null; + } + } +} + +class _SglInfoTableManipulator +{ +public: + _SglInfoTableManipulator() + { + result r = __SglMutex.Create(); + SysTryLog(NID_GRP, r == E_SUCCESS, "[%s] Failed to create mutex.", GetErrorMessage(r)); + __SglIndexLastUsed = INVALID_SGL_INDEX; + __SglInitialized = false; + } + + ~_SglInfoTableManipulator() + { + } + + _SglIndex + FindNextEmptySlotOfSglInfoTable() + { + if (!__SglInitialized) + { + if (CreateSglInfoTable() == false) + { + return INVALID_SGL_INDEX; + } + } + + _SglIndex sglIndex = INVALID_SGL_INDEX; + _SglIndex index = __SglIndexLastUsed; + { + __SglMutex.Acquire(); + for (int i = 1; i < MAX_SGL_INDEX; i++) + { + index++; + + if (index >= MAX_SGL_INDEX) + { + index = 1; + } + + if (__SglInfoTable[index] == null) + { + sglIndex = index; + __SglIndexLastUsed = index; + break; + } + } + __SglMutex.Release(); + } + + if (sglIndex <= INVALID_SGL_INDEX) + { + return INVALID_SGL_INDEX; + } + + return sglIndex; + } + + bool + CreateSglInfoTable() + { + bool ret = false; + + __SglMutex.Acquire(); + + for (int i = 0 ; i < MAX_SGL_INDEX; i++) + { + __SglInfoTable[i] = null; + } + + __SglInfoTable[0] = new (std::nothrow) _SglInfo; + if (__SglInfoTable[0] != null) + { + ret = true; + __SglInitialized = true; + __SglInfoTable[0]->glVersion = 2; + } + + __SglMutex.Release(); + + return ret; + } + + void + DestroySglInfoTable() + { + __SglMutex.Acquire(); + + for (int i = 0 ; i < MAX_SGL_INDEX; i++) + { + if (__SglInfoTable[i] != null) + { + delete __SglInfoTable[i]; + __SglInfoTable[i] = null; + } + } + __SglInitialized = false; + + __SglMutex.Release(); + } + + _SglInfo* + LockSglInfoTable(_SglIndex index) + { + __SglMutex.Acquire(); + + if (index < INVALID_SGL_INDEX || index >= MAX_SGL_INDEX) + { + return null; + } + + return __SglInfoTable[index]; + } + + void + UnlockSglInfoTable() + { + __SglMutex.Release(); + } + + _SglIndex + CreateSglIndex(void) + { + _SglInfo* newSglInfo = new (std::nothrow) _SglInfo; + if (newSglInfo == null) + { + SysLog(NID_GRP, "CreateSglIndex fail to allocate _SglInfo!!"); + return INVALID_SGL_INDEX; + } + + int sglIndex = FindNextEmptySlotOfSglInfoTable(); + if (sglIndex == INVALID_SGL_INDEX) + { + delete newSglInfo; + + SysLog(NID_GRP, "CreateSglIndex failed!!"); + return INVALID_SGL_INDEX; + } + + __SglMutex.Acquire(); + __SglInfoTable[sglIndex] = newSglInfo; + __SglMutex.Release(); + + return sglIndex; + } + + bool + DestroySglIndex(_SglIndex sglIndex) + { + if (sglIndex < 1 || sglIndex >= MAX_SGL_INDEX) + { + SysLog(NID_GRP, "sglIndex:%#x is out of range.", (unsigned int)sglIndex); + return false; + } + + __SglMutex.Acquire(); + + if (sglIndex <= INVALID_SGL_INDEX || __SglInfoTable[sglIndex] == null) + { + __SglMutex.Release(); + + SysLog(NID_GRP, "DestroySglIndex failed!! sglIndex:%#x", (unsigned int)sglIndex); + return false; + } + + delete __SglInfoTable[sglIndex]; + __SglInfoTable[sglIndex] = null; + + __SglMutex.Release(); + + return true; + } + + _SglIndex + GetSglIndexForSurface(EGLSurface surface) + { + __SglMutex.Acquire(); + + int sglIndex = 0; + for (int i = 0; i < MAX_SGL_INDEX; i++) + { + if (__SglInfoTable[i] != null && __SglInfoTable[i]->surface == surface) + { + sglIndex = i; + break; + } + } + + __SglMutex.Release(); + + return sglIndex; + } + + static _SglInfoTableManipulator* GetInstance(void) + { + static pthread_once_t once_block = PTHREAD_ONCE_INIT; + + if (!__pTheInstance) + { + pthread_once(&once_block, __InitSglInfoTableManipulator); + } + + return __pTheInstance; + } + +private: + static void __InitSglInfoTableManipulator(void) + { + static _SglInfoTableManipulator instance; + __pTheInstance = &instance; + } + +private: + Runtime::Mutex __SglMutex; + _SglInfo* __SglInfoTable[MAX_SGL_INDEX]; + _SglIndex __SglIndexLastUsed; + bool __SglInitialized; + + static _SglInfoTableManipulator* __pTheInstance; +}; +_SglInfoTableManipulator* _SglInfoTableManipulator::__pTheInstance = null; + +void +_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) +{ + tbm_bo_map((tbm_bo)pCallbackParam, TBM_DEVICE_CPU, TBM_OPTION_READ | TBM_OPTION_WRITE); +} + +void +_PixmapUnlockCallBack(void* pCallbackParam) +{ + tbm_bo_unmap((tbm_bo)pCallbackParam); +} +#endif + +_engineType +_GetEvasEngineType(Evas_Object* pObject) +{ + if (pObject == null) + { + const char* pString = elm_config_preferred_engine_get(); + if (pString == null) + { + pString = elm_config_engine_get(); + } + + String engineName(pString); + SysLog(NID_GRP, "evas backend : %s", pString); + + if (engineName.Contains(String("opengl_x11"))) + { + _DisplayManager* pDisplayManger = _DisplayManager::GetInstance(); +#if defined(FGRAPHICS_INTERNAL_USE_RESTORE_CONTEXT) + pDisplayManger->SetRestoreContextCallback(__RestoreContext); +#endif + return ENGINE_TYPE_OPENGL_X11; + } + else + { + return ENGINE_TYPE_SOFEWARE_X11; + } + } + else + { + Evas* pEvas = evas_object_evas_get(pObject); + if (pEvas == null) + { + 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, "[E_OPERATION_FAILED] Getting pEcoreEvas failed."); + return ENGINE_TYPE_SOFEWARE_X11; + } + + const char* pString = ecore_evas_engine_name_get(pEcoreEvas); + String engineName(pString); + SysLog(NID_GRP, "evas backend : %s", pString); + + if (engineName.Contains(String("opengl_x11"))) + { + _DisplayManager* pDisplayManger = _DisplayManager::GetInstance(); +#if defined(FGRAPHICS_INTERNAL_USE_RESTORE_CONTEXT) + pDisplayManger->SetRestoreContextCallback(__RestoreContext); +#endif + return ENGINE_TYPE_OPENGL_X11; + } + else if (engineName.Contains(String("software_x11"))) + { + return ENGINE_TYPE_SOFEWARE_X11; + } + else + { + return ENGINE_TYPE_ETC; + } + } +} + +void +_EvasObjectImageChange(_SglInfo* pSglInfo) +{ + if(__evasEngineType == ENGINE_TYPE_SOFEWARE_X11 || __evasEngineType == ENGINE_TYPE_OPENGL_X11) + { + Evas* pEvas = evas_object_evas_get(pSglInfo->pObject); + if (pEvas == null) + { + SysLogException(NID_GRP, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Getting pEvas failed."); + return; + } + + Evas_Native_Surface nativeSurface = {0, }; + nativeSurface.type = EVAS_NATIVE_SURFACE_X11; + nativeSurface.version = EVAS_NATIVE_SURFACE_VERSION; + nativeSurface.data.x11.pixmap = (unsigned long)pSglInfo->nativePixmap; + nativeSurface.data.x11.visual = ecore_x_default_visual_get(ecore_x_display_get(), ecore_x_default_screen_get()); + evas_object_image_native_surface_set(pSglInfo->pObject, &nativeSurface); + } + else + { + if (pSglInfo->isCopyNeeded) + { + BufferInfo bufferInfo; + pSglInfo->pBitmapCopyNeeded->Lock(bufferInfo); + evas_object_image_data_set(pSglInfo->pObject, bufferInfo.pPixels); + pSglInfo->pBitmapCopyNeeded->Unlock(); + } + else + { + BufferInfo bufferInfo; + pSglInfo->pBitmap->Lock(bufferInfo); + evas_object_image_data_set(pSglInfo->pObject, bufferInfo.pPixels); + pSglInfo->pBitmap->Unlock(); + } + } +} + +#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) +{ + __needRestoreContext = true; +} + +void +_PostRenderCallback(Ecore_Evas* ee) +{ + if (__pSwapQueue != null) + { + int count = __pSwapQueue->GetCount(); + for (int i = 0; i < count; i++) + { + _SglInfo* pSglInfo = dynamic_cast<_SglInfo*> (__pSwapQueue->Dequeue()); + if (pSglInfo != null) + { + _SglInfo* pBackSglInfo = null; + _SglInfo* pFrontSglInfo = null; + + if (pSglInfo->isBackbuffer) + { + pBackSglInfo = pSglInfo; + pFrontSglInfo = pSglInfo->pSecondSglInfo; + } + else + { + pBackSglInfo = pSglInfo->pSecondSglInfo; + pFrontSglInfo = pSglInfo; + } + + if (pSglInfo->pVisualElement != null) + { + pBackSglInfo->isBackbuffer = false; + pFrontSglInfo->isBackbuffer = true; + + pSglInfo->pVisualElement->SetSurface(pBackSglInfo->pVisualElementSurface); + evas_object_image_pixels_dirty_set(pBackSglInfo->pObject, EINA_TRUE); + evas_object_hide(pFrontSglInfo->pObject); + } + } + } + } + + if (__pPreviousSglInfo != null && __isMainThread()) + { + EGLDisplay display = __pPreviousSglInfo->display; + EGLSurface surface = __pPreviousSglInfo->surface; + EGLContext context = __pPreviousSglInfo->context; + + if (__isDoublePixmapEnabled && __pPreviousSglInfo->pSecondSglInfo != null) + { + _SglInfo* pBackSglInfo = null; + _SglInfo* pFrontSglInfo = null; + + if (__pPreviousSglInfo->isBackbuffer) + { + pBackSglInfo = __pPreviousSglInfo; + pFrontSglInfo = __pPreviousSglInfo->pSecondSglInfo; + } + else + { + pBackSglInfo = __pPreviousSglInfo->pSecondSglInfo; + pFrontSglInfo = __pPreviousSglInfo; + } + + surface = pBackSglInfo->surface; + } + + EGLBoolean ret = eglMakeCurrent(display, surface, surface, context); + SysTryLog(NID_GRP, ret == EGL_TRUE, "fail to restore previous surface and context. %#x %#x %#x %#x egl error:%#x" + , (unsigned int)display + , (unsigned int)surface + , (unsigned int)surface + , (unsigned int)context + , (unsigned int)eglGetError()); + +#if defined(FGRAPHICS_INTERNAL_USE_RESTORE_CONTEXT) + __needRestoreContext = false; +#endif + } +} + +void +_SaveCurrentContext(_SglInfo* pSglInfo) +{ + if (pSglInfo != null && __isMainThread()) + { + __pPreviousSglInfo = pSglInfo; + } +} + +void +_RegisterRenderCallback(Evas_Object* pObject) +{ + if (__evasEngineType == ENGINE_TYPE_OPENGL_X11 && pObject != null) + { + if (__registerCallbackCount == 0) + { + Evas* pEvas = evas_object_evas_get(pObject); + if (pEvas == null) + { + return; + } + + Ecore_Evas* pEcoreEvas = ecore_evas_ecore_evas_get(pEvas); + if (pEcoreEvas == null) + { + return; + } + + ecore_evas_callback_post_render_set(pEcoreEvas, _PostRenderCallback); + + if (__pSwapQueue == null) + { + std::auto_ptr swapQueue(new (std::nothrow) Queue); + SysTryReturnVoidResult(NID_GRP, swapQueue.get() != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + result r = swapQueue.get()->Construct(MAX_SGL_INDEX / 2); + SysTryReturnVoidResult(NID_GRP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pSwapQueue = swapQueue.release(); + } + } + __registerCallbackCount++; + } +} + +void +_UnregisterRenderCallback(Evas_Object* pObject) +{ + if (__evasEngineType == ENGINE_TYPE_OPENGL_X11 && pObject != null) + { + __registerCallbackCount--; + + if (__registerCallbackCount == 0) + { + Evas* pEvas = evas_object_evas_get(pObject); + if (pEvas == null) + { + return; + } + + Ecore_Evas* pEcoreEvas = ecore_evas_ecore_evas_get(pEvas); + if (pEcoreEvas == null) + { + return; + } + + ecore_evas_callback_post_render_set(pEcoreEvas, NULL); + + delete __pSwapQueue; + __pSwapQueue = null; + } + } +} + +#endif //#if defined(FGRAPHICS_INTERNAL_USE_RESTORE_CONTEXT) + +} + +#if defined(FGRAPHICS_INTERNAL_USE_RESTORE_CONTEXT) +void _RestoreContext(void) +{ + if (__needRestoreContext && __pPreviousSglInfo != null && __isMainThread()) + { + EGLDisplay display = __pPreviousSglInfo->display; + EGLSurface surface = __pPreviousSglInfo->surface; + EGLContext context = __pPreviousSglInfo->context; + + if (__isDoublePixmapEnabled) + { + _SglInfo* pBackSglInfo = null; + _SglInfo* pFrontSglInfo = null; + + if (__pPreviousSglInfo->isBackbuffer) + { + pBackSglInfo = __pPreviousSglInfo; + pFrontSglInfo = __pPreviousSglInfo->pSecondSglInfo; + } + else + { + pBackSglInfo = __pPreviousSglInfo->pSecondSglInfo; + pFrontSglInfo = __pPreviousSglInfo; + } + + surface = pBackSglInfo->surface; + } + + EGLBoolean ret = eglMakeCurrent(display, surface, surface, context); + SysTryLog(NID_GRP, ret == EGL_TRUE, "fail to restore previous surface and context. %#x %#x %#x %#x egl error:%#x" + , (unsigned int)display + , (unsigned int)surface + , (unsigned int)surface + , (unsigned int)context + , (unsigned int)eglGetError()); + + __needRestoreContext = false; + } +} +#endif + +#ifdef __cplusplus +extern "C" +{ +#endif + +EGLint +_SglGetError() +{ + return eglGetError(); +} + +EGLDisplay +_SglGetDisplay(EGLNativeDisplayType displayId) +{ + if (displayId == (EGLNativeDisplayType) EGL_DEFAULT_DISPLAY) + { + return eglGetDisplay((EGLNativeDisplayType) ecore_x_display_get()); + } + + return eglGetDisplay((EGLNativeDisplayType) displayId); +} + +EGLBoolean +_SglInitialize(EGLDisplay dpy, EGLint* pMajor, EGLint* pMinor) +{ + __evasEngineType = _GetEvasEngineType(null); + return eglInitialize(dpy, pMajor, pMinor); +} + +EGLBoolean +_SglTerminate(EGLDisplay dpy) +{ + _GlesInterfaceTerminate_1(); + _GlesInterfaceTerminate_2(); + + _SglInfoTableManipulator::GetInstance()->DestroySglInfoTable(); + + if (__evasEngineType != ENGINE_TYPE_OPENGL_X11) + { + eglTerminate(dpy); + } + +#if defined(FGRAPHICS_INTERNAL_USE_RESTORE_CONTEXT) + __registerCallbackCount = 0; + __pPreviousSglInfo = null; +#endif + + + return EGL_TRUE; +} + +const char* +_SglQueryString(EGLDisplay dpy, EGLint name) +{ + return eglQueryString(dpy, name); +} + +EGLBoolean +_SglGetConfigs(EGLDisplay dpy, EGLConfig* pConfigs, EGLint configSize, EGLint* pNumConfig) +{ + return eglGetConfigs(dpy, pConfigs, configSize, pNumConfig); +} + +EGLBoolean +_SglChooseConfig(EGLDisplay dpy, const EGLint* pAttribList, EGLConfig* pConfigs, EGLint configSize, EGLint* pNumConfig) +{ + return eglChooseConfig(dpy, pAttribList, pConfigs, configSize, pNumConfig); +} + +EGLBoolean +_SglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint* pValue) +{ + return eglGetConfigAttrib(dpy, config, attribute, pValue); +} + +EGLSurface +_SglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint* pAttribList) +{ + _SglIndex sglIndex = INVALID_SGL_INDEX; + Object* pObj = (Object*)win; + VisualElement* pVisualElement = dynamic_cast (pObj); + Tizen::Ui::Control* pControl = dynamic_cast (pObj); + +//#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, "[E_INVALID_ARG] Invalid NativeWindow."); + _SglInfoTableManipulator* pSglInfoTableManipulatorInstance = _SglInfoTableManipulator::GetInstance(); + +#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, "[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, "[E_OPERATION_FAILED] Invalid SglIndex."); + + EGLSurface windowSurface = eglCreateWindowSurface(dpy, config, nativeWindow, pAttribList); + if (windowSurface == EGL_NO_SURFACE) + { + pSglInfoTableManipulatorInstance->DestroySglIndex(sglIndex); + sglIndex = 0; + } + else + { + VisualElement* pVisualElement = pControlImpl->GetCore().GetVisualElement(); + if (pVisualElement == null) + { + pSglInfoTableManipulatorInstance->DestroySglIndex(sglIndex); + return EGL_NO_SURFACE; + } + + _VisualElementImpl* pVisualElementImpl = _VisualElementImpl::GetInstance(*pVisualElement); + if (pVisualElementImpl == null) + { + pSglInfoTableManipulatorInstance->DestroySglIndex(sglIndex); + return EGL_NO_SURFACE; + } + + _SglInfo* pSglInfo = pSglInfoTableManipulatorInstance->LockSglInfoTable(sglIndex); + + pSglInfo->surface = windowSurface; + + pSglInfoTableManipulatorInstance->UnlockSglInfoTable(); + } + + return (EGLSurface)sglIndex; + } + else +#endif //#if defined (FGRAPHICS_INTERNAL_USE_WINDOWSURFACE) + { + result r = E_SUCCESS; + + if (pVisualElement == null) + { + pVisualElement = pControl->GetVisualElement(); + } + 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_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, "[E_OUT_OF_RANGE] Invalid size. w:%d h:%d", width, height); + + Control* pFrame = pControl; + Control* pTemp = pFrame->GetParent(); + while(pTemp != null) + { + pFrame = pTemp; + pTemp = pTemp->GetParent(); + } + + Tizen::Ui::Window* pWindow = dynamic_cast (pFrame); + 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_INVALID_STATE, "[E_INVALID_STATE] Getting VisualElementSurface failed."); + + _VisualElementSurfaceImpl* pVisualElementSurfaceImpl = _VisualElementSurfaceImpl::GetInstance(*pVisualElementSurface); + if (pVisualElementSurfaceImpl == null) + { + SysLogException(NID_GRP, E_INVALID_STATE, "[E_INVALID_STATE] Getting VisualElementSurface failed."); + delete pVisualElementSurface; + return EGL_NO_SURFACE; + } + + Evas_Object* pObject = (Evas_Object*)pVisualElementSurfaceImpl->GetNativeHandle(); + delete pVisualElementSurface; + + 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, "[E_OPERATION_FAILED] Invalid object."); + + __evasEngineType = _GetEvasEngineType(pObject); + + int widthPhysical = static_cast (CoordinateSystem::ConvertToPhysicalX(rect.width)); + int heightPhysical = static_cast (CoordinateSystem::ConvertToPhysicalY(rect.height)); + + evas_object_image_alpha_set(pObject, EINA_TRUE); + evas_object_image_size_set(pObject, widthPhysical, heightPhysical); + evas_object_resize(pObject, widthPhysical, heightPhysical); + evas_object_hide(pObject); + + pVisualElementSurface = _VisualElementSurfaceImpl::CreateSurfaceUsingExistingObjectN( + *pWindow->GetDisplayContext(), (Handle)pObject, Dimension(width, height)); + 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, "[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, "[%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, "[E_OPERATION_FAILED] Invalid sglIndex."); + + _SglInfo* pSglInfo = pSglInfoTableManipulatorInstance->LockSglInfoTable(sglIndex); + pSglInfo->sglIndex = sglIndex; + pSglInfo->display = dpy; + pSglInfo->config = config; + pSglInfo->pVisualElement = pVisualElement; + pSglInfo->pWindow = pWindow; + pSglInfo->pObject = pObject; + pSglInfo->pVisualElementSurface = pVisualElementSurface; + pSglInfoTableManipulatorInstance->UnlockSglInfoTable(); + +#if defined (FGRAPHICS_INTERNAL_USE_DOUBLE_PIXMAP) + if (__evasEngineType == ENGINE_TYPE_OPENGL_X11) + { + __isDoublePixmapEnabled = true; + } + else + { + __isDoublePixmapEnabled = false; + } +#else + __isDoublePixmapEnabled = false; +#endif + + if (__isDoublePixmapEnabled) + { + pObject = evas_object_image_filled_add(pEvas); + 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); + evas_object_resize(pObject, widthPhysical, heightPhysical); + evas_object_hide(pObject); + + pVisualElementSurface = _VisualElementSurfaceImpl::CreateSurfaceUsingExistingObjectN( + *pWindow->GetDisplayContext(), (Handle)pObject, Dimension(width, height)); + 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, "[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, "[%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, "[E_OPERATION_FAILED] Invalid sglIndex."); + + _SglInfo* pSglInfoSecond = pSglInfoTableManipulatorInstance->LockSglInfoTable(sglIndex); + pSglInfoSecond->sglIndex = sglIndex; + pSglInfoSecond->display = dpy; + pSglInfoSecond->config = config; + pSglInfoSecond->pVisualElement = pVisualElement; + pSglInfoSecond->pWindow = pWindow; + pSglInfoSecond->pObject = pObject; + pSglInfoSecond->pVisualElementSurface = pVisualElementSurface; + pSglInfoTableManipulatorInstance->UnlockSglInfoTable(); + + pSglInfo->pSecondSglInfo = pSglInfoSecond; + pSglInfoSecond->pSecondSglInfo = pSglInfo; + + pSglInfoSecond->pBitmap = bitmapSecond.release(); + _EvasObjectImageChange(pSglInfoSecond); + } + else + { + pVisualElement->SetSurface(pSglInfo->pVisualElementSurface); + } + + pSglInfo->pBitmap = bitmap.release(); + _EvasObjectImageChange(pSglInfo); + + pVisualElementImpl->SetBoundsChangedCallback(_OnBoundsChanged, pSglInfo); + pVisualElementImpl->SetDestroyedCallback(_OnDestroyed, pSglInfo); +#if defined(FGRAPHICS_INTERNAL_USE_RESTORE_CONTEXT) + _RegisterRenderCallback(pSglInfo->pObject); +#endif + return (EGLSurface)pSglInfo->sglIndex; + } +} + +EGLSurface +_SglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config, const EGLint* pAttribList) +{ + _SglInfoTableManipulator* pSglInfoTableManipulatorInstance = _SglInfoTableManipulator::GetInstance(); + _SglIndex sglIndex = INVALID_SGL_INDEX; + + sglIndex = pSglInfoTableManipulatorInstance->CreateSglIndex(); + if (sglIndex <= INVALID_SGL_INDEX) + { + SysLog(NID_GRP, "_SglCreatePbufferSurface failed!! dpy:%#x config:%#x pAttribList:%#x", + (unsigned int)dpy, (unsigned int)config, (unsigned int)pAttribList); + + return eglCreatePbufferSurface(EGL_NO_DISPLAY, config, pAttribList); + } + + EGLSurface pbufferSurface = eglCreatePbufferSurface(dpy, config, pAttribList); + if (pbufferSurface == EGL_NO_SURFACE) + { + pSglInfoTableManipulatorInstance->DestroySglIndex(sglIndex); + sglIndex = 0; + } + else + { + _SglInfo* pSglInfo = pSglInfoTableManipulatorInstance->LockSglInfoTable(sglIndex); + + pSglInfo->surface = pbufferSurface; + + pSglInfoTableManipulatorInstance->UnlockSglInfoTable(); + } + + return (EGLSurface)sglIndex; +} + +_OSP_LOCAL_ EGLNativePixmapType +_CreateNativePixmap(_SglIndex sglIndex, Tizen::Graphics::Bitmap* pBitmap) +{ + int width = 0; + int height = 0; + int bitsPerPixel = 0; + Display* pNativeDisplay = null; + Drawable nativeWindow = 0; + 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; + 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 + _SglInfo* pSglInfo = null; + _SglInfoTableManipulator* pSglInfoTableManipulatorInstance = _SglInfoTableManipulator::GetInstance(); + + pSglInfo = pSglInfoTableManipulatorInstance->LockSglInfoTable(sglIndex); + if (pBitmap == null || sglIndex <= INVALID_SGL_INDEX || pSglInfo == null) + { + pSglInfoTableManipulatorInstance->UnlockSglInfoTable(); + goto CATCH_01; + } + pSglInfoTableManipulatorInstance->UnlockSglInfoTable(); + + 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); + + 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; + } + +#if defined(FGRAPHICS_INTERNAL_USE_DRM) + 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 = Tizen::Graphics::_BitmapTool::ChangeBuffer(*pBitmap, tbmData.ptr, pitch, + _PixmapSurfaceDestroyCallback, (void*)pPixmapInfo); + if (r != E_SUCCESS) + { + goto CATCH_06; + } + + if (!_BitmapTool::SetCallback(*pBitmap, + _PixmapSurfaceDestroyCallback, pPixmapInfo, + _PixmapLockCallBack, pPixmapInfo->pTbmBufferObject, + _PixmapUnlockCallBack, pPixmapInfo->pTbmBufferObject, + _PixmapPostLockCallback, (void*)pPixmapInfo->nativePixmap)) + { + goto CATCH_06; + } + + if (__evasEngineType == ENGINE_TYPE_ETC && pitch != width * bitsPerPixel / 8) + { + std::auto_ptr bitmap(new (std::nothrow) Bitmap); + if (bitmap.get() == null) + { + goto CATCH_06; + } + + result r = bitmap.get()->Construct(Rectangle(0, 0, width, height)); + if (r != E_SUCCESS) + { + goto CATCH_06; + } + + pSglInfo->isCopyNeeded = true; + pSglInfo->pBitmapCopyNeeded = bitmap.release(); + } + +#else +#if defined(FGRAPHICS_INTERNAL_USE_EGLCOPYBUFFER) + { + pSglInfo = pSglInfoTableManipulatorInstance->LockSglInfoTable(sglIndex); + + pSglInfo->pEcoreImage = ecore_x_image_new(width + , height + , ecore_x_default_visual_get(pNativeDisplay, ecore_x_default_screen_get()) + , ecore_x_default_depth_get(pNativeDisplay, ecore_x_default_screen_get())); + + if (pSglInfo->pEcoreImage == null) + { + pSglInfoTableManipulatorInstance->UnlockSglInfoTable(); + goto CATCH_06; + } + + ecore_x_image_get(pSglInfo->pEcoreImage + , pPixmapInfo->nativePixmap, 0, 0, 0, 0 + , width + , height); + + int bpl = 0; + int rows = 0; + int bpp = 0; + + void* pSource = ecore_x_image_data_get(pSglInfo->pEcoreImage, &bpl, &rows, &bpp); + + r = Tizen::Graphics::_BitmapTool::ChangeBuffer(*pBitmap, pSource, width * bitsPerPixel / 8, + _PixmapSurfaceDestroyCallback, (void*)pPixmapInfo); + if (r != E_SUCCESS) + { + ecore_x_image_free(pSglInfo->pEcoreImage); + pSglInfo->pEcoreImage = null; + pSglInfoTableManipulatorInstance->UnlockSglInfoTable(); + + SysLog(NID_GRP, "change buffer failed! pSource %#x %d %d %d", (unsigned int)pSource, bpl, rows, bpp); + goto CATCH_06; + } + + pSglInfo->width = width; + pSglInfo->height = height; + + pSglInfoTableManipulatorInstance->UnlockSglInfoTable(); + } +#endif //#if defined(FGRAPHICS_INTERNAL_USE_EGLCOPYBUFFER) +#endif //#if defined(FGRAPHICS_INTERNAL_USE_DRM) + + pBitmapImpl->Lock(bufferInfo); + { + Canvas canvas; + canvas.Construct(bufferInfo); + canvas.SetBackgroundColor(Color::GetColor(COLOR_ID_BLACK)); + canvas.Clear(); + } + pBitmapImpl->Unlock(); + + return (EGLNativePixmapType)pPixmapInfo->nativePixmap; + +CATCH_06: +#if defined(FGRAPHICS_INTERNAL_USE_DRM) + 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); +#endif + XFreePixmap(pNativeDisplay, pPixmapInfo->nativePixmap); + //fall through + +CATCH_02: + delete pPixmapInfo; + //fall through + +CATCH_01: + SysLog(NID_GRP, "_CreateNativePixmap failed!! pBitmap:%#x", (unsigned int)pBitmap); + 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) +{ + int width = 0; + int height = 0; + int bitsPerPixel = 0; + Display* pNativeDisplay = null; + Drawable nativeWindow = 0; + Tizen::Graphics::_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; + result r = E_FAILURE; + drm_magic_t magic = 0; +#endif + if (pBitmap == null) + { + goto CATCH_01; + } + + pBitmapImpl = Tizen::Graphics::_BitmapImpl::GetInstance(*pBitmap); + if (pBitmapImpl == null) + { + goto CATCH_01; + } + + width = bufferInfo.width; + height = bufferInfo.height; + bitsPerPixel = bufferInfo.bitsPerPixel; + + if (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 + , bitsPerPixel); + 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); + bufferInfo.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; + } + bufferInfo.pPixels = tbmData.ptr; + + bufferInfo.bitsPerPixel = 32; + bufferInfo.pixelFormat = PIXEL_FORMAT_ARGB8888; + memset(bufferInfo.pPixels, 0, bufferInfo.pitch * bufferInfo.height); + r = pBitmapImpl->Construct(bufferInfo); + if (r != E_SUCCESS) + { + goto CATCH_06; + } + + if (!Tizen::Graphics::_BitmapTool::SetCallback(*pBitmap + , _PixmapSurfaceDestroyCallback, pPixmapInfo + , _PixmapLockCallBack, pPixmapInfo->pTbmBufferObject + ,_PixmapUnlockCallBack, pPixmapInfo->pTbmBufferObject)) + { + goto CATCH_06; + } + + 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: + 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; +} + +EGLSurface +_SglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint* pAttribList) +{ + _SglIndex sglIndex = INVALID_SGL_INDEX; + Tizen::Graphics::Bitmap* pBitmap = dynamic_cast((Tizen::Graphics::Bitmap*)pixmap); + EGLNativePixmapType eglNativePixmap = 0; + EGLSurface pixmapSurface = EGL_NO_SURFACE; + _SglInfoTableManipulator* pSglInfoTableManipulatorInstance = _SglInfoTableManipulator::GetInstance(); + + if (pBitmap == null) + { + goto CATCH_01; + } + + sglIndex = pSglInfoTableManipulatorInstance->CreateSglIndex(); + if (sglIndex <= INVALID_SGL_INDEX) + { + goto CATCH_01; + } + + eglNativePixmap = _CreateNativePixmap(sglIndex, pBitmap); + if (eglNativePixmap == 0) + { + goto CATCH_02; + } + + pixmapSurface = eglCreatePixmapSurface(dpy, config, eglNativePixmap, pAttribList); + if (pixmapSurface == EGL_NO_SURFACE) + { + pSglInfoTableManipulatorInstance->DestroySglIndex(sglIndex); + sglIndex = 0; + } + else + { + _SglInfo* pSglInfo = pSglInfoTableManipulatorInstance->LockSglInfoTable(sglIndex); + + pSglInfo->nativePixmap = eglNativePixmap; + pSglInfo->surface = pixmapSurface; + + pSglInfoTableManipulatorInstance->UnlockSglInfoTable(); + } + + return (EGLSurface)sglIndex; + +CATCH_02: + pSglInfoTableManipulatorInstance->DestroySglIndex(sglIndex); + //fall through + +CATCH_01: + SysLog(NID_GRP, "_SglCreatePixmapSurface failed!! dpy:%#x config:%#x pixmap:%#x pAttribList:%#x", + (unsigned int)dpy, (unsigned int)config, (unsigned int)pixmap, (unsigned int)pAttribList); + return eglCreatePixmapSurface(EGL_NO_DISPLAY, config, (EGLNativePixmapType) 0, pAttribList); +} + +EGLBoolean +_SglDestroySurface(EGLDisplay dpy, EGLSurface surface) +{ + EGLBoolean ret = EGL_FALSE; + _SglInfoTableManipulator* pSglInfoTableManipulatorInstance = _SglInfoTableManipulator::GetInstance(); + + _SglIndex sglIndex = (_SglIndex)surface; + _SglInfo* pSglInfo = pSglInfoTableManipulatorInstance->LockSglInfoTable(sglIndex); + + if (sglIndex <= INVALID_SGL_INDEX || pSglInfo == null) + { + pSglInfoTableManipulatorInstance->UnlockSglInfoTable(); + SysLog(NID_GRP, "_SglDestroySurface failed!! dpy:%#x sglIndex:%#x", (unsigned int)dpy + , (unsigned int)surface); + return eglDestroySurface(dpy, EGL_NO_SURFACE); + } + + if (__pSwapQueue != null && __pSwapQueue->Contains(*pSglInfo)) + { + int count = __pSwapQueue->GetCount(); + for (int i = 0; i < count; i++) + { + _SglInfo* pObject = dynamic_cast<_SglInfo*> (__pSwapQueue->Dequeue()); + if (pObject != pSglInfo) + { + __pSwapQueue->Enqueue(pObject); + } + } + } + +#if defined(FGRAPHICS_INTERNAL_USE_RESTORE_CONTEXT) + if (pSglInfo == __pPreviousSglInfo || pSglInfo->pSecondSglInfo == __pPreviousSglInfo) + { + __pPreviousSglInfo = null; + } +#endif + + ret = eglDestroySurface(dpy, pSglInfo->surface); + pSglInfoTableManipulatorInstance->UnlockSglInfoTable(); + + if (__isDoublePixmapEnabled && pSglInfo->pSecondSglInfo != null) + { + eglDestroySurface(dpy, pSglInfo->pSecondSglInfo->surface); + pSglInfoTableManipulatorInstance->DestroySglIndex(pSglInfo->pSecondSglInfo->sglIndex); + } + +#if defined(FGRAPHICS_INTERNAL_USE_RESTORE_CONTEXT) + if (pSglInfo->pVisualElementSurface != null) + { + _UnregisterRenderCallback(pSglInfo->pObject); + } +#endif + + pSglInfoTableManipulatorInstance->DestroySglIndex(sglIndex); + + return ret; +} + +EGLBoolean +_SglQuerySurface(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint* pValue) +{ + _SglInfoTableManipulator* pSglInfoTableManipulatorInstance = _SglInfoTableManipulator::GetInstance(); + + _SglIndex sglIndex = (_SglIndex)surface; + _SglInfo* pSglInfo = pSglInfoTableManipulatorInstance->LockSglInfoTable(sglIndex); + + if (sglIndex <= INVALID_SGL_INDEX || pSglInfo == null) + { + pSglInfoTableManipulatorInstance->UnlockSglInfoTable(); + SysLog(NID_GRP, "_SglQuerySurface failed!! dpy:%#x sglIndex:%#x attribute:%#x pValue:%#x", + (unsigned int)dpy, (unsigned int)sglIndex, (unsigned int)attribute, (unsigned int)pValue); + return eglQuerySurface(dpy, EGL_NO_SURFACE, attribute, pValue); + } + + EGLBoolean ret = EGL_FALSE; + if (attribute == EGL_BITMAP_POINTER_KHR) + { + *pValue = (EGLint)pSglInfo->pBitmapPointer; + ret = EGL_TRUE; + } + else + { + ret = eglQuerySurface(dpy, pSglInfo->surface, attribute, pValue); + } + + pSglInfoTableManipulatorInstance->UnlockSglInfoTable(); + + return ret; +} + +EGLBoolean +_SglBindAPI(EGLenum api) +{ + return eglBindAPI(api); +} + +EGLenum +_SglQueryAPI() +{ + return eglQueryAPI(); +} + +EGLBoolean +_SglWaitClient() +{ + return eglWaitClient(); +} + +EGLBoolean +_SglReleaseThread(void) +{ + return eglReleaseThread(); +} + +EGLSurface +_SglCreatePbufferFromClientBuffer( + EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint* pAttribList) +{ + _SglIndex sglIndex = INVALID_SGL_INDEX; + _SglInfoTableManipulator* pSglInfoTableManipulatorInstance = _SglInfoTableManipulator::GetInstance(); + + sglIndex = pSglInfoTableManipulatorInstance->CreateSglIndex(); + if (sglIndex <= INVALID_SGL_INDEX) + { + SysLog(NID_GRP, "_SglCreatePbufferFromClientBuffer failed!!" + " dpy:%#x buftype:%#x buffer:%#x config:%#x pAttribList:%#x", + (unsigned int)dpy, (unsigned int)buftype, (unsigned int)buffer, (unsigned int)config, (unsigned int)pAttribList); + + return eglCreatePbufferFromClientBuffer(null, (EGLenum)0, null, null, null); + } + + EGLSurface pbufferFromClientBuffer = eglCreatePbufferFromClientBuffer(dpy, buftype, buffer, config, pAttribList); + if (pbufferFromClientBuffer == EGL_NO_SURFACE) + { + pSglInfoTableManipulatorInstance->DestroySglIndex(sglIndex); + sglIndex = 0; + } + else + { + _SglInfo* pSglInfo = pSglInfoTableManipulatorInstance->LockSglInfoTable(sglIndex); + + pSglInfo->surface = pbufferFromClientBuffer; + + pSglInfoTableManipulatorInstance->UnlockSglInfoTable(); + } + + return (EGLSurface)sglIndex; +} + +EGLBoolean +_SglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value) +{ + _SglInfoTableManipulator* pSglInfoTableManipulatorInstance = _SglInfoTableManipulator::GetInstance(); + + _SglIndex sglIndex = (_SglIndex)surface; + _SglInfo* pSglInfo = pSglInfoTableManipulatorInstance->LockSglInfoTable(sglIndex); + + if (sglIndex <= INVALID_SGL_INDEX || pSglInfo == null) + { + pSglInfoTableManipulatorInstance->UnlockSglInfoTable(); + SysLog(NID_GRP, "_SglCreatePbufferFromClientBuffer failed!! " + "dpy:%#x surface:%#x attribute:%#x value:%#x", + (unsigned int)dpy, (unsigned int)surface, (unsigned int)attribute, (unsigned int)value); + + return eglSurfaceAttrib(dpy, EGL_NO_SURFACE, attribute, value); + } + + EGLBoolean ret = eglSurfaceAttrib(dpy, pSglInfo->surface, attribute, value); + pSglInfoTableManipulatorInstance->UnlockSglInfoTable(); + + return ret; +} + +EGLBoolean +_SglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer) +{ + _SglInfoTableManipulator* pSglInfoTableManipulatorInstance = _SglInfoTableManipulator::GetInstance(); + + _SglIndex sglIndex = (_SglIndex)surface; + _SglInfo* pSglInfo = pSglInfoTableManipulatorInstance->LockSglInfoTable(sglIndex); + + if (sglIndex <= INVALID_SGL_INDEX || pSglInfo == null) + { + pSglInfoTableManipulatorInstance->UnlockSglInfoTable(); + SysLog(NID_GRP, "_SglBindTexImage failed!! dpy:%#x surface:%#x buffer:%#x", + (unsigned int)dpy, (unsigned int)surface, (unsigned int)buffer); + + return eglBindTexImage(dpy, EGL_NO_SURFACE, buffer); + } + + EGLBoolean ret = eglBindTexImage(dpy, pSglInfo->surface, buffer); + pSglInfoTableManipulatorInstance->UnlockSglInfoTable(); + + return ret; +} + +EGLBoolean +_SglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer) +{ + _SglInfoTableManipulator* pSglInfoTableManipulatorInstance = _SglInfoTableManipulator::GetInstance(); + + _SglIndex sglIndex = (_SglIndex)surface; + _SglInfo* pSglInfo = pSglInfoTableManipulatorInstance->LockSglInfoTable(sglIndex); + + if (sglIndex <= INVALID_SGL_INDEX || pSglInfo == null) + { + pSglInfoTableManipulatorInstance->UnlockSglInfoTable(); + SysLog(NID_GRP, "_SglReleaseTexImage failed!! dpy:%#x surface:%#x buffer:%#x", + (unsigned int)dpy, (unsigned int)surface, (unsigned int)buffer); + + return eglReleaseTexImage(dpy, EGL_NO_SURFACE, buffer); + } + + EGLBoolean ret = eglReleaseTexImage(dpy, pSglInfo->surface, buffer); + pSglInfoTableManipulatorInstance->UnlockSglInfoTable(); + + return ret; +} + +EGLBoolean +_SglSwapInterval(EGLDisplay dpy, EGLint interval) +{ + return eglSwapInterval(dpy, interval); +} + +EGLContext +_SglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext shareContext, const EGLint* pAttribList) +{ + return eglCreateContext(dpy, config, shareContext, pAttribList); +} + +EGLBoolean +_SglDestroyContext(EGLDisplay dpy, EGLContext ctx) +{ + return eglDestroyContext(dpy, ctx); +} + +EGLBoolean +_SglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx) +{ + _SglInfoTableManipulator* pSglInfoTableManipulatorInstance = _SglInfoTableManipulator::GetInstance(); + + _SglIndex sglIndexDraw = (_SglIndex)draw; + _SglIndex sglIndexRead = (_SglIndex)read; + + EGLSurface sglInfoReadSurface; + { + _SglInfo* sglInfoRead = pSglInfoTableManipulatorInstance->LockSglInfoTable(sglIndexRead); + + if (sglInfoRead == null) + { + pSglInfoTableManipulatorInstance->UnlockSglInfoTable(); + SysLog(NID_GRP, "_SglMakeCurrent failed!! dpy:%#x draw:%#x read:%#x ctx:%#x", + (unsigned int)dpy, (unsigned int)draw, (unsigned int)read, (unsigned int)ctx); + return eglMakeCurrent(dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, ctx); + } + sglInfoReadSurface = sglInfoRead->surface; + + if (__isDoublePixmapEnabled && !sglInfoRead->isBackbuffer && sglInfoRead->pSecondSglInfo != null) + { + sglInfoReadSurface = sglInfoRead->pSecondSglInfo->surface; + } + + pSglInfoTableManipulatorInstance->UnlockSglInfoTable(); + } + + _SglInfo* pSglInfoDraw = pSglInfoTableManipulatorInstance->LockSglInfoTable(sglIndexDraw); + if (pSglInfoDraw == null) + { + pSglInfoTableManipulatorInstance->UnlockSglInfoTable(); + SysLog(NID_GRP, "_SglMakeCurrent failed!! dpy:%#x draw:%#x read:%#x ctx:%#x", + (unsigned int)dpy, (unsigned int)draw, (unsigned int)read, (unsigned int)ctx); + return eglMakeCurrent(dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, ctx); + } + + if (__isDoublePixmapEnabled && !pSglInfoDraw->isBackbuffer && pSglInfoDraw->pSecondSglInfo != null) + { + pSglInfoDraw = pSglInfoDraw->pSecondSglInfo; + } + + pSglInfoDraw->context = ctx; + + EGLBoolean ret = eglMakeCurrent(dpy, pSglInfoDraw->surface, sglInfoReadSurface, ctx); +#if defined(FGRAPHICS_INTERNAL_USE_RESTORE_CONTEXT) + __needRestoreContext = false; +#endif + +#if defined(FGRAPHICS_INTERNAL_USE_RESTORE_CONTEXT) + _SaveCurrentContext(pSglInfoDraw); +#endif + + if (pSglInfoDraw->glVersion == 0 && ctx != EGL_NO_CONTEXT) + { + eglQueryContext(dpy, ctx, EGL_CONTEXT_CLIENT_VERSION, &pSglInfoDraw->glVersion); + } + + pSglInfoTableManipulatorInstance->UnlockSglInfoTable(); + + return ret; +} + +EGLContext +_SglGetCurrentContext() +{ + return eglGetCurrentContext(); +} + +EGLSurface +_SglGetCurrentSurface(EGLint readDraw) +{ + EGLSurface surface = EGL_NO_SURFACE; + _SglIndex sglIndex = INVALID_SGL_INDEX; + + surface = eglGetCurrentSurface(readDraw); + sglIndex = _SglInfoTableManipulator::GetInstance()->GetSglIndexForSurface(surface); + + if (sglIndex < INVALID_SGL_INDEX) + { + SysLog(NID_GRP, "_SglGetCurrentSurface failed!! readDraw:%#x", (unsigned int)readDraw); + return EGL_NO_SURFACE; + } + + return (EGLSurface)sglIndex; +} + +EGLDisplay +_SglGetCurrentDisplay(void) +{ + return eglGetCurrentDisplay(); +} + +EGLBoolean +_SglQueryContext(EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint* pValue) +{ + return eglQueryContext(dpy, ctx, attribute, pValue); +} + +EGLBoolean +_SglWaitGL(void) +{ + return eglWaitGL(); +} + +EGLBoolean +_SglWaitNative(EGLint engine) +{ + return eglWaitNative(engine); +} + +EGLBoolean _SglUpdateBufferOSP(EGLDisplay dpy, EGLSurface surface); + +EGLBoolean +_SglSwapBuffers(EGLDisplay dpy, EGLSurface surface) +{ + _SglInfoTableManipulator* pSglInfoTableManipulatorInstance = _SglInfoTableManipulator::GetInstance(); + + _SglIndex sglIndex = (_SglIndex)surface; + _SglInfo* pSglInfo = pSglInfoTableManipulatorInstance->LockSglInfoTable(sglIndex); + + if (sglIndex <= INVALID_SGL_INDEX || pSglInfo == null) + { + pSglInfoTableManipulatorInstance->UnlockSglInfoTable(); + SysLog(NID_GRP, "_SglSwapBuffers failed!! dpy:%#x sglIndex:%#x", (unsigned int)dpy + , (unsigned int)sglIndex); + + return eglSwapBuffers(dpy, EGL_NO_SURFACE); + } + + if (pSglInfo->pBitmap != null) + { +#if defined(FGRAPHICS_INTERNAL_USE_EGLCOPYBUFFER) + _SglUpdateBufferOSP(dpy, surface); +#else + if(__evasEngineType == ENGINE_TYPE_OPENGL_X11) + { + if (pSglInfo->glVersion == 1) + { + _GlFlush_1(); + } + else + { + _GlFlush_2(); + } + } + else + { + eglWaitGL(); + } +#endif + + if(__evasEngineType == ENGINE_TYPE_SOFEWARE_X11 || __evasEngineType == ENGINE_TYPE_OPENGL_X11) + { + if (__isDoublePixmapEnabled && pSglInfo->pSecondSglInfo != null) + { + if (!__pSwapQueue->Contains(*pSglInfo)) + { + __pSwapQueue->Enqueue(pSglInfo); + _SglInfo* pBackSglInfo = null; + _SglInfo* pFrontSglInfo = null; + + if (pSglInfo->isBackbuffer) + { + pBackSglInfo = pSglInfo; + pFrontSglInfo = pSglInfo->pSecondSglInfo; + } + else + { + pBackSglInfo = pSglInfo->pSecondSglInfo; + pFrontSglInfo = pSglInfo; + } + + + if (pSglInfo->pVisualElement != null) + { + pSglInfo->pVisualElement->SetSurface(pFrontSglInfo->pVisualElementSurface); + } + evas_object_image_pixels_dirty_set(pFrontSglInfo->pObject, EINA_TRUE); + evas_object_hide(pBackSglInfo->pObject); + + if (pSglInfo->isFirstSwap) + { + pBackSglInfo->isFirstSwap = false; + pFrontSglInfo->isFirstSwap = false; + + eglWaitGL(); + BufferInfo bufferInfo; + pFrontSglInfo->pBitmap->Lock(bufferInfo); + pFrontSglInfo->pBitmap->Merge(Point(0, 0), *pBackSglInfo->pBitmap, Rectangle(0, 0, bufferInfo.width, bufferInfo.height)); + pFrontSglInfo->pBitmap->Unlock(); + } + } + } + else + { + if (pSglInfo->pObject != null) + { + evas_object_image_pixels_dirty_set(pSglInfo->pObject, EINA_TRUE); + } + } + } + else + { + if (pSglInfo->pVisualElement != null) + { + if (pSglInfo->isCopyNeeded) + { + BufferInfo bufferInfo; + pSglInfo->pBitmapCopyNeeded->Lock(bufferInfo); + pSglInfo->pBitmapCopyNeeded->Merge(Point(0, 0), *pSglInfo->pBitmap, Rectangle(0, 0, bufferInfo.width, bufferInfo.height)); + pSglInfo->pBitmapCopyNeeded->Unlock(); + } + pSglInfo->pVisualElement->SetFlushNeeded(); + } + } + + + pSglInfoTableManipulatorInstance->UnlockSglInfoTable(); + return EGL_TRUE; + } + else + { + EGLBoolean ret = eglSwapBuffers(dpy, pSglInfo->surface); + pSglInfoTableManipulatorInstance->UnlockSglInfoTable(); + + return ret; + } +} + +EGLBoolean +_SglCopyBuffers(EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target) +{ + Tizen::Graphics::Bitmap* pBitmap = (Tizen::Graphics::Bitmap*)target; + EGLNativePixmapType nativePixmap = _CreateNativePixmap((_SglIndex)surface, pBitmap); + return eglCopyBuffers(dpy, surface, nativePixmap); +} + +typedef void (*__EglMustCastToProperFunctionPointerType)(void); + +EGLBoolean _SglLockSurfaceKHR(EGLDisplay display, EGLSurface surface, const EGLint *attrib_list) +{ + _SglInfoTableManipulator* pSglInfoTableManipulatorInstance = _SglInfoTableManipulator::GetInstance(); + + _SglIndex sglIndex = (_SglIndex)surface; + _SglInfo* pSglInfo = pSglInfoTableManipulatorInstance->LockSglInfoTable(sglIndex); + + if (sglIndex <= INVALID_SGL_INDEX || pSglInfo == null || pSglInfo->pBitmap == null || pSglInfo->pBitmapLocked != null) + { + pSglInfoTableManipulatorInstance->UnlockSglInfoTable(); + SysLog(NID_GRP, "_SglLockSurfaceKHR failed!! dpy:%#x sglIndex:%#x", (unsigned int)display + , (unsigned int)surface); + return EGL_FALSE; + } + + _SglInfo* pSglInfoLock = pSglInfo; + BufferInfo bufferInfo; + if(!pSglInfo->isBackbuffer && pSglInfo->pSecondSglInfo != null) + { + pSglInfoLock = pSglInfo->pSecondSglInfo; + } + + pSglInfoLock->pBitmap->Lock(bufferInfo); + pSglInfo->pBitmapPointer = bufferInfo.pPixels; + pSglInfo->pBitmapLocked = pSglInfoLock->pBitmap; + pSglInfoTableManipulatorInstance->UnlockSglInfoTable(); + + return EGL_TRUE; +} + +EGLBoolean _SglUnlockSurfaceKHR(EGLDisplay display, EGLSurface surface) +{ + _SglInfoTableManipulator* pSglInfoTableManipulatorInstance = _SglInfoTableManipulator::GetInstance(); + + _SglIndex sglIndex = (_SglIndex)surface; + _SglInfo* pSglInfo = pSglInfoTableManipulatorInstance->LockSglInfoTable(sglIndex); + + if (sglIndex <= INVALID_SGL_INDEX || pSglInfo == null || pSglInfo->pBitmap == null || pSglInfo->pBitmapLocked == null) + { + pSglInfoTableManipulatorInstance->UnlockSglInfoTable(); + SysLog(NID_GRP, "_SglUnlockSurfaceKHR failed!! dpy:%#x sglIndex:%#x", (unsigned int)display + , (unsigned int)surface); + return EGL_FALSE; + } + + pSglInfo->pBitmapLocked->Unlock(); + pSglInfo->pBitmapPointer = null; + pSglInfo->pBitmapLocked = null; + pSglInfoTableManipulatorInstance->UnlockSglInfoTable(); + + 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) +{ + String name(pProcName); + + if (name.CompareTo(String("eglLockSurfaceKHR")) == 0) + { + return (__EglMustCastToProperFunctionPointerType)_SglLockSurfaceKHR; + } + else if (name.CompareTo(String("eglUnlockSurfaceKHR")) == 0) + { + return (__EglMustCastToProperFunctionPointerType)_SglUnlockSurfaceKHR; + } + 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 +_SglUpdateBufferOSP(EGLDisplay dpy, EGLSurface surface) +{ +#if defined(FGRAPHICS_INTERNAL_USE_EGLCOPYBUFFER) + Tizen::Graphics::BufferInfo bufferInfo; + _SglInfoTableManipulator* pSglInfoTableManipulatorInstance = _SglInfoTableManipulator::GetInstance(); + + _SglIndex sglIndex = (_SglIndex)surface; + _SglInfo* pSglInfo = pSglInfoTableManipulatorInstance->LockSglInfoTable(sglIndex); + + if (sglIndex <= INVALID_SGL_INDEX || pSglInfo == null) + { + pSglInfoTableManipulatorInstance->UnlockSglInfoTable(); + SysLog(NID_GRP, "_SglUpdateBufferOSP failed!!"); + return EGL_FALSE; + } + + eglCopyBuffers(dpy, pSglInfo->surface, pSglInfo->nativePixmap); + ecore_x_image_get(pSglInfo->pEcoreImage, (Ecore_X_Drawable)pSglInfo->nativePixmap, + 0, 0, 0, 0, pSglInfo->width, pSglInfo->height); + + pSglInfoTableManipulatorInstance->UnlockSglInfoTable(); +#endif + return EGL_TRUE; +} + +#ifdef __cplusplus +} +#endif + +} // Opengl + +}} // Tizen::Graphics diff --git a/src/graphics/opengl/FGrpGlPlayer.cpp b/src/graphics/opengl/FGrpGlPlayer.cpp new file mode 100644 index 0000000..9a413c8 --- /dev/null +++ b/src/graphics/opengl/FGrpGlPlayer.cpp @@ -0,0 +1,180 @@ +// +// 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 FGrpGlPlayer.cpp + * @brief This is the implementation file for GlPlayer class. + * + */ + +#include + +#include + +#include +#include +#include + +#include "FGrp_GlPlayerImpl.h" + +#define CHECK_CONSTRUCTED \ + SysAssertf((this->__pImpl != null) && this->__pImpl->IsValid(), "Not yet constructed. Construct() should be called before use."); + +namespace Tizen { namespace Graphics { namespace Opengl +{ + +GlPlayer::GlPlayer(void) + : __pImpl(new (std::nothrow)_GlPlayerImpl) +{ +} + +GlPlayer::~GlPlayer(void) +{ + delete this->__pImpl; +} + +result +GlPlayer::Construct(EglContextClientVersion version, Tizen::Ui::Control* pControl) +{ + ClearLastResult(); + 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); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +GlPlayer::Start(void) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->Start(); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +GlPlayer::Pause(void) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->Pause(); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +GlPlayer::Resume(void) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->Resume(); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +GlPlayer::Stop(void) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->Stop(); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +GlPlayer::Redraw(void) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->Redraw(); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +void +GlPlayer::SetFps(int fps) +{ + CHECK_CONSTRUCTED; + + this->__pImpl->SetFps(fps); +} + +result +GlPlayer::SetEglAttributeList(const EGLint* pEglConfigList) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->SetEglAttributeList(pEglConfigList); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +GlPlayer::SetEglAttributePreset(EglAttributesPreset preset) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->SetEglAttributePreset(preset); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +GlPlayer::SetEglAttribute(EGLint key, EGLint value) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->SetEglAttribute(key, value); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +GlPlayer::SetIGlRenderer(IGlRenderer* pRenderer) +{ + CHECK_CONSTRUCTED; + + result r = this->__pImpl->SetIGlRenderer(pRenderer); + + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +}}} // Tizen::Graphics::Opengl diff --git a/src/graphics/opengl/FGrpGles1.cpp b/src/graphics/opengl/FGrpGles1.cpp new file mode 100644 index 0000000..8b215ac --- /dev/null +++ b/src/graphics/opengl/FGrpGles1.cpp @@ -0,0 +1,2645 @@ +// +// 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 FGrpGles1.cpp + * @brief This is the implementation file for OpenGL ES 1.X. + * + */ + + +#define FGRAPHICS_INTERNAL_USE_DYNAMIC_LOADING +#if defined(FGRAPHICS_INTERNAL_USE_DYNAMIC_LOADING) +#include +#include +#include +#include +#include +#include +#endif + +#include +#include + +#if defined(FGRAPHICS_INTERNAL_USE_DYNAMIC_LOADING) +#include +#endif + +using namespace Tizen::Base; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; + +namespace Tizen { namespace Graphics +{ + +namespace Opengl +{ + +#if !defined(FGRAPHICS_INTERNAL_USE_DYNAMIC_LOADING) + +#ifdef __cplusplus +extern "C" +{ +#endif + +void +_GlAlphaFunc_1(GLenum func, GLclampf ref) +{ + glAlphaFunc(func, ref); +} + +void +_GlClearColor_1(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) +{ + glClearColor(red, green, blue, alpha); +} + +void +_GlClearDepthf_1(GLclampf depth) +{ + glClearDepthf(depth); +} + +void +_GlClipPlanef_1(GLenum plane, const GLfloat* pEquation) +{ + glClipPlanef(plane, pEquation); +} + +void +_GlColor4f_1(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) +{ + glColor4f(red, green, blue, alpha); +} + +void +_GlDepthRangef_1(GLclampf zNear, GLclampf zFar) +{ + glDepthRangef(zNear, zFar); +} + +void +_GlFogf_1(GLenum pname, GLfloat param) +{ + glFogf(pname, param); +} + +void +_GlFogfv_1(GLenum pname, const GLfloat* pParams) +{ + glFogfv(pname, pParams); +} + +void +_GlFrustumf_1(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) +{ + glFrustumf(left, right, bottom, top, zNear, zFar); +} + +void +_GlGetClipPlanef_1(GLenum pname, GLfloat eqn[4]) +{ + glGetClipPlanef(pname, eqn); +} + +void +_GlGetFloatv_1(GLenum pname, GLfloat* pParams) +{ + glGetFloatv(pname, pParams); +} + +void +_GlGetLightfv_1(GLenum light, GLenum pname, GLfloat* pParams) +{ + glGetLightfv(light, pname, pParams); +} + +void +_GlGetMaterialfv_1(GLenum face, GLenum pname, GLfloat* pParams) +{ + glGetMaterialfv(face, pname, pParams); +} + +void +_GlGetTexEnvfv_1(GLenum env, GLenum pname, GLfloat* pParams) +{ + glGetTexEnvfv(env, pname, pParams); +} + +void +_GlGetTexParameterfv_1(GLenum target, GLenum pname, GLfloat* pParams) +{ + glGetTexParameterfv(target, pname, pParams); +} + +void +_GlLightModelf_1(GLenum pname, GLfloat param) +{ + glLightModelf(pname, param); +} + +void +_GlLightModelfv_1(GLenum pname, const GLfloat* pParams) +{ + glLightModelfv(pname, pParams); +} + +void +_GlLightf_1(GLenum light, GLenum pname, GLfloat param) +{ + glLightf(light, pname, param); +} + +void +_GlLightfv_1(GLenum light, GLenum pname, const GLfloat* pParams) +{ + glLightfv(light, pname, pParams); +} + +void +_GlLineWidth_1(GLfloat width) +{ + glLineWidth(width); +} + +void +_GlLoadMatrixf_1(const GLfloat* pM) +{ + glLoadMatrixf(pM); +} + +void +_GlMaterialf_1(GLenum face, GLenum pname, GLfloat param) +{ + glMaterialf(face, pname, param); +} + +void +_GlMaterialfv_1(GLenum face, GLenum pname, const GLfloat* pParams) +{ + glMaterialfv(face, pname, pParams); +} + +void +_GlMultMatrixf_1(const GLfloat* pM) +{ + glMultMatrixf(pM); +} + +void +_GlMultiTexCoord4f_1(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q) +{ + glMultiTexCoord4f(target, s, t, r, q); +} + +void +_GlNormal3f_1(GLfloat nx, GLfloat ny, GLfloat nz) +{ + glNormal3f(nx, ny, nz); +} + +void +_GlOrthof_1(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) +{ + glOrthof(left, right, bottom, top, zNear, zFar); +} + +void +_GlPointParameterf_1(GLenum pname, GLfloat param) +{ + glPointParameterf(pname, param); +} + +void +_GlPointParameterfv_1(GLenum pname, const GLfloat* pParams) +{ + glPointParameterfv(pname, pParams); +} + +void +_GlPointSize_1(GLfloat size) +{ + glPointSize(size); +} + +void +_GlPolygonOffset_1(GLfloat factor, GLfloat units) +{ + glPolygonOffset(factor, units); +} + +void +_GlRotatef_1(GLfloat angle, GLfloat x, GLfloat y, GLfloat z) +{ + glRotatef(angle, x, y, z); +} + +void +_GlScalef_1(GLfloat x, GLfloat y, GLfloat z) +{ + glScalef(x, y, z); +} + +void +_GlTexEnvf_1(GLenum target, GLenum pname, GLfloat param) +{ + glTexEnvf(target, pname, param); +} + +void +_GlTexEnvfv_1(GLenum target, GLenum pname, const GLfloat* pParams) +{ + glTexEnvfv(target, pname, pParams); +} + +void +_GlTexParameterf_1(GLenum target, GLenum pname, GLfloat param) +{ + glTexParameterf(target, pname, param); +} + +void +_GlTexParameterfv_1(GLenum target, GLenum pname, const GLfloat* pParams) +{ + glTexParameterfv(target, pname, pParams); +} + +void +_GlTranslatef_1(GLfloat x, GLfloat y, GLfloat z) +{ + glTranslatef(x, y, z); +} + +void +_GlActiveTexture_1(GLenum texture) +{ + glActiveTexture(texture); +} + +void +_GlAlphaFuncx_1(GLenum func, GLclampx ref) +{ + glAlphaFuncx(func, ref); +} + +void +_GlBindBuffer_1(GLenum target, GLuint buffer) +{ + glBindBuffer(target, buffer); +} + +void +_GlBindTexture_1(GLenum target, GLuint texture) +{ + glBindTexture(target, texture); +} + +void +_GlBlendFunc_1(GLenum sfactor, GLenum dfactor) +{ + glBlendFunc(sfactor, dfactor); +} + +void +_GlBufferData_1(GLenum target, GLsizeiptr size, const GLvoid* pData, GLenum usage) +{ + glBufferData(target, size, pData, usage); +} + +void +_GlBufferSubData_1(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* pData) +{ + glBufferSubData(target, offset, size, pData); +} + +void +_GlClear_1(GLbitfield mask) +{ + glClear(mask); +} + +void +_GlClearColorx_1(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha) +{ + glClearColorx(red, green, blue, alpha); +} + +void +_GlClearDepthx_1(GLclampx depth) +{ + glClearDepthx(depth); +} + +void +_GlClearStencil_1(GLint s) +{ + glClearStencil(s); +} + +void +_GlClientActiveTexture_1(GLenum texture) +{ + glClientActiveTexture(texture); +} + +void +_GlClipPlanex_1(GLenum plane, const GLfixed* pEquation) +{ + glClipPlanex(plane, pEquation); +} + +void +_GlColor4ub_1(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha) +{ + glColor4ub(red, green, blue, alpha); +} + +void +_GlColor4x_1(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) +{ + glColor4x(red, green, blue, alpha); +} + +void +_GlColorMask_1(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) +{ + glColorMask(red, green, blue, alpha); +} + +void +_GlColorPointer_1(GLint size, GLenum type, GLsizei stride, const GLvoid* pPointer) +{ + glColorPointer(size, type, stride, pPointer); +} + +void +_GlCompressedTexImage2D_1(GLenum target, GLint level, GLenum internalformat, + GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* pData) +{ + glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, pData); +} + +void +_GlCompressedTexSubImage2D_1(GLenum target, GLint level, GLint xoffset, GLint yoffset, + GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* pData) +{ + glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, pData); +} + +void +_GlCopyTexImage2D_1(GLenum target, GLint level, + GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) +{ + glCopyTexImage2D(target, level, internalformat, x, y, width, height, border); +} + +void +_GlCopyTexSubImage2D_1(GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) +{ + glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); +} + +void +_GlCullFace_1(GLenum mode) +{ + glCullFace(mode); +} + +void +_GlDeleteBuffers_1(GLsizei n, const GLuint* pBuffers) +{ + glDeleteBuffers(n, pBuffers); +} + +void +_GlDeleteTextures_1(GLsizei n, const GLuint* pTextures) +{ + glDeleteTextures(n, pTextures); +} + +void +_GlDepthFunc_1(GLenum func) +{ + glDepthFunc(func); +} + +void +_GlDepthMask_1(GLboolean flag) +{ + glDepthMask(flag); +} + +void +_GlDepthRangex_1(GLclampx zNear, GLclampx zFar) +{ + glDepthRangex(zNear, zFar); +} + +void +_GlDisable_1(GLenum cap) +{ + glDisable(cap); +} + +void +_GlDisableClientState_1(GLenum array) +{ + glDisableClientState(array); +} + +void +_GlDrawArrays_1(GLenum mode, GLint first, GLsizei count) +{ + glDrawArrays(mode, first, count); +} + +void +_GlDrawElements_1(GLenum mode, GLsizei count, GLenum type, const GLvoid* pIndices) +{ + glDrawElements(mode, count, type, pIndices); +} + +void +_GlEnable_1(GLenum cap) +{ + glEnable(cap); +} + +void +_GlEnableClientState_1(GLenum array) +{ + glEnableClientState(array); +} + +void +_GlFinish_1(void) +{ + glFinish(); +} + +void +_GlFlush_1(void) +{ + glFlush(); +} + +void +_GlFogx_1(GLenum pname, GLfixed param) +{ + glFogx(pname, param); +} + +void +_GlFogxv_1(GLenum pname, const GLfixed* pParams) +{ + glFogxv(pname, pParams); +} + +void +_GlFrontFace_1(GLenum mode) +{ + glFrontFace(mode); +} + +void +_GlFrustumx_1(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) +{ + glFrustumx(left, right, bottom, top, zNear, zFar); +} + +void +_GlGetBooleanv_1(GLenum pname, GLboolean* pParams) +{ + glGetBooleanv(pname, pParams); +} + +void +_GlGetBufferParameteriv_1(GLenum target, GLenum pname, GLint* pParams) +{ + glGetBufferParameteriv(target, pname, pParams); +} + +void +_GlGetClipPlanex_1(GLenum pname, GLfixed eqn[4]) +{ + glGetClipPlanex(pname, eqn); +} + +void +_GlGenBuffers_1(GLsizei n, GLuint* pBuffers) +{ + glGenBuffers(n, pBuffers); +} + +void +_GlGenTextures_1(GLsizei n, GLuint* pTextures) +{ + glGenTextures(n, pTextures); +} + +GLenum +_GlGetError_1(void) +{ + return glGetError(); +} + +void +_GlGetFixedv_1(GLenum pname, GLfixed* pParams) +{ + glGetFixedv(pname, pParams); +} + +void +_GlGetIntegerv_1(GLenum pname, GLint* pParams) +{ + glGetIntegerv(pname, pParams); +} + +void +_GlGetLightxv_1(GLenum light, GLenum pname, GLfixed* pParams) +{ + glGetLightxv(light, pname, pParams); +} + +void +_GlGetMaterialxv_1(GLenum face, GLenum pname, GLfixed* pParams) +{ + glGetMaterialxv(face, pname, pParams); +} + +void +_GlGetPointerv_1(GLenum pname, void** ppParams) +{ + glGetPointerv(pname, ppParams); +} + +const GLubyte* +_GlGetString_1(GLenum name) +{ + return glGetString(name); +} + +void +_GlGetTexEnviv_1(GLenum env, GLenum pname, GLint* pParams) +{ + glGetTexEnviv(env, pname, pParams); +} + +void +_GlGetTexEnvxv_1(GLenum env, GLenum pname, GLfixed* pParams) +{ + glGetTexEnvxv(env, pname, pParams); +} + +void +_GlGetTexParameteriv_1(GLenum target, GLenum pname, GLint* pParams) +{ + glGetTexParameteriv(target, pname, pParams); +} + +void +_GlGetTexParameterxv_1(GLenum target, GLenum pname, GLfixed* pParams) +{ + glGetTexParameterxv(target, pname, pParams); +} + +void +_GlHint_1(GLenum target, GLenum mode) +{ + glHint(target, mode); +} + +GLboolean +_GlIsBuffer_1(GLuint buffer) +{ + return glIsBuffer(buffer); +} + +GLboolean +_GlIsEnabled_1(GLenum cap) +{ + return glIsEnabled(cap); +} + +GLboolean +_GlIsTexture_1(GLuint texture) +{ + return glIsTexture(texture); +} + +void +_GlLightModelx_1(GLenum pname, GLfixed param) +{ + glLightModelx(pname, param); +} + +void +_GlLightModelxv_1(GLenum pname, const GLfixed* pParams) +{ + glLightModelxv(pname, pParams); +} + +void +_GlLightx_1(GLenum light, GLenum pname, GLfixed param) +{ + glLightx(light, pname, param); +} + +void +_GlLightxv_1(GLenum light, GLenum pname, const GLfixed* pParams) +{ + glLightxv(light, pname, pParams); +} + +void +_GlLineWidthx_1(GLfixed width) +{ + glLineWidthx(width); +} + +void +_GlLoadIdentity_1(void) +{ + glLoadIdentity(); +} + +void +_GlLoadMatrixx_1(const GLfixed* pM) +{ + glLoadMatrixx(pM); +} + +void +_GlLogicOp_1(GLenum opcode) +{ + glLogicOp(opcode); +} + +void +_GlMaterialx_1(GLenum face, GLenum pname, GLfixed param) +{ + glMaterialx(face, pname, param); +} + +void +_GlMaterialxv_1(GLenum face, GLenum pname, const GLfixed* pParams) +{ + glMaterialxv(face, pname, pParams); +} + +void +_GlMatrixMode_1(GLenum mode) +{ + glMatrixMode(mode); +} + +void +_GlMultMatrixx_1(const GLfixed* pM) +{ + glMultMatrixx(pM); +} + +void +_GlMultiTexCoord4x_1(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q) +{ + glMultiTexCoord4x(target, s, t, r, q); +} + +void +_GlNormal3x_1(GLfixed nx, GLfixed ny, GLfixed nz) +{ + glNormal3x(nx, ny, nz); +} + +void +_GlNormalPointer_1(GLenum type, GLsizei stride, const GLvoid* pPointer) +{ + glNormalPointer(type, stride, pPointer); +} + +void +_GlOrthox_1(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) +{ + glOrthox(left, right, bottom, top, zNear, zFar); +} + +void +_GlPixelStorei_1(GLenum pname, GLint param) +{ + glPixelStorei(pname, param); +} + +void +_GlPointParameterx_1(GLenum pname, GLfixed param) +{ + glPointParameterx(pname, param); +} + +void +_GlPointParameterxv_1(GLenum pname, const GLfixed* pParams) +{ + glPointParameterxv(pname, pParams); +} + +void +_GlPointSizex_1(GLfixed size) +{ + glPointSizex(size); +} + +void +_GlPolygonOffsetx_1(GLfixed factor, GLfixed units) +{ + glPolygonOffsetx(factor, units); +} + +void +_GlPopMatrix_1(void) +{ + glPopMatrix(); +} + +void +_GlPushMatrix_1(void) +{ + glPushMatrix(); +} + +void +_GlReadPixels_1(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pPixels) +{ + glReadPixels(x, y, width, height, format, type, pPixels); +} + +void +_GlRotatex_1(GLfixed angle, GLfixed x, GLfixed y, GLfixed z) +{ + glRotatex(angle, x, y, z); +} + +void +_GlSampleCoverage_1(GLclampf value, GLboolean invert) +{ + glSampleCoverage(value, invert); +} + +void +_GlSampleCoveragex_1(GLclampx value, GLboolean invert) +{ + glSampleCoveragex(value, invert); +} + +void +_GlScalex_1(GLfixed x, GLfixed y, GLfixed z) +{ + glScalex(x, y, z); +} + +void +_GlScissor_1(GLint x, GLint y, GLsizei width, GLsizei height) +{ + glScissor(x, y, width, height); +} + +void +_GlShadeModel_1(GLenum mode) +{ + glShadeModel(mode); +} + +void +_GlStencilFunc_1(GLenum func, GLint ref, GLuint mask) +{ + glStencilFunc(func, ref, mask); +} + +void +_GlStencilMask_1(GLuint mask) +{ + glStencilMask(mask); +} + +void +_GlStencilOp_1(GLenum fail, GLenum zfail, GLenum zpass) +{ + glStencilOp(fail, zfail, zpass); +} + +void +_GlTexCoordPointer_1(GLint size, GLenum type, GLsizei stride, const GLvoid* pPointer) +{ + glTexCoordPointer(size, type, stride, pPointer); +} + +void +_GlTexEnvi_1(GLenum target, GLenum pname, GLint param) +{ + glTexEnvi(target, pname, param); +} + +void +_GlTexEnvx_1(GLenum target, GLenum pname, GLfixed param) +{ + glTexEnvx(target, pname, param); +} + +void +_GlTexEnviv_1(GLenum target, GLenum pname, const GLint* pParams) +{ + glTexEnviv(target, pname, pParams); +} + +void +_GlTexEnvxv_1(GLenum target, GLenum pname, const GLfixed* pParams) +{ + glTexEnvxv(target, pname, pParams); +} + +void +_GlTexImage2D_1(GLenum target, GLint level, GLint internalformat, + GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pPixels) +{ + glTexImage2D(target, level, internalformat, width, height, border, format, type, pPixels); +} + +void +_GlTexParameteri_1(GLenum target, GLenum pname, GLint param) +{ + glTexParameteri(target, pname, param); +} + +void +_GlTexParameterx_1(GLenum target, GLenum pname, GLfixed param) +{ + glTexParameterx(target, pname, param); +} + +void +_GlTexParameteriv_1(GLenum target, GLenum pname, const GLint* pParams) +{ + glTexParameteriv(target, pname, pParams); +} + +void +_GlTexParameterxv_1(GLenum target, GLenum pname, const GLfixed* pParams) +{ + glTexParameterxv(target, pname, pParams); +} + +void +_GlTexSubImage2D_1(GLenum target, GLint level, GLint xoffset, GLint yoffset, + GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pPixels) +{ + glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pPixels); +} + +void +_GlTranslatex_1(GLfixed x, GLfixed y, GLfixed z) +{ + glTranslatex(x, y, z); +} + +void +_GlVertexPointer_1(GLint size, GLenum type, GLsizei stride, const GLvoid* pPointer) +{ + glVertexPointer(size, type, stride, pPointer); +} + +void +_GlViewport_1(GLint x, GLint y, GLsizei width, GLsizei height) +{ + glViewport(x, y, width, height); +} + +void +_GlPointSizePointerOES_1(GLenum type, GLsizei stride, const GLvoid* pPointer) +{ + glPointSizePointerOES(type, stride, pPointer); +} + +void +_GlCurrentPaletteMatrixOES_1(GLuint matrixpaletteindex) +{ + //glCurrentPaletteMatrixOES(matrixpaletteindex); +} +void +_GlLoadPaletteFromModelViewMatrixOES_1(void) +{ + //glLoadPaletteFromModelViewMatrixOES(); +} +void +_GlMatrixIndexPointerOES_1(GLint size, GLenum type, GLsizei stride, const GLvoid* pPointer) +{ + //glMatrixIndexPointerOES(size, type, stride, pPointer); +} +void +_GlWeightPointerOES_1(GLint size, GLenum type, GLsizei stride, const GLvoid* pPointer) +{ + //glWeightPointerOES(size, type, stride, pPointer); +} + +// FBO is extension functions in OpenGL ES 1.1 +//Start of FBO Functions +GLboolean +_GlIsRenderbufferOES_1(GLuint renderbuffer) +{ + //return glIsRenderbufferOES(renderbuffer); + return false; +} +void +_GlBindRenderbufferOES_1(GLenum target, GLuint renderbuffer) +{ + //glBindRenderbufferOES(target, renderbuffer); +} +void +_GlDeleteRenderbuffersOES_1(GLsizei n, const GLuint* pRenderbuffers) +{ + //glDeleteRenderbuffersOES(n, pRenderbuffers); +} +void +_GlGenRenderbuffersOES_1(GLsizei n, GLuint* pRenderbuffers) +{ + //glGenRenderbuffersOES(n, pRenderbuffers); +} +void +_GlRenderbufferStorageOES_1(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) +{ + //glRenderbufferStorageOES(target, internalformat, width, height); +} +void +_GlGetRenderbufferParameterivOES_1(GLenum target, GLenum pname, GLint* pParams) +{ + //glGetRenderbufferParameterivOES(target, pname, pParams); +} +GLboolean +_GlIsFramebufferOES_1(GLuint framebuffer) +{ + //return glIsFramebufferOES(framebuffer); + return false; +} +void +_GlBindFramebufferOES_1(GLenum target, GLuint framebuffer) +{ + //glBindFramebufferOES(target, framebuffer); +} +void +_GlDeleteFramebuffersOES_1(GLsizei n, const GLuint* pFramebuffers) +{ + //glDeleteFramebuffersOES(n, pFramebuffers); +} +void +_GlGenFramebuffersOES_1(GLsizei n, GLuint* pFramebuffers) +{ + //glGenFramebuffersOES(n, pFramebuffers); +} +GLenum +_GlCheckFramebufferStatusOES_1(GLenum target) +{ + //return glCheckFramebufferStatusOES(target);; + return false; +} +void +_GlFramebufferRenderbufferOES_1(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) +{ + //glFramebufferRenderbufferOES(target, attachment, renderbuffertarget, renderbuffer); +} +void +_GlFramebufferTexture2DOES_1(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) +{ + //glFramebufferTexture2DOES(target, attachment, textarget, texture, level); +} +void +_GlGetFramebufferAttachmentParameterivOES_1(GLenum target, GLenum attachment, GLenum pname, GLint* pParams) +{ + //glGetFramebufferAttachmentParameterivOES(target, attachment, pname, pParams); +} +void +_GlGenerateMipmapOES_1(GLenum target) +{ + //glGenerateMipmapOES(target); +} +//End of FBO Functions + +#ifdef __cplusplus +} +#endif + +#else + +#define _GLES_CHECK_INTERFACE_VOID_1 if (!_GlesInterfaceInitialize_1()) \ + { \ + return; \ + } +#define _GLES_CHECK_INTERFACE_GLBOOLEAN_1 if (!_GlesInterfaceInitialize_1()) \ + { \ + return GL_FALSE; \ + } +#define _GLES_CHECK_INTERFACE_GLENUM_1 if (!_GlesInterfaceInitialize_1()) \ + { \ + return 0; \ + } +#define _GLES_CHECK_INTERFACE_CONST_GLUBYTEP_1 if (!_GlesInterfaceInitialize_1()) \ + { \ + return (const GLubyte*) 0; \ + } + +#define FGRAPHICS_INTERNAL_USE_RESTORE_CONTEXT +#if defined(FGRAPHICS_INTERNAL_USE_RESTORE_CONTEXT) +void _RestoreContext(void); +#endif + +namespace // unnamed +{ + +struct _GlesInterface1 +{ + void (* glAlphaFunc)(GLenum func, GLclampf ref); + void (* glClearColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); + void (* glClearDepthf)(GLclampf depth); + void (* glClipPlanef)(GLenum plane, const GLfloat* pEquation); + void (* glColor4f)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); + void (* glDepthRangef)(GLclampf zNear, GLclampf zFar); + void (* glFogf)(GLenum pname, GLfloat param); + void (* glFogfv)(GLenum pname, const GLfloat* pParams); + void (* glFrustumf)(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); + void (* glGetClipPlanef)(GLenum pname, GLfloat eqn[4]); + void (* glGetFloatv)(GLenum pname, GLfloat* pParams); + void (* glGetLightfv)(GLenum light, GLenum pname, GLfloat* pParams); + void (* glGetMaterialfv)(GLenum face, GLenum pname, GLfloat* pParams); + void (* glGetTexEnvfv)(GLenum env, GLenum pname, GLfloat* pParams); + void (* glGetTexParameterfv)(GLenum target, GLenum pname, GLfloat* pParams); + void (* glLightModelf)(GLenum pname, GLfloat param); + void (* glLightModelfv)(GLenum pname, const GLfloat* pParams); + void (* glLightf)(GLenum light, GLenum pname, GLfloat param); + void (* glLightfv)(GLenum light, GLenum pname, const GLfloat* pParams); + void (* glLineWidth)(GLfloat width); + void (* glLoadMatrixf)(const GLfloat* pM); + void (* glMaterialf)(GLenum face, GLenum pname, GLfloat param); + void (* glMaterialfv)(GLenum face, GLenum pname, const GLfloat* pParams); + void (* glMultMatrixf)(const GLfloat* pM); + void (* glMultiTexCoord4f)(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); + void (* glNormal3f)(GLfloat nx, GLfloat ny, GLfloat nz); + void (* glOrthof)(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); + void (* glPointParameterf)(GLenum pname, GLfloat param); + void (* glPointParameterfv)(GLenum pname, const GLfloat* pParams); + void (* glPointSize)(GLfloat size); + void (* glPolygonOffset)(GLfloat factor, GLfloat units); + void (* glRotatef)(GLfloat angle, GLfloat x, GLfloat y, GLfloat z); + void (* glScalef)(GLfloat x, GLfloat y, GLfloat z); + void (* glTexEnvf)(GLenum target, GLenum pname, GLfloat param); + void (* glTexEnvfv)(GLenum target, GLenum pname, const GLfloat* pParams); + void (* glTexParameterf)(GLenum target, GLenum pname, GLfloat param); + void (* glTexParameterfv)(GLenum target, GLenum pname, const GLfloat* pParams); + void (* glTranslatef)(GLfloat x, GLfloat y, GLfloat z); + void (* glActiveTexture)(GLenum texture); + void (* glAlphaFuncx)(GLenum func, GLclampx ref); + void (* glBindBuffer)(GLenum target, GLuint buffer); + void (* glBindTexture)(GLenum target, GLuint texture); + void (* glBlendFunc)(GLenum sfactor, GLenum dfactor); + void (* glBufferData)(GLenum target, GLsizeiptr size, const GLvoid* pData, GLenum usage); + void (* glBufferSubData)(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* pData); + void (* glClear)(GLbitfield mask); + void (* glClearColorx)(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha); + void (* glClearDepthx)(GLclampx depth); + void (* glClearStencil)(GLint s); + void (* glClientActiveTexture)(GLenum texture); + void (* glClipPlanex)(GLenum plane, const GLfixed* pEquation); + void (* glColor4ub)(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha); + void (* glColor4x)(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); + void (* glColorMask)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); + void (* glColorPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid* pPointer); + void (* glCompressedTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* pData); + void (* glCompressedTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* pData); + void (* glCopyTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); + void (* glCopyTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); + void (* glCullFace)(GLenum mode); + void (* glDeleteBuffers)(GLsizei n, const GLuint* pBuffers); + void (* glDeleteTextures)(GLsizei n, const GLuint* pTextures); + void (* glDepthFunc)(GLenum func); + void (* glDepthMask)(GLboolean flag); + void (* glDepthRangex)(GLclampx zNear, GLclampx zFar); + void (* glDisable)(GLenum cap); + void (* glDisableClientState)(GLenum array); + void (* glDrawArrays)(GLenum mode, GLint first, GLsizei count); + void (* glDrawElements)(GLenum mode, GLsizei count, GLenum type, const GLvoid* pIndices); + void (* glEnable)(GLenum cap); + void (* glEnableClientState)(GLenum array); + void (* glFinish)(void); + void (* glFlush)(void); + void (* glFogx)(GLenum pname, GLfixed param); + void (* glFogxv)(GLenum pname, const GLfixed* pParams); + void (* glFrontFace)(GLenum mode); + void (* glFrustumx)(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); + void (* glGetBooleanv)(GLenum pname, GLboolean* pParams); + void (* glGetBufferParameteriv)(GLenum target, GLenum pname, GLint* pParams); + void (* glGetClipPlanex)(GLenum pname, GLfixed eqn[4]); + void (* glGenBuffers)(GLsizei n, GLuint* pBuffers); + void (* glGenTextures)(GLsizei n, GLuint* pTextures); + GLenum (* glGetError)(void); + void (* glGetFixedv)(GLenum pname, GLfixed* pParams); + void (* glGetIntegerv)(GLenum pname, GLint* pParams); + void (* glGetLightxv)(GLenum light, GLenum pname, GLfixed* pParams); + void (* glGetMaterialxv)(GLenum face, GLenum pname, GLfixed* pParams); + void (* glGetPointerv)(GLenum pname, void** ppParams); + const GLubyte* (*glGetString)(GLenum name); + void (* glGetTexEnviv)(GLenum env, GLenum pname, GLint* pParams); + void (* glGetTexEnvxv)(GLenum env, GLenum pname, GLfixed* pParams); + void (* glGetTexParameteriv)(GLenum target, GLenum pname, GLint* pParams); + void (* glGetTexParameterxv)(GLenum target, GLenum pname, GLfixed* pParams); + void (* glHint)(GLenum target, GLenum mode); + GLboolean (* glIsBuffer)(GLuint buffer); + GLboolean (* glIsEnabled)(GLenum cap); + GLboolean (* glIsTexture)(GLuint texture); + void (* glLightModelx)(GLenum pname, GLfixed param); + void (* glLightModelxv)(GLenum pname, const GLfixed* pParams); + void (* glLightx)(GLenum light, GLenum pname, GLfixed param); + void (* glLightxv)(GLenum light, GLenum pname, const GLfixed* pParams); + void (* glLineWidthx)(GLfixed width); + void (* glLoadIdentity)(void); + void (* glLoadMatrixx)(const GLfixed* pM); + void (* glLogicOp)(GLenum opcode); + void (* glMaterialx)(GLenum face, GLenum pname, GLfixed param); + void (* glMaterialxv)(GLenum face, GLenum pname, const GLfixed* pParams); + void (* glMatrixMode)(GLenum mode); + void (* glMultMatrixx)(const GLfixed* pM); + void (* glMultiTexCoord4x)(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q); + void (* glNormal3x)(GLfixed nx, GLfixed ny, GLfixed nz); + void (* glNormalPointer)(GLenum type, GLsizei stride, const GLvoid* pPointer); + void (* glOrthox)(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); + void (* glPixelStorei)(GLenum pname, GLint param); + void (* glPointParameterx)(GLenum pname, GLfixed param); + void (* glPointParameterxv)(GLenum pname, const GLfixed* pParams); + void (* glPointSizex)(GLfixed size); + void (* glPolygonOffsetx)(GLfixed factor, GLfixed units); + void (* glPopMatrix)(void); + void (* glPushMatrix)(void); + void (* glReadPixels)(GLint x, GLint y, + GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pPixels); + void (* glRotatex)(GLfixed angle, GLfixed x, GLfixed y, GLfixed z); + void (* glSampleCoverage)(GLclampf value, GLboolean invert); + void (* glSampleCoveragex)(GLclampx value, GLboolean invert); + void (* glScalex)(GLfixed x, GLfixed y, GLfixed z); + void (* glScissor)(GLint x, GLint y, GLsizei width, GLsizei height); + void (* glShadeModel)(GLenum mode); + void (* glStencilFunc)(GLenum func, GLint ref, GLuint mask); + void (* glStencilMask)(GLuint mask); + void (* glStencilOp)(GLenum fail, GLenum zfail, GLenum zpass); + void (* glTexCoordPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid* pPointer); + void (* glTexEnvi)(GLenum target, GLenum pname, GLint param); + void (* glTexEnvx)(GLenum target, GLenum pname, GLfixed param); + void (* glTexEnviv)(GLenum target, GLenum pname, const GLint* pParams); + void (* glTexEnvxv)(GLenum target, GLenum pname, const GLfixed* pParams); + void (* glTexImage2D)(GLenum target, GLint level, GLint internalformat, + GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pPixels); + void (* glTexParameteri)(GLenum target, GLenum pname, GLint param); + void (* glTexParameterx)(GLenum target, GLenum pname, GLfixed param); + void (* glTexParameteriv)(GLenum target, GLenum pname, const GLint* pParams); + void (* glTexParameterxv)(GLenum target, GLenum pname, const GLfixed* pParams); + void (* glTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, + GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pPixels); + void (* glTranslatex)(GLfixed x, GLfixed y, GLfixed z); + void (* glVertexPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid* Pointer); + void (* glViewport)(GLint x, GLint y, GLsizei width, GLsizei height); + void (* glPointSizePointerOES)(GLenum type, GLsizei stride, const GLvoid* pPointer); + void (* glCurrentPaletteMatrixOES) (GLuint matrixpaletteindex); + void (* glLoadPaletteFromModelViewMatrixOES) (void); + void (* glMatrixIndexPointerOES) (GLint size, GLenum type, GLsizei stride, const GLvoid* pPointer); + void (* glWeightPointerOES) (GLint size, GLenum type, GLsizei stride, const GLvoid* pPointer); + GLboolean (* glIsRenderbufferOES) (GLuint renderbuffer); + void (* glBindRenderbufferOES) (GLenum target, GLuint renderbuffer); + void (* glDeleteRenderbuffersOES) (GLsizei n, const GLuint* pRenderbuffers); + void (* glGenRenderbuffersOES) (GLsizei n, GLuint* pRenderbuffers); + void (* glRenderbufferStorageOES) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); + void (* glGetRenderbufferParameterivOES) (GLenum target, GLenum pname, GLint* pParams); + GLboolean (* glIsFramebufferOES) (GLuint framebuffer); + void (* glBindFramebufferOES) (GLenum target, GLuint framebuffer); + void (* glDeleteFramebuffersOES) (GLsizei n, const GLuint* pFramebuffers); + void (* glGenFramebuffersOES) (GLsizei n, GLuint* pFramebuffers); + GLenum (* glCheckFramebufferStatusOES) (GLenum target); + void (* glFramebufferRenderbufferOES) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); + void (* glFramebufferTexture2DOES) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); + void (* glGetFramebufferAttachmentParameterivOES) (GLenum target, GLenum attachment, GLenum pname, GLint* pParams); + void (* glGenerateMipmapOES) (GLenum target); +}; + +void* _pGlesLib1 = NULL; +_GlesInterface1 _glesImpl1 = {0, }; + +const int _MAX_GLES_FUNCTION_1 = 164; //145 // extensions 164; +const char _glesStrings1[_MAX_GLES_FUNCTION_1][64] = +{ + "glAlphaFunc", + "glClearColor", + "glClearDepthf", + "glClipPlanef", + "glColor4f", + "glDepthRangef", + "glFogf", + "glFogfv", + "glFrustumf", + "glGetClipPlanef", + "glGetFloatv", //10 + "glGetLightfv", + "glGetMaterialfv", + "glGetTexEnvfv", + "glGetTexParameterfv", + "glLightModelf", + "glLightModelfv", + "glLightf", + "glLightfv", + "glLineWidth", + "glLoadMatrixf", //20 + "glMaterialf", + "glMaterialfv", + "glMultMatrixf", + "glMultiTexCoord4f", + "glNormal3f", + "glOrthof", + "glPointParameterf", + "glPointParameterfv", + "glPointSize", + "glPolygonOffset", //30 + "glRotatef", + "glScalef", + "glTexEnvf", + "glTexEnvfv", + "glTexParameterf", + "glTexParameterfv", + "glTranslatef", + "glActiveTexture", + "glAlphaFuncx", + "glBindBuffer", //40 + "glBindTexture", + "glBlendFunc", + "glBufferData", + "glBufferSubData", + "glClear", + "glClearColorx", + "glClearDepthx", + "glClearStencil", + "glClientActiveTexture", + "glClipPlanex", //50 + "glColor4ub", + "glColor4x", + "glColorMask", + "glColorPointer", + "glCompressedTexImage2D", + "glCompressedTexSubImage2D", + "glCopyTexImage2D", + "glCopyTexSubImage2D", + "glCullFace", + "glDeleteBuffers", //60 + "glDeleteTextures", + "glDepthFunc", + "glDepthMask", + "glDepthRangex", + "glDisable", + "glDisableClientState", + "glDrawArrays", + "glDrawElements", + "glEnable", + "glEnableClientState", //70 + "glFinish", + "glFlush", + "glFogx", + "glFogxv", + "glFrontFace", + "glFrustumx", + "glGetBooleanv", + "glGetBufferParameteriv", + "glGetClipPlanex", + "glGenBuffers", //80 + "glGenTextures", + "glGetError", + "glGetFixedv", + "glGetIntegerv", + "glGetLightxv", + "glGetMaterialxv", + "glGetPointerv", + "glGetString", + "glGetTexEnviv", + "glGetTexEnvxv", //90 + "glGetTexParameteriv", + "glGetTexParameterxv", + "glHint", + "glIsBuffer", + "glIsEnabled", + "glIsTexture", + "glLightModelx", + "glLightModelxv", + "glLightx", + "glLightxv", //100 + "glLineWidthx", + "glLoadIdentity", + "glLoadMatrixx", + "glLogicOp", + "glMaterialx", + "glMaterialxv", + "glMatrixMode", + "glMultMatrixx", + "glMultiTexCoord4x", + "glNormal3x", //110 + "glNormalPointer", + "glOrthox", + "glPixelStorei", + "glPointParameterx", + "glPointParameterxv", + "glPointSizex", + "glPolygonOffsetx", + "glPopMatrix", + "glPushMatrix", + "glReadPixels", //120 + "glRotatex", + "glSampleCoverage", + "glSampleCoveragex", + "glScalex", + "glScissor", + "glShadeModel", + "glStencilFunc", + "glStencilMask", + "glStencilOp", + "glTexCoordPointer", //130 + "glTexEnvi", + "glTexEnvx", + "glTexEnviv", + "glTexEnvxv", + "glTexImage2D", + "glTexParameteri", + "glTexParameterx", + "glTexParameteriv", + "glTexParameterxv", + "glTexSubImage2D", //140 + "glTranslatex", + "glVertexPointer", + "glViewport", + "glPointSizePointerOES", //144 + "glCurrentPaletteMatrixOES", + "glLoadPaletteFromModelViewMatrixOES", + "glMatrixIndexPointerOES", + "glWeightPointerOES", + "glIsRenderbufferOES", + "glBindRenderbufferOES", //150 + "glDeleteRenderbuffersOES", + "glGenRenderbuffersOES", + "glRenderbufferStorageOES", + "glGetRenderbufferParameterivOES", + "glIsFramebufferOES", + "glBindFramebufferOES", + "glDeleteFramebuffersOES", + "glGenFramebuffersOES", + "glCheckFramebufferStatusOES", + "glFramebufferRenderbufferOES", //160 + "glFramebufferTexture2DOES", + "glGetFramebufferAttachmentParameterivOES", + "glGenerateMipmapOES" //163 +}; + +bool +_GlesInterfaceInitialize_1(void) +{ + int count = 0; + + if (_pGlesLib1 == NULL) + { + ptrdiff_t** ppPtr = (ptrdiff_t**) (&_glesImpl1); + +#if defined(_OSP_EMUL_) + _pGlesLib1 = dlopen("/usr/lib/libGLESv1_CM.so", RTLD_LAZY | RTLD_GLOBAL); +#else + _pGlesLib1 = dlopen("/usr/lib/driver/libGLESv1_CM.so", RTLD_LAZY | RTLD_GLOBAL); + if (_pGlesLib1 == NULL) + { + _pGlesLib1 = dlopen("/usr/lib/libGLESv1_CM.so", RTLD_LAZY | RTLD_GLOBAL); + if (_pGlesLib1 == NULL) + { + _pGlesLib1 = dlopen("/usr/lib/libGLES_CM.so", RTLD_LAZY | RTLD_GLOBAL); + if (_pGlesLib1 == NULL) + { + _pGlesLib1 = dlopen("/usr/lib/egl/libGLES_CM.so", RTLD_LAZY | RTLD_GLOBAL); + } + } + } +#endif + if (_pGlesLib1 == NULL) + { + SysLog(NID_GRP, "gles1 dlopen failed! %s", dlerror()); + return false; + } + + for (count = 0; count < _MAX_GLES_FUNCTION_1; count++) + { + *ppPtr = (ptrdiff_t*) (dlsym(_pGlesLib1, _glesStrings1[count])); + + if (*ppPtr == NULL) + { + SysLog(NID_GRP, "dlsym failed! %s name : %s", dlerror(), _glesStrings1[count]); + } + ppPtr++; + } + } + +#if defined(FGRAPHICS_INTERNAL_USE_RESTORE_CONTEXT) + _RestoreContext(); +#endif + + return true; +} + +} + +#ifdef __cplusplus +extern "C" +{ +#endif + +_OSP_LOCAL_ void +_GlesInterfaceTerminate_1(void) +{ + if (_pGlesLib1 != NULL) + { + dlclose(_pGlesLib1); + _pGlesLib1 = NULL; + } +} + +void +_GlAlphaFunc_1(GLenum func, GLclampf ref) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glAlphaFunc(func, ref); +} + +void +_GlClearColor_1(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glClearColor(red, green, blue, alpha); +} + +void +_GlClearDepthf_1(GLclampf depth) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glClearDepthf(depth); +} + +void +_GlClipPlanef_1(GLenum plane, const GLfloat* pEquation) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glClipPlanef(plane, pEquation); +} + +void +_GlColor4f_1(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glColor4f(red, green, blue, alpha); +} + +void +_GlDepthRangef_1(GLclampf zNear, GLclampf zFar) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glDepthRangef(zNear, zFar); +} + +void +_GlFogf_1(GLenum pname, GLfloat param) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glFogf(pname, param); +} + +void +_GlFogfv_1(GLenum pname, const GLfloat* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glFogfv(pname, pParams); +} + +void +_GlFrustumf_1(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glFrustumf(left, right, bottom, top, zNear, zFar); +} + +void +_GlGetClipPlanef_1(GLenum pname, GLfloat eqn[4]) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glGetClipPlanef(pname, eqn); +} + +void +_GlGetFloatv_1(GLenum pname, GLfloat* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glGetFloatv(pname, pParams); +} + +void +_GlGetLightfv_1(GLenum light, GLenum pname, GLfloat* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glGetLightfv(light, pname, pParams); +} + +void +_GlGetMaterialfv_1(GLenum face, GLenum pname, GLfloat* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glGetMaterialfv(face, pname, pParams); +} + +void +_GlGetTexEnvfv_1(GLenum env, GLenum pname, GLfloat* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glGetTexEnvfv(env, pname, pParams); +} + +void +_GlGetTexParameterfv_1(GLenum target, GLenum pname, GLfloat* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glGetTexParameterfv(target, pname, pParams); +} + +void +_GlLightModelf_1(GLenum pname, GLfloat param) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glLightModelf(pname, param); +} + +void +_GlLightModelfv_1(GLenum pname, const GLfloat* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glLightModelfv(pname, pParams); +} + +void +_GlLightf_1(GLenum light, GLenum pname, GLfloat param) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glLightf(light, pname, param); +} + +void +_GlLightfv_1(GLenum light, GLenum pname, const GLfloat* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glLightfv(light, pname, pParams); +} + +void +_GlLineWidth_1(GLfloat width) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glLineWidth(width); +} + +void +_GlLoadMatrixf_1(const GLfloat* pM) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glLoadMatrixf(pM); +} + +void +_GlMaterialf_1(GLenum face, GLenum pname, GLfloat param) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glMaterialf(face, pname, param); +} + +void +_GlMaterialfv_1(GLenum face, GLenum pname, const GLfloat* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glMaterialfv(face, pname, pParams); +} + +void +_GlMultMatrixf_1(const GLfloat* pM) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glMultMatrixf(pM); +} + +void +_GlMultiTexCoord4f_1(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glMultiTexCoord4f(target, s, t, r, q); +} + +void +_GlNormal3f_1(GLfloat nx, GLfloat ny, GLfloat nz) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glNormal3f(nx, ny, nz); +} + +void +_GlOrthof_1(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glOrthof(left, right, bottom, top, zNear, zFar); +} + +void +_GlPointParameterf_1(GLenum pname, GLfloat param) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glPointParameterf(pname, param); +} + +void +_GlPointParameterfv_1(GLenum pname, const GLfloat* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glPointParameterfv(pname, pParams); +} + +void +_GlPointSize_1(GLfloat size) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glPointSize(size); +} + +void +_GlPolygonOffset_1(GLfloat factor, GLfloat units) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glPolygonOffset(factor, units); +} + +void +_GlRotatef_1(GLfloat angle, GLfloat x, GLfloat y, GLfloat z) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glRotatef(angle, x, y, z); +} + +void +_GlScalef_1(GLfloat x, GLfloat y, GLfloat z) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glScalef(x, y, z); +} + +void +_GlTexEnvf_1(GLenum target, GLenum pname, GLfloat param) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glTexEnvf(target, pname, param); +} + +void +_GlTexEnvfv_1(GLenum target, GLenum pname, const GLfloat* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glTexEnvfv(target, pname, pParams); +} + +void +_GlTexParameterf_1(GLenum target, GLenum pname, GLfloat param) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glTexParameterf(target, pname, param); +} + +void +_GlTexParameterfv_1(GLenum target, GLenum pname, const GLfloat* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glTexParameterfv(target, pname, pParams); +} + +void +_GlTranslatef_1(GLfloat x, GLfloat y, GLfloat z) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glTranslatef(x, y, z); +} + +void +_GlActiveTexture_1(GLenum texture) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glActiveTexture(texture); +} + +void +_GlAlphaFuncx_1(GLenum func, GLclampx ref) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glAlphaFuncx(func, ref); +} + +void +_GlBindBuffer_1(GLenum target, GLuint buffer) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glBindBuffer(target, buffer); +} + +void +_GlBindTexture_1(GLenum target, GLuint texture) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glBindTexture(target, texture); +} + +void +_GlBlendFunc_1(GLenum sfactor, GLenum dfactor) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glBlendFunc(sfactor, dfactor); +} + +void +_GlBufferData_1(GLenum target, GLsizeiptr size, const GLvoid* pData, GLenum usage) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glBufferData(target, size, pData, usage); +} + +void +_GlBufferSubData_1(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* pData) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glBufferSubData(target, offset, size, pData); +} + +void +_GlClear_1(GLbitfield mask) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glClear(mask); +} + +void +_GlClearColorx_1(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glClearColorx(red, green, blue, alpha); +} + +void +_GlClearDepthx_1(GLclampx depth) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glClearDepthx(depth); +} + +void +_GlClearStencil_1(GLint s) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glClearStencil(s); +} + +void +_GlClientActiveTexture_1(GLenum texture) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glClientActiveTexture(texture); +} + +void +_GlClipPlanex_1(GLenum plane, const GLfixed* pEquation) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glClipPlanex(plane, pEquation); +} + +void +_GlColor4ub_1(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glColor4ub(red, green, blue, alpha); +} + +void +_GlColor4x_1(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glColor4x(red, green, blue, alpha); +} + +void +_GlColorMask_1(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glColorMask(red, green, blue, alpha); +} + +void +_GlColorPointer_1(GLint size, GLenum type, GLsizei stride, const GLvoid* pPointer) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glColorPointer(size, type, stride, pPointer); +} + +void +_GlCompressedTexImage2D_1(GLenum target, GLint level, GLenum internalformat, + GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* pData) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, pData); +} + +void +_GlCompressedTexSubImage2D_1(GLenum target, GLint level, GLint xoffset, GLint yoffset, + GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* pData) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, pData); +} + +void +_GlCopyTexImage2D_1(GLenum target, GLint level, + GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glCopyTexImage2D(target, level, internalformat, x, y, width, height, border); +} + +void +_GlCopyTexSubImage2D_1(GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); +} + +void +_GlCullFace_1(GLenum mode) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glCullFace(mode); +} + +void +_GlDeleteBuffers_1(GLsizei n, const GLuint* pBuffers) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glDeleteBuffers(n, pBuffers); +} + +void +_GlDeleteTextures_1(GLsizei n, const GLuint* pTextures) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glDeleteTextures(n, pTextures); +} + +void +_GlDepthFunc_1(GLenum func) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glDepthFunc(func); +} + +void +_GlDepthMask_1(GLboolean flag) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glDepthMask(flag); +} + +void +_GlDepthRangex_1(GLclampx zNear, GLclampx zFar) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glDepthRangex(zNear, zFar); +} + +void +_GlDisable_1(GLenum cap) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glDisable(cap); +} + +void +_GlDisableClientState_1(GLenum array) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glDisableClientState(array); +} + +void +_GlDrawArrays_1(GLenum mode, GLint first, GLsizei count) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glDrawArrays(mode, first, count); +} + +void +_GlDrawElements_1(GLenum mode, GLsizei count, GLenum type, const GLvoid* pIndices) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glDrawElements(mode, count, type, pIndices); +} + +void +_GlEnable_1(GLenum cap) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glEnable(cap); +} + +void +_GlEnableClientState_1(GLenum array) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glEnableClientState(array); +} + +void +_GlFinish_1(void) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glFinish(); +} + +void +_GlFlush_1(void) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glFlush(); +} + +void +_GlFogx_1(GLenum pname, GLfixed param) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glFogx(pname, param); +} + +void +_GlFogxv_1(GLenum pname, const GLfixed* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glFogxv(pname, pParams); +} + +void +_GlFrontFace_1(GLenum mode) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glFrontFace(mode); +} + +void +_GlFrustumx_1(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glFrustumx(left, right, bottom, top, zNear, zFar); +} + +void +_GlGetBooleanv_1(GLenum pname, GLboolean* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glGetBooleanv(pname, pParams); +} + +void +_GlGetBufferParameteriv_1(GLenum target, GLenum pname, GLint* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glGetBufferParameteriv(target, pname, pParams); +} + +void +_GlGetClipPlanex_1(GLenum pname, GLfixed eqn[4]) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glGetClipPlanex(pname, eqn); +} + +void +_GlGenBuffers_1(GLsizei n, GLuint* pBuffers) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glGenBuffers(n, pBuffers); +} + +void +_GlGenTextures_1(GLsizei n, GLuint* pTextures) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glGenTextures(n, pTextures); +} + +GLenum +_GlGetError_1(void) +{ + _GLES_CHECK_INTERFACE_GLENUM_1 + return _glesImpl1.glGetError(); +} + +void +_GlGetFixedv_1(GLenum pname, GLfixed* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glGetFixedv(pname, pParams); +} + +void +_GlGetIntegerv_1(GLenum pname, GLint* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glGetIntegerv(pname, pParams); +} + +void +_GlGetLightxv_1(GLenum light, GLenum pname, GLfixed* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glGetLightxv(light, pname, pParams); +} + +void +_GlGetMaterialxv_1(GLenum face, GLenum pname, GLfixed* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glGetMaterialxv(face, pname, pParams); +} + +void +_GlGetPointerv_1(GLenum pname, void** ppParams) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glGetPointerv(pname, ppParams); +} + +const GLubyte* +_GlGetString_1(GLenum name) +{ + _GLES_CHECK_INTERFACE_CONST_GLUBYTEP_1 + return _glesImpl1.glGetString(name); +} + +void +_GlGetTexEnviv_1(GLenum env, GLenum pname, GLint* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glGetTexEnviv(env, pname, pParams); +} + +void +_GlGetTexEnvxv_1(GLenum env, GLenum pname, GLfixed* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glGetTexEnvxv(env, pname, pParams); +} + +void +_GlGetTexParameteriv_1(GLenum target, GLenum pname, GLint* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glGetTexParameteriv(target, pname, pParams); +} + +void +_GlGetTexParameterxv_1(GLenum target, GLenum pname, GLfixed* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glGetTexParameterxv(target, pname, pParams); +} + +void +_GlHint_1(GLenum target, GLenum mode) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glHint(target, mode); +} + +GLboolean +_GlIsBuffer_1(GLuint buffer) +{ + _GLES_CHECK_INTERFACE_GLBOOLEAN_1 + return _glesImpl1.glIsBuffer(buffer); +} + +GLboolean +_GlIsEnabled_1(GLenum cap) +{ + _GLES_CHECK_INTERFACE_GLBOOLEAN_1 + return _glesImpl1.glIsEnabled(cap); +} + +GLboolean +_GlIsTexture_1(GLuint texture) +{ + _GLES_CHECK_INTERFACE_GLBOOLEAN_1 + return _glesImpl1.glIsTexture(texture); +} + +void +_GlLightModelx_1(GLenum pname, GLfixed param) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glLightModelx(pname, param); +} + +void +_GlLightModelxv_1(GLenum pname, const GLfixed* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glLightModelxv(pname, pParams); +} + +void +_GlLightx_1(GLenum light, GLenum pname, GLfixed param) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glLightx(light, pname, param); +} + +void +_GlLightxv_1(GLenum light, GLenum pname, const GLfixed* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glLightxv(light, pname, pParams); +} + +void +_GlLineWidthx_1(GLfixed width) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glLineWidthx(width); +} + +void +_GlLoadIdentity_1(void) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glLoadIdentity(); +} + +void +_GlLoadMatrixx_1(const GLfixed* pM) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glLoadMatrixx(pM); +} + +void +_GlLogicOp_1(GLenum opcode) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glLogicOp(opcode); +} + +void +_GlMaterialx_1(GLenum face, GLenum pname, GLfixed param) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glMaterialx(face, pname, param); +} + +void +_GlMaterialxv_1(GLenum face, GLenum pname, const GLfixed* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glMaterialxv(face, pname, pParams); +} + +void +_GlMatrixMode_1(GLenum mode) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glMatrixMode(mode); +} + +void +_GlMultMatrixx_1(const GLfixed* pM) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glMultMatrixx(pM); +} + +void +_GlMultiTexCoord4x_1(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glMultiTexCoord4x(target, s, t, r, q); +} + +void +_GlNormal3x_1(GLfixed nx, GLfixed ny, GLfixed nz) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glNormal3x(nx, ny, nz); +} + +void +_GlNormalPointer_1(GLenum type, GLsizei stride, const GLvoid* pPointer) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glNormalPointer(type, stride, pPointer); +} + +void +_GlOrthox_1(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glOrthox(left, right, bottom, top, zNear, zFar); +} + +void +_GlPixelStorei_1(GLenum pname, GLint param) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glPixelStorei(pname, param); +} + +void +_GlPointParameterx_1(GLenum pname, GLfixed param) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glPointParameterx(pname, param); +} + +void +_GlPointParameterxv_1(GLenum pname, const GLfixed* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glPointParameterxv(pname, pParams); +} + +void +_GlPointSizex_1(GLfixed size) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glPointSizex(size); +} + +void +_GlPolygonOffsetx_1(GLfixed factor, GLfixed units) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glPolygonOffsetx(factor, units); +} + +void +_GlPopMatrix_1(void) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glPopMatrix(); +} + +void +_GlPushMatrix_1(void) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glPushMatrix(); +} + +void +_GlReadPixels_1(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pPixels) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glReadPixels(x, y, width, height, format, type, pPixels); +} + +void +_GlRotatex_1(GLfixed angle, GLfixed x, GLfixed y, GLfixed z) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glRotatex(angle, x, y, z); +} + +void +_GlSampleCoverage_1(GLclampf value, GLboolean invert) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glSampleCoverage(value, invert); +} + +void +_GlSampleCoveragex_1(GLclampx value, GLboolean invert) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glSampleCoveragex(value, invert); +} + +void +_GlScalex_1(GLfixed x, GLfixed y, GLfixed z) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glScalex(x, y, z); +} + +void +_GlScissor_1(GLint x, GLint y, GLsizei width, GLsizei height) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glScissor(x, y, width, height); +} + +void +_GlShadeModel_1(GLenum mode) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glShadeModel(mode); +} + +void +_GlStencilFunc_1(GLenum func, GLint ref, GLuint mask) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glStencilFunc(func, ref, mask); +} + +void +_GlStencilMask_1(GLuint mask) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glStencilMask(mask); +} + +void +_GlStencilOp_1(GLenum fail, GLenum zfail, GLenum zpass) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glStencilOp(fail, zfail, zpass); +} + +void +_GlTexCoordPointer_1(GLint size, GLenum type, GLsizei stride, const GLvoid* pPointer) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glTexCoordPointer(size, type, stride, pPointer); +} + +void +_GlTexEnvi_1(GLenum target, GLenum pname, GLint param) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glTexEnvi(target, pname, param); +} + +void +_GlTexEnvx_1(GLenum target, GLenum pname, GLfixed param) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glTexEnvx(target, pname, param); +} + +void +_GlTexEnviv_1(GLenum target, GLenum pname, const GLint* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glTexEnviv(target, pname, pParams); +} + +void +_GlTexEnvxv_1(GLenum target, GLenum pname, const GLfixed* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glTexEnvxv(target, pname, pParams); +} + +void +_GlTexImage2D_1(GLenum target, GLint level, GLint internalformat, + GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pPixels) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glTexImage2D(target, level, internalformat, width, height, border, format, type, pPixels); +} + +void +_GlTexParameteri_1(GLenum target, GLenum pname, GLint param) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glTexParameteri(target, pname, param); +} + +void +_GlTexParameterx_1(GLenum target, GLenum pname, GLfixed param) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glTexParameterx(target, pname, param); +} + +void +_GlTexParameteriv_1(GLenum target, GLenum pname, const GLint* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glTexParameteriv(target, pname, pParams); +} + +void +_GlTexParameterxv_1(GLenum target, GLenum pname, const GLfixed* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glTexParameterxv(target, pname, pParams); +} + +void +_GlTexSubImage2D_1(GLenum target, GLint level, GLint xoffset, GLint yoffset, + GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pPixels) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pPixels); +} + +void +_GlTranslatex_1(GLfixed x, GLfixed y, GLfixed z) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glTranslatex(x, y, z); +} + +void +_GlVertexPointer_1(GLint size, GLenum type, GLsizei stride, const GLvoid* pPointer) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glVertexPointer(size, type, stride, pPointer); +} + +void +_GlViewport_1(GLint x, GLint y, GLsizei width, GLsizei height) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glViewport(x, y, width, height); +} + +void +_GlPointSizePointerOES_1(GLenum type, GLsizei stride, const GLvoid* pPointer) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glPointSizePointerOES(type, stride, pPointer); +} + +void +_GlCurrentPaletteMatrixOES_1(GLuint matrixpaletteindex) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glCurrentPaletteMatrixOES(matrixpaletteindex); +} + +void +_GlLoadPaletteFromModelViewMatrixOES_1(void) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glLoadPaletteFromModelViewMatrixOES(); +} + +void +_GlMatrixIndexPointerOES_1(GLint size, GLenum type, GLsizei stride, const GLvoid* pPointer) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glMatrixIndexPointerOES(size, type, stride, pPointer); +} + +void +_GlWeightPointerOES_1(GLint size, GLenum type, GLsizei stride, const GLvoid* pPointer) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glWeightPointerOES(size, type, stride, pPointer); +} + +// FBO is extension functions in OpenGL ES 1.1 +//Start of FBO Functions +GLboolean +_GlIsRenderbufferOES_1(GLuint renderbuffer) +{ + _GLES_CHECK_INTERFACE_GLBOOLEAN_1 + return _glesImpl1.glIsRenderbufferOES(renderbuffer); +} + +void +_GlBindRenderbufferOES_1(GLenum target, GLuint renderbuffer) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glBindRenderbufferOES(target, renderbuffer); +} + +void +_GlDeleteRenderbuffersOES_1(GLsizei n, const GLuint* pRenderbuffers) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glDeleteRenderbuffersOES(n, pRenderbuffers); +} + +void +_GlGenRenderbuffersOES_1(GLsizei n, GLuint* pRenderbuffers) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glGenRenderbuffersOES(n, pRenderbuffers); +} + +void +_GlRenderbufferStorageOES_1(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glRenderbufferStorageOES(target, internalformat, width, height); +} + +void +_GlGetRenderbufferParameterivOES_1(GLenum target, GLenum pname, GLint* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glGetRenderbufferParameterivOES(target, pname, pParams); +} + +GLboolean +_GlIsFramebufferOES_1(GLuint framebuffer) +{ + _GLES_CHECK_INTERFACE_GLBOOLEAN_1 + return _glesImpl1.glIsFramebufferOES(framebuffer); +} + +void +_GlBindFramebufferOES_1(GLenum target, GLuint framebuffer) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glBindFramebufferOES(target, framebuffer); +} + +void +_GlDeleteFramebuffersOES_1(GLsizei n, const GLuint* pFramebuffers) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glDeleteFramebuffersOES(n, pFramebuffers); +} + +void +_GlGenFramebuffersOES_1(GLsizei n, GLuint* pFramebuffers) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glGenFramebuffersOES(n, pFramebuffers); +} + +GLenum +_GlCheckFramebufferStatusOES_1(GLenum target) +{ + _GLES_CHECK_INTERFACE_GLENUM_1 + return _glesImpl1.glCheckFramebufferStatusOES(target); +} + +void +_GlFramebufferRenderbufferOES_1(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glFramebufferRenderbufferOES(target, attachment, renderbuffertarget, renderbuffer); +} + +void +_GlFramebufferTexture2DOES_1(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glFramebufferTexture2DOES(target, attachment, textarget, texture, level); +} + +void +_GlGetFramebufferAttachmentParameterivOES_1(GLenum target, GLenum attachment, GLenum pname, GLint* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glGetFramebufferAttachmentParameterivOES(target, attachment, pname, pParams); +} + +void +_GlGenerateMipmapOES_1(GLenum target) +{ + _GLES_CHECK_INTERFACE_VOID_1 + _glesImpl1.glGenerateMipmapOES(target); +} +//End of FBO Functions + +#ifdef __cplusplus +} +#endif + +#endif //#if !defined(FGRAPHICS_INTERNAL_USE_DYNAMIC_LOADING) + +} // Opengl + +}} // Tizen::Graphics diff --git a/src/graphics/opengl/FGrpGles2.cpp b/src/graphics/opengl/FGrpGles2.cpp new file mode 100644 index 0000000..6377041 --- /dev/null +++ b/src/graphics/opengl/FGrpGles2.cpp @@ -0,0 +1,2336 @@ +// +// 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 FGrpGles2.cpp + * @brief This is the implementation file for OpenGL ES 2.X. + * + */ + + +#define FGRAPHICS_INTERNAL_USE_DYNAMIC_LOADING +#if defined(FGRAPHICS_INTERNAL_USE_DYNAMIC_LOADING) +#include +#include +#include +#include +#include +#include +#endif + +#include + +#include +#include + +#if defined(FGRAPHICS_INTERNAL_USE_DYNAMIC_LOADING) +#include +#endif + +using namespace Tizen::Base; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; + +namespace Tizen { namespace Graphics +{ + +namespace Opengl +{ + +#if !defined(FGRAPHICS_INTERNAL_USE_DYNAMIC_LOADING) + +#ifdef __cplusplus +extern "C" +{ +#endif + +void +_GlActiveTexture_2(GLenum texture) +{ + glActiveTexture(texture); +} + +void +_GlAttachShader_2(GLuint program, GLuint shader) +{ + glAttachShader(program, shader); +} + +void +_GlBindAttribLocation_2(GLuint program, GLuint index, const char* pName) +{ + glBindAttribLocation(program, index, pName); +} + +void +_GlBindBuffer_2(GLenum target, GLuint buffer) +{ + glBindBuffer(target, buffer); +} + +void +_GlBindFramebuffer_2(GLenum target, GLuint framebuffer) +{ + glBindFramebuffer(target, framebuffer); +} + +void +_GlBindRenderbuffer_2(GLenum target, GLuint renderbuffer) +{ + glBindRenderbuffer(target, renderbuffer); +} + +void +_GlBindTexture_2(GLenum target, GLuint texture) +{ + glBindTexture(target, texture); +} + +void +_GlBlendColor_2(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) +{ + glBlendColor(red, green, blue, alpha); +} + +void +_GlBlendEquation_2(GLenum mode) +{ + glBlendEquation(mode); +} + +void +_GlBlendEquationSeparate_2(GLenum modeRGB, GLenum modeAlpha) +{ + glBlendEquationSeparate(modeRGB, modeAlpha); +} + +void +_GlBlendFunc_2(GLenum sfactor, GLenum dfactor) +{ + glBlendFunc(sfactor, dfactor); +} + +void +_GlBlendFuncSeparate_2(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) +{ + glBlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha); +} + +void +_GlBufferData_2(GLenum target, GLsizeiptr size, const void* pData, GLenum usage) +{ + glBufferData(target, size, pData, usage); +} + +void +_GlBufferSubData_2(GLenum target, GLintptr offset, GLsizeiptr size, const void* pData) +{ + glBufferSubData(target, offset, size, pData); +} + +GLenum +_GlCheckFramebufferStatus_2(GLenum target) +{ + return glCheckFramebufferStatus(target); +} + +void +_GlClear_2(GLbitfield mask) +{ + glClear(mask); +} + +void +_GlClearColor_2(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) +{ + glClearColor(red, green, blue, alpha); +} + +void +_GlClearDepthf_2(GLclampf depth) +{ + glClearDepthf(depth); +} + +void +_GlClearStencil_2(GLint s) +{ + glClearStencil(s); +} + +void +_GlColorMask_2(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) +{ + glColorMask(red, green, blue, alpha); +} + +void +_GlCompileShader_2(GLuint shader) +{ + glCompileShader(shader); +} + +void +_GlCompressedTexImage2D_2(GLenum target, GLint level, GLenum internalformat, + GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* pData) +{ + glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, pData); +} + +void +_GlCompressedTexSubImage2D_2(GLenum target, GLint level, GLint xoffset, GLint yoffset, + GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* pData) +{ + glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, pData); +} + +void +_GlCopyTexImage2D_2(GLenum target, GLint level, + GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) +{ + glCopyTexImage2D(target, level, internalformat, x, y, width, height, border); +} + +void +_GlCopyTexSubImage2D_2(GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) +{ + glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); +} + +GLuint +_GlCreateProgram_2(void) +{ + return glCreateProgram(); +} + +GLuint +_GlCreateShader_2(GLenum type) +{ + return glCreateShader(type); +} + +void +_GlCullFace_2(GLenum mode) +{ + glCullFace(mode); +} + +void +_GlDeleteBuffers_2(GLsizei n, const GLuint* pBuffers) +{ + glDeleteBuffers(n, pBuffers); +} + +void +_GlDeleteFramebuffers_2(GLsizei n, const GLuint* pFramebuffers) +{ + glDeleteFramebuffers(n, pFramebuffers); +} + +void +_GlDeleteProgram_2(GLuint program) +{ + glDeleteProgram(program); +} + +void +_GlDeleteRenderbuffers_2(GLsizei n, const GLuint* pRenderbuffers) +{ + glDeleteRenderbuffers(n, pRenderbuffers); +} + +void +_GlDeleteShader_2(GLuint shader) +{ + glDeleteShader(shader); +} + +void +_GlDeleteTextures_2(GLsizei n, const GLuint* pTextures) +{ + glDeleteTextures(n, pTextures); +} + +void +_GlDepthFunc_2(GLenum func) +{ + glDepthFunc(func); +} + +void +_GlDepthMask_2(GLboolean flag) +{ + glDepthMask(flag); +} + +void +_GlDepthRangef_2(GLclampf zNear, GLclampf zFar) +{ + glDepthRangef(zNear, zFar); +} + +void +_GlDetachShader_2(GLuint program, GLuint shader) +{ + glDetachShader(program, shader); +} + +void +_GlDisable_2(GLenum cap) +{ + glDisable(cap); +} + +void +_GlDisableVertexAttribArray_2(GLuint index) +{ + glDisableVertexAttribArray(index); +} + +void +_GlDrawArrays_2(GLenum mode, GLint first, GLsizei count) +{ + glDrawArrays(mode, first, count); +} + +void +_GlDrawElements_2(GLenum mode, GLsizei count, GLenum type, const void* pIndices) +{ + glDrawElements(mode, count, type, pIndices); +} + +void +_GlEnable_2(GLenum cap) +{ + glEnable(cap); +} + +void +_GlEnableVertexAttribArray_2(GLuint index) +{ + glEnableVertexAttribArray(index); +} + +void +_GlFinish_2(void) +{ + glFinish(); +} + +void +_GlFlush_2(void) +{ + glFlush(); +} + +void +_GlFramebufferRenderbuffer_2(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) +{ + glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer); +} + +void +_GlFramebufferTexture2D_2(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) +{ + glFramebufferTexture2D(target, attachment, textarget, texture, level); +} + +void +_GlFrontFace_2(GLenum mode) +{ + glFrontFace(mode); +} + +void +_GlGenBuffers_2(GLsizei n, GLuint* pBuffers) +{ + glGenBuffers(n, pBuffers); +} + +void +_GlGenerateMipmap_2(GLenum target) +{ + glGenerateMipmap(target); +} + +void +_GlGenFramebuffers_2(GLsizei n, GLuint* pFramebuffers) +{ + glGenFramebuffers(n, pFramebuffers); +} + +void +_GlGenRenderbuffers_2(GLsizei n, GLuint* pRenderbuffers) +{ + glGenRenderbuffers(n, pRenderbuffers); +} + +void +_GlGenTextures_2(GLsizei n, GLuint* pTextures) +{ + glGenTextures(n, pTextures); +} + +void +_GlGetActiveAttrib_2(GLuint program, GLuint index, GLsizei bufsize, + GLsizei* pLength, GLint* pSize, GLenum* pType, char* pName) +{ + glGetActiveAttrib(program, index, bufsize, pLength, pSize, pType, pName); +} + +void +_GlGetActiveUniform_2(GLuint program, GLuint index, GLsizei bufsize, + GLsizei* pLength, GLint* pSize, GLenum* pType, char* pName) +{ + glGetActiveUniform(program, index, bufsize, pLength, pSize, pType, pName); +} + +void +_GlGetAttachedShaders_2(GLuint program, GLsizei maxcount, GLsizei* pCount, GLuint* pShaders) +{ + glGetAttachedShaders(program, maxcount, pCount, pShaders); +} + +int +_GlGetAttribLocation_2(GLuint program, const char* pName) +{ + return glGetAttribLocation(program, pName); +} + +void +_GlGetBooleanv_2(GLenum pname, GLboolean* pParams) +{ + glGetBooleanv(pname, pParams); +} + +void +_GlGetBufferParameteriv_2(GLenum target, GLenum pname, GLint* pParams) +{ + glGetBufferParameteriv(target, pname, pParams); +} + +GLenum +_GlGetError_2(void) +{ + return glGetError(); +} + +void +_GlGetFloatv_2(GLenum pname, GLfloat* pParams) +{ + glGetFloatv(pname, pParams); +} + +void +_GlGetFramebufferAttachmentParameteriv_2(GLenum target, GLenum attachment, GLenum pname, GLint* pParams) +{ + glGetFramebufferAttachmentParameteriv(target, attachment, pname, pParams); +} + +void +_GlGetIntegerv_2(GLenum pname, GLint* pParams) +{ + glGetIntegerv(pname, pParams); +} + +void +_GlGetProgramiv_2(GLuint program, GLenum pname, GLint* pParams) +{ + glGetProgramiv(program, pname, pParams); +} + +void +_GlGetProgramInfoLog_2(GLuint program, GLsizei bufsize, GLsizei* pLength, char* pInfolog) +{ + glGetProgramInfoLog(program, bufsize, pLength, pInfolog); +} + +void +_GlGetRenderbufferParameteriv_2(GLenum target, GLenum pname, GLint* pParams) +{ + glGetRenderbufferParameteriv(target, pname, pParams); +} + +void +_GlGetShaderiv_2(GLuint shader, GLenum pname, GLint* pParams) +{ + glGetShaderiv(shader, pname, pParams); +} + +void +_GlGetShaderInfoLog_2(GLuint shader, GLsizei bufsize, GLsizei* pLength, char* pInfolog) +{ + glGetShaderInfoLog(shader, bufsize, pLength, pInfolog); +} + +void +_GlGetShaderPrecisionFormat_2(GLenum shadertype, GLenum precisiontype, GLint* pRange, GLint* pPrecision) +{ + glGetShaderPrecisionFormat(shadertype, precisiontype, pRange, pPrecision); +} + +void +_GlGetShaderSource_2(GLuint shader, GLsizei bufsize, GLsizei* pLength, char* pSource) +{ + glGetShaderSource(shader, bufsize, pLength, pSource); +} + +const GLubyte* +_GlGetString_2(GLenum name) +{ + return glGetString(name); +} + +void +_GlGetTexParameterfv_2(GLenum target, GLenum pname, GLfloat* pParams) +{ + glGetTexParameterfv(target, pname, pParams); +} + +void +_GlGetTexParameteriv_2(GLenum target, GLenum pname, GLint* pParams) +{ + glGetTexParameteriv(target, pname, pParams); +} + +void +_GlGetUniformfv_2(GLuint program, GLint location, GLfloat* pParams) +{ + glGetUniformfv(program, location, pParams); +} + +void +_GlGetUniformiv_2(GLuint program, GLint location, GLint* pParams) +{ + glGetUniformiv(program, location, pParams); +} + +int +_GlGetUniformLocation_2(GLuint program, const char* pName) +{ + return glGetUniformLocation(program, pName); +} + +void +_GlGetVertexAttribfv_2(GLuint index, GLenum pname, GLfloat* pParams) +{ + glGetVertexAttribfv(index, pname, pParams); +} + +void +_GlGetVertexAttribiv_2(GLuint index, GLenum pname, GLint* pParams) +{ + glGetVertexAttribiv(index, pname, pParams); +} + +void +_GlGetVertexAttribPointerv_2(GLuint index, GLenum pname, void** ppPointer) +{ + glGetVertexAttribPointerv(index, pname, ppPointer); +} + +void +_GlHint_2(GLenum target, GLenum mode) +{ + glHint(target, mode); +} + +GLboolean +_GlIsBuffer_2(GLuint buffer) +{ + return glIsBuffer(buffer); +} + +GLboolean +_GlIsEnabled_2(GLenum cap) +{ + return glIsEnabled(cap); +} + +GLboolean +_GlIsFramebuffer_2(GLuint framebuffer) +{ + return glIsFramebuffer(framebuffer); +} + +GLboolean +_GlIsProgram_2(GLuint program) +{ + return glIsProgram(program); +} + +GLboolean +_GlIsRenderbuffer_2(GLuint renderbuffer) +{ + return glIsRenderbuffer(renderbuffer); +} + +GLboolean +_GlIsShader_2(GLuint shader) +{ + return glIsShader(shader); +} + +GLboolean +_GlIsTexture_2(GLuint texture) +{ + return glIsTexture(texture); +} + +void +_GlLineWidth_2(GLfloat width) +{ + glLineWidth(width); +} + +void +_GlLinkProgram_2(GLuint program) +{ + glLinkProgram(program); +} + +void +_GlPixelStorei_2(GLenum pname, GLint param) +{ + glPixelStorei(pname, param); +} + +void +_GlPolygonOffset_2(GLfloat factor, GLfloat units) +{ + glPolygonOffset(factor, units); +} + +void +_GlReadPixels_2(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void* pPixels) +{ + glReadPixels(x, y, width, height, format, type, pPixels); +} + +void +_GlReleaseShaderCompiler_2(void) +{ + glReleaseShaderCompiler(); +} + +void +_GlRenderbufferStorage_2(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) +{ + glRenderbufferStorage(target, internalformat, width, height); +} + +void +_GlSampleCoverage_2(GLclampf value, GLboolean invert) +{ + glSampleCoverage(value, invert); +} + +void +_GlScissor_2(GLint x, GLint y, GLsizei width, GLsizei height) +{ + glScissor(x, y, width, height); +} + +void +_GlShaderBinary_2(GLint n, GLuint* pShaders, GLenum binaryformat, const void* pBinary, GLint length) +{ + glShaderBinary(n, pShaders, binaryformat, pBinary, length); +} + +void +_GlShaderSource_2(GLuint shader, GLsizei count, const char** pString, const GLint* pLength) +{ + glShaderSource(shader, count, pString, pLength); +} + +void +_GlStencilFunc_2(GLenum func, GLint ref, GLuint mask) +{ + glStencilFunc(func, ref, mask); +} + +void +_GlStencilFuncSeparate_2(GLenum face, GLenum func, GLint ref, GLuint mask) +{ + glStencilFuncSeparate(face, func, ref, mask); +} + +void +_GlStencilMask_2(GLuint mask) +{ + glStencilMask(mask); +} + +void +_GlStencilMaskSeparate_2(GLenum face, GLuint mask) +{ + glStencilMaskSeparate(face, mask); +} + +void +_GlStencilOp_2(GLenum fail, GLenum zfail, GLenum zpass) +{ + glStencilOp(fail, zfail, zpass); +} + +void +_GlStencilOpSeparate_2(GLenum face, GLenum fail, GLenum zfail, GLenum zpass) +{ + glStencilOpSeparate(face, fail, zfail, zpass); +} + +void +_GlTexImage2D_2(GLenum target, GLint level, GLenum internalformat, + GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void* pPixels) +{ + glTexImage2D(target, level, internalformat, width, height, border, format, type, pPixels); +} + +void +_GlTexParameterf_2(GLenum target, GLenum pname, GLfloat param) +{ + glTexParameterf(target, pname, param); +} + +void +_GlTexParameterfv_2(GLenum target, GLenum pname, const GLfloat* pParams) +{ + glTexParameterfv(target, pname, pParams); +} + +void +_GlTexParameteri_2(GLenum target, GLenum pname, GLint param) +{ + glTexParameteri(target, pname, param); +} + +void +_GlTexParameteriv_2(GLenum target, GLenum pname, const GLint* pParams) +{ + glTexParameteriv(target, pname, pParams); +} + +void +_GlTexSubImage2D_2(GLenum target, GLint level, GLint xoffset, GLint yoffset, + GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pPixels) +{ + glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pPixels); +} + +void +_GlUniform1f_2(GLint location, GLfloat x) +{ + glUniform1f(location, x); +} + +void +_GlUniform1fv_2(GLint location, GLsizei count, const GLfloat* pV) +{ + glUniform1fv(location, count, pV); +} + +void +_GlUniform1i_2(GLint location, GLint x) +{ + glUniform1i(location, x); +} + +void +_GlUniform1iv_2(GLint location, GLsizei count, const GLint* pV) +{ + glUniform1iv(location, count, pV); +} + +void +_GlUniform2f_2(GLint location, GLfloat x, GLfloat y) +{ + glUniform2f(location, x, y); +} + +void +_GlUniform2fv_2(GLint location, GLsizei count, const GLfloat* pV) +{ + glUniform2fv(location, count, pV); +} + +void +_GlUniform2i_2(GLint location, GLint x, GLint y) +{ + glUniform2i(location, x, y); +} + +void +_GlUniform2iv_2(GLint location, GLsizei count, const GLint* pV) +{ + glUniform2iv(location, count, pV); +} + +void +_GlUniform3f_2(GLint location, GLfloat x, GLfloat y, GLfloat z) +{ + glUniform3f(location, x, y, z); +} + +void +_GlUniform3fv_2(GLint location, GLsizei count, const GLfloat* pV) +{ + glUniform3fv(location, count, pV); +} + +void +_GlUniform3i_2(GLint location, GLint x, GLint y, GLint z) +{ + glUniform3i(location, x, y, z); +} + +void +_GlUniform3iv_2(GLint location, GLsizei count, const GLint* pV) +{ + glUniform3iv(location, count, pV); +} + +void +_GlUniform4f_2(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) +{ + glUniform4f(location, x, y, z, w); +} + +void +_GlUniform4fv_2(GLint location, GLsizei count, const GLfloat* pV) +{ + glUniform4fv(location, count, pV); +} + +void +_GlUniform4i_2(GLint location, GLint x, GLint y, GLint z, GLint w) +{ + glUniform4i(location, x, y, z, w); +} + +void +_GlUniform4iv_2(GLint location, GLsizei count, const GLint* pV) +{ + glUniform4iv(location, count, pV); +} + +void +_GlUniformMatrix2fv_2(GLint location, GLsizei count, GLboolean transpose, const GLfloat* pValue) +{ + glUniformMatrix2fv(location, count, transpose, pValue); +} + +void +_GlUniformMatrix3fv_2(GLint location, GLsizei count, GLboolean transpose, const GLfloat* pValue) +{ + glUniformMatrix3fv(location, count, transpose, pValue); +} + +void +_GlUniformMatrix4fv_2(GLint location, GLsizei count, GLboolean transpose, const GLfloat* pValue) +{ + glUniformMatrix4fv(location, count, transpose, pValue); +} + +void +_GlUseProgram_2(GLuint program) +{ + glUseProgram(program); +} + +void +_GlValidateProgram_2(GLuint program) +{ + glValidateProgram(program); +} + +void +_GlVertexAttrib1f_2(GLuint indx, GLfloat x) +{ + glVertexAttrib1f(indx, x); +} + +void +_GlVertexAttrib1fv_2(GLuint indx, const GLfloat* pValues) +{ + glVertexAttrib1fv(indx, pValues); +} + +void +_GlVertexAttrib2f_2(GLuint indx, GLfloat x, GLfloat y) +{ + glVertexAttrib2f(indx, x, y); +} + +void +_GlVertexAttrib2fv_2(GLuint indx, const GLfloat* pValues) +{ + glVertexAttrib2fv(indx, pValues); +} + +void +_GlVertexAttrib3f_2(GLuint indx, GLfloat x, GLfloat y, GLfloat z) +{ + glVertexAttrib3f(indx, x, y, z); +} + +void +_GlVertexAttrib3fv_2(GLuint indx, const GLfloat* pValues) +{ + glVertexAttrib3fv(indx, pValues); +} + +void +_GlVertexAttrib4f_2(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) +{ + glVertexAttrib4f(indx, x, y, z, w); +} + +void +_GlVertexAttrib4fv_2(GLuint indx, const GLfloat* pValues) +{ + glVertexAttrib4fv(indx, pValues); +} + +void +_GlVertexAttribPointer_2(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* pPtr) +{ + glVertexAttribPointer(indx, size, type, normalized, stride, pPtr); +} + +void +_GlViewport_2(GLint x, GLint y, GLsizei width, GLsizei height) +{ + glViewport(x, y, width, height); +} + +#ifdef __cplusplus +} +#endif + +#else + +#define _GLES_CHECK_INTERFACE_VOID_2 if (!_GlesInterfaceInitialize_2()) \ + { \ + return; \ + } +#define _GLES_CHECK_INTERFACE_GLBOOLEAN_2 if (!_GlesInterfaceInitialize_2()) \ + { \ + return GL_FALSE; \ + } +#define _GLES_CHECK_INTERFACE_GLENUM_2 if (!_GlesInterfaceInitialize_2()) \ + { \ + return 0; \ + } +#define _GLES_CHECK_INTERFACE_CONSTGLUBYTEP_2 if (!_GlesInterfaceInitialize_2()) \ + { \ + return (const GLubyte*) 0; \ + } +#define _GLES_CHECK_INTERFACE_GLUINT_2 if (!_GlesInterfaceInitialize_2()) \ + { \ + return 0; \ + } +#define _GLES_CHECK_INTERFACE_INT_2 if (!_GlesInterfaceInitialize_2()) \ + { \ + return -1; \ + } + +#define FGRAPHICS_INTERNAL_USE_RESTORE_CONTEXT +#if defined(FGRAPHICS_INTERNAL_USE_RESTORE_CONTEXT) +void _RestoreContext(void); +#endif + +namespace // unnamed +{ + +struct _GlesInterface2 +{ + void (* glActiveTexture)(GLenum texture); + void (* glAttachShader)(GLuint program, GLuint shader); + void (* glBindAttribLocation)(GLuint program, GLuint index, const char* pName); + void (* glBindBuffer)(GLenum target, GLuint buffer); + void (* glBindFramebuffer)(GLenum target, GLuint framebuffer); + void (* glBindRenderbuffer)(GLenum target, GLuint renderbuffer); + void (* glBindTexture)(GLenum target, GLuint texture); + void (* glBlendColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); + void (* glBlendEquation)(GLenum mode); + void (* glBlendEquationSeparate)(GLenum modeRGB, GLenum modeAlpha); + void (* glBlendFunc)(GLenum sfactor, GLenum dfactor); + void (* glBlendFuncSeparate)(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); + void (* glBufferData)(GLenum target, GLsizeiptr size, const void* pData, GLenum usage); + void (* glBufferSubData)(GLenum target, GLintptr offset, GLsizeiptr size, const void* pData); + GLenum (* glCheckFramebufferStatus)(GLenum target); + void (* glClear)(GLbitfield mask); + void (* glClearColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); + void (* glClearDepthf)(GLclampf depth); + void (* glClearStencil)(GLint s); + void (* glColorMask)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); + void (* glCompileShader)(GLuint shader); + void (* glCompressedTexImage2D)(GLenum target, GLint level, GLenum internalformat, + GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* pData); + void (* glCompressedTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, + GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* pData); + void (* glCopyTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, + GLsizei width, GLsizei height, GLint border); + void (* glCopyTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, + GLsizei width, GLsizei height); + GLuint (* glCreateProgram)(void); + GLuint (* glCreateShader)(GLenum type); + void (* glCullFace)(GLenum mode); + void (* glDeleteBuffers)(GLsizei n, const GLuint* pBuffers); + void (* glDeleteFramebuffers)(GLsizei n, const GLuint* pFramebuffers); + void (* glDeleteProgram)(GLuint program); + void (* glDeleteRenderbuffers)(GLsizei n, const GLuint* pRenderbuffers); + void (* glDeleteShader)(GLuint shader); + void (* glDeleteTextures)(GLsizei n, const GLuint* pTextures); + void (* glDepthFunc)(GLenum func); + void (* glDepthMask)(GLboolean flag); + void (* glDepthRangef)(GLclampf zNear, GLclampf zFar); + void (* glDetachShader)(GLuint program, GLuint shader); + void (* glDisable)(GLenum cap); + void (* glDisableVertexAttribArray)(GLuint index); + void (* glDrawArrays)(GLenum mode, GLint first, GLsizei count); + void (* glDrawElements)(GLenum mode, GLsizei count, GLenum type, const void* pIndices); + void (* glEnable)(GLenum cap); + void (* glEnableVertexAttribArray)(GLuint index); + void (* glFinish)(void); + void (* glFlush)(void); + void (* glFramebufferRenderbuffer)(GLenum target, GLenum attachment, + GLenum renderbuffertarget, GLuint renderbuffer); + void (* glFramebufferTexture2D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); + void (* glFrontFace)(GLenum mode); + void (* glGenBuffers)(GLsizei n, GLuint* pBuffers); + void (* glGenerateMipmap)(GLenum target); + void (* glGenFramebuffers)(GLsizei n, GLuint* pFramebuffers); + void (* glGenRenderbuffers)(GLsizei n, GLuint* pRenderbuffers); + void (* glGenTextures)(GLsizei n, GLuint* pTextures); + void (* glGetActiveAttrib)(GLuint program, GLuint index, GLsizei bufsize, + GLsizei* pLength, GLint* pSize, GLenum* pType, char* pName); + void (* glGetActiveUniform)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* pLength, GLint* pSize, + GLenum* pType, char* pName); + void (* glGetAttachedShaders)(GLuint program, GLsizei maxcount, GLsizei* pCount, GLuint* pShaders); + int (* glGetAttribLocation)(GLuint program, const char* pName); + void (* glGetBooleanv)(GLenum pname, GLboolean* pParams); + void (* glGetBufferParameteriv)(GLenum target, GLenum pname, GLint* pParams); + GLenum (* glGetError)(void); + void (* glGetFloatv)(GLenum pname, GLfloat* pParams); + void (* glGetFramebufferAttachmentParameteriv)(GLenum target, GLenum attachment, GLenum pname, GLint* pParams); + void (* glGetIntegerv)(GLenum pname, GLint* pParams); + void (* glGetProgramiv)(GLuint program, GLenum pname, GLint* pParams); + void (* glGetProgramInfoLog)(GLuint program, GLsizei bufsize, GLsizei* pLength, char* pInfolog); + void (* glGetRenderbufferParameteriv)(GLenum target, GLenum pname, GLint* pParams); + void (* glGetShaderiv)(GLuint shader, GLenum pname, GLint* pParams); + void (* glGetShaderInfoLog)(GLuint shader, GLsizei bufsize, GLsizei* pLength, char* pInfolog); + void (* glGetShaderPrecisionFormat)(GLenum shadertype, GLenum precisiontype, GLint* pRange, GLint* pPrecision); + void (* glGetShaderSource)(GLuint shader, GLsizei bufsize, GLsizei* pLength, char* pSource); + const GLubyte* (*glGetString)(GLenum name); + void (* glGetTexParameterfv)(GLenum target, GLenum pname, GLfloat* pParams); + void (* glGetTexParameteriv)(GLenum target, GLenum pname, GLint* pParams); + void (* glGetUniformfv)(GLuint program, GLint location, GLfloat* pParams); + void (* glGetUniformiv)(GLuint program, GLint location, GLint* pParams); + int (* glGetUniformLocation)(GLuint program, const char* pName); + void (* glGetVertexAttribfv)(GLuint index, GLenum pname, GLfloat* pParams); + void (* glGetVertexAttribiv)(GLuint index, GLenum pname, GLint* pParams); + void (* glGetVertexAttribPointerv)(GLuint index, GLenum pname, void** ppPointer); + void (* glHint)(GLenum target, GLenum mode); + GLboolean (* glIsBuffer)(GLuint buffer); + GLboolean (* glIsEnabled)(GLenum cap); + GLboolean (* glIsFramebuffer)(GLuint framebuffer); + GLboolean (* glIsProgram)(GLuint program); + GLboolean (* glIsRenderbuffer)(GLuint renderbuffer); + GLboolean (* glIsShader)(GLuint shader); + GLboolean (* glIsTexture)(GLuint texture); + void (* glLineWidth)(GLfloat width); + void (* glLinkProgram)(GLuint program); + void (* glPixelStorei)(GLenum pname, GLint param); + void (* glPolygonOffset)(GLfloat factor, GLfloat units); + void (* glReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void* pPixels); + void (* glReleaseShaderCompiler)(void); + void (* glRenderbufferStorage)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height); + void (* glSampleCoverage)(GLclampf value, GLboolean invert); + void (* glScissor)(GLint x, GLint y, GLsizei width, GLsizei height); + void (* glShaderBinary)(GLint n, GLuint* pShaders, GLenum binaryformat, const void* pBinary, GLint length); + void (* glShaderSource)(GLuint shader, GLsizei count, const char** ppString, const GLint* pLength); + void (* glStencilFunc)(GLenum func, GLint ref, GLuint mask); + void (* glStencilFuncSeparate)(GLenum face, GLenum func, GLint ref, GLuint mask); + void (* glStencilMask)(GLuint mask); + void (* glStencilMaskSeparate)(GLenum face, GLuint mask); + void (* glStencilOp)(GLenum fail, GLenum zfail, GLenum zpass); + void (* glStencilOpSeparate)(GLenum face, GLenum fail, GLenum zfail, GLenum zpass); + void (* glTexImage2D)(GLenum target, GLint level, GLenum internalformat, + GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void* pPixels); + void (* glTexParameterf)(GLenum target, GLenum pname, GLfloat param); + void (* glTexParameterfv)(GLenum target, GLenum pname, const GLfloat* pParams); + void (* glTexParameteri)(GLenum target, GLenum pname, GLint param); + void (* glTexParameteriv)(GLenum target, GLenum pname, const GLint* pParams); + void (* glTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, + GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pPixels); + void (* glUniform1f)(GLint location, GLfloat x); + void (* glUniform1fv)(GLint location, GLsizei count, const GLfloat* pV); + void (* glUniform1i)(GLint location, GLint x); + void (* glUniform1iv)(GLint location, GLsizei count, const GLint* pV); + void (* glUniform2f)(GLint location, GLfloat x, GLfloat y); + void (* glUniform2fv)(GLint location, GLsizei count, const GLfloat* pV); + void (* glUniform2i)(GLint location, GLint x, GLint y); + void (* glUniform2iv)(GLint location, GLsizei count, const GLint* pV); + void (* glUniform3f)(GLint location, GLfloat x, GLfloat y, GLfloat z); + void (* glUniform3fv)(GLint location, GLsizei count, const GLfloat* pV); + void (* glUniform3i)(GLint location, GLint x, GLint y, GLint z); + void (* glUniform3iv)(GLint location, GLsizei count, const GLint* pV); + void (* glUniform4f)(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w); + void (* glUniform4fv)(GLint location, GLsizei count, const GLfloat* pV); + void (* glUniform4i)(GLint location, GLint x, GLint y, GLint z, GLint w); + void (* glUniform4iv)(GLint location, GLsizei count, const GLint* pV); + void (* glUniformMatrix2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* pValue); + void (* glUniformMatrix3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* pValue); + void (* glUniformMatrix4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* pValue); + void (* glUseProgram)(GLuint program); + void (* glValidateProgram)(GLuint program); + void (* glVertexAttrib1f)(GLuint indx, GLfloat x); + void (* glVertexAttrib1fv)(GLuint indx, const GLfloat* pValues); + void (* glVertexAttrib2f)(GLuint indx, GLfloat x, GLfloat y); + void (* glVertexAttrib2fv)(GLuint indx, const GLfloat* pValues); + void (* glVertexAttrib3f)(GLuint indx, GLfloat x, GLfloat y, GLfloat z); + void (* glVertexAttrib3fv)(GLuint indx, const GLfloat* pValues); + void (* glVertexAttrib4f)(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w); + void (* glVertexAttrib4fv)(GLuint indx, const GLfloat* pValues); + void (* glVertexAttribPointer)(GLuint indx, GLint size, + GLenum type, GLboolean normalized, GLsizei stride, const void* pPtr); + void (* glViewport)(GLint x, GLint y, GLsizei width, GLsizei height); +}; + +void* _pGlesLib2 = NULL; +_GlesInterface2 _glesImpl2 = {0, }; + +const int _MAX_GLES_FUNCTION_2 = 142; +const char _glesStrings2[_MAX_GLES_FUNCTION_2][64] = +{ + "glActiveTexture", + "glAttachShader", + "glBindAttribLocation", + "glBindBuffer", + "glBindFramebuffer", + "glBindRenderbuffer", + "glBindTexture", + "glBlendColor", + "glBlendEquation", + "glBlendEquationSeparate", + "glBlendFunc", //10 + "glBlendFuncSeparate", + "glBufferData", + "glBufferSubData", + "glCheckFramebufferStatus", + "glClear", + "glClearColor", + "glClearDepthf", + "glClearStencil", + "glColorMask", + "glCompileShader", //20 + "glCompressedTexImage2D", + "glCompressedTexSubImage2D", + "glCopyTexImage2D", + "glCopyTexSubImage2D", + "glCreateProgram", + "glCreateShader", + "glCullFace", + "glDeleteBuffers", + "glDeleteFramebuffers", + "glDeleteProgram", //30 + "glDeleteRenderbuffers", + "glDeleteShader", + "glDeleteTextures", + "glDepthFunc", + "glDepthMask", + "glDepthRangef", + "glDetachShader", + "glDisable", + "glDisableVertexAttribArray", + "glDrawArrays", //40 + "glDrawElements", + "glEnable", + "glEnableVertexAttribArray", + "glFinish", + "glFlush", + "glFramebufferRenderbuffer", + "glFramebufferTexture2D", + "glFrontFace", + "glGenBuffers", + "glGenerateMipmap", //50 + "glGenFramebuffers", + "glGenRenderbuffers", + "glGenTextures", + "glGetActiveAttrib", + "glGetActiveUniform", + "glGetAttachedShaders", + "glGetAttribLocation", + "glGetBooleanv", + "glGetBufferParameteriv", + "glGetError", //60 + "glGetFloatv", + "glGetFramebufferAttachmentParameteriv", + "glGetIntegerv", + "glGetProgramiv", + "glGetProgramInfoLog", + "glGetRenderbufferParameteriv", + "glGetShaderiv", + "glGetShaderInfoLog", + "glGetShaderPrecisionFormat", + "glGetShaderSource", //70 + "glGetString", + "glGetTexParameterfv", + "glGetTexParameteriv", + "glGetUniformfv", + "glGetUniformiv", + "glGetUniformLocation", + "glGetVertexAttribfv", + "glGetVertexAttribiv", + "glGetVertexAttribPointerv", + "glHint", //80 + "glIsBuffer", + "glIsEnabled", + "glIsFramebuffer", + "glIsProgram", + "glIsRenderbuffer", + "glIsShader", + "glIsTexture", + "glLineWidth", + "glLinkProgram", + "glPixelStorei", //90 + "glPolygonOffset", + "glReadPixels", + "glReleaseShaderCompiler", + "glRenderbufferStorage", + "glSampleCoverage", + "glScissor", + "glShaderBinary", + "glShaderSource", + "glStencilFunc", + "glStencilFuncSeparate", //100 + "glStencilMask", + "glStencilMaskSeparate", + "glStencilOp", + "glStencilOpSeparate", + "glTexImage2D", + "glTexParameterf", + "glTexParameterfv", + "glTexParameteri", + "glTexParameteriv", + "glTexSubImage2D", //110 + "glUniform1f", + "glUniform1fv", + "glUniform1i", + "glUniform1iv", + "glUniform2f", + "glUniform2fv", + "glUniform2i", + "glUniform2iv", + "glUniform3f", + "glUniform3fv", //120 + "glUniform3i", + "glUniform3iv", + "glUniform4f", + "glUniform4fv", + "glUniform4i", + "glUniform4iv", + "glUniformMatrix2fv", + "glUniformMatrix3fv", + "glUniformMatrix4fv", + "glUseProgram", //130 + "glValidateProgram", + "glVertexAttrib1f", + "glVertexAttrib1fv", + "glVertexAttrib2f", + "glVertexAttrib2fv", + "glVertexAttrib3f", + "glVertexAttrib3fv", + "glVertexAttrib4f", + "glVertexAttrib4fv", + "glVertexAttribPointer", //140 + "glViewport" +}; + +bool +_GlesInterfaceInitialize_2(void) +{ + int count = 0; + + if (_pGlesLib2 == NULL) + { + ptrdiff_t** ppPtr = (ptrdiff_t**) (&_glesImpl2); + +#if defined(_OSP_EMUL_) + _pGlesLib2 = dlopen("/usr/lib/libGLESv2.so", RTLD_LAZY | RTLD_GLOBAL); +#else + _pGlesLib2 = dlopen("/usr/lib/driver/libGLESv2.so", RTLD_LAZY | RTLD_GLOBAL); + if (_pGlesLib2 == NULL) + { + _pGlesLib2 = dlopen("/usr/lib/libGLESv2.so", RTLD_LAZY | RTLD_GLOBAL); + } +#endif + if (_pGlesLib2 == NULL) + { + SysLog(NID_GRP, "gles2 dlopen failed! %s", dlerror()); + return false; + } + + for (count = 0; count < _MAX_GLES_FUNCTION_2; count++) + { + *ppPtr = (ptrdiff_t*) (dlsym(_pGlesLib2, _glesStrings2[count])); + + if (*ppPtr == NULL) + { + SysLog(NID_GRP, "dlsym failed! %s name : %s", dlerror(), _glesStrings2[count]); + } + ppPtr++; + } + } + +#if defined(FGRAPHICS_INTERNAL_USE_RESTORE_CONTEXT) + _RestoreContext(); +#endif + + return true; +} + +} + +#ifdef __cplusplus +extern "C" +{ +#endif + +_OSP_LOCAL_ void +_GlesInterfaceTerminate_2(void) +{ + if (_pGlesLib2 != NULL) + { + dlclose(_pGlesLib2); + _pGlesLib2 = NULL; + } +} + +void +_GlActiveTexture_2(GLenum texture) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glActiveTexture(texture); +} + +void +_GlAttachShader_2(GLuint program, GLuint shader) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glAttachShader(program, shader); +} + +void +_GlBindAttribLocation_2(GLuint program, GLuint index, const char* pNname) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glBindAttribLocation(program, index, pNname); +} + +void +_GlBindBuffer_2(GLenum target, GLuint buffer) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glBindBuffer(target, buffer); +} + +void +_GlBindFramebuffer_2(GLenum target, GLuint framebuffer) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glBindFramebuffer(target, framebuffer); +} + +void +_GlBindRenderbuffer_2(GLenum target, GLuint renderbuffer) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glBindRenderbuffer(target, renderbuffer); +} + +void +_GlBindTexture_2(GLenum target, GLuint texture) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glBindTexture(target, texture); +} + +void +_GlBlendColor_2(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glBlendColor(red, green, blue, alpha); +} + +void +_GlBlendEquation_2(GLenum mode) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glBlendEquation(mode); +} + +void +_GlBlendEquationSeparate_2(GLenum modeRGB, GLenum modeAlpha) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glBlendEquationSeparate(modeRGB, modeAlpha); +} + +void +_GlBlendFunc_2(GLenum sfactor, GLenum dfactor) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glBlendFunc(sfactor, dfactor); +} + +void +_GlBlendFuncSeparate_2(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glBlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha); +} + +void +_GlBufferData_2(GLenum target, GLsizeiptr size, const void* pData, GLenum usage) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glBufferData(target, size, pData, usage); +} + +void +_GlBufferSubData_2(GLenum target, GLintptr offset, GLsizeiptr size, const void* pData) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glBufferSubData(target, offset, size, pData); +} + +GLenum +_GlCheckFramebufferStatus_2(GLenum target) +{ + _GLES_CHECK_INTERFACE_GLENUM_2 + return _glesImpl2.glCheckFramebufferStatus(target); +} + +void +_GlClear_2(GLbitfield mask) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glClear(mask); +} + +void +_GlClearColor_2(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glClearColor(red, green, blue, alpha); +} + +void +_GlClearDepthf_2(GLclampf depth) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glClearDepthf(depth); +} + +void +_GlClearStencil_2(GLint s) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glClearStencil(s); +} + +void +_GlColorMask_2(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glColorMask(red, green, blue, alpha); +} + +void +_GlCompileShader_2(GLuint shader) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glCompileShader(shader); +} + +void +_GlCompressedTexImage2D_2(GLenum target, GLint level, GLenum internalformat, + GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* pData) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, pData); +} + +void +_GlCompressedTexSubImage2D_2(GLenum target, GLint level, GLint xoffset, GLint yoffset, + GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* pData) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, pData); +} + +void +_GlCopyTexImage2D_2(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, + GLsizei width, GLsizei height, GLint border) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glCopyTexImage2D(target, level, internalformat, x, y, width, height, border); +} + +void +_GlCopyTexSubImage2D_2(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, + GLint y, GLsizei width, GLsizei height) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); +} + +GLuint +_GlCreateProgram_2(void) +{ + _GLES_CHECK_INTERFACE_GLUINT_2 + return _glesImpl2.glCreateProgram(); +} + +GLuint +_GlCreateShader_2(GLenum type) +{ + _GLES_CHECK_INTERFACE_GLUINT_2 + return _glesImpl2.glCreateShader(type); +} + +void +_GlCullFace_2(GLenum mode) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glCullFace(mode); +} + +void +_GlDeleteBuffers_2(GLsizei n, const GLuint* pBuffers) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glDeleteBuffers(n, pBuffers); +} + +void +_GlDeleteFramebuffers_2(GLsizei n, const GLuint* pFramebuffers) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glDeleteFramebuffers(n, pFramebuffers); +} + +void +_GlDeleteProgram_2(GLuint program) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glDeleteProgram(program); +} + +void +_GlDeleteRenderbuffers_2(GLsizei n, const GLuint* pRenderbuffers) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glDeleteRenderbuffers(n, pRenderbuffers); +} + +void +_GlDeleteShader_2(GLuint shader) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glDeleteShader(shader); +} + +void +_GlDeleteTextures_2(GLsizei n, const GLuint* pTextures) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glDeleteTextures(n, pTextures); +} + +void +_GlDepthFunc_2(GLenum func) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glDepthFunc(func); +} + +void +_GlDepthMask_2(GLboolean flag) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glDepthMask(flag); +} + +void +_GlDepthRangef_2(GLclampf zNear, GLclampf zFar) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glDepthRangef(zNear, zFar); +} + +void +_GlDetachShader_2(GLuint program, GLuint shader) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glDetachShader(program, shader); +} + +void +_GlDisable_2(GLenum cap) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glDisable(cap); +} + +void +_GlDisableVertexAttribArray_2(GLuint index) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glDisableVertexAttribArray(index); +} + +void +_GlDrawArrays_2(GLenum mode, GLint first, GLsizei count) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glDrawArrays(mode, first, count); +} + +void +_GlDrawElements_2(GLenum mode, GLsizei count, GLenum type, const void* pIndices) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glDrawElements(mode, count, type, pIndices); +} + +void +_GlEnable_2(GLenum cap) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glEnable(cap); +} + +void +_GlEnableVertexAttribArray_2(GLuint index) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glEnableVertexAttribArray(index); +} + +void +_GlFinish_2(void) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glFinish(); +} + +void +_GlFlush_2(void) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glFlush(); +} + +void +_GlFramebufferRenderbuffer_2(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer); +} + +void +_GlFramebufferTexture2D_2(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glFramebufferTexture2D(target, attachment, textarget, texture, level); +} + +void +_GlFrontFace_2(GLenum mode) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glFrontFace(mode); +} + +void +_GlGenBuffers_2(GLsizei n, GLuint* pBuffers) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glGenBuffers(n, pBuffers); +} + +void +_GlGenerateMipmap_2(GLenum target) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glGenerateMipmap(target); +} + +void +_GlGenFramebuffers_2(GLsizei n, GLuint* pFramebuffers) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glGenFramebuffers(n, pFramebuffers); +} + +void +_GlGenRenderbuffers_2(GLsizei n, GLuint* pRenderbuffers) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glGenRenderbuffers(n, pRenderbuffers); +} + +void +_GlGenTextures_2(GLsizei n, GLuint* textures) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glGenTextures(n, textures); +} + +void +_GlGetActiveAttrib_2(GLuint program, GLuint index, GLsizei bufsize, + GLsizei* pLength, GLint* pSize, GLenum* pType, char* pName) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glGetActiveAttrib(program, index, bufsize, pLength, pSize, pType, pName); +} + +void +_GlGetActiveUniform_2(GLuint program, GLuint index, GLsizei bufsize, + GLsizei* pLength, GLint* pSize, GLenum* pType, char* pName) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glGetActiveUniform(program, index, bufsize, pLength, pSize, pType, pName); +} + +void +_GlGetAttachedShaders_2(GLuint program, GLsizei maxcount, GLsizei* pCount, GLuint* pShaders) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glGetAttachedShaders(program, maxcount, pCount, pShaders); +} + +int +_GlGetAttribLocation_2(GLuint program, const char* pName) +{ + _GLES_CHECK_INTERFACE_INT_2 + return _glesImpl2.glGetAttribLocation(program, pName); +} + +void +_GlGetBooleanv_2(GLenum pname, GLboolean* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glGetBooleanv(pname, pParams); +} + +void +_GlGetBufferParameteriv_2(GLenum target, GLenum pname, GLint* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glGetBufferParameteriv(target, pname, pParams); +} + +GLenum +_GlGetError_2(void) +{ + _GLES_CHECK_INTERFACE_GLENUM_2 + return _glesImpl2.glGetError(); +} + +void +_GlGetFloatv_2(GLenum pname, GLfloat* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glGetFloatv(pname, pParams); +} + +void +_GlGetFramebufferAttachmentParameteriv_2(GLenum target, GLenum attachment, GLenum pname, GLint* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glGetFramebufferAttachmentParameteriv(target, attachment, pname, pParams); +} + +void +_GlGetIntegerv_2(GLenum pname, GLint* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glGetIntegerv(pname, pParams); +} + +void +_GlGetProgramiv_2(GLuint program, GLenum pname, GLint* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glGetProgramiv(program, pname, pParams); +} + +void +_GlGetProgramInfoLog_2(GLuint program, GLsizei bufsize, GLsizei* pLength, char* pInfolog) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glGetProgramInfoLog(program, bufsize, pLength, pInfolog); +} + +void +_GlGetRenderbufferParameteriv_2(GLenum target, GLenum pname, GLint* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glGetRenderbufferParameteriv(target, pname, pParams); +} + +void +_GlGetShaderiv_2(GLuint shader, GLenum pname, GLint* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glGetShaderiv(shader, pname, pParams); +} + +void +_GlGetShaderInfoLog_2(GLuint shader, GLsizei bufsize, GLsizei* pLength, char* pInfolog) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glGetShaderInfoLog(shader, bufsize, pLength, pInfolog); +} + +void +_GlGetShaderPrecisionFormat_2(GLenum shadertype, GLenum precisiontype, GLint* pRange, GLint* pPrecision) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glGetShaderPrecisionFormat(shadertype, precisiontype, pRange, pPrecision); +} + +void +_GlGetShaderSource_2(GLuint shader, GLsizei bufsize, GLsizei* pLength, char* pSource) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glGetShaderSource(shader, bufsize, pLength, pSource); +} + +const GLubyte* +_GlGetString_2(GLenum name) +{ + _GLES_CHECK_INTERFACE_CONSTGLUBYTEP_2 + return _glesImpl2.glGetString(name); +} + +void +_GlGetTexParameterfv_2(GLenum target, GLenum pname, GLfloat* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glGetTexParameterfv(target, pname, pParams); +} + +void +_GlGetTexParameteriv_2(GLenum target, GLenum pname, GLint* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glGetTexParameteriv(target, pname, pParams); +} + +void +_GlGetUniformfv_2(GLuint program, GLint location, GLfloat* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glGetUniformfv(program, location, pParams); +} + +void +_GlGetUniformiv_2(GLuint program, GLint location, GLint* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glGetUniformiv(program, location, pParams); +} + +int +_GlGetUniformLocation_2(GLuint program, const char* pName) +{ + _GLES_CHECK_INTERFACE_INT_2 + return _glesImpl2.glGetUniformLocation(program, pName); +} + +void +_GlGetVertexAttribfv_2(GLuint index, GLenum pname, GLfloat* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glGetVertexAttribfv(index, pname, pParams); +} + +void +_GlGetVertexAttribiv_2(GLuint index, GLenum pname, GLint* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glGetVertexAttribiv(index, pname, pParams); +} + +void +_GlGetVertexAttribPointerv_2(GLuint index, GLenum pname, void** ppPointer) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glGetVertexAttribPointerv(index, pname, ppPointer); +} + +void +_GlHint_2(GLenum target, GLenum mode) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glHint(target, mode); +} + +GLboolean +_GlIsBuffer_2(GLuint buffer) +{ + _GLES_CHECK_INTERFACE_GLBOOLEAN_2 + return _glesImpl2.glIsBuffer(buffer); +} + +GLboolean +_GlIsEnabled_2(GLenum cap) +{ + _GLES_CHECK_INTERFACE_GLBOOLEAN_2 + return _glesImpl2.glIsEnabled(cap); +} + +GLboolean +_GlIsFramebuffer_2(GLuint framebuffer) +{ + _GLES_CHECK_INTERFACE_GLBOOLEAN_2 + return _glesImpl2.glIsFramebuffer(framebuffer); +} + +GLboolean +_GlIsProgram_2(GLuint program) +{ + _GLES_CHECK_INTERFACE_GLBOOLEAN_2 + return _glesImpl2.glIsProgram(program); +} + +GLboolean +_GlIsRenderbuffer_2(GLuint renderbuffer) +{ + _GLES_CHECK_INTERFACE_GLBOOLEAN_2 + return _glesImpl2.glIsRenderbuffer(renderbuffer); +} + +GLboolean +_GlIsShader_2(GLuint shader) +{ + _GLES_CHECK_INTERFACE_GLBOOLEAN_2 + return _glesImpl2.glIsShader(shader); +} + +GLboolean +_GlIsTexture_2(GLuint texture) +{ + _GLES_CHECK_INTERFACE_GLBOOLEAN_2 + return _glesImpl2.glIsTexture(texture); +} + +void +_GlLineWidth_2(GLfloat width) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glLineWidth(width); +} + +void +_GlLinkProgram_2(GLuint program) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glLinkProgram(program); +} + +void +_GlPixelStorei_2(GLenum pname, GLint param) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glPixelStorei(pname, param); +} + +void +_GlPolygonOffset_2(GLfloat factor, GLfloat units) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glPolygonOffset(factor, units); +} + +void +_GlReadPixels_2(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void* pPixels) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glReadPixels(x, y, width, height, format, type, pPixels); +} + +void +_GlReleaseShaderCompiler_2(void) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glReleaseShaderCompiler(); +} + +void +_GlRenderbufferStorage_2(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glRenderbufferStorage(target, internalformat, width, height); +} + +void +_GlSampleCoverage_2(GLclampf value, GLboolean invert) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glSampleCoverage(value, invert); +} + +void +_GlScissor_2(GLint x, GLint y, GLsizei width, GLsizei height) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glScissor(x, y, width, height); +} + +void +_GlShaderBinary_2(GLint n, GLuint* shaders, GLenum binaryformat, const void* pBinary, GLint length) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glShaderBinary(n, shaders, binaryformat, pBinary, length); +} + +void +_GlShaderSource_2(GLuint shader, GLsizei count, const char** ppString, const GLint* pLength) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glShaderSource(shader, count, ppString, pLength); +} + +void +_GlStencilFunc_2(GLenum func, GLint ref, GLuint mask) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glStencilFunc(func, ref, mask); +} + +void +_GlStencilFuncSeparate_2(GLenum face, GLenum func, GLint ref, GLuint mask) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glStencilFuncSeparate(face, func, ref, mask); +} + +void +_GlStencilMask_2(GLuint mask) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glStencilMask(mask); +} + +void +_GlStencilMaskSeparate_2(GLenum face, GLuint mask) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glStencilMaskSeparate(face, mask); +} + +void +_GlStencilOp_2(GLenum fail, GLenum zfail, GLenum zpass) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glStencilOp(fail, zfail, zpass); +} + +void +_GlStencilOpSeparate_2(GLenum face, GLenum fail, GLenum zfail, GLenum zpass) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glStencilOpSeparate(face, fail, zfail, zpass); +} + +void +_GlTexImage2D_2(GLenum target, GLint level, GLenum internalformat, + GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void* pPixels) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glTexImage2D(target, level, internalformat, width, height, border, format, type, pPixels); +} + +void +_GlTexParameterf_2(GLenum target, GLenum pname, GLfloat param) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glTexParameterf(target, pname, param); +} + +void +_GlTexParameterfv_2(GLenum target, GLenum pname, const GLfloat* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glTexParameterfv(target, pname, pParams); +} + +void +_GlTexParameteri_2(GLenum target, GLenum pname, GLint param) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glTexParameteri(target, pname, param); +} + +void +_GlTexParameteriv_2(GLenum target, GLenum pname, const GLint* pParams) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glTexParameteriv(target, pname, pParams); +} + +void +_GlTexSubImage2D_2(GLenum target, GLint level, GLint xoffset, GLint yoffset, + GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pPixels) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pPixels); +} + +void +_GlUniform1f_2(GLint location, GLfloat x) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glUniform1f(location, x); +} + +void +_GlUniform1fv_2(GLint location, GLsizei count, const GLfloat* pV) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glUniform1fv(location, count, pV); +} + +void +_GlUniform1i_2(GLint location, GLint x) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glUniform1i(location, x); +} + +void +_GlUniform1iv_2(GLint location, GLsizei count, const GLint* pV) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glUniform1iv(location, count, pV); +} + +void +_GlUniform2f_2(GLint location, GLfloat x, GLfloat y) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glUniform2f(location, x, y); +} + +void +_GlUniform2fv_2(GLint location, GLsizei count, const GLfloat* pV) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glUniform2fv(location, count, pV); +} + +void +_GlUniform2i_2(GLint location, GLint x, GLint y) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glUniform2i(location, x, y); +} + +void +_GlUniform2iv_2(GLint location, GLsizei count, const GLint* pV) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glUniform2iv(location, count, pV); +} + +void +_GlUniform3f_2(GLint location, GLfloat x, GLfloat y, GLfloat z) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glUniform3f(location, x, y, z); +} + +void +_GlUniform3fv_2(GLint location, GLsizei count, const GLfloat* pV) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glUniform3fv(location, count, pV); +} + +void +_GlUniform3i_2(GLint location, GLint x, GLint y, GLint z) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glUniform3i(location, x, y, z); +} + +void +_GlUniform3iv_2(GLint location, GLsizei count, const GLint* pV) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glUniform3iv(location, count, pV); +} + +void +_GlUniform4f_2(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glUniform4f(location, x, y, z, w); +} + +void +_GlUniform4fv_2(GLint location, GLsizei count, const GLfloat* pV) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glUniform4fv(location, count, pV); +} + +void +_GlUniform4i_2(GLint location, GLint x, GLint y, GLint z, GLint w) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glUniform4i(location, x, y, z, w); +} + +void +_GlUniform4iv_2(GLint location, GLsizei count, const GLint* v) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glUniform4iv(location, count, v); +} + +void +_GlUniformMatrix2fv_2(GLint location, GLsizei count, GLboolean transpose, const GLfloat* pValue) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glUniformMatrix2fv(location, count, transpose, pValue); +} + +void +_GlUniformMatrix3fv_2(GLint location, GLsizei count, GLboolean transpose, const GLfloat* pValue) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glUniformMatrix3fv(location, count, transpose, pValue); +} + +void +_GlUniformMatrix4fv_2(GLint location, GLsizei count, GLboolean transpose, const GLfloat* pValue) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glUniformMatrix4fv(location, count, transpose, pValue); +} + +void +_GlUseProgram_2(GLuint program) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glUseProgram(program); +} + +void +_GlValidateProgram_2(GLuint program) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glValidateProgram(program); +} + +void +_GlVertexAttrib1f_2(GLuint indx, GLfloat x) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glVertexAttrib1f(indx, x); +} + +void +_GlVertexAttrib1fv_2(GLuint indx, const GLfloat* pValues) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glVertexAttrib1fv(indx, pValues); +} + +void +_GlVertexAttrib2f_2(GLuint indx, GLfloat x, GLfloat y) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glVertexAttrib2f(indx, x, y); +} + +void +_GlVertexAttrib2fv_2(GLuint indx, const GLfloat* pValues) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glVertexAttrib2fv(indx, pValues); +} + +void +_GlVertexAttrib3f_2(GLuint indx, GLfloat x, GLfloat y, GLfloat z) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glVertexAttrib3f(indx, x, y, z); +} + +void +_GlVertexAttrib3fv_2(GLuint indx, const GLfloat* pValues) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glVertexAttrib3fv(indx, pValues); +} + +void +_GlVertexAttrib4f_2(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glVertexAttrib4f(indx, x, y, z, w); +} + +void +_GlVertexAttrib4fv_2(GLuint indx, const GLfloat* pValues) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glVertexAttrib4fv(indx, pValues); +} + +void +_GlVertexAttribPointer_2(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* pPtr) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glVertexAttribPointer(indx, size, type, normalized, stride, pPtr); +} + +void +_GlViewport_2(GLint x, GLint y, GLsizei width, GLsizei height) +{ + _GLES_CHECK_INTERFACE_VOID_2 + _glesImpl2.glViewport(x, y, width, height); +} + +#ifdef __cplusplus +} +#endif + +#endif //#if !defined(FGRAPHICS_INTERNAL_USE_DYNAMIC_LOADING) + +} // Opengl + +}} // Tizen::Graphics diff --git a/src/graphics/opengl/FGrpVideoTexture.cpp b/src/graphics/opengl/FGrpVideoTexture.cpp new file mode 100644 index 0000000..0717b20 --- /dev/null +++ b/src/graphics/opengl/FGrpVideoTexture.cpp @@ -0,0 +1,76 @@ +// +// 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 FGrpVideoTexture.cpp + * @brief This is the implementation file for VideoTexture class. + * + */ + +#include + +#include +#include + +#include "FGrp_VideoTextureImpl.h" + +namespace Tizen { namespace Graphics { namespace Opengl +{ + +VideoTexture::VideoTexture(void) + : __pImpl(new (std::nothrow)_VideoTextureImpl) +{ +} + +VideoTexture::~VideoTexture(void) +{ + delete this->__pImpl; +} + +result +VideoTexture::Construct(int textureId, int width, int height) +{ + SysAssertf(this->__pImpl != null, "Not yet constructed. Construct() should be called before use."); + result r = this->__pImpl->Construct(textureId, width, height); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + return E_SUCCESS; +} + +result +VideoTexture::BindTexture(void) +{ + SysAssertf(this->__pImpl != null, "Not yet constructed. Construct() should be called before use."); + result r = this->__pImpl->BindTexture(); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + return E_SUCCESS; +} + +void +VideoTexture::AddVideoTextureUpdateListener(IVideoTextureUpdateListener& listener) +{ + SysAssertf(this->__pImpl != null, "Not yet constructed. Construct() should be called before use."); + this->__pImpl->AddVideoTextureUpdateListener(listener, this); +} + +void +VideoTexture::RemoveVideoTextureUpdateListener(IVideoTextureUpdateListener& listener) +{ + SysAssertf(this->__pImpl != null, "Not yet constructed. Construct() should be called before use."); + this->__pImpl->RemoveVideoTextureUpdateListener(listener); +} + +}}} // Tizen::Graphics diff --git a/src/graphics/opengl/FGrp_CanvasTexture.cpp b/src/graphics/opengl/FGrp_CanvasTexture.cpp new file mode 100644 index 0000000..8f2250c --- /dev/null +++ b/src/graphics/opengl/FGrp_CanvasTexture.cpp @@ -0,0 +1,277 @@ +// +// 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_CanvasTexture.cpp + * @brief This is the implementation file for internal CanvasTexture class. + * + */ + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "FGrp_CanvasTool.h" +#include "FGrp_CanvasTexture.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Graphics { namespace Opengl +{ + +#ifdef __cplusplus +extern "C" +{ +#endif + +EGLNativePixmapType _CreateNativePixmapEx(Bitmap* pBitmap, BufferInfo& bufferInfo); +void _GlBindTexture_1(GLenum target, GLuint texture); +void _GlGetIntegerv_1(GLenum pname, GLint* params); +const GLubyte* _GlGetString_1(GLenum name); +void _GlTexImage2D_1(GLenum target, GLint level, GLint internalformat + , GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pPixels); +void _GlTexSubImage2D_1(GLenum target, GLint level, GLint xoffset, GLint yoffset, + GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pPixels); +void _GlTexImage2D_2(GLenum target, GLint level, GLenum internalformat + , GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pPixels); +void _GlTexSubImage2D_2(GLenum target, GLint level, GLint xoffset, GLint yoffset, + GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pPixels); + +#ifdef __cplusplus +} +#endif + +_CanvasTexture::_CanvasTexture(void) + : __glVersion(0) + , __eglDisplay(EGL_NO_DISPLAY) + , __eglSurface(EGL_NO_SURFACE) + , __eglContext(EGL_NO_CONTEXT) + , __nativePixmap((EGLNativePixmapType)0) + , __textureId(0) + , __textureFormat(GL_RGBA) + , __pBitmap(null) + , __pBitmapColorConvert(null) +{ +} + +_CanvasTexture::~_CanvasTexture(void) +{ + delete this->__pBitmap; + delete this->__pBitmapColorConvert; +} + +result +_CanvasTexture::Construct(const int textureId, const int width, const int height) +{ + bool isSupported = false; + bool isSupported11 = false; + bool isSupported20 = false; + + Tizen::System::SystemInfo::GetValue(L"http://tizen.org/feature/opengles", isSupported); + Tizen::System::SystemInfo::GetValue(L"http://tizen.org/feature/opengles.version.1_1", isSupported11); + Tizen::System::SystemInfo::GetValue(L"http://tizen.org/feature/opengles.version.2_0", isSupported20); + + SysTryReturnResult(NID_GRP, isSupported || isSupported11 || isSupported20 + , E_UNSUPPORTED_OPERATION, "Not supported on this device."); + + this->__eglDisplay = eglGetCurrentDisplay(); + this->__eglSurface = eglGetCurrentSurface(EGL_DRAW); + this->__eglContext = eglGetCurrentContext(); + + eglQueryContext(this->__eglDisplay, this->__eglContext, EGL_CONTEXT_CLIENT_VERSION, &this->__glVersion); + SysTryReturnResult(NID_GRP + , this->__eglDisplay != EGL_NO_DISPLAY + && this->__eglSurface != EGL_NO_SURFACE + && this->__eglContext != EGL_NO_CONTEXT + && (this->__glVersion == 1 || this->__glVersion == 2), E_INVALID_STATE + , "Getting egl informations failed! eglDisplay:%#x eglContext:%#x glVersion:%d" + , (unsigned int)this->__eglDisplay, (unsigned int)this->__eglContext, this->__glVersion); + + GLint maxTextureSize = 0; + if (this->__glVersion == 1) + { + _GlGetIntegerv_1(GL_MAX_TEXTURE_SIZE, &maxTextureSize); + } + else + { + _GlGetIntegerv_2(GL_MAX_TEXTURE_SIZE, &maxTextureSize); + } + SysTryReturnResult(NID_GRP, (width > 0 && height > 0 && width <= maxTextureSize && height <= maxTextureSize) + , 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, "Memory allocation failed."); + + result r = bitmap.get()->Construct(Rectangle(0, 0, width, height)); + SysTryReturnResult(NID_GRP, r == E_SUCCESS, r, "Propagating."); + + if (IsSupported(L"GL_EXT_texture_format_BGRA8888")) + { + this->__textureFormat = GL_BGRA; + } + else + { + std::auto_ptr bitmapColorConvert(new (std::nothrow) Bitmap); + 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, r == E_SUCCESS, r, "Propagating."); + + this->__pBitmapColorConvert = bitmapColorConvert.release(); + } + + bitmap.get()->Lock(__bufferInfo); + memset(__bufferInfo.pPixels, 0, __bufferInfo.pitch * __bufferInfo.height); + bitmap.get()->Unlock(); + + if (this->__glVersion == 1) + { + _GlBindTexture_1(GL_TEXTURE_2D, textureId); + _GlTexImage2D_1(GL_TEXTURE_2D, 0, this->__textureFormat, width, height, 0, this->__textureFormat, GL_UNSIGNED_BYTE, __bufferInfo.pPixels); + } + else + { + _GlBindTexture_2(GL_TEXTURE_2D, textureId); + _GlTexImage2D_2(GL_TEXTURE_2D, 0, this->__textureFormat, width, height, 0, this->__textureFormat, GL_UNSIGNED_BYTE, __bufferInfo.pPixels); + } + + this->__pBitmap = bitmap.release(); + this->__textureId = textureId; + + return r; +} + +bool +_CanvasTexture::ShowCallback(void* pParam) +{ + _CanvasTexture* pCanvasTexture = dynamic_cast<_CanvasTexture*> ((_CanvasTexture*)pParam); + SysTryLogReturn(NID_GRP, pCanvasTexture != null, false, "Invalid parameter."); + + pCanvasTexture->UpdateTexture(); + + return true; +} + +Canvas* +_CanvasTexture::GetCanvasN(void) const +{ + std::auto_ptr canvas(new (std::nothrow) Canvas); + SysTryReturn(NID_GRP, canvas.get() != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + result r = canvas.get()->Construct(__bufferInfo); + SysTryReturn(NID_GRP, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + bool ret = _CanvasTool::SetCallback(*canvas.get(), this->ShowCallback, (void*)this); + SysTryReturn(NID_GRP, ret, null, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Registering callback failed."); + + return canvas.release(); +} + +bool +_CanvasTexture::IsSupported(String string) +{ + char* pString = null; + if (this->__glVersion == 1) + { + pString = (char*)_GlGetString_1(GL_EXTENSIONS); + } + else + { + pString = (char*)_GlGetString_2(GL_EXTENSIONS); + } + String extensions(pString); + + return extensions.Contains(string); +} + +void +_CanvasTexture::UpdateTexture(void) +{ + bool needMakeCurrent = false; + + EGLDisplay eglDisplay = eglGetCurrentDisplay(); + EGLSurface eglSurface = eglGetCurrentSurface(EGL_DRAW); + EGLContext eglContext = eglGetCurrentContext(); + + if (this->__eglDisplay != eglDisplay + || this->__eglSurface != eglSurface + || this->__eglContext != eglContext) + { + needMakeCurrent = true; + eglMakeCurrent(this->__eglDisplay, this->__eglSurface, this->__eglSurface, this->__eglContext); + } + + if (__glVersion == 1) + { + _GlBindTexture_1(GL_TEXTURE_2D, __textureId); + } + else + { + _GlBindTexture_2(GL_TEXTURE_2D, __textureId); + } + + void* pPixels = __bufferInfo.pPixels; + + if (this->__textureFormat == GL_RGBA && this->__pBitmapColorConvert != null) + { + int index = 0; + BufferInfo bufferInfoConvert; + this->__pBitmapColorConvert->Lock(bufferInfoConvert); + this->__pBitmapColorConvert->Unlock(); + + unsigned int* pSource = (unsigned int*)__bufferInfo.pPixels; + unsigned int* pDestination = (unsigned int*)bufferInfoConvert.pPixels; + + for (int y = 0; y < __bufferInfo.height; y++) + { + index = __bufferInfo.width * y; + for (int x = 0; x < __bufferInfo.width; x++) + { + pDestination[index + x] = (0x000000ffu & (pSource[index + x]>> 16)) + | (0xff00ff00u & (pSource[index + x])) + | (0x00ff0000u & (pSource[index + x] << 16)); + } + } + pPixels = (unsigned int*)pDestination; + } + + if (__glVersion == 1) + { + _GlTexSubImage2D_1(GL_TEXTURE_2D, 0, 0, 0, __bufferInfo.width, __bufferInfo.height + , __textureFormat, GL_UNSIGNED_BYTE, pPixels); + } + else + { + _GlTexSubImage2D_2(GL_TEXTURE_2D, 0, 0, 0, __bufferInfo.width, __bufferInfo.height + , __textureFormat, GL_UNSIGNED_BYTE, pPixels); + } + + if (needMakeCurrent) + { + eglMakeCurrent(eglDisplay, eglSurface, eglSurface, eglContext); + } +} + +}}} // Tizen::Graphics::Opengl + diff --git a/src/graphics/opengl/FGrp_CanvasTexture.h b/src/graphics/opengl/FGrp_CanvasTexture.h new file mode 100644 index 0000000..579d311 --- /dev/null +++ b/src/graphics/opengl/FGrp_CanvasTexture.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 FGrp_CanvasTexture.h + * @brief This is the header file for CanvasTexture class. + * + */ + +#ifndef _FGRP_INTERNAL_CANVAS_TEXTURE_H_ +#define _FGRP_INTERNAL_CANVAS_TEXTURE_H_ + +#include +#include + +namespace Tizen { namespace Graphics { +class Bitmap; +class Canvas; +}} + +namespace Tizen { namespace Graphics { namespace Opengl +{ + +class _CanvasTexture +{ +public: + _CanvasTexture(void); + virtual ~_CanvasTexture(void); + + result Construct(int textureId, int width, int height); + + Tizen::Graphics::Canvas* GetCanvasN(void) const; + + bool IsSupported(Tizen::Base::String string); + + static bool ShowCallback(void* pParam); + + void UpdateTexture(void); + +private: + _CanvasTexture(const _CanvasTexture& rhs); + _CanvasTexture& operator =(const _CanvasTexture& rhs); + +private: + int __glVersion; + EGLDisplay __eglDisplay; + EGLSurface __eglSurface; + EGLContext __eglContext; + EGLNativePixmapType __nativePixmap; + GLuint __textureId; + GLint __textureFormat; + Tizen::Graphics::BufferInfo __bufferInfo; + Bitmap* __pBitmap; + Bitmap* __pBitmapColorConvert; +}; // _CanvasTexture + +}}} // Tizen::Graphics::Opengl + +#endif //_FGRP_CANVAS_TEXTURE_H_ + diff --git a/src/graphics/opengl/FGrp_CanvasTextureImpl.cpp b/src/graphics/opengl/FGrp_CanvasTextureImpl.cpp new file mode 100644 index 0000000..18e90bf --- /dev/null +++ b/src/graphics/opengl/FGrp_CanvasTextureImpl.cpp @@ -0,0 +1,76 @@ +// +// 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_CanvasTextureImpl.cpp + * @brief This is the implementation file for internal CanvasTextureImpl class. + * + */ + +#include + +#include + +#include + +#include "FGrp_CanvasTextureImpl.h" +#include "FGrp_CanvasTexture.h" + +using namespace Tizen::Base; + +namespace Tizen { namespace Graphics { namespace Opengl +{ + +_CanvasTextureImpl::_CanvasTextureImpl(void) + : __pNativeCanvasTexture(new (std::nothrow)_CanvasTexture) +{ +} + +_CanvasTextureImpl::~_CanvasTextureImpl(void) +{ + delete this->__pNativeCanvasTexture; +} + +result +_CanvasTextureImpl::Construct(int textureId, int width, int height) +{ + SysTryReturnResult(NID_GRP, this->__pNativeCanvasTexture != null, E_OUT_OF_MEMORY, "Memory allocation failed.\n"); + + return this->__pNativeCanvasTexture->Construct(textureId, width, height); +} + +Canvas* +_CanvasTextureImpl::GetCanvasN(void) const +{ + SysTryReturn(NID_GRP, this->__pNativeCanvasTexture != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.\n"); + + return this->__pNativeCanvasTexture->GetCanvasN(); +} + +_CanvasTextureImpl* +_CanvasTextureImpl::GetInstance(CanvasTexture& canvasTexture) +{ + return (&canvasTexture != null) ? canvasTexture.__pImpl : null; +} + +const _CanvasTextureImpl* +_CanvasTextureImpl::GetInstance(const CanvasTexture& canvasTexture) +{ + return (&canvasTexture != null) ? canvasTexture.__pImpl : null; +} + +}}} // Tizen::Graphics::Opengl diff --git a/src/graphics/opengl/FGrp_GlPlayerImpl.cpp b/src/graphics/opengl/FGrp_GlPlayerImpl.cpp new file mode 100644 index 0000000..d79cf6a --- /dev/null +++ b/src/graphics/opengl/FGrp_GlPlayerImpl.cpp @@ -0,0 +1,484 @@ +// +// 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_GlPlayerImpl.cpp + * @brief This is the implementation file for _GlPlayerImpl class. + * + */ + +#include + +#include +#include +#include +#include + +#include + +#include "FGrp_GlPlayerImpl.h" + +namespace Tizen { namespace Graphics { namespace Opengl +{ + +_GlPlayerImpl::_GlPlayerImpl(void) + : __pRenderer(null) + , __pTimer(null) + , __pTargetControl(null) + , __eglDisplay(EGL_NO_DISPLAY) + , __eglSurface(EGL_NO_SURFACE) + , __eglConfig(null) + , __eglContext(EGL_NO_CONTEXT) + , __fps(50) + , __renderTimeInterval(20) + , __eglContextClientVersion(EGL_CONTEXT_CLIENT_VERSION_2_X) + , __playerState(PLAYER_STATE_NOT_INITIALIZED) +{ + __eglConfigList[0] = EGL_NONE; +} + +_GlPlayerImpl::~_GlPlayerImpl(void) +{ + __DestroyGl(); + + if (__pTimer != null) + { + __pTimer->Cancel(); + delete __pTimer; + } +} + +bool +_GlPlayerImpl::__CheckReadyToStart(void) +{ + return (__pTargetControl == null) ? false : true; +} + +bool +_GlPlayerImpl::__DestroyGl(void) +{ + if (__eglDisplay == EGL_NO_DISPLAY) + { + return false; + } + + if (__pRenderer != null) + { + __pRenderer->TerminateGl(); + __pRenderer = null; + } + + eglMakeCurrent(__eglDisplay, null, null, null); + if (__eglContext != EGL_NO_CONTEXT) + { + eglDestroyContext(__eglDisplay, __eglContext); + __eglContext = EGL_NO_CONTEXT; + } + + if (__eglSurface != EGL_NO_SURFACE) + { + eglDestroySurface(__eglDisplay, __eglSurface); + __eglSurface = EGL_NO_SURFACE; + } + + eglTerminate(__eglDisplay); + __eglDisplay = EGL_NO_DISPLAY; + + return true; +} + +result +_GlPlayerImpl::Construct(EglContextClientVersion version, Tizen::Ui::Control* pControl) +{ + SysTryReturnResult(NID_GRP, version == EGL_CONTEXT_CLIENT_VERSION_1_X || + version == EGL_CONTEXT_CLIENT_VERSION_2_X, E_INVALID_ARG, "The input client version is invalid"); + + 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, + "The input target pControl is not allowable. Only Form/Frame are acceptable. "); + 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); + SysTryReturnResult(NID_GRP, timer.get() != null, E_OUT_OF_MEMORY, "Fail to generate Timer. "); + SysTryReturnResult(NID_GRP, timer->Construct(*this) == E_SUCCESS, E_OUT_OF_MEMORY, "Fail to construct Timer. "); + + __eglContextClientVersion = version; + __pTargetControl = pControl; + __pTimer = timer.release(); + + return E_SUCCESS; +} + +bool +_GlPlayerImpl::IsValid(void) const +{ + return (this && this->__pTimer); +} + +result +_GlPlayerImpl::Start(void) +{ + EGLint numConfigs; + EGLint eglContextList[3] = {EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE}; + + if (__playerState == PLAYER_STATE_START) + { + return E_SUCCESS; + } + + if (__playerState == PLAYER_STATE_PAUSE) + { + SysTryReturnResult(NID_GRP, false, E_INVALID_STATE, "Cannot start player when the player's state is paused."); + } + + SysTryReturnResult(NID_GRP, __CheckReadyToStart(), E_INVALID_STATE, "This instance is not ready to start yet."); + + eglBindAPI(EGL_OPENGL_ES_API); + if (__eglDisplay != EGL_NO_DISPLAY) + { + __DestroyGl(); + } + + __eglDisplay = eglGetDisplay((EGLNativeDisplayType)EGL_DEFAULT_DISPLAY); + SysTryReturnResult(NID_GRP, __eglDisplay != EGL_NO_DISPLAY, E_OPENGL_ERROR, "Fail to find EGL_DEFAULT_DISPLAY device with eglGetDisplay()."); + + if (eglInitialize(__eglDisplay, null, null) == EGL_FALSE || eglGetError() != EGL_SUCCESS) + { + __DestroyGl(); + SysTryReturnResult(NID_GRP, false, E_OPENGL_ERROR, "Fail to initialize egl with eglInitialize()."); + } + + if (eglChooseConfig(__eglDisplay, __eglConfigList, &__eglConfig, 1, &numConfigs) == EGL_FALSE || eglGetError() != EGL_SUCCESS) + { + __DestroyGl(); + SysTryReturnResult(NID_GRP, false, E_OPENGL_ERROR, "Fail to choose appropriate egl configurations with eglChooseConfig()."); + } + + if (numConfigs == 0) + { + __DestroyGl(); + SysTryReturnResult(NID_GRP, false, E_OPENGL_ERROR, "There is no matching configuration for the given condition."); + } + + __eglSurface = eglCreateWindowSurface(__eglDisplay, __eglConfig, (EGLNativeWindowType)__pTargetControl, null); + if (__eglSurface == EGL_NO_SURFACE || eglGetError() != EGL_SUCCESS) + { + __DestroyGl(); + SysTryReturnResult(NID_GRP, false, E_OPENGL_ERROR, "Fail to create window surface with eglCreateWindowSurface()."); + } + + switch (__eglContextClientVersion) + { + case EGL_CONTEXT_CLIENT_VERSION_1_X: + eglContextList[1] = 1; + break; + case EGL_CONTEXT_CLIENT_VERSION_2_X: + eglContextList[1] = 2; + break; + } + __eglContext = eglCreateContext(__eglDisplay, __eglConfig, EGL_NO_CONTEXT, eglContextList); + if (__eglContext == EGL_NO_CONTEXT || eglGetError() != EGL_SUCCESS) + { + __DestroyGl(); + SysTryReturnResult(NID_GRP, false, E_OPENGL_ERROR, "Fail to create egl context with eglCreateContext()."); + } + + if (eglMakeCurrent(__eglDisplay, __eglSurface, __eglSurface, __eglContext) == EGL_FALSE || eglGetError() != EGL_SUCCESS) + { + __DestroyGl(); + SysTryReturnResult(NID_GRP, false, E_OPENGL_ERROR, "Fail to active the current context with eglMakeCurrent()."); + } + + result r = __pTimer->Start(__renderTimeInterval); + SysTryReturnResult(NID_GRP, r == E_SUCCESS, r, "Fail to resume Timer."); + + __playerState = PLAYER_STATE_START; + + return E_SUCCESS; +} + +result +_GlPlayerImpl::Pause(void) +{ + if (__playerState == PLAYER_STATE_PAUSE || __playerState == PLAYER_STATE_STOP) + { + return E_SUCCESS; + } + + if (__playerState == PLAYER_STATE_NOT_INITIALIZED) + { + SysTryReturnResult(NID_GRP, false, E_INVALID_STATE, "Cannot pause player when the player is not started."); + } + + if (__pTimer != null) + { + result r = __pTimer->Cancel(); + SysTryReturnResult(NID_GRP, r == E_SUCCESS, r, "Fail to pause Timer."); + } + + if (__pRenderer != null) + { + SysTryReturnResult(NID_GRP, __pRenderer->Pause(), E_INVALID_OPERATION, "Fail to perform IGlRenderer::Pause() function ."); + } + + __playerState = PLAYER_STATE_PAUSE; + + return E_SUCCESS; +} + +result +_GlPlayerImpl::Resume(void) +{ + if (__playerState == PLAYER_STATE_START) + { + return E_SUCCESS; + } + + if (__playerState == PLAYER_STATE_NOT_INITIALIZED || __playerState == PLAYER_STATE_STOP) + { + SysTryReturnResult(NID_GRP, false, E_INVALID_STATE, "Cannot resume player when the player is not started."); + } + + if (__pRenderer != null) + { + SysTryReturnResult(NID_GRP, __pRenderer->Resume(), E_INVALID_OPERATION, "Fail to perform IGlRenderer::Resume() function ."); + } + if (__pTimer != null) + { + result r = __pTimer->Start(__renderTimeInterval); + SysTryReturnResult(NID_GRP, r == E_SUCCESS, r, "Fail to resume Timer."); + } + + __playerState = PLAYER_STATE_START; + + return E_SUCCESS; +} + +result +_GlPlayerImpl::Stop(void) +{ + if (__playerState == PLAYER_STATE_STOP || __playerState == PLAYER_STATE_NOT_INITIALIZED) + { + return E_SUCCESS; + } + + if (__playerState == PLAYER_STATE_PAUSE) + { + __DestroyGl(); + __playerState = PLAYER_STATE_STOP; + return E_SUCCESS; + } + + if (__pTimer != null) + { + result r = __pTimer->Cancel(); + SysTryReturnResult(NID_GRP, r == E_SUCCESS, r, "Fail to pause Timer."); + } + + if (__pRenderer != null) + { + SysTryReturnResult(NID_GRP, __pRenderer->Pause(), E_INVALID_OPERATION, "Fail to perform IGlRenderer::Pause() function ."); + } + + __DestroyGl(); + __playerState = PLAYER_STATE_STOP; + + return E_SUCCESS; +} + +result +_GlPlayerImpl::Redraw(void) +{ + SysTryReturnResult(NID_GRP, eglMakeCurrent(__eglDisplay, __eglSurface, __eglSurface, __eglContext) != EGL_FALSE, E_OPENGL_ERROR, "eglMakeCurrent() has been failed."); + + if (__pRenderer != null) + { + __pRenderer->Draw(); + eglSwapBuffers(__eglDisplay, __eglSurface); + } + + return E_SUCCESS; +} + +result +_GlPlayerImpl::SetFps(int fps) +{ + __fps = fps; + if (fps > 0) + { + __renderTimeInterval = (int)((float)1000 / (float)fps); + } + else + { + __renderTimeInterval = 1; + } + + return E_SUCCESS; +} + +result +_GlPlayerImpl::SetEglAttributeList(const EGLint* pEglConfigList) +{ + int index = 0; + + SysTryReturnResult(NID_GRP, pEglConfigList != null, E_INVALID_ARG, "Input is invalid EGL attribute list. "); + + while (pEglConfigList[index] != EGL_NONE) + { + SysTryReturnResult(NID_GRP, index < 38, E_INVALID_ARG, "Input eglConfigList does not have terminal symbol 'EGL_NONE'. "); + + __eglConfigList[index] = pEglConfigList[index]; + __eglConfigList[index+1] = pEglConfigList[index+1]; + index += 2; + } + __eglConfigList[index] = EGL_NONE; + + return E_SUCCESS; +} + +result +_GlPlayerImpl::SetEglAttributePreset(EglAttributesPreset preset) +{ + int index = 0; + + switch (preset) + { + case EGL_ATTRIBUTES_PRESET_RGB565: + __eglConfigList[index++] = EGL_RED_SIZE; + __eglConfigList[index++] = 5; + __eglConfigList[index++] = EGL_GREEN_SIZE; + __eglConfigList[index++] = 6; + __eglConfigList[index++] = EGL_BLUE_SIZE; + __eglConfigList[index++] = 5; + break; + case EGL_ATTRIBUTES_PRESET_ARGB8888: + __eglConfigList[index++] = EGL_ALPHA_SIZE; + __eglConfigList[index++] = 8; + __eglConfigList[index++] = EGL_RED_SIZE; + __eglConfigList[index++] = 8; + __eglConfigList[index++] = EGL_GREEN_SIZE; + __eglConfigList[index++] = 8; + __eglConfigList[index++] = EGL_BLUE_SIZE; + __eglConfigList[index++] = 8; + break; + case EGL_ATTRIBUTES_PRESET_DONT_CARE: + break; + default: + SysTryReturnResult(NID_GRP, false, E_INVALID_ARG, "Input preset is invalid. "); + break; + } + __eglConfigList[index] = EGL_NONE; + + return E_SUCCESS; +} + +result +_GlPlayerImpl::SetEglAttribute(EGLint key, EGLint value) +{ + int index = 0; + + + + if (key != EGL_ALPHA_MASK_SIZE && key != EGL_ALPHA_SIZE + && key != EGL_BIND_TO_TEXTURE_RGB && key != EGL_BIND_TO_TEXTURE_RGBA + && key != EGL_BLUE_SIZE && key != EGL_BUFFER_SIZE + && key != EGL_COLOR_BUFFER_TYPE && key != EGL_CONFIG_CAVEAT + && key != EGL_CONFIG_ID && key != EGL_CONFORMANT + && key != EGL_DEPTH_SIZE && key != EGL_GREEN_SIZE + && key != EGL_LEVEL && key != EGL_LUMINANCE_SIZE + && key != EGL_MATCH_NATIVE_PIXMAP && key != EGL_NATIVE_RENDERABLE + && key != EGL_MAX_SWAP_INTERVAL && key != EGL_MIN_SWAP_INTERVAL + && key != EGL_RED_SIZE && key != EGL_SAMPLE_BUFFERS + && key != EGL_SAMPLES && key != EGL_STENCIL_SIZE + && key != EGL_RENDERABLE_TYPE && key != EGL_SURFACE_TYPE + && key != EGL_TRANSPARENT_TYPE && key != EGL_TRANSPARENT_RED_VALUE + && key != EGL_TRANSPARENT_GREEN_VALUE && key != EGL_TRANSPARENT_BLUE_VALUE) + { + SysTryReturnResult(NID_GRP, false, E_INVALID_ARG, "Input key is invalid for EGL attributes"); + } + + while (__eglConfigList[index] != key && __eglConfigList[index] != EGL_NONE) + { + index += 2; + } + + if (__eglConfigList[index] == EGL_NONE) + { + __eglConfigList[index] = key; + __eglConfigList[index+2] = EGL_NONE; + } + __eglConfigList[index+1] = value; + + return E_SUCCESS; +} + +result +_GlPlayerImpl::SetIGlRenderer(IGlRenderer* pRenderer) +{ + if (pRenderer != null) + { + int x = 0; + int y = 0; + int width = 0; + int height = 0; + + __pTargetControl->GetBounds(x, y, width, height); + pRenderer->SetTargetControlWidth(width); + pRenderer->SetTargetControlHeight(height); + + SysTryReturnResult(NID_GRP, pRenderer->InitializeGl(), E_INVALID_OPERATION, "Fail to InitializeGl() for the given pRenderer. "); + } + if (__pRenderer != null) + { + __pRenderer->TerminateGl(); + } + + __pRenderer = pRenderer; + + return E_SUCCESS; +} + +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. "); + } +} + +_GlPlayerImpl* +_GlPlayerImpl::GetInstance(GlPlayer& player) +{ + return (&player != null) ? player.__pImpl : null; +} + +const _GlPlayerImpl* +_GlPlayerImpl::GetInstance(const GlPlayer& player) +{ + return (&player != null) ? player.__pImpl : null; +} + +}}} // Tizen::Graphics::Opengl diff --git a/src/graphics/opengl/FGrp_VideoTexture.cpp b/src/graphics/opengl/FGrp_VideoTexture.cpp new file mode 100644 index 0000000..6b38709 --- /dev/null +++ b/src/graphics/opengl/FGrp_VideoTexture.cpp @@ -0,0 +1,551 @@ +// +// 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_VideoTexture.cpp + * @brief This is the implementation file for internal VideoTexture class. + * + */ + +#include +#include + +#include +#include + +#include + +#include +#include +#include +#include + +#include +#include +#include + +#include "FGrp_VideoTexture.h" +#include "FGrp_BufferInfoImpl.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; +using namespace Tizen::System; + +#define FGRAPHICS_INTERNAL_USE_THRESHOLD_EVENT_TIMER + +#ifdef __cplusplus +extern "C" +{ +#endif + +namespace Tizen { namespace Graphics { namespace Opengl +{ +EGLNativePixmapType _CreateNativePixmapEx(Bitmap* pBitmap, BufferInfo bufferInfo); +void _GlBindTexture_1(GLenum target, GLuint texture); +void _GlGetIntegerv_1(GLenum pname, GLint* params); +const GLubyte* _GlGetString_1(GLenum name); +}}} + +#ifdef __cplusplus +} +#endif + +namespace Tizen { namespace Graphics { namespace Opengl +{ + +#if defined (FGRAPHICS_INTERNAL_USE_THRESHOLD_EVENT_TIMER) +namespace //unnamed +{ +const long long _DEQUEUE_THRESHOLD_EVENT_TIME = 1000; +} +#endif + +_DamageEvent::_DamageEvent(void) + : __pDisplay(NULL) + , __eventBaseReturn(0) + , __pVideoTexture(null) + , __keepRunning(true) +{ + for (int i = 0; i < _VIDEO_TEXTURE_BUFFER_MAX; i++) + { + __pixmap[i] = (Drawable)0; + __damage[i] = (Damage)0; + } +} + +_DamageEvent::~_DamageEvent(void) +{ + for (int i = 0; i < _VIDEO_TEXTURE_BUFFER_MAX; i++) + { + XDamageDestroy(__pDisplay, __damage[i]); + } + XCloseDisplay(__pDisplay); +} + +result +_DamageEvent::Construct(_VideoTexture* pVideoTexture) +{ + __pVideoTexture = pVideoTexture; + + int errorBaseReturn = 0; + __pDisplay = (Display*)XOpenDisplay(NULL); + + 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); + } + + return Thread::Construct(); +} + +Object* +_DamageEvent::Run(void) +{ + while(__keepRunning) + { + XEvent ev = {0, }; + int eventCount = XPending(__pDisplay); + + for (int i = 0; i < eventCount; i++) + { + XNextEvent (__pDisplay, &ev); + + if (ev.type == __eventBaseReturn) + { + XDamageNotifyEvent* pDamageEvent = (XDamageNotifyEvent*)&ev; + + 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; + SystemTime::GetTicks(__pVideoTexture->__pBuffer[i].__timeStamp); + + if (__pVideoTexture->__pVideoTextureUpdateListener != null) + { + int count = __pVideoTexture->__pVideoTextureUpdateListener->GetCount(); + if (count > 0) + { + IEnumeratorT* pEnumerator = __pVideoTexture->__pVideoTextureUpdateListener->GetEnumeratorN(); + if (pEnumerator != null) + { + while (pEnumerator->MoveNext() == E_SUCCESS) + { + IVideoTextureUpdateListener* pListener = null; + pEnumerator->GetCurrent(pListener); + if (pListener != null) + { + pListener->OnTextureUpdated(__pVideoTexture->__pVideoTexture); + } + } + delete pEnumerator; + } + } + } + break; + } + } + + XDamageSubtract (__pDisplay, pDamageEvent->damage, None, None ); + } + } + + Sleep(1); + } + + return null; +} + +_VideoTexture::_VideoTexture(void) + : __textureId(0) + , __isEglSyncAvailable(false) + , __glVersion(0) + , __eglDisplay(EGL_NO_DISPLAY) + , __funcEglCreateSyncKhr(null) + , __funcEglClientWaitSyncKhr(null) + , __funcEglDestroySyncKhr(null) + , __funcGlEglImageTargetTexture2dOes(null) + , __pDamageEvent(null) + , __pVideoTexture(null) + , __currentReadingBuffer(-1) + , __pVideoTextureUpdateListener(null) +{ + for (int i = 0; i < _VIDEO_TEXTURE_BUFFER_MAX; i++) + { + __pBuffer[i].__pBitmap = null; + __pBuffer[i].__nativePixmap = (EGLNativePixmapType)0; + __pBuffer[i].__eglImage = (EGLImageKHR)0; + __pBuffer[i].__timeStamp = 0; + __pBuffer[i].__bufferState = _BUFFER_STATE_FREE; + __pBuffer[i].__eglSync = EGL_NO_SYNC_KHR; + } +} + +_VideoTexture::~_VideoTexture(void) +{ + Release(); +} + +result +_VideoTexture::Construct(const int textureId, const int width, const int height) +{ + bool isSupported = false; + bool isSupported11 = false; + bool isSupported20 = false; + + Tizen::System::SystemInfo::GetValue(L"http://tizen.org/feature/opengles", isSupported); + Tizen::System::SystemInfo::GetValue(L"http://tizen.org/feature/opengles.version.1_1", isSupported11); + Tizen::System::SystemInfo::GetValue(L"http://tizen.org/feature/opengles.version.2_0", isSupported20); + + SysTryReturnResult(NID_GRP, isSupported || isSupported11 || isSupported20 + , E_UNSUPPORTED_OPERATION, "Not supported on this device."); + + result r = E_SUCCESS; + + SysTryReturnResult(NID_GRP, textureId > 0 && width > 0 && height > 0 + , E_INVALID_ARG, "Invalid parameter. textureId:%d w:%d h:%d", textureId, width, height); + + __eglDisplay = eglGetCurrentDisplay(); + EGLContext eglContext = eglGetCurrentContext(); + 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_INTERNAL"); + +#if !defined(_OSP_EMUL_) //fixme + SysTryReturnResult(NID_GRP, IsSupported(L"GL_OES_EGL_image") + && __funcGlEglImageTargetTexture2dOes != null && funcEglCreateImageKhr != null + , E_UNSUPPORTED_OPERATION, "Not supported on this device."); +#endif + + if (IsSupported(L"GL_OES_EGL_sync")) + { + __funcEglCreateSyncKhr = (PFNEGLCREATESYNCKHRPROC)eglGetProcAddress("eglCreateSyncKHR"); + __funcEglClientWaitSyncKhr = (PFNEGLCLIENTWAITSYNCKHRPROC)eglGetProcAddress("eglClientWaitSyncKHR"); + __funcEglDestroySyncKhr = (PFNEGLDESTROYSYNCKHRPROC)eglGetProcAddress("eglDestroySyncKHR"); + if (__funcEglCreateSyncKhr == null || __funcEglClientWaitSyncKhr == null || __funcEglDestroySyncKhr == null) + { + __isEglSyncAvailable = false; + SysLog(NID_GRP, "GL_OES_EGL_sync supported on this device, but function is not available! %#x %#x %#x" + , (unsigned int)__funcEglCreateSyncKhr + , (unsigned int)__funcEglClientWaitSyncKhr + , (unsigned int)__funcEglDestroySyncKhr); + } + else + { + __isEglSyncAvailable = true; + } + } + + __textureId = textureId; + + GLint maxTextureSize = 0; + if (__glVersion == 1) + { + _GlGetIntegerv_1(GL_MAX_TEXTURE_SIZE, &maxTextureSize); + } + else + { + _GlGetIntegerv_2(GL_MAX_TEXTURE_SIZE, &maxTextureSize); + } + + SysTryReturnResult(NID_GRP, width <= maxTextureSize && height <= maxTextureSize + , E_OUT_OF_RANGE, "w:%d h%d are bigger than GL_MAX_TEXTURE_SIZE:%d.", width, height, maxTextureSize); + + BufferInfo bufferInfo; + bufferInfo.width = width; + bufferInfo.height = height; + bufferInfo.bitsPerPixel = ecore_x_default_depth_get(ecore_x_display_get(), ecore_x_default_screen_get()); + + 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, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + __pBuffer[i].__nativePixmap = _CreateNativePixmapEx(__pBuffer[i].__pBitmap, bufferInfo); + __pBuffer[i].__eglImage = + funcEglCreateImageKhr(__eglDisplay, EGL_NO_CONTEXT, EGL_NATIVE_PIXMAP_KHR, + (EGLClientBuffer)__pBuffer[i].__nativePixmap, null); + SysTryCatch(NID_GRP, __pBuffer[i].__nativePixmap != (EGLNativePixmapType)0 && __pBuffer[i].__eglImage != (EGLImageKHR)0 + , r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "Creating native pixmap failed."); + } + + __pDamageEvent = new (std::nothrow)_DamageEvent; + 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)); + + __pDamageEvent->Start(); + + __pVideoTextureUpdateListener = new (std::nothrow) VideoTextureUpdateListenerList; + SysTryCatch(NID_GRP, __pVideoTextureUpdateListener != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + return r; + +CATCH: + Release(); + + return r; +} + +result +_VideoTexture::BindTexture(void) +{ + int oldestReadableBuffer = -1; + long long timeStamp = 0; + int count = 0; + SystemTime::GetTicks(timeStamp); + + //find the oldest buffer. + for (int i = 0; i < _VIDEO_TEXTURE_BUFFER_MAX; i++) + { + if (__pBuffer[i].__bufferState == _BUFFER_STATE_ENQUEUE) + { + if (__pBuffer[i].__timeStamp < timeStamp) + { + count++; + oldestReadableBuffer = i; + timeStamp = __pBuffer[i].__timeStamp; + } + } + } + + if (count == 0) + { + if (__currentReadingBuffer == -1) + { + SysLog(NID_GRP, "A video frame is not ready."); + return E_INVALID_STATE; + } + oldestReadableBuffer = __currentReadingBuffer; + } + else + { + if (__isEglSyncAvailable) + { + if (__pBuffer[__currentReadingBuffer].__eglSync == EGL_NO_SYNC_KHR) + { + __pBuffer[__currentReadingBuffer].__eglSync = __funcEglCreateSyncKhr(__eglDisplay, EGL_SYNC_FENCE_KHR, NULL);//EGL_SYNC_FENCE_KHR EGL_SYNC_REUSABLE_KHR + } + } + else + { + eglWaitGL(); + } + } + + __currentReadingBuffer = oldestReadableBuffer; + __pBuffer[oldestReadableBuffer].__bufferState = _BUFFER_STATE_FREE; + SystemTime::GetTicks(__pBuffer[oldestReadableBuffer].__timeStamp); + + if (__glVersion == 1) + { + _GlBindTexture_1(GL_TEXTURE_2D, __textureId); + } + else + { + _GlBindTexture_2(GL_TEXTURE_2D, __textureId); + } + + __funcGlEglImageTargetTexture2dOes(GL_TEXTURE_2D, __pBuffer[oldestReadableBuffer].__eglImage); + + return E_SUCCESS; +} + +void +_VideoTexture::AddVideoTextureUpdateListener(IVideoTextureUpdateListener& listener, VideoTexture* pVideoTexture) +{ + __pVideoTexture = pVideoTexture; + result r = __pVideoTextureUpdateListener->Add(const_cast (&listener)); + 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)); +} + +int +_VideoTexture::FindFreeBuffer(void) +{ + int oldestFreedBuffer = -1; + long long timeStamp = 0; + int count = 0; + SystemTime::GetTicks(timeStamp); + + for (int i = 0; i < _VIDEO_TEXTURE_BUFFER_MAX; i++) + { + if (__pBuffer[i].__bufferState == _BUFFER_STATE_FREE) + { + if (__pBuffer[i].__timeStamp < timeStamp) + { + count++; + oldestFreedBuffer = i; + timeStamp = __pBuffer[i].__timeStamp; + } + } + } + +#if defined (FGRAPHICS_INTERNAL_USE_THRESHOLD_EVENT_TIMER) + if (count == 0 || oldestFreedBuffer == __currentReadingBuffer) + { + for (int i = 0; i < _VIDEO_TEXTURE_BUFFER_MAX; i++) + { + if (__pBuffer[i].__bufferState == _BUFFER_STATE_DEQUEUE) + { + SystemTime::GetTicks(timeStamp); + if (timeStamp - __pBuffer[i].__timeStamp > _DEQUEUE_THRESHOLD_EVENT_TIME) + { + count++; + oldestFreedBuffer = i; + timeStamp = __pBuffer[i].__timeStamp; + __pBuffer[i].__bufferState = _BUFFER_STATE_FREE; + break; + } + } + } + } +#endif + + if (count == 0) + { + return -1; + } + else + { + return oldestFreedBuffer; + } +} + +Pixmap +_VideoTexture::GetPixmap(void) +{ + int oldestFreedBuffer = FindFreeBuffer(); + + if (oldestFreedBuffer == -1 || oldestFreedBuffer == __currentReadingBuffer) + { + return 0; + } + + if (__pBuffer[oldestFreedBuffer].__eglSync != EGL_NO_SYNC_KHR) + { + EGLint ret = __funcEglClientWaitSyncKhr(__eglDisplay, __pBuffer[oldestFreedBuffer].__eglSync + , EGL_SYNC_FLUSH_COMMANDS_BIT_KHR, EGL_FOREVER_KHR); + SysTryLog(NID_GRP, ret == EGL_CONDITION_SATISFIED_KHR, "eglClientWaitSyncKhr is not working."); + + __funcEglDestroySyncKhr(__eglDisplay, __pBuffer[oldestFreedBuffer].__eglSync); + __pBuffer[oldestFreedBuffer].__eglSync = EGL_NO_SYNC_KHR; + } + + __pBuffer[oldestFreedBuffer].__bufferState = _BUFFER_STATE_DEQUEUE; + SystemTime::GetTicks(__pBuffer[oldestFreedBuffer].__timeStamp); + + return (unsigned int)__pBuffer[oldestFreedBuffer].__nativePixmap; +} + +void +_VideoTexture::PixmapErrorCallback(unsigned int* pPixmap) +{ + if (pPixmap != null) + { + for (int i = 0; i < _VIDEO_TEXTURE_BUFFER_MAX; i++) + { + if ((unsigned int)this->__pBuffer[i].__nativePixmap == (unsigned int)*pPixmap) + { + this->__pBuffer[i].__bufferState = _BUFFER_STATE_FREE; + SystemTime::GetTicks(this->__pBuffer[i].__timeStamp); + return; + } + } + } +} + +bool +_VideoTexture::IsSupported(String string) +{ + char* pString = null; + if (__glVersion == 1) + { + pString = (char*)_GlGetString_1(GL_EXTENSIONS); + } + else + { + pString = (char*)_GlGetString_2(GL_EXTENSIONS); + } + String extensions(pString); + + return extensions.Contains(string); +} + +result +_VideoTexture::Release(void) +{ + if (__pDamageEvent != null) + { + __pDamageEvent->__keepRunning = false; + __pDamageEvent->Join(); + delete __pDamageEvent; + __pDamageEvent = null; + } + + delete __pVideoTextureUpdateListener; + __pVideoTextureUpdateListener = null; + + PFNEGLDESTROYIMAGEKHRPROC funcEglDestroyImageKhr = + (PFNEGLDESTROYIMAGEKHRPROC)eglGetProcAddress("eglDestroyImageKHR"); + + for (int i = 0; i < _VIDEO_TEXTURE_BUFFER_MAX; i++) + { + if (funcEglDestroyImageKhr != null && __pBuffer[i].__eglImage != EGL_NO_IMAGE_KHR) + { + funcEglDestroyImageKhr(__eglDisplay, __pBuffer[i].__eglImage); + __pBuffer[i].__eglImage = EGL_NO_IMAGE_KHR; + } + + if (__funcEglDestroySyncKhr != null && __pBuffer[i].__eglSync != EGL_NO_SYNC_KHR) + { + __funcEglDestroySyncKhr(__eglDisplay, __pBuffer[i].__eglSync); + __pBuffer[i].__eglSync = EGL_NO_SYNC_KHR; + } + + delete __pBuffer[i].__pBitmap; + __pBuffer[i].__pBitmap = null; + + __pBuffer[i].__nativePixmap = (EGLNativePixmapType)0; + __pBuffer[i].__timeStamp = 0; + __pBuffer[i].__bufferState = _BUFFER_STATE_FREE; + } + + return E_SUCCESS; +} + +}}} // Tizen::Graphics diff --git a/src/graphics/opengl/FGrp_VideoTexture.h b/src/graphics/opengl/FGrp_VideoTexture.h new file mode 100644 index 0000000..ee46bfe --- /dev/null +++ b/src/graphics/opengl/FGrp_VideoTexture.h @@ -0,0 +1,128 @@ +// +// 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_VideoTexture.h + * @brief This is the header file for VideoTexture class. + * + */ + +#ifndef _FGRP_INTERNAL_VIDEO_TEXTURE_H_ +#define _FGRP_INTERNAL_VIDEO_TEXTURE_H_ + +#include +#include + +#include +#include +#include +#include + +namespace Tizen { namespace Graphics { +class Bitmap; +}} + +namespace Tizen { namespace Graphics { namespace Opengl +{ + +const int _VIDEO_TEXTURE_BUFFER_MAX = 4; + +class VideoTexture; +class _VideoTexture; + +enum _BufferState +{ + _BUFFER_STATE_FREE = 0, + _BUFFER_STATE_DEQUEUE, + _BUFFER_STATE_ENQUEUE, +}; + +struct _VideoTextureBuffer +{ + Tizen::Graphics::Bitmap* __pBitmap; + EGLNativePixmapType __nativePixmap; + EGLImageKHR __eglImage; + long long __timeStamp; + _BufferState __bufferState; + EGLSyncKHR __eglSync; +}; + +class _DamageEvent + : public Tizen::Base::Runtime::Thread +{ +public: + _DamageEvent(void); + virtual ~_DamageEvent(void); + result Construct(_VideoTexture* pVideoTexture); + Object* Run(void); + +private: + Drawable __pixmap[_VIDEO_TEXTURE_BUFFER_MAX]; + Damage __damage[_VIDEO_TEXTURE_BUFFER_MAX]; + Display* __pDisplay; + int __eventBaseReturn; + _VideoTexture* __pVideoTexture; + bool __keepRunning; + + friend class _VideoTexture; +}; + +class _VideoTexture +{ +public: + _VideoTexture(void); + virtual ~_VideoTexture(void); + + result Construct(int textureId, int width, int height); + + result BindTexture(void); + void AddVideoTextureUpdateListener(IVideoTextureUpdateListener& listener, VideoTexture* pVideoTexture); + void RemoveVideoTextureUpdateListener(IVideoTextureUpdateListener& listener); + + bool IsSupported(Tizen::Base::String string); + Pixmap GetPixmap(void); + void PixmapErrorCallback(unsigned int* pPixmap); + +private: + _VideoTexture(const _VideoTexture& rhs); + _VideoTexture& operator =(const _VideoTexture& rhs); + +private: + result Release(void); + int FindFreeBuffer(void); + + _VideoTextureBuffer __pBuffer[_VIDEO_TEXTURE_BUFFER_MAX]; + int __textureId; + bool __isEglSyncAvailable; + int __glVersion; + EGLDisplay __eglDisplay; + PFNEGLCREATESYNCKHRPROC __funcEglCreateSyncKhr; + PFNEGLCLIENTWAITSYNCKHRPROC __funcEglClientWaitSyncKhr; + PFNEGLDESTROYSYNCKHRPROC __funcEglDestroySyncKhr; + PFNGLEGLIMAGETARGETTEXTURE2DOESPROC __funcGlEglImageTargetTexture2dOes; + _DamageEvent* __pDamageEvent; + VideoTexture* __pVideoTexture; + int __currentReadingBuffer; + typedef Tizen::Base::Collection::LinkedListT VideoTextureUpdateListenerList; + VideoTextureUpdateListenerList* __pVideoTextureUpdateListener; + + friend class _DamageEvent; +}; // _VideoTexture + +}}} // Tizen::Graphics + +#endif //_FGRP_INTERNAL_VIDEO_TEXTURE_H_ diff --git a/src/graphics/opengl/FGrp_VideoTextureImpl.cpp b/src/graphics/opengl/FGrp_VideoTextureImpl.cpp new file mode 100644 index 0000000..02364eb --- /dev/null +++ b/src/graphics/opengl/FGrp_VideoTextureImpl.cpp @@ -0,0 +1,108 @@ +// +// 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_VideoTextureImpl.cpp + * @brief This is the implementation file for internal VideoTextureImpl class. + * + */ + +#include + +#include +#include +#include "FGrp_VideoTextureImpl.h" +#include "FGrp_VideoTexture.h" + +namespace Tizen { namespace Graphics { namespace Opengl +{ + +_VideoTextureImpl::_VideoTextureImpl(void) + : __pNativeVideoTexture(new (std::nothrow)_VideoTexture) +{ +} + +_VideoTextureImpl::~_VideoTextureImpl(void) +{ + delete this->__pNativeVideoTexture; +} + +result +_VideoTextureImpl::Construct(int textureId, int width, int height) +{ + SysTryReturnResult(NID_GRP, this->__pNativeVideoTexture != null, E_OUT_OF_MEMORY, "Memory allocation failed.\n"); + + return this->__pNativeVideoTexture->Construct(textureId, width, height); +} + +result +_VideoTextureImpl::BindTexture(void) +{ + return this->__pNativeVideoTexture->BindTexture(); +} + +void +_VideoTextureImpl::AddVideoTextureUpdateListener(IVideoTextureUpdateListener& listener, VideoTexture* pVideoTexture) +{ + this->__pNativeVideoTexture->AddVideoTextureUpdateListener(listener, pVideoTexture); +} + +void +_VideoTextureImpl::RemoveVideoTextureUpdateListener(IVideoTextureUpdateListener& listener) +{ + this->__pNativeVideoTexture->RemoveVideoTextureUpdateListener(listener); +} + +_VideoTextureImpl* +_VideoTextureImpl::GetInstance(VideoTexture& videoTexture) +{ + return (&videoTexture != null) ? videoTexture.__pImpl : null; +} + +const _VideoTextureImpl* +_VideoTextureImpl::GetInstance(const VideoTexture& videoTexture) +{ + return (&videoTexture != null) ? videoTexture.__pImpl : null; +} + +unsigned int +_VideoTextureImpl::GetPixmap(void* pData) +{ + _VideoTextureImpl* pVideoTextureImpl = dynamic_cast<_VideoTextureImpl*> ((_VideoTextureImpl*)pData); + if (pVideoTextureImpl == null) + { + SysLog(NID_GRP, "pData is null."); + return 0; + } + + return (unsigned int)pVideoTextureImpl->__pNativeVideoTexture->GetPixmap(); +} + +void +_VideoTextureImpl::PixmapErrorCallback(unsigned int* pPixmap, void* pData) +{ + _VideoTextureImpl* pVideoTextureImpl = dynamic_cast<_VideoTextureImpl*> ((_VideoTextureImpl*)pData); + if (pVideoTextureImpl == null || pVideoTextureImpl->__pNativeVideoTexture == null) + { + SysLog(NID_GRP, "pData is null."); + return; + } + + pVideoTextureImpl->__pNativeVideoTexture->PixmapErrorCallback(pPixmap); +} + +}}} // Tizen::Graphics diff --git a/src/graphics/text/FGrp_TextTextColumn.cpp b/src/graphics/text/FGrp_TextTextColumn.cpp new file mode 100644 index 0000000..8c5d0a4 --- /dev/null +++ b/src/graphics/text/FGrp_TextTextColumn.cpp @@ -0,0 +1,2370 @@ +// +// 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_TextTextColumn.cpp + * @brief This is the implementation file for TextColumn class. + */ + +#include +#include +#include "FGrp_CanvasImpl.h" +#include "FGrp_TextCommon.h" +#include "FGrp_TextTextComposite.h" +#include "FGrp_TextTextLine.h" +#include "FGrp_TextTextColumn.h" +#include "FGrp_TextTextUtility.h" +#include "FGrp_CoordinateSystemUtils.h" + +using namespace Tizen::Base::Utility; + +namespace Tizen { namespace Graphics +{ + +namespace _Text +{ + +struct ChangeActionEventInfo +{ + TextColumn::ChangeAction action; + int changedTextIndex; + int changedTextLength; +}; + +TextColumn::TextColumn(TextComposite* pCompositeText) +{ + __totalLineCount = 0; + __displayLineCount = 0; + __firstDisplayLineIndex = 0; + __firstDisplayPositionY = -1; + __firstDisplayPositionX = -1; + __displayHeight = -1; + __slidingPosition = 0; + __pCompositeText = pCompositeText; + __textChangeAction = TEXT_CHANGE_INSERT; + __setChangeAction = false; + __pCachedLineNode = null; + __cachedLineIndex = 0; + __cachedLinePositionY = 0; + __chagedStartTextIndex = 0; + __changedTextLength = 0; + __changedStartLineIndex = 0; + __changedLastLineIndex = 0; + __prevLineIndexBeforeChangedStartLine = 0; + __nextLineIndexAfterChangedLastLine = 0; + __textOffsetOfNextLineAfterChangedLine = 0; + __currentLineIndexToAddDuringCompose = 0; + __isComposeDone = false; + + __pLines = new (std::nothrow) SimpleList; + if (__pLines) + { + TextSimpleList::Init(__pLines); + } + + __pTextChangeActionList = new (std::nothrow) SimpleList; + if (__pTextChangeActionList) + { + TextSimpleList::Init(__pTextChangeActionList); + } + + __pKeepLines = new (std::nothrow) SimpleList; + if (__pKeepLines) + { + TextSimpleList::Init(__pKeepLines); + } + + __keepLineCount = 0; + __insertedLineCountDuringCompose = 0; +} + +TextColumn::~TextColumn(void) +{ + if (__pLines) + { + RemoveAllLines(); + delete __pLines; + __pLines = null; + } + + if (__pKeepLines) + { + RemoveAllKeepLines(); + delete __pKeepLines; + __pKeepLines = null; + } + + if (__pTextChangeActionList) + { + RemoveAllChangeActions(); + delete __pTextChangeActionList; + __pTextChangeActionList = null; + } +} + +result +TextColumn::GetRegion(int textIndex, int textLength, float& width, float& height) const +{ + result r = E_SUCCESS; + + width = 0; + height = 0; + + int totalLength = __pCompositeText->GetTextLength(); + + if (textIndex != 0 || textLength != totalLength) + { + return __pCompositeText->GetRegion(textIndex, textLength, width, height); + } + + FloatRectangle lineBounds; + SimpleNode* pTextLineNode = null; + TextLine* pTextLine = null; + + pTextLineNode = TextSimpleList::GetFirstNode(__pLines); + while (pTextLineNode) + { + pTextLine = static_cast < TextLine* >(pTextLineNode->pObject); + SysTryReturn(NID_GRP, pTextLine, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + lineBounds = pTextLine->GetBoundsF(); + + width = (width > lineBounds.width) ? width : lineBounds.width; + height += lineBounds.height; + + pTextLineNode = pTextLineNode->pNext; + } + + return r; +} + +float +TextColumn::GetHeightF(int textIndex) const +{ + if (textIndex < 0) + { + return GetTotalHeightF(); + } + + return __pCompositeText->GetHeightF(textIndex); +} + +result +TextColumn::Draw(_CanvasImpl& canvasImpl, FloatRectangle& displayRect, int startTextIndex, int textLength, + const TextObjectAlignment alignment, const TextObjectActionType action) +{ + result r = E_SUCCESS; + TextLine* pTextLine = null; + SimpleNode* pTextLineNode = null; + TextObjectActionType lineAction = TEXT_OBJECT_ACTION_TYPE_NONE; + FloatRectangle lineBounds; + + __displayLineCount = 0; + __displayHeight = 0; + + pTextLineNode = TextSimpleList::GetNthNode(__pLines, __firstDisplayLineIndex); + if (pTextLineNode == null) + { + return E_SUCCESS; + } + + pTextLine = static_cast < TextLine* >(pTextLineNode->pObject); + SysTryReturn(NID_GRP, pTextLine, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + if (__pLines->nodeCount < pTextLine->GetIndex()) + { + return E_SUCCESS; + } + + lineBounds = pTextLine->GetBoundsF(); + + if (__firstDisplayPositionY != lineBounds.y) + { + displayRect.y -= __firstDisplayPositionY - lineBounds.y; + displayRect.height += __firstDisplayPositionY - lineBounds.y; + __displayHeight -= __firstDisplayPositionY - lineBounds.y; + } + + if (__firstDisplayPositionX > 0) + { + displayRect.x -= __firstDisplayPositionX; + } + + while (pTextLineNode != null && 0 <= displayRect.height) + { + if (action == TEXT_OBJECT_ACTION_TYPE_ABBREV) + { + TextLine* pNextTextLine = null; + if (pTextLineNode->pNext == null) + { + pNextTextLine = null; + } + else + { + pNextTextLine = static_cast < TextLine* >(pTextLineNode->pNext->pObject); + } + + if (pNextTextLine == null) + { + if (pTextLine->GetTextOffset() + pTextLine->GetTextLength() < __pCompositeText->GetTextLength()) + { + lineAction = TEXT_OBJECT_ACTION_TYPE_ABBREV; + } + + if (displayRect.width < lineBounds.width) + { + lineAction = TEXT_OBJECT_ACTION_TYPE_ABBREV; + } + } + else + { + FloatRectangle nextLineBounds; + if (__pLines->nodeCount < pNextTextLine->GetIndex()) + { + return E_SUCCESS; + } + + nextLineBounds = pNextTextLine->GetBoundsF(); + if (TextUtility::FloatCompareL(displayRect.height, lineBounds.height + nextLineBounds.height) == true) + { + lineAction = TEXT_OBJECT_ACTION_TYPE_ABBREV; + } + } + } + + int lineLength = pTextLine->GetTextLength(); + + TextObjectAlignment horizontalAlignment = (TextObjectAlignment)(alignment & TEXT_ALIGNMASK_HORIZ); + r = pTextLine->Draw(canvasImpl, displayRect, 0, lineLength, horizontalAlignment, lineAction); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __displayLineCount++; + + if (lineBounds.height <= displayRect.height) + { + displayRect.height -= lineBounds.height; + displayRect.y += lineBounds.height; + __displayHeight += lineBounds.height; + } + else + { + lineBounds.height += displayRect.height; + break; + } + + if (lineAction == TEXT_OBJECT_ACTION_TYPE_ABBREV) + { + break; + } + + pTextLineNode = pTextLineNode->pNext; + if (pTextLineNode == null) + { + break; + } + + pTextLine = static_cast < TextLine* >(pTextLineNode->pObject); + SysTryReturn(NID_GRP, pTextLine, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + if (__pLines->nodeCount < pTextLine->GetIndex()) + { + return E_SUCCESS; + } + + lineBounds = pTextLine->GetBoundsF(); + } + + return E_SUCCESS; +} + +result +TextColumn::CalculateDisplayableLineCount(FloatRectangle& displayRect, const TextObjectActionType action) +{ + int displayLineCount = 0; + + SimpleNode* pTextLineNode = TextSimpleList::GetNthNode(__pLines, __firstDisplayLineIndex); + if (pTextLineNode == null) + { + return E_SUCCESS; + } + + TextLine* pTextLine = static_cast < TextLine* >(pTextLineNode->pObject); + SysTryReturn(NID_GRP, pTextLine, -1, E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + if (__pLines->nodeCount < pTextLine->GetIndex()) + { + return -1; + } + + FloatRectangle lineBounds = pTextLine->GetBoundsF(); + + if (__firstDisplayPositionY != lineBounds.y) + { + displayRect.height += __firstDisplayPositionY - lineBounds.y; + } + + while (pTextLineNode != null && 0 <= displayRect.height) + { + if (action == TEXT_OBJECT_ACTION_TYPE_ABBREV) + { + TextLine* pNextTextLine = (pTextLineNode->pNext == null) ? null : static_cast < TextLine* >(pTextLineNode->pNext->pObject); + + if (pNextTextLine == null) + { + if (pTextLine->GetTextOffset() + pTextLine->GetTextLength() < __pCompositeText->GetTextLength()) + { + displayLineCount++; + return displayLineCount; + } + } + else + { + FloatRectangle nextLineBounds; + if (__pLines->nodeCount < pNextTextLine->GetIndex()) + { + return -1; + } + + nextLineBounds = pNextTextLine->GetBoundsF(); + if (displayRect.height < (lineBounds.height + nextLineBounds.height)) + { + displayLineCount++; + return displayLineCount; + } + } + } + + displayLineCount++; + + if (lineBounds.height < displayRect.height) + { + displayRect.height -= lineBounds.height; + } + else + { + break; + } + + pTextLineNode = pTextLineNode->pNext; + if (pTextLineNode == null) + { + break; + } + + pTextLine = static_cast < TextLine* >(pTextLineNode->pObject); + SysTryReturn(NID_GRP, pTextLine, -1, E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + if (__pLines->nodeCount < pTextLine->GetIndex()) + { + return -1; + } + + lineBounds = pTextLine->GetBoundsF(); + } + + return displayLineCount; +} + +int +TextColumn::GetTextLength(void) const +{ + return __pCompositeText->GetTextLength(); +} + +int +TextColumn::GetLineIndexAtTextIndex(int textIndex) const +{ + SimpleNode* pTextLineNode = null; + TextLine* pTextLine = null; + int lineIndex = 0; + int lineOffset = 0; + int lineLength = 0; + int lineEndType = TEXT_RETBY_NORMAL; + + pTextLineNode = TextSimpleList::GetFirstNode(__pLines); + if (textIndex == 0 && (pTextLineNode != null)) + { + return 0; + } + + while (pTextLineNode) + { + pTextLine = static_cast < TextLine* >(pTextLineNode->pObject); + SysTryReturn(NID_GRP, pTextLine, -1, E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + lineOffset = pTextLine->GetTextOffset(); + lineLength = pTextLine->GetTextLength(); + lineEndType = pTextLine->GetEndType(); + + if (lineOffset <= textIndex) + { + if (textIndex < lineOffset + lineLength) + { + return lineIndex; + } + } + + lineIndex++; + pTextLineNode = pTextLineNode->pNext; + } + + if (__pCompositeText->GetTextLength() == textIndex) + { + return lineIndex - 1; + } + + return -1; +} + +int +TextColumn::GetLineIndexAtPositionY(int y) +{ + SimpleNode* pTextLineNode = null; + TextLine* pTextLine = null; + + int lineIndex = 0; + FloatRectangle lineBounds; + + if (GetTotalLineCount() == 0) + { + return 0; + } + + if (__pCachedLineNode == null) + { + pTextLineNode = TextSimpleList::GetFirstNode(__pLines); + while (pTextLineNode) + { + pTextLine = static_cast < TextLine* >(pTextLineNode->pObject); + SysTryReturn(NID_GRP, pTextLine, -1, E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + lineBounds = pTextLine->GetBoundsF(); + + if (y >= lineBounds.y && y < lineBounds.y + lineBounds.height) + { + __pCachedLineNode = pTextLineNode; + __cachedLineIndex = lineIndex; + __cachedLinePositionY = lineBounds.y; + return lineIndex; + } + + lineIndex++; + pTextLineNode = pTextLineNode->pNext; + } + } + else + { + bool searchForward = true; + + if (__cachedLinePositionY < y) + { + searchForward = true; + } + else if (y < __cachedLinePositionY) + { + searchForward = false; + } + else + { + return __cachedLineIndex; + } + + pTextLineNode = __pCachedLineNode; + lineIndex = __cachedLineIndex; + while (pTextLineNode) + { + pTextLine = static_cast < TextLine* >(pTextLineNode->pObject); + SysTryReturn(NID_GRP, pTextLine, -1, E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + lineBounds = pTextLine->GetBoundsF(); + + if (y >= lineBounds.y && y < lineBounds.y + lineBounds.height) + { + __pCachedLineNode = pTextLineNode; + __cachedLineIndex = lineIndex; + __cachedLinePositionY = lineBounds.y; + + return lineIndex; + } + + if (searchForward) + { + lineIndex++; + pTextLineNode = pTextLineNode->pNext; + } + else + { + lineIndex--; + pTextLineNode = pTextLineNode->pPrev; + } + } + } + + return lineIndex; +} + +int +TextColumn::GetLineIndexAtPositionY(float y) +{ + return GetLineIndexAtPositionY(_CoordinateSystemUtils::ConvertToInteger(y)); +} + +int +TextColumn::GetTotalHeight(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetTotalHeightF()); +} + +float +TextColumn::GetTotalHeightF(void) const +{ + SimpleNode* pTextLineNode = null; + TextLine* pTextLine = null; + FloatRectangle lineBounds; + float height = 0; + + pTextLineNode = TextSimpleList::GetFirstNode(__pLines); + while (pTextLineNode) + { + pTextLine = static_cast < TextLine* >(pTextLineNode->pObject); + SysTryReturn(NID_GRP, pTextLine, 0, E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + lineBounds = pTextLine->GetBoundsF(); + + height += lineBounds.height; + pTextLineNode = pTextLineNode->pNext; + } + + return height; +} + +int +TextColumn::GetLineHeightAt(int index) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetLineHeightAtF(index)); +} + +float +TextColumn::GetLineHeightAtF(int index) const +{ + TextLine* pTextLine = null; + pTextLine = static_cast < TextLine* >(TextSimpleList::GetNthObject(__pLines, index)); + + SysTryReturn(NID_GRP, pTextLine, 0, E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + FloatRectangle lineRect; + lineRect = pTextLine->GetBoundsF(); + + return lineRect.height; +} + +int +TextColumn::GetTextLengthAt(int lineIndex) const +{ + TextLine* pTextLine = null; + + pTextLine = static_cast < TextLine* >(TextSimpleList::GetNthObject(__pLines, lineIndex)); + SysTryReturn(NID_GRP, pTextLine, 0, E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + return pTextLine->GetTextLength(); +} + +int +TextColumn::GetFirstTextIndexAt(int lineIndex) const +{ + TextLine* pTextLine = null; + + pTextLine = static_cast < TextLine* >(TextSimpleList::GetNthObject(__pLines, lineIndex)); + SysTryReturn(NID_GRP, pTextLine, 0, E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + return pTextLine->GetTextOffset(); +} + +result +TextColumn::Append(TextLine* pTextLine) +{ + SysTryReturn(NID_GRP, pTextLine, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + TextSimpleList::AppendObject(__pLines, pTextLine); + __totalLineCount++; + + return E_SUCCESS; +} + +result +TextColumn::RemoveAllLines(void) +{ + TextLine* pTextLine = null; + + while (1) + { + pTextLine = static_cast < TextLine* >(TextSimpleList::DeleteNthObject(__pLines, 0)); + if (pTextLine == null) + { + break; + } + + delete pTextLine; + pTextLine = null; + } + + __totalLineCount = 0; + + return E_SUCCESS; +} + +result +TextColumn::Remove(TextLine* pTextLine) +{ + SysTryReturn(NID_GRP + , pTextLine + , E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + int index = pTextLine->GetIndex(); + + SimpleNode* pNode = TextSimpleList::GetNthNode(__pLines, index); + SysTryReturn(NID_GRP + , pNode + , E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get node."); + + bool r = TextSimpleList::DeleteNode(__pLines, pNode); + if (r == true) + { + return E_SUCCESS; + } + else + { + return E_SYSTEM; + } +} + +TextLine* +TextColumn::GetTextLine(int lineIndex) const +{ + SysTryReturn(NID_GRP, 0 <= lineIndex || lineIndex < __totalLineCount + , null, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + TextLine* pTextLine = static_cast < TextLine* >(TextSimpleList::GetNthObject(__pLines, lineIndex)); + + return pTextLine; +} + +TextLine* +TextColumn::GetPrevTextLine(int lineIndex) const +{ + if (lineIndex < 0 || __keepLineCount <= lineIndex) + { + return null; + } + + TextLine* pTextLine = static_cast < TextLine* >(TextSimpleList::GetNthObject(__pKeepLines, lineIndex)); + + return pTextLine; +} + +result +TextColumn::SetChangeAction(ChangeAction changeAction, int textIndex, int textLength) +{ + SysTryReturn(NID_GRP + , changeAction == TEXT_CHANGE_INSERT || changeAction == TEXT_CHANGE_REMOVE || changeAction == TEXT_CHANGE_UNKONWN + , E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + SysTryReturn(NID_GRP + , 0 <= textIndex + , E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + int textIndexBeforeChanged = textIndex; + int textLengthBeforeChanged = textLength; + int textIndexAfterChanged = 0; + int textLengthAfterChanged = 0; + + ChangeActionEventInfo* pChangeActionEventInfo = null; + SimpleNode* pCurrentChangeActionEventInfoNode = null; + ChangeActionEventInfo* pCurrentChangeActionEventInfo = null; + int currentChangeActionEventInfoIndex = 0; + + pCurrentChangeActionEventInfoNode = TextSimpleList::GetFirstNode(__pTextChangeActionList); + if (pCurrentChangeActionEventInfoNode) + { + pCurrentChangeActionEventInfo = static_cast < ChangeActionEventInfo* >(pCurrentChangeActionEventInfoNode->pObject); + } + + while (pCurrentChangeActionEventInfo) + { + bool isLineInserted = false; + bool isActionCollapsed = false; + ActionProcessResult actionEventResult = DoProcessTextAction(changeAction, textIndexBeforeChanged, + textLengthBeforeChanged, pCurrentChangeActionEventInfo, textIndexAfterChanged, textLengthAfterChanged); + + switch (actionEventResult) + { + case BEFORE_ACTION: + isLineInserted = true; + break; + + case MERGE_AND_BEFORE_ACTION: + isLineInserted = true; + textLengthBeforeChanged = textLengthAfterChanged; + break; + + case AFTER_ACTION: + textIndexBeforeChanged = textIndexAfterChanged; + break; + + case MERGE_ACTION: + textLengthBeforeChanged = -1; + break; + + case MERGE_AND_AFTER_ACTION: + textIndexBeforeChanged = textIndexAfterChanged; + textLengthBeforeChanged = textLengthAfterChanged; + break; + + case COLLAPSE_ACTION: + isActionCollapsed = true; + textLengthBeforeChanged = textLengthAfterChanged; + break; + + case ERROR_ACTION: + return false; + } + + if (isActionCollapsed) + { + TextSimpleList::DeleteNthObject(__pTextChangeActionList, currentChangeActionEventInfoIndex); + delete pCurrentChangeActionEventInfo; + pCurrentChangeActionEventInfo = null; + + if (textLengthBeforeChanged == 0) + { + textLengthBeforeChanged = -1; + break; + } + + pCurrentChangeActionEventInfoNode = TextSimpleList::GetNthNode(__pTextChangeActionList, + currentChangeActionEventInfoIndex); + if (pCurrentChangeActionEventInfoNode) + { + pCurrentChangeActionEventInfo = static_cast < ChangeActionEventInfo* >(pCurrentChangeActionEventInfoNode->pObject); + } + + continue; + } + + if (isLineInserted) + { + pChangeActionEventInfo = new (std::nothrow)ChangeActionEventInfo; + SysTryReturn(NID_GRP + , pChangeActionEventInfo + , E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pChangeActionEventInfo->action = changeAction; + pChangeActionEventInfo->changedTextIndex = textIndexBeforeChanged; + pChangeActionEventInfo->changedTextLength = textLengthBeforeChanged; + TextSimpleList::InsertObject(__pTextChangeActionList, pChangeActionEventInfo, + currentChangeActionEventInfoIndex); + + textLengthBeforeChanged = -1; + break; + } + + if (textLengthBeforeChanged < 0) + { + break; + } + + pCurrentChangeActionEventInfo = null; + + currentChangeActionEventInfoIndex++; + pCurrentChangeActionEventInfoNode = pCurrentChangeActionEventInfoNode->pNext; + if (pCurrentChangeActionEventInfoNode) + { + pCurrentChangeActionEventInfo = static_cast < ChangeActionEventInfo* >(pCurrentChangeActionEventInfoNode->pObject); + } + } + + if (0 <= textLengthBeforeChanged) + { + pChangeActionEventInfo = new (std::nothrow)ChangeActionEventInfo; + SysTryReturn(NID_GRP + , pChangeActionEventInfo + , E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pChangeActionEventInfo->action = changeAction; + pChangeActionEventInfo->changedTextIndex = textIndexBeforeChanged; + pChangeActionEventInfo->changedTextLength = textLengthBeforeChanged; + TextSimpleList::AppendObject(__pTextChangeActionList, pChangeActionEventInfo); + } + + __setChangeAction = true; + + return E_SUCCESS; +} + +int +TextColumn::GetChangedStrStartIndex(void) const +{ + SysTryReturn(NID_GRP + , __setChangeAction + , -1, E_INVALID_STATE, "[E_INVALID_STATE] This instance is set change action list yet."); + + ChangeActionEventInfo* pChangeActionEventInfo = null; + pChangeActionEventInfo = static_cast < ChangeActionEventInfo* >(TextSimpleList::GetFirstObject(__pTextChangeActionList)); + + if (pChangeActionEventInfo == null) + { + return -1; + } + + return pChangeActionEventInfo->changedTextIndex; +} + +result +TextColumn::PrepareCompose(void) +{ + __isComposeDone = false; + __pCachedLineNode = null; + + if (!__setChangeAction) + { + RemoveAllLines(); + __currentLineIndexToAddDuringCompose = 0; + __textOffsetOfNextLineAfterChangedLine = -1; + + return E_SUCCESS; + } + + result r = E_SUCCESS; + int textChangedStartIndex = 0; + int textChangedEndIndex = 0; + int textChangedLength = 0; + bool hasETCAction = false; + + r = GetTextChangedInfo(textChangedStartIndex, textChangedEndIndex, textChangedLength, hasETCAction); + SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = UpdateCompositionInfo(textChangedStartIndex, textChangedEndIndex, textChangedLength, hasETCAction); + SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + if (__changedLastLineIndex != -1) + { + SysTryReturn(NID_GRP, __changedStartLineIndex != -1, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to update information."); + + int count = __changedLastLineIndex - __changedStartLineIndex + 1; + + KeepLines(__changedStartLineIndex - 1, count + 1); + RemoveLines(__changedStartLineIndex, count); + } + else + { + if (__changedStartLineIndex == -1) + { + RemoveAllLines(); + __currentLineIndexToAddDuringCompose = 0; + } + else + { + KeepLines( __prevLineIndexBeforeChangedStartLine, __totalLineCount - __prevLineIndexBeforeChangedStartLine); + + RemoveLinesFrom(__changedStartLineIndex); + __changedLastLineIndex = __changedStartLineIndex; + } + } + + if (__prevLineIndexBeforeChangedStartLine >= 0) + { + __currentLineIndexToAddDuringCompose = __prevLineIndexBeforeChangedStartLine + 1; + } + else + { + __currentLineIndexToAddDuringCompose = 0; + } + + return E_SUCCESS; + +CATCH: + RemoveAllLines(); + __currentLineIndexToAddDuringCompose = 0; + __textOffsetOfNextLineAfterChangedLine = -1; + __nextLineIndexAfterChangedLastLine = -1; + + return r; +} + +result +TextColumn::AddLineDuringCompose(TextLine* pTextLine) +{ + SysTryReturn(NID_GRP, pTextLine, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + if (!__setChangeAction) + { + SimpleNode* pTextLineNode = TextSimpleList::InsertObject(__pLines, pTextLine, __currentLineIndexToAddDuringCompose); + if (pTextLineNode == null) + { + delete pTextLine; + pTextLine = null; + + return E_SYSTEM; + } + + pTextLine->SetIndex(__currentLineIndexToAddDuringCompose); + __currentLineIndexToAddDuringCompose++; + __totalLineCount++; + + return E_SUCCESS; + } + + TextSimpleList::InsertObject(__pLines, pTextLine, __currentLineIndexToAddDuringCompose); + + pTextLine->SetIndex(__currentLineIndexToAddDuringCompose); + __currentLineIndexToAddDuringCompose++; + __insertedLineCountDuringCompose++; + __totalLineCount++; + + if (__textOffsetOfNextLineAfterChangedLine == -1) + { + return E_SUCCESS; + } + + int lineOffset = pTextLine->GetTextOffset(); + int lineLength = pTextLine->GetTextLength(); + int lineEndType = pTextLine->GetEndType(); + + if (lineOffset + lineLength == __textOffsetOfNextLineAfterChangedLine) + { + TextElementType nextObjectType = __pCompositeText->GetObjectType(__textOffsetOfNextLineAfterChangedLine); + + if (nextObjectType == TEXT_ELEMENT_TYPE_TEXT || nextObjectType == TEXT_ELEMENT_TYPE_CUTLINK || + nextObjectType == TEXT_ELEMENT_TYPE_NONE) + { + if (lineEndType == TEXT_RETBY_LINEFEED) + { + __isComposeDone = true; + } + } + else + { + if (lineEndType == TEXT_RETBY_LINEFEED) + { + if (lineLength == 0) + { + __isComposeDone = true; + } + } + else + { + __isComposeDone = true; + } + } + } + + return E_SUCCESS; +} + +result +TextColumn::CheckComposeDone(TextLine* pTextLine) +{ + SysTryReturn(NID_GRP, pTextLine, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + int lineOffset = pTextLine->GetTextOffset(); + int lineLength = pTextLine->GetTextLength(); + int lineEndType = pTextLine->GetEndType(); + + if (lineOffset + lineLength == __textOffsetOfNextLineAfterChangedLine) + { + TextElementType nextObjectType = __pCompositeText->GetObjectType(__textOffsetOfNextLineAfterChangedLine); + + if (nextObjectType == TEXT_ELEMENT_TYPE_TEXT || nextObjectType == TEXT_ELEMENT_TYPE_CUTLINK || + nextObjectType == TEXT_ELEMENT_TYPE_NONE) + { + if (lineEndType == TEXT_RETBY_LINEFEED) + { + __isComposeDone = true; + } + } + else + { + if (lineEndType == TEXT_RETBY_LINEFEED) + { + if (lineLength == 0) + { + __isComposeDone = true; + } + } + else + { + __isComposeDone = true; + } + } + } + + return E_SUCCESS; +} + +bool +TextColumn::IsComposeDone(void) +{ + return __isComposeDone; +} + +result +TextColumn::FinishCompose(bool isUpdateSweepInfo) +{ + __setChangeAction = false; + __isComposeDone = true; + + RemoveAllChangeActions(); + + if (__nextLineIndexAfterChangedLastLine < 0) + { + if (isUpdateSweepInfo) + { + UpdateSweepInfo(); + } + + RemoveAllKeepLines(); + __insertedLineCountDuringCompose = 0; + + return E_SUCCESS; + } + + int changedTextLength = __changedTextLength; + + SimpleNode* pTextLineNode = null; + TextLine* pTextLine = null; + FloatRectangle lineBounds; + + if (__currentLineIndexToAddDuringCompose == 0) + { + if (isUpdateSweepInfo) + { + UpdateSweepInfo(); + } + + RemoveAllKeepLines(); + __insertedLineCountDuringCompose = 0; + + return E_SUCCESS; + } + + pTextLineNode = TextSimpleList::GetNthNode(__pLines, __currentLineIndexToAddDuringCompose - 1); + SysTryReturn(NID_GRP, pTextLineNode, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line node."); + + pTextLine = static_cast < TextLine* >(pTextLineNode->pObject); + SysTryReturn(NID_GRP, pTextLine, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + lineBounds = pTextLine->GetBoundsF(); + float nextLineY = lineBounds.y + lineBounds.height; + + pTextLineNode = TextSimpleList::GetNthNode(__pLines, __currentLineIndexToAddDuringCompose); + + while (pTextLineNode != null) + { + pTextLine = static_cast < TextLine* >(pTextLineNode->pObject); + SysTryReturn(NID_GRP, pTextLine, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + int lineOffset = pTextLine->GetTextOffset(); + lineOffset += changedTextLength; + lineBounds = pTextLine->GetBoundsF(); + lineBounds.y = nextLineY; + nextLineY += lineBounds.height; + + pTextLine->SetTextOffset(lineOffset); + pTextLine->SetBounds(lineBounds); + pTextLine->SetIndex(__currentLineIndexToAddDuringCompose); + __currentLineIndexToAddDuringCompose++; + + pTextLineNode = pTextLineNode->pNext; + } + + if (isUpdateSweepInfo) + { + UpdateSweepInfo(); + } + + RemoveAllKeepLines(); + __insertedLineCountDuringCompose = 0; + + return E_SUCCESS; +} + +TextLine* +TextColumn::GetPrevLineChangedStartLine(void) const +{ + SysTryReturn(NID_GRP, __setChangeAction, null, E_INVALID_STATE + , "[E_INVALID_STATE] This instance is set change action list yet."); + + if (__prevLineIndexBeforeChangedStartLine < 0) + { + return null; + } + + TextLine* pTextLine = GetTextLine(__prevLineIndexBeforeChangedStartLine); + SysTryReturn(NID_GRP, pTextLine, null, E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + SetLastResult(E_SUCCESS); + + return pTextLine; +} + +result +TextColumn::RemoveLines(int lineIndex, int lineCount) +{ + SysTryReturn(NID_GRP + , 0 <= lineIndex || lineCount <= __totalLineCount + , E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + SimpleNode* pNextTextLineNode = null; + SimpleNode* pTextLineNode = null; + TextLine* pTextLine = null; + int count = 0; + + pTextLineNode = TextSimpleList::GetNthNode(__pLines, lineIndex); + + while ((pTextLineNode != null) && (count < lineCount)) + { + pTextLine = static_cast < TextLine* >(pTextLineNode->pObject); + pNextTextLineNode = pTextLineNode->pNext; + + TextSimpleList::DeleteNode(__pLines, pTextLineNode); + + if (pTextLine != null) + { + delete pTextLine; + pTextLine = null; + } + + count++; + pTextLineNode = pNextTextLineNode; + } + + __totalLineCount -= count; + + return E_SUCCESS; +} + +int +TextColumn::GetChangeActionEventCount(void) const +{ + return __pTextChangeActionList->nodeCount; +} + +result +TextColumn::RemoveLinesFrom(int lineIndex) +{ + SysTryReturn(NID_GRP, 0 <= lineIndex, E_INVALID_ARG, E_INVALID_ARG + , "[E_INVALID_ARG] The argument is invalid."); + + TextLine* pTextLine = null; + int count = 0; + + pTextLine = static_cast < TextLine* >(TextSimpleList::DeleteNthObject(__pLines, lineIndex)); + while (pTextLine) + { + delete pTextLine; + pTextLine = static_cast < TextLine* >(TextSimpleList::DeleteNthObject(__pLines, lineIndex)); + count++; + } + + __totalLineCount -= count; + + return E_SUCCESS; +} + +void +TextColumn::RemoveAllChangeActions(void) +{ + ChangeActionEventInfo* pChangeActionEventInfo = null; + + pChangeActionEventInfo = static_cast < ChangeActionEventInfo* >(TextSimpleList::DeleteNthObject(__pTextChangeActionList, 0)); + while (pChangeActionEventInfo) + { + delete pChangeActionEventInfo; + pChangeActionEventInfo = static_cast < ChangeActionEventInfo* >(TextSimpleList::DeleteNthObject(__pTextChangeActionList, 0)); + } +} + +result +TextColumn::GetTextChangedInfo(int& changedStartTextIndex, int& changedEndTextIndex, int& changedTextLength, + bool& existUnkownAction) const +{ + SimpleNode* pChangeActionEventNode = null; + ChangeActionEventInfo* pChangeActionEventInfo = null; + + pChangeActionEventNode = TextSimpleList::GetFirstNode(__pTextChangeActionList); + SysTryReturn(NID_GRP + , pChangeActionEventNode + , E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get change action event information node."); + + pChangeActionEventInfo = static_cast < ChangeActionEventInfo* >(pChangeActionEventNode->pObject); + SysTryReturn(NID_GRP + , pChangeActionEventInfo + , E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get change action event information."); + + changedTextLength = 0; + changedStartTextIndex = -1; + changedEndTextIndex = -1; + existUnkownAction = false; + + while (pChangeActionEventInfo) + { + switch (pChangeActionEventInfo->action) + { + case TEXT_CHANGE_INSERT: + if (changedStartTextIndex == -1) + { + changedStartTextIndex = pChangeActionEventInfo->changedTextIndex; + } + changedTextLength += pChangeActionEventInfo->changedTextLength; + changedEndTextIndex = pChangeActionEventInfo->changedTextIndex; + break; + + case TEXT_CHANGE_REMOVE: + if (changedStartTextIndex == -1) + { + changedStartTextIndex = pChangeActionEventInfo->changedTextIndex; + } + changedTextLength -= pChangeActionEventInfo->changedTextLength; + changedEndTextIndex = pChangeActionEventInfo->changedTextIndex + pChangeActionEventInfo->changedTextLength; + break; + + case TEXT_CHANGE_UNKONWN: + existUnkownAction = true; + if (changedStartTextIndex == -1) + { + changedStartTextIndex = pChangeActionEventInfo->changedTextIndex; + } + break; + + default: + // fall through + return E_SYSTEM; + } + + pChangeActionEventNode = pChangeActionEventNode->pNext; + if (pChangeActionEventNode == null) + { + break; + } + + pChangeActionEventInfo = static_cast < ChangeActionEventInfo* >(pChangeActionEventNode->pObject); + } + + return E_SUCCESS; +} + +result +TextColumn::UpdateCompositionInfo(int changedStartTextIndex, int changedEndTextIndex, int changedTextLength, + bool existUnkownAction) +{ + __chagedStartTextIndex = changedStartTextIndex; + __changedTextLength = changedTextLength; + + int firstChangedLineIndex = GetLineIndexAtTextIndex(__chagedStartTextIndex); + if (firstChangedLineIndex == -1) + { + if (__chagedStartTextIndex + __changedTextLength >= __pCompositeText->GetTextLength()) + { + firstChangedLineIndex = __totalLineCount - 1; + } + else + { + firstChangedLineIndex = -1; + } + } + + __changedStartLineIndex = firstChangedLineIndex; + + if (__changedStartLineIndex == -1) + { + __nextLineIndexAfterChangedLastLine = -1; + __textOffsetOfNextLineAfterChangedLine = -1; + __changedLastLineIndex = -1; + __prevLineIndexBeforeChangedStartLine = -1; + return E_SUCCESS; + } + + __prevLineIndexBeforeChangedStartLine = __changedStartLineIndex - 1; + + if (__changedStartLineIndex == __totalLineCount - 1) + { + __nextLineIndexAfterChangedLastLine = -1; + __textOffsetOfNextLineAfterChangedLine = -1; + __changedLastLineIndex = -1; + return E_SUCCESS; + } + + if (existUnkownAction) + { + __changedLastLineIndex = __totalLineCount - 1; + __nextLineIndexAfterChangedLastLine = -1; + __textOffsetOfNextLineAfterChangedLine = -1; + return E_SUCCESS; + } + + int lastChangedLineIndex = GetLineIndexAtTextIndex(changedEndTextIndex); + if (lastChangedLineIndex == -1) + { + __changedLastLineIndex = __totalLineCount - 1; + __nextLineIndexAfterChangedLastLine = -1; + __textOffsetOfNextLineAfterChangedLine = -1; + return E_SUCCESS; + } + + int nextLineIndexAfterChangedLineCandidate = lastChangedLineIndex; + + __nextLineIndexAfterChangedLastLine = -1; + + SimpleNode* pTextLineNode = null; + TextLine* pTextLine = null; + + pTextLineNode = TextSimpleList::GetNthNode(__pLines, nextLineIndexAfterChangedLineCandidate); + while (pTextLineNode) + { + pTextLine = static_cast < TextLine* >(pTextLineNode->pObject); + SysTryReturn(NID_GRP + , pTextLine + , E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + int lineEndType = pTextLine->GetEndType(); + if ((lineEndType == TEXT_RETBY_LINEFEED) && (pTextLine->GetTextLength() != 0)) + { + pTextLineNode = pTextLineNode->pNext; + if (pTextLineNode == null) + { + break; + } + + pTextLine = static_cast < TextLine* >(pTextLineNode->pObject); + SysTryReturn(NID_GRP + , pTextLine + , E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + __nextLineIndexAfterChangedLastLine = nextLineIndexAfterChangedLineCandidate + 1; + break; + } + + pTextLineNode = pTextLineNode->pNext; + nextLineIndexAfterChangedLineCandidate++; + } + + if (__nextLineIndexAfterChangedLastLine > 0) + { + __textOffsetOfNextLineAfterChangedLine = pTextLine->GetTextOffset(); + __textOffsetOfNextLineAfterChangedLine += __changedTextLength; + __changedLastLineIndex = __nextLineIndexAfterChangedLastLine - 1; + } + else + { + __textOffsetOfNextLineAfterChangedLine = -1; + __changedLastLineIndex = __totalLineCount - 1; + } + + return E_SUCCESS; +} + +TextColumn::ActionProcessResult +TextColumn::DoProcessTextAction(ChangeAction inputAction, int textIndex, int textLength, + ChangeActionEventInfo* pCurrentStrActionEventInfo, int& changedStartTextIndex, + int& strOutputChangedNum) +{ + switch (inputAction) + { + case TextColumn::TEXT_CHANGE_INSERT: + { + switch (pCurrentStrActionEventInfo->action) + { + case TextColumn::TEXT_CHANGE_INSERT: + return DoProcessInsertThroughInsert(textIndex, textLength, pCurrentStrActionEventInfo, + changedStartTextIndex); + + case TextColumn::TEXT_CHANGE_REMOVE: + return DoProcessInsertThroughRemove(textIndex, pCurrentStrActionEventInfo, changedStartTextIndex); + + case TextColumn::TEXT_CHANGE_UNKONWN: + changedStartTextIndex = textIndex; + return DoProcessInsertThroughUnkown(textIndex, pCurrentStrActionEventInfo); + + default: + break; + } + } + break; + + case TextColumn::TEXT_CHANGE_REMOVE: + { + switch (pCurrentStrActionEventInfo->action) + { + case TextColumn::TEXT_CHANGE_INSERT: + return DoProcessRemoveThroughInsert(textIndex, textLength, pCurrentStrActionEventInfo, + changedStartTextIndex, strOutputChangedNum); + + case TextColumn::TEXT_CHANGE_REMOVE: + return DoProcessRemoveThroughRemove(textIndex, pCurrentStrActionEventInfo, changedStartTextIndex); + + case TextColumn::TEXT_CHANGE_UNKONWN: + changedStartTextIndex = textIndex; + return DoProcessRemoveThroughUnkown(textIndex, pCurrentStrActionEventInfo); + + default: + break; + } + } + break; + + case TextColumn::TEXT_CHANGE_UNKONWN: + { + switch (pCurrentStrActionEventInfo->action) + { + case TextColumn::TEXT_CHANGE_INSERT: + return DoProcessUnkownThroughInsert(textIndex, pCurrentStrActionEventInfo, changedStartTextIndex); + + case TextColumn::TEXT_CHANGE_REMOVE: + return DoProcessUnkownThroughRemove(textIndex, pCurrentStrActionEventInfo, changedStartTextIndex); + + case TextColumn::TEXT_CHANGE_UNKONWN: + changedStartTextIndex = textIndex; + return DoProcessUnknownThroughUnknown(textIndex, pCurrentStrActionEventInfo); + + default: + break; + } + } + break; + + default: + break; + } + + return ERROR_ACTION; +} + +TextColumn::ActionProcessResult +TextColumn::DoProcessUnknownThroughUnknown(int textIndex, ChangeActionEventInfo* pCurrentActionEventInfo) +{ + if (textIndex < pCurrentActionEventInfo->changedTextIndex) + { + return BEFORE_ACTION; + } + else if (textIndex == pCurrentActionEventInfo->changedTextIndex) + { + return MERGE_ACTION; + } + else + { + return AFTER_ACTION; + } +} + +TextColumn::ActionProcessResult +TextColumn::DoProcessUnkownThroughInsert(int textIndex, ChangeActionEventInfo* pCurrentActionEventInfo, + int& changedStartTextIndex) +{ + if (textIndex < pCurrentActionEventInfo->changedTextIndex) + { + changedStartTextIndex = textIndex; + return BEFORE_ACTION; + } + + if (textIndex < pCurrentActionEventInfo->changedTextIndex + pCurrentActionEventInfo->changedTextLength) + { + changedStartTextIndex = pCurrentActionEventInfo->changedTextIndex; + return BEFORE_ACTION; + } + + changedStartTextIndex = textIndex - pCurrentActionEventInfo->changedTextLength; + return AFTER_ACTION; +} + +TextColumn::ActionProcessResult +TextColumn::DoProcessUnkownThroughRemove(int textIndex, ChangeActionEventInfo* pCurrentActionEventInfo, + int& changedStartTextIndex) +{ + if (textIndex < pCurrentActionEventInfo->changedTextIndex) + { + changedStartTextIndex = textIndex; + return BEFORE_ACTION; + } + + changedStartTextIndex = textIndex + pCurrentActionEventInfo->changedTextLength; + return AFTER_ACTION; +} + +TextColumn::ActionProcessResult +TextColumn::DoProcessInsertThroughUnkown(int textIndex, ChangeActionEventInfo* pCurrentActionEventInfo) +{ + if (textIndex < pCurrentActionEventInfo->changedTextIndex) + { + return BEFORE_ACTION; + } + + return AFTER_ACTION; +} + +TextColumn::ActionProcessResult +TextColumn::DoProcessInsertThroughInsert(int textIndex, int textLength, ChangeActionEventInfo* pCurrentActionEventInfo, + int& changedStartTextIndex) +{ + if (textIndex < pCurrentActionEventInfo->changedTextIndex) + { + return BEFORE_ACTION; + } + + if (textIndex <= pCurrentActionEventInfo->changedTextIndex + pCurrentActionEventInfo->changedTextLength) + { + pCurrentActionEventInfo->changedTextLength += textLength; + return MERGE_ACTION; + } + + changedStartTextIndex = textIndex - pCurrentActionEventInfo->changedTextLength; + return AFTER_ACTION; +} + +TextColumn::ActionProcessResult +TextColumn::DoProcessInsertThroughRemove(int textIndex, ChangeActionEventInfo* pCurrentActionEventInfo, + int& changedStartTextIndex) +{ + if (textIndex < pCurrentActionEventInfo->changedTextIndex) + { + return BEFORE_ACTION; + } + + changedStartTextIndex = textIndex + pCurrentActionEventInfo->changedTextLength; + return AFTER_ACTION; +} + +TextColumn::ActionProcessResult +TextColumn::DoProcessRemoveThroughUnkown(int textIndex, ChangeActionEventInfo* pCurrentActionEventInfo) +{ + if (textIndex < pCurrentActionEventInfo->changedTextIndex) + { + return BEFORE_ACTION; + } + + return AFTER_ACTION; +} + +TextColumn::ActionProcessResult +TextColumn::DoProcessRemoveThroughInsert(int textIndex, int textLength, + ChangeActionEventInfo* pCurrentActionEventInfo, int& changedStartTextIndex, + int& strOutputChangedNum) +{ + if (textIndex + textLength <= pCurrentActionEventInfo->changedTextIndex) + { + return BEFORE_ACTION; + } + + if (textIndex >= pCurrentActionEventInfo->changedTextIndex + pCurrentActionEventInfo->changedTextLength) + { + changedStartTextIndex = textIndex - pCurrentActionEventInfo->changedTextLength; + + return AFTER_ACTION; + } + + if ((textIndex <= pCurrentActionEventInfo->changedTextIndex) && + (textIndex + textLength >= pCurrentActionEventInfo->changedTextIndex + + pCurrentActionEventInfo->changedTextLength)) + { + changedStartTextIndex = textIndex; + strOutputChangedNum = textLength - pCurrentActionEventInfo->changedTextLength; + + return COLLAPSE_ACTION; + } + + if ((textIndex >= pCurrentActionEventInfo->changedTextIndex) && + (textIndex + textLength <= pCurrentActionEventInfo->changedTextIndex + + pCurrentActionEventInfo->changedTextLength)) + { + pCurrentActionEventInfo->changedTextLength -= textLength; + return MERGE_ACTION; + } + + if ((textIndex < pCurrentActionEventInfo->changedTextIndex) && + (textIndex + textLength > pCurrentActionEventInfo->changedTextIndex)) + { + int mergedLength = textIndex + textLength - pCurrentActionEventInfo->changedTextIndex; + pCurrentActionEventInfo->changedTextLength -= mergedLength; + strOutputChangedNum -= mergedLength; + return MERGE_AND_BEFORE_ACTION; + } + + if ((textIndex >= pCurrentActionEventInfo->changedTextIndex) && + (textIndex < pCurrentActionEventInfo->changedTextIndex + pCurrentActionEventInfo->changedTextLength)) + { + int mergedLength = pCurrentActionEventInfo->changedTextIndex + pCurrentActionEventInfo->changedTextLength + - textIndex; + pCurrentActionEventInfo->changedTextLength -= mergedLength; + changedStartTextIndex = textIndex + 1; + strOutputChangedNum -= mergedLength; + return MERGE_AND_AFTER_ACTION; + } + + return ERROR_ACTION; +} + +TextColumn::ActionProcessResult +TextColumn::DoProcessRemoveThroughRemove(int textIndex, ChangeActionEventInfo* pCurrentActionEventInfo, + int& changedStartTextIndex) +{ + if (textIndex < pCurrentActionEventInfo->changedTextIndex) + { + return BEFORE_ACTION; + } + + changedStartTextIndex += pCurrentActionEventInfo->changedTextLength; + return AFTER_ACTION; +} + +int +TextColumn::GetTotalLineCount(void) const +{ + return __totalLineCount; +} + +int +TextColumn::GetDisplayLineCount(void) const +{ + return __displayLineCount; +} + +void +TextColumn::SetDisplayLineCount(int displayLineCount) +{ + __displayLineCount = displayLineCount; +} + +void +TextColumn::SetFirstDisplayLineIndex(int lineIndex) +{ + __firstDisplayLineIndex = lineIndex; +} + +int +TextColumn::GetFirstDisplayLineIndex(void) const +{ + return __firstDisplayLineIndex; +} + +void +TextColumn::SetFirstDisplayPositionY(int y) +{ + __firstDisplayPositionY = _CoordinateSystemUtils::ConvertToFloat(y); +} + +void +TextColumn::SetFirstDisplayPositionY(float y) +{ + __firstDisplayPositionY = y; +} + +int +TextColumn::GetFirstDisplayPositionY(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(__firstDisplayPositionY); +} + +float +TextColumn::GetFirstDisplayPositionYF(void) const +{ + return __firstDisplayPositionY; +} + +void +TextColumn::SetFirstDisplayPositionX(float x) +{ + __firstDisplayPositionX = x; +} + +float +TextColumn::GetFirstDisplayPositionX(void) const +{ + return __firstDisplayPositionX; +} + +void +TextColumn::SetDisplayHeight(int height) +{ + __displayHeight = _CoordinateSystemUtils::ConvertToFloat(height); +} + +void +TextColumn::SetDisplayHeight(float height) +{ + __displayHeight = height; +} + +int +TextColumn::GetDisplayHeight(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(__displayHeight); +} + +float +TextColumn::GetDisplayHeightF(void) const +{ + return __displayHeight; +} + +SimpleNode* +TextColumn::GetTextLineNode(int lineIndex) const +{ + return TextSimpleList::GetNthNode(__pLines, lineIndex); +} + +result +TextColumn::SetSlidingDimension(Dimension& slidingDimension) +{ + FloatDimension slidingDimensionF = _CoordinateSystemUtils::ConvertToFloat(slidingDimension); + + return SetSlidingDimension(slidingDimensionF); +} + +result +TextColumn::SetSlidingDimension(FloatDimension& slidingDimension) +{ + SysTryReturn(NID_GRP, slidingDimension.width >= 0.0f && slidingDimension.height >= 0.0f + , E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + __slidingDimension = slidingDimension; + + return E_SUCCESS; +} + +Dimension +TextColumn::GetSlidingDimension(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(__slidingDimension); +} + +FloatDimension +TextColumn::GetSlidingDimensionF(void) const +{ + return __slidingDimension; +} + +void +TextColumn::SetSlidingPosition(int slidingPosition) +{ + __slidingPosition = _CoordinateSystemUtils::ConvertToFloat(slidingPosition); +} + +void +TextColumn::SetSlidingPosition(float slidingPosition) +{ + __slidingPosition = slidingPosition; +} + +int +TextColumn::GetSlidingPosition(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(__slidingPosition); +} + +float +TextColumn::GetSlidingPositionF(void) const +{ + return __slidingPosition; +} + +void +TextColumn::SetChangedStartLineIndex(int changedStartLineIndex) +{ + __changedStartLineIndex = changedStartLineIndex; +} + +int +TextColumn::GetChangedStartLineIndex(void) const +{ + return __changedStartLineIndex; +} + +void +TextColumn::SetChangedLastLineIndex(int changedLastLineIndex) +{ + __changedLastLineIndex = changedLastLineIndex; +} + +int +TextColumn::GetChangedLastLineIndex(void) const +{ + return __changedLastLineIndex; +} + +int +TextColumn::ForwardAnalyze(int startTextIndex, int textLength, float maxWidth, TextObjectWrapType wrap, + int& actualLength, float& width, float& height) +{ + return -1; +} + + +result +TextColumn::RemoveAllKeepLines(void) +{ + SysTryReturn(NID_GRP + , __pKeepLines + , E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] This instance is not constructed yet."); + + TextLine* pTextLine = null; + + while (1) + { + pTextLine = static_cast < TextLine* >(TextSimpleList::DeleteNthObject(__pKeepLines, 0)); + if (pTextLine == null) + { + break; + } + + delete pTextLine; + pTextLine = null; + } + + __keepLineCount = 0; + + return E_SUCCESS; +} + +result +TextColumn::UpdateSweepInfoFirstLine(void) +{ + TextObjectSweepInfo textSweepInfo; + __pCompositeText->GetTextSweepInfo(textSweepInfo); + + Dimension lineSize; + int width = 0; + SimpleNode* pTextLineNode = null; + TextLine* pTextLine; + int sweepLineCount = 0; + int insertedLineCount = 0; + + pTextLineNode = TextSimpleList::GetFirstNode(__pLines); + + while (pTextLineNode != null) + { + pTextLine = static_cast < TextLine* >(pTextLineNode->pObject); + pTextLine->GetRegion(0, pTextLine->GetTextLength(), lineSize.width, lineSize.height); + width += lineSize.width; + sweepLineCount++; + insertedLineCount++; + + pTextLineNode = pTextLineNode->pNext; + } + + textSweepInfo.isValid = true; + textSweepInfo.sweepType = ((1 < sweepLineCount) ? TEXT_OBJECT_SWEEP_TYPE_FORWARD : TEXT_OBJECT_SWEEP_TYPE_KEYINPUT); + textSweepInfo.anchorLineIndex = 0; + textSweepInfo.sweepRegionStartLineIndex = 0; + textSweepInfo.sweepRegionLineCount = sweepLineCount; + textSweepInfo.widthChanged = width; + textSweepInfo.insertedLineCount = insertedLineCount; + textSweepInfo.deletedLineCount = 0; + + __pCompositeText->UpdateTextSweepInfo(&textSweepInfo); + + return true; +} + +result +TextColumn::UpdateSweepInfo(void) +{ + if (TextSimpleList::IsEmpty(__pKeepLines)) + { + return UpdateSweepInfoFirstLine(); + } + + TextObjectSweepInfo textSweepInfo; + __pCompositeText->GetTextSweepInfo(textSweepInfo); + + SimpleNode* pOldTextLineNode = null; + SimpleNode* pNewTextLineNode = null; + TextLine* pOldTextLine = null; + TextLine* pNewTextLine = null; + Dimension oldLineSize; + Dimension newLineSize; + int oldLineWidth = 0; + int newLineWidth = 0; + int sweepLineCount = 0; + int changedStartLineIndex = 0; + int insertedLineCount = 0; + int deleteLineCount = 0; + + int anchorLineIndex = GetLineIndexAtTextIndex(textSweepInfo.anchorTextIndex); + if (anchorLineIndex == -1) + { + anchorLineIndex = GetTotalLineCount() - 1; + } + + int widthChanged = 0; + TextObjectSweepType sweepType = TEXT_OBJECT_SWEEP_TYPE_INVALID; + + pOldTextLineNode = TextSimpleList::GetFirstNode(__pKeepLines); + if (pOldTextLineNode == null) + { + return E_SUCCESS; + } + + pOldTextLine = static_cast < TextLine* >(pOldTextLineNode->pObject); + changedStartLineIndex = pOldTextLine->GetIndex(); + pNewTextLineNode = TextSimpleList::GetNthNode(__pLines, changedStartLineIndex); + + while (pOldTextLineNode || pNewTextLineNode) + { + TextObjectSweepComposeLineInfo textSweepComposeLineInfo; + + if (pOldTextLineNode == null) + { + pNewTextLine = static_cast < TextLine* >(pNewTextLineNode->pObject); + + if (pNewTextLine->GetIndex() >= changedStartLineIndex + __insertedLineCountDuringCompose) + { + break; + } + + pNewTextLine->GetRegion(0, pNewTextLine->GetTextLength(), newLineSize.width, newLineSize.height); + + newLineWidth += newLineSize.width; + sweepLineCount++; + insertedLineCount++; + + textSweepComposeLineInfo.isValid = true; + textSweepComposeLineInfo.prevLineTextOffset = 0; + textSweepComposeLineInfo.prevLineTextLength = 0; + textSweepComposeLineInfo.prevLineWidth = 0; + textSweepComposeLineInfo.currentLineTextOffset = pNewTextLine->GetTextOffset(); + textSweepComposeLineInfo.currentLineTextLength = pNewTextLine->GetTextLength(); + textSweepComposeLineInfo.currentLineWidth = newLineSize.width; + + pNewTextLine->SetSweepComposeInfo(textSweepComposeLineInfo); + + sweepType = TEXT_OBJECT_SWEEP_TYPE_FORWARD; + + pNewTextLineNode = pNewTextLineNode->pNext; + } + else if (pNewTextLineNode == null) + { + pOldTextLine = static_cast < TextLine* >(pOldTextLineNode->pObject); + pOldTextLine->GetRegion(0, pOldTextLine->GetTextLength(), oldLineSize.width, oldLineSize.height); + + oldLineWidth += oldLineSize.width; + sweepLineCount++; + deleteLineCount++; + sweepType = TEXT_OBJECT_SWEEP_TYPE_BACKWARD; + + pOldTextLineNode = pOldTextLineNode->pNext; + } + else + { + pOldTextLine = static_cast < TextLine* >(pOldTextLineNode->pObject); + pNewTextLine = static_cast < TextLine* >(pNewTextLineNode->pObject); + + if (pNewTextLine->GetIndex() > changedStartLineIndex + __insertedLineCountDuringCompose) + { + pOldTextLine->GetRegion(0, pOldTextLine->GetTextLength(), oldLineSize.width, oldLineSize.height); + + oldLineWidth += oldLineSize.width; + sweepLineCount++; + + sweepType = TEXT_OBJECT_SWEEP_TYPE_BACKWARD; + + pOldTextLineNode = pOldTextLineNode->pNext; + pNewTextLineNode = pNewTextLineNode->pNext; + + continue; + } + + pOldTextLine->GetRegion(0, pOldTextLine->GetTextLength(), oldLineSize.width, oldLineSize.height); + pNewTextLine->GetRegion(0, pNewTextLine->GetTextLength(), newLineSize.width, newLineSize.height); + + if ((oldLineSize.width == newLineSize.width) && (pOldTextLine->GetTextLength() == pNewTextLine->GetTextLength())) + { + if (pNewTextLine->GetIndex() == changedStartLineIndex) + { + changedStartLineIndex++; + } + else + { + break; + } + } + else + { + oldLineWidth += oldLineSize.width; + newLineWidth += newLineSize.width; + sweepLineCount++; + + textSweepComposeLineInfo.isValid = true; + textSweepComposeLineInfo.prevLineTextOffset = pOldTextLine->GetTextOffset(); + textSweepComposeLineInfo.prevLineTextLength = pOldTextLine->GetTextLength(); + textSweepComposeLineInfo.prevLineWidth = oldLineSize.width; + textSweepComposeLineInfo.currentLineTextOffset = pNewTextLine->GetTextOffset(); + textSweepComposeLineInfo.currentLineTextLength = pNewTextLine->GetTextLength(); + textSweepComposeLineInfo.currentLineWidth = newLineSize.width; + pNewTextLine->SetSweepComposeInfo(textSweepComposeLineInfo); + } + + pOldTextLineNode = pOldTextLineNode->pNext; + pNewTextLineNode = pNewTextLineNode->pNext; + } + } + + widthChanged = newLineWidth - oldLineWidth; + + if (sweepLineCount == 1) + { + sweepType = TEXT_OBJECT_SWEEP_TYPE_KEYINPUT; + } + + if (sweepType == TEXT_OBJECT_SWEEP_TYPE_INVALID) + { + sweepType = ((oldLineSize.width < newLineSize.width) ? TEXT_OBJECT_SWEEP_TYPE_FORWARD : TEXT_OBJECT_SWEEP_TYPE_BACKWARD); + } + + if (anchorLineIndex == -1) + { + anchorLineIndex = pNewTextLine->GetIndex(); + } + + textSweepInfo.isValid = true; + textSweepInfo.sweepType = sweepType; + textSweepInfo.anchorLineIndex = anchorLineIndex; + textSweepInfo.sweepRegionStartLineIndex = changedStartLineIndex; + textSweepInfo.sweepRegionLineCount = sweepLineCount; + textSweepInfo.widthChanged = widthChanged; + textSweepInfo.insertedLineCount = insertedLineCount; + textSweepInfo.deletedLineCount = deleteLineCount; + + __pCompositeText->UpdateTextSweepInfo(&textSweepInfo); + + return true; +} + +result +TextColumn::KeepLines(int lineIndex, int lineCount) +{ + SimpleNode* pTextLineNode = null; + SimpleNode* pNextTextLineNode = null; + TextLine* pTextLine = null; + TextLine* pKeepTextLine = null; + int deletedLineCount = 0; + + if (lineIndex < 0) + { + lineIndex = 0; + lineCount--; + } + + pTextLineNode = TextSimpleList::GetNthNode(__pLines, lineIndex); + + while ((pTextLineNode != null) && (deletedLineCount < 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] Memory allocation failed."); + + pNextTextLineNode = pTextLineNode->pNext; + + TextSimpleList::AppendObject(__pKeepLines, pKeepTextLine); + + deletedLineCount++; + + pTextLineNode = pNextTextLineNode; + } + + __keepLineCount += deletedLineCount; + + return E_SUCCESS; +} + +result +TextColumn::SetKeyInputLine(int changedStartlineIndex, int lineCount) +{ + int keyInputTextIndex = 0; + int keyInputTextLength = 0; + + SimpleNode* pTextLineNode = null; + TextLine* pTextLine = null; + int changedLineCount = lineCount; + + __pCompositeText->GetRange(keyInputTextIndex, keyInputTextLength); + + pTextLineNode = TextSimpleList::GetNthNode(__pLines, changedStartlineIndex); + while (pTextLineNode != null && changedLineCount) + { + pTextLine = static_cast < TextLine* >(pTextLineNode->pObject); + + if (pTextLine->GetTextOffset() <= keyInputTextIndex && keyInputTextIndex < pTextLine->GetTextOffset() + pTextLine->GetTextLength()) + { + pTextLine->NotifyLineChanged(true); + pTextLine->SetKeyInputOffset(keyInputTextIndex - pTextLine->GetTextOffset()); + pTextLine->SetKeyInputLength(keyInputTextLength); + + break; + } + + changedLineCount--; + + pTextLineNode = pTextLineNode->pNext; + } + + return E_SUCCESS; +} + +result +TextColumn::CompareDeletedLine(void) +{ + result r = E_SUCCESS; + + SimpleNode* pOldTextLineNode = null; + SimpleNode* pNewTextLineNode = null; + TextLine* pOldTextLine = null; + TextLine* pNewTextLine = null; + + FloatDimension newLineSize; + FloatDimension oldLineSize; + int sweepResult = 0; + float sweepIn = 0; + float sweepOut = 0; + float prevLineSweepIn = 0; + float prevLineSweepOut = 0; + int changedStartLineIndex = 0; + float keyInputWidth = 0; + + if (TextSimpleList::GetCount(__pKeepLines) == 0) + { + return E_SUCCESS; // E_SUCCESS right?? + } + + keyInputWidth = __pCompositeText->GetWorkWidth(); + pOldTextLineNode = TextSimpleList::GetFirstNode(__pKeepLines); + SysTryReturn(NID_GRP, pOldTextLineNode, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line node."); + + pOldTextLine = static_cast < TextLine* >(pOldTextLineNode->pObject); + SysTryReturn(NID_GRP, pOldTextLine, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line node."); + + changedStartLineIndex = pOldTextLine->GetIndex(); + pNewTextLineNode = TextSimpleList::GetNthNode(__pLines, changedStartLineIndex); + SysTryReturn(NID_GRP, pNewTextLineNode, E_INVALID_STATE, E_INVALID_STATE + , "[E_INVALID_STATE] This instance is not constructed yet. changedStartLineIndex = %d", changedStartLineIndex); + + r = SetKeyInputLine(changedStartLineIndex, TextSimpleList::GetCount(__pLines) - changedStartLineIndex); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + pOldTextLine = static_cast < TextLine* >(pOldTextLineNode->pObject); + pNewTextLine = static_cast < TextLine* >(pNewTextLineNode->pObject); + + pOldTextLine->GetRegion(0, pOldTextLine->GetTextLength(), oldLineSize.width, oldLineSize.height); + pNewTextLine->GetRegion(0, pNewTextLine->GetTextLength(), newLineSize.width, newLineSize.height); + + + if (oldLineSize.width == newLineSize.width) + { + sweepResult = NOT_CHANGED; + + pNewTextLine->SetKeyInputResult(sweepResult); + pNewTextLine->SetSweepIn(0); + pNewTextLine->SetSweepOut(0); + + pOldTextLineNode = pOldTextLineNode->pNext; + pNewTextLineNode = pNewTextLineNode->pNext; + + if (pOldTextLineNode && pNewTextLineNode) + { + + pOldTextLine = static_cast < TextLine* >(pOldTextLineNode->pObject); + pNewTextLine = static_cast < TextLine* >(pNewTextLineNode->pObject); + + pOldTextLine->GetRegion(0, pOldTextLine->GetTextLength(), oldLineSize.width, oldLineSize.height); + pNewTextLine->GetRegion(0, pNewTextLine->GetTextLength(), newLineSize.width, newLineSize.height); + + if (0 < keyInputWidth) + { + sweepResult = FORWARD_SWEEP; + + sweepIn = 0; + sweepOut = oldLineSize.width - newLineSize.width; + if (pNewTextLine->isChanged()) + { + sweepOut += keyInputWidth; + } + + pNewTextLine->SetKeyInputResult(sweepResult); + pNewTextLine->SetSweepIn(sweepIn); + pNewTextLine->SetSweepOut(sweepOut); + } + else + { + sweepResult = BACKWARD_SWEEP; + + sweepIn = newLineSize.width - oldLineSize.width; + sweepOut = 0; + if (pNewTextLine->isChanged()) + { + sweepIn -= keyInputWidth; + } + + pNewTextLine->SetKeyInputResult(sweepResult); + pNewTextLine->SetSweepIn(sweepIn); + pNewTextLine->SetSweepOut(sweepOut); + } + } + } + else if (oldLineSize.width < newLineSize.width) + { + sweepResult = BACKWARD_SWEEP; + + sweepIn = newLineSize.width - oldLineSize.width; + sweepOut = 0; + if (pNewTextLine->isChanged()) + { + sweepIn -= keyInputWidth; + } + + pNewTextLine->SetKeyInputResult(sweepResult); + pNewTextLine->SetSweepIn(sweepIn); + pNewTextLine->SetSweepOut(sweepOut); + } + else + { + sweepResult = FORWARD_SWEEP; + + sweepIn = 0; + sweepOut = oldLineSize.width - newLineSize.width; + if (pNewTextLine->isChanged()) + { + sweepOut += keyInputWidth; + } + + pNewTextLine->SetKeyInputResult(sweepResult); + pNewTextLine->SetSweepIn(sweepIn); + pNewTextLine->SetSweepOut(sweepOut); + } + + pOldTextLineNode = TextSimpleList::GetFirstNode(__pKeepLines); + SysTryReturn(NID_GRP, pOldTextLineNode, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line node."); + + pNewTextLineNode = TextSimpleList::GetNthNode(__pLines, changedStartLineIndex); + SysTryReturn(NID_GRP, pNewTextLineNode, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line node."); + + prevLineSweepIn = pNewTextLine->GetSweepIn(); + prevLineSweepOut = pNewTextLine->GetSweepOut(); + + pOldTextLineNode = pOldTextLineNode->pNext; + pNewTextLineNode = pNewTextLineNode->pNext; + + switch (sweepResult) + { + case BACKWARD_SWEEP: + while (pOldTextLineNode != null && pNewTextLineNode != null) + { + pOldTextLine = static_cast < TextLine* >(pOldTextLineNode->pObject); + pNewTextLine = static_cast < TextLine* >(pNewTextLineNode->pObject); + + pOldTextLine->GetRegion(0, pOldTextLine->GetTextLength(), oldLineSize.width, oldLineSize.height); + pNewTextLine->GetRegion(0, pNewTextLine->GetTextLength(), newLineSize.width, newLineSize.height); + + if (oldLineSize.width == newLineSize.width) + { + if (pOldTextLine->GetTextLength() == pNewTextLine->GetTextLength()) + { + pNewTextLine->SetKeyInputResult(NOT_CHANGED); + pNewTextLine->SetSweepIn(0); + pNewTextLine->SetSweepOut(0); + + break; + } + } + + sweepIn = newLineSize.width - oldLineSize.width + prevLineSweepIn; + sweepOut = prevLineSweepIn; + + if (pNewTextLine->isChanged()) + { + sweepIn -= keyInputWidth; + } + + pNewTextLine->SetKeyInputResult(BACKWARD_SWEEP); + pNewTextLine->SetSweepIn(sweepIn); + pNewTextLine->SetSweepOut(sweepOut); + + prevLineSweepIn = pNewTextLine->GetSweepIn(); + pOldTextLineNode = pOldTextLineNode->pNext; + pNewTextLineNode = pNewTextLineNode->pNext; + } + + break; + + case FORWARD_SWEEP: + while (pNewTextLineNode != null) + { + if (pOldTextLineNode == null) + { + pNewTextLine = static_cast < TextLine* >(pNewTextLineNode->pObject); + + pNewTextLine->SetKeyInputResult(FORWARD_SWEEP); + pNewTextLine->SetSweepIn(prevLineSweepOut); + pNewTextLine->SetSweepOut(0); + + break; + } + + pOldTextLine = static_cast < TextLine* >(pOldTextLineNode->pObject); + pNewTextLine = static_cast < TextLine* >(pNewTextLineNode->pObject); + + pOldTextLine->GetRegion(0, pOldTextLine->GetTextLength(), oldLineSize.width, oldLineSize.height); + pNewTextLine->GetRegion(0, pNewTextLine->GetTextLength(), newLineSize.width, newLineSize.height); + + if (oldLineSize.width == newLineSize.width) + { + if (pOldTextLine->GetTextLength() == pNewTextLine->GetTextLength()) + { + pNewTextLine->SetKeyInputResult(NOT_CHANGED); + pNewTextLine->SetSweepIn(0); + pNewTextLine->SetSweepOut(0); + + break; + } + } + + sweepIn = prevLineSweepOut; + sweepOut = oldLineSize.width - newLineSize.width + prevLineSweepOut; + + if (pNewTextLine->isChanged()) + { + sweepOut += keyInputWidth; + } + + pNewTextLine->SetKeyInputResult(FORWARD_SWEEP); + pNewTextLine->SetSweepIn(sweepIn); + pNewTextLine->SetSweepOut(sweepOut); + + prevLineSweepOut = pNewTextLine->GetSweepOut(); + pOldTextLineNode = pOldTextLineNode->pNext; + pNewTextLineNode = pNewTextLineNode->pNext; + } + + break; + + case NOT_CHANGED: + default: + break; + } + + return E_SUCCESS; +} + + +}}} // Tizen::Graphics::Text diff --git a/src/graphics/text/FGrp_TextTextColumn.h b/src/graphics/text/FGrp_TextTextColumn.h new file mode 100644 index 0000000..2d12251 --- /dev/null +++ b/src/graphics/text/FGrp_TextTextColumn.h @@ -0,0 +1,284 @@ +// +// 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_TextTextColumn.h + * @brief This file contains the declarations of TextColumn class. +*/ + +#ifndef _FGRP_INTERNAL_TEXT_COLUMN_H_ +#define _FGRP_INTERNAL_TEXT_COLUMN_H_ + +#include "FGrp_TextCommon.h" +#include "FGrp_TextTextSimpleList.h" + +namespace Tizen { namespace Graphics +{ +class _CanvasImpl; + +namespace _Text +{ +class TextComposite; +class TextLine; +struct ChangeActionEventInfo; + +class TextColumn +{ +public: + enum ChangeAction + { + TEXT_CHANGE_INSERT = 0, + TEXT_CHANGE_REMOVE, + TEXT_CHANGE_REPLACE, + TEXT_CHANGE_UNKONWN + }; + + enum ActionProcessResult + { + BEFORE_ACTION = 0, + AFTER_ACTION, + MERGE_ACTION, + MERGE_AND_BEFORE_ACTION, + MERGE_AND_AFTER_ACTION, + COLLAPSE_ACTION, + ERROR_ACTION + }; + + enum KeyInputResult + { + NOT_CHANGED = 0, + FORWARD_SWEEP, + BACKWARD_SWEEP + }; + +public: + TextColumn(TextComposite* pCompositeText = null); + + virtual ~TextColumn(void); + +public: + virtual result Draw(_CanvasImpl& canvasImpl, FloatRectangle& displayRect, int startTextIndex, + int textLength, const TextObjectAlignment alignment, const TextObjectActionType action); + + virtual result GetRegion(int textIndex, int textLength, float& width, float& height) const; + + virtual float GetHeightF(int textIndex) const; + + virtual int GetTextLength(void) const; + + virtual int ForwardAnalyze(int startTextIndex, int textLength, float maxWidth, TextObjectWrapType wrap, + int& actualLength, float& width, float& height); + + result Append(TextLine* pTextLine); + + result AddLineDuringCompose(TextLine* pTextLine); + + result Remove(TextLine* pTextLine); + + result RemoveAllLines(void); + + result PrepareCompose(void); + + result FinishCompose(bool isUpdateSweepInfo = true); + + result CheckComposeDone(TextLine* pTextLine); + + bool IsComposeDone(void); + + int GetTotalHeight(void) const; + + float GetTotalHeightF(void) const; + + int GetLineHeightAt(int index) const; + + float GetLineHeightAtF(int index) const; + + int GetTotalLineCount(void) const; + + int GetLineIndexAtTextIndex(int textIndex) const; + + int GetLineIndexAtPositionY(int y); + + int GetLineIndexAtPositionY(float y); + + TextLine* GetTextLine(int lineIndex) const; + + SimpleNode* GetTextLineNode(int lineIndex) const; + + void SetFirstDisplayLineIndex(int lineIndex); + + int GetFirstDisplayLineIndex(void) const; + + void SetDisplayLineCount(int displayLineCount); + + int GetDisplayLineCount(void) const; + + void SetDisplayHeight(int height); + + void SetDisplayHeight(float height); + + int GetDisplayHeight(void) const; + + float GetDisplayHeightF(void) const; + + void SetFirstDisplayPositionY(int y); + + void SetFirstDisplayPositionY(float y); + + int GetFirstDisplayPositionY(void) const; + + float GetFirstDisplayPositionYF(void) const; + + void SetFirstDisplayPositionX(float x); + + float GetFirstDisplayPositionX(void) const; + + int GetTextLengthAt(int lineIndex) const; + + int GetFirstTextIndexAt(int lineIndex) const; + + result SetSlidingDimension(Tizen::Graphics::Dimension& slidingDimension); + + result SetSlidingDimension(Tizen::Graphics::FloatDimension& slidingDimension); + + Tizen::Graphics::Dimension GetSlidingDimension(void) const; + + Tizen::Graphics::FloatDimension GetSlidingDimensionF(void) const; + + void SetSlidingPosition(int slidingPosition); + + void SetSlidingPosition(float slidingPosition); + + int GetSlidingPosition(void) const; + + float GetSlidingPositionF(void) const; + + TextLine* GetPrevLineChangedStartLine(void) const; + + int GetChangeActionEventCount(void) const; + + void SetChangedStartLineIndex(int changedStartLineIndex); + + int GetChangedStartLineIndex(void) const; + + void SetChangedLastLineIndex(int changedLastLineIndex); + + int GetChangedLastLineIndex(void) const; + + int GetChangedStrStartIndex(void) const; + + result SetChangeAction(ChangeAction changeAction, int textIndex, int textLength); + + result RemoveAllKeepLines(void); + + TextObjectSweepType GetTextSweepType(void); + + result UpdateSweepInfo(void); + + result UpdateSweepInfoFirstLine(void); + + result SetKeyInputLine(int changedStartlineIndex, int lineCount); + + result CompareDeletedLine(void); + + result CalculateDisplayableLineCount(FloatRectangle& displayRect, const TextObjectActionType action); + + TextLine* GetPrevTextLine(int lineIndex) const; + +private: + result RemoveLines(int lineIndex, int lineCount); + + result RemoveLinesFrom(int lineIndex); + + void RemoveAllChangeActions(void); + + result UpdateCompositionInfo(int changedStartTextIndex, int changedEndTextIndex, int changedTextLength, bool existUnkownAction); + + result GetTextChangedInfo(int& changedStartTextIndex, int& changedEndTextIndex, int& changedTextLength, bool& existUnkownAction) const; + + ActionProcessResult DoProcessTextAction(ChangeAction inputAction, int textIndex, int textLength, + ChangeActionEventInfo* pCurrentStrActionEventInfo, int& changedStartTextIndex, + int& strOutputChangedNum); + + ActionProcessResult DoProcessUnknownThroughUnknown(int textIndex, ChangeActionEventInfo* pCurrentActionEventInfo); + + ActionProcessResult DoProcessUnkownThroughInsert(int textIndex, ChangeActionEventInfo* pCurrentActionEventInfo, + int& strOutputStartIndex); + + ActionProcessResult DoProcessUnkownThroughRemove(int textIndex, ChangeActionEventInfo* pCurrentActionEventInfo, + int& changedStartTextIndex); + + ActionProcessResult DoProcessInsertThroughUnkown(int textIndex, ChangeActionEventInfo* pCurrentActionEventInfo); + + ActionProcessResult DoProcessInsertThroughInsert(int textIndex, int textLength, + ChangeActionEventInfo* pCurrentActionEventInfo, int& changedStartTextIndex); + + ActionProcessResult DoProcessInsertThroughRemove(int textIndex, ChangeActionEventInfo* pCurrentActionEventInfo, + int& changedStartTextIndex); + + ActionProcessResult DoProcessRemoveThroughUnkown(int textIndex, ChangeActionEventInfo* pCurrentActionEventInfo); + + ActionProcessResult DoProcessRemoveThroughInsert(int textIndex, int textLength, + ChangeActionEventInfo* pCurrentActionEventInfo, int& changedStartTextIndex, + int& strOutputChangedNum); + + ActionProcessResult DoProcessRemoveThroughRemove(int textIndex, ChangeActionEventInfo* pCurrentActionEventInfo, + int& changedStartTextIndex); + + result KeepLines(int lineIndex, int lineCount); + +private: + TextComposite* __pCompositeText; + SimpleList* __pLines; + SimpleList* __pTextChangeActionList; + int __totalLineCount; + int __firstDisplayLineIndex; + float __firstDisplayPositionY; + float __firstDisplayPositionX; + int __displayLineCount; + float __displayHeight; + Tizen::Graphics::FloatDimension __slidingDimension; + float __slidingPosition; + bool __setChangeAction; + ChangeAction __textChangeAction; + int __chagedStartTextIndex; + int __changedTextLength; + int __changedStartLineIndex; + int __changedLastLineIndex; + int __prevLineIndexBeforeChangedStartLine; + int __nextLineIndexAfterChangedLastLine; + int __textOffsetOfNextLineAfterChangedLine; + int __currentLineIndexToAddDuringCompose; + bool __isComposeDone; + SimpleNode* __pCachedLineNode; + int __cachedLineIndex; + float __cachedLinePositionY; + + SimpleList* __pKeepLines; + int __keepLineCount; + int __insertedLineCountDuringCompose; + +private: + TextColumn(const TextColumn& other); // NOT IMPLMENTED + + TextColumn& operator =(const TextColumn& rhs); // NOT IMPLMENTED + +}; // TextColumn + +}}} // Tizen::Graphics::_Text + +#endif // _FGRP_INTERNAL_TEXT_COLUMN_H_ diff --git a/src/graphics/text/FGrp_TextTextComposite.cpp b/src/graphics/text/FGrp_TextTextComposite.cpp new file mode 100644 index 0000000..58a22d6 --- /dev/null +++ b/src/graphics/text/FGrp_TextTextComposite.cpp @@ -0,0 +1,6828 @@ +// +// 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_TextTextComposite.cpp + * @brief This is the implementation file for TextComposite class. + */ + +// Includes +#include +#include +#include +#include +#include "FGrp_TextCommon.h" +#include "FGrp_TextTextElement.h" +#include "FGrp_TextTextSimple.h" +#include "FGrp_TextTextImage.h" +#include "FGrp_TextTextCutLink.h" +#include "FGrp_TextTextLine.h" +#include "FGrp_TextTextColumn.h" +#include "FGrp_TextTextCutLinkListInfo.h" +#include "FGrp_TextTextComposite.h" +#include "FGrp_TextTextUtility.h" +#include "FGrp_CanvasImpl.h" +#include "FGrp_CoordinateSystemUtils.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Utility; +using namespace Tizen::Base::Collection; + +#define Release(x) \ + if (x) \ + { \ + delete x; \ + x = null; \ + } + +namespace // unnamed +{ + const float LINE_FEED_WIDTH = 8.0f; +} + +namespace Tizen { namespace Graphics +{ + +namespace _Text +{ + +struct NoneWrapComposeInfo +{ + int prevTextOffset; + int prevTextLength; + float prevWidth; + float prevHeight; + int prevEndType; +}; + +TextComposite::TextComposite(TextElement* pTextElement) +{ + __pTextElementList = new (std::nothrow) LinkedList; + SysTryReturn(NID_GRP, __pTextElementList, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + __wrap = TEXT_OBJECT_WRAP_TYPE_WORD; + __workStart = 0; + __workLength = 0; + __workWidth = 0; + __length = 0; + __displayBlock = false; + __defaultBlockColor = Color(183, 212, 247); + __cursorIndex = -1; + + __ignoreRearBlank = true; + __ignoreFrontBlank = false; + + __rearSpaceHideMode = TEXT_OBJECT_SPACE_HIDE_TYPE_ONE; + __frontSpaceHideMode = TEXT_OBJECT_SPACE_HIDE_TYPE_ONE; + + __lineSpacing = 0; + __elementVertialAlignment = TEXT_OBJECT_ALIGNMENT_BOTTOM; + __pCurrentTextColumn = null; + __pCutLinkListInfo = new (std::nothrow)TextCutLinkListInfo; + + { + wchar_t abbrevText[2]; + abbrevText[0] = TEXT_ABBREV_CHARACTER; + abbrevText[1] = 0; + + __pAbbrevTextElement = new (std::nothrow)TextSimple(abbrevText, 1, TEXT_ELEMENT_SOURCE_TYPE_INTERNAL, null, + Color::GetColor(COLOR_ID_BLACK), Color::GetColor(COLOR_ID_WHITE), Color::GetColor(COLOR_ID_WHITE)); + } + + if (pTextElement != null) + { + AppendElement(*pTextElement); + } + __drawAbbrevText = false; + __drawTextEllipsis = false; + __TextObjectEllipsisType = TEXT_OBJECT_ELLIPSIS_TYPE_TAIL; + + __partialComposingModeEnabled = false; + __lineIndexCompositeDone = 0; + __totalComposedHeight = 0; + __composePartialLimitHeight = 0; + + __headEllipsisTextLength = 0; + __headEllipsisWidth = 0; + __middleEllipsisHeadWidth = 0; + __middleEllipsisTextLengthInHead = 0; + __middleEllipsisTextLengthInTail = 0; + __middleEllipsisWidth = 0; + __isChanged = false; + + __pSweepInfo = null; +} + +TextComposite::~TextComposite(void) +{ + Release(__pCutLinkListInfo); + Release(__pAbbrevTextElement); + + if (__pTextElementList) + { + RemoveAllElements(true); + delete __pTextElementList; + __pTextElementList = null; + } +} + +int +TextComposite::ForwardAnalyze(int startTextIndex, int textLength, int maxWidth, TextObjectWrapType wrap, int& actualLength, + int& width, int& height) +{ + float maxWidthF = _CoordinateSystemUtils::ConvertToFloat(maxWidth); + float widthF = _CoordinateSystemUtils::ConvertToFloat(width); + float heightF = _CoordinateSystemUtils::ConvertToFloat(height); + + int r = ForwardAnalyze(startTextIndex, textLength, maxWidthF, wrap, actualLength, widthF, heightF); + + width = _CoordinateSystemUtils::ConvertToInteger(widthF); + height = _CoordinateSystemUtils::ConvertToInteger(heightF); + + return r; +} + +int +TextComposite::ForwardAnalyze(int startTextIndex, int textLength, float maxWidth, TextObjectWrapType wrap, int& actualLength, + float& width, float& height) +{ + SysTryReturn(NID_GRP, 0 <= startTextIndex && startTextIndex < __length, -1, E_INVALID_ARG + , "[E_INVALID_ARG] The argument is invalid. startTextIndex(%d)", startTextIndex); + SysTryReturn(NID_GRP, textLength <= __length, -1, E_INVALID_ARG + , "[E_INVALID_ARG] The argument is invalid. textLength(%d)", textLength); + + result r = E_SUCCESS; + FloatDimension textSize; + int elementTextOffset = 0; + int elementIndex = 0; + int textIndexFromElementOffset = 0; + float remainingWidth = 0; + int remainingLength = 0; + int textCount = 0; + int currentLength = 0; + int ret = TEXT_RETBY_NORMAL; + + IEnumerator* pEnum = null; + TextElement* pTextElement = null; + + bool isFirstWord = true; + FloatDimension tempTextSize; + int tempTextCount = 0; + actualLength = 0; + width = 0; + height = 0; + + pTextElement = GetElementAtTextIndex(startTextIndex, elementTextOffset, elementIndex, currentLength,textIndexFromElementOffset); + SysTryReturn(NID_GRP, pTextElement, -1, E_SYSTEM, "[E_SYSTEM] Fail to get text element."); + + textCount = 0; + remainingWidth = maxWidth; + remainingLength = textLength; + currentLength = Math::Min(remainingLength, currentLength); + + 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)); + } + + while ((remainingWidth != 0) && (remainingLength != 0)) + { + ret = pTextElement->ForwardAnalyze(textIndexFromElementOffset, currentLength, remainingWidth, + wrap, textCount, textSize.width, textSize.height); + + if (textSize.width == 0 && textCount == 0) + { + break; + } + + textSize.height += __lineSpacing; + remainingWidth -= textSize.width; + remainingLength -= textCount; + currentLength -= textCount; + + actualLength += textCount; + width += textSize.width; + height = (textSize.height > height) ? textSize.height : height; + + if (__wrap == TEXT_OBJECT_WRAP_TYPE_WORD && ret != TEXT_RETBY_LIMITWIDTH) + { + tempTextCount = actualLength; + tempTextSize.width = width; + tempTextSize.height = height; + } + + if (ret == TEXT_RETBY_OVERWIDTH || ret == TEXT_RETBY_LINEFEED) + { + break; + } + + if (__wrap == TEXT_OBJECT_WRAP_TYPE_WORD) + { + if (ret == TEXT_RETBY_LIMITWIDTH) + { + if (isFirstWord == false) + { + actualLength = tempTextCount; + width = tempTextSize.width; + height = tempTextSize.height; + + ret = TEXT_RETBY_NORMAL; + } + break; + } + + isFirstWord = false; + + if (0 < currentLength) + { + textIndexFromElementOffset += textCount; + continue; + } + } + else + { + if (ret == TEXT_RETBY_LIMITWIDTH) + { + break; + } + } + + if (pEnum->MoveNext() != E_SUCCESS) + { + break; + } + + pTextElement = static_cast < TextElement* >(pEnum->GetCurrent()); + if (pTextElement == null) + { + break; + } + + isFirstWord = true; + textIndexFromElementOffset = pTextElement->GetValue(SET_TEXT_OFFSET); + currentLength = Math::Min(pTextElement->GetTextLength(), remainingLength); + } + + if (ret == TEXT_RETBY_LIMITLENGTH) + { + ret = TEXT_RETBY_NORMAL; + } + + SetLastResult(E_SUCCESS); + Release(pEnum); + return ret; + +CATCH: + Release(pEnum); + return -1; +} + +int +TextComposite::ForwardAnalyzeWithBaseline(int startTextIndex, int textLength, int maxWidth, TextObjectWrapType wrap, int& actualLength, + int& width, int& height, int& baseline) +{ + float maxWidthF = _CoordinateSystemUtils::ConvertToFloat(maxWidth); + float widthF = _CoordinateSystemUtils::ConvertToFloat(width); + float heightF = _CoordinateSystemUtils::ConvertToFloat(height); + float baselineF = _CoordinateSystemUtils::ConvertToFloat(baseline); + + int r = ForwardAnalyzeWithBaseline(startTextIndex, textLength, maxWidthF, wrap, actualLength, widthF, heightF, baselineF); + + width = _CoordinateSystemUtils::ConvertToInteger(widthF); + height = _CoordinateSystemUtils::ConvertToInteger(heightF); + baseline = _CoordinateSystemUtils::ConvertToInteger(baselineF); + + return r; +} + +int +TextComposite::ForwardAnalyzeWithBaseline(int startTextIndex, int textLength, float maxWidth, TextObjectWrapType wrap, int& actualLength, + float& width, float& height, float& baseline) +{ + SysTryReturn(NID_GRP, 0 <= startTextIndex && startTextIndex < __length + , -1, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid. startTextIndex(%d)", startTextIndex); + + SysTryReturn(NID_GRP, startTextIndex + textLength <= __length + , -1, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid. textLength(%d)", textLength); + + result r = E_SUCCESS; + + FloatDimension textSize; + int elementTextOffset = 0; + int elementIndex = 0; + int textIndexFromElementOffset = 0; + float remainingWidth = 0; + int remainingLength = 0; + int textCount = 0; + int currentLength = 0; + int ret = TEXT_RETBY_NORMAL; + bool isMaxHeightImage = false; + + IEnumerator* pEnum = null; + TextElement* pTextElement = null; + + bool isFirstWord = true; + FloatDimension tempTextSize; + int tempTextCount = 0; + actualLength = 0; + width = 0; + height = 0; + + pTextElement = GetElementAtTextIndex(startTextIndex, elementTextOffset, elementIndex, currentLength, + textIndexFromElementOffset); + SysTryReturn(NID_GRP, pTextElement, -1, E_SYSTEM, "[E_SYSTEM] Fail to get text element."); + + textCount = 0; + remainingWidth = maxWidth; + remainingLength = textLength; + currentLength = Math::Min(remainingLength, currentLength); + baseline = pTextElement->GetBaselineF(); + + 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)); + } + + while (remainingLength != 0) + { + ret = pTextElement->ForwardAnalyze(textIndexFromElementOffset, currentLength, remainingWidth, + wrap, textCount, textSize.width, textSize.height); + + textSize.height += __lineSpacing; + remainingWidth -= textSize.width; + remainingLength -= textCount; + currentLength -= textCount; + + actualLength += textCount; + width += textSize.width; + baseline = (pTextElement->GetBaselineF() > baseline) ? pTextElement->GetBaselineF() : baseline; + + if (height < textSize.height) + { + height = textSize.height; + + (pTextElement->GetType() == TEXT_ELEMENT_TYPE_IMAGE) ? isMaxHeightImage = true : isMaxHeightImage = false; + } + + if (__wrap == TEXT_OBJECT_WRAP_TYPE_WORD && ret != TEXT_RETBY_LIMITWIDTH) + { + tempTextCount = actualLength; + tempTextSize.width = width; + tempTextSize.height = height; + } + + if (ret == TEXT_RETBY_OVERWIDTH || ret == TEXT_RETBY_LINEFEED) + { + break; + } + + if (__wrap == TEXT_OBJECT_WRAP_TYPE_WORD) + { + if (ret == TEXT_RETBY_LIMITWIDTH) + { + if (isFirstWord == false) + { + actualLength = tempTextCount; + width = tempTextSize.width; + height = tempTextSize.height; + + ret = TEXT_RETBY_NORMAL; + } + break; + } + + isFirstWord = false; + + if (0 < currentLength) + { + textIndexFromElementOffset += textCount; + continue; + } + } + else + { + if (ret == TEXT_RETBY_LIMITWIDTH) + { + break; + } + } + + if (pEnum->MoveNext() != E_SUCCESS) + { + break; + } + + pTextElement = static_cast < TextElement* >(pEnum->GetCurrent()); + if (pTextElement == null) + { + break; + } + + isFirstWord = true; + textIndexFromElementOffset = pTextElement->GetValue(SET_TEXT_OFFSET); + currentLength = Math::Min(pTextElement->GetTextLength(), remainingLength); + } + + if (ret == TEXT_RETBY_LIMITLENGTH) + { + ret = TEXT_RETBY_NORMAL; + } + + if (isMaxHeightImage) + { + height += baseline; + } + + SetLastResult(E_SUCCESS); + Release(pEnum); + return ret; + +CATCH: + Release(pEnum); + return -1; +} + +result +TextComposite::GetRegion(int textIndex, int textLength, float& width, float& height) const +{ + if (textLength == 0) + { + width = 0; + height = 0; + + return E_SUCCESS; + } + + SysTryReturn(NID_GRP, 0 <= textIndex && textIndex < __length, E_INVALID_ARG, E_INVALID_ARG + , "[E_INVALID_ARG] The argument is invalid. textIndex(%d) __length(%d)", textIndex, __length); + SysTryReturn(NID_GRP, textLength <= __length, E_INVALID_ARG, E_INVALID_ARG + , "[E_INVALID_ARG] The argument is invalid. textIndex(%d) __length(%d)", textIndex, __length); + + result r = E_SUCCESS; + IEnumerator* pEnum = null; + TextElement* pTextElement = null; + FloatDimension textSize; + int currentLength = 0; + int elementTextOffset = 0; + int elementIndex = 0; + int textIndexFromElementOffset = 0; + + width = 0; + height = 0; + + pTextElement = GetElementAtTextIndex(textIndex, elementTextOffset, elementIndex, currentLength, textIndexFromElementOffset); + SysTryReturn(NID_GRP, pTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text element."); + + 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(currentLength, textLength); + + while (textLength != 0) + { + pTextElement->GetRegion(textIndexFromElementOffset, currentLength, textSize.width, textSize.height); + + width += textSize.width; + height = (height > textSize.height) ? height : textSize.height; + textLength -= currentLength; + + if (pEnum->MoveNext() != E_SUCCESS) + { + break; + } + + pTextElement = static_cast < TextElement* >(pEnum->GetCurrent()); + if (pTextElement == null) + { + break; + } + + textIndexFromElementOffset = pTextElement->GetValue(SET_TEXT_OFFSET); + currentLength = Math::Min(textLength, pTextElement->GetTextLength()); + } + + Release(pEnum); + return r; + +CATCH: + width = 0; + height = 0; + + Release(pEnum); + return r; +} + +float +TextComposite::GetHeightF(int textIndex) const +{ + if (__length == 0) + { + return 0; + } + + SysTryReturn(NID_GRP, 0 <= textIndex && textIndex < __length, -1, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + TextElement* pTextElement = null; + int currentLength = 0; + int elementTextOffset = 0; + int elementIndex = 0; + int textIndexFromElementOffset = 0; + + pTextElement = GetElementAtTextIndex(textIndex, elementTextOffset, elementIndex, currentLength, textIndexFromElementOffset); + SysTryCatch(NID_GRP, pTextElement, , E_SYSTEM, "[E_SYSTEM] Fail to get text element."); + + return pTextElement->GetHeightF(); + +CATCH: + return -1; +} + +result +TextComposite::Draw(_CanvasImpl& canvasImpl, FloatRectangle& displayRect, int startTextIndex, int textLength, const TextObjectAlignment alignment, + const TextObjectActionType action) +{ + if (textLength == 0) + { + return E_SUCCESS; + } + + SysTryReturn(NID_GRP, 0 <= startTextIndex && startTextIndex < __length, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + SysTryReturn(NID_GRP, textLength <= __length, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + result r = E_SUCCESS; + IEnumerator* pEnum = null; + TextElement* pTextElement = null; + FloatDimension textSize; + FloatDimension spaceCharDim; + FloatDimension abbrevTextDim; + FloatRectangle adjustedRect = displayRect; + FloatRectangle blockRect; + int currentLength = 0; + int elementTextOffset = 0; + int elementIndex = 0; + int textIndexFromElementOffset = 0; + bool drawAbbrevText = false; + + 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."); + + const TextSimple* pSimpleText = dynamic_cast (pTextElement); + if (pSimpleText != null) + { + int length = startTextIndex + textLength - elementTextOffset - 1; + const wchar_t* pText = pSimpleText->GetText(); + SysTryReturn(NID_GRP, pText, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text."); + + SysTryReturn(NID_GRP, length >= 0 && length < pSimpleText->GetTextLength() + , E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] text index(%d) must greater than 0 and must be less than total string length(%d)",length, pSimpleText->GetTextLength()); + + if (pText[length] == (wchar_t)L' ' || pText[length] == TEXT_JAPANESE_SPACE) + { + GetRegion(length + elementTextOffset, 1, spaceCharDim.width, spaceCharDim.height); + textLength--; + } + } + } + + pTextElement = GetElementAtTextIndex(startTextIndex, elementTextOffset, elementIndex, currentLength, textIndexFromElementOffset); + SysTryCatch(NID_GRP, pTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element."); + + if (__ignoreFrontBlank && __frontSpaceHideMode == TEXT_OBJECT_SPACE_HIDE_TYPE_ONE && textLength > 0) + { + const TextSimple* pSimpleText = dynamic_cast (pTextElement); + if (pSimpleText != null) + { + int index = startTextIndex - elementTextOffset; + const wchar_t* pText = pSimpleText->GetText(); + SysTryReturn(NID_GRP, pText, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text."); + + SysTryReturn(NID_GRP, index >= 0 && index < pSimpleText->GetTextLength() + , E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] text index(%d) must greater than 0 and must be less than total string length(%d)",index, pSimpleText->GetTextLength()); + + if (pText[index] == (wchar_t)L' ' || pText[index] == TEXT_JAPANESE_SPACE) + { + GetRegion(textIndexFromElementOffset, 1, spaceCharDim.width, spaceCharDim.height); + textLength--; + currentLength--; + startTextIndex++; + textIndexFromElementOffset++; + } + } + } + + GetRegion(startTextIndex, textLength, textSize.width, textSize.height); + if (action == TEXT_OBJECT_ACTION_TYPE_ABBREV) + { + if (__wrap == TEXT_OBJECT_WRAP_TYPE_NONE) + { + ForwardAnalyze(startTextIndex, textLength - startTextIndex, adjustedRect.width + , 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."); + + 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); + + 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) + { + adjustedRect.x += (adjustedRect.width - textSize.width) / 2; + } + break; + + case TEXT_OBJECT_ALIGNMENT_RIGHT: + if (textSize.width < adjustedRect.width) + { + adjustedRect.x += adjustedRect.width - textSize.width; + } + 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)); + } + + if (drawAbbrevText && IsRTL(startTextIndex, textLength)) + { + 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; + } + + blockRect = adjustedRect; + blockRect.y = displayRect.y; + currentLength = Math::Min(textLength, currentLength); + + while (textLength > 0) + { + textLength -= 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 (!textLength) + { + 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(textLength, pTextElement->GetTextLength()); + + if (currentLength == 0) + { + break; + } + } + + if (drawAbbrevText) + { + 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; + } + + Release(pEnum); + return E_SUCCESS; + +CATCH: + Release(pEnum); + return r; +} + +result +TextComposite::DrawWithEliipsis(_CanvasImpl& canvasImpl, FloatRectangle& displayRect, int startTextIndex, int textLength, const TextObjectAlignment alignment, + const TextObjectActionType action) +{ + if (textLength == 0) + { + return E_SUCCESS; + } + + SysTryReturn(NID_GRP, 0 <= startTextIndex && startTextIndex < __length, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + SysTryReturn(NID_GRP, textLength <= __length, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + result r = E_SUCCESS; + IEnumerator* pEnum = null; + TextElement* pTextElement = null; + TextElement* pLastDisplayTextElement = null; + FloatDimension textSize; + FloatDimension spaceCharDim; + FloatDimension abbrevTextDim; + FloatRectangle adjustedRect = displayRect; + FloatRectangle blockRect; + int currentLength = 0; + int elementTextOffset = 0; + int elementIndex = 0; + int textIndexFromElementOffset = 0; + int LTRTextLength = 0; + int RTLTextLength = 0; + bool drawAbbrevText = false; + bool isEndRTL = false; + int savedLTRTextLength = 0; + + if (__ignoreRearBlank && __rearSpaceHideMode == TEXT_OBJECT_SPACE_HIDE_TYPE_ONE) + { + 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 (pLastDisplayTextElement); + if (pSimpleText != null) + { + int length = startTextIndex + textLength - elementTextOffset - 1; + const wchar_t* pText = pSimpleText->GetText(); + SysTryReturn(NID_GRP, pText, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text."); + + SysTryReturn(NID_GRP, length >= 0 && length < pSimpleText->GetTextLength() + , E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] text index(%d) must greater than 0 and must be less than total string length(%d)",length, pSimpleText->GetTextLength()); + + if (pText[length] == (wchar_t)L' ' || pText[length] == TEXT_JAPANESE_SPACE) + { + GetRegion(length + elementTextOffset, 1, spaceCharDim.width, spaceCharDim.height); + textLength--; + } + } + } + + pTextElement = GetElementAtTextIndex(startTextIndex, elementTextOffset, elementIndex, currentLength, textIndexFromElementOffset); + SysTryCatch(NID_GRP, pTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element."); + + if (__ignoreFrontBlank && __frontSpaceHideMode == TEXT_OBJECT_SPACE_HIDE_TYPE_ONE && textLength > 0) + { + const TextSimple* pSimpleText = dynamic_cast (pTextElement); + if (pSimpleText != null) + { + int index = startTextIndex - elementTextOffset; + const wchar_t* pText = pSimpleText->GetText(); + SysTryReturn(NID_GRP, pText, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text."); + + SysTryReturn(NID_GRP, index >= 0 && index < pSimpleText->GetTextLength() + , E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] text index(%d) must greater than 0 and must be less than total string length(%d)",index, pSimpleText->GetTextLength()); + + if (pText[index] == (wchar_t)L' ' || pText[index] == TEXT_JAPANESE_SPACE) + { + GetRegion(textIndexFromElementOffset, 1, spaceCharDim.width, spaceCharDim.height); + textLength--; + currentLength--; + startTextIndex++; + textIndexFromElementOffset++; + } + } + } + + GetRegion(startTextIndex, textLength, textSize.width, textSize.height); + if (action == TEXT_OBJECT_ACTION_TYPE_ABBREV) + { + if (__wrap == TEXT_OBJECT_WRAP_TYPE_NONE) + { + ForwardAnalyze(startTextIndex, textLength - startTextIndex, adjustedRect.width + , TEXT_OBJECT_WRAP_TYPE_NONE, textLength, textSize.width, textSize.height); + } + + 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) + { + 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) + { + adjustedRect.x += (adjustedRect.width - textSize.width) / 2; + } + break; + + case TEXT_OBJECT_ALIGNMENT_RIGHT: + if (textSize.width < adjustedRect.width) + { + adjustedRect.x += adjustedRect.width - textSize.width; + } + 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)); + } + + blockRect = adjustedRect; + blockRect.y = displayRect.y; + currentLength = Math::Min(textLength, currentLength); + + 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); + } + + 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()) + { + 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; + + 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; + } + + + if (drawAbbrevText) + { + 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; + } + } + else + { + if (LTRTextLength > 0) + { + currentLength = Math::Min(LTRTextLength, currentLength); + + 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); + + 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()) + { + 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) + { + 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; + + 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; + } + + if (drawAbbrevText) + { + 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; + } + } + + Release(pEnum); + return E_SUCCESS; + +CATCH: + Release(pEnum); + return r; +} + +result +TextComposite::DrawWithBaseline(_CanvasImpl& canvasImpl, FloatRectangle& displayRect, int startTextIndex, int textLength, const TextObjectAlignment alignment, + const TextObjectActionType action, float baseline) +{ + if (textLength == 0) + { + return E_SUCCESS; + } + + SysTryReturn(NID_GRP, 0 <= startTextIndex && startTextIndex < __length, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + SysTryReturn(NID_GRP, textLength <= __length, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + result r = E_SUCCESS; + IEnumerator* pEnum = null; + TextElement* pTextElement = null; + + FloatDimension textSize; + FloatDimension spaceCharDim; + FloatDimension abbrevTextDim; + FloatRectangle adjustedRect = displayRect; + FloatRectangle blockRect; + int currentLength = 0; + int elementTextOffset = 0; + int elementIndex = 0; + int textIndexFromElementOffset = 0; + bool drawAbbrevText = false; + + 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."); + const TextSimple* pSimpleText = dynamic_cast (pTextElement); + if (pSimpleText != null) + { + int length = startTextIndex + textLength - elementTextOffset - 1; + const wchar_t* pText = pSimpleText->GetText(); + SysTryReturn(NID_GRP, pText, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text."); + + SysTryReturn(NID_GRP, length >= 0 && length < pSimpleText->GetTextLength() + , E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] text index(%d) must greater than 0 and must be less than total string length(%d)",length, pSimpleText->GetTextLength()); + + if (pText[length] == (wchar_t)L' ' || pText[length] == TEXT_JAPANESE_SPACE) + { + GetRegion(length + elementTextOffset, 1, spaceCharDim.width, spaceCharDim.height); + textLength--; + } + } + } + + pTextElement = GetElementAtTextIndex(startTextIndex, elementTextOffset, elementIndex, currentLength, textIndexFromElementOffset); + SysTryCatch(NID_GRP, pTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element."); + + if (__ignoreFrontBlank && __frontSpaceHideMode == TEXT_OBJECT_SPACE_HIDE_TYPE_ONE && textLength > 0) + { + const TextSimple* pSimpleText = dynamic_cast (pTextElement); + if (pSimpleText != null) + { + int index = startTextIndex - elementTextOffset; + const wchar_t* pText = pSimpleText->GetText(); + SysTryReturn(NID_GRP, pText, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text."); + + SysTryReturn(NID_GRP, index >= 0 && index < pSimpleText->GetTextLength() + , E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] text index(%d) must greater than 0 and must be less than total string length(%d)",index, pSimpleText->GetTextLength()); + + if (pText[index] == (wchar_t)L' ' || pText[index] == TEXT_JAPANESE_SPACE) + { + GetRegion(textIndexFromElementOffset, 1, spaceCharDim.width, spaceCharDim.height); + textLength--; + startTextIndex++; + textIndexFromElementOffset++; + } + } + } + + GetRegion(startTextIndex, textLength, textSize.width, textSize.height); + if (action == TEXT_OBJECT_ACTION_TYPE_ABBREV) + { + if (__wrap == TEXT_OBJECT_WRAP_TYPE_NONE) + { + ForwardAnalyze(startTextIndex, textLength - startTextIndex, adjustedRect.width + , TEXT_OBJECT_WRAP_TYPE_NONE, textLength, textSize.width, textSize.height); + } + + TextElement* pLastTextElement = 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) + { + 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); + + textSize.width += abbrevTextDim.width; + currentLength = textLength; + drawAbbrevText = true; + } + + switch (alignment & TEXT_ALIGNMASK_HORIZ) + { + case TEXT_OBJECT_ALIGNMENT_CENTER: + if (textSize.width < adjustedRect.width) + { + adjustedRect.x += (adjustedRect.width - textSize.width) / 2; + } + break; + + case TEXT_OBJECT_ALIGNMENT_RIGHT: + if (textSize.width < adjustedRect.width) + { + adjustedRect.x += adjustedRect.width - textSize.width; + } + 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)); + } + + blockRect = adjustedRect; + blockRect.y = displayRect.y; + adjustedRect.y = displayRect.y + displayRect.height - baseline; + canvasImpl.SetTextOrigin(TEXT_ORIGIN_BASELINE); + + currentLength = Math::Min(textLength, currentLength); + + while (textLength > 0) + { + textLength -= 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); + } + + 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(); + 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); + } + + adjustedRect.x += textSize.width; + adjustedRect.width -= textSize.width; + + if (!textLength) + { + 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(textLength, pTextElement->GetTextLength()); + + if (currentLength == 0) + { + break; + } + } + + if (drawAbbrevText) + { + 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; + } + + canvasImpl.SetTextOrigin(TEXT_ORIGIN_LEFT_TOP); + + Release(pEnum); + return E_SUCCESS; + +CATCH: + canvasImpl.SetTextOrigin(TEXT_ORIGIN_LEFT_TOP); + + Release(pEnum); + return r; +} + + +result +TextComposite::DrawWithBaselineWithEllipsis(_CanvasImpl& canvasImpl, FloatRectangle& displayRect, int startTextIndex, int textLength, const TextObjectAlignment alignment, + const TextObjectActionType action, int baseline) +{ + if (textLength == 0) + { + return E_SUCCESS; + } + + SysTryReturn(NID_GRP, 0 <= startTextIndex && startTextIndex < __length, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + SysTryReturn(NID_GRP, textLength <= __length, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + result r = E_SUCCESS; + IEnumerator* pEnum = null; + TextElement* pTextElement = null; + TextElement* pLastDisplayTextElement = null; + FloatDimension textSize; + FloatDimension spaceCharDim; + FloatDimension abbrevTextDim; + FloatRectangle adjustedRect = displayRect; + FloatRectangle blockRect; + int currentLength = 0; + int elementTextOffset = 0; + int elementIndex = 0; + int textIndexFromElementOffset = 0; + int LTRTextLength = 0; + int RTLTextLength = 0; + bool drawAbbrevText = false; + bool isEndRTL = false; + int savedLTRTextLength = 0; + + if (__ignoreRearBlank && __rearSpaceHideMode == TEXT_OBJECT_SPACE_HIDE_TYPE_ONE) + { + 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 (pLastDisplayTextElement); + if (pSimpleText != null) + { + int length = startTextIndex + textLength - elementTextOffset - 1; + const wchar_t* pText = pSimpleText->GetText(); + SysTryReturn(NID_GRP, pText, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text."); + + SysTryReturn(NID_GRP, length >= 0 && length < pSimpleText->GetTextLength() + , E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] text index(%d) must greater than 0 and must be less than total string length(%d)",length, pSimpleText->GetTextLength()); + + if (pText[length] == (wchar_t)L' ' || pText[length] == TEXT_JAPANESE_SPACE) + { + GetRegion(length + elementTextOffset, 1, spaceCharDim.width, spaceCharDim.height); + textLength--; + } + } + } + + pTextElement = GetElementAtTextIndex(startTextIndex, elementTextOffset, elementIndex, currentLength, textIndexFromElementOffset); + SysTryCatch(NID_GRP, pTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element."); + + if (__ignoreFrontBlank && __frontSpaceHideMode == TEXT_OBJECT_SPACE_HIDE_TYPE_ONE && textLength > 0) + { + const TextSimple* pSimpleText = dynamic_cast (pTextElement); + if (pSimpleText != null) + { + int index = startTextIndex - elementTextOffset; + const wchar_t* pText = pSimpleText->GetText(); + SysTryReturn(NID_GRP, pText, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text."); + + SysTryReturn(NID_GRP, index >= 0 && index < pSimpleText->GetTextLength() + , E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] text index(%d) must greater than 0 and must be less than total string length(%d)",index, pSimpleText->GetTextLength()); + + if (pText[index] == (wchar_t)L' ' || pText[index] == TEXT_JAPANESE_SPACE) + { + GetRegion(textIndexFromElementOffset, 1, spaceCharDim.width, spaceCharDim.height); + textLength--; + currentLength--; + startTextIndex++; + textIndexFromElementOffset++; + } + } + } + + GetRegion(startTextIndex, textLength, textSize.width, textSize.height); + if (action == TEXT_OBJECT_ACTION_TYPE_ABBREV) + { + if (__wrap == TEXT_OBJECT_WRAP_TYPE_NONE) + { + ForwardAnalyze(startTextIndex, textLength - startTextIndex, adjustedRect.width + , TEXT_OBJECT_WRAP_TYPE_NONE, textLength, textSize.width, textSize.height); + } + + 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) + { + 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) + { + adjustedRect.x += (adjustedRect.width - textSize.width) / 2; + } + break; + + case TEXT_OBJECT_ALIGNMENT_RIGHT: + if (textSize.width < adjustedRect.width) + { + adjustedRect.x += adjustedRect.width - textSize.width; + } + 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; + + 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; + } + + + if (drawAbbrevText) + { + 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; + } + } + else + { + if (LTRTextLength > 0) + { + currentLength = Math::Min(LTRTextLength, currentLength); + + 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); + + 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()) + { + 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) + { + 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; + + 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); + } + + 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); + } + + 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; + } + + if (drawAbbrevText) + { + 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; + } + } + + canvasImpl.SetTextOrigin(TEXT_ORIGIN_LEFT_TOP); + + Release(pEnum); + return E_SUCCESS; + +CATCH: + canvasImpl.SetTextOrigin(TEXT_ORIGIN_LEFT_TOP); + + Release(pEnum); + return r; +} + +result +TextComposite::DrawBlock(_CanvasImpl& canvasImpl, const FloatRectangle& displayRect, int startTextIndex, int textLength, + const TextObjectAlignment align, const TextObjectActionType action) +{ + int lineIndex = __pCurrentTextColumn->GetLineIndexAtTextIndex(startTextIndex); + TextLine* pTextLine = __pCurrentTextColumn->GetTextLine(lineIndex); + SysTryReturn(NID_GRP, pTextLine, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + int lineOffset = pTextLine->GetTextOffset(); + int blockStartTextIndex = Math::Max(__workStart, startTextIndex); + int blockEndTextIndex = Math::Min(__workStart + __workLength, startTextIndex + textLength); + int blockTextLength = blockEndTextIndex - blockStartTextIndex; + float left = 0; + float right = 0; + bool isRtL = false; + bool isLtR = false; + wchar_t ch; + + if (blockStartTextIndex >= blockEndTextIndex) + { + return E_SUCCESS; + } + + FloatRectangle lineBounds = pTextLine->GetBoundsF(); + blockStartTextIndex -= lineOffset; + blockEndTextIndex -= lineOffset; + FloatRectangle blockRect = displayRect; + blockRect.y = lineBounds.y; + + Collection::ArrayListT<_FloatPair>* pGapList = pTextLine->GetTextExtentList(); + + _FloatPair currentGap; + IEnumeratorT<_FloatPair >* pGapEnum = pGapList->GetEnumeratorN(); + + for (int i = 0; i <= blockStartTextIndex; i++) + { + pGapEnum->MoveNext(); + } + + pGapEnum->GetCurrent(currentGap); + float blockStart = currentGap.first; + float blockEnd = currentGap.second; + bool prevRtL = TextUtility::IsRTLCharacter(GetCharacter(blockStartTextIndex + lineOffset)); + TextBidiHint bidiHint = _GetTextBidiHint(); + bool isBidiEnabled = (bidiHint == TEXT_BIDI_HINT_RTL) ? true : false; + + for (int count = 0; count < blockTextLength; count++) + { + pGapEnum->GetCurrent(currentGap); + + ch = GetCharacter(blockStartTextIndex + lineOffset + count); + isRtL = TextUtility::IsRTLCharacter(ch); + isLtR = TextUtility::IsLTRCharacter(ch); + isRtL = (!isRtL && !isLtR) ? isBidiEnabled : isRtL; + + if (prevRtL == isRtL) + { + blockStart = (currentGap.first < blockStart) ? currentGap.first : blockStart; + blockEnd = (currentGap.second > blockEnd) ? currentGap.second : blockEnd; + } + else + { + if (blockStart != blockEnd) + { + canvasImpl.FillRectangle(__defaultBlockColor, FloatRectangle(blockRect.x + blockStart, displayRect.y, blockEnd - blockStart, displayRect.height)); + } + + blockStart = currentGap.first; + blockEnd = currentGap.second; + } + + left = currentGap.first; + right = currentGap.second; + prevRtL = isRtL; + + pGapEnum->MoveNext(); + } + + if (blockStart != blockEnd) + { + canvasImpl.FillRectangle(__defaultBlockColor, FloatRectangle(blockRect.x + blockStart, displayRect.y, blockEnd - blockStart, displayRect.height)); + } + + if ((pTextLine->GetEndType() == TEXT_RETBY_LINEFEED) && (pTextLine->GetTextLength() == blockEndTextIndex)) + { + canvasImpl.FillRectangle(__defaultBlockColor, FloatRectangle(blockRect.x + blockEnd, displayRect.y, LINE_FEED_WIDTH, displayRect.height)); + } + + Release(pGapEnum); + + return E_SUCCESS; +} + +result +TextComposite::DrawBackgroundBlock(_CanvasImpl& canvasImpl, const FloatRectangle& displayRect, int startTextIndex, int textLength, + const TextObjectAlignment align, const TextObjectActionType action) +{ + if (textLength == 0) + { + return E_SUCCESS; + } + + TextLine* pTextLine = __pCurrentTextColumn->GetTextLine(__pCurrentTextColumn->GetLineIndexAtTextIndex(startTextIndex)); + SysTryReturn(NID_GRP, pTextLine, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + int blockEndTextIndex = startTextIndex + textLength; + float prevLeft = 0; + float prevRight = 0; + int currentLength = 0; + int elementTextOffset = 0; + int elementIndex = 0; + int textIndexFromElementOffset = 0; + int textIndex = startTextIndex; + bool isRtL = false; + bool isLtR = false; + wchar_t ch; + + FloatRectangle lineBounds = pTextLine->GetBoundsF(); + FloatRectangle blockRect = displayRect; + blockRect.y = lineBounds.y; + + TextElement* pTextElement = GetElementAtTextIndex(startTextIndex, elementTextOffset, elementIndex, currentLength, textIndexFromElementOffset); + SysTryReturn(NID_GRP, pTextElement, -1, E_SYSTEM, "[E_SYSTEM] Fail to get text element."); + + TextElementType objectType = pTextElement->GetType(); + if (objectType == TEXT_ELEMENT_TYPE_CUTLINK || objectType == TEXT_ELEMENT_TYPE_TEXT) + { + TextSimple* pSimpleText = dynamic_cast < TextSimple* >(pTextElement); + if (pSimpleText != null) + { + Color backgroundColor = pSimpleText->GetBackgroundColor(); + const wchar_t* pText = pSimpleText->GetTextSource(); + + _FontImpl* pFontImpl = (_FontImpl::GetInstance(*const_cast < Font* >(pSimpleText->GetFont()))); + SysTryReturn(NID_GRP, pFontImpl, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get native font instance."); + + Collection::ArrayListT<_FloatPair> elemenGapListF; + pFontImpl->GetTextExtentList(pText, textIndexFromElementOffset, textLength, elemenGapListF); + + _FloatPair currentGap; + IEnumeratorT<_FloatPair >* pEnum = elemenGapListF.GetEnumeratorN(); + + pEnum->MoveNext(); + pEnum->GetCurrent(currentGap); + float blockStart = currentGap.first; + float blockEnd = currentGap.second; + bool prevRtL = TextUtility::IsRTLCharacter(GetCharacter(textIndex)); + TextBidiHint bidiHint = _GetTextBidiHint(); + bool isBidiEnabled = (bidiHint == TEXT_BIDI_HINT_RTL) ? true : false; + + while (textIndex < blockEndTextIndex) + { + pEnum->GetCurrent(currentGap); + + ch = GetCharacter(textIndex++); + isRtL = TextUtility::IsRTLCharacter(ch); + isLtR = TextUtility::IsLTRCharacter(ch); + isRtL = (!isRtL && !isLtR) ? isBidiEnabled : isRtL; + + if (prevRtL == isRtL) + { + blockStart = (currentGap.first < blockStart) ? currentGap.first : blockStart; + blockEnd = (currentGap.second > blockEnd) ? currentGap.second : blockEnd; + } + else + { + if (blockStart != blockEnd) + { + canvasImpl.FillRectangle(backgroundColor, FloatRectangle(blockRect.x + blockStart, displayRect.y, blockEnd - blockStart, displayRect.height)); + } + + blockStart = currentGap.first; + blockEnd = currentGap.second; + } + + prevLeft = currentGap.first; + prevRight = currentGap.second; + prevRtL = isRtL; + + pEnum->MoveNext(); + } + + if (blockStart != blockEnd) + { + canvasImpl.FillRectangle(backgroundColor, FloatRectangle(blockRect.x + blockStart, displayRect.y, blockEnd - blockStart, displayRect.height)); + } + + if ((pTextLine->GetEndType() == TEXT_RETBY_LINEFEED) && (pTextLine->GetTextOffset() + pTextLine->GetTextLength() == blockEndTextIndex)) + { + canvasImpl.FillRectangle(backgroundColor, FloatRectangle(blockRect.x + blockEnd, displayRect.y, LINE_FEED_WIDTH, displayRect.height)); + } + + Release(pEnum); + } + } + + return E_SUCCESS; +} + +result +TextComposite::DrawLine(_CanvasImpl& canvasImpl, TextLine* pTextLine, const FloatRectangle& displayRect, + const TextObjectAlignment align, const TextObjectActionType action) +{ + SysTryReturn(NID_GRP, pTextLine, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + int lineOffset = 0; + int lineLength = 0; + + FloatRectangle adjustedRect = displayRect; + + lineLength = pTextLine->GetTextLength(); + lineOffset = pTextLine->GetTextOffset(); + + adjustedRect.height = pTextLine->GetBoundsF().height; + + if (action == TEXT_OBJECT_ACTION_TYPE_ABBREV) + { + if (__elementVertialAlignment & TEXT_OBJECT_ALIGNMENT_BASELINE) + { + return DrawWithBaselineWithEllipsis(canvasImpl, adjustedRect, lineOffset, lineLength, + (TextObjectAlignment)((TEXT_ALIGNMASK_HORIZ & align) | TEXT_OBJECT_ALIGNMENT_BASELINE), action, pTextLine->GetBaselineF()); + } + else + { + return DrawWithEliipsis(canvasImpl, adjustedRect, lineOffset, lineLength, + (TextObjectAlignment)((TEXT_ALIGNMASK_HORIZ & align) | __elementVertialAlignment), action); + } + } + else + { + if (__elementVertialAlignment & TEXT_OBJECT_ALIGNMENT_BASELINE) + { + return DrawWithBaseline(canvasImpl, adjustedRect, lineOffset, lineLength, + (TextObjectAlignment)((TEXT_ALIGNMASK_HORIZ & align) | TEXT_OBJECT_ALIGNMENT_BASELINE), action, pTextLine->GetBaselineF()); + } + else + { + return Draw(canvasImpl, adjustedRect, lineOffset, lineLength, + (TextObjectAlignment)((TEXT_ALIGNMASK_HORIZ & align) | __elementVertialAlignment), action); + } + } +} + +result +TextComposite::GetValue(TextElement* pTextElement, TextComponentInfoValueType type, unsigned int* value) const +{ + SysTryReturn(NID_GRP, pTextElement, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + TextElementType objectType = TextUtility::GetObjectTypeFromValueType(type); + + SysTryReturn(NID_GRP, pTextElement->GetType() == objectType, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get type."); + + *value = pTextElement->GetValue(type); + + return E_SUCCESS; +} + +result +TextComposite::InsertElementAt(TextElement& textElement, int textIndex) +{ + SysTryReturn(NID_GRP, 0 <= textIndex && textIndex <= __length, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + result r = E_SUCCESS; + + TextElement* pCurrentTextElement = null; + TextElement* pNewTextElement = null; + + int currentLength = 0; + int elementTextOffset = 0; + int elementIndex = 0; + int textIndexFromElementOffset = 0; + + pCurrentTextElement = GetElementAtTextIndex(textIndex, elementTextOffset, elementIndex, + currentLength, textIndexFromElementOffset); + + if (pCurrentTextElement != null) + { + if (textIndex == elementTextOffset) + { + r = __pTextElementList->InsertAt(textElement, elementIndex); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Fail to insert element.", GetErrorMessage(r)); + } + else + { + pCurrentTextElement->SetTextLength(pCurrentTextElement->GetTextLength() - currentLength); + + r = __pTextElementList->InsertAt(textElement, ++elementIndex); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Fail to insert element.", GetErrorMessage(r)); + + pNewTextElement = pCurrentTextElement->CloneN(SET_ALLVALUE_CLONE, 0); + SysTryReturn(NID_GRP, pNewTextElement, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to clone text element."); + + pNewTextElement->SetTextLength(currentLength); + + if (textIndexFromElementOffset != 0) + { + pNewTextElement->SetValue(SET_TEXT_OFFSET, textIndexFromElementOffset); + } + + r = __pTextElementList->InsertAt(*pNewTextElement, ++elementIndex); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Fail to insert element.", GetErrorMessage(r)); + } + } + else + { + if (textIndex == __length) + { + r = __pTextElementList->Add(textElement); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Fail to add element.", GetErrorMessage(r)); + } + else + { + return E_SYSTEM; + } + } + + int elementTextLength = textElement.GetTextLength(); + + __workStart = textIndex; + __workLength = elementTextLength; + __length += elementTextLength; + __isChanged = true; + + TextElementType objectType = textElement.GetType(); + if (objectType == TEXT_ELEMENT_TYPE_CUTLINK) + { + TextCutLink* pLinkElement = dynamic_cast < TextCutLink* >(&textElement); + __pCutLinkListInfo->InsertCutLinkElementInfo(textIndex, *pLinkElement, elementTextLength); + } + else + { + __pCutLinkListInfo->InsertText(textIndex, elementTextLength); + } + + if (objectType == TEXT_ELEMENT_TYPE_CUTLINK || objectType == TEXT_ELEMENT_TYPE_TEXT) + { + TextSimple* pSimpleText = dynamic_cast < TextSimple* >(&textElement); + if (pSimpleText != null) + { + pSimpleText->SetUserWrap(__wrap); + } + } + + return r; +} + +result +TextComposite::AppendElement(TextElement& textElement) +{ + result r = E_SUCCESS; + int elementTextLength = textElement.GetTextLength(); + + r = __pTextElementList->Add(textElement); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Fail to add element.", GetErrorMessage(r)); + + __workStart = __length; + __workLength = elementTextLength; + __length += elementTextLength; + __isChanged = true; + + TextElementType objectType = textElement.GetType(); + if (objectType == TEXT_ELEMENT_TYPE_CUTLINK) + { + TextCutLink* pLinkElement = dynamic_cast < TextCutLink* >(&textElement); + __pCutLinkListInfo->InsertCutLinkElementInfo(__workStart, *pLinkElement, elementTextLength); + } + else + { + __pCutLinkListInfo->InsertText(__workStart, elementTextLength); + } + + if (objectType == TEXT_ELEMENT_TYPE_CUTLINK || objectType == TEXT_ELEMENT_TYPE_TEXT) + { + TextSimple* pSimpleText = dynamic_cast < TextSimple* >(&textElement); + if (pSimpleText != null) + { + pSimpleText->SetUserWrap(__wrap); + } + } + + return r; +} + +result +TextComposite::Remove(int startTextIndex, int textLength) +{ + if (textLength == 0) + { + return E_SUCCESS; + } + + result r = E_SUCCESS; + TextElement* pNewTextElement = null; + int startElementIndex = -1; + int endElementIndex = -1; + int elementTextOffset = 0; + int elementIndex = 0; + int currentLength = 0; + int textIndexFromElementOffset = 0; + int textIndex = startTextIndex; + int remainingLength = textLength; + + TextElement* pTextElement = GetElementAtTextIndex(textIndex, elementTextOffset, elementIndex, currentLength, textIndexFromElementOffset); + SysTryReturn(NID_GRP, pTextElement, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text element."); + SysTryReturn(NID_GRP, currentLength > 0, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] _Text::TextElement is invalid."); + + startElementIndex = elementIndex; + + if (elementTextOffset == textIndex && remainingLength == currentLength) + { + __pTextElementList->RemoveAt(elementIndex, true); + + goto TRUE_CATCH; + } + else if (elementTextOffset < textIndex && remainingLength < currentLength) + { + pTextElement->SetTextLength(pTextElement->GetTextLength() - currentLength); + + pNewTextElement = pTextElement->CloneN(SET_ALLVALUE_CLONE, 0); + SysTryReturn(NID_GRP, pNewTextElement, r, r, "[E_SYSTEM] Fail to clone text element."); + + pNewTextElement->SetTextLength(currentLength - remainingLength); + pNewTextElement->SetValue(SET_TEXT_OFFSET, textIndexFromElementOffset + remainingLength); + + r = __pTextElementList->InsertAt(*pNewTextElement, ++elementIndex); + SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Fail to insert element.", GetErrorMessage(r)); + + endElementIndex = elementIndex; + + goto TRUE_CATCH; + } + else if (elementTextOffset < textIndex) + { + pTextElement->SetTextLength(pTextElement->GetTextLength() - currentLength); + + textIndex += currentLength; + remainingLength -= currentLength; + elementIndex++; + } + + while (remainingLength > 0) + { + pTextElement = static_cast < TextElement* >(__pTextElementList->GetAt(elementIndex)); + if (!pTextElement) + { + endElementIndex = elementIndex; + break; + } + + textIndexFromElementOffset = pTextElement->GetValue(SET_TEXT_OFFSET); + currentLength = pTextElement->GetTextLength(); + + if (remainingLength < currentLength) + { + pTextElement->SetTextLength(currentLength - remainingLength); + pTextElement->SetValue(SET_TEXT_OFFSET, textIndexFromElementOffset + remainingLength); + + endElementIndex = elementIndex; + break; + } + else + { + __pTextElementList->RemoveAt(elementIndex, true); + } + + endElementIndex = elementIndex; + remainingLength -= currentLength; + } + +TRUE_CATCH: + __length -= textLength; + Optimize(startElementIndex, endElementIndex); + return E_SUCCESS; + +CATCH: + Release(pNewTextElement); + return r; +} + +result +TextComposite::RemoveElementAt(int elementIndex, bool deallocate) +{ + SysTryReturn(NID_GRP, elementIndex >= 0 && elementIndex < __pTextElementList->GetCount() + , E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + result r = E_SUCCESS; + TextElement* pTextElement = null; + + pTextElement = static_cast < TextElement* >(__pTextElementList->GetAt(elementIndex)); + if (pTextElement != null) + { + int elementTextLength = pTextElement->GetTextLength(); + int elementTextOffset = GetFirstTextIndexAt(elementIndex); + + r = __pTextElementList->RemoveAt(elementIndex); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Fail to remove element.", GetErrorMessage(r)); + + if (pTextElement->GetType() == TEXT_ELEMENT_TYPE_CUTLINK) + { + __pCutLinkListInfo->RemoveCutLinkElementInfo(dynamic_cast < TextCutLink* >(pTextElement)); + } + else + { + __pCutLinkListInfo->RemoveText(elementTextOffset, elementTextLength); + } + + __length -= elementTextLength; + + if (deallocate) + { + Release(pTextElement); + } + } + + return r; +} + +result +TextComposite::RemoveAllElements(bool deallocate) +{ + result r = E_SUCCESS; + + if (__pCutLinkListInfo) + { + __pCutLinkListInfo->RemoveAllCutLinkElementInfos(); + } + + __pTextElementList->RemoveAll(deallocate); + + SysTryCatch(NID_GRP, __pTextElementList->GetCount() == 0, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to remove all elements."); + + __workStart = 0; + __workLength = 0; + __length = 0; + __displayBlock = false; + __cursorIndex = -1; + + return E_SUCCESS; + +CATCH: + __workStart = 0; + __workLength = 0; + __length = 0; + __cursorIndex = -1; + + return r; +} + +TextElement* +TextComposite::SearchTextElement(TextElementType type, int textIndex, int& elementTextOffset) const +{ + SysTryReturn(NID_GRP, 0 <= textIndex && textIndex < __length, null, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + result r = E_SUCCESS; + IEnumerator* pEnum = null; + TextElement* pTextElement = null; + + int elementIndex = 0; + int currentLength = 0; + int textIndexFromElementOffset = 0; + + pTextElement = GetElementAtTextIndex(textIndex, elementTextOffset, elementIndex, currentLength, textIndexFromElementOffset); + SysTryReturn(NID_GRP, pTextElement, null, E_SYSTEM, "[E_SYSTEM] Fail to get text element."); + + if (pTextElement->GetType() == type) + { + return pTextElement; + } + + elementTextOffset += pTextElement->GetTextLength(); + + 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)); + } + + while (pEnum->MoveNext() == E_SUCCESS) + { + pTextElement = static_cast < TextElement* >(pEnum->GetCurrent()); + if (pTextElement == null) + { + continue; + } + + if (pTextElement->GetType() == type) + { + Release(pEnum); + SetLastResult(E_SUCCESS); + return pTextElement; + } + + elementTextOffset += pTextElement->GetTextLength(); + } + + Release(pEnum); + SetLastResult(E_SUCCESS); + return null; + +CATCH: + Release(pEnum); + return null; +} + +wchar_t* +TextComposite::GetTextN(int startTextIndex, int textLength) const +{ + SysTryReturn(NID_GRP, 0 <= startTextIndex && textLength <= __length, null, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + result r = E_SUCCESS; + IEnumerator* pEnum = null; + + int currentLength = 0; + int elementTextOffset = 0; + int elementIndex = 0; + 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] Memory allocation failed."); + + wchar_t* pTextPointer = pText; + + TextElement* pTextElement = GetElementAtTextIndex(startTextIndex, elementTextOffset, elementIndex, currentLength, textIndexFromElementOffset); + SysTryCatch(NID_GRP, pTextElement, , E_SYSTEM, "[E_SYSTEM] Fail to get element."); + + textIndexFromElementOffset = startTextIndex - elementTextOffset; + + pEnum = __pTextElementList->GetEnumeratorN(); + for (int i = 0; i < elementIndex; i++) + { + r = pEnum->MoveNext(); + } + + while (pEnum->MoveNext() == E_SUCCESS) + { + pTextElement = static_cast < TextElement* >(pEnum->GetCurrent()); + if (pTextElement) + { + currentLength = Math::Min(pTextElement->GetTextLength() - textIndexFromElementOffset, textLength); + + TextElementType objectType = pTextElement->GetType(); + + if (objectType == TEXT_ELEMENT_TYPE_TEXT || objectType == TEXT_ELEMENT_TYPE_CUTLINK) + { + TextSimple* pSimpleText = dynamic_cast < TextSimple* >(pTextElement); + if (pSimpleText) + { + const wchar_t* pSrcText = pSimpleText->GetText(); + TextUtility::CopyText(pTextPointer, &pSrcText[textIndexFromElementOffset], currentLength); + } + + textLength -= currentLength; + pTextPointer += currentLength; + } + } + + if (textLength <= 0) + { + break; + } + + textIndexFromElementOffset = 0; + } + + Release(pEnum); + return pText; + +CATCH: + if (pText) + { + delete[] pText; + pText = null; + } + + Release(pEnum); + return null; +} + +wchar_t +TextComposite::GetCharacter(int textIndex) const +{ + wchar_t ch = { 0 }; + + SysTryReturn(NID_GRP, 0 <= textIndex && textIndex <= __length, ch, E_INVALID_ARG + , "[E_INVALID_ARG] The argument is invalid. textIndex(%d), __length(%d)", textIndex, __length); + + result r = E_SUCCESS; + IEnumerator* pEnum = null; + int currentLength = 0; + int elementTextOffset = 0; + int elementIndex = 0; + int textIndexFromElementOffset = 0; + + TextElement* pTextElement = GetElementAtTextIndex(textIndex, elementTextOffset, elementIndex, currentLength, textIndexFromElementOffset); + SysTryReturn(NID_GRP, pTextElement, ch, E_SYSTEM, "[E_SYSTEM] Fail to get element."); + + textIndexFromElementOffset = textIndex - elementTextOffset; + + pEnum = __pTextElementList->GetEnumeratorN(); + for (int i = 0; i < elementIndex + 1; i++) + { + r = pEnum->MoveNext(); + } + + pTextElement = static_cast < TextElement* >(pEnum->GetCurrent()); + + if (pTextElement) + { + TextElementType objectType = pTextElement->GetType(); + + if (objectType == TEXT_ELEMENT_TYPE_TEXT || objectType == TEXT_ELEMENT_TYPE_CUTLINK) + { + TextSimple* pSimpleText = dynamic_cast < TextSimple* >(pTextElement); + if (pSimpleText) + { + const wchar_t* pText = pSimpleText->GetText(); + ch = pText[textIndexFromElementOffset]; + } + } + } + + Release(pEnum); + return ch; +} + +result +TextComposite::GetText(TextComposite* pTargetCompsiteText, int textIndex, int textLength) +{ + SysTryReturn(NID_GRP, pTargetCompsiteText, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + SysTryReturn(NID_GRP, 0 < textLength, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + result r = E_SUCCESS; + IEnumerator* pEnum = null; + TextElement* pTextElement = null; + TextElement* pNewTextElement = null; + + int currentLength = 0; + int elementTextOffset = 0; + int elementIndex = 0; + int textIndexFromElementOffset = 0; + + if (textIndex == -1 || textIndex < 0) + { + textIndex = 0; + } + + pTextElement = GetElementAtTextIndex(textIndex, elementTextOffset, elementIndex, currentLength, textIndexFromElementOffset); + SysTryReturn(NID_GRP, pTextElement, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element."); + + textIndexFromElementOffset = textIndex - elementTextOffset; + + 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)); + } + + while (pEnum->MoveNext() == E_SUCCESS) + { + pTextElement = static_cast < TextElement* >(pEnum->GetCurrent()); + if (pTextElement == null) + { + continue; + } + + textIndexFromElementOffset = 0; + currentLength = Math::Min(pTextElement->GetTextLength(), textLength); + + pNewTextElement = pTextElement->CopyN(textIndexFromElementOffset, currentLength); + if (pNewTextElement != null) + { + pTargetCompsiteText->AppendElement(*pNewTextElement); + } + + textLength -= currentLength; + } + + Release(pEnum); + return E_SUCCESS; + +CATCH : + Release(pEnum); + return r; +} + +int +TextComposite::Compose(FloatRectangle& rect, TextColumn* pTextColumn) +{ + SysTryReturn(NID_GRP, pTextColumn, -1, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + __pCurrentTextColumn = pTextColumn; + + int lineCount = 0; + + if (__pTextElementList->GetCount() == 0 || __length == 0) + { + pTextColumn->RemoveAllLines(); + + return -1; + } + + switch (__wrap) + { + case TEXT_OBJECT_WRAP_TYPE_NONE: + { + if (__drawAbbrevText) + { + __pCurrentTextColumn->PrepareCompose(); + __drawTextEllipsis = false; + + if (__TextObjectEllipsisType == TEXT_OBJECT_ELLIPSIS_TYPE_TAIL) + { + lineCount = ComposeInNoneWrap(rect); + } + else if (__TextObjectEllipsisType == TEXT_OBJECT_ELLIPSIS_TYPE_MIDDLE) + { + lineCount = ComposeInNoneWrapMiddleEllipsis(rect); + } + else + { + lineCount = ComposeInNoneWrapHeadEllipsis(rect); + } + } + else + { + bool setNoneWrapComposeInfo = false; + NoneWrapComposeInfo noneWrapComposeInfo; + + TextLine* pTextLine = __pCurrentTextColumn->GetTextLine(0); + if (pTextLine != null) + { + + noneWrapComposeInfo.prevTextOffset = pTextLine->GetTextOffset(); + noneWrapComposeInfo.prevTextLength = pTextLine->GetTextLength(); + pTextLine->GetRegion(0, noneWrapComposeInfo.prevTextLength, noneWrapComposeInfo.prevWidth, noneWrapComposeInfo.prevHeight); + noneWrapComposeInfo.prevEndType = pTextLine->GetEndType(); + setNoneWrapComposeInfo = true; + } + + __pCurrentTextColumn->PrepareCompose(); + __drawTextEllipsis = false; + if (setNoneWrapComposeInfo) + { + lineCount = ComposeInNoneWrap(rect, &noneWrapComposeInfo); + } + else + { + lineCount = ComposeInNoneWrap(rect); + } + } + + __pCurrentTextColumn->FinishCompose(); + break; + } + + case TEXT_OBJECT_WRAP_TYPE_CHARACTER: + { + __pCurrentTextColumn->PrepareCompose(); + lineCount = ComposeInWrap(rect); + __pCurrentTextColumn->FinishCompose(); + break; + } + + case TEXT_OBJECT_WRAP_TYPE_WORD: + { + if (IsPartialComposingModeEnabled()) + { + if (__pCurrentTextColumn->GetTotalLineCount() == 0) + { + __pCurrentTextColumn->PrepareCompose(); + } + lineCount = ComposeInPartialMode(rect); + } + else + { + __pCurrentTextColumn->PrepareCompose(); + //lineCount = ComposeInWrap(rect); + lineCount = ComposeInWrapInSweepMode(rect); + __pCurrentTextColumn->CompareDeletedLine(); + __pCurrentTextColumn->FinishCompose(); + } + + break; + } + } + + return lineCount; +} + +result +TextComposite::SetRange(int textStartIndex, int textLength) +{ + SysTryReturn(NID_GRP, 0 <= textStartIndex && textStartIndex <= __length, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + __workStart = textStartIndex; + __workLength = textLength; + + return E_SUCCESS; +} + +void +TextComposite::GetRange(int& startTextIndex, int& textLength) const +{ + startTextIndex = __workStart; + textLength = __workLength; +} + +result +TextComposite::SetDisplayBitmap(const Bitmap* pBitmap) +{ + if (__workLength == 0) + { + return E_SUCCESS; + } + + result r = E_SUCCESS; + IEnumerator* pEnum = null; + TextElement* pTextElement = null; + TextElement* pNewTextElement = null; + int startElementIndex = -1; + int endElementIndex = -1; + int textIndex = __workStart; + int textLength = __workLength; + int elementTextOffset = 0; + int elementIndex = 0; + int currentLength = 0; + int textIndexFromElementOffset = 0; + int found = false; + TextComponentInfoValueType type = SET_ALTERNATE_DISPLAY_BITMAP; + + BitmapDisplayProperty displayProperty; + displayProperty.displayEnable = true; + displayProperty.pBitmap = pBitmap; + + while (textLength > 0) + { + pTextElement = GetElementAtTextIndex(textIndex, elementTextOffset, elementIndex, currentLength, textIndexFromElementOffset); + SysTryReturn(NID_GRP, pTextElement, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text element."); + SysTryReturn(NID_GRP, 0 < currentLength, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] _Text::TextElement is invalid."); + + if (pTextElement->GetType() == TEXT_ELEMENT_TYPE_TEXT) + { + found = true; + startElementIndex = elementIndex; + break; + } + + textIndex += currentLength; + textLength -= currentLength; + } + + if (!found) + { + return E_SUCCESS; + } + + if (elementTextOffset == textIndex && textLength == currentLength) + { + pTextElement->SetValue(SET_ALTERNATE_DISPLAY_BITMAP, (unsigned int)&displayProperty); + displayProperty.displayEnable = false; + goto TRUE_CATCH; + } + else if (elementTextOffset < textIndex && textLength < currentLength) + { + pTextElement->SetTextLength(pTextElement->GetTextLength() - currentLength); + + pNewTextElement = pTextElement->CloneN(SET_ALTERNATE_DISPLAY_BITMAP, (unsigned int)&displayProperty); + SysTryReturn(NID_GRP, pNewTextElement, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to clone text element."); + + pNewTextElement->SetTextLength(textLength); + pNewTextElement->SetValue(SET_TEXT_OFFSET, textIndexFromElementOffset); + displayProperty.displayEnable = false; + + r = __pTextElementList->InsertAt(*pNewTextElement, ++elementIndex); + SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Fail to insert element.", GetErrorMessage(r)); + + pNewTextElement = pTextElement->CloneN(SET_ALLVALUE_CLONE, 0); + SysTryReturn(NID_GRP, pNewTextElement, r, r, "[E_SYSTEM] Fail to clone text element."); + + pNewTextElement->SetTextLength(currentLength - textLength); + pNewTextElement->SetValue(SET_TEXT_OFFSET, textIndexFromElementOffset + textLength); + + r = __pTextElementList->InsertAt(*pNewTextElement, ++elementIndex); + SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Fail to insert element.", GetErrorMessage(r)); + + endElementIndex = elementIndex; + goto TRUE_CATCH; + } + else if (elementTextOffset < textIndex) + { + pTextElement->SetTextLength(pTextElement->GetTextLength() - currentLength); + + pNewTextElement = pTextElement->CloneN(SET_ALTERNATE_DISPLAY_BITMAP, (unsigned int)&displayProperty); + SysTryReturn(NID_GRP, pNewTextElement, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to clone text element."); + + pNewTextElement->SetValue(SET_TEXT_OFFSET, textIndexFromElementOffset); + pNewTextElement->SetTextLength(currentLength); + displayProperty.displayEnable = false; + + r = __pTextElementList->InsertAt(*pNewTextElement, ++elementIndex); + SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Fail to insert element.", GetErrorMessage(r)); + + textIndex += currentLength; + textLength -= currentLength; + + if (textLength > 0) + { + pTextElement = GetElementAtTextIndex(textIndex, elementTextOffset, elementIndex, currentLength, textIndexFromElementOffset); + if (pTextElement == null) + { + goto TRUE_CATCH; + } + } + else + { + endElementIndex = elementIndex; + goto TRUE_CATCH; + } + } + + 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)); + } + + while (textLength > 0) + { + TextElementType objectType = pTextElement->GetType(); + TextElementType objectTypeFromValueType = TextUtility::GetObjectTypeFromValueType(type); + unsigned int elementValue = pTextElement->GetValue(SET_ALTERNATE_DISPLAY_BITMAP); + + if (objectType == objectTypeFromValueType && (unsigned int)&displayProperty != elementValue) + { + if (textLength < currentLength) + { + pNewTextElement = pTextElement->CloneN(SET_ALLVALUE_CLONE, 0); + SysTryReturn(NID_GRP, pNewTextElement, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to clone text element."); + + pNewTextElement->SetTextLength(currentLength - textLength); + pNewTextElement->SetValue(SET_TEXT_OFFSET, textIndexFromElementOffset + textLength); + + pTextElement->SetValue(SET_ALTERNATE_DISPLAY_BITMAP, (unsigned int)&displayProperty); + pTextElement->SetTextLength(textLength); + + r = __pTextElementList->InsertAt(*pNewTextElement, ++elementIndex); + SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Fail to insert element.", GetErrorMessage(r)); + + break; + } + else + { + pTextElement->SetValue(SET_ALTERNATE_DISPLAY_BITMAP, (unsigned int)&displayProperty); + } + + displayProperty.displayEnable = false; + endElementIndex = elementIndex; + } + + elementTextOffset += currentLength; + textLength -= currentLength; + elementIndex++; + + if (pEnum->MoveNext() != E_SUCCESS) + { + break; + } + + pTextElement = static_cast < TextElement* >(pEnum->GetCurrent()); + if (pTextElement == null) + { + break; + } + + currentLength = pTextElement->GetTextLength(); + textIndexFromElementOffset = pTextElement->GetValue(SET_TEXT_OFFSET); + } + +TRUE_CATCH: + Optimize(startElementIndex, endElementIndex); + Release(pEnum); + return E_SUCCESS; + +CATCH: + Release(pNewTextElement); + Release(pEnum); + return r; +} + +const Bitmap* +TextComposite::GetDisplayBitmap(int textIndex) const +{ + result r = E_SUCCESS; + unsigned int value = 0; + + r = GetValue(textIndex, SET_ALTERNATE_DISPLAY_BITMAP, &value); + SysTryReturn(NID_GRP, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + return (Bitmap*)value; +} + +result +TextComposite::SetFont(Font* pFont) +{ + return SetValueToAllTextElements(SET_FONT, (unsigned int)pFont); +} + +Font* +TextComposite::GetFont(int textIndex) const +{ + unsigned int value = 0; + + GetValue(textIndex, SET_FONT, &value); + Font* pFont = static_cast < Font* >((void*)value); + + SetLastResult(E_SUCCESS); + + return pFont; +} + +result +TextComposite::SetFontSize(int size) +{ + return SetValueToAllTextElements(SET_FONT_SIZE, (unsigned int)size); +} + +result +TextComposite::SetFontSize(float size) +{ + return SetFontSize(_CoordinateSystemUtils::ConvertToInteger(size)); +} + +int +TextComposite::GetFontSize(int textIndex) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetFontSizeF(textIndex)); +} + +float +TextComposite::GetFontSizeF(int textIndex) const +{ + unsigned int value = 0; + + result r = GetValue(textIndex, SET_FONT_SIZE, &value); + SysTryReturn(NID_GRP, r == E_SUCCESS, -1, r, "[%s] Propagating.", GetErrorMessage(r)); + + return (float)value; +} + +result +TextComposite::SetFontStyle(int style) +{ + return SetValueToAllTextElements(SET_FONT_STYLE, (unsigned int)style); +} + +int +TextComposite::GetFontStyle(int textIndex) const +{ + unsigned int value = 0; + + result r = GetValue(textIndex, SET_FONT_STYLE, &value); + SysTryReturn(NID_GRP + , r == E_SUCCESS + , -1, r, "[%s] Propagating.", GetErrorMessage(r)); + + return (int)value; +} + +result +TextComposite::SetForegroundColor(const Color& color) +{ + return SetValueToAllTextElements(SET_FONT_FGCOLOR, (unsigned int)color.GetRGB32()); +} + +Color +TextComposite::GetForegroundColor(int textIndex) const +{ + result r = E_SUCCESS; + unsigned int value = 0; + + r = GetValue(textIndex, SET_FONT_FGCOLOR, &value); + SysTryReturn(NID_GRP, r == E_SUCCESS, Color::GetColor(COLOR_ID_BLACK), r, "[%s] Propagating.", GetErrorMessage(r)); + + return Color(value); +} + +result +TextComposite::SetBackgroundColor(const Color& color) +{ + return SetValueToAllTextElements(SET_FONT_BGCOLOR, (unsigned int)color.GetRGB32()); +} + +Color +TextComposite::GetBackgroundColor(int textIndex) const +{ + result r = E_SUCCESS; + unsigned int value = 0; + + r = GetValue(textIndex, SET_FONT_BGCOLOR, &value); + SysTryReturn(NID_GRP, r == E_SUCCESS, Color::GetColor(COLOR_ID_BLACK), r, "[%s] Propagating.", GetErrorMessage(r)); + + return Color(value); +} + +result +TextComposite::SetOutlineColor(const Color& color) +{ + return SetValueToAllTextElements(SET_FONT_OUTLINECOLOR, (unsigned int)color.GetRGB32()); +} + +Color +TextComposite::GetOutlineColor(int textIndex) const +{ + result r = E_SUCCESS; + unsigned int value = 0; + + r = GetValue(textIndex, SET_FONT_OUTLINECOLOR, &value); + SysTryReturn(NID_GRP, r == E_SUCCESS, Color::GetColor(COLOR_ID_BLACK), r, "[%s] Propagating.", GetErrorMessage(r)); + + return Color(value); +} + +Color +TextComposite::GetAlternativeForegroundColor(int textIndex) const +{ + SysTryReturn(NID_GRP, 0 <= textIndex && textIndex < __length + , Color::GetColor(COLOR_ID_BLACK), E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + result r = E_SUCCESS; + unsigned int value = 0; + + r = GetValue(textIndex, SET_ALTERNATIVE_FGCOLOR, &value); + SysTryReturn(NID_GRP, r == E_SUCCESS, Color::GetColor(COLOR_ID_BLACK), r, "[%s] Propagating.", GetErrorMessage(r)); + + return Color(value); +} + +result +TextComposite::SetAlternateLookEnabled(bool enable) +{ + return SetValueToAllTextElements(SET_ALTERNATE_LOOK, (unsigned int)enable); +} + +int +TextComposite::GetMaxLineHeight(void) const +{ + IEnumerator* pEnum = null; + TextElement* pTextElement = null; + int height = 0; + int maxHeight = 0; + + pEnum = __pTextElementList->GetEnumeratorN(); + while (pEnum->MoveNext() == E_SUCCESS) + { + pTextElement = static_cast < TextElement* >(pEnum->GetCurrent()); + if (pTextElement == null) + { + continue; + } + + height = pTextElement->GetHeight(); + maxHeight = Math::Max(maxHeight, height); + } + + Release(pEnum); + return maxHeight; +} + +float +TextComposite::GetMaxLineHeightF(void) const +{ + return _CoordinateSystemUtils::ConvertToFloat(GetMaxLineHeight()); +} + +TextElement* +TextComposite::GetElementAtTextIndex(int textIndex, int& elementTextOffset, int& elementIndex, int& elementTextLength, + int& textIndexFromElementOffset) const +{ + result r = E_SUCCESS; + IEnumerator* pEnum = null; + TextElement* pTextElement = null; + int offset = 0; + int currentElementLength = 0; + + elementTextOffset = 0; + elementIndex = 0; + elementTextLength = 0; + textIndexFromElementOffset = 0; + + if (__pTextElementList->GetCount() == 0) + { + return null; + } + + pEnum = __pTextElementList->GetEnumeratorN(); + r = pEnum->MoveNext(); + SysTryReturn(NID_GRP, r == E_SUCCESS, null, r + , "[%s] Fail to move next element. Now Elements count is (%d)", GetErrorMessage(r), __pTextElementList->GetCount()); + + pTextElement = static_cast < TextElement* >(pEnum->GetCurrent()); + SysTryReturn(NID_GRP, pTextElement, null, E_SYSTEM, "[E_SYSTEM] Fail to get text element."); + + while (1) + { + currentElementLength = pTextElement->GetTextLength(); + if (textIndex < elementTextOffset + currentElementLength) + { + offset = pTextElement->GetValue(SET_TEXT_OFFSET); + textIndexFromElementOffset = offset + (textIndex - elementTextOffset); + break; + } + else + { + if (currentElementLength == 0 && textIndex == elementTextOffset) + { + offset = pTextElement->GetValue(SET_TEXT_OFFSET); + textIndexFromElementOffset = offset + (textIndex - elementTextOffset); + break; + } + } + + pTextElement = null; + if (pEnum->MoveNext() != E_SUCCESS) + { + break; + } + + pTextElement = static_cast < TextElement* >(pEnum->GetCurrent()); + if (pTextElement == null) + { + break; + } + + elementTextOffset += currentElementLength; + elementIndex++; + } + + if (pTextElement != null) + { + elementTextLength = elementTextOffset + currentElementLength - textIndex; + } + + Release(pEnum); + return pTextElement; +} + +TextElement* +TextComposite::GetElementAtTextIndex(int textIndex) const +{ + result r = E_SUCCESS; + IEnumerator* pEnum = null; + TextElement* pTextElement = null; + int currentElementLength = 0; + int elementTextOffset = 0; + + if (__pTextElementList->GetCount() == 0 || textIndex < 0) + { + return null; + } + + pEnum = __pTextElementList->GetEnumeratorN(); + r = pEnum->MoveNext(); + SysTryReturn(NID_GRP, r == E_SUCCESS, null, r, "[%s] Fail to move next element. Now Elements count is (%d)" + , GetErrorMessage(r), __pTextElementList->GetCount()); + + pTextElement = static_cast < TextElement* >(pEnum->GetCurrent()); + SysTryReturn(NID_GRP, pTextElement, null, E_SYSTEM, "[E_SYSTEM] Fail to get text element."); + + while (1) + { + currentElementLength = pTextElement->GetTextLength(); + if (textIndex < elementTextOffset + currentElementLength) + { + break; + } + else + { + if (currentElementLength == 0 && textIndex == elementTextOffset) + { + break; + } + } + + pTextElement = null; + if (pEnum->MoveNext() != E_SUCCESS) + { + break; + } + + pTextElement = static_cast < TextElement* >(pEnum->GetCurrent()); + if (pTextElement == null) + { + break; + } + + elementTextOffset += currentElementLength; + } + + Release(pEnum); + return pTextElement; +} + +result +TextComposite::SetWrap(TextObjectWrapType wrap) +{ + if (__wrap == wrap) + { + return E_SUCCESS; + } + + __wrap = wrap; + + IEnumerator* pEnum = null; + TextElement* pTextElement = null; + + pEnum = __pTextElementList->GetEnumeratorN(); + while (pEnum->MoveNext() == E_SUCCESS) + { + pTextElement = static_cast < TextElement* >(pEnum->GetCurrent()); + if (pTextElement == null) + { + continue; + } + + TextElementType objectType = pTextElement->GetType(); + if (objectType == TEXT_ELEMENT_TYPE_TEXT || objectType == TEXT_ELEMENT_TYPE_CUTLINK) + { + TextSimple* pSimpleText = dynamic_cast < TextSimple* >(pTextElement); + if (pSimpleText != null) + { + pSimpleText->SetUserWrap(__wrap); + } + } + } + + Release(pEnum); + return E_SUCCESS; +} + +result +TextComposite::Optimize(int startElementIndex, int endElementIndex) +{ + TextElement* pStartTextElement = null; + TextElement* pEndTextElement = null; + TextElement* pCurrentTextElement = null; + TextElement* pNextTextElement = null; + int elementIndex = 0; + int elementCount = __pTextElementList->GetCount(); + + if (elementCount == 0) + { + return E_SUCCESS; + } + + startElementIndex = (startElementIndex == -1 || startElementIndex < 0) ? 0 : startElementIndex; + endElementIndex = (endElementIndex == -1 || endElementIndex < 0 || endElementIndex > elementCount - 1) ? elementCount - 1 : endElementIndex; + startElementIndex = (0 < startElementIndex) ? startElementIndex - 1 : startElementIndex; + endElementIndex = (endElementIndex < elementCount - 1) ? endElementIndex + 1 : endElementIndex; + + if (endElementIndex - startElementIndex < 1) + { + return E_SUCCESS; + } + + pStartTextElement = static_cast < TextElement* >(__pTextElementList->GetAt(startElementIndex)); + SysTryReturn(NID_GRP, pStartTextElement, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text element."); + + pEndTextElement = static_cast < TextElement* >(__pTextElementList->GetAt(endElementIndex)); + SysTryReturn(NID_GRP, pEndTextElement, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text element."); + + do + { + pCurrentTextElement = pStartTextElement; + + elementIndex = startElementIndex + 1; + pNextTextElement = static_cast < TextElement* >(__pTextElementList->GetAt(elementIndex)); + if (pNextTextElement == null) + { + break; + } + + if (TextUtility::CanMerge(pCurrentTextElement, pNextTextElement)) + { + pCurrentTextElement->SetTextLength(pCurrentTextElement->GetTextLength() + pNextTextElement->GetTextLength()); + __pTextElementList->RemoveAt(elementIndex, true); + } + else + { + pStartTextElement = pNextTextElement; + startElementIndex++; + } + + pStartTextElement = static_cast < TextElement* >(__pTextElementList->GetAt(startElementIndex)); + if (pStartTextElement == null) + { + break; + } + } + while (startElementIndex != endElementIndex); + + return E_SUCCESS; +} + +result +TextComposite::ChangeTextOffset(wchar_t* pText, int elementIndex, int gap) +{ + SysTryReturn(NID_GRP, 0 <= elementIndex, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + SysTryReturn(NID_GRP, gap != 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + result r = E_SUCCESS; + IEnumerator* pEnum = null; + TextElement* pTextElement = null; + + 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)); + } + + while (pEnum->MoveNext() == E_SUCCESS) + { + pTextElement = static_cast < TextElement* >(pEnum->GetCurrent()); + if (pTextElement == null) + { + continue; + } + + TextElementType objectType = pTextElement->GetType(); + if (objectType == TEXT_ELEMENT_TYPE_TEXT || objectType == TEXT_ELEMENT_TYPE_CUTLINK) + { + TextSimple* pSimpleText = dynamic_cast < TextSimple* >(pTextElement); + if (pSimpleText != null) + { + pSimpleText->ChangeTextOffset(pText, gap); + } + } + } + + Release(pEnum); + return E_SUCCESS; + +CATCH: + Release(pEnum); + return r; +} + +result +TextComposite::NotifyTextChanged(wchar_t* pText, int startTextIndex, int textLength, int gap, Font* pFont, + const Color& fgColor, const Color& bgColor, const Color& outlineColor) +{ + if (gap == 0) + { + return E_SUCCESS; + } + + result r = E_SUCCESS; + TextElement* pTextElement = null; + TextElement* pNextTextElement = null; + + int currentLength = 0; + int elementTextOffset = 0; + int elementIndex = 0; + int textIndexFromElementOffset = 0; + bool isOptimized = false; + + //SetWorkWidth(pFont, pText, __workStart, gap); + + if (gap > 0) + { + bool checkNextElement = false; + + if (__workStart == startTextIndex) + { + pTextElement = GetElementAtTextIndex(__workStart, elementTextOffset, elementIndex, currentLength, + textIndexFromElementOffset); + } + else + { + pTextElement = GetElementAtTextIndex(__workStart - 1, elementTextOffset, elementIndex, currentLength, + textIndexFromElementOffset); + checkNextElement = true; + } + + if (pTextElement == null) + { + 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] Memory allocation failed."); + + pSimpleText->SetTextOffset(__workStart - startTextIndex); + InsertElementAt(*pSimpleText, __workStart); + + return E_SUCCESS; + } + else + { + TextSimple* pSimpleText = null; + bool canMerge = false; + + TextElementType objectType = pTextElement->GetType(); + if (objectType == TEXT_ELEMENT_TYPE_TEXT || objectType == TEXT_ELEMENT_TYPE_CUTLINK) + { + pSimpleText = dynamic_cast < TextSimple* >(pTextElement); + if (pSimpleText != null) + { + if (pSimpleText->IsSame(pText, pFont, fgColor, bgColor, outlineColor, false)) + { + canMerge = true; + } + else + { + pTextElement = null; + } + } + } + else + { + pTextElement = null; + } + + if (!canMerge && checkNextElement) + { + pTextElement = null; + + if (currentLength == 1) + { + pNextTextElement = static_cast < TextElement* >(__pTextElementList->GetAt(elementIndex+1)); + if (pNextTextElement != null) + { + objectType = pNextTextElement->GetType(); + if (objectType == TEXT_ELEMENT_TYPE_TEXT || objectType == TEXT_ELEMENT_TYPE_CUTLINK) + { + pSimpleText = dynamic_cast < TextSimple* >(pNextTextElement); + if (pSimpleText != null) + { + if (pSimpleText->IsSame(pText, pFont, fgColor, bgColor, outlineColor, false)) + { + elementIndex++; + pTextElement = pNextTextElement; + } + else + { + pTextElement = null; + } + } + } + else + { + pTextElement = null; + } + } + else + { + pTextElement = null; + } + } + } + + if (pTextElement == null) + { + 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] Memory allocation failed."); + + pSimpleText->SetTextOffset(__workStart - startTextIndex); + InsertElementAt(*pSimpleText, __workStart); + + isOptimized = true; + r = __pTextElementList->IndexOf(*pSimpleText, elementIndex); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Fail to get element index.", GetErrorMessage(r)); + } + else + { + __pCutLinkListInfo->InsertText(startTextIndex, gap); + __length += gap; + pTextElement->SetTextLength(pTextElement->GetTextLength() + gap); + } + } + } + else if (gap < 0) + { + int remainingGap = -gap; + int currentGap = 0; + int textIndex = 0; + int currentelementIndex = 0; + + textIndex = __workStart + remainingGap; + pTextElement = GetElementAtTextIndex(textIndex, elementTextOffset, elementIndex, currentLength,textIndexFromElementOffset); + if (pTextElement == null || elementTextOffset == textIndex) + { + pTextElement = GetElementAtTextIndex(textIndex - 1, elementTextOffset, elementIndex, currentLength,textIndexFromElementOffset); + } + + SysTryReturn(NID_GRP, pTextElement, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text element."); + + currentelementIndex = elementIndex; + currentGap = Math::Min(remainingGap, textIndex - elementTextOffset); + if (currentGap == pTextElement->GetTextLength()) + { + RemoveElementAt(currentelementIndex); + elementIndex--; + isOptimized = true; + } + else + { + pTextElement->SetTextLength(pTextElement->GetTextLength() - currentGap); + __length -= currentGap; + if (currentGap < remainingGap) + { + TextSimple* pSimpleText = dynamic_cast < TextSimple* >(pTextElement); + if (pSimpleText != null) + { + int offset = pSimpleText->GetTextOffset(); + offset -= (remainingGap - currentGap); + pSimpleText->SetTextOffset(offset); + } + } + } + + remainingGap -= currentGap; + while (remainingGap > 0) + { + pTextElement = static_cast < TextElement* >(__pTextElementList->GetAt(--currentelementIndex)); + SysTryReturn(NID_GRP, pTextElement, r, r, "[%s] Fail to get element.", GetErrorMessage(r)); + + int elementTextLength = pTextElement->GetTextLength(); + currentGap = Math::Min(elementTextLength, remainingGap); + + if (currentGap == elementTextLength) + { + RemoveElementAt(currentelementIndex); + elementIndex--; + isOptimized = true; + } + else + { + __pCutLinkListInfo->RemoveText(__workStart, currentGap); + pTextElement->SetTextLength(elementTextLength - currentGap); + __length -= currentGap; + } + + remainingGap -= currentGap; + } + } + + ChangeTextOffset(pText, elementIndex + 1, gap); + + if (isOptimized) + { + Optimize(elementIndex, elementIndex); + } + + return E_SUCCESS; +} + +int +TextComposite::ForwardAnalyzeWithFocusedObjectType(int textIndex, int textLength, int maxWidth, + int& cursorIndex, TextElementType& type) +{ + return ForwardAnalyzeWithFocusedObjectType(textIndex, textLength + , _CoordinateSystemUtils::ConvertToFloat(maxWidth), cursorIndex, type); +} + +int +TextComposite::ForwardAnalyzeWithFocusedObjectType(int textIndex, int textLength, float maxWidth, + int& cursorIndex, TextElementType& type) +{ + result r = E_SUCCESS; + FloatDimension textSize; + int currentLength = 0; + int elementTextOffset = 0; + int elementIndex = 0; + int textIndexFromElementOffset = 0; + int textCount = 0; + float remainingWidth = 0; + int remainingLength = 0; + int ret = TEXT_RETBY_NORMAL; + bool isFirstWord = true; + int index = 0; + + IEnumerator* pEnum = null; + TextElement* pTextElement = null; + + cursorIndex = 0; + type = TEXT_ELEMENT_TYPE_MAX; + + pTextElement = GetElementAtTextIndex(textIndex, elementTextOffset, elementIndex, currentLength, textIndexFromElementOffset); + SysTryReturn(NID_GRP, pTextElement, -1, E_SYSTEM, "[E_SYSTEM] Fail to get text element."); + + remainingWidth = maxWidth; + remainingLength = textLength; + + 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(remainingLength, currentLength); + + while (remainingWidth > 0 || remainingLength > 0) + { + ret = pTextElement->ForwardAnalyze(textIndexFromElementOffset, currentLength, remainingWidth, __wrap, textCount , textSize.width, textSize.height); + TextElementType objectType = pTextElement->GetType(); + + if ((objectType == TEXT_ELEMENT_TYPE_TEXT || objectType == TEXT_ELEMENT_TYPE_CUTLINK) && (ret == TEXT_RETBY_LIMITWIDTH)) + { + FloatDimension tempTextSize; + r = pTextElement->GetRegion(textIndexFromElementOffset, textCount + 1, tempTextSize.width, tempTextSize.height); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + if ((remainingWidth - textSize.width) > (tempTextSize.width - remainingWidth)) + { + textSize.width = tempTextSize.width; + textCount++; + } + } + + remainingWidth -= textSize.width; + remainingWidth = (remainingWidth < 0) ? 0 : remainingWidth; + + remainingLength -= textCount; + currentLength -= textCount ; + cursorIndex += textCount ; + + if (__wrap == TEXT_OBJECT_WRAP_TYPE_WORD && ret != TEXT_RETBY_LIMITWIDTH) + { + index = cursorIndex; + } + + if (remainingLength <= currentLength) + { + break; + } + + if (ret == TEXT_RETBY_OVERWIDTH || ret == TEXT_RETBY_LINEFEED) + { + break; + } + + if (__wrap == TEXT_OBJECT_WRAP_TYPE_WORD) + { + if (ret == TEXT_RETBY_LIMITWIDTH) + { + if (isFirstWord == false) + { + cursorIndex = index; + ret = TEXT_RETBY_NORMAL; + } + break; + } + + isFirstWord = false; + + if (currentLength > 0) + { + textIndexFromElementOffset += textCount ; + continue; + } + } + else + { + if (ret == TEXT_RETBY_LIMITWIDTH) + { + break; + } + } + + if (pEnum->MoveNext() != E_SUCCESS) + { + break; + } + + pTextElement = static_cast < TextElement* >(pEnum->GetCurrent()); + if (pTextElement == null) + { + break; + } + + textIndexFromElementOffset = pTextElement->GetValue(SET_TEXT_OFFSET); + currentLength = Math::Min(pTextElement->GetTextLength(), remainingLength); + } + + if (ret == TEXT_RETBY_LIMITLENGTH) + { + ret = TEXT_RETBY_NORMAL; + } + + SetLastResult(E_SUCCESS); + Release(pEnum); + return ret; + +CATCH: + Release(pEnum); + return -1; +} + +void +TextComposite::HideFrontSpace(TextObjectSpaceHideType mode) +{ + __ignoreFrontBlank = true; + __frontSpaceHideMode = mode; +} + +void +TextComposite::HideRearSpace(TextObjectSpaceHideType mode) +{ + __ignoreRearBlank = true; + __rearSpaceHideMode = mode; +} + +int +TextComposite::ForwardAnalyzeInNoneCursorMode(int startTextIndex, int textLength, int maxWidth, int& textIndex) +{ + return ForwardAnalyzeInNoneCursorMode(startTextIndex, textLength + , _CoordinateSystemUtils::ConvertToFloat(maxWidth), textIndex); +} + +int +TextComposite::ForwardAnalyzeInNoneCursorMode(int startTextIndex, int textLength, float maxWidth, int& textIndex) +{ + result r = E_SUCCESS; + FloatDimension textSize; + int currentLength = 0; + int elementTextOffset = 0; + int elementIndex = 0; + int textIndexFromElementOffset = 0; + int textCount = 0; + float remainingWidth = 0; + int remainingLength = 0; + int ret = TEXT_RETBY_NORMAL; + bool isFirstWord = true; + int index = 0; + textIndex = 0; + + IEnumerator* pEnum = null; + TextElement* pTextElement = null; + + pTextElement = GetElementAtTextIndex(startTextIndex, elementTextOffset, elementIndex, currentLength, textIndexFromElementOffset); + SysTryReturn(NID_GRP, pTextElement, -1, E_SYSTEM, "[E_SYSTEM] Fail to get text element."); + + textCount = 0; + remainingWidth = maxWidth; + remainingLength = textLength; + + 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(remainingLength, currentLength); + + while (remainingWidth > 0 || remainingLength > 0) + { + ret = pTextElement->ForwardAnalyze(textIndexFromElementOffset, currentLength, remainingWidth, + __wrap, textCount, textSize.width, textSize.width); + + TextElementType objectType = pTextElement->GetType(); + + if ((objectType == TEXT_ELEMENT_TYPE_TEXT || objectType == TEXT_ELEMENT_TYPE_CUTLINK) && (ret == TEXT_RETBY_LIMITWIDTH)) + { + FloatDimension tempTextSize; + r = pTextElement->GetRegion(textIndexFromElementOffset, textCount + 1, tempTextSize.width, tempTextSize.height); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + textSize.width = tempTextSize.width; + textCount++; + } + + remainingWidth -= textSize.width; + remainingWidth = (remainingWidth < 0) ? 0 : remainingWidth; + + remainingLength -= textCount; + currentLength -= textCount; + textIndex += textCount; + + if (__wrap == TEXT_OBJECT_WRAP_TYPE_WORD && ret != TEXT_RETBY_LIMITWIDTH) + { + index = textIndex; + } + + if (remainingLength <= currentLength) + { + break; + } + + if (ret == TEXT_RETBY_OVERWIDTH || ret == TEXT_RETBY_LINEFEED) + { + break; + } + + if (__wrap == TEXT_OBJECT_WRAP_TYPE_WORD) + { + if (ret == TEXT_RETBY_LIMITWIDTH) + { + if (isFirstWord == false) + { + textIndex = index; + ret = TEXT_RETBY_NORMAL; + } + break; + } + + isFirstWord = false; + + if (currentLength > 0) + { + textIndexFromElementOffset += textCount; + continue; + } + } + else + { + if (ret == TEXT_RETBY_LIMITWIDTH) + { + break; + } + } + + if (pEnum->MoveNext() != E_SUCCESS) + { + break; + } + + pTextElement = static_cast < TextElement* >(pEnum->GetCurrent()); + if (pTextElement == null) + { + break; + } + + textIndexFromElementOffset = pTextElement->GetValue(SET_TEXT_OFFSET); + currentLength = Math::Min(pTextElement->GetTextLength(), remainingLength); + } + + if (ret == TEXT_RETBY_LIMITLENGTH) + { + ret = TEXT_RETBY_NORMAL; + } + + SetLastResult(E_SUCCESS); + Release(pEnum); + return ret; + +CATCH: + Release(pEnum); + return ret; +} + +int +TextComposite::GetCutLinkElementCount(void) const +{ + return __pCutLinkListInfo->GetCutLinkElementCount(); +} + +int +TextComposite::GetCutLinkElementIndexAt(int textIndex) const +{ + return __pCutLinkListInfo->GetCutLinkElementIndexAt(textIndex); +} + +TextCutLink* +TextComposite::GetCutLinkElementAtCutLinkElementIndex(int index) const +{ + return __pCutLinkListInfo->GetCutLinkElementAtCutLinkElementIndex(index); +} + +result +TextComposite::ResetAllCutLinkElementsState(void) +{ + return __pCutLinkListInfo->ResetAllCutLinkElementsState(); +} + +result +TextComposite::ChangeCutLinkState(int linkIndex, bool select) +{ + return __pCutLinkListInfo->ChangeCutLinkState(linkIndex, select); +} + +result +TextComposite::SetValueToAllTextElements(TextComponentInfoValueType type, unsigned int value) +{ + if (__workLength == 0) + { + return E_SUCCESS; + } + + result r = E_SUCCESS; + IEnumerator* pEnum = null; + TextElement* pTextElement = null; + TextElement* pNewTextElement = null; + int startElementIndex = -1; + int endElementIndex = -1; + int textIndex = 0; + int textLength = 0; + int elementTextOffset = 0; + int elementIndex = 0; + int currentLength = 0; + int textIndexFromElementOffset = 0; + int found = false; + + textIndex = __workStart; + textLength = __workLength; + + while (textLength > 0) + { + pTextElement = GetElementAtTextIndex(textIndex, elementTextOffset, elementIndex, currentLength, textIndexFromElementOffset); + SysTryReturn(NID_GRP, pTextElement, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text element. textIndex(%d)", textIndex); + SysTryReturn(NID_GRP, 0 < currentLength, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] _Text::TextElement is invalid."); + + TextElementType objectType = pTextElement->GetType(); + unsigned int elementValue = pTextElement->GetValue(type); + TextElementType objectTypeFromValueType = TextUtility::GetObjectTypeFromValueType(type); + + if (objectType == objectTypeFromValueType && value != elementValue) + { + found = true; + startElementIndex = elementIndex; + break; + } + else if ((COMMONOBJECT_VALUE_START <= type && type < MAX_COMMONOBJECT_VALUE) && (value != elementValue)) + { + found = true; + startElementIndex = elementIndex; + break; + } + + textIndex += currentLength; + textLength -= currentLength; + } + + if (!found) + { + return E_SUCCESS; + } + + if (elementTextOffset == textIndex && textLength == currentLength) + { + pTextElement->SetValue(type, value); + goto TRUE_CATCH; + } + else if (elementTextOffset < textIndex && textLength < currentLength) + { + pTextElement->SetTextLength(pTextElement->GetTextLength() - currentLength); + + pNewTextElement = pTextElement->CloneN(type, value); + SysTryReturn(NID_GRP, pNewTextElement, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to clone text element."); + + pNewTextElement->SetTextLength(textLength); + pNewTextElement->SetValue(SET_TEXT_OFFSET, textIndexFromElementOffset); + + r = __pTextElementList->InsertAt(*pNewTextElement, ++elementIndex); + SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Fail to insert element.", GetErrorMessage(r)); + + pNewTextElement = pTextElement->CloneN(SET_ALLVALUE_CLONE, 0); + SysTryReturn(NID_GRP, pNewTextElement, r, r, "[E_SYSTEM] Fail to clone text element."); + + pNewTextElement->SetTextLength(currentLength - textLength); + pNewTextElement->SetValue(SET_TEXT_OFFSET, textIndexFromElementOffset + textLength); + + r = __pTextElementList->InsertAt(*pNewTextElement, ++elementIndex); + SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Fail to insert element.", GetErrorMessage(r)); + + endElementIndex = elementIndex; + goto TRUE_CATCH; + } + else if (elementTextOffset < textIndex) + { + pTextElement->SetTextLength(pTextElement->GetTextLength() - currentLength); + + pNewTextElement = pTextElement->CloneN(type, value); + SysTryReturn(NID_GRP, pNewTextElement, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to clone text element."); + + pNewTextElement->SetValue(SET_TEXT_OFFSET, textIndexFromElementOffset); + pNewTextElement->SetTextLength(currentLength); + + r = __pTextElementList->InsertAt(*pNewTextElement, ++elementIndex); + SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Fail to insert element.", GetErrorMessage(r)); + + textIndex += currentLength; + textLength -= currentLength; + + if (textLength > 0) + { + pTextElement = GetElementAtTextIndex(textIndex, elementTextOffset, elementIndex, currentLength, textIndexFromElementOffset); + if (pTextElement == null) + { + goto TRUE_CATCH; + } + } + else + { + endElementIndex = elementIndex; + goto TRUE_CATCH; + } + } + + 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)); + } + + while (textLength > 0) + { + TextElementType objectType = pTextElement->GetType(); + TextElementType objectTypeFromValueType = TextUtility::GetObjectTypeFromValueType(type); + unsigned int elementValue = pTextElement->GetValue(type); + + if (objectType == objectTypeFromValueType && value != elementValue) + { + if (textLength < currentLength) + { + pNewTextElement = pTextElement->CloneN(SET_ALLVALUE_CLONE, 0); + SysTryReturn(NID_GRP, pNewTextElement, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to clone text element."); + + pNewTextElement->SetTextLength(currentLength - textLength); + pNewTextElement->SetValue(SET_TEXT_OFFSET, textIndexFromElementOffset + textLength); + + pTextElement->SetValue(type, value); + pTextElement->SetTextLength(textLength); + + r = __pTextElementList->InsertAt(*pNewTextElement, ++elementIndex); + SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Fail to insert element.", GetErrorMessage(r)); + + break; + } + else + { + pTextElement->SetValue(type, value); + } + + endElementIndex = elementIndex; + } + + elementTextOffset += currentLength; + textLength -= currentLength; + elementIndex++; + + if (pEnum->MoveNext() != E_SUCCESS) + { + break; + } + + pTextElement = static_cast < TextElement* >(pEnum->GetCurrent()); + if (pTextElement == null) + { + break; + } + + currentLength = pTextElement->GetTextLength(); + textIndexFromElementOffset = pTextElement->GetValue(SET_TEXT_OFFSET); + } + +TRUE_CATCH: + Optimize(startElementIndex, endElementIndex); + Release(pEnum); + return E_SUCCESS; + +CATCH: + Release(pNewTextElement); + Release(pEnum); + return r; +} + +bool +TextComposite::SetAbbrevObjectFontInfo(TextSimple* pSimpleText) +{ + SysTryReturn(NID_GRP, __pAbbrevTextElement, false, E_INVALID_STATE, "[E_INVALID_STATE] This instance is not constructed yet."); + + __pAbbrevTextElement->SetFont(pSimpleText->GetFont()); + __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; +} + +int +TextComposite::ComposeInNoneWrap(FloatRectangle& rect, NoneWrapComposeInfo* pNoneWrapComposeInfo) +{ + 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] Memory allocation failed."); + + FloatRectangle lineBounds; + FloatDimension lineTextSize; + int lineLength = __length; + float baseline = 0.0f; + float elementBaseline = 0.0f; + + GetRegion(0, lineLength, lineTextSize.width, lineTextSize.height); + lineBounds.width = (rect.width < lineTextSize.width) ? lineTextSize.width :rect.width; + lineBounds.height = lineTextSize.height; + + for (int i = 0; i < GetElementCount(); i++) + { + TextElement* pTextElement = static_cast < TextElement* >(__pTextElementList->GetAt(0)); + if (pTextElement) + { + TextSimple* pSimpleText = dynamic_cast < TextSimple* >(pTextElement); + if (pSimpleText) + { + elementBaseline = pSimpleText->GetBaselineF(); + if (baseline < elementBaseline) + { + baseline = elementBaseline; + } + } + } + } + + pTextLine->SetBounds(lineBounds); + pTextLine->SetRegion(lineTextSize.width, lineTextSize.height); + pTextLine->SetTextOffset(0); + pTextLine->SetTextLength(lineLength); + pTextLine->SetEndType(TEXT_RETBY_NORMAL); + pTextLine->SetBaseline(baseline); + GetTextExtentList(pTextLine); + + __pCurrentTextColumn->AddLineDuringCompose(pTextLine); + + return 1; +} + +result +TextComposite::GetTextExtentList(TextLine* pTextLine) const +{ + result r = E_SUCCESS; + int lineOffset = pTextLine->GetTextOffset(); + int lineLength = pTextLine->GetTextLength(); + int elementTextOffset = 0; + int elementIndex = 0; + int currentLength = 0; + int textIndexFromElementOffset = 0; + int remainingLength = 0; + float right = 0; + float maxWidth = 0; + + if (lineLength == 0) + { + return E_SUCCESS; + } + + TextElement* pTextElement = GetElementAtTextIndex(lineOffset, elementTextOffset, elementIndex, currentLength, textIndexFromElementOffset); + SysTryReturn(NID_GRP, pTextElement, -1, E_SYSTEM, "[E_SYSTEM] Fail to get text element. (lineOffset = %d)", lineOffset); + + remainingLength = lineLength; + currentLength = Math::Min(remainingLength, currentLength); + + IEnumerator* pEnum = __pTextElementList->GetEnumeratorN(); + for (int i = 0; i <= elementIndex; i++) + { + r = pEnum->MoveNext(); + } + + Collection::ArrayListT<_FloatPair>* pGapListF = new (std::nothrow) Collection::ArrayListT<_FloatPair>; + _FloatPair currentGap; + + while (remainingLength != 0) + { + TextElementType objectType = pTextElement->GetType(); + if (objectType == TEXT_ELEMENT_TYPE_CUTLINK || objectType == TEXT_ELEMENT_TYPE_TEXT) + { + TextSimple* pSimpleText = dynamic_cast < TextSimple* >(pTextElement); + if (pSimpleText != null) + { + const Bitmap* pBitmap = pSimpleText->GetBitmap(); + if (pBitmap) + { + currentGap.first = maxWidth; + currentGap.second = currentGap.first + pBitmap->GetWidth(); + + pGapListF->Add(currentGap); + right = (right < currentGap.second) ? currentGap.second : right; + } + else + { + _FontImpl* pFontImpl = _FontImpl::GetInstance(*const_cast < Font* >(pSimpleText->GetFont())); + SysTryCatch(NID_GRP, pFontImpl, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get native font instance."); + + Collection::ArrayListT<_FloatPair> 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) + { + pCurrentElementGapEnum->GetCurrent(currentGap); + + currentGap.first = maxWidth + currentGap.first; + currentGap.second = maxWidth + currentGap.second; + + pGapListF->Add(currentGap); + right = (right < currentGap.second) ? currentGap.second : right; + } + + Release(pCurrentElementGapEnum); + } + } + } + else if (objectType == TEXT_ELEMENT_TYPE_IMAGE) + { + TextImage* pImageText = dynamic_cast < TextImage* >(pTextElement); + if (pImageText != null) + { + FloatRectangle rect = pImageText->GetBoundsF(); + + currentGap.first = maxWidth; + currentGap.second = currentGap.first + rect.width; + + pGapListF->Add(currentGap); + right = (right < currentGap.second) ? currentGap.second : right; + } + } + + remainingLength -= currentLength; + + if (pEnum->MoveNext() != E_SUCCESS) + { + break; + } + + pTextElement = static_cast < TextElement* >(pEnum->GetCurrent()); + if (pTextElement == null) + { + break; + } + + textIndexFromElementOffset = pTextElement->GetValue(SET_TEXT_OFFSET); + currentLength = Math::Min(pTextElement->GetTextLength(), remainingLength); + maxWidth = right; + right = 0; + } + + pTextLine->SetTextExtentList(pGapListF); + + Release(pEnum); + + return E_SUCCESS; + +CATCH: + Release(pEnum); + + Release(pGapListF); + + return r; +} + +int +TextComposite::ComposeInWrap(FloatRectangle& rect) +{ + SysTryReturn(NID_GRP, __pCurrentTextColumn, -1, E_INVALID_STATE, "[E_INVALID_STATE] This instance is not constructed yet."); + + int textCount = 0; + int lineCount = 0; + int textIndex = 0; + int remainingLength = 0; + float remainingWidth = 0; + float remainingHeight = 0; + float offsetY = 0; + bool hasPrevLine = false; + FloatDimension textSize; + TextLine* pTextLine = null; + int ret = 0; + int endType = TEXT_RETBY_NORMAL; + FloatRectangle lineBounds; + FloatDimension lineTextSize; + int lineOffset = 0; + int lineLength = 0; + int displayLineCount = 0; + float displayHeight = 0; + float baseline = 0; + float lineBaseline = 0; + + pTextLine = __pCurrentTextColumn->GetPrevLineChangedStartLine(); + if (pTextLine != null) + { + endType = pTextLine->GetEndType(); + lineOffset = pTextLine->GetTextOffset(); + lineLength = pTextLine->GetTextLength(); + lineBounds = pTextLine->GetBoundsF(); + lineBaseline = pTextLine->GetBaselineF(); + pTextLine->GetRegion(0, pTextLine->GetTextLength(), lineTextSize.width, lineTextSize.height); + + if (endType != TEXT_RETBY_LINEFEED) + { + textIndex = lineOffset + lineLength; + remainingLength = __length - textIndex; + remainingWidth = lineBounds.width - lineTextSize.width; + hasPrevLine = true; + + if (remainingLength == 0) + { + return -1; + } + } + else + { + textIndex = lineOffset + lineLength; + remainingLength = __length - textIndex; + remainingWidth = rect.width; + offsetY = lineBounds.y + lineBounds.height; + + if (remainingLength == 0) + { + float nextY = offsetY; + lineTextSize.height = lineBounds.height; + + pTextLine = new (std::nothrow)TextLine(this); + SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + lineBounds.y = nextY; + + pTextLine->SetBounds(lineBounds); + pTextLine->SetRegion(0.0f, lineTextSize.height); + pTextLine->SetTextLength(0); + pTextLine->SetTextOffset(textIndex); + pTextLine->SetEndType(TEXT_RETBY_LINEFEED); + pTextLine->SetBaseline(0); + GetTextExtentList(pTextLine); + + __pCurrentTextColumn->AddLineDuringCompose(pTextLine); + + if (lineBounds.y + lineBounds.height <= rect.height) + { + __pCurrentTextColumn->SetDisplayLineCount(++displayLineCount); + displayHeight += lineBounds.height; + __pCurrentTextColumn->SetDisplayHeight(displayHeight); + } + + return 1; + } + } + } + else + { + textIndex = 0; + remainingLength = __length; + remainingWidth = rect.width; + + __pCurrentTextColumn->SetChangedStartLineIndex(0); + } + + if (!hasPrevLine) + { + pTextLine = new (std::nothrow)TextLine(this); + SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + lineBounds.x = rect.x; + lineBounds.width = rect.width; + lineBounds.y = offsetY; + lineTextSize.height = 0; + + if (remainingLength == 0) + { + lineTextSize.height = GetHeightF(0); + lineBounds.height = lineTextSize.height; + + pTextLine->SetBounds(lineBounds); + pTextLine->SetRegion(0.0f, lineTextSize.height); + pTextLine->SetTextLength(0); + pTextLine->SetTextOffset(textIndex); + pTextLine->SetEndType(TEXT_RETBY_NORMAL); + pTextLine->SetBaseline(0); + GetTextExtentList(pTextLine); + + __pCurrentTextColumn->AddLineDuringCompose(pTextLine); + + if (lineBounds.y + lineBounds.height <= rect.height) + { + __pCurrentTextColumn->SetDisplayLineCount(++displayLineCount); + displayHeight += lineBounds.height; + __pCurrentTextColumn->SetDisplayHeight(displayHeight); + } + + return 1; + } + } + + remainingHeight = rect.height; + + while (remainingLength != 0) + { + ret = ForwardAnalyzeWithBaseline(textIndex, remainingLength, remainingWidth, __wrap, textCount, textSize.width, textSize.height, baseline); + + if (ret == -1) + { + Release(pTextLine); + break; + } + + if (!hasPrevLine) + { + if (textCount == 0) + { + textCount = 1; + } + + lineOffset = textIndex; + lineLength = textCount; + lineTextSize.width = textSize.width; + lineTextSize.height = textSize.height; + lineBounds.height = textSize.height; + endType = ret; + + pTextLine->SetBounds(lineBounds); + pTextLine->SetRegion(lineTextSize.width, lineTextSize.height); + pTextLine->SetTextLength(lineLength); + pTextLine->SetTextOffset(lineOffset); + pTextLine->SetEndType(ret); + pTextLine->SetBaseline(baseline); + GetTextExtentList(pTextLine); + + __pCurrentTextColumn->AddLineDuringCompose(pTextLine); + lineCount++; + + if (lineBounds.y + lineBounds.height <= rect.height) + { + __pCurrentTextColumn->SetDisplayLineCount(++displayLineCount); + displayHeight += lineBounds.height; + __pCurrentTextColumn->SetDisplayHeight(displayHeight); + } + } + else + { + if (__wrap == TEXT_OBJECT_WRAP_TYPE_WORD) + { + if (ret != TEXT_RETBY_LIMITWIDTH) + { + lineLength += textCount; + lineTextSize.width += textSize.width; + lineBounds.height = (lineBounds.height > textSize.height) ? lineBounds.height: textSize.height; + lineTextSize.height = lineBounds.height; + endType = ret; + baseline = (lineBaseline > baseline) ? baseline : lineBaseline; + + pTextLine->SetBounds(lineBounds); + pTextLine->SetRegion(lineTextSize.width, lineTextSize.height); + pTextLine->SetTextLength(lineLength); + pTextLine->SetEndType(endType); + pTextLine->SetBaseline(baseline); + GetTextExtentList(pTextLine); + + __pCurrentTextColumn->CheckComposeDone(pTextLine); + } + else + { + textCount = 0; + } + } + else + { + lineLength += textCount; + lineTextSize.width += textSize.width; + lineBounds.height = (lineBounds.height > textSize.height) ? lineBounds.height : textSize.height; + lineTextSize.height = lineBounds.height; + endType = ret; + baseline = (lineBaseline > baseline) ? baseline : lineBaseline; + + pTextLine->SetBounds(lineBounds); + pTextLine->SetRegion(lineTextSize.width, lineTextSize.height); + pTextLine->SetTextLength(lineLength); + pTextLine->SetEndType(endType); + pTextLine->SetBaseline(baseline); + GetTextExtentList(pTextLine); + + __pCurrentTextColumn->CheckComposeDone(pTextLine); + } + + if (textCount > 0) + { + __pCurrentTextColumn->SetChangedStartLineIndex(pTextLine->GetIndex()); + } + + hasPrevLine = false; + } + + if (__pCurrentTextColumn->IsComposeDone()) + { + break; + } + + textIndex += textCount; + remainingLength -= textCount; + + remainingHeight -= lineTextSize.height; + + if (remainingLength > 0) + { + 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] Memory allocation failed."); + + lineBounds.x = rect.x; + lineBounds.y = nextY; + lineBounds.width = rect.width; + lineTextSize.height = 0; + + remainingWidth = rect.width; + } + else + { + if (endType == TEXT_RETBY_LINEFEED) + { + float nextY = lineBounds.y + lineBounds.height; + lineTextSize.height = lineBounds.height; + + pTextLine = new (std::nothrow)TextLine(this); + SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + lineBounds.x = rect.x; + lineBounds.y = nextY; + lineBounds.width = rect.width; + lineBounds.height = lineTextSize.height; + + pTextLine->SetBounds(lineBounds); + pTextLine->SetRegion(0.0f, lineTextSize.height); + pTextLine->SetTextLength(0); + pTextLine->SetTextOffset(textIndex); + pTextLine->SetEndType(TEXT_RETBY_LINEFEED); + pTextLine->SetBaseline(0); + GetTextExtentList(pTextLine); + + __pCurrentTextColumn->AddLineDuringCompose(pTextLine); + lineCount++; + + if (lineBounds.y + lineBounds.height <= rect.height) + { + __pCurrentTextColumn->SetDisplayLineCount(++displayLineCount); + displayHeight += lineBounds.height; + __pCurrentTextColumn->SetDisplayHeight(displayHeight); + } + + pTextLine = null; + break; + } + } + } + + FloatDimension columnTextSize; + __pCurrentTextColumn->GetRegion(0, __length, columnTextSize.width, columnTextSize.height); + rect.height = columnTextSize.height; + + if (pTextLine) + { + __pCurrentTextColumn->SetChangedLastLineIndex(pTextLine->GetIndex()); + } + + if (Tizen::App::_AppInfo::IsOspCompat()) + { + __pCurrentTextColumn->SetDisplayLineCount(0); + __pCurrentTextColumn->SetDisplayHeight(0); + } + + return lineCount; +} + +int +TextComposite::ComposeInWrapInSweepMode(FloatRectangle& rect) +{ + SysTryReturn(NID_GRP, __pCurrentTextColumn, -1, E_INVALID_STATE, "[E_INVALID_STATE] This instance is not constructed yet."); + + int textCount = 0; + int lineCount = 0; + int textIndex = 0; + int remainingLength = 0; + float remainingWidth = 0; + float remainingHeight = 0; + float offsetY = 0; + bool hasPrevLine = false; + FloatDimension textSize; + TextLine* pTextLine = null; + TextLine* pPrevTextLine = null; + int ret = 0; + int endType = TEXT_RETBY_NORMAL; + FloatRectangle lineBounds; + FloatDimension lineTextSize; + int lineOffset = 0; + int lineLength = 0; + int displayLineCount = 0; + float displayHeight = 0; + float baseline = 0; + float lineBaseline = 0; + int prevLineIndex = 0; + + pPrevTextLine = __pCurrentTextColumn->GetPrevTextLine(prevLineIndex++); + pTextLine = __pCurrentTextColumn->GetPrevLineChangedStartLine(); + + if (pTextLine != null) + { + endType = pTextLine->GetEndType(); + lineOffset = pTextLine->GetTextOffset(); + lineLength = pTextLine->GetTextLength(); + lineBounds = pTextLine->GetBoundsF(); + lineBaseline = pTextLine->GetBaselineF(); + pTextLine->GetRegion(0, pTextLine->GetTextLength(), lineTextSize.width, lineTextSize.height); + + if (endType != TEXT_RETBY_LINEFEED) + { + textIndex = lineOffset + lineLength; + remainingLength = __length - textIndex; + remainingWidth = lineBounds.width - lineTextSize.width; + hasPrevLine = true; + + if (remainingLength == 0) + { + return -1; + } + } + else + { + textIndex = lineOffset + lineLength; + remainingLength = __length - textIndex; + remainingWidth = rect.width; + offsetY = lineBounds.y + lineBounds.height; + + pPrevTextLine = __pCurrentTextColumn->GetPrevTextLine(prevLineIndex++); + + if (remainingLength == 0) + { + float nextY = offsetY; + lineTextSize.height = lineBounds.height; + + pTextLine = new (std::nothrow)TextLine(this); + SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + lineBounds.y = nextY; + + pTextLine->SetBounds(lineBounds); + pTextLine->SetRegion(0.0f, lineTextSize.height); + pTextLine->SetTextLength(0); + pTextLine->SetTextOffset(textIndex); + pTextLine->SetEndType(TEXT_RETBY_LINEFEED); + pTextLine->SetBaseline(0); + GetTextExtentList(pTextLine); + + __pCurrentTextColumn->AddLineDuringCompose(pTextLine); + + if (lineBounds.y + lineBounds.height <= rect.height) + { + __pCurrentTextColumn->SetDisplayLineCount(++displayLineCount); + displayHeight += lineBounds.height; + __pCurrentTextColumn->SetDisplayHeight(displayHeight); + } + + return 1; + } + } + } + else + { + textIndex = 0; + remainingLength = __length; + remainingWidth = rect.width; + + __pCurrentTextColumn->SetChangedStartLineIndex(0); + } + + if (!hasPrevLine) + { + pTextLine = new (std::nothrow)TextLine(this); + SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + lineBounds.x = rect.x; + lineBounds.width = rect.width; + lineBounds.y = offsetY; + lineTextSize.height = 0; + + if (remainingLength == 0) + { + lineTextSize.height = GetHeightF(0); + lineBounds.height = lineTextSize.height; + + pTextLine->SetBounds(lineBounds); + pTextLine->SetRegion(0.0f, lineTextSize.height); + pTextLine->SetTextLength(0); + pTextLine->SetTextOffset(textIndex); + pTextLine->SetEndType(TEXT_RETBY_NORMAL); + pTextLine->SetBaseline(0); + GetTextExtentList(pTextLine); + + __pCurrentTextColumn->AddLineDuringCompose(pTextLine); + + if (lineBounds.y + lineBounds.height <= rect.height) + { + __pCurrentTextColumn->SetDisplayLineCount(++displayLineCount); + displayHeight += lineBounds.height; + __pCurrentTextColumn->SetDisplayHeight(displayHeight); + } + + return 1; + } + } + + remainingHeight = rect.height; + + while (remainingLength != 0) + { + ret = ForwardAnalyzeWithBaseline(textIndex, remainingLength, remainingWidth, __wrap, textCount, textSize.width, textSize.height, baseline); + + if (ret == -1) + { + Release(pTextLine); + break; + } + + if (!hasPrevLine) + { + if (textCount == 0) + { + 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; + lineTextSize.height = textSize.height; + lineBounds.height = textSize.height; + endType = ret; + + pTextLine->SetBounds(lineBounds); + pTextLine->SetRegion(lineTextSize.width, lineTextSize.height); + pTextLine->SetTextLength(lineLength); + pTextLine->SetTextOffset(lineOffset); + pTextLine->SetEndType(ret); + pTextLine->SetBaseline(baseline); + GetTextExtentList(pTextLine); + + __pCurrentTextColumn->AddLineDuringCompose(pTextLine); + lineCount++; + + if (lineBounds.y + lineBounds.height <= rect.height) + { + __pCurrentTextColumn->SetDisplayLineCount(++displayLineCount); + displayHeight += lineBounds.height; + __pCurrentTextColumn->SetDisplayHeight(displayHeight); + } + } + else + { + if (__wrap == TEXT_OBJECT_WRAP_TYPE_WORD && ret == TEXT_RETBY_LIMITWIDTH) + { + textCount = 0; + } + else + { + lineLength += textCount; + lineTextSize.width += textSize.width; + lineBounds.height = (lineBounds.height > textSize.height) ? lineBounds.height : textSize.height; + lineTextSize.height = lineBounds.height; + endType = ret; + baseline = (lineBaseline > baseline) ? baseline : lineBaseline; + + pTextLine->SetBounds(lineBounds); + pTextLine->SetRegion(lineTextSize.width, lineTextSize.height); + pTextLine->SetTextLength(lineLength); + pTextLine->SetEndType(endType); + pTextLine->SetBaseline(baseline); + GetTextExtentList(pTextLine); + + __pCurrentTextColumn->CheckComposeDone(pTextLine); + } + + if (textCount > 0) + { + __pCurrentTextColumn->SetChangedStartLineIndex(pTextLine->GetIndex()); + } + + hasPrevLine = false; + } + + if (__pSweepInfo->sweepEventType == TEXT_OBJECT_SWEEP_EVENT_INSERT) + { + if (pPrevTextLine && pPrevTextLine->GetTextOffset() + __workLength == pTextLine->GetTextOffset()) + { + pPrevTextLine = __pCurrentTextColumn->GetPrevTextLine(prevLineIndex++); + + while(pPrevTextLine) + { + TextLine* pNewTextLine = pPrevTextLine->CopyN(); + 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); + + __pCurrentTextColumn->AddLineDuringCompose(pNewTextLine); + + pPrevTextLine = __pCurrentTextColumn->GetPrevTextLine(prevLineIndex++); + } + + break; + } + } + else if (__pSweepInfo->sweepEventType == TEXT_OBJECT_SWEEP_EVENT_REMOVE) + { + if (pPrevTextLine && pPrevTextLine->GetTextOffset() - __workLength == pTextLine->GetTextOffset()) + { + pPrevTextLine = __pCurrentTextColumn->GetPrevTextLine(prevLineIndex++); + + while(pPrevTextLine) + { + TextLine* pNewTextLine = pPrevTextLine->CopyN(); + 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); + + __pCurrentTextColumn->AddLineDuringCompose(pNewTextLine); + + pPrevTextLine = __pCurrentTextColumn->GetPrevTextLine(prevLineIndex++); + } + + break; + } + } + + if (__pCurrentTextColumn->IsComposeDone()) + { + break; + } + + pPrevTextLine = __pCurrentTextColumn->GetPrevTextLine(prevLineIndex++); + + textIndex += textCount; + remainingLength -= textCount; + remainingHeight -= lineTextSize.height; + + if (remainingLength > 0) + { + 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] Memory allocation failed."); + + lineBounds.x = rect.x; + lineBounds.y = nextY; + lineBounds.width = rect.width; + lineTextSize.height = 0; + + remainingWidth = rect.width; + } + else + { + if (endType == TEXT_RETBY_LINEFEED) + { + float nextY = lineBounds.y + lineBounds.height; + lineTextSize.height = lineBounds.height; + + pTextLine = new (std::nothrow)TextLine(this); + SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + lineBounds.x = rect.x; + lineBounds.y = nextY; + lineBounds.width = rect.width; + lineBounds.height = lineTextSize.height; + + pTextLine->SetBounds(lineBounds); + pTextLine->SetRegion(0.0f, lineTextSize.height); + pTextLine->SetTextLength(0); + pTextLine->SetTextOffset(textIndex); + pTextLine->SetEndType(TEXT_RETBY_LINEFEED); + pTextLine->SetBaseline(0); + GetTextExtentList(pTextLine); + + __pCurrentTextColumn->AddLineDuringCompose(pTextLine); + + lineCount++; + + if (lineBounds.y + lineBounds.height <= rect.height) + { + __pCurrentTextColumn->SetDisplayLineCount(++displayLineCount); + displayHeight += lineBounds.height; + __pCurrentTextColumn->SetDisplayHeight(displayHeight); + } + + pTextLine = null; + break; + } + } + } + + FloatDimension columnTextSize; + __pCurrentTextColumn->GetRegion(0, __length, columnTextSize.width, columnTextSize.height); + rect.height = columnTextSize.height; + + if (pTextLine) + { + __pCurrentTextColumn->SetChangedLastLineIndex(pTextLine->GetIndex()); + } + + if (Tizen::App::_AppInfo::IsOspCompat()) + { + __pCurrentTextColumn->SetDisplayLineCount(0); + __pCurrentTextColumn->SetDisplayHeight(0); + } + + return lineCount; +} + +int +TextComposite::ComposeInPartialMode(FloatRectangle& rect) +{ + SysTryReturn(NID_GRP, __pCurrentTextColumn, -1, E_INVALID_STATE + , "[E_INVALID_STATE] This instance is not constructed yet."); + + int textCount = 0; + int lineCount = 0; + int textIndex = 0; + int remainingLength = 0; + float remainingWidth = 0; + float remainingHeight = 0; + int lineOffset = 0; + int lineLength = 0; + float offsetY = 0; + int ret = 0; + FloatDimension textSize; + FloatDimension lineTextSize; + FloatRectangle lineBounds; + bool hasPrevLine = false; + int displayLineCount = 0; + float displayHeight = 0; + float baseline = 0; + float lineBaseline = 0; + TextLine* pTextLine = null; + int endType = TEXT_RETBY_NORMAL; + + if (__lineIndexCompositeDone != 0) + { + pTextLine = __pCurrentTextColumn->GetTextLine(__lineIndexCompositeDone - 1); + lineCount = __lineIndexCompositeDone; + } + + if (pTextLine != null) + { + endType = pTextLine->GetEndType(); + lineOffset = pTextLine->GetTextOffset(); + lineLength = pTextLine->GetTextLength(); + lineBounds = pTextLine->GetBoundsF(); + lineBaseline = pTextLine->GetBaselineF(); + pTextLine->GetRegion(0, pTextLine->GetTextLength(), lineTextSize.width, lineTextSize.height); + + if (endType != TEXT_RETBY_LINEFEED) + { + textIndex = lineOffset + lineLength; + remainingLength = __length - textIndex; + remainingWidth = lineBounds.width - lineTextSize.width; + hasPrevLine = true; + + if (remainingLength == 0) + { + return -1; + } + } + else + { + textIndex = lineOffset + lineLength; + remainingLength = __length - textIndex; + remainingWidth = rect.width; + offsetY = lineBounds.y + lineBounds.height; + + if (remainingLength == 0) + { + float nextY = offsetY; + lineTextSize.height = lineBounds.height; + + pTextLine = new (std::nothrow)TextLine(this); + SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + lineBounds.y = nextY; + + pTextLine->SetBounds(lineBounds); + pTextLine->SetRegion(0.0f, lineTextSize.height); + pTextLine->SetTextLength(0); + pTextLine->SetTextOffset(textIndex); + pTextLine->SetEndType(TEXT_RETBY_LINEFEED); + pTextLine->SetBaseline(0); + GetTextExtentList(pTextLine); + + __pCurrentTextColumn->AddLineDuringCompose(pTextLine); + + if (lineBounds.y + lineBounds.height <= rect.height) + { + __pCurrentTextColumn->SetDisplayLineCount(++displayLineCount); + displayHeight += lineBounds.height; + __pCurrentTextColumn->SetDisplayHeight(displayHeight); + } + + return 1; + } + } + } + else + { + textIndex = 0; + remainingLength = __length; + remainingWidth = rect.width; + + __pCurrentTextColumn->SetChangedStartLineIndex(0); + } + + if (!hasPrevLine) + { + pTextLine = new (std::nothrow)TextLine(this); + SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + lineBounds.x = rect.x; + lineBounds.width = rect.width; + lineBounds.y = offsetY; + lineTextSize.height = 0; + + if (remainingLength == 0) + { + lineTextSize.height = GetHeightF(0); + lineBounds.height = lineTextSize.height; + + pTextLine->SetBounds(lineBounds); + pTextLine->SetRegion(0.0f, lineTextSize.height); + pTextLine->SetTextLength(0); + pTextLine->SetTextOffset(textIndex); + pTextLine->SetEndType(TEXT_RETBY_NORMAL); + pTextLine->SetBaseline(0); + GetTextExtentList(pTextLine); + + __pCurrentTextColumn->AddLineDuringCompose(pTextLine); + + if (lineBounds.y + lineBounds.height <= rect.height) + { + __pCurrentTextColumn->SetDisplayLineCount(++displayLineCount); + displayHeight += lineBounds.height; + __pCurrentTextColumn->SetDisplayHeight(displayHeight); + } + + return 1; + } + } + + remainingHeight = GetComposePartialLimitHeightF(); + if (remainingHeight == 0) + { + remainingHeight = rect.height; + } + if (remainingHeight < lineBounds.height && remainingLength > 0) + { + remainingHeight = lineBounds.height; + } + + while (remainingLength != 0) + { + ret = ForwardAnalyzeWithBaseline(textIndex, remainingLength, remainingWidth, __wrap, textCount, textSize.width, textSize.height, baseline); + + if (ret == -1) + { + Release(pTextLine); + break; + } + + if (!hasPrevLine) + { + if (textCount == 0) + { + textCount = 1; + } + + lineOffset = textIndex; + lineLength = textCount; + lineTextSize.width = textSize.width; + lineTextSize.height = textSize.height; + lineBounds.height = textSize.height; + endType = ret; + + pTextLine->SetBounds(lineBounds); + pTextLine->SetRegion(lineTextSize.width, lineTextSize.height); + pTextLine->SetTextLength(lineLength); + pTextLine->SetTextOffset(lineOffset); + pTextLine->SetEndType(endType); + pTextLine->SetBaseline(baseline); + GetTextExtentList(pTextLine); + + __pCurrentTextColumn->AddLineDuringCompose(pTextLine); + + if (lineBounds.y + lineBounds.height <= rect.height) + { + __pCurrentTextColumn->SetDisplayLineCount(++displayLineCount); + displayHeight += lineBounds.height; + __pCurrentTextColumn->SetDisplayHeight(displayHeight); + } + + lineCount++; + __lineIndexCompositeDone++; + __totalComposedHeight += lineTextSize.height; + } + else + { + if (__wrap == TEXT_OBJECT_WRAP_TYPE_WORD) + { + if (ret != TEXT_RETBY_LIMITWIDTH) + { + lineLength += textCount; + lineTextSize.width += textSize.width; + lineBounds.height = (lineBounds.height > textSize.height) ? lineBounds.height: textSize.height; + lineTextSize.height = lineBounds.height; + endType = ret; + baseline = (lineBaseline > baseline) ? baseline : lineBaseline; + + pTextLine->SetBounds(lineBounds); + pTextLine->SetRegion(lineTextSize.width, lineTextSize.height); + pTextLine->SetTextLength(lineLength); + pTextLine->SetEndType(endType); + pTextLine->SetBaseline(baseline); + GetTextExtentList(pTextLine); + } + else + { + textCount = 0; + } + } + else + { + lineLength += textCount; + lineTextSize.width += textSize.width; + lineBounds.height = (lineBounds.height > textSize.height) ? lineBounds.height : textSize.height; + lineTextSize.height = lineBounds.height; + endType = ret; + baseline = (lineBaseline > baseline) ? baseline : lineBaseline; + + pTextLine->SetBounds(lineBounds); + pTextLine->SetRegion(lineTextSize.width, lineTextSize.height); + pTextLine->SetTextLength(lineLength); + pTextLine->SetEndType(endType); + pTextLine->SetBaseline(baseline); + GetTextExtentList(pTextLine); + } + + if (textCount > 0) + { + __pCurrentTextColumn->SetChangedStartLineIndex(pTextLine->GetIndex()); + } + + hasPrevLine = false; + } + + if (__pCurrentTextColumn->IsComposeDone()) + { + break; + } + + textIndex += textCount; + remainingLength -= textCount; + remainingHeight -= lineTextSize.height; + + if (remainingHeight < 0) + { + return lineCount; + } + + if (remainingLength > 0) + { + 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] Memory allocation failed."); + + lineBounds.x = rect.x; + lineBounds.y = nextY; + lineBounds.width = rect.width; + lineTextSize.height = 0; + + remainingWidth = rect.width; + } + else + { + if (endType == TEXT_RETBY_LINEFEED) + { + float nextY = lineBounds.y + lineBounds.height; + lineTextSize.height = lineBounds.height; + + pTextLine = new (std::nothrow)TextLine(this); + SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + lineBounds.x = rect.x; + lineBounds.y = nextY; + lineBounds.width = rect.width; + lineBounds.height = lineTextSize.height; + + pTextLine->SetBounds(lineBounds); + pTextLine->SetRegion(0.0f, lineTextSize.height); + pTextLine->SetTextLength(0); + pTextLine->SetTextOffset(textIndex); + pTextLine->SetEndType(TEXT_RETBY_LINEFEED); + pTextLine->SetBaseline(0); + GetTextExtentList(pTextLine); + + __pCurrentTextColumn->AddLineDuringCompose(pTextLine); + + lineCount++; + + if (lineBounds.y + lineBounds.height <= rect.height) + { + __pCurrentTextColumn->SetDisplayLineCount(++displayLineCount); + displayHeight += lineBounds.height; + __pCurrentTextColumn->SetDisplayHeight(displayHeight); + } + + __lineIndexCompositeDone++; + __totalComposedHeight += lineTextSize.height; + __pCurrentTextColumn->FinishCompose(); + + pTextLine = null; + break; + } + else + { + __pCurrentTextColumn->FinishCompose(); + } + } + } + + rect.height = __totalComposedHeight; + + if (pTextLine) + { + __pCurrentTextColumn->SetChangedLastLineIndex(pTextLine->GetIndex()); + } + + if (Tizen::App::_AppInfo::IsOspCompat()) + { + __pCurrentTextColumn->SetDisplayLineCount(0); + __pCurrentTextColumn->SetDisplayHeight(0); + } + + return lineCount; +} + +int +TextComposite::ComposeInNoneWrapMiddleEllipsis(FloatRectangle& rect) +{ + int endType = TEXT_RETBY_NORMAL; + FloatRectangle lineBounds; + FloatDimension abbrevTextDim; + FloatDimension textSize; + int length = 0; + float maxHeight = 0; + float baseline = 0; + + lineBounds.width = rect.width; + lineBounds.x = 0; + lineBounds.y = 0; + lineBounds.height = rect.height; + endType = ForwardAnalyzeWithBaseline(0, __length, lineBounds.width, __wrap, length, textSize.width, textSize.height, baseline); + + if (endType != TEXT_RETBY_LIMITWIDTH) + { + __drawTextEllipsis = false; + return ComposeInNoneWrap(rect); + } + + __drawTextEllipsis = true; + + TextElement* pTextElement = null; + TextSimple* pSimpleText = null; + + pTextElement = static_cast < TextElement* >(__pTextElementList->GetAt(0)); + SysTryReturn(NID_GRP, pTextElement, -1, E_SYSTEM, "[E_SYSTEM] Fail to get text element."); + + TextElementType objectType = pTextElement->GetType(); + SysTryReturn(NID_GRP, objectType == TEXT_ELEMENT_TYPE_CUTLINK || objectType == TEXT_ELEMENT_TYPE_TEXT, -1, E_SYSTEM, "[E_SYSTEM] Fail to get text element."); + + pSimpleText = dynamic_cast < TextSimple* >(pTextElement); + if (pSimpleText != null) + { + SetAbbrevObjectFontInfo(pSimpleText); + } + + __pAbbrevTextElement->GetRegion(0, 1, abbrevTextDim.width, abbrevTextDim.height); + __middleEllipsisWidth = abbrevTextDim.width; + + ForwardAnalyze(0, __length, ((lineBounds.width - __middleEllipsisWidth + 10.0f) / 2.0f), __wrap, length, textSize.width, textSize.height); + __middleEllipsisTextLengthInHead = length; + __middleEllipsisHeadWidth = textSize.width; + + maxHeight = textSize.height; + + BackwardAnalyze(__length - 1, lineBounds.width - __middleEllipsisWidth - __middleEllipsisHeadWidth, length, textSize.width, textSize.height); + + __middleEllipsisTextLengthInTail = length; + 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] Memory allocation failed."); + + pTextLine->SetBounds(lineBounds); + pTextLine->SetRegion(lineBounds.width, maxHeight); + pTextLine->SetTextLength(__length); + pTextLine->SetTextOffset(0); + pTextLine->SetEndType(TEXT_RETBY_NORMAL); + pTextLine->SetBaseline(baseline); + GetTextExtentList(pTextLine); + + __pCurrentTextColumn->AddLineDuringCompose(pTextLine); + + lineBounds.height = maxHeight; + + return 1; +} + +int +TextComposite::ComposeInNoneWrapHeadEllipsis(FloatRectangle& rect) +{ + SysTryReturn(NID_GRP, __pCurrentTextColumn, -1, E_INVALID_STATE, "[E_INVALID_STATE] This instance is not constructed yet."); + + int endType = TEXT_RETBY_NORMAL; + FloatRectangle lineBounds; + FloatDimension abbrevTextDim; + FloatDimension textSize; + int length = 0; + float maxHeight = 0; + float baseline = 0; + + lineBounds.width = rect.width; + lineBounds.x = 0; + lineBounds.y = 0; + lineBounds.height = rect.height; + endType = ForwardAnalyzeWithBaseline(0, __length, lineBounds.width, __wrap, length, textSize.width, textSize.height, baseline); + + if (endType != TEXT_RETBY_LIMITWIDTH) + { + __drawTextEllipsis = false; + return ComposeInNoneWrap(rect); + } + + __drawTextEllipsis = true; + TextElement* pTextElement = null; + TextSimple* pSimpleText = null; + + pTextElement = static_cast < TextElement* >(__pTextElementList->GetAt(0)); + SysTryReturn(NID_GRP, pTextElement, -1, E_SYSTEM, "[E_SYSTEM] Fail to get text element."); + + TextElementType objectType = pTextElement->GetType(); + SysTryReturn(NID_GRP, objectType == TEXT_ELEMENT_TYPE_CUTLINK || objectType == TEXT_ELEMENT_TYPE_TEXT + , -1, E_SYSTEM, "[E_SYSTEM] Fail to get text element."); + + pSimpleText = dynamic_cast < TextSimple* >(pTextElement); + if (pSimpleText != null) + { + SetAbbrevObjectFontInfo(pSimpleText); + } + + __pAbbrevTextElement->GetRegion(0, 1, abbrevTextDim.width, abbrevTextDim.height); + __headEllipsisWidth = abbrevTextDim.width; + + BackwardAnalyze(__length - 1, lineBounds.width - abbrevTextDim.width, __headEllipsisTextLength, textSize.width, textSize.height); + + maxHeight = textSize.height; + + TextLine* pTextLine = new (std::nothrow)TextLine(this); + SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pTextLine->SetBounds(lineBounds); + pTextLine->SetRegion(lineBounds.width, maxHeight); + pTextLine->SetTextLength(__length); + pTextLine->SetTextOffset(0); + pTextLine->SetEndType(TEXT_RETBY_NORMAL); + pTextLine->SetBaseline(baseline); + GetTextExtentList(pTextLine); + + __pCurrentTextColumn->AddLineDuringCompose(pTextLine); + + lineBounds.height = maxHeight; + + return 1; +} + +result +TextComposite::DrawAbbrev(_CanvasImpl& canvasImpl, const FloatRectangle& displayRect, const TextObjectAlignment align) +{ + if (__TextObjectEllipsisType == TEXT_OBJECT_ELLIPSIS_TYPE_MIDDLE) + { + return DrawAbbrevInMiddleEllipsis(canvasImpl, displayRect, align); + } + else if (__TextObjectEllipsisType == TEXT_OBJECT_ELLIPSIS_TYPE_HEAD) + { + return DrawAbbrevInHeadEllipsis(canvasImpl, displayRect, align); + } + + return E_SYSTEM; +} + +result +TextComposite::GetValue(int textIndex, TextComponentInfoValueType type, unsigned int* value) const +{ + IEnumerator* pEnum = null; + TextElement* pTextElement = null; + int offset = 0; + int elementTextLength = 0; + + pEnum = __pTextElementList->GetEnumeratorN(); + while (pEnum->MoveNext() == E_SUCCESS) + { + pTextElement = static_cast < TextElement* >(pEnum->GetCurrent()); + if (pTextElement == null) + { + continue; + } + + elementTextLength = pTextElement->GetTextLength(); + + if (textIndex < offset + elementTextLength) + { + TextElementType objectType = pTextElement->GetType(); + + if (objectType != TextUtility::GetObjectTypeFromValueType(type) && objectType != TEXT_ELEMENT_TYPE_CUTLINK) + { + Release(pEnum); + return E_INVALID_ARG; + } + + *value = pTextElement->GetValue(type); + Release(pEnum); + return E_SUCCESS; + } + + offset += elementTextLength; + } + + Release(pEnum); + return E_INVALID_ARG; +} + +bool +TextComposite::BackwardAnalyze(int startTextIndex, float maxWidth, int& actualLength, float& width, float& height) +{ + float remainingWidth = 0; + int length = 0; + FloatDimension textSize; + + actualLength = 0; + width = 0; + height = 0; + + remainingWidth = maxWidth; + length = 1; + + while (startTextIndex >= 0 && textSize.width < remainingWidth) + { + GetRegion(startTextIndex, length, textSize.width, textSize.height); + + if (textSize.width <= remainingWidth) + { + actualLength = length; + width = textSize.width; + height = textSize.height; + } + + startTextIndex--; + length++; + } + + return true; +} + +int +TextComposite::GetFirstTextIndexAt(int elementIndex) const +{ + SysTryReturn(NID_GRP, elementIndex >= 0 && elementIndex < __pTextElementList->GetCount(), -1, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + IEnumerator* pEnum = null; + TextElement* pTextElement = null; + + int index = 0; + int elementTextOffset = 0; + + if (elementIndex == 0) + { + return 0; + } + + pEnum = __pTextElementList->GetEnumeratorN(); + while (pEnum->MoveNext() == E_SUCCESS) + { + pTextElement = static_cast < TextElement* >(pEnum->GetCurrent()); + if (pTextElement == null) + { + continue; + } + + if (index == elementIndex) + { + break; + } + + elementTextOffset += pTextElement->GetTextLength(); + + pTextElement = null; + index++; + } + + Release(pEnum); + + if (pTextElement != null) + { + return elementTextOffset; + } + + return -1; +} + +result +TextComposite::DrawAbbrevInMiddleEllipsis(_CanvasImpl& canvasImpl, const FloatRectangle& displayRect, const TextObjectAlignment alignment) +{ + TextLine* pTextLine = __pCurrentTextColumn->GetTextLine(0); + SysTryReturn(NID_GRP, pTextLine, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + FloatDimension textSize; + FloatRectangle adjustedRect; + + pTextLine->GetRegion(0, __length, textSize.width, textSize.height); + adjustedRect.x = displayRect.x; + adjustedRect.width = displayRect.width; + + 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; + } + adjustedRect.height = displayRect.height - (displayRect.y - adjustedRect.y); + + TextElement* pTextElement = null; + TextSimple* pSimpleText = null; + + pTextElement = static_cast < TextElement* >(__pTextElementList->GetAt(0)); + SysTryReturn(NID_GRP, pTextElement, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text element."); + + TextElementType objectType = pTextElement->GetType(); + SysTryReturn(NID_GRP, objectType == TEXT_ELEMENT_TYPE_CUTLINK || objectType == TEXT_ELEMENT_TYPE_TEXT + , E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to draw to symbol object."); + + pSimpleText = dynamic_cast < TextSimple* >(pTextElement); + if (pSimpleText != null) + { + SetAbbrevObjectFontInfo(pSimpleText); + } + + DrawPartial(canvasImpl, adjustedRect, 0, __middleEllipsisTextLengthInHead); + + adjustedRect.x += __middleEllipsisHeadWidth; + __pAbbrevTextElement->Draw(canvasImpl, adjustedRect, 0, 1, (TextObjectAlignment)(TEXT_OBJECT_ALIGNMENT_TOP | TEXT_OBJECT_ALIGNMENT_LEFT), TEXT_OBJECT_ACTION_TYPE_NONE); + + adjustedRect.x += __middleEllipsisWidth; + DrawPartial(canvasImpl, adjustedRect, __length - __middleEllipsisTextLengthInTail, __middleEllipsisTextLengthInTail); + + return E_SUCCESS; +} + +result +TextComposite::DrawAbbrevInHeadEllipsis(_CanvasImpl& canvasImpl, const FloatRectangle& displayRect, const TextObjectAlignment alignment) +{ + TextLine* pTextLine = __pCurrentTextColumn->GetTextLine(0); + SysTryReturn(NID_GRP, pTextLine, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + result r = E_SUCCESS; + FloatDimension textSize; + FloatRectangle adjustedRect; + + pTextLine->GetRegion(0, __length, textSize.width, textSize.height); + adjustedRect.x = displayRect.x; + adjustedRect.width = displayRect.width; + + 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; + } + adjustedRect.height = displayRect.height - (displayRect.y - adjustedRect.y); + + TextElement* pTextElement = null; + TextSimple* pSimpleText = null; + + pTextElement = static_cast < TextElement* >(__pTextElementList->GetAt(0)); + r = GetLastResult(); + SysTryReturn(NID_GRP, pTextElement, r, r, "[%s] Fail to get element.", GetErrorMessage(r)); + + TextElementType objectType = pTextElement->GetType(); + SysTryReturn(NID_GRP, objectType == TEXT_ELEMENT_TYPE_CUTLINK || objectType == TEXT_ELEMENT_TYPE_TEXT + , E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to draw to symbol object."); + + pSimpleText = dynamic_cast < TextSimple* >(pTextElement); + if (pSimpleText != null) + { + SetAbbrevObjectFontInfo(pSimpleText); + } + + __pAbbrevTextElement->Draw(canvasImpl, adjustedRect, 0, 1, (TextObjectAlignment)(TEXT_OBJECT_ALIGNMENT_TOP | TEXT_OBJECT_ALIGNMENT_LEFT), TEXT_OBJECT_ACTION_TYPE_NONE); + + adjustedRect.x += __headEllipsisWidth; + DrawPartial(canvasImpl, adjustedRect, __length - __headEllipsisTextLength, __headEllipsisTextLength); + + return E_SUCCESS; +} + +result +TextComposite::DrawPartial(_CanvasImpl& canvasImpl, FloatRectangle& displayRect, int startTextIndex, int textLength) +{ + SysTryReturn(NID_GRP, 0 <= startTextIndex && startTextIndex < __length, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + SysTryReturn(NID_GRP, textLength <= __length, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + result r = E_SUCCESS; + IEnumerator* pEnum = null; + TextElement* pTextElement = null; + + FloatDimension textSize; + int currentLength = 0; + int textIndexFromElementOffset = 0; + int nodeIndex = 0; + int elementTextOffset = 0; + FloatRectangle adjustedRect = displayRect; + int blockStartTextIndex = 0; + int blockEndTextIndex = 0; + bool isAlternateLookEnabled = false; + int textIndex = startTextIndex; + + pTextElement = GetElementAtTextIndex(textIndex, elementTextOffset, nodeIndex, currentLength, + textIndexFromElementOffset); + SysTryReturn(NID_GRP, pTextElement, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text element."); + + currentLength = Math::Min(textLength, currentLength); + + pEnum = __pTextElementList->GetEnumeratorN(); + while (textLength > 0) + { + textLength -= currentLength; + + pTextElement->GetRegion(textIndexFromElementOffset, currentLength, textSize.width, textSize.height); + + if (pTextElement->IsBackGroundDrawingModeEnable()) + { + r = canvasImpl.FillRectangle(pTextElement->GetBackgroundColor(), FloatRectangle(adjustedRect.x, displayRect.y, textSize.width, displayRect.height)); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + isAlternateLookEnabled = (pTextElement->GetValue(SET_ALTERNATE_LOOK) > 0) ? true : false; + if ((__displayBlock) && (isAlternateLookEnabled == false)) + { + FloatDimension tempTextSize; + float adjustedX = 0; + + blockStartTextIndex = Math::Max(__workStart, textIndex); + blockEndTextIndex = Math::Min(__workStart + __workLength, textIndex + currentLength); + if (blockStartTextIndex < blockEndTextIndex) + { + blockStartTextIndex = textIndexFromElementOffset + (blockStartTextIndex - textIndex); + blockEndTextIndex = textIndexFromElementOffset + (blockEndTextIndex - textIndex); + adjustedX = adjustedRect.x; + + if (textIndexFromElementOffset < blockStartTextIndex) + { + pTextElement->GetRegion(textIndexFromElementOffset, blockStartTextIndex - textIndexFromElementOffset, + tempTextSize.width, tempTextSize.height); + adjustedX += tempTextSize.width; + } + + FloatRectangle blockRect = adjustedRect; + blockRect.x = adjustedX; + } + } + + pTextElement->Draw(canvasImpl, adjustedRect, textIndexFromElementOffset, currentLength, (TextObjectAlignment)(TEXT_OBJECT_ALIGNMENT_TOP | TEXT_OBJECT_ALIGNMENT_LEFT), + TEXT_OBJECT_ACTION_TYPE_NONE); + + adjustedRect.x += textSize.width; + adjustedRect.width -= textSize.width; + + if (!textLength) + { + break; + } + + textIndex += currentLength; + + if (pEnum->MoveNext() != E_SUCCESS) + { + break; + } + + pTextElement = static_cast < TextElement* >(pEnum->GetCurrent()); + + textIndexFromElementOffset = pTextElement->GetValue(SET_TEXT_OFFSET); + currentLength = Math::Min(textLength, pTextElement->GetTextLength()); + + if (currentLength == 0) + { + break; + } + } + + Release(pEnum); + return E_SUCCESS; +} + +void +TextComposite::SetPartialComposingModeEnabled(bool enable) +{ + __partialComposingModeEnabled = enable; +} + +bool +TextComposite::IsPartialComposingModeEnabled(void) const +{ + return __partialComposingModeEnabled; +} + +bool +TextComposite::InitPartialComposeMode(void) +{ + __lineIndexCompositeDone = 0; + __totalComposedHeight = 0; + __composePartialLimitHeight = 0; + + SysTryReturn(NID_GRP, __pCurrentTextColumn, false, E_INVALID_STATE, "[E_INVALID_STATE] This instance is not constructed yet."); + + __pCurrentTextColumn->SetFirstDisplayLineIndex(0); + __pCurrentTextColumn->SetFirstDisplayPositionY(0); + __pCurrentTextColumn->PrepareCompose(); + + return true; +} + +bool +TextComposite::IsComposeDone() const +{ + SysTryReturn(NID_GRP, __pCurrentTextColumn, false, E_INVALID_STATE, "[E_INVALID_STATE] This instance is not constructed yet."); + + return __pCurrentTextColumn->IsComposeDone(); +} + +result +TextComposite::GetCutLinkObjectInfo(int cutLinkIndex, int& textStartIndex, int& textLength) const +{ + return __pCutLinkListInfo->GetCutLinkObjectInfo(cutLinkIndex, textStartIndex, textLength); +} + +int +TextComposite::GetTotalComposedHeight(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(__totalComposedHeight); +} + +float +TextComposite::GetTotalComposedHeightF(void) const +{ + return __totalComposedHeight; +} + +int +TextComposite::GetAnalysedTotalHeight(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetAnalysedTotalHeightF()); +} + +float +TextComposite::GetAnalysedTotalHeightF(void) const +{ + TextLine* pTextLine = null; + pTextLine = __pCurrentTextColumn->GetTextLine(__lineIndexCompositeDone - 1); + + if (!pTextLine) + { + return 0; + } + + int lineOffset = pTextLine->GetTextOffset(); + int lineLength = pTextLine->GetTextLength(); + + int composedLength = lineOffset + lineLength; + if (composedLength == 0) + { + return 0; + } + + return (float)(GetTotalComposedHeightF() * __length / composedLength); +} + +void +TextComposite::SetComposePartialLimitHeight(int limitHeight) +{ + __composePartialLimitHeight = _CoordinateSystemUtils::ConvertToFloat(limitHeight); +} + +void +TextComposite::SetComposePartialLimitHeight(float limitHeight) +{ + __composePartialLimitHeight = limitHeight; +} + +int +TextComposite::GetComposePartialLimitHeight(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(__composePartialLimitHeight); +} + +float +TextComposite::GetComposePartialLimitHeightF(void) const +{ + return __composePartialLimitHeight; +} + +TextElementType +TextComposite::GetObjectType(int textIndex) const +{ + TextElement* pTextElement = null; + + int currentLength = 0; + int elementIndex = 0; + int textIndexFromElementOffset = 0; + int elementTextOffset = 0; + + pTextElement = GetElementAtTextIndex(textIndex, elementTextOffset, elementIndex, currentLength, textIndexFromElementOffset); + if (pTextElement == null) + { + return TEXT_ELEMENT_TYPE_NONE; + } + else + { + return pTextElement->GetType(); + } +} + +int +TextComposite::GetElementIndexOf(TextElement& textElement) const +{ + int index = 0; + + result r = E_SUCCESS; + + r = __pTextElementList->IndexOf(textElement, index); + SysTryReturn(NID_GRP, r == E_SUCCESS, false, r, "[%s] Fail to add element.", GetErrorMessage(r)); + + return index; +} + +TextElement* +TextComposite::GetElementAtElementIndex(int elementIndex) const +{ + result r = E_SUCCESS; + + TextElement* pTextElement = null; + pTextElement = static_cast < TextElement* >(__pTextElementList->GetAt(elementIndex)); + SysTryReturn(NID_GRP, r == E_SUCCESS, null, r, "[%s] Fail to add element.", GetErrorMessage(r)); + + return pTextElement; +} + +int +TextComposite::GetTextLength(void) const +{ + return __length; +} + +int +TextComposite::GetElementCount(void) const +{ + return __pTextElementList->GetCount(); +} + +void +TextComposite::SetBlock(bool enable) +{ + __displayBlock = enable; +} + +result +TextComposite::SetImageAlign(TextObjectAlignment align) +{ + return SetValueToAllTextElements(SET_IMAGE_ALIGN, (unsigned int)align); +} + +TextObjectWrapType +TextComposite::GetWrap(void) const +{ + return __wrap; +} + +void +TextComposite::SetLineSpace(int gap) +{ + SetLineSpace(_CoordinateSystemUtils::ConvertToFloat(gap)); +} + +void +TextComposite::SetLineSpace(float gap) +{ + __lineSpacing = gap; +} + +int +TextComposite::GetLineSpace(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(__lineSpacing); +} + +float +TextComposite::GetLineSpaceF(void) const +{ + return __lineSpacing; +} + +void +TextComposite::SetElementVerticalAlignment(TextObjectAlignment alignment) +{ + __elementVertialAlignment = alignment; +} + +TextObjectAlignment +TextComposite::GetElementVerticalAlignment(void) const +{ + return __elementVertialAlignment; +} + +void +TextComposite::SetCursorIndex(int cursorIndex) +{ + __cursorIndex = cursorIndex; +} + +int +TextComposite::GetCursorIndex(void) const +{ + return __cursorIndex; +} + +void +TextComposite::SetTextObjectEllipsisType(TextObjectEllipsisType type) +{ + __TextObjectEllipsisType = type; +} + +TextObjectEllipsisType +TextComposite::GetTextObjectEllipsisType(void) const +{ + return __TextObjectEllipsisType; +} + +void +TextComposite::SetTextAbbreviationEnabled(bool enable) +{ + __drawAbbrevText = enable; +} + +bool +TextComposite::IsTextAbbreviationEnabled(void) const +{ + if (__drawAbbrevText && __drawTextEllipsis) + { + return true; + } + + return false; +} + +bool +TextComposite::GetBlock(void) const +{ + return __displayBlock; +} + +int +TextComposite::GetWorkStart(void) const +{ + return __workStart; +} + +int +TextComposite::GetWorkLength(void) const +{ + return __workLength; +} + +TextObjectAlignment +TextComposite::GetImageAlign(int textIndex) const +{ + result r = E_SUCCESS; + unsigned int value = 0; + + r = GetValue(textIndex, SET_IMAGE_ALIGN, &value); + SysTryReturn(NID_GRP, r == E_SUCCESS, TEXT_OBJECT_ALIGNMENT_INVALID, r, "[%s] Propagating.", GetErrorMessage(r)); + + return (TextObjectAlignment)value; +} + +bool +TextComposite::IsChanged(void) const +{ + return __isChanged; +} + +void +TextComposite::SetBlockColor(const Color& color) +{ + __defaultBlockColor = color; +} + +Color +TextComposite::GetBlockColor(void) const +{ + return __defaultBlockColor; +} + +Tizen::Base::String +TextComposite::GetDisplayableText(FloatRectangle displayRect, TextObjectActionType action) +{ + int firstDisplayLineIndex = __pCurrentTextColumn->GetFirstDisplayLineIndex(); + TextLine* pTextLine = __pCurrentTextColumn->GetTextLine(firstDisplayLineIndex); + SysTryReturn(NID_GRP, pTextLine, L"", E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid. (firstDisplayLineIndex = %d)", firstDisplayLineIndex); + + int firstDisplayTextIndex = pTextLine->GetTextOffset(); + int displayableTextLength = 0; + int displayableLineCount = __pCurrentTextColumn->CalculateDisplayableLineCount(displayRect, action); + int lastDisplayLineIndex = firstDisplayLineIndex + displayableLineCount - 1; + + for (int i = firstDisplayLineIndex; i < lastDisplayLineIndex; i++) + { + pTextLine = __pCurrentTextColumn->GetTextLine(i); + SysTryReturn(NID_GRP, pTextLine, L"", E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid. (line index = %d)", i); + + displayableTextLength += pTextLine->GetTextLength(); + } + + pTextLine = __pCurrentTextColumn->GetTextLine(lastDisplayLineIndex); + SysTryReturn(NID_GRP, pTextLine, L"", E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid. (lastDisplayLineIndex = %d)", lastDisplayLineIndex); + + int lineOffset = pTextLine->GetTextOffset(); + int lineLength = pTextLine->GetTextLength(); + int elementTextOffset = 0; + int elementIndex = 0; + int currentLength = 0; + int textIndexFromElementOffset = 0; + int remainingLength = lineLength; + + if (lineOffset + remainingLength < __length) // abbreviation mode + { + TextElement* pTextElement = GetElementAtTextIndex(lineOffset, elementTextOffset, elementIndex, currentLength, textIndexFromElementOffset); + SysTryReturn(NID_GRP, pTextElement, String(L""), E_SYSTEM, "[E_SYSTEM] Fail to get element."); + + if (__ignoreFrontBlank && __frontSpaceHideMode == TEXT_OBJECT_SPACE_HIDE_TYPE_ONE) + { + const TextSimple* pSimpleText = dynamic_cast (pTextElement); + if (pSimpleText != null) + { + int index = lineOffset - elementTextOffset; + const wchar_t* pText = pSimpleText->GetText(); + SysTryReturn(NID_GRP, pText, String(L""), E_SYSTEM, "[E_SYSTEM] Fail to get text."); + + SysTryReturn(NID_GRP, index >= 0 && index < pSimpleText->GetTextLength() + , String(L""), E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] text index(%d) must greater than 0 and must be less than total string length(%d)" + ,index, pSimpleText->GetTextLength()); + + if (pText[index] == (wchar_t)L' ' || pText[index] == TEXT_JAPANESE_SPACE) + { + remainingLength--; + lineOffset++; + } + } + } + + if (action == TEXT_OBJECT_ACTION_TYPE_ABBREV) + { + FloatDimension textSize; + FloatDimension abbrevTextSize; + FloatRectangle lineBounds = pTextLine->GetBoundsF(); + + GetRegion(lineOffset, remainingLength, textSize.width, textSize.height); + + TextElement* pLastTextElement = GetElementAtTextIndex(lineOffset + lineLength - 1); + SysTryReturn(NID_GRP, pLastTextElement, -1, E_SYSTEM, "[E_SYSTEM] Fail to get element."); + + if (pLastTextElement->GetType() == TEXT_ELEMENT_TYPE_TEXT || pLastTextElement->GetType() == TEXT_ELEMENT_TYPE_CUTLINK) + { + TextSimple* pSimpleText = dynamic_cast < TextSimple* >(pLastTextElement); + SysTryReturn(NID_GRP, pSimpleText, String(L""), E_SYSTEM, "[E_SYSTEM] Fail to cast text element."); + + SetAbbrevObjectFontInfo(pSimpleText); + } + __pAbbrevTextElement->GetRegion(0, 1, abbrevTextSize.width, abbrevTextSize.height); + + ForwardAnalyze(lineOffset, __length - lineOffset, lineBounds.width - abbrevTextSize.width + , TEXT_OBJECT_WRAP_TYPE_CHARACTER, lineLength, textSize.width, textSize.height); + } + } + + displayableTextLength += lineLength; + + wchar_t* pText = GetTextN(firstDisplayTextIndex, displayableTextLength); + SysTryReturn(NID_GRP, pText, String(L""), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + String text(pText); + delete[] pText; + + return text; +} + +result +TextComposite::SetWorkWidth(Font* pFont, wchar_t* pText, int workStart, int textLength) +{ + result r = E_SUCCESS; + float width = 0; + float height = 0; + int workLength = 0; + const wchar_t* pSrc = &pText[workStart]; + + workLength = Math::Abs(textLength); + + r = TextUtility::GetTextExtent(pFont, pSrc, workLength, false, width, height); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (textLength < 0) + { + __workWidth = -width; + } + else + { + __workWidth = width; + } + + return E_SUCCESS; +} + +float +TextComposite::GetWorkWidth(void) +{ + return __workWidth; +} + +void +TextComposite::SetTextSweepInfo(TextObjectSweepInfo* pTextSweepInfo) +{ + __pSweepInfo = pTextSweepInfo; +} + +void +TextComposite::GetTextSweepInfo(TextObjectSweepInfo& textSweepInfo) +{ + textSweepInfo.isValid = __pSweepInfo->isValid; + textSweepInfo.sweepType = __pSweepInfo->sweepType; + textSweepInfo.sweepEventType = __pSweepInfo->sweepEventType; + textSweepInfo.anchorTextIndex = __pSweepInfo->anchorTextIndex; + textSweepInfo.anchorLineIndex = __pSweepInfo->anchorLineIndex; + textSweepInfo.sweepRegionStartLineIndex = __pSweepInfo->sweepRegionStartLineIndex; + textSweepInfo.sweepRegionLineCount = __pSweepInfo->sweepRegionLineCount; + textSweepInfo.insertedLineCount = __pSweepInfo->insertedLineCount; + textSweepInfo.deletedLineCount = __pSweepInfo->deletedLineCount; + textSweepInfo.widthChanged = __pSweepInfo->widthChanged; +} + +void +TextComposite::UpdateTextSweepInfo(TextObjectSweepInfo* pTextSweepInfo) +{ + __pSweepInfo->isValid = pTextSweepInfo->isValid; + __pSweepInfo->sweepType = pTextSweepInfo->sweepType; + __pSweepInfo->sweepEventType = pTextSweepInfo->sweepEventType; + __pSweepInfo->anchorTextIndex = pTextSweepInfo->anchorTextIndex; + __pSweepInfo->anchorLineIndex = pTextSweepInfo->anchorLineIndex; + __pSweepInfo->sweepRegionStartLineIndex = pTextSweepInfo->sweepRegionStartLineIndex; + __pSweepInfo->sweepRegionLineCount = pTextSweepInfo->sweepRegionLineCount; + __pSweepInfo->insertedLineCount = pTextSweepInfo->insertedLineCount; + __pSweepInfo->deletedLineCount = pTextSweepInfo->deletedLineCount; + __pSweepInfo->widthChanged = pTextSweepInfo->widthChanged; +} + +bool +TextComposite::IsRTL(int startTextIndex, int textLength) const +{ + SysTryReturn(NID_GRP, 0 <= startTextIndex && textLength <= __length, false, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + result r = E_SUCCESS; + IEnumerator* pEnum = null; + + int currentLength = 0; + int elementTextOffset = 0; + int elementIndex = 0; + int textIndexFromElementOffset = 0; + + if(textLength == 0) + { + return false; + } + + TextElement* pTextElement = GetElementAtTextIndex(startTextIndex, elementTextOffset, elementIndex, currentLength, textIndexFromElementOffset); + SysTryCatch(NID_GRP, pTextElement, , E_SYSTEM, "[E_SYSTEM] Fail to get element."); + + textIndexFromElementOffset = startTextIndex - elementTextOffset; + + pEnum = __pTextElementList->GetEnumeratorN(); + for (int i = 0; i < elementIndex; i++) + { + r = pEnum->MoveNext(); + } + + while (pEnum->MoveNext() == E_SUCCESS) + { + pTextElement = static_cast < TextElement* >(pEnum->GetCurrent()); + if (pTextElement) + { + currentLength = Math::Min(pTextElement->GetTextLength() - textIndexFromElementOffset, textLength); + + TextElementType objectType = pTextElement->GetType(); + + if (objectType == TEXT_ELEMENT_TYPE_TEXT || objectType == TEXT_ELEMENT_TYPE_CUTLINK) + { + TextSimple* pSimpleText = dynamic_cast < TextSimple* >(pTextElement); + if (pSimpleText) + { + const wchar_t* pSrcText = pSimpleText->GetText(); + SysTryCatch(NID_GRP, pSrcText, , E_SYSTEM, "[E_SYSTEM] Fail to get text."); + + const wchar_t* pPointer = &pSrcText[textIndexFromElementOffset]; + SysTryCatch(NID_GRP, pPointer, , E_SYSTEM, "[E_SYSTEM] Fail to get text."); + + for (int i = 0; i< currentLength; i++) + { + if(*pPointer == null) + { + break; + } + FriBidiChar bidiText[1] = { *pPointer }; + FriBidiCharType type[1] = { 0 }; + fribidi_get_bidi_types(bidiText, 1, type); + + if ((type[0] & FRIBIDI_MASK_RTL) != 0) + { + Release(pEnum); + return true; + } + else if (((type[0] & FRIBIDI_MASK_STRONG) != 0) && ((type[0] & FRIBIDI_MASK_LETTER) != 0)) + { + Release(pEnum); + return false; + } + + pPointer++; + } + + } + + textLength -= currentLength; + } + } + + if (textLength <= 0) + { + break; + } + + textIndexFromElementOffset = 0; + } + + Release(pEnum); + return false; + +CATCH: + Release(pEnum); + + return false; +} + +bool +TextComposite::IsRTLCharacter(int textIndex) const +{ + SysTryReturn(NID_GRP, 0 <= textIndex, false, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + bool isRTL = false; + + for (int i = textIndex; i >= 0; i--) + { + wchar_t ch = GetCharacter(i); + if (TextUtility::IsStrongCharacter(ch)) + { + if (TextUtility::IsRTLCharacter(GetCharacter(i))) + { + isRTL = true; + } + else + { + isRTL = false; + } + break; + } + } + + return isRTL; +} + +int +TextComposite::SearchLTRTextIndex(int startTextIndex,int fromTextIndex) const +{ + SysTryReturn(NID_GRP, 0 <= fromTextIndex, -1, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + bool isLTR = false; + int LTRTextIndex = -1; + wchar_t ch = 0; + + for (int i = fromTextIndex; i >= startTextIndex; i--) + { + ch = GetCharacter(i); + + if (TextUtility::IsLTRCharacter(ch)) + { + isLTR = true; + } + + if (isLTR == true) + { + LTRTextIndex = i + 1; + + while(1) + { + ch = GetCharacter(LTRTextIndex); + if (TextUtility::IsStrongCharacter(ch)) + { + break; + } + + LTRTextIndex++; + } + + break; + } + } + + LTRTextIndex = (startTextIndex <= LTRTextIndex && LTRTextIndex <= fromTextIndex) ? LTRTextIndex : startTextIndex; + + 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 new file mode 100644 index 0000000..db36d7a --- /dev/null +++ b/src/graphics/text/FGrp_TextTextComposite.h @@ -0,0 +1,373 @@ +// +// 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_TextTextComposite.h + * @brief This file contains the declarations of TextComposite class. + */ + +#ifndef _FGRP_INTERNAL_TEXT_COMPOSITE_H_ +#define _FGRP_INTERNAL_TEXT_COMPOSITE_H_ + +#include +#include "FGrp_TextCommon.h" +#include "FGrp_TextTextElement.h" + +namespace Tizen { namespace Graphics +{ +class _CanvasImpl; + +namespace _Text +{ + +class TextSimple; +class TextCutLink; +class TextLine; +class TextColumn; +class TextCutLinkListInfo; +struct NoneWrapComposeInfo; + +class TextComposite +{ +public: + TextComposite(TextElement* pTextElement = null); + + virtual ~TextComposite(void); + +public: + virtual int ForwardAnalyze(int startTextIndex, int textLength, int maxWidth, TextObjectWrapType wrap, + int& actualLength, int& width, int& height); + + virtual int ForwardAnalyze(int startTextIndex, int textLength, float maxWidth, TextObjectWrapType wrap, + int& actualLength, float& width, float& height); + + virtual int ForwardAnalyzeWithBaseline(int startTextIndex, int textLength, int maxWidth, TextObjectWrapType wrap, + int& actualLength, int& width, int& height, int& baseline); + + virtual int ForwardAnalyzeWithBaseline(int startTextIndex, int textLength, float maxWidth, TextObjectWrapType wrap, + int& actualLength, float& width, float& height, float& baseline); + + virtual int ForwardAnalyzeWithFocusedObjectType(int textIndex, int textLength, int maxWidth, + int& cursorIndex, TextElementType& type); + + virtual int ForwardAnalyzeWithFocusedObjectType(int textIndex, int textLength, float maxWidth, + int& cursorIndex, TextElementType& type); + + virtual result Draw(_CanvasImpl& canvasImpl, FloatRectangle& displayRect, int startTextIndex, int textLength, const TextObjectAlignment alignment, + const TextObjectActionType action); + + result DrawWithEliipsis(_CanvasImpl& canvasImpl, FloatRectangle& displayRect, int startTextIndex, int textLength, const TextObjectAlignment alignment, + const TextObjectActionType action); + + virtual result GetRegion(int textIndex, int textLength, float& width, float& height) const; + + virtual float GetHeightF(int textIndex) const; + + virtual int GetTextLength(void) const; + + virtual int Compose(FloatRectangle& rect, TextColumn* pTextColumn); + + result DrawWithBaseline(_CanvasImpl& canvasImpl, Rectangle& displayRect, int startTextIndex, int textLength, const TextObjectAlignment alignment, + const TextObjectActionType action, int baseline); + + result DrawWithBaseline(_CanvasImpl& canvasImpl, FloatRectangle& displayRect, int startTextIndex, int textLength, const TextObjectAlignment alignment, + const TextObjectActionType action, float baseline); + + result DrawWithBaselineWithEllipsis(_CanvasImpl& canvasImpl, FloatRectangle& displayRect, int startTextIndex, int textLength, const TextObjectAlignment alignment, + const TextObjectActionType action, int baseline); + + result InsertElementAt(TextElement& textElement, int textIndex); + + result AppendElement(TextElement& textElement); + + result Remove(int startTextIndex, int textLength); + + result RemoveElementAt(int elementIndex, bool deallocate = true); + + result RemoveAllElements(bool deallocate = true); + + result DrawLine(_CanvasImpl& canvasImpl, TextLine* pTextLine, const FloatRectangle& displayRect, const TextObjectAlignment align, const TextObjectActionType action); + + result DrawPartial(_CanvasImpl& canvasImpl, FloatRectangle& displayRect, int startTextIndex, int textLength); + + result DrawAbbrev(_CanvasImpl& canvasImpl, const FloatRectangle& displayRect, const TextObjectAlignment align); + + result GetText(TextComposite* pTargetCompsiteText, int textIndex, int textLength); + + wchar_t GetCharacter(int textIndex) const; + + wchar_t* GetTextN(int startTextIndex, int textLength) const; + + result Optimize(int startElementIndex, int endElementIndex); + + bool IsComposeDone(void) const; + + result ChangeTextOffset(wchar_t* pText, int elementIndex, int gap); + + result NotifyTextChanged(wchar_t* pText, int startTextIndex, int textLength, int gap, Font* pFont, + const Color& fgColor, const Color& bgColor, const Color& outlineColor); + + void HideFrontSpace(TextObjectSpaceHideType mode); + + void HideRearSpace(TextObjectSpaceHideType mode); + + result GetValue(TextElement* pTextElement, TextComponentInfoValueType type, unsigned int* value) const; + + int GetElementCount(void) const; + + int GetElementIndexOf(TextElement& textElement) const; + + TextElement* GetElementAtElementIndex(int elementIndex) const; + + TextElement* GetElementAtTextIndex(int textIndex, int& elementTextOffset, int& elementIndex, int& elementTextLength, + int& textIndexFromElementOffset) const; + + TextElement* GetElementAtTextIndex(int textIndex) const; + + result SetDisplayBitmap(const Bitmap* pBitmap); + + const Bitmap* GetDisplayBitmap(int textIndex) const; + + result SetFont(Font* pFont); + + Font* GetFont(int textIndex) const; + + result SetFontSize(int size); + + result SetFontSize(float size); + + int GetFontSize(int textIndex) const; + + float GetFontSizeF(int textIndex) const; + + result SetFontStyle(int style); + + int GetFontStyle(int textIndex) const; + + result SetForegroundColor(const Color& color); + + Color GetForegroundColor(int textIndex) const; + + result SetBackgroundColor(const Color& color); + + Color GetBackgroundColor(int textIndex) const; + + result SetOutlineColor(const Color& color); + + Color GetOutlineColor(int textIndex) const; + + Color GetAlternativeForegroundColor(int textIndex) const; + + result SetRange(int textStartIndex, int textLength); + + void GetRange(int& startTextIndex, int& textLength) const; + + void SetLineSpace(int gap); + + void SetLineSpace(float gap); + + int GetLineSpace(void) const; + + float GetLineSpaceF(void) const; + + void SetElementVerticalAlignment(TextObjectAlignment alignment); + + TextObjectAlignment GetElementVerticalAlignment(void) const; + + result SetWrap(TextObjectWrapType wrap); + + TextObjectWrapType GetWrap(void) const; + + void SetBlock(bool enable); + + bool GetBlock(void) const; + + result SetImageAlign(TextObjectAlignment align); + + TextObjectAlignment GetImageAlign(int textIndex) const; + + void SetCursorIndex(int cursorIndex); + + int GetCursorIndex(void) const; + + void SetTextAbbreviationEnabled(bool enable); + + bool IsTextAbbreviationEnabled(void) const; + + void SetPartialComposingModeEnabled(bool enable); + + bool IsPartialComposingModeEnabled(void) const; + + void SetComposePartialLimitHeight(int limitHeight); + + void SetComposePartialLimitHeight(float limitHeight); + + int GetComposePartialLimitHeight(void) const; + + float GetComposePartialLimitHeightF(void) const; + + void SetTextObjectEllipsisType(TextObjectEllipsisType type); + + TextObjectEllipsisType GetTextObjectEllipsisType(void) const; + + int ForwardAnalyzeInNoneCursorMode(int startTextIndex, int textLength, int maxWidth, int& textIndex); + + int ForwardAnalyzeInNoneCursorMode(int startTextIndex, int textLength, float maxWidth, int& textIndex); + + int GetTotalComposedHeight(void) const; + + float GetTotalComposedHeightF(void) const; + + int GetAnalysedTotalHeight(void) const; + + float GetAnalysedTotalHeightF(void) const; + + bool IsChanged(void) const; + + result ChangeCutLinkState(int linkIndex, bool select); + + result ResetAllCutLinkElementsState(void); + + int GetCutLinkElementCount(void) const; + + int GetCutLinkElementIndexAt(int textIndex) const; + + TextCutLink* GetCutLinkElementAtCutLinkElementIndex(int index) const; + + result GetCutLinkObjectInfo(int cutLinkIndex, int& textStartIndex, int& textLength) const; + + bool InitPartialComposeMode(void); + + TextElement* SearchTextElement(TextElementType type, int textIndex, int& elementTextOffset) const; + + TextElementType GetObjectType(int textIndex) const; + + int GetMaxLineHeight(void) const; + + float GetMaxLineHeightF(void) const; + + int GetWorkStart(void) const; + + int GetWorkLength(void) const; + + result SetAlternateLookEnabled(bool enable); + + result SetWorkWidth(Font* pFont, wchar_t* pText, int workStart, int textLength); + + float GetWorkWidth(void); + + void SetTextSweepInfo(TextObjectSweepInfo* pTextSweepInfo); + + void GetTextSweepInfo(TextObjectSweepInfo& textSweepInfo); + + void UpdateTextSweepInfo(TextObjectSweepInfo* pTextSweepInfo); + + void SetBlockColor(const Color& color); + + Color GetBlockColor(void) const; + + result GetTextExtentList(TextLine* pTextLine) const; + + Tizen::Base::String GetDisplayableText(FloatRectangle displayRect, TextObjectActionType action); + + bool IsRTL(int startTextIndex, int textLength) const; + + bool IsRTLCharacter(int textIndex) const; + + int SearchLTRTextIndex(int startTextIndex,int fromTextIndex) const; + + int SearchRTLTextIndex(int startTextIndex,int fromTextIndex) const; + +private: + int ComposeInNoneWrap(FloatRectangle& rect, NoneWrapComposeInfo* pNoneWrapComposeInfo = null); + + int ComposeInWrap(FloatRectangle& rect); + + int ComposeInWrapInSweepMode(FloatRectangle& rect); + + int ComposeInNoneWrapMiddleEllipsis(FloatRectangle& rect); + + int ComposeInNoneWrapHeadEllipsis(FloatRectangle& rect); + + int ComposeInPartialMode(FloatRectangle& rect); + + bool BackwardAnalyze(int startTextIndex, float maxWidth, int& actualLength, float& width, float& height); + + result DrawAbbrevInMiddleEllipsis(_CanvasImpl& canvasImpl, const FloatRectangle& displayRect, const TextObjectAlignment alignment); + + result DrawAbbrevInHeadEllipsis(_CanvasImpl& canvasImpl, const FloatRectangle& displayRect, const TextObjectAlignment alignmen); + + result SetValueToAllTextElements(TextComponentInfoValueType type, unsigned int value); + + bool SetAbbrevObjectFontInfo(TextSimple* pSimpleTextElement); + + result GetValue(int textIndex, TextComponentInfoValueType type, unsigned int* value) const; + + int GetFirstTextIndexAt(int elementIndex) const; + + result DrawBlock(_CanvasImpl& canvasImpl, const FloatRectangle& displayRect, int startTextIndex, int textLength, + const TextObjectAlignment align, const TextObjectActionType action); + + result DrawBackgroundBlock(_CanvasImpl& canvasImpl, const FloatRectangle& displayRect, int startTextIndex, int textLength, + const TextObjectAlignment align, const TextObjectActionType action); + +private: + bool __isChanged; + TextObjectWrapType __wrap; + int __length; + Tizen::Base::Collection::LinkedList* __pTextElementList; + Color __defaultBlockColor; + bool __displayBlock; + int __workStart; + int __workLength; + float __workWidth; + int __cursorIndex; + bool __ignoreRearBlank; + bool __ignoreFrontBlank; + TextObjectSpaceHideType __rearSpaceHideMode; + TextObjectSpaceHideType __frontSpaceHideMode; + float __lineSpacing; + TextObjectAlignment __elementVertialAlignment; + TextColumn* __pCurrentTextColumn; + TextSimple* __pAbbrevTextElement; + bool __partialComposingModeEnabled; + int __lineIndexCompositeDone; + float __totalComposedHeight; + float __composePartialLimitHeight; + TextCutLinkListInfo* __pCutLinkListInfo; + TextObjectEllipsisType __TextObjectEllipsisType; + bool __drawAbbrevText; + bool __drawTextEllipsis; + int __middleEllipsisTextLengthInHead; + float __middleEllipsisHeadWidth; + float __middleEllipsisWidth; + int __middleEllipsisTextLengthInTail; + float __headEllipsisWidth; + int __headEllipsisTextLength; + + TextObjectSweepInfo* __pSweepInfo; + +private: + TextComposite(const TextComposite&); // NOT IMPLMENTED + + TextComposite& operator =(const TextComposite&); // NOT IMPLMENTED + +}; // TextComposite + +}}} // Tizen::Graphics::_Text + +#endif // _FGRP_INTERNAL_TEXT_COMPOSITE_H_ diff --git a/src/graphics/text/FGrp_TextTextCutLink.cpp b/src/graphics/text/FGrp_TextTextCutLink.cpp new file mode 100644 index 0000000..bea0647 --- /dev/null +++ b/src/graphics/text/FGrp_TextTextCutLink.cpp @@ -0,0 +1,334 @@ +// +// 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_TextTextCutLink.cpp + * @brief This is the implementation file for TextCutLink class. + */ + +#include +#include +#include "FGrp_TextCommon.h" +#include "FGrp_TextTextUtility.h" +#include "FGrp_TextTextElement.h" +#include "FGrp_TextTextSimple.h" +#include "FGrp_TextTextCutLink.h" +#include "FGrp_CanvasImpl.h" +#include "FGrp_CoordinateSystemUtils.h" + +using namespace Tizen::Base::Utility; + +namespace // unnamed +{ + const int DEFAULT_FONT_SIZE = 42; +} + +namespace Tizen { namespace Graphics +{ + +namespace _Text +{ + +TextCutLink::TextCutLink(bool isEditable, LinkType cutLinkType, const wchar_t* pText, int length, TextElementSourceType sourceType, + Font* pFont, const Color& foregroundColor, const Color& backgroundColor, const Color& + outlineColor) + : TextSimple(pText, length, sourceType, pFont, foregroundColor, backgroundColor, outlineColor) +{ + __linkType = cutLinkType; + __isEditable = isEditable; + __isEdited = false; + __isSelected = false; + _type = TEXT_ELEMENT_TYPE_CUTLINK; + __isColorDefined = false; + __linkColor = Color::GetColor(COLOR_ID_BLUE); + __linkSelectedColor = Color::GetColor(COLOR_ID_BLUE); + + __pLinkFont = new (std::nothrow) Font(); + __pLinkFont->Construct(FONT_STYLE_PLAIN, DEFAULT_FONT_SIZE); +} + +TextCutLink::~TextCutLink(void) +{ + if (__pLinkFont) + { + delete __pLinkFont; + __pLinkFont = null; + } +} + +result +TextCutLink::Draw(_CanvasImpl& canvasImpl, Rectangle& displayRect, int startTextIndex, int textLength, const TextObjectAlignment align, + const TextObjectActionType action) +{ + SysTryReturn(NID_GRP, displayRect.x >= 0 && displayRect.y >= 0 + , E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + return Draw(canvasImpl, displayRect, startTextIndex, textLength, align, action); +} + +result +TextCutLink::Draw(_CanvasImpl& canvasImpl, FloatRectangle& displayRect, int startTextIndex, int textLength, const TextObjectAlignment align, + const TextObjectActionType action) +{ + return TextSimple::Draw(canvasImpl, displayRect, startTextIndex, textLength, align, action); +} + +TextElement* +TextCutLink::CloneN(TextComponentInfoValueType type, unsigned int value) +{ + TextCutLink* pLinkElement = null; + + 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] Memory allocation failed."); + + TextElement::CopyMembers(pLinkElement); + + pLinkElement->__isEdited = __isEdited; + pLinkElement->SetValue(type, value); + + return pLinkElement; +} + +TextElement* +TextCutLink::CopyN(int textStartIndex, int textLength) +{ + const wchar_t* pText = null; + + TextCutLink* pLinkElement = null; + + SysTryReturn(NID_GRP, textStartIndex < _length, null, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + if (textStartIndex + textLength > _length) + { + textLength = _length - textStartIndex; + } + + SysTryReturn(NID_GRP, textLength >= 0, null, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + pText = &_pText[_offset + textStartIndex]; + + 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] Memory allocation failed."); + + pLinkElement->_isBackgroundDrawingModeEnabled = _isBackgroundDrawingModeEnabled; + pLinkElement->__isEdited = __isEdited; + + return pLinkElement; +} + +result +TextCutLink::SetValue(TextComponentInfoValueType type, unsigned int value) +{ + switch (type) + { + case SET_CUTLINK_TYPE: + // fall through + return E_INVALID_ARG; + + case SET_CUTLINK_EDITABLE: + // fall through + return E_INVALID_ARG; + + case SET_CUTLINK_EDITING: + if (__isEditable) + { + __isEdited = (bool) value; + return E_SUCCESS; + } + return E_INVALID_ARG; + + default: + break; + } + + if (!__isEdited && type == SET_TEXT_OFFSET) + { + return E_INVALID_ARG; + } + + return TextSimple::SetValue(type, value); +} + +unsigned int +TextCutLink::GetValue(TextComponentInfoValueType type) const +{ + switch (type) + { + case SET_CUTLINK_TYPE: + // fall through + return (unsigned int) __linkType; + + case SET_CUTLINK_EDITABLE: + // fall through + return (unsigned int) __isEditable; + + case SET_CUTLINK_EDITING: + // fall through + return (unsigned int) __isEdited; + + default: + // fall through + return TextSimple::GetValue(type); + } +} + +void +TextCutLink::SetSelect(bool isSelected) +{ + __isSelected = isSelected; +} + +bool +TextCutLink::GetSelect(void) const +{ + return __isSelected; +} + +void +TextCutLink::SetUserColor(const Color& color, const Color& colorInSelect) +{ + __isColorDefined = true; + __linkColor = color; + __linkSelectedColor = colorInSelect; +} + +void +TextCutLink::ResetUserColor(void) +{ + __isColorDefined = false; +} + +result +TextCutLink::SetTextOffset(int offset) +{ + SysTryReturn(NID_GRP, __isEdited == true, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + return TextSimple::SetTextOffset(offset); +} + +result +TextCutLink::ChangeTextOffset(wchar_t* pText, int gap) +{ + SysTryReturn(NID_GRP, __isEdited == true, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + return TextSimple::ChangeTextOffset(pText, gap); +} + +const Font* +TextCutLink::GetFont(void) const +{ + if (__isEdited) + { + return TextSimple::GetCurrentFont(); + } + + return __pLinkFont; +} + +Font* +TextCutLink::GetCurrentFont(void) const +{ + if (__isEdited) + { + return TextSimple::GetCurrentFont(); + } + + return __pLinkFont; +} + +Color +TextCutLink::GetCurrentForegroundColor(void) const +{ + if (__isEdited) + { + return TextSimple::GetCurrentForegroundColor(); + } + + if (__isColorDefined) + { + if (__isSelected) + { + return __linkSelectedColor; + } + + return __linkColor; + } + + if (__isSelected) + { + return Color::GetColor(COLOR_ID_BLUE); + } + + return Color::GetColor(COLOR_ID_BLUE); +} + +Color +TextCutLink::GetCurrentBackgroundColor(void) const +{ + if (__isEdited) + { + return TextSimple::GetCurrentBackgroundColor(); + } + + if (__isSelected) + { + return Color::GetColor(COLOR_ID_WHITE); + } + + return Color::GetColor(COLOR_ID_WHITE); +} + +Color +TextCutLink::GetCurrentOutlineColor(void) const +{ + if (__isEdited) + { + return TextSimple::GetCurrentOutlineColor(); + } + + return Color::GetColor(COLOR_ID_WHITE); +} + +bool +TextCutLink::GetEditable(void) const +{ + return __isEditable; +} + +void +TextCutLink::SetEditModeEnable(bool enable) +{ + __isEdited = enable; +} + +bool +TextCutLink::IsEditModeEnable(void) const +{ + return __isEdited; +} + +Tizen::Base::Utility::LinkType +TextCutLink::GetCutLinkType(void) const +{ + return __linkType; +} + +}}} // Tizen::Graphics::_Text diff --git a/src/graphics/text/FGrp_TextTextCutLinkListInfo.cpp b/src/graphics/text/FGrp_TextTextCutLinkListInfo.cpp new file mode 100644 index 0000000..342643e --- /dev/null +++ b/src/graphics/text/FGrp_TextTextCutLinkListInfo.cpp @@ -0,0 +1,579 @@ +// +// 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_TextTextCutLinkListInfo.cpp + * @brief This is the implementation file for TextCutLinkListInfo class. + */ + +#include +#include +#include "FGrp_TextTextCutLink.h" +#include "FGrp_TextTextCutLinkListInfo.h" + +using namespace Tizen::Base::Collection; + +#define Release(x) \ + if (x) \ + { \ + delete x; \ + x = null; \ + } + +namespace Tizen { namespace Graphics +{ + +namespace _Text +{ + +TextCutLinkListInfo::TextCutLinkListInfo(void) +{ + __totalTextLength = 0; + __pCutLinkTextElementInfoList = new (std::nothrow) LinkedListT ; +} + +TextCutLinkListInfo::~TextCutLinkListInfo(void) +{ + if (__pCutLinkTextElementInfoList) + { + RemoveAllCutLinkElementInfos(); + + delete __pCutLinkTextElementInfoList; + __pCutLinkTextElementInfoList = null; + } +} + +int +TextCutLinkListInfo::GetCutLinkElementCount(void) const +{ + return __pCutLinkTextElementInfoList->GetCount(); +} + +result +TextCutLinkListInfo::InsertCutLinkElementInfo(int textIndex, TextCutLink& linkTextElement, int textLength) +{ + result r = E_SUCCESS; + + IEnumeratorT* pEnum = null; + CutLinkTextElementInfo* pCurrentCutlinkTextElementInfo = null; + int currentCutlinkTextElementIndex = 0; + int index = 0; + + CutLinkTextElementInfo* pCutlinkTextElementInfo = new (std::nothrow) CutLinkTextElementInfo; + SysTryCatch(NID_GRP + , pCutlinkTextElementInfo + , r = E_INVALID_ARG, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pEnum = __pCutLinkTextElementInfoList->GetEnumeratorN(); + while (pEnum->MoveNext() == E_SUCCESS) + { + pEnum->GetCurrent(pCurrentCutlinkTextElementInfo); + if (!pCurrentCutlinkTextElementInfo) + { + continue; + } + + if (textIndex <= pCurrentCutlinkTextElementInfo->startTextIndex) + { + break; + } + + pCurrentCutlinkTextElementInfo = null; + currentCutlinkTextElementIndex++; + } + + pCutlinkTextElementInfo->startTextIndex = textIndex; + pCutlinkTextElementInfo->textLength = textLength; + pCutlinkTextElementInfo->pCutLinkTextElement = &linkTextElement; + + r = __pCutLinkTextElementInfoList->InsertAt(pCutlinkTextElementInfo, currentCutlinkTextElementIndex); + SysTryCatch(NID_GRP + , r == E_SUCCESS + , , r, "[%s] Fail to insert element.", GetErrorMessage(r)); + + __totalTextLength += textLength; + pCurrentCutlinkTextElementInfo = null; + index = currentCutlinkTextElementIndex + 1; + + __pCutLinkTextElementInfoList->GetAt(index, pCurrentCutlinkTextElementInfo); + while (pCurrentCutlinkTextElementInfo) + { + pCurrentCutlinkTextElementInfo->startTextIndex += textLength; + index++; + + pCurrentCutlinkTextElementInfo = null; + __pCutLinkTextElementInfoList->GetAt(index, pCurrentCutlinkTextElementInfo); + } + + Release(pEnum); + return E_SUCCESS; + +CATCH: + Release(pEnum); + return r; +} + +result +TextCutLinkListInfo::RemoveCutLinkElementInfo(TextCutLink* pCutLinkTextElement) +{ + SysTryReturn(NID_GRP + , pCutLinkTextElement + , E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + result r = E_SUCCESS; + + IEnumeratorT* pEnum = null; + CutLinkTextElementInfo* pCurrentCutlinkTextElementInfo = null; + int currentCutlinkTextElementIndex = 0; + int index = 0; + int cutlinkTextElementLength = 0; + + pEnum = __pCutLinkTextElementInfoList->GetEnumeratorN(); + while (pEnum->MoveNext() == E_SUCCESS) + { + pEnum->GetCurrent(pCurrentCutlinkTextElementInfo); + if (!pCurrentCutlinkTextElementInfo) + { + continue; + } + + if (pCurrentCutlinkTextElementInfo->pCutLinkTextElement == pCutLinkTextElement) + { + break; + } + + currentCutlinkTextElementIndex++; + pCurrentCutlinkTextElementInfo = null; + } + + SysTryCatch(NID_GRP + , pCurrentCutlinkTextElementInfo + , , E_SYSTEM, "[E_SYSTEM] Fail to search CutLink element."); + + cutlinkTextElementLength = pCurrentCutlinkTextElementInfo->textLength; + + r = __pCutLinkTextElementInfoList->RemoveAt(currentCutlinkTextElementIndex); + SysTryCatch(NID_GRP + , r == E_SUCCESS + , , r, "[%s] Fail to add element.", GetErrorMessage(r)); + + __totalTextLength -= pCurrentCutlinkTextElementInfo->textLength; + + delete pCurrentCutlinkTextElementInfo; + pCurrentCutlinkTextElementInfo = null; + + index = currentCutlinkTextElementIndex; + __pCutLinkTextElementInfoList->GetAt(index, pCurrentCutlinkTextElementInfo); + while (pCurrentCutlinkTextElementInfo) + { + pCurrentCutlinkTextElementInfo->startTextIndex -= cutlinkTextElementLength; + index++; + + pCurrentCutlinkTextElementInfo = null; + __pCutLinkTextElementInfoList->GetAt(index, pCurrentCutlinkTextElementInfo); + } + + Release(pEnum); + return E_SUCCESS; + +CATCH: + Release(pEnum); + return r; +} + +result +TextCutLinkListInfo::InsertText(int textIndex, int textLength) +{ + IEnumeratorT* pEnum = null; + CutLinkTextElementInfo* pCurrentCutlinkTextElementInfo = null; + int index = 0; + + pEnum = __pCutLinkTextElementInfoList->GetEnumeratorN(); + while (pEnum->MoveNext() == E_SUCCESS) + { + pEnum->GetCurrent(pCurrentCutlinkTextElementInfo); + if (!pCurrentCutlinkTextElementInfo) + { + continue; + } + + if (textIndex < pCurrentCutlinkTextElementInfo->startTextIndex) + { + break; + } + + if (pCurrentCutlinkTextElementInfo->startTextIndex + pCurrentCutlinkTextElementInfo->textLength > textIndex) + { + pCurrentCutlinkTextElementInfo->textLength += textLength; + } + + index++; + pCurrentCutlinkTextElementInfo = null; + } + + if (__pCutLinkTextElementInfoList->GetCount() > 0) + { + __pCutLinkTextElementInfoList->GetAt(index, pCurrentCutlinkTextElementInfo); + while (pCurrentCutlinkTextElementInfo) + { + pCurrentCutlinkTextElementInfo->startTextIndex += textLength; + index++; + + pCurrentCutlinkTextElementInfo = null; + __pCutLinkTextElementInfoList->GetAt(index, pCurrentCutlinkTextElementInfo); + } + } + + __totalTextLength += textLength; + + Release(pEnum); + return E_SUCCESS; +} + +result +TextCutLinkListInfo::RemoveText(int textIndex, int textLength) +{ + result r = E_SUCCESS; + + IEnumeratorT* pEnum = null; + CutLinkTextElementInfo* pCurrentCutlinkTextElementInfo = null; + + int currentCutlinkTextElementIndex = 0; + int firstChangedCutlinkTextElementInfoIndex = -1; + int firstChangedTextLength = 0; + int lastChangedCutlinkTextElementInfoIndex = -1; + int lastChangedTextLength = 0; + int lastChangedTextIndex = textIndex + textLength - 1; + int index = 0; + + pEnum = __pCutLinkTextElementInfoList->GetEnumeratorN(); + while (pEnum->MoveNext() == E_SUCCESS) + { + pEnum->GetCurrent(pCurrentCutlinkTextElementInfo); + if (!pCurrentCutlinkTextElementInfo) + { + continue; + } + + if (pCurrentCutlinkTextElementInfo->startTextIndex + pCurrentCutlinkTextElementInfo->textLength < textIndex) + { + if (pCurrentCutlinkTextElementInfo->startTextIndex < textIndex) + { + firstChangedCutlinkTextElementInfoIndex = currentCutlinkTextElementIndex; + firstChangedTextLength = textIndex - pCurrentCutlinkTextElementInfo->startTextIndex + 1; + } + else + { + firstChangedCutlinkTextElementInfoIndex = currentCutlinkTextElementIndex; + firstChangedTextLength = pCurrentCutlinkTextElementInfo->textLength; + } + } + + if (pCurrentCutlinkTextElementInfo->startTextIndex + pCurrentCutlinkTextElementInfo->textLength > lastChangedTextIndex) + { + if (pCurrentCutlinkTextElementInfo->startTextIndex <= lastChangedTextIndex) + { + lastChangedCutlinkTextElementInfoIndex = currentCutlinkTextElementIndex; + lastChangedTextLength = lastChangedTextIndex - pCurrentCutlinkTextElementInfo->startTextIndex + 1; + break; + } + else + { + lastChangedCutlinkTextElementInfoIndex = currentCutlinkTextElementIndex; + lastChangedTextLength = 0; + break; + } + } + + pCurrentCutlinkTextElementInfo = null; + } + + if (firstChangedCutlinkTextElementInfoIndex == -1) + { + Release(pEnum); + return false; + } + + if (lastChangedCutlinkTextElementInfoIndex == -1) + { + lastChangedCutlinkTextElementInfoIndex = __pCutLinkTextElementInfoList->GetCount(); + } + + int deletedCutlinkTextElementCount = 0; + + for (int i = firstChangedCutlinkTextElementInfoIndex; i <= lastChangedCutlinkTextElementInfoIndex; i++) + { + if (i == firstChangedCutlinkTextElementInfoIndex) + { + __pCutLinkTextElementInfoList->GetAt(i - deletedCutlinkTextElementCount, pCurrentCutlinkTextElementInfo); + if (pCurrentCutlinkTextElementInfo == null) + { + break; + } + + if (pCurrentCutlinkTextElementInfo->textLength == firstChangedTextLength) + { + r = __pCutLinkTextElementInfoList->RemoveAt(i - deletedCutlinkTextElementCount); + SysTryCatch(NID_GRP + , r == E_SUCCESS + , , r, "[%s] Fail to add element.", GetErrorMessage(r)); + + delete pCurrentCutlinkTextElementInfo; + pCurrentCutlinkTextElementInfo = null; + + deletedCutlinkTextElementCount++; + } + else + { + pCurrentCutlinkTextElementInfo->textLength -= firstChangedTextLength; + } + } + else if (i == lastChangedCutlinkTextElementInfoIndex) + { + __pCutLinkTextElementInfoList->GetAt(i - deletedCutlinkTextElementCount, pCurrentCutlinkTextElementInfo); + if (pCurrentCutlinkTextElementInfo == null) + { + break; + } + + if (pCurrentCutlinkTextElementInfo->textLength == lastChangedTextLength) + { + r = __pCutLinkTextElementInfoList->RemoveAt(i - deletedCutlinkTextElementCount); + SysTryCatch(NID_GRP + , r == E_SUCCESS + , , r, "[%s] Fail to remove element.", GetErrorMessage(r)); + + delete pCurrentCutlinkTextElementInfo; + pCurrentCutlinkTextElementInfo = null; + + deletedCutlinkTextElementCount++; + } + else + { + pCurrentCutlinkTextElementInfo->startTextIndex -= textLength; + pCurrentCutlinkTextElementInfo->textLength -= lastChangedTextLength; + } + } + else + { + __pCutLinkTextElementInfoList->GetAt(i - deletedCutlinkTextElementCount, pCurrentCutlinkTextElementInfo); + if (pCurrentCutlinkTextElementInfo == null) + { + break; + } + + r = __pCutLinkTextElementInfoList->RemoveAt(i - deletedCutlinkTextElementCount); + SysTryCatch(NID_GRP + , r == E_SUCCESS + , , r, "[%s] Fail to remove element.", GetErrorMessage(r)); + + delete pCurrentCutlinkTextElementInfo; + pCurrentCutlinkTextElementInfo = null; + + deletedCutlinkTextElementCount++; + } + } + + index = lastChangedCutlinkTextElementInfoIndex + 1 - deletedCutlinkTextElementCount; + __pCutLinkTextElementInfoList->GetAt(index, pCurrentCutlinkTextElementInfo); + while (pCurrentCutlinkTextElementInfo) + { + pCurrentCutlinkTextElementInfo->startTextIndex -= textLength; + index++; + + pCurrentCutlinkTextElementInfo = null; + __pCutLinkTextElementInfoList->GetAt(index, pCurrentCutlinkTextElementInfo); + } + + __totalTextLength -= textLength; + + Release(pEnum); + return E_SUCCESS; + +CATCH: + Release(pEnum); + return r; +} + +int +TextCutLinkListInfo::GetCutLinkElementIndexAt(int textIndex) const +{ + IEnumeratorT* pEnum = null; + CutLinkTextElementInfo* pCurrentCutlinkTextElementInfo = null; + int currentCutlinkTextElementInfoIndex = 0; + + pEnum = __pCutLinkTextElementInfoList->GetEnumeratorN(); + while (pEnum->MoveNext() == E_SUCCESS) + { + pEnum->GetCurrent(pCurrentCutlinkTextElementInfo); + if (!pCurrentCutlinkTextElementInfo) + { + continue; + } + + if (pCurrentCutlinkTextElementInfo->startTextIndex <= textIndex && + pCurrentCutlinkTextElementInfo->startTextIndex + pCurrentCutlinkTextElementInfo->textLength > textIndex) + { + Release(pEnum); + return currentCutlinkTextElementInfoIndex; + } + + if (textIndex < pCurrentCutlinkTextElementInfo->startTextIndex) + { + break; + } + + currentCutlinkTextElementInfoIndex++; + + pCurrentCutlinkTextElementInfo = null; + } + + Release(pEnum); + return -1; +} + +TextCutLink* +TextCutLinkListInfo::GetCutLinkElementAtTextIndex(int textIndex) const +{ + CutLinkTextElementInfo* pCurrentCutlinkTextElementInfo = null; + int cutlinkTextTextIndex = GetCutLinkElementIndexAt(textIndex); + + SysTryReturn(NID_GRP + , cutlinkTextTextIndex != -1 + , null, E_INVALID_ARG, "[E_SYSTEM] Fail to get cutlink text."); + + __pCutLinkTextElementInfoList->GetAt(cutlinkTextTextIndex, pCurrentCutlinkTextElementInfo); + SysTryReturn(NID_GRP + , pCurrentCutlinkTextElementInfo + , null, E_INVALID_ARG, "[E_SYSTEM] Fail to get cutlink text element."); + + return pCurrentCutlinkTextElementInfo->pCutLinkTextElement; +} + +TextCutLink* +TextCutLinkListInfo::GetCutLinkElementAtCutLinkElementIndex(int index) const +{ + CutLinkTextElementInfo* pCurrentCutlinkTextElementInfo = null; + + __pCutLinkTextElementInfoList->GetAt(index, pCurrentCutlinkTextElementInfo); + SysTryReturn(NID_GRP + , pCurrentCutlinkTextElementInfo + , null, E_SYSTEM, "[E_SYSTEM] Fail to get element."); + + return pCurrentCutlinkTextElementInfo->pCutLinkTextElement; +} + +result +TextCutLinkListInfo::RemoveAllCutLinkElementInfos(void) +{ + result r = E_SUCCESS; + CutLinkTextElementInfo* pCurrentCutlinkTextElementInfo = null; + + for (int i = 0; i < __pCutLinkTextElementInfoList->GetCount(); i++ ) + { + __pCutLinkTextElementInfoList->GetAt(i, pCurrentCutlinkTextElementInfo); + SysTryReturn(NID_GRP + , pCurrentCutlinkTextElementInfo + , E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element."); + + r = __pCutLinkTextElementInfoList->RemoveAt(i); + SysTryReturn(NID_GRP + , r == E_SUCCESS + , E_SYSTEM, E_SYSTEM, "[%s] Fail to add element.", GetErrorMessage(r)); + + delete pCurrentCutlinkTextElementInfo; + pCurrentCutlinkTextElementInfo = null; + } + + __totalTextLength = 0; + + return E_SUCCESS; +} + +result +TextCutLinkListInfo::ResetAllCutLinkElementsState(void) +{ + result r = E_SUCCESS; + IEnumeratorT* pEnum = null; + CutLinkTextElementInfo* pCurrentCutlinkTextElementInfo = null; + TextCutLink* pCutlinkTextElement = null; + + pEnum = __pCutLinkTextElementInfoList->GetEnumeratorN(); + while (pEnum->MoveNext() == E_SUCCESS) + { + pEnum->GetCurrent(pCurrentCutlinkTextElementInfo); + if (!pCurrentCutlinkTextElementInfo) + { + continue; + } + + pCutlinkTextElement = pCurrentCutlinkTextElementInfo->pCutLinkTextElement; + SysTryCatch(NID_GRP + , pCutlinkTextElement + , r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get cutlink text element."); + + pCutlinkTextElement->SetSelect(false); + + pCurrentCutlinkTextElementInfo = null; + } + + Release(pEnum); + return E_SUCCESS; + +CATCH: + Release(pEnum); + return r; +} + +result +TextCutLinkListInfo::ChangeCutLinkState(int linkIndex, bool select) +{ + CutLinkTextElementInfo* pCurrentCutlinkTextElementInfo = null; + TextCutLink* pCutlinkTextElement = null; + + __pCutLinkTextElementInfoList->GetAt(linkIndex, pCurrentCutlinkTextElementInfo); + SysTryReturn(NID_GRP + , pCurrentCutlinkTextElementInfo + , E_INVALID_ARG, E_INVALID_ARG, "[E_SYSTEM] Fail to get current cutlink element information."); + + pCutlinkTextElement = pCurrentCutlinkTextElementInfo->pCutLinkTextElement; + SysTryReturn(NID_GRP + , pCutlinkTextElement + , E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get cutlink element."); + + pCutlinkTextElement->SetSelect(select); + + return E_SUCCESS; +} + +result +TextCutLinkListInfo::GetCutLinkObjectInfo(int index, int& startTextIndex, int& textLength) const +{ + CutLinkTextElementInfo* pCurrentCutlinkTextElementInfo = null; + + __pCutLinkTextElementInfoList->GetAt(index, pCurrentCutlinkTextElementInfo); + SysTryReturn(NID_GRP + , pCurrentCutlinkTextElementInfo + , E_INVALID_ARG, E_INVALID_ARG, "[E_SYSTEM] Fail to get current cutlink text element."); + + startTextIndex = pCurrentCutlinkTextElementInfo->startTextIndex; + textLength = pCurrentCutlinkTextElementInfo->textLength; + + return E_SUCCESS; +} + +}}} // Tizen::Graphics::_Text diff --git a/src/graphics/text/FGrp_TextTextCutLinkListInfo.h b/src/graphics/text/FGrp_TextTextCutLinkListInfo.h new file mode 100644 index 0000000..4515403 --- /dev/null +++ b/src/graphics/text/FGrp_TextTextCutLinkListInfo.h @@ -0,0 +1,92 @@ +// +// 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_TextTextCutLinkListInfo.h + * @brief This is the header file for the TextCutLinkListInfo class. + * + * This header file contains the declarations of the %TextCutLinkListInfo class. + */ + +#ifndef _FGRP_INTERNAL_TEXT_CUTLINK_LIST_INFO_H_ +#define _FGRP_INTERNAL_TEXT_CUTLINK_LIST_INFO_H_ + +#include +#include "FGrp_TextCommon.h" +#include "FGrp_TextTextElement.h" + +namespace Tizen { namespace Graphics +{ + +namespace _Text +{ + +class TextCutLink; + +struct CutLinkTextElementInfo +{ + int startTextIndex; + int textLength; + TextCutLink* pCutLinkTextElement; +}; + +class TextCutLinkListInfo +{ +public: + TextCutLinkListInfo(void); + + virtual ~TextCutLinkListInfo(void); + +public: + result InsertCutLinkElementInfo(int textIndex, TextCutLink& linkTextElement, int textLength); + + result RemoveCutLinkElementInfo(TextCutLink* pCutLinkTextElement); + + result InsertText(int textIndex, int textLength); + + result RemoveText(int textIndex, int textLength); + + result RemoveAllCutLinkElementInfos(void); + + int GetCutLinkElementCount(void) const; + + int GetCutLinkElementIndexAt(int textIndex) const; + + TextCutLink* GetCutLinkElementAtTextIndex(int textIndex) const; + + TextCutLink* GetCutLinkElementAtCutLinkElementIndex(int index) const; + + result GetCutLinkObjectInfo(int index, int& startTextIndex, int& textLength) const; + + result ResetAllCutLinkElementsState(void); + + result ChangeCutLinkState(int linkIndex, bool select); + +private: + Tizen::Base::Collection::LinkedListT * __pCutLinkTextElementInfoList; + int __totalTextLength; + +private: + TextCutLinkListInfo(const TextCutLinkListInfo& other); // NOT IMPLMENTED + + TextCutLinkListInfo& operator =(const TextCutLinkListInfo& rhs); // NOT IMPLMENTED + +}; // TextCutLinkListInfo + +}}} // Tizen::Graphics::_Text + +#endif // _FGRP_INTERNAL_TEXT_CUTLINK_LIST_INFO_H_ diff --git a/src/graphics/text/FGrp_TextTextCutLinkParser.cpp b/src/graphics/text/FGrp_TextTextCutLinkParser.cpp new file mode 100644 index 0000000..f163424 --- /dev/null +++ b/src/graphics/text/FGrp_TextTextCutLinkParser.cpp @@ -0,0 +1,817 @@ +// +// 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_TextTextCutLinkParser.cpp + * @brief This is the implementation file for TextCutLinkParser class. + */ + +#include +#include +#include +#include "FGrp_TextCommon.h" +#include "FGrp_TextTextCutLinkParser.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Base::Utility; +using namespace Tizen::Graphics; + +static const int _MIN_TEXT_LENGTH = 5; +static const int _MIN_PHONE_NUMBER_LENGTH = 7; +static const int _MAX_PHONE_NUMBER_LENGTH = 15; + +static ArrayListT * gpDomainNames = null; +static ArrayListT * gpUrlPrefixes = null; + +namespace Tizen { namespace Graphics +{ + +namespace _Text +{ + +static bool +IsGenericCharacter(wchar_t ch) +{ + if ((ch >= L'a' && ch <= L'z') || (ch >= L'0' && ch <= L'9') || + (ch >= L'A' && ch <= L'Z') || ch == L'.' || ch == L'/' || + ch == L'=' || ch == L'&' || ch == L'%' || ch == L'-' || + ch == L'?' || ch == L':' || ch == L'@' || ch == L'_' || + ch == L'$' || ch == L';' || ch == L'+' || ch == L'!' || + ch == L'*' || ch == L'\'' || ch == L'(' || ch == L')' || + ch == L',') + { + return true; + } + else + { + return false; + } +} + +static bool +IsEmailCharacter(wchar_t ch) +{ + if ((ch >= L'a' && ch <= L'z') || (ch >= L'0' && ch <= L'9') || + (ch >= L'A' && ch <= L'Z') || ch == L'.' || + ch == L'-' || ch == L'_' || ch == L'+') + { + return true; + } + else + { + return false; + } +} + +static bool +IsUrlCharacter(wchar_t ch) +{ + if (ch == L'h' || ch == L'H' || ch == L'w' || ch == L'W') + { + return true; + } + else + { + return false; + } +} + +static bool +IsPhoneNumCharacter(wchar_t ch) +{ + if (Character::IsDigit(ch)) + { + return true; + } + else if (ch == L'*' || ch == L'#' || ch == L'+') + { + return true; + } + else + { + return false; + } +} + +static bool +IsUrlAddress(const String& text, int index, int& linkLength) +{ + ClearLastResult(); + SysTryReturn(NID_GRP, index >= 0, false, E_INVALID_ARG, + "[E_INVALID_ARG] Index must be greater than or equal to 0."); + + result r = E_SUCCESS; + bool dotFound = false; + bool validTextAfterDot = false; + int linkOffset = 0; + int totalLength = text.GetLength(); + int length = 0; + const wchar_t* pText = text.GetPointer(); + + String prefix(L""); + String subString(L""); + for (int i = 0; i < gpUrlPrefixes->GetCount(); i++) + { + if (gpUrlPrefixes->GetAt(i, prefix) == E_SUCCESS) + { + length = prefix.GetLength(); + if (length <= 0) + { + continue; + } + + if (totalLength < index + length) + { + break; + } + + r = text.SubString(index, length, subString); + SysTryReturn(NID_GRP, r == E_SUCCESS, false, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] SubString offset(%d) must greater than 0 and length(%d) must be less than total string length(%d).", + index, prefix.GetLength(), totalLength); + if (prefix.CompareTo(subString) == 0) + { + linkOffset = index; + while (index < totalLength && IsGenericCharacter(pText[index])) + { + if (dotFound == false && pText[index] == '.') + { + dotFound = true; + } + + if (validTextAfterDot == false && dotFound == true && pText[index] != '.') + { + validTextAfterDot = true; + } + + index++; + } + + if (dotFound == true && validTextAfterDot != true) + { + return false; + } + + if (dotFound == true) + { + while (pText[index - 1] == L'.' || pText[index - 1] == L',') + { + index--; + } + } + linkLength = index - linkOffset; + + return true; + } + } + } + + return false; +} + +static bool +GetUrlLink(const String& text, int index, int lastLinkEndIndex, int domainLength, int& linkStartIndex, int& linkLength) +{ + ClearLastResult(); + SysTryReturn(NID_GRP, index >= 0, false, E_INVALID_ARG, + "[E_INVALID_ARG] Index must be greater than or equal to 0."); + + bool dotFound = false; + bool validTextBeforeDot = false; + int linkOffset = index; + const wchar_t* pText = text.GetPointer(); + + while (lastLinkEndIndex <= linkOffset) + { + if (!IsGenericCharacter(pText[linkOffset]) || pText[linkOffset] == L'(' || pText[linkOffset] == L'[') + { + linkOffset++; + break; + } + + if (dotFound == false && pText[linkOffset] == L'.') + { + dotFound = true; + } + + if (validTextBeforeDot == false && dotFound == true && pText[linkOffset] != L'.') + { + validTextBeforeDot = true; + } + + linkOffset--; + + if (lastLinkEndIndex > linkOffset) + { + linkOffset++; + break; + } + } + + if (dotFound == true && validTextBeforeDot != true) + { + return false; + } + + if (dotFound == true) + { + while (pText[linkOffset] == L'.' || pText[linkOffset] == L',') + { + linkOffset++; + } + } + + index += domainLength; + if (pText[index] == L'/') + { + while (index > 0) + { + if (!IsGenericCharacter(pText[index]) && pText[index] != L')' && pText[index] != L']') + { + break; + } + + index++; + } + } + else if (pText[index] != null && pText[index] != L' ' && pText[index] != TEXT_JAPANESE_SPACE && + pText[index] != L')' && pText[index] != L']' && pText[index] != 0xFFFC && + pText[index] != 0x000A && pText[index] != 0x000D) + { + return false; + } + + linkStartIndex = linkOffset; + linkLength = index - linkStartIndex; + + return true; +} + +static bool +IsDomainAddress(const String& text, int index, int lastLinkEndIndex, int& linkStartIndex, int& linkLength) +{ + ClearLastResult(); + result r = E_SUCCESS; + + SysTryReturn(NID_GRP, index >= 0, false, E_INVALID_ARG, + "[E_INVALID_ARG] Index must be greater than or equal to 0."); + + int domainLength = 0; + int length = 0; + int textLength = text.GetLength(); + + String subString(L""); + String domainAddress(L""); + for (int i = 0; i < gpDomainNames->GetCount(); i++) + { + if (gpDomainNames->GetAt(i, domainAddress) == E_SUCCESS) + { + length = domainAddress.GetLength(); + if (length <= 0) + { + continue; + } + + if (textLength < index + length) + { + break; + } + + r = text.SubString(index, length, subString); + SysTryReturn(NID_GRP, r == E_SUCCESS, false, E_OUT_OF_RANGE, + "[E_OUT_OF_RANGE] SubString offset(%d) must greater than 0 and length(%d) must be less than total string length(%d).", + index, domainAddress.GetLength(), text.GetLength()); + if (domainAddress.CompareTo(subString) == 0) + { + domainLength = domainAddress.GetLength(); + if (GetUrlLink(text, index, lastLinkEndIndex, domainLength, linkStartIndex, linkLength)) + { + return true; + } + } + } + } + + return false; +} + +static bool +IsEmailAddress(const String& text, int index, int lastLinkEndIndex, int& linkStartIndex, int& linkLength) +{ + ClearLastResult(); + SysTryReturn(NID_GRP, index >= 0, false, E_INVALID_ARG, + "[E_INVALID_ARG] Index must be greater than or equal to 0."); + + bool validTextAfterAt = false; + bool hasDot = false; + int atIndex = 0; + int totalLength = text.GetLength(); + int linkOffset = index; + const wchar_t* pText = text.GetPointer(); + + if ((index+1 < totalLength) && (pText[index + 1] == L'@')) + { + return false; + } + + linkOffset--; + + if (index > lastLinkEndIndex) + { + while (lastLinkEndIndex <= linkOffset && IsEmailCharacter(pText[linkOffset])) + { + linkOffset--; + } + + if (linkOffset == index - 1) + { + return false; + } + + linkOffset++; + + atIndex = index; + index++; + while (IsEmailCharacter(pText[index]) && index < totalLength) + { + if (validTextAfterAt == false) + { + validTextAfterAt = true; + } + + if (pText[index] == '.') + { + if (pText[index + 1] == '.') + { + break; + } + + if (hasDot == false) + { + hasDot = true; + } + } + + index++; + } + + if (validTextAfterAt == false || hasDot == false) + { + return false; + } + + while (pText[index - 1] == L'.') + { + index--; + } + + linkStartIndex = linkOffset; + linkLength = index - linkOffset; + return true; + } + + return false; +} + +static bool +IsPhoneNumber(const String& text, int index, int& linkLength) +{ + ClearLastResult(); + + int j = 1; + int k = 1; + bool isPhoneNumber = true; + int oneHyphen = false; + int oneDot = false; + int linkOffset = 0; + int blankCount = 0; + const wchar_t* pText = text.GetPointer(); + int totalLength = text.GetLength(); + + if (pText[index] == L'+') + { + k = 0; + if (!Character::IsDigit(pText[index + 1])) + { + return false; + } + } + + while (k < _MIN_PHONE_NUMBER_LENGTH) + { + if (Character::IsDigit(pText[index + j]) || pText[index + j] == L'*' || pText[index + j] == L'#') + { + k++; + oneHyphen = false; + oneDot = false; + } + else if (oneHyphen == false && pText[index + j] == L'-') + { + oneHyphen = true; + } + else if (oneDot == false && pText[index + j] == L'.') + { + oneDot = true; + } + else if (pText[index + j] == L' ' || pText[index + j] == TEXT_JAPANESE_SPACE || pText[index + j] == L'(' || pText[index + j] == L')') + { + // empty statement + } + else + { + isPhoneNumber = false; + break; + } + + j++; + } + + if (isPhoneNumber) + { + linkOffset = index; + + while (index < totalLength && + (Character::IsDigit(pText[index]) || (pText[index] == L'*') || + (pText[index] == L'#') || (pText[index] == L'-') || + (pText[index] == L' ') || (pText[index] == TEXT_JAPANESE_SPACE) || (pText[index] == L'+') || + (pText[index] == L'.') || (pText[index] == L'(') || + (pText[index] == L')') || (index == linkOffset && (pText[linkOffset] == L'+')))) + { + index++; + + if (blankCount == 0 && (pText[index] == L' ' || pText[index] == TEXT_JAPANESE_SPACE)) + { + blankCount++; + } + else if (blankCount == 1 && (pText[index] == L' ' || pText[index] == TEXT_JAPANESE_SPACE)) + { + blankCount++; + break; + } + else if (Character::IsDigit(pText[index]) || pText[index] == L'*' || pText[index] == L'#') + { + blankCount = 0; + } + else if (pText[index] == L'-' && pText[index + 1] == L'-') + { + break; + } + else if (pText[index] == L'(' || pText[index] == L')') + { + break; + } + else if ((pText[index] == L'.' && + pText[index + 1] == L'.') || (pText[index] == L'.' && !Character::IsDigit(pText[index + 1]))) + { + break; + } + else + { + blankCount = 0; + } + } + + if (pText[index - 1] == L' ' || pText[index - 1] == TEXT_JAPANESE_SPACE) + { + index -= 1; + while (pText[index] == L' ' || pText[index] == TEXT_JAPANESE_SPACE) + { + index--; + } + + index++; + } + + linkLength = index - linkOffset; + return true; + } + + return false; +} + +TextCutLinkParser::TextCutLinkParser(void) +{ + ClearLastResult(); + result r = E_SUCCESS; + + __linkMask = LINK_TYPE_URL | LINK_TYPE_EMAIL | LINK_TYPE_TEL_NUM; + + 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] Memory allocation failed."); + r = gpUrlPrefixes->Construct(); + SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagated.", GetErrorMessage(r)); + + gpUrlPrefixes->Add(L"www."); + gpUrlPrefixes->Add(L"http://"); + gpUrlPrefixes->Add(L"https://"); + gpUrlPrefixes->Add(L"wap."); + gpUrlPrefixes->Add(L"wap2."); + } + + 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] Memory allocation failed."); + + r = gpDomainNames->Construct(); + SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagated.", GetErrorMessage(r)); + + gpDomainNames->Add(L".com"); + gpDomainNames->Add(L".net"); + gpDomainNames->Add(L".kr"); + gpDomainNames->Add(L".be"); + gpDomainNames->Add(L".gr"); + gpDomainNames->Add(L".pt"); + gpDomainNames->Add(L".at"); + gpDomainNames->Add(L".gs"); + gpDomainNames->Add(L".ro"); + gpDomainNames->Add(L".edu"); + gpDomainNames->Add(L".as"); + gpDomainNames->Add(L".hk"); + gpDomainNames->Add(L".se"); + gpDomainNames->Add(L".org"); + gpDomainNames->Add(L".az"); + gpDomainNames->Add(L".il"); + gpDomainNames->Add(L".sg"); + gpDomainNames->Add(L".info"); + gpDomainNames->Add(L".bt"); + gpDomainNames->Add(L".in"); + gpDomainNames->Add(L".sh"); + gpDomainNames->Add(L".us"); + gpDomainNames->Add(L".cn"); + gpDomainNames->Add(L".io"); + gpDomainNames->Add(L".sk"); + gpDomainNames->Add(L".biz"); + gpDomainNames->Add(L".ac"); + gpDomainNames->Add(L".is"); + gpDomainNames->Add(L".so"); + gpDomainNames->Add(L".to"); + gpDomainNames->Add(L".af"); + gpDomainNames->Add(L".st"); + gpDomainNames->Add(L".ch"); + gpDomainNames->Add(L".al"); + gpDomainNames->Add(L".kz"); + gpDomainNames->Add(L".tc"); + gpDomainNames->Add(L".fr"); + gpDomainNames->Add(L".am"); + gpDomainNames->Add(L".li"); + gpDomainNames->Add(L".tf"); + gpDomainNames->Add(L".jp"); + gpDomainNames->Add(L".cx"); + gpDomainNames->Add(L".lu"); + gpDomainNames->Add(L".th"); + gpDomainNames->Add(L".de"); + gpDomainNames->Add(L".cz"); + gpDomainNames->Add(L".ly"); + gpDomainNames->Add(L".tj"); + gpDomainNames->Add(L".ru"); + gpDomainNames->Add(L".dz"); + gpDomainNames->Add(L".mc"); + gpDomainNames->Add(L".tm"); + gpDomainNames->Add(L".it"); + gpDomainNames->Add(L".ec"); + gpDomainNames->Add(L".mm"); + gpDomainNames->Add(L".asia"); + gpDomainNames->Add(L".mil"); + gpDomainNames->Add(L".ee"); + gpDomainNames->Add(L".ms"); + gpDomainNames->Add(L".me"); + gpDomainNames->Add(L".gov"); + gpDomainNames->Add(L".eg"); + gpDomainNames->Add(L".mx"); + gpDomainNames->Add(L".tel"); + gpDomainNames->Add(L".au"); + gpDomainNames->Add(L".es"); + gpDomainNames->Add(L".nl"); + gpDomainNames->Add(L".eu"); + gpDomainNames->Add(L".cc"); + gpDomainNames->Add(L".fo"); + gpDomainNames->Add(L".no"); + gpDomainNames->Add(L".tv"); + gpDomainNames->Add(L".ca"); + gpDomainNames->Add(L".ga"); + gpDomainNames->Add(L".nu"); + gpDomainNames->Add(L".name"); + gpDomainNames->Add(L".coop"); + gpDomainNames->Add(L".gf"); + gpDomainNames->Add(L".nz"); + gpDomainNames->Add(L".mobi"); + gpDomainNames->Add(L".dk"); + gpDomainNames->Add(L".gl"); + gpDomainNames->Add(L".pl"); + gpDomainNames->Add(L".tw"); + } + + return; +CATCH: + if (gpUrlPrefixes) + { + delete gpUrlPrefixes; + gpUrlPrefixes = null; + } + if (gpDomainNames) + { + delete gpDomainNames; + gpDomainNames = null; + } +} + +TextCutLinkParser::~TextCutLinkParser(void) +{ + +} + +TextLinkInfo* +TextCutLinkParser::Parse(const wchar_t* pText, int textLength, int startPosition) +{ + ClearLastResult(); + result r = E_SUCCESS; + + if (__linkMask == LINK_TYPE_NONE) + { + return null; + } + + while (0 < startPosition) + { + pText++; + startPosition--; + } + + String text(pText); + int linkStartIndex = 0; + int linkLength = 0; + int lastLinkEndIndex = 0; + bool linkParsed = false; + int totalLength = text.GetLength(); + TextLinkInfo* pTextLink = null; + LinkType linkType = LINK_TYPE_NONE; + + if (totalLength < _MIN_TEXT_LENGTH) + { + return null; + } + + pTextLink = CreateTextLinkInfo(0, 0, LINK_TYPE_NONE); + SysTryCatch(NID_GRP, pTextLink != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pTextLink->index = -1; + + for (int i = 0; i < totalLength; ) + { + linkLength = 0; + wchar_t checkLetter = 0; + text.GetCharAt(i, checkLetter); + + if ((__linkMask & LINK_TYPE_URL) + && IsUrlCharacter(checkLetter) && IsUrlAddress(text, i, linkLength)) + { + linkParsed = true; + linkStartIndex = i; + linkType = LINK_TYPE_URL; + } + else if ((__linkMask & LINK_TYPE_URL) + && (checkLetter == '.') && IsDomainAddress(text, i, lastLinkEndIndex, linkStartIndex, linkLength)) + { + i = linkStartIndex; + linkParsed = true; + linkType = LINK_TYPE_URL; + } + else if ((__linkMask & LINK_TYPE_EMAIL) + && (checkLetter == '@') && IsEmailAddress(text, i, lastLinkEndIndex, linkStartIndex, linkLength)) + { + linkParsed = true; + i = linkStartIndex; + linkType = LINK_TYPE_EMAIL; + } + else if ((__linkMask & LINK_TYPE_TEL_NUM) + && IsPhoneNumCharacter(checkLetter) && IsPhoneNumber(text, i, linkLength)) + { + if (linkLength > _MAX_PHONE_NUMBER_LENGTH) + { + i += (linkLength - 1); + } + else + { + linkParsed = true; + linkStartIndex = i; + linkType = LINK_TYPE_TEL_NUM; + } + } + + if (linkParsed) + { + if (pTextLink->index == -1) + { + pTextLink->index = 0; + pTextLink->srcOffset = linkStartIndex; + pTextLink->length = linkLength; + pTextLink->linkType = linkType; + } + 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] Memory allocation failed."); + AppendTextLinkInfo(pTextLink, pNextLink); + } + + i += linkLength; + lastLinkEndIndex = i; + linkParsed = false; + } + else + { + i++; + } + } + + if (pTextLink->index == -1) + { + goto CATCH; + } + else + { + return pTextLink; + } + +CATCH: + if (pTextLink != null) + { + delete pTextLink; + pTextLink = null; + } + + return null; +} + +result +TextCutLinkParser::SetCutLinkMask(int mask) +{ + SysTryReturn(NID_GRP, LINK_TYPE_NONE <= mask && mask < LINK_TYPE_MAX + , E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + __linkMask = mask; + + return E_SUCCESS; +} + +int +TextCutLinkParser::GetCutLinkMask(void) const +{ + return __linkMask; +} + +bool +TextCutLinkParser::AppendTextLinkInfo(TextLinkInfo* pLinkInfo, TextLinkInfo* pNewLinkInfo) +{ + TextLinkInfo* pTempLinkInfo = pLinkInfo; + + while (1) + { + if (pTempLinkInfo->pNextLinkInfo == null) + { + break; + } + pTempLinkInfo = pTempLinkInfo->pNextLinkInfo; + } + + pTempLinkInfo->index = pTempLinkInfo->index + 1; + pTempLinkInfo->pNextLinkInfo = pNewLinkInfo; + + return true; +} + +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] Memory allocation failed."); + + pTextLinkInfo->index = 0; + pTextLinkInfo->srcOffset = offset; + pTextLinkInfo->length = length; + pTextLinkInfo->linkType = linkType; + + pTextLinkInfo->pNextLinkInfo = null; + + return pTextLinkInfo; +} + +}}} // Tizen::Graphics::_Text diff --git a/src/graphics/text/FGrp_TextTextCutLinkParser.h b/src/graphics/text/FGrp_TextTextCutLinkParser.h new file mode 100644 index 0000000..c99527c --- /dev/null +++ b/src/graphics/text/FGrp_TextTextCutLinkParser.h @@ -0,0 +1,81 @@ +// +// 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_TextTextCutLinkParser.h + * @brief This file contains the declarations of TextCutLinkParser class. + */ + +#ifndef _FGRP_INTERNAL_TEXT_CUTLINK_PARSER_H_ +#define _FGRP_INTERNAL_TEXT_CUTLINK_PARSER_H_ + +#include +#include +#include +#include +#include +#include + +struct TextLinkInfo +{ + int index; + int srcOffset; + int length; + Tizen::Base::Utility::LinkType linkType; + + struct TextLinkInfo* pNextLinkInfo; +}; + +namespace Tizen { namespace Graphics +{ + +namespace _Text +{ + +class TextCutLinkParser + : public Tizen::Base::Object +{ +public: + TextCutLinkParser(void); + + virtual ~TextCutLinkParser(void); + +public: + TextLinkInfo* Parse(const wchar_t* pText, int textLength, int textStartIndex); + + result SetCutLinkMask(int mask); + + int GetCutLinkMask(void) const; + +private: + bool AppendTextLinkInfo(TextLinkInfo* pLinkInfo, TextLinkInfo* pNewLinkInfo); + + TextLinkInfo* CreateTextLinkInfo(int offset, int length, Tizen::Base::Utility::LinkType linkType); + +private: + int __linkMask; + +private: + TextCutLinkParser(const TextCutLinkParser& other); // NOT IMPLEMENTED + + TextCutLinkParser& operator =(const TextCutLinkParser& rhs); // NOT IMPLEMENTED + +}; // _TextLinkParser + +}}} // Tizen::Graphics::_Text + +#endif // _FGRP_INTERNAL_TEXT_CUTLINK_PARSER_H_ diff --git a/src/graphics/text/FGrp_TextTextElement.cpp b/src/graphics/text/FGrp_TextTextElement.cpp new file mode 100644 index 0000000..0d39fba --- /dev/null +++ b/src/graphics/text/FGrp_TextTextElement.cpp @@ -0,0 +1,246 @@ +// +// 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_TextTextElement.cpp + * @brief This is the implementation file for TextElement class. + */ + +#include +#include +#include "FGrp_TextTextElement.h" +#include "FGrp_CoordinateSystemUtils.h" + +namespace Tizen { namespace Graphics +{ + +namespace _Text +{ + +TextElement::TextElement(void) +{ + _type = TEXT_ELEMENT_TYPE_NONE; + _sourceType = TEXT_ELEMENT_SOURCE_TYPE_INTERNAL; + _length = 0; + _hasFocus = false; + _isAlternateLookEnabled = false; + _alternativeColor = Color::GetColor(COLOR_ID_GREY); +} + +TextElement::~TextElement(void) +{ + +} + +void +TextElement::CopyMembers(TextElement* pTargetTextElement) +{ + SysTryReturn(NID_GRP + , pTargetTextElement + , , E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + pTargetTextElement->SetFocused(_hasFocus); + pTargetTextElement->SetAlternateLookEnabled(_isAlternateLookEnabled); + pTargetTextElement->SetAlternativeForegroundColor(_alternativeColor); +} + +void +TextElement::SetTextLength(int length) +{ + _length = length; +} + +int +TextElement::ForwardAnalyze(int startTextIndex, int textLength, int maxWidth, TextObjectWrapType wrap, + int& actualLength, int& width, int& height) +{ + return -1; +} + +int +TextElement::ForwardAnalyze(int startTextIndex, int textLength, float maxWidth, TextObjectWrapType wrap, + int& actualLength, float& width, float& height) +{ + return -1; +} + +result +TextElement::Draw(_CanvasImpl& canvasImpl, Rectangle& displayRect, int startTextIndex, + int textLength, const TextObjectAlignment alignment, const TextObjectActionType action) +{ + return E_SYSTEM; +} + +result +TextElement::Draw(_CanvasImpl& canvasImpl, FloatRectangle& displayRect, int startTextIndex, + int textLength, const TextObjectAlignment alignment, const TextObjectActionType action) +{ + return E_SYSTEM; +} + +TextElement* +TextElement::CloneN(TextComponentInfoValueType type, unsigned int value) +{ + return null; +} + +TextElement* +TextElement::CopyN(int textStart, int textLength) +{ + return null; +} + +result +TextElement::GetRegion(int textIndex, int textLength, int& width, int& height) const +{ + return E_SYSTEM; +} + +result +TextElement::GetRegion(int textIndex, int textLength, float& width, float& height) const +{ + return E_SYSTEM; +} + +int +TextElement::GetHeight(void) const +{ + return -1; +} + +float +TextElement::GetHeightF(void) const +{ + return -1; +} + +int +TextElement::GetTextLength(void) const +{ + return _length; +} + +unsigned int +TextElement::GetValue(TextComponentInfoValueType type) const +{ + return 0; +} + +result +TextElement::SetValue(TextComponentInfoValueType type, unsigned int value) +{ + return E_SYSTEM; +} + +TextElementType +TextElement::GetType(void) const +{ + return _type; +} + +TextElementSourceType +TextElement::GetSourceType(void) const +{ + return _sourceType; +} + +bool +TextElement::SetFocused(bool hasFocus) +{ + _hasFocus = hasFocus; + return true; +} + +bool +TextElement::GetFocused(void) const +{ + return _hasFocus; +} + +void +TextElement::SetAlternateLookEnabled(bool enable) +{ + _isAlternateLookEnabled = enable; +} + +bool +TextElement::IsAlternateLookEnabled(void) const +{ + return _isAlternateLookEnabled; +} + +void +TextElement::SetAlternativeForegroundColor(const Color& foregroundColor) +{ + _alternativeColor = foregroundColor; +} + +Color +TextElement::GetAlternativeForegroundColor(void) const +{ + return _alternativeColor; +} + +int +TextElement::GetBaseline(void) const +{ + return -1; +} + +float +TextElement::GetBaselineF(void) const +{ + return -1; +} + +void +TextElement::SetForegroundColor(const Color& color) +{ + return; +} + +Color +TextElement::GetForegroundColor(void) const +{ + return Color::GetColor(COLOR_ID_BLACK); +} + +void +TextElement::SetBackgroundColor(const Color& color) +{ + return; +} + +Color +TextElement::GetBackgroundColor(void) const +{ + return Color::GetColor(COLOR_ID_WHITE); +} + +void +TextElement::SetBackGroundDrawingModeEnabled(bool enable) +{ + return; +} + +bool +TextElement::IsBackGroundDrawingModeEnable(void) const +{ + return false; +} + +}}} // Tizen::Graphics::_Text diff --git a/src/graphics/text/FGrp_TextTextImage.cpp b/src/graphics/text/FGrp_TextTextImage.cpp new file mode 100644 index 0000000..e61112a --- /dev/null +++ b/src/graphics/text/FGrp_TextTextImage.cpp @@ -0,0 +1,407 @@ +// +// 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_TextTextImage.cpp + * @brief This is the implementation file for TextImage class. + */ + +#include +#include +#include +#include "FGrp_BitmapImpl.h" +#include "FGrp_CanvasImpl.h" +#include "FGrp_TextCommon.h" +#include "FGrp_TextTextElement.h" +#include "FGrp_TextTextImage.h" +#include "FGrp_CoordinateSystemUtils.h" + +namespace Tizen { namespace Graphics +{ + +namespace _Text +{ + +TextImage::TextImage(Bitmap& bitmap, TextElementSourceType sourceType, TextObjectAlignment align) + : TextElement() +{ + result r = E_SUCCESS; + _type = TEXT_ELEMENT_TYPE_IMAGE; + _sourceType = sourceType; + _length = 1; + _hasFocus = false; + _isAlternateLookEnabled = false; + __align = align; + __pBitmap = null; + + if (sourceType == TEXT_ELEMENT_SOURCE_TYPE_INTERNAL) + { + __pBitmap = new (std::nothrow) Bitmap(); + SysTryCatch(NID_GRP + , __pBitmap + , , 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] Propagating.", GetErrorMessage(r)); + } + else + { + __pBitmap = &bitmap; + } + + __rect.x = 0; + __rect.y = 0; + __rect.width = __pBitmap->GetWidthF(); + __rect.height = __pBitmap->GetHeightF(); + + return; + +CATCH: + if (__pBitmap) + { + delete __pBitmap; + __pBitmap = null; + } +} + +TextImage::~TextImage(void) +{ + if (_sourceType == TEXT_ELEMENT_SOURCE_TYPE_INTERNAL) + { + if (__pBitmap) + { + delete __pBitmap; + __pBitmap = null; + } + } +} + +int +TextImage::ForwardAnalyze(int startTextIndex, int textLength, float maxWidth, TextObjectWrapType wrap, + int& actualLength, float& width, float& height) +{ + SysTryReturn(NID_GRP, 0 <= startTextIndex && startTextIndex < _length + , -1, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + SysTryReturn(NID_GRP, textLength <= _length + , -1, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + actualLength = 0; + width = 0; + height = 0; + + if (textLength == 0) + { + return TEXT_RETBY_NORMAL; + } + + if (maxWidth < __rect.width) + { + return TEXT_RETBY_OVERWIDTH; + } + else + { + actualLength = 1; + width = __rect.width; + height = __rect.height; + } + + return TEXT_RETBY_NORMAL; +} + +result +TextImage::GetRegion(int textIndex, int textLength, float& width, float& height) const +{ + SysTryReturn(NID_GRP, 0 <= textIndex && textIndex < _length + , E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + SysTryReturn(NID_GRP, textLength <= _length + , E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + if (textLength == 0) + { + width = 0; + height = 0; + return E_SUCCESS; + } + + width = __rect.width; + height = __rect.height; + + return E_SUCCESS; +} + +int +TextImage::GetHeight(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetHeightF()); +} + +float +TextImage::GetHeightF(void) const +{ + return __rect.height; +} + +result +TextImage::Draw(_CanvasImpl& canvasImpl, FloatRectangle& displayRect, int startTextIndex, int textLength, + const TextObjectAlignment align, const TextObjectActionType action) +{ + SysTryReturn(NID_GRP, __pBitmap, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] This instance is not constructed yet."); + + result r = E_SUCCESS; + if (textLength == 0) + { + return E_SUCCESS; + } + + FloatRectangle bitmapRect = displayRect; + + if (bitmapRect.width <= 0) + { + bitmapRect.width = __rect.width; + } + if (bitmapRect.height <= 0) + { + bitmapRect.height = __rect.height; + } + + if (bitmapRect.width > __rect.width) + { + bitmapRect.width = __rect.width; + } + if (bitmapRect.height > __rect.height) + { + bitmapRect.height = __rect.height; + } + + switch (__align & TEXT_ALIGNMASK_VERT) + { + case TEXT_OBJECT_ALIGNMENT_TOP: + // fall through + default: + break; + + case TEXT_OBJECT_ALIGNMENT_MIDDLE: + bitmapRect.y = (bitmapRect.height - __pBitmap->GetHeight()) / 2; + break; + + case TEXT_OBJECT_ALIGNMENT_BOTTOM: + bitmapRect.y = (bitmapRect.height - __pBitmap->GetHeight()); + break; + } + + switch (__align & TEXT_ALIGNMASK_HORIZ) + { + case TEXT_OBJECT_ALIGNMENT_LEFT: + // fall through + default: + break; + + case TEXT_OBJECT_ALIGNMENT_CENTER: + bitmapRect.x = (bitmapRect.width - __pBitmap->GetWidth()) / 2; + break; + + case TEXT_OBJECT_ALIGNMENT_RIGHT: + bitmapRect.x = (bitmapRect.width - __pBitmap->GetWidth()); + break; + } + + r = canvasImpl.DrawBitmap(bitmapRect, *_BitmapImpl::GetInstance(*__pBitmap)); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (_hasFocus) + { + r = canvasImpl.DrawRectangle(bitmapRect); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + return E_SUCCESS; +} + +TextElement* +TextImage::CloneN(TextComponentInfoValueType type, unsigned int value) +{ + SysTryReturn(NID_GRP, __pBitmap, null, E_SYSTEM, "[E_SYSTEM] Failed to clone image."); + + TextImage* pImageText = null; + + 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] Memory allocation failed."); + + TextElement::CopyMembers(pImageText); + + pImageText->SetValue(type, value); + + return pImageText; +} + +TextElement* +TextImage::CopyN(int startTextIndex, int textLength) +{ + SysTryReturn(NID_GRP, __pBitmap, null, E_SYSTEM, "[E_SYSTEM] Failed to copy image."); + + if (startTextIndex != 0) + { + return null; + } + + if (textLength != 1) + { + textLength = 1; + } + + TextImage* pImageText = new (std::nothrow) TextImage(*__pBitmap, _sourceType, __align); + SysTryReturn(NID_GRP, pImageText, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + return pImageText; +} + +unsigned int +TextImage::GetValue(TextComponentInfoValueType type) const +{ + switch (type) + { + case SET_IMAGE_ALIGN: + // fall through + return (unsigned int) __align; + + case SET_IMAGE_RECT: + // fall through + return (unsigned int) &__rect; + + case SET_ALTERNATE_LOOK: + // fall through + return (unsigned int) _isAlternateLookEnabled; + + case SET_TEXT_OFFSET: + break; + + case SET_ALTERNATIVE_FGCOLOR: + break; + + default: + break; + } + + return 0; +} + +result +TextImage::SetValue(TextComponentInfoValueType type, unsigned int value) +{ + switch (type) + { + case SET_IMAGE_ALIGN: + __align = (TextObjectAlignment) value; + break; + + case SET_IMAGE_RECT: + break; + + case SET_TEXT_OFFSET: + break; + + case SET_ALTERNATE_LOOK: + _isAlternateLookEnabled = (bool) value; + break; + + case SET_ALTERNATIVE_FGCOLOR: + break; + + default: + break; + } + + return E_SUCCESS; +} + +result +TextImage::SetBounds(const Rectangle& rect) +{ + return SetBounds(_CoordinateSystemUtils::ConvertToFloat(rect)); +} + +result +TextImage::SetBounds(const FloatRectangle& rect) +{ + __rect = rect; + __rect.x = 0; + __rect.y = 0; + + return E_SUCCESS; +} + +result +TextImage::SetAlignment(TextObjectAlignment alignment) +{ + SysTryReturn(NID_GRP + , TEXT_OBJECT_ALIGNMENT_LEFT <= alignment && alignment <= TEXT_OBJECT_ALIGNMENT_BOTTOM + , E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + __align = alignment; + + return E_SUCCESS; +} + +Rectangle +TextImage::GetBounds(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetBoundsF()); +} + +FloatRectangle +TextImage::GetBoundsF(void) const +{ + return __rect; +} + +TextObjectAlignment +TextImage::GetAlignment(void) const +{ + return __align; +} + +const Bitmap* +TextImage::GetBitmap(void) const +{ + return __pBitmap; +} + +void +TextImage::SetTextLength(int length) +{ + return; +} + +int +TextImage::GetBaseline(void) const +{ + return 0; +} + +float +TextImage::GetBaselineF(void) const +{ + return 0; +} + +}}} // Tizen::Graphics::_Text diff --git a/src/graphics/text/FGrp_TextTextLine.cpp b/src/graphics/text/FGrp_TextTextLine.cpp new file mode 100644 index 0000000..b82aa3e --- /dev/null +++ b/src/graphics/text/FGrp_TextTextLine.cpp @@ -0,0 +1,745 @@ +// +// 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_TextTextLine.cpp + * @brief This is the implementation file for TextLine class. + */ + +#include +#include +#include "FGrp_CanvasImpl.h" +#include "FGrp_TextCommon.h" +#include "FGrp_TextTextComposite.h" +#include "FGrp_TextTextLine.h" +#include "FGrp_TextTextUtility.h" +#include "FGrp_CoordinateSystemUtils.h" + +#include + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; + +#define Release(x) \ + if (x) \ + { \ + delete x; \ + x = null; \ + } + +namespace Tizen { namespace Graphics +{ + +namespace _Text +{ + +TextLine::TextLine(TextComposite* pCompositeText) +{ + __index = -1; + __textOffset = -1; + __textLength = -1; + __width = -1; + __height = -1; + __endType = -1; + __rect.x = 0; + __rect.y = 0; + __rect.height = 0; + __rect.width = 0; + __baseline = 0; + __pCompositeText = pCompositeText; + __pExtentList = null; + + // For Sweep Info + __sweepComposeLineInfo.isValid = false; + __sweepComposeLineInfo.prevLineTextOffset = 0; + __sweepComposeLineInfo.prevLineTextLength = 0; + __sweepComposeLineInfo.prevLineWidth = 0; + __sweepComposeLineInfo.currentLineTextOffset = 0; + __sweepComposeLineInfo.currentLineTextLength = 0; + __sweepComposeLineInfo.currentLineWidth = 0; + + __sweepIn = 0; + __sweepOut = 0; + __sweepType = 0; + __isKeyInputChanged = false; + __keyInputTextIndex = 0; + __keyInputTextLength = 0; +} + +TextLine::~TextLine(void) +{ + if (__pExtentList) + { + __pExtentList->RemoveAll(); + delete __pExtentList; + } +} + +result +TextLine::GetRegion(int textIndex, int textLength, int& width, int& height) const +{ + float widthF = _CoordinateSystemUtils::ConvertToFloat(width); + float heightF = _CoordinateSystemUtils::ConvertToFloat(height); + + result r = GetRegion(textIndex, textLength, widthF, heightF); + + width = _CoordinateSystemUtils::ConvertToInteger(widthF); + height = _CoordinateSystemUtils::ConvertToInteger(heightF); + + return r; +} + +result +TextLine::GetRegion(int textIndex, int textLength, float& width, float& height) const +{ + if (textIndex != 0 || textLength != __textLength) + { + return __pCompositeText->GetRegion(textIndex + __textOffset, textIndex + textLength + __textOffset, width, height); + } + + width = __width; + height = __height; + + return E_SUCCESS; +} + +float +TextLine::GetHeightF(int textIndex) const +{ + if (textIndex == -1) + { + return __height; + } + else if (textIndex >= 0 && textIndex < __textLength) + { + return __pCompositeText->GetHeightF(textIndex + __textOffset); + } + else + { + return -1; + } +} + +result +TextLine::Draw(_CanvasImpl& canvasImpl, FloatRectangle& displayRect, int startTextIndex, int textLength, + const TextObjectAlignment align, const TextObjectActionType action) +{ + SysTryReturn(NID_GRP, startTextIndex == 0 && textLength == __textLength && __pCompositeText != null + , E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + return __pCompositeText->DrawLine(canvasImpl, this, displayRect, align, action); +} + +result +TextLine::DrawPartial(_CanvasImpl& canvasImpl, int startTextIndex, int textLength, FloatRectangle& displayRect) +{ + SysTryReturn(NID_GRP, __pCompositeText != null, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + int textIndexAtLine = GetTextOffset() + startTextIndex; + + return __pCompositeText->DrawPartial(canvasImpl, displayRect, textIndexAtLine, textLength); +} + +TextLine* +TextLine::CopyN(void) +{ + TextLine* pTextLine = null; + + pTextLine = new (std::nothrow) TextLine(__pCompositeText); + + SysTryReturn(NID_GRP, pTextLine, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + pTextLine->__rect = __rect; + pTextLine->__endType = __endType; + pTextLine->__index = __index; + pTextLine->__textOffset = __textOffset; + pTextLine->__textLength = __textLength; + pTextLine->__width = __width; + pTextLine->__height = __height; + pTextLine->__baseline = __baseline; + + return pTextLine; +} + +Rectangle +TextLine::GetBounds(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetBoundsF()); +} + +FloatRectangle +TextLine::GetBoundsF(void) const +{ + return __rect; +} + +int +TextLine::GetTextLength(void) const +{ + return __textLength; +} + +void +TextLine::SetTextLength(int length) +{ + __textLength = length; +} + +void +TextLine::SetIndex(int index) +{ + __index = index; +} + +int +TextLine::GetIndex(void) const +{ + return __index; +} + +result +TextLine::SetTextOffset(int textOffset) +{ + __textOffset = textOffset; + + return E_SUCCESS; +} + +int +TextLine::GetTextOffset(void) const +{ + return __textOffset; +} + +result +TextLine::SetBounds(const Rectangle& rect) +{ + const FloatRectangle rectF = _CoordinateSystemUtils::ConvertToFloat(rect); + + return SetBounds(rectF); +} + +result +TextLine::SetBounds(const FloatRectangle& rect) +{ + __rect = rect; + + return E_SUCCESS; +} + +void +TextLine::SetEndType(int endType) +{ + __endType = endType; +} + +int +TextLine::GetEndType(void) const +{ + return __endType; +} + +void +TextLine::SetRegion(int width, int height) +{ + SetRegion(_CoordinateSystemUtils::ConvertToFloat(width), _CoordinateSystemUtils::ConvertToFloat(height)); + return; +} + +void +TextLine::SetRegion(float width, float height) +{ + __width = width; + __height = height; + return; +} + +void +TextLine::SetBaseline(int baseline) +{ + __baseline = _CoordinateSystemUtils::ConvertToFloat(baseline); +} + +void +TextLine::SetBaseline(float baseline) +{ + __baseline = baseline; +} + +int +TextLine::GetBaseline(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(__baseline); +} + +float +TextLine::GetBaselineF(void) const +{ + return __baseline; +} + +int +TextLine::ForwardAnalyze(int startTextIndex, int textLength, float maxWidth, TextObjectWrapType wrap, + int& actualLength, float& width, float& height) +{ + return -1; +} + +result +TextLine::ResetSweepInfo(void) +{ + __sweepComposeLineInfo.isValid = false; + + return E_SUCCESS; +} + +void +TextLine::SetSweepComposeInfo(TextObjectSweepComposeLineInfo& textSweepComposeLineInfo) +{ + __sweepComposeLineInfo.isValid = textSweepComposeLineInfo.isValid; + __sweepComposeLineInfo.prevLineTextOffset = textSweepComposeLineInfo.prevLineTextOffset; + __sweepComposeLineInfo.prevLineTextLength = textSweepComposeLineInfo.prevLineTextLength; + __sweepComposeLineInfo.prevLineWidth = textSweepComposeLineInfo.prevLineWidth; + __sweepComposeLineInfo.currentLineTextOffset = textSweepComposeLineInfo.currentLineTextOffset; + __sweepComposeLineInfo.currentLineTextLength = textSweepComposeLineInfo.currentLineTextLength; + __sweepComposeLineInfo.currentLineWidth = textSweepComposeLineInfo.currentLineWidth; +} + +TextObjectSweepComposeLineInfo +TextLine::GetSweepComposeInfo(void) const +{ + TextObjectSweepComposeLineInfo textSweepComposeLineInfo; + + textSweepComposeLineInfo.isValid = __sweepComposeLineInfo.isValid; + textSweepComposeLineInfo.prevLineTextOffset = __sweepComposeLineInfo.prevLineTextOffset; + textSweepComposeLineInfo.prevLineTextLength = __sweepComposeLineInfo.prevLineTextLength; + textSweepComposeLineInfo.prevLineWidth = __sweepComposeLineInfo.prevLineWidth; + textSweepComposeLineInfo.currentLineTextOffset = __sweepComposeLineInfo.currentLineTextOffset; + textSweepComposeLineInfo.currentLineTextLength = __sweepComposeLineInfo.currentLineTextLength; + textSweepComposeLineInfo.currentLineWidth = __sweepComposeLineInfo.currentLineWidth; + + return textSweepComposeLineInfo; +} + +void +TextLine::SetSweepIn(float sweepIn) +{ + __sweepIn = sweepIn; +} + +float +TextLine::GetSweepIn(void) const +{ + return __sweepIn; +} + +void +TextLine::SetSweepOut(float sweepOut) +{ + __sweepOut = sweepOut; +} + +float +TextLine::GetSweepOut(void) const +{ + return __sweepOut; +} + +void +TextLine::SetKeyInputResult(int keyInputResult) +{ + __sweepType = keyInputResult; +} + +int +TextLine::GetKeyInputResult(void) const +{ + return __sweepType; +} + +void +TextLine::NotifyLineChanged(bool isChanged) +{ + __isKeyInputChanged = isChanged; +} + +bool +TextLine::isChanged(void) const +{ + return __isKeyInputChanged; +} + +void +TextLine::SetKeyInputOffset(int keyInputTextIndex) +{ + __keyInputTextIndex = keyInputTextIndex; +} + +int +TextLine::GetKeyInputOffset(void) const +{ + return __keyInputTextIndex; +} + +void +TextLine::SetKeyInputLength(int keyInputTextLength) +{ + __keyInputTextLength = keyInputTextLength; +} + +int +TextLine::GetKeyInputLength(void) +{ + return __keyInputTextLength; +} + +result +TextLine::SetTextExtentList(Collection::ArrayListT<_FloatPair>* pList) +{ + if (__pExtentList) + { + __pExtentList->RemoveAll(); + delete __pExtentList; + } + + __pExtentList = pList; + + return E_SUCCESS; +} + +Tizen::Base::Collection::ArrayListT<_FloatPair>* +TextLine::GetTextExtentList(void) const +{ + return __pExtentList; +} + +int +TextLine::GetTextIndexFromPosition(int pcX) +{ + return GetTextIndexFromPosition(_CoordinateSystemUtils::ConvertToFloat(pcX)); +} + +int +TextLine::GetTextIndexFromPosition(float pcX) +{ + SysTryReturn(NID_GRP, pcX >= 0.0f, -1, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + SysTryReturn(NID_GRP, __pExtentList, -1, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + int index = 0; + int textIndex = -1; + _FloatPair currentGap; + IEnumeratorT<_FloatPair >* pEnum = __pExtentList->GetEnumeratorN(); + + while (pEnum->MoveNext() == E_SUCCESS) + { + pEnum->GetCurrent(currentGap); + + if (currentGap.first <= pcX && pcX < currentGap.second) + { + textIndex = index + __textOffset; + + FriBidiChar text[1] = { __pCompositeText->GetCharacter(textIndex) }; + FriBidiCharType type[1] = { 0 }; + fribidi_get_bidi_types(text, 1, type); + bool isRtl = (type[0] & FRIBIDI_MASK_RTL) > 0; + + if (isRtl == true) + { + textIndex = (pcX - currentGap.first < currentGap.second - pcX) ? index + __textOffset + 1 : index + __textOffset; + } + else + { + textIndex = (pcX - currentGap.first < currentGap.second - pcX) ? index + __textOffset : index + __textOffset + 1; + } + + break; + } + + index++; + } + + if (textIndex < 0) + { + textIndex = __textOffset + __textLength; + } + + Release(pEnum); + + return textIndex; +} + +Rectangle +TextLine::GetTextExtent(int textIndexFromLineOffset, int textLength) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetTextExtentF(textIndexFromLineOffset, textLength)); +} + +FloatRectangle +TextLine::GetTextExtentF(int textIndexFromLineOffset, int textLength) const +{ + if (textIndexFromLineOffset == 0 && __textLength == 0) + { + return FloatRectangle(0, 0, 0, 0); + } + + SysTryReturn(NID_GRP, 0 <= textIndexFromLineOffset && textLength <= __textLength + , FloatRectangle(-1, -1, -1, -1), E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + SysTryReturn(NID_GRP, __pExtentList + , FloatRectangle(-1, -1, -1, -1), E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + FloatRectangle extent; + _FloatPair currentGap; + IEnumeratorT<_FloatPair >* pEnum = __pExtentList->GetEnumeratorN(); + + if (textIndexFromLineOffset == __textLength) + { + for (int i = 0; i < textIndexFromLineOffset; i++) + { + pEnum->MoveNext(); + } + + pEnum->GetCurrent(currentGap); + + 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; + } + else if (textIndexFromLineOffset == 0) + { + pEnum->MoveNext(); + pEnum->GetCurrent(currentGap); + + FriBidiChar text[1] = { __pCompositeText->GetCharacter(__textOffset) }; + FriBidiCharType type[1] = { 0 }; + fribidi_get_bidi_types(text, 1, type); + bool isRtl = (type[0] & FRIBIDI_MASK_RTL) > 0; + + extent.x = (isRtl == true) ? currentGap.second : currentGap.first; + extent.width = 0; + + for (int i = 0; i < textLength; i++) + { + pEnum->GetCurrent(currentGap); + extent.width += currentGap.second - currentGap.first; + + pEnum->MoveNext(); + } + } + else + { + TextBidiHint bidiHint = _GetTextBidiHint(); + float prevLeft = 0; + float prevRight = 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++) + { + pEnum->MoveNext(); + } + + pEnum->GetCurrent(currentGap); + prevLeft = currentGap.first; + prevRight = currentGap.second; + + pEnum->MoveNext(); + pEnum->GetCurrent(currentGap); + + if (isRtl[0] && isRtl[1]) // R + R + { + if (isNeutral[0] && isNeutral[1] && (!TextUtility::IsRTLCharacter(text[0]) && !TextUtility::IsRTLCharacter(text[1]))) + { + extent.x = prevRight; + } + else + { + extent.x = prevLeft; + } + } + else if (isRtl[0] && !isRtl[1]) // R + L + { + extent.x = prevLeft; + } + else if (!isRtl[0] && !isRtl[1]) // L + L + { + if ((isWeak[0] && isWeak[1]) && (prevLeft != currentGap.second)) + { + extent.x = prevRight; + } + else + { + extent.x = currentGap.first; + } + } + else if (!isRtl[0] && isRtl[1]) // L + R + { + extent.x = prevRight; + } + + extent.width = 0; + for (int i = 0; i < textLength; i++) + { + pEnum->GetCurrent(currentGap); + extent.width += currentGap.second - currentGap.first; + + pEnum->MoveNext(); + } + } + + Release(pEnum); + + return extent; +} + +Rectangle +TextLine::GetBlockTextExtent(int textIndexFromLineOffset, int textLength) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetBlockTextExtentF(textIndexFromLineOffset, textLength)); +} + +FloatRectangle +TextLine::GetBlockTextExtentF(int textIndexFromLineOffset, int textLength) const +{ + SysTryReturn(NID_GRP, 0 <= textIndexFromLineOffset && textLength <= __textLength + , FloatRectangle(-1, -1, -1, -1), E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + SysTryReturn(NID_GRP, __pExtentList + , FloatRectangle(-1, -1, -1, -1), E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + FloatRectangle extent; + _FloatPair currentGap; + IEnumeratorT<_FloatPair >* pEnum = __pExtentList->GetEnumeratorN(); + + if (textIndexFromLineOffset == __textLength) + { + for (int i = 0; i < textIndexFromLineOffset; i++) + { + pEnum->MoveNext(); + } + + pEnum->GetCurrent(currentGap); + if (__endType == TEXT_RETBY_LINEFEED) + { + extent.x = currentGap.first + 10; + extent.width = 0; + } + else + { + 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; + + extent.x = (isRtl == true) ? currentGap.first : currentGap.second; + extent.width = 0; + } + } + else if (textIndexFromLineOffset == 0) + { + pEnum->MoveNext(); + pEnum->GetCurrent(currentGap); + + FriBidiChar text[1] = { __pCompositeText->GetCharacter(__textOffset) }; + FriBidiCharType type[1] = { 0 }; + fribidi_get_bidi_types(text, 1, type); + bool isRtl = (type[0] & FRIBIDI_MASK_RTL) > 0; + + extent.x = (isRtl == true) ? currentGap.second : currentGap.first; + extent.width = 0; + + for (int i = 0; i < textLength; i++) + { + pEnum->GetCurrent(currentGap); + extent.width += currentGap.second - currentGap.first; + + pEnum->MoveNext(); + } + } + else + { + 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}; + + for (int i = 0; i < textIndexFromLineOffset; i++) + { + pEnum->MoveNext(); + } + + pEnum->GetCurrent(currentGap); + + prevLeft = currentGap.first; + prevRight = currentGap.second; + + pEnum->MoveNext(); + pEnum->GetCurrent(currentGap); + + if (isRtl[0] && isRtl[1]) // R + R + { + extent.x = prevLeft; + } + else if (isRtl[0] && !isRtl[1]) // R + L + { + extent.x = currentGap.first; + } + else if (!isRtl[0] && !isRtl[1]) // L + L + { + extent.x = currentGap.first; + } + else if (!isRtl[0] && isRtl[1]) // L + R + { + extent.x = prevRight; + } + + extent.width = 0; + + for (int i = 0; i < textLength; i++) + { + pEnum->GetCurrent(currentGap); + extent.width += currentGap.second - currentGap.first; + + pEnum->MoveNext(); + } + } + + Release(pEnum); + + return extent; +} + +}}} // Tizen::Graphics::_Text + diff --git a/src/graphics/text/FGrp_TextTextLine.h b/src/graphics/text/FGrp_TextTextLine.h new file mode 100644 index 0000000..e79e2f1 --- /dev/null +++ b/src/graphics/text/FGrp_TextTextLine.h @@ -0,0 +1,178 @@ +// +// 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_TextTextLine.h + * @brief This is the header file for the TextLine class. + * + * This header file contains the declarations of the %TextLine class. + */ + +#ifndef _FGRP_INTERNAL_TEXT_LINE_H_ +#define _FGRP_INTERNAL_TEXT_LINE_H_ + +#include + +#include "FGrp_TextCommon.h" +#include "FGrp_FontImpl.h" + +namespace Tizen { namespace Graphics +{ + +class _CanvasImpl; + +namespace _Text +{ + +class TextComposite; + +class TextLine +{ +public: + TextLine(TextComposite* pCompositeText = null); + + virtual ~TextLine(void); + +public: + virtual result Draw(_CanvasImpl& canvasImpl, FloatRectangle& displayRect, int startTextIndex, int textLength, + const TextObjectAlignment align, const TextObjectActionType action); + + virtual result DrawPartial(_CanvasImpl& canvasImpl, int startTextIndex, int textLength, FloatRectangle& displayRect); + + virtual int ForwardAnalyze(int startTextIndex, int textLength, float maxWidth, TextObjectWrapType wrap, + int& actualLength, float& width, float& height); + + virtual result GetRegion(int textIndex, int textLength, int& width, int& height) const; + + virtual result GetRegion(int textIndex, int textLength, float& width, float& height) const; + + virtual float GetHeightF(int textIndex) const; + + virtual int GetTextLength(void) const; + + virtual void SetTextLength(int length); + + void SetIndex(int index); + + int GetIndex(void) const; + + result SetTextOffset(int textOffset); + + int GetTextOffset(void) const; + + result SetBounds(const Rectangle& rect); + + result SetBounds(const FloatRectangle& rect); + + Rectangle GetBounds(void) const; + + FloatRectangle GetBoundsF(void) const; + + void SetEndType(int endType); + + int GetEndType(void) const; + + void SetRegion(int width, int height); + + void SetRegion(float width, float height); + + TextLine* CopyN(void); + + void SetBaseline(int baseline); + + void SetBaseline(float baseline); + + int GetBaseline(void) const; + + float GetBaselineF(void) const; + + result ResetSweepInfo(void); + + void SetSweepComposeInfo(TextObjectSweepComposeLineInfo& textSweepComposeLineInfo); + + TextObjectSweepComposeLineInfo GetSweepComposeInfo(void) const; + + void SetSweepIn(float sweepIn); + + float GetSweepIn(void) const; + + void SetSweepOut(float sweepOut); + + float GetSweepOut(void) const; + + void SetKeyInputResult(int keyInputResult); + + int GetKeyInputResult(void) const; + + void NotifyLineChanged(bool isChanged); + + bool isChanged(void) const; + + void SetKeyInputOffset(int keyInputTextIndex); + + int GetKeyInputOffset(void) const; + + void SetKeyInputLength(int keyInputTextLength); + + int GetKeyInputLength(void); + + result SetTextExtentList(Tizen::Base::Collection::ArrayListT<_FloatPair>* pList); + + Tizen::Base::Collection::ArrayListT<_FloatPair>* GetTextExtentList(void) const; + + int GetTextIndexFromPosition(int pcX); + + int GetTextIndexFromPosition(float pcX); + + Rectangle GetTextExtent(int textIndexFromLineOffset, int textLength) const; + + FloatRectangle GetTextExtentF(int textIndexFromLineOffset, int textLength) const; + + Rectangle GetBlockTextExtent(int textIndexFromLineOffset, int textLength) const; + + FloatRectangle GetBlockTextExtentF(int textIndexFromLineOffset, int textLength) const; + +// Attribute +private: + TextComposite* __pCompositeText; + FloatRectangle __rect; + int __endType; + int __index; + int __textOffset; + int __textLength; + float __width; + float __height; + float __baseline; + TextObjectSweepComposeLineInfo __sweepComposeLineInfo; + float __sweepIn; + float __sweepOut; + int __sweepType; + bool __isKeyInputChanged; + int __keyInputTextIndex; + int __keyInputTextLength; + Tizen::Base::Collection::ArrayListT<_FloatPair>* __pExtentList; + +private: + TextLine(const TextLine& other); // NOT IMPLMENTED + + TextLine& operator =(const TextLine& rhs); // NOT IMPLMENTED + +}; // TextLine + +}}} // Tizen::Graphics::_Text + +#endif // _FGRP_INTERNAL_TEXT_LINE_H_ diff --git a/src/graphics/text/FGrp_TextTextObject.cpp b/src/graphics/text/FGrp_TextTextObject.cpp new file mode 100644 index 0000000..cbc83a7 --- /dev/null +++ b/src/graphics/text/FGrp_TextTextObject.cpp @@ -0,0 +1,4851 @@ +// +// 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_TextTextObject.cpp + * @brief This is the implementation file for TextObject class. + */ + +#include +#include +#include +#include "FGrpCoordinateSystem.h" +#include "FGrp_FontImpl.h" +#include "FGrp_CanvasImpl.h" +#include "../FGrp_ResUtil.h" +#include "FGrp_TextTextObject.h" +#include "FGrp_TextTextElement.h" +#include "FGrp_TextTextSimple.h" +#include "FGrp_TextTextImage.h" +#include "FGrp_TextTextCutLink.h" +#include "FGrp_TextTextComposite.h" +#include "FGrp_TextTextLine.h" +#include "FGrp_TextTextColumn.h" +#include "FGrp_TextTextUtility.h" +#include "FGrp_Screen.h" +#include "FGrp_CoordinateSystemUtils.h" + +namespace // unnamed +{ + const int DEFAULT_FONT_SIZE = 42; +} + +#define IF_NOT_CONSTRUCTED(code) if (this->__pCompositeText == null || this->__pTextColumn == null) \ + { \ + code; \ + } + +#define Release(x) \ + if (x) \ + { \ + delete x; \ + x = null; \ + } + +using namespace Tizen::Base::Utility; +using namespace Tizen::Base; + +namespace Tizen { namespace Graphics +{ + +namespace _Text +{ + +TextObject::TextObject(void) +{ + __action = TEXT_OBJECT_ACTION_TYPE_NONE; + __align = (TextObjectAlignment)(TEXT_OBJECT_ALIGNMENT_LEFT | TEXT_OBJECT_ALIGNMENT_TOP); + __wrap = TEXT_OBJECT_WRAP_TYPE_NONE; + __isActionOn = false; + __isChanged = false; + __pCompositeText = null; + __pDefaultFont = null; + __defaultForegroundColor = Color::GetColor(COLOR_ID_BLACK); + __defaultBackgroundColor = Color::GetColor(COLOR_ID_WHITE); + __defaultOutlineColor = Color::GetColor(COLOR_ID_WHITE); + __isAlternateLookEnabled = false; + __pTextColumn = null; + __textObjectEllipsisType = TEXT_OBJECT_ELLIPSIS_TYPE_TAIL; + __isFirstDisplayPositionYChanged = false; + __rect.x = 0; + __rect.y = 0; + __rect.width = 0; + __rect.height = 0; + __repeatCount = 0; + __slidingGap = CoordinateSystem::ConvertToLogicalX(30.0f); + __slidingStep = CoordinateSystem::ConvertToLogicalX(2.0f); + __linkViewModeEnabled = false; + __isUrlLinkColorDefined = false; + __isEmailLinkColorDefined = false; + __isPhoneNumberLinkColorDefined = false; + __linkColor[TEXT_OBJECT_LINK_COLOR_TYPE_URL_NORMAL] = Color::GetColor(COLOR_ID_BLUE); + __linkColor[TEXT_OBJECT_LINK_COLOR_TYPE_URL_SELECT] = Color::GetColor(COLOR_ID_BLUE); + __linkColor[TEXT_OBJECT_LINK_COLOR_TYPE_EMAIL_NORMAL] = Color::GetColor(COLOR_ID_BLUE); + __linkColor[TEXT_OBJECT_LINK_COLOR_TYPE_EMAIL_SELECT] = Color::GetColor(COLOR_ID_BLUE); + __linkColor[TEXT_OBJECT_LINK_COLOR_TYPE_PHONE_NUMBER_NORMAL] = Color::GetColor(COLOR_ID_BLUE); + __linkColor[TEXT_OBJECT_LINK_COLOR_TYPE_PHONE_NUMBER_SELECT] = Color::GetColor(COLOR_ID_BLUE); + __bidiHint = TEXT_BIDI_HINT_NONE; + __isDisplayBoundsExpandEnabled = false; + + __sweepInfo.isValid = false; + __sweepInfo.sweepType = TEXT_OBJECT_SWEEP_TYPE_NONE; + __sweepInfo.sweepEventType = TEXT_OBJECT_SWEEP_EVENT_NONE; + __sweepInfo.anchorTextIndex = 0; + __sweepInfo.anchorLineIndex = 0; + __sweepInfo.prevAnchorLineIndex = 0; + __sweepInfo.sweepRegionStartLineIndex = 0; + __sweepInfo.sweepRegionLineCount = 0; + __sweepInfo.insertedLineCount = 0; + __sweepInfo.deletedLineCount = 0; + __sweepInfo.widthChanged = 0; +} + +TextObject::~TextObject(void) +{ + Release(__pCompositeText); + Release(__pTextColumn); + Release(__pDefaultFont); +} + +result +TextObject::Construct(void) +{ + result r = E_SUCCESS; + + __action = TEXT_OBJECT_ACTION_TYPE_NONE; + __align = (TextObjectAlignment)(TEXT_OBJECT_ALIGNMENT_LEFT | TEXT_OBJECT_ALIGNMENT_TOP); + __wrap = TEXT_OBJECT_WRAP_TYPE_WORD; + __isActionOn = false; + __isChanged = false; + __defaultForegroundColor = Color::GetColor(COLOR_ID_BLACK); + __defaultBackgroundColor = Color::GetColor(COLOR_ID_WHITE); + __defaultOutlineColor = Color::GetColor(COLOR_ID_WHITE); + __isAlternateLookEnabled = false; + __linkViewModeEnabled = false; + __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] 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] 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] 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."); + + __pCompositeText->SetWrap(__wrap); + __pCompositeText->SetTextSweepInfo(&__sweepInfo); + + return E_SUCCESS; + +CATCH: + Release(__pDefaultFont); + Release(__pCompositeText); + Release(__pTextColumn); + + return r; +} + +result +TextObject::Construct(const Rectangle& rect) +{ + result r = E_SUCCESS; + + __action = TEXT_OBJECT_ACTION_TYPE_NONE; + __align = (TextObjectAlignment)(TEXT_OBJECT_ALIGNMENT_LEFT | TEXT_OBJECT_ALIGNMENT_TOP); + __wrap = TEXT_OBJECT_WRAP_TYPE_WORD; + __isActionOn = false; + __isChanged = false; + __defaultForegroundColor = Color::GetColor(COLOR_ID_BLACK); + __defaultBackgroundColor = Color::GetColor(COLOR_ID_WHITE); + __defaultOutlineColor = Color::GetColor(COLOR_ID_WHITE); + __isAlternateLookEnabled = false; + __linkViewModeEnabled = false; + __bidiHint = TEXT_BIDI_HINT_NONE; + __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] 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] 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] 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."); + + __pCompositeText->SetWrap(__wrap); + __pCompositeText->SetTextSweepInfo(&__sweepInfo); + + return E_SUCCESS; + +CATCH: + Release(__pDefaultFont); + Release(__pCompositeText); + Release(__pTextColumn); + + return r; +} + +result +TextObject::Construct(const FloatRectangle& rect) +{ + result r = E_SUCCESS; + + __action = TEXT_OBJECT_ACTION_TYPE_NONE; + __align = (TextObjectAlignment)(TEXT_OBJECT_ALIGNMENT_LEFT | TEXT_OBJECT_ALIGNMENT_TOP); + __wrap = TEXT_OBJECT_WRAP_TYPE_WORD; + __isActionOn = false; + __isChanged = false; + __defaultForegroundColor = Color::GetColor(COLOR_ID_BLACK); + __defaultBackgroundColor = Color::GetColor(COLOR_ID_WHITE); + __defaultOutlineColor = Color::GetColor(COLOR_ID_WHITE); + __isAlternateLookEnabled = false; + __linkViewModeEnabled = false; + __bidiHint = TEXT_BIDI_HINT_NONE; + __rect = rect; + + __pCompositeText = new (std::nothrow)TextComposite(); + 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] 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] 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."); + + __pCompositeText->SetWrap(__wrap); + __pCompositeText->SetTextSweepInfo(&__sweepInfo); + + return E_SUCCESS; + +CATCH: + Release(__pDefaultFont); + Release(__pCompositeText); + Release(__pTextColumn); + + return r; +} + +TextObject* +TextObject::CloneN(void) +{ + IF_NOT_CONSTRUCTED(return null); + + result r = E_SUCCESS; + TextObject* pTextObject = null; + TextElement* pTextElement = null; + TextElement* pCloneTextElement = null; + int count = __pCompositeText->GetElementCount(); + + pTextObject = new (std::nothrow)TextObject(); + 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)); + + for (int i=0; i < count; i++) + { + pTextElement = __pCompositeText->GetElementAtElementIndex(i); + SysTryCatch(NID_GRP, pTextElement, , E_SYSTEM, "[E_SYSTEM] Fail to get text element."); + + pCloneTextElement = pTextElement->CloneN(SET_ALLVALUE_CLONE,0); + pTextObject->AppendElement(*pCloneTextElement); + } + + SetLastResult(E_SUCCESS); + + return pTextObject; + +CATCH: + Release(pTextObject); + + return null; +} + +result +TextObject::Draw(_CanvasImpl& canvasImpl) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + if (__rect.width == 0.0f || __rect.height == 0.0f) + { + return E_SUCCESS; + } + + result r = E_SUCCESS; + TextLine* pTextLine = null; + FloatRectangle clipRect; + FloatRectangle lineBounds; + FloatRectangle targetBounds; + float totalHeight = 0; + float slidingWidth = 0; + + SysTryReturn(NID_GRP, __rect.width > 0.0f && __rect.height > 0.0f, E_INVALID_STATE, E_INVALID_STATE + , "[E_INVALID_STATE] This instance is not constructed yet. (width = %0.6f, height = %0.6f)", __rect.width, __rect.height); + + TextBidiHint bidiHint = _GetTextBidiHint(); + _SetTextBidiHint(__bidiHint); + + r = Compose(); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (__pTextColumn->GetTotalLineCount() <= 1) + { + __pTextColumn->SetFirstDisplayLineIndex(0); + __pTextColumn->SetFirstDisplayPositionY(0.0f); + } + + targetBounds = __rect; + + if (__action == TEXT_OBJECT_ACTION_TYPE_SLIDE_LEFT) + { + if (__pTextColumn->GetTotalLineCount() == 0) + { + return E_SUCCESS; + } + + totalHeight = TextUtility::GetFontMaxHeightF(__pDefaultFont); + } + else + { + totalHeight = __pTextColumn->GetTotalHeightF(); + } + + if (totalHeight == 0) + { + return E_SUCCESS; + } + + if (totalHeight < targetBounds.height) + { + switch (__align & TEXT_ALIGNMASK_VERT) + { + case TEXT_OBJECT_ALIGNMENT_TOP: + // fall through + default: + break; + + case TEXT_OBJECT_ALIGNMENT_MIDDLE: + targetBounds.y += (targetBounds.height - totalHeight) / 2.0f; + break; + + case TEXT_OBJECT_ALIGNMENT_BOTTOM: + targetBounds.y += targetBounds.height - totalHeight; + break; + } + } + else + { + if (targetBounds.height < totalHeight) + { + if (__action == TEXT_OBJECT_ACTION_TYPE_ABBREV) + { + int i = 0; + int lineCount = __pTextColumn->GetTotalLineCount(); + + if (lineCount == 1) + { + totalHeight = targetBounds.height; + } + else + { + float lineHeight = __pTextColumn->GetLineHeightAtF(0); + + if (targetBounds.height < lineHeight) + { + totalHeight = targetBounds.height; + } + else + { + lineHeight = 0; + + for (i = 0; i < lineCount; i++) + { + lineHeight += __pTextColumn->GetLineHeightAtF(i); + if (targetBounds.height < lineHeight) + { + lineHeight -= __pTextColumn->GetLineHeightAtF(i); + break; + } + } + + totalHeight = lineHeight; + } + } + } + else + { + goto CONTINUE_PROC; + } + } + else + { + goto CONTINUE_PROC; + } + + switch (__align & TEXT_ALIGNMASK_VERT) + { + case TEXT_OBJECT_ALIGNMENT_TOP: + // fall through + default: + break; + + case TEXT_OBJECT_ALIGNMENT_MIDDLE: + targetBounds.y += (targetBounds.height - totalHeight) / 2.0f; + break; + + case TEXT_OBJECT_ALIGNMENT_BOTTOM: + targetBounds.y += targetBounds.height - totalHeight; + break; + } + targetBounds.height = totalHeight; + } + +CONTINUE_PROC: + FloatRectangle finalClipRect; + clipRect = canvasImpl.GetClipBoundsF(); + + finalClipRect.x = (clipRect.x > __rect.x) ? clipRect.x : __rect.x; + finalClipRect.y = (clipRect.y > __rect.y) ? clipRect.y: __rect.y; + finalClipRect.width = (clipRect.x + clipRect.width > __rect.x + __rect.width) ? (__rect.x + __rect.width) - finalClipRect.x : (clipRect.x + clipRect.width) - finalClipRect.x; + finalClipRect.height = (clipRect.y + clipRect.height > __rect.y + __rect.height) ? (__rect.y + __rect.height) - finalClipRect.y : (clipRect.y + clipRect.height) - finalClipRect.y; + + if (__isDisplayBoundsExpandEnabled == true) + { + finalClipRect.y = clipRect.y; + finalClipRect.height = clipRect.height; + } + + SysTryReturn(NID_GRP, 0.0f <= finalClipRect.width && 0.0f <= finalClipRect.height, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get clip rectangle."); + + canvasImpl.SetClipBounds(finalClipRect); + + switch (__action) + { + case TEXT_OBJECT_ACTION_TYPE_SLIDE_LEFT: + pTextLine = __pTextColumn->GetTextLine(0); + SysTryReturn(NID_GRP, pTextLine, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + lineBounds = pTextLine->GetBoundsF(); + __pTextColumn->SetDisplayLineCount(1); + __pTextColumn->SetDisplayHeight(lineBounds.height); + + slidingWidth = (__pTextColumn->GetSlidingDimension().width > __rect.width) ? __pTextColumn->GetSlidingDimension().width : __rect.width; + + if (__isActionOn) + { + FloatRectangle slidingRect; + + targetBounds.width = lineBounds.width; + targetBounds.height = lineBounds.height; + + slidingRect = targetBounds; + + slidingRect.x += __pTextColumn->GetSlidingPositionF(); + FloatDimension slidingDim = __pTextColumn->GetSlidingDimensionF(); + slidingRect.width = slidingDim.width; + slidingRect.height = slidingDim.height; + + __pCompositeText->Draw(canvasImpl, slidingRect, 0, __pCompositeText->GetTextLength(), + (TextObjectAlignment)(__align & TEXT_ALIGNMASK_HORIZ), TEXT_OBJECT_ACTION_TYPE_NONE); + + slidingRect.x += slidingDim.width + __slidingGap; + if (slidingRect.x < targetBounds.x + targetBounds.width) + { + slidingRect.width = targetBounds.x + targetBounds.width - slidingRect.x; + __pCompositeText->Draw(canvasImpl, slidingRect, 0, __pCompositeText->GetTextLength() + ,(TextObjectAlignment)(__align & TEXT_ALIGNMASK_HORIZ), TEXT_OBJECT_ACTION_TYPE_NONE); + } + } + else + { + pTextLine->Draw(canvasImpl, targetBounds, 0, pTextLine->GetTextLength(), + (TextObjectAlignment)(__align & TEXT_ALIGNMASK_HORIZ), TEXT_OBJECT_ACTION_TYPE_NONE); + } + break; + + case TEXT_OBJECT_ACTION_TYPE_SLIDE_UP: + { + FloatRectangle slidingRect = targetBounds; + slidingRect.y += __pTextColumn->GetSlidingPositionF(); + + int lineCount = __pTextColumn->GetTotalLineCount(); + for (int i = 0; i < lineCount; i++) + { + pTextLine = __pTextColumn->GetTextLine(i); + if (pTextLine != null) + { + lineBounds = pTextLine->GetBoundsF(); + slidingRect.height = lineBounds.height; + if ((slidingRect.y + slidingRect.height >= targetBounds.y) && (slidingRect.y < targetBounds.y + targetBounds.height)) + { + pTextLine->Draw(canvasImpl, slidingRect, 0, pTextLine->GetTextLength(), + (TextObjectAlignment)(__align & TEXT_ALIGNMASK_HORIZ), TEXT_OBJECT_ACTION_TYPE_NONE); + } + } + slidingRect.y += slidingRect.height; + } + } + break; + + case TEXT_OBJECT_ACTION_TYPE_ABBREV: + if (__pCompositeText->IsTextAbbreviationEnabled()) + { + __pCompositeText->DrawAbbrev(canvasImpl, targetBounds, __align); + } + else + { + DrawByLine(canvasImpl, targetBounds); + } + break; + + case TEXT_OBJECT_ACTION_TYPE_NONE: + // fall through + default: + DrawByLine(canvasImpl, targetBounds); + break; + } + + canvasImpl.SetClipBounds(clipRect); + _SetTextBidiHint(bidiHint); + + return E_SUCCESS; +} + +result +TextObject::GetChangedLineRange(int& startChangedLineIndex, int& endChangedLineIndex) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + result r = E_SUCCESS; + + r = Compose(); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + startChangedLineIndex = __sweepInfo.sweepRegionStartLineIndex; + endChangedLineIndex = __sweepInfo.sweepRegionStartLineIndex + __sweepInfo.sweepRegionLineCount - 1; + + return E_SUCCESS; +} + +result +TextObject::DrawLine(_CanvasImpl& canvasImpl, int lineIndex) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + SysTryReturn(NID_GRP, lineIndex >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid. (lineIndex = %d)", lineIndex); + + result r = E_SUCCESS; + TextLine* pTextLine = null; + FloatRectangle lineBounds; + float firstDisplayY = __pTextColumn->GetFirstDisplayPositionYF(); + + TextBidiHint bidiHint = _GetTextBidiHint(); + _SetTextBidiHint(__bidiHint); + + r = Compose(); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + pTextLine = __pTextColumn->GetTextLine(lineIndex); + if (pTextLine == null) + { + SysLog(NID_GRP, "[E_INVALID_ARG] The argument is invalid. (lineIndex = %d, total line count = %d)" + , lineIndex, __pTextColumn->GetTotalLineCount()); + + return E_INVALID_ARG; + } + + lineBounds = pTextLine->GetBoundsF(); + lineBounds.y = lineBounds.y - firstDisplayY + __rect.y; + + int length = pTextLine->GetTextLength(); + pTextLine->Draw(canvasImpl, lineBounds, 0, length, __align, TEXT_OBJECT_ACTION_TYPE_NONE); + + _SetTextBidiHint(bidiHint); + + return E_SUCCESS; +} + +result +TextObject::DrawWithOffset(_CanvasImpl& canvasImpl) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + SysTryReturn(NID_GRP, __isActionOn, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] Action is off."); + + float slidingStartIndex = __pTextColumn->GetSlidingPositionF(); + FloatDimension slidingDim = __pTextColumn->GetSlidingDimensionF(); + + switch (__action) + { + case TEXT_OBJECT_ACTION_TYPE_SLIDE_LEFT: + if (__rect.width < slidingDim.width) + { + slidingDim.width = (slidingDim.width > __rect.width) ? slidingDim.width: __rect.width; + + if (__slidingStep < slidingStartIndex + slidingDim.width + __slidingGap) + { + slidingStartIndex -= __slidingStep; + } + else + { + slidingStartIndex += slidingDim.width + __slidingGap; + + __repeatCount++; + } + } + else + { + if (0.0f < slidingStartIndex + slidingDim.width) + { + slidingStartIndex -= __slidingStep; + } + else + { + slidingStartIndex = __rect.width + __slidingGap + slidingStartIndex; + } + } + __pTextColumn->SetSlidingPosition(slidingStartIndex); + break; + + case TEXT_OBJECT_ACTION_TYPE_SLIDE_UP: + if (slidingStartIndex + slidingDim.height >= 0.0f) + { + slidingStartIndex -= __slidingStep; + } + else + { + slidingStartIndex = __rect.height; + } + __pTextColumn->SetSlidingPosition(slidingStartIndex); + break; + + case TEXT_OBJECT_ACTION_TYPE_ABBREV: + // fall through + case TEXT_OBJECT_ACTION_TYPE_NONE: + // fall through + default: + break; + } + + return Draw(canvasImpl); +} + +result +TextObject::UpdateChangedInfo(int startTextIndex, int textLength) +{ + result r = E_SUCCESS; + + if (startTextIndex >= 0) + { + r = __pTextColumn->SetChangeAction(TextColumn::TEXT_CHANGE_UNKONWN, startTextIndex, 0); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + __isChanged = true; + + if (IsPartialComposingModeEnabled()) + { + __pCompositeText->InitPartialComposeMode(); + } + + return E_SUCCESS; +} + +bool +TextObject::IsChanged(void) const +{ + IF_NOT_CONSTRUCTED(return false); + + return __isChanged; +} + +result +TextObject::SetPartialComposingModeEnabled(bool enable) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + __pCompositeText->SetPartialComposingModeEnabled(enable); + + return E_SUCCESS; +} + +bool +TextObject::IsPartialComposingModeEnabled(void) const +{ + IF_NOT_CONSTRUCTED(return false); + + return __pCompositeText->IsPartialComposingModeEnabled(); +} + +result +TextObject::Compose(void) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + SysTryReturn(NID_GRP, __rect.width >= 0.0f && __rect.height >= 0.0f, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] This instance is not constructed yet."); + + TextBidiHint bidiHint = _GetTextBidiHint(); + _SetTextBidiHint(__bidiHint); + + int lineCount = 0; + FloatRectangle rect = __rect; + FloatRectangle lineBounds; + + if (__pCompositeText->IsPartialComposingModeEnabled()) + { + if (__pCompositeText->IsComposeDone() || !__isFirstDisplayPositionYChanged) + { + if (GetTotalLineCount() != 0) + { + _SetTextBidiHint(bidiHint); + return E_SUCCESS; + } + } + } + else + { + if (!__isChanged || __pTextColumn->GetChangeActionEventCount() == 0) + { + _SetTextBidiHint(bidiHint); + return E_SUCCESS; + } + } + + __isActionOn = false; + + if (__pTextColumn->GetTotalLineCount() == 0) + { + __pTextColumn->SetChangeAction(TextColumn::TEXT_CHANGE_UNKONWN, 0, 0); + __pTextColumn->SetFirstDisplayLineIndex(0); + __pTextColumn->SetFirstDisplayPositionY(0.0f); + __pTextColumn->SetFirstDisplayPositionX(0.0f); + } + + ResetSweepInfo(); + lineCount = __pCompositeText->Compose(rect, __pTextColumn); + + switch (__action) + { + case TEXT_OBJECT_ACTION_TYPE_SLIDE_LEFT: + { + TextLine* pTextLine = __pTextColumn->GetTextLine(0); + if (pTextLine != null) + { + FloatRectangle lineBounds = pTextLine->GetBoundsF(); + int lineLength = pTextLine->GetTextLength(); + int totalLength = __pCompositeText->GetTextLength(); + + if (lineLength < totalLength || __rect.width < lineBounds.width) + { + __isActionOn = true; + __pTextColumn->SetSlidingPosition(0.0f); + + FloatDimension slidingDim; + FloatDimension lineTextSize; + + __pCompositeText->GetRegion(0, totalLength, slidingDim.width, slidingDim.height); + pTextLine->GetRegion(0, lineLength, lineTextSize.width, lineTextSize.height); + lineBounds = pTextLine->GetBoundsF(); + + __pTextColumn->SetSlidingDimension(slidingDim); + + lineBounds.height = slidingDim.height; + lineTextSize.width = lineBounds.width; + + pTextLine->SetBounds(lineBounds); + pTextLine->SetRegion(lineTextSize.width, lineTextSize.height); + } + } + } + break; + + case TEXT_OBJECT_ACTION_TYPE_SLIDE_UP: + { + __pTextColumn->SetSlidingPosition(0.0f); + + float totalHeight = __pTextColumn->GetTotalHeightF(); + FloatDimension slidingDim; + slidingDim.width = __rect.width; + slidingDim.height = totalHeight; + + __pTextColumn->SetSlidingDimension(slidingDim); + + if (__rect.height < totalHeight) + { + __isActionOn = true; + } + } + break; + + case TEXT_OBJECT_ACTION_TYPE_ABBREV: + // fall through + case TEXT_OBJECT_ACTION_TYPE_NONE: + // fall through + default: + break; + } + + __isChanged = false; + + _SetTextBidiHint(bidiHint); + + return E_SUCCESS; +} + +int +TextObject::GetText(wchar_t* pCopiedText, int textLength) const +{ + IF_NOT_CONSTRUCTED(return -1); + + SysTryReturn(NID_GRP, pCopiedText, -1, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + SysTryReturn(NID_GRP, textLength > 0, -1, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + int textElementCount = 0; + int totalLength = 0; + int outLength = textLength; + int copiedLength = 0; + TextElement* pTextElement = null; + wchar_t* pSrcText = null; + wchar_t* pDstText = null; + + textElementCount = __pCompositeText->GetElementCount(); + pDstText = pCopiedText; + + for (int i = 0; i < textElementCount && totalLength < outLength; i++) + { + pTextElement = __pCompositeText->GetElementAtElementIndex(i); + if (pTextElement == null) + { + return totalLength; + } + + TextElementType objectType = pTextElement->GetType(); + if (objectType == TEXT_ELEMENT_TYPE_TEXT || objectType == TEXT_ELEMENT_TYPE_CUTLINK) + { + int elementTextLength = pTextElement->GetTextLength(); + TextSimple* pSimpleText = dynamic_cast < TextSimple* >(pTextElement); + if (pSimpleText != null) + { + copiedLength = (elementTextLength > outLength - totalLength) ? outLength - totalLength : elementTextLength; + SysTryReturn(NID_GRP, 0 <= copiedLength, -1, E_SYSTEM, "[E_SYSTEM] Fail to string copy."); + + pSrcText = (wchar_t*)pSimpleText->GetText(); + + result r = TextUtility::CopyText(pDstText, pSrcText, copiedLength); + SysTryReturn(NID_GRP, r == E_SUCCESS, -1, r, "[%s] Propagating.", GetErrorMessage(r)); + + pDstText += copiedLength; + totalLength += copiedLength; + } + } + } + + SetLastResult(E_SUCCESS); + + return totalLength; +} + +result +TextObject::SetFirstDisplayLineIndex(int lineIndex) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + if (lineIndex == 0 && __pTextColumn->GetTotalLineCount() == 0) + { + return E_SUCCESS; + } + + result r = E_SUCCESS; + FloatRectangle lineBounds; + TextLine* pTextLine = null; + float firstDisplayPositionY = 0.0f; + float rollbackFirstDisplayPositionY = 0.0f; + int rollbackFirstDisplayLineIndex = 0; + + rollbackFirstDisplayPositionY = __pTextColumn->GetFirstDisplayPositionYF(); + rollbackFirstDisplayLineIndex = __pTextColumn->GetFirstDisplayLineIndex(); + + __pTextColumn->SetFirstDisplayLineIndex(lineIndex); + + pTextLine = __pTextColumn->GetTextLine(lineIndex); + SysTryCatch(NID_GRP, pTextLine, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text element."); + + lineBounds = pTextLine->GetBoundsF(); + firstDisplayPositionY = lineBounds.y; + + __pTextColumn->SetFirstDisplayPositionY(firstDisplayPositionY); + + return E_SUCCESS; + +CATCH: + __pTextColumn->SetFirstDisplayLineIndex(rollbackFirstDisplayLineIndex); + __pTextColumn->SetFirstDisplayPositionY(rollbackFirstDisplayPositionY); + + return r; +} + +result +TextObject::SetFirstDisplayPositionX(int x) +{ + return SetFirstDisplayPositionX(_CoordinateSystemUtils::ConvertToFloat(x)); +} + +result +TextObject::SetFirstDisplayPositionX(float x) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + SysTryReturn(NID_GRP, __wrap == TEXT_OBJECT_WRAP_TYPE_NONE + , E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] The argument is invalid."); + + TextLine* pTextLine = __pTextColumn->GetTextLine(0); + SysTryReturn(NID_GRP, pTextLine, -1, E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + FloatRectangle lineBounds = pTextLine->GetBoundsF(); + + if (x < 0) + { + x = 0; + } + + __pTextColumn->SetFirstDisplayPositionX(x); + + return E_SUCCESS; +} + +int +TextObject::GetFirstDisplayPositionX(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetFirstDisplayPositionXF()); +} + +float +TextObject::GetFirstDisplayPositionXF(void) const +{ + IF_NOT_CONSTRUCTED(return -1); + + return __pTextColumn->GetFirstDisplayPositionX(); +} + +result +TextObject::SetFirstDisplayPositionY(int y) +{ + return SetFirstDisplayPositionY(_CoordinateSystemUtils::ConvertToFloat(y)); +} + +result +TextObject::SetFirstDisplayPositionY(float y) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + result r = E_SUCCESS; + + if (IsPartialComposingModeEnabled()) + { + __isFirstDisplayPositionYChanged = true; + + if (__pCompositeText->GetTotalComposedHeight() <= (y + __rect.height)) + { + __pCompositeText->SetComposePartialLimitHeight(y + __rect.height - GetTotalComposedHeight()); + + r = Compose(); + SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + + __isFirstDisplayPositionYChanged = false; + __pTextColumn->SetFirstDisplayPositionY(y); + + return E_SUCCESS; + +CATCH: + __isFirstDisplayPositionYChanged = false; + return r; +} + +int +TextObject::GetMaxLineHeight(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetMaxLineHeightF()); +} + +float +TextObject::GetMaxLineHeightF(void) const +{ + IF_NOT_CONSTRUCTED(return -1); + + float lineMaxHeight = __pCompositeText->GetMaxLineHeightF(); + float fontMaxHeight = TextUtility::GetFontMaxHeightF(__pDefaultFont); + + return (lineMaxHeight > fontMaxHeight) ? lineMaxHeight: fontMaxHeight; +} + +bool +TextObject::IsDisplayedAtStartPosition(void) const +{ + IF_NOT_CONSTRUCTED(return false); + + float firstDisplayPositionY = __pTextColumn->GetFirstDisplayPositionYF(); + + bool isDisplayedAtStartPosition = (firstDisplayPositionY == 0.0f) ? true : false; + + return isDisplayedAtStartPosition; +} + +bool +TextObject::IsDisplayedAtEndPosition(void) const +{ + IF_NOT_CONSTRUCTED(return false); + + float totalHeight = 0.0f; + float firstDisplayPositionY = 0.0f; + + firstDisplayPositionY = __pTextColumn->GetFirstDisplayPositionYF(); + totalHeight = __pTextColumn->GetTotalHeightF(); + + bool isDisplayedAtEndPosition = ((totalHeight - firstDisplayPositionY) <= __rect.height) ? true : false; + + return isDisplayedAtEndPosition; +} + +bool +TextObject::IsDisplayedFirstLine(void) const +{ + IF_NOT_CONSTRUCTED(return false); + + float firstDisplayPositionY = __pTextColumn->GetFirstDisplayPositionYF(); + float firstLineHeight = GetLineHeightAtF(0); + + bool isDisplayedFirstLine = false; + if(firstDisplayPositionY == 0.0f || firstDisplayPositionY < firstLineHeight) + { + isDisplayedFirstLine = true; + } + + return isDisplayedFirstLine; +} + +bool +TextObject::IsDisplayedLastLine(void) const +{ + IF_NOT_CONSTRUCTED(return false); + + float totalHeight = 0.0f; + float firstDisplayPositionY = 0.0f; + bool isDisplayedLastLine = false; + + firstDisplayPositionY = __pTextColumn->GetFirstDisplayPositionYF(); + totalHeight = __pTextColumn->GetTotalHeightF(); + + float lastLineHeight = GetLineHeightAtF(GetTotalLineCount()-1); + + float remainingHeight = totalHeight - firstDisplayPositionY; + if (remainingHeight - __rect.height < lastLineHeight || remainingHeight <= __rect.height) + { + isDisplayedLastLine = true; + } + + return isDisplayedLastLine; +} + +result +TextObject::SetAction(TextObjectActionType action) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + SysTryReturn(NID_GRP, TEXT_OBJECT_ACTION_TYPE_NONE <= action && action < TEXT_OBJECT_ACTION_TYPE_MAX + , E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + if (__action != action) + { + if ((__action == TEXT_OBJECT_ACTION_TYPE_NONE && action == TEXT_OBJECT_ACTION_TYPE_ABBREV) || + (__action == TEXT_OBJECT_ACTION_TYPE_ABBREV && action == TEXT_OBJECT_ACTION_TYPE_NONE)) + { + __action = action; + UpdateChangedInfo(0, 0); + } + else + { + __action = action; + UpdateChangedInfo(0, 0); + } + + __repeatCount = 0; + } + + bool isAbbreviationEnable = (__action == TEXT_OBJECT_ACTION_TYPE_ABBREV) ? true : false; + __pCompositeText->SetTextAbbreviationEnabled(isAbbreviationEnable); + + return E_SUCCESS; +} + +result +TextObject::SetAlignment(TextObjectAlignment alignment) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + SysTryReturn(NID_GRP, TEXT_OBJECT_ALIGNMENT_LEFT <= alignment && alignment < TEXT_OBJECT_ALIGNMENT_INVALID + , E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid. alignment(%d)", alignment); + + if (__align != alignment) + { + __align = alignment; + UpdateChangedInfo(0, 0); + } + + return E_SUCCESS; +} + +result +TextObject::SetBounds(const Rectangle& rect) +{ + return SetBounds(_CoordinateSystemUtils::ConvertToFloat(rect)); +} + +result +TextObject::SetBounds(const FloatRectangle& rect) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + SysTryReturn(NID_GRP, (rect.width >= 0.0f) && (rect.height >= 0.0f), E_OUT_OF_RANGE, E_OUT_OF_RANGE + , "[E_OUT_OF_RANGE] The given rectangle(width:%0.6f,height:%0.6f) is out of range.\n", rect.width, rect.height); + + if (__rect.width != rect.width) + { + UpdateChangedInfo(0, 0); + } + + __rect = rect; + + return E_SUCCESS; +} + +result +TextObject::SetLineSpace(int lineSpacing) +{ + return SetLineSpace(_CoordinateSystemUtils::ConvertToFloat(lineSpacing)); +} + +result +TextObject::SetLineSpace(float lineSpacing) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + SysTryReturn(NID_GRP, lineSpacing >= 0.0f, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid. lineSpacing(%0.6f)", lineSpacing); + + if (__pCompositeText->GetLineSpace() != lineSpacing) + { + __pCompositeText->SetLineSpace(lineSpacing); + __isChanged = true; + } + + return E_SUCCESS; +} + +result +TextObject::SetElementVerticalAlignment(TextObjectAlignment alignment) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + SysTryReturn(NID_GRP + , (alignment & TEXT_OBJECT_ALIGNMENT_TOP) || (alignment & TEXT_OBJECT_ALIGNMENT_MIDDLE) || (alignment & TEXT_OBJECT_ALIGNMENT_BOTTOM) || (alignment & TEXT_OBJECT_ALIGNMENT_BASELINE) + , E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid. alignment(%d)", alignment); + + if (__pCompositeText->GetElementVerticalAlignment() == alignment) + { + return E_SUCCESS; + } + + __pCompositeText->SetElementVerticalAlignment(alignment); + __isChanged = true; + + return E_SUCCESS; +} + +Dimension +TextObject::GetTextExtent(int startTextIndex, int textLength) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetTextExtentF(startTextIndex,textLength)); +} + +FloatDimension +TextObject::GetTextExtentF(int startTextIndex, int textLength) const +{ + IF_NOT_CONSTRUCTED(return FloatDimension(-1, -1)); + + TextBidiHint bidiHint = _GetTextBidiHint(); + _SetTextBidiHint(__bidiHint); + + FloatDimension textSize; + result r = __pCompositeText->GetRegion(startTextIndex, textLength, textSize.width, textSize.height); + SysTryReturn(NID_GRP, r == E_SUCCESS, FloatDimension(-1, -1), r, "[%s] Propagating.", GetErrorMessage(r)); + + _SetTextBidiHint(bidiHint); + + SetLastResult(E_SUCCESS); + + return textSize; +} + +Dimension +TextObject::GetTextExtent(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetTextExtentF()); +} + +FloatDimension +TextObject::GetTextExtentF(void) const +{ + IF_NOT_CONSTRUCTED(return FloatDimension(-1, -1)); + + TextBidiHint bidiHint = _GetTextBidiHint(); + _SetTextBidiHint(__bidiHint); + + TextLine* pTextLine = null; + FloatDimension textSize(0.0f, 0.0f); + FloatDimension lineSize(0.0f, 0.0f); + int lineCount = GetTotalLineCount(); + + for (int i = 0; i < lineCount; i++) + { + pTextLine = __pTextColumn->GetTextLine(i); + SysTryReturn(NID_GRP, pTextLine, FloatDimension(-1, -1), E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + pTextLine->GetRegion(0, pTextLine->GetTextLength(), lineSize.width, lineSize.height); + + if (textSize.width < lineSize.width) + { + textSize.width = lineSize.width; + } + } + + textSize.height = GetTotalHeightF(); + + _SetTextBidiHint(bidiHint); + + SetLastResult(E_SUCCESS); + + return textSize; +} + +result +TextObject::AppendElement(TextElement& textElement) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + result r = E_SUCCESS; + TextElementType objecType = textElement.GetType(); + if (objecType == TEXT_ELEMENT_TYPE_CUTLINK) + { + TextCutLink* pLinkText = dynamic_cast < TextCutLink* >(&textElement); + if (pLinkText != null) + { + switch (pLinkText->GetCutLinkType()) + { + case LINK_TYPE_URL: + if (__isUrlLinkColorDefined) + { + pLinkText->SetUserColor(__linkColor[TEXT_OBJECT_LINK_COLOR_TYPE_URL_NORMAL], __linkColor[TEXT_OBJECT_LINK_COLOR_TYPE_URL_SELECT]); + } + break; + + case LINK_TYPE_EMAIL: + if (__isEmailLinkColorDefined) + { + pLinkText->SetUserColor(__linkColor[TEXT_OBJECT_LINK_COLOR_TYPE_EMAIL_NORMAL], __linkColor[TEXT_OBJECT_LINK_COLOR_TYPE_EMAIL_SELECT]); + } + break; + + case LINK_TYPE_TEL_NUM: + if (__isPhoneNumberLinkColorDefined) + { + pLinkText->SetUserColor(__linkColor[TEXT_OBJECT_LINK_COLOR_TYPE_PHONE_NUMBER_NORMAL], + __linkColor[TEXT_OBJECT_LINK_COLOR_TYPE_PHONE_NUMBER_SELECT]); + } + break; + + default: + break; + } + } + } + + int textIndex = __pCompositeText->GetTextLength(); + int elementTextLength = textElement.GetTextLength(); + + r = __pCompositeText->AppendElement(textElement); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + int elementCount = __pCompositeText->GetElementCount(); + if (elementCount > 0) + { + __pCompositeText->Optimize(elementCount-1, elementCount-1); + } + + if (__wrap == TEXT_OBJECT_WRAP_TYPE_NONE) + { + UpdateChangedInfo(0, 0); + } + else + { + NotifyTextAdded(textIndex, elementTextLength); + } + + return r; +} + +result +TextObject::InsertElementAt(int textIndex, TextElement& textElement) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + result r = E_SUCCESS; + TextElementType objecType = textElement.GetType(); + + if (objecType == TEXT_ELEMENT_TYPE_CUTLINK) + { + TextCutLink* pLinkText = dynamic_cast < TextCutLink* >(&textElement); + if (pLinkText != null) + { + switch (pLinkText->GetCutLinkType()) + { + case LINK_TYPE_URL: + if (__isUrlLinkColorDefined) + { + pLinkText->SetUserColor(__linkColor[TEXT_OBJECT_LINK_COLOR_TYPE_URL_NORMAL], + __linkColor[TEXT_OBJECT_LINK_COLOR_TYPE_URL_SELECT]); + } + break; + + case LINK_TYPE_EMAIL: + if (__isEmailLinkColorDefined) + { + pLinkText->SetUserColor(__linkColor[TEXT_OBJECT_LINK_COLOR_TYPE_EMAIL_NORMAL], + __linkColor[TEXT_OBJECT_LINK_COLOR_TYPE_EMAIL_SELECT]); + } + break; + + case LINK_TYPE_TEL_NUM: + if (__isPhoneNumberLinkColorDefined) + { + pLinkText->SetUserColor(__linkColor[TEXT_OBJECT_LINK_COLOR_TYPE_PHONE_NUMBER_NORMAL], + __linkColor[TEXT_OBJECT_LINK_COLOR_TYPE_PHONE_NUMBER_SELECT]); + } + break; + + default: + break; + } + } + } + + r = __pCompositeText->InsertElementAt(textElement, textIndex); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Fail to insert element.", GetErrorMessage(r)); + + int elementIndex = __pCompositeText->GetElementIndexOf(textElement); + if (elementIndex != -1) + { + __pCompositeText->Optimize(elementIndex, elementIndex); + } + + if (__wrap == TEXT_OBJECT_WRAP_TYPE_NONE) + { + UpdateChangedInfo(0, 0); + } + else + { + NotifyTextAdded(textIndex, textElement.GetTextLength()); + } + + return r; +} + +result +TextObject::RemoveAll(bool deallocate) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + result r = __pTextColumn->RemoveAllLines(); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __pCompositeText->RemoveAllElements(deallocate); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + UpdateChangedInfo(0); + + __isActionOn = false; + + return r; +} + +result +TextObject::Remove(int startTextIndex, int textLength) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + SysTryReturn(NID_GRP, startTextIndex >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + result r = __pTextColumn->RemoveAllLines(); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __pCompositeText->Remove(startTextIndex, textLength); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + UpdateChangedInfo(0); + + return r; +} + +result +TextObject::RemoveElement(TextElement& textElement, bool deallocate) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + result r = E_SUCCESS; + int elementIndex = 0; + int textIndex = 0; + int elementTextLength = 0; + TextElement* pCurrentTextElement = null; + + elementIndex = __pCompositeText->GetElementIndexOf(textElement); + SysTryReturn(NID_GRP, 0 <= elementIndex, E_INVALID_ARG, E_INVALID_ARG, "[E_SYSTEM] The argument is invalid."); + + for (int i = 0; i < elementIndex; i++) + { + pCurrentTextElement = __pCompositeText->GetElementAtElementIndex(i); + if (pCurrentTextElement != null) + { + textIndex += pCurrentTextElement->GetTextLength(); + } + } + + elementTextLength = textElement.GetTextLength(); + + r = __pCompositeText->RemoveElementAt(elementIndex, deallocate); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + NotifyTextDeleted(textIndex, elementTextLength); + + if (__pCompositeText->GetElementCount() == 0 || GetTextLength() == 0) + { + __pTextColumn->RemoveAllLines(); + } + + return r; +} + +TextElement* +TextObject::GetElementAtTextIndex(int textIndex) const +{ + IF_NOT_CONSTRUCTED(return null); + + TextElement* pTextElement = null; + int elementTextLength = 0; + int textIndexFromElementOffset = 0; + int elementIndex = 0; + int elementOffset = 0; + + pTextElement = __pCompositeText->GetElementAtTextIndex(textIndex, elementOffset, elementIndex, elementTextLength,textIndexFromElementOffset); + SysTryCatch(NID_GRP, pTextElement, , E_SYSTEM, "[E_SYSTEM] Fail to get text element."); + + SetLastResult(E_SUCCESS); + return pTextElement; + +CATCH: + elementOffset = 0; + elementIndex = 0; + return null; +} + +result +TextObject::SetFont(Font* pFont, int startTextIndex, int textLength) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + SysTryReturn(NID_GRP, pFont, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid. pFont is null."); + SysTryReturn(NID_GRP, startTextIndex >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + result r = E_SUCCESS; + Font* pTmpFont = null; + + pTmpFont = _FontImpl::CloneN(const_cast < Font& >(*pFont)); + r = GetLastResult(); + SysTryReturn(NID_GRP, pTmpFont, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + Release(__pDefaultFont); + + __pDefaultFont = pTmpFont; + + __pCompositeText->SetRange(startTextIndex, textLength); + + 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; +} + +const Font* +TextObject::GetFont(int textIndex) const +{ + IF_NOT_CONSTRUCTED(return null); + + Font* pFont = __pCompositeText->GetFont(textIndex); + if (pFont == null) + { + pFont = __pDefaultFont; + } + + SetLastResult(E_SUCCESS); + return pFont; +} + +result +TextObject::SetDefaultFontSize(int size) +{ + return SetDefaultFontSize(_CoordinateSystemUtils::ConvertToFloat(size)); +} + +result +TextObject::SetDefaultFontSize(float size) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + _FontImpl::GetInstance(*__pDefaultFont)->SetSize(size); + + return E_SUCCESS; +} + +int +TextObject::GetDefaultFontSize(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetDefaultFontSizeF()); +} + +float +TextObject::GetDefaultFontSizeF(void) const +{ + IF_NOT_CONSTRUCTED(return -1); + + return _FontImpl::GetInstance(*__pDefaultFont)->GetSizeF(); +} + +result +TextObject::SetFontSize(int size, int startTextIndex, int textLength) +{ + return SetFontSize(_CoordinateSystemUtils::ConvertToFloat(size), startTextIndex, textLength); +} + +result +TextObject::SetFontSize(float size, int startTextIndex, int textLength) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + SysTryReturn(NID_GRP + , startTextIndex >= 0 + , E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + __pCompositeText->SetRange(startTextIndex, textLength); + __pCompositeText->SetFontSize(size); + UpdateChangedInfo(0, 0); + + return E_SUCCESS; +} + +int +TextObject::GetFontSize(int textIndex) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetFontSizeF(textIndex)); +} + +float +TextObject::GetFontSizeF(int textIndex) const +{ + IF_NOT_CONSTRUCTED(return -1); + + SysTryReturn(NID_GRP + , textIndex >= 0 + , -1, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + return __pCompositeText->GetFontSizeF(textIndex); +} + +result +TextObject::SetDefaultFontStyle(int style) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + _FontImpl::GetInstance(*__pDefaultFont)->SetStyle(style); + + return E_SUCCESS; +} + +int +TextObject::GetDefaultFontStyle(void) const +{ + IF_NOT_CONSTRUCTED(return FONT_STYLE_MIN); + + return _FontImpl::GetInstance(*__pDefaultFont)->GetStyle(); +} + +result +TextObject::SetFontStyle(int style, int startTextIndex, int textLength) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + SysTryReturn(NID_GRP + , startTextIndex >= 0 + , E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + __pCompositeText->SetRange(startTextIndex, textLength); + __pCompositeText->SetFontStyle(style); + UpdateChangedInfo(0, 0); + + return E_SUCCESS; +} + +int +TextObject::GetFontStyle(int textIndex) const +{ + IF_NOT_CONSTRUCTED(return -1); + + SysTryReturn(NID_GRP + , textIndex >= 0 + , FONT_STYLE_MIN, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + return __pCompositeText->GetFontStyle(textIndex); +} + +result +TextObject::SetDefaultForegroundColor(const Color& color) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + __defaultForegroundColor = color; + + return E_SUCCESS; +} + +Color +TextObject::GetDefaultForegroundColor(void) const +{ + IF_NOT_CONSTRUCTED(return Color::GetColor(COLOR_ID_BLACK)); + + return __defaultForegroundColor; +} + +result +TextObject::SetForegroundColor(const Color& color, int startTextIndex, int textLength) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + SysTryReturn(NID_GRP, startTextIndex >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + __defaultForegroundColor = color; + + __pCompositeText->SetRange(startTextIndex, textLength); + __pCompositeText->SetForegroundColor(color); + + return E_SUCCESS; +} + +Color +TextObject::GetForegroundColor(int textIndex) const +{ + IF_NOT_CONSTRUCTED(return Color::GetColor(COLOR_ID_BLACK)); + + SysTryReturn(NID_GRP, textIndex >= 0, __defaultForegroundColor, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + return __pCompositeText->GetForegroundColor(textIndex); +} + +result +TextObject::SetBackgroundColor(const Color& color, int startTextIndex, int textLength) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + SysTryReturn(NID_GRP, startTextIndex >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + __defaultBackgroundColor = color; + + __pCompositeText->SetRange(startTextIndex, textLength); + __pCompositeText->SetBackgroundColor(color); + + return E_SUCCESS; +} + +Color +TextObject::GetBackgroundColor(int textIndex) const +{ + IF_NOT_CONSTRUCTED(return Color::GetColor(COLOR_ID_BLACK)); + + SysTryReturn(NID_GRP, textIndex >= 0, __defaultBackgroundColor, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + return __pCompositeText->GetBackgroundColor(textIndex); +} + +result +TextObject::SetOutlineColor(const Color& color, int startTextIndex, int textLength) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + SysTryReturn(NID_GRP, startTextIndex >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + __defaultOutlineColor = color; + + __pCompositeText->SetRange(startTextIndex, textLength); + __pCompositeText->SetOutlineColor(color); + + return E_SUCCESS; +} + +Color +TextObject::GetOutlineColor(int textIndex) const +{ + IF_NOT_CONSTRUCTED(return Color::GetColor(COLOR_ID_BLACK)); + + SysTryReturn(NID_GRP, textIndex >= 0, __defaultOutlineColor, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + return __pCompositeText->GetOutlineColor(textIndex); +} + +result +TextObject::SetBlockColor(const Color& color) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + __pCompositeText->SetBlockColor(color); + + return E_SUCCESS; +} + +Color +TextObject::GetBlockColor(void) const +{ + IF_NOT_CONSTRUCTED(return Color::GetColor(COLOR_ID_BLACK)); + + return __pCompositeText->GetBlockColor(); +} + +result +TextObject::SetDisplayBitmap(const Bitmap* pBitmap, int startTextIndex, int textLength) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + SysTryReturn(NID_GRP, startTextIndex >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + __pCompositeText->SetRange(startTextIndex, textLength); + __pCompositeText->SetDisplayBitmap(pBitmap); + UpdateChangedInfo(0, 0); + + return E_SUCCESS; +} + +const Bitmap* +TextObject::GetDisplayBitmap(int textIndex) const +{ + IF_NOT_CONSTRUCTED(return null); + + return __pCompositeText->GetDisplayBitmap(textIndex); +} + +result +TextObject::SetWrap(TextObjectWrapType wrap) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + if (__wrap == wrap) + { + return E_SUCCESS; + } + + result r = __pCompositeText->SetWrap(wrap); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __wrap = wrap; + UpdateChangedInfo(0, 0); + + return E_SUCCESS; +} + +result +TextObject::InsertElementAt(int textIndex, Bitmap& bitmap, TextElementSourceType sourceType) +{ + 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] Memory allocation failed."); + + int addedTextLength = pImageText->GetTextLength(); + __pCompositeText->InsertElementAt(*pImageText, textIndex); + int startTextIndex = __pCompositeText->GetWorkStart(); + NotifyTextAdded(startTextIndex, addedTextLength); + + return E_SUCCESS; +} + +result +TextObject::AppendElement(Bitmap& bitmap, TextElementSourceType sourceType) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + 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] Memory allocation failed."); + + r = __pCompositeText->AppendElement(*pImageText); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + int startTextIndex = __pCompositeText->GetWorkStart(); + int elementTextLength = pImageText->GetTextLength(); + + NotifyTextAdded(startTextIndex, elementTextLength); + + return E_SUCCESS; +} + +result +TextObject::SetAlternateLookEnabled(bool enable) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + TextElement* pTextElement = null; + + __isAlternateLookEnabled = enable; + int elementCount = __pCompositeText->GetElementCount(); + + for (int i = 0; i < elementCount; i++) + { + pTextElement = __pCompositeText->GetElementAtElementIndex(i); + if (pTextElement != null) + { + pTextElement->SetAlternateLookEnabled(enable); + } + } + + return E_SUCCESS; +} + +result +TextObject::SetAlternativeForegroundColor(const Color& color) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + TextElement* pTextElement = null; + int elementCount = __pCompositeText->GetElementCount(); + + for (int i = 0; i < elementCount; i++) + { + pTextElement = __pCompositeText->GetElementAtElementIndex(i); + SysTryReturn(NID_GRP, pTextElement, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text element."); + + pTextElement->SetAlternativeForegroundColor(color); + } + + return E_SUCCESS; +} + +result +TextObject::ChangeTextOffset(wchar_t* pText, int textIndex, int gap) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + result r = E_SUCCESS; + int elementStartTextIndex = 0; + int elementIndex = 0; + int elementTextLength = 0; + int textIndexFromElementOffset = 0; + + TextElement* pTextElement = __pCompositeText->GetElementAtTextIndex(textIndex, elementStartTextIndex, + elementIndex, elementTextLength, textIndexFromElementOffset); + + SysTryReturn(NID_GRP, pTextElement, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text element."); + + r = __pCompositeText->ChangeTextOffset(pText, elementIndex, gap); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +TextObject::NotifyTextChanged(wchar_t* pText, int textOffset, int textLength, int gap) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + result r = E_SUCCESS; + int startTextIndex = __pCompositeText->GetWorkStart(); + r = __pCompositeText->NotifyTextChanged(pText, textOffset, textLength, gap, __pDefaultFont, + __defaultForegroundColor, __defaultBackgroundColor, __defaultOutlineColor); + + SysTryCatch(NID_GRP, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] Fail to update change information."); + + if (__wrap != TEXT_OBJECT_WRAP_TYPE_NONE) + { + if (gap > 0) + { + NotifyTextAdded(startTextIndex, gap); + if (gap == 1) + { + InputText(startTextIndex); + } + } + else if (gap < 0) + { + NotifyTextDeleted(startTextIndex, -gap); + + if (gap == -1) + { + RemoveText(startTextIndex); + } + } + else + { + UpdateChangedInfo(startTextIndex, 0); + + ChangeText(startTextIndex); + } + } + else + { + UpdateChangedInfo(startTextIndex, 0); + } + + return E_SUCCESS; + +CATCH: + if (__pCompositeText->GetElementCount() == 0) + { + RemoveAll(); + TextSimple* pSimpleText = new (std::nothrow)TextSimple(pText, textLength, TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL); + AppendElement(*pSimpleText); + + SetCursorIndex(0); + UpdateChangedInfo(0, 0); + } + + return E_SUCCESS; +} + +int +TextObject::GetTextIndexFromPosition(int x, int y, bool cursorMode) const +{ + return GetTextIndexFromPosition(_CoordinateSystemUtils::ConvertToFloat(x), _CoordinateSystemUtils::ConvertToFloat(y), cursorMode); +} + +int +TextObject::GetTextIndexFromPosition(float x, float y, bool cursorMode) const +{ + IF_NOT_CONSTRUCTED(return -1); + + int lineCount = __pTextColumn->GetTotalLineCount(); + if (lineCount <= 0) + { + return -1; + } + + if (__wrap == TEXT_OBJECT_WRAP_TYPE_NONE) + { + return GetTextIndexFromPositionInNoneWrap(x, y, !cursorMode); + } + else + { + return GetTextIndexFromPositionInWrap(x, y, !cursorMode); + } +} + +int +TextObject::GetTextIndexFromPosition(float x, float y, int& row, int& column, bool cursorMode) const +{ + IF_NOT_CONSTRUCTED(return -1); + + int lineCount = __pTextColumn->GetTotalLineCount(); + if (lineCount <= 0) + { + return -1; + } + + if (__wrap == TEXT_OBJECT_WRAP_TYPE_NONE) + { + return GetTextIndexFromPositionInNoneWrap(x, y, row, column, !cursorMode); + } + else + { + return GetTextIndexFromPositionInWrap(x, y, row, column, !cursorMode); + } +} + +int +TextObject::GetTextIndexFromPositionAtLine(int lineIndex, int x, bool cursorMode) const +{ + return GetTextIndexFromPositionAtLine(lineIndex, _CoordinateSystemUtils::ConvertToFloat(x), cursorMode); +} + +int +TextObject::GetTextIndexFromPositionAtLine(int lineIndex, float x, bool cursorMode) const +{ + IF_NOT_CONSTRUCTED(return -1); + + SysTryReturn(NID_GRP, lineIndex >= 0, -1, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid. (lineIndex = %d)", lineIndex); + + TextLine* pTextLine = __pTextColumn->GetTextLine(lineIndex); + SysTryReturn(NID_GRP, pTextLine, -1, E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + int lineOffset = pTextLine->GetTextOffset(); + int lineLength = pTextLine->GetTextLength(); + int length = 0; + TextElementType objectType; + FloatRectangle lineBounds = pTextLine->GetBoundsF(); + FloatDimension lineTextSize; + pTextLine->GetRegion(0, lineLength, lineTextSize.width, lineTextSize.height); + + switch (__align & TEXT_ALIGNMASK_HORIZ) + { + case TEXT_OBJECT_ALIGNMENT_LEFT: + break; + + case TEXT_OBJECT_ALIGNMENT_CENTER: + x -= (lineBounds.width - lineTextSize.width) / 2.0f; + break; + + case TEXT_OBJECT_ALIGNMENT_RIGHT: + x -= (lineBounds.width - lineTextSize.width); + break; + } + + x = (x < 0.0f) ? 0.0f : x; + __pCompositeText->SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE); + + int endType = 0; + + if (cursorMode) + { + __pCompositeText->ForwardAnalyzeWithFocusedObjectType(lineOffset, lineLength, x, length, objectType); + } + else + { + endType = __pCompositeText->ForwardAnalyzeInNoneCursorMode(lineOffset, lineLength, x, length); + } + + __pCompositeText->SetWrap(__wrap); + + if (!cursorMode) + { + if (endType == -1) + { + return -1; + } + } + + int index = pTextLine->GetTextOffset() + length; + if (pTextLine->GetEndType() == TEXT_RETBY_LINEFEED && lineLength == length && pTextLine->GetTextOffset() < index) + { + index--; + } + + if (index != GetTextLength() && index == lineOffset + lineLength) + { + TextElement* pTextElement = GetElementAtTextIndex(index-1); + if (pTextElement != null) + { + const TextSimple* pSimpleText = dynamic_cast (pTextElement); + if (pSimpleText != null) + { + const wchar_t* pText = pSimpleText->GetText(); + SysTryReturn(NID_GRP, pText, -1, E_SYSTEM, "[E_SYSTEM] Fail to get text."); + + int i = index - 1 - pSimpleText->GetTextOffset(); + SysTryReturn(NID_GRP, i >= 0 && i < pSimpleText->GetTextLength(), -1, E_OUT_OF_RANGE + , "[E_OUT_OF_RANGE] text index(%d) must greater than 0 and must be less than total string length(%d)",i, pSimpleText->GetTextLength()); + + if (pText[i] == L' ' || pText[i] == TEXT_JAPANESE_SPACE) + { + index--; + } + } + } + } + + SetLastResult(E_SUCCESS); + + return index; +} + +result +TextObject::SetFirstDisplayLineIndexFromTextIndex(int textIndex) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + if (__wrap == TEXT_OBJECT_WRAP_TYPE_NONE) + { + return SetFirstDisplayLineIndexFromTextIndexInNoneWrap(textIndex); + } + else + { + return SetFirstDisplayLineIndexFromTextIndexInWrap(textIndex); + } +} + +result +TextObject::SetCutLinkViewMode(bool enable) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + if (__linkViewModeEnabled == enable) + { + return E_SUCCESS; + } + + __linkViewModeEnabled = enable; + return E_SUCCESS; +} + +int +TextObject::GetCutLinkIndexFromPositionData(int x, int y) const +{ + return GetCutLinkIndexFromPositionData(_CoordinateSystemUtils::ConvertToFloat(x), _CoordinateSystemUtils::ConvertToFloat(y)); +} + +int +TextObject::GetCutLinkIndexFromPositionData(float x, float y) const +{ + IF_NOT_CONSTRUCTED(return -1); + + result r = E_SUCCESS; + + TextBidiHint bidiHint = _GetTextBidiHint(); + _SetTextBidiHint(__bidiHint); + + int lineCount = __pTextColumn->GetTotalLineCount(); + if (lineCount <= 0) + { + return -1; + } + + int textIndex = 0; + + if (__wrap == TEXT_OBJECT_WRAP_TYPE_NONE) + { + textIndex = GetTextIndexFromPositionInNoneWrap(x, y, false); + } + else + { + textIndex = GetTextIndexFromPositionInWrap(x, y, false); + } + + if (textIndex < 0) + { + return -1; + } + + float width = 0.0f; + float height = 0.0f; + FloatPoint absPoint; + FloatPoint relPoint; + + if (__wrap == TEXT_OBJECT_WRAP_TYPE_NONE) + { + r = GetTextPositionInfoInNoneWrapAt(textIndex, width, height, absPoint.x, absPoint.y, relPoint.x, relPoint.y); + } + else + { + r = GetTextPositionInfoInWrapAt(textIndex, width, height, absPoint.x, absPoint.y, relPoint.x, relPoint.y); + } + SysTryReturn(NID_GRP, r == E_SUCCESS, -1, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturn(NID_GRP, y + __rect.y >= relPoint.y, -1, E_SYSTEM, "[E_SYSTEM] Fail to get text position information"); + + int elementIndex = __pCompositeText->GetCutLinkElementIndexAt(textIndex); + + _SetTextBidiHint(bidiHint); + + return elementIndex; +} + +TextElement* +TextObject::GetCutLinkElementAtCutLinkElementIndex(int linkIndex) const +{ + IF_NOT_CONSTRUCTED(return null); + + return __pCompositeText->GetCutLinkElementAtCutLinkElementIndex(linkIndex); +} + +result +TextObject::SetCutLinkColor(LinkType linkType, const Color& color, const Color& colorInSelect) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + SysTryReturn(NID_GRP, LINK_TYPE_NONE < linkType && linkType < LINK_TYPE_MAX, E_INVALID_ARG, E_INVALID_ARG + , "[E_INVALID_ARG] The argument is invalid."); + + switch (linkType) + { + case LINK_TYPE_URL: + __isUrlLinkColorDefined = true; + __linkColor[TEXT_OBJECT_LINK_COLOR_TYPE_URL_NORMAL] = color; + __linkColor[TEXT_OBJECT_LINK_COLOR_TYPE_URL_SELECT] = colorInSelect; + break; + + case LINK_TYPE_EMAIL: + __isEmailLinkColorDefined = true; + __linkColor[TEXT_OBJECT_LINK_COLOR_TYPE_EMAIL_NORMAL] = color; + __linkColor[TEXT_OBJECT_LINK_COLOR_TYPE_EMAIL_SELECT] = colorInSelect; + break; + + case LINK_TYPE_TEL_NUM: + __isPhoneNumberLinkColorDefined = true; + __linkColor[TEXT_OBJECT_LINK_COLOR_TYPE_PHONE_NUMBER_NORMAL] = color; + __linkColor[TEXT_OBJECT_LINK_COLOR_TYPE_PHONE_NUMBER_SELECT] = colorInSelect; + break; + + default: + break; + } + + int totalCutlinkTextCount = __pCompositeText->GetCutLinkElementCount(); + for (int i = 0; i < totalCutlinkTextCount; i++) + { + TextCutLink* pCutlinkText = dynamic_cast < TextCutLink* >(__pCompositeText->GetCutLinkElementAtCutLinkElementIndex(i)); + SysTryReturn(NID_GRP, pCutlinkText, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to convert to cutlink element."); + + if (pCutlinkText->GetCutLinkType() == linkType) + { + pCutlinkText->SetUserColor(color, colorInSelect); + } + } + + return E_SUCCESS; +} + +result +TextObject::ResetCutLinkColor(LinkType linkType) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + SysTryReturn(NID_GRP, LINK_TYPE_NONE < linkType && linkType < LINK_TYPE_MAX, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + switch (linkType) + { + case LINK_TYPE_URL: + __isUrlLinkColorDefined = false; + break; + + case LINK_TYPE_EMAIL: + __isEmailLinkColorDefined = false; + break; + + case LINK_TYPE_TEL_NUM: + __isPhoneNumberLinkColorDefined = false; + break; + + default: + break; + } + + int totalCutlinkTextCount = __pCompositeText->GetCutLinkElementCount(); + for (int i = 0; i < totalCutlinkTextCount; i++) + { + TextCutLink* pCutlinkText = dynamic_cast < TextCutLink* >(__pCompositeText->GetCutLinkElementAtCutLinkElementIndex(i)); + SysTryReturn(NID_GRP, pCutlinkText, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to convert to cutlink element."); + + if (pCutlinkText->GetCutLinkType() == linkType) + { + pCutlinkText->ResetUserColor(); + } + } + + return E_SUCCESS; +} + +result +TextObject::GetCutLinkBounds(int cutLinkIndex, Point& startPoint, Point& endPoint) const +{ + FloatPoint startPointF = _CoordinateSystemUtils::ConvertToFloat(startPoint); + FloatPoint endPointF = _CoordinateSystemUtils::ConvertToFloat(endPoint); + + result r = GetCutLinkBounds(cutLinkIndex, startPointF, endPointF); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + startPoint = _CoordinateSystemUtils::ConvertToInteger(startPointF); + endPoint = _CoordinateSystemUtils::ConvertToInteger(endPointF); + + return E_SUCCESS; +} + +result +TextObject::GetCutLinkBounds(int cutLinkIndex, FloatPoint& startPoint, FloatPoint& endPoint) const +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + result r = E_SUCCESS; + int textIndex = 0; + int textLength = 0; + float width = 0.0f; + float heigth = 0.0f; + FloatPoint tempPoint; + + r = __pCompositeText->GetCutLinkObjectInfo(cutLinkIndex, textIndex, textLength); + SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + if (__wrap == TEXT_OBJECT_WRAP_TYPE_NONE) + { + r = GetTextPositionInfoInNoneWrapAt(textIndex, width, heigth, tempPoint.x, tempPoint.y, startPoint.x, startPoint.y); + SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GetTextPositionInfoInNoneWrapAt(textIndex + textLength - 1, width, heigth, tempPoint.x, tempPoint.y, endPoint.x, endPoint.y); + SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + r = GetTextPositionInfoInWrapAt(textIndex, width, heigth, tempPoint.x, tempPoint.y, startPoint.x, startPoint.y); + SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GetTextPositionInfoInWrapAt(textIndex + textLength - 1, width, heigth, tempPoint.x, tempPoint.y, endPoint.x, endPoint.y); + SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + endPoint.x = endPoint.x + width; + endPoint.y = endPoint.y + heigth; + + return E_SUCCESS; + +CATCH: + startPoint.x = -1; + startPoint.y = -1; + endPoint.x = -1; + endPoint.y = -1; + + return r; +} + +result +TextObject::GetTextPositionInfoAt(int textIndex, int& width, int& height, int& absX, int& absY, int& logicalX, int& logicalY) const +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + float widthF = _CoordinateSystemUtils::ConvertToFloat(width); + float heightF = _CoordinateSystemUtils::ConvertToFloat(height); + float absXF = _CoordinateSystemUtils::ConvertToFloat(absX); + float absYF = _CoordinateSystemUtils::ConvertToFloat(absY); + float logicalXF = _CoordinateSystemUtils::ConvertToFloat(logicalX); + float logicalYF = _CoordinateSystemUtils::ConvertToFloat(logicalY); + + result r = GetTextPositionInfoAt(textIndex, widthF, heightF, absXF, absYF, logicalXF, logicalYF); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + width = _CoordinateSystemUtils::ConvertToInteger(widthF); + height = _CoordinateSystemUtils::ConvertToInteger(heightF); + absX = _CoordinateSystemUtils::ConvertToInteger(absXF); + absY = _CoordinateSystemUtils::ConvertToInteger(absYF); + logicalX = _CoordinateSystemUtils::ConvertToInteger(logicalXF); + logicalY = _CoordinateSystemUtils::ConvertToInteger(logicalYF); + + return E_SUCCESS; +} + +result +TextObject::GetTextPositionInfoAt(int textIndex, float& width, float& height, float& absX, float& absY, float& logicalX, float& logicalY) const +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + result r = E_SUCCESS; + TextBidiHint bidiHint = _GetTextBidiHint(); + _SetTextBidiHint(__bidiHint); + + int lineCount = __pTextColumn->GetTotalLineCount(); + + if (lineCount < 1) + { + _FontImpl* pFont = _FontImpl::GetInstance(*__pDefaultFont); + SysTryReturn(NID_GRP, pFont, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get native font instance."); + + float maxHeight = TextUtility::GetFontMaxHeightF(pFont); + float posX = 0.0f; + float posY = 0.0f; + absX = 0.0f; + absY = 0.0f; + + if (__wrap == TEXT_OBJECT_WRAP_TYPE_NONE) + { + switch (__align & TEXT_ALIGNMASK_VERT) + { + case TEXT_OBJECT_ALIGNMENT_TOP: + break; + + case TEXT_OBJECT_ALIGNMENT_MIDDLE: + posY += (__rect.height - maxHeight) / 2.0f; + break; + + case TEXT_OBJECT_ALIGNMENT_BOTTOM: + posY += (__rect.height - maxHeight); + break; + } + logicalY = __rect.y + posY; + + switch (__align & TEXT_ALIGNMASK_HORIZ) + { + case TEXT_OBJECT_ALIGNMENT_LEFT: + break; + + case TEXT_OBJECT_ALIGNMENT_CENTER: + posX += __rect.width / 2.0f; + break; + + case TEXT_OBJECT_ALIGNMENT_RIGHT: + posX += __rect.width; + break; + } + logicalX = __rect.x + posX; + } + else + { + float lineHeight = maxHeight + __pCompositeText->GetLineSpaceF(); + TextObjectAlignment alignment = __pCompositeText->GetElementVerticalAlignment(); + switch (alignment & TEXT_ALIGNMASK_VERT) + { + case TEXT_OBJECT_ALIGNMENT_TOP: + // fall through + default: + break; + + case TEXT_OBJECT_ALIGNMENT_MIDDLE: + posY += (lineHeight - maxHeight) / 2.0f; + break; + + case TEXT_OBJECT_ALIGNMENT_BOTTOM: + posY += lineHeight - maxHeight; + break; + } + + switch (__align & TEXT_ALIGNMASK_HORIZ) + { + case TEXT_OBJECT_ALIGNMENT_LEFT: + break; + + case TEXT_OBJECT_ALIGNMENT_CENTER: + posX += __rect.width / 2.0f; + break; + + case TEXT_OBJECT_ALIGNMENT_RIGHT: + posX += __rect.width; + break; + } + + logicalX = posX + __rect.x; + logicalY = posY + __rect.y; + } + + width = 0.0f; + height = maxHeight; + absX = posX; + absY = posY; + } + else + { + r = (__wrap == TEXT_OBJECT_WRAP_TYPE_NONE) ? GetTextPositionInfoInNoneWrapAt(textIndex, width, height, absX, absY, logicalX, logicalY) + : GetTextPositionInfoInWrapAt(textIndex, width, height, absX, absY, logicalX, logicalY); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + _SetTextBidiHint(bidiHint); + + return E_SUCCESS; +} + +result +TextObject::GetTextPositionInfoAt(int row, int column, float& width, float& height, float& absX, float& absY, float& logicalX, float& logicalY) const +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + result r = E_SUCCESS; + TextBidiHint bidiHint = _GetTextBidiHint(); + _SetTextBidiHint(__bidiHint); + + int lineCount = __pTextColumn->GetTotalLineCount(); + + if (lineCount < 1) + { + _FontImpl* pFont = _FontImpl::GetInstance(*__pDefaultFont); + SysTryReturn(NID_GRP, pFont, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get native font instance."); + + float maxHeight = TextUtility::GetFontMaxHeightF(pFont); + float posX = 0.0f; + float posY = 0.0f; + absX = 0.0f; + absY = 0.0f; + + if (__wrap == TEXT_OBJECT_WRAP_TYPE_NONE) + { + switch (__align & TEXT_ALIGNMASK_VERT) + { + case TEXT_OBJECT_ALIGNMENT_TOP: + break; + + case TEXT_OBJECT_ALIGNMENT_MIDDLE: + posY += (__rect.height - maxHeight) / 2.0f; + break; + + case TEXT_OBJECT_ALIGNMENT_BOTTOM: + posY += (__rect.height - maxHeight); + break; + } + logicalY = __rect.y + posY; + + switch (__align & TEXT_ALIGNMASK_HORIZ) + { + case TEXT_OBJECT_ALIGNMENT_LEFT: + break; + + case TEXT_OBJECT_ALIGNMENT_CENTER: + posX += __rect.width / 2.0f; + break; + + case TEXT_OBJECT_ALIGNMENT_RIGHT: + posX += __rect.width; + break; + } + logicalX = __rect.x + posX; + } + else + { + float lineHeight = maxHeight + __pCompositeText->GetLineSpaceF(); + TextObjectAlignment alignment = __pCompositeText->GetElementVerticalAlignment(); + switch (alignment & TEXT_ALIGNMASK_VERT) + { + case TEXT_OBJECT_ALIGNMENT_TOP: + // fall through + default: + break; + + case TEXT_OBJECT_ALIGNMENT_MIDDLE: + posY += (lineHeight - maxHeight) / 2.0f; + break; + + case TEXT_OBJECT_ALIGNMENT_BOTTOM: + posY += lineHeight - maxHeight; + break; + } + + switch (__align & TEXT_ALIGNMASK_HORIZ) + { + case TEXT_OBJECT_ALIGNMENT_LEFT: + break; + + case TEXT_OBJECT_ALIGNMENT_CENTER: + posX += __rect.width / 2.0f; + break; + + case TEXT_OBJECT_ALIGNMENT_RIGHT: + posX += __rect.width; + break; + } + + logicalX = posX + __rect.x; + logicalY = posY + __rect.y; + } + + width = 0.0f; + height = maxHeight; + absX = posX; + absY = posY; + } + else + { + r = (__wrap == TEXT_OBJECT_WRAP_TYPE_NONE) ? GetTextPositionInfoInNoneWrapAt(row, column, width, height, absX, absY, logicalX, logicalY) + : GetTextPositionInfoInWrapAt(row, column, width, height, absX, absY, logicalX, logicalY); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + _SetTextBidiHint(bidiHint); + + return E_SUCCESS; +} + +result +TextObject::GetBlockTextPositionInfoAt(int textIndex, int& width, int& height, int& absX, int& absY, int& logicalX, int& logicalY) const +{ + float widthF = _CoordinateSystemUtils::ConvertToFloat(width); + float heightF = _CoordinateSystemUtils::ConvertToFloat(height); + float absXF = _CoordinateSystemUtils::ConvertToFloat(absX); + float absYF = _CoordinateSystemUtils::ConvertToFloat(absY); + float logicalXF = _CoordinateSystemUtils::ConvertToFloat(logicalX); + float logicalYF = _CoordinateSystemUtils::ConvertToFloat(logicalY); + + result r = GetBlockTextPositionInfoAt(textIndex, widthF, heightF, absXF, absYF, logicalXF, logicalYF); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + width = _CoordinateSystemUtils::ConvertToInteger(widthF); + height = _CoordinateSystemUtils::ConvertToInteger(heightF); + absX = _CoordinateSystemUtils::ConvertToInteger(absXF); + absY = _CoordinateSystemUtils::ConvertToInteger(absYF); + logicalX = _CoordinateSystemUtils::ConvertToInteger(logicalXF); + logicalY = _CoordinateSystemUtils::ConvertToInteger(logicalYF); + + return E_SUCCESS; +} + +result +TextObject::GetBlockTextPositionInfoAt(int textIndex, float& width, float& height, float& absX, float& absY, float& logicalX, float& logicalY) const +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + result r = E_SUCCESS; + TextBidiHint bidiHint = _GetTextBidiHint(); + _SetTextBidiHint(__bidiHint); + + int lineCount = __pTextColumn->GetTotalLineCount(); + + if (lineCount < 1) + { + _FontImpl* pFont =_FontImpl::GetInstance(*__pDefaultFont); + SysTryReturn(NID_GRP, pFont, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get native font instance."); + + float maxHeight = TextUtility::GetFontMaxHeightF(pFont); + float posX = 0.0f; + float posY = 0.0f; + absX = 0.0f; + absY = 0.0f; + + if (__wrap == TEXT_OBJECT_WRAP_TYPE_NONE) + { + switch (__align & TEXT_ALIGNMASK_VERT) + { + case TEXT_OBJECT_ALIGNMENT_TOP: + break; + + case TEXT_OBJECT_ALIGNMENT_MIDDLE: + posY += (__rect.height - maxHeight) / 2.0f; + break; + + case TEXT_OBJECT_ALIGNMENT_BOTTOM: + posY += (__rect.height - maxHeight); + break; + } + logicalY = __rect.y + posY; + + switch (__align & TEXT_ALIGNMASK_HORIZ) + { + case TEXT_OBJECT_ALIGNMENT_LEFT: + break; + + case TEXT_OBJECT_ALIGNMENT_CENTER: + posX += __rect.width / 2.0f; + break; + + case TEXT_OBJECT_ALIGNMENT_RIGHT: + posX += __rect.width; + break; + } + logicalX = __rect.x + posX; + } + else + { + float lineHeight = maxHeight + __pCompositeText->GetLineSpace(); + TextObjectAlignment alignment = __pCompositeText->GetElementVerticalAlignment(); + switch (alignment & TEXT_ALIGNMASK_VERT) + { + case TEXT_OBJECT_ALIGNMENT_TOP: + // fall through + default: + break; + + case TEXT_OBJECT_ALIGNMENT_MIDDLE: + posY += (lineHeight - maxHeight) / 2.0f; + break; + + case TEXT_OBJECT_ALIGNMENT_BOTTOM: + posY += lineHeight - maxHeight; + break; + } + + logicalX = __rect.x; + logicalY = posY + __rect.y; + } + + width = 0.0f; + height = maxHeight; + absX = posX; + absY = posY; + } + else + { + r = (__wrap == TEXT_OBJECT_WRAP_TYPE_NONE) ? GetTextPositionInfoInNoneWrapAt(textIndex, width, height, absX, absY, logicalX, logicalY) + : GetBlockTextPositionInfoInWrapAt(textIndex, width, height, absX, absY, logicalX, logicalY); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + _SetTextBidiHint(bidiHint); + + return E_SUCCESS; +} + +result +TextObject::SetTextObjectEllipsisType(TextObjectEllipsisType type) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + SysTryReturn(NID_GRP, TEXT_OBJECT_ELLIPSIS_TYPE_INVALID < type && type < TEXT_OBJECT_ELLIPSIS_TYPE_MAX + , E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + __textObjectEllipsisType = type; + __pCompositeText->SetTextObjectEllipsisType(type); + + return E_SUCCESS; +} + +result +TextObject::NotifyTextAdded(int textIndex, int textLength) +{ + result r = E_SUCCESS; + + r = __pTextColumn->SetChangeAction(TextColumn::TEXT_CHANGE_INSERT, textIndex, textLength); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __isChanged = true; + + return E_SUCCESS; +} + +result +TextObject::NotifyTextDeleted(int textIndex, int textLength) +{ + result r = E_SUCCESS; + + r = __pTextColumn->SetChangeAction(TextColumn::TEXT_CHANGE_REMOVE, textIndex, textLength); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __isChanged = true; + + return E_SUCCESS; +} + +result +TextObject::DrawByLine(_CanvasImpl& canvasImpl, const Rectangle& displayRect) +{ + return DrawByLine(canvasImpl, _CoordinateSystemUtils::ConvertToFloat(displayRect)); +} + +result +TextObject::DrawByLine(_CanvasImpl& canvasImpl, const FloatRectangle& displayRect) +{ + FloatRectangle targetBounds = displayRect; + + return __pTextColumn->Draw(canvasImpl, targetBounds, 0, __pTextColumn->GetTextLength(), __align, __action); +} + +int +TextObject::GetTextIndexFromPositionInWrap(int x, int y, bool cursorMode) const +{ + return GetTextIndexFromPositionInWrap(_CoordinateSystemUtils::ConvertToFloat(x), _CoordinateSystemUtils::ConvertToFloat(y), cursorMode); +} + +int +TextObject::GetTextIndexFromPositionInWrap(float x, float y, bool cursorMode) const +{ + TextLine* pTextLine = null; + FloatRectangle lineBounds; + int firstDisplayLineIndex = __pTextColumn->GetFirstDisplayLineIndex(); + float firstDisplayPositionY = __pTextColumn->GetFirstDisplayPositionYF(); + int lineCount = __pTextColumn->GetTotalLineCount(); + int lineIndex = 0; + float totalHeight = __pTextColumn->GetTotalHeightF(); + + TextBidiHint bidiHint = _GetTextBidiHint(); + _SetTextBidiHint(__bidiHint); + + switch (__align & TEXT_ALIGNMASK_VERT) + { + case TEXT_OBJECT_ALIGNMENT_TOP: + break; + + case TEXT_OBJECT_ALIGNMENT_MIDDLE: + y -= (__rect.height - totalHeight) / 2.0f; + break; + + case TEXT_OBJECT_ALIGNMENT_BOTTOM: + y -= (__rect.height - totalHeight); + break; + } + + for (lineIndex = firstDisplayLineIndex; lineIndex < lineCount; lineIndex++) + { + pTextLine = __pTextColumn->GetTextLine(lineIndex); + SysTryReturn(NID_GRP, pTextLine, -1, E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + lineBounds = pTextLine->GetBoundsF(); + + if (lineIndex == firstDisplayLineIndex) + { + if (y < lineBounds.y - firstDisplayPositionY) + { + return -1; + } + } + + if ((lineBounds.y - firstDisplayPositionY <= y) && (y < lineBounds.y + lineBounds.height - firstDisplayPositionY)) + { + break; + } + + if (lineIndex == lineCount - 1) + { + if (cursorMode) + { + return pTextLine->GetTextLength() + pTextLine->GetTextOffset(); + } + else + { + return -1; + } + } + } + + SysTryReturn(NID_GRP, pTextLine, -1, E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + int lineLength = pTextLine->GetTextLength(); + Dimension lineTextSize; + pTextLine->GetRegion(0, lineLength, lineTextSize.width, lineTextSize.height); + + switch (__align & TEXT_ALIGNMASK_HORIZ) + { + case TEXT_OBJECT_ALIGNMENT_LEFT: + break; + + case TEXT_OBJECT_ALIGNMENT_CENTER: + x -= (lineBounds.width - lineTextSize.width) / 2.0f; + break; + + case TEXT_OBJECT_ALIGNMENT_RIGHT: + x -= (lineBounds.width - lineTextSize.width); + break; + } + + int index = pTextLine->GetTextIndexFromPosition(x); + + _SetTextBidiHint(bidiHint); + + SetLastResult(E_SUCCESS); + + return index; +} + +int +TextObject::GetTextIndexFromPositionInWrap(float x, float y, int& row, int& column, bool cursorMode) const +{ + TextLine* pTextLine = null; + FloatRectangle lineBounds; + int firstDisplayLineIndex = __pTextColumn->GetFirstDisplayLineIndex(); + float firstDisplayPositionY = __pTextColumn->GetFirstDisplayPositionYF(); + int lineCount = __pTextColumn->GetTotalLineCount(); + int lineIndex = 0; + float totalHeight = __pTextColumn->GetTotalHeightF(); + + TextBidiHint bidiHint = _GetTextBidiHint(); + _SetTextBidiHint(__bidiHint); + + switch (__align & TEXT_ALIGNMASK_VERT) + { + case TEXT_OBJECT_ALIGNMENT_TOP: + break; + + case TEXT_OBJECT_ALIGNMENT_MIDDLE: + y -= (__rect.height - totalHeight) / 2.0f; + break; + + case TEXT_OBJECT_ALIGNMENT_BOTTOM: + y -= (__rect.height - totalHeight); + break; + } + + for (lineIndex = firstDisplayLineIndex; lineIndex < lineCount; lineIndex++) + { + pTextLine = __pTextColumn->GetTextLine(lineIndex); + SysTryReturn(NID_GRP, pTextLine, -1, E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + lineBounds = pTextLine->GetBoundsF(); + + if (lineIndex == firstDisplayLineIndex) + { + if (y < lineBounds.y - firstDisplayPositionY) + { + return -1; + } + } + + if ((lineBounds.y - firstDisplayPositionY <= y) && (y < lineBounds.y + lineBounds.height - firstDisplayPositionY)) + { + break; + } + + if (lineIndex == lineCount - 1) + { + if (cursorMode) + { + return pTextLine->GetTextLength() + pTextLine->GetTextOffset(); + } + else + { + return -1; + } + } + } + + SysTryReturn(NID_GRP, pTextLine, -1, E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + int lineLength = pTextLine->GetTextLength(); + Dimension lineTextSize; + pTextLine->GetRegion(0, lineLength, lineTextSize.width, lineTextSize.height); + + switch (__align & TEXT_ALIGNMASK_HORIZ) + { + case TEXT_OBJECT_ALIGNMENT_LEFT: + break; + + case TEXT_OBJECT_ALIGNMENT_CENTER: + x -= (lineBounds.width - lineTextSize.width) / 2.0f; + break; + + case TEXT_OBJECT_ALIGNMENT_RIGHT: + x -= (lineBounds.width - lineTextSize.width); + break; + } + + if (x < 0.0f) + { + x = 0.0f; + } + + int index = pTextLine->GetTextIndexFromPosition(x); + row = pTextLine->GetIndex(); + column = index - pTextLine->GetTextOffset(); + + int endType = pTextLine->GetEndType(); + if (endType == TEXT_RETBY_LINEFEED && column == lineLength) + { + index -= 1; + column -= 1; + } + + _SetTextBidiHint(bidiHint); + + SetLastResult(E_SUCCESS); + + return index; +} + +int +TextObject::GetTextIndexFromPositionInNoneWrap(int x, int y, bool cursorMode) const +{ + return GetTextIndexFromPositionInNoneWrap(_CoordinateSystemUtils::ConvertToFloat(x), _CoordinateSystemUtils::ConvertToFloat(y), cursorMode); +} + +int +TextObject::GetTextIndexFromPositionInNoneWrap(float x, float y, bool cursorMode) const +{ + FloatDimension lineTextSize; + FloatRectangle lineBounds; + int lineOffset = 0; + int lineLength = 0; + float firstDisplayPositionX = __pTextColumn->GetFirstDisplayPositionX(); + TextLine* pTextLine = null; + + pTextLine = __pTextColumn->GetTextLine(0); + SysTryReturn(NID_GRP, pTextLine, -1, E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + TextBidiHint bidiHint = _GetTextBidiHint(); + _SetTextBidiHint(__bidiHint); + + lineOffset = pTextLine->GetTextOffset(); + lineLength = pTextLine->GetTextLength(); + lineBounds = pTextLine->GetBoundsF(); + pTextLine->GetRegion(0, lineLength, lineTextSize.width, lineTextSize.height); + + x += firstDisplayPositionX; + + switch (__align & TEXT_ALIGNMASK_HORIZ) + { + case TEXT_OBJECT_ALIGNMENT_LEFT: + break; + + case TEXT_OBJECT_ALIGNMENT_CENTER: + x -= (lineBounds.width - lineTextSize.width) / 2.0f; + break; + + case TEXT_OBJECT_ALIGNMENT_RIGHT: + x -= (lineBounds.width - lineTextSize.width); + break; + } + + switch (__align & TEXT_ALIGNMASK_VERT) + { + case TEXT_OBJECT_ALIGNMENT_TOP: + break; + + case TEXT_OBJECT_ALIGNMENT_MIDDLE: + y -= (__rect.height - lineTextSize.height) / 2.0f; + break; + + case TEXT_OBJECT_ALIGNMENT_BOTTOM: + y -= (__rect.height - lineTextSize.height); + break; + } + + if (x < 0.0f) + { + x = 0.0f; + } + + int index = pTextLine->GetTextIndexFromPosition(x); + + _SetTextBidiHint(bidiHint); + + SetLastResult(E_SUCCESS); + return index; +} + +int +TextObject::GetTextIndexFromPositionInNoneWrap(float x, float y, int& row, int& column, bool cursorMode) const +{ + FloatDimension lineTextSize; + FloatRectangle lineBounds; + int lineOffset = 0; + int lineLength = 0; + float firstDisplayPositionX = __pTextColumn->GetFirstDisplayPositionX(); + TextLine* pTextLine = null; + + pTextLine = __pTextColumn->GetTextLine(0); + SysTryReturn(NID_GRP, pTextLine, -1, E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + TextBidiHint bidiHint = _GetTextBidiHint(); + _SetTextBidiHint(__bidiHint); + + lineOffset = pTextLine->GetTextOffset(); + lineLength = pTextLine->GetTextLength(); + lineBounds = pTextLine->GetBoundsF(); + pTextLine->GetRegion(0, lineLength, lineTextSize.width, lineTextSize.height); + + x += firstDisplayPositionX; + + switch (__align & TEXT_ALIGNMASK_HORIZ) + { + case TEXT_OBJECT_ALIGNMENT_LEFT: + break; + + case TEXT_OBJECT_ALIGNMENT_CENTER: + x -= (lineBounds.width - lineTextSize.width) / 2.0f; + break; + + case TEXT_OBJECT_ALIGNMENT_RIGHT: + x -= (lineBounds.width - lineTextSize.width); + break; + } + + switch (__align & TEXT_ALIGNMASK_VERT) + { + case TEXT_OBJECT_ALIGNMENT_TOP: + break; + + case TEXT_OBJECT_ALIGNMENT_MIDDLE: + y -= (__rect.height - lineTextSize.height) / 2.0f; + break; + + case TEXT_OBJECT_ALIGNMENT_BOTTOM: + y -= (__rect.height - lineTextSize.height); + break; + } + + if (x < 0.0f) + { + x = 0.0f; + } + + int index = pTextLine->GetTextIndexFromPosition(x); + row = 0; + column = index; + + _SetTextBidiHint(bidiHint); + + SetLastResult(E_SUCCESS); + return index; +} + +result +TextObject::SetFirstDisplayLineIndexFromTextIndexInWrap(int textIndex) +{ + result r = E_SUCCESS; + FloatRectangle lineBounds; + float firstDisplayPositionY = 0.0f; + int currentTextIndex = textIndex; + int firstDisplayLineIndex = 0; + int lineIndex = 0; + int lineCount = 0; + float remainingHeight = 0.0f; + TextLine* pTextLine = null; + bool isChanged = false; + + lineCount = __pTextColumn->GetTotalLineCount(); + lineIndex = __pTextColumn->GetLineIndexAtTextIndex(currentTextIndex); + firstDisplayLineIndex = __pTextColumn->GetFirstDisplayLineIndex(); + + if (lineIndex == -1 && 0 < currentTextIndex && currentTextIndex == __pCompositeText->GetTextLength()) + { + currentTextIndex--; + lineIndex = __pTextColumn->GetLineIndexAtTextIndex(currentTextIndex); + } + + pTextLine = __pTextColumn->GetTextLine(lineIndex); + SysTryReturn(NID_GRP, pTextLine, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + lineBounds = pTextLine->GetBoundsF(); + + if (firstDisplayLineIndex < lineIndex) + { + TextLine* pTextLine = null; + int currentLineIndex = 0; + int displayLineCount = 0; + + currentLineIndex = firstDisplayLineIndex; + pTextLine = __pTextColumn->GetTextLine(currentLineIndex); + SysTryReturn(NID_GRP, pTextLine, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + remainingHeight = __rect.height; + + while ((remainingHeight != 0.0f) && firstDisplayLineIndex < lineCount) + { + if (remainingHeight < 0.0f) + { + break; + } + + lineBounds = pTextLine->GetBoundsF(); + + remainingHeight -= lineBounds.height; + displayLineCount++; + currentLineIndex++; + + pTextLine = __pTextColumn->GetTextLine(currentLineIndex); + if (pTextLine == null) + { + break; + } + } + + if (lineIndex < firstDisplayLineIndex + displayLineCount) + { + if (0.0f < remainingHeight && 0 < firstDisplayLineIndex) + { + pTextLine = __pTextColumn->GetTextLine(firstDisplayLineIndex - 1); + SysTryReturn(NID_GRP, pTextLine, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + while (remainingHeight && pTextLine) + { + lineBounds = pTextLine->GetBoundsF(); + remainingHeight -= lineBounds.height; + + if (remainingHeight < 0.0f) + { + firstDisplayPositionY = lineBounds.y + remainingHeight; + displayLineCount++; + firstDisplayLineIndex--; + break; + } + else + { + firstDisplayPositionY = lineBounds.y; + } + + displayLineCount++; + firstDisplayLineIndex--; + + pTextLine = __pTextColumn->GetTextLine(firstDisplayLineIndex - 1); + } + + isChanged = true; + } + else if (remainingHeight < 0.0f && (lineIndex == firstDisplayLineIndex + displayLineCount - 1)) + { + pTextLine = __pTextColumn->GetTextLine(lineIndex); + SysTryReturn(NID_GRP, pTextLine, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + lineBounds = pTextLine->GetBoundsF(); + remainingHeight = __rect.height; + + firstDisplayLineIndex = lineIndex; + firstDisplayPositionY = lineBounds.y; + remainingHeight -= lineBounds.height; + + int currentLineIndex = lineIndex - 1; + pTextLine = __pTextColumn->GetTextLine(currentLineIndex); + + while ((pTextLine != null) && 0 < firstDisplayLineIndex && 0.0f < remainingHeight) + { + lineBounds = pTextLine->GetBoundsF(); + + if (remainingHeight < lineBounds.height) + { + firstDisplayLineIndex--; + firstDisplayPositionY = lineBounds.y + (lineBounds.height - remainingHeight); + break; + } + else + { + remainingHeight -= lineBounds.height; + firstDisplayLineIndex--; + firstDisplayPositionY = lineBounds.y; + currentLineIndex--; + pTextLine = __pTextColumn->GetTextLine(currentLineIndex); + } + } + isChanged = true; + } + } + else + { + pTextLine = __pTextColumn->GetTextLine(lineIndex); + SysTryReturn(NID_GRP, pTextLine, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + lineBounds = pTextLine->GetBoundsF(); + + remainingHeight = __rect.height; + + firstDisplayLineIndex = lineIndex; + firstDisplayPositionY = lineBounds.y; + remainingHeight -= lineBounds.height; + + int currentLineIndex = lineIndex - 1; + pTextLine = __pTextColumn->GetTextLine(currentLineIndex); + + while (pTextLine && 0 < firstDisplayLineIndex && 0.0f < remainingHeight) + { + lineBounds = pTextLine->GetBoundsF(); + + if (remainingHeight < lineBounds.height) + { + firstDisplayLineIndex--; + firstDisplayPositionY = lineBounds.y + (lineBounds.height - remainingHeight); + break; + } + else + { + remainingHeight -= lineBounds.height; + firstDisplayLineIndex--; + firstDisplayPositionY = lineBounds.y; + currentLineIndex--; + pTextLine = __pTextColumn->GetTextLine(currentLineIndex); + } + } + isChanged = true; + } + } + else + { + lineBounds = pTextLine->GetBoundsF(); + firstDisplayLineIndex = lineIndex; + firstDisplayPositionY = lineBounds.y; + isChanged = true; + } + + if (isChanged == true) + { + __pTextColumn->SetFirstDisplayLineIndex(firstDisplayLineIndex); + __pTextColumn->SetFirstDisplayPositionY(firstDisplayPositionY); + } + + return E_SUCCESS; +} + +result +TextObject::SetFirstDisplayLineIndexFromTextIndexInNoneWrap(int textIndex) +{ + int lineOffset = 0; + int lineEndIndex = 0; + int lineLength = 0; + float firstDisplayPositionX = __pTextColumn->GetFirstDisplayPositionX(); + FloatRectangle lineBounds; + FloatDimension lineTextSize; + + 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); + if (!pTextLine) + { + SysLog(NID_GRP, "Fail to get text line"); + return E_SYSTEM; + } + + lineOffset = pTextLine->GetTextOffset(); + lineLength = pTextLine->GetTextLength(); + lineEndIndex = pTextLine->GetTextOffset() + pTextLine->GetTextLength(); + lineBounds = pTextLine->GetBoundsF(); + + pTextLine->GetRegion(0, lineLength, lineTextSize.width, lineTextSize.height); + + currentLinetextSizeRect = pTextLine->GetTextExtentF(textIndex, 1); + + if (0 < textIndex) + { + prevTextSizeRect = pTextLine->GetTextExtentF(textIndex - 1, 1); + } + + if (textIndex == 0) + { + SetFirstDisplayPositionX(lineBounds.x); + + pTextLine->SetBounds(lineBounds); + pTextLine->SetRegion(lineTextSize.width, lineTextSize.height); + pTextLine->SetTextLength(lineLength); + } + else if (prevTextSizeRect.x < firstDisplayPositionX) + { + SetFirstDisplayPositionX(prevTextSizeRect.x); + + 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); + } + else if (lineBounds.width < firstDisplayPositionX + __rect.width && lineLength <= textIndex) // 글 꽉 채운 후 한글자씩 지울 때 + { + 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); + } + else if (lineBounds.width < firstDisplayPositionX + __rect.width) // 글 꽉 채운 후에, 중간에 글자를 지울 때, + { + FloatRectangle tempTextSize; + + float gap = __rect.width - (lineBounds.width - currentLinetextSizeRect.x); + tempTextSize = pTextLine->GetTextExtentF(textIndex, 1); + + SetFirstDisplayPositionX(tempTextSize.x - gap); + + pTextLine->SetBounds(lineBounds); + pTextLine->SetRegion(lineTextSize.width, lineTextSize.height); + pTextLine->SetTextOffset(0); + pTextLine->SetTextLength(lineLength); + } + + __pTextColumn->SetFirstDisplayLineIndex(0); + __pTextColumn->SetFirstDisplayPositionY(0.0f); + + return E_SUCCESS; +} + +result +TextObject::GetTextPositionInfoInWrapAt(int textIndex, int& width, int& height, int& absX, int& absY, + int& logicalX, int& logicalY) const +{ + float widthF = _CoordinateSystemUtils::ConvertToFloat(width); + float heightF = _CoordinateSystemUtils::ConvertToFloat(height); + float absXF = _CoordinateSystemUtils::ConvertToFloat(absX); + float absYF = _CoordinateSystemUtils::ConvertToFloat(absY); + float logicalXF = _CoordinateSystemUtils::ConvertToFloat(logicalX); + float logicalYF = _CoordinateSystemUtils::ConvertToFloat(logicalY); + + result r = GetTextPositionInfoInWrapAt(textIndex, widthF, heightF, absXF, absYF, logicalXF, logicalYF); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + width = _CoordinateSystemUtils::ConvertToInteger(widthF); + height = _CoordinateSystemUtils::ConvertToInteger(heightF); + absX = _CoordinateSystemUtils::ConvertToInteger(absXF); + absY = _CoordinateSystemUtils::ConvertToInteger(absYF); + logicalX = _CoordinateSystemUtils::ConvertToInteger(logicalXF); + logicalY = _CoordinateSystemUtils::ConvertToInteger(logicalYF); + + return E_SUCCESS; +} + +result +TextObject::GetTextPositionInfoInWrapAt(int textIndex, float& width, float& height, float& absX, float& absY, + float& logicalX, float& logicalY) const +{ + TextLine* pTextLine = null; + FloatRectangle lineBounds; + float firstDisplayPositionY = __pTextColumn->GetFirstDisplayPositionYF(); + int lineCount = __pTextColumn->GetTotalLineCount(); + int lineIndex = 0; + int lineOffset = 0; + int lineLength = 0; + int textIndexFromLineOffset = 0; + float lineY = 0.0f; + float posX = 0.0f; + float posY = 0.0f; + + _FontImpl* pFont = _FontImpl::GetInstance(*__pDefaultFont); + SysTryReturn(NID_GRP, pFont, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get native font instance."); + + for (lineIndex = 0; lineIndex < lineCount; lineIndex++) + { + pTextLine = __pTextColumn->GetTextLine(lineIndex); + SysTryReturn(NID_GRP, pTextLine, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + lineBounds = pTextLine->GetBoundsF(); + lineOffset = pTextLine->GetTextOffset(); + lineLength = pTextLine->GetTextLength(); + + if (lineOffset <= textIndex && textIndex < lineOffset + lineLength) + { + break; + } + + if (lineIndex + 1 < lineCount) + { + lineY += lineBounds.height; + } + } + + SysTryReturn(NID_GRP, pTextLine, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + if (lineIndex == lineCount) + { + textIndexFromLineOffset = lineLength; + } + else + { + textIndexFromLineOffset = textIndex - lineOffset; + } + + FloatDimension lineTextSize; + pTextLine->GetRegion(0, lineLength, lineTextSize.width, lineTextSize.height); + + if (lineTextSize.height == 0) + { + lineTextSize.height = TextUtility::GetFontMaxHeightF(pFont); + } + + switch (__align & TEXT_ALIGNMASK_HORIZ) + { + case TEXT_OBJECT_ALIGNMENT_LEFT: + break; + + case TEXT_OBJECT_ALIGNMENT_CENTER: + posX += (lineBounds.width - lineTextSize.width) / 2.0f; + break; + + case TEXT_OBJECT_ALIGNMENT_RIGHT: + posX += (lineBounds.width - lineTextSize.width); + break; + } + + switch (__align & TEXT_ALIGNMASK_VERT) + { + case TEXT_OBJECT_ALIGNMENT_TOP: + break; + + case TEXT_OBJECT_ALIGNMENT_MIDDLE: + posY += (__rect.height - __pTextColumn->GetDisplayHeightF()) / 2.0f; + break; + + case TEXT_OBJECT_ALIGNMENT_BOTTOM: + posY += (__rect.height - __pTextColumn->GetDisplayHeightF()); + break; + } + + if (posX < 0.0f) + { + posX = 0.0f; + } + + if (posY < 0.0f) + { + posY = 0.0f; + } + + FloatRectangle textExtent = pTextLine->GetTextExtentF(textIndexFromLineOffset, 1); + + if (lineIndex == lineCount) + { + textExtent.width = 0.0f; + } + + if (textIndex >= 1) + { + Font* pTextFont = __pCompositeText->GetFont(textIndex - 1); + textExtent.height = TextUtility::GetFontMaxHeightF(pTextFont); + } + + if (textExtent.height < 0.0f) + { + textExtent.height = TextUtility::GetFontMaxHeightF(pFont); + } + + TextObjectAlignment alignment = __pCompositeText->GetElementVerticalAlignment(); + switch (alignment & TEXT_ALIGNMASK_VERT) + { + case TEXT_OBJECT_ALIGNMENT_TOP: + // fall through + default: + break; + + case TEXT_OBJECT_ALIGNMENT_MIDDLE: + lineY = lineY + (lineBounds.height - textExtent.height) / 2.0f; + break; + + case TEXT_OBJECT_ALIGNMENT_BOTTOM: + lineY = lineY + (lineBounds.height - textExtent.height); + break; + } + + width = textExtent.width; + height = textExtent.height; + absX = posX + textExtent.x; + logicalX = absX + __rect.x; + absY = lineY; + logicalY = absY - firstDisplayPositionY + __rect.y + posY; + + return E_SUCCESS; +} + +result +TextObject::GetTextPositionInfoInWrapAt(int row, int column, float& width, float& height, float& absX, float& absY, + float& logicalX, float& logicalY) const +{ + TextLine* pTextLine = null; + float firstDisplayPositionY = __pTextColumn->GetFirstDisplayPositionYF(); + int lineCount = __pTextColumn->GetTotalLineCount(); + float posX = 0.0f; + float posY = 0.0f; + + _FontImpl* pFont = _FontImpl::GetInstance(*__pDefaultFont); + SysTryReturn(NID_GRP, pFont, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get native font instance."); + + pTextLine = __pTextColumn->GetTextLine(row); + SysTryReturn(NID_GRP, pTextLine, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + FloatRectangle lineBounds = pTextLine->GetBoundsF(); + int lineOffset = pTextLine->GetTextOffset(); + int lineLength = pTextLine->GetTextLength(); + int textIndex = pTextLine->GetTextOffset() + column; + 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); + + FloatDimension lineTextSize; + pTextLine->GetRegion(0, lineLength, lineTextSize.width, lineTextSize.height); + + if (lineTextSize.height == 0) + { + lineTextSize.height = TextUtility::GetFontMaxHeightF(pFont); + } + + switch (__align & TEXT_ALIGNMASK_HORIZ) + { + case TEXT_OBJECT_ALIGNMENT_LEFT: + break; + + case TEXT_OBJECT_ALIGNMENT_CENTER: + posX += (lineBounds.width - lineTextSize.width) / 2.0f; + break; + + case TEXT_OBJECT_ALIGNMENT_RIGHT: + posX += (lineBounds.width - lineTextSize.width); + break; + } + + switch (__align & TEXT_ALIGNMASK_VERT) + { + case TEXT_OBJECT_ALIGNMENT_TOP: + break; + + case TEXT_OBJECT_ALIGNMENT_MIDDLE: + posY += (__rect.height - __pTextColumn->GetDisplayHeightF()) / 2.0f; + break; + + case TEXT_OBJECT_ALIGNMENT_BOTTOM: + posY += (__rect.height - __pTextColumn->GetDisplayHeightF()); + break; + } + + if (posX < 0.0f) + { + posX = 0.0f; + } + + if (posY < 0.0f) + { + posY = 0.0f; + } + + FloatRectangle textExtent = pTextLine->GetTextExtentF(column, 1); + + if (row == lineCount) + { + textExtent.width = 0.0f; + } + + if (textIndex >= 1) + { + Font* pTextFont = __pCompositeText->GetFont(textIndex - 1); + textExtent.height = TextUtility::GetFontMaxHeightF(pTextFont); + } + + if (textExtent.height < 0.0f) + { + textExtent.height = TextUtility::GetFontMaxHeightF(pFont); + } + + TextObjectAlignment alignment = __pCompositeText->GetElementVerticalAlignment(); + switch (alignment & TEXT_ALIGNMASK_VERT) + { + case TEXT_OBJECT_ALIGNMENT_TOP: + // fall through + default: + break; + + case TEXT_OBJECT_ALIGNMENT_MIDDLE: + lineY = lineY + (lineBounds.height - textExtent.height) / 2.0f; + break; + + case TEXT_OBJECT_ALIGNMENT_BOTTOM: + lineY = lineY + (lineBounds.height - textExtent.height); + break; + } + + width = textExtent.width; + height = textExtent.height; + absX = posX + textExtent.x; + logicalX = absX + __rect.x; + absY = lineY; + logicalY = absY - firstDisplayPositionY + __rect.y + posY; + + return E_SUCCESS; +} + +result +TextObject::GetBlockTextPositionInfoInWrapAt(int textIndex, int& width, int& height, int& absX, int& absY, + int& logicalX, int& logicalY) const +{ + float widthF = _CoordinateSystemUtils::ConvertToFloat(width); + float heightF = _CoordinateSystemUtils::ConvertToFloat(height); + float absXF = _CoordinateSystemUtils::ConvertToFloat(absX); + float absYF = _CoordinateSystemUtils::ConvertToFloat(absY); + float logicalXF = _CoordinateSystemUtils::ConvertToFloat(logicalX); + float logicalYF = _CoordinateSystemUtils::ConvertToFloat(logicalY); + + result r = GetBlockTextPositionInfoInWrapAt(textIndex, widthF, heightF, absXF, absYF, logicalXF, logicalYF); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + width = _CoordinateSystemUtils::ConvertToInteger(widthF); + height = _CoordinateSystemUtils::ConvertToInteger(heightF); + absX = _CoordinateSystemUtils::ConvertToInteger(absXF); + absY = _CoordinateSystemUtils::ConvertToInteger(absYF); + logicalX = _CoordinateSystemUtils::ConvertToInteger(logicalXF); + logicalY = _CoordinateSystemUtils::ConvertToInteger(logicalYF); + + return E_SUCCESS; +} + +result +TextObject::GetBlockTextPositionInfoInWrapAt(int textIndex, float& width, float& height, float& absX, float& absY, + float& logicalX, float& logicalY) const +{ + TextLine* pTextLine = null; + FloatRectangle lineBounds; + float firstDisplayPositionY = __pTextColumn->GetFirstDisplayPositionYF(); + int lineCount = __pTextColumn->GetTotalLineCount(); + int lineIndex = 0; + int lineOffset = 0; + int lineLength = 0; + int textIndexFromLineOffset = 0; + float lineY = 0.0f; + float posX = 0.0f; + float posY = 0.0f; + + _FontImpl* pFont = _FontImpl::GetInstance(*__pDefaultFont); + SysTryReturn(NID_GRP, pFont, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get native font instance."); + + for (lineIndex = 0; lineIndex < lineCount; lineIndex++) + { + pTextLine = __pTextColumn->GetTextLine(lineIndex); + SysTryReturn(NID_GRP, pTextLine, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + lineBounds = pTextLine->GetBoundsF(); + lineOffset = pTextLine->GetTextOffset(); + lineLength = pTextLine->GetTextLength(); + + if (lineOffset <= textIndex && textIndex <= lineOffset + lineLength) + { + break; + } + + if (lineIndex + 1 < lineCount) + { + lineY += lineBounds.height; + } + } + + SysTryReturn(NID_GRP, pTextLine, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + if (lineIndex == lineCount) + { + textIndexFromLineOffset = lineLength; + } + else + { + textIndexFromLineOffset = textIndex - lineOffset; + } + + FloatDimension lineTextSize; + pTextLine->GetRegion(0, lineLength, lineTextSize.width, lineTextSize.height); + + if (lineTextSize.height == 0.0f) + { + lineTextSize.height = TextUtility::GetFontMaxHeightF(pFont); + } + + switch (__align & TEXT_ALIGNMASK_HORIZ) + { + case TEXT_OBJECT_ALIGNMENT_LEFT: + break; + + case TEXT_OBJECT_ALIGNMENT_CENTER: + posX += (lineBounds.width - lineTextSize.width) / 2.0f; + break; + + case TEXT_OBJECT_ALIGNMENT_RIGHT: + posX += (lineBounds.width - lineTextSize.width); + break; + } + + switch (__align & TEXT_ALIGNMASK_VERT) + { + case TEXT_OBJECT_ALIGNMENT_TOP: + break; + + case TEXT_OBJECT_ALIGNMENT_MIDDLE: + posY += (__rect.height - __pTextColumn->GetDisplayHeightF()) / 2.0f; + break; + + case TEXT_OBJECT_ALIGNMENT_BOTTOM: + posY += (__rect.height - __pTextColumn->GetDisplayHeightF()); + break; + } + + if (posX < 0.0f) + { + posX = 0.0f; + } + + if (posY < 0.0f) + { + posY = 0.0f; + } + + FloatRectangle textExtent = pTextLine->GetBlockTextExtentF(textIndexFromLineOffset, 1); + + if (lineIndex == lineCount) + { + textExtent.width = 0.0f; + } + + if (textIndex >= 1) + { + Font* pTextFont = __pCompositeText->GetFont(textIndex - 1); + textExtent.height = TextUtility::GetFontMaxHeightF(pTextFont); + } + + if (textExtent.height < 0) + { + textExtent.height = TextUtility::GetFontMaxHeightF(pFont); + } + + TextObjectAlignment alignment = __pCompositeText->GetElementVerticalAlignment(); + switch (alignment & TEXT_ALIGNMASK_VERT) + { + case TEXT_OBJECT_ALIGNMENT_TOP: + // fall through + default: + break; + + case TEXT_OBJECT_ALIGNMENT_MIDDLE: + lineY = lineY + (lineBounds.height - textExtent.height) / 2.0f; + break; + + case TEXT_OBJECT_ALIGNMENT_BOTTOM: + lineY = lineY + (lineBounds.height - textExtent.height); + break; + } + + width = textExtent.width; + height = textExtent.height; + absX = posX + textExtent.x; + logicalX = absX + __rect.x; + absY = lineY; + logicalY = absY - firstDisplayPositionY + __rect.y + posY; + + return E_SUCCESS; +} + +result +TextObject::GetTextPositionInfoInNoneWrapAt(int textIndex, int& width, int& height, int& absX, int& absY, + int& logicalX, int& logicalY) const +{ + float widthF = _CoordinateSystemUtils::ConvertToFloat(width); + float heightF = _CoordinateSystemUtils::ConvertToFloat(height); + float absXF = _CoordinateSystemUtils::ConvertToFloat(absX); + float absYF = _CoordinateSystemUtils::ConvertToFloat(absY); + float logicalXF = _CoordinateSystemUtils::ConvertToFloat(logicalX); + float logicalYF = _CoordinateSystemUtils::ConvertToFloat(logicalY); + + result r = GetTextPositionInfoInNoneWrapAt(textIndex, widthF, heightF, absXF, absYF, logicalXF, logicalYF); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + width = _CoordinateSystemUtils::ConvertToInteger(widthF); + height = _CoordinateSystemUtils::ConvertToInteger(heightF); + absX = _CoordinateSystemUtils::ConvertToInteger(absXF); + absY = _CoordinateSystemUtils::ConvertToInteger(absYF); + logicalX = _CoordinateSystemUtils::ConvertToInteger(logicalXF); + logicalY = _CoordinateSystemUtils::ConvertToInteger(logicalYF); + + return E_SUCCESS; +} + +result +TextObject::GetTextPositionInfoInNoneWrapAt(int textIndex, float& width, float& height, float& absX, float& absY, + float& logicalX, float& logicalY) const +{ + TextLine* pTextLine = null; + pTextLine = __pTextColumn->GetTextLine(0); + SysTryReturn(NID_GRP, pTextLine, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + int lineLength = pTextLine->GetTextLength(); + float firstDisplayPositionX = __pTextColumn->GetFirstDisplayPositionX(); + float posX = 0.0f; + float posY = 0.0f; + + _FontImpl* pFont = _FontImpl::GetInstance(*__pDefaultFont); + SysTryReturn(NID_GRP, pFont, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get native font instance."); + + FloatDimension lineTextSize; + FloatRectangle lineBounds; + lineBounds = pTextLine->GetBoundsF(); + pTextLine->GetRegion(0, lineLength, lineTextSize.width, lineTextSize.height); + + if (lineTextSize.height == 0.0f || pTextLine->GetTextLength() == 0.0f) + { + lineTextSize.height = TextUtility::GetFontMaxHeightF(pFont); + } + + switch (__align & TEXT_ALIGNMASK_HORIZ) + { + case TEXT_OBJECT_ALIGNMENT_LEFT: + break; + + case TEXT_OBJECT_ALIGNMENT_CENTER: + posX += (lineBounds.width - lineTextSize.width) / 2.0f; + break; + + case TEXT_OBJECT_ALIGNMENT_RIGHT: + posX += (lineBounds.width - lineTextSize.width); + break; + } + + switch (__align & TEXT_ALIGNMASK_VERT) + { + case TEXT_OBJECT_ALIGNMENT_TOP: + break; + + case TEXT_OBJECT_ALIGNMENT_MIDDLE: + posY += (__rect.height - lineTextSize.height) / 2.0f; + break; + + case TEXT_OBJECT_ALIGNMENT_BOTTOM: + posY += (__rect.height - lineTextSize.height); + break; + } + + posX = (posX < 0.0f) ? 0.0f : posX; + posY = (posY < 0.0f) ? 0.0f : posY; + + FloatRectangle textExtent = pTextLine->GetTextExtentF(textIndex - pTextLine->GetTextOffset(), 1); + + if (textIndex >= 1) + { + Font* pTextFont = __pCompositeText->GetFont(textIndex - 1); + textExtent.height = TextUtility::GetFontMaxHeightF(pTextFont); + } + + if (textExtent.height < 0.0f) + { + textExtent.height = TextUtility::GetFontMaxHeightF(pFont); + } + + TextObjectAlignment alignment = __pCompositeText->GetElementVerticalAlignment(); + switch (alignment & TEXT_ALIGNMASK_VERT) + { + case TEXT_OBJECT_ALIGNMENT_TOP: + // fall through + default: + break; + + case TEXT_OBJECT_ALIGNMENT_MIDDLE: + posY = posY + (lineBounds.height - textExtent.height) / 2.0f; + break; + + case TEXT_OBJECT_ALIGNMENT_BOTTOM: + posY = posY + (lineBounds.height - textExtent.height); + break; + } + + absX = posX + textExtent.x - firstDisplayPositionX; + logicalX = (absX >= 0.0f) ? absX + __rect.x : absX; + absY = posY; + logicalY = absY + __rect.y; + width = textExtent.width; + height = textExtent.height; + + return E_SUCCESS; +} + +result +TextObject::GetTextPositionInfoInNoneWrapAt(int row, int column, float& width, float& height, float& absX, float& absY, + float& logicalX, float& logicalY) const +{ + TextLine* pTextLine = null; + pTextLine = __pTextColumn->GetTextLine(row); + SysTryReturn(NID_GRP, pTextLine, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + int lineLength = pTextLine->GetTextLength(); + float firstDisplayPositionX = __pTextColumn->GetFirstDisplayPositionX(); + 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."); + + FloatDimension lineTextSize; + FloatRectangle lineBounds; + lineBounds = pTextLine->GetBoundsF(); + pTextLine->GetRegion(0, lineLength, lineTextSize.width, lineTextSize.height); + + if (lineTextSize.height == 0.0f || pTextLine->GetTextLength() == 0.0f) + { + lineTextSize.height = TextUtility::GetFontMaxHeightF(pFont); + } + + switch (__align & TEXT_ALIGNMASK_HORIZ) + { + case TEXT_OBJECT_ALIGNMENT_LEFT: + break; + + case TEXT_OBJECT_ALIGNMENT_CENTER: + posX += (lineBounds.width - lineTextSize.width) / 2.0f; + break; + + case TEXT_OBJECT_ALIGNMENT_RIGHT: + posX += (lineBounds.width - lineTextSize.width); + break; + } + + switch (__align & TEXT_ALIGNMASK_VERT) + { + case TEXT_OBJECT_ALIGNMENT_TOP: + break; + + case TEXT_OBJECT_ALIGNMENT_MIDDLE: + posY += (__rect.height - lineTextSize.height) / 2.0f; + break; + + case TEXT_OBJECT_ALIGNMENT_BOTTOM: + posY += (__rect.height - lineTextSize.height); + break; + } + + posX = (posX < 0.0f) ? 0.0f : posX; + posY = (posY < 0.0f) ? 0.0f : posY; + + FloatRectangle textExtent = pTextLine->GetTextExtentF(column - pTextLine->GetTextOffset(), 1); + + if (column >= 1) + { + Font* pTextFont = __pCompositeText->GetFont(column - 1); + textExtent.height = TextUtility::GetFontMaxHeightF(pTextFont); + } + + if (textExtent.height < 0.0f) + { + textExtent.height = TextUtility::GetFontMaxHeightF(pFont); + } + + TextObjectAlignment alignment = __pCompositeText->GetElementVerticalAlignment(); + switch (alignment & TEXT_ALIGNMASK_VERT) + { + case TEXT_OBJECT_ALIGNMENT_TOP: + // fall through + default: + break; + + case TEXT_OBJECT_ALIGNMENT_MIDDLE: + posY = posY + (lineBounds.height - textExtent.height) / 2.0f; + break; + + case TEXT_OBJECT_ALIGNMENT_BOTTOM: + posY = posY + (lineBounds.height - textExtent.height); + break; + } + + absX = posX + textExtent.x - firstDisplayPositionX; + logicalX = (absX >= 0.0f) ? absX + __rect.x : absX; + absY = posY; + logicalY = absY + __rect.y; + width = textExtent.width; + height = textExtent.height; + + return E_SUCCESS; +} + +int +TextObject::GetTotalComposedHeight(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetTotalComposedHeightF()); +} + +float +TextObject::GetTotalComposedHeightF(void) const +{ + return __pCompositeText->GetTotalComposedHeightF(); +} + +int +TextObject::GetLineWidthAt(int lineIndex) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetLineWidthAtF(lineIndex)); +} + +float +TextObject::GetLineWidthAtF(int lineIndex) const +{ + IF_NOT_CONSTRUCTED(return -1); + + result r = E_SUCCESS; + TextLine* pTextLine = null; + FloatDimension lineTextSize; + int lineLength = 0; + + pTextLine = __pTextColumn->GetTextLine(lineIndex); + SysTryCatch(NID_GRP, pTextLine, , E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + lineLength = pTextLine->GetTextLength(); + r = pTextLine->GetRegion(0, lineLength, lineTextSize.width, lineTextSize.height); + SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + SetLastResult(E_SUCCESS); + return lineTextSize.width; + +CATCH: + return -1; +} + +int +TextObject::GetTotalHeight(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetTotalHeightF()); +} + +float +TextObject::GetTotalHeightF(void) const +{ + IF_NOT_CONSTRUCTED(return -1); + + float height = 0.0f; + if (IsPartialComposingModeEnabled()) + { + height = __pCompositeText->GetAnalysedTotalHeightF(); + } + else + { + height = __pTextColumn->GetTotalHeightF(); + } + + return height; +} + +int +TextObject::GetElementIndexOf(TextElement& textElement) const +{ + IF_NOT_CONSTRUCTED(return -1); + + return __pCompositeText->GetElementIndexOf(textElement); +} + +result +TextObject::RemoveElementAt(int elementIndex, bool deallocate) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + return __pCompositeText->RemoveElementAt(elementIndex, deallocate); +} + +result +TextObject::HideFrontSpace(TextObjectSpaceHideType mode) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + __pCompositeText->HideFrontSpace(mode); + + return E_SUCCESS; +} + +result +TextObject::HideRearSpace(TextObjectSpaceHideType mode) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + __pCompositeText->HideRearSpace(mode); + + return E_SUCCESS; +} + +int +TextObject::GetSlidingStep(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetSlidingStepF()); +} + +float +TextObject::GetSlidingStepF(void) const +{ + IF_NOT_CONSTRUCTED(return -1.0f); + + return __slidingStep; +} + + +result +TextObject::SetSlidingStep(int slidingStep) +{ + return SetSlidingStep(_CoordinateSystemUtils::ConvertToFloat(slidingStep)); +} + +result +TextObject::SetSlidingStep(float slidingStep) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + __slidingStep = slidingStep; + + return E_SUCCESS; +} + +int +TextObject::GetTotalLineCount(void) const +{ + IF_NOT_CONSTRUCTED(return -1); + + return __pTextColumn->GetTotalLineCount(); +} + +int +TextObject::GetLineIndexAtTextIndex(int textIndex) const +{ + IF_NOT_CONSTRUCTED(return -1); + + return __pTextColumn->GetLineIndexAtTextIndex(textIndex); +} + +int +TextObject::GetLineHeightAt(int lineIndex) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetLineHeightAtF(lineIndex)); +} + +float +TextObject::GetLineHeightAtF(int lineIndex) const +{ + IF_NOT_CONSTRUCTED(return -1); + + SysTryReturn(NID_GRP, lineIndex >= 0, -1, E_INVALID_ARG + , "[E_INVALID_ARG] The argument is invalid. (lineIndex = %d)", lineIndex); + + return __pTextColumn->GetLineHeightAtF(lineIndex); +} + +int +TextObject::GetDisplayLineCount(void) const +{ + IF_NOT_CONSTRUCTED(return -1); + + return __pTextColumn->GetDisplayLineCount(); +} + +int +TextObject::GetFirstDisplayLineIndex(void) const +{ + IF_NOT_CONSTRUCTED(return -1); + + return __pTextColumn->GetFirstDisplayLineIndex(); +} + +int +TextObject::GetFirstDisplayPositionY(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetFirstDisplayPositionYF()); +} + +float +TextObject::GetFirstDisplayPositionYF(void) const +{ + IF_NOT_CONSTRUCTED(return -1); + + return __pTextColumn->GetFirstDisplayPositionYF(); +} + +int +TextObject::GetLineIndexAtPositionY(int y) const +{ + return GetLineIndexAtPositionY(_CoordinateSystemUtils::ConvertToFloat(y)); +} + +int +TextObject::GetLineIndexAtPositionY(float y) const +{ + IF_NOT_CONSTRUCTED(return -1); + + return __pTextColumn->GetLineIndexAtPositionY(y); +} + +int +TextObject::GetFirstTextIndexAt(int lineIndex) const +{ + IF_NOT_CONSTRUCTED(return -1); + + SysTryReturn(NID_GRP, lineIndex >= 0, -1, E_INVALID_ARG + , "[E_INVALID_ARG] The argument is invalid. (lineIndex = %d)", lineIndex); + + return __pTextColumn->GetFirstTextIndexAt(lineIndex); +} + +int +TextObject::GetTextLengthAt(int lineIndex) const +{ + IF_NOT_CONSTRUCTED(return -1); + + SysTryReturn(NID_GRP, lineIndex >= 0, -1, E_INVALID_ARG + , "[E_INVALID_ARG] The argument is invalid. (lineIndex = %d)", lineIndex); + + return __pTextColumn->GetTextLengthAt(lineIndex); +} + +Rectangle +TextObject::GetBounds(void) const +{ + IF_NOT_CONSTRUCTED(return Rectangle(0, 0, 0, 0)); + + return _CoordinateSystemUtils::ConvertToInteger(__rect); +} + +FloatRectangle +TextObject::GetBoundsF(void) const +{ + return __rect; +} + +int +TextObject::GetLineSpace(void) const +{ + IF_NOT_CONSTRUCTED(return -1); + + return _CoordinateSystemUtils::ConvertToInteger(GetLineSpaceF()); +} + +float +TextObject::GetLineSpaceF(void) const +{ + IF_NOT_CONSTRUCTED(return -1); + + return __pCompositeText->GetLineSpaceF(); +} + +int +TextObject::GetTextLength(void) const +{ + IF_NOT_CONSTRUCTED(return -1); + + return __pCompositeText->GetTextLength(); +} + +TextObjectAlignment +TextObject::GetElementVerticalAlignment(void) const +{ + IF_NOT_CONSTRUCTED(return TEXT_OBJECT_ALIGNMENT_INVALID); + + return __pCompositeText->GetElementVerticalAlignment(); +} + +TextObjectActionType +TextObject::GetAction(void) const +{ + IF_NOT_CONSTRUCTED(return TEXT_OBJECT_ACTION_TYPE_NONE); + + return __action; +} + +TextObjectAlignment +TextObject::GetAlignment(void) const +{ + IF_NOT_CONSTRUCTED(return TEXT_OBJECT_ALIGNMENT_INVALID); + + return __align; +} + +int +TextObject::GetElementCount(void) const +{ + IF_NOT_CONSTRUCTED(return -1); + + return __pCompositeText->GetElementCount(); +} + +TextElement* +TextObject::GetElementAtElementIndex(int elementIndex) const +{ + IF_NOT_CONSTRUCTED(return null); + + return __pCompositeText->GetElementAtElementIndex(elementIndex); +} + +result +TextObject::SetRange(int startTextIndex, int textLength) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + return __pCompositeText->SetRange(startTextIndex, textLength); +} + +void +TextObject::GetRange(int& startTextIndex, int& textLength) const +{ + IF_NOT_CONSTRUCTED(return); + + return __pCompositeText->GetRange(startTextIndex, textLength); +} + +TextObjectWrapType +TextObject::GetWrap(void) const +{ + IF_NOT_CONSTRUCTED(return TEXT_OBJECT_WRAP_TYPE_NONE); + + return __wrap; +} + +result +TextObject::SetCursorIndex(int cursorIndex) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + SysTryReturn(NID_GRP, cursorIndex >= 0, E_INVALID_ARG, E_INVALID_ARG + , "[E_INVALID_ARG] The argument is invalid."); + + __pCompositeText->SetCursorIndex(cursorIndex); + + return E_SUCCESS; +} + +int +TextObject::GetCursorIndex(void) const +{ + IF_NOT_CONSTRUCTED(return -1); + + return __pCompositeText->GetCursorIndex(); +} + +result +TextObject::SetBlock(bool enable) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + __pCompositeText->SetBlock(enable); + + return E_SUCCESS; +} + +bool +TextObject::GetBlock(void) const +{ + IF_NOT_CONSTRUCTED(return false); + + return __pCompositeText->GetBlock(); +} + +result +TextObject::SetBlockRange(int startTextIndex, int textLength) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + result r = E_SUCCESS; + r = __pCompositeText->SetRange(startTextIndex, textLength); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +void +TextObject::GetBlockRange(int& startTextIndex, int& textLength) +{ + IF_NOT_CONSTRUCTED(return); + + __pCompositeText->GetRange(startTextIndex, textLength); +} + +bool +TextObject::IsAlternateLookEnabled(void) const +{ + IF_NOT_CONSTRUCTED(return false); + + return __isAlternateLookEnabled; +} + +int +TextObject::GetTotalCutLinkElementCount(void) const +{ + IF_NOT_CONSTRUCTED(return -1); + + return __pCompositeText->GetCutLinkElementCount(); +} + +result +TextObject::ChangeCutLinkState(int linkIndex, bool select) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + return __pCompositeText->ChangeCutLinkState(linkIndex, select); +} + +result +TextObject::ResetAllCutLinkElementsState(void) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + return __pCompositeText->ResetAllCutLinkElementsState(); +} + +bool +TextObject::IsActionOn(void) const +{ + IF_NOT_CONSTRUCTED(return false); + + return __isActionOn; +} + +TextObjectEllipsisType +TextObject::GetTextObjectEllipsisType(void) const +{ + IF_NOT_CONSTRUCTED(return TEXT_OBJECT_ELLIPSIS_TYPE_INVALID); + + return __textObjectEllipsisType; +} + +result +TextObject::ChangeText(int textIndex) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + if (__sweepInfo.isValid) + { + __sweepInfo.isValid = false; + return E_INVALID_STATE; + } + + __sweepInfo.isValid = true; + __sweepInfo.sweepType = TEXT_OBJECT_SWEEP_TYPE_REPLACE; + __sweepInfo.sweepEventType = TEXT_OBJECT_SWEEP_EVENT_INSERT; + __sweepInfo.anchorTextIndex = textIndex; + __sweepInfo.sweepRegionStartLineIndex = GetLineIndexAtTextIndex(textIndex); + __sweepInfo.sweepRegionLineCount = 1; + __sweepInfo.anchorLineIndex = __sweepInfo.sweepRegionStartLineIndex; + __sweepInfo.widthChanged = 0; + + __pCompositeText->SetTextSweepInfo(&__sweepInfo); + + return E_SUCCESS; +} + +result +TextObject::InputText(int textIndex) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + if (__sweepInfo.isValid == true) + { + __sweepInfo.isValid = false; + return E_INVALID_STATE; + } + + __sweepInfo.isValid = true; + __sweepInfo.sweepType = TEXT_OBJECT_SWEEP_TYPE_KEYINPUT; + __sweepInfo.sweepEventType = TEXT_OBJECT_SWEEP_EVENT_INSERT; + __sweepInfo.anchorTextIndex = textIndex; + __sweepInfo.prevAnchorLineIndex = GetLineIndexAtTextIndex(textIndex); + + if (__sweepInfo.prevAnchorLineIndex == -1) + { + __sweepInfo.prevAnchorLineIndex = __pTextColumn->GetTotalLineCount()-1; + } + + __pCompositeText->SetTextSweepInfo(&__sweepInfo); + + return E_SUCCESS; +} + +result +TextObject::RemoveText(int textIndex) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + if (__sweepInfo.isValid == true) + { + __sweepInfo.isValid = false; + return E_INVALID_STATE; + } + + __sweepInfo.isValid = true; + __sweepInfo.sweepEventType = TEXT_OBJECT_SWEEP_EVENT_REMOVE; + __sweepInfo.anchorTextIndex = textIndex; + __sweepInfo.prevAnchorLineIndex = GetLineIndexAtTextIndex(textIndex); + + if (__sweepInfo.prevAnchorLineIndex == -1) + { + __sweepInfo.prevAnchorLineIndex = __pTextColumn->GetTotalLineCount()-1; + } + + __pCompositeText->SetTextSweepInfo(&__sweepInfo); + + return E_SUCCESS; +} + +result +TextObject::ResetSweepInfo(void) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + __sweepInfo.isValid = false; + + return E_SUCCESS; +} + +TextObjectSweepInfo +TextObject::GetSweepInfo(void) const +{ + TextObjectSweepInfo textSweepInfo; + textSweepInfo.isValid = false; + textSweepInfo.sweepType = TEXT_OBJECT_SWEEP_TYPE_NONE; + textSweepInfo.sweepEventType = TEXT_OBJECT_SWEEP_EVENT_NONE; + textSweepInfo.anchorTextIndex = -1; + textSweepInfo.anchorLineIndex = -1; + textSweepInfo.prevAnchorLineIndex = -1; + textSweepInfo.sweepRegionStartLineIndex = -1; + textSweepInfo.sweepRegionLineCount = -1; + textSweepInfo.insertedLineCount = -1; + textSweepInfo.deletedLineCount = -1; + textSweepInfo.widthChanged = -1; + + IF_NOT_CONSTRUCTED(return textSweepInfo); + + textSweepInfo.isValid = __sweepInfo.isValid; + textSweepInfo.sweepType = __sweepInfo.sweepType; + textSweepInfo.sweepEventType = __sweepInfo.sweepEventType; + textSweepInfo.anchorTextIndex = __sweepInfo.anchorTextIndex; + textSweepInfo.anchorLineIndex = __sweepInfo.anchorLineIndex; + textSweepInfo.prevAnchorLineIndex = __sweepInfo.prevAnchorLineIndex; + textSweepInfo.sweepRegionStartLineIndex = __sweepInfo.sweepRegionStartLineIndex; + textSweepInfo.sweepRegionLineCount = __sweepInfo.sweepRegionLineCount; + textSweepInfo.insertedLineCount = __sweepInfo.insertedLineCount; + textSweepInfo.deletedLineCount = __sweepInfo.deletedLineCount; + textSweepInfo.widthChanged = __sweepInfo.widthChanged; + + return textSweepInfo; +} + +result +TextObject::GetSweepComposeLineInfo(int lineIndex, TextObjectSweepComposeLineInfo& textSweepComposeLineInfo) const +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + SysTryReturn(NID_GRP, lineIndex >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid. (lineIndex = %d)", lineIndex); + + TextLine* pTextLine = __pTextColumn->GetTextLine(lineIndex); + SysTryReturn(NID_GRP, pTextLine, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid. (lineIndex = %d)", lineIndex); + + textSweepComposeLineInfo = pTextLine->GetSweepComposeInfo(); + + return E_SUCCESS; +} + +int +TextObject::GetTextOffsetAtLine(int lineIndex) const +{ + IF_NOT_CONSTRUCTED(return -1); + + SysTryReturn(NID_GRP, lineIndex >= 0, -1, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid. (lineIndex = %d)", lineIndex); + + TextLine* pTextLine = __pTextColumn->GetTextLine(lineIndex); + SysTryReturn(NID_GRP, pTextLine, -1, E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + return pTextLine->GetTextOffset(); +} + +int +TextObject::GetTextLengthAtLine(int lineIndex) const +{ + IF_NOT_CONSTRUCTED(return -1); + + SysTryReturn(NID_GRP, lineIndex >= 0, -1, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid. (lineIndex = %d)", lineIndex); + + TextLine* pTextLine = __pTextColumn->GetTextLine(lineIndex); + SysTryReturn(NID_GRP, pTextLine, -1, E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + return pTextLine->GetTextLength(); +} + +Rectangle +TextObject::GetBoundsAtLine(int lineIndex) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetBoundsAtLineF(lineIndex)); +} + +FloatRectangle +TextObject::GetBoundsAtLineF(int lineIndex) const +{ + IF_NOT_CONSTRUCTED(return FloatRectangle(-1, -1, -1, -1)); + + SysTryReturn(NID_GRP, lineIndex >= 0, FloatRectangle(-1, -1, -1, -1), E_INVALID_ARG + , "[E_INVALID_ARG] The argument is invalid. (lineIndex = %d)", lineIndex); + + TextLine* pTextLine = __pTextColumn->GetTextLine(lineIndex); + SysTryReturn(NID_GRP, pTextLine, FloatRectangle(-1, -1, -1, -1), E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + FloatRectangle lineBounds = pTextLine->GetBoundsF(); + + return lineBounds; +} + +Point +TextObject::GetDisplayPositionAtLine(int lineIndex, int textIndexFromLineOffset) +{ + return _CoordinateSystemUtils::ConvertToInteger(GetDisplayPositionAtLineF(lineIndex, textIndexFromLineOffset)); +} + +FloatPoint +TextObject::GetDisplayPositionAtLineF(int lineIndex, int textIndexFromLineOffset) +{ + IF_NOT_CONSTRUCTED(return FloatPoint(-1.0f, -1.0f)); + + SysTryReturn(NID_GRP, lineIndex >= 0, FloatPoint(-1.0f, -1.0f), E_INVALID_ARG + , "[E_INVALID_ARG] The argument is invalid. (lineIndex = %d)", lineIndex); + + TextLine* pTextLine = __pTextColumn->GetTextLine(lineIndex); + SysTryReturn(NID_GRP, pTextLine, FloatPoint(-1.0f, -1.0f), E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + int lineOffset = pTextLine->GetTextOffset(); + int lineLength = pTextLine->GetTextLength(); + FloatDimension lineTextSize; + FloatDimension extentDim; + FloatRectangle lineBounds; + int textCount = 0; + + pTextLine->GetRegion(0, lineLength, lineTextSize.width, lineTextSize.height); + lineBounds = pTextLine->GetBoundsF(); + + __pCompositeText->ForwardAnalyze(lineOffset, textIndexFromLineOffset, lineTextSize.width, __wrap, textCount, extentDim.width, extentDim.height); + + switch (__align & TEXT_ALIGNMASK_HORIZ) + { + case TEXT_OBJECT_ALIGNMENT_LEFT: + break; + + case TEXT_OBJECT_ALIGNMENT_CENTER: + extentDim.width += (lineBounds.width - lineTextSize.width) / 2.0f; + break; + + case TEXT_OBJECT_ALIGNMENT_RIGHT: + extentDim.width += (lineBounds.width - lineTextSize.width); + break; + } + + if (extentDim.width < 0.0f) + { + extentDim.width = 0.0f; + } + + return FloatPoint(extentDim.width + __rect.x, lineBounds.y - __pTextColumn->GetFirstDisplayPositionYF() + __rect.y); +} + +Tizen::Base::String +TextObject::GetDisplayableText(void) +{ + IF_NOT_CONSTRUCTED(return -1); + + return __pCompositeText->GetDisplayableText(__rect, __action); +} + +bool +TextObject::WordExceedsWidthAt(int lineIndex) const +{ + IF_NOT_CONSTRUCTED(return false); + + SysTryReturn(NID_GRP, lineIndex >= 0, false, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid. (lineIndex = %d)", lineIndex); + + TextLine* pTextLine = __pTextColumn->GetTextLine(lineIndex); + SysTryReturn(NID_GRP, pTextLine, false, E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + bool hasOneWord = (pTextLine->GetEndType() == TEXT_RETBY_LIMITWIDTH) ? true : false; + + return hasOneWord; +} + +result +TextObject::SetTextBidiHint(TextBidiHint bidiHint) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + switch (bidiHint) + { + case TEXT_BIDI_HINT_NONE: + case TEXT_BIDI_HINT_LTR: + case TEXT_BIDI_HINT_RTL: + __bidiHint = bidiHint; + break; + } + + return E_SUCCESS; +} + +TextBidiHint +TextObject::GetTextBidiHint(void) const +{ + IF_NOT_CONSTRUCTED(return TEXT_BIDI_HINT_NONE); + + return __bidiHint; +} + +result +TextObject::ConvertToRowColumn(int textIndex, int& row, int& column) const +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + SysTryReturn(NID_GRP, textIndex >= 0 && textIndex <= GetTextLength(), E_INVALID_ARG, E_INVALID_ARG + , "[E_INVALID_ARG] The argument is invalid. (textIndex = %d)", textIndex); + + TextLine* pTextLine = null; + int lineIndex = 0; + int lineOffset = 0; + int lineLength = 0; + int lineCount = GetTotalLineCount(); + + for (lineIndex = 0; lineIndex < lineCount; lineIndex++) + { + pTextLine = __pTextColumn->GetTextLine(lineIndex); + SysTryReturn(NID_GRP, pTextLine, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + lineOffset = pTextLine->GetTextOffset(); + lineLength = pTextLine->GetTextLength(); + + if (lineOffset <= textIndex && textIndex < lineOffset + lineLength) + { + break; + } + } + + column = (lineIndex == lineCount) ? lineLength : textIndex - lineOffset; + row = (lineIndex == lineCount) ? lineIndex - 1 : lineIndex; + + return E_SUCCESS; +} + +int +TextObject::ConvertToTextIndex(int row, int column) const +{ + IF_NOT_CONSTRUCTED(return -1); + + TextLine* pTextLine = __pTextColumn->GetTextLine(row); + SysTryReturn(NID_GRP, pTextLine, -1, E_SYSTEM, "[E_SYSTEM] Fail to get text line."); + + int lineOffset = pTextLine->GetTextOffset(); + int lineLength = pTextLine->GetTextLength(); + + SysTryReturn(NID_GRP, column <= lineLength, -1, E_INVALID_ARG + , "[E_INVALID_ARG] The argument is invalid. (row = %d, column = %d)", row, column); + + SetLastResult(E_SUCCESS); + + return lineOffset + column; +} + +result +TextObject::SetDisplayBoundsExpandEnabled(bool enable) +{ + IF_NOT_CONSTRUCTED(return E_INVALID_STATE); + + __isDisplayBoundsExpandEnabled = enable; + + return E_SUCCESS; +} + +bool +TextObject::IsDisplayBoundsExpandEnabled(void) const +{ + IF_NOT_CONSTRUCTED(return false); + + return __isDisplayBoundsExpandEnabled; +} + +int +TextObject::GetRepeatCount(void) const +{ + IF_NOT_CONSTRUCTED(return -1); + + return __repeatCount; +} + +}}} // Tizen::Graphics::_Text diff --git a/src/graphics/text/FGrp_TextTextSimple.cpp b/src/graphics/text/FGrp_TextTextSimple.cpp new file mode 100644 index 0000000..0bde98a --- /dev/null +++ b/src/graphics/text/FGrp_TextTextSimple.cpp @@ -0,0 +1,1801 @@ +// +// 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_TextTextSimple.cpp + * @brief This is the implementation file for TextSimple class. + */ + +#include +#include +#include +#include "FGrp_CanvasImpl.h" +#include "FGrp_BitmapImpl.h" +#include "FGrp_TextTextSimple.h" +#include "FGrp_TextTextUtility.h" +#include "FGrp_FontImpl.h" +#include "../FGrp_BitmapUtil.h" +#include "FGrp_CoordinateSystemUtils.h" + +#include + +#define Release(x) \ + if (x) \ + { \ + delete x; \ + x = null; \ + } + +namespace // unnamed +{ + const int DEFAULT_FONT_SIZE = 42; + //const int LINE_FEED_WIDTH = 8; +} + +namespace Tizen { namespace Graphics +{ + +namespace _Text +{ + +TextSimple::TextSimple(const wchar_t* pText, int length, TextElementSourceType sourceType, Font* pFont, + const Color& foregroundColor, const Color& backgroundColor, const Color& outlineColor) + : TextElement() +{ + _type = TEXT_ELEMENT_TYPE_TEXT; + _sourceType = sourceType; + _hasFocus = false; + _isAlternateLookEnabled = false; + + if (pFont != null) + { + _pFont = _FontImpl::CloneN(const_cast (*pFont)); + } + else + { + _pFont = new (std::nothrow) Font(); + _pFont->Construct(FONT_STYLE_PLAIN, DEFAULT_FONT_SIZE); + } + + _foregroundColor = foregroundColor; + _backgroundColor = backgroundColor; + _outlineColor = outlineColor; + _outline = false; + + if (sourceType == TEXT_ELEMENT_SOURCE_TYPE_INTERNAL) + { + wchar_t* pTempText = new (std::nothrow) wchar_t[length + 1]; + if (pTempText) + { + int test = (int) _pText; + test = test & 0x03; + + TextUtility::CopyText(pTempText, pText, length); + pTempText[length] = 0; + + _pText = pTempText; + } + } + else + { + _pText = pText; + } + + _offset = 0; + _length = length; + _isBackgroundDrawingModeEnabled = false; + _userWrap = TEXT_OBJECT_WRAP_TYPE_WORD; + + __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) +{ + if (_sourceType == TEXT_ELEMENT_SOURCE_TYPE_INTERNAL) + { + if (_pText) + { + delete[] _pText; + _pText = null; + } + } + + Release(__bitmapProperty.pBitmap); + Release(_pFont); +} + +int +TextSimple::ForwardAnalyze(int startTextIndex, int textLength, int maxWidth, TextObjectWrapType wrap, int& actualLength, + int& width, int& height) +{ + float maxWidthF = _CoordinateSystemUtils::ConvertToFloat(maxWidth); + float widthF = _CoordinateSystemUtils::ConvertToFloat(width); + float heightF = _CoordinateSystemUtils::ConvertToFloat(height); + + int r = ForwardAnalyze(startTextIndex, textLength, maxWidthF, wrap, actualLength, widthF, heightF); + + width = _CoordinateSystemUtils::ConvertToInteger(widthF); + height = _CoordinateSystemUtils::ConvertToInteger(heightF); + + return r; +} + +int +TextSimple::ForwardAnalyze(int startTextIndex, int textLength, float maxWidth, TextObjectWrapType wrap, + int& actualLength, float& width, float& height) +{ + int charCount = 0; + int r = TEXT_RETBY_NORMAL; + + if (textLength > _length) + { + textLength = _length; + } + + if (textLength == 0) + { + actualLength = textLength; + width = 0; + height = 0; + + return TEXT_RETBY_NORMAL; + } + + if (__bitmapProperty.pBitmap) + { + if (__bitmapProperty.displayEnable) + { + float bitmapWidth = __bitmapProperty.pBitmap->GetWidthF(); + float bitmapHeight = __bitmapProperty.pBitmap->GetHeightF(); + + if (maxWidth < bitmapWidth) + { + actualLength = 0; + width = 0; + height = 0; + + return TEXT_RETBY_OVERWIDTH; + } + else + { + actualLength = _length; + width = bitmapWidth; + height = bitmapHeight; + + return TEXT_RETBY_NORMAL; + } + } + + actualLength = _length; + width = 0; + height = 0; + + return E_SUCCESS; + } + + Font* pCurrentFont = GetCurrentFont(); + _FontImpl* pFontImpl = _FontImpl::GetInstance(*pCurrentFont); + SysTryReturn(NID_GRP, pFontImpl, -1, E_SYSTEM, "[E_SYSTEM] Fail to get native font instance."); + + const wchar_t* pText = &_pText[startTextIndex]; + + switch (wrap) + { + case TEXT_OBJECT_WRAP_TYPE_NONE: + { + 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] Memory allocation failed."); + + int length = ConvertEnterToSpace(pModifiedText, pText, textLength); + pModifiedText[length] = 0; + + actualLength = TextUtility::GetCharCountInWidth(pFontImpl, pModifiedText, length, maxWidth, _outline, width, height); + + charCount = textLength; + r = TEXT_RETBY_NORMAL; + + delete[] pModifiedText; + pModifiedText = null; + } + else + { + actualLength = TextUtility::GetCharCountInWidth(pFontImpl, pText, textLength, maxWidth, _outline, width, height); + charCount = textLength; + r = TEXT_RETBY_NORMAL; + } + } + break; + + case TEXT_OBJECT_WRAP_TYPE_CHARACTER: + r = GetSentenceLength(pText, textLength, charCount); + actualLength = TextUtility::GetCharCountInWidth(pFontImpl, pText, charCount, maxWidth, _outline, width, height); + if (_pText[startTextIndex + actualLength] == TEXT_LINE_FEED || _pText[startTextIndex + actualLength] == TEXT_CARRIAGE_RETURN) + { + (actualLength)++; + r = TEXT_RETBY_LINEFEED; + } + else + { + // For bidi language, because bidi language is difference when word is split. + FriBidiChar text[1] = {_pText[startTextIndex + actualLength]}; + FriBidiCharType type[1] = {0}; + fribidi_get_bidi_types(text, 1, type); + bool isArabic[1] = {(type[0] & FRIBIDI_MASK_ARABIC) > 0}; + + if (isArabic[0]) + { + r = GetGlyphedLength(pText, actualLength, charCount); + if (charCount < actualLength) + { + r = (charCount == 0) ? TEXT_RETBY_LIMITWIDTH : TEXT_RETBY_NORMAL; + } + + if (charCount != 0) + { + actualLength = TextUtility::GetCharCountInWidth(pFontImpl, pText, charCount, maxWidth, _outline, width, height); + actualLength = charCount; + } + } + } + + break; + + case TEXT_OBJECT_WRAP_TYPE_WORD: + actualLength = TextUtility::GetCharCountInWidth(pFontImpl, pText, textLength, maxWidth, _outline, width, height); + float widthcheck = width; + + if (_pText[startTextIndex + actualLength] == TEXT_LINE_FEED || _pText[startTextIndex + actualLength] == TEXT_CARRIAGE_RETURN) + { + actualLength++; + r = TEXT_RETBY_LINEFEED; + } + else if (textLength == actualLength) + { + r = TEXT_RETBY_LIMITLENGTH; + } + else if (actualLength == 0) + { + charCount = 0; + r = TEXT_RETBY_LIMITWIDTH; + } + else + { + r = GetWordWrapLengthEx(pText, actualLength, charCount); + + if (charCount < actualLength) + { + r = (charCount == 0) ? TEXT_RETBY_LIMITWIDTH : TEXT_RETBY_NORMAL; + } + + if (charCount != 0) + { + // [TODO] If bidi language, if (charCount > (actualLength / 2)) is wrong....... + if (charCount > (actualLength / 2)) + { + const wchar_t* pExtraText = &_pText[startTextIndex + charCount]; + int overCharCount = TextUtility::GetCharCountInWidth(pFontImpl, pExtraText, actualLength - charCount, maxWidth, _outline, width, height); + actualLength = actualLength - overCharCount; + width = widthcheck - width; + } + else + { + actualLength = TextUtility::GetCharCountInWidth(pFontImpl, pText, charCount, maxWidth, _outline, width, height); + } + + actualLength = charCount; + } + } + + break; + } + + if (height == 0 && (textLength > 0)) + { + height = pFontImpl->GetLeadingF(); + } + + if (actualLength < charCount) + { + r = TEXT_RETBY_LIMITWIDTH; + } + + return r; +} + +bool +TextSimple::IsKorean(const wchar_t* ch) const +{ + if (0xAC00 <= *ch && *ch <= 0xD7A3) + { + return true; + } + + if (0x3130 <= *ch && *ch <= 0x318F) + { + return true; + } + + if (0x1100 <= *ch && *ch <= 0x11FF) + { + return true; + } + + return false; +} + +bool +TextSimple::IsChinese(const wchar_t ch) const +{ + if (0X2E80 <= ch && ch <= 0x2FFF) + { + return true; + } + + else if (0x3220 <= ch && ch <= 0x3243) + { + return true; + } + + else if (0x3280 <= ch && ch <= 0x32CB) + { + return true; + } + + else if (0x3400 <= ch && ch <= 0x4DBF) + { + return true; + } + + else if (0x4E00 <= ch && ch <= 0x9FFF) + { + return true; + } + + else if (0xF900 <= ch && ch <= 0xFAFF) + { + return true; + } + + return false; +} + +bool +TextSimple::IsJapanese(const wchar_t ch) const +{ + if (0x3040 <= ch && ch <= 0x309F) + { + return true; + } + + if (0x30A0 <= ch && ch <= 0x30FF) + { + return true; + } + + return false; +} + +result +TextSimple::GetRegion(int textIndex, int textLength, int& width, int& height) const +{ + float widthF = _CoordinateSystemUtils::ConvertToFloat(width); + float heightF = _CoordinateSystemUtils::ConvertToFloat(height); + + result r = GetRegion(textIndex, textLength, widthF, heightF); + + width = _CoordinateSystemUtils::ConvertToInteger(widthF); + height = _CoordinateSystemUtils::ConvertToInteger(heightF); + + return r; +} + +result +TextSimple::GetRegion(int textIndex, int textLength, float& width, float& height) const +{ + const wchar_t* pText = null; + Font* pCurrentFont = GetCurrentFont(); + SysTryReturn(NID_GRP, pCurrentFont, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] This instance is not line wrapped yet."); + + _FontImpl* pFontImpl = _FontImpl::GetInstance(*pCurrentFont); + SysTryReturn(NID_GRP, pFontImpl, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get native font instance."); + + if (textLength > _length) + { + textLength = _length; + } + + if (textLength == 0) + { + width = 0; + height = 0; + + return E_SUCCESS; + } + + if (__bitmapProperty.pBitmap) + { + if (__bitmapProperty.displayEnable) + { + width = __bitmapProperty.pBitmap->GetWidthF(); + height = __bitmapProperty.pBitmap->GetHeightF(); + } + else + { + width = 0; + height = 0; + } + + return E_SUCCESS; + } + + pText = &_pText[textIndex]; + + switch (_userWrap) + { + 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] Memory allocation failed."); + + int length = ConvertEnterToSpace(pModifiedText, pText, textLength); + pModifiedText[textLength] = 0; + + TextUtility::GetTextExtent(pFontImpl, pModifiedText, length, _outline, width, height); + + delete[] pModifiedText; + pModifiedText = null; + } + break; + + case TEXT_OBJECT_WRAP_TYPE_CHARACTER: + // fall through + case TEXT_OBJECT_WRAP_TYPE_WORD: + TextUtility::GetTextExtent(pFontImpl, pText, textLength, _outline, width, height); + break; + } + + if (height == 0 && (textLength > 0)) + { + height = pFontImpl->GetLeadingF(); + } + + return E_SUCCESS; +} + +int +TextSimple::GetHeight(void) const +{ + Font* pFont = GetCurrentFont(); + SysTryReturn(NID_GRP, pFont, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] This instance is not line wrapped yet."); + + int maxHeight = 0; + + if (__bitmapProperty.pBitmap) + { + maxHeight = (__bitmapProperty.displayEnable) ? __bitmapProperty.pBitmap->GetHeight() : 0; + } + else + { + maxHeight = TextUtility::GetFontMaxHeight(pFont); + } + + return maxHeight; +} + +float +TextSimple::GetHeightF(void) const +{ + return _CoordinateSystemUtils::ConvertToFloat(GetHeight()); +} + +result +TextSimple::Draw(_CanvasImpl& canvasImpl, Rectangle& displayRect, int startTextIndex, int textLength, + const TextObjectAlignment align, const TextObjectActionType action) +{ + FloatRectangle displayRectF = _CoordinateSystemUtils::ConvertToFloat(displayRect); + + return Draw(canvasImpl, displayRectF, startTextIndex, textLength, align, action); +} + +result +TextSimple::Draw(_CanvasImpl& canvasImpl, FloatRectangle& displayRect, int startTextIndex, int textLength, + const TextObjectAlignment alignment, const TextObjectActionType action) +{ + SysTryReturn(NID_GRP, textLength <= _length, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + if (textLength == 0) + { + return E_SUCCESS; + } + + result r = E_SUCCESS; + + if (__bitmapProperty.pBitmap) + { + if (__bitmapProperty.displayEnable) + { + r = canvasImpl.DrawBitmap(FloatPoint(displayRect.x, displayRect.y), *_BitmapImpl::GetInstance(*__bitmapProperty.pBitmap)); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + return E_SUCCESS; + } + + Color foregroundColor = GetCurrentForegroundColor(); + canvasImpl.SetForegroundColor(foregroundColor); + + Color backgroundColor = GetCurrentBackgroundColor(); + canvasImpl.SetBackgroundColor(backgroundColor); + + Color outlineColor = GetCurrentOutlineColor(); + + Font* pCurrentFont = GetCurrentFont(); + SysTryReturn(NID_GRP, pCurrentFont, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] This instance is not line wrapped yet."); + + _FontImpl* pFontImpl = _FontImpl::GetInstance(*pCurrentFont); + SysTryReturn(NID_GRP, pFontImpl, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get native font instance."); + + r = canvasImpl.SetPriorityFont(*pCurrentFont); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (_userWrap != TEXT_OBJECT_WRAP_TYPE_NONE) + { + 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] 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); + } + + delete[] pModifiedText; + pModifiedText = null; + + return E_SUCCESS; + } + + return E_SUCCESS; +} + +TextElement* +TextSimple::CloneN(TextComponentInfoValueType type, unsigned int value) +{ + TextSimple* pSimpleTextElement = null; + + 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] Memory allocation failed."); + + TextElement::CopyMembers(pSimpleTextElement); + + pSimpleTextElement->SetValue(SET_TEXT_OFFSET, _offset); + pSimpleTextElement->SetValue(SET_ALTERNATE_LOOK, _isAlternateLookEnabled); + pSimpleTextElement->SetValue(type, value); + pSimpleTextElement->SetUserWrap(_userWrap); + pSimpleTextElement->SetBackGroundDrawingModeEnabled(_isBackgroundDrawingModeEnabled); + + return pSimpleTextElement; +} + +TextElement* +TextSimple::CopyN(int startTextIndex, int textLength) +{ + const wchar_t* pText = null; + + TextSimple* pSimpleTextElement = null; + + if (startTextIndex >= _length) + { + return null; + } + + if (startTextIndex + textLength > _length) + { + textLength = _length - startTextIndex; + } + + if (textLength <= 0) + { + return null; + } + + 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] Memory allocation failed."); + + pSimpleTextElement->SetUserWrap(_userWrap); + pSimpleTextElement->_isBackgroundDrawingModeEnabled = _isBackgroundDrawingModeEnabled; + + return pSimpleTextElement; +} + +unsigned int +TextSimple::GetValue(TextComponentInfoValueType type) const +{ + switch (type) + { + case SET_FONT: + // fall through + return (unsigned int) _pFont; + + case SET_FONT_SIZE: + // fall through + return (unsigned int) _pFont->GetSize(); + + case SET_FONT_STYLE: + // fall through + return (unsigned int) (_FontImpl::GetInstance(*_pFont))->GetStyle(); + + case SET_FONT_FGCOLOR: + // fall through + return (unsigned int) _foregroundColor.GetRGB32(); + + case SET_FONT_BGCOLOR: + // fall through + return (unsigned int) _backgroundColor.GetRGB32(); + + case SET_FONT_OUTLINECOLOR: + // fall through + return (unsigned int) _outlineColor.GetRGB32(); + + case SET_TEXT_OFFSET: + // fall through + return (unsigned int) _offset; + + case SET_ALTERNATE_LOOK: + // fall through + return (unsigned int) _isAlternateLookEnabled; + + case SET_ALTERNATIVE_FGCOLOR: + // fall through + return (unsigned int) GetAlternativeForegroundColor().GetRGB32(); + + case SET_ALTERNATE_DISPLAY_BITMAP: + return (unsigned int) &__bitmapProperty; + + default: + // fall through + return -1; + } + + return 0; +} + +result +TextSimple::SetValue(TextComponentInfoValueType type, unsigned int value) +{ + result r = E_SUCCESS; + Font* pFont = null; + + switch (type) + { + case SET_FONT: + { + if (!(Font*) value) + { + return E_INVALID_ARG; + } + + pFont = _FontImpl::CloneN(const_cast (*(Font*) value)); + r = GetLastResult(); + SysTryReturn(NID_GRP, pFont, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + Release(_pFont); + + _pFont = pFont; + } + break; + + case SET_FONT_SIZE: + (_FontImpl::GetInstance(*_pFont))->SetSize(static_cast(value)); + break; + + case SET_FONT_STYLE: + (_FontImpl::GetInstance(*_pFont))->SetStyle(value); + break; + + case SET_FONT_FGCOLOR: + _foregroundColor = Color(value); + if (_shadow) + { + SetTextShadowColor(); + } + break; + + case SET_FONT_BGCOLOR: + _backgroundColor = Color(value); + break; + + case SET_FONT_OUTLINECOLOR: + _outlineColor = Color(value); + break; + + case SET_TEXT_OFFSET: + _offset = (int) value; + break; + + case SET_ALLVALUE_CLONE: + break; + + case SET_ALTERNATE_LOOK: + _isAlternateLookEnabled = (value > 0) ? true : false; + break; + + case SET_ALTERNATIVE_FGCOLOR: + SetAlternativeForegroundColor(Color(value)); + break; + + case SET_ALTERNATE_DISPLAY_BITMAP: + SetBitmap(*(BitmapDisplayProperty*) value); + break; + + default: + break; + } + + return E_SUCCESS; +} + +result +TextSimple::SetFont(const Font* pFont) +{ + SysTryReturn(NID_GRP, pFont, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + result r = E_SUCCESS; + Font* pTmpFont = null; + + pTmpFont = _FontImpl::CloneN(const_cast (*pFont)); + r = GetLastResult(); + SysTryReturn(NID_GRP, pTmpFont, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + Release(_pFont); + + _pFont = pTmpFont; + + return E_SUCCESS; +} + +void +TextSimple::SetForegroundColor(const Color& color) +{ + _foregroundColor = color; + if (_shadow) + { + SetTextShadowColor(); + } +} + +void +TextSimple::SetBackgroundColor(const Color& color) +{ + _backgroundColor = color; +} + +void +TextSimple::SetOutlineColor(const Color& color) +{ + _outlineColor = color; + _outline = true; +} + +void +TextSimple::SetOutlineEnabled(bool enable) +{ + _outline = enable; +} + +bool +TextSimple::IsOutlineEnable(void) const +{ + return _outline; +} + +const Font* +TextSimple::GetFont(void) const +{ + return _pFont; +} + +Color +TextSimple::GetForegroundColor(void) const +{ + return _foregroundColor; +} + +Color +TextSimple::GetBackgroundColor(void) const +{ + return _backgroundColor; +} + +Color +TextSimple::GetOutlineColor(void) const +{ + return _outlineColor; +} + +result +TextSimple::SetTextOffset(int offset) +{ + SysTryReturn(NID_GRP, offset >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + _offset = offset; + + return E_SUCCESS; +} + +int +TextSimple::GetTextOffset(void) const +{ + return _offset; +} + +const wchar_t* +TextSimple::GetTextSource(void) const +{ + return _pText; +} + +const wchar_t* +TextSimple::GetText(void) const +{ + return &_pText[_offset]; +} + +bool +TextSimple::IsSame(wchar_t* pText, Font* pFont, const Color& fgColor, const Color& bgColor, const Color& outlineColor, const bool isBitmapDisplayMode) const +{ + if (_pText != pText) + { + return false; + } + + if (!TextUtility::IsSameFontAttribute(_pFont, pFont)) + { + return false; + } + + if (_foregroundColor != fgColor) + { + return false; + } + + if (_backgroundColor != bgColor) + { + return false; + } + + if (_outlineColor != outlineColor) + { + return false; + } + + if (__bitmapProperty.displayEnable != isBitmapDisplayMode) + { + return false; + } + + return true; +} + +result +TextSimple::ChangeTextOffset(wchar_t* pText, int gap) +{ + SysTryReturn(NID_GRP, _pText == pText, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + _offset += gap; + + return E_SUCCESS; +} + +int +TextSimple::GetSentenceLength(const wchar_t* pText, int textLength, int& actualLength) const +{ + int length = 0; + + actualLength = 0; + length = textLength; + + if (*pText == TEXT_LINE_FEED || *pText == TEXT_CARRIAGE_RETURN) + { + wchar_t mch = *pText; + pText--; + + if (mch != *pText && (*pText == TEXT_LINE_FEED || *pText == TEXT_CARRIAGE_RETURN)) + { + actualLength++; + length++; + pText++; + } + + return TEXT_RETBY_LINEFEED; + } + else + { + while (length && (*pText != 0)) + { + actualLength++; + pText++; + length--; + + if (*pText == TEXT_LINE_FEED || *pText == TEXT_PARAGRAPH_SEPARATOR) + { + actualLength++; + pText++; + length--; + + if (*pText == TEXT_CARRIAGE_RETURN) + { + actualLength++; + pText++; + length--; + } + + return TEXT_RETBY_LINEFEED; + } + } + } + + if (length == 0) + { + return TEXT_RETBY_LIMITLENGTH; + } + + return TEXT_RETBY_NORMAL; +} + +int +TextSimple::GetWordWrapLength(const wchar_t* pText, int textLength, int& actualLength) const +{ + int length = textLength; + actualLength = 0; + + if (*pText == (wchar_t)L' ' || *pText == TEXT_OBJ_CHARACTER) + { + actualLength++; + return TEXT_RETBY_NORMAL; + } + else if (*pText == TEXT_LINE_FEED || *pText == TEXT_CARRIAGE_RETURN || *pText == TEXT_PARAGRAPH_SEPARATOR) + { + wchar_t mch = *pText; + + actualLength++; + length--; + pText++; + + if (mch != *pText && (*pText == TEXT_LINE_FEED || *pText == TEXT_CARRIAGE_RETURN)) + { + actualLength++; + length--; + } + + return TEXT_RETBY_LINEFEED; + } + else + { + while (length && (*pText != 0)) + { + actualLength++; + length--; + pText++; + + if (*pText == (wchar_t)L' ' || *pText == TEXT_OBJ_CHARACTER) + { + return TEXT_RETBY_NORMAL; + } + else if (*pText == TEXT_LINE_FEED || *pText == TEXT_CARRIAGE_RETURN || *pText == TEXT_PARAGRAPH_SEPARATOR) + { + wchar_t mch = *pText; + + actualLength++; + length--; + pText++; + + if (mch != *pText && (*pText == TEXT_LINE_FEED || *pText == TEXT_CARRIAGE_RETURN)) + { + actualLength++; + length--; + } + + return TEXT_RETBY_LINEFEED; + } + } + } + + if (length == 0) + { + return TEXT_RETBY_LIMITLENGTH; + } + + return TEXT_RETBY_NORMAL; +} + +int +TextSimple::GetWordWrapLengthEx(const wchar_t* pText, int textLength, int& actualLength) const +{ + for (int i = 0; i < textLength; i++) + { + pText++; + } + + bool isCJ = false; + bool hasFollowingCharacter = false; + bool hasLeadingCharacter = false; + int length = textLength; + actualLength = textLength; + + // 1. Find Last Character + const wchar_t* pLastCharacter = pText - 1; + if (*pLastCharacter == TEXT_LINE_FEED || *pLastCharacter == TEXT_CARRIAGE_RETURN) + { + return TEXT_RETBY_LINEFEED; + } + else if (IsDelimiter(*pLastCharacter) || *pLastCharacter == TEXT_OBJ_CHARACTER) + { + return TEXT_RETBY_NORMAL; + } + + // 2. Set properties + if (IsChinese(*pLastCharacter) || IsJapanese(*pLastCharacter)) + { + isCJ = true; + } + + if (IsLeadingCharacter(*pLastCharacter)) + { + pLastCharacter--; + if (IsChinese(*pLastCharacter) || IsJapanese(*pLastCharacter)) + { + isCJ = true; + hasFollowingCharacter = true; + } + } + + if (isCJ && IsFollowingCharacter(*pText)) + { + hasLeadingCharacter = true; + } + + // 3. Find Line breaking position + if (*pText == TEXT_OBJ_CHARACTER) + { + return TEXT_RETBY_NORMAL; + } + else if (*pText == TEXT_LINE_FEED || *pText == TEXT_CARRIAGE_RETURN) + { + return TEXT_RETBY_LINEFEED; + } + else if (hasFollowingCharacter || hasLeadingCharacter) + { + actualLength--; + return TEXT_RETBY_NORMAL; + } + else if (IsChinese(*pText) || IsJapanese(*pText)) + { + return TEXT_RETBY_NORMAL; + } + + actualLength--; + length--; + pText--; + + // 4. backSearching + while ((length >= 0) && (*pText != 0)) + { + if (IsDelimiter(*pText) || *pText == TEXT_OBJ_CHARACTER) + { + actualLength++; + length++; + pText++; + + return TEXT_RETBY_NORMAL; + } + else if (*pText == TEXT_LINE_FEED || *pText == TEXT_CARRIAGE_RETURN) + { + actualLength++; + length++; + pText++; + + return TEXT_RETBY_LINEFEED; + } + else if (IsChinese(*pText) || IsJapanese(*pText)) + { + actualLength++; + length++; + pText++; + + return TEXT_RETBY_NORMAL; + } + + actualLength--; + length--; + pText--; + } + + if (actualLength < 0) + { + actualLength = 0; + } + + return TEXT_RETBY_NORMAL; +} + +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] 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] Memory allocation failed."); + + fribidi_get_bidi_types(pBidiText, textLength, pBidiType); + + actualLength = 0; + for (int i = textLength - 1; i >= 0; i--) + { + if (!(pBidiType[i] & FRIBIDI_MASK_STRONG)) + { + actualLength = ++i; + break; + } + } + + delete[] pBidiText; + delete[] pBidiType; + + if (actualLength == 0) + { + return TEXT_RETBY_LIMITLENGTH; + } + + return TEXT_RETBY_NORMAL; + +CATCH: + if (pBidiText) + { + delete[] pBidiText; + pBidiText = null; + } + + if (pBidiType) + { + delete[] pBidiType; + pBidiType = null; + } + + return -1; +} + +Font* +TextSimple::GetCurrentFont(void) const +{ + return _pFont; +} + +Color +TextSimple::GetCurrentForegroundColor(void) const +{ + const TextSimple* pSimpleTextElement = null; + pSimpleTextElement = this; + + if (_isAlternateLookEnabled) + { + return pSimpleTextElement->GetAlternativeForegroundColor(); + } + else + { + return _foregroundColor; + } +} + +void +TextSimple::SetBackGroundDrawingModeEnabled(bool enable) +{ + _isBackgroundDrawingModeEnabled = enable; +} + +bool +TextSimple::IsBackGroundDrawingModeEnable(void) const +{ + return _isBackgroundDrawingModeEnabled; +} + +int +TextSimple::ConvertEnterToSpace(wchar_t* pDstText, const wchar_t* pSrcText, int textLength) +{ + int length = 0; + int i = 0; + + for (i = 0; i < textLength; ) + { + if (*pSrcText == TEXT_LINE_FEED) + { + *pDstText = (wchar_t)L' '; + length++; + pDstText++; + pSrcText++; + i++; + } + else if (*pSrcText == TEXT_CARRIAGE_RETURN) + { + if (*(pSrcText + 1) == TEXT_LINE_FEED) + { + *pDstText = (wchar_t)L' '; + length++; + pDstText++; + pSrcText += 2; + i += 2; + } + else + { + *pDstText = (wchar_t)L' '; + length++; + pDstText++; + pSrcText++; + i++; + } + } + else + { + *pDstText = *pSrcText; + length++; + + pDstText++; + pSrcText++; + i++; + } + } + + return length; +} + +void +TextSimple::SetUserWrap(TextObjectWrapType userWrap) +{ + _userWrap = userWrap; +} + +Color +TextSimple::GetCurrentBackgroundColor(void) const +{ + return _backgroundColor; +} + +Color +TextSimple::GetCurrentOutlineColor(void) const +{ + return _outlineColor; +} + +int +TextSimple::GetWordLength(int textIndex, int& wordLength) const +{ + int length = 0; + const wchar_t* pText = &_pText[textIndex]; + + length = GetTextOffset() + _length - textIndex; + if (length == 0) + { + return WORD_ERROR; + } + + if (*pText == (wchar_t)L' ') + { + wordLength = 1; + return WORD_SPACE; + } + else if (*pText == TEXT_LINE_FEED || *pText == TEXT_CARRIAGE_RETURN || *pText == TEXT_PARAGRAPH_SEPARATOR) + { + if (length == 1) + { + wordLength = 1; + return WORD_ENTER; + } + + wchar_t mch = *pText; + pText++; + + if (mch != *pText && (*pText == TEXT_LINE_FEED || *pText == TEXT_CARRIAGE_RETURN)) + { + wordLength = 2; + return WORD_ENTER; + } + + wordLength = 1; + return WORD_ENTER; + } + else + { + wordLength = 1; + length--; + pText++; + + while (length && (*pText != 0)) + { + if (*pText == (wchar_t)L' ') + { + return WORD_WORD; + } + else if (*pText == TEXT_LINE_FEED || *pText == TEXT_CARRIAGE_RETURN || *pText == TEXT_PARAGRAPH_SEPARATOR) + { + return WORD_WORD; + } + + length--; + pText++; + wordLength++; + } + + return WORD_WORD; + } + + return WORD_ERROR; +} + +result +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] 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)); + + Release(__bitmapProperty.pBitmap); + + __bitmapProperty.pBitmap = pBitmap; + __bitmapProperty.displayEnable = true; + + return E_SUCCESS; + +CATCH: + Release(pBitmap); + return r; +} + +result +TextSimple::SetBitmap(BitmapDisplayProperty bitmapDisplayProperty) +{ + if (!bitmapDisplayProperty.pBitmap) + { + Release(__bitmapProperty.pBitmap); + __bitmapProperty.displayEnable = false; + return E_SUCCESS; + } + + 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] 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)); + + Release(__bitmapProperty.pBitmap); + + __bitmapProperty.pBitmap = pBitmap; + __bitmapProperty.displayEnable = bitmapDisplayProperty.displayEnable; + + return E_SUCCESS; + +CATCH: + Release(pBitmap); + return r; +} + +const Bitmap* +TextSimple::GetBitmap(void) const +{ + return __bitmapProperty.pBitmap; +} + +bool +TextSimple::IsBitmapDisplayMode(void) const +{ + return __bitmapProperty.displayEnable; +} + +int +TextSimple::GetBaseline(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(GetBaselineF()); +} + +float +TextSimple::GetBaselineF(void) const +{ + Font* pCurrentFont = GetCurrentFont(); + SysTryReturn(NID_GRP, pCurrentFont, -1, E_INVALID_STATE, "[E_INVALID_STATE] This instance is not line wrapped yet."); + + _FontImpl* pFontImpl = _FontImpl::GetInstance(*pCurrentFont); + SysTryReturn(NID_GRP, pFontImpl, -1, E_SYSTEM, "[E_SYSTEM] Fail to get native font instance."); + + return pFontImpl->GetDescenderF(); +} + +bool +TextSimple::IsLeadingCharacter(const wchar_t ch) const +{ + bool isLeadingCharacter = false; + + switch (ch) + { + case 0x0024: //$ 0x0024 + // fall through + case 0x0028: //( 0x0028 + // fall through + case 0xff3b: //ï¼» 0xff3b + // fall through + case 0x300c: //「 0x300c + // fall through + case 0x300e: //『 0x300e + // fall through + case 0x2018: //‘ 0x2018 + // fall through + case 0x201c: //“ 0x201c + // fall through + case 0xff5b: //{ 0xff5b + // fall through + case 0x3010: //【 0x3010 + // fall through + case 0x3008: //〈 0x3008 + // fall through + case 0xffe5: //ï¿¥ 0xffe5 + // fall through + case 0x00a5: //Â¥ 0x00a5 + // fall through + case 0x300a: //《 0x300a + // fall through + case 0xff08: //( 0xff08 + // fall through + case 0xff04: //$ 0xff04 + // fall through + case 0x3014: //〔 0x3014 + // fall through + case 0xffe1: //ï¿¡ 0xffe1 + isLeadingCharacter = true; + break; + default: + break; + } + return isLeadingCharacter; +} + +bool +TextSimple::IsFollowingCharacter(const wchar_t ch) const +{ + bool isFollowingCharacter = false; + + switch (ch) + { + case 0x0021: // ! + // fall through + case 0x0025: // % + // fall through + case 0x0029: // ) + // fall through + case 0x002c: // , + // fall through + case 0x002e: // . + // fall through + case 0x003f: // ? + // fall through + case 0x005d: // ] + // fall through + case 0x007d: // } + // fall through + case 0x3002: //。 + // fall through + case 0xff61: //。 + // fall through + case 0x300d: // 」 + // fall through + case 0x3001: // 、 + // fall through + case 0xff0c: //. + // fall through + case 0xff0e: //. + // fall through + case 0xff64: //、 + // fall through + case 0xfe52: //﹒ + // fall through + case 0xff65: //ï½¥ + // fall through + case 0x30fb: //ï½¥ + // fall through + case 0x30a1: //ァ + // fall through + case 0x30a3: //ィ + // fall through + case 0x30a5: //ゥ + // fall through + case 0x30a7: //ェ + // fall through + case 0x30a9: //ォ + // fall through + case 0x30c3: //ッ + // fall through + case 0x30e3: //ャ + // fall through + case 0x30e5: //ュ + // fall through + case 0x30e7: //ョ + // fall through + case 0x3049: //ぉ + // fall through + case 0x3063: //っ + // fall through + case 0x3083: //ゃ + // fall through + case 0x3085: //ゅ + // fall through + case 0x3087: //ょ + // fall through + case 0x308e: //ゎ + // fall through + case 0x30ee: //ヮ + // fall through + case 0x30f5: //ヵ + // fall through + case 0x30f6: //ヶ + // fall through + case 0x30fd: //ヽ + // fall through + case 0x30fe: //ヾ + // fall through + case 0x30fc: //ー + // fall through + case 0x3005: //々 + // fall through + case 0x2019: //’ + // fall through + case 0x3041: //ぁ + // fall through + case 0x3043: //ぃ + // fall through + case 0x3045: //ぅ + // fall through + case 0x3047: //ぇ + // fall through + case 0xff05: //% + // fall through + case 0x00a2: //¢ + // fall through + case 0x30bd: //ソ + // fall through + case 0x30be: //ゾ + // fall through + case 0x2030: //‰ + // fall through + case 0x309b: //゛ + // fall through + case 0x309c: //゜ + // fall through + case 0x201d: //” + // fall through + case 0x00b0: //° + // fall through + case 0xff1a: //: + // fall through + case 0xff1b: //; + // fall through + case 0x003a: //: + // fall through + case 0x003b: //; + // fall through + case 0xff1f: //? + // fall through + case 0xff01: //! + // fall through + case 0xff09: //) + // fall through + case 0x3009: //〉 + // fall through + case 0x300b: //》 + // fall through + case 0x300f: //』 + // fall through + case 0x3011: //】 + // fall through + case 0x3015: //〕 + // fall through + case 0xff3d: //ï¼½ + // fall through + case 0xff5d: //} + // fall through + case 0xff63: //ï½£ + isFollowingCharacter = true; + break; + default: + break; + } + + return isFollowingCharacter; +} + +bool +TextSimple::IsDelimiter(const wchar_t ch) const +{ + bool isDelimiter = false; + + switch (ch) + { + case 0x0020: // + // fall through + case 0x3000: // + // fall through + case 0x200b: // ZWSP + // fall through + case 0x3001: //、 + // fall through + case 0x3002: //。 + isDelimiter = true; + break; + } + + if (0xfe30 <= ch && ch <= 0xffe3) // ︰~ ï¿£ + { + isDelimiter = true; + } + + 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_TextTextSimpleList.cpp b/src/graphics/text/FGrp_TextTextSimpleList.cpp new file mode 100644 index 0000000..46885bd --- /dev/null +++ b/src/graphics/text/FGrp_TextTextSimpleList.cpp @@ -0,0 +1,528 @@ +// +// 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_TextTextSimpleList.cpp + * @brief This is the implementation file for TextSimpleList class. + */ + +#include +#include +#include "FGrp_TextTextSimpleList.h" +#include "FGrp_TextCommon.h" + +namespace Tizen { namespace Graphics +{ + +namespace _Text +{ +SimpleList* +TextSimpleList::Create(void) +{ + SimpleList* pSimpleList = null; + + pSimpleList = new (std::nothrow) SimpleList; + + return pSimpleList; +} + +bool +TextSimpleList::Destory(SimpleList* pSimpleList) +{ + DeleteAllObject(pSimpleList); + + delete pSimpleList; + pSimpleList = null; + + return true; +} + +bool +TextSimpleList::Init(SimpleList* pSimpleList) +{ + SysTryReturn(NID_GRP, pSimpleList, false, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + pSimpleList->pHeaderNode = null; + pSimpleList->pTailNode = null; + pSimpleList->nodeCount = 0; + + return true; +} + +SimpleNode* +TextSimpleList::InsertObject(SimpleList* pSimpleList, void* pObject, int index) +{ + SysTryReturn(NID_GRP, pSimpleList, null, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + SimpleNode* pNode = null; + SimpleNode* pNextNode = null; + + if (index < 1) + { + return AddObject(pSimpleList, pObject); + } + + if (index >= pSimpleList->nodeCount) + { + return AppendObject(pSimpleList, pObject); + } + + pNode = new (std::nothrow) SimpleNode; + if (pNode == null) + { + return null; + } + + pNode->pObject = pObject; + + SimpleNode* pPrevNode = GetNthNode(pSimpleList, index - 1); + SysTryCatch(NID_GRP, pPrevNode, , E_SYSTEM, "[E_SYSTEM] Fail to get node."); + + pNextNode = pPrevNode->pNext; + SysTryCatch(NID_GRP, pNextNode, , E_SYSTEM, "[E_SYSTEM] Fail to get node."); + + pNode->pNext = pNextNode; + pPrevNode->pNext = pNode; + + pNode->pPrev = pPrevNode; + pNextNode->pPrev = pNode; + + pSimpleList->nodeCount++; + + return pNode; + +CATCH: + delete pNode; + pNode = null; + + return null; +} + +bool +TextSimpleList::IsEmpty(SimpleList* pSimpleList) +{ + SysTryReturn(NID_GRP, pSimpleList, false, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + bool r = false; + + if (pSimpleList->nodeCount == 0) + { + r = true; + } + + return r; +} + +int +TextSimpleList::GetCount(SimpleList* pSimpleList) +{ + SysTryReturn(NID_GRP + , pSimpleList + , false, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + return pSimpleList->nodeCount; +} + +SimpleNode* +TextSimpleList::AddObject(SimpleList* pSimpleList, void* pObject) +{ + SysTryReturn(NID_GRP, pSimpleList, null, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + SimpleNode* pNode = null; + pNode = new (std::nothrow) SimpleNode; + if (pNode == null) + { + return null; + } + + pNode->pObject = pObject; + + if (pSimpleList->pHeaderNode != null) + { + pNode->pNext = pSimpleList->pHeaderNode; + pNode->pPrev = null; + pSimpleList->pHeaderNode->pPrev = pNode; + pSimpleList->pHeaderNode = pNode; + } + else + { + pSimpleList->pHeaderNode = pNode; + pSimpleList->pTailNode = pNode; + pNode->pNext = null; + pNode->pPrev = null; + } + + pSimpleList->nodeCount++; + + return pNode; +} + +SimpleNode* +TextSimpleList::AppendObject(SimpleList* pSimpleList, void* pObject) +{ + SysTryReturn(NID_GRP, pSimpleList, null, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + SimpleNode* pNode = null; + pNode = new (std::nothrow) SimpleNode; + if (pNode == null) + { + return null; + } + + pNode->pObject = pObject; + + if (pSimpleList->pHeaderNode != null) + { + SimpleNode* pPrevNode = pSimpleList->pTailNode; + + pPrevNode->pNext = pNode; + pNode->pNext = null; + pNode->pPrev = pPrevNode; + pSimpleList->pTailNode = pNode; + } + else + { + pSimpleList->pHeaderNode = pNode; + pSimpleList->pTailNode = pNode; + pNode->pNext = null; + pNode->pPrev = null; + } + + pSimpleList->nodeCount++; + + return pNode; +} + +SimpleNode* +TextSimpleList::GetFirstNode(SimpleList* pSimpleList) +{ + SysTryReturn(NID_GRP, pSimpleList, null, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + return pSimpleList->pHeaderNode; +} + +SimpleNode* +TextSimpleList::GetLastNode(SimpleList* pSimpleList) +{ + SysTryReturn(NID_GRP + , pSimpleList + , null, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + return pSimpleList->pTailNode; +} + +bool +TextSimpleList::DeleteNode(SimpleList* pSimpleList, SimpleNode* pNode) +{ + SysTryReturn(NID_GRP, pSimpleList, false, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + SimpleNode* pPrevNode = null; + + if (pSimpleList->pHeaderNode == pNode) + { + if (pSimpleList->pTailNode == pNode) + { + pSimpleList->pHeaderNode = null; + pSimpleList->pTailNode = null; + } + else + { + pSimpleList->pHeaderNode = pSimpleList->pHeaderNode->pNext; + if (pSimpleList->pHeaderNode != null) + { + pSimpleList->pHeaderNode->pPrev = null; + } + } + } + else if (pSimpleList->pTailNode == pNode) + { + pSimpleList->pTailNode = pSimpleList->pTailNode->pPrev; + pSimpleList->pTailNode->pNext = null; + } + else + { + pPrevNode = pSimpleList->pHeaderNode; + while (pPrevNode && pPrevNode->pNext != pNode) + { + pPrevNode = pPrevNode->pNext; + } + + if (!pPrevNode) + { + return false; + } + + pPrevNode->pNext = pNode->pNext; + + if (pPrevNode->pNext != null) + { + pPrevNode->pNext->pPrev = pPrevNode; + } + } + + delete pNode; + pNode = null; + pSimpleList->nodeCount--; + + return true; +} + +SimpleNode* +TextSimpleList::GetNthNode(SimpleList* pSimpleList, int index) +{ + SysTryReturn(NID_GRP, pSimpleList, null, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + SimpleNode* pNode = null; + int n = 0; + + if (index < 0) + { + return null; + } + + pNode = pSimpleList->pHeaderNode; + while (pNode && n < index) + { + pNode = pNode->pNext; + n++; + } + + return pNode; +} + +void* +TextSimpleList::DeleteNthObject(SimpleList* pSimpleList, int index) +{ + SysTryReturn(NID_GRP, pSimpleList, null, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + SimpleNode* pNode = null; + void* pObject = null; + + if (pSimpleList->nodeCount == 0) + { + return null; + } + + pNode = GetNthNode(pSimpleList, index); + if (!pNode) + { + return null; + } + + pObject = pNode->pObject; + + if (pSimpleList->pHeaderNode == pNode) + { + if (pSimpleList->pTailNode == pNode) + { + pSimpleList->pHeaderNode = null; + pSimpleList->pTailNode = null; + } + else + { + pSimpleList->pHeaderNode = pSimpleList->pHeaderNode->pNext; + if (pSimpleList->pHeaderNode != null) + { + pSimpleList->pHeaderNode->pPrev = null; + } + } + } + else if (pSimpleList->pTailNode == pNode) + { + pSimpleList->pTailNode = pSimpleList->pTailNode->pPrev; + pSimpleList->pTailNode->pNext = null; + } + else + { + SimpleNode* pPrevNode = null; + + pPrevNode = pNode->pPrev; + pPrevNode->pNext = pNode->pNext; + if (pPrevNode->pNext != null) + { + pPrevNode->pNext->pPrev = pPrevNode; + } + } + + delete pNode; + pNode = null; + + pSimpleList->nodeCount--; + + return pObject; +} + +bool +TextSimpleList::DeleteAllObject(SimpleList* pSimpleList) +{ + SysTryReturn(NID_GRP, pSimpleList, false, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + SimpleNode* pNode = null; + SimpleNode* pNextNode = null; + void* pObject = null; + + if (pSimpleList->nodeCount <= 0) + { + return false; + } + + pNode = pSimpleList->pHeaderNode; + + while (pNode != null) + { + pNextNode = pNode->pNext; + pObject = pNode->pObject; + free(pObject); + delete pNode; + pNode = null; + + pNode = pNextNode; + } + + pSimpleList->nodeCount = 0; + pSimpleList->pHeaderNode = null; + pSimpleList->pTailNode = null; + + return true; +} + +void* +TextSimpleList::GetFirstObject(SimpleList* pSimpleList) +{ + SysTryReturn(NID_GRP, pSimpleList, null, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + SimpleNode* pNode = null; + + pNode = GetFirstNode(pSimpleList); + + SysTryReturn(NID_GRP + , pNode + , false, E_SYSTEM, "[E_SYSTEM] Fail to get first node."); + + return pNode->pObject; +} + +void* +TextSimpleList::GetNthObject(SimpleList* pSimpleList, int index) +{ + if (pSimpleList->nodeCount == 0) + { + return null; + } + + SysTryReturn(NID_GRP, pSimpleList && index >= 0 && index < pSimpleList->nodeCount, null, E_INVALID_ARG + , "[E_INVALID_ARG] The argument is invalid. (index = %d, pSimpleList->nodeCount = %d)", index, pSimpleList->nodeCount); + + SimpleNode* pNode = null; + + pNode = GetNthNode(pSimpleList, index); + + SysTryReturn(NID_GRP, pNode, null, E_SYSTEM, "[E_SYSTEM] Fail to get Nth Node."); + + return pNode->pObject; +} + +int +TextSimpleList::GetObjectIndex(SimpleList* pSimpleList, void* pObject) +{ + SysTryReturn(NID_GRP, pSimpleList, -1, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + SimpleNode* pNode = null; + int index = 0; + + pNode = pSimpleList->pHeaderNode; + while (pNode) + { + if (pNode->pObject == pObject) + { + return index; + } + + index++; + pNode = pNode->pNext; + } + + return -1; +} + +SimpleNode* +TextSimpleList::InsertObjectAfterNode(SimpleList* pSimpleList, SimpleNode* pSimpleNode, void* pObject) +{ + SysTryReturn(NID_GRP, pSimpleList, null, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + SimpleNode* pNode = null; + pNode = new (std::nothrow) SimpleNode; + if (pNode == null) + { + return null; + } + + pNode->pObject = pObject; + + pNode->pNext = pSimpleNode->pNext; + if (pSimpleNode->pNext != null) + { + pSimpleNode->pNext->pPrev = pNode; + } + + pSimpleNode->pNext = pNode; + pNode->pPrev = pSimpleNode; + + if (pSimpleList->pTailNode == pSimpleNode) + { + pSimpleList->pTailNode = pNode; + } + + pSimpleList->nodeCount++; + + return pNode; +} + +SimpleNode* +TextSimpleList::InsertObjectBeforeNode(SimpleList* pSimpleList, SimpleNode* pSimpleNode, void* pObject) +{ + SysTryReturn(NID_GRP, pSimpleList, null, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + SimpleNode* pNode = null; + pNode = new (std::nothrow) SimpleNode; + if (pNode == null) + { + return null; + } + + pNode->pObject = pObject; + + if (pSimpleNode->pPrev == null) + { + pNode->pPrev = null; + pNode->pNext = pSimpleNode; + pSimpleNode->pPrev = pNode; + pSimpleList->pHeaderNode = pNode; + } + else + { + pNode->pNext = pSimpleNode; + pSimpleNode->pPrev->pNext = pNode; + pNode->pPrev = pSimpleNode->pPrev; + pSimpleNode->pPrev = pNode; + } + + pSimpleList->nodeCount++; + return pNode; +} + +}}} // Tizen::Graphics::_Text diff --git a/src/graphics/text/FGrp_TextTextSimpleList.h b/src/graphics/text/FGrp_TextTextSimpleList.h new file mode 100644 index 0000000..01cfe1c --- /dev/null +++ b/src/graphics/text/FGrp_TextTextSimpleList.h @@ -0,0 +1,92 @@ +// +// 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_TextTextSimpleList.h + * @brief This is the header file for the TextSimpleList class. + * + * This header file contains the declarations of the %TextSimpleList class. + */ + +#ifndef _FGRP_INTERNAL_TEXT_SIMPLE_LIST_H_ +#define _FGRP_INTERNAL_TEXT_SIMPLE_LIST_H_ + +namespace Tizen { namespace Graphics +{ + +namespace _Text +{ +struct SimpleNode +{ + struct SimpleNode* pNext; + struct SimpleNode* pPrev; + void* pObject; +}; + +struct SimpleList +{ + SimpleNode* pHeaderNode; + SimpleNode* pTailNode; + int nodeCount; +}; + +class TextSimpleList +{ +public: + static SimpleList* Create(void); + + static bool Destory(SimpleList* pSimpleList); + + static bool Init(SimpleList* pSimpleList); + + static SimpleNode* InsertObject(SimpleList* pSimpleList, void* pObject, int index); + + static SimpleNode* AddObject(SimpleList* pSimpleList, void* pObject); + + static SimpleNode* AppendObject(SimpleList* pSimpleList, void* pObject); + + static bool DeleteNode(SimpleList* pSimpleList, SimpleNode* pNode); + + static void* DeleteNthObject(SimpleList* pSimpleList, int index); + + static bool DeleteAllObject(SimpleList* pSimpleList); + + static SimpleNode* InsertObjectAfterNode(SimpleList* pSimpleList, SimpleNode* pSimpleNode, void* pObject); + + static SimpleNode* InsertObjectBeforeNode(SimpleList* pSimpleList, SimpleNode* pSimpleNode, void* pObject); + + static int GetCount(SimpleList* pSimpleList); + + static SimpleNode* GetFirstNode(SimpleList* pSimpleList); + + static SimpleNode* GetLastNode(SimpleList* pSimpleList); + + static SimpleNode* GetNthNode(SimpleList* pSimpleList, int index); + + static void* GetFirstObject(SimpleList* pSimpleList); + + static void* GetNthObject(SimpleList* pSimpleList, int index); + + static int GetObjectIndex(SimpleList* pSimpleList, void* pObject); + + static bool IsEmpty(SimpleList* pSimpleList); + +}; // SimpleList + +}}} // Tizen::Graphics::_Text + +#endif // _FGRP_INTERNAL_TEXT_SIMPLE_LIST_H_ diff --git a/src/graphics/text/FGrp_TextTextUtility.cpp b/src/graphics/text/FGrp_TextTextUtility.cpp new file mode 100644 index 0000000..0a7ada0 --- /dev/null +++ b/src/graphics/text/FGrp_TextTextUtility.cpp @@ -0,0 +1,642 @@ +// +// 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_TextTextUtility.cpp + * @brief This is the implementation file for TextUtility class. + */ + +#include +#include +#include +#include +#include "FGrp_CanvasImpl.h" +#include "FGrp_FontImpl.h" +#include "FGrp_TextCommon.h" +#include "FGrp_TextTextSimple.h" +#include "FGrp_TextTextUtility.h" +#include "../util/FGrp_Util.h" +#include "FGrp_CoordinateSystemUtils.h" + +using namespace Tizen::Base::Utility; +using namespace Tizen::Base; + +#define Release(x) \ + if (x) \ + { \ + delete x; \ + x = null; \ + } + +namespace Tizen { namespace Graphics +{ + +#define ALMOST_ZERO_FLOAT 0.00001f + +namespace _Text +{ +TextElementType +TextUtility::GetObjectTypeFromValueType(TextComponentInfoValueType type) +{ + if (type < MAX_TEXTOBJECT_VALUE) + { + return TEXT_ELEMENT_TYPE_TEXT; + } + else if (type < MAX_IMAGEOBJECT_VALUE) + { + return TEXT_ELEMENT_TYPE_IMAGE; + } + + return TEXT_ELEMENT_TYPE_MAX; +} + +bool +TextUtility::CanMerge(TextElement* pCurrentTextElement, TextElement* pNextTextElement) +{ + SysTryReturn(NID_GRP, pCurrentTextElement, false, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + SysTryReturn(NID_GRP, pNextTextElement, false, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + if (pCurrentTextElement->GetType() != TEXT_ELEMENT_TYPE_TEXT || pNextTextElement->GetType() != TEXT_ELEMENT_TYPE_TEXT) + { + return false; + } + + TextSimple* pCurrentSimpleText = dynamic_cast < TextSimple* >(pCurrentTextElement); + TextSimple* pNextSimpleText = dynamic_cast < TextSimple* >(pNextTextElement); + if (pCurrentSimpleText == null || pNextSimpleText == null) + { + return false; + } + + if (pCurrentSimpleText->GetTextSource() != pNextSimpleText->GetTextSource()) + { + return false; + } + + if (!IsSameFontAttribute(pCurrentSimpleText->GetFont(), pNextSimpleText->GetFont())) + { + return false; + } + + if (pCurrentSimpleText->GetForegroundColor() != pNextSimpleText->GetForegroundColor()) + { + return false; + } + + if (pCurrentSimpleText->GetBackgroundColor() != pNextSimpleText->GetBackgroundColor()) + { + return false; + } + + if (pCurrentSimpleText->GetBitmap() != null || pNextSimpleText->GetBitmap() != null) + { + return false; + } + + if (pCurrentSimpleText->GetTextOffset() + pCurrentSimpleText->GetTextLength() != pNextSimpleText->GetTextOffset()) + { + return false; + } + + if (pCurrentSimpleText->IsBitmapDisplayMode() != pNextSimpleText->IsBitmapDisplayMode()) + { + return false; + } + + return true; +} + +bool +TextUtility::IsSameFontAttribute(const Font* pFontSrc, const Font* pFontTarget) +{ + if (pFontSrc->GetSize() != pFontTarget->GetSize()) + { + return false; + } + + if (pFontSrc->IsBold() != pFontTarget->IsBold()) + { + return false; + } + + if (pFontSrc->IsItalic() != pFontTarget->IsItalic()) + { + return false; + } + + if (pFontSrc->IsPlain() != pFontTarget->IsPlain()) + { + return false; + } + + if (pFontSrc->IsStrikeOut() != pFontTarget->IsStrikeOut()) + { + return false; + } + + if (pFontSrc->IsUnderlined() != pFontTarget->IsUnderlined()) + { + return false; + } + + return true; +} + +int +TextUtility::GetFontMaxHeight(Font* pFont) +{ + return _CoordinateSystemUtils::ConvertToInteger(GetFontMaxHeightF(pFont)); +} + +int +TextUtility::GetFontMaxHeight(_FontImpl* pFont) +{ + return _CoordinateSystemUtils::ConvertToInteger(GetFontMaxHeightF(pFont)); +} + +float +TextUtility::GetFontMaxHeightF(Font* pFont) +{ + if (!pFont) + { + return 0; + } + + return pFont->GetMaxHeightF(); +} + +float +TextUtility::GetFontMaxHeightF(_FontImpl* pFont) +{ + if (!pFont) + { + return 0; + } + + return pFont->GetLeadingF(); +} + +int +TextUtility::GetTextLength(const wchar_t* pText) +{ + int count = 0; + + while (*(pText + count) != 0) + { + count++; + } + + return count; +} + +int +TextUtility::GetCharCountInWidth(_FontImpl* pFont, const wchar_t* pText, int textLength, float maxWidth, bool outline, float& width, float& height) +{ + if (!pFont) + { + return 0; + } + + result r = E_SUCCESS; + int count = 0; + int lineBreaking = 0; + FloatDimension lineDimension; + const wchar_t* pTextStart = pText; + const wchar_t* pTextEnd = null; + + r = pFont->GetTextExtent(maxWidth, pText, 0, textLength, outline, count, lineDimension); + SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pTextEnd = pText + count; + + while (pText < pTextEnd) + { + if (*pText == TEXT_LINE_FEED || *pText == TEXT_CARRIAGE_RETURN) + { + break; + } + + pText++; + lineBreaking++; + } + + if (lineBreaking < count) + { + count = lineBreaking; + r = pFont->GetTextExtent(pTextStart, lineBreaking, lineDimension, outline); + SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + width = lineDimension.width; + height = pFont->GetLeadingF(); + + SetLastResult(E_SUCCESS); + + return count; + +CATCH: + width = 0; + height = 0; + return 0; +} + +result +TextUtility::CopyText(wchar_t* pDstText, const wchar_t* pSrcText, int textLength) +{ + SysTryReturn(NID_GRP, pDstText && pSrcText, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + int srcTextLength = 0; + wchar_t ch = 0; + + srcTextLength = GetTextLength(pSrcText); + if (srcTextLength < textLength) + { + textLength = srcTextLength; + } + + if (textLength == 0) + { + *pDstText = 0; + return E_SUCCESS; + } + + do + { + ch = *pSrcText++; + *pDstText++ = ch; + if (--textLength == 0) + { + if (ch != 0) + { + *pDstText++ = 0; + } + return E_SUCCESS; + } + } + while (ch != 0); + + do + { + *pDstText++ = 0; + } + while (0 < --textLength); + + return E_SUCCESS; +} + +result +TextUtility::CopyText(wchar_t* pDstText, const wchar_t* pSrcText) +{ + SysTryReturn(NID_GRP, pDstText && pSrcText, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + int i = 0; + wchar_t ch = 0; + + do + { + ch = pSrcText[i]; + pDstText[i] = ch; + i++; + } + while (ch != 0); + + return E_SUCCESS; +} + +result +TextUtility::DrawText(_CanvasImpl& canvasImpl, int x, int y, const wchar_t* pText, int textLength) +{ + return DrawText(canvasImpl, _CoordinateSystemUtils::ConvertToFloat(x), _CoordinateSystemUtils::ConvertToFloat(y), pText, textLength); +} + +result +TextUtility::DrawText(_CanvasImpl& canvasImpl, float x, float y, const wchar_t* pText, int textLength) +{ + result r = E_SUCCESS; + FloatPoint point(x, y); + + Tizen::Base::String text(pText); + + if (pText[textLength - 1] == TEXT_LINE_FEED || pText[textLength - 1] == TEXT_CARRIAGE_RETURN) + { + textLength--; + } + + r = canvasImpl.DrawText(point, text, 0, textLength); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +TextUtility::DrawOutlineText(_CanvasImpl& canvasImpl, int x, int y, const wchar_t* pText, int textLength, Color outlineColor) +{ + return DrawOutlineText(canvasImpl, _CoordinateSystemUtils::ConvertToFloat(x), _CoordinateSystemUtils::ConvertToFloat(y), pText, textLength, outlineColor); +} + +result +TextUtility::DrawOutlineText(_CanvasImpl& canvasImpl, float x, float y, const wchar_t* pText, int textLength, Color outlineColor) +{ + result r = E_SUCCESS; + FloatPoint point(x, y); + + Tizen::Base::String text(pText); + + if (pText[textLength - 1] == TEXT_LINE_FEED || pText[textLength - 1] == TEXT_CARRIAGE_RETURN) + { + textLength--; + } + + r = canvasImpl.DrawText(point, text, 0, textLength, outlineColor); + SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +TextUtility::GetTextExtent(_FontImpl* pFont, const wchar_t* pText, int textLength, bool outline, float& width, float& height) +{ + SysTryReturn(NID_GRP, pFont && pText, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + result r = E_SUCCESS; + int lineBreaking = 0; + FloatDimension lineDimension; + const wchar_t* pTextStart = pText; + const wchar_t* pTextEnd = null; + + r = pFont->GetTextExtent(pText, textLength, lineDimension, outline); + SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pTextEnd = pText + textLength; + + while (pText < pTextEnd) + { + if (*pText == TEXT_LINE_FEED || *pText == TEXT_CARRIAGE_RETURN) + { + break; + } + + pText++; + lineBreaking++; + } + + if (lineBreaking < textLength) + { + r = pFont->GetTextExtent(pTextStart, lineBreaking, lineDimension, outline); + SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + width = lineDimension.width; + height = pFont->GetLeadingF(); + + return E_SUCCESS; + +CATCH: + width = 0; + height = 0; + return r; +} + +result +TextUtility::GetTextExtent(Font* pFont, const wchar_t* pText, int textLength, bool outline, float& width, float& height) +{ + SysTryReturn(NID_GRP, pFont && pText, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid."); + + _FontImpl* pFontImpl = _FontImpl::GetInstance(*pFont); + SysTryReturn(NID_GRP, pFontImpl, -1, E_SYSTEM, "[E_SYSTEM] Fail to get native font instance."); + + return TextUtility::GetTextExtent(pFontImpl, pText, textLength, outline, width, height); +} + +bool +TextUtility::IsLTRCharacter(wchar_t ch) +{ + FriBidiChar text[1] = { ch }; + FriBidiCharType type[1] = { 0 }; + fribidi_get_bidi_types(text, 1, type); + + if (type[0] & (FRIBIDI_MASK_STRONG | FRIBIDI_MASK_LETTER)) + { + if (!(type[0] & FRIBIDI_MASK_RTL)) + { + return true; + } + } + + return false; +} + +bool +TextUtility::IsRTLCharacter(wchar_t ch) +{ + FriBidiChar text[1] = { ch }; + FriBidiCharType type[1] = { 0 }; + fribidi_get_bidi_types(text, 1, type); + + if (type[0] & (FRIBIDI_MASK_STRONG | FRIBIDI_MASK_LETTER)) + { + if (type[0] & FRIBIDI_MASK_RTL) + { + return true; + } + } + + return false; +} + +bool +TextUtility::IsStrongCharacter(wchar_t ch) +{ + FriBidiChar text[1] = { ch }; + FriBidiCharType type[1] = { 0 }; + fribidi_get_bidi_types(text, 1, type); + + if (type[0] & (FRIBIDI_MASK_STRONG | FRIBIDI_MASK_LETTER)) + { + return true; + } + + 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) +{ + return t >= 0 ? t : -t; +} + +const float +TextUtility::Min(const float a, const float b) +{ + return (a < b) ? a : b; +} + +const float +TextUtility::Max(const float a, const float b) +{ + return (a >= b) ? a : b; +} + +bool +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 new file mode 100644 index 0000000..4cb4d8e --- /dev/null +++ b/src/graphics/text/FGrp_TextTextUtility.h @@ -0,0 +1,102 @@ +// +// 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_TextTextUtility.h + * @brief This file contains the declarations of TextUtility class. + */ + +#ifndef _FGRP_INTERNAL_TEXT_UTILITY_H_ +#define _FGRP_INTERNAL_TEXT_UTILITY_H_ + +#include "FGrp_CanvasImpl.h" +#include "FGrp_FontImpl.h" +#include "FGrp_TextCommon.h" + +namespace Tizen { namespace Graphics +{ + +namespace _Text +{ + +class TextElement; +class TextSimple; + +class TextUtility +{ +public: + static TextElementType GetObjectTypeFromValueType(TextComponentInfoValueType type); + + static bool CanMerge(TextElement* pCurrentTextElement, TextElement* pNextTextElement); + + static bool IsSameFontAttribute(const Font* pFontSrc, const Font* pFontTarget); + + static int GetFontMaxHeight(Font* pFont); + + static int GetFontMaxHeight(_FontImpl* pFont); + + static float GetFontMaxHeightF(Font* pFont); + + static float GetFontMaxHeightF(_FontImpl* pFont); + + static int GetTextLength(const wchar_t* pText); + + static int GetCharCountInWidth(_FontImpl* pFont, const wchar_t* pText, int textLength, float maxWidth, bool outline, float& width, float& height); + + static result GetTextExtent(_FontImpl* pFont, const wchar_t* pText, int textLength, bool outline, float& width, float& height); + + static result GetTextExtent(Font* pFont, const wchar_t* pText, int textLength, bool outline, float& width, float& height); + + static result CopyText(wchar_t* pDstText, const wchar_t* pSrcText, int textLength); + + static result CopyText(wchar_t* pDstText, const wchar_t* pSrcText); + + static result DrawText(_CanvasImpl& canvasImpl, int x, int y, const wchar_t* pText, int textLength); + + static result DrawText(_CanvasImpl& canvasImpl, float x, float y, const wchar_t* pText, int textLength); + + static result DrawOutlineText(_CanvasImpl& canvasImpl, int x, int y, const wchar_t* pText, int textLength, Color outlineColor); + + static result DrawOutlineText(_CanvasImpl& canvasImpl, float x, float y, const wchar_t* pText, int textLength, Color outlineColor); + + static bool IsLTRCharacter(wchar_t ch); + + static bool IsRTLCharacter(wchar_t ch); + + 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 + +#endif // _FGRP_INTERNAL_TEXT_UTILITY_H_ diff --git a/src/graphics/util/FGrp_Util.cpp b/src/graphics/util/FGrp_Util.cpp new file mode 100644 index 0000000..8dc9a56 --- /dev/null +++ b/src/graphics/util/FGrp_Util.cpp @@ -0,0 +1,659 @@ +// +// 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_Util.cpp + * @brief This is the implementation file for internal util class. + * + */ + +#include + +#include + +#include "FGrp_BitmapImpl.h" +#include "../FGrp_Canvas.h" +#include "../FGrp_Bitmap.h" +#include "FGrp_Util.h" +#include "../effect/FGrp_Effect.h" + + +using namespace Tizen::Base; + +namespace Tizen { namespace Graphics +{ + +namespace _Util +{ + +template +bool +IntersectGeneralRect(Rectangle& outRect, const Rectangle& srcRect1, const Rectangle& srcRect2) +{ + typedef T Type; + + struct TBound + { + Type x1, y1, x2, y2; + TBound(const Rectangle& rect) + : x1(rect.x) + , y1(rect.y) + , x2(rect.x + rect.w) + , y2(rect.y + rect.h) {} + }; + + TBound srcBound1(srcRect1); + TBound srcBound2(srcRect2); + + if (((srcRect1.w > 0 && srcRect1.h > 0) && (srcRect2.w > 0 && srcRect2.h > 0)) + && ((srcBound2.x2 > srcBound1.x1) && (srcBound2.x1 < srcBound1.x2) && (srcBound2.y2 > srcBound1.y1) && + (srcBound2.y1 < srcBound1.y2))) + { + outRect.x = (srcBound2.x1 <= srcBound1.x1) ? srcBound1.x1 : srcBound2.x1; + outRect.y = (srcBound2.y1 <= srcBound1.y1) ? srcBound1.y1 : srcBound2.y1; + outRect.w = ((srcBound2.x2 >= srcBound1.x2) ? srcBound1.x2 : srcBound2.x2) - outRect.x; + outRect.h = ((srcBound2.y2 >= srcBound1.y2) ? srcBound1.y2 : srcBound2.y2) - outRect.y; + + return true; + } + else + { + outRect.x = 0; + outRect.y = 0; + outRect.w = 0; + outRect.h = 0; + + return false; + } +} + +} // _Util + +result +_Util::Validate(const ::Tizen::Graphics::Rectangle& rtSrc, const ::Tizen::Graphics::Rectangle& rtDest) +{ + // check 1. is width/height less or equal than 0? + 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."); + 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? + if (rtSrc.x > rtDest.x + rtDest.width - 1 || + rtSrc.x + rtSrc.width - 1 < rtDest.x) + { + SysLogException(NID_GRP, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The argument is out of range."); + 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."); + 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; +} + +result +_Util::Validate(const ::Tizen::Graphics::FloatRectangle& rtSrcF, const ::Tizen::Graphics::FloatRectangle& rtDestF) +{ + // check 1. is width/height less or equal than 0? + 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."); + 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."); + 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."); + 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; +} + +result +_Util::Validate(const ::Tizen::Graphics::Point& ptSrc, const ::Tizen::Graphics::Rectangle& rtDest) +{ + if (rtDest.x <= ptSrc.x && ptSrc.x < rtDest.x + rtDest.width && rtDest.y <= ptSrc.y && ptSrc.y < rtDest.y + rtDest.height) + { + return E_SUCCESS; + } + + SysLogException(NID_GRP, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The argument is out of range."); + 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 +_Util::Validate(const ::Tizen::Graphics::FloatPoint& ptSrcF, const ::Tizen::Graphics::FloatRectangle& rtDestF) +{ + if (rtDestF.x <= ptSrcF.x && ptSrcF.x < rtDestF.x + rtDestF.width && rtDestF.y <= ptSrcF.y && ptSrcF.y < rtDestF.y + rtDestF.height) + { + return E_SUCCESS; + } + + SysLogException(NID_GRP, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The argument is out of range."); + 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 +_Util::IntersectRect(Rectangle& outRect, const Rectangle& srcRect1, const Rectangle& srcRect2) +{ + return _Util::IntersectGeneralRect(outRect, srcRect1, srcRect2); +} + +bool +_Util::IntersectRect(Rectangle& outRect, const Rectangle& srcRect1, const Rectangle& srcRect2) +{ + return _Util::IntersectGeneralRect(outRect, srcRect1, srcRect2); +} + +//////////////////////////////////////////////////////////////////////////////// +// LockManager class + +_Util::LockManager::LockManager(const _Bitmap& bitmap) + : __pBitmap(const_cast <_Bitmap*>(&bitmap)) + , __pCanvas(null) + , __pBitmapImpl(null) + , __pCanvasImpl(null) +{ + if ((__result = __pBitmap->Lock(__bufferInfo)) != E_SUCCESS) + { + __pBitmap = null; + } +} + +_Util::LockManager::LockManager(const _Canvas& canvas) + : __pBitmap(null) + , __pCanvas(const_cast <_Canvas*>(&canvas)) + , __pBitmapImpl(null) + , __pCanvasImpl(null) +{ + if ((__result = __pCanvas->Lock(__bufferInfo)) != E_SUCCESS) + { + __pCanvas = null; + } +} + +_Util::LockManager::LockManager(const class _BitmapImpl& bitmapImpl) + : __pBitmap(null) + , __pCanvas(null) + , __pBitmapImpl(const_cast <_BitmapImpl*>(&bitmapImpl)) + , __pCanvasImpl(null) +{ + if ((__result = __pBitmapImpl->Lock(__bufferInfo)) != E_SUCCESS) + { + __pBitmapImpl = null; + } +} + +_Util::LockManager::LockManager(const class _CanvasImpl& canvasImpl) + : __pBitmap(null) + , __pCanvas(null) + , __pBitmapImpl(null) + , __pCanvasImpl(const_cast <_CanvasImpl*>(&canvasImpl)) +{ + if ((__result = __pCanvasImpl->Lock(__bufferInfo)) != E_SUCCESS) + { + __pCanvasImpl = null; + } +} + +_Util::LockManager::~LockManager() +{ + if (__pBitmapImpl) + { + __pBitmapImpl->Unlock(); + } + + if (__pCanvasImpl) + { + __pCanvasImpl->Unlock(); + } + + if (__pBitmap) + { + __pBitmap->Unlock(); + } + + if (__pCanvas) + { + __pCanvas->Unlock(); + } +} + +bool +_Util::LockManager::IsValid(void) const +{ + return (__pBitmap || __pCanvas || __pBitmapImpl || __pCanvasImpl); +} + +result +_Util::LockManager::GetResult(void) const +{ + return __result; +} + +const BufferInfo& +_Util::LockManager::GetBufferInfo(void) const +{ + return __bufferInfo; +} + +//////////////////////////////////////////////////////////////////////////////// +// LockManagerFast class + +_Util::LockManagerFast::LockManagerFast(const _Bitmap& bitmap) + : __pBitmap(const_cast <_Bitmap*>(&bitmap)) + , __pCanvas(null) + , __pBitmapImpl(null) + , __pCanvasImpl(null) +{ + if ((__result = __pBitmap->LockFast(__bufferInfo)) != E_SUCCESS) + { + __pBitmap = null; + } +} + +_Util::LockManagerFast::LockManagerFast(const _Canvas& canvas) + : __pBitmap(null) + , __pCanvas(const_cast <_Canvas*>(&canvas)) + , __pBitmapImpl(null) + , __pCanvasImpl(null) +{ + if ((__result = __pCanvas->Lock(__bufferInfo)) != E_SUCCESS) + { + __pCanvas = null; + } +} + +_Util::LockManagerFast::LockManagerFast(const class _BitmapImpl& bitmapImpl) + : __pBitmap(null) + , __pCanvas(null) + , __pBitmapImpl(const_cast <_BitmapImpl*>(&bitmapImpl)) + , __pCanvasImpl(null) +{ + if ((__result = __pBitmapImpl->LockFast(__bufferInfo)) != E_SUCCESS) + { + __pBitmapImpl = null; + } +} + +_Util::LockManagerFast::LockManagerFast(const class _CanvasImpl& canvasImpl) + : __pBitmap(null) + , __pCanvas(null) + , __pBitmapImpl(null) + , __pCanvasImpl(const_cast <_CanvasImpl*>(&canvasImpl)) +{ + if ((__result = __pCanvasImpl->Lock(__bufferInfo)) != E_SUCCESS) + { + __pCanvasImpl = null; + } +} + +_Util::LockManagerFast::~LockManagerFast() +{ + if (__pBitmapImpl) + { + __pBitmapImpl->UnlockFast(); + } + + if (__pCanvasImpl) + { + __pCanvasImpl->Unlock(); + } + + if (__pBitmap) + { + __pBitmap->UnlockFast(); + } + + if (__pCanvas) + { + __pCanvas->Unlock(); + } +} + +bool +_Util::LockManagerFast::IsValid(void) const +{ + return (__pBitmap || __pCanvas || __pBitmapImpl || __pCanvasImpl); +} + +result +_Util::LockManagerFast::GetResult(void) const +{ + return __result; +} + +const BufferInfo& +_Util::LockManagerFast::GetBufferInfo(void) const +{ + return __bufferInfo; +} + +//////////////////////////////////////////////////////////////////////////////// +// GetPatchList() function + +namespace // unnamed +{ + +template +struct _NinePatchedKey +{ +}; + +template<> +struct _NinePatchedKey +{ + enum + { + KEY = 0xFF000000 + }; +}; + +template<> +struct _NinePatchedKey +{ + enum + { + KEY = 0x0000 + }; +}; + +template +int +_FindWidthOfSubregions(const _Util::Pixmap& dstImage, int pRegionWidthes[], bool pWidthStretchable[]) +{ + enum + { + KEY = _NinePatchedKey ::KEY + }; + + if (dstImage.depth != sizeof(Pixel) * 8) + { + return 0; + } + + // find a set of width + int index = 0; + Pixel* pProbe = (Pixel*) (dstImage.pBitmap) + 1; + Pixel* pProbeNext = pProbe + 1; + Pixel* pProbeEnd = pProbe + dstImage.width - 1; + + while (pProbeNext < pProbeEnd) + { + pRegionWidthes[index]++; + + if (((*pProbe == KEY) && (*pProbeNext != KEY)) || ((*pProbe != KEY) && (*pProbeNext == KEY))) + { + pWidthStretchable[index] = (*pProbe == KEY); + index++; + } + + pProbe++; + pProbeNext++; + } + + // in case of whole black + if (index == 0) + { + Pixel* pProbe = (Pixel*) (dstImage.pBitmap) + 1; + Pixel* pProbeEnd = pProbe + dstImage.width - 2; + + if (pProbe < pProbeEnd) + { + pWidthStretchable[index] = (*pProbe == KEY); + } + } + + return (index + 1); +} + +template +int +_FindHeightOfSubregions(const _Util::Pixmap& dstImage, int pRegionHeights[], bool pHeightStretchable[]) +{ + enum + { + KEY = _NinePatchedKey ::KEY + }; + + if (dstImage.depth != sizeof(Pixel) * 8) + { + return 0; + } + + // find a set of height + int index = 0; + int pitch = dstImage.bytesPerLine / (dstImage.depth / 8); + Pixel* pProbe = (Pixel*) (dstImage.pBitmap) + pitch; + Pixel* pProbeNext = pProbe + pitch; + Pixel* pProbeEnd = pProbe + (dstImage.height - 1) * pitch; + + while (pProbeNext < pProbeEnd) + { + pRegionHeights[index]++; + + if (((*pProbe == KEY) && (*pProbeNext != KEY)) || ((*pProbe != KEY) && (*pProbeNext == KEY))) + { + pHeightStretchable[index] = (*pProbe == KEY); + index++; + } + + pProbe += pitch; + pProbeNext += pitch; + } + + // in case of whole black + if (index == 0) + { + Pixel* pProbe = (Pixel*) (dstImage.pBitmap) + pitch; + Pixel* pProbeEnd = pProbe + (dstImage.height - 2) * pitch; + + if (pProbe < pProbeEnd) + { + pHeightStretchable[index] = (*pProbe == KEY); + } + } + + return (index + 1); +} + +} + +result +_Util::GetPatchList(_Util::AccumList <_Util::Pair <_Util::Rectangle, _Util::Rectangle > >& outList, const ::Tizen::Graphics::Rectangle& rect, const _Bitmap& bitmap) +{ + // 1. Find withes and heights of stretchable/unstretchable regions. + _Util::LockManager srcLock(bitmap); + SysTryReturnResult(NID_GRP, srcLock.IsValid(), E_OPERATION_FAILED, "The source bitmap cannot be locked.\n"); + + const BufferInfo& srcBufferInfo = srcLock.GetBufferInfo(); + _Util::Pixmap srcImage(srcBufferInfo.width, srcBufferInfo.height, srcBufferInfo.bitsPerPixel, srcBufferInfo.pPixels, + srcBufferInfo.pitch); + // APPLY_SRC_BITMAP_ATTRIB(srcImage, bitmap); + + std::unique_ptr pRegionWidthes(new (std::nothrow) int[srcImage.width]); + 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, "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, "Memory allocation failed.\n"); + + std::unique_ptr pHeightStretchable(new (std::nothrow) bool[srcImage.height]); + 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); + + int numWidth = 0; + int numHeight = 0; + + switch (srcImage.depth) + { + case 32: + numWidth = _FindWidthOfSubregions (srcImage, pRegionWidthes.get(), pWidthStretchable.get()); + numHeight = _FindHeightOfSubregions (srcImage, pRegionHeights.get(), pHeightStretchable.get()); + break; + + case 16: + numWidth = _FindWidthOfSubregions (srcImage, pRegionWidthes.get(), pWidthStretchable.get()); + numHeight = _FindHeightOfSubregions (srcImage, pRegionHeights.get(), pHeightStretchable.get()); + break; + } + SysTryReturnResult(NID_GRP, numWidth > 0 && numHeight > 0, E_OPERATION_FAILED, + "The source bitmap is not allowable for NintPatchedBitmap.\n"); + + // 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, "Memory allocation failed.\n"); + + int vertical = 0; + int horizontal = 0; + int index = 0; + + for (horizontal = 0; horizontal < numHeight; horizontal++) + { + pSrcRectLists[index].x = 1; + pSrcRectLists[index].y = + (horizontal == 0) ? 1 : pSrcRectLists[index - numWidth].y + pSrcRectLists[index - numWidth].height; + pSrcRectLists[index].width = pRegionWidthes[0]; + pSrcRectLists[index].height = pRegionHeights[horizontal]; + index++; + + for (vertical = 1; vertical < numWidth; vertical++) + { + pSrcRectLists[index].x = pSrcRectLists[index - 1].x + pSrcRectLists[index - 1].width; + pSrcRectLists[index].y = pSrcRectLists[index - 1].y; + pSrcRectLists[index].width = pRegionWidthes[vertical]; + pSrcRectLists[index].height = pSrcRectLists[index - 1].height; + index++; + } + } + + // 3. Calculate stretchable/unstretchable regions of the target size. + int sumWidthSrcStretchableRegions = 0; + int sumHeightSrcStretchableRegions = 0; + + for (vertical = 0; vertical < numWidth; vertical++) + { + if (pWidthStretchable[vertical]) + { + sumWidthSrcStretchableRegions += pRegionWidthes[vertical]; + } + } + + for (horizontal = 0; horizontal < numHeight; horizontal++) + { + if (pHeightStretchable[horizontal]) + { + sumHeightSrcStretchableRegions += pRegionHeights[horizontal]; + } + } + + int sumWidthDstStretchableRegions = rect.width - ((srcImage.width - 2) - sumWidthSrcStretchableRegions); + int sumHeightDstStretchableRegions = rect.height - ((srcImage.height - 2) - sumHeightSrcStretchableRegions); + + for (vertical = 0; vertical < numWidth; vertical++) + { + if (pWidthStretchable[vertical]) + { + pRegionWidthes[vertical] = + int(float(sumWidthDstStretchableRegions) * float(pRegionWidthes[vertical]) / + float(sumWidthSrcStretchableRegions) + 0.5f); + } + } + + for (horizontal = 0; horizontal < numHeight; horizontal++) + { + if (pHeightStretchable[horizontal]) + { + pRegionHeights[horizontal] = + int(float(sumHeightDstStretchableRegions) * float(pRegionHeights[horizontal]) / + float(sumHeightSrcStretchableRegions) + 0.5f); + } + } + + std::unique_ptr< ::Tizen::Graphics::Rectangle[]> pDstRectLists(new (std::nothrow) ::Tizen::Graphics::Rectangle[numWidth * numHeight]); + SysTryReturnResult(NID_GRP, pDstRectLists, E_OUT_OF_MEMORY, "Memory allocation failed.\n"); + + index = 0; + + for (horizontal = 0; horizontal < numHeight; horizontal++) + { + pDstRectLists[index].x = rect.x; + pDstRectLists[index].y = (horizontal == 0) ? rect.y : pDstRectLists[index - numWidth].y + pDstRectLists[index - numWidth].height; + pDstRectLists[index].width = pRegionWidthes[0]; + pDstRectLists[index].height = pRegionHeights[horizontal]; + index++; + + for (vertical = 1; vertical < numWidth; vertical++) + { + pDstRectLists[index].x = pDstRectLists[index - 1].x + pDstRectLists[index - 1].width; + pDstRectLists[index].y = pDstRectLists[index - 1].y; + pDstRectLists[index].width = pRegionWidthes[vertical]; + pDstRectLists[index].height = pDstRectLists[index - 1].height; + index++; + } + } + + // 4. Record stretchable/unstretchable regions of bitmap to list. + outList.Clear(); + + for (index = 0; index < numWidth * numHeight; index++) + { + _Util::Rectangle destRect = + { + pDstRectLists[index].x, + pDstRectLists[index].y, + pDstRectLists[index].width, + pDstRectLists[index].height + }; + + _Util::Rectangle sourRect = + { + pSrcRectLists[index].x, + pSrcRectLists[index].y, + pSrcRectLists[index].width, + pSrcRectLists[index].height + }; + + outList.Push(_Util::MakePair(destRect, sourRect)); + } + + return E_SUCCESS; +} + +}} // Tizen::Graphics diff --git a/src/graphics/util/FGrp_Util.h b/src/graphics/util/FGrp_Util.h new file mode 100644 index 0000000..04e326a --- /dev/null +++ b/src/graphics/util/FGrp_Util.h @@ -0,0 +1,445 @@ +// +// 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_Util.h + * @brief This is the header file for internal _Util namespace. + * + */ + +#ifndef _FGRP_INTERNAL_UTIL_H_ +#define _FGRP_INTERNAL_UTIL_H_ + +#include + +#include +#include + +#include +#include + +#include +#include + +#include +#include +#include +#include +#include + +#include "FGrp_BitmapImpl.h" +#include "FGrp_CanvasImpl.h" +#include "FGrp_FontImpl.h" +#include "FGrp_EnrichedTextImpl.h" + +#include "FGrp_UtilTemplate.h" +#include "FGrp_UtilType.h" + + +namespace Tizen { namespace Graphics +{ +class Point; + +class _Bitmap; +class _Canvas; + +namespace _Util +{ + +result Validate(const ::Tizen::Graphics::Rectangle& rtSrc, const ::Tizen::Graphics::Rectangle& rtDest); +result Validate(const ::Tizen::Graphics::FloatRectangle& rtSrcF, const ::Tizen::Graphics::FloatRectangle& rtDestF); +result Validate(const ::Tizen::Graphics::Point& ptSrc, const ::Tizen::Graphics::Rectangle& rtDest); +result Validate(const ::Tizen::Graphics::FloatPoint& ptSrcF, const ::Tizen::Graphics::FloatRectangle& rtDestF); + +template +result ValidateT(const Rectangle& rtSrc, const Rectangle& rtDest) +{ + // check 1. is width/height less or equal than 0? + if (rtSrc.w <= 0 || rtSrc.h <= 0 || rtDest.w <= 0 || rtDest.h <= 0) + { + SysTryReturnResult(NID_GRP, 0, E_OUT_OF_RANGE, "The argument is out of range. (src(w:%d,h:%d), dst(w:%d,h:%d)).", + rtSrc.w, rtSrc.h, rtDest.w, rtDest.h); + } + + // check 2. is src exiting outside of dest entirely? + if (rtSrc.x > rtDest.x + rtDest.w - 1 || rtSrc.x + rtSrc.w - 1 < rtDest.x) + { + SysTryReturnResult(NID_GRP, 0, E_OUT_OF_RANGE, + "The argument is out of range. (src(x:%d,y:%d,w:%d,h:%d), dst(x:%d,y:%d,w:%d,h:%d)).", + rtSrc.x, rtSrc.y, rtSrc.w, rtSrc.h, rtDest.x, rtDest.y, rtDest.w, rtDest.h); + } + + if (rtSrc.y > rtDest.y + rtDest.h - 1 || rtSrc.y + rtSrc.h - 1 < rtDest.y) + { + SysTryReturnResult(NID_GRP, 0, E_OUT_OF_RANGE, + "The argument is out of range. (src(x:%d,y:%d,w:%d,h:%d), dst(x:%d,y:%d,w:%d,h:%d)).", + rtSrc.x, rtSrc.y, rtSrc.w, rtSrc.h, rtDest.x, rtDest.y, rtDest.w, rtDest.h); + } + + return E_SUCCESS; +} + +template +result ValidateT(const Point& ptSrc, const Rectangle& rtDest) +{ + SysTryReturnResult(NID_GRP, rtDest.x <= ptSrc.x && + ptSrc.x < rtDest.x + rtDest.w && + rtDest.y <= ptSrc.y && + ptSrc.y < rtDest.y + rtDest.h, + E_OUT_OF_RANGE, "The argument is 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.w, rtDest.h); + + return E_SUCCESS; +} + +bool IntersectRect(Rectangle& outRect, const Rectangle& srcRect1, const Rectangle& srcRect2); +bool IntersectRect(Rectangle& outRect, const Rectangle& srcRect1, const Rectangle& srcRect2); + +//////////////////////////////////////////////////////////////////////////// +// LockManager class + +class LockManager +{ +public: + LockManager(const class _Bitmap& bitmap); + LockManager(const class _Canvas& canvas); + LockManager(const class _BitmapImpl& bitmapImpl); + LockManager(const class _CanvasImpl& canvasImpl); + ~LockManager(); + + bool IsValid(void) const; + result GetResult(void) const; + const BufferInfo& GetBufferInfo(void) const; + +private: + result __result; + + _Bitmap* __pBitmap; + _Canvas* __pCanvas; + _BitmapImpl* __pBitmapImpl; + _CanvasImpl* __pCanvasImpl; + BufferInfo __bufferInfo; +}; // LockManager + +//////////////////////////////////////////////////////////////////////////// +// LockManagerFast class + +class LockManagerFast +{ +public: + LockManagerFast(const class _Bitmap& bitmap); + LockManagerFast(const class _Canvas& canvas); + LockManagerFast(const class _BitmapImpl& bitmapImpl); + LockManagerFast(const class _CanvasImpl& canvasImpl); + ~LockManagerFast(); + + bool IsValid(void) const; + result GetResult(void) const; + const BufferInfo& GetBufferInfo(void) const; + +private: + result __result; + + _Bitmap* __pBitmap; + _Canvas* __pCanvas; + _BitmapImpl* __pBitmapImpl; + _CanvasImpl* __pCanvasImpl; + BufferInfo __bufferInfo; +}; // LockManagerFast + +//////////////////////////////////////////////////////////////////////////// +// ScalarHolder structure + +struct ScalarHolder +{ + enum + { + AS_INTEGER, + AS_DOUBLE, + } applied; + + int asInteger; + double asDouble; + + ScalarHolder(int initValue) + : applied(AS_INTEGER) + , asInteger(initValue) + , asDouble(double(initValue)) + { + } + + ScalarHolder(double initValue) + : applied(AS_DOUBLE) + , asInteger(int(initValue + 0.5)) + , asDouble(initValue) + { + } + + int operator=(int value) + { + applied = AS_INTEGER; + asInteger = value; + asDouble = double(value); + + return value; + } + + double operator=(double value) + { + applied = AS_DOUBLE; + asInteger = int(value + 0.5); + asDouble = value; + + return value; + } +}; // ScalarHolder + +//////////////////////////////////////////////////////////////////////////// +// Utility function + +result GetPatchList(AccumList , Rectangle > >& outList, const ::Tizen::Graphics::Rectangle& rect, const _Bitmap& bitmap); + +//////////////////////////////////////////////////////////////////////////// +// Validity check + +template +inline bool +CheckValidity(T* pInstance) +{ + return (pInstance != null); +} + +template<> +inline bool +CheckValidity(const Bitmap* pInstance) +{ + return (pInstance && _BitmapImpl::GetInstance(*pInstance)); +} + +template<> +inline bool +CheckValidity(Bitmap* pInstance) +{ + return (pInstance && _BitmapImpl::GetInstance(*pInstance)); +} + +template<> +inline bool +CheckValidity(const Canvas* pInstance) +{ + return (pInstance && _CanvasImpl::GetInstance(*pInstance)); +} + +template<> +inline bool +CheckValidity(Canvas* pInstance) +{ + return (pInstance && _CanvasImpl::GetInstance(*pInstance)); +} + +template<> +inline bool +CheckValidity(const Font* pInstance) +{ + return (pInstance && _FontImpl::GetInstance(*pInstance)); +} + +template<> +inline bool +CheckValidity(Font* pInstance) +{ + return (pInstance && _FontImpl::GetInstance(*pInstance)); +} + +template<> +inline bool +CheckValidity(const EnrichedText* pInstance) +{ + return (pInstance && _EnrichedTextImpl::GetInstance(*pInstance)); +} + +template<> +inline bool +CheckValidity(EnrichedText* pInstance) +{ + return (pInstance && _EnrichedTextImpl::GetInstance(*pInstance)); +} + +//////////////////////////////////////////////////////////////////////////// +// Convertor + +template +inline T2 Convert(const T1&); + +template <> +inline _Util::Point Convert >(const Tizen::Graphics::Point& pos) +{ + _Util::Point temp = + { + pos.x, + pos.y + }; + + return temp; +} + +template <> +inline _Util::Point Convert >(const Tizen::Graphics::Point& pos) +{ + _Util::Point temp = + { + static_cast(pos.x), + static_cast(pos.y) + }; + + return temp; +} + +template <> +inline _Util::Point Convert >(const Tizen::Graphics::FloatPoint& pos) +{ + _Util::Point temp = { pos.x, pos.y }; + + return temp; +} + +template <> +inline _Util::Dimension Convert >(const Tizen::Graphics::Dimension& dim) +{ + _Util::Dimension temp = + { + static_cast(dim.width), + static_cast(dim.height) + }; + + return temp; +} + +template <> +inline _Util::Dimension Convert >(const Tizen::Graphics::FloatDimension& dim) +{ + _Util::Dimension temp = { dim.width, dim.height }; + + return temp; +} + +template <> +inline _Util::Rectangle Convert >(const Tizen::Graphics::Rectangle& rect) +{ + _Util::Rectangle temp = + { + static_cast(rect.x), + static_cast(rect.y), + static_cast(rect.width), + static_cast(rect.height) + }; + + return temp; +} + +template <> +inline _Util::Rectangle Convert >(const Tizen::Graphics::FloatRectangle& rect) +{ + _Util::Rectangle temp = { rect.x, rect.y, rect.width, rect.height }; + + return temp; +} + +//////////////////////////////////////////////////////////////////////////// +// Magic key + +namespace +{ + +template +struct MagicKey +{ +}; + +template <> +struct MagicKey<_CanvasImpl> +{ + enum + { + TAG = 0xCA01 + }; +}; + +template <> +struct MagicKey<_Canvas> +{ + enum + { + TAG = 0xCA03 + }; +}; + +template <> +struct MagicKey<_BitmapImpl> +{ + enum + { + TAG = 0xBA01 + }; +}; + +template <> +struct MagicKey<_Bitmap> +{ + enum + { + TAG = 0xBA03 + }; +}; + +template <> +struct MagicKey<_FontImpl> +{ + enum + { + TAG = 0xF001 + }; +}; + +template <> +struct MagicKey<_Font> +{ + enum + { + TAG = 0xF003 + }; +}; + +} + +template +inline void CarveMagicKey(T&, unsigned long& key) +{ + key = 0xC0DE0000 | MagicKey::TAG; +} + +template +inline void EraseMagicKey(T&, unsigned long& key) +{ + key = 0xDEAD0000 | MagicKey::TAG; +} + +} // Tizen::Graphics::_Util + +}} // Tizen::Graphics + +#endif // _FGRP_INTERNAL_UTIL_H_ diff --git a/src/graphics/util/FGrp_UtilPixmap.cpp b/src/graphics/util/FGrp_UtilPixmap.cpp new file mode 100644 index 0000000..7a43e7b --- /dev/null +++ b/src/graphics/util/FGrp_UtilPixmap.cpp @@ -0,0 +1,625 @@ +// +// 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_UtilPixmap.cpp + * @brief This is the implementation file for internal util class. + * + */ + +#include +#include +#include + +#include + +#include +#include + +#include "FGrp_UtilTemplate.h" +#include "FGrp_UtilPixmap.h" + +using namespace Tizen::Graphics; + +//////////////////////////////////////////////////////////////////////////////// +// image manipulation + +_Util::Pixmap::Pixmap() +{ + type = 0; + width = 0; + height = 0; + depth = 0; + bytesPerLine = 0, + enableColorKey = false; + colorKey = 0; + enableReplaceColor = false; + replaceColor = 0; + isOpaque = 0; + isPremultiplied = 0; + pBitmap = 0; + reserved = 0; +} + +_Util::Pixmap::Pixmap(int _width, int _height, int _depth, int _bytesPerLine) +{ + type = 0; + width = _width; + height = _height; + depth = _depth; + bytesPerLine = _bytesPerLine, + enableColorKey = false; + colorKey = 0; + enableReplaceColor = false; + replaceColor = 0; + isOpaque = 0; + isPremultiplied = 0; + pBitmap = 0; + reserved = 0; + + if (bytesPerLine == 0) + { + bytesPerLine = width * depth / 8; + } + + pBitmap = new (std::nothrow) unsigned char[bytesPerLine * height]; + + SysTryReturnVoidResult(NID_GRP, pBitmap, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + // ¸ðµç °ÍÀÌ ¼º°øÇßÀ» ¶§¸¸ 1ÀÇ °ªÀ» °¡Áö°Ô µÈ´Ù. + reserved = 1; +} + +_Util::Pixmap::Pixmap(int _width, int _height, int _depth, void* _pBitmap, int _bytesPerLine) +{ + type = 0; + width = _width; + height = _height; + depth = _depth; + bytesPerLine = _bytesPerLine, + enableColorKey = false; + colorKey = 0; + enableReplaceColor = false; + replaceColor = 0; + isOpaque = 0; + isPremultiplied = 0; + pBitmap = (unsigned char*) _pBitmap; + reserved = 0; + + if (bytesPerLine == 0) + { + bytesPerLine = width * depth / 8; + } +} + +_Util::Pixmap::Pixmap(PixmapBase& refImage) +{ + memcpy(this, &refImage, sizeof(*this)); + refImage.reserved = 0; +} + +_Util::Pixmap::Pixmap(const PixmapBase& refImage) +{ + memcpy(this, &refImage, sizeof(*this)); + this->reserved = 0; +} + +_Util::Pixmap::Pixmap(const Pixmap& refImage) +{ + memcpy(this, &refImage, sizeof(*this)); + this->reserved = 0; +} + +_Util::Pixmap::~Pixmap() +{ + if (reserved) + { + delete[] pBitmap; + } +} + +_Util::Pixmap& +_Util::Pixmap::operator =(const Pixmap& refImage) +{ + if (this == &refImage) + { + return *this; + } + + PixmapBase::operator =(refImage); + + refImage.reserved = 0; + + return *this; +} + +_Util::PixmapBase +_Util::Pixmap::GetSubBitmap(long x, long y, long w, long h) const +{ + int x1 = x; + int y1 = y; + int x2 = x + w; + int y2 = y + h; + + x1 = (x1 < 0) ? 0 : x1; + y1 = (y1 < 0) ? 0 : y1; + x2 = (x2 > width) ? width : x2; + y2 = (y2 > height) ? height : y2; + + PixmapBase retImage((PixmapBase &) * this); + ((PixmapBase*) this)->reserved = retImage.reserved; + retImage.reserved = 0; + + retImage.pBitmap += retImage.bytesPerLine * y1 + x1 * depth / 8; + retImage.width = x2 - x1; + retImage.height = y2 - y1; + + return retImage; +} + +_Util::PixmapBase +_Util::Pixmap::GetSubBitmapUnsafe(long x, long y, long w, long h) const +{ + PixmapBase retImage((PixmapBase &) * this); + ((PixmapBase*) this)->reserved = retImage.reserved; + retImage.reserved = 0; + + retImage.pBitmap += retImage.bytesPerLine * y + x * depth / 8; + retImage.width = w; + retImage.height = h; + + return retImage; +} + +namespace // unnamed +{ + +template +inline DestPixel* +_ConvertColorFormat(DestPixel* pDest, SourPixel* pSour, int count) +{ + DestPixel* pDestEnd = pDest + count; + + while (pDest < pDestEnd) + { + *pDest++ = *pSour++; + } + + return pDestEnd; +} + +template<> +inline unsigned long* +_ConvertColorFormat(unsigned long* pDest, unsigned short* pSour, int count) +{ + typedef unsigned short SourPixel; + typedef unsigned long DestPixel; + + DestPixel* pDestEnd = pDest + count; + + while (pDest < pDestEnd) + { + DestPixel r = (*pSour & 0xF800) >> 8; + DestPixel g = (*pSour & 0x07E0) >> 3; + DestPixel b = (*pSour & 0x001F) << 3; + + r += (r >> 5); + g += (g >> 6); + b += (b >> 5); + + *pDest++ = 0xFF000000 | (r << 16) | (g << 8) | (b); + ++pSour; + } + + return pDestEnd; +} + +template<> +inline unsigned short* +_ConvertColorFormat(unsigned short* pDest, unsigned long* pSour, int count) +{ + typedef unsigned long SourPixel; + typedef unsigned short DestPixel; + + DestPixel* pDestEnd = pDest + count; + + while (pDest < pDestEnd) + { + DestPixel r = (DestPixel) ((*pSour & 0xF80000) >> 8); + DestPixel g = (DestPixel) ((*pSour & 0x00FC00) >> 5); + DestPixel b = (DestPixel) ((*pSour & 0x0000F8) >> 3); + + *pDest++ = r | g | b; + ++pSour; + } + + return pDestEnd; +} + +template +DestPixel* +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] Memory allocation failed."); + + DestPixel* pDest = (DestPixel*) buffer.get(); + SourPixel* pSour = (SourPixel*) srcBitmap.pBitmap; + long pitch = (srcBitmap.bytesPerLine / sizeof(SourPixel)); + + for (int y = 0; y < srcBitmap.height; y++) + { + pDest = _ConvertColorFormat(pDest, pSour, srcBitmap.width); + pSour += pitch; + } + + return buffer.release(); +} + +unsigned char* +_CreatePremultipliedBuffer(const _Util::Pixmap& srcImage) +{ + typedef unsigned long DestPixel; + + if (srcImage.depth != 32) + return null; + + std::unique_ptr destBuffer(new (std::nothrow) unsigned char[srcImage.width * srcImage.height * sizeof(DestPixel)]); + + DestPixel* pDestBuffer = reinterpret_cast(destBuffer.get()); + + if (pDestBuffer) + { + if (srcImage.bytesPerLine == int(srcImage.width * sizeof(DestPixel))) + { + memcpy(pDestBuffer, srcImage.pBitmap, srcImage.bytesPerLine * srcImage.height); + } + else + { + DestPixel* pSrc = (DestPixel*)srcImage.pBitmap; + DestPixel* pDst = (DestPixel*)pDestBuffer; + + long srcPitch = (srcImage.bytesPerLine * 8 / srcImage.depth); + long dstPitch = srcImage.width; + + for (int y = 0; y < srcImage.height; y++) + { + memcpy(pDst, pSrc, srcImage.width * sizeof(DestPixel)); + pSrc += srcPitch; + pDst += dstPitch; + } + } + + DestPixel* p = (DestPixel*)pDestBuffer; + long padding = 0; + + for (int y = 0; y < srcImage.height; y++) + { + for (int x = 0; x < srcImage.width; x++) + { + DestPixel a = (*p) & 0xFF000000; + DestPixel r = (*p >> 8) & 0x0000FF00; + DestPixel g = (*p >> 8) & 0x000000FF; + DestPixel b = (*p) & 0x000000FF; + + DestPixel mul = (a >> 24) + (a >> 31); + + r = (r * mul) & 0x00FF0000; + g = (g * mul) & 0x0000FF00; + b = (b * mul) & 0x0000FF00; + + *p++ = a | r | g | (b >> 8); + } + + p += padding; + } + } + + return destBuffer.release(); +} + +unsigned char* +_CreateAlphaAttenuatedBuffer(const _Util::Pixmap& srcImage, int alphaConstant) +{ + typedef unsigned long DestPixel; + + if (srcImage.depth != 32) + return null; + + std::unique_ptr destBuffer(new (std::nothrow) unsigned char[srcImage.width * srcImage.height * sizeof(DestPixel)]); + + DestPixel* pDestBuffer = reinterpret_cast(destBuffer.get()); + + if (pDestBuffer) + { + if (alphaConstant <= 0) + { + memset(pDestBuffer, 0, srcImage.width * srcImage.height * sizeof(DestPixel)); + return destBuffer.release(); + } + + if (srcImage.bytesPerLine == int(srcImage.width * sizeof(DestPixel))) + { + memcpy(pDestBuffer, srcImage.pBitmap, srcImage.bytesPerLine * srcImage.height); + } + else + { + DestPixel* pSrc = (DestPixel*)srcImage.pBitmap; + DestPixel* pDst = (DestPixel*)pDestBuffer; + + long srcPitch = (srcImage.bytesPerLine * 8 / srcImage.depth); + long dstPitch = srcImage.width; + + for (int y = 0; y < srcImage.height; y++) + { + memcpy(pDst, pSrc, srcImage.width * sizeof(DestPixel)); + pSrc += srcPitch; + pDst += dstPitch; + } + } + + if (alphaConstant >= 255) + { + return destBuffer.release(); + } + + DestPixel attenuation = alphaConstant; + attenuation += (attenuation >> 7); + + DestPixel* p = (DestPixel*)pDestBuffer; + long padding = 0; + + if (!srcImage.isPremultiplied) + { + for (int y = 0; y < srcImage.height; y++) + { + for (int x = 0; x < srcImage.width; x++) + { + DestPixel alpha = ((*p) & 0xFF000000) >> 8; + alpha *= attenuation; + + *p = (alpha & 0xFF000000) | ((*p) & 0x00FFFFFF); + + ++p; + } + + p += padding; + } + } + else + { + for (int y = 0; y < srcImage.height; y++) + { + for (int x = 0; x < srcImage.width; x++) + { + DestPixel a = (*p >> 8) & 0x00FF0000; + DestPixel r = (*p >> 8) & 0x0000FF00; + DestPixel g = (*p >> 8) & 0x000000FF; + DestPixel b = (*p) & 0x000000FF; + + a = (a * attenuation) & 0xFF000000; + r = (r * attenuation) & 0x00FF0000; + g = (g * attenuation) & 0x0000FF00; + b = (b * attenuation) & 0x0000FF00; + + *p++ = a | r | g | (b >> 8); + + } + + p += padding; + } + } + } + + return destBuffer.release(); +} + +} + +_Util::Pixmap* +_Util::Pixmap::GetClone(unsigned long depth) const +{ + { + if ((this->pBitmap == null) || (this->width <= 0) || (this->height <= 0)) + { + return null; + } + } + + void* pConvertedBuffer = null; + + if (depth == 32 && this->depth == 32) + { + pConvertedBuffer = (void*) ConvertBitmap (*this); + } + else if (depth == 32 && this->depth == 16) + { + pConvertedBuffer = (void*) ConvertBitmap (*this); + } + else if (depth == 16 && this->depth == 32) + { + pConvertedBuffer = (void*) ConvertBitmap (*this); + } + else if (depth == 16 && this->depth == 16) + { + pConvertedBuffer = (void*) ConvertBitmap (*this); + } + + if (pConvertedBuffer == null) + { + return null; + } + + _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] Memory allocation failed."); + + pImageEx->reserved = 1; + + return pImageEx; +} + +_Util::Pixmap* +_Util::Pixmap::GetPremultipliedPixmap(void) const +{ + { + if ((this->pBitmap == null) || (this->width <= 0) || (this->height <= 0)) + { + return null; + } + } + + if (this->depth == 32) + { + std::auto_ptr<_Util::Pixmap> temp(new (std::nothrow) _Util::Pixmap(*this)); + std::unique_ptr buffer(_CreatePremultipliedBuffer(*this)); + + if (temp.get() && buffer.get()) + { + temp->pBitmap = buffer.release(); + temp->bytesPerLine = temp->width * temp->depth / 8; + temp->reserved = 1; + + return temp.release(); + } + else + { + return null; + } + } + else + { + return GetClone(this->depth); + } +} + +_Util::Pixmap* +_Util::Pixmap::GetAlphaAttenuatedPixmap(int alphaConstant) const +{ + { + if ((this->pBitmap == null) || (this->width <= 0) || (this->height <= 0)) + { + return null; + } + } + + if (this->depth == 32) + { + std::auto_ptr<_Util::Pixmap> temp(new (std::nothrow) _Util::Pixmap(*this)); + std::unique_ptr buffer(_CreateAlphaAttenuatedBuffer(*this, alphaConstant)); + + if (temp.get() && buffer.get()) + { + temp->pBitmap = buffer.release(); + temp->bytesPerLine = temp->width * temp->depth / 8; + temp->reserved = 1; + + return temp.release(); + } + else + { + return null; + } + } + else + { + return GetClone(this->depth); + } +} + +void +_Util::Pixmap::ConvertPremultiplied(void) +{ + if (this->pBitmap == null || this->depth != 32) + return; + + if (this->isPremultiplied) + return; + + typedef unsigned long DestPixel; + + DestPixel* p = reinterpret_cast(this->pBitmap); + long paddingBytes = this->bytesPerLine - this->width * this->depth / 8; + + for (int y = 0; y < this->height; y++) + { + for (int x = 0; x < this->width; x++) + { + DestPixel a = (*p) & 0xFF000000; + DestPixel r = (*p >> 8) & 0x0000FF00; + DestPixel g = (*p >> 8) & 0x000000FF; + DestPixel b = (*p) & 0x000000FF; + + DestPixel mul = (a >> 24) + (a >> 31); + + r = (r * mul) & 0x00FF0000; + g = (g * mul) & 0x0000FF00; + b = (b * mul) & 0x0000FF00; + + *p++ = a | r | g | (b >> 8); + } + + p = reinterpret_cast(reinterpret_cast(p) + paddingBytes); + } +} + +void +_Util::Pixmap::ConvertNonpremultiplied(void) +{ + if (this->pBitmap == null || this->depth != 32) + return; + + if (!this->isPremultiplied) + return; + + typedef unsigned long DestPixel; + + DestPixel* p = reinterpret_cast(this->pBitmap); + long paddingBytes = this->bytesPerLine - this->width * this->depth / 8; + + for (int y = 0; y < this->height; y++) + { + for (int x = 0; x < this->width; x++) + { + DestPixel a = (*p >> 24); + + if (a > 0 && a < 254) + { + a += (a >> 7); + + DestPixel r = (*p >> 8) & 0x0000FF00; + r = r / a; + r = (r > 255) ? 255 : r; + + DestPixel g = (*p >> 0) & 0x0000FF00; + g = g / a; + g = (g > 255) ? 255 : g; + + DestPixel b = (*p << 8) & 0x0000FF00; + b = b / a; + b = (b > 255) ? 255 : b; + + *p = (*p & 0xFF000000) | (r << 16) | (g << 8) | b; + } + + p++; + } + + p = reinterpret_cast(reinterpret_cast(p) + paddingBytes); + } +} diff --git a/src/graphics/util/FGrp_UtilPixmap.h b/src/graphics/util/FGrp_UtilPixmap.h new file mode 100644 index 0000000..4d49627 --- /dev/null +++ b/src/graphics/util/FGrp_UtilPixmap.h @@ -0,0 +1,205 @@ +// +// 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_UtilPixmap.h + * @brief This is the header file for internal _Util Pixmap class. + * + */ + +#ifndef _FGRP_INTERNAL_UTIL_PIXMAP_H_ +#define _FGRP_INTERNAL_UTIL_PIXMAP_H_ + + +namespace Tizen { namespace Graphics +{ + +namespace _Util +{ +//////////////////////////////////////////////////////////////////////////////// +// image manipulation + +struct PixmapBase +{ + long type; // image buffer type. this value is always 0 + long width; // width of image + long height; // height of image + long bytesPerLine; // bytes per line + long depth; // pixel depth of buffer + long enableColorKey; // is color key available? + unsigned long colorKey; // color key + long enableReplaceColor; // is replacement color available? + unsigned long replaceColor; // replacement color + long isOpaque; // it is opaque if TRUE + long isPremultiplied; // it has premultiplied alpha if TRUE + unsigned char* pBitmap; // start pointer to buffer + mutable long reserved; // do you have ownership? +}; + +// if 'reserved' is not 0, buffer is released automatically +struct Pixmap + : public PixmapBase +{ + Pixmap(); + Pixmap(int width, int height, int depth, int bytesPerLine = 0); + Pixmap(int width, int height, int depth, void* pBitmap, int bytesPerLine = 0); + Pixmap(PixmapBase& refImage); + Pixmap(const PixmapBase& refImage); + Pixmap(const Pixmap& refImage); + ~Pixmap(); + + Pixmap& operator =(const Pixmap& refImage); + + PixmapBase GetSubBitmap(long x, long y, long w, long h) const; + PixmapBase GetSubBitmapUnsafe(long x, long y, long w, long h) const; + + Pixmap* GetClone(unsigned long depth) const; + Pixmap* GetPremultipliedPixmap(void) const; + Pixmap* GetAlphaAttenuatedPixmap(int alphaConstant) const; + + void ConvertPremultiplied(void); + void ConvertNonpremultiplied(void); +}; + +//////////////////////////////////////////////////////////////////////////////// +// buffer manipulation + +template +class GenericBufferBase +{ +public: + GenericBufferBase() + : _pBuffer(0) + , _pitch(0) + , _padding(0) + , _pHandle(0) + { + _rect.x = 0; + _rect.y = 0; + _rect.w = 0; + _rect.h = 0; + } + + virtual ~GenericBufferBase(void) + { + } + + inline Pixel* GetBufferAddr(void) const + { + return _pBuffer; + } + + inline int GetPitch(void) const + { + return _pitch; + } + + inline int GetPadding(void) const + { + return _padding; + } + + inline int GetWidth(void) const + { + return _rect.w; + } + + inline int GetHeight(void) const + { + return _rect.h; + } + + inline void* GetHandle(void) const + { + return _pHandle; + } + +protected: + Pixel* _pBuffer; + int _pitch; + int _padding; + + struct + { + int x; + int y; + int w; + int h; + } + _rect; + + void* _pHandle; +}; // GenericBufferBase + +template +class GenericBuffer +{ +public: + GenericBuffer(const GenericBufferBase * pInst) + { + __pInst = pInst; + } + + virtual ~GenericBuffer(void) + { + delete __pInst; + } + + inline bool IsValid(void) const + { + return (__pInst != 0); + } + + inline Pixel* GetBufferAddr(void) const + { + return __pInst->GetBufferAddr(); + } + + inline int GetPitch(void) const + { + return __pInst->GetPitch(); + } + + inline int GetPadding(void) const + { + return __pInst->GetPadding(); + } + + inline int GetWidth(void) const + { + return __pInst->GetWidth(); + } + + inline int GetHeight(void) const + { + return __pInst->GetHeight(); + } + + inline void* GetHandle(void) const + { + return __pInst->GetHandle(); + } + +private: + const GenericBufferBase * __pInst; +}; // GenericBuffer + +} // Tizen::Graphics::_Util + +}} // Tizen::Graphics + +#endif // #ifndef _FGRP_INTERNAL_UTIL_PIXMAP_H_ diff --git a/src/graphics/util/FGrp_UtilScratchpad.cpp b/src/graphics/util/FGrp_UtilScratchpad.cpp new file mode 100644 index 0000000..bfabbbe --- /dev/null +++ b/src/graphics/util/FGrp_UtilScratchpad.cpp @@ -0,0 +1,228 @@ +// +// 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_UtilScratchpad.cpp + * @brief This is the header file for internal utility class. + * + */ + +#include "FGrp_UtilScratchpad.h" + + +namespace Tizen { namespace Graphics +{ + +namespace _Util +{ + +template<> +void +ScratchPad ::__FillRect(unsigned long* pDest32, int w, int h, int pitch, unsigned long color, + unsigned long opacity) +{ + typedef unsigned long Pixel; + + opacity += (opacity >> 7); + opacity = ((opacity * (color >> 24)) << 16) & 0xFF000000; + color &= 0x00FFFFFF; + + while (--h >= 0) + { + int copy = w; + + while (--copy >= 0) + { + *pDest32++ = Pixel((color & 0x00FFFFFF) | opacity); + } + + pDest32 += (pitch - w); + } +} + +template<> +void +ScratchPad ::__BitBlt(unsigned long* pDest32, int w, int h, int pitch, unsigned long* pSour32, int imagePitch, + unsigned long opacity, + ColorKey srcColorKey) +{ + typedef unsigned long Pixel; + + opacity += (opacity >> 7); + opacity <<= 16; + + Pixel alpha = 0xFF000000; + + if (!srcColorKey.isValid) + { + while (--h >= 0) + { + int copy = w; + + while (--copy >= 0) + { + alpha = Pixel(opacity * (*pSour32 >> 24)); + *pDest32++ = (*pSour32++ & 0x00FFFFFF) | (alpha & 0xFF000000); + } + + pDest32 += (pitch - w); + pSour32 += (imagePitch - w); + } + } + else + { + while (--h >= 0) + { + int copy = w; + + while (--copy >= 0) + { + if (*pSour32 != srcColorKey.colorKey) + { + alpha = Pixel(opacity * (*pSour32 >> 24)); + *pDest32++ = (*pSour32++ & 0x00FFFFFF) | (alpha & 0xFF000000); + continue; + } + + ++pSour32; + ++pDest32; + } + + pDest32 += (pitch - w); + pSour32 += (imagePitch - w); + } + } +} + +//////////////////////////////////////// +// implementation (unsined short) + +template<> +void +ScratchPad ::__FillRect(unsigned short* pDest16, int w, int h, int pitch, unsigned long color, + unsigned long opacity) +{ + typedef unsigned short Pixel; + + Pixel color16bit = (Pixel) color; + + while (--h >= 0) + { + int copy = w; + + while (--copy >= 0) + { + *pDest16++ = color16bit; + } + + pDest16 += (pitch - w); + } +} + +template<> +void +ScratchPad ::__BitBlt(unsigned short* pDest16, int w, int h, int pitch, unsigned short* pSour16, int imagePitch, + unsigned long opacity, + ColorKey srcColorKey) +{ + typedef unsigned short Pixel; + + if (!srcColorKey.isValid) + { + while (--h >= 0) + { + int copy = w; + + while (--copy >= 0) + { + *pDest16++ = *pSour16++; + } + + pDest16 += (pitch - w); + pSour16 += (imagePitch - w); + } + } + else + { + while (--h >= 0) + { + int copy = w; + + while (--copy >= 0) + { + if (*pSour16 != srcColorKey.colorKey) + { + *pDest16++ = *pSour16++; + continue; + } + + ++pSour16; + ++pDest16; + } + + pDest16 += (pitch - w); + pSour16 += (imagePitch - w); + } + } +} + +//////////////////////////////////////// +// implementation (unsined char) + +template<> +void +ScratchPad ::__FillRect(unsigned char* pDest08, int w, int h, int pitch, unsigned long color, + unsigned long opacity) +{ + unsigned char color08bit = (unsigned char) color; + + while (--h >= 0) + { + int copy = w; + + while (--copy >= 0) + { + *pDest08++ = color08bit; + } + + pDest08 += (pitch - w); + } +} + +template<> +void +ScratchPad ::__BitBlt(unsigned char* pDest08, int w, int h, int pitch, unsigned char* pSour08, int imagePitch, + unsigned long opacity, + ColorKey srcColorKey) +{ + while (--h >= 0) + { + int copy = w; + + while (--copy >= 0) + { + *pDest08++ = *pSour08++; + } + + pDest08 += (pitch - w); + pSour08 += (imagePitch - w); + } +} + +} // _Util + +}} // Tizen::Graphics::_Util diff --git a/src/graphics/util/FGrp_UtilScratchpad.h b/src/graphics/util/FGrp_UtilScratchpad.h new file mode 100644 index 0000000..6a8591c --- /dev/null +++ b/src/graphics/util/FGrp_UtilScratchpad.h @@ -0,0 +1,261 @@ +// +// 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_UtilScratchpad.h + * @brief This is the header file for internal ScratchPad class. + * + */ + +#ifndef _FGRP_INTERNAL_UTIL_SCRATCHPAD_H_ +#define _FGRP_INTERNAL_UTIL_SCRATCHPAD_H_ + + +namespace Tizen { namespace Graphics +{ + +namespace _Util +{ +struct ColorKey +{ + ColorKey() + : isValid(false) + , colorKey(0) + { + } + + explicit ColorKey(unsigned long _colorKey) + : isValid(true) + , colorKey(_colorKey) + { + } + + explicit ColorKey(unsigned long _a, unsigned long _r, unsigned long _g, unsigned long _b) + : isValid(true) + { + if (_a > 255) + { + _a = 255; + } + + if (_r > 255) + { + _r = 255; + } + + if (_g > 255) + { + _g = 255; + } + + if (_b > 255) + { + _b = 255; + } + + colorKey = (_a << 24) | (_r << 16) | (_g << 8) | (_b << 0); + } + + bool isValid; + unsigned long colorKey; +}; + +// external buffer manipulation tool +template +class ScratchPad +{ +public: + enum + { + SCRATCH_PAD_VER_1_2 + }; + + typedef void (*FillRectFunc)(Pixel* pDest32, int w, int h, int pitch, unsigned long color, unsigned long opacity); + typedef void (*BitBltFunc)(Pixel* pDest32, int w, int h, int pitch, Pixel* pSour32, int imagePitch, unsigned long opacity, + ColorKey colorKey); + + ScratchPad(Pixel* pBuffer, int width, int height, int pitch, ColorKey colorKey = ColorKey()) + : __pBuffer(pBuffer) + , __width(width) + , __height(height) + , __xPitch(sizeof(Pixel)) + , __yPitch(pitch) + , __colorKey(colorKey) + , __fnFillRect(__FillRect) + , __fnBitBlt(__BitBlt) + { + __depth = sizeof(Pixel) * 8; + __bytesPerLine = pitch * sizeof(Pixel); + } + + void DrawPoint(int x, int y, Pixel color) + { + if (!__IsInRegion(x, y)) + { + return; + } + + *__GetAddress(x, y) = color; + } + + void FillRect(int x, int y, int w, int h, Pixel color, unsigned long opacity = 255) + { + if (!__FitToRegion(x, y, w, h)) + { + return; + } + + __fnFillRect(__GetAddress(x, y), w, h, __yPitch, color, opacity); + } + + void BitBlt(int xDest, int yDest, ScratchPad* pImage, int xSour, int ySour, int wSour, int hSour, unsigned long opacity = 255) + { + if (pImage == 0) + { + return; + } + + { + int x = xSour; + int y = ySour; + + if (!pImage->__FitToRegion(xSour, ySour, wSour, hSour)) + { + return; + } + + xDest += (xSour - x); + yDest += (ySour - y); + } + + { + int x = xDest; + int y = yDest; + + if (!__FitToRegion(xDest, yDest, wSour, hSour)) + { + return; + } + + xSour += (xDest - x); + ySour += (yDest - y); + } + + int srcPitch = pImage->__bytesPerLine / (pImage->__depth / 8); + + __fnBitBlt(__GetAddress(xDest, yDest), wSour, hSour, __yPitch, pImage->__GetAddress(xSour, + ySour), srcPitch, opacity, + pImage->__colorKey); + } + + int GetWidth(void) const + { + return __width; + } + + int GetHeight(void) const + { + return __height; + } + + void RegisterFillRect(FillRectFunc fnFillRect) + { + __fnFillRect = (fnFillRect) ? fnFillRect : __FillRect; + } + + void RegisterBitBlt(BitBltFunc fnBitBlt) + { + __fnBitBlt = (fnBitBlt) ? fnBitBlt : __BitBlt; + } + + // for internal purposes + void GetBuffer(Pixel*& pAddr, int& pitch) const + { + pAddr = __pBuffer; + pitch = __yPitch; + } + + // for internal purposes + ColorKey GetColorKey(void) const + { + return __colorKey; + } + + // for internal purposes + void SetColorKey(ColorKey colorKey) + { + __colorKey = colorKey; + } + + // for internal purposes + void SetPitch(int depth, int bytesPerLine) + { + __depth = depth; + __xPitch = depth / 8; + __bytesPerLine = bytesPerLine; + } + +private: + bool __IsInRegion(int x, int y) + { + return (x >= 0 && x < __width && y >= 0 && y < __height); + } + + bool __FitToRegion(int& x1, int& y1, int& w, int& h) + { + int x2 = x1 + w; + int y2 = y1 + h; + + x1 = (x1 < 0) ? 0 : x1; + y1 = (y1 < 0) ? 0 : y1; + x2 = (x2 > __width) ? __width : x2; + y2 = (y2 > __height) ? __height : y2; + + w = x2 - x1; + h = y2 - y1; + + return (w >= 0) && (h >= 0); + } + + Pixel* __GetAddress(int x, int y) + { + unsigned char* pBuffer = (unsigned char*) (__pBuffer) + y * __bytesPerLine; + return (Pixel*) (pBuffer + (x * __xPitch)); + } + + static void __FillRect(Pixel* pDest, int w, int h, int pitch, unsigned long color, unsigned long opacity); + static void __BitBlt(Pixel* pDest, int w, int h, int pitch, Pixel* pSour, int imagePitch, unsigned long opacity, ColorKey srcColorKey); + +private: + Pixel* __pBuffer; + int __width; + int __height; + int __xPitch; + int __yPitch; + int __bytesPerLine; + int __depth; + ColorKey __colorKey; + + FillRectFunc __fnFillRect; + BitBltFunc __fnBitBlt; +}; // ScratchPad + +} // Tizen::Graphics::_Util + +}} // Tizen::Graphics + +#endif // #ifndef _FGRP_INTERNAL_UTIL_SCRATCHPAD_H_ diff --git a/src/graphics/util/FGrp_UtilTemplate.h b/src/graphics/util/FGrp_UtilTemplate.h new file mode 100644 index 0000000..e2b49c7 --- /dev/null +++ b/src/graphics/util/FGrp_UtilTemplate.h @@ -0,0 +1,603 @@ +// +// 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_UtilTemplate.h + * @brief This is the header file for internal _Util namespace. + * + */ + +#ifndef _FGRP_INTERNAL_UTIL_TEMPLATE_H_ +#define _FGRP_INTERNAL_UTIL_TEMPLATE_H_ + + +#include +#include + + +namespace Tizen { namespace Graphics +{ + +namespace _Util +{ + +template +inline T +Abs(const T& t) +{ + return (t >= 0) ? t : -t; +} + +template +inline T +Min(T a, T b) +{ + return (a < b) ? a : b; +} + +template +inline T +Max(T a, T b) +{ + return (a > b) ? a : b; +} + +template +struct Pair +{ + Pair() + : first(T1()) + , second(T2()) + {} + + Pair(const T1& val1, const T2& val2) + : first(val1) + , second(val2) + {} + + template Pair(const Pair & ref) + : first(ref.first) + , second(ref.second) + {} + + T1 first; + T2 second; +}; + +template +inline Pair +MakePair(const T1& val1, const T2& val2) +{ + return (Pair (val1, val2)); +} + + +template +class AccumList +{ +public: + typedef AccumList MyAccumList; + typedef size_t SizeType; + typedef DataType* Iterator; + typedef const DataType* ConstIterator; + + explicit AccumList(void) + : __first(0) + , __last(0) + , __end(0) + { + } + + ~AccumList(void) + { + __Cleanup(); + } + + Iterator Begin(void) + { + return (__first); + } + + ConstIterator Begin(void) const + { + return ((ConstIterator) __first); + } + + Iterator End(void) + { + return (__last); + } + + ConstIterator End(void) const + { + return ((ConstIterator) __last); + } + + SizeType Size(void) const + { + return (__first) ? __last - __first : 0; + } + + void Push(const DataType& data) + { + if (__last + 1 > __end) + { + SizeType originalSize = Size(); + SizeType numAlloc = (originalSize > 0) ? originalSize << 1 : 1; + + Iterator dest = ((DataType*) operator new(numAlloc * sizeof(DataType), std::nothrow)); + + if (dest) + { + { + Iterator destEnd = __Copy(__first, __last, dest); + new ((void*) destEnd)DataType(data); + } + + __Cleanup(); + + __end = dest + numAlloc; + __last = dest + originalSize + 1; + __first = dest; + } + } + else + { + new ((void*) __last++)DataType(data); + } + } + + Iterator Insert(Iterator index, const DataType& data) + { + if (__first == 0) + { + this->Push(data); + return this->Begin(); + } + + index = (index > __first) ? index : __first; + index = (index < __last) ? index : __last; + + int offset = index - __first; + + // ..... + this->Push(data); + (__last - 1)->~DataType(); + + index = __CopyBackward(index, __last - 1, index + 1); + + new ((void*) index)DataType(data); + + return index; + } + + void Clear(void) + { + __Cleanup(); + } + + void Swap(MyAccumList& target) + { + if (this != &target) + { + MyAccumList temp = *this; + *this = target; + target = temp; + + temp.__first = 0; + temp.__last = 0; + } + } + +private: + void __Cleanup(void) + { + Iterator first = __first; + + for (; first != __last; ++first) + { + (first)->~DataType(); + } + + operator delete(__first); + + __first = 0; + __last = 0; + __end = 0; + } + + Iterator __Copy(Iterator first, Iterator last, Iterator dest) + { + for (; first != last; ++dest, ++first) + { + new (dest) DataType(*first); + } + + return dest; + } + + Iterator __CopyBackward(Iterator first, Iterator last, Iterator dest) + { + dest += (last - first); + + for (; first != last;) + { + new (--dest) DataType(*(--last)); + } + + return first; + } + + Iterator __first; + Iterator __last; + Iterator __end; + +}; // AccumList + + +template +class SharedPtr +{ +public: + SharedPtr() + : _pInstance(0) + , _pUseCount(0) + { + } + + explicit SharedPtr(BaseType* pInstance) + : _pInstance(pInstance) + , _pUseCount(new (std::nothrow) unsigned int (1)) + { + } + + SharedPtr(const SharedPtr& refInstance) + : _pInstance(0) + , _pUseCount(0) + { + _pInstance = refInstance._pInstance; + _pUseCount = refInstance._pUseCount; + + if (_pUseCount) + { + ++(*_pUseCount); + } + } + + virtual ~SharedPtr() + { + _Release(); + } + + SharedPtr& operator =(const SharedPtr& refInstance) + { + if (_pInstance == refInstance._pInstance) + { + return *this; + } + + _Release(); + + { + _pInstance = refInstance._pInstance; + _pUseCount = refInstance._pUseCount; + + if (_pUseCount) + { + ++(*_pUseCount); + } + } + + return *this; + } + + inline BaseType& operator *() const + { + // assert(_pInstance); + return *_pInstance; + } + + inline BaseType* operator ->() const + { + return _pInstance; + } + + inline BaseType* Get() const + { + return _pInstance; + } + + void Bind(BaseType* rep) + { + if (!_pInstance && !_pUseCount) + { + _pUseCount = new (std::nothrow) unsigned int(1); + _pInstance = rep; + } + } + + inline bool Unique() const + { + return (_pUseCount) ? (*_pUseCount == 1) : true; + } + + inline unsigned int UseCount() const + { + return (_pUseCount) ? *_pUseCount : 0; + } + + inline unsigned int* UseCountPointer() const + { + return _pUseCount; + } + + inline bool IsNull(void) const + { + return (_pInstance == 0); + } + + inline bool IsNotNull(void) const + { + return (_pInstance != 0); + } + + inline void SetNull(void) + { + if (_pInstance) + { + _Release(); + _pInstance = 0; + _pUseCount = 0; + } + } + +protected: + inline void _Release(void) + { + if (_pUseCount) + { + if (--(*_pUseCount) == 0) + { + _Destroy(); + } + } + } + + virtual void _Destroy(void) + { + delete _pInstance; + delete _pUseCount; + } + +protected: + BaseType* _pInstance; + unsigned int* _pUseCount; + +}; // SharedPtr + +template inline bool +operator ==(SharedPtr const& a, SharedPtr const& b) +{ + return a.Get() == b.Get(); +} + +template inline bool +operator !=(SharedPtr const& a, SharedPtr const& b) +{ + return a.Get() != b.Get(); +} + + +template +class AutoPtr +{ +public: + explicit AutoPtr(BaseType* pPtr = 0) + : __hasOwnership(pPtr != 0) + , __pPtr((BaseType*)pPtr) + { + } + + ~AutoPtr() + { + if (__hasOwnership) + { + delete (BaseType*) __pPtr; + } + } + + inline void Bind(BaseType* pPtr) + { + if (__pPtr == 0) + { + __hasOwnership = (pPtr != 0); + __pPtr = (BaseType*) pPtr; + } + } + + inline void Reset(BaseType* pPtr) + { + if (__pPtr == pPtr) + { + return; + } + + if (__hasOwnership) + { + delete (BaseType*) __pPtr; + } + + __hasOwnership = (pPtr != 0); + __pPtr = (BaseType*) pPtr; + } + + inline bool IsNull(void) const + { + return (__pPtr == 0); + } + + inline bool IsNotNull(void) const + { + return (__pPtr != 0); + } + + inline BaseType* operator ->() const + { + return __pPtr; + } + + inline BaseType* Get() const + { + return __pPtr; + } + + inline BaseType* Release() const + { + ((AutoPtr *) this)->__hasOwnership = false; + return __pPtr; + } + +private: + bool __hasOwnership; + BaseType* __pPtr; + +}; // AutoPtr + + +template +class AutoArray +{ +public: + explicit AutoArray(BaseType* ptr = 0) + : __hasOwnership(ptr != 0) + , __pPtr((BaseType*)ptr) + { + } + + ~AutoArray() + { + if (__hasOwnership) + { + delete[] (BaseType*) __pPtr; + } + } + + inline BaseType& operator [](unsigned int index) const + { + return __pPtr[index]; + } + + inline void Bind(BaseType* pPtr) + { + if (__pPtr == 0) + { + __hasOwnership = (pPtr != 0); + __pPtr = (BaseType*) pPtr; + } + } + + inline void Reset(BaseType* pPtr) + { + if (__pPtr == pPtr) + { + return; + } + + if (__hasOwnership) + { + delete[] (BaseType*) __pPtr; + } + + __hasOwnership = (pPtr != 0); + __pPtr = (BaseType*) pPtr; + } + + inline bool IsNull(void) const + { + return (__pPtr == 0); + } + + inline bool IsNotNull(void) const + { + return (__pPtr != 0); + } + + inline BaseType* Get() const + { + return __pPtr; + } + + inline BaseType* Release() const + { + ((AutoArray *) this)->__hasOwnership = false; + + return __pPtr; + } + +private: + bool __hasOwnership; + BaseType* __pPtr; + +}; // AutoArray + +template +class AutoDeletor +{ +public: + explicit AutoDeletor(BaseType* pPtr = 0) + : __pPtr((BaseType*)pPtr) + { + } + + ~AutoDeletor(void) + { + delete __pPtr; + } + + inline void Bind(BaseType* pPtr) + { + if (__pPtr == 0) + { + __pPtr = (BaseType*) pPtr; + } + } + + BaseType* operator->(void) const + { + return __pPtr; + } + + operator BaseType*(void) const + { + return __pPtr; + } + + bool IsValid(void) const + { + return (__pPtr != 0); + } + +private: + BaseType* __pPtr; + +}; // AutoDeletor + +} // Tizen::Graphics::_Util + +}} // Tizen::Graphics + +#endif // _FGRP_INTERNAL_UTIL_TEMPLATE_H_ diff --git a/src/graphics/util/FGrp_UtilType.h b/src/graphics/util/FGrp_UtilType.h new file mode 100644 index 0000000..a042b3a --- /dev/null +++ b/src/graphics/util/FGrp_UtilType.h @@ -0,0 +1,322 @@ +// +// 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_UtilType.h + * @brief This is the header file for internal _Util namespace. + * + */ + +#include + +#ifndef _FGRP_INTERNAL_UTIL_TYPE_H_ +#define _FGRP_INTERNAL_UTIL_TYPE_H_ + +namespace Tizen { namespace Graphics +{ + +namespace _Util +{ + +template +struct FixedPoint +{ + FixedPoint(void) + : __fixedPoint(0) + { + } + + FixedPoint(const FixedPoint& rhs) + : __fixedPoint(rhs.__fixedPoint) + { + } + + explicit FixedPoint(int value) + : __fixedPoint(value << SHIFT) + { + } + + explicit FixedPoint(long value) + : __fixedPoint(value << SHIFT) + { + } + + explicit FixedPoint(float value) + : __fixedPoint(value * ((1 << SHIFT) * 1.0f)) + { + } + + explicit FixedPoint(double value) + : __fixedPoint(value * ((1 << SHIFT) * 1.0)) + { + } + + inline int + ToInt() const + { + return (__fixedPoint >> SHIFT); + } + + inline float + ToFloat() const + { + return (__fixedPoint / ((1 << SHIFT) * 1.0f)); + } + + inline double + ToDouble() const + { + return (__fixedPoint / ((1 << SHIFT) * 1.0)); + } + + inline void + Reset(int fixedPointValue) + { + __fixedPoint = fixedPointValue; + } + + inline operator const int(void) + { + return __fixedPoint; + } + +// operator + + inline FixedPoint + operator +(const FixedPoint& rhs) const + { + FixedPoint tempFixed(0); + + tempFixed.__fixedPoint = __fixedPoint + rhs.__fixedPoint; + + return tempFixed; + } + +// operator - + inline FixedPoint + operator -(const FixedPoint& rhs) const + { + FixedPoint tempFixed(0); + + tempFixed.__fixedPoint = __fixedPoint - rhs.__fixedPoint; + + return tempFixed; + } + +// operator == + template + inline bool + operator ==(const T& rhs) const + { + return (ToFloat() == rhs); + } + + inline bool + operator ==(const FixedPoint& rhs) const + { + return (ToFloat() == rhs.ToFloat); + } + +// operator != + template + inline bool + operator !=(const T& rhs) const + { + return (ToFloat() != rhs); + } + + inline bool + operator !=(const FixedPoint& rhs) const + { + return (ToFloat() != rhs.ToFloat()); + } + +// operator <= + template + inline bool + operator <=(const T& rhs) const + { + return (ToFloat() <= rhs); + } + + inline bool + operator <=(const FixedPoint& rhs) const + { + return (ToFloat() <= rhs.ToFloat()); + } + +// operator >= + template + inline bool + operator >=(const T& rhs) const + { + return (ToFloat() >= rhs); + } + + inline bool + operator >=(const FixedPoint& rhs) const + { + return (ToFloat() >= rhs.ToFloat()); + } + +// operator > + template + inline bool + operator >(const T& rhs) const + { + return (ToFloat() > rhs); + } + + inline bool + operator >(const FixedPoint& rhs) const + { + return (ToFloat() > rhs.ToFloat()); + } + +// operator < + template + inline bool + operator <(const T& rhs) const + { + return (ToFloat() < rhs); + } + + inline bool + operator <(const FixedPoint& rhs) const + { + return (ToFloat() < rhs.ToFloat()); + } + + int __fixedPoint; + enum { SHIFT = postFixed }; +}; + +typedef FixedPoint<26, 6> FixedPoint26_6; +typedef FixedPoint<22, 10> FixedPoint22_10; + + +template +struct Point +{ + T x; + T y; +}; + +template +struct Dimension +{ + T w; + T h; +}; + +template +struct Rectangle +{ + T x; + T y; + T w; + T h; +}; + +template +inline bool +operator ==(const Rectangle& lhs, const Rectangle& rhs) +{ + return (lhs.x == rhs.x) && (lhs.y == rhs.y) && (lhs.w == rhs.w) && (lhs.h == rhs.h); +} + +template +inline bool +operator !=(const Rectangle& lhs, const Rectangle& rhs) +{ + return !(operator ==(lhs, rhs)); +} + +template +struct Bounds +{ + T x1; + T y1; + T x2; + T y2; + + bool IsInside(T x, T y) + { + return ((x >= x1) && (x < x2) && (y >= y1) && (y < y2)); + } + + bool IsInsideX(T x) + { + return ((x >= x1) && (x < x2)); + } +}; + +//////////////////////////////////////////////////////////////////////////////// +// String + +struct String +{ + const wchar_t* pStart; + int length; + + String(void) + : pStart(L"") + , length(0) + { + } + + String(const wchar_t* pInputString, int inputStringLength) + : pStart(pInputString) + , length(inputStringLength) + { + } + + String(const wchar_t* pInputString, int inputStringLength, int offset, int clippedLength) + { + const wchar_t* pInputStart = pInputString; + const wchar_t* pInputEnd = pInputStart + inputStringLength; + + const wchar_t* pRevisedStart = pInputString + offset; + const wchar_t* pRevisedEnd = pRevisedStart + clippedLength; + + const wchar_t* pClippedStart = (pInputStart > pRevisedStart) ? pInputStart : pRevisedStart; + const wchar_t* pClippedEnd = (pInputEnd < pRevisedEnd) ? pInputEnd : pRevisedEnd; + + if (pClippedEnd - pClippedStart > 0) + { + this->pStart = pClippedStart; + this->length = pClippedEnd - pClippedStart; + } + else + { + this->pStart = (pClippedStart == pInputString) ? pClippedStart : L""; + this->length = 0; + } + } + + operator const wchar_t*(void) + { + return pStart; + } +}; + +typedef std::wstring WString; + +} // Tizen::Graphics::_Util + +}} // Tizen::Graphics + +#endif // _FGRP_INTERNAL_UTIL_TYPE_H_ diff --git a/src/ui/CMakeLists.txt b/src/ui/CMakeLists.txt new file mode 100644 index 0000000..29d3634 --- /dev/null +++ b/src/ui/CMakeLists.txt @@ -0,0 +1,748 @@ +SET (this_target ui) + +INCLUDE_DIRECTORIES( + ${SLP_INCLUDE_DIRS} + ${CMAKE_SOURCE_DIR}/inc + ${CMAKE_SOURCE_DIR}/src/graphics + ${CMAKE_SOURCE_DIR}/src/graphics/inc + ${CMAKE_SOURCE_DIR}/src/graphics/text + ${CMAKE_SOURCE_DIR}/src/graphics/effect + ${CMAKE_SOURCE_DIR}/src/app/inc + . + ./inc + ./controls + ./layout + ./resource + ./animations/inc + ./animations + ./scenes + ./effects/inc + ./effects + /usr/include/osp + /usr/include/osp/app + /usr/include/osp/base + /usr/include/osp/io + /usr/include/osp/media + /usr/include/osp/security + /usr/include/osp/system + /usr/include/osp/uix + ) + +SET (${this_target}_SOURCE_FILES + animations/FUiAnim_VariantEx.cpp + animations/FUiAnim_TransformMatrix3Df.cpp + animations/FUiAnim_ControlVisualElement.cpp + animations/FUiAnim_Debug.cpp + animations/FUiAnim_DisplayManager.cpp + animations/FUiAnim_DisplayContextImpl.cpp + animations/FUiAnimDisplayContext.cpp + animations/FUiAnim_INativeNode.cpp + animations/FUiAnim_NativeLayer.cpp + animations/FUiAnim_RootVisualElement.cpp + animations/FUiAnim_AnimationManager.cpp + animations/FUiAnim_TransactionNode.cpp + animations/FUiAnim_AnimationGroupNode.cpp + animations/FUiAnim_VisualElement.cpp + animations/FUiAnim_VisualElementEnvironment.cpp + animations/FUiAnim_VisualElementAnimationGroupImpl.cpp + animations/FUiAnim_VisualElementAnimationImpl.cpp + animations/FUiAnim_VisualElementValueAnimationImpl.cpp + animations/FUiAnim_VisualElementPropertyAnimationImpl.cpp + animations/FUiAnim_VisualElementAnimationKeyFrame.cpp + animations/FUiAnim_VisualElementAnimationTiming.cpp + animations/FUiAnim_VisualElementAnimationVariantInterpolator.cpp + animations/FUiAnim_VisualElementImpl.cpp + animations/FUiAnim_VisualElementCoordinateSystem.cpp + animations/FUiAnim_VisualElementCanvas.cpp + animations/FUiAnim_VisualElementSharedData.cpp + animations/FUiAnimVisualElementSurface.cpp + animations/FUiAnim_VisualElementSurfaceImpl.cpp + animations/FUiAnim_EflNode.cpp + animations/FUiAnim_EflLayer.cpp + animations/FUiAnim_EflLayerConfiguration.cpp + animations/FUiAnim_EflVisualElementSurfaceImpl.cpp + animations/FUiAnim_MatrixUtil.cpp + animations/FUiAnimAnimationBase.cpp + animations/FUiAnim_AnimationBaseImpl.cpp + animations/FUiAnim_AnimationGroupImpl.cpp + animations/FUiAnim_FloatAnimationImpl.cpp + animations/FUiAnim_DimensionAnimationImpl.cpp + animations/FUiAnim_IntegerAnimationImpl.cpp + animations/FUiAnim_PointAnimationImpl.cpp + animations/FUiAnim_RectangleAnimationImpl.cpp + animations/FUiAnim_RotateAnimationImpl.cpp + animations/FUiAnimFloatAnimation.cpp + animations/FUiAnimIntegerAnimation.cpp + animations/FUiAnimDimensionAnimation.cpp + animations/FUiAnimPointAnimation.cpp + animations/FUiAnimRectangleAnimation.cpp + animations/FUiAnimRotateAnimation.cpp + animations/FUiAnimSequentialAnimationGroup.cpp + animations/FUiAnimParallelAnimationGroup.cpp + animations/FUiAnimAnimationGroup.cpp + animations/FUiAnimControlAnimator.cpp + animations/FUiAnim_ControlAnimatorImpl.cpp + animations/FUiAnimFrameAnimator.cpp + animations/FUiAnim_FrameAnimatorImpl.cpp + animations/FUiAnimAnimationTransaction.cpp + animations/FUiAnimIVisualElementAnimationStatusEventListener.cpp + animations/FUiAnimIVisualElementAnimationTickEventListener.cpp + animations/FUiAnimIVisualElementAnimationTimingFunction.cpp + animations/FUiAnimIVisualElementAnimationValueInterpolator.cpp + animations/FUiAnimBezierTimingFunction.cpp + animations/FUiAnimDiscreteTimingFunction.cpp + animations/FUiAnimEaseElasticInTimingFunction.cpp + animations/FUiAnimEaseElasticOutTimingFunction.cpp + animations/FUiAnimEaseInOutTimingFunction.cpp + animations/FUiAnimEaseInTimingFunction.cpp + animations/FUiAnimEaseOutInTimingFunction.cpp + animations/FUiAnimEaseOutTimingFunction.cpp + animations/FUiAnimExpInTimingFunction.cpp + animations/FUiAnimExpOutTimingFunction.cpp + animations/FUiAnimLinearTimingFunction.cpp + animations/FUiAnimVisualElementAnimation.cpp + animations/FUiAnimVisualElementAnimationGroup.cpp + animations/FUiAnimVisualElementPropertyAnimation.cpp + animations/FUiAnimVisualElementValueAnimation.cpp + animations/FUiAnimVisualElement.cpp + animations/FUiAnimVisualElementAnimationProvider.cpp + animations/FUiAnimVisualElementContentProvider.cpp + FUiAccessibilityContainer.cpp + FUiAccessibilityElement.cpp + FUi_AccessibilityContainer.cpp + FUi_AccessibilityContainerImpl.cpp + FUi_AccessibilityElement.cpp + FUi_AccessibilityElementImpl.cpp + FUi_AccessibilityGesture.cpp + FUi_AccessibilityManager.cpp + FUi_AccessibilitySystemSettingLoader.cpp + FUi_AccessibilityTtsPlayer.cpp + FUi_ErrorMessages.cpp + FUiContainer.cpp + FUiControl.cpp + FUiUiConfiguration.cpp + FUiCustomControlBase.cpp + FUiWindow.cpp + FUi_Control.cpp + FUi_Window.cpp + FUi_ControlImpl.cpp + FUi_ContainerImpl.cpp + FUi_WindowImpl.cpp + FUi_ControlManager.cpp + FUi_ControlImplManager.cpp + FUi_ModalLoopManager.cpp + FUi_OrientationAgent.cpp + FUi_ImeOrientationAgent.cpp + FUiClipboard.cpp + FUi_ClipboardImpl.cpp + FUi_Clipboard.cpp + FUiClipboardItem.cpp + FUi_ClipboardItemImpl.cpp + FUi_ClipboardItem.cpp + FUi_DragAndDropEvent.cpp + FUi_DragAndDropItem.cpp + FUi_ClipboardPopupEvent.cpp + FUi_CustomControlBaseImpl.cpp + FUiDataBindingContext.cpp + FUi_DataBinding.cpp + FUi_DataBindingContext.cpp + FUi_DataBindingContextImpl.cpp + FUi_ResourceManager.cpp + FUi_UiManagerProxy.cpp + FUi_UiManagerIpcMessages.cpp + FUi_UiBuilder.cpp + FUi_UiBuilderControl.cpp + FUi_UiBuilderControlElement.cpp + FUi_UiBuilderControlItem.cpp + FUi_UiBuilderControlMaker.cpp + FUi_UiBuilderControlTable.cpp + FUi_UiBuilderControlLayout.cpp + FUi_UiBuilderXmlHandler.cpp +# FUi_CustomItemEvent.cpp +# FUi_CustomItemEventArg.cpp + FUi_DragDropEvent.cpp + FUi_DragDropEventArg.cpp + FUiFocusManager.cpp + FUi_FocusManagerImpl.cpp + FUiKeyboardMap.cpp + FUi_PublicOrientationEvent.cpp + FUiTouch.cpp + FUiTouchEventInfo.cpp + FUi_TouchEventInfoImpl.cpp + FUiVariant.cpp + FUi_TouchEventArg.cpp + FUi_EflUiEventManager.cpp + FUi_EcoreEvas.cpp + FUi_EcoreEvasMgr.cpp + FUi_EflWindow.cpp + FUi_UiEvent.cpp + FUi_UiEventManager.cpp + FUi_UiFocusEvent.cpp + FUi_UiKeyEvent.cpp + FUi_UiNotificationEvent.cpp + FUi_UiTouchEvent.cpp + FUi_FingerInfo.cpp + FUi_TouchManager.cpp + FUi_PropertyBase.cpp + FUi_PropertyUtils.cpp + FUiTouchGestureDetector.cpp + FUiTouchTapGestureDetector.cpp + FUiTouchLongPressGestureDetector.cpp + FUiTouchFlickGestureDetector.cpp + FUiTouchPinchGestureDetector.cpp + FUiTouchRotationGestureDetector.cpp + FUiTouchPanningGestureDetector.cpp + FUi_TouchGestureDetectorImpl.cpp + FUi_TouchTapGestureDetectorImpl.cpp + FUi_TouchLongPressGestureDetectorImpl.cpp + FUi_TouchFlickGestureDetectorImpl.cpp + FUi_TouchPinchGestureDetectorImpl.cpp + FUi_TouchRotationGestureDetectorImpl.cpp + FUi_TouchPanningGestureDetectorImpl.cpp + FUi_TouchGestureDetector.cpp + FUi_TouchGestureTimerManager.cpp + FUi_TouchTapGestureDetector.cpp + FUi_TouchLongPressGestureDetector.cpp + FUi_TouchFlickGestureDetector.cpp + FUi_TouchPinchGestureDetector.cpp + FUi_TouchRotationGestureDetector.cpp + FUi_TouchPanningGestureDetector.cpp + FUiKeyEventManager.cpp + FUiKeyEventInfo.cpp + FUi_KeyEventInfoImpl.cpp + FUi_KeyEventManagerImpl.cpp + FUi_KeyEventManager.cpp + FUi_VariantImpl.cpp + FUiGridLayout.cpp + FUiHorizontalBoxLayout.cpp + FUiLayout.cpp + FUiRelativeLayout.cpp + FUiVerticalBoxLayout.cpp + FUiCardLayout.cpp + FUi_LayoutImpl.cpp + FUi_GridLayoutImpl.cpp + FUi_RelativeLayoutImpl.cpp + FUi_HorizontalBoxLayoutImpl.cpp + FUi_VerticalBoxLayoutImpl.cpp + FUi_CardLayoutImpl.cpp + FUiInputConnection.cpp + FUi_InputConnectionImpl.cpp + FUi_InputConnectionUtils.cpp + FUi_Matrix3Df.cpp + FUi_TouchEventManagerImpl.cpp + FUiTouchEventManager.cpp + FUiSystemUtil.cpp + FUi_SystemUtilImpl.cpp + FUi_BidiUtils.cpp + FUi_DimmingLayer.cpp + FUi_DimmingManager.cpp + FUi_NativeObjectHandler.cpp + controls/FUiCtrlAnimation.cpp + controls/FUiCtrlAnimationFrame.cpp + controls/FUiCtrlButton.cpp + controls/FUiCtrlButtonItem.cpp + controls/FUiCtrlCheckButton.cpp + controls/FUiCtrlColorPicker.cpp + controls/FUiCtrlContextMenu.cpp + controls/FUiCtrlDatePicker.cpp + controls/FUiCtrlTimePicker.cpp + controls/FUiCtrlDateTimePicker.cpp + controls/FUiCtrlEditDate.cpp + controls/FUiCtrlEditField.cpp + controls/FUiCtrlEditTime.cpp + controls/FUiCtrlExpandableEditArea.cpp + controls/FUiCtrlEditArea.cpp + controls/FUiCtrlKeypad.cpp + controls/FUiCtrlFrame.cpp + controls/FUiCtrlHeader.cpp + controls/FUiCtrlHeaderItem.cpp + controls/FUiCtrlFooter.cpp + controls/FUiCtrlFooterItem.cpp + controls/FUiCtrl_PublicFrameEvent.cpp + controls/FUiCtrl_FrameEvent.cpp + controls/FUiCtrlLabel.cpp + controls/FUiCtrlForm.cpp + controls/FUiCtrlMessageBox.cpp + controls/FUiCtrlIconList.cpp + controls/FUiCtrlIconListView.cpp + controls/FUiCtrlIconListViewItem.cpp + controls/FUiCtrl_IconListViewItemEvent.cpp + controls/FUiCtrl_IconListViewItemEventArg.cpp + controls/FUiCtrlGallery.cpp + controls/FUiCtrlGalleryItem.cpp + controls/FUiCtrlOptionMenu.cpp + controls/FUiCtrlPanel.cpp + controls/FUiCtrlProgress.cpp + controls/FUiCtrlRadioGroup.cpp + controls/FUiCtrlOverlayPanel.cpp + controls/FUiCtrlOverlayRegion.cpp + controls/FUiCtrlPopup.cpp + controls/FUiCtrlSearchBar.cpp + controls/FUiCtrl_ScrollEvent.cpp + controls/FUiCtrl_ScrollEventArg.cpp + controls/FUiCtrlScrollPanel.cpp + controls/FUiCtrl_ScrollPanelImpl.cpp + controls/FUiCtrlSlider.cpp + controls/FUiCtrlSplitPanel.cpp + controls/FUiCtrlTab.cpp + controls/FUiCtrlTabBar.cpp + controls/FUiCtrlTabBarItem.cpp + controls/FUiCtrl_TabBarItemImpl.cpp + controls/FUiCtrlTextBox.cpp + controls/FUiCtrl_ActionEvent.cpp + controls/FUiCtrl_PublicClipboardPopupEvent.cpp + controls/FUiCtrl_AdjustmentEvent.cpp + controls/FUiCtrl_AnimationEvent.cpp + controls/FUiCtrl_ColorChangeEvent.cpp + controls/FUiCtrl_SliderEvent.cpp + controls/FUiCtrl_TextEvent.cpp + controls/FUiCtrl_ExpandableEditAreaEvent.cpp + controls/FUiCtrl_ScrollPanelEvent.cpp + controls/FUiCtrl_SearchBarEvent.cpp + controls/FUiCtrl_SplitPanelEvent.cpp + controls/FUiCtrl_KeypadEvent.cpp + controls/FUiCtrl_LinkEvent.cpp + controls/FUiCtrl_TextBlockEvent.cpp + controls/FUiCtrl_LanguageEvent.cpp + controls/FUiCtrl_PublicActionEvent.cpp + controls/FUiCtrl_PublicAdjustmentEvent.cpp + controls/FUiCtrl_PublicAnimationEvent.cpp + controls/FUiCtrl_PublicColorChangeEvent.cpp + controls/FUiCtrl_PublicSliderEvent.cpp + controls/FUiCtrl_PublicLanguageEvent.cpp + controls/FUiCtrl_DateTimeChangeEvent.cpp + controls/FUiCtrl_PublicDateTimeChangeEvent.cpp + controls/FUiCtrl_PublicTextEvent.cpp + controls/FUiCtrl_PublicExpandableEditAreaEvent.cpp + controls/FUiCtrl_PublicScrollPanelEvent.cpp + controls/FUiCtrl_PublicSearchBarEvent.cpp + controls/FUiCtrl_PublicSplitPanelEvent.cpp + controls/FUiCtrl_PublicKeypadEvent.cpp + controls/FUiCtrl_PublicLinkEvent.cpp + controls/FUiCtrl_PublicTextBlockEvent.cpp + controls/FUiCtrl_Animation.cpp + controls/FUiCtrl_AnimationPresenter.cpp + controls/FUiCtrl_AnimationModel.cpp + controls/FUiCtrl_Button.cpp + controls/FUiCtrl_ButtonPresenter.cpp + controls/FUiCtrl_ButtonModel.cpp + controls/FUiCtrl_ColorPicker.cpp + controls/FUiCtrl_ColorPickerPresenter.cpp + controls/FUiCtrl_ColorPickerModel.cpp + controls/FUiCtrl_CheckButton.cpp + controls/FUiCtrl_CheckButtonPresenter.cpp + controls/FUiCtrl_CheckButtonModel.cpp + controls/FUiCtrl_DatePickerImpl.cpp + controls/FUiCtrl_TimePickerImpl.cpp + controls/FUiCtrl_DateTimeBar.cpp + controls/FUiCtrl_DateTimeBarPresenter.cpp + controls/FUiCtrl_DateTimeBarModel.cpp + controls/FUiCtrl_DateTimeBarItem.cpp + controls/FUiCtrl_ContextMenu.cpp + controls/FUiCtrl_ContextMenuListPresenter.cpp + controls/FUiCtrl_ContextMenuGridPresenter.cpp + controls/FUiCtrl_ContextMenuModel.cpp + controls/FUiCtrl_ContextMenuItem.cpp +# controls/FUiCtrl_ContextMenuItemProviderAdaptor.cpp + controls/FUiCtrl_DateTimePickerImpl.cpp + controls/FUiCtrl_DateTimeModel.cpp + controls/FUiCtrl_DateTimeUtils.cpp + controls/FUiCtrl_DateTimePicker.cpp + controls/FUiCtrl_DateTimePresenter.cpp + controls/FUiCtrl_DateTimeDisplayBox.cpp + controls/FUiCtrl_Edit.cpp + controls/FUiCtrl_EditAreaImpl.cpp + controls/FUiCtrl_EditCopyPasteManager.cpp + controls/FUiCtrl_EditCopyPasteEvent.cpp + controls/FUiCtrl_EditDate.cpp + controls/FUiCtrl_EditDatePresenter.cpp + controls/FUiCtrl_EditModel.cpp + controls/FUiCtrl_EditTime.cpp + controls/FUiCtrl_EditTimePresenter.cpp + controls/FUiCtrl_EditPresenter.cpp + controls/FUiCtrl_ExpandableEditAreaImpl.cpp + controls/FUiCtrl_Keypad.cpp + controls/FUiCtrl_KeypadImpl.cpp + controls/FUiCtrl_Form.cpp + controls/FUiCtrl_FormModel.cpp + controls/FUiCtrl_FormPresenter.cpp + controls/FUiCtrl_Frame.cpp + controls/FUiCtrl_FrameModel.cpp + controls/FUiCtrl_FramePresenter.cpp + controls/FUiCtrl_IconListImpl.cpp + controls/FUiCtrl_IconListData.cpp + controls/FUiCtrl_IconListItemProvider.cpp + controls/FUiCtrl_IconListItem.cpp + controls/FUiCtrl_IconListItemDrawingProperty.cpp + controls/FUiCtrl_IconListItemProviderAdaptor.cpp + controls/FUiCtrl_IconListPresenter.cpp + controls/FUiCtrl_IconListUtils.cpp + controls/FUiCtrl_IconListView.cpp + controls/FUiCtrl_Indicator.cpp + controls/FUiCtrl_IndicatorManager.cpp + controls/FUiCtrl_InputPad.cpp + controls/FUiCtrl_InputPadPresenter.cpp + controls/FUiCtrl_Label.cpp + controls/FUiCtrl_LabelModel.cpp + controls/FUiCtrl_LabelPresenter.cpp + controls/FUiCtrl_MessageBox.cpp + controls/FUiCtrl_MessageBoxPresenter.cpp + controls/FUiCtrl_OptionMenu.cpp + controls/FUiCtrl_OptionMenuModel.cpp + controls/FUiCtrl_OptionMenuPresenter.cpp + controls/FUiCtrl_OptionMenuItem.cpp + controls/FUiCtrl_Panel.cpp + controls/FUiCtrl_PanelPresenter.cpp + controls/FUiCtrl_Popup.cpp + controls/FUiCtrl_PopupPresenter.cpp + controls/FUiCtrl_Progress.cpp + controls/FUiCtrl_ProgressPresenter.cpp + controls/FUiCtrl_ProgressModel.cpp + controls/FUiCtrl_RadioGroup.cpp + controls/FUiCtrl_RadioGroupPresenter.cpp + controls/FUiCtrl_RadioGroupModel.cpp + controls/FUiCtrl_ScrollPanel.cpp + controls/FUiCtrl_ScrollPanelModel.cpp + controls/FUiCtrl_ScrollPanelPresenter.cpp + controls/FUiCtrl_SearchBar.cpp + controls/FUiCtrl_SearchBarModel.cpp + controls/FUiCtrl_SearchBarPresenter.cpp + controls/FUiCtrl_Slider.cpp + controls/FUiCtrl_SliderModel.cpp + controls/FUiCtrl_SliderOverlay.cpp + controls/FUiCtrl_SliderPresenter.cpp + controls/FUiCtrl_SplitPanel.cpp + controls/FUiCtrl_SplitPanelModel.cpp + controls/FUiCtrl_SplitPanelPresenter.cpp + controls/FUiCtrl_Tab.cpp + controls/FUiCtrl_TabImpl.cpp + controls/FUiCtrl_TabItem.cpp + controls/FUiCtrl_TabPresenter.cpp + controls/FUiCtrl_TabModel.cpp + controls/FUiCtrl_TabBar.cpp + controls/FUiCtrl_TabBarItem.cpp + controls/FUiCtrl_TabBarModel.cpp + controls/FUiCtrl_TabBarPresenter.cpp + controls/FUiCtrl_Toolbar.cpp + controls/FUiCtrl_ToolbarModel.cpp + controls/FUiCtrl_ToolbarPresenter.cpp + controls/FUiCtrl_TokenEdit.cpp + controls/FUiCtrl_TokenEditPresenter.cpp + controls/FUiCtrl_TokenEditModel.cpp + controls/FUiCtrl_UiIconListItemEvent.cpp + controls/FUiCtrl_AnimationImpl.cpp + controls/FUiCtrl_AnimationFrameImpl.cpp + controls/FUiCtrl_ButtonImpl.cpp + controls/FUiCtrl_ButtonItemImpl.cpp + controls/FUiCtrl_CheckButtonImpl.cpp + controls/FUiCtrl_ContextMenuImpl.cpp + controls/FUiCtrl_ColorPickerImpl.cpp + controls/FUiCtrl_EditDateImpl.cpp + controls/FUiCtrl_EditFieldImpl.cpp + controls/FUiCtrl_EditTimeImpl.cpp + controls/FUiCtrl_FooterImpl.cpp + controls/FUiCtrl_FooterItemImpl.cpp + controls/FUiCtrl_FormImpl.cpp + controls/FUiCtrl_FrameImpl.cpp + controls/FUiCtrl_HeaderImpl.cpp + controls/FUiCtrl_HeaderItemImpl.cpp + controls/FUiCtrl_LabelImpl.cpp + controls/FUiCtrl_MessageBoxImpl.cpp + controls/FUiCtrl_IconListViewImpl.cpp + controls/FUiCtrl_IconListViewItemImpl.cpp + controls/FUiCtrl_OptionMenuImpl.cpp + controls/FUiCtrl_PanelImpl.cpp + controls/FUiCtrl_PopupImpl.cpp + controls/FUiCtrl_ProgressImpl.cpp + controls/FUiCtrl_RadioGroupImpl.cpp + controls/FUiCtrl_OverlayAgent.cpp + controls/FUiCtrl_OverlayPanel.cpp + controls/FUiCtrl_OverlayPanelImpl.cpp + controls/FUiCtrl_OverlayRegionImpl.cpp + controls/FUiCtrl_SearchBarImpl.cpp + controls/FUiCtrl_SliderImpl.cpp + controls/FUiCtrl_SplitPanelImpl.cpp + controls/FUiCtrl_TextBoxImpl.cpp + controls/FUiCtrl_Scroll.cpp + controls/FUiCtrl_ScrollPresenter.cpp + controls/FUiCtrl_UiScrollEvent.cpp + controls/FUiCtrl_UiScrollEventArg.cpp + controls/FUiCtrl_FastScroll.cpp + controls/FUiCtrl_FastScrollPresenter.cpp + controls/FUiCtrl_FastScrollModel.cpp + controls/FUiCtrl_FastScrollIndex.cpp + controls/FUiCtrl_FastScrollIndexNode.cpp + controls/FUiCtrl_FastScrollEvent.cpp + controls/FUiCtrl_FastScrollEventArg.cpp + controls/FUiCtrl_UiFastScrollEvent.cpp + controls/FUiCtrl_UiFastScrollEventArg.cpp + controls/FUiCtrl_TabBarImpl.cpp + controls/FUiCtrl_Gallery.cpp + controls/FUiCtrl_GalleryBitmap.cpp + controls/FUiCtrl_GalleryCanvas.cpp + controls/FUiCtrl_GalleryCanvasManager.cpp + controls/FUiCtrl_GalleryCoreEvent.cpp + controls/FUiCtrl_GalleryCoreEventArg.cpp + controls/FUiCtrl_GalleryCoreEventListener.cpp + controls/FUiCtrl_GalleryImageReader.cpp + controls/FUiCtrl_GalleryImpl.cpp + controls/FUiCtrl_GalleryImplEvent.cpp + controls/FUiCtrl_GalleryImplEventArg.cpp + controls/FUiCtrl_GalleryItem.cpp + controls/FUiCtrl_GalleryItemImpl.cpp + controls/FUiCtrl_GalleryItemProvider.cpp + controls/FUiCtrl_GalleryItemProviderAdaptor.cpp + controls/FUiCtrl_GalleryItemProviderAdaptorImpl.cpp + controls/FUiCtrl_GalleryModel.cpp + controls/FUiCtrl_GalleryPresenter.cpp + controls/FUiCtrl_GalleryRenderer.cpp + controls/FUiCtrl_GalleryRendererNotifier.cpp + controls/FUiCtrl_GalleryViewEvent.cpp + controls/FUiCtrl_GalleryViewEventInfo.cpp + controls/FUiCtrl_GalleryViewEventHandler.cpp +# ProgressPopup + controls/FUiCtrlProgressPopup.cpp + controls/FUiCtrl_ProgressPopupImpl.cpp + controls/FUiCtrl_ProgressPopup.cpp + controls/FUiCtrl_ProgressPopupPresenter.cpp + controls/FUiCtrl_PublicProgressPopupEvent.cpp + controls/FUiCtrl_ProgressPopupEvent.cpp +# End of ProgressPopup +# GroupContainer + controls/FUiCtrlGroupContainer.cpp + controls/FUiCtrl_GroupContainerImpl.cpp + controls/FUiCtrl_GroupContainer.cpp + controls/FUiCtrl_GroupContainerPresenter.cpp +# End of GroupContainer +# 1.x Lists + controls/FUiCtrlCustomListItem.cpp + controls/FUiCtrlCustomListItemFormat.cpp + controls/FUiCtrl_CustomListItemImpl.cpp + controls/FUiCtrl_CustomListItemFormatImpl.cpp + controls/FUiCtrlCustomList.cpp + controls/FUiCtrl_CustomListImpl.cpp + controls/FUiCtrlExpandableList.cpp + controls/FUiCtrl_ExpandableListImpl.cpp + controls/FUiCtrlList.cpp + controls/FUiCtrl_ListImpl.cpp + controls/FUiCtrlGroupedList.cpp + controls/FUiCtrl_GroupedListImpl.cpp + controls/FUiCtrlSlidableList.cpp + controls/FUiCtrl_SlidableListImpl.cpp + controls/FUiCtrlSlidableGroupedList.cpp + controls/FUiCtrl_SlidableGroupedListImpl.cpp + controls/FUiCtrl_ListBaseImpl.cpp + controls/FUiCtrl_CustomListElements.cpp + resource/FUi_ResourceListConfig.cpp +# End of 1.x Lists +# ListView + controls/FUiCtrlCustomItem.cpp + controls/FUiCtrlGroupedListView.cpp + controls/FUiCtrlGroupItem.cpp + controls/FUiCtrlIGroupedListViewItemEventListener.cpp + controls/FUiCtrlIGroupedListViewItemProvider.cpp + controls/FUiCtrlIGroupedListViewItemProviderF.cpp + controls/FUiCtrlIListViewItemEventListener.cpp + controls/FUiCtrlListContextItem.cpp + controls/FUiCtrlListItemBase.cpp + controls/FUiCtrlListView.cpp + controls/FUiCtrlSimpleItem.cpp + controls/FUiCtrl_CustomElement.cpp + controls/FUiCtrl_CustomItemImpl.cpp + controls/FUiCtrl_GroupedListViewImpl.cpp + controls/FUiCtrl_GroupedListViewItemProviderAdaptor.cpp + controls/FUiCtrl_GroupItemImpl.cpp + controls/FUiCtrl_ListContextItemImpl.cpp + controls/FUiCtrl_ListItemBaseImpl.cpp + controls/FUiCtrl_ListItemCommon.cpp + controls/FUiCtrl_ListItemEvent.cpp + controls/FUiCtrl_ListItemEventArg.cpp + controls/FUiCtrl_ListViewContextItem.cpp + controls/FUiCtrl_ListViewImpl.cpp + controls/FUiCtrl_ListViewItem.cpp + controls/FUiCtrl_ListViewItemProviderAdaptor.cpp + controls/FUiCtrl_ListViewModel.cpp + controls/FUiCtrl_SimpleItemImpl.cpp + controls/FUiCtrl_UiListViewItemEvent.cpp + controls/FUiCtrl_UiListViewItemEventArg.cpp + controls/FUiCtrl_FlickAnimation.cpp +# End of ListView +# TableView related + controls/FUiCtrlTableView.cpp + controls/FUiCtrlGroupedTableView.cpp + controls/FUiCtrlSectionTableView.cpp + controls/FUiCtrlTableViewItemBase.cpp + controls/FUiCtrlTableViewItem.cpp + controls/FUiCtrlTableViewSimpleItem.cpp + controls/FUiCtrlTableViewGroupItem.cpp + controls/FUiCtrlTableViewSimpleGroupItem.cpp + controls/FUiCtrlTableViewContextItem.cpp + controls/FUiCtrl_UiTableViewItemEvent.cpp + controls/FUiCtrl_TableView.cpp + controls/FUiCtrl_TableViewImpl.cpp + controls/FUiCtrl_TableViewItem.cpp + controls/FUiCtrl_TableViewItemImpl.cpp + controls/FUiCtrl_TableViewItemEvent.cpp + controls/FUiCtrl_TableViewItemEventArg.cpp + controls/FUiCtrl_TableViewItemProvider.cpp + controls/FUiCtrl_TableViewItemProviderAdaptor.cpp + controls/FUiCtrl_TableViewPresenter.cpp +# end of TableView related + layout/FUi_LayoutLayoutMaker.cpp + layout/FUi_LayoutLayout.cpp + layout/FUi_LayoutLayoutItem.cpp + layout/FUi_LayoutLayoutItemInfo.cpp + layout/FUi_LayoutLayoutItemProxy.cpp + layout/FUi_LayoutLayoutContainer.cpp + layout/FUi_LayoutLayoutList.cpp + layout/FUi_LayoutLayoutListNode.cpp + layout/FUi_LayoutLinkedList.cpp + layout/FUi_LayoutLinkedListNode.cpp + layout/FUi_LayoutProxyList.cpp + layout/FUi_LayoutProxyListNode.cpp + layout/FUi_LayoutAbsoluteLayout.cpp + layout/FUi_LayoutRelativeLayout.cpp + layout/FUi_LayoutLinearLayout.cpp + layout/FUi_LayoutTableLayout.cpp + scenes/FUiScenesBackwardSceneTransition.cpp + scenes/FUiScenesForwardSceneTransition.cpp + scenes/FUiScenesScene.cpp + scenes/FUiScenesSceneManager.cpp + scenes/FUiScenesSceneTransition.cpp + scenes/FUiScenes_SceneTransitionImpl.cpp + scenes/FUiScenes_SceneImpl.cpp + scenes/FUiScenes_SceneManagerImpl.cpp + scenes/FUiScenes_SceneControlEventArg.cpp + scenes/FUiScenes_SceneControlEvent.cpp + resource/FUi_ResourceAccessibilityConfig.cpp + resource/FUi_ResourcePopupConfig.cpp + resource/FUi_ResourceMessageBoxConfig.cpp + resource/FUi_ResourceButtonConfig.cpp + resource/FUi_ResourceCheckButtonConfig.cpp + resource/FUi_ResourceContextMenuConfig.cpp + resource/FUi_ResourceDateTimePickerConfig.cpp + resource/FUi_ResourceDimmingLayerConfig.cpp + resource/FUi_ResourceFooterConfig.cpp + resource/FUi_ResourceFormConfig.cpp + resource/FUi_ResourceGroupContainerConfig.cpp + resource/FUi_ResourceHeaderConfig.cpp + resource/FUi_ResourceIconListConfig.cpp + resource/FUi_ResourceInputPadConfig.cpp + resource/FUi_ResourceLabelConfig.cpp + resource/FUi_ResourceListViewConfig.cpp + resource/FUi_ResourceAppWidgetConfig.cpp + resource/FUi_ResourceRadioGroupConfig.cpp + resource/FUi_ResourceSplitPanelConfig.cpp + resource/FUi_ResourceTabBarConfig.cpp + resource/FUi_ResourceTableViewConfig.cpp + resource/FUi_ResourceTabConfig.cpp + resource/FUi_ResourceMapContainer.cpp + resource/FUi_ResourcePanelConfig.cpp + resource/FUi_ResourceColorPickerConfig.cpp + resource/FUi_ResourceDateTimeBarConfig.cpp + resource/FUi_ResourceEditConfig.cpp + resource/FUi_ResourceEditDateConfig.cpp + resource/FUi_ResourceEditTimeConfig.cpp + resource/FUi_ResourceFastScrollConfig.cpp + resource/FUi_ResourceOverlayPanelConfig.cpp + resource/FUi_ResourceScrollConfig.cpp + resource/FUi_ResourceSearchBarConfig.cpp + resource/FUi_ResourceSliderConfig.cpp + resource/FUi_ResourceProgressConfig.cpp + resource/FUi_ResourceTokenEditConfig.cpp + resource/FUi_ResourceOptionMenuConfig.cpp + resource/FUi_ResourceGalleryConfig.cpp + resource/FUi_ResourceSizeInfo.cpp + resource/FUi_ResourceStringLoader.cpp + resource/FUi_ResourceConfigLoader.cpp + resource/FUi_ResourceConfigParser.cpp + resource/FUi_ResourceFocusUiConfig.cpp + ## EFFECTS + effects/FUiEffects_EffectErrorMessages.cpp + effects/FUiEffects_EffectManagerImpl.cpp + effects/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderCache.cpp + effects/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderBufferCache.cpp + effects/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderStateCache.cpp + effects/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderTextureCache.cpp + effects/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderDrawableCache.cpp + effects/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRender.cpp + effects/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderRenderTargetCache.cpp + effects/renderer/graphics-engine/FUiEffects_RendererGraphicsEngineRenderShaderCache.cpp + effects/renderer/FUiEffects_RendererMemoryTexture2DProperty.cpp + effects/renderer/FUiEffects_RendererEffectShader.cpp + effects/renderer/engine-model/FUiEffects_RendererEngineModelMaterial.cpp + effects/renderer/engine-model/FUiEffects_RendererEngineModelNode.cpp + effects/renderer/engine-model/FUiEffects_RendererEngineModelRenderTargetExternalRender.cpp + effects/renderer/engine-model/FUiEffects_RendererEngineModelFloatArrayProperty.cpp + effects/renderer/engine-model/FUiEffects_RendererEngineModelBuffer.cpp + effects/renderer/engine-model/FUiEffects_RendererEngineModelTextureAttachment.cpp + effects/renderer/engine-model/FUiEffects_RendererEngineModelPropertyHolderMaterial.cpp + effects/renderer/engine-model/FUiEffects_RendererEngineModelVector3fPropertyHolder.cpp + effects/renderer/engine-model/FUiEffects_RendererEngineModelMatrix4fPropertyHolder.cpp + effects/renderer/engine-model/FUiEffects_RendererEngineModelShaderHolderProgramProperty.cpp + effects/renderer/engine-model/FUiEffects_RendererEngineModelStringShaderProperty.cpp + effects/renderer/engine-model/FUiEffects_RendererEngineModelAlphaBlendProperty.cpp + effects/renderer/engine-model/FUiEffects_RendererEngineModelTexture2DAttachmentProperty.cpp + effects/renderer/engine-model/FUiEffects_RendererEngineModelVector2fPropertyHolder.cpp + effects/renderer/engine-model/FUiEffects_RendererEngineModelTexture2DProperty.cpp + effects/renderer/engine-model/FUiEffects_RendererEngineModelVector4fPropertyHolder.cpp + effects/renderer/engine-model/FUiEffects_RendererEngineModelDrawable.cpp + effects/renderer/engine-model/FUiEffects_RendererEngineModelProperty.cpp + effects/renderer/engine-model/FUiEffects_RendererEngineModelGeometry.cpp + effects/renderer/engine-model/FUiEffects_RendererEngineModelTextureProperty.cpp + effects/renderer/engine-model/FUiEffects_RendererEngineModelCache.cpp + effects/renderer/engine-model/FUiEffects_RendererEngineModelGroup.cpp + effects/renderer/engine-model/FUiEffects_RendererEngineModelRenderTarget.cpp + effects/renderer/engine-model/FUiEffects_RendererEngineModelFloatPropertyHolder.cpp + effects/renderer/engine-model/FUiEffects_RendererEngineModelStubAttachment.cpp + effects/renderer/engine-model/FUiEffects_RendererEngineModelCamera.cpp + effects/renderer/system/FUiEffects_RendererSystemData.cpp + effects/renderer/system/FUiEffects_RendererSystemException.cpp + effects/renderer/system/FUiEffects_RendererSystemPlatformDefine.cpp + effects/renderer/FUiEffects_RendererRendererGeometry.cpp + effects/renderer/FUiEffects_RendererLog.cpp + effects/renderer/FUiEffects_RendererEffectRenderer.cpp + effects/parser/FUiEffects_ParserEffectParser.cpp + effects/parser/FUiEffects_ParserXMLParser.cpp + effects/FUiEffectsEffect.cpp + effects/FUiEffectsEffectManager.cpp + effects/FUiEffects_EffectImpl.cpp + effects/runtime/lua-cpp-binding/tolua.cpp + effects/runtime/FUiEffects_RuntimeGraphicalSurface.cpp + effects/runtime/FUiEffects_RuntimePointLight.cpp + effects/runtime/FUiEffects_RuntimeDirectionalLight.cpp + effects/runtime/FUiEffects_RuntimeModelSurface.cpp + effects/runtime/FUiEffects_RuntimeSpotLight.cpp + effects/runtime/FUiEffects_RuntimeEffectModelScript.cpp + effects/runtime/FUiEffects_RuntimeLuaProcessing.cpp + effects/runtime/FUiEffects_RuntimeGraphicalSurfaceNurbs.cpp + effects/runtime/FUiEffects_RuntimeRenderDataScene.cpp + effects/runtime/FUiEffects_RuntimeEffectModel.cpp + effects/runtime/FUiEffects_RuntimeUnitLight.cpp + effects/FUiEffectsEffectTouchInfo.cpp + effects/physics-engine/FUiEffects_PeRodSurface.cpp + effects/physics-engine/FUiEffects_PeElementSurface.cpp + effects/physics-engine/FUiEffects_PePointSurfaceNURBS.cpp + effects/physics-engine/FUiEffects_PeSpringSurface.cpp + effects/physics-engine/FUiEffects_PeRodSurfaceNURBS.cpp + effects/physics-engine/FUiEffects_PePointSurface.cpp +## TouchEffect + FUiTouchEffect.cpp + FUi_TouchEffectImpl.cpp +## End of TouchEffect +) + +SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden") + +## SET EXTRA COMPILER FLAGS +SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fPIC" ) + +## SET C COMPILER FLAGS +SET(CMAKE_C_FLAGS "${OSP_DEBUG_FLAGS} ${OSP_OPT_FLAGS} ${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} ${OSP_COMPILER_FLAGS}") + +## SET CPP COMPILER FLAGS +SET(CMAKE_CXX_FLAGS "${OSP_DEBUG_FLAGS} ${OSP_OPT_FLAGS} ${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS} ${OSP_COMPILER_FLAGS}") + +## Create Library +ADD_LIBRARY (${this_target} STATIC ${${this_target}_SOURCE_FILES}) + diff --git a/src/ui/FUiAccessibilityContainer.cpp b/src/ui/FUiAccessibilityContainer.cpp new file mode 100644 index 0000000..db41fdc --- /dev/null +++ b/src/ui/FUiAccessibilityContainer.cpp @@ -0,0 +1,134 @@ +// +// 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 FUiAccessibilityContainer.cpp +* @brief This is the implementation for the AccessibilityContainer class. +*/ + +#include +#include +#include +#include +#include +#include "FUi_AccessibilityElementImpl.h" +#include "FUi_AccessibilityContainerImpl.h" +#include "FUi_ControlImpl.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; + +namespace Tizen { namespace Ui { +AccessibilityContainer::AccessibilityContainer(void) +:__pAccessibilityContainerImpl(null) +{ +} + +AccessibilityContainer::~AccessibilityContainer(void) +{ +} + +const Control* +AccessibilityContainer::GetOwner(void) const +{ + SysAssertf(__pAccessibilityContainerImpl != null, "Not constructed properly by platform."); + return &(__pAccessibilityContainerImpl->GetOwner().GetPublic()); +} + +Control* +AccessibilityContainer::GetOwner(void) +{ + SysAssertf(__pAccessibilityContainerImpl != null, "Not constructed properly by platform."); + return &(__pAccessibilityContainerImpl->GetOwner().GetPublic()); +} + +result +AccessibilityContainer::AddAccessibilityListener(IAccessibilityListener& listener) +{ + SysAssertf(__pAccessibilityContainerImpl != null, "Not constructed properly by platform."); + result r = __pAccessibilityContainerImpl->AddAccessibilityListener(listener); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Failed to add a listener. ",GetErrorMessage(r)); + return r; +} + +result +AccessibilityContainer::RemoveAccessibilityListener(IAccessibilityListener& listener) +{ + SysAssertf(__pAccessibilityContainerImpl != null, "Not constructed properly by platform."); + result r = __pAccessibilityContainerImpl->RemoveAccessibilityListener(listener); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Failed to Remove a listener. ",GetErrorMessage(r)); + return r; + +} + +AccessibilityElement* +AccessibilityContainer::GetElement(const String& name) const +{ + SysAssertf(__pAccessibilityContainerImpl != null, "Not constructed properly by platform."); + ClearLastResult(); + AccessibilityElement* pElement = __pAccessibilityContainerImpl->GetChildElement(name); + SysTryReturn(NID_UI, pElement, null, E_SYSTEM, "[E_SYSTEM] Getting a child by name is failed.. name : %ls", name.GetPointer()); + return pElement; +} + +result +AccessibilityContainer::AddElement(AccessibilityElement& element) +{ + SysAssertf(__pAccessibilityContainerImpl != null, "Not constructed properly by platform."); + ClearLastResult(); + return __pAccessibilityContainerImpl->AddElement(*_AccessibilityElementImpl::GetInstance(element)); +} + +//result +//AccessibilityContainer::InsertElement(AccessibilityElement* pPreviousElement, AccessibilityElement& element) +//{ +// ClearLastResult(); +// return __pAccessibilityContainerImpl->MoveElement(_AccessibilityElementImpl::GetInstance(*pPreviousElement) +// , *(_AccessibilityElementImpl::GetInstance(element))); +//} + +IList* +AccessibilityContainer::GetElementsN(void) const +{ + SysAssertf(__pAccessibilityContainerImpl != null, "Not constructed properly by platform."); + return __pAccessibilityContainerImpl->GetElementsN(); +} + +result +AccessibilityContainer::RemoveElement(AccessibilityElement& element) +{ + SysAssertf(__pAccessibilityContainerImpl != null, "Not constructed properly by platform."); + ClearLastResult(); + return __pAccessibilityContainerImpl->RemoveElement(*_AccessibilityElementImpl::GetInstance(element)); +} + +void +AccessibilityContainer::RemoveAllElements(void) +{ + SysAssertf(__pAccessibilityContainerImpl != null, "Not constructed properly by platform."); + __pAccessibilityContainerImpl->RemoveAllElement(); +} + +//result +//AccessibilityContainer::MoveElement(AccessibilityElement* pPreviousElement, AccessibilityElement& element) +//{ +// ClearLastResult(); +// return __pAccessibilityContainerImpl->MoveElement(_AccessibilityElementImpl::GetInstance(*pPreviousElement) +// , *(_AccessibilityElementImpl::GetInstance(element))); +//} + +}} //Tizen::Ui + diff --git a/src/ui/FUiAccessibilityElement.cpp b/src/ui/FUiAccessibilityElement.cpp new file mode 100644 index 0000000..7967792 --- /dev/null +++ b/src/ui/FUiAccessibilityElement.cpp @@ -0,0 +1,158 @@ +// +// 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. +// +#include +#include +#include +#include +#include +#include "FUi_AccessibilityElementImpl.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { +AccessibilityElement::AccessibilityElement(void) + :__pAccessibilityElementImpl(null) +{ +} + +AccessibilityElement::~AccessibilityElement(void) +{ + delete __pAccessibilityElementImpl; + __pAccessibilityElementImpl = null; +} + +result +AccessibilityElement::Construct(const Rectangle& bounds, const String& name) +{ + ClearLastResult(); + SysAssertf(__pAccessibilityElementImpl == null, + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + __pAccessibilityElementImpl = new (std::nothrow) _AccessibilityElementImpl(*this); + SysTryReturn(NID_UI, __pAccessibilityElementImpl, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed"); + return __pAccessibilityElementImpl->Construct(name, FloatRectangle(bounds.x, bounds.y, bounds.width, bounds.height)); +} + +result +AccessibilityElement::Construct(const Tizen::Graphics::FloatRectangle& bounds, const Tizen::Base::String& name) +{ + ClearLastResult(); + SysAssertf(__pAccessibilityElementImpl == null, + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + __pAccessibilityElementImpl = new (std::nothrow) _AccessibilityElementImpl(*this); + SysTryReturn(NID_UI, __pAccessibilityElementImpl, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed"); + return __pAccessibilityElementImpl->Construct(name, bounds); +} + +void +AccessibilityElement::SetBounds(const Rectangle& bounds) +{ + SysAssertf(__pAccessibilityElementImpl != null, "Not yet constructed. Construct() should be called before use."); + ClearLastResult(); + return __pAccessibilityElementImpl->SetBounds(FloatRectangle(bounds.x, bounds.y, bounds.width, bounds.height)); +} + +void +AccessibilityElement::SetBounds(const Tizen::Graphics::FloatRectangle& bounds) +{ + SysAssertf(__pAccessibilityElementImpl != null, "Not yet constructed. Construct() should be called before use."); + ClearLastResult(); + return __pAccessibilityElementImpl->SetBounds(bounds); +} + +void +AccessibilityElement::SetLabel(const String& label) +{ + SysAssertf(__pAccessibilityElementImpl != null, "Not yet constructed. Construct() should be called before use."); + ClearLastResult(); + return __pAccessibilityElementImpl->SetLabel(label); +} + +void +AccessibilityElement::SetHint(const String& hint) +{ + SysAssertf(__pAccessibilityElementImpl != null, "Not yet constructed. Construct() should be called before use."); + ClearLastResult(); + return __pAccessibilityElementImpl->SetHint(hint); +} + +void +AccessibilityElement::SetTrait(const String& trait) +{ + SysAssertf(__pAccessibilityElementImpl != null, "Not yet constructed. Construct() should be called before use."); + return __pAccessibilityElementImpl->SetTrait(trait); +} + +void +AccessibilityElement::SetValue(const Tizen::Base::String& value) +{ + SysAssertf(__pAccessibilityElementImpl != null, "Not yet constructed. Construct() should be called before use."); + return __pAccessibilityElementImpl->SetValue(value); +} + +String +AccessibilityElement::GetName(void) const +{ + SysAssertf(__pAccessibilityElementImpl != null, "Not yet constructed. Construct() should be called before use."); + return __pAccessibilityElementImpl->GetName(); +} + +Rectangle +AccessibilityElement::GetBounds(void) const +{ + SysAssertf(__pAccessibilityElementImpl != null, "Not yet constructed. Construct() should be called before use."); + FloatRectangle floatRectangle = __pAccessibilityElementImpl->GetBounds(); + Rectangle rectangle((int)floatRectangle.x, (int)floatRectangle.y, (int)floatRectangle.width, (int)floatRectangle.height); + return rectangle; +} + +Tizen::Graphics::FloatRectangle +AccessibilityElement::GetBoundsF(void) const +{ + SysAssertf(__pAccessibilityElementImpl != null, "Not yet constructed. Construct() should be called before use."); + return __pAccessibilityElementImpl->GetBounds(); +} + +String +AccessibilityElement::GetLabel(void) const +{ + SysAssertf(__pAccessibilityElementImpl != null, "Not yet constructed. Construct() should be called before use."); + return __pAccessibilityElementImpl->GetLabel(); +} + +String +AccessibilityElement::GetHint(void) const +{ + SysAssertf(__pAccessibilityElementImpl != null, "Not yet constructed. Construct() should be called before use."); + return __pAccessibilityElementImpl->GetHint(); +} + +String +AccessibilityElement::GetTrait(void) const +{ + SysAssertf(__pAccessibilityElementImpl != null, "Not yet constructed. Construct() should be called before use."); + return __pAccessibilityElementImpl->GetTraitString(); +} + +Tizen::Base::String +AccessibilityElement::GetValue(void) const +{ + SysAssertf(__pAccessibilityElementImpl != null, "Not yet constructed. Construct() should be called before use."); + return __pAccessibilityElementImpl->GetValue(); +} + +}} //Tizen::Ui diff --git a/src/ui/FUiCardLayout.cpp b/src/ui/FUiCardLayout.cpp new file mode 100644 index 0000000..8776b83 --- /dev/null +++ b/src/ui/FUiCardLayout.cpp @@ -0,0 +1,62 @@ +// +// 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 FUiCardLayout.cpp + * @brief This is the implementation file for CardLayout class. + * + * This file contains the implementation of CardLayout class. + */ + +#include +#include +#include "FUi_CardLayoutImpl.h" + +namespace Tizen { namespace Ui +{ + +CardLayout::CardLayout(void) +{ +} + +CardLayout::~CardLayout(void) +{ +} + +result +CardLayout::Construct(void) +{ + ClearLastResult(); + + _CardLayoutImpl* pCardLayoutImpl = _CardLayoutImpl::GetInstance(*this); + SysAssertf(pCardLayoutImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pCardLayoutImpl = _CardLayoutImpl::CreateCardLayoutImplN(this); + result r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _LayoutImpl::SetLayoutImpl(this, pCardLayoutImpl); + + return E_SUCCESS; +} + +Tizen::Ui::LayoutType +CardLayout::GetLayoutType(void) const +{ + return LAYOUT_CARD; +} + +}} // Tizen::Ui diff --git a/src/ui/FUiClipboard.cpp b/src/ui/FUiClipboard.cpp new file mode 100644 index 0000000..a09a2df --- /dev/null +++ b/src/ui/FUiClipboard.cpp @@ -0,0 +1,151 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file FUiClipboard.cpp + * @brief This is the implementation file for Clipboard class. + * @version 1.0 + * + * This file contains the implementation of Header class. + */ + +#include +#include +#include +#include "FUi_ClipboardImpl.h" +#include "FUi_ClipboardItemImpl.h" + +using namespace Tizen::Base::Collection; + +namespace Tizen { namespace Ui +{ + +result +Clipboard::CopyItem(const ClipboardItem& item) +{ + SysAssertf((__pClipboardImpl != null), "Clipboard wasn't initialized."); + + const _ClipboardItemImpl* pItemImpl = _ClipboardItemImpl::GetInstance(item); + SysTryReturn(NID_UI, pItemImpl, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] A specified input parameter is invalid."); + + result r = __pClipboardImpl->CopyItem(*pItemImpl); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +IList* +Clipboard::RetrieveItemsN(unsigned long dataTypes) +{ + SysAssertf((__pClipboardImpl != null), "Clipboard wasn't initialized."); + + IList* pList = __pClipboardImpl->RetrieveItemsN(dataTypes); + result r = GetLastResult(); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + SetLastResult(E_SUCCESS); + + return pList; + +CATCH: + if (pList) + { + pList->RemoveAll(true); + delete pList; + } + + return null; +} + +ClipboardItem* +Clipboard::RetrieveLatestItemN(unsigned long dataTypes) +{ + SysAssertf((__pClipboardImpl != null), "Clipboard wasn't initialized."); + + _ClipboardItemImpl* pItemImpl = __pClipboardImpl->RetrieveLatestItemN(dataTypes); + result r = GetLastResult(); + SysTryReturn(NID_UI, pItemImpl, null, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturn(NID_UI, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + SetLastResult(E_SUCCESS); + + return &(pItemImpl->GetPublic()); +} + +result +Clipboard::ShowPopup(unsigned long dataTypes, const Tizen::Ui::IClipboardPopupEventListener& listener) +{ + Clipboard* pClipboard = GetInstance(); + SysAssertf((pClipboard != null), "Clipboard wasn't initialized."); + + _ClipboardImpl* pClipboardImpl = _ClipboardImpl::GetInstance(*pClipboard); + SysAssertf((pClipboardImpl != null), "Clipboard wasn't initialized."); + + result r = pClipboardImpl->ShowPopup(dataTypes, listener); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +Clipboard::HidePopup(void) +{ + Clipboard* pClipboard = GetInstance(); + SysAssertf((pClipboard != null), "Clipboard wasn't initialized."); + + _ClipboardImpl* pClipboardImpl = _ClipboardImpl::GetInstance(*pClipboard); + SysAssertf((pClipboardImpl != null), "Clipboard wasn't initialized."); + + result r = pClipboardImpl->HidePopup(); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +bool +Clipboard::IsPopupVisible(void) +{ + Clipboard* pClipboard = GetInstance(); + SysAssertf((pClipboard != null), "Clipboard wasn't initialized."); + + _ClipboardImpl* pClipboardImpl = _ClipboardImpl::GetInstance(*pClipboard); + SysAssertf((pClipboardImpl != null), "Clipboard wasn't initialized."); + + return pClipboardImpl->IsPopupVisible(); +} + +Clipboard* +Clipboard::GetInstance(void) +{ + static Clipboard instance; + + return (&instance); +} + +Clipboard::Clipboard(void) + : __pClipboardImpl(null) +{ + __pClipboardImpl = _ClipboardImpl::CreateInstanceN(); +} + +Clipboard::~Clipboard(void) +{ + delete __pClipboardImpl; + __pClipboardImpl = null; +} + +}} //Tizen::Ui diff --git a/src/ui/FUiClipboardItem.cpp b/src/ui/FUiClipboardItem.cpp new file mode 100644 index 0000000..c780bf4 --- /dev/null +++ b/src/ui/FUiClipboardItem.cpp @@ -0,0 +1,81 @@ +// +// 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 FUiClipboardItem.cpp + * @brief This is the implementation file for ClipboardItem class. + * @version 1.0 + * + * This file contains the implementation of ClipboardItem class. + */ + +#include +#include +#include +#include "FUi_ClipboardItemImpl.h" + +using namespace Tizen::Base; + +namespace Tizen { namespace Ui +{ + +ClipboardItem::ClipboardItem(void) + : __pImpl(null) +{ +} + +ClipboardItem::~ClipboardItem(void) +{ + delete __pImpl; +} + +result +ClipboardItem::Construct(ClipboardDataType dataType, const Object& data) +{ + SysAssertf((__pImpl == null), + "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + __pImpl = _ClipboardItemImpl::CreateInstanceN(this, dataType, data); + result r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +ClipboardDataType +ClipboardItem::GetDataType(void) const +{ + if (!__pImpl) + { + return CLIPBOARD_DATA_TYPE_NONE; + } + + return __pImpl->GetDataType(); +} + +Object* +ClipboardItem::GetData(void) const +{ + if (!__pImpl) + { + return null; + } + + return __pImpl->GetData(); +} + +}} // Tizen::Ui diff --git a/src/ui/FUiContainer.cpp b/src/ui/FUiContainer.cpp new file mode 100644 index 0000000..3171336 --- /dev/null +++ b/src/ui/FUiContainer.cpp @@ -0,0 +1,477 @@ +// +// 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 FUiContainer.cpp + * @brief This is the implementation file for Container class. + */ + +#include +#include +#include "FUi_ContainerImpl.h" +#include "FUi_ErrorMessages.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Ui; + +namespace Tizen { namespace Ui { + +Container::Container(void) +{ +} + +Container::~Container(void) +{ +} + +result +Container::Construct(void) +{ + SysAssertf(_pControlImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + _ContainerImpl* pImpl = _ContainerImpl::CreateContainerImplN(this); + result r = GetLastResult(); + SysTryReturn(NID_UI, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlImpl = pImpl; + + return E_SUCCESS; +} + +result +Container::Construct(const Rectangle& rect, bool resizable, bool movable) +{ + result r = E_SUCCESS; + SysAssertf(_pControlImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + _ContainerImpl* pImpl = _ContainerImpl::CreateContainerImplN(this, rect, null, null, resizable, movable); + r = GetLastResult(); + SysTryReturn(NID_UI, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlImpl = pImpl; + + return E_SUCCESS; +} + +result +Container::Construct(const FloatRectangle& rect, bool resizable, bool movable) +{ + result r = E_SUCCESS; + SysAssertf(_pControlImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + _ContainerImpl* pImpl = _ContainerImpl::CreateContainerImplN(this, rect, null, null, resizable, movable); + r = GetLastResult(); + SysTryReturn(NID_UI, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlImpl = pImpl; + + return E_SUCCESS; +} + +result +Container::Construct(const Layout& layout, const Rectangle& rect, bool resizable, bool movable) +{ + return Construct(layout, layout, rect, resizable, movable); +} + +result +Container::Construct(const Layout& layout, const FloatRectangle& rect, bool resizable, bool movable) +{ + return Construct(layout, layout, rect, resizable, movable); +} + +result +Container::Construct(const Layout& portraitLayout, const Layout& landscapeLayout, + const Rectangle& rect, bool resizable, bool movable) +{ + result r = E_SUCCESS; + SysAssertf(_pControlImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + _ContainerImpl* pImpl = + _ContainerImpl::CreateContainerImplN(this, rect, &portraitLayout, &landscapeLayout, resizable, movable); + + r = GetLastResult(); + SysTryReturn(NID_UI, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + + _pControlImpl = pImpl; + + return E_SUCCESS; +} + +result +Container::Construct(const Layout& portraitLayout, const Layout& landscapeLayout, + const FloatRectangle& rect, bool resizable, bool movable) +{ + result r = E_SUCCESS; + SysAssertf(_pControlImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + _ContainerImpl* pImpl = + _ContainerImpl::CreateContainerImplN(this, rect, &portraitLayout, &landscapeLayout, resizable, movable); + + r = GetLastResult(); + SysTryReturn(NID_UI, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + + _pControlImpl = pImpl; + + return E_SUCCESS; +} + +result +Container::AddControl(const Control& control) +{ + return AddControl(const_cast< Control* >(&control)); +} + +result +Container::AddControl(Control* pControl) +{ + SysTryReturnResult(NID_UI, pControl != null, E_INVALID_ARG, "pControl is null."); + _ContainerImpl* pImpl = _ContainerImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->AddChild(_ControlImpl::GetInstance(*pControl)); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +void +Container::RemoveAllControls(void) +{ + _ContainerImpl* pImpl = _ContainerImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->RemoveAllChildren(false); +} + +result +Container::RemoveControl(const Control& control) +{ + return RemoveControl(const_cast< Control* >(&control)); +} + +result +Container::RemoveControl(Control* pControl) +{ + SysTryReturnResult(NID_UI, pControl != null, E_INVALID_ARG, "pControl is null."); + _ContainerImpl* pImpl = _ContainerImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->RemoveControl(const_cast <_ControlImpl*>(_ControlImpl::GetInstance(*pControl))); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Container::RemoveControl(int index) +{ + _ContainerImpl* pImpl = _ContainerImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->RemoveControl(index); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Container::SetControlAt(const Control& control, int index) +{ + return SetControlAt(const_cast< Control* >(&control), index); +} + +result +Container::SetControlAt(Control* pControl, int index) +{ + SysTryReturnResult(NID_UI, pControl != null, E_INVALID_ARG, "pControl is null."); + _ContainerImpl* pImpl = _ContainerImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->SetChildAt(_ControlImpl::GetInstance(*pControl), index); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Container::GetControlAt(const Control& control, int& index) const +{ + return GetControlAt(&control, index); +} + +result +Container::GetControlAt(const Control* pControl, int& index) const +{ + SysTryReturnResult(NID_UI, pControl != null, E_INVALID_ARG, "pControl is null."); + const _ContainerImpl* pImpl = _ContainerImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + int childIndex = pImpl->GetChildIndex(const_cast <_ControlImpl*>(_ControlImpl::GetInstance(*pControl))); + result r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + index = childIndex; + + return E_SUCCESS; +} + + +int +Container::GetControlCount(void) const +{ + const _ContainerImpl* pImpl = _ContainerImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetChildCount(); +} + +Control* +Container::GetControl(int index) const +{ + const _ContainerImpl* pImpl = _ContainerImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + _ControlImpl* pChildImpl = pImpl->GetChild(index); + result r = GetLastResult(); + SysTryReturn(NID_UI, pChildImpl, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + return &pChildImpl->GetPublic(); +} + +Control* +Container::GetControl(const Tizen::Base::String& name, bool recursive) const +{ + const _ContainerImpl* pImpl = _ContainerImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + _ControlImpl* pChildImpl = pImpl->SearchControlByName(name, recursive); + if (pChildImpl == null) + { + return null; + } + + return &pChildImpl->GetPublic(); +} + +IList* +Container::GetControls(void) const +{ + const _ContainerImpl* pImpl = _ContainerImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + IList* pChildren = pImpl->GetChildrenPublic(); + result r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + return pChildren; +} + +bool +Container::IsAncestorOf(const Control& control) const +{ + return IsAncestorOf(&control); +} + +bool +Container::IsAncestorOf(const Control* pControl) const +{ + SysTryReturnResult(NID_UI, pControl != null, E_INVALID_ARG, "pControl is null."); + const _ContainerImpl* pImpl = _ContainerImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + bool ancestorOf = pImpl->IsAncestorOf(_ControlImpl::GetInstance(*pControl)); + result r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, false, r, "[%s] Propagating.", GetErrorMessage(r)); + + return ancestorOf; +} + +void +Container::OnClearBackground(void) +{ + const _ContainerImpl* pImpl = _ContainerImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + if (pImpl->GetCore().IsCalledGetCanvasN()) + { + Canvas* pCanvas = GetCanvasN(); + if (pCanvas) + { + pCanvas->SetBackgroundColor(pImpl->GetBackgroundColor()); + pCanvas->Clear(); + delete pCanvas; + } + } +} + +result +Container::OnDraw(void) +{ + _ContainerImpl* pImpl = _ContainerImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->CallOnDraw(); + return E_SUCCESS; +} + +result +Container::OnBoundsChanging(const Rectangle& oldRect, const Rectangle& newRect) +{ + return E_SUCCESS; +} + +result +Container::OnBoundsChanging(const FloatRectangle& oldRect, const FloatRectangle& newRect) +{ + return E_SUCCESS; +} + +void +Container::OnEvaluateSize(Dimension& evaluatedSize) +{ + +} + +bool +Container::OnEvaluateSize(FloatDimension& evaluatedSize) +{ + return false; +} + +void +Container::OnBoundsChanged(const Rectangle& oldRect, const Rectangle& newRect) +{ + +} + +void +Container::OnBoundsChanged(const FloatRectangle& oldRect, const FloatRectangle& newRect) +{ + +} + +void +Container::OnShowStateChanging(bool showState) +{ + +} + +void +Container::OnShowStateChanged(bool showState) +{ + +} + +Layout* +Container::GetPortraitLayoutN(void) const +{ + const _ContainerImpl* pImpl = _ContainerImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + Layout* pLayout = pImpl->GetPublicPortraitLayoutN(); + result r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + return pLayout; +} + +Layout* +Container::GetLandscapeLayoutN(void) const +{ + const _ContainerImpl* pImpl = _ContainerImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + Layout* pLayout = pImpl->GetPublicLandscapeLayoutN(); + result r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + return pLayout; +} + +Layout* +Container::GetLayoutN(void) const +{ + const _ContainerImpl* pImpl = _ContainerImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + Layout* pLayout = pImpl->GetPublicLayoutN(); + result r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + return pLayout; +} + +result +Container::SetControlAlwaysOnTop(Control& control, bool alwaysOnTop) +{ + _ContainerImpl* pImpl = _ContainerImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->SetControlAlwaysOnTop(control, alwaysOnTop); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Container::SetControlAlwaysAtBottom(Control& control, bool alwaysAtBottom) +{ + _ContainerImpl* pImpl = _ContainerImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pImpl->SetControlAlwaysAtBottom(control, alwaysAtBottom); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + + +bool +Container::IsControlAlwaysAtBottom(const Control& control) const +{ + return IsControlAlwaysAtBottom(&control); +} + +bool +Container::IsControlAlwaysAtBottom(const Control* pControl) const +{ + SysTryReturnResult(NID_UI, pControl != null, E_INVALID_ARG, "pControl is null."); + const _ContainerImpl* pImpl = _ContainerImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsControlAlwaysAtBottom(*pControl); +} +bool +Container::IsControlAlwaysOnTop(const Control& control) const +{ + return IsControlAlwaysOnTop(&control); +} + +bool +Container::IsControlAlwaysOnTop(const Control* pControl) const +{ + SysTryReturnResult(NID_UI, pControl != null, E_INVALID_ARG, "pControl is null."); + const _ContainerImpl* pImpl = _ContainerImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->IsControlAlwaysOnTop(*pControl); +} + +}} //Tizen::Ui diff --git a/src/ui/FUiControl.cpp b/src/ui/FUiControl.cpp new file mode 100644 index 0000000..3bfe123 --- /dev/null +++ b/src/ui/FUiControl.cpp @@ -0,0 +1,1634 @@ +// +// 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 FUiControl.cpp + * @brief This is the implementation file for the Control class. + */ + +#include +#include +#include +#include +#include +#include "FUi_ControlImpl.h" +#include "FUi_ContainerImpl.h" +#include "FUi_ErrorMessages.h" +#include "FUiAnimVisualElement.h" + + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; +using namespace Tizen::Ui::Animations; + + +namespace Tizen { namespace Ui { + +Control::Control(void) + : _pControlImpl(null) +{ +} + +Control::~Control(void) +{ + Dispose(); +} + +void +Control::Dispose(void) +{ + delete _pControlImpl; + _pControlImpl = null; +} + +result +Control::Construct(void) +{ + SysAssertf(_pControlImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + _ControlImpl* pImpl = _ControlImpl::CreateControlImplN(*this); + result r = GetLastResult(); + SysTryReturn(NID_UI, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlImpl = pImpl; + + return E_SUCCESS; +} + +result +Control::Destroy(void) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pControlImpl->Destroy(); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Control::Draw(void) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before used."); + + result r = pControlImpl->Draw(true); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Control::Draw(bool recursive) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pControlImpl->Draw(recursive); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +void +Control::Invalidate(bool recursive) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + pControlImpl->Invalidate(recursive); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +Control::InvalidateBounds(const Rectangle& bounds) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before used."); + + pControlImpl->Invalidate(bounds); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +Control::InvalidateBounds(const FloatRectangle& bounds) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before used."); + + pControlImpl->Invalidate(bounds); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +Canvas* +Control::GetCanvasN(void) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + Canvas* pCanvas = pControlImpl->GetCanvasN(); + result r = GetLastResult(); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return pCanvas; + +CATCH: + delete pCanvas; + return null; +} + +Canvas* +Control::GetCanvasN(int x, int y, int w, int h) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + Canvas* pCanvas = pControlImpl->GetCanvasN(Rectangle(x, y, w, h)); + result r = GetLastResult(); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return pCanvas; + +CATCH: + delete pCanvas; + return null; +} + +Canvas* +Control::GetCanvasN(float x, float y, float w, float h) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + Canvas* pCanvas = pControlImpl->GetCanvasN(FloatRectangle(x, y, w, h)); + result r = GetLastResult(); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return pCanvas; + +CATCH: + delete pCanvas; + return null; +} + +Canvas* +Control::GetCanvasN(const Rectangle& bounds) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + Canvas* pCanvas = pControlImpl->GetCanvasN(bounds); + result r = GetLastResult(); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return pCanvas; + +CATCH: + delete pCanvas; + return null; +} + +Canvas* +Control::GetCanvasN(const FloatRectangle& bounds) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + Canvas* pCanvas = pControlImpl->GetCanvasN(bounds); + result r = GetLastResult(); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return pCanvas; + +CATCH: + delete pCanvas; + return null; +} + +result +Control::SetEnabled(bool enable) +{ + //versioning + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + + if (Tizen::App::_AppInfo::GetApiVersion() == _API_VERSION_2_0 && Tizen::App::_AppInfo::IsOspCompat()) + { + SysTryReturn(NID_UI, + pControlImpl, E_UNSUPPORTED_OPERATION, + E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] This control is not constructed."); + } + else + { + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + } + + pControlImpl->SetEnableState(enable); + result r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Control::Show(void) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pControlImpl->Show(); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +void +Control::GetBounds(int& x, int& y, int& w, int& h) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + Rectangle bounds = pControlImpl->GetBounds(); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + x = bounds.x; + y = bounds.y; + w = bounds.width; + h = bounds.height; +} + +void +Control::GetBounds(float& x, float& y, float& w, float& h) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + FloatRectangle bounds = pControlImpl->GetBoundsF(); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + x = bounds.x; + y = bounds.y; + w = bounds.width; + h = bounds.height; +} + +Rectangle +Control::GetBounds(void) const +{ + const Rectangle errorBounds = _ControlImpl::GetErrorBounds(); + + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + Rectangle bounds = pControlImpl->GetBounds(); + result r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, errorBounds, r, "[%s] Propagating.", GetErrorMessage(r)); + + return bounds; +} + +FloatRectangle +Control::GetBoundsF(void) const +{ + const FloatRectangle errorBounds = _ControlImpl::GetErrorBoundsF(); + + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + FloatRectangle bounds = pControlImpl->GetBoundsF(); + result r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, errorBounds, r, "[%s] Propagating.", GetErrorMessage(r)); + + return bounds; +} + +Dimension +Control::GetSize(void) const +{ + const Rectangle errorBounds = _ControlImpl::GetErrorBounds(); + const Dimension errorSize(errorBounds.width, errorBounds.height); + + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + Dimension size = pControlImpl->GetSize(); + result r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, errorSize, r, "[%s] Propagating.", GetErrorMessage(r)); + + return size; +} + +FloatDimension +Control::GetSizeF(void) const +{ + const FloatRectangle errorBounds = _ControlImpl::GetErrorBoundsF(); + const FloatDimension errorSize(errorBounds.width, errorBounds.height); + + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + FloatDimension size = pControlImpl->GetSizeF(); + result r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, errorSize, r, "[%s] Propagating.", GetErrorMessage(r)); + + return size; +} + +void +Control::GetSize(int& w, int& h) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + Dimension size = pControlImpl->GetSize(); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + w = size.width; + h = size.height; +} + +void +Control::GetSize(float& w, float& h) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + FloatDimension size = pControlImpl->GetSizeF(); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + w = size.width; + h = size.height; +} + +Point +Control::GetPosition(void) const +{ + const Rectangle errorBounds = _ControlImpl::GetErrorBounds(); + const Point errorPosition(errorBounds.x, errorBounds.y); + + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + Point position = pControlImpl->GetPosition(); + result r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, errorPosition, r, "[%s] Propagating.", GetErrorMessage(r)); + + return position; +} + +FloatPoint +Control::GetPositionF(void) const +{ + const FloatRectangle errorBounds = _ControlImpl::GetErrorBoundsF(); + const FloatPoint errorPosition(errorBounds.x, errorBounds.y); + + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + FloatPoint position = pControlImpl->GetPositionF(); + result r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, errorPosition, r, "[%s] Propagating.", GetErrorMessage(r)); + + return position; +} + +void +Control::GetPosition(int& x, int& y) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + Point position = pControlImpl->GetPosition(); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + x = position.x; + y = position.y; +} + +void +Control::GetPosition(float& x, float& y) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + FloatPoint position = pControlImpl->GetPositionF(); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + x = position.x; + y = position.y; +} + +int +Control::GetX(void) const +{ + const Rectangle errorBounds = _ControlImpl::GetErrorBounds(); + const int errorX = errorBounds.x; + + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + int x = pControlImpl->GetPosition().x; + result r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, errorX, r, "[%s] Propagating.", GetErrorMessage(r)); + + return x; +} + +float +Control::GetXF(void) const +{ + const FloatRectangle errorBounds = _ControlImpl::GetErrorBoundsF(); + const float errorX = errorBounds.x; + + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + float x = pControlImpl->GetPositionF().x; + result r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, errorX, r, "[%s] Propagating.", GetErrorMessage(r)); + + return x; +} + +int +Control::GetY(void) const +{ + const Rectangle errorBounds = _ControlImpl::GetErrorBounds(); + const int errorY = errorBounds.y; + + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + int y = pControlImpl->GetPosition().y; + result r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, errorY, r, "[%s] Propagating.", GetErrorMessage(r)); + + return y; +} + +float +Control::GetYF(void) const +{ + const FloatRectangle errorBounds = _ControlImpl::GetErrorBoundsF(); + const float errorY = errorBounds.y; + + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + float y = pControlImpl->GetPositionF().y; + result r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, errorY, r, "[%s] Propagating.", GetErrorMessage(r)); + + return y; +} + +int +Control::GetWidth(void) const +{ + const Rectangle errorBounds = _ControlImpl::GetErrorBounds(); + const int errorWidth = errorBounds.width; + + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + int width = pControlImpl->GetSize().width; + result r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, errorWidth, r, "[%s] Propagating.", GetErrorMessage(r)); + + return width; +} + +float +Control::GetWidthF(void) const +{ + const FloatRectangle errorBounds = _ControlImpl::GetErrorBoundsF(); + const float errorWidth = errorBounds.width; + + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + float width = pControlImpl->GetSizeF().width; + result r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, errorWidth, r, "[%s] Propagating.", GetErrorMessage(r)); + + return width; +} + +int +Control::GetHeight(void) const +{ + const Rectangle errorBounds = _ControlImpl::GetErrorBounds(); + const int errorHeight = errorBounds.height; + + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + int height = pControlImpl->GetSize().height; + result r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, errorHeight, r, "[%s] Propagating.", GetErrorMessage(r)); + + return height; +} + +float +Control::GetHeightF(void) const +{ + const FloatRectangle errorBounds = _ControlImpl::GetErrorBoundsF(); + const float errorHeight = errorBounds.height; + + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + float height = pControlImpl->GetSizeF().height; + result r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, errorHeight, r, "[%s] Propagating.", GetErrorMessage(r)); + + return height; +} + +Container* +Control::GetParent(void) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + _ContainerImpl* pParentImpl = pControlImpl->GetParent(); + result r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + return pParentImpl ? &pParentImpl->GetPublic() : null; +} + +String +Control::GetFont(void) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pControlImpl->GetFont(); +} + +result +Control::SetBounds(int x, int y, int w, int h) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pControlImpl->SetBounds(Rectangle(x, y, w, h)); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Control::SetBounds(float x, float y, float w, float h) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pControlImpl->SetBounds(FloatRectangle(x, y, w, h)); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Control::SetBounds(const Rectangle& bounds) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pControlImpl->SetBounds(bounds); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Control::SetBounds(const FloatRectangle& bounds) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pControlImpl->SetBounds(bounds); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Control::SetSize(int w, int h) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pControlImpl->SetSize(Dimension(w, h)); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Control::SetSize(float w, float h) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pControlImpl->SetSize(FloatDimension(w, h)); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Control::SetSize(const Dimension& size) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pControlImpl->SetSize(size); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Control::SetSize(const FloatDimension& size) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pControlImpl->SetSize(size); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Control::SetPosition(int x, int y) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pControlImpl->SetPosition(Point(x, y)); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Control::SetPosition(float x, float y) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pControlImpl->SetPosition(FloatPoint(x, y)); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Control::SetPosition(const Point& position) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pControlImpl->SetPosition(position); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Control::SetPosition(const FloatPoint& position) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pControlImpl->SetPosition(position); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Control::SetFont(const String& fontName) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pControlImpl->SetFont(fontName); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + return E_SUCCESS; +} + +bool +Control::IsEnabled(void) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pControlImpl->IsEnabled(); +} + +bool +Control::IsVisible(void) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pControlImpl->IsVisible(); +} + +result +Control::SetFocus() +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + pControlImpl->SetFocused(); + result r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Control::SetShowState(bool state) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pControlImpl->SetVisibleState(state); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +Tizen::Ui::Animations::VisualElement* +Control::GetVisualElement(void) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pControlImpl->GetVisualElement(); + //return pControlImpl->GetCustomVisualElement(); +} + +bool +Control::Contains(int x, int y) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pControlImpl->Contains(Point(x, y)); +} + +bool +Control::Contains(float x, float y) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pControlImpl->Contains(FloatPoint(x, y)); +} + +bool +Control::Contains(const Point& point) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pControlImpl->Contains(point); +} + +bool +Control::Contains(const FloatPoint& point) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pControlImpl->Contains(point); +} + +bool +Control::HasFocus(void) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pControlImpl->IsFocused(); +} + +bool +Control::GetShowState(void) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pControlImpl->GetVisibleState(); +} + +String +Control::GetName(void) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pControlImpl->GetName(); +} + +void +Control::SetName(const String& name) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + pControlImpl->SetName(name); +} + +void +Control::AddFocusEventListener(IFocusEventListener& listener) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pControlImpl->AddFocusEventListener(listener); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +Control::RemoveFocusEventListener(IFocusEventListener& listener) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pControlImpl->RemoveFocusEventListener(listener); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +Control::AddKeyEventListener(IKeyEventListener& listener) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pControlImpl->AddKeyEventListener(listener); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +Control::RemoveKeyEventListener(IKeyEventListener& listener) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pControlImpl->RemoveKeyEventListener(listener); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +Control::AddTouchEventListener(ITouchEventListener& listener) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pControlImpl->AddTouchEventListener(listener); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +Control::RemoveTouchEventListener(ITouchEventListener& listener) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pControlImpl->RemoveTouchEventListener(listener); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +Control::AddDragDropEventListener(IDragDropEventListener& listener) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pControlImpl->AddDragDropEventListener(listener); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +Control::AddDragDropEventListener(IDragDropEventListenerF& listener) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pControlImpl->AddDragDropEventListener(listener); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +Control::RemoveDragDropEventListener(IDragDropEventListener& listener) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pControlImpl->RemoveDragDropEventListener(listener); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +Control::RemoveDragDropEventListenerF(IDragDropEventListenerF& listener) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pControlImpl->RemoveDragDropEventListenerF(listener); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +Control::AddTouchModeChangedEventListener(ITouchModeChangedEventListener& listener) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pControlImpl->AddTouchModeChangedEventListener(listener); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +Control::RemoveTouchModeChangedEventListener(ITouchModeChangedEventListener& listener) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pControlImpl->RemoveTouchModeChangedEventListener(listener); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +Control::SetDragEnabled(bool enabled) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + pControlImpl->SetDragEnabled(enabled); +} + +void +Control::SetDropEnabled(bool enabled) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + pControlImpl->SetDropEnabled(enabled); +} + +void +Control::RequestRedraw(bool show) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + pControlImpl->RequestRedraw(show); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +result +Control::OnInitializing(void) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysTryReturn(NID_UI, pControlImpl, E_FAILURE, E_FAILURE, "[E_FAILURE] This callback returns failure."); + + return E_SUCCESS; +} + +result +Control::OnTerminating(void) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysTryReturn(NID_UI, pControlImpl, E_FAILURE, E_FAILURE, "[E_FAILURE] This callback returns failure."); + + return E_SUCCESS; +} + +void +Control::OnUserEventReceivedN(RequestId requestId, IList* pArgs) +{ +} + +void +Control::SendUserEvent(RequestId requestId, const IList* pArgs) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + pControlImpl->SendUserEvent(requestId, pArgs); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +result +Control::SetFocusable(bool focusable) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pControlImpl->SetFocusable(focusable); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +bool +Control::IsFocusable(void) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pControlImpl->IsFocusable(); +} + +bool +Control::IsInTouchMode(void) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pControlImpl->IsInTouchMode(); +} + + +result +Control::SetCompositeMode(Tizen::Ui::CompositeMode compositeMode) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pControlImpl->SetCompositeMode(compositeMode); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +CompositeMode +Control::GetCompositeMode(void) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pControlImpl->GetCompositeMode(); +} + +result +Control::SetChromaKeyColor(Color chromaKeyColor) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pControlImpl->SetChromaKeyColor(chromaKeyColor); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +Color +Control::GetChromaKeyColor(void) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pControlImpl->GetChromaKeyColor(); +} + +result +Control::ConsumeInputEvent(void) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + pControlImpl->ConsumeInputEvent(); + result r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +IKeyEventListener* +Control::GetDefaultkeyEventListener(void) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pControlImpl->GetDefaultKeyEventListener(); +} + +result +Control::SetDefaultKeyEventListener(IKeyEventListener* pDefaultListener) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + pControlImpl->SetDefaultKeyEventListener(pDefaultListener); + result r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +ITouchEventListener* +Control::GetDefaultTouchEventListener(void) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pControlImpl->GetDefaultTouchEventListener(); +} + +result +Control::SetDefaultTouchEventListener(ITouchEventListener* pDefaultListener) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + pControlImpl->SetDefaultTouchEventListener(pDefaultListener); + result r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +bool +Control::IsMovable(void) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pControlImpl->IsMovable(); +} + +bool +Control::IsResizable(void) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pControlImpl->IsResizable(); +} + +result +Control::SetMinimumSize(const Dimension& minSize) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pControlImpl->SetMinimumSize(minSize); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Control::SetMinimumSize(const FloatDimension& minSize) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pControlImpl->SetMinimumSize(minSize); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Control::SetMaximumSize(const Dimension& maxSize) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pControlImpl->SetMaximumSize(maxSize); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Control::SetMaximumSize(const FloatDimension& maxSize) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pControlImpl->SetMaximumSize(maxSize); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +Point +Control::ConvertToControlPosition(const Point& screenPosition) const +{ + const Rectangle errorBounds = _ControlImpl::GetErrorBounds(); + const Point errorPosition(errorBounds.x, errorBounds.y); + + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before used."); + + Point point = pControlImpl->ConvertToControlPosition(screenPosition); + result r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, errorPosition, r, "[%s] Propagating.", GetErrorMessage(r)); + + return point; +} + +FloatPoint +Control::ConvertToControlPosition(const FloatPoint& screenPosition) const +{ + const FloatRectangle errorBounds = _ControlImpl::GetErrorBoundsF(); + const FloatPoint errorPosition(errorBounds.x, errorBounds.y); + + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before used."); + + FloatPoint point = pControlImpl->ConvertToControlPosition(screenPosition); + result r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, errorPosition, r, "[%s] Propagating.", GetErrorMessage(r)); + + return point; +} + +Point +Control::ConvertToScreenPosition(const Point& controlPosition) const +{ + const Rectangle errorBounds = _ControlImpl::GetErrorBounds(); + const Point errorPosition(errorBounds.x, errorBounds.y); + + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before used."); + + Point point = pControlImpl->ConvertToScreenPosition(controlPosition); + result r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, errorPosition, r, "[%s] Propagating.", GetErrorMessage(r)); + + return point; +} + +FloatPoint +Control::ConvertToScreenPosition(const FloatPoint& controlPosition) const +{ + const FloatRectangle errorBounds = _ControlImpl::GetErrorBoundsF(); + const FloatPoint errorPosition(errorBounds.x, errorBounds.y); + + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before used."); + + FloatPoint point = pControlImpl->ConvertToScreenPosition(controlPosition); + result r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, errorPosition, r, "[%s] Propagating.", GetErrorMessage(r)); + + return point; +} + +Dimension +Control::GetMinimumSize(void) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pControlImpl->GetMinimumSize(); +} + +FloatDimension +Control::GetMinimumSizeF(void) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pControlImpl->GetMinimumSizeF(); +} + +Dimension +Control::GetMaximumSize(void) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pControlImpl->GetMaximumSize(); +} + +FloatDimension +Control::GetMaximumSizeF(void) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pControlImpl->GetMaximumSizeF(); +} + +ControlAnimator* +Control::GetControlAnimator(void) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pControlImpl->GetControlAnimator(); +} + +result +Control::AddGestureDetector(const TouchGestureDetector& gestureDetector) +{ + return AddGestureDetector(const_cast< TouchGestureDetector* >(&gestureDetector)); +} + +result +Control::AddGestureDetector(TouchGestureDetector* pGestureDetector) +{ + SysTryReturnResult(NID_UI, pGestureDetector != null, E_INVALID_ARG, "pGestureDetector is null."); + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pControlImpl->AddGestureDetector(*pGestureDetector); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +Control::RemoveGestureDetector(const TouchGestureDetector& gestureDetector) +{ + return RemoveGestureDetector(const_cast< TouchGestureDetector* >(&gestureDetector)); +} + +result +Control::RemoveGestureDetector(TouchGestureDetector* pGestureDetector) +{ + SysTryReturnResult(NID_UI, pGestureDetector != null, E_INVALID_ARG, "pGestureDetector is null."); + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pControlImpl->RemoveGestureDetector(*pGestureDetector); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +void +Control::SetContentAreaBounds(const Rectangle& rect) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + pControlImpl->SetContentAreaBounds(rect); +} + +void +Control::SetContentAreaBounds(const FloatRectangle& rect) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + pControlImpl->SetContentAreaBounds(rect); +} + +Rectangle +Control::GetContentAreaBounds(void) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + Rectangle bounds = pControlImpl->GetContentAreaBounds(); + + return bounds; +} + +FloatRectangle +Control::GetContentAreaBoundsF(void) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + FloatRectangle bounds = pControlImpl->GetContentAreaBoundsF(); + + return bounds; +} + +Bitmap* +Control::GetCapturedBitmapN(void) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pControlImpl->GetCapturedBitmapN(); +} + +Rectangle +Control::GetInvalidatedBounds(void) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before used."); + + return pControlImpl->GetInvalidatedBounds(); +} + +FloatRectangle +Control::GetInvalidatedBoundsF(void) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before used."); + + return pControlImpl->GetInvalidatedBoundsF(); +} + +void +Control::SetMultipointTouchEnabled(bool enable) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + if (pControlImpl) + { + pControlImpl->SetMultiTouchEnabled(enable); + } +} + +bool +Control::IsMultipointTouchEnabled(void) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + if (pControlImpl) + { + return pControlImpl->IsMultiTouchEnabled(); + } + + return false; +} +void +Control::SetEffectSoundEnabled(bool enable) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + if (pControlImpl) + { + return pControlImpl->SetEffectSoundEnabled(enable); + } +} + +bool +Control::IsEffectSoundEnabled(void) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + if (pControlImpl) + { + return pControlImpl->IsEffectSoundEnabled(); + } + return false; +} + +const AccessibilityContainer* +Control::GetAccessibilityContainer(void) const +{ + _ControlImpl* pControlImpl = const_cast<_ControlImpl*>(_ControlImpl::GetInstance(*this)); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before used."); + + return pControlImpl->GetAccessibilityContainer(); +} +AccessibilityContainer* +Control::GetAccessibilityContainer(void) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before used."); + + return pControlImpl->GetAccessibilityContainer(); +} + +void +Control::SetPropagatedTouchEventListener(IPropagatedTouchEventListener* pListener) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before used."); + + pControlImpl->SetPublicPropagatedTouchEventListener(pListener); +} + +void +Control::SetPropagatedKeyEventListener(IPropagatedKeyEventListener* pListener) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before used."); + + pControlImpl->SetPublicPropagatedKeyEventListener(pListener); +} + +void +Control::SetPreviousFocus(Control* pPreviousFocus) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before used."); + + _ControlImpl* pPreviousFocusControlImpl = _ControlImpl::GetInstance(*pPreviousFocus); + SysAssertf(pPreviousFocusControlImpl != null, "Not yet constructed. Construct() should be called before used."); + + pControlImpl->SetPreviousFocus(pPreviousFocusControlImpl); + +} + + void + Control::SetNextFocus(Control* pNextFocus) + { + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before used."); + + _ControlImpl* pNextFocusControlImpl = _ControlImpl::GetInstance(*pNextFocus); + SysAssertf(pNextFocusControlImpl != null, "Not yet constructed. Construct() should be called before used."); + + pControlImpl->SetNextFocus(pNextFocusControlImpl); + + } + +Control* +Control::GetPreviousFocus(void) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before used."); + _ControlImpl* pPreviousControl = pControlImpl->GetPreviousFocus(); + if (pPreviousControl) + { + return &(pPreviousControl->GetPublic()); + } + return null; +} + +Control* +Control::GetNextFocus(void) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before used."); + + _ControlImpl* pNextControl = pControlImpl->GetNextFocus(); + if (pNextControl) + { + return &(pNextControl->GetPublic()); + } + return null; +} + +void +Control::SetTouchPressThreshold(float distance) +{ + _ControlImpl* pControlImpl = const_cast<_ControlImpl*>(_ControlImpl::GetInstance(*this)); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before used."); + + return pControlImpl->SetTouchPressThreshold(distance); +} + +float +Control::GetTouchPressThreshold(void) const +{ + _ControlImpl* pControlImpl = const_cast<_ControlImpl*>(_ControlImpl::GetInstance(*this)); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before used."); + + return pControlImpl->GetTouchPressThreshold(); +} +result +Control::SetFontFromFile(const Tizen::Base::String& fileName) +{ + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pControlImpl->SetFontFromFile(fileName); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + return E_SUCCESS; +} + +String +Control::GetFontFile(void) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*this); + SysAssertf(pControlImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pControlImpl->GetFontFile(); +} +}} // Tizen::Ui diff --git a/src/ui/FUiCustomControlBase.cpp b/src/ui/FUiCustomControlBase.cpp new file mode 100644 index 0000000..3b6c9ec --- /dev/null +++ b/src/ui/FUiCustomControlBase.cpp @@ -0,0 +1,93 @@ +// +// 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 FUiCustomControlBase.cpp + * @brief This is the implementation for the CustomControlBase class. + */ + +#include +#include +#include +#include "FUi_CustomControlBaseImpl.h" +#include "FUi_ErrorMessages.h" + +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { + +CustomControlBase::CustomControlBase() +{ +} + +CustomControlBase::~CustomControlBase() +{ +} + +result +CustomControlBase::Construct(const Rectangle& rect, bool resizable, bool movable) +{ + result r = E_SUCCESS; + SysAssertf(_pControlImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + _CustomControlBaseImpl* pImpl = _CustomControlBaseImpl::CreateCustomControlBaseImplN(this, rect, null, null, resizable, movable); + r = GetLastResult(); + SysTryReturn(NID_UI, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlImpl = pImpl; + + return E_SUCCESS; +} + +result +CustomControlBase::Construct(const Layout& layout, const Rectangle& rect, bool resizable, bool movable) +{ + return Construct(layout, layout, rect, resizable, movable); +} + +result +CustomControlBase::Construct(const Layout& portraitLayout, const Layout& landscapeLayout, + const Rectangle& rect, bool resizable, bool movable) +{ + result r = E_SUCCESS; + SysAssertf(_pControlImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + _CustomControlBaseImpl* pImpl = + _CustomControlBaseImpl::CreateCustomControlBaseImplN(this, rect, &portraitLayout, &landscapeLayout, resizable, movable); + + r = GetLastResult(); + SysTryReturn(NID_UI, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + + _pControlImpl = pImpl; + + return E_SUCCESS; +} + +result +CustomControlBase::PrepareBoundsChange(const Rectangle& oldRect, const Rectangle& newRect) +{ + return E_SUCCESS; +} + +bool +CustomControlBase::EvaluateSize(int& width, int& height) +{ + return true; +} + +}} // Tizen::Ui diff --git a/src/ui/FUiDataBindingContext.cpp b/src/ui/FUiDataBindingContext.cpp new file mode 100644 index 0000000..9ade0f4 --- /dev/null +++ b/src/ui/FUiDataBindingContext.cpp @@ -0,0 +1,115 @@ +// +// 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 FUiDataBindingContext.cpp + * @brief This is the implementation for the DataBindingContext class. + */ + +#include +#include +#include +#include +#include "FUi_ControlImpl.h" +#include "FUi_ContainerImpl.h" +#include "FUi_DataBindingContextImpl.h" + +using namespace Tizen::Base; + +namespace Tizen { namespace Ui +{ + +DataBindingContext::DataBindingContext(const Control& contextOwner) + : __pDataBindingContextImpl(null) +{ + const Container* pContainer = &dynamic_cast(contextOwner); + SysTryReturnVoidResult(NID_UI, pContainer, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] DataBindingContext creation is failed."); + __pDataBindingContextImpl = new (std::nothrow) _DataBindingContextImpl(*_ContainerImpl::GetInstance(*pContainer)); + SysTryCatch(NID_UI, GetLastResult() == E_SUCCESS && __pDataBindingContextImpl, , E_OUT_OF_MEMORY, + "[E_OUT_OF_MEMORY] DataBindingContext creation is failed."); + return; +CATCH: + delete __pDataBindingContextImpl; + __pDataBindingContextImpl = null; +} +DataBindingContext::~DataBindingContext(void) +{ + delete __pDataBindingContextImpl; + __pDataBindingContextImpl = null; +} +Control* +DataBindingContext::GetContextOwner(void) const +{ + SysAssertf(__pDataBindingContextImpl != null, "Not constructed properly by platform."); + ClearLastResult(); + return &(__pDataBindingContextImpl->GetContextOwner()->GetPublic()); +} + +result +DataBindingContext::Bind(const String& bindingId, const String& controlName, const String& propertyName + , Object& dataSource, DataBindingDataType sourceType, DataBindingFlow flow + , DataBindingTrigger trigger, const IDataBindingListener* pListener + , const IDataBindingDataValidator* pValidator + , const IDataBindingDataTransformer* pTransformer) +{ + SysAssertf(__pDataBindingContextImpl != null, "Not constructed properly by platform."); + ClearLastResult(); + return __pDataBindingContextImpl->Bind(bindingId, controlName, propertyName, dataSource, sourceType, flow, trigger, + pListener, pValidator, + pTransformer); +} + +result +DataBindingContext::SetDataBindingEventListener(const String& bindingId, IDataBindingListener* pListener) +{ + SysAssertf(__pDataBindingContextImpl != null, "Not constructed properly by platform."); + ClearLastResult(); + return __pDataBindingContextImpl->SetDataBindingEventListener(bindingId, pListener); +} + +result +DataBindingContext::UnbindAll(void) +{ + SysAssertf(__pDataBindingContextImpl != null, "Not constructed properly by platform."); + ClearLastResult(); + return __pDataBindingContextImpl->UnbindAll(); +} + +result +DataBindingContext::Unbind(const String& bindingId) +{ + SysAssertf(__pDataBindingContextImpl != null, "Not constructed properly by platform."); + ClearLastResult(); + return __pDataBindingContextImpl->Unbind(bindingId); +} + +result +DataBindingContext::UpdateAllBindings(DataBindingDestinationType destType) +{ + SysAssertf(__pDataBindingContextImpl != null, "Not constructed properly by platform."); + ClearLastResult(); + return __pDataBindingContextImpl->UpdateAllBindings(destType); +} + +result +DataBindingContext::UpdateBinding(const String& bindingId, DataBindingDestinationType destType) +{ + SysAssertf(__pDataBindingContextImpl != null, "Not constructed properly by platform."); + ClearLastResult(); + return __pDataBindingContextImpl->UpdateBinding(bindingId, destType); +} + +}}// Tizen::Ui diff --git a/src/ui/FUiFocusManager.cpp b/src/ui/FUiFocusManager.cpp new file mode 100644 index 0000000..6418d9d --- /dev/null +++ b/src/ui/FUiFocusManager.cpp @@ -0,0 +1,80 @@ +// +// 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 FUiFocusManager.cpp +* @brief This is the implementation file for FocusManager class. +* @version 2.0 +* +*/ + +#include +#include "FUi_FocusManagerImpl.h" +#include "FUi_ControlImpl.h" +#include "FUi_WindowImpl.h" + +namespace Tizen { namespace Ui +{ +//////////////////////////////////////////////////////////////////////////////// +/// FocusManager class Lifecycle + +FocusManager::FocusManager(void) +{ + //NOHING +} + +FocusManager::~FocusManager(void) +{ + // NOTHING +} + +FocusManager* +FocusManager::GetInstance(void) +{ + static FocusManager instance; + + return &instance; + +} + +//////////////////////////////////////////////////////////////////////////////// +/// FocusManager class Operation + +Control* +FocusManager::GetCurrentFocusOwner(void) const +{ + _ControlImpl* pControlImpl = _FocusManagerImpl::GetInstance()->GetCurrentFocusOwner(); + if(pControlImpl == null) + { + return null; + } + + return &pControlImpl->GetPublic(); +} + +Window* +FocusManager::GetCurrentFocusedWindow(void) const +{ + _WindowImpl* pWindowImpl = _FocusManagerImpl::GetInstance()->GetCurrentFocusedWindow(); + if(pWindowImpl == null) + { + return null; + } + + return &pWindowImpl->GetPublic(); +} + +} } //Tizen::Ui diff --git a/src/ui/FUiGridLayout.cpp b/src/ui/FUiGridLayout.cpp new file mode 100644 index 0000000..0983d5b --- /dev/null +++ b/src/ui/FUiGridLayout.cpp @@ -0,0 +1,383 @@ +// +// 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 FUiGridLayout.cpp + * @brief This is the implementation file for GridLayout class. + * + * This file contains the implementation of GridLayout class. + */ + +#include +#include +#include "FUi_GridLayoutImpl.h" +#include "FUi_CoordinateSystemUtils.h" + +namespace Tizen { namespace Ui +{ + +GridLayout::GridLayout() +{ +} + +GridLayout::~GridLayout() +{ +} + +result +GridLayout::Construct(int maxRow, int maxColumn) +{ + ClearLastResult(); + + SysTryReturn(NID_UI, (maxRow - 1 >= 0) && (maxColumn - 1 >= 0), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The given parameter is invalid."); + + _GridLayoutImpl* pGridLayoutImpl = _GridLayoutImpl::GetInstance(*this); + SysAssertf(pGridLayoutImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pGridLayoutImpl = _GridLayoutImpl::CreateGridLayoutImplN(this, maxRow, maxColumn); + result r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _LayoutImpl::SetLayoutImpl(this, pGridLayoutImpl); + + return E_SUCCESS; +} + +Tizen::Ui::LayoutType +GridLayout::GetLayoutType(void) const +{ + return LAYOUT_GRID; +} + +int +GridLayout::GetRowCount() const +{ + ClearLastResult(); + + const _GridLayoutImpl* pGridLayoutImpl = _GridLayoutImpl::GetInstance(*this); + SysAssertf(pGridLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pGridLayoutImpl->GetRowCount(); +} + +int +GridLayout::GetColumnCount() const +{ + ClearLastResult(); + + const _GridLayoutImpl* pGridLayoutImpl = _GridLayoutImpl::GetInstance(*this); + SysAssertf(pGridLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pGridLayoutImpl->GetColumnCount(); +} + +result +GridLayout::SetColumnStretchable(int columnIndex, bool stretchable) +{ + ClearLastResult(); + + _GridLayoutImpl* pGridLayoutImpl = _GridLayoutImpl::GetInstance(*this); + SysAssertf(pGridLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + SysTryReturn(NID_UI, (columnIndex >= 0) && (columnIndex <= GetColumnCount() - 1), E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The given parameter is out of range."); + + result r = pGridLayoutImpl->SetColumnStretchable(columnIndex, stretchable); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +GridLayout::SetColumnShrinkable(int columnIndex, bool shrinkable) +{ + ClearLastResult(); + + _GridLayoutImpl* pGridLayoutImpl = _GridLayoutImpl::GetInstance(*this); + SysAssertf(pGridLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + SysTryReturn(NID_UI, (columnIndex >= 0) && (columnIndex <= GetColumnCount() - 1), E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The given parameter is out of range."); + + result r = pGridLayoutImpl->SetColumnShrinkable(columnIndex, shrinkable); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +GridLayout::SetColumnCollapsed(int columnIndex, bool collapsed) +{ + ClearLastResult(); + + _GridLayoutImpl* pGridLayoutImpl = _GridLayoutImpl::GetInstance(*this); + SysAssertf(pGridLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + SysTryReturn(NID_UI, (columnIndex >= 0) && (columnIndex <= GetColumnCount() - 1), E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The given parameter is out of range."); + + result r = pGridLayoutImpl->SetColumnCollapsed(columnIndex, collapsed); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +GridLayout::SetAllColumnsStretchable(bool stretchable) +{ + ClearLastResult(); + + _GridLayoutImpl* pGridLayoutImpl = _GridLayoutImpl::GetInstance(*this); + SysAssertf(pGridLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pGridLayoutImpl->SetAllColumnsStretchable(stretchable); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +GridLayout::SetAllColumnsShrinkable(bool shrinkable) +{ + ClearLastResult(); + + _GridLayoutImpl* pGridLayoutImpl = _GridLayoutImpl::GetInstance(*this); + SysAssertf(pGridLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pGridLayoutImpl->SetAllColumnsShrinkable(shrinkable); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +GridLayout::SetColumnSpacing(int columnIndex, int space) +{ + ClearLastResult(); + + _GridLayoutImpl* pGridLayoutImpl = _GridLayoutImpl::GetInstance(*this); + SysAssertf(pGridLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + SysTryReturn(NID_UI, (columnIndex >= 0) && (columnIndex <= GetColumnCount() - 1), E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The given parameter is out of range."); + SysTryReturn(NID_UI, space >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The given parameter is invalid."); + + result r = pGridLayoutImpl->SetColumnSpacing(columnIndex, _CoordinateSystemUtils::ConvertToFloat(space)); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +GridLayout::SetColumnSpacing(int columnIndex, float space) +{ + ClearLastResult(); + + _GridLayoutImpl* pGridLayoutImpl = _GridLayoutImpl::GetInstance(*this); + SysAssertf(pGridLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + SysTryReturn(NID_UI, (columnIndex >= 0) && (columnIndex <= GetColumnCount() - 1), E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The given parameter is out of range."); + SysTryReturn(NID_UI, space >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The given parameter is invalid."); + + result r = pGridLayoutImpl->SetColumnSpacing(columnIndex, space); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +GridLayout::SetRowStretchable(int rowIndex, bool stretchable) +{ + ClearLastResult(); + + _GridLayoutImpl* pGridLayoutImpl = _GridLayoutImpl::GetInstance(*this); + SysAssertf(pGridLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + SysTryReturn(NID_UI, (rowIndex >= 0) && (rowIndex <= GetRowCount() - 1), E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The given parameter is out of range."); + + result r = pGridLayoutImpl->SetRowStretchable(rowIndex, stretchable); + SysTryReturn(NID_UI, GetLastResult() == E_SUCCESS, GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +GridLayout::SetRowShrinkable(int rowIndex, bool shrinkable) +{ + ClearLastResult(); + + _GridLayoutImpl* pGridLayoutImpl = _GridLayoutImpl::GetInstance(*this); + SysAssertf(pGridLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + SysTryReturn(NID_UI, (rowIndex >= 0) && (rowIndex <= GetRowCount() - 1), E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The given parameter is out of range."); + + result r = pGridLayoutImpl->SetRowShrinkable(rowIndex, shrinkable); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +GridLayout::SetRowCollapsed(int rowIndex, bool collapsed) +{ + ClearLastResult(); + + _GridLayoutImpl* pGridLayoutImpl = _GridLayoutImpl::GetInstance(*this); + SysAssertf(pGridLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + SysTryReturn(NID_UI, (rowIndex >= 0) && (rowIndex <= GetRowCount() - 1), E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The given parameter is out of range."); + + result r = pGridLayoutImpl->SetRowCollapsed(rowIndex, collapsed); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +GridLayout::SetAllRowsStretchable(bool stretchable) +{ + ClearLastResult(); + + _GridLayoutImpl* pGridLayoutImpl = _GridLayoutImpl::GetInstance(*this); + SysAssertf(pGridLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pGridLayoutImpl->SetAllRowsStretchable(stretchable); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +GridLayout::SetAllRowsShrinkable(bool shrinkable) +{ + ClearLastResult(); + _GridLayoutImpl* pGridLayoutImpl = _GridLayoutImpl::GetInstance(*this); + SysAssertf(pGridLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pGridLayoutImpl->SetAllRowsShrinkable(shrinkable); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +GridLayout::SetRowSpacing(int rowIndex, int space) +{ + ClearLastResult(); + + _GridLayoutImpl* pGridLayoutImpl = _GridLayoutImpl::GetInstance(*this); + SysAssertf(pGridLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + SysTryReturn(NID_UI, (rowIndex >= 0) && (rowIndex <= GetRowCount() - 1), E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The given parameter is out of range."); + SysTryReturn(NID_UI, space >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The given parameter is invalid."); + + result r = pGridLayoutImpl->SetRowSpacing(rowIndex, _CoordinateSystemUtils::ConvertToFloat(space)); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +GridLayout::SetRowSpacing(int rowIndex, float space) +{ + ClearLastResult(); + + _GridLayoutImpl* pGridLayoutImpl = _GridLayoutImpl::GetInstance(*this); + SysAssertf(pGridLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + SysTryReturn(NID_UI, (rowIndex >= 0) && (rowIndex <= GetRowCount() - 1), E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The given parameter is out of range."); + SysTryReturn(NID_UI, space >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The given parameter is invalid."); + + result r = pGridLayoutImpl->SetRowSpacing(rowIndex, space); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +GridLayout::SetPosition(Control& childControl, int rowStartIndex, int columnStartIndex, int rowSpan, int columnSpan) +{ + ClearLastResult(); + + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(childControl); + SysTryReturn(NID_UI, pControlImpl, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This instance is not constructed."); + + _GridLayoutImpl* pGridLayoutImpl = _GridLayoutImpl::GetInstance(*this); + SysAssertf(pGridLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pGridLayoutImpl->SetPosition(*pControlImpl, rowStartIndex, columnStartIndex, rowSpan, columnSpan); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +GridLayout::SetAlignment(Control& childControl, LayoutHorizontalAlignment horAlign, LayoutVerticalAlignment vertAlign) +{ + ClearLastResult(); + + _GridLayoutImpl* pGridLayoutImpl = _GridLayoutImpl::GetInstance(*this); + SysAssertf(pGridLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(childControl); + SysTryReturn(NID_UI, pControlImpl, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This instance is not constructed."); + + result r = pGridLayoutImpl->SetAlignment(*pControlImpl, horAlign, vertAlign); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +GridLayout::SetMargin(Control& childControl, int left, int right, int top, int bottom) +{ + ClearLastResult(); + + SysTryReturn(NID_UI, (left >= 0) && (right >= 0) && (top >= 0) && (bottom >= 0), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The given parameter is invalid."); + + _GridLayoutImpl* pGridLayoutImpl = _GridLayoutImpl::GetInstance(*this); + SysAssertf(pGridLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(childControl); + SysTryReturn(NID_UI, pControlImpl, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This instance is not constructed."); + + float floatLeft = _CoordinateSystemUtils::ConvertToFloat(left); + float floatRight = _CoordinateSystemUtils::ConvertToFloat(right); + float floatTop = _CoordinateSystemUtils::ConvertToFloat(top); + float floatBottom = _CoordinateSystemUtils::ConvertToFloat(bottom); + result r = pGridLayoutImpl->SetMargin(*pControlImpl, floatLeft, floatRight, floatTop, floatBottom); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +GridLayout::SetMargin(Control& childControl, float left, float right, float top, float bottom) +{ + ClearLastResult(); + + SysTryReturn(NID_UI, (left >= 0) && (right >= 0) && (top >= 0) && (bottom >= 0), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The given parameter is invalid."); + + _GridLayoutImpl* pGridLayoutImpl = _GridLayoutImpl::GetInstance(*this); + SysAssertf(pGridLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(childControl); + SysTryReturn(NID_UI, pControlImpl, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This instance is not constructed."); + + result r = pGridLayoutImpl->SetMargin(*pControlImpl, left, right, top, bottom); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + + +}} // Tizen::Ui diff --git a/src/ui/FUiHorizontalBoxLayout.cpp b/src/ui/FUiHorizontalBoxLayout.cpp new file mode 100644 index 0000000..a73ecea --- /dev/null +++ b/src/ui/FUiHorizontalBoxLayout.cpp @@ -0,0 +1,316 @@ +// +// 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 FUiHorizontalBoxLayout.cpp + * @brief This is the implementation file for HorizontalBoxLayout class. + * + * This file contains the implementation of HorizontalBoxLayout class. + */ + +#include +#include +#include +#include "FUi_HorizontalBoxLayoutImpl.h" +#include "FUi_CoordinateSystemUtils.h" + +namespace Tizen { namespace Ui +{ + +namespace +{ +#define GET_CONTROL_IMPL(control) \ + _ControlImpl * pControlImpl = null; \ + pControlImpl = _ControlImpl::GetInstance(control); \ + SysTryReturn(NID_UI, pControlImpl, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] pControlImpl is not allocated yet.\n") +} + +HorizontalBoxLayout::HorizontalBoxLayout() +{ +} + +HorizontalBoxLayout::~HorizontalBoxLayout() +{ +} + +result +HorizontalBoxLayout::Construct(HorizontalDirection direction) +{ + ClearLastResult(); + + _HorizontalBoxLayoutImpl* pHorizontalBoxLayoutImpl = _HorizontalBoxLayoutImpl::GetInstance(*this); + SysAssertf(pHorizontalBoxLayoutImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pHorizontalBoxLayoutImpl = _HorizontalBoxLayoutImpl::CreateHorizontalBoxLayoutImplN(this, direction); + result r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _LayoutImpl::SetLayoutImpl(this, pHorizontalBoxLayoutImpl); + + return E_SUCCESS; +} + +Tizen::Ui::LayoutType +HorizontalBoxLayout::GetLayoutType(void) const +{ + return LAYOUT_HORIZONTAL_BOX; +} + +result +HorizontalBoxLayout::GetDirection(HorizontalDirection& direction) const +{ + ClearLastResult(); + + const _HorizontalBoxLayoutImpl* pHorizontalBoxLayoutImpl = _HorizontalBoxLayoutImpl::GetInstance(*this); + SysAssertf(pHorizontalBoxLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pHorizontalBoxLayoutImpl->GetDirection(direction); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +HorizontalBoxLayout::SetVerticalAlignment(Control& childControl, LayoutVerticalAlignment alignment) +{ + ClearLastResult(); + + _HorizontalBoxLayoutImpl* pHorizontalBoxLayoutImpl = _HorizontalBoxLayoutImpl::GetInstance(*this); + SysAssertf(pHorizontalBoxLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(childControl); + SysTryReturn(NID_UI, pControlImpl, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This instance is not constructed."); + + result r = pHorizontalBoxLayoutImpl->SetVerticalAlignment(*pControlImpl, alignment); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +HorizontalBoxLayout::SetSpacing(Control& childControl, int space) +{ + ClearLastResult(); + + SysTryReturn(NID_UI, space >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The given parameter is invalid."); + + _HorizontalBoxLayoutImpl* pHorizontalBoxLayoutImpl = _HorizontalBoxLayoutImpl::GetInstance(*this); + SysAssertf(pHorizontalBoxLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(childControl); + SysTryReturn(NID_UI, pControlImpl, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This instance is not constructed."); + + result r = pHorizontalBoxLayoutImpl->SetSpacing(*pControlImpl, _CoordinateSystemUtils::ConvertToFloat(space)); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +HorizontalBoxLayout::SetSpacing(Control& childControl, float space) +{ + ClearLastResult(); + + SysTryReturn(NID_UI, space >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The given parameter is invalid."); + + _HorizontalBoxLayoutImpl* pHorizontalBoxLayoutImpl = _HorizontalBoxLayoutImpl::GetInstance(*this); + SysAssertf(pHorizontalBoxLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(childControl); + SysTryReturn(NID_UI, pControlImpl, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This instance is not constructed."); + + result r = pHorizontalBoxLayoutImpl->SetSpacing(*pControlImpl, space); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +HorizontalBoxLayout::SetVerticalMargin(Control& childControl, int top, int bottom) +{ + ClearLastResult(); + + SysTryReturn(NID_UI, (top >= 0) && (bottom >= 0), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The given parameter is invalid."); + + _HorizontalBoxLayoutImpl* pHorizontalBoxLayoutImpl = _HorizontalBoxLayoutImpl::GetInstance(*this); + SysAssertf(pHorizontalBoxLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(childControl); + SysTryReturn(NID_UI, pControlImpl, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This instance is not constructed."); + + float floatTop = _CoordinateSystemUtils::ConvertToFloat(top); + float floatBottom = _CoordinateSystemUtils::ConvertToFloat(bottom); + result r = pHorizontalBoxLayoutImpl->SetVerticalMargin(*pControlImpl, floatTop, floatBottom); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +HorizontalBoxLayout::SetVerticalMargin(Control& childControl, float top, float bottom) +{ + ClearLastResult(); + + SysTryReturn(NID_UI, (top >= 0) && (bottom >= 0), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The given parameter is invalid."); + + _HorizontalBoxLayoutImpl* pHorizontalBoxLayoutImpl = _HorizontalBoxLayoutImpl::GetInstance(*this); + SysAssertf(pHorizontalBoxLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(childControl); + SysTryReturn(NID_UI, pControlImpl, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This instance is not constructed."); + + result r = pHorizontalBoxLayoutImpl->SetVerticalMargin(*pControlImpl, top, bottom); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +HorizontalBoxLayout::SetWidth(Control& childControl, int width) +{ + ClearLastResult(); + + SysTryReturn(NID_UI, width >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The given parameter is invalid."); + + _HorizontalBoxLayoutImpl* pHorizontalBoxLayoutImpl = _HorizontalBoxLayoutImpl::GetInstance(*this); + SysAssertf(pHorizontalBoxLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(childControl); + SysTryReturn(NID_UI, pControlImpl, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This instance is not constructed."); + + result r = pHorizontalBoxLayoutImpl->SetWidth(*pControlImpl, _CoordinateSystemUtils::ConvertToFloat(width)); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +HorizontalBoxLayout::SetWidth(Control& childControl, float width) +{ + ClearLastResult(); + + SysTryReturn(NID_UI, width >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The given parameter is invalid."); + + _HorizontalBoxLayoutImpl* pHorizontalBoxLayoutImpl = _HorizontalBoxLayoutImpl::GetInstance(*this); + SysAssertf(pHorizontalBoxLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(childControl); + SysTryReturn(NID_UI, pControlImpl, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This instance is not constructed."); + + result r = pHorizontalBoxLayoutImpl->SetWidth(*pControlImpl, width); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +HorizontalBoxLayout::SetHorizontalFitPolicy(Control& childControl, FitPolicy policy) +{ + ClearLastResult(); + + _HorizontalBoxLayoutImpl* pHorizontalBoxLayoutImpl = _HorizontalBoxLayoutImpl::GetInstance(*this); + SysAssertf(pHorizontalBoxLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(childControl); + SysTryReturn(NID_UI, pControlImpl, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This instance is not constructed."); + + if (!Tizen::App::_AppInfo::IsOspCompat()) + { + if (policy == FIT_POLICY_PARENT) + { + return E_SUCCESS; + } + } + + result r = pHorizontalBoxLayoutImpl->SetItemHorizontalFitPolicy(*pControlImpl, policy); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +HorizontalBoxLayout::SetHeight(Control& childControl, int height) +{ + ClearLastResult(); + + SysTryReturn(NID_UI, height >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The given parameter is invalid."); + + _HorizontalBoxLayoutImpl* pHorizontalBoxLayoutImpl = _HorizontalBoxLayoutImpl::GetInstance(*this); + SysAssertf(pHorizontalBoxLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(childControl); + SysTryReturn(NID_UI, pControlImpl, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This instance is not constructed."); + + result r = pHorizontalBoxLayoutImpl->SetHeight(*pControlImpl, _CoordinateSystemUtils::ConvertToFloat(height)); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +HorizontalBoxLayout::SetHeight(Control& childControl, float height) +{ + ClearLastResult(); + + SysTryReturn(NID_UI, height >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The given parameter is invalid."); + + _HorizontalBoxLayoutImpl* pHorizontalBoxLayoutImpl = _HorizontalBoxLayoutImpl::GetInstance(*this); + SysAssertf(pHorizontalBoxLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(childControl); + SysTryReturn(NID_UI, pControlImpl, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This instance is not constructed."); + + result r = pHorizontalBoxLayoutImpl->SetHeight(*pControlImpl, height); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +HorizontalBoxLayout::SetVerticalFitPolicy(Control& childControl, FitPolicy policy) +{ + ClearLastResult(); + + _HorizontalBoxLayoutImpl* pHorizontalBoxLayoutImpl = _HorizontalBoxLayoutImpl::GetInstance(*this); + SysAssertf(pHorizontalBoxLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(childControl); + SysTryReturn(NID_UI, pControlImpl, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This instance is not constructed."); + + result r = pHorizontalBoxLayoutImpl->SetItemVerticalFitPolicy(*pControlImpl, policy); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +HorizontalBoxLayout::SetWeight(Control& childControl, float weight) +{ + ClearLastResult(); + + _HorizontalBoxLayoutImpl* pHorizontalBoxLayoutImpl = _HorizontalBoxLayoutImpl::GetInstance(*this); + SysAssertf(pHorizontalBoxLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(childControl); + SysTryReturn(NID_UI, pControlImpl, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This instance is not constructed."); + + result r = pHorizontalBoxLayoutImpl->SetWeight(*pControlImpl, weight); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +}} // Tizen::Ui diff --git a/src/ui/FUiInputConnection.cpp b/src/ui/FUiInputConnection.cpp new file mode 100644 index 0000000..7ad8449 --- /dev/null +++ b/src/ui/FUiInputConnection.cpp @@ -0,0 +1,289 @@ +// +// 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 FUiInputConnection.cpp +* @brief This is the implementation file for InputConnection class. +*/ + +#include +#include +#include +#include +#include "FUi_ControlImpl.h" +#include "FUi_InputConnectionImpl.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Locales; +using namespace Tizen::Security; + +namespace Tizen { namespace Ui { + +InputConnection::InputConnection(void) +:__pInputConnectionImpl(null) +{ + +} + +InputConnection::~InputConnection(void) +{ + if (__pInputConnectionImpl) + { + delete __pInputConnectionImpl; + __pInputConnectionImpl = null; + } +} + +result +InputConnection::Construct(const Control* pControl, IInputConnectionEventListener& listener, IInputConnectionProvider& provider) +{ + SysTryReturnResult(NID_UI, pControl, E_INVALID_ARG, "The argument is invalid."); + + __pInputConnectionImpl = _InputConnectionImpl::CreateInputConnectionImplN(this); + result r = GetLastResult(); + SysTryReturn(NID_UI, __pInputConnectionImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __pInputConnectionImpl->Initialize(_ControlImpl::GetInstance(*pControl)->GetCore(), listener, provider); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + +CATCH: + delete __pInputConnectionImpl; + __pInputConnectionImpl = null; + return r; +} + +result +InputConnection::Construct(const Control* pControl, IInputConnectionEventListenerF& listener, IInputConnectionProvider& provider) +{ + SysTryReturnResult(NID_UI, pControl, E_INVALID_ARG, "The argument is invalid."); + + __pInputConnectionImpl = _InputConnectionImpl::CreateInputConnectionImplN(this); + result r = GetLastResult(); + SysTryReturn(NID_UI, __pInputConnectionImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __pInputConnectionImpl->Initialize(_ControlImpl::GetInstance(*pControl)->GetCore(), listener, provider); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + +CATCH: + delete __pInputConnectionImpl; + __pInputConnectionImpl = null; + return r; +} + +result +InputConnection::BindInputMethod(void) +{ + result r = E_SUCCESS; + + SysAssertf(__pInputConnectionImpl, "Not yet constructed. Construct() should be called before use."); + + r = __pInputConnectionImpl->BindInputMethod(); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +void +InputConnection::UnbindInputMethod(void) +{ + SysAssertf(__pInputConnectionImpl, "Not yet constructed. Construct() should be called before use."); + + __pInputConnectionImpl->UnbindInputMethod(); + + return; +} + +result +InputConnection::ShowInputPanel(void) +{ + result r = E_SUCCESS; + + SysAssertf(__pInputConnectionImpl, "Not yet constructed. Construct() should be called before use."); + + r = __pInputConnectionImpl->ShowInputPanel(); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +InputConnection::HideInputPanel(void) +{ + result r = E_SUCCESS; + + SysAssertf(__pInputConnectionImpl, "Not yet constructed. Construct() should be called before use."); + + r = __pInputConnectionImpl->HideInputPanel(); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +void +InputConnection::SetInputPanelStyle(InputPanelStyle style) +{ + SysAssertf(__pInputConnectionImpl, "Not yet constructed. Construct() should be called before use."); + + __pInputConnectionImpl->SetInputPanelStyle(style); + + return; +} + +void +InputConnection::SetAutoCapitalizationMode(AutoCapitalizationMode autoCapitalizationMode) +{ + SysAssertf(__pInputConnectionImpl, "Not yet constructed. Construct() should be called before use."); + + __pInputConnectionImpl->SetAutoCapitalizationMode(autoCapitalizationMode); + + return; +} + +result +InputConnection::FinishTextComposition(void) +{ + result r = E_SUCCESS; + + SysAssertf(__pInputConnectionImpl, "Not yet constructed. Construct() should be called before use."); + + r = __pInputConnectionImpl->FinishTextComposition(); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +void +InputConnection::SetInputPanelAction(InputPanelAction inputPanelAction) +{ + SysAssertf(__pInputConnectionImpl, "Not yet constructed. Construct() should be called before use."); + + __pInputConnectionImpl->SetInputPanelAction(inputPanelAction); + + return; +} + +void +InputConnection::SetInputPanelActionEnabled(bool enable) +{ + SysAssertf(__pInputConnectionImpl, "Not yet constructed. Construct() should be called before use."); + + __pInputConnectionImpl->SetInputPanelActionEnabled(enable); + + return; +} + +result +InputConnection::SetInputPanelLanguage(LanguageCode languageCode) +{ + SysAssertf(__pInputConnectionImpl, "Not yet constructed. Construct() should be called before use."); + + return __pInputConnectionImpl->SetInputPanelLanguage(languageCode); +} + +result +InputConnection::SetCursorPosition(int position) +{ + result r = E_SUCCESS; + + SysAssertf(__pInputConnectionImpl, "Not yet constructed. Construct() should be called before use."); + + r = __pInputConnectionImpl->SetCursorPosition(position); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +InputConnection::SetCursorBounds(const Rectangle& rect) +{ + result r = E_SUCCESS; + + SysAssertf(__pInputConnectionImpl, "Not yet constructed. Construct() should be called before use."); + + r = __pInputConnectionImpl->SetCursorBounds(rect); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +InputConnection::SetCursorBounds(const FloatRectangle& rect) +{ + result r = E_SUCCESS; + + SysAssertf(__pInputConnectionImpl, "Not yet constructed. Construct() should be called before use."); + + r = __pInputConnectionImpl->SetCursorBounds(rect); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +Rectangle +InputConnection::GetInputPanelBounds(void) const +{ + result r = E_SUCCESS; + + SysAssertf(__pInputConnectionImpl, "Not yet constructed. Construct() should be called before use."); + + Rectangle bounds = __pInputConnectionImpl->GetInputPanelBounds(); + r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, Rectangle(0, 0, 0, 0), r, "[%s] Propagating.", GetErrorMessage(r)); + + return bounds; +} + +FloatRectangle +InputConnection::GetInputPanelBoundsF(void) const +{ + result r = E_SUCCESS; + + SysAssertf(__pInputConnectionImpl, "Not yet constructed. Construct() should be called before use."); + + FloatRectangle bounds = __pInputConnectionImpl->GetInputPanelBoundsF(); + r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f), r, "[%s] Propagating.", GetErrorMessage(r)); + + return bounds; +} + +void +InputConnection::SetTextPredictionEnabled(bool enable) +{ + SysAssertf(__pInputConnectionImpl, "Not yet constructed. Construct() should be called before use."); + + __pInputConnectionImpl->SetTextPredictionEnabled(enable); + + return; +} + +void +InputConnection::SendOpaqueCommand(const String& command) +{ + SysAssertf(__pInputConnectionImpl, "Not yet constructed. Construct() should be called before use."); + + __pInputConnectionImpl->SendOpaqueCommand(command); + + return; +} + +}} //Tizen::Ui diff --git a/src/ui/FUiKeyEventInfo.cpp b/src/ui/FUiKeyEventInfo.cpp new file mode 100644 index 0000000..faa8734 --- /dev/null +++ b/src/ui/FUiKeyEventInfo.cpp @@ -0,0 +1,81 @@ +// +// 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 FUiKeyEventInfo.cpp + * @brief This is the implementation file for the KeyEventInfo class. + */ + +#include +#include +#include +#include + +namespace Tizen { namespace Ui +{ + +KeyEventInfo::KeyEventInfo(KeyCode keyCode, int keyModifiers) + : __pKeyEventInfoImpl(null) +{ + _KeyEventInfoImpl* pImpl = _KeyEventInfoImpl::CreateInstanceN(this); + + result r = GetLastResult(); + SysAssertf(pImpl != null, "[%s] Propagating.", GetErrorMessage(r)); + + __pKeyEventInfoImpl = pImpl; + __pKeyEventInfoImpl->SetKeyEventInfo(keyCode, keyModifiers); +} + +KeyEventInfo::~KeyEventInfo(void) +{ + delete __pKeyEventInfoImpl; + __pKeyEventInfoImpl = null; +} + +void +KeyEventInfo::SetKeyCode(KeyCode keyCode) +{ + SysAssertf(__pKeyEventInfoImpl != null, "Not yet constructed. KeyEventInfo() should be called before used."); + + __pKeyEventInfoImpl->SetKeyCode(keyCode); +} + +KeyCode +KeyEventInfo::GetKeyCode(void) const +{ + SysAssertf(__pKeyEventInfoImpl != null, "Not yet constructed. KeyEventInfo() should be called before used."); + + return __pKeyEventInfoImpl->GetKeyCode(); +} + +void +KeyEventInfo::SetKeyModifier(int keyModifiers) +{ + SysAssertf(__pKeyEventInfoImpl != null, "Not yet constructed. KeyEventInfo() should be called before used."); + + __pKeyEventInfoImpl->SetKeyModifier(keyModifiers); +} + +int +KeyEventInfo::GetKeyModifier(void) const +{ + SysAssertf(__pKeyEventInfoImpl != null, "Not yet constructed. KeyEventInfo() should be called before used."); + + return __pKeyEventInfoImpl->GetKeyModifier(); +} + +}} // Tizen::Ui + diff --git a/src/ui/FUiKeyEventManager.cpp b/src/ui/FUiKeyEventManager.cpp new file mode 100644 index 0000000..d845928 --- /dev/null +++ b/src/ui/FUiKeyEventManager.cpp @@ -0,0 +1,100 @@ +// +// 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 FUiKeyEventManager.cpp +* @brief This is the implementation file for KeyEventManager class. +* @version 2.0 +* @see Tizen::Ui::KeyEventManager +* +*/ + +// includes +#include +#include +#include +#include "FUi_KeyEventManagerImpl.h" +#include "FUi_ControlImpl.h" + +using namespace Tizen::Ui; + +namespace Tizen { namespace Ui +{ +KeyEventManager* pKeyEventManagerInstance = null; + +//////////////////////////////////////////////////////////////////////////////// +/// KeyEventManager class Lifecycle + +KeyEventManager::KeyEventManager(void) +{ +} + +KeyEventManager::~KeyEventManager(void) +{ +} + +result +KeyEventManager::Construct(void) +{ + return E_SUCCESS; +} + +KeyEventManager* +KeyEventManager::GetInstance(void) +{ + static pthread_once_t once_block = PTHREAD_ONCE_INIT; + + pthread_once(&once_block, InitializeInstance); + + _KeyEventManagerImpl* pEventImpl = _KeyEventManagerImpl::GetInstance(); + if (!pEventImpl) + { + return null; + } + + return pKeyEventManagerInstance; +} + +void +KeyEventManager::InitializeInstance(void) +{ + static KeyEventManager instance; + pKeyEventManagerInstance = &instance; + +} + +//////////////////////////////////////////////////////////////////////////////// +/// KeyEventManager class Operation + +void +KeyEventManager::AddKeyEventListener(IKeyEventListener& listener) +{ + _KeyEventManagerImpl* pEventImpl = _KeyEventManagerImpl::GetInstance(); + SysAssertf(pEventImpl != null, "Not yet constructed. Construct() should be called before use."); + + pEventImpl->AddKeyEventListener(listener); +} + +void +KeyEventManager::RemoveKeyEventListener(IKeyEventListener& listener) +{ + _KeyEventManagerImpl* pEventImpl = _KeyEventManagerImpl::GetInstance(); + SysAssertf(pEventImpl != null, "Not yet constructed. Construct() should be called before use."); + + pEventImpl->RemoveKeyEventListener(listener); +} + +} } //Tizen::Ui diff --git a/src/ui/FUiKeyboardMap.cpp b/src/ui/FUiKeyboardMap.cpp new file mode 100644 index 0000000..18993f6 --- /dev/null +++ b/src/ui/FUiKeyboardMap.cpp @@ -0,0 +1,2156 @@ +// +// 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 FUiKeyboardMap.cpp +* @brief This is the implementation for the KeyboardMap class. +* @version 2.0 +*/ +// includes +#include +#include +#include +#include + +// using namespace +using namespace Tizen::Base; + +namespace Tizen { namespace Ui +{ + +enum KeyboardMapType +{ + KEYBOARD_MAP_NONE, // Default + KEYBOARD_MAP_GLB, // Global + KEYBOARD_MAP_EUR, // Europe + KEYBOARD_MAP_ARB, // Arabic + KEYBOARD_MAP_CHN, // China + KEYBOARD_MAP_ESP, // Spain + KEYBOARD_MAP_DEU, // Germany + KEYBOARD_MAP_FRA, // France + KEYBOARD_MAP_ZAF, // Africa + KEYBOARD_MAP_GRC, // Greece + KEYBOARD_MAP_IRN, // Iran + KEYBOARD_MAP_ITA, // Italy + KEYBOARD_MAP_NOR, // Nordic + KEYBOARD_MAP_PAK, // Pakistan + KEYBOARD_MAP_PRT, // Portugal + KEYBOARD_MAP_RUS, // Russia + KEYBOARD_MAP_SGP, // Singapore + KEYBOARD_MAP_THA, // Thailand + KEYBOARD_MAP_VNM, // Vietnam + KEYBOARD_MAP_MAX +}; +/* +static const wchar_t KEYBOARD_MAP_NONE_NAME[] = L"NONE"; +static const wchar_t KEYBOARD_MAP_GLB_NAME[] = L"QWERTY_11x4_GLOBAL"; +static const wchar_t KEYBOARD_MAP_EUR_NAME[] = L"QWERTY_11x4_EUROPE"; +static const wchar_t KEYBOARD_MAP_ARB_NAME[] = L"QWERTY_11x4_ARAB"; +static const wchar_t KEYBOARD_MAP_CHN_NAME[] = L"QWERTY_11x4_CHINA"; +static const wchar_t KEYBOARD_MAP_ESP_NAME[] = L"QWERTY_11x4_SPAIN"; +static const wchar_t KEYBOARD_MAP_DEU_NAME[] = L"QWERTY_11x4_GERMAN"; +static const wchar_t KEYBOARD_MAP_FRA_NAME[] = L"QWERTY_11x4_FRENCH"; +static const wchar_t KEYBOARD_MAP_GRC_NAME[] = L"QWERTY_11x4_GREECE"; +static const wchar_t KEYBOARD_MAP_IRN_NAME[] = L"QWERTY_11x4_IRAN"; +static const wchar_t KEYBOARD_MAP_ITA_NAME[] = L"QWERTY_11x4_ITALY"; +static const wchar_t KEYBOARD_MAP_NOR_NAME[] = L"QWERTY_11x4_NORDIC"; +static const wchar_t KEYBOARD_MAP_PAK_NAME[] = L"QWERTY_11x4_PAKISTAN"; +static const wchar_t KEYBOARD_MAP_PRT_NAME[] = L"QWERTY_11x4_PORTUGUESE"; +static const wchar_t KEYBOARD_MAP_RUS_NAME[] = L"QWERTY_11x4_RUSSIAN"; +static const wchar_t KEYBOARD_MAP_SGP_NAME[] = L"QWERTY_11x4_SINGAPORE"; +static const wchar_t KEYBOARD_MAP_THA_NAME[] = L"QWERTY_11x4_THAILAND"; +static const wchar_t KEYBOARD_MAP_VNM_NAME[] = L"QWERTY_11x4_VIETNAM"; + +typedef struct +{ + wchar_t country[20]; + KeyboardMapType type; +} KeyboardMapFileEntry; + + +static const int KEYBOARD_MAP_TYPE_MAX = 74; + +static KeyboardMapFileEntry gKeyboardMapTypes[KEYBOARD_MAP_TYPE_MAX] = +{ + { L"UK", KEYBOARD_MAP_EUR }, //NV_OPERATOR_COUNTRY_UK, + { L"CHINA", KEYBOARD_MAP_CHN }, //NV_OPERATOR_COUNTRY_CHINA, + { L"FRANCE", KEYBOARD_MAP_FRA }, //NV_OPERATOR_COUNTRY_FRANCE + { L"BELGIUM", KEYBOARD_MAP_FRA }, //NV_OPERATOR_COUNTRY_BELGIUM + { L"GERMANY", KEYBOARD_MAP_DEU }, //NV_OPERATOR_COUNTRY_GERMANY, + { L"AUSTRIA", KEYBOARD_MAP_DEU }, //NV_OPERATOR_COUNTRY_AUSTRIA + { L"GREECE", KEYBOARD_MAP_GRC }, //NV_OPERATOR_COUNTRY_GREECE, + { L"HUNGARY", KEYBOARD_MAP_EUR }, //NV_OPERATOR_COUNTRY_HUNGARY + { L"ITALY", KEYBOARD_MAP_ITA }, //NV_OPERATOR_COUNTRY_ITALY + { L"PORTUGAL", KEYBOARD_MAP_PRT }, //NV_OPERATOR_COUNTRY_PORTUGAL, + { L"SPAIN", KEYBOARD_MAP_ESP }, //NV_OPERATOR_COUNTRY_SPAIN, + { L"ROMANIA", KEYBOARD_MAP_EUR }, //NV_OPERATOR_COUNTRY_ROMANIA, + { L"RUSSIA", KEYBOARD_MAP_RUS }, //NV_OPERATOR_COUNTRY_RUSSIA, // Russia + { L"UKRAINE", KEYBOARD_MAP_RUS }, //NV_OPERATOR_COUNTRY_UKRAINE, // Russia + { L"KAZAKHSTAN", KEYBOARD_MAP_RUS }, //NV_OPERATOR_COUNTRY_KAZAKHSTAN, // Russia + { L"LATVIA", KEYBOARD_MAP_RUS }, //NV_OPERATOR_COUNTRY_LATVIA, // Russia + { L"ESTONIA", KEYBOARD_MAP_RUS }, //NV_OPERATOR_COUNTRY_ESTONIA, // Russia + { L"LITHUANIA", KEYBOARD_MAP_RUS }, //NV_OPERATOR_COUNTRY_LITHUANIA, // Russia + { L"ARMENIA", KEYBOARD_MAP_RUS }, //NV_OPERATOR_COUNTRY_ARMENIA, // Russia + { L"MOLDOVA", KEYBOARD_MAP_RUS }, //NV_OPERATOR_COUNTRY_MOLDOVA, // Russia + { L"UZBEKISTAN", KEYBOARD_MAP_RUS }, //NV_OPERATOR_COUNTRY_UZBEKISTAN, // Russia + { L"TURKEY", KEYBOARD_MAP_GLB }, //NV_OPERATOR_COUNTRY_TURKEY, }, + { L"FINLAND", KEYBOARD_MAP_NOR }, //NV_OPERATOR_COUNTRY_FINLAND, // nordic + { L"SWEDEN", KEYBOARD_MAP_NOR }, //NV_OPERATOR_COUNTRY_SWEDEN, // nordic + { L"DENMARK", KEYBOARD_MAP_NOR }, //NV_OPERATOR_COUNTRY_DENMARK, // nordic + { L"NORWAY", KEYBOARD_MAP_NOR }, //NV_OPERATOR_COUNTRY_NORWAY, // nordic + { L"VIETNAM", KEYBOARD_MAP_VNM }, //NV_OPERATOR_COUNTRY_VIETNAM, + { L"THAILAND", KEYBOARD_MAP_THA }, //NV_OPERATOR_COUNTRY_THAILAND, + { L"SINGAPORE", KEYBOARD_MAP_SGP }, //NV_OPERATOR_COUNTRY_SINGAPORE, + { L"PAKISTAN", KEYBOARD_MAP_PAK }, //NV_OPERATOR_COUNTRY_PAKISTAN, + { L"ARAB", KEYBOARD_MAP_ARB }, //NV_OPERATOR_COUNTRY_ARAB, + { L"IRAN", KEYBOARD_MAP_IRN }, //NV_OPERATOR_COUNTRY_IRAN, + { L"AUSTRALIA", KEYBOARD_MAP_GLB }, //NV_OPERATOR_COUNTRY_AUSTRALIA + { L"CROATIA", KEYBOARD_MAP_EUR }, //NV_OPERATOR_COUNTRY_CROATIA, + { L"CZECHO", KEYBOARD_MAP_EUR }, //NV_OPERATOR_COUNTRY_CZECHO, + { L"IRELANDS", KEYBOARD_MAP_EUR }, //NV_OPERATOR_COUNTRY_IRELANDS, + { L"ISRAEL", KEYBOARD_MAP_GLB }, //NV_OPERATOR_COUNTRY_ISRAEL, + { L"JAPAN", KEYBOARD_MAP_GLB }, //NV_OPERATOR_COUNTRY_JAPAN, + { L"KOREA", KEYBOARD_MAP_EUR }, //NV_OPERATOR_COUNTRY_KOREA, for simulator + { L"MALTA", KEYBOARD_MAP_EUR }, //NV_OPERATOR_COUNTRY_MALTA, + { L"NETHERLANDS", KEYBOARD_MAP_EUR }, //NV_OPERATOR_COUNTRY_NETHERLANDS, + { L"NEWZEALAND", KEYBOARD_MAP_GLB }, //NV_OPERATOR_COUNTRY_NEWZEALAND, + { L"POLAND", KEYBOARD_MAP_EUR }, //NV_OPERATOR_COUNTRY_POLAND, + { L"SLOVENIA", KEYBOARD_MAP_EUR }, //NV_OPERATOR_COUNTRY_SLOVENIA, + { L"SOUTHAFRICA", KEYBOARD_MAP_ZAF }, //NV_OPERATOR_COUNTRY_SOUTHAFRICA, + { L"SWISS", KEYBOARD_MAP_EUR }, //NV_OPERATOR_COUNTRY_SWISS, + { L"US", KEYBOARD_MAP_GLB }, //NV_OPERATOR_COUNTRY_US, + { L"SERBIA", KEYBOARD_MAP_EUR }, //NV_OPERATOR_COUNTRY_SERBIA, + { L"ALBANIA", KEYBOARD_MAP_EUR }, //NV_OPERATOR_COUNTRY_ALBANIA, + { L"SLOVAKIA", KEYBOARD_MAP_EUR }, //NV_OPERATOR_COUNTRY_SLOVAKIA, + { L"MACEDONIA", KEYBOARD_MAP_EUR }, //NV_OPERATOR_COUNTRY_MACEDONIA, + { L"BULGARIA", KEYBOARD_MAP_EUR }, //NV_OPERATOR_COUNTRY_BULGARIA, + { L"BALTIC", KEYBOARD_MAP_EUR }, //NV_OPERATOR_COUNTRY_BALTIC, + { L"MALAYSIA", KEYBOARD_MAP_GLB }, //NV_OPERATOR_COUNTRY_MALAYSIA, + { L"ICELAND", KEYBOARD_MAP_EUR }, //NV_OPERATOR_COUNTRY_ICELAND, + { L"CYPRUS", KEYBOARD_MAP_GLB }, //NV_OPERATOR_COUNTRY_CYPRUS, + { L"QATAR", KEYBOARD_MAP_GLB }, //NV_OPERATOR_COUNTRY_QATAR, + { L"PHILIPPINES", KEYBOARD_MAP_GLB }, //NV_OPERATOR_COUNTRY_PHILIPPINES + { L"HONGKONG", KEYBOARD_MAP_GLB }, //NV_OPERATOR_COUNTRY_HONGKONG, + { L"TAIWAN", KEYBOARD_MAP_GLB }, //NV_OPERATOR_COUNTRY_TAIWAN, + { L"INDIA", KEYBOARD_MAP_GLB }, //NV_OPERATOR_COUNTRY_INDIA, + { L"LEBANON", KEYBOARD_MAP_GLB }, //NV_OPERATOR_COUNTRY_LEBANON, + { L"OMAN", KEYBOARD_MAP_GLB }, //NV_OPERATOR_COUNTRY_OMAN, + { L"MAURITIUS", KEYBOARD_MAP_GLB }, //NV_OPERATOR_COUNTRY_MAURITIUS, + { L"KUWAIT", KEYBOARD_MAP_GLB }, //NV_OPERATOR_COUNTRY_KUWAIT, + { L"SYRIA", KEYBOARD_MAP_GLB }, //NV_OPERATOR_COUNTRY_SYRIA, + { L"MOROCCO", KEYBOARD_MAP_ZAF }, //NV_OPERATOR_COUNTRY_MOROCCO, + { L"LUXEMBOURG", KEYBOARD_MAP_EUR }, //NV_OPERATOR_COUNTRY_LUXEMBOURG, + { L"MONTENEGRO", KEYBOARD_MAP_EUR }, //NV_OPERATOR_COUNTRY_MONTENEGRO, + { L"ALGERIA", KEYBOARD_MAP_ZAF }, //NV_OPERATOR_COUNTRY_ALGERIA, + { L"BOSNIA", KEYBOARD_MAP_EUR }, //NV_OPERATOR_COUNTRY_BOSNIA, + { L"INDONESIA", KEYBOARD_MAP_GLB }, //NV_OPERATOR_COUNTRY_INDONESIA, + { L"EGYPT", KEYBOARD_MAP_GLB }, //NV_OPERATOR_COUNTRY_EGYPT + { L"TUNISIA", KEYBOARD_MAP_ZAF } //NV_OPERATOR_COUNTRY_TUNISIA, +}; + +static const int KEYBOARD_TEXT_LEN_MAX = 10; + +typedef struct +{ + int keyCode; + int systemKeyCode; + bool available; + wchar_t label1[KEYBOARD_TEXT_LEN_MAX + 1]; // including null character + wchar_t label2[KEYBOARD_TEXT_LEN_MAX + 1]; // including null character + wchar_t label3[KEYBOARD_TEXT_LEN_MAX + 1]; // including null character + wchar_t label4[KEYBOARD_TEXT_LEN_MAX + 1]; // including null character +} KeyboardMapEntry; + + +static KeyboardMapEntry gKeyboardMapNONE [KEY_HARDWARE_MAX + 1] = +{ + { KEY_INVALID, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_SIDE_UP, VK_HP_SIDEUP, true, L"", L"", L"", L"" }, + { KEY_SIDE_DOWN, VK_HP_SIDEDOWN, true, L"", L"", L"", L"" }, + { KEY_OK, VK_HP_OK, true, L"OK", L"", L"", L"" }, + { KEY_CLEAR, VK_HP_CLEAR, true, L"", L"", L"", L"" }, + { KEY_CAMERA, VK_HP_CAMERA, true, L"", L"", L"", L"" }, + { KEY_SWITCH, VK_HP_SWITCH, true, L"", L"", L"", L"" }, + { KEY_0, VK_HP_INVALID, false, L"0", L"", L"", L"" }, + { KEY_1, VK_HP_INVALID, false, L"1", L"", L"", L"" }, + { KEY_2, VK_HP_INVALID, false, L"2", L"", L"", L"" }, + { KEY_3, VK_HP_INVALID, false, L"3", L"", L"", L"" }, + { KEY_4, VK_HP_INVALID, false, L"4", L"", L"", L"" }, + { KEY_5, VK_HP_INVALID, false, L"5", L"", L"", L"" }, + { KEY_6, VK_HP_INVALID, false, L"6", L"", L"", L"" }, + { KEY_7, VK_HP_INVALID, false, L"7", L"", L"", L"" }, + { KEY_8, VK_HP_INVALID, false, L"8", L"", L"", L"" }, + { KEY_9, VK_HP_INVALID, false, L"9", L"", L"", L"" }, + { KEY_ASTERISK, VK_HP_INVALID, false, L"*", L"", L"", L"" }, + { KEY_SHARP, VK_HP_INVALID, false, L"#", L"", L"", L"" }, + { KEY_LEFT, VK_HP_LEFT, false, L"", L"", L"", L"" }, + { KEY_UP, VK_HP_UP, false, L"", L"", L"", L"" }, + { KEY_DOWN, VK_HP_DOWN, false, L"", L"", L"", L"" }, + { KEY_RIGHT, VK_HP_RIGHT, false, L"", L"", L"", L"" }, + { KEY_MAX, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_A, VK_HP_A, false, L"A", L"", L"", L"" }, + { KEY_B, VK_HP_B, false, L"B", L"", L"", L"" }, + { KEY_C, VK_HP_C, false, L"C", L"", L"", L"" }, + { KEY_D, VK_HP_SHARP, false, L"D", L"", L"", L"" }, + { KEY_E, VK_HP_3, false, L"E", L"", L"", L"" }, + { KEY_F, VK_HP_F, false, L"F", L"", L"", L"" }, + { KEY_G, VK_HP_G, false, L"G", L"", L"", L"" }, + { KEY_H, VK_HP_H, false, L"H", L"", L"", L"" }, + { KEY_I, VK_HP_8, false, L"I", L"", L"", L"" }, + { KEY_J, VK_HP_J, false, L"J", L"", L"", L"" }, + { KEY_K, VK_HP_ASTERISK, false, L"K", L"", L"", L"" }, + { KEY_L, VK_HP_L, false, L"L", L"", L"", L"" }, + { KEY_M, VK_HP_M, false, L"M", L"", L"", L"" }, + { KEY_N, VK_HP_N, false, L"N", L"", L"", L"" }, + { KEY_O, VK_HP_9, false, L"O", L"", L"", L"" }, + { KEY_P, VK_HP_0, false, L"P", L"", L"", L"" }, + { KEY_Q, VK_HP_1, false, L"Q", L"", L"", L"" }, + { KEY_R, VK_HP_4, false, L"R", L"", L"", L"" }, + { KEY_S, VK_HP_S, false, L"S", L"", L"", L"" }, + { KEY_T, VK_HP_5, false, L"T", L"", L"", L"" }, + { KEY_U, VK_HP_7, false, L"U", L"", L"", L"" }, + { KEY_V, VK_HP_V, false, L"V", L"", L"", L"" }, + { KEY_W, VK_HP_2, false, L"W", L"", L"", L"" }, + { KEY_Y, VK_HP_6, false, L"Y", L"", L"", L"" }, + { KEY_X, VK_HP_X, false, L"X", L"", L"", L"" }, + { KEY_Z, VK_HP_PLUS, false, L"Z", L"", L"", L"" }, + { KEY_BACKSPACE, VK_HP_CLEAR, false, L"", L"", L"", L"" }, + { KEY_COMMA, VK_HP_COMMA, false, L",", L"", L"", L"" }, + { KEY_ENTER, VK_HP_ENTER, false, L"", L"", L"", L"" }, + { KEY_CAPSLOCK, VK_HP_CAPSLOCK, false, L"", L"", L"", L"" }, + { KEY_QUESTION, VK_HP_QUESTION, false, L"?", L"", L"", L"" }, + { KEY_ALT, VK_HP_FN, false, L"", L"", L"", L"" }, + { KEY_SYM, VK_HP_SYM, false, L"", L"", L"", L"" }, + { KEY_SETTING, VK_HP_INVALID, false, L"", L"", L"", L"" }, // for wave37 which does not diefine VK_HP_SETTING + { KEY_SPACE, VK_HP_SPACE, false, L" ", L"", L"", L"" }, + { KEY_DOT, VK_HP_POINT, false, L".", L"", L"", L"" }, + { KEY_FN, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_CAMERA_HALF_SHUTTER, VK_HP_CAMERA_HALF_SHUTTER, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_1, VK_HP_QWERTY_SYM1, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_2, VK_HP_QWERTY_SYM2, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_3, VK_HP_QWERTY_SYM3, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_4, VK_HP_QWERTY_SYM4, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_5, VK_HP_QWERTY_SYM5, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_6, VK_HP_QWERTY_SYM6, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_7, VK_HP_QWERTY_SYM7, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_8, VK_HP_QWERTY_SYM8, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_9, VK_HP_QWERTY_SYM9, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_A, VK_HP_QWERTY_SYMA, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_B, VK_HP_QWERTY_SYMB, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_C, VK_HP_QWERTY_SYMC, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_D, VK_HP_QWERTY_SYMD, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_E, VK_HP_QWERTY_SYME, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_F, VK_HP_QWERTY_SYMF, false, L"", L"", L"", L"" }, + { KEY_FN_1, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_2, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_3, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_4, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_5, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_HARDWARE_MAX, VK_HP_INVALID, false, L"", L"", L"", L"" }, +}; + +static KeyboardMapEntry gKeyboardMapGLB [KEY_HARDWARE_MAX + 1] = +{ + { KEY_INVALID, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_SIDE_UP, VK_HP_SIDEUP, true, L"", L"", L"", L"" }, + { KEY_SIDE_DOWN, VK_HP_SIDEDOWN, true, L"", L"", L"", L"" }, + { KEY_OK, VK_HP_OK, true, L"OK", L"", L"", L"" }, + { KEY_CLEAR, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_CAMERA, VK_HP_CAMERA, true, L"", L"", L"", L"" }, + { KEY_SWITCH, VK_HP_SWITCH, true, L"", L"", L"", L"" }, + { KEY_0, VK_HP_INVALID, false, L"0", L"", L"", L"" }, + { KEY_1, VK_HP_INVALID, false, L"1", L"", L"", L"" }, + { KEY_2, VK_HP_INVALID, false, L"2", L"", L"", L"" }, + { KEY_3, VK_HP_INVALID, false, L"3", L"", L"", L"" }, + { KEY_4, VK_HP_INVALID, false, L"4", L"", L"", L"" }, + { KEY_5, VK_HP_INVALID, false, L"5", L"", L"", L"" }, + { KEY_6, VK_HP_INVALID, false, L"6", L"", L"", L"" }, + { KEY_7, VK_HP_INVALID, false, L"7", L"", L"", L"" }, + { KEY_8, VK_HP_INVALID, false, L"8", L"", L"", L"" }, + { KEY_9, VK_HP_INVALID, false, L"9", L"", L"", L"" }, + { KEY_ASTERISK, VK_HP_INVALID, false, L"*", L"", L"", L"" }, + { KEY_SHARP, VK_HP_INVALID, false, L"#", L"", L"", L"" }, + { KEY_LEFT, VK_HP_LEFT, true, L"", L"", L"", L"" }, + { KEY_UP, VK_HP_UP, true, L"", L"", L"", L"" }, + { KEY_DOWN, VK_HP_DOWN, true, L"", L"", L"", L"" }, + { KEY_RIGHT, VK_HP_RIGHT, true, L"", L"", L"", L"" }, + { KEY_MAX, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_A, VK_HP_A, true, L"A", L"!", L"", L"" }, + { KEY_B, VK_HP_B, true, L"B", L";", L"", L"" }, + { KEY_C, VK_HP_C, true, L"C", L"_", L"", L"" }, + { KEY_D, VK_HP_SHARP, true, L"D", L"#", L"", L"" }, + { KEY_E, VK_HP_3, true, L"E", L"3", L"", L"" }, + { KEY_F, VK_HP_F, true, L"F", L"$", L"", L"" }, + { KEY_G, VK_HP_G, true, L"G", L"%", L"", L"" }, + { KEY_H, VK_HP_H, true, L"H", L"^", L"", L"" }, + { KEY_I, VK_HP_8, true, L"I", L"8", L"", L"" }, + { KEY_J, VK_HP_J, true, L"J", L"&", L"", L"" }, + { KEY_K, VK_HP_ASTERISK, true, L"K", L"*", L"", L"" }, + { KEY_L, VK_HP_L, true, L"L", L"(", L"", L"" }, + { KEY_M, VK_HP_M, true, L"M", L"'", L"", L"" }, + { KEY_N, VK_HP_N, true, L"N", L":", L"", L"" }, + { KEY_O, VK_HP_9, true, L"O", L"9", L"", L"" }, + { KEY_P, VK_HP_0, true, L"P", L"0", L"", L"" }, + { KEY_Q, VK_HP_1, true, L"Q", L"1", L"", L"" }, + { KEY_R, VK_HP_4, true, L"R", L"4", L"", L"" }, + { KEY_S, VK_HP_S, true, L"S", L"@", L"", L"" }, + { KEY_T, VK_HP_5, true, L"T", L"5", L"", L"" }, + { KEY_U, VK_HP_7, true, L"U", L"7", L"", L"" }, + { KEY_V, VK_HP_V, true, L"V", L"/", L"", L"" }, + { KEY_W, VK_HP_2, true, L"W", L"2", L"", L"" }, + { KEY_Y, VK_HP_6, true, L"Y", L"6", L"", L"" }, + { KEY_X, VK_HP_X, true, L"X", L"-", L"", L"" }, + { KEY_Z, VK_HP_PLUS, true, L"Z", L"+", L"", L"" }, + { KEY_BACKSPACE, VK_HP_CLEAR, true, L"", L"", L"", L"" }, + { KEY_COMMA, VK_HP_COMMA, true, L",", L")", L"", L"" }, + { KEY_ENTER, VK_HP_ENTER, true, L"", L"", L"", L"" }, + { KEY_CAPSLOCK, VK_HP_CAPSLOCK, true, L"", L"", L"", L"" }, + { KEY_QUESTION, VK_HP_QUESTION, true, L"?", L"\"", L"", L"" }, + { KEY_ALT, VK_HP_FN, true, L"", L"", L"", L"" }, + { KEY_SYM, VK_HP_SYM, true, L"sym", L":)", L"", L"" }, + { KEY_SETTING, VK_HP_INVALID, false, L"", L"", L"", L"" }, // for wave37 which does not diefine VK_HP_SETTING + { KEY_SPACE, VK_HP_SPACE, true, L" ", L"", L"", L"" }, + { KEY_DOT, VK_HP_POINT, true, L".", L".com", L"", L"" }, + { KEY_FN, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_CAMERA_HALF_SHUTTER, VK_HP_CAMERA_HALF_SHUTTER, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_1, VK_HP_QWERTY_SYM1, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_2, VK_HP_QWERTY_SYM2, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_3, VK_HP_QWERTY_SYM3, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_4, VK_HP_QWERTY_SYM4, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_5, VK_HP_QWERTY_SYM5, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_6, VK_HP_QWERTY_SYM6, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_7, VK_HP_QWERTY_SYM7, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_8, VK_HP_QWERTY_SYM8, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_9, VK_HP_QWERTY_SYM9, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_A, VK_HP_QWERTY_SYMA, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_B, VK_HP_QWERTY_SYMB, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_C, VK_HP_QWERTY_SYMC, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_D, VK_HP_QWERTY_SYMD, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_E, VK_HP_QWERTY_SYME, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_F, VK_HP_QWERTY_SYMF, false, L"", L"", L"", L"" }, + { KEY_FN_1, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_2, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_3, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_4, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_5, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_HARDWARE_MAX, VK_HP_INVALID, false, L"", L"", L"", L"" }, +}; + + +static KeyboardMapEntry gKeyboardMapEUR [KEY_HARDWARE_MAX + 1] = +{ + { KEY_INVALID, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_SIDE_UP, VK_HP_SIDEUP, true, L"", L"", L"", L"" }, + { KEY_SIDE_DOWN, VK_HP_SIDEDOWN, true, L"", L"", L"", L"" }, + { KEY_OK, VK_HP_OK, true, L"OK", L"", L"", L"" }, + { KEY_CLEAR, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_CAMERA, VK_HP_CAMERA, true, L"", L"", L"", L"" }, + { KEY_SWITCH, VK_HP_SWITCH, true, L"", L"", L"", L"" }, + { KEY_0, VK_HP_INVALID, false, L"0", L"", L"", L"" }, + { KEY_1, VK_HP_INVALID, false, L"1", L"", L"", L"" }, + { KEY_2, VK_HP_INVALID, false, L"2", L"", L"", L"" }, + { KEY_3, VK_HP_INVALID, false, L"3", L"", L"", L"" }, + { KEY_4, VK_HP_INVALID, false, L"4", L"", L"", L"" }, + { KEY_5, VK_HP_INVALID, false, L"5", L"", L"", L"" }, + { KEY_6, VK_HP_INVALID, false, L"6", L"", L"", L"" }, + { KEY_7, VK_HP_INVALID, false, L"7", L"", L"", L"" }, + { KEY_8, VK_HP_INVALID, false, L"8", L"", L"", L"" }, + { KEY_9, VK_HP_INVALID, false, L"9", L"", L"", L"" }, + { KEY_ASTERISK, VK_HP_INVALID, false, L"*", L"", L"", L"" }, + { KEY_SHARP, VK_HP_INVALID, false, L"#", L"", L"", L"" }, + { KEY_LEFT, VK_HP_LEFT, true, L"", L"", L"", L"" }, + { KEY_UP, VK_HP_UP, true, L"", L"", L"", L"" }, + { KEY_DOWN, VK_HP_DOWN, true, L"", L"", L"", L"" }, + { KEY_RIGHT, VK_HP_RIGHT, true, L"", L"", L"", L"" }, + { KEY_MAX, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_A, VK_HP_A, true, L"A", L"!", L"", L"" }, + { KEY_B, VK_HP_B, true, L"B", L";", L"", L"" }, + { KEY_C, VK_HP_C, true, L"C", L"_", L"", L"" }, + { KEY_D, VK_HP_SHARP, true, L"D", L"#", L"", L"" }, + { KEY_E, VK_HP_3, true, L"E", L"3", L"", L"" }, + { KEY_F, VK_HP_F, true, L"F", L"\u00A3", L"", L"" }, + { KEY_G, VK_HP_G, true, L"G", L"$", L"", L"" }, + { KEY_H, VK_HP_H, true, L"H", L"\u20AC", L"", L"" }, + { KEY_I, VK_HP_8, true, L"I", L"8", L"", L"" }, + { KEY_J, VK_HP_J, true, L"J", L"&", L"", L"" }, + { KEY_K, VK_HP_ASTERISK, true, L"K", L"*", L"", L"" }, + { KEY_L, VK_HP_L, true, L"L", L"(", L"", L"" }, + { KEY_M, VK_HP_M, true, L"M", L"'", L"", L"" }, + { KEY_N, VK_HP_N, true, L"N", L":", L"", L"" }, + { KEY_O, VK_HP_9, true, L"O", L"9", L"", L"" }, + { KEY_P, VK_HP_0, true, L"P", L"0", L"", L"" }, + { KEY_Q, VK_HP_1, true, L"Q", L"1", L"", L"" }, + { KEY_R, VK_HP_4, true, L"R", L"4", L"", L"" }, + { KEY_S, VK_HP_S, true, L"S", L"@", L"", L"" }, + { KEY_T, VK_HP_5, true, L"T", L"5", L"", L"" }, + { KEY_U, VK_HP_7, true, L"U", L"7", L"", L"" }, + { KEY_V, VK_HP_V, true, L"V", L"/", L"", L"" }, + { KEY_W, VK_HP_2, true, L"W", L"2", L"", L"" }, + { KEY_Y, VK_HP_6, true, L"Y", L"6", L"", L"" }, + { KEY_X, VK_HP_X, true, L"X", L"-", L"", L"" }, + { KEY_Z, VK_HP_PLUS, true, L"Z", L"+", L"", L"" }, + { KEY_BACKSPACE, VK_HP_CLEAR, true, L"", L"", L"", L"" }, + { KEY_COMMA, VK_HP_COMMA, true, L",", L")", L"", L"" }, + { KEY_ENTER, VK_HP_ENTER, true, L"", L"", L"", L"" }, + { KEY_CAPSLOCK, VK_HP_CAPSLOCK, true, L"", L"", L"", L"" }, + { KEY_QUESTION, VK_HP_QUESTION, true, L"?", L"\"", L"", L"" }, + { KEY_ALT, VK_HP_FN, true, L"", L"", L"", L"" }, + { KEY_SYM, VK_HP_SYM, true, L"sym", L":)", L"", L"" }, + { KEY_SETTING, VK_HP_INVALID, false, L"", L"", L"", L"" }, // for wave37 which does not diefine VK_HP_SETTING + { KEY_SPACE, VK_HP_SPACE, true, L" ", L"", L"", L"" }, + { KEY_DOT, VK_HP_POINT, true, L".", L".com", L"", L"" }, + { KEY_FN, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_CAMERA_HALF_SHUTTER, VK_HP_CAMERA_HALF_SHUTTER, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_1, VK_HP_QWERTY_SYM1, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_2, VK_HP_QWERTY_SYM2, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_3, VK_HP_QWERTY_SYM3, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_4, VK_HP_QWERTY_SYM4, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_5, VK_HP_QWERTY_SYM5, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_6, VK_HP_QWERTY_SYM6, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_7, VK_HP_QWERTY_SYM7, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_8, VK_HP_QWERTY_SYM8, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_9, VK_HP_QWERTY_SYM9, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_A, VK_HP_QWERTY_SYMA, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_B, VK_HP_QWERTY_SYMB, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_C, VK_HP_QWERTY_SYMC, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_D, VK_HP_QWERTY_SYMD, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_E, VK_HP_QWERTY_SYME, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_F, VK_HP_QWERTY_SYMF, false, L"", L"", L"", L"" }, + { KEY_FN_1, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_2, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_3, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_4, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_5, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_HARDWARE_MAX, VK_HP_INVALID, false, L"", L"", L"", L"" }, +}; + +static KeyboardMapEntry gKeyboardMapCHN [KEY_HARDWARE_MAX + 1] = +{ + { KEY_INVALID, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_SIDE_UP, VK_HP_SIDEUP, true, L"", L"", L"", L"" }, + { KEY_SIDE_DOWN, VK_HP_SIDEDOWN, true, L"", L"", L"", L"" }, + { KEY_OK, VK_HP_OK, true, L"OK", L"", L"", L"" }, + { KEY_CLEAR, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_CAMERA, VK_HP_CAMERA, true, L"", L"", L"", L"" }, + { KEY_SWITCH, VK_HP_SWITCH, true, L"", L"", L"", L"" }, + { KEY_0, VK_HP_INVALID, false, L"0", L"", L"", L"" }, + { KEY_1, VK_HP_INVALID, false, L"1", L"", L"", L"" }, + { KEY_2, VK_HP_INVALID, false, L"2", L"", L"", L"" }, + { KEY_3, VK_HP_INVALID, false, L"3", L"", L"", L"" }, + { KEY_4, VK_HP_INVALID, false, L"4", L"", L"", L"" }, + { KEY_5, VK_HP_INVALID, false, L"5", L"", L"", L"" }, + { KEY_6, VK_HP_INVALID, false, L"6", L"", L"", L"" }, + { KEY_7, VK_HP_INVALID, false, L"7", L"", L"", L"" }, + { KEY_8, VK_HP_INVALID, false, L"8", L"", L"", L"" }, + { KEY_9, VK_HP_INVALID, false, L"9", L"", L"", L"" }, + { KEY_ASTERISK, VK_HP_INVALID, false, L"*", L"", L"", L"" }, + { KEY_SHARP, VK_HP_INVALID, false, L"#", L"", L"", L"" }, + { KEY_LEFT, VK_HP_LEFT, true, L"", L"", L"", L"" }, + { KEY_UP, VK_HP_UP, true, L"", L"", L"", L"" }, + { KEY_DOWN, VK_HP_DOWN, true, L"", L"", L"", L"" }, + { KEY_RIGHT, VK_HP_RIGHT, true, L"", L"", L"", L"" }, + { KEY_MAX, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_A, VK_HP_A, true, L"A", L"!", L"", L"" }, + { KEY_B, VK_HP_B, true, L"B", L";", L"", L"" }, + { KEY_C, VK_HP_C, true, L"C", L"_", L"", L"" }, + { KEY_D, VK_HP_SHARP, true, L"D", L"#", L"", L"" }, + { KEY_E, VK_HP_3, true, L"E", L"3", L"", L"" }, + { KEY_F, VK_HP_F, true, L"F", L"$", L"", L"" }, + { KEY_G, VK_HP_G, true, L"G", L"\u00A5", L"", L"" }, + { KEY_H, VK_HP_H, true, L"H", L"^", L"", L"" }, + { KEY_I, VK_HP_8, true, L"I", L"8", L"", L"" }, + { KEY_J, VK_HP_J, true, L"J", L"&", L"", L"" }, + { KEY_K, VK_HP_ASTERISK, true, L"K", L"*", L"", L"" }, + { KEY_L, VK_HP_L, true, L"L", L"(", L"", L"" }, + { KEY_M, VK_HP_M, true, L"M", L"'", L"", L"" }, + { KEY_N, VK_HP_N, true, L"N", L":", L"", L"" }, + { KEY_O, VK_HP_9, true, L"O", L"9", L"", L"" }, + { KEY_P, VK_HP_0, true, L"P", L"0", L"", L"" }, + { KEY_Q, VK_HP_1, true, L"Q", L"1", L"", L"" }, + { KEY_R, VK_HP_4, true, L"R", L"4", L"", L"" }, + { KEY_S, VK_HP_S, true, L"S", L"@", L"", L"" }, + { KEY_T, VK_HP_5, true, L"T", L"5", L"", L"" }, + { KEY_U, VK_HP_7, true, L"U", L"7", L"", L"" }, + { KEY_V, VK_HP_V, true, L"V", L"/", L"", L"" }, + { KEY_W, VK_HP_2, true, L"W", L"2", L"", L"" }, + { KEY_Y, VK_HP_6, true, L"Y", L"6", L"", L"" }, + { KEY_X, VK_HP_X, true, L"X", L"-", L"", L"" }, + { KEY_Z, VK_HP_PLUS, true, L"Z", L"+", L"", L"" }, + { KEY_BACKSPACE, VK_HP_CLEAR, true, L"", L"", L"", L"" }, + { KEY_COMMA, VK_HP_COMMA, true, L",", L")", L"", L"" }, + { KEY_ENTER, VK_HP_ENTER, true, L"", L"", L"", L"" }, + { KEY_CAPSLOCK, VK_HP_CAPSLOCK, true, L"", L"", L"", L"" }, + { KEY_QUESTION, VK_HP_QUESTION, true, L"?", L"\"", L"", L"" }, + { KEY_ALT, VK_HP_FN, true, L"", L"", L"", L"" }, + { KEY_SYM, VK_HP_SYM, true, L"sym", L":)", L"", L"" }, + { KEY_SETTING, VK_HP_INVALID, false, L"", L"", L"", L"" }, // for wave37 which does not diefine VK_HP_SETTING + { KEY_SPACE, VK_HP_SPACE, true, L" ", L"", L"", L"" }, + { KEY_DOT, VK_HP_POINT, true, L".", L".com", L"", L"" }, + { KEY_FN, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_CAMERA_HALF_SHUTTER, VK_HP_CAMERA_HALF_SHUTTER, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_1, VK_HP_QWERTY_SYM1, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_2, VK_HP_QWERTY_SYM2, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_3, VK_HP_QWERTY_SYM3, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_4, VK_HP_QWERTY_SYM4, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_5, VK_HP_QWERTY_SYM5, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_6, VK_HP_QWERTY_SYM6, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_7, VK_HP_QWERTY_SYM7, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_8, VK_HP_QWERTY_SYM8, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_9, VK_HP_QWERTY_SYM9, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_A, VK_HP_QWERTY_SYMA, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_B, VK_HP_QWERTY_SYMB, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_C, VK_HP_QWERTY_SYMC, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_D, VK_HP_QWERTY_SYMD, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_E, VK_HP_QWERTY_SYME, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_F, VK_HP_QWERTY_SYMF, false, L"", L"", L"", L"" }, + { KEY_FN_1, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_2, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_3, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_4, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_5, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_HARDWARE_MAX, VK_HP_INVALID, false, L"", L"", L"", L"" }, +}; + +static KeyboardMapEntry gKeyboardMapESP [KEY_HARDWARE_MAX + 1] = +{ + { KEY_INVALID, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_SIDE_UP, VK_HP_SIDEUP, true, L"", L"", L"", L"" }, + { KEY_SIDE_DOWN, VK_HP_SIDEDOWN, true, L"", L"", L"", L"" }, + { KEY_OK, VK_HP_OK, true, L"OK", L"", L"", L"" }, + { KEY_CLEAR, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_CAMERA, VK_HP_CAMERA, true, L"", L"", L"", L"" }, + { KEY_SWITCH, VK_HP_SWITCH, true, L"", L"", L"", L"" }, + { KEY_0, VK_HP_INVALID, false, L"0", L"", L"", L"" }, + { KEY_1, VK_HP_INVALID, false, L"1", L"", L"", L"" }, + { KEY_2, VK_HP_INVALID, false, L"2", L"", L"", L"" }, + { KEY_3, VK_HP_INVALID, false, L"3", L"", L"", L"" }, + { KEY_4, VK_HP_INVALID, false, L"4", L"", L"", L"" }, + { KEY_5, VK_HP_INVALID, false, L"5", L"", L"", L"" }, + { KEY_6, VK_HP_INVALID, false, L"6", L"", L"", L"" }, + { KEY_7, VK_HP_INVALID, false, L"7", L"", L"", L"" }, + { KEY_8, VK_HP_INVALID, false, L"8", L"", L"", L"" }, + { KEY_9, VK_HP_INVALID, false, L"9", L"", L"", L"" }, + { KEY_ASTERISK, VK_HP_INVALID, false, L"*", L"", L"", L"" }, + { KEY_SHARP, VK_HP_INVALID, false, L"#", L"", L"", L"" }, + { KEY_LEFT, VK_HP_LEFT, true, L"", L"", L"", L"" }, + { KEY_UP, VK_HP_UP, true, L"", L"", L"", L"" }, + { KEY_DOWN, VK_HP_DOWN, true, L"", L"", L"", L"" }, + { KEY_RIGHT, VK_HP_RIGHT, true, L"", L"", L"", L"" }, + { KEY_MAX, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_A, VK_HP_A, true, L"A", L"!", L"", L"" }, + { KEY_B, VK_HP_B, true, L"B", L";", L"", L"" }, + { KEY_C, VK_HP_C, true, L"C", L"_", L"", L"" }, + { KEY_D, VK_HP_SHARP, true, L"D", L"#", L"", L"" }, + { KEY_E, VK_HP_3, true, L"E", L"3", L"", L"" }, + { KEY_F, VK_HP_F, true, L"F", L"\u20AC", L"", L"" }, + { KEY_G, VK_HP_G, true, L"G", L"$", L"", L"" }, + { KEY_H, VK_HP_H, true, L"H", L"\00A1", L"", L"" }, + { KEY_I, VK_HP_8, true, L"I", L"8", L"", L"" }, + { KEY_J, VK_HP_J, true, L"J", L"\u00BF", L"", L"" }, + { KEY_K, VK_HP_ASTERISK, true, L"K", L"*", L"", L"" }, + { KEY_L, VK_HP_L, true, L"L", L"(", L"", L"" }, + { KEY_M, VK_HP_M, true, L"M", L"'", L"", L"" }, + { KEY_N, VK_HP_N, true, L"N", L":", L"", L"" }, + { KEY_O, VK_HP_9, true, L"O", L"9", L"", L"" }, + { KEY_P, VK_HP_0, true, L"P", L"0", L"", L"" }, + { KEY_Q, VK_HP_1, true, L"Q", L"1", L"", L"" }, + { KEY_R, VK_HP_4, true, L"R", L"4", L"", L"" }, + { KEY_S, VK_HP_S, true, L"S", L"@", L"", L"" }, + { KEY_T, VK_HP_5, true, L"T", L"5", L"", L"" }, + { KEY_U, VK_HP_7, true, L"U", L"7", L"", L"" }, + { KEY_V, VK_HP_V, true, L"V", L"/", L"", L"" }, + { KEY_W, VK_HP_2, true, L"W", L"2", L"", L"" }, + { KEY_Y, VK_HP_6, true, L"Y", L"6", L"", L"" }, + { KEY_X, VK_HP_X, true, L"X", L"-", L"", L"" }, + { KEY_Z, VK_HP_PLUS, true, L"Z", L"+", L"", L"" }, + { KEY_BACKSPACE, VK_HP_CLEAR, true, L"", L"", L"", L"" }, + { KEY_COMMA, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_ENTER, VK_HP_ENTER, true, L"", L"", L"", L"" }, + { KEY_CAPSLOCK, VK_HP_CAPSLOCK, true, L"", L"", L"", L"" }, + { KEY_QUESTION, VK_HP_QUESTION, true, L"?", L"\"", L"", L"" }, + { KEY_ALT, VK_HP_FN, true, L"", L"", L"", L"" }, + { KEY_SYM, VK_HP_SYM, true, L"sym", L":)", L"", L"" }, + { KEY_SETTING, VK_HP_INVALID, false, L"", L"", L"", L"" }, // for wave37 which does not diefine VK_HP_SETTING + { KEY_SPACE, VK_HP_SPACE, true, L" ", L"", L"", L"" }, + { KEY_DOT, VK_HP_POINT, true, L".", L",", L"", L"" }, + { KEY_FN, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_CAMERA_HALF_SHUTTER, VK_HP_CAMERA_HALF_SHUTTER, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_1, VK_HP_COMMA, true, L"\00D1", L")", L"\00E7", L"" }, + { KEY_CHAR_SYM_2, VK_HP_QWERTY_SYM2, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_3, VK_HP_QWERTY_SYM3, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_4, VK_HP_QWERTY_SYM4, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_5, VK_HP_QWERTY_SYM5, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_6, VK_HP_QWERTY_SYM6, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_7, VK_HP_QWERTY_SYM7, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_8, VK_HP_QWERTY_SYM8, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_9, VK_HP_QWERTY_SYM9, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_A, VK_HP_QWERTY_SYMA, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_B, VK_HP_QWERTY_SYMB, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_C, VK_HP_QWERTY_SYMC, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_D, VK_HP_QWERTY_SYMD, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_E, VK_HP_QWERTY_SYME, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_F, VK_HP_QWERTY_SYMF, false, L"", L"", L"", L"" }, + { KEY_FN_1, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_2, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_3, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_4, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_5, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_HARDWARE_MAX, VK_HP_INVALID, false, L"", L"", L"", L"" }, +}; + +static KeyboardMapEntry gKeyboardMapDEU [KEY_HARDWARE_MAX + 1] = +{ + { KEY_INVALID, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_SIDE_UP, VK_HP_SIDEUP, true, L"", L"", L"", L"" }, + { KEY_SIDE_DOWN, VK_HP_SIDEDOWN, true, L"", L"", L"", L"" }, + { KEY_OK, VK_HP_OK, true, L"OK", L"", L"", L"" }, + { KEY_CLEAR, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_CAMERA, VK_HP_CAMERA, true, L"", L"", L"", L"" }, + { KEY_SWITCH, VK_HP_SWITCH, true, L"", L"", L"", L"" }, + { KEY_0, VK_HP_INVALID, false, L"0", L"", L"", L"" }, + { KEY_1, VK_HP_INVALID, false, L"1", L"", L"", L"" }, + { KEY_2, VK_HP_INVALID, false, L"2", L"", L"", L"" }, + { KEY_3, VK_HP_INVALID, false, L"3", L"", L"", L"" }, + { KEY_4, VK_HP_INVALID, false, L"4", L"", L"", L"" }, + { KEY_5, VK_HP_INVALID, false, L"5", L"", L"", L"" }, + { KEY_6, VK_HP_INVALID, false, L"6", L"", L"", L"" }, + { KEY_7, VK_HP_INVALID, false, L"7", L"", L"", L"" }, + { KEY_8, VK_HP_INVALID, false, L"8", L"", L"", L"" }, + { KEY_9, VK_HP_INVALID, false, L"9", L"", L"", L"" }, + { KEY_ASTERISK, VK_HP_INVALID, false, L"*", L"", L"", L"" }, + { KEY_SHARP, VK_HP_INVALID, false, L"#", L"", L"", L"" }, + { KEY_LEFT, VK_HP_LEFT, true, L"", L"", L"", L"" }, + { KEY_UP, VK_HP_UP, true, L"", L"", L"", L"" }, + { KEY_DOWN, VK_HP_DOWN, true, L"", L"", L"", L"" }, + { KEY_RIGHT, VK_HP_RIGHT, true, L"", L"", L"", L"" }, + { KEY_MAX, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_A, VK_HP_A, true, L"A", L"!", L"", L"" }, + { KEY_B, VK_HP_B, true, L"B", L";", L"", L"" }, + { KEY_C, VK_HP_C, true, L"C", L"_", L"", L"" }, + { KEY_D, VK_HP_SHARP, true, L"D", L"#", L"", L"" }, + { KEY_E, VK_HP_3, true, L"E", L"3", L"", L"" }, + { KEY_F, VK_HP_F, true, L"F", L"\u20AC", L"", L"" }, + { KEY_G, VK_HP_G, true, L"G", L"$", L"", L"" }, + { KEY_H, VK_HP_H, true, L"H", L"%", L"", L"" }, + { KEY_I, VK_HP_8, true, L"I", L"8", L"", L"" }, + { KEY_J, VK_HP_J, true, L"J", L"&", L"", L"" }, + { KEY_K, VK_HP_ASTERISK, true, L"K", L"*", L"", L"" }, + { KEY_L, VK_HP_L, true, L"L", L"(", L"", L"" }, + { KEY_M, VK_HP_M, true, L"M", L"'", L"", L"" }, + { KEY_N, VK_HP_N, true, L"N", L":", L"", L"" }, + { KEY_O, VK_HP_9, true, L"O", L"9", L"", L"" }, + { KEY_P, VK_HP_0, true, L"P", L"0", L"", L"" }, + { KEY_Q, VK_HP_1, true, L"Q", L"1", L"", L"" }, + { KEY_R, VK_HP_4, true, L"R", L"4", L"", L"" }, + { KEY_S, VK_HP_S, true, L"S", L"@", L"", L"" }, + { KEY_T, VK_HP_5, true, L"T", L"5", L"", L"" }, + { KEY_U, VK_HP_7, true, L"U", L"7", L"", L"" }, + { KEY_V, VK_HP_V, true, L"V", L"/", L"", L"" }, + { KEY_W, VK_HP_2, true, L"W", L"2", L"", L"" }, + { KEY_Y, VK_HP_PLUS, true, L"Y", L"+", L"", L"" }, + { KEY_X, VK_HP_X, true, L"X", L"-", L"", L"" }, + { KEY_Z, VK_HP_6, true, L"Z", L"6", L"", L"" }, + { KEY_BACKSPACE, VK_HP_CLEAR, true, L"", L"", L"", L"" }, + { KEY_COMMA, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_ENTER, VK_HP_ENTER, true, L"", L"", L"", L"" }, + { KEY_CAPSLOCK, VK_HP_CAPSLOCK, true, L"", L"", L"", L"" }, + { KEY_QUESTION, VK_HP_QUESTION, true, L"?", L"\"", L"", L"" }, + { KEY_ALT, VK_HP_FN, true, L"", L"", L"", L"" }, + { KEY_SYM, VK_HP_SYM, true, L"sym", L":)", L"", L"" }, + { KEY_SETTING, VK_HP_INVALID, false, L"", L"", L"", L"" }, // for wave37 which does not diefine VK_HP_SETTING + { KEY_SPACE, VK_HP_SPACE, true, L" ", L"", L"", L"" }, + { KEY_DOT, VK_HP_POINT, true, L".", L",", L"", L"" }, + { KEY_FN, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_CAMERA_HALF_SHUTTER, VK_HP_CAMERA_HALF_SHUTTER, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_1, VK_HP_COMMA, true, L"\u00DF", L")", L"", L"" }, + { KEY_CHAR_SYM_2, VK_HP_QWERTY_SYM2, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_3, VK_HP_QWERTY_SYM3, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_4, VK_HP_QWERTY_SYM4, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_5, VK_HP_QWERTY_SYM5, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_6, VK_HP_QWERTY_SYM6, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_7, VK_HP_QWERTY_SYM7, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_8, VK_HP_QWERTY_SYM8, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_9, VK_HP_QWERTY_SYM9, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_A, VK_HP_QWERTY_SYMA, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_B, VK_HP_QWERTY_SYMB, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_C, VK_HP_QWERTY_SYMC, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_D, VK_HP_QWERTY_SYMD, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_E, VK_HP_QWERTY_SYME, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_F, VK_HP_QWERTY_SYMF, false, L"", L"", L"", L"" }, + { KEY_FN_1, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_2, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_3, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_4, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_5, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_HARDWARE_MAX, VK_HP_INVALID, false, L"", L"", L"", L"" }, +}; + +static KeyboardMapEntry gKeyboardMapFRA [KEY_HARDWARE_MAX + 1] = +{ + { KEY_INVALID, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_SIDE_UP, VK_HP_SIDEUP, true, L"", L"", L"", L"" }, + { KEY_SIDE_DOWN, VK_HP_SIDEDOWN, true, L"", L"", L"", L"" }, + { KEY_OK, VK_HP_OK, true, L"OK", L"", L"", L"" }, + { KEY_CLEAR, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_CAMERA, VK_HP_CAMERA, true, L"", L"", L"", L"" }, + { KEY_SWITCH, VK_HP_SWITCH, true, L"", L"", L"", L"" }, + { KEY_0, VK_HP_INVALID, false, L"0", L"", L"", L"" }, + { KEY_1, VK_HP_INVALID, false, L"1", L"", L"", L"" }, + { KEY_2, VK_HP_INVALID, false, L"2", L"", L"", L"" }, + { KEY_3, VK_HP_INVALID, false, L"3", L"", L"", L"" }, + { KEY_4, VK_HP_INVALID, false, L"4", L"", L"", L"" }, + { KEY_5, VK_HP_INVALID, false, L"5", L"", L"", L"" }, + { KEY_6, VK_HP_INVALID, false, L"6", L"", L"", L"" }, + { KEY_7, VK_HP_INVALID, false, L"7", L"", L"", L"" }, + { KEY_8, VK_HP_INVALID, false, L"8", L"", L"", L"" }, + { KEY_9, VK_HP_INVALID, false, L"9", L"", L"", L"" }, + { KEY_ASTERISK, VK_HP_INVALID, false, L"*", L"", L"", L"" }, + { KEY_SHARP, VK_HP_INVALID, false, L"#", L"", L"", L"" }, + { KEY_LEFT, VK_HP_LEFT, true, L"", L"", L"", L"" }, + { KEY_UP, VK_HP_UP, true, L"", L"", L"", L"" }, + { KEY_DOWN, VK_HP_DOWN, true, L"", L"", L"", L"" }, + { KEY_RIGHT, VK_HP_RIGHT, true, L"", L"", L"", L"" }, + { KEY_MAX, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_A, VK_HP_1, true, L"A", L"1", L"", L"" }, + { KEY_B, VK_HP_B, true, L"B", L";", L"", L"" }, + { KEY_C, VK_HP_C, true, L"C", L"_", L"", L"" }, + { KEY_D, VK_HP_SHARP, true, L"D", L"#", L"", L"" }, + { KEY_E, VK_HP_3, true, L"E", L"3", L"", L"" }, + { KEY_F, VK_HP_F, true, L"F", L"\u20AC", L"", L"" }, + { KEY_G, VK_HP_G, true, L"G", L"$", L"", L"" }, + { KEY_H, VK_HP_H, true, L"H", L"%", L"", L"" }, + { KEY_I, VK_HP_8, true, L"I", L"8", L"", L"" }, + { KEY_J, VK_HP_J, true, L"J", L"&", L"", L"" }, + { KEY_K, VK_HP_ASTERISK, true, L"K", L"*", L"", L"" }, + { KEY_L, VK_HP_L, true, L"L", L"(", L"", L"" }, + { KEY_M, VK_HP_COMMA, true, L"M", L")", L"", L"" }, + { KEY_N, VK_HP_N, true, L"N", L":", L"", L"" }, + { KEY_O, VK_HP_9, true, L"O", L"9", L"", L"" }, + { KEY_P, VK_HP_0, true, L"P", L"0", L"", L"" }, + { KEY_Q, VK_HP_A, true, L"Q", L"!", L"", L"" }, + { KEY_R, VK_HP_4, true, L"R", L"4", L"", L"" }, + { KEY_S, VK_HP_S, true, L"S", L"@", L"", L"" }, + { KEY_T, VK_HP_5, true, L"T", L"5", L"", L"" }, + { KEY_U, VK_HP_7, true, L"U", L"7", L"", L"" }, + { KEY_V, VK_HP_V, true, L"V", L"/", L"", L"" }, + { KEY_W, VK_HP_PLUS, true, L"W", L"+", L"", L"" }, + { KEY_Y, VK_HP_6, true, L"Y", L"6", L"", L"" }, + { KEY_X, VK_HP_X, true, L"X", L"-", L"", L"" }, + { KEY_Z, VK_HP_2, true, L"Z", L"2", L"", L"" }, + { KEY_BACKSPACE, VK_HP_CLEAR, true, L"", L"", L"", L"" }, + { KEY_COMMA, VK_HP_M, true, L",", L"'", L"", L"" }, + { KEY_ENTER, VK_HP_ENTER, true, L"", L"", L"", L"" }, + { KEY_CAPSLOCK, VK_HP_CAPSLOCK, true, L"", L"", L"", L"" }, + { KEY_QUESTION, VK_HP_QUESTION, true, L"?", L"\"", L"", L"" }, + { KEY_ALT, VK_HP_FN, true, L"", L"", L"", L"" }, + { KEY_SYM, VK_HP_SYM, true, L"sym", L":)", L"", L"" }, + { KEY_SETTING, VK_HP_INVALID, false, L"", L"", L"", L"" }, // for wave37 which does not diefine VK_HP_SETTING + { KEY_SPACE, VK_HP_SPACE, true, L" ", L"", L"", L"" }, + { KEY_DOT, VK_HP_POINT, true, L".", L".com", L"", L"" }, + { KEY_FN, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_CAMERA_HALF_SHUTTER, VK_HP_CAMERA_HALF_SHUTTER, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_1, VK_HP_QWERTY_SYM1, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_2, VK_HP_QWERTY_SYM2, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_3, VK_HP_QWERTY_SYM3, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_4, VK_HP_QWERTY_SYM4, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_5, VK_HP_QWERTY_SYM5, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_6, VK_HP_QWERTY_SYM6, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_7, VK_HP_QWERTY_SYM7, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_8, VK_HP_QWERTY_SYM8, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_9, VK_HP_QWERTY_SYM9, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_A, VK_HP_QWERTY_SYMA, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_B, VK_HP_QWERTY_SYMB, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_C, VK_HP_QWERTY_SYMC, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_D, VK_HP_QWERTY_SYMD, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_E, VK_HP_QWERTY_SYME, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_F, VK_HP_QWERTY_SYMF, false, L"", L"", L"", L"" }, + { KEY_FN_1, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_2, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_3, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_4, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_5, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_HARDWARE_MAX, VK_HP_INVALID, false, L"", L"", L"", L"" }, +}; + +static KeyboardMapEntry gKeyboardMapZAF [KEY_HARDWARE_MAX + 1] = +{ + { KEY_INVALID, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_SIDE_UP, VK_HP_SIDEUP, true, L"", L"", L"", L"" }, + { KEY_SIDE_DOWN, VK_HP_SIDEDOWN, true, L"", L"", L"", L"" }, + { KEY_OK, VK_HP_OK, true, L"OK", L"", L"", L"" }, + { KEY_CLEAR, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_CAMERA, VK_HP_CAMERA, true, L"", L"", L"", L"" }, + { KEY_SWITCH, VK_HP_SWITCH, true, L"", L"", L"", L"" }, + { KEY_0, VK_HP_INVALID, false, L"0", L"", L"", L"" }, + { KEY_1, VK_HP_INVALID, false, L"1", L"", L"", L"" }, + { KEY_2, VK_HP_INVALID, false, L"2", L"", L"", L"" }, + { KEY_3, VK_HP_INVALID, false, L"3", L"", L"", L"" }, + { KEY_4, VK_HP_INVALID, false, L"4", L"", L"", L"" }, + { KEY_5, VK_HP_INVALID, false, L"5", L"", L"", L"" }, + { KEY_6, VK_HP_INVALID, false, L"6", L"", L"", L"" }, + { KEY_7, VK_HP_INVALID, false, L"7", L"", L"", L"" }, + { KEY_8, VK_HP_INVALID, false, L"8", L"", L"", L"" }, + { KEY_9, VK_HP_INVALID, false, L"9", L"", L"", L"" }, + { KEY_ASTERISK, VK_HP_INVALID, false, L"*", L"", L"", L"" }, + { KEY_SHARP, VK_HP_INVALID, false, L"#", L"", L"", L"" }, + { KEY_LEFT, VK_HP_LEFT, true, L"", L"", L"", L"" }, + { KEY_UP, VK_HP_UP, true, L"", L"", L"", L"" }, + { KEY_DOWN, VK_HP_DOWN, true, L"", L"", L"", L"" }, + { KEY_RIGHT, VK_HP_RIGHT, true, L"", L"", L"", L"" }, + { KEY_MAX, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_A, VK_HP_1, true, L"A", L"1", L"", L"" }, + { KEY_B, VK_HP_B, true, L"B", L";", L"", L"" }, + { KEY_C, VK_HP_C, true, L"C", L"_", L"", L"" }, + { KEY_D, VK_HP_SHARP, true, L"D", L"#", L"", L"" }, + { KEY_E, VK_HP_3, true, L"E", L"3", L"", L"" }, + { KEY_F, VK_HP_F, true, L"F", L"$", L"", L"" }, + { KEY_G, VK_HP_G, true, L"G", L"%", L"", L"" }, + { KEY_H, VK_HP_H, true, L"H", L"^", L"", L"" }, + { KEY_I, VK_HP_8, true, L"I", L"8", L"", L"" }, + { KEY_J, VK_HP_J, true, L"J", L"&", L"", L"" }, + { KEY_K, VK_HP_ASTERISK, true, L"K", L"*", L"", L"" }, + { KEY_L, VK_HP_L, true, L"L", L"(", L"", L"" }, + { KEY_M, VK_HP_COMMA, true, L"M", L")", L"", L"" }, + { KEY_N, VK_HP_N, true, L"N", L":", L"", L"" }, + { KEY_O, VK_HP_9, true, L"O", L"9", L"", L"" }, + { KEY_P, VK_HP_0, true, L"P", L"0", L"", L"" }, + { KEY_Q, VK_HP_A, true, L"Q", L"!", L"", L"" }, + { KEY_R, VK_HP_4, true, L"R", L"4", L"", L"" }, + { KEY_S, VK_HP_S, true, L"S", L"@", L"", L"" }, + { KEY_T, VK_HP_5, true, L"T", L"5", L"", L"" }, + { KEY_U, VK_HP_7, true, L"U", L"7", L"", L"" }, + { KEY_V, VK_HP_V, true, L"V", L"/", L"", L"" }, + { KEY_W, VK_HP_PLUS, true, L"W", L"+", L"", L"" }, + { KEY_Y, VK_HP_6, true, L"Y", L"6", L"", L"" }, + { KEY_X, VK_HP_X, true, L"X", L"-", L"", L"" }, + { KEY_Z, VK_HP_2, true, L"Z", L"2", L"", L"" }, + { KEY_BACKSPACE, VK_HP_CLEAR, true, L"", L"", L"", L"" }, + { KEY_COMMA, VK_HP_M, true, L",", L"'", L"", L"" }, + { KEY_ENTER, VK_HP_ENTER, true, L"", L"", L"", L"" }, + { KEY_CAPSLOCK, VK_HP_CAPSLOCK, true, L"", L"", L"", L"" }, + { KEY_QUESTION, VK_HP_QUESTION, true, L"?", L"\"", L"", L"" }, + { KEY_ALT, VK_HP_FN, true, L"", L"", L"", L"" }, + { KEY_SYM, VK_HP_SYM, true, L"sym", L":)", L"", L"" }, + { KEY_SETTING, VK_HP_INVALID, false, L"", L"", L"", L"" }, // for wave37 which does not diefine VK_HP_SETTING + { KEY_SPACE, VK_HP_SPACE, true, L" ", L"", L"", L"" }, + { KEY_DOT, VK_HP_POINT, true, L".", L".com", L"", L"" }, + { KEY_FN, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_CAMERA_HALF_SHUTTER, VK_HP_CAMERA_HALF_SHUTTER, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_1, VK_HP_QWERTY_SYM1, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_2, VK_HP_QWERTY_SYM2, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_3, VK_HP_QWERTY_SYM3, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_4, VK_HP_QWERTY_SYM4, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_5, VK_HP_QWERTY_SYM5, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_6, VK_HP_QWERTY_SYM6, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_7, VK_HP_QWERTY_SYM7, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_8, VK_HP_QWERTY_SYM8, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_9, VK_HP_QWERTY_SYM9, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_A, VK_HP_QWERTY_SYMA, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_B, VK_HP_QWERTY_SYMB, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_C, VK_HP_QWERTY_SYMC, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_D, VK_HP_QWERTY_SYMD, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_E, VK_HP_QWERTY_SYME, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_F, VK_HP_QWERTY_SYMF, false, L"", L"", L"", L"" }, + { KEY_FN_1, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_2, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_3, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_4, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_5, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_HARDWARE_MAX, VK_HP_INVALID, false, L"", L"", L"", L"" }, +}; + +static KeyboardMapEntry gKeyboardMapGRC [KEY_HARDWARE_MAX + 1] = +{ + { KEY_INVALID, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_SIDE_UP, VK_HP_SIDEUP, true, L"", L"", L"", L"" }, + { KEY_SIDE_DOWN, VK_HP_SIDEDOWN, true, L"", L"", L"", L"" }, + { KEY_OK, VK_HP_OK, true, L"OK", L"", L"", L"" }, + { KEY_CLEAR, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_CAMERA, VK_HP_CAMERA, true, L"", L"", L"", L"" }, + { KEY_SWITCH, VK_HP_SWITCH, true, L"", L"", L"", L"" }, + { KEY_0, VK_HP_INVALID, false, L"0", L"", L"", L"" }, + { KEY_1, VK_HP_INVALID, false, L"1", L"", L"", L"" }, + { KEY_2, VK_HP_INVALID, false, L"2", L"", L"", L"" }, + { KEY_3, VK_HP_INVALID, false, L"3", L"", L"", L"" }, + { KEY_4, VK_HP_INVALID, false, L"4", L"", L"", L"" }, + { KEY_5, VK_HP_INVALID, false, L"5", L"", L"", L"" }, + { KEY_6, VK_HP_INVALID, false, L"6", L"", L"", L"" }, + { KEY_7, VK_HP_INVALID, false, L"7", L"", L"", L"" }, + { KEY_8, VK_HP_INVALID, false, L"8", L"", L"", L"" }, + { KEY_9, VK_HP_INVALID, false, L"9", L"", L"", L"" }, + { KEY_ASTERISK, VK_HP_INVALID, false, L"*", L"", L"", L"" }, + { KEY_SHARP, VK_HP_INVALID, false, L"#", L"", L"", L"" }, + { KEY_LEFT, VK_HP_LEFT, true, L"", L"", L"", L"" }, + { KEY_UP, VK_HP_UP, true, L"", L"", L"", L"" }, + { KEY_DOWN, VK_HP_DOWN, true, L"", L"", L"", L"" }, + { KEY_RIGHT, VK_HP_RIGHT, true, L"", L"", L"", L"" }, + { KEY_MAX, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_A, VK_HP_A, true, L"A", L"!", L"", L"" }, + { KEY_B, VK_HP_B, true, L"B", L";", L"", L"" }, + { KEY_C, VK_HP_C, true, L"C", L"_", L"\u03C8", L"" }, + { KEY_D, VK_HP_SHARP, true, L"D", L"#", L"\u0394", L"" }, + { KEY_E, VK_HP_3, true, L"E", L"3", L"", L"" }, + { KEY_F, VK_HP_F, true, L"F", L"\u20AC", L"\u03A6", L"" }, + { KEY_G, VK_HP_G, true, L"G", L"%", L"\u0393", L"" }, + { KEY_H, VK_HP_H, true, L"H", L"^", L"", L"" }, + { KEY_I, VK_HP_8, true, L"I", L"8", L"", L"" }, + { KEY_J, VK_HP_J, true, L"J", L"&", L"\u039E", L"" }, + { KEY_K, VK_HP_ASTERISK, true, L"K", L"*", L"", L"" }, + { KEY_L, VK_HP_L, true, L"L", L"(", L"\u039B", L"" }, + { KEY_M, VK_HP_M, true, L"M", L"'", L"", L"" }, + { KEY_N, VK_HP_N, true, L"N", L":", L"", L"" }, + { KEY_O, VK_HP_9, true, L"O", L"9", L"", L"" }, + { KEY_P, VK_HP_0, true, L"P", L"0", L"\u03A0", L"" }, + { KEY_Q, VK_HP_1, true, L"Q", L"1", L"", L"" }, + { KEY_R, VK_HP_4, true, L"R", L"4", L"\u03A1", L"" }, + { KEY_S, VK_HP_S, true, L"S", L"@", L"\u03A3", L"" }, + { KEY_T, VK_HP_5, true, L"T", L"5", L"", L"" }, + { KEY_U, VK_HP_7, true, L"U", L"7", L"\u0398", L"" }, + { KEY_V, VK_HP_V, true, L"V", L"/", L"", L"" }, + { KEY_W, VK_HP_2, true, L"W", L"2", L"\u03C2", L"" }, + { KEY_Y, VK_HP_6, true, L"Y", L"6", L"", L"" }, + { KEY_X, VK_HP_X, true, L"X", L"-", L"", L"" }, + { KEY_Z, VK_HP_PLUS, true, L"Z", L"+", L"", L"" }, + { KEY_BACKSPACE, VK_HP_CLEAR, true, L"", L"", L"", L"" }, + { KEY_COMMA, VK_HP_COMMA, true, L",", L")", L"", L"" }, + { KEY_ENTER, VK_HP_ENTER, true, L"", L"", L"", L"" }, + { KEY_CAPSLOCK, VK_HP_CAPSLOCK, true, L"", L"", L"", L"" }, + { KEY_QUESTION, VK_HP_QUESTION, true, L"?", L"\"", L"", L"" }, + { KEY_ALT, VK_HP_FN, true, L"", L"", L"", L"" }, + { KEY_SYM, VK_HP_SYM, true, L"sym", L":)", L"", L"" }, + { KEY_SETTING, VK_HP_INVALID, false, L"", L"", L"", L"" }, // for wave37 which does not diefine VK_HP_SETTING + { KEY_SPACE, VK_HP_SPACE, true, L" ", L"", L"", L"" }, + { KEY_DOT, VK_HP_POINT, true, L".", L".com", L"", L"" }, + { KEY_FN, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_CAMERA_HALF_SHUTTER, VK_HP_CAMERA_HALF_SHUTTER, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_1, VK_HP_QWERTY_SYM1, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_2, VK_HP_QWERTY_SYM2, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_3, VK_HP_QWERTY_SYM3, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_4, VK_HP_QWERTY_SYM4, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_5, VK_HP_QWERTY_SYM5, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_6, VK_HP_QWERTY_SYM6, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_7, VK_HP_QWERTY_SYM7, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_8, VK_HP_QWERTY_SYM8, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_9, VK_HP_QWERTY_SYM9, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_A, VK_HP_QWERTY_SYMA, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_B, VK_HP_QWERTY_SYMB, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_C, VK_HP_QWERTY_SYMC, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_D, VK_HP_QWERTY_SYMD, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_E, VK_HP_QWERTY_SYME, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_F, VK_HP_QWERTY_SYMF, false, L"", L"", L"", L"" }, + { KEY_FN_1, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_2, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_3, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_4, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_5, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_HARDWARE_MAX, VK_HP_INVALID, false, L"", L"", L"", L"" }, +}; + +static KeyboardMapEntry gKeyboardMapEUR_2 [KEY_HARDWARE_MAX + 1] = // ITALY/PORTUGAL +{ + { KEY_INVALID, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_SIDE_UP, VK_HP_SIDEUP, true, L"", L"", L"", L"" }, + { KEY_SIDE_DOWN, VK_HP_SIDEDOWN, true, L"", L"", L"", L"" }, + { KEY_OK, VK_HP_OK, true, L"OK", L"", L"", L"" }, + { KEY_CLEAR, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_CAMERA, VK_HP_CAMERA, true, L"", L"", L"", L"" }, + { KEY_SWITCH, VK_HP_SWITCH, true, L"", L"", L"", L"" }, + { KEY_0, VK_HP_INVALID, false, L"0", L"", L"", L"" }, + { KEY_1, VK_HP_INVALID, false, L"1", L"", L"", L"" }, + { KEY_2, VK_HP_INVALID, false, L"2", L"", L"", L"" }, + { KEY_3, VK_HP_INVALID, false, L"3", L"", L"", L"" }, + { KEY_4, VK_HP_INVALID, false, L"4", L"", L"", L"" }, + { KEY_5, VK_HP_INVALID, false, L"5", L"", L"", L"" }, + { KEY_6, VK_HP_INVALID, false, L"6", L"", L"", L"" }, + { KEY_7, VK_HP_INVALID, false, L"7", L"", L"", L"" }, + { KEY_8, VK_HP_INVALID, false, L"8", L"", L"", L"" }, + { KEY_9, VK_HP_INVALID, false, L"9", L"", L"", L"" }, + { KEY_ASTERISK, VK_HP_INVALID, false, L"*", L"", L"", L"" }, + { KEY_SHARP, VK_HP_INVALID, false, L"#", L"", L"", L"" }, + { KEY_LEFT, VK_HP_LEFT, true, L"", L"", L"", L"" }, + { KEY_UP, VK_HP_UP, true, L"", L"", L"", L"" }, + { KEY_DOWN, VK_HP_DOWN, true, L"", L"", L"", L"" }, + { KEY_RIGHT, VK_HP_RIGHT, true, L"", L"", L"", L"" }, + { KEY_MAX, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_A, VK_HP_A, true, L"A", L"!", L"", L"" }, + { KEY_B, VK_HP_B, true, L"B", L";", L"", L"" }, + { KEY_C, VK_HP_C, true, L"C", L"_", L"", L"" }, + { KEY_D, VK_HP_SHARP, true, L"D", L"#", L"", L"" }, + { KEY_E, VK_HP_3, true, L"E", L"3", L"", L"" }, + { KEY_F, VK_HP_F, true, L"F", L"$", L"", L"" }, + { KEY_G, VK_HP_G, true, L"G", L"\u20AC", L"", L"" }, + { KEY_H, VK_HP_H, true, L"H", L"%", L"", L"" }, + { KEY_I, VK_HP_8, true, L"I", L"8", L"", L"" }, + { KEY_J, VK_HP_J, true, L"J", L"&", L"", L"" }, + { KEY_K, VK_HP_ASTERISK, true, L"K", L"*", L"", L"" }, + { KEY_L, VK_HP_L, true, L"L", L"(", L"", L"" }, + { KEY_M, VK_HP_M, true, L"M", L"'", L"", L"" }, + { KEY_N, VK_HP_N, true, L"N", L":", L"", L"" }, + { KEY_O, VK_HP_9, true, L"O", L"9", L"", L"" }, + { KEY_P, VK_HP_0, true, L"P", L"0", L"", L"" }, + { KEY_Q, VK_HP_1, true, L"Q", L"1", L"", L"" }, + { KEY_R, VK_HP_4, true, L"R", L"4", L"", L"" }, + { KEY_S, VK_HP_S, true, L"S", L"@", L"", L"" }, + { KEY_T, VK_HP_5, true, L"T", L"5", L"", L"" }, + { KEY_U, VK_HP_7, true, L"U", L"7", L"", L"" }, + { KEY_V, VK_HP_V, true, L"V", L"/", L"", L"" }, + { KEY_W, VK_HP_2, true, L"W", L"2", L"", L"" }, + { KEY_Y, VK_HP_6, true, L"Y", L"6", L"", L"" }, + { KEY_X, VK_HP_X, true, L"X", L"-", L"", L"" }, + { KEY_Z, VK_HP_PLUS, true, L"Z", L"+", L"", L"" }, + { KEY_BACKSPACE, VK_HP_CLEAR, true, L"", L"", L"", L"" }, + { KEY_COMMA, VK_HP_COMMA, true, L",", L")", L"", L"" }, + { KEY_ENTER, VK_HP_ENTER, true, L"", L"", L"", L"" }, + { KEY_CAPSLOCK, VK_HP_CAPSLOCK, true, L"", L"", L"", L"" }, + { KEY_QUESTION, VK_HP_QUESTION, true, L"?", L"\"", L"", L"" }, + { KEY_ALT, VK_HP_FN, true, L"", L"", L"", L"" }, + { KEY_SYM, VK_HP_SYM, true, L"sym", L":)", L"", L"" }, + { KEY_SETTING, VK_HP_INVALID, false, L"", L"", L"", L"" }, // for wave37 which does not diefine VK_HP_SETTING + { KEY_SPACE, VK_HP_SPACE, true, L" ", L"", L"", L"" }, + { KEY_DOT, VK_HP_POINT, true, L".", L".com", L"", L"" }, + { KEY_FN, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_CAMERA_HALF_SHUTTER, VK_HP_CAMERA_HALF_SHUTTER, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_1, VK_HP_QWERTY_SYM1, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_2, VK_HP_QWERTY_SYM2, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_3, VK_HP_QWERTY_SYM3, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_4, VK_HP_QWERTY_SYM4, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_5, VK_HP_QWERTY_SYM5, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_6, VK_HP_QWERTY_SYM6, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_7, VK_HP_QWERTY_SYM7, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_8, VK_HP_QWERTY_SYM8, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_9, VK_HP_QWERTY_SYM9, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_A, VK_HP_QWERTY_SYMA, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_B, VK_HP_QWERTY_SYMB, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_C, VK_HP_QWERTY_SYMC, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_D, VK_HP_QWERTY_SYMD, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_E, VK_HP_QWERTY_SYME, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_F, VK_HP_QWERTY_SYMF, false, L"", L"", L"", L"" }, + { KEY_FN_1, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_2, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_3, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_4, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_5, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_HARDWARE_MAX, VK_HP_INVALID, false, L"", L"", L"", L"" }, +}; + +static KeyboardMapEntry gKeyboardMapRUS [KEY_HARDWARE_MAX + 1] = +{ + { KEY_INVALID, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_SIDE_UP, VK_HP_SIDEUP, true, L"", L"", L"", L"" }, + { KEY_SIDE_DOWN, VK_HP_SIDEDOWN, true, L"", L"", L"", L"" }, + { KEY_OK, VK_HP_OK, true, L"OK", L"", L"", L"" }, + { KEY_CLEAR, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_CAMERA, VK_HP_CAMERA, true, L"", L"", L"", L"" }, + { KEY_SWITCH, VK_HP_SWITCH, true, L"", L"", L"", L"" }, + { KEY_0, VK_HP_INVALID, false, L"0", L"", L"", L"" }, + { KEY_1, VK_HP_INVALID, false, L"1", L"", L"", L"" }, + { KEY_2, VK_HP_INVALID, false, L"2", L"", L"", L"" }, + { KEY_3, VK_HP_INVALID, false, L"3", L"", L"", L"" }, + { KEY_4, VK_HP_INVALID, false, L"4", L"", L"", L"" }, + { KEY_5, VK_HP_INVALID, false, L"5", L"", L"", L"" }, + { KEY_6, VK_HP_INVALID, false, L"6", L"", L"", L"" }, + { KEY_7, VK_HP_INVALID, false, L"7", L"", L"", L"" }, + { KEY_8, VK_HP_INVALID, false, L"8", L"", L"", L"" }, + { KEY_9, VK_HP_INVALID, false, L"9", L"", L"", L"" }, + { KEY_ASTERISK, VK_HP_INVALID, false, L"*", L"", L"", L"" }, + { KEY_SHARP, VK_HP_INVALID, false, L"#", L"", L"", L"" }, + { KEY_LEFT, VK_HP_LEFT, true, L"", L"", L"", L"" }, + { KEY_UP, VK_HP_UP, true, L"", L"", L"", L"" }, + { KEY_DOWN, VK_HP_DOWN, true, L"", L"", L"", L"" }, + { KEY_RIGHT, VK_HP_RIGHT, true, L"", L"", L"", L"" }, + { KEY_MAX, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_A, VK_HP_A, true, L"A", L"!", L"\u0424", L"" }, + { KEY_B, VK_HP_B, true, L"B", L";", L"\u0418", L"" }, + { KEY_C, VK_HP_C, true, L"C", L"_", L"\u0421", L"" }, + { KEY_D, VK_HP_SHARP, true, L"D", L"#", L"\u0412", L"" }, + { KEY_E, VK_HP_3, true, L"E", L"3", L"\u0423", L"" }, + { KEY_F, VK_HP_F, true, L"F", L"$", L"\u0410", L"" }, + { KEY_G, VK_HP_G, true, L"G", L"%", L"\u041F", L"" }, + { KEY_H, VK_HP_H, true, L"H", L"/", L"\u0420", L"" }, + { KEY_I, VK_HP_8, true, L"I", L"8", L"\u0428", L"\u0429" }, + { KEY_J, VK_HP_J, true, L"J", L"&", L"\u041E", L"" }, + { KEY_K, VK_HP_ASTERISK, true, L"K", L"*", L"\u041B", L"" }, + { KEY_L, VK_HP_L, true, L"L", L"(", L"\u0414", L"" }, + { KEY_M, VK_HP_M, true, L"M", L"'", L"\u042C", L"\u0411"}, + { KEY_N, VK_HP_N, true, L"N", L":", L"\u0422", L"" }, + { KEY_O, VK_HP_9, true, L"O", L"9", L"\u0417", L"" }, + { KEY_P, VK_HP_0, true, L"P", L"0", L"\u0425", L"\u042A"}, + { KEY_Q, VK_HP_1, true, L"Q", L"1", L"\u0419", L"" }, + { KEY_R, VK_HP_4, true, L"R", L"4", L"\u041A", L"" }, + { KEY_S, VK_HP_S, true, L"S", L"@", L"\u042B", L"" }, + { KEY_T, VK_HP_5, true, L"T", L"5", L"\u0415", L"\u0401" }, + { KEY_U, VK_HP_7, true, L"U", L"7", L"\u0413", L"" }, + { KEY_V, VK_HP_V, true, L"V", L"/", L"\u041C", L"" }, + { KEY_W, VK_HP_2, true, L"W", L"2", L"\u0426", L"" }, + { KEY_Y, VK_HP_6, true, L"Y", L"6", L"\u041D", L"" }, + { KEY_X, VK_HP_X, true, L"X", L"-", L"\u0427", L"" }, + { KEY_Z, VK_HP_PLUS, true, L"Z", L"+", L"\u042F", L"" }, + { KEY_BACKSPACE, VK_HP_CLEAR, true, L"", L"", L"", L"" }, + { KEY_COMMA, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_ENTER, VK_HP_ENTER, true, L"", L"", L"", L"" }, + { KEY_CAPSLOCK, VK_HP_CAPSLOCK, true, L"", L"", L"", L"" }, + { KEY_QUESTION, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_ALT, VK_HP_FN, true, L"", L"", L"", L"" }, + { KEY_SYM, VK_HP_SYM, true, L"sym", L":)", L"", L"" }, + { KEY_SETTING, VK_HP_INVALID, false, L"", L"", L"", L"" }, // for wave37 which does not diefine VK_HP_SETTING + { KEY_SPACE, VK_HP_SPACE, true, L" ", L"", L"", L"" }, + { KEY_DOT, VK_HP_POINT, true, L".", L",", L"", L"" }, + { KEY_FN, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_CAMERA_HALF_SHUTTER, VK_HP_CAMERA_HALF_SHUTTER, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_1, VK_HP_COMMA, true, L"\u0416", L")", L"\u042D", L"" }, + { KEY_CHAR_SYM_2, VK_HP_QUESTION, true, L"\u042E", L"?", L"", L"" }, + { KEY_CHAR_SYM_3, VK_HP_QWERTY_SYM3, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_4, VK_HP_QWERTY_SYM4, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_5, VK_HP_QWERTY_SYM5, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_6, VK_HP_QWERTY_SYM6, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_7, VK_HP_QWERTY_SYM7, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_8, VK_HP_QWERTY_SYM8, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_9, VK_HP_QWERTY_SYM9, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_A, VK_HP_QWERTY_SYMA, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_B, VK_HP_QWERTY_SYMB, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_C, VK_HP_QWERTY_SYMC, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_D, VK_HP_QWERTY_SYMD, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_E, VK_HP_QWERTY_SYME, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_F, VK_HP_QWERTY_SYMF, false, L"", L"", L"", L"" }, + { KEY_FN_1, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_2, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_3, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_4, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_5, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_HARDWARE_MAX, VK_HP_INVALID, false, L"", L"", L"", L"" }, +}; + +static KeyboardMapEntry gKeyboardMapNOR [KEY_HARDWARE_MAX + 1] = +{ + { KEY_INVALID, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_SIDE_UP, VK_HP_SIDEUP, true, L"", L"", L"", L"" }, + { KEY_SIDE_DOWN, VK_HP_SIDEDOWN, true, L"", L"", L"", L"" }, + { KEY_OK, VK_HP_OK, true, L"OK", L"", L"", L"" }, + { KEY_CLEAR, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_CAMERA, VK_HP_CAMERA, true, L"", L"", L"", L"" }, + { KEY_SWITCH, VK_HP_SWITCH, true, L"", L"", L"", L"" }, + { KEY_0, VK_HP_INVALID, false, L"0", L"", L"", L"" }, + { KEY_1, VK_HP_INVALID, false, L"1", L"", L"", L"" }, + { KEY_2, VK_HP_INVALID, false, L"2", L"", L"", L"" }, + { KEY_3, VK_HP_INVALID, false, L"3", L"", L"", L"" }, + { KEY_4, VK_HP_INVALID, false, L"4", L"", L"", L"" }, + { KEY_5, VK_HP_INVALID, false, L"5", L"", L"", L"" }, + { KEY_6, VK_HP_INVALID, false, L"6", L"", L"", L"" }, + { KEY_7, VK_HP_INVALID, false, L"7", L"", L"", L"" }, + { KEY_8, VK_HP_INVALID, false, L"8", L"", L"", L"" }, + { KEY_9, VK_HP_INVALID, false, L"9", L"", L"", L"" }, + { KEY_ASTERISK, VK_HP_INVALID, false, L"*", L"", L"", L"" }, + { KEY_SHARP, VK_HP_INVALID, false, L"#", L"", L"", L"" }, + { KEY_LEFT, VK_HP_LEFT, true, L"", L"", L"", L"" }, + { KEY_UP, VK_HP_UP, true, L"", L"", L"", L"" }, + { KEY_DOWN, VK_HP_DOWN, true, L"", L"", L"", L"" }, + { KEY_RIGHT, VK_HP_RIGHT, true, L"", L"", L"", L"" }, + { KEY_MAX, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_A, VK_HP_A, true, L"A", L"!", L"", L"" }, + { KEY_B, VK_HP_B, true, L"B", L";", L"", L"" }, + { KEY_C, VK_HP_C, true, L"C", L"_", L"", L"" }, + { KEY_D, VK_HP_SHARP, true, L"D", L"#", L"", L"" }, + { KEY_E, VK_HP_3, true, L"E", L"3", L"", L"" }, + { KEY_F, VK_HP_F, true, L"F", L"$", L"", L"" }, + { KEY_G, VK_HP_G, true, L"G", L"\u20AC", L"", L"" }, + { KEY_H, VK_HP_H, true, L"H", L"%", L"", L"" }, + { KEY_I, VK_HP_8, true, L"I", L"8", L"", L"" }, + { KEY_J, VK_HP_J, true, L"J", L"&", L"", L"" }, + { KEY_K, VK_HP_ASTERISK, true, L"K", L"*", L"", L"" }, + { KEY_L, VK_HP_L, true, L"L", L"(", L"", L"" }, + { KEY_M, VK_HP_M, true, L"M", L"'", L"", L"" }, + { KEY_N, VK_HP_N, true, L"N", L":", L"", L"" }, + { KEY_O, VK_HP_9, true, L"O", L"9", L"", L"" }, + { KEY_P, VK_HP_0, true, L"P", L"0", L"", L"" }, + { KEY_Q, VK_HP_1, true, L"Q", L"1", L"", L"" }, + { KEY_R, VK_HP_4, true, L"R", L"4", L"", L"" }, + { KEY_S, VK_HP_S, true, L"S", L"@", L"", L"" }, + { KEY_T, VK_HP_5, true, L"T", L"5", L"", L"" }, + { KEY_U, VK_HP_7, true, L"U", L"7", L"", L"" }, + { KEY_V, VK_HP_V, true, L"V", L"/", L"", L"" }, + { KEY_W, VK_HP_2, true, L"W", L"2", L"", L"" }, + { KEY_Y, VK_HP_6, true, L"Y", L"6", L"", L"" }, + { KEY_X, VK_HP_X, true, L"X", L"-", L"", L"" }, + { KEY_Z, VK_HP_PLUS, true, L"Z", L"+", L"", L"" }, + { KEY_BACKSPACE, VK_HP_CLEAR, true, L"", L"", L"", L"" }, + { KEY_COMMA, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_ENTER, VK_HP_ENTER, true, L"", L"", L"", L"" }, + { KEY_CAPSLOCK, VK_HP_CAPSLOCK, true, L"", L"", L"", L"" }, + { KEY_QUESTION, VK_HP_QUESTION, true, L"?", L",", L"", L"" }, + { KEY_ALT, VK_HP_FN, true, L"", L"", L"", L"" }, + { KEY_SYM, VK_HP_SYM, true, L"sym", L":)", L"", L"" }, + { KEY_SETTING, VK_HP_INVALID, false, L"", L"", L"", L"" }, // for wave37 which does not diefine VK_HP_SETTING + { KEY_SPACE, VK_HP_SPACE, true, L" ", L"", L"", L"" }, + { KEY_DOT, VK_HP_POINT, true, L".", L".com", L"", L"" }, + { KEY_FN, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_CAMERA_HALF_SHUTTER, VK_HP_CAMERA_HALF_SHUTTER, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_1, VK_HP_COMMA, true, L"\u00D6", L")", L"", L"" }, + { KEY_CHAR_SYM_2, VK_HP_QWERTY_SYM1, true, L"\u00C4", L"\"", L"\u00C5", L"" }, + { KEY_CHAR_SYM_3, VK_HP_QWERTY_SYM3, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_4, VK_HP_QWERTY_SYM4, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_5, VK_HP_QWERTY_SYM5, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_6, VK_HP_QWERTY_SYM6, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_7, VK_HP_QWERTY_SYM7, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_8, VK_HP_QWERTY_SYM8, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_9, VK_HP_QWERTY_SYM9, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_A, VK_HP_QWERTY_SYMA, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_B, VK_HP_QWERTY_SYMB, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_C, VK_HP_QWERTY_SYMC, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_D, VK_HP_QWERTY_SYMD, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_E, VK_HP_QWERTY_SYME, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_F, VK_HP_QWERTY_SYMF, false, L"", L"", L"", L"" }, + { KEY_FN_1, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_2, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_3, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_4, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_5, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_HARDWARE_MAX, VK_HP_INVALID, false, L"", L"", L"", L"" }, + +}; + + +static KeyboardMapEntry gKeyboardMapARB [KEY_HARDWARE_MAX + 1] = +{ + { KEY_INVALID, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_SIDE_UP, VK_HP_SIDEUP, true, L"", L"", L"", L"" }, + { KEY_SIDE_DOWN, VK_HP_SIDEDOWN, true, L"", L"", L"", L"" }, + { KEY_OK, VK_HP_OK, true, L"OK", L"", L"", L"" }, + { KEY_CLEAR, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_CAMERA, VK_HP_CAMERA, true, L"", L"", L"", L"" }, + { KEY_SWITCH, VK_HP_SWITCH, true, L"", L"", L"", L"" }, + { KEY_0, VK_HP_INVALID, false, L"0", L"", L"", L"" }, + { KEY_1, VK_HP_INVALID, false, L"1", L"", L"", L"" }, + { KEY_2, VK_HP_INVALID, false, L"2", L"", L"", L"" }, + { KEY_3, VK_HP_INVALID, false, L"3", L"", L"", L"" }, + { KEY_4, VK_HP_INVALID, false, L"4", L"", L"", L"" }, + { KEY_5, VK_HP_INVALID, false, L"5", L"", L"", L"" }, + { KEY_6, VK_HP_INVALID, false, L"6", L"", L"", L"" }, + { KEY_7, VK_HP_INVALID, false, L"7", L"", L"", L"" }, + { KEY_8, VK_HP_INVALID, false, L"8", L"", L"", L"" }, + { KEY_9, VK_HP_INVALID, false, L"9", L"", L"", L"" }, + { KEY_ASTERISK, VK_HP_INVALID, false, L"*", L"", L"", L"" }, + { KEY_SHARP, VK_HP_INVALID, false, L"#", L"", L"", L"" }, + { KEY_LEFT, VK_HP_LEFT, true, L"", L"", L"", L"" }, + { KEY_UP, VK_HP_UP, true, L"", L"", L"", L"" }, + { KEY_DOWN, VK_HP_DOWN, true, L"", L"", L"", L"" }, + { KEY_RIGHT, VK_HP_RIGHT, true, L"", L"", L"", L"" }, + { KEY_MAX, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_A, VK_HP_A, true, L"A", L"!", L"\u0634", L"" }, + { KEY_B, VK_HP_B, true, L"B", L";", L"\uFEFB", L"\uFEF5" }, + { KEY_C, VK_HP_C, true, L"C", L"_", L"\u0624", L"" }, + { KEY_D, VK_HP_SHARP, true, L"D", L"#", L"\u064A", L"" }, + { KEY_E, VK_HP_3, true, L"E", L"3", L"\u062B", L"" }, + { KEY_F, VK_HP_F, true, L"F", L"$", L"\u0628", L"" }, + { KEY_G, VK_HP_G, true, L"G", L"%", L"\u0644", L"" }, + { KEY_H, VK_HP_H, true, L"H", L"^", L"\u0627", L"\u0623" }, + { KEY_I, VK_HP_8, true, L"I", L"8", L"\u0647", L"" }, + { KEY_J, VK_HP_J, true, L"J", L"&", L"\u062A", L"" }, + { KEY_K, VK_HP_ASTERISK, true, L"K", L"*", L"\u0646", L"\u0643" }, + { KEY_L, VK_HP_L, true, L"L", L"(", L"\u0645", L"\u0637" }, + { KEY_M, VK_HP_M, true, L"M", L"'", L"\u0629", L"\u0632" }, + { KEY_N, VK_HP_N, true, L"N", L":", L"\u0649", L"\u0622" }, + { KEY_O, VK_HP_9, true, L"O", L"9", L"\u062E", L"\u062C" }, + { KEY_P, VK_HP_0, true, L"P", L"0", L"\u062D", L"\u062F" }, + { KEY_Q, VK_HP_1, true, L"Q", L"1", L"\u0630", L"\u0636" }, + { KEY_R, VK_HP_4, true, L"R", L"4", L"\u0642", L"" }, + { KEY_S, VK_HP_S, true, L"S", L"@", L"\u0633", L"" }, + { KEY_T, VK_HP_5, true, L"T", L"5", L"\u0641", L"\uFEF9" }, + { KEY_U, VK_HP_7, true, L"U", L"7", L"\u0639", L"" }, + { KEY_V, VK_HP_V, true, L"V", L"/", L"\u0631", L"" }, + { KEY_W, VK_HP_2, true, L"W", L"2", L"\u0635", L"" }, + { KEY_Y, VK_HP_6, true, L"Y", L"6", L"\u063A", L"\u0625" }, + { KEY_X, VK_HP_X, true, L"X", L"-", L"\u0621", L"" }, + { KEY_Z, VK_HP_PLUS, true, L"Z", L"+", L"\u0626", L"" }, + { KEY_BACKSPACE, VK_HP_CLEAR, true, L"", L"", L"", L"" }, + { KEY_COMMA, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_ENTER, VK_HP_ENTER, true, L"", L"", L"", L"" }, + { KEY_CAPSLOCK, VK_HP_CAPSLOCK, true, L"", L"", L"", L"" }, + { KEY_QUESTION, VK_HP_COMMA, true, L"\u061F", L")", L"", L"" }, + { KEY_ALT, VK_HP_FN, true, L"", L"", L"", L"" }, + { KEY_SYM, VK_HP_SYM, true, L"sym", L":)", L"", L"" }, + { KEY_SETTING, VK_HP_INVALID, false, L"", L"", L"", L"" }, // for wave37 which does not diefine VK_HP_SETTING + { KEY_SPACE, VK_HP_SPACE, true, L" ", L"", L"", L"" }, + { KEY_DOT, VK_HP_POINT, true, L".", L",", L"", L"" }, + { KEY_FN, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_CAMERA_HALF_SHUTTER, VK_HP_CAMERA_HALF_SHUTTER, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_1, VK_HP_QUESTION, true, L"\u0648", L"\"", L"\u0638", L"" }, + { KEY_CHAR_SYM_2, VK_HP_QWERTY_SYM2, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_3, VK_HP_QWERTY_SYM3, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_4, VK_HP_QWERTY_SYM4, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_5, VK_HP_QWERTY_SYM5, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_6, VK_HP_QWERTY_SYM6, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_7, VK_HP_QWERTY_SYM7, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_8, VK_HP_QWERTY_SYM8, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_9, VK_HP_QWERTY_SYM9, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_A, VK_HP_QWERTY_SYMA, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_B, VK_HP_QWERTY_SYMB, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_C, VK_HP_QWERTY_SYMC, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_D, VK_HP_QWERTY_SYMD, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_E, VK_HP_QWERTY_SYME, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_F, VK_HP_QWERTY_SYMF, false, L"", L"", L"", L"" }, + { KEY_FN_1, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_2, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_3, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_4, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_5, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_HARDWARE_MAX, VK_HP_INVALID, false, L"", L"", L"", L"" }, + +}; + + +static KeyboardMapEntry gKeyboardMapIRN [KEY_HARDWARE_MAX + 1] = +{ + { KEY_INVALID, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_SIDE_UP, VK_HP_SIDEUP, true, L"", L"", L"", L"" }, + { KEY_SIDE_DOWN, VK_HP_SIDEDOWN, true, L"", L"", L"", L"" }, + { KEY_OK, VK_HP_OK, true, L"OK", L"", L"", L"" }, + { KEY_CLEAR, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_CAMERA, VK_HP_CAMERA, true, L"", L"", L"", L"" }, + { KEY_SWITCH, VK_HP_SWITCH, true, L"", L"", L"", L"" }, + { KEY_0, VK_HP_INVALID, false, L"0", L"", L"", L"" }, + { KEY_1, VK_HP_INVALID, false, L"1", L"", L"", L"" }, + { KEY_2, VK_HP_INVALID, false, L"2", L"", L"", L"" }, + { KEY_3, VK_HP_INVALID, false, L"3", L"", L"", L"" }, + { KEY_4, VK_HP_INVALID, false, L"4", L"", L"", L"" }, + { KEY_5, VK_HP_INVALID, false, L"5", L"", L"", L"" }, + { KEY_6, VK_HP_INVALID, false, L"6", L"", L"", L"" }, + { KEY_7, VK_HP_INVALID, false, L"7", L"", L"", L"" }, + { KEY_8, VK_HP_INVALID, false, L"8", L"", L"", L"" }, + { KEY_9, VK_HP_INVALID, false, L"9", L"", L"", L"" }, + { KEY_ASTERISK, VK_HP_INVALID, false, L"*", L"", L"", L"" }, + { KEY_SHARP, VK_HP_INVALID, false, L"#", L"", L"", L"" }, + { KEY_LEFT, VK_HP_LEFT, true, L"", L"", L"", L"" }, + { KEY_UP, VK_HP_UP, true, L"", L"", L"", L"" }, + { KEY_DOWN, VK_HP_DOWN, true, L"", L"", L"", L"" }, + { KEY_RIGHT, VK_HP_RIGHT, true, L"", L"", L"", L"" }, + { KEY_MAX, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_A, VK_HP_A, true, L"A", L"!", L"\u0634", L"" }, + { KEY_B, VK_HP_B, true, L"B", L";", L"\u062F", L"" }, + { KEY_C, VK_HP_C, true, L"C", L"_", L"\u0631", L"" }, + { KEY_D, VK_HP_SHARP, true, L"D", L"#", L"\u0649", L"" }, + { KEY_E, VK_HP_3, true, L"E", L"3", L"\u0642", L"" }, + { KEY_F, VK_HP_F, true, L"F", L"$", L"\u0628", L"" }, + { KEY_G, VK_HP_G, true, L"G", L"%", L"\u0644", L"" }, + { KEY_H, VK_HP_H, true, L"H", L"^", L"\u0627", L"\u0622" }, + { KEY_I, VK_HP_8, true, L"I", L"8", L"\u062D", L"" }, + { KEY_J, VK_HP_J, true, L"J", L"&", L"\u062A", L"" }, + { KEY_K, VK_HP_ASTERISK, true, L"K", L"*", L"\u0646", L"" }, + { KEY_L, VK_HP_L, true, L"L", L"(", L"\u0645", L"" }, + { KEY_M, VK_HP_M, true, L"M", L"'", L"\u06A9", L"" }, + { KEY_N, VK_HP_N, true, L"N", L":", L"\u0648", L"" }, + { KEY_O, VK_HP_9, true, L"O", L"9", L"\u062C", L"\u0686" }, + { KEY_P, VK_HP_0, true, L"P", L"0", L"\u067E", L"" }, + { KEY_Q, VK_HP_1, true, L"Q", L"1", L"\u0635", L"\u0636" }, + { KEY_R, VK_HP_4, true, L"R", L"4", L"\u0641", L"" }, + { KEY_S, VK_HP_S, true, L"S", L"@", L"\u0633", L"" }, + { KEY_T, VK_HP_5, true, L"T", L"5", L"\u0639", L"\u063A" }, + { KEY_U, VK_HP_7, true, L"U", L"7", L"\u062E", L"" }, + { KEY_V, VK_HP_V, true, L"V", L"/", L"\u0630", L"" }, + { KEY_W, VK_HP_2, true, L"W", L"2", L"\u062B", L"" }, + { KEY_Y, VK_HP_6, true, L"Y", L"6", L"\u0647", L"" }, + { KEY_X, VK_HP_X, true, L"X", L"-", L"\u0632", L"\u0698" }, + { KEY_Z, VK_HP_PLUS, true, L"Z", L"+", L"\u0637", L"\u0638" }, + { KEY_BACKSPACE, VK_HP_CLEAR, true, L"", L"", L"", L"" }, + { KEY_COMMA, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_ENTER, VK_HP_ENTER, true, L"", L"", L"", L"" }, + { KEY_CAPSLOCK, VK_HP_CAPSLOCK, true, L"", L"", L"", L"" }, + { KEY_QUESTION, VK_HP_COMMA, true, L"\u061F", L")", L"", L"" }, + { KEY_ALT, VK_HP_FN, true, L"", L"", L"", L"" }, + { KEY_SYM, VK_HP_SYM, true, L"sym", L":)", L"", L"" }, + { KEY_SETTING, VK_HP_INVALID, false, L"", L"", L"", L"" }, // for wave37 which does not diefine VK_HP_SETTING + { KEY_SPACE, VK_HP_SPACE, true, L" ", L"", L"", L"" }, + { KEY_DOT, VK_HP_POINT, true, L".", L",", L"", L"" }, + { KEY_FN, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_CAMERA_HALF_SHUTTER, VK_HP_CAMERA_HALF_SHUTTER, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_1, VK_HP_QUESTION, true, L"\u06AF", L"\"", L"\u0621", L"" }, + { KEY_CHAR_SYM_2, VK_HP_QWERTY_SYM2, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_3, VK_HP_QWERTY_SYM3, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_4, VK_HP_QWERTY_SYM4, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_5, VK_HP_QWERTY_SYM5, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_6, VK_HP_QWERTY_SYM6, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_7, VK_HP_QWERTY_SYM7, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_8, VK_HP_QWERTY_SYM8, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_9, VK_HP_QWERTY_SYM9, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_A, VK_HP_QWERTY_SYMA, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_B, VK_HP_QWERTY_SYMB, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_C, VK_HP_QWERTY_SYMC, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_D, VK_HP_QWERTY_SYMD, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_E, VK_HP_QWERTY_SYME, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_F, VK_HP_QWERTY_SYMF, false, L"", L"", L"", L"" }, + { KEY_FN_1, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_2, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_3, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_4, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_5, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_HARDWARE_MAX, VK_HP_INVALID, false, L"", L"", L"", L"" }, +}; + +static KeyboardMapEntry gKeyboardMapPAK [KEY_HARDWARE_MAX + 1] = +{ + { KEY_INVALID, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_SIDE_UP, VK_HP_SIDEUP, true, L"", L"", L"", L"" }, + { KEY_SIDE_DOWN, VK_HP_SIDEDOWN, true, L"", L"", L"", L"" }, + { KEY_OK, VK_HP_OK, true, L"OK", L"", L"", L"" }, + { KEY_CLEAR, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_CAMERA, VK_HP_CAMERA, true, L"", L"", L"", L"" }, + { KEY_SWITCH, VK_HP_SWITCH, true, L"", L"", L"", L"" }, + { KEY_0, VK_HP_INVALID, false, L"0", L"", L"", L"" }, + { KEY_1, VK_HP_INVALID, false, L"1", L"", L"", L"" }, + { KEY_2, VK_HP_INVALID, false, L"2", L"", L"", L"" }, + { KEY_3, VK_HP_INVALID, false, L"3", L"", L"", L"" }, + { KEY_4, VK_HP_INVALID, false, L"4", L"", L"", L"" }, + { KEY_5, VK_HP_INVALID, false, L"5", L"", L"", L"" }, + { KEY_6, VK_HP_INVALID, false, L"6", L"", L"", L"" }, + { KEY_7, VK_HP_INVALID, false, L"7", L"", L"", L"" }, + { KEY_8, VK_HP_INVALID, false, L"8", L"", L"", L"" }, + { KEY_9, VK_HP_INVALID, false, L"9", L"", L"", L"" }, + { KEY_ASTERISK, VK_HP_INVALID, false, L"*", L"", L"", L"" }, + { KEY_SHARP, VK_HP_INVALID, false, L"#", L"", L"", L"" }, + { KEY_LEFT, VK_HP_LEFT, true, L"", L"", L"", L"" }, + { KEY_UP, VK_HP_UP, true, L"", L"", L"", L"" }, + { KEY_DOWN, VK_HP_DOWN, true, L"", L"", L"", L"" }, + { KEY_RIGHT, VK_HP_RIGHT, true, L"", L"", L"", L"" }, + { KEY_MAX, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_A, VK_HP_A, true, L"A", L"!", L"\u0627", L"\u0622" }, + { KEY_B, VK_HP_B, true, L"B", L";", L"\u0628", L"" }, + { KEY_C, VK_HP_C, true, L"C", L"_", L"\u0686", L"\u062B" }, + { KEY_D, VK_HP_SHARP, true, L"D", L"#", L"\u062F", L"\u0688" }, + { KEY_E, VK_HP_3, true, L"E", L"3", L"\u0639", L"\u0651" }, + { KEY_F, VK_HP_F, true, L"F", L"$", L"\u0641", L"" }, + { KEY_G, VK_HP_G, true, L"G", L"%", L"\u06AF", L"\u063A" }, + { KEY_H, VK_HP_H, true, L"H", L"^", L"\u0647", L"\u062D" }, + { KEY_I, VK_HP_8, true, L"I", L"8", L"\u0649", L"\u064A" }, + { KEY_J, VK_HP_J, true, L"J", L"&", L"\u062C", L"" }, + { KEY_K, VK_HP_ASTERISK, true, L"K", L"*", L"\u06A9", L"\u062E" }, + { KEY_L, VK_HP_L, true, L"L", L"(", L"\u0644", L"" }, + { KEY_M, VK_HP_M, true, L"M", L"'", L"\u0645", L"" }, + { KEY_N, VK_HP_N, true, L"N", L":", L"\u0646", L"\u06BA" }, + { KEY_O, VK_HP_9, true, L"O", L"9", L"\u06D5", L"\u0629" }, + { KEY_P, VK_HP_0, true, L"P", L"0", L"\u067F", L"\u064E" }, + { KEY_Q, VK_HP_1, true, L"Q", L"1", L"\u0642", L"\u0643" }, + { KEY_R, VK_HP_4, true, L"R", L"4", L"\u0631", L"\u0691" }, + { KEY_S, VK_HP_S, true, L"S", L"@", L"\u0633", L"\u0634" }, + { KEY_T, VK_HP_5, true, L"T", L"5", L"\u062A", L"\u0679" }, + { KEY_U, VK_HP_7, true, L"U", L"7", L"\u0626", L"\u0621" }, + { KEY_V, VK_HP_V, true, L"V", L"/", L"\u0637", L"\u0638" }, + { KEY_W, VK_HP_2, true, L"W", L"2", L"\u0648", L"\u0676" }, + { KEY_Y, VK_HP_6, true, L"Y", L"6", L"\u06D2", L"" }, + { KEY_X, VK_HP_X, true, L"X", L"-", L"\u0635", L"\u0636" }, + { KEY_Z, VK_HP_PLUS, true, L"Z", L"+", L"\u0632", L"\u0630" }, + { KEY_BACKSPACE, VK_HP_CLEAR, true, L"", L"", L"", L"" }, + { KEY_COMMA, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_ENTER, VK_HP_ENTER, true, L"", L"", L"", L"" }, + { KEY_CAPSLOCK, VK_HP_CAPSLOCK, true, L"", L"", L"", L"" }, + { KEY_QUESTION, VK_HP_COMMA, true, L"\u061F", L")", L"", L"" }, + { KEY_ALT, VK_HP_FN, true, L"", L"", L"", L"" }, + { KEY_SYM, VK_HP_SYM, true, L"sym", L":)", L"", L"" }, + { KEY_SETTING, VK_HP_INVALID, false, L"", L"", L"", L"" }, // for wave37 which does not diefine VK_HP_SETTING + { KEY_SPACE, VK_HP_SPACE, true, L" ", L"", L"", L"" }, + { KEY_DOT, VK_HP_POINT, true, L".", L",", L"", L"" }, + { KEY_FN, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_CAMERA_HALF_SHUTTER, VK_HP_CAMERA_HALF_SHUTTER, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_1, VK_HP_QUESTION, true, L"\u0698", L"\"", L"", L"" }, + { KEY_CHAR_SYM_2, VK_HP_QWERTY_SYM2, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_3, VK_HP_QWERTY_SYM3, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_4, VK_HP_QWERTY_SYM4, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_5, VK_HP_QWERTY_SYM5, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_6, VK_HP_QWERTY_SYM6, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_7, VK_HP_QWERTY_SYM7, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_8, VK_HP_QWERTY_SYM8, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_9, VK_HP_QWERTY_SYM9, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_A, VK_HP_QWERTY_SYMA, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_B, VK_HP_QWERTY_SYMB, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_C, VK_HP_QWERTY_SYMC, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_D, VK_HP_QWERTY_SYMD, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_E, VK_HP_QWERTY_SYME, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_F, VK_HP_QWERTY_SYMF, false, L"", L"", L"", L"" }, + { KEY_FN_1, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_2, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_3, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_4, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_5, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_HARDWARE_MAX, VK_HP_INVALID, false, L"", L"", L"", L"" }, +}; + +static KeyboardMapEntry gKeyboardMapTHA [KEY_HARDWARE_MAX + 1] = +{ + { KEY_INVALID, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_SIDE_UP, VK_HP_SIDEUP, true, L"", L"", L"", L"" }, + { KEY_SIDE_DOWN, VK_HP_SIDEDOWN, true, L"", L"", L"", L"" }, + { KEY_OK, VK_HP_OK, true, L"OK", L"", L"", L"" }, + { KEY_CLEAR, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_CAMERA, VK_HP_CAMERA, true, L"", L"", L"", L"" }, + { KEY_SWITCH, VK_HP_SWITCH, true, L"", L"", L"", L"" }, + { KEY_0, VK_HP_INVALID, false, L"0", L"", L"", L"" }, + { KEY_1, VK_HP_INVALID, false, L"1", L"", L"", L"" }, + { KEY_2, VK_HP_INVALID, false, L"2", L"", L"", L"" }, + { KEY_3, VK_HP_INVALID, false, L"3", L"", L"", L"" }, + { KEY_4, VK_HP_INVALID, false, L"4", L"", L"", L"" }, + { KEY_5, VK_HP_INVALID, false, L"5", L"", L"", L"" }, + { KEY_6, VK_HP_INVALID, false, L"6", L"", L"", L"" }, + { KEY_7, VK_HP_INVALID, false, L"7", L"", L"", L"" }, + { KEY_8, VK_HP_INVALID, false, L"8", L"", L"", L"" }, + { KEY_9, VK_HP_INVALID, false, L"9", L"", L"", L"" }, + { KEY_ASTERISK, VK_HP_INVALID, false, L"*", L"", L"", L"" }, + { KEY_SHARP, VK_HP_INVALID, false, L"#", L"", L"", L"" }, + { KEY_LEFT, VK_HP_LEFT, true, L"", L"", L"", L"" }, + { KEY_UP, VK_HP_UP, true, L"", L"", L"", L"" }, + { KEY_DOWN, VK_HP_DOWN, true, L"", L"", L"", L"" }, + { KEY_RIGHT, VK_HP_RIGHT, true, L"", L"", L"", L"" }, + { KEY_MAX, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_A, VK_HP_A, true, L"A", L"!", L"\u0E1F", L"\u0E2B" }, + { KEY_B, VK_HP_B, true, L"B", L";", L"\u0E37", L"\u0E4C" }, + { KEY_C, VK_HP_C, true, L"C", L"_", L"\u0E2D", L"\u0E09" }, + { KEY_D, VK_HP_SHARP, true, L"D", L"#", L"\u0E40", L"\u0E42" }, + { KEY_E, VK_HP_3, true, L"E", L"3", L"\u0E1E", L"\u0E46" }, + { KEY_F, VK_HP_F, true, L"F", L"$", L"\u0E49", L"\u0E47" }, + { KEY_G, VK_HP_G, true, L"G", L"\u0E3F", L"\u0E48", L"\u0E4B" }, + { KEY_H, VK_HP_H, true, L"H", L"%", L"\u0E32", L"\u0E4A" }, + { KEY_I, VK_HP_8, true, L"I", L"8", L"\u0E19", L"\u0E08" }, + { KEY_J, VK_HP_J, true, L"J", L"&", L"\u0E2A", L"\u0E29" }, + { KEY_K, VK_HP_ASTERISK, true, L"K", L"*", L"\u0E27", L"\u0E28" }, + { KEY_L, VK_HP_L, true, L"L", L"(", L"\u0E07", L"\u0E0B" }, + { KEY_M, VK_HP_M, true, L"M", L"'", L"\u0E43", L"\u0E2C" }, + { KEY_N, VK_HP_N, true, L"N", L":", L"\u0E21", L"\u0E17" }, + { KEY_O, VK_HP_9, true, L"O", L"9", L"\u0E22", L"\u0E02" }, + { KEY_P, VK_HP_0, true, L"P", L"0", L"\u0E1A", L"\u0E0A" }, + { KEY_Q, VK_HP_1, true, L"Q", L"1", L"\u0E44", L"\u0E46" }, + { KEY_R, VK_HP_4, true, L"R", L"4", L"\u0E30", L"\u0E38" }, + { KEY_S, VK_HP_S, true, L"S", L"@", L"\u0E01", L"\u0E14" }, + { KEY_T, VK_HP_5, true, L"T", L"5", L"\u0E31", L"\u0E36" }, + { KEY_U, VK_HP_7, true, L"U", L"7", L"\u0E23", L"\u0E15" }, + { KEY_V, VK_HP_V, true, L"V", L"/", L"\u0E34", L"\u0E2E" }, + { KEY_W, VK_HP_2, true, L"W", L"2", L"\u0E33", L"\u0E11" }, + { KEY_Y, VK_HP_6, true, L"Y", L"6", L"\u0E04", L"\u0E35" }, + { KEY_X, VK_HP_X, true, L"X", L"-", L"", L"" }, + { KEY_Z, VK_HP_PLUS, true, L"Z", L"+", L"", L"" }, + { KEY_BACKSPACE, VK_HP_CLEAR, true, L"", L"", L"", L"" }, + { KEY_COMMA, VK_HP_COMMA, true, L",", L")", L"", L"" }, + { KEY_ENTER, VK_HP_ENTER, true, L"", L"", L"", L"" }, + { KEY_CAPSLOCK, VK_HP_CAPSLOCK, true, L"", L"", L"", L"" }, + { KEY_QUESTION, VK_HP_QUESTION, true, L"?", L"\"", L"", L"" }, + { KEY_ALT, VK_HP_FN, true, L"", L"", L"", L"" }, + { KEY_SYM, VK_HP_SYM, true, L"sym", L":)", L"", L"" }, + { KEY_SETTING, VK_HP_INVALID, false, L"", L"", L"", L"" }, // for wave37 which does not diefine VK_HP_SETTING + { KEY_SPACE, VK_HP_SPACE, true, L" ", L"", L"", L"" }, + { KEY_DOT, VK_HP_POINT, true, L".", L".com", L"", L"" }, + { KEY_FN, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_CAMERA_HALF_SHUTTER, VK_HP_CAMERA_HALF_SHUTTER, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_1, VK_HP_QWERTY_SYM1, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_2, VK_HP_QWERTY_SYM2, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_3, VK_HP_QWERTY_SYM3, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_4, VK_HP_QWERTY_SYM4, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_5, VK_HP_QWERTY_SYM5, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_6, VK_HP_QWERTY_SYM6, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_7, VK_HP_QWERTY_SYM7, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_8, VK_HP_QWERTY_SYM8, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_9, VK_HP_QWERTY_SYM9, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_A, VK_HP_QWERTY_SYMA, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_B, VK_HP_QWERTY_SYMB, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_C, VK_HP_QWERTY_SYMC, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_D, VK_HP_QWERTY_SYMD, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_E, VK_HP_QWERTY_SYME, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_F, VK_HP_QWERTY_SYMF, false, L"", L"", L"", L"" }, + { KEY_FN_1, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_2, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_3, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_4, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_5, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_HARDWARE_MAX, VK_HP_INVALID, false, L"", L"", L"", L"" }, +}; + + +static KeyboardMapEntry gKeyboardMapVNM [KEY_HARDWARE_MAX + 1] = +{ + { KEY_INVALID, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_SIDE_UP, VK_HP_SIDEUP, true, L"", L"", L"", L"" }, + { KEY_SIDE_DOWN, VK_HP_SIDEDOWN, true, L"", L"", L"", L"" }, + { KEY_OK, VK_HP_OK, true, L"OK", L"", L"", L"" }, + { KEY_CLEAR, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_CAMERA, VK_HP_CAMERA, true, L"", L"", L"", L"" }, + { KEY_SWITCH, VK_HP_SWITCH, true, L"", L"", L"", L"" }, + { KEY_0, VK_HP_INVALID, false, L"0", L"", L"", L"" }, + { KEY_1, VK_HP_INVALID, false, L"1", L"", L"", L"" }, + { KEY_2, VK_HP_INVALID, false, L"2", L"", L"", L"" }, + { KEY_3, VK_HP_INVALID, false, L"3", L"", L"", L"" }, + { KEY_4, VK_HP_INVALID, false, L"4", L"", L"", L"" }, + { KEY_5, VK_HP_INVALID, false, L"5", L"", L"", L"" }, + { KEY_6, VK_HP_INVALID, false, L"6", L"", L"", L"" }, + { KEY_7, VK_HP_INVALID, false, L"7", L"", L"", L"" }, + { KEY_8, VK_HP_INVALID, false, L"8", L"", L"", L"" }, + { KEY_9, VK_HP_INVALID, false, L"9", L"", L"", L"" }, + { KEY_ASTERISK, VK_HP_INVALID, false, L"*", L"", L"", L"" }, + { KEY_SHARP, VK_HP_INVALID, false, L"#", L"", L"", L"" }, + { KEY_LEFT, VK_HP_LEFT, true, L"", L"", L"", L"" }, + { KEY_UP, VK_HP_UP, true, L"", L"", L"", L"" }, + { KEY_DOWN, VK_HP_DOWN, true, L"", L"", L"", L"" }, + { KEY_RIGHT, VK_HP_RIGHT, true, L"", L"", L"", L"" }, + { KEY_MAX, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_A, VK_HP_A, true, L"A", L"!", L"\u0103", L"\u00E2" }, + { KEY_B, VK_HP_B, true, L"B", L";", L"", L"" }, + { KEY_C, VK_HP_C, true, L"C", L"_", L"", L"" }, + { KEY_D, VK_HP_SHARP, true, L"D", L"#", L"\u0111", L"" }, + { KEY_E, VK_HP_3, true, L"E", L"3", L"\u00EA", L"" }, + { KEY_F, VK_HP_F, true, L"F", L"$", L"", L"" }, + { KEY_G, VK_HP_G, true, L"G", L"%", L"", L"" }, + { KEY_H, VK_HP_H, true, L"H", L"^", L"", L"" }, + { KEY_I, VK_HP_8, true, L"I", L"8", L"", L"" }, + { KEY_J, VK_HP_J, true, L"J", L"&", L"", L"" }, + { KEY_K, VK_HP_ASTERISK, true, L"K", L"*", L"", L"" }, + { KEY_L, VK_HP_L, true, L"L", L"(", L"", L"" }, + { KEY_M, VK_HP_M, true, L"M", L"'", L"", L"" }, + { KEY_N, VK_HP_N, true, L"N", L":", L"", L"" }, + { KEY_O, VK_HP_9, true, L"O", L"9", L"\u00F4", L"\u01A1" }, + { KEY_P, VK_HP_0, true, L"P", L"0", L"", L"" }, + { KEY_Q, VK_HP_1, true, L"Q", L"1", L"", L"" }, + { KEY_R, VK_HP_4, true, L"R", L"4", L"", L"" }, + { KEY_S, VK_HP_S, true, L"S", L"@", L"", L"" }, + { KEY_T, VK_HP_5, true, L"T", L"5", L"", L"" }, + { KEY_U, VK_HP_7, true, L"U", L"7", L"\u01B0", L"" }, + { KEY_V, VK_HP_V, true, L"V", L"/", L"", L"" }, + { KEY_W, VK_HP_2, true, L"W", L"2", L"", L"" }, + { KEY_Y, VK_HP_6, true, L"Y", L"6", L"", L"" }, + { KEY_X, VK_HP_X, true, L"X", L"-", L"", L"" }, + { KEY_Z, VK_HP_PLUS, true, L"Z", L"+", L"", L"" }, + { KEY_BACKSPACE, VK_HP_CLEAR, true, L"", L"", L"", L"" }, + { KEY_COMMA, VK_HP_COMMA, true, L",", L")", L"", L"" }, + { KEY_ENTER, VK_HP_ENTER, true, L"", L"", L"", L"" }, + { KEY_CAPSLOCK, VK_HP_CAPSLOCK, true, L"", L"", L"", L"" }, + { KEY_QUESTION, VK_HP_QUESTION, true, L"?", L"\"", L"", L"" }, + { KEY_ALT, VK_HP_FN, true, L"", L"", L"", L"" }, + { KEY_SYM, VK_HP_SYM, true, L"sym", L":)", L"", L"" }, + { KEY_SETTING, VK_HP_INVALID, false, L"", L"", L"", L"" }, // for wave37 which does not diefine VK_HP_SETTING + { KEY_SPACE, VK_HP_SPACE, true, L" ", L"", L"", L"" }, + { KEY_DOT, VK_HP_POINT, true, L".", L".com", L"", L"" }, + { KEY_FN, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_CAMERA_HALF_SHUTTER, VK_HP_CAMERA_HALF_SHUTTER, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_1, VK_HP_QWERTY_TONE, true, L"\u0301", L"\u0300", L"\u0309", L"\u02DC" }, + { KEY_CHAR_SYM_2, VK_HP_QWERTY_SYM2, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_3, VK_HP_QWERTY_SYM3, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_4, VK_HP_QWERTY_SYM4, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_5, VK_HP_QWERTY_SYM5, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_6, VK_HP_QWERTY_SYM6, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_7, VK_HP_QWERTY_SYM7, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_8, VK_HP_QWERTY_SYM8, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_9, VK_HP_QWERTY_SYM9, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_A, VK_HP_QWERTY_SYMA, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_B, VK_HP_QWERTY_SYMB, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_C, VK_HP_QWERTY_SYMC, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_D, VK_HP_QWERTY_SYMD, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_E, VK_HP_QWERTY_SYME, false, L"", L"", L"", L"" }, + { KEY_CHAR_SYM_F, VK_HP_QWERTY_SYMF, false, L"", L"", L"", L"" }, + { KEY_FN_1, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_2, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_3, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_4, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_FN_5, VK_HP_INVALID, false, L"", L"", L"", L"" }, + { KEY_HARDWARE_MAX, VK_HP_INVALID, false, L"", L"", L"", L"" }, +}; + +static KeyboardMapEntry* gKeyboardMap = null; +static wchar_t* gKeyBoardTypeName = null; +*/ + +KeyboardMap* pKeyboardMapInstance = null; + +// forward declarations +result LoadKeyboardMap(void); + +//////////////////////////////////////////////////////////////////////////////// +/// KeyboardMap class Lifecycle + +KeyboardMap::KeyboardMap(void) +{ + // NOTHING +} + + +KeyboardMap::~KeyboardMap(void) +{ + // NOTHING +} + + +result +KeyboardMap::Construct(void) +{ + LoadKeyboardMap(); + return (E_SUCCESS); +} + +KeyboardMap* +KeyboardMap::GetInstance(void) +{ + static pthread_once_t once_block = PTHREAD_ONCE_INIT; + + pthread_once(&once_block, InitializeInstance); + + static bool constructed = false; + + if (!constructed) + { + pKeyboardMapInstance->Construct(); + constructed = true; + } + + return pKeyboardMapInstance; +} + +void +KeyboardMap::InitializeInstance(void) +{ + static KeyboardMap instance; + pKeyboardMapInstance = &instance; + +} + +//////////////////////////////////////////////////////////////////////////////// +/// KeyboardMap class Operations + + +KeyCode +KeyboardMap::GetKeyCode(int systemKeyCode) const +{ +/* + if (VK_HP_INVALID == systemKeyCode) + return KEY_INVALID; + + if (gKeyboardMap == null) + return KEY_INVALID; + + for (int i = 0; i < KEY_HARDWARE_MAX; i++) + { + if (gKeyboardMap[i].systemKeyCode == systemKeyCode) + return KeyCode(gKeyboardMap[i].keyCode); + } +*/ + + return KEY_INVALID; +} + + +bool +KeyboardMap::IsPrintingKey(KeyCode keyCode) const +{ +/* + if (gKeyboardMap == null) + return false; + + if (gKeyboardMap[keyCode].label1[0] != L'n') + return true; + return false; +*/ + + return false; +} + + +String +KeyboardMap::GetDisplayableLabel(KeyCode keyCode, KeyboardKeyLabelType type) const +{ +/* + String label = L""; + + if (gKeyboardMap == null) + return label; + + switch (type) + { + case KEYBOARD_KEY_LABEL_1: + if (gKeyboardMap[keyCode].label1[0] == L'n' && // L'n' means no label + gKeyboardMap[keyCode].label1[1] == 0) + { + label = L""; + } + else + { + // check for space 's' character + if (gKeyboardMap[keyCode].label1[0] == L's') + label = L" "; //space + else + label = gKeyboardMap[keyCode].label1; + } + break; + case KEYBOARD_KEY_LABEL_2: + if (gKeyboardMap[keyCode].label2[0] == L'n' && // L'n' means no label + gKeyboardMap[keyCode].label2[1] == 0) + { + label = L""; + } + else + { + // check for space 's' character + if (gKeyboardMap[keyCode].label2[0] == L's') + label = L" "; //space + else + label = gKeyboardMap[keyCode].label2; + } + break; + case KEYBOARD_KEY_LABEL_3: + if (gKeyboardMap[keyCode].label3[0] == L'n' && // L'n' means no label + gKeyboardMap[keyCode].label3[1] == 0) + { + label = L""; + } + else + { + // check for space 's' character + if (gKeyboardMap[keyCode].label3[0] == L's') + label = L" "; //space + else + label = gKeyboardMap[keyCode].label3; + } + break; + case KEYBOARD_KEY_LABEL_4: + if (gKeyboardMap[keyCode].label4[0] == L'n' && + gKeyboardMap[keyCode].label4[1] == 0) + { + label = L""; + } + else + { + if (gKeyboardMap[keyCode].label4[0] == L's') + label = L" "; //space + else + label = gKeyboardMap[keyCode].label4; + } + break; + default: + break; + } + return label; +*/ + + return String(L""); +} + + +bool +KeyboardMap::IsKeyAvailable(KeyCode keyCode) const +{ +/* + if (gKeyboardMap == null) + return false; + return gKeyboardMap[keyCode].available; +*/ + + return false; +} + + +String +KeyboardMap::GetKeyboardType(void) const +{ +/* + String type(L""); + if (gKeyBoardTypeName == null) + return type; + type = (const wchar_t*) gKeyBoardTypeName; + return type; +*/ + return String(L""); +} + + +result +KeyboardMap::LoadKeyboarMapFromFile(void) +{ + return E_SUCCESS; +} + +/* +KeyboardMapType +GetKeyboardMapType(void) +{ + KeyboardMapType type = KEYBOARD_MAP_NONE; + + // get keyboard type + String keyboardTypeKey(L"KeyboardType"); + String keyboardType; + String country; + String operatorCountryKey(L"OperatorCountry"); + int operatorCountry = 0; + + result r = _SystemInfoImpl::GetSysInfo(keyboardTypeKey, keyboardType); + if (r != E_SUCCESS) + { + SysLogExceptionxception("[E_SYSTEM] Unable to get keyboard type."); + goto CATCH; + } + + + if (keyboardType == L"QWERTY") + { + // get operator country + type = KEYBOARD_MAP_GLB; + r =_SystemInfoImpl::GetSysInfo(operatorCountryKey, country); + if (r != E_SUCCESS) + { + SysLogExceptionxception("[E_SYSTEM] Unable to get operator country."); + goto CATCH; + } + +#if !defined( _WIN32 ) + // search table + for (int i = 0; i < KEYBOARD_MAP_TYPE_MAX; i++) + { + if (country == gKeyboardMapTypes[i].country) + { + type = gKeyboardMapTypes[i].type; + break; + } + } +#else + operatorCountry = NvGetInt( NV_SI_OPERATOR_COUNTRY ); + switch (operatorCountry) + { + case NV_OPERATOR_COUNTRY_FRANCE: + { + type = KEYBOARD_MAP_FRA; + } + break; + case NV_OPERATOR_COUNTRY_GERMANY: + { + type = KEYBOARD_MAP_DEU; + } + break; + case NV_OPERATOR_COUNTRY_SPAIN: + { + type = KEYBOARD_MAP_ESP; + } + break; + case NV_OPERATOR_COUNTRY_ITALY: + { + type = KEYBOARD_MAP_ITA; + } + break; + case NV_OPERATOR_COUNTRY_PORTUGAL: + { + type = KEYBOARD_MAP_PRT; + } + break; + case NV_OPERATOR_COUNTRY_GREECE: + { + type = KEYBOARD_MAP_GRC; + } + break; + case NV_OPERATOR_COUNTRY_RUSSIA: + { + type = KEYBOARD_MAP_RUS; + } + break; + case NV_OPERATOR_COUNTRY_FINLAND: // nordic + { + type = KEYBOARD_MAP_NOR; + } + break; + case NV_OPERATOR_COUNTRY_SINGAPORE: + { + type = KEYBOARD_MAP_SGP; + } + break; + case NV_OPERATOR_COUNTRY_THAILAND: + { + type = KEYBOARD_MAP_THA; + } + break; + case NV_OPERATOR_COUNTRY_VIETNAM: // L2 singapore + { + type = KEYBOARD_MAP_VNM; + } + break; + case NV_OPERATOR_COUNTRY_SOUTHAFRICA: + { + type = KEYBOARD_MAP_ZAF; + } + break; + case NV_OPERATOR_COUNTRY_PAKISTAN: + { + type = KEYBOARD_MAP_PAK; + } + break; + case NV_OPERATOR_COUNTRY_IRAN: + { + type = KEYBOARD_MAP_IRN; + } + break; + case NV_OPERATOR_COUNTRY_ARAB: + { + type = KEYBOARD_MAP_ARB; + } + break; + case NV_OPERATOR_COUNTRY_CHINA: + { + type = KEYBOARD_MAP_CHN; + } + break; + default: + { + type = KEYBOARD_MAP_EUR; + } + break; + } +#endif + } + else + { + // if NOT QWERTY load default keyboardmap + type = KEYBOARD_MAP_NONE; + } + return type; + +CATCH: + return KEYBOARD_MAP_NONE; +} +*/ + +result +LoadKeyboardMap(void) +{ +/* + KeyboardMapType type = GetKeyboardMapType(); + switch (type) + { + case KEYBOARD_MAP_NONE: + { + gKeyboardMap = gKeyboardMapNONE; + gKeyBoardTypeName = (wchar_t*) KEYBOARD_MAP_NONE_NAME; + } + break; + case KEYBOARD_MAP_GLB: + { + gKeyboardMap = gKeyboardMapGLB; + gKeyBoardTypeName = (wchar_t*) KEYBOARD_MAP_GLB_NAME; + + } + break; + case KEYBOARD_MAP_EUR: + { + gKeyboardMap = gKeyboardMapEUR; + gKeyBoardTypeName = (wchar_t*) KEYBOARD_MAP_EUR_NAME; + } + break; + case KEYBOARD_MAP_ARB: + { + gKeyboardMap = gKeyboardMapARB; + gKeyBoardTypeName = (wchar_t*) KEYBOARD_MAP_ARB_NAME; + } + break; + case KEYBOARD_MAP_CHN: + { + gKeyboardMap = gKeyboardMapCHN; + gKeyBoardTypeName = (wchar_t*) KEYBOARD_MAP_CHN_NAME; + } + break; + case KEYBOARD_MAP_ESP: + { + gKeyboardMap = gKeyboardMapESP; + gKeyBoardTypeName = (wchar_t*) KEYBOARD_MAP_ESP_NAME; + } + break; + case KEYBOARD_MAP_DEU: + { + gKeyboardMap = gKeyboardMapDEU; + gKeyBoardTypeName = (wchar_t*) KEYBOARD_MAP_DEU_NAME; + } + break; + case KEYBOARD_MAP_FRA: + { + gKeyboardMap = gKeyboardMapFRA; + gKeyBoardTypeName = (wchar_t*) KEYBOARD_MAP_FRA_NAME; + + } + break; + case KEYBOARD_MAP_ZAF: + { + gKeyboardMap = gKeyboardMapZAF; + gKeyBoardTypeName = (wchar_t*) KEYBOARD_MAP_FRA_NAME; + + } + break; + case KEYBOARD_MAP_GRC: + { + gKeyboardMap = gKeyboardMapGRC; + gKeyBoardTypeName = (wchar_t*) KEYBOARD_MAP_GRC_NAME; + } + break; + case KEYBOARD_MAP_IRN: + { + gKeyboardMap = gKeyboardMapIRN; + gKeyBoardTypeName = (wchar_t*) KEYBOARD_MAP_IRN_NAME; + } + break; + case KEYBOARD_MAP_ITA: + { + gKeyboardMap = gKeyboardMapEUR_2; + gKeyBoardTypeName = (wchar_t*) KEYBOARD_MAP_ITA_NAME; + } + break; + case KEYBOARD_MAP_PRT: + { + gKeyboardMap = gKeyboardMapEUR_2; + gKeyBoardTypeName = (wchar_t*) KEYBOARD_MAP_PRT_NAME; + } + break; + case KEYBOARD_MAP_NOR: + { + gKeyboardMap = gKeyboardMapNOR; + gKeyBoardTypeName = (wchar_t*) KEYBOARD_MAP_NOR_NAME; + } + break; + case KEYBOARD_MAP_PAK: + { + gKeyboardMap = gKeyboardMapPAK; + gKeyBoardTypeName = (wchar_t*) KEYBOARD_MAP_PAK_NAME; + } + break; + case KEYBOARD_MAP_RUS: + { + gKeyboardMap = gKeyboardMapRUS; + gKeyBoardTypeName = (wchar_t*) KEYBOARD_MAP_RUS_NAME; + } + break; + case KEYBOARD_MAP_SGP: + { + gKeyboardMap = gKeyboardMapGLB; + gKeyBoardTypeName = (wchar_t*) KEYBOARD_MAP_SGP_NAME; + } + break; + case KEYBOARD_MAP_THA: + { + gKeyboardMap = gKeyboardMapTHA; + gKeyBoardTypeName = (wchar_t*) KEYBOARD_MAP_THA_NAME; + } + break; + case KEYBOARD_MAP_VNM: + { + gKeyboardMap = gKeyboardMapVNM; + gKeyBoardTypeName = (wchar_t*) KEYBOARD_MAP_VNM_NAME; + } + break; + default: + { + gKeyboardMap = gKeyboardMapNONE; + gKeyBoardTypeName = (wchar_t*) KEYBOARD_MAP_NONE_NAME; + } + break; + } + return (E_SUCCESS); +*/ + return E_SUCCESS; +} + +}} // Tizen::Ui diff --git a/src/ui/FUiLayout.cpp b/src/ui/FUiLayout.cpp new file mode 100644 index 0000000..1b486ce --- /dev/null +++ b/src/ui/FUiLayout.cpp @@ -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 FUiLayout.cpp + * @brief This is the implementation file for Layout class. + * + * This file contains the implementation of Layout class. + */ + +#include +#include +#include +#include "FUi_LayoutImpl.h" + +namespace Tizen { namespace Ui +{ + +Layout::Layout(void) +{ + LayoutImplHolder* pHolder = new (std::nothrow) LayoutImplHolder(); + SysAssert(pHolder != null); + _pImpl = pHolder; +} + +Layout::~Layout(void) +{ + LayoutImplHolder* pHolder = static_cast (_pImpl); + SysAssert(pHolder != null); + + delete pHolder; + _pImpl = null; +} + +result +Layout::Update(void) +{ + LayoutImplHolder* pHolder = static_cast (_pImpl); + SysAssert(pHolder != null); + + _LayoutImpl* pImpl = pHolder->layoutImpl.Get(); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->UpdateLayout(); +} + +}} // Tizen::Ui diff --git a/src/ui/FUiRelativeLayout.cpp b/src/ui/FUiRelativeLayout.cpp new file mode 100644 index 0000000..ca070dc --- /dev/null +++ b/src/ui/FUiRelativeLayout.cpp @@ -0,0 +1,294 @@ +// +// 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 FUiRelativeLayout.cpp + * @brief This is the implementation file for RelativeLayout class. + * + * This file contains the implementation of RelativeLayout class. + */ + +#include +#include +#include "FUi_RelativeLayoutImpl.h" +#include "FUi_CoordinateSystemUtils.h" + +namespace Tizen { namespace Ui +{ + +RelativeLayout::RelativeLayout() +{ +} + +RelativeLayout::~RelativeLayout() +{ +} + +result +RelativeLayout::Construct(void) +{ + ClearLastResult(); + + _RelativeLayoutImpl* pRelativeLayoutImpl = _RelativeLayoutImpl::GetInstance(*this); + SysAssertf(pRelativeLayoutImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pRelativeLayoutImpl = _RelativeLayoutImpl::CreateRelativeLayoutImplN(this); + result r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _LayoutImpl::SetLayoutImpl(this, pRelativeLayoutImpl); + + return E_SUCCESS; +} + +Tizen::Ui::LayoutType +RelativeLayout::GetLayoutType(void) const +{ + return LAYOUT_RELATIVE; +} + +result +RelativeLayout::SetRelation(Control& childControl, const Control& targetControl, RectangleEdgeRelation edgeRelation) +{ + ClearLastResult(); + + _RelativeLayoutImpl* pRelativeLayoutImpl = _RelativeLayoutImpl::GetInstance(*this); + SysAssertf(pRelativeLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(childControl); + SysTryReturn(NID_UI, pControlImpl, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This instance is not constructed."); + + _ControlImpl* pTargetControlImpl = const_cast<_ControlImpl*>(_ControlImpl::GetInstance(targetControl)); + SysTryReturn(NID_UI, pTargetControlImpl, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This instance is not constructed."); + + result r = pRelativeLayoutImpl->SetRelation(*pControlImpl, *pTargetControlImpl, edgeRelation); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +RelativeLayout::SetRelation(Control& childControl, Control* pTargetControl, RectangleEdgeRelation edgeRelation) +{ + ClearLastResult(); + + _RelativeLayoutImpl* pRelativeLayoutImpl = _RelativeLayoutImpl::GetInstance(*this); + SysAssertf(pRelativeLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(childControl); + SysTryReturn(NID_UI, pControlImpl, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This instance is not constructed."); + + _ControlImpl* pTargetControlImpl = _ControlImpl::GetInstance(*pTargetControl); + SysTryReturn(NID_UI, pTargetControlImpl, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This instance is not constructed."); + + result r = pRelativeLayoutImpl->SetRelation(*pControlImpl, *pTargetControlImpl, edgeRelation); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +RelativeLayout::ResetRelation(Control& childControl, RectangleEdgeType edgeType) +{ + ClearLastResult(); + + _RelativeLayoutImpl* pRelativeLayoutImpl = _RelativeLayoutImpl::GetInstance(*this); + SysAssertf(pRelativeLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(childControl); + SysTryReturn(NID_UI, pControlImpl, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This instance is not constructed."); + + result r = pRelativeLayoutImpl->ResetRelation(*pControlImpl, edgeType); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +RelativeLayout::SetCenterAligned(Control& childControl, CenterAlignmentType alignment) +{ + ClearLastResult(); + + _RelativeLayoutImpl* pRelativeLayoutImpl = _RelativeLayoutImpl::GetInstance(*this); + SysAssertf(pRelativeLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(childControl); + SysTryReturn(NID_UI, pControlImpl, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This instance is not constructed."); + + result r = pRelativeLayoutImpl->SetCenterAligned(*pControlImpl, alignment); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +RelativeLayout::ResetCenterAligned(Control& childControl, CenterAlignmentType alignment) +{ + ClearLastResult(); + + _RelativeLayoutImpl* pRelativeLayoutImpl = _RelativeLayoutImpl::GetInstance(*this); + SysAssertf(pRelativeLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(childControl); + SysTryReturn(NID_UI, pControlImpl, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This instance is not constructed."); + + result r = pRelativeLayoutImpl->ResetCenterAligned(*pControlImpl, alignment); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +RelativeLayout::SetMargin(Control& childControl, int left, int right, int top, int bottom) +{ + ClearLastResult(); + + _RelativeLayoutImpl* pRelativeLayoutImpl = _RelativeLayoutImpl::GetInstance(*this); + SysAssertf(pRelativeLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(childControl); + SysTryReturn(NID_UI, pControlImpl, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This instance is not constructed."); + + float floatLeft = _CoordinateSystemUtils::ConvertToFloat(left); + float floatRight = _CoordinateSystemUtils::ConvertToFloat(right); + float floatTop = _CoordinateSystemUtils::ConvertToFloat(top); + float floatBottom = _CoordinateSystemUtils::ConvertToFloat(bottom); + result r = pRelativeLayoutImpl->SetItemMargin(*pControlImpl, floatLeft, floatRight, floatTop, floatBottom); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +RelativeLayout::SetMargin(Control& childControl, float left, float right, float top, float bottom) +{ + ClearLastResult(); + + _RelativeLayoutImpl* pRelativeLayoutImpl = _RelativeLayoutImpl::GetInstance(*this); + SysAssertf(pRelativeLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(childControl); + SysTryReturn(NID_UI, pControlImpl, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This instance is not constructed."); + + result r = pRelativeLayoutImpl->SetItemMargin(*pControlImpl, left, right, top, bottom); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +RelativeLayout::SetWidth(Control& childControl, int width) +{ + ClearLastResult(); + + _RelativeLayoutImpl* pRelativeLayoutImpl = _RelativeLayoutImpl::GetInstance(*this); + SysAssertf(pRelativeLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(childControl); + SysTryReturn(NID_UI, pControlImpl, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This instance is not constructed."); + + result r = pRelativeLayoutImpl->SetWidth(*pControlImpl, _CoordinateSystemUtils::ConvertToFloat(width)); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +RelativeLayout::SetWidth(Control& childControl, float width) +{ + ClearLastResult(); + + _RelativeLayoutImpl* pRelativeLayoutImpl = _RelativeLayoutImpl::GetInstance(*this); + SysAssertf(pRelativeLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(childControl); + SysTryReturn(NID_UI, pControlImpl, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This instance is not constructed."); + + result r = pRelativeLayoutImpl->SetWidth(*pControlImpl, width); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +RelativeLayout::SetHeight(Control& childControl, int height) +{ + ClearLastResult(); + + _RelativeLayoutImpl* pRelativeLayoutImpl = _RelativeLayoutImpl::GetInstance(*this); + SysAssertf(pRelativeLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(childControl); + SysTryReturn(NID_UI, pControlImpl, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This instance is not constructed."); + + result r = pRelativeLayoutImpl->SetHeight(*pControlImpl, _CoordinateSystemUtils::ConvertToFloat(height)); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +RelativeLayout::SetHeight(Control& childControl, float height) +{ + ClearLastResult(); + + _RelativeLayoutImpl* pRelativeLayoutImpl = _RelativeLayoutImpl::GetInstance(*this); + SysAssertf(pRelativeLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(childControl); + SysTryReturn(NID_UI, pControlImpl, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This instance is not constructed."); + + result r = pRelativeLayoutImpl->SetHeight(*pControlImpl, height); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +RelativeLayout::SetHorizontalFitPolicy(Control& childControl, FitPolicy policy) +{ + ClearLastResult(); + + _RelativeLayoutImpl* pRelativeLayoutImpl = _RelativeLayoutImpl::GetInstance(*this); + SysAssertf(pRelativeLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(childControl); + SysTryReturn(NID_UI, pControlImpl, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This instance is not constructed."); + + result r = pRelativeLayoutImpl->SetItemHorizontalFitPolicy(*pControlImpl, policy); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +RelativeLayout::SetVerticalFitPolicy(Control& childControl, FitPolicy policy) +{ + ClearLastResult(); + + _RelativeLayoutImpl* pRelativeLayoutImpl = _RelativeLayoutImpl::GetInstance(*this); + SysAssertf(pRelativeLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(childControl); + SysTryReturn(NID_UI, pControlImpl, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This instance is not constructed."); + + result r = pRelativeLayoutImpl->SetItemVerticalFitPolicy(*pControlImpl, policy); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +}} // Tizen::Ui diff --git a/src/ui/FUiSystemUtil.cpp b/src/ui/FUiSystemUtil.cpp new file mode 100644 index 0000000..2f04190 --- /dev/null +++ b/src/ui/FUiSystemUtil.cpp @@ -0,0 +1,105 @@ +// +// 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. +// + +#include +#include +#include +#include +#include +#include +#include "FSec_AccessController.h" +#include "FApp_AppInfo.h" +#include "FUi_UiKeyEvent.h" + +using namespace Tizen::Security; +using namespace Tizen::Graphics; +using namespace Tizen::Base; + +namespace Tizen { namespace Ui +{ + +SystemUtil::SystemUtil(void) +{ +} + +SystemUtil::~SystemUtil(void) +{ +} + +result +SystemUtil::GenerateKeyEvent(KeyEventType KeyEvent, KeyCode keyCode) +{ + result r = E_SUCCESS; + + const String& packageId = Tizen::App::_AppInfo::GetPackageId(); + + r = _AccessController::CheckSystemPrivilege(packageId, _PRV_INPUTMANAGER); + + SysTryReturn(NID_UI, r == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED, ("[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.")); + + r = _SystemUtilImpl::GenerateKeyEvent(KeyEvent, static_cast(keyCode)); + + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + return r; +} + +result +SystemUtil::GenerateTouchEvent(TouchEventType touchEvent, const Tizen::Graphics::Point& point) +{ + result r = E_SUCCESS; + const String& packageId = Tizen::App::_AppInfo::GetPackageId(); + + r = _AccessController::CheckSystemPrivilege(packageId, _PRV_INPUTMANAGER); + + SysTryReturn(NID_UI, r == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED, ("[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.")); + + r = _SystemUtilImpl::GenerateTouchEvent(touchEvent, point); + + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + return r; +} + +result +SystemUtil::GenerateTouchEvent(TouchEventType touchEvent, const Tizen::Graphics::FloatPoint& point) +{ + result r = E_SUCCESS; + const String& packageId = Tizen::App::_AppInfo::GetPackageId(); + + r = _AccessController::CheckSystemPrivilege(packageId, _PRV_INPUTMANAGER); + + SysTryReturn(NID_UI, r == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED, ("[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.")); + + r = _SystemUtilImpl::GenerateTouchEvent(touchEvent, point); + + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + return r; +} + +Tizen::Graphics::Bitmap* +SystemUtil::CaptureScreenN(void) +{ + result r = E_SUCCESS; + const String& packageId = Tizen::App::_AppInfo::GetPackageId(); + + r = _AccessController::CheckSystemPrivilege(packageId, _PRV_INPUTMANAGER); + + SysTryReturn(NID_UI, r == E_SUCCESS, null, E_PRIVILEGE_DENIED, "[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method."); + + return _SystemUtilImpl::CaptureScreenN(); +} + +}} //Tizen::Ui diff --git a/src/ui/FUiTouch.cpp b/src/ui/FUiTouch.cpp new file mode 100644 index 0000000..e5b0e43 --- /dev/null +++ b/src/ui/FUiTouch.cpp @@ -0,0 +1,253 @@ +// +// 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 FUiTouch.cpp + * @brief This is the implementation file for Touch class + * @version 2.0 + * + * This file contains the implementation of Touch class. + * + */ + +#include +#include +#include +#include +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_TouchManager.h" +#include "FUi_ControlImpl.h" +#include "FUi_TouchEventArg.h" +#include "FUi_UiTouchEvent.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; + +namespace { + +IList* +GetMultiFingerInfoListN(const Control* pControl) +{ + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + SysTryReturn(NID_UI, pTouchManager, null, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + Point controlPos(0, 0); + if (pControl != null) + { + const _ControlImpl* pImpl = _ControlImpl::GetInstance(*pControl); + if (pImpl != null) + { + controlPos.x = pImpl->GetAbsoluteBounds().x; + controlPos.y = pImpl->GetAbsoluteBounds().y; + } + } + + LinkedList* pReturnList = new (std::nothrow) LinkedList; + 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."); + + for (int i = 0; i < pFingerInfoList->GetCount(); i++) + { + _FingerInfo* pFingerInfo = null; + pFingerInfoList->GetAt(i, pFingerInfo); + + if (pFingerInfo == null) + { + continue; + } + + TouchInfo* pTouchInfo = new (std::nothrow) TouchInfo; + 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 ) + { + pTouchInfo->id = pFingerInfo->GetPointId(); + pTouchInfo->position.x = pFingerInfo->GetScreenPoint().x - controlPos.x; + pTouchInfo->position.y = pFingerInfo->GetScreenPoint().y - controlPos.y; + pTouchInfo->status = TOUCH_PRESSED; + + pReturnList->Add(*pTouchInfo); + } + } + + delete pFingerInfoList; + pFingerInfoList = null; + + return pReturnList; + +CATCH: + if (pReturnList) + { + pReturnList->RemoveAll(true); + delete pReturnList; + pReturnList = null; + } + + if (pFingerInfoList) + { + delete pFingerInfoList; + pFingerInfoList = null; + } + + return null; +} +} + +namespace Tizen { namespace Ui +{ + +Touch::Touch(void) +{ +} + +Touch::~Touch(void) +{ +} + +Point +Touch::GetPosition(void) const +{ + Point errorPoint(-1, -1); + + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + SysTryReturn(NID_UI, pTouchManager, errorPoint, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + return _CoordinateSystemUtils::ConvertToInteger(pTouchManager->GetScreenPoint(pTouchManager->GetCurrentPointId())); +} + +Point +Touch::GetPosition(unsigned long id) const +{ + Point errorPoint(-1, -1); + + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + SysTryReturn(NID_UI, pTouchManager, errorPoint, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + return _CoordinateSystemUtils::ConvertToInteger(pTouchManager->GetScreenPoint(id)); +} + +Point +Touch::GetPosition(const Control& control) const +{ + Point errorPoint(-1, -1); + + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + SysTryReturn(NID_UI, pTouchManager, errorPoint, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(control); + if (!pControlImpl) + { + return errorPoint; + } + + Point controlPos(pControlImpl->GetAbsoluteBounds().x, pControlImpl->GetAbsoluteBounds().y); + Point point(pTouchManager->GetScreenPoint(pTouchManager->GetCurrentPointId()).x, pTouchManager->GetScreenPoint(pTouchManager->GetCurrentPointId()).y); + + point.x -= controlPos.x; + point.y -= controlPos.y; + + return point; +} + +Point +Touch::GetPosition(const Control& control, unsigned long id) const +{ + Point errorPoint(-1, -1); + + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + SysTryReturn(NID_UI, pTouchManager, errorPoint, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(control); + if (!pControlImpl) + { + return errorPoint; + } + + Point controlPos(pControlImpl->GetAbsoluteBounds().x, pControlImpl->GetAbsoluteBounds().y); + Point point(pTouchManager->GetScreenPoint(id).x, pTouchManager->GetScreenPoint(id).y); + + point.x -= controlPos.x; + point.y -= controlPos.y; + + return point; +} + +result +Touch::SetMultipointEnabled(const Control& control, bool enable) +{ + _ControlImpl* pControlImpl = const_cast<_ControlImpl*>(_ControlImpl::GetInstance(control)); + SysTryReturnResult(NID_UI, pControlImpl, E_SYSTEM, "System error occurred."); + + pControlImpl->SetMultiTouchEnabled(enable); + + return E_SUCCESS; +} + + +bool +Touch::IsMultipointEnabled(const Control& control) const +{ + const _ControlImpl* pControlImpl = _ControlImpl::GetInstance(control); + SysTryReturn(NID_UI, pControlImpl, false, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + return pControlImpl->IsMultiTouchEnabled(); +} + + +TouchStatus +Touch::GetTouchStatus(unsigned long id) const +{ + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + SysTryReturn(NID_UI, pTouchManager, TOUCH_PRESSED, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + return pTouchManager->GetTouchStatus(id); +} + +IList* +Touch::GetTouchInfoListN(void) const +{ + return GetMultiFingerInfoListN(null); +} + +IList* +Touch::GetTouchInfoListN(const Control& control) const +{ + return GetMultiFingerInfoListN(&control); +} + +int +Touch::GetPointCount(void) const +{ + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + SysTryReturn(NID_UI, pTouchManager, 0, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + return pTouchManager->GetPointCount(); +} + +unsigned long +Touch::GetPointId(int index) const +{ + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + SysTryReturn(NID_UI, pTouchManager, 0, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + return pTouchManager->GetPointId(index); +} + +} } // Tizen::Ui diff --git a/src/ui/FUiTouchEffect.cpp b/src/ui/FUiTouchEffect.cpp new file mode 100644 index 0000000..f1d3d89 --- /dev/null +++ b/src/ui/FUiTouchEffect.cpp @@ -0,0 +1,82 @@ +// +// Open Service Platform +// Copyright (c) 2012 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 FUiTouchEffect.cpp + * @brief This is the implementation for TouchEffect class. + * + * This file contains definitions of %TouchEffect class. + */ + +#include +#include +#include +#include +#include + +namespace Tizen { namespace Ui +{ + +TouchEffect::TouchEffect(void) + : __pTouchEffectImpl(null) +{ +} + +TouchEffect::~TouchEffect(void) +{ + delete __pTouchEffectImpl; +} + +result +TouchEffect::Construct(void) +{ + result r = E_SUCCESS; + + SysAssertf(__pTouchEffectImpl == null, "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class."); + + __pTouchEffectImpl = new (std::nothrow) _TouchEffectImpl; + + r = __pTouchEffectImpl->Construct(); + SysTryCatch(NID_UI, !IsFailed(r), , r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; + +CATCH: + delete __pTouchEffectImpl; + __pTouchEffectImpl = null; + + return r; +} + +result +TouchEffect::Play(TouchEffectType type) +{ + result r = E_SUCCESS; + + SysAssertf(__pTouchEffectImpl != null, + "Not yet constructed. Construct() should be called before use."); + + SysTryReturn(NID_UI, (type >= TOUCH_EFFECT_TAP && type <= TOUCH_EFFECT_NO_SOUND), + E_INVALID_ARG, E_INVALID_ARG,"[E_INVALID_ARG] The specified Effect type is invalid."); + + r = __pTouchEffectImpl->Play(type); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] A system error has occurred.", GetErrorMessage(r)); + + return r; +} + +} } // Tizen::Ui diff --git a/src/ui/FUiTouchEventInfo.cpp b/src/ui/FUiTouchEventInfo.cpp new file mode 100644 index 0000000..53a18ed --- /dev/null +++ b/src/ui/FUiTouchEventInfo.cpp @@ -0,0 +1,162 @@ +// +// 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 FUiTouchEventInfo.cpp + * @brief This is the implementation file for TouchEventInfo class + * @version 2.0 + * + * This file contains the implementation of TouchEventInfo class. + * + */ + +#include +#include +#include "FUi_TouchEventInfoImpl.h" +#include "FUi_TouchEventArg.h" +#include "FUi_TouchManager.h" +#include "FUi_CoordinateSystemUtils.h" + +using namespace Tizen::Base::Runtime; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui +{ + +TouchEventInfo::TouchEventInfo(void) + : __pTouchEventInfoImpl(null) +{ +} + +TouchEventInfo::~TouchEventInfo(void) +{ + delete __pTouchEventInfoImpl; + __pTouchEventInfoImpl = null; +} + +result +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, "pTouchArg is invalid."); + + _TouchEventInfoImpl* pImpl = _TouchEventInfoImpl::CreateInstanceN(this); + result r = GetLastResult(); + SysTryReturn(NID_UI, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pTouchEventInfoImpl = pImpl; + + _TouchInfo touchInfo(pTouchArg->GetPointId(), pTouchArg->GetTouchStatus(), pTouchArg->GetCurrentPosition(), pTouchArg->IsFlicked(), 0); + Point startPosition = _CoordinateSystemUtils::ConvertToInteger(pTouchArg->GetStartPosition()); + + __pTouchEventInfoImpl->SetTouchEventInfo(touchInfo, startPosition); + + return E_SUCCESS; +} + +unsigned long +TouchEventInfo::GetPointId(void) const +{ + SysAssertf(__pTouchEventInfoImpl != null, "Not yet constructed. Construct() should be called before used."); + + return __pTouchEventInfoImpl->GetPointId(); +} + + +Point +TouchEventInfo::GetStartPosition(void) const +{ + SysAssertf(__pTouchEventInfoImpl != null, "Not yet constructed. Construct() should be called before used."); + + return __pTouchEventInfoImpl->GetStartPosition(); +} + +FloatPoint +TouchEventInfo::GetStartPositionF(void) const +{ + SysAssertf(__pTouchEventInfoImpl != null, "Not yet constructed. Construct() should be called before used."); + + return __pTouchEventInfoImpl->GetStartPositionF(); +} + +Point +TouchEventInfo::GetCurrentPosition(void) const +{ + SysAssertf(__pTouchEventInfoImpl != null, "Not yet constructed. Construct() should be called before used."); + + return __pTouchEventInfoImpl->GetCurrentPosition(); +} + +FloatPoint +TouchEventInfo::GetCurrentPositionF(void) const +{ + SysAssertf(__pTouchEventInfoImpl != null, "Not yet constructed. Construct() should be called before used."); + + return __pTouchEventInfoImpl->GetCurrentPositionF(); +} + + +TouchStatus +TouchEventInfo::GetTouchStatus(void) const +{ + SysAssertf(__pTouchEventInfoImpl != null, "Not yet constructed. Construct() should be called before used."); + + TouchStatus status = TOUCH_PRESSED; + + switch (__pTouchEventInfoImpl->GetTouchStatus()) + { + case _TOUCH_PRESSED: + status = TOUCH_PRESSED; + break; + case _TOUCH_LONG_PRESSED: + status = TOUCH_LONG_PRESSED; + break; + case _TOUCH_RELEASED: + status = TOUCH_RELEASED; + break; + case _TOUCH_MOVED: + status = TOUCH_MOVED; + break; + case _TOUCH_DOUBLE_PRESSED: + status = TOUCH_DOUBLE_PRESSED; + break; + case _TOUCH_FOCUS_IN: + status = TOUCH_FOCUS_IN; + break; + case _TOUCH_FOCUS_OUT: + status = TOUCH_FOCUS_OUT; + break; + case _TOUCH_CANCELED: + status = TOUCH_CANCELED; + break; + default: + break; + } + + return status; +} + +bool +TouchEventInfo::IsFlicked(void) const +{ + SysAssertf(__pTouchEventInfoImpl != null, "Not yet constructed. Construct() should be called before used."); + + return __pTouchEventInfoImpl->IsFlicked(); +} + +}} //Tizen::Ui diff --git a/src/ui/FUiTouchEventManager.cpp b/src/ui/FUiTouchEventManager.cpp new file mode 100644 index 0000000..59b1376 --- /dev/null +++ b/src/ui/FUiTouchEventManager.cpp @@ -0,0 +1,70 @@ +// +// 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 FUiTouchEventManager.cpp + * @brief This is the implementation file for %TouchEventManager class + * @version 2.0 + * + * This file contains the implementation of %TouchEventManager class. + * + */ + +#include +#include +#include +#include "FUi_TouchEventManagerImpl.h" + +using namespace Tizen::Base::Collection; + +namespace Tizen { namespace Ui +{ +namespace { TouchEventManager* __pTouchEventManager = null; } + +TouchEventManager::TouchEventManager(void) + : __pTouchEventManagerImpl(null) +{ + __pTouchEventManagerImpl = new _TouchEventManagerImpl; + SysTryReturnVoidResult(NID_UI, __pTouchEventManagerImpl, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); +} + +TouchEventManager::~TouchEventManager(void) +{ + delete __pTouchEventManagerImpl; + __pTouchEventManagerImpl = null; +} + +TouchEventManager* +TouchEventManager::GetInstance(void) +{ + if (__pTouchEventManager == null) + { + __pTouchEventManager = new TouchEventManager; + SysTryReturn(NID_UI, __pTouchEventManager, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); + } + + return __pTouchEventManager; +} + +IListT* +TouchEventManager::GetTouchInfoListN(void) const +{ + SysAssertf(__pTouchEventManagerImpl, "Not yet constructed. GetInstance() should be called before use."); + + return __pTouchEventManagerImpl->GetTouchInfoListN(); +} + +}} //Tizen::Ui diff --git a/src/ui/FUiTouchFlickGestureDetector.cpp b/src/ui/FUiTouchFlickGestureDetector.cpp new file mode 100644 index 0000000..04d36c4 --- /dev/null +++ b/src/ui/FUiTouchFlickGestureDetector.cpp @@ -0,0 +1,112 @@ +// +// 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 FUiTouchFlickGestureDetector.cpp + * @brief This is the implementation file for %TouchFlickGestureDetector class + * @version 2.0 + * + * This file contains the implementation of %TouchFlickGestureDetector class. + * + */ + +#include +#include +#include "FUi_TouchFlickGestureDetectorImpl.h" + +namespace Tizen { namespace Ui +{ +TouchFlickGestureDetector::TouchFlickGestureDetector(void) +{ +} + +TouchFlickGestureDetector::~TouchFlickGestureDetector(void) +{ +} + +result +TouchFlickGestureDetector::Construct(void) +{ + SysAssertf(__pTouchGestureDetectorImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + _TouchGestureDetectorImpl* pImpl = _TouchFlickGestureDetectorImpl::CreateInstanceN(this); + result r = GetLastResult(); + SysTryReturn(NID_UI, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pTouchGestureDetectorImpl = pImpl; + + return E_SUCCESS; +} + +result +TouchFlickGestureDetector::AddFlickGestureEventListener(ITouchFlickGestureEventListener& listener) +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + result r = __pTouchGestureDetectorImpl->AddGestureEventListener(listener); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +TouchFlickGestureDetector::RemoveFlickGestureEventListener(ITouchFlickGestureEventListener& listener) +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + result r = __pTouchGestureDetectorImpl->RemoveGestureEventListener(listener); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +TouchFlickGestureDetector::GetDistance(int& xDistance, int& yDistance) const +{ + const _TouchFlickGestureDetectorImpl* pTouchFlickGestureDetectorImpl = _TouchFlickGestureDetectorImpl::GetInstance(*this); + SysAssertf(pTouchFlickGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + return pTouchFlickGestureDetectorImpl->GetDistance(xDistance, yDistance); +} + +result +TouchFlickGestureDetector::GetDistance(float& xDistance, float& yDistance) const +{ + const _TouchFlickGestureDetectorImpl* pTouchFlickGestureDetectorImpl = _TouchFlickGestureDetectorImpl::GetInstance(*this); + SysAssertf(pTouchFlickGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + return pTouchFlickGestureDetectorImpl->GetDistance(xDistance, yDistance); +} + +int +TouchFlickGestureDetector::GetDuration(void) const +{ + const _TouchFlickGestureDetectorImpl* pTouchFlickGestureDetectorImpl = _TouchFlickGestureDetectorImpl::GetInstance(*this); + SysAssertf(pTouchFlickGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + return pTouchFlickGestureDetectorImpl->GetDuration(); +} + +FlickDirection +TouchFlickGestureDetector::GetDirection(void) const +{ + const _TouchFlickGestureDetectorImpl* pTouchFlickGestureDetectorImpl = _TouchFlickGestureDetectorImpl::GetInstance(*this); + SysAssertf(pTouchFlickGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + return pTouchFlickGestureDetectorImpl->GetDirection(); +} + +}} //Tizen::Ui diff --git a/src/ui/FUiTouchGestureDetector.cpp b/src/ui/FUiTouchGestureDetector.cpp new file mode 100644 index 0000000..fc6efd8 --- /dev/null +++ b/src/ui/FUiTouchGestureDetector.cpp @@ -0,0 +1,182 @@ +// +// 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 FUiTouchGestureDetector.cpp + * @brief This is the implementation file for TouchGestureDetector class + * @version 2.0 + * + * This file contains the implementation of TouchGestureDetector class. + * + */ + +#include +#include +#include "FUi_TouchGestureDetectorImpl.h" + +namespace Tizen { namespace Ui +{ +TouchGestureDetector::TouchGestureDetector(void) + : __pTouchGestureDetectorImpl(null) +{ + +} + +TouchGestureDetector::~TouchGestureDetector(void) +{ + delete __pTouchGestureDetectorImpl; + __pTouchGestureDetectorImpl = null; +} + +result +TouchGestureDetector::Construct(void) +{ + SysAssertf(__pTouchGestureDetectorImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + _TouchGestureDetectorImpl* pImpl = _TouchGestureDetectorImpl::CreateInstanceN(this); + result r = GetLastResult(); + SysTryReturn(NID_UI, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pTouchGestureDetectorImpl = pImpl; + return r; +} + +result +TouchGestureDetector::AddGestureEventListener(Tizen::Ui::ITouchGestureEventListener& listener) +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + result r = __pTouchGestureDetectorImpl->AddGestureEventListener(listener); + SysTryLog(NID_UI, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +TouchGestureDetector::RemoveGestureEventListener(Tizen::Ui::ITouchGestureEventListener& listener) +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + result r = __pTouchGestureDetectorImpl->RemoveGestureEventListener(listener); + SysTryLog(NID_UI, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +TouchGestureDetector::SetDetectorState(Tizen::Ui::TouchGestureDetectorState state) +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + result r = __pTouchGestureDetectorImpl->SetDetectorState(state); + SysTryLog(NID_UI, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +Tizen::Ui::TouchGestureDetectorState +TouchGestureDetector::GetDetectorState(void) const +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + return __pTouchGestureDetectorImpl->GetDetectorState(); +} + +Control* +TouchGestureDetector::GetControl(void) const +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + return __pTouchGestureDetectorImpl->GetControl(); +} + +result +TouchGestureDetector::SetDelayTouchEventEnabled(bool enable) +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + result r = __pTouchGestureDetectorImpl->SetDelayTouchEventEnabled(enable); + SysTryLog(NID_UI, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +bool +TouchGestureDetector::IsDelayTouchEventEnabled(void) const +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + return __pTouchGestureDetectorImpl->IsDelayTouchEventEnabled(); +} + +result +TouchGestureDetector::SetCancelTouchEventOnSuccessEnabled(bool enable) +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + result r = __pTouchGestureDetectorImpl->SetCancelTouchEventOnSuccessEnabled(enable); + SysTryLog(NID_UI, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +bool +TouchGestureDetector::IsCancelTouchEventOnSuccessEnabled(void) const +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + return __pTouchGestureDetectorImpl->IsCancelTouchEventOnSuccessEnabled(); +} + +result +TouchGestureDetector::StartOnFailureOf(const TouchGestureDetector& gesture) +{ + return StartOnFailureOf(const_cast< TouchGestureDetector* >(&gesture)); +} + +result +TouchGestureDetector::StartOnFailureOf(TouchGestureDetector* pGestureDetector) +{ + SysTryReturnResult(NID_UI, pGestureDetector != null, E_INVALID_ARG, "pGestureDetector is null."); + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + result r = __pTouchGestureDetectorImpl->StartOnFailureOf(*pGestureDetector); + SysTryLog(NID_UI, r == E_SUCCESS, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +void +TouchGestureDetector::OnTouchPressed(Tizen::Ui::Control& source, const Tizen::Ui::TouchEventInfo& touchInfo) +{ +} + +void +TouchGestureDetector::OnTouchMoved(Tizen::Ui::Control& source, const Tizen::Ui::TouchEventInfo& touchInfo) +{ +} + +void +TouchGestureDetector::OnTouchReleased(Tizen::Ui::Control& source, const Tizen::Ui::TouchEventInfo& touchInfo) +{ +} + +void +TouchGestureDetector::OnTouchCanceled(Tizen::Ui::Control& source, const Tizen::Ui::TouchEventInfo& touchInfo) +{ +} + +}} //Tizen::Ui diff --git a/src/ui/FUiTouchLongPressGestureDetector.cpp b/src/ui/FUiTouchLongPressGestureDetector.cpp new file mode 100644 index 0000000..0f3ab07 --- /dev/null +++ b/src/ui/FUiTouchLongPressGestureDetector.cpp @@ -0,0 +1,159 @@ +// +// 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 FUiTouchLongPressGestureDetector.cpp + * @brief This is the implementation file for %TouchLongPressGestureDetector class + * @version 2.0 + * + * This file contains the implementation of %TouchLongPressGestureDetector class. + * + */ + +#include +#include +#include +#include "FUi_TouchLongPressGestureDetectorImpl.h" + +namespace Tizen { namespace Ui +{ +TouchLongPressGestureDetector::TouchLongPressGestureDetector(void) +{ +} + +TouchLongPressGestureDetector::~TouchLongPressGestureDetector(void) +{ +} + +result +TouchLongPressGestureDetector::Construct(void) +{ + SysAssertf(__pTouchGestureDetectorImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + _TouchGestureDetectorImpl* pImpl = _TouchLongPressGestureDetectorImpl::CreateInstanceN(this); + result r = GetLastResult(); + SysTryReturn(NID_UI, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pTouchGestureDetectorImpl = pImpl; + + return E_SUCCESS; +} + +result +TouchLongPressGestureDetector::AddLongPressGestureEventListener(ITouchLongPressGestureEventListener& listener) +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + return __pTouchGestureDetectorImpl->AddGestureEventListener(listener); +} + +result +TouchLongPressGestureDetector::RemoveLongPressGestureEventListener(ITouchLongPressGestureEventListener& listener) +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + return __pTouchGestureDetectorImpl->RemoveGestureEventListener(listener); +} + +result +TouchLongPressGestureDetector::SetDuration(int duration) +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + _TouchLongPressGestureDetectorImpl* pTouchLongPressGestureDetectorImpl = _TouchLongPressGestureDetectorImpl::GetInstance(*this); + SysAssertf(pTouchLongPressGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + return pTouchLongPressGestureDetectorImpl->SetDuration(duration); +} + +int +TouchLongPressGestureDetector::GetDuration(void) const +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + const _TouchLongPressGestureDetectorImpl* pTouchLongPressGestureDetectorImpl = _TouchLongPressGestureDetectorImpl::GetInstance(*this); + SysAssertf(pTouchLongPressGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + return pTouchLongPressGestureDetectorImpl->GetDuration(); +} + +result +TouchLongPressGestureDetector::SetMoveAllowance(int allowance) +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + _TouchLongPressGestureDetectorImpl* pTouchLongPressGestureDetectorImpl = _TouchLongPressGestureDetectorImpl::GetInstance(*this); + SysAssertf(pTouchLongPressGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + return pTouchLongPressGestureDetectorImpl->SetMoveAllowance(allowance); +} + +result +TouchLongPressGestureDetector::SetMoveAllowance(float allowance) +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + _TouchLongPressGestureDetectorImpl* pTouchLongPressGestureDetectorImpl = _TouchLongPressGestureDetectorImpl::GetInstance(*this); + SysAssertf(pTouchLongPressGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + return pTouchLongPressGestureDetectorImpl->SetMoveAllowance(allowance); +} + +int +TouchLongPressGestureDetector::GetMoveAllowance(void) const +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + const _TouchLongPressGestureDetectorImpl* pTouchLongPressGestureDetectorImpl = _TouchLongPressGestureDetectorImpl::GetInstance(*this); + SysAssertf(pTouchLongPressGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + return pTouchLongPressGestureDetectorImpl->GetMoveAllowance(); +} + +float +TouchLongPressGestureDetector::GetMoveAllowanceF(void) const +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + const _TouchLongPressGestureDetectorImpl* pTouchLongPressGestureDetectorImpl = _TouchLongPressGestureDetectorImpl::GetInstance(*this); + SysAssertf(pTouchLongPressGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + return pTouchLongPressGestureDetectorImpl->GetMoveAllowanceF(); +} + +result +TouchLongPressGestureDetector::SetTouchCount(int count) +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + _TouchLongPressGestureDetectorImpl* pTouchLongPressGestureDetectorImpl = _TouchLongPressGestureDetectorImpl::GetInstance(*this); + SysAssertf(pTouchLongPressGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + return pTouchLongPressGestureDetectorImpl->SetTouchCount(count); +} + +int +TouchLongPressGestureDetector::GetTouchCount(void) const +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + const _TouchLongPressGestureDetectorImpl* pTouchLongPressGestureDetectorImpl = _TouchLongPressGestureDetectorImpl::GetInstance(*this); + SysAssertf(pTouchLongPressGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + return pTouchLongPressGestureDetectorImpl->GetTouchCount(); +} + +}} // Tizen::Ui diff --git a/src/ui/FUiTouchPanningGestureDetector.cpp b/src/ui/FUiTouchPanningGestureDetector.cpp new file mode 100644 index 0000000..7c26644 --- /dev/null +++ b/src/ui/FUiTouchPanningGestureDetector.cpp @@ -0,0 +1,105 @@ +// +// 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 FUiTouchPanningGestureDetector.cpp + * @brief This is the implementation file for %TouchPanningGestureDetector class + * @version 2.0 + * + * This file contains the implementation of %TouchPanningGestureDetector class. + * + */ + +#include +#include +#include "FUi_TouchPanningGestureDetectorImpl.h" + +using namespace Tizen::Base::Collection; + +namespace Tizen { namespace Ui +{ +TouchPanningGestureDetector::TouchPanningGestureDetector(void) +{ +} + +TouchPanningGestureDetector::~TouchPanningGestureDetector(void) +{ +} + +result +TouchPanningGestureDetector::Construct(void) +{ + SysAssertf(__pTouchGestureDetectorImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + _TouchGestureDetectorImpl* pImpl = _TouchPanningGestureDetectorImpl::CreateInstanceN(this); + result r = GetLastResult(); + SysTryReturn(NID_UI, pImpl, r, r, "[%s] Propagatin.", GetErrorMessage(r)); + + __pTouchGestureDetectorImpl = pImpl; + + return E_SUCCESS; +} + +result +TouchPanningGestureDetector::AddPanningGestureEventListener(ITouchPanningGestureEventListener& listener) +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + return __pTouchGestureDetectorImpl->AddGestureEventListener(listener); +} + +result +TouchPanningGestureDetector::RemovePanningGestureEventListener(ITouchPanningGestureEventListener& listener) +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + return __pTouchGestureDetectorImpl->RemoveGestureEventListener(listener); +} + +IList* +TouchPanningGestureDetector::GetTouchInfoListN(void) const +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + const _TouchPanningGestureDetectorImpl* pTouchPanningGestureDetectorImpl = _TouchPanningGestureDetectorImpl::GetInstance(*this); + SysAssertf(pTouchPanningGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + return pTouchPanningGestureDetectorImpl->GetTouchInfoListN(); +} + +result +TouchPanningGestureDetector::SetTouchCount(int count) +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + _TouchPanningGestureDetectorImpl* pTouchPanningGestureDetectorImpl = _TouchPanningGestureDetectorImpl::GetInstance(*this); + SysAssertf(pTouchPanningGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + return pTouchPanningGestureDetectorImpl->SetTouchCount(count); +} + +int +TouchPanningGestureDetector::GetTouchCount(void) const +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + const _TouchPanningGestureDetectorImpl* pTouchPanningGestureDetectorImpl = _TouchPanningGestureDetectorImpl::GetInstance(*this); + SysAssertf(pTouchPanningGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + return pTouchPanningGestureDetectorImpl->GetTouchCount(); +} + +}} //Tizen::Ui diff --git a/src/ui/FUiTouchPinchGestureDetector.cpp b/src/ui/FUiTouchPinchGestureDetector.cpp new file mode 100644 index 0000000..608e897 --- /dev/null +++ b/src/ui/FUiTouchPinchGestureDetector.cpp @@ -0,0 +1,114 @@ +// +// 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 FUiTouchPinchGestureDetector.cpp + * @brief This is the implementation file for %TouchPinchGestureDetector class + * @version 2.0 + * + * This file contains the implementation of %TouchPinchGestureDetector class. + * + */ + +#include +#include +#include "FUi_TouchPinchGestureDetectorImpl.h" + +namespace Tizen { namespace Ui +{ +TouchPinchGestureDetector::TouchPinchGestureDetector(void) +{ +} + +TouchPinchGestureDetector::~TouchPinchGestureDetector(void) +{ +} + +result +TouchPinchGestureDetector::Construct(void) +{ + SysAssertf(__pTouchGestureDetectorImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + _TouchGestureDetectorImpl* pImpl = _TouchPinchGestureDetectorImpl::CreateInstanceN(this); + result r = GetLastResult(); + SysTryReturn(NID_UI, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pTouchGestureDetectorImpl = pImpl; + + return E_SUCCESS; +} + +result +TouchPinchGestureDetector::AddPinchGestureEventListener(ITouchPinchGestureEventListener& listener) +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + return __pTouchGestureDetectorImpl->AddGestureEventListener(listener); +} + +result +TouchPinchGestureDetector::RemovePinchGestureEventListener(ITouchPinchGestureEventListener& listener) +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + return __pTouchGestureDetectorImpl->RemoveGestureEventListener(listener); +} + +Tizen::Graphics::Point +TouchPinchGestureDetector::GetCenterPoint(void) const +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + const _TouchPinchGestureDetectorImpl* pTouchPinchGestureDetectorImpl = _TouchPinchGestureDetectorImpl::GetInstance(*this); + SysAssertf(pTouchPinchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + return pTouchPinchGestureDetectorImpl->GetCenterPoint(); +} + +Tizen::Graphics::FloatPoint +TouchPinchGestureDetector::GetCenterPointF(void) const +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + const _TouchPinchGestureDetectorImpl* pTouchPinchGestureDetectorImpl = _TouchPinchGestureDetectorImpl::GetInstance(*this); + SysAssertf(pTouchPinchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + return pTouchPinchGestureDetectorImpl->GetCenterPointF(); +} + +int +TouchPinchGestureDetector::GetScale(void) const +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + const _TouchPinchGestureDetectorImpl* pTouchPinchGestureDetectorImpl = _TouchPinchGestureDetectorImpl::GetInstance(*this); + SysAssertf(pTouchPinchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + return pTouchPinchGestureDetectorImpl->GetScale(); +} + +float +TouchPinchGestureDetector::GetScaleF(void) const +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + const _TouchPinchGestureDetectorImpl* pTouchPinchGestureDetectorImpl = _TouchPinchGestureDetectorImpl::GetInstance(*this); + SysAssertf(pTouchPinchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + return pTouchPinchGestureDetectorImpl->GetScaleF(); +} + +} } //Tizen::Ui diff --git a/src/ui/FUiTouchRotationGestureDetector.cpp b/src/ui/FUiTouchRotationGestureDetector.cpp new file mode 100644 index 0000000..a695e98 --- /dev/null +++ b/src/ui/FUiTouchRotationGestureDetector.cpp @@ -0,0 +1,108 @@ +// +// 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 FUiTouchRotationGestureDetector.cpp + * @brief This is the implementation file for %TouchRotationGestureDetector class + * @version 2.0 + * + * This file contains the implementation of %TouchRotationGestureDetector class. + * + */ + +#include +#include +#include "FUi_TouchRotationGestureDetectorImpl.h" + +namespace Tizen { namespace Ui +{ +TouchRotationGestureDetector::TouchRotationGestureDetector(void) +{ +} + +TouchRotationGestureDetector::~TouchRotationGestureDetector(void) +{ +} + +result +TouchRotationGestureDetector::Construct(void) +{ + SysAssertf(__pTouchGestureDetectorImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + _TouchGestureDetectorImpl* pImpl = _TouchRotationGestureDetectorImpl::CreateInstanceN(this); + result r = GetLastResult(); + SysTryReturn(NID_UI, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pTouchGestureDetectorImpl = pImpl; + + return E_SUCCESS; +} + +result +TouchRotationGestureDetector::AddRotationGestureEventListener(ITouchRotationGestureEventListener& listener) +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + result r = __pTouchGestureDetectorImpl->AddGestureEventListener(listener); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +result +TouchRotationGestureDetector::RemoveRotationGestureEventListener(ITouchRotationGestureEventListener& listener) +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + result r = __pTouchGestureDetectorImpl->RemoveGestureEventListener(listener); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return E_SUCCESS; +} + +float +TouchRotationGestureDetector::GetAngle(void) const +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + const _TouchRotationGestureDetectorImpl* pRotationGestureDetectorImpl = _TouchRotationGestureDetectorImpl::GetInstance(*this); + SysAssertf(pRotationGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + return pRotationGestureDetectorImpl->GetAngle(); +} + +int +TouchRotationGestureDetector::GetDistance(void) const +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + const _TouchRotationGestureDetectorImpl* pRotationGestureDetectorImpl = _TouchRotationGestureDetectorImpl::GetInstance(*this); + SysAssertf(pRotationGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + return pRotationGestureDetectorImpl->GetDistance(); +} + +float +TouchRotationGestureDetector::GetDistanceF(void) const +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + const _TouchRotationGestureDetectorImpl* pRotationGestureDetectorImpl = _TouchRotationGestureDetectorImpl::GetInstance(*this); + SysAssertf(pRotationGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + return pRotationGestureDetectorImpl->GetDistanceF(); +} +}} //Tizen::Ui diff --git a/src/ui/FUiTouchTapGestureDetector.cpp b/src/ui/FUiTouchTapGestureDetector.cpp new file mode 100644 index 0000000..3ff29c4 --- /dev/null +++ b/src/ui/FUiTouchTapGestureDetector.cpp @@ -0,0 +1,180 @@ +// +// 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 FUiTouchTapGestureDetector.cpp + * @brief This is the implementation file for %TouchTapGestureDetector class + * @version 2.0 + * + * This file contains the implementation of %TouchTapGestureDetector class. + * + */ + +#include +#include +#include "FUi_TouchTapGestureDetectorImpl.h" + +namespace Tizen { namespace Ui +{ +TouchTapGestureDetector::TouchTapGestureDetector(void) +{ +} + +TouchTapGestureDetector::~TouchTapGestureDetector(void) +{ +} + +result +TouchTapGestureDetector::Construct(void) +{ + SysAssertf(__pTouchGestureDetectorImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + _TouchGestureDetectorImpl* pImpl = _TouchTapGestureDetectorImpl::CreateInstanceN(this); + result r = GetLastResult(); + SysTryReturn(NID_UI, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pTouchGestureDetectorImpl = pImpl; + + return E_SUCCESS; +} + +result +TouchTapGestureDetector::AddTapGestureEventListener(ITouchTapGestureEventListener& listener) +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + return __pTouchGestureDetectorImpl->AddGestureEventListener(listener); +} + +result +TouchTapGestureDetector::RemoveTapGestureEventListener(ITouchTapGestureEventListener& listener) +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + return __pTouchGestureDetectorImpl->RemoveGestureEventListener(listener); +} + +result +TouchTapGestureDetector::SetTapCount(int count) +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + _TouchTapGestureDetectorImpl* pTouchTapGestureDetectorImpl = _TouchTapGestureDetectorImpl::GetInstance(*this); + SysAssertf(pTouchTapGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + return pTouchTapGestureDetectorImpl->SetTapCount(count); +} + +int +TouchTapGestureDetector::GetTapCount(void) const +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + const _TouchTapGestureDetectorImpl* pTouchTapGestureDetectorImpl = _TouchTapGestureDetectorImpl::GetInstance(*this); + SysAssertf(pTouchTapGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + return pTouchTapGestureDetectorImpl->GetTapCount(); +} + +result +TouchTapGestureDetector::SetTapInterval(int intarval) +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + _TouchTapGestureDetectorImpl* pTouchTapGestureDetectorImpl = _TouchTapGestureDetectorImpl::GetInstance(*this); + SysAssertf(pTouchTapGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + return pTouchTapGestureDetectorImpl->SetTapInterval(intarval); +} + +int +TouchTapGestureDetector::GetTapInterval(void) const +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + const _TouchTapGestureDetectorImpl* pTouchTapGestureDetectorImpl = _TouchTapGestureDetectorImpl::GetInstance(*this); + SysAssertf(pTouchTapGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + return pTouchTapGestureDetectorImpl->GetTapInterval(); +} + +result +TouchTapGestureDetector::SetMoveAllowance(int allowance) +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + _TouchTapGestureDetectorImpl* pTouchTapGestureDetectorImpl = _TouchTapGestureDetectorImpl::GetInstance(*this); + SysAssertf(pTouchTapGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + return pTouchTapGestureDetectorImpl->SetMoveAllowance(allowance); +} + +result +TouchTapGestureDetector::SetMoveAllowance(float allowance) +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + _TouchTapGestureDetectorImpl* pTouchTapGestureDetectorImpl = _TouchTapGestureDetectorImpl::GetInstance(*this); + SysAssertf(pTouchTapGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + return pTouchTapGestureDetectorImpl->SetMoveAllowance(allowance); +} + +int +TouchTapGestureDetector::GetMoveAllowance(void) const +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + const _TouchTapGestureDetectorImpl* pTouchTapGestureDetectorImpl = _TouchTapGestureDetectorImpl::GetInstance(*this); + SysAssertf(pTouchTapGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + return pTouchTapGestureDetectorImpl->GetMoveAllowance(); +} + +float +TouchTapGestureDetector::GetMoveAllowanceF(void) const +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + const _TouchTapGestureDetectorImpl* pTouchTapGestureDetectorImpl = _TouchTapGestureDetectorImpl::GetInstance(*this); + SysAssertf(pTouchTapGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + return pTouchTapGestureDetectorImpl->GetMoveAllowanceF(); +} + +result +TouchTapGestureDetector::SetTouchCount(int count) +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + _TouchTapGestureDetectorImpl* pTouchTapGestureDetectorImpl = _TouchTapGestureDetectorImpl::GetInstance(*this); + SysAssertf(pTouchTapGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + return pTouchTapGestureDetectorImpl->SetTouchCount(count); +} + +int +TouchTapGestureDetector::GetTouchCount(void) const +{ + SysAssertf(__pTouchGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + const _TouchTapGestureDetectorImpl* pTouchTapGestureDetectorImpl = _TouchTapGestureDetectorImpl::GetInstance(*this); + SysAssertf(pTouchTapGestureDetectorImpl != null, "Not yet constructed. Construct() should be called before used."); + + return pTouchTapGestureDetectorImpl->GetTouchCount(); +} + +}} //Tizen::Ui diff --git a/src/ui/FUiUiConfiguration.cpp b/src/ui/FUiUiConfiguration.cpp new file mode 100644 index 0000000..5e0ebe4 --- /dev/null +++ b/src/ui/FUiUiConfiguration.cpp @@ -0,0 +1,595 @@ +// +// 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 FUiUiConfiguration.cpp + * @brief This is the implementation file for the UiConfiguration class. + */ + +#include +#include +#include +#include +#include "FUi_ControlManager.h" +#include "FUi_ResourceConfigTypes.h" +#include "FUi_ResourceManager.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Ui::_Resource; +namespace Tizen { namespace Ui { + +const int ColorKey::Button::BG_NORMAL = _BUTTON::BG_NORMAL_COLOR; +const int ColorKey::Button::BG_DISABLED = _BUTTON::BG_DISABLED_COLOR; +const int ColorKey::Button::BG_PRESSED = _BUTTON::BG_PRESSED_COLOR; +const int ColorKey::Button::BG_HIGHLIGHTED = _BUTTON::BG_HIGHLIGHTED_COLOR; +const int ColorKey::Button::TEXT_NORMAL = _BUTTON::TEXT_NORMAL_COLOR; +const int ColorKey::Button::TEXT_DISABLED = _BUTTON::TEXT_DISABLED_COLOR; +const int ColorKey::Button::TEXT_PRESSED = _BUTTON::TEXT_PRESSED_COLOR; +const int ColorKey::Button::TEXT_HIGHLIGHTED = _BUTTON::TEXT_HIGHLIGHTED_COLOR; +const int ColorKey::CheckButton::BG_NORMAL = _CHECKBUTTON::BG_NORMAL_COLOR; +const int ColorKey::CheckButton::BG_DISABLED = _CHECKBUTTON::BG_DISABLED_COLOR; +const int ColorKey::CheckButton::BG_PRESSED = _CHECKBUTTON::BG_PRESSED_COLOR; +const int ColorKey::CheckButton::BG_HIGHLIGHTED = _CHECKBUTTON::BG_HIGHLIGHTED_COLOR; +const int ColorKey::CheckButton::BG_SELECTED = _CHECKBUTTON::BG_SELECTED_COLOR; +const int ColorKey::CheckButton::TEXT_NORMAL = _CHECKBUTTON::TEXT_NORMAL_COLOR; +const int ColorKey::CheckButton::TEXT_DISABLED = _CHECKBUTTON::TEXT_DISABLED_COLOR; +const int ColorKey::CheckButton::TEXT_PRESSED = _CHECKBUTTON::TEXT_PRESSED_COLOR; +const int ColorKey::CheckButton::TEXT_HIGHLIGHTED = _CHECKBUTTON::TEXT_HIGHLIGHTED_COLOR; +const int ColorKey::CheckButton::TEXT_SELECTED = _CHECKBUTTON::TEXT_SELECTED_COLOR; +const int ColorKey::CheckButton::TITLE_TEXT_NORMAL = _CHECKBUTTON::TITLE_TEXT_NORMAL_COLOR; +const int ColorKey::CheckButton::TITLE_TEXT_DISABLED = _CHECKBUTTON::TITLE_TEXT_DISABLED_COLOR; +const int ColorKey::CheckButton::TITLE_TEXT_PRESSED = _CHECKBUTTON::TITLE_TEXT_PRESSED_COLOR; +const int ColorKey::CheckButton::TITLE_TEXT_HIGHLIGHTED = _CHECKBUTTON::TITLE_TEXT_HIGHLIGHTED_COLOR; +const int ColorKey::CheckButton::TITLE_TEXT_SELECTED = _CHECKBUTTON::TITLE_TEXT_SELECTED_COLOR; +const int ColorKey::CheckButton::DETAILED_ICON_BG_NORMAL = _CHECKBUTTON::DETAILED_ICON_BG_NORMAL_COLOR; +const int ColorKey::CheckButton::DETAILED_ICON_BG_DISABLED = _CHECKBUTTON::DETAILED_ICON_BG_DISABLED_COLOR; +const int ColorKey::CheckButton::DETAILED_ICON_BG_PRESSED = _CHECKBUTTON::DETAILED_ICON_BG_PRESSED_COLOR; +const int ColorKey::CheckButton::DETAILED_ICON_BG_HIGHLIGHTED = _CHECKBUTTON::DETAILED_ICON_BG_HIGHLIGHTED_COLOR; +const int ColorKey::CheckButton::DETAILED_ICON_BG_SELECTED = _CHECKBUTTON::DETAILED_ICON_BG_SELECTED_COLOR; +const int ColorKey::CheckButton::DETAILED_ICON_TEXT_NORMAL = _CHECKBUTTON::DETAILED_ICON_TEXT_NORMAL_COLOR; +const int ColorKey::CheckButton::DETAILED_ICON_TEXT_DISABLED = _CHECKBUTTON::DETAILED_ICON_TEXT_DISABLED_COLOR; +const int ColorKey::CheckButton::DETAILED_ICON_TEXT_PRESSED = _CHECKBUTTON::DETAILED_ICON_TEXT_PRESSED_COLOR; +const int ColorKey::CheckButton::DETAILED_ICON_TEXT_HIGHLIGHTED = _CHECKBUTTON::DETAILED_ICON_TEXT_HIGHLIGHTED_COLOR; +const int ColorKey::CheckButton::DETAILED_ICON_TEXT_SELECTED = _CHECKBUTTON::DETAILED_ICON_TEXT_SELECTED_COLOR; +const int ColorKey::CheckButton::DIVIDER_LINE_LEFT_NORMAL = _CHECKBUTTON::DIVIDER_LINE_LEFT_NORMAL_COLOR; +const int ColorKey::CheckButton::DIVIDER_LINE_RIGHT_NORMAL = _CHECKBUTTON::DIVIDER_LINE_RIGHT_NORMAL_COLOR; +const int ColorKey::ColorPicker::DIVIDER_TOP_HALF =_COLORPICKER::DIVIDER_TOP_HALF_COLOR; +const int ColorKey::ColorPicker::DIVIDER_BOTTOM_HALF =_COLORPICKER::DIVIDER_BOTTOM_HALF_COLOR; +const int ColorKey::ColorPicker::ARROW_BUTTON_BG_NORMAL =_COLORPICKER::ARROW_BUTTON_BG_NORMAL_COLOR; +const int ColorKey::ColorPicker::ARROW_BUTTON_BG_PRESSED =_COLORPICKER::ARROW_BUTTON_BG_PRESSED_COLOR; +const int ColorKey::ColorPicker::ARROW_BUTTON_BG_DISABLED =_COLORPICKER::ARROW_BUTTON_BG_DISABLED_COLOR; +const int ColorKey::ColorPicker::ARROW_BUTTON_NORMAL =_COLORPICKER::ARROW_BUTTON_NORMAL_COLOR; +const int ColorKey::ColorPicker::ARROW_BUTTON_PRESSED =_COLORPICKER::ARROW_BUTTON_PRESSED_COLOR; +const int ColorKey::ColorPicker::ARROW_BUTTON_DISABLED =_COLORPICKER::ARROW_BUTTON_DISABLED_COLOR; +const int ColorKey::ColorPicker::HANDLER_HIGHLIGHTED =_COLORPICKER::HANDLER_HIGHLIGHTED_COLOR; +const int ColorKey::ContextMenu::BG_NORMAL = _CONTEXTMENU::BG_NORMAL_COLOR; +const int ColorKey::ContextMenu::LIST_ITEM_DIVIDER_01_NORMAL = _CONTEXTMENU::LIST_ITEM_DIVIDER_01_NORMAL_COLOR; +const int ColorKey::ContextMenu::LIST_ITEM_DIVIDER_02_NORMAL = _CONTEXTMENU::LIST_ITEM_DIVIDER_02_NORMAL_COLOR; +const int ColorKey::ContextMenu::ITEM_BG_NORMAL = _CONTEXTMENU::ITEM_BG_NORMAL_COLOR; +const int ColorKey::ContextMenu::ITEM_BG_PRESSED = _CONTEXTMENU::ITEM_BG_PRESSED_COLOR; +const int ColorKey::ContextMenu::ITEM_BG_HIGHLIGHTED = _CONTEXTMENU::ITEM_BG_HIGHLIGHTED_COLOR; +const int ColorKey::ContextMenu::ITEM_BG_DISABLED = _CONTEXTMENU::ITEM_BG_DISABLED_COLOR; +const int ColorKey::ContextMenu::GRID_ITEM_DIVIDER_01_NORMAL = _CONTEXTMENU::GRID_ITEM_DIVIDER_01_NORMAL_COLOR; +const int ColorKey::ContextMenu::GRID_ITEM_DIVIDER_02_NORMAL = _CONTEXTMENU::GRID_ITEM_DIVIDER_02_NORMAL_COLOR; +const int ColorKey::ContextMenu::ITEM_TEXT_NORMAL = _CONTEXTMENU::ITEM_TEXT_NORMAL_COLOR; +const int ColorKey::ContextMenu::ITEM_TEXT_PRESSED = _CONTEXTMENU::ITEM_TEXT_PRESSED_COLOR; +const int ColorKey::ContextMenu::ITEM_TEXT_HIGHLIGHTED = _CONTEXTMENU::ITEM_TEXT_HIGHLIGHTED_COLOR; +const int ColorKey::ContextMenu::ITEM_TEXT_DISABLED = _CONTEXTMENU::ITEM_TEXT_DISABLED_COLOR; +const int ColorKey::DateTimeBar::BG_NORMAL = _DATETIMEBAR::BG_NORMAL_COLOR; +const int ColorKey::DateTimeBar::TEXT_NORMAL = _DATETIMEBAR::TEXT_NORMAL_COLOR; +const int ColorKey::DateTimeBar::TEXT_PRESSED = _DATETIMEBAR::TEXT_PRESSED_COLOR; +const int ColorKey::DateTimePicker::BG_NORMAL = _DATETIMEPICKER::BG_NORMAL_COLOR; +const int ColorKey::DateTimePicker::AM_PM_BG_NORMAL = _DATETIMEPICKER::AMPM_BG_NORMAL_COLOR; +const int ColorKey::DateTimePicker::AM_PM_BG_PRESSED = _DATETIMEPICKER::AMPM_BG_PRESSED_COLOR; +const int ColorKey::DateTimePicker::AM_PM_BG_HIGHLIGHTED = _DATETIMEPICKER::AMPM_BG_HIGHLIGHTED_COLOR; +const int ColorKey::DateTimePicker::AM_PM_BG_DISABLED = _DATETIMEPICKER::AMPM_BG_DISABLED_COLOR; +const int ColorKey::DateTimePicker::TEXT_NORMAL = _DATETIMEPICKER::TEXT_NORMAL_COLOR; +const int ColorKey::DateTimePicker::TEXT_PRESSED = _DATETIMEPICKER::TEXT_PRESSED_COLOR; +const int ColorKey::DateTimePicker::TEXT_HIGHLIGHTED = _DATETIMEPICKER::TEXT_HIGHLIGHTED_COLOR; +const int ColorKey::DateTimePicker::TEXT_DISABLED = _DATETIMEPICKER::TEXT_DISABLED_COLOR; +const int ColorKey::DateTimePicker::AM_PM_TEXT_NORMAL = _DATETIMEPICKER::AMPM_TEXT_NORMAL_COLOR; +const int ColorKey::DateTimePicker::AM_PM_TEXT_PRESSED = _DATETIMEPICKER::AMPM_TEXT_PRESSED_COLOR; +const int ColorKey::DateTimePicker::AM_PM_TEXT_HIGHLIGHTED = _DATETIMEPICKER::AMPM_TEXT_HIGHLIGHTED_COLOR; +const int ColorKey::DateTimePicker::AM_PM_TEXT_DISABLED = _DATETIMEPICKER::AMPM_TEXT_DISABLED_COLOR; +const int ColorKey::DateTimePicker::DIVIDER_LEFT_HALF = _DATETIMEPICKER::DIVIDER_LEFT_HALF_COLOR; +const int ColorKey::DateTimePicker::DIVIDER_RIGHT_HALF = _DATETIMEPICKER::DIVIDER_RIGHT_HALF_COLOR; +const int ColorKey::DateTimePicker::CONTENT_BG_NORMAL = _DATETIMEPICKER::CONTENT_BG_NORMAL_COLOR; +const int ColorKey::DateTimePicker::CONTENT_BG_PRESSED = _DATETIMEPICKER::CONTENT_BG_PRESSED_COLOR; +const int ColorKey::DateTimePicker::CONTENT_BG_DISABLED = _DATETIMEPICKER::CONTENT_BG_DISABLED_COLOR; +const int ColorKey::DateTimePicker::CONTENT_BG_HIGHLIGHTED = _DATETIMEPICKER::CONTENT_BG_HIGHLIGHTED_COLOR; +const int ColorKey::DateTimePicker::DISPLAY_BG_NORMAL = _DATETIMEPICKER::DISPLAY_BG_NORMAL_COLOR; +const int ColorKey::DateTimePicker::TITLE_NORMAL = _DATETIMEPICKER::TITLE_NORMAL_COLOR; +const int ColorKey::DateTimePicker::TITLE_DISABLED = _DATETIMEPICKER::TITLE_DISABLED_COLOR; +const int ColorKey::Edit::BG_NORMAL = _EDIT::BG_NORMAL_COLOR; +const int ColorKey::Edit::BG_PRESSED = _EDIT::BG_PRESSED_COLOR; +const int ColorKey::Edit::BG_HIGHLIGHTED = _EDIT::BG_HIGHLIGHTED_COLOR; +const int ColorKey::Edit::BG_DISABLED = _EDIT::BG_DISABLED_COLOR; +const int ColorKey::Edit::TITLE_TEXT_NORMAL = _EDIT::TITLE_TEXT_NORMAL_COLOR; +const int ColorKey::Edit::TITLE_TEXT_PRESSED = _EDIT::TITLE_TEXT_PRESSED_COLOR; +const int ColorKey::Edit::TITLE_TEXT_HIGHLIGHTED = _EDIT::TITLE_TEXT_HIGHLIGHTED_COLOR; +const int ColorKey::Edit::TITLE_TEXT_DISABLED = _EDIT::TITLE_TEXT_DISABLED_COLOR; +const int ColorKey::Edit::TEXT_NORMAL = _EDIT::TEXT_NORMAL_COLOR; +const int ColorKey::Edit::TEXT_PRESSED = _EDIT::TEXT_PRESSED_COLOR; +const int ColorKey::Edit::TEXT_HIGHLIGHTED = _EDIT::TEXT_HIGHLIGHTED_COLOR; +const int ColorKey::Edit::TEXT_DISABLED = _EDIT::TEXT_DISABLED_COLOR; +const int ColorKey::Edit::GUIDE_TEXT_NORMAL = _EDIT::GUIDE_TEXT_NORMAL_COLOR; +const int ColorKey::Edit::CLEAR_ICON_NORMAL = _EDIT::CLEAR_ICON_NORMAL_COLOR; +const int ColorKey::Edit::CLEAR_ICON_PRESSED = _EDIT::CLEAR_ICON_PRESSED_COLOR; +const int ColorKey::Edit::CUT_LINK_TEXT_NORMAL = _EDIT::CUT_LINK_TEXT_NORMAL_COLOR; +const int ColorKey::Edit::CUT_LINK_BG_NORMAL = _EDIT::CUT_LINK_BG_NORMAL_COLOR; +const int ColorKey::Edit::CURSOR_NORMAL = _EDIT::CURSOR_NORMAL_COLOR; +const int ColorKey::EditDate::TEXT_NORMAL = _EDITDATE::TEXT_NORMAL_COLOR; +const int ColorKey::EditDate::TEXT_PRESSED = _EDITDATE::TEXT_PRESSED_COLOR; +const int ColorKey::EditDate::TEXT_DISABLED = _EDITDATE::TEXT_DISABLED_COLOR; +const int ColorKey::EditDate::TEXT_HIGHLIGHTED = _EDITDATE::TEXT_HIGHLIGHTED_COLOR; +const int ColorKey::EditDate::TITLE_TEXT_NORMAL = _EDITDATE::TITLE_TEXT_NORMAL_COLOR; +const int ColorKey::EditDate::TITLE_TEXT_DISABLED = _EDITDATE::TITLE_TEXT_DISABLED_COLOR; +const int ColorKey::EditDate::CONTENT_BG_NORMAL = _EDITDATE::CONTENT_BG_NORMAL_COLOR; +const int ColorKey::EditDate::CONTENT_BG_PRESSED = _EDITDATE::CONTENT_BG_PRESSED_COLOR; +const int ColorKey::EditDate::CONTENT_BG_DISABLED = _EDITDATE::CONTENT_BG_DISABLED_COLOR; +const int ColorKey::EditDate::CONTENT_BG_HIGHLIGHTED = _EDITDATE::CONTENT_BG_HIGHLIGHTED_COLOR; +const int ColorKey::EditTime::BUTTON_BG_NORMAL = _EDITTIME::BUTTON_BG_NORMAL_COLOR; +const int ColorKey::EditTime::BUTTON_BG_PRESSED = _EDITTIME::BUTTON_BG_PRESSED_COLOR; +const int ColorKey::EditTime::BUTTON_BG_DISABLED = _EDITTIME::BUTTON_BG_DISABLED_COLOR; +const int ColorKey::EditTime::BUTTON_TEXT_NORMAL = _EDITTIME::BUTTON_TEXT_NORMAL_COLOR; +const int ColorKey::EditTime::BUTTON_TEXT_PRESSED = _EDITTIME::BUTTON_TEXT_PRESSED_COLOR; +const int ColorKey::EditTime::BUTTON_TEXT_DISABLED = _EDITTIME::BUTTON_TEXT_DISABLED_COLOR; +const int ColorKey::EditTime::BUTTON_TEXT_HIGHLIGHTED = _EDITTIME::BUTTON_TEXT_HIGHLIGHTED_COLOR; +const int ColorKey::EditTime::TEXT_NORMAL = _EDITTIME::TEXT_NORMAL_COLOR; +const int ColorKey::EditTime::TEXT_PRESSED = _EDITTIME::TEXT_PRESSED_COLOR; +const int ColorKey::EditTime::TEXT_DISABLED = _EDITTIME::TEXT_DISABLED_COLOR; +const int ColorKey::EditTime::TEXT_HIGHLIGHTED = _EDITTIME::TEXT_HIGHLIGHTED_COLOR; +const int ColorKey::EditTime::TITLE_TEXT_NORMAL = _EDITTIME::TITLE_TEXT_NORMAL_COLOR; +const int ColorKey::EditTime::TITLE_TEXT_DISABLED = _EDITTIME::TITLE_TEXT_DISABLED_COLOR; +const int ColorKey::EditTime::BUTTON_BG_HIGHLIGHTED = _EDITTIME::BUTTON_BG_HIGHLIGHTED_COLOR; +const int ColorKey::EditTime::CONTENT_BG_NORMAL = _EDITTIME::CONTENT_BG_NORMAL_COLOR; +const int ColorKey::EditTime::CONTENT_BG_PRESSED = _EDITTIME::CONTENT_BG_PRESSED_COLOR; +const int ColorKey::EditTime::CONTENT_BG_DISABLED = _EDITTIME::CONTENT_BG_DISABLED_COLOR; +const int ColorKey::EditTime::CONTENT_BG_HIGHLIGHTED = _EDITTIME::CONTENT_BG_HIGHLIGHTED_COLOR; +const int ColorKey::FastScroll::INDEX_BG_NORMAL = _FASTSCROLL::INDEX_BG_NORMAL_COLOR; +const int ColorKey::FastScroll::INDEX_BG_PRESSED = _FASTSCROLL::INDEX_BG_PRESSED_COLOR; +const int ColorKey::FastScroll::INDEX_LINE_PRESSED = _FASTSCROLL::INDEX_LINE_PRESSED_COLOR; +const int ColorKey::FastScroll::INDEX_TEXT_NORMAL = _FASTSCROLL::INDEX_TEXT_NORMAL_COLOR; +const int ColorKey::FastScroll::INDEX_TEXT_PRESSED = _FASTSCROLL::INDEX_TEXT_PRESSED_COLOR; +const int ColorKey::FastScroll::INDEX_DIVIDER_NORMAL = _FASTSCROLL::INDEX_DIVIDER_NORMAL_COLOR; +const int ColorKey::FastScroll::POPUP_BG_NORMAL = _FASTSCROLL::POPUP_BG_NORMAL_COLOR; +const int ColorKey::FastScroll::POPUP_TEXT_NORMAL = _FASTSCROLL::POPUP_TEXT_NORMAL_COLOR; +const int ColorKey::Footer::BG_NORMAL = _FOOTER::BG_NORMAL_COLOR; +const int ColorKey::Footer::TRANSLUCENT_BG_NORMAL = _FOOTER::TRANSLUCENT_BG_NORMAL_COLOR; +const int ColorKey::Footer::BUTTON_BG_NORMAL = _FOOTER::BUTTON_BG_NORMAL_COLOR; +const int ColorKey::Footer::BUTTON_BG_DISABLED = _FOOTER::BUTTON_BG_DISABLED_COLOR; +const int ColorKey::Footer::BUTTON_BG_PRESSED = _FOOTER::BUTTON_BG_PRESSED_COLOR; +const int ColorKey::Footer::BUTTON_BG_HIGHLIGHTED = _FOOTER::BUTTON_BG_HIGHLIGHTED_COLOR; +const int ColorKey::Footer::BUTTON_TRANSLUCENT_BG_NORMAL = _FOOTER::BUTTON_TRANSLUCENT_BG_NORMAL_COLOR; +const int ColorKey::Footer::BUTTON_TRANSLUCENT_BG_DISABLED = _FOOTER::BUTTON_TRANSLUCENT_BG_DISABLED_COLOR; +const int ColorKey::Footer::BUTTON_TRANSLUCENT_BG_PRESSED = _FOOTER::BUTTON_TRANSLUCENT_BG_PRESSED_COLOR; +const int ColorKey::Footer::BUTTON_TRANSLUCENT_BG_HIGHLIGHTED = _FOOTER::BUTTON_TRANSLUCENT_BG_HIGHLIGHTED_COLOR; +const int ColorKey::Footer::BUTTON_TEXT_NORMAL = _FOOTER::BUTTON_TEXT_NORMAL_COLOR; +const int ColorKey::Footer::BUTTON_TEXT_DISABLED = _FOOTER::BUTTON_TEXT_DISABLED_COLOR; +const int ColorKey::Footer::BUTTON_TEXT_PRESSED = _FOOTER::BUTTON_TEXT_PRESSED_COLOR; +const int ColorKey::Footer::BUTTON_TEXT_HIGHLIGHTED = _FOOTER::BUTTON_TEXT_HIGHLIGHTED_COLOR; +const int ColorKey::Footer::BUTTON_TRANSLUCENT_TEXT_NORMAL = _FOOTER::BUTTON_TRANSLUCENT_TEXT_NORMAL_COLOR; +const int ColorKey::Footer::BUTTON_TRANSLUCENT_TEXT_DISABLED = _FOOTER::BUTTON_TRANSLUCENT_TEXT_DISABLED_COLOR; +const int ColorKey::Footer::BUTTON_TRANSLUCENT_TEXT_PRESSED = _FOOTER::BUTTON_TRANSLUCENT_TEXT_PRESSED_COLOR; +const int ColorKey::Footer::BUTTON_TRANSLUCENT_TEXT_HIGHLIGHTED = _FOOTER::BUTTON_TRANSLUCENT_TEXT_HIGHLIGHTED_COLOR; +const int ColorKey::Footer::SEGMENTED_ITEM_BG_NORMAL = _FOOTER::SEGMENTED_ITEM_BG_NORMAL_COLOR; +const int ColorKey::Footer::SEGMENTED_ITEM_BG_DISABLED = _FOOTER::SEGMENTED_ITEM_BG_DISABLED_COLOR; +const int ColorKey::Footer::SEGMENTED_ITEM_BG_PRESSED = _FOOTER::SEGMENTED_ITEM_BG_PRESSED_COLOR; +const int ColorKey::Footer::SEGMENTED_ITEM_BG_HIGHLIGHTED = _FOOTER::SEGMENTED_ITEM_BG_HIGHLIGHTED_COLOR; +const int ColorKey::Footer::SEGMENTED_ITEM_BG_SELECTED = _FOOTER::SEGMENTED_ITEM_BG_SELECTED_COLOR; +const int ColorKey::Footer::SEGMENTED_ITEM_TRANSLUCENT_BG_NORMAL = _FOOTER::SEGMENTED_ITEM_TRANSLUCENT_BG_NORMAL_COLOR; +const int ColorKey::Footer::SEGMENTED_ITEM_TRANSLUCENT_BG_DISABLED = _FOOTER::SEGMENTED_ITEM_TRANSLUCENT_BG_DISABLED_COLOR; +const int ColorKey::Footer::SEGMENTED_ITEM_TRANSLUCENT_BG_PRESSED = _FOOTER::SEGMENTED_ITEM_TRANSLUCENT_BG_PRESSED_COLOR; +const int ColorKey::Footer::SEGMENTED_ITEM_TRANSLUCENT_BG_HIGHLIGHTED = _FOOTER::SEGMENTED_ITEM_TRANSLUCENT_BG_HIGHLIGHTED_COLOR; +const int ColorKey::Footer::SEGMENTED_ITEM_TRANSLUCENT_BG_SELECTED = _FOOTER::SEGMENTED_ITEM_TRANSLUCENT_BG_SELECTED_COLOR; +const int ColorKey::Footer::SEGMENTED_ITEM_TEXT_NORMAL = _FOOTER::SEGMENTED_ITEM_TEXT_NORMAL_COLOR; +const int ColorKey::Footer::SEGMENTED_ITEM_TEXT_DISABLED = _FOOTER::SEGMENTED_ITEM_TEXT_DISABLED_COLOR; +const int ColorKey::Footer::SEGMENTED_ITEM_TEXT_PRESSED = _FOOTER::SEGMENTED_ITEM_TEXT_PRESSED_COLOR; +const int ColorKey::Footer::SEGMENTED_ITEM_TEXT_HIGHLIGHTED = _FOOTER::SEGMENTED_ITEM_TEXT_HIGHLIGHTED_COLOR; +const int ColorKey::Footer::SEGMENTED_ITEM_TEXT_SELECTED = _FOOTER::SEGMENTED_ITEM_TEXT_SELECTED_COLOR; +const int ColorKey::Footer::SEGMENTED_ITEM_TRANSLUCENT_TEXT_NORMAL = _FOOTER::SEGMENTED_ITEM_TRANSLUCENT_TEXT_NORMAL_COLOR; +const int ColorKey::Footer::SEGMENTED_ITEM_TRANSLUCENT_TEXT_DISABLED = _FOOTER::SEGMENTED_ITEM_TRANSLUCENT_TEXT_DISABLED_COLOR; +const int ColorKey::Footer::SEGMENTED_ITEM_TRANSLUCENT_TEXT_PRESSED = _FOOTER::SEGMENTED_ITEM_TRANSLUCENT_TEXT_PRESSED_COLOR; +const int ColorKey::Footer::SEGMENTED_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED = _FOOTER::SEGMENTED_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED_COLOR; +const int ColorKey::Footer::SEGMENTED_ITEM_TRANSLUCENT_TEXT_SELECTED = _FOOTER::SEGMENTED_ITEM_TRANSLUCENT_TEXT_SELECTED_COLOR; +const int ColorKey::Footer::TAB_ITEM_BG_NORMAL = _FOOTER::TAB_ITEM_BG_NORMAL_COLOR; +const int ColorKey::Footer::TAB_ITEM_BG_DISABLED = _FOOTER::TAB_ITEM_BG_DISABLED_COLOR; +const int ColorKey::Footer::TAB_ITEM_BG_PRESSED = _FOOTER::TAB_ITEM_BG_PRESSED_COLOR; +const int ColorKey::Footer::TAB_ITEM_BG_HIGHLIGHTED = _FOOTER::TAB_ITEM_BG_HIGHLIGHTED_COLOR; +const int ColorKey::Footer::TAB_ITEM_BG_SELECTED = _FOOTER::TAB_ITEM_BG_SELECTED_COLOR; +const int ColorKey::Footer::TAB_ITEM_TRANSLUCENT_BG_NORMAL = _FOOTER::TAB_ITEM_TRANSLUCENT_BG_NORMAL_COLOR; +const int ColorKey::Footer::TAB_ITEM_TRANSLUCENT_BG_DISABLED = _FOOTER::TAB_ITEM_TRANSLUCENT_BG_DISABLED_COLOR; +const int ColorKey::Footer::TAB_ITEM_TRANSLUCENT_BG_PRESSED = _FOOTER::TAB_ITEM_TRANSLUCENT_BG_PRESSED_COLOR; +const int ColorKey::Footer::TAB_ITEM_TRANSLUCENT_BG_HIGHLIGHTED = _FOOTER::TAB_ITEM_TRANSLUCENT_BG_HIGHLIGHTED_COLOR; +const int ColorKey::Footer::TAB_ITEM_TRANSLUCENT_BG_SELECTED = _FOOTER::TAB_ITEM_TRANSLUCENT_BG_SELECTED_COLOR; +const int ColorKey::Footer::TAB_ITEM_TEXT_NORMAL = _FOOTER::TAB_ITEM_TEXT_NORMAL_COLOR; +const int ColorKey::Footer::TAB_ITEM_TEXT_DISABLED = _FOOTER::TAB_ITEM_TEXT_DISABLED_COLOR; +const int ColorKey::Footer::TAB_ITEM_TEXT_PRESSED = _FOOTER::TAB_ITEM_TEXT_PRESSED_COLOR; +const int ColorKey::Footer::TAB_ITEM_TEXT_HIGHLIGHTED = _FOOTER::TAB_ITEM_TEXT_HIGHLIGHTED_COLOR; +const int ColorKey::Footer::TAB_ITEM_TEXT_SELECTED = _FOOTER::TAB_ITEM_TEXT_SELECTED_COLOR; +const int ColorKey::Footer::TAB_ITEM_TRANSLUCENT_TEXT_NORMAL = _FOOTER::TAB_ITEM_TRANSLUCENT_TEXT_NORMAL_COLOR; +const int ColorKey::Footer::TAB_ITEM_TRANSLUCENT_TEXT_DISABLED = _FOOTER::TAB_ITEM_TRANSLUCENT_TEXT_DISABLED_COLOR; +const int ColorKey::Footer::TAB_ITEM_TRANSLUCENT_TEXT_PRESSED = _FOOTER::TAB_ITEM_TRANSLUCENT_TEXT_PRESSED_COLOR; +const int ColorKey::Footer::TAB_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED = _FOOTER::TAB_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED_COLOR; +const int ColorKey::Footer::TAB_ITEM_TRANSLUCENT_TEXT_SELECTED = _FOOTER::TAB_ITEM_TRANSLUCENT_TEXT_SELECTED_COLOR; +const int ColorKey::Footer::BUTTON_ITEM_BG_NORMAL = _FOOTER::BUTTON_ITEM_BG_NORMAL_COLOR; +const int ColorKey::Footer::BUTTON_ITEM_BG_DISABLED = _FOOTER::BUTTON_ITEM_BG_DISABLED_COLOR; +const int ColorKey::Footer::BUTTON_ITEM_BG_PRESSED = _FOOTER::BUTTON_ITEM_BG_PRESSED_COLOR; +const int ColorKey::Footer::BUTTON_ITEM_BG_HIGHLIGHTED = _FOOTER::BUTTON_ITEM_BG_HIGHLIGHTED_COLOR; +const int ColorKey::Footer::BUTTON_ITEM_TRANSLUCENT_BG_NORMAL = _FOOTER::BUTTON_ITEM_TRANSLUCENT_BG_NORMAL_COLOR; +const int ColorKey::Footer::BUTTON_ITEM_TRANSLUCENT_BG_DISABLED = _FOOTER::BUTTON_ITEM_TRANSLUCENT_BG_DISABLED_COLOR; +const int ColorKey::Footer::BUTTON_ITEM_TRANSLUCENT_BG_PRESSED = _FOOTER::BUTTON_ITEM_TRANSLUCENT_BG_PRESSED_COLOR; +const int ColorKey::Footer::BUTTON_ITEM_TRANSLUCENT_BG_HIGHLIGHTED = _FOOTER::BUTTON_ITEM_TRANSLUCENT_BG_HIGHLIGHTED_COLOR; +const int ColorKey::Footer::BUTTON_ITEM_TEXT_NORMAL = _FOOTER::BUTTON_ITEM_TEXT_NORMAL_COLOR; +const int ColorKey::Footer::BUTTON_ITEM_TEXT_DISABLED = _FOOTER::BUTTON_ITEM_TEXT_DISABLED_COLOR; +const int ColorKey::Footer::BUTTON_ITEM_TEXT_PRESSED = _FOOTER::BUTTON_ITEM_TEXT_PRESSED_COLOR; +const int ColorKey::Footer::BUTTON_ITEM_TEXT_HIGHLIGHTED = _FOOTER::BUTTON_ITEM_TEXT_HIGHLIGHTED_COLOR; +const int ColorKey::Footer::BUTTON_ITEM_TRANSLUCENT_TEXT_NORMAL = _FOOTER::BUTTON_ITEM_TRANSLUCENT_TEXT_NORMAL_COLOR; +const int ColorKey::Footer::BUTTON_ITEM_TRANSLUCENT_TEXT_DISABLED = _FOOTER::BUTTON_ITEM_TRANSLUCENT_TEXT_DISABLED_COLOR; +const int ColorKey::Footer::BUTTON_ITEM_TRANSLUCENT_TEXT_PRESSED = _FOOTER::BUTTON_ITEM_TRANSLUCENT_TEXT_PRESSED_COLOR; +const int ColorKey::Footer::BUTTON_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED = _FOOTER::BUTTON_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED_COLOR; +const int ColorKey::Footer::BACK_ICON_NORMAL = _FOOTER::BACK_ICON_NORMAL_COLOR; +const int ColorKey::Footer::BACK_ICON_DISABLED = _FOOTER::BACK_ICON_DISABLED_COLOR; +const int ColorKey::Footer::BACK_ICON_PRESSED = _FOOTER::BACK_ICON_PRESSED_COLOR; +const int ColorKey::Footer::BACK_ICON_HIGHLIGHTED = _FOOTER::BACK_ICON_HIGHLIGHTED_COLOR; +const int ColorKey::Footer::DIVIDER_LINE_LEFT_NORMAL = _FOOTER::DIVIDER_LINE_LEFT_NORMAL_COLOR; +const int ColorKey::Footer::DIVIDER_LINE_RIGHT_NORMAL = _FOOTER::DIVIDER_LINE_RIGHT_NORMAL_COLOR; +const int ColorKey::Footer::DIVIDER_LINE_LEFT_TRANSLUCENT_NORMAL = _FOOTER::DIVIDER_LINE_LEFT_TRANSLUCENT_NORMAL_COLOR; +const int ColorKey::Footer::DIVIDER_LINE_RIGHT_TRANSLUCENT_NORMAL = _FOOTER::DIVIDER_LINE_RIGHT_TRANSLUCENT_NORMAL_COLOR; +const int ColorKey::Form::BG_NORMAL = _FORM::BG_NORMAL_COLOR; +const int ColorKey::Gallery::EMPTY_TEXT_NORMAL = _GALLERY::EMPTY_TEXT_NORMAL_COLOR; +const int ColorKey::Header::BG_NORMAL = _HEADER::BG_NORMAL_COLOR; +const int ColorKey::Header::TRANSLUCENT_BG_NORMAL = _HEADER::TRANSLUCENT_BG_NORMAL_COLOR; +const int ColorKey::Header::TITLE_TEXT_NORMAL = _HEADER::TITLE_TEXT_NORMAL_COLOR; +const int ColorKey::Header::TRANSLUCENT_TITLE_TEXT_NORMAL = _HEADER::TRANSLUCENT_TITLE_TEXT_NORMAL_COLOR; +const int ColorKey::Header::DESCRIPTION_TEXT_NORMAL = _HEADER::DESCRIPTION_TEXT_NORMAL_COLOR; +const int ColorKey::Header::TRANSLUCENT_DESCRIPTION_TEXT_NORMAL = _HEADER::TRANSLUCENT_DESCRIPTION_TEXT_NORMAL_COLOR; +const int ColorKey::Header::BUTTON_BG_NORMAL = _HEADER::BUTTON_BG_NORMAL_COLOR; +const int ColorKey::Header::BUTTON_BG_DISABLED = _HEADER::BUTTON_BG_DISABLED_COLOR; +const int ColorKey::Header::BUTTON_BG_PRESSED = _HEADER::BUTTON_BG_PRESSED_COLOR; +const int ColorKey::Header::BUTTON_BG_HIGHLIGHTED = _HEADER::BUTTON_BG_HIGHLIGHTED_COLOR; +const int ColorKey::Header::BUTTON_TRANSLUCENT_BG_NORMAL = _HEADER::BUTTON_TRANSLUCENT_BG_NORMAL_COLOR; +const int ColorKey::Header::BUTTON_TRANSLUCENT_BG_DISABLED = _HEADER::BUTTON_TRANSLUCENT_BG_DISABLED_COLOR; +const int ColorKey::Header::BUTTON_TRANSLUCENT_BG_PRESSED = _HEADER::BUTTON_TRANSLUCENT_BG_PRESSED_COLOR; +const int ColorKey::Header::BUTTON_TRANSLUCENT_BG_HIGHLIGHTED = _HEADER::BUTTON_TRANSLUCENT_BG_HIGHLIGHTED_COLOR; +const int ColorKey::Header::BUTTON_TEXT_NORMAL = _HEADER::BUTTON_TEXT_NORMAL_COLOR; +const int ColorKey::Header::BUTTON_TEXT_DISABLED = _HEADER::BUTTON_TEXT_DISABLED_COLOR; +const int ColorKey::Header::BUTTON_TEXT_PRESSED = _HEADER::BUTTON_TEXT_PRESSED_COLOR; +const int ColorKey::Header::BUTTON_TEXT_HIGHLIGHTED = _HEADER::BUTTON_TEXT_HIGHLIGHTED_COLOR; +const int ColorKey::Header::BUTTON_TRANSLUCENT_TEXT_NORMAL = _HEADER::BUTTON_TRANSLUCENT_TEXT_NORMAL_COLOR; +const int ColorKey::Header::BUTTON_TRANSLUCENT_TEXT_DISABLED = _HEADER::BUTTON_TRANSLUCENT_TEXT_DISABLED_COLOR; +const int ColorKey::Header::BUTTON_TRANSLUCENT_TEXT_PRESSED = _HEADER::BUTTON_TRANSLUCENT_TEXT_PRESSED_COLOR; +const int ColorKey::Header::BUTTON_TRANSLUCENT_TEXT_HIGHLIGHTED = _HEADER::BUTTON_TRANSLUCENT_TEXT_HIGHLIGHTED_COLOR; +const int ColorKey::Header::SEGMENTED_ITEM_BG_NORMAL = _HEADER::SEGMENTED_ITEM_BG_NORMAL_COLOR; +const int ColorKey::Header::SEGMENTED_ITEM_BG_DISABLED = _HEADER::SEGMENTED_ITEM_BG_DISABLED_COLOR; +const int ColorKey::Header::SEGMENTED_ITEM_BG_PRESSED = _HEADER::SEGMENTED_ITEM_BG_PRESSED_COLOR; +const int ColorKey::Header::SEGMENTED_ITEM_BG_HIGHLIGHTED = _HEADER::SEGMENTED_ITEM_BG_HIGHLIGHTED_COLOR; +const int ColorKey::Header::SEGMENTED_ITEM_BG_SELECTED = _HEADER::SEGMENTED_ITEM_BG_SELECTED_COLOR; +const int ColorKey::Header::SEGMENTED_ITEM_TRANSLUCENT_BG_NORMAL = _HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_NORMAL_COLOR; +const int ColorKey::Header::SEGMENTED_ITEM_TRANSLUCENT_BG_DISABLED = _HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_DISABLED_COLOR; +const int ColorKey::Header::SEGMENTED_ITEM_TRANSLUCENT_BG_PRESSED = _HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_PRESSED_COLOR; +const int ColorKey::Header::SEGMENTED_ITEM_TRANSLUCENT_BG_HIGHLIGHTED = _HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_HIGHLIGHTED_COLOR; +const int ColorKey::Header::SEGMENTED_ITEM_TRANSLUCENT_BG_SELECTED = _HEADER::SEGMENTED_ITEM_TRANSLUCENT_BG_SELECTED_COLOR; +const int ColorKey::Header::SEGMENTED_ITEM_TEXT_NORMAL = _HEADER::SEGMENTED_ITEM_TEXT_NORMAL_COLOR; +const int ColorKey::Header::SEGMENTED_ITEM_TEXT_DISABLED = _HEADER::SEGMENTED_ITEM_TEXT_DISABLED_COLOR; +const int ColorKey::Header::SEGMENTED_ITEM_TEXT_PRESSED = _HEADER::SEGMENTED_ITEM_TEXT_PRESSED_COLOR; +const int ColorKey::Header::SEGMENTED_ITEM_TEXT_HIGHLIGHTED = _HEADER::SEGMENTED_ITEM_TEXT_HIGHLIGHTED_COLOR; +const int ColorKey::Header::SEGMENTED_ITEM_TEXT_SELECTED = _HEADER::SEGMENTED_ITEM_TEXT_SELECTED_COLOR; +const int ColorKey::Header::SEGMENTED_ITEM_TRANSLUCENT_TEXT_NORMAL = _HEADER::SEGMENTED_ITEM_TRANSLUCENT_TEXT_NORMAL_COLOR; +const int ColorKey::Header::SEGMENTED_ITEM_TRANSLUCENT_TEXT_DISABLED = _HEADER::SEGMENTED_ITEM_TRANSLUCENT_TEXT_DISABLED_COLOR; +const int ColorKey::Header::SEGMENTED_ITEM_TRANSLUCENT_TEXT_PRESSED = _HEADER::SEGMENTED_ITEM_TRANSLUCENT_TEXT_PRESSED_COLOR; +const int ColorKey::Header::SEGMENTED_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED = _HEADER::SEGMENTED_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED_COLOR; +const int ColorKey::Header::SEGMENTED_ITEM_TRANSLUCENT_TEXT_SELECTED = _HEADER::SEGMENTED_ITEM_TRANSLUCENT_TEXT_SELECTED_COLOR; +const int ColorKey::Header::TAB_ITEM_BG_NORMAL = _HEADER::TAB_ITEM_BG_NORMAL_COLOR; +const int ColorKey::Header::TAB_ITEM_BG_DISABLED = _HEADER::TAB_ITEM_BG_DISABLED_COLOR; +const int ColorKey::Header::TAB_ITEM_BG_PRESSED = _HEADER::TAB_ITEM_BG_PRESSED_COLOR; +const int ColorKey::Header::TAB_ITEM_BG_HIGHLIGHTED = _HEADER::TAB_ITEM_BG_HIGHLIGHTED_COLOR; +const int ColorKey::Header::TAB_ITEM_BG_SELECTED = _HEADER::TAB_ITEM_BG_SELECTED_COLOR; +const int ColorKey::Header::TAB_ITEM_TRANSLUCENT_BG_NORMAL = _HEADER::TAB_ITEM_TRANSLUCENT_BG_NORMAL_COLOR; +const int ColorKey::Header::TAB_ITEM_TRANSLUCENT_BG_DISABLED = _HEADER::TAB_ITEM_TRANSLUCENT_BG_DISABLED_COLOR; +const int ColorKey::Header::TAB_ITEM_TRANSLUCENT_BG_PRESSED = _HEADER::TAB_ITEM_TRANSLUCENT_BG_PRESSED_COLOR; +const int ColorKey::Header::TAB_ITEM_TRANSLUCENT_BG_HIGHLIGHTED = _HEADER::TAB_ITEM_TRANSLUCENT_BG_HIGHLIGHTED_COLOR; +const int ColorKey::Header::TAB_ITEM_TRANSLUCENT_BG_SELECTED = _HEADER::TAB_ITEM_TRANSLUCENT_BG_SELECTED_COLOR; +const int ColorKey::Header::TAB_ITEM_TEXT_NORMAL = _HEADER::TAB_ITEM_TEXT_NORMAL_COLOR; +const int ColorKey::Header::TAB_ITEM_TEXT_DISABLED = _HEADER::TAB_ITEM_TEXT_DISABLED_COLOR; +const int ColorKey::Header::TAB_ITEM_TEXT_PRESSED = _HEADER::TAB_ITEM_TEXT_PRESSED_COLOR; +const int ColorKey::Header::TAB_ITEM_TEXT_HIGHLIGHTED = _HEADER::TAB_ITEM_TEXT_HIGHLIGHTED_COLOR; +const int ColorKey::Header::TAB_ITEM_TEXT_SELECTED = _HEADER::TAB_ITEM_TEXT_SELECTED_COLOR; +const int ColorKey::Header::TAB_ITEM_TRANSLUCENT_TEXT_NORMAL = _HEADER::TAB_ITEM_TRANSLUCENT_TEXT_NORMAL_COLOR; +const int ColorKey::Header::TAB_ITEM_TRANSLUCENT_TEXT_DISABLED = _HEADER::TAB_ITEM_TRANSLUCENT_TEXT_DISABLED_COLOR; +const int ColorKey::Header::TAB_ITEM_TRANSLUCENT_TEXT_PRESSED = _HEADER::TAB_ITEM_TRANSLUCENT_TEXT_PRESSED_COLOR; +const int ColorKey::Header::TAB_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED = _HEADER::TAB_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED_COLOR; +const int ColorKey::Header::TAB_ITEM_TRANSLUCENT_TEXT_SELECTED = _HEADER::TAB_ITEM_TRANSLUCENT_TEXT_SELECTED_COLOR; +const int ColorKey::Header::BADGE_ICON_BG_NORMAL = _HEADER::BADGE_ICON_BG_NORMAL_COLOR; +const int ColorKey::Header::BADGE_ICON_TEXT_NORMAL = _HEADER::BADGE_ICON_TEXT_NORMAL_COLOR; +const int ColorKey::Header::DIVIDER_LINE_LEFT_NORMAL = _HEADER::DIVIDER_LINE_LEFT_NORMAL_COLOR; +const int ColorKey::Header::DIVIDER_LINE_RIGHT_NORMAL = _HEADER::DIVIDER_LINE_RIGHT_NORMAL_COLOR; +const int ColorKey::Header::DIVIDER_LINE_LEFT_TRANSLUCENT_NORMAL = _HEADER::DIVIDER_LINE_LEFT_TRANSLUCENT_NORMAL_COLOR; +const int ColorKey::Header::DIVIDER_LINE_RIGHT_TRANSLUCENT_NORMAL = _HEADER::DIVIDER_LINE_RIGHT_TRANSLUCENT_NORMAL_COLOR; +const int ColorKey::Header::BUTTON_ITEM_BG_NORMAL = _HEADER::BUTTON_ITEM_BG_NORMAL_COLOR; +const int ColorKey::Header::BUTTON_ITEM_BG_DISABLED = _HEADER::BUTTON_ITEM_BG_DISABLED_COLOR; +const int ColorKey::Header::BUTTON_ITEM_BG_PRESSED = _HEADER::BUTTON_ITEM_BG_PRESSED_COLOR; +const int ColorKey::Header::BUTTON_ITEM_BG_HIGHLIGHTED = _HEADER::BUTTON_ITEM_BG_HIGHLIGHTED_COLOR; +const int ColorKey::Header::BUTTON_ITEM_TRANSLUCENT_BG_NORMAL = _HEADER::BUTTON_ITEM_TRANSLUCENT_BG_NORMAL_COLOR; +const int ColorKey::Header::BUTTON_ITEM_TRANSLUCENT_BG_DISABLED = _HEADER::BUTTON_ITEM_TRANSLUCENT_BG_DISABLED_COLOR; +const int ColorKey::Header::BUTTON_ITEM_TRANSLUCENT_BG_PRESSED = _HEADER::BUTTON_ITEM_TRANSLUCENT_BG_PRESSED_COLOR; +const int ColorKey::Header::BUTTON_ITEM_TRANSLUCENT_BG_HIGHLIGHTED = _HEADER::BUTTON_ITEM_TRANSLUCENT_BG_HIGHLIGHTED_COLOR; +const int ColorKey::Header::BUTTON_ITEM_TEXT_NORMAL = _HEADER::BUTTON_ITEM_TEXT_NORMAL_COLOR; +const int ColorKey::Header::BUTTON_ITEM_TEXT_DISABLED = _HEADER::BUTTON_ITEM_TEXT_DISABLED_COLOR; +const int ColorKey::Header::BUTTON_ITEM_TEXT_PRESSED = _HEADER::BUTTON_ITEM_TEXT_PRESSED_COLOR; +const int ColorKey::Header::BUTTON_ITEM_TEXT_HIGHLIGHTED = _HEADER::BUTTON_ITEM_TEXT_HIGHLIGHTED_COLOR; +const int ColorKey::Header::BUTTON_ITEM_TRANSLUCENT_TEXT_NORMAL = _HEADER::BUTTON_ITEM_TRANSLUCENT_TEXT_NORMAL_COLOR; +const int ColorKey::Header::BUTTON_ITEM_TRANSLUCENT_TEXT_DISABLED = _HEADER::BUTTON_ITEM_TRANSLUCENT_TEXT_DISABLED_COLOR; +const int ColorKey::Header::BUTTON_ITEM_TRANSLUCENT_TEXT_PRESSED = _HEADER::BUTTON_ITEM_TRANSLUCENT_TEXT_PRESSED_COLOR; +const int ColorKey::Header::BUTTON_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED = _HEADER::BUTTON_ITEM_TRANSLUCENT_TEXT_HIGHLIGHTED_COLOR; +const int ColorKey::IconList::EMPTY_TEXT_NORMAL = _ICONLIST::EMPTY_TEXT_NORMAL_COLOR; +const int ColorKey::IconList::TEXT_NORMAL = _ICONLIST::TEXT_NORMAL_COLOR; +const int ColorKey::IconList::TEXT_PRESSED = _ICONLIST::TEXT_PRESSED_COLOR; +const int ColorKey::IconList::TEXT_HIGHLIGHTED = _ICONLIST::TEXT_HIGHLIGHTED_COLOR; +const int ColorKey::IconList::INNER_TEXT_NORMAL = _ICONLIST::INNER_TEXT_NORMAL_COLOR; +const int ColorKey::IconList::INNER_TEXT_PRESSED = _ICONLIST::INNER_TEXT_PRESSED_COLOR; +const int ColorKey::IconList::INNER_TEXT_HIGHLIGHTED = _ICONLIST::INNER_TEXT_HIGHLIGHTED_COLOR; +const int ColorKey::IconList::INNER_TEXT_BG_NORMAL = _ICONLIST::INNER_TEXT_BG_NORMAL_COLOR; +const int ColorKey::IconList::ITEM_BG_PRESSED = _ICONLIST::ITEM_BG_PRESSED_COLOR; +const int ColorKey::IconList::ITEM_BORDER_NORMAL = _ICONLIST::ITEM_BORDER_NORMAL_COLOR; +const int ColorKey::IconList::ITEM_BORDER_PRESSED = _ICONLIST::ITEM_BORDER_PRESSED_COLOR; +const int ColorKey::IconList::ITEM_BORDER_HIGHLIGHTED = _ICONLIST::ITEM_BORDER_HIGHLIGHTED_COLOR; +const int ColorKey::InputPad::TEXT_NORMAL = _INPUTPAD::TEXT_NORMAL_COLOR; +const int ColorKey::InputPad::TEXT_PRESSED = _INPUTPAD::TEXT_PRESSED_COLOR; +const int ColorKey::InputPad::TEXT_HIGHLIGHTED = _INPUTPAD::TEXT_NORMAL_COLOR; +const int ColorKey::InputPad::TEXT_DISABLED = _INPUTPAD::TEXT_NORMAL_COLOR; +const int ColorKey::InputPad::GUIDE_TEXT_NORMAL = _INPUTPAD::GUIDE_TEXT_NORMAL_COLOR; +const int ColorKey::InputPad::GUIDE_TEXT_PRESSED = _INPUTPAD::GUIDE_TEXT_PRESSED_COLOR; +const int ColorKey::InputPad::GUIDE_TEXT_DISABLED = _INPUTPAD::GUIDE_TEXT_DISABLED_COLOR; +const int ColorKey::InputPad::BUTTON_BG_NORMAL = _INPUTPAD::BUTTON_BG_NORMAL_COLOR; +const int ColorKey::InputPad::BUTTON_BG_PRESSED = _INPUTPAD::BUTTON_BG_PRESSED_COLOR; +const int ColorKey::InputPad::BUTTON_BG_HIGHLIGHTED = _INPUTPAD::BUTTON_BG_NORMAL_COLOR; +const int ColorKey::InputPad::BUTTON_BG_DISABLED = _INPUTPAD::BUTTON_BG_NORMAL_COLOR; +const int ColorKey::Label::TEXT_NORMAL = _LABEL::TEXT_NORMAL_COLOR; +const int ColorKey::MessageBox::BG_NORMAL = _MESSAGEBOX::BG_NORMAL_COLOR; +const int ColorKey::MessageBox::TITLE_TEXT_NORMAL = _MESSAGEBOX::TITLE_TEXT_NORMAL_COLOR; +const int ColorKey::MessageBox::TEXT_NORMAL = _MESSAGEBOX::TEXT_NORMAL_COLOR; +const int ColorKey::MessageBox::BOTTOM_BG_NORMAL = _MESSAGEBOX::BOTTOM_BG_NORMAL_COLOR; +const int ColorKey::MessageBox::TITLE_BG_NORMAL = _MESSAGEBOX::TITLE_BG_NORMAL_COLOR; +const int ColorKey::MessageBox::BOTTOM_BUTTON_BG_NORMAL = _MESSAGEBOX::BOTTOM_BUTTON_BG_NORMAL_COLOR; +const int ColorKey::MessageBox::BOTTOM_BUTTON_BG_PRESSED = _MESSAGEBOX::BOTTOM_BUTTON_BG_PRESSED_COLOR; +const int ColorKey::MessageBox::BOTTOM_BUTTON_BG_DISABLED = _MESSAGEBOX::BOTTOM_BUTTON_BG_DISABLED_COLOR; +const int ColorKey::MessageBox::BOTTOM_BUTTON_BG_HIGHLIGHTED = _MESSAGEBOX::BOTTOM_BUTTON_BG_HIGHLIGHTED_COLOR; +const int ColorKey::MessageBox::BOTTOM_BUTTON_TEXT_NORMAL = _MESSAGEBOX::BOTTOM_BUTTON_TEXT_NORMAL_COLOR; +const int ColorKey::MessageBox::BOTTOM_BUTTON_TEXT_PRESSED = _MESSAGEBOX::BOTTOM_BUTTON_TEXT_PRESSED_COLOR; +const int ColorKey::MessageBox::BOTTOM_BUTTON_TEXT_DISABLED = _MESSAGEBOX::BOTTOM_BUTTON_TEXT_DISABLED_COLOR; +const int ColorKey::MessageBox::BOTTOM_BUTTON_TEXT_HIGHLIGHTED = _MESSAGEBOX::BOTTOM_BUTTON_TEXT_HIGHLIGHTED_COLOR; +const int ColorKey::OptionMenu::BG_NORMAL = _OPTIONMENU::BG_NORMAL_COLOR; +const int ColorKey::OptionMenu::ITEM_TEXT_NORMAL = _OPTIONMENU::ITEM_TEXT_NORMAL_COLOR; +const int ColorKey::OptionMenu::ITEM_TEXT_PRESSED = _OPTIONMENU::ITEM_TEXT_PRESSED_COLOR; +const int ColorKey::OptionMenu::ITEM_TEXT_DISABLED = _OPTIONMENU::ITEM_TEXT_DISABLED_COLOR; +const int ColorKey::OptionMenu::ITEM_TEXT_HIGHLIGHTED = _OPTIONMENU::ITEM_TEXT_HIGHLIGHTED_COLOR; +const int ColorKey::OptionMenu::ITEM_BG_NORMAL = _OPTIONMENU::ITEM_BG_NORMAL_COLOR; +const int ColorKey::OptionMenu::ITEM_BG_PRESSED = _OPTIONMENU::ITEM_BG_PRESSED_COLOR; +const int ColorKey::OptionMenu::ITEM_BG_DISABLED = _OPTIONMENU::ITEM_BG_DISABLED_COLOR; +const int ColorKey::OptionMenu::ITEM_BG_HIGHLIGHTED = _OPTIONMENU::ITEM_BG_HIGHLIGHTED_COLOR; +const int ColorKey::OptionMenu::CONTEXTUAL_POPUP_ARROW_NORMAL = _OPTIONMENU::CONTEXTUAL_POPUP_ARROW_NORMAL_COLOR; +const int ColorKey::OptionMenu::CONTEXTUAL_POPUP_ARROW_PRESSED = _OPTIONMENU::CONTEXTUAL_POPUP_ARROW_PRESSED_COLOR; +const int ColorKey::OptionMenu::CONTEXTUAL_POPUP_ARROW_DISABLED = _OPTIONMENU::CONTEXTUAL_POPUP_ARROW_DISABLED_COLOR; +const int ColorKey::OptionMenu::CONTEXTUAL_POPUP_ARROW_HIGHLIGHTED = _OPTIONMENU::CONTEXTUAL_POPUP_ARROW_HIGHLIGHTED_COLOR; +const int ColorKey::OptionMenu::LIST_ITEM_DIVIDER_01_NORMAL = _OPTIONMENU::LIST_ITEM_DIVIDER_01_NORMAL_COLOR; +const int ColorKey::OptionMenu::LIST_ITEM_DIVIDER_02_NORMAL = _OPTIONMENU::LIST_ITEM_DIVIDER_02_NORMAL_COLOR; +const int ColorKey::Panel::GROUPED_STYLE_BG_NORMAL = _PANEL::GROUPED_STYLE_BG_NORMAL_COLOR; +const int ColorKey::Popup::BG_NORMAL = _POPUP::BG_NORMAL_COLOR; +const int ColorKey::Popup::TITLE_TEXT_NORMAL = _POPUP::TITLE_TEXT_NORMAL_COLOR; +const int ColorKey::Popup::TITLE_BG_NORMAL = _POPUP::TITLE_BG_NORMAL_COLOR; +const int ColorKey::Progress::BAR_BG_NORMAL = _PROGRESS::BAR_BG_NORMAL_COLOR; +const int ColorKey::Progress::BAR_NORMAL = _PROGRESS::BAR_NORMAL_COLOR; +const int ColorKey::Scroll::THUMB_BG_NORMAL = _SCROLL::THUMB_BG_NORMAL_COLOR; +const int ColorKey::Scroll::JUMP_TO_TOP_NORMAL = _SCROLL::JUMP_TO_TOP_NORMAL_COLOR; +const int ColorKey::Scroll::JUMP_TO_TOP_PRESSED = _SCROLL::JUMP_TO_TOP_PRESSED_COLOR; +const int ColorKey::Scroll::BUTTON_BG_NORMAL = _SCROLL::BUTTON_BG_NORMAL_COLOR; +const int ColorKey::Scroll::BUTTON_BG_PRESSED = _SCROLL::BUTTON_BG_PRESSED_COLOR; +const int ColorKey::SearchBar::BUTTON_BG_NORMAL = _SEARCHBAR::BUTTON_BG_NORMAL_COLOR; +const int ColorKey::SearchBar::BUTTON_BG_PRESSED = _SEARCHBAR::BUTTON_BG_PRESSED_COLOR; +const int ColorKey::SearchBar::BUTTON_BG_DISABLED = _SEARCHBAR::BUTTON_BG_DISABLED_COLOR; +const int ColorKey::SearchBar::BUTTON_BG_HIGHLIGHTED = _SEARCHBAR::BUTTON_BG_HIGHLIGHTED_COLOR; +const int ColorKey::SearchBar::BUTTON_TEXT_NORMAL = _SEARCHBAR::BUTTON_TEXT_NORMAL_COLOR; +const int ColorKey::SearchBar::BUTTON_TEXT_PRESSED = _SEARCHBAR::BUTTON_TEXT_PRESSED_COLOR; +const int ColorKey::SearchBar::BUTTON_TEXT_DISABLED = _SEARCHBAR::BUTTON_TEXT_DISABLED_COLOR; +const int ColorKey::SearchBar::BUTTON_TEXT_HIGHLIGHTED = _SEARCHBAR::BUTTON_TEXT_HIGHLIGHTED_COLOR; +const int ColorKey::SearchBar::EDIT_BG_NORMAL = _SEARCHBAR::EDIT_BG_NORMAL_COLOR; +const int ColorKey::SearchBar::EDIT_BG_DISABLED = _SEARCHBAR::EDIT_BG_DISABLED_COLOR; +const int ColorKey::SearchBar::EDIT_BG_PRESSED = _SEARCHBAR::EDIT_BG_PRESSED_COLOR; +const int ColorKey::SearchBar::EDIT_BG_HIGHLIGHTED = _SEARCHBAR::EDIT_BG_HIGHLIGHTED_COLOR; +const int ColorKey::SearchBar::GUIDE_TEXT_NORMAL = _SEARCHBAR::GUIDE_TEXT_NORMAL_COLOR; +const int ColorKey::SearchBar::GUIDE_TEXT_DISABLED = _SEARCHBAR::GUIDE_TEXT_DISABLED_COLOR; +const int ColorKey::SearchBar::EDIT_TEXT_NORMAL = _SEARCHBAR::EDIT_TEXT_NORMAL_COLOR; +const int ColorKey::SearchBar::EDIT_TEXT_DISABLED = _SEARCHBAR::EDIT_TEXT_DISABLED_COLOR; +const int ColorKey::SearchBar::EDIT_TEXT_HIGHLIGHTED = _SEARCHBAR::EDIT_TEXT_HIGHLIGHTED_COLOR; +const int ColorKey::SearchBar::EDIT_TEXT_PRESSED = _SEARCHBAR::EDIT_TEXT_PRESSED_COLOR; +const int ColorKey::SearchBar::ICON_BG_NORMAL = _SEARCHBAR::ICON_BG_NORMAL_COLOR; +const int ColorKey::SearchBar::ICON_BG_DISABLED = _SEARCHBAR::ICON_BG_DISABLED_COLOR; +const int ColorKey::SearchBar::CONTENT_AREA_BG_NORMAL = _SEARCHBAR::CONTENT_AREA_BG_NORMAL_COLOR; +const int ColorKey::SearchBar::BG_NORMAL = _SEARCHBAR::BG_NORMAL_COLOR; +const int ColorKey::Slider::BG_OTHERS_NORMAL = _SLIDER::BG_OTHERS_NORMAL_COLOR; +const int ColorKey::Slider::BG_DEFAULT_NORMAL = _SLIDER::BG_DEFAULT_NORMAL_COLOR; +const int ColorKey::Slider::BAR_BG_NORMAL = _SLIDER::BAR_BG_NORMAL_COLOR; +const int ColorKey::Slider::BAR_NORMAL = _SLIDER::BAR_NORMAL_COLOR; +const int ColorKey::Slider::HANDLE_BG_NORMAL = _SLIDER::HANDLE_BG_NORMAL_COLOR; +const int ColorKey::Slider::HANDLE_BG_PRESSED = _SLIDER::HANDLE_BG_PRESSED_COLOR; +const int ColorKey::Slider::HANDLE_BG_DISABLED = _SLIDER::HANDLE_BG_DISABLED_COLOR; +const int ColorKey::Slider::HANDLE_BG_HIGHLIGHTED = _SLIDER::HANDLE_BG_HIGHLIGHTED_COLOR; +const int ColorKey::Slider::HANDLE_NUMBER_TEXT_NORMAL = _SLIDER::HANDLE_NUMBER_TEXT_NORMAL_COLOR; +const int ColorKey::Slider::HANDLE_NUMBER_TEXT_DISABLED = _SLIDER::HANDLE_NUMBER_TEXT_DISABLED_COLOR; +const int ColorKey::Slider::HANDLE_NUMBER_TEXT_PRESSED = _SLIDER::HANDLE_NUMBER_TEXT_PRESSED_COLOR; +const int ColorKey::Slider::HANDLE_NUMBER_TEXT_HIGHLIGHTED = _SLIDER::HANDLE_NUMBER_TEXT_HIGHLIGHTED_COLOR; +const int ColorKey::Slider::TITLE_TEXT_NORMAL = _SLIDER::TITLE_TEXT_NORMAL_COLOR; +const int ColorKey::Slider::OVERLAY_BG_NORMAL = _SLIDER::OVERLAY_BG_NORMAL_COLOR; +const int ColorKey::Slider::OVERLAY_TEXT_NORMAL = _SLIDER::OVERLAY_TEXT_NORMAL_COLOR; +const int ColorKey::SplitPanel::DIVIDER_BG_NORMAL = _SPLITPANEL::DIVIDER_BG_NORMAL_COLOR; +const int ColorKey::SplitPanel::DIVIDER_BG_PRESSED = _SPLITPANEL::DIVIDER_BG_PRESSED_COLOR; +const int ColorKey::SplitPanel::DIVIDER_BG_DISABLED = _SPLITPANEL::DIVIDER_BG_DISABLED_COLOR; +const int ColorKey::TabBar::BG_NORMAL = _TABBAR::BG_NORMAL_COLOR; +const int ColorKey::TabBar::ITEM_BG_NORMAL = _TABBAR::ITEM_BG_NORMAL_COLOR; +const int ColorKey::TabBar::ITEM_BG_PRESSED = _TABBAR::ITEM_BG_PRESSED_COLOR; +const int ColorKey::TabBar::ITEM_BG_SELECTED = _TABBAR::ITEM_BG_SELECTED_COLOR; +const int ColorKey::TabBar::ITEM_BG_DISABLED = _TABBAR::ITEM_BG_DISABLED_COLOR; +const int ColorKey::TabBar::ITEM_TEXT_NORMAL = _TABBAR::ITEM_TEXT_NORMAL_COLOR; +const int ColorKey::TabBar::ITEM_TEXT_PRESSED = _TABBAR::ITEM_TEXT_PRESSED_COLOR; +const int ColorKey::TabBar::ITEM_TEXT_SELECTED = _TABBAR::ITEM_TEXT_SELECTED_COLOR; +const int ColorKey::TabBar::ITEM_TEXT_DISABLED = _TABBAR::ITEM_TEXT_DISABLED_COLOR; +const int ColorKey::TabBar::ARROW_BG_NORMAL = _TABBAR::ARROW_BG_NORMAL_COLOR; +const int ColorKey::Tab::ITEM_BG_NORMAL = _TAB::ITEM_BG_NORMAL_COLOR; +const int ColorKey::Tab::ITEM_BG_PRESSED = _TAB::ITEM_BG_PRESSED_COLOR; +const int ColorKey::Tab::ITEM_BG_SELECTED = _TAB::ITEM_BG_SELECTED_COLOR; +const int ColorKey::Tab::ITEM_BG_HIGHLIGHTED = _TAB::ITEM_BG_HIGHLIGHTED_COLOR; +const int ColorKey::Tab::ITEM_BG_DISABLED = _TAB::ITEM_BG_DISABLED_COLOR; +const int ColorKey::Tab::ITEM_TEXT_NORMAL = _TAB::ITEM_TEXT_NORMAL_COLOR; +const int ColorKey::Tab::ITEM_TEXT_PRESSED = _TAB::ITEM_TEXT_PRESSED_COLOR; +const int ColorKey::Tab::ITEM_TEXT_SELECTED = _TAB::ITEM_TEXT_SELECTED_COLOR; +const int ColorKey::Tab::ITEM_TEXT_HIGHLIGHTED = _TAB::ITEM_TEXT_HIGHLIGHTED_COLOR; +const int ColorKey::Tab::ITEM_TEXT_DISABLED = _TAB::ITEM_TEXT_DISABLED_COLOR; +const int ColorKey::TableView::BG_NORMAL = _TABLEVIEW::BG_NORMAL_COLOR; +const int ColorKey::TableView::ITEM_DIVIDER_TOP_BG_NORMAL = _TABLEVIEW::ITEM_DIVIDER_TOP_BG_NORMAL_COLOR; +const int ColorKey::TableView::ITEM_DIVIDER_BOTTOM_BG_NORMAL = _TABLEVIEW::ITEM_DIVIDER_BOTTOM_BG_NORMAL_COLOR; +const int ColorKey::TableView::ITEM_BG_NORMAL = _TABLEVIEW::ITEM_BG_NORMAL_COLOR; +const int ColorKey::TableView::ITEM_BG_PRESSED = _TABLEVIEW::ITEM_BG_PRESSED_COLOR; +const int ColorKey::TableView::ITEM_BG_HIGHLIGHTED = _TABLEVIEW::ITEM_BG_HIGHLIGHTED_COLOR; +const int ColorKey::TableView::ITEM_BG_DISABLED = _TABLEVIEW::ITEM_BG_DISABLED_COLOR; +const int ColorKey::TableView::ITEM_TEXT_NORMAL = _TABLEVIEW::ITEM_TEXT_NORMAL_COLOR; +const int ColorKey::TableView::ITEM_TEXT_PRESSED = _TABLEVIEW::ITEM_TEXT_PRESSED_COLOR; +const int ColorKey::TableView::ITEM_TEXT_HIGHLIGHTED = _TABLEVIEW::ITEM_TEXT_HIGHLIGHTED_COLOR; +const int ColorKey::TableView::ITEM_TEXT_DISABLED = _TABLEVIEW::ITEM_TEXT_DISABLED_COLOR; +const int ColorKey::TableView::ITEM_DESCRIPTION_TEXT_NORMAL = _TABLEVIEW::ITEM_DESCRIPTION_TEXT_NORMAL_COLOR; +const int ColorKey::TableView::ITEM_ANNEX_DETAIL_NORMAL = _TABLEVIEW::ITEM_ANNEX_DETAIL_NORMAL_COLOR; +const int ColorKey::TableView::ITEM_ANNEX_DETAIL_PRESSED = _TABLEVIEW::ITEM_ANNEX_DETAIL_PRESSED_COLOR; +const int ColorKey::TableView::ITEM_ANNEX_DETAIL_HIGHLIGHTED = _TABLEVIEW::ITEM_ANNEX_DETAIL_HIGHLIGHTED_COLOR; +const int ColorKey::TableView::ITEM_ANNEX_DETAIL_BG_NORMAL = _TABLEVIEW::ITEM_ANNEX_DETAIL_BG_NORMAL_COLOR; +const int ColorKey::TableView::ITEM_ANNEX_DETAIL_BG_PRESSED = _TABLEVIEW::ITEM_ANNEX_DETAIL_BG_PRESSED_COLOR; +const int ColorKey::TableView::ITEM_ANNEX_DETAIL_BG_HIGHLIGHTED = _TABLEVIEW::ITEM_ANNEX_DETAIL_BG_HIGHLIGHTED_COLOR; +const int ColorKey::TableView::GROUP_ITEM_BG_NORMAL = _TABLEVIEW::GROUPITEM_BG_NORMAL_COLOR; +const int ColorKey::TableView::GROUP_ITEM_BG_PRESSED = _TABLEVIEW::GROUPITEM_BG_PRESSED_COLOR; +const int ColorKey::TableView::GROUP_ITEM_BG_HIGHLIGHTED = _TABLEVIEW::GROUPITEM_BG_HIGHLIGHTED_COLOR; +const int ColorKey::TableView::GROUP_ITEM_BG_DISABLED = _TABLEVIEW::GROUPITEM_BG_DISABLED_COLOR; +const int ColorKey::TableView::GROUP_ITEM_TEXT_NORMAL = _TABLEVIEW::GROUPITEM_TEXT_NORMAL_COLOR; +const int ColorKey::TableView::GROUP_ITEM_TEXT_PRESSED = _TABLEVIEW::GROUPITEM_TEXT_PRESSED_COLOR; +const int ColorKey::TableView::GROUP_ITEM_TEXT_HIGHLIGHTED = _TABLEVIEW::GROUPITEM_TEXT_HIGHLIGHTED_COLOR; +const int ColorKey::TableView::GROUP_ITEM_TEXT_DISABLED = _TABLEVIEW::GROUPITEM_TEXT_DISABLED_COLOR; +const int ColorKey::TableView::GROUP_ITEM_INDEX_BAR_NORMAL = _TABLEVIEW::GROUPITEM_INDEX_BAR_NORMAL_COLOR; +const int ColorKey::TableView::GROUP_ITEM_INDEX_BAR_PRESSED = _TABLEVIEW::GROUPITEM_INDEX_BAR_PRESSED_COLOR; +const int ColorKey::TableView::GROUP_ITEM_INDEX_BAR_HIGHLIGHTED = _TABLEVIEW::GROUPITEM_INDEX_BAR_HIGHLIGHTED_COLOR; +const int ColorKey::TableView::GROUP_ITEM_INDEX_BAR_DISABLED = _TABLEVIEW::GROUPITEM_INDEX_BAR_DISABLED_COLOR; +const int ColorKey::TableView::GROUP_ITEM_BAR_NORMAL = _TABLEVIEW::GROUPITEM_BAR_NORMAL_COLOR; +const int ColorKey::TableView::GROUP_ITEM_BAR_PRESSED = _TABLEVIEW::GROUPITEM_BAR_PRESSED_COLOR; +const int ColorKey::TableView::GROUP_ITEM_BAR_HIGHLIGHTED = _TABLEVIEW::GROUPITEM_BAR_HIGHLIGHTED_COLOR; +const int ColorKey::TableView::GROUP_ITEM_BAR_DISABLED = _TABLEVIEW::GROUPITEM_BAR_DISABLED_COLOR; +const int ColorKey::TableView::SECTION_ITEM_BG_NORMAL = _TABLEVIEW::SECTIONITEM_BG_NORMAL_COLOR; +const int ColorKey::TableView::CONTEXT_ITEM_BG_NORMAL = _TABLEVIEW::CONTEXTITEM_BG_NORMAL_COLOR; +const int ColorKey::TableView::EMPTY_TEXT_NORMAL = _TABLEVIEW::EMPTY_CONTENTS_TEXT_NORMAL_COLOR; +const int ColorKey::TableView::ITEM_ANNEX_DIVIDER_LEFT_BG_NORMAL = _TABLEVIEW::ITEM_ANNEX_DIVIDER_LEFT_BG_NORMAL_COLOR; +const int ColorKey::TableView::ITEM_ANNEX_DIVIDER_RIGHT_BG_NORMAL = _TABLEVIEW::ITEM_ANNEX_DIVIDER_RIGHT_BG_NORMAL_COLOR; +const int ColorKey::TokenEdit::BG_NORMAL = _TOKENEDIT::BG_NORMAL_COLOR; +const int ColorKey::TokenEdit::BG_SELECTED = _TOKENEDIT::BG_SELECTED_COLOR; +const int ColorKey::TokenEdit::BG_HIGHLIGHTED = _TOKENEDIT::BG_HIGHLIGHTED_COLOR; +const int ColorKey::TokenEdit::BG_DISABLED = _TOKENEDIT::BG_DISABLED_COLOR; +const int ColorKey::TokenEdit::TEXT_NORMAL = _TOKENEDIT::TEXT_NORMAL_COLOR; +const int ColorKey::TokenEdit::TEXT_SELECTED = _TOKENEDIT::TEXT_SELECTED_COLOR; +const int ColorKey::TokenEdit::TEXT_HIGHLIGHTED = _TOKENEDIT::TEXT_HIGHLIGHTED_COLOR; +const int ColorKey::TokenEdit::TEXT_DISABLED = _TOKENEDIT::TEXT_DISABLED_COLOR; +const int ColorKey::TokenEdit::TITLE_TEXT_NORMAL = _TOKENEDIT::TITLE_TEXT_NORMAL_COLOR; +const int ColorKey::TokenEdit::TITLE_TEXT_PRESSED = _TOKENEDIT::TITLE_TEXT_PRESSED_COLOR; +const int ColorKey::TokenEdit::TITLE_TEXT_HIGHLIGHTED = _TOKENEDIT::TITLE_TEXT_HIGHLIGHTED_COLOR; +const int ColorKey::TokenEdit::TITLE_TEXT_DISABLED = _TOKENEDIT::TITLE_TEXT_DISABLED_COLOR; + +UiConfiguration::UiConfiguration(void) +{ +} + +UiConfiguration::~UiConfiguration(void) +{ + +} + +String +UiConfiguration::GetDefaultFont(void) +{ + _ControlManager* pControlManager = _ControlManager::GetInstance(); + return pControlManager->GetDefaultFont(); +} + +result +UiConfiguration::SetDefaultFont(const String& fontName) +{ + _ControlManager* pControlManager = _ControlManager::GetInstance(); + result r = pControlManager->SetDefaultFont(fontName); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + return E_SUCCESS; +} + +String +UiConfiguration::GetDefaultFontFile(void) +{ + _ControlManager* pControlManager = _ControlManager::GetInstance(); + return pControlManager->GetDefaultFontFile(); +} + +result +UiConfiguration::SetDefaultFontFromFile(const Tizen::Base::String& fileName) +{ + _ControlManager* pControlManager = _ControlManager::GetInstance(); + result r = pControlManager->SetDefaultFontFromFile(fileName); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + return E_SUCCESS; +} + +float +UiConfiguration::GetFontSize(const Tizen::Base::String& sizeString) +{ + float size =0.0f; + if (sizeString.Equals(L"giant", false)) + { + GET_SHAPE_CONFIG(ACCESSIBILITY::GIANT_FONT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, size); + } + else if (sizeString.Equals(L"huge", false)) + { + GET_SHAPE_CONFIG(ACCESSIBILITY::HUGE_FONT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, size); + } + else if (sizeString.Equals(L"large", false)) + { + GET_SHAPE_CONFIG(ACCESSIBILITY::LARGE_FONT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, size); + } + else if (sizeString.Equals(L"medium", false)) + { + GET_SHAPE_CONFIG(ACCESSIBILITY::NORMAL_FONT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, size); + } + else if (sizeString.Equals(L"small", false)) + { + GET_SHAPE_CONFIG(ACCESSIBILITY::SMALL_FONT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, size); + } + else + { + size = -1.0f; + } + return size; +} + +Color +UiConfiguration::GetColor(int colorKey) +{ + Color color; + result r = _ResourceManager::GetInstance()->GetColor(colorKey,color); + SetLastResult(r); + return color; +} + +}} // Tizen::Ui diff --git a/src/ui/FUiVariant.cpp b/src/ui/FUiVariant.cpp new file mode 100644 index 0000000..9852784 --- /dev/null +++ b/src/ui/FUiVariant.cpp @@ -0,0 +1,1543 @@ +// +// 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 FUIVariant.cpp + * @brief This is the implementation file for Variant class. + */ + +// Includes +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "FUi_VariantImpl.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui +{ + +const Variant Variant::NULL_VARIANT; + +Variant::Variant(void) + : __pVariantImpl(null) +{ + __pVariantImpl = new (std::nothrow) _VariantImpl; + if (__pVariantImpl == null) + { + SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + } +} + +Variant::~Variant(void) +{ + if (__pVariantImpl) + { + __pVariantImpl->Release(); + } + + __pVariantImpl = null; +} + +Variant::Variant(const Variant& value) + : __pVariantImpl(null) +{ + SysAssertf(value.__pVariantImpl, "No data in rhs for copy ctor"); + __pVariantImpl = value.__pVariantImpl; + __pVariantImpl->AddRef(); +} + +Variant::Variant(int value) + : __pVariantImpl(null) +{ + __pVariantImpl = new (std::nothrow) _VariantImpl; + if (__pVariantImpl == null) + { + SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + } + else + { + __pVariantImpl->__type = VARIANT_TYPE_INT; + __pVariantImpl->__data.valueInt = 0; + __pVariantImpl->__data.valueInt = value; + } +} + +Variant::Variant(unsigned int value) + : __pVariantImpl(null) +{ + __pVariantImpl = new (std::nothrow) _VariantImpl; + if (__pVariantImpl == null) + { + SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + } + else + { + __pVariantImpl->__type = VARIANT_TYPE_UINT; + __pVariantImpl->__data.valueUInt = 0; + __pVariantImpl->__data.valueUInt = value; + } +} + +Variant::Variant(bool value) + : __pVariantImpl(null) +{ + __pVariantImpl = new (std::nothrow) _VariantImpl; + if (__pVariantImpl == null) + { + SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + } + else + { + __pVariantImpl->__type = VARIANT_TYPE_BOOL; + __pVariantImpl->__data.valueBool = true; + __pVariantImpl->__data.valueBool = value; + } +} + +Variant::Variant(float value) + : __pVariantImpl(null) +{ + __pVariantImpl = new (std::nothrow) _VariantImpl; + if (__pVariantImpl == null) + { + SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + } + else + { + __pVariantImpl->__type = VARIANT_TYPE_FLOAT; + __pVariantImpl->__data.valueFloat = 0; + __pVariantImpl->__data.valueFloat = value; + } +} + +Variant::Variant(double value) + : __pVariantImpl(null) +{ + __pVariantImpl = new (std::nothrow) _VariantImpl; + if (__pVariantImpl == null) + { + SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + } + else + { + __pVariantImpl->__type = VARIANT_TYPE_DOUBLE; + __pVariantImpl->__data.valueDouble = 0; + __pVariantImpl->__data.valueDouble = value; + } +} + +Variant::Variant(long value) + : __pVariantImpl(null) +{ + __pVariantImpl = new (std::nothrow) _VariantImpl; + if (__pVariantImpl == null) + { + SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + } + else + { + __pVariantImpl->__type = VARIANT_TYPE_LONG; + __pVariantImpl->__data.valueLong = 0; + __pVariantImpl->__data.valueLong = value; + } +} + +Variant::Variant(unsigned long value) + : __pVariantImpl(null) +{ + __pVariantImpl = new (std::nothrow) _VariantImpl; + if (__pVariantImpl == null) + { + SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + } + else + { + __pVariantImpl->__type = VARIANT_TYPE_ULONG; + __pVariantImpl->__data.valueULong = 0; + __pVariantImpl->__data.valueULong = value; + } +} + +Variant::Variant(long long value) + : __pVariantImpl(null) +{ + __pVariantImpl = new (std::nothrow) _VariantImpl; + if (__pVariantImpl == null) + { + SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + } + else + { + __pVariantImpl->__type = VARIANT_TYPE_LONGLONG; + __pVariantImpl->__data.valueLongLong = 0; + __pVariantImpl->__data.valueLongLong = value; + } +} + +Variant::Variant(unsigned long long value) + : __pVariantImpl(null) +{ + __pVariantImpl = new (std::nothrow) _VariantImpl; + if (__pVariantImpl == null) + { + SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + } + else + { + __pVariantImpl->__type = VARIANT_TYPE_ULONGLONG; + __pVariantImpl->__data.valueULongLong = 0; + __pVariantImpl->__data.valueULongLong = value; + } +} + +Variant::Variant(const char* pValue) + : __pVariantImpl(null) +{ + __pVariantImpl = new (std::nothrow) _VariantImpl; + if (__pVariantImpl == null) + { + SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + } + else + { + __pVariantImpl->__type = VARIANT_TYPE_STRING; + __pVariantImpl->__data.pString = null; + __pVariantImpl->__data.pString = new (std::nothrow) String(pValue); + } +} + +Variant::Variant(const wchar_t* pValue) + : __pVariantImpl(null) +{ + __pVariantImpl = new (std::nothrow) _VariantImpl; + if (__pVariantImpl == null) + { + SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + } + else + { + __pVariantImpl->__type = VARIANT_TYPE_STRING; + __pVariantImpl->__data.pString = null; + __pVariantImpl->__data.pString = new (std::nothrow) String(pValue); + } +} + +Variant::Variant(const String& value) + : __pVariantImpl(null) +{ + __pVariantImpl = new (std::nothrow) _VariantImpl; + if (__pVariantImpl == null) + { + SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + } + else + { + __pVariantImpl->__type = VARIANT_TYPE_STRING; + __pVariantImpl->__data.pString = null; + __pVariantImpl->__data.pString = new (std::nothrow) String(value); + } +} + +Variant::Variant(const DateTime& value) + : __pVariantImpl(null) +{ + __pVariantImpl = new (std::nothrow) _VariantImpl; + if (__pVariantImpl == null) + { + SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + } + else + { + __pVariantImpl->__type = VARIANT_TYPE_DATETIME; + __pVariantImpl->__data.pDateTime = null; + __pVariantImpl->__data.pDateTime = new (std::nothrow) DateTime(value); + } +} + +Variant::Variant(const Color& value) + : __pVariantImpl(null) +{ + __pVariantImpl = new (std::nothrow) _VariantImpl; + if (__pVariantImpl == null) + { + SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + } + else + { + __pVariantImpl->__type = VARIANT_TYPE_COLOR; + __pVariantImpl->__data.pColor = null; + __pVariantImpl->__data.pColor = new (std::nothrow) Color(value); + } +} + +Variant::Variant(const Point& value) + : __pVariantImpl(null) +{ + __pVariantImpl = new (std::nothrow) _VariantImpl; + if (__pVariantImpl == null) + { + SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + } + else + { + __pVariantImpl->__type = VARIANT_TYPE_POINT; + __pVariantImpl->__data.pPoint = null; + __pVariantImpl->__data.pPoint = new (std::nothrow) Point(value); + } +} + +Variant::Variant(const FloatPoint& value) + : __pVariantImpl(null) +{ + __pVariantImpl = new (std::nothrow) _VariantImpl; + if (__pVariantImpl == null) + { + SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + } + else + { + __pVariantImpl->__type = VARIANT_TYPE_FLOAT_POINT; + __pVariantImpl->__data.pFloatPoint = null; + __pVariantImpl->__data.pFloatPoint = new (std::nothrow) FloatPoint(value); + } +} + +Variant::Variant(const Rectangle& value) + : __pVariantImpl(null) +{ + __pVariantImpl = new (std::nothrow) _VariantImpl; + if (__pVariantImpl == null) + { + SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + } + else + { + __pVariantImpl->__type = VARIANT_TYPE_RECTANGLE; + __pVariantImpl->__data.pRect = null; + __pVariantImpl->__data.pRect = new (std::nothrow) Rectangle(value); + } +} + +Variant::Variant(const FloatRectangle& value) + : __pVariantImpl(null) +{ + __pVariantImpl = new (std::nothrow) _VariantImpl; + if (__pVariantImpl == null) + { + SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + } + else + { + __pVariantImpl->__type = VARIANT_TYPE_FLOAT_RECTANGLE; + __pVariantImpl->__data.pRectf = null; + __pVariantImpl->__data.pRectf = new (std::nothrow) FloatRectangle(value); + } +} + +Variant::Variant(const Dimension& value) + : __pVariantImpl(null) +{ + __pVariantImpl = new (std::nothrow) _VariantImpl; + if (__pVariantImpl == null) + { + SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + } + else + { + __pVariantImpl->__type = VARIANT_TYPE_DIMENSION; + __pVariantImpl->__data.pDimension = null; + __pVariantImpl->__data.pDimension = new (std::nothrow) Dimension(value); + } +} + +Variant::Variant(const FloatDimension& value) + : __pVariantImpl(null) +{ + __pVariantImpl = new (std::nothrow) _VariantImpl; + if (__pVariantImpl == null) + { + SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + } + else + { + __pVariantImpl->__type = VARIANT_TYPE_FLOAT_DIMENSION; + __pVariantImpl->__data.pFloatDimension = null; + __pVariantImpl->__data.pFloatDimension = new (std::nothrow) FloatDimension(value); + } +} + +Variant::Variant(const FloatMatrix4& value) + : __pVariantImpl(null) +{ + __pVariantImpl = new (std::nothrow) _VariantImpl; + if (__pVariantImpl == null) + { + SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + } + else + { + __pVariantImpl->__type = VARIANT_TYPE_FLOAT_MATRIX4; + __pVariantImpl->__data.pFloatMatrix4 = null; + __pVariantImpl->__data.pFloatMatrix4 = new (std::nothrow) FloatMatrix4(value); + } +} + +Variant::Variant(const Tizen::Graphics::FloatPoint3& value) + : __pVariantImpl(null) +{ + __pVariantImpl = new (std::nothrow) _VariantImpl; + if (__pVariantImpl == null) + { + SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + } + else + { + __pVariantImpl->__type = VARIANT_TYPE_FLOAT_POINT3; + __pVariantImpl->__data.pFloatPoint3 = null; + __pVariantImpl->__data.pFloatPoint3 = new (std::nothrow) FloatPoint3(value); + } +} + +Variant::Variant(const Tizen::Graphics::FloatVector4& value) + : __pVariantImpl(null) +{ + __pVariantImpl = new (std::nothrow) _VariantImpl; + if (__pVariantImpl == null) + { + SysLogException(NID_UI, E_SYSTEM, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + } + else + { + __pVariantImpl->__type = VARIANT_TYPE_FLOAT_VECTOR4; + __pVariantImpl->__data.pFloatVector4 = null; + __pVariantImpl->__data.pFloatVector4 = new (std::nothrow) FloatVector4(value); + } +} + +// Assignment Operators +Variant& +Variant::operator =(const Variant& rhs) +{ + if (&rhs != this) + { + if (__pVariantImpl && rhs.__pVariantImpl && __pVariantImpl != rhs.__pVariantImpl) + { + __pVariantImpl->Release(); + __pVariantImpl = rhs.__pVariantImpl; + __pVariantImpl->AddRef(); + } + } + return (*this); +} + +#define CREATE_VARIANT_IMPL(type, member, value) \ + do { \ + if (!__pVariantImpl || __pVariantImpl->__type != type) \ + { \ + _VariantImpl* pImpl = new (std::nothrow) _VariantImpl; \ + if (likely(pImpl)) \ + { \ + pImpl->__type = type; \ + pImpl->__data.member = value; \ + delete __pVariantImpl; \ + __pVariantImpl = pImpl; \ + } \ + } \ + else \ + { \ + /* __pVariantImpl != null && __pVariantImpl->__type == type */ \ + __pVariantImpl->__data.member = value; \ + } \ + } while (0); + +#define CREATE_VARIANT_IMPL_DELETE_PREVIOUS_VALE(type, member, value) \ + do { \ + if (!__pVariantImpl || __pVariantImpl->__type != type) \ + { \ + _VariantImpl* pImpl = new (std::nothrow) _VariantImpl; \ + if (likely(pImpl)) \ + { \ + pImpl->__type = type; \ + pImpl->__data.member = value; \ + delete __pVariantImpl; \ + __pVariantImpl = pImpl; \ + } \ + } \ + else \ + { \ + /* __pVariantImpl != null && __pVariantImpl->__type == type */ \ + delete __pVariantImpl->__data.member; \ + __pVariantImpl->__data.member = value; \ + } \ + } while (0); + +Variant& +Variant::operator =(int rhs) +{ + CREATE_VARIANT_IMPL(VARIANT_TYPE_INT, valueInt, rhs); + + return (*this); +} + +Variant& +Variant::operator =(unsigned int rhs) +{ + CREATE_VARIANT_IMPL(VARIANT_TYPE_UINT, valueUInt, rhs); + + return (*this); +} + +Variant& +Variant::operator =(bool rhs) +{ + CREATE_VARIANT_IMPL(VARIANT_TYPE_BOOL, valueBool, rhs); + + return (*this); +} + +Variant& +Variant::operator =(float rhs) +{ + CREATE_VARIANT_IMPL(VARIANT_TYPE_FLOAT, valueFloat, rhs); + + return (*this); +} + +Variant& +Variant::operator =(double rhs) +{ + CREATE_VARIANT_IMPL(VARIANT_TYPE_DOUBLE, valueDouble, rhs); + + return (*this); +} + +Variant& +Variant::operator =(long rhs) +{ + CREATE_VARIANT_IMPL(VARIANT_TYPE_LONG, valueLong, rhs); + + return (*this); +} + +Variant& +Variant::operator =(unsigned long rhs) +{ + CREATE_VARIANT_IMPL(VARIANT_TYPE_ULONG, valueULong, rhs); + + return (*this); +} + +Variant& +Variant::operator =(long long rhs) +{ + CREATE_VARIANT_IMPL(VARIANT_TYPE_LONGLONG, valueLongLong, rhs); + + return (*this); +} + +Variant& +Variant::operator =(unsigned long long rhs) +{ + CREATE_VARIANT_IMPL(VARIANT_TYPE_ULONGLONG, valueLongLong, rhs); + + return (*this); +} + +Variant& +Variant::operator =(const char* pRhs) +{ + String* pString = new (std::nothrow) String(pRhs); + CREATE_VARIANT_IMPL_DELETE_PREVIOUS_VALE(VARIANT_TYPE_STRING, pString, pString); + + return (*this); +} + +Variant& +Variant::operator =(const wchar_t* pRhs) +{ + String* pString = new (std::nothrow) String(pRhs); + CREATE_VARIANT_IMPL_DELETE_PREVIOUS_VALE(VARIANT_TYPE_STRING, pString, pString); + + return (*this); +} + +Variant& +Variant::operator =(const String& rhs) +{ + String* pString = new (std::nothrow) String(rhs); + CREATE_VARIANT_IMPL_DELETE_PREVIOUS_VALE(VARIANT_TYPE_STRING, pString, pString); + + return (*this); +} + +Variant& +Variant::operator =(const DateTime& rhs) +{ + DateTime* pDateTime = new (std::nothrow) DateTime(rhs); + CREATE_VARIANT_IMPL_DELETE_PREVIOUS_VALE(VARIANT_TYPE_DATETIME, pDateTime, pDateTime); + + return (*this); +} + +Variant& +Variant::operator =(const Color& rhs) +{ + Color* pColor = new (std::nothrow) Color(rhs); + CREATE_VARIANT_IMPL_DELETE_PREVIOUS_VALE(VARIANT_TYPE_COLOR, pColor, pColor); + + return (*this); +} + +Variant& +Variant::operator =(const Point& rhs) +{ + Point* pPoint = new (std::nothrow) Point(rhs); + CREATE_VARIANT_IMPL_DELETE_PREVIOUS_VALE(VARIANT_TYPE_POINT, pPoint, pPoint); + + return (*this); +} + +Variant& +Variant::operator =(const FloatPoint& rhs) +{ + FloatPoint* pFloatPoint = new (std::nothrow) FloatPoint(rhs); + CREATE_VARIANT_IMPL_DELETE_PREVIOUS_VALE(VARIANT_TYPE_FLOAT_POINT, pFloatPoint, pFloatPoint); + + return (*this); +} + +Variant& +Variant::operator =(const Rectangle& rhs) +{ + Rectangle* pRectangle = new (std::nothrow) Rectangle(rhs); + CREATE_VARIANT_IMPL_DELETE_PREVIOUS_VALE(VARIANT_TYPE_RECTANGLE, pRect, pRectangle); + + return (*this); +} + +Variant& +Variant::operator =(const FloatRectangle& rhs) +{ + FloatRectangle* pFloatRectangle = new (std::nothrow) FloatRectangle(rhs); + CREATE_VARIANT_IMPL_DELETE_PREVIOUS_VALE(VARIANT_TYPE_FLOAT_RECTANGLE, pRectf, pFloatRectangle); + + return (*this); +} + +Variant& +Variant::operator =(const Dimension& rhs) +{ + + Dimension* pDimension = new (std::nothrow) Dimension(rhs); + CREATE_VARIANT_IMPL_DELETE_PREVIOUS_VALE(VARIANT_TYPE_DIMENSION, pDimension, pDimension); + + return (*this); +} + +Variant& +Variant::operator =(const FloatDimension& rhs) +{ + FloatDimension* pFloatDimension = new (std::nothrow) FloatDimension(rhs); + CREATE_VARIANT_IMPL_DELETE_PREVIOUS_VALE(VARIANT_TYPE_FLOAT_DIMENSION, pFloatDimension, pFloatDimension); + + return (*this); +} + +Variant& +Variant::operator =(const FloatMatrix4& rhs) +{ + FloatMatrix4* pFloatMatrix4 = new (std::nothrow) FloatMatrix4(rhs); + CREATE_VARIANT_IMPL_DELETE_PREVIOUS_VALE(VARIANT_TYPE_FLOAT_MATRIX4, pFloatMatrix4, pFloatMatrix4); + + return (*this); +} + +Variant& +Variant::operator =(const Tizen::Graphics::FloatPoint3& rhs) +{ + FloatPoint3* pFloatPoint3 = new (std::nothrow) FloatPoint3(rhs); + CREATE_VARIANT_IMPL_DELETE_PREVIOUS_VALE(VARIANT_TYPE_FLOAT_POINT3, pFloatPoint3, pFloatPoint3); + + return (*this); +} + +Variant& +Variant::operator =(const Tizen::Graphics::FloatVector4& rhs) +{ + FloatVector4* pFloatVector4 = new (std::nothrow) FloatVector4(rhs); + CREATE_VARIANT_IMPL_DELETE_PREVIOUS_VALE(VARIANT_TYPE_FLOAT_VECTOR4, pFloatVector4, pFloatVector4); + + return (*this); +} + +bool +operator ==(const Variant& lhs, const Variant& rhs) +{ + const _VariantImpl* pLhsImpl = lhs.GetVariantImpl(); + const _VariantImpl* pRhsImpl = rhs.GetVariantImpl(); + + if (pLhsImpl == null || pRhsImpl == null) + { + return false; + } + + if (pLhsImpl == pRhsImpl) + { + return true; + } + + if (pLhsImpl->__type != pRhsImpl->__type) + { + return false; + } + + switch (pLhsImpl->__type) + { + case VARIANT_TYPE_INT: + return pLhsImpl->__data.valueInt == pRhsImpl->__data.valueInt; + + case VARIANT_TYPE_UINT: + return pLhsImpl->__data.valueUInt == pRhsImpl->__data.valueUInt; + + case VARIANT_TYPE_BOOL: + return pLhsImpl->__data.valueBool == pRhsImpl->__data.valueBool; + + case VARIANT_TYPE_FLOAT: + return pLhsImpl->__data.valueFloat == pRhsImpl->__data.valueFloat; + + case VARIANT_TYPE_DOUBLE: + return pLhsImpl->__data.valueDouble == pRhsImpl->__data.valueDouble; + + case VARIANT_TYPE_LONG: + return pLhsImpl->__data.valueLong == pRhsImpl->__data.valueLong; + + case VARIANT_TYPE_ULONG: + return pLhsImpl->__data.valueULong == pRhsImpl->__data.valueULong; + + case VARIANT_TYPE_LONGLONG: + return pLhsImpl->__data.valueLongLong == pRhsImpl->__data.valueLongLong; + + case VARIANT_TYPE_ULONGLONG: + return pLhsImpl->__data.valueULongLong == pRhsImpl->__data.valueULongLong; + + case VARIANT_TYPE_STRING: + { + if (pLhsImpl->__data.pString) + { + return (*pLhsImpl->__data.pString == *pRhsImpl->__data.pString); + } + else + { + return false; + } + } + + case VARIANT_TYPE_DATETIME: + { + if (pLhsImpl->__data.pDateTime) + { + return *pLhsImpl->__data.pDateTime == *pRhsImpl->__data.pDateTime; + } + else + { + return false; + } + } + + case VARIANT_TYPE_COLOR: + { + if (pLhsImpl->__data.pColor) + { + return *pLhsImpl->__data.pColor == *pRhsImpl->__data.pColor; + } + else + { + return false; + } + } + + case VARIANT_TYPE_POINT: + { + if (pLhsImpl->__data.pPoint) + { + return *pLhsImpl->__data.pPoint == *pRhsImpl->__data.pPoint; + } + else + { + return false; + } + } + + case VARIANT_TYPE_FLOAT_POINT: + { + if (pLhsImpl->__data.pFloatPoint) + { + return *pLhsImpl->__data.pFloatPoint == *pRhsImpl->__data.pFloatPoint; + } + else + { + return false; + } + } + + case VARIANT_TYPE_RECTANGLE: + { + if (pLhsImpl->__data.pRect) + { + return *pLhsImpl->__data.pRect == *pRhsImpl->__data.pRect; + } + else + { + return false; + } + } + + case VARIANT_TYPE_FLOAT_RECTANGLE: + { + if (pLhsImpl->__data.pRectf) + { + return *pLhsImpl->__data.pRectf == *pRhsImpl->__data.pRectf; + } + else + { + return false; + } + } + + case VARIANT_TYPE_DIMENSION: + { + if (pLhsImpl->__data.pDimension) + { + return *pLhsImpl->__data.pDimension == *pRhsImpl->__data.pDimension; + } + else + { + return false; + } + } + + case VARIANT_TYPE_FLOAT_DIMENSION: + { + if (pLhsImpl->__data.pFloatDimension) + { + return *pLhsImpl->__data.pFloatDimension == *pRhsImpl->__data.pFloatDimension; + } + else + { + return false; + } + } + + case VARIANT_TYPE_FLOAT_MATRIX4: + { + if (pLhsImpl->__data.pFloatMatrix4) + { + return *pLhsImpl->__data.pFloatMatrix4 == *pRhsImpl->__data.pFloatMatrix4; + } + else + { + return false; + } + } + + case VARIANT_TYPE_FLOAT_POINT3: + { + if (pLhsImpl->__data.pFloatPoint3) + { + return *pLhsImpl->__data.pFloatPoint3 == *pRhsImpl->__data.pFloatPoint3; + } + else + { + return false; + } + } + + case VARIANT_TYPE_FLOAT_VECTOR4: + { + if (pLhsImpl->__data.pFloatVector4) + { + return *pLhsImpl->__data.pFloatVector4 == *pRhsImpl->__data.pFloatVector4; + } + else + { + return false; + } + } + + case VARIANT_TYPE_NONE: + return pLhsImpl->__type == pRhsImpl->__type; + + default: + return false; + } + + return false; +} + +bool +operator !=(const Variant& lhs, const Variant& rhs) +{ + return !(lhs == rhs); +} + +int +Variant::ToInt(void) const +{ + const _VariantImpl* pImpl = GetVariantImpl(); + if (pImpl) + { + if (!pImpl->IsSameType(VARIANT_TYPE_INT)) + { + SysLogException(NID_UI, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The current variant type is not VARIANT_TYPE_INT."); + } + else + { + return pImpl->__data.valueInt; + } + } + + return 0; +} + +unsigned int +Variant::ToUInt(void) const +{ + const _VariantImpl* pImpl = GetVariantImpl(); + if (pImpl) + { + if (!pImpl->IsSameType(VARIANT_TYPE_UINT)) + { + SysLogException(NID_UI, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The current variant type is not VARIANT_TYPE_UINT."); + } + else + { + return pImpl->__data.valueUInt; + } + } + return 0; +} + +bool +Variant::ToBool(void) const +{ + const _VariantImpl* pImpl = GetVariantImpl(); + if (pImpl) + { + if (!pImpl->IsSameType(VARIANT_TYPE_BOOL)) + { + SysLogException(NID_UI, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The current variant type is not VARIANT_TYPE_BOOL."); + } + else + { + return pImpl->__data.valueBool; + } + } + + return false; +} + +float +Variant::ToFloat(void) const +{ + const _VariantImpl* pImpl = GetVariantImpl(); + if (pImpl) + { + if (!pImpl->IsSameType(VARIANT_TYPE_FLOAT)) + { + SysLogException(NID_UI, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The current variant type is not VARIANT_TYPE_FLOAT."); + } + else + { + return pImpl->__data.valueFloat; + } + } + + return 0; +} + +double +Variant::ToDouble(void) const +{ + const _VariantImpl* pImpl = GetVariantImpl(); + if (pImpl) + { + if (!pImpl->IsSameType(VARIANT_TYPE_DOUBLE)) + { + SysLogException(NID_UI, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The current variant type is not VARIANT_TYPE_DOUBLE."); + } + else + { + return pImpl->__data.valueDouble; + } + } + + return 0; +} + +long +Variant::ToLong(void) const +{ + const _VariantImpl* pImpl = GetVariantImpl(); + if (pImpl) + { + if (!pImpl->IsSameType(VARIANT_TYPE_LONG)) + { + SysLogException(NID_UI, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The current variant type is not VARIANT_TYPE_LONG."); + } + else + { + return pImpl->__data.valueLong; + } + } + + return 0; +} + +unsigned long +Variant::ToULong(void) const +{ + const _VariantImpl* pImpl = GetVariantImpl(); + if (pImpl) + { + if (!pImpl->IsSameType(VARIANT_TYPE_ULONG)) + { + SysLogException(NID_UI, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The current variant type is not VARIANT_TYPE_ULONG."); + } + else + { + return pImpl->__data.valueULong; + } + } + + return 0; +} + +long long +Variant::ToLongLong(void) const +{ + const _VariantImpl* pImpl = GetVariantImpl(); + if (pImpl) + { + if (!pImpl->IsSameType(VARIANT_TYPE_LONGLONG)) + { + SysLogException(NID_UI, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The current variant type is not VARIANT_TYPE_LONGLONG."); + } + else + { + return pImpl->__data.valueLongLong; + } + } + + return 0; +} + +unsigned long long +Variant::ToULongLong(void) const +{ + const _VariantImpl* pImpl = GetVariantImpl(); + if (pImpl) + { + if (!pImpl->IsSameType(VARIANT_TYPE_ULONGLONG)) + { + SysLogException(NID_UI, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The current variant type is not VARIANT_TYPE_ULONGLONG."); + } + else + { + return pImpl->__data.valueULongLong; + } + } + + return 0; +} + +String +Variant::ToString(void) const +{ + const _VariantImpl* pImpl = GetVariantImpl(); + if (pImpl) + { + if (!pImpl->IsSameType(VARIANT_TYPE_STRING)) + { + SysLogException(NID_UI, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The current variant type is not VARIANT_TYPE_STRING."); + } + else + { + return *pImpl->__data.pString; + } + } + + return String(""); +} + +DateTime +Variant::ToDateTime(void) const +{ + const _VariantImpl* pImpl = GetVariantImpl(); + if (pImpl) + { + if (!pImpl->IsSameType(VARIANT_TYPE_DATETIME)) + { + SysLogException(NID_UI, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The current variant type is not VARIANT_TYPE_DATETIME."); + } + else + { + return *pImpl->__data.pDateTime; + } + } + + return DateTime(); +} + +Color +Variant::ToColor(void) const +{ + const _VariantImpl* pImpl = GetVariantImpl(); + if (pImpl) + { + if (!pImpl->IsSameType(VARIANT_TYPE_COLOR)) + { + SysLogException(NID_UI, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The current variant type is not VARIANT_TYPE_COLOR."); + } + else + { + return *pImpl->__data.pColor; + } + } + + return Color(); +} + +Point +Variant::ToPoint(void) const +{ + const _VariantImpl* pImpl = GetVariantImpl(); + if (pImpl) + { + if (!pImpl->IsSameType(VARIANT_TYPE_POINT)) + { + SysLogException(NID_UI, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The current variant type is not VARIANT_TYPE_POINT."); + } + else + { + return *pImpl->__data.pPoint; + } + } + + return Point(); +} + +FloatPoint +Variant::ToFloatPoint(void) const +{ + const _VariantImpl* pImpl = GetVariantImpl(); + if (pImpl) + { + if (!pImpl->IsSameType(VARIANT_TYPE_FLOAT_POINT)) + { + SysLogException(NID_UI, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The current variant type is not VARIANT_TYPE_FLOATPOINT."); + } + else + { + return *pImpl->__data.pFloatPoint; + } + } + + return FloatPoint(); +} + +Rectangle +Variant::ToRectangle(void) const +{ + const _VariantImpl* pImpl = GetVariantImpl(); + if (pImpl) + { + if (!pImpl->IsSameType(VARIANT_TYPE_RECTANGLE)) + { + SysLogException(NID_UI, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The current variant type is not VARIANT_TYPE_RECTANGLE."); + } + else + { + return *pImpl->__data.pRect; + } + } + + return Rectangle(); +} + +FloatRectangle +Variant::ToFloatRectangle(void) const +{ + const _VariantImpl* pImpl = GetVariantImpl(); + if (pImpl) + { + if (!pImpl->IsSameType(VARIANT_TYPE_FLOAT_RECTANGLE)) + { + SysLogException(NID_UI, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The current variant type is not VARIANT_TYPE_FLOAT_RECTANGLE."); + } + else + { + return *pImpl->__data.pRectf; + } + } + + return FloatRectangle(); +} + +Dimension +Variant::ToDimension(void) const +{ + const _VariantImpl* pImpl = GetVariantImpl(); + if (pImpl) + { + if (!pImpl->IsSameType(VARIANT_TYPE_DIMENSION)) + { + SysLogException(NID_UI, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The current variant type is not VARIANT_TYPE_DIMENSION."); + } + else + { + return *pImpl->__data.pDimension; + } + } + + return Dimension(); +} + +FloatDimension +Variant::ToFloatDimension(void) const +{ + const _VariantImpl* pImpl = GetVariantImpl(); + if (pImpl) + { + if (!pImpl->IsSameType(VARIANT_TYPE_FLOAT_DIMENSION)) + { + SysLogException(NID_UI, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The current variant type is not VARIANT_TYPE_FLOAT_DIMENSION."); + } + else + { + return *pImpl->__data.pFloatDimension; + } + } + + return FloatDimension(); +} + +FloatMatrix4 +Variant::ToFloatMatrix4(void) const +{ + const _VariantImpl* pImpl = GetVariantImpl(); + if (pImpl) + { + if (!pImpl->IsSameType(VARIANT_TYPE_FLOAT_MATRIX4)) + { + SysLogException(NID_UI, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The current variant type is not VARIANT_TYPE_FLOAT_MATRIX4."); + } + else + { + return *pImpl->__data.pFloatMatrix4; + } + } + + return FloatMatrix4(); +} + +FloatPoint3 +Variant::ToFloatPoint3(void) const +{ + const _VariantImpl* pImpl = GetVariantImpl(); + if (pImpl) + { + if (!pImpl->IsSameType(VARIANT_TYPE_FLOAT_POINT3)) + { + SysLogException(NID_UI, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The current variant type is not VARIANT_TYPE_FLOAT_POINT3."); + } + else + { + return *pImpl->__data.pFloatPoint3; + } + } + + return FloatPoint3(); +} + +FloatVector4 +Variant::ToFloatVector4(void) const +{ + const _VariantImpl* pImpl = GetVariantImpl(); + if (pImpl) + { + if (!pImpl->IsSameType(VARIANT_TYPE_FLOAT_VECTOR4)) + { + SysLogException(NID_UI, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The current variant type is not VARIANT_TYPE_FLOAT_VECTOR4."); + } + else + { + return *pImpl->__data.pFloatVector4; + } + } + + return FloatVector4(); +} + +bool +Variant::IsEmpty(void) const +{ + const _VariantImpl* pImpl = GetVariantImpl(); + if (pImpl) + { + return pImpl->__type == VARIANT_TYPE_NONE; + } + + return true; +} + +VariantType +Variant::GetType() const +{ + const _VariantImpl* pImpl = GetVariantImpl(); + if (pImpl) + { + return pImpl->__type; + } + + return VARIANT_TYPE_NONE; +} + +bool +Variant::Equals(const Object& obj) const +{ + const Variant* pOther = dynamic_cast (&obj); + if (pOther == null) + { + return (false); + } + + return (*this == *pOther); +} + +int +Variant::GetHashCode(void) const +{ + const _VariantImpl* pImpl = GetVariantImpl(); + + switch (pImpl->__type) + { + case VARIANT_TYPE_INT: + return (int) pImpl->__data.valueInt; + + case VARIANT_TYPE_UINT: + return (int) pImpl->__data.valueUInt; + + case VARIANT_TYPE_BOOL: + return (int) pImpl->__data.valueBool; + + case VARIANT_TYPE_FLOAT: + return (int) pImpl->__data.valueFloat; + + case VARIANT_TYPE_DOUBLE: + return (int) pImpl->__data.valueDouble; + + case VARIANT_TYPE_LONG: + return (int) pImpl->__data.valueLong; + + case VARIANT_TYPE_ULONG: + return (int) pImpl->__data.valueULong; + + case VARIANT_TYPE_LONGLONG: + return (int) pImpl->__data.valueLongLong; + + case VARIANT_TYPE_ULONGLONG: + return (int) pImpl->__data.valueULongLong; + + case VARIANT_TYPE_STRING: + { + if (pImpl->__data.pString) + { + return pImpl->__data.pString->GetHashCode(); + } + else + { + break; + } + } + + case VARIANT_TYPE_DATETIME: + { + if (pImpl->__data.pDateTime) + { + return (pImpl->__data.pDateTime)->GetHashCode(); + } + else + { + break; + } + } + + case VARIANT_TYPE_COLOR: + { + if (pImpl->__data.pPoint) + { + return (pImpl->__data.pColor)->GetHashCode(); + } + else + { + break; + } + } + + case VARIANT_TYPE_POINT: + { + if (pImpl->__data.pPoint) + { + return (pImpl->__data.pPoint)->GetHashCode(); + } + else + { + break; + } + } + + case VARIANT_TYPE_FLOAT_POINT: + { + if (pImpl->__data.pFloatPoint) + { + return (pImpl->__data.pFloatPoint)->GetHashCode(); + } + else + { + break; + } + } + + case VARIANT_TYPE_RECTANGLE: + { + if (pImpl->__data.pRect) + { + return (pImpl->__data.pRect)->GetHashCode(); + } + else + { + break; + } + } + + case VARIANT_TYPE_FLOAT_RECTANGLE: + { + if (pImpl->__data.pRectf) + { + return (pImpl->__data.pRectf)->GetHashCode(); + } + else + { + break; + } + } + + case VARIANT_TYPE_DIMENSION: + { + if (pImpl->__data.pDimension) + { + return (pImpl->__data.pDimension)->GetHashCode(); + } + else + { + break; + } + } + + case VARIANT_TYPE_FLOAT_DIMENSION: + { + if (pImpl->__data.pFloatDimension) + { + return (pImpl->__data.pFloatDimension)->GetHashCode(); + } + else + { + break; + } + } + + case VARIANT_TYPE_FLOAT_MATRIX4: + { + if (pImpl->__data.pFloatMatrix4) + { + return (pImpl->__data.pFloatMatrix4)->GetHashCode(); + } + else + { + break; + } + } + + case VARIANT_TYPE_FLOAT_POINT3: + { + if (pImpl->__data.pFloatPoint3) + { + return (pImpl->__data.pFloatPoint3)->GetHashCode(); + } + else + { + break; + } + } + + case VARIANT_TYPE_FLOAT_VECTOR4: + { + if (pImpl->__data.pFloatVector4) + { + return (pImpl->__data.pFloatVector4)->GetHashCode(); + } + else + { + break; + } + } + + case VARIANT_TYPE_NONE: + default: + break; + } + + return 0; +} + +const _VariantImpl* +Variant::GetVariantImpl(void) const +{ + return static_cast (__pVariantImpl); +} + +_VariantImpl* +Variant::GetVariantImpl(void) +{ + return __pVariantImpl; +} + +} } //Tizen::Ui diff --git a/src/ui/FUiVerticalBoxLayout.cpp b/src/ui/FUiVerticalBoxLayout.cpp new file mode 100644 index 0000000..1544196 --- /dev/null +++ b/src/ui/FUiVerticalBoxLayout.cpp @@ -0,0 +1,310 @@ +// +// 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 FUiVerticalBoxLayout.cpp + * @brief This is the implementation file for VerticalBoxLayout class. + * + * This file contains the implementation of VerticalBoxLayout class. + */ + +#include +#include +#include +#include "FUi_VerticalBoxLayoutImpl.h" +#include "FUi_CoordinateSystemUtils.h" + +namespace Tizen { namespace Ui +{ + +VerticalBoxLayout::VerticalBoxLayout() +{ +} + +VerticalBoxLayout::~VerticalBoxLayout() +{ +} + +result +VerticalBoxLayout::Construct(VerticalDirection direction) +{ + ClearLastResult(); + + _VerticalBoxLayoutImpl* pVerticalBoxLayoutImpl = _VerticalBoxLayoutImpl::GetInstance(*this); + SysAssertf(pVerticalBoxLayoutImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + pVerticalBoxLayoutImpl = _VerticalBoxLayoutImpl::CreateVerticalBoxLayoutImplN(this, direction); + result r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _LayoutImpl::SetLayoutImpl(this, pVerticalBoxLayoutImpl); + + return E_SUCCESS; +} + +Tizen::Ui::LayoutType +VerticalBoxLayout::GetLayoutType(void) const +{ + return LAYOUT_VERTICAL_BOX; +} + +result +VerticalBoxLayout::GetDirection(VerticalDirection& direction) const +{ + ClearLastResult(); + + const _VerticalBoxLayoutImpl* pVerticalBoxLayoutImpl = _VerticalBoxLayoutImpl::GetInstance(*this); + SysAssertf(pVerticalBoxLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + result r = pVerticalBoxLayoutImpl->GetDirection(direction); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +VerticalBoxLayout::SetHorizontalAlignment(Control& childControl, LayoutHorizontalAlignment alignment) +{ + ClearLastResult(); + + _VerticalBoxLayoutImpl* pVerticalBoxLayoutImpl = _VerticalBoxLayoutImpl::GetInstance(*this); + SysAssertf(pVerticalBoxLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(childControl); + SysTryReturn(NID_UI, pControlImpl, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This instance is not constructed."); + + result r = pVerticalBoxLayoutImpl->SetHorizontalAlignment(*pControlImpl, alignment); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +VerticalBoxLayout::SetSpacing(Control& childControl, int space) +{ + ClearLastResult(); + + SysTryReturn(NID_UI, space >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The given parameter is invalid."); + + _VerticalBoxLayoutImpl* pVerticalBoxLayoutImpl = _VerticalBoxLayoutImpl::GetInstance(*this); + SysAssertf(pVerticalBoxLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(childControl); + SysTryReturn(NID_UI, pControlImpl, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This instance is not constructed."); + + result r = pVerticalBoxLayoutImpl->SetSpacing(*pControlImpl, _CoordinateSystemUtils::ConvertToFloat(space)); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +VerticalBoxLayout::SetSpacing(Control& childControl, float space) +{ + ClearLastResult(); + + SysTryReturn(NID_UI, space >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The given parameter is invalid."); + + _VerticalBoxLayoutImpl* pVerticalBoxLayoutImpl = _VerticalBoxLayoutImpl::GetInstance(*this); + SysAssertf(pVerticalBoxLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(childControl); + SysTryReturn(NID_UI, pControlImpl, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This instance is not constructed."); + + result r = pVerticalBoxLayoutImpl->SetSpacing(*pControlImpl, space); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +VerticalBoxLayout::SetHorizontalMargin(Control& childControl, int left, int right) +{ + ClearLastResult(); + + SysTryReturn(NID_UI, (left >= 0) && (right >= 0), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The given parameter is invalid."); + + _VerticalBoxLayoutImpl* pVerticalBoxLayoutImpl = _VerticalBoxLayoutImpl::GetInstance(*this); + SysAssertf(pVerticalBoxLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(childControl); + SysTryReturn(NID_UI, pControlImpl, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This instance is not constructed."); + + float floatLeft = _CoordinateSystemUtils::ConvertToFloat(left); + float floatRight = _CoordinateSystemUtils::ConvertToFloat(right); + result r = pVerticalBoxLayoutImpl->SetHorizontalMargin(*pControlImpl, floatLeft, floatRight); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +VerticalBoxLayout::SetHorizontalMargin(Control& childControl, float left, float right) +{ + ClearLastResult(); + + SysTryReturn(NID_UI, (left >= 0) && (right >= 0), E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The given parameter is invalid."); + + _VerticalBoxLayoutImpl* pVerticalBoxLayoutImpl = _VerticalBoxLayoutImpl::GetInstance(*this); + SysAssertf(pVerticalBoxLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(childControl); + SysTryReturn(NID_UI, pControlImpl, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This instance is not constructed."); + + result r = pVerticalBoxLayoutImpl->SetHorizontalMargin(*pControlImpl, left, right); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +VerticalBoxLayout::SetWidth(Control& childControl, int width) +{ + ClearLastResult(); + + SysTryReturn(NID_UI, width >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The given parameter is invalid."); + + _VerticalBoxLayoutImpl* pVerticalBoxLayoutImpl = _VerticalBoxLayoutImpl::GetInstance(*this); + SysAssertf(pVerticalBoxLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(childControl); + SysTryReturn(NID_UI, pControlImpl, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This instance is not constructed."); + + result r = pVerticalBoxLayoutImpl->SetWidth(*pControlImpl, _CoordinateSystemUtils::ConvertToFloat(width)); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +VerticalBoxLayout::SetWidth(Control& childControl, float width) +{ + ClearLastResult(); + + SysTryReturn(NID_UI, width >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The given parameter is invalid."); + + _VerticalBoxLayoutImpl* pVerticalBoxLayoutImpl = _VerticalBoxLayoutImpl::GetInstance(*this); + SysAssertf(pVerticalBoxLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(childControl); + SysTryReturn(NID_UI, pControlImpl, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This instance is not constructed."); + + result r = pVerticalBoxLayoutImpl->SetWidth(*pControlImpl, width); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +VerticalBoxLayout::SetHorizontalFitPolicy(Control& childControl, FitPolicy policy) +{ + ClearLastResult(); + + _VerticalBoxLayoutImpl* pVerticalBoxLayoutImpl = _VerticalBoxLayoutImpl::GetInstance(*this); + SysAssertf(pVerticalBoxLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(childControl); + SysTryReturn(NID_UI, pControlImpl, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This instance is not constructed."); + + result r = pVerticalBoxLayoutImpl->SetItemHorizontalFitPolicy(*pControlImpl, policy); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +VerticalBoxLayout::SetHeight(Control& childControl, int height) +{ + ClearLastResult(); + + SysTryReturn(NID_UI, height >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The given parameter is invalid."); + + _VerticalBoxLayoutImpl* pVerticalBoxLayoutImpl = _VerticalBoxLayoutImpl::GetInstance(*this); + SysAssertf(pVerticalBoxLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(childControl); + SysTryReturn(NID_UI, pControlImpl, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This instance is not constructed."); + + result r = pVerticalBoxLayoutImpl->SetHeight(*pControlImpl, _CoordinateSystemUtils::ConvertToFloat(height)); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +VerticalBoxLayout::SetHeight(Control& childControl, float height) +{ + ClearLastResult(); + + SysTryReturn(NID_UI, height >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The given parameter is invalid."); + + _VerticalBoxLayoutImpl* pVerticalBoxLayoutImpl = _VerticalBoxLayoutImpl::GetInstance(*this); + SysAssertf(pVerticalBoxLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(childControl); + SysTryReturn(NID_UI, pControlImpl, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This instance is not constructed."); + + result r = pVerticalBoxLayoutImpl->SetHeight(*pControlImpl, height); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +VerticalBoxLayout::SetVerticalFitPolicy(Control& childControl, FitPolicy policy) +{ + ClearLastResult(); + + _VerticalBoxLayoutImpl* pVerticalBoxLayoutImpl = _VerticalBoxLayoutImpl::GetInstance(*this); + SysAssertf(pVerticalBoxLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(childControl); + SysTryReturn(NID_UI, pControlImpl, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This instance is not constructed."); + + if (!Tizen::App::_AppInfo::IsOspCompat()) + { + if (policy == FIT_POLICY_PARENT) + { + return E_SUCCESS; + } + } + + result r = pVerticalBoxLayoutImpl->SetItemVerticalFitPolicy(*pControlImpl, policy); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +VerticalBoxLayout::SetWeight(Control& childControl, float weight) +{ + ClearLastResult(); + + _VerticalBoxLayoutImpl* pVerticalBoxLayoutImpl = _VerticalBoxLayoutImpl::GetInstance(*this); + SysAssertf(pVerticalBoxLayoutImpl != null, "Not yet constructed. Construct() should be called before use."); + + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(childControl); + SysTryReturn(NID_UI, pControlImpl, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] This instance is not constructed."); + + SysTryReturn(NID_UI, weight >= 0.0f, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The given parameter is invalid.\n") + + result r = pVerticalBoxLayoutImpl->SetWeight(*pControlImpl, weight); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +}} // Tizen::Ui diff --git a/src/ui/FUiWindow.cpp b/src/ui/FUiWindow.cpp new file mode 100644 index 0000000..f28be66 --- /dev/null +++ b/src/ui/FUiWindow.cpp @@ -0,0 +1,202 @@ +// +// 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 FUiWindow.cpp + * @brief This is the implementation file for Window class. + */ + +#include +#include +#include +#include +#include "FUi_WindowImpl.h" +#include "FUi_ErrorMessages.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Ui::Animations; +using namespace Tizen::Security; + +namespace Tizen { namespace Ui { + +Window::Window() +{ +} + +Window::~Window(void) +{ +} + +result +Window::Construct(const Rectangle& rect, bool resizable, bool movable) +{ + result r = E_SUCCESS; + SysAssertf(_pControlImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + _WindowImpl* pImpl = _WindowImpl::CreateWindowImplN(this, rect, null, null, resizable, movable); + r = GetLastResult(); + SysTryReturn(NID_UI, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlImpl = pImpl; + + return E_SUCCESS; +} + +result +Window::Construct(const FloatRectangle& rect, bool resizable, bool movable) +{ + result r = E_SUCCESS; + SysAssertf(_pControlImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + _WindowImpl* pImpl = _WindowImpl::CreateWindowImplN(this, rect, null, null, resizable, movable); + r = GetLastResult(); + SysTryReturn(NID_UI, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _pControlImpl = pImpl; + + return E_SUCCESS; +} + +result +Window::Construct(const Layout& layout, const Rectangle& rect, bool resizable, bool movable) +{ + return Construct(layout, layout, rect, resizable, movable); +} + +result +Window::Construct(const Layout& layout, const FloatRectangle& rect, bool resizable, bool movable) +{ + return Construct(layout, layout, rect, resizable, movable); +} + +result +Window::Construct(const Layout& portraitLayout, const Layout& landscapeLayout, + const Rectangle& rect, bool resizable, bool movable) +{ + result r = E_SUCCESS; + SysAssertf(_pControlImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + _WindowImpl* pImpl = + _WindowImpl::CreateWindowImplN(this, rect, &portraitLayout, &landscapeLayout, resizable, movable); + + r = GetLastResult(); + SysTryReturn(NID_UI, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + + _pControlImpl = pImpl; + + return E_SUCCESS; +} + +result +Window::Construct(const Layout& portraitLayout, const Layout& landscapeLayout, + const FloatRectangle& rect, bool resizable, bool movable) +{ + result r = E_SUCCESS; + SysAssertf(_pControlImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); + + _WindowImpl* pImpl = + _WindowImpl::CreateWindowImplN(this, rect, &portraitLayout, &landscapeLayout, resizable, movable); + + r = GetLastResult(); + SysTryReturn(NID_UI, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + + _pControlImpl = pImpl; + + return E_SUCCESS; +} + +result +Window::Show(void) +{ + result r = E_SUCCESS; + + _WindowImpl* pImpl = _WindowImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + r = pImpl->Open(); + + return r; +} + +WindowState +Window::GetWindowState(void) const +{ + const _WindowImpl* pImpl = _WindowImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetWindowState(); +} + +DisplayContext* +Window::GetDisplayContext(void) const +{ + const _WindowImpl* pImpl = _WindowImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetDisplayContext(); +} + +result +Window::SetZOrderGroup(WindowZOrderGroup windowZOrderGroup) +{ + _WindowImpl* pImpl = _WindowImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->SetZOrderGroup(windowZOrderGroup); +} + +void +Window::SetOwner(Tizen::Ui::Control* pControl) +{ + _WindowImpl* pImpl = _WindowImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->SetOwner(pControl); +} + +Control* +Window::GetOwner(void) const +{ + const _WindowImpl* pImpl = _WindowImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + return pImpl->GetOwner(); +} + +void +Window::AddWindowEventListener(IWindowEventListener& listener) +{ + _WindowImpl* pImpl = _WindowImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->AddWindowEventListener(listener); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +void +Window::RemoveWindowEventListener(IWindowEventListener& listener) +{ + _WindowImpl* pImpl = _WindowImpl::GetInstance(*this); + SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use."); + + pImpl->RemoveWindowEventListener(listener); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +}} // Tizen::Ui diff --git a/src/ui/FUi_AccessibilityContainer.cpp b/src/ui/FUi_AccessibilityContainer.cpp new file mode 100644 index 0000000..622d2af --- /dev/null +++ b/src/ui/FUi_AccessibilityContainer.cpp @@ -0,0 +1,636 @@ +// +// 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. +// + +#include +#include +#include "FUi_Control.h" +#include "FUi_AccessibilityElement.h" +#include "FUi_AccessibilityElementImpl.h" +#include "FUi_AccessibilityContainer.h" +#include "FUi_AccessibilityManager.h" +#include "FUi_IAccessibilityListener.h" +#include "FUi_IAccessibilityFocusHandler.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui +{ + +template +class _AccessibilityItemComparer + : public Tizen::Base::Collection::IComparerT +{ +public: + _AccessibilityItemComparer(void) + { + } + virtual ~_AccessibilityItemComparer(void) + { + } + virtual result Compare(const T& obj1, const T& obj2, int& cmp) const + { + Tizen::Graphics::FloatRectangle rect1= obj1->GetAbsoluteBounds(); + Tizen::Graphics::FloatRectangle rect2= obj2->GetAbsoluteBounds(); + + if(rect1.y > rect2.y) + { + cmp = 1; + return E_SUCCESS; + } + else if(rect1.y < rect2.y) + { + cmp = -1; + return E_SUCCESS; + } + else + { + if(rect1.x > rect2.x) + { + cmp = 1; + return E_SUCCESS; + } + else if(rect1.x < rect2.x) + { + cmp = -1; + return E_SUCCESS; + } + else + { + cmp = 0; + return E_SUCCESS; + } + } + } +}; //class _AccessibilityComparer + +_AccessibilityContainer::_AccessibilityContainer(const _Control& owner) + : __pOwner(null) + , __pParent(null) + , __currentElementIndex(-1) + , __level(ACCESSIBILITY_PRIORITY_NORMAL) + , __activated(false) + , __pListener(null) + , __enableState(true) + , __pFocusHandler(null) +{ + __pOwner = &(const_cast<_Control&>(owner)); + __handle = _AccessibilityManager::GetInstance()->Register(this); +} + +_AccessibilityContainer::~_AccessibilityContainer(void) +{ + RemoveAllElement(); + _AccessibilityManager::GetInstance()->RemoveContainer(*this); + if(__handle.IsValid()) + { + _AccessibilityManager::GetInstance()->Unregister(__handle); + } + int count = __childContainerList.GetCount(); + _AccessibilityContainer* pContainer = null; + for (int i = 0; i< count;i++) + { + if(__childContainerList.GetAt(i, pContainer) == E_SUCCESS) + { + pContainer->SetParent(null); + } + } + if(__pParent) + { + __pParent->RemoveChildContainer(*this); + } +} + +_Control& +_AccessibilityContainer::GetOwner(void) +{ + return *__pOwner; +} + +const _Control& +_AccessibilityContainer::GetOwner(void) const +{ + return *__pOwner; +} + +result +_AccessibilityContainer::AddChildContainer(const _AccessibilityContainer& child) +{ + if(child.GetParent() == this) + { + return E_SUCCESS; + } + + result r = E_SYSTEM; + _AccessibilityContainer* _child = &const_cast<_AccessibilityContainer&>(child); + _child->SetParent(this); + __childContainerList.Add(_child); + return r; +} + +result +_AccessibilityContainer::RemoveChildContainer(const _AccessibilityContainer& child) +{ + return __childContainerList.Remove(&const_cast<_AccessibilityContainer&>(child)); +} + +const LinkedListT<_AccessibilityContainer*>* +_AccessibilityContainer::GetChildContainerList(void) const +{ + return &__childContainerList; +} + +result +_AccessibilityContainer::AddElement(const _AccessibilityElement& element) +{ + const_cast<_AccessibilityElement&>(element).SetParent(*this); + if(__elementList.Contains(&const_cast<_AccessibilityElement&>(element))) + { + return E_SUCCESS; + } + _AccessibilityManager::GetInstance()->NeedRefreshItem(); + return __elementList.Add(&const_cast<_AccessibilityElement&>(element)); +} + +result +_AccessibilityContainer::AddElements(const IListT<_AccessibilityElement*>& elementList) +{ + _AccessibilityElement* pElement = null; + int count = elementList.GetCount(); + for (int i = 0; i < count ; i++) + { + if(elementList.GetAt(i, pElement) == E_SUCCESS) + { + pElement->SetParent(*this); + } + } + _AccessibilityManager::GetInstance()->NeedRefreshItem(); + return __elementList.AddItems(elementList); +} + +result +_AccessibilityContainer::InsertElement(const _AccessibilityElement& element, int index) +{ + const_cast<_AccessibilityElement&>(element).SetParent(*this); + _AccessibilityManager::GetInstance()->NeedRefreshItem(); + return __elementList.InsertAt(&const_cast<_AccessibilityElement&>(element), index); +} + +result +_AccessibilityContainer::RemoveElement(const _AccessibilityElement& element) +{ + _AccessibilityElement* pElement = &const_cast<_AccessibilityElement&>(element); + result r = __elementList.Remove(pElement); + if (r == E_SUCCESS) + { + delete pElement; + } + _AccessibilityManager::GetInstance()->NeedRefreshItem(); + return r; +} + +result +_AccessibilityContainer::RemoveAllElement() +{ + result r = E_SUCCESS; + _AccessibilityElement* pElement = null; + int count = __elementList.GetCount(); + for (int i = 0; i < count ;i++) + { + r = __elementList.GetAt(i, pElement); + if (r == E_SUCCESS) + { + delete pElement; + pElement = null; + } + } + __elementList.RemoveAll(); + _AccessibilityManager::GetInstance()->NeedRefreshItem(); + return E_SUCCESS; +} + +void +_AccessibilityContainer::SortElements(void) +{ + _AccessibilityItemComparer<_AccessibilityElement*> comparer; + __elementList.Sort(comparer); +} + +_AccessibilityElement* +_AccessibilityContainer::GetChildElement(int index) const +{ + int count = __elementList.GetCount(); + if (count == 0 ||index > count - 1) + { + return null; + } + _AccessibilityElement* pElement = null; + __elementList.GetAt(index, pElement); + if (pElement->IsActivated()) + { + return pElement; + } + else + { + return false; + } +} +bool +_AccessibilityContainer::IsContains(const _AccessibilityElement& element) +{ + result r = E_SUCCESS; + _AccessibilityElement* pElement = null; + int count = __elementList.GetCount(); + for (int i = 0; i < count ;i++) + { + r = __elementList.GetAt(i, pElement); + if (pElement == &element) + { + return true; + } + } + return false; +} +_AccessibilityElement* +_AccessibilityContainer::GetChildElement(const String& name) const +{ + int count = __elementList.GetCount(); + _AccessibilityElement* pElement = null; + result r = E_SUCCESS; + for (int i = count -1 ; i >= 0 ; i--) + { + r = __elementList.GetAt(i, pElement); + if (r == E_SUCCESS && pElement->GetName() == name) + { + if (pElement->IsActivated()) + { + return pElement; + } + else + { + return false; + } + } + } + if (__childContainerList.GetCount() > 0) + { + IEnumeratorT<_AccessibilityContainer*>* pEnumerator = __childContainerList.GetEnumeratorN(); + while (pEnumerator->MoveNext() == E_SUCCESS) + { + _AccessibilityContainer* pContainer = null; + pEnumerator->GetCurrent(pContainer); + _AccessibilityElement* pElement = pContainer->GetChildElement(name); + if (pElement != null) + { + if (pElement->IsActivated()) + { + return pElement; + } + else + { + return false; + } + return pElement; + } + } + } + return null; +} + +void +_AccessibilityContainer::GetElements(IListT<_AccessibilityElement*>& list) const +{ + int count = __elementList.GetCount(); + result r = E_SUCCESS; + _AccessibilityElement* pElement = null; + + for (int i = 0; i < count; i++) + { + r = __elementList.GetAt(i, pElement); + SysTryReturn(NID_UI, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] System Error."); + SysTryReturn(NID_UI, pElement, , E_SYSTEM, "[E_SYSTEM] System Error."); + if(!list.Contains(pElement) && pElement->IsActivated()) + { + list.Add(pElement); + } + pElement = null; + } + count = __childContainerList.GetCount(); + _AccessibilityContainer* pContainer = null; + for (int i = 0; i < count; i++) + { + r = __childContainerList.GetAt(i, pContainer); + SysTryReturn(NID_UI, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] System Error."); + SysTryReturn(NID_UI, pContainer, , E_SYSTEM, "[E_SYSTEM] System Error."); + if(pContainer->IsActivated()) + { + pContainer->GetElements(list); + } + } +} + +IListT <_AccessibilityElement*>* +_AccessibilityContainer::GetElementsN(void) const +{ + LinkedListT<_AccessibilityElement*>* pList = new (std::nothrow) LinkedListT<_AccessibilityElement*>; + GetElements(*pList); + return pList; +} + +_AccessibilityElement* +_AccessibilityContainer::Hit(const Point& point) const +{ + if (!__activated) + { + return null; + } + + _AccessibilityElement* pElement = null; + int count = __elementList.GetCount(); + result r = E_SUCCESS; + + for (int i = count -1 ; i >= 0 ; i--) + { + r = __elementList.GetAt(i, pElement); + SysTryReturn(NID_UI, r == E_SUCCESS, null, E_SYSTEM, "[E_SYSTEM] System Error."); + SysTryReturn(NID_UI, pElement, null, E_SYSTEM, "[E_SYSTEM] System Error."); + + if (!(pElement->IsActivated())) + continue; + + FloatRectangle rect = pElement->GetAbsoluteBounds(); + + if (rect.x < point.x && rect.y < point.y + && rect.x + rect.width > point.x + && rect.y + rect.height > point.y) + { + return pElement; + } + } + return null; +} + +result +_AccessibilityContainer::MoveElement(const _AccessibilityElement* pPreviousElement, const _AccessibilityElement& element) +{ + _AccessibilityElement* pElement = GetChildElement(element.GetName()); + if (pElement == null) + { + return E_OBJ_NOT_FOUND; + } + + if (pPreviousElement == null) + { + __elementList.Remove(pElement); + __elementList.InsertAt(pElement, 0); + } + else + { + _AccessibilityElement* _pPreviousElement = GetChildElement(pPreviousElement->GetName()); + if (_pPreviousElement == null) + { + return E_OBJ_NOT_FOUND; + } + __elementList.Remove(pElement); + int indexOfPreviousItem = 0; + __elementList.IndexOf(_pPreviousElement, indexOfPreviousItem); + __elementList.InsertAt(pElement, indexOfPreviousItem+1); + } +// SortElements(); + return E_SUCCESS; +} +void +_AccessibilityContainer::SetFocusHandler(_IAccessibilityFocusHandler* pHandler) +{ + __pFocusHandler = pHandler; +} +bool +_AccessibilityContainer::IsFocusManaged(void) +{ + return (__pFocusHandler != null? true:false); +} +bool +_AccessibilityContainer::MoveFocus(_AccessibilityFocusDirection direction) +{ + if(!__pFocusHandler) + { + return false; + } + return __pFocusHandler->OnMoveFocus(direction); +} + +bool +_AccessibilityContainer::MoveFocus(const Tizen::Graphics::Point& point) +{ + if(__pFocusHandler) + { + return __pFocusHandler->OnMoveFocus(point); + } + else + { + _AccessibilityElement* pElement = Hit(point); + if(pElement == null) + { + return false; + } + + int index = -1; + if (__elementList.IndexOf(pElement, index) != E_SUCCESS) + { + return false; + } + else + { + __currentElementIndex = index; + } + return true; + } +} + +void +_AccessibilityContainer::ResetFocus(void) +{ + __currentElementIndex = -1; +} + +void +_AccessibilityContainer::SetPriority(int level) +{ + __level = level; +} + +int +_AccessibilityContainer::GetPriority(void) +{ + return __level; +} + +bool +_AccessibilityContainer::SetParent(const _AccessibilityContainer* pParent) +{ + __pParent = const_cast<_AccessibilityContainer*>(pParent); + return true; +} + +_AccessibilityContainer* +_AccessibilityContainer::GetParent(void) const +{ + return __pParent; +} +_AccessibilityContainer* +_AccessibilityContainer::GetRootParent(void) const +{ + _AccessibilityContainer* pParent = __pParent; + while(pParent != null && pParent->GetParent() != null) + { + pParent = pParent->GetParent(); + } + return pParent; +} +void +_AccessibilityContainer::SetCurrentFocusedElement(_AccessibilityElement*pElement) +{ + if (pElement == null) + { + __currentElementIndex = -1; + return; + } + + int index = 0; + result r = __elementList.IndexOf(pElement, 0, index); + if (r == E_SUCCESS) + { + __currentElementIndex = index; + } + else + { + __currentElementIndex = -1; + } +} +_AccessibilityElement* +_AccessibilityContainer::GetCurrentFocusedElement(void) const +{ + if (__currentElementIndex < 0) + { + return null; + } + + _AccessibilityElement* pElement = null; + result r = E_SUCCESS; + r = __elementList.GetAt(__currentElementIndex,pElement); + if (r == E_SUCCESS) + { + return pElement; + } + else + { + return null; + } +} + +void +_AccessibilityContainer::AddListener(const _IAccessibilityListener& listener) +{ + __listenerList.Add(&const_cast<_IAccessibilityListener&>(listener)); +} + +Tizen::Base::Collection::IListT<_IAccessibilityListener*>* +_AccessibilityContainer::GetListenerListN(void) const +{ + return __listenerList.GetItemsN(0,__listenerList.GetCount()); +} + +void +_AccessibilityContainer::RemoveListener(const _IAccessibilityListener& listener) +{ + __listenerList.Remove(&const_cast<_IAccessibilityListener&>(listener)); +} +void +_AccessibilityContainer::SetEnableState(bool enabledState) +{ + __enableState = enabledState; +} +bool +_AccessibilityContainer::GetEnableState(void) +{ + return __enableState; +} +void +_AccessibilityContainer::Activate(bool enable) +{ + if (enable) + { + _AccessibilityManager::GetInstance()->AddContainer(*this); + } + else + { + _AccessibilityManager::GetInstance()->RemoveContainer(*this); + } + __activated = enable; +} + +bool +_AccessibilityContainer::IsActivated(void) const +{ + return __activated; +} + +FloatRectangle +_AccessibilityContainer::GetAbsoluteBounds(void) const +{ + return __pOwner->GetAbsoluteBoundsF(true); +} + +void +_AccessibilityContainer::ReadingAll(void) +{ + _AccessibilityElement* pElement = null; + int count = __elementList.GetCount(); + result r = E_SUCCESS; + + for (int i = count -1 ; i >= 0 ; i--) + { + r = __elementList.GetAt(i, pElement); + SysTryReturn(NID_UI, r == E_SUCCESS && pElement, , E_SYSTEM, "[E_SYSTEM] System Error."); + + if (!(pElement->IsActivated())) + continue; + + _AccessibilityManager::GetInstance()->ReadElement(*pElement); + } +} + +String +_AccessibilityContainer::GetCurrentGrammar(void) const +{ + //todo// + return L""; +} + +AccessibilityScreenReaderStatus +_AccessibilityContainer::GetStatus(void) const +{ + //todo// + return ACCESSIBILITY_SCREEN_READER_STATUS_ERROR; +} +Tizen::Base::_HandleT <_AccessibilityContainer> +_AccessibilityContainer::GetHandle(void) const +{ + return __handle; +} +}} //Tizen::Ui diff --git a/src/ui/FUi_AccessibilityContainerImpl.cpp b/src/ui/FUi_AccessibilityContainerImpl.cpp new file mode 100644 index 0000000..a61db10 --- /dev/null +++ b/src/ui/FUi_AccessibilityContainerImpl.cpp @@ -0,0 +1,442 @@ +// +// 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. +// + +#include +#include +#include +#include +#include +#include "FUi_ControlImpl.h" +#include "FUi_AccessibilityElement.h" +#include "FUi_AccessibilityElementImpl.h" +#include "FUi_AccessibilityContainer.h" +#include "FUi_AccessibilityContainerImpl.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { +_AccessibilityContainerImpl::_AccessibilityContainerImpl(const _ControlImpl& controlImpl, const AccessibilityContainer& publicInstance, const _AccessibilityContainer& coreInstance) + : __pControlImpl(null) + , __pPublic(null) + , __pCore(null) +{ + __pControlImpl = &const_cast<_ControlImpl&>(controlImpl); + __pPublic = &const_cast(publicInstance); + __pCore = &const_cast<_AccessibilityContainer&>(coreInstance); + __coreHandle = controlImpl.GetCore().GetHandle(); +} +AccessibilityContainer* +_AccessibilityContainerImpl::CreateAccessibilityContainerN(const _ControlImpl& controlImpl) +{ + _ControlImpl* pControlImpl = const_cast <_ControlImpl*>(&controlImpl); + _AccessibilityContainer* pCore = pControlImpl->GetCore().GetAccessibilityContainer(); + SysTryReturn(NID_UI, pCore, null, E_SYSTEM, "[E_SYSTEM] This instance has not constructed."); + + AccessibilityContainer* pPublic = new (std::nothrow) AccessibilityContainer(); + SysTryReturn(NID_UI, pPublic, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed"); + + _AccessibilityContainerImpl* pImpl = new (std::nothrow) _AccessibilityContainerImpl(controlImpl, *pPublic, *pCore); + SysTryCatch(NID_UI, pImpl,,E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed"); + pPublic->__pAccessibilityContainerImpl = pImpl; + return pPublic; + +CATCH: + delete pPublic; + return null; +} +_AccessibilityContainerImpl::~_AccessibilityContainerImpl(void) +{ + AccessibilityElement* pElement = null; + int count = __elementList.GetCount(); + result r = E_SUCCESS; + for ( int i = 0 ; i < count ; i++) + { + r = __elementList.GetAt(i, pElement); + if (r == E_SUCCESS) + { + delete pElement; + pElement = null; + } + } + __elementList.RemoveAll(); + delete __pPublic; + __pPublic = null; + __listenerList.RemoveAll(); +} +_ControlImpl& +_AccessibilityContainerImpl::GetOwner(void) +{ + return *__pControlImpl; +} + +AccessibilityContainer& +_AccessibilityContainerImpl::GetPublic(void) +{ + return *__pPublic; +} + +AccessibilityElement* +_AccessibilityContainerImpl::GetChildElement(const String& name) +{ + SysTryReturn(NID_UI, ControlCoreExists(__coreHandle), null, E_SYSTEM,"[E_SYSTEM] A core of control is invalid."); + _AccessibilityElementImpl* pNewElementImpl = null; + _AccessibilityElement* pElement = __pCore->GetChildElement(name); + SysTryReturn(NID_UI, pElement, null, E_SYSTEM,"[E_SYSTEM]"); + if(pElement->GetUserData() == null) + { + pNewElementImpl = new (std::nothrow) _AccessibilityElementImpl(*pElement); + SysTryReturn(NID_UI, pNewElementImpl, null, E_OUT_OF_MEMORY,"[E_OUT_OF_MEMORY] Memory allocation is failed"); + pElement->SetUserData(pNewElementImpl); + __elementList.Add(&(pNewElementImpl->GetPublic())); + return &(pNewElementImpl->GetPublic()); + } + return &(static_cast<_AccessibilityElementImpl*>(pElement->GetUserData())->GetPublic()); +} + +result +_AccessibilityContainerImpl::AddAccessibilityListener(const IAccessibilityListener& listener) +{ + SysTryReturn(NID_UI, ControlCoreExists(__coreHandle), E_SYSTEM, E_SYSTEM,"[E_SYSTEM] A core of control is invalid."); + result r = E_OBJ_ALREADY_EXIST; + __pCore->AddListener(*this); + int index = 0; + IAccessibilityListener* pListener = &const_cast(listener); + SysTryReturn(NID_UI,pListener && __listenerList.IndexOf(pListener,index) != E_SUCCESS, E_OBJ_ALREADY_EXIST, E_OBJ_ALREADY_EXIST,"[E_OBJ_ALREADY_EXIST] The listener is already exist."); + r = __listenerList.Add(pListener); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r,"[%s]",GetErrorMessage(r)); + + return r; +} + +result +_AccessibilityContainerImpl::RemoveAccessibilityListener(const IAccessibilityListener& listener) +{ + SysTryReturn(NID_UI, ControlCoreExists(__coreHandle), E_SYSTEM, E_SYSTEM,"[E_SYSTEM] A core of control is invalid."); + result r = E_OBJ_NOT_FOUND; + SysTryReturn(NID_UI, __listenerList.GetCount() > 0, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND,"[E_OBJ_NOT_FOUND] the listener has been not added."); + + int index = 0; + IAccessibilityListener* pListener = &const_cast(listener); + SysTryReturn(NID_UI,pListener && __listenerList.IndexOf(pListener,index) == E_SUCCESS, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND,"[E_OBJ_NOT_FOUND] the listener has been not added."); + r = __listenerList.Remove(pListener); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r,"[%s]",GetErrorMessage(r)); + + if(__listenerList.GetCount() < 1) + { + __pCore->RemoveListener(*this); + } + return r; +} + +result +_AccessibilityContainerImpl::AddElement(const _AccessibilityElementImpl& element) +{ + SysTryReturn(NID_UI, ControlCoreExists(__coreHandle), E_SYSTEM, E_SYSTEM,"[E_SYSTEM] A core of control is invalid."); + __elementList.Add(&(const_cast<_AccessibilityElementImpl&>(element).GetPublic())); + return __pCore->AddElement(element.GetCore()); +} + +result +_AccessibilityContainerImpl::AddElements(const IList& elementList) +{ + return E_SYSTEM; +} + +IList* +_AccessibilityContainerImpl::GetElementsN(void) +{ + SysTryReturn(NID_UI, ControlCoreExists(__coreHandle), null, E_SYSTEM,"[E_SYSTEM] A core of control is invalid."); + LinkedList* _pList = new (std::nothrow) LinkedList; + SysTryReturn(NID_UI, _pList, null, E_OUT_OF_MEMORY,"[E_OUT_OF_MEMORY] Memory allocation is failed"); + int count = 0; + result r = E_SUCCESS; + _AccessibilityElement* pItem = null; + IListT<_AccessibilityElement*>* pList = __pCore->GetElementsN(); + SysTryCatch(NID_UI, pList, , E_SYSTEM,"[E_SYSTEM]"); + count = pList->GetCount(); + SysTryCatch(NID_UI, count >= 1, , E_SYSTEM,"[E_SYSTEM]"); + + for (int i = 0;i < count; i++) + { + _AccessibilityElementImpl* pNewElementImpl = null; + r = pList->GetAt(i,pItem); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM,"[E_SYSTEM]"); + + if(pItem->GetUserData() == null) + { + pNewElementImpl = new (std::nothrow) _AccessibilityElementImpl(*pItem); + SysTryCatch(NID_UI, pNewElementImpl, , E_OUT_OF_MEMORY,"[E_OUT_OF_MEMORY] Memory allocation is failed"); + pItem->SetUserData(pNewElementImpl); + AddSystemElement(pNewElementImpl->GetPublic()); + } + else + { + pNewElementImpl = static_cast<_AccessibilityElementImpl*>(pItem->GetUserData()); + } + _pList->Add(pNewElementImpl->GetPublic()); + } + delete pList; + return _pList; +CATCH: + delete pList; + delete _pList; + return null; +} + +result +_AccessibilityContainerImpl::RemoveElement(const _AccessibilityElementImpl& element) +{ + SysTryReturn(NID_UI, ControlCoreExists(__coreHandle), E_SYSTEM, E_SYSTEM,"[E_SYSTEM] A core of control is invalid."); + AccessibilityElement* pElement = const_cast(&(element.GetPublic())); + result r = __elementList.Remove(pElement); + const_cast<_AccessibilityElementImpl&>(element).GetCore().Activate(false); + delete pElement; + return r; +} + +result +_AccessibilityContainerImpl::RemoveAllElement(void) +{ + SysTryReturn(NID_UI, ControlCoreExists(__coreHandle), E_SYSTEM, E_SYSTEM,"[E_SYSTEM] A core of control is invalid."); + result r = E_SUCCESS;//__pCore->RemoveAllElement(); + if (r == E_SUCCESS) + { + int count = __elementList.GetCount(); + AccessibilityElement* pElement = null; + for (int i = 0; i < count; i++) + { + if (__elementList.GetAt(i, pElement) == E_SUCCESS) + { + _AccessibilityElementImpl* pImpl = _AccessibilityElementImpl::GetInstance(*pElement); + pImpl->GetCore().Activate(false); + delete pElement; + pElement = null; + } + } + __elementList.RemoveAll(); + } + if (__pCore) + { + LinkedListT<_AccessibilityElement*> list; + __pCore->GetElements(list); + int count = list.GetCount(); + for (int i = 0; i < count; i++) + { + _AccessibilityElement* pElement = null; + if (list.GetAt(i, pElement) == E_SUCCESS) + { + pElement->Activate(false); + } + } + } + return r; +} + +String +_AccessibilityContainerImpl::GetCurrentGrammar(void) const +{ + SysTryReturn(NID_UI, ControlCoreExists(__coreHandle), L"", E_SYSTEM,"[E_SYSTEM] A core of control is invalid."); + return __pCore->GetCurrentGrammar(); +} + +AccessibilityScreenReaderStatus +_AccessibilityContainerImpl::GetStatus(void) const +{ + SysTryReturn(NID_UI, ControlCoreExists(__coreHandle), ACCESSIBILITY_SCREEN_READER_STATUS__NONE, E_SYSTEM,"[E_SYSTEM] A core of control is invalid."); + return __pCore->GetStatus(); +} + +void +_AccessibilityContainerImpl::ReadingAll(void) +{ + SysTryReturn(NID_UI, ControlCoreExists(__coreHandle), , E_SYSTEM,"[E_SYSTEM] A core of control is invalid."); + return __pCore->ReadingAll(); +} + +_AccessibilityContainerImpl* +_AccessibilityContainerImpl::GetInstance(AccessibilityContainer& container) +{ + return static_cast<_AccessibilityContainerImpl*> (container.__pAccessibilityContainerImpl); +} + +const _AccessibilityContainerImpl* +_AccessibilityContainerImpl::GetInstance(const AccessibilityContainer& container) +{ + return static_cast<_AccessibilityContainerImpl*> (container.__pAccessibilityContainerImpl); +} + +bool +_AccessibilityContainerImpl::OnAccessibilityFocusMovedNext(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return true; +} +bool +_AccessibilityContainerImpl::OnAccessibilityFocusMovedPrevious(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return true; +} +bool +_AccessibilityContainerImpl::OnAccessibilityReadElement(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + int count = __listenerList.GetCount(); + if (count > 0) + { + IAccessibilityListener* pListener = null; + for (int i = 0 ; i < count ; i++) + { + if(__listenerList.GetAt(i, pListener) == E_SUCCESS) + { + AccessibilityElement* pElement = GetChildElement(element.GetName()); + if (pElement != null) + { + pListener->OnAccessibilityScreenReaderStatusChanged(GetOwner().GetPublic(),*pElement, ACCESSIBILITY_SCREEN_READER_STATUS_READY); + } + } + } + } + return true; +} +bool +_AccessibilityContainerImpl::OnAccessibilityReadingElement(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + int count = __listenerList.GetCount(); + if (count > 0) + { + IAccessibilityListener* pListener = null; + for (int i = 0 ; i < count ; i++) + { + if(__listenerList.GetAt(i, pListener) == E_SUCCESS) + { + AccessibilityElement* pElement = GetChildElement(element.GetName()); + if (pElement != null) + { + pListener->OnAccessibilityScreenReaderStatusChanged(GetOwner().GetPublic(),*pElement, ACCESSIBILITY_SCREEN_READER_STATUS_PLAYING); + } + } + } + } + return true; +} + +bool +_AccessibilityContainerImpl::OnAccessibilityFocusIn(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + int count = __listenerList.GetCount(); + if (count > 0) + { + IAccessibilityListener* pListener = null; + for (int i = 0 ; i < count ; i++) + { + if(__listenerList.GetAt(i, pListener) == E_SUCCESS) + { + AccessibilityElement* pElement = GetChildElement(element.GetName()); + if (pElement != null) + { + pListener->OnAccessibilityFocusIn(GetOwner().GetPublic(),*pElement); + } + } + } + } + return true; +} +bool +_AccessibilityContainerImpl::OnAccessibilityFocusOut(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + int count = __listenerList.GetCount(); + if (count > 0) + { + IAccessibilityListener* pListener = null; + for (int i = 0 ; i < count ; i++) + { + if(__listenerList.GetAt(i, pListener) == E_SUCCESS) + { + AccessibilityElement* pElement = GetChildElement(element.GetName()); + if (pElement != null) + { + pListener->OnAccessibilityFocusOut(GetOwner().GetPublic(),*pElement); + } + } + } + } + return true; +} +bool +_AccessibilityContainerImpl::OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + int count = __listenerList.GetCount(); + if (count > 0) + { + IAccessibilityListener* pListener = null; + for (int i = 0 ; i < count ; i++) + { + if(__listenerList.GetAt(i, pListener) == E_SUCCESS) + { + AccessibilityElement* pElement = GetChildElement(element.GetName()); + if (pElement != null) + { + pListener->OnAccessibilityActionPerformed(GetOwner().GetPublic(),*pElement); + } + } + } + } + return true; +} +bool +_AccessibilityContainerImpl::OnAccessibilityValueIncreased(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} +bool +_AccessibilityContainerImpl::OnAccessibilityValueDecreased(const _AccessibilityContainer& control, const _AccessibilityElement& element) +{ + return false; +} +bool +_AccessibilityContainerImpl::ControlCoreExists(_ControlHandle handle) const +{ + _Control* p_Control = null; + _ControlManager* pManager = _ControlManager::GetInstance(); + SysTryReturn(NID_UI, !(handle.IsNull()), false, E_SYSTEM, "[E_SYSTEM] System Error."); + SysTryReturn(NID_UI, pManager, false, E_SYSTEM, "[E_SYSTEM] System Error."); + + p_Control = pManager->GetObject(handle); + SysTryReturn(NID_UI, + p_Control && p_Control->GetHandle() == __pControlImpl->GetCore().GetHandle(), false, E_SYSTEM, + "[E_SYSTEM] System Error."); + + SetLastResult(E_SUCCESS); + return true; +} + +result +_AccessibilityContainerImpl::MoveElement(const _AccessibilityElementImpl* pPreviousElement, const _AccessibilityElementImpl& element) +{ + _AccessibilityElement* pPreviousCore = null; + if (pPreviousElement != null) + { + pPreviousCore = &const_cast<_AccessibilityElement&>(pPreviousElement->GetCore()); + } + return __pCore->MoveElement(pPreviousCore, element.GetCore()); +} + +void +_AccessibilityContainerImpl::AddSystemElement(const AccessibilityElement& element) +{ +} +}} //Tizen::Ui diff --git a/src/ui/FUi_AccessibilityElement.cpp b/src/ui/FUi_AccessibilityElement.cpp new file mode 100644 index 0000000..5b93da3 --- /dev/null +++ b/src/ui/FUi_AccessibilityElement.cpp @@ -0,0 +1,490 @@ +// +// 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. +// + +#include +#include +#include +#include +#include "FUi_AccessibilityContainer.h" +#include "FUi_AccessibilityElementImpl.h" +#include "FUi_AccessibilityElement.h" +#include "FUi_AccessibilityManager.h" +#include "FUi_Control.h" +#include "FUi_ResourceManager.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { + +_AccessibilityElement::_AccessibilityElement(bool systemElement) + : __name(L"") + , __bounds(0,0,0,0) + , __absBounds(0,0,0,0) + , __label(L"") + , __hint(L"") + , __status(L"") + , __traitString(L"") + , __trait(ACCESSIBILITY_TRAITS_NONE) + , __value(L"") + , __pParent(null) + , __pLabelId(null) + , __pTraitId(null) + , __pHintId(null) + , __pStatusId(null) + , __pValueId(null) + , __pUserData(null) + , __systemElement(systemElement) + , __activated(true) + , __supportOperatingGesture(true) + , __setHintByUser(false) + , __disabledHint(false) + , __updateContents(false) + , __publicLabelUpdated(false) +{ +} +_AccessibilityElement::~_AccessibilityElement(void) +{ + if (__pUserData) + { + static_cast<_AccessibilityElementImpl*>(__pUserData)->SetCore(null); + __pUserData = null; + } + delete [] __pLabelId; + __pLabelId = null; + delete [] __pTraitId; + __pTraitId = null; + delete [] __pHintId; + __pHintId = null; + delete [] __pStatusId; + __pStatusId = null; + delete [] __pValueId; + __pValueId = null; + if (__pParent && this == __pParent->GetCurrentFocusedElement()) + { + _AccessibilityManager::GetInstance()->RequestAutoReading(_ACCESSIBILITY_AUTO_READING_MODE_FIRST_ITEM); + } +} +result +_AccessibilityElement::Construct(const String& name, const FloatRectangle& bounds) +{ + __name = name; + __bounds.SetBounds(bounds.x,bounds.y,bounds.width,bounds.height); + return E_SUCCESS; +} +result +_AccessibilityElement::Construct(const String& name, const Rectangle& bounds) +{ + __name = name; + __bounds.SetBounds(bounds.x,bounds.y,bounds.width,bounds.height); + return E_SUCCESS; +} +void +_AccessibilityElement::SetName(const String& name) +{ + __name = name; +} +void +_AccessibilityElement::SetLabel(const String& label) +{ + __label = label; + __updateContents = true; + if(__pLabelId) + { + delete [] __pLabelId; + __pLabelId = null; + } +} +void +_AccessibilityElement::SetHint(const String& hint, bool setHintByUser) +{ + if(__setHintByUser && !setHintByUser) + { + return; + } + __hint = hint; + __setHintByUser = setHintByUser; + __updateContents = true; + if(__pHintId) + { + delete [] __pHintId; + __pHintId = null; + } +} +void +_AccessibilityElement::SetStatus(const String& status) +{ + __status = status; + __updateContents = true; + if(__pStatusId) + { + delete [] __pStatusId; + __pStatusId = null; + } +} +void +_AccessibilityElement::SetTrait(const Tizen::Base::String& trait) +{ + __traitString = trait; + __updateContents = true; + if(__pTraitId) + { + delete [] __pTraitId; + __pTraitId = null; + } +} +void +_AccessibilityElement::SetParent(const _AccessibilityContainer& parent) +{ + __pParent = &const_cast<_AccessibilityContainer&>(parent); +} +void +_AccessibilityElement::SetValue(const String& value) +{ + __value = value; + __updateContents = true; + if(__pValueId) + { + delete [] __pValueId; + __pValueId = null; + } +} +_AccessibilityContainer* +_AccessibilityElement::GetParent(void) const +{ + return __pParent; +} +String +_AccessibilityElement::GetName(void) const +{ + return __name; +} +FloatRectangle +_AccessibilityElement::GetBounds(void) const +{ + return __bounds; +} +String +_AccessibilityElement::GetLabel(void) const +{ + String out; + if (__pLabelId) + { + Tizen::Ui::_ResourceManager::GetInstance()->GetString(__pLabelId, out); + return out; + } + + return __label; +} +String +_AccessibilityElement::GetHint(void) const +{ + String out; + if (__pHintId) + { + Tizen::Ui::_ResourceManager::GetInstance()->GetString(__pHintId, out); + return out; + } + return __hint; +} +String +_AccessibilityElement::GetStatus(void) const +{ + String out; + if (__pStatusId) + { + Tizen::Ui::_ResourceManager::GetInstance()->GetString(__pStatusId, out); + return out; + } + return __status; +} +String +_AccessibilityElement::GetTraitString(void) const +{ + String out; + if (__pTraitId) + { + Tizen::Ui::_ResourceManager::GetInstance()->GetString(__pTraitId, out); + return out; + } + return __traitString; +} +String +_AccessibilityElement::GetValue(void) const +{ + String out; + if (__pValueId) + { + Tizen::Ui::_ResourceManager::GetInstance()->GetString(__pValueId, out); + return out; + } + return __value; +} +void +_AccessibilityElement::SetHintDisabled(bool enable) +{ + __disabledHint = enable; +} +void +_AccessibilityElement::Activate(bool enable) +{ + __activated = enable; + _AccessibilityManager::GetInstance()->NeedRefreshItem(); +} +bool +_AccessibilityElement::IsActivated(void) const +{ + return __activated; +} +String +_AccessibilityElement::GetReadingContents(void) const +{ + String out = L""; + if (__pLabelId != null) + { + String string; + Tizen::Ui::_ResourceManager::GetInstance()->GetString(__pLabelId, string); + out = string; + } + else if(__label.GetLength() > 0) + { + out += __label; + } + + if (__pTraitId != null) + { + String string; + Tizen::Ui::_ResourceManager::GetInstance()->GetString(__pTraitId, string); + out += L", "; + out += string; + } + else if(__traitString.GetLength() > 0) + { + out += L", "; + out += __traitString; + } + + if (__pValueId != null) + { + String string; + Tizen::Ui::_ResourceManager::GetInstance()->GetString(__pValueId, string); + out += L", "; + out += string; + } + else if(__value.GetLength() > 0) + { + out += L", "; + out += __value; + } + + if (__pStatusId != null) + { + String string; + Tizen::Ui::_ResourceManager::GetInstance()->GetString(__pStatusId, string); + out += L", "; + out += string; + } + else if(__status.GetLength() > 0) + { + out += L", "; + out += __status; + } + if(__pParent->GetEnableState() == false) + { + out += L", "; + out += L"disable"; //ScrLocalization + } + if (!__disabledHint && __pParent->GetEnableState()) + { + if (__pHintId != null) + { + String string; + Tizen::Ui::_ResourceManager::GetInstance()->GetString(__pHintId, string); + out += L"\n "; + out += string; + } + else if(__hint.GetLength() > 0) + { + out += L"\n "; + out += __hint; + } + } + const_cast<_AccessibilityElement*>(this)->__updateContents = false; + return out; +} +void +_AccessibilityElement::SetBounds(const FloatRectangle& bounds) +{ + __bounds.SetBounds(bounds.x,bounds.y,bounds.width,bounds.height); + if(__pParent && this == __pParent->GetCurrentFocusedElement()) + { + _AccessibilityManager::GetInstance()->RequestToDrawFocusUi(); + } + _AccessibilityManager::GetInstance()->NeedRefreshItem(); +} + +void +_AccessibilityElement::SetBounds(const Tizen::Graphics::Rectangle& bounds) +{ + __bounds.SetBounds(bounds.x,bounds.y,bounds.width,bounds.height); + if(__pParent && this == __pParent->GetCurrentFocusedElement()) + { + _AccessibilityManager::GetInstance()->RequestToDrawFocusUi(); + } + _AccessibilityManager::GetInstance()->NeedRefreshItem(); +} + +FloatRectangle +_AccessibilityElement::GetAbsoluteBounds(void) const +{ + FloatRectangle controlAbsBounds = GetParent()->GetOwner().GetAbsoluteBoundsF(true); + FloatRectangle rect(controlAbsBounds.x+__bounds.x, controlAbsBounds.y+__bounds.y, __bounds.width, __bounds.height); + const_cast(__absBounds).SetBounds(controlAbsBounds.x+__bounds.x, controlAbsBounds.y+__bounds.y, __bounds.width, __bounds.height); + return rect; +} +void +_AccessibilityElement::SetSupportOperatingGesture(bool set) +{ + __supportOperatingGesture = set; +} +bool +_AccessibilityElement::GetSupportOperatingGesture(void) +{ + return __supportOperatingGesture; +} +void* +_AccessibilityElement::GetUserData(void) const +{ + return __pUserData; +} + +void +_AccessibilityElement::SetUserData(void* pUserData) +{ + __pUserData = pUserData; +} +bool +_AccessibilityElement::IsSystemElement(void) +{ + return __systemElement; +} +bool +_AccessibilityElement::IsUpdated(void) +{ + return __updateContents; +} + +void +_AccessibilityElement::SetLabelWithStringId(const char* id) +{ + if(__pLabelId) + { + delete [] __pLabelId; + __pLabelId = null; + } + int length = strlen(id); + if(length == 0) + { + return; + } + __pLabelId = new char[length+1]; + strcpy(__pLabelId, id); + __pLabelId[length] = '\0'; +} +void +_AccessibilityElement::SetTraitWithStringId(const char* id) +{ + if(__pTraitId) + { + delete [] __pTraitId; + __pTraitId = null; + } + int length = strlen(id); + if(length == 0) + { + return; + } + __pTraitId = new char[length+1]; + strcpy(__pTraitId, id); + __pTraitId[length] = '\0'; +} +void +_AccessibilityElement::SetHintWithStringId(const char* id) +{ + if(__pHintId) + { + delete [] __pHintId; + __pHintId = null; + } + + int length = strlen(id); + if(length == 0) + { + return; + } + __pHintId = new char[length+1]; + strcpy(__pHintId, id); + __pHintId[length] = '\0'; +} +void +_AccessibilityElement::SetStatusWithStringId(const char* id) +{ + if(__pStatusId) + { + delete [] __pStatusId; + __pStatusId = null; + } + int length = strlen(id); + if(length == 0) + { + return; + } + __pStatusId = new char[length+1]; + strcpy(__pStatusId, id); + __pStatusId[length] = '\0'; +} +void +_AccessibilityElement::SetValueWithStringId(const char* id) +{ + if(__pValueId) + { + delete [] __pValueId; + __pValueId = null; + } + int length = strlen(id); + if(length == 0) + { + return; + } + __pValueId = new char[length+1]; + strcpy(__pValueId, id); + __pValueId[length] = '\0'; +} + +void +_AccessibilityElement::SetPublicLabelUpdate(bool isPublicLabelUpdated) +{ + __publicLabelUpdated = isPublicLabelUpdated; +} + +bool +_AccessibilityElement::IsPublicLabelUpdated(void) +{ + return __publicLabelUpdated; +} + +}} diff --git a/src/ui/FUi_AccessibilityElementImpl.cpp b/src/ui/FUi_AccessibilityElementImpl.cpp new file mode 100644 index 0000000..78efc8b --- /dev/null +++ b/src/ui/FUi_AccessibilityElementImpl.cpp @@ -0,0 +1,199 @@ +// +// 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. +// + +#include +#include +#include +#include +#include "FUi_AccessibilityElementImpl.h" +#include "FUi_AccessibilityElement.h" + +namespace Tizen { namespace Ui +{ +_AccessibilityElementImpl::_AccessibilityElementImpl(const AccessibilityElement& element) + : __pPublic(null) + , __pCore(null) +{ + __pPublic = &const_cast(element); + __pCore = new (std::nothrow) _AccessibilityElement(false); + SysTryReturn(NID_UI, __pCore, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed"); + __pCore->SetUserData(this); +} +_AccessibilityElementImpl::_AccessibilityElementImpl(const _AccessibilityElement& element) + : __pPublic(null) + , __pCore(null) +{ + __pPublic = new (std::nothrow) AccessibilityElement(); + SysTryReturn(NID_UI, __pPublic, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed"); + __pPublic->__pAccessibilityElementImpl = this; + __pCore = &const_cast<_AccessibilityElement&>(element); + __pCore->SetUserData(this); +} +_AccessibilityElementImpl::~_AccessibilityElementImpl(void) +{ + if (__pCore) + { + if(__pCore->IsSystemElement()) + { + __pCore->Activate(false); + __pCore->SetUserData(null); + __pCore = null; + } + else + { + _AccessibilityContainer* pContainer = __pCore->GetParent(); + if(pContainer != null) + { + pContainer->RemoveElement(*__pCore); + } + else + { + delete __pCore; + } + __pCore = null; + } + } +} + +result +_AccessibilityElementImpl::Construct(const Tizen::Base::String& name, const Tizen::Graphics::FloatRectangle& bounds) +{ + SysTryReturn(NID_UI, __pCore, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System Error."); + return __pCore->Construct(name, bounds); +} +void +_AccessibilityElementImpl::SetBounds(const Tizen::Graphics::FloatRectangle& bounds) +{ + SysTryReturn(NID_UI, __pCore, , E_SYSTEM, "[E_SYSTEM] System Error."); + return __pCore->SetBounds(bounds); +} +void +_AccessibilityElementImpl::SetName(const Tizen::Base::String& name) +{ + SysTryReturn(NID_UI, __pCore, , E_SYSTEM, "[E_SYSTEM] System Error."); + return __pCore->SetName(name); +} +void +_AccessibilityElementImpl::SetLabel(const Tizen::Base::String& label) +{ + SysTryReturn(NID_UI, __pCore, , E_SYSTEM, "[E_SYSTEM] System Error."); + __pCore->SetPublicLabelUpdate(true); + return __pCore->SetLabel(label); +} +void +_AccessibilityElementImpl::SetHint(const Tizen::Base::String& hint) +{ + SysTryReturn(NID_UI, __pCore, , E_SYSTEM, "[E_SYSTEM] System Error."); + return __pCore->SetHint(hint, true); +} +void +_AccessibilityElementImpl::SetStatus(const Tizen::Base::String& status) +{ + SysTryReturn(NID_UI, __pCore, , E_SYSTEM, "[E_SYSTEM] System Error."); + return __pCore->SetStatus(status); +} +void +_AccessibilityElementImpl::SetTrait(const Tizen::Base::String& trait) +{ + SysTryReturn(NID_UI, __pCore, , E_SYSTEM, "[E_SYSTEM] System Error."); + return __pCore->SetTrait(trait); +} +void +_AccessibilityElementImpl::SetValue(const Tizen::Base::String& value) +{ + SysTryReturn(NID_UI, __pCore, , E_SYSTEM, "[E_SYSTEM] System Error."); + return __pCore->SetValue(value); +} +void +_AccessibilityElementImpl::SetCore(_AccessibilityElement* pCore) +{ + __pCore = pCore; +} +_AccessibilityElement& +_AccessibilityElementImpl::GetCore() +{ + return *__pCore; +} +const _AccessibilityElement& +_AccessibilityElementImpl::GetCore() const +{ + return *__pCore; +} +AccessibilityElement& +_AccessibilityElementImpl::GetPublic() +{ + return *__pPublic; +} +const AccessibilityElement& +_AccessibilityElementImpl::GetPublic() const +{ + return *__pPublic; +} +Tizen::Base::String +_AccessibilityElementImpl::GetName(void) const +{ + SysTryReturn(NID_UI, __pCore, L"", E_SYSTEM, "[E_SYSTEM] System Error."); + return __pCore->GetName(); +} +Tizen::Graphics::FloatRectangle +_AccessibilityElementImpl::GetBounds(void) const +{ + SysTryReturn(NID_UI, __pCore, Tizen::Graphics::FloatRectangle(0, 0, 0, 0), E_SYSTEM, "[E_SYSTEM] System Error."); + return __pCore->GetBounds(); +} +Tizen::Base::String +_AccessibilityElementImpl::GetLabel(void) const +{ + SysTryReturn(NID_UI, __pCore, L"", E_SYSTEM, "[E_SYSTEM] System Error."); + return __pCore->GetLabel(); +} +Tizen::Base::String +_AccessibilityElementImpl::GetHint(void) const +{ + SysTryReturn(NID_UI, __pCore, L"", E_SYSTEM, "[E_SYSTEM] System Error."); + return __pCore->GetHint(); +} +Tizen::Base::String +_AccessibilityElementImpl::GetStatus(void) const +{ + SysTryReturn(NID_UI, __pCore, L"", E_SYSTEM, "[E_SYSTEM] System Error."); + return __pCore->GetStatus(); +} +Tizen::Base::String +_AccessibilityElementImpl::GetTraitString(void) const +{ + SysTryReturn(NID_UI, __pCore, L"", E_SYSTEM, "[E_SYSTEM] System Error."); + return __pCore->GetTraitString(); +} +Tizen::Base::String +_AccessibilityElementImpl::GetValue(void) const +{ + SysTryReturn(NID_UI, __pCore, -1, E_SYSTEM, "[E_SYSTEM] System Error."); + return __pCore->GetValue(); +} +_AccessibilityElementImpl* +_AccessibilityElementImpl::GetInstance(AccessibilityElement& element) +{ + return static_cast<_AccessibilityElementImpl*> (element.__pAccessibilityElementImpl); +} +const _AccessibilityElementImpl* +_AccessibilityElementImpl::GetInstance(const AccessibilityElement& element) +{ + return static_cast<_AccessibilityElementImpl*> (element.__pAccessibilityElementImpl); +} + +}}//Tizen::Ui diff --git a/src/ui/FUi_AccessibilityGesture.cpp b/src/ui/FUi_AccessibilityGesture.cpp new file mode 100644 index 0000000..186fa61 --- /dev/null +++ b/src/ui/FUi_AccessibilityGesture.cpp @@ -0,0 +1,159 @@ +// +// 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. +// +#include +#include +#include +#include +#include +#include +#include +#include +#include "FUi_AccessibilityGesture.h" +#include "FUi_AccessibilityManager.h" +#include "FUi_ControlManager.h" + +#include "FUiAnim_RootVisualElement.h" +#include "FUiAnim_AnimationManager.h" +#include "FUiAnim_DisplayManager.h" +#include "FUiAnim_EflLayer.h" +#include "FUi_Window.h" + +using namespace Tizen::App; +using namespace Tizen::Graphics; +using namespace Tizen::Ui::Controls; + +/* +namespace +{ + void ConvertTouchPosition(Tizen::Ui::_AccessibilityGestureType& type, float &x, float&y) + { + Tizen::Ui::_Window* pWindow = Tizen::Ui::_ControlManager::GetInstance()->GetCurrentFrame(); + Tizen::Ui::Animations::_RootVisualElement* pRootVE = pWindow->GetRootVisualElement(); + Tizen::Ui::Animations::_EflLayer* pLayer = static_cast(pRootVE->GetNativeLayer()); + + Ecore_Evas* pEcoreEvas = pLayer->GetEcoreEvas(); + Ecore_X_Window win = (Ecore_X_Window)ecore_evas_window_get(pEcoreEvas); + + int rootW = 0; + int rootH = 0; + ecore_x_window_size_get(ecore_x_window_root_get(win), &rootW, &rootH); + + int rotation = ecore_evas_rotation_get(pEcoreEvas); + switch (rotation) + { + case 270: + { + float _x = x; + x = y; + y = rootH - (int)_x; + } + + break; + switch(type) + { + case Tizen::Ui::_ACCESSIBILITY_GESTURE_TYPE_FLICK_UP: + type = Tizen::Ui::_ACCESSIBILITY_GESTURE_TYPE_FLICK_LEFT; + break; + case Tizen::Ui::_ACCESSIBILITY_GESTURE_TYPE_FLICK_DOWN: + type = Tizen::Ui::_ACCESSIBILITY_GESTURE_TYPE_FLICK_RIGHT; + break; + case Tizen::Ui::_ACCESSIBILITY_GESTURE_TYPE_FLICK_LEFT: + type = Tizen::Ui::_ACCESSIBILITY_GESTURE_TYPE_FLICK_DOWN; + break; + case Tizen::Ui::_ACCESSIBILITY_GESTURE_TYPE_FLICK_RIGHT: + type = Tizen::Ui::_ACCESSIBILITY_GESTURE_TYPE_FLICK_UP; + break; + default: + break; + } + case 180: + { + float _x = x; + float _y = y; + x = rootW - (int)_x; + y = rootH - (int)_y; + } + + switch(type) + { + case Tizen::Ui::_ACCESSIBILITY_GESTURE_TYPE_FLICK_UP: + type = Tizen::Ui::_ACCESSIBILITY_GESTURE_TYPE_FLICK_DOWN; + break; + case Tizen::Ui::_ACCESSIBILITY_GESTURE_TYPE_FLICK_DOWN: + type = Tizen::Ui::_ACCESSIBILITY_GESTURE_TYPE_FLICK_UP; + break; + case Tizen::Ui::_ACCESSIBILITY_GESTURE_TYPE_FLICK_LEFT: + type = Tizen::Ui::_ACCESSIBILITY_GESTURE_TYPE_FLICK_RIGHT; + break; + case Tizen::Ui::_ACCESSIBILITY_GESTURE_TYPE_FLICK_RIGHT: + type = Tizen::Ui::_ACCESSIBILITY_GESTURE_TYPE_FLICK_LEFT; + break; + default: + break; + } + break; + case 90: + { + float _x = x; + x = rootW - (int)y; + y = _x; + } + switch(type) + { + case Tizen::Ui::_ACCESSIBILITY_GESTURE_TYPE_FLICK_UP: + type = Tizen::Ui::_ACCESSIBILITY_GESTURE_TYPE_FLICK_RIGHT; + break; + case Tizen::Ui::_ACCESSIBILITY_GESTURE_TYPE_FLICK_DOWN: + type = Tizen::Ui::_ACCESSIBILITY_GESTURE_TYPE_FLICK_LEFT; + break; + case Tizen::Ui::_ACCESSIBILITY_GESTURE_TYPE_FLICK_LEFT: + type = Tizen::Ui::_ACCESSIBILITY_GESTURE_TYPE_FLICK_UP; + break; + case Tizen::Ui::_ACCESSIBILITY_GESTURE_TYPE_FLICK_RIGHT: + type = Tizen::Ui::_ACCESSIBILITY_GESTURE_TYPE_FLICK_DOWN; + break; + default: + break; + } + break; + default: + break; + } + } +} +*/ +namespace Tizen { namespace Ui +{ +_AccessibilityGesture::_AccessibilityGesture(_AccessibilityManager& manager) +: __pManager(&manager) +{ +} + +_AccessibilityGesture::~_AccessibilityGesture(void) +{ +} + +bool +_AccessibilityGesture::ProcessGesture(_AccessibilityGestureType type, float x, float y) +{ + x = CoordinateSystem::ConvertToLogicalX(x); + y = CoordinateSystem::ConvertToLogicalY(y); + //ConvertTouchPosition(type, x,y); + 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 new file mode 100644 index 0000000..5ab2477 --- /dev/null +++ b/src/ui/FUi_AccessibilityManager.cpp @@ -0,0 +1,2539 @@ +// +// 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. +// +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "FUi_AccessibilityGesture.h" +#include "FUi_AccessibilitySystemSettingLoader.h" +#include "FUi_AccessibilityTtsPlayer.h" +#include "FUi_AccessibilityManager.h" +#include "FUi_AccessibilityElement.h" +#include "FUi_AccessibilityContainer.h" +#include "FUi_IAccessibilityListener.h" +#include "FUi_ControlManager.h" +#include "FUi_TouchManager.h" +#include "FUi_UiEventManager.h" +#include "FUiAnim_VisualElementImpl.h" +#include "FUiCtrl_FrameImpl.h" +#include "FUiCtrl_ScrollPanel.h" +#include "FUiCtrl_IconListView.h" +#include "FUi_ResourceManager.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Graphics; +using namespace Tizen::Ui::Animations; +using namespace Tizen::Ui::Controls; +using namespace Tizen::System; +namespace +{ +class GuidePopupTimer + : public ITimerEventListener +{ +public: + GuidePopupTimer(void) + : __pElement(null) + { + timer.Construct(*this); + } + virtual ~GuidePopupTimer(void) {} + void SetElement(VisualElement* pElement) + { + if (__pElement != null) + { + timer.Cancel(); + } + __pElement = pElement; + timer.Start(3000); + + } + void Stop(void) + { + timer.Cancel(); + } + virtual void OnTimerExpired(Timer& timer) + { + if (__pElement) + { + __pElement->SetShowState(false); + } + __pElement = null; + } + VisualElement* __pElement; + Timer timer; +}; + +class AutoReadingTimer + : public ITimerEventListener +{ +public: + AutoReadingTimer(Tizen::Ui::_AccessibilityManager* pManager) + : __pAccessibilityManager(pManager) + , __mode(Tizen::Ui::_ACCESSIBILITY_AUTO_READING_MODE_FIRST_ITEM) + , __start(false) + { + + timer.Construct(*this); + } + virtual ~AutoReadingTimer(void) {} + void Start(Tizen::Ui::_AccessibilityAutoReadingMode mode) + { + if((Tizen::App::_AppInfo::GetAppType() & _APP_TYPE_SERVICE_APP) || (Tizen::App::_AppInfo::GetAppType() & _APP_TYPE_IME_APP)) + { + return; + } + if (__start) + { + Stop(); + } + __start = true; + __mode = mode; + timer.Start(700); + } + void Stop(void) + { + timer.Cancel(); + __start = false; + } + virtual void OnTimerExpired(Timer& timer) + { + if (!(__pAccessibilityManager->IsScreenReaderActivated()) || UiApp::GetInstance()->GetAppUiState() == APP_UI_STATE_BACKGROUND) + { + return Stop(); + } + SysLog(NID_UI, "mode %d", __mode); + if (__pAccessibilityManager->GetTtsStatus() != Tizen::Ui::ACCESSIBILITY_SCREEN_READER_STATUS_READY + && __pAccessibilityManager->GetTtsStatus() != Tizen::Ui::ACCESSIBILITY_SCREEN_READER_STATUS_PLAYING) + { + __start = false; + Start(__mode); + SysLog(NID_UI, "AccessibilityManager::AutoReadingTimer is started again because tts is not initialized."); + return; + } + __start = false; + __pAccessibilityManager->ReadElement(__mode); + } + Tizen::Ui::_AccessibilityManager* __pAccessibilityManager; + Timer timer; + Tizen::Ui::_AccessibilityAutoReadingMode __mode; + bool __start; +}; + +GuidePopupTimer* pGuidePopupTimer; +AutoReadingTimer* pAutoReadingTimer; +} +namespace Tizen { namespace Ui { + +template +class _AccessibilityItemComparer + : public Tizen::Base::Collection::IComparerT +{ +public: + _AccessibilityItemComparer(void) + { + } + virtual ~_AccessibilityItemComparer(void) + { + } + virtual result Compare(const T& obj1, const T& obj2, int& cmp) const + { + Tizen::Graphics::Rectangle rect1= obj1->GetAbsoluteBounds(); + Tizen::Graphics::Rectangle rect2= obj2->GetAbsoluteBounds(); + + if (rect1.y > rect2.y) + { + cmp = 1; + return E_SUCCESS; + } + else if (rect1.y < rect2.y) + { + cmp = -1; + return E_SUCCESS; + } + else + { + if (rect1.x > rect2.x) + { + cmp = 1; + return E_SUCCESS; + } + else if (rect1.x < rect2.x) + { + cmp = -1; + return E_SUCCESS; + } + else + { + cmp = 0; + return E_SUCCESS; + } + } + } +}; //class _AccessibilityComparer + +template +class _ElementComparer + : public Tizen::Base::Collection::IComparerT +{ +public: + _ElementComparer(void) + { + } + virtual ~_ElementComparer(void) + { + } + virtual result Compare(const T& obj1, const T& obj2, int& cmp) const + { + if (obj1->GetParent()->GetPriority() > obj2->GetParent()->GetPriority()) + { + cmp = -1; + return E_SUCCESS; + } + else if (obj1->GetParent()->GetPriority() < obj2->GetParent()->GetPriority()) + { + cmp = 1; + return E_SUCCESS; + } + else + { + Tizen::Graphics::FloatRectangle rect1= obj1->GetAbsoluteBounds(); + Tizen::Graphics::FloatRectangle rect2= obj2->GetAbsoluteBounds(); + + if (rect1.y > rect2.y) + { + cmp = 1; + return E_SUCCESS; + } + else if (rect1.y < rect2.y) + { + cmp = -1; + return E_SUCCESS; + } + else + { + if (rect1.x > rect2.x) + { + cmp = 1; + return E_SUCCESS; + } + else if (rect1.x < rect2.x) + { + cmp = -1; + return E_SUCCESS; + } + else + { + cmp = 0; + return E_SUCCESS; + } + } + } + } +}; + +static _AccessibilityManager* pAccManager = null; +bool _AccessibilityManager::__screenReaderIsEnabled = false; +_AccessibilityManager::_AccessibilityManager(void) + : __pAccGesture(null) + , __pTtsPlayer(null) + , __pSettingLoader(null) + , __pTargetContainer(null) + , __pTargetElement(null) + , __pTitleElement(null) + , __containerList() + , __candidateList() + , __mode(MODE_NONE) + , __pReadingVe(null) + , __pFocusVe(null) + , __pPanningControl(null) + , __needRefreshItem(false) +{ + Initialize(); +} +_AccessibilityManager::~_AccessibilityManager(void) +{ + delete __pAccGesture; + __pAccGesture = null; + delete __pTtsPlayer; + __pTtsPlayer = null; + delete __pSettingLoader; + __pSettingLoader = null; + delete pGuidePopupTimer; + pGuidePopupTimer = null; + delete pAutoReadingTimer; + pAutoReadingTimer = null; +} + +_AccessibilityManager* +_AccessibilityManager::GetInstance(void) +{ + return pAccManager; +} + +void +_AccessibilityManager::CreateInstance(void) +{ + static pthread_once_t onceBlock = PTHREAD_ONCE_INIT; + + if (pAccManager == null) + { + pthread_once(&onceBlock, InitializeInstance); + } +} + +void +_AccessibilityManager::InitializeInstance(void) +{ + pAccManager = new (std::nothrow) _AccessibilityManager; +} +void +_AccessibilityManager::ReleaseInstance(void) +{ + delete pAccManager; + pAccManager = null; +} +void +_AccessibilityManager::Initialize(void) +{ + __pAccGesture = new (std::nothrow) _AccessibilityGesture(*this); + SysTryReturn(NID_UI, __pAccGesture, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed"); + __pTtsPlayer = new (std::nothrow) _AccessibilityTtsPlayer(*this); + SysTryCatch(NID_UI, __pTtsPlayer, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed"); + __pTtsPlayer->Construct(); + __pSettingLoader = new (std::nothrow) _AccessibilitySystemSettingLoader(*this); + SysTryCatch(NID_UI, __pSettingLoader, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed"); + + if (IsScreenReaderActivated()) + { + __pTtsPlayer->Activate(); + } + pGuidePopupTimer = new (std::nothrow) GuidePopupTimer; + SysTryCatch(NID_UI, pGuidePopupTimer, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed"); + pAutoReadingTimer = new (std::nothrow) AutoReadingTimer(this); + SysTryCatch(NID_UI, pAutoReadingTimer, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed"); + return; + +CATCH: + delete __pAccGesture; + __pAccGesture = null; + delete __pTtsPlayer; + __pTtsPlayer = null; + delete __pSettingLoader; + __pSettingLoader = null; + delete pGuidePopupTimer; + pGuidePopupTimer = null; + delete pAutoReadingTimer; + pAutoReadingTimer = null; +} +AccessibilityScreenReaderStatus +_AccessibilityManager::GetTtsStatus(void) +{ + if (__pTtsPlayer) + { + return __pTtsPlayer->GetStatus(); + } + return ACCESSIBILITY_SCREEN_READER_STATUS_ERROR; +} +result +_AccessibilityManager::ReadContent(const Tizen::Base::String& content) +{ + if (__pTtsPlayer) + { +// ShowPopup(content); + __pTtsPlayer->ReadGrammar(content); + } + return E_SUCCESS; +} +void +_AccessibilityManager::ReadElement(_AccessibilityAutoReadingMode mode) +{ + MakeList(); + int count = __candidateList.GetCount(); + if (count < 1) + { + return; + } + _AccessibilityElement* pElement = null; + result r = E_SYSTEM; + + if (mode == _ACCESSIBILITY_AUTO_READING_MODE_FIRST_ITEM) + { + r = __candidateList.GetAt(0, pElement); + } + else if (mode == _ACCESSIBILITY_AUTO_READING_MODE_FIRST_ITEM_OF_CONTENTS) + { + if(__pTitleElement && __pTitleElement->IsUpdated()) + { + return; + } + for (int i = 0 ; i < count ; i++) + { + r = __candidateList.GetAt(i, pElement); + if (r == E_SUCCESS && pElement) + { + if (pElement->GetParent()->GetPriority() < ACCESSIBILITY_PRIORITY_TOP) + { + break; + } + } + } + } + else //_ACCESSIBILITY_AUTO_READING_MODE_CURRENT_FOCUS + { + if (IsContainerValid(__pTargetContainer)) + { + pElement = __pTargetElement; + r = E_SUCCESS; + } + } + if (r != E_SUCCESS || pElement == null) + { + SysLog(NID_UI, "cause 1"); + return; + } + if (mode == _ACCESSIBILITY_AUTO_READING_MODE_FIRST_ITEM && __pTitleElement == pElement && !(__pTitleElement->IsUpdated())) + { + SysLog(NID_UI, "cause 2"); + return; + } + __pTitleElement = pElement; + DrawFocusUi(*pElement); + __pTargetContainer = pElement->GetParent(); + __pTargetElement = pElement; + __targetControlHandle = __pTargetContainer->GetOwner().GetHandle(); + ReadElement(*pElement); +} + +result +_AccessibilityManager::ReadElement(const _AccessibilityElement& element) +{ + if (__pTtsPlayer) + { + LinkedListT<_IAccessibilityListener*>* pList = static_cast*>(__pTargetContainer->GetListenerListN()); + if (pList != null) + { + for (int i = 0;iGetCount();i++) + { + _IAccessibilityListener* pListener = null; + if (pList->GetAt(i, pListener) == E_SUCCESS) + { + pListener->OnAccessibilityReadingElement(*__pTargetContainer, element); + } + } + delete pList; + pList = null; + } +// ShowPopup(); + __pTtsPlayer->ReadGrammar(element.GetReadingContents()); + } + return E_SUCCESS; +} +result +_AccessibilityManager::ReadingStop(void) +{ + return E_SUCCESS; +} +result +_AccessibilityManager::ReadingPause(void) +{ + return E_SUCCESS; +} +result +_AccessibilityManager::ReadingResume(void) +{ + return E_SUCCESS; +} + +void +_AccessibilityManager::OnStartReading(const Tizen::Base::String& grammar) +{ +} +void +_AccessibilityManager::HidePopup(void) +{ + if (__readingPopupParentHandle.IsValid()) + { + if (__pReadingVe) + { + __pReadingVe->Destroy(); + __pReadingVe = null; + } + } + else + { + __pReadingVe = null; + } + pGuidePopupTimer->Stop(); +} +void +_AccessibilityManager::ShowPopup(const String& content) +{ + if (content.IsEmpty()) + { + return; + } + utsname sysInfo; + uname(&sysInfo); + if (String("i686_emulated") != sysInfo.machine) + { + return; + } + Canvas* pCanvas = null; + Bitmap* pBgBitmap = null; + EnrichedText* pEnrichedTitleText = null; + EnrichedText* pText = null; + Frame* pFrame = null; + + if (__readingPopupParentHandle.IsValid()) + { + if (__pReadingVe) + { + __pReadingVe->Destroy(); + __pReadingVe = null; + } + } + else + { + __pReadingVe = null; + } + + pFrame = UiApp::GetInstance()->GetAppFrame()->GetFrame(); + + if (pFrame != null) + { + int accesibilityVisualElementLevel = 3000; + result r = E_SUCCESS; + _Window* pWindow = _ControlManager::GetInstance()->GetTopVisibleWindow(); + VisualElement* pRootVe = pWindow->GetVisualElement(); + + __pReadingVe = new (std::nothrow) VisualElement(); + SysTryCatch(NID_UI, __pReadingVe, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed"); + + r = __pReadingVe->Construct(); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] System error"); + __pReadingVe->SetName("Accessibility reading popup"); + __pReadingVe->SetImplicitAnimationEnabled(false); + _VisualElementImpl::GetInstance(*__pReadingVe)->SetZOrderGroup(accesibilityVisualElementLevel); + pRootVe->AttachChild(*__pReadingVe); + __readingPopupParentHandle = pWindow->GetHandle(); + } + + if (__pReadingVe) + { + result r = E_SUCCESS; + + float titleFontSize = 0; + float textFontSize = 0; + float popupWidth = 0; + float topMargin = 0; + float bottomMargin = 0; + float sideMargin = 0; + float titleHeight = 0; + float textTopMargin = 0; + float textHeight = 0; + + Color titleTextColor; + Color pointTextColor; + Color textColor; + TextElement* pElement = null; + + r = GET_SHAPE_CONFIG(ACCESSIBILITY::TITLE_FONT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, titleFontSize); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + r = GET_SHAPE_CONFIG(ACCESSIBILITY::TEXT_FONT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, textFontSize); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + r = GET_SHAPE_CONFIG(ACCESSIBILITY::POPUP_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, popupWidth); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + r = GET_SHAPE_CONFIG(ACCESSIBILITY::TOP_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, topMargin); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + r = GET_SHAPE_CONFIG(ACCESSIBILITY::BOTTON_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, bottomMargin); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + r = GET_SHAPE_CONFIG(ACCESSIBILITY::SIDE_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, sideMargin); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + r = GET_SHAPE_CONFIG(ACCESSIBILITY::TITLE_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, titleHeight); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + r = GET_SHAPE_CONFIG(ACCESSIBILITY::TEXT_TOP_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, textTopMargin); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + r = GET_SHAPE_CONFIG(ACCESSIBILITY::TEXT_HEGIHT, _CONTROL_ORIENTATION_PORTRAIT, textHeight); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + r = GET_COLOR_CONFIG(ACCESSIBILITY::TITLE_TEXT, titleTextColor); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + r = GET_COLOR_CONFIG(ACCESSIBILITY::POINT_TEXT, pointTextColor); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + r = GET_COLOR_CONFIG(ACCESSIBILITY::TEXT, textColor); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + r = GET_BITMAP_CONFIG_N(ACCESSIBILITY::POPUP_BG, BITMAP_PIXEL_FORMAT_ARGB8888, pBgBitmap); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + + Font titleFont; + r = titleFont.Construct(FONT_STYLE_PLAIN, titleFontSize); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + Font textFont; + r = textFont.Construct(FONT_STYLE_PLAIN, textFontSize); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + + pEnrichedTitleText = new (std::nothrow) EnrichedText; + SysTryCatch(NID_UI, pEnrichedTitleText != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed"); + pEnrichedTitleText->Construct(FloatDimension(popupWidth-sideMargin*2, titleHeight)); + + pText = new (std::nothrow) EnrichedText; + SysTryCatch(NID_UI, pText != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed"); + pText->Construct(FloatDimension(popupWidth-sideMargin*2, textHeight)); + + pElement = new (std::nothrow) TextElement; + SysTryCatch(NID_UI, pElement != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed"); + r = pElement->Construct(L"Screen reading..."); + if (r != E_SUCCESS) + { + delete pElement; + goto CATCH; + } + pElement->SetTextColor(titleTextColor); + pElement->SetFont(titleFont); + r = pEnrichedTitleText->Add(*pElement); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + pEnrichedTitleText->SetHorizontalAlignment(TEXT_ALIGNMENT_LEFT); + pEnrichedTitleText->SetVerticalAlignment(TEXT_ALIGNMENT_TOP); + pEnrichedTitleText->SetTextWrapStyle(TEXT_WRAP_CHARACTER_WRAP); + pEnrichedTitleText->SetTextAbbreviationEnabled(true); + + pElement = new (std::nothrow) TextElement; + SysTryCatch(NID_UI, pElement != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed"); + r = pElement->Construct(content); + if (r != E_SUCCESS) + { + delete pElement; + goto CATCH; + } + pElement->SetTextColor(textColor); + pElement->SetFont(textFont); + r = pText->Add(*pElement); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + pText->SetHorizontalAlignment(TEXT_ALIGNMENT_LEFT); + pText->SetVerticalAlignment(TEXT_ALIGNMENT_TOP); + pText->SetTextWrapStyle(TEXT_WRAP_CHARACTER_WRAP); + pText->SetTextAbbreviationEnabled(true); + + float x = 40; + float y = 200; + float popupHeight = topMargin + bottomMargin + titleHeight + textTopMargin + textHeight; + + FloatDimension screen = Tizen::Ui::_ControlManager::GetInstance()->GetScreenSizeF(); + __pReadingVe->SetBounds(FloatRectangle(x, y, popupWidth, popupHeight)); + pCanvas = __pReadingVe->GetCanvasN(); + SysTryCatch(NID_UI, pCanvas != null, , E_SYSTEM, "System error for accessibility popup"); + pCanvas->DrawNinePatchedBitmap(FloatRectangle(0, 0, popupWidth, popupHeight), *pBgBitmap); + float drawingTextY = topMargin; + pCanvas->DrawText(FloatPoint(sideMargin, drawingTextY), *pEnrichedTitleText); + drawingTextY += textTopMargin + titleHeight; + pCanvas->DrawText(FloatPoint(sideMargin, drawingTextY), *pText); + __pReadingVe->SetShowState(true); + __pReadingVe->SetFlushNeeded(); + pGuidePopupTimer->SetElement(__pReadingVe); + + } +CATCH: + delete pCanvas; + pCanvas = null; + delete pBgBitmap; + pBgBitmap = null; + if (pEnrichedTitleText) + { + pEnrichedTitleText->RemoveAll(true); + delete pEnrichedTitleText; + } + if (pText) + { + pText->RemoveAll(true); + delete pText; + } + + return; + +} +void +_AccessibilityManager::ShowPopup() +{ + if (__pTargetElement == null) + { + return; + } + utsname sysInfo; + uname(&sysInfo); + Frame* pFrame = null; + Canvas* pCanvas = null; + Bitmap* pBgBitmap = null; + EnrichedText* pEnrichedTitleText = null; + EnrichedText* pEnrichedNameText = null; + EnrichedText* pEnrichedLableText = null; + EnrichedText* pEnrichedTraitText = null; + EnrichedText* pEnrichedStatusText = null; + EnrichedText* pEnrichedHintText = null; + EnrichedText* pEnrichedValueText = null; + EnrichedText* pEnrichedBoundsText = null; + EnrichedText* pEnrichedAbsBoundsText = null; + TextElement* pElement = null; + FloatDimension screen; + + if (String("i686_emulated") != sysInfo.machine) + { + return; + } + + if (__readingPopupParentHandle.IsValid()) + { + if (__pReadingVe) + { + __pReadingVe->Destroy(); + __pReadingVe = null; + } + } + else + { + __pReadingVe = null; + } + + pFrame = UiApp::GetInstance()->GetAppFrame()->GetFrame(); + + if (pFrame != null) + { + int accesibilityVisualElementLevel = 3000; + result r = E_SUCCESS; + _Window* pWindow = _ControlManager::GetInstance()->GetTopVisibleWindow(); + VisualElement* pRootVe = pWindow->GetVisualElement(); + __readingPopupParentHandle = pWindow->GetHandle(); + __pReadingVe = new (std::nothrow) VisualElement(); + SysTryCatch(NID_UI, __pReadingVe, , E_SYSTEM, "[E_SYSTEM] System error"); + + r = __pReadingVe->Construct(); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] System error"); + __pReadingVe->SetName("Accessibility reading popup"); + __pReadingVe->SetImplicitAnimationEnabled(false); + _VisualElementImpl::GetInstance(*__pReadingVe)->SetZOrderGroup(accesibilityVisualElementLevel); + pRootVe->AttachChild(*__pReadingVe); + } + + screen = _ControlManager::GetInstance()->GetScreenSizeF(); + if (__pReadingVe) + { + result r = E_SUCCESS; + + float titleFontSize = 0; + float textFontSize = 0; + float popupWidth = 0; + float topMargin = 0; + float bottomMargin = 0; + float sideMargin = 0; + float titleHeight = 0; + float textTopMargin = 0; + float textHeight = 0; + + Color titleTextColor; + Color pointTextColor; + Color textColor; + + r = GET_SHAPE_CONFIG(ACCESSIBILITY::TITLE_FONT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, titleFontSize); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + r = GET_SHAPE_CONFIG(ACCESSIBILITY::TEXT_FONT_SIZE, _CONTROL_ORIENTATION_PORTRAIT, textFontSize); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + r = GET_SHAPE_CONFIG(ACCESSIBILITY::POPUP_WIDTH, _CONTROL_ORIENTATION_PORTRAIT, popupWidth); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + r = GET_SHAPE_CONFIG(ACCESSIBILITY::TOP_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, topMargin); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + r = GET_SHAPE_CONFIG(ACCESSIBILITY::BOTTON_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, bottomMargin); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + r = GET_SHAPE_CONFIG(ACCESSIBILITY::SIDE_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, sideMargin); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + r = GET_SHAPE_CONFIG(ACCESSIBILITY::TITLE_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, titleHeight); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + r = GET_SHAPE_CONFIG(ACCESSIBILITY::TEXT_TOP_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, textTopMargin); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + r = GET_SHAPE_CONFIG(ACCESSIBILITY::TEXT_HEGIHT, _CONTROL_ORIENTATION_PORTRAIT, textHeight); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + r = GET_COLOR_CONFIG(ACCESSIBILITY::TITLE_TEXT, titleTextColor); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + r = GET_COLOR_CONFIG(ACCESSIBILITY::POINT_TEXT, pointTextColor); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + r = GET_COLOR_CONFIG(ACCESSIBILITY::TEXT, textColor); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + r = GET_BITMAP_CONFIG_N(ACCESSIBILITY::POPUP_BG, BITMAP_PIXEL_FORMAT_ARGB8888, pBgBitmap); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + + Font titleFont; + r = titleFont.Construct(FONT_STYLE_PLAIN, titleFontSize); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + + Font textFont; + r = textFont.Construct(FONT_STYLE_PLAIN, textFontSize); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + + pEnrichedTitleText = new (std::nothrow) EnrichedText; + SysTryCatch(NID_UI, pEnrichedTitleText != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed"); + pEnrichedTitleText->Construct(FloatDimension(popupWidth-sideMargin*2, titleHeight)); + + pEnrichedNameText = new (std::nothrow) EnrichedText; + SysTryCatch(NID_UI, pEnrichedNameText != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed"); + pEnrichedNameText->Construct(FloatDimension(popupWidth-sideMargin*2, textHeight)); + + pEnrichedLableText = new (std::nothrow) EnrichedText; + SysTryCatch(NID_UI, pEnrichedLableText != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed"); + pEnrichedLableText->Construct(FloatDimension(popupWidth-sideMargin*2, textHeight)); + + pEnrichedTraitText = new (std::nothrow) EnrichedText; + SysTryCatch(NID_UI, pEnrichedTraitText != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + pEnrichedTraitText->Construct(FloatDimension(popupWidth-sideMargin*2, textHeight)); + + pEnrichedStatusText = new (std::nothrow) EnrichedText; + SysTryCatch(NID_UI, pEnrichedStatusText != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + pEnrichedStatusText->Construct(FloatDimension(popupWidth-sideMargin*2, textHeight)); + + pEnrichedHintText = new (std::nothrow) EnrichedText; + SysTryCatch(NID_UI, pEnrichedHintText != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + pEnrichedHintText->Construct(FloatDimension(popupWidth-sideMargin*2, textHeight)); + + pEnrichedValueText = new (std::nothrow) EnrichedText; + SysTryCatch(NID_UI, pEnrichedValueText != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + pEnrichedValueText->Construct(FloatDimension(popupWidth-sideMargin*2, textHeight)); + + pEnrichedBoundsText = new (std::nothrow) EnrichedText; + SysTryCatch(NID_UI, pEnrichedBoundsText != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + pEnrichedBoundsText->Construct(FloatDimension(popupWidth-sideMargin*2, textHeight)); + + pEnrichedAbsBoundsText = new (std::nothrow) EnrichedText; + SysTryCatch(NID_UI, pEnrichedAbsBoundsText != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + pEnrichedAbsBoundsText->Construct(FloatDimension(popupWidth-sideMargin*2, textHeight)); + + pElement = new (std::nothrow) TextElement; + r = pElement->Construct(L"Screen reading..."); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + pElement->SetTextColor(titleTextColor); + pElement->SetFont(titleFont); + r = pEnrichedTitleText->Add(*pElement); + + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + pEnrichedTitleText->SetHorizontalAlignment(TEXT_ALIGNMENT_LEFT); + pEnrichedTitleText->SetVerticalAlignment(TEXT_ALIGNMENT_TOP); + pEnrichedTitleText->SetTextWrapStyle(TEXT_WRAP_CHARACTER_WRAP); + pEnrichedTitleText->SetTextAbbreviationEnabled(true); + + pElement = new (std::nothrow) TextElement; + r = pElement->Construct(L"Name: "); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + + pElement->SetTextColor(pointTextColor); + pElement->SetFont(textFont); + r = pEnrichedNameText->Add(*pElement); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + + if (!(__pTargetElement->GetName().IsEmpty())) + { + pElement = new (std::nothrow) TextElement; + r = pElement->Construct(__pTargetElement->GetName()); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + + pElement->SetTextColor(textColor); + pElement->SetFont(textFont); + r = pEnrichedNameText->Add(*pElement); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + SysLog(NID_UI, " Name :::::: %s", _StringConverter::CopyToCharArrayN(__pTargetElement->GetName())); + } + pEnrichedNameText->SetHorizontalAlignment(TEXT_ALIGNMENT_LEFT); + pEnrichedNameText->SetVerticalAlignment(TEXT_ALIGNMENT_TOP); + pEnrichedNameText->SetTextWrapStyle(TEXT_WRAP_CHARACTER_WRAP); + pEnrichedNameText->SetTextAbbreviationEnabled(true); + + pElement = new (std::nothrow) TextElement; + SysTryCatch(NID_UI, pElement != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed"); + r = pElement->Construct(L"Label: "); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + + pElement->SetTextColor(pointTextColor); + pElement->SetFont(textFont); + r = pEnrichedLableText->Add(*pElement); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + + if (!(__pTargetElement->GetLabel().IsEmpty())) + { + pElement = new (std::nothrow) TextElement; + SysTryCatch(NID_UI, pElement != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed"); + r = pElement->Construct(__pTargetElement->GetLabel()); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + + pElement->SetTextColor(textColor); + pElement->SetFont(textFont); + r = pEnrichedLableText->Add(*pElement); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + SysLog(NID_UI, " Label :::::: %s", _StringConverter::CopyToCharArrayN(__pTargetElement->GetLabel())); + } + pEnrichedLableText->SetHorizontalAlignment(TEXT_ALIGNMENT_LEFT); + pEnrichedLableText->SetVerticalAlignment(TEXT_ALIGNMENT_TOP); + pEnrichedLableText->SetTextWrapStyle(TEXT_WRAP_CHARACTER_WRAP); + pEnrichedLableText->SetTextAbbreviationEnabled(true); + + pElement = new (std::nothrow) TextElement; + SysTryCatch(NID_UI, pElement != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed"); + r = pElement->Construct(L"Trait: "); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + + pElement->SetTextColor(pointTextColor); + pElement->SetFont(textFont); + r = pEnrichedTraitText->Add(*pElement); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + if (!(__pTargetElement->GetTraitString().IsEmpty())) + { + pElement = new (std::nothrow) TextElement; + SysTryCatch(NID_UI, pElement != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed"); + r = pElement->Construct(__pTargetElement->GetTraitString()); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + + pElement->SetTextColor(textColor); + pElement->SetFont(textFont); + r = pEnrichedTraitText->Add(*pElement); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + } + pEnrichedTraitText->SetHorizontalAlignment(TEXT_ALIGNMENT_LEFT); + pEnrichedTraitText->SetVerticalAlignment(TEXT_ALIGNMENT_TOP); + pEnrichedTraitText->SetTextWrapStyle(TEXT_WRAP_CHARACTER_WRAP); + pEnrichedTraitText->SetTextAbbreviationEnabled(true); + + pElement = new (std::nothrow) TextElement; + SysTryCatch(NID_UI, pElement != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed"); + r = pElement->Construct(L"Status: "); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + + pElement->SetTextColor(pointTextColor); + pElement->SetFont(textFont); + r = pEnrichedStatusText->Add(*pElement); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + if (!(__pTargetElement->GetStatus().IsEmpty())) + { + pElement = new (std::nothrow) TextElement; + SysTryCatch(NID_UI, pElement != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed"); + r = pElement->Construct(__pTargetElement->GetStatus()); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + + pElement->SetTextColor(textColor); + pElement->SetFont(textFont); + r = pEnrichedStatusText->Add(*pElement); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + } + pEnrichedStatusText->SetHorizontalAlignment(TEXT_ALIGNMENT_LEFT); + pEnrichedStatusText->SetVerticalAlignment(TEXT_ALIGNMENT_TOP); + pEnrichedStatusText->SetTextWrapStyle(TEXT_WRAP_CHARACTER_WRAP); + pEnrichedStatusText->SetTextAbbreviationEnabled(true); + + pElement = new (std::nothrow) TextElement; + SysTryCatch(NID_UI, pElement != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed"); + r = pElement->Construct(L"Hint: "); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + + pElement->SetTextColor(pointTextColor); + pElement->SetFont(textFont); + r = pEnrichedHintText->Add(*pElement); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + if (!(__pTargetElement->GetHint().IsEmpty())) + { + pElement = new (std::nothrow) TextElement; + SysTryCatch(NID_UI, pElement != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed"); + r = pElement->Construct(__pTargetElement->GetHint()); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + + pElement->SetTextColor(textColor); + pElement->SetFont(textFont); + r = pEnrichedHintText->Add(*pElement); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + } + pEnrichedHintText->SetHorizontalAlignment(TEXT_ALIGNMENT_LEFT); + pEnrichedHintText->SetVerticalAlignment(TEXT_ALIGNMENT_TOP); + pEnrichedHintText->SetTextWrapStyle(TEXT_WRAP_CHARACTER_WRAP); + pEnrichedHintText->SetTextAbbreviationEnabled(true); + + pElement = new (std::nothrow) TextElement; + SysTryCatch(NID_UI, pElement != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed"); + r = pElement->Construct(L"Value: "); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + + pElement->SetTextColor(pointTextColor); + pElement->SetFont(textFont); + r = pEnrichedValueText->Add(*pElement); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + if (!(__pTargetElement->GetValue().IsEmpty())) + { + pElement = new (std::nothrow) TextElement; + SysTryCatch(NID_UI, pElement != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed"); + r = pElement->Construct(__pTargetElement->GetValue()); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + + pElement->SetTextColor(textColor); + pElement->SetFont(textFont); + r = pEnrichedValueText->Add(*pElement); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + } + pEnrichedValueText->SetHorizontalAlignment(TEXT_ALIGNMENT_LEFT); + pEnrichedValueText->SetVerticalAlignment(TEXT_ALIGNMENT_TOP); + pEnrichedValueText->SetTextWrapStyle(TEXT_WRAP_CHARACTER_WRAP); + pEnrichedValueText->SetTextAbbreviationEnabled(true); + + pElement = new (std::nothrow) TextElement; + SysTryCatch(NID_UI, pElement != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed"); + r = pElement->Construct(L"Bound: "); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + + pElement->SetTextColor(pointTextColor); + pElement->SetFont(textFont); + r = pEnrichedBoundsText->Add(*pElement); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + + pElement = new (std::nothrow) TextElement; + SysTryCatch(NID_UI, pElement != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed"); + FloatRectangle rect = __pTargetElement->GetBounds(); + String rectString; + rectString.Format(40, L"x:%.1f, y:%.1f, w:%.1f, h:%.1f", rect.x, rect.y, rect.width, rect.height); + r = pElement->Construct(rectString); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + + pElement->SetTextColor(textColor); + pElement->SetFont(textFont); + r = pEnrichedBoundsText->Add(*pElement); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + pEnrichedBoundsText->SetHorizontalAlignment(TEXT_ALIGNMENT_LEFT); + pEnrichedBoundsText->SetVerticalAlignment(TEXT_ALIGNMENT_TOP); + pEnrichedBoundsText->SetTextWrapStyle(TEXT_WRAP_CHARACTER_WRAP); + pEnrichedBoundsText->SetTextAbbreviationEnabled(true); + + pElement = new (std::nothrow) TextElement; + SysTryCatch(NID_UI, pElement != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed"); + r = pElement->Construct(L"AbsBound: "); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + + pElement->SetTextColor(pointTextColor); + pElement->SetFont(textFont); + r = pEnrichedAbsBoundsText->Add(*pElement); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + + pElement = new (std::nothrow) TextElement; + SysTryCatch(NID_UI, pElement != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed"); + rect = __pTargetElement->GetAbsoluteBounds(); + rectString.Clear(); + rectString.Format(40, L"x:%.1f, y:%.1f, w:%.1f, h:%.1f", rect.x, rect.y, rect.width, rect.height); + r = pElement->Construct(rectString); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + + pElement->SetTextColor(textColor); + pElement->SetFont(textFont); + r = pEnrichedAbsBoundsText->Add(*pElement); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "System error for accessibility popup"); + pEnrichedAbsBoundsText->SetHorizontalAlignment(TEXT_ALIGNMENT_LEFT); + pEnrichedAbsBoundsText->SetVerticalAlignment(TEXT_ALIGNMENT_TOP); + pEnrichedAbsBoundsText->SetTextWrapStyle(TEXT_WRAP_CHARACTER_WRAP); + pEnrichedAbsBoundsText->SetTextAbbreviationEnabled(true); + + float x = 0; + float y = 0; + float popupHeight = topMargin + bottomMargin + titleHeight + textTopMargin + textHeight * 8; + Frame* pFrame = UiApp::GetInstance()->GetAppFrame()->GetFrame(); + Form* pForm = pFrame->GetCurrentForm(); + FloatDimension screen = Tizen::Ui::_ControlManager::GetInstance()->GetScreenSizeF(); + + if (pForm->GetOrientationStatus() == ORIENTATION_STATUS_PORTRAIT + || pForm->GetOrientationStatus() == ORIENTATION_STATUS_PORTRAIT_REVERSE) + { + x = (screen.width-popupWidth) / 2; + if (rect.y < screen.height/2) + { + y = (screen.height/2 - popupHeight) /2 + screen.height/2; + } + else + { + y = (screen.height/2 - popupHeight) /2; + } + } + else + { + y = (screen.width-popupHeight) / 2; + if (rect.x < screen.height/2) + { + x = (screen.height/2 - popupWidth) /2 + screen.height/2; + } + else + { + x = (screen.height/2 - popupWidth) /2; + } + } + + __pReadingVe->SetBounds(FloatRectangle(x, y, popupWidth, popupHeight)); + pCanvas = __pReadingVe->GetCanvasN(); + SysTryCatch(NID_UI, pCanvas != null, , E_SYSTEM, "System error for accessibility popup"); + pCanvas->DrawNinePatchedBitmap(FloatRectangle(0, 0, popupWidth, popupHeight), *pBgBitmap); + float drawingTextY = topMargin; + pCanvas->DrawText(FloatPoint(sideMargin, drawingTextY), *pEnrichedTitleText); + drawingTextY += textTopMargin + titleHeight; + pCanvas->DrawText(FloatPoint(sideMargin, drawingTextY), *pEnrichedNameText); + drawingTextY += textHeight; + pCanvas->DrawText(FloatPoint(sideMargin, drawingTextY), *pEnrichedLableText); + drawingTextY += textHeight; + pCanvas->DrawText(FloatPoint(sideMargin, drawingTextY), *pEnrichedTraitText); + drawingTextY += textHeight; + pCanvas->DrawText(FloatPoint(sideMargin, drawingTextY), *pEnrichedStatusText); + drawingTextY += textHeight; + pCanvas->DrawText(FloatPoint(sideMargin, drawingTextY), *pEnrichedHintText); + drawingTextY += textHeight; + pCanvas->DrawText(FloatPoint(sideMargin, drawingTextY), *pEnrichedValueText); + drawingTextY += textHeight; + pCanvas->DrawText(FloatPoint(sideMargin, drawingTextY), *pEnrichedBoundsText); + drawingTextY += textHeight; + pCanvas->DrawText(FloatPoint(sideMargin, drawingTextY), *pEnrichedAbsBoundsText); + __pReadingVe->SetShowState(true); + __pReadingVe->SetFlushNeeded(); + pGuidePopupTimer->SetElement(__pReadingVe); + + } + //go through +CATCH: + delete pCanvas; + pCanvas = null; + delete pBgBitmap; + pBgBitmap = null; + if (pEnrichedTitleText) + { + pEnrichedTitleText->RemoveAll(true); + delete pEnrichedTitleText; + } + if (pEnrichedNameText) + { + pEnrichedNameText->RemoveAll(true); + delete pEnrichedNameText; + } + if (pEnrichedLableText) + { + pEnrichedLableText->RemoveAll(true); + delete pEnrichedLableText; + } + if (pEnrichedTraitText) + { + pEnrichedTraitText->RemoveAll(true); + delete pEnrichedTraitText; + } + if (pEnrichedStatusText) + { + pEnrichedStatusText->RemoveAll(true); + delete pEnrichedStatusText; + } + if (pEnrichedHintText) + { + pEnrichedHintText->RemoveAll(true); + delete pEnrichedHintText; + } + if (pEnrichedValueText) + { + pEnrichedValueText->RemoveAll(true); + delete pEnrichedValueText; + } + if (pEnrichedBoundsText) + { + pEnrichedBoundsText->RemoveAll(true); + delete pEnrichedBoundsText; + } + if (pEnrichedAbsBoundsText) + { + pEnrichedAbsBoundsText->RemoveAll(true); + delete pEnrichedAbsBoundsText; + } + + return; +} + +void +_AccessibilityManager::OnFinishReading(const Tizen::Base::String& grammar) +{ +// HidePopup(); + if (!IsContainerValid(__pTargetContainer)) + { + return; + } + LinkedListT<_IAccessibilityListener*>* pList = static_cast*>(__pTargetContainer->GetListenerListN()); + if (pList != null) + { + for (int i = 0;iGetCount();i++) + { + _IAccessibilityListener* pListener = null; + if (pList->GetAt(i, pListener) == E_SUCCESS) + { + if (__pTargetElement) + { + pListener->OnAccessibilityReadElement(*__pTargetContainer, *__pTargetElement); + } + } + } + delete pList; + pList = null; + } + return; +} + +String +_AccessibilityManager::GetCurrentGrammar(void) +{ + return L""; +} +void +_AccessibilityManager::AddContainer(const _AccessibilityContainer& container) +{ + __containerList.Add(&const_cast<_AccessibilityContainer&>(container)); + if(__mode == MODE_FOCUS_MOVE) + { + SetGestureMode(MODE_TAP); + } + return; +} +void +_AccessibilityManager::RemoveContainer(const _AccessibilityContainer& container) +{ + __containerList.Remove(&const_cast<_AccessibilityContainer&>(container)); + if(__mode == MODE_FOCUS_MOVE) + { + SetGestureMode(MODE_TAP); + } + if (__pTargetContainer == &container) + { + if(__pTargetContainer) + { + __pTargetContainer->SetCurrentFocusedElement(null); + } + __pTargetContainer = null; + __pTargetElement = null; + } + return; +} + +void +_AccessibilityManager::MakeList(void) +{ + struct DownVisitor + { + DownVisitor(_Control& control, LinkedListT<_Control*>& list) + { + LinkedListT<_Control*> _list; + int count = control.GetChildCount(); + _Control* pControl = null; + for (int i = 0; i < count ; i++) + { + pControl = control.GetChild(i); + if (pControl) + { + _list.Add(pControl); + } + } + _AccessibilityItemComparer<_Control*> comparer; + _list.Sort(comparer); + int index = 0; + list.IndexOf(&control, index); + list.InsertItemsFrom(_list,index+1); + for (int i = 0; i < count ; i++) + { + pControl = control.GetChild(i); + DownVisitor(*pControl, list); + } + } + }; + if ( !__needRefreshItem && GetGestureMode() == MODE_FOCUS_MOVE) + { + __needRefreshItem = false; + return; + } + __needRefreshItem = false; + result r = E_SUCCESS; + int count = 0; + _Control* pControl = null; + _AccessibilityContainer* pContainer = null; + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + LinkedListT<_Control*> controlList; + LinkedListT<_AccessibilityElement*> elementPositionList; + LinkedListT<_AccessibilityElement*> elementPositionByControlList; + __candidateList.RemoveAll(); + + if (pTouchManager) + { + pControl = pTouchManager->GetCapturedControl(); + if (pControl) + { + controlList.Add(pControl); + } + } + + if (pControl == null) + { + pControl = static_cast<_Control*>(_ControlManager::GetInstance()->GetWindow(_ControlManager::GetInstance()->GetWindowCount() - 1)); + controlList.Add(pControl); + } + DownVisitor(*pControl, controlList); + count = controlList.GetCount(); + Dimension screen = _ResourceManager::GetInstance()->GetLogicalScreenSizen(); + int margin = _ControlManager::GetInstance()->GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT ? screen.width : screen.height; + + for(int i = 0 ; i < count ; i++) + { + if (controlList.GetAt(i, pControl) == E_SUCCESS) + { + FloatRectangle rect = pControl->GetAbsoluteBoundsF(true); + if (rect.x + rect.width <= 0.0f || (rect.x) >= margin) + { + bool inside = false; + _Control* _pControl = pControl; + while(_pControl) + { + if(dynamic_cast<_IScrollableContainer*>(_pControl)) + { + if (rect.x + rect.width > 0.0f && (rect.x) < margin) + { + inside = true; + break; + } + } + _pControl = _pControl->GetParent(); + } + if(!inside) + { + _AccessibilityContainer* pContainer = pControl->GetAccessibilityContainer()->GetRootParent(); + if(pContainer != null) + { + rect = pContainer->GetAbsoluteBounds(); + if (rect.x + rect.width > 0.0f && (rect.x) < margin) + { + inside = true; + } + } + } + if(!inside) + { + controlList.Remove(pControl); + i--; + count--; + } + } + } + } + for (int i = 0; i < controlList.GetCount() ; i++) + { + if (controlList.GetAt(i, pControl) == E_SUCCESS) + { + pContainer = pControl->GetAccessibilityContainer(); + if (pContainer == null) + { + continue; + } + if (IsContainerValid(pContainer)) + { + pContainer->SortElements(); + pContainer->GetElements(elementPositionList); + pContainer->GetElements(elementPositionByControlList); + } + } + } + bool done = false; + _ElementComparer<_AccessibilityElement*> comparer; + elementPositionList.Sort(comparer); + count = elementPositionList.GetCount(); + int index = 0; + _AccessibilityElement* pPositionListElement = null; + _AccessibilityElement* pPositionByControlListElement = null; + while (!done && index < count && index < count) + { + Rectangle rect; + r = elementPositionList.GetAt(index, pPositionListElement); + if (r != E_SUCCESS) + { + index++; + continue; + } + + r = elementPositionByControlList.GetAt(index, pPositionByControlListElement); + if (r != E_SUCCESS) + { + index++; + continue; + } + + if (pPositionListElement == pPositionByControlListElement) + { + __candidateList.Add(pPositionByControlListElement); + index++; + continue; + } + + if (pPositionListElement->GetParent()->GetPriority() > pPositionByControlListElement->GetParent()->GetPriority()) + { + elementPositionByControlList.Remove(pPositionListElement); + elementPositionByControlList.InsertAt(pPositionListElement, index); + __candidateList.Add(pPositionListElement); + index++; + continue; + } + else if (pPositionListElement->GetParent()->GetPriority() < pPositionByControlListElement->GetParent()->GetPriority()) + { + elementPositionList.Remove(pPositionByControlListElement); + elementPositionList.InsertAt(pPositionByControlListElement, index); + __candidateList.Add(pPositionByControlListElement); + index++; + continue; + } + + if (pPositionListElement->GetAbsoluteBounds().y > pPositionByControlListElement->GetAbsoluteBounds().y) + { + elementPositionList.Remove(pPositionByControlListElement); + elementPositionList.InsertAt(pPositionByControlListElement, index); + __candidateList.Add(pPositionByControlListElement); + index++; + continue; + } + else if (pPositionListElement->GetAbsoluteBounds().y < pPositionByControlListElement->GetAbsoluteBounds().y) + { + pControl = &(pPositionByControlListElement->GetParent()->GetOwner()); + while (pControl) + { + rect = pControl->GetAbsoluteBounds(true); + if (rect.y >0) + { + break; + } + else + { + if(pControl->GetParent()) + { + pControl = pControl->GetParent(); + } + else + { + break; + } + } + } + if (pControl) + { + controlList.RemoveAll(); + controlList.Add(pControl); + DownVisitor(*pControl, controlList); + int _count = controlList.GetCount(); + LinkedListT<_AccessibilityElement*> _elementPositionList; + for (int i = 0; i < _count ; i++) + { + if (controlList.GetAt(i, pControl) == E_SUCCESS) + { + pContainer = pControl->GetAccessibilityContainer(); + if (pContainer == null) + { + continue; + } + if (IsContainerValid(pContainer)) + { + pContainer->GetElements(_elementPositionList); + } + } + } + _elementPositionList.Sort(comparer); + _count = _elementPositionList.GetCount(); + _AccessibilityElement* pElement = null; + for (int i = 0 ; i < _count ; i++) + { + r = _elementPositionList.GetAt(i, pElement); + if (r != E_SUCCESS) + { + continue; + } + if (__candidateList.Contains(pElement)) + { + continue; + } + __candidateList.Add(pElement); + elementPositionByControlList.Remove(pElement); + elementPositionByControlList.InsertAt(pElement, index); + index++; + } + } + } + else + { + elementPositionList.Remove(pPositionByControlListElement); + elementPositionList.InsertAt(pPositionByControlListElement, index); + elementPositionByControlList.Remove(pPositionByControlListElement); + elementPositionByControlList.InsertAt(pPositionByControlListElement, index); + __candidateList.Add(pPositionByControlListElement); + index++; + continue; + } + } + + count = __candidateList.GetCount(); + SysLog(NID_UI, "Accessibility element candidate count : %d", count); + if (count < 1) + { + return; + } + _AccessibilityElement* pElement = null; + _AccessibilityElement* pElement2 = null; + int selectedHeader = -1; + int startHeader = -1; + int endHeader = -1; + int selectedFooter = -1; + int startFooter = -1; + int endFooter = -1; + for (int i = 0 ; i < count ; i++) + { + r = __candidateList.GetAt(i, pElement); + if(pElement->GetParent()->GetPriority() == ACCESSIBILITY_PRIORITY_TOP) + { + if (startHeader == -1) + { + startHeader=i; + } + endHeader = i; + } + if(pElement->GetParent()->GetPriority() == ACCESSIBILITY_PRIORITY_BOTTOM) + { + if (startFooter == -1) + { + startFooter=i; + } + endFooter = i; + } + } + if(startHeader != -1 && endHeader - startHeader > 0) + { + for(int i = startHeader; i <= endHeader ; i++) + { + r = __candidateList.GetAt(i, pElement); + if (r != E_SUCCESS) + { + continue; + } + selectedHeader = i; + for(int j = i +1 ; j <= endHeader; j++) + { + r = __candidateList.GetAt(j, pElement2); + if (r != E_SUCCESS) + { + continue; + } + if(pElement->GetAbsoluteBounds().x > pElement2->GetAbsoluteBounds().x) + { + pElement = pElement2; + selectedHeader = j; + } + } + if(selectedHeader != i) + { + __candidateList.Remove(pElement); + __candidateList.InsertAt(pElement, i); + } + } + } + if(startFooter != -1 && endFooter - startFooter > 0) + { + for(int i = startFooter; i <= endFooter ; i++) + { + r = __candidateList.GetAt(i, pElement); + if (r != E_SUCCESS) + { + continue; + } + selectedFooter = i; + for(int j = i +1 ; j <= endFooter; j++) + { + r = __candidateList.GetAt(j, pElement2); + if (r != E_SUCCESS) + { + continue; + } + if(pElement->GetAbsoluteBounds().x > pElement2->GetAbsoluteBounds().x) + { + pElement = pElement2; + selectedFooter = j; + } + } + if(selectedFooter != i) + { + __candidateList.Remove(pElement); + __candidateList.InsertAt(pElement, i); + } + } + } + + return; +} +void +_AccessibilityManager::MakeList(_AccessibilityContainer* pContainer) +{ + if (pContainer->GetOwner().IsVisible() && pContainer->IsActivated()) + { + pContainer->GetElements(__candidateList); + } + _Control* pControl = &(pContainer->GetOwner()); + int count = pControl->GetChildCount(); + for (int i = 0 ; iGetChild(i); + if (pChildControl) + { + MakeList(pChildControl->GetAccessibilityContainer()); + } + } + return; +} +bool +_AccessibilityManager::MoveFocus(_AccessibilityFocusDirection direction) +{ + if (direction == _ACCESSIBILITY_FOCUS_DIRECTION_PREVIOUS + || direction == _ACCESSIBILITY_FOCUS_DIRECTION_NEXT) + { + MakeList(); + } + else + { + return false; + } + + int count = __candidateList.GetCount(); + if (count <= 0) + { + return false; + } + SysLog(NID_UI, "count ", count); + result r = E_SUCCESS; + int index = 0; + _AccessibilityElement* pElement = null; + _AccessibilityContainer* pContainer = null; + bool focusManaged = false; + if (IsContainerValid(__pTargetContainer)) + { + r = __candidateList.IndexOf(__pTargetElement, 0, index); + if (r != E_SUCCESS) + { + pElement = null; + __pTargetElement = null; + if(__pTargetContainer) + { + __pTargetContainer->SetCurrentFocusedElement(null); + } + __pTargetContainer = null; + + } + else + { + if ((__pTargetContainer->MoveFocus(direction))) + { + pElement = __pTargetContainer->GetCurrentFocusedElement(); + focusManaged = true; + } + else + { + index += direction; + if (index < 0) + { + index = count - 1; + } + if (index > count - 1) + { + index = 0; + } + __candidateList.GetAt(index, pElement); + if (pElement->GetParent()->IsFocusManaged()) + { + if ((pElement->GetParent()->MoveFocus(direction))) + { + focusManaged = true; + } + } + } + } + } + else + { + SysTryReturn(NID_UI, __candidateList.GetAt(0, pElement) == E_SUCCESS, false, E_SUCCESS, "[E_SUCCESS] Candidates are not exist."); + } + if (pElement) + { + pContainer = pElement->GetParent(); + IListT<_IAccessibilityListener*>* pListenerList = pContainer->GetListenerListN(); + if (pListenerList) + { + int listenerCount = pListenerList->GetCount(); + if (listenerCount > 0) + { + for (int i = 0;iGetAt(i, pListener) == E_SUCCESS) + { + if (pListener->OnAccessibilityItemRefreshed(*pContainer, *pElement, direction) == true) + { + return MoveFocus(direction); + } + } + } + } + delete pListenerList; + pListenerList = null; + } + + if (__pTargetContainer) + { + pListenerList = __pTargetContainer->GetListenerListN(); + if (pListenerList) + { + int listenerCount = pListenerList->GetCount(); + if (listenerCount > 0) + { + for (int i = 0;iGetAt(i, pListener) == E_SUCCESS) + { + pListener->OnAccessibilityFocusOut(*__pTargetContainer, *__pTargetElement); + } + } + } + delete pListenerList; + pListenerList = null; + } + } + if(__pTargetContainer) + { + __pTargetContainer->SetCurrentFocusedElement(null); + } + if (focusManaged) + { + __pTargetElement = pElement; + __pTargetContainer = pContainer; + __targetControlHandle = pContainer->GetOwner().GetHandle(); + EraseFocusUi(); + } + else + { + + __pTargetElement = pElement; + __pTargetContainer = pContainer; + __targetControlHandle = pContainer->GetOwner().GetHandle(); + pListenerList = __pTargetContainer->GetListenerListN(); + if (pListenerList) + { + int listenerCount = pListenerList->GetCount(); + if (listenerCount > 0) + { + for (int i = 0;iGetAt(i, pListener) == E_SUCCESS) + { + pListener->OnAccessibilityFocusIn(*__pTargetContainer, *__pTargetElement); + DrawFocusUi(*__pTargetElement); + if (direction == _ACCESSIBILITY_FOCUS_DIRECTION_PREVIOUS) + { + pListener->OnAccessibilityFocusMovedPrevious(*__pTargetContainer, *__pTargetElement); + } + else if (direction == _ACCESSIBILITY_FOCUS_DIRECTION_NEXT) + { + pListener->OnAccessibilityFocusMovedNext(*__pTargetContainer, *__pTargetElement); + } + } + } + } + } + else + { + DrawFocusUi(*__pTargetElement); + } + delete pListenerList; + pListenerList = null; + ReadElement(*pElement); + } + return true; + } + return false; +} +void +_AccessibilityManager::RequestToDrawFocusUi() +{ + if (__targetControlHandle.IsValid() && __pTargetContainer->IsContains(*__pTargetElement)) + { + //HidePopup(); + DrawFocusUi(*__pTargetElement); + } +} + +void +_AccessibilityManager::RequestAutoReading(_AccessibilityAutoReadingMode mode) +{ + if(__screenReaderIsEnabled) + { + if (mode == _ACCESSIBILITY_AUTO_READING_MODE_RESET) + { + __pTitleElement = null; + return; + } + pAutoReadingTimer->Start(mode); + } +} + +void +_AccessibilityManager::SetTtsMode(_AccessibilityTtsMode mode) +{ + if (__pTtsPlayer) + { + //__pTtsPlayer->SetMode(mode); + } +} + +void +_AccessibilityManager::SetGlobalFocusedElement(_AccessibilityElement& element) +{ + _AccessibilityElement* pElement = &element; + if (!IsContainerValid(pElement->GetParent())) + { + return; + } + __pTargetContainer = pElement->GetParent(); + __pTargetElement = pElement; + RequestAutoReading(_ACCESSIBILITY_AUTO_READING_MODE_CURRENT_FOCUS); +} + +void +_AccessibilityManager::EraseFocusUi(void) +{ + if (__focusedControlHandle.IsValid()) + { + if (__pFocusVe) + { + __pFocusVe->Destroy(); + __pFocusVe = null; + } + } + else + { + __pFocusVe = null; + } +} +void +_AccessibilityManager::DrawFocusUi(const _AccessibilityElement& element) +{ + FloatRectangle rectangle = element.GetBounds(); + Canvas* pCanvas = null; + + _AccessibilityContainer* pContainer = element.GetParent(); + + if (__focusedControlHandle.IsValid()) + { + if (__pFocusVe) + { + __pFocusVe->Destroy(); + __pFocusVe = null; + } + } + else + { + __pFocusVe = null; + } + + result r = E_SUCCESS; + _Control* pControl = &const_cast<_Control&>(pContainer->GetOwner()); + _VisualElement* pControlVe = pControl->GetVisualElement(); + + __pFocusVe = new (std::nothrow) VisualElement(); + SysTryCatch(NID_UI, __pFocusVe != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed"); + r = __pFocusVe->Construct(); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] System error"); + + __pFocusVe->SetName("Accessibility focus ui"); + __pFocusVe->SetImplicitAnimationEnabled(false); + __focusedControlHandle = pControl->GetHandle(); + pControlVe->AttachChild(*__pFocusVe); + + if (__pFocusVe) + { + __pFocusVe->SetBounds(FloatRectangle(rectangle.x, rectangle.y, rectangle.width, rectangle.height)); + pCanvas = __pFocusVe->GetCanvasN(); + SysTryCatch(NID_UI, pCanvas, , E_SYSTEM, "[E_SYSTEM] System error"); + pCanvas->SetBackgroundColor(0x00000000); + pCanvas->Clear(); + Bitmap* pBitmap = null; + result r = GET_BITMAP_CONFIG_N(ACCESSIBILITY::FOCUS, BITMAP_PIXEL_FORMAT_ARGB8888, pBitmap); + if (r == E_SUCCESS) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pBitmap)) + { + r = pCanvas->DrawNinePatchedBitmap(Rectangle(0, 0, rectangle.width, rectangle.height), *pBitmap); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] System error"); + } + else + { + r = pCanvas->DrawBitmap(Rectangle(0, 0, rectangle.width, rectangle.height), *pBitmap); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] System error"); + } + } + + __pFocusVe->SetShowState(true); + delete pCanvas; + } + pContainer ->SetCurrentFocusedElement(const_cast<_AccessibilityElement*>(&element)); + return; +CATCH: + delete pCanvas; + if (__focusedControlHandle.IsValid()) + { + if (__pFocusVe) + { + __pFocusVe->Destroy(); + __pFocusVe = null; + } + } + else + { + __pFocusVe = null; + } + return; +} +bool +_AccessibilityManager::ProcessGesture(_AccessibilityGestureType type, const FloatPoint& point) +{ + 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)) + { + 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)) + { + SetGestureMode(MODE_FOCUS_MOVE); + } + break; + case _ACCESSIBILITY_GESTURE_TYPE_ONE_FINGER_ONE_TAP: + { + if (GetGestureMode() == MODE_FOCUS_MOVE) + { + SetGestureMode(MODE_TAP); + __candidateList.RemoveAll(); + } + _Control* pControl = null; + Point pt((int)point.x, (int)point.y); + _Window* pWindow = _ControlManager::GetInstance()->GetTopVisibleWindow(); + if (!(pWindow->IsLayoutChangable())) + { + Rectangle topWindowAbsBounds = pWindow->GetAbsoluteBounds(true); + pt.x = pt.x + topWindowAbsBounds.x; + pt.y = pt.y + topWindowAbsBounds.y; + } + pControl = _ControlManager::GetInstance()->GetTopmostTouchedControl(pt); + if (pControl == null || !(pControl->GetAbsoluteBounds(true).Contains(pt))) + { + return false; + } + _AccessibilityContainer* pAccContainer = pControl->GetAccessibilityContainer(); + _AccessibilityElement* pElement = null; + while(pElement == null) + { + pElement = pAccContainer->Hit(pt); + if(pElement) + { + break; + } + _Control* _pControl = pAccContainer->GetOwner().GetParent(); + if (_pControl == null) + { + return false; + } + pAccContainer = _pControl->GetAccessibilityContainer(); + if(pAccContainer == null) + { + return false; + } + } + + if (__pTargetElement == pElement) + { + if (__pTtsPlayer) + { + AccessibilityScreenReaderStatus status = __pTtsPlayer->GetStatus(); + if (status == ACCESSIBILITY_SCREEN_READER_STATUS_PLAYING) + { + return true; + } + } + } + + if (!(pAccContainer->MoveFocus(pt))) + { + return false; + } + LinkedListT<_IAccessibilityListener*>* pList = null; + if (IsContainerValid(__pTargetContainer)) + { + __pTargetContainer->ResetFocus(); + __pTargetContainer->GetOwner().Invalidate(); + pList = static_cast*>(__pTargetContainer->GetListenerListN()); + if (pList != null) + { + int count = pList->GetCount(); + for (int i = 0;iGetAt(i, pListener) == E_SUCCESS) + { + pListener->OnAccessibilityFocusOut(*__pTargetContainer, *__pTargetElement); + } + } + delete pList; + } + } + if(__pTargetContainer) + { + __pTargetContainer->SetCurrentFocusedElement(null); + } + if (pAccContainer->IsFocusManaged()) + { + __pTargetContainer = pAccContainer; + __targetControlHandle = pAccContainer->GetOwner().GetHandle(); + __pTargetElement = pElement; + EraseFocusUi(); + } + else + { + __pTargetContainer = pAccContainer; + __targetControlHandle = pAccContainer->GetOwner().GetHandle(); + __pTargetElement = pElement; + pList = static_cast*>(__pTargetContainer->GetListenerListN()); + if (pList != null) + { + int count = pList->GetCount(); + for (int i = 0;iGetAt(i, pListener) == E_SUCCESS) + { + pListener->OnAccessibilityFocusIn(*__pTargetContainer, *__pTargetElement); + } + } + delete pList; + } + DrawFocusUi(*pElement); + ReadElement(*pElement); + } + } + break; + case _ACCESSIBILITY_GESTURE_TYPE_ONE_FINGER_DOUBLE_TAP: + { + if (GetGestureMode() == MODE_FOCUS_MOVE) + { + SetGestureMode(MODE_TAP); + __candidateList.RemoveAll(); + } + if (__pTargetElement == null) + { + return true; + } + _TouchManager* pTouchMgr = _TouchManager::GetInstance(); + _Control* _pControl = null; + if (pTouchMgr == null) + { + return false; + } + if (IsContainerValid(__pTargetContainer)) + { + _pControl = &(__pTargetContainer->GetOwner()); + } + else + { + return false; + } + if (__pTargetContainer->IsContains(*__pTargetElement) == false) + { + return false; + } + if (_pControl == null) + { + return false; + } + if (_pControl->GetEnableState() == false) + { + ReadContent(L"Unavailable"); + return true; + } + if (__pTargetElement->GetSupportOperatingGesture()) + { + long long tick = 0; + if (_SystemTimeImpl::GetTicks(tick) != E_SUCCESS) + { + tick = 0; + } + FloatRectangle rect = __pTargetElement->GetAbsoluteBounds(); + Point _point((int)(rect.x + rect.width/2), (int)(rect.y + rect.height/2)); + _UiTouchEvent pressedEvent(_pControl->GetHandle(), _TouchInfo(0, _TOUCH_PRESSED, _point, false, tick)); + _UiTouchEvent releasedEvent(_pControl->GetHandle(), _TouchInfo(0, _TOUCH_RELEASED, _point, false, tick+1)); + pressedEvent.SetAccessibilityEvent(true); + releasedEvent.SetAccessibilityEvent(true); + + unsigned int pointId = 0; + pointId = pTouchMgr->GeneratePointId(0); + SysLog(NID_UI, "Accessibility manager generated touch pressed event. id: %d", pointId); + _UiEventManager::GetInstance()->SendEvent(pressedEvent); + pointId = pTouchMgr->GetPointId(0); + SysLog(NID_UI, "Accessibility manager generated touch released event. id: %d", pointId); + _UiEventManager::GetInstance()->SendEvent(releasedEvent); + if (!IsContainerValid(__pTargetContainer)) + { + return false; + } + } + LinkedListT<_IAccessibilityListener*>* pList = static_cast*>(__pTargetContainer->GetListenerListN()); + if (pList != null) + { + int count = pList->GetCount(); + SysLog(NID_UI, "Accessibility manager called listeners. count : %d", count); + for (int i = 0;iGetAt(i, pListener) == E_SUCCESS) + { + pListener->OnAccessibilityActionPerformed(*__pTargetContainer, *__pTargetElement); + } + } + delete pList; + } + } + break; + case _ACCESSIBILITY_GESTURE_TYPE_UNHIGHLIGHT: + ResetFocusInformation(); + break; + case _ACCESSIBILITY_GESTURE_TYPE_ONE_FINGER_PANNING_STARTED: + case _ACCESSIBILITY_GESTURE_TYPE_ONE_FINGER_PANNING_CHANGED: + case _ACCESSIBILITY_GESTURE_TYPE_ONE_FINGER_PANNING_FINISHED: + break; + case _ACCESSIBILITY_GESTURE_TYPE_VALUE_INCREASED: + { + if (!IsContainerValid(__pTargetContainer)) + { + if (MoveFocus(_ACCESSIBILITY_FOCUS_DIRECTION_PREVIOUS)) + { + SetGestureMode(MODE_FOCUS_MOVE); + } + break; + } + + bool returnValue = false; + LinkedListT<_IAccessibilityListener*>* pList = static_cast*>(__pTargetContainer->GetListenerListN()); + if (pList != null) + { + int count = pList->GetCount(); + for (int i = 0;iGetAt(i, pListener) == E_SUCCESS) + { + if(pListener->OnAccessibilityValueIncreased(*__pTargetContainer, *__pTargetElement) && returnValue == false) + { + returnValue = true; + } + } + } + delete pList; + } + + if (returnValue) + { + _Control* pControl = &(__pTargetContainer->GetOwner()); + if (pControl->GetEnableState() == false) + { + ReadContent(L"Unavailable"); + return true; + } + } + else + { + if (MoveFocus(_ACCESSIBILITY_FOCUS_DIRECTION_PREVIOUS)) + { + SetGestureMode(MODE_FOCUS_MOVE); + } + } + } + break; + case _ACCESSIBILITY_GESTURE_TYPE_VALUE_DECREASED: + { + if (!IsContainerValid(__pTargetContainer)) + { + if (MoveFocus(_ACCESSIBILITY_FOCUS_DIRECTION_NEXT)) + { + SetGestureMode(MODE_FOCUS_MOVE); + } + break; + } + bool returnValue = false; + LinkedListT<_IAccessibilityListener*>* pList = static_cast*>(__pTargetContainer->GetListenerListN()); + if (pList != null) + { + int count = pList->GetCount(); + for (int i = 0;iGetAt(i, pListener) == E_SUCCESS) + { + if(pListener->OnAccessibilityValueDecreased(*__pTargetContainer, *__pTargetElement) && returnValue == false) + { + returnValue = true; + } + } + } + delete pList; + } + if (returnValue) + { + _Control* pControl = &(__pTargetContainer->GetOwner()); + if (pControl->GetEnableState() == false) + { + ReadContent(L"Unavailable"); + return true; + } + } + else + { + if (MoveFocus(_ACCESSIBILITY_FOCUS_DIRECTION_NEXT)) + { + SetGestureMode(MODE_FOCUS_MOVE); + } + } + } + break; + case _ACCESSIBILITY_GESTURE_TYPE_TWO_FINGER_PANNING_STARTED: + { + Point pt((int)point.x, (int)point.y); + _Control* pControl = _ControlManager::GetInstance()->GetTopmostTouchedControl(pt); + if (pControl == null) + { + SysLog(NID_UI, "Two finger panning is started. but control is null"); + return false; + } + long long tick = 0; + if (_SystemTimeImpl::GetTicks(tick) != E_SUCCESS) + { + tick = 0; + } + _UiTouchEvent pressedEvent(pControl->GetHandle(), _TouchInfo(0, _TOUCH_PRESSED, pt, false, tick)); + unsigned int pointId = 0; + pointId = _TouchManager::GetInstance()->GeneratePointId(0); + _UiEventManager::GetInstance()->SendEvent(pressedEvent); + __pPanningControl = pControl; + SetGestureMode(MODE_PANNING); + SysLog(NID_UI, "Two finger panning is started. x:%d, y:%d", pt.x, pt.y); + } + break; + case _ACCESSIBILITY_GESTURE_TYPE_TWO_FINGER_PANNING_CHANGED: + { + if (__pPanningControl == null || GetGestureMode() != MODE_PANNING) + { + SetGestureMode(MODE_TAP); + SysLog(NID_UI, "Two finger panning is started. but control is null"); + return false; + } + long long tick = 0; + if (_SystemTimeImpl::GetTicks(tick) != E_SUCCESS) + { + tick = 0; + } + Point pt((int)point.x, (int)point.y); + _UiTouchEvent movedEvent(__pPanningControl->GetHandle(), _TouchInfo(0, _TOUCH_MOVED, pt, false, tick)); + unsigned int pointId = 0; + pointId = _TouchManager::GetInstance()->GetPointId(0); + _UiEventManager::GetInstance()->SendEvent(movedEvent); + SysLog(NID_UI, "Two finger panning is moved. x:%d, y:%d", pt.x, pt.y); + } + break; + case _ACCESSIBILITY_GESTURE_TYPE_TWO_FINGER_PANNING_FINISHED: + { + if (__pPanningControl == null || GetGestureMode() != MODE_PANNING) + { + SetGestureMode(MODE_TAP); + SysLog(NID_UI, "Two finger panning is started. but control is null"); + return false; + } + long long tick = 0; + if (_SystemTimeImpl::GetTicks(tick) != E_SUCCESS) + { + tick = 0; + } + Point pt((int)point.x, (int)point.y); + _UiTouchEvent releasedEvent(__pPanningControl->GetHandle(), _TouchInfo(0, _TOUCH_RELEASED, pt, false, tick)); + unsigned int pointId = 0; + pointId = _TouchManager::GetInstance()->GetPointId(0); + _UiEventManager::GetInstance()->SendEvent(releasedEvent); + __pPanningControl = null; + SetGestureMode(MODE_TAP); + SysLog(NID_UI, "Two finger panning is finished. x:%d, y:%d", pt.x, pt.y); + } + break; + default: + break; + } + return true; +} + +Tizen::Base::_HandleT<_AccessibilityContainer> +_AccessibilityManager::Register(_AccessibilityContainer* pObject) +{ + if (pObject == null) + { + return Tizen::Base::_HandleT<_AccessibilityContainer>(); + } + + return __objectManager.Register(*pObject); +} +void +_AccessibilityManager::Unregister(Tizen::Base::_HandleT <_AccessibilityContainer> handle) +{ + __objectManager.Unregister(handle); + return; +} + +void +_AccessibilityManager::OnChangedLocale(void) +{ +} + +void +_AccessibilityManager::OnAccessibilityScreenReaderIsActivated(bool set) +{ + SysLog(NID_UI, "Screen reader status is changed. %d", set); + if (__screenReaderIsEnabled == set) + { + return; + } + else + { + __screenReaderIsEnabled = set; + if (__screenReaderIsEnabled) + { + if (__pTtsPlayer) + { + __pTtsPlayer->Activate(); + RequestAutoReading(_ACCESSIBILITY_AUTO_READING_MODE_FIRST_ITEM); + } + } + else + { + __pTtsPlayer->Deactivate(); + EraseFocusUi(); + if(__pTargetContainer) + { + __pTargetContainer->SetCurrentFocusedElement(null); + } + __pTargetContainer = null; + __pTargetElement = null; + __pTitleElement = null; + __candidateList.RemoveAll(); + __mode = MODE_NONE; + __targetControlHandle = _ControlHandle(); + __focusedControlHandle = _ControlHandle(); + __readingPopupParentHandle = _ControlHandle(); + } + } +} +bool +_AccessibilityManager::IsScreenReaderActivated(void) +{ + __screenReaderIsEnabled = __pSettingLoader->IsScreenReaderActivated(); + return __screenReaderIsEnabled; +} +float +_AccessibilityManager::GetLargeFontSize(void) +{ + return __pSettingLoader->GetLargeFontSize(); +} + +bool +_AccessibilityManager::IsActivated() +{ + return __screenReaderIsEnabled; +} + +bool +_AccessibilityManager::IsContainerValid(_AccessibilityContainer* pContainer) +{ + if (pContainer == null) + { + return false; + } + if (!(pContainer->IsActivated())) + { + return false; + } + if (!(pContainer->GetHandle().IsValid())) + { + return false; + } + if (!(pContainer->GetOwner().GetHandle().IsValid())) + { + return false; + } + if (!(pContainer->GetOwner().IsVisible())) + { + return false; + } + if (!IsVisible(pContainer)) + { + return false; + } + return true; +} +bool +_AccessibilityManager::IsTargetContainerValid(void) +{ + + if (__pTargetContainer && __targetControlHandle.IsValid() && __pTargetContainer->GetOwner().IsVisible() && __pTargetContainer->GetOwner().GetRootWindow() && IsVisible(__pTargetContainer)) + { + return true; + } + return false; +} +bool +_AccessibilityManager::IsFirstElementGainedFocus(void) +{ + int count = __candidateList.GetCount(); + if(count == 0) + { + return false; + } + if(__pTargetElement == null) + { + return false; + } + _AccessibilityElement* pElement = null; + if(__candidateList.GetAt(0, pElement) == E_SUCCESS) + { + if(pElement == __pTargetElement) + { + return true; + } + } + return false; +} +bool +_AccessibilityManager::IsLastElementGainedFocus(void) +{ + int count = __candidateList.GetCount(); + if(count == 0) + { + return false; + } + if(__pTargetElement == null) + { + return false; + } + _AccessibilityElement* pElement = null; + if(__candidateList.GetAt(count-1, pElement) == E_SUCCESS) + { + if(pElement == __pTargetElement) + { + return true; + } + } + return false; +} +void +_AccessibilityManager::ResetFocusInformation(void) +{ + EraseFocusUi(); + if(__pTargetContainer) + { + __pTargetContainer->SetCurrentFocusedElement(null); + } + __pTargetContainer = null; + __pTargetElement = null; + __pTitleElement = null; + __mode = MODE_TAP; + __targetControlHandle = _ControlHandle(); + __focusedControlHandle = _ControlHandle(); + __readingPopupParentHandle = _ControlHandle(); +} +bool +_AccessibilityManager::IsVisible(_AccessibilityElement* pElement) +{ + return IsVisible(pElement->GetParent()); +} +bool +_AccessibilityManager::IsVisible(_AccessibilityContainer* pContainer) +{ + _ControlManager* pControlManager = _ControlManager::GetInstance(); + int count = pControlManager->GetWindowCount(); + if (count < 1) + { + return false; + } + _Window* pTopWindow = pControlManager->GetWindow(count - 1); + if (pTopWindow != pContainer->GetOwner().GetRootWindow()) + { + return false; + } + return true; +} +void +_AccessibilityManager::SetGestureMode(GestureMode mode) +{ + __mode = mode; +} +_AccessibilityManager::GestureMode +_AccessibilityManager::GetGestureMode(void) +{ + return __mode; +} + +void +_AccessibilityManager::NeedRefreshItem(void) +{ + __needRefreshItem = true; +} + +}} //Tizen::Ui + diff --git a/src/ui/FUi_AccessibilitySystemSettingLoader.cpp b/src/ui/FUi_AccessibilitySystemSettingLoader.cpp new file mode 100644 index 0000000..5a3a2f9 --- /dev/null +++ b/src/ui/FUi_AccessibilitySystemSettingLoader.cpp @@ -0,0 +1,105 @@ +// +// 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. +// + +#include +#include +#include +#include +#include +#include "FUi_AccessibilitySystemSettingLoader.h" +#include "FUi_AccessibilityManager.h" +#include "FUi_EcoreEvasMgr.h" +#include "FUi_EcoreEvas.h" + +using namespace Tizen::Base; +using namespace Tizen::Locales; +using namespace Tizen::System; + +namespace Tizen { namespace Ui { + +bool _screenReaderActivated = false; +const char* VCONF_KEY_ACCESSIBILITY_SCREEN_READER = "db/setting/accessibility/tts"; + +_AccessibilitySystemSettingLoader::_AccessibilitySystemSettingLoader(_AccessibilityManager& manager) + : __pManager(&manager) +{ + _screenReaderActivated = IsScreenReaderActivated(); + 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) +{ + _SettingInfoImpl::RemoveSettingEventListenerForInternal(*this); + vconf_ignore_key_changed(VCONF_KEY_ACCESSIBILITY_SCREEN_READER, _AccessibilitySystemSettingLoader::SetSystemSetting); +} +void +_AccessibilitySystemSettingLoader::OnSettingChanged(String& key) +{ + if (key == L"http://tizen.org/setting/locale.country" || key == L"http://tizen.org/setting/locale.language") + { + __pManager->OnChangedLocale(); + } +} + +bool +_AccessibilitySystemSettingLoader::IsScreenReaderActivated(void) +{ +//#if defined(_OSP_EMUL_) +// bool enable = false; +// _SettingInfoImpl::GetValue(L"http://tizen.org/setting/speech.tts.screen", enable); +// return enable; +//#else +// return GetEcoreEvasMgr()->GetEcoreEvas()->IsAccessibilityScreenReaderActivated(); +//#endif + int error = 0; + int value = 0; + error = vconf_get_bool(VCONF_KEY_ACCESSIBILITY_SCREEN_READER, &value); + SysTryReturnResult(NID_UI, error == 0, E_SYSTEM, "It is failed to get screen reader activation key."); + return (value ? true : false); +} + +float +_AccessibilitySystemSettingLoader::GetLargeFontSize(void) +{ + return -1; +} + +Locale +_AccessibilitySystemSettingLoader::GetLocale(void) +{ + Locale locale(LANGUAGE_INVALID, COUNTRY_INVALID); + LocaleManager localeMgr; + localeMgr.Construct(); + locale = localeMgr.GetSystemLocale(); + return locale; +} + +void +_AccessibilitySystemSettingLoader::SetSystemSetting(keynode_t* node, void* userData) +{ + if (strcmp(VCONF_KEY_ACCESSIBILITY_SCREEN_READER, vconf_keynode_get_name(node)) == 0) + { + int value = 0; + vconf_get_bool(VCONF_KEY_ACCESSIBILITY_SCREEN_READER, &value); + _screenReaderActivated = (value == 1); + _AccessibilityManager::GetInstance()->OnAccessibilityScreenReaderIsActivated(_screenReaderActivated); + } +} + +}} + diff --git a/src/ui/FUi_AccessibilityTtsPlayer.cpp b/src/ui/FUi_AccessibilityTtsPlayer.cpp new file mode 100644 index 0000000..f22b9e4 --- /dev/null +++ b/src/ui/FUi_AccessibilityTtsPlayer.cpp @@ -0,0 +1,613 @@ +// +// 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. +// + +#include +#include +#include +#include +#include +#include +#include "FUi_AccessibilityTtsPlayer.h" +#include "FUi_AccessibilityManager.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +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) +{ +} + +_AccessibilityTtsPlayer::~_AccessibilityTtsPlayer(void) +{ + Deactivate(); + delete __pCurrentLocale; + + if (__pSupportedLocaleList != null) + { + __pSupportedLocaleList->RemoveAll(true); + delete __pSupportedLocaleList; + } +} + +result +_AccessibilityTtsPlayer::Construct(void) +{ + Locale *pLocale = new (std::nothrow) Locale(LANGUAGE_INVALID, COUNTRY_INVALID); + 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, "Memory allocation failed."); + + result r = pLocaleList->Construct(); + SysTryReturnResult(NID_UI, r == E_SUCCESS, E_OUT_OF_MEMORY, "Memory allocation failed."); + + __pCurrentLocale = pLocale; + __pSupportedLocaleList = pLocaleList; + + return r; +} + +result +_AccessibilityTtsPlayer::Activate(void) +{ + if (__activated) + { + SysLog(NID_UI, "TTS player was already activated."); + return E_SUCCESS; + } + + int ttsError = tts_create(&__ttsHandle); + 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] 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] 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] 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] 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] Memory allocation failed."); + + __activated = true; + return E_SUCCESS; +} + +const char* +_AccessibilityTtsPlayer::GetEngineStateMessage(const tts_state_e state) +{ + switch (state) + { + case TTS_STATE_CREATED: + return "CREATED"; + + case TTS_STATE_READY: + return "READY"; + + case TTS_STATE_PLAYING: + return "PLAYING"; + + case TTS_STATE_PAUSED: + return "PAUSED"; + + default: + return "UNKNOWN"; + } +} + +const char* +_AccessibilityTtsPlayer::GetEngineErrorMessage(const int errorType) +{ + switch (errorType) + { + case TTS_ERROR_NONE: + return "TTS_ERROR_NONE"; + + case TTS_ERROR_OUT_OF_MEMORY: + return "TTS_ERROR_OUT_OF_MEMORY"; + + case TTS_ERROR_IO_ERROR: + return "TTS_ERROR_IO_ERROR"; + + case TTS_ERROR_INVALID_PARAMETER: + return "TTS_ERROR_INVALID_PARAMETER"; + + case TTS_ERROR_INVALID_STATE: + return "TTS_ERROR_INVALID_STATE"; + + case TTS_ERROR_INVALID_VOICE: + return "TTS_ERROR_INVALID_VOICE"; + + case TTS_ERROR_ENGINE_NOT_FOUND: + return "TTS_ERROR_ENGINE_NOT_FOUND"; + + case TTS_ERROR_TIMED_OUT: + return "TTS_ERROR_TIMED_OUT"; + + case TTS_ERROR_OPERATION_FAILED: + return "TTS_ERROR_OPERATION_FAILED"; + + default: + return "TTS_ERROR_UNKNOWN_ERROR"; + } +} + +void +_AccessibilityTtsPlayer::TtsStateChangedReceiver(tts_h ttsHandle, tts_state_e previousState, tts_state_e currentState, void* pTtsInstance) +{ + SysLog(NID_UI, "[Accessibility TTS] [%s] ---> [%s]", GetEngineStateMessage(previousState), GetEngineStateMessage(currentState)); + + if ((previousState == TTS_STATE_CREATED) && (currentState == TTS_STATE_READY)) + { + char *pDefaultLang = null; + tts_voice_type_e defaultVoiceType; + + int ttsError = tts_get_default_voice(ttsHandle, &pDefaultLang, &defaultVoiceType); + if (ttsError == TTS_ERROR_NONE) + { + SysLog(NID_UI, "Default language[%s] and voice[%d]", pDefaultLang, defaultVoiceType); + const Locale* pDefaultLocale = ConvertEngineLocaleToNativeN(pDefaultLang); + if(pDefaultLocale) + { + delete static_cast<_AccessibilityTtsPlayer*>(pTtsInstance)->__pCurrentLocale; + static_cast<_AccessibilityTtsPlayer*>(pTtsInstance)->__pCurrentLocale = const_cast(pDefaultLocale); + } + free(pDefaultLang); + } + + 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)->OnStatusChanged(ACCESSIBILITY_SCREEN_READER_STATUS_READY); + } + else if ((previousState == TTS_STATE_READY || previousState == TTS_STATE_PAUSED) && (currentState == TTS_STATE_PLAYING)) + { + static_cast<_AccessibilityTtsPlayer*>(pTtsInstance)->OnStatusChanged(ACCESSIBILITY_SCREEN_READER_STATUS_PLAYING); + } + else if ((previousState == TTS_STATE_PLAYING) && (currentState == TTS_STATE_PAUSED)) + { + static_cast<_AccessibilityTtsPlayer*>(pTtsInstance)->OnStatusChanged(ACCESSIBILITY_SCREEN_READER_STATUS_PAUSE); + } + else if ((previousState == TTS_STATE_PLAYING || previousState == TTS_STATE_PAUSED) && (currentState == TTS_STATE_READY)) + { + static_cast<_AccessibilityTtsPlayer*>(pTtsInstance)->OnStatusChanged(ACCESSIBILITY_SCREEN_READER_STATUS_READY); + } + else + { + SysLog(NID_UI, "[CB] Unknown state. / [%s] ---> [%s]", + GetEngineStateMessage(previousState), GetEngineStateMessage(currentState)); + } +} +void +_AccessibilityTtsPlayer::TtsStartedReceiver(tts_h ttsHandle, int utteranceId, void* pListener) +{ + SysLog(NID_UI, "Accessibility TTS reader is started", utteranceId); +} +void +_AccessibilityTtsPlayer::TtsCompletedReceiver(tts_h ttsHandle, int utteranceId, void* pTtsInstance) +{ + _AccessibilityTtsPlayer* pPlayer = static_cast<_AccessibilityTtsPlayer*>(pTtsInstance); + 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) +{ + Tizen::Base::String errorMessage =L""; + switch (error) + { + case TTS_ERROR_OUT_OF_MEMORY: + errorMessage = L"TEXT_TO_SPEECH_ERROR_OUT_OF_MEMORY"; + break; + case TTS_ERROR_IO_ERROR: + errorMessage = L"TEXT_TO_SPEECH_ERROR_IO_ERROR"; + break; + case TTS_ERROR_OUT_OF_NETWORK: + errorMessage = L"TEXT_TO_SPEECH_ERROR_NETWORK_ERROR"; + break; + case TTS_ERROR_ENGINE_NOT_FOUND: + errorMessage = L"TEXT_TO_SPEECH_ERROR_UNSUPPORTED_SERVICE"; + break; + case TTS_ERROR_TIMED_OUT: + errorMessage = L"TEXT_TO_SPEECH_ERROR_TIME_OUT"; + break; + default: + errorMessage = L"TEXT_TO_SPEECH_ERROR_SYSTEM_ERROR"; + break; + } + static_cast<_AccessibilityTtsPlayer*>(pTtsInstance)->OnErrorOccurred(errorMessage); +} +bool +_AccessibilityTtsPlayer::TtsSupportedLocaleListGetter(tts_h ttsHandle, const char* pLanguage, tts_voice_type_e voiceType, void* pLocaleList) +{ + const Locale* pLocale = ConvertEngineLocaleToNativeN(String(pLanguage)); + if (pLocale == null) + { + static_cast (pLocaleList)->RemoveAll(true); + return false; + } + + if (pLocale->GetLanguageCode() == LANGUAGE_INVALID) + { + SysLog(NID_UI, "[CB] Not support language[%s]", pLanguage); + delete pLocale; + } + else + { + result r = static_cast(pLocaleList)->Add(*pLocale); + if (IsFailed(r)) + { + static_cast(pLocaleList)->RemoveAll(true); + return false; + } + } + return true; +} +const char* +_AccessibilityTtsPlayer::ConvertTizenLocaleToEngineN(const Tizen::Locales::Locale& locale) +{ + String strLanguageCode = Locale::LanguageCodeToTwoLetterLanguageCodeString(locale.GetLanguageCode()); + String strCountryCode = Locale::CountryCodeToString(locale.GetCountryCode()); + String strLanguage = strLanguageCode + L"_" + strCountryCode; + + return _StringConverter::CopyToCharArrayN(strLanguage); +} +const Tizen::Locales::Locale* +_AccessibilityTtsPlayer::ConvertEngineLocaleToNativeN(const Tizen::Base::String& strSource) +{ + String strDelim(L"_"); + String strLanguageCode; + String strCountryCode; + + LanguageCode languageCode = LANGUAGE_INVALID; + CountryCode countryCode = COUNTRY_INVALID; + + Utility::StringTokenizer toknizer(strSource, strDelim); + if (toknizer.GetTokenCount() == 2) + { + toknizer.GetNextToken(strLanguageCode); + toknizer.GetNextToken(strCountryCode); + + languageCode = Locale::TwoLetterLanguageCodeStringToLanguageCode(strLanguageCode); + countryCode = Locale::StringToCountryCode(strCountryCode); + } + + return new (std::nothrow) Locale(languageCode, countryCode); +} + +result +_AccessibilityTtsPlayer::Speak(const String& text) +{ + SysTryReturnResult(NID_UI, __initialized , E_INVALID_STATE, + "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(); + 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); + SysTryCatch(NID_UI, ttsError == TTS_ERROR_NONE, r = E_OUT_OF_MEMORY, E_SYSTEM, "[E_SYSTEM] Failed to add a text."); + ttsError = tts_play(__ttsHandle); + SysTryCatch(NID_UI, ttsError == TTS_ERROR_NONE, r = E_SYSTEM, E_SYSTEM, "[%s] Failed to play.", GetEngineErrorMessage(ttsError)); + + OnStatusChanged(ACCESSIBILITY_SCREEN_READER_STATUS_PLAYING); + + CATCH: + delete[] pTextN; + + return r; +} + +result +_AccessibilityTtsPlayer::Stop(void) +{ + SysTryReturnResult(NID_UI, __initialized , E_INVALID_STATE, + "Not yet initialized! This method should be called after initialized."); + + 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."); + ttsError = tts_stop(__ttsHandle); + SysTryReturnResult(NID_UI, ttsError == TTS_ERROR_NONE, E_SYSTEM, "Failed to stop."); + + return E_SUCCESS; +} + +result +_AccessibilityTtsPlayer::Pause(void) +{ + SysTryReturnResult(NID_UI, __initialized , E_INVALID_STATE, + "Not yet initialized! This method should be called after initialized."); + + 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."); + SysTryReturnResult(NID_UI, ttsState == TTS_STATE_PLAYING, E_INVALID_OPERATION, "The TTS state should be TTS_STATUS_PLAYING."); + + ttsError = tts_pause(__ttsHandle); + SysTryReturnResult(NID_UI, ttsError == TTS_ERROR_NONE, E_SYSTEM, "Failed to pause."); + + return E_SUCCESS; +} + +result +_AccessibilityTtsPlayer::Resume(void) +{ + SysTryReturnResult(NID_UI, __initialized , E_INVALID_STATE, + "Not yet initialized! This method should be called after initialized."); + + 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."); + SysTryReturnResult(NID_UI, ttsState == TTS_STATE_PAUSED, E_INVALID_OPERATION, "The TTS state should be TTS_STATUS_PAUSED."); + + ttsError = tts_play(__ttsHandle); + SysTryReturnResult(NID_UI, ttsError == TTS_ERROR_NONE, E_SYSTEM, "Failed to resume."); + + return E_SUCCESS; +} + +result +_AccessibilityTtsPlayer::SetLocale(const Locale& locale) +{ + SysTryReturnResult(NID_UI, __initialized , E_INVALID_STATE, + "Not yet initialized! This method should be called after initialized."); + SysTryReturnResult(NID_UI, __pSupportedLocaleList->Contains(locale), E_UNSUPPORTED_LOCALE, "This locale is not supported."); + + *__pCurrentLocale = locale; + return E_SUCCESS; +} + +Tizen::Locales::Locale +_AccessibilityTtsPlayer::GetLocale(void) const +{ + SysTryReturn(NID_UI, __initialized, Locale(LANGUAGE_INVALID, COUNTRY_INVALID), E_INVALID_STATE, + "[E_INVALID_STATE] Not yet initialized! This method should be called after initialized."); + + SetLastResult(E_SUCCESS); + return *__pCurrentLocale; +} + +const Tizen::Base::Collection::IList* +_AccessibilityTtsPlayer::GetSupportedLocales(void) const +{ + SysTryReturnResult(NID_UI, __initialized , null, + "Not yet initialized! This method should be called after initialized."); + + SetLastResult(E_SUCCESS); + return __pSupportedLocaleList->GetCount() > 0 ? __pSupportedLocaleList : null; +} + +bool +_AccessibilityTtsPlayer::IsLocaleSupported(const Tizen::Locales::Locale& locale) const +{ + SysTryReturnResult(NID_UI, __initialized , E_INVALID_STATE, + "Not yet initialized! This method should be called after initialized."); + + SetLastResult(E_SUCCESS); + return __pSupportedLocaleList->Contains(locale); +} + +result +_AccessibilityTtsPlayer::SetSpeechRate(tts_speed_e speechRate) +{ + SysTryReturnResult(NID_UI, __initialized , E_INVALID_STATE, + "Not yet initialized! This method should be called after initialized."); + + __speed = speechRate; + + return E_SUCCESS; +} + +result +_AccessibilityTtsPlayer::ReadGrammar(const Tizen::Base::String& grammar, bool init) +{ + if(grammar.GetLength() == 0) + { + return E_SUCCESS; + } + if(init && GetStatus() == ACCESSIBILITY_SCREEN_READER_STATUS_PLAYING) + { + StopReading(); + } + SetStatus(ACCESSIBILITY_SCREEN_READER_STATUS_PLAYING); + Speak(grammar); + __grammar = grammar; + return E_SUCCESS; +} +result +_AccessibilityTtsPlayer::StopReading(void) +{ + Stop(); + return E_SUCCESS; +} +AccessibilityScreenReaderStatus +_AccessibilityTtsPlayer::GetStatus(void) +{ + return __status; +} +Tizen::Base::String +_AccessibilityTtsPlayer::GetCurrentGrammar(void) +{ + return __grammar; +} + +result +_AccessibilityTtsPlayer::Deactivate(void) +{ + __initialized = false; + + if (__activated) + { + int ttsError = TTS_ERROR_NONE; + ttsError = tts_destroy(__ttsHandle); + SysTryLog(NID_UI, ttsError == TTS_ERROR_NONE, "[%s] Failed to destroy.", GetEngineErrorMessage(ttsError)); + + __ttsHandle = 0; + } + __activated = false; + return E_SUCCESS; +} +void +_AccessibilityTtsPlayer::OnErrorOccurred(Tizen::Base::String& errorString) +{ +} +void +_AccessibilityTtsPlayer::OnStatusChanged(AccessibilityScreenReaderStatus status) +{ + if(__extra) + { + return; + } + switch(status) + { + case ACCESSIBILITY_SCREEN_READER_STATUS_PLAYING: + __pManager->OnStartReading(__grammar); + break; + default: + break; + } + SetStatus(status); +} + +void +_AccessibilityTtsPlayer::SetStatus(AccessibilityScreenReaderStatus status) +{ + __status = status; +} +}} + diff --git a/src/ui/FUi_BidiUtils.cpp b/src/ui/FUi_BidiUtils.cpp new file mode 100644 index 0000000..a97940c --- /dev/null +++ b/src/ui/FUi_BidiUtils.cpp @@ -0,0 +1,708 @@ +// +// 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_BidiUtils.cpp + * @brief This is the implementation file for the _BidiUtils class. + */ + +#include +#include +#include +#include +#include +#include "FUi_BidiUtils.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Utility; +using namespace Tizen::Locales; + +namespace Tizen { namespace Ui +{ + +_BidiUtils::_BidiUtils(void) +{ +} + +_BidiUtils::~_BidiUtils(void) +{ +} + +bool +_BidiUtils::IsRTL(const Tizen::Base::String& text) +{ + int length = text.GetLength(); + wchar_t* pString = const_cast(text.GetPointer()); + + if (pString != null && length > 0) + { + for (int i = 0 ; i< length ; i++) + { + if(*pString == null) + { + break; + } + FriBidiChar bidiText[1] = { *pString }; + FriBidiCharType type[1] = { 0 }; + fribidi_get_bidi_types(bidiText, 1, type); + + if ((type[0] & FRIBIDI_MASK_RTL) != 0) + { + return true; + } + else if (((type[0] & FRIBIDI_MASK_STRONG) != 0) && ((type[0] & FRIBIDI_MASK_LETTER) != 0)) + { + return false; + } + + pString++; + } + } + + if (IsBidiLanguage(GetDisplayLanguage())) + { + return true; + } + return false; +} + +bool +_BidiUtils::IsBidiLanguage(LanguageCode languageCode) +{ + switch (languageCode) + { + case LANGUAGE_ARA: // arabic + case LANGUAGE_FAS: // farsi (iran) + case LANGUAGE_HEB: // hebrew (israel) + case LANGUAGE_URD: // urdu (parkistan) + return true; + default: + break; + } + + return false; +} + +LanguageCode +_BidiUtils::GetDisplayLanguage(void) +{ + result r = E_SUCCESS; + LanguageCode languageCode = LANGUAGE_INVALID; + String displayLanguage; + String threeLetterLanguageCode; + String key(L"http://tizen.org/setting/locale.language"); + + r = Tizen::System::SettingInfo::GetValue(key, displayLanguage); + + if (r == E_SUCCESS) + { + displayLanguage.SubString(0, 3, threeLetterLanguageCode); + languageCode = Locale::StringToLanguageCode(threeLetterLanguageCode); + } + + return languageCode; +} + +Locale* +_BidiUtils::GetLocaleLanguageN(void) +{ + result r = E_SUCCESS; + String localeLanguage; + String key(L"http://tizen.org/setting/locale.language"); + + r = Tizen::System::SettingInfo::GetValue(key, localeLanguage); + SysTryReturn(NID_UI, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + String delim(L"_"); + StringTokenizer strTok(localeLanguage, delim); + int count = strTok.GetTokenCount(); // count == 2 + SysTryReturn(NID_UI, count == 2, null, E_SYSTEM, "The locale is invalid."); + + String language; + String country; + LanguageCode languageCode = LANGUAGE_INVALID; + CountryCode countryCode = COUNTRY_INVALID; + strTok.GetNextToken(language); + strTok.GetNextToken(country); + + languageCode = Locale::StringToLanguageCode(language); + countryCode = Locale::StringToCountryCode(country); + + Locale* pLocaleLanguage = new (std::nothrow) Locale(languageCode, countryCode); + SysTryReturn(NID_UI, pLocaleLanguage, null, E_OUT_OF_MEMORY, "Memory allocation failed."); + + return pLocaleLanguage; +} + +String +_BidiUtils::ConvertLanguageCountryCodeString(LanguageCode languageCode) +{ +static const char* defaultLauguageCountryCodeArray[LANGUAGE_MAX] = +{ + "", //"aar", /**< "Afar" */ + "", //"abk", /**< "Abkhazian" */ + "", //"ace", /**< "Achinese" */ + "", //"ach", /**< "Acoli" */ + "", //"ada", /**< "Adangme" */ + "", //"ady", /**< "Adyghe; Adygei" */ + "", //"afa", /**< "Afro-Asiatic languages" */ + "", //"afh", /**< "Afrihili" */ + "", //"afr", /**< "Afrikaans" */ + "", //"ain", /**< "Ainu" */ + "", //"aka", /**< "Akan" */ + "", //"akk", /**< "Akkadian" */ + "AL", //"sqi", /**< "Albanian" */ + "", //"ale", /**< "Aleut" */ + "", //"alg", /**< "Algonquian languages" */ + "", //"alt", /**< "Southern Altai" */ + "", //"amh", /**< "Amharic" */ + "", //"ang", /**< "English, Old (ca.450-1100)" */ + "", //"anp", /**< "Angika" */ + "", //"apa", /**< "Apache languages" */ + "AE", //"ara", /**< "Arabic" */ + "", //"arc", /**< "Official Aramaic (700-300 BCE); Imperial Aramaic (700-300 BCE)" */ + "", //"arg", /**< "Aragonese" */ + "", //"hye", /**< "Armenian" */ + "", //"arn", /**< "Mapudungun; Mapuche" */ + "", //"arp", /**< "Arapaho" */ + "", //"art", /**< "Artificial languages" */ + "", //"arw", /**< "Arawak" */ + "IN", //"asm", /**< "Assamese" */ + "", //"ast", /**< "Asturian; Bable; Leonese; Asturleonese" */ + "", //"ath", /**< "Athapascan languages" */ + "", //"aus", /**< "Australian languages" */ + "", //"ava", /**< "Avaric" */ + "", //"ave", /**< "Avestan" */ + "", //"awa", /**< "Awadhi" */ + "", //"aym", /**< "Aymara" */ + "AZ", //"aze", /**< "Azerbaijani" */ + "AZ", //"aze", /**< Azerbaijani (Arabic) */ + "AZ", //"aze", /**< Azerbaijani (Cyrillic) */ + "AZ", //"aze", /**< Azerbaijani (Latin) */ + "", //"bad", /**< "Banda languages" */ + "", //"bai", /**< "Bamileke languages" */ + "", //"bak", /**< "Bashkir" */ + "", //"bal", /**< "Baluchi" */ + "", //"bam", /**< "Bambara" */ + "", //"ban", /**< "Balinese" */ + "ES", //"eus", /**< "Basque" */ + "", //"bas", /**< "Basa" */ + "", //"bat", /**< "Baltic languages" */ + "", //"bej", /**< "Beja; Bedawiyet" */ + "", //"bel", /**< "Belarusian" */ + "", //"bem", /**< "Bemba" */ + "IN", //"ben", /**< "Bengali" */ + "", //"ber", /**< "Berber languages" */ + "", //"bho", /**< "Bhojpuri" */ + "", //"bih", /**< "Bihari" */ + "", //"bik", /**< "Bikol" */ + "", //"bin", /**< "Bini; Edo" */ + "", //"bis", /**< "Bislama" */ + "", //"bla", /**< "Siksika" */ + "", //"bnt", /**< "Bantu (Other)" */ + "", //"bos", /**< "Bosnian" */ + "", //"bra", /**< "Braj" */ + "", //"bre", /**< "Breton" */ + "", //"btk", /**< "Batak languages" */ + "", //"bua", /**< "Buriat" */ + "", //"bug", /**< "Buginese" */ + "BG", //"bul", /**< "Bulgarian" */ + "", //"mya", /**< "Burmese" */ + "", //"byn", /**< "Blin; Bilin" */ + "", //"cad", /**< "Caddo" */ + "", //"cai", /**< "Central American Indian languages" */ + "", //"car", /**< "Galibi Carib" */ + "ES", //"cat", /**< "Catalan; Valencian" */ + "", //"cau", /**< "Caucasian languages" */ + "", //"ceb", /**< "Cebuano" */ + "", //"cel", /**< "Celtic languages" */ + "", //"cha", /**< "Chamorro" */ + "", //"chb", /**< "Chibcha" */ + "", //"che", /**< "Chechen" */ + "", //"chg", /**< "Chagatai" */ + "CN,SG,HK,TW,CN", //"zho", /**< "Chinese" */ + "SG", //"zho-hans", /**< "Chinese (Simplified)" */ + "HK,TW,HK", //"zho-hant", /**< "Chinese (Traditional)" */ + "", //"chk", /**< "Chuukese" */ + "", //"chm", /**< "Mari" */ + "", //"chn", /**< "Chinook jargon" */ + "", //"cho", /**< "Choctaw" */ + "", //"chp", /**< "Chipewyan; Dene Suline" */ + "", //"chr", /**< "Cherokee" */ + "", //"chu", /**< "Church Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonic" */ + "", //"chv", /**< "Chuvash" */ + "", //"chy", /**< "Cheyenne" */ + "", //"cmc", /**< "Chamic languages" */ + "", //"cop", /**< "Coptic" */ + "", //"cor", /**< "Cornish" */ + "", //"cos", /**< "Corsican" */ + "", //"cpe", /**< "Creoles and pidgins, English based" */ + "", //"cpf", /**< "Creoles and pidgins, French-based " */ + "", //"cpp", /**< "Creoles and pidgins, Portuguese-based " */ + "", //"cre", /**< "Cree" */ + "TR", //"crh", /**< "Crimean Tatar; Crimean Turkish" */ + "", //"crp", /**< "Creoles and pidgins " */ + "", //"csb", /**< "Kashubian" */ + "", //"cus", /**< "Cushitic languages" */ + "CZ", //"ces", /**< "Czech" */ + "", //"dak", /**< "Dakota" */ + "DK", //"dan", /**< "Danish" */ + "", //"dar", /**< "Dargwa" */ + "", //"day", /**< "Land Dayak languages" */ + "", //"del", /**< "Delaware" */ + "", //"den", /**< "Slave (Athapascan)" */ + "", //"dgr", /**< "Dogrib" */ + "", //"din", /**< "Dinka" */ + "", //"div", /**< "Divehi; Dhivehi; Maldivian" */ + "", //"doi", /**< "Dogri" */ + "", //"dra", /**< "Dravidian languages" */ + "", //"dsb", /**< "Lower Sorbian" */ + "", //"dua", /**< "Duala" */ + "", //"dum", /**< "Dutch, Middle (ca.1050-1350)" */ + "NL", //"nld", /**< "Dutch; Flemish" */ + "", //"dyu", /**< "Dyula" */ + "", //"dzo", /**< "Dzongkha" */ + "", //"efi", /**< "Efik" */ + "", //"egy", /**< "Egyptian (Ancient)" */ + "", //"eka", /**< "Ekajuk" */ + "", //"elx", /**< "Elamite" */ + "GB,US,AU,GB", //"eng", /**< "English" */ + "", //"enm", /**< "English, Middle (1100-1500)" */ + "", //"epo", /**< "Esperanto" */ + "EE", //"est", /**< "Estonian" */ + "", //"ewe", /**< "Ewe" */ + "", //"ewo", /**< "Ewondo" */ + "", //"fan", /**< "Fang" */ + "", //"fao", /**< "Faroese" */ + "", //"fat", /**< "Fanti" */ + "", //"fij", /**< "Fijian" */ + "", //"fil", /**< "Filipino; Pilipino" */ + "FI", //"fin", /**< "Finnish" */ + "", //"fiu", /**< "Finno-Ugrian languages" */ + "", //"fon", /**< "Fon" */ + "FR,CA,FR", //"fra", /**< "French" */ + "FR", //"frm", /**< "French, Middle (ca.1400-1600)" */ + "FR", //"fro", /**< "French, Old (842-ca.1400)" */ + "", //"frr", /**< "Northern Frisian" */ + "", //"frs", /**< "Eastern Frisian" */ + "", //"fry", /**< "Western Frisian" */ + "", //"ful", /**< "Fulah" */ + "", //"fur", /**< "Friulian" */ + "", //"gaa", /**< "Ga" */ + "", //"gay", /**< "Gayo" */ + "", //"gba", /**< "Gbaya" */ + "DE", //"gem", /**< "Germanic languages" */ + "GE", //"kat", /**< "Georgian" */ + "DE", //"deu", /**< "German" */ + "", //"gez", /**< "Geez" */ + "", //"gil", /**< "Gilbertese" */ + "", //"gla", /**< "Gaelic; Scottish Gaelic" */ + "IE", //"gle", /**< "Irish" */ + "ES", //"glg", /**< "Galician" */ + "", //"glv", /**< "Manx" */ + "DE", //"gmh", /**< "German, Middle High (ca.1050-1500)" */ + "DE", //"goh", /**< "German, Old High (ca.750-1050)" */ + "", //"gon", /**< "Gondi" */ + "", //"gor", /**< "Gorontalo" */ + "", //"got", /**< "Gothic" */ + "", //"grb", /**< "Grebo" */ + "GR", //"grc", /**< "Greek, Ancient (to 1453)" */ + "GR", //"ell", /**< "Greek, Modern (1453-)" */ + "", //"grn", /**< "Guarani" */ + "CH", //"gsw", /**< "Swiss German; Alemannic; Alsatian" */ + "IN", //"guj", /**< "Gujarati" */ + "", //"gwi", /**< "Gwich'in" */ + "", //"hai", /**< "Haida" */ + "", //"hat", /**< "Haitian; Haitian Creole" */ + "", //"hau", /**< "Hausa" */ + "", //"hau-latn", /**< "Hausa (Latin)" */ + "US", //"haw", /**< "Hawaiian" */ + "IL", //"heb", /**< "Hebrew" */ + "", //"her", /**< "Herero" */ + "", //"hil", /**< "Hiligaynon" */ + "", //"him", /**< "Himachali" */ + "IN", //"hin", /**< "Hindi" */ + "", //"hit", /**< "Hittite" */ + "", //"hmn", /**< "Hmong" */ + "", //"hmo", /**< "Hiri Motu" */ + "HR", //"hrv", /**< "Croatian" */ + "", //"hsb", /**< "Upper Sorbian" */ + "HU", //"hun", /**< "Hungarian" */ + "", //"hup", /**< "Hupa" */ + "", //"iba", /**< "Iban" */ + "", //"ibo", /**< "Igbo" */ + "IS", //"isl", /**< "Icelandic" */ + "", //"ido", /**< "Ido" */ + "", //"iii", /**< "Sichuan Yi; Nuosu" */ + "", //"ijo", /**< "Ijo languages" */ + "", //"iku", /**< "Inuktitut" */ + "", //"ile", /**< "Interlingue; Occidental" */ + "", //"ilo", /**< "Iloko" */ + "", //"ina", /**< "Interlingua (International Auxiliary Language Association)" */ + "", //"inc", /**< "Indic languages" */ + "ID", //"ind", /**< "Indonesian" */ + "", //"ine", /**< "Indo-European languages" */ + "", //"inh", /**< "Ingush" */ + "", //"ipk", /**< "Inupiaq" */ + "", //"ira", /**< "Iranian languages" */ + "", //"iro", /**< "Iroquoian languages" */ + "IT", //"ita", /**< "Italian" */ + "", //"jav", /**< "Javanese" */ + "", //"jbo", /**< "Lojban" */ + "JP", //"jpn", /**< "Japanese" */ + "", //"jpr", /**< "Judeo-Persian" */ + "", //"jrb", /**< "Judeo-Arabic" */ + "", //"kaa", /**< "Kara-Kalpak" */ + "", //"kab", /**< "Kabyle" */ + "", //"kac", /**< "Kachin; Jingpho" */ + "", //"kal", /**< "Kalaallisut; Greenlandic" */ + "", //"kam", /**< "Kamba" */ + "IN", //"kan", /**< "Kannada" */ + "", //"kar", /**< "Karen languages" */ + "", //"kas", /**< "Kashmiri" */ + "", //"kau", /**< "Kanuri" */ + "", //"kaw", /**< "Kawi" */ + "KZ", //"kaz", /**< "Kazakh" */ + "KZ", //"kaz-cyrl", /**< "Kazakh (Cyrillic)" */ + "", //"kbd", /**< "Kabardian" */ + "", //"kha", /**< "Khasi" */ + "", //"khi", /**< "Khoisan languages" */ + "", //"khm", /**< "Central Khmer" */ + "", //"kho", /**< "Khotanese; Sakan" */ + "", //"kik", /**< "Kikuyu; Gikuyu" */ + "", //"kin", /**< "Kinyarwanda" */ + "", //"kir", /**< "Kirghiz; Kyrgyz" */ + "", //"kmb", /**< "Kimbundu" */ + "", //"kok", /**< "Konkani" */ + "", //"kom", /**< "Komi" */ + "", //"kon", /**< "Kongo" */ + "KR", //"kor", /**< "Korean" */ + "", //"kos", /**< "Kosraean" */ + "", //"kpe", /**< "Kpelle" */ + "", //"krc", /**< "Karachay-Balkar" */ + "", //"krl", /**< "Karelian" */ + "", //"kro", /**< "Kru languages" */ + "", //"kru", /**< "Kurukh" */ + "", //"kua", /**< "Kuanyama; Kwanyama" */ + "", //"kum", /**< "Kumyk" */ + "", //"kur", /**< "Kurdish" */ + "", //"kut", /**< "Kutenai" */ + "", //"lad", /**< "Ladino" */ + "", //"lah", /**< "Lahnda" */ + "", //"lam", /**< "Lamba" */ + "", //"lao", /**< "Lao" */ + "", //"lat", /**< "Latin" */ + "LV", //"lav", /**< "Latvian" */ + "", //"lez", /**< "Lezghian" */ + "", //"lim", /**< "Limburgan; Limburger; Limburgish" */ + "", //"lin", /**< "Lingala" */ + "LT", //"lit", /**< "Lithuanian" */ + "", //"lol", /**< "Mongo" */ + "", //"loz", /**< "Lozi" */ + "", //"ltz", /**< "Luxembourgish; Letzeburgesch" */ + "", //"lua", /**< "Luba-Lulua" */ + "", //"lub", /**< "Luba-Katanga" */ + "", //"lug", /**< "Ganda" */ + "", //"lui", /**< "Luiseno" */ + "", //"lun", /**< "Lunda" */ + "", //"luo", /**< "Luo (Kenya and Tanzania)" */ + "", //"lus", /**< "Lushai" */ + "MK", //"mkd", /**< "Macedonian" */ + "", //"mad", /**< "Madurese" */ + "", //"mag", /**< "Magahi" */ + "", //"mah", /**< "Marshallese" */ + "", //"mai", /**< "Maithili" */ + "", //"mak", /**< "Makasar" */ + "IN", //"mal", /**< "Malayalam" */ + "", //"man", /**< "Mandingo" */ + "", //"mri", /**< "Maori" */ + "", //"map", /**< "Austronesian languages" */ + "IN", //"mar", /**< "Marathi" */ + "", //"mas", /**< "Masai" */ + "MY", //"msa", /**< "Malay" */ + "", //"mdf", /**< "Moksha" */ + "", //"mdr", /**< "Mandar" */ + "", //"men", /**< "Mende" */ + "IE", //"mga", /**< "Irish, Middle (900-1200)" */ + "", //"mic", /**< "Mi'kmaq; Micmac" */ + "", //"min", /**< "Minangkabau" */ + "", //"mis", /**< "Uncoded languages" */ + "", //"mkh", /**< "Mon-Khmer languages" */ + "", //"mlg", /**< "Malagasy" */ + "", //"mlt", /**< "Maltese" */ + "", //"mnc", /**< "Manchu" */ + "", //"mni", /**< "Manipuri" */ + "", //"mno", /**< "Manobo languages" */ + "", //"moh", /**< "Mohawk" */ + "", //"mon", /**< "Mongolian" */ + "", //"mos", /**< "Mossi" */ + "", //"mul", /**< "Multiple languages" */ + "", //"mun", /**< "Munda languages" */ + "", //"mus", /**< "Creek" */ + "", //"mwl", /**< "Mirandese" */ + "", //"mwr", /**< "Marwari" */ + "", //"myn", /**< "Mayan languages" */ + "", //"myv", /**< "Erzya" */ + "", //"nah", /**< "Nahuatl languages" */ + "US", //"nai", /**< "North American Indian languages" */ + "", //"nap", /**< "Neapolitan" */ + "", //"nau", /**< "Nauru" */ + "", //"nav", /**< "Navajo; Navaho" */ + "", //"nbl", /**< "Ndebele, South; South Ndebele" */ + "", //"nde", /**< "Ndebele, North; North Ndebele" */ + "", //"ndo", /**< "Ndonga" */ + "DE", //"nds", /**< "Low German; Low Saxon; German, Low; Saxon, Low" */ + "IN", //"nep", /**< "Nepali" */ + "", //"new", /**< "Nepal Bhasa; Newari" */ + "", //"nia", /**< "Nias" */ + "", //"nic", /**< "Niger-Kordofanian languages" */ + "", //"niu", /**< "Niuean" */ + "", //"nno", /**< "Norwegian Nynorsk; Nynorsk, Norwegian" */ + "", //"nob", /**< "Bokmal, Norwegian; Norwegian Bokmal" */ + "", //"nog", /**< "Nogai" */ + "", //"non", /**< "Norse, Old" */ + "NO", //"nor", /**< "Norwegian" */ + "", //"nqo", /**< "N'Ko" */ + "", //"nso", /**< "Pedi; Sepedi; Northern Sotho" */ + "", //"nub", /**< "Nubian languages" */ + "", //"nwc", /**< "Classical Newari; Old Newari; Classical Nepal Bhasa" */ + "", //"nya", /**< "Chichewa; Chewa; Nyanja" */ + "", //"nym", /**< "Nyamwezi" */ + "", //"nyn", /**< "Nyankole" */ + "", //"nyo", /**< "Nyoro" */ + "", //"nzi", /**< "Nzima" */ + "", //"oci", /**< "Occitan (post 1500); Provencal" */ + "", //"oji", /**< "Ojibwa" */ + "IN", //"ori", /**< "Oriya" */ + "", //"orm", /**< "Oromo" */ + "", //"osa", /**< "Osage" */ + "", //"oss", /**< "Ossetian; Ossetic" */ + "TR", //"ota", /**< "Turkish, Ottoman (1500-1928)" */ + "", //"oto", /**< "Otomian languages" */ + "", //"paa", /**< "Papuan languages" */ + "", //"pag", /**< "Pangasinan" */ + "", //"pal", /**< "Pahlavi" */ + "", //"pam", /**< "Pampanga; Kapampangan" */ + "IN", //"pan", /**< "Panjabi; Punjabi" */ + "IN", //"pan-arab", /**< "Panjabi; Punjabi (Arabic)" */ + "IN", //"pan-guru", /**< "Panjabi; Punjabi (Gurmukhi)" */ + "", //"pap", /**< "Papiamento" */ + "", //"pau", /**< "Palauan" */ + "IR", //"peo", /**< "Persian, Old (ca.600-400 B.C.)" */ + "IR", //"fas", /**< "Persian" */ + "PH", //"phi", /**< "Philippine languages" */ + "", //"phn", /**< "Phoenician" */ + "", //"pli", /**< "Pali" */ + "PL", //"pol", /**< "Polish" */ + "", //"pon", /**< "Pohnpeian" */ + "PT,BR,PT", //"por", /**< "Portuguese" */ + "", //"pra", /**< "Prakrit languages" */ + "", //"pro", /**< "Provencal, Old (to 1500)" */ + "", //"pus", /**< "Pushto; Pashto" */ + "", //"qaa-qtz", /**< "Reserved for local use" */ + "", //"que", /**< "Quechua" */ + "", //"raj", /**< "Rajasthani" */ + "", //"rap", /**< "Rapanui" */ + "", //"rar", /**< "Rarotongan; Cook Islands Maori" */ + "", //"roa", /**< "Romance languages" */ + "", //"roh", /**< "Romansh" */ + "", //"rom", /**< "Romany" */ + "RO", //"ron", /**< "Romanian; Moldavian; Moldovan" */ + "", //"run", /**< "Rundi" */ + "", //"rup", /**< "Aromanian; Arumanian; Macedo-Romanian" */ + "RU", //"rus", /**< "Russian" */ + "", //"sad", /**< "Sandawe" */ + "", //"sag", /**< "Sango" */ + "", //"sah", /**< "Yakut" */ + "", //"sai", /**< "South American Indian (Other)" */ + "", //"sal", /**< "Salishan languages" */ + "", //"sam", /**< "Samaritan Aramaic" */ + "", //"san", /**< "Sanskrit" */ + "", //"sas", /**< "Sasak" */ + "", //"sat", /**< "Santali" */ + "", //"scn", /**< "Sicilian" */ + "", //"sco", /**< "Scots" */ + "", //"sel", /**< "Selkup" */ + "", //"sem", /**< "Semitic languages" */ + "IE", //"sga", /**< "Irish, Old (to 900)" */ + "", //"sgn", /**< "Sign Languages" */ + "", //"shn", /**< "Shan" */ + "", //"sid", /**< "Sidamo" */ + "LK", //"sin", /**< "Sinhala; Sinhalese" */ + "", //"sio", /**< "Siouan languages" */ + "", //"sit", /**< "Sino-Tibetan languages" */ + "", //"sla", /**< "Slavic languages" */ + "SK", //"slk", /**< "Slovak" */ + "SI", //"slv", /**< "Slovenian" */ + "", //"sma", /**< "Southern Sami" */ + "", //"sme", /**< "Northern Sami" */ + "", //"smi", /**< "Sami languages" */ + "", //"smj", /**< "Lule Sami" */ + "", //"smn", /**< "Inari Sami" */ + "", //"smo", /**< "Samoan" */ + "", //"sms", /**< "Skolt Sami" */ + "", //"sna", /**< "Shona" */ + "", //"snd", /**< "Sindhi" */ + "", //"snk", /**< "Soninke" */ + "", //"sog", /**< "Sogdian" */ + "", //"som", /**< "Somali" */ + "", //"son", /**< "Songhai languages" */ + "", //"sot", /**< "Sotho, Southern" */ + "ES,US,ES", //"spa", /**< "Spanish; Castilian" */ + "", //"srd", /**< "Sardinian" */ + "", //"srn", /**< "Sranan Tongo" */ + "RS", //"srp", /**< "Serbian" */ + "RS", //"srp-cyrl", /**< "Serbian (Cyrillic)" */ + "RS", //"srp-latn", /**< "Serbian (Latin)" */ + "", //"srr", /**< "Serer" */ + "", //"ssa", /**< "Nilo-Saharan languages" */ + "", //"ssw", /**< "Swati" */ + "", //"suk", /**< "Sukuma" */ + "", //"sun", /**< "Sundanese" */ + "", //"sus", /**< "Susu" */ + "", //"sux", /**< "Sumerian" */ + "", //"swa", /**< "Swahili" */ + "SE", //"swe", /**< "Swedish" */ + "", //"syc", /**< "Classical Syriac" */ + "", //"syr", /**< "Syriac" */ + "", //"tah", /**< "Tahitian" */ + "", //"tai", /**< "Tai languages" */ + "IN", //"tam", /**< "Tamil" */ + "", //"tat", /**< "Tatar" */ + "IN", //"tel", /**< "Telugu" */ + "", //"tem", /**< "Timne" */ + "", //"ter", /**< "Tereno" */ + "", //"tet", /**< "Tetum" */ + "", //"tgk", /**< "Tajik" */ + "IN", //"tgl", /**< "Tagalog" */ + "TH", //"tha", /**< "Thai" */ + "", //"bod", /**< "Tibetan" */ + "", //"tig", /**< "Tigre" */ + "", //"tir", /**< "Tigrinya" */ + "", //"tiv", /**< "Tiv" */ + "", //"tkl", /**< "Tokelau" */ + "", //"tlh", /**< "Klingon; tlhIngan-Hol" */ + "", //"tli", /**< "Tlingit" */ + "", //"tmh", /**< "Tamashek" */ + "", //"tog", /**< "Tonga (Nyasa)" */ + "", //"ton", /**< "Tonga (Tonga Islands)" */ + "", //"tpi", /**< "Tok Pisin" */ + "", //"tsi", /**< "Tsimshian" */ + "", //"tsn", /**< "Tswana" */ + "", //"tso", /**< "Tsonga" */ + "", //"tuk", /**< "Turkmen" */ + "", //"tuk-cyrl", /**< "Turkmen (Cyrillic)" */ + "", //"tuk-latn", /**< "Turkmen (Latin)" */ + "", //"tum", /**< "Tumbuka" */ + "", //"tup", /**< "Tupi languages" */ + "TR", //"tur", /**< "Turkish" */ + "", //"tut", /**< "Altaic languages" */ + "", //"tvl", /**< "Tuvalu" */ + "", //"twi", /**< "Twi" */ + "", //"tyv", /**< "Tuvinian" */ + "", //"udm", /**< "Udmurt" */ + "", //"uga", /**< "Ugaritic" */ + "", //"uig", /**< "Uighur; Uyghur" */ + "UA", //"ukr", /**< "Ukrainian" */ + "", //"umb", /**< "Umbundu" */ + "", //"und", /**< "Undetermined" */ + "PK", //"urd", /**< "Urdu" */ + "UZ", //"uzb", /**< "Uzbek" */ + "UZ", //"uzb-arabic", /**< Uzbek (Arabic) */ + "UZ", //"uzb-cyrl", /**< "Uzbek (Cyrillic)" */ + "UZ", //"uzb-latn", /**< "Uzbek (Latin)" */ + "", //"vai", /**< "Vai" */ + "", //"ven", /**< "Venda" */ + "VN", //"vie", /**< "Vietnamese" */ + "", //"vls", /**< "Vlaams; Flemish" */ + "", //"vol", /**< "Volapuk" */ + "", //"vot", /**< "Votic" */ + "", //"wak", /**< "Wakashan languages" */ + "", //"wal", /**< "Walamo" */ + "", //"war", /**< "Waray" */ + "", //"was", /**< "Washo" */ + "GB", //"cym", /**< "Welsh" */ + "", //"wen", /**< "Sorbian languages" */ + "", //"wln", /**< "Walloon" */ + "", //"wol", /**< "Wolof" */ + "", //"xal", /**< "Kalmyk; Oirat" */ + "", //"xho", /**< "Xhosa" */ + "", //"yao", /**< "Yao" */ + "", //"yap", /**< "Yapese" */ + "", //"yid", /**< "Yiddish" */ + "", //"yor", /**< "Yoruba" */ + "", //"ypk", /**< "Yupik languages" */ + "", //"zap", /**< "Zapotec" */ + "", //"zbl", /**< "Blissymbols; Blissymbolics; Bliss" */ + "", //"zen", /**< "Zenaga" */ + "", //"zha", /**< "Zhuang; Chuang" */ + "", //"znd", /**< "Zande languages" */ + "", //"zul", /**< "Zulu" */ + "", //"zun", /**< "Zuni" */ + "", //"zxx", /**< "No linguistic content; Not applicable" */ + "", //"zza", /**< "Zaza; Dimili; Dimli; Kirdki; Kirmanjki; Zazaki" */ +}; + + String languageCodeString(L"lang="); + String countryCodeString; + + languageCodeString.Append(Locale::LanguageCodeToTwoLetterLanguageCodeString(languageCode)); + const char* pCountryCode = (languageCode < LANGUAGE_MAX) ? defaultLauguageCountryCodeArray[languageCode] : ""; + + int len = strlen(pCountryCode); + if (len == 0) + { + return String(L""); + } + if (len == 2) + { + languageCodeString.Append(L"_"); + StringUtil::Utf8ToString(defaultLauguageCountryCodeArray[languageCode], countryCodeString); + languageCodeString.Append(countryCodeString); + } + else + { + Locale* pLocaleLanguage = GetLocaleLanguageN(); + + if (!pLocaleLanguage) + { + return String(L""); + } + + const String displayCountry = pLocaleLanguage->GetCountryCodeString(); + String delim(L","); + String countries; + StringUtil::Utf8ToString(defaultLauguageCountryCodeArray[languageCode], countries); + StringTokenizer strTok(countries, delim); + + while (strTok.HasMoreTokens()) + { + strTok.GetNextToken(countryCodeString); + if (countryCodeString == displayCountry) + { + break; + } + } + delete pLocaleLanguage; + languageCodeString.Append(L"_"); + languageCodeString.Append(countryCodeString); + } + + return languageCodeString; +} + +}} // Tizen::Ui diff --git a/src/ui/FUi_CardLayoutImpl.cpp b/src/ui/FUi_CardLayoutImpl.cpp new file mode 100644 index 0000000..5db6c60 --- /dev/null +++ b/src/ui/FUi_CardLayoutImpl.cpp @@ -0,0 +1,107 @@ +// +// 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_CardLayoutImpl.cpp + * @brief This is the implementation file for _CardLayoutImpl class. + * + * This file contains the implementation of _CardLayoutImpl class. + */ + +#include "FUi_CardLayoutImpl.h" + +namespace Tizen { namespace Ui +{ + +// _CardLayoutImpl implementation +_CardLayoutImpl::_CardLayoutImpl(CardLayout* pPublicLayout, _Layout::AbsoluteLayout* pCoreLayout) + : _LayoutImpl(pPublicLayout, pCoreLayout) +{ +} + +_CardLayoutImpl::~_CardLayoutImpl(void) +{ +} + +Tizen::Ui::LayoutType +_CardLayoutImpl::GetLayoutType(void) const +{ + return LAYOUT_CARD; +} + +_CardLayoutImpl* +_CardLayoutImpl::CreateCardLayoutImplN(CardLayout* pPublicLayout) +{ + ClearLastResult(); + + _Layout::AbsoluteLayout* pCoreLayout = null; + _CardLayoutImpl* pImplLayout = null; + result r = E_SUCCESS; + + pCoreLayout = _Layout::AbsoluteLayout::CreateAbsoluteLayoutN(true); + r = GetLastResult(); + SysTryReturn(NID_UI, pCoreLayout != null, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + pImplLayout = new (std::nothrow) _CardLayoutImpl(pPublicLayout, pCoreLayout); + r = CheckConstruction(pCoreLayout, pImplLayout); + SysTryReturn(NID_UI, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + return pImplLayout; +} + +const char* +_CardLayoutImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::CardLayout"; +} + +const CardLayout& +_CardLayoutImpl::GetPublic(void) const +{ + return static_cast (_LayoutImpl::GetPublic()); +} + +CardLayout& +_CardLayoutImpl::GetPublic(void) +{ + return static_cast (_LayoutImpl::GetPublic()); +} + +const _Layout::AbsoluteLayout& +_CardLayoutImpl::GetCore(void) const +{ + return static_cast (_LayoutImpl::GetCore()); +} + +_Layout::AbsoluteLayout& +_CardLayoutImpl::GetCore(void) +{ + return static_cast <_Layout::AbsoluteLayout&>(_LayoutImpl::GetCore()); +} + +const _CardLayoutImpl* +_CardLayoutImpl::GetInstance(const CardLayout& layout) +{ + return static_cast(_LayoutImpl::GetInstance(layout)); +} + +_CardLayoutImpl* +_CardLayoutImpl::GetInstance(CardLayout& layout) +{ + return static_cast<_CardLayoutImpl*>(_LayoutImpl::GetInstance(layout)); +} + +}} // Tizen::Ui diff --git a/src/ui/FUi_CardLayoutImpl.h b/src/ui/FUi_CardLayoutImpl.h new file mode 100644 index 0000000..86d541a --- /dev/null +++ b/src/ui/FUi_CardLayoutImpl.h @@ -0,0 +1,135 @@ +// +// 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_CardLayoutImpl.h + * @brief This is the header file for _CardLayoutImpl class. + * + * This header file contains the declaration of _CardLayoutImpl class. + */ + +#ifndef _FUI_INTERNAL_CARD_LAYOUT_IMPL_H +#define _FUI_INTERNAL_CARD_LAYOUT_IMPL_H + +#include +#include "FUi_LayoutImpl.h" +#include "FUi_LayoutAbsoluteLayout.h" + +namespace Tizen { namespace Ui +{ + +class CardLayout; + +class _CardLayoutImpl + : public _LayoutImpl +{ +public: + /** + * This is the destructor for this class. + * + * @since 2.0 + */ + virtual ~_CardLayoutImpl(void); + + /** + * Creates the instance of _CardLayoutImpl. + * + * @since 2.0 + * @return The instance of _CardLayoutImpl. + * @param[in] pPublicLayout The public class of relative layout. + * @exception E_SUCCESS The method was successful. + * @exception E_OUT_OF_MEMORY Insufficient memory. + */ + static _CardLayoutImpl* CreateCardLayoutImplN(CardLayout* pPublicLayout); + + /** + * Gets the name of public class. + * + * @since 2.0 + * @return The name of public class. + */ + virtual const char* GetPublicClassName(void) const; + + /** + * Gets the public class. + * + * @since 2.0 + * @return The public class. + */ + virtual const CardLayout& GetPublic(void) const; + + /** + * Gets the public class. + * + * @since 2.0 + * @return The public class. + */ + virtual CardLayout& GetPublic(void); + + /** + * Gets the core class. + * + * @since 2.0 + * @return The core class. + */ + virtual const _Layout::AbsoluteLayout& GetCore(void) const; + + /** + * Gets the core class. + * + * @since 2.0 + * @return The core class. + */ + virtual _Layout::AbsoluteLayout& GetCore(void); + + /** + * Gets the _CardLayoutImpl instance for the CardLayout. + * + * @since 2.0 + * @return The _CardLayoutImpl instance. + * @param[in] pLayout The CardLayout instance. + */ + static const _CardLayoutImpl* GetInstance(const CardLayout& layout); + + /** + * Gets the _CardLayoutImpl instance for the CardLayout. + * + * @since 2.0 + * @return The _CardLayoutImpl instance. + * @param[in] pLayout The CardLayout instance. + */ + static _CardLayoutImpl* GetInstance(CardLayout& layout); + + /** + * Gets the type of the layout. + * + * @since 2.0 + * @return The layout type + */ + virtual LayoutType GetLayoutType(void) const; + +protected: + /** + * This is the default constructor for this class. + * + * @since 2.0 + */ + _CardLayoutImpl(CardLayout* pPublicLayout, _Layout::AbsoluteLayout* pCoreLayout); +}; // _CardLayoutImpl + +}} // Tizen::Ui + +#endif // _FUI_INTERNAL_CARD_LAYOUT_IMPL_H diff --git a/src/ui/FUi_Clipboard.cpp b/src/ui/FUi_Clipboard.cpp new file mode 100644 index 0000000..8621b21 --- /dev/null +++ b/src/ui/FUi_Clipboard.cpp @@ -0,0 +1,1050 @@ +// +// 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_Clipboard.cpp + * @brief This is the implementation file for the _Clipboard class. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "FUi_Clipboard.h" +#include "FUi_ClipboardItem.h" +#include "FUi_ControlManager.h" +#include "FUi_EcoreEvasMgr.h" +#include "FUiCtrl_PublicClipboardPopupEvent.h" +#include "FUi_IClipboardPopupEventListener.h" + +using namespace std; +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Graphics; +using namespace Tizen::Io; +using namespace Tizen::Media; +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/OSP_"; +const String _CLIPBOARD_DEFAULT_EXTENSION = L".png"; +} // Anonymous + +namespace Tizen { namespace Ui +{ +_Clipboard* _Clipboard::__pInstance = null; + +_Clipboard* +_Clipboard::GetInstance(void) +{ + if (__pInstance) + { + return __pInstance; + } + + if (_ControlManager::GetInstance()) + { + __pInstance = new (std::nothrow) _Clipboard; + SysAssert(__pInstance); + + return __pInstance; + } + + return null; +} + +void +_Clipboard::ReleaseInstance(void) +{ + if (__pInstance) + { + delete __pInstance; + __pInstance = null; + } +} + +_Clipboard::~_Clipboard(void) +{ + if (IsPopupVisible() == true) + { + HidePopup(); + } + + if (__pPublicEvent) + { + delete __pPublicEvent; + __pPublicEvent = null; + } +} + +result +_Clipboard::CopyItem(const _ClipboardItem& item) +{ + SysTryReturn(NID_UI, IsValidDataType(item.GetDataType()), E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] The data type is invalid."); + + _ClipFormat format = ConvertToClipFormat(item.GetDataType()); + SysTryReturn(NID_UI, format != _CLIP_FORMAT_NONE, E_INVALID_ARG, E_INVALID_ARG, + "[E_INVALID_ARG] The data type is invalid."); + + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + SysTryReturn(NID_UI, pEcoreEvas, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + char* pChar = null; + if (format == _CLIP_FORMAT_IMAGE) + { + const Bitmap* pBitmap = dynamic_cast (item.GetData()); + SysTryReturn(NID_UI, pBitmap, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The data is invalid."); + + pChar = CreateImageFileN(*pBitmap); + } + else + { + const String* pString = dynamic_cast (item.GetData()); + SysTryReturn(NID_UI, pString, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The data is invalid."); + + pChar = EncodeToCharN(*pString); + } + + result r = GetLastResult(); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pEcoreEvas->CopyClip(format, pChar); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + SysLog(NID_UI, "[Clipboard] Clip : format = [%d], char = [%s] is copied.", format, pChar); + + // fall through + +CATCH: + if (pChar) + { + free(pChar); + } + + return r; +} + +IList* +_Clipboard::RetrieveItemsN(unsigned long dataTypes) +{ + SysTryReturn(NID_UI, IsValidDataType(dataTypes), null, E_INVALID_ARG, + "[E_INVALID_ARG] The data type is invalid."); + + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + SysTryReturn(NID_UI, pEcoreEvas, null, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + int count = pEcoreEvas->GetClipCount(); + SysTryReturn(NID_UI, count > 0, null, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The item of the specified data types is not found."); + + LinkedList* pList = new (std::nothrow) LinkedList; + SysTryReturn(NID_UI, pList, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + + // Add items. + int format = _CLIP_FORMAT_NONE; + char* pData = null; + ClipboardDataType type = CLIPBOARD_DATA_TYPE_NONE; + for (int i = 0; i < count; i++) + { + // Get the clip with index. + bool ret = pEcoreEvas->RetrieveClipN(i, &format, &pData); + + if (ret == false) + { + SysLog(NID_UI, "It's failed to get the clip from _EcoreEvas."); + continue; + } + + //if (!pData) // prevent -> SLP CBHM + //{ + // SysLog(NID_UI, "It's failed to get the clip from _EcoreEvas."); + // continue; + //} + + type = ConvertToDataType(format, pData); + + if (!IsValidDataType(type)) + { + SysLog(NID_UI, "The type of a clip to be get form _EcoreEvas is invalid."); + free(pData); + continue; + } + + // If the clip to be get from _EcoreEvas is in agreement with dataTypes. + if (dataTypes & type) + { + result r = E_SUCCESS; + _ClipboardItem* pItem = null; + + if (type == CLIPBOARD_DATA_TYPE_IMAGE) + { + const Bitmap* pBitmap = LoadBitmapN(String(pData)); + r = GetLastResult(); + + if (!pBitmap || (r != E_SUCCESS)) + { + SysLog(NID_UI, "It's failed to load a bitmap."); + free(pData); + continue; + } + + pItem = _ClipboardItem::CreateInstanceN(type, *pBitmap); + if (!pItem) + { + SysLog(NID_UI, "It's failed to create a image item."); + } + + delete pBitmap; + free(pData); + } + else + { + pItem = _ClipboardItem::CreateInstanceN(type, String(pData)); + if (!pItem) + { + SysLog(NID_UI, "It's failed to create a clipboard item."); + } + + free(pData); + } + + if (pItem) + { + r = pList->Add(*pItem); + if (r != E_SUCCESS) + { + delete pItem; + SysLog(NID_UI, "It's failed to add a item into a list."); + } + + } + } + // [ToDo] + /* + else + { + free(pData); + } + */ + } + + SysTryCatch(NID_UI, pList->GetCount() > 0, , E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The item of the specified data types is not found."); + + SetLastResult(E_SUCCESS); + + return pList; + +CATCH: + delete pList; + return null; +} + +const _ClipboardItem* +_Clipboard::RetrieveLatestItemN(unsigned long dataTypes) +{ + SysTryReturn(NID_UI, IsValidDataType(dataTypes), null, E_INVALID_ARG, + "[E_INVALID_ARG] The data type is invalid."); + + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + SysTryReturn(NID_UI, pEcoreEvas, null, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + int count = pEcoreEvas->GetClipCount(); + SysTryReturn(NID_UI, count > 0, null, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The item of the specified data types is not found."); + + // Find the item with dataTypes. + int format = _CLIP_FORMAT_NONE; + char* pData = null; + ClipboardDataType type = CLIPBOARD_DATA_TYPE_NONE; + bool found = false; + for (int i = 0; i < count; i++) + { + // Get the clip with index. + bool ret = pEcoreEvas->RetrieveClipN(i, &format, &pData); + + if (ret == false) + { + SysLog(NID_UI, "It's failed to get the clip from _EcoreEvas."); + continue; + } + + //if (!pData) // prevent -> SLP CBHM + //{ + // SysLog(NID_UI, "It's failed to get the clip from _EcoreEvas."); + // continue; + //} + + type = ConvertToDataType(format, pData); + + if (!IsValidDataType(type)) + { + SysLog(NID_UI, "The type of a clip to be get form _EcoreEvas is invalid."); + free(pData); + continue; + } + + // If the clip to be get from _EcoreEvas is in agreement with dataTypes. + if (dataTypes & type) + { + found = true; + break; + } + else + { + free(pData); + } + } + + SysTryReturn(NID_UI, found == true, null, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The item of the specified data types is not found."); + + SysLog(NID_UI, "[Clipboard] Clip : format = [%d], char = [%s] is retrieved.", format, pData); + + result r = E_SUCCESS; + _ClipboardItem* pItem = null; + if (type == CLIPBOARD_DATA_TYPE_IMAGE) + { + const Bitmap* pBitmap = LoadBitmapN(String(pData)); + r = GetLastResult(); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pItem = _ClipboardItem::CreateInstanceN(type, *pBitmap); + r = GetLastResult(); + + delete pBitmap; + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + pItem = _ClipboardItem::CreateInstanceN(type, String(pData)); + r = GetLastResult(); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + + free(pData); + + SetLastResult(E_SUCCESS); + + return pItem; + +CATCH: + if (pItem) + { + delete pItem; + } + + free(pData); + return null; +} + +result +_Clipboard::ShowPopup(unsigned long dataTypes, const IClipboardPopupEventListener &listener, bool internal) +{ + if (internal == false) + { + SysTryReturn(NID_UI, IsPopupVisible() == false, E_INVALID_OPERATION, E_INVALID_OPERATION, + "[E_INVALID_OPERATION] The popup is already shown."); + } + + result r = E_SUCCESS; + + if (__pPublicEvent == null) + { + __pPublicEvent = _PublicClipboardPopupEvent::CreateInstanceN(); + r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + if (internal == true) + { + __pPublicEvent->RemoveListener(listener); + } + r = __pPublicEvent->AddListener(listener); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + unsigned long clipFormats = _CLIP_FORMAT_NONE; + if (CLIPBOARD_DATA_TYPE_IMAGE & dataTypes) + { + clipFormats = _CLIP_FORMAT_IMAGE; + } + + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + + pEcoreEvas->OpenClipboard(clipFormats); + + return r; +} + +result +_Clipboard::HidePopup(void) +{ + SysTryReturn(NID_UI, IsPopupVisible() == true, E_INVALID_OPERATION, E_INVALID_OPERATION, + "[E_INVALID_OPERATION] The popup is not shown."); + + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + pEcoreEvas->CloseClipboard(); + + if (__pPublicEvent) + { + delete __pPublicEvent; + __pPublicEvent = null; + } + + return E_SUCCESS; +} + +bool +_Clipboard::IsPopupVisible(void) +{ + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + + bool opened = pEcoreEvas->IsClipboardOpened(); + + SetLastResult(E_SUCCESS); + return opened; +} + +void +_Clipboard::FireEvent(int format, char* pData) +{ + if (!__pPublicEvent) + { + SysLog(NID_UI, "__pPublicEvent is null."); + + HidePopup(); + return; + } + + result r = E_SUCCESS; + _ClipboardItem* pItemCore = null; + ClipboardItem* pItem = null; + + if (pData) + { + ClipboardDataType type = ConvertToDataType(format, pData); + if (!IsValidDataType(type)) + { + SysLog(NID_UI, "The type of a clip to be get form _EcoreEvas is invalid."); + free(pData); + + HidePopup(); + return; + } + + if (type == CLIPBOARD_DATA_TYPE_IMAGE) + { + SysLog(NID_UI, "[Clipboard] Clip : format = [image], path = [%s] is fired.", pData); + const Bitmap* pBitmap = LoadBitmapN(String(pData)); + r = GetLastResult(); + + if (!pBitmap || (r != E_SUCCESS)) + { + SysLog(NID_UI, "It's failed to load a bitmap."); + + if (pBitmap) + { + delete pBitmap; + } + free(pData); + + HidePopup(); + return; + } + + pItemCore = _ClipboardItem::CreateInstanceN(type, *pBitmap); + if (!pItemCore) + { + SysLog(NID_UI, "It's failed to create a image item."); + } + + delete pBitmap; + free(pData); + } + else + { + SysLog(NID_UI, "[Clipboard] Clip : format = [%d], char = [%s] is fired.", format, pData); + pItemCore = _ClipboardItem::CreateInstanceN(type, String(pData)); + if (!pItemCore) + { + SysLog(NID_UI, "It's failed to create a clipboard item."); + } + + free(pData); + } + + if (!pItemCore) + { + SysLog(NID_UI, "pItemCore is null."); + + HidePopup(); + return; + } + + pItem = new (std::nothrow) ClipboardItem; + pItem->Construct(pItemCore->GetDataType(), *(pItemCore->GetData())); + + delete pItemCore; + } + + IEventArg* pArg = _PublicClipboardPopupEvent::CreateClipboardPopupEventArgN(pItem); + r = GetLastResult(); + SysTryReturnVoidResult(NID_UI, pArg, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pPublicEvent->Fire(*pArg); + HidePopup(); + + SetLastResult(E_SUCCESS); +} + +result +_Clipboard::AddClipboardPopupEventListener(_IClipboardPopupEventListener& listener) +{ + result r = E_SUCCESS; + + if (__pEvent.get() == null) + { + unique_ptr<_ClipboardPopupEvent> pEvent(_ClipboardPopupEvent::CreateInstanceN()); + SysTryReturnResult(NID_UI, pEvent, E_OUT_OF_MEMORY, "Memory is insufficient."); + + r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pEvent = move(pEvent); + } + + r = __pEvent->AddListener(listener); + + return r; +} + +result +_Clipboard::RemoveClipboardPopupEventListener(_IClipboardPopupEventListener& listener) +{ + SysTryReturnResult(NID_UI, __pEvent.get(), E_OBJ_NOT_FOUND, "The _IClipboardPopupEventListener does not exist in the event listener list."); + + result r = __pEvent->RemoveListener(listener); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +void +_Clipboard::FirePopupEvent(_ClipboardPopupState state, int width, int height) +{ + if (__pEvent.get() == null) + { + return; + } + + Dimension clipboardPopupSize(width, height); + IEventArg* pArg = _ClipboardPopupEvent::CreateClipboardPopupEventArgN(state, clipboardPopupSize); + result r = GetLastResult(); + SysTryReturnVoidResult(NID_UI, pArg, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pEvent->Fire(*pArg); + + SetLastResult(E_SUCCESS); +} + +_ClipFormat +_Clipboard::ConvertToClipFormat(ClipboardDataType type) +{ + _ClipFormat format = _CLIP_FORMAT_NONE; + switch (type) + { + case CLIPBOARD_DATA_TYPE_TEXT: + // fall through + case CLIPBOARD_DATA_TYPE_VIDEO: + // fall through + case CLIPBOARD_DATA_TYPE_AUDIO: + format = _CLIP_FORMAT_TEXT; + break; + case CLIPBOARD_DATA_TYPE_HTML: + format = _CLIP_FORMAT_HTML; + break; + case CLIPBOARD_DATA_TYPE_IMAGE: + format = _CLIP_FORMAT_IMAGE; + break; + default: + break; + } + + return format; +} + +ClipboardDataType +_Clipboard::ConvertToDataType(int format, const char* pData) +{ + ClipboardDataType type = CLIPBOARD_DATA_TYPE_NONE; + switch (format) + { + case _CLIP_FORMAT_TEXT: + if (IsVideoDataType(pData)) + { + type = CLIPBOARD_DATA_TYPE_VIDEO; + } + else if (IsAudioDataType(pData)) + { + type = CLIPBOARD_DATA_TYPE_AUDIO; + } + else + { + type = CLIPBOARD_DATA_TYPE_TEXT; + } + break; + case _CLIP_FORMAT_HTML: + type = CLIPBOARD_DATA_TYPE_HTML; + break; + case _CLIP_FORMAT_IMAGE: + type = CLIPBOARD_DATA_TYPE_IMAGE; + break; + default: + break; + } + + return type; +} + +char* +_Clipboard::EncodeToCharN(const String& string) +{ + Utf8Encoding encoder; + ByteBuffer* pByteBuffer = encoder.GetBytesN(string); + + result r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + char* pChar = strdup((char*)pByteBuffer->GetPointer()); + SysTryCatch(NID_UI, pChar, , E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + SetLastResult(E_SUCCESS); + + // fall through + +CATCH: + delete pByteBuffer; + return pChar; +} + +char* +_Clipboard::CreateImageFileN(const Bitmap& bitmap) +{ + // Obtain the buffer information from the bitmap. + Bitmap& tmpBitmap = const_cast(bitmap); + BufferInfo bufferInfo; + + result r = tmpBitmap.Lock(bufferInfo); + SysTryReturn(NID_UI, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + // Create a source buffer. + ByteBuffer* pSrcBuf = new (std::nothrow) ByteBuffer; + SysTryReturn(NID_UI, pSrcBuf, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + + int outLength = bufferInfo.width * bufferInfo.height * bufferInfo.bitsPerPixel / 8; + + BitmapPixelFormat bmpPixelFormat = bitmap.GetPixelColorFormat(); + MediaPixelFormat mediaPixelFormat = MEDIA_PIXEL_FORMAT_NONE; + ImageFormat imageFormat = IMG_FORMAT_PNG; + + ByteBuffer* pImageBuffer = null; + File file; + char* pChar = null; + String filePath; + bool existFile = false; + + r = pSrcBuf->Construct(outLength); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = pSrcBuf->SetArray((const byte*)bufferInfo.pPixels, 0, outLength); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pSrcBuf->Flip(); + + // Decide formats. + switch (bmpPixelFormat) + { + case BITMAP_PIXEL_FORMAT_RGB565: + mediaPixelFormat = MEDIA_PIXEL_FORMAT_RGB565LE; + break; + case BITMAP_PIXEL_FORMAT_ARGB8888: + // fall through + case BITMAP_PIXEL_FORMAT_R8G8B8A8: + mediaPixelFormat = MEDIA_PIXEL_FORMAT_BGRA8888; + break; + default: + SysLogException(NID_UI, E_INVALID_ARG, "[E_INVALID_ARG] The invalid argument is given."); + goto CATCH; + } + + // Encode for getting a image buffer. + pImageBuffer = _ImageEncoder::EncodeToBufferN(*pSrcBuf, bufferInfo.width, bufferInfo.height, mediaPixelFormat, imageFormat); + r = GetLastResult(); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + delete pSrcBuf; + pSrcBuf = null; + + // Create a image file. + filePath = CreateImageFilePath(); + r = GetLastResult(); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = file.Construct(filePath, L"w+"); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + existFile = true; + + r = file.Write(*pImageBuffer); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + delete pImageBuffer; + pImageBuffer = null; + + pChar = EncodeToCharN(filePath); + r = GetLastResult(); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + SetLastResult(E_SUCCESS); + + return pChar; + +CATCH: + if (pSrcBuf) + { + delete pSrcBuf; + } + + if (pImageBuffer) + { + delete pImageBuffer; + } + + if (existFile) + { + File::Remove(filePath); + } + + if (pChar) + { + free(pChar); + } + + return null; +} + +String +_Clipboard::CreateImageFilePath(void) +{ + result r = RemoveUnnecessaryImageFiles(); + SysTryReturn(NID_UI, r == E_SUCCESS, String(""), r, "[%s] Propagating.", GetErrorMessage(r)); + + String filePath; + String extension(_CLIPBOARD_DEFAULT_EXTENSION); + 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); + + return filePath; +} + +result +_Clipboard::RemoveUnnecessaryImageFiles(void) +{ + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + SysTryReturn(NID_UI, pEcoreEvas, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + result r = E_SUCCESS; + + int clipCount = pEcoreEvas->GetClipCount(); + if (clipCount < 1) + { + r = RemoveAllImageFiles(); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + } + + ArrayList imageClipList; + + r = imageClipList.Construct(); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + int format = _CLIP_FORMAT_NONE; + char* pData = null; + for (int i = 0; i < clipCount; i++) + { + bool ret = pEcoreEvas->RetrieveClipN(i, &format, &pData); + + if (ret == false) + { + SysLog(NID_UI, "It's failed to get the clip from _EcoreEvas."); + continue; + } + + //if (!pData) // prevent -> SLP CBHM + //{ + // SysLog(NID_UI, "It's failed to get the clip from _EcoreEvas."); + // continue; + //} + + if (format == _CLIP_FORMAT_IMAGE) + { + String temp(pData); + int length = temp.GetLength(); + int defaultLength = _CLIPBOARD_DEFAULT_PATH.GetLength(); + + if (length < defaultLength) + { + free(pData); + continue; + } + + temp.Remove(defaultLength, length - defaultLength); + + int compare = temp.CompareTo(_CLIPBOARD_DEFAULT_PATH); + + if (compare == 0) + { + String* pString = new (std::nothrow) String(pData); + imageClipList.Add(*pString); + } + } + + free(pData); + } + + String filePath; + IEnumerator* pEnumerator = null; + + int imageClipCount = imageClipList.GetCount(); + + if (imageClipCount < 1) + { + r = RemoveAllImageFiles(); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + } + else if (imageClipCount == _CBHM_ITEM_MAX) + { + String* plastImageClip = dynamic_cast(imageClipList.GetAt(_CBHM_ITEM_MAX - 1)); + SysTryCatch(NID_UI, plastImageClip, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + if (File::IsFileExist(*plastImageClip)) + { + r = File::Remove(*plastImageClip); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + + pEnumerator = imageClipList.GetEnumeratorN(); + SysTryCatch(NID_UI, pEnumerator, , r, "[%s] Propagating.", GetErrorMessage(r)); + + for (int i = 0; i < _CLIPBOARD_ITEM_MAX; i++) + { + filePath = _CLIPBOARD_DEFAULT_PATH; + + r = filePath.Append(i); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = filePath.Append(_CLIPBOARD_DEFAULT_EXTENSION); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + bool equal = false; + while (pEnumerator->MoveNext() == E_SUCCESS) + { + String* pImageClip = dynamic_cast(pEnumerator->GetCurrent()); + SysTryCatch(NID_UI, pImageClip, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + equal = filePath.Equals(*pImageClip); + if (equal == true) + { + break; + } + } + + r = pEnumerator->Reset(); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + if (equal == false) + { + if (File::IsFileExist(filePath)) + { + r = File::Remove(filePath); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + } + + // fall through + +CATCH: + imageClipList.RemoveAll(true); + + if (pEnumerator) + { + delete pEnumerator; + } + + return r; +} + +result +_Clipboard::RemoveAllImageFiles(void) +{ + String filePath; + result r = E_SUCCESS; + + for (int i = 0; i < _CLIPBOARD_ITEM_MAX; i++) + { + filePath = _CLIPBOARD_DEFAULT_PATH; + + r = filePath.Append(i); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = filePath.Append(_CLIPBOARD_DEFAULT_EXTENSION); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (File::IsFileExist(filePath)) + { + r = File::Remove(filePath); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + + return r; +} + +Bitmap* +_Clipboard::LoadBitmapN(const String& path) +{ + result r = E_SUCCESS; + + String* pStr = const_cast(&path); + + int index = 0; + r = pStr->IndexOf(L"file://", 0, index); + + if (r != E_OBJ_NOT_FOUND) + { + pStr->Remove(0, 7); + } + + bool hasAlpha = _ImageUtil::HasAlphaChannel(*pStr); + +// r = GetLastResult(); +// SysTryReturn(NID_UI, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + BitmapPixelFormat bmpPixelFormat = BITMAP_PIXEL_FORMAT_RGB565; + MediaPixelFormat mediaPixelFormat = MEDIA_PIXEL_FORMAT_RGB565LE; + + if (hasAlpha == true) + { + bmpPixelFormat = BITMAP_PIXEL_FORMAT_ARGB8888; + mediaPixelFormat = MEDIA_PIXEL_FORMAT_BGRA8888; + } + + int bmpWidth = 0; + int bmpHeight = 0; + + // Decode. + ByteBuffer* pBuffer = _ImageDecoder::DecodeToBufferN(*pStr, mediaPixelFormat, bmpWidth, bmpHeight); + r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + // Create a bitmap. + Bitmap* pBitmap = _BitmapImpl::GetNonScaledBitmapN(*pBuffer, Dimension(bmpWidth, bmpHeight), bmpPixelFormat); + r = GetLastResult(); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + delete pBuffer; + + SetLastResult(E_SUCCESS); + + return pBitmap; + +CATCH: + delete pBuffer; + + if (pBitmap) + { + delete pBitmap; + } + + return null; +} + +bool +_Clipboard::IsValidDataType(unsigned long dataTypes) +{ + return ((CLIPBOARD_DATA_TYPE_TEXT & dataTypes) || + (CLIPBOARD_DATA_TYPE_HTML & dataTypes) || + (CLIPBOARD_DATA_TYPE_IMAGE & dataTypes) || + (CLIPBOARD_DATA_TYPE_VIDEO & dataTypes) || + (CLIPBOARD_DATA_TYPE_AUDIO & dataTypes)); +} + +bool +_Clipboard::IsVideoDataType(const char* pChar) +{ + // [ToDo] + return (strstr(pChar, ".mp4") != null); +} + +bool +_Clipboard::IsAudioDataType(const char* pChar) +{ + // [ToDo] + return (strstr(pChar, ".mp3") != null); +} + +_Clipboard::_Clipboard(void) + : __pPublicEvent(null) +{ +} + +}} // Tizen::Ui diff --git a/src/ui/FUi_Clipboard.h b/src/ui/FUi_Clipboard.h new file mode 100644 index 0000000..d9db3f2 --- /dev/null +++ b/src/ui/FUi_Clipboard.h @@ -0,0 +1,108 @@ +// +// 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_Clipboard.h + * @brief This is the header file for the _Clipboard class. + * + * This header file contains the declarations of the %_Clipboard class. + */ + +#ifndef _FUI_INTERNAL_CLIPBOARD_H_ +#define _FUI_INTERNAL_CLIPBOARD_H_ + +#include +#include +#include +#include "FUi_Types.h" +#include "FUi_EcoreEvas.h" +#include "FUi_ClipboardPopupEvent.h" + +namespace Tizen { namespace Base { namespace Collection { +class IList; +}}} // Tizen::Base::Collection + +namespace Tizen { namespace Ui { namespace Controls { +class _PublicClipboardPopupEvent; +}}} // Tizen::Ui::Controls + +namespace Tizen { namespace Graphics { +class Bitmap; +}} // Tizen::Graphics + +namespace Tizen { namespace Ui +{ +class _ClipboardItem; +class IClipboardPopupEventListener; +class _IClipboardPopupEventListener; + +class _Clipboard + : public Tizen::Base::Object +{ +public: + static _Clipboard* GetInstance(void); + static void ReleaseInstance(void); + + result CopyItem(const _ClipboardItem& item); + + Tizen::Base::Collection::IList* RetrieveItemsN(unsigned long dataTypes); + const _ClipboardItem* RetrieveLatestItemN(unsigned long dataTypes); + + result ShowPopup(unsigned long dataTypes, const IClipboardPopupEventListener &listener, bool internal = false); + result HidePopup(void); + bool IsPopupVisible(void); + + void FireEvent(int format, char* pData); + + result AddClipboardPopupEventListener(_IClipboardPopupEventListener& listener); + result RemoveClipboardPopupEventListener(_IClipboardPopupEventListener& listener); + + void FirePopupEvent(_ClipboardPopupState state, int width, int height); + + char* EncodeToCharN(const Tizen::Base::String& string); + +private: + _ClipFormat ConvertToClipFormat(ClipboardDataType type); + ClipboardDataType ConvertToDataType(int format, const char* pData); + + char* CreateImageFileN(const Tizen::Graphics::Bitmap& bitmap); + Tizen::Graphics::Bitmap* LoadBitmapN(const Tizen::Base::String& path); + + Tizen::Base::String CreateImageFilePath(void); + result RemoveUnnecessaryImageFiles(void); + result RemoveAllImageFiles(void); + + bool IsValidDataType(unsigned long dataTypes); + bool IsVideoDataType(const char* pChar); + bool IsAudioDataType(const char* pChar); + + _Clipboard(void); + virtual ~_Clipboard(void); + + _Clipboard(const _Clipboard& rhs); + _Clipboard& operator =(const _Clipboard& rhs); + +private: + Tizen::Ui::Controls::_PublicClipboardPopupEvent* __pPublicEvent; + std::unique_ptr<_ClipboardPopupEvent> __pEvent; + + static _Clipboard* __pInstance; +}; // _Clipboard + +}} // Tizen::Ui + +#endif // _FUI_INTERNAL_CLIPBOARD_H_ diff --git a/src/ui/FUi_ClipboardImpl.cpp b/src/ui/FUi_ClipboardImpl.cpp new file mode 100644 index 0000000..1b9d0b4 --- /dev/null +++ b/src/ui/FUi_ClipboardImpl.cpp @@ -0,0 +1,299 @@ +// +// 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_ClipboardImpl.cpp + * @brief This is the implementation file for the _ClipboardImpl class. + */ + +#include +#include +#include +#include +#include +#include +#include "FUi_ClipboardImpl.h" +#include "FUi_Clipboard.h" +#include "FUi_ClipboardItemImpl.h" +#include "FUi_ClipboardItem.h" + +using namespace Tizen::Base::Collection; + +namespace Tizen { namespace Ui +{ + +_ClipboardImpl* +_ClipboardImpl::CreateInstanceN(void) +{ + _ClipboardImpl* pClipboardImpl = new (std::nothrow) _ClipboardImpl; + SysTryReturn(NID_UI, pClipboardImpl, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + + SetLastResult(E_SUCCESS); + + return pClipboardImpl; +} + +_ClipboardImpl::~_ClipboardImpl(void) +{ +} + +_Clipboard* +_ClipboardImpl::GetCore(void) +{ + return _Clipboard::GetInstance(); +} + +const _Clipboard* +_ClipboardImpl::GetCore(void) const +{ + return _Clipboard::GetInstance(); +} + +result +_ClipboardImpl::CopyItem(const _ClipboardItemImpl& item) +{ + SysAssert(GetCore()); + + result r = GetCore()->CopyItem(item.GetCore()); + + if ((r == E_INVALID_ARG) || (r == E_SYSTEM)) + { + SysLogException(NID_UI, r, "[%s] Propagating.", GetErrorMessage(r)); + } + else if (r != E_SUCCESS) + { + r = E_SYSTEM; + SysLogException(NID_UI, r, "[E_SYSTEM] A system error occurred."); + } + + return r; +} + +Tizen::Base::Collection::IList* +_ClipboardImpl::RetrieveItemsN(unsigned long dataTypes) +{ + SysTryReturn(NID_UI, IsValidDataType(dataTypes), null, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The item of the specified data types is not found."); + SysAssert(GetCore()); + + // Get items from _Clipboard. + IList* pRetrievedList = GetCore()->RetrieveItemsN(dataTypes); + result r = GetLastResult(); + + if ((r == E_OBJ_NOT_FOUND) || (r == E_OUT_OF_MEMORY) || (r == E_SYSTEM)) + { + SysLogException(NID_UI, r, "[%s] Propagating.", GetErrorMessage(r)); + return null; + } + + SysTryReturn(NID_UI, r == E_SUCCESS, null, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + IEnumerator* pEnumerator = null; + _ClipboardItem* pItemCore = null; + ClipboardItem* pItem = null; + + // Make lists. + LinkedList* pList = new (std::nothrow) LinkedList; + SysTryCatch(NID_UI, pList, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + + pEnumerator = pRetrievedList->GetEnumeratorN(); + r = GetLastResult(); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + while (pEnumerator->MoveNext() == E_SUCCESS) + { + // [ToDo] Use a template list. + pItemCore = dynamic_cast<_ClipboardItem*>(pEnumerator->GetCurrent()); + if (pItemCore) + { + pItem = new (std::nothrow) ClipboardItem; + SysTryCatch(NID_UI, pItem, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + + r = pItem->Construct(pItemCore->GetDataType(), *(pItemCore->GetData())); + if (r != E_SUCCESS) + { + delete pItem; + SysLogException(NID_UI, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + goto CATCH; + } + + r = pList->Add(*pItem); + if (r != E_SUCCESS) + { + delete pItem; + SysLogException(NID_UI, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + goto CATCH; + } + } + } + + delete pEnumerator; + + pRetrievedList->RemoveAll(true); + delete pRetrievedList; + + SetLastResult(E_SUCCESS); + + return pList; + +CATCH: + pRetrievedList->RemoveAll(true); + delete pRetrievedList; + + if (pList) + { + pList->RemoveAll(true); + delete pList; + } + + if (pEnumerator) + { + delete pEnumerator; + } + + return null; +} + +_ClipboardItemImpl* +_ClipboardImpl::RetrieveLatestItemN(unsigned long dataTypes) +{ + SysTryReturn(NID_UI, IsValidDataType(dataTypes), null, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The item of the specified data types is not found."); + SysAssert(GetCore()); + + const _ClipboardItem* pItemCore = GetCore()->RetrieveLatestItemN(dataTypes); + result r = GetLastResult(); + + ClipboardItem* pItem = null; + _ClipboardItemImpl* pItemImpl = null; + + if ((r == E_OBJ_NOT_FOUND) || (r == E_OUT_OF_MEMORY) || (r == E_SYSTEM)) + { + SysLogException(NID_UI, r, "[%s] Propagating.", GetErrorMessage(r)); + goto CATCH; + } + else if (r != E_SUCCESS) + { + SysLogException(NID_UI, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + goto CATCH; + } + + pItem = new (std::nothrow) ClipboardItem; + SysTryCatch(NID_UI, pItem, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + + r = pItem->Construct(pItemCore->GetDataType(), *(pItemCore->GetData())); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + delete pItemCore; + + pItemImpl = _ClipboardItemImpl::GetInstance(*pItem); + + SetLastResult(E_SUCCESS); + + return pItemImpl; + +CATCH: + if (pItemCore) + { + delete pItemCore; + } + + if (pItem) + { + delete pItem; + } + + return null; +} + +result +_ClipboardImpl::ShowPopup(unsigned long dataTypes, const IClipboardPopupEventListener& listener) +{ + SysTryReturn(NID_UI, IsValidDataType(dataTypes), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + SysTryReturn(NID_UI, GetCore(), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + result r = GetCore()->ShowPopup(dataTypes, listener); + + if ((r == E_INVALID_OPERATION) || (r == E_SYSTEM)) + { + SysLogException(NID_UI, r, "[%s] Propagating.", GetErrorMessage(r)); + } + else if (r != E_SUCCESS) + { + r = E_SYSTEM; + SysLogException(NID_UI, r, "[E_SYSTEM] A system error occurred."); + } + + return r; +} + +result +_ClipboardImpl::HidePopup(void) +{ + SysTryReturn(NID_UI, GetCore(), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + result r = GetCore()->HidePopup(); + + if ((r == E_INVALID_OPERATION) || (r == E_SYSTEM)) + { + SysLogException(NID_UI, r, "[%s] Propagating.", GetErrorMessage(r)); + } + else if (r != E_SUCCESS) + { + r = E_SYSTEM; + SysLogException(NID_UI, r, "[E_SYSTEM] A system error occurred."); + } + + return r; +} + +bool +_ClipboardImpl::IsPopupVisible(void) +{ + if (GetCore() == null) + { + return false; + } + + return GetCore()->IsPopupVisible(); +} + +_ClipboardImpl* +_ClipboardImpl::GetInstance(Clipboard& clipboard) +{ + return clipboard.__pClipboardImpl; +} + +const _ClipboardImpl* +_ClipboardImpl::GetInstance(const Clipboard& clipboard) +{ + return clipboard.__pClipboardImpl; +} + +bool +_ClipboardImpl::IsValidDataType(unsigned long dataTypes) +{ + return ((CLIPBOARD_DATA_TYPE_TEXT & dataTypes) || + (CLIPBOARD_DATA_TYPE_HTML & dataTypes) || + (CLIPBOARD_DATA_TYPE_IMAGE & dataTypes) || + (CLIPBOARD_DATA_TYPE_VIDEO & dataTypes) || + (CLIPBOARD_DATA_TYPE_AUDIO & dataTypes)); +} + +_ClipboardImpl::_ClipboardImpl(void) +{ +} + +}} // Tizen::Ui diff --git a/src/ui/FUi_ClipboardImpl.h b/src/ui/FUi_ClipboardImpl.h new file mode 100644 index 0000000..0a2c9ca --- /dev/null +++ b/src/ui/FUi_ClipboardImpl.h @@ -0,0 +1,75 @@ +// +// 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_ClipboardImpl.h + * @brief This is the header file for the _ClipboardImpl class. + * + * This header file contains the declarations of the %_ClipboardImpl class. + */ + +#ifndef _FUI_INTERNAL_CLIPBOARD_IMPL_H_ +#define _FUI_INTERNAL_CLIPBOARD_IMPL_H_ + +#include + +namespace Tizen { namespace Base { namespace Collection +{ +class IList; +}}} // Tizen::Base::Collection + +namespace Tizen { namespace Ui +{ +class Clipboard; +class _ClipboardItemImpl; +class _Clipboard; +class IClipboardPopupEventListener; + +class _ClipboardImpl + : public Tizen::Base::Object +{ +public: + static _ClipboardImpl* CreateInstanceN(void); + virtual ~_ClipboardImpl(void); + + result CopyItem(const _ClipboardItemImpl& item); + + Tizen::Base::Collection::IList* RetrieveItemsN(unsigned long dataTypes); + _ClipboardItemImpl* RetrieveLatestItemN(unsigned long dataTypes); + + result ShowPopup(unsigned long dataTypes, const IClipboardPopupEventListener& listener); + result HidePopup(void); + bool IsPopupVisible(void); + + static _ClipboardImpl* GetInstance(Clipboard& clipboard); + static const _ClipboardImpl* GetInstance(const Clipboard& clipboard); + +private: + bool IsValidDataType(unsigned long dataTypes); + + _Clipboard* GetCore(void); + const _Clipboard* GetCore(void) const; + + _ClipboardImpl(void); + + _ClipboardImpl(const _ClipboardImpl& rhs); + _ClipboardImpl& operator =(const _ClipboardImpl& rhs); +}; // _ClipboardImpl + +}} // Tizen::Ui + +#endif // _FUI_INTERNAL_CLIPBOARD_IMPL_H_ diff --git a/src/ui/FUi_ClipboardItem.cpp b/src/ui/FUi_ClipboardItem.cpp new file mode 100644 index 0000000..0be7144 --- /dev/null +++ b/src/ui/FUi_ClipboardItem.cpp @@ -0,0 +1,129 @@ +// +// 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_ClipboardItem.cpp + * @brief This is the implementation file for the _ClipboardItem class. + */ + +#include +#include +#include +#include +#include +#include "FUi_ClipboardItem.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui +{ +_ClipboardItem* +_ClipboardItem::CreateInstanceN(ClipboardDataType type, const Object& data) +{ + _ClipboardItem* pItem = new (std::nothrow) _ClipboardItem(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; +} + +_ClipboardItem::~_ClipboardItem(void) +{ + if (__pString) + { + delete __pString; + __pString = null; + } + + if (__pBitmap) + { + delete __pBitmap; + __pBitmap = null; + } +} + +ClipboardDataType +_ClipboardItem::GetDataType(void) const +{ + return __type; +} + +const Object* +_ClipboardItem::GetData(void) const +{ + if (__type == CLIPBOARD_DATA_TYPE_IMAGE) + { + return __pBitmap; + } + else + { + return __pString; + } +} + +_ClipboardItem::_ClipboardItem(ClipboardDataType type, const Object& data) + : __type(type) + , __pString(null) + , __pBitmap(null) +{ + SysTryReturnVoidResult(NID_UI, + (CLIPBOARD_DATA_TYPE_TEXT & type) || + (CLIPBOARD_DATA_TYPE_HTML & type) || + (CLIPBOARD_DATA_TYPE_IMAGE & type) || + (CLIPBOARD_DATA_TYPE_VIDEO & type) || + (CLIPBOARD_DATA_TYPE_AUDIO & type) + , E_INVALID_ARG, "[E_INVALID_ARG] The data type is invalid."); + + if (type == CLIPBOARD_DATA_TYPE_IMAGE) + { + const Bitmap* pBitmap = dynamic_cast(&data); + SysTryReturnVoidResult(NID_UI, pBitmap, E_INVALID_ARG, "[E_INVALID_ARG] The data is invalid."); + + __pBitmap = new (std::nothrow) Bitmap; + SysTryReturnVoidResult(NID_UI, __pBitmap, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + + result r = __pBitmap->Construct(*pBitmap, Rectangle(0, 0, pBitmap->GetWidth(), pBitmap->GetHeight())); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + } + else + { + const String* pString = dynamic_cast(&data); + SysTryReturnVoidResult(NID_UI, pString, E_INVALID_ARG, "[E_INVALID_ARG] The data is invalid."); + + __pString = new (std::nothrow) String(*pString); + SysTryReturnVoidResult(NID_UI, __pString, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + } + + SetLastResult(E_SUCCESS); + + return; + +CATCH: + delete __pBitmap; + __pBitmap = null; +} + +}} // Tizen::Ui diff --git a/src/ui/FUi_ClipboardItem.h b/src/ui/FUi_ClipboardItem.h new file mode 100644 index 0000000..b552c48 --- /dev/null +++ b/src/ui/FUi_ClipboardItem.h @@ -0,0 +1,63 @@ +// +// 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_ClipboardItem.h + * @brief This is the header file for the _ClipboardItem class. + * + * This header file contains the declarations of the %_ClipboardItem class. + */ + +#ifndef _FUI_INTERNAL_CLIPBOARD_ITEM_H_ +#define _FUI_INTERNAL_CLIPBOARD_ITEM_H_ + +#include +#include + +namespace Tizen { namespace Graphics { +class Bitmap; +}} // Tizen::Graphics + +namespace Tizen { namespace Ui +{ +class _ClipboardItem + : public Tizen::Base::Object +{ +public: + static _ClipboardItem* CreateInstanceN(ClipboardDataType type, const Tizen::Base::Object& data); + + virtual ~_ClipboardItem(void); + + ClipboardDataType GetDataType(void) const; + const Tizen::Base::Object* GetData(void) const; + +private: + _ClipboardItem(ClipboardDataType type, const Tizen::Base::Object& data); + + _ClipboardItem(const _ClipboardItem& rhs); + _ClipboardItem& operator =(const _ClipboardItem& rhs); + +private: + ClipboardDataType __type; + + Tizen::Base::String* __pString; + Tizen::Graphics::Bitmap* __pBitmap; +}; // _ClipboardItem + +}} // Tizen::Ui + +#endif // _FUI_INTERNAL_CLIPBOARD_ITEM_H_ diff --git a/src/ui/FUi_ClipboardItemImpl.cpp b/src/ui/FUi_ClipboardItemImpl.cpp new file mode 100644 index 0000000..6f2e2d9 --- /dev/null +++ b/src/ui/FUi_ClipboardItemImpl.cpp @@ -0,0 +1,133 @@ +// +// 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_ClipboardItemImpl.cpp + * @brief This is the implementation file for the _ClipboardItemImpl class. + */ + +#include +#include +#include +#include +#include "FUi_ClipboardItemImpl.h" +#include "FUi_ClipboardItem.h" + +using namespace Tizen::Base; + +namespace Tizen { namespace Ui +{ + +_ClipboardItemImpl* +_ClipboardItemImpl::CreateInstanceN(ClipboardItem* pPublic, ClipboardDataType type, const Object& data) +{ + _ClipboardItem* pItemCore = _ClipboardItem::CreateInstanceN(type, data); + + _ClipboardItemImpl* pItemImpl = null; + + result r = GetLastResult(); + if ((r == E_OUT_OF_MEMORY) || (r == E_INVALID_ARG) || (r == E_SYSTEM)) + { + SysLogException(NID_UI, r, "[%s] Propagating.", GetErrorMessage(r)); + goto CATCH; + } + else if (r != E_SUCCESS) + { + SysLogException(NID_UI, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + goto CATCH; + } + + pItemImpl = new (std::nothrow) _ClipboardItemImpl(pPublic, pItemCore); + SysTryCatch(NID_UI, pItemImpl, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + + SetLastResult(E_SUCCESS); + + return pItemImpl; + +CATCH: + if (pItemCore) + { + delete pItemCore; + } + + return null; +} + +ClipboardDataType +_ClipboardItemImpl::GetDataType(void) const +{ + return GetCore().GetDataType(); +} + +Object* +_ClipboardItemImpl::GetData(void) const +{ + return const_cast(GetCore().GetData()); +} + +const ClipboardItem& +_ClipboardItemImpl::GetPublic(void) const +{ + return *__pPublic; +} + +ClipboardItem& +_ClipboardItemImpl::GetPublic(void) +{ + return *__pPublic; +} + +const _ClipboardItem& +_ClipboardItemImpl::GetCore(void) const +{ + return *__pCore; +} + +_ClipboardItem& +_ClipboardItemImpl::GetCore(void) +{ + return *__pCore; +} + +_ClipboardItemImpl* +_ClipboardItemImpl::GetInstance(ClipboardItem& clipboardItem) +{ + return clipboardItem.__pImpl; +} + +const _ClipboardItemImpl* +_ClipboardItemImpl::GetInstance(const ClipboardItem& clipboardItem) +{ + return static_cast (clipboardItem.__pImpl); +} + +_ClipboardItemImpl::_ClipboardItemImpl(ClipboardItem* pPublic, _ClipboardItem* pCore) + : __pPublic(pPublic) + , __pCore(pCore) +{ +} + +_ClipboardItemImpl::~_ClipboardItemImpl(void) +{ + if (__pCore) + { + delete __pCore; + __pCore = null; + } +} + +}} // Tizen::Ui diff --git a/src/ui/FUi_ClipboardItemImpl.h b/src/ui/FUi_ClipboardItemImpl.h new file mode 100644 index 0000000..ffec34f --- /dev/null +++ b/src/ui/FUi_ClipboardItemImpl.h @@ -0,0 +1,68 @@ +// +// 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_ClipboardItemImpl.h + * @brief This is the header file for the _ClipboardItemImpl class. + * + * This header file contains the declarations of the %_ClipboardItemImpl class. + */ + +#ifndef _FUI_INTERNAL_CLIPBOARD_ITEM_IMPL_H_ +#define _FUI_INTERNAL_CLIPBOARD_ITEM_IMPL_H_ + +#include +#include + +namespace Tizen { namespace Ui +{ +class ClipboardItem; +class _ClipboardItem; + +class _ClipboardItemImpl + : public Tizen::Base::Object +{ +public: + static _ClipboardItemImpl* CreateInstanceN(ClipboardItem* pPublic, ClipboardDataType type, const Tizen::Base::Object& data); + + virtual ~_ClipboardItemImpl(void); + + ClipboardDataType GetDataType(void) const; + Tizen::Base::Object* GetData(void) const; + + static _ClipboardItemImpl* GetInstance(ClipboardItem& clipboardItem); + static const _ClipboardItemImpl* GetInstance(const ClipboardItem& clipboardItem); + + const ClipboardItem& GetPublic(void) const; + ClipboardItem& GetPublic(void); + const _ClipboardItem& GetCore(void) const; + _ClipboardItem& GetCore(void); + +private: + _ClipboardItemImpl(ClipboardItem* pPublic, _ClipboardItem* pCore); + + _ClipboardItemImpl(const _ClipboardItemImpl& rhs); + _ClipboardItemImpl& operator =(const _ClipboardItemImpl& rhs); + +private: + ClipboardItem* __pPublic; + _ClipboardItem* __pCore; +}; // _ClipboardItemImpl + +}} // Tizen::Ui + +#endif // _FUI_INTERNAL_CLIPBOARD_ITEM_IMPL_H_ diff --git a/src/ui/FUi_ClipboardPopupEvent.cpp b/src/ui/FUi_ClipboardPopupEvent.cpp new file mode 100644 index 0000000..616b4aa --- /dev/null +++ b/src/ui/FUi_ClipboardPopupEvent.cpp @@ -0,0 +1,156 @@ +// +// 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_ClipboardPopupEvent.cpp + * @brief This is the implementation for the _ClipboardPopupEvent class. + * @version 1.0 + */ + +#include +#include +#include +#include +#include "FUi_ClipboardPopupEvent.h" + +using namespace std; +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui +{ +/** + * @class _ClipboardPopupEventArg + * @brief This class is used as the argument to clipboard-popup event listener. + * + */ +class _ClipboardPopupEventArg + : public Tizen::Base::Runtime::IEventArg + , public Tizen::Base::Object +{ +public: + _ClipboardPopupEventArg(_ClipboardPopupState clipboardPopupState, Dimension& clipboardPopupSize); + + virtual ~_ClipboardPopupEventArg(void); + + _ClipboardPopupState GetClipboardPopupState(void) const; + Dimension GetClipboardPopupSize(void) const; + +private: + _ClipboardPopupEventArg(const _ClipboardPopupEventArg& rhs); + _ClipboardPopupEventArg& operator =(const _ClipboardPopupEventArg& rhs); + +private: + _ClipboardPopupState __clipboardPopupState; + Dimension __clipboardPopupSize; +}; // _ClipboardPopupEventArg + +_ClipboardPopupEventArg::_ClipboardPopupEventArg(_ClipboardPopupState clipboardPopupState, Dimension& clipboardPopupSize) + : __clipboardPopupState(clipboardPopupState) + , __clipboardPopupSize(clipboardPopupSize) +{ +} + +_ClipboardPopupEventArg::~_ClipboardPopupEventArg(void) +{ +} + +_ClipboardPopupState +_ClipboardPopupEventArg::GetClipboardPopupState(void) const +{ + return __clipboardPopupState; +} + +Dimension +_ClipboardPopupEventArg::GetClipboardPopupSize(void) const +{ + return __clipboardPopupSize; +} + +_ClipboardPopupEvent* +_ClipboardPopupEvent::CreateInstanceN(void) +{ + unique_ptr<_ClipboardPopupEvent> pClipboardPopupEvent(new (std::nothrow) _ClipboardPopupEvent()); + SysTryReturn(NID_UI, pClipboardPopupEvent, 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 pClipboardPopupEvent.release(); +} + +IEventArg* +_ClipboardPopupEvent::CreateClipboardPopupEventArgN(_ClipboardPopupState clipboardPopupState, Dimension& clipboardPopupSize) +{ + ClearLastResult(); + + unique_ptr<_ClipboardPopupEventArg> pClipboardPopupEventArg(new (std::nothrow) _ClipboardPopupEventArg(clipboardPopupState, clipboardPopupSize)); + SysTryReturn(NID_UI, pClipboardPopupEventArg, 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)); + + return pClipboardPopupEventArg.release(); +} + +_ClipboardPopupEvent::~_ClipboardPopupEvent(void) +{ +} + +void +_ClipboardPopupEvent::FireImpl(IEventListener& listener, const IEventArg& arg) +{ + _IClipboardPopupEventListener* pEventListener = dynamic_cast <_IClipboardPopupEventListener*>(&listener); + SysTryReturnVoidResult(NID_UI, pEventListener, E_INVALID_ARG, "[E_INVALID_ARG] A specified input parameter is invalid."); + + const _ClipboardPopupEventArg* pArg = dynamic_cast (&arg); + SysTryReturnVoidResult(NID_UI, pArg, E_INVALID_ARG, "[E_INVALID_ARG] A specified input parameter is invalid."); + + _ClipboardPopupState state = pArg->GetClipboardPopupState(); + Dimension clipboardPopupSize = pArg->GetClipboardPopupSize(); + + switch (state) + { + case _CLIPBOARD_POPUP_STATE_OPENED: + pEventListener->OnClipboardPopupOpened(clipboardPopupSize); + break; + case _CLIPBOARD_POPUP_STATE_CLOSED: + pEventListener->OnClipboardPopupClosed(); + break; + case _CLIPBOARD_POPUP_STATE_BOUNDS_CHANGED: + pEventListener->OnClipboardPopupBoundsChanged(clipboardPopupSize); + break; + default: + SysLogException(NID_UI, E_INVALID_ARG, "[E_INVALID_ARG] The invalid argument is given."); + break; + } + + SetLastResult(E_SUCCESS); +} + +_ClipboardPopupEvent::_ClipboardPopupEvent(void) +{ + result r = _Event::Initialize(); + SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + SetLastResult(E_SUCCESS); +} + +}} // Tizen::Ui diff --git a/src/ui/FUi_ContainerImpl.cpp b/src/ui/FUi_ContainerImpl.cpp new file mode 100644 index 0000000..6960b3d --- /dev/null +++ b/src/ui/FUi_ContainerImpl.cpp @@ -0,0 +1,958 @@ +// +// 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_ContainerImpl.cpp + * @brief This is the implementation file for _ContainerImpl class. + */ + +#include +#include +#include +#include "FUi_ContainerImpl.h" +#include "FUi_WindowImpl.h" +#include "FUi_Control.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_LayoutImpl.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui { + +_ContainerImpl* +_ContainerImpl::CreateContainerImplN(Container* pPublic) +{ + ClearLastResult(); + + _Control* pCore = _Control::CreateControlN(); + result r = GetLastResult(); + SysTryReturn(NID_UI, pCore, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + _ContainerImpl* pImpl = new (std::nothrow) _ContainerImpl(pPublic, pCore); + r = CheckConstruction(pCore, pImpl); + SysTryReturn(NID_UI, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + return pImpl; +} + +_ContainerImpl* +_ContainerImpl::CreateContainerImplN(Container* pPublic, const Rectangle& bounds, + const Layout* pPublicPortraitLayout, const Layout* pPublicLandscapeLayout, + bool resizable, bool movable) +{ + result r = E_SUCCESS; + + _Control* pCore = _Control::CreateControlN(); + SysTryReturn(NID_UI, pCore, null, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + _ContainerImpl* pImpl = + new (std::nothrow) _ContainerImpl(pPublic, pCore, bounds, + pPublicPortraitLayout, pPublicLandscapeLayout, + resizable, movable); + r = CheckConstruction(pCore, pImpl); + SysTryReturn(NID_UI, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + ClearLastResult(); + + return pImpl; +} + +_ContainerImpl* +_ContainerImpl::CreateContainerImplN(Container* pPublic, const FloatRectangle& bounds, + const Layout* pPublicPortraitLayout, const Layout* pPublicLandscapeLayout, + bool resizable, bool movable) +{ + result r = E_SUCCESS; + + _Control* pCore = _Control::CreateControlN(); + SysTryReturn(NID_UI, pCore, null, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + _ContainerImpl* pImpl = + new (std::nothrow) _ContainerImpl(pPublic, pCore, bounds, + pPublicPortraitLayout, pPublicLandscapeLayout, + resizable, movable); + r = CheckConstruction(pCore, pImpl); + SysTryReturn(NID_UI, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + ClearLastResult(); + + return pImpl; +} + +_ContainerImpl* +_ContainerImpl::GetInstance(Container& container) +{ + return static_cast <_ContainerImpl*> (container._pControlImpl); +} + +const _ContainerImpl* +_ContainerImpl::GetInstance(const Container& container) +{ + return static_cast (container._pControlImpl); +} + +_ContainerImpl::~_ContainerImpl(void) +{ + if (!HasCore()) + { + return; + } + + RemoveAllChildren(true); +} + +const char* +_ContainerImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Container"; +} + +const Container& +_ContainerImpl::GetPublic(void) const +{ + return static_cast (_ControlImpl::GetPublic()); +} + +Container& +_ContainerImpl::GetPublic(void) +{ + return static_cast (_ControlImpl::GetPublic()); +} + +// E_INVALID_ARG, E_OUT_OF_MEMORY +result +_ContainerImpl::AddChild(_ControlImpl* pChild, bool transferOwnership) +{ + ClearLastResult(); + result r = E_SUCCESS; + + SysTryReturn(NID_UI, + pChild != null, E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] The specified child is not constructed."); + + SysTryReturn(NID_UI, + IsChildAttachable(*pChild), E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] %s cannot be a child of %s.", + pChild->GetPublicClassName(), GetPublicClassName()); + + _ContainerImpl* pOldParent = pChild->GetParent(); + + SysTryReturn(NID_UI, + (pOldParent != this), E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] The child control is already attached to this container."); + + SysTryReturn(NID_UI, + pOldParent == null, E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] Unable to add the child which already has another parent."); + + r = __controlPublics.Add(pChild->GetPublic()); + if (IsFailed(r)) + { + SysAssert(r == E_OUT_OF_MEMORY); // I can't beleve Tizen::Base. + SysLogException(NID_UI, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + return E_OUT_OF_MEMORY; + } + + 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; +} + +result +_ContainerImpl::Destroy(void) +{ + result r = E_SUCCESS; + + _ContainerImpl* pParent = GetParent(); + if (pParent) + { + r = pParent->RemoveChild(this, false); + } + else + { + _Control* pParent = GetCore().GetParent(); + if (pParent) + { + pParent->DetachChild(GetCore()); + } + } + RemoveAllChildren(true); + Container* pContainer = &GetPublic(); + delete pContainer; + pContainer = null; + + return r; +} + +result +_ContainerImpl::RemoveControl(_ControlImpl* pChild, bool deallocate) +{ + ClearLastResult(); + result r = E_SUCCESS; + + _ContainerImpl* pChildContainer = dynamic_cast <_ContainerImpl*>(pChild); + if (pChildContainer) + { + _ContainerImpl* pParent = pChildContainer->GetParent(); + SysTryReturn(NID_UI, pParent, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The control is not a child of this container."); + + r = pParent->RemoveChild(pChildContainer, false); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + pChildContainer->RemoveAllChildren(true); + r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + if (deallocate) + { + Container* pContainer = &pChildContainer->GetPublic(); + delete pContainer; + pContainer = null; + } + } + else + { + SysTryReturn(NID_UI, pChild, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The specified child is not constructed."); + r = RemoveChild(pChild, deallocate); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + return r; +} + +result +_ContainerImpl::RemoveChild(_ControlImpl* pChild, bool deallocate) +{ + ClearLastResult(); + result r = E_SUCCESS; + + SysTryReturn(NID_UI, + pChild != null, E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] The specified child is not constructed."); + + if (pChild->GetCore().GetArea() == _CONTROL_AREA_SYSTEM) + { + return E_SUCCESS; + } + + GetChildIndex(pChild); + r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GetCore().DetachChild(pChild->GetCore()); + SysAssert(r == E_SUCCESS); + + r = __controlPublics.Remove(pChild->GetPublic(), deallocate); + SysAssert(r == E_SUCCESS); + + return E_SUCCESS; +} + +result +_ContainerImpl::RemoveControl(int index) +{ + ClearLastResult(); + result r = E_SUCCESS; + + _ControlImpl* pChild = GetChild(index); // Find child control. + r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _ContainerImpl* pChildContainer = dynamic_cast <_ContainerImpl*>(pChild); + if (pChildContainer) + { + _ContainerImpl* pParent = pChildContainer->GetParent(); + if (pParent) + { + r = pParent->RemoveChild(pChildContainer, false); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + pChildContainer->RemoveAllChildren(true); + r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + Container* pContainer = &pChildContainer->GetPublic(); + delete pContainer; + pContainer = null; + } + else + { + r = RemoveChild(index); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + return r; +} + +result +_ContainerImpl::RemoveChild(int index) +{ + ClearLastResult(); + result r = E_SUCCESS; + + _ControlImpl* pChild = GetChild(index); // Find child control. + r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + SysAssert(pChild); + SysTryReturn(NID_UI, pChild, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] The child to remove is null."); + + GetCore().DetachChild(pChild->GetCore()); + SysAssert(GetLastResult() == E_SUCCESS); + + r = __controlPublics.Remove(pChild->GetPublic(), true); + SysAssert(r == E_SUCCESS); + + return E_SUCCESS; +} + +void +_ContainerImpl::DeleteAllChildren(_ContainerImpl* pChild, bool detachSystemChild, ArrayList* pChildrenList) +{ + ArrayList* pList = static_cast (pChild->GetChildrenPublic()); + int count = pList->GetCount(); + for (int index = count - 1; index >= 0; index--) + { + Control* pControl = static_cast (pList->GetAt(index)); + if (pControl) + { + Container* pContainer = dynamic_cast (pControl); + result r = GetLastResult(); + if (IsFailed(r)) + { + SysAssert(r == E_OUT_OF_RANGE); + SysLogException(NID_UI, + E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The specified index is out of range (index = %d, count = %d.)", + index, GetChildCount()); + return; + } + + if (pContainer) + { + _ContainerImpl* pContainerImpl = _ContainerImpl::GetInstance(*pContainer); + ArrayList* pContainerChildrenList = static_cast (pContainerImpl->GetChildrenPublic()); + int childrenCount = pContainerChildrenList->GetCount(); + + if (childrenCount > 0) + { + DeleteAllChildren(pContainerImpl, detachSystemChild, pContainerChildrenList); + } + r = pChildrenList->Remove(*pContainer, true); + SysAssert(r == E_SUCCESS); + } + else + { + _ControlImpl* pControlImpl = _ControlImpl::GetInstance(*pControl); + if (pControlImpl) + { + if (detachSystemChild || pControlImpl->GetCore().GetArea() != _CONTROL_AREA_SYSTEM) + { + r = pChildrenList->Remove(*pControl, true); + SysAssert(r == E_SUCCESS); + } + } + } + } + } +} + +void +_ContainerImpl::RemoveAllChildren(bool detachSystemChild, bool callOnDetachingFromMaintree) +{ + if (callOnDetachingFromMaintree && !GetCore().IsPostOrderTraversal()) + { + GetCore().GetControlDelegate().OnDetachingFromMainTree(); + } + GetCore().DetachAllChildren(detachSystemChild, true); + SysAssert(GetLastResult() == E_SUCCESS); + if (callOnDetachingFromMaintree && GetCore().IsPostOrderTraversal()) + { + GetCore().GetControlDelegate().OnDetachingFromMainTree(); + } + ArrayList* pChildrenList = static_cast (GetChildrenPublic()); + DeleteAllChildren(this, detachSystemChild, pChildrenList); +} + +result +_ContainerImpl::MoveChildToTop(const _ControlImpl& child) +{ + ClearLastResult(); + result r = E_SUCCESS; + + SysTryReturn(NID_UI, + child.GetParent() == this, E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] Not my child."); + + r = GetCore().MoveChildToTop(child.GetCore()); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __controlPublics.Remove(child.GetPublic()); + SysAssert(r == E_SUCCESS); + + r = __controlPublics.Add(child.GetPublic()); + SysAssert(r == E_SUCCESS); + + return E_SUCCESS; +} + +result +_ContainerImpl::MoveChildBefore(const _ControlImpl& targetChild, const _ControlImpl& child) +{ + ClearLastResult(); + result r = E_SUCCESS; + int index = -1; + + SysTryReturn(NID_UI, + targetChild.GetParent() == this, E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] Not my targetChild."); + + SysTryReturn(NID_UI, + child.GetParent() == this, E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] Not my child."); + + r = GetCore().MoveChildBefore(targetChild.GetCore(), child.GetCore()); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __controlPublics.Remove(child.GetPublic()); + SysAssert(r == E_SUCCESS); + + r = __controlPublics.IndexOf(targetChild.GetPublic(), index); + SysAssert(r == E_SUCCESS); + + r = __controlPublics.InsertAt(child.GetPublic(), index); + SysAssert(r == E_SUCCESS); + + return E_SUCCESS; +} + +Tizen::Base::Collection::IList* +_ContainerImpl::GetChildrenPublic(void) const +{ + ClearLastResult(); + return const_cast (&__controlPublics); +} + +// E_OUT_OF_RANGE +_ControlImpl* +_ContainerImpl::GetChild(int index) const +{ + ClearLastResult(); + + const Control* pControl = static_cast (__controlPublics.GetAt(index)); + result r = GetLastResult(); + if (IsFailed(r)) + { + SysAssert(r == E_OUT_OF_RANGE); // I can't beleve Tizen::Base. + SysLogException(NID_UI, + E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The specified index is out of range (index = %d, count = %d.)", + index, GetChildCount()); + + return null; + } + + SysAssert(pControl); + + return const_cast <_ControlImpl*>(_ControlImpl::GetInstance(*pControl)); +} + +_ControlImpl* +_ContainerImpl::SearchControlByName(const Tizen::Base::String& name, bool recursive, bool searchMyself) const +{ + ClearLastResult(); + + if (searchMyself == true || (_AppInfo::GetApiVersion() == _API_VERSION_2_0 && _AppInfo::IsOspCompat())) + { + if (name.CompareTo(GetName()) == 0) + { + return const_cast <_ContainerImpl*>(this); + } + } + + _ControlImpl* pChildFound = null; + for (int i = 0; i < __controlPublics.GetCount(); ++i) + { + _ControlImpl* pChild = GetChild(i); + + SysAssert(pChild); + if (pChild == null) + { + continue; + } + + _ContainerImpl* pChildAsContainer = dynamic_cast <_ContainerImpl*>(pChild); + if (pChildAsContainer && recursive) + { + pChildFound = pChildAsContainer->SearchControlByName(name, true, true); + if (pChildFound != null) + { + break; + } + } + else if (name.CompareTo(pChild->GetName()) == 0) + { + pChildFound = pChild; + break; + } + } + + return pChildFound; +} + +// [ToDo] Check if the public Container leaves the out-param index as it is. +int +_ContainerImpl::GetChildIndex(const _ControlImpl* pChild) const +{ + int index = -1; + + result r = __controlPublics.IndexOf(pChild->GetPublic(), index); + if (IsFailed(r)) + { + SysAssert(r == E_OBJ_NOT_FOUND); + SysLogException(NID_UI, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The control is not a child of this container."); + return -1; + } + + return index; +} + +int +_ContainerImpl::GetChildCount(void) const +{ + ClearLastResult(); + return __controlPublics.GetCount(); +} + +Layout* +_ContainerImpl::GetPublicPortraitLayoutN(void) const +{ + ClearLastResult(); + + Layout* pLayout = _LayoutImpl::CreatePublicLayoutN(__portraitLayout); + result r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + return pLayout; +} + +Layout* +_ContainerImpl::GetPublicLandscapeLayoutN(void) const +{ + ClearLastResult(); + + Layout* pLayout = _LayoutImpl::CreatePublicLayoutN(__landscapeLayout); + result r = GetLastResult(); + SysTryReturn(NID_UI, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + return pLayout; +} + +Layout* +_ContainerImpl::GetPublicLayoutN(void) const +{ + return (GetCore().GetOrientation() == _CONTROL_ORIENTATION_LANDSCAPE) ? + GetPublicLandscapeLayoutN() : GetPublicPortraitLayoutN(); +} + +result +_ContainerImpl::SetChildAt(const _ControlImpl* pChild, int index) +{ + ClearLastResult(); + result r = E_SUCCESS; + + SysTryReturn(NID_UI, + pChild, E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] The specified child is not constructed."); + + // In API 2.0, (0 <= index) was not checked but checked at the ArrayList::SetAt(). + // So, I check the case here. No problem. + SysTryReturn(NID_UI, + (0 <= index && index < GetCore().GetChildCount()), E_OUT_OF_RANGE, + E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The specified index is out of range (index = %d, count = %d)", + index, GetCore().GetChildCount()); + + // [ToDo] 2.0 bug: The error should be E_INVALID_ARG. + // And I think this must be checked before the range check. + _ContainerImpl* pParent = pChild->GetParent(); + SysTryReturn(NID_UI, + pParent == this, E_SYSTEM, + E_SYSTEM, "[E_SYSTEM] The container is not the parent of the specified control."); + + int oldIndex = GetCore().GetChildIndex(pChild->GetCore()); + SysAssert(GetLastResult() == E_SUCCESS); + + if (index == oldIndex) + { + return E_SUCCESS; + } + + r = __controlPublics.SetAt(pChild->GetPublic(), index); + SysAssert(r == E_SUCCESS); + + _Control* pTargetChild = GetCore().GetChild(index); + SysAssert(pTargetChild); + + r = GetCore().MoveChildBefore(*pTargetChild, pChild->GetCore()); + SysAssert(r == E_SUCCESS); + + return E_SUCCESS; +} + +bool +_ContainerImpl::IsAncestorOf(const _ControlImpl* pChild) const +{ + SysTryReturn(NID_UI, pChild, false, E_INVALID_ARG, "[E_INVALID_ARG] The specified child is not constructed."); + return GetCore().IsAncestorOf(pChild->GetCore()); +} + +void +_ContainerImpl::OnDraw(void) +{ + GetPublic().OnClearBackground(); + + if (_AppInfo::GetApiVersion() == _API_VERSION_2_0 && _AppInfo::IsOspCompat()) + { + GetCore().OnDraw(); + } + + GetPublic().OnDraw(); +} + +void +_ContainerImpl::OnChangeLayout(_ControlOrientation orientation) +{ + result r = E_SUCCESS; + + if (orientation == _CONTROL_ORIENTATION_PORTRAIT && !__portraitLayout.IsNull()) + { + r = GetCore().SetCurrentLayout(__portraitLayout->GetCore()); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] Failed to set up the current layout as portrait"); + } + else if (orientation == _CONTROL_ORIENTATION_LANDSCAPE && !__landscapeLayout.IsNull()) + { + r = GetCore().SetCurrentLayout(__landscapeLayout->GetCore()); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] Failed to set up the current layout as landscape."); + } + _ControlImpl::OnChangeLayout(orientation); +} + +void +_ContainerImpl::OnVisibleStateChanging(void) +{ + GetPublic().OnShowStateChanging(GetVisibleState()); + _ControlImpl::OnVisibleStateChanging(); +} + +void +_ContainerImpl::OnVisibleStateChanged(void) +{ + _ControlImpl::OnVisibleStateChanged(); + GetPublic().OnShowStateChanged(GetVisibleState()); +} + +result +_ContainerImpl::OnBoundsChanging(const Rectangle& bounds) +{ + _ContainerImpl* pChild = _ContainerImpl::GetInstance(GetPublic()); + if (pChild) + { + GetPublic().OnBoundsChanging(_CoordinateSystemUtils::ConvertToInteger(__oldBounds), bounds); + } + + return _ControlImpl::OnBoundsChanging(bounds); +} + +result +_ContainerImpl::OnBoundsChanging(const FloatRectangle& bounds) +{ + _ContainerImpl* pChild = _ContainerImpl::GetInstance(GetPublic()); + if (pChild) + { + GetPublic().OnBoundsChanging(__oldBounds, bounds); + } + return _ControlImpl::OnBoundsChanging(bounds); +} + +void +_ContainerImpl::OnBoundsChanged(void) +{ + _ControlImpl::OnBoundsChanged(); + _ContainerImpl* pChild = _ContainerImpl::GetInstance(GetPublic()); + if (pChild) + { + GetPublic().OnBoundsChanged(_CoordinateSystemUtils::ConvertToInteger(__oldBounds), GetBounds()); + GetPublic().OnBoundsChanged(__oldBounds, GetBoundsF()); + } +} + +void +_ContainerImpl::OnEvaluateSize(Dimension& evaluatedSize) +{ + _ContainerImpl* pChild = _ContainerImpl::GetInstance(GetPublic()); + if (pChild) + { + GetPublic().OnEvaluateSize(evaluatedSize); + } + _ControlImpl::OnEvaluateSize(evaluatedSize); +} + +bool +_ContainerImpl::OnEvaluateSize(FloatDimension& evaluatedSize) +{ + _ContainerImpl* pChild = _ContainerImpl::GetInstance(GetPublic()); + bool changed = false; + if (pChild) + { + changed = GetPublic().OnEvaluateSize(evaluatedSize); + } + _ControlImpl::OnEvaluateSize(evaluatedSize); + return changed; +} + +void +_ContainerImpl::CallOnDraw(void) +{ + if (!_AppInfo::IsOspCompat()) + { + GetCore().OnDraw(); + } +} + +void +_ContainerImpl::Initialize(Control* pPublic, _Control* pCore, const Layout* pPublicPortraitLayout, const Layout* pPublicLandscapeLayout) +{ + result r = GetLastResult(); + if (IsFailed(r)) + { + return; + } + + _SharedPtr spPortraitLayout; + _SharedPtr spLandscapeLayout; + + // Check if all or none + SysAssert( + (pPublicPortraitLayout && pPublicLandscapeLayout) || + (!pPublicPortraitLayout && !pPublicLandscapeLayout) + ); + + if (pPublicPortraitLayout) + { + r = SetLayout(*pCore, _CONTROL_ORIENTATION_PORTRAIT, pPublicPortraitLayout); + if (IsFailed(r)) + { + return; + } + + r = pCore->SetCurrentLayout(__portraitLayout->GetCore()); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] Failed to set up the current layout."); + } + + if (pPublicLandscapeLayout) + { + r = SetLayout(*pCore, _CONTROL_ORIENTATION_LANDSCAPE, pPublicLandscapeLayout); + if (IsFailed(r)) + { + return; + } + } +} + +_ContainerImpl::_ContainerImpl(Control* pPublic, _Control* pCore, const Layout* pPublicPortraitLayout, const Layout* pPublicLandscapeLayout) + : _ControlImpl(pPublic, pCore) +{ + Initialize(pPublic, pCore, pPublicPortraitLayout, pPublicLandscapeLayout); +} + +_ContainerImpl::_ContainerImpl(Control* pPublic, _Control* pCore, const Rectangle& bounds, const Layout* pPublicPortraitLayout, const Layout* pPublicLandscapeLayout, bool resizable, bool movable) + : _ControlImpl(pPublic, pCore) +{ + result r = E_SUCCESS; + + Initialize(pPublic, pCore, pPublicPortraitLayout, pPublicLandscapeLayout); + + r = GetLastResult(); + if (IsFailed(r)) + { + return; + } + + bool allOrNone = (pPublicPortraitLayout && pPublicLandscapeLayout) || (!pPublicPortraitLayout && !pPublicLandscapeLayout); + SysAssert(allOrNone); + + r = SetBounds(bounds); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + pCore->SetResizable(resizable); + pCore->SetMovable(movable); +} + +_ContainerImpl::_ContainerImpl(Control* pPublic, _Control* pCore, const FloatRectangle& bounds, const Layout* pPublicPortraitLayout, const Layout* pPublicLandscapeLayout, bool resizable, bool movable) + : _ControlImpl(pPublic, pCore) +{ + result r = E_SUCCESS; + + Initialize(pPublic, pCore, pPublicPortraitLayout, pPublicLandscapeLayout); + + r = GetLastResult(); + if (IsFailed(r)) + { + return; + } + + bool allOrNone = (pPublicPortraitLayout && pPublicLandscapeLayout) || (!pPublicPortraitLayout && !pPublicLandscapeLayout); + SysAssert(allOrNone); + + r = SetBounds(bounds); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + pCore->SetResizable(resizable); + pCore->SetMovable(movable); +} + +result +_ContainerImpl::SetLayout(_Control& core, _ControlOrientation orientation, const Layout* pPublicLayout) +{ + SysAssert(pPublicLayout); + + result r = E_SUCCESS; + + const char* orientationStatus = (orientation == _CONTROL_ORIENTATION_PORTRAIT) ? + "portrait" : "landscape"; + + _SharedPtr & spLayout = (orientation == _CONTROL_ORIENTATION_PORTRAIT) ? + __portraitLayout : __landscapeLayout; + + spLayout = _LayoutImpl::GetLayoutImpl(const_cast (pPublicLayout)); + SysTryReturn(NID_UI, + !spLayout.IsNull(), E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] The %s layout is invalid object", orientationStatus); + + r = core.AddLayout(spLayout->GetCore()); + if (IsFailed(r)) + { + switch (r) + { + case E_INVALID_ARG: + SysLogException(NID_UI, E_INVALID_ARG, "[E_INVALID_ARG] The %s layout is already used.", orientationStatus); + break; + default: + SysLogException(NID_UI, E_SYSTEM, "[E_SYSTEM] Failed to add the %s layout.", orientationStatus); + } + + return r; + } + + return E_SUCCESS; +} + +bool +_ContainerImpl::IsChildAttachable(_ControlImpl& child) const +{ + if (dynamic_cast <_WindowImpl*>(&child) != null) + { + return false; + } + + return true; +} + + +result +_ContainerImpl::SetControlAlwaysOnTop(Control& control, bool alwaysOnTop) +{ + _ControlImpl* pChild = _ControlImpl::GetInstance(control); + SysTryReturn(NID_UI, + pChild, E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] The specified chlid control is not constructed."); + + _Control& childCore = pChild->GetCore(); + const bool atBottom = childCore.GetLayer() == _CONTROL_LAYER_CLIENT_BOTTOM; + + if (atBottom && !alwaysOnTop) + { + SysLogException(NID_UI, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The bottom child cannot be reset."); + return E_INVALID_OPERATION; + } + + return alwaysOnTop ? + GetCore().SetChildAlwaysOnTop(childCore) : + GetCore().ResetChildLayer(childCore); +} + +result +_ContainerImpl::SetControlAlwaysAtBottom(Control& control, bool alwaysAtBottom) +{ + _ControlImpl* pChild = _ControlImpl::GetInstance(control); + SysTryReturn(NID_UI, + pChild, E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] The specified chlid control is not constructed."); + + _Control& childCore = pChild->GetCore(); + const bool onTop = childCore.GetLayer() == _CONTROL_LAYER_CLIENT_TOP; + + if (onTop && !alwaysAtBottom) + { + SysLogException(NID_UI, E_INVALID_OPERATION, "[E_INVALID_OPERATION] The top child cannot be reset."); + return E_INVALID_OPERATION; + } + + return alwaysAtBottom ? + GetCore().SetChildAlwaysAtBottom(childCore) : + GetCore().ResetChildLayer(childCore); +} + +bool +_ContainerImpl::IsControlAlwaysAtBottom(const Control& control) const +{ + const _ControlImpl* pChild = _ControlImpl::GetInstance(control); + SysTryReturn(NID_UI, + pChild, false, + E_INVALID_ARG, "[E_INVALID_ARG] The specified chlid control is not constructed."); + + SysTryReturn(NID_UI, + pChild->GetParent() == this, false, + E_INVALID_ARG, "[E_INVALID_ARG] The specified chlid control is not a child of this container."); + + return pChild->GetCore().GetLayer() == _CONTROL_LAYER_CLIENT_BOTTOM; +} + +bool +_ContainerImpl::IsControlAlwaysOnTop(const Control& control) const +{ + const _ControlImpl* pChild = _ControlImpl::GetInstance(control); + SysTryReturn(NID_UI, + pChild, false, + E_INVALID_ARG, "[E_INVALID_ARG] The specified chlid control is not constructed."); + + SysTryReturn(NID_UI, + pChild->GetParent() == this, false, + E_INVALID_ARG, "[E_INVALID_ARG] The specified chlid control is not a child of this container."); + + return pChild->GetCore().GetLayer() == _CONTROL_LAYER_CLIENT_TOP; +} + +}} //Tizen::Ui diff --git a/src/ui/FUi_Control.cpp b/src/ui/FUi_Control.cpp new file mode 100644 index 0000000..111700d --- /dev/null +++ b/src/ui/FUi_Control.cpp @@ -0,0 +1,5916 @@ +// +// 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_Control.cpp + * @brief This is the implementation file for the _Control class. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "FUi_Math.h" +#include "FUi_Control.h" +#include "FUi_ControlManager.h" +#include "FUi_FocusManagerImpl.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_Window.h" +#include "FUi_EcoreEvasMgr.h" +#include "FUi_EcoreEvas.h" +#include "FUi_LayoutLayoutContainer.h" +#include "FUi_LayoutAbsoluteLayout.h" +#include "FUi_LayoutILayoutItemHandler.h" +#include "FUi_TouchManager.h" +#include "FUi_DataBindingContext.h" +#include "FUi_TouchLongPressGestureDetector.h" +#include "FUi_TouchTapGestureDetector.h" +#include "FUi_AccessibilityContainer.h" +#include "FUi_ResourceManager.h" +#include "FUiAnim_ControlVisualElement.h" +#include "FUiAnim_Debug.h" +#include "FUiAnim_VisualElement.h" +#include "FUiAnim_VisualElementImpl.h" +#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; +using namespace Tizen::Base::Collection; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Animations; +using namespace Tizen::Ui::Controls; + +namespace { + +int +GetZOrderGroupOfVisualElement(_ControlLayer layer) +{ + switch (layer) + { + case _CONTROL_LAYER_OVERLAY: + return _ControlVisualElement::Z_ORDER_GROUP_CONTROL - 1; + case _CONTROL_LAYER_CLIENT_BOTTOM: + return _ControlVisualElement::Z_ORDER_GROUP_CONTROL; + case _CONTROL_LAYER_NONE: + // fall through + case _CONTROL_LAYER_CLIENT_MIDDLE: + return _ControlVisualElement::Z_ORDER_GROUP_CONTROL + 1; + case _CONTROL_LAYER_CLIENT_TOP: + return _ControlVisualElement::Z_ORDER_GROUP_CONTROL + 2; + case _CONTROL_LAYER_SYSTEM: + return _ControlVisualElement::Z_ORDER_GROUP_CONTROL + 3; + default: + SysAssert(false); + return _ControlVisualElement::Z_ORDER_GROUP_CONTROL + 1; + } +} + +inline bool +AdjustSizeToRange(float& width, float& height, const FloatDimension& minDim, const FloatDimension& maxDim) +{ + bool changed = false; + if (width < minDim.width) + { + width = minDim.width; + changed = true; + } + if (height < minDim.height) + { + height = minDim.height; + changed = true; + } + + if (width > maxDim.width) + { + width = maxDim.width; + changed = true; + } + if (height > maxDim.height) + { + height = maxDim.height; + changed = true; + } + + return changed; +} + +inline bool +AdjustSizeToRange(FloatDimension& dim, const FloatDimension& minDim, const FloatDimension& maxDim) +{ + return AdjustSizeToRange(dim.width, dim.height, minDim, maxDim); +} + +// E_OUT_OF_MEMORY +// E_SYSTEM +_ControlVisualElement* +CreateVisualElementN(void) +{ + ClearLastResult(); + + _ControlVisualElement* pVisualElement = new (std::nothrow) _ControlVisualElement; + SysTryReturn(NID_UI, pVisualElement, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + SysTryCatch(NID_UI, + pVisualElement->ConstructControlVisualElement() == E_SUCCESS, , + E_SYSTEM, "[E_SYSTEM] System error occurred."); + + pVisualElement->SetImplicitAnimationEnabled(false); + pVisualElement->SetShowState(true); + pVisualElement->SetBackBufferEnabled(true); + pVisualElement->SetRedrawOnResizeEnabled(true); + pVisualElement->SetSurfaceOpaque(false); + + return pVisualElement; + +CATCH: + //delete pVisualElement; + pVisualElement->Destroy(); + return null; +} + +_Control::GestureMap* +CreateGestureMapN(void) +{ + ClearLastResult(); + + _Control::GestureMap* pGestureMap = new (std::nothrow) _Control::GestureMap; + SysTryReturn(NID_UI, pGestureMap, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + SysTryCatch(NID_UI, + pGestureMap->Construct() == E_SUCCESS, , + E_SYSTEM, "[E_SYSTEM] System error occurred."); + + return pGestureMap; + +CATCH: + delete pGestureMap; + return null; +} + +// E_OUT_OF_MEMORY +_Control::ControlList* +CreateControlListN(void) +{ + ClearLastResult(); + + _Control::ControlList* pControlList = new (std::nothrow) _Control::ControlList; + SysTryReturn(NID_UI, pControlList, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + return pControlList; +} + +// E_OUT_OF_MEMORY +_Control::WindowList* +CreateWindowListN(void) +{ + ClearLastResult(); + + _Control::WindowList* pWindowList = new (std::nothrow) _Control::WindowList; + SysTryReturn(NID_UI, pWindowList, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + return pWindowList; +} + +// E_OUT_OF_MEMORY +// E_SYSTEM +_Layout::LayoutContainer* +CreateLayoutContainerN(_Layout::ILayoutItemHandler* pLayoutItemHandler) +{ + ClearLastResult(); + result r = E_SUCCESS; + + _Layout::LayoutContainer* pLayoutContainer = null; + _Layout::AbsoluteLayout* pAbsLayout = null; + + pLayoutContainer = new (std::nothrow) _Layout::LayoutContainer(); + SysTryReturn(NID_UI, pLayoutContainer, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage"); + if (IsFailed(GetLastResult())) + { + goto CATCH; + } + + pAbsLayout = new (std::nothrow) _Layout::AbsoluteLayout(); + SysTryCatch(NID_UI, pAbsLayout, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + if (IsFailed(GetLastResult())) + { + goto CATCH; + } + + pLayoutContainer->SetItemHandler(pLayoutItemHandler); + + r = pLayoutContainer->SetDefaultLayout(*pAbsLayout); + SysTryCatch(NID_UI, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] System error occurred."); + + return pLayoutContainer; + +CATCH: + delete pAbsLayout; + delete pLayoutContainer; + + return null; +} + +} // Anonymous namespace + +namespace Tizen { namespace Ui +{ + +IMPLEMENT_PROPERTY(_Control); + +class _Control::ControlVisualElementContentProvider + : public VisualElementContentProvider +{ + +private: + _Control& __control; + +public: + ControlVisualElementContentProvider(_Control& control) + : __control(control) + { + } + + virtual ~ControlVisualElementContentProvider(void) + { + } + + virtual bool PrepareDraw(VisualElement& target) + { + _ControlVisualElement* pCVE = dynamic_cast <_ControlVisualElement*>(&target); + if (!pCVE) + { + return false; + } + + Color bgColor = __control.GetBackgroundColor(); + + pCVE->SetBackgroundColor( + _Colorf( + (float) bgColor.GetRed() / 255.0f, + (float) bgColor.GetGreen() / 255.0f, + (float) bgColor.GetBlue() / 255.0f, + (float) bgColor.GetAlpha() / 255.0f + ) + ); + + __control.GetControlDelegate().OnDraw(); + + target.SetFlushNeeded(); + + return false; + } + + virtual HitTestResult HitTest(VisualElement& target, const FloatPoint& point) + { + return __control.GetControlDelegate().HitTest(point); + } + +private: + ControlVisualElementContentProvider(const ControlVisualElementContentProvider& rhs); + ControlVisualElementContentProvider& operator =(const ControlVisualElementContentProvider& rhs); +}; + +class _Control::ControlVisualElementEventListener + : public IVisualElementEventListener +{ +public: + ControlVisualElementEventListener(_Control& control) + : __control(control) + { + } + + virtual ~ControlVisualElementEventListener(void) + { + } + +public: + virtual void OnChildAttached(Tizen::Ui::Animations::VisualElement& source, Tizen::Ui::Animations::VisualElement& child) + { + } + + virtual void OnChildDetached(Tizen::Ui::Animations::VisualElement& source, Tizen::Ui::Animations::VisualElement& child) + { + } + + virtual void OnAttached(Tizen::Ui::Animations::VisualElement& source, Tizen::Ui::Animations::VisualElement& parent) + { + } + + virtual void OnDetached(Tizen::Ui::Animations::VisualElement& source, Tizen::Ui::Animations::VisualElement& parent) + { + } + + virtual result OnTransformChanging(Tizen::Ui::Animations::VisualElement& source, FloatMatrix4& newTransform) + { + return E_SUCCESS; + } + + virtual void OnTransformChanged(Tizen::Ui::Animations::VisualElement& source, const FloatMatrix4& previousTransform) + { + } + + virtual result OnChildrenTransformChanging(Tizen::Ui::Animations::VisualElement& source, FloatMatrix4& newTransform) + { + for (int i = 0; i < __control.GetChildCount(); ++i) + { + _Control* pChild = __control.GetChild(i); + if (!pChild) + { + continue; + } + + if (pChild->GetArea() == _CONTROL_AREA_SYSTEM) + { + _VisualElement* pVisualElement = pChild->GetVisualElement(); + if (pVisualElement) + { + FloatMatrix4 inverseMatrix(newTransform); + _MatrixUtilInvert(inverseMatrix); + + result r = pVisualElement->SetTransformMatrix(inverseMatrix); + if (r != E_SUCCESS) + { + continue; + } + } + } + } + + return E_SUCCESS; + } + + virtual void OnChildrenTransformChanged(Tizen::Ui::Animations::VisualElement& source, const FloatMatrix4& previousTransform) + { + } + + virtual result OnBoundsChanging(Tizen::Ui::Animations::VisualElement& source, FloatRectangle& newBounds) + { + return E_SUCCESS; + } + + virtual void OnBoundsChanged(Tizen::Ui::Animations::VisualElement& source, const FloatRectangle& previousBounds) + { + } + + virtual void OnShowStateChanged(Tizen::Ui::Animations::VisualElement& source, bool previousShowState) + { + } + +private: + ControlVisualElementEventListener(const ControlVisualElementEventListener& rhs); + ControlVisualElementEventListener& operator =(const ControlVisualElementEventListener& rhs); + +private: + _Control& __control; +}; // ControlVisualElementEventListener + +// Layout Item Handler +class _Control::LayoutItemHandler + : public _Layout::ILayoutItemHandler +{ +public: + LayoutItemHandler(_Control* pControl) + : __pControl(pControl) + { + SysAssert(__pControl); + } + + void SetItemVisibleState(bool visible) + { + __pControl->SetVisibleState(visible); + } + + result SetItemBounds(const FloatRectangle& rect) + { + SysAssert(__pControl->IsInSizeRange(FloatDimension(rect.width, rect.height))); + bool animating = __pControl->GetControlDelegate().IsAnimating(); + return __pControl->SetBoundsFinal(rect, false, true, animating); + } + + FloatRectangle GetItemBounds(void) const + { + return __pControl->GetBoundsF(); + } + + FloatRectangle GetItemClientBoundsFromSize(const FloatDimension& size) const + { + FloatRectangle clientBounds(0.0f, 0.0f, 0.0f, 0.0f); + __pControl->UpdateClientBounds(size, clientBounds); + return clientBounds; + } + + FloatDimension GetItemContentSize(bool horizontalMode, bool verticalMode) const + { + 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 + { + return __pControl->GetMinimumSizeF(); + } + + FloatDimension GetItemMaximumSize(void) const + { + return __pControl->GetMaximumSizeF(); + } + + result OnItemMeasure(float& width, float& height) + { + Dimension evaluatedSize(_CoordinateSystemUtils::ConvertToInteger(width), _CoordinateSystemUtils::ConvertToInteger(height)); + FloatDimension evaluatedSizeF(width, height); + + bool changed = __pControl->GetControlDelegate().OnEvaluateSize(evaluatedSizeF); + if (changed) + { + width = evaluatedSizeF.width; + height = evaluatedSizeF.height; + } + else + { + __pControl->GetControlDelegate().OnEvaluateSize(evaluatedSize); + + if (evaluatedSize.width != (_CoordinateSystemUtils::ConvertToInteger(width))) + { + width = evaluatedSize.width; + } + if (evaluatedSize.height != (_CoordinateSystemUtils::ConvertToInteger(height))) + { + height = evaluatedSize.height; + } + } + + return E_SUCCESS; + } + +private: + LayoutItemHandler(const LayoutItemHandler& rhs); + LayoutItemHandler& operator =(const LayoutItemHandler& rhs); + +private: + _Control* __pControl; +}; // LayoutItemHandler + +// E_OUT_OF_MEMORY +// E_SYSTEM +_Control* +_Control::CreateControlN(void) +{ + _Control* pControl = new (std::nothrow) _Control; + SysTryReturn(NID_UI, pControl, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + if (IsFailed(GetLastResult())) + { + goto CATCH; + } + + pControl->AcquireHandle(); + + SysAssert(GetLastResult() == E_SUCCESS); + return pControl; + +CATCH: + delete pControl; + return null; +} + +void +_Control::ResetEventListeners(void) +{ + __pFocusEventListener = this; + __pNotificationEventListener = this; +} + +void +_Control::SetControlDelegate(_IControlDelegate& delegate) +{ + __pControlDelegate = &delegate; +} + +void +_Control::ResetControlDelegate(void) +{ + __pControlDelegate = this; +} + +_IControlDelegate& +_Control::GetControlDelegate(void) const +{ + if (__destroying) + { + return const_cast<_Control&>(*this); + } + + SysAssert(__pControlDelegate); + return *__pControlDelegate; +} + +void +_Control::SetPropagatedTouchEventListener(_IPropagatedTouchEventListener* pListener) +{ + __pPropagatedTouchEventListener = pListener; +} + +_IPropagatedTouchEventListener* +_Control::GetPropagatedTouchEventListener(void) const +{ + if (__destroying) + { + return const_cast<_Control*>(this); + } + + SysAssert(__pPropagatedTouchEventListener); + return __pPropagatedTouchEventListener; +} + +void +_Control::SetPropagatedKeyEventListener(_IPropagatedKeyEventListener* pListener) +{ + __pPropagatedKeyEventListener = pListener; +} + +_IPropagatedKeyEventListener* +_Control::GetPropagatedKeyEventListener(void) const +{ + if (__destroying) + { + return const_cast<_Control*>(this); + } + + SysAssert(__pPropagatedKeyEventListener); + return __pPropagatedKeyEventListener; +} + +bool +_Control::OnPreviewKeyPressed(const _Control& source, const _KeyInfo& keyInfo) +{ + return false; +} + +bool +_Control::OnPreviewKeyReleased(const _Control& source, const _KeyInfo& keyInfo) +{ + return false; +} + +bool +_Control::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) +{ + //SysLog(NID_UI, ">>> [core] OnKeyPressed(%d, %d)", keyInfo.GetKeyCode(), keyInfo.GetKeyModifier()); + return false; +} + +bool +_Control::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) +{ + //SysLog(NID_UI, ">>> [core] OnKeyReleased(%d, %d)", keyInfo.GetKeyCode(), keyInfo.GetKeyModifier()); + return false; +} + +bool +_Control::TranslateKeyEventInfo(const _Control& source, _KeyInfo& keyInfo) +{ + return false; +} + +_UiTouchEventDelivery +_Control::OnPreviewTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + return _UI_TOUCH_EVENT_DELIVERY_YES; +} + +_UiTouchEventDelivery +_Control::OnPreviewTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + return _UI_TOUCH_EVENT_DELIVERY_YES; +} + +_UiTouchEventDelivery +_Control::OnPreviewTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + return _UI_TOUCH_EVENT_DELIVERY_YES; +} + +_UiTouchEventDelivery +_Control::OnPreviewTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + 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) +{ + return false; +} + +bool +_Control::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + return false; +} + +bool +_Control::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + return false; +} + +bool +_Control::OnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + return false; +} + +bool +_Control::OnTouchWheeled(const _Control& source, const _TouchInfo& touchinfo) +{ + return false; +} + +bool +_Control::OnFocusGained(const _Control& source) +{ + bool isFocusMode = _FocusManagerImpl::GetInstance()->IsFocusModeStateEnabled(); + bool isFocusalbeControl = _FocusManagerImpl::GetInstance()->IsFocusable(this); + if (isFocusMode && isFocusalbeControl) + { + DrawFocus(); + } + return false; +} + +bool +_Control::OnFocusLost(const _Control& source) +{ + if (__pFocusVisualElement) + { + __pFocusVisualElement->SetShowState(false); + } + return false; +} +bool +_Control::OnTraversalControlFocusGained(void) +{ + return false; +} +bool +_Control::OnTraversalControlFocusLost(void) +{ + return false; +} +bool +_Control::OnPreviewNotifiedN(const _Control& source, IList* pArgs) +{ + return false; +} + +bool +_Control::OnNotifiedN(const _Control& source, IList* pArgs) +{ + return false; +} + +bool +_Control::IsMovable(void) const +{ + ClearLastResult(); + return __movable; +} + +bool +_Control::IsResizable(void) const +{ + ClearLastResult(); + return __resizable; +} + +Dimension +_Control::GetContentSize(void) const +{ + ClearLastResult(); + return Dimension(0, 0); +} + +FloatDimension +_Control::GetContentSizeF(bool horizontalMode, bool verticalMode) const +{ + ClearLastResult(); + return FloatDimension(0.0f, 0.0f); +} + +HitTestResult +_Control::HitTest(const FloatPoint& point) +{ + _VisualElementImpl* pVisualElementImpl = _VisualElementImpl::GetInstance(*__pVisualElement); + + if (pVisualElementImpl) + { + if (pVisualElementImpl->HitTestI(point) == _VisualElementImpl::HITTEST_MATCH) + { + return HIT_TEST_MATCH; + } + } + + return HIT_TEST_NOWHERE; +} + +float +_Control::GetVerticalScrollPosition(void) const +{ + return 0.0f; +} + +float +_Control::GetHorizontalScrollPosition(void) const +{ + return 0.0f; +} + +_ControlOrientation +_Control::GetOrientation(void) const +{ + ClearLastResult(); + return __orientation; +} + +void +_Control::OnDraw(void) +{ +} + +Canvas* +_Control::OnCanvasRequestedN(const FloatRectangle& bounds) +{ + + return null; +} + +Bitmap* +_Control::OnCapturedBitmapRequestedN(void) +{ + + return null; +} + +result +_Control::OnAttaching(const _Control* pParent) +{ + return E_SUCCESS; +} + +result +_Control::OnAttached(void) +{ + return E_SUCCESS; +} + +result +_Control::OnAttachingToMainTree(const _Control* pParent) +{ + return E_SUCCESS; +} + +result +_Control::OnPreAttachedToMainTree(void) +{ + return E_SUCCESS; +} + +result +_Control::OnAttachedToMainTree(void) +{ + return E_SUCCESS; +} + +result +_Control::OnDetachingFromMainTree(void) +{ + return E_SUCCESS; +} + +void +_Control::OnAttachingFailed(const _Control& parent) +{ +} + +result +_Control::OnDetaching(void) +{ + return E_SUCCESS; +} + +result +_Control::OnBoundsChanging(const Rectangle& bounds) +{ + return E_SUCCESS; +} + +result +_Control::OnBoundsChanging(const FloatRectangle& bounds) +{ + return E_SUCCESS; +} + +void +_Control::OnBoundsChanged(void) +{ + +} + +void +_Control::OnEvaluateSize(Dimension& evaluatedSize) +{ + +} + +bool +_Control::OnEvaluateSize(FloatDimension& evaluatedSize) +{ + return false; +} + +void +_Control::OnParentBoundsChanged(const _Control& parent) +{ +} + +void +_Control::OnChildAttached(const _Control& child) +{ +} + +void +_Control::OnChildAttaching(const _Control& child) +{ +} + +void +_Control::OnChildDetaching(const _Control& child) +{ +} + +void +_Control::OnChildDetached(const _Control& child) +{ +} + +void +_Control::OnChildBoundsChanged(const _Control& child) +{ +} + +void +_Control::OnChildVisibleStateChanged(const _Control& child) +{ +} + +void +_Control::OnChangeLayout(_ControlOrientation orientation) +{ +} + +void +_Control::OnChangeLayout(_ControlRotation rotation) +{ +} + +void +_Control::OnZOrderChanging(_ControlZOrderUpdate zOrderUpdate) +{ +} + +void +_Control::OnVisibleStateChanging(void) +{ +} + +void +_Control::OnVisibleStateChanged(void) +{ +} + +void +_Control::OnAncestorVisibleStateChanged(const _Control& control) +{ + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + if (pTouchManager && IsVisible() == false && IsAttachedToMainTree() == true) + { + if(pTouchManager->GetTouchControlSource() == this) + { + SysLog(NID_UI, "VisibleState changed false, Call SetTouchCanceled"); + + _UiEventManager* pUiEventManager = _UiEventManager::GetInstance(); + if (pUiEventManager) + { + pUiEventManager->ClearEventQueue(); + } + } + } +} + +void +_Control::OnAncestorEnableStateChanged(const _Control& control) +{ +} + +void +_Control::OnAncestorInputEnableStateChanged(const _Control& control) +{ +} + +void +_Control::OnTouchPressHandled(const _Control& control) +{ +} + +void +_Control::OnTouchReleaseHandled(const _Control& control) +{ +} + +void +_Control::OnTouchMoveHandled(const _Control& control) +{ +} + +void +_Control::OnFontChanged(Tizen::Graphics::Font* pFont) +{ + SetUpdateLayoutState(true); +} + +void +_Control::OnFontInfoRequested(unsigned long& style, int& size) +{ +} + +void +_Control::OnFontInfoRequested(unsigned long& style, float& size) +{ +} + +void +_Control::OnBackgroundColorChanged(Color& backgroundColor) +{ +} + +void +_Control::OnFocusableStateChanged(bool focusalbeState) +{ +} + +void +_Control::OnFocusModeStateChanged(void) +{ +} + +void +_Control::OnTouchCancelHandled(const _Control& control) +{ +} + +void +_Control::Accept(Visitor& visitor) +{ + ClearLastResult(); + + VisitType visitType = visitor.Visit(*this); + + switch (visitType) + { + case VISIT_STOP: + break; + + case VISIT_DOWNWARD: + for (int i = 0; i < GetChildCount(); ++i) // [Postpone] Keep handle list before iternation. + { + _Control* pChild = GetChild(i); + if (pChild) + { + pChild->Accept(visitor); + } + } + break; + + case VISIT_UPWARD: + { + _Control* pParent = GetParent(); + if (pParent) + { + pParent->Accept(visitor); + } + } + break; + + default: + break; + } +} + +void +_Control::Accept(Visitor& visitor) const +{ + const_cast <_Control*>(this)->Accept(visitor); +} + +void +_Control::InvalidateHierarchyRootWindow(_Control& control) +{ + control.__needRecalcRootWindow = true; + control.__pRootWindow = null; + + for (int i = 0; i < control.GetChildCount(); ++i) + { + _Control* pChild = control.GetChild(i); + if (pChild) + { + pChild->InvalidateHierarchyRootWindow(*pChild); + } + } +} + +void +_Control::InvalidateHierarchyAbsoluteBounds(_Control& control) +{ + control.__needRecalcAbsBounds = true; + control.__needRecalcAbsBoundsF = true; + + for (int i = 0; i < control.GetChildCount(); ++i) + { + _Control* pChild = control.GetChild(i); + if (pChild) + { + pChild->InvalidateHierarchyAbsoluteBounds(*pChild); + } + } +} + +void +_Control::Draw(bool recursive) +{ + ClearLastResult(); + + Invalidate(recursive); + GetVisualElement()->Draw(); +} + +void +_Control::Show(void) +{ + GetVisualElement()->Flush(); + ClearLastResult(); + + SysAssert(GetLastResult() == E_SUCCESS); +} + +void +_Control::ChangeLayout(_Control& control, _ControlOrientation orientation) +{ + if (control.__orientation != orientation) + { + control.__orientation = orientation; + control.GetControlDelegate().OnChangeLayout(orientation); + } + + for (int i = 0; i < control.GetChildCount(); ++i) + { + _Control* pChild = control.GetChild(i); + if (pChild) + { + ChangeLayout(*pChild, orientation); + } + } +} + +void +_Control::ChangeLayout(_ControlOrientation orientation, bool callRotation) +{ + ClearLastResult(); + ChangeLayout(*this, orientation); + + if (callRotation == true) + { + _ControlManager* pMgr = _ControlManager::GetInstance(); + if (pMgr) + { + _ControlRotation rotation = pMgr->GetOrientationStatus(); + ChangeLayout(rotation); + } + } +} + +void +_Control::ChangeLayout(_Control& control, _ControlRotation rotation) +{ + if (control.__rotation != rotation) + { + control.__rotation = rotation; + control.GetControlDelegate().OnChangeLayout(rotation); + ClearLastResult(); + } + + for (int i = 0; i < control.GetChildCount(); ++i) + { + _Control* pChild = control.GetChild(i); + if (pChild) + { + ChangeLayout(*pChild, rotation); + } + } +} + +void +_Control::ChangeLayout(_ControlRotation rotation) +{ + ClearLastResult(); + ChangeLayout(*this, rotation); +} + +bool +_Control::IsLayoutChangable(void) const +{ + return true; +} + +bool +_Control::IsOrientationRoot(void) const +{ + return false; +} + +void +_Control::Invalidate(void) +{ + ClearLastResult(); + GetVisualElement()->InvalidateRectangle(null); +} + +void +_Control::Invalidate(bool recursive) +{ + ClearLastResult(); + + // Update layout + _Layout::Layout* pLayout = GetLayout(); + if (pLayout) + { + pLayout->UpdateLayout(); + } + + if (recursive == false) + { + Invalidate(); + } + else + { + 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); + } + } +} + +void +_Control::Invalidate(const Rectangle& rect) +{ + ClearLastResult(); + FloatRectangle rectf(rect.x, rect.y, rect.width, rect.height); + GetVisualElement()->InvalidateRectangle(&rectf); + + __invalidatedBounds = _CoordinateSystemUtils::ConvertToFloat(rect); +} + +void +_Control::Invalidate(const FloatRectangle& rect) +{ + ClearLastResult(); + FloatRectangle rectf(rect.x, rect.y, rect.width, rect.height); + GetVisualElement()->InvalidateRectangle(&rectf); + + __invalidatedBounds = rect; +} + +bool +_Control::Contains(const Point& point) const +{ + ClearLastResult(); + + Rectangle bounds = GetBounds(); + bounds.x = bounds.y = 0; + return bounds.Contains(point); +} + +bool +_Control::Contains(const FloatPoint& point) const +{ + ClearLastResult(); + + FloatRectangle bounds = GetBoundsF(); + bounds.x = bounds.y = 0; + return bounds.Contains(point); +} + + +void +_Control::PartialUpdateLayout(void) +{ + ClearLastResult(); + + _Layout::Layout* pLayout = GetLayout(); + if (pLayout) + { + pLayout->PartialUpdateLayout(); + } +} + +void +_Control::UpdateLayout(void) +{ + ClearLastResult(); + + _Layout::Layout* pLayout = GetLayout(); + if (pLayout) + { + pLayout->UpdateLayout(); + } +} + +result +_Control::SetChildAlwaysOnTop(_Control& child) +{ + ClearLastResult(); + + SysTryReturn(NID_UI, + child.GetParent() == this, E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] Not my child."); + + SysTryReturn(NID_UI, + child.GetArea() == _CONTROL_AREA_CLIENT, E_SYSTEM, + E_SYSTEM, "[E_SYSTEM] The child is not in the client area."); + + if (child.GetLayer() == _CONTROL_LAYER_CLIENT_TOP) + { + return E_SUCCESS; + } + + child.SetLayer(_CONTROL_LAYER_CLIENT_TOP); + + return E_SUCCESS; +} + +result +_Control::SetChildAlwaysAtBottom(_Control& child) +{ + ClearLastResult(); + + SysTryReturn(NID_UI, + child.GetParent() == this, E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] Not my child."); + + SysTryReturn(NID_UI, + child.GetArea() == _CONTROL_AREA_CLIENT, E_SYSTEM, + E_SYSTEM, "[E_SYSTEM] The child is not in the client area."); + + if (child.GetLayer() == _CONTROL_LAYER_CLIENT_BOTTOM) + { + return E_SUCCESS; + } + + child.SetLayer(_CONTROL_LAYER_CLIENT_BOTTOM); + + return E_SUCCESS; +} + +result +_Control::ResetChildLayer(_Control& child) +{ + ClearLastResult(); + + SysTryReturn(NID_UI, + child.GetParent() == this, E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] Not my child."); + + SysTryReturn(NID_UI, + child.GetArea() == _CONTROL_AREA_CLIENT, E_SYSTEM, + E_SYSTEM, "[E_SYSTEM] The child is not in the client area."); + + if (child.GetLayer() == _CONTROL_LAYER_CLIENT_MIDDLE) + { + return E_SUCCESS; + } + + child.SetLayer(_CONTROL_LAYER_CLIENT_MIDDLE); + + return E_SUCCESS; +} + + +result +_Control::AttachSystemChild(_Control& child) +{ + ClearLastResult(); + result r = E_SUCCESS; + + r = StartAttaching(child, _CONTROL_AREA_SYSTEM); + if (IsFailed(r)) + { + return r; + } + + ControlList& children = GetChildList(); + r = children.Add(&child); + SysAssert(r == E_SUCCESS); // [ToDo] Exception check and rollback. + + r = GetVisualElement()->AttachChild(*child.GetVisualElement()); + SysAssert(r == E_SUCCESS); // [ToDo] Exception check and rollback. + + r = EndAttaching(child); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] propagated.", GetErrorMessage(r)); + + SysAssert(GetLastResult() == E_SUCCESS); + + return E_SUCCESS; +} + +result +_Control::DetachSystemChild(_Control& child) +{ + return DetachChild(child); +} + +bool +_Control::HasParent(void) const +{ + return __pParent != null; +} + +_ControlArea +_Control::GetArea(void) const +{ + ClearLastResult(); + return __area; +} + +_ControlLayer +_Control::GetLayer(void) const +{ + ClearLastResult(); + return __layer; +} + +void +_Control::SetLayer(_ControlLayer layer) +{ + ClearLastResult(); + _VisualElementImpl* pImpl = _VisualElementImpl::GetInstance(*GetVisualElement()); + + result r = pImpl->SetZOrderGroup(GetZOrderGroupOfVisualElement(layer)); + __layer = layer; + + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +const _Control::ControlList& +_Control::GetChildList() const +{ + return const_cast <_Control*>(this)->GetChildList(); +} + +_Control::ControlList& +_Control::GetChildList() +{ + return *__pChildren; +} + +bool +_Control::IsCalledCallAttachingToMainTree(void) const +{ + return __isCalledCallOnAttachingToMainTree; +} + +void +_Control::SetCalledCallAttachingToMainTree(bool isAttaching) +{ + __isCalledCallOnAttachingToMainTree = isAttaching; +} + +bool +_Control::IsCalledCallPreAttachedToMainTree(void) const +{ + return __isCalledCallOnPreAttachedToMainTree; +} + +bool +_Control::IsCalledCallAttachedToMainTree(void) const +{ + return __isCalledCallOnAttachedToMainTree; +} + +void +_Control::SetCalledCallPreAttachedToMainTree(bool isAttached) +{ + __isCalledCallOnPreAttachedToMainTree = isAttached; +} + +void +_Control::SetCalledCallAttachedToMainTree(bool isAttached) +{ + __isCalledCallOnAttachedToMainTree = isAttached; +} + +result +_Control::CallOnAttachingToMainTree(_Control& control) +{ + result r = E_SUCCESS; + + ControlList& children = control.GetChildList(); + _Control* pChild = null; + + int childrenCount = children.GetCount(); + + for (int index = 0; index < childrenCount; index++) + { + r = children.GetAt(index, pChild); + if (IsFailed(r)) + { + SysAssert(r == E_OUT_OF_RANGE); + SysTryReturn(NID_UI, + (r != E_OUT_OF_RANGE), E_OUT_OF_RANGE, + E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The specified index is out of range."); + } + if (!pChild->IsCalledCallAttachingToMainTree()) + { + r = CallOnAttachingToMainTree(*pChild); + pChild->SetCalledCallAttachingToMainTree(true); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + + if (!control.IsCalledCallAttachingToMainTree()) + { + r = control.GetControlDelegate().OnAttachingToMainTree(this); + control.SetCalledCallAttachingToMainTree(true); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + return r; +} + +result +_Control::CallOnPreAttachedToMainTree(_Control& control) +{ + result r = E_SUCCESS; + + ControlList& children = control.GetChildList(); + _Control* pChild = null; + + int childrenCount = children.GetCount(); + + for (int index = 0; index < childrenCount; index++) + { + r = children.GetAt(index, pChild); + if (IsFailed(r)) + { + SysAssert(r == E_OUT_OF_RANGE); + SysTryReturn(NID_UI, + (r != E_OUT_OF_RANGE), E_OUT_OF_RANGE, + E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The specified index is out of range."); + } + + if (!pChild->IsCalledCallPreAttachedToMainTree()) + { + r = CallOnPreAttachedToMainTree(*pChild); + pChild->SetCalledCallPreAttachedToMainTree(true); + } + } + + if (!control.IsCalledCallPreAttachedToMainTree()) + { + r = control.GetControlDelegate().OnPreAttachedToMainTree(); + control.SetCalledCallPreAttachedToMainTree(true); + } + + return r; +} + +result +_Control::CallOnAttachedToMainTree(_Control& control) +{ + result r = E_SUCCESS; + + ControlList& children = control.GetChildList(); + _Control* pChild = null; + + int childrenCount = children.GetCount(); + + for (int index = 0; index < childrenCount; index++) + { + r = children.GetAt(index, pChild); + if (IsFailed(r)) + { + SysAssert(r == E_OUT_OF_RANGE); + SysTryReturn(NID_UI, + (r != E_OUT_OF_RANGE), E_OUT_OF_RANGE, + E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The specified index is out of range."); + } + + if (!pChild->IsCalledCallAttachedToMainTree()) + { + r = CallOnAttachedToMainTree(*pChild); + pChild->SetCalledCallAttachedToMainTree(true); + } + } + + if (!control.IsCalledCallAttachedToMainTree()) + { + r = control.GetControlDelegate().OnAttachedToMainTree(); + control.SetCalledCallAttachedToMainTree(true); + } + + return r; +} + +result +_Control::CallOnDetachingFromMainTree(_Control& control) +{ + result r = E_SUCCESS; + + ControlList& children = control.GetChildList(); + _Control* pChild = null; + + _Window* pTop = control.GetRootWindow(); + if (pTop) + { + _Control* pControl = pTop->GetFocusControl(this); + if ((&control) == pControl) + { + pTop->SetFocusControl(&control, false); + } + _Control* pFocusTraversalControl = pTop->GetFocusTraversalControl(this); + if ((&control) == pFocusTraversalControl) + { + pTop->SetFocusTraversalControl(&control, false); + } + } + + if (!__isPostOrderTraversal) + { + r = control.GetControlDelegate().OnDetachingFromMainTree(); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + int childrenCount = children.GetCount(); + + for (int index = 0; index < childrenCount; index++) + { + r = children.GetAt(index, pChild); + if (IsFailed(r)) + { + SysAssert(r == E_OUT_OF_RANGE); + SysTryReturn(NID_UI, + (r != E_OUT_OF_RANGE), E_OUT_OF_RANGE, + E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The specified index is out of range."); + } + r = CallOnDetachingFromMainTree(*pChild); + pChild->SetCalledCallAttachingToMainTree(false); + pChild->SetCalledCallPreAttachedToMainTree(false); + pChild->SetCalledCallAttachedToMainTree(false); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + if (__isPostOrderTraversal) + { + r = control.GetControlDelegate().OnDetachingFromMainTree(); + control.SetCalledCallAttachingToMainTree(false); + control.SetCalledCallPreAttachedToMainTree(false); + control.SetCalledCallAttachedToMainTree(false); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + return r; +} + +void +_Control::CallOnAncestorVisibleStateChanged(_Control& control) +{ + control.GetControlDelegate().OnAncestorVisibleStateChanged(*this); + + for (int i = 0; i < control.GetChildCount(); ++i) + { + _Control* pChild = control.GetChild(i); + if (pChild) + { + CallOnAncestorVisibleStateChanged(*pChild); + } + } +} + +void +_Control::CallOnAncestorEnableStateChanged(_Control& control) +{ + control.GetControlDelegate().OnAncestorEnableStateChanged(*this); + + for (int i = 0; i < control.GetChildCount(); ++i) + { + _Control* pChild = control.GetChild(i); + if (pChild) + { + CallOnAncestorEnableStateChanged(*pChild); + } + } +} + +void +_Control::CallOnAncestorInputEnableStateChanged(_Control& control) +{ + control.GetControlDelegate().OnAncestorInputEnableStateChanged(*this); + + for (int i = 0; i < control.GetChildCount(); ++i) + { + _Control* pChild = control.GetChild(i); + if (pChild) + { + CallOnAncestorInputEnableStateChanged(*pChild); + } + } +} + +// E_INVALID_ARG +// E_SYSTEM +// [ToDo] Rollback is difficult. +result +_Control::StartAttaching(_Control& child, _ControlArea area) +{ + result r = E_SUCCESS; + + _Control* pOldParent = child.GetParent(); + + SysTryReturn(NID_UI, + (pOldParent != this), E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] The child control is already attached to this container."); + + SysTryReturn(NID_UI, + pOldParent == null, E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] Unable to add the child which already has another parent."); + + 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); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + // [ToDo] Add control to layout + // What should we do about non-layoutable controls? + if (area == _CONTROL_AREA_CLIENT) + { + _ControlManager* pMgr = _ControlManager::GetInstance(); + r = GetLastResult(); + SysTryReturn(NID_UI, pMgr, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __pLayoutContainer->AddItem(child.GetLayoutContainer()); + if (IsFailed(r)) + { + child.GetControlDelegate().OnAttachingFailed(*this); + SysLogException(NID_UI, E_SYSTEM, "[E_SYSTEM] Failed to apply layout."); + return E_SYSTEM; + } + } + + if (IsAttachedToMainTree()) + { + if (!(IsOrientationRoot() && child.IsOrientationRoot())) + { + child.ChangeLayout(_ControlManager::GetInstance()->GetOrientation()); + } + } + + child.__area = area; + + if (area == _CONTROL_AREA_CLIENT) + { + if (child.GetLayer() != _CONTROL_LAYER_CLIENT_TOP && child.GetLayer() != _CONTROL_LAYER_CLIENT_BOTTOM) + { + child.SetLayer(_CONTROL_LAYER_CLIENT_MIDDLE); + } + } + else + { + child.SetLayer(_CONTROL_LAYER_SYSTEM); + } + + SysAssert(GetLastResult() == E_SUCCESS); + return E_SUCCESS; +} + +result +_Control::EndAttaching(_Control& child) +{ + child.SetParent(this); + InvalidateHierarchyRootWindow(child); + InvalidateHierarchyAbsoluteBounds(child); + + FloatRectangle floatBounds(child.GetBoundsF().x, child.GetBoundsF().y, child.GetBoundsF().width, child.GetBoundsF().height); + + result r = E_SUCCESS; + if (child.IsLayoutChangable() == false) + { + r = child.UpdateBoundsOfVisualElement(FloatRectangle(0.0f, 0.0f, floatBounds.width, floatBounds.height)); + } + else + { + r = child.UpdateBoundsOfVisualElement(floatBounds); + } + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = child.GetControlDelegate().OnAttached(); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (IsAttachedToMainTree()) + { + r = CallOnPreAttachedToMainTree(child); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = CallOnAttachedToMainTree(child); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + ClearLastResult(); + + GetControlDelegate().OnChildAttached(child); + ClearLastResult(); + + return E_SUCCESS; +} + +// E_INVALID_ARG +// E_OUT_OF_MEMORY +// E_SYSTEM +result +_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)) + { + return r; + } + + ControlList& children = GetChildList(); + r = children.Add(&child); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GetVisualElement()->AttachChild(*child.GetVisualElement()); + + r = EndAttaching(child); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] propagated.", GetErrorMessage(r)); + + SysAssert(GetLastResult() == E_SUCCESS); + UpdateFocusList(); + return E_SUCCESS; +} + +void +_Control::UpdateFocusList(void) +{ + _Window* pTop = GetRootWindow(); + if (pTop) + { + pTop->ResetFocusList(); + } +} + +void +_Control::RemoveFocusRing(bool needToDelete) +{ + if (__pFocusVisualElement) + { + if (needToDelete) + { + __pFocusVisualElement.reset(); + } + else + { + __pFocusVisualElement->SetShowState(false); + } + } +} + +bool +_Control::HasFocusRing(void) +{ + if (__pFocusVisualElement) + { + return true; + } + + return false; +} + +void +_Control::SetFocusNavigateEnabled(bool enable) +{ + __isNavigatable = enable; +} + +bool +_Control::IsFocusNavigateEnabled(void) const +{ + return __isNavigatable; +} + +bool +_Control::IsFocusModeStateEnabled(void) const +{ + return _FocusManagerImpl::GetInstance()->IsFocusModeStateEnabled(); +} + +// E_INVALID_ARG +// E_OUT_OF_MEMORY +// E_SYSTEM +result +_Control::InsertChildToBottom(_Control& child) +{ + ClearLastResult(); + result r = E_SUCCESS; + + r = StartAttaching(child, _CONTROL_AREA_CLIENT); + if (IsFailed(r)) + { + return r; + } + + ControlList& children = GetChildList(); + r = children.InsertAt(&child, 0); + SysAssert(r == E_SUCCESS); // [ToDo] Exception check and rollback. + + GetVisualElement()->InsertChild(*child.GetVisualElement(), null, false); + SysAssert(r == E_SUCCESS); // [ToDo] Exception check and rollback. + + r = EndAttaching(child); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] propagated.", GetErrorMessage(r)); + + SysAssert(GetLastResult() == E_SUCCESS); + UpdateFocusList(); + return E_SUCCESS; +} + +// E_INVALID_ARG +// E_OUT_OF_MEMORY +// E_SYSTEM +result +_Control::InsertChildAfter(const _Control& targetChild, _Control& child) +{ + ClearLastResult(); + result r = E_SUCCESS; + + SysTryReturn(NID_UI, + targetChild.GetParent() == this, E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] The target is not my child."); + + r = StartAttaching(child, _CONTROL_AREA_CLIENT); + if (IsFailed(r)) + { + return r; + } + + int targetIndex = GetChildIndex(targetChild); + SysAssert(targetIndex != -1); + + ControlList& children = GetChildList(); + r = children.InsertAt(&child, targetIndex + 1); + SysAssert(r == E_SUCCESS); // [ToDo] Exception check and rollback. + + GetVisualElement()->InsertChild(*child.GetVisualElement(), targetChild.GetVisualElement(), true); + SysAssert(r == E_SUCCESS); // [ToDo] Exception check and rollback. + + r = EndAttaching(child); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] propagated.", GetErrorMessage(r)); + + SysAssert(GetLastResult() == E_SUCCESS); + UpdateFocusList(); + return E_SUCCESS; +} + +// E_INVALID_ARG +// E_OUT_OF_MEMORY +// E_SYSTEM +result +_Control::InsertChildBefore(const _Control& targetChild, _Control& child) +{ + ClearLastResult(); + result r = E_SUCCESS; + + SysTryReturn(NID_UI, + targetChild.GetParent() == this, E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] The target is not my child."); + + r = StartAttaching(child, _CONTROL_AREA_CLIENT); + if (IsFailed(r)) + { + return r; + } + + int targetIndex = GetChildIndex(targetChild); + SysAssert(targetIndex != -1); + + ControlList& children = GetChildList(); + r = children.InsertAt(&child, targetIndex); + SysAssert(r == E_SUCCESS); // [ToDo] Exception check and rollback. + + GetVisualElement()->InsertChild(*child.GetVisualElement(), targetChild.GetVisualElement(), false); + SysAssert(r == E_SUCCESS); // [ToDo] Exception check and rollback. + + r = EndAttaching(child); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] propagated.", GetErrorMessage(r)); + + SysAssert(GetLastResult() == E_SUCCESS); + UpdateFocusList(); + return E_SUCCESS; +} + +// E_SYSTEM +result +_Control::DetachChild(_Control& child) +{ + ClearLastResult(); + result r = E_SUCCESS; + + if (child.GetParent() != this) + { + SetLastResult(E_INVALID_ARG); + return E_INVALID_ARG; + } + + if (IsAttachedToMainTree()) + { + r = CallOnDetachingFromMainTree(child); + SysTryReturn(NID_UI, + r == E_SUCCESS, E_SYSTEM, + E_SYSTEM, "[E_SYSTEM] The child cannot detached from parent."); + + SysTryReturn(NID_UI, + child.GetControlDelegate().OnDetaching() == E_SUCCESS, E_SYSTEM, + E_SYSTEM, "[E_SYSTEM] The child cannot detached from parent."); + } + + GetControlDelegate().OnChildDetaching(child); + ClearLastResult(); + + r = GetVisualElement()->DetachChild(*child.GetVisualElement()); + SysAssert(r == E_SUCCESS); // [ToDo] Exception check and rollback. + + ControlList& children = GetChildList(); + r = children.Remove(&child); + SysAssert(r == E_SUCCESS); // [ToDo] Exception check and rollback. + + // Remove control to layout + if (child.__area == _CONTROL_AREA_CLIENT) + { + _ControlManager* pMgr = _ControlManager::GetInstance(); + r = GetLastResult(); + SysTryReturn(NID_UI, pMgr, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __pLayoutContainer->RemoveItem(child.GetLayoutContainer()); + SysAssert(r == E_SUCCESS); // [ToDo] Exception check and rollback. + } + + child.SetParent(null); + child.__area = _CONTROL_AREA_NONE; + child.__layer = _CONTROL_LAYER_NONE; + + GetControlDelegate().OnChildDetached(child); + ClearLastResult(); + + SysAssert(GetLastResult() == E_SUCCESS); + UpdateFocusList(); + InvalidateHierarchyRootWindow(child); + + return E_SUCCESS; +} + +// Always success +void +_Control::DetachAllChildren(bool detachSystemChild, bool recursive) +{ + ClearLastResult(); + result r = E_SUCCESS; + + int childCount = GetChildCount(); + int itemIndex = 0; + + if (recursive) + { + while (childCount--) + { + _Control* pChild = GetChild(itemIndex); + if (pChild == null) + { + continue; + } + + if (!detachSystemChild && (pChild->GetArea() == _CONTROL_AREA_SYSTEM)) + { + itemIndex++; + continue; + } + + int childCount = pChild->GetChildCount(); + if (childCount == 0) + { + r = DetachChild(*pChild); + if (IsFailed(r)) + { + SysLog(NID_UI, "child is not detached from this container."); + } + } + else + { + r = DetachChild(*pChild); + if (IsFailed(r)) + { + SysLog(NID_UI, "child is not detached from this container."); + } + pChild->DetachAllChildren(detachSystemChild, true); + } + } + } + else + { + int notDetachedChildCount = 0; + while (childCount--) + { + _Control* pChild = GetChild(itemIndex); + if (pChild == null) + { + continue; + } + + if (!detachSystemChild && (pChild->GetArea() == _CONTROL_AREA_SYSTEM)) + { + itemIndex++; + continue; + } + r = DetachChild(*pChild); + + if (IsFailed(r)) + { + ++notDetachedChildCount; + } + } + + if (notDetachedChildCount > 0) + { + SysLog(NID_UI, "%d children are not detached from this container.", notDetachedChildCount); + } + } + + ClearLastResult(); +} + +// E_INVALID_ARG +result +_Control::MoveChildToTop(const _Control& child) +{ + ClearLastResult(); + result r = E_SUCCESS; + + SysTryReturn(NID_UI, + child.GetParent() == this, E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] Not my child."); + + // If already on top, + ControlList& children = GetChildList(); + if (GetChildIndex(child) == children.GetCount() - 1) + { + SysAssert(GetLastResult() == E_SUCCESS); + return E_SUCCESS; + } + + _Control* pChild = const_cast <_Control*>(&child); + + r = children.Remove(pChild); + SysAssert(r == E_SUCCESS); + + r = children.Add(pChild); + SysAssert(r == E_SUCCESS); + + r = child.GetVisualElement()->SetZOrder(null, true); + SysAssert(r == E_SUCCESS); // [ToDo] Exception check and rollback. + + SysAssert(GetLastResult() == E_SUCCESS); + return E_SUCCESS; +} + +// E_INVALID_ARG +result +_Control::MoveChildToBottom(const _Control& child) +{ + ClearLastResult(); + result r = E_SUCCESS; + + SysTryReturn(NID_UI, + child.GetParent() == this, E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] Not my child."); + + ControlList& children = GetChildList(); + + if (GetChildIndex(child) == 0) + { + SysAssert(GetLastResult() == E_SUCCESS); + return E_SUCCESS; + } + + _Control* pChild = const_cast <_Control*>(&child); + + r = children.Remove(pChild); + SysAssert(r == E_SUCCESS); + + r = children.InsertAt(pChild, 0); + SysAssert(r == E_SUCCESS); + + r = child.GetVisualElement()->SetZOrder(null, false); + SysAssert(r == E_SUCCESS); // [ToDo] Exception check and rollback. + + SysAssert(GetLastResult() == E_SUCCESS); + return E_SUCCESS; +} + +// E_INVALID_ARG +result +_Control::MoveChildAfter(const _Control& targetChild, const _Control& child) +{ + ClearLastResult(); + result r = E_SUCCESS; + + SysTryReturn(NID_UI, + targetChild.GetParent() == this, E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] Target is not my child."); + + SysTryReturn(NID_UI, + child.GetParent() == this, E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] Not my child."); + + SysTryReturn(NID_UI, + &targetChild != &child, E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] Cannot move after self."); + + ControlList& children = GetChildList(); + + int targetIndex = GetChildIndex(targetChild); + SysAssert(targetIndex != -1); + + if (targetIndex + 1 == GetChildIndex(child)) + { + SysAssert(GetLastResult() == E_SUCCESS); + return E_SUCCESS; + } + + _Control* pChild = const_cast <_Control*>(&child); + + r = children.Remove(pChild); + SysAssert(r == E_SUCCESS); + + r = children.InsertAt(pChild, targetIndex + 1); + SysAssert(r == E_SUCCESS); + + r = child.GetVisualElement()->SetZOrder(targetChild.GetVisualElement(), true); + SysAssert(r == E_SUCCESS); // [ToDo] Exception check and rollback. + + SysAssert(GetLastResult() == E_SUCCESS); + return E_SUCCESS; +} + +// E_INVALID_ARG +result +_Control::MoveChildBefore(const _Control& targetChild, const _Control& child) +{ + ClearLastResult(); + result r = E_SUCCESS; + + SysTryReturn(NID_UI, + targetChild.GetParent() == this, E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] Target is not my child."); + + SysTryReturn(NID_UI, + child.GetParent() == this, E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] Not my child."); + + SysTryReturn(NID_UI, + &targetChild != &child, E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] Cannot move before self."); + + ControlList& children = GetChildList(); + + int targetIndex = GetChildIndex(targetChild); + SysAssert(targetIndex != -1); + + if (targetIndex - 1 == GetChildIndex(child)) + { + SysAssert(GetLastResult() == E_SUCCESS); + return E_SUCCESS; + } + + _Control* pChild = const_cast <_Control*>(&child); + + r = children.Remove(pChild); + SysAssert(r == E_SUCCESS); + + r = children.InsertAt(pChild, targetIndex); + SysAssert(r == E_SUCCESS); + + r = child.GetVisualElement()->SetZOrder(targetChild.GetVisualElement(), false); + SysAssert(r == E_SUCCESS); // [ToDo] Exception check and rollback. + + SysAssert(GetLastResult() == E_SUCCESS); + return E_SUCCESS; +} + +// E_INVALID_ARG +// E_OBJ_NOT_FOUND +int +_Control::GetChildIndex(const _Control& child) const +{ + ClearLastResult(); + result r = E_SUCCESS; + + SysTryReturn(NID_UI, + child.GetParent() == this, -1, + E_INVALID_ARG, "[E_INVALID_ARG] Not my child."); + + const ControlList& children = GetChildList(); + + int index = -1; + r = children.IndexOf(const_cast<_Control*>(&child), index); + if (IsFailed(r)) + { + SysAssert(r == E_OBJ_NOT_FOUND); + SysLogException(NID_UI, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] Unable to find the specified child."); + return -1; + } + + SysAssert(GetLastResult() == E_SUCCESS); + return index; +} + +// E_OUT_OF_RANGE +_Control* +_Control::GetChild(int index) const +{ + ClearLastResult(); + result r = E_SUCCESS; + + const ControlList& children = GetChildList(); + + _Control* pChild = null; + r = children.GetAt(index, pChild); + if (IsFailed(r)) + { + SysAssert(r == E_OUT_OF_RANGE); + SysLogException(NID_UI, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The specified index is out of range."); + return null; + } + + SysAssert(GetLastResult() == E_SUCCESS); + return pChild; +} + +int +_Control::GetChildCount(void) const +{ + ClearLastResult(); + + if (__pChildren == null) + { + return 0; + } + + return GetChildList().GetCount(); +} + +_ControlHandle +_Control::GetHandle(void) const +{ + return __controlHandle; +} + +void* +_Control::GetUserData(void) const +{ + return __pUserData; +} + +void +_Control::SetUserData(void* pUserData) +{ + __pUserData = pUserData; +} + +Variant +_Control::GetPropertyName(void) const +{ + ClearLastResult(); + return Tizen::Ui::Variant(__name); +} + +String +_Control::GetName(void) const +{ + Variant name = GetProperty("Name"); + + return name.ToString(); +} + +result +_Control::SetPropertyName(const Variant& name) +{ + ClearLastResult(); + __name = name.ToString(); + + return E_SUCCESS; +} + +void +_Control::SetName(const String& name) +{ + SetProperty("Name", Variant(name)); +} + +_Control* +_Control::GetParent(void) const +{ + return __pParent; +} + +Canvas* +_Control::GetCanvasN(void) const +{ + return GetCanvasN(FloatRectangle(0.0f, 0.0f, __bounds.width, __bounds.height)); +} + +Canvas* +_Control::GetCanvasN(const Rectangle& bounds) const +{ + ClearLastResult(); + Canvas *pCanvas = GetControlDelegate().OnCanvasRequestedN(FloatRectangle(bounds.x, bounds.y, bounds.width, bounds.height)); + if (pCanvas == null) + { + GetVisualElement()->SetFlushNeeded(); + pCanvas = GetVisualElement()->GetCanvasN(bounds); + if (IsFailed(GetLastResult())) + { + SysLog(NID_UI_CTRL, "[%s] Propagated", GetErrorMessage(GetLastResult())); + } + + if (pCanvas && !__isCalledGetCanvasN) + { + pCanvas->SetBackgroundColor(GetBackgroundColor()); + pCanvas->Clear(); + const_cast <_Control*>(this)->__isCalledGetCanvasN = true; + } + } + return pCanvas; +} + +Canvas* +_Control::GetCanvasN(const FloatRectangle& bounds) const +{ + ClearLastResult(); + Canvas *pCanvas = GetControlDelegate().OnCanvasRequestedN(FloatRectangle(bounds)); + if (pCanvas == null) + { + GetVisualElement()->SetFlushNeeded(); + pCanvas = GetVisualElement()->GetCanvasN(bounds); + if (IsFailed(GetLastResult())) + { + SysLog(NID_UI_CTRL, "[%s] Propagated", GetErrorMessage(GetLastResult())); + } + + if (pCanvas && !__isCalledGetCanvasN) + { + pCanvas->SetBackgroundColor(GetBackgroundColor()); + pCanvas->Clear(); + const_cast <_Control*>(this)->__isCalledGetCanvasN = true; + } + } + return pCanvas; +} + +bool +_Control::IsCalledGetCanvasN(void) const +{ + return __isCalledGetCanvasN; +} + +Canvas* +_Control::GetClientCanvasN(void) const +{ + return GetCanvasN(GetClientBounds()); +} + +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) + { + if (pParent == &ancestor) + { + return true; + } + return IsAncestorOf(*pParent, ancestor); + } + + return false; +} + +_Window* +_Control::GetRootWindow(void) const +{ + ClearLastResult(); + + if (!__needRecalcRootWindow && __pRootWindow != this) + { + return __pRootWindow; + } + + _Window* pRoot = null; + _Control* pControl = const_cast<_Control*>(this); + + while (pControl) + { + pRoot = dynamic_cast <_Window*>(pControl); + if (pRoot) + { + break; + } + pControl = pControl->GetParent(); + } + + const_cast<_Control*>(this)->__pRootWindow = pRoot; + const_cast<_Control*>(this)->__needRecalcRootWindow = false; + + return pRoot; +} + +bool +_Control::IsAttachedToMainTree(void) const +{ + ClearLastResult(); + + _ControlManager* pMgr = _ControlManager::GetInstance(); + if (pMgr == null) + { + return false; + } + + _Window* pRootWindow = GetRootWindow(); + if (pRootWindow == null) + { + return false; + } + + return pRootWindow->IsAttached(); +} + +bool +_Control::IsFocusable(void) const +{ + ClearLastResult(); + return __focusable; +} + +void +_Control::SetFocusable(bool focusable) +{ + ClearLastResult(); + bool oldState = __focusable; + __focusable = focusable; + if (oldState != __focusable) + { + GetControlDelegate().OnFocusableStateChanged(focusable); + } +} + +bool +_Control::IsNativeObjectFocusable(void) const +{ + ClearLastResult(); + return __nativeObjectFocusable; +} + +void +_Control::SetNativeObjectFocusable(bool focusable) +{ + ClearLastResult(); + __nativeObjectFocusable = focusable; +} + +bool +_Control::IsFocused(void) const +{ + ClearLastResult(); + + _Window* pTop = GetRootWindow(); + if (pTop == null) + { + return false; + } + + if (this == pTop->GetFocusControl(const_cast<_Control*>(this))) + { + return true; + } + + return false; +} + +void +_Control::SetFocusWindowActivationChecked(bool isChecked) +{ + __isFocusWindowActivationChecked = isChecked; +} + +bool +_Control::IsFocusWindowActivationChecked(void) const +{ + return __isFocusWindowActivationChecked; +} + +result +_Control::SetFocused(bool on) +{ + ClearLastResult(); + + SysTryReturn(NID_UI, + IsAttachedToMainTree(), E_INVALID_OPERATION, + E_INVALID_OPERATION, "[E_INVALID_OPERATION] This control should have a parent or be attached to the main tree."); + + SysTryReturn(NID_UI, + IsFocusable(), E_INVALID_OPERATION, + E_INVALID_OPERATION, "[E_INVALID_OPERATION] This Control isn't focusable control."); + + _Window* pTop = GetRootWindow(); + SysAssert(pTop); + if (on) + { + pTop->SetFocusControl(this, true); + } + else + { + pTop->SetFocusControl(this, false); + } + + bool isFocusControlListControl = _FocusManagerImpl::GetInstance()->IsFocusControlListControl(this); + if (isFocusControlListControl) + { + pTop->SetFocusTraversalControl(this, true); + } + return E_SUCCESS; +} + +result +_Control::SetFont(const String& fontName) +{ + result r = E_SUCCESS; + + if (__fontName.Equals(fontName)) + { + return E_SUCCESS; + } + + __isControlFontChanged = true; + __fontName = fontName; + __fontFileName.Clear(); + + Font* pFont = GetFallbackFont(); + + if (pFont == null) + { + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + return E_SUCCESS; +} + +Font* +_Control::GetFallbackFont(void) +{ + unsigned long style = 0; + int textSize = 0; + float floatTextSize = 0.0f; + result r = E_SUCCESS; + _IControlDelegate& delegate = GetControlDelegate(); + delegate.OnFontInfoRequested(style, textSize); + delegate.OnFontInfoRequested(style, floatTextSize); + _ControlManager* pControlManager = _ControlManager::GetInstance(); + _FontImpl* pFontImpl = _FontImpl::GetInstance(*__pFont); + if (!(__isControlFontChanged || pControlManager->IsDefaultFontChanged() || pControlManager->IsSystemFontChanged()) + && __pFont != null + && ((__pFont->GetSize() == textSize || __pFont->GetSizeF() == floatTextSize)) + && (pFontImpl->GetStyle() == static_cast(style))) + { + return __pFont; + } + unique_ptrpTempFont(new(std::nothrow)Font()); + SysTryReturn(NID_UI , pTempFont , null , E_OUT_OF_MEMORY, "[%s] Fails to create a __pFont.", GetErrorMessage(r)); + + if (!__fontName.IsEmpty()) + { + __isControlFontChanged = false; + _FontImpl* pFontImpl = _FontImpl::GetInstance(*pTempFont); + SysAssertf(pFontImpl != null, "Getting _FontImpl instance failed."); + + if (floatTextSize > 0.0f) + { + r = pFontImpl->Construct(__fontName, style, floatTextSize, false); + } + else + { + r = pFontImpl->Construct(__fontName, style, textSize, false); + } + + SysTryReturn(NID_UI, r != E_OUT_OF_MEMORY, null, E_OUT_OF_MEMORY, "%s.", GetErrorMessage(r)); + SysTryReturn(NID_UI, r == E_SUCCESS, null, E_FILE_NOT_FOUND, "%s.", GetErrorMessage(r)); + } + else if (!__fontFileName.IsEmpty()) + { + __isControlFontChanged = false; + _FontImpl* pFontImpl = _FontImpl::GetInstance(*pTempFont); + SysAssertf(pFontImpl != null, "Getting _FontImpl instance failed."); + + if (floatTextSize > 0.0f) + { + r = pFontImpl->Construct(__fontFileName, style, floatTextSize); + } + else + { + r = pFontImpl->Construct(__fontFileName, style, textSize); + } + SysTryReturn(NID_UI, r != E_OUT_OF_MEMORY, null, E_OUT_OF_MEMORY, "%s.", GetErrorMessage(r)); + SysTryReturn(NID_UI, r == E_SUCCESS, null, E_FILE_NOT_FOUND, "%s.", GetErrorMessage(r)); + + } + else if (!pControlManager->GetDefaultFont().IsEmpty()) + { + _FontImpl* pFontImpl = _FontImpl::GetInstance(*pTempFont); + SysAssertf(pFontImpl != null, "Getting _FontImpl instance failed."); + + if (floatTextSize > 0.0f) + { + r = pFontImpl->Construct(pControlManager->GetDefaultFont(), style, floatTextSize, false); + } + else + { + r = pFontImpl->Construct(pControlManager->GetDefaultFont(), style, textSize, false); + } + SysTryReturn(NID_UI, r != E_OUT_OF_MEMORY, null, E_OUT_OF_MEMORY, "%s.", GetErrorMessage(r)); + SysTryReturn(NID_UI, r == E_SUCCESS, null, E_FILE_NOT_FOUND, "%s.", GetErrorMessage(r)); + } + else if (!pControlManager->GetDefaultFontFile().IsEmpty()) + { + _FontImpl* pFontImpl = _FontImpl::GetInstance(*pTempFont); + SysAssertf(pFontImpl != null, "Getting _FontImpl instance failed."); + + if (floatTextSize > 0.0f) + { + r = pFontImpl->Construct(pControlManager->GetDefaultFontFile(), style, floatTextSize); + } + else + { + r = pFontImpl->Construct(pControlManager->GetDefaultFontFile(), style, textSize); + } + SysTryReturn(NID_UI, r != E_OUT_OF_MEMORY, null, E_OUT_OF_MEMORY, "%s.", GetErrorMessage(r)); + SysTryReturn(NID_UI, r == E_SUCCESS, null, E_FILE_NOT_FOUND, "%s.", GetErrorMessage(r)); + } + else + { + if (floatTextSize > 0.0f) + { + r = pTempFont->Construct(style, floatTextSize); + } + else + { + r = pTempFont->Construct(style, textSize); + } + SysTryReturn(NID_UI, r != E_OUT_OF_MEMORY, null, E_OUT_OF_MEMORY, "%s.", GetErrorMessage(r)); + SysTryReturn(NID_UI, r == E_SUCCESS, null, E_FILE_NOT_FOUND, "%s.", GetErrorMessage(r)); + } + + if (__pFont) + { + delete __pFont; + __pFont = null; + } + __pFont = pTempFont.release(); + delegate.OnFontChanged(__pFont); + return __pFont; +} + +String +_Control::GetFont(void) const +{ + return __fontName; +} + +bool +_Control::IsEnabled(void) const +{ + ClearLastResult(); + + bool enabled = true; + const _Control* pControl = this; + + while (pControl) + { + if (!pControl->GetEnableState()) + { + enabled = false; + break; + } + pControl = pControl->GetParent(); + } + + return enabled; +} + +bool +_Control::GetEnableState(void) const +{ + ClearLastResult(); + return __enabledState; +} + +void +_Control::SetEnableState(bool enabledState) +{ + ClearLastResult(); + const bool changed = (__enabledState != enabledState); + if (changed) + { + __enabledState = enabledState; + CallOnAncestorEnableStateChanged(*this); + } + __pAccessibilityContainer->SetEnableState(enabledState); +} + +bool +_Control::IsInputEventEnabled(void) const +{ + ClearLastResult(); + + bool inputEnabled = true; + const _Control* pControl = this; + + while (pControl) + { + if (!pControl->GetInputEnableState()) + { + inputEnabled = false; + break; + } + pControl = pControl->GetParent(); + } + + return inputEnabled; +} + +bool +_Control::GetInputEnableState(void) const +{ + ClearLastResult(); + + if (__inputLockRefCount != 0) + { + return false; + } + else + { + return true; + } +} + +void +_Control::LockInputEvent(void) +{ + __inputLockRefCount++; + CallOnAncestorInputEnableStateChanged(*this); +} + +void +_Control::UnlockInputEvent(void) +{ + __inputLockRefCount--; + if (__inputLockRefCount < 0) + { + __inputLockRefCount = 0; + } +} + +bool +_Control::IsVisible(void) const +{ + ClearLastResult(); + + if (IsAttachedToMainTree() == false) + { + SetLastResult(E_SYSTEM); + return false; + } + + bool visible = true; + const _Control* pControl = this; + + while (pControl) + { + if (!pControl->GetVisibleState()) + { + visible = false; + break; + } + pControl = pControl->GetParent(); + } + + return visible; +} + +bool +_Control::GetVisibleState(void) const +{ + ClearLastResult(); + return __visibleState; +} + +void +_Control::SetVisibleState(bool visibleState) +{ + ClearLastResult(); + UpdateFocusList(); + + const bool changed = (__visibleState != visibleState) || !__initVisibleState; + + if (changed) + { + GetControlDelegate().OnVisibleStateChanging(); + } + + __visibleState = visibleState; + GetVisualElement()->SetShowState(visibleState); + + if (visibleState == false) + { + int owneeCount = GetOwneeCount(); + for (int i = 0; i < owneeCount; ++i) + { + _Window* pWindow = GetOwnee(i); + if (pWindow) + { + pWindow->SetVisibleState(visibleState); + } + } + } + + if (changed) + { + GetControlDelegate().OnVisibleStateChanged(); + CallOnAncestorVisibleStateChanged(*this); + _Control* pParent = GetParent(); + if (pParent) + { + pParent->GetControlDelegate().OnChildVisibleStateChanged(*this); + } + + ClearLastResult(); + } + + __initVisibleState = true; +} + +bool +_Control::IsLayoutable(void) const +{ + ClearLastResult(); + return IsMovable(); +} + +bool +_Control::IsClipToParent(void) const +{ + ClearLastResult(); +// SysAssert(GetVisualElement()->IsClipToParent() == __clipToParent); + return __clipToParent; +} + +result +_Control::SetClipToParent(bool clipToParent) +{ + ClearLastResult(); + result r = E_SUCCESS; + + __clipToParent = clipToParent; + r = GetVisualElement()->SetClipToParent(clipToParent); + SysTryReturn(NID_UI, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + return E_SUCCESS; +} + +result +_Control::SetClipChildrenEnabled(bool clipChildren) +{ + ClearLastResult(); + //result r = E_SUCCESS; + + GetVisualElement()->SetClipChildrenEnabled(clipChildren); + //SysTryReturn(NID_UI, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + return E_SUCCESS; +} + +Rectangle +_Control::GetBounds(void) const +{ + ClearLastResult(); + return _CoordinateSystemUtils::ConvertToInteger(__bounds); +} + +FloatRectangle +_Control::GetBoundsF(void) const +{ + ClearLastResult(); + return __bounds; +} + +Point +_Control::GetPosition(void) const +{ + ClearLastResult(); + return Point(_CoordinateSystemUtils::ConvertToInteger(__bounds.x), _CoordinateSystemUtils::ConvertToInteger(__bounds.y)); +} + +FloatPoint +_Control::GetPositionF(void) const +{ + ClearLastResult(); + return FloatPoint(__bounds.x, __bounds.y); +} + +Dimension +_Control::GetSize(void) const +{ + ClearLastResult(); + return Dimension(_CoordinateSystemUtils::ConvertToInteger(__bounds.width), _CoordinateSystemUtils::ConvertToInteger(__bounds.height)); +} + +FloatDimension +_Control::GetSizeF(void) const +{ + ClearLastResult(); + return FloatDimension(__bounds.width, __bounds.height); +} + +// E_SYSTEM +result +_Control::UpdateBoundsOfVisualElement(const FloatRectangle& controlBounds) +{ + FloatRectangle rect(controlBounds.x, controlBounds.y, controlBounds.width, controlBounds.height); + + _Control* pParent = GetParent(); + if (__area == _CONTROL_AREA_CLIENT && pParent) + { + const FloatRectangle clientBounds = pParent->GetClientBoundsF(); + rect.x += clientBounds.x; + rect.y += clientBounds.y; + } + + GetVisualElement()->SetBounds(rect); + + return E_SUCCESS; +} + +result +_Control::AdjustAbsoluteBounds(_Control& control, bool update) +{ + result r = E_SUCCESS; + + if (update && (&control != this)) + { + FloatRectangle fbounds = control.GetBoundsF(); + + 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) + { + + if (pChild == this) + { + r = AdjustAbsoluteBounds(*pChild, false); + } + else + { + r = AdjustAbsoluteBounds(*pChild); + } + if (IsFailed(r)) + { + SysLog(NID_UI_CTRL, "[%s] Propagated", GetErrorMessage(GetLastResult())); + } + } + } + + return r; +} + +result +_Control::AdjustAbsoluteBounds(void) +{ + result r = E_SUCCESS; + + FloatRectangle fbounds = GetBoundsF(); + + 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) + { + + if (pChild == this) + { + r = AdjustAbsoluteBounds(*pChild, false); + } + else + { + r = AdjustAbsoluteBounds(*pChild); + } + if (IsFailed(r)) + { + SysLog(NID_UI_CTRL, "[%s] Propagated", GetErrorMessage(GetLastResult())); + } + } + } + + return r; +} + + +bool +_Control::IsInSizeRange(const Dimension& size) const +{ + return (__minSize.width <= size.width) && (size.width <= __maxSize.width) && + (__minSize.height <= size.height) && (size.height <= __maxSize.height); +} + +bool +_Control::IsInSizeRange(const FloatDimension& size) const +{ + 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, bool animating) +{ + result r = E_SUCCESS; + + FloatRectangle bounds(newBounds.x, newBounds.y, newBounds.width, newBounds.height); + + _IControlDelegate& delegate = GetControlDelegate(); + + const bool moved = (__bounds.x != bounds.x) || (__bounds.y != bounds.y); + const bool resized = (__bounds.width != bounds.width) || (__bounds.height != bounds.height); + + if ((moved || resized) && callBoundsChangeCallbacks) + { + r = delegate.OnBoundsChanging(_CoordinateSystemUtils::ConvertToInteger(bounds)); + if (IsFailed(r)) + { + SysLogException(NID_UI, r, "[%s] Callback returns exception.", GetErrorMessage(r)); + return r; // Relay the result; + } + r = delegate.OnBoundsChanging(bounds); + if (IsFailed(r)) + { + SysLogException(NID_UI, r, "[%s] Callback returns exception.", GetErrorMessage(r)); + return r; // Relay the result; + } + } + + if (moved || resized) + { + const FloatRectangle fbounds(bounds.x, bounds.y, bounds.width, bounds.height); + if (IsLayoutChangable() == false) + { + if (animating == false) + { + r = UpdateBoundsOfVisualElement(FloatRectangle(0.0f, 0.0f, fbounds.width, fbounds.height)); + } + } + else + { + 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); + } + } + } + } + + SysAssert(r == E_SUCCESS); // [ToDo] Exception check and rollback. + + __bounds = bounds; + + if (changeLayoutBaseRect) + { + __pLayoutContainer->OnChangeBaseRect(); + } + + if ((moved || resized) && callBoundsChangeCallbacks) + { + if (IsMovable() && IsResizable()) + { + SetClientBounds(FloatRectangle(0.0f, 0.0f, GetSizeF().width, GetSizeF().height)); + } + if (__pFocusVisualElement) + { + __pFocusVisualElement->SetBounds(FloatRectangle(0, 0, __bounds.width, __bounds.height)); + } + delegate.OnBoundsChanged(); + + _Control* pParent = GetParent(); + if (pParent) + { + pParent->GetControlDelegate().OnChildBoundsChanged(*this); + } + + ControlList& children = GetChildList(); + _Control* pChild = null; + int childrenCount = children.GetCount(); + + for (int index = 0; index < childrenCount; index++) + { + r = children.GetAt(index, pChild); + if (!IsFailed(r)) + { + pChild->GetControlDelegate().OnParentBoundsChanged(*this); + } + } + } + + if (moved || resized) + { + InvalidateHierarchyAbsoluteBounds(*this); + } + + ClearLastResult(); + return E_SUCCESS; +} + +// Custom Exception: ex) Location::Map +result +_Control::AdjustSizeToRange(void) +{ + ClearLastResult(); + result r = E_SUCCESS; + + SysAssert(IsResizable()); + + FloatDimension size = GetSizeF(); + bool changed = ::AdjustSizeToRange(size, __minSize, __maxSize); + if (!changed) + { + return E_SUCCESS; + } + + FloatRectangle newBounds(__bounds.x, __bounds.y, size.width, size.height); + r = SetBoundsFinal(newBounds, true, true); + if (IsFailed(r)) + { + return r; + } + + return E_SUCCESS; +} + +// Custom Exception: ex) Location::Map +// E_INVALID_ARG +result +_Control::SetBoundsInternal(const FloatRectangle& bounds, bool callBoundsChangeCallbacks) +{ + SysTryReturn(NID_UI, + 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(%f, %f) to max size(%f, %f).", + bounds.width, bounds.height, __minSize.width, __minSize.height, __maxSize.width, __maxSize.height); + + SetUpdateLayoutState(true); + + return SetBoundsFinal(bounds, true, callBoundsChangeCallbacks); +} + +// Custom Exception: ex) Location::Map +// E_INVALID_ARG +// E_UNSUPPORTED_OPERATION +result +_Control::SetBounds(const Rectangle& bounds, bool callBoundsChangeCallbacks) +{ + ClearLastResult(); + + __isChangedPositionByUser = true; + + if (callBoundsChangeCallbacks) + { + SysTryReturn(NID_UI, + IsMovable() && IsResizable(), E_UNSUPPORTED_OPERATION, + E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] Not movable nor resizable."); + } + FloatRectangle floatBounds(bounds.x, bounds.y, bounds.width, bounds.height); + + return SetBoundsInternal(floatBounds, callBoundsChangeCallbacks); +} + +// Custom Exception: ex) Location::Map +// E_INVALID_ARG +// E_UNSUPPORTED_OPERATION +result +_Control::SetBounds(const FloatRectangle& bounds, bool callBoundsChangeCallbacks) +{ + ClearLastResult(); + + __isChangedPositionByUser = true; + + if (callBoundsChangeCallbacks) + { + SysTryReturn(NID_UI, + IsMovable() && IsResizable(), E_UNSUPPORTED_OPERATION, + E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] Not movable nor resizable."); + } + + return SetBoundsInternal(bounds, callBoundsChangeCallbacks); +} + +// A custom Exception can occur. ex) Location::Map +// E_INVALID_ARG +// E_UNSUPPORTED_OPERATION +result +_Control::SetPosition(const Point& position) +{ + ClearLastResult(); + + __isChangedPositionByUser = true; + + SysTryReturn(NID_UI, + IsMovable(), E_UNSUPPORTED_OPERATION, + E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] Not movable."); + + return SetBoundsInternal(FloatRectangle(position.x, position.y, __bounds.width, __bounds.height), true); +} + +result +_Control::SetPosition(const FloatPoint& position) +{ + ClearLastResult(); + + __isChangedPositionByUser = true; + + SysTryReturn(NID_UI, + IsMovable(), E_UNSUPPORTED_OPERATION, + E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] Not movable."); + + return SetBoundsInternal(FloatRectangle(position.x, position.y, __bounds.width, __bounds.height), true); +} + +// Custom Exception: ex) Location::Map +// E_INVALID_ARG +// E_UNSUPPORTED_OPERATION +result +_Control::SetSize(const Dimension& size) +{ + ClearLastResult(); + + SysTryReturn(NID_UI, + IsResizable(), E_UNSUPPORTED_OPERATION, + E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] Not resizable."); + + return SetBoundsInternal(FloatRectangle(__bounds.x, __bounds.y, size.width, size.height), true); +} + +result +_Control::SetSize(const FloatDimension& size) +{ + ClearLastResult(); + + SysTryReturn(NID_UI, + IsResizable(), E_UNSUPPORTED_OPERATION, + E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] Not resizable."); + + 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 +{ + ClearLastResult(); + + return _CoordinateSystemUtils::ConvertToInteger(__minSize); +} + +FloatDimension +_Control::GetMinimumSizeF(void) const +{ + ClearLastResult(); + + return __minSize; +} + +Dimension +_Control::GetMaximumSize(void) const +{ + ClearLastResult(); + + return _CoordinateSystemUtils::ConvertToInteger(__maxSize); +} + +FloatDimension +_Control::GetMaximumSizeF(void) const +{ + ClearLastResult(); + + return __maxSize; +} + +// Custom Exception: ex) Location::Map +// E_UNSUPPORTED_OPERATION +// E_INVALID_ARG +result +_Control::SetMinimumSize(const Dimension& newMinSize) +{ + ClearLastResult(); + + SysTryReturn(NID_UI, + IsResizable(), E_UNSUPPORTED_OPERATION, + E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] Not resizable."); + + SysTryReturn(NID_UI, + (newMinSize.width >= 0 && newMinSize.height >= 0), E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] The width or height is smaller than 0."); + + SysTryReturn(NID_UI, + (newMinSize.width <= MAX_LENGTH && newMinSize.height <= MAX_LENGTH), E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] The width or height is greater than %d.", MAX_LENGTH); + + if (__maxSize.width < newMinSize.width) + { + __maxSize.width = newMinSize.width; + } + if (__maxSize.height < newMinSize.height) + { + __maxSize.height = newMinSize.height; + } + + __minSize = _CoordinateSystemUtils::ConvertToFloat(newMinSize); + return AdjustSizeToRange(); +} + +result +_Control::SetMinimumSize(const FloatDimension& newMinSize) +{ + ClearLastResult(); + + SysTryReturn(NID_UI, + IsResizable(), E_UNSUPPORTED_OPERATION, + E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] Not resizable."); + + SysTryReturn(NID_UI, + (newMinSize.width >= 0 && newMinSize.height >= 0), E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] The width or height is smaller than 0."); + + SysTryReturn(NID_UI, + (newMinSize.width <= MAX_LENGTH && newMinSize.height <= MAX_LENGTH), E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] The width or height is greater than %d.", MAX_LENGTH); + + if (__maxSize.width < newMinSize.width) + { + __maxSize.width = newMinSize.width; + } + if (__maxSize.height < newMinSize.height) + { + __maxSize.height = newMinSize.height; + } + + __minSize = newMinSize; + return AdjustSizeToRange(); +} + +// Custom Exception: ex) Location::Map +// E_UNSUPPORTED_OPERATION +// E_INVALID_ARG +result +_Control::SetMaximumSize(const Dimension& newMaxSize) +{ + ClearLastResult(); + + SysTryReturn(NID_UI, + IsResizable(), E_UNSUPPORTED_OPERATION, + E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] Not resizable."); + + SysTryReturn(NID_UI, + (newMaxSize.width >= 0 && newMaxSize.height >= 0), E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] The width or height is smaller than 0."); + + SysTryReturn(NID_UI, + (newMaxSize.width <= MAX_LENGTH && newMaxSize.height <= MAX_LENGTH), E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] The width or height is greater than %d.", MAX_LENGTH); + + if (newMaxSize.width < __minSize.width) + { + __minSize.width = newMaxSize.width; + } + if (newMaxSize.height < __minSize.height) + { + __minSize.height = newMaxSize.height; + } + + __maxSize = _CoordinateSystemUtils::ConvertToFloat(newMaxSize); + return AdjustSizeToRange(); +} + +result +_Control::SetMaximumSize(const FloatDimension& newMaxSize) +{ + ClearLastResult(); + + SysTryReturn(NID_UI, + IsResizable(), E_UNSUPPORTED_OPERATION, + E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] Not resizable."); + + SysTryReturn(NID_UI, + (newMaxSize.width >= 0 && newMaxSize.height >= 0), E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] The width or height is smaller than 0."); + + SysTryReturn(NID_UI, + (newMaxSize.width <= MAX_LENGTH && newMaxSize.height <= MAX_LENGTH), E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] The width or height is greater than %d.", MAX_LENGTH); + + if (newMaxSize.width < __minSize.width) + { + __minSize.width = newMaxSize.width; + } + if (newMaxSize.height < __minSize.height) + { + __minSize.height = newMaxSize.height; + } + + __maxSize = newMaxSize; + return AdjustSizeToRange(); +} + + +Point +_Control::ConvertToControlPosition(const Point& screenPosition) const +{ + Point controlPosition; + Rectangle absoluteBounds = GetAbsoluteBounds(); + + controlPosition.x = screenPosition.x - absoluteBounds.x; + controlPosition.y = screenPosition.y - absoluteBounds.y; + + return controlPosition; +} + +FloatPoint +_Control::ConvertToControlPosition(const FloatPoint& screenPosition) const +{ + FloatPoint controlPosition; + FloatRectangle absoluteBounds = GetAbsoluteBoundsF(); + + controlPosition.x = screenPosition.x - absoluteBounds.x; + controlPosition.y = screenPosition.y - absoluteBounds.y; + + return controlPosition; +} + +Point +_Control::ConvertToScreenPosition(const Point& controlPosition) const +{ + Point screenPosition; + Rectangle absoluteBounds = GetAbsoluteBounds(); + + screenPosition.x = controlPosition.x + absoluteBounds.x; + screenPosition.y = controlPosition.y + absoluteBounds.y; + + return screenPosition; +} + +FloatPoint +_Control::ConvertToScreenPosition(const FloatPoint& controlPosition) const +{ + FloatPoint screenPosition; + FloatRectangle absoluteBounds = GetAbsoluteBoundsF(); + + screenPosition.x = controlPosition.x + absoluteBounds.x; + screenPosition.y = controlPosition.y + absoluteBounds.y; + + return screenPosition; +} + +Rectangle +_Control::GetClientBounds(void) const +{ + if (!__isSetClientBounds) + { + return Rectangle(0, 0, __bounds.width, __bounds.height); + } + + return _CoordinateSystemUtils::ConvertToInteger(__clientBounds); +} + +FloatRectangle +_Control::GetClientBoundsF(void) const +{ + if (!__isSetClientBounds) + { + return FloatRectangle(0.0f, 0.0f, __bounds.width, __bounds.height); + } + + return __clientBounds; +} + + +Rectangle +_Control::GetClientBounds(const Tizen::Graphics::Dimension& size) const +{ + if (!__isSetClientBounds) + { + return Rectangle(0, 0, size.width, size.height); + } + + return _CoordinateSystemUtils::ConvertToInteger(__clientBounds); +} + + +FloatRectangle +_Control::GetClientBoundsF(const Tizen::Graphics::FloatDimension& size) const +{ + if (!__isSetClientBounds) + { + return FloatRectangle(0.0f, 0.0f, size.width, size.height); + } + + return __clientBounds; +} + +Rectangle +_Control::GetAbsoluteBounds(bool recalcAlways) const +{ + if (!recalcAlways && !__needRecalcAbsBounds) + { + return __absoluteBounds; + } + + Point accumPoint; + Rectangle absoluteBounds; + Rectangle clientBounds; + + const _Control* pSelf = this; + const _Control* pParent = GetParent(); + bool needRecalc = true; + + while (pParent) + { + if (pParent->__needRecalcAbsBounds) + { + 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); + + 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(); + needRecalc = false; + break; + } + } + + if (needRecalc) + { + _Window* pWindow = GetRootWindow(); + if (pWindow) + { + Point winPoint = pWindow->GetPosition(); + accumPoint.x += winPoint.x; + accumPoint.y += winPoint.y; + } + } + + absoluteBounds.x = accumPoint.x; + absoluteBounds.y = accumPoint.y; + absoluteBounds.width = __bounds.width; + absoluteBounds.height = __bounds.height; + + const_cast<_Control*>(this)->__absoluteBounds = absoluteBounds; + const_cast<_Control*>(this)->__needRecalcAbsBounds = false; + + return absoluteBounds; +} + +FloatRectangle +_Control::GetAbsoluteBoundsF(bool recalcAlways) const +{ + if (!recalcAlways && !__needRecalcAbsBoundsF) + { + return __absoluteBoundsF; + } + + FloatPoint accumPoint; + FloatRectangle absoluteBounds; + FloatRectangle clientBounds; + + const _Control* pSelf = this; + const _Control* pParent = GetParent(); + bool needRecalc = true; + + while (pParent) + { + if (pParent->__needRecalcAbsBoundsF) + { + 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); + + 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(); + needRecalc = false; + break; + } + } + + if (needRecalc) + { + _Window* pWindow = GetRootWindow(); + if (pWindow) + { + FloatPoint winPoint = pWindow->GetPositionF(); + accumPoint.x += winPoint.x; + accumPoint.y += winPoint.y; + } + } + + absoluteBounds.x = accumPoint.x; + absoluteBounds.y = accumPoint.y; + absoluteBounds.width = __bounds.width; + absoluteBounds.height = __bounds.height; + + const_cast<_Control*>(this)->__absoluteBoundsF = absoluteBounds; + const_cast<_Control*>(this)->__needRecalcAbsBoundsF = false; + + return absoluteBounds; +} + +result +_Control::SetClientBounds(const Rectangle& bounds) +{ + ClearLastResult(); + + const bool moved = (__clientBounds.x != _CoordinateSystemUtils::ConvertToFloat(bounds).x) || (__clientBounds.y != _CoordinateSystemUtils::ConvertToFloat(bounds).y); + const bool resized = (__clientBounds.width != _CoordinateSystemUtils::ConvertToFloat(bounds).width) || (__clientBounds.height != _CoordinateSystemUtils::ConvertToFloat(bounds).height); + + SysTryReturn(NID_UI, + IsMovable() && IsResizable(), E_UNSUPPORTED_OPERATION, + E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] Not movable nor resizable."); + __clientBounds = _CoordinateSystemUtils::ConvertToFloat(bounds); + __isSetClientBounds = true; + + if (moved || resized) + { + result r = AdjustAbsoluteBounds(*this); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + SetUpdateLayoutState(true); + InvalidateHierarchyAbsoluteBounds(*this); + } + return E_SUCCESS; +} + +result +_Control::SetClientBounds(const FloatRectangle& bounds) +{ + ClearLastResult(); + + const bool moved = (__clientBounds.x != bounds.x) || (__clientBounds.y != bounds.y); + const bool resized = (__clientBounds.width != bounds.width) || (__clientBounds.height != bounds.height); + + SysTryReturn(NID_UI, + IsMovable() && IsResizable(), E_UNSUPPORTED_OPERATION, + E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] Not movable nor resizable."); + __clientBounds = bounds; + __isSetClientBounds = true; + + if (moved || resized) + { + 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) const +{ + return __isSetClientBounds; +} + +void +_Control::UpdateClientBounds(const FloatDimension& size, FloatRectangle& clientBounds) +{ + clientBounds.width = size.width; + clientBounds.height = size.height; +} + +Color +_Control::GetBackgroundColor(void) const +{ + ClearLastResult(); + return __backgroundColor; +} + +void +_Control::SetBackgroundColor(const Color& color) +{ + ClearLastResult(); + __backgroundColor = color; + + _ControlVisualElement* pCVE = dynamic_cast <_ControlVisualElement*>(GetVisualElement()); + if (pCVE) + { + pCVE->SetBackgroundColor( + _Colorf( + (float)color.GetRed() / 255.0f, + (float)color.GetGreen() / 255.0f, + (float)color.GetBlue() / 255.0f, + (float)color.GetAlpha() / 255.0f + ) + ); + } + + GetControlDelegate().OnBackgroundColorChanged(const_cast(color)); + ClearLastResult(); +} + +_Control::~_Control(void) +{ + if (!__destroying) + { + __destroying = true; + } + + DoBacktrace(__pDeleteBacktrace.get()); + + DetachAllChildren(); + DetachAllOwnees(); + _ControlManager::GetInstance()->TakeFocusFromControl(*this); + DisposeControl(); + ReleaseHandle(); + + if (__pFont) + { + delete __pFont; + __pFont = null; + } + +// Dangerous: it clears last result and log in catch block. +// ClearLastResult(); +} + +void +_Control::DisposeControl(void) +{ + __pControlDelegate = null; + + delete __pLayoutItemHandler; + __pLayoutItemHandler = null; + + delete __pLayoutContainer; + __pLayoutContainer = null; + + delete __pChildren; + __pChildren = null; + + delete __pOwnees; + __pOwnees = null; + + if (__pVisualElement) + { + __pVisualElement->Destroy(); + } + __pVisualElement = null; + + delete __pVisualElementContentProvider; + __pVisualElementContentProvider = null; + + delete __pVisualElementEventListener; + __pVisualElementEventListener = null; + + delete __pCoreGestureDetectors; + __pCoreGestureDetectors = null; + + delete __pDataBindingContext; + __pDataBindingContext = null; + + ClearStartedGestureDetectorList(); + delete __pDetectStartedGestureMap; + __pDetectStartedGestureMap = null; + + delete __pDelayedTouchInfoList; + __pDelayedTouchInfoList = null; + + delete __pAccessibilityContainer; + __pAccessibilityContainer = null; + + if (__pFocusVisualElement) + { + __pFocusVisualElement.release(); + } +} + +// E_OUT_OF_MEMORY +// E_SYSTEM +_Control::_Control(void) + : __needRecalcRootWindow(true) + , __needRecalcAbsBounds(true) + , __needRecalcAbsBoundsF(true) + , __pRootWindow(null) + , __name(L"") + , __pParent(null) + , __pChildren(null) + , __pOwnees(null) + , __bounds(0.0f, 0.0f, 0.0f, 0.0f) + , __contentAreaBounds(0.0f, 0.0f, 0.0f, 0.0f) + , __clientBounds(0.0f, 0.0f, 0.0f, 0.0f) + , __absoluteBounds(0, 0, 0, 0) + , __absoluteBoundsF(0.0f, 0.0f, 0.0f, 0.0f) + , __invalidatedBounds(0.0f, 0.0f, 0.0f, 0.0f) + , __minSize(FloatDimension(0.0f, 0.0f)) + , __maxSize(FloatDimension(MAX_LENGTH, MAX_LENGTH)) + , __backgroundColor(Color::GetColor(COLOR_ID_BLACK)) + , __movable(true) + , __resizable(true) + , __focusable(true) + , __nativeObjectFocusable(true) + , __enabledState(true) + , __visibleState(true) + , __initVisibleState(false) + , __clipToParent(true) + , __multiTouchEnabled(false) + , __dragEnabled(false) + , __dropEnabled(false) + , __drawWhenVisible(true) + , __isPostOrderTraversal(false) + , __isCalledCallOnAttachingToMainTree(false) + , __isCalledCallOnPreAttachedToMainTree(false) + , __isCalledCallOnAttachedToMainTree(false) + , __isSetClientBounds(false) + , __isCalledGetCanvasN(false) + , __isFocusMode(false) + , __isNavigatable(true) + , __isFocusWindowActivationChecked(false) + , __isChangedPositionByUser(false) + , __pVisualElementContentProvider(null) + , __pVisualElement(null) + , __pVisualElementEventListener(null) + , __pLayoutItemHandler(null) + , __pPortraitLayout(null) + , __pLandscapeLayout(null) + , __pLayoutContainer(null) + , __area(_CONTROL_AREA_NONE) + , __layer(_CONTROL_LAYER_NONE) + , __orientation(_CONTROL_ORIENTATION_PORTRAIT) + , __rotation(_CONTROL_ROTATION_0) + , __pTouchEventPreviewer(null) + , __pKeyEventPreviewer(null) + , __pNotificationEventPreviewer(null) + , __pKeyEventListener(null) + , __pFocusEventListener(null) + , __pNotificationEventListener(null) + , __pCoreGestureDetectors(null) + , __pDetectStartedGestureMap(null) + , __pDelayedTouchInfoList(null) + , __touchMoveAllowance(3) + , __pressThresHold(0.0f) + , __inputLockRefCount(0) + , __screenDpi(0) + , __isSentDelayedEvent(false) + , __isSendingDelayedEvent(false) + , __isChangingEventTarget(false) + , __pDataBindingContext(null) + , __pControlDelegate(null) + , __pUserData(null) + , __destroying(false) + , __isEventEnableState(true) + , __isEffectSoundEnabled(true) + , __isControlFontChanged(false) + , __pFont(null) + , __fontName(L"") + , __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); + + __pLayoutItemHandler = new (std::nothrow) LayoutItemHandler(this); + if (!__pLayoutItemHandler) + { + goto CATCH; + } + + __pLayoutContainer = CreateLayoutContainerN(__pLayoutItemHandler); + if (!__pLayoutContainer) + { + goto CATCH; + } + + __pChildren = ::CreateControlListN(); + if (!__pChildren) + { + goto CATCH; + } + + __pOwnees = ::CreateWindowListN(); + if (!__pOwnees) + { + goto CATCH; + } + + __pVisualElement = ::CreateVisualElementN(); + if (!__pVisualElement) + { + goto CATCH; + } + + __pVisualElement->SetUserData(this); + __pVisualElement->SetClipChildrenEnabled(true); + __pVisualElement->SetRedrawOnResizeEnabled(true); + + __pVisualElementContentProvider = new (std::nothrow) ControlVisualElementContentProvider(*this); + SysTryCatch(NID_UI, __pVisualElementContentProvider, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + GetVisualElement()->SetContentProvider(__pVisualElementContentProvider); + + __pVisualElementEventListener = new (std::nothrow) ControlVisualElementEventListener(*this); + SysTryCatch(NID_UI, __pVisualElementEventListener, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + GetVisualElement()->SetVisualElementEventListener(__pVisualElementEventListener); + + __pDetectStartedGestureMap = ::CreateGestureMapN(); + if (!__pDetectStartedGestureMap) + { + goto CATCH; + } + + __pCoreGestureDetectors = new (std::nothrow) LinkedListT<_TouchGestureDetector*>; + if (!__pCoreGestureDetectors) + { + goto CATCH; + } + + __pDelayedTouchInfoList = new (std::nothrow) LinkedListT<_TouchInfo*>; + if (!__pDelayedTouchInfoList) + { + goto CATCH; + } + + SetEventPreviewer<_UI_EVENT_TOUCH>(this); + SetEventPreviewer<_UI_EVENT_KEY>(this); + SetEventPreviewer<_UI_EVENT_NOTIFICAITON>(this); + + SetEventListener<_UI_EVENT_NOTIFICAITON>(this); + SetEventListener<_UI_EVENT_FOCUS>(this); + + SetPropagatedTouchEventListener(this); + SetPropagatedKeyEventListener(this); + GET_COLOR_CONFIG(BASIC::background, __backgroundColor); + + if (IsFailed(GetLastResult())) + { + SysLog(NID_UI_CTRL, "[%s] Propagated", GetErrorMessage(GetLastResult())); + } + + __screenDpi = _ControlManager::GetInstance()->GetScreenDpi(); + + return; + +CATCH: + DisposeControl(); + return; +} + +void +_Control::AcquireHandle(void) +{ + __controlHandle = _ControlManager::GetInstance()->Register(this); // [ToDo] exception? +} + +void +_Control::ReleaseHandle(void) +{ + _ControlManager::GetInstance()->Release(__controlHandle); // [ToDo] exception? +} + +void +_Control::SetDrawWhenVisible(bool draw) +{ + __drawWhenVisible = draw; +} + +bool +_Control::IsDrawWhenVisible(void) const +{ + return __drawWhenVisible; +} + +void +_Control::SetTerminatingOrder(bool postOrderTraversal) +{ + __isPostOrderTraversal = postOrderTraversal; +} + +bool +_Control::IsPostOrderTraversal(void) const +{ + return __isPostOrderTraversal; +} + +void +_Control::SetParent(_Control* pParent) +{ + ClearLastResult(); + __pParent = pParent; +} + +// E_OUT_OF_MEMORY +// Only called by _Window::SetOwner(pOwner) +result +_Control::AttachOwnee(_Window& window) +{ + ClearLastResult(); + result r = E_SUCCESS; + + _Control* pOldOwner = window.GetOwner(); + if (pOldOwner) + { + pOldOwner->DetachOwnee(window); + } + + r = __pOwnees->Add(&window); + if (IsFailed(r)) + { + SysLogException(NID_UI, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + return E_OUT_OF_MEMORY; + } + + return E_SUCCESS; +} + +int +_Control::GetOwneeCount(void) const +{ + ClearLastResult(); + return __pOwnees->GetCount(); +} + +// E_OUT_OF_RANGE +_Window* +_Control::GetOwnee(int index) const +{ + ClearLastResult(); + result r = E_SUCCESS; + + _Window* pOwnee = null; + r = __pOwnees->GetAt(index, pOwnee); + if (IsFailed(r)) + { + SysLogException(NID_UI, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The specified index is out of range."); + return null; + } + + return pOwnee; +} + +// Called by _Window::SetOwner(null) +void +_Control::DetachOwnee(_Window& ownee) +{ + ClearLastResult(); + result r = E_SUCCESS; + + _Control* pOwner = ownee.GetOwner(); + if (pOwner != this) + { + return; + } + + r = __pOwnees->Remove(&ownee); + if (IsFailed(r)) + { + SysLogException(NID_UI, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The specified index is out of range."); + } +} + +void +_Control::DetachAllOwnees(void) +{ + ClearLastResult(); + + int owneeCount = GetOwneeCount(); + while (owneeCount--) + { + _Window* pOwnee = GetOwnee(0); + if (pOwnee == null) + { + continue; + } + + pOwnee->SetOwner(null); + } +} + +_Layout::LayoutContainer& +_Control::GetLayoutContainer() const +{ + return *__pLayoutContainer; +} + +void +_Control::SetMultiTouchEnabled(bool enabled) +{ + ClearLastResult(); + __multiTouchEnabled = enabled; +} + +bool +_Control::IsMultiTouchEnabled(void) const +{ + ClearLastResult(); + return __multiTouchEnabled; +} + +void +_Control::SetMovable(bool movable) +{ + ClearLastResult(); + __movable = movable; +} + +void +_Control::SetResizable(bool resizable) +{ + ClearLastResult(); + + if (!resizable) + { + __minSize = __maxSize = GetSizeF(); + } + + if (!__resizable && resizable) + { + __minSize = FloatDimension(0.0f, 0.0f); + __maxSize = FloatDimension(MAX_LENGTH, MAX_LENGTH); + } + + __resizable = resizable; +} + +_Layout::Layout* +_Control::GetLayout(void) const +{ + ClearLastResult(); + _Layout::Layout* pLayout = __pLayoutContainer->GetLayout(); + + SysAssert(GetLastResult() == E_SUCCESS); + return pLayout; +} + +result +_Control::SetCurrentLayout(_Layout::Layout& layout) +{ + ClearLastResult(); + return __pLayoutContainer->SetCurrentLayout(layout); +} + +result +_Control::AddLayout(_Layout::Layout& layout) +{ + ClearLastResult(); + return __pLayoutContainer->AddLayout(layout); +} + +void +_Control::SetUpdateLayoutState(bool state) +{ + _Layout::Layout* pLayout = GetLayout(); + if (pLayout) + { + pLayout->SetUpdateState(state); + } +} + +void +_Control::SetEffectSoundEnabled(bool enable) +{ + __isEffectSoundEnabled = enable; +} + +bool +_Control::IsEffectSoundEnabled(void) const +{ + return __isEffectSoundEnabled; +} + +_DataBindingContext* +_Control::GetDataBindingContext(void) +{ + return __pDataBindingContext; +} +_AccessibilityContainer* +_Control::GetAccessibilityContainer(void) +{ + return __pAccessibilityContainer; +} +void +_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 +{ + return String(L""); +} + +void +_Control::SetTouchCapture(bool allowOutOfBounds, bool allowOwnerBounds) +{ + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + SysTryReturnVoidResult(NID_UI, pTouchManager != null, E_SYSTEM, "[E_SYSTEM] TouchManager Instance is null"); + + pTouchManager->SetCapturedControl(this, allowOutOfBounds, allowOwnerBounds); +} + +void +_Control::ReleaseTouchCapture(void) +{ + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + SysTryReturnVoidResult(NID_UI, pTouchManager != null, E_SYSTEM, "[E_SYSTEM] TouchManager Instance is null"); + + pTouchManager->SetCapturedControl(null, false, false); +} + +_Control* +_Control::GetTopmostChildAt(const Point& point) const +{ + _Control* pTouchedControl = null; + FloatPoint ptf((float) point.x, (float) point.y); + _ControlManager* pControlManager = _ControlManager::GetInstance(); + SysTryReturn(NID_UI, pControlManager, null, E_SYSTEM, "[E_SYSTEM] _ControlManager does not exist."); + + _Window* pRootWindow = GetRootWindow(); + SysTryReturn(NID_UI, pRootWindow, null, E_SYSTEM, "[E_SYSTEM] GetRootWindow() is null, this control is detached from the main trree"); + + _ControlVisualElement* pRootControlElement = dynamic_cast <_ControlVisualElement*>(pRootWindow->GetVisualElement()); + SysTryReturn(NID_UI, pRootControlElement, null, E_SYSTEM, "[E_SYSTEM] pRootControlElement is null."); + + _ControlVisualElement* pHitTestElm = pRootControlElement->GetControlChildAtPoint(ptf); + if (pHitTestElm == null) + { + SysSecureLog(NID_UI, "pHitTestElm is null, point(%f, %f)", ptf.x, ptf.y); + return null; + } + + pTouchedControl = static_cast <_Control*>(pHitTestElm->GetUserData()); + + return pTouchedControl; +} + +void +_Control::SetContentAreaBounds(const Rectangle& rect) +{ + ClearLastResult(); + + __contentAreaBounds = _CoordinateSystemUtils::ConvertToFloat(rect); +} + +void +_Control::SetContentAreaBounds(const FloatRectangle& rect) +{ + ClearLastResult(); + + __contentAreaBounds = rect; +} + +Rectangle +_Control::GetContentAreaBounds(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(__contentAreaBounds); +} + +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; +} + +Bitmap* +_Control::GetCapturedBitmapN(bool includeChildren) const +{ + result r = E_SUCCESS; + + Canvas* pCanvas = null; + Bitmap* pBitmap = null; + + pBitmap = GetControlDelegate().OnCapturedBitmapRequestedN(); + if (pBitmap == null) + { + FloatRectangle rect; + + Rectangle boundsInCanvas = GetBounds(); + boundsInCanvas.x = boundsInCanvas.y = 0; + + pCanvas = new (std::nothrow) Canvas; + SysTryReturn(NID_UI, pCanvas, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + r = pCanvas->Construct(boundsInCanvas); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagated.", GetErrorMessage(r)); + + GetVisualElement()->Draw(); + ClearLastResult(); + + rect.SetBounds(boundsInCanvas.x, boundsInCanvas.y, boundsInCanvas.width, boundsInCanvas.height); + + r = GetVisualElement()->Capture(*pCanvas, rect, includeChildren); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagated.", GetErrorMessage(r)); + + pBitmap = new (std::nothrow) Bitmap; + SysTryCatch(NID_UI, pBitmap != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + r = pBitmap->Construct(*pCanvas, boundsInCanvas); + 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()); + + delete pCanvas; + } + _BitmapImpl::ConvertToNonpremultiplied(*pBitmap, true); + + return pBitmap; + +CATCH: + delete pCanvas; + delete pBitmap; + SetLastResult(r); + + return null; +} + +Tizen::Graphics::Rectangle +_Control::GetInvalidatedBounds(void) const +{ + return _CoordinateSystemUtils::ConvertToInteger(__invalidatedBounds); +} + +Tizen::Graphics::FloatRectangle +_Control::GetInvalidatedBoundsF(void) const +{ + return __invalidatedBounds; +} + +result +_Control::AddGestureDetector(const _TouchGestureDetector& gestureDetector) +{ + ClearLastResult(); + + bool exist = __pCoreGestureDetectors->Contains(const_cast<_TouchGestureDetector*>(&gestureDetector)); + 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)); + + r = const_cast<_TouchGestureDetector&>(gestureDetector).SetControl(*this); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "Control handle is not valid."); + + const_cast<_TouchGestureDetector&>(gestureDetector).OnTouchGestureDetectorAdded(); + + return r; +} + +result +_Control::RemoveGestureDetector(const _TouchGestureDetector& gestureDetector) +{ + ClearLastResult(); + + result r = __pCoreGestureDetectors->Remove(&(const_cast<_TouchGestureDetector&>(gestureDetector))); + if (r != E_SUCCESS) + { + return r; + } + + const_cast<_TouchGestureDetector&>(gestureDetector).OnTouchGestureDetectorRemoved(); + + return E_SUCCESS; +} + +IListT <_TouchGestureDetector*>* +_Control::GetGestureDetectorList(void) const +{ + return __pCoreGestureDetectors; +} + +IMapEnumeratorT <_TouchGestureDetector*, _TouchGestureDetectorState>* +_Control::GetStartedGestureDetectorEnumeratorN(void) const +{ + return __pDetectStartedGestureMap->GetMapEnumeratorN(); +} + +IListT <_TouchGestureDetector*>* +_Control::GetStartedGestureDetectorListN(void) const +{ + return __pDetectStartedGestureMap->GetKeysN(); +} + +result +_Control::AddStartedGestureDetector(const _TouchGestureDetector& gestureDetector, _TouchGestureDetectorState state) +{ + ClearLastResult(); + + result r = E_SUCCESS; + + bool exist = false; + __pDetectStartedGestureMap->ContainsKey(const_cast<_TouchGestureDetector*>(&gestureDetector), exist); + + if (exist == false) + { + r = __pDetectStartedGestureMap->Add(const_cast<_TouchGestureDetector*>(&gestureDetector), state); + } + + return r; +} + +result +_Control::SetStartedGestureDetector(const _TouchGestureDetector& gestureDetector, _TouchGestureDetectorState state) +{ + ClearLastResult(); + + result r = E_SUCCESS; + + bool exist = false; + __pDetectStartedGestureMap->ContainsKey(const_cast<_TouchGestureDetector*>(&gestureDetector), exist); + + if (exist == true) + { + r = __pDetectStartedGestureMap->SetValue(const_cast<_TouchGestureDetector*>(&gestureDetector), state); + } + + return r; +} + +result +_Control::ClearStartedGestureDetectorList(void) +{ + ClearLastResult(); + + result r = E_SUCCESS; + + IListT<_TouchGestureDetector*>* pList = __pDetectStartedGestureMap->GetKeysN(); + if (pList) + { + IEnumeratorT<_TouchGestureDetector*>* pEnumerator = pList->GetEnumeratorN(); + if (pEnumerator) + { + while(pEnumerator->MoveNext() == E_SUCCESS) + { + _TouchGestureDetector* pGestureDetector = null; + pEnumerator->GetCurrent(pGestureDetector); + + if (pGestureDetector == null) + { + continue; + } + + __pDetectStartedGestureMap->Remove(pGestureDetector); + } + delete pEnumerator; + } + delete pList; + } + + IEnumeratorT<_TouchInfo*>* pEnumerator = __pDelayedTouchInfoList->GetEnumeratorN(); + if(pEnumerator) + { + while(pEnumerator->MoveNext() == E_SUCCESS) + { + _TouchInfo* pTouchInfo = null; + pEnumerator->GetCurrent(pTouchInfo); + if (pTouchInfo == null) + { + continue; + } + + delete pTouchInfo; + } + + __pDelayedTouchInfoList->RemoveAll(); + delete pEnumerator; + } + + __isSentDelayedEvent = false; + __isSendingDelayedEvent = false; + + return r; +} + +bool +_Control::IsDelayedTouchEventEnabled(void) const +{ + bool existDelayTouchEventGesture = false; + + IMapEnumeratorT <_TouchGestureDetector*, _TouchGestureDetectorState>* pMapEnumerator = __pDetectStartedGestureMap->GetMapEnumeratorN(); + if (pMapEnumerator) + { + while(pMapEnumerator->MoveNext() == E_SUCCESS) + { + _TouchGestureDetector* pGestureDetector = null; + pMapEnumerator->GetKey(pGestureDetector); + + if (pGestureDetector == null) + { + continue; + } + + _TouchGestureDetectorState state = _TOUCH_GESTURE_DETECTOR_STATE_READY; + pMapEnumerator->GetValue(state); + + if (pGestureDetector->IsDelayTouchEventEnabled()) + { + existDelayTouchEventGesture = true; + } + } + delete pMapEnumerator; + } + + bool delayTouchEvent = false; + if (existDelayTouchEventGesture) + { + pMapEnumerator = __pDetectStartedGestureMap->GetMapEnumeratorN(); + if (pMapEnumerator) + { + while(pMapEnumerator->MoveNext() == E_SUCCESS) + { + _TouchGestureDetector* pGestureDetector = null; + pMapEnumerator->GetKey(pGestureDetector); + + if (pGestureDetector == null) + { + continue; + } + + _TouchGestureDetectorState state = _TOUCH_GESTURE_DETECTOR_STATE_READY; + pMapEnumerator->GetValue(state); + + if (state == _TOUCH_GESTURE_DETECTOR_STATE_STARTED) + { + delayTouchEvent = true; + break; + } + } + delete pMapEnumerator; + } + + return delayTouchEvent; + } + else + { + return false; + } +} + +bool +_Control::IsPossibleToSendDelayedTouchEvent(void) const +{ + bool existDelayTouchEventGesture = false; + + IMapEnumeratorT <_TouchGestureDetector*, _TouchGestureDetectorState>* pMapEnumerator = __pDetectStartedGestureMap->GetMapEnumeratorN(); + if (pMapEnumerator) + { + while(pMapEnumerator->MoveNext() == E_SUCCESS) + { + _TouchGestureDetector* pGestureDetector = null; + pMapEnumerator->GetKey(pGestureDetector); + + if (pGestureDetector == null) + { + continue; + } + + _TouchGestureDetectorState state = _TOUCH_GESTURE_DETECTOR_STATE_READY; + pMapEnumerator->GetValue(state); + + if (pGestureDetector->IsDelayTouchEventEnabled()) + { + existDelayTouchEventGesture = true; + } + } + delete pMapEnumerator; + } + + bool allFailed = true; + if (existDelayTouchEventGesture) + { + pMapEnumerator = __pDetectStartedGestureMap->GetMapEnumeratorN(); + if (pMapEnumerator) + { + while(pMapEnumerator->MoveNext() == E_SUCCESS) + { + _TouchGestureDetector* pGestureDetector = null; + pMapEnumerator->GetKey(pGestureDetector); + + if (pGestureDetector == null) + { + continue; + } + + _TouchGestureDetectorState state = _TOUCH_GESTURE_DETECTOR_STATE_READY; + pMapEnumerator->GetValue(state); + + if (state == _TOUCH_GESTURE_DETECTOR_STATE_SUCCESS) + { + allFailed = false; + break; + } + } + delete pMapEnumerator; + } + + return allFailed; + } + else + { + return false; + } +} + +bool +_Control::IsCancelOnGestureSuccess(void) const +{ + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + SysAssert(pTouchManager != null); + + IMapEnumeratorT <_TouchGestureDetector*, _TouchGestureDetectorState>* pMapEnumerator = __pDetectStartedGestureMap->GetMapEnumeratorN(); + if (pMapEnumerator) + { + while(pMapEnumerator->MoveNext() == E_SUCCESS) + { + _TouchGestureDetector* pGestureDetector = null; + pMapEnumerator->GetKey(pGestureDetector); + + if (pGestureDetector == null) + { + continue; + } + + _TouchGestureDetectorState state = _TOUCH_GESTURE_DETECTOR_STATE_READY; + pMapEnumerator->GetValue(state); + + if (pGestureDetector->IsCancelTouchEventOnSuccessEnabled() && state == _TOUCH_GESTURE_DETECTOR_STATE_SUCCESS && !pTouchManager->IsTouchCanceledOnGestureSuccess()) + { + delete pMapEnumerator; + return true; + } + } + delete pMapEnumerator; + } + + return false; +} + +bool +_Control::IsSentDelayedEvent(void) const +{ + return __isSentDelayedEvent; +} + +void +_Control::SetSentDelayedEvent(bool sent) +{ + __isSentDelayedEvent = sent; +} + +void +_Control::SetSendingDelayedEvent(bool sending) +{ + __isSendingDelayedEvent = sending; +} + +bool +_Control::IsSendingDelayedEvent(void) const +{ + return __isSendingDelayedEvent; +} + +void +_Control::AddTouchInfo(const _TouchInfo& touchInfo) +{ + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + SysTryReturnVoidResult(NID_UI, pTouchManager, E_SYSTEM, "[E_SYSTEM] _TouchManager does not exist."); + + _TouchInfo* pTouchInfo = new (std::nothrow) _TouchInfo; + SysTryReturnVoidResult(NID_UI, pTouchInfo, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + FloatPoint screenPoint = pTouchManager->GetScreenPoint(touchInfo.GetPointId()); + pTouchInfo->SetTouchInfo(touchInfo.GetPointId(), touchInfo.GetTouchStatus(), screenPoint, false, 0); + __pDelayedTouchInfoList->Add(pTouchInfo); +} + +IListT<_TouchInfo*>* +_Control::GetTouchInfoList(void) +{ + return __pDelayedTouchInfoList; +} + +void +_Control::SetVisualElement(_ControlVisualElement* pVisualElement) +{ + __pVisualElement = pVisualElement; +} + +_VisualElement* +_Control::GetVisualElement(void) const +{ + return __pVisualElement; +} + +void +_Control::PrintDescription(bool printChildren, int level) +{ + int count = PrintDescription(printChildren, 0, level); + + SysSecureLog(NID_UI, "%d controls were printed.", count); +} + +int +_Control::PrintDescription(bool printChildren, int depth, int level) +{ + const int PRINT_CONTROL_VE = 1; + const int PRINT_CONTROL_EVAS = 2; + const int PRINT_CONTROL_VE_EVAS = 3; + + 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()); + + // Public + String publicDescription = GetControlDelegate().GetDescription(); + if (!publicDescription.IsEmpty()) + { + SysSecureLog(NID_UI, "%ls %ls", indent.GetPointer(), publicDescription.GetPointer()); + } + + _ControlManager* pControlManager = _ControlManager::GetInstance(); + SysTryReturn(NID_UI, pControlManager, null, E_SYSTEM, "[E_SYSTEM] _ControlManager does not exist."); + + bool focused = false; + _Control* pFocusedControl = pControlManager->GetFocusControl(); + if (pFocusedControl && (pFocusedControl == this)) + { + focused = true; + } + + // Core + 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(), + 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(); + Dimension max = GetMaximumSize(); + Rectangle clientBounds = GetClientBounds(); + Rectangle absoluteBounds = GetAbsoluteBounds(); + + SysSecureLog(NID_UI, "%ls bounds(%d %d %d %d) min(%d %d) max(%d %d) scrollPos(%.2f %.2f) cbounds(%d %d %d %d) abounds(%d %d %d %d)", + indent.GetPointer(), bounds.x, bounds.y, bounds.width, bounds.height, + min.width, min.height, max.width, max.height, + GetVerticalScrollPosition(), GetHorizontalScrollPosition(), + clientBounds.x, clientBounds.y, clientBounds.width, clientBounds.height, + absoluteBounds.x, absoluteBounds.y, absoluteBounds.width, absoluteBounds.height); + + SysSecureLog(NID_UI, "%ls bgColor(0x%x) layoutable(%d) orientation(%d) drag(%d) drop(%d) area(%d) layer(%d)", + indent.GetPointer(), __backgroundColor.GetRGB32(), IsLayoutable(), GetOrientation(), IsDragEnabled(), IsDropEnabled(), GetArea(), GetLayer()); + + Canvas* pCanvas = GetCanvasN(); + if (pCanvas) + { + Rectangle canvasBounds = pCanvas->GetBounds(); + Color canvasBackgroundColor = pCanvas->GetBackgroundColor(); + Color canvasForegroundColor = pCanvas->GetForegroundColor(); + + SysSecureLog(NID_UI, "%ls canvas.bounds(%d %d %d %d) canvas.bgColor(0x%x) canvas.fgColor(0x%x)", + indent.GetPointer(), canvasBounds.x, canvasBounds.y, canvasBounds.width, canvasBounds.height, canvasBackgroundColor.GetRGB32(), canvasForegroundColor.GetRGB32()); + + delete pCanvas; + } + + SysSecureLog(NID_UI, "%ls DataBindingContext(0x%x) ControlDelegate(0x%x) UserData(0x%x) destroying(%d)", + indent.GetPointer(), __pDataBindingContext, __pControlDelegate, __pUserData, __destroying); + + // Ownees + String ownees(L""); + + for (int i = 0; i < GetOwneeCount(); ++i) + { + String ownee(L""); + _Window* pOwnee = GetOwnee(i); + if (pOwnee) + { + ownee.Format(LOG_LEN_MAX, L"0x%x ", pOwnee); + ownees.Append(ownee); + } + } + + if (!ownees.IsEmpty()) + { + SysSecureLog(NID_UI, "%ls Ownees(%ls)", indent.GetPointer(), ownees.GetPointer()); + } + + _VisualElementImpl* pVisualElementImpl = _VisualElementImpl::GetInstance(*__pVisualElement); + + SysSecureLog(NID_UI, "%ls _VisualElement(0x%x) _VisualElementImpl(0x%x) VisualElementContentProvider(0x%x) VisualElementEventListener(0x%x)", + indent.GetPointer(), __pVisualElement, pVisualElementImpl, __pVisualElementContentProvider, __pVisualElementEventListener); + + // Layout + SysSecureLog(NID_UI, "%ls LayoutItemHandler(0x%x) PortraitLayout(0x%x) LandscapeLayout(0x%x) LayoutContainer(0x%x)", + indent.GetPointer(), __pLayoutItemHandler, __pPortraitLayout, __pLandscapeLayout, __pLayoutContainer); + + // Derived class + String description = GetDescription(); + if (!description.IsEmpty()) + { + SysSecureLog(NID_UI, "%ls %ls", indent.GetPointer(), description.GetPointer()); + } + + // Print Gesture List + IListT<_TouchGestureDetector*>* pGestureList = GetGestureDetectorList(); + SysTryReturn(NID_UI, pGestureList, 0, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + IEnumeratorT<_TouchGestureDetector*>* pEnumerator = pGestureList->GetEnumeratorN(); + SysTryReturn(NID_UI, pEnumerator, 0, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + while (pEnumerator->MoveNext() == E_SUCCESS) + { + _TouchGestureDetector* pGestureDetector = null; + pEnumerator->GetCurrent(pGestureDetector); + if (pGestureDetector) + { + SysSecureLog(NID_UI, "%ls AddedGesture : %ls", indent.GetPointer(), pGestureDetector->GetDescription().GetPointer()); + } + } + + delete pEnumerator; + + // Print Started Gesture List + unique_ptr > pStartedGestureEnumerator(GetStartedGestureDetectorEnumeratorN()); + SysTryReturn(NID_UI, pStartedGestureEnumerator, 0, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + while (pStartedGestureEnumerator->MoveNext() == E_SUCCESS) + { + _TouchGestureDetector* pStartedGestureDetector = null; + pStartedGestureEnumerator->GetKey(pStartedGestureDetector); + if (pStartedGestureDetector) + { + SysSecureLog(NID_UI, "%ls StartedGesture : %ls", indent.GetPointer(), pStartedGestureDetector->GetDescription().GetPointer()); + } + } + + // 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) + { + case PRINT_CONTROL_VE: + _VeDebug::DumpVeTree(pVisualElementImpl, 0); + break; + + case PRINT_CONTROL_EVAS: + _VeDebug::DumpEvasTree(pVisualElementImpl, 0); + break; + + case PRINT_CONTROL_VE_EVAS: + _VeDebug::DumpVeTree(pVisualElementImpl, 0); + _VeDebug::DumpEvasTree(pVisualElementImpl, 0); + break; + + default: + break; + } + + 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->PrintDescription(printChildren, depth, 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 +{ + return __pTouchEventPreviewer; +} + +_IKeyEventPreviewer* +_Control::GetEventPreviewer(_IntToType<_UI_EVENT_KEY>) const +{ + return __pKeyEventPreviewer; +} + +_INotificationEventPreviewer* +_Control::GetEventPreviewer(_IntToType<_UI_EVENT_NOTIFICAITON>) const +{ + return __pNotificationEventPreviewer; +} + +_IKeyEventListener* +_Control::GetEventListener(_IntToType<_UI_EVENT_KEY>) const +{ + return __pKeyEventListener; +} + +_IFocusEventListener* +_Control::GetEventListener(_IntToType<_UI_EVENT_FOCUS>) const +{ + return __pFocusEventListener; +} + +_INotificationEventListener* +_Control::GetEventListener(_IntToType<_UI_EVENT_NOTIFICAITON>) const +{ + return __pNotificationEventListener; +} + +void +_Control::SetEventPreviewer(_IntToType<_UI_EVENT_TOUCH>, _ITouchEventPreviewer* pPreviewer) +{ + __pTouchEventPreviewer = pPreviewer; +} + +void +_Control::SetEventPreviewer(_IntToType<_UI_EVENT_KEY>, _IKeyEventPreviewer* pPreviewer) +{ + __pKeyEventPreviewer = pPreviewer; +} + +void +_Control::SetEventPreviewer(_IntToType<_UI_EVENT_NOTIFICAITON>, _INotificationEventPreviewer* pPreviewer) +{ + __pNotificationEventPreviewer = pPreviewer; +} + +void +_Control::SetEventListener(_IntToType<_UI_EVENT_FOCUS>, _IFocusEventListener* pListener) +{ + __pFocusEventListener = pListener; +} + +void +_Control::SetEventListener(_IntToType<_UI_EVENT_NOTIFICAITON>, _INotificationEventListener* pListener) +{ + __pNotificationEventListener = pListener; +} + +bool +_Control::IsDragEnabled(void) const +{ + return __dragEnabled; +} + +bool +_Control::IsDropEnabled(void) const +{ + return __dropEnabled; +} + +void +_Control::SetDragEnabled(bool enabled) +{ + __dragEnabled = enabled; +} + +void +_Control::SetDropEnabled(bool enabled) +{ + __dropEnabled = enabled; +} + +void +_Control::SetTouchPressThreshold(float distance) +{ + __touchMoveAllowance = static_cast(distance * __screenDpi); + __pressThresHold = distance; +} + +float +_Control::GetTouchPressThreshold(void) const +{ + return __pressThresHold; +} + +int +_Control::GetTouchPressThresholdPixel(void) const +{ + return __touchMoveAllowance; +} + +void +_Control::SetChangingEventTarget(bool isChangingEventTarget) +{ + __isChangingEventTarget = isChangingEventTarget; +} + +bool +_Control::GetChangingEventTarget(void) const +{ + return __isChangingEventTarget; +} + +void +_Control::SetEventEnableState(bool enableState) +{ + __isEventEnableState = enableState; +} + +bool +_Control::IsEventEnabled(void) const +{ + return __isEventEnableState; +} + +void +_Control::SetPreviousFocus(_Control* pPreviousFocus) +{ + __pPreviousFocus = pPreviousFocus; + +} +void +_Control::SetNextFocus(_Control* pNextFocus) +{ + __pNextFocus = pNextFocus; +} +_Control* +_Control::GetPreviousFocus(void) const +{ + return __pPreviousFocus; +} +_Control* +_Control::GetNextFocus(void) const +{ + return __pNextFocus; +} + +void +_Control::OnDrawFocus(void) +{ + if (__pFocusVisualElement.get() == null) + { + unique_ptr pFocusVisualElement (new (std::nothrow) VisualElement, _VisualElementDeleter()); + SysTryReturn(NID_UI, pFocusVisualElement, , E_SYSTEM, "[E_SYSTEM] System error"); + + result r = pFocusVisualElement->Construct(); + SysTryReturn(NID_UI, r == E_SUCCESS, , E_SYSTEM, "[E_SYSTEM] System error"); + + _VisualElementImpl* pImpl = _VisualElementImpl::GetInstance(*pFocusVisualElement); + SysTryReturn(NID_UI, pImpl, , E_SYSTEM, "[E_SYSTEM] pImpl System error"); + pImpl->SetZOrderGroup(GetZOrderGroupOfVisualElement(_CONTROL_LAYER_SYSTEM)); + + __pFocusVisualElement.reset(pFocusVisualElement.release()); + __pFocusVisualElement->SetImplicitAnimationEnabled(false); + + _VisualElement* pControVisualElement = this->GetVisualElement(); + pControVisualElement->AttachChild(*__pFocusVisualElement); + + + if (__pFocusVisualElement) + { + Rectangle rectangle = GetBounds(); + __pFocusVisualElement->SetBounds(FloatRectangle(0, 0, rectangle.width, rectangle.height)); + unique_ptrpCanvas(__pFocusVisualElement->GetCanvasN()); + if (pCanvas) + { + pCanvas->SetBackgroundColor(0x55555555); + pCanvas->Clear(); + } + Color contentHighlightedColor; + GET_COLOR_CONFIG(FOCUSUI::CONTENT_BG_HIGHLIGHTED, contentHighlightedColor); + Bitmap* pBitmap = null; + Bitmap* pTempBitmap = null; + result r = GET_BITMAP_CONFIG_N(FOCUSUI::FOCUS, BITMAP_PIXEL_FORMAT_ARGB8888, pTempBitmap); + pBitmap = _BitmapImpl::GetColorReplacedBitmapN(*pTempBitmap, Color::GetColor(COLOR_ID_MAGENTA), contentHighlightedColor); + + if (pBitmap) + { + if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*pBitmap)) + { + if (pCanvas) + { + r = pCanvas->DrawNinePatchedBitmap(FloatRectangle(0.0f, 0.0f, rectangle.width, rectangle.height), *pBitmap); + } + } + else + { + if (pCanvas) + { + r = pCanvas->DrawBitmap(FloatRectangle(0.0f, 0.0f, rectangle.width, rectangle.height), *pBitmap); + } + } + } + + } + } + __pFocusVisualElement->SetShowState(true); +} + +void +_Control::OnChildControlFocusMoved(const _Control& control) +{ +} + +void +_Control::OnDescendantControlFocusMoved(const _Control& control) +{ +} + +bool +_Control::IsChildControlFocusManage(void) const +{ + return false; +} + +result +_Control::SetFontFromFile(const String& fileName) +{ + result r = E_SUCCESS; + + if (__fontFileName.Equals(fileName)) + { + return E_SUCCESS; + } + + __isControlFontChanged = true; + __fontFileName = fileName; + __fontName.Clear(); + + Font* pFont = GetFallbackFont(); + + if (pFont == null) + { + r = GetLastResult(); + SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + return E_SUCCESS; +} + +Tizen::Base::String +_Control::GetFontFile(void) const +{ + return __fontFileName; +} +void +_Control::DrawFocus(void) +{ + _IControlDelegate& delegate = GetControlDelegate(); + delegate.OnDrawFocus(); +} + +void +_Control::MakeFocusList(const _Control* pControl, IListT<_Control*>* pFocusControlList) const +{ + int childCount = pControl->GetChildCount(); + for(int i = 0; i < childCount; i++) + { + _Control* pChildControl = pControl->GetChild(i); + Rectangle rect = pChildControl->GetAbsoluteBounds(); + unique_ptr > pEnum (pFocusControlList->GetEnumeratorN()); + int index = 0; + while (pEnum->MoveNext() == E_SUCCESS) + { + _Control* pEnumeratorControl = null; + pEnum->GetCurrent(pEnumeratorControl); + if (pEnumeratorControl != null) + { + Rectangle enumeratorRect = pEnumeratorControl->GetAbsoluteBounds(); + if(enumeratorRect.y > rect.y) + { + break; + } + else if (enumeratorRect.y == rect.y) + { + if(enumeratorRect.x > rect.x) + { + break; + } + } + + index ++; + } + } + pFocusControlList->InsertAt(pChildControl, index); + } +} + +void +_Control::MakeChildContainerFocusList(const _Control* pControl, int startIndex , IListT<_Control*>* pFocusControlList) const +{ + unique_ptr > pTempList (new (std::nothrow) ArrayListT<_Control*>); + SysTryReturnVoidResult(NID_UI_CTRL, pTempList, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + MakeFocusList(pControl, pTempList.get()); + + unique_ptr > pTempEnum(pTempList->GetEnumeratorN()); + int index = ++startIndex; + while (pTempEnum->MoveNext() == E_SUCCESS) + { + _Control* pEnumeratorControl = null; + pTempEnum->GetCurrent(pEnumeratorControl); + pFocusControlList->InsertAt(pEnumeratorControl, index); + index ++; + } +} + +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] 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] Memory allocation failed."); + int i =0; + int nextContainerIndex = -1; + while (pEnum->MoveNext() == E_SUCCESS) + { + _Control* pEnumeratorControl = null; + pEnum->GetCurrent(pEnumeratorControl); + + if (nextContainerIndex < i) + { + if (pEnumeratorControl->IsChildControlFocusManage() == false) + { + MakeChildContainerFocusList(pEnumeratorControl, i, pControlFocusList.get()); + nextContainerIndex = i; + pEnum.reset(pControlFocusList->GetEnumeratorN()); + i = -1; + } + } + i++; + } + return pControlFocusList.release(); +} + +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 new file mode 100644 index 0000000..d83b84d --- /dev/null +++ b/src/ui/FUi_ControlImpl.cpp @@ -0,0 +1,5048 @@ +// +// 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_ControlImpl.cpp + * @brief This is the implementation file for _ControlImpl class. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "FUi_ControlImpl.h" +#include "FUi_ContainerImpl.h" +#include "FUi_Control.h" +#include "FUi_ControlManager.h" +#include "FUi_ControlImplManager.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_UiEventManager.h" +#include "FUi_UiNotificationEvent.h" +#include "FUi_UiTouchEvent.h" +#include "FUi_TouchManager.h" +#include "FUi_TouchEventArg.h" +#include "FUi_ITouchLongPressGestureEventListener.h" +#include "FUi_TouchFlickGestureDetector.h" +#include "FUi_TouchGestureDetectorImpl.h" +#include "FUi_AccessibilityContainerImpl.h" +#include "FUi_ResourceManager.h" +#include "FUi_WindowImpl.h" +#include "FUiAnim_VisualElement.h" +#include "FUiAnim_VisualElementImpl.h" +#include "FUiCtrl_Popup.h" +#include "FUi_Window.h" +#include "FUi_DragAndDropItem.h" + +//#define _TC_PASS + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Graphics; +using namespace Tizen::Ui::Animations; +using namespace Tizen::App; +using namespace Tizen::Base::Utility; +using namespace Tizen::Ui::Controls; + +namespace Tizen { namespace Ui { + +_ControlImpl::SizeInfo::~SizeInfo(void) +{ +} + +Dimension +_ControlImpl::SizeInfo::GetDefaultMinimumSize(_ControlOrientation orientation) const +{ + return Dimension(0, 0); +} + +FloatDimension +_ControlImpl::SizeInfo::GetDefaultMinimumSizeF(_ControlOrientation orientation) const +{ + return FloatDimension(0.0f, 0.0f); +} + +Dimension +_ControlImpl::SizeInfo::GetDefaultMaximumSize(_ControlOrientation orientation) const +{ + return Dimension(_Control::MAX_LENGTH, _Control::MAX_LENGTH); +} + +FloatDimension +_ControlImpl::SizeInfo::GetDefaultMaximumSizeF(_ControlOrientation orientation) const +{ + return FloatDimension(_Control::MAX_LENGTH, _Control::MAX_LENGTH); +} + +Dimension +_ControlImpl::SizeInfo::GetMinimumSizeLimit(_ControlOrientation orientation) const +{ + return Dimension(0, 0); +} + +FloatDimension +_ControlImpl::SizeInfo::GetMinimumSizeLimitF(_ControlOrientation orientation) const +{ + return FloatDimension(0.0f, 0.0f); +} + +Dimension +_ControlImpl::SizeInfo::GetMaximumSizeLimit(_ControlOrientation orientation) const +{ + return Dimension(_Control::MAX_LENGTH, _Control::MAX_LENGTH); +} + +FloatDimension +_ControlImpl::SizeInfo::GetMaximumSizeLimitF(_ControlOrientation orientation) const +{ + return FloatDimension(_Control::MAX_LENGTH, _Control::MAX_LENGTH); +} + +result +_ControlImpl::SizeInfo::CheckInitialSizeValid(const Dimension& size, _ControlOrientation orientation) const +{ + ClearLastResult(); + + const Dimension minSize = GetDefaultMinimumSize(orientation); + const Dimension maxSize = GetDefaultMaximumSize(orientation); + + SysTryReturn(NID_UI, + (minSize.width <= size.width) && (size.width <= maxSize.width), E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] The width %d is out of width range(%d ~ %d).", + size.width, minSize.width, maxSize.width); + + SysTryReturn(NID_UI, + (minSize.height <= size.height) && (size.height <= maxSize.height), E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] The height %d is out of height range(%d ~ %d).", + size.height, minSize.height, maxSize.height); + + return E_SUCCESS; +} + +result +_ControlImpl::SizeInfo::CheckInitialSizeValidF(const FloatDimension& size, _ControlOrientation orientation) const +{ + ClearLastResult(); + + const FloatDimension minSize = GetDefaultMinimumSizeF(orientation); + const FloatDimension maxSize = GetDefaultMaximumSizeF(orientation); + + SysTryReturn(NID_UI, + (minSize.width <= size.width) && (size.width <= maxSize.width), E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] The width %f is out of width range(%f ~ %f).", + size.width, minSize.width, maxSize.width); + + SysTryReturn(NID_UI, + (minSize.height <= size.height) && (size.height <= maxSize.height), E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] The height %f is out of height range(%f ~ %f).", + size.height, minSize.height, maxSize.height); + + return E_SUCCESS; +} + +const _ControlImpl::SizeInfo& +_ControlImpl::GetFullScreenSizeInfo(void) +{ + class FullScreenSizeInfo : public _ControlImpl::SizeInfo + { + public: + virtual Dimension GetDefaultMinimumSize(_ControlOrientation orientation) const + { + return GetScreenSize(); + } + + virtual FloatDimension GetDefaultMinimumSizeF(_ControlOrientation orientation) const + { + return GetScreenSizeF(); + } + + virtual Dimension GetDefaultMaximumSize(_ControlOrientation orientation) const + { + return GetScreenSize(); + } + + virtual FloatDimension GetDefaultMaximumSizeF(_ControlOrientation orientation) const + { + return GetScreenSizeF(); + } + + virtual Dimension GetMinimumSizeLimit(_ControlOrientation orientation) const + { + return GetScreenSize(); + } + + virtual FloatDimension GetMinimumSizeLimitF(_ControlOrientation orientation) const + { + return GetScreenSizeF(); + } + + virtual Dimension GetMaximumSizeLimit(_ControlOrientation orientation) const + { + return GetScreenSize(); + } + + virtual FloatDimension GetMaximumSizeLimitF(_ControlOrientation orientation) const + { + return GetScreenSizeF(); + } + + private: + Dimension GetScreenSize(void) const + { + _ControlManager* pMgr = _ControlManager::GetInstance(); + SysTryReturn(NID_UI, pMgr, Dimension(0, 0), E_SYSTEM, "[E_SYSTEM] Failed to get control manager."); + return pMgr->GetScreenSize(); + } + + FloatDimension GetScreenSizeF(void) const + { + _ControlManager* pMgr = _ControlManager::GetInstance(); + SysTryReturn(NID_UI, pMgr, FloatDimension(0.0f, 0.0f), E_SYSTEM, "[E_SYSTEM] Failed to get control manager."); + return pMgr->GetScreenSizeF(); + } + }; + + static FullScreenSizeInfo sizeInfo; + return sizeInfo; +} + +// [ToDo] How to turn-off callback while initializing: Reset/Set delegate? +result +_ControlImpl::InitializeBoundsProperties(const SizeInfo& sizeInfo, _ControlOrientation orientation) +{ + result r = E_SUCCESS; + + bool resizable = IsResizable(); + SetResizable(true); + + r = SetMinimumSize(sizeInfo.GetDefaultMinimumSize(orientation)); + SysTryReturn(NID_UI, + r == E_SUCCESS, E_SYSTEM, + E_SYSTEM, "[E_SYSTEM] Failed to initialize default minimum size."); + + r = SetMaximumSize(sizeInfo.GetDefaultMaximumSize(orientation)); + SysTryReturn(NID_UI, + r == E_SUCCESS, E_SYSTEM, + E_SYSTEM, "[E_SYSTEM] Failed to initialize default maximum size."); + + SetResizable(resizable); + + return E_SUCCESS; +} + +result +_ControlImpl::InitializeBoundsProperties(const SizeInfo& sizeInfo, const Tizen::Graphics::Rectangle& bounds, _ControlOrientation orientation) +{ + result r = InitializeBoundsProperties(sizeInfo, orientation); + if (IsFailed(r)) + { + return r; + } + + bool movable = IsMovable(); + bool resizable = IsResizable(); + SetMovable(true); + SetResizable(true); + + r = SetBounds(bounds); + + SetMovable(movable); + SetResizable(resizable); + + return r; +} + +result +_ControlImpl::InitializeBoundsPropertiesF(const SizeInfo& sizeInfo, const Tizen::Graphics::FloatRectangle& bounds, _ControlOrientation orientation) +{ + result r = InitializeBoundsProperties(sizeInfo, orientation); + if (IsFailed(r)) + { + return r; + } + + bool movable = IsMovable(); + bool resizable = IsResizable(); + SetMovable(true); + SetResizable(true); + + r = SetBounds(bounds); + + SetMovable(movable); + SetResizable(resizable); + + return r; +} + +result +_ControlImpl::InitializeBoundsProperties(const SizeInfo& sizeInfo, const Tizen::Graphics::Dimension& size, _ControlOrientation orientation) +{ + return InitializeBoundsProperties(sizeInfo, Rectangle(0, 0, size.width, size.height), orientation); +} + +result +_ControlImpl::InitializeBoundsPropertiesF(const SizeInfo& sizeInfo, const Tizen::Graphics::FloatDimension& size, _ControlOrientation orientation) +{ + return InitializeBoundsPropertiesF(sizeInfo, FloatRectangle(0.0f, 0.0f, size.width, size.height), orientation); +} + +_ControlImpl* +_ControlImpl::CreateControlImplN(Control& control) +{ + ClearLastResult(); + result r = E_SUCCESS; + + _Control* pCore = _Control::CreateControlN(); + r = GetLastResult(); + SysTryReturn(NID_UI, pCore, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + _ControlImpl* pImpl = new (std::nothrow) _ControlImpl(&control, pCore); + r = CheckConstruction(pCore, pImpl); + SysTryReturn(NID_UI, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + return pImpl; +} + +result +_ControlImpl::Destroy(void) +{ + result r = E_SUCCESS; + + _ContainerImpl* pParent = GetParent(); + if (pParent) + { + r = pParent->RemoveChild(this, true); + SysAssert(r == E_SUCCESS); + } + else + { + _Control* pParent = GetCore().GetParent(); + if (pParent) + { + ControlList& children = pParent->GetChildList(); + r = children.Remove(&GetCore()); + } + + Control* pControl= &GetPublic(); + delete pControl; + pControl = null; + } + + return r; +} + +_ControlImpl* +_ControlImpl::GetInstance(Control& control) +{ + return static_cast <_ControlImpl*> (control._pControlImpl); +} + +const _ControlImpl* +_ControlImpl::GetInstance(const Control& control) +{ + return static_cast (control._pControlImpl); +} + +result +_ControlImpl::CheckConstruction(_Control* pCore, _ControlImpl* pImpl) +{ + if (pImpl == null) + { + delete pCore; + pCore = null; + SysLogException(NID_UI, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory."); + return E_OUT_OF_MEMORY; + } + + result r = GetLastResult(); + if (IsFailed(r)) + { + delete pImpl; + pImpl = null; + SysLogException(NID_UI, r, "[%s] Propagating.", GetErrorMessage(r)); + return r; + } + + return E_SUCCESS; +} + +const Tizen::Base::String _USER_EVENT = L"UserEvent"; +const Tizen::Base::String _REQUEST_REDRAW_EVENT = L"RequestRedrawEvent"; +const Tizen::Base::String _KEYBOARD_INSERTED_EVENT = L"KeyboardInsertedEvent"; +const int keyPressTimer = 500; +const int doublePressTime = 330; +const int doublePressMoveAllowance = 10; + +class _UserEventInfo + : public Tizen::Base::Object +{ +public: + _UserEventInfo(RequestId requestId, const IList* pArgs) + : __requestId(requestId) + , __pArgs(const_cast (pArgs)) + { + } + virtual ~_UserEventInfo(void) {} + + RequestId GetRequestId(void) const + { + return __requestId; + } + + IList* GetArgs(void) + { + return __pArgs; + } + +private: + _UserEventInfo(const _UserEventInfo& rhs); + _UserEventInfo& operator =(const _UserEventInfo& rhs); + +private: + RequestId __requestId; + IList* __pArgs; +}; + +class _ControlImpl::CoreKeyEvent +{ +public: + CoreKeyEvent(_ControlImpl& impl) + : __impl(impl) + , __core(impl.GetCore()) + , __public(impl.GetPublic()) + { + } + + ~CoreKeyEvent(void) + { + } + +private: + bool IsPublicKey(_KeyCode keyCode) + { + bool isPublicKey = false; + + if (keyCode <= _KEY_CLIPBOARD) + { + isPublicKey = true; + } + + return isPublicKey; + } + + result FirePublicListener(IKeyEventListener& listener, KeyState keyState, KeyCode keyCode) + { + result r = E_SUCCESS; + + if (keyCode == KEY_INVALID) + { + return r; + } + + switch (keyState) + { + case KEY_PRESSED: + listener.OnKeyPressed(__public, keyCode); + break; + case KEY_RELEASED: + listener.OnKeyReleased(__public, keyCode); + break; + case KEY_LONGPRESSED: + listener.OnKeyLongPressed(__public, keyCode); + break; + default: + SysAssert(0); + r = E_SYSTEM; + break; + } + + return r; + } + +public: + bool ProcessListener(KeyState keyState, _KeyCode keyCode) + { + bool filterd = false; + + // 1. Public + if (IsPublicKey(keyCode)) + { + IEnumeratorT * pEnumerator = __impl.__pPublicKeyEventListeners->GetEnumeratorN(); + if (pEnumerator) + { + while (pEnumerator->MoveNext() == E_SUCCESS) + { + IEventListener* pListener = null; + pEnumerator->GetCurrent(pListener); + + IKeyEventListener* pKeyEventListener = dynamic_cast (pListener); + if (pKeyEventListener) + { + FirePublicListener(*pKeyEventListener, keyState, (KeyCode)keyCode); + } + } + delete pEnumerator; + } + } + + if (__impl.IsInputEventConsumed()) + { + __impl.ResetInputEventConsumed(); + + filterd = true; + return filterd; + } + + // 2. Default + if (IsPublicKey(keyCode)) + { + IKeyEventListener* pDefaultListener = __impl.GetDefaultKeyEventListener(); + if (pDefaultListener) + { + FirePublicListener(*pDefaultListener, keyState, (KeyCode)keyCode); + + if (__impl.IsInputEventConsumed()) + { + __impl.ResetInputEventConsumed(); + + filterd = true; + return filterd; + } + } + } + + return filterd; + } + +private: + CoreKeyEvent(const CoreKeyEvent& rhs); + CoreKeyEvent& operator =(const CoreKeyEvent& rhs); + +private: + _ControlImpl& __impl; + _Control& __core; + Control& __public; +}; + +class _ControlImpl::CoreTouchEvent +{ +public: + CoreTouchEvent(_ControlImpl& impl) + : __impl(impl) + , __core(impl.GetCore()) + , __public(impl.GetPublic()) + , __oldPreviousPressedTime(0) + , __previousPressedTime(0) + , __currentPressedTime(0) + , __previousPressedPoint(0, 0) + , __currentPressedPoint(0, 0) + + { + __pTouchManager = _TouchManager::GetInstance(); + SysTryReturnVoidResult(NID_UI, __pTouchManager, E_SYSTEM, "[E_SYSTEM] System error occurred."); + } + + ~CoreTouchEvent(void) + { + } + + +private: + _TouchEventArg* GetTouchEventArgN(const _TouchInfo& touchInfo) + { + _TouchEventArg* pEventArg = new (std::nothrow) _TouchEventArg(__public, touchInfo.GetTouchStatus()); + SysTryReturn(NID_UI, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + 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); + + int xDistance = 0; + int yDistance = 0; + __impl.__pFlickGestureDetector->GetDistance(xDistance, yDistance); + + if (xDistance != 0 || yDistance != 0) + { + pEventArg->SetFlickedStatus(true); + } + else + { + pEventArg->SetFlickedStatus(false); + } + + return pEventArg; + } + + result FirePublicListener(ITouchEventListener& listener, const TouchEventInfo& touchEventInfo) + { + result r = E_SUCCESS; + + switch (touchEventInfo.GetTouchStatus()) + { + case TOUCH_PRESSED: + listener.OnTouchPressed(__public, touchEventInfo.GetCurrentPosition(), touchEventInfo); + break; + case TOUCH_LONG_PRESSED: + listener.OnTouchLongPressed(__public, touchEventInfo.GetCurrentPosition(), touchEventInfo); + break; + case TOUCH_RELEASED: + listener.OnTouchReleased(__public, touchEventInfo.GetCurrentPosition(), touchEventInfo); + break; + case TOUCH_MOVED: + listener.OnTouchMoved(__public, touchEventInfo.GetCurrentPosition(), touchEventInfo); + break; + case TOUCH_DOUBLE_PRESSED: + listener.OnTouchDoublePressed(__public, touchEventInfo.GetCurrentPosition(), touchEventInfo); + break; + case TOUCH_FOCUS_IN: + listener.OnTouchFocusIn(__public, touchEventInfo.GetCurrentPosition(), touchEventInfo); + break; + case TOUCH_FOCUS_OUT: + listener.OnTouchFocusOut(__public, touchEventInfo.GetCurrentPosition(), touchEventInfo); + break; + case TOUCH_CANCELED: + listener.OnTouchCanceled(__public, touchEventInfo.GetCurrentPosition(), touchEventInfo); + break; + default: + SysAssert(0); + r = E_SYSTEM; + break; + } + + return r; + } + + result FireFocusListener(ITouchEventListener& listener, const TouchEventInfo& touchEventInfo) + { + result r = E_SUCCESS; + + _ControlManager* pControlManager = _ControlManager::GetInstance(); + SysTryReturn(NID_UI, pControlManager, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + SysTryReturn(NID_UI, pTouchManager, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + Point screenPoint(pTouchManager->GetScreenPoint(touchEventInfo.GetPointId()).x, pTouchManager->GetScreenPoint(touchEventInfo.GetPointId()).y); + + _Control* pTouchedControl = pControlManager->GetTopmostTouchedControl(screenPoint); + SysTryReturn(NID_UI, pTouchedControl, E_INVALID_CONDITION, E_INVALID_CONDITION, "[E_INVALID_CONDITION] pTouchedControl is null."); + + if (__pTouchManager->GetFocusedControlSource() != pTouchedControl) + { + if (&(__core) != pTouchedControl) + { + if (__pTouchManager->GetFocusedControlSource() == &(__core)) + { + listener.OnTouchFocusOut(__public, touchEventInfo.GetCurrentPosition(), touchEventInfo); + } + } + else + { + listener.OnTouchFocusIn(__public, touchEventInfo.GetCurrentPosition(), touchEventInfo); + } + + __pTouchManager->SetFocusedControlSource(*pTouchedControl); + } + + return r; + } + +public: + result ProcessDragListener(const _TouchInfo& touchInfo) + { + if (!__core.IsDragEnabled()) + { + return E_INVALID_CONDITION; + } + + result r = E_SUCCESS; + + IEnumeratorT * pDragEnumerator = __impl.__pPublicDragDropEventListeners->GetEnumeratorN(); + if (pDragEnumerator) + { + while (pDragEnumerator->MoveNext() == E_SUCCESS) + { + IEventListener* pDragListener = null; + pDragEnumerator->GetCurrent(pDragListener); + + if (pDragListener != null) + { + IDragDropEventListener* pDragDropEventListener = dynamic_cast (pDragListener); + if (pDragDropEventListener != null) + { + pDragDropEventListener->OnTouchDragged(__public, _CoordinateSystemUtils::ConvertToInteger(touchInfo.GetCurrentPosition()), _CoordinateSystemUtils::ConvertToInteger(touchInfo.GetCurrentPosition())); + } + IDragDropEventListenerF* pDragDropEventListenerF = dynamic_cast (pDragListener); + if (pDragDropEventListenerF != null) + { + pDragDropEventListenerF->OnTouchDraggedF(__public, touchInfo.GetCurrentPosition(), touchInfo.GetCurrentPosition()); + } + } + } + delete pDragEnumerator; + } + + return r; + } + + result ProcessDropListener(const _TouchInfo& touchInfo) + { + if (!__core.IsDropEnabled()) + { + return E_INVALID_CONDITION; + } + + result r = E_SUCCESS; + + _Control* pDraggedControl = __pTouchManager->GetTouchControlSource(); + if (pDraggedControl != null) + { + IEnumeratorT* pDropEnumerator = __impl.__pPublicDragDropEventListeners->GetEnumeratorN(); + if (pDropEnumerator) + { + while (pDropEnumerator->MoveNext() == E_SUCCESS) + { + IEventListener* pDropListener = null; + pDropEnumerator->GetCurrent(pDropListener); + + if (pDropListener != null) + { + IDragDropEventListener* pDropEventListener = dynamic_cast (pDropListener); + if (pDropEventListener != null) + { + pDropEventListener->OnTouchDropped(__public, _CoordinateSystemUtils::ConvertToInteger(__pTouchManager->GetStartPoint(touchInfo.GetPointId())), _CoordinateSystemUtils::ConvertToInteger(touchInfo.GetCurrentPosition())); + } + } + } + + delete pDropEnumerator; + } + } + + return r; + } + + result ProcessDropListenerToTopControl(const _TouchInfo& touchInfo) + { + result r = E_SUCCESS; + Point pt(__pTouchManager->GetScreenPoint(touchInfo.GetPointId()).x, __pTouchManager->GetScreenPoint(touchInfo.GetPointId()).y); + + _Control* pCapturedControl = __pTouchManager->GetCapturedControl(); + _Control* pDraggedControl = __pTouchManager->GetTouchControlSource(); + if (!pDraggedControl || pCapturedControl) + { + r = E_SUCCESS; + return r; + } + + _Control* pTopmostTouchedSource = __core.GetTopmostChildAt(pt); + if (!pTopmostTouchedSource) + { + r = E_SUCCESS; + return r; + } + + if (!pTopmostTouchedSource->IsDragEnabled()) + { + return E_INVALID_CONDITION; + } + + TouchEventInfo publicTouchInfo; + + _TouchEventArg* pEventArg = GetTouchEventArgN(touchInfo); + SysTryReturn(NID_UI, pEventArg, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + publicTouchInfo.Construct(*pEventArg); + + if (pTopmostTouchedSource != pDraggedControl) + { + _ControlImpl* pTopmostTouchedTarget = static_cast <_ControlImpl*>(pTopmostTouchedSource->GetUserData()); + SysTryCatch(NID_UI, pTopmostTouchedTarget, , E_SYSTEM, "[E_SYSTEM] System error occurred."); + + IEnumeratorT * pDropEnumerator = + pTopmostTouchedTarget->GetDragDropEventListener()->GetEnumeratorN(); + + if (pDropEnumerator) + { + while (pDropEnumerator->MoveNext() == E_SUCCESS) + { + IEventListener* pDropListener = null; + pDropEnumerator->GetCurrent(pDropListener); + + if (pDropListener != null) + { + IDragDropEventListener* pDropEventListener = dynamic_cast (pDropListener); + if (pDropEventListener != null) + { + pDropEventListener->OnTouchDropped(pTopmostTouchedTarget->GetPublic(), + publicTouchInfo.GetStartPosition(), _CoordinateSystemUtils::ConvertToInteger(touchInfo.GetCurrentPosition())); + } + } + } + delete pDropEnumerator; + } + + IEnumeratorT * pEnumerator = + pTopmostTouchedTarget->GetTouchEventListener()->GetEnumeratorN(); + + if (pEnumerator) + { + while (pEnumerator->MoveNext() == E_SUCCESS) + { + Runtime::IEventListener* pListener = null; + pEnumerator->GetCurrent(pListener); + + if (pListener != null) + { + ITouchEventListener* pPublicListener = dynamic_cast (pListener); + SysAssert(pPublicListener); + + pPublicListener->OnTouchReleased(pTopmostTouchedTarget->GetPublic(), _CoordinateSystemUtils::ConvertToInteger(touchInfo.GetCurrentPosition()), publicTouchInfo); + } + } + delete pEnumerator; + } + + if (pTopmostTouchedTarget->IsInputEventConsumed()) + { + pTopmostTouchedTarget->ResetInputEventConsumed(); + } + + // 2. Default + ITouchEventListener* pDefaultListener = pTopmostTouchedTarget->GetDefaultTouchEventListener(); + if (pDefaultListener) + { + pDefaultListener->OnTouchReleased(pTopmostTouchedTarget->GetPublic(), _CoordinateSystemUtils::ConvertToInteger(touchInfo.GetCurrentPosition()), publicTouchInfo); + + if (pTopmostTouchedTarget->IsInputEventConsumed()) + { + pTopmostTouchedTarget->ResetInputEventConsumed(); + } + } + + // 3. Impl + if (pTopmostTouchedTarget->OnTouchReleased(*pTopmostTouchedTarget, touchInfo)) + { + if (pEventArg) + { + delete pEventArg; + pEventArg = null; + } + + return r; + } + + // 4. Core + pTopmostTouchedSource->OnTouchReleased(*pTopmostTouchedSource, touchInfo); + } + + if (pEventArg) + { + delete pEventArg; + pEventArg = null; + } + + return r; + + CATCH: + if (pEventArg) + { + delete pEventArg; + pEventArg = null; + } + + return r; + } + + bool ProcessListener(const _TouchInfo& touchInfo) + { + bool filterd = false; + + TouchEventInfo publicTouchInfo; + + _TouchEventArg* pEventArg = GetTouchEventArgN(touchInfo); + SysTryReturn(NID_UI, pEventArg, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + publicTouchInfo.Construct(*pEventArg); + + _Control* pDraggedControl = __pTouchManager->GetTouchControlSource(); + + // 1. Public + IEnumeratorT* pEnumerator = __impl.__pPublicTouchEventListeners->GetEnumeratorN(); + if (pEnumerator) + { + while (pEnumerator->MoveNext() == E_SUCCESS) + { + IEventListener* pListener = null; + pEnumerator->GetCurrent(pListener); + + ITouchEventListener* pTouchEventListener = dynamic_cast (pListener); + if (pTouchEventListener) + { + FirePublicListener(*pTouchEventListener, publicTouchInfo); + + if (touchInfo.GetTouchStatus() == _TOUCH_RELEASED) + { + if (pDraggedControl == null) //if exist dragged control, don't send focus event + { + FireFocusListener(*pTouchEventListener, publicTouchInfo); + } + } + else if (touchInfo.GetTouchStatus() == _TOUCH_MOVED) + { + FireFocusListener(*pTouchEventListener, publicTouchInfo); + } + } + else + { + SysAssert(pTouchEventListener); + } + } + delete pEnumerator; + } + + if (__impl.IsInputEventConsumed()) + { + __impl.ResetInputEventConsumed(); + + if (pEventArg) + { + delete pEventArg; + pEventArg = null; + } + + filterd = true; + return filterd; + } + + // 2. Default + ITouchEventListener* pDefaultListener = __impl.GetDefaultTouchEventListener(); + if (pDefaultListener) + { + FirePublicListener(*pDefaultListener, publicTouchInfo); + + if (__impl.IsInputEventConsumed()) + { + __impl.ResetInputEventConsumed(); + + if (pEventArg) + { + delete pEventArg; + pEventArg = null; + } + + filterd = true; + return filterd; + } + } + + delete pEventArg; + + return filterd; + } + + bool ProcessDoublePress(const _TouchInfo& touchinfo, bool& isFiltered) + { + if (__pTouchManager->GetPointCount() == 1) + { + __oldPreviousPressedTime = __previousPressedTime; + __previousPressedTime = __currentPressedTime; + __currentPressedTime = touchinfo.GetTimeStamp(); + __previousPressedPoint.x = __currentPressedPoint.x; + __previousPressedPoint.y = __currentPressedPoint.y; + __currentPressedPoint.x = touchinfo.GetCurrentPosition().x; + __currentPressedPoint.y = touchinfo.GetCurrentPosition().y; + + if (Math::Abs(__previousPressedTime - __currentPressedTime) < doublePressTime) + { + if (Math::Abs(__previousPressedTime - __oldPreviousPressedTime) > doublePressTime) + { + if (Math::Abs(__previousPressedPoint.x - __currentPressedPoint.x) < doublePressMoveAllowance + && Math::Abs(__previousPressedPoint.y - __currentPressedPoint.y) < doublePressMoveAllowance ) + { + _TouchInfo touchInfo(0, _TOUCH_DOUBLE_PRESSED, __pTouchManager->GetPosition(0), false, 0); + + SysTryReturn(NID_UI, __impl.__pCoreTouchEvent, false, E_SYSTEM, "[E_SYSTEM] System error occurred."); + isFiltered = __impl.__pCoreTouchEvent->ProcessListener(touchInfo); + + return false; + } + } + } + } + + return false; + } + +private: + CoreTouchEvent(const CoreTouchEvent& rhs); + CoreTouchEvent& operator =(const CoreTouchEvent& rhs); + +private: + _ControlImpl& __impl; + _Control& __core; + Control& __public; + _TouchManager* __pTouchManager; + unsigned int __oldPreviousPressedTime; + unsigned int __previousPressedTime; + unsigned int __currentPressedTime; + Point __previousPressedPoint; + Point __currentPressedPoint; +}; + +class _ControlImpl::CoreFocusEvent +{ +public: + CoreFocusEvent(_ControlImpl& impl) + : __impl(impl) + , __core(impl.GetCore()) + , __public(impl.GetPublic()) + { + } + + ~CoreFocusEvent(void) + { + } + +private: + result FirePublicListener(IFocusEventListener& listener, FocusStatus focusState) + { + result r = E_SUCCESS; + + switch (focusState) + { + case FOCUS_GAINED: + listener.OnFocusGained(__public); + break; + case FOCUS_LOST: + listener.OnFocusLost(__public); + break; + default: + SysAssert(0); + r = E_SYSTEM; + break; + } + + return r; + } + +public: + bool ProcessListener(FocusStatus focusState) + { + bool filterd = false; + + // 1. Public + IEnumeratorT * pEnumerator = __impl.__pPublicFocusEventListeners->GetEnumeratorN(); + if (pEnumerator) + { + while (pEnumerator->MoveNext() == E_SUCCESS) + { + Runtime::IEventListener* pListener = null; + pEnumerator->GetCurrent(pListener); + IFocusEventListener* pFocusEventListener = dynamic_cast (pListener); + if (pFocusEventListener) + { + FirePublicListener(*pFocusEventListener, focusState); + } + } + + delete pEnumerator; + } + + return filterd; + } + +private: + CoreFocusEvent(const CoreFocusEvent& rhs); + CoreFocusEvent& operator =(const CoreFocusEvent& rhs); + +private: + _ControlImpl& __impl; + _Control& __core; + Control& __public; +}; + +class _ControlImpl::CoreGestureEvent +{ +public: + CoreGestureEvent(_ControlImpl& impl) + : __impl(impl) + , __core(impl.GetCore()) + , __public(impl.GetPublic()) + { + } + + ~CoreGestureEvent(void) + { + } + +public: + bool ProcessListener(_TouchGestureDetectorType gestureType) + { + bool filterd = false; + + _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) + { + case _TOUCH_GESTURE_DETECTOR_TYPE_TAP: + { + _TouchInfo touchInfo(0, _TOUCH_DOUBLE_PRESSED, pTouchManager->GetPosition(0), false, 0); + + SysTryReturn(NID_UI, __impl.__pCoreTouchEvent, false, E_SYSTEM, "[E_SYSTEM] System error occurred."); + filterd = __impl.__pCoreTouchEvent->ProcessListener(touchInfo); + } + break; + case _TOUCH_GESTURE_DETECTOR_TYPE_LONG_PRESS: + { + _TouchInfo touchInfo(0, _TOUCH_LONG_PRESSED, pTouchManager->GetPosition(0), false, 0); + + SysTryReturn(NID_UI, __impl.__pCoreTouchEvent, false, E_SYSTEM, "[E_SYSTEM] System error occurred."); + filterd = __impl.__pCoreTouchEvent->ProcessListener(touchInfo); + } + break; + default: + SysAssert(0); + break; + } + + return filterd; + } + +private: + CoreGestureEvent(const CoreGestureEvent& rhs); + CoreGestureEvent& operator =(const CoreGestureEvent& rhs); + +private: + _ControlImpl& __impl; + _Control& __core; + Control& __public; +}; + +class _ControlImpl::CoreEventListener + : public _IFocusEventListener + , public _INotificationEventListener + , public _ITouchLongPressGestureEventListener + , virtual public Tizen::Base::Runtime::IEventListener + , virtual public _IUiEventListener + , virtual public _ITouchGestureEventListener +{ +public: + CoreEventListener(_ControlImpl& impl) + : __impl(impl) + , __core(impl.GetCore()) + , __public(impl.GetPublic()) + , __isKeyPressed(false) + , __pKeyInfo(null) + { + __pTouchManager = _TouchManager::GetInstance(); + SysTryReturnVoidResult(NID_UI, __pTouchManager, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + return; + } + + virtual ~CoreEventListener(void) + { + } + + virtual bool OnFocusGained(const _Control& source) + { + SysTryReturn(NID_UI, __impl.__pCoreFocusEvent, false, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + bool isFiltered = false; + + isFiltered = __impl.__pCoreFocusEvent->ProcessListener(FOCUS_GAINED); + if (isFiltered) + { + return true; + } + + // 2. Impl + isFiltered = __impl.OnFocusGained(__impl); + if (isFiltered) + { + return true; + } + + // 3. Core + isFiltered = __core.OnFocusGained(source); + + return isFiltered; + } + + virtual bool OnFocusLost(const _Control& source) + { + SysTryReturn(NID_UI, __impl.__pCoreFocusEvent, false, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + bool isFiltered = false; + + isFiltered = __impl.__pCoreFocusEvent->ProcessListener(FOCUS_LOST); + if (isFiltered) + { + return true; + } + + // 2. Impl + isFiltered = __impl.OnFocusLost(__impl); + if (isFiltered) + { + return true; + } + + // 3. Core + isFiltered = __core.OnFocusLost(source); + + return isFiltered; + } + + virtual bool OnNotifiedN(const _Control& source, Tizen::Base::Collection::IList* pArgs) + { + if (__impl.SendNotification(__impl, pArgs)) + { + return true; + } + + if (&source == &__core) + { + if (ProcessTouchModeChangedListener(source, pArgs)) + { + pArgs->RemoveAll(true); + delete pArgs; + return true; + } + } + + // 1. Impl + if (__impl.OnNotifiedN(__impl, pArgs)) + { + return true; + } + + // 2. Core + return __core.OnNotifiedN(source, pArgs); + } + + virtual bool OnLongPressGestureDetected(_TouchLongPressGestureDetector& gesture) + { + SysTryReturn(NID_UI, __impl.__pCoreGestureEvent, false, E_SYSTEM, "[E_SYSTEM] System error occurred."); + bool isFiltered = false; + + isFiltered = __impl.__pCoreGestureEvent->ProcessListener(_TOUCH_GESTURE_DETECTOR_TYPE_LONG_PRESS); + + return isFiltered; + } + + virtual bool OnLongPressGestureCanceled(_TouchLongPressGestureDetector& gesture) + { + return false; + } + + bool ProcessTouchModeChangedListener(const _Control& source, Tizen::Base::Collection::IList* pArgs) + { + IEnumeratorT* pEnumerator = __impl.__pPublicTouchModeChangedEventListeners->GetEnumeratorN(); + bool isFiltered = false; + + if (pEnumerator) + { + while(pEnumerator->MoveNext() == E_SUCCESS) + { + IEventListener* pEventListener = null; + pEnumerator->GetCurrent(pEventListener); + + if (!pEventListener) + { + continue; + } + + String* pString = dynamic_cast(pArgs->GetAt(0)); + if (pString && (*pString == _KEYBOARD_INSERTED_EVENT)) + { + Boolean* pIsTouchMode = dynamic_cast(pArgs->GetAt(1)); + ITouchModeChangedEventListener* pTouchModeListener = dynamic_cast(pEventListener); + if (pTouchModeListener && pIsTouchMode) + { + pTouchModeListener->OnTouchModeChanged(__impl.GetPublic(), pIsTouchMode->ToBool()) ; + isFiltered = true; + } + } + } + delete pEnumerator; + } + + return isFiltered; + } + +private: + CoreEventListener(const CoreEventListener& rhs); + CoreEventListener& operator =(const CoreEventListener& rhs); + +private: + _ControlImpl& __impl; + _Control& __core; + Control& __public; + _TouchManager* __pTouchManager; + bool __isKeyPressed; + _KeyInfo* __pKeyInfo; +}; + +class _ControlImpl::_PropagatedTouchEventListener + : public _IPropagatedTouchEventListener +{ +public: + _PropagatedTouchEventListener(_ControlImpl& impl) + : __impl(impl) + , __core(impl.GetCore()) + , __public(impl.GetPublic()) + { + } + + virtual ~_PropagatedTouchEventListener() + { + } + + _TouchEventArg* GetTouchEventArgN(const _TouchInfo& touchInfo) + { + _TouchEventArg* pEventArg = new (std::nothrow) _TouchEventArg(__public, touchInfo.GetTouchStatus()); + SysTryReturn(NID_UI, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + _TouchManager* __pTouchManager = _TouchManager::GetInstance(); + SysTryReturn(NID_UI, __pTouchManager, null, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] __pTouchManager == null."); + + 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); + + int xDistance = 0; + int yDistance = 0; + __impl.__pFlickGestureDetector->GetDistance(xDistance, yDistance); + + if (xDistance != 0 || yDistance != 0) + { + pEventArg->SetFlickedStatus(true); + } + else + { + pEventArg->SetFlickedStatus(false); + } + + return pEventArg; + } + + virtual bool OnTouchPressed(const _Control& source, const _TouchInfo& touchInfo) + { + bool isFiltered = false; + + 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()); + + const _ControlHandle controlHandle = pControlImpl->GetCore().GetHandle(); + + TouchEventInfo publicTouchInfo; + + _TouchEventArg* pEventArg = GetTouchEventArgN(touchInfo); + SysTryReturn(NID_UI, pEventArg, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + publicTouchInfo.Construct(*pEventArg); + + if (pEventArg) + { + delete pEventArg; + pEventArg = null; + } + + isFiltered = __impl.__pPublicPropagatedTouchEventListener->OnTouchPressed(control, publicTouchInfo); + if (isFiltered) + { + return true; + } + + _Control* pControl = _ControlManager::GetInstance()->GetObject(controlHandle); + SysTryReturn(NID_UI, pControl, true, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] Target control is deleted."); + } + + return __impl.CallOnTouchPressed(source, touchInfo); + } + + virtual bool OnTouchReleased(const _Control& source, const _TouchInfo& touchInfo) + { + bool isFiltered = false; + + 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()); + + const _ControlHandle controlHandle = pControlImpl->GetCore().GetHandle(); + + TouchEventInfo publicTouchInfo; + + _TouchEventArg* pEventArg = GetTouchEventArgN(touchInfo); + SysTryReturn(NID_UI, pEventArg, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + publicTouchInfo.Construct(*pEventArg); + + if (pEventArg) + { + delete pEventArg; + pEventArg = null; + } + + isFiltered = __impl.__pPublicPropagatedTouchEventListener->OnTouchReleased(control, publicTouchInfo); + if (isFiltered) + { + return true; + } + + _Control* pControl = _ControlManager::GetInstance()->GetObject(controlHandle); + SysTryReturn(NID_UI, pControl, true, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] Target control is deleted."); + } + + return __impl.CallOnTouchReleased(source, touchInfo); + } + + virtual bool OnTouchMoved(const _Control& source, const _TouchInfo& touchInfo) + { + bool isFiltered = false; + + 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()); + + const _ControlHandle controlHandle = pControlImpl->GetCore().GetHandle(); + + TouchEventInfo publicTouchInfo; + + _TouchEventArg* pEventArg = GetTouchEventArgN(touchInfo); + SysTryReturn(NID_UI, pEventArg, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + publicTouchInfo.Construct(*pEventArg); + + if (pEventArg) + { + delete pEventArg; + pEventArg = null; + } + + isFiltered = __impl.__pPublicPropagatedTouchEventListener->OnTouchMoved(control, publicTouchInfo); + if (isFiltered) + { + return true; + } + + _Control* pControl = _ControlManager::GetInstance()->GetObject(controlHandle); + SysTryReturn(NID_UI, pControl, true, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] Target control is deleted."); + } + + return __impl.CallOnTouchMoved(source, touchInfo); + } + + virtual bool OnTouchCanceled(const _Control& source, const _TouchInfo& touchInfo) + { + bool isFiltered = false; + + 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()); + + const _ControlHandle controlHandle = pControlImpl->GetCore().GetHandle(); + + TouchEventInfo publicTouchInfo; + + _TouchEventArg* pEventArg = GetTouchEventArgN(touchInfo); + SysTryReturn(NID_UI, pEventArg, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + publicTouchInfo.Construct(*pEventArg); + + if (pEventArg) + { + delete pEventArg; + pEventArg = null; + } + + isFiltered = __impl.__pPublicPropagatedTouchEventListener->OnTouchCanceled(control, publicTouchInfo); + if (isFiltered) + { + return true; + } + + _Control* pControl = _ControlManager::GetInstance()->GetObject(controlHandle); + SysTryReturn(NID_UI, pControl, true, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] Target control is deleted."); + } + + return __impl.CallOnTouchCanceled(source, touchInfo); + } + + 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; + + 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()); + + const _ControlHandle controlHandle = pControlImpl->GetCore().GetHandle(); + + TouchEventInfo publicTouchInfo; + + _TouchEventArg* pEventArg = GetTouchEventArgN(touchInfo); + SysTryReturn(NID_UI, pEventArg, _UI_TOUCH_EVENT_DELIVERY_YES, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + publicTouchInfo.Construct(*pEventArg); + + if (pEventArg) + { + delete pEventArg; + pEventArg = null; + } + + if (__impl.__pPublicPropagatedTouchEventListener->OnPreviewTouchPressed(control, publicTouchInfo) == true) + { + return _UI_TOUCH_EVENT_DELIVERY_NO; + } + + _Control* pControl = _ControlManager::GetInstance()->GetObject(controlHandle); + SysTryReturn(NID_UI, pControl, _UI_TOUCH_EVENT_DELIVERY_NO, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] Target control is deleted."); + } + + // 3. Impl + isFiltered = __impl.OnPreviewTouchPressed(__impl, touchInfo); + if (isFiltered == _UI_TOUCH_EVENT_DELIVERY_NO) + { + return _UI_TOUCH_EVENT_DELIVERY_NO; + } + + // 4. Core + isFiltered = __core.OnPreviewTouchPressed(source, touchInfo); + + return isFiltered; + } + + virtual _UiTouchEventDelivery OnPreviewTouchReleased(const _Control& source, const _TouchInfo& touchInfo) + { + _UiTouchEventDelivery isFiltered = _UI_TOUCH_EVENT_DELIVERY_NO; + + 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()); + + const _ControlHandle controlHandle = pControlImpl->GetCore().GetHandle(); + + TouchEventInfo publicTouchInfo; + + _TouchEventArg* pEventArg = GetTouchEventArgN(touchInfo); + SysTryReturn(NID_UI, pEventArg, _UI_TOUCH_EVENT_DELIVERY_YES, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + publicTouchInfo.Construct(*pEventArg); + + if (pEventArg) + { + delete pEventArg; + pEventArg = null; + } + + if (__impl.__pPublicPropagatedTouchEventListener->OnPreviewTouchReleased(control, publicTouchInfo) == true) + { + return _UI_TOUCH_EVENT_DELIVERY_NO; + } + + _Control* pControl = _ControlManager::GetInstance()->GetObject(controlHandle); + SysTryReturn(NID_UI, pControl, _UI_TOUCH_EVENT_DELIVERY_NO, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] Target control is deleted."); + } + + // 3. Impl + isFiltered = __impl.OnPreviewTouchReleased(__impl, touchInfo); + if (isFiltered == _UI_TOUCH_EVENT_DELIVERY_NO) + { + return _UI_TOUCH_EVENT_DELIVERY_NO; + } + + // 4. Core + isFiltered = __core.OnPreviewTouchReleased(source, touchInfo); + + return isFiltered; + } + + virtual _UiTouchEventDelivery OnPreviewTouchMoved(const _Control& source, const _TouchInfo& touchInfo) + { + _UiTouchEventDelivery isFiltered = _UI_TOUCH_EVENT_DELIVERY_NO; + + 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()); + + const _ControlHandle controlHandle = pControlImpl->GetCore().GetHandle(); + + TouchEventInfo publicTouchInfo; + + _TouchEventArg* pEventArg = GetTouchEventArgN(touchInfo); + SysTryReturn(NID_UI, pEventArg, _UI_TOUCH_EVENT_DELIVERY_YES, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + publicTouchInfo.Construct(*pEventArg); + + if (pEventArg) + { + delete pEventArg; + pEventArg = null; + } + + if (__impl.__pPublicPropagatedTouchEventListener->OnPreviewTouchMoved(control, publicTouchInfo) == true) + { + return _UI_TOUCH_EVENT_DELIVERY_NO; + } + + _Control* pControl = _ControlManager::GetInstance()->GetObject(controlHandle); + SysTryReturn(NID_UI, pControl, _UI_TOUCH_EVENT_DELIVERY_NO, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] Target control is deleted."); + } + + // 3. Impl + isFiltered = __impl.OnPreviewTouchMoved(__impl, touchInfo); + if (isFiltered == _UI_TOUCH_EVENT_DELIVERY_NO) + { + return _UI_TOUCH_EVENT_DELIVERY_NO; + } + + // 4. Core + isFiltered = __core.OnPreviewTouchMoved(source, touchInfo); + + return isFiltered; + } + + virtual _UiTouchEventDelivery OnPreviewTouchCanceled(const _Control& source, const _TouchInfo& touchInfo) + { + _UiTouchEventDelivery isFiltered = _UI_TOUCH_EVENT_DELIVERY_YES; + + // 3. Impl + isFiltered = __impl.OnPreviewTouchCanceled(__impl, touchInfo); + if (isFiltered == _UI_TOUCH_EVENT_DELIVERY_NO) + { + return _UI_TOUCH_EVENT_DELIVERY_NO; + } + + // 4. Core + isFiltered = __core.OnPreviewTouchCanceled(source, touchInfo); + return isFiltered; + } + + virtual _UiTouchEventDelivery OnPreviewTouchWheeled(const _Control& source, const _TouchInfo& touchInfo) + { + _UiTouchEventDelivery isFiltered = _UI_TOUCH_EVENT_DELIVERY_NO; + + // 3. Impl + isFiltered = __impl.OnPreviewTouchWheeled(__impl, touchInfo); + if (isFiltered == _UI_TOUCH_EVENT_DELIVERY_NO) + { + return _UI_TOUCH_EVENT_DELIVERY_NO; + } + + // 4. Core + isFiltered = __core.OnPreviewTouchWheeled(source, touchInfo); + + return isFiltered; + } + + virtual void OnTouchPressHandled(const _Control& source) + { + __impl.OnTouchPressHandled(source); + } + + virtual void OnTouchReleaseHandled(const _Control& source) + { + __impl.OnTouchReleaseHandled(source); + } + + virtual void OnTouchMoveHandled(const _Control& source) + { + __impl.OnTouchMoveHandled(source); + } + + virtual void OnTouchCancelHandled(const _Control& source) + { + __impl.OnTouchCancelHandled(source); + } + +private: + _ControlImpl& __impl; + _Control& __core; + Control& __public; +}; + +class _ControlImpl::_PropagatedKeyEventListener + : public _IPropagatedKeyEventListener + , public ITimerEventListener +{ +public: + _PropagatedKeyEventListener(_ControlImpl& impl) + : __impl(impl) + , __core(impl.GetCore()) + , __public(impl.GetPublic()) + , __pTimer(null) + , __isKeyPressed(false) + , __keyInfo(KEY_PRESSED, _KEY_INVALID, 0, null) + { + } + + virtual ~_PropagatedKeyEventListener() + { + if (__pTimer != null) + { + __pTimer->Cancel(); + + delete __pTimer; + __pTimer = null; + } + } + + void OnTimerExpired(Timer& timer) + { + if (__isKeyPressed) + { + SysTryReturnVoidResult(NID_UI, __impl.__pCoreKeyEvent, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + _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()); + } + } + } + + virtual bool TranslateKeyEventInfo(const _Control& source, _KeyInfo& keyInfo) + { + SysTryReturn(NID_UI, __impl.__pCoreKeyEvent, false, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + bool isFiltered = false; + + 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."); + + Control& control = static_cast(pControlImpl->GetPublic()); + + KeyEventInfo keyEventInfo(static_cast(keyInfo.GetKeyCode()), static_cast(keyInfo.GetKeyModifier())); + + isFiltered = __impl.__pPublicPropagatedKeyEventListener->TranslateKeyEventInfo(control, keyEventInfo); + if (isFiltered) + { + keyInfo.SetKeyCode(static_cast<_KeyCode>(keyEventInfo.GetKeyCode())); + keyInfo.SetKeyModifier(static_cast<_KeyModifier>(keyEventInfo.GetKeyModifier())); + return true; + } + } + + // 3. Impl + isFiltered = __impl.TranslateKeyEventInfo(__impl, keyInfo); + if (isFiltered) + { + return true; + } + + // 4. Core + isFiltered = __core.TranslateKeyEventInfo(source, keyInfo); + + return isFiltered; + } + + virtual bool OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) + { + SysTryReturn(NID_UI, __impl.__pCoreKeyEvent, false, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + bool isFiltered = false; + + if (__impl.__pPublicPropagatedKeyEventListener != null && keyInfo.GetKeyCode() != _KEY_INVALID) + { + _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()); + + KeyEventInfo keyEventInfo(static_cast(keyInfo.GetKeyCode()), static_cast(keyInfo.GetKeyModifier())); + + isFiltered = __impl.__pPublicPropagatedKeyEventListener->OnKeyPressed(control, keyEventInfo); + if (isFiltered) + { + return true; + } + } + + if (&source == &__core) + { + if (!__isKeyPressed) + { + __pTimer = new (std::nothrow) Timer; + SysTryReturn(NID_UI, __pTimer, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + result r = __pTimer->Construct(*this); + SysTryReturn(NID_UI, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + r = __pTimer->Start(keyPressTimer); + if (r == E_SUCCESS) + { + __isKeyPressed = true; + __keyInfo = keyInfo; + } + } + + isFiltered = __impl.__pCoreKeyEvent->ProcessListener(KEY_PRESSED, keyInfo.GetKeyCode()); + if (isFiltered) + { + return true; + } + } + + // 3. Impl + isFiltered = __impl.OnKeyPressed(__impl, keyInfo); + if (isFiltered) + { + return true; + } + + // 4. Core + isFiltered = __core.OnKeyPressed(source, keyInfo); + + return isFiltered; + } + + virtual bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) + { + SysTryReturn(NID_UI, __impl.__pCoreKeyEvent, false, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + bool isFiltered = false; + + if (__impl.__pPublicPropagatedKeyEventListener != null && keyInfo.GetKeyCode() != _KEY_INVALID) + { + _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()); + + KeyEventInfo keyEventInfo(static_cast(keyInfo.GetKeyCode()), static_cast(keyInfo.GetKeyModifier())); + + isFiltered = __impl.__pPublicPropagatedKeyEventListener->OnKeyReleased(control, keyEventInfo); + if (isFiltered) + { + return true; + } + } + + if (&source == &__core) + { + __isKeyPressed = false; + + if (__pTimer != null) + { + __pTimer->Cancel(); + + delete __pTimer; + __pTimer = null; + } + + isFiltered = __impl.__pCoreKeyEvent->ProcessListener(KEY_RELEASED, keyInfo.GetKeyCode()); + if (isFiltered) + { + return true; + } + } + + // 3. Impl + isFiltered = __impl.OnKeyReleased(__impl, keyInfo); + if (isFiltered) + { + return true; + } + + // 4. Core + isFiltered = __core.OnKeyReleased(source, keyInfo); + + return isFiltered; + } + + virtual bool OnPreviewKeyPressed(const _Control& source, const _KeyInfo& keyInfo) + { + bool isFiltered = false; + + if (__impl.__pPublicPropagatedKeyEventListener != null && keyInfo.GetKeyCode() != _KEY_INVALID) + { + _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()); + + KeyEventInfo keyEventInfo(static_cast(keyInfo.GetKeyCode()), static_cast(keyInfo.GetKeyModifier())); + + isFiltered = __impl.__pPublicPropagatedKeyEventListener->OnPreviewKeyPressed(control, keyEventInfo); + if (isFiltered) + { + return true; + } + } + + // 3. Impl + isFiltered = __impl.OnPreviewKeyPressed(__impl, keyInfo); + if (isFiltered) + { + return true; + } + + // 4. Core + isFiltered = __core.OnPreviewKeyPressed(source, keyInfo); + + return isFiltered; + } + + virtual bool OnPreviewKeyReleased(const _Control& source, const _KeyInfo& keyInfo) + { + bool isFiltered = false; + + if (__impl.__pPublicPropagatedKeyEventListener != null && keyInfo.GetKeyCode() != _KEY_INVALID) + { + _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()); + + KeyEventInfo keyEventInfo(static_cast(keyInfo.GetKeyCode()), static_cast(keyInfo.GetKeyModifier())); + + isFiltered = __impl.__pPublicPropagatedKeyEventListener->OnPreviewKeyReleased(control, keyEventInfo); + if (isFiltered) + { + return true; + } + } + + // 3. Impl + isFiltered = __impl.OnPreviewKeyReleased(__impl, keyInfo); + if (isFiltered) + { + return true; + } + + // 4. Core + isFiltered = __core.OnPreviewKeyReleased(source, keyInfo); + + return isFiltered; + } +private: + _ControlImpl& __impl; + _Control& __core; + Control& __public; + + Tizen::Base::Runtime::Timer* __pTimer; + bool __isKeyPressed; + _KeyInfo __keyInfo; +}; + +Rectangle +_ControlImpl::GetErrorBounds(void) +{ + return Rectangle(0, 0, -1, -1); +} + +FloatRectangle +_ControlImpl::GetErrorBoundsF(void) +{ + return FloatRectangle(0.0f, 0.0f, -1.0f, -1.0f); +} + +CompositeMode +_ControlImpl::GetErrorCompositeMode(void) +{ + return COMPOSITE_MODE_ALPHA_BLENDING; +} + +Color +_ControlImpl::GetErrorChromaKeyColor(void) +{ + return Color::GetColor(COLOR_ID_MAGENTA); +} + +Dimension +_ControlImpl::GetErrorMinimumSize(void) +{ + return Dimension(-1, -1); +} + +FloatDimension +_ControlImpl::GetErrorMinimumSizeF(void) +{ + return FloatDimension(-1.0f, -1.0f); +} + +Dimension +_ControlImpl::GetErrorMaximumSize(void) +{ + return Dimension(-1, -1); +} + +FloatDimension +_ControlImpl::GetErrorMaximumSizeF(void) +{ + return FloatDimension(-1.0f, -1.0f); +} + +const char* +_ControlImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::Control"; +} + +const Control& +_ControlImpl::GetPublic(void) const +{ + return *__pControlPublic; +} + +Control& +_ControlImpl::GetPublic(void) +{ + return *__pControlPublic; +} + +const _Control& +_ControlImpl::GetCore(void) const +{ + return *__pControlCore; +} + +_Control& +_ControlImpl::GetCore(void) +{ + return *__pControlCore; +} + +result +_ControlImpl::AddFocusEventListener(IFocusEventListener& listener) +{ + OnFocusEventListenerAdded(listener); + return E_SUCCESS; +} + +result +_ControlImpl::AddKeyEventListener(IKeyEventListener& listener) +{ + ClearLastResult(); + SysTryReturn(NID_UI, + __pPublicKeyEventListeners->Add(const_cast (&listener)) == E_SUCCESS, E_SYSTEM, + E_SYSTEM, "[E_SYSTEM] System error occurred."); + + return E_SUCCESS; +} + +result +_ControlImpl::AddTouchEventListener(ITouchEventListener& listener) +{ + SysAssert(__pControlCore && __pCoreEventListener && __pLongPressGestureDetector && __pFlickGestureDetector); + + ClearLastResult(); + SysTryReturn(NID_UI, + __pPublicTouchEventListeners->Add(const_cast (&listener)) == E_SUCCESS, E_SYSTEM, + E_SYSTEM, "[E_SYSTEM] System error occurred."); + + OnTouchEventListenerAdded(); + + return E_SUCCESS; +} + +Tizen::Base::Collection::LinkedListT * +_ControlImpl::GetTouchEventListener(void) const +{ + return __pPublicTouchEventListeners; +} + +Tizen::Base::Collection::LinkedListT * +_ControlImpl::GetKeyEventListener(void) const +{ + return __pPublicKeyEventListeners; +} + +result +_ControlImpl::AddDragDropEventListener(IDragDropEventListener& listener) +{ + ClearLastResult(); + SysTryReturn(NID_UI, + __pPublicDragDropEventListeners->Add(const_cast (&listener)) == E_SUCCESS, E_SYSTEM, + E_SYSTEM, "[E_SYSTEM] System error occurred."); + + return E_SUCCESS; +} + +result +_ControlImpl::AddDragDropEventListener(IDragDropEventListenerF& listener) +{ + ClearLastResult(); + SysTryReturn(NID_UI, + __pPublicDragDropEventListeners->Add(const_cast (&listener)) == E_SUCCESS, E_SYSTEM, + E_SYSTEM, "[E_SYSTEM] System error occurred."); + + return E_SUCCESS; +} + +Tizen::Base::Collection::LinkedListT * +_ControlImpl::GetDragDropEventListener(void) const +{ + return __pPublicDragDropEventListeners; +} + +result +_ControlImpl::AddTouchModeChangedEventListener(ITouchModeChangedEventListener& listener) +{ + ClearLastResult(); + SysTryReturn(NID_UI, + __pPublicTouchModeChangedEventListeners->Add( + const_cast (&listener)) == E_SUCCESS, E_SYSTEM, + E_SYSTEM, "[E_SYSTEM] System error occurred."); + + return E_SUCCESS; +} + +result +_ControlImpl::RemoveFocusEventListener(IFocusEventListener& listener) +{ + OnFocusEventListenerRemoved(listener); + return E_SUCCESS; +} + +result +_ControlImpl::RemoveKeyEventListener(IKeyEventListener& listener) +{ + ClearLastResult(); + SysTryReturn(NID_UI, + __pPublicKeyEventListeners->Remove(&listener) == E_SUCCESS, E_SYSTEM, + E_SYSTEM, "[E_SYSTEM] System error occurred."); + + return E_SUCCESS; +} + +result +_ControlImpl::RemoveTouchEventListener(ITouchEventListener& listener) +{ + ClearLastResult(); + SysTryReturn(NID_UI, + __pPublicTouchEventListeners->Remove(&listener) == E_SUCCESS, E_SYSTEM, + E_SYSTEM, "[E_SYSTEM] System error occurred."); + + // [ToDo] if the number of touch event listers becomes 0, disable gesture recognition. + + OnTouchEventListenerRemoved(); + + return E_SUCCESS; +} + +result +_ControlImpl::RemoveDragDropEventListener(IDragDropEventListener& listener) +{ + ClearLastResult(); + SysTryReturn(NID_UI, + __pPublicDragDropEventListeners->Remove(&listener) == E_SUCCESS, E_SYSTEM, + E_SYSTEM, "[E_SYSTEM] System error occurred."); + + return E_SUCCESS; +} + +result +_ControlImpl::RemoveDragDropEventListenerF(IDragDropEventListenerF& listener) +{ + ClearLastResult(); + SysTryReturn(NID_UI, + __pPublicDragDropEventListeners->Remove(&listener) == E_SUCCESS, E_SYSTEM, + E_SYSTEM, "[E_SYSTEM] System error occurred."); + + return E_SUCCESS; +} + +result +_ControlImpl::RemoveTouchModeChangedEventListener(ITouchModeChangedEventListener& listener) +{ + ClearLastResult(); + SysTryReturn(NID_UI, + __pPublicTouchModeChangedEventListeners->Remove(&listener) == E_SUCCESS, E_SYSTEM, + E_SYSTEM, "[E_SYSTEM] System error occurred."); + + return E_SUCCESS; +} + +result +_ControlImpl::AddGestureDetector(const TouchGestureDetector& gestureDetector) +{ + SysTryReturn(NID_UI, + __pPublicGestureDetectors->Add( + const_cast (&gestureDetector)) == E_SUCCESS, E_SYSTEM, + E_SYSTEM, "[E_SYSTEM] System error occurred."); + + const _TouchGestureDetectorImpl* pImpl = _TouchGestureDetectorImpl::GetInstance(gestureDetector); + SysTryReturn(NID_UI, pImpl, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + result r = GetCore().AddGestureDetector(pImpl->GetCore()); + SysTryReturn(NID_UI, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + return E_SUCCESS; +} + +result +_ControlImpl::RemoveGestureDetector(const TouchGestureDetector& gestureDetector) +{ + SysTryReturn(NID_UI, + __pPublicGestureDetectors->Remove( + const_cast (&gestureDetector)) == E_SUCCESS, E_SYSTEM, + E_SYSTEM, "[E_SYSTEM] System error occurred."); + + const _TouchGestureDetectorImpl* pImpl = _TouchGestureDetectorImpl::GetInstance(gestureDetector); + SysTryReturn(NID_UI, pImpl, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + result r = GetCore().RemoveGestureDetector(pImpl->GetCore()); + SysTryReturn(NID_UI, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + return r; +} + +IListT* +_ControlImpl::GetGestureDetectorList(void) const +{ + return __pPublicGestureDetectors; +} + +bool +_ControlImpl::IsMovable(void) const +{ + return GetCore().IsMovable(); +} + +bool +_ControlImpl::IsResizable(void) const +{ + return GetCore().IsResizable(); +} + +Dimension +_ControlImpl::GetContentSize(void) const +{ + return GetCore().GetContentSize(); +} + +FloatDimension +_ControlImpl::GetContentSizeF(bool horizontalMode, bool verticalMode) const +{ + return GetCore().GetContentSizeF(horizontalMode, verticalMode); +} + +HitTestResult +_ControlImpl::HitTest(const Tizen::Graphics::FloatPoint& point) +{ + return GetCore().HitTest(point); +} + +String +_ControlImpl::GetDescription(void) const +{ + String description(L""); + + description.Format(LOG_LEN_MAX, L"0x%x(0x%x, %s) fgColor(0x%x) fontSize(%d) ", this, __pControlPublic, GetPublicClassName(), __foregroundColor.GetRGB32(), __fontSize); + + if (__pControlAnimator) + { + description.Append(L"ControlAnimator("); + description.Append((int)__pControlAnimator); + description.Append(L") "); + } + + if (__pCustomVisualElement) + { + description.Append(L"CustomVisualElement("); + description.Append((int)__pCustomVisualElement); + description.Append(L") "); + } + + if (__pBuilderPortraitBounds) + { + description.Append(L"PortraitBounds("); + description.Append(__pBuilderPortraitBounds->x); + description.Append(L" "); + description.Append(__pBuilderPortraitBounds->y); + description.Append(L" "); + description.Append(__pBuilderPortraitBounds->width); + description.Append(L" "); + description.Append(__pBuilderPortraitBounds->height); + description.Append(L") "); + } + + if (__pBuilderLandscapeBounds) + { + description.Append(L"LandscapeBounds("); + description.Append(__pBuilderLandscapeBounds->x); + description.Append(L" "); + description.Append(__pBuilderLandscapeBounds->y); + description.Append(L" "); + description.Append(__pBuilderLandscapeBounds->width); + description.Append(L" "); + description.Append(__pBuilderLandscapeBounds->height); + description.Append(L") "); + } + + if (__pPublicGestureDetectors->GetCount() > 0 ) + { + IEnumeratorT* pEnumerator = __pPublicGestureDetectors->GetEnumeratorN(); + if (pEnumerator) + { + description.Append(L"TouchGestureDetector("); + + while (pEnumerator->MoveNext() == E_SUCCESS) + { + TouchGestureDetector* pTouchGestureDetector = null; + pEnumerator->GetCurrent(pTouchGestureDetector); + if (pTouchGestureDetector) + { + description.Append((int)pTouchGestureDetector); + description.Append(L" "); + } + } + + description.Append(L") "); + + delete pEnumerator; + } + } + + if (__pPublicFocusEventListeners->GetCount() > 0 ) + { + IEnumeratorT* pEnumerator = __pPublicFocusEventListeners->GetEnumeratorN(); + if (pEnumerator) + { + description.Append(L"FocusListener("); + + while (pEnumerator->MoveNext() == E_SUCCESS) + { + IEventListener* pListener = null; + pEnumerator->GetCurrent(pListener); + if (pListener) + { + description.Append((int)pListener); + description.Append(L" "); + } + } + + description.Append(L") "); + + delete pEnumerator; + } + } + + if (__pPublicKeyEventListeners->GetCount() > 0 ) + { + IEnumeratorT* pEnumerator = __pPublicKeyEventListeners->GetEnumeratorN(); + if (pEnumerator) + { + description.Append(L"KeyListener("); + + while (pEnumerator->MoveNext() == E_SUCCESS) + { + IEventListener* pListener = null; + pEnumerator->GetCurrent(pListener); + if (pListener) + { + description.Append((int)pListener); + description.Append(L" "); + } + } + + description.Append(L") "); + + delete pEnumerator; + } + } + + if (__pPublicTouchEventListeners->GetCount() > 0 ) + { + IEnumeratorT* pEnumerator = __pPublicTouchEventListeners->GetEnumeratorN(); + if (pEnumerator) + { + description.Append(L"TouchListener("); + + while (pEnumerator->MoveNext() == E_SUCCESS) + { + IEventListener* pListener = null; + pEnumerator->GetCurrent(pListener); + if (pListener) + { + description.Append((int)pListener); + description.Append(L" "); + } + } + + description.Append(L") "); + + delete pEnumerator; + } + } + + if (__pPublicDragDropEventListeners->GetCount() > 0 ) + { + IEnumeratorT* pEnumerator = __pPublicDragDropEventListeners->GetEnumeratorN(); + if (pEnumerator) + { + description.Append(L"DragDropListener("); + + while (pEnumerator->MoveNext() == E_SUCCESS) + { + IEventListener* pListener = null; + pEnumerator->GetCurrent(pListener); + if (pListener) + { + description.Append((int)pListener); + description.Append(L" "); + } + } + + description.Append(L") "); + + delete pEnumerator; + } + } + + if (__pPublicTouchModeChangedEventListeners->GetCount() > 0 ) + { + IEnumeratorT* pEnumerator = __pPublicTouchModeChangedEventListeners->GetEnumeratorN(); + if (pEnumerator) + { + description.Append(L"TouchModeListener("); + + while (pEnumerator->MoveNext() == E_SUCCESS) + { + IEventListener* pListener = null; + pEnumerator->GetCurrent(pListener); + if (pListener) + { + description.Append((int)pListener); + description.Append(L" "); + } + } + + description.Append(L") "); + + delete pEnumerator; + } + } + + return description; +} + +void +_ControlImpl::OnDraw(void) +{ + GetCore().OnDraw(); +} + +Tizen::Graphics::Canvas* +_ControlImpl::OnCanvasRequestedN(const Tizen::Graphics::FloatRectangle& bounds) +{ + return GetCore().OnCanvasRequestedN(bounds); +} + +Tizen::Graphics::Bitmap* +_ControlImpl::OnCapturedBitmapRequestedN(void) +{ + + return GetCore().OnCapturedBitmapRequestedN(); +} + +result +_ControlImpl::OnAttaching(const _Control* pParent) +{ + return GetCore().OnAttaching(pParent); +} + +result +_ControlImpl::OnAttached(void) +{ + return GetCore().OnAttached(); +} + +result +_ControlImpl::OnAttachingToMainTree(const _Control* pParent) +{ + return GetCore().OnAttachingToMainTree(pParent); +} + +result +_ControlImpl::OnPreAttachedToMainTree(void) +{ + return E_SUCCESS; +} + +result +_ControlImpl::OnAttachedToMainTree(void) +{ + result returnResultPublic = E_SUCCESS; + result returnResultCore = E_SUCCESS; + + if (_AppInfo::GetApiVersion() == _API_VERSION_2_0 && _AppInfo::IsOspCompat()) + { + GetCore().SetDrawWhenVisible(false); + GetCore().SetTerminatingOrder(true); + } + + returnResultPublic = GetPublic().OnInitializing(); + SysTryReturn(NID_UI, returnResultPublic == E_SUCCESS, returnResultPublic, returnResultPublic, "[%s] propagated.", GetErrorMessage(returnResultPublic)); + + returnResultCore = GetCore().OnAttachedToMainTree(); + SysTryReturn(NID_UI, returnResultCore == E_SUCCESS, returnResultCore, returnResultCore, "[%s] propagated.", GetErrorMessage(returnResultCore)); + + return returnResultPublic; +} + +result +_ControlImpl::OnDetachingFromMainTree(void) +{ + GetPublic().OnTerminating(); + return GetCore().OnDetachingFromMainTree(); +} + +void +_ControlImpl::OnAttachingFailed(const _Control& parent) +{ + GetCore().OnAttachingFailed(parent); +} + +result +_ControlImpl::OnDetaching(void) +{ + return E_SUCCESS; +} + +result +_ControlImpl::OnBoundsChanging(const Rectangle& bounds) +{ + __oldBounds = _CoordinateSystemUtils::ConvertToFloat(GetBounds()); + + return GetCore().OnBoundsChanging(bounds); +} + +result +_ControlImpl::OnBoundsChanging(const FloatRectangle& bounds) +{ + __oldBounds = GetBoundsF(); + + return GetCore().OnBoundsChanging(bounds); +} + +void +_ControlImpl::OnBoundsChanged(void) +{ + GetCore().OnBoundsChanged(); +} + +void +_ControlImpl::OnEvaluateSize(Dimension& evaluatedSize) +{ + GetCore().OnEvaluateSize(evaluatedSize); +} + +bool +_ControlImpl::OnEvaluateSize(FloatDimension& evaluatedSize) +{ + return GetCore().OnEvaluateSize(evaluatedSize); +} + +void +_ControlImpl::OnParentBoundsChanged(const _Control& parent) +{ + GetCore().OnParentBoundsChanged(parent); +} + +void +_ControlImpl::OnChildAttached(const _Control& child) +{ + GetCore().OnChildAttached(child); +} + +void +_ControlImpl::OnChildAttaching(const _Control& child) +{ + GetCore().OnChildAttaching(child); +} + +void +_ControlImpl::OnChildDetaching(const _Control& child) +{ + GetCore().OnChildDetaching(child); +} + +void +_ControlImpl::OnChildDetached(const _Control& child) +{ + GetCore().OnChildDetached(child); +} + +void +_ControlImpl::OnChildBoundsChanged(const _Control& child) +{ + GetCore().OnChildBoundsChanged(child); +} + +void +_ControlImpl::OnChildVisibleStateChanged(const _Control& child) +{ + GetCore().OnChildVisibleStateChanged(child); +} + +void +_ControlImpl::OnChangeLayout(_ControlOrientation orientation) +{ + result r = E_SUCCESS; + + if (IsAttachedToMainTree()) + { + Rectangle builderBounds; + bool exist = GetBuilderBounds(orientation, builderBounds); + if (exist) + { + bool movable = IsMovable(); + bool resizable = IsResizable(); + + SetMovable(true); + SetResizable(true); + + r = SetBounds(builderBounds); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] Failed to set bounds of %s.", GetPublicClassName()); + builderBounds.x = 0; + builderBounds.y = 0; + SetClientBounds(builderBounds); + + SetMovable(movable); + SetResizable(resizable); + + } + } + + GetCore().OnChangeLayout(orientation); +} + +void +_ControlImpl::OnChangeLayout(_ControlRotation rotation) +{ + GetCore().OnChangeLayout(rotation); +} + +void +_ControlImpl::OnZOrderChanging(_ControlZOrderUpdate zOrderUpdate) +{ + GetCore().OnZOrderChanging(zOrderUpdate); +} + +void +_ControlImpl::OnVisibleStateChanging(void) +{ + GetCore().OnVisibleStateChanging(); +} + +void +_ControlImpl::OnVisibleStateChanged(void) +{ + GetCore().OnVisibleStateChanged(); +} + +void +_ControlImpl::OnAncestorVisibleStateChanged(const _Control& control) +{ + GetCore().OnAncestorVisibleStateChanged(control); +} + +void +_ControlImpl::OnAncestorEnableStateChanged(const _Control& control) +{ + GetCore().OnAncestorEnableStateChanged(control); +} + +void +_ControlImpl::OnAncestorInputEnableStateChanged(const _Control& control) +{ + GetCore().OnAncestorInputEnableStateChanged(control); +} + +void +_ControlImpl::OnTouchPressHandled(const _Control& control) +{ + GetCore().OnTouchPressHandled(control); +} + +void +_ControlImpl::OnTouchReleaseHandled(const _Control& control) +{ + GetCore().OnTouchReleaseHandled(control); +} + +void +_ControlImpl::OnTouchMoveHandled(const _Control& control) +{ + GetCore().OnTouchMoveHandled(control); +} + +void +_ControlImpl::OnFontChanged(Font* pFont) +{ + GetCore().OnFontChanged(pFont); +} + +void +_ControlImpl::OnFontInfoRequested(unsigned long& style, int& size) +{ + GetCore().OnFontInfoRequested(style, size); +} + +void +_ControlImpl::OnFontInfoRequested(unsigned long& style, float& size) +{ + GetCore().OnFontInfoRequested(style, size); +} + +void +_ControlImpl::OnBackgroundColorChanged(Color& backgroundColor) +{ + GetCore().OnBackgroundColorChanged(backgroundColor); +} + +void +_ControlImpl::OnFocusableStateChanged(bool focusalbeState) +{ + GetCore().OnFocusableStateChanged(focusalbeState); +} + +void +_ControlImpl::OnTouchCancelHandled(const _Control& control) +{ + GetCore().OnTouchCancelHandled(control); +} + +bool +_ControlImpl::TranslateKeyEventInfo(const _ControlImpl& source, _KeyInfo& keyInfo) +{ + return false; +} + +bool +_ControlImpl::OnKeyPressed(const _ControlImpl& source, const _KeyInfo& keyInfo) +{ + return false; +} + +bool +_ControlImpl::OnKeyReleased(const _ControlImpl& source, const _KeyInfo& keyInfo) +{ + return false; +} + +bool _ControlImpl::OnPreviewKeyPressed(const _ControlImpl& source, const _KeyInfo& keyInfo) +{ + return false; +} + +bool _ControlImpl::OnPreviewKeyReleased(const _ControlImpl& source, const _KeyInfo& keyInfo) +{ + return false; +} + +bool +_ControlImpl::CallOnTouchPressed(const _Control& source, const _TouchInfo& touchinfo) +{ + bool isFiltered = false; + + if (source.IsDelayedTouchEventEnabled()) + { + if (&source == &GetCore()) + { + const_cast<_Control&>(source).AddTouchInfo(touchinfo); + } + + return false; + } + + GetCore().SetEventEnableState(true); + + if (&source == &GetCore()) + { + isFiltered = __pCoreTouchEvent->ProcessListener(touchinfo); + if (isFiltered) + { + return true; + } + + LinkedListT * pList = GetTouchEventListener(); + if (pList && (pList->GetCount() > 0)) + { + __pCoreTouchEvent->ProcessDoublePress(touchinfo, isFiltered); + } + + __pCoreTouchEvent->ProcessDragListener(touchinfo); + } + + _TouchManager* __pTouchManager = _TouchManager::GetInstance(); + SysTryReturn(NID_UI, __pTouchManager, false, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] __pTouchManager == null."); + + if (!GetCore().IsEventEnabled()) + { + __pTouchManager->ResetTouchInfo(); + isFiltered = true; + return true; + } + + if (!__pTouchManager->IsTouchAllowed()) + { + return true; + } + + // 3. Impl + isFiltered = OnTouchPressed(*this, touchinfo); + if (isFiltered) + { + return true; + } + + // 4. Core + isFiltered = GetCore().OnTouchPressed(source, touchinfo); + + return isFiltered; + +} + +bool +_ControlImpl::CallOnTouchReleased(const _Control& source, const _TouchInfo& touchinfo) +{ + bool isFiltered = false; + + if (source.IsDelayedTouchEventEnabled()) + { + if (&source == &GetCore()) + { + const_cast<_Control&>(source).AddTouchInfo(touchinfo); + } + + return false; + } + + if (&source == &GetCore()) + { + isFiltered = __pCoreTouchEvent->ProcessListener(touchinfo); + if (isFiltered) + { + return true; + } + } + + __pCoreTouchEvent->ProcessDropListener(touchinfo); + + _TouchManager* __pTouchManager = _TouchManager::GetInstance(); + SysTryReturn(NID_UI, __pTouchManager, false, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] __pTouchManager == null."); + + if (!__pTouchManager->IsTouchAllowed()) + { + return true; + } + + // 3. Impl + isFiltered = OnTouchReleased(*this, touchinfo); + if (isFiltered) + { + return true; + } + + //send drop event to topmost touched control + __pCoreTouchEvent->ProcessDropListenerToTopControl(touchinfo); + + // 4. Core + isFiltered = GetCore().OnTouchReleased(source, touchinfo); + + return isFiltered; +} + +bool +_ControlImpl::CallOnTouchMoved(const _Control& source, const _TouchInfo& touchinfo) +{ + bool isFiltered = false; + + if (source.IsDelayedTouchEventEnabled()) + { + if (&source == &GetCore()) + { + const_cast<_Control&>(source).AddTouchInfo(touchinfo); + } + + return false; + } + + if (&source == &GetCore()) + { + isFiltered = __pCoreTouchEvent->ProcessListener(touchinfo); + if (isFiltered) + { + return true; + } + + __pCoreTouchEvent->ProcessDragListener(touchinfo); + } + + _TouchManager* __pTouchManager = _TouchManager::GetInstance(); + SysTryReturn(NID_UI, __pTouchManager, false, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] __pTouchManager == null."); + + if (!__pTouchManager->IsTouchAllowed()) + { + return true; + } + + // 3. Impl + isFiltered = OnTouchMoved(*this, touchinfo); + if (isFiltered) + { + return true; + } + + // 4. Core + isFiltered = GetCore().OnTouchMoved(source, touchinfo); + + return isFiltered; +} + +bool +_ControlImpl::CallOnTouchCanceled(const _Control& source, const _TouchInfo& touchinfo) +{ + bool isFiltered = false; + + __pCoreTouchEvent->ProcessDropListener(touchinfo); + __pCoreTouchEvent->ProcessDropListenerToTopControl(touchinfo); + + if (&source == &GetCore()) + { + isFiltered = __pCoreTouchEvent->ProcessListener(touchinfo); + if (isFiltered) + { + return true; + } + } + + // 3. Impl + isFiltered = OnTouchCanceled(*this, touchinfo); + if (isFiltered) + { + return true; + } + + // 4. Core + isFiltered = GetCore().OnTouchCanceled(source, touchinfo); + + return isFiltered; +} + +result +_ControlImpl::OnTouchEventListenerAdded(void) +{ + // First time, enable gesture. + if (__pPublicTouchEventListeners->GetCount() == 1) + { + result r = E_SUCCESS; + + r = __pControlCore->AddGestureDetector(*__pLongPressGestureDetector); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __pLongPressGestureDetector->AddGestureListener(*__pCoreEventListener); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __pControlCore->AddGestureDetector(*__pFlickGestureDetector); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = __pFlickGestureDetector->AddGestureListener(*__pCoreEventListener); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + return E_SUCCESS; +} + +result +_ControlImpl::OnTouchEventListenerRemoved(void) +{ + return E_SUCCESS; +} + +void +_ControlImpl::OnFocusEventListenerAdded(IFocusEventListener& listener) +{ + ClearLastResult(); + SysTryReturnVoidResult(NID_UI, + __pPublicFocusEventListeners->Add(const_cast (&listener)) == E_SUCCESS, E_SYSTEM, + "[E_SYSTEM] System error occurred."); +} + +void +_ControlImpl::OnFocusEventListenerRemoved(IFocusEventListener& listener) +{ + ClearLastResult(); + SysTryReturnVoidResult(NID_UI, + __pPublicFocusEventListeners->Remove(&listener) == E_SUCCESS, E_SYSTEM, + "[E_SYSTEM] System error occurred."); +} + +bool +_ControlImpl::OnTouchPressed(const _ControlImpl& source, const _TouchInfo& touchinfo) +{ + return false; +} + +bool +_ControlImpl::OnTouchCanceled(const _ControlImpl& source, const _TouchInfo& touchinfo) +{ + return false; +} + +bool +_ControlImpl::OnTouchReleased(const _ControlImpl& source, const _TouchInfo& touchinfo) +{ + return false; +} + +bool +_ControlImpl::OnTouchMoved(const _ControlImpl& source, const _TouchInfo& touchinfo) +{ + return false; +} + +bool +_ControlImpl::OnTouchWheeled(const _ControlImpl& source, const _TouchInfo& touchinfo) +{ + return false; +} + +_UiTouchEventDelivery +_ControlImpl::OnPreviewTouchPressed(const _ControlImpl& source, const _TouchInfo& touchInfo) +{ + return _UI_TOUCH_EVENT_DELIVERY_YES; +} + +_UiTouchEventDelivery +_ControlImpl::OnPreviewTouchReleased(const _ControlImpl& source, const _TouchInfo& touchInfo) +{ + return _UI_TOUCH_EVENT_DELIVERY_YES; +} + +_UiTouchEventDelivery +_ControlImpl::OnPreviewTouchMoved(const _ControlImpl& source, const _TouchInfo& touchInfo) +{ + return _UI_TOUCH_EVENT_DELIVERY_YES; +} + +_UiTouchEventDelivery +_ControlImpl::OnPreviewTouchCanceled(const _ControlImpl& source, const _TouchInfo& touchInfo) +{ + return _UI_TOUCH_EVENT_DELIVERY_YES; +} + +_UiTouchEventDelivery +_ControlImpl::OnPreviewTouchWheeled(const _ControlImpl& source, const _TouchInfo& touchInfo) +{ + return _UI_TOUCH_EVENT_DELIVERY_YES; +} + +bool +_ControlImpl::OnFocusGained(const _ControlImpl& source) +{ + return false; +} + +bool +_ControlImpl::OnFocusLost(const _ControlImpl& source) +{ + return false; +} + +bool +_ControlImpl::OnTraversalControlFocusGained(void) +{ + return false; +} +bool +_ControlImpl::OnTraversalControlFocusLost(void) +{ + return false; +} +bool +_ControlImpl::OnNotifiedN(const _ControlImpl& source, Tizen::Base::Collection::IList* pArgs) +{ + return false; +} + +void +_ControlImpl::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs) +{ + GetPublic().OnUserEventReceivedN(requestId, pArgs); +} + +_Window* +_ControlImpl::OnDragAndDropBeginning(void) +{ + return GetCore().OnDragAndDropBeginning(); +} + +void +_ControlImpl::OnDragAndDropDropping(void) +{ + GetCore().OnDragAndDropDropping(); +} + +void +_ControlImpl::OnDragAndDropEntered(void) +{ + GetCore().OnDragAndDropEntered(); +} + +void +_ControlImpl::OnDragAndDropMoved(const FloatPoint& position) +{ + GetCore().OnDragAndDropMoved(position); +} + +void +_ControlImpl::OnDragAndDropLeft(void) +{ + GetCore().OnDragAndDropLeft(); +} + +void +_ControlImpl::OnDragAndDropDropped(const _DragAndDropItem& dragAndDropItem) +{ + GetCore().OnDragAndDropDropped(dragAndDropItem); +} + +bool +_ControlImpl::IsAnimating(void) const +{ + 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 +_ControlImpl::SendNotification(const _ControlImpl& source, Tizen::Base::Collection::IList* pArgs) +{ + _ControlImpl& impl = const_cast <_ControlImpl&>(source); + + Tizen::Base::String* pString = dynamic_cast (pArgs->GetAt(0)); + if (pString) + { + if (*pString == _USER_EVENT) + { + _UserEventInfo* pUserEventInfo = dynamic_cast <_UserEventInfo*>(pArgs->GetAt(1)); + if (pUserEventInfo) + { + impl.OnUserEventReceivedN(pUserEventInfo->GetRequestId(), pUserEventInfo->GetArgs()); + } + pArgs->RemoveAll(true); + delete pArgs; + + return true; + } + else if (*pString == _REQUEST_REDRAW_EVENT) + { + impl.Draw(); + + Boolean* pBoolean = dynamic_cast (pArgs->GetAt(1)); + if (pBoolean && pBoolean->ToBool()) + { + impl.Show(); + } + pArgs->RemoveAll(true); + delete pArgs; + + return true; + } + } + + return false; +} + +result +_ControlImpl::Draw(bool recursive) +{ + if (IsAttachedToMainTree() == false) + { + SetLastResult(E_INVALID_OPERATION); + return E_INVALID_OPERATION; + } + + GetCore().Draw(recursive); + + return E_SUCCESS; +} + +result +_ControlImpl::Show(void) +{ + SysTryReturn(NID_UI, + GetParent() || IsAttachedToMainTree(), E_INVALID_OPERATION, + E_INVALID_OPERATION, "[E_INVALID_OPERATION] This control should have a parent or be attached to the main tree."); + + GetCore().Show(); + + return E_SUCCESS; +} + +void +_ControlImpl::Invalidate(bool recursive) +{ + if (IsAttachedToMainTree() == false) + { + SetLastResult(E_INVALID_OPERATION); + return; + } + + GetCore().Invalidate(recursive); +} + +void +_ControlImpl::Invalidate(const Rectangle& rect) +{ + if (IsAttachedToMainTree() == false) + { + SetLastResult(E_INVALID_OPERATION); + return; + } + + GetCore().Invalidate(rect); +} + +void +_ControlImpl::Invalidate(const FloatRectangle& rect) +{ + if (IsAttachedToMainTree() == false) + { + SetLastResult(E_INVALID_OPERATION); + return; + } + + GetCore().Invalidate(rect); +} + +void +_ControlImpl::RequestRedraw(bool show) const +{ + ClearLastResult(); + + ArrayList* pEventArgs = new (std::nothrow) ArrayList; + SysTryReturnVoidResult(NID_UI, pEventArgs, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + pEventArgs->Construct(); + + Tizen::Base::String* pString = new (std::nothrow) Tizen::Base::String(_REQUEST_REDRAW_EVENT); + SysTryReturnVoidResult(NID_UI, pString, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + // Index 0 : Type + pEventArgs->Add(*pString); + + Boolean* pBoolean = new (std::nothrow) Boolean(show); + SysTryReturnVoidResult(NID_UI, pBoolean, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + // Index 1 : User Data + pEventArgs->Add(*pBoolean); + + _UiEventManager* pEventManager = _UiEventManager::GetInstance(); + SysTryReturnVoidResult(NID_UI, pEventManager, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + _UiNotificationEvent event(GetCore().GetHandle(), pEventArgs); + + result r = pEventManager->PostEvent(event); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] System error occurred."); +} + +void +_ControlImpl::SendUserEvent(RequestId requestId, const IList* pArgs) const +{ + ClearLastResult(); + + ArrayList* pEventArgs = new (std::nothrow) ArrayList; + SysTryReturnVoidResult(NID_UI, pEventArgs, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + pEventArgs->Construct(); + + Tizen::Base::String* pString = new (std::nothrow) Tizen::Base::String(_USER_EVENT); + SysTryReturnVoidResult(NID_UI, pString, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + // Index 0 : Type + pEventArgs->Add(*pString); + + _UserEventInfo* pUserEventInfo = new (std::nothrow) _UserEventInfo(requestId, pArgs); + SysTryReturnVoidResult(NID_UI, pUserEventInfo, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + // Index 1 : User Data + pEventArgs->Add(*pUserEventInfo); + + _UiEventManager* pEventManager = _UiEventManager::GetInstance(); + SysTryReturnVoidResult(NID_UI, pEventManager, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + _UiNotificationEvent event(GetCore().GetHandle(), pEventArgs); + + result r = pEventManager->PostEvent(event); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, E_SYSTEM, "[E_SYSTEM] System error occurred."); +} + +bool +_ControlImpl::Contains(const Point& point) const +{ + return GetCore().Contains(point); +} + +bool +_ControlImpl::Contains(const FloatPoint& point) const +{ + return GetCore().Contains(point); +} + +void +_ControlImpl::ConsumeInputEvent(void) +{ + ClearLastResult(); + __inputEventConsumed = true; +} + +bool +_ControlImpl::IsInputEventConsumed(void) const +{ + ClearLastResult(); + return __inputEventConsumed; +} + +void +_ControlImpl::ResetInputEventConsumed(void) +{ + ClearLastResult(); + __inputEventConsumed = false; +} + +Tizen::Base::String +_ControlImpl::GetName(void) const +{ + return GetCore().GetName(); +} + +void +_ControlImpl::SetName(const Tizen::Base::String& name) +{ + GetCore().SetName(name); +} + +_ContainerImpl* +_ControlImpl::GetParent(void) const +{ + ClearLastResult(); + + _Control* pParent = GetCore().GetParent(); + if (pParent == null) + { + return null; + } + + void* pData = pParent->GetUserData(); + if (pData == null) + { + return null; // This is for the _ControlManager::__pRoot. + } + + _ContainerImpl* pParentImpl = static_cast <_ContainerImpl*>(pData); + return pParentImpl; +} + +Canvas* +_ControlImpl::GetCanvasN(void) const +{ + SysTryReturn(NID_UI, + GetParent() || IsAttachedToMainTree(), null, + E_INVALID_OPERATION, "[E_INVALID_OPERATION] This control should have a parent or be attached to the main tree."); + + Canvas* pCanvas = GetCore().GetCanvasN(); + result r = GetLastResult(); + if (IsFailed(r)) + { + if (r == E_OPERATION_FAILED) + { + SetLastResult(E_INVALID_OPERATION); + } + SysLog(NID_UI_CTRL, "[%s] Propagated", GetErrorMessage(GetLastResult())); + } + else + { + if (pCanvas) + { + pCanvas->SetBackgroundColor(GetBackgroundColor()); + pCanvas->SetForegroundColor(GetForegroundColor()); + } + } + + return pCanvas; +} + +Canvas* +_ControlImpl::GetCanvasN(const Rectangle& bounds) const +{ + SysTryReturn(NID_UI, + GetParent() || IsAttachedToMainTree(), null, + E_INVALID_OPERATION, "[E_INVALID_OPERATION] This control should have a parent or be attached to the main tree."); + + Canvas* pCanvas = GetCore().GetCanvasN(bounds); + result r = GetLastResult(); + if (IsFailed(r)) + { + if (r == E_OPERATION_FAILED) + { + SetLastResult(E_INVALID_OPERATION); + } + SysLog(NID_UI_CTRL, "[%s] Propagated", GetErrorMessage(GetLastResult())); + } + else + { + if (pCanvas) + { + pCanvas->SetBackgroundColor(GetBackgroundColor()); + pCanvas->SetForegroundColor(GetForegroundColor()); + } + } + + return pCanvas; +} + +Canvas* +_ControlImpl::GetCanvasN(const FloatRectangle& bounds) const +{ + SysTryReturn(NID_UI, + GetParent() || IsAttachedToMainTree(), null, + E_INVALID_OPERATION, "[E_INVALID_OPERATION] This control should have a parent or be attached to the main tree."); + + Canvas* pCanvas = GetCore().GetCanvasN(bounds); + result r = GetLastResult(); + if (IsFailed(r)) + { + if (r == E_OPERATION_FAILED) + { + SetLastResult(E_INVALID_OPERATION); + } + SysLog(NID_UI_CTRL, "[%s] Propagated", GetErrorMessage(GetLastResult())); + } + else + { + if (pCanvas) + { + pCanvas->SetBackgroundColor(GetBackgroundColor()); + pCanvas->SetForegroundColor(GetForegroundColor()); + } + } + + return pCanvas; +} + +Canvas* +_ControlImpl::GetClientCanvasN(void) const +{ + SysTryReturn(NID_UI, + GetParent() || IsAttachedToMainTree(), null, + E_INVALID_OPERATION, "[E_INVALID_OPERATION] This control should have a parent or be attached to the main tree."); + + Canvas* pCanvas = GetCore().GetClientCanvasN(); + result r = GetLastResult(); + if (IsFailed(r)) + { + if (r == E_OPERATION_FAILED) + { + SetLastResult(E_INVALID_OPERATION); + } + SysLog(NID_UI_CTRL, "[%s] Propagated", GetErrorMessage(GetLastResult())); + } + else + { + if (pCanvas) + { + pCanvas->SetBackgroundColor(GetBackgroundColor()); + pCanvas->SetForegroundColor(GetForegroundColor()); + } + } + + return pCanvas; +} + +bool +_ControlImpl::IsAttachedToMainTree(void) const +{ + return GetCore().IsAttachedToMainTree(); +} + +bool +_ControlImpl::IsInTouchMode(void) const +{ + ClearLastResult(); + // [ToDo] + return true; +} + +bool +_ControlImpl::IsFocusable(void) const +{ + return GetCore().IsFocusable(); +} + +result +_ControlImpl::SetFocusable(bool focusable) +{ + // [ToDo] Focusable is simple flag. Make this method do not check belows. + SysTryReturn(NID_UI, + __focusableChangable, E_INVALID_OPERATION, + E_INVALID_OPERATION, "[E_INVALID_OPERATION] The control can't chage it's focusable property."); + + _Window* pTop = GetCore().GetRootWindow(); + if (pTop) + { + SysTryReturn(NID_UI, + focusable || pTop->GetFocusControl(&this->GetCore()) != &this->GetCore(), E_INVALID_OPERATION, + E_INVALID_OPERATION, "[E_INVALID_OPERATION] This already focused control cannot be unfocusable."); + } + + + GetCore().SetFocusable(focusable); + return E_SUCCESS; +} + +bool +_ControlImpl::IsFocused(void) const +{ + return GetCore().IsFocused(); +} + +result +_ControlImpl::SetFocused(void) +{ + return GetCore().SetFocused(); +} + +void +_ControlImpl::SetFocusableChangable(bool focusableChangable) +{ + __focusableChangable = focusableChangable; +} + +result +_ControlImpl::SetFont(const String& fontName) +{ + result r = GetCore().SetFont(fontName); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + return E_SUCCESS; +} + +Tizen::Base::String +_ControlImpl::GetFont(void) const +{ + return GetCore().GetFont(); +} + + +bool +_ControlImpl::IsEnabled(void) const +{ + return GetCore().IsEnabled(); +} + +bool +_ControlImpl::GetEnableState(void) const +{ + return GetCore().GetEnableState(); +} + +void +_ControlImpl::SetEnableState(bool enableState) +{ + GetCore().SetEnableState(enableState); +} + +bool +_ControlImpl::IsInputEventEnabled(void) const +{ + return GetCore().IsInputEventEnabled(); +} + +bool +_ControlImpl::GetInputEnableState(void) const +{ + return GetCore().GetInputEnableState(); +} + +bool +_ControlImpl::IsVisible(void) const +{ + // [ToDo] Change the default visible state to false and test. + return GetCore().IsVisible(); +} + +bool +_ControlImpl::GetVisibleState(void) const +{ + return GetCore().GetVisibleState(); +} + +result +_ControlImpl::SetVisibleState(bool visibleState) +{ +#ifdef _TC_PASS + SysTryReturn(NID_UI, + GetParent() || IsAttachedToMainTree(), E_INVALID_OPERATION, + E_INVALID_OPERATION, "[E_INVALID_OPERATION] This control should have a parent or be attached to the main tree."); +#endif + GetCore().SetVisibleState(visibleState); + + return E_SUCCESS; +} + +bool +_ControlImpl::IsLayoutable(void) const +{ + return GetCore().IsLayoutable(); +} + +bool +_ControlImpl::IsClipToParent(void) const +{ + return GetCore().IsClipToParent(); +} + +result +_ControlImpl::SetClipToParent(bool clipToParent) +{ + result r = GetCore().SetClipToParent(clipToParent); + SysTryReturn(NID_UI, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + return E_SUCCESS; +} + +bool +_ControlImpl::IsDragEnabled(void) const +{ + return GetCore().IsDragEnabled(); +} + +bool +_ControlImpl::IsDropEnabled(void) const +{ + return GetCore().IsDropEnabled(); +} + +void +_ControlImpl::SetDragEnabled(bool enabled) +{ + ClearLastResult(); + GetCore().SetDragEnabled(enabled); +} + +void +_ControlImpl::SetDropEnabled(bool enabled) +{ + ClearLastResult(); + GetCore().SetDropEnabled(enabled); +} + +Rectangle +_ControlImpl::GetBounds(void) const +{ + return GetCore().GetBounds(); +} + +FloatRectangle +_ControlImpl::GetBoundsF(void) const +{ + return GetCore().GetBoundsF(); +} + +Point +_ControlImpl::GetPosition(void) const +{ + return GetCore().GetPosition(); +} + +FloatPoint +_ControlImpl::GetPositionF(void) const +{ + return GetCore().GetPositionF(); +} + +Dimension +_ControlImpl::GetSize(void) const +{ + return GetCore().GetSize(); +} + +FloatDimension +_ControlImpl::GetSizeF(void) const +{ + return GetCore().GetSizeF(); +} + +_ControlOrientation +_ControlImpl::GetUiBuilderOrientation(void) const +{ + _ControlOrientation controlOrientation = _CONTROL_ORIENTATION_PORTRAIT; + + _Window* pWindow = GetCore().GetRootWindow(); + if (!pWindow) + { + return controlOrientation; + } + + _ControlImplManager* pControlImplManager = _ControlImplManager::GetInstance(); + if (!pControlImplManager) + { + return controlOrientation; + } + + if (pWindow->IsOrientationRoot()) + { + // Frame + OrientationStatus status = pControlImplManager->GetFormOrientationStatus(this); + + if ((status == ORIENTATION_STATUS_LANDSCAPE) || (status == ORIENTATION_STATUS_LANDSCAPE_REVERSE)) + { + controlOrientation = _CONTROL_ORIENTATION_LANDSCAPE; + } + else + { + controlOrientation = _CONTROL_ORIENTATION_PORTRAIT; + } + } + else + { + // Ownee Window + bool owner = false; + + Tizen::Ui::Controls::_Popup* pPopup = dynamic_cast(pWindow); + if (pPopup) + { + if (pWindow->IsOrientationCallbackModeEnabled() == false) + { + owner = true; + } + } + + if (owner) + { + _Control* pOwner = pWindow->GetOwner(); + if (pOwner) + { + _ControlImpl* pControlImpl = static_cast<_ControlImpl*>(pOwner->GetUserData()); + if (pControlImpl) + { + OrientationStatus status = pControlImplManager->GetFormOrientationStatus(pControlImpl); + if ((status == ORIENTATION_STATUS_LANDSCAPE) || (status == ORIENTATION_STATUS_LANDSCAPE_REVERSE)) + { + controlOrientation = _CONTROL_ORIENTATION_LANDSCAPE; + } + else + { + controlOrientation = _CONTROL_ORIENTATION_PORTRAIT; + } + } + } + } + else + { + controlOrientation = GetCore().GetOrientation(); + } + } + + return controlOrientation; +} + +void +_ControlImpl::UpdateBuilderBounds(const Tizen::Graphics::FloatRectangle& bounds) +{ + FloatRectangle builderBounds; + _ControlOrientation controlOrientation = GetUiBuilderOrientation(); + bool exist = GetBuilderBoundsF(controlOrientation, builderBounds); + if (exist) + { + if (IsAttachedToMainTree()) + { + SetBuilderBounds(controlOrientation, bounds); + } + else + { + SetBuilderBounds(_CONTROL_ORIENTATION_PORTRAIT, bounds); + SetBuilderBounds(_CONTROL_ORIENTATION_LANDSCAPE, bounds); + } + } +} + +void +_ControlImpl::UpdateBuilderSize(const Tizen::Graphics::FloatDimension& dimension) +{ + FloatRectangle builderBounds; + _ControlOrientation controlOrientation = GetUiBuilderOrientation(); + + bool exist = GetBuilderBoundsF(controlOrientation, builderBounds); + if (exist) + { + builderBounds.width = dimension.width; + builderBounds.height = dimension.height; + UpdateBuilderBounds(builderBounds); + } +} + +void +_ControlImpl::UpdateBuilderPosition(const FloatPoint& position) +{ + FloatRectangle builderBounds; + _ControlOrientation controlOrientation = GetUiBuilderOrientation(); + + bool exist = GetBuilderBoundsF(controlOrientation, builderBounds); + if (exist) + { + builderBounds.x = position.x; + builderBounds.y = position.y; + UpdateBuilderBounds(builderBounds); + } +} + +result +_ControlImpl::SetBounds(const Rectangle& bounds, bool callBoundsChangeCallbacks) +{ + UpdateBuilderBounds(_CoordinateSystemUtils::ConvertToFloat(bounds)); + return GetCore().SetBounds(bounds, callBoundsChangeCallbacks); +} + +result +_ControlImpl::SetBounds(const FloatRectangle& bounds, bool callBoundsChangeCallbacks) +{ + UpdateBuilderBounds(bounds); + return GetCore().SetBounds(bounds, callBoundsChangeCallbacks); +} + +result +_ControlImpl::SetBoundsAndUpdateLayout(const Tizen::Graphics::Rectangle& bounds) +{ + result r = E_SUCCESS; + r = GetCore().SetBounds(bounds); + + GetCore().UpdateLayout(); + + return r; +} + +result +_ControlImpl::SetBoundsAndUpdateLayout(const Tizen::Graphics::FloatRectangle& bounds) +{ + result r = E_SUCCESS; + r = GetCore().SetBounds(bounds); + + GetCore().UpdateLayout(); + + return r; +} + +result +_ControlImpl::SetPosition(const Point& position) +{ + UpdateBuilderPosition(_CoordinateSystemUtils::ConvertToFloat(position)); + return GetCore().SetPosition(position); +} + +result +_ControlImpl::SetPosition(const FloatPoint& position) +{ + UpdateBuilderPosition(position); + return GetCore().SetPosition(position); +} + +result +_ControlImpl::SetSize(const Dimension& size) +{ + UpdateBuilderSize(_CoordinateSystemUtils::ConvertToFloat(size)); + return GetCore().SetSize(size); +} + +result +_ControlImpl::SetSize(const FloatDimension& size) +{ + UpdateBuilderSize(size); + return GetCore().SetSize(size); +} + +Dimension +_ControlImpl::GetMinimumSize(void) const +{ + return GetCore().GetMinimumSize(); +} + +FloatDimension +_ControlImpl::GetMinimumSizeF(void) const +{ + return GetCore().GetMinimumSizeF(); +} + +Dimension +_ControlImpl::GetMaximumSize(void) const +{ + return GetCore().GetMaximumSize(); +} + +FloatDimension +_ControlImpl::GetMaximumSizeF(void) const +{ + return GetCore().GetMaximumSizeF(); +} + +result +_ControlImpl::SetMinimumSize(const Tizen::Graphics::Dimension& newMinSize) +{ + return GetCore().SetMinimumSize(newMinSize); +} + +result +_ControlImpl::SetMinimumSize(const Tizen::Graphics::FloatDimension& newMinSize) +{ + return GetCore().SetMinimumSize(newMinSize); +} + +result +_ControlImpl::SetMaximumSize(const Tizen::Graphics::Dimension& newMaxSize) +{ + return GetCore().SetMaximumSize(newMaxSize); +} + +result +_ControlImpl::SetMaximumSize(const Tizen::Graphics::FloatDimension& newMaxSize) +{ + return GetCore().SetMaximumSize(newMaxSize); +} + +Point +_ControlImpl::ConvertToControlPosition(const Point& screenPosition) const +{ + return GetCore().ConvertToControlPosition(screenPosition); +} + +FloatPoint +_ControlImpl::ConvertToControlPosition(const FloatPoint& screenPosition) const +{ + return GetCore().ConvertToControlPosition(screenPosition); +} + +Point +_ControlImpl::ConvertToScreenPosition(const Point& controlPosition) const +{ + return GetCore().ConvertToScreenPosition(controlPosition); +} + +FloatPoint +_ControlImpl::ConvertToScreenPosition(const FloatPoint& controlPosition) const +{ + return GetCore().ConvertToScreenPosition(controlPosition); +} + +// [ToDo] Must provide a static method. +Dimension +_ControlImpl::GetMinimumSizeLimit(void) const +{ + ClearLastResult(); + return Dimension(0, 0); +} + +FloatDimension +_ControlImpl::GetMinimumSizeLimitF(void) const +{ + ClearLastResult(); + return FloatDimension(0.0f, 0.0f); +} + +// [ToDo] Must provide a static method. +Dimension +_ControlImpl::GetMaximumSizeLimit(void) const +{ + ClearLastResult(); + return Dimension(_Control::MAX_LENGTH, _Control::MAX_LENGTH); +} + +FloatDimension +_ControlImpl::GetMaximumSizeLimitF(void) const +{ + ClearLastResult(); + return FloatDimension(_Control::MAX_LENGTH, _Control::MAX_LENGTH); +} + + +Rectangle +_ControlImpl::GetClientBounds(void) const +{ + return GetCore().GetClientBounds(); +} + +FloatRectangle +_ControlImpl::GetClientBoundsF(void) const +{ + return GetCore().GetClientBoundsF(); +} + +Rectangle +_ControlImpl::GetAbsoluteBounds(void) const +{ + return GetCore().GetAbsoluteBounds(); +} + +FloatRectangle +_ControlImpl::GetAbsoluteBoundsF(void) const +{ + return GetCore().GetAbsoluteBoundsF(); +} + +result +_ControlImpl::SetClientBounds(const Rectangle& bounds) +{ + return GetCore().SetClientBounds(bounds); +} + +result +_ControlImpl::SetClientBounds(const FloatRectangle& bounds) +{ + return GetCore().SetClientBounds(bounds); +} + +Color +_ControlImpl::GetBackgroundColor(void) const +{ + return GetCore().GetBackgroundColor(); +} + +bool +_ControlImpl::IsOpaque(void) const +{ + return false; +} + +void +_ControlImpl::SetBackgroundColor(const Color& color) +{ + if (!IsOpaque()) + { + GetCore().SetBackgroundColor(color); + } + else + { + byte r, g, b, a; + color.GetColorComponents(r, g, b, a); + GetCore().SetBackgroundColor(Color(r*a/ 255, g*a/255, b*a/ 255, 255)); + } +} + +Color +_ControlImpl::GetForegroundColor(void) const +{ + ClearLastResult(); + return __foregroundColor; +} + +void +_ControlImpl::SetForegroundColor(const Color& color) +{ + ClearLastResult(); + __foregroundColor = color; +} + +int +_ControlImpl::GetFontSize(void) const +{ + ClearLastResult(); + return __fontSize; +} + +void +_ControlImpl::SetFontSize(int fontSize) +{ + ClearLastResult(); + __fontSize = fontSize; +} + +ITouchEventListener* +_ControlImpl::GetDefaultTouchEventListener(void) const +{ + ClearLastResult(); + return __pDefaultTouchEventListener; +} + +IKeyEventListener* +_ControlImpl::GetDefaultKeyEventListener(void) const +{ + ClearLastResult(); + return __pDefaultKeyEventListener; +} + +void +_ControlImpl::SetDefaultKeyEventListener(IKeyEventListener* pDefaultListener) +{ + ClearLastResult(); + __pDefaultKeyEventListener = pDefaultListener; +} + +void +_ControlImpl::SetDefaultTouchEventListener(ITouchEventListener* pDefaultListener) +{ + ClearLastResult(); + __pDefaultTouchEventListener = pDefaultListener; +} + +CompositeMode +_ControlImpl::GetCompositeMode(void) const +{ + ClearLastResult(); + return COMPOSITE_MODE_ALPHA_BLENDING; +} + +result +_ControlImpl::SetCompositeMode(CompositeMode compositeMode) +{ + ClearLastResult(); + + if (compositeMode == COMPOSITE_MODE_ALPHA_BLENDING) + { + return E_SUCCESS; + } + + SysLogException(NID_UI, E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] This operation is not supported."); + return E_UNSUPPORTED_OPERATION; +} + +result +_ControlImpl::SetChromaKeyColor(Color chromaKeyColor) +{ + SysLogException(NID_UI, E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] This operation is not supported."); + return E_UNSUPPORTED_OPERATION; +} + +Color +_ControlImpl::GetChromaKeyColor(void) const +{ + static const Color errorColor(0, 0, 0, 0); + SysLogException(NID_UI, E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] This operation is not supported."); + return errorColor; +} + +Animations::ControlAnimator* +_ControlImpl::GetControlAnimator(void) const +{ + ClearLastResult(); + + if ((IsMovable() == false) && (IsResizable() == false)) + { + SysLog(NID_UI, "Control is not animatable."); + return null; + } + + const _WindowImpl* pWindowImpl = dynamic_cast (this); + if (pWindowImpl != null) + { + SysLog(NID_UI, "Window is not animatable."); + return null; + } + + if (__pControlAnimator == null) + { + ControlAnimator* pControlAnimator = new (std::nothrow) ControlAnimator(); + SysTryReturn(NID_UI, (pControlAnimator != null), null, E_OUT_OF_MEMORY, "Unable to create ControlAnimator instance.\n"); + + // [ToDo] Check if the Open API can return E_SYSTEM. + result r = pControlAnimator->Construct(*__pControlPublic); + if (IsFailed(r)) + { + delete pControlAnimator; + SysLogException(NID_UI, E_SYSTEM, "[E_SYSTEM] Failed to create control animator."); + return null; + } + + (const_cast <_ControlImpl*>(this))->__pControlAnimator = pControlAnimator; + } + + return __pControlAnimator; +} + +VisualElement* +_ControlImpl::GetVisualElement(void) const +{ + return GetCore().GetVisualElement(); +} + +void +_ControlImpl::SetMultiTouchEnabled(bool enabled) +{ + GetCore().SetMultiTouchEnabled(enabled); +} + +bool +_ControlImpl::IsMultiTouchEnabled(void) const +{ + return GetCore().IsMultiTouchEnabled(); +} + +_ControlImpl::PublicEventListenerList* +_ControlImpl::CreatePublicEventListenerListN(void) const +{ + PublicEventListenerList* pListenerList = new (std::nothrow) PublicEventListenerList; + SysTryReturn(NID_UI, pListenerList, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + return pListenerList; +} + +bool +_ControlImpl::HasCore(void) const +{ + return __pControlCore != null; +} + +result +_ControlImpl::SetCore(_Control& core) +{ + result r = E_SUCCESS; + + __pControlCore = &core; + __pControlCore->SetControlDelegate(*this); + __pControlCore->SetUserData(this); + + __pCoreEventListener = new (std::nothrow) CoreEventListener(*this); + SysTryCatch(NID_UI, __pCoreEventListener, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + __pControlCore->SetEventListener<_UI_EVENT_FOCUS>(__pCoreEventListener); + __pControlCore->SetEventListener<_UI_EVENT_NOTIFICAITON>(__pCoreEventListener); + + __pPropagatedTouchEventListener = new (std::nothrow) _PropagatedTouchEventListener(*this); + SysTryCatch(NID_UI, __pPropagatedTouchEventListener, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + __pControlCore->SetPropagatedTouchEventListener(__pPropagatedTouchEventListener); + + __pPropagatedKeyEventListener = new (std::nothrow) _PropagatedKeyEventListener(*this); + SysTryCatch(NID_UI, __pPropagatedKeyEventListener, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + __pControlCore->SetPropagatedKeyEventListener(__pPropagatedKeyEventListener); + + return E_SUCCESS; + +CATCH: + ResetCore(); + SysLogException(NID_UI, r, "[%s] Propagating.", GetErrorMessage(r)); + return r; +} + +void +_ControlImpl::ResetCore(bool deallocate) +{ + if (__pControlCore == null) + { + return; + } + + __pControlCore->ResetEventListeners(); + __pControlCore->SetUserData(null); + __pControlCore->ResetControlDelegate(); + + __pFlickGestureDetector->RemoveGestureListener(*__pCoreEventListener); + __pControlCore->RemoveGestureDetector(*__pFlickGestureDetector); + + __pLongPressGestureDetector->RemoveGestureListener(*__pCoreEventListener); + __pControlCore->RemoveGestureDetector(*__pLongPressGestureDetector); + + __pControlCore->SetPropagatedTouchEventListener(null); + __pControlCore->SetPropagatedKeyEventListener(null); + + if (deallocate) + { + delete __pControlCore; + } + __pControlCore = null; + + delete __pCoreEventListener; + __pCoreEventListener = null; + + delete __pPropagatedTouchEventListener; + __pPropagatedTouchEventListener = null; + + delete __pPropagatedKeyEventListener; + __pPropagatedKeyEventListener = null; +} + +void +_ControlImpl::Dispose(bool deallocateCore) +{ + if(GetVisualElement() && __pCustomVisualElement) + { + GetVisualElement()->DetachChild( *__pCustomVisualElement); + } + __pCustomVisualElement = null; + // Reset core + ResetCore(deallocateCore); + + // Release core events + delete __pCoreKeyEvent; + __pCoreKeyEvent = null; + delete __pCoreTouchEvent; + __pCoreTouchEvent = null; + delete __pCoreFocusEvent; + __pCoreFocusEvent = null; + delete __pCoreGestureEvent; + __pCoreGestureEvent = null; + + // Relese public event listeners + delete __pPublicFocusEventListeners; + __pPublicFocusEventListeners = null; + delete __pPublicKeyEventListeners; + __pPublicKeyEventListeners = null; + delete __pPublicTouchEventListeners; + __pPublicTouchEventListeners = null; + delete __pPublicDragDropEventListeners; + __pPublicDragDropEventListeners = null; + delete __pPublicTouchModeChangedEventListeners; + __pPublicTouchModeChangedEventListeners = null; + + // Release builder bounds + delete __pBuilderPortraitBounds; + __pBuilderPortraitBounds = null; + delete __pBuilderLandscapeBounds; + __pBuilderLandscapeBounds = null; + + // Release aninator + delete __pControlAnimator; + __pControlAnimator = null; + + delete __pPublicGestureDetectors; + __pPublicGestureDetectors = null; + + delete __pFlickGestureDetector; + __pFlickGestureDetector = null; + + delete __pLongPressGestureDetector; + __pLongPressGestureDetector = null; + + delete __pAccessibilityContainerImpl; + __pAccessibilityContainerImpl = null; + + __pPublicPropagatedTouchEventListener = null; + __pPublicPropagatedKeyEventListener = null; +} + +_ControlImpl::~_ControlImpl(void) +{ + Dispose(true); +} + +_ControlImpl::_ControlImpl(Control* pPublic, _Control* pCore) + : __pControlPublic(pPublic) + , __pControlCore(null) + , __pControlAnimator(null) + , __pCustomVisualElement(null) + , __pPublicFocusEventListeners(null) + , __pPublicKeyEventListeners(null) + , __pPublicTouchEventListeners(null) + , __pPublicDragDropEventListeners(null) + , __pPublicTouchModeChangedEventListeners(null) + , __pDefaultKeyEventListener(null) + , __pDefaultTouchEventListener(null) + , __foregroundColor(Color(0, 0, 0, 0)) + , __fontSize(0) + , __inputEventConsumed(false) + , __focusableChangable(true) + , __destroying(false) + , __pCoreEventListener(null) + , __pCoreKeyEvent(null) + , __pCoreTouchEvent(null) + , __pCoreFocusEvent(null) + , __pCoreGestureEvent(null) + , __pBuilderPortraitBounds(null) + , __pBuilderLandscapeBounds(null) + , __pFlickGestureDetector(null) + , __pLongPressGestureDetector(null) + , __pPublicGestureDetectors(null) + , __pAccessibilityContainerImpl(null) + , __pPublicPropagatedTouchEventListener(null) + , __pPublicPropagatedKeyEventListener(null) +{ + ClearLastResult(); + result r = E_SUCCESS; + + SysAssert(__pControlPublic); + SysAssert(pCore); + + // Set core + r = SetCore(*pCore); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + // Core event listeners: [ToDo: mklove.kang] Check exceptions because the constructors can fail. + __pCoreKeyEvent = new (std::nothrow) CoreKeyEvent(*this); + SysTryCatch(NID_UI, __pCoreKeyEvent, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + __pCoreTouchEvent = new (std::nothrow) CoreTouchEvent(*this); + SysTryCatch(NID_UI, __pCoreTouchEvent, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + __pCoreFocusEvent = new (std::nothrow) CoreFocusEvent(*this); + SysTryCatch(NID_UI, __pCoreFocusEvent, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + __pCoreGestureEvent = new (std::nothrow) CoreGestureEvent(*this); + SysTryCatch(NID_UI, __pCoreGestureEvent, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + __pFlickGestureDetector = new (std::nothrow) _TouchFlickGestureDetector; + SysTryCatch(NID_UI, __pFlickGestureDetector, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + __pLongPressGestureDetector = new (std::nothrow) _TouchLongPressGestureDetector; + SysTryCatch(NID_UI, __pLongPressGestureDetector, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + // Public listeners + __pPublicFocusEventListeners = CreatePublicEventListenerListN(); + r = GetLastResult(); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pPublicKeyEventListeners = CreatePublicEventListenerListN(); + r = GetLastResult(); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pPublicTouchEventListeners = CreatePublicEventListenerListN(); + r = GetLastResult(); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pPublicDragDropEventListeners = CreatePublicEventListenerListN(); + r = GetLastResult(); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pPublicTouchModeChangedEventListeners = CreatePublicEventListenerListN(); + r = GetLastResult(); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pPublicGestureDetectors = new (std::nothrow) LinkedListT; + r = GetLastResult(); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + r = GET_COLOR_CONFIG(BASIC::foreground, __foregroundColor); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + // Check + SysAssert(r == E_SUCCESS); + + return; + +CATCH: + Dispose(true); // [ToDo] Is it OK? +} + +void +_ControlImpl::SetEffectSoundEnabled(bool enable) +{ + GetCore().SetEffectSoundEnabled(enable); +} + +bool +_ControlImpl::IsEffectSoundEnabled(void) const +{ + return GetCore().IsEffectSoundEnabled(); +} + +_Layout::LayoutContainer& +_ControlImpl::GetLayoutContainer(void) const +{ + return GetCore().GetLayoutContainer(); +} + +result +_ControlImpl::SetBuilderBounds(_ControlOrientation orientation, const Rectangle& bounds) +{ + ClearLastResult(); + + if (orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + if (__pBuilderPortraitBounds == null) + { + __pBuilderPortraitBounds = new (std::nothrow) FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); + + SysTryReturn(NID_UI, + __pBuilderPortraitBounds, E_OUT_OF_MEMORY, + E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + } + + *__pBuilderPortraitBounds = _CoordinateSystemUtils::ConvertToFloat(bounds); + return E_SUCCESS; + } + else if (orientation == _CONTROL_ORIENTATION_LANDSCAPE) + { + if (__pBuilderLandscapeBounds == null) + { + __pBuilderLandscapeBounds = new (std::nothrow) FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); + + SysTryReturn(NID_UI, + __pBuilderLandscapeBounds, E_OUT_OF_MEMORY, + E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + } + + *__pBuilderLandscapeBounds = _CoordinateSystemUtils::ConvertToFloat(bounds); + return E_SUCCESS; + } + + SysAssert(false); + return E_SYSTEM; +} + +result +_ControlImpl::SetBuilderBounds(_ControlOrientation orientation, const FloatRectangle& bounds) +{ + ClearLastResult(); + + if (orientation == _CONTROL_ORIENTATION_PORTRAIT) + { + if (__pBuilderPortraitBounds == null) + { + __pBuilderPortraitBounds = new (std::nothrow) FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); + + SysTryReturn(NID_UI, + __pBuilderPortraitBounds, E_OUT_OF_MEMORY, + E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + } + + *__pBuilderPortraitBounds = bounds; + return E_SUCCESS; + } + else if (orientation == _CONTROL_ORIENTATION_LANDSCAPE) + { + if (__pBuilderLandscapeBounds == null) + { + __pBuilderLandscapeBounds = new (std::nothrow) FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f); + + SysTryReturn(NID_UI, + __pBuilderLandscapeBounds, E_OUT_OF_MEMORY, + E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + } + + *__pBuilderLandscapeBounds = bounds; + return E_SUCCESS; + } + + SysAssert(false); + return E_SYSTEM; +} + +bool +_ControlImpl::GetBuilderBounds(_ControlOrientation orientation, Rectangle& bounds) const +{ + ClearLastResult(); + + if (orientation == _CONTROL_ORIENTATION_PORTRAIT && __pBuilderPortraitBounds) + { + bounds = _CoordinateSystemUtils::ConvertToInteger(*__pBuilderPortraitBounds); + return true; + } + else if (orientation == _CONTROL_ORIENTATION_LANDSCAPE && __pBuilderLandscapeBounds) + { + bounds = _CoordinateSystemUtils::ConvertToInteger(*__pBuilderLandscapeBounds); + return true; + } + + return false; +} + +bool +_ControlImpl::GetBuilderBoundsF(_ControlOrientation orientation, FloatRectangle& bounds) const +{ + ClearLastResult(); + + if (orientation == _CONTROL_ORIENTATION_PORTRAIT && __pBuilderPortraitBounds) + { + bounds = *__pBuilderPortraitBounds; + return true; + } + else if (orientation == _CONTROL_ORIENTATION_LANDSCAPE && __pBuilderLandscapeBounds) + { + bounds = *__pBuilderLandscapeBounds; + return true; + } + + return false; +} + +void +_ControlImpl::SetContentAreaBounds(const Rectangle& rect) +{ + GetCore().SetContentAreaBounds(rect); +} + +void +_ControlImpl::SetContentAreaBounds(const FloatRectangle& rect) +{ + GetCore().SetContentAreaBounds(rect); +} + +Rectangle +_ControlImpl::GetContentAreaBounds(void) const +{ + return GetCore().GetContentAreaBounds(); +} + +FloatRectangle +_ControlImpl::GetContentAreaBoundsF(void) const +{ + return GetCore().GetContentAreaBoundsF(); +} + +Bitmap* +_ControlImpl::GetCapturedBitmapN(void) const +{ + return GetCore().GetCapturedBitmapN(true); +} + +Rectangle +_ControlImpl::GetInvalidatedBounds(void) const +{ + return GetCore().GetInvalidatedBounds(); +} + +FloatRectangle +_ControlImpl::GetInvalidatedBoundsF(void) const +{ + return GetCore().GetInvalidatedBoundsF(); +} + +result +_ControlImpl::GenerateKeyEvent(KeyState keyState, _KeyCode keyCode) +{ + result r = E_SUCCESS; + + SysTryReturn(NID_UI, keyState == KEY_LONGPRESSED, + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] keyState is invalid.\n"); + + SysTryReturn(NID_UI, __pCoreKeyEvent, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + __pCoreKeyEvent->ProcessListener(keyState, keyCode); + + return r; +} + +result +_ControlImpl::GenerateTouchEvent(const _TouchInfo& touchInfo) +{ + result r = E_SUCCESS; + + _TouchStatus touchStatus = touchInfo.GetTouchStatus(); + + SysTryReturn(NID_UI, (touchStatus == _TOUCH_LONG_PRESSED) || (touchStatus == _TOUCH_DOUBLE_PRESSED), + E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] touchStatus is invalid.\n"); + + SysTryReturn(NID_UI, __pCoreTouchEvent, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + __pCoreTouchEvent->ProcessListener(touchInfo); + + return r; +} + +void +_ControlImpl::SetMovable(bool movable) +{ + GetCore().SetMovable(movable); +} + +void +_ControlImpl::SetResizable(bool resizable) +{ + GetCore().SetResizable(resizable); +} + +AccessibilityContainer* +_ControlImpl::GetAccessibilityContainer(void) +{ + if(__pAccessibilityContainerImpl == null) + { + AccessibilityContainer* pContainer = _AccessibilityContainerImpl::CreateAccessibilityContainerN(*this); + if(pContainer) + { + __pAccessibilityContainerImpl = _AccessibilityContainerImpl::GetInstance(*pContainer); + return pContainer; + } + else + return null; + } + else + { + return &(__pAccessibilityContainerImpl->GetPublic()); + } +} + +result +_ControlImpl::SetPublicPropagatedTouchEventListener(IPropagatedTouchEventListener* pListener) +{ + __pPublicPropagatedTouchEventListener = pListener; + return E_SUCCESS; +} + +IPropagatedTouchEventListener* +_ControlImpl::GetPublicPropagatedTouchEventListener(void) const +{ + return __pPublicPropagatedTouchEventListener; +} + +result +_ControlImpl::SetPublicPropagatedKeyEventListener(IPropagatedKeyEventListener* pListener) +{ + __pPublicPropagatedKeyEventListener = pListener; + return E_SUCCESS; +} + +IPropagatedKeyEventListener* +_ControlImpl::GetPublicPropagatedKeyEventListener(void) const +{ + return __pPublicPropagatedKeyEventListener; +} + +void +_ControlImpl::SetPreviousFocus(_ControlImpl* pPreviousFocus) +{ + if (pPreviousFocus == null) + { + _Control* pControl = null; + return GetCore().SetPreviousFocus(pControl); + } + return GetCore().SetPreviousFocus(&pPreviousFocus->GetCore()); +} + +void +_ControlImpl::SetNextFocus(_ControlImpl* pNextFocus) +{ + if (pNextFocus == null) + { + _Control* pControl = null; + return GetCore().SetPreviousFocus(pControl); + } + return GetCore().SetNextFocus(&pNextFocus->GetCore()); +} + +_ControlImpl* +_ControlImpl::GetPreviousFocus(void) const +{ + if (GetCore().GetPreviousFocus() == null) + { + return null; + } + return static_cast <_ControlImpl* >(GetCore().GetPreviousFocus()->GetUserData()); +} + + _ControlImpl* + _ControlImpl::GetNextFocus(void) const + { + if (GetCore().GetNextFocus() == null) + { + return null; + } + return static_cast <_ControlImpl* >(GetCore().GetNextFocus()->GetUserData()); + } + +void +_ControlImpl::OnDrawFocus(void) +{ + GetCore().OnDrawFocus(); +} + +void +_ControlImpl::OnChildControlFocusMoved(const _Control& control) +{ + GetCore().OnChildControlFocusMoved(control); +} + +void +_ControlImpl::OnDescendantControlFocusMoved(const _Control& control) +{ + GetCore().OnDescendantControlFocusMoved(control); +} + +void +_ControlImpl::OnFocusModeStateChanged(void) +{ + GetCore().OnFocusModeStateChanged(); +} +bool +_ControlImpl::IsChildControlFocusManage(void) const +{ + GetCore().IsChildControlFocusManage(); + return false; +} +void +_ControlImpl::SetTouchPressThreshold(float distance) +{ + GetCore().SetTouchPressThreshold(distance); +} + +float +_ControlImpl::GetTouchPressThreshold(void) const +{ + return GetCore().GetTouchPressThreshold(); +} + +int +_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) +{ + result r = GetCore().SetFontFromFile(fileName); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + return E_SUCCESS; +} + +Tizen::Base::String +_ControlImpl::GetFontFile(void) const +{ + return GetCore().GetFontFile(); +} +}} // Tizen::Ui diff --git a/src/ui/FUi_ControlImplManager.cpp b/src/ui/FUi_ControlImplManager.cpp new file mode 100644 index 0000000..09ba54e --- /dev/null +++ b/src/ui/FUi_ControlImplManager.cpp @@ -0,0 +1,404 @@ +// +// 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_ControlImplManager.cpp + * @brief This is the implementation file for the _ControlImplManager class. + */ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include "FUi_FocusManagerImpl.h" +#include "FUi_ControlImplManager.h" +#include "FUi_ControlManager.h" +#include "FUi_WindowImpl.h" +#include "FUi_KeyEventManagerImpl.h" +#include "FUi_FocusManagerImpl.h" + +#include "FUiCtrl_FrameImpl.h" +#include "FUiCtrl_FormImpl.h" +#include "FUiCtrl_PopupImpl.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Graphics; +using namespace Tizen::Io; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Ui::Animations; + +namespace // unnamed +{ + +OrientationStatus +Convert(_ControlRotation rotate, bool allowReverse) +{ + OrientationStatus status = ORIENTATION_STATUS_NONE; + + if (allowReverse == true) + { + switch (rotate) + { + case _CONTROL_ROTATION_0: + status = ORIENTATION_STATUS_PORTRAIT; + break; + case _CONTROL_ROTATION_270: + status = ORIENTATION_STATUS_LANDSCAPE; + break; + case _CONTROL_ROTATION_180: + status = ORIENTATION_STATUS_PORTRAIT_REVERSE; + break; + case _CONTROL_ROTATION_90: + status = ORIENTATION_STATUS_LANDSCAPE_REVERSE; + break; + } + } + else + { + switch (rotate) + { + case _CONTROL_ROTATION_0: + // fall through + case _CONTROL_ROTATION_180: + status = ORIENTATION_STATUS_PORTRAIT; + break; + case _CONTROL_ROTATION_90: + status = ORIENTATION_STATUS_LANDSCAPE_REVERSE; + break; + case _CONTROL_ROTATION_270: + status = ORIENTATION_STATUS_LANDSCAPE; + break; + } + } + + return status; +} + +_ControlRotation +Convert(OrientationStatus orientationStatus) +{ + switch (orientationStatus) + { + case ORIENTATION_STATUS_PORTRAIT: + return _CONTROL_ROTATION_0; + case ORIENTATION_STATUS_LANDSCAPE: + return _CONTROL_ROTATION_270; + case ORIENTATION_STATUS_PORTRAIT_REVERSE: + return _CONTROL_ROTATION_180; + case ORIENTATION_STATUS_LANDSCAPE_REVERSE: + return _CONTROL_ROTATION_90; + default: + return _CONTROL_ROTATION_0; + } +} + +} // unnamed namespace + +result +InitializeTestbuddyManager(void) +{ + result r = E_FAILURE; + void* pHandle = null; + + SysLog(NID_UI,"TestbuddyManager is starting."); + + result (*pfnInitialize_TestBuddyManager)(void) = null; + + pHandle = dlopen ("libtestbuddy.so", RTLD_LAZY); + if (!pHandle) + { + SysLog(NID_UI, "[%s] Failed to dlopen libtestbuddy.so", dlerror()); + return E_LIBRARY_NOT_FOUND; + } + + pfnInitialize_TestBuddyManager = reinterpret_cast(dlsym(pHandle, "_Initialize_TestBuddyManager")); + if (pfnInitialize_TestBuddyManager == null) + { + SysLog(NID_UI, "[%s] Failed to dlsym _Initialize_TestBuddyManager", dlerror()); + dlclose(pHandle); + return E_SYMBOL_NOT_FOUND; + } + + r = pfnInitialize_TestBuddyManager(); + SysTryReturn(NID_UI, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] pfnInitialize_TestBuddyManager() is invaild."); + + return r; +} + +result +InitializeUiFramework(void) +{ + _ControlImplManager::Initialize(); + + // TODO : After completing InitializeTestbuddyManager( ) + //return GetLastResult(); + return E_SUCCESS; +} + +void +FinalizeUiFramework(void) +{ + _ControlImplManager::Release(); +} + + +namespace Tizen { namespace Ui { + +_ControlImplManager* _ControlImplManager::__pInstance(null); + +// Explicitly initialize just before the Form is created. +void +_ControlImplManager::Initialize(void) +{ + static pthread_once_t once_block = PTHREAD_ONCE_INIT; + + if (!__pInstance) + { + pthread_once(&once_block, InitInstance); + } + + _ControlManager::Initialize(); + + _KeyEventManagerImpl::Initialize(); + _FocusManagerImpl::Initialize(); + result r = InitializeTestbuddyManager(); + SetLastResult(r); +} + +void +_ControlImplManager::Release(void) +{ + _ControlManager::Release(); + + _FocusManagerImpl::ReleaseInstance(); + _KeyEventManagerImpl::ReleaseInstance(); + + delete __pInstance; + __pInstance = null; +} + +_ControlImplManager* +_ControlImplManager::GetInstance(void) +{ + return __pInstance; +} + +void +_ControlImplManager::InitInstance(void) +{ + if (__pInstance != null) + { + return; + } + + __pInstance = new (std::nothrow) _ControlImplManager; + SysAssert(__pInstance); +} + +_ControlImplManager::_ControlImplManager(void) + : __pFrameImpl(null) +{ +} + +_ControlImplManager::~_ControlImplManager(void) +{ +} + +_WindowImpl* +_ControlImplManager::GetCurrentFrame(void) const +{ + _Window* pFrame = _ControlManager::GetInstance()->GetCurrentFrame(); + if (pFrame == null) + { + return null; + } + + _WindowImpl* pImpl = static_cast <_WindowImpl*>(pFrame->GetUserData()); + return pImpl; +} + +void +_ControlImplManager::OnScreenRotated(int rotation) +{ + // Do not use the device orientation callback. + return; +} + +void +_ControlImplManager::SetOrientationStatus(OrientationStatus orientationStatus) +{ + _ControlManager* pCore = _ControlManager::GetInstance(); + SysAssert(pCore); + + pCore->SetOrientationStatus(::Convert(orientationStatus)); +} + +void +_ControlImplManager::RotateScreen(_ControlImpl* pControlImpl, OrientationStatus orientationStatus) +{ + _ControlManager* pCore = _ControlManager::GetInstance(); + SysAssert(pCore); + + pCore->RotateScreen(pControlImpl->GetCore(), ::Convert(orientationStatus)); +} + +OrientationStatus +_ControlImplManager::GetOrientationStatus(Orientation mode) const +{ + _ControlManager* pCore = _ControlManager::GetInstance(); + SysAssert(pCore); + + const _ControlRotation screenRotation = pCore->GetScreenRotation(); + +#if 1 +// RSA : Support 4-Direction Rotation + if (mode == ORIENTATION_AUTOMATIC_FOUR_DIRECTION) + { + return ::Convert(screenRotation, true); + } + + if (mode == ORIENTATION_AUTOMATIC) +#else +// Private : Unsupport 4-Direction Rotation + if ((mode == ORIENTATION_AUTOMATIC) || (mode == ORIENTATION_AUTOMATIC_FOUR_DIRECTION)) +#endif + { + // device : 180 degree + // return the previous orientation status + + _ControlManager* pCore = _ControlManager::GetInstance(); + if (pCore) + { + _ControlRotation controlRotation = pCore->GetScreenRotation(); + if (controlRotation == _CONTROL_ROTATION_180) + { + OrientationStatus prevOrientationStatus = ORIENTATION_STATUS_NONE; + + _ControlRotation prevRotation = pCore->GetOrientationStatus(); + switch (prevRotation) + { + case _CONTROL_ROTATION_0: + // fall through + case _CONTROL_ROTATION_180: + prevOrientationStatus = ORIENTATION_STATUS_PORTRAIT; + break; + case _CONTROL_ROTATION_90: + prevOrientationStatus = ORIENTATION_STATUS_LANDSCAPE_REVERSE; + break; + case _CONTROL_ROTATION_270: + prevOrientationStatus = ORIENTATION_STATUS_LANDSCAPE; + break; + default: + break; + } + + return prevOrientationStatus; + } + } + + return ::Convert(screenRotation, false); + } + + OrientationStatus status = ORIENTATION_STATUS_NONE; + switch (mode) + { + case ORIENTATION_PORTRAIT: + status = ORIENTATION_STATUS_PORTRAIT; + break; + case ORIENTATION_LANDSCAPE: + status = ORIENTATION_STATUS_LANDSCAPE; + break; + case ORIENTATION_PORTRAIT_REVERSE: + status = ORIENTATION_STATUS_PORTRAIT_REVERSE; + break; + case ORIENTATION_LANDSCAPE_REVERSE: + status = ORIENTATION_STATUS_LANDSCAPE_REVERSE; + break; + default: + SysAssert(false); + } + + return status; +} + +OrientationStatus +_ControlImplManager::GetFormOrientationStatus(const _ControlImpl* pControlImpl) const +{ + const _FormImpl* pFormImpl = null; + const _ControlImpl* pOriControlImpl = pControlImpl; + OrientationStatus orientation = ORIENTATION_STATUS_NONE; + + while(pControlImpl) + { + pFormImpl = dynamic_cast(pControlImpl); + + if (pFormImpl) + { + break; + } + else + { + pControlImpl = pControlImpl->GetParent(); + } + } + + if (pFormImpl) + { + orientation = pFormImpl->GetOrientationStatus(); + } + + if (orientation == ORIENTATION_STATUS_NONE) + { + _Form* pForm = null; + _Control* pControl = const_cast<_Control*>(&(pOriControlImpl->GetCore())); + while(pControl) + { + pForm = dynamic_cast<_Form*>(pControl); + + if (pForm != null) + { + break; + } + else + { + pControl = pControl->GetParent(); + } + } + + if (pForm) + { + _FormImpl* pFormImpl = static_cast<_FormImpl*>(pForm->GetUserData()); + orientation = pFormImpl->GetOrientationStatus(); + } + + } + + return orientation; +} + +}} // Tizen::Ui diff --git a/src/ui/FUi_ControlManager.cpp b/src/ui/FUi_ControlManager.cpp new file mode 100644 index 0000000..6dce58b --- /dev/null +++ b/src/ui/FUi_ControlManager.cpp @@ -0,0 +1,2082 @@ +// +// 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_ControlManager.cpp + * @brief This is the implementation file for the _ControlManager class. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "FUi_ControlManager.h" +#include "FUi_Control.h" +#include "FUi_Window.h" +#include "FUi_WindowImpl.h" +#include "FUi_EcoreEvas.h" +#include "FUi_EcoreEvasMgr.h" +#include "FUi_EflWindow.h" +#include "FUi_ResourceManager.h" +#include "FUi_Clipboard.h" +#include "FUi_UiFocusEvent.h" +#include "FUi_UiEventManager.h" +#include "FUi_TouchManager.h" +#include "FUi_DimmingManager.h" +#include "FUi_IControlManagerEventListener.h" +#include "FUi_TouchLongPressGestureDetector.h" +#include "FUi_TouchTapGestureDetector.h" +#include "FUi_KeyEventManager.h" +#include "FUi_CoordinateSystemUtils.h" +#include "FUiAnim_RootVisualElement.h" +#include "FUiAnim_AnimationManager.h" +#include "FUiAnim_DisplayManager.h" +#include "FUi_AccessibilityManager.h" +#include "FUiAnim_VisualElement.h" +#include "FUiAnim_EflLayer.h" +#include "FUiCtrl_FrameImpl.h" +#include "FUiCtrl_FormImpl.h" +#include "FUiCtrl_Frame.h" +#include "FUiCtrl_IndicatorManager.h" +#include "FUiAnim_ControlVisualElement.h" + +using namespace std; +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Animations; +using namespace Tizen::Ui::Controls; +using namespace Tizen::System; + +namespace { + +_ControlRotation Convert(int rotationDegree) +{ + switch (rotationDegree) + { + case 0: + return _CONTROL_ROTATION_0; + case 90: + return _CONTROL_ROTATION_90; + case 180: + return _CONTROL_ROTATION_180; + case 270: + return _CONTROL_ROTATION_270; + default: + return _CONTROL_ROTATION_0; + } +} + +int Convert(_ControlRotation rotation) +{ + switch (rotation) + { + case _CONTROL_ROTATION_0: + return 0; + case _CONTROL_ROTATION_90: + return 90; + case _CONTROL_ROTATION_180: + return 180; + case _CONTROL_ROTATION_270: + return 270; + } +} + +} // Anonymous + +extern "C" +{ +_OSP_EXPORT_ void +_UiPrintBacktrace(_Control* pControl, int printChildren, int newBacktrace) +{ + 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 +_UiPrintTree(int level) +{ + _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); + _UiPrintControl(pWindow, 1, level); + } +} + +_OSP_EXPORT_ void +_UiPrintControlList(int level) +{ + _ControlManager* pControlManager = _ControlManager::GetInstance(); + SysTryReturnVoidResult(NID_UI, pControlManager, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + int count = pControlManager->GetControlCount(); + for (int i = 0; i< count; i++) + { + _Control* pControl = pControlManager->GetControl((count-1) - i); + if (pControl != null) + { + SysSecureLog(NID_UI, "[Control Manager] pControl index %d", i); + _UiPrintControl(pControl, true, level); + } + else + { + SysSecureLog(NID_UI, "[Control Manager] pControl is null"); + } + } +} +} + +namespace Tizen { namespace Ui +{ +_ControlManager* _ControlManager::__pInstance = null; + +void +_ControlManager::Initialize(void) +{ + static pthread_once_t once_block = PTHREAD_ONCE_INIT; + + if (!__pInstance) + { + pthread_once(&once_block, InitInstance); + } + + result r = _SettingInfoImpl::AddSettingEventListenerForInternal(*__pInstance); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + // [ToDo] Is it OK to directly get the device orientation? + int degree = app_get_device_orientation(); + SysLog(NID_UI, "The initial value of device orientation is %d.", degree); + + __pInstance->__screenRotation = ::Convert(degree); +} + +void +_ControlManager::Release(void) +{ + result r = _SettingInfoImpl::RemoveSettingEventListenerForInternal(*__pInstance); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + __pInstance->CallControlManagerEventListener(); + + delete __pInstance; + __pInstance = null; +} + +_ControlManager* +_ControlManager::GetInstance(void) +{ + return __pInstance; +} + +void +_ControlManager::InitInstance(void) +{ + if (__pInstance) + { + return; + } + + __pInstance = new (std::nothrow) _ControlManager; + SysAssert(__pInstance); +} + +_ControlHandle +_ControlManager::Register(_Control* pObject) +{ + if (pObject == null) + { + return _ControlHandle(); + } + + if (__pAllControlList) + { + __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); +} + +_Control* +_ControlManager::Release(const _ControlHandle& handle) +{ + _Control* pObject = GetObject(handle); + if (!pObject) + { + return null; + } + + if (__pAllControlList) + { + __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); +} + +_Control* +_ControlManager::GetObject(const _ControlHandle& handle) +{ + return __objectManager.GetObject(handle); +} + +const _Control* +_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 +{ + return __objectManager.GetObjectCount(); +} + +bool +_ControlManager::IsCoordinateSystemLogical(void) const +{ + return __isCoordinateSystemLogical; +} + +int +_ControlManager::GetCoordinateSystem(void) const +{ + return __logicalCoordinateSystem; +} + +_BaseScreenSize +_ControlManager::GetLogicalBaseScreenSize(void) const +{ + return __logicalBaseScreenSize; +} + +_ControlManager::_ControlManager(void) // [ToDo] exception check. + : __pWindowList(null) + , __pAllWindowList(null) + , __pAllControlList(null) + , __isCoordinateSystemLogical(true) + , __logicalCoordinateSystem(0) + , __logicalBaseScreenSize(BASE_SCREEN_SIZE_NONE) + , __pSystemWindowList(null) + , __pFocusControl(null) + , __screenRotation(_CONTROL_ROTATION_0) + , __orientationStatus(_CONTROL_ROTATION_0) + , __orientation(_CONTROL_ORIENTATION_PORTRAIT) + , __pCurrentFrame(null) + , __pGestureList(null) + , __gestureMaxDuration(0) + , __touchedWindow(0) + , __isDefaultFontChanged(false) + , __isSystemFontChanged(false) + , __defaultFontName(L"") + , __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."); + + Dimension deviceResolution = CoordinateSystem::GetPhysicalResolution(); + _BaseScreenSize deviceBaseScreenSize = _CoordinateSystem::GetInstance()->GetPhysicalBaseScreenSize(); + + r = _CoordinateSystem::Initialize(__logicalCoordinateSystem, __logicalBaseScreenSize, deviceResolution, deviceBaseScreenSize); + SysAssert(r == E_SUCCESS); + + r = _AnimationManager::CreateInstance(); + SysAssertf(r == E_SUCCESS, "Failed to create animation manager!"); + + r = _DisplayManager::CreateInstance(); + SysAssertf(r == E_SUCCESS, "Failed to create display manager!"); + + _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."); + + __pAllWindowList = new (std::nothrow)LinkedListT<_Window*>; + SysTryCatch(NID_UI, __pAllWindowList, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + __pAllControlList = new (std::nothrow)LinkedListT<_Control*>; + SysTryCatch(NID_UI, __pAllControlList, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + __pGestureList = new (std::nothrow)LinkedListT<_TouchGestureDetector*>; + SysTryCatch(NID_UI, __pGestureList, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + _UiEventManager::Initialize(); + _TouchManager::Initialize(); + _KeyEventManager::Initialize(); + _IndicatorManager::InitializeInstance(); + _AccessibilityManager::CreateInstance(); + + SetLastResult(E_SUCCESS); + + return; + +CATCH: + _AnimationManager::ReleaseInstance(); + + if (__pWindowList) + { + delete __pWindowList; + __pWindowList = null; + } + + if (__pAllWindowList) + { + delete __pAllWindowList; + __pAllWindowList = null; + } + + if (__pAllControlList) + { + delete __pAllControlList; + __pAllControlList = null; + } + + if (__pGestureList) + { + delete __pGestureList; + __pGestureList = null; + } +} + +_ControlManager::~_ControlManager(void) +{ + _Clipboard::ReleaseInstance(); + + if (GetUsedHandleCount() != 0) + { + SysLog(NID_UI, "[Control Manager] The number of unreleased handle: %d", GetUsedHandleCount()); + } + + if (GetControlCount() != 0) + { + SysLog(NID_UI, "[Control Manager] The number of unreleased control: %d", GetControlCount()); + } + + if (__pWindowList) + { + delete __pWindowList; + __pWindowList = null; + } + + if (__pAllWindowList) + { + delete __pAllWindowList; + __pAllWindowList = null; + } + + if (__pAllControlList) + { + delete __pAllControlList; + __pAllControlList = null; + } + + if (__pGestureList) + { + delete __pGestureList; + __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(); + + _DisplayManager::ReleaseInstance(); + + _AnimationManager::ReleaseInstance(); + + _AccessibilityManager::ReleaseInstance(); + + _KeyEventManager::ReleaseInstance(); + _TouchManager::ReleaseInstance(); + _DimmingManager::ReleaseInstance(); + _UiEventManager::Release(); +} + +_Window* +_ControlManager::GetTopWindow(void) const +{ + ClearLastResult(); + + if (GetWindowCount() == 0) + { + return null; + } + + return GetWindow(GetWindowCount() - 1); +} + +_Window* +_ControlManager::GetTopVisibleWindow(void) const +{ + ClearLastResult(); + + if (GetWindowCount() == 0) + { + return null; + } + + int count = GetWindowCount(); + for (int i = 0; i < count; i++) + { + _Window* pWindow = GetWindow((count-1) - i); + + if (pWindow->GetVisibleState() == true) + { + return pWindow; + } + } + + return null; +} + +_Window* +_ControlManager::GetTopVisibleWindowAt(const Point& point) const +{ + ClearLastResult(); + + if (GetWindowCount() == 0) + { + return null; + } + + int count = GetWindowCount(); + for (int i = 0; i < count; i++) + { + _Window* pWindow = GetWindow((count-1) - i); + + if (pWindow->GetVisibleState() == false) + { + continue; + } + + Rectangle winBounds = pWindow->GetBounds(); + if (winBounds.Contains(point)) + { + return pWindow; + } + } + + return null; +} + +bool +_ControlManager::IsWindowOnTop(const _Window& window) const +{ + return GetTopWindow() == &window; +} + +bool +_ControlManager::IsWindowAttached(const _Window& window) const +{ + return __pWindowList->Contains(const_cast<_Window*>(&window)); +} + +// Open a window and bring it to top. +result +_ControlManager::OpenWindow(_Window& window, bool invalidate) +{ + if (dynamic_cast <_Frame*>(&window) != null) + { + __pCurrentFrame = &window; + } + + result r = ActivateWindow(window, invalidate); + SysTryReturn(NID_UI, r != E_INVALID_OPERATION, r, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryReturn(NID_UI, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System Error."); + + return E_SUCCESS; +} + +result +_ControlManager::ActivateWindow(_Window& window, bool invalidate) +{ + ClearLastResult(); + result r = E_SUCCESS; + + if (IsWindowOnTop(window)) + { + return E_SUCCESS; + } + + if (window.IsActivationEnabled()) + { + int count = GetWindowCount(); + for (int i = 0; i < count; i++) + { + _Window* pWindow = GetWindow((count-1) - i); + if (pWindow->IsActivated() == true) + { + pWindow->Deactivate(); + break; + } + } + + } + + if (IsWindowAttached(window)) + { + r = MoveWindowToTop(window); // [ToDo] excpetion + SysAssert(r == E_SUCCESS); + + return E_SUCCESS; + } + + r = window.GetControlDelegate().OnAttaching(null); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = CallOnAttachingToMainTree(window); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + r = AttachWindow(window); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + if (window.IsActivationEnabled()) + { + window.Activate(); + } + + if (window.IsOrientationRoot() == false) + { + if (window.GetWindowType() == _WINDOW_TYPE_VE) + { + window.ChangeLayout(__orientation); + } + else + { + _EcoreEvas* pEcoreEvas = ::GetEcoreEvasMgr()->GetEcoreEvas(); + if (pEcoreEvas) + { + pEcoreEvas->SetWindowPreferredRotation(window, ::Convert(__orientationStatus)); + } + } + } + + r = window.GetControlDelegate().OnAttached(); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + 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); + } + + if (window.IsDimmingEnabled()) + { + r = _DimmingManager::GetInstance()->ShowDimmingLayer(&window); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + return E_SUCCESS; +} + +result +_ControlManager::CallOnAttachingToMainTree(_Control& control) +{ + result r = E_SUCCESS; + + r = control.GetControlDelegate().OnAttachingToMainTree(null); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _Control::ControlList& children = control.GetChildList(); + _Control* pChild = null; + + for (int index = 0; index < children.GetCount(); index++) + { + r = children.GetAt(index, pChild); + if (IsFailed(r)) + { + SysAssert(r == E_OUT_OF_RANGE); + SysTryReturn(NID_UI, + (r != E_OUT_OF_RANGE), E_OUT_OF_RANGE, + E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The specified index is out of range."); + } + r = CallOnAttachingToMainTree(*pChild); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + return r; +} + +result +_ControlManager::CallOnPreAttachedToMainTree(_Control& control) +{ + result r = E_SUCCESS; + + _Control* pChild = null; + _Control::ControlList* pControlList = new (std::nothrow) _Control::ControlList; + pControlList->Construct(control.GetChildList()); + + for (int index = 0; index < pControlList->GetCount(); index++) + { + r = pControlList->GetAt(index, pChild); + if (IsFailed(r)) + { + SysAssert(r == E_OUT_OF_RANGE); + SysTryReturn(NID_UI, + (r != E_OUT_OF_RANGE), E_OUT_OF_RANGE, + E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The specified index is out of range."); + } + r = control.CallOnPreAttachedToMainTree(*pChild); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + r = control.GetControlDelegate().OnPreAttachedToMainTree(); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + delete pControlList; + + return r; +} + +result +_ControlManager::CallOnAttachedToMainTree(_Control& control) +{ + result r = E_SUCCESS; + + _Control* pChild = null; + _Control::ControlList* pControlList = new (std::nothrow) _Control::ControlList; + pControlList->Construct(control.GetChildList()); + + r = control.GetControlDelegate().OnAttachedToMainTree(); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + for (int index = 0; index < pControlList->GetCount(); index++) + { + r = pControlList->GetAt(index, pChild); + if (IsFailed(r)) + { + SysAssert(r == E_OUT_OF_RANGE); + SysTryReturn(NID_UI, + (r != E_OUT_OF_RANGE), E_OUT_OF_RANGE, + E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The specified index is out of range."); + } + r = control.CallOnAttachedToMainTree(*pChild); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + delete pControlList; + + return r; +} + +result +_ControlManager::CallOnDetachingFromMainTree(_Control& control) +{ + result r = E_SUCCESS; + + _Control* pChild = null; + _Control::ControlList& children = control.GetChildList(); + + _Window* pTop = control.GetRootWindow(); + if (pTop) + { + _Control* pControl = pTop->GetFocusControl(&control); + if ((&control) == pControl) + { + pTop->SetFocusControl(&control, false); + } + _Control* pFocusTraversalControl = pTop->GetFocusTraversalControl(&control); + if ((&control) == pFocusTraversalControl) + { + pTop->SetFocusTraversalControl(&control, false); + } + } + + r = control.GetControlDelegate().OnDetachingFromMainTree(); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + for (int index = 0; index < children.GetCount(); index++) + { + r = children.GetAt(index, pChild); + if (IsFailed(r)) + { + SysAssert(r == E_OUT_OF_RANGE); + SysTryReturn(NID_UI, + (r != E_OUT_OF_RANGE), E_OUT_OF_RANGE, + E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The specified index is out of range."); + } + r = CallOnDetachingFromMainTree(*pChild); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + return r; +} + +void +_ControlManager::CallControlManagerEventListener(void) +{ + unique_ptr > pEnumerator(__pControlManagerEventListenerList->GetEnumeratorN()); + if (pEnumerator) + { + while (pEnumerator->MoveNext() == E_SUCCESS) + { + _IControlManagerEventListener* pListener = null; + pEnumerator->GetCurrent(pListener); + + if (pListener) + { + pListener->OnControlManagerTerminating(); + } + } + } +} + +result +_ControlManager::CloseWindow(_Window& window) // [ToDo] exception check. +{ + ClearLastResult(); + result r = E_SUCCESS; + + if (IsWindowAttached(window) == false) + { + return E_SUCCESS; + } + + _Window* pTopWindow = GetTopWindow(); + + r = CallOnDetachingFromMainTree(window); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + window.GetControlDelegate().OnDetaching(); + + window.Deactivate(); + + r = DetachWindow(window); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + _Window* pNewTopWindow = GetTopWindow(); + + if (pNewTopWindow != pTopWindow) + { + if (pNewTopWindow && pNewTopWindow->IsActivationEnabled()) + { + pNewTopWindow->Activate(); + if (pNewTopWindow->IsDimmingEnabled()) + { + r = _DimmingManager::GetInstance()->ShowDimmingLayer(pNewTopWindow); + 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 (!findFrame) + { + __pCurrentFrame = null; + } + } + + return E_SUCCESS; +} + +_Control* +_ControlManager::GetControl(int index) const +{ + _Control* pControl; + __pAllControlList->GetAt(index, pControl); + + return pControl; +} + +int +_ControlManager::GetControlCount(void) const +{ + if (__pAllControlList) + { + return __pAllControlList->GetCount(); + } + return -1; +} + +_Window* +_ControlManager::GetWindow(int index) const +{ + _Window* pWindow; + __pWindowList->GetAt(index, pWindow); + + return pWindow; +} + +int +_ControlManager::GetWindowCount(void) const +{ + if (__pWindowList) + { + return __pWindowList->GetCount(); + } + return -1; +} + + +_Window* +_ControlManager::GetAllWindow(int index) const +{ + _Window* pWindow; + __pAllWindowList->GetAt(index, pWindow); + + return pWindow; +} + +int +_ControlManager::GetAllWindowCount(void) const +{ + return __pAllWindowList->GetCount(); +} + +result +_ControlManager::DetachAllWindow(_Window& window) +{ + return __pAllWindowList->Remove(&window); +} + +result +_ControlManager::AttachWindow(_Window& window) +{ + _Window* pTopWindow = GetTopWindow(); + if (pTopWindow) + { + pTopWindow->OnTouchCaptureLost(); + } + + if (window.GetWindowType() != _WINDOW_TYPE_VE) + { + _IndicatorManager::GetInstance()->AddWindow(&window); + + if (window.IsDimmingEnabled()) + { + _DimmingManager::GetInstance()->RegisterWindow(&window); + } + + _RootVisualElement* pRootVE = window.GetRootVisualElement(); + if (pRootVE) + { + _DisplayManager::GetInstance()->UnregisterRoot(*pRootVE); + _DisplayManager::GetInstance()->RegisterRoot(*pRootVE); + } + } + + if (__pAllWindowList->Contains(&window) == false) + { + __pAllWindowList->Add(&window); + } + + return __pWindowList->Add(&window); +} + +result +_ControlManager::InsertWindowToBottom(_Window& window) +{ + return __pWindowList->InsertAt(&window, 0); +} + +result +_ControlManager::InsertWindowAfter(const _Window& targetWindow, _Window& window) +{ + int index = 0; + + if ((GetTopWindow() != null) && (GetTopWindow() == &window)) + { + window.OnTouchCaptureLost(); + } + + result r = __pWindowList->IndexOf(const_cast<_Window*>(&targetWindow), index); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return __pWindowList->InsertAt(&window, index+1); +} + +result +_ControlManager::InsertWindowBefore(const _Window& targetWindow, _Window& window) +{ + int index = 0; + + result r = __pWindowList->IndexOf(const_cast<_Window*>(&targetWindow), index); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return __pWindowList->InsertAt(&window, index); +} + +result +_ControlManager::DetachWindow(_Window& window) +{ + result r = E_SUCCESS; + + _IndicatorManager::GetInstance()->DeleteWindow(&window); + + if (window.IsDimmingEnabled()) + { + _DimmingManager::GetInstance()->UnRegisterWindow(&window); + } + + r = __pWindowList->Remove(&window); + + _Window* pTopWindow = GetTopWindow(); + if (pTopWindow) + { + pTopWindow->OnTouchCaptureGained(); + } + return r; +} + +void +_ControlManager::DetachAllWindows(void) +{ + __pWindowList->RemoveAll(); +} + +result +_ControlManager::MoveWindowToTop(const _Window& window) +{ + _Window* pTopWindow = GetTopWindow(); + if (pTopWindow) + { + pTopWindow->OnTouchCaptureLost(); + } + + result r = __pWindowList->Remove(const_cast<_Window*>(&window)); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return __pWindowList->Add(const_cast<_Window*>(&window)); +} + +result +_ControlManager::MoveWindowToBottom(const _Window& window) +{ + result r = __pWindowList->Remove(const_cast<_Window*>(&window)); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return __pWindowList->InsertAt(const_cast<_Window*>(&window), 0); +} + +result +_ControlManager::MoveWindowAfter(const _Window& targetWindow, const _Window& window) +{ + result r = __pWindowList->Remove(const_cast<_Window*>(&window)); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + int index = 0; + + r = __pWindowList->IndexOf(const_cast<_Window*>(&targetWindow), index); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return __pWindowList->InsertAt(const_cast<_Window*>(&window), index+1); +} + +result +_ControlManager::MoveWindowBefore(const _Window& targetWindow, const _Window& window) +{ + result r = __pWindowList->Remove(const_cast<_Window*>(&window)); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + int index = 0; + + r = __pWindowList->IndexOf(const_cast<_Window*>(&targetWindow), index); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return __pWindowList->InsertAt(const_cast<_Window*>(&window), index); +} + +_ControlOrientation +_ControlManager::GetOrientation(void) const +{ + return __orientation; +} + +void +_ControlManager::SetOrientation(_ControlOrientation orientation) +{ + __orientation = orientation; +} + +_ControlRotation +_ControlManager::GetScreenRotation(void) const +{ + bool autoRotate = true; + int ret = runtime_info_get_value_bool(RUNTIME_INFO_KEY_AUTO_ROTATION_ENABLED, &autoRotate); + + if (ret == RUNTIME_INFO_ERROR_NONE) + { + SysLog(NID_UI, "The flag of auto-rotate is %d.", autoRotate); + } + else + { + SysLog(NID_UI, "It's failed to get the flag of auto-rotate."); + } + + SysLog(NID_UI, "[WM ROTATION] AUTO_ROTATION = %d", autoRotate); + + if (autoRotate == false) + { + return _CONTROL_ROTATION_0; + } + else + { +// int degree = app_get_device_orientation(); + + unsigned long rotationState = 0; + int ret = sf_check_rotation(&rotationState); + int device_rotation = 0; + + if (ret == 0) + { + switch (rotationState) + { + case ROTATION_EVENT_0: + device_rotation = 0; + break; + case ROTATION_EVENT_90: + device_rotation = 270; + break; + case ROTATION_EVENT_180: + device_rotation = 180; + break; + case ROTATION_EVENT_270: + device_rotation = 90; + break; + case ROTATION_UNKNOWN: + { + _Window* pCurrentFrame = GetCurrentFrame(); + if (pCurrentFrame) + { + _EcoreEvas* pEcoreEvas = ::GetEcoreEvasMgr()->GetEcoreEvas(); + if (pEcoreEvas) + { + SysLog(NID_UI, "[WM ROTATION] ROTATION_UNKNOWN"); + device_rotation = pEcoreEvas->GetWindowRotation(*pCurrentFrame); + } + } + } + break; + default: + break; + } + + SysLog(NID_UI, "[WM ROTATION] device_rotation = %d", device_rotation); + } + else + { + SysLog(NID_UI, "[WM ROTATION] device_rotation = error"); + } + + return ::Convert(device_rotation); + } +} + +void +_ControlManager::OnScreenRotated(int rotation) +{ + SysLog(NID_UI, "The angle of Emul or Target is %d.", rotation); + __screenRotation = ::Convert(rotation); + + int count = GetWindowCount(); + for (int i = 0; i < count; i++) + { + _Window* pWindow = GetWindow((count-1) - i); + + _Frame* pFrame = dynamic_cast<_Frame*>(pWindow); + + if (pFrame) + { + Controls::_FrameImpl* pFrameImpl = static_cast(pFrame->GetUserData()); + if (pFrameImpl == null) + { + continue; + } + + Controls::_FormImpl* pCurrentFormImpl = pFrameImpl->GetCurrentForm(); + if (pCurrentFormImpl) + { + pCurrentFormImpl->UpdateOrientationStatus(true); + } + else + { + pFrameImpl->UpdateOrientationStatus(); + } + } + } +} + +void +_ControlManager::SetTouchedWindow(unsigned int window) +{ + __touchedWindow = window; +} + +_Window* +_ControlManager::GetTouchedWindow(void) const +{ + ClearLastResult(); + + if (GetWindowCount() == 0) + { + return null; + } + + int count = GetWindowCount(); + for (int i = 0; i < count; i++) + { + _Window* pWindow = GetWindow((count-1) - i); + + _RootVisualElement* pRootVE = pWindow->GetRootVisualElement(); + if (!pRootVE) + { + continue; + } + + _EflLayer* pLayer = static_cast<_EflLayer*>(pRootVE->GetNativeLayer()); + + Ecore_Evas* pEcoreEvas = pLayer->GetEcoreEvas(); + Ecore_X_Window win = (Ecore_X_Window) ecore_evas_window_get(pEcoreEvas); + + if (win == __touchedWindow) + { + return pWindow; + } + } + + return null; +} + +void +_ControlManager::SetOrientationStatus(_ControlRotation orientationStatus) +{ + __orientationStatus = orientationStatus; +} + +_ControlRotation +_ControlManager::GetOrientationStatus(void) const +{ + return __orientationStatus; +} + +void +_ControlManager::RotateScreen(const _Control& control, _ControlRotation screenRotation) +{ + // Non-auto mode + // Rotate window + // Set window preferred rotation + + _EcoreEvas* pEcoreEvas = ::GetEcoreEvasMgr()->GetEcoreEvas(); + SysAssert(pEcoreEvas); + if (pEcoreEvas == null) + { + return; + } + + // Rotate root window. + _Window* pRootWindow = control.GetRootWindow(); + if (pRootWindow) + { + pEcoreEvas->RotateWindow(*pRootWindow, ::Convert(screenRotation)); + pRootWindow->SetRotation(::Convert(screenRotation)); + } + + if (__orientationStatus != screenRotation) + { + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + if (pTouchManager) + { + pTouchManager->SetTouchCanceled(null); + } + } +} + +void +_ControlManager::OnWindowRotated(int rotation) +{ + // For non-ownees + IEnumeratorT<_Window*>* pEnumerator = __pWindowList->GetEnumeratorN(); + SysTryReturnVoidResult(NID_UI, pEnumerator, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + + while (pEnumerator->MoveNext() == E_SUCCESS) + { + _Window* pWindow = null; + pEnumerator->GetCurrent(pWindow); + + if (pWindow->GetOwner() == null) + { + void* pUserData = pWindow->GetUserData(); + if (pUserData) + { + _WindowImpl* pWindowImpl = static_cast<_WindowImpl*>(pUserData); + pWindowImpl->OnRotated(Convert(rotation)); + } + } + } + + delete pEnumerator; +} + +void +_ControlManager::SetFocusControl(const _Control& control, bool on) +{ + if (on) + { + if (__pFocusControl == &control) + { + return; + } + + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + SysTryReturnVoidResult(NID_UI, pEcoreEvas, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + _Control *pPreviousFocusedControl = __pFocusControl; + if (pPreviousFocusedControl) + { + // [review] make SetFocus() return result and use the returned result here. + pEcoreEvas->SetFocus(*pPreviousFocusedControl, false); + if (GetLastResult() == E_SUCCESS) + { + _UiFocusEvent event(pPreviousFocusedControl->GetHandle(), FOCUS_LOST); + _UiEventManager::GetInstance()->SendEvent(event); + } + } + + // [review] make SetFocus() return result and use the returned result here. + + if (control.IsNativeObjectFocusable()) + { + pEcoreEvas->SetFocus(control, true); + } + + if (GetLastResult() == E_SUCCESS) + { + __pFocusControl = const_cast<_Control*>(&control); + if (__pFocusControl->IsFocusWindowActivationChecked() == false || IsFrameActivated() == true) + { + _UiFocusEvent event(control.GetHandle(), FOCUS_GAINED); + _UiEventManager::GetInstance()->SendEvent(event); + } + } + } + else + { + if (__pFocusControl != &control) + { + return; + } + + _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas(); + SysTryReturnVoidResult(NID_UI, pEcoreEvas, E_SYSTEM, "[E_SYSTEM] System error occurred."); + + if (__pFocusControl) + { + // [review] make SetFocus() return result and use the returned result here. + pEcoreEvas->SetFocus(*__pFocusControl, false); + if (GetLastResult() == E_SUCCESS) + { + _UiFocusEvent event(__pFocusControl->GetHandle(), FOCUS_LOST); + _UiEventManager::GetInstance()->SendEvent(event); + } + } + + _Window* pTopWindow = GetTopWindow(); + if (pTopWindow) + { + // [review] make SetFocus() return result and use the returned result here. + pEcoreEvas->SetFocus(*pTopWindow, true); + if (GetLastResult() == E_SUCCESS) + { + _UiFocusEvent event(pTopWindow->GetHandle(), FOCUS_GAINED); + _UiEventManager::GetInstance()->SendEvent(event); + } + + __pFocusControl = static_cast<_Control*>(pTopWindow); + } + } +} + +// [review] called in ~_Control and virtual OnFocusLost is called. +// _Control::Release() instead of ~_Control. +bool +_ControlManager::TakeFocusFromControl(const _Control& control) +{ + if (__pFocusControl == &control) + { + _Control *pPreviousFocusedControl = __pFocusControl; + __pFocusControl = null; + _UiFocusEvent event(pPreviousFocusedControl->GetHandle(), FOCUS_LOST); + _UiEventManager::GetInstance()->SendEvent(event); + + return true; + } + + return false; +} + +_Control* +_ControlManager::GetFocusControl(void) const +{ + return __pFocusControl; +} + +void +_ControlManager::SetClipboardOwner(_Window* pOwner) +{ + __pClipboardOwner = pOwner; +} + +_Window* +_ControlManager::GetClipboardOwner(void) const +{ + if (__pClipboardOwner) + { + return __pClipboardOwner; + } + + return GetCurrentFrame(); +} + +result +_ControlManager::AddControlManagerEventListener(_IControlManagerEventListener& listener) +{ + bool exist = __pControlManagerEventListenerList->Contains(&listener); + SysTryReturn(NID_UI, exist == false, E_OBJ_ALREADY_EXIST, E_OBJ_ALREADY_EXIST, "[%s] Propagating.", GetErrorMessage(E_OBJ_ALREADY_EXIST)); + + __pControlManagerEventListenerList->Add(&listener); + + return E_SUCCESS; +} + +result +_ControlManager::RemoveControlManagerEventListener(_IControlManagerEventListener& listener) +{ + result r = __pControlManagerEventListenerList->Remove(&listener); + SysTryReturn(NID_UI, r == E_SUCCESS, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[%s] Propagating.", GetErrorMessage(E_OBJ_NOT_FOUND)); + + return E_SUCCESS; +} + +_Control* +_ControlManager::GetTopmostTouchedControl(const Point& point, bool activation) +{ + _Control* pControl = null; + _Window* pTopWindow = null; + + _TouchManager* pTouchManager = _TouchManager::GetInstance(); + SysTryReturn(NID_UI, pTouchManager, null, E_SYSTEM, "[E_SYSTEM] A system error occurred."); + + _Control* pCapturedControl = pTouchManager->GetCapturedControl(); + + int count = GetWindowCount(); + if (count != 0) + { + for (int i = 0; i < count; i++) + { + _Window* pWindow = GetWindow((count-1) - i); + + if (pWindow->GetVisibleState() == false) + { + continue; + } + + _RootVisualElement* pRootVE = pWindow->GetRootVisualElement(); + if (!pRootVE) + { + continue; + } + + if (activation == true) + { + if (pWindow->IsActivationEnabled() == false) + { + continue; + } + } + + _EflLayer* pLayer = static_cast<_EflLayer*>(pRootVE->GetNativeLayer()); + + Ecore_Evas* pEcoreEvas = pLayer->GetEcoreEvas(); + Ecore_X_Window win = (Ecore_X_Window)ecore_evas_window_get(pEcoreEvas); + + Rectangle winDeviceBounds(0, 0, 0, 0); + ecore_x_window_geometry_get(win, &winDeviceBounds.x, &winDeviceBounds.y, &winDeviceBounds.width, &winDeviceBounds.height); + + Point winDevicePoint = _CoordinateSystemUtils::Transform(pWindow->GetPosition()); + + Point devicePoint = _CoordinateSystemUtils::Transform(point); + int x = devicePoint.x; + int y = devicePoint.y; + + int rootW = 0; + int rootH = 0; + ecore_x_window_size_get(ecore_x_window_root_get(win), &rootW, &rootH); + + int rotation = ecore_evas_rotation_get(pEcoreEvas); + switch (rotation) + { + case 270: + devicePoint.x = rootW - y; + devicePoint.y = x; + winDeviceBounds.x = rootW - winDevicePoint.y - winDeviceBounds.width; + winDeviceBounds.y = winDevicePoint.x; + break; + case 180: + devicePoint.x = rootW - x; + devicePoint.y = rootH - y; + winDeviceBounds.x = rootW - winDevicePoint.x - winDeviceBounds.width; + winDeviceBounds.y = rootH - winDevicePoint.y - winDeviceBounds.height; + break; + case 90: + devicePoint.x = y; + devicePoint.y = rootH - x; + winDeviceBounds.x = winDevicePoint.y; + winDeviceBounds.y = rootH - winDevicePoint.x - winDeviceBounds.height; + break; + default: + devicePoint.x = x; + devicePoint.y = y; + winDeviceBounds.x = winDevicePoint.x; + winDeviceBounds.y = winDevicePoint.y; + break; + } + + if (winDeviceBounds.Contains(devicePoint)) + { + pTopWindow = pWindow; + break; + } + } + } + + if (pTopWindow != null) + { + _RootVisualElement* pRootVisualElement = pTopWindow->GetRootVisualElement(); + if (pRootVisualElement == null) + { + SetLastResult(E_SYSTEM); + return 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--) + { + _ControlVisualElement* pChildControlVisualElement = dynamic_cast<_ControlVisualElement*>(pList->GetAt(i)); + if (pChildControlVisualElement) + { + _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; + } + + 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 +Dimension +_ControlManager::GetScreenSize(void) const +{ + return _CoordinateSystemUtils::InverseTransform(Dimension(_Screen::GetWidth(), _Screen::GetHeight())); +} + +FloatDimension +_ControlManager::GetScreenSizeF(void) const +{ + return _CoordinateSystemUtils::InverseTransform(FloatDimension(_Screen::GetWidth(), _Screen::GetHeight())); +} + +void +_ControlManager::SetScreenDpi(int dpi) +{ + __screenDpi = dpi; +} + +int +_ControlManager::GetScreenDpi() const +{ + return __screenDpi; +} + +_Window* +_ControlManager::GetCurrentFrame(void) const +{ + return __pCurrentFrame; +} + +result +_ControlManager::SetDefaultFont(const String& appFontName) +{ + + if(appFontName.Equals(__defaultFontName)) + { + return E_SUCCESS; + } + + __isDefaultFontChanged = true; + __defaultFontName = appFontName; + __defaultFontFileName.Clear(); + + struct _Visitor + : public _Control::Visitor + { + virtual _Control::VisitType Visit(_Control& control) + { + if (control.__fontName.IsEmpty() && control.__fontFileName.IsEmpty()) + { + control.GetFallbackFont(); + _IControlDelegate& delegate = control.GetControlDelegate(); + delegate.OnFontChanged(control.__pFont); + } + return _Control::VISIT_DOWNWARD; + } + }; + + _Visitor visitor; + + int count = GetWindowCount(); + for (int j = 0; j < count; j++) + { + _Window* pWindow = GetWindow((count-1) - j); + pWindow->Accept(visitor); + } + + SetDefaultFontChangeState(false); + + return E_SUCCESS; +} + +Tizen::Base::String +_ControlManager::GetDefaultFont(void) +{ + return __defaultFontName; +} + +result +_ControlManager::SetDefaultFontFromFile(const Tizen::Base::String& fileName) +{ + if(fileName.Equals(__defaultFontFileName)) + { + return E_SUCCESS; + } + + __isDefaultFontChanged = true; + __defaultFontFileName = fileName; + __defaultFontName.Clear(); + struct _Visitor + : public _Control::Visitor + { + virtual _Control::VisitType Visit(_Control& control) + { + if (control.__fontName.IsEmpty() && control.__fontFileName.IsEmpty()) + { + control.GetFallbackFont(); + _IControlDelegate& delegate = control.GetControlDelegate(); + delegate.OnFontChanged(control.__pFont); + } + return _Control::VISIT_DOWNWARD; + } + }; + + _Visitor visitor; + + int count = GetWindowCount(); + for (int j = 0; j < count; j++) + { + _Window* pWindow = GetWindow((count-1) - j); + pWindow->Accept(visitor); + } + + SetDefaultFontChangeState(false); + + return E_SUCCESS; +} +String +_ControlManager::GetDefaultFontFile(void) const +{ + return __defaultFontFileName; +} +bool +_ControlManager::IsDefaultFontChanged(void) const +{ + return __isDefaultFontChanged; +} + +bool +_ControlManager::IsSystemFontChanged(void) const +{ + return __isSystemFontChanged; +} + +void +_ControlManager::SetDefaultFontChangeState(bool isDefaultFontChanged) +{ + __isDefaultFontChanged = isDefaultFontChanged; +} + +bool +_ControlManager::IsFrameActivated(void) const +{ + _Frame* pFrame = dynamic_cast<_Frame*>(__pCurrentFrame); + SysTryReturn(NID_UI, pFrame, false, E_SYSTEM, "[E_SYSTEM] System error occurred. "); + + return pFrame->IsFrameActivated(); +} + +// [review] refactoring +result +_ControlManager::AddGestureDetector(const _TouchGestureDetector& gesture) +{ + ClearLastResult(); + + SysTryReturn(NID_UI, __pGestureList != null, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System error occurred. "); + + bool exist = __pGestureList->Contains(const_cast<_TouchGestureDetector*>(&gesture)); + SysTryReturnResult(NID_UI, exist == false, E_OBJ_ALREADY_EXIST, "[E_OBJ_ALREADY_EXIST]__pGestureList has gesture already"); + + result r = __pGestureList->Add(const_cast<_TouchGestureDetector*>(&gesture)); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + switch (gesture.GetDetectorType()) + { + case _TOUCH_GESTURE_DETECTOR_TYPE_TAP: + { + _TouchTapGestureDetector* pGestureTap = dynamic_cast<_TouchTapGestureDetector*>(const_cast<_TouchGestureDetector*>(&gesture)); + SysTryReturnResult(NID_UI, pGestureTap, E_SYSTEM, "[E_SYSTEM]system error occurred."); + + if (pGestureTap->GetTapInterval() > __gestureMaxDuration) + { + __gestureMaxDuration = pGestureTap->GetTapInterval(); + } + } + break; + case _TOUCH_GESTURE_DETECTOR_TYPE_LONG_PRESS: + { + _TouchLongPressGestureDetector* pGestureLongPress= dynamic_cast<_TouchLongPressGestureDetector*>(const_cast<_TouchGestureDetector*>(&gesture)); + SysTryReturnResult(NID_UI, pGestureLongPress, E_SYSTEM, "[E_SYSTEM]system error occurred."); + + if (pGestureLongPress->GetDuration() > __gestureMaxDuration) + { + __gestureMaxDuration = pGestureLongPress->GetDuration(); + } + } + break; + default: + break; + } + + return E_SUCCESS; +} + +result +_ControlManager::RemoveGestureDetector(const _TouchGestureDetector& gesture) +{ + ClearLastResult(); + + return __pGestureList->Remove(&(const_cast<_TouchGestureDetector&>(gesture))); +} + +IListT <_TouchGestureDetector*>* +_ControlManager::GetGestureDetectorList(void) const +{ + return __pGestureList; +} + +int +_ControlManager::GetGestureMaxTimeDuration(void) const +{ + return __gestureMaxDuration; +} + +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"; + + if (key == FONT_TYPE || key == LOCALE_COUNTRY || key == LOCALE_LANGUAGE) + { + _FontImpl::UpdateDefaultFont(key); + __isSystemFontChanged = true; + struct _Visitor + : public _Control::Visitor + { + virtual _Control::VisitType Visit(_Control& control) + { + control.GetFallbackFont(); + _IControlDelegate& delegate = control.GetControlDelegate(); + delegate.OnFontChanged(control.__pFont); + return _Control::VISIT_DOWNWARD; + } + }; + + _Visitor visitor; + + int count = GetWindowCount(); + for (int j = 0; j < count; j++) + { + _Window* pWindow = GetWindow((count-1) - j); + pWindow->Accept(visitor); + } + + __isSystemFontChanged = false; + for(int index = 0; index < count ; index++) + { + _Window* pWindow = GetWindow(index); + pWindow->Invalidate(true); + } + } + + //fixme : check longpress duration key + //if (key == ) + { + if (!__pGestureList || (__pGestureList && (__pGestureList->GetCount() <= 0))) + { + return; + } + + 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); + if (duration == 0) + { + duration = 500; + } + + while (pEnumerator->MoveNext() == E_SUCCESS) + { + _TouchGestureDetector* pGestureDetector = null; + pEnumerator->GetCurrent(pGestureDetector); + + if (!pGestureDetector) + { + continue; + } + + if(pGestureDetector->GetDetectorType() == _TOUCH_GESTURE_DETECTOR_TYPE_LONG_PRESS) + { + _TouchLongPressGestureDetector* pGestureLongPress= dynamic_cast<_TouchLongPressGestureDetector*>(const_cast<_TouchGestureDetector*>(pGestureDetector)); + SysTryReturnVoidResult(NID_UI, pGestureLongPress, E_SYSTEM, "[E_SYSTEM] System error occurred.") + pGestureLongPress->SetDuration(duration); + } + } + + delete pEnumerator; + } +} + +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 new file mode 100644 index 0000000..0679f35 --- /dev/null +++ b/src/ui/FUi_CustomControlBaseImpl.cpp @@ -0,0 +1,143 @@ +// +// 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_CustomControlBaseImpl.cpp + * @brief This is the implementation for the _CustomControlBaseImpl class and default transformer. + */ + +#include +#include "FUi_LayoutImpl.h" +#include "FUi_CustomControlBaseImpl.h" +#include "FUi_Control.h" + +using namespace Tizen::Base; +using namespace Tizen::Ui; +using namespace Tizen::Graphics; + +namespace Tizen { namespace Ui +{ + +_CustomControlBaseImpl::~_CustomControlBaseImpl(void) +{ +} + +_CustomControlBaseImpl* +_CustomControlBaseImpl::CreateCustomControlBaseImplN(CustomControlBase* pPublic, const Rectangle& bounds, + const Layout* pPublicPortraitLayout, const Layout* pPublicLandscapeLayout, + bool resizable, bool movable) +{ + result r = E_SUCCESS; + + _Control* pCore = _Control::CreateControlN(); + SysTryReturn(NID_UI, pCore, null, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r)); + + _CustomControlBaseImpl* pImpl = + new (std::nothrow) _CustomControlBaseImpl(pPublic, pCore, bounds, + pPublicPortraitLayout, pPublicLandscapeLayout, + resizable, movable); + r = CheckConstruction(pCore, pImpl); + SysTryReturn(NID_UI, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r)); + + ClearLastResult(); + + return pImpl; +} + +_CustomControlBaseImpl::_CustomControlBaseImpl(CustomControlBase* pCustomControlBase, _Control* pCore, const Rectangle& bounds, const Layout* pPublicPortraitLayout, const Layout* pPublicLandscapeLayout, bool resizable, bool movable) + : _ContainerImpl(pCustomControlBase, pCore, pPublicPortraitLayout, pPublicLandscapeLayout) +{ + result r = E_SUCCESS; + + r = GetLastResult(); + if (IsFailed(r)) + { + return; + } + + bool allOrNone = (pPublicPortraitLayout && pPublicLandscapeLayout) || (!pPublicPortraitLayout && !pPublicLandscapeLayout); + SysAssert(allOrNone); + + r = SetBounds(bounds); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + + pCore->SetResizable(resizable); + pCore->SetMovable(movable); +} + +const char* +_CustomControlBaseImpl::GetPublicClassName(void) const +{ + return "Tizen::Ui::CustomControlBase"; +} + +const CustomControlBase& +_CustomControlBaseImpl::GetPublic(void) const +{ + return static_cast (_ControlImpl::GetPublic()); +} + +CustomControlBase& +_CustomControlBaseImpl::GetPublic(void) +{ + return static_cast (_ControlImpl::GetPublic()); +} + +_CustomControlBaseImpl* +_CustomControlBaseImpl::GetInstance(CustomControlBase& pCustomControlBase) +{ + return static_cast<_CustomControlBaseImpl*>(pCustomControlBase._pControlImpl); +} + +const _CustomControlBaseImpl* +_CustomControlBaseImpl::GetInstance(const CustomControlBase& pCustomControlBase) +{ + return static_cast(pCustomControlBase._pControlImpl); + +} + + +result +_CustomControlBaseImpl::OnBoundsChanging(const Rectangle& bounds) +{ + __oldBounds = GetBounds(); + return GetPublic().PrepareBoundsChange(__oldBounds, 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()); +} + +void +_CustomControlBaseImpl::OnEvaluateSize(Dimension& evaluatedSize) +{ + GetPublic().EvaluateSize(evaluatedSize.width, evaluatedSize.height); +} + +}} // Tizen::Ui diff --git a/src/ui/FUi_DataBinding.cpp b/src/ui/FUi_DataBinding.cpp new file mode 100644 index 0000000..7a71e1e --- /dev/null +++ b/src/ui/FUi_DataBinding.cpp @@ -0,0 +1,1972 @@ +// +// 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_DataBinding.cpp + * @brief This is the implementation for the _DataBinding class and default transformer. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "FUi_Control.h" +#include "FUi_IPropertyChangeEventListener.h" +#include "FUi_PropertyBase.h" +#include "FUi_DataBinding.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +namespace +{ +using namespace Tizen::Ui; + +class _DefaultTransformer + : public Object + , public IDataBindingDataTransformer +{ +public: + virtual ~_DefaultTransformer(void); +public: + virtual bool TransformSourceToTarget(const Tizen::Base::String& bindingId, DataBindingDataType sourceType, const Tizen::Base::Object& sourceData, DataBindingDataType targetType, Tizen::Base::Object& targetData); + virtual bool TransformTargetToSource(const Tizen::Base::String& bindingId, DataBindingDataType targetType, const Tizen::Base::Object& targetData, DataBindingDataType sourceType, Tizen::Base::Object& sourceData); + virtual bool IsSourceToTargetTransformable(const Tizen::Base::String& bindingId, DataBindingDataType sourceType, DataBindingDataType targetType); + virtual bool IsTargetToSourceTransformable(const Tizen::Base::String& bindingId, DataBindingDataType targetType, DataBindingDataType sourceType); +private: + bool Transform(DataBindingDataType sourceType, const Tizen::Base::Object& sourceData, DataBindingDataType targetType, Tizen::Base::Object& destinationData); + bool IsTransformable(DataBindingDataType destinationType, DataBindingDataType sourceType); +}; + +_DefaultTransformer::~_DefaultTransformer(void) +{ +} +bool +_DefaultTransformer::TransformSourceToTarget(const Tizen::Base::String& bindingId, DataBindingDataType sourceType, const Tizen::Base::Object& sourceData, DataBindingDataType targetType, Tizen::Base::Object& targetData) +{ + return Transform(sourceType, sourceData, targetType, targetData); +} +bool +_DefaultTransformer::TransformTargetToSource(const Tizen::Base::String& bindingId, DataBindingDataType targetType, const Tizen::Base::Object& targetData, DataBindingDataType sourceType, Tizen::Base::Object& sourceData) +{ + return Transform(targetType, targetData, sourceType, sourceData); +} +bool +_DefaultTransformer::IsSourceToTargetTransformable(const Tizen::Base::String& bindingId, DataBindingDataType sourceType, DataBindingDataType targetType) +{ + return IsTransformable(sourceType, targetType); +} +bool +_DefaultTransformer::IsTargetToSourceTransformable(const Tizen::Base::String& bindingId, DataBindingDataType targetType, DataBindingDataType sourceType) +{ + return IsTransformable(targetType, sourceType); +} + +bool +_DefaultTransformer::Transform(DataBindingDataType sourceType, const Tizen::Base::Object& sourceData, DataBindingDataType destinationType, Tizen::Base::Object& destinationData) +{ + result r = E_SUCCESS; + + switch (destinationType) + { + case DATA_BINDING_DATA_TYPE_INTEGER: + switch (sourceType) // INTEGER from BOOLEAN, DOUBLE, FLOAT, INTEGER, LONG, STRING + { + case DATA_BINDING_DATA_TYPE_BOOLEAN: + { + Tizen::Base::Integer* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->value = static_cast(const_cast(sourceData)).ToBool()?1:0; + return true; + } + break; + case DATA_BINDING_DATA_TYPE_FLOAT: + { + Tizen::Base::Integer* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->value = static_cast(const_cast(sourceData)).ToInt(); + return true; + } + break; + case DATA_BINDING_DATA_TYPE_INTEGER: + { + Tizen::Base::Integer* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->value = static_cast(const_cast(sourceData)).ToInt(); + return true; + } + break; + case DATA_BINDING_DATA_TYPE_LONG: + { + Tizen::Base::Integer* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->value = static_cast(const_cast(sourceData)).ToInt(); + return true; + } + break; + case DATA_BINDING_DATA_TYPE_COLOR: + { + Tizen::Base::Integer* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->value = static_cast(const_cast(sourceData)).GetRGB32(); + return true; + } + break; + default: + { + return false; + } + } + break; + case DATA_BINDING_DATA_TYPE_BOOLEAN: + switch (sourceType) + { + case DATA_BINDING_DATA_TYPE_INTEGER: + { + Boolean* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->value = static_cast(const_cast(sourceData)).CompareTo(0) == 0 ? false:true; + } + break; + case DATA_BINDING_DATA_TYPE_BOOLEAN: + { + Boolean* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->value = static_cast(const_cast(sourceData)) == true ?true:false; + } + break; + case DATA_BINDING_DATA_TYPE_FLOAT: + { + Boolean* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->value = static_cast(const_cast(sourceData)).CompareTo(0.0f) == 0 ?false:true; + } + break; + case DATA_BINDING_DATA_TYPE_DOUBLE: + { + Boolean* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->value = static_cast(const_cast(sourceData)).CompareTo(0.0f) == 0 ?false:true; + } + break; + case DATA_BINDING_DATA_TYPE_LONG: + { + Boolean* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->value = static_cast(const_cast(sourceData)).CompareTo(0) == 0 ? false:true; + } + break; + default: + { + return false; + } + } + break; + case DATA_BINDING_DATA_TYPE_FLOAT: + switch (sourceType) // FLOAT from DOUBLE, FLOAT, INTEGER, LONG, STRING + { + case DATA_BINDING_DATA_TYPE_BOOLEAN: + { + Tizen::Base::Float* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->value = static_cast(const_cast(sourceData)).ToBool() ? 1.0 : 0.0; + return true; + } + break; + case DATA_BINDING_DATA_TYPE_FLOAT: + { + Tizen::Base::Float* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->value = static_cast(const_cast(sourceData)).ToFloat(); + return true; + } + break; + case DATA_BINDING_DATA_TYPE_INTEGER: + { + Tizen::Base::Float* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->value = static_cast(const_cast(sourceData)).ToFloat(); + return true; + } + break; + case DATA_BINDING_DATA_TYPE_LONG: + { + Tizen::Base::Float* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->value = static_cast(const_cast(sourceData)).ToFloat(); + return true; + } + break; + default: + { + return false; + } + } + break; + case DATA_BINDING_DATA_TYPE_DOUBLE: + switch (sourceType) // DOUBLE from DOUBLE, FLOAT, INTEGER, LONG, STRING + { + case DATA_BINDING_DATA_TYPE_DOUBLE: + { + Tizen::Base::Double* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->value = static_cast(const_cast(sourceData)).ToDouble(); + return true; + } + break; + case DATA_BINDING_DATA_TYPE_FLOAT: + { + Tizen::Base::Double* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->value = static_cast(const_cast(sourceData)).ToDouble(); + return true; + } + break; + case DATA_BINDING_DATA_TYPE_INTEGER: + { + Tizen::Base::Double* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->value = static_cast(const_cast(sourceData)).ToDouble(); + return true; + } + break; + case DATA_BINDING_DATA_TYPE_LONG: + { + Tizen::Base::Double* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->value = static_cast(const_cast(sourceData)).ToDouble(); + return true; + } + break; + case DATA_BINDING_DATA_TYPE_BOOLEAN: + { + Tizen::Base::Double* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->value = static_cast(const_cast(sourceData)).ToBool() ? 1.0 : 0.0; + return true; + } + break; + default: + { + return false; + } + } + break; + case DATA_BINDING_DATA_TYPE_LONG: + switch (sourceType) // LONG from DOUBLE, FLOAT, INTEGER, LONG, STRING + { + case DATA_BINDING_DATA_TYPE_FLOAT: + { + Tizen::Base::Long* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->value = static_cast(const_cast(sourceData)).ToLong(); + return true; + } + break; + case DATA_BINDING_DATA_TYPE_INTEGER: + { + Tizen::Base::Long* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->value = static_cast(const_cast(sourceData)).ToLong(); + return true; + } + break; + case DATA_BINDING_DATA_TYPE_LONG: + { + Tizen::Base::Long* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->value = static_cast(const_cast(sourceData)).ToLong(); + return true; + } + break; + case DATA_BINDING_DATA_TYPE_BOOLEAN: + { + Tizen::Base::Long* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->value = static_cast(const_cast(sourceData)).ToBool() ? 1 : 0; + return true; + } + break; + default: + { + return false; + } + } + break; + case DATA_BINDING_DATA_TYPE_STRING: + switch (sourceType) // STRING from DOUBLE, FLOAT, INTEGER, LONG, STRING + { + case DATA_BINDING_DATA_TYPE_DOUBLE: + { + Tizen::Base::String* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + *pTarget = static_cast(const_cast(sourceData)).ToString(); + return true; + } + break; + case DATA_BINDING_DATA_TYPE_FLOAT: + { + Tizen::Base::String* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + *pTarget = static_cast(const_cast(sourceData)).ToString(); + return true; + } + break; + case DATA_BINDING_DATA_TYPE_INTEGER: + { + Tizen::Base::String* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + *pTarget = static_cast(const_cast(sourceData)).ToString(); + return true; + } + break; + case DATA_BINDING_DATA_TYPE_LONG: + { + Tizen::Base::String* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + *pTarget = static_cast(const_cast(sourceData)).ToString(); + return true; + } + break; + case DATA_BINDING_DATA_TYPE_STRING: + { + Tizen::Base::String* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + *pTarget = static_cast(const_cast(sourceData)); + return true; + } + break; + case DATA_BINDING_DATA_TYPE_BOOLEAN: + { + Tizen::Base::String* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + *pTarget = static_cast(const_cast(sourceData)).ToString(); + return true; + } + break; + case DATA_BINDING_DATA_TYPE_COLOR: + { + Tizen::Base::String* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->Clear(); + r= pTarget->Append(L"#"); + if(r != E_SUCCESS) + { + return false; + } + wchar_t tempString[] = L"XXXXXXXX"; + swprintf(tempString, (sizeof(tempString) / sizeof(wchar_t)), L"%X",static_cast(const_cast(sourceData)).GetRGB32()); + r= pTarget->Append(tempString); + if(r != E_SUCCESS) + { + return false; + } + return true; + } + break; + case DATA_BINDING_DATA_TYPE_DIMENSION: + { + Tizen::Base::String* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->Clear(); + + String* pString = new (std::nothrow) String(L""); + SysTryReturn(NID_UI, pString, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + + Dimension* pDimension = &static_cast(const_cast(sourceData)); + r = pString->Append(L"width:"); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + r = pString->Append(pDimension->width); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + r = pString->Append(L", height:"); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + r = pString->Append(pDimension->height); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + *pTarget = *pString; + delete pString; + return true; + } + break; + case DATA_BINDING_DATA_TYPE_POINT: + { + Tizen::Base::String* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->Clear(); + + String* pString = new (std::nothrow) String(L""); + SysTryReturn(NID_UI, pString, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + + Point* pPoint = &static_cast(const_cast(sourceData)); + r = pString->Append(L"x:"); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + r = pString->Append(pPoint->x); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + r = pString->Append(L", y:"); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + r = pString->Append(pPoint->y); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + *pTarget = *pString; + delete pString; + return true; + } + break; + case DATA_BINDING_DATA_TYPE_RECTANGLE: + { + Tizen::Base::String* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->Clear(); + + String* pString = new (std::nothrow) String(L""); + SysTryReturn(NID_UI, pString, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + + Rectangle* pRectangle = &static_cast(const_cast(sourceData)); + r = pString->Append(L"x:"); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + r = pString->Append(pRectangle->x); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + r = pString->Append(L", y:"); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + r = pString->Append(pRectangle->y); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + + r = pString->Append(L", width:"); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + r = pString->Append(pRectangle->width); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + + r = pString->Append(L", height:"); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + r = pString->Append(pRectangle->height); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + *pTarget = *pString; + delete pString; + return true; + } + case DATA_BINDING_DATA_TYPE_FLOAT_DIMENSION: + { + Tizen::Base::String* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->Clear(); + + String* pString = new (std::nothrow) String(L""); + SysTryReturn(NID_UI, pString, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + + FloatDimension* pDimension = &static_cast(const_cast(sourceData)); + r = pString->Append(L"width:"); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + r = pString->Append(pDimension->width); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + r = pString->Append(L", height:"); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + r = pString->Append(pDimension->height); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + *pTarget = *pString; + delete pString; + return true; + } + break; + case DATA_BINDING_DATA_TYPE_FLOAT_POINT: + { + Tizen::Base::String* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->Clear(); + + String* pString = new (std::nothrow) String(L""); + SysTryReturn(NID_UI, pString, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + + FloatPoint* pPoint = &static_cast(const_cast(sourceData)); + r = pString->Append(L"x:"); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + r = pString->Append(pPoint->x); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + r = pString->Append(L", y:"); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + r = pString->Append(pPoint->y); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + *pTarget = *pString; + delete pString; + return true; + } + break; + case DATA_BINDING_DATA_TYPE_FLOAT_RECTANGLE: + { + Tizen::Base::String* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->Clear(); + + String* pString = new (std::nothrow) String(L""); + SysTryReturn(NID_UI, pString, false, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + + FloatRectangle* pRectangle = &static_cast(const_cast(sourceData)); + r = pString->Append(L"x:"); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + r = pString->Append(pRectangle->x); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + r = pString->Append(L", y:"); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + r = pString->Append(pRectangle->y); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + r = pString->Append(L", width:"); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + r = pString->Append(pRectangle->width); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + + r = pString->Append(L", height:"); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + r = pString->Append(pRectangle->height); + if(r != E_SUCCESS) + { + delete pString; + return false; + } + *pTarget = *pString; + delete pString; + return true; + } + default: + { + return false; + } + } + break; + case DATA_BINDING_DATA_TYPE_COLOR: + if (sourceType == DATA_BINDING_DATA_TYPE_COLOR) + { + Color* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + *pTarget = static_cast(const_cast(sourceData)); + return true; + } + else if (sourceType == DATA_BINDING_DATA_TYPE_INTEGER) + { + Color* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + *pTarget = static_cast(const_cast(sourceData)).ToInt(); + return true; + } + else + { + return false; + } + break; + case DATA_BINDING_DATA_TYPE_POINT: + switch (sourceType) + { + case DATA_BINDING_DATA_TYPE_POINT: + { + Point* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->SetPosition(static_cast(const_cast(sourceData)).x, static_cast(const_cast(sourceData)).y); + return true; + } + break; + case DATA_BINDING_DATA_TYPE_FLOAT_POINT: + { + Point* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->SetPosition(static_cast(const_cast(sourceData)).x, static_cast(const_cast(sourceData)).y); + return true; + } + break; + case DATA_BINDING_DATA_TYPE_RECTANGLE: + { + Point* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->SetPosition(static_cast(const_cast(sourceData)).x, static_cast(const_cast(sourceData)).y); + return true; + } + break; + case DATA_BINDING_DATA_TYPE_FLOAT_RECTANGLE: + { + Point* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->SetPosition(static_cast(const_cast(sourceData)).x, static_cast(const_cast(sourceData)).y); + return true; + } + break; + default: + return false; + } + break; + case DATA_BINDING_DATA_TYPE_RECTANGLE: + if (sourceType == DATA_BINDING_DATA_TYPE_RECTANGLE) + { + Rectangle* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->SetBounds(static_cast(const_cast(sourceData)).x, static_cast(const_cast(sourceData)).y, static_cast(const_cast(sourceData)).width, static_cast(const_cast(sourceData)).height); + return true; + } + else if (sourceType == DATA_BINDING_DATA_TYPE_FLOAT_RECTANGLE) + { + Rectangle* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->SetBounds(static_cast(const_cast(sourceData)).x, static_cast(const_cast(sourceData)).y, static_cast(const_cast(sourceData)).width, static_cast(const_cast(sourceData)).height); + return true; + } + else + { + return false; + } + break; + case DATA_BINDING_DATA_TYPE_DIMENSION: + switch (sourceType) + { + case DATA_BINDING_DATA_TYPE_DIMENSION: + { + Dimension* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->SetSize(static_cast(const_cast(sourceData)).width, static_cast(const_cast(sourceData)).height); + return true; + } + break; + case DATA_BINDING_DATA_TYPE_FLOAT_DIMENSION: + { + Dimension* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->SetSize(static_cast(const_cast(sourceData)).width, static_cast(const_cast(sourceData)).height); + return true; + } + break; + case DATA_BINDING_DATA_TYPE_RECTANGLE: + { + Dimension* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->SetSize(static_cast(const_cast(sourceData)).width, static_cast(const_cast(sourceData)).height); + return true; + } + break; + case DATA_BINDING_DATA_TYPE_FLOAT_RECTANGLE: + { + Point* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->SetPosition(static_cast(const_cast(sourceData)).x, static_cast(const_cast(sourceData)).y); + return true; + } + break; + default: + return false; + } + break; + case DATA_BINDING_DATA_TYPE_FLOAT_POINT: + switch (sourceType) + { + case DATA_BINDING_DATA_TYPE_POINT: + { + FloatPoint* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->SetPosition(static_cast(const_cast(sourceData)).x, static_cast(const_cast(sourceData)).y); + return true; + } + break; + case DATA_BINDING_DATA_TYPE_FLOAT_POINT: + { + FloatPoint* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->SetPosition(static_cast(const_cast(sourceData)).x, static_cast(const_cast(sourceData)).y); + return true; + } + break; + case DATA_BINDING_DATA_TYPE_RECTANGLE: + { + FloatPoint* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->SetPosition(static_cast(const_cast(sourceData)).x, static_cast(const_cast(sourceData)).y); + return true; + } + break; + case DATA_BINDING_DATA_TYPE_FLOAT_RECTANGLE: + { + FloatPoint* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->SetPosition(static_cast(const_cast(sourceData)).x, static_cast(const_cast(sourceData)).y); + return true; + } + break; + default: + return false; + } + break; + case DATA_BINDING_DATA_TYPE_FLOAT_RECTANGLE: + if (sourceType == DATA_BINDING_DATA_TYPE_RECTANGLE) + { + FloatRectangle* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->SetBounds(static_cast(const_cast(sourceData)).x, static_cast(const_cast(sourceData)).y, static_cast(const_cast(sourceData)).width, static_cast(const_cast(sourceData)).height); + return true; + } + else if (sourceType == DATA_BINDING_DATA_TYPE_FLOAT_RECTANGLE) + { + Rectangle* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->SetBounds(static_cast(const_cast(sourceData)).x, static_cast(const_cast(sourceData)).y, static_cast(const_cast(sourceData)).width, static_cast(const_cast(sourceData)).height); + return true; + } + else + { + return false; + } + break; + case DATA_BINDING_DATA_TYPE_FLOAT_DIMENSION: + switch (sourceType) + { + case DATA_BINDING_DATA_TYPE_DIMENSION: + { + FloatDimension* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->SetSize(static_cast(const_cast(sourceData)).width, static_cast(const_cast(sourceData)).height); + return true; + } + break; + case DATA_BINDING_DATA_TYPE_FLOAT_DIMENSION: + { + FloatDimension* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->SetSize(static_cast(const_cast(sourceData)).width, static_cast(const_cast(sourceData)).height); + return true; + } + break; + case DATA_BINDING_DATA_TYPE_RECTANGLE: + { + FloatDimension* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->SetSize(static_cast(const_cast(sourceData)).width, static_cast(const_cast(sourceData)).height); + return true; + } + break; + case DATA_BINDING_DATA_TYPE_FLOAT_RECTANGLE: + { + FloatPoint* pTarget = dynamic_cast(&destinationData); + if(!pTarget) + { + return false; + } + pTarget->SetPosition(static_cast(const_cast(sourceData)).x, static_cast(const_cast(sourceData)).y); + return true; + } + break; + default: + return false; + } + break; + default: + return false; + } + return true; +} +bool +_DefaultTransformer::IsTransformable(DataBindingDataType sourceType, DataBindingDataType destinationType) +{ + bool returnValue = false; + + switch (destinationType) + { + case DATA_BINDING_DATA_TYPE_INTEGER: + switch (sourceType) // INTEGER from BOOLEAN, DOUBLE, FLOAT, INTEGER, LONG, STRING + { + case DATA_BINDING_DATA_TYPE_BOOLEAN: + //fall through + case DATA_BINDING_DATA_TYPE_FLOAT: + //fall through + case DATA_BINDING_DATA_TYPE_INTEGER: + //fall through + case DATA_BINDING_DATA_TYPE_LONG: + //fall through + case DATA_BINDING_DATA_TYPE_COLOR: + returnValue = true; + break; + default: + break; + } + break; + case DATA_BINDING_DATA_TYPE_FLOAT: + switch (sourceType) // FLOAT from DOUBLE, FLOAT, INTEGER, LONG, STRING + { + case DATA_BINDING_DATA_TYPE_BOOLEAN: + //fall through + case DATA_BINDING_DATA_TYPE_FLOAT: + //fall through + case DATA_BINDING_DATA_TYPE_INTEGER: + //fall through + case DATA_BINDING_DATA_TYPE_LONG: + returnValue = true; + break; + default: + break; + } + break; + + case DATA_BINDING_DATA_TYPE_DOUBLE: + switch (sourceType) // DOUBLE from DOUBLE, FLOAT, INTEGER, LONG, STRING + { + case DATA_BINDING_DATA_TYPE_DOUBLE: + //fall through + case DATA_BINDING_DATA_TYPE_FLOAT: + //fall through + case DATA_BINDING_DATA_TYPE_INTEGER: + //fall through + case DATA_BINDING_DATA_TYPE_LONG: + //fall through + case DATA_BINDING_DATA_TYPE_BOOLEAN: + returnValue = true; + break; + default: + break; + } + break; + + case DATA_BINDING_DATA_TYPE_LONG: + switch (sourceType) // LONG from DOUBLE, FLOAT, INTEGER, LONG, STRING + { + case DATA_BINDING_DATA_TYPE_BOOLEAN: + //fall through + case DATA_BINDING_DATA_TYPE_FLOAT: + //fall through + case DATA_BINDING_DATA_TYPE_INTEGER: + //fall through + case DATA_BINDING_DATA_TYPE_LONG: + returnValue = true; + break; + default: + break; + } + break; + + case DATA_BINDING_DATA_TYPE_STRING: + switch (sourceType) // STRING from all type + { + case DATA_BINDING_DATA_TYPE_BOOLEAN: + //fall through + case DATA_BINDING_DATA_TYPE_COLOR: + //fall through + case DATA_BINDING_DATA_TYPE_DIMENSION: + //fall through + case DATA_BINDING_DATA_TYPE_DOUBLE: + //fall through + case DATA_BINDING_DATA_TYPE_FLOAT: + //fall through + case DATA_BINDING_DATA_TYPE_INTEGER: + //fall through + case DATA_BINDING_DATA_TYPE_LONG: + //fall through + case DATA_BINDING_DATA_TYPE_POINT: + //fall through + case DATA_BINDING_DATA_TYPE_RECTANGLE: + //fall through + case DATA_BINDING_DATA_TYPE_STRING: + returnValue = true; + break; + default: + break; + } + break; + + case DATA_BINDING_DATA_TYPE_COLOR: + switch (sourceType) // COLOR from INTEGER, COLOR + { + case DATA_BINDING_DATA_TYPE_COLOR: + //fall through + case DATA_BINDING_DATA_TYPE_INTEGER: + returnValue = true; + break; + default: + break; + } + break; + + case DATA_BINDING_DATA_TYPE_POINT: + switch (sourceType) // POINT from POINT, RECTANGLE + { + case DATA_BINDING_DATA_TYPE_FLOAT_RECTANGLE: + //fall through + case DATA_BINDING_DATA_TYPE_FLOAT_POINT: + //fall through + case DATA_BINDING_DATA_TYPE_POINT: + //fall through + case DATA_BINDING_DATA_TYPE_RECTANGLE: + returnValue = true; + break; + default: + break; + } + break; + + case DATA_BINDING_DATA_TYPE_RECTANGLE: + switch (sourceType) // RECTANGLE from FLOATRECTANGLE, RECTANGLE + { + case DATA_BINDING_DATA_TYPE_FLOAT_RECTANGLE: + //fall through + case DATA_BINDING_DATA_TYPE_RECTANGLE: + returnValue = true; + break; + + default: + break; + } + break; + case DATA_BINDING_DATA_TYPE_DIMENSION: + switch (sourceType) // POINT from POINT, RECTANGLE + { + case DATA_BINDING_DATA_TYPE_FLOAT_RECTANGLE: + //fall through + case DATA_BINDING_DATA_TYPE_FLOAT_DIMENSION: + //fall through + case DATA_BINDING_DATA_TYPE_DIMENSION: + //fall through + case DATA_BINDING_DATA_TYPE_RECTANGLE: + returnValue = true; + break; + default: + break; + } + break; + case DATA_BINDING_DATA_TYPE_FLOAT_POINT: + switch (sourceType) // POINT from POINT, RECTANGLE + { + case DATA_BINDING_DATA_TYPE_FLOAT_RECTANGLE: + //fall through + case DATA_BINDING_DATA_TYPE_FLOAT_POINT: + //fall through + case DATA_BINDING_DATA_TYPE_POINT: + //fall through + case DATA_BINDING_DATA_TYPE_RECTANGLE: + returnValue = true; + break; + default: + break; + } + break; + case DATA_BINDING_DATA_TYPE_FLOAT_RECTANGLE: + switch (sourceType) // RECTANGLE from FLOATRECTANGLE, RECTANGLE + { + case DATA_BINDING_DATA_TYPE_FLOAT_RECTANGLE: + //fall through + case DATA_BINDING_DATA_TYPE_RECTANGLE: + returnValue = true; + break; + + default: + break; + } + break; + case DATA_BINDING_DATA_TYPE_FLOAT_DIMENSION: + switch (sourceType) // POINT from POINT, RECTANGLE + { + case DATA_BINDING_DATA_TYPE_FLOAT_RECTANGLE: + //fall through + case DATA_BINDING_DATA_TYPE_FLOAT_DIMENSION: + //fall through + case DATA_BINDING_DATA_TYPE_DIMENSION: + //fall through + case DATA_BINDING_DATA_TYPE_RECTANGLE: + returnValue = true; + break; + default: + break; + } + default: + break; + } + return returnValue; +} + + +bool +IsTypeSupported(VariantType variantType) +{ + bool returnValue = false; + + switch (variantType) + { + case VARIANT_TYPE_INT: + //fall through + case VARIANT_TYPE_BOOL: + //fall through + case VARIANT_TYPE_FLOAT: + //fall through + case VARIANT_TYPE_DOUBLE: + //fall through + case VARIANT_TYPE_LONG: + //fall through + case VARIANT_TYPE_STRING: + //fall through + case VARIANT_TYPE_COLOR: + //fall through + case VARIANT_TYPE_POINT: + //fall through + case VARIANT_TYPE_RECTANGLE: + //fall through + case VARIANT_TYPE_FLOAT_DIMENSION: + //fall through + case VARIANT_TYPE_FLOAT_POINT: + //fall through + case VARIANT_TYPE_FLOAT_RECTANGLE: + //fall through + case VARIANT_TYPE_DIMENSION: + returnValue = true; + break; + default: + break; + } + return returnValue; +} +DataBindingDataType +ConvertVariantTypeToDataBindingDataType(VariantType variantType) +{ + DataBindingDataType dataType = DATA_BINDING_DATA_TYPE_BOOLEAN; + + switch (variantType) + { + case VARIANT_TYPE_INT: + dataType = DATA_BINDING_DATA_TYPE_INTEGER; + break; + + case VARIANT_TYPE_BOOL: + dataType = DATA_BINDING_DATA_TYPE_BOOLEAN; + break; + + case VARIANT_TYPE_FLOAT: + dataType = DATA_BINDING_DATA_TYPE_FLOAT; + break; + + case VARIANT_TYPE_DOUBLE: + dataType = DATA_BINDING_DATA_TYPE_DOUBLE; + break; + + case VARIANT_TYPE_LONG: + dataType = DATA_BINDING_DATA_TYPE_LONG; + break; + + case VARIANT_TYPE_STRING: + dataType = DATA_BINDING_DATA_TYPE_STRING; + break; + + case VARIANT_TYPE_COLOR: + dataType = DATA_BINDING_DATA_TYPE_COLOR; + break; + + case VARIANT_TYPE_POINT: + dataType = DATA_BINDING_DATA_TYPE_POINT; + break; + + case VARIANT_TYPE_RECTANGLE: + dataType = DATA_BINDING_DATA_TYPE_RECTANGLE; + break; + + case VARIANT_TYPE_DIMENSION: + dataType = DATA_BINDING_DATA_TYPE_DIMENSION; + break; + + case VARIANT_TYPE_FLOAT_DIMENSION: + dataType = DATA_BINDING_DATA_TYPE_FLOAT_DIMENSION; + break; + + case VARIANT_TYPE_FLOAT_POINT: + dataType = DATA_BINDING_DATA_TYPE_FLOAT_POINT; + break; + + case VARIANT_TYPE_FLOAT_RECTANGLE: + dataType = DATA_BINDING_DATA_TYPE_FLOAT_RECTANGLE; + break; + + default: + SysAssertf(0, "Not Support Type"); + break; + } + return dataType; +} + +class _DataBindingPropertyChangeEventListner + : public _IPropertyChangeEventListener + , virtual public Tizen::Base::Runtime::IEventListener +{ +public: + _DataBindingPropertyChangeEventListner(const _DataBinding& dataBinding) + { + __pDataBinding = &const_cast<_DataBinding&>(dataBinding); + }; + virtual ~_DataBindingPropertyChangeEventListner(void){}; + virtual void OnPropertyChanging(_PropertyBase& source, const String& name, const Variant& oldValue, const Variant& newValue){}; + virtual void OnPropertyChanged(_PropertyBase& source, const String& name, const Variant& oldValue, const Variant& newValue) + { + const Variant variant = source.GetProperty(name); + if (variant.IsEmpty() || oldValue == newValue) + { + return; + } + if (name == __pDataBinding->GetPropertyName()) + { + __pDataBinding->Update(DATA_BINDING_DESTINATION_TYPE_SOURCE); + } + }; +private: + _DataBinding* __pDataBinding; +}; //class _DataBindingPropertyChangeEventListner + +_DefaultTransformer defaultTransformer; +} +namespace Tizen { namespace Ui +{ +_DataBinding::_DataBinding(void) + : __controlHandle() + , __bindingId(L"") + , __propertyName(L"") + , __pDataSource(null) + , __sourceType(DATA_BINDING_DATA_TYPE_BOOLEAN) + , __targetType(DATA_BINDING_DATA_TYPE_BOOLEAN) + , __flow(DATA_BINDING_FLOW_ONE_WAY) + , __trigger(DATA_BINDING_TRIGGER_EXPLICIT) + , __pListener(null) + , __pValidator(null) + , __pTransformer(null) + , __pPropertyChangeEventListener(null) +{ +} +_DataBinding::~_DataBinding(void) +{ + if (__pPropertyChangeEventListener) + { + _Control* pControl = _ControlManager::GetInstance()->GetObject(__controlHandle); + if (pControl) + { + pControl->RemovePropertyChangeEventListener(*__pPropertyChangeEventListener); + } + delete __pPropertyChangeEventListener; + __pPropertyChangeEventListener = null; + } +} + +result +_DataBinding::Construct(const _Control& control, const String& bindingId, const String& propertyName + , Object& dataSource, DataBindingDataType sourceType, DataBindingFlow flow, DataBindingTrigger trigger + , const IDataBindingListener* pListener, const IDataBindingDataValidator* pValidator, const IDataBindingDataTransformer* pTransformer) +{ + __controlHandle = control.GetHandle(); + _Control* pControl = _ControlManager::GetInstance()->GetObject(__controlHandle); + SysTryReturn(NID_UI, pControl, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] The control that was binded is gone."); + __propertyName = propertyName; + __pDataSource = &dataSource; + __sourceType = sourceType; + __flow = flow; + __trigger = trigger; + __pListener = const_cast(pListener); + __pValidator = const_cast(pValidator); + + if (pTransformer != null) + __pTransformer = const_cast(pTransformer); + else + __pTransformer = &::defaultTransformer; + + Variant variant = pControl->GetProperty(propertyName); + + SysTryReturn(NID_UI, GetLastResult() != E_KEY_NOT_FOUND, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] Property is not found."); + + SysTryReturn(NID_UI, ::IsTypeSupported(variant.GetType()), E_UNSUPPORTED_FORMAT, E_UNSUPPORTED_FORMAT + , "[E_UNSUPPORTED_FORMAT] Property type is unsupported type."); + + __targetType = ::ConvertVariantTypeToDataBindingDataType(variant.GetType()); + + switch(__flow) + { + case DATA_BINDING_FLOW_ONE_WAY: + SysTryReturn(NID_UI, __pTransformer->IsSourceToTargetTransformable(bindingId, __sourceType, __targetType) + , E_UNSUPPORTED_FORMAT, E_UNSUPPORTED_FORMAT, "[E_UNSUPPORTED_FORMAT] transformer can not transform source type to target type."); + break; + case DATA_BINDING_FLOW_ONE_WAY_TO_SOURCE: + SysTryReturn(NID_UI, __pTransformer->IsTargetToSourceTransformable(bindingId, __targetType, __sourceType) + , E_UNSUPPORTED_FORMAT, E_UNSUPPORTED_FORMAT, "[E_UNSUPPORTED_FORMAT] transformer can not transform target type to source type."); + break; + case DATA_BINDING_FLOW_TWO_WAY: + SysTryReturn(NID_UI, __pTransformer->IsSourceToTargetTransformable(bindingId, __sourceType, __targetType) + && __pTransformer->IsTargetToSourceTransformable(bindingId, __targetType, __sourceType) + , E_UNSUPPORTED_FORMAT, E_UNSUPPORTED_FORMAT, "[E_UNSUPPORTED_FORMAT] transformer can not transform both target type and source type."); + break; + default: + SysAssert(0); + } + + if (trigger == DATA_BINDING_TRIGGER_IMMEDIATE) + { + __pPropertyChangeEventListener = new (std::nothrow) ::_DataBindingPropertyChangeEventListner(*this); + SysTryReturn(NID_UI, __pPropertyChangeEventListener, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + pControl->AddPropertyChangeEventListener(*__pPropertyChangeEventListener); + } + return E_SUCCESS; +} + +result +_DataBinding::Update(DataBindingDestinationType destinationType) +{ + bool valid = true; + Object* pTransformedObject = null; + result r = E_SYSTEM; + Object* pOriginObject = null; + _Control* pControl = _ControlManager::GetInstance()->GetObject(__controlHandle); + SysTryCatch(NID_UI, pControl, , E_SYSTEM, "[E_SYSTEM] The control that was binded is gone."); + + if (destinationType == DATA_BINDING_DESTINATION_TYPE_SOURCE) + { + DataBindingDataType originType = __targetType; + Variant variant = pControl->GetProperty(__propertyName); + DataBindingDataType transformedType = __sourceType; + + switch (variant.GetType()) + { + case VARIANT_TYPE_INT: + pOriginObject = new (std::nothrow) Integer(variant.ToInt()); + SysTryReturn(NID_UI, pOriginObject, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + break; + + case VARIANT_TYPE_BOOL: + pOriginObject = new (std::nothrow) Boolean(variant.ToBool()); + SysTryReturn(NID_UI, pOriginObject, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + break; + + case VARIANT_TYPE_FLOAT: + pOriginObject = new (std::nothrow) Float(variant.ToFloat()); + SysTryReturn(NID_UI, pOriginObject, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + break; + + case VARIANT_TYPE_DOUBLE: + pOriginObject = new (std::nothrow) Double(variant.ToDouble()); + SysTryReturn(NID_UI, pOriginObject, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + break; + + case VARIANT_TYPE_LONG: + pOriginObject = new (std::nothrow) Long(variant.ToLong()); + SysTryReturn(NID_UI, pOriginObject, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + break; + + case VARIANT_TYPE_STRING: + pOriginObject = new (std::nothrow) String(variant.ToString()); + SysTryReturn(NID_UI, pOriginObject, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + break; + + case VARIANT_TYPE_COLOR: + pOriginObject = new (std::nothrow) Color(variant.ToColor()); + SysTryReturn(NID_UI, pOriginObject, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + break; + + case VARIANT_TYPE_POINT: + pOriginObject = new (std::nothrow) Point(variant.ToPoint().x, variant.ToPoint().y); + SysTryReturn(NID_UI, pOriginObject, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + break; + + case VARIANT_TYPE_RECTANGLE: + pOriginObject = new (std::nothrow) Rectangle(variant.ToRectangle().x, variant.ToRectangle().y, variant.ToRectangle().width, variant.ToRectangle().height); + SysTryReturn(NID_UI, pOriginObject, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + break; + + case VARIANT_TYPE_DIMENSION: + pOriginObject = new (std::nothrow) Dimension(variant.ToDimension().width, variant.ToDimension().height); + SysTryReturn(NID_UI, pOriginObject, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + break; + case VARIANT_TYPE_FLOAT_POINT: + pOriginObject = new (std::nothrow) FloatPoint(variant.ToFloatPoint()); + SysTryReturn(NID_UI, pOriginObject, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + break; + case VARIANT_TYPE_FLOAT_RECTANGLE: + pOriginObject = new (std::nothrow) FloatRectangle(variant.ToFloatRectangle()); + SysTryReturn(NID_UI, pOriginObject, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + break; + case VARIANT_TYPE_FLOAT_DIMENSION: + pOriginObject = new (std::nothrow) FloatDimension(variant.ToFloatDimension()); + SysTryReturn(NID_UI, pOriginObject, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + break; + + + + default: + SysTryCatch(NID_UI, pControl, , E_SYSTEM, "[E_SYSTEM] The control that was binded is gone."); + } + + switch(__sourceType) + { + case DATA_BINDING_DATA_TYPE_BOOLEAN: + { + pTransformedObject = new (std::nothrow) Boolean(false); + SysTryReturn(NID_UI, pTransformedObject, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + break; + } + case DATA_BINDING_DATA_TYPE_COLOR: + { + pTransformedObject = new (std::nothrow) Color; + SysTryReturn(NID_UI, pTransformedObject, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + break; + } + case DATA_BINDING_DATA_TYPE_DIMENSION: + { + pTransformedObject = new (std::nothrow) Dimension; + SysTryReturn(NID_UI, pTransformedObject, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + break; + } + case DATA_BINDING_DATA_TYPE_DOUBLE: + { + pTransformedObject = new (std::nothrow) Double; + SysTryReturn(NID_UI, pTransformedObject, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + break; + } + case DATA_BINDING_DATA_TYPE_FLOAT: + { + pTransformedObject = new (std::nothrow) Float; + SysTryReturn(NID_UI, pTransformedObject, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + break; + } + case DATA_BINDING_DATA_TYPE_INTEGER: + { + pTransformedObject = new (std::nothrow) Integer; + SysTryReturn(NID_UI, pTransformedObject, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + break; + } + case DATA_BINDING_DATA_TYPE_LONG: + { + pTransformedObject = new (std::nothrow) Long; + SysTryReturn(NID_UI, pTransformedObject, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + break; + } + case DATA_BINDING_DATA_TYPE_POINT: + { + pTransformedObject = new (std::nothrow) Point; + SysTryReturn(NID_UI, pTransformedObject, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + break; + } + case DATA_BINDING_DATA_TYPE_RECTANGLE: + { + pTransformedObject = new (std::nothrow) Rectangle; + SysTryReturn(NID_UI, pTransformedObject, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + break; + } + case DATA_BINDING_DATA_TYPE_STRING: + { + pTransformedObject = new (std::nothrow) String; + SysTryReturn(NID_UI, pTransformedObject, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + break; + } + case DATA_BINDING_DATA_TYPE_FLOAT_POINT: + { + pTransformedObject = new (std::nothrow) FloatPoint; + SysTryReturn(NID_UI, pTransformedObject, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + break; + } + case DATA_BINDING_DATA_TYPE_FLOAT_RECTANGLE: + { + pTransformedObject = new (std::nothrow) FloatRectangle; + SysTryReturn(NID_UI, pTransformedObject, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + break; + } + case DATA_BINDING_DATA_TYPE_FLOAT_DIMENSION: + { + pTransformedObject = new (std::nothrow) FloatDimension; + SysTryReturn(NID_UI, pTransformedObject, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + break; + } + default: + SysTryCatch(NID_UI, false, , E_SYSTEM, "[E_SYSTEM] System Error"); + } + SysTryCatch(NID_UI, pTransformedObject, , E_SYSTEM, "[E_SYSTEM] data transfer is failed by memory shortage."); + SysTryCatch(NID_UI, __pTransformer->TransformTargetToSource(__bindingId, originType, *pOriginObject, transformedType, *pTransformedObject) == true, , E_SYSTEM, "[E_SYSTEM] data transfer is failed by transformer."); + + if (__pValidator != null) + { + valid = __pValidator->ValidateDataToSource(__bindingId, *pTransformedObject); + } + if (valid == false) + { + if (__pListener != null) + { + __pListener->OnDataBindingValidationFailed(__bindingId, pControl->GetName(), __propertyName, destinationType); + } + SysTryCatch(NID_UI, 0, , E_SYSTEM, "[E_SYSTEM] data transfer is failed by validator."); + } + + switch (variant.GetType()) + { + + case VARIANT_TYPE_INT: + static_cast(*__pDataSource) = static_cast(pTransformedObject)->ToInt(); + break; + + case VARIANT_TYPE_BOOL: + static_cast(*__pDataSource) = static_cast(pTransformedObject)->ToBool(); + break; + + case VARIANT_TYPE_FLOAT: + static_cast(*__pDataSource) = static_cast(pTransformedObject)->ToFloat(); + break; + + case VARIANT_TYPE_DOUBLE: + static_cast(*__pDataSource) = static_cast(pTransformedObject)->ToDouble(); + break; + + case VARIANT_TYPE_LONG: + static_cast(*__pDataSource) = static_cast(pTransformedObject)->ToLong(); + break; + + case VARIANT_TYPE_STRING: + static_cast(*__pDataSource) = static_cast(*pTransformedObject); + break; + + case VARIANT_TYPE_COLOR: + static_cast(*__pDataSource) = static_cast(*pTransformedObject); + break; + + case VARIANT_TYPE_POINT: + static_cast(__pDataSource)->SetPosition(static_cast(*pTransformedObject)); + break; + + case VARIANT_TYPE_RECTANGLE: + static_cast(__pDataSource)->SetBounds(static_cast(*pTransformedObject).x, static_cast(*pTransformedObject).y, static_cast(*pTransformedObject).width, static_cast(*pTransformedObject).height); + break; + + case VARIANT_TYPE_DIMENSION: + static_cast(__pDataSource)->SetSize(static_cast(*pTransformedObject).width, static_cast(*pTransformedObject).height); + break; + + case VARIANT_TYPE_FLOAT_POINT: + static_cast(__pDataSource)->SetPosition(static_cast(*pTransformedObject).x, static_cast(*pTransformedObject).y); + break; + + case VARIANT_TYPE_FLOAT_RECTANGLE: + static_cast(__pDataSource)->SetBounds(static_cast(*pTransformedObject).x, static_cast(*pTransformedObject).y, static_cast(*pTransformedObject).width, static_cast(*pTransformedObject).height); + break; + + case VARIANT_TYPE_FLOAT_DIMENSION: + static_cast(__pDataSource)->SetSize(static_cast(*pTransformedObject).width, static_cast(*pTransformedObject).height); + break; + default: + break; + } + + if (__pListener != null) + { + __pListener->OnDataBindingSourceUpdated(__bindingId, pControl->GetName(), __propertyName); + } + r = E_SUCCESS; + } + else // DATA_BINDING_DESTINATION_TYPE_TARGET + { + DataBindingDataType originType = __sourceType; + Object* pOriginObject = __pDataSource; + DataBindingDataType transformedType = __targetType; + + switch(__targetType) + { + case DATA_BINDING_DATA_TYPE_BOOLEAN: + { + pTransformedObject = new (std::nothrow) Boolean(false); + SysTryReturn(NID_UI, pTransformedObject, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + break; + } + case DATA_BINDING_DATA_TYPE_COLOR: + { + pTransformedObject = new (std::nothrow) Color; + SysTryReturn(NID_UI, pTransformedObject, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + break; + } + case DATA_BINDING_DATA_TYPE_DIMENSION: + { + pTransformedObject = new (std::nothrow) Dimension; + SysTryReturn(NID_UI, pTransformedObject, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + break; + } + case DATA_BINDING_DATA_TYPE_DOUBLE: + { + pTransformedObject = new (std::nothrow) Double; + SysTryReturn(NID_UI, pTransformedObject, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + break; + } + case DATA_BINDING_DATA_TYPE_FLOAT: + { + pTransformedObject = new (std::nothrow) Float; + SysTryReturn(NID_UI, pTransformedObject, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + break; + } + case DATA_BINDING_DATA_TYPE_INTEGER: + { + pTransformedObject = new (std::nothrow) Integer; + SysTryReturn(NID_UI, pTransformedObject, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + break; + } + case DATA_BINDING_DATA_TYPE_LONG: + { + pTransformedObject = new (std::nothrow) Long; + SysTryReturn(NID_UI, pTransformedObject, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + break; + } + case DATA_BINDING_DATA_TYPE_POINT: + { + pTransformedObject = new (std::nothrow) Point; + SysTryReturn(NID_UI, pTransformedObject, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + break; + } + case DATA_BINDING_DATA_TYPE_RECTANGLE: + { + pTransformedObject = new (std::nothrow) Rectangle; + SysTryReturn(NID_UI, pTransformedObject, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + break; + } + case DATA_BINDING_DATA_TYPE_STRING: + { + pTransformedObject = new (std::nothrow) String; + SysTryReturn(NID_UI, pTransformedObject, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + break; + } + case DATA_BINDING_DATA_TYPE_FLOAT_POINT: + { + pTransformedObject = new (std::nothrow) FloatPoint; + SysTryReturn(NID_UI, pTransformedObject, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + break; + } + case DATA_BINDING_DATA_TYPE_FLOAT_RECTANGLE: + { + pTransformedObject = new (std::nothrow) FloatRectangle; + SysTryReturn(NID_UI, pTransformedObject, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + break; + } + case DATA_BINDING_DATA_TYPE_FLOAT_DIMENSION: + { + pTransformedObject = new (std::nothrow) FloatDimension; + SysTryReturn(NID_UI, pTransformedObject, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation is failed."); + break; + } + default: + SysTryCatch(NID_UI, false, , E_SYSTEM, "[E_SYSTEM] System Error"); + } + SysTryCatch(NID_UI, pTransformedObject, , E_SYSTEM, "[E_SYSTEM] data transfer is failed by memory shortage."); + SysTryCatch(NID_UI, __pTransformer->TransformSourceToTarget(__bindingId, originType, *pOriginObject, transformedType, *pTransformedObject) == true, , E_SYSTEM, "[E_SYSTEM] data transfer is failed by transformer."); + + if (__pValidator != null) + { + valid = __pValidator->ValidateDataToTarget(__bindingId, *pTransformedObject); + } + if (valid == false) + { + if (__pListener != null) + { + __pListener->OnDataBindingValidationFailed(__bindingId, pControl->GetName(), __propertyName, destinationType); + } + SysTryCatch(NID_UI, 0, , E_SYSTEM, "[E_SYSTEM] data transfer is failed by validator."); + } + else + { + Variant variant; + switch (transformedType) + { + case DATA_BINDING_DATA_TYPE_BOOLEAN: + variant = static_cast(pTransformedObject)->ToBool(); + break; + + case DATA_BINDING_DATA_TYPE_COLOR: + variant = *static_cast(pTransformedObject); + break; + + case DATA_BINDING_DATA_TYPE_DIMENSION: + variant = *static_cast(pTransformedObject); + break; + + case DATA_BINDING_DATA_TYPE_DOUBLE: + variant = static_cast( pTransformedObject)->ToDouble(); + break; + + case DATA_BINDING_DATA_TYPE_FLOAT: + variant = static_cast(pTransformedObject)->ToFloat(); + break; + + case DATA_BINDING_DATA_TYPE_INTEGER: + variant = static_cast(pTransformedObject)->ToInt(); + break; + + case DATA_BINDING_DATA_TYPE_LONG: + variant = static_cast(pTransformedObject)->ToLong(); + break; + + case DATA_BINDING_DATA_TYPE_POINT: + variant = *static_cast(pTransformedObject); + break; + + case DATA_BINDING_DATA_TYPE_RECTANGLE: + variant = *static_cast(pTransformedObject); + break; + + case DATA_BINDING_DATA_TYPE_STRING: + variant = *static_cast(pTransformedObject); + break; + + case DATA_BINDING_DATA_TYPE_FLOAT_POINT: + variant = *static_cast(pTransformedObject); + break; + + case DATA_BINDING_DATA_TYPE_FLOAT_RECTANGLE: + variant = *static_cast(pTransformedObject); + break; + + case DATA_BINDING_DATA_TYPE_FLOAT_DIMENSION: + variant = *static_cast(pTransformedObject); + break; + default: + goto CATCH; + } + pControl->SetProperty(__propertyName, variant); + if (__pListener != null) + { + __pListener->OnDataBindingTargetUpdated(__bindingId, pControl->GetName(), __propertyName); + } + } + r = E_SUCCESS; + } +CATCH: + delete pOriginObject; + delete pTransformedObject; + return r; +} +result +_DataBinding::SetDataBindingListener(const IDataBindingListener* pListener) +{ + __pListener = const_cast(pListener); + return E_SUCCESS; +} +_ControlHandle +_DataBinding::Get_ControlHandle(void) const +{ + return __controlHandle; +} +String +_DataBinding::GetPropertyName(void) const +{ + return __propertyName; +} +DataBindingDataType +_DataBinding::GetSourceDataType(void) const +{ + return __sourceType; +} +DataBindingDataType +_DataBinding::GetTargetDataType(void) const +{ + return __targetType; +} +DataBindingFlow +_DataBinding::GetDataFlow(void) const +{ + return __flow; +} +DataBindingTrigger +_DataBinding::GetTrigger(void) const +{ + return __trigger; +} + +}} // Tizen::Ui diff --git a/src/ui/FUi_DataBinding.h b/src/ui/FUi_DataBinding.h new file mode 100644 index 0000000..1efa44b --- /dev/null +++ b/src/ui/FUi_DataBinding.h @@ -0,0 +1,88 @@ +// +// 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_DataBinding.h + * @brief This is the header file for the _DataBinding class. + * + * This header file contains the declarations of the _DataBinding class. + */ +#ifndef _FUI_INTERNAL_DATA_BINDING_H_ +#define _FUI_INTERNAL_DATA_BINDING_H_ + +#include +#include +#include "FUi_ControlManager.h" + +namespace Tizen { namespace Ui +{ + +class Variant; +class IDataBindingListener; +class IDataBindingDataValidator; +class IDataBindingDataTransformer; +class _Control; +class _IPropertyChangeEventListener; + +class _DataBinding +{ +public: +// Lifecycle + ~_DataBinding(void); + result Construct(const _Control& control, const Tizen::Base::String& bindingId, const Tizen::Base::String& propertyName + , Tizen::Base::Object& dataSource, DataBindingDataType sourceType, DataBindingFlow flow, DataBindingTrigger trigger + , const IDataBindingListener* pListener, const IDataBindingDataValidator* pValidator, const IDataBindingDataTransformer* pTransformer); + +// Operations + result Update(DataBindingDestinationType destType); + result SetDataBindingListener(const IDataBindingListener* pListener); + +// Accessor + _ControlHandle Get_ControlHandle(void) const; + Tizen::Base::String GetPropertyName(void) const; + DataBindingDataType GetSourceDataType(void) const; + DataBindingDataType GetTargetDataType(void) const; + DataBindingFlow GetDataFlow(void) const; + DataBindingTrigger GetTrigger(void) const; + +// Lifecycle +private: + _DataBinding(void); + _DataBinding(const _DataBinding& rhs); + _DataBinding& operator =(const _DataBinding& rhs); + +// Attributes +private: + _ControlHandle __controlHandle; + Tizen::Base::String __bindingId; + Tizen::Base::String __propertyName; + Tizen::Base::Object* __pDataSource; + DataBindingDataType __sourceType; + DataBindingDataType __targetType; + DataBindingFlow __flow; + DataBindingTrigger __trigger; + IDataBindingListener* __pListener; + IDataBindingDataValidator* __pValidator; + IDataBindingDataTransformer* __pTransformer; + _IPropertyChangeEventListener* __pPropertyChangeEventListener; + +// Friend Class Declaration + friend class _DataBindingContext; +}; //class _DataBinding + +}} //Tizen::Ui + +#endif // _FUI_INTERNAL_DATA_BINDING_H_ diff --git a/src/ui/FUi_DataBindingContext.cpp b/src/ui/FUi_DataBindingContext.cpp new file mode 100644 index 0000000..0d5bcb0 --- /dev/null +++ b/src/ui/FUi_DataBindingContext.cpp @@ -0,0 +1,241 @@ +// +// 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_DataBindingContext.cpp + * @brief This is the implementation for the _DataBindingContext class. + */ + +#include +#include +#include +#include +#include "FUi_Control.h" +#include "FUi_DataBindingContext.h" +#include "FUi_DataBinding.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; + +namespace { +class _DataBindingHashCodeProvider + : public IHashCodeProviderT +{ +public: + _DataBindingHashCodeProvider(void) {} + virtual ~_DataBindingHashCodeProvider(void) {} + + virtual int GetHashCode(const String& obj) const + { + return obj.GetHashCode(); + } +}; + +class _DataBindingComparer + : public IComparerT +{ +public: + _DataBindingComparer(void) {} + virtual ~_DataBindingComparer(void) {} + virtual result Compare(const String& obj1, const String& obj2, int& cmp) const + { + if (obj1 == obj2) + { + cmp = 0; + return E_SUCCESS; + } + else + { + cmp = -1; + return E_INVALID_ARG; + } + } +}; +} + +namespace Tizen { namespace Ui +{ + +_DataBindingContext::_DataBindingContext(const _Control& control) + : __pControl(null) + , __pProvider(null) + , __pComparer(null) + , __map() +{ + result r = E_SYSTEM; + __pControl = const_cast <_Control*>(&control); + __pProvider = new _DataBindingHashCodeProvider; + SysTryReturnVoidResult(NID_UI, __pProvider, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation for _DataBinding is failed."); + + __pComparer = new _DataBindingComparer; + SysTryReturnVoidResult(NID_UI, __pComparer, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation for _DataBinding is failed."); + + r = __map.Construct(0, 0.0, *__pProvider, *__pComparer); + SetLastResult(r); +} + +_DataBindingContext::~_DataBindingContext(void) +{ + UnbindAll(); + + delete __pProvider; + __pProvider = null; + delete __pComparer; + __pComparer = null; +} + +_Control* +_DataBindingContext::GetContextOwner(void) const +{ + return __pControl; +} +result +_DataBindingContext::Bind(_Control& control, const String& bindingId, const String& controlName, + const String& propertyName, Object& dataSource, + DataBindingDataType sourceType, DataBindingFlow flow, + DataBindingTrigger trigger, const IDataBindingListener* pListener, + const IDataBindingDataValidator* pValidator, + const IDataBindingDataTransformer* pTransformer) +{ + SysTryReturn(NID_UI, + propertyName.GetLength() > 0, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, + "[E_OBJ_NOT_FOUND] propertyName is too short(=0)."); + SysTryReturn(NID_UI, !((flow == DATA_BINDING_FLOW_ONE_WAY || + flow == DATA_BINDING_FLOW_TWO_WAY) && + trigger == DATA_BINDING_TRIGGER_IMMEDIATE), + E_UNSUPPORTED_OPERATION, E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] Flow %d and trigger %d is not supported.", + flow, trigger); + + result r = E_SUCCESS; + + _DataBinding* pDataBinding = new (std::nothrow) _DataBinding; + SysTryReturn(NID_UI, pDataBinding, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation for _DataBinding is failed."); + + r = pDataBinding->Construct(control, bindingId, propertyName, dataSource, sourceType, flow, trigger, pListener, pValidator, + pTransformer); + SysTryCatch(NID_UI, r == E_SUCCESS, r = E_SYSTEM, r, "[E_SYSTEM] adding data binding is failed."); + + r = __map.Add(bindingId, pDataBinding); + SysTryCatch(NID_UI, r == E_SUCCESS, r = E_SYSTEM, r, "[E_SYSTEM] adding data binding is failed."); + + return E_SUCCESS; + +CATCH: + delete pDataBinding; + return r; + +} +result +_DataBindingContext::SetDataBindingEventListener(const String& bindingId, const IDataBindingListener* pListener) +{ + result r = E_SUCCESS; + _DataBinding* pDataBinding = null; + r = __map.GetValue(const_cast(bindingId), pDataBinding); + SysTryReturn(NID_UI, r == E_SUCCESS, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The given binding ID is not registered."); + + return pDataBinding->SetDataBindingListener(pListener); +} +result +_DataBindingContext::UnbindAll(void) +{ + result r = E_SUCCESS; + MapEntryT currentEntry; + IEnumeratorT >* pMapEnumerator = __map.GetMapEnumeratorN(); + + SysTryReturn(NID_UI, pMapEnumerator, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Getting enumerator is failed."); + + while ((pMapEnumerator->MoveNext() == E_SUCCESS)) + { + r = pMapEnumerator->GetCurrent(currentEntry); + SysTryCatch(NID_UI, r == E_SUCCESS, r = E_SYSTEM, r, "[E_SYSTEM] removing data binding is failed."); + + _DataBinding* pBinding = currentEntry.GetValue(); + SysTryCatch(NID_UI, pBinding, r = E_SYSTEM, r, "[E_SYSTEM] UpdateAllBindings is failed."); + delete pBinding; + } + delete pMapEnumerator; + __map.RemoveAll(); + return r; +CATCH: + delete pMapEnumerator; + return r; +} +result +_DataBindingContext::Unbind(const String& bindingId) +{ + result r = E_SYSTEM; + _DataBinding* pDataBinding = null; + r = __map.GetValue(const_cast(bindingId), pDataBinding); + SysTryReturn(NID_UI, r == E_SUCCESS && pDataBinding, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The given binding ID is not registered."); + delete pDataBinding; + __map.Remove(const_cast(bindingId)); + return r; +} +result +_DataBindingContext::UpdateAllBindings(DataBindingDestinationType destinationType) +{ + result r = E_SUCCESS; + IEnumeratorT >* pMapEnumerator = __map.GetMapEnumeratorN(); + SysTryReturn(NID_UI, pMapEnumerator, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Getting enumerator is failed."); + MapEntryT currentEntry; + + while (pMapEnumerator->MoveNext() == E_SUCCESS) + { + r = pMapEnumerator->GetCurrent(currentEntry); + SysTryCatch(NID_UI, r == E_SUCCESS, r = E_SYSTEM, r, "[E_SYSTEM] UpdateAllBindings is failed."); + _DataBinding* pBinding = currentEntry.GetValue(); + SysTryCatch(NID_UI, pBinding, r = E_SYSTEM, r, "[E_SYSTEM] UpdateAllBindings is failed."); + DataBindingFlow flow = pBinding->GetDataFlow(); + if ((destinationType == DATA_BINDING_DESTINATION_TYPE_SOURCE && + ( flow == DATA_BINDING_FLOW_ONE_WAY_TO_SOURCE || + flow == DATA_BINDING_FLOW_TWO_WAY)) || + (destinationType == DATA_BINDING_DESTINATION_TYPE_TARGET && + (flow == DATA_BINDING_FLOW_ONE_WAY || flow == DATA_BINDING_FLOW_TWO_WAY))) + { + r = pBinding->Update(destinationType); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] System Error", GetErrorMessage(r)); + } + } + delete pMapEnumerator; + return r; +CATCH: + delete pMapEnumerator; + return r; +} +result +_DataBindingContext::UpdateBinding(const String& bindingId, DataBindingDestinationType destinationType) +{ + result r = E_SUCCESS; + _DataBinding* pDataBinding = null; + r = __map.GetValue(const_cast(bindingId), pDataBinding); + SysTryReturn(NID_UI, r == E_SUCCESS, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, + "[E_OBJ_NOT_FOUND] The given binding ID is not registered."); + DataBindingFlow flow = pDataBinding->GetDataFlow(); + DataBindingTrigger trigger = pDataBinding->GetTrigger(); + SysTryReturn(NID_UI, trigger != DATA_BINDING_TRIGGER_IMMEDIATE, E_INVALID_OPERATION, E_INVALID_OPERATION, + "[E_INVALID_OPERATION] The given binding's trigger is not 'explicit' type."); + SysTryReturn(NID_UI, (flow == DATA_BINDING_FLOW_TWO_WAY) || + (flow == DATA_BINDING_FLOW_ONE_WAY && destinationType == DATA_BINDING_DESTINATION_TYPE_TARGET) || + (flow == DATA_BINDING_FLOW_ONE_WAY_TO_SOURCE && destinationType == DATA_BINDING_DESTINATION_TYPE_SOURCE), E_INVALID_ARG, + E_INVALID_ARG, "[E_INVALID_ARG] destinationType is not supported in binding ID."); + + r = pDataBinding->Update(destinationType); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] binding update is failed.", GetErrorMessage(r)); + + return r; +} + +}}//Tizen::Ui diff --git a/src/ui/FUi_DataBindingContext.h b/src/ui/FUi_DataBindingContext.h new file mode 100644 index 0000000..62fe4ff --- /dev/null +++ b/src/ui/FUi_DataBindingContext.h @@ -0,0 +1,77 @@ +// +// 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_DataBindingContext.h + * @brief This is the header file for the _DataBindingContext class. + * + * This header file contains the declarations of the _DataBindingContext class. + */ +#ifndef _FUI_INTERNAL_DATA_BINDING_CONTEXT_H_ +#define _FUI_INTERNAL_DATA_BINDING_CONTEXT_H_ + +#include +#include + +namespace Tizen { namespace Base +{ + class String; +}} + +namespace Tizen { namespace Ui +{ + +class IDataBindingListener; +class IDataBindingDataValidator; +class IDataBindingDataTransformer; +class _Control; +class _DataBinding; + +class _DataBindingContext +{ +public: +// Life Cycle + _DataBindingContext(const _Control& control); + ~_DataBindingContext(void); + +// Accessor + _Control* GetContextOwner(void) const; + +// Operations + result Bind(_Control& control, 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); + + result SetDataBindingEventListener(const Tizen::Base::String& bindingId, const IDataBindingListener* pListener); + + result UnbindAll(void); + + result Unbind(const Tizen::Base::String& bindingId); + + result UpdateAllBindings(DataBindingDestinationType destinationType); + + result UpdateBinding(const Tizen::Base::String& bindingId, DataBindingDestinationType destinationType); +private: + _DataBindingContext(const _DataBindingContext& rhs); + _DataBindingContext& operator =(const _DataBindingContext& rhs); +private: +// Attributes + _Control* __pControl; + Tizen::Base::Collection::IHashCodeProviderT* __pProvider; + Tizen::Base::Collection::IComparerT* __pComparer; + Tizen::Base::Collection::HashMapT __map; +}; //class _DataBindingContext + +}} //Tizen::Ui +#endif // _FUI_INTERNAL_DATA_BINDING_CONTEXT_H_ diff --git a/src/ui/FUi_DataBindingContextImpl.cpp b/src/ui/FUi_DataBindingContextImpl.cpp new file mode 100644 index 0000000..40116d5 --- /dev/null +++ b/src/ui/FUi_DataBindingContextImpl.cpp @@ -0,0 +1,167 @@ +// +// 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_DataBindingContextImpl.cpp + * @brief This is the implementation for the _DataBindingContextImpl class. + */ +#include +#include "FUi_ControlImpl.h" +#include "FUi_ContainerImpl.h" +#include "FUi_DataBindingContextImpl.h" +#include "FUi_DataBindingContext.h" + +using namespace Tizen::Base; + +namespace Tizen { namespace Ui +{ +_DataBindingContextImpl::_DataBindingContextImpl(const _ContainerImpl& controlImpl) + : __pContainerImpl(null) +{ + __pContainerImpl = const_cast <_ContainerImpl*>(&controlImpl); + __controlHandle = __pContainerImpl->GetCore().GetHandle(); + result r = E_SYSTEM; + if(!ControlCoreExists(__controlHandle)) + { + r = E_SYSTEM; + } + if(!__pContainerImpl->GetCore().GetDataBindingContext()) + { + r = E_SYSTEM; + } + else + { + r = E_SUCCESS; + } + SetLastResult(r); +} + +_DataBindingContextImpl::~_DataBindingContextImpl(void) +{ +} + +_ContainerImpl* +_DataBindingContextImpl::GetContextOwner(void) const +{ + return __pContainerImpl; +} +DataBindingContext* +_DataBindingContextImpl::GetDataBindingContextN(const _ContainerImpl& controlImpl) +{ + DataBindingContext* pContext = new (std::nothrow) DataBindingContext(controlImpl.GetPublic()); + SysTryReturn(NID_UI, pContext, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation for _DataBinding is failed."); + + SetLastResult(E_SUCCESS); + return pContext; +} +result +_DataBindingContextImpl::Bind(const String& bindingId, const String& controlName, + const String& propertyName + , Object& dataSource, DataBindingDataType sourceType, DataBindingFlow flow, + DataBindingTrigger trigger + , const IDataBindingListener* pListener, const IDataBindingDataValidator* pValidator, + const IDataBindingDataTransformer* pTransformer) +{ + SysTryReturn(NID_UI, ControlCoreExists(__controlHandle) && __pContainerImpl, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System Error."); + + _ControlImpl* pControlImpl = __pContainerImpl->SearchControlByName(controlName, true); + SysTryReturn(NID_UI, pControlImpl, E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, + "[E_OBJ_NOT_FOUND] a control named as \"%s\" is not found.", + controlName.GetPointer()); + _DataBindingContext* pContext = __pContainerImpl->GetCore().GetDataBindingContext(); + SysTryReturn(NID_UI, pContext, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System Error."); + + return pContext->Bind( pControlImpl->GetCore(), bindingId, controlName, propertyName, + dataSource, sourceType, flow, trigger, pListener, pValidator, pTransformer); +} +result +_DataBindingContextImpl::SetDataBindingEventListener(const String& bindingId, IDataBindingListener* pListener) +{ + + SysTryReturn(NID_UI, ControlCoreExists(__controlHandle), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System Error."); + + _DataBindingContext* pContext = __pContainerImpl->GetCore().GetDataBindingContext(); + SysTryReturn(NID_UI, pContext, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System Error."); + + return pContext->SetDataBindingEventListener(bindingId, pListener); +} +result +_DataBindingContextImpl::UnbindAll(void) +{ + SysTryReturn(NID_UI, ControlCoreExists(__controlHandle), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System Error."); + + _DataBindingContext* pContext = __pContainerImpl->GetCore().GetDataBindingContext(); + SysTryReturn(NID_UI, pContext, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System Error."); + + return pContext->UnbindAll(); +} + +result +_DataBindingContextImpl::Unbind(const String& bindingId) +{ + SysTryReturn(NID_UI, ControlCoreExists(__controlHandle), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System Error."); + + _DataBindingContext* pContext = __pContainerImpl->GetCore().GetDataBindingContext(); + SysTryReturn(NID_UI, pContext, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System Error."); + + return pContext->Unbind(bindingId); +} + +result +_DataBindingContextImpl::UpdateAllBindings(DataBindingDestinationType destType) +{ + SysTryReturn(NID_UI, ControlCoreExists(__controlHandle), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System Error."); + + _DataBindingContext* pContext = __pContainerImpl->GetCore().GetDataBindingContext(); + SysTryReturn(NID_UI, pContext, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System Error."); + + return pContext->UpdateAllBindings(destType); +} + +result +_DataBindingContextImpl::UpdateBinding(const String& bindingId, DataBindingDestinationType destType) +{ + SysTryReturn(NID_UI, ControlCoreExists(__controlHandle), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System Error."); + + _DataBindingContext* pContext = __pContainerImpl->GetCore().GetDataBindingContext(); + SysTryReturn(NID_UI, pContext, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] System Error."); + + return pContext->UpdateBinding(bindingId, destType); +} +_DataBindingContextImpl* +_DataBindingContextImpl::GetDataBindingContextInstance(DataBindingContext* pDataBindingContext) +{ + return pDataBindingContext ? pDataBindingContext->__pDataBindingContextImpl : null; +} +const _DataBindingContextImpl* +_DataBindingContextImpl::GetDataBindingContextInstance(const DataBindingContext* pDataBindingContext) +{ + return pDataBindingContext ? pDataBindingContext->__pDataBindingContextImpl : null; +} +bool +_DataBindingContextImpl::ControlCoreExists(_ControlHandle controlHandle) +{ + _Control* pControlCore = null; //review : coding idiom + _ControlManager* pManager = _ControlManager::GetInstance(); + SysTryReturn(NID_UI, !(controlHandle.IsNull()), false, E_SYSTEM, "[E_SYSTEM] System Error."); + SysTryReturn(NID_UI, pManager, false, E_SYSTEM, "[E_SYSTEM] System Error."); + + pControlCore = pManager->GetObject(controlHandle); + SysTryReturn(NID_UI, pControlCore, false, E_SYSTEM, "[E_SYSTEM] System Error."); + return true; +} + +} } //Tizen::Ui diff --git a/src/ui/FUi_DataBindingContextImpl.h b/src/ui/FUi_DataBindingContextImpl.h new file mode 100644 index 0000000..806f216 --- /dev/null +++ b/src/ui/FUi_DataBindingContextImpl.h @@ -0,0 +1,84 @@ +// +// Open Service Platform +// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +/** + * @file FUi_DataBindingContextImpl.h + * @brief This is the header file for the _DataBindingContextImpl class. + * + * This header file contains the declarations of the _DataBindingContextImpl class. + */ +#ifndef _FUI_INTERNAL_DATA_BINDING_CONTEXT_IMPL_H_ +#define _FUI_INTERNAL_DATA_BINDING_CONTEXT_IMPL_H_ + +#include +#include +#include "FUi_ControlManager.h" + +namespace Tizen { namespace Ui { + +class _ControlImpl; +class _ContainerImpl; +class DataBindingContext; +class IDataBindingListener; +class IDataBindingDataValidator; +class IDataBindingDataTransformer; +class _DataBindingContext; + +class _DataBindingContextImpl + : public Tizen::Base::Object +{ +// Life Cycle +public: + _DataBindingContextImpl(const _ContainerImpl& containerImpl); + virtual ~_DataBindingContextImpl(void); + static DataBindingContext* GetDataBindingContextN(const _ContainerImpl& containerImpl); + +// Accessors +public: + _ContainerImpl* GetContextOwner(void) const; + +// Operations + 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); + + result SetDataBindingEventListener(const Tizen::Base::String& bindingId, IDataBindingListener* pListener); + + result UnbindAll(void); + + result Unbind(const Tizen::Base::String& bindingId); + + result UpdateAllBindings(DataBindingDestinationType destinationType); + + result UpdateBinding(const Tizen::Base::String& bindingId, DataBindingDestinationType destinationType); + + static _DataBindingContextImpl* GetDataBindingContextInstance(DataBindingContext* pDataBindingContext); + static const _DataBindingContextImpl* GetDataBindingContextInstance(const DataBindingContext* pDataBindingContext); + +private: +// Queries + bool ControlCoreExists(_ControlHandle controlHandle); + +// Coding idiom + _DataBindingContextImpl(const _DataBindingContextImpl& rhs); + _DataBindingContextImpl& operator =(const _DataBindingContextImpl& rhs); + +private: +// Attributes + _ControlHandle __controlHandle; + _ContainerImpl* __pContainerImpl; +}; //class _DataBindingContextImpl + +}} //Tizen::Ui +#endif // _FUI_INTERNAL_DATA_BINDING_CONTEXT_IMPL_H_ diff --git a/src/ui/FUi_DimmingLayer.cpp b/src/ui/FUi_DimmingLayer.cpp new file mode 100644 index 0000000..38697a6 --- /dev/null +++ b/src/ui/FUi_DimmingLayer.cpp @@ -0,0 +1,252 @@ +// +// 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_DimmingLayer.cpp + * @brief This is the implementation file for _DimmingLayer class. + * + * This file contains the implementation of _DimmingLayer class. + */ + +#include +#include +#include "FUi_Control.h" +#include "FUi_ControlManager.h" +#include "FUi_Window.h" +#include "FUi_DimmingLayer.h" +#include "FUi_ResourceManager.h" +#include "FUiAnim_ControlVisualElement.h" +#include "FUiAnim_RootVisualElement.h" +#include "FUiAnim_VisualElementImpl.h" +#include "FUiCtrl_Popup.h" + +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Ui::Animations; + +namespace Tizen { namespace Ui +{ + +_DimmingLayer::_DimmingLayer(void) + : __enabled(false) + , __pControl(null) + , __pDimmingElement(null) + , __oldControlRenderOperation(VisualElement::RENDER_OPERATION_BLEND) +{ + +} + +_DimmingLayer::~_DimmingLayer(void) +{ + if (__pDimmingElement) + { + __pDimmingElement->Destroy(); + } + __pDimmingElement = null; + + if (__pControl) + { + VisualElement* pControlVisualElement = __pControl->GetVisualElement(); + if (pControlVisualElement) + { + pControlVisualElement->SetRenderOperation(__oldControlRenderOperation); + } + } +} + +result +_DimmingLayer::Construct(_Control& control) +{ + result r = E_SUCCESS; + VisualElement* pControlVisualElement = null; + + __pControl = &control; + + if (!__pDimmingElement) + { + __pDimmingElement = new (std::nothrow) _ControlVisualElement; + SysTryReturnResult(NID_UI, __pDimmingElement, E_OUT_OF_MEMORY, "Memory allocation failed."); + } + + r = __pDimmingElement->ConstructControlVisualElement(); + SysTryCatch(NID_UI, !IsFailed(r), , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pDimmingElement->SetImplicitAnimationEnabled(true); + __pDimmingElement->SetName("DimmingLayer"); + + r = __pDimmingElement->SetSurfaceOpaque(false); + SysTryCatch(NID_UI, !IsFailed(r), , r, "[%s] Propagating.", GetErrorMessage(r)); + + __pDimmingElement->SetShowState(true); + //__pDimmingElement->SetOpacity(0.65f); + + r = __pDimmingElement->SetBackgroundColor(_Colorf()); + SysTryCatch(NID_UI, !IsFailed(r), , r, "[%s] Propagating.", GetErrorMessage(r)); + + pControlVisualElement = __pControl->GetVisualElement(); + if (pControlVisualElement) + { + __oldControlRenderOperation = pControlVisualElement->GetRenderOperation(); + pControlVisualElement->SetRenderOperation(VisualElement::RENDER_OPERATION_BLEND); + } + + r = Rearrange(); + SysTryCatch(NID_UI, !IsFailed(r), , r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; + +CATCH: + __pDimmingElement->Destroy(); + return E_SYSTEM; +} + +result +_DimmingLayer::SetOpacity(float opacity) +{ + SysTryReturnResult(NID_UI, __pDimmingElement, E_SYSTEM, "A system error has been occurred."); + + result r = E_SUCCESS; + + __pDimmingElement->SetOpacity(opacity); + + if (opacity >= 1.0f) + { + __pDimmingElement->SetSurfaceOpaque(true); + } + else + { + __pDimmingElement->SetSurfaceOpaque(false); + } + + SysTryReturnResult(NID_UI, !IsFailed(r), E_SYSTEM, "A system error has been occurred."); + + return r; +} + +float +_DimmingLayer::GetOpacity(void) const +{ + SysTryReturnResult(NID_UI, __pDimmingElement, E_SYSTEM, "A system error has been occurred."); + return __pDimmingElement->GetOpacity(); +} + +result +_DimmingLayer::SetDimmingEnabled(bool enabled) +{ + SysTryReturnResult(NID_UI, __pDimmingElement, E_SYSTEM, "A system error has been occurred."); + + result r = E_SUCCESS; + + FloatDimension size = _ControlManager::GetInstance()->GetScreenSizeF(); + + _VisualElement* pControlVisualElement = __pControl->GetVisualElement(); + SysTryReturnResult(NID_UI, pControlVisualElement, E_SYSTEM, "A system error has been occurred."); + + if (enabled) + { + _Window* pWindow = __pControl->GetRootWindow(); + _RootVisualElement* pParent = pWindow->GetRootVisualElement(); + if (pParent) + { + pParent->InsertChild(*__pDimmingElement, pControlVisualElement, false); + } + DrawBackground(); + } + else + { + _Window* pWindow = __pControl->GetRootWindow(); + _RootVisualElement* pParent = pWindow->GetRootVisualElement(); + if (pParent) + { + pParent->DetachChild(*__pDimmingElement); + } + } + + __enabled = enabled; + + return r; +} + +bool +_DimmingLayer::IsDimmingEnabled(void) const +{ + return __enabled; +} + +result +_DimmingLayer::Rearrange(void) +{ + SysTryReturnResult(NID_UI, __pDimmingElement, E_SYSTEM, "A system error has been occurred."); + SysTryReturnResult(NID_UI, __pControl, E_SYSTEM, "A system error has been occurred."); + + result r = E_SUCCESS; + + FloatDimension size = _ControlManager::GetInstance()->GetScreenSizeF(); + bool oldValue = __pDimmingElement->IsImplicitAnimationEnabled(); + __pDimmingElement->SetImplicitAnimationEnabled(false); + if (__pControl->GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT) + { + __pDimmingElement->SetBounds(Tizen::Graphics::FloatRectangle(0.0f, 0.0f, size.width, size.height)); + } + else + { + __pDimmingElement->SetBounds(Tizen::Graphics::FloatRectangle(0.0f, 0.0f, size.height, size.width)); + } + + __pDimmingElement->SetImplicitAnimationEnabled(oldValue); + + return r; +} + +result +_DimmingLayer::DrawBackground(void) +{ + result r = E_SUCCESS; + + const FloatDimension size = _ControlManager::GetInstance()->GetScreenSizeF(); + + if (__pDimmingElement) + { + Canvas* pCanvas = null; + if (__pControl->GetOrientation() == _CONTROL_ORIENTATION_PORTRAIT) + { + pCanvas = __pDimmingElement->GetCanvasN(FloatRectangle(0, 0, size.width, size.height)); + } + else + { + pCanvas = __pDimmingElement->GetCanvasN(FloatRectangle(0, 0, size.height, size.width)); + } + + r = GetLastResult(); + SysTryReturnResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + Color bgColor(0x7F000000); + + if (pCanvas) + { + pCanvas->SetBackgroundColor(bgColor); + pCanvas->Clear(); + } + + delete pCanvas; + } + + return r; +} + +}} // Tizen::Ui + diff --git a/src/ui/FUi_DimmingManager.cpp b/src/ui/FUi_DimmingManager.cpp new file mode 100644 index 0000000..f07c74e --- /dev/null +++ b/src/ui/FUi_DimmingManager.cpp @@ -0,0 +1,207 @@ +// +// 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_DimmingManager.cpp + * @brief This is the implementation file for the _DimmingManager class. + */ + +#include +#include "FUi_Window.h" +#include "FUi_DimmingManager.h" + +using namespace Tizen::Ui; + +namespace Tizen { namespace Ui { + +_DimmingManager* _DimmingManager::__pInstance = null; + +_DimmingManager* +_DimmingManager::GetInstance(void) +{ + if (__pInstance == null) + { + Initialize(); + } + return __pInstance; +} + +void +_DimmingManager::Initialize(void) +{ + static pthread_once_t once_block = PTHREAD_ONCE_INIT; + + if (!__pInstance) + { + pthread_once(&once_block, InitializeInstance); + } +} + +void +_DimmingManager::InitializeInstance(void) +{ + ClearLastResult(); + + if (__pInstance == null) + { + __pInstance = new (std::nothrow) _DimmingManager; + SysTryReturnVoidResult(NID_UI, __pInstance != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + } +} + +void +_DimmingManager::ReleaseInstance(void) +{ + if (__pInstance) + { + delete __pInstance; + __pInstance = null; + } +} + +_DimmingManager::_DimmingManager(void) + : __pWindowList(null) +{ + result r = E_SUCCESS; + __pWindowList = new (std::nothrow) WindowList; + SysTryReturnVoidResult(NID_UI, __pWindowList, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage."); + + r = __pWindowList->Construct(); + SysTryReturnVoidResult(NID_UI, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); +} + +_DimmingManager::~_DimmingManager(void) +{ + delete __pWindowList; +} + +result +_DimmingManager::RegisterWindow(_Window* pWindow) +{ + result r = E_SUCCESS; + + int count = __pWindowList->GetCount(); + if (count > 0) + { + _Window* pOldWindow = null; + r = __pWindowList->GetAt(count - 1, pOldWindow); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + + r = CreateDimmingLayer(pWindow); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + r = __pWindowList->Add(pWindow); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + + return r; +} + +result +_DimmingManager::UnRegisterWindow(_Window* pWindow) +{ + result r = E_SUCCESS; + + DeleteDimmingLayer(pWindow); + int count = __pWindowList->GetCount(); + if (count > 0) + { + r = __pWindowList->Remove(pWindow); + } + + count = __pWindowList->GetCount(); + if (count > 0) + { + _Window* pOldWindow = null; + r = __pWindowList->GetAt(count - 1, pOldWindow); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + CreateDimmingLayer(pOldWindow); + } + + return r; +} + +result +_DimmingManager::CreateDimmingLayer(_Window* pWindow) +{ + if (!pWindow) + { + return E_SUCCESS; + } + + _DimmingLayer* pPrevDimmingLayer = pWindow->GetDimmingLayer(); + if (pPrevDimmingLayer) + { + return E_SUCCESS; + } + + result r = E_SUCCESS; + + _DimmingLayer* pDimmingLayer = new (std::nothrow) _DimmingLayer(); + SysTryReturn(NID_UI, pDimmingLayer != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed."); + + r = pDimmingLayer->Construct(*pWindow); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + pWindow->SetDimmingLayer(pDimmingLayer); + + return r; + +CATCH: + delete pDimmingLayer; + return r; +} + +void +_DimmingManager::DeleteDimmingLayer(_Window* pWindow) +{ + if (pWindow) + { + _DimmingLayer* pLayer = pWindow->GetDimmingLayer(); + if (pLayer) + { + pLayer->SetDimmingEnabled(false); + delete pLayer; + } + pWindow->SetDimmingLayer(null); + } +} + +result +_DimmingManager::ShowDimmingLayer(_Window* pWindow) +{ + result r = E_SUCCESS; + + _DimmingLayer* pDimmingLayer = pWindow->GetDimmingLayer(); + if (pDimmingLayer) + { + if (pWindow->GetVisibleState()) + { + if (pDimmingLayer->IsDimmingEnabled() == false) + { + r = pDimmingLayer->SetDimmingEnabled(true); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + else + { + r = pDimmingLayer->SetDimmingEnabled(false); + SysTryReturn(NID_UI, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + } + } + + return r; +} + +}} // Tizen::Ui 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_DragDropEvent.cpp b/src/ui/FUi_DragDropEvent.cpp new file mode 100644 index 0000000..6ecbc23 --- /dev/null +++ b/src/ui/FUi_DragDropEvent.cpp @@ -0,0 +1,173 @@ +// +// 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_DragDropEvent.cpp + * @brief This is the implementation file for _DragDropEvent class + * @since 2.0 + * + * This file contains the implementation of %_DragDropEvent class. + * + */ + +#include +#include +#include +#include +#include +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_DragDropEvent.h" +#include "FUi_DragDropEventArg.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; + +namespace Tizen { namespace Ui +{ +_DragDropEvent::_DragDropEvent() + : __pSource(null) +{ + // NOTHING +} + +_DragDropEvent::~_DragDropEvent() +{ + // NOTHING +} + + +result +_DragDropEvent::Construct(const Control& source) +{ + result r = E_SUCCESS; + r = _Event::Initialize(); + + // set event source + if (r == E_SUCCESS) + { + __pSource = const_cast (&source); + } + + return (r); + +} + + + +bool +_DragDropEvent::Filter(const Tizen::Base::Runtime::IEventArg& eventArg) +{ + return false; +} + +result +_DragDropEvent::AddListener(const Tizen::Base::Runtime::IEventListener& listener, + const Tizen::Base::Runtime::_EventDispatcher* pEventDispatcher) +{ + result r = E_SUCCESS; + return r; +} + +result +_DragDropEvent::Wait(void) +{ + result r = E_SUCCESS; + return r; +} + +result +_DragDropEvent::FireImpl(IEventListener* pListener, const IEventArg& arg) +{ + SysTryReturnResult(NID_UI, pListener, E_INVALID_ARG, "The Invalid argument is given."); + + IDragDropEventListener* pDragDropListener = dynamic_cast (pListener); + IDragDropEventListenerF* pDragDropListenerF = dynamic_cast (pListener); + + SysTryReturnResult(NID_UI, pDragDropListener || pDragDropListenerF, E_INVALID_ARG, "The Invalid argument is given."); + + const _DragDropEventArg* pArg = dynamic_cast (&arg); + SysTryReturnResult(NID_UI, pArg, E_INVALID_ARG, "The invalid Event Argument is given."); + + switch (pArg->GetDragDropStatus()) + { + case DRAG_DROP_INDICATED: + break; + + case DRAG_DROP_PRESSED: + break; + + case DRAG_DROP_LONG_PRESSED: + break; + + case DRAG_DROP_RELEASED: + break; + + case DRAG_DROP_MOVED: + break; + + case DRAG_DROP_DOUBLE_PRESSED: + break; + + case DRAG_DROP_FOCUS_IN: + break; + + case DRAG_DROP_FOCUS_OUT: + break; + + case DRAG_DROP_FLICKED: + break; + + case DRAG_DROP_FLICK_HELD: + break; + + case DRAG_DROP_DRAGGED: + if (pDragDropListener) + { + pDragDropListener->OnTouchDragged(*pArg->GetSource(), _CoordinateSystemUtils::ConvertToInteger(pArg->GetStartPosition()), _CoordinateSystemUtils::ConvertToInteger(pArg->GetCurrentPosition())); + } + if (pDragDropListenerF) + { + pDragDropListenerF->OnTouchDraggedF(*pArg->GetSource(), pArg->GetStartPosition(), pArg->GetCurrentPosition()); + } + break; + + case DRAG_DROP_DROPPED: + if (pDragDropListener) + { + pDragDropListener->OnTouchDropped(*pArg->GetSource(), _CoordinateSystemUtils::ConvertToInteger(pArg->GetStartPosition()), _CoordinateSystemUtils::ConvertToInteger(pArg->GetCurrentPosition())); + } + if (pDragDropListenerF) + { + pDragDropListenerF->OnTouchDroppedF(*pArg->GetSource(), pArg->GetStartPosition(), pArg->GetCurrentPosition()); + } + break; + + default: + return E_SYSTEM; + } + return E_SUCCESS; +} + +const Tizen::Ui::Control* +_DragDropEvent::GetSource(void) const +{ + return (__pSource); +} + +}; +}; // Tizen::Ui diff --git a/src/ui/FUi_DragDropEventArg.cpp b/src/ui/FUi_DragDropEventArg.cpp new file mode 100644 index 0000000..077d1bc --- /dev/null +++ b/src/ui/FUi_DragDropEventArg.cpp @@ -0,0 +1,98 @@ +// +// 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_DragDropEventArg.cpp + * @brief This is the implementation file for _DragDropEventArg class + * @version 2.0 + * + * This file contains the implementation of %_DragDropEventArg class. + * + */ + +#include "FUi_DragDropEventArg.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; + +namespace Tizen { namespace Ui +{ +_DragDropEventArg::_DragDropEventArg(const Control& source, DragDropStatus status) + : __pSource(const_cast (&source)) + , __pDraggedControl(null) + , __dragDropStatus(status) + , __startPosition(-1, -1) + , __currentPosition(-1, -1) +{ + // NOTHING +} + +_DragDropEventArg::~_DragDropEventArg(void) +{ + // NOTHING +} + +DragDropStatus +_DragDropEventArg::GetDragDropStatus(void) const +{ + return (__dragDropStatus); +} + + +const Tizen::Ui::Control* +_DragDropEventArg::GetSource(void) const +{ + return (__pSource); +} + + +const Tizen::Graphics::FloatPoint +_DragDropEventArg::GetStartPosition(void) const +{ + return __startPosition; +} + +const Tizen::Graphics::FloatPoint +_DragDropEventArg::GetCurrentPosition(void) const +{ + return __currentPosition; +} + +result +_DragDropEventArg::SetDraggedControl(const Tizen::Ui::Control* pDraggedControl) +{ + __pDraggedControl = (Tizen::Ui::Control*) pDraggedControl; +// if( pDragedControl == null) return E_FAILURE; + return E_SUCCESS; +} + +const Tizen::Ui::Control* +_DragDropEventArg::GetDraggedControl(void) const +{ + return (const Tizen::Ui::Control*) __pDraggedControl; +} + +result +_DragDropEventArg::SetTouchPosition(float startX, float startY, float currentX, float currentY) +{ + __startPosition = Tizen::Graphics::FloatPoint(startX, startY); + __currentPosition = Tizen::Graphics::FloatPoint(currentX, currentY); + + return E_SUCCESS; +} + +}; +}; // Tizen::Ui diff --git a/src/ui/FUi_EcoreEvas.cpp b/src/ui/FUi_EcoreEvas.cpp new file mode 100644 index 0000000..c85ffbd --- /dev/null +++ b/src/ui/FUi_EcoreEvas.cpp @@ -0,0 +1,4143 @@ +// +// 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_EcoreEvas.cpp + * @brief This is the implementation file for the _EcoreEvas class. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "FUi_CoordinateSystemUtils.h" +#include "FUi_EcoreEvas.h" +#include "FUi_EcoreEvasMgr.h" +#include "FUi_Control.h" +#include +#include "FUi_UiNotificationEvent.h" +#include "FUi_UiEventManager.h" +#include "FUi_Window.h" +#include "FUiAnim_EflLayer.h" +#include "FUiAnim_EflNode.h" +#include "FUiAnim_VisualElement.h" +#include "FUi_AccessibilityGesture.h" +#include "FUi_AccessibilitySystemSettingLoader.h" +#include "FUiAnim_RootVisualElement.h" +#include "FUiAnim_DisplayManager.h" +#include "FUiCtrl_Frame.h" +#include "FUiCtrl_FrameImpl.h" +#include "FUiCtrl_FormImpl.h" +#include "FUi_Clipboard.h" +#include "FUi_TouchManager.h" +#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; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Animations; +using namespace Tizen::Ui::Controls; + +#define ATOM_CBHM_WINDOW_NAME "CBHM_XWIN" +#define ATOM_CBHM_MSG "CBHM_MSG" +#define ATOM_CBHM_COUNT_GET "CBHM_cCOUNT" +#define ATOM_CBHM_SERIAL_NUMBER "CBHM_SERIAL_NUMBER" +#define ATOM_CBHM_ERROR "CBHM_ERROR" +#define ATOM_CBHM_ITEM "CBHM_ITEM" +#define ATOM_CBHM_SET_ITEM "SET_ITEM" +#define ATOM_CBHM_CLIPBOARD_SHOW_ALL "show1" +#define ATOM_CBHM_CLIPBOARD_SHOW "show0" +#define ATOM_CBHM_CLIPBOARD_HIDE "cbhm_hide" +#define ATOM_CBHM_SELECTED_ITEM "CBHM_SELECTED_ITEM" +#define ATOM_ROTATE_AUTO "_E_WINDOW_ROTATION_SUPPORTED" + +namespace Tizen { namespace Ui +{ +static _EcoreEvas* _pEvas = null; +}} // Tizen::Ui + +namespace +{ + +Ecore_X_Atom __atomRotateRootAngle = 0; + +int __clipboardHeight = 0; + +void +OnWindowStateChanged(Ecore_Evas* pEcoreEvas) +{ + _ControlManager* pControlManager = _ControlManager::GetInstance(); + if (!pControlManager) + { + return; + } + + Ecore_X_Window targetWin = (Ecore_X_Window) ecore_evas_window_get(pEcoreEvas); + + SysLog(NID_UI, "[WM ROTATION][WIN 0x%x] OnWindowStateChanged is called.", targetWin); + + int winCount = pControlManager->GetAllWindowCount(); + for (int i = 0; i < winCount; i++) + { + _Window* pWindow = pControlManager->GetAllWindow(i); + if (!pWindow) + { + continue; + } + + Ecore_X_Window win = (Ecore_X_Window)pWindow->GetNativeHandle(); + + if (win == targetWin) + { + pWindow->OnWindowStateChanged(); + + return; + } + } +} + +Eina_Bool +OnWindowPropertyChanged(void* pData, int type, void* pEvent) +{ + Ecore_X_Event_Window_Property* pEv = (Ecore_X_Event_Window_Property*)pEvent; + if (!pEv) + { + return ECORE_CALLBACK_PASS_ON; + } + + Ecore_X_Window targetWin = pEv->win; + if (targetWin == 0) + { + return ECORE_CALLBACK_PASS_ON; + } + + if (pEv->atom == ECORE_X_ATOM_E_ILLUME_CLIPBOARD_STATE) + { + Ecore_X_Window zone = ecore_x_e_illume_zone_get(targetWin); + Ecore_X_Illume_Clipboard_State clipboardState = ecore_x_e_illume_clipboard_state_get(zone); + + if (clipboardState == ECORE_X_ILLUME_CLIPBOARD_STATE_ON) + { + int x = 0; + int y = 0; + int w = 0; + int h = 0; + ecore_x_e_illume_clipboard_geometry_get(zone, &x, &y, &w, &h); + + Dimension clipboardDim = _CoordinateSystemUtils::InverseTransform(Dimension(w, h)); + + if (__clipboardHeight == 0) + { + SysLog(NID_UI, "[Clipboard] Clipboard is opened. -> w = %d, h = %d", clipboardDim.width, clipboardDim.height); + _Clipboard::GetInstance()->FirePopupEvent(_CLIPBOARD_POPUP_STATE_OPENED, clipboardDim.width, clipboardDim.height); + __clipboardHeight = clipboardDim.height; + } +// else +// { +// SysLog(NID_UI, "[Clipboard] The bounds of Clipboard is changed. -> w = %d, h = %d", clipboardDim.width, clipboardDim.height); +// _Clipboard::GetInstance()->FirePopupEvent(_CLIPBOARD_POPUP_STATE_BOUNDS_CHANGED, clipboardDim.width, clipboardDim.height); +// } + } + else if (clipboardState == ECORE_X_ILLUME_CLIPBOARD_STATE_OFF) + { + SysLog(NID_UI, "[Clipboard] Clipboard is closed."); + _Clipboard::GetInstance()->FirePopupEvent(_CLIPBOARD_POPUP_STATE_CLOSED, 0, 0); + __clipboardHeight = 0; + _Clipboard::GetInstance()->HidePopup(); + } + } + else if (pEv->atom == ECORE_X_ATOM_E_ILLUME_CLIPBOARD_GEOMETRY) + { + // Only after opening Clipboard + if (__clipboardHeight != 0) + { + Ecore_X_Window zone = ecore_x_e_illume_zone_get(targetWin); + + int x = 0; + int y = 0; + int w = 0; + int h = 0; + ecore_x_e_illume_clipboard_geometry_get(zone, &x, &y, &w, &h); + + Dimension clipboardDim = _CoordinateSystemUtils::InverseTransform(Dimension(w, h)); + + if (clipboardDim.height != 0) + { + SysLog(NID_UI, "[Clipboard] The bounds of Clipboard is changed. -> w = %d, h = %d", clipboardDim.width, clipboardDim.height); + _Clipboard::GetInstance()->FirePopupEvent(_CLIPBOARD_POPUP_STATE_BOUNDS_CHANGED, clipboardDim.width, clipboardDim.height); + } + } + } + else if (pEv->atom == ECORE_X_ATOM_WM_STATE) + { + _ControlManager* pControlManager = _ControlManager::GetInstance(); + if (!pControlManager) + { + return ECORE_CALLBACK_PASS_ON; + } + + int winCount = pControlManager->GetWindowCount(); + + for (int i = 0; i < winCount; i++) + { + _Window* pWindow = pControlManager->GetWindow(i); + if (!pWindow) + { + continue; + } + + Ecore_X_Window win = (Ecore_X_Window)pWindow->GetNativeHandle(); + if (win != targetWin) + { + continue; + } + + if (pWindow->IsOrientationRoot() == true) + { + _Frame* pFrame = static_cast<_Frame*>(pWindow); + _DisplayContextImpl* pContext = _DisplayContextImpl::GetInstance(*pFrame->GetDisplayContext()); + _EflLayer* pLayer = static_cast<_EflLayer*>(pContext->GetNativeLayer()); + + + Ecore_X_Window_State_Hint state = ecore_x_icccm_state_get(targetWin); + switch (state) + { + case ECORE_X_WINDOW_STATE_HINT_WITHDRAWN: + pLayer->SetRenderNeeded(false); + // Frame was hidden. + break; + case ECORE_X_WINDOW_STATE_HINT_ICONIC: + pLayer->SetRenderNeeded(false); + pFrame->OnFrameMinimized(); + break; + case ECORE_X_WINDOW_STATE_HINT_NORMAL: + pLayer->SetRenderNeeded(true); + pFrame->OnFrameRestored(); + break; + default: + break; + } + + break; + } + } + } + + return ECORE_CALLBACK_PASS_ON; +} + +Eina_Bool +OnWindowVisibilityChanged(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."); + + Ecore_X_Event_Window_Visibility_Change* pE = (Ecore_X_Event_Window_Visibility_Change*) pEvent; + _ControlManager* pControlManager = _ControlManager::GetInstance(); + + int count = pControlManager->GetWindowCount(); + + _Window* pWindow = null; + bool found = false; + + for (int i = 0; i < count; i++) + { + pWindow = pControlManager->GetWindow(i); + if (pWindow) + { + NativeWindowHandle handle = pWindow->GetNativeHandle(); + if (handle == pE->win) + { + found = true; + break; + } + } + } + + Tizen::Base::Collection::ArrayList* pArgs = null; + String* pType = null; + Integer* pObscured = null; + + if (found == true) + { + const _Control* pDestination = pWindow; + + pArgs = new (std::nothrow) Tizen::Base::Collection::ArrayList; + SysTryReturn(NID_UI, pArgs, EINA_FALSE, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient."); + + result r = pArgs->Construct(); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pType = new (std::nothrow) String(L"VisibilityEvent"); + r = pArgs->Add(*pType); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + pObscured = new (std::nothrow) Integer(pE->fully_obscured); + r = pArgs->Add(*pObscured); + SysTryCatch(NID_UI, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); + + _UiNotificationEvent event(pDestination->GetHandle(), pArgs); + + r = _UiEventManager::GetInstance()->SendEvent(event); + } + + return ECORE_CALLBACK_RENEW; + +CATCH: + pArgs->RemoveAll(true); + delete pArgs; + + if (pType) + { + delete pType; + } + + if (pObscured) + { + delete pObscured; + } + + return EINA_FALSE; +} + +Eina_Bool +OnWindowConfigured(void* pData, int type, void* pEvent) +{ + _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; + } + + SysLog(NID_UI, "[WM ROTATION]"); + + Ecore_X_Event_Window_Configure* pE = (Ecore_X_Event_Window_Configure*)pEvent; + if (!pE) + { + return ECORE_CALLBACK_PASS_ON; + } + + if ((pE->from_wm == EINA_FALSE)) + { + return ECORE_CALLBACK_PASS_ON; + } + + _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]

c9t*k}~PR zIzRLtpX&SfbusGY<>edQHD6cE6sEPaWARt3)h_@Z0X)dc-yjH5&iP2k@*_!L=>;@d z`bX97@AC383xeS9tE;Pml#|Nf1Id8vbA!IQxycTUn#kNfkmS?igwUdU%fJ_&=Y4m3 zd;8}BH~{#EIe(}LpY_?&lz~1xJUlFDYyM@;cLI^6kMPFOaU3s>+;3EKHc$)iOCr5% z3CXRe8qhNUzsGUBZgao7@OcN&_Zt5@1Moq^6LZO2$_lTm;^a5W&|<}BZ22zbFQ|{j zOreeBlV(@!O zHCI6KXiWv5LEZ*(Dh2ooaA4n@RJPsECy<}vMcB83brl3dnokCvFvgTyW8K4ynL+^p z-B9G%%_n4W**;^<7}IJ?)rBviZb7Mn&%J|6Fv9*UUsYnS8Dn$ZK~0+wJ&m;{ZXcJ> z>%Np#Y?0=YG6Dz84=^ha&{2Sx4m05@YEr1!dmCyhSS-pCQ|&f6y)ChC2Amk|^g>6Q zqLR{aqaMIEN7o5WIz3Ujo1$f#Yuj`C4EtW&JMw}qPJ0SL@vX$xLyHBiyRkzhQ~`8t zYrvu9^|!!(ZDG~rwX||dz}6p@4jrz?^dQ*z`2TO~j)4{gnG2c0nOuDSE$wIc*C+oB Y02j?R07*qoM6N<$g1VY`ZU6uP literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_list_process_17.png b/res/common/usr/share/osp/bitmaps/720x1280/00_list_process_17.png new file mode 100644 index 0000000000000000000000000000000000000000..8eaac31b2a66e221ccf588c9e5ff76e372cd54b2 GIT binary patch literal 3954 zcmV-&4~_7NP)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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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00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_list_process_20.png b/res/common/usr/share/osp/bitmaps/720x1280/00_list_process_20.png new file mode 100644 index 0000000000000000000000000000000000000000..cbfeee0f475de3848332cf0fe8ce479278b325f6 GIT binary patch literal 4015 zcmV;g4^Z%lP)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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_huIFR9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{e4&9A%H&>;8S{fW8`MW6@YBDT78w{p6Bu7xg;^osO~*cvE-)$WBg9 z1{z}X#rhk^@e&Wu&vU^NTHbpbYMj5iEKi!wZkxTg9KbsY!$AX)3N7eBu^hMB1GveS z^9c<)!sFa~UlMrhO0r|%0xt3J0)UIX_jzgJH!@SNnM^6~29WRM+QbS0HC8%z4CmjJ zj(+LrZRq6%EWKf6>(#PFDJ+AMdi!{Ix2_H}C&;X{GFY>nAMeusfPZ@S{{YJvY#&oo R)<6IN002ovPDHLkV1lyJssI20 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_list_process_30.png b/res/common/usr/share/osp/bitmaps/720x1280/00_list_process_30.png new file mode 100644 index 0000000000000000000000000000000000000000..6566bf3d59b61883afa687d98457fa26c63b6bb5 GIT binary patch literal 4006 zcmV;X4_WYuP)j{00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>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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%?KU2*5u~8hcBtEh#;8 zrMjQBd|Kh6?$clqrIgEn-Q!Bz^{qXyU5=ohUJYdpBBaV-QC@<0N#|ic|x&0@2F;R8QzJcl&NWj7jA3u z_V#vke}Df|$^X{`eBEKGK4yMfRw-{oit+yA<75Bk=H{1&hX=uxsp$5YYrw_&Hp}Z8 zo0Jp)4e$?L5L*Ekac%LuPFEKKNQ!_vj+369o&DBjN0uvNCrk|zmRVf~J_Rs$9Opko zaddPPUtC;#JU>701wkCcX93CDf0B~}05?)?jemp)t&a~-w zqySd~9C#j1Vo!8Tr?K8?Hj2^SV`~BZ@Z&;CseQs^dXh5(e~9Ukg8YWvd`uSSfUiw} zR{?J_iII`d6!r&@ed;50GrnsnrE!r}bqLWVm-7s+9aF|InZD#Iwjs>sdn*CwiX1Qu zIx`@f?fkpRt)zq-^0T+XP{H}Myr`<(ItQ33o`(U)FdsD+Xl52ar6Q)*4B#%Ow+q^I zg6apHHe^GG#@rd3dnF3VvOtV)Z)G%EF&_MQm-YwvmnZ)Y04B?E9w+||CjbBd M07*qoM6N<$g80UMQ2+n{ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_option_panel_contextual_popup_arrow.png b/res/common/usr/share/osp/bitmaps/720x1280/00_option_panel_contextual_popup_arrow.png new file mode 100644 index 0000000000000000000000000000000000000000..3d375f86af8ce658708360d644ef8b0244188bd0 GIT binary patch literal 3020 zcmV;-3p4bIP)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!jy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b/res/common/usr/share/osp/bitmaps/720x1280/00_option_panel_handle_bg.png new file mode 100644 index 0000000000000000000000000000000000000000..a1f421606fc10f7c4a56f0e0980d534741b90a5c GIT binary patch literal 3230 zcmcJRS2P@ayT$*acM)CWC2A%ZU36yjUIwEj`Y2H&(LzRV2|@IXkVI!9%E$!KJ0plX zO0)<?BiT9eNrr8UO&jp01|(rEXpFkc#4R zs=tkxxfE)DU7H60&|doo5|ICr0{|KmPdMDv)Wa{x?}3M(Kd&Af&g&oO=k9sm4S5^$?DA)L2r^dWVOddR04u9i4)pGQ0+Vh z&z=MwOVS>ce#d|c%>vZJQemY)U7G}r$rZ8yMP$Hn$i;aTn2G^M;V0iF02*_g7fu4~ zUhuJ!6r}^+Yi@~}z(WaCk6I;b0i*eYIYw;T*1U>fKEOJg) zobuJhJ45q0rJ`gQzwQqMP?XMkdF}pL2!R1hAjqZS819K}wNYH$baq}nUmvaVR|jA@ zD01vv6k5-PR-!=roWB;_CG)sTTlDZK#l4PEy%7{`&ROsK|C5bY@pJs_?E2c;jD9!F z&S}s(;vCg^uig6W{_jZT)1$+$pH>8-q#UAj$d12u4j&knTp!J#j&+{@mZo#sM0;_{ zGjX$9&l!(|u&kOf2c&A|Ki!uqxtRpZxYZ*#e&M>ZBzi)sx+Du~y;MoU)5XdiTu6Tz z2s0sr+EIM8=O3;-W*+gG z{tV)smLC{Y{2Bi^Q5ANGv_w&pY4lTFbK;vzBymng@~2X<=fxfKb?A~YrwH&4B(j*@ zG)R}#l{8OA@LKBf?5PA^QAn`Y{+O=R52T_`<6CqjUqscJseGYpgyYNQxni|n(|&dh zlFUzID=PRL*ubUoRIYgAbCn0lPeF^d2F4+4!qSTo#L+@`^(^d6y z)ml}PHYXjrjJ^*hV~)~lr z4da~8*5gB)I^T1?lO6=q(Z{pK^d+K1I14x^IZ&Lz9Pe@sOF1V}IQtM1@{-%R8+nX* zewIiG4)T~aeUK(gKT9Z!8v;dCRF+mQR?=GTTMi-8D(+fDV6`o!EmkY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5ZyE69fPq1HkW#OWnNeq!O3i)DZy1TmabpGVb+g13)sMr>TJmnfoy- zsZZ*}5;vx#O-4jmrK`7-i&Rus-zV>JLzb~O4CoJY*`tw2FToEWn78fOLZZm){VN;Q zj=H;j+!@$Lwjvz;UnEqlOpt%zMf`($`M;n|HOkSZB*oE}T!E4QODqkHJeG!v^_L6(&m)^$IZ_woUNo|dsD7UmfJKgUGVl>h($ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_option_panel_handle_bg_press.png b/res/common/usr/share/osp/bitmaps/720x1280/00_option_panel_handle_bg_press.png new file mode 100644 index 0000000000000000000000000000000000000000..fc8dc679c47d08243f2f71a49a7da9b10beb15c3 GIT binary patch literal 3242 zcmai$S5TAN0)_tw(wlUo9GZX;2p#E=(0d7nB1#X4G(~9=L$88J2ZNvjp*IO4MS3SR zsi8<05V(gTC?yx?+%t3MKHT&0?e(HIStXNZH9a^gEQ~&_b>gj5lU*^^&PbkPP zPxbd9)0aW%qig*b0H~RM0|K&NvjYH?i8~BtYU<|g=l$5t+lN;V2IKX4xWy)`%JIS>)F1|(YT#|oLcwbejYl&l3xWA48T4cL@@H7g+OBD7k#hFt#gHT> zq7zumL}}uvrpZ_N-X?~>i;3$$T?&5ZG1+vyK6FtxrMgjefT69~*OfMtMbi{R zd9Hm8@9FGbS`}9hr4sZ37$|C;`5vDOfPfQ}vhpqdR`M1A6fjOr0kj(Bv`TPA6Y000 zS$9F`2vDnE@@)eOG&7(cln5;Z)U`oqOs0?pkVgvG4>&ol0H$Jqz3}t(aR7}u$qEJm zwyAt9puA*&m&qkY6L3=k%7*X6X#rLe0JEz>rvfl721w{3Ty=q}dY~20KwSe+&;Sx< zF_AX`(qO>8S3n>Dh{yt%wf7Oqf8MHK*Z^Oe%BoRr5LD0#wWSdAB}X8{c|`DfY`2)@ z9IiNItBbb>W^qV`%Fus37zBX4WR}a<9-If@=_>GexkMb@eX*_2WJG>P$CZn<;Zh%U z09f)vjb4aC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OAOCz= zOH8V)BDMnMZH6_uU5S4fDI1Ik@i_|l6(3~FJxj@SGWx9?vi0D75x)z+x6R;z^y9+P zy)n7WL33>BnYyE#4%Ds=$!6$^z?R~6uB_Al$JqZ``^(rrTKmh`@AAJOC=dV;i6nqE XFIbIhTD|o0GXQ#8#+nsS`>=llMUUEZ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_option_panel_handle_more.png b/res/common/usr/share/osp/bitmaps/720x1280/00_option_panel_handle_more.png new file mode 100644 index 0000000000000000000000000000000000000000..02f79d0fecae549eaaf91a29b7fe09dd30cab8c5 GIT binary patch literal 1430 zcmeAS@N?(olHy`uVBq!ia0vp^uYkCegAGVJEUCQ#q$EpRBT9nv(@M${i&7aJQ}UBi z6+Ckj(^G>|6H_V+Po~;1Ffc1+hD4M^`1)8S=jZArg4F0$^BXQ!4Z zB&DWj=GiK}-@RW+Av48RDcsc8z_-9TH6zobswg$M$}c3jDm&RSMakYy!KT6rXh3di zNuokUZcbjYRfVk**jy_h8zii+qySb@l5ML5aa4qFfP!;=QL2Keo`G(%ftjI#nTejE ziGihwrH+D;fuVuEp^?6Uxvrssm8rRvfuRBvC;@FNN=dT{a&d#&1?1T(Wt5Z@Sn2DR zmzV368|&p4rRy77T3YHG80i}s=>k>g7FXt#Bv$C=6)VF`a7isrF3Kz@$;{7F0GXJW zlwVq6s|0i@#0$9vaAWg|p}_G8yuzFu#E6=>*lEl2^R8JRMC7=m(LT&-jW|!2W%(B!Jx1#)91+bT`GI6`b z5vO@jy(zfe;)GMLKF~4xpom3^XqXT%^?;c0WDDfL6MkwQFtrx}lXcCVPiGhyn7BM$ z978H@y}4oN#q223@Gw^S21nROmZsL+4?IoV%&M5qKd9Uy#1gn+>(=c8ECTqvb4XZ+k!wL{?2yg^q#)VB#%;dzn5Qtm2 zK$t@mh6S`ZLeHc1@Uvi++QNND?`2p1 zGR^xkb^O{XF-a{_y)cakalU-aq=v|L^a0tF}G5S{QMq z#wKv{htkLIj!XS5%KB3IOyB%x{rvs_3$U3z{s$2lFKDtbBA0|N$Kh8=d#Wzp$P!1I{3H% literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_option_panel_handle_more_press.png b/res/common/usr/share/osp/bitmaps/720x1280/00_option_panel_handle_more_press.png new file mode 100644 index 0000000000000000000000000000000000000000..add43f8de0cdebcc43bfa029d0d1ac4b3db0f2b7 GIT binary patch literal 1429 zcmeAS@N?(olHy`uVBq!ia0vp^uYkCegAGVJEUCQ#q$EpRBT9nv(@M${i&7aJQ}UBi z6+Ckj(^G>|6H_V+Po~;1Ffc1+hD4M^`1)8S=jZArg4F0$^BXQ!4Z zB&DWj=GiK}-@RW+Av48RDcsc8z_-9TH6zobswg$M$}c3jDm&RSMakYy!KT6rXh3di zNuokUZcbjYRfVk**jy_h8zii+qySb@l5ML5aa4qFfP!;=QL2Keo`G(%ftjI#nTejE ziGihwrH+D;fuVuEp^?6Uxvrssm8rRvfuRBvC;@FNN=dT{a&d#&1?1T(Wt5Z@Sn2DR zmzV368|&p4rRy77T3YHG80i}s=>k>g7FXt#Bv$C=6)VF`a7isrF3Kz@$;{7F0GXJW zlwVq6s|0i@#0$9vaAWg|p}_G8yuzFu#E6=>*lEl2^R8JRMC7=m(LT&-jW|!2W%(B!Jx1#)91+bT`GI6`b z5vO@jy(zfe;)GMLKF~4xpom3^XqXT%^?;c0WDDfL6MkwQFtrx}ll2^Py=(>sCQeTm z$B>F!Z*CZRF*}MhJnR(AVOd?lbnsA^P4j}az4HzjSIDhpaTLkPeXGmjxWQL-S*OIY z<#~yUY07JQX1;HhG_c;I^zQt+Z$;-gHEuVpXK3N#5CvfYEf7`+fnkRg3Ly?F8Uh@F zm~mkf6f-%oE(GEhE*K`P8DRik%?R6(ZN|_HvAsC=V)zI5s!ZE&ZzH15s+(_I7vxv| z%sBMi%~wTB@AQ|7WdAvPwXk??{M(w-%hW3_ISQ$tHqlaZ}yxyF1)ov{Z;Xs)4Klrk2|+SU9D+}@>sEc?63d; 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$;({XG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pPl@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 zcmaJ=&ui0A9FGiS6b6D`+{I@GV{U5o^-`MzB`aimHcaAO>Nx4Z@af?J|fS8hv*AdWNa|6|pX>Z?thl-TII*lf2 z8rPtOUCvA}T`72fqXtwQAdurSX-g1AAj_PX z&B?NO6-a_8@dAD2w3vlC8A|h@|FG0sV7FjhtMq-*lft$M@gdJgQN%?V4hI{&SSS<{ z4M|Eb}5i=2?8 zGyodL|DmosM2Dn~PUHQjaM;-P5no3k-U=+*xYktS%7=6E)a!r30)Fre;*#PlqrYYIyhILEPJIiD}*MK!01^YfxumX<2AP}VB>T!|Vo zYG%OIu(jnPj|{l>DOVoJO-8}>sb>uZ&K+b|0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D 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~NklO literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_panel_handle_arrow.png b/res/common/usr/share/osp/bitmaps/720x1280/00_panel_handle_arrow.png new file mode 100644 index 0000000000000000000000000000000000000000..53f8bd6046435b6995cb3d4c883c6f3a506af13c GIT binary patch literal 3164 zcmZveXCM^*AIHBJakgY8vRC#DXWiK|obIHu;*_kYGorg>#gAmWPE__t)XB=(B81Gd zX9#6<%KG(t{Qp0Azh95vug{ZD++}MM7RGao000&B27gn> zKmeG|{uc#|0I#gU91IlO<$?8Q9HZh4aR_Y@5#*8PW20<;Kz^CgKvfY-O3BFpkkL z3cpN@d=>ko`(Q5YmG?*kb-DNW{iyCr*$%O~pPme5PB&GtRl_kC!v)XGMs~J!%q`06 z;~B;L0Xww%rf}eqC^@ueD zUfQ6n|H>01fK~*Yo)&GIU`!4unxQ;RL1hgf_pvio0Vp$2w2h6D2DD+orAt&a7(C7b zoW|QI*w2d<>?<;VO=VTVYQ;2-@J>*<0D2TkUQnvfjOQY!y6Y*|Y<>BbkSsoByeix5 z&SwB}lezw`-8l;GW3A}xQ%@wZI?Js!(Vd96xh)(o^_TkV127j9F>oxaP<;-kO^5S2 zeks05>ve-E_Z~Igvx-gsJ;+_1K<)Vd=f)`SY3=y<(&FNnc^llxwHpmD+Od+6u#;UsFH2HqEq}?+HtP(N*PUk+@5>?TP!UH z-iXYgPK$*Lxe6MXqAk(ZW2Qwy=fzadOfYCL&^)$nkrYWOvU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;4}C zEePK`SI7<)qLr)=w#L#PImiW;IY(%47m2#?)p)kjvppkxx_@*PC!z{l?n%(FARnav zkX40Up&SIbiTdxFw4;=`7dX!A>Ci1ViRD&qcDc*7iED*vpSsaNYZz15b|U7&`rWB? wGrJwsbS^MCa0Pq$OSZ(2fvEkoUhzvlyHM%IQEaF<8_0>c30TmS$7 literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_panel_handle_bg.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_panel_handle_bg.#.png new file mode 100644 index 0000000000000000000000000000000000000000..b284ca06b9c09ca1aeee9091527b4cca5acf09ec GIT binary patch literal 3553 zcmZ{mXEfaZw#I)#^g*H%LWs`jqLu7caZj#DtRA}Xv)rhts6%HV=v=m|Io6unt zq?2~K<&>`?(i@t`EFLXM{rz+d0E#o{Z`__iiMru#mgQftG(eLcsO(Iy1puOL8!DU1=M>f5rk(5 zSK7G{{?g;6fd%!f;{o8L-4FehkCZUVBX(^v)nQUvC(gwr0_T@7u2fRSy!dlYv^LS* z6mE`@Bs!A^dKpsMVx}*l9Ol|=CyIf$WD{*Q+cM;b0r8l>2_0HuZ=)Mc6u(k7Ls~0k zSmHF_Q%t!AiRGs;6eFerKd~sjk}lbqLV8dyrYS*&M0<9bNF@3ni;4{PsWm(jBFl6c zZFo>ai5z69x2Pd(PsX`SHiQt}jn?QPlO_sL<8WeE)rRTA4Cl2gIqq>w-dQA*AtQ`4 z>E(TpS*iDlr|r(~ekNyeu|$}*5ZAZ6X|!OP@FYmT4ENn+h&XR+`YoM?573#rGnzBL zrd)eMRR~FK7Ou>ZMOW`e64|#x9D>8~n}wTwn-ZI>o17;$E0UyrI*7;1oc5xeDztD2YQn=V(DK<`MUS*z8SpiDoSBv#T&2ItF;$1>>XmDRq_nq~1|^uT+5 z+zo2Gvz*0lm@{QLGrFg>o3l%J7D5S1ppP9&g7YyWm`Ir5%ppu4bM?!aXH%GmprSHj z2e~_W)Omj9FaeanbNY-g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Oy5#D;^Xv;ByIMn^fWsle8Ny2vE-KVq>sJih zj3U%D?VI3%7S+)GuB*c15Mhus$ozG|;5wJTdg$gJo@^D*4w74Z`YOC;jb!%zQ#Lpo z*h?+{BwrI@mVaU6Y|~~mrZoL+e}sO~9r#B*^kW;PRkGWn`7t1u!` zyr-PloGnm?Bxl<<8SEKl}h5x5}^_8OVD% zG1|Tm!h2NPVbtMprgEsd09j7NDBD~u%^xql@ahREKAm3D!V|~GPF`i;(x@S~)AG_r z6F>mnhHy}36zT(nIM03hrk07S(C!0+oD-2;GNQ2^L?1OT~Q0ATcc<1nBJ0ECn}>Z;IZ zi$9jSz3qaTde$bBUt2t`O3^j0*XExe@QtyqjenlzL2Qs+O(U?V@n6QlzSUFZk$yp% zu0m1GxViP9p&>Gv#f<$#RNE}sZ2Nqf{8G0NRx@0~RVY0IgEWh1;)jIKH@l$~8ef(C zhDfGt?>5FuLy>iY6z;*ykXXghQltORlF)OHqG0tK_utEvJ;^|E#A<~9P(pBnPv0!( zf7)LPDrxPUd~enEBJ&Qj^nXd{rW+B%dw%CXp0lytW)Y<~Gw^Qx85xcX#03R+Sl6=q zcg_<|SngCiAi>qt)vFE;w|2#P(FR^bIBJPI9iJu&}=XL^C_(N$M<}@ z-I>?D?^>`Pf*9rubg(=u!gRS!w&rya(q2YzK8pm2uX`HQVY|MuP1OD?B>2N0pVR4| z3;SZH(RuR@Hy^3Aw#Ki?Y@1MG*((GDVifWF6kbiceM@513;gw324V;$8N2O%^mTA5 z6+tpK(D1s1O`1A4rH>Wz3u#|T$5e|Gbh)UGhdJZxTibA^ np#~h@v!_7rf*Js>uL*(g3=w1LJwJ?Zb_meXFjTKobBy^nhqjp& literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_panel_list_bg_press.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_panel_list_bg_press.#.png new file mode 100644 index 0000000000000000000000000000000000000000..3749859b22589e2695facfcde8f9c1e29ff00d0e GIT binary pat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x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z0001;NkltFQqz6F#KK&*PK8 zOjJHm5&_h_+dC^aupk@>9l8U}fi7AzZCsS=07?{&CLn2Bde0{8v^Kf6`()~Xj@TAnpKdC8`Lf!&sHg;q@=(~U%$M( zT(8_%FTW^V-_X+15@d#vkuFe$ZgFK^Nn(X=Ua>OF1ees}t-3#_`hBq$Z(46Le)Ln;eW^@CE2 z^Gl18f$@>14ATq@JNy=b6armi@vTd0QD#|cid#{Bt^zoGtunFLPuSlOy(#2`nLf}l z`k=&tlvrRwz!V5#!jnFb1J69EdB7Y~1k4&gR-PyaW~;}ZE{-7;x86*5U*F$t;twiDJYD@<);T3K0RWk*kpTbz literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_picker_button_focus.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_picker_button_focus.#.png new file mode 100644 index 0000000000000000000000000000000000000000..68928521e01763b350af6967c174f0a104123655 GIT binary patch literal 1191 zcmeAS@N?(olHy`uVBq!ia0vp^B0#Lq!3HEBo4iT}Qj#UE5hcO-X(i=}MX3yqDfvmM z3ZA)%>8U}fi7AzZCsS=07?{&CLn2Bde0{8v^Kf6`()~Xj@TAnpKdC8`Lf!&sHg;q@=(~U%$M( zT(8_%FTW^V-_X+15@d#vkuFe$ZgFK^Nn(X=Ua>OF1ees}t-3#_`hBq$Z(46Le)Ln;eW^@CE2 z^Gl18f$@>14ATq@JNy=b6armi@8nI)O3aYUJc*Y+z~b z=xX6;KL?fq0y6ST@{2R_ z3lyA#%@j1kGxJjN%ZoKZ(F5_VOKMSOS!#+~QGTuhIDD-#vDi=8-w?ei?JgIrW98(0$8nNt3A;4^P-P6S}q~g|_>4tpG20X5hS=Twd zkmNl6D$uB;VIFH+nV0V@k7K@*wO(dK&u6T+S4lX*{(O#>D1(cz$lvzHl6E7F?pt@N zXI&DrIre@6Cu>}QH`^!Q?)#|+)(MGiT~x(2M=Bvum^I35&!R6c-_DC>=fAsA>VIvi@Iq_4s;*SKEu8s|qY&VAXJ7h}tq{R4=-L<`5d)KnEwfEfQA~&|%B`ji=b?tLox9baS z&$})011R{y2PD%3HINfc2!uE#`e_p462%cn7)mt64<>UFWn&oqfSLuL?smfu3pP*t zy#0T_|9ju)>U^%TVRHjP5RK^_FpK8|ejk6h9)IutGVwm1LVl{(@3HfKNp%q+>-GQw zX;U3US)}Ttd#6z=LDc1qT(94o*(qwa8Bqh7NZE8Snjl)+%8sgyARi2%LBo>B#mVy| zFm#FB&1L9}lSD(tjxiVYjCJO;u@Ozs$+qpFwJc%+6ZtAAn+3}g%M!WFE8=xUl8> zJ63ezokR}#z9UjpsZ@%T*of^8Qj8!70Y@|%#u8y~)biDG*z&g47$EXA*KmBpwm`tB z4%kIsBC(}a7fdIUStYi-l|bQ;QDxPkm`+A zk>6SaL>5!!1USgTDt3E z?e|7*oqoE~Jf=MH&D~SC7qlPupz{wtb?A#%Iq4VzOL`@+3{)hT>C$l zt`!e#NSxa~x9`}8@bE)F?O&+ye@&z>f^X|@Hon*V+aqFDhDmxmYHf*(ve)d@dV`uG0}Na~{B literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_popup_bubble_bg.#.png b/res/common/usr/share/osp/bitmaps/720x1280/00_popup_bubble_bg.#.png new file mode 100644 index 0000000000000000000000000000000000000000..6787ed7d1afd2cf2c96ba7d20aafe354009bab9f GIT binary patch literal 1362 zcmah}eN5bB94;R&+%lGJGRc^lrl8{RdTo#E^}4&wF;vgo>L}iQ7{WVG4hiIY>b@&!I<{xA>ZQqYR z&-43uf4}alsd_4Rb-`)`L2?7-TrC_K^T}BS-@|WgeHad#biP5aQzCjoPyyl6VlA@98XjyxmxXh4+lHYF z5WU%hEjrZ@tU-N>3Qz}bw}uIlL}?l)OC2;#K7mpMN!bW^(^j&SbNYqKR12|QuP6*X!jT`rfYK~YwSuxjnHE*Mr>D@-eJKntr(9^{bV)0;bSygK{xE1e1`>xEPxAQe2sjAxPfmOLGIVrVDZyr0q)3 z?h@B|PcG|IfuJjDNKsnS6;RWp=!({)#8F=zjTYBSvZy4q$IatejFtnc^fD0rsuDvN z^2#N8+68I7RP^zCA|eJ z(3~!pK3ps}50GKUsIWCMQ|osjNJdA1^M;Ho*N+4%vb^i|j{Lo8wg4YUMRRa0x!>qH z^9*s-k)40YUOasHzR}K(wM93Y2c0*^Ly5yPCB|q);;Z+L<$ZI3YurCJ!4*%gufAG#e z+Hic`=9vvUA7HFKt+_W|s;)5RCWpFK{cP1=U`8TSmb0VJYGe4p{``$s59Rjlo2wt_ zPIbNd(OXlIqXnOKtzCa1`f<*IlJUK-{6778_klHA{`u0*pZkP9obmhzGgUw41>Z^C z8E{+Z&UdGkg8F0KpY13_7hU@0bY_3&rIXFa$Lwc!`{M%g=QWEFMT}eRN0{?-HMhri zcSZiXICS~ugViN|->(?`$s?Qjm)1$vXIBLywRU{`>gqw N3-DFkiLw_v{sl_6*@*xE literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_popup_bubble_tail_bottom.png b/res/common/usr/share/osp/bitmaps/720x1280/00_popup_bubble_tail_bottom.png new file mode 100644 index 0000000000000000000000000000000000000000..8a651d1de4bf735c139c0f5bffe23b5b1a42fdb0 GIT binary patch literal 3078 zcmV+h4EghkP)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_I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$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} z0003wNkliq@ z2?PW|Tk!$X*(k?m1b>6O^LLTl%eHer?wpx>b_z+i6TR9OP*0Jq;I zF4g<|vlKcNdiklsa^kLR00Ushf`)p)bRJBqEo%u~|FuGFphKZqoeHslDxrRZ)uV{I z16%>?xi7{NI0wc}VE{sPXwx0%EeoTg2TVf1_;#q}v~pl!xE=v_p<$W=m2P{g7}t5> zVPV@q-{(Yy7WECV4P093(8uUHfv;L|j3d{rq5nTf_*r&bcc7*iu4_W$CP1+a+9R+J zoB+=`MD1l;Q(M>vU=KJ0UUP_gUhWFr=d`fDxycJlK=0WVdiq+S$ow3$0?bmMvc>z* c{|0&+03~gBvzcRwf&c&j07*qoM6N<$f(13YqyPW_ literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_popup_bubble_tail_left_ef.png b/res/common/usr/share/osp/bitmaps/720x1280/00_popup_bubble_tail_left_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..767ff1b24db2332939b264d33cf0de6b11f4a64d GIT binary patch literal 3648 zcmV-G4!`kKLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T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F1K$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} z0003(Nkl zS}-CZrNo!enNUUKe3UI_z0wm}UnI~hQ*Q!2;3Ra((xM}@8oFeEV=T0131|{6q1Y0T zgr0v< zLT??Pz$vg(1WZ;_-zWX*G4x*c4V(kpMZ?Tv>XFcvm93*W_f%Lg(5ujHZV*SHwDDsF l_y~0!6P5QvB~VWN3;^#@+Ln2Rz7hZc002ovPDHLkV1gD!zrg?i literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_popup_bubble_tail_right_ef.png b/res/common/usr/share/osp/bitmaps/720x1280/00_popup_bubble_tail_right_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..6c65724277fa8d970ae69c499787fcd962b101ec GIT binary patch literal 3513 zcmV;q4My^bP)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&>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-;pIT0y|$c%_ApPZb$0lorz zz`RjxEVYIP(tmcU)U=2!US3{qH=E5v-~dFH~YhZoxLed8f_ptN|nxVYHTc=%|-)I$AJY9c_MT50jH ztx$emO?E+Z&c#3v=m0lC5d2m}=2e|c!CA`V3)(p+A`(?9mE9l+9s%EhUuL6-4U|kA z2v~K_ZRptl1Ol_ZM4mc*q4EIQ1$KZxz^&PztW|en*%Gj+`6GGl=c5Ac08foA9knL* zO1#P)XjaF0Q%5>dm_Vzi6{Ua;^`jvR(6+9%MTO~Vb+nSt2~?*1AA}(kvSp=$ZBk8vh-A^R5Sxz}Y^EOvU3`wyKNQ zf_{$Gj!+-ygCrIus)T(eEwe&+RdfYXCR55iX^G^&Va)yS4@X!IvLvNMPG3_#Zd z3B6Izq)I=avI)7OdArD17Nm@Jl+wVGS5gQ1fP(3v1gJL&RR#fdy_GXIDugMjB$hHR n%pf4l8^@-x<59+W*z4~A>a!-_OW9*100000NkvXXu0mjf<*bgv literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_popup_bubble_tail_top.png b/res/common/usr/share/osp/bitmaps/720x1280/00_popup_bubble_tail_top.png new file mode 100644 index 0000000000000000000000000000000000000000..e45ddbcb309ce757def9cc1419608524505a14a9 GIT binary patch literal 3062 zcmVKLZ*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;&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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} z0003YNkl2-z|8VBTfF`8VBYRd1}LU=rN~wSB~St-Py)pcx=|La z*0rR4EFBt18V0F^|J6i%B6f(bZ?zDh83L0vqJBwGet@wVUkcPlY>$9IJXZ~>Ar^mN zKztx>s|1ZsU~HyUfga6{;*7kM4Qe3X&cuNDM%OV literal 0 HcmV?d00001 diff --git a/res/common/usr/share/osp/bitmaps/720x1280/00_popup_bubble_tail_top_ef.png b/res/common/usr/share/osp/bitmaps/720x1280/00_popup_bubble_tail_top_ef.png new file mode 100644 index 0000000000000000000000000000000000000000..44a0e2a75d2e076dac5d18d5e30c2813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